From 1dea879815bf361a5f63264b9b2cd44917a237d2 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 7 Nov 2019 13:13:38 +0100 Subject: [PATCH 001/845] Initial commit --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..bd878a0d2 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# yosys-symbiflow-plugins \ No newline at end of file From d4f3b058a610b56d9dac0984c9c19e24c7cd093b Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 6 Nov 2019 11:11:27 +0100 Subject: [PATCH 002/845] XDC: Add initial version of XDC plugin Signed-off-by: Tomasz Michalak --- xdc-plugin/Makefile | 19 +++++ xdc-plugin/xdc.cc | 173 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+) create mode 100644 xdc-plugin/Makefile create mode 100644 xdc-plugin/xdc.cc diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile new file mode 100644 index 000000000..3ef6d55c5 --- /dev/null +++ b/xdc-plugin/Makefile @@ -0,0 +1,19 @@ +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) +LDFLAGS = $(shell yosys-config --ldflags) +LDLIBS = $(shell yosys-config --ldlibs) +PLUGINS_DIR = $(shell yosys-config --datdir)/plugins + +OBJS = xdc.o + +xdc.so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) + +.PHONY: install +install: xdc.so + mkdir -p $(PLUGINS_DIR) + cp $< $(PLUGINS_DIR)/$< + +clean: + rm -f *.d *.o xdc.so + diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc new file mode 100644 index 000000000..9247a2b82 --- /dev/null +++ b/xdc-plugin/xdc.cc @@ -0,0 +1,173 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2019 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * --- + * + * XDC commands + FASM backend. + * + * This plugin operates on the existing design and modifies its structure + * based on the content of the XDC (Xilinx Design Constraints) file. + * Since the XDC file consists of Tcl commands it is read using Yosys's + * tcl command and processed by the new XDC commands imported to the + * Tcl interpreter. + */ + +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/log.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +int current_iobank = 0; + +// IO Banks that are present on the device. +// This is very part specific and is for Arty's xc7a35tcsg324 part. +std::vector io_banks = {14, 15, 16, 34, 35}; + +enum SetPropertyOptions { INTERNAL_VREF }; + +std::unordered_map set_property_options_map = { + {"INTERNAL_VREF", INTERNAL_VREF} +}; + +struct GetPorts : public Pass { + GetPorts() : Pass("get_ports", "Print matching ports") {} + void help() YS_OVERRIDE + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" get_ports \n"); + log("\n"); + log("Get matching ports\n"); + log("\n"); + log("Print the output to stdout too. This is useful when all Yosys is executed\n"); + log("\n"); + } + void execute(std::vector args, RTLIL::Design*) YS_OVERRIDE + { + std::string text; + for (auto& arg : args) { + text += arg + ' '; + } + if (!text.empty()) text.resize(text.size()-1); + log("%s\n", text.c_str()); + } +} GetPorts; + +struct GetIOBanks : public Pass { + GetIOBanks() : Pass("get_iobanks", "Set IO Bank number") {} + void help() YS_OVERRIDE + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" get_iobanks \n"); + log("\n"); + log("Get IO Bank number\n"); + log("\n"); + } + void execute(std::vector args, RTLIL::Design* ) YS_OVERRIDE + { + if (args.size() != 2) { + log("Incorrect number of arguments. %zu instead of 1", args.size()); + return; + } + current_iobank = std::atoi(args[1].c_str()); + if (std::find(io_banks.begin(), io_banks.end(), current_iobank) == io_banks.end()) { + log("get_iobanks: Incorrect bank number: %d\n", current_iobank); + current_iobank = 0; + } + } +} GetIOBanks; + +struct SetProperty : public Pass { + SetProperty() : Pass("set_property", "Set a given property") {} + void help() YS_OVERRIDE + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" set_property PROPERTY VALUE OBJECT\n"); + log("\n"); + log("Set the given property to the specified value on an object\n"); + log("\n"); + } + void execute(std::vector args, RTLIL::Design* design) YS_OVERRIDE + { + if (design->top_module() == nullptr) { + log("No top module detected\n"); + return; + } + + std::string option(args[1]); + if (set_property_options_map.count(option) == 0) { + log("set_property: %s option is currently not supported\n", option.c_str()); + return; + } + + switch (set_property_options_map[option]) { + case INTERNAL_VREF: + process_vref(std::vector(args.begin() + 2, args.end()), design); + break; + default: + assert(false); + } + } + void process_vref(std::vector args, RTLIL::Design* design) + { + if (args.size() != 2) { + log("set_property INTERNAL_VREF: Incorrect number of arguments: %zu\n", args.size()); + return; + } + + if (current_iobank == 0) { + log("set_property INTERNAL_VREF: No valid bank set. Use get_iobanks.\n"); + return; + } + + int internal_vref = 1000 * std::atof(args[0].c_str()); + if (internal_vref != 600 && + internal_vref != 675 && + internal_vref != 750 && + internal_vref != 900) { + log("set_property INTERNAL_VREF: Incorrect INTERNAL_VREF value\n"); + return; + } + + // Create a new BANK module if it hasn't been created so far + RTLIL::Module* top_module = design->top_module(); + if (!design->has(ID(BANK))) { + RTLIL::Module* bank_module = design->addModule(ID(BANK)); + bank_module->makeblackbox(); + bank_module->avail_parameters.insert(ID(NUMBER)); + bank_module->avail_parameters.insert(ID(INTERNAL_VREF)); + } + + // Set parameters on a new bank instance or update an existing one + char bank_cell_name[16]; + snprintf(bank_cell_name, 16, "\\bank_cell_%d", current_iobank); + RTLIL::Cell* bank_cell = top_module->cell(RTLIL::IdString(bank_cell_name)); + if (!bank_cell) { + bank_cell = top_module->addCell(RTLIL::IdString(bank_cell_name), ID(BANK)); + } + bank_cell->setParam(ID(NUMBER), RTLIL::Const(current_iobank)); + bank_cell->setParam(ID(INTERNAL_VREF), RTLIL::Const(internal_vref)); + } + +} SetProperty; + +PRIVATE_NAMESPACE_END From f3fd87e8da024b758a0f494090ac5f842a7c10ae Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 6 Nov 2019 12:31:02 +0100 Subject: [PATCH 003/845] FASM: Add fasm backend Signed-off-by: Tomasz Michalak --- fasm-plugin/Makefile | 19 ++++++++++ fasm-plugin/fasm.cc | 87 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 fasm-plugin/Makefile create mode 100644 fasm-plugin/fasm.cc diff --git a/fasm-plugin/Makefile b/fasm-plugin/Makefile new file mode 100644 index 000000000..ddcdd1a10 --- /dev/null +++ b/fasm-plugin/Makefile @@ -0,0 +1,19 @@ +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) +LDFLAGS = $(shell yosys-config --ldflags) +LDLIBS = $(shell yosys-config --ldlibs) +PLUGINS_DIR = $(shell yosys-config --datdir)/plugins + +OBJS = fasm.o + +fasm.so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) + +.PHONY: install +install: fasm.so + mkdir -p $(PLUGINS_DIR) + cp $< $(PLUGINS_DIR)/$< + +clean: + rm -f *.d *.o fasm.so + diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc new file mode 100644 index 000000000..098ae4066 --- /dev/null +++ b/fasm-plugin/fasm.cc @@ -0,0 +1,87 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2019 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * --- + * + * XDC commands + FASM backend. + * + * This plugin operates on the existing design and modifies its structure + * based on the content of the XDC (Xilinx Design Constraints) file. + * Since the XDC file consists of Tcl commands it is read using Yosys's + * tcl command and processed by the new XDC commands imported to the + * Tcl interpreter. + */ + +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/log.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +// Coordinates of HCLK_IOI tiles associated with a specified bank +// This is very part specific and is for Arty's xc7a35tcsg324 part +std::unordered_map bank_tiles = { + {14, "X1Y26"}, + {15, "X1Y78"}, + {16, "X1Y130"}, + {34, "X113Y26"}, + {35, "X113Y78"} +}; + +struct WriteFasm : public Backend { + WriteFasm() : Backend("fasm", "Write out FASM features") { } + void help() YS_OVERRIDE + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" write_fasm filename\n"); + log("\n"); + log("Write out a file with vref FASM features\n"); + log("\n"); + } + void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) YS_OVERRIDE + { + size_t argidx = 1; + extra_args(f, filename, args, argidx); + process_vref(f, design); + } + + void process_vref(std::ostream *&f, RTLIL::Design* design) { + RTLIL::Module* top_module(design->top_module()); + if (top_module == nullptr) { + log("No top module detected\n"); + return; + } + // Return if no BANK module exists as this means there are no cells + if (!design->has(ID(BANK))) { + return; + } + // Generate a fasm feature associated with the INTERNAL_VREF value per bank + // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 + // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV + for (auto cell : top_module->cells()) { + if (cell->type != ID(BANK)) continue; + int bank_number(cell->getParam(ID(NUMBER)).as_int()); + int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); + *f << "HCLK_IOI3_" << bank_tiles[bank_number] <<".VREF.V_" << bank_vref << "_MV\n"; + } + } +} WriteFasm; + +PRIVATE_NAMESPACE_END From dbe97e30facda547de22159332edbf44612c1510 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Thu, 7 Nov 2019 12:02:40 -0700 Subject: [PATCH 004/845] Adding initial project files. Signed-off-by: Tim 'mithro' Ansell --- CODE_OF_CONDUCT.md | 46 ++++++++++++++++++++++++++ CONTRIBUTING.md | 81 ++++++++++++++++++++++++++++++++++++++++++++++ COPYING | 13 ++++++++ README.md | 8 ++++- 4 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 COPYING diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..c7d7eeb14 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [atom@github.com](mailto:atom@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..d5615e493 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,81 @@ +# Contributing to Yosys SymbiFlow Plugins + +There are a couple of guidelines when contributing to Yosys SymbiFlow Plugins +which are listed here. + +### Sending + +All contributions should be sent as +[GitHub Pull requests](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). + +### License + +All software (code, associated documentation, support files, etc) in the +Yosys SymbiFlow Plugins repository are licensed under the very permissive +[ISC Licence](COPYING). A copy can be found in the [`COPYING`](COPYING) file. + +All new contributions must also be released under this license. + +### Code of Conduct + +By contributing you agree to the [code of conduct](CODE_OF_CONDUCT.md). We +follow the open source best practice of using the [Contributor +Covenant](https://www.contributor-covenant.org/) for our Code of Conduct. + +### Sign your work + +To improve tracking of who did what, we follow the Linux Kernel's +["sign your work" system](https://github.com/wking/signed-off-by). +This is also called a +["DCO" or "Developer's Certificate of Origin"](https://developercertificate.org/). + +**All** commits are required to include this sign off and we use the +[Probot DCO App](https://github.com/probot/dco) to check pull requests for +this. + +The sign-off is a simple line at the end of the explanation for the +patch, which certifies that you wrote it or otherwise have the right to +pass it on as a open-source patch. The rules are pretty simple: if you +can certify the below: + + Developer's Certificate of Origin 1.1 + + By making a contribution to this project, I certify that: + + (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + + (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + + (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + + (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +then you just add a line saying + + Signed-off-by: Random J Developer + +using your real name (sorry, no pseudonyms or anonymous contributions.) + +You can add the signoff as part of your commit statement. For example: + + git commit --signoff -a -m "Fixed some errors." + +*Hint:* If you've forgotten to add a signoff to one or more commits, you can use the +following command to add signoffs to all commits between you and the upstream +master: + + git rebase --signoff upstream/master diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..dec4d93a9 --- /dev/null +++ b/COPYING @@ -0,0 +1,13 @@ +Copyright (C) 2019 SymbiFlow Project Authors. All rights reserved. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md index bd878a0d2..6e9650a16 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -# yosys-symbiflow-plugins \ No newline at end of file +# Yosys SymbiFlow Plugins + +This repository contains plugins for +[Yosys](https://github.com/YosysHQ/yosys.git) developed as +[part of the SymbiFlow project](https://symbiflow.github.io). + + From a563170ae1f88d6613207aaca7bbb34baf909981 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 7 Nov 2019 12:43:00 +0100 Subject: [PATCH 005/845] FASM: Extract bank tiles information from part's json Signed-off-by: Tomasz Michalak --- bank_tiles.h | 63 +++++++++++++++++++++++++++++++++++++++++++++ fasm-plugin/fasm.cc | 46 +++++++++++++++------------------ 2 files changed, 84 insertions(+), 25 deletions(-) create mode 100644 bank_tiles.h diff --git a/bank_tiles.h b/bank_tiles.h new file mode 100644 index 000000000..0559fc8ad --- /dev/null +++ b/bank_tiles.h @@ -0,0 +1,63 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2019 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +#include "kernel/log.h" +#include "libs/json11/json11.hpp" +//#include + +#define PART_JSON "PRJXRAY_PART_JSON" + +USING_YOSYS_NAMESPACE +// Coordinates of HCLK_IOI tiles associated with a specified bank +using BankTilesMap = std::unordered_map; +using json11::Json; + +// Find the part's JSON file with information including the IO Banks +// and extract the bank tiles. +BankTilesMap get_bank_tiles() { + BankTilesMap bank_tiles; + std::string part_json; + try { + part_json = std::string(getenv(PART_JSON)); + } catch (...) { + log("write_fasm: %s not defined\n", PART_JSON); + return BankTilesMap(); + } + std::ifstream json_file(part_json); + std::string json_str((std::istreambuf_iterator(json_file)), + std::istreambuf_iterator()); + std::string error; + Json json = Json::parse(json_str, error); + if (!error.empty()) { + log("get_bank_tiles: json parsing failed \n"); + return BankTilesMap(); + } + auto json_objects = json.object_items(); + auto iobanks = json_objects.find("iobanks"); + if (iobanks == json_objects.end()) { + log("get_bank_tiles: IO Banks information missing in the part's json: %s\n", part_json.c_str()); + return BankTilesMap(); + } + + for (auto iobank : iobanks->second.object_items()) { + bank_tiles.emplace(std::atoi(iobank.first.c_str()), iobank.second.string_value()); + } + + return bank_tiles; +} diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index 098ae4066..5af688dbf 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -30,24 +30,16 @@ #include "kernel/register.h" #include "kernel/rtlil.h" #include "kernel/log.h" +#include "../bank_tiles.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -// Coordinates of HCLK_IOI tiles associated with a specified bank -// This is very part specific and is for Arty's xc7a35tcsg324 part -std::unordered_map bank_tiles = { - {14, "X1Y26"}, - {15, "X1Y78"}, - {16, "X1Y130"}, - {34, "X113Y26"}, - {35, "X113Y78"} -}; - struct WriteFasm : public Backend { - WriteFasm() : Backend("fasm", "Write out FASM features") { } - void help() YS_OVERRIDE - { + WriteFasm() : Backend("fasm", "Write out FASM features") {} + + + void help() YS_OVERRIDE { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" write_fasm filename\n"); @@ -55,8 +47,8 @@ struct WriteFasm : public Backend { log("Write out a file with vref FASM features\n"); log("\n"); } - void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) YS_OVERRIDE - { + + void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) YS_OVERRIDE { size_t argidx = 1; extra_args(f, filename, args, argidx); process_vref(f, design); @@ -65,22 +57,26 @@ struct WriteFasm : public Backend { void process_vref(std::ostream *&f, RTLIL::Design* design) { RTLIL::Module* top_module(design->top_module()); if (top_module == nullptr) { - log("No top module detected\n"); + log("write_fasm: No top module detected\n"); return; } // Return if no BANK module exists as this means there are no cells if (!design->has(ID(BANK))) { return; } - // Generate a fasm feature associated with the INTERNAL_VREF value per bank - // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 - // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV - for (auto cell : top_module->cells()) { - if (cell->type != ID(BANK)) continue; - int bank_number(cell->getParam(ID(NUMBER)).as_int()); - int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); - *f << "HCLK_IOI3_" << bank_tiles[bank_number] <<".VREF.V_" << bank_vref << "_MV\n"; - } + + BankTilesMap bank_tiles(get_bank_tiles()); + if (bank_tiles.size()) { + // Generate a fasm feature associated with the INTERNAL_VREF value per bank + // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 + // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV + for (auto cell : top_module->cells()) { + if (cell->type != ID(BANK)) continue; + int bank_number(cell->getParam(ID(NUMBER)).as_int()); + int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); + *f << "HCLK_IOI3_" << bank_tiles[bank_number] <<".VREF.V_" << bank_vref << "_MV\n"; + } + } } } WriteFasm; From 9ad6acccaae730606ec72f2353fcd47040409127 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 7 Nov 2019 13:11:22 +0100 Subject: [PATCH 006/845] XDC: Add read_xdc and get_bank_tiles command Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 158 +++++++++++++++++++++++++++++++++------------- 1 file changed, 114 insertions(+), 44 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 9247a2b82..3be9d4afa 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -18,27 +18,24 @@ * * --- * - * XDC commands + FASM backend. + * XDC commands * * This plugin operates on the existing design and modifies its structure * based on the content of the XDC (Xilinx Design Constraints) file. * Since the XDC file consists of Tcl commands it is read using Yosys's - * tcl command and processed by the new XDC commands imported to the + * Tcl interpreter and processed by the new XDC commands imported to the * Tcl interpreter. */ #include "kernel/register.h" #include "kernel/rtlil.h" #include "kernel/log.h" +#include "libs/json11/json11.hpp" +#include "../bank_tiles.h" USING_YOSYS_NAMESPACE -PRIVATE_NAMESPACE_BEGIN - -int current_iobank = 0; -// IO Banks that are present on the device. -// This is very part specific and is for Arty's xc7a35tcsg324 part. -std::vector io_banks = {14, 15, 16, 34, 35}; +PRIVATE_NAMESPACE_BEGIN enum SetPropertyOptions { INTERNAL_VREF }; @@ -46,13 +43,53 @@ std::unordered_map set_property_options_map = {"INTERNAL_VREF", INTERNAL_VREF} }; +void register_in_tcl_interpreter(const std::string& command) { + Tcl_Interp* interp = yosys_get_tcl_interp(); + std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); + Tcl_Eval(interp, tcl_script.c_str()); +} + +struct ReadXdc : public Frontend { + ReadXdc() : Frontend("xdc", "Read XDC file") {} + + void help() YS_OVERRIDE { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_xdc \n"); + log("\n"); + log("Read XDC file.\n"); + log("\n"); + } + + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design*) YS_OVERRIDE { + if (args.size() < 2) { + log_cmd_error("Missing script file.\n"); + } + Tcl_Interp *interp = yosys_get_tcl_interp(); + size_t argidx = 1; + if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { + bank_tiles = get_bank_tiles(args[++argidx]); + argidx++; + } + extra_args(f, filename, args, argidx); + std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; + log("%s\n", content.c_str()); + if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { + log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); + } + } +} ReadXdc; + struct GetPorts : public Pass { - GetPorts() : Pass("get_ports", "Print matching ports") {} + GetPorts() : Pass("get_ports", "Print matching ports") { + register_in_tcl_interpreter(pass_name); + } + void help() YS_OVERRIDE { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" get_ports \n"); + log(" get_ports \n"); log("\n"); log("Get matching ports\n"); log("\n"); @@ -65,40 +102,43 @@ struct GetPorts : public Pass { for (auto& arg : args) { text += arg + ' '; } - if (!text.empty()) text.resize(text.size()-1); + if (!text.empty()) { + text.resize(text.size()-1); + } log("%s\n", text.c_str()); } } GetPorts; struct GetIOBanks : public Pass { - GetIOBanks() : Pass("get_iobanks", "Set IO Bank number") {} - void help() YS_OVERRIDE - { + GetIOBanks() : Pass("get_iobanks", "Set IO Bank number") { + register_in_tcl_interpreter(pass_name); + } + + void help() YS_OVERRIDE { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" get_iobanks \n"); + log(" get_iobanks \n"); log("\n"); log("Get IO Bank number\n"); log("\n"); } - void execute(std::vector args, RTLIL::Design* ) YS_OVERRIDE - { - if (args.size() != 2) { - log("Incorrect number of arguments. %zu instead of 1", args.size()); - return; - } - current_iobank = std::atoi(args[1].c_str()); - if (std::find(io_banks.begin(), io_banks.end(), current_iobank) == io_banks.end()) { - log("get_iobanks: Incorrect bank number: %d\n", current_iobank); - current_iobank = 0; + + void execute(std::vector args, RTLIL::Design* ) YS_OVERRIDE { + if (args.size() < 2) { + log_cmd_error("%s: Missing bank number.\n", pass_name.c_str()); } + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_SetResult(interp, const_cast(args[1].c_str()), NULL); + log("%s\n", args[1].c_str()); } } GetIOBanks; struct SetProperty : public Pass { - SetProperty() : Pass("set_property", "Set a given property") {} - void help() YS_OVERRIDE - { + SetProperty() : Pass("set_property", "Set a given property") { + register_in_tcl_interpreter(pass_name); + } + + void help() YS_OVERRIDE { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" set_property PROPERTY VALUE OBJECT\n"); @@ -106,16 +146,15 @@ struct SetProperty : public Pass { log("Set the given property to the specified value on an object\n"); log("\n"); } - void execute(std::vector args, RTLIL::Design* design) YS_OVERRIDE - { + + void execute(std::vector args, RTLIL::Design* design) YS_OVERRIDE { if (design->top_module() == nullptr) { - log("No top module detected\n"); - return; + log_cmd_error("No top module detected\n"); } std::string option(args[1]); if (set_property_options_map.count(option) == 0) { - log("set_property: %s option is currently not supported\n", option.c_str()); + log_warning("set_property: %s option is currently not supported\n", option.c_str()); return; } @@ -127,16 +166,14 @@ struct SetProperty : public Pass { assert(false); } } - void process_vref(std::vector args, RTLIL::Design* design) - { - if (args.size() != 2) { - log("set_property INTERNAL_VREF: Incorrect number of arguments: %zu\n", args.size()); - return; - } - if (current_iobank == 0) { - log("set_property INTERNAL_VREF: No valid bank set. Use get_iobanks.\n"); - return; + void process_vref(std::vector args, RTLIL::Design* design) { + if (args.size() < 2) { + log_error("set_property INTERNAL_VREF: Incorrect number of arguments.\n"); + } + int iobank = std::atoi(args[1].c_str()); + if (bank_tiles.count(iobank) == 0) { + log_cmd_error("set_property INTERNAL_VREF: Invalid IO bank.\n"); } int internal_vref = 1000 * std::atof(args[0].c_str()); @@ -159,15 +196,48 @@ struct SetProperty : public Pass { // Set parameters on a new bank instance or update an existing one char bank_cell_name[16]; - snprintf(bank_cell_name, 16, "\\bank_cell_%d", current_iobank); + snprintf(bank_cell_name, 16, "\\bank_cell_%d", iobank); RTLIL::Cell* bank_cell = top_module->cell(RTLIL::IdString(bank_cell_name)); if (!bank_cell) { bank_cell = top_module->addCell(RTLIL::IdString(bank_cell_name), ID(BANK)); } - bank_cell->setParam(ID(NUMBER), RTLIL::Const(current_iobank)); + bank_cell->setParam(ID(NUMBER), RTLIL::Const(iobank)); bank_cell->setParam(ID(INTERNAL_VREF), RTLIL::Const(internal_vref)); } } SetProperty; +struct GetBankTiles : public Pass { + GetBankTiles() : Pass("get_bank_tiles", "Inspect IO Bank tiles") { + register_in_tcl_interpreter(pass_name); + } + + void help() YS_OVERRIDE + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" get_bank_tiles \n"); + log("\n"); + log("Inspect IO Bank tiles for the specified part based on the provided JSON file.\n"); + log("\n"); + } + + void execute(std::vector args, RTLIL::Design* ) YS_OVERRIDE { + if (args.size() < 2) { + log_cmd_error("Missing JSON file.\n"); + } + // Check if the part has the specified bank + bank_tiles = get_bank_tiles(args[1]); + if (bank_tiles.size()) { + log("Available bank tiles:\n"); + for (auto bank : bank_tiles) { + log("Bank: %d, Tile: %s\n", bank.first, bank.second.c_str()); + } + log("\n"); + } else { + log("No bank tiles available.\n"); + } + } +} GetBankTiles; + PRIVATE_NAMESPACE_END From e3fa29fbd5532f0a7d0b59e39f30358bab39ea10 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 14 Nov 2019 10:50:11 +0100 Subject: [PATCH 007/845] FASM: Add additional error checking Signed-off-by: Tomasz Michalak --- fasm-plugin/fasm.cc | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index 5af688dbf..08e3f07fa 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -18,13 +18,10 @@ * * --- * - * XDC commands + FASM backend. + * FASM backend * - * This plugin operates on the existing design and modifies its structure - * based on the content of the XDC (Xilinx Design Constraints) file. - * Since the XDC file consists of Tcl commands it is read using Yosys's - * tcl command and processed by the new XDC commands imported to the - * Tcl interpreter. + * This plugin writes out the design's fasm features based on the parameter + * annotations on the design cells. */ #include "kernel/register.h" @@ -57,7 +54,7 @@ struct WriteFasm : public Backend { void process_vref(std::ostream *&f, RTLIL::Design* design) { RTLIL::Module* top_module(design->top_module()); if (top_module == nullptr) { - log("write_fasm: No top module detected\n"); + log("write_fasm: No top module detected.\n"); return; } // Return if no BANK module exists as this means there are no cells @@ -66,16 +63,22 @@ struct WriteFasm : public Backend { } BankTilesMap bank_tiles(get_bank_tiles()); - if (bank_tiles.size()) { - // Generate a fasm feature associated with the INTERNAL_VREF value per bank - // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 - // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV - for (auto cell : top_module->cells()) { - if (cell->type != ID(BANK)) continue; - int bank_number(cell->getParam(ID(NUMBER)).as_int()); - int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); - *f << "HCLK_IOI3_" << bank_tiles[bank_number] <<".VREF.V_" << bank_vref << "_MV\n"; + // Generate a fasm feature associated with the INTERNAL_VREF value per bank + // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 + // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV + for (auto cell : top_module->cells()) { + if (cell->type != ID(BANK)) continue; + if (bank_tiles.size() == 0) { + log("write_fasm: No bank tiles available on the target part.\n"); + return; } + int bank_number(cell->getParam(ID(NUMBER)).as_int()); + if (bank_tiles.count(bank_number) == 0) { + log("write_fasm: No IO bank number %d on the target part.\n", bank_number); + return; + } + int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); + *f << "HCLK_IOI3_" << bank_tiles[bank_number] <<".VREF.V_" << bank_vref << "_MV\n"; } } } WriteFasm; From b1fc63d0e8b916094534facf58757476e47aea6d Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 15 Nov 2019 13:45:32 +0100 Subject: [PATCH 008/845] FASM: Read the bank tiles information from part's json Signed-off-by: Tomasz Michalak --- bank_tiles.h | 23 ++++++++--------------- fasm-plugin/fasm.cc | 21 ++++++++++++--------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/bank_tiles.h b/bank_tiles.h index 0559fc8ad..4301f967a 100644 --- a/bank_tiles.h +++ b/bank_tiles.h @@ -19,40 +19,33 @@ */ #include "kernel/log.h" #include "libs/json11/json11.hpp" -//#include -#define PART_JSON "PRJXRAY_PART_JSON" USING_YOSYS_NAMESPACE // Coordinates of HCLK_IOI tiles associated with a specified bank using BankTilesMap = std::unordered_map; +BankTilesMap bank_tiles; using json11::Json; // Find the part's JSON file with information including the IO Banks // and extract the bank tiles. -BankTilesMap get_bank_tiles() { +BankTilesMap get_bank_tiles(const std::string json_file_name) { BankTilesMap bank_tiles; - std::string part_json; - try { - part_json = std::string(getenv(PART_JSON)); - } catch (...) { - log("write_fasm: %s not defined\n", PART_JSON); - return BankTilesMap(); + std::ifstream json_file(json_file_name); + if (!json_file.good()) { + log_cmd_error("Can't open JSON file %s", json_file_name.c_str()); } - std::ifstream json_file(part_json); std::string json_str((std::istreambuf_iterator(json_file)), - std::istreambuf_iterator()); + std::istreambuf_iterator()); std::string error; Json json = Json::parse(json_str, error); if (!error.empty()) { - log("get_bank_tiles: json parsing failed \n"); - return BankTilesMap(); + log_cmd_error("%s\n", error.c_str()); } auto json_objects = json.object_items(); auto iobanks = json_objects.find("iobanks"); if (iobanks == json_objects.end()) { - log("get_bank_tiles: IO Banks information missing in the part's json: %s\n", part_json.c_str()); - return BankTilesMap(); + log_cmd_error("IO Bank information missing in the part's json: %s\n", json_file_name.c_str()); } for (auto iobank : iobanks->second.object_items()) { diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index 08e3f07fa..d75bb50d5 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -47,35 +47,38 @@ struct WriteFasm : public Backend { void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) YS_OVERRIDE { size_t argidx = 1; + std::string part_json; + if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { + part_json = args[++argidx]; + argidx++; + } extra_args(f, filename, args, argidx); - process_vref(f, design); + process_vref(f, design, part_json); } - void process_vref(std::ostream *&f, RTLIL::Design* design) { + void process_vref(std::ostream *&f, RTLIL::Design* design, const std::string& part_json) { RTLIL::Module* top_module(design->top_module()); if (top_module == nullptr) { - log("write_fasm: No top module detected.\n"); - return; + log_cmd_error("%s: No top module detected.\n", pass_name.c_str()); } // Return if no BANK module exists as this means there are no cells if (!design->has(ID(BANK))) { + log_warning("%s: No extra fasm features found in the design.\n", pass_name.c_str()); return; } - BankTilesMap bank_tiles(get_bank_tiles()); + bank_tiles = get_bank_tiles(part_json); // Generate a fasm feature associated with the INTERNAL_VREF value per bank // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV for (auto cell : top_module->cells()) { if (cell->type != ID(BANK)) continue; if (bank_tiles.size() == 0) { - log("write_fasm: No bank tiles available on the target part.\n"); - return; + log_cmd_error("%s: No bank tiles available on the target part.\n", pass_name.c_str()); } int bank_number(cell->getParam(ID(NUMBER)).as_int()); if (bank_tiles.count(bank_number) == 0) { - log("write_fasm: No IO bank number %d on the target part.\n", bank_number); - return; + log_cmd_error("%s: No IO bank number %d on the target part.\n", pass_name.c_str(), bank_number); } int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); *f << "HCLK_IOI3_" << bank_tiles[bank_number] <<".VREF.V_" << bank_vref << "_MV\n"; From b2458526f02e029e6eb995fba4a60204f326ea3d Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 18 Nov 2019 08:23:11 +0100 Subject: [PATCH 009/845] Update comment about -part_json argument Signed-off-by: Tomasz Michalak --- fasm-plugin/fasm.cc | 4 ++-- xdc-plugin/xdc.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index d75bb50d5..ca1587973 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -39,9 +39,9 @@ struct WriteFasm : public Backend { void help() YS_OVERRIDE { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" write_fasm filename\n"); + log(" write_fasm -part_json \n"); log("\n"); - log("Write out a file with vref FASM features\n"); + log("Write out a file with vref FASM features.\n"); log("\n"); } diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 3be9d4afa..b02ce98aa 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -55,7 +55,7 @@ struct ReadXdc : public Frontend { void help() YS_OVERRIDE { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" read_xdc \n"); + log(" read_xdc -part_json \n"); log("\n"); log("Read XDC file.\n"); log("\n"); From fed1157e0f7916335bb0d6335ab14ec0edfaddcd Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 18 Nov 2019 10:09:32 +0100 Subject: [PATCH 010/845] Add FASM_EXTRA parameter Signed-off-by: Tomasz Michalak --- fasm-plugin/fasm.cc | 30 +++++++++++++----------------- xdc-plugin/xdc.cc | 2 ++ 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index ca1587973..5148d0454 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -53,35 +53,31 @@ struct WriteFasm : public Backend { argidx++; } extra_args(f, filename, args, argidx); - process_vref(f, design, part_json); + extract_fasm_features(f, design, part_json); } - void process_vref(std::ostream *&f, RTLIL::Design* design, const std::string& part_json) { + void extract_fasm_features(std::ostream *&f, RTLIL::Design* design, const std::string& part_json) { RTLIL::Module* top_module(design->top_module()); if (top_module == nullptr) { log_cmd_error("%s: No top module detected.\n", pass_name.c_str()); } - // Return if no BANK module exists as this means there are no cells - if (!design->has(ID(BANK))) { - log_warning("%s: No extra fasm features found in the design.\n", pass_name.c_str()); - return; - } - bank_tiles = get_bank_tiles(part_json); // Generate a fasm feature associated with the INTERNAL_VREF value per bank // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV for (auto cell : top_module->cells()) { - if (cell->type != ID(BANK)) continue; - if (bank_tiles.size() == 0) { - log_cmd_error("%s: No bank tiles available on the target part.\n", pass_name.c_str()); - } - int bank_number(cell->getParam(ID(NUMBER)).as_int()); - if (bank_tiles.count(bank_number) == 0) { - log_cmd_error("%s: No IO bank number %d on the target part.\n", pass_name.c_str(), bank_number); + if (!cell->hasParam(ID(FASM_EXTRA))) continue; + if (cell->getParam(ID(FASM_EXTRA)) == RTLIL::Const("INTERNAL_VREF")) { + if (bank_tiles.size() == 0) { + log_cmd_error("%s: No bank tiles available on the target part.\n", pass_name.c_str()); + } + int bank_number(cell->getParam(ID(NUMBER)).as_int()); + if (bank_tiles.count(bank_number) == 0) { + log_cmd_error("%s: No IO bank number %d on the target part.\n", pass_name.c_str(), bank_number); + } + int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); + *f << "HCLK_IOI3_" << bank_tiles[bank_number] <<".VREF.V_" << bank_vref << "_MV\n"; } - int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); - *f << "HCLK_IOI3_" << bank_tiles[bank_number] <<".VREF.V_" << bank_vref << "_MV\n"; } } } WriteFasm; diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index b02ce98aa..f276f999a 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -190,6 +190,7 @@ struct SetProperty : public Pass { if (!design->has(ID(BANK))) { RTLIL::Module* bank_module = design->addModule(ID(BANK)); bank_module->makeblackbox(); + bank_module->avail_parameters.insert(ID(FASM_EXTRA)); bank_module->avail_parameters.insert(ID(NUMBER)); bank_module->avail_parameters.insert(ID(INTERNAL_VREF)); } @@ -201,6 +202,7 @@ struct SetProperty : public Pass { if (!bank_cell) { bank_cell = top_module->addCell(RTLIL::IdString(bank_cell_name), ID(BANK)); } + bank_cell->setParam(ID(FASM_EXTRA), RTLIL::Const("INTERNAL_VREF")); bank_cell->setParam(ID(NUMBER), RTLIL::Const(iobank)); bank_cell->setParam(ID(INTERNAL_VREF), RTLIL::Const(internal_vref)); } From 3285598c037027b2af16ce20dfa554cf911e1f56 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 18 Nov 2019 09:20:21 +0100 Subject: [PATCH 011/845] XDC: Read fasm_extra modules from verilog Signed-off-by: Tomasz Michalak --- xdc-plugin/BANK.v | 5 +++++ xdc-plugin/Makefile | 11 +++++++++-- xdc-plugin/xdc.cc | 7 ++----- 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 xdc-plugin/BANK.v diff --git a/xdc-plugin/BANK.v b/xdc-plugin/BANK.v new file mode 100644 index 000000000..6a6f27d99 --- /dev/null +++ b/xdc-plugin/BANK.v @@ -0,0 +1,5 @@ +module BANK(); + parameter FASM_EXTRA = "INTERNAL_VREF"; + parameter NUMBER = 0; + parameter INTERNAL_VREF = 600; +endmodule diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index 3ef6d55c5..bcb028c3b 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -5,15 +5,22 @@ LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins OBJS = xdc.o +VERILOG_MODULES = BANK.v xdc.so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) -.PHONY: install -install: xdc.so +install_plugin: xdc.so mkdir -p $(PLUGINS_DIR) cp $< $(PLUGINS_DIR)/$< +install_modules: $(VERILOG_MODULES) + mkdir -p $(PLUGINS_DIR)/fasm_extra_modules/ + cp $< $(PLUGINS_DIR)/fasm_extra_modules/$< + +.PHONY: install +install: install_modules install_plugin + clean: rm -f *.d *.o xdc.so diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index f276f999a..f96f21212 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -188,11 +188,8 @@ struct SetProperty : public Pass { // Create a new BANK module if it hasn't been created so far RTLIL::Module* top_module = design->top_module(); if (!design->has(ID(BANK))) { - RTLIL::Module* bank_module = design->addModule(ID(BANK)); - bank_module->makeblackbox(); - bank_module->avail_parameters.insert(ID(FASM_EXTRA)); - bank_module->avail_parameters.insert(ID(NUMBER)); - bank_module->avail_parameters.insert(ID(INTERNAL_VREF)); + std::string fasm_extra_modules_dir(proc_share_dirname() + "/plugins/fasm_extra_modules"); + Pass::call(design, "read_verilog " + fasm_extra_modules_dir + "/BANK.v"); } // Set parameters on a new bank instance or update an existing one From 58573f554be1c05e7b6cbc8d5284ded7edc10f80 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 21 Nov 2019 13:04:14 +0100 Subject: [PATCH 012/845] XDC: Add cassert header Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index f96f21212..0421afc18 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -26,7 +26,7 @@ * Tcl interpreter and processed by the new XDC commands imported to the * Tcl interpreter. */ - +#include #include "kernel/register.h" #include "kernel/rtlil.h" #include "kernel/log.h" From 00ceb420201125ea2714c468354e778be711623c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 25 Nov 2019 08:16:58 +0100 Subject: [PATCH 013/845] Use json namespace explicitly Signed-off-by: Tomasz Michalak --- bank_tiles.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bank_tiles.h b/bank_tiles.h index 4301f967a..99f283263 100644 --- a/bank_tiles.h +++ b/bank_tiles.h @@ -25,7 +25,6 @@ USING_YOSYS_NAMESPACE // Coordinates of HCLK_IOI tiles associated with a specified bank using BankTilesMap = std::unordered_map; BankTilesMap bank_tiles; -using json11::Json; // Find the part's JSON file with information including the IO Banks // and extract the bank tiles. @@ -38,7 +37,7 @@ BankTilesMap get_bank_tiles(const std::string json_file_name) { std::string json_str((std::istreambuf_iterator(json_file)), std::istreambuf_iterator()); std::string error; - Json json = Json::parse(json_str, error); + auto json = json11::Json::parse(json_str, error); if (!error.empty()) { log_cmd_error("%s\n", error.c_str()); } From 2870821ffaf9bcd74fc8d3edb20d7e0e0b3e66e2 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 25 Nov 2019 08:34:16 +0100 Subject: [PATCH 014/845] Make map const and use enum class Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 0421afc18..7fceaa52f 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -37,10 +37,11 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -enum SetPropertyOptions { INTERNAL_VREF }; -std::unordered_map set_property_options_map = { - {"INTERNAL_VREF", INTERNAL_VREF} +enum class SetPropertyOptions { INTERNAL_VREF }; + +const std::unordered_map set_property_options_map = { + {"INTERNAL_VREF", SetPropertyOptions::INTERNAL_VREF} }; void register_in_tcl_interpreter(const std::string& command) { @@ -158,8 +159,8 @@ struct SetProperty : public Pass { return; } - switch (set_property_options_map[option]) { - case INTERNAL_VREF: + switch (set_property_options_map.at(option)) { + case SetPropertyOptions::INTERNAL_VREF: process_vref(std::vector(args.begin() + 2, args.end()), design); break; default: From 1e24a44eb83d859655e46fbf3b8dae0de941f903 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 25 Nov 2019 09:59:38 +0100 Subject: [PATCH 015/845] Don't use bank_tiles global variable Signed-off-by: Tomasz Michalak --- bank_tiles.h | 2 +- fasm-plugin/fasm.cc | 2 +- xdc-plugin/xdc.cc | 103 +++++++++++++++++++++++++++----------------- 3 files changed, 66 insertions(+), 41 deletions(-) diff --git a/bank_tiles.h b/bank_tiles.h index 99f283263..79764ed6c 100644 --- a/bank_tiles.h +++ b/bank_tiles.h @@ -24,7 +24,6 @@ USING_YOSYS_NAMESPACE // Coordinates of HCLK_IOI tiles associated with a specified bank using BankTilesMap = std::unordered_map; -BankTilesMap bank_tiles; // Find the part's JSON file with information including the IO Banks // and extract the bank tiles. @@ -53,3 +52,4 @@ BankTilesMap get_bank_tiles(const std::string json_file_name) { return bank_tiles; } + diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index 5148d0454..7999c224d 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -61,7 +61,7 @@ struct WriteFasm : public Backend { if (top_module == nullptr) { log_cmd_error("%s: No top module detected.\n", pass_name.c_str()); } - bank_tiles = get_bank_tiles(part_json); + auto bank_tiles = get_bank_tiles(part_json); // Generate a fasm feature associated with the INTERNAL_VREF value per bank // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 7fceaa52f..5a45717a1 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -37,7 +37,6 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN - enum class SetPropertyOptions { INTERNAL_VREF }; const std::unordered_map set_property_options_map = { @@ -50,37 +49,6 @@ void register_in_tcl_interpreter(const std::string& command) { Tcl_Eval(interp, tcl_script.c_str()); } -struct ReadXdc : public Frontend { - ReadXdc() : Frontend("xdc", "Read XDC file") {} - - void help() YS_OVERRIDE { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" read_xdc -part_json \n"); - log("\n"); - log("Read XDC file.\n"); - log("\n"); - } - - void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design*) YS_OVERRIDE { - if (args.size() < 2) { - log_cmd_error("Missing script file.\n"); - } - Tcl_Interp *interp = yosys_get_tcl_interp(); - size_t argidx = 1; - if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { - bank_tiles = get_bank_tiles(args[++argidx]); - argidx++; - } - extra_args(f, filename, args, argidx); - std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; - log("%s\n", content.c_str()); - if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { - log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); - } - } -} ReadXdc; - struct GetPorts : public Pass { GetPorts() : Pass("get_ports", "Print matching ports") { register_in_tcl_interpreter(pass_name); @@ -97,6 +65,7 @@ struct GetPorts : public Pass { log("Print the output to stdout too. This is useful when all Yosys is executed\n"); log("\n"); } + void execute(std::vector args, RTLIL::Design*) YS_OVERRIDE { std::string text; @@ -108,10 +77,12 @@ struct GetPorts : public Pass { } log("%s\n", text.c_str()); } -} GetPorts; +}; struct GetIOBanks : public Pass { - GetIOBanks() : Pass("get_iobanks", "Set IO Bank number") { + GetIOBanks(std::function get_bank_tiles) + : Pass("get_iobanks", "Set IO Bank number") + , get_bank_tiles(get_bank_tiles) { register_in_tcl_interpreter(pass_name); } @@ -128,14 +99,23 @@ struct GetIOBanks : public Pass { if (args.size() < 2) { log_cmd_error("%s: Missing bank number.\n", pass_name.c_str()); } + auto bank_tiles = get_bank_tiles(); + if (bank_tiles.count(std::atoi(args[1].c_str())) == 0) { + log_cmd_error("%s:Bank number %s is not present in the target device.\n", args[1].c_str(), pass_name.c_str()); + } + Tcl_Interp *interp = yosys_get_tcl_interp(); Tcl_SetResult(interp, const_cast(args[1].c_str()), NULL); log("%s\n", args[1].c_str()); } -} GetIOBanks; + + std::function get_bank_tiles; +}; struct SetProperty : public Pass { - SetProperty() : Pass("set_property", "Set a given property") { + SetProperty(std::function get_bank_tiles) + : Pass("set_property", "Set a given property") + , get_bank_tiles(get_bank_tiles) { register_in_tcl_interpreter(pass_name); } @@ -173,6 +153,7 @@ struct SetProperty : public Pass { log_error("set_property INTERNAL_VREF: Incorrect number of arguments.\n"); } int iobank = std::atoi(args[1].c_str()); + auto bank_tiles = get_bank_tiles(); if (bank_tiles.count(iobank) == 0) { log_cmd_error("set_property INTERNAL_VREF: Invalid IO bank.\n"); } @@ -205,10 +186,54 @@ struct SetProperty : public Pass { bank_cell->setParam(ID(INTERNAL_VREF), RTLIL::Const(internal_vref)); } -} SetProperty; + std::function get_bank_tiles; +}; + +struct ReadXdc : public Frontend { + ReadXdc() + : Frontend("xdc", "Read XDC file") + , GetIOBanks(std::bind(&ReadXdc::get_bank_tiles, this)) + , SetProperty(std::bind(&ReadXdc::get_bank_tiles, this)) {} + + void help() YS_OVERRIDE { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_xdc -part_json \n"); + log("\n"); + log("Read XDC file.\n"); + log("\n"); + } + + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design*) YS_OVERRIDE { + if (args.size() < 2) { + log_cmd_error("Missing script file.\n"); + } + Tcl_Interp *interp = yosys_get_tcl_interp(); + size_t argidx = 1; + if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { + bank_tiles = ::get_bank_tiles(args[++argidx]); + argidx++; + } + extra_args(f, filename, args, argidx); + std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; + log("%s\n", content.c_str()); + if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { + log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); + } + } + const BankTilesMap& get_bank_tiles() { + return bank_tiles; + } + + BankTilesMap bank_tiles; + GetPorts GetPorts; + GetIOBanks GetIOBanks; + SetProperty SetProperty; +} ReadXdc; struct GetBankTiles : public Pass { - GetBankTiles() : Pass("get_bank_tiles", "Inspect IO Bank tiles") { + GetBankTiles() + : Pass("get_bank_tiles", "Inspect IO Bank tiles") { register_in_tcl_interpreter(pass_name); } @@ -227,7 +252,7 @@ struct GetBankTiles : public Pass { log_cmd_error("Missing JSON file.\n"); } // Check if the part has the specified bank - bank_tiles = get_bank_tiles(args[1]); + auto bank_tiles = get_bank_tiles(args[1]); if (bank_tiles.size()) { log("Available bank tiles:\n"); for (auto bank : bank_tiles) { From 56a2e65040e901a46b3ceb2a990cc045ee986ac9 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 25 Nov 2019 19:36:45 +0100 Subject: [PATCH 016/845] XDC: Clear bank_tiles if json_part not provided Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 5a45717a1..f3040d644 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -210,6 +210,7 @@ struct ReadXdc : public Frontend { } Tcl_Interp *interp = yosys_get_tcl_interp(); size_t argidx = 1; + bank_tiles.clear(); if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { bank_tiles = ::get_bank_tiles(args[++argidx]); argidx++; From 15d8bc557d849edbcd1992f3436d33f444ca160b Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 27 Nov 2019 15:02:24 +0100 Subject: [PATCH 017/845] XDC: Add struct keywords Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index f3040d644..861840363 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -227,9 +227,9 @@ struct ReadXdc : public Frontend { } BankTilesMap bank_tiles; - GetPorts GetPorts; - GetIOBanks GetIOBanks; - SetProperty SetProperty; + struct GetPorts GetPorts; + struct GetIOBanks GetIOBanks; + struct SetProperty SetProperty; } ReadXdc; struct GetBankTiles : public Pass { From a0de4e1fb80e0d2dd8ad28561516f5ea8ec19074 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 16 Dec 2019 10:47:13 +0100 Subject: [PATCH 018/845] XDC: Implement get_ports command Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 49 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 861840363..810afa09a 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -37,10 +37,18 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -enum class SetPropertyOptions { INTERNAL_VREF }; +bool isInputPort(RTLIL::Wire* wire) { + return wire->port_input; +} +bool isOutputPort(RTLIL::Wire* wire) { + return wire->port_output; +} + +enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD }; const std::unordered_map set_property_options_map = { - {"INTERNAL_VREF", SetPropertyOptions::INTERNAL_VREF} + {"INTERNAL_VREF", SetPropertyOptions::INTERNAL_VREF}, + {"IOSTANDARD", SetPropertyOptions::IOSTANDARD} }; void register_in_tcl_interpreter(const std::string& command) { @@ -66,17 +74,28 @@ struct GetPorts : public Pass { log("\n"); } - void execute(std::vector args, RTLIL::Design*) YS_OVERRIDE + void execute(std::vector args, RTLIL::Design* design) YS_OVERRIDE { - std::string text; - for (auto& arg : args) { - text += arg + ' '; + if (args.size() < 2) { + log_cmd_error("No port specified.\n"); } - if (!text.empty()) { - text.resize(text.size()-1); + RTLIL::Module* top_module = design->top_module(); + if (top_module == nullptr) { + log_cmd_error("No top module detected\n"); } - log("%s\n", text.c_str()); + // TODO handle more than one port + port_name = args.at(1); + RTLIL::IdString port_id(RTLIL::escape_id(port_name)); + if (auto wire = top_module->wire(port_id)) { + if (isInputPort(wire) || isOutputPort(wire)) { + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_SetResult(interp, const_cast(port_name.c_str()), NULL); + return; + } + } + log_warning("Couldn't find port %s\n", port_name.c_str()); } + std::string port_name; }; struct GetIOBanks : public Pass { @@ -143,6 +162,9 @@ struct SetProperty : public Pass { case SetPropertyOptions::INTERNAL_VREF: process_vref(std::vector(args.begin() + 2, args.end()), design); break; + case SetPropertyOptions::IOSTANDARD: + process_iostandard(std::vector(args.begin() + 2, args.end()), design); + break; default: assert(false); } @@ -186,6 +208,15 @@ struct SetProperty : public Pass { bank_cell->setParam(ID(INTERNAL_VREF), RTLIL::Const(internal_vref)); } + void process_iostandard(std::vector args, RTLIL::Design* design) { + if (args.size() < 2) { + log_error("set_property IOSTANDARD: Incorrect number of arguments.\n"); + } + std::string port(args.at(1)); + std::string value(args.at(0)); + log("Setting IOSTANDARD %s on port %s\n", value.c_str(), port.c_str()); + } + std::function get_bank_tiles; }; From 97c33f0ab437d965693463ed239e362aa709bd9f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 16 Dec 2019 13:16:45 +0100 Subject: [PATCH 019/845] XDC: Set IOSTANDARD, SLEW and IN_TERM parameters on cells Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 810afa09a..2f5c7a46f 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -37,18 +37,20 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -bool isInputPort(RTLIL::Wire* wire) { +static bool isInputPort(RTLIL::Wire* wire) { return wire->port_input; } -bool isOutputPort(RTLIL::Wire* wire) { +static bool isOutputPort(RTLIL::Wire* wire) { return wire->port_output; } -enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD }; +enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD, SLEW, IN_TERM }; const std::unordered_map set_property_options_map = { {"INTERNAL_VREF", SetPropertyOptions::INTERNAL_VREF}, - {"IOSTANDARD", SetPropertyOptions::IOSTANDARD} + {"IOSTANDARD", SetPropertyOptions::IOSTANDARD}, + {"SLEW", SetPropertyOptions::SLEW}, + {"IN_TERM", SetPropertyOptions::IN_TERM} }; void register_in_tcl_interpreter(const std::string& command) { @@ -163,7 +165,9 @@ struct SetProperty : public Pass { process_vref(std::vector(args.begin() + 2, args.end()), design); break; case SetPropertyOptions::IOSTANDARD: - process_iostandard(std::vector(args.begin() + 2, args.end()), design); + case SetPropertyOptions::SLEW: + case SetPropertyOptions::IN_TERM: + process_port_parameter(std::vector(args.begin() + 1, args.end()), design); break; default: assert(false); @@ -208,13 +212,34 @@ struct SetProperty : public Pass { bank_cell->setParam(ID(INTERNAL_VREF), RTLIL::Const(internal_vref)); } - void process_iostandard(std::vector args, RTLIL::Design* design) { - if (args.size() < 2) { - log_error("set_property IOSTANDARD: Incorrect number of arguments.\n"); + void process_port_parameter(std::vector args, RTLIL::Design* design) { + if (args.size() < 1) { + log_error("set_property: Incorrect number of arguments.\n"); + } + std::string parameter(args.at(0)); + if (args.size() < 3) { + log_error("set_property %s: Incorrect number of arguments.\n", parameter.c_str()); + } + std::string port(args.at(2)); + std::string value(args.at(1)); + RTLIL::Module* top_module = design->top_module(); + RTLIL::IdString port_id(RTLIL::escape_id(port)); + for (auto cell_obj : top_module->cells_) { + RTLIL::Cell* cell = cell_obj.second; + RTLIL::IdString cell_id = cell_obj.first; + for (auto connection : cell->connections_) { + if (connection.second.is_wire()) { + RTLIL::Wire* cell_wire = connection.second.as_wire(); + if (cell_wire == nullptr) { + continue; + } + if (cell_wire->name == port_id) { + cell->setParam(RTLIL::IdString(RTLIL::escape_id(parameter)), RTLIL::Const(value)); + log("Setting parameter %s to value %s on cell %s \n", parameter.c_str(), value.c_str(), cell_id.c_str()); + } + } + } } - std::string port(args.at(1)); - std::string value(args.at(0)); - log("Setting IOSTANDARD %s on port %s\n", value.c_str(), port.c_str()); } std::function get_bank_tiles; From 057cd4845e59494ae4643dee22192543006f941c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 18 Dec 2019 16:01:32 +0100 Subject: [PATCH 020/845] XDC: Add support for bus ports Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 2f5c7a46f..6c1d36226 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -87,11 +87,19 @@ struct GetPorts : public Pass { } // TODO handle more than one port port_name = args.at(1); - RTLIL::IdString port_id(RTLIL::escape_id(port_name)); + char port[128]; + int bit(0); + std::string port_signal(port_name); + if (sscanf(port_name.c_str(), "%[^[][%d]", port, &bit) == 2) { + port_signal = std::string(port); + } + + RTLIL::IdString port_id(RTLIL::escape_id(port_signal.c_str())); if (auto wire = top_module->wire(port_id)) { if (isInputPort(wire) || isOutputPort(wire)) { Tcl_Interp *interp = yosys_get_tcl_interp(); Tcl_SetResult(interp, const_cast(port_name.c_str()), NULL); + log("Found port %s\n", port_name.c_str()); return; } } @@ -220,23 +228,23 @@ struct SetProperty : public Pass { if (args.size() < 3) { log_error("set_property %s: Incorrect number of arguments.\n", parameter.c_str()); } - std::string port(args.at(2)); + std::string port_name(args.at(2)); std::string value(args.at(1)); + char port[128]; + char bit[64]; + if (sscanf(port_name.c_str(), "%[^[]%s", port, bit) == 2) { + port_name = std::string(port) + " " + std::string(bit); + } RTLIL::Module* top_module = design->top_module(); - RTLIL::IdString port_id(RTLIL::escape_id(port)); + RTLIL::IdString port_id(RTLIL::escape_id(port_name.c_str())); for (auto cell_obj : top_module->cells_) { RTLIL::Cell* cell = cell_obj.second; RTLIL::IdString cell_id = cell_obj.first; for (auto connection : cell->connections_) { - if (connection.second.is_wire()) { - RTLIL::Wire* cell_wire = connection.second.as_wire(); - if (cell_wire == nullptr) { - continue; - } - if (cell_wire->name == port_id) { - cell->setParam(RTLIL::IdString(RTLIL::escape_id(parameter)), RTLIL::Const(value)); - log("Setting parameter %s to value %s on cell %s \n", parameter.c_str(), value.c_str(), cell_id.c_str()); - } + RTLIL::SigSpec cell_signals = connection.second; + if (!strcmp(log_signal(cell_signals),port_id.c_str())) { + cell->setParam(RTLIL::IdString(RTLIL::escape_id(parameter)), RTLIL::Const(value)); + log("Setting parameter %s to value %s on cell %s \n", parameter.c_str(), value.c_str(), cell_id.c_str()); } } } From 72bd57ab1f70bb7d578ed24b9df9dcd9a92704c4 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 18 Dec 2019 16:15:04 +0100 Subject: [PATCH 021/845] XDC: Set DRIVE parameters on cells Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 6c1d36226..417f8e73b 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -44,12 +44,13 @@ static bool isOutputPort(RTLIL::Wire* wire) { return wire->port_output; } -enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD, SLEW, IN_TERM }; +enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD, SLEW, DRIVE, IN_TERM }; const std::unordered_map set_property_options_map = { {"INTERNAL_VREF", SetPropertyOptions::INTERNAL_VREF}, {"IOSTANDARD", SetPropertyOptions::IOSTANDARD}, {"SLEW", SetPropertyOptions::SLEW}, + {"DRIVE", SetPropertyOptions::DRIVE}, {"IN_TERM", SetPropertyOptions::IN_TERM} }; @@ -174,6 +175,7 @@ struct SetProperty : public Pass { break; case SetPropertyOptions::IOSTANDARD: case SetPropertyOptions::SLEW: + case SetPropertyOptions::DRIVE: case SetPropertyOptions::IN_TERM: process_port_parameter(std::vector(args.begin() + 1, args.end()), design); break; From 6ea6ea09fb6699a0d0d5be4709226da2f5f3cba7 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 19 Dec 2019 10:51:50 +0100 Subject: [PATCH 022/845] XDC: Fix check for bus ports in get_ports Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 417f8e73b..33ea8b7bd 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -97,14 +97,16 @@ struct GetPorts : public Pass { RTLIL::IdString port_id(RTLIL::escape_id(port_signal.c_str())); if (auto wire = top_module->wire(port_id)) { - if (isInputPort(wire) || isOutputPort(wire)) { - Tcl_Interp *interp = yosys_get_tcl_interp(); - Tcl_SetResult(interp, const_cast(port_name.c_str()), NULL); - log("Found port %s\n", port_name.c_str()); - return; + if (bit >= wire->start_offset && bit < wire->start_offset + wire->width) { + if (isInputPort(wire) || isOutputPort(wire)) { + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_SetResult(interp, const_cast(port_name.c_str()), NULL); + log("Found port %s\n", port_name.c_str()); + return; + } } } - log_warning("Couldn't find port %s\n", port_name.c_str()); + log_error("Couldn't find port %s\n", port_name.c_str()); } std::string port_name; }; @@ -227,7 +229,7 @@ struct SetProperty : public Pass { log_error("set_property: Incorrect number of arguments.\n"); } std::string parameter(args.at(0)); - if (args.size() < 3) { + if (args.size() < 3 || args.at(2).size() == 0) { log_error("set_property %s: Incorrect number of arguments.\n", parameter.c_str()); } std::string port_name(args.at(2)); From 63c0e5728853483e412c4dd0c8268a9022ec14bf Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 20 Dec 2019 11:26:18 +0100 Subject: [PATCH 023/845] XDC: Add check for allowed primitive attributes Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 33ea8b7bd..300c61dab 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -54,6 +54,14 @@ const std::unordered_map set_property_options_m {"IN_TERM", SetPropertyOptions::IN_TERM} }; +const std::unordered_map> supported_primitive_parameters = { + {"OBUF", {"IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, + {"OBUFDS", {"IOSTANDARD", "SLEW", "IN_TERM"}}, + {"OBUFTDS", {"IOSTANDARD", "SLEW", "IN_TERM"}}, + {"IBUF", {"IOSTANDARD"}}, + {"IOBUF", {"IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}} +}; + void register_in_tcl_interpreter(const std::string& command) { Tcl_Interp* interp = yosys_get_tcl_interp(); std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); @@ -95,7 +103,7 @@ struct GetPorts : public Pass { port_signal = std::string(port); } - RTLIL::IdString port_id(RTLIL::escape_id(port_signal.c_str())); + RTLIL::IdString port_id(RTLIL::escape_id(port_signal)); if (auto wire = top_module->wire(port_id)) { if (bit >= wire->start_offset && bit < wire->start_offset + wire->width) { if (isInputPort(wire) || isOutputPort(wire)) { @@ -240,15 +248,30 @@ struct SetProperty : public Pass { port_name = std::string(port) + " " + std::string(bit); } RTLIL::Module* top_module = design->top_module(); - RTLIL::IdString port_id(RTLIL::escape_id(port_name.c_str())); + RTLIL::IdString port_id(RTLIL::escape_id(port_name)); + RTLIL::IdString parameter_id(RTLIL::escape_id(parameter)); for (auto cell_obj : top_module->cells_) { - RTLIL::Cell* cell = cell_obj.second; RTLIL::IdString cell_id = cell_obj.first; + RTLIL::Cell* cell = cell_obj.second; + + // Check if the cell is of the type we are looking for + auto primitive_parameters_iter = supported_primitive_parameters.find(RTLIL::unescape_id(cell->type.str())); + if (primitive_parameters_iter == supported_primitive_parameters.end()) { + continue; + } + + // Check if the attribute is allowed for this module + auto primitive_parameters = primitive_parameters_iter->second; + if (std::find(primitive_parameters.begin(), primitive_parameters.end(), parameter) == primitive_parameters.end()) { + log_error("Cell %s of type %s doesn't support the %s attribute\n", cell->name.c_str(), cell->type.c_str(), parameter_id.c_str()); + } + + // Set the parameter on the cell connected to the selected port for (auto connection : cell->connections_) { RTLIL::SigSpec cell_signals = connection.second; - if (!strcmp(log_signal(cell_signals),port_id.c_str())) { - cell->setParam(RTLIL::IdString(RTLIL::escape_id(parameter)), RTLIL::Const(value)); - log("Setting parameter %s to value %s on cell %s \n", parameter.c_str(), value.c_str(), cell_id.c_str()); + if (!strcmp(log_signal(cell_signals), port_id.c_str())) { + cell->setParam(parameter_id, RTLIL::Const(value)); + log("Setting parameter %s to value %s on cell %s \n", parameter_id.c_str(), value.c_str(), cell_obj.first.c_str()); } } } From a287fc5bf030f27aa910aafea3b6a7baec25dc40 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 14 Jan 2020 08:38:55 +0100 Subject: [PATCH 024/845] Add plugins Makefile Signed-off-by: Tomasz Michalak --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..06741b457 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +PLUGIN_LIST := fasm xdc +PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) +PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) +PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) +PLUGINS_TEST := $(foreach plugin,$(PLUGIN_LIST),test_$(plugin)) + +all: install + +define install_plugin = +$(1).so: + $$(MAKE) -C $(1)-plugin $$@ + +install_$(1): + $$(MAKE) -C $(1)-plugin install + +clean_$(1): + $$(MAKE) -C $(1)-plugin clean + +test_$(1): + $$(MAKE) -C $(1)-plugin test +endef + +$(foreach plugin,$(PLUGIN_LIST),$(eval $(call install_plugin,$(plugin)))) + +plugins: $(PLUGINS) + +install: $(PLUGINS_INSTALL) + +test: $(PLUGINS_TEST) + +clean: $(PLUGINS_CLEAN) From 24af7323646c97daafbd5040f6597f3042de05ba Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 14 Jan 2020 09:24:44 +0100 Subject: [PATCH 025/845] XDC: Add test target Signed-off-by: Tomasz Michalak --- xdc-plugin/Makefile | 3 +++ xdc-plugin/tests/Makefile | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 xdc-plugin/tests/Makefile diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index bcb028c3b..e7525047f 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -18,6 +18,9 @@ install_modules: $(VERILOG_MODULES) mkdir -p $(PLUGINS_DIR)/fasm_extra_modules/ cp $< $(PLUGINS_DIR)/fasm_extra_modules/$< +test: install_plugin install_modules + $(MAKE) -C tests all + .PHONY: install install: install_modules install_plugin diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile new file mode 100644 index 000000000..f5ddc6299 --- /dev/null +++ b/xdc-plugin/tests/Makefile @@ -0,0 +1,6 @@ +TESTS = dummy + +all: $(TESTS) + +dummy: + @echo $@ PASS From 451d4574c4d930b011527b8344e7cca9f99655a3 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 14 Jan 2020 09:28:52 +0100 Subject: [PATCH 026/845] FASM: Add test target Signed-off-by: Tomasz Michalak --- fasm-plugin/Makefile | 3 +++ fasm-plugin/tests/Makefile | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 fasm-plugin/tests/Makefile diff --git a/fasm-plugin/Makefile b/fasm-plugin/Makefile index ddcdd1a10..8c1a1582b 100644 --- a/fasm-plugin/Makefile +++ b/fasm-plugin/Makefile @@ -14,6 +14,9 @@ install: fasm.so mkdir -p $(PLUGINS_DIR) cp $< $(PLUGINS_DIR)/$< +test: install + $(MAKE) -C tests all + clean: rm -f *.d *.o fasm.so diff --git a/fasm-plugin/tests/Makefile b/fasm-plugin/tests/Makefile new file mode 100644 index 000000000..f5ddc6299 --- /dev/null +++ b/fasm-plugin/tests/Makefile @@ -0,0 +1,6 @@ +TESTS = dummy + +all: $(TESTS) + +dummy: + @echo $@ PASS From a142f7a4d15ddf10b4016b914d8af68357a5e68e Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 14 Jan 2020 09:34:28 +0100 Subject: [PATCH 027/845] Add Travis scripts Signed-off-by: Tomasz Michalak --- .travis.yml | 49 +++++++++++++++++++++++++++++++ .travis/build-and-test.sh | 61 +++++++++++++++++++++++++++++++++++++++ .travis/common.sh | 15 ++++++++++ .travis/setup.sh | 47 ++++++++++++++++++++++++++++++ 4 files changed, 172 insertions(+) create mode 100644 .travis.yml create mode 100755 .travis/build-and-test.sh create mode 100644 .travis/common.sh create mode 100755 .travis/setup.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..58b379e53 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,49 @@ +sudo: false +language: cpp + +#cache: +# ccache: false +# directories: +# - ~/.local-bin + + +env: + global: + - MAKEFLAGS="-j 2" + +include: + # Latest gcc supported on Travis Linux + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-9 + - gperf + - build-essential + - bison + - flex + - libreadline-dev + - gawk + - tcl-dev + - libffi-dev + - git + - graphviz + - xdot + - pkg-config + - python + - python3 + - libboost-system-dev + - libboost-python-dev + - libboost-filesystem-dev + - zlib1g-dev + env: + - MATRIX_EVAL="CONFIG=gcc && CC=gcc-9 && CXX=g++-9" + +before_install: + - ./.travis/setup.sh + +script: + - ./.travis/build-and-test.sh + diff --git a/.travis/build-and-test.sh b/.travis/build-and-test.sh new file mode 100755 index 000000000..928f1a391 --- /dev/null +++ b/.travis/build-and-test.sh @@ -0,0 +1,61 @@ +#! /bin/bash + +set -e + +source .travis/common.sh + +########################################################################## + +echo +echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r' +echo + +if [ "$CONFIG" = "gcc" ]; then + echo "Configuring for gcc." + make config-gcc +elif [ "$CONFIG" = "clang" ]; then + echo "Configuring for clang." + make config-clang +fi + +echo +echo -en 'travis_fold:end:script.configure\\r' +echo + +########################################################################## + +echo +echo 'Building plugins..' && echo -en 'travis_fold:start:script.build\\r' +echo + +make plugins + +echo +echo -en 'travis_fold:end:script.build\\r' +echo + +########################################################################## + +echo +echo 'Installing plugins...' && echo -en 'travis_fold:start:script.build\\r' +echo + +make install + +echo +echo -en 'travis_fold:end:script.build\\r' +echo + +########################################################################## + +echo +echo 'Testing...' && echo -en 'travis_fold:start:script.test\\r' +echo + +make test + +echo +echo -en 'travis_fold:end:script.test\\r' +echo + +########################################################################## diff --git a/.travis/common.sh b/.travis/common.sh new file mode 100644 index 000000000..8eecc4c09 --- /dev/null +++ b/.travis/common.sh @@ -0,0 +1,15 @@ +#! /bin/bash + +# Setup the CC / CXX from the matrix config +eval "${MATRIX_EVAL}" + +# Look for location binaries first +export PATH="$HOME/.local-bin/bin:$PATH" + +# OS X specific common setup +if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + export PATH="/usr/local/opt/ccache/libexec:$PATH" +fi + +# Parallel builds! +MAKEFLAGS="-j 2" diff --git a/.travis/setup.sh b/.travis/setup.sh new file mode 100755 index 000000000..3416017e2 --- /dev/null +++ b/.travis/setup.sh @@ -0,0 +1,47 @@ +#! /bin/bash + +set -e + +source .travis/common.sh + +########################################################################## + +# Output status information. +( + set +e + set -x + git status + git branch -v + git log -n 5 --graph + git log --format=oneline -n 20 --graph +) +echo +echo -en 'travis_fold:end:before_install.git\\r' +echo + +########################################################################## + +#Install yosys +( + if [ ! -e ~/.local-bin/bin/yosys ]; then + echo + echo 'Building yosys...' && echo -en 'travis_fold:start:before_install.yosys\\r' + echo + mkdir -p ~/.local-src + mkdir -p ~/.local-bin + cd ~/.local-src + git clone https://github.com/SymbiFlow/yosys.git -b master+wip + cd yosys + PREFIX=$HOME/.local-bin make -j$(nproc) + PREFIX=$HOME/.local-bin make install + echo $(which yosys) + echo $(which yosys-config) + echo $(yosys-config --datdir) + echo + echo -en 'travis_fold:end:before_install.yosys\\r' + echo + fi +) + +########################################################################## + From 24c67b080c5c4a2d618e78c5bb81571943931ac8 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 7 Jan 2020 15:09:58 +0100 Subject: [PATCH 028/845] XDC: Add wires traversing Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 100 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 86 insertions(+), 14 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 300c61dab..c18c6ca3f 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -98,15 +98,15 @@ struct GetPorts : public Pass { port_name = args.at(1); char port[128]; int bit(0); - std::string port_signal(port_name); - if (sscanf(port_name.c_str(), "%[^[][%d]", port, &bit) == 2) { - port_signal = std::string(port); + if (!sscanf(port_name.c_str(), "%[^[][%d]", port, &bit)) { + log_error("Couldn't find port %s\n", port_name.c_str()); } + std::string port_signal(port); RTLIL::IdString port_id(RTLIL::escape_id(port_signal)); if (auto wire = top_module->wire(port_id)) { - if (bit >= wire->start_offset && bit < wire->start_offset + wire->width) { - if (isInputPort(wire) || isOutputPort(wire)) { + if (isInputPort(wire) || isOutputPort(wire)) { + if (bit >= wire->start_offset && bit < wire->start_offset + wire->width) { Tcl_Interp *interp = yosys_get_tcl_interp(); Tcl_SetResult(interp, const_cast(port_name.c_str()), NULL); log("Found port %s\n", port_name.c_str()); @@ -236,21 +236,37 @@ struct SetProperty : public Pass { if (args.size() < 1) { log_error("set_property: Incorrect number of arguments.\n"); } + std::string parameter(args.at(0)); if (args.size() < 3 || args.at(2).size() == 0) { log_error("set_property %s: Incorrect number of arguments.\n", parameter.c_str()); } + std::string port_name(args.at(2)); std::string value(args.at(1)); - char port[128]; - char bit[64]; - if (sscanf(port_name.c_str(), "%[^[]%s", port, bit) == 2) { - port_name = std::string(port) + " " + std::string(bit); + + auto port_signal = extract_signal(port_name); + std::string port(port_signal.first); + int port_bit = port_signal.second; + + RTLIL::Wire* wire = design->top_module()->wire(RTLIL::escape_id(port)); + if (wire == nullptr) { + log_error("Couldn't find port %s\n", port_name.c_str()); } - RTLIL::Module* top_module = design->top_module(); - RTLIL::IdString port_id(RTLIL::escape_id(port_name)); + + if (!isInputPort(wire) && !isOutputPort(wire)) { + log_error("Port %s is not a top port\n", port_name.c_str()); + } + + if (port_bit < wire->start_offset || port_bit >= wire->start_offset + wire->width) { + log_error("Incorrect top port index %d in port %s\n", port_bit, port_name.c_str()); + } + + // Traverse the port wire + traverse_wire(port_name, design->top_module()); + RTLIL::IdString parameter_id(RTLIL::escape_id(parameter)); - for (auto cell_obj : top_module->cells_) { + for (auto cell_obj : design->top_module()->cells_) { RTLIL::IdString cell_id = cell_obj.first; RTLIL::Cell* cell = cell_obj.second; @@ -268,13 +284,69 @@ struct SetProperty : public Pass { // Set the parameter on the cell connected to the selected port for (auto connection : cell->connections_) { - RTLIL::SigSpec cell_signals = connection.second; - if (!strcmp(log_signal(cell_signals), port_id.c_str())) { + RTLIL::SigSpec cell_signal = connection.second; + if (is_signal_port(cell_signal, port_name)) { cell->setParam(parameter_id, RTLIL::Const(value)); log("Setting parameter %s to value %s on cell %s \n", parameter_id.c_str(), value.c_str(), cell_obj.first.c_str()); } } } + log("\n"); + } + + // Search module's connections for the specified destination port + // and traverse from the specified destination wire to the source wire + void traverse_wire(std::string& port_name, RTLIL::Module* module) { + auto port_signal = extract_signal(port_name); + std::string signal_name(port_signal.first); + int port_bit = port_signal.second; + for (auto connection : module->connections_) { + auto dst_sig = connection.first; + auto src_sig = connection.second; + if (dst_sig.is_chunk()) { + auto chunk = dst_sig.as_chunk(); + if (chunk.wire) { + if (chunk.wire->name != RTLIL::IdString(RTLIL::escape_id(signal_name))) { + continue; + } + if (port_bit < chunk.offset || port_bit > chunk.width) { + continue; + } + auto src_wires = src_sig.to_sigbit_vector(); + auto src_wire_sigbit = src_wires.at(port_bit - chunk.offset); + if (src_wire_sigbit.wire) { + port_name = src_wires.at(port_bit - chunk.offset).wire->name.str(); + if (src_wire_sigbit.offset > 0) { + port_name += "[" + std::to_string(src_wire_sigbit.offset) + "]"; + } + return; + } + } + } + } + } + + // Extract signal name and port bit information from port name + std::pair extract_signal(const std::string& port_name) { + char port[128]; + int port_bit(0); + sscanf(port_name.c_str(), "%[^[][%d]", port, &port_bit); + return std::make_pair(std::string(port), port_bit); + } + + // Check if the specified port name is part of the provided connection signal + bool is_signal_port(RTLIL::SigSpec signal, const std::string& port_name) { + auto port_signal = extract_signal(port_name); + std::string port(port_signal.first); + int port_bit = port_signal.second; + if (signal.is_chunk()) { + auto chunk = signal.as_chunk(); + if (chunk.wire) { + return (chunk.wire->name == RTLIL::IdString(RTLIL::escape_id(port))) && + (port_bit == chunk.offset); + } + } + return false; } std::function get_bank_tiles; From 8b504f8a0b78b4aa33857b423087f307171ac0fe Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 14 Jan 2020 09:24:22 +0100 Subject: [PATCH 029/845] XDC: Add counter attribute annotation test Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/Makefile | 34 +- xdc-plugin/tests/counter.v | 67 + xdc-plugin/tests/counter.xdc | 22 + xdc-plugin/tests/counter_golden.json | 44434 ++++++++++++++++++++++++ xdc-plugin/tests/synth.tcl | 12 + xdc-plugin/tests/xc7a35tcsg324-1.json | 459 + 6 files changed, 45025 insertions(+), 3 deletions(-) create mode 100644 xdc-plugin/tests/counter.v create mode 100644 xdc-plugin/tests/counter.xdc create mode 100644 xdc-plugin/tests/counter_golden.json create mode 100644 xdc-plugin/tests/synth.tcl create mode 100644 xdc-plugin/tests/xc7a35tcsg324-1.json diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index f5ddc6299..328a5fa8f 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -1,6 +1,34 @@ -TESTS = dummy +TESTS = counter all: $(TESTS) -dummy: - @echo $@ PASS +define test_tpl = +$(1): $(1).json + @python compare_output_json.py --json $$< --golden $(1)_golden.json; \ + RETVAL=$$$$? ; \ + if [ $$$$RETVAL -eq 0 ]; then \ + echo "$(1) PASS"; \ + true; \ + else \ + echo "$(1) FAIL"; \ + false; \ + fi + +$(1).json: $(1).v + PART_JSON=xc7a35tcsg324-1.json \ + OUT_JSON=$(1).json \ + INPUT_XDC_FILE=$(1).xdc \ + yosys -p "tcl synth.tcl" $$< -l yosys.log + +update_$(1): $(1).json + @python compare_output_json.py --json $$< --golden $(1)_golden.json --update + +endef + +$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) + +update: $(foreach test,$(TESTS),update_$(test)) + + +clean: + rm -rf *.log $(foreach test,$(TESTS),$(test).json) diff --git a/xdc-plugin/tests/counter.v b/xdc-plugin/tests/counter.v new file mode 100644 index 000000000..d66dbd08c --- /dev/null +++ b/xdc-plugin/tests/counter.v @@ -0,0 +1,67 @@ +module top ( + input clk, + output [3:0] led, + output out_a, + output [1:0] out_b +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + diff --git a/xdc-plugin/tests/counter.xdc b/xdc-plugin/tests/counter.xdc new file mode 100644 index 000000000..e530797a2 --- /dev/null +++ b/xdc-plugin/tests/counter.xdc @@ -0,0 +1,22 @@ +#set_property LOC R2 [get_ports led] +set_property DRIVE I12 [get_ports {led[0]}] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {led[1]}] +set_property SLEW FAST [get_ports {led[1]}] +set_property IOSTANDARD SSTL135 [get_ports {led[1]}] +set_property SLEW FAST [get_ports {led[2]}] +set_property IOSTANDARD SSTL135 [get_ports {led[2]}] +set_property SLEW FAST [get_ports {led[3]}] +set_property IOSTANDARD SSTL135 [get_ports {led[3]}] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {out_a}] +set_property SLEW FAST [get_ports {out_a}] +set_property IOSTANDARD SSTL135 [get_ports {out_a}] +set_property SLEW FAST [get_ports {out_b[0]}] +set_property IOSTANDARD SSTL135 [get_ports {out_b[0]}] +set_property SLEW FAST [get_ports {out_b[1]}] +set_property IOSTANDARD SSTL135 [get_ports {out_b[1]}] +#set_property INTERNAL_VREF 0.600 [get_iobanks 14] +#set_property INTERNAL_VREF 0.675 [get_iobanks 15] +#set_property INTERNAL_VREF 0.750 [get_iobanks 16] +#set_property INTERNAL_VREF 0.900 [get_iobanks 34] +#set_property INTERNAL_VREF 0.900 [get_iobanks 35] + diff --git a/xdc-plugin/tests/counter_golden.json b/xdc-plugin/tests/counter_golden.json new file mode 100644 index 000000000..fb2f3b23a --- /dev/null +++ b/xdc-plugin/tests/counter_golden.json @@ -0,0 +1,44434 @@ +{ + "creator": "Yosys 0.9+932 (git sha1 81876a37, clang 8.0.0 -fPIC -Os)", + "modules": { + "$__ABC9_DSP48E1": { + "attributes": { + "abc9_box_id": 3002, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + }, + "ports": { + "ACOUT": { + "direction": "output", + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] + }, + "BCOUT": { + "direction": "output", + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ] + }, + "CARRYCASCOUT": { + "direction": "output", + "bits": [ 50 ] + }, + "CARRYOUT": { + "direction": "output", + "bits": [ 51, 52, 53, 54 ] + }, + "MULTSIGNOUT": { + "direction": "output", + "bits": [ 55 ] + }, + "OVERFLOW": { + "direction": "output", + "bits": [ 56 ] + }, + "P": { + "direction": "output", + "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ] + }, + "PATTERNBDETECT": { + "direction": "output", + "bits": [ 105 ] + }, + "PATTERNDETECT": { + "direction": "output", + "bits": [ 106 ] + }, + "PCOUT": { + "direction": "output", + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ] + }, + "UNDERFLOW": { + "direction": "output", + "bits": [ 155 ] + }, + "A": { + "direction": "input", + "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] + }, + "ACIN": { + "direction": "input", + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ] + }, + "ALUMODE": { + "direction": "input", + "bits": [ 216, 217, 218, 219 ] + }, + "B": { + "direction": "input", + "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ] + }, + "BCIN": { + "direction": "input", + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ] + }, + "C": { + "direction": "input", + "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ] + }, + "CARRYCASCIN": { + "direction": "input", + "bits": [ 304 ] + }, + "CARRYIN": { + "direction": "input", + "bits": [ 305 ] + }, + "CARRYINSEL": { + "direction": "input", + "bits": [ 306, 307, 308 ] + }, + "CEA1": { + "direction": "input", + "bits": [ 309 ] + }, + "CEA2": { + "direction": "input", + "bits": [ 310 ] + }, + "CEAD": { + "direction": "input", + "bits": [ 311 ] + }, + "CEALUMODE": { + "direction": "input", + "bits": [ 312 ] + }, + "CEB1": { + "direction": "input", + "bits": [ 313 ] + }, + "CEB2": { + "direction": "input", + "bits": [ 314 ] + }, + "CEC": { + "direction": "input", + "bits": [ 315 ] + }, + "CECARRYIN": { + "direction": "input", + "bits": [ 316 ] + }, + "CECTRL": { + "direction": "input", + "bits": [ 317 ] + }, + "CED": { + "direction": "input", + "bits": [ 318 ] + }, + "CEINMODE": { + "direction": "input", + "bits": [ 319 ] + }, + "CEM": { + "direction": "input", + "bits": [ 320 ] + }, + "CEP": { + "direction": "input", + "bits": [ 321 ] + }, + "CLK": { + "direction": "input", + "bits": [ 322 ] + }, + "D": { + "direction": "input", + "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ] + }, + "INMODE": { + "direction": "input", + "bits": [ 348, 349, 350, 351, 352 ] + }, + "MULTSIGNIN": { + "direction": "input", + "bits": [ 353 ] + }, + "OPMODE": { + "direction": "input", + "bits": [ 354, 355, 356, 357, 358, 359, 360 ] + }, + "PCIN": { + "direction": "input", + "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ] + }, + "RSTA": { + "direction": "input", + "bits": [ 409 ] + }, + "RSTALLCARRYIN": { + "direction": "input", + "bits": [ 410 ] + }, + "RSTALUMODE": { + "direction": "input", + "bits": [ 411 ] + }, + "RSTB": { + "direction": "input", + "bits": [ 412 ] + }, + "RSTC": { + "direction": "input", + "bits": [ 413 ] + }, + "RSTCTRL": { + "direction": "input", + "bits": [ 414 ] + }, + "RSTD": { + "direction": "input", + "bits": [ 415 ] + }, + "RSTINMODE": { + "direction": "input", + "bits": [ 416 ] + }, + "RSTM": { + "direction": "input", + "bits": [ 417 ] + }, + "RSTP": { + "direction": "input", + "bits": [ 418 ] + } + }, + "cells": { + }, + "netnames": { + "A": { + "hide_name": 0, + "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "ACIN": { + "hide_name": 0, + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "ACOUT": { + "hide_name": 0, + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "ALUMODE": { + "hide_name": 0, + "bits": [ 216, 217, 218, 219 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "B": { + "hide_name": 0, + "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "BCIN": { + "hide_name": 0, + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "BCOUT": { + "hide_name": 0, + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "C": { + "hide_name": 0, + "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CARRYCASCIN": { + "hide_name": 0, + "bits": [ 304 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CARRYCASCOUT": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CARRYIN": { + "hide_name": 0, + "bits": [ 305 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CARRYINSEL": { + "hide_name": 0, + "bits": [ 306, 307, 308 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CARRYOUT": { + "hide_name": 0, + "bits": [ 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEA1": { + "hide_name": 0, + "bits": [ 309 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEA2": { + "hide_name": 0, + "bits": [ 310 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEAD": { + "hide_name": 0, + "bits": [ 311 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEALUMODE": { + "hide_name": 0, + "bits": [ 312 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEB1": { + "hide_name": 0, + "bits": [ 313 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEB2": { + "hide_name": 0, + "bits": [ 314 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEC": { + "hide_name": 0, + "bits": [ 315 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CECARRYIN": { + "hide_name": 0, + "bits": [ 316 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CECTRL": { + "hide_name": 0, + "bits": [ 317 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CED": { + "hide_name": 0, + "bits": [ 318 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEINMODE": { + "hide_name": 0, + "bits": [ 319 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEM": { + "hide_name": 0, + "bits": [ 320 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CEP": { + "hide_name": 0, + "bits": [ 321 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 322 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "D": { + "hide_name": 0, + "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "INMODE": { + "hide_name": 0, + "bits": [ 348, 349, 350, 351, 352 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "MULTSIGNIN": { + "hide_name": 0, + "bits": [ 353 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "MULTSIGNOUT": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "OPMODE": { + "hide_name": 0, + "bits": [ 354, 355, 356, 357, 358, 359, 360 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "OVERFLOW": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "P": { + "hide_name": 0, + "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "PATTERNBDETECT": { + "hide_name": 0, + "bits": [ 105 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "PATTERNDETECT": { + "hide_name": 0, + "bits": [ 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "PCIN": { + "hide_name": 0, + "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "PCOUT": { + "hide_name": 0, + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTA": { + "hide_name": 0, + "bits": [ 409 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTALLCARRYIN": { + "hide_name": 0, + "bits": [ 410 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTALUMODE": { + "hide_name": 0, + "bits": [ 411 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTB": { + "hide_name": 0, + "bits": [ 412 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTC": { + "hide_name": 0, + "bits": [ 413 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTCTRL": { + "hide_name": 0, + "bits": [ 414 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTD": { + "hide_name": 0, + "bits": [ 415 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTINMODE": { + "hide_name": 0, + "bits": [ 416 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTM": { + "hide_name": 0, + "bits": [ 417 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "RSTP": { + "hide_name": 0, + "bits": [ 418 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + }, + "UNDERFLOW": { + "hide_name": 0, + "bits": [ 155 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" + } + } + } + }, + "$__ABC9_DSP48E1_MULT": { + "attributes": { + "abc9_box_id": 3000, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + }, + "ports": { + "ACOUT": { + "direction": "output", + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] + }, + "BCOUT": { + "direction": "output", + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ] + }, + "CARRYCASCOUT": { + "direction": "output", + "bits": [ 50 ] + }, + "CARRYOUT": { + "direction": "output", + "bits": [ 51, 52, 53, 54 ] + }, + "MULTSIGNOUT": { + "direction": "output", + "bits": [ 55 ] + }, + "OVERFLOW": { + "direction": "output", + "bits": [ 56 ] + }, + "P": { + "direction": "output", + "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ] + }, + "PATTERNBDETECT": { + "direction": "output", + "bits": [ 105 ] + }, + "PATTERNDETECT": { + "direction": "output", + "bits": [ 106 ] + }, + "PCOUT": { + "direction": "output", + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ] + }, + "UNDERFLOW": { + "direction": "output", + "bits": [ 155 ] + }, + "A": { + "direction": "input", + "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] + }, + "ACIN": { + "direction": "input", + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ] + }, + "ALUMODE": { + "direction": "input", + "bits": [ 216, 217, 218, 219 ] + }, + "B": { + "direction": "input", + "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ] + }, + "BCIN": { + "direction": "input", + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ] + }, + "C": { + "direction": "input", + "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ] + }, + "CARRYCASCIN": { + "direction": "input", + "bits": [ 304 ] + }, + "CARRYIN": { + "direction": "input", + "bits": [ 305 ] + }, + "CARRYINSEL": { + "direction": "input", + "bits": [ 306, 307, 308 ] + }, + "CEA1": { + "direction": "input", + "bits": [ 309 ] + }, + "CEA2": { + "direction": "input", + "bits": [ 310 ] + }, + "CEAD": { + "direction": "input", + "bits": [ 311 ] + }, + "CEALUMODE": { + "direction": "input", + "bits": [ 312 ] + }, + "CEB1": { + "direction": "input", + "bits": [ 313 ] + }, + "CEB2": { + "direction": "input", + "bits": [ 314 ] + }, + "CEC": { + "direction": "input", + "bits": [ 315 ] + }, + "CECARRYIN": { + "direction": "input", + "bits": [ 316 ] + }, + "CECTRL": { + "direction": "input", + "bits": [ 317 ] + }, + "CED": { + "direction": "input", + "bits": [ 318 ] + }, + "CEINMODE": { + "direction": "input", + "bits": [ 319 ] + }, + "CEM": { + "direction": "input", + "bits": [ 320 ] + }, + "CEP": { + "direction": "input", + "bits": [ 321 ] + }, + "CLK": { + "direction": "input", + "bits": [ 322 ] + }, + "D": { + "direction": "input", + "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ] + }, + "INMODE": { + "direction": "input", + "bits": [ 348, 349, 350, 351, 352 ] + }, + "MULTSIGNIN": { + "direction": "input", + "bits": [ 353 ] + }, + "OPMODE": { + "direction": "input", + "bits": [ 354, 355, 356, 357, 358, 359, 360 ] + }, + "PCIN": { + "direction": "input", + "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ] + }, + "RSTA": { + "direction": "input", + "bits": [ 409 ] + }, + "RSTALLCARRYIN": { + "direction": "input", + "bits": [ 410 ] + }, + "RSTALUMODE": { + "direction": "input", + "bits": [ 411 ] + }, + "RSTB": { + "direction": "input", + "bits": [ 412 ] + }, + "RSTC": { + "direction": "input", + "bits": [ 413 ] + }, + "RSTCTRL": { + "direction": "input", + "bits": [ 414 ] + }, + "RSTD": { + "direction": "input", + "bits": [ 415 ] + }, + "RSTINMODE": { + "direction": "input", + "bits": [ 416 ] + }, + "RSTM": { + "direction": "input", + "bits": [ 417 ] + }, + "RSTP": { + "direction": "input", + "bits": [ 418 ] + } + }, + "cells": { + }, + "netnames": { + "A": { + "hide_name": 0, + "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "ACIN": { + "hide_name": 0, + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "ACOUT": { + "hide_name": 0, + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "ALUMODE": { + "hide_name": 0, + "bits": [ 216, 217, 218, 219 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "B": { + "hide_name": 0, + "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "BCIN": { + "hide_name": 0, + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "BCOUT": { + "hide_name": 0, + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "C": { + "hide_name": 0, + "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CARRYCASCIN": { + "hide_name": 0, + "bits": [ 304 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CARRYCASCOUT": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CARRYIN": { + "hide_name": 0, + "bits": [ 305 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CARRYINSEL": { + "hide_name": 0, + "bits": [ 306, 307, 308 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CARRYOUT": { + "hide_name": 0, + "bits": [ 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEA1": { + "hide_name": 0, + "bits": [ 309 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEA2": { + "hide_name": 0, + "bits": [ 310 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEAD": { + "hide_name": 0, + "bits": [ 311 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEALUMODE": { + "hide_name": 0, + "bits": [ 312 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEB1": { + "hide_name": 0, + "bits": [ 313 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEB2": { + "hide_name": 0, + "bits": [ 314 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEC": { + "hide_name": 0, + "bits": [ 315 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CECARRYIN": { + "hide_name": 0, + "bits": [ 316 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CECTRL": { + "hide_name": 0, + "bits": [ 317 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CED": { + "hide_name": 0, + "bits": [ 318 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEINMODE": { + "hide_name": 0, + "bits": [ 319 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEM": { + "hide_name": 0, + "bits": [ 320 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CEP": { + "hide_name": 0, + "bits": [ 321 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 322 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "D": { + "hide_name": 0, + "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "INMODE": { + "hide_name": 0, + "bits": [ 348, 349, 350, 351, 352 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "MULTSIGNIN": { + "hide_name": 0, + "bits": [ 353 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "MULTSIGNOUT": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "OPMODE": { + "hide_name": 0, + "bits": [ 354, 355, 356, 357, 358, 359, 360 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "OVERFLOW": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "P": { + "hide_name": 0, + "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "PATTERNBDETECT": { + "hide_name": 0, + "bits": [ 105 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "PATTERNDETECT": { + "hide_name": 0, + "bits": [ 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "PCIN": { + "hide_name": 0, + "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "PCOUT": { + "hide_name": 0, + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTA": { + "hide_name": 0, + "bits": [ 409 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTALLCARRYIN": { + "hide_name": 0, + "bits": [ 410 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTALUMODE": { + "hide_name": 0, + "bits": [ 411 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTB": { + "hide_name": 0, + "bits": [ 412 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTC": { + "hide_name": 0, + "bits": [ 413 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTCTRL": { + "hide_name": 0, + "bits": [ 414 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTD": { + "hide_name": 0, + "bits": [ 415 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTINMODE": { + "hide_name": 0, + "bits": [ 416 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTM": { + "hide_name": 0, + "bits": [ 417 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "RSTP": { + "hide_name": 0, + "bits": [ 418 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + }, + "UNDERFLOW": { + "hide_name": 0, + "bits": [ 155 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" + } + } + } + }, + "$__ABC9_DSP48E1_MULT_DPORT": { + "attributes": { + "abc9_box_id": 3001, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + }, + "ports": { + "ACOUT": { + "direction": "output", + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] + }, + "BCOUT": { + "direction": "output", + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ] + }, + "CARRYCASCOUT": { + "direction": "output", + "bits": [ 50 ] + }, + "CARRYOUT": { + "direction": "output", + "bits": [ 51, 52, 53, 54 ] + }, + "MULTSIGNOUT": { + "direction": "output", + "bits": [ 55 ] + }, + "OVERFLOW": { + "direction": "output", + "bits": [ 56 ] + }, + "P": { + "direction": "output", + "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ] + }, + "PATTERNBDETECT": { + "direction": "output", + "bits": [ 105 ] + }, + "PATTERNDETECT": { + "direction": "output", + "bits": [ 106 ] + }, + "PCOUT": { + "direction": "output", + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ] + }, + "UNDERFLOW": { + "direction": "output", + "bits": [ 155 ] + }, + "A": { + "direction": "input", + "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] + }, + "ACIN": { + "direction": "input", + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ] + }, + "ALUMODE": { + "direction": "input", + "bits": [ 216, 217, 218, 219 ] + }, + "B": { + "direction": "input", + "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ] + }, + "BCIN": { + "direction": "input", + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ] + }, + "C": { + "direction": "input", + "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ] + }, + "CARRYCASCIN": { + "direction": "input", + "bits": [ 304 ] + }, + "CARRYIN": { + "direction": "input", + "bits": [ 305 ] + }, + "CARRYINSEL": { + "direction": "input", + "bits": [ 306, 307, 308 ] + }, + "CEA1": { + "direction": "input", + "bits": [ 309 ] + }, + "CEA2": { + "direction": "input", + "bits": [ 310 ] + }, + "CEAD": { + "direction": "input", + "bits": [ 311 ] + }, + "CEALUMODE": { + "direction": "input", + "bits": [ 312 ] + }, + "CEB1": { + "direction": "input", + "bits": [ 313 ] + }, + "CEB2": { + "direction": "input", + "bits": [ 314 ] + }, + "CEC": { + "direction": "input", + "bits": [ 315 ] + }, + "CECARRYIN": { + "direction": "input", + "bits": [ 316 ] + }, + "CECTRL": { + "direction": "input", + "bits": [ 317 ] + }, + "CED": { + "direction": "input", + "bits": [ 318 ] + }, + "CEINMODE": { + "direction": "input", + "bits": [ 319 ] + }, + "CEM": { + "direction": "input", + "bits": [ 320 ] + }, + "CEP": { + "direction": "input", + "bits": [ 321 ] + }, + "CLK": { + "direction": "input", + "bits": [ 322 ] + }, + "D": { + "direction": "input", + "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ] + }, + "INMODE": { + "direction": "input", + "bits": [ 348, 349, 350, 351, 352 ] + }, + "MULTSIGNIN": { + "direction": "input", + "bits": [ 353 ] + }, + "OPMODE": { + "direction": "input", + "bits": [ 354, 355, 356, 357, 358, 359, 360 ] + }, + "PCIN": { + "direction": "input", + "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ] + }, + "RSTA": { + "direction": "input", + "bits": [ 409 ] + }, + "RSTALLCARRYIN": { + "direction": "input", + "bits": [ 410 ] + }, + "RSTALUMODE": { + "direction": "input", + "bits": [ 411 ] + }, + "RSTB": { + "direction": "input", + "bits": [ 412 ] + }, + "RSTC": { + "direction": "input", + "bits": [ 413 ] + }, + "RSTCTRL": { + "direction": "input", + "bits": [ 414 ] + }, + "RSTD": { + "direction": "input", + "bits": [ 415 ] + }, + "RSTINMODE": { + "direction": "input", + "bits": [ 416 ] + }, + "RSTM": { + "direction": "input", + "bits": [ 417 ] + }, + "RSTP": { + "direction": "input", + "bits": [ 418 ] + } + }, + "cells": { + }, + "netnames": { + "A": { + "hide_name": 0, + "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "ACIN": { + "hide_name": 0, + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "ACOUT": { + "hide_name": 0, + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "ALUMODE": { + "hide_name": 0, + "bits": [ 216, 217, 218, 219 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "B": { + "hide_name": 0, + "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "BCIN": { + "hide_name": 0, + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "BCOUT": { + "hide_name": 0, + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "C": { + "hide_name": 0, + "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CARRYCASCIN": { + "hide_name": 0, + "bits": [ 304 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CARRYCASCOUT": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CARRYIN": { + "hide_name": 0, + "bits": [ 305 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CARRYINSEL": { + "hide_name": 0, + "bits": [ 306, 307, 308 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CARRYOUT": { + "hide_name": 0, + "bits": [ 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEA1": { + "hide_name": 0, + "bits": [ 309 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEA2": { + "hide_name": 0, + "bits": [ 310 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEAD": { + "hide_name": 0, + "bits": [ 311 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEALUMODE": { + "hide_name": 0, + "bits": [ 312 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEB1": { + "hide_name": 0, + "bits": [ 313 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEB2": { + "hide_name": 0, + "bits": [ 314 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEC": { + "hide_name": 0, + "bits": [ 315 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CECARRYIN": { + "hide_name": 0, + "bits": [ 316 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CECTRL": { + "hide_name": 0, + "bits": [ 317 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CED": { + "hide_name": 0, + "bits": [ 318 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEINMODE": { + "hide_name": 0, + "bits": [ 319 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEM": { + "hide_name": 0, + "bits": [ 320 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CEP": { + "hide_name": 0, + "bits": [ 321 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 322 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "D": { + "hide_name": 0, + "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "INMODE": { + "hide_name": 0, + "bits": [ 348, 349, 350, 351, 352 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "MULTSIGNIN": { + "hide_name": 0, + "bits": [ 353 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "MULTSIGNOUT": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "OPMODE": { + "hide_name": 0, + "bits": [ 354, 355, 356, 357, 358, 359, 360 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "OVERFLOW": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "P": { + "hide_name": 0, + "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "PATTERNBDETECT": { + "hide_name": 0, + "bits": [ 105 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "PATTERNDETECT": { + "hide_name": 0, + "bits": [ 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "PCIN": { + "hide_name": 0, + "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "PCOUT": { + "hide_name": 0, + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTA": { + "hide_name": 0, + "bits": [ 409 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTALLCARRYIN": { + "hide_name": 0, + "bits": [ 410 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTALUMODE": { + "hide_name": 0, + "bits": [ 411 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTB": { + "hide_name": 0, + "bits": [ 412 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTC": { + "hide_name": 0, + "bits": [ 413 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTCTRL": { + "hide_name": 0, + "bits": [ 414 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTD": { + "hide_name": 0, + "bits": [ 415 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTINMODE": { + "hide_name": 0, + "bits": [ 416 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTM": { + "hide_name": 0, + "bits": [ 417 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "RSTP": { + "hide_name": 0, + "bits": [ 418 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + }, + "UNDERFLOW": { + "hide_name": 0, + "bits": [ 155 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" + } + } + } + }, + "$__ABC9_DSP48E1_MULT_DPORT_PCOUT_MUX": { + "attributes": { + "abc9_box_id": 2103, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + }, + "ports": { + "Aq": { + "direction": "input", + "bits": [ 2 ] + }, + "ADq": { + "direction": "input", + "bits": [ 3 ] + }, + "Bq": { + "direction": "input", + "bits": [ 4 ] + }, + "Cq": { + "direction": "input", + "bits": [ 5 ] + }, + "Dq": { + "direction": "input", + "bits": [ 6 ] + }, + "I": { + "direction": "input", + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] + }, + "Mq": { + "direction": "input", + "bits": [ 55 ] + }, + "P": { + "direction": "input", + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] + }, + "Pq": { + "direction": "input", + "bits": [ 104 ] + }, + "O": { + "direction": "output", + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] + } + }, + "cells": { + }, + "netnames": { + "ADq": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + }, + "Aq": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + }, + "Bq": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + }, + "Cq": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + }, + "Dq": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + }, + "I": { + "hide_name": 0, + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + }, + "Mq": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + }, + "O": { + "hide_name": 0, + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + }, + "P": { + "hide_name": 0, + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + }, + "Pq": { + "hide_name": 0, + "bits": [ 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" + } + } + } + }, + "$__ABC9_DSP48E1_MULT_DPORT_P_MUX": { + "attributes": { + "abc9_box_id": 2102, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + }, + "ports": { + "Aq": { + "direction": "input", + "bits": [ 2 ] + }, + "ADq": { + "direction": "input", + "bits": [ 3 ] + }, + "Bq": { + "direction": "input", + "bits": [ 4 ] + }, + "Cq": { + "direction": "input", + "bits": [ 5 ] + }, + "Dq": { + "direction": "input", + "bits": [ 6 ] + }, + "I": { + "direction": "input", + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] + }, + "Mq": { + "direction": "input", + "bits": [ 55 ] + }, + "P": { + "direction": "input", + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] + }, + "Pq": { + "direction": "input", + "bits": [ 104 ] + }, + "O": { + "direction": "output", + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] + } + }, + "cells": { + }, + "netnames": { + "ADq": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + }, + "Aq": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + }, + "Bq": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + }, + "Cq": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + }, + "Dq": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + }, + "I": { + "hide_name": 0, + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + }, + "Mq": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + }, + "O": { + "hide_name": 0, + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + }, + "P": { + "hide_name": 0, + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + }, + "Pq": { + "hide_name": 0, + "bits": [ 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" + } + } + } + }, + "$__ABC9_DSP48E1_MULT_PCOUT_MUX": { + "attributes": { + "abc9_box_id": 2101, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + }, + "ports": { + "Aq": { + "direction": "input", + "bits": [ 2 ] + }, + "ADq": { + "direction": "input", + "bits": [ 3 ] + }, + "Bq": { + "direction": "input", + "bits": [ 4 ] + }, + "Cq": { + "direction": "input", + "bits": [ 5 ] + }, + "Dq": { + "direction": "input", + "bits": [ 6 ] + }, + "I": { + "direction": "input", + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] + }, + "Mq": { + "direction": "input", + "bits": [ 55 ] + }, + "P": { + "direction": "input", + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] + }, + "Pq": { + "direction": "input", + "bits": [ 104 ] + }, + "O": { + "direction": "output", + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] + } + }, + "cells": { + }, + "netnames": { + "ADq": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + }, + "Aq": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + }, + "Bq": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + }, + "Cq": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + }, + "Dq": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + }, + "I": { + "hide_name": 0, + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + }, + "Mq": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + }, + "O": { + "hide_name": 0, + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + }, + "P": { + "hide_name": 0, + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + }, + "Pq": { + "hide_name": 0, + "bits": [ 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" + } + } + } + }, + "$__ABC9_DSP48E1_MULT_P_MUX": { + "attributes": { + "abc9_box_id": 2100, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + }, + "ports": { + "Aq": { + "direction": "input", + "bits": [ 2 ] + }, + "ADq": { + "direction": "input", + "bits": [ 3 ] + }, + "Bq": { + "direction": "input", + "bits": [ 4 ] + }, + "Cq": { + "direction": "input", + "bits": [ 5 ] + }, + "Dq": { + "direction": "input", + "bits": [ 6 ] + }, + "I": { + "direction": "input", + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] + }, + "Mq": { + "direction": "input", + "bits": [ 55 ] + }, + "P": { + "direction": "input", + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] + }, + "Pq": { + "direction": "input", + "bits": [ 104 ] + }, + "O": { + "direction": "output", + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] + } + }, + "cells": { + }, + "netnames": { + "ADq": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + }, + "Aq": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + }, + "Bq": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + }, + "Cq": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + }, + "Dq": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + }, + "I": { + "hide_name": 0, + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + }, + "Mq": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + }, + "O": { + "hide_name": 0, + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + }, + "P": { + "hide_name": 0, + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + }, + "Pq": { + "hide_name": 0, + "bits": [ 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" + } + } + } + }, + "$__ABC9_DSP48E1_PCOUT_MUX": { + "attributes": { + "abc9_box_id": 2105, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + }, + "ports": { + "Aq": { + "direction": "input", + "bits": [ 2 ] + }, + "ADq": { + "direction": "input", + "bits": [ 3 ] + }, + "Bq": { + "direction": "input", + "bits": [ 4 ] + }, + "Cq": { + "direction": "input", + "bits": [ 5 ] + }, + "Dq": { + "direction": "input", + "bits": [ 6 ] + }, + "I": { + "direction": "input", + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] + }, + "Mq": { + "direction": "input", + "bits": [ 55 ] + }, + "P": { + "direction": "input", + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] + }, + "Pq": { + "direction": "input", + "bits": [ 104 ] + }, + "O": { + "direction": "output", + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] + } + }, + "cells": { + }, + "netnames": { + "ADq": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + }, + "Aq": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + }, + "Bq": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + }, + "Cq": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + }, + "Dq": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + }, + "I": { + "hide_name": 0, + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + }, + "Mq": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + }, + "O": { + "hide_name": 0, + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + }, + "P": { + "hide_name": 0, + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + }, + "Pq": { + "hide_name": 0, + "bits": [ 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" + } + } + } + }, + "$__ABC9_DSP48E1_P_MUX": { + "attributes": { + "abc9_box_id": 2104, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + }, + "ports": { + "Aq": { + "direction": "input", + "bits": [ 2 ] + }, + "ADq": { + "direction": "input", + "bits": [ 3 ] + }, + "Bq": { + "direction": "input", + "bits": [ 4 ] + }, + "Cq": { + "direction": "input", + "bits": [ 5 ] + }, + "Dq": { + "direction": "input", + "bits": [ 6 ] + }, + "I": { + "direction": "input", + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] + }, + "Mq": { + "direction": "input", + "bits": [ 55 ] + }, + "P": { + "direction": "input", + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] + }, + "Pq": { + "direction": "input", + "bits": [ 104 ] + }, + "O": { + "direction": "output", + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] + } + }, + "cells": { + }, + "netnames": { + "ADq": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + }, + "Aq": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + }, + "Bq": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + }, + "Cq": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + }, + "Dq": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + }, + "I": { + "hide_name": 0, + "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + }, + "Mq": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + }, + "O": { + "hide_name": 0, + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + }, + "P": { + "hide_name": 0, + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + }, + "Pq": { + "hide_name": 0, + "bits": [ 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" + } + } + } + }, + "$__ABC9_LUT6": { + "attributes": { + "abc9_box_id": 2000, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:40" + }, + "ports": { + "A": { + "direction": "input", + "bits": [ 2 ] + }, + "S": { + "direction": "input", + "bits": [ 3, 4, 5, 6, 7, 8 ] + }, + "Y": { + "direction": "output", + "bits": [ 9 ] + } + }, + "cells": { + }, + "netnames": { + "A": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:40" + } + }, + "S": { + "hide_name": 0, + "bits": [ 3, 4, 5, 6, 7, 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:40" + } + }, + "Y": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:40" + } + } + } + }, + "$__ABC9_LUT7": { + "attributes": { + "abc9_box_id": 2001, + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:44" + }, + "ports": { + "A": { + "direction": "input", + "bits": [ 2 ] + }, + "S": { + "direction": "input", + "bits": [ 3, 4, 5, 6, 7, 8, 9 ] + }, + "Y": { + "direction": "output", + "bits": [ 10 ] + } + }, + "cells": { + }, + "netnames": { + "A": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:44" + } + }, + "S": { + "hide_name": 0, + "bits": [ 3, 4, 5, 6, 7, 8, 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:44" + } + }, + "Y": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:44" + } + } + } + }, + "$__XILINX_MUXF78": { + "attributes": { + "abc9_box_id": 3, + "whitebox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "I2": { + "direction": "input", + "bits": [ 5 ] + }, + "I3": { + "direction": "input", + "bits": [ 6 ] + }, + "S0": { + "direction": "input", + "bits": [ 7 ] + }, + "S1": { + "direction": "input", + "bits": [ 8 ] + } + }, + "cells": { + "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:29$289": { + "hide_name": 1, + "type": "$mux", + "parameters": { + "WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:29" + }, + "port_directions": { + "A": "input", + "B": "input", + "S": "input", + "Y": "output" + }, + "connections": { + "A": [ 5 ], + "B": [ 6 ], + "S": [ 7 ], + "Y": [ 9 ] + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30$290": { + "hide_name": 1, + "type": "$mux", + "parameters": { + "WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30" + }, + "port_directions": { + "A": "input", + "B": "input", + "S": "input", + "Y": "output" + }, + "connections": { + "A": [ 3 ], + "B": [ 4 ], + "S": [ 7 ], + "Y": [ 10 ] + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30$291": { + "hide_name": 1, + "type": "$mux", + "parameters": { + "WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30" + }, + "port_directions": { + "A": "input", + "B": "input", + "S": "input", + "Y": "output" + }, + "connections": { + "A": [ 10 ], + "B": [ 9 ], + "S": [ 8 ], + "Y": [ 2 ] + } + } + }, + "netnames": { + "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:29$289_Y": { + "hide_name": 1, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:29" + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30$290_Y": { + "hide_name": 1, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30" + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30$291_Y": { + "hide_name": 1, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30" + } + }, + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" + } + }, + "I2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" + } + }, + "I3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" + } + }, + "S0": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" + } + }, + "S1": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" + } + } + } + }, + "BSCANE2": { + "attributes": { + "blackbox": 1, + "keep": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3714" + }, + "ports": { + "CAPTURE": { + "direction": "output", + "bits": [ 2 ] + }, + "DRCK": { + "direction": "output", + "bits": [ 3 ] + }, + "RESET": { + "direction": "output", + "bits": [ 4 ] + }, + "RUNTEST": { + "direction": "output", + "bits": [ 5 ] + }, + "SEL": { + "direction": "output", + "bits": [ 6 ] + }, + "SHIFT": { + "direction": "output", + "bits": [ 7 ] + }, + "TCK": { + "direction": "output", + "bits": [ 8 ] + }, + "TDI": { + "direction": "output", + "bits": [ 9 ] + }, + "TMS": { + "direction": "output", + "bits": [ 10 ] + }, + "UPDATE": { + "direction": "output", + "bits": [ 11 ] + }, + "TDO": { + "direction": "input", + "bits": [ 12 ] + } + }, + "cells": { + }, + "netnames": { + "CAPTURE": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3717" + } + }, + "DRCK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3718" + } + }, + "RESET": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3719" + } + }, + "RUNTEST": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3720" + } + }, + "SEL": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3721" + } + }, + "SHIFT": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3722" + } + }, + "TCK": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3723" + } + }, + "TDI": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3724" + } + }, + "TDO": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3727" + } + }, + "TMS": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3725" + } + }, + "UPDATE": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3726" + } + } + } + }, + "BUFG": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:62" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:65" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:64" + } + } + } + }, + "BUFGCE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3379" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "CE": { + "direction": "input", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "CE": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "invertible_pin": "IS_CE_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3386" + } + }, + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "invertible_pin": "IS_I_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3388" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3384" + } + } + } + }, + "BUFGCE_1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3391" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "CE": { + "direction": "input", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "CE": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3394" + } + }, + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3395" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3393" + } + } + } + }, + "BUFGCTRL": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:70" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "S0": { + "direction": "input", + "bits": [ 5 ] + }, + "S1": { + "direction": "input", + "bits": [ 6 ] + }, + "CE0": { + "direction": "input", + "bits": [ 7 ] + }, + "CE1": { + "direction": "input", + "bits": [ 8 ] + }, + "IGNORE0": { + "direction": "input", + "bits": [ 9 ] + }, + "IGNORE1": { + "direction": "input", + "bits": [ 10 ] + } + }, + "cells": { + }, + "netnames": { + "CE0": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "invertible_pin": "IS_CE0_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:79" + } + }, + "CE1": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "invertible_pin": "IS_CE1_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:81" + } + }, + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:73" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:73" + } + }, + "IGNORE0": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "invertible_pin": "IS_IGNORE0_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:83" + } + }, + "IGNORE1": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "invertible_pin": "IS_IGNORE1_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:85" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:72" + } + }, + "S0": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_S0_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:75" + } + }, + "S1": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "invertible_pin": "IS_S1_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:77" + } + } + } + }, + "BUFGMUX": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3398" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "S": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3402" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3403" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3401" + } + }, + "S": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3404" + } + } + } + }, + "BUFGMUX_1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3407" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "S": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3411" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3412" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3410" + } + }, + "S": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3413" + } + } + } + }, + "BUFGMUX_CTRL": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3416" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "S": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3419" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3420" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3418" + } + }, + "S": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3421" + } + } + } + }, + "BUFH": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3424" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3427" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3426" + } + } + } + }, + "BUFHCE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:106" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "invertible_pin": "IS_CE_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:111" + } + }, + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:109" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:108" + } + } + } + }, + "BUFIO": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3430" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3433" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3432" + } + } + } + }, + "BUFMR": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3436" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3439" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3438" + } + } + } + }, + "BUFMRCE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3442" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "CE": { + "direction": "input", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "CE": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "invertible_pin": "IS_CE_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3449" + } + }, + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3450" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3447" + } + } + } + }, + "BUFR": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3453" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "CE": { + "direction": "input", + "bits": [ 3 ] + }, + "CLR": { + "direction": "input", + "bits": [ 4 ] + }, + "I": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "CE": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3458" + } + }, + "CLR": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3459" + } + }, + "I": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3460" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_driver": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3457" + } + } + } + }, + "CAPTUREE2": { + "attributes": { + "blackbox": 1, + "keep": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3731" + }, + "ports": { + "CAP": { + "direction": "input", + "bits": [ 2 ] + }, + "CLK": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "CAP": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3733" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3734" + } + } + } + }, + "CARRY": { + "attributes": { + "blackbox": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" + }, + "ports": { + "CO_CHAIN": { + "direction": "output", + "bits": [ 2 ] + }, + "CO_FABRIC": { + "direction": "output", + "bits": [ 3 ] + }, + "O": { + "direction": "output", + "bits": [ 4 ] + }, + "CI": { + "direction": "input", + "bits": [ 5 ] + }, + "DI": { + "direction": "input", + "bits": [ 6 ] + }, + "S": { + "direction": "input", + "bits": [ 7 ] + } + }, + "cells": { + }, + "netnames": { + "CI": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" + } + }, + "CO_CHAIN": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" + } + }, + "CO_FABRIC": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" + } + }, + "DI": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" + } + }, + "O": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" + } + }, + "S": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" + } + } + } + }, + "CARRY0": { + "attributes": { + "blackbox": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" + }, + "ports": { + "CO_CHAIN": { + "direction": "output", + "bits": [ 2 ] + }, + "CO_FABRIC": { + "direction": "output", + "bits": [ 3 ] + }, + "O": { + "direction": "output", + "bits": [ 4 ] + }, + "CI": { + "direction": "input", + "bits": [ 5 ] + }, + "CI_INIT": { + "direction": "input", + "bits": [ 6 ] + }, + "DI": { + "direction": "input", + "bits": [ 7 ] + }, + "S": { + "direction": "input", + "bits": [ 8 ] + } + }, + "cells": { + }, + "netnames": { + "CI": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" + } + }, + "CI_INIT": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" + } + }, + "CO_CHAIN": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" + } + }, + "CO_FABRIC": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" + } + }, + "DI": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" + } + }, + "O": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" + } + }, + "S": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" + } + } + } + }, + "CARRY4": { + "attributes": { + "abc9_box_id": 4, + "whitebox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:213" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2, 3, 4, 5 ] + }, + "CYINIT": { + "direction": "input", + "bits": [ 6 ] + }, + "DI": { + "direction": "input", + "bits": [ 7, 8, 9, 10 ] + }, + "S": { + "direction": "input", + "bits": [ 11, 12, 13, 14 ] + }, + "CI": { + "direction": "input", + "bits": [ 15 ] + }, + "CO": { + "direction": "output", + "bits": [ 16, 17, 18, 19 ] + } + }, + "cells": { + "$or$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222$7": { + "hide_name": 1, + "type": "$or", + "parameters": { + "A_SIGNED": 0, + "A_WIDTH": 1, + "B_SIGNED": 0, + "B_WIDTH": 1, + "Y_WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222" + }, + "port_directions": { + "A": "input", + "B": "input", + "Y": "output" + }, + "connections": { + "A": [ 15 ], + "B": [ 6 ], + "Y": [ 20 ] + } + }, + "$or$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223$9": { + "hide_name": 1, + "type": "$or", + "parameters": { + "A_SIGNED": 0, + "A_WIDTH": 1, + "B_SIGNED": 0, + "B_WIDTH": 1, + "Y_WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223" + }, + "port_directions": { + "A": "input", + "B": "input", + "Y": "output" + }, + "connections": { + "A": [ 15 ], + "B": [ 6 ], + "Y": [ 21 ] + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223$10": { + "hide_name": 1, + "type": "$mux", + "parameters": { + "WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223" + }, + "port_directions": { + "A": "input", + "B": "input", + "S": "input", + "Y": "output" + }, + "connections": { + "A": [ 7 ], + "B": [ 21 ], + "S": [ 11 ], + "Y": [ 16 ] + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:224$11": { + "hide_name": 1, + "type": "$mux", + "parameters": { + "WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:224" + }, + "port_directions": { + "A": "input", + "B": "input", + "S": "input", + "Y": "output" + }, + "connections": { + "A": [ 8 ], + "B": [ 16 ], + "S": [ 12 ], + "Y": [ 17 ] + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:225$12": { + "hide_name": 1, + "type": "$mux", + "parameters": { + "WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:225" + }, + "port_directions": { + "A": "input", + "B": "input", + "S": "input", + "Y": "output" + }, + "connections": { + "A": [ 9 ], + "B": [ 17 ], + "S": [ 13 ], + "Y": [ 18 ] + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:226$13": { + "hide_name": 1, + "type": "$mux", + "parameters": { + "WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:226" + }, + "port_directions": { + "A": "input", + "B": "input", + "S": "input", + "Y": "output" + }, + "connections": { + "A": [ 10 ], + "B": [ 18 ], + "S": [ 14 ], + "Y": [ 19 ] + } + }, + "$xor$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222$8": { + "hide_name": 1, + "type": "$xor", + "parameters": { + "A_SIGNED": 0, + "A_WIDTH": 4, + "B_SIGNED": 0, + "B_WIDTH": 4, + "Y_WIDTH": 4 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222" + }, + "port_directions": { + "A": "input", + "B": "input", + "Y": "output" + }, + "connections": { + "A": [ 11, 12, 13, 14 ], + "B": [ 20, 16, 17, 18 ], + "Y": [ 2, 3, 4, 5 ] + } + } + }, + "netnames": { + "$or$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222$7_Y": { + "hide_name": 1, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222" + } + }, + "$or$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223$9_Y": { + "hide_name": 1, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223" + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223$10_Y": { + "hide_name": 1, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223" + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:224$11_Y": { + "hide_name": 1, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:224" + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:225$12_Y": { + "hide_name": 1, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:225" + } + }, + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:226$13_Y": { + "hide_name": 1, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:226" + } + }, + "$xor$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222$8_Y": { + "hide_name": 1, + "bits": [ 2, 3, 4, 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222" + } + }, + "CI": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "abc9_carry": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:218" + } + }, + "CO": { + "hide_name": 0, + "bits": [ 16, 17, 18, 19 ], + "attributes": { + "abc9_carry": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:215" + } + }, + "CYINIT": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:219" + } + }, + "DI": { + "hide_name": 0, + "bits": [ 7, 8, 9, 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:220" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2, 3, 4, 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:216" + } + }, + "S": { + "hide_name": 0, + "bits": [ 11, 12, 13, 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:220" + } + } + } + }, + "CFGLUT5": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5076" + }, + "ports": { + "CDO": { + "direction": "output", + "bits": [ 2 ] + }, + "O5": { + "direction": "output", + "bits": [ 3 ] + }, + "O6": { + "direction": "output", + "bits": [ 4 ] + }, + "I4": { + "direction": "input", + "bits": [ 5 ] + }, + "I3": { + "direction": "input", + "bits": [ 6 ] + }, + "I2": { + "direction": "input", + "bits": [ 7 ] + }, + "I1": { + "direction": "input", + "bits": [ 8 ] + }, + "I0": { + "direction": "input", + "bits": [ 9 ] + }, + "CDI": { + "direction": "input", + "bits": [ 10 ] + }, + "CE": { + "direction": "input", + "bits": [ 11 ] + }, + "CLK": { + "direction": "input", + "bits": [ 12 ] + } + }, + "cells": { + }, + "netnames": { + "CDI": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5087" + } + }, + "CDO": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5079" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5088" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5091" + } + }, + "I0": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5086" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5085" + } + }, + "I2": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5084" + } + }, + "I3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5083" + } + }, + "I4": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5082" + } + }, + "O5": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5080" + } + }, + "O6": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5081" + } + } + } + }, + "DCIRESET": { + "attributes": { + "blackbox": 1, + "keep": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3802" + }, + "ports": { + "LOCKED": { + "direction": "output", + "bits": [ 2 ] + }, + "RST": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "LOCKED": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3803" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3804" + } + } + } + }, + "DNA_PORT": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3737" + }, + "ports": { + "DOUT": { + "direction": "output", + "bits": [ 2 ] + }, + "CLK": { + "direction": "input", + "bits": [ 3 ] + }, + "DIN": { + "direction": "input", + "bits": [ 4 ] + }, + "READ": { + "direction": "input", + "bits": [ 5 ] + }, + "SHIFT": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "CLK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3740" + } + }, + "DIN": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3741" + } + }, + "DOUT": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3739" + } + }, + "READ": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3742" + } + }, + "SHIFT": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3743" + } + } + } + }, + "DSP48E1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:584" + }, + "ports": { + "ACOUT": { + "direction": "output", + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] + }, + "BCOUT": { + "direction": "output", + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ] + }, + "CARRYCASCOUT": { + "direction": "output", + "bits": [ 50 ] + }, + "CARRYOUT": { + "direction": "output", + "bits": [ 51, 52, 53, 54 ] + }, + "MULTSIGNOUT": { + "direction": "output", + "bits": [ 55 ] + }, + "OVERFLOW": { + "direction": "output", + "bits": [ 56 ] + }, + "P": { + "direction": "output", + "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ] + }, + "PATTERNBDETECT": { + "direction": "output", + "bits": [ 105 ] + }, + "PATTERNDETECT": { + "direction": "output", + "bits": [ 106 ] + }, + "PCOUT": { + "direction": "output", + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ] + }, + "UNDERFLOW": { + "direction": "output", + "bits": [ 155 ] + }, + "A": { + "direction": "input", + "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] + }, + "ACIN": { + "direction": "input", + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ] + }, + "ALUMODE": { + "direction": "input", + "bits": [ 216, 217, 218, 219 ] + }, + "B": { + "direction": "input", + "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ] + }, + "BCIN": { + "direction": "input", + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ] + }, + "C": { + "direction": "input", + "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ] + }, + "CARRYCASCIN": { + "direction": "input", + "bits": [ 304 ] + }, + "CARRYIN": { + "direction": "input", + "bits": [ 305 ] + }, + "CARRYINSEL": { + "direction": "input", + "bits": [ 306, 307, 308 ] + }, + "CEA1": { + "direction": "input", + "bits": [ 309 ] + }, + "CEA2": { + "direction": "input", + "bits": [ 310 ] + }, + "CEAD": { + "direction": "input", + "bits": [ 311 ] + }, + "CEALUMODE": { + "direction": "input", + "bits": [ 312 ] + }, + "CEB1": { + "direction": "input", + "bits": [ 313 ] + }, + "CEB2": { + "direction": "input", + "bits": [ 314 ] + }, + "CEC": { + "direction": "input", + "bits": [ 315 ] + }, + "CECARRYIN": { + "direction": "input", + "bits": [ 316 ] + }, + "CECTRL": { + "direction": "input", + "bits": [ 317 ] + }, + "CED": { + "direction": "input", + "bits": [ 318 ] + }, + "CEINMODE": { + "direction": "input", + "bits": [ 319 ] + }, + "CEM": { + "direction": "input", + "bits": [ 320 ] + }, + "CEP": { + "direction": "input", + "bits": [ 321 ] + }, + "CLK": { + "direction": "input", + "bits": [ 322 ] + }, + "D": { + "direction": "input", + "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ] + }, + "INMODE": { + "direction": "input", + "bits": [ 348, 349, 350, 351, 352 ] + }, + "MULTSIGNIN": { + "direction": "input", + "bits": [ 353 ] + }, + "OPMODE": { + "direction": "input", + "bits": [ 354, 355, 356, 357, 358, 359, 360 ] + }, + "PCIN": { + "direction": "input", + "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ] + }, + "RSTA": { + "direction": "input", + "bits": [ 409 ] + }, + "RSTALLCARRYIN": { + "direction": "input", + "bits": [ 410 ] + }, + "RSTALUMODE": { + "direction": "input", + "bits": [ 411 ] + }, + "RSTB": { + "direction": "input", + "bits": [ 412 ] + }, + "RSTC": { + "direction": "input", + "bits": [ 413 ] + }, + "RSTCTRL": { + "direction": "input", + "bits": [ 414 ] + }, + "RSTD": { + "direction": "input", + "bits": [ 415 ] + }, + "RSTINMODE": { + "direction": "input", + "bits": [ 416 ] + }, + "RSTM": { + "direction": "input", + "bits": [ 417 ] + }, + "RSTP": { + "direction": "input", + "bits": [ 418 ] + } + }, + "cells": { + }, + "netnames": { + "A": { + "hide_name": 0, + "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:596" + } + }, + "ACIN": { + "hide_name": 0, + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:597" + } + }, + "ACOUT": { + "hide_name": 0, + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:585" + } + }, + "ALUMODE": { + "hide_name": 0, + "bits": [ 216, 217, 218, 219 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:598" + } + }, + "B": { + "hide_name": 0, + "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:599" + } + }, + "BCIN": { + "hide_name": 0, + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:600" + } + }, + "BCOUT": { + "hide_name": 0, + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:586" + } + }, + "C": { + "hide_name": 0, + "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:601" + } + }, + "CARRYCASCIN": { + "hide_name": 0, + "bits": [ 304 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:602" + } + }, + "CARRYCASCOUT": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:587" + } + }, + "CARRYIN": { + "hide_name": 0, + "bits": [ 305 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:603" + } + }, + "CARRYINSEL": { + "hide_name": 0, + "bits": [ 306, 307, 308 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:604" + } + }, + "CARRYOUT": { + "hide_name": 0, + "bits": [ 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:588" + } + }, + "CEA1": { + "hide_name": 0, + "bits": [ 309 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:605" + } + }, + "CEA2": { + "hide_name": 0, + "bits": [ 310 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:606" + } + }, + "CEAD": { + "hide_name": 0, + "bits": [ 311 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:607" + } + }, + "CEALUMODE": { + "hide_name": 0, + "bits": [ 312 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:608" + } + }, + "CEB1": { + "hide_name": 0, + "bits": [ 313 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:609" + } + }, + "CEB2": { + "hide_name": 0, + "bits": [ 314 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:610" + } + }, + "CEC": { + "hide_name": 0, + "bits": [ 315 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:611" + } + }, + "CECARRYIN": { + "hide_name": 0, + "bits": [ 316 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:612" + } + }, + "CECTRL": { + "hide_name": 0, + "bits": [ 317 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:613" + } + }, + "CED": { + "hide_name": 0, + "bits": [ 318 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:614" + } + }, + "CEINMODE": { + "hide_name": 0, + "bits": [ 319 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:615" + } + }, + "CEM": { + "hide_name": 0, + "bits": [ 320 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:616" + } + }, + "CEP": { + "hide_name": 0, + "bits": [ 321 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:617" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 322 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:618" + } + }, + "D": { + "hide_name": 0, + "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:619" + } + }, + "INMODE": { + "hide_name": 0, + "bits": [ 348, 349, 350, 351, 352 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:620" + } + }, + "MULTSIGNIN": { + "hide_name": 0, + "bits": [ 353 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:621" + } + }, + "MULTSIGNOUT": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:589" + } + }, + "OPMODE": { + "hide_name": 0, + "bits": [ 354, 355, 356, 357, 358, 359, 360 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:622" + } + }, + "OVERFLOW": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:590" + } + }, + "P": { + "hide_name": 0, + "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:591" + } + }, + "PATTERNBDETECT": { + "hide_name": 0, + "bits": [ 105 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:592" + } + }, + "PATTERNDETECT": { + "hide_name": 0, + "bits": [ 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:593" + } + }, + "PCIN": { + "hide_name": 0, + "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:623" + } + }, + "PCOUT": { + "hide_name": 0, + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:594" + } + }, + "RSTA": { + "hide_name": 0, + "bits": [ 409 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:624" + } + }, + "RSTALLCARRYIN": { + "hide_name": 0, + "bits": [ 410 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:625" + } + }, + "RSTALUMODE": { + "hide_name": 0, + "bits": [ 411 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:626" + } + }, + "RSTB": { + "hide_name": 0, + "bits": [ 412 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:627" + } + }, + "RSTC": { + "hide_name": 0, + "bits": [ 413 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:628" + } + }, + "RSTCTRL": { + "hide_name": 0, + "bits": [ 414 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:629" + } + }, + "RSTD": { + "hide_name": 0, + "bits": [ 415 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:630" + } + }, + "RSTINMODE": { + "hide_name": 0, + "bits": [ 416 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:631" + } + }, + "RSTM": { + "hide_name": 0, + "bits": [ 417 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:632" + } + }, + "RSTP": { + "hide_name": 0, + "bits": [ 418 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:633" + } + }, + "UNDERFLOW": { + "hide_name": 0, + "bits": [ 155 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:595" + } + } + } + }, + "EFUSE_USR": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3746" + }, + "ports": { + "EFUSEUSR": { + "direction": "output", + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 ] + } + }, + "cells": { + }, + "netnames": { + "EFUSEUSR": { + "hide_name": 0, + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3748" + } + } + } + }, + "FDCE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:300" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "C": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + }, + "D": { + "direction": "input", + "bits": [ 5 ] + }, + "CLR": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_C_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:305" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:306" + } + }, + "CLR": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "invertible_pin": "IS_CLR_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:310" + } + }, + "D": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_D_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:308" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 303, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:302" + } + } + } + }, + "FDCE_1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:374" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "C": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + }, + "D": { + "direction": "input", + "bits": [ 5 ] + }, + "CLR": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:378" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:379" + } + }, + "CLR": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:379" + } + }, + "D": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:379" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 303, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:376" + } + } + } + }, + "FDPE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:325" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "C": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + }, + "D": { + "direction": "input", + "bits": [ 5 ] + }, + "PRE": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_C_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:330" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:331" + } + }, + "D": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_D_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:333" + } + }, + "PRE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "invertible_pin": "IS_PRE_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:335" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 303, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:327" + } + } + } + }, + "FDPE_1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:386" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "C": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + }, + "D": { + "direction": "input", + "bits": [ 5 ] + }, + "PRE": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:390" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:391" + } + }, + "D": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:391" + } + }, + "PRE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:391" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 303, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:388" + } + } + } + }, + "FDRE": { + "attributes": { + "blackbox": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:254" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "C": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + }, + "D": { + "direction": "input", + "bits": [ 5 ] + }, + "R": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_C_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:259" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:260" + } + }, + "D": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_D_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:262" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 303, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:256" + } + }, + "R": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "invertible_pin": "IS_R_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:264" + } + } + } + }, + "FDRE_1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:350" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "C": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + }, + "D": { + "direction": "input", + "bits": [ 5 ] + }, + "R": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:354" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:355" + } + }, + "D": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:355" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 303, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:352" + } + }, + "R": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:355" + } + } + } + }, + "FDSE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:277" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "C": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + }, + "D": { + "direction": "input", + "bits": [ 5 ] + }, + "S": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_C_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:282" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:283" + } + }, + "D": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_D_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:285" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 303, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:279" + } + }, + "S": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "invertible_pin": "IS_S_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:287" + } + } + } + }, + "FDSE_1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:362" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "C": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + }, + "D": { + "direction": "input", + "bits": [ 5 ] + }, + "S": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:366" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:367" + } + }, + "D": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:367" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 303, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:364" + } + }, + "S": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:367" + } + } + } + }, + "FIFO18E1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4682" + }, + "ports": { + "ALMOSTEMPTY": { + "direction": "output", + "bits": [ 2 ] + }, + "ALMOSTFULL": { + "direction": "output", + "bits": [ 3 ] + }, + "DO": { + "direction": "output", + "bits": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 ] + }, + "DOP": { + "direction": "output", + "bits": [ 36, 37, 38, 39 ] + }, + "EMPTY": { + "direction": "output", + "bits": [ 40 ] + }, + "FULL": { + "direction": "output", + "bits": [ 41 ] + }, + "RDCOUNT": { + "direction": "output", + "bits": [ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 ] + }, + "RDERR": { + "direction": "output", + "bits": [ 54 ] + }, + "WRCOUNT": { + "direction": "output", + "bits": [ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 ] + }, + "WRERR": { + "direction": "output", + "bits": [ 67 ] + }, + "DI": { + "direction": "input", + "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ] + }, + "DIP": { + "direction": "input", + "bits": [ 100, 101, 102, 103 ] + }, + "RDCLK": { + "direction": "input", + "bits": [ 104 ] + }, + "RDEN": { + "direction": "input", + "bits": [ 105 ] + }, + "REGCE": { + "direction": "input", + "bits": [ 106 ] + }, + "RST": { + "direction": "input", + "bits": [ 107 ] + }, + "RSTREG": { + "direction": "input", + "bits": [ 108 ] + }, + "WRCLK": { + "direction": "input", + "bits": [ 109 ] + }, + "WREN": { + "direction": "input", + "bits": [ 110 ] + } + }, + "cells": { + }, + "netnames": { + "ALMOSTEMPTY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4699" + } + }, + "ALMOSTFULL": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4700" + } + }, + "DI": { + "hide_name": 0, + "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4709" + } + }, + "DIP": { + "hide_name": 0, + "bits": [ 100, 101, 102, 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4710" + } + }, + "DO": { + "hide_name": 0, + "bits": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4701" + } + }, + "DOP": { + "hide_name": 0, + "bits": [ 36, 37, 38, 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4702" + } + }, + "EMPTY": { + "hide_name": 0, + "bits": [ 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4703" + } + }, + "FULL": { + "hide_name": 0, + "bits": [ 41 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4704" + } + }, + "RDCLK": { + "hide_name": 0, + "bits": [ 104 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_RDCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4713" + } + }, + "RDCOUNT": { + "hide_name": 0, + "bits": [ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4705" + } + }, + "RDEN": { + "hide_name": 0, + "bits": [ 105 ], + "attributes": { + "invertible_pin": "IS_RDEN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4715" + } + }, + "RDERR": { + "hide_name": 0, + "bits": [ 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4706" + } + }, + "REGCE": { + "hide_name": 0, + "bits": [ 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4716" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 107 ], + "attributes": { + "invertible_pin": "IS_RST_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4718" + } + }, + "RSTREG": { + "hide_name": 0, + "bits": [ 108 ], + "attributes": { + "invertible_pin": "IS_RSTREG_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4720" + } + }, + "WRCLK": { + "hide_name": 0, + "bits": [ 109 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4723" + } + }, + "WRCOUNT": { + "hide_name": 0, + "bits": [ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4707" + } + }, + "WREN": { + "hide_name": 0, + "bits": [ 110 ], + "attributes": { + "invertible_pin": "IS_WREN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4725" + } + }, + "WRERR": { + "hide_name": 0, + "bits": [ 67 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4708" + } + } + } + }, + "FIFO36E1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4728" + }, + "ports": { + "ALMOSTEMPTY": { + "direction": "output", + "bits": [ 2 ] + }, + "ALMOSTFULL": { + "direction": "output", + "bits": [ 3 ] + }, + "DBITERR": { + "direction": "output", + "bits": [ 4 ] + }, + "DO": { + "direction": "output", + "bits": [ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 ] + }, + "DOP": { + "direction": "output", + "bits": [ 69, 70, 71, 72, 73, 74, 75, 76 ] + }, + "ECCPARITY": { + "direction": "output", + "bits": [ 77, 78, 79, 80, 81, 82, 83, 84 ] + }, + "EMPTY": { + "direction": "output", + "bits": [ 85 ] + }, + "FULL": { + "direction": "output", + "bits": [ 86 ] + }, + "RDCOUNT": { + "direction": "output", + "bits": [ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ] + }, + "RDERR": { + "direction": "output", + "bits": [ 100 ] + }, + "SBITERR": { + "direction": "output", + "bits": [ 101 ] + }, + "WRCOUNT": { + "direction": "output", + "bits": [ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114 ] + }, + "WRERR": { + "direction": "output", + "bits": [ 115 ] + }, + "DI": { + "direction": "input", + "bits": [ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179 ] + }, + "DIP": { + "direction": "input", + "bits": [ 180, 181, 182, 183, 184, 185, 186, 187 ] + }, + "INJECTDBITERR": { + "direction": "input", + "bits": [ 188 ] + }, + "INJECTSBITERR": { + "direction": "input", + "bits": [ 189 ] + }, + "RDCLK": { + "direction": "input", + "bits": [ 190 ] + }, + "RDEN": { + "direction": "input", + "bits": [ 191 ] + }, + "REGCE": { + "direction": "input", + "bits": [ 192 ] + }, + "RST": { + "direction": "input", + "bits": [ 193 ] + }, + "RSTREG": { + "direction": "input", + "bits": [ 194 ] + }, + "WRCLK": { + "direction": "input", + "bits": [ 195 ] + }, + "WREN": { + "direction": "input", + "bits": [ 196 ] + } + }, + "cells": { + }, + "netnames": { + "ALMOSTEMPTY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4747" + } + }, + "ALMOSTFULL": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4748" + } + }, + "DBITERR": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4749" + } + }, + "DI": { + "hide_name": 0, + "bits": [ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4760" + } + }, + "DIP": { + "hide_name": 0, + "bits": [ 180, 181, 182, 183, 184, 185, 186, 187 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4761" + } + }, + "DO": { + "hide_name": 0, + "bits": [ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4750" + } + }, + "DOP": { + "hide_name": 0, + "bits": [ 69, 70, 71, 72, 73, 74, 75, 76 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4751" + } + }, + "ECCPARITY": { + "hide_name": 0, + "bits": [ 77, 78, 79, 80, 81, 82, 83, 84 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4752" + } + }, + "EMPTY": { + "hide_name": 0, + "bits": [ 85 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4753" + } + }, + "FULL": { + "hide_name": 0, + "bits": [ 86 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4754" + } + }, + "INJECTDBITERR": { + "hide_name": 0, + "bits": [ 188 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4762" + } + }, + "INJECTSBITERR": { + "hide_name": 0, + "bits": [ 189 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4763" + } + }, + "RDCLK": { + "hide_name": 0, + "bits": [ 190 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_RDCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4766" + } + }, + "RDCOUNT": { + "hide_name": 0, + "bits": [ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4755" + } + }, + "RDEN": { + "hide_name": 0, + "bits": [ 191 ], + "attributes": { + "invertible_pin": "IS_RDEN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4768" + } + }, + "RDERR": { + "hide_name": 0, + "bits": [ 100 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4756" + } + }, + "REGCE": { + "hide_name": 0, + "bits": [ 192 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4769" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 193 ], + "attributes": { + "invertible_pin": "IS_RST_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4771" + } + }, + "RSTREG": { + "hide_name": 0, + "bits": [ 194 ], + "attributes": { + "invertible_pin": "IS_RSTREG_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4773" + } + }, + "SBITERR": { + "hide_name": 0, + "bits": [ 101 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4757" + } + }, + "WRCLK": { + "hide_name": 0, + "bits": [ 195 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4776" + } + }, + "WRCOUNT": { + "hide_name": 0, + "bits": [ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4758" + } + }, + "WREN": { + "hide_name": 0, + "bits": [ 196 ], + "attributes": { + "invertible_pin": "IS_WREN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4778" + } + }, + "WRERR": { + "hide_name": 0, + "bits": [ 115 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4759" + } + } + } + }, + "FRAME_ECCE2": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3751" + }, + "ports": { + "CRCERROR": { + "direction": "output", + "bits": [ 2 ] + }, + "ECCERROR": { + "direction": "output", + "bits": [ 3 ] + }, + "ECCERRORSINGLE": { + "direction": "output", + "bits": [ 4 ] + }, + "SYNDROMEVALID": { + "direction": "output", + "bits": [ 5 ] + }, + "SYNDROME": { + "direction": "output", + "bits": [ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ] + }, + "FAR": { + "direction": "output", + "bits": [ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ] + }, + "SYNBIT": { + "direction": "output", + "bits": [ 45, 46, 47, 48, 49 ] + }, + "SYNWORD": { + "direction": "output", + "bits": [ 50, 51, 52, 53, 54, 55, 56 ] + } + }, + "cells": { + }, + "netnames": { + "CRCERROR": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3754" + } + }, + "ECCERROR": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3755" + } + }, + "ECCERRORSINGLE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3756" + } + }, + "FAR": { + "hide_name": 0, + "bits": [ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3759" + } + }, + "SYNBIT": { + "hide_name": 0, + "bits": [ 45, 46, 47, 48, 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3760" + } + }, + "SYNDROME": { + "hide_name": 0, + "bits": [ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3758" + } + }, + "SYNDROMEVALID": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3757" + } + }, + "SYNWORD": { + "hide_name": 0, + "bits": [ 50, 51, 52, 53, 54, 55, 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3761" + } + } + } + }, + "GND": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:28" + }, + "ports": { + "G": { + "direction": "output", + "bits": [ 2 ] + } + }, + "cells": { + }, + "netnames": { + "G": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:28" + } + } + } + }, + "GTHE2_CHANNEL": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3" + }, + "ports": { + "CPLLFBCLKLOST": { + "direction": "output", + "bits": [ 2 ] + }, + "CPLLLOCK": { + "direction": "output", + "bits": [ 3 ] + }, + "CPLLREFCLKLOST": { + "direction": "output", + "bits": [ 4 ] + }, + "DRPRDY": { + "direction": "output", + "bits": [ 5 ] + }, + "EYESCANDATAERROR": { + "direction": "output", + "bits": [ 6 ] + }, + "GTHTXN": { + "direction": "output", + "bits": [ 7 ] + }, + "GTHTXP": { + "direction": "output", + "bits": [ 8 ] + }, + "GTREFCLKMONITOR": { + "direction": "output", + "bits": [ 9 ] + }, + "PHYSTATUS": { + "direction": "output", + "bits": [ 10 ] + }, + "RSOSINTDONE": { + "direction": "output", + "bits": [ 11 ] + }, + "RXBYTEISALIGNED": { + "direction": "output", + "bits": [ 12 ] + }, + "RXBYTEREALIGN": { + "direction": "output", + "bits": [ 13 ] + }, + "RXCDRLOCK": { + "direction": "output", + "bits": [ 14 ] + }, + "RXCHANBONDSEQ": { + "direction": "output", + "bits": [ 15 ] + }, + "RXCHANISALIGNED": { + "direction": "output", + "bits": [ 16 ] + }, + "RXCHANREALIGN": { + "direction": "output", + "bits": [ 17 ] + }, + "RXCOMINITDET": { + "direction": "output", + "bits": [ 18 ] + }, + "RXCOMMADET": { + "direction": "output", + "bits": [ 19 ] + }, + "RXCOMSASDET": { + "direction": "output", + "bits": [ 20 ] + }, + "RXCOMWAKEDET": { + "direction": "output", + "bits": [ 21 ] + }, + "RXDFESLIDETAPSTARTED": { + "direction": "output", + "bits": [ 22 ] + }, + "RXDFESLIDETAPSTROBEDONE": { + "direction": "output", + "bits": [ 23 ] + }, + "RXDFESLIDETAPSTROBESTARTED": { + "direction": "output", + "bits": [ 24 ] + }, + "RXDFESTADAPTDONE": { + "direction": "output", + "bits": [ 25 ] + }, + "RXDLYSRESETDONE": { + "direction": "output", + "bits": [ 26 ] + }, + "RXELECIDLE": { + "direction": "output", + "bits": [ 27 ] + }, + "RXOSINTSTARTED": { + "direction": "output", + "bits": [ 28 ] + }, + "RXOSINTSTROBEDONE": { + "direction": "output", + "bits": [ 29 ] + }, + "RXOSINTSTROBESTARTED": { + "direction": "output", + "bits": [ 30 ] + }, + "RXOUTCLK": { + "direction": "output", + "bits": [ 31 ] + }, + "RXOUTCLKFABRIC": { + "direction": "output", + "bits": [ 32 ] + }, + "RXOUTCLKPCS": { + "direction": "output", + "bits": [ 33 ] + }, + "RXPHALIGNDONE": { + "direction": "output", + "bits": [ 34 ] + }, + "RXPMARESETDONE": { + "direction": "output", + "bits": [ 35 ] + }, + "RXPRBSERR": { + "direction": "output", + "bits": [ 36 ] + }, + "RXQPISENN": { + "direction": "output", + "bits": [ 37 ] + }, + "RXQPISENP": { + "direction": "output", + "bits": [ 38 ] + }, + "RXRATEDONE": { + "direction": "output", + "bits": [ 39 ] + }, + "RXRESETDONE": { + "direction": "output", + "bits": [ 40 ] + }, + "RXSYNCDONE": { + "direction": "output", + "bits": [ 41 ] + }, + "RXSYNCOUT": { + "direction": "output", + "bits": [ 42 ] + }, + "RXVALID": { + "direction": "output", + "bits": [ 43 ] + }, + "TXCOMFINISH": { + "direction": "output", + "bits": [ 44 ] + }, + "TXDLYSRESETDONE": { + "direction": "output", + "bits": [ 45 ] + }, + "TXGEARBOXREADY": { + "direction": "output", + "bits": [ 46 ] + }, + "TXOUTCLK": { + "direction": "output", + "bits": [ 47 ] + }, + "TXOUTCLKFABRIC": { + "direction": "output", + "bits": [ 48 ] + }, + "TXOUTCLKPCS": { + "direction": "output", + "bits": [ 49 ] + }, + "TXPHALIGNDONE": { + "direction": "output", + "bits": [ 50 ] + }, + "TXPHINITDONE": { + "direction": "output", + "bits": [ 51 ] + }, + "TXPMARESETDONE": { + "direction": "output", + "bits": [ 52 ] + }, + "TXQPISENN": { + "direction": "output", + "bits": [ 53 ] + }, + "TXQPISENP": { + "direction": "output", + "bits": [ 54 ] + }, + "TXRATEDONE": { + "direction": "output", + "bits": [ 55 ] + }, + "TXRESETDONE": { + "direction": "output", + "bits": [ 56 ] + }, + "TXSYNCDONE": { + "direction": "output", + "bits": [ 57 ] + }, + "TXSYNCOUT": { + "direction": "output", + "bits": [ 58 ] + }, + "DMONITOROUT": { + "direction": "output", + "bits": [ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 ] + }, + "DRPDO": { + "direction": "output", + "bits": [ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89 ] + }, + "PCSRSVDOUT": { + "direction": "output", + "bits": [ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105 ] + }, + "RXCLKCORCNT": { + "direction": "output", + "bits": [ 106, 107 ] + }, + "RXDATAVALID": { + "direction": "output", + "bits": [ 108, 109 ] + }, + "RXHEADERVALID": { + "direction": "output", + "bits": [ 110, 111 ] + }, + "RXSTARTOFSEQ": { + "direction": "output", + "bits": [ 112, 113 ] + }, + "TXBUFSTATUS": { + "direction": "output", + "bits": [ 114, 115 ] + }, + "RXBUFSTATUS": { + "direction": "output", + "bits": [ 116, 117, 118 ] + }, + "RXSTATUS": { + "direction": "output", + "bits": [ 119, 120, 121 ] + }, + "RXCHBONDO": { + "direction": "output", + "bits": [ 122, 123, 124, 125, 126 ] + }, + "RXPHMONITOR": { + "direction": "output", + "bits": [ 127, 128, 129, 130, 131 ] + }, + "RXPHSLIPMONITOR": { + "direction": "output", + "bits": [ 132, 133, 134, 135, 136 ] + }, + "RXHEADER": { + "direction": "output", + "bits": [ 137, 138, 139, 140, 141, 142 ] + }, + "RXDATA": { + "direction": "output", + "bits": [ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206 ] + }, + "RXMONITOROUT": { + "direction": "output", + "bits": [ 207, 208, 209, 210, 211, 212, 213 ] + }, + "RXCHARISCOMMA": { + "direction": "output", + "bits": [ 214, 215, 216, 217, 218, 219, 220, 221 ] + }, + "RXCHARISK": { + "direction": "output", + "bits": [ 222, 223, 224, 225, 226, 227, 228, 229 ] + }, + "RXDISPERR": { + "direction": "output", + "bits": [ 230, 231, 232, 233, 234, 235, 236, 237 ] + }, + "RXNOTINTABLE": { + "direction": "output", + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245 ] + }, + "CFGRESET": { + "direction": "input", + "bits": [ 246 ] + }, + "CLKRSVD0": { + "direction": "input", + "bits": [ 247 ] + }, + "CLKRSVD1": { + "direction": "input", + "bits": [ 248 ] + }, + "CPLLLOCKDETCLK": { + "direction": "input", + "bits": [ 249 ] + }, + "CPLLLOCKEN": { + "direction": "input", + "bits": [ 250 ] + }, + "CPLLPD": { + "direction": "input", + "bits": [ 251 ] + }, + "CPLLRESET": { + "direction": "input", + "bits": [ 252 ] + }, + "DMONFIFORESET": { + "direction": "input", + "bits": [ 253 ] + }, + "DMONITORCLK": { + "direction": "input", + "bits": [ 254 ] + }, + "DRPCLK": { + "direction": "input", + "bits": [ 255 ] + }, + "DRPEN": { + "direction": "input", + "bits": [ 256 ] + }, + "DRPWE": { + "direction": "input", + "bits": [ 257 ] + }, + "EYESCANMODE": { + "direction": "input", + "bits": [ 258 ] + }, + "EYESCANRESET": { + "direction": "input", + "bits": [ 259 ] + }, + "EYESCANTRIGGER": { + "direction": "input", + "bits": [ 260 ] + }, + "GTGREFCLK": { + "direction": "input", + "bits": [ 261 ] + }, + "GTHRXN": { + "direction": "input", + "bits": [ 262 ] + }, + "GTHRXP": { + "direction": "input", + "bits": [ 263 ] + }, + "GTNORTHREFCLK0": { + "direction": "input", + "bits": [ 264 ] + }, + "GTNORTHREFCLK1": { + "direction": "input", + "bits": [ 265 ] + }, + "GTREFCLK0": { + "direction": "input", + "bits": [ 266 ] + }, + "GTREFCLK1": { + "direction": "input", + "bits": [ 267 ] + }, + "GTRESETSEL": { + "direction": "input", + "bits": [ 268 ] + }, + "GTRXRESET": { + "direction": "input", + "bits": [ 269 ] + }, + "GTSOUTHREFCLK0": { + "direction": "input", + "bits": [ 270 ] + }, + "GTSOUTHREFCLK1": { + "direction": "input", + "bits": [ 271 ] + }, + "GTTXRESET": { + "direction": "input", + "bits": [ 272 ] + }, + "QPLLCLK": { + "direction": "input", + "bits": [ 273 ] + }, + "QPLLREFCLK": { + "direction": "input", + "bits": [ 274 ] + }, + "RESETOVRD": { + "direction": "input", + "bits": [ 275 ] + }, + "RX8B10BEN": { + "direction": "input", + "bits": [ 276 ] + }, + "RXBUFRESET": { + "direction": "input", + "bits": [ 277 ] + }, + "RXCDRFREQRESET": { + "direction": "input", + "bits": [ 278 ] + }, + "RXCDRHOLD": { + "direction": "input", + "bits": [ 279 ] + }, + "RXCDROVRDEN": { + "direction": "input", + "bits": [ 280 ] + }, + "RXCDRRESET": { + "direction": "input", + "bits": [ 281 ] + }, + "RXCDRRESETRSV": { + "direction": "input", + "bits": [ 282 ] + }, + "RXCHBONDEN": { + "direction": "input", + "bits": [ 283 ] + }, + "RXCHBONDMASTER": { + "direction": "input", + "bits": [ 284 ] + }, + "RXCHBONDSLAVE": { + "direction": "input", + "bits": [ 285 ] + }, + "RXCOMMADETEN": { + "direction": "input", + "bits": [ 286 ] + }, + "RXDDIEN": { + "direction": "input", + "bits": [ 287 ] + }, + "RXDFEAGCHOLD": { + "direction": "input", + "bits": [ 288 ] + }, + "RXDFEAGCOVRDEN": { + "direction": "input", + "bits": [ 289 ] + }, + "RXDFECM1EN": { + "direction": "input", + "bits": [ 290 ] + }, + "RXDFELFHOLD": { + "direction": "input", + "bits": [ 291 ] + }, + "RXDFELFOVRDEN": { + "direction": "input", + "bits": [ 292 ] + }, + "RXDFELPMRESET": { + "direction": "input", + "bits": [ 293 ] + }, + "RXDFESLIDETAPADAPTEN": { + "direction": "input", + "bits": [ 294 ] + }, + "RXDFESLIDETAPHOLD": { + "direction": "input", + "bits": [ 295 ] + }, + "RXDFESLIDETAPINITOVRDEN": { + "direction": "input", + "bits": [ 296 ] + }, + "RXDFESLIDETAPONLYADAPTEN": { + "direction": "input", + "bits": [ 297 ] + }, + "RXDFESLIDETAPOVRDEN": { + "direction": "input", + "bits": [ 298 ] + }, + "RXDFESLIDETAPSTROBE": { + "direction": "input", + "bits": [ 299 ] + }, + "RXDFETAP2HOLD": { + "direction": "input", + "bits": [ 300 ] + }, + "RXDFETAP2OVRDEN": { + "direction": "input", + "bits": [ 301 ] + }, + "RXDFETAP3HOLD": { + "direction": "input", + "bits": [ 302 ] + }, + "RXDFETAP3OVRDEN": { + "direction": "input", + "bits": [ 303 ] + }, + "RXDFETAP4HOLD": { + "direction": "input", + "bits": [ 304 ] + }, + "RXDFETAP4OVRDEN": { + "direction": "input", + "bits": [ 305 ] + }, + "RXDFETAP5HOLD": { + "direction": "input", + "bits": [ 306 ] + }, + "RXDFETAP5OVRDEN": { + "direction": "input", + "bits": [ 307 ] + }, + "RXDFETAP6HOLD": { + "direction": "input", + "bits": [ 308 ] + }, + "RXDFETAP6OVRDEN": { + "direction": "input", + "bits": [ 309 ] + }, + "RXDFETAP7HOLD": { + "direction": "input", + "bits": [ 310 ] + }, + "RXDFETAP7OVRDEN": { + "direction": "input", + "bits": [ 311 ] + }, + "RXDFEUTHOLD": { + "direction": "input", + "bits": [ 312 ] + }, + "RXDFEUTOVRDEN": { + "direction": "input", + "bits": [ 313 ] + }, + "RXDFEVPHOLD": { + "direction": "input", + "bits": [ 314 ] + }, + "RXDFEVPOVRDEN": { + "direction": "input", + "bits": [ 315 ] + }, + "RXDFEVSEN": { + "direction": "input", + "bits": [ 316 ] + }, + "RXDFEXYDEN": { + "direction": "input", + "bits": [ 317 ] + }, + "RXDLYBYPASS": { + "direction": "input", + "bits": [ 318 ] + }, + "RXDLYEN": { + "direction": "input", + "bits": [ 319 ] + }, + "RXDLYOVRDEN": { + "direction": "input", + "bits": [ 320 ] + }, + "RXDLYSRESET": { + "direction": "input", + "bits": [ 321 ] + }, + "RXGEARBOXSLIP": { + "direction": "input", + "bits": [ 322 ] + }, + "RXLPMEN": { + "direction": "input", + "bits": [ 323 ] + }, + "RXLPMHFHOLD": { + "direction": "input", + "bits": [ 324 ] + }, + "RXLPMHFOVRDEN": { + "direction": "input", + "bits": [ 325 ] + }, + "RXLPMLFHOLD": { + "direction": "input", + "bits": [ 326 ] + }, + "RXLPMLFKLOVRDEN": { + "direction": "input", + "bits": [ 327 ] + }, + "RXMCOMMAALIGNEN": { + "direction": "input", + "bits": [ 328 ] + }, + "RXOOBRESET": { + "direction": "input", + "bits": [ 329 ] + }, + "RXOSCALRESET": { + "direction": "input", + "bits": [ 330 ] + }, + "RXOSHOLD": { + "direction": "input", + "bits": [ 331 ] + }, + "RXOSINTEN": { + "direction": "input", + "bits": [ 332 ] + }, + "RXOSINTHOLD": { + "direction": "input", + "bits": [ 333 ] + }, + "RXOSINTNTRLEN": { + "direction": "input", + "bits": [ 334 ] + }, + "RXOSINTOVRDEN": { + "direction": "input", + "bits": [ 335 ] + }, + "RXOSINTSTROBE": { + "direction": "input", + "bits": [ 336 ] + }, + "RXOSINTTESTOVRDEN": { + "direction": "input", + "bits": [ 337 ] + }, + "RXOSOVRDEN": { + "direction": "input", + "bits": [ 338 ] + }, + "RXPCOMMAALIGNEN": { + "direction": "input", + "bits": [ 339 ] + }, + "RXPCSRESET": { + "direction": "input", + "bits": [ 340 ] + }, + "RXPHALIGN": { + "direction": "input", + "bits": [ 341 ] + }, + "RXPHALIGNEN": { + "direction": "input", + "bits": [ 342 ] + }, + "RXPHDLYPD": { + "direction": "input", + "bits": [ 343 ] + }, + "RXPHDLYRESET": { + "direction": "input", + "bits": [ 344 ] + }, + "RXPHOVRDEN": { + "direction": "input", + "bits": [ 345 ] + }, + "RXPMARESET": { + "direction": "input", + "bits": [ 346 ] + }, + "RXPOLARITY": { + "direction": "input", + "bits": [ 347 ] + }, + "RXPRBSCNTRESET": { + "direction": "input", + "bits": [ 348 ] + }, + "RXQPIEN": { + "direction": "input", + "bits": [ 349 ] + }, + "RXRATEMODE": { + "direction": "input", + "bits": [ 350 ] + }, + "RXSLIDE": { + "direction": "input", + "bits": [ 351 ] + }, + "RXSYNCALLIN": { + "direction": "input", + "bits": [ 352 ] + }, + "RXSYNCIN": { + "direction": "input", + "bits": [ 353 ] + }, + "RXSYNCMODE": { + "direction": "input", + "bits": [ 354 ] + }, + "RXUSERRDY": { + "direction": "input", + "bits": [ 355 ] + }, + "RXUSRCLK2": { + "direction": "input", + "bits": [ 356 ] + }, + "RXUSRCLK": { + "direction": "input", + "bits": [ 357 ] + }, + "SETERRSTATUS": { + "direction": "input", + "bits": [ 358 ] + }, + "SIGVALIDCLK": { + "direction": "input", + "bits": [ 359 ] + }, + "TX8B10BEN": { + "direction": "input", + "bits": [ 360 ] + }, + "TXCOMINIT": { + "direction": "input", + "bits": [ 361 ] + }, + "TXCOMSAS": { + "direction": "input", + "bits": [ 362 ] + }, + "TXCOMWAKE": { + "direction": "input", + "bits": [ 363 ] + }, + "TXDEEMPH": { + "direction": "input", + "bits": [ 364 ] + }, + "TXDETECTRX": { + "direction": "input", + "bits": [ 365 ] + }, + "TXDIFFPD": { + "direction": "input", + "bits": [ 366 ] + }, + "TXDLYBYPASS": { + "direction": "input", + "bits": [ 367 ] + }, + "TXDLYEN": { + "direction": "input", + "bits": [ 368 ] + }, + "TXDLYHOLD": { + "direction": "input", + "bits": [ 369 ] + }, + "TXDLYOVRDEN": { + "direction": "input", + "bits": [ 370 ] + }, + "TXDLYSRESET": { + "direction": "input", + "bits": [ 371 ] + }, + "TXDLYUPDOWN": { + "direction": "input", + "bits": [ 372 ] + }, + "TXELECIDLE": { + "direction": "input", + "bits": [ 373 ] + }, + "TXINHIBIT": { + "direction": "input", + "bits": [ 374 ] + }, + "TXPCSRESET": { + "direction": "input", + "bits": [ 375 ] + }, + "TXPDELECIDLEMODE": { + "direction": "input", + "bits": [ 376 ] + }, + "TXPHALIGN": { + "direction": "input", + "bits": [ 377 ] + }, + "TXPHALIGNEN": { + "direction": "input", + "bits": [ 378 ] + }, + "TXPHDLYPD": { + "direction": "input", + "bits": [ 379 ] + }, + "TXPHDLYRESET": { + "direction": "input", + "bits": [ 380 ] + }, + "TXPHDLYTSTCLK": { + "direction": "input", + "bits": [ 381 ] + }, + "TXPHINIT": { + "direction": "input", + "bits": [ 382 ] + }, + "TXPHOVRDEN": { + "direction": "input", + "bits": [ 383 ] + }, + "TXPIPPMEN": { + "direction": "input", + "bits": [ 384 ] + }, + "TXPIPPMOVRDEN": { + "direction": "input", + "bits": [ 385 ] + }, + "TXPIPPMPD": { + "direction": "input", + "bits": [ 386 ] + }, + "TXPIPPMSEL": { + "direction": "input", + "bits": [ 387 ] + }, + "TXPISOPD": { + "direction": "input", + "bits": [ 388 ] + }, + "TXPMARESET": { + "direction": "input", + "bits": [ 389 ] + }, + "TXPOLARITY": { + "direction": "input", + "bits": [ 390 ] + }, + "TXPOSTCURSORINV": { + "direction": "input", + "bits": [ 391 ] + }, + "TXPRBSFORCEERR": { + "direction": "input", + "bits": [ 392 ] + }, + "TXPRECURSORINV": { + "direction": "input", + "bits": [ 393 ] + }, + "TXQPIBIASEN": { + "direction": "input", + "bits": [ 394 ] + }, + "TXQPISTRONGPDOWN": { + "direction": "input", + "bits": [ 395 ] + }, + "TXQPIWEAKPUP": { + "direction": "input", + "bits": [ 396 ] + }, + "TXRATEMODE": { + "direction": "input", + "bits": [ 397 ] + }, + "TXSTARTSEQ": { + "direction": "input", + "bits": [ 398 ] + }, + "TXSWING": { + "direction": "input", + "bits": [ 399 ] + }, + "TXSYNCALLIN": { + "direction": "input", + "bits": [ 400 ] + }, + "TXSYNCIN": { + "direction": "input", + "bits": [ 401 ] + }, + "TXSYNCMODE": { + "direction": "input", + "bits": [ 402 ] + }, + "TXUSERRDY": { + "direction": "input", + "bits": [ 403 ] + }, + "TXUSRCLK2": { + "direction": "input", + "bits": [ 404 ] + }, + "TXUSRCLK": { + "direction": "input", + "bits": [ 405 ] + }, + "RXADAPTSELTEST": { + "direction": "input", + "bits": [ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419 ] + }, + "DRPDI": { + "direction": "input", + "bits": [ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435 ] + }, + "GTRSVD": { + "direction": "input", + "bits": [ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451 ] + }, + "PCSRSVDIN": { + "direction": "input", + "bits": [ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467 ] + }, + "TSTIN": { + "direction": "input", + "bits": [ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487 ] + }, + "RXELECIDLEMODE": { + "direction": "input", + "bits": [ 488, 489 ] + }, + "RXMONITORSEL": { + "direction": "input", + "bits": [ 490, 491 ] + }, + "RXPD": { + "direction": "input", + "bits": [ 492, 493 ] + }, + "RXSYSCLKSEL": { + "direction": "input", + "bits": [ 494, 495 ] + }, + "TXPD": { + "direction": "input", + "bits": [ 496, 497 ] + }, + "TXSYSCLKSEL": { + "direction": "input", + "bits": [ 498, 499 ] + }, + "CPLLREFCLKSEL": { + "direction": "input", + "bits": [ 500, 501, 502 ] + }, + "LOOPBACK": { + "direction": "input", + "bits": [ 503, 504, 505 ] + }, + "RXCHBONDLEVEL": { + "direction": "input", + "bits": [ 506, 507, 508 ] + }, + "RXOUTCLKSEL": { + "direction": "input", + "bits": [ 509, 510, 511 ] + }, + "RXPRBSSEL": { + "direction": "input", + "bits": [ 512, 513, 514 ] + }, + "RXRATE": { + "direction": "input", + "bits": [ 515, 516, 517 ] + }, + "TXBUFDIFFCTRL": { + "direction": "input", + "bits": [ 518, 519, 520 ] + }, + "TXHEADER": { + "direction": "input", + "bits": [ 521, 522, 523 ] + }, + "TXMARGIN": { + "direction": "input", + "bits": [ 524, 525, 526 ] + }, + "TXOUTCLKSEL": { + "direction": "input", + "bits": [ 527, 528, 529 ] + }, + "TXPRBSSEL": { + "direction": "input", + "bits": [ 530, 531, 532 ] + }, + "TXRATE": { + "direction": "input", + "bits": [ 533, 534, 535 ] + }, + "RXOSINTCFG": { + "direction": "input", + "bits": [ 536, 537, 538, 539 ] + }, + "RXOSINTID0": { + "direction": "input", + "bits": [ 540, 541, 542, 543 ] + }, + "TXDIFFCTRL": { + "direction": "input", + "bits": [ 544, 545, 546, 547 ] + }, + "PCSRSVDIN2": { + "direction": "input", + "bits": [ 548, 549, 550, 551, 552 ] + }, + "PMARSVDIN": { + "direction": "input", + "bits": [ 553, 554, 555, 556, 557 ] + }, + "RXCHBONDI": { + "direction": "input", + "bits": [ 558, 559, 560, 561, 562 ] + }, + "RXDFEAGCTRL": { + "direction": "input", + "bits": [ 563, 564, 565, 566, 567 ] + }, + "RXDFESLIDETAP": { + "direction": "input", + "bits": [ 568, 569, 570, 571, 572 ] + }, + "TXPIPPMSTEPSIZE": { + "direction": "input", + "bits": [ 573, 574, 575, 576, 577 ] + }, + "TXPOSTCURSOR": { + "direction": "input", + "bits": [ 578, 579, 580, 581, 582 ] + }, + "TXPRECURSOR": { + "direction": "input", + "bits": [ 583, 584, 585, 586, 587 ] + }, + "RXDFESLIDETAPID": { + "direction": "input", + "bits": [ 588, 589, 590, 591, 592, 593 ] + }, + "TXDATA": { + "direction": "input", + "bits": [ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657 ] + }, + "TXMAINCURSOR": { + "direction": "input", + "bits": [ 658, 659, 660, 661, 662, 663, 664 ] + }, + "TXSEQUENCE": { + "direction": "input", + "bits": [ 665, 666, 667, 668, 669, 670, 671 ] + }, + "TX8B10BBYPASS": { + "direction": "input", + "bits": [ 672, 673, 674, 675, 676, 677, 678, 679 ] + }, + "TXCHARDISPMODE": { + "direction": "input", + "bits": [ 680, 681, 682, 683, 684, 685, 686, 687 ] + }, + "TXCHARDISPVAL": { + "direction": "input", + "bits": [ 688, 689, 690, 691, 692, 693, 694, 695 ] + }, + "TXCHARISK": { + "direction": "input", + "bits": [ 696, 697, 698, 699, 700, 701, 702, 703 ] + }, + "DRPADDR": { + "direction": "input", + "bits": [ 704, 705, 706, 707, 708, 709, 710, 711, 712 ] + } + }, + "cells": { + }, + "netnames": { + "CFGRESET": { + "hide_name": 0, + "bits": [ 246 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:349" + } + }, + "CLKRSVD0": { + "hide_name": 0, + "bits": [ 247 ], + "attributes": { + "invertible_pin": "IS_CLKRSVD0_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:351" + } + }, + "CLKRSVD1": { + "hide_name": 0, + "bits": [ 248 ], + "attributes": { + "invertible_pin": "IS_CLKRSVD1_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:353" + } + }, + "CPLLFBCLKLOST": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:272" + } + }, + "CPLLLOCK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:273" + } + }, + "CPLLLOCKDETCLK": { + "hide_name": 0, + "bits": [ 249 ], + "attributes": { + "invertible_pin": "IS_CPLLLOCKDETCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:355" + } + }, + "CPLLLOCKEN": { + "hide_name": 0, + "bits": [ 250 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:356" + } + }, + "CPLLPD": { + "hide_name": 0, + "bits": [ 251 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:357" + } + }, + "CPLLREFCLKLOST": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:274" + } + }, + "CPLLREFCLKSEL": { + "hide_name": 0, + "bits": [ 500, 501, 502 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:532" + } + }, + "CPLLRESET": { + "hide_name": 0, + "bits": [ 252 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:358" + } + }, + "DMONFIFORESET": { + "hide_name": 0, + "bits": [ 253 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:359" + } + }, + "DMONITORCLK": { + "hide_name": 0, + "bits": [ 254 ], + "attributes": { + "invertible_pin": "IS_DMONITORCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:361" + } + }, + "DMONITOROUT": { + "hide_name": 0, + "bits": [ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:329" + } + }, + "DRPADDR": { + "hide_name": 0, + "bits": [ 704, 705, 706, 707, 708, 709, 710, 711, 712 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:563" + } + }, + "DRPCLK": { + "hide_name": 0, + "bits": [ 255 ], + "attributes": { + "invertible_pin": "IS_DRPCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:363" + } + }, + "DRPDI": { + "hide_name": 0, + "bits": [ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:522" + } + }, + "DRPDO": { + "hide_name": 0, + "bits": [ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:330" + } + }, + "DRPEN": { + "hide_name": 0, + "bits": [ 256 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:364" + } + }, + "DRPRDY": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:275" + } + }, + "DRPWE": { + "hide_name": 0, + "bits": [ 257 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:365" + } + }, + "EYESCANDATAERROR": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:276" + } + }, + "EYESCANMODE": { + "hide_name": 0, + "bits": [ 258 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:366" + } + }, + "EYESCANRESET": { + "hide_name": 0, + "bits": [ 259 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:367" + } + }, + "EYESCANTRIGGER": { + "hide_name": 0, + "bits": [ 260 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:368" + } + }, + "GTGREFCLK": { + "hide_name": 0, + "bits": [ 261 ], + "attributes": { + "invertible_pin": "IS_GTGREFCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:370" + } + }, + "GTHRXN": { + "hide_name": 0, + "bits": [ 262 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:371" + } + }, + "GTHRXP": { + "hide_name": 0, + "bits": [ 263 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:372" + } + }, + "GTHTXN": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:277" + } + }, + "GTHTXP": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:278" + } + }, + "GTNORTHREFCLK0": { + "hide_name": 0, + "bits": [ 264 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:373" + } + }, + "GTNORTHREFCLK1": { + "hide_name": 0, + "bits": [ 265 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:374" + } + }, + "GTREFCLK0": { + "hide_name": 0, + "bits": [ 266 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:375" + } + }, + "GTREFCLK1": { + "hide_name": 0, + "bits": [ 267 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:376" + } + }, + "GTREFCLKMONITOR": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:279" + } + }, + "GTRESETSEL": { + "hide_name": 0, + "bits": [ 268 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:377" + } + }, + "GTRSVD": { + "hide_name": 0, + "bits": [ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:523" + } + }, + "GTRXRESET": { + "hide_name": 0, + "bits": [ 269 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:378" + } + }, + "GTSOUTHREFCLK0": { + "hide_name": 0, + "bits": [ 270 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:379" + } + }, + "GTSOUTHREFCLK1": { + "hide_name": 0, + "bits": [ 271 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:380" + } + }, + "GTTXRESET": { + "hide_name": 0, + "bits": [ 272 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:381" + } + }, + "LOOPBACK": { + "hide_name": 0, + "bits": [ 503, 504, 505 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:533" + } + }, + "PCSRSVDIN": { + "hide_name": 0, + "bits": [ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:524" + } + }, + "PCSRSVDIN2": { + "hide_name": 0, + "bits": [ 548, 549, 550, 551, 552 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:547" + } + }, + "PCSRSVDOUT": { + "hide_name": 0, + "bits": [ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:331" + } + }, + "PHYSTATUS": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:280" + } + }, + "PMARSVDIN": { + "hide_name": 0, + "bits": [ 553, 554, 555, 556, 557 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:548" + } + }, + "QPLLCLK": { + "hide_name": 0, + "bits": [ 273 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:382" + } + }, + "QPLLREFCLK": { + "hide_name": 0, + "bits": [ 274 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:383" + } + }, + "RESETOVRD": { + "hide_name": 0, + "bits": [ 275 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:384" + } + }, + "RSOSINTDONE": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:281" + } + }, + "RX8B10BEN": { + "hide_name": 0, + "bits": [ 276 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:385" + } + }, + "RXADAPTSELTEST": { + "hide_name": 0, + "bits": [ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:521" + } + }, + "RXBUFRESET": { + "hide_name": 0, + "bits": [ 277 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:386" + } + }, + "RXBUFSTATUS": { + "hide_name": 0, + "bits": [ 116, 117, 118 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:337" + } + }, + "RXBYTEISALIGNED": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:282" + } + }, + "RXBYTEREALIGN": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:283" + } + }, + "RXCDRFREQRESET": { + "hide_name": 0, + "bits": [ 278 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:387" + } + }, + "RXCDRHOLD": { + "hide_name": 0, + "bits": [ 279 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:388" + } + }, + "RXCDRLOCK": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:284" + } + }, + "RXCDROVRDEN": { + "hide_name": 0, + "bits": [ 280 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:389" + } + }, + "RXCDRRESET": { + "hide_name": 0, + "bits": [ 281 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:390" + } + }, + "RXCDRRESETRSV": { + "hide_name": 0, + "bits": [ 282 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:391" + } + }, + "RXCHANBONDSEQ": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:285" + } + }, + "RXCHANISALIGNED": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:286" + } + }, + "RXCHANREALIGN": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:287" + } + }, + "RXCHARISCOMMA": { + "hide_name": 0, + "bits": [ 214, 215, 216, 217, 218, 219, 220, 221 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:345" + } + }, + "RXCHARISK": { + "hide_name": 0, + "bits": [ 222, 223, 224, 225, 226, 227, 228, 229 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:346" + } + }, + "RXCHBONDEN": { + "hide_name": 0, + "bits": [ 283 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:392" + } + }, + "RXCHBONDI": { + "hide_name": 0, + "bits": [ 558, 559, 560, 561, 562 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:549" + } + }, + "RXCHBONDLEVEL": { + "hide_name": 0, + "bits": [ 506, 507, 508 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:534" + } + }, + "RXCHBONDMASTER": { + "hide_name": 0, + "bits": [ 284 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:393" + } + }, + "RXCHBONDO": { + "hide_name": 0, + "bits": [ 122, 123, 124, 125, 126 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:339" + } + }, + "RXCHBONDSLAVE": { + "hide_name": 0, + "bits": [ 285 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:394" + } + }, + "RXCLKCORCNT": { + "hide_name": 0, + "bits": [ 106, 107 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:332" + } + }, + "RXCOMINITDET": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:288" + } + }, + "RXCOMMADET": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:289" + } + }, + "RXCOMMADETEN": { + "hide_name": 0, + "bits": [ 286 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:395" + } + }, + "RXCOMSASDET": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:290" + } + }, + "RXCOMWAKEDET": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:291" + } + }, + "RXDATA": { + "hide_name": 0, + "bits": [ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:343" + } + }, + "RXDATAVALID": { + "hide_name": 0, + "bits": [ 108, 109 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:333" + } + }, + "RXDDIEN": { + "hide_name": 0, + "bits": [ 287 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:396" + } + }, + "RXDFEAGCHOLD": { + "hide_name": 0, + "bits": [ 288 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:397" + } + }, + "RXDFEAGCOVRDEN": { + "hide_name": 0, + "bits": [ 289 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:398" + } + }, + "RXDFEAGCTRL": { + "hide_name": 0, + "bits": [ 563, 564, 565, 566, 567 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:550" + } + }, + "RXDFECM1EN": { + "hide_name": 0, + "bits": [ 290 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:399" + } + }, + "RXDFELFHOLD": { + "hide_name": 0, + "bits": [ 291 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:400" + } + }, + "RXDFELFOVRDEN": { + "hide_name": 0, + "bits": [ 292 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:401" + } + }, + "RXDFELPMRESET": { + "hide_name": 0, + "bits": [ 293 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:402" + } + }, + "RXDFESLIDETAP": { + "hide_name": 0, + "bits": [ 568, 569, 570, 571, 572 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:551" + } + }, + "RXDFESLIDETAPADAPTEN": { + "hide_name": 0, + "bits": [ 294 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:403" + } + }, + "RXDFESLIDETAPHOLD": { + "hide_name": 0, + "bits": [ 295 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:404" + } + }, + "RXDFESLIDETAPID": { + "hide_name": 0, + "bits": [ 588, 589, 590, 591, 592, 593 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:555" + } + }, + "RXDFESLIDETAPINITOVRDEN": { + "hide_name": 0, + "bits": [ 296 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:405" + } + }, + "RXDFESLIDETAPONLYADAPTEN": { + "hide_name": 0, + "bits": [ 297 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:406" + } + }, + "RXDFESLIDETAPOVRDEN": { + "hide_name": 0, + "bits": [ 298 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:407" + } + }, + "RXDFESLIDETAPSTARTED": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:292" + } + }, + "RXDFESLIDETAPSTROBE": { + "hide_name": 0, + "bits": [ 299 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:408" + } + }, + "RXDFESLIDETAPSTROBEDONE": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:293" + } + }, + "RXDFESLIDETAPSTROBESTARTED": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:294" + } + }, + "RXDFESTADAPTDONE": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:295" + } + }, + "RXDFETAP2HOLD": { + "hide_name": 0, + "bits": [ 300 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:409" + } + }, + "RXDFETAP2OVRDEN": { + "hide_name": 0, + "bits": [ 301 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:410" + } + }, + "RXDFETAP3HOLD": { + "hide_name": 0, + "bits": [ 302 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:411" + } + }, + "RXDFETAP3OVRDEN": { + "hide_name": 0, + "bits": [ 303 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:412" + } + }, + "RXDFETAP4HOLD": { + "hide_name": 0, + "bits": [ 304 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:413" + } + }, + "RXDFETAP4OVRDEN": { + "hide_name": 0, + "bits": [ 305 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:414" + } + }, + "RXDFETAP5HOLD": { + "hide_name": 0, + "bits": [ 306 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:415" + } + }, + "RXDFETAP5OVRDEN": { + "hide_name": 0, + "bits": [ 307 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:416" + } + }, + "RXDFETAP6HOLD": { + "hide_name": 0, + "bits": [ 308 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:417" + } + }, + "RXDFETAP6OVRDEN": { + "hide_name": 0, + "bits": [ 309 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:418" + } + }, + "RXDFETAP7HOLD": { + "hide_name": 0, + "bits": [ 310 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:419" + } + }, + "RXDFETAP7OVRDEN": { + "hide_name": 0, + "bits": [ 311 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:420" + } + }, + "RXDFEUTHOLD": { + "hide_name": 0, + "bits": [ 312 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:421" + } + }, + "RXDFEUTOVRDEN": { + "hide_name": 0, + "bits": [ 313 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:422" + } + }, + "RXDFEVPHOLD": { + "hide_name": 0, + "bits": [ 314 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:423" + } + }, + "RXDFEVPOVRDEN": { + "hide_name": 0, + "bits": [ 315 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:424" + } + }, + "RXDFEVSEN": { + "hide_name": 0, + "bits": [ 316 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:425" + } + }, + "RXDFEXYDEN": { + "hide_name": 0, + "bits": [ 317 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:426" + } + }, + "RXDISPERR": { + "hide_name": 0, + "bits": [ 230, 231, 232, 233, 234, 235, 236, 237 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:347" + } + }, + "RXDLYBYPASS": { + "hide_name": 0, + "bits": [ 318 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:427" + } + }, + "RXDLYEN": { + "hide_name": 0, + "bits": [ 319 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:428" + } + }, + "RXDLYOVRDEN": { + "hide_name": 0, + "bits": [ 320 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:429" + } + }, + "RXDLYSRESET": { + "hide_name": 0, + "bits": [ 321 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:430" + } + }, + "RXDLYSRESETDONE": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:296" + } + }, + "RXELECIDLE": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:297" + } + }, + "RXELECIDLEMODE": { + "hide_name": 0, + "bits": [ 488, 489 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:526" + } + }, + "RXGEARBOXSLIP": { + "hide_name": 0, + "bits": [ 322 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:431" + } + }, + "RXHEADER": { + "hide_name": 0, + "bits": [ 137, 138, 139, 140, 141, 142 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:342" + } + }, + "RXHEADERVALID": { + "hide_name": 0, + "bits": [ 110, 111 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:334" + } + }, + "RXLPMEN": { + "hide_name": 0, + "bits": [ 323 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:432" + } + }, + "RXLPMHFHOLD": { + "hide_name": 0, + "bits": [ 324 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:433" + } + }, + "RXLPMHFOVRDEN": { + "hide_name": 0, + "bits": [ 325 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:434" + } + }, + "RXLPMLFHOLD": { + "hide_name": 0, + "bits": [ 326 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:435" + } + }, + "RXLPMLFKLOVRDEN": { + "hide_name": 0, + "bits": [ 327 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:436" + } + }, + "RXMCOMMAALIGNEN": { + "hide_name": 0, + "bits": [ 328 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:437" + } + }, + "RXMONITOROUT": { + "hide_name": 0, + "bits": [ 207, 208, 209, 210, 211, 212, 213 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:344" + } + }, + "RXMONITORSEL": { + "hide_name": 0, + "bits": [ 490, 491 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:527" + } + }, + "RXNOTINTABLE": { + "hide_name": 0, + "bits": [ 238, 239, 240, 241, 242, 243, 244, 245 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:348" + } + }, + "RXOOBRESET": { + "hide_name": 0, + "bits": [ 329 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:438" + } + }, + "RXOSCALRESET": { + "hide_name": 0, + "bits": [ 330 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:439" + } + }, + "RXOSHOLD": { + "hide_name": 0, + "bits": [ 331 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:440" + } + }, + "RXOSINTCFG": { + "hide_name": 0, + "bits": [ 536, 537, 538, 539 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:544" + } + }, + "RXOSINTEN": { + "hide_name": 0, + "bits": [ 332 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:441" + } + }, + "RXOSINTHOLD": { + "hide_name": 0, + "bits": [ 333 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:442" + } + }, + "RXOSINTID0": { + "hide_name": 0, + "bits": [ 540, 541, 542, 543 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:545" + } + }, + "RXOSINTNTRLEN": { + "hide_name": 0, + "bits": [ 334 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:443" + } + }, + "RXOSINTOVRDEN": { + "hide_name": 0, + "bits": [ 335 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:444" + } + }, + "RXOSINTSTARTED": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:298" + } + }, + "RXOSINTSTROBE": { + "hide_name": 0, + "bits": [ 336 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:445" + } + }, + "RXOSINTSTROBEDONE": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:299" + } + }, + "RXOSINTSTROBESTARTED": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:300" + } + }, + "RXOSINTTESTOVRDEN": { + "hide_name": 0, + "bits": [ 337 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:446" + } + }, + "RXOSOVRDEN": { + "hide_name": 0, + "bits": [ 338 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:447" + } + }, + "RXOUTCLK": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:301" + } + }, + "RXOUTCLKFABRIC": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:302" + } + }, + "RXOUTCLKPCS": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:303" + } + }, + "RXOUTCLKSEL": { + "hide_name": 0, + "bits": [ 509, 510, 511 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:535" + } + }, + "RXPCOMMAALIGNEN": { + "hide_name": 0, + "bits": [ 339 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:448" + } + }, + "RXPCSRESET": { + "hide_name": 0, + "bits": [ 340 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:449" + } + }, + "RXPD": { + "hide_name": 0, + "bits": [ 492, 493 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:528" + } + }, + "RXPHALIGN": { + "hide_name": 0, + "bits": [ 341 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:450" + } + }, + "RXPHALIGNDONE": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:304" + } + }, + "RXPHALIGNEN": { + "hide_name": 0, + "bits": [ 342 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:451" + } + }, + "RXPHDLYPD": { + "hide_name": 0, + "bits": [ 343 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:452" + } + }, + "RXPHDLYRESET": { + "hide_name": 0, + "bits": [ 344 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:453" + } + }, + "RXPHMONITOR": { + "hide_name": 0, + "bits": [ 127, 128, 129, 130, 131 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:340" + } + }, + "RXPHOVRDEN": { + "hide_name": 0, + "bits": [ 345 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:454" + } + }, + "RXPHSLIPMONITOR": { + "hide_name": 0, + "bits": [ 132, 133, 134, 135, 136 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:341" + } + }, + "RXPMARESET": { + "hide_name": 0, + "bits": [ 346 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:455" + } + }, + "RXPMARESETDONE": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:305" + } + }, + "RXPOLARITY": { + "hide_name": 0, + "bits": [ 347 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:456" + } + }, + "RXPRBSCNTRESET": { + "hide_name": 0, + "bits": [ 348 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:457" + } + }, + "RXPRBSERR": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:306" + } + }, + "RXPRBSSEL": { + "hide_name": 0, + "bits": [ 512, 513, 514 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:536" + } + }, + "RXQPIEN": { + "hide_name": 0, + "bits": [ 349 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:458" + } + }, + "RXQPISENN": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:307" + } + }, + "RXQPISENP": { + "hide_name": 0, + "bits": [ 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:308" + } + }, + "RXRATE": { + "hide_name": 0, + "bits": [ 515, 516, 517 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:537" + } + }, + "RXRATEDONE": { + "hide_name": 0, + "bits": [ 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:309" + } + }, + "RXRATEMODE": { + "hide_name": 0, + "bits": [ 350 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:459" + } + }, + "RXRESETDONE": { + "hide_name": 0, + "bits": [ 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:310" + } + }, + "RXSLIDE": { + "hide_name": 0, + "bits": [ 351 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:460" + } + }, + "RXSTARTOFSEQ": { + "hide_name": 0, + "bits": [ 112, 113 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:335" + } + }, + "RXSTATUS": { + "hide_name": 0, + "bits": [ 119, 120, 121 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:338" + } + }, + "RXSYNCALLIN": { + "hide_name": 0, + "bits": [ 352 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:461" + } + }, + "RXSYNCDONE": { + "hide_name": 0, + "bits": [ 41 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:311" + } + }, + "RXSYNCIN": { + "hide_name": 0, + "bits": [ 353 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:462" + } + }, + "RXSYNCMODE": { + "hide_name": 0, + "bits": [ 354 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:463" + } + }, + "RXSYNCOUT": { + "hide_name": 0, + "bits": [ 42 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:312" + } + }, + "RXSYSCLKSEL": { + "hide_name": 0, + "bits": [ 494, 495 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:529" + } + }, + "RXUSERRDY": { + "hide_name": 0, + "bits": [ 355 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:464" + } + }, + "RXUSRCLK": { + "hide_name": 0, + "bits": [ 357 ], + "attributes": { + "invertible_pin": "IS_RXUSRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:468" + } + }, + "RXUSRCLK2": { + "hide_name": 0, + "bits": [ 356 ], + "attributes": { + "invertible_pin": "IS_RXUSRCLK2_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:466" + } + }, + "RXVALID": { + "hide_name": 0, + "bits": [ 43 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:313" + } + }, + "SETERRSTATUS": { + "hide_name": 0, + "bits": [ 358 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:469" + } + }, + "SIGVALIDCLK": { + "hide_name": 0, + "bits": [ 359 ], + "attributes": { + "invertible_pin": "IS_SIGVALIDCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:471" + } + }, + "TSTIN": { + "hide_name": 0, + "bits": [ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:525" + } + }, + "TX8B10BBYPASS": { + "hide_name": 0, + "bits": [ 672, 673, 674, 675, 676, 677, 678, 679 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:559" + } + }, + "TX8B10BEN": { + "hide_name": 0, + "bits": [ 360 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:472" + } + }, + "TXBUFDIFFCTRL": { + "hide_name": 0, + "bits": [ 518, 519, 520 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:538" + } + }, + "TXBUFSTATUS": { + "hide_name": 0, + "bits": [ 114, 115 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:336" + } + }, + "TXCHARDISPMODE": { + "hide_name": 0, + "bits": [ 680, 681, 682, 683, 684, 685, 686, 687 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:560" + } + }, + "TXCHARDISPVAL": { + "hide_name": 0, + "bits": [ 688, 689, 690, 691, 692, 693, 694, 695 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:561" + } + }, + "TXCHARISK": { + "hide_name": 0, + "bits": [ 696, 697, 698, 699, 700, 701, 702, 703 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:562" + } + }, + "TXCOMFINISH": { + "hide_name": 0, + "bits": [ 44 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:314" + } + }, + "TXCOMINIT": { + "hide_name": 0, + "bits": [ 361 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:473" + } + }, + "TXCOMSAS": { + "hide_name": 0, + "bits": [ 362 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:474" + } + }, + "TXCOMWAKE": { + "hide_name": 0, + "bits": [ 363 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:475" + } + }, + "TXDATA": { + "hide_name": 0, + "bits": [ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:556" + } + }, + "TXDEEMPH": { + "hide_name": 0, + "bits": [ 364 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:476" + } + }, + "TXDETECTRX": { + "hide_name": 0, + "bits": [ 365 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:477" + } + }, + "TXDIFFCTRL": { + "hide_name": 0, + "bits": [ 544, 545, 546, 547 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:546" + } + }, + "TXDIFFPD": { + "hide_name": 0, + "bits": [ 366 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:478" + } + }, + "TXDLYBYPASS": { + "hide_name": 0, + "bits": [ 367 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:479" + } + }, + "TXDLYEN": { + "hide_name": 0, + "bits": [ 368 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:480" + } + }, + "TXDLYHOLD": { + "hide_name": 0, + "bits": [ 369 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:481" + } + }, + "TXDLYOVRDEN": { + "hide_name": 0, + "bits": [ 370 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:482" + } + }, + "TXDLYSRESET": { + "hide_name": 0, + "bits": [ 371 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:483" + } + }, + "TXDLYSRESETDONE": { + "hide_name": 0, + "bits": [ 45 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:315" + } + }, + "TXDLYUPDOWN": { + "hide_name": 0, + "bits": [ 372 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:484" + } + }, + "TXELECIDLE": { + "hide_name": 0, + "bits": [ 373 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:485" + } + }, + "TXGEARBOXREADY": { + "hide_name": 0, + "bits": [ 46 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:316" + } + }, + "TXHEADER": { + "hide_name": 0, + "bits": [ 521, 522, 523 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:539" + } + }, + "TXINHIBIT": { + "hide_name": 0, + "bits": [ 374 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:486" + } + }, + "TXMAINCURSOR": { + "hide_name": 0, + "bits": [ 658, 659, 660, 661, 662, 663, 664 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:557" + } + }, + "TXMARGIN": { + "hide_name": 0, + "bits": [ 524, 525, 526 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:540" + } + }, + "TXOUTCLK": { + "hide_name": 0, + "bits": [ 47 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:317" + } + }, + "TXOUTCLKFABRIC": { + "hide_name": 0, + "bits": [ 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:318" + } + }, + "TXOUTCLKPCS": { + "hide_name": 0, + "bits": [ 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:319" + } + }, + "TXOUTCLKSEL": { + "hide_name": 0, + "bits": [ 527, 528, 529 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:541" + } + }, + "TXPCSRESET": { + "hide_name": 0, + "bits": [ 375 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:487" + } + }, + "TXPD": { + "hide_name": 0, + "bits": [ 496, 497 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:530" + } + }, + "TXPDELECIDLEMODE": { + "hide_name": 0, + "bits": [ 376 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:488" + } + }, + "TXPHALIGN": { + "hide_name": 0, + "bits": [ 377 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:489" + } + }, + "TXPHALIGNDONE": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:320" + } + }, + "TXPHALIGNEN": { + "hide_name": 0, + "bits": [ 378 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:490" + } + }, + "TXPHDLYPD": { + "hide_name": 0, + "bits": [ 379 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:491" + } + }, + "TXPHDLYRESET": { + "hide_name": 0, + "bits": [ 380 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:492" + } + }, + "TXPHDLYTSTCLK": { + "hide_name": 0, + "bits": [ 381 ], + "attributes": { + "invertible_pin": "IS_TXPHDLYTSTCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:494" + } + }, + "TXPHINIT": { + "hide_name": 0, + "bits": [ 382 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:495" + } + }, + "TXPHINITDONE": { + "hide_name": 0, + "bits": [ 51 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:321" + } + }, + "TXPHOVRDEN": { + "hide_name": 0, + "bits": [ 383 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:496" + } + }, + "TXPIPPMEN": { + "hide_name": 0, + "bits": [ 384 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:497" + } + }, + "TXPIPPMOVRDEN": { + "hide_name": 0, + "bits": [ 385 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:498" + } + }, + "TXPIPPMPD": { + "hide_name": 0, + "bits": [ 386 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:499" + } + }, + "TXPIPPMSEL": { + "hide_name": 0, + "bits": [ 387 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:500" + } + }, + "TXPIPPMSTEPSIZE": { + "hide_name": 0, + "bits": [ 573, 574, 575, 576, 577 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:552" + } + }, + "TXPISOPD": { + "hide_name": 0, + "bits": [ 388 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:501" + } + }, + "TXPMARESET": { + "hide_name": 0, + "bits": [ 389 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:502" + } + }, + "TXPMARESETDONE": { + "hide_name": 0, + "bits": [ 52 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:322" + } + }, + "TXPOLARITY": { + "hide_name": 0, + "bits": [ 390 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:503" + } + }, + "TXPOSTCURSOR": { + "hide_name": 0, + "bits": [ 578, 579, 580, 581, 582 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:553" + } + }, + "TXPOSTCURSORINV": { + "hide_name": 0, + "bits": [ 391 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:504" + } + }, + "TXPRBSFORCEERR": { + "hide_name": 0, + "bits": [ 392 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:505" + } + }, + "TXPRBSSEL": { + "hide_name": 0, + "bits": [ 530, 531, 532 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:542" + } + }, + "TXPRECURSOR": { + "hide_name": 0, + "bits": [ 583, 584, 585, 586, 587 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:554" + } + }, + "TXPRECURSORINV": { + "hide_name": 0, + "bits": [ 393 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:506" + } + }, + "TXQPIBIASEN": { + "hide_name": 0, + "bits": [ 394 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:507" + } + }, + "TXQPISENN": { + "hide_name": 0, + "bits": [ 53 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:323" + } + }, + "TXQPISENP": { + "hide_name": 0, + "bits": [ 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:324" + } + }, + "TXQPISTRONGPDOWN": { + "hide_name": 0, + "bits": [ 395 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:508" + } + }, + "TXQPIWEAKPUP": { + "hide_name": 0, + "bits": [ 396 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:509" + } + }, + "TXRATE": { + "hide_name": 0, + "bits": [ 533, 534, 535 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:543" + } + }, + "TXRATEDONE": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:325" + } + }, + "TXRATEMODE": { + "hide_name": 0, + "bits": [ 397 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:510" + } + }, + "TXRESETDONE": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:326" + } + }, + "TXSEQUENCE": { + "hide_name": 0, + "bits": [ 665, 666, 667, 668, 669, 670, 671 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:558" + } + }, + "TXSTARTSEQ": { + "hide_name": 0, + "bits": [ 398 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:511" + } + }, + "TXSWING": { + "hide_name": 0, + "bits": [ 399 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:512" + } + }, + "TXSYNCALLIN": { + "hide_name": 0, + "bits": [ 400 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:513" + } + }, + "TXSYNCDONE": { + "hide_name": 0, + "bits": [ 57 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:327" + } + }, + "TXSYNCIN": { + "hide_name": 0, + "bits": [ 401 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:514" + } + }, + "TXSYNCMODE": { + "hide_name": 0, + "bits": [ 402 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:515" + } + }, + "TXSYNCOUT": { + "hide_name": 0, + "bits": [ 58 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:328" + } + }, + "TXSYSCLKSEL": { + "hide_name": 0, + "bits": [ 498, 499 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:531" + } + }, + "TXUSERRDY": { + "hide_name": 0, + "bits": [ 403 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:516" + } + }, + "TXUSRCLK": { + "hide_name": 0, + "bits": [ 405 ], + "attributes": { + "invertible_pin": "IS_TXUSRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:520" + } + }, + "TXUSRCLK2": { + "hide_name": 0, + "bits": [ 404 ], + "attributes": { + "invertible_pin": "IS_TXUSRCLK2_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:518" + } + } + } + }, + "GTHE2_COMMON": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:566" + }, + "ports": { + "DRPRDY": { + "direction": "output", + "bits": [ 2 ] + }, + "QPLLFBCLKLOST": { + "direction": "output", + "bits": [ 3 ] + }, + "QPLLLOCK": { + "direction": "output", + "bits": [ 4 ] + }, + "QPLLOUTCLK": { + "direction": "output", + "bits": [ 5 ] + }, + "QPLLOUTREFCLK": { + "direction": "output", + "bits": [ 6 ] + }, + "QPLLREFCLKLOST": { + "direction": "output", + "bits": [ 7 ] + }, + "REFCLKOUTMONITOR": { + "direction": "output", + "bits": [ 8 ] + }, + "DRPDO": { + "direction": "output", + "bits": [ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ] + }, + "PMARSVDOUT": { + "direction": "output", + "bits": [ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 ] + }, + "QPLLDMONITOR": { + "direction": "output", + "bits": [ 41, 42, 43, 44, 45, 46, 47, 48 ] + }, + "BGBYPASSB": { + "direction": "input", + "bits": [ 49 ] + }, + "BGMONITORENB": { + "direction": "input", + "bits": [ 50 ] + }, + "BGPDB": { + "direction": "input", + "bits": [ 51 ] + }, + "BGRCALOVRDENB": { + "direction": "input", + "bits": [ 52 ] + }, + "DRPCLK": { + "direction": "input", + "bits": [ 53 ] + }, + "DRPEN": { + "direction": "input", + "bits": [ 54 ] + }, + "DRPWE": { + "direction": "input", + "bits": [ 55 ] + }, + "GTGREFCLK": { + "direction": "input", + "bits": [ 56 ] + }, + "GTNORTHREFCLK0": { + "direction": "input", + "bits": [ 57 ] + }, + "GTNORTHREFCLK1": { + "direction": "input", + "bits": [ 58 ] + }, + "GTREFCLK0": { + "direction": "input", + "bits": [ 59 ] + }, + "GTREFCLK1": { + "direction": "input", + "bits": [ 60 ] + }, + "GTSOUTHREFCLK0": { + "direction": "input", + "bits": [ 61 ] + }, + "GTSOUTHREFCLK1": { + "direction": "input", + "bits": [ 62 ] + }, + "QPLLLOCKDETCLK": { + "direction": "input", + "bits": [ 63 ] + }, + "QPLLLOCKEN": { + "direction": "input", + "bits": [ 64 ] + }, + "QPLLOUTRESET": { + "direction": "input", + "bits": [ 65 ] + }, + "QPLLPD": { + "direction": "input", + "bits": [ 66 ] + }, + "QPLLRESET": { + "direction": "input", + "bits": [ 67 ] + }, + "RCALENB": { + "direction": "input", + "bits": [ 68 ] + }, + "DRPDI": { + "direction": "input", + "bits": [ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84 ] + }, + "QPLLRSVD1": { + "direction": "input", + "bits": [ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100 ] + }, + "QPLLREFCLKSEL": { + "direction": "input", + "bits": [ 101, 102, 103 ] + }, + "BGRCALOVRD": { + "direction": "input", + "bits": [ 104, 105, 106, 107, 108 ] + }, + "QPLLRSVD2": { + "direction": "input", + "bits": [ 109, 110, 111, 112, 113 ] + }, + "DRPADDR": { + "direction": "input", + "bits": [ 114, 115, 116, 117, 118, 119, 120, 121 ] + }, + "PMARSVD": { + "direction": "input", + "bits": [ 122, 123, 124, 125, 126, 127, 128, 129 ] + } + }, + "cells": { + }, + "netnames": { + "BGBYPASSB": { + "hide_name": 0, + "bits": [ 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:604" + } + }, + "BGMONITORENB": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:605" + } + }, + "BGPDB": { + "hide_name": 0, + "bits": [ 51 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:606" + } + }, + "BGRCALOVRD": { + "hide_name": 0, + "bits": [ 104, 105, 106, 107, 108 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:630" + } + }, + "BGRCALOVRDENB": { + "hide_name": 0, + "bits": [ 52 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:607" + } + }, + "DRPADDR": { + "hide_name": 0, + "bits": [ 114, 115, 116, 117, 118, 119, 120, 121 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:632" + } + }, + "DRPCLK": { + "hide_name": 0, + "bits": [ 53 ], + "attributes": { + "invertible_pin": "IS_DRPCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:609" + } + }, + "DRPDI": { + "hide_name": 0, + "bits": [ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:627" + } + }, + "DRPDO": { + "hide_name": 0, + "bits": [ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:601" + } + }, + "DRPEN": { + "hide_name": 0, + "bits": [ 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:610" + } + }, + "DRPRDY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:594" + } + }, + "DRPWE": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:611" + } + }, + "GTGREFCLK": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "invertible_pin": "IS_GTGREFCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:613" + } + }, + "GTNORTHREFCLK0": { + "hide_name": 0, + "bits": [ 57 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:614" + } + }, + "GTNORTHREFCLK1": { + "hide_name": 0, + "bits": [ 58 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:615" + } + }, + "GTREFCLK0": { + "hide_name": 0, + "bits": [ 59 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:616" + } + }, + "GTREFCLK1": { + "hide_name": 0, + "bits": [ 60 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:617" + } + }, + "GTSOUTHREFCLK0": { + "hide_name": 0, + "bits": [ 61 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:618" + } + }, + "GTSOUTHREFCLK1": { + "hide_name": 0, + "bits": [ 62 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:619" + } + }, + "PMARSVD": { + "hide_name": 0, + "bits": [ 122, 123, 124, 125, 126, 127, 128, 129 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:633" + } + }, + "PMARSVDOUT": { + "hide_name": 0, + "bits": [ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:602" + } + }, + "QPLLDMONITOR": { + "hide_name": 0, + "bits": [ 41, 42, 43, 44, 45, 46, 47, 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:603" + } + }, + "QPLLFBCLKLOST": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:595" + } + }, + "QPLLLOCK": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:596" + } + }, + "QPLLLOCKDETCLK": { + "hide_name": 0, + "bits": [ 63 ], + "attributes": { + "invertible_pin": "IS_QPLLLOCKDETCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:621" + } + }, + "QPLLLOCKEN": { + "hide_name": 0, + "bits": [ 64 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:622" + } + }, + "QPLLOUTCLK": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:597" + } + }, + "QPLLOUTREFCLK": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:598" + } + }, + "QPLLOUTRESET": { + "hide_name": 0, + "bits": [ 65 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:623" + } + }, + "QPLLPD": { + "hide_name": 0, + "bits": [ 66 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:624" + } + }, + "QPLLREFCLKLOST": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:599" + } + }, + "QPLLREFCLKSEL": { + "hide_name": 0, + "bits": [ 101, 102, 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:629" + } + }, + "QPLLRESET": { + "hide_name": 0, + "bits": [ 67 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:625" + } + }, + "QPLLRSVD1": { + "hide_name": 0, + "bits": [ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:628" + } + }, + "QPLLRSVD2": { + "hide_name": 0, + "bits": [ 109, 110, 111, 112, 113 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:631" + } + }, + "RCALENB": { + "hide_name": 0, + "bits": [ 68 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:626" + } + }, + "REFCLKOUTMONITOR": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:600" + } + } + } + }, + "GTPE2_CHANNEL": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:636" + }, + "ports": { + "DRPRDY": { + "direction": "output", + "bits": [ 2 ] + }, + "EYESCANDATAERROR": { + "direction": "output", + "bits": [ 3 ] + }, + "GTPTXN": { + "direction": "output", + "bits": [ 4 ] + }, + "GTPTXP": { + "direction": "output", + "bits": [ 5 ] + }, + "PHYSTATUS": { + "direction": "output", + "bits": [ 6 ] + }, + "PMARSVDOUT0": { + "direction": "output", + "bits": [ 7 ] + }, + "PMARSVDOUT1": { + "direction": "output", + "bits": [ 8 ] + }, + "RXBYTEISALIGNED": { + "direction": "output", + "bits": [ 9 ] + }, + "RXBYTEREALIGN": { + "direction": "output", + "bits": [ 10 ] + }, + "RXCDRLOCK": { + "direction": "output", + "bits": [ 11 ] + }, + "RXCHANBONDSEQ": { + "direction": "output", + "bits": [ 12 ] + }, + "RXCHANISALIGNED": { + "direction": "output", + "bits": [ 13 ] + }, + "RXCHANREALIGN": { + "direction": "output", + "bits": [ 14 ] + }, + "RXCOMINITDET": { + "direction": "output", + "bits": [ 15 ] + }, + "RXCOMMADET": { + "direction": "output", + "bits": [ 16 ] + }, + "RXCOMSASDET": { + "direction": "output", + "bits": [ 17 ] + }, + "RXCOMWAKEDET": { + "direction": "output", + "bits": [ 18 ] + }, + "RXDLYSRESETDONE": { + "direction": "output", + "bits": [ 19 ] + }, + "RXELECIDLE": { + "direction": "output", + "bits": [ 20 ] + }, + "RXHEADERVALID": { + "direction": "output", + "bits": [ 21 ] + }, + "RXOSINTDONE": { + "direction": "output", + "bits": [ 22 ] + }, + "RXOSINTSTARTED": { + "direction": "output", + "bits": [ 23 ] + }, + "RXOSINTSTROBEDONE": { + "direction": "output", + "bits": [ 24 ] + }, + "RXOSINTSTROBESTARTED": { + "direction": "output", + "bits": [ 25 ] + }, + "RXOUTCLK": { + "direction": "output", + "bits": [ 26 ] + }, + "RXOUTCLKFABRIC": { + "direction": "output", + "bits": [ 27 ] + }, + "RXOUTCLKPCS": { + "direction": "output", + "bits": [ 28 ] + }, + "RXPHALIGNDONE": { + "direction": "output", + "bits": [ 29 ] + }, + "RXPMARESETDONE": { + "direction": "output", + "bits": [ 30 ] + }, + "RXPRBSERR": { + "direction": "output", + "bits": [ 31 ] + }, + "RXRATEDONE": { + "direction": "output", + "bits": [ 32 ] + }, + "RXRESETDONE": { + "direction": "output", + "bits": [ 33 ] + }, + "RXSYNCDONE": { + "direction": "output", + "bits": [ 34 ] + }, + "RXSYNCOUT": { + "direction": "output", + "bits": [ 35 ] + }, + "RXVALID": { + "direction": "output", + "bits": [ 36 ] + }, + "TXCOMFINISH": { + "direction": "output", + "bits": [ 37 ] + }, + "TXDLYSRESETDONE": { + "direction": "output", + "bits": [ 38 ] + }, + "TXGEARBOXREADY": { + "direction": "output", + "bits": [ 39 ] + }, + "TXOUTCLK": { + "direction": "output", + "bits": [ 40 ] + }, + "TXOUTCLKFABRIC": { + "direction": "output", + "bits": [ 41 ] + }, + "TXOUTCLKPCS": { + "direction": "output", + "bits": [ 42 ] + }, + "TXPHALIGNDONE": { + "direction": "output", + "bits": [ 43 ] + }, + "TXPHINITDONE": { + "direction": "output", + "bits": [ 44 ] + }, + "TXPMARESETDONE": { + "direction": "output", + "bits": [ 45 ] + }, + "TXRATEDONE": { + "direction": "output", + "bits": [ 46 ] + }, + "TXRESETDONE": { + "direction": "output", + "bits": [ 47 ] + }, + "TXSYNCDONE": { + "direction": "output", + "bits": [ 48 ] + }, + "TXSYNCOUT": { + "direction": "output", + "bits": [ 49 ] + }, + "DMONITOROUT": { + "direction": "output", + "bits": [ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ] + }, + "DRPDO": { + "direction": "output", + "bits": [ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 ] + }, + "PCSRSVDOUT": { + "direction": "output", + "bits": [ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 ] + }, + "RXCLKCORCNT": { + "direction": "output", + "bits": [ 97, 98 ] + }, + "RXDATAVALID": { + "direction": "output", + "bits": [ 99, 100 ] + }, + "RXSTARTOFSEQ": { + "direction": "output", + "bits": [ 101, 102 ] + }, + "TXBUFSTATUS": { + "direction": "output", + "bits": [ 103, 104 ] + }, + "RXBUFSTATUS": { + "direction": "output", + "bits": [ 105, 106, 107 ] + }, + "RXHEADER": { + "direction": "output", + "bits": [ 108, 109, 110 ] + }, + "RXSTATUS": { + "direction": "output", + "bits": [ 111, 112, 113 ] + }, + "RXDATA": { + "direction": "output", + "bits": [ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145 ] + }, + "RXCHARISCOMMA": { + "direction": "output", + "bits": [ 146, 147, 148, 149 ] + }, + "RXCHARISK": { + "direction": "output", + "bits": [ 150, 151, 152, 153 ] + }, + "RXCHBONDO": { + "direction": "output", + "bits": [ 154, 155, 156, 157 ] + }, + "RXDISPERR": { + "direction": "output", + "bits": [ 158, 159, 160, 161 ] + }, + "RXNOTINTABLE": { + "direction": "output", + "bits": [ 162, 163, 164, 165 ] + }, + "RXPHMONITOR": { + "direction": "output", + "bits": [ 166, 167, 168, 169, 170 ] + }, + "RXPHSLIPMONITOR": { + "direction": "output", + "bits": [ 171, 172, 173, 174, 175 ] + }, + "CFGRESET": { + "direction": "input", + "bits": [ 176 ] + }, + "CLKRSVD0": { + "direction": "input", + "bits": [ 177 ] + }, + "CLKRSVD1": { + "direction": "input", + "bits": [ 178 ] + }, + "DMONFIFORESET": { + "direction": "input", + "bits": [ 179 ] + }, + "DMONITORCLK": { + "direction": "input", + "bits": [ 180 ] + }, + "DRPCLK": { + "direction": "input", + "bits": [ 181 ] + }, + "DRPEN": { + "direction": "input", + "bits": [ 182 ] + }, + "DRPWE": { + "direction": "input", + "bits": [ 183 ] + }, + "EYESCANMODE": { + "direction": "input", + "bits": [ 184 ] + }, + "EYESCANRESET": { + "direction": "input", + "bits": [ 185 ] + }, + "EYESCANTRIGGER": { + "direction": "input", + "bits": [ 186 ] + }, + "GTPRXN": { + "direction": "input", + "bits": [ 187 ] + }, + "GTPRXP": { + "direction": "input", + "bits": [ 188 ] + }, + "GTRESETSEL": { + "direction": "input", + "bits": [ 189 ] + }, + "GTRXRESET": { + "direction": "input", + "bits": [ 190 ] + }, + "GTTXRESET": { + "direction": "input", + "bits": [ 191 ] + }, + "PLL0CLK": { + "direction": "input", + "bits": [ 192 ] + }, + "PLL0REFCLK": { + "direction": "input", + "bits": [ 193 ] + }, + "PLL1CLK": { + "direction": "input", + "bits": [ 194 ] + }, + "PLL1REFCLK": { + "direction": "input", + "bits": [ 195 ] + }, + "PMARSVDIN0": { + "direction": "input", + "bits": [ 196 ] + }, + "PMARSVDIN1": { + "direction": "input", + "bits": [ 197 ] + }, + "PMARSVDIN2": { + "direction": "input", + "bits": [ 198 ] + }, + "PMARSVDIN3": { + "direction": "input", + "bits": [ 199 ] + }, + "PMARSVDIN4": { + "direction": "input", + "bits": [ 200 ] + }, + "RESETOVRD": { + "direction": "input", + "bits": [ 201 ] + }, + "RX8B10BEN": { + "direction": "input", + "bits": [ 202 ] + }, + "RXBUFRESET": { + "direction": "input", + "bits": [ 203 ] + }, + "RXCDRFREQRESET": { + "direction": "input", + "bits": [ 204 ] + }, + "RXCDRHOLD": { + "direction": "input", + "bits": [ 205 ] + }, + "RXCDROVRDEN": { + "direction": "input", + "bits": [ 206 ] + }, + "RXCDRRESET": { + "direction": "input", + "bits": [ 207 ] + }, + "RXCDRRESETRSV": { + "direction": "input", + "bits": [ 208 ] + }, + "RXCHBONDEN": { + "direction": "input", + "bits": [ 209 ] + }, + "RXCHBONDMASTER": { + "direction": "input", + "bits": [ 210 ] + }, + "RXCHBONDSLAVE": { + "direction": "input", + "bits": [ 211 ] + }, + "RXCOMMADETEN": { + "direction": "input", + "bits": [ 212 ] + }, + "RXDDIEN": { + "direction": "input", + "bits": [ 213 ] + }, + "RXDFEXYDEN": { + "direction": "input", + "bits": [ 214 ] + }, + "RXDLYBYPASS": { + "direction": "input", + "bits": [ 215 ] + }, + "RXDLYEN": { + "direction": "input", + "bits": [ 216 ] + }, + "RXDLYOVRDEN": { + "direction": "input", + "bits": [ 217 ] + }, + "RXDLYSRESET": { + "direction": "input", + "bits": [ 218 ] + }, + "RXGEARBOXSLIP": { + "direction": "input", + "bits": [ 219 ] + }, + "RXLPMHFHOLD": { + "direction": "input", + "bits": [ 220 ] + }, + "RXLPMHFOVRDEN": { + "direction": "input", + "bits": [ 221 ] + }, + "RXLPMLFHOLD": { + "direction": "input", + "bits": [ 222 ] + }, + "RXLPMLFOVRDEN": { + "direction": "input", + "bits": [ 223 ] + }, + "RXLPMOSINTNTRLEN": { + "direction": "input", + "bits": [ 224 ] + }, + "RXLPMRESET": { + "direction": "input", + "bits": [ 225 ] + }, + "RXMCOMMAALIGNEN": { + "direction": "input", + "bits": [ 226 ] + }, + "RXOOBRESET": { + "direction": "input", + "bits": [ 227 ] + }, + "RXOSCALRESET": { + "direction": "input", + "bits": [ 228 ] + }, + "RXOSHOLD": { + "direction": "input", + "bits": [ 229 ] + }, + "RXOSINTEN": { + "direction": "input", + "bits": [ 230 ] + }, + "RXOSINTHOLD": { + "direction": "input", + "bits": [ 231 ] + }, + "RXOSINTNTRLEN": { + "direction": "input", + "bits": [ 232 ] + }, + "RXOSINTOVRDEN": { + "direction": "input", + "bits": [ 233 ] + }, + "RXOSINTPD": { + "direction": "input", + "bits": [ 234 ] + }, + "RXOSINTSTROBE": { + "direction": "input", + "bits": [ 235 ] + }, + "RXOSINTTESTOVRDEN": { + "direction": "input", + "bits": [ 236 ] + }, + "RXOSOVRDEN": { + "direction": "input", + "bits": [ 237 ] + }, + "RXPCOMMAALIGNEN": { + "direction": "input", + "bits": [ 238 ] + }, + "RXPCSRESET": { + "direction": "input", + "bits": [ 239 ] + }, + "RXPHALIGN": { + "direction": "input", + "bits": [ 240 ] + }, + "RXPHALIGNEN": { + "direction": "input", + "bits": [ 241 ] + }, + "RXPHDLYPD": { + "direction": "input", + "bits": [ 242 ] + }, + "RXPHDLYRESET": { + "direction": "input", + "bits": [ 243 ] + }, + "RXPHOVRDEN": { + "direction": "input", + "bits": [ 244 ] + }, + "RXPMARESET": { + "direction": "input", + "bits": [ 245 ] + }, + "RXPOLARITY": { + "direction": "input", + "bits": [ 246 ] + }, + "RXPRBSCNTRESET": { + "direction": "input", + "bits": [ 247 ] + }, + "RXRATEMODE": { + "direction": "input", + "bits": [ 248 ] + }, + "RXSLIDE": { + "direction": "input", + "bits": [ 249 ] + }, + "RXSYNCALLIN": { + "direction": "input", + "bits": [ 250 ] + }, + "RXSYNCIN": { + "direction": "input", + "bits": [ 251 ] + }, + "RXSYNCMODE": { + "direction": "input", + "bits": [ 252 ] + }, + "RXUSERRDY": { + "direction": "input", + "bits": [ 253 ] + }, + "RXUSRCLK2": { + "direction": "input", + "bits": [ 254 ] + }, + "RXUSRCLK": { + "direction": "input", + "bits": [ 255 ] + }, + "SETERRSTATUS": { + "direction": "input", + "bits": [ 256 ] + }, + "SIGVALIDCLK": { + "direction": "input", + "bits": [ 257 ] + }, + "TX8B10BEN": { + "direction": "input", + "bits": [ 258 ] + }, + "TXCOMINIT": { + "direction": "input", + "bits": [ 259 ] + }, + "TXCOMSAS": { + "direction": "input", + "bits": [ 260 ] + }, + "TXCOMWAKE": { + "direction": "input", + "bits": [ 261 ] + }, + "TXDEEMPH": { + "direction": "input", + "bits": [ 262 ] + }, + "TXDETECTRX": { + "direction": "input", + "bits": [ 263 ] + }, + "TXDIFFPD": { + "direction": "input", + "bits": [ 264 ] + }, + "TXDLYBYPASS": { + "direction": "input", + "bits": [ 265 ] + }, + "TXDLYEN": { + "direction": "input", + "bits": [ 266 ] + }, + "TXDLYHOLD": { + "direction": "input", + "bits": [ 267 ] + }, + "TXDLYOVRDEN": { + "direction": "input", + "bits": [ 268 ] + }, + "TXDLYSRESET": { + "direction": "input", + "bits": [ 269 ] + }, + "TXDLYUPDOWN": { + "direction": "input", + "bits": [ 270 ] + }, + "TXELECIDLE": { + "direction": "input", + "bits": [ 271 ] + }, + "TXINHIBIT": { + "direction": "input", + "bits": [ 272 ] + }, + "TXPCSRESET": { + "direction": "input", + "bits": [ 273 ] + }, + "TXPDELECIDLEMODE": { + "direction": "input", + "bits": [ 274 ] + }, + "TXPHALIGN": { + "direction": "input", + "bits": [ 275 ] + }, + "TXPHALIGNEN": { + "direction": "input", + "bits": [ 276 ] + }, + "TXPHDLYPD": { + "direction": "input", + "bits": [ 277 ] + }, + "TXPHDLYRESET": { + "direction": "input", + "bits": [ 278 ] + }, + "TXPHDLYTSTCLK": { + "direction": "input", + "bits": [ 279 ] + }, + "TXPHINIT": { + "direction": "input", + "bits": [ 280 ] + }, + "TXPHOVRDEN": { + "direction": "input", + "bits": [ 281 ] + }, + "TXPIPPMEN": { + "direction": "input", + "bits": [ 282 ] + }, + "TXPIPPMOVRDEN": { + "direction": "input", + "bits": [ 283 ] + }, + "TXPIPPMPD": { + "direction": "input", + "bits": [ 284 ] + }, + "TXPIPPMSEL": { + "direction": "input", + "bits": [ 285 ] + }, + "TXPISOPD": { + "direction": "input", + "bits": [ 286 ] + }, + "TXPMARESET": { + "direction": "input", + "bits": [ 287 ] + }, + "TXPOLARITY": { + "direction": "input", + "bits": [ 288 ] + }, + "TXPOSTCURSORINV": { + "direction": "input", + "bits": [ 289 ] + }, + "TXPRBSFORCEERR": { + "direction": "input", + "bits": [ 290 ] + }, + "TXPRECURSORINV": { + "direction": "input", + "bits": [ 291 ] + }, + "TXRATEMODE": { + "direction": "input", + "bits": [ 292 ] + }, + "TXSTARTSEQ": { + "direction": "input", + "bits": [ 293 ] + }, + "TXSWING": { + "direction": "input", + "bits": [ 294 ] + }, + "TXSYNCALLIN": { + "direction": "input", + "bits": [ 295 ] + }, + "TXSYNCIN": { + "direction": "input", + "bits": [ 296 ] + }, + "TXSYNCMODE": { + "direction": "input", + "bits": [ 297 ] + }, + "TXUSERRDY": { + "direction": "input", + "bits": [ 298 ] + }, + "TXUSRCLK2": { + "direction": "input", + "bits": [ 299 ] + }, + "TXUSRCLK": { + "direction": "input", + "bits": [ 300 ] + }, + "RXADAPTSELTEST": { + "direction": "input", + "bits": [ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314 ] + }, + "DRPDI": { + "direction": "input", + "bits": [ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330 ] + }, + "GTRSVD": { + "direction": "input", + "bits": [ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346 ] + }, + "PCSRSVDIN": { + "direction": "input", + "bits": [ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362 ] + }, + "TSTIN": { + "direction": "input", + "bits": [ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382 ] + }, + "RXELECIDLEMODE": { + "direction": "input", + "bits": [ 383, 384 ] + }, + "RXPD": { + "direction": "input", + "bits": [ 385, 386 ] + }, + "RXSYSCLKSEL": { + "direction": "input", + "bits": [ 387, 388 ] + }, + "TXPD": { + "direction": "input", + "bits": [ 389, 390 ] + }, + "TXSYSCLKSEL": { + "direction": "input", + "bits": [ 391, 392 ] + }, + "LOOPBACK": { + "direction": "input", + "bits": [ 393, 394, 395 ] + }, + "RXCHBONDLEVEL": { + "direction": "input", + "bits": [ 396, 397, 398 ] + }, + "RXOUTCLKSEL": { + "direction": "input", + "bits": [ 399, 400, 401 ] + }, + "RXPRBSSEL": { + "direction": "input", + "bits": [ 402, 403, 404 ] + }, + "RXRATE": { + "direction": "input", + "bits": [ 405, 406, 407 ] + }, + "TXBUFDIFFCTRL": { + "direction": "input", + "bits": [ 408, 409, 410 ] + }, + "TXHEADER": { + "direction": "input", + "bits": [ 411, 412, 413 ] + }, + "TXMARGIN": { + "direction": "input", + "bits": [ 414, 415, 416 ] + }, + "TXOUTCLKSEL": { + "direction": "input", + "bits": [ 417, 418, 419 ] + }, + "TXPRBSSEL": { + "direction": "input", + "bits": [ 420, 421, 422 ] + }, + "TXRATE": { + "direction": "input", + "bits": [ 423, 424, 425 ] + }, + "TXDATA": { + "direction": "input", + "bits": [ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457 ] + }, + "RXCHBONDI": { + "direction": "input", + "bits": [ 458, 459, 460, 461 ] + }, + "RXOSINTCFG": { + "direction": "input", + "bits": [ 462, 463, 464, 465 ] + }, + "RXOSINTID0": { + "direction": "input", + "bits": [ 466, 467, 468, 469 ] + }, + "TX8B10BBYPASS": { + "direction": "input", + "bits": [ 470, 471, 472, 473 ] + }, + "TXCHARDISPMODE": { + "direction": "input", + "bits": [ 474, 475, 476, 477 ] + }, + "TXCHARDISPVAL": { + "direction": "input", + "bits": [ 478, 479, 480, 481 ] + }, + "TXCHARISK": { + "direction": "input", + "bits": [ 482, 483, 484, 485 ] + }, + "TXDIFFCTRL": { + "direction": "input", + "bits": [ 486, 487, 488, 489 ] + }, + "TXPIPPMSTEPSIZE": { + "direction": "input", + "bits": [ 490, 491, 492, 493, 494 ] + }, + "TXPOSTCURSOR": { + "direction": "input", + "bits": [ 495, 496, 497, 498, 499 ] + }, + "TXPRECURSOR": { + "direction": "input", + "bits": [ 500, 501, 502, 503, 504 ] + }, + "TXMAINCURSOR": { + "direction": "input", + "bits": [ 505, 506, 507, 508, 509, 510, 511 ] + }, + "TXSEQUENCE": { + "direction": "input", + "bits": [ 512, 513, 514, 515, 516, 517, 518 ] + }, + "DRPADDR": { + "direction": "input", + "bits": [ 519, 520, 521, 522, 523, 524, 525, 526, 527 ] + } + }, + "cells": { + }, + "netnames": { + "CFGRESET": { + "hide_name": 0, + "bits": [ 176 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:945" + } + }, + "CLKRSVD0": { + "hide_name": 0, + "bits": [ 177 ], + "attributes": { + "invertible_pin": "IS_CLKRSVD0_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:947" + } + }, + "CLKRSVD1": { + "hide_name": 0, + "bits": [ 178 ], + "attributes": { + "invertible_pin": "IS_CLKRSVD1_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:949" + } + }, + "DMONFIFORESET": { + "hide_name": 0, + "bits": [ 179 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:950" + } + }, + "DMONITORCLK": { + "hide_name": 0, + "bits": [ 180 ], + "attributes": { + "invertible_pin": "IS_DMONITORCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:952" + } + }, + "DMONITOROUT": { + "hide_name": 0, + "bits": [ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:927" + } + }, + "DRPADDR": { + "hide_name": 0, + "bits": [ 519, 520, 521, 522, 523, 524, 525, 526, 527 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1115" + } + }, + "DRPCLK": { + "hide_name": 0, + "bits": [ 181 ], + "attributes": { + "invertible_pin": "IS_DRPCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:954" + } + }, + "DRPDI": { + "hide_name": 0, + "bits": [ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1081" + } + }, + "DRPDO": { + "hide_name": 0, + "bits": [ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:928" + } + }, + "DRPEN": { + "hide_name": 0, + "bits": [ 182 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:955" + } + }, + "DRPRDY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:879" + } + }, + "DRPWE": { + "hide_name": 0, + "bits": [ 183 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:956" + } + }, + "EYESCANDATAERROR": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:880" + } + }, + "EYESCANMODE": { + "hide_name": 0, + "bits": [ 184 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:957" + } + }, + "EYESCANRESET": { + "hide_name": 0, + "bits": [ 185 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:958" + } + }, + "EYESCANTRIGGER": { + "hide_name": 0, + "bits": [ 186 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:959" + } + }, + "GTPRXN": { + "hide_name": 0, + "bits": [ 187 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:960" + } + }, + "GTPRXP": { + "hide_name": 0, + "bits": [ 188 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:961" + } + }, + "GTPTXN": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:881" + } + }, + "GTPTXP": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:882" + } + }, + "GTRESETSEL": { + "hide_name": 0, + "bits": [ 189 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:962" + } + }, + "GTRSVD": { + "hide_name": 0, + "bits": [ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1082" + } + }, + "GTRXRESET": { + "hide_name": 0, + "bits": [ 190 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:963" + } + }, + "GTTXRESET": { + "hide_name": 0, + "bits": [ 191 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:964" + } + }, + "LOOPBACK": { + "hide_name": 0, + "bits": [ 393, 394, 395 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1090" + } + }, + "PCSRSVDIN": { + "hide_name": 0, + "bits": [ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1083" + } + }, + "PCSRSVDOUT": { + "hide_name": 0, + "bits": [ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:929" + } + }, + "PHYSTATUS": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:883" + } + }, + "PLL0CLK": { + "hide_name": 0, + "bits": [ 192 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:965" + } + }, + "PLL0REFCLK": { + "hide_name": 0, + "bits": [ 193 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:966" + } + }, + "PLL1CLK": { + "hide_name": 0, + "bits": [ 194 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:967" + } + }, + "PLL1REFCLK": { + "hide_name": 0, + "bits": [ 195 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:968" + } + }, + "PMARSVDIN0": { + "hide_name": 0, + "bits": [ 196 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:969" + } + }, + "PMARSVDIN1": { + "hide_name": 0, + "bits": [ 197 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:970" + } + }, + "PMARSVDIN2": { + "hide_name": 0, + "bits": [ 198 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:971" + } + }, + "PMARSVDIN3": { + "hide_name": 0, + "bits": [ 199 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:972" + } + }, + "PMARSVDIN4": { + "hide_name": 0, + "bits": [ 200 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:973" + } + }, + "PMARSVDOUT0": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:884" + } + }, + "PMARSVDOUT1": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:885" + } + }, + "RESETOVRD": { + "hide_name": 0, + "bits": [ 201 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:974" + } + }, + "RX8B10BEN": { + "hide_name": 0, + "bits": [ 202 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:975" + } + }, + "RXADAPTSELTEST": { + "hide_name": 0, + "bits": [ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1080" + } + }, + "RXBUFRESET": { + "hide_name": 0, + "bits": [ 203 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:976" + } + }, + "RXBUFSTATUS": { + "hide_name": 0, + "bits": [ 105, 106, 107 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:934" + } + }, + "RXBYTEISALIGNED": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:886" + } + }, + "RXBYTEREALIGN": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:887" + } + }, + "RXCDRFREQRESET": { + "hide_name": 0, + "bits": [ 204 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:977" + } + }, + "RXCDRHOLD": { + "hide_name": 0, + "bits": [ 205 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:978" + } + }, + "RXCDRLOCK": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:888" + } + }, + "RXCDROVRDEN": { + "hide_name": 0, + "bits": [ 206 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:979" + } + }, + "RXCDRRESET": { + "hide_name": 0, + "bits": [ 207 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:980" + } + }, + "RXCDRRESETRSV": { + "hide_name": 0, + "bits": [ 208 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:981" + } + }, + "RXCHANBONDSEQ": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:889" + } + }, + "RXCHANISALIGNED": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:890" + } + }, + "RXCHANREALIGN": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:891" + } + }, + "RXCHARISCOMMA": { + "hide_name": 0, + "bits": [ 146, 147, 148, 149 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:938" + } + }, + "RXCHARISK": { + "hide_name": 0, + "bits": [ 150, 151, 152, 153 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:939" + } + }, + "RXCHBONDEN": { + "hide_name": 0, + "bits": [ 209 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:982" + } + }, + "RXCHBONDI": { + "hide_name": 0, + "bits": [ 458, 459, 460, 461 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1102" + } + }, + "RXCHBONDLEVEL": { + "hide_name": 0, + "bits": [ 396, 397, 398 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1091" + } + }, + "RXCHBONDMASTER": { + "hide_name": 0, + "bits": [ 210 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:983" + } + }, + "RXCHBONDO": { + "hide_name": 0, + "bits": [ 154, 155, 156, 157 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:940" + } + }, + "RXCHBONDSLAVE": { + "hide_name": 0, + "bits": [ 211 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:984" + } + }, + "RXCLKCORCNT": { + "hide_name": 0, + "bits": [ 97, 98 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:930" + } + }, + "RXCOMINITDET": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:892" + } + }, + "RXCOMMADET": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:893" + } + }, + "RXCOMMADETEN": { + "hide_name": 0, + "bits": [ 212 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:985" + } + }, + "RXCOMSASDET": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:894" + } + }, + "RXCOMWAKEDET": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:895" + } + }, + "RXDATA": { + "hide_name": 0, + "bits": [ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:937" + } + }, + "RXDATAVALID": { + "hide_name": 0, + "bits": [ 99, 100 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:931" + } + }, + "RXDDIEN": { + "hide_name": 0, + "bits": [ 213 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:986" + } + }, + "RXDFEXYDEN": { + "hide_name": 0, + "bits": [ 214 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:987" + } + }, + "RXDISPERR": { + "hide_name": 0, + "bits": [ 158, 159, 160, 161 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:941" + } + }, + "RXDLYBYPASS": { + "hide_name": 0, + "bits": [ 215 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:988" + } + }, + "RXDLYEN": { + "hide_name": 0, + "bits": [ 216 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:989" + } + }, + "RXDLYOVRDEN": { + "hide_name": 0, + "bits": [ 217 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:990" + } + }, + "RXDLYSRESET": { + "hide_name": 0, + "bits": [ 218 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:991" + } + }, + "RXDLYSRESETDONE": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:896" + } + }, + "RXELECIDLE": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:897" + } + }, + "RXELECIDLEMODE": { + "hide_name": 0, + "bits": [ 383, 384 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1085" + } + }, + "RXGEARBOXSLIP": { + "hide_name": 0, + "bits": [ 219 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:992" + } + }, + "RXHEADER": { + "hide_name": 0, + "bits": [ 108, 109, 110 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:935" + } + }, + "RXHEADERVALID": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:898" + } + }, + "RXLPMHFHOLD": { + "hide_name": 0, + "bits": [ 220 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:993" + } + }, + "RXLPMHFOVRDEN": { + "hide_name": 0, + "bits": [ 221 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:994" + } + }, + "RXLPMLFHOLD": { + "hide_name": 0, + "bits": [ 222 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:995" + } + }, + "RXLPMLFOVRDEN": { + "hide_name": 0, + "bits": [ 223 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:996" + } + }, + "RXLPMOSINTNTRLEN": { + "hide_name": 0, + "bits": [ 224 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:997" + } + }, + "RXLPMRESET": { + "hide_name": 0, + "bits": [ 225 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:998" + } + }, + "RXMCOMMAALIGNEN": { + "hide_name": 0, + "bits": [ 226 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:999" + } + }, + "RXNOTINTABLE": { + "hide_name": 0, + "bits": [ 162, 163, 164, 165 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:942" + } + }, + "RXOOBRESET": { + "hide_name": 0, + "bits": [ 227 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1000" + } + }, + "RXOSCALRESET": { + "hide_name": 0, + "bits": [ 228 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1001" + } + }, + "RXOSHOLD": { + "hide_name": 0, + "bits": [ 229 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1002" + } + }, + "RXOSINTCFG": { + "hide_name": 0, + "bits": [ 462, 463, 464, 465 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1103" + } + }, + "RXOSINTDONE": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:899" + } + }, + "RXOSINTEN": { + "hide_name": 0, + "bits": [ 230 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1003" + } + }, + "RXOSINTHOLD": { + "hide_name": 0, + "bits": [ 231 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1004" + } + }, + "RXOSINTID0": { + "hide_name": 0, + "bits": [ 466, 467, 468, 469 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1104" + } + }, + "RXOSINTNTRLEN": { + "hide_name": 0, + "bits": [ 232 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1005" + } + }, + "RXOSINTOVRDEN": { + "hide_name": 0, + "bits": [ 233 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1006" + } + }, + "RXOSINTPD": { + "hide_name": 0, + "bits": [ 234 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1007" + } + }, + "RXOSINTSTARTED": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:900" + } + }, + "RXOSINTSTROBE": { + "hide_name": 0, + "bits": [ 235 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1008" + } + }, + "RXOSINTSTROBEDONE": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:901" + } + }, + "RXOSINTSTROBESTARTED": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:902" + } + }, + "RXOSINTTESTOVRDEN": { + "hide_name": 0, + "bits": [ 236 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1009" + } + }, + "RXOSOVRDEN": { + "hide_name": 0, + "bits": [ 237 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1010" + } + }, + "RXOUTCLK": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:903" + } + }, + "RXOUTCLKFABRIC": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:904" + } + }, + "RXOUTCLKPCS": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:905" + } + }, + "RXOUTCLKSEL": { + "hide_name": 0, + "bits": [ 399, 400, 401 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1092" + } + }, + "RXPCOMMAALIGNEN": { + "hide_name": 0, + "bits": [ 238 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1011" + } + }, + "RXPCSRESET": { + "hide_name": 0, + "bits": [ 239 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1012" + } + }, + "RXPD": { + "hide_name": 0, + "bits": [ 385, 386 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1086" + } + }, + "RXPHALIGN": { + "hide_name": 0, + "bits": [ 240 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1013" + } + }, + "RXPHALIGNDONE": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:906" + } + }, + "RXPHALIGNEN": { + "hide_name": 0, + "bits": [ 241 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1014" + } + }, + "RXPHDLYPD": { + "hide_name": 0, + "bits": [ 242 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1015" + } + }, + "RXPHDLYRESET": { + "hide_name": 0, + "bits": [ 243 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1016" + } + }, + "RXPHMONITOR": { + "hide_name": 0, + "bits": [ 166, 167, 168, 169, 170 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:943" + } + }, + "RXPHOVRDEN": { + "hide_name": 0, + "bits": [ 244 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1017" + } + }, + "RXPHSLIPMONITOR": { + "hide_name": 0, + "bits": [ 171, 172, 173, 174, 175 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:944" + } + }, + "RXPMARESET": { + "hide_name": 0, + "bits": [ 245 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1018" + } + }, + "RXPMARESETDONE": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:907" + } + }, + "RXPOLARITY": { + "hide_name": 0, + "bits": [ 246 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1019" + } + }, + "RXPRBSCNTRESET": { + "hide_name": 0, + "bits": [ 247 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1020" + } + }, + "RXPRBSERR": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:908" + } + }, + "RXPRBSSEL": { + "hide_name": 0, + "bits": [ 402, 403, 404 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1093" + } + }, + "RXRATE": { + "hide_name": 0, + "bits": [ 405, 406, 407 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1094" + } + }, + "RXRATEDONE": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:909" + } + }, + "RXRATEMODE": { + "hide_name": 0, + "bits": [ 248 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1021" + } + }, + "RXRESETDONE": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:910" + } + }, + "RXSLIDE": { + "hide_name": 0, + "bits": [ 249 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1022" + } + }, + "RXSTARTOFSEQ": { + "hide_name": 0, + "bits": [ 101, 102 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:932" + } + }, + "RXSTATUS": { + "hide_name": 0, + "bits": [ 111, 112, 113 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:936" + } + }, + "RXSYNCALLIN": { + "hide_name": 0, + "bits": [ 250 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1023" + } + }, + "RXSYNCDONE": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:911" + } + }, + "RXSYNCIN": { + "hide_name": 0, + "bits": [ 251 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1024" + } + }, + "RXSYNCMODE": { + "hide_name": 0, + "bits": [ 252 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1025" + } + }, + "RXSYNCOUT": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:912" + } + }, + "RXSYSCLKSEL": { + "hide_name": 0, + "bits": [ 387, 388 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1087" + } + }, + "RXUSERRDY": { + "hide_name": 0, + "bits": [ 253 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1026" + } + }, + "RXUSRCLK": { + "hide_name": 0, + "bits": [ 255 ], + "attributes": { + "invertible_pin": "IS_RXUSRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1030" + } + }, + "RXUSRCLK2": { + "hide_name": 0, + "bits": [ 254 ], + "attributes": { + "invertible_pin": "IS_RXUSRCLK2_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1028" + } + }, + "RXVALID": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:913" + } + }, + "SETERRSTATUS": { + "hide_name": 0, + "bits": [ 256 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1031" + } + }, + "SIGVALIDCLK": { + "hide_name": 0, + "bits": [ 257 ], + "attributes": { + "invertible_pin": "IS_SIGVALIDCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1033" + } + }, + "TSTIN": { + "hide_name": 0, + "bits": [ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1084" + } + }, + "TX8B10BBYPASS": { + "hide_name": 0, + "bits": [ 470, 471, 472, 473 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1105" + } + }, + "TX8B10BEN": { + "hide_name": 0, + "bits": [ 258 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1034" + } + }, + "TXBUFDIFFCTRL": { + "hide_name": 0, + "bits": [ 408, 409, 410 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1095" + } + }, + "TXBUFSTATUS": { + "hide_name": 0, + "bits": [ 103, 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:933" + } + }, + "TXCHARDISPMODE": { + "hide_name": 0, + "bits": [ 474, 475, 476, 477 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1106" + } + }, + "TXCHARDISPVAL": { + "hide_name": 0, + "bits": [ 478, 479, 480, 481 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1107" + } + }, + "TXCHARISK": { + "hide_name": 0, + "bits": [ 482, 483, 484, 485 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1108" + } + }, + "TXCOMFINISH": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:914" + } + }, + "TXCOMINIT": { + "hide_name": 0, + "bits": [ 259 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1035" + } + }, + "TXCOMSAS": { + "hide_name": 0, + "bits": [ 260 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1036" + } + }, + "TXCOMWAKE": { + "hide_name": 0, + "bits": [ 261 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1037" + } + }, + "TXDATA": { + "hide_name": 0, + "bits": [ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1101" + } + }, + "TXDEEMPH": { + "hide_name": 0, + "bits": [ 262 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1038" + } + }, + "TXDETECTRX": { + "hide_name": 0, + "bits": [ 263 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1039" + } + }, + "TXDIFFCTRL": { + "hide_name": 0, + "bits": [ 486, 487, 488, 489 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1109" + } + }, + "TXDIFFPD": { + "hide_name": 0, + "bits": [ 264 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1040" + } + }, + "TXDLYBYPASS": { + "hide_name": 0, + "bits": [ 265 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1041" + } + }, + "TXDLYEN": { + "hide_name": 0, + "bits": [ 266 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1042" + } + }, + "TXDLYHOLD": { + "hide_name": 0, + "bits": [ 267 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1043" + } + }, + "TXDLYOVRDEN": { + "hide_name": 0, + "bits": [ 268 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1044" + } + }, + "TXDLYSRESET": { + "hide_name": 0, + "bits": [ 269 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1045" + } + }, + "TXDLYSRESETDONE": { + "hide_name": 0, + "bits": [ 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:915" + } + }, + "TXDLYUPDOWN": { + "hide_name": 0, + "bits": [ 270 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1046" + } + }, + "TXELECIDLE": { + "hide_name": 0, + "bits": [ 271 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1047" + } + }, + "TXGEARBOXREADY": { + "hide_name": 0, + "bits": [ 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:916" + } + }, + "TXHEADER": { + "hide_name": 0, + "bits": [ 411, 412, 413 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1096" + } + }, + "TXINHIBIT": { + "hide_name": 0, + "bits": [ 272 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1048" + } + }, + "TXMAINCURSOR": { + "hide_name": 0, + "bits": [ 505, 506, 507, 508, 509, 510, 511 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1113" + } + }, + "TXMARGIN": { + "hide_name": 0, + "bits": [ 414, 415, 416 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1097" + } + }, + "TXOUTCLK": { + "hide_name": 0, + "bits": [ 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:917" + } + }, + "TXOUTCLKFABRIC": { + "hide_name": 0, + "bits": [ 41 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:918" + } + }, + "TXOUTCLKPCS": { + "hide_name": 0, + "bits": [ 42 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:919" + } + }, + "TXOUTCLKSEL": { + "hide_name": 0, + "bits": [ 417, 418, 419 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1098" + } + }, + "TXPCSRESET": { + "hide_name": 0, + "bits": [ 273 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1049" + } + }, + "TXPD": { + "hide_name": 0, + "bits": [ 389, 390 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1088" + } + }, + "TXPDELECIDLEMODE": { + "hide_name": 0, + "bits": [ 274 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1050" + } + }, + "TXPHALIGN": { + "hide_name": 0, + "bits": [ 275 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1051" + } + }, + "TXPHALIGNDONE": { + "hide_name": 0, + "bits": [ 43 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:920" + } + }, + "TXPHALIGNEN": { + "hide_name": 0, + "bits": [ 276 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1052" + } + }, + "TXPHDLYPD": { + "hide_name": 0, + "bits": [ 277 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1053" + } + }, + "TXPHDLYRESET": { + "hide_name": 0, + "bits": [ 278 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1054" + } + }, + "TXPHDLYTSTCLK": { + "hide_name": 0, + "bits": [ 279 ], + "attributes": { + "invertible_pin": "IS_TXPHDLYTSTCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1056" + } + }, + "TXPHINIT": { + "hide_name": 0, + "bits": [ 280 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1057" + } + }, + "TXPHINITDONE": { + "hide_name": 0, + "bits": [ 44 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:921" + } + }, + "TXPHOVRDEN": { + "hide_name": 0, + "bits": [ 281 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1058" + } + }, + "TXPIPPMEN": { + "hide_name": 0, + "bits": [ 282 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1059" + } + }, + "TXPIPPMOVRDEN": { + "hide_name": 0, + "bits": [ 283 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1060" + } + }, + "TXPIPPMPD": { + "hide_name": 0, + "bits": [ 284 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1061" + } + }, + "TXPIPPMSEL": { + "hide_name": 0, + "bits": [ 285 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1062" + } + }, + "TXPIPPMSTEPSIZE": { + "hide_name": 0, + "bits": [ 490, 491, 492, 493, 494 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1110" + } + }, + "TXPISOPD": { + "hide_name": 0, + "bits": [ 286 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1063" + } + }, + "TXPMARESET": { + "hide_name": 0, + "bits": [ 287 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1064" + } + }, + "TXPMARESETDONE": { + "hide_name": 0, + "bits": [ 45 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:922" + } + }, + "TXPOLARITY": { + "hide_name": 0, + "bits": [ 288 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1065" + } + }, + "TXPOSTCURSOR": { + "hide_name": 0, + "bits": [ 495, 496, 497, 498, 499 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1111" + } + }, + "TXPOSTCURSORINV": { + "hide_name": 0, + "bits": [ 289 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1066" + } + }, + "TXPRBSFORCEERR": { + "hide_name": 0, + "bits": [ 290 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1067" + } + }, + "TXPRBSSEL": { + "hide_name": 0, + "bits": [ 420, 421, 422 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1099" + } + }, + "TXPRECURSOR": { + "hide_name": 0, + "bits": [ 500, 501, 502, 503, 504 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1112" + } + }, + "TXPRECURSORINV": { + "hide_name": 0, + "bits": [ 291 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1068" + } + }, + "TXRATE": { + "hide_name": 0, + "bits": [ 423, 424, 425 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1100" + } + }, + "TXRATEDONE": { + "hide_name": 0, + "bits": [ 46 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:923" + } + }, + "TXRATEMODE": { + "hide_name": 0, + "bits": [ 292 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1069" + } + }, + "TXRESETDONE": { + "hide_name": 0, + "bits": [ 47 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:924" + } + }, + "TXSEQUENCE": { + "hide_name": 0, + "bits": [ 512, 513, 514, 515, 516, 517, 518 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1114" + } + }, + "TXSTARTSEQ": { + "hide_name": 0, + "bits": [ 293 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1070" + } + }, + "TXSWING": { + "hide_name": 0, + "bits": [ 294 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1071" + } + }, + "TXSYNCALLIN": { + "hide_name": 0, + "bits": [ 295 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1072" + } + }, + "TXSYNCDONE": { + "hide_name": 0, + "bits": [ 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:925" + } + }, + "TXSYNCIN": { + "hide_name": 0, + "bits": [ 296 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1073" + } + }, + "TXSYNCMODE": { + "hide_name": 0, + "bits": [ 297 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1074" + } + }, + "TXSYNCOUT": { + "hide_name": 0, + "bits": [ 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:926" + } + }, + "TXSYSCLKSEL": { + "hide_name": 0, + "bits": [ 391, 392 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1089" + } + }, + "TXUSERRDY": { + "hide_name": 0, + "bits": [ 298 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1075" + } + }, + "TXUSRCLK": { + "hide_name": 0, + "bits": [ 300 ], + "attributes": { + "invertible_pin": "IS_TXUSRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1079" + } + }, + "TXUSRCLK2": { + "hide_name": 0, + "bits": [ 299 ], + "attributes": { + "invertible_pin": "IS_TXUSRCLK2_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1077" + } + } + } + }, + "GTPE2_COMMON": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1118" + }, + "ports": { + "DRPRDY": { + "direction": "output", + "bits": [ 2 ] + }, + "PLL0FBCLKLOST": { + "direction": "output", + "bits": [ 3 ] + }, + "PLL0LOCK": { + "direction": "output", + "bits": [ 4 ] + }, + "PLL0OUTCLK": { + "direction": "output", + "bits": [ 5 ] + }, + "PLL0OUTREFCLK": { + "direction": "output", + "bits": [ 6 ] + }, + "PLL0REFCLKLOST": { + "direction": "output", + "bits": [ 7 ] + }, + "PLL1FBCLKLOST": { + "direction": "output", + "bits": [ 8 ] + }, + "PLL1LOCK": { + "direction": "output", + "bits": [ 9 ] + }, + "PLL1OUTCLK": { + "direction": "output", + "bits": [ 10 ] + }, + "PLL1OUTREFCLK": { + "direction": "output", + "bits": [ 11 ] + }, + "PLL1REFCLKLOST": { + "direction": "output", + "bits": [ 12 ] + }, + "REFCLKOUTMONITOR0": { + "direction": "output", + "bits": [ 13 ] + }, + "REFCLKOUTMONITOR1": { + "direction": "output", + "bits": [ 14 ] + }, + "DRPDO": { + "direction": "output", + "bits": [ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ] + }, + "PMARSVDOUT": { + "direction": "output", + "bits": [ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46 ] + }, + "DMONITOROUT": { + "direction": "output", + "bits": [ 47, 48, 49, 50, 51, 52, 53, 54 ] + }, + "BGBYPASSB": { + "direction": "input", + "bits": [ 55 ] + }, + "BGMONITORENB": { + "direction": "input", + "bits": [ 56 ] + }, + "BGPDB": { + "direction": "input", + "bits": [ 57 ] + }, + "BGRCALOVRDENB": { + "direction": "input", + "bits": [ 58 ] + }, + "DRPCLK": { + "direction": "input", + "bits": [ 59 ] + }, + "DRPEN": { + "direction": "input", + "bits": [ 60 ] + }, + "DRPWE": { + "direction": "input", + "bits": [ 61 ] + }, + "GTEASTREFCLK0": { + "direction": "input", + "bits": [ 62 ] + }, + "GTEASTREFCLK1": { + "direction": "input", + "bits": [ 63 ] + }, + "GTGREFCLK0": { + "direction": "input", + "bits": [ 64 ] + }, + "GTGREFCLK1": { + "direction": "input", + "bits": [ 65 ] + }, + "GTREFCLK0": { + "direction": "input", + "bits": [ 66 ] + }, + "GTREFCLK1": { + "direction": "input", + "bits": [ 67 ] + }, + "GTWESTREFCLK0": { + "direction": "input", + "bits": [ 68 ] + }, + "GTWESTREFCLK1": { + "direction": "input", + "bits": [ 69 ] + }, + "PLL0LOCKDETCLK": { + "direction": "input", + "bits": [ 70 ] + }, + "PLL0LOCKEN": { + "direction": "input", + "bits": [ 71 ] + }, + "PLL0PD": { + "direction": "input", + "bits": [ 72 ] + }, + "PLL0RESET": { + "direction": "input", + "bits": [ 73 ] + }, + "PLL1LOCKDETCLK": { + "direction": "input", + "bits": [ 74 ] + }, + "PLL1LOCKEN": { + "direction": "input", + "bits": [ 75 ] + }, + "PLL1PD": { + "direction": "input", + "bits": [ 76 ] + }, + "PLL1RESET": { + "direction": "input", + "bits": [ 77 ] + }, + "RCALENB": { + "direction": "input", + "bits": [ 78 ] + }, + "DRPDI": { + "direction": "input", + "bits": [ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 ] + }, + "PLLRSVD1": { + "direction": "input", + "bits": [ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110 ] + }, + "PLL0REFCLKSEL": { + "direction": "input", + "bits": [ 111, 112, 113 ] + }, + "PLL1REFCLKSEL": { + "direction": "input", + "bits": [ 114, 115, 116 ] + }, + "BGRCALOVRD": { + "direction": "input", + "bits": [ 117, 118, 119, 120, 121 ] + }, + "PLLRSVD2": { + "direction": "input", + "bits": [ 122, 123, 124, 125, 126 ] + }, + "DRPADDR": { + "direction": "input", + "bits": [ 127, 128, 129, 130, 131, 132, 133, 134 ] + }, + "PMARSVD": { + "direction": "input", + "bits": [ 135, 136, 137, 138, 139, 140, 141, 142 ] + } + }, + "cells": { + }, + "netnames": { + "BGBYPASSB": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1163" + } + }, + "BGMONITORENB": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1164" + } + }, + "BGPDB": { + "hide_name": 0, + "bits": [ 57 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1165" + } + }, + "BGRCALOVRD": { + "hide_name": 0, + "bits": [ 117, 118, 119, 120, 121 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1196" + } + }, + "BGRCALOVRDENB": { + "hide_name": 0, + "bits": [ 58 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1166" + } + }, + "DMONITOROUT": { + "hide_name": 0, + "bits": [ 47, 48, 49, 50, 51, 52, 53, 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1162" + } + }, + "DRPADDR": { + "hide_name": 0, + "bits": [ 127, 128, 129, 130, 131, 132, 133, 134 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1198" + } + }, + "DRPCLK": { + "hide_name": 0, + "bits": [ 59 ], + "attributes": { + "invertible_pin": "IS_DRPCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1168" + } + }, + "DRPDI": { + "hide_name": 0, + "bits": [ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1192" + } + }, + "DRPDO": { + "hide_name": 0, + "bits": [ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1160" + } + }, + "DRPEN": { + "hide_name": 0, + "bits": [ 60 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1169" + } + }, + "DRPRDY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1147" + } + }, + "DRPWE": { + "hide_name": 0, + "bits": [ 61 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1170" + } + }, + "GTEASTREFCLK0": { + "hide_name": 0, + "bits": [ 62 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1171" + } + }, + "GTEASTREFCLK1": { + "hide_name": 0, + "bits": [ 63 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1172" + } + }, + "GTGREFCLK0": { + "hide_name": 0, + "bits": [ 64 ], + "attributes": { + "invertible_pin": "IS_GTGREFCLK0_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1174" + } + }, + "GTGREFCLK1": { + "hide_name": 0, + "bits": [ 65 ], + "attributes": { + "invertible_pin": "IS_GTGREFCLK1_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1176" + } + }, + "GTREFCLK0": { + "hide_name": 0, + "bits": [ 66 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1177" + } + }, + "GTREFCLK1": { + "hide_name": 0, + "bits": [ 67 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1178" + } + }, + "GTWESTREFCLK0": { + "hide_name": 0, + "bits": [ 68 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1179" + } + }, + "GTWESTREFCLK1": { + "hide_name": 0, + "bits": [ 69 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1180" + } + }, + "PLL0FBCLKLOST": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1148" + } + }, + "PLL0LOCK": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1149" + } + }, + "PLL0LOCKDETCLK": { + "hide_name": 0, + "bits": [ 70 ], + "attributes": { + "invertible_pin": "IS_PLL0LOCKDETCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1182" + } + }, + "PLL0LOCKEN": { + "hide_name": 0, + "bits": [ 71 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1183" + } + }, + "PLL0OUTCLK": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1150" + } + }, + "PLL0OUTREFCLK": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1151" + } + }, + "PLL0PD": { + "hide_name": 0, + "bits": [ 72 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1184" + } + }, + "PLL0REFCLKLOST": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1152" + } + }, + "PLL0REFCLKSEL": { + "hide_name": 0, + "bits": [ 111, 112, 113 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1194" + } + }, + "PLL0RESET": { + "hide_name": 0, + "bits": [ 73 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1185" + } + }, + "PLL1FBCLKLOST": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1153" + } + }, + "PLL1LOCK": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1154" + } + }, + "PLL1LOCKDETCLK": { + "hide_name": 0, + "bits": [ 74 ], + "attributes": { + "invertible_pin": "IS_PLL1LOCKDETCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1187" + } + }, + "PLL1LOCKEN": { + "hide_name": 0, + "bits": [ 75 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1188" + } + }, + "PLL1OUTCLK": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1155" + } + }, + "PLL1OUTREFCLK": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1156" + } + }, + "PLL1PD": { + "hide_name": 0, + "bits": [ 76 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1189" + } + }, + "PLL1REFCLKLOST": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1157" + } + }, + "PLL1REFCLKSEL": { + "hide_name": 0, + "bits": [ 114, 115, 116 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1195" + } + }, + "PLL1RESET": { + "hide_name": 0, + "bits": [ 77 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1190" + } + }, + "PLLRSVD1": { + "hide_name": 0, + "bits": [ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1193" + } + }, + "PLLRSVD2": { + "hide_name": 0, + "bits": [ 122, 123, 124, 125, 126 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1197" + } + }, + "PMARSVD": { + "hide_name": 0, + "bits": [ 135, 136, 137, 138, 139, 140, 141, 142 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1199" + } + }, + "PMARSVDOUT": { + "hide_name": 0, + "bits": [ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1161" + } + }, + "RCALENB": { + "hide_name": 0, + "bits": [ 78 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1191" + } + }, + "REFCLKOUTMONITOR0": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1158" + } + }, + "REFCLKOUTMONITOR1": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1159" + } + } + } + }, + "GTXE2_CHANNEL": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1202" + }, + "ports": { + "CPLLFBCLKLOST": { + "direction": "output", + "bits": [ 2 ] + }, + "CPLLLOCK": { + "direction": "output", + "bits": [ 3 ] + }, + "CPLLREFCLKLOST": { + "direction": "output", + "bits": [ 4 ] + }, + "DRPRDY": { + "direction": "output", + "bits": [ 5 ] + }, + "EYESCANDATAERROR": { + "direction": "output", + "bits": [ 6 ] + }, + "GTREFCLKMONITOR": { + "direction": "output", + "bits": [ 7 ] + }, + "GTXTXN": { + "direction": "output", + "bits": [ 8 ] + }, + "GTXTXP": { + "direction": "output", + "bits": [ 9 ] + }, + "PHYSTATUS": { + "direction": "output", + "bits": [ 10 ] + }, + "RXBYTEISALIGNED": { + "direction": "output", + "bits": [ 11 ] + }, + "RXBYTEREALIGN": { + "direction": "output", + "bits": [ 12 ] + }, + "RXCDRLOCK": { + "direction": "output", + "bits": [ 13 ] + }, + "RXCHANBONDSEQ": { + "direction": "output", + "bits": [ 14 ] + }, + "RXCHANISALIGNED": { + "direction": "output", + "bits": [ 15 ] + }, + "RXCHANREALIGN": { + "direction": "output", + "bits": [ 16 ] + }, + "RXCOMINITDET": { + "direction": "output", + "bits": [ 17 ] + }, + "RXCOMMADET": { + "direction": "output", + "bits": [ 18 ] + }, + "RXCOMSASDET": { + "direction": "output", + "bits": [ 19 ] + }, + "RXCOMWAKEDET": { + "direction": "output", + "bits": [ 20 ] + }, + "RXDATAVALID": { + "direction": "output", + "bits": [ 21 ] + }, + "RXDLYSRESETDONE": { + "direction": "output", + "bits": [ 22 ] + }, + "RXELECIDLE": { + "direction": "output", + "bits": [ 23 ] + }, + "RXHEADERVALID": { + "direction": "output", + "bits": [ 24 ] + }, + "RXOUTCLK": { + "direction": "output", + "bits": [ 25 ] + }, + "RXOUTCLKFABRIC": { + "direction": "output", + "bits": [ 26 ] + }, + "RXOUTCLKPCS": { + "direction": "output", + "bits": [ 27 ] + }, + "RXPHALIGNDONE": { + "direction": "output", + "bits": [ 28 ] + }, + "RXPRBSERR": { + "direction": "output", + "bits": [ 29 ] + }, + "RXQPISENN": { + "direction": "output", + "bits": [ 30 ] + }, + "RXQPISENP": { + "direction": "output", + "bits": [ 31 ] + }, + "RXRATEDONE": { + "direction": "output", + "bits": [ 32 ] + }, + "RXRESETDONE": { + "direction": "output", + "bits": [ 33 ] + }, + "RXSTARTOFSEQ": { + "direction": "output", + "bits": [ 34 ] + }, + "RXVALID": { + "direction": "output", + "bits": [ 35 ] + }, + "TXCOMFINISH": { + "direction": "output", + "bits": [ 36 ] + }, + "TXDLYSRESETDONE": { + "direction": "output", + "bits": [ 37 ] + }, + "TXGEARBOXREADY": { + "direction": "output", + "bits": [ 38 ] + }, + "TXOUTCLK": { + "direction": "output", + "bits": [ 39 ] + }, + "TXOUTCLKFABRIC": { + "direction": "output", + "bits": [ 40 ] + }, + "TXOUTCLKPCS": { + "direction": "output", + "bits": [ 41 ] + }, + "TXPHALIGNDONE": { + "direction": "output", + "bits": [ 42 ] + }, + "TXPHINITDONE": { + "direction": "output", + "bits": [ 43 ] + }, + "TXQPISENN": { + "direction": "output", + "bits": [ 44 ] + }, + "TXQPISENP": { + "direction": "output", + "bits": [ 45 ] + }, + "TXRATEDONE": { + "direction": "output", + "bits": [ 46 ] + }, + "TXRESETDONE": { + "direction": "output", + "bits": [ 47 ] + }, + "DRPDO": { + "direction": "output", + "bits": [ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 ] + }, + "PCSRSVDOUT": { + "direction": "output", + "bits": [ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79 ] + }, + "RXCLKCORCNT": { + "direction": "output", + "bits": [ 80, 81 ] + }, + "TXBUFSTATUS": { + "direction": "output", + "bits": [ 82, 83 ] + }, + "RXBUFSTATUS": { + "direction": "output", + "bits": [ 84, 85, 86 ] + }, + "RXHEADER": { + "direction": "output", + "bits": [ 87, 88, 89 ] + }, + "RXSTATUS": { + "direction": "output", + "bits": [ 90, 91, 92 ] + }, + "RXCHBONDO": { + "direction": "output", + "bits": [ 93, 94, 95, 96, 97 ] + }, + "RXPHMONITOR": { + "direction": "output", + "bits": [ 98, 99, 100, 101, 102 ] + }, + "RXPHSLIPMONITOR": { + "direction": "output", + "bits": [ 103, 104, 105, 106, 107 ] + }, + "RXDATA": { + "direction": "output", + "bits": [ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171 ] + }, + "RXMONITOROUT": { + "direction": "output", + "bits": [ 172, 173, 174, 175, 176, 177, 178 ] + }, + "DMONITOROUT": { + "direction": "output", + "bits": [ 179, 180, 181, 182, 183, 184, 185, 186 ] + }, + "RXCHARISCOMMA": { + "direction": "output", + "bits": [ 187, 188, 189, 190, 191, 192, 193, 194 ] + }, + "RXCHARISK": { + "direction": "output", + "bits": [ 195, 196, 197, 198, 199, 200, 201, 202 ] + }, + "RXDISPERR": { + "direction": "output", + "bits": [ 203, 204, 205, 206, 207, 208, 209, 210 ] + }, + "RXNOTINTABLE": { + "direction": "output", + "bits": [ 211, 212, 213, 214, 215, 216, 217, 218 ] + }, + "TSTOUT": { + "direction": "output", + "bits": [ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228 ] + }, + "CFGRESET": { + "direction": "input", + "bits": [ 229 ] + }, + "CPLLLOCKDETCLK": { + "direction": "input", + "bits": [ 230 ] + }, + "CPLLLOCKEN": { + "direction": "input", + "bits": [ 231 ] + }, + "CPLLPD": { + "direction": "input", + "bits": [ 232 ] + }, + "CPLLRESET": { + "direction": "input", + "bits": [ 233 ] + }, + "DRPCLK": { + "direction": "input", + "bits": [ 234 ] + }, + "DRPEN": { + "direction": "input", + "bits": [ 235 ] + }, + "DRPWE": { + "direction": "input", + "bits": [ 236 ] + }, + "EYESCANMODE": { + "direction": "input", + "bits": [ 237 ] + }, + "EYESCANRESET": { + "direction": "input", + "bits": [ 238 ] + }, + "EYESCANTRIGGER": { + "direction": "input", + "bits": [ 239 ] + }, + "GTGREFCLK": { + "direction": "input", + "bits": [ 240 ] + }, + "GTNORTHREFCLK0": { + "direction": "input", + "bits": [ 241 ] + }, + "GTNORTHREFCLK1": { + "direction": "input", + "bits": [ 242 ] + }, + "GTREFCLK0": { + "direction": "input", + "bits": [ 243 ] + }, + "GTREFCLK1": { + "direction": "input", + "bits": [ 244 ] + }, + "GTRESETSEL": { + "direction": "input", + "bits": [ 245 ] + }, + "GTRXRESET": { + "direction": "input", + "bits": [ 246 ] + }, + "GTSOUTHREFCLK0": { + "direction": "input", + "bits": [ 247 ] + }, + "GTSOUTHREFCLK1": { + "direction": "input", + "bits": [ 248 ] + }, + "GTTXRESET": { + "direction": "input", + "bits": [ 249 ] + }, + "GTXRXN": { + "direction": "input", + "bits": [ 250 ] + }, + "GTXRXP": { + "direction": "input", + "bits": [ 251 ] + }, + "QPLLCLK": { + "direction": "input", + "bits": [ 252 ] + }, + "QPLLREFCLK": { + "direction": "input", + "bits": [ 253 ] + }, + "RESETOVRD": { + "direction": "input", + "bits": [ 254 ] + }, + "RX8B10BEN": { + "direction": "input", + "bits": [ 255 ] + }, + "RXBUFRESET": { + "direction": "input", + "bits": [ 256 ] + }, + "RXCDRFREQRESET": { + "direction": "input", + "bits": [ 257 ] + }, + "RXCDRHOLD": { + "direction": "input", + "bits": [ 258 ] + }, + "RXCDROVRDEN": { + "direction": "input", + "bits": [ 259 ] + }, + "RXCDRRESET": { + "direction": "input", + "bits": [ 260 ] + }, + "RXCDRRESETRSV": { + "direction": "input", + "bits": [ 261 ] + }, + "RXCHBONDEN": { + "direction": "input", + "bits": [ 262 ] + }, + "RXCHBONDMASTER": { + "direction": "input", + "bits": [ 263 ] + }, + "RXCHBONDSLAVE": { + "direction": "input", + "bits": [ 264 ] + }, + "RXCOMMADETEN": { + "direction": "input", + "bits": [ 265 ] + }, + "RXDDIEN": { + "direction": "input", + "bits": [ 266 ] + }, + "RXDFEAGCHOLD": { + "direction": "input", + "bits": [ 267 ] + }, + "RXDFEAGCOVRDEN": { + "direction": "input", + "bits": [ 268 ] + }, + "RXDFECM1EN": { + "direction": "input", + "bits": [ 269 ] + }, + "RXDFELFHOLD": { + "direction": "input", + "bits": [ 270 ] + }, + "RXDFELFOVRDEN": { + "direction": "input", + "bits": [ 271 ] + }, + "RXDFELPMRESET": { + "direction": "input", + "bits": [ 272 ] + }, + "RXDFETAP2HOLD": { + "direction": "input", + "bits": [ 273 ] + }, + "RXDFETAP2OVRDEN": { + "direction": "input", + "bits": [ 274 ] + }, + "RXDFETAP3HOLD": { + "direction": "input", + "bits": [ 275 ] + }, + "RXDFETAP3OVRDEN": { + "direction": "input", + "bits": [ 276 ] + }, + "RXDFETAP4HOLD": { + "direction": "input", + "bits": [ 277 ] + }, + "RXDFETAP4OVRDEN": { + "direction": "input", + "bits": [ 278 ] + }, + "RXDFETAP5HOLD": { + "direction": "input", + "bits": [ 279 ] + }, + "RXDFETAP5OVRDEN": { + "direction": "input", + "bits": [ 280 ] + }, + "RXDFEUTHOLD": { + "direction": "input", + "bits": [ 281 ] + }, + "RXDFEUTOVRDEN": { + "direction": "input", + "bits": [ 282 ] + }, + "RXDFEVPHOLD": { + "direction": "input", + "bits": [ 283 ] + }, + "RXDFEVPOVRDEN": { + "direction": "input", + "bits": [ 284 ] + }, + "RXDFEVSEN": { + "direction": "input", + "bits": [ 285 ] + }, + "RXDFEXYDEN": { + "direction": "input", + "bits": [ 286 ] + }, + "RXDFEXYDHOLD": { + "direction": "input", + "bits": [ 287 ] + }, + "RXDFEXYDOVRDEN": { + "direction": "input", + "bits": [ 288 ] + }, + "RXDLYBYPASS": { + "direction": "input", + "bits": [ 289 ] + }, + "RXDLYEN": { + "direction": "input", + "bits": [ 290 ] + }, + "RXDLYOVRDEN": { + "direction": "input", + "bits": [ 291 ] + }, + "RXDLYSRESET": { + "direction": "input", + "bits": [ 292 ] + }, + "RXGEARBOXSLIP": { + "direction": "input", + "bits": [ 293 ] + }, + "RXLPMEN": { + "direction": "input", + "bits": [ 294 ] + }, + "RXLPMHFHOLD": { + "direction": "input", + "bits": [ 295 ] + }, + "RXLPMHFOVRDEN": { + "direction": "input", + "bits": [ 296 ] + }, + "RXLPMLFHOLD": { + "direction": "input", + "bits": [ 297 ] + }, + "RXLPMLFKLOVRDEN": { + "direction": "input", + "bits": [ 298 ] + }, + "RXMCOMMAALIGNEN": { + "direction": "input", + "bits": [ 299 ] + }, + "RXOOBRESET": { + "direction": "input", + "bits": [ 300 ] + }, + "RXOSHOLD": { + "direction": "input", + "bits": [ 301 ] + }, + "RXOSOVRDEN": { + "direction": "input", + "bits": [ 302 ] + }, + "RXPCOMMAALIGNEN": { + "direction": "input", + "bits": [ 303 ] + }, + "RXPCSRESET": { + "direction": "input", + "bits": [ 304 ] + }, + "RXPHALIGN": { + "direction": "input", + "bits": [ 305 ] + }, + "RXPHALIGNEN": { + "direction": "input", + "bits": [ 306 ] + }, + "RXPHDLYPD": { + "direction": "input", + "bits": [ 307 ] + }, + "RXPHDLYRESET": { + "direction": "input", + "bits": [ 308 ] + }, + "RXPHOVRDEN": { + "direction": "input", + "bits": [ 309 ] + }, + "RXPMARESET": { + "direction": "input", + "bits": [ 310 ] + }, + "RXPOLARITY": { + "direction": "input", + "bits": [ 311 ] + }, + "RXPRBSCNTRESET": { + "direction": "input", + "bits": [ 312 ] + }, + "RXQPIEN": { + "direction": "input", + "bits": [ 313 ] + }, + "RXSLIDE": { + "direction": "input", + "bits": [ 314 ] + }, + "RXUSERRDY": { + "direction": "input", + "bits": [ 315 ] + }, + "RXUSRCLK2": { + "direction": "input", + "bits": [ 316 ] + }, + "RXUSRCLK": { + "direction": "input", + "bits": [ 317 ] + }, + "SETERRSTATUS": { + "direction": "input", + "bits": [ 318 ] + }, + "TX8B10BEN": { + "direction": "input", + "bits": [ 319 ] + }, + "TXCOMINIT": { + "direction": "input", + "bits": [ 320 ] + }, + "TXCOMSAS": { + "direction": "input", + "bits": [ 321 ] + }, + "TXCOMWAKE": { + "direction": "input", + "bits": [ 322 ] + }, + "TXDEEMPH": { + "direction": "input", + "bits": [ 323 ] + }, + "TXDETECTRX": { + "direction": "input", + "bits": [ 324 ] + }, + "TXDIFFPD": { + "direction": "input", + "bits": [ 325 ] + }, + "TXDLYBYPASS": { + "direction": "input", + "bits": [ 326 ] + }, + "TXDLYEN": { + "direction": "input", + "bits": [ 327 ] + }, + "TXDLYHOLD": { + "direction": "input", + "bits": [ 328 ] + }, + "TXDLYOVRDEN": { + "direction": "input", + "bits": [ 329 ] + }, + "TXDLYSRESET": { + "direction": "input", + "bits": [ 330 ] + }, + "TXDLYUPDOWN": { + "direction": "input", + "bits": [ 331 ] + }, + "TXELECIDLE": { + "direction": "input", + "bits": [ 332 ] + }, + "TXINHIBIT": { + "direction": "input", + "bits": [ 333 ] + }, + "TXPCSRESET": { + "direction": "input", + "bits": [ 334 ] + }, + "TXPDELECIDLEMODE": { + "direction": "input", + "bits": [ 335 ] + }, + "TXPHALIGN": { + "direction": "input", + "bits": [ 336 ] + }, + "TXPHALIGNEN": { + "direction": "input", + "bits": [ 337 ] + }, + "TXPHDLYPD": { + "direction": "input", + "bits": [ 338 ] + }, + "TXPHDLYRESET": { + "direction": "input", + "bits": [ 339 ] + }, + "TXPHDLYTSTCLK": { + "direction": "input", + "bits": [ 340 ] + }, + "TXPHINIT": { + "direction": "input", + "bits": [ 341 ] + }, + "TXPHOVRDEN": { + "direction": "input", + "bits": [ 342 ] + }, + "TXPISOPD": { + "direction": "input", + "bits": [ 343 ] + }, + "TXPMARESET": { + "direction": "input", + "bits": [ 344 ] + }, + "TXPOLARITY": { + "direction": "input", + "bits": [ 345 ] + }, + "TXPOSTCURSORINV": { + "direction": "input", + "bits": [ 346 ] + }, + "TXPRBSFORCEERR": { + "direction": "input", + "bits": [ 347 ] + }, + "TXPRECURSORINV": { + "direction": "input", + "bits": [ 348 ] + }, + "TXQPIBIASEN": { + "direction": "input", + "bits": [ 349 ] + }, + "TXQPISTRONGPDOWN": { + "direction": "input", + "bits": [ 350 ] + }, + "TXQPIWEAKPUP": { + "direction": "input", + "bits": [ 351 ] + }, + "TXSTARTSEQ": { + "direction": "input", + "bits": [ 352 ] + }, + "TXSWING": { + "direction": "input", + "bits": [ 353 ] + }, + "TXUSERRDY": { + "direction": "input", + "bits": [ 354 ] + }, + "TXUSRCLK2": { + "direction": "input", + "bits": [ 355 ] + }, + "TXUSRCLK": { + "direction": "input", + "bits": [ 356 ] + }, + "DRPDI": { + "direction": "input", + "bits": [ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372 ] + }, + "GTRSVD": { + "direction": "input", + "bits": [ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388 ] + }, + "PCSRSVDIN": { + "direction": "input", + "bits": [ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404 ] + }, + "TSTIN": { + "direction": "input", + "bits": [ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424 ] + }, + "RXELECIDLEMODE": { + "direction": "input", + "bits": [ 425, 426 ] + }, + "RXMONITORSEL": { + "direction": "input", + "bits": [ 427, 428 ] + }, + "RXPD": { + "direction": "input", + "bits": [ 429, 430 ] + }, + "RXSYSCLKSEL": { + "direction": "input", + "bits": [ 431, 432 ] + }, + "TXPD": { + "direction": "input", + "bits": [ 433, 434 ] + }, + "TXSYSCLKSEL": { + "direction": "input", + "bits": [ 435, 436 ] + }, + "CPLLREFCLKSEL": { + "direction": "input", + "bits": [ 437, 438, 439 ] + }, + "LOOPBACK": { + "direction": "input", + "bits": [ 440, 441, 442 ] + }, + "RXCHBONDLEVEL": { + "direction": "input", + "bits": [ 443, 444, 445 ] + }, + "RXOUTCLKSEL": { + "direction": "input", + "bits": [ 446, 447, 448 ] + }, + "RXPRBSSEL": { + "direction": "input", + "bits": [ 449, 450, 451 ] + }, + "RXRATE": { + "direction": "input", + "bits": [ 452, 453, 454 ] + }, + "TXBUFDIFFCTRL": { + "direction": "input", + "bits": [ 455, 456, 457 ] + }, + "TXHEADER": { + "direction": "input", + "bits": [ 458, 459, 460 ] + }, + "TXMARGIN": { + "direction": "input", + "bits": [ 461, 462, 463 ] + }, + "TXOUTCLKSEL": { + "direction": "input", + "bits": [ 464, 465, 466 ] + }, + "TXPRBSSEL": { + "direction": "input", + "bits": [ 467, 468, 469 ] + }, + "TXRATE": { + "direction": "input", + "bits": [ 470, 471, 472 ] + }, + "CLKRSVD": { + "direction": "input", + "bits": [ 473, 474, 475, 476 ] + }, + "TXDIFFCTRL": { + "direction": "input", + "bits": [ 477, 478, 479, 480 ] + }, + "PCSRSVDIN2": { + "direction": "input", + "bits": [ 481, 482, 483, 484, 485 ] + }, + "PMARSVDIN2": { + "direction": "input", + "bits": [ 486, 487, 488, 489, 490 ] + }, + "PMARSVDIN": { + "direction": "input", + "bits": [ 491, 492, 493, 494, 495 ] + }, + "RXCHBONDI": { + "direction": "input", + "bits": [ 496, 497, 498, 499, 500 ] + }, + "TXPOSTCURSOR": { + "direction": "input", + "bits": [ 501, 502, 503, 504, 505 ] + }, + "TXPRECURSOR": { + "direction": "input", + "bits": [ 506, 507, 508, 509, 510 ] + }, + "TXDATA": { + "direction": "input", + "bits": [ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574 ] + }, + "TXMAINCURSOR": { + "direction": "input", + "bits": [ 575, 576, 577, 578, 579, 580, 581 ] + }, + "TXSEQUENCE": { + "direction": "input", + "bits": [ 582, 583, 584, 585, 586, 587, 588 ] + }, + "TX8B10BBYPASS": { + "direction": "input", + "bits": [ 589, 590, 591, 592, 593, 594, 595, 596 ] + }, + "TXCHARDISPMODE": { + "direction": "input", + "bits": [ 597, 598, 599, 600, 601, 602, 603, 604 ] + }, + "TXCHARDISPVAL": { + "direction": "input", + "bits": [ 605, 606, 607, 608, 609, 610, 611, 612 ] + }, + "TXCHARISK": { + "direction": "input", + "bits": [ 613, 614, 615, 616, 617, 618, 619, 620 ] + }, + "DRPADDR": { + "direction": "input", + "bits": [ 621, 622, 623, 624, 625, 626, 627, 628, 629 ] + } + }, + "cells": { + }, + "netnames": { + "CFGRESET": { + "hide_name": 0, + "bits": [ 229 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1474" + } + }, + "CLKRSVD": { + "hide_name": 0, + "bits": [ 473, 474, 475, 476 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1632" + } + }, + "CPLLFBCLKLOST": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1410" + } + }, + "CPLLLOCK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1411" + } + }, + "CPLLLOCKDETCLK": { + "hide_name": 0, + "bits": [ 230 ], + "attributes": { + "invertible_pin": "IS_CPLLLOCKDETCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1476" + } + }, + "CPLLLOCKEN": { + "hide_name": 0, + "bits": [ 231 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1477" + } + }, + "CPLLPD": { + "hide_name": 0, + "bits": [ 232 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1478" + } + }, + "CPLLREFCLKLOST": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1412" + } + }, + "CPLLREFCLKSEL": { + "hide_name": 0, + "bits": [ 437, 438, 439 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1620" + } + }, + "CPLLRESET": { + "hide_name": 0, + "bits": [ 233 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1479" + } + }, + "DMONITOROUT": { + "hide_name": 0, + "bits": [ 179, 180, 181, 182, 183, 184, 185, 186 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1468" + } + }, + "DRPADDR": { + "hide_name": 0, + "bits": [ 621, 622, 623, 624, 625, 626, 627, 628, 629 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1647" + } + }, + "DRPCLK": { + "hide_name": 0, + "bits": [ 234 ], + "attributes": { + "invertible_pin": "IS_DRPCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1481" + } + }, + "DRPDI": { + "hide_name": 0, + "bits": [ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1610" + } + }, + "DRPDO": { + "hide_name": 0, + "bits": [ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1456" + } + }, + "DRPEN": { + "hide_name": 0, + "bits": [ 235 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1482" + } + }, + "DRPRDY": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1413" + } + }, + "DRPWE": { + "hide_name": 0, + "bits": [ 236 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1483" + } + }, + "EYESCANDATAERROR": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1414" + } + }, + "EYESCANMODE": { + "hide_name": 0, + "bits": [ 237 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1484" + } + }, + "EYESCANRESET": { + "hide_name": 0, + "bits": [ 238 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1485" + } + }, + "EYESCANTRIGGER": { + "hide_name": 0, + "bits": [ 239 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1486" + } + }, + "GTGREFCLK": { + "hide_name": 0, + "bits": [ 240 ], + "attributes": { + "invertible_pin": "IS_GTGREFCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1488" + } + }, + "GTNORTHREFCLK0": { + "hide_name": 0, + "bits": [ 241 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1489" + } + }, + "GTNORTHREFCLK1": { + "hide_name": 0, + "bits": [ 242 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1490" + } + }, + "GTREFCLK0": { + "hide_name": 0, + "bits": [ 243 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1491" + } + }, + "GTREFCLK1": { + "hide_name": 0, + "bits": [ 244 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1492" + } + }, + "GTREFCLKMONITOR": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1415" + } + }, + "GTRESETSEL": { + "hide_name": 0, + "bits": [ 245 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1493" + } + }, + "GTRSVD": { + "hide_name": 0, + "bits": [ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1611" + } + }, + "GTRXRESET": { + "hide_name": 0, + "bits": [ 246 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1494" + } + }, + "GTSOUTHREFCLK0": { + "hide_name": 0, + "bits": [ 247 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1495" + } + }, + "GTSOUTHREFCLK1": { + "hide_name": 0, + "bits": [ 248 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1496" + } + }, + "GTTXRESET": { + "hide_name": 0, + "bits": [ 249 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1497" + } + }, + "GTXRXN": { + "hide_name": 0, + "bits": [ 250 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1498" + } + }, + "GTXRXP": { + "hide_name": 0, + "bits": [ 251 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1499" + } + }, + "GTXTXN": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1416" + } + }, + "GTXTXP": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1417" + } + }, + "LOOPBACK": { + "hide_name": 0, + "bits": [ 440, 441, 442 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1621" + } + }, + "PCSRSVDIN": { + "hide_name": 0, + "bits": [ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1612" + } + }, + "PCSRSVDIN2": { + "hide_name": 0, + "bits": [ 481, 482, 483, 484, 485 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1634" + } + }, + "PCSRSVDOUT": { + "hide_name": 0, + "bits": [ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1457" + } + }, + "PHYSTATUS": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1418" + } + }, + "PMARSVDIN": { + "hide_name": 0, + "bits": [ 491, 492, 493, 494, 495 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1636" + } + }, + "PMARSVDIN2": { + "hide_name": 0, + "bits": [ 486, 487, 488, 489, 490 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1635" + } + }, + "QPLLCLK": { + "hide_name": 0, + "bits": [ 252 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1500" + } + }, + "QPLLREFCLK": { + "hide_name": 0, + "bits": [ 253 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1501" + } + }, + "RESETOVRD": { + "hide_name": 0, + "bits": [ 254 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1502" + } + }, + "RX8B10BEN": { + "hide_name": 0, + "bits": [ 255 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1503" + } + }, + "RXBUFRESET": { + "hide_name": 0, + "bits": [ 256 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1504" + } + }, + "RXBUFSTATUS": { + "hide_name": 0, + "bits": [ 84, 85, 86 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1460" + } + }, + "RXBYTEISALIGNED": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1419" + } + }, + "RXBYTEREALIGN": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1420" + } + }, + "RXCDRFREQRESET": { + "hide_name": 0, + "bits": [ 257 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1505" + } + }, + "RXCDRHOLD": { + "hide_name": 0, + "bits": [ 258 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1506" + } + }, + "RXCDRLOCK": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1421" + } + }, + "RXCDROVRDEN": { + "hide_name": 0, + "bits": [ 259 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1507" + } + }, + "RXCDRRESET": { + "hide_name": 0, + "bits": [ 260 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1508" + } + }, + "RXCDRRESETRSV": { + "hide_name": 0, + "bits": [ 261 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1509" + } + }, + "RXCHANBONDSEQ": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1422" + } + }, + "RXCHANISALIGNED": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1423" + } + }, + "RXCHANREALIGN": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1424" + } + }, + "RXCHARISCOMMA": { + "hide_name": 0, + "bits": [ 187, 188, 189, 190, 191, 192, 193, 194 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1469" + } + }, + "RXCHARISK": { + "hide_name": 0, + "bits": [ 195, 196, 197, 198, 199, 200, 201, 202 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1470" + } + }, + "RXCHBONDEN": { + "hide_name": 0, + "bits": [ 262 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1510" + } + }, + "RXCHBONDI": { + "hide_name": 0, + "bits": [ 496, 497, 498, 499, 500 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1637" + } + }, + "RXCHBONDLEVEL": { + "hide_name": 0, + "bits": [ 443, 444, 445 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1622" + } + }, + "RXCHBONDMASTER": { + "hide_name": 0, + "bits": [ 263 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1511" + } + }, + "RXCHBONDO": { + "hide_name": 0, + "bits": [ 93, 94, 95, 96, 97 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1463" + } + }, + "RXCHBONDSLAVE": { + "hide_name": 0, + "bits": [ 264 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1512" + } + }, + "RXCLKCORCNT": { + "hide_name": 0, + "bits": [ 80, 81 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1458" + } + }, + "RXCOMINITDET": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1425" + } + }, + "RXCOMMADET": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1426" + } + }, + "RXCOMMADETEN": { + "hide_name": 0, + "bits": [ 265 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1513" + } + }, + "RXCOMSASDET": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1427" + } + }, + "RXCOMWAKEDET": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1428" + } + }, + "RXDATA": { + "hide_name": 0, + "bits": [ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1466" + } + }, + "RXDATAVALID": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1429" + } + }, + "RXDDIEN": { + "hide_name": 0, + "bits": [ 266 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1514" + } + }, + "RXDFEAGCHOLD": { + "hide_name": 0, + "bits": [ 267 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1515" + } + }, + "RXDFEAGCOVRDEN": { + "hide_name": 0, + "bits": [ 268 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1516" + } + }, + "RXDFECM1EN": { + "hide_name": 0, + "bits": [ 269 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1517" + } + }, + "RXDFELFHOLD": { + "hide_name": 0, + "bits": [ 270 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1518" + } + }, + "RXDFELFOVRDEN": { + "hide_name": 0, + "bits": [ 271 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1519" + } + }, + "RXDFELPMRESET": { + "hide_name": 0, + "bits": [ 272 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1520" + } + }, + "RXDFETAP2HOLD": { + "hide_name": 0, + "bits": [ 273 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1521" + } + }, + "RXDFETAP2OVRDEN": { + "hide_name": 0, + "bits": [ 274 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1522" + } + }, + "RXDFETAP3HOLD": { + "hide_name": 0, + "bits": [ 275 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1523" + } + }, + "RXDFETAP3OVRDEN": { + "hide_name": 0, + "bits": [ 276 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1524" + } + }, + "RXDFETAP4HOLD": { + "hide_name": 0, + "bits": [ 277 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1525" + } + }, + "RXDFETAP4OVRDEN": { + "hide_name": 0, + "bits": [ 278 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1526" + } + }, + "RXDFETAP5HOLD": { + "hide_name": 0, + "bits": [ 279 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1527" + } + }, + "RXDFETAP5OVRDEN": { + "hide_name": 0, + "bits": [ 280 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1528" + } + }, + "RXDFEUTHOLD": { + "hide_name": 0, + "bits": [ 281 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1529" + } + }, + "RXDFEUTOVRDEN": { + "hide_name": 0, + "bits": [ 282 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1530" + } + }, + "RXDFEVPHOLD": { + "hide_name": 0, + "bits": [ 283 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1531" + } + }, + "RXDFEVPOVRDEN": { + "hide_name": 0, + "bits": [ 284 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1532" + } + }, + "RXDFEVSEN": { + "hide_name": 0, + "bits": [ 285 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1533" + } + }, + "RXDFEXYDEN": { + "hide_name": 0, + "bits": [ 286 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1534" + } + }, + "RXDFEXYDHOLD": { + "hide_name": 0, + "bits": [ 287 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1535" + } + }, + "RXDFEXYDOVRDEN": { + "hide_name": 0, + "bits": [ 288 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1536" + } + }, + "RXDISPERR": { + "hide_name": 0, + "bits": [ 203, 204, 205, 206, 207, 208, 209, 210 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1471" + } + }, + "RXDLYBYPASS": { + "hide_name": 0, + "bits": [ 289 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1537" + } + }, + "RXDLYEN": { + "hide_name": 0, + "bits": [ 290 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1538" + } + }, + "RXDLYOVRDEN": { + "hide_name": 0, + "bits": [ 291 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1539" + } + }, + "RXDLYSRESET": { + "hide_name": 0, + "bits": [ 292 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1540" + } + }, + "RXDLYSRESETDONE": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1430" + } + }, + "RXELECIDLE": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1431" + } + }, + "RXELECIDLEMODE": { + "hide_name": 0, + "bits": [ 425, 426 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1614" + } + }, + "RXGEARBOXSLIP": { + "hide_name": 0, + "bits": [ 293 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1541" + } + }, + "RXHEADER": { + "hide_name": 0, + "bits": [ 87, 88, 89 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1461" + } + }, + "RXHEADERVALID": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1432" + } + }, + "RXLPMEN": { + "hide_name": 0, + "bits": [ 294 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1542" + } + }, + "RXLPMHFHOLD": { + "hide_name": 0, + "bits": [ 295 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1543" + } + }, + "RXLPMHFOVRDEN": { + "hide_name": 0, + "bits": [ 296 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1544" + } + }, + "RXLPMLFHOLD": { + "hide_name": 0, + "bits": [ 297 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1545" + } + }, + "RXLPMLFKLOVRDEN": { + "hide_name": 0, + "bits": [ 298 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1546" + } + }, + "RXMCOMMAALIGNEN": { + "hide_name": 0, + "bits": [ 299 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1547" + } + }, + "RXMONITOROUT": { + "hide_name": 0, + "bits": [ 172, 173, 174, 175, 176, 177, 178 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1467" + } + }, + "RXMONITORSEL": { + "hide_name": 0, + "bits": [ 427, 428 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1615" + } + }, + "RXNOTINTABLE": { + "hide_name": 0, + "bits": [ 211, 212, 213, 214, 215, 216, 217, 218 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1472" + } + }, + "RXOOBRESET": { + "hide_name": 0, + "bits": [ 300 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1548" + } + }, + "RXOSHOLD": { + "hide_name": 0, + "bits": [ 301 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1549" + } + }, + "RXOSOVRDEN": { + "hide_name": 0, + "bits": [ 302 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1550" + } + }, + "RXOUTCLK": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1433" + } + }, + "RXOUTCLKFABRIC": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1434" + } + }, + "RXOUTCLKPCS": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1435" + } + }, + "RXOUTCLKSEL": { + "hide_name": 0, + "bits": [ 446, 447, 448 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1623" + } + }, + "RXPCOMMAALIGNEN": { + "hide_name": 0, + "bits": [ 303 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1551" + } + }, + "RXPCSRESET": { + "hide_name": 0, + "bits": [ 304 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1552" + } + }, + "RXPD": { + "hide_name": 0, + "bits": [ 429, 430 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1616" + } + }, + "RXPHALIGN": { + "hide_name": 0, + "bits": [ 305 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1553" + } + }, + "RXPHALIGNDONE": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1436" + } + }, + "RXPHALIGNEN": { + "hide_name": 0, + "bits": [ 306 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1554" + } + }, + "RXPHDLYPD": { + "hide_name": 0, + "bits": [ 307 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1555" + } + }, + "RXPHDLYRESET": { + "hide_name": 0, + "bits": [ 308 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1556" + } + }, + "RXPHMONITOR": { + "hide_name": 0, + "bits": [ 98, 99, 100, 101, 102 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1464" + } + }, + "RXPHOVRDEN": { + "hide_name": 0, + "bits": [ 309 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1557" + } + }, + "RXPHSLIPMONITOR": { + "hide_name": 0, + "bits": [ 103, 104, 105, 106, 107 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1465" + } + }, + "RXPMARESET": { + "hide_name": 0, + "bits": [ 310 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1558" + } + }, + "RXPOLARITY": { + "hide_name": 0, + "bits": [ 311 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1559" + } + }, + "RXPRBSCNTRESET": { + "hide_name": 0, + "bits": [ 312 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1560" + } + }, + "RXPRBSERR": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1437" + } + }, + "RXPRBSSEL": { + "hide_name": 0, + "bits": [ 449, 450, 451 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1624" + } + }, + "RXQPIEN": { + "hide_name": 0, + "bits": [ 313 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1561" + } + }, + "RXQPISENN": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1438" + } + }, + "RXQPISENP": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1439" + } + }, + "RXRATE": { + "hide_name": 0, + "bits": [ 452, 453, 454 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1625" + } + }, + "RXRATEDONE": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1440" + } + }, + "RXRESETDONE": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1441" + } + }, + "RXSLIDE": { + "hide_name": 0, + "bits": [ 314 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1562" + } + }, + "RXSTARTOFSEQ": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1442" + } + }, + "RXSTATUS": { + "hide_name": 0, + "bits": [ 90, 91, 92 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1462" + } + }, + "RXSYSCLKSEL": { + "hide_name": 0, + "bits": [ 431, 432 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1617" + } + }, + "RXUSERRDY": { + "hide_name": 0, + "bits": [ 315 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1563" + } + }, + "RXUSRCLK": { + "hide_name": 0, + "bits": [ 317 ], + "attributes": { + "invertible_pin": "IS_RXUSRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1567" + } + }, + "RXUSRCLK2": { + "hide_name": 0, + "bits": [ 316 ], + "attributes": { + "invertible_pin": "IS_RXUSRCLK2_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1565" + } + }, + "RXVALID": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1443" + } + }, + "SETERRSTATUS": { + "hide_name": 0, + "bits": [ 318 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1568" + } + }, + "TSTIN": { + "hide_name": 0, + "bits": [ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1613" + } + }, + "TSTOUT": { + "hide_name": 0, + "bits": [ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1473" + } + }, + "TX8B10BBYPASS": { + "hide_name": 0, + "bits": [ 589, 590, 591, 592, 593, 594, 595, 596 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1643" + } + }, + "TX8B10BEN": { + "hide_name": 0, + "bits": [ 319 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1569" + } + }, + "TXBUFDIFFCTRL": { + "hide_name": 0, + "bits": [ 455, 456, 457 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1626" + } + }, + "TXBUFSTATUS": { + "hide_name": 0, + "bits": [ 82, 83 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1459" + } + }, + "TXCHARDISPMODE": { + "hide_name": 0, + "bits": [ 597, 598, 599, 600, 601, 602, 603, 604 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1644" + } + }, + "TXCHARDISPVAL": { + "hide_name": 0, + "bits": [ 605, 606, 607, 608, 609, 610, 611, 612 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1645" + } + }, + "TXCHARISK": { + "hide_name": 0, + "bits": [ 613, 614, 615, 616, 617, 618, 619, 620 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1646" + } + }, + "TXCOMFINISH": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1444" + } + }, + "TXCOMINIT": { + "hide_name": 0, + "bits": [ 320 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1570" + } + }, + "TXCOMSAS": { + "hide_name": 0, + "bits": [ 321 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1571" + } + }, + "TXCOMWAKE": { + "hide_name": 0, + "bits": [ 322 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1572" + } + }, + "TXDATA": { + "hide_name": 0, + "bits": [ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1640" + } + }, + "TXDEEMPH": { + "hide_name": 0, + "bits": [ 323 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1573" + } + }, + "TXDETECTRX": { + "hide_name": 0, + "bits": [ 324 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1574" + } + }, + "TXDIFFCTRL": { + "hide_name": 0, + "bits": [ 477, 478, 479, 480 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1633" + } + }, + "TXDIFFPD": { + "hide_name": 0, + "bits": [ 325 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1575" + } + }, + "TXDLYBYPASS": { + "hide_name": 0, + "bits": [ 326 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1576" + } + }, + "TXDLYEN": { + "hide_name": 0, + "bits": [ 327 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1577" + } + }, + "TXDLYHOLD": { + "hide_name": 0, + "bits": [ 328 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1578" + } + }, + "TXDLYOVRDEN": { + "hide_name": 0, + "bits": [ 329 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1579" + } + }, + "TXDLYSRESET": { + "hide_name": 0, + "bits": [ 330 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1580" + } + }, + "TXDLYSRESETDONE": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1445" + } + }, + "TXDLYUPDOWN": { + "hide_name": 0, + "bits": [ 331 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1581" + } + }, + "TXELECIDLE": { + "hide_name": 0, + "bits": [ 332 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1582" + } + }, + "TXGEARBOXREADY": { + "hide_name": 0, + "bits": [ 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1446" + } + }, + "TXHEADER": { + "hide_name": 0, + "bits": [ 458, 459, 460 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1627" + } + }, + "TXINHIBIT": { + "hide_name": 0, + "bits": [ 333 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1583" + } + }, + "TXMAINCURSOR": { + "hide_name": 0, + "bits": [ 575, 576, 577, 578, 579, 580, 581 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1641" + } + }, + "TXMARGIN": { + "hide_name": 0, + "bits": [ 461, 462, 463 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1628" + } + }, + "TXOUTCLK": { + "hide_name": 0, + "bits": [ 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1447" + } + }, + "TXOUTCLKFABRIC": { + "hide_name": 0, + "bits": [ 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1448" + } + }, + "TXOUTCLKPCS": { + "hide_name": 0, + "bits": [ 41 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1449" + } + }, + "TXOUTCLKSEL": { + "hide_name": 0, + "bits": [ 464, 465, 466 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1629" + } + }, + "TXPCSRESET": { + "hide_name": 0, + "bits": [ 334 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1584" + } + }, + "TXPD": { + "hide_name": 0, + "bits": [ 433, 434 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1618" + } + }, + "TXPDELECIDLEMODE": { + "hide_name": 0, + "bits": [ 335 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1585" + } + }, + "TXPHALIGN": { + "hide_name": 0, + "bits": [ 336 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1586" + } + }, + "TXPHALIGNDONE": { + "hide_name": 0, + "bits": [ 42 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1450" + } + }, + "TXPHALIGNEN": { + "hide_name": 0, + "bits": [ 337 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1587" + } + }, + "TXPHDLYPD": { + "hide_name": 0, + "bits": [ 338 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1588" + } + }, + "TXPHDLYRESET": { + "hide_name": 0, + "bits": [ 339 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1589" + } + }, + "TXPHDLYTSTCLK": { + "hide_name": 0, + "bits": [ 340 ], + "attributes": { + "invertible_pin": "IS_TXPHDLYTSTCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1591" + } + }, + "TXPHINIT": { + "hide_name": 0, + "bits": [ 341 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1592" + } + }, + "TXPHINITDONE": { + "hide_name": 0, + "bits": [ 43 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1451" + } + }, + "TXPHOVRDEN": { + "hide_name": 0, + "bits": [ 342 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1593" + } + }, + "TXPISOPD": { + "hide_name": 0, + "bits": [ 343 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1594" + } + }, + "TXPMARESET": { + "hide_name": 0, + "bits": [ 344 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1595" + } + }, + "TXPOLARITY": { + "hide_name": 0, + "bits": [ 345 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1596" + } + }, + "TXPOSTCURSOR": { + "hide_name": 0, + "bits": [ 501, 502, 503, 504, 505 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1638" + } + }, + "TXPOSTCURSORINV": { + "hide_name": 0, + "bits": [ 346 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1597" + } + }, + "TXPRBSFORCEERR": { + "hide_name": 0, + "bits": [ 347 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1598" + } + }, + "TXPRBSSEL": { + "hide_name": 0, + "bits": [ 467, 468, 469 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1630" + } + }, + "TXPRECURSOR": { + "hide_name": 0, + "bits": [ 506, 507, 508, 509, 510 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1639" + } + }, + "TXPRECURSORINV": { + "hide_name": 0, + "bits": [ 348 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1599" + } + }, + "TXQPIBIASEN": { + "hide_name": 0, + "bits": [ 349 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1600" + } + }, + "TXQPISENN": { + "hide_name": 0, + "bits": [ 44 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1452" + } + }, + "TXQPISENP": { + "hide_name": 0, + "bits": [ 45 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1453" + } + }, + "TXQPISTRONGPDOWN": { + "hide_name": 0, + "bits": [ 350 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1601" + } + }, + "TXQPIWEAKPUP": { + "hide_name": 0, + "bits": [ 351 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1602" + } + }, + "TXRATE": { + "hide_name": 0, + "bits": [ 470, 471, 472 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1631" + } + }, + "TXRATEDONE": { + "hide_name": 0, + "bits": [ 46 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1454" + } + }, + "TXRESETDONE": { + "hide_name": 0, + "bits": [ 47 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1455" + } + }, + "TXSEQUENCE": { + "hide_name": 0, + "bits": [ 582, 583, 584, 585, 586, 587, 588 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1642" + } + }, + "TXSTARTSEQ": { + "hide_name": 0, + "bits": [ 352 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1603" + } + }, + "TXSWING": { + "hide_name": 0, + "bits": [ 353 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1604" + } + }, + "TXSYSCLKSEL": { + "hide_name": 0, + "bits": [ 435, 436 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1619" + } + }, + "TXUSERRDY": { + "hide_name": 0, + "bits": [ 354 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1605" + } + }, + "TXUSRCLK": { + "hide_name": 0, + "bits": [ 356 ], + "attributes": { + "invertible_pin": "IS_TXUSRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1609" + } + }, + "TXUSRCLK2": { + "hide_name": 0, + "bits": [ 355 ], + "attributes": { + "invertible_pin": "IS_TXUSRCLK2_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1607" + } + } + } + }, + "GTXE2_COMMON": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1650" + }, + "ports": { + "DRPRDY": { + "direction": "output", + "bits": [ 2 ] + }, + "QPLLFBCLKLOST": { + "direction": "output", + "bits": [ 3 ] + }, + "QPLLLOCK": { + "direction": "output", + "bits": [ 4 ] + }, + "QPLLOUTCLK": { + "direction": "output", + "bits": [ 5 ] + }, + "QPLLOUTREFCLK": { + "direction": "output", + "bits": [ 6 ] + }, + "QPLLREFCLKLOST": { + "direction": "output", + "bits": [ 7 ] + }, + "REFCLKOUTMONITOR": { + "direction": "output", + "bits": [ 8 ] + }, + "DRPDO": { + "direction": "output", + "bits": [ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ] + }, + "QPLLDMONITOR": { + "direction": "output", + "bits": [ 25, 26, 27, 28, 29, 30, 31, 32 ] + }, + "BGBYPASSB": { + "direction": "input", + "bits": [ 33 ] + }, + "BGMONITORENB": { + "direction": "input", + "bits": [ 34 ] + }, + "BGPDB": { + "direction": "input", + "bits": [ 35 ] + }, + "DRPCLK": { + "direction": "input", + "bits": [ 36 ] + }, + "DRPEN": { + "direction": "input", + "bits": [ 37 ] + }, + "DRPWE": { + "direction": "input", + "bits": [ 38 ] + }, + "GTGREFCLK": { + "direction": "input", + "bits": [ 39 ] + }, + "GTNORTHREFCLK0": { + "direction": "input", + "bits": [ 40 ] + }, + "GTNORTHREFCLK1": { + "direction": "input", + "bits": [ 41 ] + }, + "GTREFCLK0": { + "direction": "input", + "bits": [ 42 ] + }, + "GTREFCLK1": { + "direction": "input", + "bits": [ 43 ] + }, + "GTSOUTHREFCLK0": { + "direction": "input", + "bits": [ 44 ] + }, + "GTSOUTHREFCLK1": { + "direction": "input", + "bits": [ 45 ] + }, + "QPLLLOCKDETCLK": { + "direction": "input", + "bits": [ 46 ] + }, + "QPLLLOCKEN": { + "direction": "input", + "bits": [ 47 ] + }, + "QPLLOUTRESET": { + "direction": "input", + "bits": [ 48 ] + }, + "QPLLPD": { + "direction": "input", + "bits": [ 49 ] + }, + "QPLLRESET": { + "direction": "input", + "bits": [ 50 ] + }, + "RCALENB": { + "direction": "input", + "bits": [ 51 ] + }, + "DRPDI": { + "direction": "input", + "bits": [ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 ] + }, + "QPLLRSVD1": { + "direction": "input", + "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 ] + }, + "QPLLREFCLKSEL": { + "direction": "input", + "bits": [ 84, 85, 86 ] + }, + "BGRCALOVRD": { + "direction": "input", + "bits": [ 87, 88, 89, 90, 91 ] + }, + "QPLLRSVD2": { + "direction": "input", + "bits": [ 92, 93, 94, 95, 96 ] + }, + "DRPADDR": { + "direction": "input", + "bits": [ 97, 98, 99, 100, 101, 102, 103, 104 ] + }, + "PMARSVD": { + "direction": "input", + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112 ] + } + }, + "cells": { + }, + "netnames": { + "BGBYPASSB": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1682" + } + }, + "BGMONITORENB": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1683" + } + }, + "BGPDB": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1684" + } + }, + "BGRCALOVRD": { + "hide_name": 0, + "bits": [ 87, 88, 89, 90, 91 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1707" + } + }, + "DRPADDR": { + "hide_name": 0, + "bits": [ 97, 98, 99, 100, 101, 102, 103, 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1709" + } + }, + "DRPCLK": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "invertible_pin": "IS_DRPCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1686" + } + }, + "DRPDI": { + "hide_name": 0, + "bits": [ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1704" + } + }, + "DRPDO": { + "hide_name": 0, + "bits": [ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1680" + } + }, + "DRPEN": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1687" + } + }, + "DRPRDY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1673" + } + }, + "DRPWE": { + "hide_name": 0, + "bits": [ 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1688" + } + }, + "GTGREFCLK": { + "hide_name": 0, + "bits": [ 39 ], + "attributes": { + "invertible_pin": "IS_GTGREFCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1690" + } + }, + "GTNORTHREFCLK0": { + "hide_name": 0, + "bits": [ 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1691" + } + }, + "GTNORTHREFCLK1": { + "hide_name": 0, + "bits": [ 41 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1692" + } + }, + "GTREFCLK0": { + "hide_name": 0, + "bits": [ 42 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1693" + } + }, + "GTREFCLK1": { + "hide_name": 0, + "bits": [ 43 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1694" + } + }, + "GTSOUTHREFCLK0": { + "hide_name": 0, + "bits": [ 44 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1695" + } + }, + "GTSOUTHREFCLK1": { + "hide_name": 0, + "bits": [ 45 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1696" + } + }, + "PMARSVD": { + "hide_name": 0, + "bits": [ 105, 106, 107, 108, 109, 110, 111, 112 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1710" + } + }, + "QPLLDMONITOR": { + "hide_name": 0, + "bits": [ 25, 26, 27, 28, 29, 30, 31, 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1681" + } + }, + "QPLLFBCLKLOST": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1674" + } + }, + "QPLLLOCK": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1675" + } + }, + "QPLLLOCKDETCLK": { + "hide_name": 0, + "bits": [ 46 ], + "attributes": { + "invertible_pin": "IS_QPLLLOCKDETCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1698" + } + }, + "QPLLLOCKEN": { + "hide_name": 0, + "bits": [ 47 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1699" + } + }, + "QPLLOUTCLK": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1676" + } + }, + "QPLLOUTREFCLK": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1677" + } + }, + "QPLLOUTRESET": { + "hide_name": 0, + "bits": [ 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1700" + } + }, + "QPLLPD": { + "hide_name": 0, + "bits": [ 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1701" + } + }, + "QPLLREFCLKLOST": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1678" + } + }, + "QPLLREFCLKSEL": { + "hide_name": 0, + "bits": [ 84, 85, 86 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1706" + } + }, + "QPLLRESET": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1702" + } + }, + "QPLLRSVD1": { + "hide_name": 0, + "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1705" + } + }, + "QPLLRSVD2": { + "hide_name": 0, + "bits": [ 92, 93, 94, 95, 96 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1708" + } + }, + "RCALENB": { + "hide_name": 0, + "bits": [ 51 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1703" + } + }, + "REFCLKOUTMONITOR": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1679" + } + } + } + }, + "IBUF": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:32" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:35" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:33" + } + } + } + }, + "IBUFDS": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3830" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + }, + "IB": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3840" + } + }, + "IB": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3842" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3838" + } + } + } + }, + "IBUFDS_DIFF_OUT": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3845" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "OB": { + "direction": "output", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + }, + "IB": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3853" + } + }, + "IB": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3855" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3850" + } + }, + "OB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3851" + } + } + } + }, + "IBUFDS_DIFF_OUT_IBUFDISABLE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3858" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "OB": { + "direction": "output", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + }, + "IB": { + "direction": "input", + "bits": [ 5 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3868" + } + }, + "IB": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3870" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3871" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3865" + } + }, + "OB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3866" + } + } + } + }, + "IBUFDS_DIFF_OUT_INTERMDISABLE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3874" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "OB": { + "direction": "output", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + }, + "IB": { + "direction": "input", + "bits": [ 5 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 6 ] + }, + "INTERMDISABLE": { + "direction": "input", + "bits": [ 7 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3884" + } + }, + "IB": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3886" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3887" + } + }, + "INTERMDISABLE": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3888" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3881" + } + }, + "OB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3882" + } + } + } + }, + "IBUFDS_GTE2": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3891" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "ODIV2": { + "direction": "output", + "bits": [ 3 ] + }, + "CEB": { + "direction": "input", + "bits": [ 4 ] + }, + "I": { + "direction": "input", + "bits": [ 5 ] + }, + "IB": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "CEB": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3897" + } + }, + "I": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3899" + } + }, + "IB": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3901" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3895" + } + }, + "ODIV2": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3896" + } + } + } + }, + "IBUFDS_IBUFDISABLE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3904" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + }, + "IB": { + "direction": "input", + "bits": [ 4 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3913" + } + }, + "IB": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3915" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3916" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3911" + } + } + } + }, + "IBUFDS_INTERMDISABLE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3919" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + }, + "IB": { + "direction": "input", + "bits": [ 4 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 5 ] + }, + "INTERMDISABLE": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3928" + } + }, + "IB": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3930" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3931" + } + }, + "INTERMDISABLE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3932" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3926" + } + } + } + }, + "IBUFG": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:41" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:44" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:42" + } + } + } + }, + "IBUFGDS": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3935" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + }, + "IB": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3943" + } + }, + "IB": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3945" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3941" + } + } + } + }, + "IBUFGDS_DIFF_OUT": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3948" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "OB": { + "direction": "output", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + }, + "IB": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3956" + } + }, + "IB": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3958" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3953" + } + }, + "OB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3954" + } + } + } + }, + "IBUF_IBUFDISABLE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3807" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3814" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3815" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3812" + } + } + } + }, + "IBUF_INTERMDISABLE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3818" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 4 ] + }, + "INTERMDISABLE": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3825" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3826" + } + }, + "INTERMDISABLE": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3827" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3823" + } + } + } + }, + "ICAPE2": { + "attributes": { + "blackbox": 1, + "keep": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3765" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 ] + }, + "CLK": { + "direction": "input", + "bits": [ 34 ] + }, + "CSIB": { + "direction": "input", + "bits": [ 35 ] + }, + "RDWRB": { + "direction": "input", + "bits": [ 36 ] + }, + "I": { + "direction": "input", + "bits": [ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 ] + } + }, + "cells": { + }, + "netnames": { + "CLK": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3770" + } + }, + "CSIB": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3771" + } + }, + "I": { + "hide_name": 0, + "bits": [ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3773" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3769" + } + }, + "RDWRB": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3772" + } + } + } + }, + "IDDR": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5010" + }, + "ports": { + "Q1": { + "direction": "output", + "bits": [ 2 ] + }, + "Q2": { + "direction": "output", + "bits": [ 3 ] + }, + "C": { + "direction": "input", + "bits": [ 4 ] + }, + "CE": { + "direction": "input", + "bits": [ 5 ] + }, + "D": { + "direction": "input", + "bits": [ 6 ] + }, + "R": { + "direction": "input", + "bits": [ 7 ] + }, + "S": { + "direction": "input", + "bits": [ 8 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_C_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5023" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5024" + } + }, + "D": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "invertible_pin": "IS_D_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5026" + } + }, + "Q1": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5019" + } + }, + "Q2": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5020" + } + }, + "R": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5027" + } + }, + "S": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5028" + } + } + } + }, + "IDDR_2CLK": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5031" + }, + "ports": { + "Q1": { + "direction": "output", + "bits": [ 2 ] + }, + "Q2": { + "direction": "output", + "bits": [ 3 ] + }, + "C": { + "direction": "input", + "bits": [ 4 ] + }, + "CB": { + "direction": "input", + "bits": [ 5 ] + }, + "CE": { + "direction": "input", + "bits": [ 6 ] + }, + "D": { + "direction": "input", + "bits": [ 7 ] + }, + "R": { + "direction": "input", + "bits": [ 8 ] + }, + "S": { + "direction": "input", + "bits": [ 9 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_C_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5043" + } + }, + "CB": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CB_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5046" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5047" + } + }, + "D": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "invertible_pin": "IS_D_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5049" + } + }, + "Q1": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5039" + } + }, + "Q2": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5040" + } + }, + "R": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5050" + } + }, + "S": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5051" + } + } + } + }, + "IDELAYCTRL": { + "attributes": { + "blackbox": 1, + "keep": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3962" + }, + "ports": { + "RDY": { + "direction": "output", + "bits": [ 2 ] + }, + "REFCLK": { + "direction": "input", + "bits": [ 3 ] + }, + "RST": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "RDY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3964" + } + }, + "REFCLK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3966" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3967" + } + } + } + }, + "IDELAYE2": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3970" + }, + "ports": { + "CNTVALUEOUT": { + "direction": "output", + "bits": [ 2, 3, 4, 5, 6 ] + }, + "DATAOUT": { + "direction": "output", + "bits": [ 7 ] + }, + "C": { + "direction": "input", + "bits": [ 8 ] + }, + "CE": { + "direction": "input", + "bits": [ 9 ] + }, + "CINVCTRL": { + "direction": "input", + "bits": [ 10 ] + }, + "CNTVALUEIN": { + "direction": "input", + "bits": [ 11, 12, 13, 14, 15 ] + }, + "DATAIN": { + "direction": "input", + "bits": [ 16 ] + }, + "IDATAIN": { + "direction": "input", + "bits": [ 17 ] + }, + "INC": { + "direction": "input", + "bits": [ 18 ] + }, + "LD": { + "direction": "input", + "bits": [ 19 ] + }, + "LDPIPEEN": { + "direction": "input", + "bits": [ 20 ] + }, + "REGRST": { + "direction": "input", + "bits": [ 21 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_C_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3987" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3988" + } + }, + "CINVCTRL": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3989" + } + }, + "CNTVALUEIN": { + "hide_name": 0, + "bits": [ 11, 12, 13, 14, 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3990" + } + }, + "CNTVALUEOUT": { + "hide_name": 0, + "bits": [ 2, 3, 4, 5, 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3983" + } + }, + "DATAIN": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "invertible_pin": "IS_DATAIN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3992" + } + }, + "DATAOUT": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3984" + } + }, + "IDATAIN": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "invertible_pin": "IS_IDATAIN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3994" + } + }, + "INC": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3995" + } + }, + "LD": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3996" + } + }, + "LDPIPEEN": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3997" + } + }, + "REGRST": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3998" + } + } + } + }, + "INV": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:129" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:129" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:129" + } + } + } + }, + "IN_FIFO": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4001" + }, + "ports": { + "ALMOSTEMPTY": { + "direction": "output", + "bits": [ 2 ] + }, + "ALMOSTFULL": { + "direction": "output", + "bits": [ 3 ] + }, + "EMPTY": { + "direction": "output", + "bits": [ 4 ] + }, + "FULL": { + "direction": "output", + "bits": [ 5 ] + }, + "Q0": { + "direction": "output", + "bits": [ 6, 7, 8, 9, 10, 11, 12, 13 ] + }, + "Q1": { + "direction": "output", + "bits": [ 14, 15, 16, 17, 18, 19, 20, 21 ] + }, + "Q2": { + "direction": "output", + "bits": [ 22, 23, 24, 25, 26, 27, 28, 29 ] + }, + "Q3": { + "direction": "output", + "bits": [ 30, 31, 32, 33, 34, 35, 36, 37 ] + }, + "Q4": { + "direction": "output", + "bits": [ 38, 39, 40, 41, 42, 43, 44, 45 ] + }, + "Q5": { + "direction": "output", + "bits": [ 46, 47, 48, 49, 50, 51, 52, 53 ] + }, + "Q6": { + "direction": "output", + "bits": [ 54, 55, 56, 57, 58, 59, 60, 61 ] + }, + "Q7": { + "direction": "output", + "bits": [ 62, 63, 64, 65, 66, 67, 68, 69 ] + }, + "Q8": { + "direction": "output", + "bits": [ 70, 71, 72, 73, 74, 75, 76, 77 ] + }, + "Q9": { + "direction": "output", + "bits": [ 78, 79, 80, 81, 82, 83, 84, 85 ] + }, + "RDCLK": { + "direction": "input", + "bits": [ 86 ] + }, + "RDEN": { + "direction": "input", + "bits": [ 87 ] + }, + "RESET": { + "direction": "input", + "bits": [ 88 ] + }, + "WRCLK": { + "direction": "input", + "bits": [ 89 ] + }, + "WREN": { + "direction": "input", + "bits": [ 90 ] + }, + "D0": { + "direction": "input", + "bits": [ 91, 92, 93, 94 ] + }, + "D1": { + "direction": "input", + "bits": [ 95, 96, 97, 98 ] + }, + "D2": { + "direction": "input", + "bits": [ 99, 100, 101, 102 ] + }, + "D3": { + "direction": "input", + "bits": [ 103, 104, 105, 106 ] + }, + "D4": { + "direction": "input", + "bits": [ 107, 108, 109, 110 ] + }, + "D7": { + "direction": "input", + "bits": [ 111, 112, 113, 114 ] + }, + "D8": { + "direction": "input", + "bits": [ 115, 116, 117, 118 ] + }, + "D9": { + "direction": "input", + "bits": [ 119, 120, 121, 122 ] + }, + "D5": { + "direction": "input", + "bits": [ 123, 124, 125, 126, 127, 128, 129, 130 ] + }, + "D6": { + "direction": "input", + "bits": [ 131, 132, 133, 134, 135, 136, 137, 138 ] + } + }, + "cells": { + }, + "netnames": { + "ALMOSTEMPTY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4006" + } + }, + "ALMOSTFULL": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4007" + } + }, + "D0": { + "hide_name": 0, + "bits": [ 91, 92, 93, 94 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4027" + } + }, + "D1": { + "hide_name": 0, + "bits": [ 95, 96, 97, 98 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4028" + } + }, + "D2": { + "hide_name": 0, + "bits": [ 99, 100, 101, 102 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4029" + } + }, + "D3": { + "hide_name": 0, + "bits": [ 103, 104, 105, 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4030" + } + }, + "D4": { + "hide_name": 0, + "bits": [ 107, 108, 109, 110 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4031" + } + }, + "D5": { + "hide_name": 0, + "bits": [ 123, 124, 125, 126, 127, 128, 129, 130 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4035" + } + }, + "D6": { + "hide_name": 0, + "bits": [ 131, 132, 133, 134, 135, 136, 137, 138 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4036" + } + }, + "D7": { + "hide_name": 0, + "bits": [ 111, 112, 113, 114 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4032" + } + }, + "D8": { + "hide_name": 0, + "bits": [ 115, 116, 117, 118 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4033" + } + }, + "D9": { + "hide_name": 0, + "bits": [ 119, 120, 121, 122 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4034" + } + }, + "EMPTY": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4008" + } + }, + "FULL": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4009" + } + }, + "Q0": { + "hide_name": 0, + "bits": [ 6, 7, 8, 9, 10, 11, 12, 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4010" + } + }, + "Q1": { + "hide_name": 0, + "bits": [ 14, 15, 16, 17, 18, 19, 20, 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4011" + } + }, + "Q2": { + "hide_name": 0, + "bits": [ 22, 23, 24, 25, 26, 27, 28, 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4012" + } + }, + "Q3": { + "hide_name": 0, + "bits": [ 30, 31, 32, 33, 34, 35, 36, 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4013" + } + }, + "Q4": { + "hide_name": 0, + "bits": [ 38, 39, 40, 41, 42, 43, 44, 45 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4014" + } + }, + "Q5": { + "hide_name": 0, + "bits": [ 46, 47, 48, 49, 50, 51, 52, 53 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4015" + } + }, + "Q6": { + "hide_name": 0, + "bits": [ 54, 55, 56, 57, 58, 59, 60, 61 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4016" + } + }, + "Q7": { + "hide_name": 0, + "bits": [ 62, 63, 64, 65, 66, 67, 68, 69 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4017" + } + }, + "Q8": { + "hide_name": 0, + "bits": [ 70, 71, 72, 73, 74, 75, 76, 77 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4018" + } + }, + "Q9": { + "hide_name": 0, + "bits": [ 78, 79, 80, 81, 82, 83, 84, 85 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4019" + } + }, + "RDCLK": { + "hide_name": 0, + "bits": [ 86 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4021" + } + }, + "RDEN": { + "hide_name": 0, + "bits": [ 87 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4022" + } + }, + "RESET": { + "hide_name": 0, + "bits": [ 88 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4023" + } + }, + "WRCLK": { + "hide_name": 0, + "bits": [ 89 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4025" + } + }, + "WREN": { + "hide_name": 0, + "bits": [ 90 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4026" + } + } + } + }, + "IOBUF": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4039" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "IO": { + "direction": "inout", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + }, + "T": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4047" + } + }, + "IO": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4046" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4044" + } + }, + "T": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4048" + } + } + } + }, + "IOBUFDS": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4083" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "IO": { + "direction": "inout", + "bits": [ 3 ] + }, + "IOB": { + "direction": "inout", + "bits": [ 4 ] + }, + "I": { + "direction": "input", + "bits": [ 5 ] + }, + "T": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4093" + } + }, + "IO": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4091" + } + }, + "IOB": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4092" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4089" + } + }, + "T": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4094" + } + } + } + }, + "IOBUFDS_DCIEN": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4097" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "IO": { + "direction": "inout", + "bits": [ 3 ] + }, + "IOB": { + "direction": "inout", + "bits": [ 4 ] + }, + "DCITERMDISABLE": { + "direction": "input", + "bits": [ 5 ] + }, + "I": { + "direction": "input", + "bits": [ 6 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 7 ] + }, + "T": { + "direction": "input", + "bits": [ 8 ] + } + }, + "cells": { + }, + "netnames": { + "DCITERMDISABLE": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4110" + } + }, + "I": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4111" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4112" + } + }, + "IO": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4107" + } + }, + "IOB": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4109" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4105" + } + }, + "T": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4113" + } + } + } + }, + "IOBUFDS_DIFF_OUT": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4116" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "OB": { + "direction": "output", + "bits": [ 3 ] + }, + "IO": { + "direction": "inout", + "bits": [ 4 ] + }, + "IOB": { + "direction": "inout", + "bits": [ 5 ] + }, + "I": { + "direction": "input", + "bits": [ 6 ] + }, + "TM": { + "direction": "input", + "bits": [ 7 ] + }, + "TS": { + "direction": "input", + "bits": [ 8 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4127" + } + }, + "IO": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4124" + } + }, + "IOB": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4126" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4121" + } + }, + "OB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4122" + } + }, + "TM": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4128" + } + }, + "TS": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4129" + } + } + } + }, + "IOBUFDS_DIFF_OUT_DCIEN": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4132" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "OB": { + "direction": "output", + "bits": [ 3 ] + }, + "IO": { + "direction": "inout", + "bits": [ 4 ] + }, + "IOB": { + "direction": "inout", + "bits": [ 5 ] + }, + "DCITERMDISABLE": { + "direction": "input", + "bits": [ 6 ] + }, + "I": { + "direction": "input", + "bits": [ 7 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 8 ] + }, + "TM": { + "direction": "input", + "bits": [ 9 ] + }, + "TS": { + "direction": "input", + "bits": [ 10 ] + } + }, + "cells": { + }, + "netnames": { + "DCITERMDISABLE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4145" + } + }, + "I": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4146" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4147" + } + }, + "IO": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4142" + } + }, + "IOB": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4144" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4139" + } + }, + "OB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4140" + } + }, + "TM": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4148" + } + }, + "TS": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4149" + } + } + } + }, + "IOBUFDS_DIFF_OUT_INTERMDISABLE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4152" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "OB": { + "direction": "output", + "bits": [ 3 ] + }, + "IO": { + "direction": "inout", + "bits": [ 4 ] + }, + "IOB": { + "direction": "inout", + "bits": [ 5 ] + }, + "I": { + "direction": "input", + "bits": [ 6 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 7 ] + }, + "INTERMDISABLE": { + "direction": "input", + "bits": [ 8 ] + }, + "TM": { + "direction": "input", + "bits": [ 9 ] + }, + "TS": { + "direction": "input", + "bits": [ 10 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4165" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4166" + } + }, + "INTERMDISABLE": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4167" + } + }, + "IO": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4162" + } + }, + "IOB": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4164" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4159" + } + }, + "OB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4160" + } + }, + "TM": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4168" + } + }, + "TS": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4169" + } + } + } + }, + "IOBUFDS_INTERMDISABLE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4172" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "IO": { + "direction": "inout", + "bits": [ 3 ] + }, + "IOB": { + "direction": "inout", + "bits": [ 4 ] + }, + "I": { + "direction": "input", + "bits": [ 5 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 6 ] + }, + "INTERMDISABLE": { + "direction": "input", + "bits": [ 7 ] + }, + "T": { + "direction": "input", + "bits": [ 8 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4185" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4186" + } + }, + "INTERMDISABLE": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4187" + } + }, + "IO": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4182" + } + }, + "IOB": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4184" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4180" + } + }, + "T": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4188" + } + } + } + }, + "IOBUF_DCIEN": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4051" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "IO": { + "direction": "inout", + "bits": [ 3 ] + }, + "DCITERMDISABLE": { + "direction": "input", + "bits": [ 4 ] + }, + "I": { + "direction": "input", + "bits": [ 5 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 6 ] + }, + "T": { + "direction": "input", + "bits": [ 7 ] + } + }, + "cells": { + }, + "netnames": { + "DCITERMDISABLE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4061" + } + }, + "I": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4062" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4063" + } + }, + "IO": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4060" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4058" + } + }, + "T": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4064" + } + } + } + }, + "IOBUF_INTERMDISABLE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4067" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "IO": { + "direction": "inout", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + }, + "IBUFDISABLE": { + "direction": "input", + "bits": [ 5 ] + }, + "INTERMDISABLE": { + "direction": "input", + "bits": [ 6 ] + }, + "T": { + "direction": "input", + "bits": [ 7 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4077" + } + }, + "IBUFDISABLE": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4078" + } + }, + "INTERMDISABLE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4079" + } + }, + "IO": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4076" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4074" + } + }, + "T": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4080" + } + } + } + }, + "ISERDESE2": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4191" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "Q1": { + "direction": "output", + "bits": [ 3 ] + }, + "Q2": { + "direction": "output", + "bits": [ 4 ] + }, + "Q3": { + "direction": "output", + "bits": [ 5 ] + }, + "Q4": { + "direction": "output", + "bits": [ 6 ] + }, + "Q5": { + "direction": "output", + "bits": [ 7 ] + }, + "Q6": { + "direction": "output", + "bits": [ 8 ] + }, + "Q7": { + "direction": "output", + "bits": [ 9 ] + }, + "Q8": { + "direction": "output", + "bits": [ 10 ] + }, + "SHIFTOUT1": { + "direction": "output", + "bits": [ 11 ] + }, + "SHIFTOUT2": { + "direction": "output", + "bits": [ 12 ] + }, + "BITSLIP": { + "direction": "input", + "bits": [ 13 ] + }, + "CE1": { + "direction": "input", + "bits": [ 14 ] + }, + "CE2": { + "direction": "input", + "bits": [ 15 ] + }, + "CLK": { + "direction": "input", + "bits": [ 16 ] + }, + "CLKB": { + "direction": "input", + "bits": [ 17 ] + }, + "CLKDIV": { + "direction": "input", + "bits": [ 18 ] + }, + "CLKDIVP": { + "direction": "input", + "bits": [ 19 ] + }, + "D": { + "direction": "input", + "bits": [ 20 ] + }, + "DDLY": { + "direction": "input", + "bits": [ 21 ] + }, + "DYNCLKDIVSEL": { + "direction": "input", + "bits": [ 22 ] + }, + "DYNCLKSEL": { + "direction": "input", + "bits": [ 23 ] + }, + "OCLK": { + "direction": "input", + "bits": [ 24 ] + }, + "OCLKB": { + "direction": "input", + "bits": [ 25 ] + }, + "OFB": { + "direction": "input", + "bits": [ 26 ] + }, + "RST": { + "direction": "input", + "bits": [ 27 ] + }, + "SHIFTIN1": { + "direction": "input", + "bits": [ 28 ] + }, + "SHIFTIN2": { + "direction": "input", + "bits": [ 29 ] + } + }, + "cells": { + }, + "netnames": { + "BITSLIP": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4227" + } + }, + "CE1": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4228" + } + }, + "CE2": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4229" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4232" + } + }, + "CLKB": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLKB_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4235" + } + }, + "CLKDIV": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLKDIV_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4238" + } + }, + "CLKDIVP": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLKDIVP_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4241" + } + }, + "D": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "invertible_pin": "IS_D_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4243" + } + }, + "DDLY": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4244" + } + }, + "DYNCLKDIVSEL": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4245" + } + }, + "DYNCLKSEL": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4246" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4216" + } + }, + "OCLK": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_OCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4249" + } + }, + "OCLKB": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_OCLKB_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4252" + } + }, + "OFB": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4253" + } + }, + "Q1": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4217" + } + }, + "Q2": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4218" + } + }, + "Q3": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4219" + } + }, + "Q4": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4220" + } + }, + "Q5": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4221" + } + }, + "Q6": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4222" + } + }, + "Q7": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4223" + } + }, + "Q8": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4224" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4254" + } + }, + "SHIFTIN1": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4255" + } + }, + "SHIFTIN2": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4256" + } + }, + "SHIFTOUT1": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4225" + } + }, + "SHIFTOUT2": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4226" + } + } + } + }, + "KEEPER": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4259" + }, + "ports": { + "O": { + "direction": "inout", + "bits": [ 2 ] + } + }, + "cells": { + }, + "netnames": { + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4260" + } + } + } + }, + "LDCE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:398" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "CLR": { + "direction": "input", + "bits": [ 3 ] + }, + "D": { + "direction": "input", + "bits": [ 4 ] + }, + "G": { + "direction": "input", + "bits": [ 5 ] + }, + "GE": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "CLR": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "invertible_pin": "IS_CLR_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:401" + } + }, + "D": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:402" + } + }, + "G": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_G_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:404" + } + }, + "GE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:405" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:399" + } + } + } + }, + "LDPE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:420" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "D": { + "direction": "input", + "bits": [ 3 ] + }, + "G": { + "direction": "input", + "bits": [ 4 ] + }, + "GE": { + "direction": "input", + "bits": [ 5 ] + }, + "PRE": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "D": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:422" + } + }, + "G": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "invertible_pin": "IS_G_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:424" + } + }, + "GE": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:425" + } + }, + "PRE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "invertible_pin": "IS_PRE_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:427" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:421" + } + } + } + }, + "LUT1": { + "attributes": { + "blackbox": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:133" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:133" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:133" + } + } + } + }, + "LUT2": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:138" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:138" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:138" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:138" + } + } + } + }, + "LUT3": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "I2": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" + } + }, + "I2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" + } + } + } + }, + "LUT4": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "I2": { + "direction": "input", + "bits": [ 5 ] + }, + "I3": { + "direction": "input", + "bits": [ 6 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" + } + }, + "I2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" + } + }, + "I3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" + } + } + } + }, + "LUT5": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "I2": { + "direction": "input", + "bits": [ 5 ] + }, + "I3": { + "direction": "input", + "bits": [ 6 ] + }, + "I4": { + "direction": "input", + "bits": [ 7 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" + } + }, + "I2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" + } + }, + "I3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" + } + }, + "I4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" + } + } + } + }, + "LUT6": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "I2": { + "direction": "input", + "bits": [ 5 ] + }, + "I3": { + "direction": "input", + "bits": [ 6 ] + }, + "I4": { + "direction": "input", + "bits": [ 7 ] + }, + "I5": { + "direction": "input", + "bits": [ 8 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" + } + }, + "I2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" + } + }, + "I3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" + } + }, + "I4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" + } + }, + "I5": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" + } + } + } + }, + "LUT6_2": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" + }, + "ports": { + "O6": { + "direction": "output", + "bits": [ 2 ] + }, + "O5": { + "direction": "output", + "bits": [ 3 ] + }, + "I0": { + "direction": "input", + "bits": [ 4 ] + }, + "I1": { + "direction": "input", + "bits": [ 5 ] + }, + "I2": { + "direction": "input", + "bits": [ 6 ] + }, + "I3": { + "direction": "input", + "bits": [ 7 ] + }, + "I4": { + "direction": "input", + "bits": [ 8 ] + }, + "I5": { + "direction": "input", + "bits": [ 9 ] + } + }, + "cells": { + }, + "netnames": { + "I0": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" + } + }, + "I2": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" + } + }, + "I3": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" + } + }, + "I4": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" + } + }, + "I5": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" + } + }, + "O5": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" + } + }, + "O6": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" + } + } + } + }, + "MMCME2_ADV": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3463" + }, + "ports": { + "CLKFBOUT": { + "direction": "output", + "bits": [ 2 ] + }, + "CLKFBOUTB": { + "direction": "output", + "bits": [ 3 ] + }, + "CLKFBSTOPPED": { + "direction": "output", + "bits": [ 4 ] + }, + "CLKINSTOPPED": { + "direction": "output", + "bits": [ 5 ] + }, + "CLKOUT0": { + "direction": "output", + "bits": [ 6 ] + }, + "CLKOUT0B": { + "direction": "output", + "bits": [ 7 ] + }, + "CLKOUT1": { + "direction": "output", + "bits": [ 8 ] + }, + "CLKOUT1B": { + "direction": "output", + "bits": [ 9 ] + }, + "CLKOUT2": { + "direction": "output", + "bits": [ 10 ] + }, + "CLKOUT2B": { + "direction": "output", + "bits": [ 11 ] + }, + "CLKOUT3": { + "direction": "output", + "bits": [ 12 ] + }, + "CLKOUT3B": { + "direction": "output", + "bits": [ 13 ] + }, + "CLKOUT4": { + "direction": "output", + "bits": [ 14 ] + }, + "CLKOUT5": { + "direction": "output", + "bits": [ 15 ] + }, + "CLKOUT6": { + "direction": "output", + "bits": [ 16 ] + }, + "DO": { + "direction": "output", + "bits": [ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 ] + }, + "DRDY": { + "direction": "output", + "bits": [ 33 ] + }, + "LOCKED": { + "direction": "output", + "bits": [ 34 ] + }, + "PSDONE": { + "direction": "output", + "bits": [ 35 ] + }, + "CLKFBIN": { + "direction": "input", + "bits": [ 36 ] + }, + "CLKIN1": { + "direction": "input", + "bits": [ 37 ] + }, + "CLKIN2": { + "direction": "input", + "bits": [ 38 ] + }, + "CLKINSEL": { + "direction": "input", + "bits": [ 39 ] + }, + "DADDR": { + "direction": "input", + "bits": [ 40, 41, 42, 43, 44, 45, 46 ] + }, + "DCLK": { + "direction": "input", + "bits": [ 47 ] + }, + "DEN": { + "direction": "input", + "bits": [ 48 ] + }, + "DI": { + "direction": "input", + "bits": [ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ] + }, + "DWE": { + "direction": "input", + "bits": [ 65 ] + }, + "PSCLK": { + "direction": "input", + "bits": [ 66 ] + }, + "PSEN": { + "direction": "input", + "bits": [ 67 ] + }, + "PSINCDEC": { + "direction": "input", + "bits": [ 68 ] + }, + "PWRDWN": { + "direction": "input", + "bits": [ 69 ] + }, + "RST": { + "direction": "input", + "bits": [ 70 ] + } + }, + "cells": { + }, + "netnames": { + "CLKFBIN": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3538" + } + }, + "CLKFBOUT": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3519" + } + }, + "CLKFBOUTB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3520" + } + }, + "CLKFBSTOPPED": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3521" + } + }, + "CLKIN1": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3539" + } + }, + "CLKIN2": { + "hide_name": 0, + "bits": [ 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3540" + } + }, + "CLKINSEL": { + "hide_name": 0, + "bits": [ 39 ], + "attributes": { + "invertible_pin": "IS_CLKINSEL_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3542" + } + }, + "CLKINSTOPPED": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3522" + } + }, + "CLKOUT0": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3523" + } + }, + "CLKOUT0B": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3524" + } + }, + "CLKOUT1": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3525" + } + }, + "CLKOUT1B": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3526" + } + }, + "CLKOUT2": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3527" + } + }, + "CLKOUT2B": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3528" + } + }, + "CLKOUT3": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3529" + } + }, + "CLKOUT3B": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3530" + } + }, + "CLKOUT4": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3531" + } + }, + "CLKOUT5": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3532" + } + }, + "CLKOUT6": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3533" + } + }, + "DADDR": { + "hide_name": 0, + "bits": [ 40, 41, 42, 43, 44, 45, 46 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3543" + } + }, + "DCLK": { + "hide_name": 0, + "bits": [ 47 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3544" + } + }, + "DEN": { + "hide_name": 0, + "bits": [ 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3545" + } + }, + "DI": { + "hide_name": 0, + "bits": [ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3546" + } + }, + "DO": { + "hide_name": 0, + "bits": [ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3534" + } + }, + "DRDY": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3535" + } + }, + "DWE": { + "hide_name": 0, + "bits": [ 65 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3547" + } + }, + "LOCKED": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3536" + } + }, + "PSCLK": { + "hide_name": 0, + "bits": [ 66 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3548" + } + }, + "PSDONE": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3537" + } + }, + "PSEN": { + "hide_name": 0, + "bits": [ 67 ], + "attributes": { + "invertible_pin": "IS_PSEN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3550" + } + }, + "PSINCDEC": { + "hide_name": 0, + "bits": [ 68 ], + "attributes": { + "invertible_pin": "IS_PSINCDEC_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3552" + } + }, + "PWRDWN": { + "hide_name": 0, + "bits": [ 69 ], + "attributes": { + "invertible_pin": "IS_PWRDWN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3554" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 70 ], + "attributes": { + "invertible_pin": "IS_RST_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3556" + } + } + } + }, + "MMCME2_BASE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3559" + }, + "ports": { + "CLKFBOUT": { + "direction": "output", + "bits": [ 2 ] + }, + "CLKFBOUTB": { + "direction": "output", + "bits": [ 3 ] + }, + "CLKOUT0": { + "direction": "output", + "bits": [ 4 ] + }, + "CLKOUT0B": { + "direction": "output", + "bits": [ 5 ] + }, + "CLKOUT1": { + "direction": "output", + "bits": [ 6 ] + }, + "CLKOUT1B": { + "direction": "output", + "bits": [ 7 ] + }, + "CLKOUT2": { + "direction": "output", + "bits": [ 8 ] + }, + "CLKOUT2B": { + "direction": "output", + "bits": [ 9 ] + }, + "CLKOUT3": { + "direction": "output", + "bits": [ 10 ] + }, + "CLKOUT3B": { + "direction": "output", + "bits": [ 11 ] + }, + "CLKOUT4": { + "direction": "output", + "bits": [ 12 ] + }, + "CLKOUT5": { + "direction": "output", + "bits": [ 13 ] + }, + "CLKOUT6": { + "direction": "output", + "bits": [ 14 ] + }, + "LOCKED": { + "direction": "output", + "bits": [ 15 ] + }, + "CLKFBIN": { + "direction": "input", + "bits": [ 16 ] + }, + "CLKIN1": { + "direction": "input", + "bits": [ 17 ] + }, + "PWRDWN": { + "direction": "input", + "bits": [ 18 ] + }, + "RST": { + "direction": "input", + "bits": [ 19 ] + } + }, + "cells": { + }, + "netnames": { + "CLKFBIN": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3603" + } + }, + "CLKFBOUT": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3589" + } + }, + "CLKFBOUTB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3590" + } + }, + "CLKIN1": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3604" + } + }, + "CLKOUT0": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3591" + } + }, + "CLKOUT0B": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3592" + } + }, + "CLKOUT1": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3593" + } + }, + "CLKOUT1B": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3594" + } + }, + "CLKOUT2": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3595" + } + }, + "CLKOUT2B": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3596" + } + }, + "CLKOUT3": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3597" + } + }, + "CLKOUT3B": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3598" + } + }, + "CLKOUT4": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3599" + } + }, + "CLKOUT5": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3600" + } + }, + "CLKOUT6": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3601" + } + }, + "LOCKED": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3602" + } + }, + "PWRDWN": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3605" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3606" + } + } + } + }, + "MUXCY": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "CI": { + "direction": "input", + "bits": [ 3 ] + }, + "DI": { + "direction": "input", + "bits": [ 4 ] + }, + "S": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "CI": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" + } + }, + "DI": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" + } + }, + "S": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" + } + } + } + }, + "MUXF7": { + "attributes": { + "abc9_box_id": 1, + "whitebox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "S": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:200$5": { + "hide_name": 1, + "type": "$mux", + "parameters": { + "WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:200" + }, + "port_directions": { + "A": "input", + "B": "input", + "S": "input", + "Y": "output" + }, + "connections": { + "A": [ 3 ], + "B": [ 4 ], + "S": [ 5 ], + "Y": [ 2 ] + } + } + }, + "netnames": { + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:200$5_Y": { + "hide_name": 1, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:200" + } + }, + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" + } + }, + "S": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" + } + } + } + }, + "MUXF8": { + "attributes": { + "abc9_box_id": 2, + "whitebox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I0": { + "direction": "input", + "bits": [ 3 ] + }, + "I1": { + "direction": "input", + "bits": [ 4 ] + }, + "S": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:205$6": { + "hide_name": 1, + "type": "$mux", + "parameters": { + "WIDTH": 1 + }, + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:205" + }, + "port_directions": { + "A": "input", + "B": "input", + "S": "input", + "Y": "output" + }, + "connections": { + "A": [ 3 ], + "B": [ 4 ], + "S": [ 5 ], + "Y": [ 2 ] + } + } + }, + "netnames": { + "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:205$6_Y": { + "hide_name": 1, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:205" + } + }, + "I0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" + } + }, + "I1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" + } + }, + "S": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" + } + } + } + }, + "OBUF": { + "attributes": { + "blackbox": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:52" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:55" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:54" + } + } + } + }, + "OBUFDS": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4263" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "OB": { + "direction": "output", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4271" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4268" + } + }, + "OB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4270" + } + } + } + }, + "OBUFT": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4274" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "I": { + "direction": "input", + "bits": [ 3 ] + }, + "T": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4281" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4280" + } + }, + "T": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4282" + } + } + } + }, + "OBUFTDS": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4285" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "OB": { + "direction": "output", + "bits": [ 3 ] + }, + "I": { + "direction": "input", + "bits": [ 4 ] + }, + "T": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "I": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4293" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4290" + } + }, + "OB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "iopad_external_pin": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4292" + } + }, + "T": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4294" + } + } + } + }, + "ODDR": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5054" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "C": { + "direction": "input", + "bits": [ 3 ] + }, + "CE": { + "direction": "input", + "bits": [ 4 ] + }, + "D1": { + "direction": "input", + "bits": [ 5 ] + }, + "D2": { + "direction": "input", + "bits": [ 6 ] + }, + "R": { + "direction": "input", + "bits": [ 7 ] + }, + "S": { + "direction": "input", + "bits": [ 8 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_C_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5066" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5067" + } + }, + "D1": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_D1_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5069" + } + }, + "D2": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "invertible_pin": "IS_D2_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5071" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5063" + } + }, + "R": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5072" + } + }, + "S": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5073" + } + } + } + }, + "ODELAYE2": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4297" + }, + "ports": { + "CNTVALUEOUT": { + "direction": "output", + "bits": [ 2, 3, 4, 5, 6 ] + }, + "DATAOUT": { + "direction": "output", + "bits": [ 7 ] + }, + "C": { + "direction": "input", + "bits": [ 8 ] + }, + "CE": { + "direction": "input", + "bits": [ 9 ] + }, + "CINVCTRL": { + "direction": "input", + "bits": [ 10 ] + }, + "CLKIN": { + "direction": "input", + "bits": [ 11 ] + }, + "CNTVALUEIN": { + "direction": "input", + "bits": [ 12, 13, 14, 15, 16 ] + }, + "INC": { + "direction": "input", + "bits": [ 17 ] + }, + "LD": { + "direction": "input", + "bits": [ 18 ] + }, + "LDPIPEEN": { + "direction": "input", + "bits": [ 19 ] + }, + "ODATAIN": { + "direction": "input", + "bits": [ 20 ] + }, + "REGRST": { + "direction": "input", + "bits": [ 21 ] + } + }, + "cells": { + }, + "netnames": { + "C": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_C_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4313" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4314" + } + }, + "CINVCTRL": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4315" + } + }, + "CLKIN": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4316" + } + }, + "CNTVALUEIN": { + "hide_name": 0, + "bits": [ 12, 13, 14, 15, 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4317" + } + }, + "CNTVALUEOUT": { + "hide_name": 0, + "bits": [ 2, 3, 4, 5, 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4309" + } + }, + "DATAOUT": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4310" + } + }, + "INC": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4318" + } + }, + "LD": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4319" + } + }, + "LDPIPEEN": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4320" + } + }, + "ODATAIN": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "invertible_pin": "IS_ODATAIN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4322" + } + }, + "REGRST": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4323" + } + } + } + }, + "OSERDESE2": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4326" + }, + "ports": { + "OFB": { + "direction": "output", + "bits": [ 2 ] + }, + "OQ": { + "direction": "output", + "bits": [ 3 ] + }, + "SHIFTOUT1": { + "direction": "output", + "bits": [ 4 ] + }, + "SHIFTOUT2": { + "direction": "output", + "bits": [ 5 ] + }, + "TBYTEOUT": { + "direction": "output", + "bits": [ 6 ] + }, + "TFB": { + "direction": "output", + "bits": [ 7 ] + }, + "TQ": { + "direction": "output", + "bits": [ 8 ] + }, + "CLK": { + "direction": "input", + "bits": [ 9 ] + }, + "CLKDIV": { + "direction": "input", + "bits": [ 10 ] + }, + "D1": { + "direction": "input", + "bits": [ 11 ] + }, + "D2": { + "direction": "input", + "bits": [ 12 ] + }, + "D3": { + "direction": "input", + "bits": [ 13 ] + }, + "D4": { + "direction": "input", + "bits": [ 14 ] + }, + "D5": { + "direction": "input", + "bits": [ 15 ] + }, + "D6": { + "direction": "input", + "bits": [ 16 ] + }, + "D7": { + "direction": "input", + "bits": [ 17 ] + }, + "D8": { + "direction": "input", + "bits": [ 18 ] + }, + "OCE": { + "direction": "input", + "bits": [ 19 ] + }, + "RST": { + "direction": "input", + "bits": [ 20 ] + }, + "SHIFTIN1": { + "direction": "input", + "bits": [ 21 ] + }, + "SHIFTIN2": { + "direction": "input", + "bits": [ 22 ] + }, + "T1": { + "direction": "input", + "bits": [ 23 ] + }, + "T2": { + "direction": "input", + "bits": [ 24 ] + }, + "T3": { + "direction": "input", + "bits": [ 25 ] + }, + "T4": { + "direction": "input", + "bits": [ 26 ] + }, + "TBYTEIN": { + "direction": "input", + "bits": [ 27 ] + }, + "TCE": { + "direction": "input", + "bits": [ 28 ] + } + }, + "cells": { + }, + "netnames": { + "CLK": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4361" + } + }, + "CLKDIV": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLKDIV_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4364" + } + }, + "D1": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "invertible_pin": "IS_D1_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4366" + } + }, + "D2": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "invertible_pin": "IS_D2_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4368" + } + }, + "D3": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "invertible_pin": "IS_D3_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4370" + } + }, + "D4": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "invertible_pin": "IS_D4_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4372" + } + }, + "D5": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "invertible_pin": "IS_D5_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4374" + } + }, + "D6": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "invertible_pin": "IS_D6_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4376" + } + }, + "D7": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "invertible_pin": "IS_D7_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4378" + } + }, + "D8": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "invertible_pin": "IS_D8_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4380" + } + }, + "OCE": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4381" + } + }, + "OFB": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4352" + } + }, + "OQ": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4353" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4382" + } + }, + "SHIFTIN1": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4383" + } + }, + "SHIFTIN2": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4384" + } + }, + "SHIFTOUT1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4354" + } + }, + "SHIFTOUT2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4355" + } + }, + "T1": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "invertible_pin": "IS_T1_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4386" + } + }, + "T2": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "invertible_pin": "IS_T2_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4388" + } + }, + "T3": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "invertible_pin": "IS_T3_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4390" + } + }, + "T4": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "invertible_pin": "IS_T4_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4392" + } + }, + "TBYTEIN": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4393" + } + }, + "TBYTEOUT": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4356" + } + }, + "TCE": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4394" + } + }, + "TFB": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4357" + } + }, + "TQ": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4358" + } + } + } + }, + "OUT_FIFO": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4397" + }, + "ports": { + "ALMOSTEMPTY": { + "direction": "output", + "bits": [ 2 ] + }, + "ALMOSTFULL": { + "direction": "output", + "bits": [ 3 ] + }, + "EMPTY": { + "direction": "output", + "bits": [ 4 ] + }, + "FULL": { + "direction": "output", + "bits": [ 5 ] + }, + "Q0": { + "direction": "output", + "bits": [ 6, 7, 8, 9 ] + }, + "Q1": { + "direction": "output", + "bits": [ 10, 11, 12, 13 ] + }, + "Q2": { + "direction": "output", + "bits": [ 14, 15, 16, 17 ] + }, + "Q3": { + "direction": "output", + "bits": [ 18, 19, 20, 21 ] + }, + "Q4": { + "direction": "output", + "bits": [ 22, 23, 24, 25 ] + }, + "Q7": { + "direction": "output", + "bits": [ 26, 27, 28, 29 ] + }, + "Q8": { + "direction": "output", + "bits": [ 30, 31, 32, 33 ] + }, + "Q9": { + "direction": "output", + "bits": [ 34, 35, 36, 37 ] + }, + "Q5": { + "direction": "output", + "bits": [ 38, 39, 40, 41, 42, 43, 44, 45 ] + }, + "Q6": { + "direction": "output", + "bits": [ 46, 47, 48, 49, 50, 51, 52, 53 ] + }, + "RDCLK": { + "direction": "input", + "bits": [ 54 ] + }, + "RDEN": { + "direction": "input", + "bits": [ 55 ] + }, + "RESET": { + "direction": "input", + "bits": [ 56 ] + }, + "WRCLK": { + "direction": "input", + "bits": [ 57 ] + }, + "WREN": { + "direction": "input", + "bits": [ 58 ] + }, + "D0": { + "direction": "input", + "bits": [ 59, 60, 61, 62, 63, 64, 65, 66 ] + }, + "D1": { + "direction": "input", + "bits": [ 67, 68, 69, 70, 71, 72, 73, 74 ] + }, + "D2": { + "direction": "input", + "bits": [ 75, 76, 77, 78, 79, 80, 81, 82 ] + }, + "D3": { + "direction": "input", + "bits": [ 83, 84, 85, 86, 87, 88, 89, 90 ] + }, + "D4": { + "direction": "input", + "bits": [ 91, 92, 93, 94, 95, 96, 97, 98 ] + }, + "D5": { + "direction": "input", + "bits": [ 99, 100, 101, 102, 103, 104, 105, 106 ] + }, + "D6": { + "direction": "input", + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114 ] + }, + "D7": { + "direction": "input", + "bits": [ 115, 116, 117, 118, 119, 120, 121, 122 ] + }, + "D8": { + "direction": "input", + "bits": [ 123, 124, 125, 126, 127, 128, 129, 130 ] + }, + "D9": { + "direction": "input", + "bits": [ 131, 132, 133, 134, 135, 136, 137, 138 ] + } + }, + "cells": { + }, + "netnames": { + "ALMOSTEMPTY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4403" + } + }, + "ALMOSTFULL": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4404" + } + }, + "D0": { + "hide_name": 0, + "bits": [ 59, 60, 61, 62, 63, 64, 65, 66 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4424" + } + }, + "D1": { + "hide_name": 0, + "bits": [ 67, 68, 69, 70, 71, 72, 73, 74 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4425" + } + }, + "D2": { + "hide_name": 0, + "bits": [ 75, 76, 77, 78, 79, 80, 81, 82 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4426" + } + }, + "D3": { + "hide_name": 0, + "bits": [ 83, 84, 85, 86, 87, 88, 89, 90 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4427" + } + }, + "D4": { + "hide_name": 0, + "bits": [ 91, 92, 93, 94, 95, 96, 97, 98 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4428" + } + }, + "D5": { + "hide_name": 0, + "bits": [ 99, 100, 101, 102, 103, 104, 105, 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4429" + } + }, + "D6": { + "hide_name": 0, + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4430" + } + }, + "D7": { + "hide_name": 0, + "bits": [ 115, 116, 117, 118, 119, 120, 121, 122 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4431" + } + }, + "D8": { + "hide_name": 0, + "bits": [ 123, 124, 125, 126, 127, 128, 129, 130 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4432" + } + }, + "D9": { + "hide_name": 0, + "bits": [ 131, 132, 133, 134, 135, 136, 137, 138 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4433" + } + }, + "EMPTY": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4405" + } + }, + "FULL": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4406" + } + }, + "Q0": { + "hide_name": 0, + "bits": [ 6, 7, 8, 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4407" + } + }, + "Q1": { + "hide_name": 0, + "bits": [ 10, 11, 12, 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4408" + } + }, + "Q2": { + "hide_name": 0, + "bits": [ 14, 15, 16, 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4409" + } + }, + "Q3": { + "hide_name": 0, + "bits": [ 18, 19, 20, 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4410" + } + }, + "Q4": { + "hide_name": 0, + "bits": [ 22, 23, 24, 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4411" + } + }, + "Q5": { + "hide_name": 0, + "bits": [ 38, 39, 40, 41, 42, 43, 44, 45 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4415" + } + }, + "Q6": { + "hide_name": 0, + "bits": [ 46, 47, 48, 49, 50, 51, 52, 53 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4416" + } + }, + "Q7": { + "hide_name": 0, + "bits": [ 26, 27, 28, 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4412" + } + }, + "Q8": { + "hide_name": 0, + "bits": [ 30, 31, 32, 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4413" + } + }, + "Q9": { + "hide_name": 0, + "bits": [ 34, 35, 36, 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4414" + } + }, + "RDCLK": { + "hide_name": 0, + "bits": [ 54 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4418" + } + }, + "RDEN": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4419" + } + }, + "RESET": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4420" + } + }, + "WRCLK": { + "hide_name": 0, + "bits": [ 57 ], + "attributes": { + "clkbuf_sink": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4422" + } + }, + "WREN": { + "hide_name": 0, + "bits": [ 58 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4423" + } + } + } + }, + "PCIE_2_1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1713" + }, + "ports": { + "CFGAERECRCCHECKEN": { + "direction": "output", + "bits": [ 2 ] + }, + "CFGAERECRCGENEN": { + "direction": "output", + "bits": [ 3 ] + }, + "CFGAERROOTERRCORRERRRECEIVED": { + "direction": "output", + "bits": [ 4 ] + }, + "CFGAERROOTERRCORRERRREPORTINGEN": { + "direction": "output", + "bits": [ 5 ] + }, + "CFGAERROOTERRFATALERRRECEIVED": { + "direction": "output", + "bits": [ 6 ] + }, + "CFGAERROOTERRFATALERRREPORTINGEN": { + "direction": "output", + "bits": [ 7 ] + }, + "CFGAERROOTERRNONFATALERRRECEIVED": { + "direction": "output", + "bits": [ 8 ] + }, + "CFGAERROOTERRNONFATALERRREPORTINGEN": { + "direction": "output", + "bits": [ 9 ] + }, + "CFGBRIDGESERREN": { + "direction": "output", + "bits": [ 10 ] + }, + "CFGCOMMANDBUSMASTERENABLE": { + "direction": "output", + "bits": [ 11 ] + }, + "CFGCOMMANDINTERRUPTDISABLE": { + "direction": "output", + "bits": [ 12 ] + }, + "CFGCOMMANDIOENABLE": { + "direction": "output", + "bits": [ 13 ] + }, + "CFGCOMMANDMEMENABLE": { + "direction": "output", + "bits": [ 14 ] + }, + "CFGCOMMANDSERREN": { + "direction": "output", + "bits": [ 15 ] + }, + "CFGDEVCONTROL2ARIFORWARDEN": { + "direction": "output", + "bits": [ 16 ] + }, + "CFGDEVCONTROL2ATOMICEGRESSBLOCK": { + "direction": "output", + "bits": [ 17 ] + }, + "CFGDEVCONTROL2ATOMICREQUESTEREN": { + "direction": "output", + "bits": [ 18 ] + }, + "CFGDEVCONTROL2CPLTIMEOUTDIS": { + "direction": "output", + "bits": [ 19 ] + }, + "CFGDEVCONTROL2IDOCPLEN": { + "direction": "output", + "bits": [ 20 ] + }, + "CFGDEVCONTROL2IDOREQEN": { + "direction": "output", + "bits": [ 21 ] + }, + "CFGDEVCONTROL2LTREN": { + "direction": "output", + "bits": [ 22 ] + }, + "CFGDEVCONTROL2TLPPREFIXBLOCK": { + "direction": "output", + "bits": [ 23 ] + }, + "CFGDEVCONTROLAUXPOWEREN": { + "direction": "output", + "bits": [ 24 ] + }, + "CFGDEVCONTROLCORRERRREPORTINGEN": { + "direction": "output", + "bits": [ 25 ] + }, + "CFGDEVCONTROLENABLERO": { + "direction": "output", + "bits": [ 26 ] + }, + "CFGDEVCONTROLEXTTAGEN": { + "direction": "output", + "bits": [ 27 ] + }, + "CFGDEVCONTROLFATALERRREPORTINGEN": { + "direction": "output", + "bits": [ 28 ] + }, + "CFGDEVCONTROLNONFATALREPORTINGEN": { + "direction": "output", + "bits": [ 29 ] + }, + "CFGDEVCONTROLNOSNOOPEN": { + "direction": "output", + "bits": [ 30 ] + }, + "CFGDEVCONTROLPHANTOMEN": { + "direction": "output", + "bits": [ 31 ] + }, + "CFGDEVCONTROLURERRREPORTINGEN": { + "direction": "output", + "bits": [ 32 ] + }, + "CFGDEVSTATUSCORRERRDETECTED": { + "direction": "output", + "bits": [ 33 ] + }, + "CFGDEVSTATUSFATALERRDETECTED": { + "direction": "output", + "bits": [ 34 ] + }, + "CFGDEVSTATUSNONFATALERRDETECTED": { + "direction": "output", + "bits": [ 35 ] + }, + "CFGDEVSTATUSURDETECTED": { + "direction": "output", + "bits": [ 36 ] + }, + "CFGERRAERHEADERLOGSETN": { + "direction": "output", + "bits": [ 37 ] + }, + "CFGERRCPLRDYN": { + "direction": "output", + "bits": [ 38 ] + }, + "CFGINTERRUPTMSIENABLE": { + "direction": "output", + "bits": [ 39 ] + }, + "CFGINTERRUPTMSIXENABLE": { + "direction": "output", + "bits": [ 40 ] + }, + "CFGINTERRUPTMSIXFM": { + "direction": "output", + "bits": [ 41 ] + }, + "CFGINTERRUPTRDYN": { + "direction": "output", + "bits": [ 42 ] + }, + "CFGLINKCONTROLAUTOBANDWIDTHINTEN": { + "direction": "output", + "bits": [ 43 ] + }, + "CFGLINKCONTROLBANDWIDTHINTEN": { + "direction": "output", + "bits": [ 44 ] + }, + "CFGLINKCONTROLCLOCKPMEN": { + "direction": "output", + "bits": [ 45 ] + }, + "CFGLINKCONTROLCOMMONCLOCK": { + "direction": "output", + "bits": [ 46 ] + }, + "CFGLINKCONTROLEXTENDEDSYNC": { + "direction": "output", + "bits": [ 47 ] + }, + "CFGLINKCONTROLHWAUTOWIDTHDIS": { + "direction": "output", + "bits": [ 48 ] + }, + "CFGLINKCONTROLLINKDISABLE": { + "direction": "output", + "bits": [ 49 ] + }, + "CFGLINKCONTROLRCB": { + "direction": "output", + "bits": [ 50 ] + }, + "CFGLINKCONTROLRETRAINLINK": { + "direction": "output", + "bits": [ 51 ] + }, + "CFGLINKSTATUSAUTOBANDWIDTHSTATUS": { + "direction": "output", + "bits": [ 52 ] + }, + "CFGLINKSTATUSBANDWIDTHSTATUS": { + "direction": "output", + "bits": [ 53 ] + }, + "CFGLINKSTATUSDLLACTIVE": { + "direction": "output", + "bits": [ 54 ] + }, + "CFGLINKSTATUSLINKTRAINING": { + "direction": "output", + "bits": [ 55 ] + }, + "CFGMGMTRDWRDONEN": { + "direction": "output", + "bits": [ 56 ] + }, + "CFGMSGRECEIVED": { + "direction": "output", + "bits": [ 57 ] + }, + "CFGMSGRECEIVEDASSERTINTA": { + "direction": "output", + "bits": [ 58 ] + }, + "CFGMSGRECEIVEDASSERTINTB": { + "direction": "output", + "bits": [ 59 ] + }, + "CFGMSGRECEIVEDASSERTINTC": { + "direction": "output", + "bits": [ 60 ] + }, + "CFGMSGRECEIVEDASSERTINTD": { + "direction": "output", + "bits": [ 61 ] + }, + "CFGMSGRECEIVEDDEASSERTINTA": { + "direction": "output", + "bits": [ 62 ] + }, + "CFGMSGRECEIVEDDEASSERTINTB": { + "direction": "output", + "bits": [ 63 ] + }, + "CFGMSGRECEIVEDDEASSERTINTC": { + "direction": "output", + "bits": [ 64 ] + }, + "CFGMSGRECEIVEDDEASSERTINTD": { + "direction": "output", + "bits": [ 65 ] + }, + "CFGMSGRECEIVEDERRCOR": { + "direction": "output", + "bits": [ 66 ] + }, + "CFGMSGRECEIVEDERRFATAL": { + "direction": "output", + "bits": [ 67 ] + }, + "CFGMSGRECEIVEDERRNONFATAL": { + "direction": "output", + "bits": [ 68 ] + }, + "CFGMSGRECEIVEDPMASNAK": { + "direction": "output", + "bits": [ 69 ] + }, + "CFGMSGRECEIVEDPMETO": { + "direction": "output", + "bits": [ 70 ] + }, + "CFGMSGRECEIVEDPMETOACK": { + "direction": "output", + "bits": [ 71 ] + }, + "CFGMSGRECEIVEDPMPME": { + "direction": "output", + "bits": [ 72 ] + }, + "CFGMSGRECEIVEDSETSLOTPOWERLIMIT": { + "direction": "output", + "bits": [ 73 ] + }, + "CFGMSGRECEIVEDUNLOCK": { + "direction": "output", + "bits": [ 74 ] + }, + "CFGPMCSRPMEEN": { + "direction": "output", + "bits": [ 75 ] + }, + "CFGPMCSRPMESTATUS": { + "direction": "output", + "bits": [ 76 ] + }, + "CFGPMRCVASREQL1N": { + "direction": "output", + "bits": [ 77 ] + }, + "CFGPMRCVENTERL1N": { + "direction": "output", + "bits": [ 78 ] + }, + "CFGPMRCVENTERL23N": { + "direction": "output", + "bits": [ 79 ] + }, + "CFGPMRCVREQACKN": { + "direction": "output", + "bits": [ 80 ] + }, + "CFGROOTCONTROLPMEINTEN": { + "direction": "output", + "bits": [ 81 ] + }, + "CFGROOTCONTROLSYSERRCORRERREN": { + "direction": "output", + "bits": [ 82 ] + }, + "CFGROOTCONTROLSYSERRFATALERREN": { + "direction": "output", + "bits": [ 83 ] + }, + "CFGROOTCONTROLSYSERRNONFATALERREN": { + "direction": "output", + "bits": [ 84 ] + }, + "CFGSLOTCONTROLELECTROMECHILCTLPULSE": { + "direction": "output", + "bits": [ 85 ] + }, + "CFGTRANSACTION": { + "direction": "output", + "bits": [ 86 ] + }, + "CFGTRANSACTIONTYPE": { + "direction": "output", + "bits": [ 87 ] + }, + "DBGSCLRA": { + "direction": "output", + "bits": [ 88 ] + }, + "DBGSCLRB": { + "direction": "output", + "bits": [ 89 ] + }, + "DBGSCLRC": { + "direction": "output", + "bits": [ 90 ] + }, + "DBGSCLRD": { + "direction": "output", + "bits": [ 91 ] + }, + "DBGSCLRE": { + "direction": "output", + "bits": [ 92 ] + }, + "DBGSCLRF": { + "direction": "output", + "bits": [ 93 ] + }, + "DBGSCLRG": { + "direction": "output", + "bits": [ 94 ] + }, + "DBGSCLRH": { + "direction": "output", + "bits": [ 95 ] + }, + "DBGSCLRI": { + "direction": "output", + "bits": [ 96 ] + }, + "DBGSCLRJ": { + "direction": "output", + "bits": [ 97 ] + }, + "DBGSCLRK": { + "direction": "output", + "bits": [ 98 ] + }, + "DRPRDY": { + "direction": "output", + "bits": [ 99 ] + }, + "LL2BADDLLPERR": { + "direction": "output", + "bits": [ 100 ] + }, + "LL2BADTLPERR": { + "direction": "output", + "bits": [ 101 ] + }, + "LL2PROTOCOLERR": { + "direction": "output", + "bits": [ 102 ] + }, + "LL2RECEIVERERR": { + "direction": "output", + "bits": [ 103 ] + }, + "LL2REPLAYROERR": { + "direction": "output", + "bits": [ 104 ] + }, + "LL2REPLAYTOERR": { + "direction": "output", + "bits": [ 105 ] + }, + "LL2SUSPENDOK": { + "direction": "output", + "bits": [ 106 ] + }, + "LL2TFCINIT1SEQ": { + "direction": "output", + "bits": [ 107 ] + }, + "LL2TFCINIT2SEQ": { + "direction": "output", + "bits": [ 108 ] + }, + "LL2TXIDLE": { + "direction": "output", + "bits": [ 109 ] + }, + "LNKCLKEN": { + "direction": "output", + "bits": [ 110 ] + }, + "MIMRXREN": { + "direction": "output", + "bits": [ 111 ] + }, + "MIMRXWEN": { + "direction": "output", + "bits": [ 112 ] + }, + "MIMTXREN": { + "direction": "output", + "bits": [ 113 ] + }, + "MIMTXWEN": { + "direction": "output", + "bits": [ 114 ] + }, + "PIPERX0POLARITY": { + "direction": "output", + "bits": [ 115 ] + }, + "PIPERX1POLARITY": { + "direction": "output", + "bits": [ 116 ] + }, + "PIPERX2POLARITY": { + "direction": "output", + "bits": [ 117 ] + }, + "PIPERX3POLARITY": { + "direction": "output", + "bits": [ 118 ] + }, + "PIPERX4POLARITY": { + "direction": "output", + "bits": [ 119 ] + }, + "PIPERX5POLARITY": { + "direction": "output", + "bits": [ 120 ] + }, + "PIPERX6POLARITY": { + "direction": "output", + "bits": [ 121 ] + }, + "PIPERX7POLARITY": { + "direction": "output", + "bits": [ 122 ] + }, + "PIPETX0COMPLIANCE": { + "direction": "output", + "bits": [ 123 ] + }, + "PIPETX0ELECIDLE": { + "direction": "output", + "bits": [ 124 ] + }, + "PIPETX1COMPLIANCE": { + "direction": "output", + "bits": [ 125 ] + }, + "PIPETX1ELECIDLE": { + "direction": "output", + "bits": [ 126 ] + }, + "PIPETX2COMPLIANCE": { + "direction": "output", + "bits": [ 127 ] + }, + "PIPETX2ELECIDLE": { + "direction": "output", + "bits": [ 128 ] + }, + "PIPETX3COMPLIANCE": { + "direction": "output", + "bits": [ 129 ] + }, + "PIPETX3ELECIDLE": { + "direction": "output", + "bits": [ 130 ] + }, + "PIPETX4COMPLIANCE": { + "direction": "output", + "bits": [ 131 ] + }, + "PIPETX4ELECIDLE": { + "direction": "output", + "bits": [ 132 ] + }, + "PIPETX5COMPLIANCE": { + "direction": "output", + "bits": [ 133 ] + }, + "PIPETX5ELECIDLE": { + "direction": "output", + "bits": [ 134 ] + }, + "PIPETX6COMPLIANCE": { + "direction": "output", + "bits": [ 135 ] + }, + "PIPETX6ELECIDLE": { + "direction": "output", + "bits": [ 136 ] + }, + "PIPETX7COMPLIANCE": { + "direction": "output", + "bits": [ 137 ] + }, + "PIPETX7ELECIDLE": { + "direction": "output", + "bits": [ 138 ] + }, + "PIPETXDEEMPH": { + "direction": "output", + "bits": [ 139 ] + }, + "PIPETXRATE": { + "direction": "output", + "bits": [ 140 ] + }, + "PIPETXRCVRDET": { + "direction": "output", + "bits": [ 141 ] + }, + "PIPETXRESET": { + "direction": "output", + "bits": [ 142 ] + }, + "PL2L0REQ": { + "direction": "output", + "bits": [ 143 ] + }, + "PL2LINKUP": { + "direction": "output", + "bits": [ 144 ] + }, + "PL2RECEIVERERR": { + "direction": "output", + "bits": [ 145 ] + }, + "PL2RECOVERY": { + "direction": "output", + "bits": [ 146 ] + }, + "PL2RXELECIDLE": { + "direction": "output", + "bits": [ 147 ] + }, + "PL2SUSPENDOK": { + "direction": "output", + "bits": [ 148 ] + }, + "PLDIRECTEDCHANGEDONE": { + "direction": "output", + "bits": [ 149 ] + }, + "PLLINKGEN2CAP": { + "direction": "output", + "bits": [ 150 ] + }, + "PLLINKPARTNERGEN2SUPPORTED": { + "direction": "output", + "bits": [ 151 ] + }, + "PLLINKUPCFGCAP": { + "direction": "output", + "bits": [ 152 ] + }, + "PLPHYLNKUPN": { + "direction": "output", + "bits": [ 153 ] + }, + "PLRECEIVEDHOTRST": { + "direction": "output", + "bits": [ 154 ] + }, + "PLSELLNKRATE": { + "direction": "output", + "bits": [ 155 ] + }, + "RECEIVEDFUNCLVLRSTN": { + "direction": "output", + "bits": [ 156 ] + }, + "TL2ASPMSUSPENDCREDITCHECKOK": { + "direction": "output", + "bits": [ 157 ] + }, + "TL2ASPMSUSPENDREQ": { + "direction": "output", + "bits": [ 158 ] + }, + "TL2ERRFCPE": { + "direction": "output", + "bits": [ 159 ] + }, + "TL2ERRMALFORMED": { + "direction": "output", + "bits": [ 160 ] + }, + "TL2ERRRXOVERFLOW": { + "direction": "output", + "bits": [ 161 ] + }, + "TL2PPMSUSPENDOK": { + "direction": "output", + "bits": [ 162 ] + }, + "TRNLNKUP": { + "direction": "output", + "bits": [ 163 ] + }, + "TRNRECRCERR": { + "direction": "output", + "bits": [ 164 ] + }, + "TRNREOF": { + "direction": "output", + "bits": [ 165 ] + }, + "TRNRERRFWD": { + "direction": "output", + "bits": [ 166 ] + }, + "TRNRSOF": { + "direction": "output", + "bits": [ 167 ] + }, + "TRNRSRCDSC": { + "direction": "output", + "bits": [ 168 ] + }, + "TRNRSRCRDY": { + "direction": "output", + "bits": [ 169 ] + }, + "TRNTCFGREQ": { + "direction": "output", + "bits": [ 170 ] + }, + "TRNTDLLPDSTRDY": { + "direction": "output", + "bits": [ 171 ] + }, + "TRNTERRDROP": { + "direction": "output", + "bits": [ 172 ] + }, + "USERRSTN": { + "direction": "output", + "bits": [ 173 ] + }, + "DBGVECC": { + "direction": "output", + "bits": [ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] + }, + "PLDBGVEC": { + "direction": "output", + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197 ] + }, + "TRNFCCPLD": { + "direction": "output", + "bits": [ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209 ] + }, + "TRNFCNPD": { + "direction": "output", + "bits": [ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221 ] + }, + "TRNFCPD": { + "direction": "output", + "bits": [ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233 ] + }, + "TRNRD": { + "direction": "output", + "bits": [ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361 ] + }, + "MIMRXRADDR": { + "direction": "output", + "bits": [ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374 ] + }, + "MIMRXWADDR": { + "direction": "output", + "bits": [ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387 ] + }, + "MIMTXRADDR": { + "direction": "output", + "bits": [ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400 ] + }, + "MIMTXWADDR": { + "direction": "output", + "bits": [ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413 ] + }, + "CFGMSGDATA": { + "direction": "output", + "bits": [ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429 ] + }, + "DRPDO": { + "direction": "output", + "bits": [ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445 ] + }, + "PIPETX0DATA": { + "direction": "output", + "bits": [ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461 ] + }, + "PIPETX1DATA": { + "direction": "output", + "bits": [ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477 ] + }, + "PIPETX2DATA": { + "direction": "output", + "bits": [ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493 ] + }, + "PIPETX3DATA": { + "direction": "output", + "bits": [ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509 ] + }, + "PIPETX4DATA": { + "direction": "output", + "bits": [ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525 ] + }, + "PIPETX5DATA": { + "direction": "output", + "bits": [ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541 ] + }, + "PIPETX6DATA": { + "direction": "output", + "bits": [ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557 ] + }, + "PIPETX7DATA": { + "direction": "output", + "bits": [ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573 ] + }, + "CFGLINKCONTROLASPMCONTROL": { + "direction": "output", + "bits": [ 574, 575 ] + }, + "CFGLINKSTATUSCURRENTSPEED": { + "direction": "output", + "bits": [ 576, 577 ] + }, + "CFGPMCSRPOWERSTATE": { + "direction": "output", + "bits": [ 578, 579 ] + }, + "PIPETX0CHARISK": { + "direction": "output", + "bits": [ 580, 581 ] + }, + "PIPETX0POWERDOWN": { + "direction": "output", + "bits": [ 582, 583 ] + }, + "PIPETX1CHARISK": { + "direction": "output", + "bits": [ 584, 585 ] + }, + "PIPETX1POWERDOWN": { + "direction": "output", + "bits": [ 586, 587 ] + }, + "PIPETX2CHARISK": { + "direction": "output", + "bits": [ 588, 589 ] + }, + "PIPETX2POWERDOWN": { + "direction": "output", + "bits": [ 590, 591 ] + }, + "PIPETX3CHARISK": { + "direction": "output", + "bits": [ 592, 593 ] + }, + "PIPETX3POWERDOWN": { + "direction": "output", + "bits": [ 594, 595 ] + }, + "PIPETX4CHARISK": { + "direction": "output", + "bits": [ 596, 597 ] + }, + "PIPETX4POWERDOWN": { + "direction": "output", + "bits": [ 598, 599 ] + }, + "PIPETX5CHARISK": { + "direction": "output", + "bits": [ 600, 601 ] + }, + "PIPETX5POWERDOWN": { + "direction": "output", + "bits": [ 602, 603 ] + }, + "PIPETX6CHARISK": { + "direction": "output", + "bits": [ 604, 605 ] + }, + "PIPETX6POWERDOWN": { + "direction": "output", + "bits": [ 606, 607 ] + }, + "PIPETX7CHARISK": { + "direction": "output", + "bits": [ 608, 609 ] + }, + "PIPETX7POWERDOWN": { + "direction": "output", + "bits": [ 610, 611 ] + }, + "PL2RXPMSTATE": { + "direction": "output", + "bits": [ 612, 613 ] + }, + "PLLANEREVERSALMODE": { + "direction": "output", + "bits": [ 614, 615 ] + }, + "PLRXPMSTATE": { + "direction": "output", + "bits": [ 616, 617 ] + }, + "PLSELLNKWIDTH": { + "direction": "output", + "bits": [ 618, 619 ] + }, + "TRNRDLLPSRCRDY": { + "direction": "output", + "bits": [ 620, 621 ] + }, + "TRNRREM": { + "direction": "output", + "bits": [ 622, 623 ] + }, + "CFGDEVCONTROLMAXPAYLOAD": { + "direction": "output", + "bits": [ 624, 625, 626 ] + }, + "CFGDEVCONTROLMAXREADREQ": { + "direction": "output", + "bits": [ 627, 628, 629 ] + }, + "CFGINTERRUPTMMENABLE": { + "direction": "output", + "bits": [ 630, 631, 632 ] + }, + "CFGPCIELINKSTATE": { + "direction": "output", + "bits": [ 633, 634, 635 ] + }, + "PIPETXMARGIN": { + "direction": "output", + "bits": [ 636, 637, 638 ] + }, + "PLINITIALLINKWIDTH": { + "direction": "output", + "bits": [ 639, 640, 641 ] + }, + "PLTXPMSTATE": { + "direction": "output", + "bits": [ 642, 643, 644 ] + }, + "CFGMGMTDO": { + "direction": "output", + "bits": [ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676 ] + }, + "CFGDEVCONTROL2CPLTIMEOUTVAL": { + "direction": "output", + "bits": [ 677, 678, 679, 680 ] + }, + "CFGLINKSTATUSNEGOTIATEDWIDTH": { + "direction": "output", + "bits": [ 681, 682, 683, 684 ] + }, + "TRNTDSTRDY": { + "direction": "output", + "bits": [ 685, 686, 687, 688 ] + }, + "LL2LINKSTATUS": { + "direction": "output", + "bits": [ 689, 690, 691, 692, 693 ] + }, + "PLLTSSMSTATE": { + "direction": "output", + "bits": [ 694, 695, 696, 697, 698, 699 ] + }, + "TRNTBUFAV": { + "direction": "output", + "bits": [ 700, 701, 702, 703, 704, 705 ] + }, + "DBGVECA": { + "direction": "output", + "bits": [ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769 ] + }, + "DBGVECB": { + "direction": "output", + "bits": [ 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833 ] + }, + "TL2ERRHDR": { + "direction": "output", + "bits": [ 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897 ] + }, + "TRNRDLLPDATA": { + "direction": "output", + "bits": [ 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961 ] + }, + "MIMRXWDATA": { + "direction": "output", + "bits": [ 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029 ] + }, + "MIMTXWDATA": { + "direction": "output", + "bits": [ 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098 ] + }, + "CFGTRANSACTIONADDR": { + "direction": "output", + "bits": [ 1099, 1100, 1101, 1102, 1103, 1104, 1105 ] + }, + "CFGVCTCVCMAP": { + "direction": "output", + "bits": [ 1106, 1107, 1108, 1109, 1110, 1111, 1112 ] + }, + "CFGINTERRUPTDO": { + "direction": "output", + "bits": [ 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120 ] + }, + "TRNFCCPLH": { + "direction": "output", + "bits": [ 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128 ] + }, + "TRNFCNPH": { + "direction": "output", + "bits": [ 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136 ] + }, + "TRNFCPH": { + "direction": "output", + "bits": [ 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144 ] + }, + "TRNRBARHIT": { + "direction": "output", + "bits": [ 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152 ] + }, + "CFGERRACSN": { + "direction": "input", + "bits": [ 1153 ] + }, + "CFGERRATOMICEGRESSBLOCKEDN": { + "direction": "input", + "bits": [ 1154 ] + }, + "CFGERRCORN": { + "direction": "input", + "bits": [ 1155 ] + }, + "CFGERRCPLABORTN": { + "direction": "input", + "bits": [ 1156 ] + }, + "CFGERRCPLTIMEOUTN": { + "direction": "input", + "bits": [ 1157 ] + }, + "CFGERRCPLUNEXPECTN": { + "direction": "input", + "bits": [ 1158 ] + }, + "CFGERRECRCN": { + "direction": "input", + "bits": [ 1159 ] + }, + "CFGERRINTERNALCORN": { + "direction": "input", + "bits": [ 1160 ] + }, + "CFGERRINTERNALUNCORN": { + "direction": "input", + "bits": [ 1161 ] + }, + "CFGERRLOCKEDN": { + "direction": "input", + "bits": [ 1162 ] + }, + "CFGERRMALFORMEDN": { + "direction": "input", + "bits": [ 1163 ] + }, + "CFGERRMCBLOCKEDN": { + "direction": "input", + "bits": [ 1164 ] + }, + "CFGERRNORECOVERYN": { + "direction": "input", + "bits": [ 1165 ] + }, + "CFGERRPOISONEDN": { + "direction": "input", + "bits": [ 1166 ] + }, + "CFGERRPOSTEDN": { + "direction": "input", + "bits": [ 1167 ] + }, + "CFGERRURN": { + "direction": "input", + "bits": [ 1168 ] + }, + "CFGFORCECOMMONCLOCKOFF": { + "direction": "input", + "bits": [ 1169 ] + }, + "CFGFORCEEXTENDEDSYNCON": { + "direction": "input", + "bits": [ 1170 ] + }, + "CFGINTERRUPTASSERTN": { + "direction": "input", + "bits": [ 1171 ] + }, + "CFGINTERRUPTN": { + "direction": "input", + "bits": [ 1172 ] + }, + "CFGINTERRUPTSTATN": { + "direction": "input", + "bits": [ 1173 ] + }, + "CFGMGMTRDENN": { + "direction": "input", + "bits": [ 1174 ] + }, + "CFGMGMTWRENN": { + "direction": "input", + "bits": [ 1175 ] + }, + "CFGMGMTWRREADONLYN": { + "direction": "input", + "bits": [ 1176 ] + }, + "CFGMGMTWRRW1CASRWN": { + "direction": "input", + "bits": [ 1177 ] + }, + "CFGPMFORCESTATEENN": { + "direction": "input", + "bits": [ 1178 ] + }, + "CFGPMHALTASPML0SN": { + "direction": "input", + "bits": [ 1179 ] + }, + "CFGPMHALTASPML1N": { + "direction": "input", + "bits": [ 1180 ] + }, + "CFGPMSENDPMETON": { + "direction": "input", + "bits": [ 1181 ] + }, + "CFGPMTURNOFFOKN": { + "direction": "input", + "bits": [ 1182 ] + }, + "CFGPMWAKEN": { + "direction": "input", + "bits": [ 1183 ] + }, + "CFGTRNPENDINGN": { + "direction": "input", + "bits": [ 1184 ] + }, + "CMRSTN": { + "direction": "input", + "bits": [ 1185 ] + }, + "CMSTICKYRSTN": { + "direction": "input", + "bits": [ 1186 ] + }, + "DBGSUBMODE": { + "direction": "input", + "bits": [ 1187 ] + }, + "DLRSTN": { + "direction": "input", + "bits": [ 1188 ] + }, + "DRPCLK": { + "direction": "input", + "bits": [ 1189 ] + }, + "DRPEN": { + "direction": "input", + "bits": [ 1190 ] + }, + "DRPWE": { + "direction": "input", + "bits": [ 1191 ] + }, + "FUNCLVLRSTN": { + "direction": "input", + "bits": [ 1192 ] + }, + "LL2SENDASREQL1": { + "direction": "input", + "bits": [ 1193 ] + }, + "LL2SENDENTERL1": { + "direction": "input", + "bits": [ 1194 ] + }, + "LL2SENDENTERL23": { + "direction": "input", + "bits": [ 1195 ] + }, + "LL2SENDPMACK": { + "direction": "input", + "bits": [ 1196 ] + }, + "LL2SUSPENDNOW": { + "direction": "input", + "bits": [ 1197 ] + }, + "LL2TLPRCV": { + "direction": "input", + "bits": [ 1198 ] + }, + "PIPECLK": { + "direction": "input", + "bits": [ 1199 ] + }, + "PIPERX0CHANISALIGNED": { + "direction": "input", + "bits": [ 1200 ] + }, + "PIPERX0ELECIDLE": { + "direction": "input", + "bits": [ 1201 ] + }, + "PIPERX0PHYSTATUS": { + "direction": "input", + "bits": [ 1202 ] + }, + "PIPERX0VALID": { + "direction": "input", + "bits": [ 1203 ] + }, + "PIPERX1CHANISALIGNED": { + "direction": "input", + "bits": [ 1204 ] + }, + "PIPERX1ELECIDLE": { + "direction": "input", + "bits": [ 1205 ] + }, + "PIPERX1PHYSTATUS": { + "direction": "input", + "bits": [ 1206 ] + }, + "PIPERX1VALID": { + "direction": "input", + "bits": [ 1207 ] + }, + "PIPERX2CHANISALIGNED": { + "direction": "input", + "bits": [ 1208 ] + }, + "PIPERX2ELECIDLE": { + "direction": "input", + "bits": [ 1209 ] + }, + "PIPERX2PHYSTATUS": { + "direction": "input", + "bits": [ 1210 ] + }, + "PIPERX2VALID": { + "direction": "input", + "bits": [ 1211 ] + }, + "PIPERX3CHANISALIGNED": { + "direction": "input", + "bits": [ 1212 ] + }, + "PIPERX3ELECIDLE": { + "direction": "input", + "bits": [ 1213 ] + }, + "PIPERX3PHYSTATUS": { + "direction": "input", + "bits": [ 1214 ] + }, + "PIPERX3VALID": { + "direction": "input", + "bits": [ 1215 ] + }, + "PIPERX4CHANISALIGNED": { + "direction": "input", + "bits": [ 1216 ] + }, + "PIPERX4ELECIDLE": { + "direction": "input", + "bits": [ 1217 ] + }, + "PIPERX4PHYSTATUS": { + "direction": "input", + "bits": [ 1218 ] + }, + "PIPERX4VALID": { + "direction": "input", + "bits": [ 1219 ] + }, + "PIPERX5CHANISALIGNED": { + "direction": "input", + "bits": [ 1220 ] + }, + "PIPERX5ELECIDLE": { + "direction": "input", + "bits": [ 1221 ] + }, + "PIPERX5PHYSTATUS": { + "direction": "input", + "bits": [ 1222 ] + }, + "PIPERX5VALID": { + "direction": "input", + "bits": [ 1223 ] + }, + "PIPERX6CHANISALIGNED": { + "direction": "input", + "bits": [ 1224 ] + }, + "PIPERX6ELECIDLE": { + "direction": "input", + "bits": [ 1225 ] + }, + "PIPERX6PHYSTATUS": { + "direction": "input", + "bits": [ 1226 ] + }, + "PIPERX6VALID": { + "direction": "input", + "bits": [ 1227 ] + }, + "PIPERX7CHANISALIGNED": { + "direction": "input", + "bits": [ 1228 ] + }, + "PIPERX7ELECIDLE": { + "direction": "input", + "bits": [ 1229 ] + }, + "PIPERX7PHYSTATUS": { + "direction": "input", + "bits": [ 1230 ] + }, + "PIPERX7VALID": { + "direction": "input", + "bits": [ 1231 ] + }, + "PLDIRECTEDLINKAUTON": { + "direction": "input", + "bits": [ 1232 ] + }, + "PLDIRECTEDLINKSPEED": { + "direction": "input", + "bits": [ 1233 ] + }, + "PLDIRECTEDLTSSMNEWVLD": { + "direction": "input", + "bits": [ 1234 ] + }, + "PLDIRECTEDLTSSMSTALL": { + "direction": "input", + "bits": [ 1235 ] + }, + "PLDOWNSTREAMDEEMPHSOURCE": { + "direction": "input", + "bits": [ 1236 ] + }, + "PLRSTN": { + "direction": "input", + "bits": [ 1237 ] + }, + "PLTRANSMITHOTRST": { + "direction": "input", + "bits": [ 1238 ] + }, + "PLUPSTREAMPREFERDEEMPH": { + "direction": "input", + "bits": [ 1239 ] + }, + "SYSRSTN": { + "direction": "input", + "bits": [ 1240 ] + }, + "TL2ASPMSUSPENDCREDITCHECK": { + "direction": "input", + "bits": [ 1241 ] + }, + "TL2PPMSUSPENDREQ": { + "direction": "input", + "bits": [ 1242 ] + }, + "TLRSTN": { + "direction": "input", + "bits": [ 1243 ] + }, + "TRNRDSTRDY": { + "direction": "input", + "bits": [ 1244 ] + }, + "TRNRFCPRET": { + "direction": "input", + "bits": [ 1245 ] + }, + "TRNRNPOK": { + "direction": "input", + "bits": [ 1246 ] + }, + "TRNRNPREQ": { + "direction": "input", + "bits": [ 1247 ] + }, + "TRNTCFGGNT": { + "direction": "input", + "bits": [ 1248 ] + }, + "TRNTDLLPSRCRDY": { + "direction": "input", + "bits": [ 1249 ] + }, + "TRNTECRCGEN": { + "direction": "input", + "bits": [ 1250 ] + }, + "TRNTEOF": { + "direction": "input", + "bits": [ 1251 ] + }, + "TRNTERRFWD": { + "direction": "input", + "bits": [ 1252 ] + }, + "TRNTSOF": { + "direction": "input", + "bits": [ 1253 ] + }, + "TRNTSRCDSC": { + "direction": "input", + "bits": [ 1254 ] + }, + "TRNTSRCRDY": { + "direction": "input", + "bits": [ 1255 ] + }, + "TRNTSTR": { + "direction": "input", + "bits": [ 1256 ] + }, + "USERCLK2": { + "direction": "input", + "bits": [ 1257 ] + }, + "USERCLK": { + "direction": "input", + "bits": [ 1258 ] + }, + "CFGERRAERHEADERLOG": { + "direction": "input", + "bits": [ 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386 ] + }, + "TRNTD": { + "direction": "input", + "bits": [ 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514 ] + }, + "CFGDEVID": { + "direction": "input", + "bits": [ 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530 ] + }, + "CFGSUBSYSID": { + "direction": "input", + "bits": [ 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546 ] + }, + "CFGSUBSYSVENDID": { + "direction": "input", + "bits": [ 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562 ] + }, + "CFGVENDID": { + "direction": "input", + "bits": [ 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578 ] + }, + "DRPDI": { + "direction": "input", + "bits": [ 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594 ] + }, + "PIPERX0DATA": { + "direction": "input", + "bits": [ 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610 ] + }, + "PIPERX1DATA": { + "direction": "input", + "bits": [ 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626 ] + }, + "PIPERX2DATA": { + "direction": "input", + "bits": [ 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642 ] + }, + "PIPERX3DATA": { + "direction": "input", + "bits": [ 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658 ] + }, + "PIPERX4DATA": { + "direction": "input", + "bits": [ 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674 ] + }, + "PIPERX5DATA": { + "direction": "input", + "bits": [ 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690 ] + }, + "PIPERX6DATA": { + "direction": "input", + "bits": [ 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706 ] + }, + "PIPERX7DATA": { + "direction": "input", + "bits": [ 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722 ] + }, + "CFGPMFORCESTATE": { + "direction": "input", + "bits": [ 1723, 1724 ] + }, + "DBGMODE": { + "direction": "input", + "bits": [ 1725, 1726 ] + }, + "PIPERX0CHARISK": { + "direction": "input", + "bits": [ 1727, 1728 ] + }, + "PIPERX1CHARISK": { + "direction": "input", + "bits": [ 1729, 1730 ] + }, + "PIPERX2CHARISK": { + "direction": "input", + "bits": [ 1731, 1732 ] + }, + "PIPERX3CHARISK": { + "direction": "input", + "bits": [ 1733, 1734 ] + }, + "PIPERX4CHARISK": { + "direction": "input", + "bits": [ 1735, 1736 ] + }, + "PIPERX5CHARISK": { + "direction": "input", + "bits": [ 1737, 1738 ] + }, + "PIPERX6CHARISK": { + "direction": "input", + "bits": [ 1739, 1740 ] + }, + "PIPERX7CHARISK": { + "direction": "input", + "bits": [ 1741, 1742 ] + }, + "PLDIRECTEDLINKCHANGE": { + "direction": "input", + "bits": [ 1743, 1744 ] + }, + "PLDIRECTEDLINKWIDTH": { + "direction": "input", + "bits": [ 1745, 1746 ] + }, + "TRNTREM": { + "direction": "input", + "bits": [ 1747, 1748 ] + }, + "CFGDSFUNCTIONNUMBER": { + "direction": "input", + "bits": [ 1749, 1750, 1751 ] + }, + "CFGFORCEMPS": { + "direction": "input", + "bits": [ 1752, 1753, 1754 ] + }, + "PIPERX0STATUS": { + "direction": "input", + "bits": [ 1755, 1756, 1757 ] + }, + "PIPERX1STATUS": { + "direction": "input", + "bits": [ 1758, 1759, 1760 ] + }, + "PIPERX2STATUS": { + "direction": "input", + "bits": [ 1761, 1762, 1763 ] + }, + "PIPERX3STATUS": { + "direction": "input", + "bits": [ 1764, 1765, 1766 ] + }, + "PIPERX4STATUS": { + "direction": "input", + "bits": [ 1767, 1768, 1769 ] + }, + "PIPERX5STATUS": { + "direction": "input", + "bits": [ 1770, 1771, 1772 ] + }, + "PIPERX6STATUS": { + "direction": "input", + "bits": [ 1773, 1774, 1775 ] + }, + "PIPERX7STATUS": { + "direction": "input", + "bits": [ 1776, 1777, 1778 ] + }, + "PLDBGMODE": { + "direction": "input", + "bits": [ 1779, 1780, 1781 ] + }, + "TRNFCSEL": { + "direction": "input", + "bits": [ 1782, 1783, 1784 ] + }, + "CFGMGMTDI": { + "direction": "input", + "bits": [ 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816 ] + }, + "TRNTDLLPDATA": { + "direction": "input", + "bits": [ 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848 ] + }, + "CFGMGMTBYTEENN": { + "direction": "input", + "bits": [ 1849, 1850, 1851, 1852 ] + }, + "CFGERRTLPCPLHEADER": { + "direction": "input", + "bits": [ 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900 ] + }, + "CFGAERINTERRUPTMSGNUM": { + "direction": "input", + "bits": [ 1901, 1902, 1903, 1904, 1905 ] + }, + "CFGDSDEVICENUMBER": { + "direction": "input", + "bits": [ 1906, 1907, 1908, 1909, 1910 ] + }, + "CFGPCIECAPINTERRUPTMSGNUM": { + "direction": "input", + "bits": [ 1911, 1912, 1913, 1914, 1915 ] + }, + "PL2DIRECTEDLSTATE": { + "direction": "input", + "bits": [ 1916, 1917, 1918, 1919, 1920 ] + }, + "PLDIRECTEDLTSSMNEW": { + "direction": "input", + "bits": [ 1921, 1922, 1923, 1924, 1925, 1926 ] + }, + "CFGDSN": { + "direction": "input", + "bits": [ 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990 ] + }, + "MIMRXRDATA": { + "direction": "input", + "bits": [ 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058 ] + }, + "MIMTXRDATA": { + "direction": "input", + "bits": [ 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127 ] + }, + "CFGDSBUSNUMBER": { + "direction": "input", + "bits": [ 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135 ] + }, + "CFGINTERRUPTDI": { + "direction": "input", + "bits": [ 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143 ] + }, + "CFGPORTNUMBER": { + "direction": "input", + "bits": [ 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151 ] + }, + "CFGREVID": { + "direction": "input", + "bits": [ 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159 ] + }, + "DRPADDR": { + "direction": "input", + "bits": [ 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168 ] + }, + "CFGMGMTDWADDR": { + "direction": "input", + "bits": [ 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178 ] + } + }, + "cells": { + }, + "netnames": { + "CFGAERECRCCHECKEN": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1998" + } + }, + "CFGAERECRCGENEN": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1999" + } + }, + "CFGAERINTERRUPTMSGNUM": { + "hide_name": 0, + "bits": [ 1901, 1902, 1903, 1904, 1905 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2392" + } + }, + "CFGAERROOTERRCORRERRRECEIVED": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2000" + } + }, + "CFGAERROOTERRCORRERRREPORTINGEN": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2001" + } + }, + "CFGAERROOTERRFATALERRRECEIVED": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2002" + } + }, + "CFGAERROOTERRFATALERRREPORTINGEN": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2003" + } + }, + "CFGAERROOTERRNONFATALERRRECEIVED": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2004" + } + }, + "CFGAERROOTERRNONFATALERRREPORTINGEN": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2005" + } + }, + "CFGBRIDGESERREN": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2006" + } + }, + "CFGCOMMANDBUSMASTERENABLE": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2007" + } + }, + "CFGCOMMANDINTERRUPTDISABLE": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2008" + } + }, + "CFGCOMMANDIOENABLE": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2009" + } + }, + "CFGCOMMANDMEMENABLE": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2010" + } + }, + "CFGCOMMANDSERREN": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2011" + } + }, + "CFGDEVCONTROL2ARIFORWARDEN": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2012" + } + }, + "CFGDEVCONTROL2ATOMICEGRESSBLOCK": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2013" + } + }, + "CFGDEVCONTROL2ATOMICREQUESTEREN": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2014" + } + }, + "CFGDEVCONTROL2CPLTIMEOUTDIS": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2015" + } + }, + "CFGDEVCONTROL2CPLTIMEOUTVAL": { + "hide_name": 0, + "bits": [ 677, 678, 679, 680 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2223" + } + }, + "CFGDEVCONTROL2IDOCPLEN": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2016" + } + }, + "CFGDEVCONTROL2IDOREQEN": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2017" + } + }, + "CFGDEVCONTROL2LTREN": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2018" + } + }, + "CFGDEVCONTROL2TLPPREFIXBLOCK": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2019" + } + }, + "CFGDEVCONTROLAUXPOWEREN": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2020" + } + }, + "CFGDEVCONTROLCORRERRREPORTINGEN": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2021" + } + }, + "CFGDEVCONTROLENABLERO": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2022" + } + }, + "CFGDEVCONTROLEXTTAGEN": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2023" + } + }, + "CFGDEVCONTROLFATALERRREPORTINGEN": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2024" + } + }, + "CFGDEVCONTROLMAXPAYLOAD": { + "hide_name": 0, + "bits": [ 624, 625, 626 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2215" + } + }, + "CFGDEVCONTROLMAXREADREQ": { + "hide_name": 0, + "bits": [ 627, 628, 629 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2216" + } + }, + "CFGDEVCONTROLNONFATALREPORTINGEN": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2025" + } + }, + "CFGDEVCONTROLNOSNOOPEN": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2026" + } + }, + "CFGDEVCONTROLPHANTOMEN": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2027" + } + }, + "CFGDEVCONTROLURERRREPORTINGEN": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2028" + } + }, + "CFGDEVID": { + "hide_name": 0, + "bits": [ 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2350" + } + }, + "CFGDEVSTATUSCORRERRDETECTED": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2029" + } + }, + "CFGDEVSTATUSFATALERRDETECTED": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2030" + } + }, + "CFGDEVSTATUSNONFATALERRDETECTED": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2031" + } + }, + "CFGDEVSTATUSURDETECTED": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2032" + } + }, + "CFGDSBUSNUMBER": { + "hide_name": 0, + "bits": [ 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2400" + } + }, + "CFGDSDEVICENUMBER": { + "hide_name": 0, + "bits": [ 1906, 1907, 1908, 1909, 1910 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2393" + } + }, + "CFGDSFUNCTIONNUMBER": { + "hide_name": 0, + "bits": [ 1749, 1750, 1751 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2376" + } + }, + "CFGDSN": { + "hide_name": 0, + "bits": [ 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2397" + } + }, + "CFGERRACSN": { + "hide_name": 0, + "bits": [ 1153 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2242" + } + }, + "CFGERRAERHEADERLOG": { + "hide_name": 0, + "bits": [ 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2348" + } + }, + "CFGERRAERHEADERLOGSETN": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2033" + } + }, + "CFGERRATOMICEGRESSBLOCKEDN": { + "hide_name": 0, + "bits": [ 1154 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2243" + } + }, + "CFGERRCORN": { + "hide_name": 0, + "bits": [ 1155 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2244" + } + }, + "CFGERRCPLABORTN": { + "hide_name": 0, + "bits": [ 1156 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2245" + } + }, + "CFGERRCPLRDYN": { + "hide_name": 0, + "bits": [ 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2034" + } + }, + "CFGERRCPLTIMEOUTN": { + "hide_name": 0, + "bits": [ 1157 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2246" + } + }, + "CFGERRCPLUNEXPECTN": { + "hide_name": 0, + "bits": [ 1158 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2247" + } + }, + "CFGERRECRCN": { + "hide_name": 0, + "bits": [ 1159 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2248" + } + }, + "CFGERRINTERNALCORN": { + "hide_name": 0, + "bits": [ 1160 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2249" + } + }, + "CFGERRINTERNALUNCORN": { + "hide_name": 0, + "bits": [ 1161 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2250" + } + }, + "CFGERRLOCKEDN": { + "hide_name": 0, + "bits": [ 1162 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2251" + } + }, + "CFGERRMALFORMEDN": { + "hide_name": 0, + "bits": [ 1163 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2252" + } + }, + "CFGERRMCBLOCKEDN": { + "hide_name": 0, + "bits": [ 1164 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2253" + } + }, + "CFGERRNORECOVERYN": { + "hide_name": 0, + "bits": [ 1165 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2254" + } + }, + "CFGERRPOISONEDN": { + "hide_name": 0, + "bits": [ 1166 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2255" + } + }, + "CFGERRPOSTEDN": { + "hide_name": 0, + "bits": [ 1167 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2256" + } + }, + "CFGERRTLPCPLHEADER": { + "hide_name": 0, + "bits": [ 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2391" + } + }, + "CFGERRURN": { + "hide_name": 0, + "bits": [ 1168 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2257" + } + }, + "CFGFORCECOMMONCLOCKOFF": { + "hide_name": 0, + "bits": [ 1169 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2258" + } + }, + "CFGFORCEEXTENDEDSYNCON": { + "hide_name": 0, + "bits": [ 1170 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2259" + } + }, + "CFGFORCEMPS": { + "hide_name": 0, + "bits": [ 1752, 1753, 1754 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2377" + } + }, + "CFGINTERRUPTASSERTN": { + "hide_name": 0, + "bits": [ 1171 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2260" + } + }, + "CFGINTERRUPTDI": { + "hide_name": 0, + "bits": [ 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2401" + } + }, + "CFGINTERRUPTDO": { + "hide_name": 0, + "bits": [ 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2237" + } + }, + "CFGINTERRUPTMMENABLE": { + "hide_name": 0, + "bits": [ 630, 631, 632 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2217" + } + }, + "CFGINTERRUPTMSIENABLE": { + "hide_name": 0, + "bits": [ 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2035" + } + }, + "CFGINTERRUPTMSIXENABLE": { + "hide_name": 0, + "bits": [ 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2036" + } + }, + "CFGINTERRUPTMSIXFM": { + "hide_name": 0, + "bits": [ 41 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2037" + } + }, + "CFGINTERRUPTN": { + "hide_name": 0, + "bits": [ 1172 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2261" + } + }, + "CFGINTERRUPTRDYN": { + "hide_name": 0, + "bits": [ 42 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2038" + } + }, + "CFGINTERRUPTSTATN": { + "hide_name": 0, + "bits": [ 1173 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2262" + } + }, + "CFGLINKCONTROLASPMCONTROL": { + "hide_name": 0, + "bits": [ 574, 575 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2190" + } + }, + "CFGLINKCONTROLAUTOBANDWIDTHINTEN": { + "hide_name": 0, + "bits": [ 43 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2039" + } + }, + "CFGLINKCONTROLBANDWIDTHINTEN": { + "hide_name": 0, + "bits": [ 44 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2040" + } + }, + "CFGLINKCONTROLCLOCKPMEN": { + "hide_name": 0, + "bits": [ 45 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2041" + } + }, + "CFGLINKCONTROLCOMMONCLOCK": { + "hide_name": 0, + "bits": [ 46 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2042" + } + }, + "CFGLINKCONTROLEXTENDEDSYNC": { + "hide_name": 0, + "bits": [ 47 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2043" + } + }, + "CFGLINKCONTROLHWAUTOWIDTHDIS": { + "hide_name": 0, + "bits": [ 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2044" + } + }, + "CFGLINKCONTROLLINKDISABLE": { + "hide_name": 0, + "bits": [ 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2045" + } + }, + "CFGLINKCONTROLRCB": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2046" + } + }, + "CFGLINKCONTROLRETRAINLINK": { + "hide_name": 0, + "bits": [ 51 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2047" + } + }, + "CFGLINKSTATUSAUTOBANDWIDTHSTATUS": { + "hide_name": 0, + "bits": [ 52 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2048" + } + }, + "CFGLINKSTATUSBANDWIDTHSTATUS": { + "hide_name": 0, + "bits": [ 53 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2049" + } + }, + "CFGLINKSTATUSCURRENTSPEED": { + "hide_name": 0, + "bits": [ 576, 577 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2191" + } + }, + "CFGLINKSTATUSDLLACTIVE": { + "hide_name": 0, + "bits": [ 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2050" + } + }, + "CFGLINKSTATUSLINKTRAINING": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2051" + } + }, + "CFGLINKSTATUSNEGOTIATEDWIDTH": { + "hide_name": 0, + "bits": [ 681, 682, 683, 684 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2224" + } + }, + "CFGMGMTBYTEENN": { + "hide_name": 0, + "bits": [ 1849, 1850, 1851, 1852 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2390" + } + }, + "CFGMGMTDI": { + "hide_name": 0, + "bits": [ 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2388" + } + }, + "CFGMGMTDO": { + "hide_name": 0, + "bits": [ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2222" + } + }, + "CFGMGMTDWADDR": { + "hide_name": 0, + "bits": [ 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2405" + } + }, + "CFGMGMTRDENN": { + "hide_name": 0, + "bits": [ 1174 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2263" + } + }, + "CFGMGMTRDWRDONEN": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2052" + } + }, + "CFGMGMTWRENN": { + "hide_name": 0, + "bits": [ 1175 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2264" + } + }, + "CFGMGMTWRREADONLYN": { + "hide_name": 0, + "bits": [ 1176 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2265" + } + }, + "CFGMGMTWRRW1CASRWN": { + "hide_name": 0, + "bits": [ 1177 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2266" + } + }, + "CFGMSGDATA": { + "hide_name": 0, + "bits": [ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2180" + } + }, + "CFGMSGRECEIVED": { + "hide_name": 0, + "bits": [ 57 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2053" + } + }, + "CFGMSGRECEIVEDASSERTINTA": { + "hide_name": 0, + "bits": [ 58 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2054" + } + }, + "CFGMSGRECEIVEDASSERTINTB": { + "hide_name": 0, + "bits": [ 59 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2055" + } + }, + "CFGMSGRECEIVEDASSERTINTC": { + "hide_name": 0, + "bits": [ 60 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2056" + } + }, + "CFGMSGRECEIVEDASSERTINTD": { + "hide_name": 0, + "bits": [ 61 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2057" + } + }, + "CFGMSGRECEIVEDDEASSERTINTA": { + "hide_name": 0, + "bits": [ 62 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2058" + } + }, + "CFGMSGRECEIVEDDEASSERTINTB": { + "hide_name": 0, + "bits": [ 63 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2059" + } + }, + "CFGMSGRECEIVEDDEASSERTINTC": { + "hide_name": 0, + "bits": [ 64 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2060" + } + }, + "CFGMSGRECEIVEDDEASSERTINTD": { + "hide_name": 0, + "bits": [ 65 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2061" + } + }, + "CFGMSGRECEIVEDERRCOR": { + "hide_name": 0, + "bits": [ 66 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2062" + } + }, + "CFGMSGRECEIVEDERRFATAL": { + "hide_name": 0, + "bits": [ 67 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2063" + } + }, + "CFGMSGRECEIVEDERRNONFATAL": { + "hide_name": 0, + "bits": [ 68 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2064" + } + }, + "CFGMSGRECEIVEDPMASNAK": { + "hide_name": 0, + "bits": [ 69 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2065" + } + }, + "CFGMSGRECEIVEDPMETO": { + "hide_name": 0, + "bits": [ 70 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2066" + } + }, + "CFGMSGRECEIVEDPMETOACK": { + "hide_name": 0, + "bits": [ 71 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2067" + } + }, + "CFGMSGRECEIVEDPMPME": { + "hide_name": 0, + "bits": [ 72 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2068" + } + }, + "CFGMSGRECEIVEDSETSLOTPOWERLIMIT": { + "hide_name": 0, + "bits": [ 73 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2069" + } + }, + "CFGMSGRECEIVEDUNLOCK": { + "hide_name": 0, + "bits": [ 74 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2070" + } + }, + "CFGPCIECAPINTERRUPTMSGNUM": { + "hide_name": 0, + "bits": [ 1911, 1912, 1913, 1914, 1915 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2394" + } + }, + "CFGPCIELINKSTATE": { + "hide_name": 0, + "bits": [ 633, 634, 635 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2218" + } + }, + "CFGPMCSRPMEEN": { + "hide_name": 0, + "bits": [ 75 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2071" + } + }, + "CFGPMCSRPMESTATUS": { + "hide_name": 0, + "bits": [ 76 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2072" + } + }, + "CFGPMCSRPOWERSTATE": { + "hide_name": 0, + "bits": [ 578, 579 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2192" + } + }, + "CFGPMFORCESTATE": { + "hide_name": 0, + "bits": [ 1723, 1724 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2363" + } + }, + "CFGPMFORCESTATEENN": { + "hide_name": 0, + "bits": [ 1178 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2267" + } + }, + "CFGPMHALTASPML0SN": { + "hide_name": 0, + "bits": [ 1179 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2268" + } + }, + "CFGPMHALTASPML1N": { + "hide_name": 0, + "bits": [ 1180 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2269" + } + }, + "CFGPMRCVASREQL1N": { + "hide_name": 0, + "bits": [ 77 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2073" + } + }, + "CFGPMRCVENTERL1N": { + "hide_name": 0, + "bits": [ 78 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2074" + } + }, + "CFGPMRCVENTERL23N": { + "hide_name": 0, + "bits": [ 79 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2075" + } + }, + "CFGPMRCVREQACKN": { + "hide_name": 0, + "bits": [ 80 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2076" + } + }, + "CFGPMSENDPMETON": { + "hide_name": 0, + "bits": [ 1181 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2270" + } + }, + "CFGPMTURNOFFOKN": { + "hide_name": 0, + "bits": [ 1182 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2271" + } + }, + "CFGPMWAKEN": { + "hide_name": 0, + "bits": [ 1183 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2272" + } + }, + "CFGPORTNUMBER": { + "hide_name": 0, + "bits": [ 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2402" + } + }, + "CFGREVID": { + "hide_name": 0, + "bits": [ 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2403" + } + }, + "CFGROOTCONTROLPMEINTEN": { + "hide_name": 0, + "bits": [ 81 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2077" + } + }, + "CFGROOTCONTROLSYSERRCORRERREN": { + "hide_name": 0, + "bits": [ 82 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2078" + } + }, + "CFGROOTCONTROLSYSERRFATALERREN": { + "hide_name": 0, + "bits": [ 83 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2079" + } + }, + "CFGROOTCONTROLSYSERRNONFATALERREN": { + "hide_name": 0, + "bits": [ 84 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2080" + } + }, + "CFGSLOTCONTROLELECTROMECHILCTLPULSE": { + "hide_name": 0, + "bits": [ 85 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2081" + } + }, + "CFGSUBSYSID": { + "hide_name": 0, + "bits": [ 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2351" + } + }, + "CFGSUBSYSVENDID": { + "hide_name": 0, + "bits": [ 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2352" + } + }, + "CFGTRANSACTION": { + "hide_name": 0, + "bits": [ 86 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2082" + } + }, + "CFGTRANSACTIONADDR": { + "hide_name": 0, + "bits": [ 1099, 1100, 1101, 1102, 1103, 1104, 1105 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2235" + } + }, + "CFGTRANSACTIONTYPE": { + "hide_name": 0, + "bits": [ 87 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2083" + } + }, + "CFGTRNPENDINGN": { + "hide_name": 0, + "bits": [ 1184 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2273" + } + }, + "CFGVCTCVCMAP": { + "hide_name": 0, + "bits": [ 1106, 1107, 1108, 1109, 1110, 1111, 1112 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2236" + } + }, + "CFGVENDID": { + "hide_name": 0, + "bits": [ 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2353" + } + }, + "CMRSTN": { + "hide_name": 0, + "bits": [ 1185 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2274" + } + }, + "CMSTICKYRSTN": { + "hide_name": 0, + "bits": [ 1186 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2275" + } + }, + "DBGMODE": { + "hide_name": 0, + "bits": [ 1725, 1726 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2364" + } + }, + "DBGSCLRA": { + "hide_name": 0, + "bits": [ 88 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2084" + } + }, + "DBGSCLRB": { + "hide_name": 0, + "bits": [ 89 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2085" + } + }, + "DBGSCLRC": { + "hide_name": 0, + "bits": [ 90 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2086" + } + }, + "DBGSCLRD": { + "hide_name": 0, + "bits": [ 91 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2087" + } + }, + "DBGSCLRE": { + "hide_name": 0, + "bits": [ 92 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2088" + } + }, + "DBGSCLRF": { + "hide_name": 0, + "bits": [ 93 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2089" + } + }, + "DBGSCLRG": { + "hide_name": 0, + "bits": [ 94 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2090" + } + }, + "DBGSCLRH": { + "hide_name": 0, + "bits": [ 95 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2091" + } + }, + "DBGSCLRI": { + "hide_name": 0, + "bits": [ 96 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2092" + } + }, + "DBGSCLRJ": { + "hide_name": 0, + "bits": [ 97 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2093" + } + }, + "DBGSCLRK": { + "hide_name": 0, + "bits": [ 98 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2094" + } + }, + "DBGSUBMODE": { + "hide_name": 0, + "bits": [ 1187 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2276" + } + }, + "DBGVECA": { + "hide_name": 0, + "bits": [ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2229" + } + }, + "DBGVECB": { + "hide_name": 0, + "bits": [ 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2230" + } + }, + "DBGVECC": { + "hide_name": 0, + "bits": [ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2170" + } + }, + "DLRSTN": { + "hide_name": 0, + "bits": [ 1188 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2277" + } + }, + "DRPADDR": { + "hide_name": 0, + "bits": [ 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2404" + } + }, + "DRPCLK": { + "hide_name": 0, + "bits": [ 1189 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2278" + } + }, + "DRPDI": { + "hide_name": 0, + "bits": [ 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2354" + } + }, + "DRPDO": { + "hide_name": 0, + "bits": [ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2181" + } + }, + "DRPEN": { + "hide_name": 0, + "bits": [ 1190 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2279" + } + }, + "DRPRDY": { + "hide_name": 0, + "bits": [ 99 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2095" + } + }, + "DRPWE": { + "hide_name": 0, + "bits": [ 1191 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2280" + } + }, + "FUNCLVLRSTN": { + "hide_name": 0, + "bits": [ 1192 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2281" + } + }, + "LL2BADDLLPERR": { + "hide_name": 0, + "bits": [ 100 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2096" + } + }, + "LL2BADTLPERR": { + "hide_name": 0, + "bits": [ 101 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2097" + } + }, + "LL2LINKSTATUS": { + "hide_name": 0, + "bits": [ 689, 690, 691, 692, 693 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2226" + } + }, + "LL2PROTOCOLERR": { + "hide_name": 0, + "bits": [ 102 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2098" + } + }, + "LL2RECEIVERERR": { + "hide_name": 0, + "bits": [ 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2099" + } + }, + "LL2REPLAYROERR": { + "hide_name": 0, + "bits": [ 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2100" + } + }, + "LL2REPLAYTOERR": { + "hide_name": 0, + "bits": [ 105 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2101" + } + }, + "LL2SENDASREQL1": { + "hide_name": 0, + "bits": [ 1193 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2282" + } + }, + "LL2SENDENTERL1": { + "hide_name": 0, + "bits": [ 1194 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2283" + } + }, + "LL2SENDENTERL23": { + "hide_name": 0, + "bits": [ 1195 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2284" + } + }, + "LL2SENDPMACK": { + "hide_name": 0, + "bits": [ 1196 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2285" + } + }, + "LL2SUSPENDNOW": { + "hide_name": 0, + "bits": [ 1197 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2286" + } + }, + "LL2SUSPENDOK": { + "hide_name": 0, + "bits": [ 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2102" + } + }, + "LL2TFCINIT1SEQ": { + "hide_name": 0, + "bits": [ 107 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2103" + } + }, + "LL2TFCINIT2SEQ": { + "hide_name": 0, + "bits": [ 108 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2104" + } + }, + "LL2TLPRCV": { + "hide_name": 0, + "bits": [ 1198 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2287" + } + }, + "LL2TXIDLE": { + "hide_name": 0, + "bits": [ 109 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2105" + } + }, + "LNKCLKEN": { + "hide_name": 0, + "bits": [ 110 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2106" + } + }, + "MIMRXRADDR": { + "hide_name": 0, + "bits": [ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2176" + } + }, + "MIMRXRDATA": { + "hide_name": 0, + "bits": [ 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2398" + } + }, + "MIMRXREN": { + "hide_name": 0, + "bits": [ 111 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2107" + } + }, + "MIMRXWADDR": { + "hide_name": 0, + "bits": [ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2177" + } + }, + "MIMRXWDATA": { + "hide_name": 0, + "bits": [ 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2233" + } + }, + "MIMRXWEN": { + "hide_name": 0, + "bits": [ 112 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2108" + } + }, + "MIMTXRADDR": { + "hide_name": 0, + "bits": [ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2178" + } + }, + "MIMTXRDATA": { + "hide_name": 0, + "bits": [ 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2399" + } + }, + "MIMTXREN": { + "hide_name": 0, + "bits": [ 113 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2109" + } + }, + "MIMTXWADDR": { + "hide_name": 0, + "bits": [ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2179" + } + }, + "MIMTXWDATA": { + "hide_name": 0, + "bits": [ 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2234" + } + }, + "MIMTXWEN": { + "hide_name": 0, + "bits": [ 114 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2110" + } + }, + "PIPECLK": { + "hide_name": 0, + "bits": [ 1199 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2288" + } + }, + "PIPERX0CHANISALIGNED": { + "hide_name": 0, + "bits": [ 1200 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2289" + } + }, + "PIPERX0CHARISK": { + "hide_name": 0, + "bits": [ 1727, 1728 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2365" + } + }, + "PIPERX0DATA": { + "hide_name": 0, + "bits": [ 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2355" + } + }, + "PIPERX0ELECIDLE": { + "hide_name": 0, + "bits": [ 1201 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2290" + } + }, + "PIPERX0PHYSTATUS": { + "hide_name": 0, + "bits": [ 1202 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2291" + } + }, + "PIPERX0POLARITY": { + "hide_name": 0, + "bits": [ 115 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2111" + } + }, + "PIPERX0STATUS": { + "hide_name": 0, + "bits": [ 1755, 1756, 1757 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2378" + } + }, + "PIPERX0VALID": { + "hide_name": 0, + "bits": [ 1203 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2292" + } + }, + "PIPERX1CHANISALIGNED": { + "hide_name": 0, + "bits": [ 1204 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2293" + } + }, + "PIPERX1CHARISK": { + "hide_name": 0, + "bits": [ 1729, 1730 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2366" + } + }, + "PIPERX1DATA": { + "hide_name": 0, + "bits": [ 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2356" + } + }, + "PIPERX1ELECIDLE": { + "hide_name": 0, + "bits": [ 1205 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2294" + } + }, + "PIPERX1PHYSTATUS": { + "hide_name": 0, + "bits": [ 1206 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2295" + } + }, + "PIPERX1POLARITY": { + "hide_name": 0, + "bits": [ 116 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2112" + } + }, + "PIPERX1STATUS": { + "hide_name": 0, + "bits": [ 1758, 1759, 1760 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2379" + } + }, + "PIPERX1VALID": { + "hide_name": 0, + "bits": [ 1207 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2296" + } + }, + "PIPERX2CHANISALIGNED": { + "hide_name": 0, + "bits": [ 1208 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2297" + } + }, + "PIPERX2CHARISK": { + "hide_name": 0, + "bits": [ 1731, 1732 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2367" + } + }, + "PIPERX2DATA": { + "hide_name": 0, + "bits": [ 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2357" + } + }, + "PIPERX2ELECIDLE": { + "hide_name": 0, + "bits": [ 1209 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2298" + } + }, + "PIPERX2PHYSTATUS": { + "hide_name": 0, + "bits": [ 1210 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2299" + } + }, + "PIPERX2POLARITY": { + "hide_name": 0, + "bits": [ 117 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2113" + } + }, + "PIPERX2STATUS": { + "hide_name": 0, + "bits": [ 1761, 1762, 1763 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2380" + } + }, + "PIPERX2VALID": { + "hide_name": 0, + "bits": [ 1211 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2300" + } + }, + "PIPERX3CHANISALIGNED": { + "hide_name": 0, + "bits": [ 1212 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2301" + } + }, + "PIPERX3CHARISK": { + "hide_name": 0, + "bits": [ 1733, 1734 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2368" + } + }, + "PIPERX3DATA": { + "hide_name": 0, + "bits": [ 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2358" + } + }, + "PIPERX3ELECIDLE": { + "hide_name": 0, + "bits": [ 1213 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2302" + } + }, + "PIPERX3PHYSTATUS": { + "hide_name": 0, + "bits": [ 1214 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2303" + } + }, + "PIPERX3POLARITY": { + "hide_name": 0, + "bits": [ 118 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2114" + } + }, + "PIPERX3STATUS": { + "hide_name": 0, + "bits": [ 1764, 1765, 1766 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2381" + } + }, + "PIPERX3VALID": { + "hide_name": 0, + "bits": [ 1215 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2304" + } + }, + "PIPERX4CHANISALIGNED": { + "hide_name": 0, + "bits": [ 1216 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2305" + } + }, + "PIPERX4CHARISK": { + "hide_name": 0, + "bits": [ 1735, 1736 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2369" + } + }, + "PIPERX4DATA": { + "hide_name": 0, + "bits": [ 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2359" + } + }, + "PIPERX4ELECIDLE": { + "hide_name": 0, + "bits": [ 1217 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2306" + } + }, + "PIPERX4PHYSTATUS": { + "hide_name": 0, + "bits": [ 1218 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2307" + } + }, + "PIPERX4POLARITY": { + "hide_name": 0, + "bits": [ 119 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2115" + } + }, + "PIPERX4STATUS": { + "hide_name": 0, + "bits": [ 1767, 1768, 1769 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2382" + } + }, + "PIPERX4VALID": { + "hide_name": 0, + "bits": [ 1219 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2308" + } + }, + "PIPERX5CHANISALIGNED": { + "hide_name": 0, + "bits": [ 1220 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2309" + } + }, + "PIPERX5CHARISK": { + "hide_name": 0, + "bits": [ 1737, 1738 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2370" + } + }, + "PIPERX5DATA": { + "hide_name": 0, + "bits": [ 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2360" + } + }, + "PIPERX5ELECIDLE": { + "hide_name": 0, + "bits": [ 1221 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2310" + } + }, + "PIPERX5PHYSTATUS": { + "hide_name": 0, + "bits": [ 1222 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2311" + } + }, + "PIPERX5POLARITY": { + "hide_name": 0, + "bits": [ 120 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2116" + } + }, + "PIPERX5STATUS": { + "hide_name": 0, + "bits": [ 1770, 1771, 1772 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2383" + } + }, + "PIPERX5VALID": { + "hide_name": 0, + "bits": [ 1223 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2312" + } + }, + "PIPERX6CHANISALIGNED": { + "hide_name": 0, + "bits": [ 1224 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2313" + } + }, + "PIPERX6CHARISK": { + "hide_name": 0, + "bits": [ 1739, 1740 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2371" + } + }, + "PIPERX6DATA": { + "hide_name": 0, + "bits": [ 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2361" + } + }, + "PIPERX6ELECIDLE": { + "hide_name": 0, + "bits": [ 1225 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2314" + } + }, + "PIPERX6PHYSTATUS": { + "hide_name": 0, + "bits": [ 1226 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2315" + } + }, + "PIPERX6POLARITY": { + "hide_name": 0, + "bits": [ 121 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2117" + } + }, + "PIPERX6STATUS": { + "hide_name": 0, + "bits": [ 1773, 1774, 1775 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2384" + } + }, + "PIPERX6VALID": { + "hide_name": 0, + "bits": [ 1227 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2316" + } + }, + "PIPERX7CHANISALIGNED": { + "hide_name": 0, + "bits": [ 1228 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2317" + } + }, + "PIPERX7CHARISK": { + "hide_name": 0, + "bits": [ 1741, 1742 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2372" + } + }, + "PIPERX7DATA": { + "hide_name": 0, + "bits": [ 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2362" + } + }, + "PIPERX7ELECIDLE": { + "hide_name": 0, + "bits": [ 1229 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2318" + } + }, + "PIPERX7PHYSTATUS": { + "hide_name": 0, + "bits": [ 1230 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2319" + } + }, + "PIPERX7POLARITY": { + "hide_name": 0, + "bits": [ 122 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2118" + } + }, + "PIPERX7STATUS": { + "hide_name": 0, + "bits": [ 1776, 1777, 1778 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2385" + } + }, + "PIPERX7VALID": { + "hide_name": 0, + "bits": [ 1231 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2320" + } + }, + "PIPETX0CHARISK": { + "hide_name": 0, + "bits": [ 580, 581 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2193" + } + }, + "PIPETX0COMPLIANCE": { + "hide_name": 0, + "bits": [ 123 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2119" + } + }, + "PIPETX0DATA": { + "hide_name": 0, + "bits": [ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2182" + } + }, + "PIPETX0ELECIDLE": { + "hide_name": 0, + "bits": [ 124 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2120" + } + }, + "PIPETX0POWERDOWN": { + "hide_name": 0, + "bits": [ 582, 583 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2194" + } + }, + "PIPETX1CHARISK": { + "hide_name": 0, + "bits": [ 584, 585 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2195" + } + }, + "PIPETX1COMPLIANCE": { + "hide_name": 0, + "bits": [ 125 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2121" + } + }, + "PIPETX1DATA": { + "hide_name": 0, + "bits": [ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2183" + } + }, + "PIPETX1ELECIDLE": { + "hide_name": 0, + "bits": [ 126 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2122" + } + }, + "PIPETX1POWERDOWN": { + "hide_name": 0, + "bits": [ 586, 587 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2196" + } + }, + "PIPETX2CHARISK": { + "hide_name": 0, + "bits": [ 588, 589 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2197" + } + }, + "PIPETX2COMPLIANCE": { + "hide_name": 0, + "bits": [ 127 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2123" + } + }, + "PIPETX2DATA": { + "hide_name": 0, + "bits": [ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2184" + } + }, + "PIPETX2ELECIDLE": { + "hide_name": 0, + "bits": [ 128 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2124" + } + }, + "PIPETX2POWERDOWN": { + "hide_name": 0, + "bits": [ 590, 591 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2198" + } + }, + "PIPETX3CHARISK": { + "hide_name": 0, + "bits": [ 592, 593 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2199" + } + }, + "PIPETX3COMPLIANCE": { + "hide_name": 0, + "bits": [ 129 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2125" + } + }, + "PIPETX3DATA": { + "hide_name": 0, + "bits": [ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2185" + } + }, + "PIPETX3ELECIDLE": { + "hide_name": 0, + "bits": [ 130 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2126" + } + }, + "PIPETX3POWERDOWN": { + "hide_name": 0, + "bits": [ 594, 595 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2200" + } + }, + "PIPETX4CHARISK": { + "hide_name": 0, + "bits": [ 596, 597 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2201" + } + }, + "PIPETX4COMPLIANCE": { + "hide_name": 0, + "bits": [ 131 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2127" + } + }, + "PIPETX4DATA": { + "hide_name": 0, + "bits": [ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2186" + } + }, + "PIPETX4ELECIDLE": { + "hide_name": 0, + "bits": [ 132 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2128" + } + }, + "PIPETX4POWERDOWN": { + "hide_name": 0, + "bits": [ 598, 599 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2202" + } + }, + "PIPETX5CHARISK": { + "hide_name": 0, + "bits": [ 600, 601 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2203" + } + }, + "PIPETX5COMPLIANCE": { + "hide_name": 0, + "bits": [ 133 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2129" + } + }, + "PIPETX5DATA": { + "hide_name": 0, + "bits": [ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2187" + } + }, + "PIPETX5ELECIDLE": { + "hide_name": 0, + "bits": [ 134 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2130" + } + }, + "PIPETX5POWERDOWN": { + "hide_name": 0, + "bits": [ 602, 603 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2204" + } + }, + "PIPETX6CHARISK": { + "hide_name": 0, + "bits": [ 604, 605 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2205" + } + }, + "PIPETX6COMPLIANCE": { + "hide_name": 0, + "bits": [ 135 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2131" + } + }, + "PIPETX6DATA": { + "hide_name": 0, + "bits": [ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2188" + } + }, + "PIPETX6ELECIDLE": { + "hide_name": 0, + "bits": [ 136 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2132" + } + }, + "PIPETX6POWERDOWN": { + "hide_name": 0, + "bits": [ 606, 607 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2206" + } + }, + "PIPETX7CHARISK": { + "hide_name": 0, + "bits": [ 608, 609 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2207" + } + }, + "PIPETX7COMPLIANCE": { + "hide_name": 0, + "bits": [ 137 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2133" + } + }, + "PIPETX7DATA": { + "hide_name": 0, + "bits": [ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2189" + } + }, + "PIPETX7ELECIDLE": { + "hide_name": 0, + "bits": [ 138 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2134" + } + }, + "PIPETX7POWERDOWN": { + "hide_name": 0, + "bits": [ 610, 611 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2208" + } + }, + "PIPETXDEEMPH": { + "hide_name": 0, + "bits": [ 139 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2135" + } + }, + "PIPETXMARGIN": { + "hide_name": 0, + "bits": [ 636, 637, 638 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2219" + } + }, + "PIPETXRATE": { + "hide_name": 0, + "bits": [ 140 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2136" + } + }, + "PIPETXRCVRDET": { + "hide_name": 0, + "bits": [ 141 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2137" + } + }, + "PIPETXRESET": { + "hide_name": 0, + "bits": [ 142 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2138" + } + }, + "PL2DIRECTEDLSTATE": { + "hide_name": 0, + "bits": [ 1916, 1917, 1918, 1919, 1920 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2395" + } + }, + "PL2L0REQ": { + "hide_name": 0, + "bits": [ 143 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2139" + } + }, + "PL2LINKUP": { + "hide_name": 0, + "bits": [ 144 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2140" + } + }, + "PL2RECEIVERERR": { + "hide_name": 0, + "bits": [ 145 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2141" + } + }, + "PL2RECOVERY": { + "hide_name": 0, + "bits": [ 146 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2142" + } + }, + "PL2RXELECIDLE": { + "hide_name": 0, + "bits": [ 147 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2143" + } + }, + "PL2RXPMSTATE": { + "hide_name": 0, + "bits": [ 612, 613 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2209" + } + }, + "PL2SUSPENDOK": { + "hide_name": 0, + "bits": [ 148 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2144" + } + }, + "PLDBGMODE": { + "hide_name": 0, + "bits": [ 1779, 1780, 1781 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2386" + } + }, + "PLDBGVEC": { + "hide_name": 0, + "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2171" + } + }, + "PLDIRECTEDCHANGEDONE": { + "hide_name": 0, + "bits": [ 149 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2145" + } + }, + "PLDIRECTEDLINKAUTON": { + "hide_name": 0, + "bits": [ 1232 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2321" + } + }, + "PLDIRECTEDLINKCHANGE": { + "hide_name": 0, + "bits": [ 1743, 1744 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2373" + } + }, + "PLDIRECTEDLINKSPEED": { + "hide_name": 0, + "bits": [ 1233 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2322" + } + }, + "PLDIRECTEDLINKWIDTH": { + "hide_name": 0, + "bits": [ 1745, 1746 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2374" + } + }, + "PLDIRECTEDLTSSMNEW": { + "hide_name": 0, + "bits": [ 1921, 1922, 1923, 1924, 1925, 1926 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2396" + } + }, + "PLDIRECTEDLTSSMNEWVLD": { + "hide_name": 0, + "bits": [ 1234 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2323" + } + }, + "PLDIRECTEDLTSSMSTALL": { + "hide_name": 0, + "bits": [ 1235 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2324" + } + }, + "PLDOWNSTREAMDEEMPHSOURCE": { + "hide_name": 0, + "bits": [ 1236 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2325" + } + }, + "PLINITIALLINKWIDTH": { + "hide_name": 0, + "bits": [ 639, 640, 641 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2220" + } + }, + "PLLANEREVERSALMODE": { + "hide_name": 0, + "bits": [ 614, 615 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2210" + } + }, + "PLLINKGEN2CAP": { + "hide_name": 0, + "bits": [ 150 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2146" + } + }, + "PLLINKPARTNERGEN2SUPPORTED": { + "hide_name": 0, + "bits": [ 151 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2147" + } + }, + "PLLINKUPCFGCAP": { + "hide_name": 0, + "bits": [ 152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2148" + } + }, + "PLLTSSMSTATE": { + "hide_name": 0, + "bits": [ 694, 695, 696, 697, 698, 699 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2227" + } + }, + "PLPHYLNKUPN": { + "hide_name": 0, + "bits": [ 153 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2149" + } + }, + "PLRECEIVEDHOTRST": { + "hide_name": 0, + "bits": [ 154 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2150" + } + }, + "PLRSTN": { + "hide_name": 0, + "bits": [ 1237 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2326" + } + }, + "PLRXPMSTATE": { + "hide_name": 0, + "bits": [ 616, 617 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2211" + } + }, + "PLSELLNKRATE": { + "hide_name": 0, + "bits": [ 155 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2151" + } + }, + "PLSELLNKWIDTH": { + "hide_name": 0, + "bits": [ 618, 619 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2212" + } + }, + "PLTRANSMITHOTRST": { + "hide_name": 0, + "bits": [ 1238 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2327" + } + }, + "PLTXPMSTATE": { + "hide_name": 0, + "bits": [ 642, 643, 644 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2221" + } + }, + "PLUPSTREAMPREFERDEEMPH": { + "hide_name": 0, + "bits": [ 1239 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2328" + } + }, + "RECEIVEDFUNCLVLRSTN": { + "hide_name": 0, + "bits": [ 156 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2152" + } + }, + "SYSRSTN": { + "hide_name": 0, + "bits": [ 1240 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2329" + } + }, + "TL2ASPMSUSPENDCREDITCHECK": { + "hide_name": 0, + "bits": [ 1241 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2330" + } + }, + "TL2ASPMSUSPENDCREDITCHECKOK": { + "hide_name": 0, + "bits": [ 157 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2153" + } + }, + "TL2ASPMSUSPENDREQ": { + "hide_name": 0, + "bits": [ 158 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2154" + } + }, + "TL2ERRFCPE": { + "hide_name": 0, + "bits": [ 159 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2155" + } + }, + "TL2ERRHDR": { + "hide_name": 0, + "bits": [ 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2231" + } + }, + "TL2ERRMALFORMED": { + "hide_name": 0, + "bits": [ 160 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2156" + } + }, + "TL2ERRRXOVERFLOW": { + "hide_name": 0, + "bits": [ 161 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2157" + } + }, + "TL2PPMSUSPENDOK": { + "hide_name": 0, + "bits": [ 162 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2158" + } + }, + "TL2PPMSUSPENDREQ": { + "hide_name": 0, + "bits": [ 1242 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2331" + } + }, + "TLRSTN": { + "hide_name": 0, + "bits": [ 1243 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2332" + } + }, + "TRNFCCPLD": { + "hide_name": 0, + "bits": [ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2172" + } + }, + "TRNFCCPLH": { + "hide_name": 0, + "bits": [ 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2238" + } + }, + "TRNFCNPD": { + "hide_name": 0, + "bits": [ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2173" + } + }, + "TRNFCNPH": { + "hide_name": 0, + "bits": [ 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2239" + } + }, + "TRNFCPD": { + "hide_name": 0, + "bits": [ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2174" + } + }, + "TRNFCPH": { + "hide_name": 0, + "bits": [ 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2240" + } + }, + "TRNFCSEL": { + "hide_name": 0, + "bits": [ 1782, 1783, 1784 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2387" + } + }, + "TRNLNKUP": { + "hide_name": 0, + "bits": [ 163 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2159" + } + }, + "TRNRBARHIT": { + "hide_name": 0, + "bits": [ 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2241" + } + }, + "TRNRD": { + "hide_name": 0, + "bits": [ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2175" + } + }, + "TRNRDLLPDATA": { + "hide_name": 0, + "bits": [ 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2232" + } + }, + "TRNRDLLPSRCRDY": { + "hide_name": 0, + "bits": [ 620, 621 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2213" + } + }, + "TRNRDSTRDY": { + "hide_name": 0, + "bits": [ 1244 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2333" + } + }, + "TRNRECRCERR": { + "hide_name": 0, + "bits": [ 164 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2160" + } + }, + "TRNREOF": { + "hide_name": 0, + "bits": [ 165 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2161" + } + }, + "TRNRERRFWD": { + "hide_name": 0, + "bits": [ 166 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2162" + } + }, + "TRNRFCPRET": { + "hide_name": 0, + "bits": [ 1245 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2334" + } + }, + "TRNRNPOK": { + "hide_name": 0, + "bits": [ 1246 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2335" + } + }, + "TRNRNPREQ": { + "hide_name": 0, + "bits": [ 1247 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2336" + } + }, + "TRNRREM": { + "hide_name": 0, + "bits": [ 622, 623 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2214" + } + }, + "TRNRSOF": { + "hide_name": 0, + "bits": [ 167 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2163" + } + }, + "TRNRSRCDSC": { + "hide_name": 0, + "bits": [ 168 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2164" + } + }, + "TRNRSRCRDY": { + "hide_name": 0, + "bits": [ 169 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2165" + } + }, + "TRNTBUFAV": { + "hide_name": 0, + "bits": [ 700, 701, 702, 703, 704, 705 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2228" + } + }, + "TRNTCFGGNT": { + "hide_name": 0, + "bits": [ 1248 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2337" + } + }, + "TRNTCFGREQ": { + "hide_name": 0, + "bits": [ 170 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2166" + } + }, + "TRNTD": { + "hide_name": 0, + "bits": [ 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2349" + } + }, + "TRNTDLLPDATA": { + "hide_name": 0, + "bits": [ 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2389" + } + }, + "TRNTDLLPDSTRDY": { + "hide_name": 0, + "bits": [ 171 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2167" + } + }, + "TRNTDLLPSRCRDY": { + "hide_name": 0, + "bits": [ 1249 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2338" + } + }, + "TRNTDSTRDY": { + "hide_name": 0, + "bits": [ 685, 686, 687, 688 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2225" + } + }, + "TRNTECRCGEN": { + "hide_name": 0, + "bits": [ 1250 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2339" + } + }, + "TRNTEOF": { + "hide_name": 0, + "bits": [ 1251 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2340" + } + }, + "TRNTERRDROP": { + "hide_name": 0, + "bits": [ 172 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2168" + } + }, + "TRNTERRFWD": { + "hide_name": 0, + "bits": [ 1252 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2341" + } + }, + "TRNTREM": { + "hide_name": 0, + "bits": [ 1747, 1748 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2375" + } + }, + "TRNTSOF": { + "hide_name": 0, + "bits": [ 1253 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2342" + } + }, + "TRNTSRCDSC": { + "hide_name": 0, + "bits": [ 1254 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2343" + } + }, + "TRNTSRCRDY": { + "hide_name": 0, + "bits": [ 1255 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2344" + } + }, + "TRNTSTR": { + "hide_name": 0, + "bits": [ 1256 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2345" + } + }, + "USERCLK": { + "hide_name": 0, + "bits": [ 1258 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2347" + } + }, + "USERCLK2": { + "hide_name": 0, + "bits": [ 1257 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2346" + } + }, + "USERRSTN": { + "hide_name": 0, + "bits": [ 173 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2169" + } + } + } + }, + "PCIE_3_0": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2408" + }, + "ports": { + "CFGERRCOROUT": { + "direction": "output", + "bits": [ 2 ] + }, + "CFGERRFATALOUT": { + "direction": "output", + "bits": [ 3 ] + }, + "CFGERRNONFATALOUT": { + "direction": "output", + "bits": [ 4 ] + }, + "CFGEXTREADRECEIVED": { + "direction": "output", + "bits": [ 5 ] + }, + "CFGEXTWRITERECEIVED": { + "direction": "output", + "bits": [ 6 ] + }, + "CFGHOTRESETOUT": { + "direction": "output", + "bits": [ 7 ] + }, + "CFGINPUTUPDATEDONE": { + "direction": "output", + "bits": [ 8 ] + }, + "CFGINTERRUPTAOUTPUT": { + "direction": "output", + "bits": [ 9 ] + }, + "CFGINTERRUPTBOUTPUT": { + "direction": "output", + "bits": [ 10 ] + }, + "CFGINTERRUPTCOUTPUT": { + "direction": "output", + "bits": [ 11 ] + }, + "CFGINTERRUPTDOUTPUT": { + "direction": "output", + "bits": [ 12 ] + }, + "CFGINTERRUPTMSIFAIL": { + "direction": "output", + "bits": [ 13 ] + }, + "CFGINTERRUPTMSIMASKUPDATE": { + "direction": "output", + "bits": [ 14 ] + }, + "CFGINTERRUPTMSISENT": { + "direction": "output", + "bits": [ 15 ] + }, + "CFGINTERRUPTMSIXFAIL": { + "direction": "output", + "bits": [ 16 ] + }, + "CFGINTERRUPTMSIXSENT": { + "direction": "output", + "bits": [ 17 ] + }, + "CFGINTERRUPTSENT": { + "direction": "output", + "bits": [ 18 ] + }, + "CFGLOCALERROR": { + "direction": "output", + "bits": [ 19 ] + }, + "CFGLTRENABLE": { + "direction": "output", + "bits": [ 20 ] + }, + "CFGMCUPDATEDONE": { + "direction": "output", + "bits": [ 21 ] + }, + "CFGMGMTREADWRITEDONE": { + "direction": "output", + "bits": [ 22 ] + }, + "CFGMSGRECEIVED": { + "direction": "output", + "bits": [ 23 ] + }, + "CFGMSGTRANSMITDONE": { + "direction": "output", + "bits": [ 24 ] + }, + "CFGPERFUNCTIONUPDATEDONE": { + "direction": "output", + "bits": [ 25 ] + }, + "CFGPHYLINKDOWN": { + "direction": "output", + "bits": [ 26 ] + }, + "CFGPLSTATUSCHANGE": { + "direction": "output", + "bits": [ 27 ] + }, + "CFGPOWERSTATECHANGEINTERRUPT": { + "direction": "output", + "bits": [ 28 ] + }, + "CFGTPHSTTREADENABLE": { + "direction": "output", + "bits": [ 29 ] + }, + "CFGTPHSTTWRITEENABLE": { + "direction": "output", + "bits": [ 30 ] + }, + "DRPRDY": { + "direction": "output", + "bits": [ 31 ] + }, + "MAXISCQTLAST": { + "direction": "output", + "bits": [ 32 ] + }, + "MAXISCQTVALID": { + "direction": "output", + "bits": [ 33 ] + }, + "MAXISRCTLAST": { + "direction": "output", + "bits": [ 34 ] + }, + "MAXISRCTVALID": { + "direction": "output", + "bits": [ 35 ] + }, + "PCIERQSEQNUMVLD": { + "direction": "output", + "bits": [ 36 ] + }, + "PCIERQTAGVLD": { + "direction": "output", + "bits": [ 37 ] + }, + "PIPERX0POLARITY": { + "direction": "output", + "bits": [ 38 ] + }, + "PIPERX1POLARITY": { + "direction": "output", + "bits": [ 39 ] + }, + "PIPERX2POLARITY": { + "direction": "output", + "bits": [ 40 ] + }, + "PIPERX3POLARITY": { + "direction": "output", + "bits": [ 41 ] + }, + "PIPERX4POLARITY": { + "direction": "output", + "bits": [ 42 ] + }, + "PIPERX5POLARITY": { + "direction": "output", + "bits": [ 43 ] + }, + "PIPERX6POLARITY": { + "direction": "output", + "bits": [ 44 ] + }, + "PIPERX7POLARITY": { + "direction": "output", + "bits": [ 45 ] + }, + "PIPETX0COMPLIANCE": { + "direction": "output", + "bits": [ 46 ] + }, + "PIPETX0DATAVALID": { + "direction": "output", + "bits": [ 47 ] + }, + "PIPETX0ELECIDLE": { + "direction": "output", + "bits": [ 48 ] + }, + "PIPETX0STARTBLOCK": { + "direction": "output", + "bits": [ 49 ] + }, + "PIPETX1COMPLIANCE": { + "direction": "output", + "bits": [ 50 ] + }, + "PIPETX1DATAVALID": { + "direction": "output", + "bits": [ 51 ] + }, + "PIPETX1ELECIDLE": { + "direction": "output", + "bits": [ 52 ] + }, + "PIPETX1STARTBLOCK": { + "direction": "output", + "bits": [ 53 ] + }, + "PIPETX2COMPLIANCE": { + "direction": "output", + "bits": [ 54 ] + }, + "PIPETX2DATAVALID": { + "direction": "output", + "bits": [ 55 ] + }, + "PIPETX2ELECIDLE": { + "direction": "output", + "bits": [ 56 ] + }, + "PIPETX2STARTBLOCK": { + "direction": "output", + "bits": [ 57 ] + }, + "PIPETX3COMPLIANCE": { + "direction": "output", + "bits": [ 58 ] + }, + "PIPETX3DATAVALID": { + "direction": "output", + "bits": [ 59 ] + }, + "PIPETX3ELECIDLE": { + "direction": "output", + "bits": [ 60 ] + }, + "PIPETX3STARTBLOCK": { + "direction": "output", + "bits": [ 61 ] + }, + "PIPETX4COMPLIANCE": { + "direction": "output", + "bits": [ 62 ] + }, + "PIPETX4DATAVALID": { + "direction": "output", + "bits": [ 63 ] + }, + "PIPETX4ELECIDLE": { + "direction": "output", + "bits": [ 64 ] + }, + "PIPETX4STARTBLOCK": { + "direction": "output", + "bits": [ 65 ] + }, + "PIPETX5COMPLIANCE": { + "direction": "output", + "bits": [ 66 ] + }, + "PIPETX5DATAVALID": { + "direction": "output", + "bits": [ 67 ] + }, + "PIPETX5ELECIDLE": { + "direction": "output", + "bits": [ 68 ] + }, + "PIPETX5STARTBLOCK": { + "direction": "output", + "bits": [ 69 ] + }, + "PIPETX6COMPLIANCE": { + "direction": "output", + "bits": [ 70 ] + }, + "PIPETX6DATAVALID": { + "direction": "output", + "bits": [ 71 ] + }, + "PIPETX6ELECIDLE": { + "direction": "output", + "bits": [ 72 ] + }, + "PIPETX6STARTBLOCK": { + "direction": "output", + "bits": [ 73 ] + }, + "PIPETX7COMPLIANCE": { + "direction": "output", + "bits": [ 74 ] + }, + "PIPETX7DATAVALID": { + "direction": "output", + "bits": [ 75 ] + }, + "PIPETX7ELECIDLE": { + "direction": "output", + "bits": [ 76 ] + }, + "PIPETX7STARTBLOCK": { + "direction": "output", + "bits": [ 77 ] + }, + "PIPETXDEEMPH": { + "direction": "output", + "bits": [ 78 ] + }, + "PIPETXRCVRDET": { + "direction": "output", + "bits": [ 79 ] + }, + "PIPETXRESET": { + "direction": "output", + "bits": [ 80 ] + }, + "PIPETXSWING": { + "direction": "output", + "bits": [ 81 ] + }, + "PLEQINPROGRESS": { + "direction": "output", + "bits": [ 82 ] + }, + "CFGFCCPLD": { + "direction": "output", + "bits": [ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 ] + }, + "CFGFCNPD": { + "direction": "output", + "bits": [ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106 ] + }, + "CFGFCPD": { + "direction": "output", + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118 ] + }, + "CFGVFSTATUS": { + "direction": "output", + "bits": [ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130 ] + }, + "MIREPLAYRAMWRITEDATA": { + "direction": "output", + "bits": [ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274 ] + }, + "MIREQUESTRAMWRITEDATA": { + "direction": "output", + "bits": [ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418 ] + }, + "CFGPERFUNCSTATUSDATA": { + "direction": "output", + "bits": [ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434 ] + }, + "DBGDATAOUT": { + "direction": "output", + "bits": [ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450 ] + }, + "DRPDO": { + "direction": "output", + "bits": [ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466 ] + }, + "CFGVFPOWERSTATE": { + "direction": "output", + "bits": [ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484 ] + }, + "CFGVFTPHSTMODE": { + "direction": "output", + "bits": [ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502 ] + }, + "CFGDPASUBSTATECHANGE": { + "direction": "output", + "bits": [ 503, 504 ] + }, + "CFGFLRINPROCESS": { + "direction": "output", + "bits": [ 505, 506 ] + }, + "CFGINTERRUPTMSIENABLE": { + "direction": "output", + "bits": [ 507, 508 ] + }, + "CFGINTERRUPTMSIXENABLE": { + "direction": "output", + "bits": [ 509, 510 ] + }, + "CFGINTERRUPTMSIXMASK": { + "direction": "output", + "bits": [ 511, 512 ] + }, + "CFGLINKPOWERSTATE": { + "direction": "output", + "bits": [ 513, 514 ] + }, + "CFGOBFFENABLE": { + "direction": "output", + "bits": [ 515, 516 ] + }, + "CFGPHYLINKSTATUS": { + "direction": "output", + "bits": [ 517, 518 ] + }, + "CFGRCBSTATUS": { + "direction": "output", + "bits": [ 519, 520 ] + }, + "CFGTPHREQUESTERENABLE": { + "direction": "output", + "bits": [ 521, 522 ] + }, + "MIREPLAYRAMREADENABLE": { + "direction": "output", + "bits": [ 523, 524 ] + }, + "MIREPLAYRAMWRITEENABLE": { + "direction": "output", + "bits": [ 525, 526 ] + }, + "PCIERQTAGAV": { + "direction": "output", + "bits": [ 527, 528 ] + }, + "PCIETFCNPDAV": { + "direction": "output", + "bits": [ 529, 530 ] + }, + "PCIETFCNPHAV": { + "direction": "output", + "bits": [ 531, 532 ] + }, + "PIPERX0EQCONTROL": { + "direction": "output", + "bits": [ 533, 534 ] + }, + "PIPERX1EQCONTROL": { + "direction": "output", + "bits": [ 535, 536 ] + }, + "PIPERX2EQCONTROL": { + "direction": "output", + "bits": [ 537, 538 ] + }, + "PIPERX3EQCONTROL": { + "direction": "output", + "bits": [ 539, 540 ] + }, + "PIPERX4EQCONTROL": { + "direction": "output", + "bits": [ 541, 542 ] + }, + "PIPERX5EQCONTROL": { + "direction": "output", + "bits": [ 543, 544 ] + }, + "PIPERX6EQCONTROL": { + "direction": "output", + "bits": [ 545, 546 ] + }, + "PIPERX7EQCONTROL": { + "direction": "output", + "bits": [ 547, 548 ] + }, + "PIPETX0CHARISK": { + "direction": "output", + "bits": [ 549, 550 ] + }, + "PIPETX0EQCONTROL": { + "direction": "output", + "bits": [ 551, 552 ] + }, + "PIPETX0POWERDOWN": { + "direction": "output", + "bits": [ 553, 554 ] + }, + "PIPETX0SYNCHEADER": { + "direction": "output", + "bits": [ 555, 556 ] + }, + "PIPETX1CHARISK": { + "direction": "output", + "bits": [ 557, 558 ] + }, + "PIPETX1EQCONTROL": { + "direction": "output", + "bits": [ 559, 560 ] + }, + "PIPETX1POWERDOWN": { + "direction": "output", + "bits": [ 561, 562 ] + }, + "PIPETX1SYNCHEADER": { + "direction": "output", + "bits": [ 563, 564 ] + }, + "PIPETX2CHARISK": { + "direction": "output", + "bits": [ 565, 566 ] + }, + "PIPETX2EQCONTROL": { + "direction": "output", + "bits": [ 567, 568 ] + }, + "PIPETX2POWERDOWN": { + "direction": "output", + "bits": [ 569, 570 ] + }, + "PIPETX2SYNCHEADER": { + "direction": "output", + "bits": [ 571, 572 ] + }, + "PIPETX3CHARISK": { + "direction": "output", + "bits": [ 573, 574 ] + }, + "PIPETX3EQCONTROL": { + "direction": "output", + "bits": [ 575, 576 ] + }, + "PIPETX3POWERDOWN": { + "direction": "output", + "bits": [ 577, 578 ] + }, + "PIPETX3SYNCHEADER": { + "direction": "output", + "bits": [ 579, 580 ] + }, + "PIPETX4CHARISK": { + "direction": "output", + "bits": [ 581, 582 ] + }, + "PIPETX4EQCONTROL": { + "direction": "output", + "bits": [ 583, 584 ] + }, + "PIPETX4POWERDOWN": { + "direction": "output", + "bits": [ 585, 586 ] + }, + "PIPETX4SYNCHEADER": { + "direction": "output", + "bits": [ 587, 588 ] + }, + "PIPETX5CHARISK": { + "direction": "output", + "bits": [ 589, 590 ] + }, + "PIPETX5EQCONTROL": { + "direction": "output", + "bits": [ 591, 592 ] + }, + "PIPETX5POWERDOWN": { + "direction": "output", + "bits": [ 593, 594 ] + }, + "PIPETX5SYNCHEADER": { + "direction": "output", + "bits": [ 595, 596 ] + }, + "PIPETX6CHARISK": { + "direction": "output", + "bits": [ 597, 598 ] + }, + "PIPETX6EQCONTROL": { + "direction": "output", + "bits": [ 599, 600 ] + }, + "PIPETX6POWERDOWN": { + "direction": "output", + "bits": [ 601, 602 ] + }, + "PIPETX6SYNCHEADER": { + "direction": "output", + "bits": [ 603, 604 ] + }, + "PIPETX7CHARISK": { + "direction": "output", + "bits": [ 605, 606 ] + }, + "PIPETX7EQCONTROL": { + "direction": "output", + "bits": [ 607, 608 ] + }, + "PIPETX7POWERDOWN": { + "direction": "output", + "bits": [ 609, 610 ] + }, + "PIPETX7SYNCHEADER": { + "direction": "output", + "bits": [ 611, 612 ] + }, + "PIPETXRATE": { + "direction": "output", + "bits": [ 613, 614 ] + }, + "PLEQPHASE": { + "direction": "output", + "bits": [ 615, 616 ] + }, + "MAXISCQTDATA": { + "direction": "output", + "bits": [ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872 ] + }, + "MAXISRCTDATA": { + "direction": "output", + "bits": [ 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128 ] + }, + "CFGCURRENTSPEED": { + "direction": "output", + "bits": [ 1129, 1130, 1131 ] + }, + "CFGMAXPAYLOAD": { + "direction": "output", + "bits": [ 1132, 1133, 1134 ] + }, + "CFGMAXREADREQ": { + "direction": "output", + "bits": [ 1135, 1136, 1137 ] + }, + "CFGTPHFUNCTIONNUM": { + "direction": "output", + "bits": [ 1138, 1139, 1140 ] + }, + "PIPERX0EQPRESET": { + "direction": "output", + "bits": [ 1141, 1142, 1143 ] + }, + "PIPERX1EQPRESET": { + "direction": "output", + "bits": [ 1144, 1145, 1146 ] + }, + "PIPERX2EQPRESET": { + "direction": "output", + "bits": [ 1147, 1148, 1149 ] + }, + "PIPERX3EQPRESET": { + "direction": "output", + "bits": [ 1150, 1151, 1152 ] + }, + "PIPERX4EQPRESET": { + "direction": "output", + "bits": [ 1153, 1154, 1155 ] + }, + "PIPERX5EQPRESET": { + "direction": "output", + "bits": [ 1156, 1157, 1158 ] + }, + "PIPERX6EQPRESET": { + "direction": "output", + "bits": [ 1159, 1160, 1161 ] + }, + "PIPERX7EQPRESET": { + "direction": "output", + "bits": [ 1162, 1163, 1164 ] + }, + "PIPETXMARGIN": { + "direction": "output", + "bits": [ 1165, 1166, 1167 ] + }, + "CFGEXTWRITEDATA": { + "direction": "output", + "bits": [ 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199 ] + }, + "CFGINTERRUPTMSIDATA": { + "direction": "output", + "bits": [ 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231 ] + }, + "CFGMGMTREADDATA": { + "direction": "output", + "bits": [ 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263 ] + }, + "CFGTPHSTTWRITEDATA": { + "direction": "output", + "bits": [ 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295 ] + }, + "PIPETX0DATA": { + "direction": "output", + "bits": [ 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327 ] + }, + "PIPETX1DATA": { + "direction": "output", + "bits": [ 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359 ] + }, + "PIPETX2DATA": { + "direction": "output", + "bits": [ 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391 ] + }, + "PIPETX3DATA": { + "direction": "output", + "bits": [ 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423 ] + }, + "PIPETX4DATA": { + "direction": "output", + "bits": [ 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455 ] + }, + "PIPETX5DATA": { + "direction": "output", + "bits": [ 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487 ] + }, + "PIPETX6DATA": { + "direction": "output", + "bits": [ 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519 ] + }, + "PIPETX7DATA": { + "direction": "output", + "bits": [ 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551 ] + }, + "CFGEXTWRITEBYTEENABLE": { + "direction": "output", + "bits": [ 1552, 1553, 1554, 1555 ] + }, + "CFGNEGOTIATEDWIDTH": { + "direction": "output", + "bits": [ 1556, 1557, 1558, 1559 ] + }, + "CFGTPHSTTWRITEBYTEVALID": { + "direction": "output", + "bits": [ 1560, 1561, 1562, 1563 ] + }, + "MICOMPLETIONRAMREADENABLEL": { + "direction": "output", + "bits": [ 1564, 1565, 1566, 1567 ] + }, + "MICOMPLETIONRAMREADENABLEU": { + "direction": "output", + "bits": [ 1568, 1569, 1570, 1571 ] + }, + "MICOMPLETIONRAMWRITEENABLEL": { + "direction": "output", + "bits": [ 1572, 1573, 1574, 1575 ] + }, + "MICOMPLETIONRAMWRITEENABLEU": { + "direction": "output", + "bits": [ 1576, 1577, 1578, 1579 ] + }, + "MIREQUESTRAMREADENABLE": { + "direction": "output", + "bits": [ 1580, 1581, 1582, 1583 ] + }, + "MIREQUESTRAMWRITEENABLE": { + "direction": "output", + "bits": [ 1584, 1585, 1586, 1587 ] + }, + "PCIERQSEQNUM": { + "direction": "output", + "bits": [ 1588, 1589, 1590, 1591 ] + }, + "PIPERX0EQLPTXPRESET": { + "direction": "output", + "bits": [ 1592, 1593, 1594, 1595 ] + }, + "PIPERX1EQLPTXPRESET": { + "direction": "output", + "bits": [ 1596, 1597, 1598, 1599 ] + }, + "PIPERX2EQLPTXPRESET": { + "direction": "output", + "bits": [ 1600, 1601, 1602, 1603 ] + }, + "PIPERX3EQLPTXPRESET": { + "direction": "output", + "bits": [ 1604, 1605, 1606, 1607 ] + }, + "PIPERX4EQLPTXPRESET": { + "direction": "output", + "bits": [ 1608, 1609, 1610, 1611 ] + }, + "PIPERX5EQLPTXPRESET": { + "direction": "output", + "bits": [ 1612, 1613, 1614, 1615 ] + }, + "PIPERX6EQLPTXPRESET": { + "direction": "output", + "bits": [ 1616, 1617, 1618, 1619 ] + }, + "PIPERX7EQLPTXPRESET": { + "direction": "output", + "bits": [ 1620, 1621, 1622, 1623 ] + }, + "PIPETX0EQPRESET": { + "direction": "output", + "bits": [ 1624, 1625, 1626, 1627 ] + }, + "PIPETX1EQPRESET": { + "direction": "output", + "bits": [ 1628, 1629, 1630, 1631 ] + }, + "PIPETX2EQPRESET": { + "direction": "output", + "bits": [ 1632, 1633, 1634, 1635 ] + }, + "PIPETX3EQPRESET": { + "direction": "output", + "bits": [ 1636, 1637, 1638, 1639 ] + }, + "PIPETX4EQPRESET": { + "direction": "output", + "bits": [ 1640, 1641, 1642, 1643 ] + }, + "PIPETX5EQPRESET": { + "direction": "output", + "bits": [ 1644, 1645, 1646, 1647 ] + }, + "PIPETX6EQPRESET": { + "direction": "output", + "bits": [ 1648, 1649, 1650, 1651 ] + }, + "PIPETX7EQPRESET": { + "direction": "output", + "bits": [ 1652, 1653, 1654, 1655 ] + }, + "SAXISCCTREADY": { + "direction": "output", + "bits": [ 1656, 1657, 1658, 1659 ] + }, + "SAXISRQTREADY": { + "direction": "output", + "bits": [ 1660, 1661, 1662, 1663 ] + }, + "CFGMSGRECEIVEDTYPE": { + "direction": "output", + "bits": [ 1664, 1665, 1666, 1667, 1668 ] + }, + "CFGTPHSTTADDRESS": { + "direction": "output", + "bits": [ 1669, 1670, 1671, 1672, 1673 ] + }, + "CFGFUNCTIONPOWERSTATE": { + "direction": "output", + "bits": [ 1674, 1675, 1676, 1677, 1678, 1679 ] + }, + "CFGINTERRUPTMSIMMENABLE": { + "direction": "output", + "bits": [ 1680, 1681, 1682, 1683, 1684, 1685 ] + }, + "CFGINTERRUPTMSIVFENABLE": { + "direction": "output", + "bits": [ 1686, 1687, 1688, 1689, 1690, 1691 ] + }, + "CFGINTERRUPTMSIXVFENABLE": { + "direction": "output", + "bits": [ 1692, 1693, 1694, 1695, 1696, 1697 ] + }, + "CFGINTERRUPTMSIXVFMASK": { + "direction": "output", + "bits": [ 1698, 1699, 1700, 1701, 1702, 1703 ] + }, + "CFGLTSSMSTATE": { + "direction": "output", + "bits": [ 1704, 1705, 1706, 1707, 1708, 1709 ] + }, + "CFGTPHSTMODE": { + "direction": "output", + "bits": [ 1710, 1711, 1712, 1713, 1714, 1715 ] + }, + "CFGVFFLRINPROCESS": { + "direction": "output", + "bits": [ 1716, 1717, 1718, 1719, 1720, 1721 ] + }, + "CFGVFTPHREQUESTERENABLE": { + "direction": "output", + "bits": [ 1722, 1723, 1724, 1725, 1726, 1727 ] + }, + "PCIECQNPREQCOUNT": { + "direction": "output", + "bits": [ 1728, 1729, 1730, 1731, 1732, 1733 ] + }, + "PCIERQTAG": { + "direction": "output", + "bits": [ 1734, 1735, 1736, 1737, 1738, 1739 ] + }, + "PIPERX0EQLPLFFS": { + "direction": "output", + "bits": [ 1740, 1741, 1742, 1743, 1744, 1745 ] + }, + "PIPERX1EQLPLFFS": { + "direction": "output", + "bits": [ 1746, 1747, 1748, 1749, 1750, 1751 ] + }, + "PIPERX2EQLPLFFS": { + "direction": "output", + "bits": [ 1752, 1753, 1754, 1755, 1756, 1757 ] + }, + "PIPERX3EQLPLFFS": { + "direction": "output", + "bits": [ 1758, 1759, 1760, 1761, 1762, 1763 ] + }, + "PIPERX4EQLPLFFS": { + "direction": "output", + "bits": [ 1764, 1765, 1766, 1767, 1768, 1769 ] + }, + "PIPERX5EQLPLFFS": { + "direction": "output", + "bits": [ 1770, 1771, 1772, 1773, 1774, 1775 ] + }, + "PIPERX6EQLPLFFS": { + "direction": "output", + "bits": [ 1776, 1777, 1778, 1779, 1780, 1781 ] + }, + "PIPERX7EQLPLFFS": { + "direction": "output", + "bits": [ 1782, 1783, 1784, 1785, 1786, 1787 ] + }, + "PIPETX0EQDEEMPH": { + "direction": "output", + "bits": [ 1788, 1789, 1790, 1791, 1792, 1793 ] + }, + "PIPETX1EQDEEMPH": { + "direction": "output", + "bits": [ 1794, 1795, 1796, 1797, 1798, 1799 ] + }, + "PIPETX2EQDEEMPH": { + "direction": "output", + "bits": [ 1800, 1801, 1802, 1803, 1804, 1805 ] + }, + "PIPETX3EQDEEMPH": { + "direction": "output", + "bits": [ 1806, 1807, 1808, 1809, 1810, 1811 ] + }, + "PIPETX4EQDEEMPH": { + "direction": "output", + "bits": [ 1812, 1813, 1814, 1815, 1816, 1817 ] + }, + "PIPETX5EQDEEMPH": { + "direction": "output", + "bits": [ 1818, 1819, 1820, 1821, 1822, 1823 ] + }, + "PIPETX6EQDEEMPH": { + "direction": "output", + "bits": [ 1824, 1825, 1826, 1827, 1828, 1829 ] + }, + "PIPETX7EQDEEMPH": { + "direction": "output", + "bits": [ 1830, 1831, 1832, 1833, 1834, 1835 ] + }, + "MICOMPLETIONRAMWRITEDATAL": { + "direction": "output", + "bits": [ 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907 ] + }, + "MICOMPLETIONRAMWRITEDATAU": { + "direction": "output", + "bits": [ 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979 ] + }, + "MAXISRCTUSER": { + "direction": "output", + "bits": [ 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054 ] + }, + "CFGEXTFUNCTIONNUMBER": { + "direction": "output", + "bits": [ 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062 ] + }, + "CFGFCCPLH": { + "direction": "output", + "bits": [ 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070 ] + }, + "CFGFCNPH": { + "direction": "output", + "bits": [ 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078 ] + }, + "CFGFCPH": { + "direction": "output", + "bits": [ 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086 ] + }, + "CFGFUNCTIONSTATUS": { + "direction": "output", + "bits": [ 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094 ] + }, + "CFGMSGRECEIVEDDATA": { + "direction": "output", + "bits": [ 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102 ] + }, + "MAXISCQTKEEP": { + "direction": "output", + "bits": [ 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110 ] + }, + "MAXISRCTKEEP": { + "direction": "output", + "bits": [ 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118 ] + }, + "PLGEN3PCSRXSLIDE": { + "direction": "output", + "bits": [ 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126 ] + }, + "MAXISCQTUSER": { + "direction": "output", + "bits": [ 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211 ] + }, + "MIREPLAYRAMADDRESS": { + "direction": "output", + "bits": [ 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220 ] + }, + "MIREQUESTRAMREADADDRESSA": { + "direction": "output", + "bits": [ 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229 ] + }, + "MIREQUESTRAMREADADDRESSB": { + "direction": "output", + "bits": [ 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238 ] + }, + "MIREQUESTRAMWRITEADDRESSA": { + "direction": "output", + "bits": [ 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247 ] + }, + "MIREQUESTRAMWRITEADDRESSB": { + "direction": "output", + "bits": [ 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256 ] + }, + "CFGEXTREGISTERNUMBER": { + "direction": "output", + "bits": [ 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266 ] + }, + "MICOMPLETIONRAMREADADDRESSAL": { + "direction": "output", + "bits": [ 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276 ] + }, + "MICOMPLETIONRAMREADADDRESSAU": { + "direction": "output", + "bits": [ 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286 ] + }, + "MICOMPLETIONRAMREADADDRESSBL": { + "direction": "output", + "bits": [ 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296 ] + }, + "MICOMPLETIONRAMREADADDRESSBU": { + "direction": "output", + "bits": [ 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306 ] + }, + "MICOMPLETIONRAMWRITEADDRESSAL": { + "direction": "output", + "bits": [ 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316 ] + }, + "MICOMPLETIONRAMWRITEADDRESSAU": { + "direction": "output", + "bits": [ 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326 ] + }, + "MICOMPLETIONRAMWRITEADDRESSBL": { + "direction": "output", + "bits": [ 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336 ] + }, + "MICOMPLETIONRAMWRITEADDRESSBU": { + "direction": "output", + "bits": [ 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346 ] + }, + "CFGCONFIGSPACEENABLE": { + "direction": "input", + "bits": [ 2347 ] + }, + "CFGERRCORIN": { + "direction": "input", + "bits": [ 2348 ] + }, + "CFGERRUNCORIN": { + "direction": "input", + "bits": [ 2349 ] + }, + "CFGEXTREADDATAVALID": { + "direction": "input", + "bits": [ 2350 ] + }, + "CFGHOTRESETIN": { + "direction": "input", + "bits": [ 2351 ] + }, + "CFGINPUTUPDATEREQUEST": { + "direction": "input", + "bits": [ 2352 ] + }, + "CFGINTERRUPTMSITPHPRESENT": { + "direction": "input", + "bits": [ 2353 ] + }, + "CFGINTERRUPTMSIXINT": { + "direction": "input", + "bits": [ 2354 ] + }, + "CFGLINKTRAININGENABLE": { + "direction": "input", + "bits": [ 2355 ] + }, + "CFGMCUPDATEREQUEST": { + "direction": "input", + "bits": [ 2356 ] + }, + "CFGMGMTREAD": { + "direction": "input", + "bits": [ 2357 ] + }, + "CFGMGMTTYPE1CFGREGACCESS": { + "direction": "input", + "bits": [ 2358 ] + }, + "CFGMGMTWRITE": { + "direction": "input", + "bits": [ 2359 ] + }, + "CFGMSGTRANSMIT": { + "direction": "input", + "bits": [ 2360 ] + }, + "CFGPERFUNCTIONOUTPUTREQUEST": { + "direction": "input", + "bits": [ 2361 ] + }, + "CFGPOWERSTATECHANGEACK": { + "direction": "input", + "bits": [ 2362 ] + }, + "CFGREQPMTRANSITIONL23READY": { + "direction": "input", + "bits": [ 2363 ] + }, + "CFGTPHSTTREADDATAVALID": { + "direction": "input", + "bits": [ 2364 ] + }, + "CORECLK": { + "direction": "input", + "bits": [ 2365 ] + }, + "CORECLKMICOMPLETIONRAML": { + "direction": "input", + "bits": [ 2366 ] + }, + "CORECLKMICOMPLETIONRAMU": { + "direction": "input", + "bits": [ 2367 ] + }, + "CORECLKMIREPLAYRAM": { + "direction": "input", + "bits": [ 2368 ] + }, + "CORECLKMIREQUESTRAM": { + "direction": "input", + "bits": [ 2369 ] + }, + "DRPCLK": { + "direction": "input", + "bits": [ 2370 ] + }, + "DRPEN": { + "direction": "input", + "bits": [ 2371 ] + }, + "DRPWE": { + "direction": "input", + "bits": [ 2372 ] + }, + "MGMTRESETN": { + "direction": "input", + "bits": [ 2373 ] + }, + "MGMTSTICKYRESETN": { + "direction": "input", + "bits": [ 2374 ] + }, + "PCIECQNPREQ": { + "direction": "input", + "bits": [ 2375 ] + }, + "PIPECLK": { + "direction": "input", + "bits": [ 2376 ] + }, + "PIPERESETN": { + "direction": "input", + "bits": [ 2377 ] + }, + "PIPERX0DATAVALID": { + "direction": "input", + "bits": [ 2378 ] + }, + "PIPERX0ELECIDLE": { + "direction": "input", + "bits": [ 2379 ] + }, + "PIPERX0EQDONE": { + "direction": "input", + "bits": [ 2380 ] + }, + "PIPERX0EQLPADAPTDONE": { + "direction": "input", + "bits": [ 2381 ] + }, + "PIPERX0EQLPLFFSSEL": { + "direction": "input", + "bits": [ 2382 ] + }, + "PIPERX0PHYSTATUS": { + "direction": "input", + "bits": [ 2383 ] + }, + "PIPERX0STARTBLOCK": { + "direction": "input", + "bits": [ 2384 ] + }, + "PIPERX0VALID": { + "direction": "input", + "bits": [ 2385 ] + }, + "PIPERX1DATAVALID": { + "direction": "input", + "bits": [ 2386 ] + }, + "PIPERX1ELECIDLE": { + "direction": "input", + "bits": [ 2387 ] + }, + "PIPERX1EQDONE": { + "direction": "input", + "bits": [ 2388 ] + }, + "PIPERX1EQLPADAPTDONE": { + "direction": "input", + "bits": [ 2389 ] + }, + "PIPERX1EQLPLFFSSEL": { + "direction": "input", + "bits": [ 2390 ] + }, + "PIPERX1PHYSTATUS": { + "direction": "input", + "bits": [ 2391 ] + }, + "PIPERX1STARTBLOCK": { + "direction": "input", + "bits": [ 2392 ] + }, + "PIPERX1VALID": { + "direction": "input", + "bits": [ 2393 ] + }, + "PIPERX2DATAVALID": { + "direction": "input", + "bits": [ 2394 ] + }, + "PIPERX2ELECIDLE": { + "direction": "input", + "bits": [ 2395 ] + }, + "PIPERX2EQDONE": { + "direction": "input", + "bits": [ 2396 ] + }, + "PIPERX2EQLPADAPTDONE": { + "direction": "input", + "bits": [ 2397 ] + }, + "PIPERX2EQLPLFFSSEL": { + "direction": "input", + "bits": [ 2398 ] + }, + "PIPERX2PHYSTATUS": { + "direction": "input", + "bits": [ 2399 ] + }, + "PIPERX2STARTBLOCK": { + "direction": "input", + "bits": [ 2400 ] + }, + "PIPERX2VALID": { + "direction": "input", + "bits": [ 2401 ] + }, + "PIPERX3DATAVALID": { + "direction": "input", + "bits": [ 2402 ] + }, + "PIPERX3ELECIDLE": { + "direction": "input", + "bits": [ 2403 ] + }, + "PIPERX3EQDONE": { + "direction": "input", + "bits": [ 2404 ] + }, + "PIPERX3EQLPADAPTDONE": { + "direction": "input", + "bits": [ 2405 ] + }, + "PIPERX3EQLPLFFSSEL": { + "direction": "input", + "bits": [ 2406 ] + }, + "PIPERX3PHYSTATUS": { + "direction": "input", + "bits": [ 2407 ] + }, + "PIPERX3STARTBLOCK": { + "direction": "input", + "bits": [ 2408 ] + }, + "PIPERX3VALID": { + "direction": "input", + "bits": [ 2409 ] + }, + "PIPERX4DATAVALID": { + "direction": "input", + "bits": [ 2410 ] + }, + "PIPERX4ELECIDLE": { + "direction": "input", + "bits": [ 2411 ] + }, + "PIPERX4EQDONE": { + "direction": "input", + "bits": [ 2412 ] + }, + "PIPERX4EQLPADAPTDONE": { + "direction": "input", + "bits": [ 2413 ] + }, + "PIPERX4EQLPLFFSSEL": { + "direction": "input", + "bits": [ 2414 ] + }, + "PIPERX4PHYSTATUS": { + "direction": "input", + "bits": [ 2415 ] + }, + "PIPERX4STARTBLOCK": { + "direction": "input", + "bits": [ 2416 ] + }, + "PIPERX4VALID": { + "direction": "input", + "bits": [ 2417 ] + }, + "PIPERX5DATAVALID": { + "direction": "input", + "bits": [ 2418 ] + }, + "PIPERX5ELECIDLE": { + "direction": "input", + "bits": [ 2419 ] + }, + "PIPERX5EQDONE": { + "direction": "input", + "bits": [ 2420 ] + }, + "PIPERX5EQLPADAPTDONE": { + "direction": "input", + "bits": [ 2421 ] + }, + "PIPERX5EQLPLFFSSEL": { + "direction": "input", + "bits": [ 2422 ] + }, + "PIPERX5PHYSTATUS": { + "direction": "input", + "bits": [ 2423 ] + }, + "PIPERX5STARTBLOCK": { + "direction": "input", + "bits": [ 2424 ] + }, + "PIPERX5VALID": { + "direction": "input", + "bits": [ 2425 ] + }, + "PIPERX6DATAVALID": { + "direction": "input", + "bits": [ 2426 ] + }, + "PIPERX6ELECIDLE": { + "direction": "input", + "bits": [ 2427 ] + }, + "PIPERX6EQDONE": { + "direction": "input", + "bits": [ 2428 ] + }, + "PIPERX6EQLPADAPTDONE": { + "direction": "input", + "bits": [ 2429 ] + }, + "PIPERX6EQLPLFFSSEL": { + "direction": "input", + "bits": [ 2430 ] + }, + "PIPERX6PHYSTATUS": { + "direction": "input", + "bits": [ 2431 ] + }, + "PIPERX6STARTBLOCK": { + "direction": "input", + "bits": [ 2432 ] + }, + "PIPERX6VALID": { + "direction": "input", + "bits": [ 2433 ] + }, + "PIPERX7DATAVALID": { + "direction": "input", + "bits": [ 2434 ] + }, + "PIPERX7ELECIDLE": { + "direction": "input", + "bits": [ 2435 ] + }, + "PIPERX7EQDONE": { + "direction": "input", + "bits": [ 2436 ] + }, + "PIPERX7EQLPADAPTDONE": { + "direction": "input", + "bits": [ 2437 ] + }, + "PIPERX7EQLPLFFSSEL": { + "direction": "input", + "bits": [ 2438 ] + }, + "PIPERX7PHYSTATUS": { + "direction": "input", + "bits": [ 2439 ] + }, + "PIPERX7STARTBLOCK": { + "direction": "input", + "bits": [ 2440 ] + }, + "PIPERX7VALID": { + "direction": "input", + "bits": [ 2441 ] + }, + "PIPETX0EQDONE": { + "direction": "input", + "bits": [ 2442 ] + }, + "PIPETX1EQDONE": { + "direction": "input", + "bits": [ 2443 ] + }, + "PIPETX2EQDONE": { + "direction": "input", + "bits": [ 2444 ] + }, + "PIPETX3EQDONE": { + "direction": "input", + "bits": [ 2445 ] + }, + "PIPETX4EQDONE": { + "direction": "input", + "bits": [ 2446 ] + }, + "PIPETX5EQDONE": { + "direction": "input", + "bits": [ 2447 ] + }, + "PIPETX6EQDONE": { + "direction": "input", + "bits": [ 2448 ] + }, + "PIPETX7EQDONE": { + "direction": "input", + "bits": [ 2449 ] + }, + "PLDISABLESCRAMBLER": { + "direction": "input", + "bits": [ 2450 ] + }, + "PLEQRESETEIEOSCOUNT": { + "direction": "input", + "bits": [ 2451 ] + }, + "PLGEN3PCSDISABLE": { + "direction": "input", + "bits": [ 2452 ] + }, + "RECCLK": { + "direction": "input", + "bits": [ 2453 ] + }, + "RESETN": { + "direction": "input", + "bits": [ 2454 ] + }, + "SAXISCCTLAST": { + "direction": "input", + "bits": [ 2455 ] + }, + "SAXISCCTVALID": { + "direction": "input", + "bits": [ 2456 ] + }, + "SAXISRQTLAST": { + "direction": "input", + "bits": [ 2457 ] + }, + "SAXISRQTVALID": { + "direction": "input", + "bits": [ 2458 ] + }, + "USERCLK": { + "direction": "input", + "bits": [ 2459 ] + }, + "DRPADDR": { + "direction": "input", + "bits": [ 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470 ] + }, + "MICOMPLETIONRAMREADDATA": { + "direction": "input", + "bits": [ 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614 ] + }, + "MIREPLAYRAMREADDATA": { + "direction": "input", + "bits": [ 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758 ] + }, + "MIREQUESTRAMREADDATA": { + "direction": "input", + "bits": [ 2759, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902 ] + }, + "CFGDEVID": { + "direction": "input", + "bits": [ 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918 ] + }, + "CFGSUBSYSID": { + "direction": "input", + "bits": [ 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930, 2931, 2932, 2933, 2934 ] + }, + "CFGSUBSYSVENDID": { + "direction": "input", + "bits": [ 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950 ] + }, + "CFGVENDID": { + "direction": "input", + "bits": [ 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966 ] + }, + "DRPDI": { + "direction": "input", + "bits": [ 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982 ] + }, + "PIPERX0EQLPNEWTXCOEFFORPRESET": { + "direction": "input", + "bits": [ 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3000 ] + }, + "PIPERX1EQLPNEWTXCOEFFORPRESET": { + "direction": "input", + "bits": [ 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018 ] + }, + "PIPERX2EQLPNEWTXCOEFFORPRESET": { + "direction": "input", + "bits": [ 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036 ] + }, + "PIPERX3EQLPNEWTXCOEFFORPRESET": { + "direction": "input", + "bits": [ 3037, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054 ] + }, + "PIPERX4EQLPNEWTXCOEFFORPRESET": { + "direction": "input", + "bits": [ 3055, 3056, 3057, 3058, 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072 ] + }, + "PIPERX5EQLPNEWTXCOEFFORPRESET": { + "direction": "input", + "bits": [ 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090 ] + }, + "PIPERX6EQLPNEWTXCOEFFORPRESET": { + "direction": "input", + "bits": [ 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108 ] + }, + "PIPERX7EQLPNEWTXCOEFFORPRESET": { + "direction": "input", + "bits": [ 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126 ] + }, + "PIPETX0EQCOEFF": { + "direction": "input", + "bits": [ 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144 ] + }, + "PIPETX1EQCOEFF": { + "direction": "input", + "bits": [ 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162 ] + }, + "PIPETX2EQCOEFF": { + "direction": "input", + "bits": [ 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180 ] + }, + "PIPETX3EQCOEFF": { + "direction": "input", + "bits": [ 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198 ] + }, + "PIPETX4EQCOEFF": { + "direction": "input", + "bits": [ 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216 ] + }, + "PIPETX5EQCOEFF": { + "direction": "input", + "bits": [ 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234 ] + }, + "PIPETX6EQCOEFF": { + "direction": "input", + "bits": [ 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250, 3251, 3252 ] + }, + "PIPETX7EQCOEFF": { + "direction": "input", + "bits": [ 3253, 3254, 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270 ] + }, + "CFGMGMTADDR": { + "direction": "input", + "bits": [ 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289 ] + }, + "CFGFLRDONE": { + "direction": "input", + "bits": [ 3290, 3291 ] + }, + "CFGINTERRUPTMSITPHTYPE": { + "direction": "input", + "bits": [ 3292, 3293 ] + }, + "CFGINTERRUPTPENDING": { + "direction": "input", + "bits": [ 3294, 3295 ] + }, + "PIPERX0CHARISK": { + "direction": "input", + "bits": [ 3296, 3297 ] + }, + "PIPERX0SYNCHEADER": { + "direction": "input", + "bits": [ 3298, 3299 ] + }, + "PIPERX1CHARISK": { + "direction": "input", + "bits": [ 3300, 3301 ] + }, + "PIPERX1SYNCHEADER": { + "direction": "input", + "bits": [ 3302, 3303 ] + }, + "PIPERX2CHARISK": { + "direction": "input", + "bits": [ 3304, 3305 ] + }, + "PIPERX2SYNCHEADER": { + "direction": "input", + "bits": [ 3306, 3307 ] + }, + "PIPERX3CHARISK": { + "direction": "input", + "bits": [ 3308, 3309 ] + }, + "PIPERX3SYNCHEADER": { + "direction": "input", + "bits": [ 3310, 3311 ] + }, + "PIPERX4CHARISK": { + "direction": "input", + "bits": [ 3312, 3313 ] + }, + "PIPERX4SYNCHEADER": { + "direction": "input", + "bits": [ 3314, 3315 ] + }, + "PIPERX5CHARISK": { + "direction": "input", + "bits": [ 3316, 3317 ] + }, + "PIPERX5SYNCHEADER": { + "direction": "input", + "bits": [ 3318, 3319 ] + }, + "PIPERX6CHARISK": { + "direction": "input", + "bits": [ 3320, 3321 ] + }, + "PIPERX6SYNCHEADER": { + "direction": "input", + "bits": [ 3322, 3323 ] + }, + "PIPERX7CHARISK": { + "direction": "input", + "bits": [ 3324, 3325 ] + }, + "PIPERX7SYNCHEADER": { + "direction": "input", + "bits": [ 3326, 3327 ] + }, + "MAXISCQTREADY": { + "direction": "input", + "bits": [ 3328, 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349 ] + }, + "MAXISRCTREADY": { + "direction": "input", + "bits": [ 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371 ] + }, + "SAXISCCTDATA": { + "direction": "input", + "bits": [ 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627 ] + }, + "SAXISRQTDATA": { + "direction": "input", + "bits": [ 3628, 3629, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3839, 3840, 3841, 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3849, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 3880, 3881, 3882, 3883 ] + }, + "CFGDSFUNCTIONNUMBER": { + "direction": "input", + "bits": [ 3884, 3885, 3886 ] + }, + "CFGFCSEL": { + "direction": "input", + "bits": [ 3887, 3888, 3889 ] + }, + "CFGINTERRUPTMSIATTR": { + "direction": "input", + "bits": [ 3890, 3891, 3892 ] + }, + "CFGINTERRUPTMSIFUNCTIONNUMBER": { + "direction": "input", + "bits": [ 3893, 3894, 3895 ] + }, + "CFGMSGTRANSMITTYPE": { + "direction": "input", + "bits": [ 3896, 3897, 3898 ] + }, + "CFGPERFUNCSTATUSCONTROL": { + "direction": "input", + "bits": [ 3899, 3900, 3901 ] + }, + "CFGPERFUNCTIONNUMBER": { + "direction": "input", + "bits": [ 3902, 3903, 3904 ] + }, + "PIPERX0STATUS": { + "direction": "input", + "bits": [ 3905, 3906, 3907 ] + }, + "PIPERX1STATUS": { + "direction": "input", + "bits": [ 3908, 3909, 3910 ] + }, + "PIPERX2STATUS": { + "direction": "input", + "bits": [ 3911, 3912, 3913 ] + }, + "PIPERX3STATUS": { + "direction": "input", + "bits": [ 3914, 3915, 3916 ] + }, + "PIPERX4STATUS": { + "direction": "input", + "bits": [ 3917, 3918, 3919 ] + }, + "PIPERX5STATUS": { + "direction": "input", + "bits": [ 3920, 3921, 3922 ] + }, + "PIPERX6STATUS": { + "direction": "input", + "bits": [ 3923, 3924, 3925 ] + }, + "PIPERX7STATUS": { + "direction": "input", + "bits": [ 3926, 3927, 3928 ] + }, + "CFGEXTREADDATA": { + "direction": "input", + "bits": [ 3929, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 3960 ] + }, + "CFGINTERRUPTMSIINT": { + "direction": "input", + "bits": [ 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 3990, 3991, 3992 ] + }, + "CFGINTERRUPTMSIXDATA": { + "direction": "input", + "bits": [ 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4024 ] + }, + "CFGMGMTWRITEDATA": { + "direction": "input", + "bits": [ 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 4053, 4054, 4055, 4056 ] + }, + "CFGMSGTRANSMITDATA": { + "direction": "input", + "bits": [ 4057, 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4079, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088 ] + }, + "CFGTPHSTTREADDATA": { + "direction": "input", + "bits": [ 4089, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4120 ] + }, + "PIPERX0DATA": { + "direction": "input", + "bits": [ 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152 ] + }, + "PIPERX1DATA": { + "direction": "input", + "bits": [ 4153, 4154, 4155, 4156, 4157, 4158, 4159, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178, 4179, 4180, 4181, 4182, 4183, 4184 ] + }, + "PIPERX2DATA": { + "direction": "input", + "bits": [ 4185, 4186, 4187, 4188, 4189, 4190, 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, 4209, 4210, 4211, 4212, 4213, 4214, 4215, 4216 ] + }, + "PIPERX3DATA": { + "direction": "input", + "bits": [ 4217, 4218, 4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248 ] + }, + "PIPERX4DATA": { + "direction": "input", + "bits": [ 4249, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280 ] + }, + "PIPERX5DATA": { + "direction": "input", + "bits": [ 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307, 4308, 4309, 4310, 4311, 4312 ] + }, + "PIPERX6DATA": { + "direction": "input", + "bits": [ 4313, 4314, 4315, 4316, 4317, 4318, 4319, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344 ] + }, + "PIPERX7DATA": { + "direction": "input", + "bits": [ 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376 ] + }, + "SAXISCCTUSER": { + "direction": "input", + "bits": [ 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409 ] + }, + "CFGINTERRUPTINT": { + "direction": "input", + "bits": [ 4410, 4411, 4412, 4413 ] + }, + "CFGINTERRUPTMSISELECT": { + "direction": "input", + "bits": [ 4414, 4415, 4416, 4417 ] + }, + "CFGMGMTBYTEENABLE": { + "direction": "input", + "bits": [ 4418, 4419, 4420, 4421 ] + }, + "CFGDSDEVICENUMBER": { + "direction": "input", + "bits": [ 4422, 4423, 4424, 4425, 4426 ] + }, + "SAXISRQTUSER": { + "direction": "input", + "bits": [ 4427, 4428, 4429, 4430, 4431, 4432, 4433, 4434, 4435, 4436, 4437, 4438, 4439, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 4465, 4466, 4467, 4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 4480, 4481, 4482, 4483, 4484, 4485, 4486 ] + }, + "CFGVFFLRDONE": { + "direction": "input", + "bits": [ 4487, 4488, 4489, 4490, 4491, 4492 ] + }, + "PIPEEQFS": { + "direction": "input", + "bits": [ 4493, 4494, 4495, 4496, 4497, 4498 ] + }, + "PIPEEQLF": { + "direction": "input", + "bits": [ 4499, 4500, 4501, 4502, 4503, 4504 ] + }, + "CFGDSN": { + "direction": "input", + "bits": [ 4505, 4506, 4507, 4508, 4509, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562, 4563, 4564, 4565, 4566, 4567, 4568 ] + }, + "CFGINTERRUPTMSIPENDINGSTATUS": { + "direction": "input", + "bits": [ 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, 4589, 4590, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, 4601, 4602, 4603, 4604, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 4630, 4631, 4632 ] + }, + "CFGINTERRUPTMSIXADDRESS": { + "direction": "input", + "bits": [ 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696 ] + }, + "CFGDSBUSNUMBER": { + "direction": "input", + "bits": [ 4697, 4698, 4699, 4700, 4701, 4702, 4703, 4704 ] + }, + "CFGDSPORTNUMBER": { + "direction": "input", + "bits": [ 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712 ] + }, + "CFGREVID": { + "direction": "input", + "bits": [ 4713, 4714, 4715, 4716, 4717, 4718, 4719, 4720 ] + }, + "PLGEN3PCSRXSYNCDONE": { + "direction": "input", + "bits": [ 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728 ] + }, + "SAXISCCTKEEP": { + "direction": "input", + "bits": [ 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736 ] + }, + "SAXISRQTKEEP": { + "direction": "input", + "bits": [ 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744 ] + }, + "CFGINTERRUPTMSITPHSTTAG": { + "direction": "input", + "bits": [ 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753 ] + } + }, + "cells": { + }, + "netnames": { + "CFGCONFIGSPACEENABLE": { + "hide_name": 0, + "bits": [ 2347 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3102" + } + }, + "CFGCURRENTSPEED": { + "hide_name": 0, + "bits": [ 1129, 1130, 1131 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2993" + } + }, + "CFGDEVID": { + "hide_name": 0, + "bits": [ 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3219" + } + }, + "CFGDPASUBSTATECHANGE": { + "hide_name": 0, + "bits": [ 503, 504 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2934" + } + }, + "CFGDSBUSNUMBER": { + "hide_name": 0, + "bits": [ 4697, 4698, 4699, 4700, 4701, 4702, 4703, 4704 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3305" + } + }, + "CFGDSDEVICENUMBER": { + "hide_name": 0, + "bits": [ 4422, 4423, 4424, 4425, 4426 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3297" + } + }, + "CFGDSFUNCTIONNUMBER": { + "hide_name": 0, + "bits": [ 3884, 3885, 3886 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3264" + } + }, + "CFGDSN": { + "hide_name": 0, + "bits": [ 4505, 4506, 4507, 4508, 4509, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562, 4563, 4564, 4565, 4566, 4567, 4568 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3302" + } + }, + "CFGDSPORTNUMBER": { + "hide_name": 0, + "bits": [ 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3306" + } + }, + "CFGERRCORIN": { + "hide_name": 0, + "bits": [ 2348 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3103" + } + }, + "CFGERRCOROUT": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2842" + } + }, + "CFGERRFATALOUT": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2843" + } + }, + "CFGERRNONFATALOUT": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2844" + } + }, + "CFGERRUNCORIN": { + "hide_name": 0, + "bits": [ 2349 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3104" + } + }, + "CFGEXTFUNCTIONNUMBER": { + "hide_name": 0, + "bits": [ 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3078" + } + }, + "CFGEXTREADDATA": { + "hide_name": 0, + "bits": [ 3929, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 3960 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3279" + } + }, + "CFGEXTREADDATAVALID": { + "hide_name": 0, + "bits": [ 2350 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3105" + } + }, + "CFGEXTREADRECEIVED": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2845" + } + }, + "CFGEXTREGISTERNUMBER": { + "hide_name": 0, + "bits": [ 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3093" + } + }, + "CFGEXTWRITEBYTEENABLE": { + "hide_name": 0, + "bits": [ 1552, 1553, 1554, 1555 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3018" + } + }, + "CFGEXTWRITEDATA": { + "hide_name": 0, + "bits": [ 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3006" + } + }, + "CFGEXTWRITERECEIVED": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2846" + } + }, + "CFGFCCPLD": { + "hide_name": 0, + "bits": [ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2923" + } + }, + "CFGFCCPLH": { + "hide_name": 0, + "bits": [ 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3079" + } + }, + "CFGFCNPD": { + "hide_name": 0, + "bits": [ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2924" + } + }, + "CFGFCNPH": { + "hide_name": 0, + "bits": [ 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3080" + } + }, + "CFGFCPD": { + "hide_name": 0, + "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2925" + } + }, + "CFGFCPH": { + "hide_name": 0, + "bits": [ 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3081" + } + }, + "CFGFCSEL": { + "hide_name": 0, + "bits": [ 3887, 3888, 3889 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3265" + } + }, + "CFGFLRDONE": { + "hide_name": 0, + "bits": [ 3290, 3291 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3241" + } + }, + "CFGFLRINPROCESS": { + "hide_name": 0, + "bits": [ 505, 506 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2935" + } + }, + "CFGFUNCTIONPOWERSTATE": { + "hide_name": 0, + "bits": [ 1674, 1675, 1676, 1677, 1678, 1679 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3048" + } + }, + "CFGFUNCTIONSTATUS": { + "hide_name": 0, + "bits": [ 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3082" + } + }, + "CFGHOTRESETIN": { + "hide_name": 0, + "bits": [ 2351 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3106" + } + }, + "CFGHOTRESETOUT": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2847" + } + }, + "CFGINPUTUPDATEDONE": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2848" + } + }, + "CFGINPUTUPDATEREQUEST": { + "hide_name": 0, + "bits": [ 2352 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3107" + } + }, + "CFGINTERRUPTAOUTPUT": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2849" + } + }, + "CFGINTERRUPTBOUTPUT": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2850" + } + }, + "CFGINTERRUPTCOUTPUT": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2851" + } + }, + "CFGINTERRUPTDOUTPUT": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2852" + } + }, + "CFGINTERRUPTINT": { + "hide_name": 0, + "bits": [ 4410, 4411, 4412, 4413 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3294" + } + }, + "CFGINTERRUPTMSIATTR": { + "hide_name": 0, + "bits": [ 3890, 3891, 3892 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3266" + } + }, + "CFGINTERRUPTMSIDATA": { + "hide_name": 0, + "bits": [ 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3007" + } + }, + "CFGINTERRUPTMSIENABLE": { + "hide_name": 0, + "bits": [ 507, 508 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2936" + } + }, + "CFGINTERRUPTMSIFAIL": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2853" + } + }, + "CFGINTERRUPTMSIFUNCTIONNUMBER": { + "hide_name": 0, + "bits": [ 3893, 3894, 3895 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3267" + } + }, + "CFGINTERRUPTMSIINT": { + "hide_name": 0, + "bits": [ 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 3990, 3991, 3992 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3280" + } + }, + "CFGINTERRUPTMSIMASKUPDATE": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2854" + } + }, + "CFGINTERRUPTMSIMMENABLE": { + "hide_name": 0, + "bits": [ 1680, 1681, 1682, 1683, 1684, 1685 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3049" + } + }, + "CFGINTERRUPTMSIPENDINGSTATUS": { + "hide_name": 0, + "bits": [ 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, 4589, 4590, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, 4601, 4602, 4603, 4604, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 4630, 4631, 4632 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3303" + } + }, + "CFGINTERRUPTMSISELECT": { + "hide_name": 0, + "bits": [ 4414, 4415, 4416, 4417 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3295" + } + }, + "CFGINTERRUPTMSISENT": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2855" + } + }, + "CFGINTERRUPTMSITPHPRESENT": { + "hide_name": 0, + "bits": [ 2353 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3108" + } + }, + "CFGINTERRUPTMSITPHSTTAG": { + "hide_name": 0, + "bits": [ 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3311" + } + }, + "CFGINTERRUPTMSITPHTYPE": { + "hide_name": 0, + "bits": [ 3292, 3293 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3242" + } + }, + "CFGINTERRUPTMSIVFENABLE": { + "hide_name": 0, + "bits": [ 1686, 1687, 1688, 1689, 1690, 1691 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3050" + } + }, + "CFGINTERRUPTMSIXADDRESS": { + "hide_name": 0, + "bits": [ 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3304" + } + }, + "CFGINTERRUPTMSIXDATA": { + "hide_name": 0, + "bits": [ 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4024 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3281" + } + }, + "CFGINTERRUPTMSIXENABLE": { + "hide_name": 0, + "bits": [ 509, 510 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2937" + } + }, + "CFGINTERRUPTMSIXFAIL": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2856" + } + }, + "CFGINTERRUPTMSIXINT": { + "hide_name": 0, + "bits": [ 2354 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3109" + } + }, + "CFGINTERRUPTMSIXMASK": { + "hide_name": 0, + "bits": [ 511, 512 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2938" + } + }, + "CFGINTERRUPTMSIXSENT": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2857" + } + }, + "CFGINTERRUPTMSIXVFENABLE": { + "hide_name": 0, + "bits": [ 1692, 1693, 1694, 1695, 1696, 1697 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3051" + } + }, + "CFGINTERRUPTMSIXVFMASK": { + "hide_name": 0, + "bits": [ 1698, 1699, 1700, 1701, 1702, 1703 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3052" + } + }, + "CFGINTERRUPTPENDING": { + "hide_name": 0, + "bits": [ 3294, 3295 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3243" + } + }, + "CFGINTERRUPTSENT": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2858" + } + }, + "CFGLINKPOWERSTATE": { + "hide_name": 0, + "bits": [ 513, 514 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2939" + } + }, + "CFGLINKTRAININGENABLE": { + "hide_name": 0, + "bits": [ 2355 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3110" + } + }, + "CFGLOCALERROR": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2859" + } + }, + "CFGLTRENABLE": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2860" + } + }, + "CFGLTSSMSTATE": { + "hide_name": 0, + "bits": [ 1704, 1705, 1706, 1707, 1708, 1709 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3053" + } + }, + "CFGMAXPAYLOAD": { + "hide_name": 0, + "bits": [ 1132, 1133, 1134 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2994" + } + }, + "CFGMAXREADREQ": { + "hide_name": 0, + "bits": [ 1135, 1136, 1137 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2995" + } + }, + "CFGMCUPDATEDONE": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2861" + } + }, + "CFGMCUPDATEREQUEST": { + "hide_name": 0, + "bits": [ 2356 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3111" + } + }, + "CFGMGMTADDR": { + "hide_name": 0, + "bits": [ 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3240" + } + }, + "CFGMGMTBYTEENABLE": { + "hide_name": 0, + "bits": [ 4418, 4419, 4420, 4421 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3296" + } + }, + "CFGMGMTREAD": { + "hide_name": 0, + "bits": [ 2357 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3112" + } + }, + "CFGMGMTREADDATA": { + "hide_name": 0, + "bits": [ 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3008" + } + }, + "CFGMGMTREADWRITEDONE": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2862" + } + }, + "CFGMGMTTYPE1CFGREGACCESS": { + "hide_name": 0, + "bits": [ 2358 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3113" + } + }, + "CFGMGMTWRITE": { + "hide_name": 0, + "bits": [ 2359 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3114" + } + }, + "CFGMGMTWRITEDATA": { + "hide_name": 0, + "bits": [ 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 4053, 4054, 4055, 4056 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3282" + } + }, + "CFGMSGRECEIVED": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2863" + } + }, + "CFGMSGRECEIVEDDATA": { + "hide_name": 0, + "bits": [ 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3083" + } + }, + "CFGMSGRECEIVEDTYPE": { + "hide_name": 0, + "bits": [ 1664, 1665, 1666, 1667, 1668 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3046" + } + }, + "CFGMSGTRANSMIT": { + "hide_name": 0, + "bits": [ 2360 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3115" + } + }, + "CFGMSGTRANSMITDATA": { + "hide_name": 0, + "bits": [ 4057, 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4079, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3283" + } + }, + "CFGMSGTRANSMITDONE": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2864" + } + }, + "CFGMSGTRANSMITTYPE": { + "hide_name": 0, + "bits": [ 3896, 3897, 3898 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3268" + } + }, + "CFGNEGOTIATEDWIDTH": { + "hide_name": 0, + "bits": [ 1556, 1557, 1558, 1559 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3019" + } + }, + "CFGOBFFENABLE": { + "hide_name": 0, + "bits": [ 515, 516 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2940" + } + }, + "CFGPERFUNCSTATUSCONTROL": { + "hide_name": 0, + "bits": [ 3899, 3900, 3901 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3269" + } + }, + "CFGPERFUNCSTATUSDATA": { + "hide_name": 0, + "bits": [ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2929" + } + }, + "CFGPERFUNCTIONNUMBER": { + "hide_name": 0, + "bits": [ 3902, 3903, 3904 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3270" + } + }, + "CFGPERFUNCTIONOUTPUTREQUEST": { + "hide_name": 0, + "bits": [ 2361 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3116" + } + }, + "CFGPERFUNCTIONUPDATEDONE": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2865" + } + }, + "CFGPHYLINKDOWN": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2866" + } + }, + "CFGPHYLINKSTATUS": { + "hide_name": 0, + "bits": [ 517, 518 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2941" + } + }, + "CFGPLSTATUSCHANGE": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2867" + } + }, + "CFGPOWERSTATECHANGEACK": { + "hide_name": 0, + "bits": [ 2362 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3117" + } + }, + "CFGPOWERSTATECHANGEINTERRUPT": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2868" + } + }, + "CFGRCBSTATUS": { + "hide_name": 0, + "bits": [ 519, 520 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2942" + } + }, + "CFGREQPMTRANSITIONL23READY": { + "hide_name": 0, + "bits": [ 2363 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3118" + } + }, + "CFGREVID": { + "hide_name": 0, + "bits": [ 4713, 4714, 4715, 4716, 4717, 4718, 4719, 4720 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3307" + } + }, + "CFGSUBSYSID": { + "hide_name": 0, + "bits": [ 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930, 2931, 2932, 2933, 2934 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3220" + } + }, + "CFGSUBSYSVENDID": { + "hide_name": 0, + "bits": [ 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3221" + } + }, + "CFGTPHFUNCTIONNUM": { + "hide_name": 0, + "bits": [ 1138, 1139, 1140 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2996" + } + }, + "CFGTPHREQUESTERENABLE": { + "hide_name": 0, + "bits": [ 521, 522 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2943" + } + }, + "CFGTPHSTMODE": { + "hide_name": 0, + "bits": [ 1710, 1711, 1712, 1713, 1714, 1715 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3054" + } + }, + "CFGTPHSTTADDRESS": { + "hide_name": 0, + "bits": [ 1669, 1670, 1671, 1672, 1673 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3047" + } + }, + "CFGTPHSTTREADDATA": { + "hide_name": 0, + "bits": [ 4089, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4120 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3284" + } + }, + "CFGTPHSTTREADDATAVALID": { + "hide_name": 0, + "bits": [ 2364 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3119" + } + }, + "CFGTPHSTTREADENABLE": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2869" + } + }, + "CFGTPHSTTWRITEBYTEVALID": { + "hide_name": 0, + "bits": [ 1560, 1561, 1562, 1563 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3020" + } + }, + "CFGTPHSTTWRITEDATA": { + "hide_name": 0, + "bits": [ 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3009" + } + }, + "CFGTPHSTTWRITEENABLE": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2870" + } + }, + "CFGVENDID": { + "hide_name": 0, + "bits": [ 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3222" + } + }, + "CFGVFFLRDONE": { + "hide_name": 0, + "bits": [ 4487, 4488, 4489, 4490, 4491, 4492 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3299" + } + }, + "CFGVFFLRINPROCESS": { + "hide_name": 0, + "bits": [ 1716, 1717, 1718, 1719, 1720, 1721 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3055" + } + }, + "CFGVFPOWERSTATE": { + "hide_name": 0, + "bits": [ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2932" + } + }, + "CFGVFSTATUS": { + "hide_name": 0, + "bits": [ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2926" + } + }, + "CFGVFTPHREQUESTERENABLE": { + "hide_name": 0, + "bits": [ 1722, 1723, 1724, 1725, 1726, 1727 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3056" + } + }, + "CFGVFTPHSTMODE": { + "hide_name": 0, + "bits": [ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2933" + } + }, + "CORECLK": { + "hide_name": 0, + "bits": [ 2365 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3120" + } + }, + "CORECLKMICOMPLETIONRAML": { + "hide_name": 0, + "bits": [ 2366 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3121" + } + }, + "CORECLKMICOMPLETIONRAMU": { + "hide_name": 0, + "bits": [ 2367 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3122" + } + }, + "CORECLKMIREPLAYRAM": { + "hide_name": 0, + "bits": [ 2368 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3123" + } + }, + "CORECLKMIREQUESTRAM": { + "hide_name": 0, + "bits": [ 2369 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3124" + } + }, + "DBGDATAOUT": { + "hide_name": 0, + "bits": [ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2930" + } + }, + "DRPADDR": { + "hide_name": 0, + "bits": [ 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3215" + } + }, + "DRPCLK": { + "hide_name": 0, + "bits": [ 2370 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3125" + } + }, + "DRPDI": { + "hide_name": 0, + "bits": [ 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3223" + } + }, + "DRPDO": { + "hide_name": 0, + "bits": [ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2931" + } + }, + "DRPEN": { + "hide_name": 0, + "bits": [ 2371 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3126" + } + }, + "DRPRDY": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2871" + } + }, + "DRPWE": { + "hide_name": 0, + "bits": [ 2372 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3127" + } + }, + "MAXISCQTDATA": { + "hide_name": 0, + "bits": [ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2991" + } + }, + "MAXISCQTKEEP": { + "hide_name": 0, + "bits": [ 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3084" + } + }, + "MAXISCQTLAST": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2872" + } + }, + "MAXISCQTREADY": { + "hide_name": 0, + "bits": [ 3328, 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3260" + } + }, + "MAXISCQTUSER": { + "hide_name": 0, + "bits": [ 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3087" + } + }, + "MAXISCQTVALID": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2873" + } + }, + "MAXISRCTDATA": { + "hide_name": 0, + "bits": [ 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2992" + } + }, + "MAXISRCTKEEP": { + "hide_name": 0, + "bits": [ 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3085" + } + }, + "MAXISRCTLAST": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2874" + } + }, + "MAXISRCTREADY": { + "hide_name": 0, + "bits": [ 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3261" + } + }, + "MAXISRCTUSER": { + "hide_name": 0, + "bits": [ 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3077" + } + }, + "MAXISRCTVALID": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2875" + } + }, + "MGMTRESETN": { + "hide_name": 0, + "bits": [ 2373 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3128" + } + }, + "MGMTSTICKYRESETN": { + "hide_name": 0, + "bits": [ 2374 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3129" + } + }, + "MICOMPLETIONRAMREADADDRESSAL": { + "hide_name": 0, + "bits": [ 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3094" + } + }, + "MICOMPLETIONRAMREADADDRESSAU": { + "hide_name": 0, + "bits": [ 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3095" + } + }, + "MICOMPLETIONRAMREADADDRESSBL": { + "hide_name": 0, + "bits": [ 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3096" + } + }, + "MICOMPLETIONRAMREADADDRESSBU": { + "hide_name": 0, + "bits": [ 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3097" + } + }, + "MICOMPLETIONRAMREADDATA": { + "hide_name": 0, + "bits": [ 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3216" + } + }, + "MICOMPLETIONRAMREADENABLEL": { + "hide_name": 0, + "bits": [ 1564, 1565, 1566, 1567 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3021" + } + }, + "MICOMPLETIONRAMREADENABLEU": { + "hide_name": 0, + "bits": [ 1568, 1569, 1570, 1571 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3022" + } + }, + "MICOMPLETIONRAMWRITEADDRESSAL": { + "hide_name": 0, + "bits": [ 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3098" + } + }, + "MICOMPLETIONRAMWRITEADDRESSAU": { + "hide_name": 0, + "bits": [ 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3099" + } + }, + "MICOMPLETIONRAMWRITEADDRESSBL": { + "hide_name": 0, + "bits": [ 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3100" + } + }, + "MICOMPLETIONRAMWRITEADDRESSBU": { + "hide_name": 0, + "bits": [ 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3101" + } + }, + "MICOMPLETIONRAMWRITEDATAL": { + "hide_name": 0, + "bits": [ 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3075" + } + }, + "MICOMPLETIONRAMWRITEDATAU": { + "hide_name": 0, + "bits": [ 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3076" + } + }, + "MICOMPLETIONRAMWRITEENABLEL": { + "hide_name": 0, + "bits": [ 1572, 1573, 1574, 1575 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3023" + } + }, + "MICOMPLETIONRAMWRITEENABLEU": { + "hide_name": 0, + "bits": [ 1576, 1577, 1578, 1579 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3024" + } + }, + "MIREPLAYRAMADDRESS": { + "hide_name": 0, + "bits": [ 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3088" + } + }, + "MIREPLAYRAMREADDATA": { + "hide_name": 0, + "bits": [ 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3217" + } + }, + "MIREPLAYRAMREADENABLE": { + "hide_name": 0, + "bits": [ 523, 524 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2944" + } + }, + "MIREPLAYRAMWRITEDATA": { + "hide_name": 0, + "bits": [ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2927" + } + }, + "MIREPLAYRAMWRITEENABLE": { + "hide_name": 0, + "bits": [ 525, 526 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2945" + } + }, + "MIREQUESTRAMREADADDRESSA": { + "hide_name": 0, + "bits": [ 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3089" + } + }, + "MIREQUESTRAMREADADDRESSB": { + "hide_name": 0, + "bits": [ 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3090" + } + }, + "MIREQUESTRAMREADDATA": { + "hide_name": 0, + "bits": [ 2759, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3218" + } + }, + "MIREQUESTRAMREADENABLE": { + "hide_name": 0, + "bits": [ 1580, 1581, 1582, 1583 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3025" + } + }, + "MIREQUESTRAMWRITEADDRESSA": { + "hide_name": 0, + "bits": [ 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3091" + } + }, + "MIREQUESTRAMWRITEADDRESSB": { + "hide_name": 0, + "bits": [ 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3092" + } + }, + "MIREQUESTRAMWRITEDATA": { + "hide_name": 0, + "bits": [ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2928" + } + }, + "MIREQUESTRAMWRITEENABLE": { + "hide_name": 0, + "bits": [ 1584, 1585, 1586, 1587 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3026" + } + }, + "PCIECQNPREQ": { + "hide_name": 0, + "bits": [ 2375 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3130" + } + }, + "PCIECQNPREQCOUNT": { + "hide_name": 0, + "bits": [ 1728, 1729, 1730, 1731, 1732, 1733 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3057" + } + }, + "PCIERQSEQNUM": { + "hide_name": 0, + "bits": [ 1588, 1589, 1590, 1591 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3027" + } + }, + "PCIERQSEQNUMVLD": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2876" + } + }, + "PCIERQTAG": { + "hide_name": 0, + "bits": [ 1734, 1735, 1736, 1737, 1738, 1739 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3058" + } + }, + "PCIERQTAGAV": { + "hide_name": 0, + "bits": [ 527, 528 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2946" + } + }, + "PCIERQTAGVLD": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2877" + } + }, + "PCIETFCNPDAV": { + "hide_name": 0, + "bits": [ 529, 530 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2947" + } + }, + "PCIETFCNPHAV": { + "hide_name": 0, + "bits": [ 531, 532 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2948" + } + }, + "PIPECLK": { + "hide_name": 0, + "bits": [ 2376 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3131" + } + }, + "PIPEEQFS": { + "hide_name": 0, + "bits": [ 4493, 4494, 4495, 4496, 4497, 4498 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3300" + } + }, + "PIPEEQLF": { + "hide_name": 0, + "bits": [ 4499, 4500, 4501, 4502, 4503, 4504 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3301" + } + }, + "PIPERESETN": { + "hide_name": 0, + "bits": [ 2377 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3132" + } + }, + "PIPERX0CHARISK": { + "hide_name": 0, + "bits": [ 3296, 3297 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3244" + } + }, + "PIPERX0DATA": { + "hide_name": 0, + "bits": [ 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3285" + } + }, + "PIPERX0DATAVALID": { + "hide_name": 0, + "bits": [ 2378 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3133" + } + }, + "PIPERX0ELECIDLE": { + "hide_name": 0, + "bits": [ 2379 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3134" + } + }, + "PIPERX0EQCONTROL": { + "hide_name": 0, + "bits": [ 533, 534 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2949" + } + }, + "PIPERX0EQDONE": { + "hide_name": 0, + "bits": [ 2380 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3135" + } + }, + "PIPERX0EQLPADAPTDONE": { + "hide_name": 0, + "bits": [ 2381 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3136" + } + }, + "PIPERX0EQLPLFFS": { + "hide_name": 0, + "bits": [ 1740, 1741, 1742, 1743, 1744, 1745 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3059" + } + }, + "PIPERX0EQLPLFFSSEL": { + "hide_name": 0, + "bits": [ 2382 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3137" + } + }, + "PIPERX0EQLPNEWTXCOEFFORPRESET": { + "hide_name": 0, + "bits": [ 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3000 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3224" + } + }, + "PIPERX0EQLPTXPRESET": { + "hide_name": 0, + "bits": [ 1592, 1593, 1594, 1595 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3028" + } + }, + "PIPERX0EQPRESET": { + "hide_name": 0, + "bits": [ 1141, 1142, 1143 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2997" + } + }, + "PIPERX0PHYSTATUS": { + "hide_name": 0, + "bits": [ 2383 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3138" + } + }, + "PIPERX0POLARITY": { + "hide_name": 0, + "bits": [ 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2878" + } + }, + "PIPERX0STARTBLOCK": { + "hide_name": 0, + "bits": [ 2384 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3139" + } + }, + "PIPERX0STATUS": { + "hide_name": 0, + "bits": [ 3905, 3906, 3907 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3271" + } + }, + "PIPERX0SYNCHEADER": { + "hide_name": 0, + "bits": [ 3298, 3299 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3245" + } + }, + "PIPERX0VALID": { + "hide_name": 0, + "bits": [ 2385 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3140" + } + }, + "PIPERX1CHARISK": { + "hide_name": 0, + "bits": [ 3300, 3301 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3246" + } + }, + "PIPERX1DATA": { + "hide_name": 0, + "bits": [ 4153, 4154, 4155, 4156, 4157, 4158, 4159, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178, 4179, 4180, 4181, 4182, 4183, 4184 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3286" + } + }, + "PIPERX1DATAVALID": { + "hide_name": 0, + "bits": [ 2386 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3141" + } + }, + "PIPERX1ELECIDLE": { + "hide_name": 0, + "bits": [ 2387 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3142" + } + }, + "PIPERX1EQCONTROL": { + "hide_name": 0, + "bits": [ 535, 536 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2950" + } + }, + "PIPERX1EQDONE": { + "hide_name": 0, + "bits": [ 2388 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3143" + } + }, + "PIPERX1EQLPADAPTDONE": { + "hide_name": 0, + "bits": [ 2389 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3144" + } + }, + "PIPERX1EQLPLFFS": { + "hide_name": 0, + "bits": [ 1746, 1747, 1748, 1749, 1750, 1751 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3060" + } + }, + "PIPERX1EQLPLFFSSEL": { + "hide_name": 0, + "bits": [ 2390 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3145" + } + }, + "PIPERX1EQLPNEWTXCOEFFORPRESET": { + "hide_name": 0, + "bits": [ 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3225" + } + }, + "PIPERX1EQLPTXPRESET": { + "hide_name": 0, + "bits": [ 1596, 1597, 1598, 1599 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3029" + } + }, + "PIPERX1EQPRESET": { + "hide_name": 0, + "bits": [ 1144, 1145, 1146 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2998" + } + }, + "PIPERX1PHYSTATUS": { + "hide_name": 0, + "bits": [ 2391 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3146" + } + }, + "PIPERX1POLARITY": { + "hide_name": 0, + "bits": [ 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2879" + } + }, + "PIPERX1STARTBLOCK": { + "hide_name": 0, + "bits": [ 2392 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3147" + } + }, + "PIPERX1STATUS": { + "hide_name": 0, + "bits": [ 3908, 3909, 3910 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3272" + } + }, + "PIPERX1SYNCHEADER": { + "hide_name": 0, + "bits": [ 3302, 3303 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3247" + } + }, + "PIPERX1VALID": { + "hide_name": 0, + "bits": [ 2393 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3148" + } + }, + "PIPERX2CHARISK": { + "hide_name": 0, + "bits": [ 3304, 3305 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3248" + } + }, + "PIPERX2DATA": { + "hide_name": 0, + "bits": [ 4185, 4186, 4187, 4188, 4189, 4190, 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, 4209, 4210, 4211, 4212, 4213, 4214, 4215, 4216 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3287" + } + }, + "PIPERX2DATAVALID": { + "hide_name": 0, + "bits": [ 2394 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3149" + } + }, + "PIPERX2ELECIDLE": { + "hide_name": 0, + "bits": [ 2395 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3150" + } + }, + "PIPERX2EQCONTROL": { + "hide_name": 0, + "bits": [ 537, 538 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2951" + } + }, + "PIPERX2EQDONE": { + "hide_name": 0, + "bits": [ 2396 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3151" + } + }, + "PIPERX2EQLPADAPTDONE": { + "hide_name": 0, + "bits": [ 2397 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3152" + } + }, + "PIPERX2EQLPLFFS": { + "hide_name": 0, + "bits": [ 1752, 1753, 1754, 1755, 1756, 1757 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3061" + } + }, + "PIPERX2EQLPLFFSSEL": { + "hide_name": 0, + "bits": [ 2398 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3153" + } + }, + "PIPERX2EQLPNEWTXCOEFFORPRESET": { + "hide_name": 0, + "bits": [ 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3226" + } + }, + "PIPERX2EQLPTXPRESET": { + "hide_name": 0, + "bits": [ 1600, 1601, 1602, 1603 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3030" + } + }, + "PIPERX2EQPRESET": { + "hide_name": 0, + "bits": [ 1147, 1148, 1149 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2999" + } + }, + "PIPERX2PHYSTATUS": { + "hide_name": 0, + "bits": [ 2399 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3154" + } + }, + "PIPERX2POLARITY": { + "hide_name": 0, + "bits": [ 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2880" + } + }, + "PIPERX2STARTBLOCK": { + "hide_name": 0, + "bits": [ 2400 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3155" + } + }, + "PIPERX2STATUS": { + "hide_name": 0, + "bits": [ 3911, 3912, 3913 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3273" + } + }, + "PIPERX2SYNCHEADER": { + "hide_name": 0, + "bits": [ 3306, 3307 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3249" + } + }, + "PIPERX2VALID": { + "hide_name": 0, + "bits": [ 2401 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3156" + } + }, + "PIPERX3CHARISK": { + "hide_name": 0, + "bits": [ 3308, 3309 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3250" + } + }, + "PIPERX3DATA": { + "hide_name": 0, + "bits": [ 4217, 4218, 4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3288" + } + }, + "PIPERX3DATAVALID": { + "hide_name": 0, + "bits": [ 2402 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3157" + } + }, + "PIPERX3ELECIDLE": { + "hide_name": 0, + "bits": [ 2403 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3158" + } + }, + "PIPERX3EQCONTROL": { + "hide_name": 0, + "bits": [ 539, 540 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2952" + } + }, + "PIPERX3EQDONE": { + "hide_name": 0, + "bits": [ 2404 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3159" + } + }, + "PIPERX3EQLPADAPTDONE": { + "hide_name": 0, + "bits": [ 2405 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3160" + } + }, + "PIPERX3EQLPLFFS": { + "hide_name": 0, + "bits": [ 1758, 1759, 1760, 1761, 1762, 1763 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3062" + } + }, + "PIPERX3EQLPLFFSSEL": { + "hide_name": 0, + "bits": [ 2406 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3161" + } + }, + "PIPERX3EQLPNEWTXCOEFFORPRESET": { + "hide_name": 0, + "bits": [ 3037, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3227" + } + }, + "PIPERX3EQLPTXPRESET": { + "hide_name": 0, + "bits": [ 1604, 1605, 1606, 1607 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3031" + } + }, + "PIPERX3EQPRESET": { + "hide_name": 0, + "bits": [ 1150, 1151, 1152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3000" + } + }, + "PIPERX3PHYSTATUS": { + "hide_name": 0, + "bits": [ 2407 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3162" + } + }, + "PIPERX3POLARITY": { + "hide_name": 0, + "bits": [ 41 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2881" + } + }, + "PIPERX3STARTBLOCK": { + "hide_name": 0, + "bits": [ 2408 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3163" + } + }, + "PIPERX3STATUS": { + "hide_name": 0, + "bits": [ 3914, 3915, 3916 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3274" + } + }, + "PIPERX3SYNCHEADER": { + "hide_name": 0, + "bits": [ 3310, 3311 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3251" + } + }, + "PIPERX3VALID": { + "hide_name": 0, + "bits": [ 2409 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3164" + } + }, + "PIPERX4CHARISK": { + "hide_name": 0, + "bits": [ 3312, 3313 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3252" + } + }, + "PIPERX4DATA": { + "hide_name": 0, + "bits": [ 4249, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3289" + } + }, + "PIPERX4DATAVALID": { + "hide_name": 0, + "bits": [ 2410 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3165" + } + }, + "PIPERX4ELECIDLE": { + "hide_name": 0, + "bits": [ 2411 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3166" + } + }, + "PIPERX4EQCONTROL": { + "hide_name": 0, + "bits": [ 541, 542 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2953" + } + }, + "PIPERX4EQDONE": { + "hide_name": 0, + "bits": [ 2412 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3167" + } + }, + "PIPERX4EQLPADAPTDONE": { + "hide_name": 0, + "bits": [ 2413 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3168" + } + }, + "PIPERX4EQLPLFFS": { + "hide_name": 0, + "bits": [ 1764, 1765, 1766, 1767, 1768, 1769 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3063" + } + }, + "PIPERX4EQLPLFFSSEL": { + "hide_name": 0, + "bits": [ 2414 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3169" + } + }, + "PIPERX4EQLPNEWTXCOEFFORPRESET": { + "hide_name": 0, + "bits": [ 3055, 3056, 3057, 3058, 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3228" + } + }, + "PIPERX4EQLPTXPRESET": { + "hide_name": 0, + "bits": [ 1608, 1609, 1610, 1611 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3032" + } + }, + "PIPERX4EQPRESET": { + "hide_name": 0, + "bits": [ 1153, 1154, 1155 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3001" + } + }, + "PIPERX4PHYSTATUS": { + "hide_name": 0, + "bits": [ 2415 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3170" + } + }, + "PIPERX4POLARITY": { + "hide_name": 0, + "bits": [ 42 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2882" + } + }, + "PIPERX4STARTBLOCK": { + "hide_name": 0, + "bits": [ 2416 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3171" + } + }, + "PIPERX4STATUS": { + "hide_name": 0, + "bits": [ 3917, 3918, 3919 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3275" + } + }, + "PIPERX4SYNCHEADER": { + "hide_name": 0, + "bits": [ 3314, 3315 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3253" + } + }, + "PIPERX4VALID": { + "hide_name": 0, + "bits": [ 2417 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3172" + } + }, + "PIPERX5CHARISK": { + "hide_name": 0, + "bits": [ 3316, 3317 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3254" + } + }, + "PIPERX5DATA": { + "hide_name": 0, + "bits": [ 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307, 4308, 4309, 4310, 4311, 4312 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3290" + } + }, + "PIPERX5DATAVALID": { + "hide_name": 0, + "bits": [ 2418 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3173" + } + }, + "PIPERX5ELECIDLE": { + "hide_name": 0, + "bits": [ 2419 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3174" + } + }, + "PIPERX5EQCONTROL": { + "hide_name": 0, + "bits": [ 543, 544 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2954" + } + }, + "PIPERX5EQDONE": { + "hide_name": 0, + "bits": [ 2420 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3175" + } + }, + "PIPERX5EQLPADAPTDONE": { + "hide_name": 0, + "bits": [ 2421 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3176" + } + }, + "PIPERX5EQLPLFFS": { + "hide_name": 0, + "bits": [ 1770, 1771, 1772, 1773, 1774, 1775 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3064" + } + }, + "PIPERX5EQLPLFFSSEL": { + "hide_name": 0, + "bits": [ 2422 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3177" + } + }, + "PIPERX5EQLPNEWTXCOEFFORPRESET": { + "hide_name": 0, + "bits": [ 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3229" + } + }, + "PIPERX5EQLPTXPRESET": { + "hide_name": 0, + "bits": [ 1612, 1613, 1614, 1615 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3033" + } + }, + "PIPERX5EQPRESET": { + "hide_name": 0, + "bits": [ 1156, 1157, 1158 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3002" + } + }, + "PIPERX5PHYSTATUS": { + "hide_name": 0, + "bits": [ 2423 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3178" + } + }, + "PIPERX5POLARITY": { + "hide_name": 0, + "bits": [ 43 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2883" + } + }, + "PIPERX5STARTBLOCK": { + "hide_name": 0, + "bits": [ 2424 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3179" + } + }, + "PIPERX5STATUS": { + "hide_name": 0, + "bits": [ 3920, 3921, 3922 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3276" + } + }, + "PIPERX5SYNCHEADER": { + "hide_name": 0, + "bits": [ 3318, 3319 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3255" + } + }, + "PIPERX5VALID": { + "hide_name": 0, + "bits": [ 2425 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3180" + } + }, + "PIPERX6CHARISK": { + "hide_name": 0, + "bits": [ 3320, 3321 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3256" + } + }, + "PIPERX6DATA": { + "hide_name": 0, + "bits": [ 4313, 4314, 4315, 4316, 4317, 4318, 4319, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3291" + } + }, + "PIPERX6DATAVALID": { + "hide_name": 0, + "bits": [ 2426 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3181" + } + }, + "PIPERX6ELECIDLE": { + "hide_name": 0, + "bits": [ 2427 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3182" + } + }, + "PIPERX6EQCONTROL": { + "hide_name": 0, + "bits": [ 545, 546 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2955" + } + }, + "PIPERX6EQDONE": { + "hide_name": 0, + "bits": [ 2428 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3183" + } + }, + "PIPERX6EQLPADAPTDONE": { + "hide_name": 0, + "bits": [ 2429 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3184" + } + }, + "PIPERX6EQLPLFFS": { + "hide_name": 0, + "bits": [ 1776, 1777, 1778, 1779, 1780, 1781 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3065" + } + }, + "PIPERX6EQLPLFFSSEL": { + "hide_name": 0, + "bits": [ 2430 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3185" + } + }, + "PIPERX6EQLPNEWTXCOEFFORPRESET": { + "hide_name": 0, + "bits": [ 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3230" + } + }, + "PIPERX6EQLPTXPRESET": { + "hide_name": 0, + "bits": [ 1616, 1617, 1618, 1619 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3034" + } + }, + "PIPERX6EQPRESET": { + "hide_name": 0, + "bits": [ 1159, 1160, 1161 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3003" + } + }, + "PIPERX6PHYSTATUS": { + "hide_name": 0, + "bits": [ 2431 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3186" + } + }, + "PIPERX6POLARITY": { + "hide_name": 0, + "bits": [ 44 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2884" + } + }, + "PIPERX6STARTBLOCK": { + "hide_name": 0, + "bits": [ 2432 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3187" + } + }, + "PIPERX6STATUS": { + "hide_name": 0, + "bits": [ 3923, 3924, 3925 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3277" + } + }, + "PIPERX6SYNCHEADER": { + "hide_name": 0, + "bits": [ 3322, 3323 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3257" + } + }, + "PIPERX6VALID": { + "hide_name": 0, + "bits": [ 2433 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3188" + } + }, + "PIPERX7CHARISK": { + "hide_name": 0, + "bits": [ 3324, 3325 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3258" + } + }, + "PIPERX7DATA": { + "hide_name": 0, + "bits": [ 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3292" + } + }, + "PIPERX7DATAVALID": { + "hide_name": 0, + "bits": [ 2434 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3189" + } + }, + "PIPERX7ELECIDLE": { + "hide_name": 0, + "bits": [ 2435 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3190" + } + }, + "PIPERX7EQCONTROL": { + "hide_name": 0, + "bits": [ 547, 548 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2956" + } + }, + "PIPERX7EQDONE": { + "hide_name": 0, + "bits": [ 2436 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3191" + } + }, + "PIPERX7EQLPADAPTDONE": { + "hide_name": 0, + "bits": [ 2437 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3192" + } + }, + "PIPERX7EQLPLFFS": { + "hide_name": 0, + "bits": [ 1782, 1783, 1784, 1785, 1786, 1787 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3066" + } + }, + "PIPERX7EQLPLFFSSEL": { + "hide_name": 0, + "bits": [ 2438 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3193" + } + }, + "PIPERX7EQLPNEWTXCOEFFORPRESET": { + "hide_name": 0, + "bits": [ 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3231" + } + }, + "PIPERX7EQLPTXPRESET": { + "hide_name": 0, + "bits": [ 1620, 1621, 1622, 1623 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3035" + } + }, + "PIPERX7EQPRESET": { + "hide_name": 0, + "bits": [ 1162, 1163, 1164 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3004" + } + }, + "PIPERX7PHYSTATUS": { + "hide_name": 0, + "bits": [ 2439 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3194" + } + }, + "PIPERX7POLARITY": { + "hide_name": 0, + "bits": [ 45 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2885" + } + }, + "PIPERX7STARTBLOCK": { + "hide_name": 0, + "bits": [ 2440 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3195" + } + }, + "PIPERX7STATUS": { + "hide_name": 0, + "bits": [ 3926, 3927, 3928 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3278" + } + }, + "PIPERX7SYNCHEADER": { + "hide_name": 0, + "bits": [ 3326, 3327 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3259" + } + }, + "PIPERX7VALID": { + "hide_name": 0, + "bits": [ 2441 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3196" + } + }, + "PIPETX0CHARISK": { + "hide_name": 0, + "bits": [ 549, 550 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2957" + } + }, + "PIPETX0COMPLIANCE": { + "hide_name": 0, + "bits": [ 46 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2886" + } + }, + "PIPETX0DATA": { + "hide_name": 0, + "bits": [ 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3010" + } + }, + "PIPETX0DATAVALID": { + "hide_name": 0, + "bits": [ 47 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2887" + } + }, + "PIPETX0ELECIDLE": { + "hide_name": 0, + "bits": [ 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2888" + } + }, + "PIPETX0EQCOEFF": { + "hide_name": 0, + "bits": [ 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3232" + } + }, + "PIPETX0EQCONTROL": { + "hide_name": 0, + "bits": [ 551, 552 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2958" + } + }, + "PIPETX0EQDEEMPH": { + "hide_name": 0, + "bits": [ 1788, 1789, 1790, 1791, 1792, 1793 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3067" + } + }, + "PIPETX0EQDONE": { + "hide_name": 0, + "bits": [ 2442 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3197" + } + }, + "PIPETX0EQPRESET": { + "hide_name": 0, + "bits": [ 1624, 1625, 1626, 1627 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3036" + } + }, + "PIPETX0POWERDOWN": { + "hide_name": 0, + "bits": [ 553, 554 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2959" + } + }, + "PIPETX0STARTBLOCK": { + "hide_name": 0, + "bits": [ 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2889" + } + }, + "PIPETX0SYNCHEADER": { + "hide_name": 0, + "bits": [ 555, 556 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2960" + } + }, + "PIPETX1CHARISK": { + "hide_name": 0, + "bits": [ 557, 558 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2961" + } + }, + "PIPETX1COMPLIANCE": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2890" + } + }, + "PIPETX1DATA": { + "hide_name": 0, + "bits": [ 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3011" + } + }, + "PIPETX1DATAVALID": { + "hide_name": 0, + "bits": [ 51 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2891" + } + }, + "PIPETX1ELECIDLE": { + "hide_name": 0, + "bits": [ 52 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2892" + } + }, + "PIPETX1EQCOEFF": { + "hide_name": 0, + "bits": [ 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3233" + } + }, + "PIPETX1EQCONTROL": { + "hide_name": 0, + "bits": [ 559, 560 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2962" + } + }, + "PIPETX1EQDEEMPH": { + "hide_name": 0, + "bits": [ 1794, 1795, 1796, 1797, 1798, 1799 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3068" + } + }, + "PIPETX1EQDONE": { + "hide_name": 0, + "bits": [ 2443 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3198" + } + }, + "PIPETX1EQPRESET": { + "hide_name": 0, + "bits": [ 1628, 1629, 1630, 1631 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3037" + } + }, + "PIPETX1POWERDOWN": { + "hide_name": 0, + "bits": [ 561, 562 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2963" + } + }, + "PIPETX1STARTBLOCK": { + "hide_name": 0, + "bits": [ 53 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2893" + } + }, + "PIPETX1SYNCHEADER": { + "hide_name": 0, + "bits": [ 563, 564 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2964" + } + }, + "PIPETX2CHARISK": { + "hide_name": 0, + "bits": [ 565, 566 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2965" + } + }, + "PIPETX2COMPLIANCE": { + "hide_name": 0, + "bits": [ 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2894" + } + }, + "PIPETX2DATA": { + "hide_name": 0, + "bits": [ 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3012" + } + }, + "PIPETX2DATAVALID": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2895" + } + }, + "PIPETX2ELECIDLE": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2896" + } + }, + "PIPETX2EQCOEFF": { + "hide_name": 0, + "bits": [ 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3234" + } + }, + "PIPETX2EQCONTROL": { + "hide_name": 0, + "bits": [ 567, 568 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2966" + } + }, + "PIPETX2EQDEEMPH": { + "hide_name": 0, + "bits": [ 1800, 1801, 1802, 1803, 1804, 1805 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3069" + } + }, + "PIPETX2EQDONE": { + "hide_name": 0, + "bits": [ 2444 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3199" + } + }, + "PIPETX2EQPRESET": { + "hide_name": 0, + "bits": [ 1632, 1633, 1634, 1635 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3038" + } + }, + "PIPETX2POWERDOWN": { + "hide_name": 0, + "bits": [ 569, 570 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2967" + } + }, + "PIPETX2STARTBLOCK": { + "hide_name": 0, + "bits": [ 57 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2897" + } + }, + "PIPETX2SYNCHEADER": { + "hide_name": 0, + "bits": [ 571, 572 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2968" + } + }, + "PIPETX3CHARISK": { + "hide_name": 0, + "bits": [ 573, 574 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2969" + } + }, + "PIPETX3COMPLIANCE": { + "hide_name": 0, + "bits": [ 58 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2898" + } + }, + "PIPETX3DATA": { + "hide_name": 0, + "bits": [ 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3013" + } + }, + "PIPETX3DATAVALID": { + "hide_name": 0, + "bits": [ 59 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2899" + } + }, + "PIPETX3ELECIDLE": { + "hide_name": 0, + "bits": [ 60 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2900" + } + }, + "PIPETX3EQCOEFF": { + "hide_name": 0, + "bits": [ 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3235" + } + }, + "PIPETX3EQCONTROL": { + "hide_name": 0, + "bits": [ 575, 576 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2970" + } + }, + "PIPETX3EQDEEMPH": { + "hide_name": 0, + "bits": [ 1806, 1807, 1808, 1809, 1810, 1811 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3070" + } + }, + "PIPETX3EQDONE": { + "hide_name": 0, + "bits": [ 2445 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3200" + } + }, + "PIPETX3EQPRESET": { + "hide_name": 0, + "bits": [ 1636, 1637, 1638, 1639 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3039" + } + }, + "PIPETX3POWERDOWN": { + "hide_name": 0, + "bits": [ 577, 578 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2971" + } + }, + "PIPETX3STARTBLOCK": { + "hide_name": 0, + "bits": [ 61 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2901" + } + }, + "PIPETX3SYNCHEADER": { + "hide_name": 0, + "bits": [ 579, 580 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2972" + } + }, + "PIPETX4CHARISK": { + "hide_name": 0, + "bits": [ 581, 582 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2973" + } + }, + "PIPETX4COMPLIANCE": { + "hide_name": 0, + "bits": [ 62 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2902" + } + }, + "PIPETX4DATA": { + "hide_name": 0, + "bits": [ 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3014" + } + }, + "PIPETX4DATAVALID": { + "hide_name": 0, + "bits": [ 63 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2903" + } + }, + "PIPETX4ELECIDLE": { + "hide_name": 0, + "bits": [ 64 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2904" + } + }, + "PIPETX4EQCOEFF": { + "hide_name": 0, + "bits": [ 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3236" + } + }, + "PIPETX4EQCONTROL": { + "hide_name": 0, + "bits": [ 583, 584 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2974" + } + }, + "PIPETX4EQDEEMPH": { + "hide_name": 0, + "bits": [ 1812, 1813, 1814, 1815, 1816, 1817 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3071" + } + }, + "PIPETX4EQDONE": { + "hide_name": 0, + "bits": [ 2446 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3201" + } + }, + "PIPETX4EQPRESET": { + "hide_name": 0, + "bits": [ 1640, 1641, 1642, 1643 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3040" + } + }, + "PIPETX4POWERDOWN": { + "hide_name": 0, + "bits": [ 585, 586 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2975" + } + }, + "PIPETX4STARTBLOCK": { + "hide_name": 0, + "bits": [ 65 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2905" + } + }, + "PIPETX4SYNCHEADER": { + "hide_name": 0, + "bits": [ 587, 588 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2976" + } + }, + "PIPETX5CHARISK": { + "hide_name": 0, + "bits": [ 589, 590 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2977" + } + }, + "PIPETX5COMPLIANCE": { + "hide_name": 0, + "bits": [ 66 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2906" + } + }, + "PIPETX5DATA": { + "hide_name": 0, + "bits": [ 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3015" + } + }, + "PIPETX5DATAVALID": { + "hide_name": 0, + "bits": [ 67 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2907" + } + }, + "PIPETX5ELECIDLE": { + "hide_name": 0, + "bits": [ 68 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2908" + } + }, + "PIPETX5EQCOEFF": { + "hide_name": 0, + "bits": [ 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3237" + } + }, + "PIPETX5EQCONTROL": { + "hide_name": 0, + "bits": [ 591, 592 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2978" + } + }, + "PIPETX5EQDEEMPH": { + "hide_name": 0, + "bits": [ 1818, 1819, 1820, 1821, 1822, 1823 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3072" + } + }, + "PIPETX5EQDONE": { + "hide_name": 0, + "bits": [ 2447 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3202" + } + }, + "PIPETX5EQPRESET": { + "hide_name": 0, + "bits": [ 1644, 1645, 1646, 1647 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3041" + } + }, + "PIPETX5POWERDOWN": { + "hide_name": 0, + "bits": [ 593, 594 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2979" + } + }, + "PIPETX5STARTBLOCK": { + "hide_name": 0, + "bits": [ 69 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2909" + } + }, + "PIPETX5SYNCHEADER": { + "hide_name": 0, + "bits": [ 595, 596 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2980" + } + }, + "PIPETX6CHARISK": { + "hide_name": 0, + "bits": [ 597, 598 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2981" + } + }, + "PIPETX6COMPLIANCE": { + "hide_name": 0, + "bits": [ 70 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2910" + } + }, + "PIPETX6DATA": { + "hide_name": 0, + "bits": [ 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3016" + } + }, + "PIPETX6DATAVALID": { + "hide_name": 0, + "bits": [ 71 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2911" + } + }, + "PIPETX6ELECIDLE": { + "hide_name": 0, + "bits": [ 72 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2912" + } + }, + "PIPETX6EQCOEFF": { + "hide_name": 0, + "bits": [ 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250, 3251, 3252 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3238" + } + }, + "PIPETX6EQCONTROL": { + "hide_name": 0, + "bits": [ 599, 600 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2982" + } + }, + "PIPETX6EQDEEMPH": { + "hide_name": 0, + "bits": [ 1824, 1825, 1826, 1827, 1828, 1829 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3073" + } + }, + "PIPETX6EQDONE": { + "hide_name": 0, + "bits": [ 2448 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3203" + } + }, + "PIPETX6EQPRESET": { + "hide_name": 0, + "bits": [ 1648, 1649, 1650, 1651 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3042" + } + }, + "PIPETX6POWERDOWN": { + "hide_name": 0, + "bits": [ 601, 602 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2983" + } + }, + "PIPETX6STARTBLOCK": { + "hide_name": 0, + "bits": [ 73 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2913" + } + }, + "PIPETX6SYNCHEADER": { + "hide_name": 0, + "bits": [ 603, 604 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2984" + } + }, + "PIPETX7CHARISK": { + "hide_name": 0, + "bits": [ 605, 606 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2985" + } + }, + "PIPETX7COMPLIANCE": { + "hide_name": 0, + "bits": [ 74 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2914" + } + }, + "PIPETX7DATA": { + "hide_name": 0, + "bits": [ 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3017" + } + }, + "PIPETX7DATAVALID": { + "hide_name": 0, + "bits": [ 75 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2915" + } + }, + "PIPETX7ELECIDLE": { + "hide_name": 0, + "bits": [ 76 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2916" + } + }, + "PIPETX7EQCOEFF": { + "hide_name": 0, + "bits": [ 3253, 3254, 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3239" + } + }, + "PIPETX7EQCONTROL": { + "hide_name": 0, + "bits": [ 607, 608 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2986" + } + }, + "PIPETX7EQDEEMPH": { + "hide_name": 0, + "bits": [ 1830, 1831, 1832, 1833, 1834, 1835 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3074" + } + }, + "PIPETX7EQDONE": { + "hide_name": 0, + "bits": [ 2449 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3204" + } + }, + "PIPETX7EQPRESET": { + "hide_name": 0, + "bits": [ 1652, 1653, 1654, 1655 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3043" + } + }, + "PIPETX7POWERDOWN": { + "hide_name": 0, + "bits": [ 609, 610 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2987" + } + }, + "PIPETX7STARTBLOCK": { + "hide_name": 0, + "bits": [ 77 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2917" + } + }, + "PIPETX7SYNCHEADER": { + "hide_name": 0, + "bits": [ 611, 612 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2988" + } + }, + "PIPETXDEEMPH": { + "hide_name": 0, + "bits": [ 78 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2918" + } + }, + "PIPETXMARGIN": { + "hide_name": 0, + "bits": [ 1165, 1166, 1167 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3005" + } + }, + "PIPETXRATE": { + "hide_name": 0, + "bits": [ 613, 614 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2989" + } + }, + "PIPETXRCVRDET": { + "hide_name": 0, + "bits": [ 79 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2919" + } + }, + "PIPETXRESET": { + "hide_name": 0, + "bits": [ 80 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2920" + } + }, + "PIPETXSWING": { + "hide_name": 0, + "bits": [ 81 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2921" + } + }, + "PLDISABLESCRAMBLER": { + "hide_name": 0, + "bits": [ 2450 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3205" + } + }, + "PLEQINPROGRESS": { + "hide_name": 0, + "bits": [ 82 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2922" + } + }, + "PLEQPHASE": { + "hide_name": 0, + "bits": [ 615, 616 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2990" + } + }, + "PLEQRESETEIEOSCOUNT": { + "hide_name": 0, + "bits": [ 2451 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3206" + } + }, + "PLGEN3PCSDISABLE": { + "hide_name": 0, + "bits": [ 2452 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3207" + } + }, + "PLGEN3PCSRXSLIDE": { + "hide_name": 0, + "bits": [ 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3086" + } + }, + "PLGEN3PCSRXSYNCDONE": { + "hide_name": 0, + "bits": [ 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3308" + } + }, + "RECCLK": { + "hide_name": 0, + "bits": [ 2453 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3208" + } + }, + "RESETN": { + "hide_name": 0, + "bits": [ 2454 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3209" + } + }, + "SAXISCCTDATA": { + "hide_name": 0, + "bits": [ 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3262" + } + }, + "SAXISCCTKEEP": { + "hide_name": 0, + "bits": [ 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3309" + } + }, + "SAXISCCTLAST": { + "hide_name": 0, + "bits": [ 2455 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3210" + } + }, + "SAXISCCTREADY": { + "hide_name": 0, + "bits": [ 1656, 1657, 1658, 1659 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3044" + } + }, + "SAXISCCTUSER": { + "hide_name": 0, + "bits": [ 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3293" + } + }, + "SAXISCCTVALID": { + "hide_name": 0, + "bits": [ 2456 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3211" + } + }, + "SAXISRQTDATA": { + "hide_name": 0, + "bits": [ 3628, 3629, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3839, 3840, 3841, 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3849, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 3880, 3881, 3882, 3883 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3263" + } + }, + "SAXISRQTKEEP": { + "hide_name": 0, + "bits": [ 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3310" + } + }, + "SAXISRQTLAST": { + "hide_name": 0, + "bits": [ 2457 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3212" + } + }, + "SAXISRQTREADY": { + "hide_name": 0, + "bits": [ 1660, 1661, 1662, 1663 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3045" + } + }, + "SAXISRQTUSER": { + "hide_name": 0, + "bits": [ 4427, 4428, 4429, 4430, 4431, 4432, 4433, 4434, 4435, 4436, 4437, 4438, 4439, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 4465, 4466, 4467, 4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 4480, 4481, 4482, 4483, 4484, 4485, 4486 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3298" + } + }, + "SAXISRQTVALID": { + "hide_name": 0, + "bits": [ 2458 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3213" + } + }, + "USERCLK": { + "hide_name": 0, + "bits": [ 2459 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3214" + } + } + } + }, + "PHASER_IN": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4436" + }, + "ports": { + "FINEOVERFLOW": { + "direction": "output", + "bits": [ 2 ] + }, + "ICLK": { + "direction": "output", + "bits": [ 3 ] + }, + "ICLKDIV": { + "direction": "output", + "bits": [ 4 ] + }, + "ISERDESRST": { + "direction": "output", + "bits": [ 5 ] + }, + "RCLK": { + "direction": "output", + "bits": [ 6 ] + }, + "COUNTERREADVAL": { + "direction": "output", + "bits": [ 7, 8, 9, 10, 11, 12 ] + }, + "COUNTERLOADEN": { + "direction": "input", + "bits": [ 13 ] + }, + "COUNTERREADEN": { + "direction": "input", + "bits": [ 14 ] + }, + "DIVIDERST": { + "direction": "input", + "bits": [ 15 ] + }, + "EDGEADV": { + "direction": "input", + "bits": [ 16 ] + }, + "FINEENABLE": { + "direction": "input", + "bits": [ 17 ] + }, + "FINEINC": { + "direction": "input", + "bits": [ 18 ] + }, + "FREQREFCLK": { + "direction": "input", + "bits": [ 19 ] + }, + "MEMREFCLK": { + "direction": "input", + "bits": [ 20 ] + }, + "PHASEREFCLK": { + "direction": "input", + "bits": [ 21 ] + }, + "RST": { + "direction": "input", + "bits": [ 22 ] + }, + "SYNCIN": { + "direction": "input", + "bits": [ 23 ] + }, + "SYSCLK": { + "direction": "input", + "bits": [ 24 ] + }, + "RANKSEL": { + "direction": "input", + "bits": [ 25, 26 ] + }, + "COUNTERLOADVAL": { + "direction": "input", + "bits": [ 27, 28, 29, 30, 31, 32 ] + } + }, + "cells": { + }, + "netnames": { + "COUNTERLOADEN": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4455" + } + }, + "COUNTERLOADVAL": { + "hide_name": 0, + "bits": [ 27, 28, 29, 30, 31, 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4469" + } + }, + "COUNTERREADEN": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4456" + } + }, + "COUNTERREADVAL": { + "hide_name": 0, + "bits": [ 7, 8, 9, 10, 11, 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4454" + } + }, + "DIVIDERST": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4457" + } + }, + "EDGEADV": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4458" + } + }, + "FINEENABLE": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4459" + } + }, + "FINEINC": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4460" + } + }, + "FINEOVERFLOW": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4449" + } + }, + "FREQREFCLK": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4461" + } + }, + "ICLK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4450" + } + }, + "ICLKDIV": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4451" + } + }, + "ISERDESRST": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4452" + } + }, + "MEMREFCLK": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4462" + } + }, + "PHASEREFCLK": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4463" + } + }, + "RANKSEL": { + "hide_name": 0, + "bits": [ 25, 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4468" + } + }, + "RCLK": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4453" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "invertible_pin": "IS_RST_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4465" + } + }, + "SYNCIN": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4466" + } + }, + "SYSCLK": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4467" + } + } + } + }, + "PHASER_IN_PHY": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4472" + }, + "ports": { + "DQSFOUND": { + "direction": "output", + "bits": [ 2 ] + }, + "DQSOUTOFRANGE": { + "direction": "output", + "bits": [ 3 ] + }, + "FINEOVERFLOW": { + "direction": "output", + "bits": [ 4 ] + }, + "ICLK": { + "direction": "output", + "bits": [ 5 ] + }, + "ICLKDIV": { + "direction": "output", + "bits": [ 6 ] + }, + "ISERDESRST": { + "direction": "output", + "bits": [ 7 ] + }, + "PHASELOCKED": { + "direction": "output", + "bits": [ 8 ] + }, + "RCLK": { + "direction": "output", + "bits": [ 9 ] + }, + "WRENABLE": { + "direction": "output", + "bits": [ 10 ] + }, + "COUNTERREADVAL": { + "direction": "output", + "bits": [ 11, 12, 13, 14, 15, 16 ] + }, + "BURSTPENDINGPHY": { + "direction": "input", + "bits": [ 17 ] + }, + "COUNTERLOADEN": { + "direction": "input", + "bits": [ 18 ] + }, + "COUNTERREADEN": { + "direction": "input", + "bits": [ 19 ] + }, + "FINEENABLE": { + "direction": "input", + "bits": [ 20 ] + }, + "FINEINC": { + "direction": "input", + "bits": [ 21 ] + }, + "FREQREFCLK": { + "direction": "input", + "bits": [ 22 ] + }, + "MEMREFCLK": { + "direction": "input", + "bits": [ 23 ] + }, + "PHASEREFCLK": { + "direction": "input", + "bits": [ 24 ] + }, + "RST": { + "direction": "input", + "bits": [ 25 ] + }, + "RSTDQSFIND": { + "direction": "input", + "bits": [ 26 ] + }, + "SYNCIN": { + "direction": "input", + "bits": [ 27 ] + }, + "SYSCLK": { + "direction": "input", + "bits": [ 28 ] + }, + "ENCALIBPHY": { + "direction": "input", + "bits": [ 29, 30 ] + }, + "RANKSELPHY": { + "direction": "input", + "bits": [ 31, 32 ] + }, + "COUNTERLOADVAL": { + "direction": "input", + "bits": [ 33, 34, 35, 36, 37, 38 ] + } + }, + "cells": { + }, + "netnames": { + "BURSTPENDINGPHY": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4498" + } + }, + "COUNTERLOADEN": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4499" + } + }, + "COUNTERLOADVAL": { + "hide_name": 0, + "bits": [ 33, 34, 35, 36, 37, 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4513" + } + }, + "COUNTERREADEN": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4500" + } + }, + "COUNTERREADVAL": { + "hide_name": 0, + "bits": [ 11, 12, 13, 14, 15, 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4497" + } + }, + "DQSFOUND": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4488" + } + }, + "DQSOUTOFRANGE": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4489" + } + }, + "ENCALIBPHY": { + "hide_name": 0, + "bits": [ 29, 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4511" + } + }, + "FINEENABLE": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4501" + } + }, + "FINEINC": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4502" + } + }, + "FINEOVERFLOW": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4490" + } + }, + "FREQREFCLK": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4503" + } + }, + "ICLK": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4491" + } + }, + "ICLKDIV": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4492" + } + }, + "ISERDESRST": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4493" + } + }, + "MEMREFCLK": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4504" + } + }, + "PHASELOCKED": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4494" + } + }, + "PHASEREFCLK": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4505" + } + }, + "RANKSELPHY": { + "hide_name": 0, + "bits": [ 31, 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4512" + } + }, + "RCLK": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4495" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "invertible_pin": "IS_RST_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4507" + } + }, + "RSTDQSFIND": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4508" + } + }, + "SYNCIN": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4509" + } + }, + "SYSCLK": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4510" + } + }, + "WRENABLE": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4496" + } + } + } + }, + "PHASER_OUT": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4516" + }, + "ports": { + "COARSEOVERFLOW": { + "direction": "output", + "bits": [ 2 ] + }, + "FINEOVERFLOW": { + "direction": "output", + "bits": [ 3 ] + }, + "OCLK": { + "direction": "output", + "bits": [ 4 ] + }, + "OCLKDELAYED": { + "direction": "output", + "bits": [ 5 ] + }, + "OCLKDIV": { + "direction": "output", + "bits": [ 6 ] + }, + "OSERDESRST": { + "direction": "output", + "bits": [ 7 ] + }, + "COUNTERREADVAL": { + "direction": "output", + "bits": [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ] + }, + "COARSEENABLE": { + "direction": "input", + "bits": [ 17 ] + }, + "COARSEINC": { + "direction": "input", + "bits": [ 18 ] + }, + "COUNTERLOADEN": { + "direction": "input", + "bits": [ 19 ] + }, + "COUNTERREADEN": { + "direction": "input", + "bits": [ 20 ] + }, + "DIVIDERST": { + "direction": "input", + "bits": [ 21 ] + }, + "EDGEADV": { + "direction": "input", + "bits": [ 22 ] + }, + "FINEENABLE": { + "direction": "input", + "bits": [ 23 ] + }, + "FINEINC": { + "direction": "input", + "bits": [ 24 ] + }, + "FREQREFCLK": { + "direction": "input", + "bits": [ 25 ] + }, + "MEMREFCLK": { + "direction": "input", + "bits": [ 26 ] + }, + "PHASEREFCLK": { + "direction": "input", + "bits": [ 27 ] + }, + "RST": { + "direction": "input", + "bits": [ 28 ] + }, + "SELFINEOCLKDELAY": { + "direction": "input", + "bits": [ 29 ] + }, + "SYNCIN": { + "direction": "input", + "bits": [ 30 ] + }, + "SYSCLK": { + "direction": "input", + "bits": [ 31 ] + }, + "COUNTERLOADVAL": { + "direction": "input", + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40 ] + } + }, + "cells": { + }, + "netnames": { + "COARSEENABLE": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4538" + } + }, + "COARSEINC": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4539" + } + }, + "COARSEOVERFLOW": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4531" + } + }, + "COUNTERLOADEN": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4540" + } + }, + "COUNTERLOADVAL": { + "hide_name": 0, + "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4554" + } + }, + "COUNTERREADEN": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4541" + } + }, + "COUNTERREADVAL": { + "hide_name": 0, + "bits": [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4537" + } + }, + "DIVIDERST": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4542" + } + }, + "EDGEADV": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4543" + } + }, + "FINEENABLE": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4544" + } + }, + "FINEINC": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4545" + } + }, + "FINEOVERFLOW": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4532" + } + }, + "FREQREFCLK": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4546" + } + }, + "MEMREFCLK": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4547" + } + }, + "OCLK": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4533" + } + }, + "OCLKDELAYED": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4534" + } + }, + "OCLKDIV": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4535" + } + }, + "OSERDESRST": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4536" + } + }, + "PHASEREFCLK": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4548" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "invertible_pin": "IS_RST_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4550" + } + }, + "SELFINEOCLKDELAY": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4551" + } + }, + "SYNCIN": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4552" + } + }, + "SYSCLK": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4553" + } + } + } + }, + "PHASER_OUT_PHY": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4557" + }, + "ports": { + "COARSEOVERFLOW": { + "direction": "output", + "bits": [ 2 ] + }, + "FINEOVERFLOW": { + "direction": "output", + "bits": [ 3 ] + }, + "OCLK": { + "direction": "output", + "bits": [ 4 ] + }, + "OCLKDELAYED": { + "direction": "output", + "bits": [ 5 ] + }, + "OCLKDIV": { + "direction": "output", + "bits": [ 6 ] + }, + "OSERDESRST": { + "direction": "output", + "bits": [ 7 ] + }, + "RDENABLE": { + "direction": "output", + "bits": [ 8 ] + }, + "CTSBUS": { + "direction": "output", + "bits": [ 9, 10 ] + }, + "DQSBUS": { + "direction": "output", + "bits": [ 11, 12 ] + }, + "DTSBUS": { + "direction": "output", + "bits": [ 13, 14 ] + }, + "COUNTERREADVAL": { + "direction": "output", + "bits": [ 15, 16, 17, 18, 19, 20, 21, 22, 23 ] + }, + "BURSTPENDINGPHY": { + "direction": "input", + "bits": [ 24 ] + }, + "COARSEENABLE": { + "direction": "input", + "bits": [ 25 ] + }, + "COARSEINC": { + "direction": "input", + "bits": [ 26 ] + }, + "COUNTERLOADEN": { + "direction": "input", + "bits": [ 27 ] + }, + "COUNTERREADEN": { + "direction": "input", + "bits": [ 28 ] + }, + "FINEENABLE": { + "direction": "input", + "bits": [ 29 ] + }, + "FINEINC": { + "direction": "input", + "bits": [ 30 ] + }, + "FREQREFCLK": { + "direction": "input", + "bits": [ 31 ] + }, + "MEMREFCLK": { + "direction": "input", + "bits": [ 32 ] + }, + "PHASEREFCLK": { + "direction": "input", + "bits": [ 33 ] + }, + "RST": { + "direction": "input", + "bits": [ 34 ] + }, + "SELFINEOCLKDELAY": { + "direction": "input", + "bits": [ 35 ] + }, + "SYNCIN": { + "direction": "input", + "bits": [ 36 ] + }, + "SYSCLK": { + "direction": "input", + "bits": [ 37 ] + }, + "ENCALIBPHY": { + "direction": "input", + "bits": [ 38, 39 ] + }, + "COUNTERLOADVAL": { + "direction": "input", + "bits": [ 40, 41, 42, 43, 44, 45, 46, 47, 48 ] + } + }, + "cells": { + }, + "netnames": { + "BURSTPENDINGPHY": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4584" + } + }, + "COARSEENABLE": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4585" + } + }, + "COARSEINC": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4586" + } + }, + "COARSEOVERFLOW": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4573" + } + }, + "COUNTERLOADEN": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4587" + } + }, + "COUNTERLOADVAL": { + "hide_name": 0, + "bits": [ 40, 41, 42, 43, 44, 45, 46, 47, 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4600" + } + }, + "COUNTERREADEN": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4588" + } + }, + "COUNTERREADVAL": { + "hide_name": 0, + "bits": [ 15, 16, 17, 18, 19, 20, 21, 22, 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4583" + } + }, + "CTSBUS": { + "hide_name": 0, + "bits": [ 9, 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4580" + } + }, + "DQSBUS": { + "hide_name": 0, + "bits": [ 11, 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4581" + } + }, + "DTSBUS": { + "hide_name": 0, + "bits": [ 13, 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4582" + } + }, + "ENCALIBPHY": { + "hide_name": 0, + "bits": [ 38, 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4599" + } + }, + "FINEENABLE": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4589" + } + }, + "FINEINC": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4590" + } + }, + "FINEOVERFLOW": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4574" + } + }, + "FREQREFCLK": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4591" + } + }, + "MEMREFCLK": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4592" + } + }, + "OCLK": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4575" + } + }, + "OCLKDELAYED": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4576" + } + }, + "OCLKDIV": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4577" + } + }, + "OSERDESRST": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4578" + } + }, + "PHASEREFCLK": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4593" + } + }, + "RDENABLE": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4579" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "invertible_pin": "IS_RST_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4595" + } + }, + "SELFINEOCLKDELAY": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4596" + } + }, + "SYNCIN": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4597" + } + }, + "SYSCLK": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4598" + } + } + } + }, + "PHASER_REF": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4603" + }, + "ports": { + "LOCKED": { + "direction": "output", + "bits": [ 2 ] + }, + "CLKIN": { + "direction": "input", + "bits": [ 3 ] + }, + "PWRDWN": { + "direction": "input", + "bits": [ 4 ] + }, + "RST": { + "direction": "input", + "bits": [ 5 ] + } + }, + "cells": { + }, + "netnames": { + "CLKIN": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4607" + } + }, + "LOCKED": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4606" + } + }, + "PWRDWN": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "invertible_pin": "IS_PWRDWN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4609" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_RST_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4611" + } + } + } + }, + "PHY_CONTROL": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4614" + }, + "ports": { + "PHYCTLALMOSTFULL": { + "direction": "output", + "bits": [ 2 ] + }, + "PHYCTLEMPTY": { + "direction": "output", + "bits": [ 3 ] + }, + "PHYCTLFULL": { + "direction": "output", + "bits": [ 4 ] + }, + "PHYCTLREADY": { + "direction": "output", + "bits": [ 5 ] + }, + "INRANKA": { + "direction": "output", + "bits": [ 6, 7 ] + }, + "INRANKB": { + "direction": "output", + "bits": [ 8, 9 ] + }, + "INRANKC": { + "direction": "output", + "bits": [ 10, 11 ] + }, + "INRANKD": { + "direction": "output", + "bits": [ 12, 13 ] + }, + "PCENABLECALIB": { + "direction": "output", + "bits": [ 14, 15 ] + }, + "AUXOUTPUT": { + "direction": "output", + "bits": [ 16, 17, 18, 19 ] + }, + "INBURSTPENDING": { + "direction": "output", + "bits": [ 20, 21, 22, 23 ] + }, + "OUTBURSTPENDING": { + "direction": "output", + "bits": [ 24, 25, 26, 27 ] + }, + "MEMREFCLK": { + "direction": "input", + "bits": [ 28 ] + }, + "PHYCLK": { + "direction": "input", + "bits": [ 29 ] + }, + "PHYCTLMSTREMPTY": { + "direction": "input", + "bits": [ 30 ] + }, + "PHYCTLWRENABLE": { + "direction": "input", + "bits": [ 31 ] + }, + "PLLLOCK": { + "direction": "input", + "bits": [ 32 ] + }, + "READCALIBENABLE": { + "direction": "input", + "bits": [ 33 ] + }, + "REFDLLLOCK": { + "direction": "input", + "bits": [ 34 ] + }, + "RESET": { + "direction": "input", + "bits": [ 35 ] + }, + "SYNCIN": { + "direction": "input", + "bits": [ 36 ] + }, + "WRITECALIBENABLE": { + "direction": "input", + "bits": [ 37 ] + }, + "PHYCTLWD": { + "direction": "input", + "bits": [ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69 ] + } + }, + "cells": { + }, + "netnames": { + "AUXOUTPUT": { + "hide_name": 0, + "bits": [ 16, 17, 18, 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4658" + } + }, + "INBURSTPENDING": { + "hide_name": 0, + "bits": [ 20, 21, 22, 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4659" + } + }, + "INRANKA": { + "hide_name": 0, + "bits": [ 6, 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4653" + } + }, + "INRANKB": { + "hide_name": 0, + "bits": [ 8, 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4654" + } + }, + "INRANKC": { + "hide_name": 0, + "bits": [ 10, 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4655" + } + }, + "INRANKD": { + "hide_name": 0, + "bits": [ 12, 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4656" + } + }, + "MEMREFCLK": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4661" + } + }, + "OUTBURSTPENDING": { + "hide_name": 0, + "bits": [ 24, 25, 26, 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4660" + } + }, + "PCENABLECALIB": { + "hide_name": 0, + "bits": [ 14, 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4657" + } + }, + "PHYCLK": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4662" + } + }, + "PHYCTLALMOSTFULL": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4649" + } + }, + "PHYCTLEMPTY": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4650" + } + }, + "PHYCTLFULL": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4651" + } + }, + "PHYCTLMSTREMPTY": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4663" + } + }, + "PHYCTLREADY": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4652" + } + }, + "PHYCTLWD": { + "hide_name": 0, + "bits": [ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4671" + } + }, + "PHYCTLWRENABLE": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4664" + } + }, + "PLLLOCK": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4665" + } + }, + "READCALIBENABLE": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4666" + } + }, + "REFDLLLOCK": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4667" + } + }, + "RESET": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4668" + } + }, + "SYNCIN": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4669" + } + }, + "WRITECALIBENABLE": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4670" + } + } + } + }, + "PLLE2_ADV": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3609" + }, + "ports": { + "CLKFBOUT": { + "direction": "output", + "bits": [ 2 ] + }, + "CLKOUT0": { + "direction": "output", + "bits": [ 3 ] + }, + "CLKOUT1": { + "direction": "output", + "bits": [ 4 ] + }, + "CLKOUT2": { + "direction": "output", + "bits": [ 5 ] + }, + "CLKOUT3": { + "direction": "output", + "bits": [ 6 ] + }, + "CLKOUT4": { + "direction": "output", + "bits": [ 7 ] + }, + "CLKOUT5": { + "direction": "output", + "bits": [ 8 ] + }, + "DRDY": { + "direction": "output", + "bits": [ 9 ] + }, + "LOCKED": { + "direction": "output", + "bits": [ 10 ] + }, + "DO": { + "direction": "output", + "bits": [ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ] + }, + "CLKFBIN": { + "direction": "input", + "bits": [ 27 ] + }, + "CLKIN1": { + "direction": "input", + "bits": [ 28 ] + }, + "CLKIN2": { + "direction": "input", + "bits": [ 29 ] + }, + "CLKINSEL": { + "direction": "input", + "bits": [ 30 ] + }, + "DCLK": { + "direction": "input", + "bits": [ 31 ] + }, + "DEN": { + "direction": "input", + "bits": [ 32 ] + }, + "DWE": { + "direction": "input", + "bits": [ 33 ] + }, + "PWRDWN": { + "direction": "input", + "bits": [ 34 ] + }, + "RST": { + "direction": "input", + "bits": [ 35 ] + }, + "DI": { + "direction": "input", + "bits": [ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 ] + }, + "DADDR": { + "direction": "input", + "bits": [ 52, 53, 54, 55, 56, 57, 58 ] + } + }, + "cells": { + }, + "netnames": { + "CLKFBIN": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3657" + } + }, + "CLKFBOUT": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3647" + } + }, + "CLKIN1": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3658" + } + }, + "CLKIN2": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3659" + } + }, + "CLKINSEL": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "invertible_pin": "IS_CLKINSEL_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3661" + } + }, + "CLKOUT0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3648" + } + }, + "CLKOUT1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3649" + } + }, + "CLKOUT2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3650" + } + }, + "CLKOUT3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3651" + } + }, + "CLKOUT4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3652" + } + }, + "CLKOUT5": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3653" + } + }, + "DADDR": { + "hide_name": 0, + "bits": [ 52, 53, 54, 55, 56, 57, 58 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3670" + } + }, + "DCLK": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3662" + } + }, + "DEN": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3663" + } + }, + "DI": { + "hide_name": 0, + "bits": [ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3669" + } + }, + "DO": { + "hide_name": 0, + "bits": [ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3656" + } + }, + "DRDY": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3654" + } + }, + "DWE": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3664" + } + }, + "LOCKED": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3655" + } + }, + "PWRDWN": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "invertible_pin": "IS_PWRDWN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3666" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "invertible_pin": "IS_RST_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3668" + } + } + } + }, + "PLLE2_BASE": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3673" + }, + "ports": { + "CLKFBOUT": { + "direction": "output", + "bits": [ 2 ] + }, + "CLKOUT0": { + "direction": "output", + "bits": [ 3 ] + }, + "CLKOUT1": { + "direction": "output", + "bits": [ 4 ] + }, + "CLKOUT2": { + "direction": "output", + "bits": [ 5 ] + }, + "CLKOUT3": { + "direction": "output", + "bits": [ 6 ] + }, + "CLKOUT4": { + "direction": "output", + "bits": [ 7 ] + }, + "CLKOUT5": { + "direction": "output", + "bits": [ 8 ] + }, + "LOCKED": { + "direction": "output", + "bits": [ 9 ] + }, + "CLKFBIN": { + "direction": "input", + "bits": [ 10 ] + }, + "CLKIN1": { + "direction": "input", + "bits": [ 11 ] + }, + "PWRDWN": { + "direction": "input", + "bits": [ 12 ] + }, + "RST": { + "direction": "input", + "bits": [ 13 ] + } + }, + "cells": { + }, + "netnames": { + "CLKFBIN": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3707" + } + }, + "CLKFBOUT": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3699" + } + }, + "CLKIN1": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3708" + } + }, + "CLKOUT0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3700" + } + }, + "CLKOUT1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3701" + } + }, + "CLKOUT2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3702" + } + }, + "CLKOUT3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3703" + } + }, + "CLKOUT4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3704" + } + }, + "CLKOUT5": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3705" + } + }, + "LOCKED": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3706" + } + }, + "PWRDWN": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3709" + } + }, + "RST": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3710" + } + } + } + }, + "PS7": { + "attributes": { + "blackbox": 1, + "keep": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5095" + }, + "ports": { + "DMA0DAVALID": { + "direction": "output", + "bits": [ 2 ] + }, + "DMA0DRREADY": { + "direction": "output", + "bits": [ 3 ] + }, + "DMA0RSTN": { + "direction": "output", + "bits": [ 4 ] + }, + "DMA1DAVALID": { + "direction": "output", + "bits": [ 5 ] + }, + "DMA1DRREADY": { + "direction": "output", + "bits": [ 6 ] + }, + "DMA1RSTN": { + "direction": "output", + "bits": [ 7 ] + }, + "DMA2DAVALID": { + "direction": "output", + "bits": [ 8 ] + }, + "DMA2DRREADY": { + "direction": "output", + "bits": [ 9 ] + }, + "DMA2RSTN": { + "direction": "output", + "bits": [ 10 ] + }, + "DMA3DAVALID": { + "direction": "output", + "bits": [ 11 ] + }, + "DMA3DRREADY": { + "direction": "output", + "bits": [ 12 ] + }, + "DMA3RSTN": { + "direction": "output", + "bits": [ 13 ] + }, + "EMIOCAN0PHYTX": { + "direction": "output", + "bits": [ 14 ] + }, + "EMIOCAN1PHYTX": { + "direction": "output", + "bits": [ 15 ] + }, + "EMIOENET0GMIITXEN": { + "direction": "output", + "bits": [ 16 ] + }, + "EMIOENET0GMIITXER": { + "direction": "output", + "bits": [ 17 ] + }, + "EMIOENET0MDIOMDC": { + "direction": "output", + "bits": [ 18 ] + }, + "EMIOENET0MDIOO": { + "direction": "output", + "bits": [ 19 ] + }, + "EMIOENET0MDIOTN": { + "direction": "output", + "bits": [ 20 ] + }, + "EMIOENET0PTPDELAYREQRX": { + "direction": "output", + "bits": [ 21 ] + }, + "EMIOENET0PTPDELAYREQTX": { + "direction": "output", + "bits": [ 22 ] + }, + "EMIOENET0PTPPDELAYREQRX": { + "direction": "output", + "bits": [ 23 ] + }, + "EMIOENET0PTPPDELAYREQTX": { + "direction": "output", + "bits": [ 24 ] + }, + "EMIOENET0PTPPDELAYRESPRX": { + "direction": "output", + "bits": [ 25 ] + }, + "EMIOENET0PTPPDELAYRESPTX": { + "direction": "output", + "bits": [ 26 ] + }, + "EMIOENET0PTPSYNCFRAMERX": { + "direction": "output", + "bits": [ 27 ] + }, + "EMIOENET0PTPSYNCFRAMETX": { + "direction": "output", + "bits": [ 28 ] + }, + "EMIOENET0SOFRX": { + "direction": "output", + "bits": [ 29 ] + }, + "EMIOENET0SOFTX": { + "direction": "output", + "bits": [ 30 ] + }, + "EMIOENET1GMIITXEN": { + "direction": "output", + "bits": [ 31 ] + }, + "EMIOENET1GMIITXER": { + "direction": "output", + "bits": [ 32 ] + }, + "EMIOENET1MDIOMDC": { + "direction": "output", + "bits": [ 33 ] + }, + "EMIOENET1MDIOO": { + "direction": "output", + "bits": [ 34 ] + }, + "EMIOENET1MDIOTN": { + "direction": "output", + "bits": [ 35 ] + }, + "EMIOENET1PTPDELAYREQRX": { + "direction": "output", + "bits": [ 36 ] + }, + "EMIOENET1PTPDELAYREQTX": { + "direction": "output", + "bits": [ 37 ] + }, + "EMIOENET1PTPPDELAYREQRX": { + "direction": "output", + "bits": [ 38 ] + }, + "EMIOENET1PTPPDELAYREQTX": { + "direction": "output", + "bits": [ 39 ] + }, + "EMIOENET1PTPPDELAYRESPRX": { + "direction": "output", + "bits": [ 40 ] + }, + "EMIOENET1PTPPDELAYRESPTX": { + "direction": "output", + "bits": [ 41 ] + }, + "EMIOENET1PTPSYNCFRAMERX": { + "direction": "output", + "bits": [ 42 ] + }, + "EMIOENET1PTPSYNCFRAMETX": { + "direction": "output", + "bits": [ 43 ] + }, + "EMIOENET1SOFRX": { + "direction": "output", + "bits": [ 44 ] + }, + "EMIOENET1SOFTX": { + "direction": "output", + "bits": [ 45 ] + }, + "EMIOI2C0SCLO": { + "direction": "output", + "bits": [ 46 ] + }, + "EMIOI2C0SCLTN": { + "direction": "output", + "bits": [ 47 ] + }, + "EMIOI2C0SDAO": { + "direction": "output", + "bits": [ 48 ] + }, + "EMIOI2C0SDATN": { + "direction": "output", + "bits": [ 49 ] + }, + "EMIOI2C1SCLO": { + "direction": "output", + "bits": [ 50 ] + }, + "EMIOI2C1SCLTN": { + "direction": "output", + "bits": [ 51 ] + }, + "EMIOI2C1SDAO": { + "direction": "output", + "bits": [ 52 ] + }, + "EMIOI2C1SDATN": { + "direction": "output", + "bits": [ 53 ] + }, + "EMIOPJTAGTDO": { + "direction": "output", + "bits": [ 54 ] + }, + "EMIOPJTAGTDTN": { + "direction": "output", + "bits": [ 55 ] + }, + "EMIOSDIO0BUSPOW": { + "direction": "output", + "bits": [ 56 ] + }, + "EMIOSDIO0CLK": { + "direction": "output", + "bits": [ 57 ] + }, + "EMIOSDIO0CMDO": { + "direction": "output", + "bits": [ 58 ] + }, + "EMIOSDIO0CMDTN": { + "direction": "output", + "bits": [ 59 ] + }, + "EMIOSDIO0LED": { + "direction": "output", + "bits": [ 60 ] + }, + "EMIOSDIO1BUSPOW": { + "direction": "output", + "bits": [ 61 ] + }, + "EMIOSDIO1CLK": { + "direction": "output", + "bits": [ 62 ] + }, + "EMIOSDIO1CMDO": { + "direction": "output", + "bits": [ 63 ] + }, + "EMIOSDIO1CMDTN": { + "direction": "output", + "bits": [ 64 ] + }, + "EMIOSDIO1LED": { + "direction": "output", + "bits": [ 65 ] + }, + "EMIOSPI0MO": { + "direction": "output", + "bits": [ 66 ] + }, + "EMIOSPI0MOTN": { + "direction": "output", + "bits": [ 67 ] + }, + "EMIOSPI0SCLKO": { + "direction": "output", + "bits": [ 68 ] + }, + "EMIOSPI0SCLKTN": { + "direction": "output", + "bits": [ 69 ] + }, + "EMIOSPI0SO": { + "direction": "output", + "bits": [ 70 ] + }, + "EMIOSPI0SSNTN": { + "direction": "output", + "bits": [ 71 ] + }, + "EMIOSPI0STN": { + "direction": "output", + "bits": [ 72 ] + }, + "EMIOSPI1MO": { + "direction": "output", + "bits": [ 73 ] + }, + "EMIOSPI1MOTN": { + "direction": "output", + "bits": [ 74 ] + }, + "EMIOSPI1SCLKO": { + "direction": "output", + "bits": [ 75 ] + }, + "EMIOSPI1SCLKTN": { + "direction": "output", + "bits": [ 76 ] + }, + "EMIOSPI1SO": { + "direction": "output", + "bits": [ 77 ] + }, + "EMIOSPI1SSNTN": { + "direction": "output", + "bits": [ 78 ] + }, + "EMIOSPI1STN": { + "direction": "output", + "bits": [ 79 ] + }, + "EMIOTRACECTL": { + "direction": "output", + "bits": [ 80 ] + }, + "EMIOUART0DTRN": { + "direction": "output", + "bits": [ 81 ] + }, + "EMIOUART0RTSN": { + "direction": "output", + "bits": [ 82 ] + }, + "EMIOUART0TX": { + "direction": "output", + "bits": [ 83 ] + }, + "EMIOUART1DTRN": { + "direction": "output", + "bits": [ 84 ] + }, + "EMIOUART1RTSN": { + "direction": "output", + "bits": [ 85 ] + }, + "EMIOUART1TX": { + "direction": "output", + "bits": [ 86 ] + }, + "EMIOUSB0VBUSPWRSELECT": { + "direction": "output", + "bits": [ 87 ] + }, + "EMIOUSB1VBUSPWRSELECT": { + "direction": "output", + "bits": [ 88 ] + }, + "EMIOWDTRSTO": { + "direction": "output", + "bits": [ 89 ] + }, + "EVENTEVENTO": { + "direction": "output", + "bits": [ 90 ] + }, + "MAXIGP0ARESETN": { + "direction": "output", + "bits": [ 91 ] + }, + "MAXIGP0ARVALID": { + "direction": "output", + "bits": [ 92 ] + }, + "MAXIGP0AWVALID": { + "direction": "output", + "bits": [ 93 ] + }, + "MAXIGP0BREADY": { + "direction": "output", + "bits": [ 94 ] + }, + "MAXIGP0RREADY": { + "direction": "output", + "bits": [ 95 ] + }, + "MAXIGP0WLAST": { + "direction": "output", + "bits": [ 96 ] + }, + "MAXIGP0WVALID": { + "direction": "output", + "bits": [ 97 ] + }, + "MAXIGP1ARESETN": { + "direction": "output", + "bits": [ 98 ] + }, + "MAXIGP1ARVALID": { + "direction": "output", + "bits": [ 99 ] + }, + "MAXIGP1AWVALID": { + "direction": "output", + "bits": [ 100 ] + }, + "MAXIGP1BREADY": { + "direction": "output", + "bits": [ 101 ] + }, + "MAXIGP1RREADY": { + "direction": "output", + "bits": [ 102 ] + }, + "MAXIGP1WLAST": { + "direction": "output", + "bits": [ 103 ] + }, + "MAXIGP1WVALID": { + "direction": "output", + "bits": [ 104 ] + }, + "SAXIACPARESETN": { + "direction": "output", + "bits": [ 105 ] + }, + "SAXIACPARREADY": { + "direction": "output", + "bits": [ 106 ] + }, + "SAXIACPAWREADY": { + "direction": "output", + "bits": [ 107 ] + }, + "SAXIACPBVALID": { + "direction": "output", + "bits": [ 108 ] + }, + "SAXIACPRLAST": { + "direction": "output", + "bits": [ 109 ] + }, + "SAXIACPRVALID": { + "direction": "output", + "bits": [ 110 ] + }, + "SAXIACPWREADY": { + "direction": "output", + "bits": [ 111 ] + }, + "SAXIGP0ARESETN": { + "direction": "output", + "bits": [ 112 ] + }, + "SAXIGP0ARREADY": { + "direction": "output", + "bits": [ 113 ] + }, + "SAXIGP0AWREADY": { + "direction": "output", + "bits": [ 114 ] + }, + "SAXIGP0BVALID": { + "direction": "output", + "bits": [ 115 ] + }, + "SAXIGP0RLAST": { + "direction": "output", + "bits": [ 116 ] + }, + "SAXIGP0RVALID": { + "direction": "output", + "bits": [ 117 ] + }, + "SAXIGP0WREADY": { + "direction": "output", + "bits": [ 118 ] + }, + "SAXIGP1ARESETN": { + "direction": "output", + "bits": [ 119 ] + }, + "SAXIGP1ARREADY": { + "direction": "output", + "bits": [ 120 ] + }, + "SAXIGP1AWREADY": { + "direction": "output", + "bits": [ 121 ] + }, + "SAXIGP1BVALID": { + "direction": "output", + "bits": [ 122 ] + }, + "SAXIGP1RLAST": { + "direction": "output", + "bits": [ 123 ] + }, + "SAXIGP1RVALID": { + "direction": "output", + "bits": [ 124 ] + }, + "SAXIGP1WREADY": { + "direction": "output", + "bits": [ 125 ] + }, + "SAXIHP0ARESETN": { + "direction": "output", + "bits": [ 126 ] + }, + "SAXIHP0ARREADY": { + "direction": "output", + "bits": [ 127 ] + }, + "SAXIHP0AWREADY": { + "direction": "output", + "bits": [ 128 ] + }, + "SAXIHP0BVALID": { + "direction": "output", + "bits": [ 129 ] + }, + "SAXIHP0RLAST": { + "direction": "output", + "bits": [ 130 ] + }, + "SAXIHP0RVALID": { + "direction": "output", + "bits": [ 131 ] + }, + "SAXIHP0WREADY": { + "direction": "output", + "bits": [ 132 ] + }, + "SAXIHP1ARESETN": { + "direction": "output", + "bits": [ 133 ] + }, + "SAXIHP1ARREADY": { + "direction": "output", + "bits": [ 134 ] + }, + "SAXIHP1AWREADY": { + "direction": "output", + "bits": [ 135 ] + }, + "SAXIHP1BVALID": { + "direction": "output", + "bits": [ 136 ] + }, + "SAXIHP1RLAST": { + "direction": "output", + "bits": [ 137 ] + }, + "SAXIHP1RVALID": { + "direction": "output", + "bits": [ 138 ] + }, + "SAXIHP1WREADY": { + "direction": "output", + "bits": [ 139 ] + }, + "SAXIHP2ARESETN": { + "direction": "output", + "bits": [ 140 ] + }, + "SAXIHP2ARREADY": { + "direction": "output", + "bits": [ 141 ] + }, + "SAXIHP2AWREADY": { + "direction": "output", + "bits": [ 142 ] + }, + "SAXIHP2BVALID": { + "direction": "output", + "bits": [ 143 ] + }, + "SAXIHP2RLAST": { + "direction": "output", + "bits": [ 144 ] + }, + "SAXIHP2RVALID": { + "direction": "output", + "bits": [ 145 ] + }, + "SAXIHP2WREADY": { + "direction": "output", + "bits": [ 146 ] + }, + "SAXIHP3ARESETN": { + "direction": "output", + "bits": [ 147 ] + }, + "SAXIHP3ARREADY": { + "direction": "output", + "bits": [ 148 ] + }, + "SAXIHP3AWREADY": { + "direction": "output", + "bits": [ 149 ] + }, + "SAXIHP3BVALID": { + "direction": "output", + "bits": [ 150 ] + }, + "SAXIHP3RLAST": { + "direction": "output", + "bits": [ 151 ] + }, + "SAXIHP3RVALID": { + "direction": "output", + "bits": [ 152 ] + }, + "SAXIHP3WREADY": { + "direction": "output", + "bits": [ 153 ] + }, + "MAXIGP0ARID": { + "direction": "output", + "bits": [ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165 ] + }, + "MAXIGP0AWID": { + "direction": "output", + "bits": [ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177 ] + }, + "MAXIGP0WID": { + "direction": "output", + "bits": [ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189 ] + }, + "MAXIGP1ARID": { + "direction": "output", + "bits": [ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201 ] + }, + "MAXIGP1AWID": { + "direction": "output", + "bits": [ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213 ] + }, + "MAXIGP1WID": { + "direction": "output", + "bits": [ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225 ] + }, + "DMA0DATYPE": { + "direction": "output", + "bits": [ 226, 227 ] + }, + "DMA1DATYPE": { + "direction": "output", + "bits": [ 228, 229 ] + }, + "DMA2DATYPE": { + "direction": "output", + "bits": [ 230, 231 ] + }, + "DMA3DATYPE": { + "direction": "output", + "bits": [ 232, 233 ] + }, + "EMIOUSB0PORTINDCTL": { + "direction": "output", + "bits": [ 234, 235 ] + }, + "EMIOUSB1PORTINDCTL": { + "direction": "output", + "bits": [ 236, 237 ] + }, + "EVENTSTANDBYWFE": { + "direction": "output", + "bits": [ 238, 239 ] + }, + "EVENTSTANDBYWFI": { + "direction": "output", + "bits": [ 240, 241 ] + }, + "MAXIGP0ARBURST": { + "direction": "output", + "bits": [ 242, 243 ] + }, + "MAXIGP0ARLOCK": { + "direction": "output", + "bits": [ 244, 245 ] + }, + "MAXIGP0ARSIZE": { + "direction": "output", + "bits": [ 246, 247 ] + }, + "MAXIGP0AWBURST": { + "direction": "output", + "bits": [ 248, 249 ] + }, + "MAXIGP0AWLOCK": { + "direction": "output", + "bits": [ 250, 251 ] + }, + "MAXIGP0AWSIZE": { + "direction": "output", + "bits": [ 252, 253 ] + }, + "MAXIGP1ARBURST": { + "direction": "output", + "bits": [ 254, 255 ] + }, + "MAXIGP1ARLOCK": { + "direction": "output", + "bits": [ 256, 257 ] + }, + "MAXIGP1ARSIZE": { + "direction": "output", + "bits": [ 258, 259 ] + }, + "MAXIGP1AWBURST": { + "direction": "output", + "bits": [ 260, 261 ] + }, + "MAXIGP1AWLOCK": { + "direction": "output", + "bits": [ 262, 263 ] + }, + "MAXIGP1AWSIZE": { + "direction": "output", + "bits": [ 264, 265 ] + }, + "SAXIACPBRESP": { + "direction": "output", + "bits": [ 266, 267 ] + }, + "SAXIACPRRESP": { + "direction": "output", + "bits": [ 268, 269 ] + }, + "SAXIGP0BRESP": { + "direction": "output", + "bits": [ 270, 271 ] + }, + "SAXIGP0RRESP": { + "direction": "output", + "bits": [ 272, 273 ] + }, + "SAXIGP1BRESP": { + "direction": "output", + "bits": [ 274, 275 ] + }, + "SAXIGP1RRESP": { + "direction": "output", + "bits": [ 276, 277 ] + }, + "SAXIHP0BRESP": { + "direction": "output", + "bits": [ 278, 279 ] + }, + "SAXIHP0RRESP": { + "direction": "output", + "bits": [ 280, 281 ] + }, + "SAXIHP1BRESP": { + "direction": "output", + "bits": [ 282, 283 ] + }, + "SAXIHP1RRESP": { + "direction": "output", + "bits": [ 284, 285 ] + }, + "SAXIHP2BRESP": { + "direction": "output", + "bits": [ 286, 287 ] + }, + "SAXIHP2RRESP": { + "direction": "output", + "bits": [ 288, 289 ] + }, + "SAXIHP3BRESP": { + "direction": "output", + "bits": [ 290, 291 ] + }, + "SAXIHP3RRESP": { + "direction": "output", + "bits": [ 292, 293 ] + }, + "IRQP2F": { + "direction": "output", + "bits": [ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322 ] + }, + "EMIOSDIO0BUSVOLT": { + "direction": "output", + "bits": [ 323, 324, 325 ] + }, + "EMIOSDIO1BUSVOLT": { + "direction": "output", + "bits": [ 326, 327, 328 ] + }, + "EMIOSPI0SSON": { + "direction": "output", + "bits": [ 329, 330, 331 ] + }, + "EMIOSPI1SSON": { + "direction": "output", + "bits": [ 332, 333, 334 ] + }, + "EMIOTTC0WAVEO": { + "direction": "output", + "bits": [ 335, 336, 337 ] + }, + "EMIOTTC1WAVEO": { + "direction": "output", + "bits": [ 338, 339, 340 ] + }, + "MAXIGP0ARPROT": { + "direction": "output", + "bits": [ 341, 342, 343 ] + }, + "MAXIGP0AWPROT": { + "direction": "output", + "bits": [ 344, 345, 346 ] + }, + "MAXIGP1ARPROT": { + "direction": "output", + "bits": [ 347, 348, 349 ] + }, + "MAXIGP1AWPROT": { + "direction": "output", + "bits": [ 350, 351, 352 ] + }, + "SAXIACPBID": { + "direction": "output", + "bits": [ 353, 354, 355 ] + }, + "SAXIACPRID": { + "direction": "output", + "bits": [ 356, 357, 358 ] + }, + "SAXIHP0RACOUNT": { + "direction": "output", + "bits": [ 359, 360, 361 ] + }, + "SAXIHP1RACOUNT": { + "direction": "output", + "bits": [ 362, 363, 364 ] + }, + "SAXIHP2RACOUNT": { + "direction": "output", + "bits": [ 365, 366, 367 ] + }, + "SAXIHP3RACOUNT": { + "direction": "output", + "bits": [ 368, 369, 370 ] + }, + "EMIOTRACEDATA": { + "direction": "output", + "bits": [ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402 ] + }, + "FTMTP2FDEBUG": { + "direction": "output", + "bits": [ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434 ] + }, + "MAXIGP0ARADDR": { + "direction": "output", + "bits": [ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466 ] + }, + "MAXIGP0AWADDR": { + "direction": "output", + "bits": [ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498 ] + }, + "MAXIGP0WDATA": { + "direction": "output", + "bits": [ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530 ] + }, + "MAXIGP1ARADDR": { + "direction": "output", + "bits": [ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562 ] + }, + "MAXIGP1AWADDR": { + "direction": "output", + "bits": [ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594 ] + }, + "MAXIGP1WDATA": { + "direction": "output", + "bits": [ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626 ] + }, + "SAXIGP0RDATA": { + "direction": "output", + "bits": [ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658 ] + }, + "SAXIGP1RDATA": { + "direction": "output", + "bits": [ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690 ] + }, + "EMIOSDIO0DATAO": { + "direction": "output", + "bits": [ 691, 692, 693, 694 ] + }, + "EMIOSDIO0DATATN": { + "direction": "output", + "bits": [ 695, 696, 697, 698 ] + }, + "EMIOSDIO1DATAO": { + "direction": "output", + "bits": [ 699, 700, 701, 702 ] + }, + "EMIOSDIO1DATATN": { + "direction": "output", + "bits": [ 703, 704, 705, 706 ] + }, + "FCLKCLK": { + "direction": "output", + "bits": [ 707, 708, 709, 710 ] + }, + "FCLKRESETN": { + "direction": "output", + "bits": [ 711, 712, 713, 714 ] + }, + "FTMTF2PTRIGACK": { + "direction": "output", + "bits": [ 715, 716, 717, 718 ] + }, + "FTMTP2FTRIG": { + "direction": "output", + "bits": [ 719, 720, 721, 722 ] + }, + "MAXIGP0ARCACHE": { + "direction": "output", + "bits": [ 723, 724, 725, 726 ] + }, + "MAXIGP0ARLEN": { + "direction": "output", + "bits": [ 727, 728, 729, 730 ] + }, + "MAXIGP0ARQOS": { + "direction": "output", + "bits": [ 731, 732, 733, 734 ] + }, + "MAXIGP0AWCACHE": { + "direction": "output", + "bits": [ 735, 736, 737, 738 ] + }, + "MAXIGP0AWLEN": { + "direction": "output", + "bits": [ 739, 740, 741, 742 ] + }, + "MAXIGP0AWQOS": { + "direction": "output", + "bits": [ 743, 744, 745, 746 ] + }, + "MAXIGP0WSTRB": { + "direction": "output", + "bits": [ 747, 748, 749, 750 ] + }, + "MAXIGP1ARCACHE": { + "direction": "output", + "bits": [ 751, 752, 753, 754 ] + }, + "MAXIGP1ARLEN": { + "direction": "output", + "bits": [ 755, 756, 757, 758 ] + }, + "MAXIGP1ARQOS": { + "direction": "output", + "bits": [ 759, 760, 761, 762 ] + }, + "MAXIGP1AWCACHE": { + "direction": "output", + "bits": [ 763, 764, 765, 766 ] + }, + "MAXIGP1AWLEN": { + "direction": "output", + "bits": [ 767, 768, 769, 770 ] + }, + "MAXIGP1AWQOS": { + "direction": "output", + "bits": [ 771, 772, 773, 774 ] + }, + "MAXIGP1WSTRB": { + "direction": "output", + "bits": [ 775, 776, 777, 778 ] + }, + "SAXIGP0BID": { + "direction": "output", + "bits": [ 779, 780, 781, 782, 783, 784 ] + }, + "SAXIGP0RID": { + "direction": "output", + "bits": [ 785, 786, 787, 788, 789, 790 ] + }, + "SAXIGP1BID": { + "direction": "output", + "bits": [ 791, 792, 793, 794, 795, 796 ] + }, + "SAXIGP1RID": { + "direction": "output", + "bits": [ 797, 798, 799, 800, 801, 802 ] + }, + "SAXIHP0BID": { + "direction": "output", + "bits": [ 803, 804, 805, 806, 807, 808 ] + }, + "SAXIHP0RID": { + "direction": "output", + "bits": [ 809, 810, 811, 812, 813, 814 ] + }, + "SAXIHP0WACOUNT": { + "direction": "output", + "bits": [ 815, 816, 817, 818, 819, 820 ] + }, + "SAXIHP1BID": { + "direction": "output", + "bits": [ 821, 822, 823, 824, 825, 826 ] + }, + "SAXIHP1RID": { + "direction": "output", + "bits": [ 827, 828, 829, 830, 831, 832 ] + }, + "SAXIHP1WACOUNT": { + "direction": "output", + "bits": [ 833, 834, 835, 836, 837, 838 ] + }, + "SAXIHP2BID": { + "direction": "output", + "bits": [ 839, 840, 841, 842, 843, 844 ] + }, + "SAXIHP2RID": { + "direction": "output", + "bits": [ 845, 846, 847, 848, 849, 850 ] + }, + "SAXIHP2WACOUNT": { + "direction": "output", + "bits": [ 851, 852, 853, 854, 855, 856 ] + }, + "SAXIHP3BID": { + "direction": "output", + "bits": [ 857, 858, 859, 860, 861, 862 ] + }, + "SAXIHP3RID": { + "direction": "output", + "bits": [ 863, 864, 865, 866, 867, 868 ] + }, + "SAXIHP3WACOUNT": { + "direction": "output", + "bits": [ 869, 870, 871, 872, 873, 874 ] + }, + "EMIOGPIOO": { + "direction": "output", + "bits": [ 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938 ] + }, + "EMIOGPIOTN": { + "direction": "output", + "bits": [ 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002 ] + }, + "SAXIACPRDATA": { + "direction": "output", + "bits": [ 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066 ] + }, + "SAXIHP0RDATA": { + "direction": "output", + "bits": [ 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130 ] + }, + "SAXIHP1RDATA": { + "direction": "output", + "bits": [ 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194 ] + }, + "SAXIHP2RDATA": { + "direction": "output", + "bits": [ 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258 ] + }, + "SAXIHP3RDATA": { + "direction": "output", + "bits": [ 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322 ] + }, + "EMIOENET0GMIITXD": { + "direction": "output", + "bits": [ 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330 ] + }, + "EMIOENET1GMIITXD": { + "direction": "output", + "bits": [ 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338 ] + }, + "SAXIHP0RCOUNT": { + "direction": "output", + "bits": [ 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346 ] + }, + "SAXIHP0WCOUNT": { + "direction": "output", + "bits": [ 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354 ] + }, + "SAXIHP1RCOUNT": { + "direction": "output", + "bits": [ 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362 ] + }, + "SAXIHP1WCOUNT": { + "direction": "output", + "bits": [ 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370 ] + }, + "SAXIHP2RCOUNT": { + "direction": "output", + "bits": [ 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378 ] + }, + "SAXIHP2WCOUNT": { + "direction": "output", + "bits": [ 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386 ] + }, + "SAXIHP3RCOUNT": { + "direction": "output", + "bits": [ 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394 ] + }, + "SAXIHP3WCOUNT": { + "direction": "output", + "bits": [ 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402 ] + }, + "DDRCASB": { + "direction": "inout", + "bits": [ 1403 ] + }, + "DDRCKE": { + "direction": "inout", + "bits": [ 1404 ] + }, + "DDRCKN": { + "direction": "inout", + "bits": [ 1405 ] + }, + "DDRCKP": { + "direction": "inout", + "bits": [ 1406 ] + }, + "DDRCSB": { + "direction": "inout", + "bits": [ 1407 ] + }, + "DDRDRSTB": { + "direction": "inout", + "bits": [ 1408 ] + }, + "DDRODT": { + "direction": "inout", + "bits": [ 1409 ] + }, + "DDRRASB": { + "direction": "inout", + "bits": [ 1410 ] + }, + "DDRVRN": { + "direction": "inout", + "bits": [ 1411 ] + }, + "DDRVRP": { + "direction": "inout", + "bits": [ 1412 ] + }, + "DDRWEB": { + "direction": "inout", + "bits": [ 1413 ] + }, + "PSCLK": { + "direction": "inout", + "bits": [ 1414 ] + }, + "PSPORB": { + "direction": "inout", + "bits": [ 1415 ] + }, + "PSSRSTB": { + "direction": "inout", + "bits": [ 1416 ] + }, + "DDRA": { + "direction": "inout", + "bits": [ 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431 ] + }, + "DDRBA": { + "direction": "inout", + "bits": [ 1432, 1433, 1434 ] + }, + "DDRDQ": { + "direction": "inout", + "bits": [ 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466 ] + }, + "DDRDM": { + "direction": "inout", + "bits": [ 1467, 1468, 1469, 1470 ] + }, + "DDRDQSN": { + "direction": "inout", + "bits": [ 1471, 1472, 1473, 1474 ] + }, + "DDRDQSP": { + "direction": "inout", + "bits": [ 1475, 1476, 1477, 1478 ] + }, + "MIO": { + "direction": "inout", + "bits": [ 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532 ] + }, + "DMA0ACLK": { + "direction": "input", + "bits": [ 1533 ] + }, + "DMA0DAREADY": { + "direction": "input", + "bits": [ 1534 ] + }, + "DMA0DRLAST": { + "direction": "input", + "bits": [ 1535 ] + }, + "DMA0DRVALID": { + "direction": "input", + "bits": [ 1536 ] + }, + "DMA1ACLK": { + "direction": "input", + "bits": [ 1537 ] + }, + "DMA1DAREADY": { + "direction": "input", + "bits": [ 1538 ] + }, + "DMA1DRLAST": { + "direction": "input", + "bits": [ 1539 ] + }, + "DMA1DRVALID": { + "direction": "input", + "bits": [ 1540 ] + }, + "DMA2ACLK": { + "direction": "input", + "bits": [ 1541 ] + }, + "DMA2DAREADY": { + "direction": "input", + "bits": [ 1542 ] + }, + "DMA2DRLAST": { + "direction": "input", + "bits": [ 1543 ] + }, + "DMA2DRVALID": { + "direction": "input", + "bits": [ 1544 ] + }, + "DMA3ACLK": { + "direction": "input", + "bits": [ 1545 ] + }, + "DMA3DAREADY": { + "direction": "input", + "bits": [ 1546 ] + }, + "DMA3DRLAST": { + "direction": "input", + "bits": [ 1547 ] + }, + "DMA3DRVALID": { + "direction": "input", + "bits": [ 1548 ] + }, + "EMIOCAN0PHYRX": { + "direction": "input", + "bits": [ 1549 ] + }, + "EMIOCAN1PHYRX": { + "direction": "input", + "bits": [ 1550 ] + }, + "EMIOENET0EXTINTIN": { + "direction": "input", + "bits": [ 1551 ] + }, + "EMIOENET0GMIICOL": { + "direction": "input", + "bits": [ 1552 ] + }, + "EMIOENET0GMIICRS": { + "direction": "input", + "bits": [ 1553 ] + }, + "EMIOENET0GMIIRXCLK": { + "direction": "input", + "bits": [ 1554 ] + }, + "EMIOENET0GMIIRXDV": { + "direction": "input", + "bits": [ 1555 ] + }, + "EMIOENET0GMIIRXER": { + "direction": "input", + "bits": [ 1556 ] + }, + "EMIOENET0GMIITXCLK": { + "direction": "input", + "bits": [ 1557 ] + }, + "EMIOENET0MDIOI": { + "direction": "input", + "bits": [ 1558 ] + }, + "EMIOENET1EXTINTIN": { + "direction": "input", + "bits": [ 1559 ] + }, + "EMIOENET1GMIICOL": { + "direction": "input", + "bits": [ 1560 ] + }, + "EMIOENET1GMIICRS": { + "direction": "input", + "bits": [ 1561 ] + }, + "EMIOENET1GMIIRXCLK": { + "direction": "input", + "bits": [ 1562 ] + }, + "EMIOENET1GMIIRXDV": { + "direction": "input", + "bits": [ 1563 ] + }, + "EMIOENET1GMIIRXER": { + "direction": "input", + "bits": [ 1564 ] + }, + "EMIOENET1GMIITXCLK": { + "direction": "input", + "bits": [ 1565 ] + }, + "EMIOENET1MDIOI": { + "direction": "input", + "bits": [ 1566 ] + }, + "EMIOI2C0SCLI": { + "direction": "input", + "bits": [ 1567 ] + }, + "EMIOI2C0SDAI": { + "direction": "input", + "bits": [ 1568 ] + }, + "EMIOI2C1SCLI": { + "direction": "input", + "bits": [ 1569 ] + }, + "EMIOI2C1SDAI": { + "direction": "input", + "bits": [ 1570 ] + }, + "EMIOPJTAGTCK": { + "direction": "input", + "bits": [ 1571 ] + }, + "EMIOPJTAGTDI": { + "direction": "input", + "bits": [ 1572 ] + }, + "EMIOPJTAGTMS": { + "direction": "input", + "bits": [ 1573 ] + }, + "EMIOSDIO0CDN": { + "direction": "input", + "bits": [ 1574 ] + }, + "EMIOSDIO0CLKFB": { + "direction": "input", + "bits": [ 1575 ] + }, + "EMIOSDIO0CMDI": { + "direction": "input", + "bits": [ 1576 ] + }, + "EMIOSDIO0WP": { + "direction": "input", + "bits": [ 1577 ] + }, + "EMIOSDIO1CDN": { + "direction": "input", + "bits": [ 1578 ] + }, + "EMIOSDIO1CLKFB": { + "direction": "input", + "bits": [ 1579 ] + }, + "EMIOSDIO1CMDI": { + "direction": "input", + "bits": [ 1580 ] + }, + "EMIOSDIO1WP": { + "direction": "input", + "bits": [ 1581 ] + }, + "EMIOSPI0MI": { + "direction": "input", + "bits": [ 1582 ] + }, + "EMIOSPI0SCLKI": { + "direction": "input", + "bits": [ 1583 ] + }, + "EMIOSPI0SI": { + "direction": "input", + "bits": [ 1584 ] + }, + "EMIOSPI0SSIN": { + "direction": "input", + "bits": [ 1585 ] + }, + "EMIOSPI1MI": { + "direction": "input", + "bits": [ 1586 ] + }, + "EMIOSPI1SCLKI": { + "direction": "input", + "bits": [ 1587 ] + }, + "EMIOSPI1SI": { + "direction": "input", + "bits": [ 1588 ] + }, + "EMIOSPI1SSIN": { + "direction": "input", + "bits": [ 1589 ] + }, + "EMIOSRAMINTIN": { + "direction": "input", + "bits": [ 1590 ] + }, + "EMIOTRACECLK": { + "direction": "input", + "bits": [ 1591 ] + }, + "EMIOUART0CTSN": { + "direction": "input", + "bits": [ 1592 ] + }, + "EMIOUART0DCDN": { + "direction": "input", + "bits": [ 1593 ] + }, + "EMIOUART0DSRN": { + "direction": "input", + "bits": [ 1594 ] + }, + "EMIOUART0RIN": { + "direction": "input", + "bits": [ 1595 ] + }, + "EMIOUART0RX": { + "direction": "input", + "bits": [ 1596 ] + }, + "EMIOUART1CTSN": { + "direction": "input", + "bits": [ 1597 ] + }, + "EMIOUART1DCDN": { + "direction": "input", + "bits": [ 1598 ] + }, + "EMIOUART1DSRN": { + "direction": "input", + "bits": [ 1599 ] + }, + "EMIOUART1RIN": { + "direction": "input", + "bits": [ 1600 ] + }, + "EMIOUART1RX": { + "direction": "input", + "bits": [ 1601 ] + }, + "EMIOUSB0VBUSPWRFAULT": { + "direction": "input", + "bits": [ 1602 ] + }, + "EMIOUSB1VBUSPWRFAULT": { + "direction": "input", + "bits": [ 1603 ] + }, + "EMIOWDTCLKI": { + "direction": "input", + "bits": [ 1604 ] + }, + "EVENTEVENTI": { + "direction": "input", + "bits": [ 1605 ] + }, + "FPGAIDLEN": { + "direction": "input", + "bits": [ 1606 ] + }, + "FTMDTRACEINCLOCK": { + "direction": "input", + "bits": [ 1607 ] + }, + "FTMDTRACEINVALID": { + "direction": "input", + "bits": [ 1608 ] + }, + "MAXIGP0ACLK": { + "direction": "input", + "bits": [ 1609 ] + }, + "MAXIGP0ARREADY": { + "direction": "input", + "bits": [ 1610 ] + }, + "MAXIGP0AWREADY": { + "direction": "input", + "bits": [ 1611 ] + }, + "MAXIGP0BVALID": { + "direction": "input", + "bits": [ 1612 ] + }, + "MAXIGP0RLAST": { + "direction": "input", + "bits": [ 1613 ] + }, + "MAXIGP0RVALID": { + "direction": "input", + "bits": [ 1614 ] + }, + "MAXIGP0WREADY": { + "direction": "input", + "bits": [ 1615 ] + }, + "MAXIGP1ACLK": { + "direction": "input", + "bits": [ 1616 ] + }, + "MAXIGP1ARREADY": { + "direction": "input", + "bits": [ 1617 ] + }, + "MAXIGP1AWREADY": { + "direction": "input", + "bits": [ 1618 ] + }, + "MAXIGP1BVALID": { + "direction": "input", + "bits": [ 1619 ] + }, + "MAXIGP1RLAST": { + "direction": "input", + "bits": [ 1620 ] + }, + "MAXIGP1RVALID": { + "direction": "input", + "bits": [ 1621 ] + }, + "MAXIGP1WREADY": { + "direction": "input", + "bits": [ 1622 ] + }, + "SAXIACPACLK": { + "direction": "input", + "bits": [ 1623 ] + }, + "SAXIACPARVALID": { + "direction": "input", + "bits": [ 1624 ] + }, + "SAXIACPAWVALID": { + "direction": "input", + "bits": [ 1625 ] + }, + "SAXIACPBREADY": { + "direction": "input", + "bits": [ 1626 ] + }, + "SAXIACPRREADY": { + "direction": "input", + "bits": [ 1627 ] + }, + "SAXIACPWLAST": { + "direction": "input", + "bits": [ 1628 ] + }, + "SAXIACPWVALID": { + "direction": "input", + "bits": [ 1629 ] + }, + "SAXIGP0ACLK": { + "direction": "input", + "bits": [ 1630 ] + }, + "SAXIGP0ARVALID": { + "direction": "input", + "bits": [ 1631 ] + }, + "SAXIGP0AWVALID": { + "direction": "input", + "bits": [ 1632 ] + }, + "SAXIGP0BREADY": { + "direction": "input", + "bits": [ 1633 ] + }, + "SAXIGP0RREADY": { + "direction": "input", + "bits": [ 1634 ] + }, + "SAXIGP0WLAST": { + "direction": "input", + "bits": [ 1635 ] + }, + "SAXIGP0WVALID": { + "direction": "input", + "bits": [ 1636 ] + }, + "SAXIGP1ACLK": { + "direction": "input", + "bits": [ 1637 ] + }, + "SAXIGP1ARVALID": { + "direction": "input", + "bits": [ 1638 ] + }, + "SAXIGP1AWVALID": { + "direction": "input", + "bits": [ 1639 ] + }, + "SAXIGP1BREADY": { + "direction": "input", + "bits": [ 1640 ] + }, + "SAXIGP1RREADY": { + "direction": "input", + "bits": [ 1641 ] + }, + "SAXIGP1WLAST": { + "direction": "input", + "bits": [ 1642 ] + }, + "SAXIGP1WVALID": { + "direction": "input", + "bits": [ 1643 ] + }, + "SAXIHP0ACLK": { + "direction": "input", + "bits": [ 1644 ] + }, + "SAXIHP0ARVALID": { + "direction": "input", + "bits": [ 1645 ] + }, + "SAXIHP0AWVALID": { + "direction": "input", + "bits": [ 1646 ] + }, + "SAXIHP0BREADY": { + "direction": "input", + "bits": [ 1647 ] + }, + "SAXIHP0RDISSUECAP1EN": { + "direction": "input", + "bits": [ 1648 ] + }, + "SAXIHP0RREADY": { + "direction": "input", + "bits": [ 1649 ] + }, + "SAXIHP0WLAST": { + "direction": "input", + "bits": [ 1650 ] + }, + "SAXIHP0WRISSUECAP1EN": { + "direction": "input", + "bits": [ 1651 ] + }, + "SAXIHP0WVALID": { + "direction": "input", + "bits": [ 1652 ] + }, + "SAXIHP1ACLK": { + "direction": "input", + "bits": [ 1653 ] + }, + "SAXIHP1ARVALID": { + "direction": "input", + "bits": [ 1654 ] + }, + "SAXIHP1AWVALID": { + "direction": "input", + "bits": [ 1655 ] + }, + "SAXIHP1BREADY": { + "direction": "input", + "bits": [ 1656 ] + }, + "SAXIHP1RDISSUECAP1EN": { + "direction": "input", + "bits": [ 1657 ] + }, + "SAXIHP1RREADY": { + "direction": "input", + "bits": [ 1658 ] + }, + "SAXIHP1WLAST": { + "direction": "input", + "bits": [ 1659 ] + }, + "SAXIHP1WRISSUECAP1EN": { + "direction": "input", + "bits": [ 1660 ] + }, + "SAXIHP1WVALID": { + "direction": "input", + "bits": [ 1661 ] + }, + "SAXIHP2ACLK": { + "direction": "input", + "bits": [ 1662 ] + }, + "SAXIHP2ARVALID": { + "direction": "input", + "bits": [ 1663 ] + }, + "SAXIHP2AWVALID": { + "direction": "input", + "bits": [ 1664 ] + }, + "SAXIHP2BREADY": { + "direction": "input", + "bits": [ 1665 ] + }, + "SAXIHP2RDISSUECAP1EN": { + "direction": "input", + "bits": [ 1666 ] + }, + "SAXIHP2RREADY": { + "direction": "input", + "bits": [ 1667 ] + }, + "SAXIHP2WLAST": { + "direction": "input", + "bits": [ 1668 ] + }, + "SAXIHP2WRISSUECAP1EN": { + "direction": "input", + "bits": [ 1669 ] + }, + "SAXIHP2WVALID": { + "direction": "input", + "bits": [ 1670 ] + }, + "SAXIHP3ACLK": { + "direction": "input", + "bits": [ 1671 ] + }, + "SAXIHP3ARVALID": { + "direction": "input", + "bits": [ 1672 ] + }, + "SAXIHP3AWVALID": { + "direction": "input", + "bits": [ 1673 ] + }, + "SAXIHP3BREADY": { + "direction": "input", + "bits": [ 1674 ] + }, + "SAXIHP3RDISSUECAP1EN": { + "direction": "input", + "bits": [ 1675 ] + }, + "SAXIHP3RREADY": { + "direction": "input", + "bits": [ 1676 ] + }, + "SAXIHP3WLAST": { + "direction": "input", + "bits": [ 1677 ] + }, + "SAXIHP3WRISSUECAP1EN": { + "direction": "input", + "bits": [ 1678 ] + }, + "SAXIHP3WVALID": { + "direction": "input", + "bits": [ 1679 ] + }, + "MAXIGP0BID": { + "direction": "input", + "bits": [ 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691 ] + }, + "MAXIGP0RID": { + "direction": "input", + "bits": [ 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703 ] + }, + "MAXIGP1BID": { + "direction": "input", + "bits": [ 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715 ] + }, + "MAXIGP1RID": { + "direction": "input", + "bits": [ 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727 ] + }, + "IRQF2P": { + "direction": "input", + "bits": [ 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747 ] + }, + "DMA0DRTYPE": { + "direction": "input", + "bits": [ 1748, 1749 ] + }, + "DMA1DRTYPE": { + "direction": "input", + "bits": [ 1750, 1751 ] + }, + "DMA2DRTYPE": { + "direction": "input", + "bits": [ 1752, 1753 ] + }, + "DMA3DRTYPE": { + "direction": "input", + "bits": [ 1754, 1755 ] + }, + "MAXIGP0BRESP": { + "direction": "input", + "bits": [ 1756, 1757 ] + }, + "MAXIGP0RRESP": { + "direction": "input", + "bits": [ 1758, 1759 ] + }, + "MAXIGP1BRESP": { + "direction": "input", + "bits": [ 1760, 1761 ] + }, + "MAXIGP1RRESP": { + "direction": "input", + "bits": [ 1762, 1763 ] + }, + "SAXIACPARBURST": { + "direction": "input", + "bits": [ 1764, 1765 ] + }, + "SAXIACPARLOCK": { + "direction": "input", + "bits": [ 1766, 1767 ] + }, + "SAXIACPARSIZE": { + "direction": "input", + "bits": [ 1768, 1769 ] + }, + "SAXIACPAWBURST": { + "direction": "input", + "bits": [ 1770, 1771 ] + }, + "SAXIACPAWLOCK": { + "direction": "input", + "bits": [ 1772, 1773 ] + }, + "SAXIACPAWSIZE": { + "direction": "input", + "bits": [ 1774, 1775 ] + }, + "SAXIGP0ARBURST": { + "direction": "input", + "bits": [ 1776, 1777 ] + }, + "SAXIGP0ARLOCK": { + "direction": "input", + "bits": [ 1778, 1779 ] + }, + "SAXIGP0ARSIZE": { + "direction": "input", + "bits": [ 1780, 1781 ] + }, + "SAXIGP0AWBURST": { + "direction": "input", + "bits": [ 1782, 1783 ] + }, + "SAXIGP0AWLOCK": { + "direction": "input", + "bits": [ 1784, 1785 ] + }, + "SAXIGP0AWSIZE": { + "direction": "input", + "bits": [ 1786, 1787 ] + }, + "SAXIGP1ARBURST": { + "direction": "input", + "bits": [ 1788, 1789 ] + }, + "SAXIGP1ARLOCK": { + "direction": "input", + "bits": [ 1790, 1791 ] + }, + "SAXIGP1ARSIZE": { + "direction": "input", + "bits": [ 1792, 1793 ] + }, + "SAXIGP1AWBURST": { + "direction": "input", + "bits": [ 1794, 1795 ] + }, + "SAXIGP1AWLOCK": { + "direction": "input", + "bits": [ 1796, 1797 ] + }, + "SAXIGP1AWSIZE": { + "direction": "input", + "bits": [ 1798, 1799 ] + }, + "SAXIHP0ARBURST": { + "direction": "input", + "bits": [ 1800, 1801 ] + }, + "SAXIHP0ARLOCK": { + "direction": "input", + "bits": [ 1802, 1803 ] + }, + "SAXIHP0ARSIZE": { + "direction": "input", + "bits": [ 1804, 1805 ] + }, + "SAXIHP0AWBURST": { + "direction": "input", + "bits": [ 1806, 1807 ] + }, + "SAXIHP0AWLOCK": { + "direction": "input", + "bits": [ 1808, 1809 ] + }, + "SAXIHP0AWSIZE": { + "direction": "input", + "bits": [ 1810, 1811 ] + }, + "SAXIHP1ARBURST": { + "direction": "input", + "bits": [ 1812, 1813 ] + }, + "SAXIHP1ARLOCK": { + "direction": "input", + "bits": [ 1814, 1815 ] + }, + "SAXIHP1ARSIZE": { + "direction": "input", + "bits": [ 1816, 1817 ] + }, + "SAXIHP1AWBURST": { + "direction": "input", + "bits": [ 1818, 1819 ] + }, + "SAXIHP1AWLOCK": { + "direction": "input", + "bits": [ 1820, 1821 ] + }, + "SAXIHP1AWSIZE": { + "direction": "input", + "bits": [ 1822, 1823 ] + }, + "SAXIHP2ARBURST": { + "direction": "input", + "bits": [ 1824, 1825 ] + }, + "SAXIHP2ARLOCK": { + "direction": "input", + "bits": [ 1826, 1827 ] + }, + "SAXIHP2ARSIZE": { + "direction": "input", + "bits": [ 1828, 1829 ] + }, + "SAXIHP2AWBURST": { + "direction": "input", + "bits": [ 1830, 1831 ] + }, + "SAXIHP2AWLOCK": { + "direction": "input", + "bits": [ 1832, 1833 ] + }, + "SAXIHP2AWSIZE": { + "direction": "input", + "bits": [ 1834, 1835 ] + }, + "SAXIHP3ARBURST": { + "direction": "input", + "bits": [ 1836, 1837 ] + }, + "SAXIHP3ARLOCK": { + "direction": "input", + "bits": [ 1838, 1839 ] + }, + "SAXIHP3ARSIZE": { + "direction": "input", + "bits": [ 1840, 1841 ] + }, + "SAXIHP3AWBURST": { + "direction": "input", + "bits": [ 1842, 1843 ] + }, + "SAXIHP3AWLOCK": { + "direction": "input", + "bits": [ 1844, 1845 ] + }, + "SAXIHP3AWSIZE": { + "direction": "input", + "bits": [ 1846, 1847 ] + }, + "EMIOTTC0CLKI": { + "direction": "input", + "bits": [ 1848, 1849, 1850 ] + }, + "EMIOTTC1CLKI": { + "direction": "input", + "bits": [ 1851, 1852, 1853 ] + }, + "SAXIACPARID": { + "direction": "input", + "bits": [ 1854, 1855, 1856 ] + }, + "SAXIACPARPROT": { + "direction": "input", + "bits": [ 1857, 1858, 1859 ] + }, + "SAXIACPAWID": { + "direction": "input", + "bits": [ 1860, 1861, 1862 ] + }, + "SAXIACPAWPROT": { + "direction": "input", + "bits": [ 1863, 1864, 1865 ] + }, + "SAXIACPWID": { + "direction": "input", + "bits": [ 1866, 1867, 1868 ] + }, + "SAXIGP0ARPROT": { + "direction": "input", + "bits": [ 1869, 1870, 1871 ] + }, + "SAXIGP0AWPROT": { + "direction": "input", + "bits": [ 1872, 1873, 1874 ] + }, + "SAXIGP1ARPROT": { + "direction": "input", + "bits": [ 1875, 1876, 1877 ] + }, + "SAXIGP1AWPROT": { + "direction": "input", + "bits": [ 1878, 1879, 1880 ] + }, + "SAXIHP0ARPROT": { + "direction": "input", + "bits": [ 1881, 1882, 1883 ] + }, + "SAXIHP0AWPROT": { + "direction": "input", + "bits": [ 1884, 1885, 1886 ] + }, + "SAXIHP1ARPROT": { + "direction": "input", + "bits": [ 1887, 1888, 1889 ] + }, + "SAXIHP1AWPROT": { + "direction": "input", + "bits": [ 1890, 1891, 1892 ] + }, + "SAXIHP2ARPROT": { + "direction": "input", + "bits": [ 1893, 1894, 1895 ] + }, + "SAXIHP2AWPROT": { + "direction": "input", + "bits": [ 1896, 1897, 1898 ] + }, + "SAXIHP3ARPROT": { + "direction": "input", + "bits": [ 1899, 1900, 1901 ] + }, + "SAXIHP3AWPROT": { + "direction": "input", + "bits": [ 1902, 1903, 1904 ] + }, + "FTMDTRACEINDATA": { + "direction": "input", + "bits": [ 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936 ] + }, + "FTMTF2PDEBUG": { + "direction": "input", + "bits": [ 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968 ] + }, + "MAXIGP0RDATA": { + "direction": "input", + "bits": [ 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 ] + }, + "MAXIGP1RDATA": { + "direction": "input", + "bits": [ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032 ] + }, + "SAXIACPARADDR": { + "direction": "input", + "bits": [ 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064 ] + }, + "SAXIACPAWADDR": { + "direction": "input", + "bits": [ 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096 ] + }, + "SAXIGP0ARADDR": { + "direction": "input", + "bits": [ 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128 ] + }, + "SAXIGP0AWADDR": { + "direction": "input", + "bits": [ 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160 ] + }, + "SAXIGP0WDATA": { + "direction": "input", + "bits": [ 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192 ] + }, + "SAXIGP1ARADDR": { + "direction": "input", + "bits": [ 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224 ] + }, + "SAXIGP1AWADDR": { + "direction": "input", + "bits": [ 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256 ] + }, + "SAXIGP1WDATA": { + "direction": "input", + "bits": [ 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288 ] + }, + "SAXIHP0ARADDR": { + "direction": "input", + "bits": [ 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 2320 ] + }, + "SAXIHP0AWADDR": { + "direction": "input", + "bits": [ 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352 ] + }, + "SAXIHP1ARADDR": { + "direction": "input", + "bits": [ 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2384 ] + }, + "SAXIHP1AWADDR": { + "direction": "input", + "bits": [ 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416 ] + }, + "SAXIHP2ARADDR": { + "direction": "input", + "bits": [ 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448 ] + }, + "SAXIHP2AWADDR": { + "direction": "input", + "bits": [ 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480 ] + }, + "SAXIHP3ARADDR": { + "direction": "input", + "bits": [ 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512 ] + }, + "SAXIHP3AWADDR": { + "direction": "input", + "bits": [ 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544 ] + }, + "DDRARB": { + "direction": "input", + "bits": [ 2545, 2546, 2547, 2548 ] + }, + "EMIOSDIO0DATAI": { + "direction": "input", + "bits": [ 2549, 2550, 2551, 2552 ] + }, + "EMIOSDIO1DATAI": { + "direction": "input", + "bits": [ 2553, 2554, 2555, 2556 ] + }, + "FCLKCLKTRIGN": { + "direction": "input", + "bits": [ 2557, 2558, 2559, 2560 ] + }, + "FTMDTRACEINATID": { + "direction": "input", + "bits": [ 2561, 2562, 2563, 2564 ] + }, + "FTMTF2PTRIG": { + "direction": "input", + "bits": [ 2565, 2566, 2567, 2568 ] + }, + "FTMTP2FTRIGACK": { + "direction": "input", + "bits": [ 2569, 2570, 2571, 2572 ] + }, + "SAXIACPARCACHE": { + "direction": "input", + "bits": [ 2573, 2574, 2575, 2576 ] + }, + "SAXIACPARLEN": { + "direction": "input", + "bits": [ 2577, 2578, 2579, 2580 ] + }, + "SAXIACPARQOS": { + "direction": "input", + "bits": [ 2581, 2582, 2583, 2584 ] + }, + "SAXIACPAWCACHE": { + "direction": "input", + "bits": [ 2585, 2586, 2587, 2588 ] + }, + "SAXIACPAWLEN": { + "direction": "input", + "bits": [ 2589, 2590, 2591, 2592 ] + }, + "SAXIACPAWQOS": { + "direction": "input", + "bits": [ 2593, 2594, 2595, 2596 ] + }, + "SAXIGP0ARCACHE": { + "direction": "input", + "bits": [ 2597, 2598, 2599, 2600 ] + }, + "SAXIGP0ARLEN": { + "direction": "input", + "bits": [ 2601, 2602, 2603, 2604 ] + }, + "SAXIGP0ARQOS": { + "direction": "input", + "bits": [ 2605, 2606, 2607, 2608 ] + }, + "SAXIGP0AWCACHE": { + "direction": "input", + "bits": [ 2609, 2610, 2611, 2612 ] + }, + "SAXIGP0AWLEN": { + "direction": "input", + "bits": [ 2613, 2614, 2615, 2616 ] + }, + "SAXIGP0AWQOS": { + "direction": "input", + "bits": [ 2617, 2618, 2619, 2620 ] + }, + "SAXIGP0WSTRB": { + "direction": "input", + "bits": [ 2621, 2622, 2623, 2624 ] + }, + "SAXIGP1ARCACHE": { + "direction": "input", + "bits": [ 2625, 2626, 2627, 2628 ] + }, + "SAXIGP1ARLEN": { + "direction": "input", + "bits": [ 2629, 2630, 2631, 2632 ] + }, + "SAXIGP1ARQOS": { + "direction": "input", + "bits": [ 2633, 2634, 2635, 2636 ] + }, + "SAXIGP1AWCACHE": { + "direction": "input", + "bits": [ 2637, 2638, 2639, 2640 ] + }, + "SAXIGP1AWLEN": { + "direction": "input", + "bits": [ 2641, 2642, 2643, 2644 ] + }, + "SAXIGP1AWQOS": { + "direction": "input", + "bits": [ 2645, 2646, 2647, 2648 ] + }, + "SAXIGP1WSTRB": { + "direction": "input", + "bits": [ 2649, 2650, 2651, 2652 ] + }, + "SAXIHP0ARCACHE": { + "direction": "input", + "bits": [ 2653, 2654, 2655, 2656 ] + }, + "SAXIHP0ARLEN": { + "direction": "input", + "bits": [ 2657, 2658, 2659, 2660 ] + }, + "SAXIHP0ARQOS": { + "direction": "input", + "bits": [ 2661, 2662, 2663, 2664 ] + }, + "SAXIHP0AWCACHE": { + "direction": "input", + "bits": [ 2665, 2666, 2667, 2668 ] + }, + "SAXIHP0AWLEN": { + "direction": "input", + "bits": [ 2669, 2670, 2671, 2672 ] + }, + "SAXIHP0AWQOS": { + "direction": "input", + "bits": [ 2673, 2674, 2675, 2676 ] + }, + "SAXIHP1ARCACHE": { + "direction": "input", + "bits": [ 2677, 2678, 2679, 2680 ] + }, + "SAXIHP1ARLEN": { + "direction": "input", + "bits": [ 2681, 2682, 2683, 2684 ] + }, + "SAXIHP1ARQOS": { + "direction": "input", + "bits": [ 2685, 2686, 2687, 2688 ] + }, + "SAXIHP1AWCACHE": { + "direction": "input", + "bits": [ 2689, 2690, 2691, 2692 ] + }, + "SAXIHP1AWLEN": { + "direction": "input", + "bits": [ 2693, 2694, 2695, 2696 ] + }, + "SAXIHP1AWQOS": { + "direction": "input", + "bits": [ 2697, 2698, 2699, 2700 ] + }, + "SAXIHP2ARCACHE": { + "direction": "input", + "bits": [ 2701, 2702, 2703, 2704 ] + }, + "SAXIHP2ARLEN": { + "direction": "input", + "bits": [ 2705, 2706, 2707, 2708 ] + }, + "SAXIHP2ARQOS": { + "direction": "input", + "bits": [ 2709, 2710, 2711, 2712 ] + }, + "SAXIHP2AWCACHE": { + "direction": "input", + "bits": [ 2713, 2714, 2715, 2716 ] + }, + "SAXIHP2AWLEN": { + "direction": "input", + "bits": [ 2717, 2718, 2719, 2720 ] + }, + "SAXIHP2AWQOS": { + "direction": "input", + "bits": [ 2721, 2722, 2723, 2724 ] + }, + "SAXIHP3ARCACHE": { + "direction": "input", + "bits": [ 2725, 2726, 2727, 2728 ] + }, + "SAXIHP3ARLEN": { + "direction": "input", + "bits": [ 2729, 2730, 2731, 2732 ] + }, + "SAXIHP3ARQOS": { + "direction": "input", + "bits": [ 2733, 2734, 2735, 2736 ] + }, + "SAXIHP3AWCACHE": { + "direction": "input", + "bits": [ 2737, 2738, 2739, 2740 ] + }, + "SAXIHP3AWLEN": { + "direction": "input", + "bits": [ 2741, 2742, 2743, 2744 ] + }, + "SAXIHP3AWQOS": { + "direction": "input", + "bits": [ 2745, 2746, 2747, 2748 ] + }, + "SAXIACPARUSER": { + "direction": "input", + "bits": [ 2749, 2750, 2751, 2752, 2753 ] + }, + "SAXIACPAWUSER": { + "direction": "input", + "bits": [ 2754, 2755, 2756, 2757, 2758 ] + }, + "SAXIGP0ARID": { + "direction": "input", + "bits": [ 2759, 2760, 2761, 2762, 2763, 2764 ] + }, + "SAXIGP0AWID": { + "direction": "input", + "bits": [ 2765, 2766, 2767, 2768, 2769, 2770 ] + }, + "SAXIGP0WID": { + "direction": "input", + "bits": [ 2771, 2772, 2773, 2774, 2775, 2776 ] + }, + "SAXIGP1ARID": { + "direction": "input", + "bits": [ 2777, 2778, 2779, 2780, 2781, 2782 ] + }, + "SAXIGP1AWID": { + "direction": "input", + "bits": [ 2783, 2784, 2785, 2786, 2787, 2788 ] + }, + "SAXIGP1WID": { + "direction": "input", + "bits": [ 2789, 2790, 2791, 2792, 2793, 2794 ] + }, + "SAXIHP0ARID": { + "direction": "input", + "bits": [ 2795, 2796, 2797, 2798, 2799, 2800 ] + }, + "SAXIHP0AWID": { + "direction": "input", + "bits": [ 2801, 2802, 2803, 2804, 2805, 2806 ] + }, + "SAXIHP0WID": { + "direction": "input", + "bits": [ 2807, 2808, 2809, 2810, 2811, 2812 ] + }, + "SAXIHP1ARID": { + "direction": "input", + "bits": [ 2813, 2814, 2815, 2816, 2817, 2818 ] + }, + "SAXIHP1AWID": { + "direction": "input", + "bits": [ 2819, 2820, 2821, 2822, 2823, 2824 ] + }, + "SAXIHP1WID": { + "direction": "input", + "bits": [ 2825, 2826, 2827, 2828, 2829, 2830 ] + }, + "SAXIHP2ARID": { + "direction": "input", + "bits": [ 2831, 2832, 2833, 2834, 2835, 2836 ] + }, + "SAXIHP2AWID": { + "direction": "input", + "bits": [ 2837, 2838, 2839, 2840, 2841, 2842 ] + }, + "SAXIHP2WID": { + "direction": "input", + "bits": [ 2843, 2844, 2845, 2846, 2847, 2848 ] + }, + "SAXIHP3ARID": { + "direction": "input", + "bits": [ 2849, 2850, 2851, 2852, 2853, 2854 ] + }, + "SAXIHP3AWID": { + "direction": "input", + "bits": [ 2855, 2856, 2857, 2858, 2859, 2860 ] + }, + "SAXIHP3WID": { + "direction": "input", + "bits": [ 2861, 2862, 2863, 2864, 2865, 2866 ] + }, + "EMIOGPIOI": { + "direction": "input", + "bits": [ 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930 ] + }, + "SAXIACPWDATA": { + "direction": "input", + "bits": [ 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994 ] + }, + "SAXIHP0WDATA": { + "direction": "input", + "bits": [ 2995, 2996, 2997, 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058 ] + }, + "SAXIHP1WDATA": { + "direction": "input", + "bits": [ 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122 ] + }, + "SAXIHP2WDATA": { + "direction": "input", + "bits": [ 3123, 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184, 3185, 3186 ] + }, + "SAXIHP3WDATA": { + "direction": "input", + "bits": [ 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250 ] + }, + "EMIOENET0GMIIRXD": { + "direction": "input", + "bits": [ 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258 ] + }, + "EMIOENET1GMIIRXD": { + "direction": "input", + "bits": [ 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266 ] + }, + "SAXIACPWSTRB": { + "direction": "input", + "bits": [ 3267, 3268, 3269, 3270, 3271, 3272, 3273, 3274 ] + }, + "SAXIHP0WSTRB": { + "direction": "input", + "bits": [ 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282 ] + }, + "SAXIHP1WSTRB": { + "direction": "input", + "bits": [ 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290 ] + }, + "SAXIHP2WSTRB": { + "direction": "input", + "bits": [ 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298 ] + }, + "SAXIHP3WSTRB": { + "direction": "input", + "bits": [ 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306 ] + } + }, + "cells": { + }, + "netnames": { + "DDRA": { + "hide_name": 0, + "bits": [ 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5384" + } + }, + "DDRARB": { + "hide_name": 0, + "bits": [ 2545, 2546, 2547, 2548 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5632" + } + }, + "DDRBA": { + "hide_name": 0, + "bits": [ 1432, 1433, 1434 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5385" + } + }, + "DDRCASB": { + "hide_name": 0, + "bits": [ 1403 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5370" + } + }, + "DDRCKE": { + "hide_name": 0, + "bits": [ 1404 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5371" + } + }, + "DDRCKN": { + "hide_name": 0, + "bits": [ 1405 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5372" + } + }, + "DDRCKP": { + "hide_name": 0, + "bits": [ 1406 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5373" + } + }, + "DDRCSB": { + "hide_name": 0, + "bits": [ 1407 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5374" + } + }, + "DDRDM": { + "hide_name": 0, + "bits": [ 1467, 1468, 1469, 1470 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5387" + } + }, + "DDRDQ": { + "hide_name": 0, + "bits": [ 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5386" + } + }, + "DDRDQSN": { + "hide_name": 0, + "bits": [ 1471, 1472, 1473, 1474 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5388" + } + }, + "DDRDQSP": { + "hide_name": 0, + "bits": [ 1475, 1476, 1477, 1478 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5389" + } + }, + "DDRDRSTB": { + "hide_name": 0, + "bits": [ 1408 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5375" + } + }, + "DDRODT": { + "hide_name": 0, + "bits": [ 1409 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5376" + } + }, + "DDRRASB": { + "hide_name": 0, + "bits": [ 1410 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5377" + } + }, + "DDRVRN": { + "hide_name": 0, + "bits": [ 1411 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5378" + } + }, + "DDRVRP": { + "hide_name": 0, + "bits": [ 1412 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5379" + } + }, + "DDRWEB": { + "hide_name": 0, + "bits": [ 1413 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5380" + } + }, + "DMA0ACLK": { + "hide_name": 0, + "bits": [ 1533 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5391" + } + }, + "DMA0DAREADY": { + "hide_name": 0, + "bits": [ 1534 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5392" + } + }, + "DMA0DATYPE": { + "hide_name": 0, + "bits": [ 226, 227 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5254" + } + }, + "DMA0DAVALID": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5096" + } + }, + "DMA0DRLAST": { + "hide_name": 0, + "bits": [ 1535 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5393" + } + }, + "DMA0DRREADY": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5097" + } + }, + "DMA0DRTYPE": { + "hide_name": 0, + "bits": [ 1748, 1749 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5543" + } + }, + "DMA0DRVALID": { + "hide_name": 0, + "bits": [ 1536 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5394" + } + }, + "DMA0RSTN": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5098" + } + }, + "DMA1ACLK": { + "hide_name": 0, + "bits": [ 1537 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5395" + } + }, + "DMA1DAREADY": { + "hide_name": 0, + "bits": [ 1538 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5396" + } + }, + "DMA1DATYPE": { + "hide_name": 0, + "bits": [ 228, 229 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5255" + } + }, + "DMA1DAVALID": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5099" + } + }, + "DMA1DRLAST": { + "hide_name": 0, + "bits": [ 1539 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5397" + } + }, + "DMA1DRREADY": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5100" + } + }, + "DMA1DRTYPE": { + "hide_name": 0, + "bits": [ 1750, 1751 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5544" + } + }, + "DMA1DRVALID": { + "hide_name": 0, + "bits": [ 1540 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5398" + } + }, + "DMA1RSTN": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5101" + } + }, + "DMA2ACLK": { + "hide_name": 0, + "bits": [ 1541 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5399" + } + }, + "DMA2DAREADY": { + "hide_name": 0, + "bits": [ 1542 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5400" + } + }, + "DMA2DATYPE": { + "hide_name": 0, + "bits": [ 230, 231 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5256" + } + }, + "DMA2DAVALID": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5102" + } + }, + "DMA2DRLAST": { + "hide_name": 0, + "bits": [ 1543 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5401" + } + }, + "DMA2DRREADY": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5103" + } + }, + "DMA2DRTYPE": { + "hide_name": 0, + "bits": [ 1752, 1753 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5545" + } + }, + "DMA2DRVALID": { + "hide_name": 0, + "bits": [ 1544 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5402" + } + }, + "DMA2RSTN": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5104" + } + }, + "DMA3ACLK": { + "hide_name": 0, + "bits": [ 1545 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5403" + } + }, + "DMA3DAREADY": { + "hide_name": 0, + "bits": [ 1546 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5404" + } + }, + "DMA3DATYPE": { + "hide_name": 0, + "bits": [ 232, 233 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5257" + } + }, + "DMA3DAVALID": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5105" + } + }, + "DMA3DRLAST": { + "hide_name": 0, + "bits": [ 1547 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5405" + } + }, + "DMA3DRREADY": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5106" + } + }, + "DMA3DRTYPE": { + "hide_name": 0, + "bits": [ 1754, 1755 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5546" + } + }, + "DMA3DRVALID": { + "hide_name": 0, + "bits": [ 1548 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5406" + } + }, + "DMA3RSTN": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5107" + } + }, + "EMIOCAN0PHYRX": { + "hide_name": 0, + "bits": [ 1549 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5407" + } + }, + "EMIOCAN0PHYTX": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5108" + } + }, + "EMIOCAN1PHYRX": { + "hide_name": 0, + "bits": [ 1550 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5408" + } + }, + "EMIOCAN1PHYTX": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5109" + } + }, + "EMIOENET0EXTINTIN": { + "hide_name": 0, + "bits": [ 1551 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5409" + } + }, + "EMIOENET0GMIICOL": { + "hide_name": 0, + "bits": [ 1552 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5410" + } + }, + "EMIOENET0GMIICRS": { + "hide_name": 0, + "bits": [ 1553 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5411" + } + }, + "EMIOENET0GMIIRXCLK": { + "hide_name": 0, + "bits": [ 1554 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5412" + } + }, + "EMIOENET0GMIIRXD": { + "hide_name": 0, + "bits": [ 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5709" + } + }, + "EMIOENET0GMIIRXDV": { + "hide_name": 0, + "bits": [ 1555 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5413" + } + }, + "EMIOENET0GMIIRXER": { + "hide_name": 0, + "bits": [ 1556 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5414" + } + }, + "EMIOENET0GMIITXCLK": { + "hide_name": 0, + "bits": [ 1557 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5415" + } + }, + "EMIOENET0GMIITXD": { + "hide_name": 0, + "bits": [ 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5360" + } + }, + "EMIOENET0GMIITXEN": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5110" + } + }, + "EMIOENET0GMIITXER": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5111" + } + }, + "EMIOENET0MDIOI": { + "hide_name": 0, + "bits": [ 1558 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5416" + } + }, + "EMIOENET0MDIOMDC": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5112" + } + }, + "EMIOENET0MDIOO": { + "hide_name": 0, + "bits": [ 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5113" + } + }, + "EMIOENET0MDIOTN": { + "hide_name": 0, + "bits": [ 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5114" + } + }, + "EMIOENET0PTPDELAYREQRX": { + "hide_name": 0, + "bits": [ 21 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5115" + } + }, + "EMIOENET0PTPDELAYREQTX": { + "hide_name": 0, + "bits": [ 22 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5116" + } + }, + "EMIOENET0PTPPDELAYREQRX": { + "hide_name": 0, + "bits": [ 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5117" + } + }, + "EMIOENET0PTPPDELAYREQTX": { + "hide_name": 0, + "bits": [ 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5118" + } + }, + "EMIOENET0PTPPDELAYRESPRX": { + "hide_name": 0, + "bits": [ 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5119" + } + }, + "EMIOENET0PTPPDELAYRESPTX": { + "hide_name": 0, + "bits": [ 26 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5120" + } + }, + "EMIOENET0PTPSYNCFRAMERX": { + "hide_name": 0, + "bits": [ 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5121" + } + }, + "EMIOENET0PTPSYNCFRAMETX": { + "hide_name": 0, + "bits": [ 28 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5122" + } + }, + "EMIOENET0SOFRX": { + "hide_name": 0, + "bits": [ 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5123" + } + }, + "EMIOENET0SOFTX": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5124" + } + }, + "EMIOENET1EXTINTIN": { + "hide_name": 0, + "bits": [ 1559 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5417" + } + }, + "EMIOENET1GMIICOL": { + "hide_name": 0, + "bits": [ 1560 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5418" + } + }, + "EMIOENET1GMIICRS": { + "hide_name": 0, + "bits": [ 1561 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5419" + } + }, + "EMIOENET1GMIIRXCLK": { + "hide_name": 0, + "bits": [ 1562 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5420" + } + }, + "EMIOENET1GMIIRXD": { + "hide_name": 0, + "bits": [ 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5710" + } + }, + "EMIOENET1GMIIRXDV": { + "hide_name": 0, + "bits": [ 1563 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5421" + } + }, + "EMIOENET1GMIIRXER": { + "hide_name": 0, + "bits": [ 1564 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5422" + } + }, + "EMIOENET1GMIITXCLK": { + "hide_name": 0, + "bits": [ 1565 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5423" + } + }, + "EMIOENET1GMIITXD": { + "hide_name": 0, + "bits": [ 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5361" + } + }, + "EMIOENET1GMIITXEN": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5125" + } + }, + "EMIOENET1GMIITXER": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5126" + } + }, + "EMIOENET1MDIOI": { + "hide_name": 0, + "bits": [ 1566 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5424" + } + }, + "EMIOENET1MDIOMDC": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5127" + } + }, + "EMIOENET1MDIOO": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5128" + } + }, + "EMIOENET1MDIOTN": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5129" + } + }, + "EMIOENET1PTPDELAYREQRX": { + "hide_name": 0, + "bits": [ 36 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5130" + } + }, + "EMIOENET1PTPDELAYREQTX": { + "hide_name": 0, + "bits": [ 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5131" + } + }, + "EMIOENET1PTPPDELAYREQRX": { + "hide_name": 0, + "bits": [ 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5132" + } + }, + "EMIOENET1PTPPDELAYREQTX": { + "hide_name": 0, + "bits": [ 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5133" + } + }, + "EMIOENET1PTPPDELAYRESPRX": { + "hide_name": 0, + "bits": [ 40 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5134" + } + }, + "EMIOENET1PTPPDELAYRESPTX": { + "hide_name": 0, + "bits": [ 41 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5135" + } + }, + "EMIOENET1PTPSYNCFRAMERX": { + "hide_name": 0, + "bits": [ 42 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5136" + } + }, + "EMIOENET1PTPSYNCFRAMETX": { + "hide_name": 0, + "bits": [ 43 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5137" + } + }, + "EMIOENET1SOFRX": { + "hide_name": 0, + "bits": [ 44 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5138" + } + }, + "EMIOENET1SOFTX": { + "hide_name": 0, + "bits": [ 45 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5139" + } + }, + "EMIOGPIOI": { + "hide_name": 0, + "bits": [ 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5703" + } + }, + "EMIOGPIOO": { + "hide_name": 0, + "bits": [ 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5353" + } + }, + "EMIOGPIOTN": { + "hide_name": 0, + "bits": [ 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5354" + } + }, + "EMIOI2C0SCLI": { + "hide_name": 0, + "bits": [ 1567 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5425" + } + }, + "EMIOI2C0SCLO": { + "hide_name": 0, + "bits": [ 46 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5140" + } + }, + "EMIOI2C0SCLTN": { + "hide_name": 0, + "bits": [ 47 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5141" + } + }, + "EMIOI2C0SDAI": { + "hide_name": 0, + "bits": [ 1568 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5426" + } + }, + "EMIOI2C0SDAO": { + "hide_name": 0, + "bits": [ 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5142" + } + }, + "EMIOI2C0SDATN": { + "hide_name": 0, + "bits": [ 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5143" + } + }, + "EMIOI2C1SCLI": { + "hide_name": 0, + "bits": [ 1569 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5427" + } + }, + "EMIOI2C1SCLO": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5144" + } + }, + "EMIOI2C1SCLTN": { + "hide_name": 0, + "bits": [ 51 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5145" + } + }, + "EMIOI2C1SDAI": { + "hide_name": 0, + "bits": [ 1570 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5428" + } + }, + "EMIOI2C1SDAO": { + "hide_name": 0, + "bits": [ 52 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5146" + } + }, + "EMIOI2C1SDATN": { + "hide_name": 0, + "bits": [ 53 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5147" + } + }, + "EMIOPJTAGTCK": { + "hide_name": 0, + "bits": [ 1571 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5429" + } + }, + "EMIOPJTAGTDI": { + "hide_name": 0, + "bits": [ 1572 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5430" + } + }, + "EMIOPJTAGTDO": { + "hide_name": 0, + "bits": [ 54 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5148" + } + }, + "EMIOPJTAGTDTN": { + "hide_name": 0, + "bits": [ 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5149" + } + }, + "EMIOPJTAGTMS": { + "hide_name": 0, + "bits": [ 1573 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5431" + } + }, + "EMIOSDIO0BUSPOW": { + "hide_name": 0, + "bits": [ 56 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5150" + } + }, + "EMIOSDIO0BUSVOLT": { + "hide_name": 0, + "bits": [ 323, 324, 325 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5289" + } + }, + "EMIOSDIO0CDN": { + "hide_name": 0, + "bits": [ 1574 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5432" + } + }, + "EMIOSDIO0CLK": { + "hide_name": 0, + "bits": [ 57 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5151" + } + }, + "EMIOSDIO0CLKFB": { + "hide_name": 0, + "bits": [ 1575 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5433" + } + }, + "EMIOSDIO0CMDI": { + "hide_name": 0, + "bits": [ 1576 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5434" + } + }, + "EMIOSDIO0CMDO": { + "hide_name": 0, + "bits": [ 58 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5152" + } + }, + "EMIOSDIO0CMDTN": { + "hide_name": 0, + "bits": [ 59 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5153" + } + }, + "EMIOSDIO0DATAI": { + "hide_name": 0, + "bits": [ 2549, 2550, 2551, 2552 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5633" + } + }, + "EMIOSDIO0DATAO": { + "hide_name": 0, + "bits": [ 691, 692, 693, 694 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5315" + } + }, + "EMIOSDIO0DATATN": { + "hide_name": 0, + "bits": [ 695, 696, 697, 698 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5316" + } + }, + "EMIOSDIO0LED": { + "hide_name": 0, + "bits": [ 60 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5154" + } + }, + "EMIOSDIO0WP": { + "hide_name": 0, + "bits": [ 1577 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5435" + } + }, + "EMIOSDIO1BUSPOW": { + "hide_name": 0, + "bits": [ 61 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5155" + } + }, + "EMIOSDIO1BUSVOLT": { + "hide_name": 0, + "bits": [ 326, 327, 328 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5290" + } + }, + "EMIOSDIO1CDN": { + "hide_name": 0, + "bits": [ 1578 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5436" + } + }, + "EMIOSDIO1CLK": { + "hide_name": 0, + "bits": [ 62 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5156" + } + }, + "EMIOSDIO1CLKFB": { + "hide_name": 0, + "bits": [ 1579 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5437" + } + }, + "EMIOSDIO1CMDI": { + "hide_name": 0, + "bits": [ 1580 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5438" + } + }, + "EMIOSDIO1CMDO": { + "hide_name": 0, + "bits": [ 63 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5157" + } + }, + "EMIOSDIO1CMDTN": { + "hide_name": 0, + "bits": [ 64 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5158" + } + }, + "EMIOSDIO1DATAI": { + "hide_name": 0, + "bits": [ 2553, 2554, 2555, 2556 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5634" + } + }, + "EMIOSDIO1DATAO": { + "hide_name": 0, + "bits": [ 699, 700, 701, 702 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5317" + } + }, + "EMIOSDIO1DATATN": { + "hide_name": 0, + "bits": [ 703, 704, 705, 706 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5318" + } + }, + "EMIOSDIO1LED": { + "hide_name": 0, + "bits": [ 65 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5159" + } + }, + "EMIOSDIO1WP": { + "hide_name": 0, + "bits": [ 1581 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5439" + } + }, + "EMIOSPI0MI": { + "hide_name": 0, + "bits": [ 1582 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5440" + } + }, + "EMIOSPI0MO": { + "hide_name": 0, + "bits": [ 66 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5160" + } + }, + "EMIOSPI0MOTN": { + "hide_name": 0, + "bits": [ 67 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5161" + } + }, + "EMIOSPI0SCLKI": { + "hide_name": 0, + "bits": [ 1583 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5441" + } + }, + "EMIOSPI0SCLKO": { + "hide_name": 0, + "bits": [ 68 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5162" + } + }, + "EMIOSPI0SCLKTN": { + "hide_name": 0, + "bits": [ 69 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5163" + } + }, + "EMIOSPI0SI": { + "hide_name": 0, + "bits": [ 1584 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5442" + } + }, + "EMIOSPI0SO": { + "hide_name": 0, + "bits": [ 70 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5164" + } + }, + "EMIOSPI0SSIN": { + "hide_name": 0, + "bits": [ 1585 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5443" + } + }, + "EMIOSPI0SSNTN": { + "hide_name": 0, + "bits": [ 71 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5165" + } + }, + "EMIOSPI0SSON": { + "hide_name": 0, + "bits": [ 329, 330, 331 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5291" + } + }, + "EMIOSPI0STN": { + "hide_name": 0, + "bits": [ 72 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5166" + } + }, + "EMIOSPI1MI": { + "hide_name": 0, + "bits": [ 1586 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5444" + } + }, + "EMIOSPI1MO": { + "hide_name": 0, + "bits": [ 73 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5167" + } + }, + "EMIOSPI1MOTN": { + "hide_name": 0, + "bits": [ 74 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5168" + } + }, + "EMIOSPI1SCLKI": { + "hide_name": 0, + "bits": [ 1587 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5445" + } + }, + "EMIOSPI1SCLKO": { + "hide_name": 0, + "bits": [ 75 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5169" + } + }, + "EMIOSPI1SCLKTN": { + "hide_name": 0, + "bits": [ 76 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5170" + } + }, + "EMIOSPI1SI": { + "hide_name": 0, + "bits": [ 1588 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5446" + } + }, + "EMIOSPI1SO": { + "hide_name": 0, + "bits": [ 77 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5171" + } + }, + "EMIOSPI1SSIN": { + "hide_name": 0, + "bits": [ 1589 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5447" + } + }, + "EMIOSPI1SSNTN": { + "hide_name": 0, + "bits": [ 78 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5172" + } + }, + "EMIOSPI1SSON": { + "hide_name": 0, + "bits": [ 332, 333, 334 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5292" + } + }, + "EMIOSPI1STN": { + "hide_name": 0, + "bits": [ 79 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5173" + } + }, + "EMIOSRAMINTIN": { + "hide_name": 0, + "bits": [ 1590 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5448" + } + }, + "EMIOTRACECLK": { + "hide_name": 0, + "bits": [ 1591 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5449" + } + }, + "EMIOTRACECTL": { + "hide_name": 0, + "bits": [ 80 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5174" + } + }, + "EMIOTRACEDATA": { + "hide_name": 0, + "bits": [ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5305" + } + }, + "EMIOTTC0CLKI": { + "hide_name": 0, + "bits": [ 1848, 1849, 1850 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5593" + } + }, + "EMIOTTC0WAVEO": { + "hide_name": 0, + "bits": [ 335, 336, 337 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5293" + } + }, + "EMIOTTC1CLKI": { + "hide_name": 0, + "bits": [ 1851, 1852, 1853 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5594" + } + }, + "EMIOTTC1WAVEO": { + "hide_name": 0, + "bits": [ 338, 339, 340 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5294" + } + }, + "EMIOUART0CTSN": { + "hide_name": 0, + "bits": [ 1592 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5450" + } + }, + "EMIOUART0DCDN": { + "hide_name": 0, + "bits": [ 1593 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5451" + } + }, + "EMIOUART0DSRN": { + "hide_name": 0, + "bits": [ 1594 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5452" + } + }, + "EMIOUART0DTRN": { + "hide_name": 0, + "bits": [ 81 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5175" + } + }, + "EMIOUART0RIN": { + "hide_name": 0, + "bits": [ 1595 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5453" + } + }, + "EMIOUART0RTSN": { + "hide_name": 0, + "bits": [ 82 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5176" + } + }, + "EMIOUART0RX": { + "hide_name": 0, + "bits": [ 1596 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5454" + } + }, + "EMIOUART0TX": { + "hide_name": 0, + "bits": [ 83 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5177" + } + }, + "EMIOUART1CTSN": { + "hide_name": 0, + "bits": [ 1597 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5455" + } + }, + "EMIOUART1DCDN": { + "hide_name": 0, + "bits": [ 1598 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5456" + } + }, + "EMIOUART1DSRN": { + "hide_name": 0, + "bits": [ 1599 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5457" + } + }, + "EMIOUART1DTRN": { + "hide_name": 0, + "bits": [ 84 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5178" + } + }, + "EMIOUART1RIN": { + "hide_name": 0, + "bits": [ 1600 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5458" + } + }, + "EMIOUART1RTSN": { + "hide_name": 0, + "bits": [ 85 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5179" + } + }, + "EMIOUART1RX": { + "hide_name": 0, + "bits": [ 1601 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5459" + } + }, + "EMIOUART1TX": { + "hide_name": 0, + "bits": [ 86 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5180" + } + }, + "EMIOUSB0PORTINDCTL": { + "hide_name": 0, + "bits": [ 234, 235 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5258" + } + }, + "EMIOUSB0VBUSPWRFAULT": { + "hide_name": 0, + "bits": [ 1602 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5460" + } + }, + "EMIOUSB0VBUSPWRSELECT": { + "hide_name": 0, + "bits": [ 87 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5181" + } + }, + "EMIOUSB1PORTINDCTL": { + "hide_name": 0, + "bits": [ 236, 237 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5259" + } + }, + "EMIOUSB1VBUSPWRFAULT": { + "hide_name": 0, + "bits": [ 1603 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5461" + } + }, + "EMIOUSB1VBUSPWRSELECT": { + "hide_name": 0, + "bits": [ 88 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5182" + } + }, + "EMIOWDTCLKI": { + "hide_name": 0, + "bits": [ 1604 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5462" + } + }, + "EMIOWDTRSTO": { + "hide_name": 0, + "bits": [ 89 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5183" + } + }, + "EVENTEVENTI": { + "hide_name": 0, + "bits": [ 1605 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5463" + } + }, + "EVENTEVENTO": { + "hide_name": 0, + "bits": [ 90 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5184" + } + }, + "EVENTSTANDBYWFE": { + "hide_name": 0, + "bits": [ 238, 239 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5260" + } + }, + "EVENTSTANDBYWFI": { + "hide_name": 0, + "bits": [ 240, 241 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5261" + } + }, + "FCLKCLK": { + "hide_name": 0, + "bits": [ 707, 708, 709, 710 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5319" + } + }, + "FCLKCLKTRIGN": { + "hide_name": 0, + "bits": [ 2557, 2558, 2559, 2560 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5635" + } + }, + "FCLKRESETN": { + "hide_name": 0, + "bits": [ 711, 712, 713, 714 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5320" + } + }, + "FPGAIDLEN": { + "hide_name": 0, + "bits": [ 1606 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5464" + } + }, + "FTMDTRACEINATID": { + "hide_name": 0, + "bits": [ 2561, 2562, 2563, 2564 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5636" + } + }, + "FTMDTRACEINCLOCK": { + "hide_name": 0, + "bits": [ 1607 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5465" + } + }, + "FTMDTRACEINDATA": { + "hide_name": 0, + "bits": [ 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5612" + } + }, + "FTMDTRACEINVALID": { + "hide_name": 0, + "bits": [ 1608 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5466" + } + }, + "FTMTF2PDEBUG": { + "hide_name": 0, + "bits": [ 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5613" + } + }, + "FTMTF2PTRIG": { + "hide_name": 0, + "bits": [ 2565, 2566, 2567, 2568 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5637" + } + }, + "FTMTF2PTRIGACK": { + "hide_name": 0, + "bits": [ 715, 716, 717, 718 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5321" + } + }, + "FTMTP2FDEBUG": { + "hide_name": 0, + "bits": [ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5306" + } + }, + "FTMTP2FTRIG": { + "hide_name": 0, + "bits": [ 719, 720, 721, 722 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5322" + } + }, + "FTMTP2FTRIGACK": { + "hide_name": 0, + "bits": [ 2569, 2570, 2571, 2572 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5638" + } + }, + "IRQF2P": { + "hide_name": 0, + "bits": [ 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5542" + } + }, + "IRQP2F": { + "hide_name": 0, + "bits": [ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5288" + } + }, + "MAXIGP0ACLK": { + "hide_name": 0, + "bits": [ 1609 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5467" + } + }, + "MAXIGP0ARADDR": { + "hide_name": 0, + "bits": [ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5307" + } + }, + "MAXIGP0ARBURST": { + "hide_name": 0, + "bits": [ 242, 243 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5262" + } + }, + "MAXIGP0ARCACHE": { + "hide_name": 0, + "bits": [ 723, 724, 725, 726 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5323" + } + }, + "MAXIGP0ARESETN": { + "hide_name": 0, + "bits": [ 91 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5185" + } + }, + "MAXIGP0ARID": { + "hide_name": 0, + "bits": [ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5248" + } + }, + "MAXIGP0ARLEN": { + "hide_name": 0, + "bits": [ 727, 728, 729, 730 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5324" + } + }, + "MAXIGP0ARLOCK": { + "hide_name": 0, + "bits": [ 244, 245 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5263" + } + }, + "MAXIGP0ARPROT": { + "hide_name": 0, + "bits": [ 341, 342, 343 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5295" + } + }, + "MAXIGP0ARQOS": { + "hide_name": 0, + "bits": [ 731, 732, 733, 734 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5325" + } + }, + "MAXIGP0ARREADY": { + "hide_name": 0, + "bits": [ 1610 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5468" + } + }, + "MAXIGP0ARSIZE": { + "hide_name": 0, + "bits": [ 246, 247 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5264" + } + }, + "MAXIGP0ARVALID": { + "hide_name": 0, + "bits": [ 92 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5186" + } + }, + "MAXIGP0AWADDR": { + "hide_name": 0, + "bits": [ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5308" + } + }, + "MAXIGP0AWBURST": { + "hide_name": 0, + "bits": [ 248, 249 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5265" + } + }, + "MAXIGP0AWCACHE": { + "hide_name": 0, + "bits": [ 735, 736, 737, 738 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5326" + } + }, + "MAXIGP0AWID": { + "hide_name": 0, + "bits": [ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5249" + } + }, + "MAXIGP0AWLEN": { + "hide_name": 0, + "bits": [ 739, 740, 741, 742 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5327" + } + }, + "MAXIGP0AWLOCK": { + "hide_name": 0, + "bits": [ 250, 251 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5266" + } + }, + "MAXIGP0AWPROT": { + "hide_name": 0, + "bits": [ 344, 345, 346 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5296" + } + }, + "MAXIGP0AWQOS": { + "hide_name": 0, + "bits": [ 743, 744, 745, 746 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5328" + } + }, + "MAXIGP0AWREADY": { + "hide_name": 0, + "bits": [ 1611 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5469" + } + }, + "MAXIGP0AWSIZE": { + "hide_name": 0, + "bits": [ 252, 253 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5267" + } + }, + "MAXIGP0AWVALID": { + "hide_name": 0, + "bits": [ 93 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5187" + } + }, + "MAXIGP0BID": { + "hide_name": 0, + "bits": [ 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5538" + } + }, + "MAXIGP0BREADY": { + "hide_name": 0, + "bits": [ 94 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5188" + } + }, + "MAXIGP0BRESP": { + "hide_name": 0, + "bits": [ 1756, 1757 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5547" + } + }, + "MAXIGP0BVALID": { + "hide_name": 0, + "bits": [ 1612 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5470" + } + }, + "MAXIGP0RDATA": { + "hide_name": 0, + "bits": [ 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5614" + } + }, + "MAXIGP0RID": { + "hide_name": 0, + "bits": [ 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5539" + } + }, + "MAXIGP0RLAST": { + "hide_name": 0, + "bits": [ 1613 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5471" + } + }, + "MAXIGP0RREADY": { + "hide_name": 0, + "bits": [ 95 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5189" + } + }, + "MAXIGP0RRESP": { + "hide_name": 0, + "bits": [ 1758, 1759 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5548" + } + }, + "MAXIGP0RVALID": { + "hide_name": 0, + "bits": [ 1614 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5472" + } + }, + "MAXIGP0WDATA": { + "hide_name": 0, + "bits": [ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5309" + } + }, + "MAXIGP0WID": { + "hide_name": 0, + "bits": [ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5250" + } + }, + "MAXIGP0WLAST": { + "hide_name": 0, + "bits": [ 96 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5190" + } + }, + "MAXIGP0WREADY": { + "hide_name": 0, + "bits": [ 1615 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5473" + } + }, + "MAXIGP0WSTRB": { + "hide_name": 0, + "bits": [ 747, 748, 749, 750 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5329" + } + }, + "MAXIGP0WVALID": { + "hide_name": 0, + "bits": [ 97 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5191" + } + }, + "MAXIGP1ACLK": { + "hide_name": 0, + "bits": [ 1616 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5474" + } + }, + "MAXIGP1ARADDR": { + "hide_name": 0, + "bits": [ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5310" + } + }, + "MAXIGP1ARBURST": { + "hide_name": 0, + "bits": [ 254, 255 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5268" + } + }, + "MAXIGP1ARCACHE": { + "hide_name": 0, + "bits": [ 751, 752, 753, 754 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5330" + } + }, + "MAXIGP1ARESETN": { + "hide_name": 0, + "bits": [ 98 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5192" + } + }, + "MAXIGP1ARID": { + "hide_name": 0, + "bits": [ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5251" + } + }, + "MAXIGP1ARLEN": { + "hide_name": 0, + "bits": [ 755, 756, 757, 758 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5331" + } + }, + "MAXIGP1ARLOCK": { + "hide_name": 0, + "bits": [ 256, 257 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5269" + } + }, + "MAXIGP1ARPROT": { + "hide_name": 0, + "bits": [ 347, 348, 349 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5297" + } + }, + "MAXIGP1ARQOS": { + "hide_name": 0, + "bits": [ 759, 760, 761, 762 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5332" + } + }, + "MAXIGP1ARREADY": { + "hide_name": 0, + "bits": [ 1617 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5475" + } + }, + "MAXIGP1ARSIZE": { + "hide_name": 0, + "bits": [ 258, 259 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5270" + } + }, + "MAXIGP1ARVALID": { + "hide_name": 0, + "bits": [ 99 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5193" + } + }, + "MAXIGP1AWADDR": { + "hide_name": 0, + "bits": [ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5311" + } + }, + "MAXIGP1AWBURST": { + "hide_name": 0, + "bits": [ 260, 261 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5271" + } + }, + "MAXIGP1AWCACHE": { + "hide_name": 0, + "bits": [ 763, 764, 765, 766 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5333" + } + }, + "MAXIGP1AWID": { + "hide_name": 0, + "bits": [ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5252" + } + }, + "MAXIGP1AWLEN": { + "hide_name": 0, + "bits": [ 767, 768, 769, 770 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5334" + } + }, + "MAXIGP1AWLOCK": { + "hide_name": 0, + "bits": [ 262, 263 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5272" + } + }, + "MAXIGP1AWPROT": { + "hide_name": 0, + "bits": [ 350, 351, 352 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5298" + } + }, + "MAXIGP1AWQOS": { + "hide_name": 0, + "bits": [ 771, 772, 773, 774 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5335" + } + }, + "MAXIGP1AWREADY": { + "hide_name": 0, + "bits": [ 1618 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5476" + } + }, + "MAXIGP1AWSIZE": { + "hide_name": 0, + "bits": [ 264, 265 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5273" + } + }, + "MAXIGP1AWVALID": { + "hide_name": 0, + "bits": [ 100 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5194" + } + }, + "MAXIGP1BID": { + "hide_name": 0, + "bits": [ 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5540" + } + }, + "MAXIGP1BREADY": { + "hide_name": 0, + "bits": [ 101 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5195" + } + }, + "MAXIGP1BRESP": { + "hide_name": 0, + "bits": [ 1760, 1761 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5549" + } + }, + "MAXIGP1BVALID": { + "hide_name": 0, + "bits": [ 1619 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5477" + } + }, + "MAXIGP1RDATA": { + "hide_name": 0, + "bits": [ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5615" + } + }, + "MAXIGP1RID": { + "hide_name": 0, + "bits": [ 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5541" + } + }, + "MAXIGP1RLAST": { + "hide_name": 0, + "bits": [ 1620 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5478" + } + }, + "MAXIGP1RREADY": { + "hide_name": 0, + "bits": [ 102 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5196" + } + }, + "MAXIGP1RRESP": { + "hide_name": 0, + "bits": [ 1762, 1763 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5550" + } + }, + "MAXIGP1RVALID": { + "hide_name": 0, + "bits": [ 1621 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5479" + } + }, + "MAXIGP1WDATA": { + "hide_name": 0, + "bits": [ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5312" + } + }, + "MAXIGP1WID": { + "hide_name": 0, + "bits": [ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5253" + } + }, + "MAXIGP1WLAST": { + "hide_name": 0, + "bits": [ 103 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5197" + } + }, + "MAXIGP1WREADY": { + "hide_name": 0, + "bits": [ 1622 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5480" + } + }, + "MAXIGP1WSTRB": { + "hide_name": 0, + "bits": [ 775, 776, 777, 778 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5336" + } + }, + "MAXIGP1WVALID": { + "hide_name": 0, + "bits": [ 104 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5198" + } + }, + "MIO": { + "hide_name": 0, + "bits": [ 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5390" + } + }, + "PSCLK": { + "hide_name": 0, + "bits": [ 1414 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5381" + } + }, + "PSPORB": { + "hide_name": 0, + "bits": [ 1415 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5382" + } + }, + "PSSRSTB": { + "hide_name": 0, + "bits": [ 1416 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5383" + } + }, + "SAXIACPACLK": { + "hide_name": 0, + "bits": [ 1623 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5481" + } + }, + "SAXIACPARADDR": { + "hide_name": 0, + "bits": [ 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5616" + } + }, + "SAXIACPARBURST": { + "hide_name": 0, + "bits": [ 1764, 1765 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5551" + } + }, + "SAXIACPARCACHE": { + "hide_name": 0, + "bits": [ 2573, 2574, 2575, 2576 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5639" + } + }, + "SAXIACPARESETN": { + "hide_name": 0, + "bits": [ 105 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5199" + } + }, + "SAXIACPARID": { + "hide_name": 0, + "bits": [ 1854, 1855, 1856 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5595" + } + }, + "SAXIACPARLEN": { + "hide_name": 0, + "bits": [ 2577, 2578, 2579, 2580 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5640" + } + }, + "SAXIACPARLOCK": { + "hide_name": 0, + "bits": [ 1766, 1767 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5552" + } + }, + "SAXIACPARPROT": { + "hide_name": 0, + "bits": [ 1857, 1858, 1859 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5596" + } + }, + "SAXIACPARQOS": { + "hide_name": 0, + "bits": [ 2581, 2582, 2583, 2584 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5641" + } + }, + "SAXIACPARREADY": { + "hide_name": 0, + "bits": [ 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5200" + } + }, + "SAXIACPARSIZE": { + "hide_name": 0, + "bits": [ 1768, 1769 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5553" + } + }, + "SAXIACPARUSER": { + "hide_name": 0, + "bits": [ 2749, 2750, 2751, 2752, 2753 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5683" + } + }, + "SAXIACPARVALID": { + "hide_name": 0, + "bits": [ 1624 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5482" + } + }, + "SAXIACPAWADDR": { + "hide_name": 0, + "bits": [ 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5617" + } + }, + "SAXIACPAWBURST": { + "hide_name": 0, + "bits": [ 1770, 1771 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5554" + } + }, + "SAXIACPAWCACHE": { + "hide_name": 0, + "bits": [ 2585, 2586, 2587, 2588 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5642" + } + }, + "SAXIACPAWID": { + "hide_name": 0, + "bits": [ 1860, 1861, 1862 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5597" + } + }, + "SAXIACPAWLEN": { + "hide_name": 0, + "bits": [ 2589, 2590, 2591, 2592 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5643" + } + }, + "SAXIACPAWLOCK": { + "hide_name": 0, + "bits": [ 1772, 1773 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5555" + } + }, + "SAXIACPAWPROT": { + "hide_name": 0, + "bits": [ 1863, 1864, 1865 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5598" + } + }, + "SAXIACPAWQOS": { + "hide_name": 0, + "bits": [ 2593, 2594, 2595, 2596 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5644" + } + }, + "SAXIACPAWREADY": { + "hide_name": 0, + "bits": [ 107 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5201" + } + }, + "SAXIACPAWSIZE": { + "hide_name": 0, + "bits": [ 1774, 1775 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5556" + } + }, + "SAXIACPAWUSER": { + "hide_name": 0, + "bits": [ 2754, 2755, 2756, 2757, 2758 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5684" + } + }, + "SAXIACPAWVALID": { + "hide_name": 0, + "bits": [ 1625 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5483" + } + }, + "SAXIACPBID": { + "hide_name": 0, + "bits": [ 353, 354, 355 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5299" + } + }, + "SAXIACPBREADY": { + "hide_name": 0, + "bits": [ 1626 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5484" + } + }, + "SAXIACPBRESP": { + "hide_name": 0, + "bits": [ 266, 267 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5274" + } + }, + "SAXIACPBVALID": { + "hide_name": 0, + "bits": [ 108 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5202" + } + }, + "SAXIACPRDATA": { + "hide_name": 0, + "bits": [ 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5355" + } + }, + "SAXIACPRID": { + "hide_name": 0, + "bits": [ 356, 357, 358 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5300" + } + }, + "SAXIACPRLAST": { + "hide_name": 0, + "bits": [ 109 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5203" + } + }, + "SAXIACPRREADY": { + "hide_name": 0, + "bits": [ 1627 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5485" + } + }, + "SAXIACPRRESP": { + "hide_name": 0, + "bits": [ 268, 269 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5275" + } + }, + "SAXIACPRVALID": { + "hide_name": 0, + "bits": [ 110 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5204" + } + }, + "SAXIACPWDATA": { + "hide_name": 0, + "bits": [ 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5704" + } + }, + "SAXIACPWID": { + "hide_name": 0, + "bits": [ 1866, 1867, 1868 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5599" + } + }, + "SAXIACPWLAST": { + "hide_name": 0, + "bits": [ 1628 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5486" + } + }, + "SAXIACPWREADY": { + "hide_name": 0, + "bits": [ 111 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5205" + } + }, + "SAXIACPWSTRB": { + "hide_name": 0, + "bits": [ 3267, 3268, 3269, 3270, 3271, 3272, 3273, 3274 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5711" + } + }, + "SAXIACPWVALID": { + "hide_name": 0, + "bits": [ 1629 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5487" + } + }, + "SAXIGP0ACLK": { + "hide_name": 0, + "bits": [ 1630 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5488" + } + }, + "SAXIGP0ARADDR": { + "hide_name": 0, + "bits": [ 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5618" + } + }, + "SAXIGP0ARBURST": { + "hide_name": 0, + "bits": [ 1776, 1777 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5557" + } + }, + "SAXIGP0ARCACHE": { + "hide_name": 0, + "bits": [ 2597, 2598, 2599, 2600 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5645" + } + }, + "SAXIGP0ARESETN": { + "hide_name": 0, + "bits": [ 112 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5206" + } + }, + "SAXIGP0ARID": { + "hide_name": 0, + "bits": [ 2759, 2760, 2761, 2762, 2763, 2764 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5685" + } + }, + "SAXIGP0ARLEN": { + "hide_name": 0, + "bits": [ 2601, 2602, 2603, 2604 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5646" + } + }, + "SAXIGP0ARLOCK": { + "hide_name": 0, + "bits": [ 1778, 1779 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5558" + } + }, + "SAXIGP0ARPROT": { + "hide_name": 0, + "bits": [ 1869, 1870, 1871 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5600" + } + }, + "SAXIGP0ARQOS": { + "hide_name": 0, + "bits": [ 2605, 2606, 2607, 2608 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5647" + } + }, + "SAXIGP0ARREADY": { + "hide_name": 0, + "bits": [ 113 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5207" + } + }, + "SAXIGP0ARSIZE": { + "hide_name": 0, + "bits": [ 1780, 1781 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5559" + } + }, + "SAXIGP0ARVALID": { + "hide_name": 0, + "bits": [ 1631 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5489" + } + }, + "SAXIGP0AWADDR": { + "hide_name": 0, + "bits": [ 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5619" + } + }, + "SAXIGP0AWBURST": { + "hide_name": 0, + "bits": [ 1782, 1783 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5560" + } + }, + "SAXIGP0AWCACHE": { + "hide_name": 0, + "bits": [ 2609, 2610, 2611, 2612 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5648" + } + }, + "SAXIGP0AWID": { + "hide_name": 0, + "bits": [ 2765, 2766, 2767, 2768, 2769, 2770 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5686" + } + }, + "SAXIGP0AWLEN": { + "hide_name": 0, + "bits": [ 2613, 2614, 2615, 2616 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5649" + } + }, + "SAXIGP0AWLOCK": { + "hide_name": 0, + "bits": [ 1784, 1785 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5561" + } + }, + "SAXIGP0AWPROT": { + "hide_name": 0, + "bits": [ 1872, 1873, 1874 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5601" + } + }, + "SAXIGP0AWQOS": { + "hide_name": 0, + "bits": [ 2617, 2618, 2619, 2620 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5650" + } + }, + "SAXIGP0AWREADY": { + "hide_name": 0, + "bits": [ 114 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5208" + } + }, + "SAXIGP0AWSIZE": { + "hide_name": 0, + "bits": [ 1786, 1787 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5562" + } + }, + "SAXIGP0AWVALID": { + "hide_name": 0, + "bits": [ 1632 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5490" + } + }, + "SAXIGP0BID": { + "hide_name": 0, + "bits": [ 779, 780, 781, 782, 783, 784 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5337" + } + }, + "SAXIGP0BREADY": { + "hide_name": 0, + "bits": [ 1633 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5491" + } + }, + "SAXIGP0BRESP": { + "hide_name": 0, + "bits": [ 270, 271 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5276" + } + }, + "SAXIGP0BVALID": { + "hide_name": 0, + "bits": [ 115 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5209" + } + }, + "SAXIGP0RDATA": { + "hide_name": 0, + "bits": [ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5313" + } + }, + "SAXIGP0RID": { + "hide_name": 0, + "bits": [ 785, 786, 787, 788, 789, 790 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5338" + } + }, + "SAXIGP0RLAST": { + "hide_name": 0, + "bits": [ 116 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5210" + } + }, + "SAXIGP0RREADY": { + "hide_name": 0, + "bits": [ 1634 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5492" + } + }, + "SAXIGP0RRESP": { + "hide_name": 0, + "bits": [ 272, 273 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5277" + } + }, + "SAXIGP0RVALID": { + "hide_name": 0, + "bits": [ 117 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5211" + } + }, + "SAXIGP0WDATA": { + "hide_name": 0, + "bits": [ 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5620" + } + }, + "SAXIGP0WID": { + "hide_name": 0, + "bits": [ 2771, 2772, 2773, 2774, 2775, 2776 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5687" + } + }, + "SAXIGP0WLAST": { + "hide_name": 0, + "bits": [ 1635 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5493" + } + }, + "SAXIGP0WREADY": { + "hide_name": 0, + "bits": [ 118 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5212" + } + }, + "SAXIGP0WSTRB": { + "hide_name": 0, + "bits": [ 2621, 2622, 2623, 2624 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5651" + } + }, + "SAXIGP0WVALID": { + "hide_name": 0, + "bits": [ 1636 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5494" + } + }, + "SAXIGP1ACLK": { + "hide_name": 0, + "bits": [ 1637 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5495" + } + }, + "SAXIGP1ARADDR": { + "hide_name": 0, + "bits": [ 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5621" + } + }, + "SAXIGP1ARBURST": { + "hide_name": 0, + "bits": [ 1788, 1789 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5563" + } + }, + "SAXIGP1ARCACHE": { + "hide_name": 0, + "bits": [ 2625, 2626, 2627, 2628 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5652" + } + }, + "SAXIGP1ARESETN": { + "hide_name": 0, + "bits": [ 119 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5213" + } + }, + "SAXIGP1ARID": { + "hide_name": 0, + "bits": [ 2777, 2778, 2779, 2780, 2781, 2782 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5688" + } + }, + "SAXIGP1ARLEN": { + "hide_name": 0, + "bits": [ 2629, 2630, 2631, 2632 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5653" + } + }, + "SAXIGP1ARLOCK": { + "hide_name": 0, + "bits": [ 1790, 1791 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5564" + } + }, + "SAXIGP1ARPROT": { + "hide_name": 0, + "bits": [ 1875, 1876, 1877 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5602" + } + }, + "SAXIGP1ARQOS": { + "hide_name": 0, + "bits": [ 2633, 2634, 2635, 2636 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5654" + } + }, + "SAXIGP1ARREADY": { + "hide_name": 0, + "bits": [ 120 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5214" + } + }, + "SAXIGP1ARSIZE": { + "hide_name": 0, + "bits": [ 1792, 1793 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5565" + } + }, + "SAXIGP1ARVALID": { + "hide_name": 0, + "bits": [ 1638 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5496" + } + }, + "SAXIGP1AWADDR": { + "hide_name": 0, + "bits": [ 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5622" + } + }, + "SAXIGP1AWBURST": { + "hide_name": 0, + "bits": [ 1794, 1795 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5566" + } + }, + "SAXIGP1AWCACHE": { + "hide_name": 0, + "bits": [ 2637, 2638, 2639, 2640 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5655" + } + }, + "SAXIGP1AWID": { + "hide_name": 0, + "bits": [ 2783, 2784, 2785, 2786, 2787, 2788 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5689" + } + }, + "SAXIGP1AWLEN": { + "hide_name": 0, + "bits": [ 2641, 2642, 2643, 2644 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5656" + } + }, + "SAXIGP1AWLOCK": { + "hide_name": 0, + "bits": [ 1796, 1797 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5567" + } + }, + "SAXIGP1AWPROT": { + "hide_name": 0, + "bits": [ 1878, 1879, 1880 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5603" + } + }, + "SAXIGP1AWQOS": { + "hide_name": 0, + "bits": [ 2645, 2646, 2647, 2648 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5657" + } + }, + "SAXIGP1AWREADY": { + "hide_name": 0, + "bits": [ 121 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5215" + } + }, + "SAXIGP1AWSIZE": { + "hide_name": 0, + "bits": [ 1798, 1799 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5568" + } + }, + "SAXIGP1AWVALID": { + "hide_name": 0, + "bits": [ 1639 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5497" + } + }, + "SAXIGP1BID": { + "hide_name": 0, + "bits": [ 791, 792, 793, 794, 795, 796 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5339" + } + }, + "SAXIGP1BREADY": { + "hide_name": 0, + "bits": [ 1640 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5498" + } + }, + "SAXIGP1BRESP": { + "hide_name": 0, + "bits": [ 274, 275 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5278" + } + }, + "SAXIGP1BVALID": { + "hide_name": 0, + "bits": [ 122 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5216" + } + }, + "SAXIGP1RDATA": { + "hide_name": 0, + "bits": [ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5314" + } + }, + "SAXIGP1RID": { + "hide_name": 0, + "bits": [ 797, 798, 799, 800, 801, 802 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5340" + } + }, + "SAXIGP1RLAST": { + "hide_name": 0, + "bits": [ 123 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5217" + } + }, + "SAXIGP1RREADY": { + "hide_name": 0, + "bits": [ 1641 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5499" + } + }, + "SAXIGP1RRESP": { + "hide_name": 0, + "bits": [ 276, 277 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5279" + } + }, + "SAXIGP1RVALID": { + "hide_name": 0, + "bits": [ 124 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5218" + } + }, + "SAXIGP1WDATA": { + "hide_name": 0, + "bits": [ 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5623" + } + }, + "SAXIGP1WID": { + "hide_name": 0, + "bits": [ 2789, 2790, 2791, 2792, 2793, 2794 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5690" + } + }, + "SAXIGP1WLAST": { + "hide_name": 0, + "bits": [ 1642 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5500" + } + }, + "SAXIGP1WREADY": { + "hide_name": 0, + "bits": [ 125 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5219" + } + }, + "SAXIGP1WSTRB": { + "hide_name": 0, + "bits": [ 2649, 2650, 2651, 2652 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5658" + } + }, + "SAXIGP1WVALID": { + "hide_name": 0, + "bits": [ 1643 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5501" + } + }, + "SAXIHP0ACLK": { + "hide_name": 0, + "bits": [ 1644 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5502" + } + }, + "SAXIHP0ARADDR": { + "hide_name": 0, + "bits": [ 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 2320 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5624" + } + }, + "SAXIHP0ARBURST": { + "hide_name": 0, + "bits": [ 1800, 1801 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5569" + } + }, + "SAXIHP0ARCACHE": { + "hide_name": 0, + "bits": [ 2653, 2654, 2655, 2656 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5659" + } + }, + "SAXIHP0ARESETN": { + "hide_name": 0, + "bits": [ 126 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5220" + } + }, + "SAXIHP0ARID": { + "hide_name": 0, + "bits": [ 2795, 2796, 2797, 2798, 2799, 2800 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5691" + } + }, + "SAXIHP0ARLEN": { + "hide_name": 0, + "bits": [ 2657, 2658, 2659, 2660 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5660" + } + }, + "SAXIHP0ARLOCK": { + "hide_name": 0, + "bits": [ 1802, 1803 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5570" + } + }, + "SAXIHP0ARPROT": { + "hide_name": 0, + "bits": [ 1881, 1882, 1883 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5604" + } + }, + "SAXIHP0ARQOS": { + "hide_name": 0, + "bits": [ 2661, 2662, 2663, 2664 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5661" + } + }, + "SAXIHP0ARREADY": { + "hide_name": 0, + "bits": [ 127 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5221" + } + }, + "SAXIHP0ARSIZE": { + "hide_name": 0, + "bits": [ 1804, 1805 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5571" + } + }, + "SAXIHP0ARVALID": { + "hide_name": 0, + "bits": [ 1645 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5503" + } + }, + "SAXIHP0AWADDR": { + "hide_name": 0, + "bits": [ 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5625" + } + }, + "SAXIHP0AWBURST": { + "hide_name": 0, + "bits": [ 1806, 1807 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5572" + } + }, + "SAXIHP0AWCACHE": { + "hide_name": 0, + "bits": [ 2665, 2666, 2667, 2668 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5662" + } + }, + "SAXIHP0AWID": { + "hide_name": 0, + "bits": [ 2801, 2802, 2803, 2804, 2805, 2806 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5692" + } + }, + "SAXIHP0AWLEN": { + "hide_name": 0, + "bits": [ 2669, 2670, 2671, 2672 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5663" + } + }, + "SAXIHP0AWLOCK": { + "hide_name": 0, + "bits": [ 1808, 1809 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5573" + } + }, + "SAXIHP0AWPROT": { + "hide_name": 0, + "bits": [ 1884, 1885, 1886 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5605" + } + }, + "SAXIHP0AWQOS": { + "hide_name": 0, + "bits": [ 2673, 2674, 2675, 2676 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5664" + } + }, + "SAXIHP0AWREADY": { + "hide_name": 0, + "bits": [ 128 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5222" + } + }, + "SAXIHP0AWSIZE": { + "hide_name": 0, + "bits": [ 1810, 1811 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5574" + } + }, + "SAXIHP0AWVALID": { + "hide_name": 0, + "bits": [ 1646 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5504" + } + }, + "SAXIHP0BID": { + "hide_name": 0, + "bits": [ 803, 804, 805, 806, 807, 808 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5341" + } + }, + "SAXIHP0BREADY": { + "hide_name": 0, + "bits": [ 1647 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5505" + } + }, + "SAXIHP0BRESP": { + "hide_name": 0, + "bits": [ 278, 279 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5280" + } + }, + "SAXIHP0BVALID": { + "hide_name": 0, + "bits": [ 129 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5223" + } + }, + "SAXIHP0RACOUNT": { + "hide_name": 0, + "bits": [ 359, 360, 361 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5301" + } + }, + "SAXIHP0RCOUNT": { + "hide_name": 0, + "bits": [ 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5362" + } + }, + "SAXIHP0RDATA": { + "hide_name": 0, + "bits": [ 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5356" + } + }, + "SAXIHP0RDISSUECAP1EN": { + "hide_name": 0, + "bits": [ 1648 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5506" + } + }, + "SAXIHP0RID": { + "hide_name": 0, + "bits": [ 809, 810, 811, 812, 813, 814 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5342" + } + }, + "SAXIHP0RLAST": { + "hide_name": 0, + "bits": [ 130 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5224" + } + }, + "SAXIHP0RREADY": { + "hide_name": 0, + "bits": [ 1649 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5507" + } + }, + "SAXIHP0RRESP": { + "hide_name": 0, + "bits": [ 280, 281 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5281" + } + }, + "SAXIHP0RVALID": { + "hide_name": 0, + "bits": [ 131 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5225" + } + }, + "SAXIHP0WACOUNT": { + "hide_name": 0, + "bits": [ 815, 816, 817, 818, 819, 820 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5343" + } + }, + "SAXIHP0WCOUNT": { + "hide_name": 0, + "bits": [ 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5363" + } + }, + "SAXIHP0WDATA": { + "hide_name": 0, + "bits": [ 2995, 2996, 2997, 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5705" + } + }, + "SAXIHP0WID": { + "hide_name": 0, + "bits": [ 2807, 2808, 2809, 2810, 2811, 2812 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5693" + } + }, + "SAXIHP0WLAST": { + "hide_name": 0, + "bits": [ 1650 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5508" + } + }, + "SAXIHP0WREADY": { + "hide_name": 0, + "bits": [ 132 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5226" + } + }, + "SAXIHP0WRISSUECAP1EN": { + "hide_name": 0, + "bits": [ 1651 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5509" + } + }, + "SAXIHP0WSTRB": { + "hide_name": 0, + "bits": [ 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5712" + } + }, + "SAXIHP0WVALID": { + "hide_name": 0, + "bits": [ 1652 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5510" + } + }, + "SAXIHP1ACLK": { + "hide_name": 0, + "bits": [ 1653 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5511" + } + }, + "SAXIHP1ARADDR": { + "hide_name": 0, + "bits": [ 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2384 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5626" + } + }, + "SAXIHP1ARBURST": { + "hide_name": 0, + "bits": [ 1812, 1813 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5575" + } + }, + "SAXIHP1ARCACHE": { + "hide_name": 0, + "bits": [ 2677, 2678, 2679, 2680 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5665" + } + }, + "SAXIHP1ARESETN": { + "hide_name": 0, + "bits": [ 133 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5227" + } + }, + "SAXIHP1ARID": { + "hide_name": 0, + "bits": [ 2813, 2814, 2815, 2816, 2817, 2818 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5694" + } + }, + "SAXIHP1ARLEN": { + "hide_name": 0, + "bits": [ 2681, 2682, 2683, 2684 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5666" + } + }, + "SAXIHP1ARLOCK": { + "hide_name": 0, + "bits": [ 1814, 1815 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5576" + } + }, + "SAXIHP1ARPROT": { + "hide_name": 0, + "bits": [ 1887, 1888, 1889 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5606" + } + }, + "SAXIHP1ARQOS": { + "hide_name": 0, + "bits": [ 2685, 2686, 2687, 2688 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5667" + } + }, + "SAXIHP1ARREADY": { + "hide_name": 0, + "bits": [ 134 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5228" + } + }, + "SAXIHP1ARSIZE": { + "hide_name": 0, + "bits": [ 1816, 1817 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5577" + } + }, + "SAXIHP1ARVALID": { + "hide_name": 0, + "bits": [ 1654 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5512" + } + }, + "SAXIHP1AWADDR": { + "hide_name": 0, + "bits": [ 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5627" + } + }, + "SAXIHP1AWBURST": { + "hide_name": 0, + "bits": [ 1818, 1819 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5578" + } + }, + "SAXIHP1AWCACHE": { + "hide_name": 0, + "bits": [ 2689, 2690, 2691, 2692 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5668" + } + }, + "SAXIHP1AWID": { + "hide_name": 0, + "bits": [ 2819, 2820, 2821, 2822, 2823, 2824 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5695" + } + }, + "SAXIHP1AWLEN": { + "hide_name": 0, + "bits": [ 2693, 2694, 2695, 2696 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5669" + } + }, + "SAXIHP1AWLOCK": { + "hide_name": 0, + "bits": [ 1820, 1821 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5579" + } + }, + "SAXIHP1AWPROT": { + "hide_name": 0, + "bits": [ 1890, 1891, 1892 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5607" + } + }, + "SAXIHP1AWQOS": { + "hide_name": 0, + "bits": [ 2697, 2698, 2699, 2700 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5670" + } + }, + "SAXIHP1AWREADY": { + "hide_name": 0, + "bits": [ 135 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5229" + } + }, + "SAXIHP1AWSIZE": { + "hide_name": 0, + "bits": [ 1822, 1823 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5580" + } + }, + "SAXIHP1AWVALID": { + "hide_name": 0, + "bits": [ 1655 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5513" + } + }, + "SAXIHP1BID": { + "hide_name": 0, + "bits": [ 821, 822, 823, 824, 825, 826 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5344" + } + }, + "SAXIHP1BREADY": { + "hide_name": 0, + "bits": [ 1656 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5514" + } + }, + "SAXIHP1BRESP": { + "hide_name": 0, + "bits": [ 282, 283 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5282" + } + }, + "SAXIHP1BVALID": { + "hide_name": 0, + "bits": [ 136 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5230" + } + }, + "SAXIHP1RACOUNT": { + "hide_name": 0, + "bits": [ 362, 363, 364 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5302" + } + }, + "SAXIHP1RCOUNT": { + "hide_name": 0, + "bits": [ 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5364" + } + }, + "SAXIHP1RDATA": { + "hide_name": 0, + "bits": [ 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5357" + } + }, + "SAXIHP1RDISSUECAP1EN": { + "hide_name": 0, + "bits": [ 1657 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5515" + } + }, + "SAXIHP1RID": { + "hide_name": 0, + "bits": [ 827, 828, 829, 830, 831, 832 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5345" + } + }, + "SAXIHP1RLAST": { + "hide_name": 0, + "bits": [ 137 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5231" + } + }, + "SAXIHP1RREADY": { + "hide_name": 0, + "bits": [ 1658 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5516" + } + }, + "SAXIHP1RRESP": { + "hide_name": 0, + "bits": [ 284, 285 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5283" + } + }, + "SAXIHP1RVALID": { + "hide_name": 0, + "bits": [ 138 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5232" + } + }, + "SAXIHP1WACOUNT": { + "hide_name": 0, + "bits": [ 833, 834, 835, 836, 837, 838 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5346" + } + }, + "SAXIHP1WCOUNT": { + "hide_name": 0, + "bits": [ 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5365" + } + }, + "SAXIHP1WDATA": { + "hide_name": 0, + "bits": [ 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5706" + } + }, + "SAXIHP1WID": { + "hide_name": 0, + "bits": [ 2825, 2826, 2827, 2828, 2829, 2830 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5696" + } + }, + "SAXIHP1WLAST": { + "hide_name": 0, + "bits": [ 1659 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5517" + } + }, + "SAXIHP1WREADY": { + "hide_name": 0, + "bits": [ 139 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5233" + } + }, + "SAXIHP1WRISSUECAP1EN": { + "hide_name": 0, + "bits": [ 1660 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5518" + } + }, + "SAXIHP1WSTRB": { + "hide_name": 0, + "bits": [ 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5713" + } + }, + "SAXIHP1WVALID": { + "hide_name": 0, + "bits": [ 1661 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5519" + } + }, + "SAXIHP2ACLK": { + "hide_name": 0, + "bits": [ 1662 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5520" + } + }, + "SAXIHP2ARADDR": { + "hide_name": 0, + "bits": [ 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5628" + } + }, + "SAXIHP2ARBURST": { + "hide_name": 0, + "bits": [ 1824, 1825 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5581" + } + }, + "SAXIHP2ARCACHE": { + "hide_name": 0, + "bits": [ 2701, 2702, 2703, 2704 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5671" + } + }, + "SAXIHP2ARESETN": { + "hide_name": 0, + "bits": [ 140 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5234" + } + }, + "SAXIHP2ARID": { + "hide_name": 0, + "bits": [ 2831, 2832, 2833, 2834, 2835, 2836 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5697" + } + }, + "SAXIHP2ARLEN": { + "hide_name": 0, + "bits": [ 2705, 2706, 2707, 2708 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5672" + } + }, + "SAXIHP2ARLOCK": { + "hide_name": 0, + "bits": [ 1826, 1827 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5582" + } + }, + "SAXIHP2ARPROT": { + "hide_name": 0, + "bits": [ 1893, 1894, 1895 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5608" + } + }, + "SAXIHP2ARQOS": { + "hide_name": 0, + "bits": [ 2709, 2710, 2711, 2712 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5673" + } + }, + "SAXIHP2ARREADY": { + "hide_name": 0, + "bits": [ 141 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5235" + } + }, + "SAXIHP2ARSIZE": { + "hide_name": 0, + "bits": [ 1828, 1829 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5583" + } + }, + "SAXIHP2ARVALID": { + "hide_name": 0, + "bits": [ 1663 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5521" + } + }, + "SAXIHP2AWADDR": { + "hide_name": 0, + "bits": [ 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5629" + } + }, + "SAXIHP2AWBURST": { + "hide_name": 0, + "bits": [ 1830, 1831 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5584" + } + }, + "SAXIHP2AWCACHE": { + "hide_name": 0, + "bits": [ 2713, 2714, 2715, 2716 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5674" + } + }, + "SAXIHP2AWID": { + "hide_name": 0, + "bits": [ 2837, 2838, 2839, 2840, 2841, 2842 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5698" + } + }, + "SAXIHP2AWLEN": { + "hide_name": 0, + "bits": [ 2717, 2718, 2719, 2720 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5675" + } + }, + "SAXIHP2AWLOCK": { + "hide_name": 0, + "bits": [ 1832, 1833 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5585" + } + }, + "SAXIHP2AWPROT": { + "hide_name": 0, + "bits": [ 1896, 1897, 1898 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5609" + } + }, + "SAXIHP2AWQOS": { + "hide_name": 0, + "bits": [ 2721, 2722, 2723, 2724 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5676" + } + }, + "SAXIHP2AWREADY": { + "hide_name": 0, + "bits": [ 142 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5236" + } + }, + "SAXIHP2AWSIZE": { + "hide_name": 0, + "bits": [ 1834, 1835 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5586" + } + }, + "SAXIHP2AWVALID": { + "hide_name": 0, + "bits": [ 1664 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5522" + } + }, + "SAXIHP2BID": { + "hide_name": 0, + "bits": [ 839, 840, 841, 842, 843, 844 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5347" + } + }, + "SAXIHP2BREADY": { + "hide_name": 0, + "bits": [ 1665 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5523" + } + }, + "SAXIHP2BRESP": { + "hide_name": 0, + "bits": [ 286, 287 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5284" + } + }, + "SAXIHP2BVALID": { + "hide_name": 0, + "bits": [ 143 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5237" + } + }, + "SAXIHP2RACOUNT": { + "hide_name": 0, + "bits": [ 365, 366, 367 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5303" + } + }, + "SAXIHP2RCOUNT": { + "hide_name": 0, + "bits": [ 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5366" + } + }, + "SAXIHP2RDATA": { + "hide_name": 0, + "bits": [ 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5358" + } + }, + "SAXIHP2RDISSUECAP1EN": { + "hide_name": 0, + "bits": [ 1666 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5524" + } + }, + "SAXIHP2RID": { + "hide_name": 0, + "bits": [ 845, 846, 847, 848, 849, 850 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5348" + } + }, + "SAXIHP2RLAST": { + "hide_name": 0, + "bits": [ 144 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5238" + } + }, + "SAXIHP2RREADY": { + "hide_name": 0, + "bits": [ 1667 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5525" + } + }, + "SAXIHP2RRESP": { + "hide_name": 0, + "bits": [ 288, 289 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5285" + } + }, + "SAXIHP2RVALID": { + "hide_name": 0, + "bits": [ 145 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5239" + } + }, + "SAXIHP2WACOUNT": { + "hide_name": 0, + "bits": [ 851, 852, 853, 854, 855, 856 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5349" + } + }, + "SAXIHP2WCOUNT": { + "hide_name": 0, + "bits": [ 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5367" + } + }, + "SAXIHP2WDATA": { + "hide_name": 0, + "bits": [ 3123, 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184, 3185, 3186 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5707" + } + }, + "SAXIHP2WID": { + "hide_name": 0, + "bits": [ 2843, 2844, 2845, 2846, 2847, 2848 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5699" + } + }, + "SAXIHP2WLAST": { + "hide_name": 0, + "bits": [ 1668 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5526" + } + }, + "SAXIHP2WREADY": { + "hide_name": 0, + "bits": [ 146 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5240" + } + }, + "SAXIHP2WRISSUECAP1EN": { + "hide_name": 0, + "bits": [ 1669 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5527" + } + }, + "SAXIHP2WSTRB": { + "hide_name": 0, + "bits": [ 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5714" + } + }, + "SAXIHP2WVALID": { + "hide_name": 0, + "bits": [ 1670 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5528" + } + }, + "SAXIHP3ACLK": { + "hide_name": 0, + "bits": [ 1671 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5529" + } + }, + "SAXIHP3ARADDR": { + "hide_name": 0, + "bits": [ 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5630" + } + }, + "SAXIHP3ARBURST": { + "hide_name": 0, + "bits": [ 1836, 1837 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5587" + } + }, + "SAXIHP3ARCACHE": { + "hide_name": 0, + "bits": [ 2725, 2726, 2727, 2728 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5677" + } + }, + "SAXIHP3ARESETN": { + "hide_name": 0, + "bits": [ 147 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5241" + } + }, + "SAXIHP3ARID": { + "hide_name": 0, + "bits": [ 2849, 2850, 2851, 2852, 2853, 2854 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5700" + } + }, + "SAXIHP3ARLEN": { + "hide_name": 0, + "bits": [ 2729, 2730, 2731, 2732 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5678" + } + }, + "SAXIHP3ARLOCK": { + "hide_name": 0, + "bits": [ 1838, 1839 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5588" + } + }, + "SAXIHP3ARPROT": { + "hide_name": 0, + "bits": [ 1899, 1900, 1901 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5610" + } + }, + "SAXIHP3ARQOS": { + "hide_name": 0, + "bits": [ 2733, 2734, 2735, 2736 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5679" + } + }, + "SAXIHP3ARREADY": { + "hide_name": 0, + "bits": [ 148 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5242" + } + }, + "SAXIHP3ARSIZE": { + "hide_name": 0, + "bits": [ 1840, 1841 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5589" + } + }, + "SAXIHP3ARVALID": { + "hide_name": 0, + "bits": [ 1672 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5530" + } + }, + "SAXIHP3AWADDR": { + "hide_name": 0, + "bits": [ 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5631" + } + }, + "SAXIHP3AWBURST": { + "hide_name": 0, + "bits": [ 1842, 1843 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5590" + } + }, + "SAXIHP3AWCACHE": { + "hide_name": 0, + "bits": [ 2737, 2738, 2739, 2740 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5680" + } + }, + "SAXIHP3AWID": { + "hide_name": 0, + "bits": [ 2855, 2856, 2857, 2858, 2859, 2860 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5701" + } + }, + "SAXIHP3AWLEN": { + "hide_name": 0, + "bits": [ 2741, 2742, 2743, 2744 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5681" + } + }, + "SAXIHP3AWLOCK": { + "hide_name": 0, + "bits": [ 1844, 1845 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5591" + } + }, + "SAXIHP3AWPROT": { + "hide_name": 0, + "bits": [ 1902, 1903, 1904 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5611" + } + }, + "SAXIHP3AWQOS": { + "hide_name": 0, + "bits": [ 2745, 2746, 2747, 2748 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5682" + } + }, + "SAXIHP3AWREADY": { + "hide_name": 0, + "bits": [ 149 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5243" + } + }, + "SAXIHP3AWSIZE": { + "hide_name": 0, + "bits": [ 1846, 1847 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5592" + } + }, + "SAXIHP3AWVALID": { + "hide_name": 0, + "bits": [ 1673 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5531" + } + }, + "SAXIHP3BID": { + "hide_name": 0, + "bits": [ 857, 858, 859, 860, 861, 862 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5350" + } + }, + "SAXIHP3BREADY": { + "hide_name": 0, + "bits": [ 1674 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5532" + } + }, + "SAXIHP3BRESP": { + "hide_name": 0, + "bits": [ 290, 291 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5286" + } + }, + "SAXIHP3BVALID": { + "hide_name": 0, + "bits": [ 150 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5244" + } + }, + "SAXIHP3RACOUNT": { + "hide_name": 0, + "bits": [ 368, 369, 370 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5304" + } + }, + "SAXIHP3RCOUNT": { + "hide_name": 0, + "bits": [ 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5368" + } + }, + "SAXIHP3RDATA": { + "hide_name": 0, + "bits": [ 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5359" + } + }, + "SAXIHP3RDISSUECAP1EN": { + "hide_name": 0, + "bits": [ 1675 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5533" + } + }, + "SAXIHP3RID": { + "hide_name": 0, + "bits": [ 863, 864, 865, 866, 867, 868 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5351" + } + }, + "SAXIHP3RLAST": { + "hide_name": 0, + "bits": [ 151 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5245" + } + }, + "SAXIHP3RREADY": { + "hide_name": 0, + "bits": [ 1676 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5534" + } + }, + "SAXIHP3RRESP": { + "hide_name": 0, + "bits": [ 292, 293 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5287" + } + }, + "SAXIHP3RVALID": { + "hide_name": 0, + "bits": [ 152 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5246" + } + }, + "SAXIHP3WACOUNT": { + "hide_name": 0, + "bits": [ 869, 870, 871, 872, 873, 874 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5352" + } + }, + "SAXIHP3WCOUNT": { + "hide_name": 0, + "bits": [ 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5369" + } + }, + "SAXIHP3WDATA": { + "hide_name": 0, + "bits": [ 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5708" + } + }, + "SAXIHP3WID": { + "hide_name": 0, + "bits": [ 2861, 2862, 2863, 2864, 2865, 2866 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5702" + } + }, + "SAXIHP3WLAST": { + "hide_name": 0, + "bits": [ 1677 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5535" + } + }, + "SAXIHP3WREADY": { + "hide_name": 0, + "bits": [ 153 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5247" + } + }, + "SAXIHP3WRISSUECAP1EN": { + "hide_name": 0, + "bits": [ 1678 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5536" + } + }, + "SAXIHP3WSTRB": { + "hide_name": 0, + "bits": [ 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5715" + } + }, + "SAXIHP3WVALID": { + "hide_name": 0, + "bits": [ 1679 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5537" + } + } + } + }, + "PULLDOWN": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4674" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + } + }, + "cells": { + }, + "netnames": { + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4675" + } + } + } + }, + "PULLUP": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4678" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + } + }, + "cells": { + }, + "netnames": { + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4679" + } + } + } + }, + "RAM128X1D": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:488" + }, + "ports": { + "DPO": { + "direction": "output", + "bits": [ 2 ] + }, + "SPO": { + "direction": "output", + "bits": [ 3 ] + }, + "D": { + "direction": "input", + "bits": [ 4 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 5 ] + }, + "WE": { + "direction": "input", + "bits": [ 6 ] + }, + "A": { + "direction": "input", + "bits": [ 7, 8, 9, 10, 11, 12, 13 ] + }, + "DPRA": { + "direction": "input", + "bits": [ 14, 15, 16, 17, 18, 19, 20 ] + } + }, + "cells": { + }, + "netnames": { + "A": { + "hide_name": 0, + "bits": [ 7, 8, 9, 10, 11, 12, 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:497" + } + }, + "D": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:492" + } + }, + "DPO": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 1153, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:491" + } + }, + "DPRA": { + "hide_name": 0, + "bits": [ 14, 15, 16, 17, 18, 19, 20 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:497" + } + }, + "SPO": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "abc9_arrival": 1153, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:491" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:495" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:496" + } + } + } + }, + "RAM128X1S": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4781" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "A4": { + "direction": "input", + "bits": [ 7 ] + }, + "A5": { + "direction": "input", + "bits": [ 8 ] + }, + "A6": { + "direction": "input", + "bits": [ 9 ] + }, + "D": { + "direction": "input", + "bits": [ 10 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 11 ] + }, + "WE": { + "direction": "input", + "bits": [ 12 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4785" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4786" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4787" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4788" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4789" + } + }, + "A5": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4790" + } + }, + "A6": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4791" + } + }, + "D": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4792" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4784" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4795" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4796" + } + } + } + }, + "RAM256X1S": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4799" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A": { + "direction": "input", + "bits": [ 3, 4, 5, 6, 7, 8, 9, 10 ] + }, + "D": { + "direction": "input", + "bits": [ 11 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 12 ] + }, + "WE": { + "direction": "input", + "bits": [ 13 ] + } + }, + "cells": { + }, + "netnames": { + "A": { + "hide_name": 0, + "bits": [ 3, 4, 5, 6, 7, 8, 9, 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4803" + } + }, + "D": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4804" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4802" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4807" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4808" + } + } + } + }, + "RAM32M": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4811" + }, + "ports": { + "DOA": { + "direction": "output", + "bits": [ 2, 3 ] + }, + "DOB": { + "direction": "output", + "bits": [ 4, 5 ] + }, + "DOC": { + "direction": "output", + "bits": [ 6, 7 ] + }, + "DOD": { + "direction": "output", + "bits": [ 8, 9 ] + }, + "ADDRA": { + "direction": "input", + "bits": [ 10, 11, 12, 13, 14 ] + }, + "ADDRB": { + "direction": "input", + "bits": [ 15, 16, 17, 18, 19 ] + }, + "ADDRC": { + "direction": "input", + "bits": [ 20, 21, 22, 23, 24 ] + }, + "ADDRD": { + "direction": "input", + "bits": [ 25, 26, 27, 28, 29 ] + }, + "DIA": { + "direction": "input", + "bits": [ 30, 31 ] + }, + "DIB": { + "direction": "input", + "bits": [ 32, 33 ] + }, + "DIC": { + "direction": "input", + "bits": [ 34, 35 ] + }, + "DID": { + "direction": "input", + "bits": [ 36, 37 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 38 ] + }, + "WE": { + "direction": "input", + "bits": [ 39 ] + } + }, + "cells": { + }, + "netnames": { + "ADDRA": { + "hide_name": 0, + "bits": [ 10, 11, 12, 13, 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4821" + } + }, + "ADDRB": { + "hide_name": 0, + "bits": [ 15, 16, 17, 18, 19 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4822" + } + }, + "ADDRC": { + "hide_name": 0, + "bits": [ 20, 21, 22, 23, 24 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4823" + } + }, + "ADDRD": { + "hide_name": 0, + "bits": [ 25, 26, 27, 28, 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4824" + } + }, + "DIA": { + "hide_name": 0, + "bits": [ 30, 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4825" + } + }, + "DIB": { + "hide_name": 0, + "bits": [ 32, 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4826" + } + }, + "DIC": { + "hide_name": 0, + "bits": [ 34, 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4827" + } + }, + "DID": { + "hide_name": 0, + "bits": [ 36, 37 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4828" + } + }, + "DOA": { + "hide_name": 0, + "bits": [ 2, 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4817" + } + }, + "DOB": { + "hide_name": 0, + "bits": [ 4, 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4818" + } + }, + "DOC": { + "hide_name": 0, + "bits": [ 6, 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4819" + } + }, + "DOD": { + "hide_name": 0, + "bits": [ 8, 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4820" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 38 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4831" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4832" + } + } + } + }, + "RAM32X1D": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:442" + }, + "ports": { + "DPO": { + "direction": "output", + "bits": [ 2 ] + }, + "SPO": { + "direction": "output", + "bits": [ 3 ] + }, + "D": { + "direction": "input", + "bits": [ 4 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 5 ] + }, + "WE": { + "direction": "input", + "bits": [ 6 ] + }, + "A0": { + "direction": "input", + "bits": [ 7 ] + }, + "A1": { + "direction": "input", + "bits": [ 8 ] + }, + "A2": { + "direction": "input", + "bits": [ 9 ] + }, + "A3": { + "direction": "input", + "bits": [ 10 ] + }, + "A4": { + "direction": "input", + "bits": [ 11 ] + }, + "DPRA0": { + "direction": "input", + "bits": [ 12 ] + }, + "DPRA1": { + "direction": "input", + "bits": [ 13 ] + }, + "DPRA2": { + "direction": "input", + "bits": [ 14 ] + }, + "DPRA3": { + "direction": "input", + "bits": [ 15 ] + }, + "DPRA4": { + "direction": "input", + "bits": [ 16 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" + } + }, + "D": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:446" + } + }, + "DPO": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 1153, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:445" + } + }, + "DPRA0": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" + } + }, + "DPRA1": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" + } + }, + "DPRA2": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" + } + }, + "DPRA3": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" + } + }, + "DPRA4": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" + } + }, + "SPO": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "abc9_arrival": 1153, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:445" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:449" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:450" + } + } + } + }, + "RAM32X1S": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4835" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "A4": { + "direction": "input", + "bits": [ 7 ] + }, + "D": { + "direction": "input", + "bits": [ 8 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 9 ] + }, + "WE": { + "direction": "input", + "bits": [ 10 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4839" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4840" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4841" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4842" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4843" + } + }, + "D": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4844" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4838" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4847" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4848" + } + } + } + }, + "RAM32X1S_1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4851" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "A4": { + "direction": "input", + "bits": [ 7 ] + }, + "D": { + "direction": "input", + "bits": [ 8 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 9 ] + }, + "WE": { + "direction": "input", + "bits": [ 10 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4855" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4856" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4857" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4858" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4859" + } + }, + "D": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4860" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4854" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4863" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4864" + } + } + } + }, + "RAM32X2S": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4867" + }, + "ports": { + "O0": { + "direction": "output", + "bits": [ 2 ] + }, + "O1": { + "direction": "output", + "bits": [ 3 ] + }, + "A0": { + "direction": "input", + "bits": [ 4 ] + }, + "A1": { + "direction": "input", + "bits": [ 5 ] + }, + "A2": { + "direction": "input", + "bits": [ 6 ] + }, + "A3": { + "direction": "input", + "bits": [ 7 ] + }, + "A4": { + "direction": "input", + "bits": [ 8 ] + }, + "D0": { + "direction": "input", + "bits": [ 9 ] + }, + "D1": { + "direction": "input", + "bits": [ 10 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 11 ] + }, + "WE": { + "direction": "input", + "bits": [ 12 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4873" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4874" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4875" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4876" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4877" + } + }, + "D0": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4878" + } + }, + "D1": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4879" + } + }, + "O0": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4871" + } + }, + "O1": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4872" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4882" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4883" + } + } + } + }, + "RAM64M": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4886" + }, + "ports": { + "DOA": { + "direction": "output", + "bits": [ 2 ] + }, + "DOB": { + "direction": "output", + "bits": [ 3 ] + }, + "DOC": { + "direction": "output", + "bits": [ 4 ] + }, + "DOD": { + "direction": "output", + "bits": [ 5 ] + }, + "ADDRA": { + "direction": "input", + "bits": [ 6, 7, 8, 9, 10, 11 ] + }, + "ADDRB": { + "direction": "input", + "bits": [ 12, 13, 14, 15, 16, 17 ] + }, + "ADDRC": { + "direction": "input", + "bits": [ 18, 19, 20, 21, 22, 23 ] + }, + "ADDRD": { + "direction": "input", + "bits": [ 24, 25, 26, 27, 28, 29 ] + }, + "DIA": { + "direction": "input", + "bits": [ 30 ] + }, + "DIB": { + "direction": "input", + "bits": [ 31 ] + }, + "DIC": { + "direction": "input", + "bits": [ 32 ] + }, + "DID": { + "direction": "input", + "bits": [ 33 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 34 ] + }, + "WE": { + "direction": "input", + "bits": [ 35 ] + } + }, + "cells": { + }, + "netnames": { + "ADDRA": { + "hide_name": 0, + "bits": [ 6, 7, 8, 9, 10, 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4896" + } + }, + "ADDRB": { + "hide_name": 0, + "bits": [ 12, 13, 14, 15, 16, 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4897" + } + }, + "ADDRC": { + "hide_name": 0, + "bits": [ 18, 19, 20, 21, 22, 23 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4898" + } + }, + "ADDRD": { + "hide_name": 0, + "bits": [ 24, 25, 26, 27, 28, 29 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4899" + } + }, + "DIA": { + "hide_name": 0, + "bits": [ 30 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4900" + } + }, + "DIB": { + "hide_name": 0, + "bits": [ 31 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4901" + } + }, + "DIC": { + "hide_name": 0, + "bits": [ 32 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4902" + } + }, + "DID": { + "hide_name": 0, + "bits": [ 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4903" + } + }, + "DOA": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4892" + } + }, + "DOB": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4893" + } + }, + "DOC": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4894" + } + }, + "DOD": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4895" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 34 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4906" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4907" + } + } + } + }, + "RAM64X1D": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:465" + }, + "ports": { + "DPO": { + "direction": "output", + "bits": [ 2 ] + }, + "SPO": { + "direction": "output", + "bits": [ 3 ] + }, + "D": { + "direction": "input", + "bits": [ 4 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 5 ] + }, + "WE": { + "direction": "input", + "bits": [ 6 ] + }, + "A0": { + "direction": "input", + "bits": [ 7 ] + }, + "A1": { + "direction": "input", + "bits": [ 8 ] + }, + "A2": { + "direction": "input", + "bits": [ 9 ] + }, + "A3": { + "direction": "input", + "bits": [ 10 ] + }, + "A4": { + "direction": "input", + "bits": [ 11 ] + }, + "A5": { + "direction": "input", + "bits": [ 12 ] + }, + "DPRA0": { + "direction": "input", + "bits": [ 13 ] + }, + "DPRA1": { + "direction": "input", + "bits": [ 14 ] + }, + "DPRA2": { + "direction": "input", + "bits": [ 15 ] + }, + "DPRA3": { + "direction": "input", + "bits": [ 16 ] + }, + "DPRA4": { + "direction": "input", + "bits": [ 17 ] + }, + "DPRA5": { + "direction": "input", + "bits": [ 18 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" + } + }, + "A5": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" + } + }, + "D": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:469" + } + }, + "DPO": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 1153, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:468" + } + }, + "DPRA0": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" + } + }, + "DPRA1": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" + } + }, + "DPRA2": { + "hide_name": 0, + "bits": [ 15 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" + } + }, + "DPRA3": { + "hide_name": 0, + "bits": [ 16 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" + } + }, + "DPRA4": { + "hide_name": 0, + "bits": [ 17 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" + } + }, + "DPRA5": { + "hide_name": 0, + "bits": [ 18 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" + } + }, + "SPO": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "abc9_arrival": 1153, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:468" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:472" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:473" + } + } + } + }, + "RAM64X1S": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4910" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "A4": { + "direction": "input", + "bits": [ 7 ] + }, + "A5": { + "direction": "input", + "bits": [ 8 ] + }, + "D": { + "direction": "input", + "bits": [ 9 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 10 ] + }, + "WE": { + "direction": "input", + "bits": [ 11 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4914" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4915" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4916" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4917" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4918" + } + }, + "A5": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4919" + } + }, + "D": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4920" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4913" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4923" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4924" + } + } + } + }, + "RAM64X1S_1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4927" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "A4": { + "direction": "input", + "bits": [ 7 ] + }, + "A5": { + "direction": "input", + "bits": [ 8 ] + }, + "D": { + "direction": "input", + "bits": [ 9 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 10 ] + }, + "WE": { + "direction": "input", + "bits": [ 11 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4931" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4932" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4933" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4934" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4935" + } + }, + "A5": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4936" + } + }, + "D": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4937" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4930" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4940" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4941" + } + } + } + }, + "RAM64X2S": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4944" + }, + "ports": { + "O0": { + "direction": "output", + "bits": [ 2 ] + }, + "O1": { + "direction": "output", + "bits": [ 3 ] + }, + "A0": { + "direction": "input", + "bits": [ 4 ] + }, + "A1": { + "direction": "input", + "bits": [ 5 ] + }, + "A2": { + "direction": "input", + "bits": [ 6 ] + }, + "A3": { + "direction": "input", + "bits": [ 7 ] + }, + "A4": { + "direction": "input", + "bits": [ 8 ] + }, + "A5": { + "direction": "input", + "bits": [ 9 ] + }, + "D0": { + "direction": "input", + "bits": [ 10 ] + }, + "D1": { + "direction": "input", + "bits": [ 11 ] + }, + "WCLK": { + "direction": "input", + "bits": [ 12 ] + }, + "WE": { + "direction": "input", + "bits": [ 13 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4950" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4951" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4952" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4953" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4954" + } + }, + "A5": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4955" + } + }, + "D0": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4956" + } + }, + "D1": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4957" + } + }, + "O0": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4948" + } + }, + "O1": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4949" + } + }, + "WCLK": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_WCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4960" + } + }, + "WE": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4961" + } + } + } + }, + "RAMB18E1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:3" + }, + "ports": { + "CLKARDCLK": { + "direction": "input", + "bits": [ 2 ] + }, + "CLKBWRCLK": { + "direction": "input", + "bits": [ 3 ] + }, + "ENARDEN": { + "direction": "input", + "bits": [ 4 ] + }, + "ENBWREN": { + "direction": "input", + "bits": [ 5 ] + }, + "REGCEAREGCE": { + "direction": "input", + "bits": [ 6 ] + }, + "REGCEB": { + "direction": "input", + "bits": [ 7 ] + }, + "RSTRAMARSTRAM": { + "direction": "input", + "bits": [ 8 ] + }, + "RSTRAMB": { + "direction": "input", + "bits": [ 9 ] + }, + "RSTREGARSTREG": { + "direction": "input", + "bits": [ 10 ] + }, + "RSTREGB": { + "direction": "input", + "bits": [ 11 ] + }, + "ADDRARDADDR": { + "direction": "input", + "bits": [ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ] + }, + "ADDRBWRADDR": { + "direction": "input", + "bits": [ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ] + }, + "DIADI": { + "direction": "input", + "bits": [ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55 ] + }, + "DIBDI": { + "direction": "input", + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 ] + }, + "DIPADIP": { + "direction": "input", + "bits": [ 72, 73 ] + }, + "DIPBDIP": { + "direction": "input", + "bits": [ 74, 75 ] + }, + "WEA": { + "direction": "input", + "bits": [ 76, 77 ] + }, + "WEBWE": { + "direction": "input", + "bits": [ 78, 79, 80, 81 ] + }, + "DOADO": { + "direction": "output", + "bits": [ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 ] + }, + "DOBDO": { + "direction": "output", + "bits": [ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113 ] + }, + "DOPADOP": { + "direction": "output", + "bits": [ 114, 115 ] + }, + "DOPBDOP": { + "direction": "output", + "bits": [ 116, 117 ] + } + }, + "cells": { + }, + "netnames": { + "ADDRARDADDR": { + "hide_name": 0, + "bits": [ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:25" + } + }, + "ADDRBWRADDR": { + "hide_name": 0, + "bits": [ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:26" + } + }, + "CLKARDCLK": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLKARDCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:6" + } + }, + "CLKBWRCLK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLKBWRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:9" + } + }, + "DIADI": { + "hide_name": 0, + "bits": [ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:27" + } + }, + "DIBDI": { + "hide_name": 0, + "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:28" + } + }, + "DIPADIP": { + "hide_name": 0, + "bits": [ 72, 73 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:29" + } + }, + "DIPBDIP": { + "hide_name": 0, + "bits": [ 74, 75 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:30" + } + }, + "DOADO": { + "hide_name": 0, + "bits": [ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 ], + "attributes": { + "abc9_arrival": 2454, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:35" + } + }, + "DOBDO": { + "hide_name": 0, + "bits": [ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113 ], + "attributes": { + "abc9_arrival": 2454, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:37" + } + }, + "DOPADOP": { + "hide_name": 0, + "bits": [ 114, 115 ], + "attributes": { + "abc9_arrival": 2454, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:39" + } + }, + "DOPBDOP": { + "hide_name": 0, + "bits": [ 116, 117 ], + "attributes": { + "abc9_arrival": 2454, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:41" + } + }, + "ENARDEN": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "invertible_pin": "IS_ENARDEN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:11" + } + }, + "ENBWREN": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_ENBWREN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:13" + } + }, + "REGCEAREGCE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:14" + } + }, + "REGCEB": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:15" + } + }, + "RSTRAMARSTRAM": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "invertible_pin": "IS_RSTRAMARSTRAM_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:17" + } + }, + "RSTRAMB": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "invertible_pin": "IS_RSTRAMB_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:19" + } + }, + "RSTREGARSTREG": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "invertible_pin": "IS_RSTREGARSTREG_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:21" + } + }, + "RSTREGB": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "invertible_pin": "IS_RSTREGB_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:23" + } + }, + "WEA": { + "hide_name": 0, + "bits": [ 76, 77 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:31" + } + }, + "WEBWE": { + "hide_name": 0, + "bits": [ 78, 79, 80, 81 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:32" + } + } + } + }, + "RAMB36E1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:141" + }, + "ports": { + "CLKARDCLK": { + "direction": "input", + "bits": [ 2 ] + }, + "CLKBWRCLK": { + "direction": "input", + "bits": [ 3 ] + }, + "ENARDEN": { + "direction": "input", + "bits": [ 4 ] + }, + "ENBWREN": { + "direction": "input", + "bits": [ 5 ] + }, + "REGCEAREGCE": { + "direction": "input", + "bits": [ 6 ] + }, + "REGCEB": { + "direction": "input", + "bits": [ 7 ] + }, + "RSTRAMARSTRAM": { + "direction": "input", + "bits": [ 8 ] + }, + "RSTRAMB": { + "direction": "input", + "bits": [ 9 ] + }, + "RSTREGARSTREG": { + "direction": "input", + "bits": [ 10 ] + }, + "RSTREGB": { + "direction": "input", + "bits": [ 11 ] + }, + "ADDRARDADDR": { + "direction": "input", + "bits": [ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 ] + }, + "ADDRBWRADDR": { + "direction": "input", + "bits": [ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ] + }, + "DIADI": { + "direction": "input", + "bits": [ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75 ] + }, + "DIBDI": { + "direction": "input", + "bits": [ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107 ] + }, + "DIPADIP": { + "direction": "input", + "bits": [ 108, 109, 110, 111 ] + }, + "DIPBDIP": { + "direction": "input", + "bits": [ 112, 113, 114, 115 ] + }, + "WEA": { + "direction": "input", + "bits": [ 116, 117, 118, 119 ] + }, + "WEBWE": { + "direction": "input", + "bits": [ 120, 121, 122, 123, 124, 125, 126, 127 ] + }, + "DOADO": { + "direction": "output", + "bits": [ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159 ] + }, + "DOBDO": { + "direction": "output", + "bits": [ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191 ] + }, + "DOPADOP": { + "direction": "output", + "bits": [ 192, 193, 194, 195 ] + }, + "DOPBDOP": { + "direction": "output", + "bits": [ 196, 197, 198, 199 ] + } + }, + "cells": { + }, + "netnames": { + "ADDRARDADDR": { + "hide_name": 0, + "bits": [ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:163" + } + }, + "ADDRBWRADDR": { + "hide_name": 0, + "bits": [ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:164" + } + }, + "CLKARDCLK": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLKARDCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:144" + } + }, + "CLKBWRCLK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLKBWRCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:147" + } + }, + "DIADI": { + "hide_name": 0, + "bits": [ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:165" + } + }, + "DIBDI": { + "hide_name": 0, + "bits": [ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:166" + } + }, + "DIPADIP": { + "hide_name": 0, + "bits": [ 108, 109, 110, 111 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:167" + } + }, + "DIPBDIP": { + "hide_name": 0, + "bits": [ 112, 113, 114, 115 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:168" + } + }, + "DOADO": { + "hide_name": 0, + "bits": [ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159 ], + "attributes": { + "abc9_arrival": 2454, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:173" + } + }, + "DOBDO": { + "hide_name": 0, + "bits": [ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191 ], + "attributes": { + "abc9_arrival": 2454, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:175" + } + }, + "DOPADOP": { + "hide_name": 0, + "bits": [ 192, 193, 194, 195 ], + "attributes": { + "abc9_arrival": 2454, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:177" + } + }, + "DOPBDOP": { + "hide_name": 0, + "bits": [ 196, 197, 198, 199 ], + "attributes": { + "abc9_arrival": 2454, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:179" + } + }, + "ENARDEN": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "invertible_pin": "IS_ENARDEN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:149" + } + }, + "ENBWREN": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "invertible_pin": "IS_ENBWREN_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:151" + } + }, + "REGCEAREGCE": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:152" + } + }, + "REGCEB": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:153" + } + }, + "RSTRAMARSTRAM": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "invertible_pin": "IS_RSTRAMARSTRAM_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:155" + } + }, + "RSTRAMB": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "invertible_pin": "IS_RSTRAMB_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:157" + } + }, + "RSTREGARSTREG": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "invertible_pin": "IS_RSTREGARSTREG_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:159" + } + }, + "RSTREGB": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "invertible_pin": "IS_RSTREGB_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:161" + } + }, + "WEA": { + "hide_name": 0, + "bits": [ 116, 117, 118, 119 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:169" + } + }, + "WEBWE": { + "hide_name": 0, + "bits": [ 120, 121, 122, 123, 124, 125, 126, 127 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:170" + } + } + } + }, + "ROM128X1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4964" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "A4": { + "direction": "input", + "bits": [ 7 ] + }, + "A5": { + "direction": "input", + "bits": [ 8 ] + }, + "A6": { + "direction": "input", + "bits": [ 9 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4967" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4968" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4969" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4970" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4971" + } + }, + "A5": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4972" + } + }, + "A6": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4973" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4966" + } + } + } + }, + "ROM256X1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4976" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "A4": { + "direction": "input", + "bits": [ 7 ] + }, + "A5": { + "direction": "input", + "bits": [ 8 ] + }, + "A6": { + "direction": "input", + "bits": [ 9 ] + }, + "A7": { + "direction": "input", + "bits": [ 10 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4979" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4980" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4981" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4982" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4983" + } + }, + "A5": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4984" + } + }, + "A6": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4985" + } + }, + "A7": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4986" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4978" + } + } + } + }, + "ROM32X1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4989" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "A4": { + "direction": "input", + "bits": [ 7 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4992" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4993" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4994" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4995" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4996" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4991" + } + } + } + }, + "ROM64X1": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4999" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "A4": { + "direction": "input", + "bits": [ 7 ] + }, + "A5": { + "direction": "input", + "bits": [ 8 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5002" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5003" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5004" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5005" + } + }, + "A4": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5006" + } + }, + "A5": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5007" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5001" + } + } + } + }, + "SRL16E": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:508" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "A0": { + "direction": "input", + "bits": [ 3 ] + }, + "A1": { + "direction": "input", + "bits": [ 4 ] + }, + "A2": { + "direction": "input", + "bits": [ 5 ] + }, + "A3": { + "direction": "input", + "bits": [ 6 ] + }, + "CE": { + "direction": "input", + "bits": [ 7 ] + }, + "CLK": { + "direction": "input", + "bits": [ 8 ] + }, + "D": { + "direction": "input", + "bits": [ 9 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:515" + } + }, + "D": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:516" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 1472, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:511" + } + } + } + }, + "SRLC16E": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:532" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "Q15": { + "direction": "output", + "bits": [ 3 ] + }, + "A0": { + "direction": "input", + "bits": [ 4 ] + }, + "A1": { + "direction": "input", + "bits": [ 5 ] + }, + "A2": { + "direction": "input", + "bits": [ 6 ] + }, + "A3": { + "direction": "input", + "bits": [ 7 ] + }, + "CE": { + "direction": "input", + "bits": [ 8 ] + }, + "CLK": { + "direction": "input", + "bits": [ 9 ] + }, + "D": { + "direction": "input", + "bits": [ 10 ] + } + }, + "cells": { + }, + "netnames": { + "A0": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" + } + }, + "A1": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" + } + }, + "A2": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" + } + }, + "A3": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:538" + } + }, + "D": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:539" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:533" + } + }, + "Q15": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:534" + } + } + } + }, + "SRLC32E": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:556" + }, + "ports": { + "Q": { + "direction": "output", + "bits": [ 2 ] + }, + "Q31": { + "direction": "output", + "bits": [ 3 ] + }, + "A": { + "direction": "input", + "bits": [ 4, 5, 6, 7, 8 ] + }, + "CE": { + "direction": "input", + "bits": [ 9 ] + }, + "CLK": { + "direction": "input", + "bits": [ 10 ] + }, + "D": { + "direction": "input", + "bits": [ 11 ] + } + }, + "cells": { + }, + "netnames": { + "A": { + "hide_name": 0, + "bits": [ 4, 5, 6, 7, 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:562" + } + }, + "CE": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:563" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "clkbuf_sink": 1, + "invertible_pin": "IS_CLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:566" + } + }, + "D": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:567" + } + }, + "Q": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "abc9_arrival": 1472, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:559" + } + }, + "Q31": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "abc9_arrival": 1114, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:561" + } + } + } + }, + "STARTUPE2": { + "attributes": { + "blackbox": 1, + "keep": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3777" + }, + "ports": { + "CFGCLK": { + "direction": "output", + "bits": [ 2 ] + }, + "CFGMCLK": { + "direction": "output", + "bits": [ 3 ] + }, + "EOS": { + "direction": "output", + "bits": [ 4 ] + }, + "PREQ": { + "direction": "output", + "bits": [ 5 ] + }, + "CLK": { + "direction": "input", + "bits": [ 6 ] + }, + "GSR": { + "direction": "input", + "bits": [ 7 ] + }, + "GTS": { + "direction": "input", + "bits": [ 8 ] + }, + "KEYCLEARB": { + "direction": "input", + "bits": [ 9 ] + }, + "PACK": { + "direction": "input", + "bits": [ 10 ] + }, + "USRCCLKO": { + "direction": "input", + "bits": [ 11 ] + }, + "USRCCLKTS": { + "direction": "input", + "bits": [ 12 ] + }, + "USRDONEO": { + "direction": "input", + "bits": [ 13 ] + }, + "USRDONETS": { + "direction": "input", + "bits": [ 14 ] + } + }, + "cells": { + }, + "netnames": { + "CFGCLK": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3780" + } + }, + "CFGMCLK": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3781" + } + }, + "CLK": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3784" + } + }, + "EOS": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3782" + } + }, + "GSR": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3785" + } + }, + "GTS": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3786" + } + }, + "KEYCLEARB": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3787" + } + }, + "PACK": { + "hide_name": 0, + "bits": [ 10 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3788" + } + }, + "PREQ": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3783" + } + }, + "USRCCLKO": { + "hide_name": 0, + "bits": [ 11 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3789" + } + }, + "USRCCLKTS": { + "hide_name": 0, + "bits": [ 12 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3790" + } + }, + "USRDONEO": { + "hide_name": 0, + "bits": [ 13 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3791" + } + }, + "USRDONETS": { + "hide_name": 0, + "bits": [ 14 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3792" + } + } + } + }, + "USR_ACCESSE2": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3795" + }, + "ports": { + "CFGCLK": { + "direction": "output", + "bits": [ 2 ] + }, + "DATAVALID": { + "direction": "output", + "bits": [ 3 ] + }, + "DATA": { + "direction": "output", + "bits": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 ] + } + }, + "cells": { + }, + "netnames": { + "CFGCLK": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3796" + } + }, + "DATA": { + "hide_name": 0, + "bits": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3798" + } + }, + "DATAVALID": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3797" + } + } + } + }, + "VCC": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:24" + }, + "ports": { + "P": { + "direction": "output", + "bits": [ 2 ] + } + }, + "cells": { + }, + "netnames": { + "P": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:24" + } + } + } + }, + "XADC": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3314" + }, + "ports": { + "BUSY": { + "direction": "output", + "bits": [ 2 ] + }, + "DRDY": { + "direction": "output", + "bits": [ 3 ] + }, + "EOC": { + "direction": "output", + "bits": [ 4 ] + }, + "EOS": { + "direction": "output", + "bits": [ 5 ] + }, + "JTAGBUSY": { + "direction": "output", + "bits": [ 6 ] + }, + "JTAGLOCKED": { + "direction": "output", + "bits": [ 7 ] + }, + "JTAGMODIFIED": { + "direction": "output", + "bits": [ 8 ] + }, + "OT": { + "direction": "output", + "bits": [ 9 ] + }, + "DO": { + "direction": "output", + "bits": [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ] + }, + "ALM": { + "direction": "output", + "bits": [ 26, 27, 28, 29, 30, 31, 32, 33 ] + }, + "CHANNEL": { + "direction": "output", + "bits": [ 34, 35, 36, 37, 38 ] + }, + "MUXADDR": { + "direction": "output", + "bits": [ 39, 40, 41, 42, 43 ] + }, + "CONVST": { + "direction": "input", + "bits": [ 44 ] + }, + "CONVSTCLK": { + "direction": "input", + "bits": [ 45 ] + }, + "DCLK": { + "direction": "input", + "bits": [ 46 ] + }, + "DEN": { + "direction": "input", + "bits": [ 47 ] + }, + "DWE": { + "direction": "input", + "bits": [ 48 ] + }, + "RESET": { + "direction": "input", + "bits": [ 49 ] + }, + "VN": { + "direction": "input", + "bits": [ 50 ] + }, + "VP": { + "direction": "input", + "bits": [ 51 ] + }, + "DI": { + "direction": "input", + "bits": [ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 ] + }, + "VAUXN": { + "direction": "input", + "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 ] + }, + "VAUXP": { + "direction": "input", + "bits": [ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ] + }, + "DADDR": { + "direction": "input", + "bits": [ 100, 101, 102, 103, 104, 105, 106 ] + } + }, + "cells": { + }, + "netnames": { + "ALM": { + "hide_name": 0, + "bits": [ 26, 27, 28, 29, 30, 31, 32, 33 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3360" + } + }, + "BUSY": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3351" + } + }, + "CHANNEL": { + "hide_name": 0, + "bits": [ 34, 35, 36, 37, 38 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3361" + } + }, + "CONVST": { + "hide_name": 0, + "bits": [ 44 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3363" + } + }, + "CONVSTCLK": { + "hide_name": 0, + "bits": [ 45 ], + "attributes": { + "invertible_pin": "IS_CONVSTCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3365" + } + }, + "DADDR": { + "hide_name": 0, + "bits": [ 100, 101, 102, 103, 104, 105, 106 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3376" + } + }, + "DCLK": { + "hide_name": 0, + "bits": [ 46 ], + "attributes": { + "invertible_pin": "IS_DCLK_INVERTED", + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3367" + } + }, + "DEN": { + "hide_name": 0, + "bits": [ 47 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3368" + } + }, + "DI": { + "hide_name": 0, + "bits": [ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3373" + } + }, + "DO": { + "hide_name": 0, + "bits": [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3359" + } + }, + "DRDY": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3352" + } + }, + "DWE": { + "hide_name": 0, + "bits": [ 48 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3369" + } + }, + "EOC": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3353" + } + }, + "EOS": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3354" + } + }, + "JTAGBUSY": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3355" + } + }, + "JTAGLOCKED": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3356" + } + }, + "JTAGMODIFIED": { + "hide_name": 0, + "bits": [ 8 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3357" + } + }, + "MUXADDR": { + "hide_name": 0, + "bits": [ 39, 40, 41, 42, 43 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3362" + } + }, + "OT": { + "hide_name": 0, + "bits": [ 9 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3358" + } + }, + "RESET": { + "hide_name": 0, + "bits": [ 49 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3370" + } + }, + "VAUXN": { + "hide_name": 0, + "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3374" + } + }, + "VAUXP": { + "hide_name": 0, + "bits": [ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3375" + } + }, + "VN": { + "hide_name": 0, + "bits": [ 50 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3371" + } + }, + "VP": { + "hide_name": 0, + "bits": [ 51 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3372" + } + } + } + }, + "XORCY": { + "attributes": { + "blackbox": 1, + "cells_not_processed": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:208" + }, + "ports": { + "O": { + "direction": "output", + "bits": [ 2 ] + }, + "CI": { + "direction": "input", + "bits": [ 3 ] + }, + "LI": { + "direction": "input", + "bits": [ 4 ] + } + }, + "cells": { + }, + "netnames": { + "CI": { + "hide_name": 0, + "bits": [ 3 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:208" + } + }, + "LI": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:208" + } + }, + "O": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:208" + } + } + } + }, + "top": { + "attributes": { + "dynports": 1, + "top": 1, + "src": "counter.v:1" + }, + "ports": { + "clk": { + "direction": "input", + "bits": [ 2 ] + }, + "led": { + "direction": "output", + "bits": [ 3, 4, 5, 6 ] + }, + "out_a": { + "direction": "output", + "bits": [ 7 ] + }, + "out_b": { + "direction": "output", + "bits": [ 8, 9 ] + } + }, + "cells": { + "$abc$292$__5__$not$lut": { + "hide_name": 1, + "type": "LUT1", + "parameters": { + "INIT": "01" + }, + "attributes": { + "module_not_derived": 1, + "src": "/usr/local/bin/../share/yosys/xilinx/lut_map.v:59" + }, + "port_directions": { + "I0": "input", + "O": "output" + }, + "connections": { + "I0": [ 10 ], + "O": [ 11 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[0].carry": { + "hide_name": 1, + "type": "CARRY0", + "parameters": { + "CYINIT_FABRIC": 1 + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:257" + }, + "port_directions": { + "CI_INIT": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI_INIT": [ "0" ], + "CO_CHAIN": [ 12 ], + "CO_FABRIC": [ 13 ], + "DI": [ 10 ], + "O": [ 14 ], + "S": [ 11 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[10].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 15 ], + "CO_CHAIN": [ 16 ], + "CO_FABRIC": [ 17 ], + "DI": [ "0" ], + "O": [ 18 ], + "S": [ 19 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[11].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 16 ], + "CO_CHAIN": [ 20 ], + "CO_FABRIC": [ 21 ], + "DI": [ "0" ], + "O": [ 22 ], + "S": [ 23 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[12].carry": { + "hide_name": 1, + "type": "CARRY0", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 20 ], + "CO_CHAIN": [ 24 ], + "CO_FABRIC": [ 25 ], + "DI": [ "0" ], + "O": [ 26 ], + "S": [ 27 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[13].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 24 ], + "CO_CHAIN": [ 28 ], + "CO_FABRIC": [ 29 ], + "DI": [ "0" ], + "O": [ 30 ], + "S": [ 31 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[14].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 28 ], + "CO_CHAIN": [ 32 ], + "CO_FABRIC": [ 33 ], + "DI": [ "0" ], + "O": [ 34 ], + "S": [ 35 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[15].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 32 ], + "CO_CHAIN": [ 36 ], + "CO_FABRIC": [ 37 ], + "DI": [ "0" ], + "O": [ 38 ], + "S": [ 39 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[16].carry": { + "hide_name": 1, + "type": "CARRY0", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 36 ], + "CO_CHAIN": [ 40 ], + "CO_FABRIC": [ 41 ], + "DI": [ "0" ], + "O": [ 42 ], + "S": [ 43 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[17].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 40 ], + "CO_CHAIN": [ 44 ], + "CO_FABRIC": [ 45 ], + "DI": [ "0" ], + "O": [ 46 ], + "S": [ 47 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[18].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 44 ], + "CO_CHAIN": [ 48 ], + "CO_FABRIC": [ 49 ], + "DI": [ "0" ], + "O": [ 50 ], + "S": [ 51 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[19].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 48 ], + "CO_CHAIN": [ 52 ], + "CO_FABRIC": [ 53 ], + "DI": [ "0" ], + "O": [ 54 ], + "S": [ 55 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[1].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 12 ], + "CO_CHAIN": [ 56 ], + "CO_FABRIC": [ 57 ], + "DI": [ "0" ], + "O": [ 58 ], + "S": [ 59 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[20].carry": { + "hide_name": 1, + "type": "CARRY0", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 52 ], + "CO_CHAIN": [ 60 ], + "CO_FABRIC": [ 61 ], + "DI": [ "0" ], + "O": [ 62 ], + "S": [ 63 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[21].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 60 ], + "CO_CHAIN": [ 64 ], + "CO_FABRIC": [ 65 ], + "DI": [ "0" ], + "O": [ 66 ], + "S": [ 67 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[22].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 64 ], + "CO_CHAIN": [ 68 ], + "CO_FABRIC": [ 69 ], + "DI": [ "0" ], + "O": [ 70 ], + "S": [ 71 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[23].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 68 ], + "CO_CHAIN": [ 72 ], + "CO_FABRIC": [ 73 ], + "DI": [ "0" ], + "O": [ 74 ], + "S": [ 75 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[24].carry": { + "hide_name": 1, + "type": "CARRY0", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 72 ], + "CO_CHAIN": [ 76 ], + "CO_FABRIC": [ 77 ], + "DI": [ "0" ], + "O": [ 78 ], + "S": [ 79 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[25].top_of_carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:303" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 76 ], + "CO_CHAIN": [ 80 ], + "DI": [ "0" ], + "O": [ 81 ], + "S": [ 82 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[2].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 56 ], + "CO_CHAIN": [ 83 ], + "CO_FABRIC": [ 84 ], + "DI": [ "0" ], + "O": [ 85 ], + "S": [ 86 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[3].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 83 ], + "CO_CHAIN": [ 87 ], + "CO_FABRIC": [ 88 ], + "DI": [ "0" ], + "O": [ 89 ], + "S": [ 90 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[4].carry": { + "hide_name": 1, + "type": "CARRY0", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 87 ], + "CO_CHAIN": [ 91 ], + "CO_FABRIC": [ 92 ], + "DI": [ "0" ], + "O": [ 93 ], + "S": [ 94 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[5].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 91 ], + "CO_CHAIN": [ 95 ], + "CO_FABRIC": [ 96 ], + "DI": [ "0" ], + "O": [ 97 ], + "S": [ 98 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[6].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 95 ], + "CO_CHAIN": [ 99 ], + "CO_FABRIC": [ 100 ], + "DI": [ "0" ], + "O": [ 101 ], + "S": [ 102 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[7].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 99 ], + "CO_CHAIN": [ 103 ], + "CO_FABRIC": [ 104 ], + "DI": [ "0" ], + "O": [ 105 ], + "S": [ 106 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[8].carry": { + "hide_name": 1, + "type": "CARRY0", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 103 ], + "CO_CHAIN": [ 107 ], + "CO_FABRIC": [ 108 ], + "DI": [ "0" ], + "O": [ 109 ], + "S": [ 110 ] + } + }, + "$auto$alumacc.cc:485:replace_alu$19.slice[9].carry": { + "hide_name": 1, + "type": "CARRY", + "parameters": { + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" + }, + "port_directions": { + "CI": "input", + "CO_CHAIN": "output", + "CO_FABRIC": "output", + "DI": "input", + "O": "output", + "S": "input" + }, + "connections": { + "CI": [ 107 ], + "CO_CHAIN": [ 15 ], + "CO_FABRIC": [ 111 ], + "DI": [ "0" ], + "O": [ 112 ], + "S": [ 113 ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$100": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 62 ], + "Q": [ 63 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$101": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 66 ], + "Q": [ 67 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$102": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 70 ], + "Q": [ 71 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$103": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 74 ], + "Q": [ 75 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$104": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 78 ], + "Q": [ 79 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$105": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 81 ], + "Q": [ 82 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$80": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 14 ], + "Q": [ 10 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$81": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 58 ], + "Q": [ 59 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$82": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 85 ], + "Q": [ 86 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$83": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 89 ], + "Q": [ 90 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$84": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 93 ], + "Q": [ 94 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$85": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 97 ], + "Q": [ 98 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$86": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 101 ], + "Q": [ 102 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$87": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 105 ], + "Q": [ 106 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$88": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 109 ], + "Q": [ 110 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$89": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 112 ], + "Q": [ 113 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$90": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 18 ], + "Q": [ 19 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$91": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 22 ], + "Q": [ 23 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$92": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 26 ], + "Q": [ 27 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$93": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 30 ], + "Q": [ 31 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$94": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 34 ], + "Q": [ 35 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$95": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 38 ], + "Q": [ 39 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$96": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 42 ], + "Q": [ 43 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$97": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 46 ], + "Q": [ 47 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$98": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 50 ], + "Q": [ 51 ], + "R": [ "0" ] + } + }, + "$auto$simplemap.cc:420:simplemap_dff$99": { + "hide_name": 1, + "type": "FDRE", + "parameters": { + "INIT": "0" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" + }, + "port_directions": { + "C": "input", + "CE": "input", + "D": "input", + "Q": "output", + "R": "input" + }, + "connections": { + "C": [ 2 ], + "CE": [ "1" ], + "D": [ 54 ], + "Q": [ 55 ], + "R": [ "0" ] + } + }, + "OBUF_6": { + "hide_name": 0, + "type": "OBUF", + "parameters": { + "DRIVE": "I12", + "IOSTANDARD": "LVCMOS33", + "SLEW": "SLOW" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:21" + }, + "port_directions": { + "I": "input", + "O": "output" + }, + "connections": { + "I": [ 82 ], + "O": [ 3 ] + } + }, + "OBUF_7": { + "hide_name": 0, + "type": "OBUF", + "parameters": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:25" + }, + "port_directions": { + "I": "input", + "O": "output" + }, + "connections": { + "I": [ "0" ], + "O": [ 4 ] + } + }, + "OBUF_OUT": { + "hide_name": 0, + "type": "OBUF", + "parameters": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:29" + }, + "port_directions": { + "I": "input", + "O": "output" + }, + "connections": { + "I": [ "0" ], + "O": [ 7 ] + } + }, + "bottom_inst.OBUF_10": { + "hide_name": 0, + "type": "OBUF", + "parameters": { + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:33|counter.v:58" + }, + "port_directions": { + "I": "input", + "O": "output" + }, + "connections": { + "I": [ "0" ], + "O": [ 8 ] + } + }, + "bottom_inst.OBUF_11": { + "hide_name": 0, + "type": "OBUF", + "parameters": { + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:33|counter.v:62" + }, + "port_directions": { + "I": "input", + "O": "output" + }, + "connections": { + "I": [ "0" ], + "O": [ 9 ] + } + }, + "bottom_inst.OBUF_9": { + "hide_name": 0, + "type": "OBUF", + "parameters": { + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:33|counter.v:54" + }, + "port_directions": { + "I": "input", + "O": "output" + }, + "connections": { + "I": [ "0" ], + "O": [ 5 ] + } + }, + "bottom_intermediate_inst.OBUF_8": { + "hide_name": 0, + "type": "OBUF", + "parameters": { + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "attributes": { + "module_not_derived": 1, + "src": "counter.v:34|counter.v:43" + }, + "port_directions": { + "I": "input", + "O": "output" + }, + "connections": { + "I": [ "0" ], + "O": [ 6 ] + } + } + }, + "netnames": { + "$0\\counter[25:0]": { + "hide_name": 1, + "bits": [ 14, 58, 85, 89, 93, 97, 101, 105, 109, 112, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 62, 66, 70, 74, 78, 81 ], + "attributes": { + "src": "counter.v:15" + } + }, + "$abc$292$auto$alumacc.cc:485:replace_alu$19.C": { + "hide_name": 1, + "bits": [ 114, 12, 56, 83, 87, 91, 95, 99, 103, 107, 15, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 60, 64, 68, 72, 76 ], + "attributes": { + "unused_bits": "0 " + } + }, + "$abc$292$auto$alumacc.cc:485:replace_alu$19.CO_CHAIN": { + "hide_name": 1, + "bits": [ 12, 56, 83, 87, 91, 95, 99, 103, 107, 15, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 60, 64, 68, 72, 76, 80 ], + "attributes": { + "unused_bits": "25" + } + }, + "$abc$292$auto$alumacc.cc:485:replace_alu$19.S": { + "hide_name": 1, + "bits": [ 11 ], + "attributes": { + } + }, + "$abc$292$auto$alumacc.cc:502:replace_alu$21": { + "hide_name": 1, + "bits": [ 13, 57, 84, 88, 92, 96, 100, 104, 108, 111, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 61, 65, 69, 73, 77 ], + "attributes": { + "unused_bits": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24" + } + }, + "LD6": { + "hide_name": 0, + "bits": [ 82 ], + "attributes": { + "src": "counter.v:8" + } + }, + "LD7": { + "hide_name": 0, + "bits": [ "0" ], + "attributes": { + "src": "counter.v:8" + } + }, + "LD8": { + "hide_name": 0, + "bits": [ "0" ], + "attributes": { + "src": "counter.v:8" + } + }, + "LD9": { + "hide_name": 0, + "bits": [ "0" ], + "attributes": { + "src": "counter.v:8" + } + }, + "bottom_inst.I": { + "hide_name": 0, + "bits": [ "0" ], + "attributes": { + "src": "counter.v:33|counter.v:50" + } + }, + "bottom_inst.O": { + "hide_name": 0, + "bits": [ 5 ], + "attributes": { + "src": "counter.v:33|counter.v:52" + } + }, + "bottom_inst.OB": { + "hide_name": 0, + "bits": [ 8, 9 ], + "attributes": { + "src": "counter.v:33|counter.v:51" + } + }, + "bottom_intermediate_inst.I": { + "hide_name": 0, + "bits": [ "0" ], + "attributes": { + "src": "counter.v:34|counter.v:38" + } + }, + "bottom_intermediate_inst.O": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "counter.v:34|counter.v:39" + } + }, + "bottom_intermediate_inst.bottom_intermediate_wire": { + "hide_name": 0, + "bits": [ 6 ], + "attributes": { + "src": "counter.v:34|counter.v:41" + } + }, + "clk": { + "hide_name": 0, + "bits": [ 2 ], + "attributes": { + "src": "counter.v:2" + } + }, + "counter": { + "hide_name": 0, + "bits": [ 10, 59, 86, 90, 94, 98, 102, 106, 110, 113, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 63, 67, 71, 75, 79, 82 ], + "attributes": { + "src": "counter.v:13" + } + }, + "inter_wire": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "counter.v:9" + } + }, + "inter_wire_2": { + "hide_name": 0, + "bits": [ 4 ], + "attributes": { + "src": "counter.v:9" + } + }, + "led": { + "hide_name": 0, + "bits": [ 3, 4, 5, 6 ], + "attributes": { + "src": "counter.v:3" + } + }, + "out_a": { + "hide_name": 0, + "bits": [ 7 ], + "attributes": { + "src": "counter.v:4" + } + }, + "out_b": { + "hide_name": 0, + "bits": [ 8, 9 ], + "attributes": { + "src": "counter.v:5" + } + } + } + } + } +} diff --git a/xdc-plugin/tests/synth.tcl b/xdc-plugin/tests/synth.tcl new file mode 100644 index 000000000..c849804d8 --- /dev/null +++ b/xdc-plugin/tests/synth.tcl @@ -0,0 +1,12 @@ +yosys -import +plugin -i xdc +#Import the commands from the plugins to the tcl interpreter +yosys -import +# -flatten is used to ensure that the output eblif has only one module. +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + +read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) + +# Write the design in JSON format. +write_json $::env(OUT_JSON) diff --git a/xdc-plugin/tests/xc7a35tcsg324-1.json b/xdc-plugin/tests/xc7a35tcsg324-1.json new file mode 100644 index 000000000..90798f5a5 --- /dev/null +++ b/xdc-plugin/tests/xc7a35tcsg324-1.json @@ -0,0 +1,459 @@ +{ + "global_clock_regions": { + "bottom": { + "rows": { + "0": { + "configuration_buses": { + "BLOCK_RAM": { + "configuration_columns": { + "0": { + "frame_count": 128 + }, + "1": { + "frame_count": 128 + }, + "2": { + "frame_count": 128 + } + } + }, + "CLB_IO_CLK": { + "configuration_columns": { + "0": { + "frame_count": 42 + }, + "1": { + "frame_count": 30 + }, + "10": { + "frame_count": 36 + }, + "11": { + "frame_count": 36 + }, + "12": { + "frame_count": 36 + }, + "13": { + "frame_count": 36 + }, + "14": { + "frame_count": 36 + }, + "15": { + "frame_count": 36 + }, + "16": { + "frame_count": 36 + }, + "17": { + "frame_count": 36 + }, + "18": { + "frame_count": 30 + }, + "19": { + "frame_count": 36 + }, + "2": { + "frame_count": 36 + }, + "20": { + "frame_count": 36 + }, + "21": { + "frame_count": 36 + }, + "22": { + "frame_count": 36 + }, + "23": { + "frame_count": 30 + }, + "24": { + "frame_count": 36 + }, + "25": { + "frame_count": 36 + }, + "26": { + "frame_count": 36 + }, + "27": { + "frame_count": 36 + }, + "28": { + "frame_count": 36 + }, + "29": { + "frame_count": 36 + }, + "3": { + "frame_count": 36 + }, + "30": { + "frame_count": 28 + }, + "31": { + "frame_count": 36 + }, + "32": { + "frame_count": 36 + }, + "33": { + "frame_count": 36 + }, + "34": { + "frame_count": 28 + }, + "35": { + "frame_count": 36 + }, + "36": { + "frame_count": 36 + }, + "37": { + "frame_count": 28 + }, + "38": { + "frame_count": 36 + }, + "39": { + "frame_count": 36 + }, + "4": { + "frame_count": 36 + }, + "40": { + "frame_count": 36 + }, + "41": { + "frame_count": 36 + }, + "42": { + "frame_count": 30 + }, + "43": { + "frame_count": 42 + }, + "5": { + "frame_count": 36 + }, + "6": { + "frame_count": 28 + }, + "7": { + "frame_count": 36 + }, + "8": { + "frame_count": 36 + }, + "9": { + "frame_count": 28 + } + } + } + } + } + } + }, + "top": { + "rows": { + "0": { + "configuration_buses": { + "BLOCK_RAM": { + "configuration_columns": { + "0": { + "frame_count": 128 + }, + "1": { + "frame_count": 128 + }, + "2": { + "frame_count": 128 + } + } + }, + "CLB_IO_CLK": { + "configuration_columns": { + "0": { + "frame_count": 42 + }, + "1": { + "frame_count": 30 + }, + "10": { + "frame_count": 36 + }, + "11": { + "frame_count": 36 + }, + "12": { + "frame_count": 36 + }, + "13": { + "frame_count": 36 + }, + "14": { + "frame_count": 36 + }, + "15": { + "frame_count": 36 + }, + "16": { + "frame_count": 36 + }, + "17": { + "frame_count": 36 + }, + "18": { + "frame_count": 30 + }, + "19": { + "frame_count": 36 + }, + "2": { + "frame_count": 36 + }, + "20": { + "frame_count": 36 + }, + "21": { + "frame_count": 36 + }, + "22": { + "frame_count": 36 + }, + "23": { + "frame_count": 30 + }, + "24": { + "frame_count": 36 + }, + "25": { + "frame_count": 36 + }, + "26": { + "frame_count": 36 + }, + "27": { + "frame_count": 36 + }, + "28": { + "frame_count": 36 + }, + "29": { + "frame_count": 36 + }, + "3": { + "frame_count": 36 + }, + "30": { + "frame_count": 28 + }, + "31": { + "frame_count": 36 + }, + "32": { + "frame_count": 36 + }, + "33": { + "frame_count": 36 + }, + "34": { + "frame_count": 28 + }, + "35": { + "frame_count": 36 + }, + "36": { + "frame_count": 36 + }, + "37": { + "frame_count": 28 + }, + "38": { + "frame_count": 36 + }, + "39": { + "frame_count": 36 + }, + "4": { + "frame_count": 36 + }, + "40": { + "frame_count": 36 + }, + "41": { + "frame_count": 36 + }, + "42": { + "frame_count": 30 + }, + "43": { + "frame_count": 42 + }, + "5": { + "frame_count": 36 + }, + "6": { + "frame_count": 28 + }, + "7": { + "frame_count": 36 + }, + "8": { + "frame_count": 36 + }, + "9": { + "frame_count": 28 + } + } + } + } + }, + "1": { + "configuration_buses": { + "BLOCK_RAM": { + "configuration_columns": { + "0": { + "frame_count": 128 + }, + "1": { + "frame_count": 128 + } + } + }, + "CLB_IO_CLK": { + "configuration_columns": { + "0": { + "frame_count": 42 + }, + "1": { + "frame_count": 30 + }, + "10": { + "frame_count": 36 + }, + "11": { + "frame_count": 36 + }, + "12": { + "frame_count": 36 + }, + "13": { + "frame_count": 36 + }, + "14": { + "frame_count": 36 + }, + "15": { + "frame_count": 36 + }, + "16": { + "frame_count": 36 + }, + "17": { + "frame_count": 36 + }, + "18": { + "frame_count": 30 + }, + "19": { + "frame_count": 36 + }, + "2": { + "frame_count": 36 + }, + "20": { + "frame_count": 36 + }, + "21": { + "frame_count": 36 + }, + "22": { + "frame_count": 36 + }, + "23": { + "frame_count": 30 + }, + "24": { + "frame_count": 36 + }, + "25": { + "frame_count": 36 + }, + "26": { + "frame_count": 36 + }, + "27": { + "frame_count": 36 + }, + "28": { + "frame_count": 36 + }, + "29": { + "frame_count": 36 + }, + "3": { + "frame_count": 36 + }, + "30": { + "frame_count": 28 + }, + "31": { + "frame_count": 36 + }, + "32": { + "frame_count": 36 + }, + "33": { + "frame_count": 36 + }, + "34": { + "frame_count": 28 + }, + "35": { + "frame_count": 36 + }, + "36": { + "frame_count": 36 + }, + "37": { + "frame_count": 32 + }, + "4": { + "frame_count": 36 + }, + "5": { + "frame_count": 36 + }, + "6": { + "frame_count": 28 + }, + "7": { + "frame_count": 36 + }, + "8": { + "frame_count": 36 + }, + "9": { + "frame_count": 28 + } + } + } + } + } + } + } + }, + "idcode": 56807571, + "iobanks": { + "0": "X1Y78", + "14": "X1Y26", + "15": "X1Y78", + "16": "X1Y130", + "34": "X113Y26", + "35": "X113Y78" + } +} From 8062b5514c42023b4b7f268adb27136d39a1a20e Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 14 Jan 2020 13:34:34 +0100 Subject: [PATCH 030/845] XDC: Add python script to compare output json Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/compare_output_json.py | 35 +++++++++++++++++++++++++ xdc-plugin/tests/synth.tcl | 1 + 2 files changed, 36 insertions(+) create mode 100644 xdc-plugin/tests/compare_output_json.py diff --git a/xdc-plugin/tests/compare_output_json.py b/xdc-plugin/tests/compare_output_json.py new file mode 100644 index 000000000..82964ae1e --- /dev/null +++ b/xdc-plugin/tests/compare_output_json.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +""" + +This script extracts the top module cells and their corresponding parameters +from json files produced by Yosys. +The return code of this script is used to check if the output is equivalent. +""" + +import sys +import json + +def read_cells(json_file): + with open(json_file) as f: + data = json.load(f) + f.close() + cells = data['modules']['top']['cells'] + cells_parameters = dict() + for cell, opts in cells.items(): + cells_parameters[cell] = opts['parameters'] + return cells_parameters + + +def main(): + if len(sys.argv) < 3: + print("Incorrect number of arguments") + exit(1) + cells1 = read_cells(sys.argv[1]) + cells2 = read_cells(sys.argv[2]) + if cells1 == cells2: + exit(0) + else: + exit(1) + +if __name__ == "__main__": + main() diff --git a/xdc-plugin/tests/synth.tcl b/xdc-plugin/tests/synth.tcl index c849804d8..696dc4d6d 100644 --- a/xdc-plugin/tests/synth.tcl +++ b/xdc-plugin/tests/synth.tcl @@ -6,6 +6,7 @@ yosys -import # Some of symbiflow expects eblifs with only one module. synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +#Read the design constraints read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) # Write the design in JSON format. From 0b048cef1f0efd190d8bf8f50c69df35c59b91a3 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 15 Jan 2020 08:56:15 +0100 Subject: [PATCH 031/845] XDC: Add verbosity on JSON compare fail Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/compare_output_json.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xdc-plugin/tests/compare_output_json.py b/xdc-plugin/tests/compare_output_json.py index 82964ae1e..b1f87f58d 100644 --- a/xdc-plugin/tests/compare_output_json.py +++ b/xdc-plugin/tests/compare_output_json.py @@ -9,6 +9,8 @@ import sys import json +parameters = ["IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"] + def read_cells(json_file): with open(json_file) as f: data = json.load(f) @@ -16,7 +18,10 @@ def read_cells(json_file): cells = data['modules']['top']['cells'] cells_parameters = dict() for cell, opts in cells.items(): - cells_parameters[cell] = opts['parameters'] + attributes = opts['parameters'] + if len(attributes.keys()): + if any([x in parameters for x in attributes.keys()]): + cells_parameters[cell] = attributes return cells_parameters @@ -29,6 +34,9 @@ def main(): if cells1 == cells2: exit(0) else: + print(json.dumps(cells1, indent=4)) + print("VS") + print(json.dumps(cells2, indent=4)) exit(1) if __name__ == "__main__": From d7f587c2659cc02ce0cdaffc4de60c9b39eea673 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 15 Jan 2020 10:13:51 +0100 Subject: [PATCH 032/845] XDC: Add inouts to test design Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/counter.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdc-plugin/tests/counter.v b/xdc-plugin/tests/counter.v index d66dbd08c..2ca86e229 100644 --- a/xdc-plugin/tests/counter.v +++ b/xdc-plugin/tests/counter.v @@ -1,7 +1,7 @@ module top ( input clk, output [3:0] led, - output out_a, + inout out_a, output [1:0] out_b ); From 1d6670165dd74084813b38032cfddb6d33cd9d7a Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 20 Jan 2020 11:03:34 +0100 Subject: [PATCH 033/845] XDC: Refactor test output comparison script Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/compare_output_json.py | 35 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/xdc-plugin/tests/compare_output_json.py b/xdc-plugin/tests/compare_output_json.py index b1f87f58d..42b72e1e4 100644 --- a/xdc-plugin/tests/compare_output_json.py +++ b/xdc-plugin/tests/compare_output_json.py @@ -8,6 +8,7 @@ import sys import json +import argparse parameters = ["IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"] @@ -25,19 +26,27 @@ def read_cells(json_file): return cells_parameters -def main(): - if len(sys.argv) < 3: - print("Incorrect number of arguments") - exit(1) - cells1 = read_cells(sys.argv[1]) - cells2 = read_cells(sys.argv[2]) - if cells1 == cells2: - exit(0) +def main(args): + cells = read_cells(args.json) + if args.update: + with open(args.golden, 'w') as f: + json.dump(cells, f) else: - print(json.dumps(cells1, indent=4)) - print("VS") - print(json.dumps(cells2, indent=4)) - exit(1) + with open(args.golden) as f: + cells_golden = json.load(f) + if cells == cells_golden: + exit(0) + else: + print(json.dumps(cells, indent=4)) + print("VS") + print(json.dumps(cells_golden, indent=4)) + exit(1) + f.close() if __name__ == "__main__": - main() + parser = argparse.ArgumentParser() + parser.add_argument('--json', help = 'JSON to compare', required = True) + parser.add_argument('--golden', help = 'Golden JSON file', required = True) + parser.add_argument('--update', action = 'store_true', help = 'Update golden reference') + args = parser.parse_args() + main(args) From beb265938c8f3f1e86eebec164176d49d0542b1b Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 20 Jan 2020 11:04:19 +0100 Subject: [PATCH 034/845] XDC: Update golden counter test json file Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/counter_golden.json | 44435 +------------------------ 1 file changed, 1 insertion(+), 44434 deletions(-) diff --git a/xdc-plugin/tests/counter_golden.json b/xdc-plugin/tests/counter_golden.json index fb2f3b23a..6de77a24b 100644 --- a/xdc-plugin/tests/counter_golden.json +++ b/xdc-plugin/tests/counter_golden.json @@ -1,44434 +1 @@ -{ - "creator": "Yosys 0.9+932 (git sha1 81876a37, clang 8.0.0 -fPIC -Os)", - "modules": { - "$__ABC9_DSP48E1": { - "attributes": { - "abc9_box_id": 3002, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - }, - "ports": { - "ACOUT": { - "direction": "output", - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] - }, - "BCOUT": { - "direction": "output", - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ] - }, - "CARRYCASCOUT": { - "direction": "output", - "bits": [ 50 ] - }, - "CARRYOUT": { - "direction": "output", - "bits": [ 51, 52, 53, 54 ] - }, - "MULTSIGNOUT": { - "direction": "output", - "bits": [ 55 ] - }, - "OVERFLOW": { - "direction": "output", - "bits": [ 56 ] - }, - "P": { - "direction": "output", - "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ] - }, - "PATTERNBDETECT": { - "direction": "output", - "bits": [ 105 ] - }, - "PATTERNDETECT": { - "direction": "output", - "bits": [ 106 ] - }, - "PCOUT": { - "direction": "output", - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ] - }, - "UNDERFLOW": { - "direction": "output", - "bits": [ 155 ] - }, - "A": { - "direction": "input", - "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] - }, - "ACIN": { - "direction": "input", - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ] - }, - "ALUMODE": { - "direction": "input", - "bits": [ 216, 217, 218, 219 ] - }, - "B": { - "direction": "input", - "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ] - }, - "BCIN": { - "direction": "input", - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ] - }, - "C": { - "direction": "input", - "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ] - }, - "CARRYCASCIN": { - "direction": "input", - "bits": [ 304 ] - }, - "CARRYIN": { - "direction": "input", - "bits": [ 305 ] - }, - "CARRYINSEL": { - "direction": "input", - "bits": [ 306, 307, 308 ] - }, - "CEA1": { - "direction": "input", - "bits": [ 309 ] - }, - "CEA2": { - "direction": "input", - "bits": [ 310 ] - }, - "CEAD": { - "direction": "input", - "bits": [ 311 ] - }, - "CEALUMODE": { - "direction": "input", - "bits": [ 312 ] - }, - "CEB1": { - "direction": "input", - "bits": [ 313 ] - }, - "CEB2": { - "direction": "input", - "bits": [ 314 ] - }, - "CEC": { - "direction": "input", - "bits": [ 315 ] - }, - "CECARRYIN": { - "direction": "input", - "bits": [ 316 ] - }, - "CECTRL": { - "direction": "input", - "bits": [ 317 ] - }, - "CED": { - "direction": "input", - "bits": [ 318 ] - }, - "CEINMODE": { - "direction": "input", - "bits": [ 319 ] - }, - "CEM": { - "direction": "input", - "bits": [ 320 ] - }, - "CEP": { - "direction": "input", - "bits": [ 321 ] - }, - "CLK": { - "direction": "input", - "bits": [ 322 ] - }, - "D": { - "direction": "input", - "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ] - }, - "INMODE": { - "direction": "input", - "bits": [ 348, 349, 350, 351, 352 ] - }, - "MULTSIGNIN": { - "direction": "input", - "bits": [ 353 ] - }, - "OPMODE": { - "direction": "input", - "bits": [ 354, 355, 356, 357, 358, 359, 360 ] - }, - "PCIN": { - "direction": "input", - "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ] - }, - "RSTA": { - "direction": "input", - "bits": [ 409 ] - }, - "RSTALLCARRYIN": { - "direction": "input", - "bits": [ 410 ] - }, - "RSTALUMODE": { - "direction": "input", - "bits": [ 411 ] - }, - "RSTB": { - "direction": "input", - "bits": [ 412 ] - }, - "RSTC": { - "direction": "input", - "bits": [ 413 ] - }, - "RSTCTRL": { - "direction": "input", - "bits": [ 414 ] - }, - "RSTD": { - "direction": "input", - "bits": [ 415 ] - }, - "RSTINMODE": { - "direction": "input", - "bits": [ 416 ] - }, - "RSTM": { - "direction": "input", - "bits": [ 417 ] - }, - "RSTP": { - "direction": "input", - "bits": [ 418 ] - } - }, - "cells": { - }, - "netnames": { - "A": { - "hide_name": 0, - "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "ACIN": { - "hide_name": 0, - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "ACOUT": { - "hide_name": 0, - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "ALUMODE": { - "hide_name": 0, - "bits": [ 216, 217, 218, 219 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "B": { - "hide_name": 0, - "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "BCIN": { - "hide_name": 0, - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "BCOUT": { - "hide_name": 0, - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "C": { - "hide_name": 0, - "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CARRYCASCIN": { - "hide_name": 0, - "bits": [ 304 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CARRYCASCOUT": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CARRYIN": { - "hide_name": 0, - "bits": [ 305 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CARRYINSEL": { - "hide_name": 0, - "bits": [ 306, 307, 308 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CARRYOUT": { - "hide_name": 0, - "bits": [ 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEA1": { - "hide_name": 0, - "bits": [ 309 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEA2": { - "hide_name": 0, - "bits": [ 310 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEAD": { - "hide_name": 0, - "bits": [ 311 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEALUMODE": { - "hide_name": 0, - "bits": [ 312 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEB1": { - "hide_name": 0, - "bits": [ 313 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEB2": { - "hide_name": 0, - "bits": [ 314 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEC": { - "hide_name": 0, - "bits": [ 315 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CECARRYIN": { - "hide_name": 0, - "bits": [ 316 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CECTRL": { - "hide_name": 0, - "bits": [ 317 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CED": { - "hide_name": 0, - "bits": [ 318 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEINMODE": { - "hide_name": 0, - "bits": [ 319 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEM": { - "hide_name": 0, - "bits": [ 320 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CEP": { - "hide_name": 0, - "bits": [ 321 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 322 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "D": { - "hide_name": 0, - "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "INMODE": { - "hide_name": 0, - "bits": [ 348, 349, 350, 351, 352 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "MULTSIGNIN": { - "hide_name": 0, - "bits": [ 353 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "MULTSIGNOUT": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "OPMODE": { - "hide_name": 0, - "bits": [ 354, 355, 356, 357, 358, 359, 360 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "OVERFLOW": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "P": { - "hide_name": 0, - "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "PATTERNBDETECT": { - "hide_name": 0, - "bits": [ 105 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "PATTERNDETECT": { - "hide_name": 0, - "bits": [ 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "PCIN": { - "hide_name": 0, - "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "PCOUT": { - "hide_name": 0, - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTA": { - "hide_name": 0, - "bits": [ 409 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTALLCARRYIN": { - "hide_name": 0, - "bits": [ 410 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTALUMODE": { - "hide_name": 0, - "bits": [ 411 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTB": { - "hide_name": 0, - "bits": [ 412 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTC": { - "hide_name": 0, - "bits": [ 413 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTCTRL": { - "hide_name": 0, - "bits": [ 414 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTD": { - "hide_name": 0, - "bits": [ 415 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTINMODE": { - "hide_name": 0, - "bits": [ 416 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTM": { - "hide_name": 0, - "bits": [ 417 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "RSTP": { - "hide_name": 0, - "bits": [ 418 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - }, - "UNDERFLOW": { - "hide_name": 0, - "bits": [ 155 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:190" - } - } - } - }, - "$__ABC9_DSP48E1_MULT": { - "attributes": { - "abc9_box_id": 3000, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - }, - "ports": { - "ACOUT": { - "direction": "output", - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] - }, - "BCOUT": { - "direction": "output", - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ] - }, - "CARRYCASCOUT": { - "direction": "output", - "bits": [ 50 ] - }, - "CARRYOUT": { - "direction": "output", - "bits": [ 51, 52, 53, 54 ] - }, - "MULTSIGNOUT": { - "direction": "output", - "bits": [ 55 ] - }, - "OVERFLOW": { - "direction": "output", - "bits": [ 56 ] - }, - "P": { - "direction": "output", - "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ] - }, - "PATTERNBDETECT": { - "direction": "output", - "bits": [ 105 ] - }, - "PATTERNDETECT": { - "direction": "output", - "bits": [ 106 ] - }, - "PCOUT": { - "direction": "output", - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ] - }, - "UNDERFLOW": { - "direction": "output", - "bits": [ 155 ] - }, - "A": { - "direction": "input", - "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] - }, - "ACIN": { - "direction": "input", - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ] - }, - "ALUMODE": { - "direction": "input", - "bits": [ 216, 217, 218, 219 ] - }, - "B": { - "direction": "input", - "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ] - }, - "BCIN": { - "direction": "input", - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ] - }, - "C": { - "direction": "input", - "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ] - }, - "CARRYCASCIN": { - "direction": "input", - "bits": [ 304 ] - }, - "CARRYIN": { - "direction": "input", - "bits": [ 305 ] - }, - "CARRYINSEL": { - "direction": "input", - "bits": [ 306, 307, 308 ] - }, - "CEA1": { - "direction": "input", - "bits": [ 309 ] - }, - "CEA2": { - "direction": "input", - "bits": [ 310 ] - }, - "CEAD": { - "direction": "input", - "bits": [ 311 ] - }, - "CEALUMODE": { - "direction": "input", - "bits": [ 312 ] - }, - "CEB1": { - "direction": "input", - "bits": [ 313 ] - }, - "CEB2": { - "direction": "input", - "bits": [ 314 ] - }, - "CEC": { - "direction": "input", - "bits": [ 315 ] - }, - "CECARRYIN": { - "direction": "input", - "bits": [ 316 ] - }, - "CECTRL": { - "direction": "input", - "bits": [ 317 ] - }, - "CED": { - "direction": "input", - "bits": [ 318 ] - }, - "CEINMODE": { - "direction": "input", - "bits": [ 319 ] - }, - "CEM": { - "direction": "input", - "bits": [ 320 ] - }, - "CEP": { - "direction": "input", - "bits": [ 321 ] - }, - "CLK": { - "direction": "input", - "bits": [ 322 ] - }, - "D": { - "direction": "input", - "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ] - }, - "INMODE": { - "direction": "input", - "bits": [ 348, 349, 350, 351, 352 ] - }, - "MULTSIGNIN": { - "direction": "input", - "bits": [ 353 ] - }, - "OPMODE": { - "direction": "input", - "bits": [ 354, 355, 356, 357, 358, 359, 360 ] - }, - "PCIN": { - "direction": "input", - "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ] - }, - "RSTA": { - "direction": "input", - "bits": [ 409 ] - }, - "RSTALLCARRYIN": { - "direction": "input", - "bits": [ 410 ] - }, - "RSTALUMODE": { - "direction": "input", - "bits": [ 411 ] - }, - "RSTB": { - "direction": "input", - "bits": [ 412 ] - }, - "RSTC": { - "direction": "input", - "bits": [ 413 ] - }, - "RSTCTRL": { - "direction": "input", - "bits": [ 414 ] - }, - "RSTD": { - "direction": "input", - "bits": [ 415 ] - }, - "RSTINMODE": { - "direction": "input", - "bits": [ 416 ] - }, - "RSTM": { - "direction": "input", - "bits": [ 417 ] - }, - "RSTP": { - "direction": "input", - "bits": [ 418 ] - } - }, - "cells": { - }, - "netnames": { - "A": { - "hide_name": 0, - "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "ACIN": { - "hide_name": 0, - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "ACOUT": { - "hide_name": 0, - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "ALUMODE": { - "hide_name": 0, - "bits": [ 216, 217, 218, 219 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "B": { - "hide_name": 0, - "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "BCIN": { - "hide_name": 0, - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "BCOUT": { - "hide_name": 0, - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "C": { - "hide_name": 0, - "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CARRYCASCIN": { - "hide_name": 0, - "bits": [ 304 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CARRYCASCOUT": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CARRYIN": { - "hide_name": 0, - "bits": [ 305 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CARRYINSEL": { - "hide_name": 0, - "bits": [ 306, 307, 308 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CARRYOUT": { - "hide_name": 0, - "bits": [ 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEA1": { - "hide_name": 0, - "bits": [ 309 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEA2": { - "hide_name": 0, - "bits": [ 310 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEAD": { - "hide_name": 0, - "bits": [ 311 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEALUMODE": { - "hide_name": 0, - "bits": [ 312 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEB1": { - "hide_name": 0, - "bits": [ 313 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEB2": { - "hide_name": 0, - "bits": [ 314 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEC": { - "hide_name": 0, - "bits": [ 315 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CECARRYIN": { - "hide_name": 0, - "bits": [ 316 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CECTRL": { - "hide_name": 0, - "bits": [ 317 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CED": { - "hide_name": 0, - "bits": [ 318 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEINMODE": { - "hide_name": 0, - "bits": [ 319 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEM": { - "hide_name": 0, - "bits": [ 320 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CEP": { - "hide_name": 0, - "bits": [ 321 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 322 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "D": { - "hide_name": 0, - "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "INMODE": { - "hide_name": 0, - "bits": [ 348, 349, 350, 351, 352 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "MULTSIGNIN": { - "hide_name": 0, - "bits": [ 353 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "MULTSIGNOUT": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "OPMODE": { - "hide_name": 0, - "bits": [ 354, 355, 356, 357, 358, 359, 360 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "OVERFLOW": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "P": { - "hide_name": 0, - "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "PATTERNBDETECT": { - "hide_name": 0, - "bits": [ 105 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "PATTERNDETECT": { - "hide_name": 0, - "bits": [ 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "PCIN": { - "hide_name": 0, - "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "PCOUT": { - "hide_name": 0, - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTA": { - "hide_name": 0, - "bits": [ 409 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTALLCARRYIN": { - "hide_name": 0, - "bits": [ 410 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTALUMODE": { - "hide_name": 0, - "bits": [ 411 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTB": { - "hide_name": 0, - "bits": [ 412 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTC": { - "hide_name": 0, - "bits": [ 413 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTCTRL": { - "hide_name": 0, - "bits": [ 414 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTD": { - "hide_name": 0, - "bits": [ 415 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTINMODE": { - "hide_name": 0, - "bits": [ 416 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTM": { - "hide_name": 0, - "bits": [ 417 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "RSTP": { - "hide_name": 0, - "bits": [ 418 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - }, - "UNDERFLOW": { - "hide_name": 0, - "bits": [ 155 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:188" - } - } - } - }, - "$__ABC9_DSP48E1_MULT_DPORT": { - "attributes": { - "abc9_box_id": 3001, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - }, - "ports": { - "ACOUT": { - "direction": "output", - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] - }, - "BCOUT": { - "direction": "output", - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ] - }, - "CARRYCASCOUT": { - "direction": "output", - "bits": [ 50 ] - }, - "CARRYOUT": { - "direction": "output", - "bits": [ 51, 52, 53, 54 ] - }, - "MULTSIGNOUT": { - "direction": "output", - "bits": [ 55 ] - }, - "OVERFLOW": { - "direction": "output", - "bits": [ 56 ] - }, - "P": { - "direction": "output", - "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ] - }, - "PATTERNBDETECT": { - "direction": "output", - "bits": [ 105 ] - }, - "PATTERNDETECT": { - "direction": "output", - "bits": [ 106 ] - }, - "PCOUT": { - "direction": "output", - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ] - }, - "UNDERFLOW": { - "direction": "output", - "bits": [ 155 ] - }, - "A": { - "direction": "input", - "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] - }, - "ACIN": { - "direction": "input", - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ] - }, - "ALUMODE": { - "direction": "input", - "bits": [ 216, 217, 218, 219 ] - }, - "B": { - "direction": "input", - "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ] - }, - "BCIN": { - "direction": "input", - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ] - }, - "C": { - "direction": "input", - "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ] - }, - "CARRYCASCIN": { - "direction": "input", - "bits": [ 304 ] - }, - "CARRYIN": { - "direction": "input", - "bits": [ 305 ] - }, - "CARRYINSEL": { - "direction": "input", - "bits": [ 306, 307, 308 ] - }, - "CEA1": { - "direction": "input", - "bits": [ 309 ] - }, - "CEA2": { - "direction": "input", - "bits": [ 310 ] - }, - "CEAD": { - "direction": "input", - "bits": [ 311 ] - }, - "CEALUMODE": { - "direction": "input", - "bits": [ 312 ] - }, - "CEB1": { - "direction": "input", - "bits": [ 313 ] - }, - "CEB2": { - "direction": "input", - "bits": [ 314 ] - }, - "CEC": { - "direction": "input", - "bits": [ 315 ] - }, - "CECARRYIN": { - "direction": "input", - "bits": [ 316 ] - }, - "CECTRL": { - "direction": "input", - "bits": [ 317 ] - }, - "CED": { - "direction": "input", - "bits": [ 318 ] - }, - "CEINMODE": { - "direction": "input", - "bits": [ 319 ] - }, - "CEM": { - "direction": "input", - "bits": [ 320 ] - }, - "CEP": { - "direction": "input", - "bits": [ 321 ] - }, - "CLK": { - "direction": "input", - "bits": [ 322 ] - }, - "D": { - "direction": "input", - "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ] - }, - "INMODE": { - "direction": "input", - "bits": [ 348, 349, 350, 351, 352 ] - }, - "MULTSIGNIN": { - "direction": "input", - "bits": [ 353 ] - }, - "OPMODE": { - "direction": "input", - "bits": [ 354, 355, 356, 357, 358, 359, 360 ] - }, - "PCIN": { - "direction": "input", - "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ] - }, - "RSTA": { - "direction": "input", - "bits": [ 409 ] - }, - "RSTALLCARRYIN": { - "direction": "input", - "bits": [ 410 ] - }, - "RSTALUMODE": { - "direction": "input", - "bits": [ 411 ] - }, - "RSTB": { - "direction": "input", - "bits": [ 412 ] - }, - "RSTC": { - "direction": "input", - "bits": [ 413 ] - }, - "RSTCTRL": { - "direction": "input", - "bits": [ 414 ] - }, - "RSTD": { - "direction": "input", - "bits": [ 415 ] - }, - "RSTINMODE": { - "direction": "input", - "bits": [ 416 ] - }, - "RSTM": { - "direction": "input", - "bits": [ 417 ] - }, - "RSTP": { - "direction": "input", - "bits": [ 418 ] - } - }, - "cells": { - }, - "netnames": { - "A": { - "hide_name": 0, - "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "ACIN": { - "hide_name": 0, - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "ACOUT": { - "hide_name": 0, - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "ALUMODE": { - "hide_name": 0, - "bits": [ 216, 217, 218, 219 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "B": { - "hide_name": 0, - "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "BCIN": { - "hide_name": 0, - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "BCOUT": { - "hide_name": 0, - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "C": { - "hide_name": 0, - "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CARRYCASCIN": { - "hide_name": 0, - "bits": [ 304 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CARRYCASCOUT": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CARRYIN": { - "hide_name": 0, - "bits": [ 305 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CARRYINSEL": { - "hide_name": 0, - "bits": [ 306, 307, 308 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CARRYOUT": { - "hide_name": 0, - "bits": [ 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEA1": { - "hide_name": 0, - "bits": [ 309 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEA2": { - "hide_name": 0, - "bits": [ 310 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEAD": { - "hide_name": 0, - "bits": [ 311 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEALUMODE": { - "hide_name": 0, - "bits": [ 312 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEB1": { - "hide_name": 0, - "bits": [ 313 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEB2": { - "hide_name": 0, - "bits": [ 314 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEC": { - "hide_name": 0, - "bits": [ 315 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CECARRYIN": { - "hide_name": 0, - "bits": [ 316 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CECTRL": { - "hide_name": 0, - "bits": [ 317 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CED": { - "hide_name": 0, - "bits": [ 318 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEINMODE": { - "hide_name": 0, - "bits": [ 319 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEM": { - "hide_name": 0, - "bits": [ 320 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CEP": { - "hide_name": 0, - "bits": [ 321 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 322 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "D": { - "hide_name": 0, - "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "INMODE": { - "hide_name": 0, - "bits": [ 348, 349, 350, 351, 352 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "MULTSIGNIN": { - "hide_name": 0, - "bits": [ 353 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "MULTSIGNOUT": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "OPMODE": { - "hide_name": 0, - "bits": [ 354, 355, 356, 357, 358, 359, 360 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "OVERFLOW": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "P": { - "hide_name": 0, - "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "PATTERNBDETECT": { - "hide_name": 0, - "bits": [ 105 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "PATTERNDETECT": { - "hide_name": 0, - "bits": [ 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "PCIN": { - "hide_name": 0, - "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "PCOUT": { - "hide_name": 0, - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTA": { - "hide_name": 0, - "bits": [ 409 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTALLCARRYIN": { - "hide_name": 0, - "bits": [ 410 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTALUMODE": { - "hide_name": 0, - "bits": [ 411 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTB": { - "hide_name": 0, - "bits": [ 412 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTC": { - "hide_name": 0, - "bits": [ 413 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTCTRL": { - "hide_name": 0, - "bits": [ 414 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTD": { - "hide_name": 0, - "bits": [ 415 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTINMODE": { - "hide_name": 0, - "bits": [ 416 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTM": { - "hide_name": 0, - "bits": [ 417 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "RSTP": { - "hide_name": 0, - "bits": [ 418 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - }, - "UNDERFLOW": { - "hide_name": 0, - "bits": [ 155 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:189" - } - } - } - }, - "$__ABC9_DSP48E1_MULT_DPORT_PCOUT_MUX": { - "attributes": { - "abc9_box_id": 2103, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - }, - "ports": { - "Aq": { - "direction": "input", - "bits": [ 2 ] - }, - "ADq": { - "direction": "input", - "bits": [ 3 ] - }, - "Bq": { - "direction": "input", - "bits": [ 4 ] - }, - "Cq": { - "direction": "input", - "bits": [ 5 ] - }, - "Dq": { - "direction": "input", - "bits": [ 6 ] - }, - "I": { - "direction": "input", - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] - }, - "Mq": { - "direction": "input", - "bits": [ 55 ] - }, - "P": { - "direction": "input", - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] - }, - "Pq": { - "direction": "input", - "bits": [ 104 ] - }, - "O": { - "direction": "output", - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] - } - }, - "cells": { - }, - "netnames": { - "ADq": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - }, - "Aq": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - }, - "Bq": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - }, - "Cq": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - }, - "Dq": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - }, - "I": { - "hide_name": 0, - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - }, - "Mq": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - }, - "O": { - "hide_name": 0, - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - }, - "P": { - "hide_name": 0, - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - }, - "Pq": { - "hide_name": 0, - "bits": [ 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:100" - } - } - } - }, - "$__ABC9_DSP48E1_MULT_DPORT_P_MUX": { - "attributes": { - "abc9_box_id": 2102, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - }, - "ports": { - "Aq": { - "direction": "input", - "bits": [ 2 ] - }, - "ADq": { - "direction": "input", - "bits": [ 3 ] - }, - "Bq": { - "direction": "input", - "bits": [ 4 ] - }, - "Cq": { - "direction": "input", - "bits": [ 5 ] - }, - "Dq": { - "direction": "input", - "bits": [ 6 ] - }, - "I": { - "direction": "input", - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] - }, - "Mq": { - "direction": "input", - "bits": [ 55 ] - }, - "P": { - "direction": "input", - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] - }, - "Pq": { - "direction": "input", - "bits": [ 104 ] - }, - "O": { - "direction": "output", - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] - } - }, - "cells": { - }, - "netnames": { - "ADq": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - }, - "Aq": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - }, - "Bq": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - }, - "Cq": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - }, - "Dq": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - }, - "I": { - "hide_name": 0, - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - }, - "Mq": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - }, - "O": { - "hide_name": 0, - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - }, - "P": { - "hide_name": 0, - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - }, - "Pq": { - "hide_name": 0, - "bits": [ 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:99" - } - } - } - }, - "$__ABC9_DSP48E1_MULT_PCOUT_MUX": { - "attributes": { - "abc9_box_id": 2101, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - }, - "ports": { - "Aq": { - "direction": "input", - "bits": [ 2 ] - }, - "ADq": { - "direction": "input", - "bits": [ 3 ] - }, - "Bq": { - "direction": "input", - "bits": [ 4 ] - }, - "Cq": { - "direction": "input", - "bits": [ 5 ] - }, - "Dq": { - "direction": "input", - "bits": [ 6 ] - }, - "I": { - "direction": "input", - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] - }, - "Mq": { - "direction": "input", - "bits": [ 55 ] - }, - "P": { - "direction": "input", - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] - }, - "Pq": { - "direction": "input", - "bits": [ 104 ] - }, - "O": { - "direction": "output", - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] - } - }, - "cells": { - }, - "netnames": { - "ADq": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - }, - "Aq": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - }, - "Bq": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - }, - "Cq": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - }, - "Dq": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - }, - "I": { - "hide_name": 0, - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - }, - "Mq": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - }, - "O": { - "hide_name": 0, - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - }, - "P": { - "hide_name": 0, - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - }, - "Pq": { - "hide_name": 0, - "bits": [ 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:98" - } - } - } - }, - "$__ABC9_DSP48E1_MULT_P_MUX": { - "attributes": { - "abc9_box_id": 2100, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - }, - "ports": { - "Aq": { - "direction": "input", - "bits": [ 2 ] - }, - "ADq": { - "direction": "input", - "bits": [ 3 ] - }, - "Bq": { - "direction": "input", - "bits": [ 4 ] - }, - "Cq": { - "direction": "input", - "bits": [ 5 ] - }, - "Dq": { - "direction": "input", - "bits": [ 6 ] - }, - "I": { - "direction": "input", - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] - }, - "Mq": { - "direction": "input", - "bits": [ 55 ] - }, - "P": { - "direction": "input", - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] - }, - "Pq": { - "direction": "input", - "bits": [ 104 ] - }, - "O": { - "direction": "output", - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] - } - }, - "cells": { - }, - "netnames": { - "ADq": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - }, - "Aq": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - }, - "Bq": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - }, - "Cq": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - }, - "Dq": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - }, - "I": { - "hide_name": 0, - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - }, - "Mq": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - }, - "O": { - "hide_name": 0, - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - }, - "P": { - "hide_name": 0, - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - }, - "Pq": { - "hide_name": 0, - "bits": [ 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:97" - } - } - } - }, - "$__ABC9_DSP48E1_PCOUT_MUX": { - "attributes": { - "abc9_box_id": 2105, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - }, - "ports": { - "Aq": { - "direction": "input", - "bits": [ 2 ] - }, - "ADq": { - "direction": "input", - "bits": [ 3 ] - }, - "Bq": { - "direction": "input", - "bits": [ 4 ] - }, - "Cq": { - "direction": "input", - "bits": [ 5 ] - }, - "Dq": { - "direction": "input", - "bits": [ 6 ] - }, - "I": { - "direction": "input", - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] - }, - "Mq": { - "direction": "input", - "bits": [ 55 ] - }, - "P": { - "direction": "input", - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] - }, - "Pq": { - "direction": "input", - "bits": [ 104 ] - }, - "O": { - "direction": "output", - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] - } - }, - "cells": { - }, - "netnames": { - "ADq": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - }, - "Aq": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - }, - "Bq": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - }, - "Cq": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - }, - "Dq": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - }, - "I": { - "hide_name": 0, - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - }, - "Mq": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - }, - "O": { - "hide_name": 0, - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - }, - "P": { - "hide_name": 0, - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - }, - "Pq": { - "hide_name": 0, - "bits": [ 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:102" - } - } - } - }, - "$__ABC9_DSP48E1_P_MUX": { - "attributes": { - "abc9_box_id": 2104, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - }, - "ports": { - "Aq": { - "direction": "input", - "bits": [ 2 ] - }, - "ADq": { - "direction": "input", - "bits": [ 3 ] - }, - "Bq": { - "direction": "input", - "bits": [ 4 ] - }, - "Cq": { - "direction": "input", - "bits": [ 5 ] - }, - "Dq": { - "direction": "input", - "bits": [ 6 ] - }, - "I": { - "direction": "input", - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ] - }, - "Mq": { - "direction": "input", - "bits": [ 55 ] - }, - "P": { - "direction": "input", - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ] - }, - "Pq": { - "direction": "input", - "bits": [ 104 ] - }, - "O": { - "direction": "output", - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ] - } - }, - "cells": { - }, - "netnames": { - "ADq": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - }, - "Aq": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - }, - "Bq": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - }, - "Cq": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - }, - "Dq": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - }, - "I": { - "hide_name": 0, - "bits": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - }, - "Mq": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - }, - "O": { - "hide_name": 0, - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - }, - "P": { - "hide_name": 0, - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - }, - "Pq": { - "hide_name": 0, - "bits": [ 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:101" - } - } - } - }, - "$__ABC9_LUT6": { - "attributes": { - "abc9_box_id": 2000, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:40" - }, - "ports": { - "A": { - "direction": "input", - "bits": [ 2 ] - }, - "S": { - "direction": "input", - "bits": [ 3, 4, 5, 6, 7, 8 ] - }, - "Y": { - "direction": "output", - "bits": [ 9 ] - } - }, - "cells": { - }, - "netnames": { - "A": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:40" - } - }, - "S": { - "hide_name": 0, - "bits": [ 3, 4, 5, 6, 7, 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:40" - } - }, - "Y": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:40" - } - } - } - }, - "$__ABC9_LUT7": { - "attributes": { - "abc9_box_id": 2001, - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:44" - }, - "ports": { - "A": { - "direction": "input", - "bits": [ 2 ] - }, - "S": { - "direction": "input", - "bits": [ 3, 4, 5, 6, 7, 8, 9 ] - }, - "Y": { - "direction": "output", - "bits": [ 10 ] - } - }, - "cells": { - }, - "netnames": { - "A": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:44" - } - }, - "S": { - "hide_name": 0, - "bits": [ 3, 4, 5, 6, 7, 8, 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:44" - } - }, - "Y": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:44" - } - } - } - }, - "$__XILINX_MUXF78": { - "attributes": { - "abc9_box_id": 3, - "whitebox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "I2": { - "direction": "input", - "bits": [ 5 ] - }, - "I3": { - "direction": "input", - "bits": [ 6 ] - }, - "S0": { - "direction": "input", - "bits": [ 7 ] - }, - "S1": { - "direction": "input", - "bits": [ 8 ] - } - }, - "cells": { - "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:29$289": { - "hide_name": 1, - "type": "$mux", - "parameters": { - "WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:29" - }, - "port_directions": { - "A": "input", - "B": "input", - "S": "input", - "Y": "output" - }, - "connections": { - "A": [ 5 ], - "B": [ 6 ], - "S": [ 7 ], - "Y": [ 9 ] - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30$290": { - "hide_name": 1, - "type": "$mux", - "parameters": { - "WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30" - }, - "port_directions": { - "A": "input", - "B": "input", - "S": "input", - "Y": "output" - }, - "connections": { - "A": [ 3 ], - "B": [ 4 ], - "S": [ 7 ], - "Y": [ 10 ] - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30$291": { - "hide_name": 1, - "type": "$mux", - "parameters": { - "WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30" - }, - "port_directions": { - "A": "input", - "B": "input", - "S": "input", - "Y": "output" - }, - "connections": { - "A": [ 10 ], - "B": [ 9 ], - "S": [ 8 ], - "Y": [ 2 ] - } - } - }, - "netnames": { - "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:29$289_Y": { - "hide_name": 1, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:29" - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30$290_Y": { - "hide_name": 1, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30" - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30$291_Y": { - "hide_name": 1, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:30" - } - }, - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" - } - }, - "I2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" - } - }, - "I3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" - } - }, - "S0": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" - } - }, - "S1": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/abc9_model.v:28" - } - } - } - }, - "BSCANE2": { - "attributes": { - "blackbox": 1, - "keep": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3714" - }, - "ports": { - "CAPTURE": { - "direction": "output", - "bits": [ 2 ] - }, - "DRCK": { - "direction": "output", - "bits": [ 3 ] - }, - "RESET": { - "direction": "output", - "bits": [ 4 ] - }, - "RUNTEST": { - "direction": "output", - "bits": [ 5 ] - }, - "SEL": { - "direction": "output", - "bits": [ 6 ] - }, - "SHIFT": { - "direction": "output", - "bits": [ 7 ] - }, - "TCK": { - "direction": "output", - "bits": [ 8 ] - }, - "TDI": { - "direction": "output", - "bits": [ 9 ] - }, - "TMS": { - "direction": "output", - "bits": [ 10 ] - }, - "UPDATE": { - "direction": "output", - "bits": [ 11 ] - }, - "TDO": { - "direction": "input", - "bits": [ 12 ] - } - }, - "cells": { - }, - "netnames": { - "CAPTURE": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3717" - } - }, - "DRCK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3718" - } - }, - "RESET": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3719" - } - }, - "RUNTEST": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3720" - } - }, - "SEL": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3721" - } - }, - "SHIFT": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3722" - } - }, - "TCK": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3723" - } - }, - "TDI": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3724" - } - }, - "TDO": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3727" - } - }, - "TMS": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3725" - } - }, - "UPDATE": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3726" - } - } - } - }, - "BUFG": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:62" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:65" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:64" - } - } - } - }, - "BUFGCE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3379" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "CE": { - "direction": "input", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "CE": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "invertible_pin": "IS_CE_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3386" - } - }, - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "invertible_pin": "IS_I_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3388" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3384" - } - } - } - }, - "BUFGCE_1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3391" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "CE": { - "direction": "input", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "CE": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3394" - } - }, - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3395" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3393" - } - } - } - }, - "BUFGCTRL": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:70" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "S0": { - "direction": "input", - "bits": [ 5 ] - }, - "S1": { - "direction": "input", - "bits": [ 6 ] - }, - "CE0": { - "direction": "input", - "bits": [ 7 ] - }, - "CE1": { - "direction": "input", - "bits": [ 8 ] - }, - "IGNORE0": { - "direction": "input", - "bits": [ 9 ] - }, - "IGNORE1": { - "direction": "input", - "bits": [ 10 ] - } - }, - "cells": { - }, - "netnames": { - "CE0": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "invertible_pin": "IS_CE0_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:79" - } - }, - "CE1": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "invertible_pin": "IS_CE1_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:81" - } - }, - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:73" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:73" - } - }, - "IGNORE0": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "invertible_pin": "IS_IGNORE0_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:83" - } - }, - "IGNORE1": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "invertible_pin": "IS_IGNORE1_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:85" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:72" - } - }, - "S0": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_S0_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:75" - } - }, - "S1": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "invertible_pin": "IS_S1_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:77" - } - } - } - }, - "BUFGMUX": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3398" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "S": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3402" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3403" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3401" - } - }, - "S": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3404" - } - } - } - }, - "BUFGMUX_1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3407" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "S": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3411" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3412" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3410" - } - }, - "S": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3413" - } - } - } - }, - "BUFGMUX_CTRL": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3416" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "S": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3419" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3420" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3418" - } - }, - "S": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3421" - } - } - } - }, - "BUFH": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3424" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3427" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3426" - } - } - } - }, - "BUFHCE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:106" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "invertible_pin": "IS_CE_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:111" - } - }, - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:109" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:108" - } - } - } - }, - "BUFIO": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3430" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3433" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3432" - } - } - } - }, - "BUFMR": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3436" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3439" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3438" - } - } - } - }, - "BUFMRCE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3442" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "CE": { - "direction": "input", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "CE": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "invertible_pin": "IS_CE_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3449" - } - }, - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3450" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3447" - } - } - } - }, - "BUFR": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3453" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "CE": { - "direction": "input", - "bits": [ 3 ] - }, - "CLR": { - "direction": "input", - "bits": [ 4 ] - }, - "I": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "CE": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3458" - } - }, - "CLR": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3459" - } - }, - "I": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3460" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_driver": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3457" - } - } - } - }, - "CAPTUREE2": { - "attributes": { - "blackbox": 1, - "keep": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3731" - }, - "ports": { - "CAP": { - "direction": "input", - "bits": [ 2 ] - }, - "CLK": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "CAP": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3733" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3734" - } - } - } - }, - "CARRY": { - "attributes": { - "blackbox": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" - }, - "ports": { - "CO_CHAIN": { - "direction": "output", - "bits": [ 2 ] - }, - "CO_FABRIC": { - "direction": "output", - "bits": [ 3 ] - }, - "O": { - "direction": "output", - "bits": [ 4 ] - }, - "CI": { - "direction": "input", - "bits": [ 5 ] - }, - "DI": { - "direction": "input", - "bits": [ 6 ] - }, - "S": { - "direction": "input", - "bits": [ 7 ] - } - }, - "cells": { - }, - "netnames": { - "CI": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" - } - }, - "CO_CHAIN": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" - } - }, - "CO_FABRIC": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" - } - }, - "DI": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" - } - }, - "O": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" - } - }, - "S": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:244" - } - } - } - }, - "CARRY0": { - "attributes": { - "blackbox": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" - }, - "ports": { - "CO_CHAIN": { - "direction": "output", - "bits": [ 2 ] - }, - "CO_FABRIC": { - "direction": "output", - "bits": [ 3 ] - }, - "O": { - "direction": "output", - "bits": [ 4 ] - }, - "CI": { - "direction": "input", - "bits": [ 5 ] - }, - "CI_INIT": { - "direction": "input", - "bits": [ 6 ] - }, - "DI": { - "direction": "input", - "bits": [ 7 ] - }, - "S": { - "direction": "input", - "bits": [ 8 ] - } - }, - "cells": { - }, - "netnames": { - "CI": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" - } - }, - "CI_INIT": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" - } - }, - "CO_CHAIN": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" - } - }, - "CO_FABRIC": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" - } - }, - "DI": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" - } - }, - "O": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" - } - }, - "S": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:231" - } - } - } - }, - "CARRY4": { - "attributes": { - "abc9_box_id": 4, - "whitebox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:213" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2, 3, 4, 5 ] - }, - "CYINIT": { - "direction": "input", - "bits": [ 6 ] - }, - "DI": { - "direction": "input", - "bits": [ 7, 8, 9, 10 ] - }, - "S": { - "direction": "input", - "bits": [ 11, 12, 13, 14 ] - }, - "CI": { - "direction": "input", - "bits": [ 15 ] - }, - "CO": { - "direction": "output", - "bits": [ 16, 17, 18, 19 ] - } - }, - "cells": { - "$or$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222$7": { - "hide_name": 1, - "type": "$or", - "parameters": { - "A_SIGNED": 0, - "A_WIDTH": 1, - "B_SIGNED": 0, - "B_WIDTH": 1, - "Y_WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222" - }, - "port_directions": { - "A": "input", - "B": "input", - "Y": "output" - }, - "connections": { - "A": [ 15 ], - "B": [ 6 ], - "Y": [ 20 ] - } - }, - "$or$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223$9": { - "hide_name": 1, - "type": "$or", - "parameters": { - "A_SIGNED": 0, - "A_WIDTH": 1, - "B_SIGNED": 0, - "B_WIDTH": 1, - "Y_WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223" - }, - "port_directions": { - "A": "input", - "B": "input", - "Y": "output" - }, - "connections": { - "A": [ 15 ], - "B": [ 6 ], - "Y": [ 21 ] - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223$10": { - "hide_name": 1, - "type": "$mux", - "parameters": { - "WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223" - }, - "port_directions": { - "A": "input", - "B": "input", - "S": "input", - "Y": "output" - }, - "connections": { - "A": [ 7 ], - "B": [ 21 ], - "S": [ 11 ], - "Y": [ 16 ] - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:224$11": { - "hide_name": 1, - "type": "$mux", - "parameters": { - "WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:224" - }, - "port_directions": { - "A": "input", - "B": "input", - "S": "input", - "Y": "output" - }, - "connections": { - "A": [ 8 ], - "B": [ 16 ], - "S": [ 12 ], - "Y": [ 17 ] - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:225$12": { - "hide_name": 1, - "type": "$mux", - "parameters": { - "WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:225" - }, - "port_directions": { - "A": "input", - "B": "input", - "S": "input", - "Y": "output" - }, - "connections": { - "A": [ 9 ], - "B": [ 17 ], - "S": [ 13 ], - "Y": [ 18 ] - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:226$13": { - "hide_name": 1, - "type": "$mux", - "parameters": { - "WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:226" - }, - "port_directions": { - "A": "input", - "B": "input", - "S": "input", - "Y": "output" - }, - "connections": { - "A": [ 10 ], - "B": [ 18 ], - "S": [ 14 ], - "Y": [ 19 ] - } - }, - "$xor$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222$8": { - "hide_name": 1, - "type": "$xor", - "parameters": { - "A_SIGNED": 0, - "A_WIDTH": 4, - "B_SIGNED": 0, - "B_WIDTH": 4, - "Y_WIDTH": 4 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222" - }, - "port_directions": { - "A": "input", - "B": "input", - "Y": "output" - }, - "connections": { - "A": [ 11, 12, 13, 14 ], - "B": [ 20, 16, 17, 18 ], - "Y": [ 2, 3, 4, 5 ] - } - } - }, - "netnames": { - "$or$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222$7_Y": { - "hide_name": 1, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222" - } - }, - "$or$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223$9_Y": { - "hide_name": 1, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223" - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223$10_Y": { - "hide_name": 1, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:223" - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:224$11_Y": { - "hide_name": 1, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:224" - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:225$12_Y": { - "hide_name": 1, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:225" - } - }, - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:226$13_Y": { - "hide_name": 1, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:226" - } - }, - "$xor$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222$8_Y": { - "hide_name": 1, - "bits": [ 2, 3, 4, 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:222" - } - }, - "CI": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "abc9_carry": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:218" - } - }, - "CO": { - "hide_name": 0, - "bits": [ 16, 17, 18, 19 ], - "attributes": { - "abc9_carry": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:215" - } - }, - "CYINIT": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:219" - } - }, - "DI": { - "hide_name": 0, - "bits": [ 7, 8, 9, 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:220" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2, 3, 4, 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:216" - } - }, - "S": { - "hide_name": 0, - "bits": [ 11, 12, 13, 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:220" - } - } - } - }, - "CFGLUT5": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5076" - }, - "ports": { - "CDO": { - "direction": "output", - "bits": [ 2 ] - }, - "O5": { - "direction": "output", - "bits": [ 3 ] - }, - "O6": { - "direction": "output", - "bits": [ 4 ] - }, - "I4": { - "direction": "input", - "bits": [ 5 ] - }, - "I3": { - "direction": "input", - "bits": [ 6 ] - }, - "I2": { - "direction": "input", - "bits": [ 7 ] - }, - "I1": { - "direction": "input", - "bits": [ 8 ] - }, - "I0": { - "direction": "input", - "bits": [ 9 ] - }, - "CDI": { - "direction": "input", - "bits": [ 10 ] - }, - "CE": { - "direction": "input", - "bits": [ 11 ] - }, - "CLK": { - "direction": "input", - "bits": [ 12 ] - } - }, - "cells": { - }, - "netnames": { - "CDI": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5087" - } - }, - "CDO": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5079" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5088" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5091" - } - }, - "I0": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5086" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5085" - } - }, - "I2": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5084" - } - }, - "I3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5083" - } - }, - "I4": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5082" - } - }, - "O5": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5080" - } - }, - "O6": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5081" - } - } - } - }, - "DCIRESET": { - "attributes": { - "blackbox": 1, - "keep": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3802" - }, - "ports": { - "LOCKED": { - "direction": "output", - "bits": [ 2 ] - }, - "RST": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "LOCKED": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3803" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3804" - } - } - } - }, - "DNA_PORT": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3737" - }, - "ports": { - "DOUT": { - "direction": "output", - "bits": [ 2 ] - }, - "CLK": { - "direction": "input", - "bits": [ 3 ] - }, - "DIN": { - "direction": "input", - "bits": [ 4 ] - }, - "READ": { - "direction": "input", - "bits": [ 5 ] - }, - "SHIFT": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "CLK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3740" - } - }, - "DIN": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3741" - } - }, - "DOUT": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3739" - } - }, - "READ": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3742" - } - }, - "SHIFT": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3743" - } - } - } - }, - "DSP48E1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:584" - }, - "ports": { - "ACOUT": { - "direction": "output", - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] - }, - "BCOUT": { - "direction": "output", - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ] - }, - "CARRYCASCOUT": { - "direction": "output", - "bits": [ 50 ] - }, - "CARRYOUT": { - "direction": "output", - "bits": [ 51, 52, 53, 54 ] - }, - "MULTSIGNOUT": { - "direction": "output", - "bits": [ 55 ] - }, - "OVERFLOW": { - "direction": "output", - "bits": [ 56 ] - }, - "P": { - "direction": "output", - "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ] - }, - "PATTERNBDETECT": { - "direction": "output", - "bits": [ 105 ] - }, - "PATTERNDETECT": { - "direction": "output", - "bits": [ 106 ] - }, - "PCOUT": { - "direction": "output", - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ] - }, - "UNDERFLOW": { - "direction": "output", - "bits": [ 155 ] - }, - "A": { - "direction": "input", - "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] - }, - "ACIN": { - "direction": "input", - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ] - }, - "ALUMODE": { - "direction": "input", - "bits": [ 216, 217, 218, 219 ] - }, - "B": { - "direction": "input", - "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ] - }, - "BCIN": { - "direction": "input", - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ] - }, - "C": { - "direction": "input", - "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ] - }, - "CARRYCASCIN": { - "direction": "input", - "bits": [ 304 ] - }, - "CARRYIN": { - "direction": "input", - "bits": [ 305 ] - }, - "CARRYINSEL": { - "direction": "input", - "bits": [ 306, 307, 308 ] - }, - "CEA1": { - "direction": "input", - "bits": [ 309 ] - }, - "CEA2": { - "direction": "input", - "bits": [ 310 ] - }, - "CEAD": { - "direction": "input", - "bits": [ 311 ] - }, - "CEALUMODE": { - "direction": "input", - "bits": [ 312 ] - }, - "CEB1": { - "direction": "input", - "bits": [ 313 ] - }, - "CEB2": { - "direction": "input", - "bits": [ 314 ] - }, - "CEC": { - "direction": "input", - "bits": [ 315 ] - }, - "CECARRYIN": { - "direction": "input", - "bits": [ 316 ] - }, - "CECTRL": { - "direction": "input", - "bits": [ 317 ] - }, - "CED": { - "direction": "input", - "bits": [ 318 ] - }, - "CEINMODE": { - "direction": "input", - "bits": [ 319 ] - }, - "CEM": { - "direction": "input", - "bits": [ 320 ] - }, - "CEP": { - "direction": "input", - "bits": [ 321 ] - }, - "CLK": { - "direction": "input", - "bits": [ 322 ] - }, - "D": { - "direction": "input", - "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ] - }, - "INMODE": { - "direction": "input", - "bits": [ 348, 349, 350, 351, 352 ] - }, - "MULTSIGNIN": { - "direction": "input", - "bits": [ 353 ] - }, - "OPMODE": { - "direction": "input", - "bits": [ 354, 355, 356, 357, 358, 359, 360 ] - }, - "PCIN": { - "direction": "input", - "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ] - }, - "RSTA": { - "direction": "input", - "bits": [ 409 ] - }, - "RSTALLCARRYIN": { - "direction": "input", - "bits": [ 410 ] - }, - "RSTALUMODE": { - "direction": "input", - "bits": [ 411 ] - }, - "RSTB": { - "direction": "input", - "bits": [ 412 ] - }, - "RSTC": { - "direction": "input", - "bits": [ 413 ] - }, - "RSTCTRL": { - "direction": "input", - "bits": [ 414 ] - }, - "RSTD": { - "direction": "input", - "bits": [ 415 ] - }, - "RSTINMODE": { - "direction": "input", - "bits": [ 416 ] - }, - "RSTM": { - "direction": "input", - "bits": [ 417 ] - }, - "RSTP": { - "direction": "input", - "bits": [ 418 ] - } - }, - "cells": { - }, - "netnames": { - "A": { - "hide_name": 0, - "bits": [ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:596" - } - }, - "ACIN": { - "hide_name": 0, - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:597" - } - }, - "ACOUT": { - "hide_name": 0, - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:585" - } - }, - "ALUMODE": { - "hide_name": 0, - "bits": [ 216, 217, 218, 219 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:598" - } - }, - "B": { - "hide_name": 0, - "bits": [ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:599" - } - }, - "BCIN": { - "hide_name": 0, - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:600" - } - }, - "BCOUT": { - "hide_name": 0, - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:586" - } - }, - "C": { - "hide_name": 0, - "bits": [ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:601" - } - }, - "CARRYCASCIN": { - "hide_name": 0, - "bits": [ 304 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:602" - } - }, - "CARRYCASCOUT": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:587" - } - }, - "CARRYIN": { - "hide_name": 0, - "bits": [ 305 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:603" - } - }, - "CARRYINSEL": { - "hide_name": 0, - "bits": [ 306, 307, 308 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:604" - } - }, - "CARRYOUT": { - "hide_name": 0, - "bits": [ 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:588" - } - }, - "CEA1": { - "hide_name": 0, - "bits": [ 309 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:605" - } - }, - "CEA2": { - "hide_name": 0, - "bits": [ 310 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:606" - } - }, - "CEAD": { - "hide_name": 0, - "bits": [ 311 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:607" - } - }, - "CEALUMODE": { - "hide_name": 0, - "bits": [ 312 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:608" - } - }, - "CEB1": { - "hide_name": 0, - "bits": [ 313 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:609" - } - }, - "CEB2": { - "hide_name": 0, - "bits": [ 314 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:610" - } - }, - "CEC": { - "hide_name": 0, - "bits": [ 315 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:611" - } - }, - "CECARRYIN": { - "hide_name": 0, - "bits": [ 316 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:612" - } - }, - "CECTRL": { - "hide_name": 0, - "bits": [ 317 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:613" - } - }, - "CED": { - "hide_name": 0, - "bits": [ 318 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:614" - } - }, - "CEINMODE": { - "hide_name": 0, - "bits": [ 319 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:615" - } - }, - "CEM": { - "hide_name": 0, - "bits": [ 320 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:616" - } - }, - "CEP": { - "hide_name": 0, - "bits": [ 321 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:617" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 322 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:618" - } - }, - "D": { - "hide_name": 0, - "bits": [ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:619" - } - }, - "INMODE": { - "hide_name": 0, - "bits": [ 348, 349, 350, 351, 352 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:620" - } - }, - "MULTSIGNIN": { - "hide_name": 0, - "bits": [ 353 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:621" - } - }, - "MULTSIGNOUT": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:589" - } - }, - "OPMODE": { - "hide_name": 0, - "bits": [ 354, 355, 356, 357, 358, 359, 360 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:622" - } - }, - "OVERFLOW": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:590" - } - }, - "P": { - "hide_name": 0, - "bits": [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:591" - } - }, - "PATTERNBDETECT": { - "hide_name": 0, - "bits": [ 105 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:592" - } - }, - "PATTERNDETECT": { - "hide_name": 0, - "bits": [ 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:593" - } - }, - "PCIN": { - "hide_name": 0, - "bits": [ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:623" - } - }, - "PCOUT": { - "hide_name": 0, - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:594" - } - }, - "RSTA": { - "hide_name": 0, - "bits": [ 409 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:624" - } - }, - "RSTALLCARRYIN": { - "hide_name": 0, - "bits": [ 410 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:625" - } - }, - "RSTALUMODE": { - "hide_name": 0, - "bits": [ 411 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:626" - } - }, - "RSTB": { - "hide_name": 0, - "bits": [ 412 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:627" - } - }, - "RSTC": { - "hide_name": 0, - "bits": [ 413 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:628" - } - }, - "RSTCTRL": { - "hide_name": 0, - "bits": [ 414 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:629" - } - }, - "RSTD": { - "hide_name": 0, - "bits": [ 415 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:630" - } - }, - "RSTINMODE": { - "hide_name": 0, - "bits": [ 416 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:631" - } - }, - "RSTM": { - "hide_name": 0, - "bits": [ 417 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:632" - } - }, - "RSTP": { - "hide_name": 0, - "bits": [ 418 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:633" - } - }, - "UNDERFLOW": { - "hide_name": 0, - "bits": [ 155 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:595" - } - } - } - }, - "EFUSE_USR": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3746" - }, - "ports": { - "EFUSEUSR": { - "direction": "output", - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 ] - } - }, - "cells": { - }, - "netnames": { - "EFUSEUSR": { - "hide_name": 0, - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3748" - } - } - } - }, - "FDCE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:300" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "C": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - }, - "D": { - "direction": "input", - "bits": [ 5 ] - }, - "CLR": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_C_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:305" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:306" - } - }, - "CLR": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "invertible_pin": "IS_CLR_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:310" - } - }, - "D": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_D_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:308" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 303, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:302" - } - } - } - }, - "FDCE_1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:374" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "C": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - }, - "D": { - "direction": "input", - "bits": [ 5 ] - }, - "CLR": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:378" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:379" - } - }, - "CLR": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:379" - } - }, - "D": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:379" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 303, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:376" - } - } - } - }, - "FDPE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:325" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "C": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - }, - "D": { - "direction": "input", - "bits": [ 5 ] - }, - "PRE": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_C_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:330" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:331" - } - }, - "D": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_D_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:333" - } - }, - "PRE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "invertible_pin": "IS_PRE_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:335" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 303, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:327" - } - } - } - }, - "FDPE_1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:386" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "C": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - }, - "D": { - "direction": "input", - "bits": [ 5 ] - }, - "PRE": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:390" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:391" - } - }, - "D": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:391" - } - }, - "PRE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:391" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 303, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:388" - } - } - } - }, - "FDRE": { - "attributes": { - "blackbox": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:254" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "C": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - }, - "D": { - "direction": "input", - "bits": [ 5 ] - }, - "R": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_C_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:259" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:260" - } - }, - "D": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_D_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:262" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 303, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:256" - } - }, - "R": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "invertible_pin": "IS_R_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:264" - } - } - } - }, - "FDRE_1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:350" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "C": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - }, - "D": { - "direction": "input", - "bits": [ 5 ] - }, - "R": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:354" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:355" - } - }, - "D": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:355" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 303, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:352" - } - }, - "R": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:355" - } - } - } - }, - "FDSE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:277" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "C": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - }, - "D": { - "direction": "input", - "bits": [ 5 ] - }, - "S": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_C_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:282" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:283" - } - }, - "D": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_D_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:285" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 303, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:279" - } - }, - "S": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "invertible_pin": "IS_S_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:287" - } - } - } - }, - "FDSE_1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:362" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "C": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - }, - "D": { - "direction": "input", - "bits": [ 5 ] - }, - "S": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:366" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:367" - } - }, - "D": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:367" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 303, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:364" - } - }, - "S": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:367" - } - } - } - }, - "FIFO18E1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4682" - }, - "ports": { - "ALMOSTEMPTY": { - "direction": "output", - "bits": [ 2 ] - }, - "ALMOSTFULL": { - "direction": "output", - "bits": [ 3 ] - }, - "DO": { - "direction": "output", - "bits": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 ] - }, - "DOP": { - "direction": "output", - "bits": [ 36, 37, 38, 39 ] - }, - "EMPTY": { - "direction": "output", - "bits": [ 40 ] - }, - "FULL": { - "direction": "output", - "bits": [ 41 ] - }, - "RDCOUNT": { - "direction": "output", - "bits": [ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 ] - }, - "RDERR": { - "direction": "output", - "bits": [ 54 ] - }, - "WRCOUNT": { - "direction": "output", - "bits": [ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 ] - }, - "WRERR": { - "direction": "output", - "bits": [ 67 ] - }, - "DI": { - "direction": "input", - "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ] - }, - "DIP": { - "direction": "input", - "bits": [ 100, 101, 102, 103 ] - }, - "RDCLK": { - "direction": "input", - "bits": [ 104 ] - }, - "RDEN": { - "direction": "input", - "bits": [ 105 ] - }, - "REGCE": { - "direction": "input", - "bits": [ 106 ] - }, - "RST": { - "direction": "input", - "bits": [ 107 ] - }, - "RSTREG": { - "direction": "input", - "bits": [ 108 ] - }, - "WRCLK": { - "direction": "input", - "bits": [ 109 ] - }, - "WREN": { - "direction": "input", - "bits": [ 110 ] - } - }, - "cells": { - }, - "netnames": { - "ALMOSTEMPTY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4699" - } - }, - "ALMOSTFULL": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4700" - } - }, - "DI": { - "hide_name": 0, - "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4709" - } - }, - "DIP": { - "hide_name": 0, - "bits": [ 100, 101, 102, 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4710" - } - }, - "DO": { - "hide_name": 0, - "bits": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4701" - } - }, - "DOP": { - "hide_name": 0, - "bits": [ 36, 37, 38, 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4702" - } - }, - "EMPTY": { - "hide_name": 0, - "bits": [ 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4703" - } - }, - "FULL": { - "hide_name": 0, - "bits": [ 41 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4704" - } - }, - "RDCLK": { - "hide_name": 0, - "bits": [ 104 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_RDCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4713" - } - }, - "RDCOUNT": { - "hide_name": 0, - "bits": [ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4705" - } - }, - "RDEN": { - "hide_name": 0, - "bits": [ 105 ], - "attributes": { - "invertible_pin": "IS_RDEN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4715" - } - }, - "RDERR": { - "hide_name": 0, - "bits": [ 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4706" - } - }, - "REGCE": { - "hide_name": 0, - "bits": [ 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4716" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 107 ], - "attributes": { - "invertible_pin": "IS_RST_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4718" - } - }, - "RSTREG": { - "hide_name": 0, - "bits": [ 108 ], - "attributes": { - "invertible_pin": "IS_RSTREG_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4720" - } - }, - "WRCLK": { - "hide_name": 0, - "bits": [ 109 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4723" - } - }, - "WRCOUNT": { - "hide_name": 0, - "bits": [ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4707" - } - }, - "WREN": { - "hide_name": 0, - "bits": [ 110 ], - "attributes": { - "invertible_pin": "IS_WREN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4725" - } - }, - "WRERR": { - "hide_name": 0, - "bits": [ 67 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4708" - } - } - } - }, - "FIFO36E1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4728" - }, - "ports": { - "ALMOSTEMPTY": { - "direction": "output", - "bits": [ 2 ] - }, - "ALMOSTFULL": { - "direction": "output", - "bits": [ 3 ] - }, - "DBITERR": { - "direction": "output", - "bits": [ 4 ] - }, - "DO": { - "direction": "output", - "bits": [ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 ] - }, - "DOP": { - "direction": "output", - "bits": [ 69, 70, 71, 72, 73, 74, 75, 76 ] - }, - "ECCPARITY": { - "direction": "output", - "bits": [ 77, 78, 79, 80, 81, 82, 83, 84 ] - }, - "EMPTY": { - "direction": "output", - "bits": [ 85 ] - }, - "FULL": { - "direction": "output", - "bits": [ 86 ] - }, - "RDCOUNT": { - "direction": "output", - "bits": [ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ] - }, - "RDERR": { - "direction": "output", - "bits": [ 100 ] - }, - "SBITERR": { - "direction": "output", - "bits": [ 101 ] - }, - "WRCOUNT": { - "direction": "output", - "bits": [ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114 ] - }, - "WRERR": { - "direction": "output", - "bits": [ 115 ] - }, - "DI": { - "direction": "input", - "bits": [ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179 ] - }, - "DIP": { - "direction": "input", - "bits": [ 180, 181, 182, 183, 184, 185, 186, 187 ] - }, - "INJECTDBITERR": { - "direction": "input", - "bits": [ 188 ] - }, - "INJECTSBITERR": { - "direction": "input", - "bits": [ 189 ] - }, - "RDCLK": { - "direction": "input", - "bits": [ 190 ] - }, - "RDEN": { - "direction": "input", - "bits": [ 191 ] - }, - "REGCE": { - "direction": "input", - "bits": [ 192 ] - }, - "RST": { - "direction": "input", - "bits": [ 193 ] - }, - "RSTREG": { - "direction": "input", - "bits": [ 194 ] - }, - "WRCLK": { - "direction": "input", - "bits": [ 195 ] - }, - "WREN": { - "direction": "input", - "bits": [ 196 ] - } - }, - "cells": { - }, - "netnames": { - "ALMOSTEMPTY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4747" - } - }, - "ALMOSTFULL": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4748" - } - }, - "DBITERR": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4749" - } - }, - "DI": { - "hide_name": 0, - "bits": [ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4760" - } - }, - "DIP": { - "hide_name": 0, - "bits": [ 180, 181, 182, 183, 184, 185, 186, 187 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4761" - } - }, - "DO": { - "hide_name": 0, - "bits": [ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4750" - } - }, - "DOP": { - "hide_name": 0, - "bits": [ 69, 70, 71, 72, 73, 74, 75, 76 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4751" - } - }, - "ECCPARITY": { - "hide_name": 0, - "bits": [ 77, 78, 79, 80, 81, 82, 83, 84 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4752" - } - }, - "EMPTY": { - "hide_name": 0, - "bits": [ 85 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4753" - } - }, - "FULL": { - "hide_name": 0, - "bits": [ 86 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4754" - } - }, - "INJECTDBITERR": { - "hide_name": 0, - "bits": [ 188 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4762" - } - }, - "INJECTSBITERR": { - "hide_name": 0, - "bits": [ 189 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4763" - } - }, - "RDCLK": { - "hide_name": 0, - "bits": [ 190 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_RDCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4766" - } - }, - "RDCOUNT": { - "hide_name": 0, - "bits": [ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4755" - } - }, - "RDEN": { - "hide_name": 0, - "bits": [ 191 ], - "attributes": { - "invertible_pin": "IS_RDEN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4768" - } - }, - "RDERR": { - "hide_name": 0, - "bits": [ 100 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4756" - } - }, - "REGCE": { - "hide_name": 0, - "bits": [ 192 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4769" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 193 ], - "attributes": { - "invertible_pin": "IS_RST_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4771" - } - }, - "RSTREG": { - "hide_name": 0, - "bits": [ 194 ], - "attributes": { - "invertible_pin": "IS_RSTREG_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4773" - } - }, - "SBITERR": { - "hide_name": 0, - "bits": [ 101 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4757" - } - }, - "WRCLK": { - "hide_name": 0, - "bits": [ 195 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4776" - } - }, - "WRCOUNT": { - "hide_name": 0, - "bits": [ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4758" - } - }, - "WREN": { - "hide_name": 0, - "bits": [ 196 ], - "attributes": { - "invertible_pin": "IS_WREN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4778" - } - }, - "WRERR": { - "hide_name": 0, - "bits": [ 115 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4759" - } - } - } - }, - "FRAME_ECCE2": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3751" - }, - "ports": { - "CRCERROR": { - "direction": "output", - "bits": [ 2 ] - }, - "ECCERROR": { - "direction": "output", - "bits": [ 3 ] - }, - "ECCERRORSINGLE": { - "direction": "output", - "bits": [ 4 ] - }, - "SYNDROMEVALID": { - "direction": "output", - "bits": [ 5 ] - }, - "SYNDROME": { - "direction": "output", - "bits": [ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ] - }, - "FAR": { - "direction": "output", - "bits": [ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ] - }, - "SYNBIT": { - "direction": "output", - "bits": [ 45, 46, 47, 48, 49 ] - }, - "SYNWORD": { - "direction": "output", - "bits": [ 50, 51, 52, 53, 54, 55, 56 ] - } - }, - "cells": { - }, - "netnames": { - "CRCERROR": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3754" - } - }, - "ECCERROR": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3755" - } - }, - "ECCERRORSINGLE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3756" - } - }, - "FAR": { - "hide_name": 0, - "bits": [ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3759" - } - }, - "SYNBIT": { - "hide_name": 0, - "bits": [ 45, 46, 47, 48, 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3760" - } - }, - "SYNDROME": { - "hide_name": 0, - "bits": [ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3758" - } - }, - "SYNDROMEVALID": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3757" - } - }, - "SYNWORD": { - "hide_name": 0, - "bits": [ 50, 51, 52, 53, 54, 55, 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3761" - } - } - } - }, - "GND": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:28" - }, - "ports": { - "G": { - "direction": "output", - "bits": [ 2 ] - } - }, - "cells": { - }, - "netnames": { - "G": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:28" - } - } - } - }, - "GTHE2_CHANNEL": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3" - }, - "ports": { - "CPLLFBCLKLOST": { - "direction": "output", - "bits": [ 2 ] - }, - "CPLLLOCK": { - "direction": "output", - "bits": [ 3 ] - }, - "CPLLREFCLKLOST": { - "direction": "output", - "bits": [ 4 ] - }, - "DRPRDY": { - "direction": "output", - "bits": [ 5 ] - }, - "EYESCANDATAERROR": { - "direction": "output", - "bits": [ 6 ] - }, - "GTHTXN": { - "direction": "output", - "bits": [ 7 ] - }, - "GTHTXP": { - "direction": "output", - "bits": [ 8 ] - }, - "GTREFCLKMONITOR": { - "direction": "output", - "bits": [ 9 ] - }, - "PHYSTATUS": { - "direction": "output", - "bits": [ 10 ] - }, - "RSOSINTDONE": { - "direction": "output", - "bits": [ 11 ] - }, - "RXBYTEISALIGNED": { - "direction": "output", - "bits": [ 12 ] - }, - "RXBYTEREALIGN": { - "direction": "output", - "bits": [ 13 ] - }, - "RXCDRLOCK": { - "direction": "output", - "bits": [ 14 ] - }, - "RXCHANBONDSEQ": { - "direction": "output", - "bits": [ 15 ] - }, - "RXCHANISALIGNED": { - "direction": "output", - "bits": [ 16 ] - }, - "RXCHANREALIGN": { - "direction": "output", - "bits": [ 17 ] - }, - "RXCOMINITDET": { - "direction": "output", - "bits": [ 18 ] - }, - "RXCOMMADET": { - "direction": "output", - "bits": [ 19 ] - }, - "RXCOMSASDET": { - "direction": "output", - "bits": [ 20 ] - }, - "RXCOMWAKEDET": { - "direction": "output", - "bits": [ 21 ] - }, - "RXDFESLIDETAPSTARTED": { - "direction": "output", - "bits": [ 22 ] - }, - "RXDFESLIDETAPSTROBEDONE": { - "direction": "output", - "bits": [ 23 ] - }, - "RXDFESLIDETAPSTROBESTARTED": { - "direction": "output", - "bits": [ 24 ] - }, - "RXDFESTADAPTDONE": { - "direction": "output", - "bits": [ 25 ] - }, - "RXDLYSRESETDONE": { - "direction": "output", - "bits": [ 26 ] - }, - "RXELECIDLE": { - "direction": "output", - "bits": [ 27 ] - }, - "RXOSINTSTARTED": { - "direction": "output", - "bits": [ 28 ] - }, - "RXOSINTSTROBEDONE": { - "direction": "output", - "bits": [ 29 ] - }, - "RXOSINTSTROBESTARTED": { - "direction": "output", - "bits": [ 30 ] - }, - "RXOUTCLK": { - "direction": "output", - "bits": [ 31 ] - }, - "RXOUTCLKFABRIC": { - "direction": "output", - "bits": [ 32 ] - }, - "RXOUTCLKPCS": { - "direction": "output", - "bits": [ 33 ] - }, - "RXPHALIGNDONE": { - "direction": "output", - "bits": [ 34 ] - }, - "RXPMARESETDONE": { - "direction": "output", - "bits": [ 35 ] - }, - "RXPRBSERR": { - "direction": "output", - "bits": [ 36 ] - }, - "RXQPISENN": { - "direction": "output", - "bits": [ 37 ] - }, - "RXQPISENP": { - "direction": "output", - "bits": [ 38 ] - }, - "RXRATEDONE": { - "direction": "output", - "bits": [ 39 ] - }, - "RXRESETDONE": { - "direction": "output", - "bits": [ 40 ] - }, - "RXSYNCDONE": { - "direction": "output", - "bits": [ 41 ] - }, - "RXSYNCOUT": { - "direction": "output", - "bits": [ 42 ] - }, - "RXVALID": { - "direction": "output", - "bits": [ 43 ] - }, - "TXCOMFINISH": { - "direction": "output", - "bits": [ 44 ] - }, - "TXDLYSRESETDONE": { - "direction": "output", - "bits": [ 45 ] - }, - "TXGEARBOXREADY": { - "direction": "output", - "bits": [ 46 ] - }, - "TXOUTCLK": { - "direction": "output", - "bits": [ 47 ] - }, - "TXOUTCLKFABRIC": { - "direction": "output", - "bits": [ 48 ] - }, - "TXOUTCLKPCS": { - "direction": "output", - "bits": [ 49 ] - }, - "TXPHALIGNDONE": { - "direction": "output", - "bits": [ 50 ] - }, - "TXPHINITDONE": { - "direction": "output", - "bits": [ 51 ] - }, - "TXPMARESETDONE": { - "direction": "output", - "bits": [ 52 ] - }, - "TXQPISENN": { - "direction": "output", - "bits": [ 53 ] - }, - "TXQPISENP": { - "direction": "output", - "bits": [ 54 ] - }, - "TXRATEDONE": { - "direction": "output", - "bits": [ 55 ] - }, - "TXRESETDONE": { - "direction": "output", - "bits": [ 56 ] - }, - "TXSYNCDONE": { - "direction": "output", - "bits": [ 57 ] - }, - "TXSYNCOUT": { - "direction": "output", - "bits": [ 58 ] - }, - "DMONITOROUT": { - "direction": "output", - "bits": [ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 ] - }, - "DRPDO": { - "direction": "output", - "bits": [ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89 ] - }, - "PCSRSVDOUT": { - "direction": "output", - "bits": [ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105 ] - }, - "RXCLKCORCNT": { - "direction": "output", - "bits": [ 106, 107 ] - }, - "RXDATAVALID": { - "direction": "output", - "bits": [ 108, 109 ] - }, - "RXHEADERVALID": { - "direction": "output", - "bits": [ 110, 111 ] - }, - "RXSTARTOFSEQ": { - "direction": "output", - "bits": [ 112, 113 ] - }, - "TXBUFSTATUS": { - "direction": "output", - "bits": [ 114, 115 ] - }, - "RXBUFSTATUS": { - "direction": "output", - "bits": [ 116, 117, 118 ] - }, - "RXSTATUS": { - "direction": "output", - "bits": [ 119, 120, 121 ] - }, - "RXCHBONDO": { - "direction": "output", - "bits": [ 122, 123, 124, 125, 126 ] - }, - "RXPHMONITOR": { - "direction": "output", - "bits": [ 127, 128, 129, 130, 131 ] - }, - "RXPHSLIPMONITOR": { - "direction": "output", - "bits": [ 132, 133, 134, 135, 136 ] - }, - "RXHEADER": { - "direction": "output", - "bits": [ 137, 138, 139, 140, 141, 142 ] - }, - "RXDATA": { - "direction": "output", - "bits": [ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206 ] - }, - "RXMONITOROUT": { - "direction": "output", - "bits": [ 207, 208, 209, 210, 211, 212, 213 ] - }, - "RXCHARISCOMMA": { - "direction": "output", - "bits": [ 214, 215, 216, 217, 218, 219, 220, 221 ] - }, - "RXCHARISK": { - "direction": "output", - "bits": [ 222, 223, 224, 225, 226, 227, 228, 229 ] - }, - "RXDISPERR": { - "direction": "output", - "bits": [ 230, 231, 232, 233, 234, 235, 236, 237 ] - }, - "RXNOTINTABLE": { - "direction": "output", - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245 ] - }, - "CFGRESET": { - "direction": "input", - "bits": [ 246 ] - }, - "CLKRSVD0": { - "direction": "input", - "bits": [ 247 ] - }, - "CLKRSVD1": { - "direction": "input", - "bits": [ 248 ] - }, - "CPLLLOCKDETCLK": { - "direction": "input", - "bits": [ 249 ] - }, - "CPLLLOCKEN": { - "direction": "input", - "bits": [ 250 ] - }, - "CPLLPD": { - "direction": "input", - "bits": [ 251 ] - }, - "CPLLRESET": { - "direction": "input", - "bits": [ 252 ] - }, - "DMONFIFORESET": { - "direction": "input", - "bits": [ 253 ] - }, - "DMONITORCLK": { - "direction": "input", - "bits": [ 254 ] - }, - "DRPCLK": { - "direction": "input", - "bits": [ 255 ] - }, - "DRPEN": { - "direction": "input", - "bits": [ 256 ] - }, - "DRPWE": { - "direction": "input", - "bits": [ 257 ] - }, - "EYESCANMODE": { - "direction": "input", - "bits": [ 258 ] - }, - "EYESCANRESET": { - "direction": "input", - "bits": [ 259 ] - }, - "EYESCANTRIGGER": { - "direction": "input", - "bits": [ 260 ] - }, - "GTGREFCLK": { - "direction": "input", - "bits": [ 261 ] - }, - "GTHRXN": { - "direction": "input", - "bits": [ 262 ] - }, - "GTHRXP": { - "direction": "input", - "bits": [ 263 ] - }, - "GTNORTHREFCLK0": { - "direction": "input", - "bits": [ 264 ] - }, - "GTNORTHREFCLK1": { - "direction": "input", - "bits": [ 265 ] - }, - "GTREFCLK0": { - "direction": "input", - "bits": [ 266 ] - }, - "GTREFCLK1": { - "direction": "input", - "bits": [ 267 ] - }, - "GTRESETSEL": { - "direction": "input", - "bits": [ 268 ] - }, - "GTRXRESET": { - "direction": "input", - "bits": [ 269 ] - }, - "GTSOUTHREFCLK0": { - "direction": "input", - "bits": [ 270 ] - }, - "GTSOUTHREFCLK1": { - "direction": "input", - "bits": [ 271 ] - }, - "GTTXRESET": { - "direction": "input", - "bits": [ 272 ] - }, - "QPLLCLK": { - "direction": "input", - "bits": [ 273 ] - }, - "QPLLREFCLK": { - "direction": "input", - "bits": [ 274 ] - }, - "RESETOVRD": { - "direction": "input", - "bits": [ 275 ] - }, - "RX8B10BEN": { - "direction": "input", - "bits": [ 276 ] - }, - "RXBUFRESET": { - "direction": "input", - "bits": [ 277 ] - }, - "RXCDRFREQRESET": { - "direction": "input", - "bits": [ 278 ] - }, - "RXCDRHOLD": { - "direction": "input", - "bits": [ 279 ] - }, - "RXCDROVRDEN": { - "direction": "input", - "bits": [ 280 ] - }, - "RXCDRRESET": { - "direction": "input", - "bits": [ 281 ] - }, - "RXCDRRESETRSV": { - "direction": "input", - "bits": [ 282 ] - }, - "RXCHBONDEN": { - "direction": "input", - "bits": [ 283 ] - }, - "RXCHBONDMASTER": { - "direction": "input", - "bits": [ 284 ] - }, - "RXCHBONDSLAVE": { - "direction": "input", - "bits": [ 285 ] - }, - "RXCOMMADETEN": { - "direction": "input", - "bits": [ 286 ] - }, - "RXDDIEN": { - "direction": "input", - "bits": [ 287 ] - }, - "RXDFEAGCHOLD": { - "direction": "input", - "bits": [ 288 ] - }, - "RXDFEAGCOVRDEN": { - "direction": "input", - "bits": [ 289 ] - }, - "RXDFECM1EN": { - "direction": "input", - "bits": [ 290 ] - }, - "RXDFELFHOLD": { - "direction": "input", - "bits": [ 291 ] - }, - "RXDFELFOVRDEN": { - "direction": "input", - "bits": [ 292 ] - }, - "RXDFELPMRESET": { - "direction": "input", - "bits": [ 293 ] - }, - "RXDFESLIDETAPADAPTEN": { - "direction": "input", - "bits": [ 294 ] - }, - "RXDFESLIDETAPHOLD": { - "direction": "input", - "bits": [ 295 ] - }, - "RXDFESLIDETAPINITOVRDEN": { - "direction": "input", - "bits": [ 296 ] - }, - "RXDFESLIDETAPONLYADAPTEN": { - "direction": "input", - "bits": [ 297 ] - }, - "RXDFESLIDETAPOVRDEN": { - "direction": "input", - "bits": [ 298 ] - }, - "RXDFESLIDETAPSTROBE": { - "direction": "input", - "bits": [ 299 ] - }, - "RXDFETAP2HOLD": { - "direction": "input", - "bits": [ 300 ] - }, - "RXDFETAP2OVRDEN": { - "direction": "input", - "bits": [ 301 ] - }, - "RXDFETAP3HOLD": { - "direction": "input", - "bits": [ 302 ] - }, - "RXDFETAP3OVRDEN": { - "direction": "input", - "bits": [ 303 ] - }, - "RXDFETAP4HOLD": { - "direction": "input", - "bits": [ 304 ] - }, - "RXDFETAP4OVRDEN": { - "direction": "input", - "bits": [ 305 ] - }, - "RXDFETAP5HOLD": { - "direction": "input", - "bits": [ 306 ] - }, - "RXDFETAP5OVRDEN": { - "direction": "input", - "bits": [ 307 ] - }, - "RXDFETAP6HOLD": { - "direction": "input", - "bits": [ 308 ] - }, - "RXDFETAP6OVRDEN": { - "direction": "input", - "bits": [ 309 ] - }, - "RXDFETAP7HOLD": { - "direction": "input", - "bits": [ 310 ] - }, - "RXDFETAP7OVRDEN": { - "direction": "input", - "bits": [ 311 ] - }, - "RXDFEUTHOLD": { - "direction": "input", - "bits": [ 312 ] - }, - "RXDFEUTOVRDEN": { - "direction": "input", - "bits": [ 313 ] - }, - "RXDFEVPHOLD": { - "direction": "input", - "bits": [ 314 ] - }, - "RXDFEVPOVRDEN": { - "direction": "input", - "bits": [ 315 ] - }, - "RXDFEVSEN": { - "direction": "input", - "bits": [ 316 ] - }, - "RXDFEXYDEN": { - "direction": "input", - "bits": [ 317 ] - }, - "RXDLYBYPASS": { - "direction": "input", - "bits": [ 318 ] - }, - "RXDLYEN": { - "direction": "input", - "bits": [ 319 ] - }, - "RXDLYOVRDEN": { - "direction": "input", - "bits": [ 320 ] - }, - "RXDLYSRESET": { - "direction": "input", - "bits": [ 321 ] - }, - "RXGEARBOXSLIP": { - "direction": "input", - "bits": [ 322 ] - }, - "RXLPMEN": { - "direction": "input", - "bits": [ 323 ] - }, - "RXLPMHFHOLD": { - "direction": "input", - "bits": [ 324 ] - }, - "RXLPMHFOVRDEN": { - "direction": "input", - "bits": [ 325 ] - }, - "RXLPMLFHOLD": { - "direction": "input", - "bits": [ 326 ] - }, - "RXLPMLFKLOVRDEN": { - "direction": "input", - "bits": [ 327 ] - }, - "RXMCOMMAALIGNEN": { - "direction": "input", - "bits": [ 328 ] - }, - "RXOOBRESET": { - "direction": "input", - "bits": [ 329 ] - }, - "RXOSCALRESET": { - "direction": "input", - "bits": [ 330 ] - }, - "RXOSHOLD": { - "direction": "input", - "bits": [ 331 ] - }, - "RXOSINTEN": { - "direction": "input", - "bits": [ 332 ] - }, - "RXOSINTHOLD": { - "direction": "input", - "bits": [ 333 ] - }, - "RXOSINTNTRLEN": { - "direction": "input", - "bits": [ 334 ] - }, - "RXOSINTOVRDEN": { - "direction": "input", - "bits": [ 335 ] - }, - "RXOSINTSTROBE": { - "direction": "input", - "bits": [ 336 ] - }, - "RXOSINTTESTOVRDEN": { - "direction": "input", - "bits": [ 337 ] - }, - "RXOSOVRDEN": { - "direction": "input", - "bits": [ 338 ] - }, - "RXPCOMMAALIGNEN": { - "direction": "input", - "bits": [ 339 ] - }, - "RXPCSRESET": { - "direction": "input", - "bits": [ 340 ] - }, - "RXPHALIGN": { - "direction": "input", - "bits": [ 341 ] - }, - "RXPHALIGNEN": { - "direction": "input", - "bits": [ 342 ] - }, - "RXPHDLYPD": { - "direction": "input", - "bits": [ 343 ] - }, - "RXPHDLYRESET": { - "direction": "input", - "bits": [ 344 ] - }, - "RXPHOVRDEN": { - "direction": "input", - "bits": [ 345 ] - }, - "RXPMARESET": { - "direction": "input", - "bits": [ 346 ] - }, - "RXPOLARITY": { - "direction": "input", - "bits": [ 347 ] - }, - "RXPRBSCNTRESET": { - "direction": "input", - "bits": [ 348 ] - }, - "RXQPIEN": { - "direction": "input", - "bits": [ 349 ] - }, - "RXRATEMODE": { - "direction": "input", - "bits": [ 350 ] - }, - "RXSLIDE": { - "direction": "input", - "bits": [ 351 ] - }, - "RXSYNCALLIN": { - "direction": "input", - "bits": [ 352 ] - }, - "RXSYNCIN": { - "direction": "input", - "bits": [ 353 ] - }, - "RXSYNCMODE": { - "direction": "input", - "bits": [ 354 ] - }, - "RXUSERRDY": { - "direction": "input", - "bits": [ 355 ] - }, - "RXUSRCLK2": { - "direction": "input", - "bits": [ 356 ] - }, - "RXUSRCLK": { - "direction": "input", - "bits": [ 357 ] - }, - "SETERRSTATUS": { - "direction": "input", - "bits": [ 358 ] - }, - "SIGVALIDCLK": { - "direction": "input", - "bits": [ 359 ] - }, - "TX8B10BEN": { - "direction": "input", - "bits": [ 360 ] - }, - "TXCOMINIT": { - "direction": "input", - "bits": [ 361 ] - }, - "TXCOMSAS": { - "direction": "input", - "bits": [ 362 ] - }, - "TXCOMWAKE": { - "direction": "input", - "bits": [ 363 ] - }, - "TXDEEMPH": { - "direction": "input", - "bits": [ 364 ] - }, - "TXDETECTRX": { - "direction": "input", - "bits": [ 365 ] - }, - "TXDIFFPD": { - "direction": "input", - "bits": [ 366 ] - }, - "TXDLYBYPASS": { - "direction": "input", - "bits": [ 367 ] - }, - "TXDLYEN": { - "direction": "input", - "bits": [ 368 ] - }, - "TXDLYHOLD": { - "direction": "input", - "bits": [ 369 ] - }, - "TXDLYOVRDEN": { - "direction": "input", - "bits": [ 370 ] - }, - "TXDLYSRESET": { - "direction": "input", - "bits": [ 371 ] - }, - "TXDLYUPDOWN": { - "direction": "input", - "bits": [ 372 ] - }, - "TXELECIDLE": { - "direction": "input", - "bits": [ 373 ] - }, - "TXINHIBIT": { - "direction": "input", - "bits": [ 374 ] - }, - "TXPCSRESET": { - "direction": "input", - "bits": [ 375 ] - }, - "TXPDELECIDLEMODE": { - "direction": "input", - "bits": [ 376 ] - }, - "TXPHALIGN": { - "direction": "input", - "bits": [ 377 ] - }, - "TXPHALIGNEN": { - "direction": "input", - "bits": [ 378 ] - }, - "TXPHDLYPD": { - "direction": "input", - "bits": [ 379 ] - }, - "TXPHDLYRESET": { - "direction": "input", - "bits": [ 380 ] - }, - "TXPHDLYTSTCLK": { - "direction": "input", - "bits": [ 381 ] - }, - "TXPHINIT": { - "direction": "input", - "bits": [ 382 ] - }, - "TXPHOVRDEN": { - "direction": "input", - "bits": [ 383 ] - }, - "TXPIPPMEN": { - "direction": "input", - "bits": [ 384 ] - }, - "TXPIPPMOVRDEN": { - "direction": "input", - "bits": [ 385 ] - }, - "TXPIPPMPD": { - "direction": "input", - "bits": [ 386 ] - }, - "TXPIPPMSEL": { - "direction": "input", - "bits": [ 387 ] - }, - "TXPISOPD": { - "direction": "input", - "bits": [ 388 ] - }, - "TXPMARESET": { - "direction": "input", - "bits": [ 389 ] - }, - "TXPOLARITY": { - "direction": "input", - "bits": [ 390 ] - }, - "TXPOSTCURSORINV": { - "direction": "input", - "bits": [ 391 ] - }, - "TXPRBSFORCEERR": { - "direction": "input", - "bits": [ 392 ] - }, - "TXPRECURSORINV": { - "direction": "input", - "bits": [ 393 ] - }, - "TXQPIBIASEN": { - "direction": "input", - "bits": [ 394 ] - }, - "TXQPISTRONGPDOWN": { - "direction": "input", - "bits": [ 395 ] - }, - "TXQPIWEAKPUP": { - "direction": "input", - "bits": [ 396 ] - }, - "TXRATEMODE": { - "direction": "input", - "bits": [ 397 ] - }, - "TXSTARTSEQ": { - "direction": "input", - "bits": [ 398 ] - }, - "TXSWING": { - "direction": "input", - "bits": [ 399 ] - }, - "TXSYNCALLIN": { - "direction": "input", - "bits": [ 400 ] - }, - "TXSYNCIN": { - "direction": "input", - "bits": [ 401 ] - }, - "TXSYNCMODE": { - "direction": "input", - "bits": [ 402 ] - }, - "TXUSERRDY": { - "direction": "input", - "bits": [ 403 ] - }, - "TXUSRCLK2": { - "direction": "input", - "bits": [ 404 ] - }, - "TXUSRCLK": { - "direction": "input", - "bits": [ 405 ] - }, - "RXADAPTSELTEST": { - "direction": "input", - "bits": [ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419 ] - }, - "DRPDI": { - "direction": "input", - "bits": [ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435 ] - }, - "GTRSVD": { - "direction": "input", - "bits": [ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451 ] - }, - "PCSRSVDIN": { - "direction": "input", - "bits": [ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467 ] - }, - "TSTIN": { - "direction": "input", - "bits": [ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487 ] - }, - "RXELECIDLEMODE": { - "direction": "input", - "bits": [ 488, 489 ] - }, - "RXMONITORSEL": { - "direction": "input", - "bits": [ 490, 491 ] - }, - "RXPD": { - "direction": "input", - "bits": [ 492, 493 ] - }, - "RXSYSCLKSEL": { - "direction": "input", - "bits": [ 494, 495 ] - }, - "TXPD": { - "direction": "input", - "bits": [ 496, 497 ] - }, - "TXSYSCLKSEL": { - "direction": "input", - "bits": [ 498, 499 ] - }, - "CPLLREFCLKSEL": { - "direction": "input", - "bits": [ 500, 501, 502 ] - }, - "LOOPBACK": { - "direction": "input", - "bits": [ 503, 504, 505 ] - }, - "RXCHBONDLEVEL": { - "direction": "input", - "bits": [ 506, 507, 508 ] - }, - "RXOUTCLKSEL": { - "direction": "input", - "bits": [ 509, 510, 511 ] - }, - "RXPRBSSEL": { - "direction": "input", - "bits": [ 512, 513, 514 ] - }, - "RXRATE": { - "direction": "input", - "bits": [ 515, 516, 517 ] - }, - "TXBUFDIFFCTRL": { - "direction": "input", - "bits": [ 518, 519, 520 ] - }, - "TXHEADER": { - "direction": "input", - "bits": [ 521, 522, 523 ] - }, - "TXMARGIN": { - "direction": "input", - "bits": [ 524, 525, 526 ] - }, - "TXOUTCLKSEL": { - "direction": "input", - "bits": [ 527, 528, 529 ] - }, - "TXPRBSSEL": { - "direction": "input", - "bits": [ 530, 531, 532 ] - }, - "TXRATE": { - "direction": "input", - "bits": [ 533, 534, 535 ] - }, - "RXOSINTCFG": { - "direction": "input", - "bits": [ 536, 537, 538, 539 ] - }, - "RXOSINTID0": { - "direction": "input", - "bits": [ 540, 541, 542, 543 ] - }, - "TXDIFFCTRL": { - "direction": "input", - "bits": [ 544, 545, 546, 547 ] - }, - "PCSRSVDIN2": { - "direction": "input", - "bits": [ 548, 549, 550, 551, 552 ] - }, - "PMARSVDIN": { - "direction": "input", - "bits": [ 553, 554, 555, 556, 557 ] - }, - "RXCHBONDI": { - "direction": "input", - "bits": [ 558, 559, 560, 561, 562 ] - }, - "RXDFEAGCTRL": { - "direction": "input", - "bits": [ 563, 564, 565, 566, 567 ] - }, - "RXDFESLIDETAP": { - "direction": "input", - "bits": [ 568, 569, 570, 571, 572 ] - }, - "TXPIPPMSTEPSIZE": { - "direction": "input", - "bits": [ 573, 574, 575, 576, 577 ] - }, - "TXPOSTCURSOR": { - "direction": "input", - "bits": [ 578, 579, 580, 581, 582 ] - }, - "TXPRECURSOR": { - "direction": "input", - "bits": [ 583, 584, 585, 586, 587 ] - }, - "RXDFESLIDETAPID": { - "direction": "input", - "bits": [ 588, 589, 590, 591, 592, 593 ] - }, - "TXDATA": { - "direction": "input", - "bits": [ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657 ] - }, - "TXMAINCURSOR": { - "direction": "input", - "bits": [ 658, 659, 660, 661, 662, 663, 664 ] - }, - "TXSEQUENCE": { - "direction": "input", - "bits": [ 665, 666, 667, 668, 669, 670, 671 ] - }, - "TX8B10BBYPASS": { - "direction": "input", - "bits": [ 672, 673, 674, 675, 676, 677, 678, 679 ] - }, - "TXCHARDISPMODE": { - "direction": "input", - "bits": [ 680, 681, 682, 683, 684, 685, 686, 687 ] - }, - "TXCHARDISPVAL": { - "direction": "input", - "bits": [ 688, 689, 690, 691, 692, 693, 694, 695 ] - }, - "TXCHARISK": { - "direction": "input", - "bits": [ 696, 697, 698, 699, 700, 701, 702, 703 ] - }, - "DRPADDR": { - "direction": "input", - "bits": [ 704, 705, 706, 707, 708, 709, 710, 711, 712 ] - } - }, - "cells": { - }, - "netnames": { - "CFGRESET": { - "hide_name": 0, - "bits": [ 246 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:349" - } - }, - "CLKRSVD0": { - "hide_name": 0, - "bits": [ 247 ], - "attributes": { - "invertible_pin": "IS_CLKRSVD0_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:351" - } - }, - "CLKRSVD1": { - "hide_name": 0, - "bits": [ 248 ], - "attributes": { - "invertible_pin": "IS_CLKRSVD1_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:353" - } - }, - "CPLLFBCLKLOST": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:272" - } - }, - "CPLLLOCK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:273" - } - }, - "CPLLLOCKDETCLK": { - "hide_name": 0, - "bits": [ 249 ], - "attributes": { - "invertible_pin": "IS_CPLLLOCKDETCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:355" - } - }, - "CPLLLOCKEN": { - "hide_name": 0, - "bits": [ 250 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:356" - } - }, - "CPLLPD": { - "hide_name": 0, - "bits": [ 251 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:357" - } - }, - "CPLLREFCLKLOST": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:274" - } - }, - "CPLLREFCLKSEL": { - "hide_name": 0, - "bits": [ 500, 501, 502 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:532" - } - }, - "CPLLRESET": { - "hide_name": 0, - "bits": [ 252 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:358" - } - }, - "DMONFIFORESET": { - "hide_name": 0, - "bits": [ 253 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:359" - } - }, - "DMONITORCLK": { - "hide_name": 0, - "bits": [ 254 ], - "attributes": { - "invertible_pin": "IS_DMONITORCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:361" - } - }, - "DMONITOROUT": { - "hide_name": 0, - "bits": [ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:329" - } - }, - "DRPADDR": { - "hide_name": 0, - "bits": [ 704, 705, 706, 707, 708, 709, 710, 711, 712 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:563" - } - }, - "DRPCLK": { - "hide_name": 0, - "bits": [ 255 ], - "attributes": { - "invertible_pin": "IS_DRPCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:363" - } - }, - "DRPDI": { - "hide_name": 0, - "bits": [ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:522" - } - }, - "DRPDO": { - "hide_name": 0, - "bits": [ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:330" - } - }, - "DRPEN": { - "hide_name": 0, - "bits": [ 256 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:364" - } - }, - "DRPRDY": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:275" - } - }, - "DRPWE": { - "hide_name": 0, - "bits": [ 257 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:365" - } - }, - "EYESCANDATAERROR": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:276" - } - }, - "EYESCANMODE": { - "hide_name": 0, - "bits": [ 258 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:366" - } - }, - "EYESCANRESET": { - "hide_name": 0, - "bits": [ 259 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:367" - } - }, - "EYESCANTRIGGER": { - "hide_name": 0, - "bits": [ 260 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:368" - } - }, - "GTGREFCLK": { - "hide_name": 0, - "bits": [ 261 ], - "attributes": { - "invertible_pin": "IS_GTGREFCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:370" - } - }, - "GTHRXN": { - "hide_name": 0, - "bits": [ 262 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:371" - } - }, - "GTHRXP": { - "hide_name": 0, - "bits": [ 263 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:372" - } - }, - "GTHTXN": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:277" - } - }, - "GTHTXP": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:278" - } - }, - "GTNORTHREFCLK0": { - "hide_name": 0, - "bits": [ 264 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:373" - } - }, - "GTNORTHREFCLK1": { - "hide_name": 0, - "bits": [ 265 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:374" - } - }, - "GTREFCLK0": { - "hide_name": 0, - "bits": [ 266 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:375" - } - }, - "GTREFCLK1": { - "hide_name": 0, - "bits": [ 267 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:376" - } - }, - "GTREFCLKMONITOR": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:279" - } - }, - "GTRESETSEL": { - "hide_name": 0, - "bits": [ 268 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:377" - } - }, - "GTRSVD": { - "hide_name": 0, - "bits": [ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:523" - } - }, - "GTRXRESET": { - "hide_name": 0, - "bits": [ 269 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:378" - } - }, - "GTSOUTHREFCLK0": { - "hide_name": 0, - "bits": [ 270 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:379" - } - }, - "GTSOUTHREFCLK1": { - "hide_name": 0, - "bits": [ 271 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:380" - } - }, - "GTTXRESET": { - "hide_name": 0, - "bits": [ 272 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:381" - } - }, - "LOOPBACK": { - "hide_name": 0, - "bits": [ 503, 504, 505 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:533" - } - }, - "PCSRSVDIN": { - "hide_name": 0, - "bits": [ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:524" - } - }, - "PCSRSVDIN2": { - "hide_name": 0, - "bits": [ 548, 549, 550, 551, 552 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:547" - } - }, - "PCSRSVDOUT": { - "hide_name": 0, - "bits": [ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:331" - } - }, - "PHYSTATUS": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:280" - } - }, - "PMARSVDIN": { - "hide_name": 0, - "bits": [ 553, 554, 555, 556, 557 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:548" - } - }, - "QPLLCLK": { - "hide_name": 0, - "bits": [ 273 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:382" - } - }, - "QPLLREFCLK": { - "hide_name": 0, - "bits": [ 274 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:383" - } - }, - "RESETOVRD": { - "hide_name": 0, - "bits": [ 275 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:384" - } - }, - "RSOSINTDONE": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:281" - } - }, - "RX8B10BEN": { - "hide_name": 0, - "bits": [ 276 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:385" - } - }, - "RXADAPTSELTEST": { - "hide_name": 0, - "bits": [ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:521" - } - }, - "RXBUFRESET": { - "hide_name": 0, - "bits": [ 277 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:386" - } - }, - "RXBUFSTATUS": { - "hide_name": 0, - "bits": [ 116, 117, 118 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:337" - } - }, - "RXBYTEISALIGNED": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:282" - } - }, - "RXBYTEREALIGN": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:283" - } - }, - "RXCDRFREQRESET": { - "hide_name": 0, - "bits": [ 278 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:387" - } - }, - "RXCDRHOLD": { - "hide_name": 0, - "bits": [ 279 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:388" - } - }, - "RXCDRLOCK": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:284" - } - }, - "RXCDROVRDEN": { - "hide_name": 0, - "bits": [ 280 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:389" - } - }, - "RXCDRRESET": { - "hide_name": 0, - "bits": [ 281 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:390" - } - }, - "RXCDRRESETRSV": { - "hide_name": 0, - "bits": [ 282 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:391" - } - }, - "RXCHANBONDSEQ": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:285" - } - }, - "RXCHANISALIGNED": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:286" - } - }, - "RXCHANREALIGN": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:287" - } - }, - "RXCHARISCOMMA": { - "hide_name": 0, - "bits": [ 214, 215, 216, 217, 218, 219, 220, 221 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:345" - } - }, - "RXCHARISK": { - "hide_name": 0, - "bits": [ 222, 223, 224, 225, 226, 227, 228, 229 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:346" - } - }, - "RXCHBONDEN": { - "hide_name": 0, - "bits": [ 283 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:392" - } - }, - "RXCHBONDI": { - "hide_name": 0, - "bits": [ 558, 559, 560, 561, 562 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:549" - } - }, - "RXCHBONDLEVEL": { - "hide_name": 0, - "bits": [ 506, 507, 508 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:534" - } - }, - "RXCHBONDMASTER": { - "hide_name": 0, - "bits": [ 284 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:393" - } - }, - "RXCHBONDO": { - "hide_name": 0, - "bits": [ 122, 123, 124, 125, 126 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:339" - } - }, - "RXCHBONDSLAVE": { - "hide_name": 0, - "bits": [ 285 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:394" - } - }, - "RXCLKCORCNT": { - "hide_name": 0, - "bits": [ 106, 107 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:332" - } - }, - "RXCOMINITDET": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:288" - } - }, - "RXCOMMADET": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:289" - } - }, - "RXCOMMADETEN": { - "hide_name": 0, - "bits": [ 286 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:395" - } - }, - "RXCOMSASDET": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:290" - } - }, - "RXCOMWAKEDET": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:291" - } - }, - "RXDATA": { - "hide_name": 0, - "bits": [ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:343" - } - }, - "RXDATAVALID": { - "hide_name": 0, - "bits": [ 108, 109 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:333" - } - }, - "RXDDIEN": { - "hide_name": 0, - "bits": [ 287 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:396" - } - }, - "RXDFEAGCHOLD": { - "hide_name": 0, - "bits": [ 288 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:397" - } - }, - "RXDFEAGCOVRDEN": { - "hide_name": 0, - "bits": [ 289 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:398" - } - }, - "RXDFEAGCTRL": { - "hide_name": 0, - "bits": [ 563, 564, 565, 566, 567 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:550" - } - }, - "RXDFECM1EN": { - "hide_name": 0, - "bits": [ 290 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:399" - } - }, - "RXDFELFHOLD": { - "hide_name": 0, - "bits": [ 291 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:400" - } - }, - "RXDFELFOVRDEN": { - "hide_name": 0, - "bits": [ 292 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:401" - } - }, - "RXDFELPMRESET": { - "hide_name": 0, - "bits": [ 293 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:402" - } - }, - "RXDFESLIDETAP": { - "hide_name": 0, - "bits": [ 568, 569, 570, 571, 572 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:551" - } - }, - "RXDFESLIDETAPADAPTEN": { - "hide_name": 0, - "bits": [ 294 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:403" - } - }, - "RXDFESLIDETAPHOLD": { - "hide_name": 0, - "bits": [ 295 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:404" - } - }, - "RXDFESLIDETAPID": { - "hide_name": 0, - "bits": [ 588, 589, 590, 591, 592, 593 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:555" - } - }, - "RXDFESLIDETAPINITOVRDEN": { - "hide_name": 0, - "bits": [ 296 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:405" - } - }, - "RXDFESLIDETAPONLYADAPTEN": { - "hide_name": 0, - "bits": [ 297 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:406" - } - }, - "RXDFESLIDETAPOVRDEN": { - "hide_name": 0, - "bits": [ 298 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:407" - } - }, - "RXDFESLIDETAPSTARTED": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:292" - } - }, - "RXDFESLIDETAPSTROBE": { - "hide_name": 0, - "bits": [ 299 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:408" - } - }, - "RXDFESLIDETAPSTROBEDONE": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:293" - } - }, - "RXDFESLIDETAPSTROBESTARTED": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:294" - } - }, - "RXDFESTADAPTDONE": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:295" - } - }, - "RXDFETAP2HOLD": { - "hide_name": 0, - "bits": [ 300 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:409" - } - }, - "RXDFETAP2OVRDEN": { - "hide_name": 0, - "bits": [ 301 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:410" - } - }, - "RXDFETAP3HOLD": { - "hide_name": 0, - "bits": [ 302 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:411" - } - }, - "RXDFETAP3OVRDEN": { - "hide_name": 0, - "bits": [ 303 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:412" - } - }, - "RXDFETAP4HOLD": { - "hide_name": 0, - "bits": [ 304 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:413" - } - }, - "RXDFETAP4OVRDEN": { - "hide_name": 0, - "bits": [ 305 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:414" - } - }, - "RXDFETAP5HOLD": { - "hide_name": 0, - "bits": [ 306 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:415" - } - }, - "RXDFETAP5OVRDEN": { - "hide_name": 0, - "bits": [ 307 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:416" - } - }, - "RXDFETAP6HOLD": { - "hide_name": 0, - "bits": [ 308 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:417" - } - }, - "RXDFETAP6OVRDEN": { - "hide_name": 0, - "bits": [ 309 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:418" - } - }, - "RXDFETAP7HOLD": { - "hide_name": 0, - "bits": [ 310 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:419" - } - }, - "RXDFETAP7OVRDEN": { - "hide_name": 0, - "bits": [ 311 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:420" - } - }, - "RXDFEUTHOLD": { - "hide_name": 0, - "bits": [ 312 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:421" - } - }, - "RXDFEUTOVRDEN": { - "hide_name": 0, - "bits": [ 313 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:422" - } - }, - "RXDFEVPHOLD": { - "hide_name": 0, - "bits": [ 314 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:423" - } - }, - "RXDFEVPOVRDEN": { - "hide_name": 0, - "bits": [ 315 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:424" - } - }, - "RXDFEVSEN": { - "hide_name": 0, - "bits": [ 316 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:425" - } - }, - "RXDFEXYDEN": { - "hide_name": 0, - "bits": [ 317 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:426" - } - }, - "RXDISPERR": { - "hide_name": 0, - "bits": [ 230, 231, 232, 233, 234, 235, 236, 237 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:347" - } - }, - "RXDLYBYPASS": { - "hide_name": 0, - "bits": [ 318 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:427" - } - }, - "RXDLYEN": { - "hide_name": 0, - "bits": [ 319 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:428" - } - }, - "RXDLYOVRDEN": { - "hide_name": 0, - "bits": [ 320 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:429" - } - }, - "RXDLYSRESET": { - "hide_name": 0, - "bits": [ 321 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:430" - } - }, - "RXDLYSRESETDONE": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:296" - } - }, - "RXELECIDLE": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:297" - } - }, - "RXELECIDLEMODE": { - "hide_name": 0, - "bits": [ 488, 489 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:526" - } - }, - "RXGEARBOXSLIP": { - "hide_name": 0, - "bits": [ 322 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:431" - } - }, - "RXHEADER": { - "hide_name": 0, - "bits": [ 137, 138, 139, 140, 141, 142 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:342" - } - }, - "RXHEADERVALID": { - "hide_name": 0, - "bits": [ 110, 111 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:334" - } - }, - "RXLPMEN": { - "hide_name": 0, - "bits": [ 323 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:432" - } - }, - "RXLPMHFHOLD": { - "hide_name": 0, - "bits": [ 324 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:433" - } - }, - "RXLPMHFOVRDEN": { - "hide_name": 0, - "bits": [ 325 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:434" - } - }, - "RXLPMLFHOLD": { - "hide_name": 0, - "bits": [ 326 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:435" - } - }, - "RXLPMLFKLOVRDEN": { - "hide_name": 0, - "bits": [ 327 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:436" - } - }, - "RXMCOMMAALIGNEN": { - "hide_name": 0, - "bits": [ 328 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:437" - } - }, - "RXMONITOROUT": { - "hide_name": 0, - "bits": [ 207, 208, 209, 210, 211, 212, 213 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:344" - } - }, - "RXMONITORSEL": { - "hide_name": 0, - "bits": [ 490, 491 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:527" - } - }, - "RXNOTINTABLE": { - "hide_name": 0, - "bits": [ 238, 239, 240, 241, 242, 243, 244, 245 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:348" - } - }, - "RXOOBRESET": { - "hide_name": 0, - "bits": [ 329 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:438" - } - }, - "RXOSCALRESET": { - "hide_name": 0, - "bits": [ 330 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:439" - } - }, - "RXOSHOLD": { - "hide_name": 0, - "bits": [ 331 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:440" - } - }, - "RXOSINTCFG": { - "hide_name": 0, - "bits": [ 536, 537, 538, 539 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:544" - } - }, - "RXOSINTEN": { - "hide_name": 0, - "bits": [ 332 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:441" - } - }, - "RXOSINTHOLD": { - "hide_name": 0, - "bits": [ 333 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:442" - } - }, - "RXOSINTID0": { - "hide_name": 0, - "bits": [ 540, 541, 542, 543 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:545" - } - }, - "RXOSINTNTRLEN": { - "hide_name": 0, - "bits": [ 334 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:443" - } - }, - "RXOSINTOVRDEN": { - "hide_name": 0, - "bits": [ 335 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:444" - } - }, - "RXOSINTSTARTED": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:298" - } - }, - "RXOSINTSTROBE": { - "hide_name": 0, - "bits": [ 336 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:445" - } - }, - "RXOSINTSTROBEDONE": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:299" - } - }, - "RXOSINTSTROBESTARTED": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:300" - } - }, - "RXOSINTTESTOVRDEN": { - "hide_name": 0, - "bits": [ 337 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:446" - } - }, - "RXOSOVRDEN": { - "hide_name": 0, - "bits": [ 338 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:447" - } - }, - "RXOUTCLK": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:301" - } - }, - "RXOUTCLKFABRIC": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:302" - } - }, - "RXOUTCLKPCS": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:303" - } - }, - "RXOUTCLKSEL": { - "hide_name": 0, - "bits": [ 509, 510, 511 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:535" - } - }, - "RXPCOMMAALIGNEN": { - "hide_name": 0, - "bits": [ 339 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:448" - } - }, - "RXPCSRESET": { - "hide_name": 0, - "bits": [ 340 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:449" - } - }, - "RXPD": { - "hide_name": 0, - "bits": [ 492, 493 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:528" - } - }, - "RXPHALIGN": { - "hide_name": 0, - "bits": [ 341 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:450" - } - }, - "RXPHALIGNDONE": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:304" - } - }, - "RXPHALIGNEN": { - "hide_name": 0, - "bits": [ 342 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:451" - } - }, - "RXPHDLYPD": { - "hide_name": 0, - "bits": [ 343 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:452" - } - }, - "RXPHDLYRESET": { - "hide_name": 0, - "bits": [ 344 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:453" - } - }, - "RXPHMONITOR": { - "hide_name": 0, - "bits": [ 127, 128, 129, 130, 131 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:340" - } - }, - "RXPHOVRDEN": { - "hide_name": 0, - "bits": [ 345 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:454" - } - }, - "RXPHSLIPMONITOR": { - "hide_name": 0, - "bits": [ 132, 133, 134, 135, 136 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:341" - } - }, - "RXPMARESET": { - "hide_name": 0, - "bits": [ 346 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:455" - } - }, - "RXPMARESETDONE": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:305" - } - }, - "RXPOLARITY": { - "hide_name": 0, - "bits": [ 347 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:456" - } - }, - "RXPRBSCNTRESET": { - "hide_name": 0, - "bits": [ 348 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:457" - } - }, - "RXPRBSERR": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:306" - } - }, - "RXPRBSSEL": { - "hide_name": 0, - "bits": [ 512, 513, 514 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:536" - } - }, - "RXQPIEN": { - "hide_name": 0, - "bits": [ 349 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:458" - } - }, - "RXQPISENN": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:307" - } - }, - "RXQPISENP": { - "hide_name": 0, - "bits": [ 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:308" - } - }, - "RXRATE": { - "hide_name": 0, - "bits": [ 515, 516, 517 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:537" - } - }, - "RXRATEDONE": { - "hide_name": 0, - "bits": [ 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:309" - } - }, - "RXRATEMODE": { - "hide_name": 0, - "bits": [ 350 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:459" - } - }, - "RXRESETDONE": { - "hide_name": 0, - "bits": [ 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:310" - } - }, - "RXSLIDE": { - "hide_name": 0, - "bits": [ 351 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:460" - } - }, - "RXSTARTOFSEQ": { - "hide_name": 0, - "bits": [ 112, 113 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:335" - } - }, - "RXSTATUS": { - "hide_name": 0, - "bits": [ 119, 120, 121 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:338" - } - }, - "RXSYNCALLIN": { - "hide_name": 0, - "bits": [ 352 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:461" - } - }, - "RXSYNCDONE": { - "hide_name": 0, - "bits": [ 41 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:311" - } - }, - "RXSYNCIN": { - "hide_name": 0, - "bits": [ 353 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:462" - } - }, - "RXSYNCMODE": { - "hide_name": 0, - "bits": [ 354 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:463" - } - }, - "RXSYNCOUT": { - "hide_name": 0, - "bits": [ 42 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:312" - } - }, - "RXSYSCLKSEL": { - "hide_name": 0, - "bits": [ 494, 495 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:529" - } - }, - "RXUSERRDY": { - "hide_name": 0, - "bits": [ 355 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:464" - } - }, - "RXUSRCLK": { - "hide_name": 0, - "bits": [ 357 ], - "attributes": { - "invertible_pin": "IS_RXUSRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:468" - } - }, - "RXUSRCLK2": { - "hide_name": 0, - "bits": [ 356 ], - "attributes": { - "invertible_pin": "IS_RXUSRCLK2_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:466" - } - }, - "RXVALID": { - "hide_name": 0, - "bits": [ 43 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:313" - } - }, - "SETERRSTATUS": { - "hide_name": 0, - "bits": [ 358 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:469" - } - }, - "SIGVALIDCLK": { - "hide_name": 0, - "bits": [ 359 ], - "attributes": { - "invertible_pin": "IS_SIGVALIDCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:471" - } - }, - "TSTIN": { - "hide_name": 0, - "bits": [ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:525" - } - }, - "TX8B10BBYPASS": { - "hide_name": 0, - "bits": [ 672, 673, 674, 675, 676, 677, 678, 679 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:559" - } - }, - "TX8B10BEN": { - "hide_name": 0, - "bits": [ 360 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:472" - } - }, - "TXBUFDIFFCTRL": { - "hide_name": 0, - "bits": [ 518, 519, 520 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:538" - } - }, - "TXBUFSTATUS": { - "hide_name": 0, - "bits": [ 114, 115 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:336" - } - }, - "TXCHARDISPMODE": { - "hide_name": 0, - "bits": [ 680, 681, 682, 683, 684, 685, 686, 687 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:560" - } - }, - "TXCHARDISPVAL": { - "hide_name": 0, - "bits": [ 688, 689, 690, 691, 692, 693, 694, 695 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:561" - } - }, - "TXCHARISK": { - "hide_name": 0, - "bits": [ 696, 697, 698, 699, 700, 701, 702, 703 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:562" - } - }, - "TXCOMFINISH": { - "hide_name": 0, - "bits": [ 44 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:314" - } - }, - "TXCOMINIT": { - "hide_name": 0, - "bits": [ 361 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:473" - } - }, - "TXCOMSAS": { - "hide_name": 0, - "bits": [ 362 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:474" - } - }, - "TXCOMWAKE": { - "hide_name": 0, - "bits": [ 363 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:475" - } - }, - "TXDATA": { - "hide_name": 0, - "bits": [ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:556" - } - }, - "TXDEEMPH": { - "hide_name": 0, - "bits": [ 364 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:476" - } - }, - "TXDETECTRX": { - "hide_name": 0, - "bits": [ 365 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:477" - } - }, - "TXDIFFCTRL": { - "hide_name": 0, - "bits": [ 544, 545, 546, 547 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:546" - } - }, - "TXDIFFPD": { - "hide_name": 0, - "bits": [ 366 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:478" - } - }, - "TXDLYBYPASS": { - "hide_name": 0, - "bits": [ 367 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:479" - } - }, - "TXDLYEN": { - "hide_name": 0, - "bits": [ 368 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:480" - } - }, - "TXDLYHOLD": { - "hide_name": 0, - "bits": [ 369 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:481" - } - }, - "TXDLYOVRDEN": { - "hide_name": 0, - "bits": [ 370 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:482" - } - }, - "TXDLYSRESET": { - "hide_name": 0, - "bits": [ 371 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:483" - } - }, - "TXDLYSRESETDONE": { - "hide_name": 0, - "bits": [ 45 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:315" - } - }, - "TXDLYUPDOWN": { - "hide_name": 0, - "bits": [ 372 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:484" - } - }, - "TXELECIDLE": { - "hide_name": 0, - "bits": [ 373 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:485" - } - }, - "TXGEARBOXREADY": { - "hide_name": 0, - "bits": [ 46 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:316" - } - }, - "TXHEADER": { - "hide_name": 0, - "bits": [ 521, 522, 523 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:539" - } - }, - "TXINHIBIT": { - "hide_name": 0, - "bits": [ 374 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:486" - } - }, - "TXMAINCURSOR": { - "hide_name": 0, - "bits": [ 658, 659, 660, 661, 662, 663, 664 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:557" - } - }, - "TXMARGIN": { - "hide_name": 0, - "bits": [ 524, 525, 526 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:540" - } - }, - "TXOUTCLK": { - "hide_name": 0, - "bits": [ 47 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:317" - } - }, - "TXOUTCLKFABRIC": { - "hide_name": 0, - "bits": [ 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:318" - } - }, - "TXOUTCLKPCS": { - "hide_name": 0, - "bits": [ 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:319" - } - }, - "TXOUTCLKSEL": { - "hide_name": 0, - "bits": [ 527, 528, 529 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:541" - } - }, - "TXPCSRESET": { - "hide_name": 0, - "bits": [ 375 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:487" - } - }, - "TXPD": { - "hide_name": 0, - "bits": [ 496, 497 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:530" - } - }, - "TXPDELECIDLEMODE": { - "hide_name": 0, - "bits": [ 376 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:488" - } - }, - "TXPHALIGN": { - "hide_name": 0, - "bits": [ 377 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:489" - } - }, - "TXPHALIGNDONE": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:320" - } - }, - "TXPHALIGNEN": { - "hide_name": 0, - "bits": [ 378 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:490" - } - }, - "TXPHDLYPD": { - "hide_name": 0, - "bits": [ 379 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:491" - } - }, - "TXPHDLYRESET": { - "hide_name": 0, - "bits": [ 380 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:492" - } - }, - "TXPHDLYTSTCLK": { - "hide_name": 0, - "bits": [ 381 ], - "attributes": { - "invertible_pin": "IS_TXPHDLYTSTCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:494" - } - }, - "TXPHINIT": { - "hide_name": 0, - "bits": [ 382 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:495" - } - }, - "TXPHINITDONE": { - "hide_name": 0, - "bits": [ 51 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:321" - } - }, - "TXPHOVRDEN": { - "hide_name": 0, - "bits": [ 383 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:496" - } - }, - "TXPIPPMEN": { - "hide_name": 0, - "bits": [ 384 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:497" - } - }, - "TXPIPPMOVRDEN": { - "hide_name": 0, - "bits": [ 385 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:498" - } - }, - "TXPIPPMPD": { - "hide_name": 0, - "bits": [ 386 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:499" - } - }, - "TXPIPPMSEL": { - "hide_name": 0, - "bits": [ 387 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:500" - } - }, - "TXPIPPMSTEPSIZE": { - "hide_name": 0, - "bits": [ 573, 574, 575, 576, 577 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:552" - } - }, - "TXPISOPD": { - "hide_name": 0, - "bits": [ 388 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:501" - } - }, - "TXPMARESET": { - "hide_name": 0, - "bits": [ 389 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:502" - } - }, - "TXPMARESETDONE": { - "hide_name": 0, - "bits": [ 52 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:322" - } - }, - "TXPOLARITY": { - "hide_name": 0, - "bits": [ 390 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:503" - } - }, - "TXPOSTCURSOR": { - "hide_name": 0, - "bits": [ 578, 579, 580, 581, 582 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:553" - } - }, - "TXPOSTCURSORINV": { - "hide_name": 0, - "bits": [ 391 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:504" - } - }, - "TXPRBSFORCEERR": { - "hide_name": 0, - "bits": [ 392 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:505" - } - }, - "TXPRBSSEL": { - "hide_name": 0, - "bits": [ 530, 531, 532 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:542" - } - }, - "TXPRECURSOR": { - "hide_name": 0, - "bits": [ 583, 584, 585, 586, 587 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:554" - } - }, - "TXPRECURSORINV": { - "hide_name": 0, - "bits": [ 393 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:506" - } - }, - "TXQPIBIASEN": { - "hide_name": 0, - "bits": [ 394 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:507" - } - }, - "TXQPISENN": { - "hide_name": 0, - "bits": [ 53 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:323" - } - }, - "TXQPISENP": { - "hide_name": 0, - "bits": [ 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:324" - } - }, - "TXQPISTRONGPDOWN": { - "hide_name": 0, - "bits": [ 395 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:508" - } - }, - "TXQPIWEAKPUP": { - "hide_name": 0, - "bits": [ 396 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:509" - } - }, - "TXRATE": { - "hide_name": 0, - "bits": [ 533, 534, 535 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:543" - } - }, - "TXRATEDONE": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:325" - } - }, - "TXRATEMODE": { - "hide_name": 0, - "bits": [ 397 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:510" - } - }, - "TXRESETDONE": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:326" - } - }, - "TXSEQUENCE": { - "hide_name": 0, - "bits": [ 665, 666, 667, 668, 669, 670, 671 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:558" - } - }, - "TXSTARTSEQ": { - "hide_name": 0, - "bits": [ 398 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:511" - } - }, - "TXSWING": { - "hide_name": 0, - "bits": [ 399 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:512" - } - }, - "TXSYNCALLIN": { - "hide_name": 0, - "bits": [ 400 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:513" - } - }, - "TXSYNCDONE": { - "hide_name": 0, - "bits": [ 57 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:327" - } - }, - "TXSYNCIN": { - "hide_name": 0, - "bits": [ 401 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:514" - } - }, - "TXSYNCMODE": { - "hide_name": 0, - "bits": [ 402 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:515" - } - }, - "TXSYNCOUT": { - "hide_name": 0, - "bits": [ 58 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:328" - } - }, - "TXSYSCLKSEL": { - "hide_name": 0, - "bits": [ 498, 499 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:531" - } - }, - "TXUSERRDY": { - "hide_name": 0, - "bits": [ 403 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:516" - } - }, - "TXUSRCLK": { - "hide_name": 0, - "bits": [ 405 ], - "attributes": { - "invertible_pin": "IS_TXUSRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:520" - } - }, - "TXUSRCLK2": { - "hide_name": 0, - "bits": [ 404 ], - "attributes": { - "invertible_pin": "IS_TXUSRCLK2_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:518" - } - } - } - }, - "GTHE2_COMMON": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:566" - }, - "ports": { - "DRPRDY": { - "direction": "output", - "bits": [ 2 ] - }, - "QPLLFBCLKLOST": { - "direction": "output", - "bits": [ 3 ] - }, - "QPLLLOCK": { - "direction": "output", - "bits": [ 4 ] - }, - "QPLLOUTCLK": { - "direction": "output", - "bits": [ 5 ] - }, - "QPLLOUTREFCLK": { - "direction": "output", - "bits": [ 6 ] - }, - "QPLLREFCLKLOST": { - "direction": "output", - "bits": [ 7 ] - }, - "REFCLKOUTMONITOR": { - "direction": "output", - "bits": [ 8 ] - }, - "DRPDO": { - "direction": "output", - "bits": [ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ] - }, - "PMARSVDOUT": { - "direction": "output", - "bits": [ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 ] - }, - "QPLLDMONITOR": { - "direction": "output", - "bits": [ 41, 42, 43, 44, 45, 46, 47, 48 ] - }, - "BGBYPASSB": { - "direction": "input", - "bits": [ 49 ] - }, - "BGMONITORENB": { - "direction": "input", - "bits": [ 50 ] - }, - "BGPDB": { - "direction": "input", - "bits": [ 51 ] - }, - "BGRCALOVRDENB": { - "direction": "input", - "bits": [ 52 ] - }, - "DRPCLK": { - "direction": "input", - "bits": [ 53 ] - }, - "DRPEN": { - "direction": "input", - "bits": [ 54 ] - }, - "DRPWE": { - "direction": "input", - "bits": [ 55 ] - }, - "GTGREFCLK": { - "direction": "input", - "bits": [ 56 ] - }, - "GTNORTHREFCLK0": { - "direction": "input", - "bits": [ 57 ] - }, - "GTNORTHREFCLK1": { - "direction": "input", - "bits": [ 58 ] - }, - "GTREFCLK0": { - "direction": "input", - "bits": [ 59 ] - }, - "GTREFCLK1": { - "direction": "input", - "bits": [ 60 ] - }, - "GTSOUTHREFCLK0": { - "direction": "input", - "bits": [ 61 ] - }, - "GTSOUTHREFCLK1": { - "direction": "input", - "bits": [ 62 ] - }, - "QPLLLOCKDETCLK": { - "direction": "input", - "bits": [ 63 ] - }, - "QPLLLOCKEN": { - "direction": "input", - "bits": [ 64 ] - }, - "QPLLOUTRESET": { - "direction": "input", - "bits": [ 65 ] - }, - "QPLLPD": { - "direction": "input", - "bits": [ 66 ] - }, - "QPLLRESET": { - "direction": "input", - "bits": [ 67 ] - }, - "RCALENB": { - "direction": "input", - "bits": [ 68 ] - }, - "DRPDI": { - "direction": "input", - "bits": [ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84 ] - }, - "QPLLRSVD1": { - "direction": "input", - "bits": [ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100 ] - }, - "QPLLREFCLKSEL": { - "direction": "input", - "bits": [ 101, 102, 103 ] - }, - "BGRCALOVRD": { - "direction": "input", - "bits": [ 104, 105, 106, 107, 108 ] - }, - "QPLLRSVD2": { - "direction": "input", - "bits": [ 109, 110, 111, 112, 113 ] - }, - "DRPADDR": { - "direction": "input", - "bits": [ 114, 115, 116, 117, 118, 119, 120, 121 ] - }, - "PMARSVD": { - "direction": "input", - "bits": [ 122, 123, 124, 125, 126, 127, 128, 129 ] - } - }, - "cells": { - }, - "netnames": { - "BGBYPASSB": { - "hide_name": 0, - "bits": [ 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:604" - } - }, - "BGMONITORENB": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:605" - } - }, - "BGPDB": { - "hide_name": 0, - "bits": [ 51 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:606" - } - }, - "BGRCALOVRD": { - "hide_name": 0, - "bits": [ 104, 105, 106, 107, 108 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:630" - } - }, - "BGRCALOVRDENB": { - "hide_name": 0, - "bits": [ 52 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:607" - } - }, - "DRPADDR": { - "hide_name": 0, - "bits": [ 114, 115, 116, 117, 118, 119, 120, 121 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:632" - } - }, - "DRPCLK": { - "hide_name": 0, - "bits": [ 53 ], - "attributes": { - "invertible_pin": "IS_DRPCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:609" - } - }, - "DRPDI": { - "hide_name": 0, - "bits": [ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:627" - } - }, - "DRPDO": { - "hide_name": 0, - "bits": [ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:601" - } - }, - "DRPEN": { - "hide_name": 0, - "bits": [ 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:610" - } - }, - "DRPRDY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:594" - } - }, - "DRPWE": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:611" - } - }, - "GTGREFCLK": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "invertible_pin": "IS_GTGREFCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:613" - } - }, - "GTNORTHREFCLK0": { - "hide_name": 0, - "bits": [ 57 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:614" - } - }, - "GTNORTHREFCLK1": { - "hide_name": 0, - "bits": [ 58 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:615" - } - }, - "GTREFCLK0": { - "hide_name": 0, - "bits": [ 59 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:616" - } - }, - "GTREFCLK1": { - "hide_name": 0, - "bits": [ 60 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:617" - } - }, - "GTSOUTHREFCLK0": { - "hide_name": 0, - "bits": [ 61 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:618" - } - }, - "GTSOUTHREFCLK1": { - "hide_name": 0, - "bits": [ 62 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:619" - } - }, - "PMARSVD": { - "hide_name": 0, - "bits": [ 122, 123, 124, 125, 126, 127, 128, 129 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:633" - } - }, - "PMARSVDOUT": { - "hide_name": 0, - "bits": [ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:602" - } - }, - "QPLLDMONITOR": { - "hide_name": 0, - "bits": [ 41, 42, 43, 44, 45, 46, 47, 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:603" - } - }, - "QPLLFBCLKLOST": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:595" - } - }, - "QPLLLOCK": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:596" - } - }, - "QPLLLOCKDETCLK": { - "hide_name": 0, - "bits": [ 63 ], - "attributes": { - "invertible_pin": "IS_QPLLLOCKDETCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:621" - } - }, - "QPLLLOCKEN": { - "hide_name": 0, - "bits": [ 64 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:622" - } - }, - "QPLLOUTCLK": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:597" - } - }, - "QPLLOUTREFCLK": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:598" - } - }, - "QPLLOUTRESET": { - "hide_name": 0, - "bits": [ 65 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:623" - } - }, - "QPLLPD": { - "hide_name": 0, - "bits": [ 66 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:624" - } - }, - "QPLLREFCLKLOST": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:599" - } - }, - "QPLLREFCLKSEL": { - "hide_name": 0, - "bits": [ 101, 102, 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:629" - } - }, - "QPLLRESET": { - "hide_name": 0, - "bits": [ 67 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:625" - } - }, - "QPLLRSVD1": { - "hide_name": 0, - "bits": [ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:628" - } - }, - "QPLLRSVD2": { - "hide_name": 0, - "bits": [ 109, 110, 111, 112, 113 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:631" - } - }, - "RCALENB": { - "hide_name": 0, - "bits": [ 68 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:626" - } - }, - "REFCLKOUTMONITOR": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:600" - } - } - } - }, - "GTPE2_CHANNEL": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:636" - }, - "ports": { - "DRPRDY": { - "direction": "output", - "bits": [ 2 ] - }, - "EYESCANDATAERROR": { - "direction": "output", - "bits": [ 3 ] - }, - "GTPTXN": { - "direction": "output", - "bits": [ 4 ] - }, - "GTPTXP": { - "direction": "output", - "bits": [ 5 ] - }, - "PHYSTATUS": { - "direction": "output", - "bits": [ 6 ] - }, - "PMARSVDOUT0": { - "direction": "output", - "bits": [ 7 ] - }, - "PMARSVDOUT1": { - "direction": "output", - "bits": [ 8 ] - }, - "RXBYTEISALIGNED": { - "direction": "output", - "bits": [ 9 ] - }, - "RXBYTEREALIGN": { - "direction": "output", - "bits": [ 10 ] - }, - "RXCDRLOCK": { - "direction": "output", - "bits": [ 11 ] - }, - "RXCHANBONDSEQ": { - "direction": "output", - "bits": [ 12 ] - }, - "RXCHANISALIGNED": { - "direction": "output", - "bits": [ 13 ] - }, - "RXCHANREALIGN": { - "direction": "output", - "bits": [ 14 ] - }, - "RXCOMINITDET": { - "direction": "output", - "bits": [ 15 ] - }, - "RXCOMMADET": { - "direction": "output", - "bits": [ 16 ] - }, - "RXCOMSASDET": { - "direction": "output", - "bits": [ 17 ] - }, - "RXCOMWAKEDET": { - "direction": "output", - "bits": [ 18 ] - }, - "RXDLYSRESETDONE": { - "direction": "output", - "bits": [ 19 ] - }, - "RXELECIDLE": { - "direction": "output", - "bits": [ 20 ] - }, - "RXHEADERVALID": { - "direction": "output", - "bits": [ 21 ] - }, - "RXOSINTDONE": { - "direction": "output", - "bits": [ 22 ] - }, - "RXOSINTSTARTED": { - "direction": "output", - "bits": [ 23 ] - }, - "RXOSINTSTROBEDONE": { - "direction": "output", - "bits": [ 24 ] - }, - "RXOSINTSTROBESTARTED": { - "direction": "output", - "bits": [ 25 ] - }, - "RXOUTCLK": { - "direction": "output", - "bits": [ 26 ] - }, - "RXOUTCLKFABRIC": { - "direction": "output", - "bits": [ 27 ] - }, - "RXOUTCLKPCS": { - "direction": "output", - "bits": [ 28 ] - }, - "RXPHALIGNDONE": { - "direction": "output", - "bits": [ 29 ] - }, - "RXPMARESETDONE": { - "direction": "output", - "bits": [ 30 ] - }, - "RXPRBSERR": { - "direction": "output", - "bits": [ 31 ] - }, - "RXRATEDONE": { - "direction": "output", - "bits": [ 32 ] - }, - "RXRESETDONE": { - "direction": "output", - "bits": [ 33 ] - }, - "RXSYNCDONE": { - "direction": "output", - "bits": [ 34 ] - }, - "RXSYNCOUT": { - "direction": "output", - "bits": [ 35 ] - }, - "RXVALID": { - "direction": "output", - "bits": [ 36 ] - }, - "TXCOMFINISH": { - "direction": "output", - "bits": [ 37 ] - }, - "TXDLYSRESETDONE": { - "direction": "output", - "bits": [ 38 ] - }, - "TXGEARBOXREADY": { - "direction": "output", - "bits": [ 39 ] - }, - "TXOUTCLK": { - "direction": "output", - "bits": [ 40 ] - }, - "TXOUTCLKFABRIC": { - "direction": "output", - "bits": [ 41 ] - }, - "TXOUTCLKPCS": { - "direction": "output", - "bits": [ 42 ] - }, - "TXPHALIGNDONE": { - "direction": "output", - "bits": [ 43 ] - }, - "TXPHINITDONE": { - "direction": "output", - "bits": [ 44 ] - }, - "TXPMARESETDONE": { - "direction": "output", - "bits": [ 45 ] - }, - "TXRATEDONE": { - "direction": "output", - "bits": [ 46 ] - }, - "TXRESETDONE": { - "direction": "output", - "bits": [ 47 ] - }, - "TXSYNCDONE": { - "direction": "output", - "bits": [ 48 ] - }, - "TXSYNCOUT": { - "direction": "output", - "bits": [ 49 ] - }, - "DMONITOROUT": { - "direction": "output", - "bits": [ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ] - }, - "DRPDO": { - "direction": "output", - "bits": [ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 ] - }, - "PCSRSVDOUT": { - "direction": "output", - "bits": [ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 ] - }, - "RXCLKCORCNT": { - "direction": "output", - "bits": [ 97, 98 ] - }, - "RXDATAVALID": { - "direction": "output", - "bits": [ 99, 100 ] - }, - "RXSTARTOFSEQ": { - "direction": "output", - "bits": [ 101, 102 ] - }, - "TXBUFSTATUS": { - "direction": "output", - "bits": [ 103, 104 ] - }, - "RXBUFSTATUS": { - "direction": "output", - "bits": [ 105, 106, 107 ] - }, - "RXHEADER": { - "direction": "output", - "bits": [ 108, 109, 110 ] - }, - "RXSTATUS": { - "direction": "output", - "bits": [ 111, 112, 113 ] - }, - "RXDATA": { - "direction": "output", - "bits": [ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145 ] - }, - "RXCHARISCOMMA": { - "direction": "output", - "bits": [ 146, 147, 148, 149 ] - }, - "RXCHARISK": { - "direction": "output", - "bits": [ 150, 151, 152, 153 ] - }, - "RXCHBONDO": { - "direction": "output", - "bits": [ 154, 155, 156, 157 ] - }, - "RXDISPERR": { - "direction": "output", - "bits": [ 158, 159, 160, 161 ] - }, - "RXNOTINTABLE": { - "direction": "output", - "bits": [ 162, 163, 164, 165 ] - }, - "RXPHMONITOR": { - "direction": "output", - "bits": [ 166, 167, 168, 169, 170 ] - }, - "RXPHSLIPMONITOR": { - "direction": "output", - "bits": [ 171, 172, 173, 174, 175 ] - }, - "CFGRESET": { - "direction": "input", - "bits": [ 176 ] - }, - "CLKRSVD0": { - "direction": "input", - "bits": [ 177 ] - }, - "CLKRSVD1": { - "direction": "input", - "bits": [ 178 ] - }, - "DMONFIFORESET": { - "direction": "input", - "bits": [ 179 ] - }, - "DMONITORCLK": { - "direction": "input", - "bits": [ 180 ] - }, - "DRPCLK": { - "direction": "input", - "bits": [ 181 ] - }, - "DRPEN": { - "direction": "input", - "bits": [ 182 ] - }, - "DRPWE": { - "direction": "input", - "bits": [ 183 ] - }, - "EYESCANMODE": { - "direction": "input", - "bits": [ 184 ] - }, - "EYESCANRESET": { - "direction": "input", - "bits": [ 185 ] - }, - "EYESCANTRIGGER": { - "direction": "input", - "bits": [ 186 ] - }, - "GTPRXN": { - "direction": "input", - "bits": [ 187 ] - }, - "GTPRXP": { - "direction": "input", - "bits": [ 188 ] - }, - "GTRESETSEL": { - "direction": "input", - "bits": [ 189 ] - }, - "GTRXRESET": { - "direction": "input", - "bits": [ 190 ] - }, - "GTTXRESET": { - "direction": "input", - "bits": [ 191 ] - }, - "PLL0CLK": { - "direction": "input", - "bits": [ 192 ] - }, - "PLL0REFCLK": { - "direction": "input", - "bits": [ 193 ] - }, - "PLL1CLK": { - "direction": "input", - "bits": [ 194 ] - }, - "PLL1REFCLK": { - "direction": "input", - "bits": [ 195 ] - }, - "PMARSVDIN0": { - "direction": "input", - "bits": [ 196 ] - }, - "PMARSVDIN1": { - "direction": "input", - "bits": [ 197 ] - }, - "PMARSVDIN2": { - "direction": "input", - "bits": [ 198 ] - }, - "PMARSVDIN3": { - "direction": "input", - "bits": [ 199 ] - }, - "PMARSVDIN4": { - "direction": "input", - "bits": [ 200 ] - }, - "RESETOVRD": { - "direction": "input", - "bits": [ 201 ] - }, - "RX8B10BEN": { - "direction": "input", - "bits": [ 202 ] - }, - "RXBUFRESET": { - "direction": "input", - "bits": [ 203 ] - }, - "RXCDRFREQRESET": { - "direction": "input", - "bits": [ 204 ] - }, - "RXCDRHOLD": { - "direction": "input", - "bits": [ 205 ] - }, - "RXCDROVRDEN": { - "direction": "input", - "bits": [ 206 ] - }, - "RXCDRRESET": { - "direction": "input", - "bits": [ 207 ] - }, - "RXCDRRESETRSV": { - "direction": "input", - "bits": [ 208 ] - }, - "RXCHBONDEN": { - "direction": "input", - "bits": [ 209 ] - }, - "RXCHBONDMASTER": { - "direction": "input", - "bits": [ 210 ] - }, - "RXCHBONDSLAVE": { - "direction": "input", - "bits": [ 211 ] - }, - "RXCOMMADETEN": { - "direction": "input", - "bits": [ 212 ] - }, - "RXDDIEN": { - "direction": "input", - "bits": [ 213 ] - }, - "RXDFEXYDEN": { - "direction": "input", - "bits": [ 214 ] - }, - "RXDLYBYPASS": { - "direction": "input", - "bits": [ 215 ] - }, - "RXDLYEN": { - "direction": "input", - "bits": [ 216 ] - }, - "RXDLYOVRDEN": { - "direction": "input", - "bits": [ 217 ] - }, - "RXDLYSRESET": { - "direction": "input", - "bits": [ 218 ] - }, - "RXGEARBOXSLIP": { - "direction": "input", - "bits": [ 219 ] - }, - "RXLPMHFHOLD": { - "direction": "input", - "bits": [ 220 ] - }, - "RXLPMHFOVRDEN": { - "direction": "input", - "bits": [ 221 ] - }, - "RXLPMLFHOLD": { - "direction": "input", - "bits": [ 222 ] - }, - "RXLPMLFOVRDEN": { - "direction": "input", - "bits": [ 223 ] - }, - "RXLPMOSINTNTRLEN": { - "direction": "input", - "bits": [ 224 ] - }, - "RXLPMRESET": { - "direction": "input", - "bits": [ 225 ] - }, - "RXMCOMMAALIGNEN": { - "direction": "input", - "bits": [ 226 ] - }, - "RXOOBRESET": { - "direction": "input", - "bits": [ 227 ] - }, - "RXOSCALRESET": { - "direction": "input", - "bits": [ 228 ] - }, - "RXOSHOLD": { - "direction": "input", - "bits": [ 229 ] - }, - "RXOSINTEN": { - "direction": "input", - "bits": [ 230 ] - }, - "RXOSINTHOLD": { - "direction": "input", - "bits": [ 231 ] - }, - "RXOSINTNTRLEN": { - "direction": "input", - "bits": [ 232 ] - }, - "RXOSINTOVRDEN": { - "direction": "input", - "bits": [ 233 ] - }, - "RXOSINTPD": { - "direction": "input", - "bits": [ 234 ] - }, - "RXOSINTSTROBE": { - "direction": "input", - "bits": [ 235 ] - }, - "RXOSINTTESTOVRDEN": { - "direction": "input", - "bits": [ 236 ] - }, - "RXOSOVRDEN": { - "direction": "input", - "bits": [ 237 ] - }, - "RXPCOMMAALIGNEN": { - "direction": "input", - "bits": [ 238 ] - }, - "RXPCSRESET": { - "direction": "input", - "bits": [ 239 ] - }, - "RXPHALIGN": { - "direction": "input", - "bits": [ 240 ] - }, - "RXPHALIGNEN": { - "direction": "input", - "bits": [ 241 ] - }, - "RXPHDLYPD": { - "direction": "input", - "bits": [ 242 ] - }, - "RXPHDLYRESET": { - "direction": "input", - "bits": [ 243 ] - }, - "RXPHOVRDEN": { - "direction": "input", - "bits": [ 244 ] - }, - "RXPMARESET": { - "direction": "input", - "bits": [ 245 ] - }, - "RXPOLARITY": { - "direction": "input", - "bits": [ 246 ] - }, - "RXPRBSCNTRESET": { - "direction": "input", - "bits": [ 247 ] - }, - "RXRATEMODE": { - "direction": "input", - "bits": [ 248 ] - }, - "RXSLIDE": { - "direction": "input", - "bits": [ 249 ] - }, - "RXSYNCALLIN": { - "direction": "input", - "bits": [ 250 ] - }, - "RXSYNCIN": { - "direction": "input", - "bits": [ 251 ] - }, - "RXSYNCMODE": { - "direction": "input", - "bits": [ 252 ] - }, - "RXUSERRDY": { - "direction": "input", - "bits": [ 253 ] - }, - "RXUSRCLK2": { - "direction": "input", - "bits": [ 254 ] - }, - "RXUSRCLK": { - "direction": "input", - "bits": [ 255 ] - }, - "SETERRSTATUS": { - "direction": "input", - "bits": [ 256 ] - }, - "SIGVALIDCLK": { - "direction": "input", - "bits": [ 257 ] - }, - "TX8B10BEN": { - "direction": "input", - "bits": [ 258 ] - }, - "TXCOMINIT": { - "direction": "input", - "bits": [ 259 ] - }, - "TXCOMSAS": { - "direction": "input", - "bits": [ 260 ] - }, - "TXCOMWAKE": { - "direction": "input", - "bits": [ 261 ] - }, - "TXDEEMPH": { - "direction": "input", - "bits": [ 262 ] - }, - "TXDETECTRX": { - "direction": "input", - "bits": [ 263 ] - }, - "TXDIFFPD": { - "direction": "input", - "bits": [ 264 ] - }, - "TXDLYBYPASS": { - "direction": "input", - "bits": [ 265 ] - }, - "TXDLYEN": { - "direction": "input", - "bits": [ 266 ] - }, - "TXDLYHOLD": { - "direction": "input", - "bits": [ 267 ] - }, - "TXDLYOVRDEN": { - "direction": "input", - "bits": [ 268 ] - }, - "TXDLYSRESET": { - "direction": "input", - "bits": [ 269 ] - }, - "TXDLYUPDOWN": { - "direction": "input", - "bits": [ 270 ] - }, - "TXELECIDLE": { - "direction": "input", - "bits": [ 271 ] - }, - "TXINHIBIT": { - "direction": "input", - "bits": [ 272 ] - }, - "TXPCSRESET": { - "direction": "input", - "bits": [ 273 ] - }, - "TXPDELECIDLEMODE": { - "direction": "input", - "bits": [ 274 ] - }, - "TXPHALIGN": { - "direction": "input", - "bits": [ 275 ] - }, - "TXPHALIGNEN": { - "direction": "input", - "bits": [ 276 ] - }, - "TXPHDLYPD": { - "direction": "input", - "bits": [ 277 ] - }, - "TXPHDLYRESET": { - "direction": "input", - "bits": [ 278 ] - }, - "TXPHDLYTSTCLK": { - "direction": "input", - "bits": [ 279 ] - }, - "TXPHINIT": { - "direction": "input", - "bits": [ 280 ] - }, - "TXPHOVRDEN": { - "direction": "input", - "bits": [ 281 ] - }, - "TXPIPPMEN": { - "direction": "input", - "bits": [ 282 ] - }, - "TXPIPPMOVRDEN": { - "direction": "input", - "bits": [ 283 ] - }, - "TXPIPPMPD": { - "direction": "input", - "bits": [ 284 ] - }, - "TXPIPPMSEL": { - "direction": "input", - "bits": [ 285 ] - }, - "TXPISOPD": { - "direction": "input", - "bits": [ 286 ] - }, - "TXPMARESET": { - "direction": "input", - "bits": [ 287 ] - }, - "TXPOLARITY": { - "direction": "input", - "bits": [ 288 ] - }, - "TXPOSTCURSORINV": { - "direction": "input", - "bits": [ 289 ] - }, - "TXPRBSFORCEERR": { - "direction": "input", - "bits": [ 290 ] - }, - "TXPRECURSORINV": { - "direction": "input", - "bits": [ 291 ] - }, - "TXRATEMODE": { - "direction": "input", - "bits": [ 292 ] - }, - "TXSTARTSEQ": { - "direction": "input", - "bits": [ 293 ] - }, - "TXSWING": { - "direction": "input", - "bits": [ 294 ] - }, - "TXSYNCALLIN": { - "direction": "input", - "bits": [ 295 ] - }, - "TXSYNCIN": { - "direction": "input", - "bits": [ 296 ] - }, - "TXSYNCMODE": { - "direction": "input", - "bits": [ 297 ] - }, - "TXUSERRDY": { - "direction": "input", - "bits": [ 298 ] - }, - "TXUSRCLK2": { - "direction": "input", - "bits": [ 299 ] - }, - "TXUSRCLK": { - "direction": "input", - "bits": [ 300 ] - }, - "RXADAPTSELTEST": { - "direction": "input", - "bits": [ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314 ] - }, - "DRPDI": { - "direction": "input", - "bits": [ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330 ] - }, - "GTRSVD": { - "direction": "input", - "bits": [ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346 ] - }, - "PCSRSVDIN": { - "direction": "input", - "bits": [ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362 ] - }, - "TSTIN": { - "direction": "input", - "bits": [ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382 ] - }, - "RXELECIDLEMODE": { - "direction": "input", - "bits": [ 383, 384 ] - }, - "RXPD": { - "direction": "input", - "bits": [ 385, 386 ] - }, - "RXSYSCLKSEL": { - "direction": "input", - "bits": [ 387, 388 ] - }, - "TXPD": { - "direction": "input", - "bits": [ 389, 390 ] - }, - "TXSYSCLKSEL": { - "direction": "input", - "bits": [ 391, 392 ] - }, - "LOOPBACK": { - "direction": "input", - "bits": [ 393, 394, 395 ] - }, - "RXCHBONDLEVEL": { - "direction": "input", - "bits": [ 396, 397, 398 ] - }, - "RXOUTCLKSEL": { - "direction": "input", - "bits": [ 399, 400, 401 ] - }, - "RXPRBSSEL": { - "direction": "input", - "bits": [ 402, 403, 404 ] - }, - "RXRATE": { - "direction": "input", - "bits": [ 405, 406, 407 ] - }, - "TXBUFDIFFCTRL": { - "direction": "input", - "bits": [ 408, 409, 410 ] - }, - "TXHEADER": { - "direction": "input", - "bits": [ 411, 412, 413 ] - }, - "TXMARGIN": { - "direction": "input", - "bits": [ 414, 415, 416 ] - }, - "TXOUTCLKSEL": { - "direction": "input", - "bits": [ 417, 418, 419 ] - }, - "TXPRBSSEL": { - "direction": "input", - "bits": [ 420, 421, 422 ] - }, - "TXRATE": { - "direction": "input", - "bits": [ 423, 424, 425 ] - }, - "TXDATA": { - "direction": "input", - "bits": [ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457 ] - }, - "RXCHBONDI": { - "direction": "input", - "bits": [ 458, 459, 460, 461 ] - }, - "RXOSINTCFG": { - "direction": "input", - "bits": [ 462, 463, 464, 465 ] - }, - "RXOSINTID0": { - "direction": "input", - "bits": [ 466, 467, 468, 469 ] - }, - "TX8B10BBYPASS": { - "direction": "input", - "bits": [ 470, 471, 472, 473 ] - }, - "TXCHARDISPMODE": { - "direction": "input", - "bits": [ 474, 475, 476, 477 ] - }, - "TXCHARDISPVAL": { - "direction": "input", - "bits": [ 478, 479, 480, 481 ] - }, - "TXCHARISK": { - "direction": "input", - "bits": [ 482, 483, 484, 485 ] - }, - "TXDIFFCTRL": { - "direction": "input", - "bits": [ 486, 487, 488, 489 ] - }, - "TXPIPPMSTEPSIZE": { - "direction": "input", - "bits": [ 490, 491, 492, 493, 494 ] - }, - "TXPOSTCURSOR": { - "direction": "input", - "bits": [ 495, 496, 497, 498, 499 ] - }, - "TXPRECURSOR": { - "direction": "input", - "bits": [ 500, 501, 502, 503, 504 ] - }, - "TXMAINCURSOR": { - "direction": "input", - "bits": [ 505, 506, 507, 508, 509, 510, 511 ] - }, - "TXSEQUENCE": { - "direction": "input", - "bits": [ 512, 513, 514, 515, 516, 517, 518 ] - }, - "DRPADDR": { - "direction": "input", - "bits": [ 519, 520, 521, 522, 523, 524, 525, 526, 527 ] - } - }, - "cells": { - }, - "netnames": { - "CFGRESET": { - "hide_name": 0, - "bits": [ 176 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:945" - } - }, - "CLKRSVD0": { - "hide_name": 0, - "bits": [ 177 ], - "attributes": { - "invertible_pin": "IS_CLKRSVD0_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:947" - } - }, - "CLKRSVD1": { - "hide_name": 0, - "bits": [ 178 ], - "attributes": { - "invertible_pin": "IS_CLKRSVD1_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:949" - } - }, - "DMONFIFORESET": { - "hide_name": 0, - "bits": [ 179 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:950" - } - }, - "DMONITORCLK": { - "hide_name": 0, - "bits": [ 180 ], - "attributes": { - "invertible_pin": "IS_DMONITORCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:952" - } - }, - "DMONITOROUT": { - "hide_name": 0, - "bits": [ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:927" - } - }, - "DRPADDR": { - "hide_name": 0, - "bits": [ 519, 520, 521, 522, 523, 524, 525, 526, 527 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1115" - } - }, - "DRPCLK": { - "hide_name": 0, - "bits": [ 181 ], - "attributes": { - "invertible_pin": "IS_DRPCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:954" - } - }, - "DRPDI": { - "hide_name": 0, - "bits": [ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1081" - } - }, - "DRPDO": { - "hide_name": 0, - "bits": [ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:928" - } - }, - "DRPEN": { - "hide_name": 0, - "bits": [ 182 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:955" - } - }, - "DRPRDY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:879" - } - }, - "DRPWE": { - "hide_name": 0, - "bits": [ 183 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:956" - } - }, - "EYESCANDATAERROR": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:880" - } - }, - "EYESCANMODE": { - "hide_name": 0, - "bits": [ 184 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:957" - } - }, - "EYESCANRESET": { - "hide_name": 0, - "bits": [ 185 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:958" - } - }, - "EYESCANTRIGGER": { - "hide_name": 0, - "bits": [ 186 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:959" - } - }, - "GTPRXN": { - "hide_name": 0, - "bits": [ 187 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:960" - } - }, - "GTPRXP": { - "hide_name": 0, - "bits": [ 188 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:961" - } - }, - "GTPTXN": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:881" - } - }, - "GTPTXP": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:882" - } - }, - "GTRESETSEL": { - "hide_name": 0, - "bits": [ 189 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:962" - } - }, - "GTRSVD": { - "hide_name": 0, - "bits": [ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1082" - } - }, - "GTRXRESET": { - "hide_name": 0, - "bits": [ 190 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:963" - } - }, - "GTTXRESET": { - "hide_name": 0, - "bits": [ 191 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:964" - } - }, - "LOOPBACK": { - "hide_name": 0, - "bits": [ 393, 394, 395 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1090" - } - }, - "PCSRSVDIN": { - "hide_name": 0, - "bits": [ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1083" - } - }, - "PCSRSVDOUT": { - "hide_name": 0, - "bits": [ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:929" - } - }, - "PHYSTATUS": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:883" - } - }, - "PLL0CLK": { - "hide_name": 0, - "bits": [ 192 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:965" - } - }, - "PLL0REFCLK": { - "hide_name": 0, - "bits": [ 193 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:966" - } - }, - "PLL1CLK": { - "hide_name": 0, - "bits": [ 194 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:967" - } - }, - "PLL1REFCLK": { - "hide_name": 0, - "bits": [ 195 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:968" - } - }, - "PMARSVDIN0": { - "hide_name": 0, - "bits": [ 196 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:969" - } - }, - "PMARSVDIN1": { - "hide_name": 0, - "bits": [ 197 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:970" - } - }, - "PMARSVDIN2": { - "hide_name": 0, - "bits": [ 198 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:971" - } - }, - "PMARSVDIN3": { - "hide_name": 0, - "bits": [ 199 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:972" - } - }, - "PMARSVDIN4": { - "hide_name": 0, - "bits": [ 200 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:973" - } - }, - "PMARSVDOUT0": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:884" - } - }, - "PMARSVDOUT1": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:885" - } - }, - "RESETOVRD": { - "hide_name": 0, - "bits": [ 201 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:974" - } - }, - "RX8B10BEN": { - "hide_name": 0, - "bits": [ 202 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:975" - } - }, - "RXADAPTSELTEST": { - "hide_name": 0, - "bits": [ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1080" - } - }, - "RXBUFRESET": { - "hide_name": 0, - "bits": [ 203 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:976" - } - }, - "RXBUFSTATUS": { - "hide_name": 0, - "bits": [ 105, 106, 107 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:934" - } - }, - "RXBYTEISALIGNED": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:886" - } - }, - "RXBYTEREALIGN": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:887" - } - }, - "RXCDRFREQRESET": { - "hide_name": 0, - "bits": [ 204 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:977" - } - }, - "RXCDRHOLD": { - "hide_name": 0, - "bits": [ 205 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:978" - } - }, - "RXCDRLOCK": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:888" - } - }, - "RXCDROVRDEN": { - "hide_name": 0, - "bits": [ 206 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:979" - } - }, - "RXCDRRESET": { - "hide_name": 0, - "bits": [ 207 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:980" - } - }, - "RXCDRRESETRSV": { - "hide_name": 0, - "bits": [ 208 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:981" - } - }, - "RXCHANBONDSEQ": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:889" - } - }, - "RXCHANISALIGNED": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:890" - } - }, - "RXCHANREALIGN": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:891" - } - }, - "RXCHARISCOMMA": { - "hide_name": 0, - "bits": [ 146, 147, 148, 149 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:938" - } - }, - "RXCHARISK": { - "hide_name": 0, - "bits": [ 150, 151, 152, 153 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:939" - } - }, - "RXCHBONDEN": { - "hide_name": 0, - "bits": [ 209 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:982" - } - }, - "RXCHBONDI": { - "hide_name": 0, - "bits": [ 458, 459, 460, 461 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1102" - } - }, - "RXCHBONDLEVEL": { - "hide_name": 0, - "bits": [ 396, 397, 398 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1091" - } - }, - "RXCHBONDMASTER": { - "hide_name": 0, - "bits": [ 210 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:983" - } - }, - "RXCHBONDO": { - "hide_name": 0, - "bits": [ 154, 155, 156, 157 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:940" - } - }, - "RXCHBONDSLAVE": { - "hide_name": 0, - "bits": [ 211 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:984" - } - }, - "RXCLKCORCNT": { - "hide_name": 0, - "bits": [ 97, 98 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:930" - } - }, - "RXCOMINITDET": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:892" - } - }, - "RXCOMMADET": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:893" - } - }, - "RXCOMMADETEN": { - "hide_name": 0, - "bits": [ 212 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:985" - } - }, - "RXCOMSASDET": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:894" - } - }, - "RXCOMWAKEDET": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:895" - } - }, - "RXDATA": { - "hide_name": 0, - "bits": [ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:937" - } - }, - "RXDATAVALID": { - "hide_name": 0, - "bits": [ 99, 100 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:931" - } - }, - "RXDDIEN": { - "hide_name": 0, - "bits": [ 213 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:986" - } - }, - "RXDFEXYDEN": { - "hide_name": 0, - "bits": [ 214 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:987" - } - }, - "RXDISPERR": { - "hide_name": 0, - "bits": [ 158, 159, 160, 161 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:941" - } - }, - "RXDLYBYPASS": { - "hide_name": 0, - "bits": [ 215 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:988" - } - }, - "RXDLYEN": { - "hide_name": 0, - "bits": [ 216 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:989" - } - }, - "RXDLYOVRDEN": { - "hide_name": 0, - "bits": [ 217 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:990" - } - }, - "RXDLYSRESET": { - "hide_name": 0, - "bits": [ 218 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:991" - } - }, - "RXDLYSRESETDONE": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:896" - } - }, - "RXELECIDLE": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:897" - } - }, - "RXELECIDLEMODE": { - "hide_name": 0, - "bits": [ 383, 384 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1085" - } - }, - "RXGEARBOXSLIP": { - "hide_name": 0, - "bits": [ 219 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:992" - } - }, - "RXHEADER": { - "hide_name": 0, - "bits": [ 108, 109, 110 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:935" - } - }, - "RXHEADERVALID": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:898" - } - }, - "RXLPMHFHOLD": { - "hide_name": 0, - "bits": [ 220 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:993" - } - }, - "RXLPMHFOVRDEN": { - "hide_name": 0, - "bits": [ 221 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:994" - } - }, - "RXLPMLFHOLD": { - "hide_name": 0, - "bits": [ 222 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:995" - } - }, - "RXLPMLFOVRDEN": { - "hide_name": 0, - "bits": [ 223 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:996" - } - }, - "RXLPMOSINTNTRLEN": { - "hide_name": 0, - "bits": [ 224 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:997" - } - }, - "RXLPMRESET": { - "hide_name": 0, - "bits": [ 225 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:998" - } - }, - "RXMCOMMAALIGNEN": { - "hide_name": 0, - "bits": [ 226 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:999" - } - }, - "RXNOTINTABLE": { - "hide_name": 0, - "bits": [ 162, 163, 164, 165 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:942" - } - }, - "RXOOBRESET": { - "hide_name": 0, - "bits": [ 227 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1000" - } - }, - "RXOSCALRESET": { - "hide_name": 0, - "bits": [ 228 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1001" - } - }, - "RXOSHOLD": { - "hide_name": 0, - "bits": [ 229 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1002" - } - }, - "RXOSINTCFG": { - "hide_name": 0, - "bits": [ 462, 463, 464, 465 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1103" - } - }, - "RXOSINTDONE": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:899" - } - }, - "RXOSINTEN": { - "hide_name": 0, - "bits": [ 230 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1003" - } - }, - "RXOSINTHOLD": { - "hide_name": 0, - "bits": [ 231 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1004" - } - }, - "RXOSINTID0": { - "hide_name": 0, - "bits": [ 466, 467, 468, 469 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1104" - } - }, - "RXOSINTNTRLEN": { - "hide_name": 0, - "bits": [ 232 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1005" - } - }, - "RXOSINTOVRDEN": { - "hide_name": 0, - "bits": [ 233 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1006" - } - }, - "RXOSINTPD": { - "hide_name": 0, - "bits": [ 234 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1007" - } - }, - "RXOSINTSTARTED": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:900" - } - }, - "RXOSINTSTROBE": { - "hide_name": 0, - "bits": [ 235 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1008" - } - }, - "RXOSINTSTROBEDONE": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:901" - } - }, - "RXOSINTSTROBESTARTED": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:902" - } - }, - "RXOSINTTESTOVRDEN": { - "hide_name": 0, - "bits": [ 236 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1009" - } - }, - "RXOSOVRDEN": { - "hide_name": 0, - "bits": [ 237 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1010" - } - }, - "RXOUTCLK": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:903" - } - }, - "RXOUTCLKFABRIC": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:904" - } - }, - "RXOUTCLKPCS": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:905" - } - }, - "RXOUTCLKSEL": { - "hide_name": 0, - "bits": [ 399, 400, 401 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1092" - } - }, - "RXPCOMMAALIGNEN": { - "hide_name": 0, - "bits": [ 238 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1011" - } - }, - "RXPCSRESET": { - "hide_name": 0, - "bits": [ 239 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1012" - } - }, - "RXPD": { - "hide_name": 0, - "bits": [ 385, 386 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1086" - } - }, - "RXPHALIGN": { - "hide_name": 0, - "bits": [ 240 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1013" - } - }, - "RXPHALIGNDONE": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:906" - } - }, - "RXPHALIGNEN": { - "hide_name": 0, - "bits": [ 241 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1014" - } - }, - "RXPHDLYPD": { - "hide_name": 0, - "bits": [ 242 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1015" - } - }, - "RXPHDLYRESET": { - "hide_name": 0, - "bits": [ 243 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1016" - } - }, - "RXPHMONITOR": { - "hide_name": 0, - "bits": [ 166, 167, 168, 169, 170 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:943" - } - }, - "RXPHOVRDEN": { - "hide_name": 0, - "bits": [ 244 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1017" - } - }, - "RXPHSLIPMONITOR": { - "hide_name": 0, - "bits": [ 171, 172, 173, 174, 175 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:944" - } - }, - "RXPMARESET": { - "hide_name": 0, - "bits": [ 245 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1018" - } - }, - "RXPMARESETDONE": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:907" - } - }, - "RXPOLARITY": { - "hide_name": 0, - "bits": [ 246 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1019" - } - }, - "RXPRBSCNTRESET": { - "hide_name": 0, - "bits": [ 247 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1020" - } - }, - "RXPRBSERR": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:908" - } - }, - "RXPRBSSEL": { - "hide_name": 0, - "bits": [ 402, 403, 404 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1093" - } - }, - "RXRATE": { - "hide_name": 0, - "bits": [ 405, 406, 407 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1094" - } - }, - "RXRATEDONE": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:909" - } - }, - "RXRATEMODE": { - "hide_name": 0, - "bits": [ 248 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1021" - } - }, - "RXRESETDONE": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:910" - } - }, - "RXSLIDE": { - "hide_name": 0, - "bits": [ 249 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1022" - } - }, - "RXSTARTOFSEQ": { - "hide_name": 0, - "bits": [ 101, 102 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:932" - } - }, - "RXSTATUS": { - "hide_name": 0, - "bits": [ 111, 112, 113 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:936" - } - }, - "RXSYNCALLIN": { - "hide_name": 0, - "bits": [ 250 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1023" - } - }, - "RXSYNCDONE": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:911" - } - }, - "RXSYNCIN": { - "hide_name": 0, - "bits": [ 251 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1024" - } - }, - "RXSYNCMODE": { - "hide_name": 0, - "bits": [ 252 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1025" - } - }, - "RXSYNCOUT": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:912" - } - }, - "RXSYSCLKSEL": { - "hide_name": 0, - "bits": [ 387, 388 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1087" - } - }, - "RXUSERRDY": { - "hide_name": 0, - "bits": [ 253 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1026" - } - }, - "RXUSRCLK": { - "hide_name": 0, - "bits": [ 255 ], - "attributes": { - "invertible_pin": "IS_RXUSRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1030" - } - }, - "RXUSRCLK2": { - "hide_name": 0, - "bits": [ 254 ], - "attributes": { - "invertible_pin": "IS_RXUSRCLK2_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1028" - } - }, - "RXVALID": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:913" - } - }, - "SETERRSTATUS": { - "hide_name": 0, - "bits": [ 256 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1031" - } - }, - "SIGVALIDCLK": { - "hide_name": 0, - "bits": [ 257 ], - "attributes": { - "invertible_pin": "IS_SIGVALIDCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1033" - } - }, - "TSTIN": { - "hide_name": 0, - "bits": [ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1084" - } - }, - "TX8B10BBYPASS": { - "hide_name": 0, - "bits": [ 470, 471, 472, 473 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1105" - } - }, - "TX8B10BEN": { - "hide_name": 0, - "bits": [ 258 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1034" - } - }, - "TXBUFDIFFCTRL": { - "hide_name": 0, - "bits": [ 408, 409, 410 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1095" - } - }, - "TXBUFSTATUS": { - "hide_name": 0, - "bits": [ 103, 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:933" - } - }, - "TXCHARDISPMODE": { - "hide_name": 0, - "bits": [ 474, 475, 476, 477 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1106" - } - }, - "TXCHARDISPVAL": { - "hide_name": 0, - "bits": [ 478, 479, 480, 481 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1107" - } - }, - "TXCHARISK": { - "hide_name": 0, - "bits": [ 482, 483, 484, 485 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1108" - } - }, - "TXCOMFINISH": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:914" - } - }, - "TXCOMINIT": { - "hide_name": 0, - "bits": [ 259 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1035" - } - }, - "TXCOMSAS": { - "hide_name": 0, - "bits": [ 260 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1036" - } - }, - "TXCOMWAKE": { - "hide_name": 0, - "bits": [ 261 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1037" - } - }, - "TXDATA": { - "hide_name": 0, - "bits": [ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1101" - } - }, - "TXDEEMPH": { - "hide_name": 0, - "bits": [ 262 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1038" - } - }, - "TXDETECTRX": { - "hide_name": 0, - "bits": [ 263 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1039" - } - }, - "TXDIFFCTRL": { - "hide_name": 0, - "bits": [ 486, 487, 488, 489 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1109" - } - }, - "TXDIFFPD": { - "hide_name": 0, - "bits": [ 264 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1040" - } - }, - "TXDLYBYPASS": { - "hide_name": 0, - "bits": [ 265 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1041" - } - }, - "TXDLYEN": { - "hide_name": 0, - "bits": [ 266 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1042" - } - }, - "TXDLYHOLD": { - "hide_name": 0, - "bits": [ 267 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1043" - } - }, - "TXDLYOVRDEN": { - "hide_name": 0, - "bits": [ 268 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1044" - } - }, - "TXDLYSRESET": { - "hide_name": 0, - "bits": [ 269 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1045" - } - }, - "TXDLYSRESETDONE": { - "hide_name": 0, - "bits": [ 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:915" - } - }, - "TXDLYUPDOWN": { - "hide_name": 0, - "bits": [ 270 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1046" - } - }, - "TXELECIDLE": { - "hide_name": 0, - "bits": [ 271 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1047" - } - }, - "TXGEARBOXREADY": { - "hide_name": 0, - "bits": [ 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:916" - } - }, - "TXHEADER": { - "hide_name": 0, - "bits": [ 411, 412, 413 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1096" - } - }, - "TXINHIBIT": { - "hide_name": 0, - "bits": [ 272 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1048" - } - }, - "TXMAINCURSOR": { - "hide_name": 0, - "bits": [ 505, 506, 507, 508, 509, 510, 511 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1113" - } - }, - "TXMARGIN": { - "hide_name": 0, - "bits": [ 414, 415, 416 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1097" - } - }, - "TXOUTCLK": { - "hide_name": 0, - "bits": [ 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:917" - } - }, - "TXOUTCLKFABRIC": { - "hide_name": 0, - "bits": [ 41 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:918" - } - }, - "TXOUTCLKPCS": { - "hide_name": 0, - "bits": [ 42 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:919" - } - }, - "TXOUTCLKSEL": { - "hide_name": 0, - "bits": [ 417, 418, 419 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1098" - } - }, - "TXPCSRESET": { - "hide_name": 0, - "bits": [ 273 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1049" - } - }, - "TXPD": { - "hide_name": 0, - "bits": [ 389, 390 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1088" - } - }, - "TXPDELECIDLEMODE": { - "hide_name": 0, - "bits": [ 274 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1050" - } - }, - "TXPHALIGN": { - "hide_name": 0, - "bits": [ 275 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1051" - } - }, - "TXPHALIGNDONE": { - "hide_name": 0, - "bits": [ 43 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:920" - } - }, - "TXPHALIGNEN": { - "hide_name": 0, - "bits": [ 276 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1052" - } - }, - "TXPHDLYPD": { - "hide_name": 0, - "bits": [ 277 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1053" - } - }, - "TXPHDLYRESET": { - "hide_name": 0, - "bits": [ 278 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1054" - } - }, - "TXPHDLYTSTCLK": { - "hide_name": 0, - "bits": [ 279 ], - "attributes": { - "invertible_pin": "IS_TXPHDLYTSTCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1056" - } - }, - "TXPHINIT": { - "hide_name": 0, - "bits": [ 280 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1057" - } - }, - "TXPHINITDONE": { - "hide_name": 0, - "bits": [ 44 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:921" - } - }, - "TXPHOVRDEN": { - "hide_name": 0, - "bits": [ 281 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1058" - } - }, - "TXPIPPMEN": { - "hide_name": 0, - "bits": [ 282 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1059" - } - }, - "TXPIPPMOVRDEN": { - "hide_name": 0, - "bits": [ 283 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1060" - } - }, - "TXPIPPMPD": { - "hide_name": 0, - "bits": [ 284 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1061" - } - }, - "TXPIPPMSEL": { - "hide_name": 0, - "bits": [ 285 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1062" - } - }, - "TXPIPPMSTEPSIZE": { - "hide_name": 0, - "bits": [ 490, 491, 492, 493, 494 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1110" - } - }, - "TXPISOPD": { - "hide_name": 0, - "bits": [ 286 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1063" - } - }, - "TXPMARESET": { - "hide_name": 0, - "bits": [ 287 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1064" - } - }, - "TXPMARESETDONE": { - "hide_name": 0, - "bits": [ 45 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:922" - } - }, - "TXPOLARITY": { - "hide_name": 0, - "bits": [ 288 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1065" - } - }, - "TXPOSTCURSOR": { - "hide_name": 0, - "bits": [ 495, 496, 497, 498, 499 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1111" - } - }, - "TXPOSTCURSORINV": { - "hide_name": 0, - "bits": [ 289 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1066" - } - }, - "TXPRBSFORCEERR": { - "hide_name": 0, - "bits": [ 290 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1067" - } - }, - "TXPRBSSEL": { - "hide_name": 0, - "bits": [ 420, 421, 422 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1099" - } - }, - "TXPRECURSOR": { - "hide_name": 0, - "bits": [ 500, 501, 502, 503, 504 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1112" - } - }, - "TXPRECURSORINV": { - "hide_name": 0, - "bits": [ 291 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1068" - } - }, - "TXRATE": { - "hide_name": 0, - "bits": [ 423, 424, 425 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1100" - } - }, - "TXRATEDONE": { - "hide_name": 0, - "bits": [ 46 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:923" - } - }, - "TXRATEMODE": { - "hide_name": 0, - "bits": [ 292 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1069" - } - }, - "TXRESETDONE": { - "hide_name": 0, - "bits": [ 47 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:924" - } - }, - "TXSEQUENCE": { - "hide_name": 0, - "bits": [ 512, 513, 514, 515, 516, 517, 518 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1114" - } - }, - "TXSTARTSEQ": { - "hide_name": 0, - "bits": [ 293 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1070" - } - }, - "TXSWING": { - "hide_name": 0, - "bits": [ 294 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1071" - } - }, - "TXSYNCALLIN": { - "hide_name": 0, - "bits": [ 295 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1072" - } - }, - "TXSYNCDONE": { - "hide_name": 0, - "bits": [ 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:925" - } - }, - "TXSYNCIN": { - "hide_name": 0, - "bits": [ 296 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1073" - } - }, - "TXSYNCMODE": { - "hide_name": 0, - "bits": [ 297 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1074" - } - }, - "TXSYNCOUT": { - "hide_name": 0, - "bits": [ 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:926" - } - }, - "TXSYSCLKSEL": { - "hide_name": 0, - "bits": [ 391, 392 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1089" - } - }, - "TXUSERRDY": { - "hide_name": 0, - "bits": [ 298 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1075" - } - }, - "TXUSRCLK": { - "hide_name": 0, - "bits": [ 300 ], - "attributes": { - "invertible_pin": "IS_TXUSRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1079" - } - }, - "TXUSRCLK2": { - "hide_name": 0, - "bits": [ 299 ], - "attributes": { - "invertible_pin": "IS_TXUSRCLK2_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1077" - } - } - } - }, - "GTPE2_COMMON": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1118" - }, - "ports": { - "DRPRDY": { - "direction": "output", - "bits": [ 2 ] - }, - "PLL0FBCLKLOST": { - "direction": "output", - "bits": [ 3 ] - }, - "PLL0LOCK": { - "direction": "output", - "bits": [ 4 ] - }, - "PLL0OUTCLK": { - "direction": "output", - "bits": [ 5 ] - }, - "PLL0OUTREFCLK": { - "direction": "output", - "bits": [ 6 ] - }, - "PLL0REFCLKLOST": { - "direction": "output", - "bits": [ 7 ] - }, - "PLL1FBCLKLOST": { - "direction": "output", - "bits": [ 8 ] - }, - "PLL1LOCK": { - "direction": "output", - "bits": [ 9 ] - }, - "PLL1OUTCLK": { - "direction": "output", - "bits": [ 10 ] - }, - "PLL1OUTREFCLK": { - "direction": "output", - "bits": [ 11 ] - }, - "PLL1REFCLKLOST": { - "direction": "output", - "bits": [ 12 ] - }, - "REFCLKOUTMONITOR0": { - "direction": "output", - "bits": [ 13 ] - }, - "REFCLKOUTMONITOR1": { - "direction": "output", - "bits": [ 14 ] - }, - "DRPDO": { - "direction": "output", - "bits": [ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ] - }, - "PMARSVDOUT": { - "direction": "output", - "bits": [ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46 ] - }, - "DMONITOROUT": { - "direction": "output", - "bits": [ 47, 48, 49, 50, 51, 52, 53, 54 ] - }, - "BGBYPASSB": { - "direction": "input", - "bits": [ 55 ] - }, - "BGMONITORENB": { - "direction": "input", - "bits": [ 56 ] - }, - "BGPDB": { - "direction": "input", - "bits": [ 57 ] - }, - "BGRCALOVRDENB": { - "direction": "input", - "bits": [ 58 ] - }, - "DRPCLK": { - "direction": "input", - "bits": [ 59 ] - }, - "DRPEN": { - "direction": "input", - "bits": [ 60 ] - }, - "DRPWE": { - "direction": "input", - "bits": [ 61 ] - }, - "GTEASTREFCLK0": { - "direction": "input", - "bits": [ 62 ] - }, - "GTEASTREFCLK1": { - "direction": "input", - "bits": [ 63 ] - }, - "GTGREFCLK0": { - "direction": "input", - "bits": [ 64 ] - }, - "GTGREFCLK1": { - "direction": "input", - "bits": [ 65 ] - }, - "GTREFCLK0": { - "direction": "input", - "bits": [ 66 ] - }, - "GTREFCLK1": { - "direction": "input", - "bits": [ 67 ] - }, - "GTWESTREFCLK0": { - "direction": "input", - "bits": [ 68 ] - }, - "GTWESTREFCLK1": { - "direction": "input", - "bits": [ 69 ] - }, - "PLL0LOCKDETCLK": { - "direction": "input", - "bits": [ 70 ] - }, - "PLL0LOCKEN": { - "direction": "input", - "bits": [ 71 ] - }, - "PLL0PD": { - "direction": "input", - "bits": [ 72 ] - }, - "PLL0RESET": { - "direction": "input", - "bits": [ 73 ] - }, - "PLL1LOCKDETCLK": { - "direction": "input", - "bits": [ 74 ] - }, - "PLL1LOCKEN": { - "direction": "input", - "bits": [ 75 ] - }, - "PLL1PD": { - "direction": "input", - "bits": [ 76 ] - }, - "PLL1RESET": { - "direction": "input", - "bits": [ 77 ] - }, - "RCALENB": { - "direction": "input", - "bits": [ 78 ] - }, - "DRPDI": { - "direction": "input", - "bits": [ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 ] - }, - "PLLRSVD1": { - "direction": "input", - "bits": [ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110 ] - }, - "PLL0REFCLKSEL": { - "direction": "input", - "bits": [ 111, 112, 113 ] - }, - "PLL1REFCLKSEL": { - "direction": "input", - "bits": [ 114, 115, 116 ] - }, - "BGRCALOVRD": { - "direction": "input", - "bits": [ 117, 118, 119, 120, 121 ] - }, - "PLLRSVD2": { - "direction": "input", - "bits": [ 122, 123, 124, 125, 126 ] - }, - "DRPADDR": { - "direction": "input", - "bits": [ 127, 128, 129, 130, 131, 132, 133, 134 ] - }, - "PMARSVD": { - "direction": "input", - "bits": [ 135, 136, 137, 138, 139, 140, 141, 142 ] - } - }, - "cells": { - }, - "netnames": { - "BGBYPASSB": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1163" - } - }, - "BGMONITORENB": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1164" - } - }, - "BGPDB": { - "hide_name": 0, - "bits": [ 57 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1165" - } - }, - "BGRCALOVRD": { - "hide_name": 0, - "bits": [ 117, 118, 119, 120, 121 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1196" - } - }, - "BGRCALOVRDENB": { - "hide_name": 0, - "bits": [ 58 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1166" - } - }, - "DMONITOROUT": { - "hide_name": 0, - "bits": [ 47, 48, 49, 50, 51, 52, 53, 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1162" - } - }, - "DRPADDR": { - "hide_name": 0, - "bits": [ 127, 128, 129, 130, 131, 132, 133, 134 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1198" - } - }, - "DRPCLK": { - "hide_name": 0, - "bits": [ 59 ], - "attributes": { - "invertible_pin": "IS_DRPCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1168" - } - }, - "DRPDI": { - "hide_name": 0, - "bits": [ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1192" - } - }, - "DRPDO": { - "hide_name": 0, - "bits": [ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1160" - } - }, - "DRPEN": { - "hide_name": 0, - "bits": [ 60 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1169" - } - }, - "DRPRDY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1147" - } - }, - "DRPWE": { - "hide_name": 0, - "bits": [ 61 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1170" - } - }, - "GTEASTREFCLK0": { - "hide_name": 0, - "bits": [ 62 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1171" - } - }, - "GTEASTREFCLK1": { - "hide_name": 0, - "bits": [ 63 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1172" - } - }, - "GTGREFCLK0": { - "hide_name": 0, - "bits": [ 64 ], - "attributes": { - "invertible_pin": "IS_GTGREFCLK0_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1174" - } - }, - "GTGREFCLK1": { - "hide_name": 0, - "bits": [ 65 ], - "attributes": { - "invertible_pin": "IS_GTGREFCLK1_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1176" - } - }, - "GTREFCLK0": { - "hide_name": 0, - "bits": [ 66 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1177" - } - }, - "GTREFCLK1": { - "hide_name": 0, - "bits": [ 67 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1178" - } - }, - "GTWESTREFCLK0": { - "hide_name": 0, - "bits": [ 68 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1179" - } - }, - "GTWESTREFCLK1": { - "hide_name": 0, - "bits": [ 69 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1180" - } - }, - "PLL0FBCLKLOST": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1148" - } - }, - "PLL0LOCK": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1149" - } - }, - "PLL0LOCKDETCLK": { - "hide_name": 0, - "bits": [ 70 ], - "attributes": { - "invertible_pin": "IS_PLL0LOCKDETCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1182" - } - }, - "PLL0LOCKEN": { - "hide_name": 0, - "bits": [ 71 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1183" - } - }, - "PLL0OUTCLK": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1150" - } - }, - "PLL0OUTREFCLK": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1151" - } - }, - "PLL0PD": { - "hide_name": 0, - "bits": [ 72 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1184" - } - }, - "PLL0REFCLKLOST": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1152" - } - }, - "PLL0REFCLKSEL": { - "hide_name": 0, - "bits": [ 111, 112, 113 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1194" - } - }, - "PLL0RESET": { - "hide_name": 0, - "bits": [ 73 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1185" - } - }, - "PLL1FBCLKLOST": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1153" - } - }, - "PLL1LOCK": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1154" - } - }, - "PLL1LOCKDETCLK": { - "hide_name": 0, - "bits": [ 74 ], - "attributes": { - "invertible_pin": "IS_PLL1LOCKDETCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1187" - } - }, - "PLL1LOCKEN": { - "hide_name": 0, - "bits": [ 75 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1188" - } - }, - "PLL1OUTCLK": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1155" - } - }, - "PLL1OUTREFCLK": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1156" - } - }, - "PLL1PD": { - "hide_name": 0, - "bits": [ 76 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1189" - } - }, - "PLL1REFCLKLOST": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1157" - } - }, - "PLL1REFCLKSEL": { - "hide_name": 0, - "bits": [ 114, 115, 116 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1195" - } - }, - "PLL1RESET": { - "hide_name": 0, - "bits": [ 77 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1190" - } - }, - "PLLRSVD1": { - "hide_name": 0, - "bits": [ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1193" - } - }, - "PLLRSVD2": { - "hide_name": 0, - "bits": [ 122, 123, 124, 125, 126 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1197" - } - }, - "PMARSVD": { - "hide_name": 0, - "bits": [ 135, 136, 137, 138, 139, 140, 141, 142 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1199" - } - }, - "PMARSVDOUT": { - "hide_name": 0, - "bits": [ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1161" - } - }, - "RCALENB": { - "hide_name": 0, - "bits": [ 78 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1191" - } - }, - "REFCLKOUTMONITOR0": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1158" - } - }, - "REFCLKOUTMONITOR1": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1159" - } - } - } - }, - "GTXE2_CHANNEL": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1202" - }, - "ports": { - "CPLLFBCLKLOST": { - "direction": "output", - "bits": [ 2 ] - }, - "CPLLLOCK": { - "direction": "output", - "bits": [ 3 ] - }, - "CPLLREFCLKLOST": { - "direction": "output", - "bits": [ 4 ] - }, - "DRPRDY": { - "direction": "output", - "bits": [ 5 ] - }, - "EYESCANDATAERROR": { - "direction": "output", - "bits": [ 6 ] - }, - "GTREFCLKMONITOR": { - "direction": "output", - "bits": [ 7 ] - }, - "GTXTXN": { - "direction": "output", - "bits": [ 8 ] - }, - "GTXTXP": { - "direction": "output", - "bits": [ 9 ] - }, - "PHYSTATUS": { - "direction": "output", - "bits": [ 10 ] - }, - "RXBYTEISALIGNED": { - "direction": "output", - "bits": [ 11 ] - }, - "RXBYTEREALIGN": { - "direction": "output", - "bits": [ 12 ] - }, - "RXCDRLOCK": { - "direction": "output", - "bits": [ 13 ] - }, - "RXCHANBONDSEQ": { - "direction": "output", - "bits": [ 14 ] - }, - "RXCHANISALIGNED": { - "direction": "output", - "bits": [ 15 ] - }, - "RXCHANREALIGN": { - "direction": "output", - "bits": [ 16 ] - }, - "RXCOMINITDET": { - "direction": "output", - "bits": [ 17 ] - }, - "RXCOMMADET": { - "direction": "output", - "bits": [ 18 ] - }, - "RXCOMSASDET": { - "direction": "output", - "bits": [ 19 ] - }, - "RXCOMWAKEDET": { - "direction": "output", - "bits": [ 20 ] - }, - "RXDATAVALID": { - "direction": "output", - "bits": [ 21 ] - }, - "RXDLYSRESETDONE": { - "direction": "output", - "bits": [ 22 ] - }, - "RXELECIDLE": { - "direction": "output", - "bits": [ 23 ] - }, - "RXHEADERVALID": { - "direction": "output", - "bits": [ 24 ] - }, - "RXOUTCLK": { - "direction": "output", - "bits": [ 25 ] - }, - "RXOUTCLKFABRIC": { - "direction": "output", - "bits": [ 26 ] - }, - "RXOUTCLKPCS": { - "direction": "output", - "bits": [ 27 ] - }, - "RXPHALIGNDONE": { - "direction": "output", - "bits": [ 28 ] - }, - "RXPRBSERR": { - "direction": "output", - "bits": [ 29 ] - }, - "RXQPISENN": { - "direction": "output", - "bits": [ 30 ] - }, - "RXQPISENP": { - "direction": "output", - "bits": [ 31 ] - }, - "RXRATEDONE": { - "direction": "output", - "bits": [ 32 ] - }, - "RXRESETDONE": { - "direction": "output", - "bits": [ 33 ] - }, - "RXSTARTOFSEQ": { - "direction": "output", - "bits": [ 34 ] - }, - "RXVALID": { - "direction": "output", - "bits": [ 35 ] - }, - "TXCOMFINISH": { - "direction": "output", - "bits": [ 36 ] - }, - "TXDLYSRESETDONE": { - "direction": "output", - "bits": [ 37 ] - }, - "TXGEARBOXREADY": { - "direction": "output", - "bits": [ 38 ] - }, - "TXOUTCLK": { - "direction": "output", - "bits": [ 39 ] - }, - "TXOUTCLKFABRIC": { - "direction": "output", - "bits": [ 40 ] - }, - "TXOUTCLKPCS": { - "direction": "output", - "bits": [ 41 ] - }, - "TXPHALIGNDONE": { - "direction": "output", - "bits": [ 42 ] - }, - "TXPHINITDONE": { - "direction": "output", - "bits": [ 43 ] - }, - "TXQPISENN": { - "direction": "output", - "bits": [ 44 ] - }, - "TXQPISENP": { - "direction": "output", - "bits": [ 45 ] - }, - "TXRATEDONE": { - "direction": "output", - "bits": [ 46 ] - }, - "TXRESETDONE": { - "direction": "output", - "bits": [ 47 ] - }, - "DRPDO": { - "direction": "output", - "bits": [ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 ] - }, - "PCSRSVDOUT": { - "direction": "output", - "bits": [ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79 ] - }, - "RXCLKCORCNT": { - "direction": "output", - "bits": [ 80, 81 ] - }, - "TXBUFSTATUS": { - "direction": "output", - "bits": [ 82, 83 ] - }, - "RXBUFSTATUS": { - "direction": "output", - "bits": [ 84, 85, 86 ] - }, - "RXHEADER": { - "direction": "output", - "bits": [ 87, 88, 89 ] - }, - "RXSTATUS": { - "direction": "output", - "bits": [ 90, 91, 92 ] - }, - "RXCHBONDO": { - "direction": "output", - "bits": [ 93, 94, 95, 96, 97 ] - }, - "RXPHMONITOR": { - "direction": "output", - "bits": [ 98, 99, 100, 101, 102 ] - }, - "RXPHSLIPMONITOR": { - "direction": "output", - "bits": [ 103, 104, 105, 106, 107 ] - }, - "RXDATA": { - "direction": "output", - "bits": [ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171 ] - }, - "RXMONITOROUT": { - "direction": "output", - "bits": [ 172, 173, 174, 175, 176, 177, 178 ] - }, - "DMONITOROUT": { - "direction": "output", - "bits": [ 179, 180, 181, 182, 183, 184, 185, 186 ] - }, - "RXCHARISCOMMA": { - "direction": "output", - "bits": [ 187, 188, 189, 190, 191, 192, 193, 194 ] - }, - "RXCHARISK": { - "direction": "output", - "bits": [ 195, 196, 197, 198, 199, 200, 201, 202 ] - }, - "RXDISPERR": { - "direction": "output", - "bits": [ 203, 204, 205, 206, 207, 208, 209, 210 ] - }, - "RXNOTINTABLE": { - "direction": "output", - "bits": [ 211, 212, 213, 214, 215, 216, 217, 218 ] - }, - "TSTOUT": { - "direction": "output", - "bits": [ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228 ] - }, - "CFGRESET": { - "direction": "input", - "bits": [ 229 ] - }, - "CPLLLOCKDETCLK": { - "direction": "input", - "bits": [ 230 ] - }, - "CPLLLOCKEN": { - "direction": "input", - "bits": [ 231 ] - }, - "CPLLPD": { - "direction": "input", - "bits": [ 232 ] - }, - "CPLLRESET": { - "direction": "input", - "bits": [ 233 ] - }, - "DRPCLK": { - "direction": "input", - "bits": [ 234 ] - }, - "DRPEN": { - "direction": "input", - "bits": [ 235 ] - }, - "DRPWE": { - "direction": "input", - "bits": [ 236 ] - }, - "EYESCANMODE": { - "direction": "input", - "bits": [ 237 ] - }, - "EYESCANRESET": { - "direction": "input", - "bits": [ 238 ] - }, - "EYESCANTRIGGER": { - "direction": "input", - "bits": [ 239 ] - }, - "GTGREFCLK": { - "direction": "input", - "bits": [ 240 ] - }, - "GTNORTHREFCLK0": { - "direction": "input", - "bits": [ 241 ] - }, - "GTNORTHREFCLK1": { - "direction": "input", - "bits": [ 242 ] - }, - "GTREFCLK0": { - "direction": "input", - "bits": [ 243 ] - }, - "GTREFCLK1": { - "direction": "input", - "bits": [ 244 ] - }, - "GTRESETSEL": { - "direction": "input", - "bits": [ 245 ] - }, - "GTRXRESET": { - "direction": "input", - "bits": [ 246 ] - }, - "GTSOUTHREFCLK0": { - "direction": "input", - "bits": [ 247 ] - }, - "GTSOUTHREFCLK1": { - "direction": "input", - "bits": [ 248 ] - }, - "GTTXRESET": { - "direction": "input", - "bits": [ 249 ] - }, - "GTXRXN": { - "direction": "input", - "bits": [ 250 ] - }, - "GTXRXP": { - "direction": "input", - "bits": [ 251 ] - }, - "QPLLCLK": { - "direction": "input", - "bits": [ 252 ] - }, - "QPLLREFCLK": { - "direction": "input", - "bits": [ 253 ] - }, - "RESETOVRD": { - "direction": "input", - "bits": [ 254 ] - }, - "RX8B10BEN": { - "direction": "input", - "bits": [ 255 ] - }, - "RXBUFRESET": { - "direction": "input", - "bits": [ 256 ] - }, - "RXCDRFREQRESET": { - "direction": "input", - "bits": [ 257 ] - }, - "RXCDRHOLD": { - "direction": "input", - "bits": [ 258 ] - }, - "RXCDROVRDEN": { - "direction": "input", - "bits": [ 259 ] - }, - "RXCDRRESET": { - "direction": "input", - "bits": [ 260 ] - }, - "RXCDRRESETRSV": { - "direction": "input", - "bits": [ 261 ] - }, - "RXCHBONDEN": { - "direction": "input", - "bits": [ 262 ] - }, - "RXCHBONDMASTER": { - "direction": "input", - "bits": [ 263 ] - }, - "RXCHBONDSLAVE": { - "direction": "input", - "bits": [ 264 ] - }, - "RXCOMMADETEN": { - "direction": "input", - "bits": [ 265 ] - }, - "RXDDIEN": { - "direction": "input", - "bits": [ 266 ] - }, - "RXDFEAGCHOLD": { - "direction": "input", - "bits": [ 267 ] - }, - "RXDFEAGCOVRDEN": { - "direction": "input", - "bits": [ 268 ] - }, - "RXDFECM1EN": { - "direction": "input", - "bits": [ 269 ] - }, - "RXDFELFHOLD": { - "direction": "input", - "bits": [ 270 ] - }, - "RXDFELFOVRDEN": { - "direction": "input", - "bits": [ 271 ] - }, - "RXDFELPMRESET": { - "direction": "input", - "bits": [ 272 ] - }, - "RXDFETAP2HOLD": { - "direction": "input", - "bits": [ 273 ] - }, - "RXDFETAP2OVRDEN": { - "direction": "input", - "bits": [ 274 ] - }, - "RXDFETAP3HOLD": { - "direction": "input", - "bits": [ 275 ] - }, - "RXDFETAP3OVRDEN": { - "direction": "input", - "bits": [ 276 ] - }, - "RXDFETAP4HOLD": { - "direction": "input", - "bits": [ 277 ] - }, - "RXDFETAP4OVRDEN": { - "direction": "input", - "bits": [ 278 ] - }, - "RXDFETAP5HOLD": { - "direction": "input", - "bits": [ 279 ] - }, - "RXDFETAP5OVRDEN": { - "direction": "input", - "bits": [ 280 ] - }, - "RXDFEUTHOLD": { - "direction": "input", - "bits": [ 281 ] - }, - "RXDFEUTOVRDEN": { - "direction": "input", - "bits": [ 282 ] - }, - "RXDFEVPHOLD": { - "direction": "input", - "bits": [ 283 ] - }, - "RXDFEVPOVRDEN": { - "direction": "input", - "bits": [ 284 ] - }, - "RXDFEVSEN": { - "direction": "input", - "bits": [ 285 ] - }, - "RXDFEXYDEN": { - "direction": "input", - "bits": [ 286 ] - }, - "RXDFEXYDHOLD": { - "direction": "input", - "bits": [ 287 ] - }, - "RXDFEXYDOVRDEN": { - "direction": "input", - "bits": [ 288 ] - }, - "RXDLYBYPASS": { - "direction": "input", - "bits": [ 289 ] - }, - "RXDLYEN": { - "direction": "input", - "bits": [ 290 ] - }, - "RXDLYOVRDEN": { - "direction": "input", - "bits": [ 291 ] - }, - "RXDLYSRESET": { - "direction": "input", - "bits": [ 292 ] - }, - "RXGEARBOXSLIP": { - "direction": "input", - "bits": [ 293 ] - }, - "RXLPMEN": { - "direction": "input", - "bits": [ 294 ] - }, - "RXLPMHFHOLD": { - "direction": "input", - "bits": [ 295 ] - }, - "RXLPMHFOVRDEN": { - "direction": "input", - "bits": [ 296 ] - }, - "RXLPMLFHOLD": { - "direction": "input", - "bits": [ 297 ] - }, - "RXLPMLFKLOVRDEN": { - "direction": "input", - "bits": [ 298 ] - }, - "RXMCOMMAALIGNEN": { - "direction": "input", - "bits": [ 299 ] - }, - "RXOOBRESET": { - "direction": "input", - "bits": [ 300 ] - }, - "RXOSHOLD": { - "direction": "input", - "bits": [ 301 ] - }, - "RXOSOVRDEN": { - "direction": "input", - "bits": [ 302 ] - }, - "RXPCOMMAALIGNEN": { - "direction": "input", - "bits": [ 303 ] - }, - "RXPCSRESET": { - "direction": "input", - "bits": [ 304 ] - }, - "RXPHALIGN": { - "direction": "input", - "bits": [ 305 ] - }, - "RXPHALIGNEN": { - "direction": "input", - "bits": [ 306 ] - }, - "RXPHDLYPD": { - "direction": "input", - "bits": [ 307 ] - }, - "RXPHDLYRESET": { - "direction": "input", - "bits": [ 308 ] - }, - "RXPHOVRDEN": { - "direction": "input", - "bits": [ 309 ] - }, - "RXPMARESET": { - "direction": "input", - "bits": [ 310 ] - }, - "RXPOLARITY": { - "direction": "input", - "bits": [ 311 ] - }, - "RXPRBSCNTRESET": { - "direction": "input", - "bits": [ 312 ] - }, - "RXQPIEN": { - "direction": "input", - "bits": [ 313 ] - }, - "RXSLIDE": { - "direction": "input", - "bits": [ 314 ] - }, - "RXUSERRDY": { - "direction": "input", - "bits": [ 315 ] - }, - "RXUSRCLK2": { - "direction": "input", - "bits": [ 316 ] - }, - "RXUSRCLK": { - "direction": "input", - "bits": [ 317 ] - }, - "SETERRSTATUS": { - "direction": "input", - "bits": [ 318 ] - }, - "TX8B10BEN": { - "direction": "input", - "bits": [ 319 ] - }, - "TXCOMINIT": { - "direction": "input", - "bits": [ 320 ] - }, - "TXCOMSAS": { - "direction": "input", - "bits": [ 321 ] - }, - "TXCOMWAKE": { - "direction": "input", - "bits": [ 322 ] - }, - "TXDEEMPH": { - "direction": "input", - "bits": [ 323 ] - }, - "TXDETECTRX": { - "direction": "input", - "bits": [ 324 ] - }, - "TXDIFFPD": { - "direction": "input", - "bits": [ 325 ] - }, - "TXDLYBYPASS": { - "direction": "input", - "bits": [ 326 ] - }, - "TXDLYEN": { - "direction": "input", - "bits": [ 327 ] - }, - "TXDLYHOLD": { - "direction": "input", - "bits": [ 328 ] - }, - "TXDLYOVRDEN": { - "direction": "input", - "bits": [ 329 ] - }, - "TXDLYSRESET": { - "direction": "input", - "bits": [ 330 ] - }, - "TXDLYUPDOWN": { - "direction": "input", - "bits": [ 331 ] - }, - "TXELECIDLE": { - "direction": "input", - "bits": [ 332 ] - }, - "TXINHIBIT": { - "direction": "input", - "bits": [ 333 ] - }, - "TXPCSRESET": { - "direction": "input", - "bits": [ 334 ] - }, - "TXPDELECIDLEMODE": { - "direction": "input", - "bits": [ 335 ] - }, - "TXPHALIGN": { - "direction": "input", - "bits": [ 336 ] - }, - "TXPHALIGNEN": { - "direction": "input", - "bits": [ 337 ] - }, - "TXPHDLYPD": { - "direction": "input", - "bits": [ 338 ] - }, - "TXPHDLYRESET": { - "direction": "input", - "bits": [ 339 ] - }, - "TXPHDLYTSTCLK": { - "direction": "input", - "bits": [ 340 ] - }, - "TXPHINIT": { - "direction": "input", - "bits": [ 341 ] - }, - "TXPHOVRDEN": { - "direction": "input", - "bits": [ 342 ] - }, - "TXPISOPD": { - "direction": "input", - "bits": [ 343 ] - }, - "TXPMARESET": { - "direction": "input", - "bits": [ 344 ] - }, - "TXPOLARITY": { - "direction": "input", - "bits": [ 345 ] - }, - "TXPOSTCURSORINV": { - "direction": "input", - "bits": [ 346 ] - }, - "TXPRBSFORCEERR": { - "direction": "input", - "bits": [ 347 ] - }, - "TXPRECURSORINV": { - "direction": "input", - "bits": [ 348 ] - }, - "TXQPIBIASEN": { - "direction": "input", - "bits": [ 349 ] - }, - "TXQPISTRONGPDOWN": { - "direction": "input", - "bits": [ 350 ] - }, - "TXQPIWEAKPUP": { - "direction": "input", - "bits": [ 351 ] - }, - "TXSTARTSEQ": { - "direction": "input", - "bits": [ 352 ] - }, - "TXSWING": { - "direction": "input", - "bits": [ 353 ] - }, - "TXUSERRDY": { - "direction": "input", - "bits": [ 354 ] - }, - "TXUSRCLK2": { - "direction": "input", - "bits": [ 355 ] - }, - "TXUSRCLK": { - "direction": "input", - "bits": [ 356 ] - }, - "DRPDI": { - "direction": "input", - "bits": [ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372 ] - }, - "GTRSVD": { - "direction": "input", - "bits": [ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388 ] - }, - "PCSRSVDIN": { - "direction": "input", - "bits": [ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404 ] - }, - "TSTIN": { - "direction": "input", - "bits": [ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424 ] - }, - "RXELECIDLEMODE": { - "direction": "input", - "bits": [ 425, 426 ] - }, - "RXMONITORSEL": { - "direction": "input", - "bits": [ 427, 428 ] - }, - "RXPD": { - "direction": "input", - "bits": [ 429, 430 ] - }, - "RXSYSCLKSEL": { - "direction": "input", - "bits": [ 431, 432 ] - }, - "TXPD": { - "direction": "input", - "bits": [ 433, 434 ] - }, - "TXSYSCLKSEL": { - "direction": "input", - "bits": [ 435, 436 ] - }, - "CPLLREFCLKSEL": { - "direction": "input", - "bits": [ 437, 438, 439 ] - }, - "LOOPBACK": { - "direction": "input", - "bits": [ 440, 441, 442 ] - }, - "RXCHBONDLEVEL": { - "direction": "input", - "bits": [ 443, 444, 445 ] - }, - "RXOUTCLKSEL": { - "direction": "input", - "bits": [ 446, 447, 448 ] - }, - "RXPRBSSEL": { - "direction": "input", - "bits": [ 449, 450, 451 ] - }, - "RXRATE": { - "direction": "input", - "bits": [ 452, 453, 454 ] - }, - "TXBUFDIFFCTRL": { - "direction": "input", - "bits": [ 455, 456, 457 ] - }, - "TXHEADER": { - "direction": "input", - "bits": [ 458, 459, 460 ] - }, - "TXMARGIN": { - "direction": "input", - "bits": [ 461, 462, 463 ] - }, - "TXOUTCLKSEL": { - "direction": "input", - "bits": [ 464, 465, 466 ] - }, - "TXPRBSSEL": { - "direction": "input", - "bits": [ 467, 468, 469 ] - }, - "TXRATE": { - "direction": "input", - "bits": [ 470, 471, 472 ] - }, - "CLKRSVD": { - "direction": "input", - "bits": [ 473, 474, 475, 476 ] - }, - "TXDIFFCTRL": { - "direction": "input", - "bits": [ 477, 478, 479, 480 ] - }, - "PCSRSVDIN2": { - "direction": "input", - "bits": [ 481, 482, 483, 484, 485 ] - }, - "PMARSVDIN2": { - "direction": "input", - "bits": [ 486, 487, 488, 489, 490 ] - }, - "PMARSVDIN": { - "direction": "input", - "bits": [ 491, 492, 493, 494, 495 ] - }, - "RXCHBONDI": { - "direction": "input", - "bits": [ 496, 497, 498, 499, 500 ] - }, - "TXPOSTCURSOR": { - "direction": "input", - "bits": [ 501, 502, 503, 504, 505 ] - }, - "TXPRECURSOR": { - "direction": "input", - "bits": [ 506, 507, 508, 509, 510 ] - }, - "TXDATA": { - "direction": "input", - "bits": [ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574 ] - }, - "TXMAINCURSOR": { - "direction": "input", - "bits": [ 575, 576, 577, 578, 579, 580, 581 ] - }, - "TXSEQUENCE": { - "direction": "input", - "bits": [ 582, 583, 584, 585, 586, 587, 588 ] - }, - "TX8B10BBYPASS": { - "direction": "input", - "bits": [ 589, 590, 591, 592, 593, 594, 595, 596 ] - }, - "TXCHARDISPMODE": { - "direction": "input", - "bits": [ 597, 598, 599, 600, 601, 602, 603, 604 ] - }, - "TXCHARDISPVAL": { - "direction": "input", - "bits": [ 605, 606, 607, 608, 609, 610, 611, 612 ] - }, - "TXCHARISK": { - "direction": "input", - "bits": [ 613, 614, 615, 616, 617, 618, 619, 620 ] - }, - "DRPADDR": { - "direction": "input", - "bits": [ 621, 622, 623, 624, 625, 626, 627, 628, 629 ] - } - }, - "cells": { - }, - "netnames": { - "CFGRESET": { - "hide_name": 0, - "bits": [ 229 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1474" - } - }, - "CLKRSVD": { - "hide_name": 0, - "bits": [ 473, 474, 475, 476 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1632" - } - }, - "CPLLFBCLKLOST": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1410" - } - }, - "CPLLLOCK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1411" - } - }, - "CPLLLOCKDETCLK": { - "hide_name": 0, - "bits": [ 230 ], - "attributes": { - "invertible_pin": "IS_CPLLLOCKDETCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1476" - } - }, - "CPLLLOCKEN": { - "hide_name": 0, - "bits": [ 231 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1477" - } - }, - "CPLLPD": { - "hide_name": 0, - "bits": [ 232 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1478" - } - }, - "CPLLREFCLKLOST": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1412" - } - }, - "CPLLREFCLKSEL": { - "hide_name": 0, - "bits": [ 437, 438, 439 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1620" - } - }, - "CPLLRESET": { - "hide_name": 0, - "bits": [ 233 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1479" - } - }, - "DMONITOROUT": { - "hide_name": 0, - "bits": [ 179, 180, 181, 182, 183, 184, 185, 186 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1468" - } - }, - "DRPADDR": { - "hide_name": 0, - "bits": [ 621, 622, 623, 624, 625, 626, 627, 628, 629 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1647" - } - }, - "DRPCLK": { - "hide_name": 0, - "bits": [ 234 ], - "attributes": { - "invertible_pin": "IS_DRPCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1481" - } - }, - "DRPDI": { - "hide_name": 0, - "bits": [ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1610" - } - }, - "DRPDO": { - "hide_name": 0, - "bits": [ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1456" - } - }, - "DRPEN": { - "hide_name": 0, - "bits": [ 235 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1482" - } - }, - "DRPRDY": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1413" - } - }, - "DRPWE": { - "hide_name": 0, - "bits": [ 236 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1483" - } - }, - "EYESCANDATAERROR": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1414" - } - }, - "EYESCANMODE": { - "hide_name": 0, - "bits": [ 237 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1484" - } - }, - "EYESCANRESET": { - "hide_name": 0, - "bits": [ 238 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1485" - } - }, - "EYESCANTRIGGER": { - "hide_name": 0, - "bits": [ 239 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1486" - } - }, - "GTGREFCLK": { - "hide_name": 0, - "bits": [ 240 ], - "attributes": { - "invertible_pin": "IS_GTGREFCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1488" - } - }, - "GTNORTHREFCLK0": { - "hide_name": 0, - "bits": [ 241 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1489" - } - }, - "GTNORTHREFCLK1": { - "hide_name": 0, - "bits": [ 242 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1490" - } - }, - "GTREFCLK0": { - "hide_name": 0, - "bits": [ 243 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1491" - } - }, - "GTREFCLK1": { - "hide_name": 0, - "bits": [ 244 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1492" - } - }, - "GTREFCLKMONITOR": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1415" - } - }, - "GTRESETSEL": { - "hide_name": 0, - "bits": [ 245 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1493" - } - }, - "GTRSVD": { - "hide_name": 0, - "bits": [ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1611" - } - }, - "GTRXRESET": { - "hide_name": 0, - "bits": [ 246 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1494" - } - }, - "GTSOUTHREFCLK0": { - "hide_name": 0, - "bits": [ 247 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1495" - } - }, - "GTSOUTHREFCLK1": { - "hide_name": 0, - "bits": [ 248 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1496" - } - }, - "GTTXRESET": { - "hide_name": 0, - "bits": [ 249 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1497" - } - }, - "GTXRXN": { - "hide_name": 0, - "bits": [ 250 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1498" - } - }, - "GTXRXP": { - "hide_name": 0, - "bits": [ 251 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1499" - } - }, - "GTXTXN": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1416" - } - }, - "GTXTXP": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1417" - } - }, - "LOOPBACK": { - "hide_name": 0, - "bits": [ 440, 441, 442 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1621" - } - }, - "PCSRSVDIN": { - "hide_name": 0, - "bits": [ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1612" - } - }, - "PCSRSVDIN2": { - "hide_name": 0, - "bits": [ 481, 482, 483, 484, 485 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1634" - } - }, - "PCSRSVDOUT": { - "hide_name": 0, - "bits": [ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1457" - } - }, - "PHYSTATUS": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1418" - } - }, - "PMARSVDIN": { - "hide_name": 0, - "bits": [ 491, 492, 493, 494, 495 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1636" - } - }, - "PMARSVDIN2": { - "hide_name": 0, - "bits": [ 486, 487, 488, 489, 490 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1635" - } - }, - "QPLLCLK": { - "hide_name": 0, - "bits": [ 252 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1500" - } - }, - "QPLLREFCLK": { - "hide_name": 0, - "bits": [ 253 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1501" - } - }, - "RESETOVRD": { - "hide_name": 0, - "bits": [ 254 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1502" - } - }, - "RX8B10BEN": { - "hide_name": 0, - "bits": [ 255 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1503" - } - }, - "RXBUFRESET": { - "hide_name": 0, - "bits": [ 256 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1504" - } - }, - "RXBUFSTATUS": { - "hide_name": 0, - "bits": [ 84, 85, 86 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1460" - } - }, - "RXBYTEISALIGNED": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1419" - } - }, - "RXBYTEREALIGN": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1420" - } - }, - "RXCDRFREQRESET": { - "hide_name": 0, - "bits": [ 257 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1505" - } - }, - "RXCDRHOLD": { - "hide_name": 0, - "bits": [ 258 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1506" - } - }, - "RXCDRLOCK": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1421" - } - }, - "RXCDROVRDEN": { - "hide_name": 0, - "bits": [ 259 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1507" - } - }, - "RXCDRRESET": { - "hide_name": 0, - "bits": [ 260 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1508" - } - }, - "RXCDRRESETRSV": { - "hide_name": 0, - "bits": [ 261 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1509" - } - }, - "RXCHANBONDSEQ": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1422" - } - }, - "RXCHANISALIGNED": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1423" - } - }, - "RXCHANREALIGN": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1424" - } - }, - "RXCHARISCOMMA": { - "hide_name": 0, - "bits": [ 187, 188, 189, 190, 191, 192, 193, 194 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1469" - } - }, - "RXCHARISK": { - "hide_name": 0, - "bits": [ 195, 196, 197, 198, 199, 200, 201, 202 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1470" - } - }, - "RXCHBONDEN": { - "hide_name": 0, - "bits": [ 262 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1510" - } - }, - "RXCHBONDI": { - "hide_name": 0, - "bits": [ 496, 497, 498, 499, 500 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1637" - } - }, - "RXCHBONDLEVEL": { - "hide_name": 0, - "bits": [ 443, 444, 445 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1622" - } - }, - "RXCHBONDMASTER": { - "hide_name": 0, - "bits": [ 263 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1511" - } - }, - "RXCHBONDO": { - "hide_name": 0, - "bits": [ 93, 94, 95, 96, 97 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1463" - } - }, - "RXCHBONDSLAVE": { - "hide_name": 0, - "bits": [ 264 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1512" - } - }, - "RXCLKCORCNT": { - "hide_name": 0, - "bits": [ 80, 81 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1458" - } - }, - "RXCOMINITDET": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1425" - } - }, - "RXCOMMADET": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1426" - } - }, - "RXCOMMADETEN": { - "hide_name": 0, - "bits": [ 265 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1513" - } - }, - "RXCOMSASDET": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1427" - } - }, - "RXCOMWAKEDET": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1428" - } - }, - "RXDATA": { - "hide_name": 0, - "bits": [ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1466" - } - }, - "RXDATAVALID": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1429" - } - }, - "RXDDIEN": { - "hide_name": 0, - "bits": [ 266 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1514" - } - }, - "RXDFEAGCHOLD": { - "hide_name": 0, - "bits": [ 267 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1515" - } - }, - "RXDFEAGCOVRDEN": { - "hide_name": 0, - "bits": [ 268 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1516" - } - }, - "RXDFECM1EN": { - "hide_name": 0, - "bits": [ 269 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1517" - } - }, - "RXDFELFHOLD": { - "hide_name": 0, - "bits": [ 270 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1518" - } - }, - "RXDFELFOVRDEN": { - "hide_name": 0, - "bits": [ 271 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1519" - } - }, - "RXDFELPMRESET": { - "hide_name": 0, - "bits": [ 272 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1520" - } - }, - "RXDFETAP2HOLD": { - "hide_name": 0, - "bits": [ 273 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1521" - } - }, - "RXDFETAP2OVRDEN": { - "hide_name": 0, - "bits": [ 274 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1522" - } - }, - "RXDFETAP3HOLD": { - "hide_name": 0, - "bits": [ 275 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1523" - } - }, - "RXDFETAP3OVRDEN": { - "hide_name": 0, - "bits": [ 276 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1524" - } - }, - "RXDFETAP4HOLD": { - "hide_name": 0, - "bits": [ 277 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1525" - } - }, - "RXDFETAP4OVRDEN": { - "hide_name": 0, - "bits": [ 278 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1526" - } - }, - "RXDFETAP5HOLD": { - "hide_name": 0, - "bits": [ 279 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1527" - } - }, - "RXDFETAP5OVRDEN": { - "hide_name": 0, - "bits": [ 280 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1528" - } - }, - "RXDFEUTHOLD": { - "hide_name": 0, - "bits": [ 281 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1529" - } - }, - "RXDFEUTOVRDEN": { - "hide_name": 0, - "bits": [ 282 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1530" - } - }, - "RXDFEVPHOLD": { - "hide_name": 0, - "bits": [ 283 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1531" - } - }, - "RXDFEVPOVRDEN": { - "hide_name": 0, - "bits": [ 284 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1532" - } - }, - "RXDFEVSEN": { - "hide_name": 0, - "bits": [ 285 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1533" - } - }, - "RXDFEXYDEN": { - "hide_name": 0, - "bits": [ 286 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1534" - } - }, - "RXDFEXYDHOLD": { - "hide_name": 0, - "bits": [ 287 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1535" - } - }, - "RXDFEXYDOVRDEN": { - "hide_name": 0, - "bits": [ 288 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1536" - } - }, - "RXDISPERR": { - "hide_name": 0, - "bits": [ 203, 204, 205, 206, 207, 208, 209, 210 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1471" - } - }, - "RXDLYBYPASS": { - "hide_name": 0, - "bits": [ 289 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1537" - } - }, - "RXDLYEN": { - "hide_name": 0, - "bits": [ 290 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1538" - } - }, - "RXDLYOVRDEN": { - "hide_name": 0, - "bits": [ 291 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1539" - } - }, - "RXDLYSRESET": { - "hide_name": 0, - "bits": [ 292 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1540" - } - }, - "RXDLYSRESETDONE": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1430" - } - }, - "RXELECIDLE": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1431" - } - }, - "RXELECIDLEMODE": { - "hide_name": 0, - "bits": [ 425, 426 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1614" - } - }, - "RXGEARBOXSLIP": { - "hide_name": 0, - "bits": [ 293 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1541" - } - }, - "RXHEADER": { - "hide_name": 0, - "bits": [ 87, 88, 89 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1461" - } - }, - "RXHEADERVALID": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1432" - } - }, - "RXLPMEN": { - "hide_name": 0, - "bits": [ 294 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1542" - } - }, - "RXLPMHFHOLD": { - "hide_name": 0, - "bits": [ 295 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1543" - } - }, - "RXLPMHFOVRDEN": { - "hide_name": 0, - "bits": [ 296 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1544" - } - }, - "RXLPMLFHOLD": { - "hide_name": 0, - "bits": [ 297 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1545" - } - }, - "RXLPMLFKLOVRDEN": { - "hide_name": 0, - "bits": [ 298 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1546" - } - }, - "RXMCOMMAALIGNEN": { - "hide_name": 0, - "bits": [ 299 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1547" - } - }, - "RXMONITOROUT": { - "hide_name": 0, - "bits": [ 172, 173, 174, 175, 176, 177, 178 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1467" - } - }, - "RXMONITORSEL": { - "hide_name": 0, - "bits": [ 427, 428 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1615" - } - }, - "RXNOTINTABLE": { - "hide_name": 0, - "bits": [ 211, 212, 213, 214, 215, 216, 217, 218 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1472" - } - }, - "RXOOBRESET": { - "hide_name": 0, - "bits": [ 300 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1548" - } - }, - "RXOSHOLD": { - "hide_name": 0, - "bits": [ 301 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1549" - } - }, - "RXOSOVRDEN": { - "hide_name": 0, - "bits": [ 302 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1550" - } - }, - "RXOUTCLK": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1433" - } - }, - "RXOUTCLKFABRIC": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1434" - } - }, - "RXOUTCLKPCS": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1435" - } - }, - "RXOUTCLKSEL": { - "hide_name": 0, - "bits": [ 446, 447, 448 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1623" - } - }, - "RXPCOMMAALIGNEN": { - "hide_name": 0, - "bits": [ 303 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1551" - } - }, - "RXPCSRESET": { - "hide_name": 0, - "bits": [ 304 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1552" - } - }, - "RXPD": { - "hide_name": 0, - "bits": [ 429, 430 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1616" - } - }, - "RXPHALIGN": { - "hide_name": 0, - "bits": [ 305 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1553" - } - }, - "RXPHALIGNDONE": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1436" - } - }, - "RXPHALIGNEN": { - "hide_name": 0, - "bits": [ 306 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1554" - } - }, - "RXPHDLYPD": { - "hide_name": 0, - "bits": [ 307 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1555" - } - }, - "RXPHDLYRESET": { - "hide_name": 0, - "bits": [ 308 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1556" - } - }, - "RXPHMONITOR": { - "hide_name": 0, - "bits": [ 98, 99, 100, 101, 102 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1464" - } - }, - "RXPHOVRDEN": { - "hide_name": 0, - "bits": [ 309 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1557" - } - }, - "RXPHSLIPMONITOR": { - "hide_name": 0, - "bits": [ 103, 104, 105, 106, 107 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1465" - } - }, - "RXPMARESET": { - "hide_name": 0, - "bits": [ 310 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1558" - } - }, - "RXPOLARITY": { - "hide_name": 0, - "bits": [ 311 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1559" - } - }, - "RXPRBSCNTRESET": { - "hide_name": 0, - "bits": [ 312 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1560" - } - }, - "RXPRBSERR": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1437" - } - }, - "RXPRBSSEL": { - "hide_name": 0, - "bits": [ 449, 450, 451 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1624" - } - }, - "RXQPIEN": { - "hide_name": 0, - "bits": [ 313 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1561" - } - }, - "RXQPISENN": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1438" - } - }, - "RXQPISENP": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1439" - } - }, - "RXRATE": { - "hide_name": 0, - "bits": [ 452, 453, 454 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1625" - } - }, - "RXRATEDONE": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1440" - } - }, - "RXRESETDONE": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1441" - } - }, - "RXSLIDE": { - "hide_name": 0, - "bits": [ 314 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1562" - } - }, - "RXSTARTOFSEQ": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1442" - } - }, - "RXSTATUS": { - "hide_name": 0, - "bits": [ 90, 91, 92 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1462" - } - }, - "RXSYSCLKSEL": { - "hide_name": 0, - "bits": [ 431, 432 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1617" - } - }, - "RXUSERRDY": { - "hide_name": 0, - "bits": [ 315 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1563" - } - }, - "RXUSRCLK": { - "hide_name": 0, - "bits": [ 317 ], - "attributes": { - "invertible_pin": "IS_RXUSRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1567" - } - }, - "RXUSRCLK2": { - "hide_name": 0, - "bits": [ 316 ], - "attributes": { - "invertible_pin": "IS_RXUSRCLK2_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1565" - } - }, - "RXVALID": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1443" - } - }, - "SETERRSTATUS": { - "hide_name": 0, - "bits": [ 318 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1568" - } - }, - "TSTIN": { - "hide_name": 0, - "bits": [ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1613" - } - }, - "TSTOUT": { - "hide_name": 0, - "bits": [ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1473" - } - }, - "TX8B10BBYPASS": { - "hide_name": 0, - "bits": [ 589, 590, 591, 592, 593, 594, 595, 596 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1643" - } - }, - "TX8B10BEN": { - "hide_name": 0, - "bits": [ 319 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1569" - } - }, - "TXBUFDIFFCTRL": { - "hide_name": 0, - "bits": [ 455, 456, 457 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1626" - } - }, - "TXBUFSTATUS": { - "hide_name": 0, - "bits": [ 82, 83 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1459" - } - }, - "TXCHARDISPMODE": { - "hide_name": 0, - "bits": [ 597, 598, 599, 600, 601, 602, 603, 604 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1644" - } - }, - "TXCHARDISPVAL": { - "hide_name": 0, - "bits": [ 605, 606, 607, 608, 609, 610, 611, 612 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1645" - } - }, - "TXCHARISK": { - "hide_name": 0, - "bits": [ 613, 614, 615, 616, 617, 618, 619, 620 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1646" - } - }, - "TXCOMFINISH": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1444" - } - }, - "TXCOMINIT": { - "hide_name": 0, - "bits": [ 320 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1570" - } - }, - "TXCOMSAS": { - "hide_name": 0, - "bits": [ 321 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1571" - } - }, - "TXCOMWAKE": { - "hide_name": 0, - "bits": [ 322 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1572" - } - }, - "TXDATA": { - "hide_name": 0, - "bits": [ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1640" - } - }, - "TXDEEMPH": { - "hide_name": 0, - "bits": [ 323 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1573" - } - }, - "TXDETECTRX": { - "hide_name": 0, - "bits": [ 324 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1574" - } - }, - "TXDIFFCTRL": { - "hide_name": 0, - "bits": [ 477, 478, 479, 480 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1633" - } - }, - "TXDIFFPD": { - "hide_name": 0, - "bits": [ 325 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1575" - } - }, - "TXDLYBYPASS": { - "hide_name": 0, - "bits": [ 326 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1576" - } - }, - "TXDLYEN": { - "hide_name": 0, - "bits": [ 327 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1577" - } - }, - "TXDLYHOLD": { - "hide_name": 0, - "bits": [ 328 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1578" - } - }, - "TXDLYOVRDEN": { - "hide_name": 0, - "bits": [ 329 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1579" - } - }, - "TXDLYSRESET": { - "hide_name": 0, - "bits": [ 330 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1580" - } - }, - "TXDLYSRESETDONE": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1445" - } - }, - "TXDLYUPDOWN": { - "hide_name": 0, - "bits": [ 331 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1581" - } - }, - "TXELECIDLE": { - "hide_name": 0, - "bits": [ 332 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1582" - } - }, - "TXGEARBOXREADY": { - "hide_name": 0, - "bits": [ 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1446" - } - }, - "TXHEADER": { - "hide_name": 0, - "bits": [ 458, 459, 460 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1627" - } - }, - "TXINHIBIT": { - "hide_name": 0, - "bits": [ 333 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1583" - } - }, - "TXMAINCURSOR": { - "hide_name": 0, - "bits": [ 575, 576, 577, 578, 579, 580, 581 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1641" - } - }, - "TXMARGIN": { - "hide_name": 0, - "bits": [ 461, 462, 463 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1628" - } - }, - "TXOUTCLK": { - "hide_name": 0, - "bits": [ 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1447" - } - }, - "TXOUTCLKFABRIC": { - "hide_name": 0, - "bits": [ 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1448" - } - }, - "TXOUTCLKPCS": { - "hide_name": 0, - "bits": [ 41 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1449" - } - }, - "TXOUTCLKSEL": { - "hide_name": 0, - "bits": [ 464, 465, 466 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1629" - } - }, - "TXPCSRESET": { - "hide_name": 0, - "bits": [ 334 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1584" - } - }, - "TXPD": { - "hide_name": 0, - "bits": [ 433, 434 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1618" - } - }, - "TXPDELECIDLEMODE": { - "hide_name": 0, - "bits": [ 335 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1585" - } - }, - "TXPHALIGN": { - "hide_name": 0, - "bits": [ 336 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1586" - } - }, - "TXPHALIGNDONE": { - "hide_name": 0, - "bits": [ 42 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1450" - } - }, - "TXPHALIGNEN": { - "hide_name": 0, - "bits": [ 337 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1587" - } - }, - "TXPHDLYPD": { - "hide_name": 0, - "bits": [ 338 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1588" - } - }, - "TXPHDLYRESET": { - "hide_name": 0, - "bits": [ 339 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1589" - } - }, - "TXPHDLYTSTCLK": { - "hide_name": 0, - "bits": [ 340 ], - "attributes": { - "invertible_pin": "IS_TXPHDLYTSTCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1591" - } - }, - "TXPHINIT": { - "hide_name": 0, - "bits": [ 341 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1592" - } - }, - "TXPHINITDONE": { - "hide_name": 0, - "bits": [ 43 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1451" - } - }, - "TXPHOVRDEN": { - "hide_name": 0, - "bits": [ 342 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1593" - } - }, - "TXPISOPD": { - "hide_name": 0, - "bits": [ 343 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1594" - } - }, - "TXPMARESET": { - "hide_name": 0, - "bits": [ 344 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1595" - } - }, - "TXPOLARITY": { - "hide_name": 0, - "bits": [ 345 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1596" - } - }, - "TXPOSTCURSOR": { - "hide_name": 0, - "bits": [ 501, 502, 503, 504, 505 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1638" - } - }, - "TXPOSTCURSORINV": { - "hide_name": 0, - "bits": [ 346 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1597" - } - }, - "TXPRBSFORCEERR": { - "hide_name": 0, - "bits": [ 347 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1598" - } - }, - "TXPRBSSEL": { - "hide_name": 0, - "bits": [ 467, 468, 469 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1630" - } - }, - "TXPRECURSOR": { - "hide_name": 0, - "bits": [ 506, 507, 508, 509, 510 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1639" - } - }, - "TXPRECURSORINV": { - "hide_name": 0, - "bits": [ 348 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1599" - } - }, - "TXQPIBIASEN": { - "hide_name": 0, - "bits": [ 349 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1600" - } - }, - "TXQPISENN": { - "hide_name": 0, - "bits": [ 44 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1452" - } - }, - "TXQPISENP": { - "hide_name": 0, - "bits": [ 45 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1453" - } - }, - "TXQPISTRONGPDOWN": { - "hide_name": 0, - "bits": [ 350 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1601" - } - }, - "TXQPIWEAKPUP": { - "hide_name": 0, - "bits": [ 351 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1602" - } - }, - "TXRATE": { - "hide_name": 0, - "bits": [ 470, 471, 472 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1631" - } - }, - "TXRATEDONE": { - "hide_name": 0, - "bits": [ 46 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1454" - } - }, - "TXRESETDONE": { - "hide_name": 0, - "bits": [ 47 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1455" - } - }, - "TXSEQUENCE": { - "hide_name": 0, - "bits": [ 582, 583, 584, 585, 586, 587, 588 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1642" - } - }, - "TXSTARTSEQ": { - "hide_name": 0, - "bits": [ 352 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1603" - } - }, - "TXSWING": { - "hide_name": 0, - "bits": [ 353 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1604" - } - }, - "TXSYSCLKSEL": { - "hide_name": 0, - "bits": [ 435, 436 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1619" - } - }, - "TXUSERRDY": { - "hide_name": 0, - "bits": [ 354 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1605" - } - }, - "TXUSRCLK": { - "hide_name": 0, - "bits": [ 356 ], - "attributes": { - "invertible_pin": "IS_TXUSRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1609" - } - }, - "TXUSRCLK2": { - "hide_name": 0, - "bits": [ 355 ], - "attributes": { - "invertible_pin": "IS_TXUSRCLK2_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1607" - } - } - } - }, - "GTXE2_COMMON": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1650" - }, - "ports": { - "DRPRDY": { - "direction": "output", - "bits": [ 2 ] - }, - "QPLLFBCLKLOST": { - "direction": "output", - "bits": [ 3 ] - }, - "QPLLLOCK": { - "direction": "output", - "bits": [ 4 ] - }, - "QPLLOUTCLK": { - "direction": "output", - "bits": [ 5 ] - }, - "QPLLOUTREFCLK": { - "direction": "output", - "bits": [ 6 ] - }, - "QPLLREFCLKLOST": { - "direction": "output", - "bits": [ 7 ] - }, - "REFCLKOUTMONITOR": { - "direction": "output", - "bits": [ 8 ] - }, - "DRPDO": { - "direction": "output", - "bits": [ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ] - }, - "QPLLDMONITOR": { - "direction": "output", - "bits": [ 25, 26, 27, 28, 29, 30, 31, 32 ] - }, - "BGBYPASSB": { - "direction": "input", - "bits": [ 33 ] - }, - "BGMONITORENB": { - "direction": "input", - "bits": [ 34 ] - }, - "BGPDB": { - "direction": "input", - "bits": [ 35 ] - }, - "DRPCLK": { - "direction": "input", - "bits": [ 36 ] - }, - "DRPEN": { - "direction": "input", - "bits": [ 37 ] - }, - "DRPWE": { - "direction": "input", - "bits": [ 38 ] - }, - "GTGREFCLK": { - "direction": "input", - "bits": [ 39 ] - }, - "GTNORTHREFCLK0": { - "direction": "input", - "bits": [ 40 ] - }, - "GTNORTHREFCLK1": { - "direction": "input", - "bits": [ 41 ] - }, - "GTREFCLK0": { - "direction": "input", - "bits": [ 42 ] - }, - "GTREFCLK1": { - "direction": "input", - "bits": [ 43 ] - }, - "GTSOUTHREFCLK0": { - "direction": "input", - "bits": [ 44 ] - }, - "GTSOUTHREFCLK1": { - "direction": "input", - "bits": [ 45 ] - }, - "QPLLLOCKDETCLK": { - "direction": "input", - "bits": [ 46 ] - }, - "QPLLLOCKEN": { - "direction": "input", - "bits": [ 47 ] - }, - "QPLLOUTRESET": { - "direction": "input", - "bits": [ 48 ] - }, - "QPLLPD": { - "direction": "input", - "bits": [ 49 ] - }, - "QPLLRESET": { - "direction": "input", - "bits": [ 50 ] - }, - "RCALENB": { - "direction": "input", - "bits": [ 51 ] - }, - "DRPDI": { - "direction": "input", - "bits": [ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 ] - }, - "QPLLRSVD1": { - "direction": "input", - "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 ] - }, - "QPLLREFCLKSEL": { - "direction": "input", - "bits": [ 84, 85, 86 ] - }, - "BGRCALOVRD": { - "direction": "input", - "bits": [ 87, 88, 89, 90, 91 ] - }, - "QPLLRSVD2": { - "direction": "input", - "bits": [ 92, 93, 94, 95, 96 ] - }, - "DRPADDR": { - "direction": "input", - "bits": [ 97, 98, 99, 100, 101, 102, 103, 104 ] - }, - "PMARSVD": { - "direction": "input", - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112 ] - } - }, - "cells": { - }, - "netnames": { - "BGBYPASSB": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1682" - } - }, - "BGMONITORENB": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1683" - } - }, - "BGPDB": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1684" - } - }, - "BGRCALOVRD": { - "hide_name": 0, - "bits": [ 87, 88, 89, 90, 91 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1707" - } - }, - "DRPADDR": { - "hide_name": 0, - "bits": [ 97, 98, 99, 100, 101, 102, 103, 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1709" - } - }, - "DRPCLK": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "invertible_pin": "IS_DRPCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1686" - } - }, - "DRPDI": { - "hide_name": 0, - "bits": [ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1704" - } - }, - "DRPDO": { - "hide_name": 0, - "bits": [ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1680" - } - }, - "DRPEN": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1687" - } - }, - "DRPRDY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1673" - } - }, - "DRPWE": { - "hide_name": 0, - "bits": [ 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1688" - } - }, - "GTGREFCLK": { - "hide_name": 0, - "bits": [ 39 ], - "attributes": { - "invertible_pin": "IS_GTGREFCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1690" - } - }, - "GTNORTHREFCLK0": { - "hide_name": 0, - "bits": [ 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1691" - } - }, - "GTNORTHREFCLK1": { - "hide_name": 0, - "bits": [ 41 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1692" - } - }, - "GTREFCLK0": { - "hide_name": 0, - "bits": [ 42 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1693" - } - }, - "GTREFCLK1": { - "hide_name": 0, - "bits": [ 43 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1694" - } - }, - "GTSOUTHREFCLK0": { - "hide_name": 0, - "bits": [ 44 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1695" - } - }, - "GTSOUTHREFCLK1": { - "hide_name": 0, - "bits": [ 45 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1696" - } - }, - "PMARSVD": { - "hide_name": 0, - "bits": [ 105, 106, 107, 108, 109, 110, 111, 112 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1710" - } - }, - "QPLLDMONITOR": { - "hide_name": 0, - "bits": [ 25, 26, 27, 28, 29, 30, 31, 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1681" - } - }, - "QPLLFBCLKLOST": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1674" - } - }, - "QPLLLOCK": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1675" - } - }, - "QPLLLOCKDETCLK": { - "hide_name": 0, - "bits": [ 46 ], - "attributes": { - "invertible_pin": "IS_QPLLLOCKDETCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1698" - } - }, - "QPLLLOCKEN": { - "hide_name": 0, - "bits": [ 47 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1699" - } - }, - "QPLLOUTCLK": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1676" - } - }, - "QPLLOUTREFCLK": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1677" - } - }, - "QPLLOUTRESET": { - "hide_name": 0, - "bits": [ 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1700" - } - }, - "QPLLPD": { - "hide_name": 0, - "bits": [ 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1701" - } - }, - "QPLLREFCLKLOST": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1678" - } - }, - "QPLLREFCLKSEL": { - "hide_name": 0, - "bits": [ 84, 85, 86 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1706" - } - }, - "QPLLRESET": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1702" - } - }, - "QPLLRSVD1": { - "hide_name": 0, - "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1705" - } - }, - "QPLLRSVD2": { - "hide_name": 0, - "bits": [ 92, 93, 94, 95, 96 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1708" - } - }, - "RCALENB": { - "hide_name": 0, - "bits": [ 51 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1703" - } - }, - "REFCLKOUTMONITOR": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1679" - } - } - } - }, - "IBUF": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:32" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:35" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:33" - } - } - } - }, - "IBUFDS": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3830" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - }, - "IB": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3840" - } - }, - "IB": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3842" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3838" - } - } - } - }, - "IBUFDS_DIFF_OUT": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3845" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "OB": { - "direction": "output", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - }, - "IB": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3853" - } - }, - "IB": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3855" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3850" - } - }, - "OB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3851" - } - } - } - }, - "IBUFDS_DIFF_OUT_IBUFDISABLE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3858" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "OB": { - "direction": "output", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - }, - "IB": { - "direction": "input", - "bits": [ 5 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3868" - } - }, - "IB": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3870" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3871" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3865" - } - }, - "OB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3866" - } - } - } - }, - "IBUFDS_DIFF_OUT_INTERMDISABLE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3874" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "OB": { - "direction": "output", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - }, - "IB": { - "direction": "input", - "bits": [ 5 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 6 ] - }, - "INTERMDISABLE": { - "direction": "input", - "bits": [ 7 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3884" - } - }, - "IB": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3886" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3887" - } - }, - "INTERMDISABLE": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3888" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3881" - } - }, - "OB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3882" - } - } - } - }, - "IBUFDS_GTE2": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3891" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "ODIV2": { - "direction": "output", - "bits": [ 3 ] - }, - "CEB": { - "direction": "input", - "bits": [ 4 ] - }, - "I": { - "direction": "input", - "bits": [ 5 ] - }, - "IB": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "CEB": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3897" - } - }, - "I": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3899" - } - }, - "IB": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3901" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3895" - } - }, - "ODIV2": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3896" - } - } - } - }, - "IBUFDS_IBUFDISABLE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3904" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - }, - "IB": { - "direction": "input", - "bits": [ 4 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3913" - } - }, - "IB": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3915" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3916" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3911" - } - } - } - }, - "IBUFDS_INTERMDISABLE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3919" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - }, - "IB": { - "direction": "input", - "bits": [ 4 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 5 ] - }, - "INTERMDISABLE": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3928" - } - }, - "IB": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3930" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3931" - } - }, - "INTERMDISABLE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3932" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3926" - } - } - } - }, - "IBUFG": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:41" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:44" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:42" - } - } - } - }, - "IBUFGDS": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3935" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - }, - "IB": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3943" - } - }, - "IB": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3945" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3941" - } - } - } - }, - "IBUFGDS_DIFF_OUT": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3948" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "OB": { - "direction": "output", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - }, - "IB": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3956" - } - }, - "IB": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3958" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3953" - } - }, - "OB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3954" - } - } - } - }, - "IBUF_IBUFDISABLE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3807" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3814" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3815" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3812" - } - } - } - }, - "IBUF_INTERMDISABLE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3818" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 4 ] - }, - "INTERMDISABLE": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3825" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3826" - } - }, - "INTERMDISABLE": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3827" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3823" - } - } - } - }, - "ICAPE2": { - "attributes": { - "blackbox": 1, - "keep": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3765" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 ] - }, - "CLK": { - "direction": "input", - "bits": [ 34 ] - }, - "CSIB": { - "direction": "input", - "bits": [ 35 ] - }, - "RDWRB": { - "direction": "input", - "bits": [ 36 ] - }, - "I": { - "direction": "input", - "bits": [ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 ] - } - }, - "cells": { - }, - "netnames": { - "CLK": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3770" - } - }, - "CSIB": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3771" - } - }, - "I": { - "hide_name": 0, - "bits": [ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3773" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3769" - } - }, - "RDWRB": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3772" - } - } - } - }, - "IDDR": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5010" - }, - "ports": { - "Q1": { - "direction": "output", - "bits": [ 2 ] - }, - "Q2": { - "direction": "output", - "bits": [ 3 ] - }, - "C": { - "direction": "input", - "bits": [ 4 ] - }, - "CE": { - "direction": "input", - "bits": [ 5 ] - }, - "D": { - "direction": "input", - "bits": [ 6 ] - }, - "R": { - "direction": "input", - "bits": [ 7 ] - }, - "S": { - "direction": "input", - "bits": [ 8 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_C_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5023" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5024" - } - }, - "D": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "invertible_pin": "IS_D_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5026" - } - }, - "Q1": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5019" - } - }, - "Q2": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5020" - } - }, - "R": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5027" - } - }, - "S": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5028" - } - } - } - }, - "IDDR_2CLK": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5031" - }, - "ports": { - "Q1": { - "direction": "output", - "bits": [ 2 ] - }, - "Q2": { - "direction": "output", - "bits": [ 3 ] - }, - "C": { - "direction": "input", - "bits": [ 4 ] - }, - "CB": { - "direction": "input", - "bits": [ 5 ] - }, - "CE": { - "direction": "input", - "bits": [ 6 ] - }, - "D": { - "direction": "input", - "bits": [ 7 ] - }, - "R": { - "direction": "input", - "bits": [ 8 ] - }, - "S": { - "direction": "input", - "bits": [ 9 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_C_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5043" - } - }, - "CB": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CB_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5046" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5047" - } - }, - "D": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "invertible_pin": "IS_D_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5049" - } - }, - "Q1": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5039" - } - }, - "Q2": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5040" - } - }, - "R": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5050" - } - }, - "S": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5051" - } - } - } - }, - "IDELAYCTRL": { - "attributes": { - "blackbox": 1, - "keep": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3962" - }, - "ports": { - "RDY": { - "direction": "output", - "bits": [ 2 ] - }, - "REFCLK": { - "direction": "input", - "bits": [ 3 ] - }, - "RST": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "RDY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3964" - } - }, - "REFCLK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3966" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3967" - } - } - } - }, - "IDELAYE2": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3970" - }, - "ports": { - "CNTVALUEOUT": { - "direction": "output", - "bits": [ 2, 3, 4, 5, 6 ] - }, - "DATAOUT": { - "direction": "output", - "bits": [ 7 ] - }, - "C": { - "direction": "input", - "bits": [ 8 ] - }, - "CE": { - "direction": "input", - "bits": [ 9 ] - }, - "CINVCTRL": { - "direction": "input", - "bits": [ 10 ] - }, - "CNTVALUEIN": { - "direction": "input", - "bits": [ 11, 12, 13, 14, 15 ] - }, - "DATAIN": { - "direction": "input", - "bits": [ 16 ] - }, - "IDATAIN": { - "direction": "input", - "bits": [ 17 ] - }, - "INC": { - "direction": "input", - "bits": [ 18 ] - }, - "LD": { - "direction": "input", - "bits": [ 19 ] - }, - "LDPIPEEN": { - "direction": "input", - "bits": [ 20 ] - }, - "REGRST": { - "direction": "input", - "bits": [ 21 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_C_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3987" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3988" - } - }, - "CINVCTRL": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3989" - } - }, - "CNTVALUEIN": { - "hide_name": 0, - "bits": [ 11, 12, 13, 14, 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3990" - } - }, - "CNTVALUEOUT": { - "hide_name": 0, - "bits": [ 2, 3, 4, 5, 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3983" - } - }, - "DATAIN": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "invertible_pin": "IS_DATAIN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3992" - } - }, - "DATAOUT": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3984" - } - }, - "IDATAIN": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "invertible_pin": "IS_IDATAIN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3994" - } - }, - "INC": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3995" - } - }, - "LD": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3996" - } - }, - "LDPIPEEN": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3997" - } - }, - "REGRST": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3998" - } - } - } - }, - "INV": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:129" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:129" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:129" - } - } - } - }, - "IN_FIFO": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4001" - }, - "ports": { - "ALMOSTEMPTY": { - "direction": "output", - "bits": [ 2 ] - }, - "ALMOSTFULL": { - "direction": "output", - "bits": [ 3 ] - }, - "EMPTY": { - "direction": "output", - "bits": [ 4 ] - }, - "FULL": { - "direction": "output", - "bits": [ 5 ] - }, - "Q0": { - "direction": "output", - "bits": [ 6, 7, 8, 9, 10, 11, 12, 13 ] - }, - "Q1": { - "direction": "output", - "bits": [ 14, 15, 16, 17, 18, 19, 20, 21 ] - }, - "Q2": { - "direction": "output", - "bits": [ 22, 23, 24, 25, 26, 27, 28, 29 ] - }, - "Q3": { - "direction": "output", - "bits": [ 30, 31, 32, 33, 34, 35, 36, 37 ] - }, - "Q4": { - "direction": "output", - "bits": [ 38, 39, 40, 41, 42, 43, 44, 45 ] - }, - "Q5": { - "direction": "output", - "bits": [ 46, 47, 48, 49, 50, 51, 52, 53 ] - }, - "Q6": { - "direction": "output", - "bits": [ 54, 55, 56, 57, 58, 59, 60, 61 ] - }, - "Q7": { - "direction": "output", - "bits": [ 62, 63, 64, 65, 66, 67, 68, 69 ] - }, - "Q8": { - "direction": "output", - "bits": [ 70, 71, 72, 73, 74, 75, 76, 77 ] - }, - "Q9": { - "direction": "output", - "bits": [ 78, 79, 80, 81, 82, 83, 84, 85 ] - }, - "RDCLK": { - "direction": "input", - "bits": [ 86 ] - }, - "RDEN": { - "direction": "input", - "bits": [ 87 ] - }, - "RESET": { - "direction": "input", - "bits": [ 88 ] - }, - "WRCLK": { - "direction": "input", - "bits": [ 89 ] - }, - "WREN": { - "direction": "input", - "bits": [ 90 ] - }, - "D0": { - "direction": "input", - "bits": [ 91, 92, 93, 94 ] - }, - "D1": { - "direction": "input", - "bits": [ 95, 96, 97, 98 ] - }, - "D2": { - "direction": "input", - "bits": [ 99, 100, 101, 102 ] - }, - "D3": { - "direction": "input", - "bits": [ 103, 104, 105, 106 ] - }, - "D4": { - "direction": "input", - "bits": [ 107, 108, 109, 110 ] - }, - "D7": { - "direction": "input", - "bits": [ 111, 112, 113, 114 ] - }, - "D8": { - "direction": "input", - "bits": [ 115, 116, 117, 118 ] - }, - "D9": { - "direction": "input", - "bits": [ 119, 120, 121, 122 ] - }, - "D5": { - "direction": "input", - "bits": [ 123, 124, 125, 126, 127, 128, 129, 130 ] - }, - "D6": { - "direction": "input", - "bits": [ 131, 132, 133, 134, 135, 136, 137, 138 ] - } - }, - "cells": { - }, - "netnames": { - "ALMOSTEMPTY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4006" - } - }, - "ALMOSTFULL": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4007" - } - }, - "D0": { - "hide_name": 0, - "bits": [ 91, 92, 93, 94 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4027" - } - }, - "D1": { - "hide_name": 0, - "bits": [ 95, 96, 97, 98 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4028" - } - }, - "D2": { - "hide_name": 0, - "bits": [ 99, 100, 101, 102 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4029" - } - }, - "D3": { - "hide_name": 0, - "bits": [ 103, 104, 105, 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4030" - } - }, - "D4": { - "hide_name": 0, - "bits": [ 107, 108, 109, 110 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4031" - } - }, - "D5": { - "hide_name": 0, - "bits": [ 123, 124, 125, 126, 127, 128, 129, 130 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4035" - } - }, - "D6": { - "hide_name": 0, - "bits": [ 131, 132, 133, 134, 135, 136, 137, 138 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4036" - } - }, - "D7": { - "hide_name": 0, - "bits": [ 111, 112, 113, 114 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4032" - } - }, - "D8": { - "hide_name": 0, - "bits": [ 115, 116, 117, 118 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4033" - } - }, - "D9": { - "hide_name": 0, - "bits": [ 119, 120, 121, 122 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4034" - } - }, - "EMPTY": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4008" - } - }, - "FULL": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4009" - } - }, - "Q0": { - "hide_name": 0, - "bits": [ 6, 7, 8, 9, 10, 11, 12, 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4010" - } - }, - "Q1": { - "hide_name": 0, - "bits": [ 14, 15, 16, 17, 18, 19, 20, 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4011" - } - }, - "Q2": { - "hide_name": 0, - "bits": [ 22, 23, 24, 25, 26, 27, 28, 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4012" - } - }, - "Q3": { - "hide_name": 0, - "bits": [ 30, 31, 32, 33, 34, 35, 36, 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4013" - } - }, - "Q4": { - "hide_name": 0, - "bits": [ 38, 39, 40, 41, 42, 43, 44, 45 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4014" - } - }, - "Q5": { - "hide_name": 0, - "bits": [ 46, 47, 48, 49, 50, 51, 52, 53 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4015" - } - }, - "Q6": { - "hide_name": 0, - "bits": [ 54, 55, 56, 57, 58, 59, 60, 61 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4016" - } - }, - "Q7": { - "hide_name": 0, - "bits": [ 62, 63, 64, 65, 66, 67, 68, 69 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4017" - } - }, - "Q8": { - "hide_name": 0, - "bits": [ 70, 71, 72, 73, 74, 75, 76, 77 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4018" - } - }, - "Q9": { - "hide_name": 0, - "bits": [ 78, 79, 80, 81, 82, 83, 84, 85 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4019" - } - }, - "RDCLK": { - "hide_name": 0, - "bits": [ 86 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4021" - } - }, - "RDEN": { - "hide_name": 0, - "bits": [ 87 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4022" - } - }, - "RESET": { - "hide_name": 0, - "bits": [ 88 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4023" - } - }, - "WRCLK": { - "hide_name": 0, - "bits": [ 89 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4025" - } - }, - "WREN": { - "hide_name": 0, - "bits": [ 90 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4026" - } - } - } - }, - "IOBUF": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4039" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "IO": { - "direction": "inout", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - }, - "T": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4047" - } - }, - "IO": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4046" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4044" - } - }, - "T": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4048" - } - } - } - }, - "IOBUFDS": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4083" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "IO": { - "direction": "inout", - "bits": [ 3 ] - }, - "IOB": { - "direction": "inout", - "bits": [ 4 ] - }, - "I": { - "direction": "input", - "bits": [ 5 ] - }, - "T": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4093" - } - }, - "IO": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4091" - } - }, - "IOB": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4092" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4089" - } - }, - "T": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4094" - } - } - } - }, - "IOBUFDS_DCIEN": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4097" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "IO": { - "direction": "inout", - "bits": [ 3 ] - }, - "IOB": { - "direction": "inout", - "bits": [ 4 ] - }, - "DCITERMDISABLE": { - "direction": "input", - "bits": [ 5 ] - }, - "I": { - "direction": "input", - "bits": [ 6 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 7 ] - }, - "T": { - "direction": "input", - "bits": [ 8 ] - } - }, - "cells": { - }, - "netnames": { - "DCITERMDISABLE": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4110" - } - }, - "I": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4111" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4112" - } - }, - "IO": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4107" - } - }, - "IOB": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4109" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4105" - } - }, - "T": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4113" - } - } - } - }, - "IOBUFDS_DIFF_OUT": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4116" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "OB": { - "direction": "output", - "bits": [ 3 ] - }, - "IO": { - "direction": "inout", - "bits": [ 4 ] - }, - "IOB": { - "direction": "inout", - "bits": [ 5 ] - }, - "I": { - "direction": "input", - "bits": [ 6 ] - }, - "TM": { - "direction": "input", - "bits": [ 7 ] - }, - "TS": { - "direction": "input", - "bits": [ 8 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4127" - } - }, - "IO": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4124" - } - }, - "IOB": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4126" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4121" - } - }, - "OB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4122" - } - }, - "TM": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4128" - } - }, - "TS": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4129" - } - } - } - }, - "IOBUFDS_DIFF_OUT_DCIEN": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4132" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "OB": { - "direction": "output", - "bits": [ 3 ] - }, - "IO": { - "direction": "inout", - "bits": [ 4 ] - }, - "IOB": { - "direction": "inout", - "bits": [ 5 ] - }, - "DCITERMDISABLE": { - "direction": "input", - "bits": [ 6 ] - }, - "I": { - "direction": "input", - "bits": [ 7 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 8 ] - }, - "TM": { - "direction": "input", - "bits": [ 9 ] - }, - "TS": { - "direction": "input", - "bits": [ 10 ] - } - }, - "cells": { - }, - "netnames": { - "DCITERMDISABLE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4145" - } - }, - "I": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4146" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4147" - } - }, - "IO": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4142" - } - }, - "IOB": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4144" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4139" - } - }, - "OB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4140" - } - }, - "TM": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4148" - } - }, - "TS": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4149" - } - } - } - }, - "IOBUFDS_DIFF_OUT_INTERMDISABLE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4152" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "OB": { - "direction": "output", - "bits": [ 3 ] - }, - "IO": { - "direction": "inout", - "bits": [ 4 ] - }, - "IOB": { - "direction": "inout", - "bits": [ 5 ] - }, - "I": { - "direction": "input", - "bits": [ 6 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 7 ] - }, - "INTERMDISABLE": { - "direction": "input", - "bits": [ 8 ] - }, - "TM": { - "direction": "input", - "bits": [ 9 ] - }, - "TS": { - "direction": "input", - "bits": [ 10 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4165" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4166" - } - }, - "INTERMDISABLE": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4167" - } - }, - "IO": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4162" - } - }, - "IOB": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4164" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4159" - } - }, - "OB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4160" - } - }, - "TM": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4168" - } - }, - "TS": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4169" - } - } - } - }, - "IOBUFDS_INTERMDISABLE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4172" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "IO": { - "direction": "inout", - "bits": [ 3 ] - }, - "IOB": { - "direction": "inout", - "bits": [ 4 ] - }, - "I": { - "direction": "input", - "bits": [ 5 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 6 ] - }, - "INTERMDISABLE": { - "direction": "input", - "bits": [ 7 ] - }, - "T": { - "direction": "input", - "bits": [ 8 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4185" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4186" - } - }, - "INTERMDISABLE": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4187" - } - }, - "IO": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4182" - } - }, - "IOB": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4184" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4180" - } - }, - "T": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4188" - } - } - } - }, - "IOBUF_DCIEN": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4051" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "IO": { - "direction": "inout", - "bits": [ 3 ] - }, - "DCITERMDISABLE": { - "direction": "input", - "bits": [ 4 ] - }, - "I": { - "direction": "input", - "bits": [ 5 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 6 ] - }, - "T": { - "direction": "input", - "bits": [ 7 ] - } - }, - "cells": { - }, - "netnames": { - "DCITERMDISABLE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4061" - } - }, - "I": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4062" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4063" - } - }, - "IO": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4060" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4058" - } - }, - "T": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4064" - } - } - } - }, - "IOBUF_INTERMDISABLE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4067" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "IO": { - "direction": "inout", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - }, - "IBUFDISABLE": { - "direction": "input", - "bits": [ 5 ] - }, - "INTERMDISABLE": { - "direction": "input", - "bits": [ 6 ] - }, - "T": { - "direction": "input", - "bits": [ 7 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4077" - } - }, - "IBUFDISABLE": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4078" - } - }, - "INTERMDISABLE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4079" - } - }, - "IO": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4076" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4074" - } - }, - "T": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4080" - } - } - } - }, - "ISERDESE2": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4191" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "Q1": { - "direction": "output", - "bits": [ 3 ] - }, - "Q2": { - "direction": "output", - "bits": [ 4 ] - }, - "Q3": { - "direction": "output", - "bits": [ 5 ] - }, - "Q4": { - "direction": "output", - "bits": [ 6 ] - }, - "Q5": { - "direction": "output", - "bits": [ 7 ] - }, - "Q6": { - "direction": "output", - "bits": [ 8 ] - }, - "Q7": { - "direction": "output", - "bits": [ 9 ] - }, - "Q8": { - "direction": "output", - "bits": [ 10 ] - }, - "SHIFTOUT1": { - "direction": "output", - "bits": [ 11 ] - }, - "SHIFTOUT2": { - "direction": "output", - "bits": [ 12 ] - }, - "BITSLIP": { - "direction": "input", - "bits": [ 13 ] - }, - "CE1": { - "direction": "input", - "bits": [ 14 ] - }, - "CE2": { - "direction": "input", - "bits": [ 15 ] - }, - "CLK": { - "direction": "input", - "bits": [ 16 ] - }, - "CLKB": { - "direction": "input", - "bits": [ 17 ] - }, - "CLKDIV": { - "direction": "input", - "bits": [ 18 ] - }, - "CLKDIVP": { - "direction": "input", - "bits": [ 19 ] - }, - "D": { - "direction": "input", - "bits": [ 20 ] - }, - "DDLY": { - "direction": "input", - "bits": [ 21 ] - }, - "DYNCLKDIVSEL": { - "direction": "input", - "bits": [ 22 ] - }, - "DYNCLKSEL": { - "direction": "input", - "bits": [ 23 ] - }, - "OCLK": { - "direction": "input", - "bits": [ 24 ] - }, - "OCLKB": { - "direction": "input", - "bits": [ 25 ] - }, - "OFB": { - "direction": "input", - "bits": [ 26 ] - }, - "RST": { - "direction": "input", - "bits": [ 27 ] - }, - "SHIFTIN1": { - "direction": "input", - "bits": [ 28 ] - }, - "SHIFTIN2": { - "direction": "input", - "bits": [ 29 ] - } - }, - "cells": { - }, - "netnames": { - "BITSLIP": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4227" - } - }, - "CE1": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4228" - } - }, - "CE2": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4229" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4232" - } - }, - "CLKB": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLKB_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4235" - } - }, - "CLKDIV": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLKDIV_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4238" - } - }, - "CLKDIVP": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLKDIVP_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4241" - } - }, - "D": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "invertible_pin": "IS_D_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4243" - } - }, - "DDLY": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4244" - } - }, - "DYNCLKDIVSEL": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4245" - } - }, - "DYNCLKSEL": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4246" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4216" - } - }, - "OCLK": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_OCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4249" - } - }, - "OCLKB": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_OCLKB_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4252" - } - }, - "OFB": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4253" - } - }, - "Q1": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4217" - } - }, - "Q2": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4218" - } - }, - "Q3": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4219" - } - }, - "Q4": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4220" - } - }, - "Q5": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4221" - } - }, - "Q6": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4222" - } - }, - "Q7": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4223" - } - }, - "Q8": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4224" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4254" - } - }, - "SHIFTIN1": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4255" - } - }, - "SHIFTIN2": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4256" - } - }, - "SHIFTOUT1": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4225" - } - }, - "SHIFTOUT2": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4226" - } - } - } - }, - "KEEPER": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4259" - }, - "ports": { - "O": { - "direction": "inout", - "bits": [ 2 ] - } - }, - "cells": { - }, - "netnames": { - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4260" - } - } - } - }, - "LDCE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:398" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "CLR": { - "direction": "input", - "bits": [ 3 ] - }, - "D": { - "direction": "input", - "bits": [ 4 ] - }, - "G": { - "direction": "input", - "bits": [ 5 ] - }, - "GE": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "CLR": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "invertible_pin": "IS_CLR_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:401" - } - }, - "D": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:402" - } - }, - "G": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_G_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:404" - } - }, - "GE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:405" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:399" - } - } - } - }, - "LDPE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:420" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "D": { - "direction": "input", - "bits": [ 3 ] - }, - "G": { - "direction": "input", - "bits": [ 4 ] - }, - "GE": { - "direction": "input", - "bits": [ 5 ] - }, - "PRE": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "D": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:422" - } - }, - "G": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "invertible_pin": "IS_G_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:424" - } - }, - "GE": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:425" - } - }, - "PRE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "invertible_pin": "IS_PRE_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:427" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:421" - } - } - } - }, - "LUT1": { - "attributes": { - "blackbox": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:133" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:133" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:133" - } - } - } - }, - "LUT2": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:138" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:138" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:138" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:138" - } - } - } - }, - "LUT3": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "I2": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" - } - }, - "I2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:144" - } - } - } - }, - "LUT4": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "I2": { - "direction": "input", - "bits": [ 5 ] - }, - "I3": { - "direction": "input", - "bits": [ 6 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" - } - }, - "I2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" - } - }, - "I3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:151" - } - } - } - }, - "LUT5": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "I2": { - "direction": "input", - "bits": [ 5 ] - }, - "I3": { - "direction": "input", - "bits": [ 6 ] - }, - "I4": { - "direction": "input", - "bits": [ 7 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" - } - }, - "I2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" - } - }, - "I3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" - } - }, - "I4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:159" - } - } - } - }, - "LUT6": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "I2": { - "direction": "input", - "bits": [ 5 ] - }, - "I3": { - "direction": "input", - "bits": [ 6 ] - }, - "I4": { - "direction": "input", - "bits": [ 7 ] - }, - "I5": { - "direction": "input", - "bits": [ 8 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" - } - }, - "I2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" - } - }, - "I3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" - } - }, - "I4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" - } - }, - "I5": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:168" - } - } - } - }, - "LUT6_2": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" - }, - "ports": { - "O6": { - "direction": "output", - "bits": [ 2 ] - }, - "O5": { - "direction": "output", - "bits": [ 3 ] - }, - "I0": { - "direction": "input", - "bits": [ 4 ] - }, - "I1": { - "direction": "input", - "bits": [ 5 ] - }, - "I2": { - "direction": "input", - "bits": [ 6 ] - }, - "I3": { - "direction": "input", - "bits": [ 7 ] - }, - "I4": { - "direction": "input", - "bits": [ 8 ] - }, - "I5": { - "direction": "input", - "bits": [ 9 ] - } - }, - "cells": { - }, - "netnames": { - "I0": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" - } - }, - "I2": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" - } - }, - "I3": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" - } - }, - "I4": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" - } - }, - "I5": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" - } - }, - "O5": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" - } - }, - "O6": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:178" - } - } - } - }, - "MMCME2_ADV": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3463" - }, - "ports": { - "CLKFBOUT": { - "direction": "output", - "bits": [ 2 ] - }, - "CLKFBOUTB": { - "direction": "output", - "bits": [ 3 ] - }, - "CLKFBSTOPPED": { - "direction": "output", - "bits": [ 4 ] - }, - "CLKINSTOPPED": { - "direction": "output", - "bits": [ 5 ] - }, - "CLKOUT0": { - "direction": "output", - "bits": [ 6 ] - }, - "CLKOUT0B": { - "direction": "output", - "bits": [ 7 ] - }, - "CLKOUT1": { - "direction": "output", - "bits": [ 8 ] - }, - "CLKOUT1B": { - "direction": "output", - "bits": [ 9 ] - }, - "CLKOUT2": { - "direction": "output", - "bits": [ 10 ] - }, - "CLKOUT2B": { - "direction": "output", - "bits": [ 11 ] - }, - "CLKOUT3": { - "direction": "output", - "bits": [ 12 ] - }, - "CLKOUT3B": { - "direction": "output", - "bits": [ 13 ] - }, - "CLKOUT4": { - "direction": "output", - "bits": [ 14 ] - }, - "CLKOUT5": { - "direction": "output", - "bits": [ 15 ] - }, - "CLKOUT6": { - "direction": "output", - "bits": [ 16 ] - }, - "DO": { - "direction": "output", - "bits": [ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 ] - }, - "DRDY": { - "direction": "output", - "bits": [ 33 ] - }, - "LOCKED": { - "direction": "output", - "bits": [ 34 ] - }, - "PSDONE": { - "direction": "output", - "bits": [ 35 ] - }, - "CLKFBIN": { - "direction": "input", - "bits": [ 36 ] - }, - "CLKIN1": { - "direction": "input", - "bits": [ 37 ] - }, - "CLKIN2": { - "direction": "input", - "bits": [ 38 ] - }, - "CLKINSEL": { - "direction": "input", - "bits": [ 39 ] - }, - "DADDR": { - "direction": "input", - "bits": [ 40, 41, 42, 43, 44, 45, 46 ] - }, - "DCLK": { - "direction": "input", - "bits": [ 47 ] - }, - "DEN": { - "direction": "input", - "bits": [ 48 ] - }, - "DI": { - "direction": "input", - "bits": [ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ] - }, - "DWE": { - "direction": "input", - "bits": [ 65 ] - }, - "PSCLK": { - "direction": "input", - "bits": [ 66 ] - }, - "PSEN": { - "direction": "input", - "bits": [ 67 ] - }, - "PSINCDEC": { - "direction": "input", - "bits": [ 68 ] - }, - "PWRDWN": { - "direction": "input", - "bits": [ 69 ] - }, - "RST": { - "direction": "input", - "bits": [ 70 ] - } - }, - "cells": { - }, - "netnames": { - "CLKFBIN": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3538" - } - }, - "CLKFBOUT": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3519" - } - }, - "CLKFBOUTB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3520" - } - }, - "CLKFBSTOPPED": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3521" - } - }, - "CLKIN1": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3539" - } - }, - "CLKIN2": { - "hide_name": 0, - "bits": [ 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3540" - } - }, - "CLKINSEL": { - "hide_name": 0, - "bits": [ 39 ], - "attributes": { - "invertible_pin": "IS_CLKINSEL_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3542" - } - }, - "CLKINSTOPPED": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3522" - } - }, - "CLKOUT0": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3523" - } - }, - "CLKOUT0B": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3524" - } - }, - "CLKOUT1": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3525" - } - }, - "CLKOUT1B": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3526" - } - }, - "CLKOUT2": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3527" - } - }, - "CLKOUT2B": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3528" - } - }, - "CLKOUT3": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3529" - } - }, - "CLKOUT3B": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3530" - } - }, - "CLKOUT4": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3531" - } - }, - "CLKOUT5": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3532" - } - }, - "CLKOUT6": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3533" - } - }, - "DADDR": { - "hide_name": 0, - "bits": [ 40, 41, 42, 43, 44, 45, 46 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3543" - } - }, - "DCLK": { - "hide_name": 0, - "bits": [ 47 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3544" - } - }, - "DEN": { - "hide_name": 0, - "bits": [ 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3545" - } - }, - "DI": { - "hide_name": 0, - "bits": [ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3546" - } - }, - "DO": { - "hide_name": 0, - "bits": [ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3534" - } - }, - "DRDY": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3535" - } - }, - "DWE": { - "hide_name": 0, - "bits": [ 65 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3547" - } - }, - "LOCKED": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3536" - } - }, - "PSCLK": { - "hide_name": 0, - "bits": [ 66 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3548" - } - }, - "PSDONE": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3537" - } - }, - "PSEN": { - "hide_name": 0, - "bits": [ 67 ], - "attributes": { - "invertible_pin": "IS_PSEN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3550" - } - }, - "PSINCDEC": { - "hide_name": 0, - "bits": [ 68 ], - "attributes": { - "invertible_pin": "IS_PSINCDEC_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3552" - } - }, - "PWRDWN": { - "hide_name": 0, - "bits": [ 69 ], - "attributes": { - "invertible_pin": "IS_PWRDWN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3554" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 70 ], - "attributes": { - "invertible_pin": "IS_RST_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3556" - } - } - } - }, - "MMCME2_BASE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3559" - }, - "ports": { - "CLKFBOUT": { - "direction": "output", - "bits": [ 2 ] - }, - "CLKFBOUTB": { - "direction": "output", - "bits": [ 3 ] - }, - "CLKOUT0": { - "direction": "output", - "bits": [ 4 ] - }, - "CLKOUT0B": { - "direction": "output", - "bits": [ 5 ] - }, - "CLKOUT1": { - "direction": "output", - "bits": [ 6 ] - }, - "CLKOUT1B": { - "direction": "output", - "bits": [ 7 ] - }, - "CLKOUT2": { - "direction": "output", - "bits": [ 8 ] - }, - "CLKOUT2B": { - "direction": "output", - "bits": [ 9 ] - }, - "CLKOUT3": { - "direction": "output", - "bits": [ 10 ] - }, - "CLKOUT3B": { - "direction": "output", - "bits": [ 11 ] - }, - "CLKOUT4": { - "direction": "output", - "bits": [ 12 ] - }, - "CLKOUT5": { - "direction": "output", - "bits": [ 13 ] - }, - "CLKOUT6": { - "direction": "output", - "bits": [ 14 ] - }, - "LOCKED": { - "direction": "output", - "bits": [ 15 ] - }, - "CLKFBIN": { - "direction": "input", - "bits": [ 16 ] - }, - "CLKIN1": { - "direction": "input", - "bits": [ 17 ] - }, - "PWRDWN": { - "direction": "input", - "bits": [ 18 ] - }, - "RST": { - "direction": "input", - "bits": [ 19 ] - } - }, - "cells": { - }, - "netnames": { - "CLKFBIN": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3603" - } - }, - "CLKFBOUT": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3589" - } - }, - "CLKFBOUTB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3590" - } - }, - "CLKIN1": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3604" - } - }, - "CLKOUT0": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3591" - } - }, - "CLKOUT0B": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3592" - } - }, - "CLKOUT1": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3593" - } - }, - "CLKOUT1B": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3594" - } - }, - "CLKOUT2": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3595" - } - }, - "CLKOUT2B": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3596" - } - }, - "CLKOUT3": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3597" - } - }, - "CLKOUT3B": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3598" - } - }, - "CLKOUT4": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3599" - } - }, - "CLKOUT5": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3600" - } - }, - "CLKOUT6": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3601" - } - }, - "LOCKED": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3602" - } - }, - "PWRDWN": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3605" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3606" - } - } - } - }, - "MUXCY": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "CI": { - "direction": "input", - "bits": [ 3 ] - }, - "DI": { - "direction": "input", - "bits": [ 4 ] - }, - "S": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "CI": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" - } - }, - "DI": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" - } - }, - "S": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:194" - } - } - } - }, - "MUXF7": { - "attributes": { - "abc9_box_id": 1, - "whitebox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "S": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:200$5": { - "hide_name": 1, - "type": "$mux", - "parameters": { - "WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:200" - }, - "port_directions": { - "A": "input", - "B": "input", - "S": "input", - "Y": "output" - }, - "connections": { - "A": [ 3 ], - "B": [ 4 ], - "S": [ 5 ], - "Y": [ 2 ] - } - } - }, - "netnames": { - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:200$5_Y": { - "hide_name": 1, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:200" - } - }, - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" - } - }, - "S": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:199" - } - } - } - }, - "MUXF8": { - "attributes": { - "abc9_box_id": 2, - "whitebox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I0": { - "direction": "input", - "bits": [ 3 ] - }, - "I1": { - "direction": "input", - "bits": [ 4 ] - }, - "S": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:205$6": { - "hide_name": 1, - "type": "$mux", - "parameters": { - "WIDTH": 1 - }, - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:205" - }, - "port_directions": { - "A": "input", - "B": "input", - "S": "input", - "Y": "output" - }, - "connections": { - "A": [ 3 ], - "B": [ 4 ], - "S": [ 5 ], - "Y": [ 2 ] - } - } - }, - "netnames": { - "$ternary$/usr/local/bin/../share/yosys/xilinx/cells_sim.v:205$6_Y": { - "hide_name": 1, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:205" - } - }, - "I0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" - } - }, - "I1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" - } - }, - "S": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:204" - } - } - } - }, - "OBUF": { - "attributes": { - "blackbox": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:52" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:55" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:54" - } - } - } - }, - "OBUFDS": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4263" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "OB": { - "direction": "output", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4271" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4268" - } - }, - "OB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4270" - } - } - } - }, - "OBUFT": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4274" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "I": { - "direction": "input", - "bits": [ 3 ] - }, - "T": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4281" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4280" - } - }, - "T": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4282" - } - } - } - }, - "OBUFTDS": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4285" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "OB": { - "direction": "output", - "bits": [ 3 ] - }, - "I": { - "direction": "input", - "bits": [ 4 ] - }, - "T": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "I": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4293" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4290" - } - }, - "OB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "iopad_external_pin": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4292" - } - }, - "T": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4294" - } - } - } - }, - "ODDR": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5054" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "C": { - "direction": "input", - "bits": [ 3 ] - }, - "CE": { - "direction": "input", - "bits": [ 4 ] - }, - "D1": { - "direction": "input", - "bits": [ 5 ] - }, - "D2": { - "direction": "input", - "bits": [ 6 ] - }, - "R": { - "direction": "input", - "bits": [ 7 ] - }, - "S": { - "direction": "input", - "bits": [ 8 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_C_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5066" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5067" - } - }, - "D1": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_D1_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5069" - } - }, - "D2": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "invertible_pin": "IS_D2_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5071" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5063" - } - }, - "R": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5072" - } - }, - "S": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5073" - } - } - } - }, - "ODELAYE2": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4297" - }, - "ports": { - "CNTVALUEOUT": { - "direction": "output", - "bits": [ 2, 3, 4, 5, 6 ] - }, - "DATAOUT": { - "direction": "output", - "bits": [ 7 ] - }, - "C": { - "direction": "input", - "bits": [ 8 ] - }, - "CE": { - "direction": "input", - "bits": [ 9 ] - }, - "CINVCTRL": { - "direction": "input", - "bits": [ 10 ] - }, - "CLKIN": { - "direction": "input", - "bits": [ 11 ] - }, - "CNTVALUEIN": { - "direction": "input", - "bits": [ 12, 13, 14, 15, 16 ] - }, - "INC": { - "direction": "input", - "bits": [ 17 ] - }, - "LD": { - "direction": "input", - "bits": [ 18 ] - }, - "LDPIPEEN": { - "direction": "input", - "bits": [ 19 ] - }, - "ODATAIN": { - "direction": "input", - "bits": [ 20 ] - }, - "REGRST": { - "direction": "input", - "bits": [ 21 ] - } - }, - "cells": { - }, - "netnames": { - "C": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_C_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4313" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4314" - } - }, - "CINVCTRL": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4315" - } - }, - "CLKIN": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4316" - } - }, - "CNTVALUEIN": { - "hide_name": 0, - "bits": [ 12, 13, 14, 15, 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4317" - } - }, - "CNTVALUEOUT": { - "hide_name": 0, - "bits": [ 2, 3, 4, 5, 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4309" - } - }, - "DATAOUT": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4310" - } - }, - "INC": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4318" - } - }, - "LD": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4319" - } - }, - "LDPIPEEN": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4320" - } - }, - "ODATAIN": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "invertible_pin": "IS_ODATAIN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4322" - } - }, - "REGRST": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4323" - } - } - } - }, - "OSERDESE2": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4326" - }, - "ports": { - "OFB": { - "direction": "output", - "bits": [ 2 ] - }, - "OQ": { - "direction": "output", - "bits": [ 3 ] - }, - "SHIFTOUT1": { - "direction": "output", - "bits": [ 4 ] - }, - "SHIFTOUT2": { - "direction": "output", - "bits": [ 5 ] - }, - "TBYTEOUT": { - "direction": "output", - "bits": [ 6 ] - }, - "TFB": { - "direction": "output", - "bits": [ 7 ] - }, - "TQ": { - "direction": "output", - "bits": [ 8 ] - }, - "CLK": { - "direction": "input", - "bits": [ 9 ] - }, - "CLKDIV": { - "direction": "input", - "bits": [ 10 ] - }, - "D1": { - "direction": "input", - "bits": [ 11 ] - }, - "D2": { - "direction": "input", - "bits": [ 12 ] - }, - "D3": { - "direction": "input", - "bits": [ 13 ] - }, - "D4": { - "direction": "input", - "bits": [ 14 ] - }, - "D5": { - "direction": "input", - "bits": [ 15 ] - }, - "D6": { - "direction": "input", - "bits": [ 16 ] - }, - "D7": { - "direction": "input", - "bits": [ 17 ] - }, - "D8": { - "direction": "input", - "bits": [ 18 ] - }, - "OCE": { - "direction": "input", - "bits": [ 19 ] - }, - "RST": { - "direction": "input", - "bits": [ 20 ] - }, - "SHIFTIN1": { - "direction": "input", - "bits": [ 21 ] - }, - "SHIFTIN2": { - "direction": "input", - "bits": [ 22 ] - }, - "T1": { - "direction": "input", - "bits": [ 23 ] - }, - "T2": { - "direction": "input", - "bits": [ 24 ] - }, - "T3": { - "direction": "input", - "bits": [ 25 ] - }, - "T4": { - "direction": "input", - "bits": [ 26 ] - }, - "TBYTEIN": { - "direction": "input", - "bits": [ 27 ] - }, - "TCE": { - "direction": "input", - "bits": [ 28 ] - } - }, - "cells": { - }, - "netnames": { - "CLK": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4361" - } - }, - "CLKDIV": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLKDIV_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4364" - } - }, - "D1": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "invertible_pin": "IS_D1_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4366" - } - }, - "D2": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "invertible_pin": "IS_D2_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4368" - } - }, - "D3": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "invertible_pin": "IS_D3_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4370" - } - }, - "D4": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "invertible_pin": "IS_D4_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4372" - } - }, - "D5": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "invertible_pin": "IS_D5_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4374" - } - }, - "D6": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "invertible_pin": "IS_D6_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4376" - } - }, - "D7": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "invertible_pin": "IS_D7_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4378" - } - }, - "D8": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "invertible_pin": "IS_D8_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4380" - } - }, - "OCE": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4381" - } - }, - "OFB": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4352" - } - }, - "OQ": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4353" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4382" - } - }, - "SHIFTIN1": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4383" - } - }, - "SHIFTIN2": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4384" - } - }, - "SHIFTOUT1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4354" - } - }, - "SHIFTOUT2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4355" - } - }, - "T1": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "invertible_pin": "IS_T1_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4386" - } - }, - "T2": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "invertible_pin": "IS_T2_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4388" - } - }, - "T3": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "invertible_pin": "IS_T3_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4390" - } - }, - "T4": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "invertible_pin": "IS_T4_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4392" - } - }, - "TBYTEIN": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4393" - } - }, - "TBYTEOUT": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4356" - } - }, - "TCE": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4394" - } - }, - "TFB": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4357" - } - }, - "TQ": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4358" - } - } - } - }, - "OUT_FIFO": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4397" - }, - "ports": { - "ALMOSTEMPTY": { - "direction": "output", - "bits": [ 2 ] - }, - "ALMOSTFULL": { - "direction": "output", - "bits": [ 3 ] - }, - "EMPTY": { - "direction": "output", - "bits": [ 4 ] - }, - "FULL": { - "direction": "output", - "bits": [ 5 ] - }, - "Q0": { - "direction": "output", - "bits": [ 6, 7, 8, 9 ] - }, - "Q1": { - "direction": "output", - "bits": [ 10, 11, 12, 13 ] - }, - "Q2": { - "direction": "output", - "bits": [ 14, 15, 16, 17 ] - }, - "Q3": { - "direction": "output", - "bits": [ 18, 19, 20, 21 ] - }, - "Q4": { - "direction": "output", - "bits": [ 22, 23, 24, 25 ] - }, - "Q7": { - "direction": "output", - "bits": [ 26, 27, 28, 29 ] - }, - "Q8": { - "direction": "output", - "bits": [ 30, 31, 32, 33 ] - }, - "Q9": { - "direction": "output", - "bits": [ 34, 35, 36, 37 ] - }, - "Q5": { - "direction": "output", - "bits": [ 38, 39, 40, 41, 42, 43, 44, 45 ] - }, - "Q6": { - "direction": "output", - "bits": [ 46, 47, 48, 49, 50, 51, 52, 53 ] - }, - "RDCLK": { - "direction": "input", - "bits": [ 54 ] - }, - "RDEN": { - "direction": "input", - "bits": [ 55 ] - }, - "RESET": { - "direction": "input", - "bits": [ 56 ] - }, - "WRCLK": { - "direction": "input", - "bits": [ 57 ] - }, - "WREN": { - "direction": "input", - "bits": [ 58 ] - }, - "D0": { - "direction": "input", - "bits": [ 59, 60, 61, 62, 63, 64, 65, 66 ] - }, - "D1": { - "direction": "input", - "bits": [ 67, 68, 69, 70, 71, 72, 73, 74 ] - }, - "D2": { - "direction": "input", - "bits": [ 75, 76, 77, 78, 79, 80, 81, 82 ] - }, - "D3": { - "direction": "input", - "bits": [ 83, 84, 85, 86, 87, 88, 89, 90 ] - }, - "D4": { - "direction": "input", - "bits": [ 91, 92, 93, 94, 95, 96, 97, 98 ] - }, - "D5": { - "direction": "input", - "bits": [ 99, 100, 101, 102, 103, 104, 105, 106 ] - }, - "D6": { - "direction": "input", - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114 ] - }, - "D7": { - "direction": "input", - "bits": [ 115, 116, 117, 118, 119, 120, 121, 122 ] - }, - "D8": { - "direction": "input", - "bits": [ 123, 124, 125, 126, 127, 128, 129, 130 ] - }, - "D9": { - "direction": "input", - "bits": [ 131, 132, 133, 134, 135, 136, 137, 138 ] - } - }, - "cells": { - }, - "netnames": { - "ALMOSTEMPTY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4403" - } - }, - "ALMOSTFULL": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4404" - } - }, - "D0": { - "hide_name": 0, - "bits": [ 59, 60, 61, 62, 63, 64, 65, 66 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4424" - } - }, - "D1": { - "hide_name": 0, - "bits": [ 67, 68, 69, 70, 71, 72, 73, 74 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4425" - } - }, - "D2": { - "hide_name": 0, - "bits": [ 75, 76, 77, 78, 79, 80, 81, 82 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4426" - } - }, - "D3": { - "hide_name": 0, - "bits": [ 83, 84, 85, 86, 87, 88, 89, 90 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4427" - } - }, - "D4": { - "hide_name": 0, - "bits": [ 91, 92, 93, 94, 95, 96, 97, 98 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4428" - } - }, - "D5": { - "hide_name": 0, - "bits": [ 99, 100, 101, 102, 103, 104, 105, 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4429" - } - }, - "D6": { - "hide_name": 0, - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4430" - } - }, - "D7": { - "hide_name": 0, - "bits": [ 115, 116, 117, 118, 119, 120, 121, 122 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4431" - } - }, - "D8": { - "hide_name": 0, - "bits": [ 123, 124, 125, 126, 127, 128, 129, 130 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4432" - } - }, - "D9": { - "hide_name": 0, - "bits": [ 131, 132, 133, 134, 135, 136, 137, 138 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4433" - } - }, - "EMPTY": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4405" - } - }, - "FULL": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4406" - } - }, - "Q0": { - "hide_name": 0, - "bits": [ 6, 7, 8, 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4407" - } - }, - "Q1": { - "hide_name": 0, - "bits": [ 10, 11, 12, 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4408" - } - }, - "Q2": { - "hide_name": 0, - "bits": [ 14, 15, 16, 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4409" - } - }, - "Q3": { - "hide_name": 0, - "bits": [ 18, 19, 20, 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4410" - } - }, - "Q4": { - "hide_name": 0, - "bits": [ 22, 23, 24, 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4411" - } - }, - "Q5": { - "hide_name": 0, - "bits": [ 38, 39, 40, 41, 42, 43, 44, 45 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4415" - } - }, - "Q6": { - "hide_name": 0, - "bits": [ 46, 47, 48, 49, 50, 51, 52, 53 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4416" - } - }, - "Q7": { - "hide_name": 0, - "bits": [ 26, 27, 28, 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4412" - } - }, - "Q8": { - "hide_name": 0, - "bits": [ 30, 31, 32, 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4413" - } - }, - "Q9": { - "hide_name": 0, - "bits": [ 34, 35, 36, 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4414" - } - }, - "RDCLK": { - "hide_name": 0, - "bits": [ 54 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4418" - } - }, - "RDEN": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4419" - } - }, - "RESET": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4420" - } - }, - "WRCLK": { - "hide_name": 0, - "bits": [ 57 ], - "attributes": { - "clkbuf_sink": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4422" - } - }, - "WREN": { - "hide_name": 0, - "bits": [ 58 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4423" - } - } - } - }, - "PCIE_2_1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1713" - }, - "ports": { - "CFGAERECRCCHECKEN": { - "direction": "output", - "bits": [ 2 ] - }, - "CFGAERECRCGENEN": { - "direction": "output", - "bits": [ 3 ] - }, - "CFGAERROOTERRCORRERRRECEIVED": { - "direction": "output", - "bits": [ 4 ] - }, - "CFGAERROOTERRCORRERRREPORTINGEN": { - "direction": "output", - "bits": [ 5 ] - }, - "CFGAERROOTERRFATALERRRECEIVED": { - "direction": "output", - "bits": [ 6 ] - }, - "CFGAERROOTERRFATALERRREPORTINGEN": { - "direction": "output", - "bits": [ 7 ] - }, - "CFGAERROOTERRNONFATALERRRECEIVED": { - "direction": "output", - "bits": [ 8 ] - }, - "CFGAERROOTERRNONFATALERRREPORTINGEN": { - "direction": "output", - "bits": [ 9 ] - }, - "CFGBRIDGESERREN": { - "direction": "output", - "bits": [ 10 ] - }, - "CFGCOMMANDBUSMASTERENABLE": { - "direction": "output", - "bits": [ 11 ] - }, - "CFGCOMMANDINTERRUPTDISABLE": { - "direction": "output", - "bits": [ 12 ] - }, - "CFGCOMMANDIOENABLE": { - "direction": "output", - "bits": [ 13 ] - }, - "CFGCOMMANDMEMENABLE": { - "direction": "output", - "bits": [ 14 ] - }, - "CFGCOMMANDSERREN": { - "direction": "output", - "bits": [ 15 ] - }, - "CFGDEVCONTROL2ARIFORWARDEN": { - "direction": "output", - "bits": [ 16 ] - }, - "CFGDEVCONTROL2ATOMICEGRESSBLOCK": { - "direction": "output", - "bits": [ 17 ] - }, - "CFGDEVCONTROL2ATOMICREQUESTEREN": { - "direction": "output", - "bits": [ 18 ] - }, - "CFGDEVCONTROL2CPLTIMEOUTDIS": { - "direction": "output", - "bits": [ 19 ] - }, - "CFGDEVCONTROL2IDOCPLEN": { - "direction": "output", - "bits": [ 20 ] - }, - "CFGDEVCONTROL2IDOREQEN": { - "direction": "output", - "bits": [ 21 ] - }, - "CFGDEVCONTROL2LTREN": { - "direction": "output", - "bits": [ 22 ] - }, - "CFGDEVCONTROL2TLPPREFIXBLOCK": { - "direction": "output", - "bits": [ 23 ] - }, - "CFGDEVCONTROLAUXPOWEREN": { - "direction": "output", - "bits": [ 24 ] - }, - "CFGDEVCONTROLCORRERRREPORTINGEN": { - "direction": "output", - "bits": [ 25 ] - }, - "CFGDEVCONTROLENABLERO": { - "direction": "output", - "bits": [ 26 ] - }, - "CFGDEVCONTROLEXTTAGEN": { - "direction": "output", - "bits": [ 27 ] - }, - "CFGDEVCONTROLFATALERRREPORTINGEN": { - "direction": "output", - "bits": [ 28 ] - }, - "CFGDEVCONTROLNONFATALREPORTINGEN": { - "direction": "output", - "bits": [ 29 ] - }, - "CFGDEVCONTROLNOSNOOPEN": { - "direction": "output", - "bits": [ 30 ] - }, - "CFGDEVCONTROLPHANTOMEN": { - "direction": "output", - "bits": [ 31 ] - }, - "CFGDEVCONTROLURERRREPORTINGEN": { - "direction": "output", - "bits": [ 32 ] - }, - "CFGDEVSTATUSCORRERRDETECTED": { - "direction": "output", - "bits": [ 33 ] - }, - "CFGDEVSTATUSFATALERRDETECTED": { - "direction": "output", - "bits": [ 34 ] - }, - "CFGDEVSTATUSNONFATALERRDETECTED": { - "direction": "output", - "bits": [ 35 ] - }, - "CFGDEVSTATUSURDETECTED": { - "direction": "output", - "bits": [ 36 ] - }, - "CFGERRAERHEADERLOGSETN": { - "direction": "output", - "bits": [ 37 ] - }, - "CFGERRCPLRDYN": { - "direction": "output", - "bits": [ 38 ] - }, - "CFGINTERRUPTMSIENABLE": { - "direction": "output", - "bits": [ 39 ] - }, - "CFGINTERRUPTMSIXENABLE": { - "direction": "output", - "bits": [ 40 ] - }, - "CFGINTERRUPTMSIXFM": { - "direction": "output", - "bits": [ 41 ] - }, - "CFGINTERRUPTRDYN": { - "direction": "output", - "bits": [ 42 ] - }, - "CFGLINKCONTROLAUTOBANDWIDTHINTEN": { - "direction": "output", - "bits": [ 43 ] - }, - "CFGLINKCONTROLBANDWIDTHINTEN": { - "direction": "output", - "bits": [ 44 ] - }, - "CFGLINKCONTROLCLOCKPMEN": { - "direction": "output", - "bits": [ 45 ] - }, - "CFGLINKCONTROLCOMMONCLOCK": { - "direction": "output", - "bits": [ 46 ] - }, - "CFGLINKCONTROLEXTENDEDSYNC": { - "direction": "output", - "bits": [ 47 ] - }, - "CFGLINKCONTROLHWAUTOWIDTHDIS": { - "direction": "output", - "bits": [ 48 ] - }, - "CFGLINKCONTROLLINKDISABLE": { - "direction": "output", - "bits": [ 49 ] - }, - "CFGLINKCONTROLRCB": { - "direction": "output", - "bits": [ 50 ] - }, - "CFGLINKCONTROLRETRAINLINK": { - "direction": "output", - "bits": [ 51 ] - }, - "CFGLINKSTATUSAUTOBANDWIDTHSTATUS": { - "direction": "output", - "bits": [ 52 ] - }, - "CFGLINKSTATUSBANDWIDTHSTATUS": { - "direction": "output", - "bits": [ 53 ] - }, - "CFGLINKSTATUSDLLACTIVE": { - "direction": "output", - "bits": [ 54 ] - }, - "CFGLINKSTATUSLINKTRAINING": { - "direction": "output", - "bits": [ 55 ] - }, - "CFGMGMTRDWRDONEN": { - "direction": "output", - "bits": [ 56 ] - }, - "CFGMSGRECEIVED": { - "direction": "output", - "bits": [ 57 ] - }, - "CFGMSGRECEIVEDASSERTINTA": { - "direction": "output", - "bits": [ 58 ] - }, - "CFGMSGRECEIVEDASSERTINTB": { - "direction": "output", - "bits": [ 59 ] - }, - "CFGMSGRECEIVEDASSERTINTC": { - "direction": "output", - "bits": [ 60 ] - }, - "CFGMSGRECEIVEDASSERTINTD": { - "direction": "output", - "bits": [ 61 ] - }, - "CFGMSGRECEIVEDDEASSERTINTA": { - "direction": "output", - "bits": [ 62 ] - }, - "CFGMSGRECEIVEDDEASSERTINTB": { - "direction": "output", - "bits": [ 63 ] - }, - "CFGMSGRECEIVEDDEASSERTINTC": { - "direction": "output", - "bits": [ 64 ] - }, - "CFGMSGRECEIVEDDEASSERTINTD": { - "direction": "output", - "bits": [ 65 ] - }, - "CFGMSGRECEIVEDERRCOR": { - "direction": "output", - "bits": [ 66 ] - }, - "CFGMSGRECEIVEDERRFATAL": { - "direction": "output", - "bits": [ 67 ] - }, - "CFGMSGRECEIVEDERRNONFATAL": { - "direction": "output", - "bits": [ 68 ] - }, - "CFGMSGRECEIVEDPMASNAK": { - "direction": "output", - "bits": [ 69 ] - }, - "CFGMSGRECEIVEDPMETO": { - "direction": "output", - "bits": [ 70 ] - }, - "CFGMSGRECEIVEDPMETOACK": { - "direction": "output", - "bits": [ 71 ] - }, - "CFGMSGRECEIVEDPMPME": { - "direction": "output", - "bits": [ 72 ] - }, - "CFGMSGRECEIVEDSETSLOTPOWERLIMIT": { - "direction": "output", - "bits": [ 73 ] - }, - "CFGMSGRECEIVEDUNLOCK": { - "direction": "output", - "bits": [ 74 ] - }, - "CFGPMCSRPMEEN": { - "direction": "output", - "bits": [ 75 ] - }, - "CFGPMCSRPMESTATUS": { - "direction": "output", - "bits": [ 76 ] - }, - "CFGPMRCVASREQL1N": { - "direction": "output", - "bits": [ 77 ] - }, - "CFGPMRCVENTERL1N": { - "direction": "output", - "bits": [ 78 ] - }, - "CFGPMRCVENTERL23N": { - "direction": "output", - "bits": [ 79 ] - }, - "CFGPMRCVREQACKN": { - "direction": "output", - "bits": [ 80 ] - }, - "CFGROOTCONTROLPMEINTEN": { - "direction": "output", - "bits": [ 81 ] - }, - "CFGROOTCONTROLSYSERRCORRERREN": { - "direction": "output", - "bits": [ 82 ] - }, - "CFGROOTCONTROLSYSERRFATALERREN": { - "direction": "output", - "bits": [ 83 ] - }, - "CFGROOTCONTROLSYSERRNONFATALERREN": { - "direction": "output", - "bits": [ 84 ] - }, - "CFGSLOTCONTROLELECTROMECHILCTLPULSE": { - "direction": "output", - "bits": [ 85 ] - }, - "CFGTRANSACTION": { - "direction": "output", - "bits": [ 86 ] - }, - "CFGTRANSACTIONTYPE": { - "direction": "output", - "bits": [ 87 ] - }, - "DBGSCLRA": { - "direction": "output", - "bits": [ 88 ] - }, - "DBGSCLRB": { - "direction": "output", - "bits": [ 89 ] - }, - "DBGSCLRC": { - "direction": "output", - "bits": [ 90 ] - }, - "DBGSCLRD": { - "direction": "output", - "bits": [ 91 ] - }, - "DBGSCLRE": { - "direction": "output", - "bits": [ 92 ] - }, - "DBGSCLRF": { - "direction": "output", - "bits": [ 93 ] - }, - "DBGSCLRG": { - "direction": "output", - "bits": [ 94 ] - }, - "DBGSCLRH": { - "direction": "output", - "bits": [ 95 ] - }, - "DBGSCLRI": { - "direction": "output", - "bits": [ 96 ] - }, - "DBGSCLRJ": { - "direction": "output", - "bits": [ 97 ] - }, - "DBGSCLRK": { - "direction": "output", - "bits": [ 98 ] - }, - "DRPRDY": { - "direction": "output", - "bits": [ 99 ] - }, - "LL2BADDLLPERR": { - "direction": "output", - "bits": [ 100 ] - }, - "LL2BADTLPERR": { - "direction": "output", - "bits": [ 101 ] - }, - "LL2PROTOCOLERR": { - "direction": "output", - "bits": [ 102 ] - }, - "LL2RECEIVERERR": { - "direction": "output", - "bits": [ 103 ] - }, - "LL2REPLAYROERR": { - "direction": "output", - "bits": [ 104 ] - }, - "LL2REPLAYTOERR": { - "direction": "output", - "bits": [ 105 ] - }, - "LL2SUSPENDOK": { - "direction": "output", - "bits": [ 106 ] - }, - "LL2TFCINIT1SEQ": { - "direction": "output", - "bits": [ 107 ] - }, - "LL2TFCINIT2SEQ": { - "direction": "output", - "bits": [ 108 ] - }, - "LL2TXIDLE": { - "direction": "output", - "bits": [ 109 ] - }, - "LNKCLKEN": { - "direction": "output", - "bits": [ 110 ] - }, - "MIMRXREN": { - "direction": "output", - "bits": [ 111 ] - }, - "MIMRXWEN": { - "direction": "output", - "bits": [ 112 ] - }, - "MIMTXREN": { - "direction": "output", - "bits": [ 113 ] - }, - "MIMTXWEN": { - "direction": "output", - "bits": [ 114 ] - }, - "PIPERX0POLARITY": { - "direction": "output", - "bits": [ 115 ] - }, - "PIPERX1POLARITY": { - "direction": "output", - "bits": [ 116 ] - }, - "PIPERX2POLARITY": { - "direction": "output", - "bits": [ 117 ] - }, - "PIPERX3POLARITY": { - "direction": "output", - "bits": [ 118 ] - }, - "PIPERX4POLARITY": { - "direction": "output", - "bits": [ 119 ] - }, - "PIPERX5POLARITY": { - "direction": "output", - "bits": [ 120 ] - }, - "PIPERX6POLARITY": { - "direction": "output", - "bits": [ 121 ] - }, - "PIPERX7POLARITY": { - "direction": "output", - "bits": [ 122 ] - }, - "PIPETX0COMPLIANCE": { - "direction": "output", - "bits": [ 123 ] - }, - "PIPETX0ELECIDLE": { - "direction": "output", - "bits": [ 124 ] - }, - "PIPETX1COMPLIANCE": { - "direction": "output", - "bits": [ 125 ] - }, - "PIPETX1ELECIDLE": { - "direction": "output", - "bits": [ 126 ] - }, - "PIPETX2COMPLIANCE": { - "direction": "output", - "bits": [ 127 ] - }, - "PIPETX2ELECIDLE": { - "direction": "output", - "bits": [ 128 ] - }, - "PIPETX3COMPLIANCE": { - "direction": "output", - "bits": [ 129 ] - }, - "PIPETX3ELECIDLE": { - "direction": "output", - "bits": [ 130 ] - }, - "PIPETX4COMPLIANCE": { - "direction": "output", - "bits": [ 131 ] - }, - "PIPETX4ELECIDLE": { - "direction": "output", - "bits": [ 132 ] - }, - "PIPETX5COMPLIANCE": { - "direction": "output", - "bits": [ 133 ] - }, - "PIPETX5ELECIDLE": { - "direction": "output", - "bits": [ 134 ] - }, - "PIPETX6COMPLIANCE": { - "direction": "output", - "bits": [ 135 ] - }, - "PIPETX6ELECIDLE": { - "direction": "output", - "bits": [ 136 ] - }, - "PIPETX7COMPLIANCE": { - "direction": "output", - "bits": [ 137 ] - }, - "PIPETX7ELECIDLE": { - "direction": "output", - "bits": [ 138 ] - }, - "PIPETXDEEMPH": { - "direction": "output", - "bits": [ 139 ] - }, - "PIPETXRATE": { - "direction": "output", - "bits": [ 140 ] - }, - "PIPETXRCVRDET": { - "direction": "output", - "bits": [ 141 ] - }, - "PIPETXRESET": { - "direction": "output", - "bits": [ 142 ] - }, - "PL2L0REQ": { - "direction": "output", - "bits": [ 143 ] - }, - "PL2LINKUP": { - "direction": "output", - "bits": [ 144 ] - }, - "PL2RECEIVERERR": { - "direction": "output", - "bits": [ 145 ] - }, - "PL2RECOVERY": { - "direction": "output", - "bits": [ 146 ] - }, - "PL2RXELECIDLE": { - "direction": "output", - "bits": [ 147 ] - }, - "PL2SUSPENDOK": { - "direction": "output", - "bits": [ 148 ] - }, - "PLDIRECTEDCHANGEDONE": { - "direction": "output", - "bits": [ 149 ] - }, - "PLLINKGEN2CAP": { - "direction": "output", - "bits": [ 150 ] - }, - "PLLINKPARTNERGEN2SUPPORTED": { - "direction": "output", - "bits": [ 151 ] - }, - "PLLINKUPCFGCAP": { - "direction": "output", - "bits": [ 152 ] - }, - "PLPHYLNKUPN": { - "direction": "output", - "bits": [ 153 ] - }, - "PLRECEIVEDHOTRST": { - "direction": "output", - "bits": [ 154 ] - }, - "PLSELLNKRATE": { - "direction": "output", - "bits": [ 155 ] - }, - "RECEIVEDFUNCLVLRSTN": { - "direction": "output", - "bits": [ 156 ] - }, - "TL2ASPMSUSPENDCREDITCHECKOK": { - "direction": "output", - "bits": [ 157 ] - }, - "TL2ASPMSUSPENDREQ": { - "direction": "output", - "bits": [ 158 ] - }, - "TL2ERRFCPE": { - "direction": "output", - "bits": [ 159 ] - }, - "TL2ERRMALFORMED": { - "direction": "output", - "bits": [ 160 ] - }, - "TL2ERRRXOVERFLOW": { - "direction": "output", - "bits": [ 161 ] - }, - "TL2PPMSUSPENDOK": { - "direction": "output", - "bits": [ 162 ] - }, - "TRNLNKUP": { - "direction": "output", - "bits": [ 163 ] - }, - "TRNRECRCERR": { - "direction": "output", - "bits": [ 164 ] - }, - "TRNREOF": { - "direction": "output", - "bits": [ 165 ] - }, - "TRNRERRFWD": { - "direction": "output", - "bits": [ 166 ] - }, - "TRNRSOF": { - "direction": "output", - "bits": [ 167 ] - }, - "TRNRSRCDSC": { - "direction": "output", - "bits": [ 168 ] - }, - "TRNRSRCRDY": { - "direction": "output", - "bits": [ 169 ] - }, - "TRNTCFGREQ": { - "direction": "output", - "bits": [ 170 ] - }, - "TRNTDLLPDSTRDY": { - "direction": "output", - "bits": [ 171 ] - }, - "TRNTERRDROP": { - "direction": "output", - "bits": [ 172 ] - }, - "USERRSTN": { - "direction": "output", - "bits": [ 173 ] - }, - "DBGVECC": { - "direction": "output", - "bits": [ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ] - }, - "PLDBGVEC": { - "direction": "output", - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197 ] - }, - "TRNFCCPLD": { - "direction": "output", - "bits": [ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209 ] - }, - "TRNFCNPD": { - "direction": "output", - "bits": [ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221 ] - }, - "TRNFCPD": { - "direction": "output", - "bits": [ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233 ] - }, - "TRNRD": { - "direction": "output", - "bits": [ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361 ] - }, - "MIMRXRADDR": { - "direction": "output", - "bits": [ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374 ] - }, - "MIMRXWADDR": { - "direction": "output", - "bits": [ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387 ] - }, - "MIMTXRADDR": { - "direction": "output", - "bits": [ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400 ] - }, - "MIMTXWADDR": { - "direction": "output", - "bits": [ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413 ] - }, - "CFGMSGDATA": { - "direction": "output", - "bits": [ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429 ] - }, - "DRPDO": { - "direction": "output", - "bits": [ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445 ] - }, - "PIPETX0DATA": { - "direction": "output", - "bits": [ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461 ] - }, - "PIPETX1DATA": { - "direction": "output", - "bits": [ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477 ] - }, - "PIPETX2DATA": { - "direction": "output", - "bits": [ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493 ] - }, - "PIPETX3DATA": { - "direction": "output", - "bits": [ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509 ] - }, - "PIPETX4DATA": { - "direction": "output", - "bits": [ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525 ] - }, - "PIPETX5DATA": { - "direction": "output", - "bits": [ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541 ] - }, - "PIPETX6DATA": { - "direction": "output", - "bits": [ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557 ] - }, - "PIPETX7DATA": { - "direction": "output", - "bits": [ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573 ] - }, - "CFGLINKCONTROLASPMCONTROL": { - "direction": "output", - "bits": [ 574, 575 ] - }, - "CFGLINKSTATUSCURRENTSPEED": { - "direction": "output", - "bits": [ 576, 577 ] - }, - "CFGPMCSRPOWERSTATE": { - "direction": "output", - "bits": [ 578, 579 ] - }, - "PIPETX0CHARISK": { - "direction": "output", - "bits": [ 580, 581 ] - }, - "PIPETX0POWERDOWN": { - "direction": "output", - "bits": [ 582, 583 ] - }, - "PIPETX1CHARISK": { - "direction": "output", - "bits": [ 584, 585 ] - }, - "PIPETX1POWERDOWN": { - "direction": "output", - "bits": [ 586, 587 ] - }, - "PIPETX2CHARISK": { - "direction": "output", - "bits": [ 588, 589 ] - }, - "PIPETX2POWERDOWN": { - "direction": "output", - "bits": [ 590, 591 ] - }, - "PIPETX3CHARISK": { - "direction": "output", - "bits": [ 592, 593 ] - }, - "PIPETX3POWERDOWN": { - "direction": "output", - "bits": [ 594, 595 ] - }, - "PIPETX4CHARISK": { - "direction": "output", - "bits": [ 596, 597 ] - }, - "PIPETX4POWERDOWN": { - "direction": "output", - "bits": [ 598, 599 ] - }, - "PIPETX5CHARISK": { - "direction": "output", - "bits": [ 600, 601 ] - }, - "PIPETX5POWERDOWN": { - "direction": "output", - "bits": [ 602, 603 ] - }, - "PIPETX6CHARISK": { - "direction": "output", - "bits": [ 604, 605 ] - }, - "PIPETX6POWERDOWN": { - "direction": "output", - "bits": [ 606, 607 ] - }, - "PIPETX7CHARISK": { - "direction": "output", - "bits": [ 608, 609 ] - }, - "PIPETX7POWERDOWN": { - "direction": "output", - "bits": [ 610, 611 ] - }, - "PL2RXPMSTATE": { - "direction": "output", - "bits": [ 612, 613 ] - }, - "PLLANEREVERSALMODE": { - "direction": "output", - "bits": [ 614, 615 ] - }, - "PLRXPMSTATE": { - "direction": "output", - "bits": [ 616, 617 ] - }, - "PLSELLNKWIDTH": { - "direction": "output", - "bits": [ 618, 619 ] - }, - "TRNRDLLPSRCRDY": { - "direction": "output", - "bits": [ 620, 621 ] - }, - "TRNRREM": { - "direction": "output", - "bits": [ 622, 623 ] - }, - "CFGDEVCONTROLMAXPAYLOAD": { - "direction": "output", - "bits": [ 624, 625, 626 ] - }, - "CFGDEVCONTROLMAXREADREQ": { - "direction": "output", - "bits": [ 627, 628, 629 ] - }, - "CFGINTERRUPTMMENABLE": { - "direction": "output", - "bits": [ 630, 631, 632 ] - }, - "CFGPCIELINKSTATE": { - "direction": "output", - "bits": [ 633, 634, 635 ] - }, - "PIPETXMARGIN": { - "direction": "output", - "bits": [ 636, 637, 638 ] - }, - "PLINITIALLINKWIDTH": { - "direction": "output", - "bits": [ 639, 640, 641 ] - }, - "PLTXPMSTATE": { - "direction": "output", - "bits": [ 642, 643, 644 ] - }, - "CFGMGMTDO": { - "direction": "output", - "bits": [ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676 ] - }, - "CFGDEVCONTROL2CPLTIMEOUTVAL": { - "direction": "output", - "bits": [ 677, 678, 679, 680 ] - }, - "CFGLINKSTATUSNEGOTIATEDWIDTH": { - "direction": "output", - "bits": [ 681, 682, 683, 684 ] - }, - "TRNTDSTRDY": { - "direction": "output", - "bits": [ 685, 686, 687, 688 ] - }, - "LL2LINKSTATUS": { - "direction": "output", - "bits": [ 689, 690, 691, 692, 693 ] - }, - "PLLTSSMSTATE": { - "direction": "output", - "bits": [ 694, 695, 696, 697, 698, 699 ] - }, - "TRNTBUFAV": { - "direction": "output", - "bits": [ 700, 701, 702, 703, 704, 705 ] - }, - "DBGVECA": { - "direction": "output", - "bits": [ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769 ] - }, - "DBGVECB": { - "direction": "output", - "bits": [ 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833 ] - }, - "TL2ERRHDR": { - "direction": "output", - "bits": [ 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897 ] - }, - "TRNRDLLPDATA": { - "direction": "output", - "bits": [ 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961 ] - }, - "MIMRXWDATA": { - "direction": "output", - "bits": [ 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029 ] - }, - "MIMTXWDATA": { - "direction": "output", - "bits": [ 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098 ] - }, - "CFGTRANSACTIONADDR": { - "direction": "output", - "bits": [ 1099, 1100, 1101, 1102, 1103, 1104, 1105 ] - }, - "CFGVCTCVCMAP": { - "direction": "output", - "bits": [ 1106, 1107, 1108, 1109, 1110, 1111, 1112 ] - }, - "CFGINTERRUPTDO": { - "direction": "output", - "bits": [ 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120 ] - }, - "TRNFCCPLH": { - "direction": "output", - "bits": [ 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128 ] - }, - "TRNFCNPH": { - "direction": "output", - "bits": [ 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136 ] - }, - "TRNFCPH": { - "direction": "output", - "bits": [ 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144 ] - }, - "TRNRBARHIT": { - "direction": "output", - "bits": [ 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152 ] - }, - "CFGERRACSN": { - "direction": "input", - "bits": [ 1153 ] - }, - "CFGERRATOMICEGRESSBLOCKEDN": { - "direction": "input", - "bits": [ 1154 ] - }, - "CFGERRCORN": { - "direction": "input", - "bits": [ 1155 ] - }, - "CFGERRCPLABORTN": { - "direction": "input", - "bits": [ 1156 ] - }, - "CFGERRCPLTIMEOUTN": { - "direction": "input", - "bits": [ 1157 ] - }, - "CFGERRCPLUNEXPECTN": { - "direction": "input", - "bits": [ 1158 ] - }, - "CFGERRECRCN": { - "direction": "input", - "bits": [ 1159 ] - }, - "CFGERRINTERNALCORN": { - "direction": "input", - "bits": [ 1160 ] - }, - "CFGERRINTERNALUNCORN": { - "direction": "input", - "bits": [ 1161 ] - }, - "CFGERRLOCKEDN": { - "direction": "input", - "bits": [ 1162 ] - }, - "CFGERRMALFORMEDN": { - "direction": "input", - "bits": [ 1163 ] - }, - "CFGERRMCBLOCKEDN": { - "direction": "input", - "bits": [ 1164 ] - }, - "CFGERRNORECOVERYN": { - "direction": "input", - "bits": [ 1165 ] - }, - "CFGERRPOISONEDN": { - "direction": "input", - "bits": [ 1166 ] - }, - "CFGERRPOSTEDN": { - "direction": "input", - "bits": [ 1167 ] - }, - "CFGERRURN": { - "direction": "input", - "bits": [ 1168 ] - }, - "CFGFORCECOMMONCLOCKOFF": { - "direction": "input", - "bits": [ 1169 ] - }, - "CFGFORCEEXTENDEDSYNCON": { - "direction": "input", - "bits": [ 1170 ] - }, - "CFGINTERRUPTASSERTN": { - "direction": "input", - "bits": [ 1171 ] - }, - "CFGINTERRUPTN": { - "direction": "input", - "bits": [ 1172 ] - }, - "CFGINTERRUPTSTATN": { - "direction": "input", - "bits": [ 1173 ] - }, - "CFGMGMTRDENN": { - "direction": "input", - "bits": [ 1174 ] - }, - "CFGMGMTWRENN": { - "direction": "input", - "bits": [ 1175 ] - }, - "CFGMGMTWRREADONLYN": { - "direction": "input", - "bits": [ 1176 ] - }, - "CFGMGMTWRRW1CASRWN": { - "direction": "input", - "bits": [ 1177 ] - }, - "CFGPMFORCESTATEENN": { - "direction": "input", - "bits": [ 1178 ] - }, - "CFGPMHALTASPML0SN": { - "direction": "input", - "bits": [ 1179 ] - }, - "CFGPMHALTASPML1N": { - "direction": "input", - "bits": [ 1180 ] - }, - "CFGPMSENDPMETON": { - "direction": "input", - "bits": [ 1181 ] - }, - "CFGPMTURNOFFOKN": { - "direction": "input", - "bits": [ 1182 ] - }, - "CFGPMWAKEN": { - "direction": "input", - "bits": [ 1183 ] - }, - "CFGTRNPENDINGN": { - "direction": "input", - "bits": [ 1184 ] - }, - "CMRSTN": { - "direction": "input", - "bits": [ 1185 ] - }, - "CMSTICKYRSTN": { - "direction": "input", - "bits": [ 1186 ] - }, - "DBGSUBMODE": { - "direction": "input", - "bits": [ 1187 ] - }, - "DLRSTN": { - "direction": "input", - "bits": [ 1188 ] - }, - "DRPCLK": { - "direction": "input", - "bits": [ 1189 ] - }, - "DRPEN": { - "direction": "input", - "bits": [ 1190 ] - }, - "DRPWE": { - "direction": "input", - "bits": [ 1191 ] - }, - "FUNCLVLRSTN": { - "direction": "input", - "bits": [ 1192 ] - }, - "LL2SENDASREQL1": { - "direction": "input", - "bits": [ 1193 ] - }, - "LL2SENDENTERL1": { - "direction": "input", - "bits": [ 1194 ] - }, - "LL2SENDENTERL23": { - "direction": "input", - "bits": [ 1195 ] - }, - "LL2SENDPMACK": { - "direction": "input", - "bits": [ 1196 ] - }, - "LL2SUSPENDNOW": { - "direction": "input", - "bits": [ 1197 ] - }, - "LL2TLPRCV": { - "direction": "input", - "bits": [ 1198 ] - }, - "PIPECLK": { - "direction": "input", - "bits": [ 1199 ] - }, - "PIPERX0CHANISALIGNED": { - "direction": "input", - "bits": [ 1200 ] - }, - "PIPERX0ELECIDLE": { - "direction": "input", - "bits": [ 1201 ] - }, - "PIPERX0PHYSTATUS": { - "direction": "input", - "bits": [ 1202 ] - }, - "PIPERX0VALID": { - "direction": "input", - "bits": [ 1203 ] - }, - "PIPERX1CHANISALIGNED": { - "direction": "input", - "bits": [ 1204 ] - }, - "PIPERX1ELECIDLE": { - "direction": "input", - "bits": [ 1205 ] - }, - "PIPERX1PHYSTATUS": { - "direction": "input", - "bits": [ 1206 ] - }, - "PIPERX1VALID": { - "direction": "input", - "bits": [ 1207 ] - }, - "PIPERX2CHANISALIGNED": { - "direction": "input", - "bits": [ 1208 ] - }, - "PIPERX2ELECIDLE": { - "direction": "input", - "bits": [ 1209 ] - }, - "PIPERX2PHYSTATUS": { - "direction": "input", - "bits": [ 1210 ] - }, - "PIPERX2VALID": { - "direction": "input", - "bits": [ 1211 ] - }, - "PIPERX3CHANISALIGNED": { - "direction": "input", - "bits": [ 1212 ] - }, - "PIPERX3ELECIDLE": { - "direction": "input", - "bits": [ 1213 ] - }, - "PIPERX3PHYSTATUS": { - "direction": "input", - "bits": [ 1214 ] - }, - "PIPERX3VALID": { - "direction": "input", - "bits": [ 1215 ] - }, - "PIPERX4CHANISALIGNED": { - "direction": "input", - "bits": [ 1216 ] - }, - "PIPERX4ELECIDLE": { - "direction": "input", - "bits": [ 1217 ] - }, - "PIPERX4PHYSTATUS": { - "direction": "input", - "bits": [ 1218 ] - }, - "PIPERX4VALID": { - "direction": "input", - "bits": [ 1219 ] - }, - "PIPERX5CHANISALIGNED": { - "direction": "input", - "bits": [ 1220 ] - }, - "PIPERX5ELECIDLE": { - "direction": "input", - "bits": [ 1221 ] - }, - "PIPERX5PHYSTATUS": { - "direction": "input", - "bits": [ 1222 ] - }, - "PIPERX5VALID": { - "direction": "input", - "bits": [ 1223 ] - }, - "PIPERX6CHANISALIGNED": { - "direction": "input", - "bits": [ 1224 ] - }, - "PIPERX6ELECIDLE": { - "direction": "input", - "bits": [ 1225 ] - }, - "PIPERX6PHYSTATUS": { - "direction": "input", - "bits": [ 1226 ] - }, - "PIPERX6VALID": { - "direction": "input", - "bits": [ 1227 ] - }, - "PIPERX7CHANISALIGNED": { - "direction": "input", - "bits": [ 1228 ] - }, - "PIPERX7ELECIDLE": { - "direction": "input", - "bits": [ 1229 ] - }, - "PIPERX7PHYSTATUS": { - "direction": "input", - "bits": [ 1230 ] - }, - "PIPERX7VALID": { - "direction": "input", - "bits": [ 1231 ] - }, - "PLDIRECTEDLINKAUTON": { - "direction": "input", - "bits": [ 1232 ] - }, - "PLDIRECTEDLINKSPEED": { - "direction": "input", - "bits": [ 1233 ] - }, - "PLDIRECTEDLTSSMNEWVLD": { - "direction": "input", - "bits": [ 1234 ] - }, - "PLDIRECTEDLTSSMSTALL": { - "direction": "input", - "bits": [ 1235 ] - }, - "PLDOWNSTREAMDEEMPHSOURCE": { - "direction": "input", - "bits": [ 1236 ] - }, - "PLRSTN": { - "direction": "input", - "bits": [ 1237 ] - }, - "PLTRANSMITHOTRST": { - "direction": "input", - "bits": [ 1238 ] - }, - "PLUPSTREAMPREFERDEEMPH": { - "direction": "input", - "bits": [ 1239 ] - }, - "SYSRSTN": { - "direction": "input", - "bits": [ 1240 ] - }, - "TL2ASPMSUSPENDCREDITCHECK": { - "direction": "input", - "bits": [ 1241 ] - }, - "TL2PPMSUSPENDREQ": { - "direction": "input", - "bits": [ 1242 ] - }, - "TLRSTN": { - "direction": "input", - "bits": [ 1243 ] - }, - "TRNRDSTRDY": { - "direction": "input", - "bits": [ 1244 ] - }, - "TRNRFCPRET": { - "direction": "input", - "bits": [ 1245 ] - }, - "TRNRNPOK": { - "direction": "input", - "bits": [ 1246 ] - }, - "TRNRNPREQ": { - "direction": "input", - "bits": [ 1247 ] - }, - "TRNTCFGGNT": { - "direction": "input", - "bits": [ 1248 ] - }, - "TRNTDLLPSRCRDY": { - "direction": "input", - "bits": [ 1249 ] - }, - "TRNTECRCGEN": { - "direction": "input", - "bits": [ 1250 ] - }, - "TRNTEOF": { - "direction": "input", - "bits": [ 1251 ] - }, - "TRNTERRFWD": { - "direction": "input", - "bits": [ 1252 ] - }, - "TRNTSOF": { - "direction": "input", - "bits": [ 1253 ] - }, - "TRNTSRCDSC": { - "direction": "input", - "bits": [ 1254 ] - }, - "TRNTSRCRDY": { - "direction": "input", - "bits": [ 1255 ] - }, - "TRNTSTR": { - "direction": "input", - "bits": [ 1256 ] - }, - "USERCLK2": { - "direction": "input", - "bits": [ 1257 ] - }, - "USERCLK": { - "direction": "input", - "bits": [ 1258 ] - }, - "CFGERRAERHEADERLOG": { - "direction": "input", - "bits": [ 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386 ] - }, - "TRNTD": { - "direction": "input", - "bits": [ 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514 ] - }, - "CFGDEVID": { - "direction": "input", - "bits": [ 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530 ] - }, - "CFGSUBSYSID": { - "direction": "input", - "bits": [ 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546 ] - }, - "CFGSUBSYSVENDID": { - "direction": "input", - "bits": [ 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562 ] - }, - "CFGVENDID": { - "direction": "input", - "bits": [ 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578 ] - }, - "DRPDI": { - "direction": "input", - "bits": [ 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594 ] - }, - "PIPERX0DATA": { - "direction": "input", - "bits": [ 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610 ] - }, - "PIPERX1DATA": { - "direction": "input", - "bits": [ 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626 ] - }, - "PIPERX2DATA": { - "direction": "input", - "bits": [ 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642 ] - }, - "PIPERX3DATA": { - "direction": "input", - "bits": [ 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658 ] - }, - "PIPERX4DATA": { - "direction": "input", - "bits": [ 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674 ] - }, - "PIPERX5DATA": { - "direction": "input", - "bits": [ 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690 ] - }, - "PIPERX6DATA": { - "direction": "input", - "bits": [ 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706 ] - }, - "PIPERX7DATA": { - "direction": "input", - "bits": [ 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722 ] - }, - "CFGPMFORCESTATE": { - "direction": "input", - "bits": [ 1723, 1724 ] - }, - "DBGMODE": { - "direction": "input", - "bits": [ 1725, 1726 ] - }, - "PIPERX0CHARISK": { - "direction": "input", - "bits": [ 1727, 1728 ] - }, - "PIPERX1CHARISK": { - "direction": "input", - "bits": [ 1729, 1730 ] - }, - "PIPERX2CHARISK": { - "direction": "input", - "bits": [ 1731, 1732 ] - }, - "PIPERX3CHARISK": { - "direction": "input", - "bits": [ 1733, 1734 ] - }, - "PIPERX4CHARISK": { - "direction": "input", - "bits": [ 1735, 1736 ] - }, - "PIPERX5CHARISK": { - "direction": "input", - "bits": [ 1737, 1738 ] - }, - "PIPERX6CHARISK": { - "direction": "input", - "bits": [ 1739, 1740 ] - }, - "PIPERX7CHARISK": { - "direction": "input", - "bits": [ 1741, 1742 ] - }, - "PLDIRECTEDLINKCHANGE": { - "direction": "input", - "bits": [ 1743, 1744 ] - }, - "PLDIRECTEDLINKWIDTH": { - "direction": "input", - "bits": [ 1745, 1746 ] - }, - "TRNTREM": { - "direction": "input", - "bits": [ 1747, 1748 ] - }, - "CFGDSFUNCTIONNUMBER": { - "direction": "input", - "bits": [ 1749, 1750, 1751 ] - }, - "CFGFORCEMPS": { - "direction": "input", - "bits": [ 1752, 1753, 1754 ] - }, - "PIPERX0STATUS": { - "direction": "input", - "bits": [ 1755, 1756, 1757 ] - }, - "PIPERX1STATUS": { - "direction": "input", - "bits": [ 1758, 1759, 1760 ] - }, - "PIPERX2STATUS": { - "direction": "input", - "bits": [ 1761, 1762, 1763 ] - }, - "PIPERX3STATUS": { - "direction": "input", - "bits": [ 1764, 1765, 1766 ] - }, - "PIPERX4STATUS": { - "direction": "input", - "bits": [ 1767, 1768, 1769 ] - }, - "PIPERX5STATUS": { - "direction": "input", - "bits": [ 1770, 1771, 1772 ] - }, - "PIPERX6STATUS": { - "direction": "input", - "bits": [ 1773, 1774, 1775 ] - }, - "PIPERX7STATUS": { - "direction": "input", - "bits": [ 1776, 1777, 1778 ] - }, - "PLDBGMODE": { - "direction": "input", - "bits": [ 1779, 1780, 1781 ] - }, - "TRNFCSEL": { - "direction": "input", - "bits": [ 1782, 1783, 1784 ] - }, - "CFGMGMTDI": { - "direction": "input", - "bits": [ 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816 ] - }, - "TRNTDLLPDATA": { - "direction": "input", - "bits": [ 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848 ] - }, - "CFGMGMTBYTEENN": { - "direction": "input", - "bits": [ 1849, 1850, 1851, 1852 ] - }, - "CFGERRTLPCPLHEADER": { - "direction": "input", - "bits": [ 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900 ] - }, - "CFGAERINTERRUPTMSGNUM": { - "direction": "input", - "bits": [ 1901, 1902, 1903, 1904, 1905 ] - }, - "CFGDSDEVICENUMBER": { - "direction": "input", - "bits": [ 1906, 1907, 1908, 1909, 1910 ] - }, - "CFGPCIECAPINTERRUPTMSGNUM": { - "direction": "input", - "bits": [ 1911, 1912, 1913, 1914, 1915 ] - }, - "PL2DIRECTEDLSTATE": { - "direction": "input", - "bits": [ 1916, 1917, 1918, 1919, 1920 ] - }, - "PLDIRECTEDLTSSMNEW": { - "direction": "input", - "bits": [ 1921, 1922, 1923, 1924, 1925, 1926 ] - }, - "CFGDSN": { - "direction": "input", - "bits": [ 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990 ] - }, - "MIMRXRDATA": { - "direction": "input", - "bits": [ 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058 ] - }, - "MIMTXRDATA": { - "direction": "input", - "bits": [ 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127 ] - }, - "CFGDSBUSNUMBER": { - "direction": "input", - "bits": [ 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135 ] - }, - "CFGINTERRUPTDI": { - "direction": "input", - "bits": [ 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143 ] - }, - "CFGPORTNUMBER": { - "direction": "input", - "bits": [ 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151 ] - }, - "CFGREVID": { - "direction": "input", - "bits": [ 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159 ] - }, - "DRPADDR": { - "direction": "input", - "bits": [ 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168 ] - }, - "CFGMGMTDWADDR": { - "direction": "input", - "bits": [ 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178 ] - } - }, - "cells": { - }, - "netnames": { - "CFGAERECRCCHECKEN": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1998" - } - }, - "CFGAERECRCGENEN": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:1999" - } - }, - "CFGAERINTERRUPTMSGNUM": { - "hide_name": 0, - "bits": [ 1901, 1902, 1903, 1904, 1905 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2392" - } - }, - "CFGAERROOTERRCORRERRRECEIVED": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2000" - } - }, - "CFGAERROOTERRCORRERRREPORTINGEN": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2001" - } - }, - "CFGAERROOTERRFATALERRRECEIVED": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2002" - } - }, - "CFGAERROOTERRFATALERRREPORTINGEN": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2003" - } - }, - "CFGAERROOTERRNONFATALERRRECEIVED": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2004" - } - }, - "CFGAERROOTERRNONFATALERRREPORTINGEN": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2005" - } - }, - "CFGBRIDGESERREN": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2006" - } - }, - "CFGCOMMANDBUSMASTERENABLE": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2007" - } - }, - "CFGCOMMANDINTERRUPTDISABLE": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2008" - } - }, - "CFGCOMMANDIOENABLE": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2009" - } - }, - "CFGCOMMANDMEMENABLE": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2010" - } - }, - "CFGCOMMANDSERREN": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2011" - } - }, - "CFGDEVCONTROL2ARIFORWARDEN": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2012" - } - }, - "CFGDEVCONTROL2ATOMICEGRESSBLOCK": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2013" - } - }, - "CFGDEVCONTROL2ATOMICREQUESTEREN": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2014" - } - }, - "CFGDEVCONTROL2CPLTIMEOUTDIS": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2015" - } - }, - "CFGDEVCONTROL2CPLTIMEOUTVAL": { - "hide_name": 0, - "bits": [ 677, 678, 679, 680 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2223" - } - }, - "CFGDEVCONTROL2IDOCPLEN": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2016" - } - }, - "CFGDEVCONTROL2IDOREQEN": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2017" - } - }, - "CFGDEVCONTROL2LTREN": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2018" - } - }, - "CFGDEVCONTROL2TLPPREFIXBLOCK": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2019" - } - }, - "CFGDEVCONTROLAUXPOWEREN": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2020" - } - }, - "CFGDEVCONTROLCORRERRREPORTINGEN": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2021" - } - }, - "CFGDEVCONTROLENABLERO": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2022" - } - }, - "CFGDEVCONTROLEXTTAGEN": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2023" - } - }, - "CFGDEVCONTROLFATALERRREPORTINGEN": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2024" - } - }, - "CFGDEVCONTROLMAXPAYLOAD": { - "hide_name": 0, - "bits": [ 624, 625, 626 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2215" - } - }, - "CFGDEVCONTROLMAXREADREQ": { - "hide_name": 0, - "bits": [ 627, 628, 629 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2216" - } - }, - "CFGDEVCONTROLNONFATALREPORTINGEN": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2025" - } - }, - "CFGDEVCONTROLNOSNOOPEN": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2026" - } - }, - "CFGDEVCONTROLPHANTOMEN": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2027" - } - }, - "CFGDEVCONTROLURERRREPORTINGEN": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2028" - } - }, - "CFGDEVID": { - "hide_name": 0, - "bits": [ 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2350" - } - }, - "CFGDEVSTATUSCORRERRDETECTED": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2029" - } - }, - "CFGDEVSTATUSFATALERRDETECTED": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2030" - } - }, - "CFGDEVSTATUSNONFATALERRDETECTED": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2031" - } - }, - "CFGDEVSTATUSURDETECTED": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2032" - } - }, - "CFGDSBUSNUMBER": { - "hide_name": 0, - "bits": [ 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2400" - } - }, - "CFGDSDEVICENUMBER": { - "hide_name": 0, - "bits": [ 1906, 1907, 1908, 1909, 1910 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2393" - } - }, - "CFGDSFUNCTIONNUMBER": { - "hide_name": 0, - "bits": [ 1749, 1750, 1751 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2376" - } - }, - "CFGDSN": { - "hide_name": 0, - "bits": [ 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2397" - } - }, - "CFGERRACSN": { - "hide_name": 0, - "bits": [ 1153 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2242" - } - }, - "CFGERRAERHEADERLOG": { - "hide_name": 0, - "bits": [ 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2348" - } - }, - "CFGERRAERHEADERLOGSETN": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2033" - } - }, - "CFGERRATOMICEGRESSBLOCKEDN": { - "hide_name": 0, - "bits": [ 1154 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2243" - } - }, - "CFGERRCORN": { - "hide_name": 0, - "bits": [ 1155 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2244" - } - }, - "CFGERRCPLABORTN": { - "hide_name": 0, - "bits": [ 1156 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2245" - } - }, - "CFGERRCPLRDYN": { - "hide_name": 0, - "bits": [ 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2034" - } - }, - "CFGERRCPLTIMEOUTN": { - "hide_name": 0, - "bits": [ 1157 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2246" - } - }, - "CFGERRCPLUNEXPECTN": { - "hide_name": 0, - "bits": [ 1158 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2247" - } - }, - "CFGERRECRCN": { - "hide_name": 0, - "bits": [ 1159 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2248" - } - }, - "CFGERRINTERNALCORN": { - "hide_name": 0, - "bits": [ 1160 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2249" - } - }, - "CFGERRINTERNALUNCORN": { - "hide_name": 0, - "bits": [ 1161 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2250" - } - }, - "CFGERRLOCKEDN": { - "hide_name": 0, - "bits": [ 1162 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2251" - } - }, - "CFGERRMALFORMEDN": { - "hide_name": 0, - "bits": [ 1163 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2252" - } - }, - "CFGERRMCBLOCKEDN": { - "hide_name": 0, - "bits": [ 1164 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2253" - } - }, - "CFGERRNORECOVERYN": { - "hide_name": 0, - "bits": [ 1165 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2254" - } - }, - "CFGERRPOISONEDN": { - "hide_name": 0, - "bits": [ 1166 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2255" - } - }, - "CFGERRPOSTEDN": { - "hide_name": 0, - "bits": [ 1167 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2256" - } - }, - "CFGERRTLPCPLHEADER": { - "hide_name": 0, - "bits": [ 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2391" - } - }, - "CFGERRURN": { - "hide_name": 0, - "bits": [ 1168 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2257" - } - }, - "CFGFORCECOMMONCLOCKOFF": { - "hide_name": 0, - "bits": [ 1169 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2258" - } - }, - "CFGFORCEEXTENDEDSYNCON": { - "hide_name": 0, - "bits": [ 1170 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2259" - } - }, - "CFGFORCEMPS": { - "hide_name": 0, - "bits": [ 1752, 1753, 1754 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2377" - } - }, - "CFGINTERRUPTASSERTN": { - "hide_name": 0, - "bits": [ 1171 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2260" - } - }, - "CFGINTERRUPTDI": { - "hide_name": 0, - "bits": [ 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2401" - } - }, - "CFGINTERRUPTDO": { - "hide_name": 0, - "bits": [ 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2237" - } - }, - "CFGINTERRUPTMMENABLE": { - "hide_name": 0, - "bits": [ 630, 631, 632 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2217" - } - }, - "CFGINTERRUPTMSIENABLE": { - "hide_name": 0, - "bits": [ 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2035" - } - }, - "CFGINTERRUPTMSIXENABLE": { - "hide_name": 0, - "bits": [ 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2036" - } - }, - "CFGINTERRUPTMSIXFM": { - "hide_name": 0, - "bits": [ 41 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2037" - } - }, - "CFGINTERRUPTN": { - "hide_name": 0, - "bits": [ 1172 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2261" - } - }, - "CFGINTERRUPTRDYN": { - "hide_name": 0, - "bits": [ 42 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2038" - } - }, - "CFGINTERRUPTSTATN": { - "hide_name": 0, - "bits": [ 1173 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2262" - } - }, - "CFGLINKCONTROLASPMCONTROL": { - "hide_name": 0, - "bits": [ 574, 575 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2190" - } - }, - "CFGLINKCONTROLAUTOBANDWIDTHINTEN": { - "hide_name": 0, - "bits": [ 43 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2039" - } - }, - "CFGLINKCONTROLBANDWIDTHINTEN": { - "hide_name": 0, - "bits": [ 44 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2040" - } - }, - "CFGLINKCONTROLCLOCKPMEN": { - "hide_name": 0, - "bits": [ 45 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2041" - } - }, - "CFGLINKCONTROLCOMMONCLOCK": { - "hide_name": 0, - "bits": [ 46 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2042" - } - }, - "CFGLINKCONTROLEXTENDEDSYNC": { - "hide_name": 0, - "bits": [ 47 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2043" - } - }, - "CFGLINKCONTROLHWAUTOWIDTHDIS": { - "hide_name": 0, - "bits": [ 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2044" - } - }, - "CFGLINKCONTROLLINKDISABLE": { - "hide_name": 0, - "bits": [ 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2045" - } - }, - "CFGLINKCONTROLRCB": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2046" - } - }, - "CFGLINKCONTROLRETRAINLINK": { - "hide_name": 0, - "bits": [ 51 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2047" - } - }, - "CFGLINKSTATUSAUTOBANDWIDTHSTATUS": { - "hide_name": 0, - "bits": [ 52 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2048" - } - }, - "CFGLINKSTATUSBANDWIDTHSTATUS": { - "hide_name": 0, - "bits": [ 53 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2049" - } - }, - "CFGLINKSTATUSCURRENTSPEED": { - "hide_name": 0, - "bits": [ 576, 577 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2191" - } - }, - "CFGLINKSTATUSDLLACTIVE": { - "hide_name": 0, - "bits": [ 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2050" - } - }, - "CFGLINKSTATUSLINKTRAINING": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2051" - } - }, - "CFGLINKSTATUSNEGOTIATEDWIDTH": { - "hide_name": 0, - "bits": [ 681, 682, 683, 684 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2224" - } - }, - "CFGMGMTBYTEENN": { - "hide_name": 0, - "bits": [ 1849, 1850, 1851, 1852 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2390" - } - }, - "CFGMGMTDI": { - "hide_name": 0, - "bits": [ 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2388" - } - }, - "CFGMGMTDO": { - "hide_name": 0, - "bits": [ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2222" - } - }, - "CFGMGMTDWADDR": { - "hide_name": 0, - "bits": [ 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2405" - } - }, - "CFGMGMTRDENN": { - "hide_name": 0, - "bits": [ 1174 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2263" - } - }, - "CFGMGMTRDWRDONEN": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2052" - } - }, - "CFGMGMTWRENN": { - "hide_name": 0, - "bits": [ 1175 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2264" - } - }, - "CFGMGMTWRREADONLYN": { - "hide_name": 0, - "bits": [ 1176 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2265" - } - }, - "CFGMGMTWRRW1CASRWN": { - "hide_name": 0, - "bits": [ 1177 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2266" - } - }, - "CFGMSGDATA": { - "hide_name": 0, - "bits": [ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2180" - } - }, - "CFGMSGRECEIVED": { - "hide_name": 0, - "bits": [ 57 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2053" - } - }, - "CFGMSGRECEIVEDASSERTINTA": { - "hide_name": 0, - "bits": [ 58 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2054" - } - }, - "CFGMSGRECEIVEDASSERTINTB": { - "hide_name": 0, - "bits": [ 59 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2055" - } - }, - "CFGMSGRECEIVEDASSERTINTC": { - "hide_name": 0, - "bits": [ 60 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2056" - } - }, - "CFGMSGRECEIVEDASSERTINTD": { - "hide_name": 0, - "bits": [ 61 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2057" - } - }, - "CFGMSGRECEIVEDDEASSERTINTA": { - "hide_name": 0, - "bits": [ 62 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2058" - } - }, - "CFGMSGRECEIVEDDEASSERTINTB": { - "hide_name": 0, - "bits": [ 63 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2059" - } - }, - "CFGMSGRECEIVEDDEASSERTINTC": { - "hide_name": 0, - "bits": [ 64 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2060" - } - }, - "CFGMSGRECEIVEDDEASSERTINTD": { - "hide_name": 0, - "bits": [ 65 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2061" - } - }, - "CFGMSGRECEIVEDERRCOR": { - "hide_name": 0, - "bits": [ 66 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2062" - } - }, - "CFGMSGRECEIVEDERRFATAL": { - "hide_name": 0, - "bits": [ 67 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2063" - } - }, - "CFGMSGRECEIVEDERRNONFATAL": { - "hide_name": 0, - "bits": [ 68 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2064" - } - }, - "CFGMSGRECEIVEDPMASNAK": { - "hide_name": 0, - "bits": [ 69 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2065" - } - }, - "CFGMSGRECEIVEDPMETO": { - "hide_name": 0, - "bits": [ 70 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2066" - } - }, - "CFGMSGRECEIVEDPMETOACK": { - "hide_name": 0, - "bits": [ 71 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2067" - } - }, - "CFGMSGRECEIVEDPMPME": { - "hide_name": 0, - "bits": [ 72 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2068" - } - }, - "CFGMSGRECEIVEDSETSLOTPOWERLIMIT": { - "hide_name": 0, - "bits": [ 73 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2069" - } - }, - "CFGMSGRECEIVEDUNLOCK": { - "hide_name": 0, - "bits": [ 74 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2070" - } - }, - "CFGPCIECAPINTERRUPTMSGNUM": { - "hide_name": 0, - "bits": [ 1911, 1912, 1913, 1914, 1915 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2394" - } - }, - "CFGPCIELINKSTATE": { - "hide_name": 0, - "bits": [ 633, 634, 635 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2218" - } - }, - "CFGPMCSRPMEEN": { - "hide_name": 0, - "bits": [ 75 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2071" - } - }, - "CFGPMCSRPMESTATUS": { - "hide_name": 0, - "bits": [ 76 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2072" - } - }, - "CFGPMCSRPOWERSTATE": { - "hide_name": 0, - "bits": [ 578, 579 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2192" - } - }, - "CFGPMFORCESTATE": { - "hide_name": 0, - "bits": [ 1723, 1724 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2363" - } - }, - "CFGPMFORCESTATEENN": { - "hide_name": 0, - "bits": [ 1178 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2267" - } - }, - "CFGPMHALTASPML0SN": { - "hide_name": 0, - "bits": [ 1179 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2268" - } - }, - "CFGPMHALTASPML1N": { - "hide_name": 0, - "bits": [ 1180 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2269" - } - }, - "CFGPMRCVASREQL1N": { - "hide_name": 0, - "bits": [ 77 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2073" - } - }, - "CFGPMRCVENTERL1N": { - "hide_name": 0, - "bits": [ 78 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2074" - } - }, - "CFGPMRCVENTERL23N": { - "hide_name": 0, - "bits": [ 79 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2075" - } - }, - "CFGPMRCVREQACKN": { - "hide_name": 0, - "bits": [ 80 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2076" - } - }, - "CFGPMSENDPMETON": { - "hide_name": 0, - "bits": [ 1181 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2270" - } - }, - "CFGPMTURNOFFOKN": { - "hide_name": 0, - "bits": [ 1182 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2271" - } - }, - "CFGPMWAKEN": { - "hide_name": 0, - "bits": [ 1183 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2272" - } - }, - "CFGPORTNUMBER": { - "hide_name": 0, - "bits": [ 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2402" - } - }, - "CFGREVID": { - "hide_name": 0, - "bits": [ 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2403" - } - }, - "CFGROOTCONTROLPMEINTEN": { - "hide_name": 0, - "bits": [ 81 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2077" - } - }, - "CFGROOTCONTROLSYSERRCORRERREN": { - "hide_name": 0, - "bits": [ 82 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2078" - } - }, - "CFGROOTCONTROLSYSERRFATALERREN": { - "hide_name": 0, - "bits": [ 83 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2079" - } - }, - "CFGROOTCONTROLSYSERRNONFATALERREN": { - "hide_name": 0, - "bits": [ 84 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2080" - } - }, - "CFGSLOTCONTROLELECTROMECHILCTLPULSE": { - "hide_name": 0, - "bits": [ 85 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2081" - } - }, - "CFGSUBSYSID": { - "hide_name": 0, - "bits": [ 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2351" - } - }, - "CFGSUBSYSVENDID": { - "hide_name": 0, - "bits": [ 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2352" - } - }, - "CFGTRANSACTION": { - "hide_name": 0, - "bits": [ 86 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2082" - } - }, - "CFGTRANSACTIONADDR": { - "hide_name": 0, - "bits": [ 1099, 1100, 1101, 1102, 1103, 1104, 1105 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2235" - } - }, - "CFGTRANSACTIONTYPE": { - "hide_name": 0, - "bits": [ 87 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2083" - } - }, - "CFGTRNPENDINGN": { - "hide_name": 0, - "bits": [ 1184 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2273" - } - }, - "CFGVCTCVCMAP": { - "hide_name": 0, - "bits": [ 1106, 1107, 1108, 1109, 1110, 1111, 1112 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2236" - } - }, - "CFGVENDID": { - "hide_name": 0, - "bits": [ 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2353" - } - }, - "CMRSTN": { - "hide_name": 0, - "bits": [ 1185 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2274" - } - }, - "CMSTICKYRSTN": { - "hide_name": 0, - "bits": [ 1186 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2275" - } - }, - "DBGMODE": { - "hide_name": 0, - "bits": [ 1725, 1726 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2364" - } - }, - "DBGSCLRA": { - "hide_name": 0, - "bits": [ 88 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2084" - } - }, - "DBGSCLRB": { - "hide_name": 0, - "bits": [ 89 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2085" - } - }, - "DBGSCLRC": { - "hide_name": 0, - "bits": [ 90 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2086" - } - }, - "DBGSCLRD": { - "hide_name": 0, - "bits": [ 91 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2087" - } - }, - "DBGSCLRE": { - "hide_name": 0, - "bits": [ 92 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2088" - } - }, - "DBGSCLRF": { - "hide_name": 0, - "bits": [ 93 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2089" - } - }, - "DBGSCLRG": { - "hide_name": 0, - "bits": [ 94 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2090" - } - }, - "DBGSCLRH": { - "hide_name": 0, - "bits": [ 95 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2091" - } - }, - "DBGSCLRI": { - "hide_name": 0, - "bits": [ 96 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2092" - } - }, - "DBGSCLRJ": { - "hide_name": 0, - "bits": [ 97 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2093" - } - }, - "DBGSCLRK": { - "hide_name": 0, - "bits": [ 98 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2094" - } - }, - "DBGSUBMODE": { - "hide_name": 0, - "bits": [ 1187 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2276" - } - }, - "DBGVECA": { - "hide_name": 0, - "bits": [ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2229" - } - }, - "DBGVECB": { - "hide_name": 0, - "bits": [ 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2230" - } - }, - "DBGVECC": { - "hide_name": 0, - "bits": [ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2170" - } - }, - "DLRSTN": { - "hide_name": 0, - "bits": [ 1188 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2277" - } - }, - "DRPADDR": { - "hide_name": 0, - "bits": [ 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2404" - } - }, - "DRPCLK": { - "hide_name": 0, - "bits": [ 1189 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2278" - } - }, - "DRPDI": { - "hide_name": 0, - "bits": [ 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2354" - } - }, - "DRPDO": { - "hide_name": 0, - "bits": [ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2181" - } - }, - "DRPEN": { - "hide_name": 0, - "bits": [ 1190 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2279" - } - }, - "DRPRDY": { - "hide_name": 0, - "bits": [ 99 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2095" - } - }, - "DRPWE": { - "hide_name": 0, - "bits": [ 1191 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2280" - } - }, - "FUNCLVLRSTN": { - "hide_name": 0, - "bits": [ 1192 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2281" - } - }, - "LL2BADDLLPERR": { - "hide_name": 0, - "bits": [ 100 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2096" - } - }, - "LL2BADTLPERR": { - "hide_name": 0, - "bits": [ 101 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2097" - } - }, - "LL2LINKSTATUS": { - "hide_name": 0, - "bits": [ 689, 690, 691, 692, 693 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2226" - } - }, - "LL2PROTOCOLERR": { - "hide_name": 0, - "bits": [ 102 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2098" - } - }, - "LL2RECEIVERERR": { - "hide_name": 0, - "bits": [ 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2099" - } - }, - "LL2REPLAYROERR": { - "hide_name": 0, - "bits": [ 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2100" - } - }, - "LL2REPLAYTOERR": { - "hide_name": 0, - "bits": [ 105 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2101" - } - }, - "LL2SENDASREQL1": { - "hide_name": 0, - "bits": [ 1193 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2282" - } - }, - "LL2SENDENTERL1": { - "hide_name": 0, - "bits": [ 1194 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2283" - } - }, - "LL2SENDENTERL23": { - "hide_name": 0, - "bits": [ 1195 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2284" - } - }, - "LL2SENDPMACK": { - "hide_name": 0, - "bits": [ 1196 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2285" - } - }, - "LL2SUSPENDNOW": { - "hide_name": 0, - "bits": [ 1197 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2286" - } - }, - "LL2SUSPENDOK": { - "hide_name": 0, - "bits": [ 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2102" - } - }, - "LL2TFCINIT1SEQ": { - "hide_name": 0, - "bits": [ 107 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2103" - } - }, - "LL2TFCINIT2SEQ": { - "hide_name": 0, - "bits": [ 108 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2104" - } - }, - "LL2TLPRCV": { - "hide_name": 0, - "bits": [ 1198 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2287" - } - }, - "LL2TXIDLE": { - "hide_name": 0, - "bits": [ 109 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2105" - } - }, - "LNKCLKEN": { - "hide_name": 0, - "bits": [ 110 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2106" - } - }, - "MIMRXRADDR": { - "hide_name": 0, - "bits": [ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2176" - } - }, - "MIMRXRDATA": { - "hide_name": 0, - "bits": [ 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2398" - } - }, - "MIMRXREN": { - "hide_name": 0, - "bits": [ 111 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2107" - } - }, - "MIMRXWADDR": { - "hide_name": 0, - "bits": [ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2177" - } - }, - "MIMRXWDATA": { - "hide_name": 0, - "bits": [ 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2233" - } - }, - "MIMRXWEN": { - "hide_name": 0, - "bits": [ 112 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2108" - } - }, - "MIMTXRADDR": { - "hide_name": 0, - "bits": [ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2178" - } - }, - "MIMTXRDATA": { - "hide_name": 0, - "bits": [ 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2399" - } - }, - "MIMTXREN": { - "hide_name": 0, - "bits": [ 113 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2109" - } - }, - "MIMTXWADDR": { - "hide_name": 0, - "bits": [ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2179" - } - }, - "MIMTXWDATA": { - "hide_name": 0, - "bits": [ 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2234" - } - }, - "MIMTXWEN": { - "hide_name": 0, - "bits": [ 114 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2110" - } - }, - "PIPECLK": { - "hide_name": 0, - "bits": [ 1199 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2288" - } - }, - "PIPERX0CHANISALIGNED": { - "hide_name": 0, - "bits": [ 1200 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2289" - } - }, - "PIPERX0CHARISK": { - "hide_name": 0, - "bits": [ 1727, 1728 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2365" - } - }, - "PIPERX0DATA": { - "hide_name": 0, - "bits": [ 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2355" - } - }, - "PIPERX0ELECIDLE": { - "hide_name": 0, - "bits": [ 1201 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2290" - } - }, - "PIPERX0PHYSTATUS": { - "hide_name": 0, - "bits": [ 1202 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2291" - } - }, - "PIPERX0POLARITY": { - "hide_name": 0, - "bits": [ 115 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2111" - } - }, - "PIPERX0STATUS": { - "hide_name": 0, - "bits": [ 1755, 1756, 1757 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2378" - } - }, - "PIPERX0VALID": { - "hide_name": 0, - "bits": [ 1203 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2292" - } - }, - "PIPERX1CHANISALIGNED": { - "hide_name": 0, - "bits": [ 1204 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2293" - } - }, - "PIPERX1CHARISK": { - "hide_name": 0, - "bits": [ 1729, 1730 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2366" - } - }, - "PIPERX1DATA": { - "hide_name": 0, - "bits": [ 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2356" - } - }, - "PIPERX1ELECIDLE": { - "hide_name": 0, - "bits": [ 1205 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2294" - } - }, - "PIPERX1PHYSTATUS": { - "hide_name": 0, - "bits": [ 1206 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2295" - } - }, - "PIPERX1POLARITY": { - "hide_name": 0, - "bits": [ 116 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2112" - } - }, - "PIPERX1STATUS": { - "hide_name": 0, - "bits": [ 1758, 1759, 1760 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2379" - } - }, - "PIPERX1VALID": { - "hide_name": 0, - "bits": [ 1207 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2296" - } - }, - "PIPERX2CHANISALIGNED": { - "hide_name": 0, - "bits": [ 1208 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2297" - } - }, - "PIPERX2CHARISK": { - "hide_name": 0, - "bits": [ 1731, 1732 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2367" - } - }, - "PIPERX2DATA": { - "hide_name": 0, - "bits": [ 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2357" - } - }, - "PIPERX2ELECIDLE": { - "hide_name": 0, - "bits": [ 1209 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2298" - } - }, - "PIPERX2PHYSTATUS": { - "hide_name": 0, - "bits": [ 1210 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2299" - } - }, - "PIPERX2POLARITY": { - "hide_name": 0, - "bits": [ 117 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2113" - } - }, - "PIPERX2STATUS": { - "hide_name": 0, - "bits": [ 1761, 1762, 1763 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2380" - } - }, - "PIPERX2VALID": { - "hide_name": 0, - "bits": [ 1211 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2300" - } - }, - "PIPERX3CHANISALIGNED": { - "hide_name": 0, - "bits": [ 1212 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2301" - } - }, - "PIPERX3CHARISK": { - "hide_name": 0, - "bits": [ 1733, 1734 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2368" - } - }, - "PIPERX3DATA": { - "hide_name": 0, - "bits": [ 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2358" - } - }, - "PIPERX3ELECIDLE": { - "hide_name": 0, - "bits": [ 1213 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2302" - } - }, - "PIPERX3PHYSTATUS": { - "hide_name": 0, - "bits": [ 1214 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2303" - } - }, - "PIPERX3POLARITY": { - "hide_name": 0, - "bits": [ 118 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2114" - } - }, - "PIPERX3STATUS": { - "hide_name": 0, - "bits": [ 1764, 1765, 1766 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2381" - } - }, - "PIPERX3VALID": { - "hide_name": 0, - "bits": [ 1215 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2304" - } - }, - "PIPERX4CHANISALIGNED": { - "hide_name": 0, - "bits": [ 1216 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2305" - } - }, - "PIPERX4CHARISK": { - "hide_name": 0, - "bits": [ 1735, 1736 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2369" - } - }, - "PIPERX4DATA": { - "hide_name": 0, - "bits": [ 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2359" - } - }, - "PIPERX4ELECIDLE": { - "hide_name": 0, - "bits": [ 1217 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2306" - } - }, - "PIPERX4PHYSTATUS": { - "hide_name": 0, - "bits": [ 1218 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2307" - } - }, - "PIPERX4POLARITY": { - "hide_name": 0, - "bits": [ 119 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2115" - } - }, - "PIPERX4STATUS": { - "hide_name": 0, - "bits": [ 1767, 1768, 1769 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2382" - } - }, - "PIPERX4VALID": { - "hide_name": 0, - "bits": [ 1219 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2308" - } - }, - "PIPERX5CHANISALIGNED": { - "hide_name": 0, - "bits": [ 1220 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2309" - } - }, - "PIPERX5CHARISK": { - "hide_name": 0, - "bits": [ 1737, 1738 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2370" - } - }, - "PIPERX5DATA": { - "hide_name": 0, - "bits": [ 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2360" - } - }, - "PIPERX5ELECIDLE": { - "hide_name": 0, - "bits": [ 1221 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2310" - } - }, - "PIPERX5PHYSTATUS": { - "hide_name": 0, - "bits": [ 1222 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2311" - } - }, - "PIPERX5POLARITY": { - "hide_name": 0, - "bits": [ 120 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2116" - } - }, - "PIPERX5STATUS": { - "hide_name": 0, - "bits": [ 1770, 1771, 1772 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2383" - } - }, - "PIPERX5VALID": { - "hide_name": 0, - "bits": [ 1223 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2312" - } - }, - "PIPERX6CHANISALIGNED": { - "hide_name": 0, - "bits": [ 1224 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2313" - } - }, - "PIPERX6CHARISK": { - "hide_name": 0, - "bits": [ 1739, 1740 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2371" - } - }, - "PIPERX6DATA": { - "hide_name": 0, - "bits": [ 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2361" - } - }, - "PIPERX6ELECIDLE": { - "hide_name": 0, - "bits": [ 1225 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2314" - } - }, - "PIPERX6PHYSTATUS": { - "hide_name": 0, - "bits": [ 1226 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2315" - } - }, - "PIPERX6POLARITY": { - "hide_name": 0, - "bits": [ 121 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2117" - } - }, - "PIPERX6STATUS": { - "hide_name": 0, - "bits": [ 1773, 1774, 1775 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2384" - } - }, - "PIPERX6VALID": { - "hide_name": 0, - "bits": [ 1227 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2316" - } - }, - "PIPERX7CHANISALIGNED": { - "hide_name": 0, - "bits": [ 1228 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2317" - } - }, - "PIPERX7CHARISK": { - "hide_name": 0, - "bits": [ 1741, 1742 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2372" - } - }, - "PIPERX7DATA": { - "hide_name": 0, - "bits": [ 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2362" - } - }, - "PIPERX7ELECIDLE": { - "hide_name": 0, - "bits": [ 1229 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2318" - } - }, - "PIPERX7PHYSTATUS": { - "hide_name": 0, - "bits": [ 1230 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2319" - } - }, - "PIPERX7POLARITY": { - "hide_name": 0, - "bits": [ 122 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2118" - } - }, - "PIPERX7STATUS": { - "hide_name": 0, - "bits": [ 1776, 1777, 1778 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2385" - } - }, - "PIPERX7VALID": { - "hide_name": 0, - "bits": [ 1231 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2320" - } - }, - "PIPETX0CHARISK": { - "hide_name": 0, - "bits": [ 580, 581 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2193" - } - }, - "PIPETX0COMPLIANCE": { - "hide_name": 0, - "bits": [ 123 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2119" - } - }, - "PIPETX0DATA": { - "hide_name": 0, - "bits": [ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2182" - } - }, - "PIPETX0ELECIDLE": { - "hide_name": 0, - "bits": [ 124 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2120" - } - }, - "PIPETX0POWERDOWN": { - "hide_name": 0, - "bits": [ 582, 583 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2194" - } - }, - "PIPETX1CHARISK": { - "hide_name": 0, - "bits": [ 584, 585 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2195" - } - }, - "PIPETX1COMPLIANCE": { - "hide_name": 0, - "bits": [ 125 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2121" - } - }, - "PIPETX1DATA": { - "hide_name": 0, - "bits": [ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2183" - } - }, - "PIPETX1ELECIDLE": { - "hide_name": 0, - "bits": [ 126 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2122" - } - }, - "PIPETX1POWERDOWN": { - "hide_name": 0, - "bits": [ 586, 587 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2196" - } - }, - "PIPETX2CHARISK": { - "hide_name": 0, - "bits": [ 588, 589 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2197" - } - }, - "PIPETX2COMPLIANCE": { - "hide_name": 0, - "bits": [ 127 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2123" - } - }, - "PIPETX2DATA": { - "hide_name": 0, - "bits": [ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2184" - } - }, - "PIPETX2ELECIDLE": { - "hide_name": 0, - "bits": [ 128 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2124" - } - }, - "PIPETX2POWERDOWN": { - "hide_name": 0, - "bits": [ 590, 591 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2198" - } - }, - "PIPETX3CHARISK": { - "hide_name": 0, - "bits": [ 592, 593 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2199" - } - }, - "PIPETX3COMPLIANCE": { - "hide_name": 0, - "bits": [ 129 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2125" - } - }, - "PIPETX3DATA": { - "hide_name": 0, - "bits": [ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2185" - } - }, - "PIPETX3ELECIDLE": { - "hide_name": 0, - "bits": [ 130 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2126" - } - }, - "PIPETX3POWERDOWN": { - "hide_name": 0, - "bits": [ 594, 595 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2200" - } - }, - "PIPETX4CHARISK": { - "hide_name": 0, - "bits": [ 596, 597 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2201" - } - }, - "PIPETX4COMPLIANCE": { - "hide_name": 0, - "bits": [ 131 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2127" - } - }, - "PIPETX4DATA": { - "hide_name": 0, - "bits": [ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2186" - } - }, - "PIPETX4ELECIDLE": { - "hide_name": 0, - "bits": [ 132 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2128" - } - }, - "PIPETX4POWERDOWN": { - "hide_name": 0, - "bits": [ 598, 599 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2202" - } - }, - "PIPETX5CHARISK": { - "hide_name": 0, - "bits": [ 600, 601 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2203" - } - }, - "PIPETX5COMPLIANCE": { - "hide_name": 0, - "bits": [ 133 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2129" - } - }, - "PIPETX5DATA": { - "hide_name": 0, - "bits": [ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2187" - } - }, - "PIPETX5ELECIDLE": { - "hide_name": 0, - "bits": [ 134 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2130" - } - }, - "PIPETX5POWERDOWN": { - "hide_name": 0, - "bits": [ 602, 603 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2204" - } - }, - "PIPETX6CHARISK": { - "hide_name": 0, - "bits": [ 604, 605 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2205" - } - }, - "PIPETX6COMPLIANCE": { - "hide_name": 0, - "bits": [ 135 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2131" - } - }, - "PIPETX6DATA": { - "hide_name": 0, - "bits": [ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2188" - } - }, - "PIPETX6ELECIDLE": { - "hide_name": 0, - "bits": [ 136 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2132" - } - }, - "PIPETX6POWERDOWN": { - "hide_name": 0, - "bits": [ 606, 607 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2206" - } - }, - "PIPETX7CHARISK": { - "hide_name": 0, - "bits": [ 608, 609 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2207" - } - }, - "PIPETX7COMPLIANCE": { - "hide_name": 0, - "bits": [ 137 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2133" - } - }, - "PIPETX7DATA": { - "hide_name": 0, - "bits": [ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2189" - } - }, - "PIPETX7ELECIDLE": { - "hide_name": 0, - "bits": [ 138 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2134" - } - }, - "PIPETX7POWERDOWN": { - "hide_name": 0, - "bits": [ 610, 611 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2208" - } - }, - "PIPETXDEEMPH": { - "hide_name": 0, - "bits": [ 139 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2135" - } - }, - "PIPETXMARGIN": { - "hide_name": 0, - "bits": [ 636, 637, 638 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2219" - } - }, - "PIPETXRATE": { - "hide_name": 0, - "bits": [ 140 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2136" - } - }, - "PIPETXRCVRDET": { - "hide_name": 0, - "bits": [ 141 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2137" - } - }, - "PIPETXRESET": { - "hide_name": 0, - "bits": [ 142 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2138" - } - }, - "PL2DIRECTEDLSTATE": { - "hide_name": 0, - "bits": [ 1916, 1917, 1918, 1919, 1920 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2395" - } - }, - "PL2L0REQ": { - "hide_name": 0, - "bits": [ 143 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2139" - } - }, - "PL2LINKUP": { - "hide_name": 0, - "bits": [ 144 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2140" - } - }, - "PL2RECEIVERERR": { - "hide_name": 0, - "bits": [ 145 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2141" - } - }, - "PL2RECOVERY": { - "hide_name": 0, - "bits": [ 146 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2142" - } - }, - "PL2RXELECIDLE": { - "hide_name": 0, - "bits": [ 147 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2143" - } - }, - "PL2RXPMSTATE": { - "hide_name": 0, - "bits": [ 612, 613 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2209" - } - }, - "PL2SUSPENDOK": { - "hide_name": 0, - "bits": [ 148 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2144" - } - }, - "PLDBGMODE": { - "hide_name": 0, - "bits": [ 1779, 1780, 1781 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2386" - } - }, - "PLDBGVEC": { - "hide_name": 0, - "bits": [ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2171" - } - }, - "PLDIRECTEDCHANGEDONE": { - "hide_name": 0, - "bits": [ 149 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2145" - } - }, - "PLDIRECTEDLINKAUTON": { - "hide_name": 0, - "bits": [ 1232 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2321" - } - }, - "PLDIRECTEDLINKCHANGE": { - "hide_name": 0, - "bits": [ 1743, 1744 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2373" - } - }, - "PLDIRECTEDLINKSPEED": { - "hide_name": 0, - "bits": [ 1233 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2322" - } - }, - "PLDIRECTEDLINKWIDTH": { - "hide_name": 0, - "bits": [ 1745, 1746 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2374" - } - }, - "PLDIRECTEDLTSSMNEW": { - "hide_name": 0, - "bits": [ 1921, 1922, 1923, 1924, 1925, 1926 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2396" - } - }, - "PLDIRECTEDLTSSMNEWVLD": { - "hide_name": 0, - "bits": [ 1234 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2323" - } - }, - "PLDIRECTEDLTSSMSTALL": { - "hide_name": 0, - "bits": [ 1235 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2324" - } - }, - "PLDOWNSTREAMDEEMPHSOURCE": { - "hide_name": 0, - "bits": [ 1236 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2325" - } - }, - "PLINITIALLINKWIDTH": { - "hide_name": 0, - "bits": [ 639, 640, 641 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2220" - } - }, - "PLLANEREVERSALMODE": { - "hide_name": 0, - "bits": [ 614, 615 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2210" - } - }, - "PLLINKGEN2CAP": { - "hide_name": 0, - "bits": [ 150 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2146" - } - }, - "PLLINKPARTNERGEN2SUPPORTED": { - "hide_name": 0, - "bits": [ 151 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2147" - } - }, - "PLLINKUPCFGCAP": { - "hide_name": 0, - "bits": [ 152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2148" - } - }, - "PLLTSSMSTATE": { - "hide_name": 0, - "bits": [ 694, 695, 696, 697, 698, 699 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2227" - } - }, - "PLPHYLNKUPN": { - "hide_name": 0, - "bits": [ 153 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2149" - } - }, - "PLRECEIVEDHOTRST": { - "hide_name": 0, - "bits": [ 154 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2150" - } - }, - "PLRSTN": { - "hide_name": 0, - "bits": [ 1237 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2326" - } - }, - "PLRXPMSTATE": { - "hide_name": 0, - "bits": [ 616, 617 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2211" - } - }, - "PLSELLNKRATE": { - "hide_name": 0, - "bits": [ 155 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2151" - } - }, - "PLSELLNKWIDTH": { - "hide_name": 0, - "bits": [ 618, 619 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2212" - } - }, - "PLTRANSMITHOTRST": { - "hide_name": 0, - "bits": [ 1238 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2327" - } - }, - "PLTXPMSTATE": { - "hide_name": 0, - "bits": [ 642, 643, 644 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2221" - } - }, - "PLUPSTREAMPREFERDEEMPH": { - "hide_name": 0, - "bits": [ 1239 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2328" - } - }, - "RECEIVEDFUNCLVLRSTN": { - "hide_name": 0, - "bits": [ 156 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2152" - } - }, - "SYSRSTN": { - "hide_name": 0, - "bits": [ 1240 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2329" - } - }, - "TL2ASPMSUSPENDCREDITCHECK": { - "hide_name": 0, - "bits": [ 1241 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2330" - } - }, - "TL2ASPMSUSPENDCREDITCHECKOK": { - "hide_name": 0, - "bits": [ 157 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2153" - } - }, - "TL2ASPMSUSPENDREQ": { - "hide_name": 0, - "bits": [ 158 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2154" - } - }, - "TL2ERRFCPE": { - "hide_name": 0, - "bits": [ 159 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2155" - } - }, - "TL2ERRHDR": { - "hide_name": 0, - "bits": [ 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2231" - } - }, - "TL2ERRMALFORMED": { - "hide_name": 0, - "bits": [ 160 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2156" - } - }, - "TL2ERRRXOVERFLOW": { - "hide_name": 0, - "bits": [ 161 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2157" - } - }, - "TL2PPMSUSPENDOK": { - "hide_name": 0, - "bits": [ 162 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2158" - } - }, - "TL2PPMSUSPENDREQ": { - "hide_name": 0, - "bits": [ 1242 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2331" - } - }, - "TLRSTN": { - "hide_name": 0, - "bits": [ 1243 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2332" - } - }, - "TRNFCCPLD": { - "hide_name": 0, - "bits": [ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2172" - } - }, - "TRNFCCPLH": { - "hide_name": 0, - "bits": [ 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2238" - } - }, - "TRNFCNPD": { - "hide_name": 0, - "bits": [ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2173" - } - }, - "TRNFCNPH": { - "hide_name": 0, - "bits": [ 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2239" - } - }, - "TRNFCPD": { - "hide_name": 0, - "bits": [ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2174" - } - }, - "TRNFCPH": { - "hide_name": 0, - "bits": [ 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2240" - } - }, - "TRNFCSEL": { - "hide_name": 0, - "bits": [ 1782, 1783, 1784 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2387" - } - }, - "TRNLNKUP": { - "hide_name": 0, - "bits": [ 163 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2159" - } - }, - "TRNRBARHIT": { - "hide_name": 0, - "bits": [ 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2241" - } - }, - "TRNRD": { - "hide_name": 0, - "bits": [ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2175" - } - }, - "TRNRDLLPDATA": { - "hide_name": 0, - "bits": [ 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2232" - } - }, - "TRNRDLLPSRCRDY": { - "hide_name": 0, - "bits": [ 620, 621 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2213" - } - }, - "TRNRDSTRDY": { - "hide_name": 0, - "bits": [ 1244 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2333" - } - }, - "TRNRECRCERR": { - "hide_name": 0, - "bits": [ 164 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2160" - } - }, - "TRNREOF": { - "hide_name": 0, - "bits": [ 165 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2161" - } - }, - "TRNRERRFWD": { - "hide_name": 0, - "bits": [ 166 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2162" - } - }, - "TRNRFCPRET": { - "hide_name": 0, - "bits": [ 1245 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2334" - } - }, - "TRNRNPOK": { - "hide_name": 0, - "bits": [ 1246 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2335" - } - }, - "TRNRNPREQ": { - "hide_name": 0, - "bits": [ 1247 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2336" - } - }, - "TRNRREM": { - "hide_name": 0, - "bits": [ 622, 623 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2214" - } - }, - "TRNRSOF": { - "hide_name": 0, - "bits": [ 167 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2163" - } - }, - "TRNRSRCDSC": { - "hide_name": 0, - "bits": [ 168 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2164" - } - }, - "TRNRSRCRDY": { - "hide_name": 0, - "bits": [ 169 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2165" - } - }, - "TRNTBUFAV": { - "hide_name": 0, - "bits": [ 700, 701, 702, 703, 704, 705 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2228" - } - }, - "TRNTCFGGNT": { - "hide_name": 0, - "bits": [ 1248 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2337" - } - }, - "TRNTCFGREQ": { - "hide_name": 0, - "bits": [ 170 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2166" - } - }, - "TRNTD": { - "hide_name": 0, - "bits": [ 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2349" - } - }, - "TRNTDLLPDATA": { - "hide_name": 0, - "bits": [ 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2389" - } - }, - "TRNTDLLPDSTRDY": { - "hide_name": 0, - "bits": [ 171 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2167" - } - }, - "TRNTDLLPSRCRDY": { - "hide_name": 0, - "bits": [ 1249 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2338" - } - }, - "TRNTDSTRDY": { - "hide_name": 0, - "bits": [ 685, 686, 687, 688 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2225" - } - }, - "TRNTECRCGEN": { - "hide_name": 0, - "bits": [ 1250 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2339" - } - }, - "TRNTEOF": { - "hide_name": 0, - "bits": [ 1251 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2340" - } - }, - "TRNTERRDROP": { - "hide_name": 0, - "bits": [ 172 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2168" - } - }, - "TRNTERRFWD": { - "hide_name": 0, - "bits": [ 1252 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2341" - } - }, - "TRNTREM": { - "hide_name": 0, - "bits": [ 1747, 1748 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2375" - } - }, - "TRNTSOF": { - "hide_name": 0, - "bits": [ 1253 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2342" - } - }, - "TRNTSRCDSC": { - "hide_name": 0, - "bits": [ 1254 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2343" - } - }, - "TRNTSRCRDY": { - "hide_name": 0, - "bits": [ 1255 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2344" - } - }, - "TRNTSTR": { - "hide_name": 0, - "bits": [ 1256 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2345" - } - }, - "USERCLK": { - "hide_name": 0, - "bits": [ 1258 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2347" - } - }, - "USERCLK2": { - "hide_name": 0, - "bits": [ 1257 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2346" - } - }, - "USERRSTN": { - "hide_name": 0, - "bits": [ 173 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2169" - } - } - } - }, - "PCIE_3_0": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2408" - }, - "ports": { - "CFGERRCOROUT": { - "direction": "output", - "bits": [ 2 ] - }, - "CFGERRFATALOUT": { - "direction": "output", - "bits": [ 3 ] - }, - "CFGERRNONFATALOUT": { - "direction": "output", - "bits": [ 4 ] - }, - "CFGEXTREADRECEIVED": { - "direction": "output", - "bits": [ 5 ] - }, - "CFGEXTWRITERECEIVED": { - "direction": "output", - "bits": [ 6 ] - }, - "CFGHOTRESETOUT": { - "direction": "output", - "bits": [ 7 ] - }, - "CFGINPUTUPDATEDONE": { - "direction": "output", - "bits": [ 8 ] - }, - "CFGINTERRUPTAOUTPUT": { - "direction": "output", - "bits": [ 9 ] - }, - "CFGINTERRUPTBOUTPUT": { - "direction": "output", - "bits": [ 10 ] - }, - "CFGINTERRUPTCOUTPUT": { - "direction": "output", - "bits": [ 11 ] - }, - "CFGINTERRUPTDOUTPUT": { - "direction": "output", - "bits": [ 12 ] - }, - "CFGINTERRUPTMSIFAIL": { - "direction": "output", - "bits": [ 13 ] - }, - "CFGINTERRUPTMSIMASKUPDATE": { - "direction": "output", - "bits": [ 14 ] - }, - "CFGINTERRUPTMSISENT": { - "direction": "output", - "bits": [ 15 ] - }, - "CFGINTERRUPTMSIXFAIL": { - "direction": "output", - "bits": [ 16 ] - }, - "CFGINTERRUPTMSIXSENT": { - "direction": "output", - "bits": [ 17 ] - }, - "CFGINTERRUPTSENT": { - "direction": "output", - "bits": [ 18 ] - }, - "CFGLOCALERROR": { - "direction": "output", - "bits": [ 19 ] - }, - "CFGLTRENABLE": { - "direction": "output", - "bits": [ 20 ] - }, - "CFGMCUPDATEDONE": { - "direction": "output", - "bits": [ 21 ] - }, - "CFGMGMTREADWRITEDONE": { - "direction": "output", - "bits": [ 22 ] - }, - "CFGMSGRECEIVED": { - "direction": "output", - "bits": [ 23 ] - }, - "CFGMSGTRANSMITDONE": { - "direction": "output", - "bits": [ 24 ] - }, - "CFGPERFUNCTIONUPDATEDONE": { - "direction": "output", - "bits": [ 25 ] - }, - "CFGPHYLINKDOWN": { - "direction": "output", - "bits": [ 26 ] - }, - "CFGPLSTATUSCHANGE": { - "direction": "output", - "bits": [ 27 ] - }, - "CFGPOWERSTATECHANGEINTERRUPT": { - "direction": "output", - "bits": [ 28 ] - }, - "CFGTPHSTTREADENABLE": { - "direction": "output", - "bits": [ 29 ] - }, - "CFGTPHSTTWRITEENABLE": { - "direction": "output", - "bits": [ 30 ] - }, - "DRPRDY": { - "direction": "output", - "bits": [ 31 ] - }, - "MAXISCQTLAST": { - "direction": "output", - "bits": [ 32 ] - }, - "MAXISCQTVALID": { - "direction": "output", - "bits": [ 33 ] - }, - "MAXISRCTLAST": { - "direction": "output", - "bits": [ 34 ] - }, - "MAXISRCTVALID": { - "direction": "output", - "bits": [ 35 ] - }, - "PCIERQSEQNUMVLD": { - "direction": "output", - "bits": [ 36 ] - }, - "PCIERQTAGVLD": { - "direction": "output", - "bits": [ 37 ] - }, - "PIPERX0POLARITY": { - "direction": "output", - "bits": [ 38 ] - }, - "PIPERX1POLARITY": { - "direction": "output", - "bits": [ 39 ] - }, - "PIPERX2POLARITY": { - "direction": "output", - "bits": [ 40 ] - }, - "PIPERX3POLARITY": { - "direction": "output", - "bits": [ 41 ] - }, - "PIPERX4POLARITY": { - "direction": "output", - "bits": [ 42 ] - }, - "PIPERX5POLARITY": { - "direction": "output", - "bits": [ 43 ] - }, - "PIPERX6POLARITY": { - "direction": "output", - "bits": [ 44 ] - }, - "PIPERX7POLARITY": { - "direction": "output", - "bits": [ 45 ] - }, - "PIPETX0COMPLIANCE": { - "direction": "output", - "bits": [ 46 ] - }, - "PIPETX0DATAVALID": { - "direction": "output", - "bits": [ 47 ] - }, - "PIPETX0ELECIDLE": { - "direction": "output", - "bits": [ 48 ] - }, - "PIPETX0STARTBLOCK": { - "direction": "output", - "bits": [ 49 ] - }, - "PIPETX1COMPLIANCE": { - "direction": "output", - "bits": [ 50 ] - }, - "PIPETX1DATAVALID": { - "direction": "output", - "bits": [ 51 ] - }, - "PIPETX1ELECIDLE": { - "direction": "output", - "bits": [ 52 ] - }, - "PIPETX1STARTBLOCK": { - "direction": "output", - "bits": [ 53 ] - }, - "PIPETX2COMPLIANCE": { - "direction": "output", - "bits": [ 54 ] - }, - "PIPETX2DATAVALID": { - "direction": "output", - "bits": [ 55 ] - }, - "PIPETX2ELECIDLE": { - "direction": "output", - "bits": [ 56 ] - }, - "PIPETX2STARTBLOCK": { - "direction": "output", - "bits": [ 57 ] - }, - "PIPETX3COMPLIANCE": { - "direction": "output", - "bits": [ 58 ] - }, - "PIPETX3DATAVALID": { - "direction": "output", - "bits": [ 59 ] - }, - "PIPETX3ELECIDLE": { - "direction": "output", - "bits": [ 60 ] - }, - "PIPETX3STARTBLOCK": { - "direction": "output", - "bits": [ 61 ] - }, - "PIPETX4COMPLIANCE": { - "direction": "output", - "bits": [ 62 ] - }, - "PIPETX4DATAVALID": { - "direction": "output", - "bits": [ 63 ] - }, - "PIPETX4ELECIDLE": { - "direction": "output", - "bits": [ 64 ] - }, - "PIPETX4STARTBLOCK": { - "direction": "output", - "bits": [ 65 ] - }, - "PIPETX5COMPLIANCE": { - "direction": "output", - "bits": [ 66 ] - }, - "PIPETX5DATAVALID": { - "direction": "output", - "bits": [ 67 ] - }, - "PIPETX5ELECIDLE": { - "direction": "output", - "bits": [ 68 ] - }, - "PIPETX5STARTBLOCK": { - "direction": "output", - "bits": [ 69 ] - }, - "PIPETX6COMPLIANCE": { - "direction": "output", - "bits": [ 70 ] - }, - "PIPETX6DATAVALID": { - "direction": "output", - "bits": [ 71 ] - }, - "PIPETX6ELECIDLE": { - "direction": "output", - "bits": [ 72 ] - }, - "PIPETX6STARTBLOCK": { - "direction": "output", - "bits": [ 73 ] - }, - "PIPETX7COMPLIANCE": { - "direction": "output", - "bits": [ 74 ] - }, - "PIPETX7DATAVALID": { - "direction": "output", - "bits": [ 75 ] - }, - "PIPETX7ELECIDLE": { - "direction": "output", - "bits": [ 76 ] - }, - "PIPETX7STARTBLOCK": { - "direction": "output", - "bits": [ 77 ] - }, - "PIPETXDEEMPH": { - "direction": "output", - "bits": [ 78 ] - }, - "PIPETXRCVRDET": { - "direction": "output", - "bits": [ 79 ] - }, - "PIPETXRESET": { - "direction": "output", - "bits": [ 80 ] - }, - "PIPETXSWING": { - "direction": "output", - "bits": [ 81 ] - }, - "PLEQINPROGRESS": { - "direction": "output", - "bits": [ 82 ] - }, - "CFGFCCPLD": { - "direction": "output", - "bits": [ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 ] - }, - "CFGFCNPD": { - "direction": "output", - "bits": [ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106 ] - }, - "CFGFCPD": { - "direction": "output", - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118 ] - }, - "CFGVFSTATUS": { - "direction": "output", - "bits": [ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130 ] - }, - "MIREPLAYRAMWRITEDATA": { - "direction": "output", - "bits": [ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274 ] - }, - "MIREQUESTRAMWRITEDATA": { - "direction": "output", - "bits": [ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418 ] - }, - "CFGPERFUNCSTATUSDATA": { - "direction": "output", - "bits": [ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434 ] - }, - "DBGDATAOUT": { - "direction": "output", - "bits": [ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450 ] - }, - "DRPDO": { - "direction": "output", - "bits": [ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466 ] - }, - "CFGVFPOWERSTATE": { - "direction": "output", - "bits": [ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484 ] - }, - "CFGVFTPHSTMODE": { - "direction": "output", - "bits": [ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502 ] - }, - "CFGDPASUBSTATECHANGE": { - "direction": "output", - "bits": [ 503, 504 ] - }, - "CFGFLRINPROCESS": { - "direction": "output", - "bits": [ 505, 506 ] - }, - "CFGINTERRUPTMSIENABLE": { - "direction": "output", - "bits": [ 507, 508 ] - }, - "CFGINTERRUPTMSIXENABLE": { - "direction": "output", - "bits": [ 509, 510 ] - }, - "CFGINTERRUPTMSIXMASK": { - "direction": "output", - "bits": [ 511, 512 ] - }, - "CFGLINKPOWERSTATE": { - "direction": "output", - "bits": [ 513, 514 ] - }, - "CFGOBFFENABLE": { - "direction": "output", - "bits": [ 515, 516 ] - }, - "CFGPHYLINKSTATUS": { - "direction": "output", - "bits": [ 517, 518 ] - }, - "CFGRCBSTATUS": { - "direction": "output", - "bits": [ 519, 520 ] - }, - "CFGTPHREQUESTERENABLE": { - "direction": "output", - "bits": [ 521, 522 ] - }, - "MIREPLAYRAMREADENABLE": { - "direction": "output", - "bits": [ 523, 524 ] - }, - "MIREPLAYRAMWRITEENABLE": { - "direction": "output", - "bits": [ 525, 526 ] - }, - "PCIERQTAGAV": { - "direction": "output", - "bits": [ 527, 528 ] - }, - "PCIETFCNPDAV": { - "direction": "output", - "bits": [ 529, 530 ] - }, - "PCIETFCNPHAV": { - "direction": "output", - "bits": [ 531, 532 ] - }, - "PIPERX0EQCONTROL": { - "direction": "output", - "bits": [ 533, 534 ] - }, - "PIPERX1EQCONTROL": { - "direction": "output", - "bits": [ 535, 536 ] - }, - "PIPERX2EQCONTROL": { - "direction": "output", - "bits": [ 537, 538 ] - }, - "PIPERX3EQCONTROL": { - "direction": "output", - "bits": [ 539, 540 ] - }, - "PIPERX4EQCONTROL": { - "direction": "output", - "bits": [ 541, 542 ] - }, - "PIPERX5EQCONTROL": { - "direction": "output", - "bits": [ 543, 544 ] - }, - "PIPERX6EQCONTROL": { - "direction": "output", - "bits": [ 545, 546 ] - }, - "PIPERX7EQCONTROL": { - "direction": "output", - "bits": [ 547, 548 ] - }, - "PIPETX0CHARISK": { - "direction": "output", - "bits": [ 549, 550 ] - }, - "PIPETX0EQCONTROL": { - "direction": "output", - "bits": [ 551, 552 ] - }, - "PIPETX0POWERDOWN": { - "direction": "output", - "bits": [ 553, 554 ] - }, - "PIPETX0SYNCHEADER": { - "direction": "output", - "bits": [ 555, 556 ] - }, - "PIPETX1CHARISK": { - "direction": "output", - "bits": [ 557, 558 ] - }, - "PIPETX1EQCONTROL": { - "direction": "output", - "bits": [ 559, 560 ] - }, - "PIPETX1POWERDOWN": { - "direction": "output", - "bits": [ 561, 562 ] - }, - "PIPETX1SYNCHEADER": { - "direction": "output", - "bits": [ 563, 564 ] - }, - "PIPETX2CHARISK": { - "direction": "output", - "bits": [ 565, 566 ] - }, - "PIPETX2EQCONTROL": { - "direction": "output", - "bits": [ 567, 568 ] - }, - "PIPETX2POWERDOWN": { - "direction": "output", - "bits": [ 569, 570 ] - }, - "PIPETX2SYNCHEADER": { - "direction": "output", - "bits": [ 571, 572 ] - }, - "PIPETX3CHARISK": { - "direction": "output", - "bits": [ 573, 574 ] - }, - "PIPETX3EQCONTROL": { - "direction": "output", - "bits": [ 575, 576 ] - }, - "PIPETX3POWERDOWN": { - "direction": "output", - "bits": [ 577, 578 ] - }, - "PIPETX3SYNCHEADER": { - "direction": "output", - "bits": [ 579, 580 ] - }, - "PIPETX4CHARISK": { - "direction": "output", - "bits": [ 581, 582 ] - }, - "PIPETX4EQCONTROL": { - "direction": "output", - "bits": [ 583, 584 ] - }, - "PIPETX4POWERDOWN": { - "direction": "output", - "bits": [ 585, 586 ] - }, - "PIPETX4SYNCHEADER": { - "direction": "output", - "bits": [ 587, 588 ] - }, - "PIPETX5CHARISK": { - "direction": "output", - "bits": [ 589, 590 ] - }, - "PIPETX5EQCONTROL": { - "direction": "output", - "bits": [ 591, 592 ] - }, - "PIPETX5POWERDOWN": { - "direction": "output", - "bits": [ 593, 594 ] - }, - "PIPETX5SYNCHEADER": { - "direction": "output", - "bits": [ 595, 596 ] - }, - "PIPETX6CHARISK": { - "direction": "output", - "bits": [ 597, 598 ] - }, - "PIPETX6EQCONTROL": { - "direction": "output", - "bits": [ 599, 600 ] - }, - "PIPETX6POWERDOWN": { - "direction": "output", - "bits": [ 601, 602 ] - }, - "PIPETX6SYNCHEADER": { - "direction": "output", - "bits": [ 603, 604 ] - }, - "PIPETX7CHARISK": { - "direction": "output", - "bits": [ 605, 606 ] - }, - "PIPETX7EQCONTROL": { - "direction": "output", - "bits": [ 607, 608 ] - }, - "PIPETX7POWERDOWN": { - "direction": "output", - "bits": [ 609, 610 ] - }, - "PIPETX7SYNCHEADER": { - "direction": "output", - "bits": [ 611, 612 ] - }, - "PIPETXRATE": { - "direction": "output", - "bits": [ 613, 614 ] - }, - "PLEQPHASE": { - "direction": "output", - "bits": [ 615, 616 ] - }, - "MAXISCQTDATA": { - "direction": "output", - "bits": [ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872 ] - }, - "MAXISRCTDATA": { - "direction": "output", - "bits": [ 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128 ] - }, - "CFGCURRENTSPEED": { - "direction": "output", - "bits": [ 1129, 1130, 1131 ] - }, - "CFGMAXPAYLOAD": { - "direction": "output", - "bits": [ 1132, 1133, 1134 ] - }, - "CFGMAXREADREQ": { - "direction": "output", - "bits": [ 1135, 1136, 1137 ] - }, - "CFGTPHFUNCTIONNUM": { - "direction": "output", - "bits": [ 1138, 1139, 1140 ] - }, - "PIPERX0EQPRESET": { - "direction": "output", - "bits": [ 1141, 1142, 1143 ] - }, - "PIPERX1EQPRESET": { - "direction": "output", - "bits": [ 1144, 1145, 1146 ] - }, - "PIPERX2EQPRESET": { - "direction": "output", - "bits": [ 1147, 1148, 1149 ] - }, - "PIPERX3EQPRESET": { - "direction": "output", - "bits": [ 1150, 1151, 1152 ] - }, - "PIPERX4EQPRESET": { - "direction": "output", - "bits": [ 1153, 1154, 1155 ] - }, - "PIPERX5EQPRESET": { - "direction": "output", - "bits": [ 1156, 1157, 1158 ] - }, - "PIPERX6EQPRESET": { - "direction": "output", - "bits": [ 1159, 1160, 1161 ] - }, - "PIPERX7EQPRESET": { - "direction": "output", - "bits": [ 1162, 1163, 1164 ] - }, - "PIPETXMARGIN": { - "direction": "output", - "bits": [ 1165, 1166, 1167 ] - }, - "CFGEXTWRITEDATA": { - "direction": "output", - "bits": [ 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199 ] - }, - "CFGINTERRUPTMSIDATA": { - "direction": "output", - "bits": [ 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231 ] - }, - "CFGMGMTREADDATA": { - "direction": "output", - "bits": [ 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263 ] - }, - "CFGTPHSTTWRITEDATA": { - "direction": "output", - "bits": [ 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295 ] - }, - "PIPETX0DATA": { - "direction": "output", - "bits": [ 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327 ] - }, - "PIPETX1DATA": { - "direction": "output", - "bits": [ 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359 ] - }, - "PIPETX2DATA": { - "direction": "output", - "bits": [ 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391 ] - }, - "PIPETX3DATA": { - "direction": "output", - "bits": [ 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423 ] - }, - "PIPETX4DATA": { - "direction": "output", - "bits": [ 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455 ] - }, - "PIPETX5DATA": { - "direction": "output", - "bits": [ 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487 ] - }, - "PIPETX6DATA": { - "direction": "output", - "bits": [ 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519 ] - }, - "PIPETX7DATA": { - "direction": "output", - "bits": [ 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551 ] - }, - "CFGEXTWRITEBYTEENABLE": { - "direction": "output", - "bits": [ 1552, 1553, 1554, 1555 ] - }, - "CFGNEGOTIATEDWIDTH": { - "direction": "output", - "bits": [ 1556, 1557, 1558, 1559 ] - }, - "CFGTPHSTTWRITEBYTEVALID": { - "direction": "output", - "bits": [ 1560, 1561, 1562, 1563 ] - }, - "MICOMPLETIONRAMREADENABLEL": { - "direction": "output", - "bits": [ 1564, 1565, 1566, 1567 ] - }, - "MICOMPLETIONRAMREADENABLEU": { - "direction": "output", - "bits": [ 1568, 1569, 1570, 1571 ] - }, - "MICOMPLETIONRAMWRITEENABLEL": { - "direction": "output", - "bits": [ 1572, 1573, 1574, 1575 ] - }, - "MICOMPLETIONRAMWRITEENABLEU": { - "direction": "output", - "bits": [ 1576, 1577, 1578, 1579 ] - }, - "MIREQUESTRAMREADENABLE": { - "direction": "output", - "bits": [ 1580, 1581, 1582, 1583 ] - }, - "MIREQUESTRAMWRITEENABLE": { - "direction": "output", - "bits": [ 1584, 1585, 1586, 1587 ] - }, - "PCIERQSEQNUM": { - "direction": "output", - "bits": [ 1588, 1589, 1590, 1591 ] - }, - "PIPERX0EQLPTXPRESET": { - "direction": "output", - "bits": [ 1592, 1593, 1594, 1595 ] - }, - "PIPERX1EQLPTXPRESET": { - "direction": "output", - "bits": [ 1596, 1597, 1598, 1599 ] - }, - "PIPERX2EQLPTXPRESET": { - "direction": "output", - "bits": [ 1600, 1601, 1602, 1603 ] - }, - "PIPERX3EQLPTXPRESET": { - "direction": "output", - "bits": [ 1604, 1605, 1606, 1607 ] - }, - "PIPERX4EQLPTXPRESET": { - "direction": "output", - "bits": [ 1608, 1609, 1610, 1611 ] - }, - "PIPERX5EQLPTXPRESET": { - "direction": "output", - "bits": [ 1612, 1613, 1614, 1615 ] - }, - "PIPERX6EQLPTXPRESET": { - "direction": "output", - "bits": [ 1616, 1617, 1618, 1619 ] - }, - "PIPERX7EQLPTXPRESET": { - "direction": "output", - "bits": [ 1620, 1621, 1622, 1623 ] - }, - "PIPETX0EQPRESET": { - "direction": "output", - "bits": [ 1624, 1625, 1626, 1627 ] - }, - "PIPETX1EQPRESET": { - "direction": "output", - "bits": [ 1628, 1629, 1630, 1631 ] - }, - "PIPETX2EQPRESET": { - "direction": "output", - "bits": [ 1632, 1633, 1634, 1635 ] - }, - "PIPETX3EQPRESET": { - "direction": "output", - "bits": [ 1636, 1637, 1638, 1639 ] - }, - "PIPETX4EQPRESET": { - "direction": "output", - "bits": [ 1640, 1641, 1642, 1643 ] - }, - "PIPETX5EQPRESET": { - "direction": "output", - "bits": [ 1644, 1645, 1646, 1647 ] - }, - "PIPETX6EQPRESET": { - "direction": "output", - "bits": [ 1648, 1649, 1650, 1651 ] - }, - "PIPETX7EQPRESET": { - "direction": "output", - "bits": [ 1652, 1653, 1654, 1655 ] - }, - "SAXISCCTREADY": { - "direction": "output", - "bits": [ 1656, 1657, 1658, 1659 ] - }, - "SAXISRQTREADY": { - "direction": "output", - "bits": [ 1660, 1661, 1662, 1663 ] - }, - "CFGMSGRECEIVEDTYPE": { - "direction": "output", - "bits": [ 1664, 1665, 1666, 1667, 1668 ] - }, - "CFGTPHSTTADDRESS": { - "direction": "output", - "bits": [ 1669, 1670, 1671, 1672, 1673 ] - }, - "CFGFUNCTIONPOWERSTATE": { - "direction": "output", - "bits": [ 1674, 1675, 1676, 1677, 1678, 1679 ] - }, - "CFGINTERRUPTMSIMMENABLE": { - "direction": "output", - "bits": [ 1680, 1681, 1682, 1683, 1684, 1685 ] - }, - "CFGINTERRUPTMSIVFENABLE": { - "direction": "output", - "bits": [ 1686, 1687, 1688, 1689, 1690, 1691 ] - }, - "CFGINTERRUPTMSIXVFENABLE": { - "direction": "output", - "bits": [ 1692, 1693, 1694, 1695, 1696, 1697 ] - }, - "CFGINTERRUPTMSIXVFMASK": { - "direction": "output", - "bits": [ 1698, 1699, 1700, 1701, 1702, 1703 ] - }, - "CFGLTSSMSTATE": { - "direction": "output", - "bits": [ 1704, 1705, 1706, 1707, 1708, 1709 ] - }, - "CFGTPHSTMODE": { - "direction": "output", - "bits": [ 1710, 1711, 1712, 1713, 1714, 1715 ] - }, - "CFGVFFLRINPROCESS": { - "direction": "output", - "bits": [ 1716, 1717, 1718, 1719, 1720, 1721 ] - }, - "CFGVFTPHREQUESTERENABLE": { - "direction": "output", - "bits": [ 1722, 1723, 1724, 1725, 1726, 1727 ] - }, - "PCIECQNPREQCOUNT": { - "direction": "output", - "bits": [ 1728, 1729, 1730, 1731, 1732, 1733 ] - }, - "PCIERQTAG": { - "direction": "output", - "bits": [ 1734, 1735, 1736, 1737, 1738, 1739 ] - }, - "PIPERX0EQLPLFFS": { - "direction": "output", - "bits": [ 1740, 1741, 1742, 1743, 1744, 1745 ] - }, - "PIPERX1EQLPLFFS": { - "direction": "output", - "bits": [ 1746, 1747, 1748, 1749, 1750, 1751 ] - }, - "PIPERX2EQLPLFFS": { - "direction": "output", - "bits": [ 1752, 1753, 1754, 1755, 1756, 1757 ] - }, - "PIPERX3EQLPLFFS": { - "direction": "output", - "bits": [ 1758, 1759, 1760, 1761, 1762, 1763 ] - }, - "PIPERX4EQLPLFFS": { - "direction": "output", - "bits": [ 1764, 1765, 1766, 1767, 1768, 1769 ] - }, - "PIPERX5EQLPLFFS": { - "direction": "output", - "bits": [ 1770, 1771, 1772, 1773, 1774, 1775 ] - }, - "PIPERX6EQLPLFFS": { - "direction": "output", - "bits": [ 1776, 1777, 1778, 1779, 1780, 1781 ] - }, - "PIPERX7EQLPLFFS": { - "direction": "output", - "bits": [ 1782, 1783, 1784, 1785, 1786, 1787 ] - }, - "PIPETX0EQDEEMPH": { - "direction": "output", - "bits": [ 1788, 1789, 1790, 1791, 1792, 1793 ] - }, - "PIPETX1EQDEEMPH": { - "direction": "output", - "bits": [ 1794, 1795, 1796, 1797, 1798, 1799 ] - }, - "PIPETX2EQDEEMPH": { - "direction": "output", - "bits": [ 1800, 1801, 1802, 1803, 1804, 1805 ] - }, - "PIPETX3EQDEEMPH": { - "direction": "output", - "bits": [ 1806, 1807, 1808, 1809, 1810, 1811 ] - }, - "PIPETX4EQDEEMPH": { - "direction": "output", - "bits": [ 1812, 1813, 1814, 1815, 1816, 1817 ] - }, - "PIPETX5EQDEEMPH": { - "direction": "output", - "bits": [ 1818, 1819, 1820, 1821, 1822, 1823 ] - }, - "PIPETX6EQDEEMPH": { - "direction": "output", - "bits": [ 1824, 1825, 1826, 1827, 1828, 1829 ] - }, - "PIPETX7EQDEEMPH": { - "direction": "output", - "bits": [ 1830, 1831, 1832, 1833, 1834, 1835 ] - }, - "MICOMPLETIONRAMWRITEDATAL": { - "direction": "output", - "bits": [ 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907 ] - }, - "MICOMPLETIONRAMWRITEDATAU": { - "direction": "output", - "bits": [ 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979 ] - }, - "MAXISRCTUSER": { - "direction": "output", - "bits": [ 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054 ] - }, - "CFGEXTFUNCTIONNUMBER": { - "direction": "output", - "bits": [ 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062 ] - }, - "CFGFCCPLH": { - "direction": "output", - "bits": [ 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070 ] - }, - "CFGFCNPH": { - "direction": "output", - "bits": [ 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078 ] - }, - "CFGFCPH": { - "direction": "output", - "bits": [ 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086 ] - }, - "CFGFUNCTIONSTATUS": { - "direction": "output", - "bits": [ 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094 ] - }, - "CFGMSGRECEIVEDDATA": { - "direction": "output", - "bits": [ 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102 ] - }, - "MAXISCQTKEEP": { - "direction": "output", - "bits": [ 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110 ] - }, - "MAXISRCTKEEP": { - "direction": "output", - "bits": [ 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118 ] - }, - "PLGEN3PCSRXSLIDE": { - "direction": "output", - "bits": [ 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126 ] - }, - "MAXISCQTUSER": { - "direction": "output", - "bits": [ 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211 ] - }, - "MIREPLAYRAMADDRESS": { - "direction": "output", - "bits": [ 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220 ] - }, - "MIREQUESTRAMREADADDRESSA": { - "direction": "output", - "bits": [ 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229 ] - }, - "MIREQUESTRAMREADADDRESSB": { - "direction": "output", - "bits": [ 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238 ] - }, - "MIREQUESTRAMWRITEADDRESSA": { - "direction": "output", - "bits": [ 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247 ] - }, - "MIREQUESTRAMWRITEADDRESSB": { - "direction": "output", - "bits": [ 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256 ] - }, - "CFGEXTREGISTERNUMBER": { - "direction": "output", - "bits": [ 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266 ] - }, - "MICOMPLETIONRAMREADADDRESSAL": { - "direction": "output", - "bits": [ 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276 ] - }, - "MICOMPLETIONRAMREADADDRESSAU": { - "direction": "output", - "bits": [ 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286 ] - }, - "MICOMPLETIONRAMREADADDRESSBL": { - "direction": "output", - "bits": [ 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296 ] - }, - "MICOMPLETIONRAMREADADDRESSBU": { - "direction": "output", - "bits": [ 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306 ] - }, - "MICOMPLETIONRAMWRITEADDRESSAL": { - "direction": "output", - "bits": [ 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316 ] - }, - "MICOMPLETIONRAMWRITEADDRESSAU": { - "direction": "output", - "bits": [ 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326 ] - }, - "MICOMPLETIONRAMWRITEADDRESSBL": { - "direction": "output", - "bits": [ 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336 ] - }, - "MICOMPLETIONRAMWRITEADDRESSBU": { - "direction": "output", - "bits": [ 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346 ] - }, - "CFGCONFIGSPACEENABLE": { - "direction": "input", - "bits": [ 2347 ] - }, - "CFGERRCORIN": { - "direction": "input", - "bits": [ 2348 ] - }, - "CFGERRUNCORIN": { - "direction": "input", - "bits": [ 2349 ] - }, - "CFGEXTREADDATAVALID": { - "direction": "input", - "bits": [ 2350 ] - }, - "CFGHOTRESETIN": { - "direction": "input", - "bits": [ 2351 ] - }, - "CFGINPUTUPDATEREQUEST": { - "direction": "input", - "bits": [ 2352 ] - }, - "CFGINTERRUPTMSITPHPRESENT": { - "direction": "input", - "bits": [ 2353 ] - }, - "CFGINTERRUPTMSIXINT": { - "direction": "input", - "bits": [ 2354 ] - }, - "CFGLINKTRAININGENABLE": { - "direction": "input", - "bits": [ 2355 ] - }, - "CFGMCUPDATEREQUEST": { - "direction": "input", - "bits": [ 2356 ] - }, - "CFGMGMTREAD": { - "direction": "input", - "bits": [ 2357 ] - }, - "CFGMGMTTYPE1CFGREGACCESS": { - "direction": "input", - "bits": [ 2358 ] - }, - "CFGMGMTWRITE": { - "direction": "input", - "bits": [ 2359 ] - }, - "CFGMSGTRANSMIT": { - "direction": "input", - "bits": [ 2360 ] - }, - "CFGPERFUNCTIONOUTPUTREQUEST": { - "direction": "input", - "bits": [ 2361 ] - }, - "CFGPOWERSTATECHANGEACK": { - "direction": "input", - "bits": [ 2362 ] - }, - "CFGREQPMTRANSITIONL23READY": { - "direction": "input", - "bits": [ 2363 ] - }, - "CFGTPHSTTREADDATAVALID": { - "direction": "input", - "bits": [ 2364 ] - }, - "CORECLK": { - "direction": "input", - "bits": [ 2365 ] - }, - "CORECLKMICOMPLETIONRAML": { - "direction": "input", - "bits": [ 2366 ] - }, - "CORECLKMICOMPLETIONRAMU": { - "direction": "input", - "bits": [ 2367 ] - }, - "CORECLKMIREPLAYRAM": { - "direction": "input", - "bits": [ 2368 ] - }, - "CORECLKMIREQUESTRAM": { - "direction": "input", - "bits": [ 2369 ] - }, - "DRPCLK": { - "direction": "input", - "bits": [ 2370 ] - }, - "DRPEN": { - "direction": "input", - "bits": [ 2371 ] - }, - "DRPWE": { - "direction": "input", - "bits": [ 2372 ] - }, - "MGMTRESETN": { - "direction": "input", - "bits": [ 2373 ] - }, - "MGMTSTICKYRESETN": { - "direction": "input", - "bits": [ 2374 ] - }, - "PCIECQNPREQ": { - "direction": "input", - "bits": [ 2375 ] - }, - "PIPECLK": { - "direction": "input", - "bits": [ 2376 ] - }, - "PIPERESETN": { - "direction": "input", - "bits": [ 2377 ] - }, - "PIPERX0DATAVALID": { - "direction": "input", - "bits": [ 2378 ] - }, - "PIPERX0ELECIDLE": { - "direction": "input", - "bits": [ 2379 ] - }, - "PIPERX0EQDONE": { - "direction": "input", - "bits": [ 2380 ] - }, - "PIPERX0EQLPADAPTDONE": { - "direction": "input", - "bits": [ 2381 ] - }, - "PIPERX0EQLPLFFSSEL": { - "direction": "input", - "bits": [ 2382 ] - }, - "PIPERX0PHYSTATUS": { - "direction": "input", - "bits": [ 2383 ] - }, - "PIPERX0STARTBLOCK": { - "direction": "input", - "bits": [ 2384 ] - }, - "PIPERX0VALID": { - "direction": "input", - "bits": [ 2385 ] - }, - "PIPERX1DATAVALID": { - "direction": "input", - "bits": [ 2386 ] - }, - "PIPERX1ELECIDLE": { - "direction": "input", - "bits": [ 2387 ] - }, - "PIPERX1EQDONE": { - "direction": "input", - "bits": [ 2388 ] - }, - "PIPERX1EQLPADAPTDONE": { - "direction": "input", - "bits": [ 2389 ] - }, - "PIPERX1EQLPLFFSSEL": { - "direction": "input", - "bits": [ 2390 ] - }, - "PIPERX1PHYSTATUS": { - "direction": "input", - "bits": [ 2391 ] - }, - "PIPERX1STARTBLOCK": { - "direction": "input", - "bits": [ 2392 ] - }, - "PIPERX1VALID": { - "direction": "input", - "bits": [ 2393 ] - }, - "PIPERX2DATAVALID": { - "direction": "input", - "bits": [ 2394 ] - }, - "PIPERX2ELECIDLE": { - "direction": "input", - "bits": [ 2395 ] - }, - "PIPERX2EQDONE": { - "direction": "input", - "bits": [ 2396 ] - }, - "PIPERX2EQLPADAPTDONE": { - "direction": "input", - "bits": [ 2397 ] - }, - "PIPERX2EQLPLFFSSEL": { - "direction": "input", - "bits": [ 2398 ] - }, - "PIPERX2PHYSTATUS": { - "direction": "input", - "bits": [ 2399 ] - }, - "PIPERX2STARTBLOCK": { - "direction": "input", - "bits": [ 2400 ] - }, - "PIPERX2VALID": { - "direction": "input", - "bits": [ 2401 ] - }, - "PIPERX3DATAVALID": { - "direction": "input", - "bits": [ 2402 ] - }, - "PIPERX3ELECIDLE": { - "direction": "input", - "bits": [ 2403 ] - }, - "PIPERX3EQDONE": { - "direction": "input", - "bits": [ 2404 ] - }, - "PIPERX3EQLPADAPTDONE": { - "direction": "input", - "bits": [ 2405 ] - }, - "PIPERX3EQLPLFFSSEL": { - "direction": "input", - "bits": [ 2406 ] - }, - "PIPERX3PHYSTATUS": { - "direction": "input", - "bits": [ 2407 ] - }, - "PIPERX3STARTBLOCK": { - "direction": "input", - "bits": [ 2408 ] - }, - "PIPERX3VALID": { - "direction": "input", - "bits": [ 2409 ] - }, - "PIPERX4DATAVALID": { - "direction": "input", - "bits": [ 2410 ] - }, - "PIPERX4ELECIDLE": { - "direction": "input", - "bits": [ 2411 ] - }, - "PIPERX4EQDONE": { - "direction": "input", - "bits": [ 2412 ] - }, - "PIPERX4EQLPADAPTDONE": { - "direction": "input", - "bits": [ 2413 ] - }, - "PIPERX4EQLPLFFSSEL": { - "direction": "input", - "bits": [ 2414 ] - }, - "PIPERX4PHYSTATUS": { - "direction": "input", - "bits": [ 2415 ] - }, - "PIPERX4STARTBLOCK": { - "direction": "input", - "bits": [ 2416 ] - }, - "PIPERX4VALID": { - "direction": "input", - "bits": [ 2417 ] - }, - "PIPERX5DATAVALID": { - "direction": "input", - "bits": [ 2418 ] - }, - "PIPERX5ELECIDLE": { - "direction": "input", - "bits": [ 2419 ] - }, - "PIPERX5EQDONE": { - "direction": "input", - "bits": [ 2420 ] - }, - "PIPERX5EQLPADAPTDONE": { - "direction": "input", - "bits": [ 2421 ] - }, - "PIPERX5EQLPLFFSSEL": { - "direction": "input", - "bits": [ 2422 ] - }, - "PIPERX5PHYSTATUS": { - "direction": "input", - "bits": [ 2423 ] - }, - "PIPERX5STARTBLOCK": { - "direction": "input", - "bits": [ 2424 ] - }, - "PIPERX5VALID": { - "direction": "input", - "bits": [ 2425 ] - }, - "PIPERX6DATAVALID": { - "direction": "input", - "bits": [ 2426 ] - }, - "PIPERX6ELECIDLE": { - "direction": "input", - "bits": [ 2427 ] - }, - "PIPERX6EQDONE": { - "direction": "input", - "bits": [ 2428 ] - }, - "PIPERX6EQLPADAPTDONE": { - "direction": "input", - "bits": [ 2429 ] - }, - "PIPERX6EQLPLFFSSEL": { - "direction": "input", - "bits": [ 2430 ] - }, - "PIPERX6PHYSTATUS": { - "direction": "input", - "bits": [ 2431 ] - }, - "PIPERX6STARTBLOCK": { - "direction": "input", - "bits": [ 2432 ] - }, - "PIPERX6VALID": { - "direction": "input", - "bits": [ 2433 ] - }, - "PIPERX7DATAVALID": { - "direction": "input", - "bits": [ 2434 ] - }, - "PIPERX7ELECIDLE": { - "direction": "input", - "bits": [ 2435 ] - }, - "PIPERX7EQDONE": { - "direction": "input", - "bits": [ 2436 ] - }, - "PIPERX7EQLPADAPTDONE": { - "direction": "input", - "bits": [ 2437 ] - }, - "PIPERX7EQLPLFFSSEL": { - "direction": "input", - "bits": [ 2438 ] - }, - "PIPERX7PHYSTATUS": { - "direction": "input", - "bits": [ 2439 ] - }, - "PIPERX7STARTBLOCK": { - "direction": "input", - "bits": [ 2440 ] - }, - "PIPERX7VALID": { - "direction": "input", - "bits": [ 2441 ] - }, - "PIPETX0EQDONE": { - "direction": "input", - "bits": [ 2442 ] - }, - "PIPETX1EQDONE": { - "direction": "input", - "bits": [ 2443 ] - }, - "PIPETX2EQDONE": { - "direction": "input", - "bits": [ 2444 ] - }, - "PIPETX3EQDONE": { - "direction": "input", - "bits": [ 2445 ] - }, - "PIPETX4EQDONE": { - "direction": "input", - "bits": [ 2446 ] - }, - "PIPETX5EQDONE": { - "direction": "input", - "bits": [ 2447 ] - }, - "PIPETX6EQDONE": { - "direction": "input", - "bits": [ 2448 ] - }, - "PIPETX7EQDONE": { - "direction": "input", - "bits": [ 2449 ] - }, - "PLDISABLESCRAMBLER": { - "direction": "input", - "bits": [ 2450 ] - }, - "PLEQRESETEIEOSCOUNT": { - "direction": "input", - "bits": [ 2451 ] - }, - "PLGEN3PCSDISABLE": { - "direction": "input", - "bits": [ 2452 ] - }, - "RECCLK": { - "direction": "input", - "bits": [ 2453 ] - }, - "RESETN": { - "direction": "input", - "bits": [ 2454 ] - }, - "SAXISCCTLAST": { - "direction": "input", - "bits": [ 2455 ] - }, - "SAXISCCTVALID": { - "direction": "input", - "bits": [ 2456 ] - }, - "SAXISRQTLAST": { - "direction": "input", - "bits": [ 2457 ] - }, - "SAXISRQTVALID": { - "direction": "input", - "bits": [ 2458 ] - }, - "USERCLK": { - "direction": "input", - "bits": [ 2459 ] - }, - "DRPADDR": { - "direction": "input", - "bits": [ 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470 ] - }, - "MICOMPLETIONRAMREADDATA": { - "direction": "input", - "bits": [ 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614 ] - }, - "MIREPLAYRAMREADDATA": { - "direction": "input", - "bits": [ 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758 ] - }, - "MIREQUESTRAMREADDATA": { - "direction": "input", - "bits": [ 2759, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902 ] - }, - "CFGDEVID": { - "direction": "input", - "bits": [ 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918 ] - }, - "CFGSUBSYSID": { - "direction": "input", - "bits": [ 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930, 2931, 2932, 2933, 2934 ] - }, - "CFGSUBSYSVENDID": { - "direction": "input", - "bits": [ 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950 ] - }, - "CFGVENDID": { - "direction": "input", - "bits": [ 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966 ] - }, - "DRPDI": { - "direction": "input", - "bits": [ 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982 ] - }, - "PIPERX0EQLPNEWTXCOEFFORPRESET": { - "direction": "input", - "bits": [ 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3000 ] - }, - "PIPERX1EQLPNEWTXCOEFFORPRESET": { - "direction": "input", - "bits": [ 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018 ] - }, - "PIPERX2EQLPNEWTXCOEFFORPRESET": { - "direction": "input", - "bits": [ 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036 ] - }, - "PIPERX3EQLPNEWTXCOEFFORPRESET": { - "direction": "input", - "bits": [ 3037, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054 ] - }, - "PIPERX4EQLPNEWTXCOEFFORPRESET": { - "direction": "input", - "bits": [ 3055, 3056, 3057, 3058, 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072 ] - }, - "PIPERX5EQLPNEWTXCOEFFORPRESET": { - "direction": "input", - "bits": [ 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090 ] - }, - "PIPERX6EQLPNEWTXCOEFFORPRESET": { - "direction": "input", - "bits": [ 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108 ] - }, - "PIPERX7EQLPNEWTXCOEFFORPRESET": { - "direction": "input", - "bits": [ 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126 ] - }, - "PIPETX0EQCOEFF": { - "direction": "input", - "bits": [ 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144 ] - }, - "PIPETX1EQCOEFF": { - "direction": "input", - "bits": [ 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162 ] - }, - "PIPETX2EQCOEFF": { - "direction": "input", - "bits": [ 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180 ] - }, - "PIPETX3EQCOEFF": { - "direction": "input", - "bits": [ 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198 ] - }, - "PIPETX4EQCOEFF": { - "direction": "input", - "bits": [ 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216 ] - }, - "PIPETX5EQCOEFF": { - "direction": "input", - "bits": [ 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234 ] - }, - "PIPETX6EQCOEFF": { - "direction": "input", - "bits": [ 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250, 3251, 3252 ] - }, - "PIPETX7EQCOEFF": { - "direction": "input", - "bits": [ 3253, 3254, 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270 ] - }, - "CFGMGMTADDR": { - "direction": "input", - "bits": [ 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289 ] - }, - "CFGFLRDONE": { - "direction": "input", - "bits": [ 3290, 3291 ] - }, - "CFGINTERRUPTMSITPHTYPE": { - "direction": "input", - "bits": [ 3292, 3293 ] - }, - "CFGINTERRUPTPENDING": { - "direction": "input", - "bits": [ 3294, 3295 ] - }, - "PIPERX0CHARISK": { - "direction": "input", - "bits": [ 3296, 3297 ] - }, - "PIPERX0SYNCHEADER": { - "direction": "input", - "bits": [ 3298, 3299 ] - }, - "PIPERX1CHARISK": { - "direction": "input", - "bits": [ 3300, 3301 ] - }, - "PIPERX1SYNCHEADER": { - "direction": "input", - "bits": [ 3302, 3303 ] - }, - "PIPERX2CHARISK": { - "direction": "input", - "bits": [ 3304, 3305 ] - }, - "PIPERX2SYNCHEADER": { - "direction": "input", - "bits": [ 3306, 3307 ] - }, - "PIPERX3CHARISK": { - "direction": "input", - "bits": [ 3308, 3309 ] - }, - "PIPERX3SYNCHEADER": { - "direction": "input", - "bits": [ 3310, 3311 ] - }, - "PIPERX4CHARISK": { - "direction": "input", - "bits": [ 3312, 3313 ] - }, - "PIPERX4SYNCHEADER": { - "direction": "input", - "bits": [ 3314, 3315 ] - }, - "PIPERX5CHARISK": { - "direction": "input", - "bits": [ 3316, 3317 ] - }, - "PIPERX5SYNCHEADER": { - "direction": "input", - "bits": [ 3318, 3319 ] - }, - "PIPERX6CHARISK": { - "direction": "input", - "bits": [ 3320, 3321 ] - }, - "PIPERX6SYNCHEADER": { - "direction": "input", - "bits": [ 3322, 3323 ] - }, - "PIPERX7CHARISK": { - "direction": "input", - "bits": [ 3324, 3325 ] - }, - "PIPERX7SYNCHEADER": { - "direction": "input", - "bits": [ 3326, 3327 ] - }, - "MAXISCQTREADY": { - "direction": "input", - "bits": [ 3328, 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349 ] - }, - "MAXISRCTREADY": { - "direction": "input", - "bits": [ 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371 ] - }, - "SAXISCCTDATA": { - "direction": "input", - "bits": [ 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627 ] - }, - "SAXISRQTDATA": { - "direction": "input", - "bits": [ 3628, 3629, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3839, 3840, 3841, 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3849, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 3880, 3881, 3882, 3883 ] - }, - "CFGDSFUNCTIONNUMBER": { - "direction": "input", - "bits": [ 3884, 3885, 3886 ] - }, - "CFGFCSEL": { - "direction": "input", - "bits": [ 3887, 3888, 3889 ] - }, - "CFGINTERRUPTMSIATTR": { - "direction": "input", - "bits": [ 3890, 3891, 3892 ] - }, - "CFGINTERRUPTMSIFUNCTIONNUMBER": { - "direction": "input", - "bits": [ 3893, 3894, 3895 ] - }, - "CFGMSGTRANSMITTYPE": { - "direction": "input", - "bits": [ 3896, 3897, 3898 ] - }, - "CFGPERFUNCSTATUSCONTROL": { - "direction": "input", - "bits": [ 3899, 3900, 3901 ] - }, - "CFGPERFUNCTIONNUMBER": { - "direction": "input", - "bits": [ 3902, 3903, 3904 ] - }, - "PIPERX0STATUS": { - "direction": "input", - "bits": [ 3905, 3906, 3907 ] - }, - "PIPERX1STATUS": { - "direction": "input", - "bits": [ 3908, 3909, 3910 ] - }, - "PIPERX2STATUS": { - "direction": "input", - "bits": [ 3911, 3912, 3913 ] - }, - "PIPERX3STATUS": { - "direction": "input", - "bits": [ 3914, 3915, 3916 ] - }, - "PIPERX4STATUS": { - "direction": "input", - "bits": [ 3917, 3918, 3919 ] - }, - "PIPERX5STATUS": { - "direction": "input", - "bits": [ 3920, 3921, 3922 ] - }, - "PIPERX6STATUS": { - "direction": "input", - "bits": [ 3923, 3924, 3925 ] - }, - "PIPERX7STATUS": { - "direction": "input", - "bits": [ 3926, 3927, 3928 ] - }, - "CFGEXTREADDATA": { - "direction": "input", - "bits": [ 3929, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 3960 ] - }, - "CFGINTERRUPTMSIINT": { - "direction": "input", - "bits": [ 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 3990, 3991, 3992 ] - }, - "CFGINTERRUPTMSIXDATA": { - "direction": "input", - "bits": [ 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4024 ] - }, - "CFGMGMTWRITEDATA": { - "direction": "input", - "bits": [ 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 4053, 4054, 4055, 4056 ] - }, - "CFGMSGTRANSMITDATA": { - "direction": "input", - "bits": [ 4057, 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4079, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088 ] - }, - "CFGTPHSTTREADDATA": { - "direction": "input", - "bits": [ 4089, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4120 ] - }, - "PIPERX0DATA": { - "direction": "input", - "bits": [ 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152 ] - }, - "PIPERX1DATA": { - "direction": "input", - "bits": [ 4153, 4154, 4155, 4156, 4157, 4158, 4159, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178, 4179, 4180, 4181, 4182, 4183, 4184 ] - }, - "PIPERX2DATA": { - "direction": "input", - "bits": [ 4185, 4186, 4187, 4188, 4189, 4190, 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, 4209, 4210, 4211, 4212, 4213, 4214, 4215, 4216 ] - }, - "PIPERX3DATA": { - "direction": "input", - "bits": [ 4217, 4218, 4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248 ] - }, - "PIPERX4DATA": { - "direction": "input", - "bits": [ 4249, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280 ] - }, - "PIPERX5DATA": { - "direction": "input", - "bits": [ 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307, 4308, 4309, 4310, 4311, 4312 ] - }, - "PIPERX6DATA": { - "direction": "input", - "bits": [ 4313, 4314, 4315, 4316, 4317, 4318, 4319, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344 ] - }, - "PIPERX7DATA": { - "direction": "input", - "bits": [ 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376 ] - }, - "SAXISCCTUSER": { - "direction": "input", - "bits": [ 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409 ] - }, - "CFGINTERRUPTINT": { - "direction": "input", - "bits": [ 4410, 4411, 4412, 4413 ] - }, - "CFGINTERRUPTMSISELECT": { - "direction": "input", - "bits": [ 4414, 4415, 4416, 4417 ] - }, - "CFGMGMTBYTEENABLE": { - "direction": "input", - "bits": [ 4418, 4419, 4420, 4421 ] - }, - "CFGDSDEVICENUMBER": { - "direction": "input", - "bits": [ 4422, 4423, 4424, 4425, 4426 ] - }, - "SAXISRQTUSER": { - "direction": "input", - "bits": [ 4427, 4428, 4429, 4430, 4431, 4432, 4433, 4434, 4435, 4436, 4437, 4438, 4439, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 4465, 4466, 4467, 4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 4480, 4481, 4482, 4483, 4484, 4485, 4486 ] - }, - "CFGVFFLRDONE": { - "direction": "input", - "bits": [ 4487, 4488, 4489, 4490, 4491, 4492 ] - }, - "PIPEEQFS": { - "direction": "input", - "bits": [ 4493, 4494, 4495, 4496, 4497, 4498 ] - }, - "PIPEEQLF": { - "direction": "input", - "bits": [ 4499, 4500, 4501, 4502, 4503, 4504 ] - }, - "CFGDSN": { - "direction": "input", - "bits": [ 4505, 4506, 4507, 4508, 4509, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562, 4563, 4564, 4565, 4566, 4567, 4568 ] - }, - "CFGINTERRUPTMSIPENDINGSTATUS": { - "direction": "input", - "bits": [ 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, 4589, 4590, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, 4601, 4602, 4603, 4604, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 4630, 4631, 4632 ] - }, - "CFGINTERRUPTMSIXADDRESS": { - "direction": "input", - "bits": [ 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696 ] - }, - "CFGDSBUSNUMBER": { - "direction": "input", - "bits": [ 4697, 4698, 4699, 4700, 4701, 4702, 4703, 4704 ] - }, - "CFGDSPORTNUMBER": { - "direction": "input", - "bits": [ 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712 ] - }, - "CFGREVID": { - "direction": "input", - "bits": [ 4713, 4714, 4715, 4716, 4717, 4718, 4719, 4720 ] - }, - "PLGEN3PCSRXSYNCDONE": { - "direction": "input", - "bits": [ 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728 ] - }, - "SAXISCCTKEEP": { - "direction": "input", - "bits": [ 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736 ] - }, - "SAXISRQTKEEP": { - "direction": "input", - "bits": [ 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744 ] - }, - "CFGINTERRUPTMSITPHSTTAG": { - "direction": "input", - "bits": [ 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753 ] - } - }, - "cells": { - }, - "netnames": { - "CFGCONFIGSPACEENABLE": { - "hide_name": 0, - "bits": [ 2347 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3102" - } - }, - "CFGCURRENTSPEED": { - "hide_name": 0, - "bits": [ 1129, 1130, 1131 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2993" - } - }, - "CFGDEVID": { - "hide_name": 0, - "bits": [ 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3219" - } - }, - "CFGDPASUBSTATECHANGE": { - "hide_name": 0, - "bits": [ 503, 504 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2934" - } - }, - "CFGDSBUSNUMBER": { - "hide_name": 0, - "bits": [ 4697, 4698, 4699, 4700, 4701, 4702, 4703, 4704 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3305" - } - }, - "CFGDSDEVICENUMBER": { - "hide_name": 0, - "bits": [ 4422, 4423, 4424, 4425, 4426 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3297" - } - }, - "CFGDSFUNCTIONNUMBER": { - "hide_name": 0, - "bits": [ 3884, 3885, 3886 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3264" - } - }, - "CFGDSN": { - "hide_name": 0, - "bits": [ 4505, 4506, 4507, 4508, 4509, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562, 4563, 4564, 4565, 4566, 4567, 4568 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3302" - } - }, - "CFGDSPORTNUMBER": { - "hide_name": 0, - "bits": [ 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3306" - } - }, - "CFGERRCORIN": { - "hide_name": 0, - "bits": [ 2348 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3103" - } - }, - "CFGERRCOROUT": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2842" - } - }, - "CFGERRFATALOUT": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2843" - } - }, - "CFGERRNONFATALOUT": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2844" - } - }, - "CFGERRUNCORIN": { - "hide_name": 0, - "bits": [ 2349 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3104" - } - }, - "CFGEXTFUNCTIONNUMBER": { - "hide_name": 0, - "bits": [ 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3078" - } - }, - "CFGEXTREADDATA": { - "hide_name": 0, - "bits": [ 3929, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 3960 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3279" - } - }, - "CFGEXTREADDATAVALID": { - "hide_name": 0, - "bits": [ 2350 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3105" - } - }, - "CFGEXTREADRECEIVED": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2845" - } - }, - "CFGEXTREGISTERNUMBER": { - "hide_name": 0, - "bits": [ 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3093" - } - }, - "CFGEXTWRITEBYTEENABLE": { - "hide_name": 0, - "bits": [ 1552, 1553, 1554, 1555 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3018" - } - }, - "CFGEXTWRITEDATA": { - "hide_name": 0, - "bits": [ 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3006" - } - }, - "CFGEXTWRITERECEIVED": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2846" - } - }, - "CFGFCCPLD": { - "hide_name": 0, - "bits": [ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2923" - } - }, - "CFGFCCPLH": { - "hide_name": 0, - "bits": [ 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3079" - } - }, - "CFGFCNPD": { - "hide_name": 0, - "bits": [ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2924" - } - }, - "CFGFCNPH": { - "hide_name": 0, - "bits": [ 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3080" - } - }, - "CFGFCPD": { - "hide_name": 0, - "bits": [ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2925" - } - }, - "CFGFCPH": { - "hide_name": 0, - "bits": [ 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3081" - } - }, - "CFGFCSEL": { - "hide_name": 0, - "bits": [ 3887, 3888, 3889 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3265" - } - }, - "CFGFLRDONE": { - "hide_name": 0, - "bits": [ 3290, 3291 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3241" - } - }, - "CFGFLRINPROCESS": { - "hide_name": 0, - "bits": [ 505, 506 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2935" - } - }, - "CFGFUNCTIONPOWERSTATE": { - "hide_name": 0, - "bits": [ 1674, 1675, 1676, 1677, 1678, 1679 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3048" - } - }, - "CFGFUNCTIONSTATUS": { - "hide_name": 0, - "bits": [ 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3082" - } - }, - "CFGHOTRESETIN": { - "hide_name": 0, - "bits": [ 2351 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3106" - } - }, - "CFGHOTRESETOUT": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2847" - } - }, - "CFGINPUTUPDATEDONE": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2848" - } - }, - "CFGINPUTUPDATEREQUEST": { - "hide_name": 0, - "bits": [ 2352 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3107" - } - }, - "CFGINTERRUPTAOUTPUT": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2849" - } - }, - "CFGINTERRUPTBOUTPUT": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2850" - } - }, - "CFGINTERRUPTCOUTPUT": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2851" - } - }, - "CFGINTERRUPTDOUTPUT": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2852" - } - }, - "CFGINTERRUPTINT": { - "hide_name": 0, - "bits": [ 4410, 4411, 4412, 4413 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3294" - } - }, - "CFGINTERRUPTMSIATTR": { - "hide_name": 0, - "bits": [ 3890, 3891, 3892 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3266" - } - }, - "CFGINTERRUPTMSIDATA": { - "hide_name": 0, - "bits": [ 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3007" - } - }, - "CFGINTERRUPTMSIENABLE": { - "hide_name": 0, - "bits": [ 507, 508 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2936" - } - }, - "CFGINTERRUPTMSIFAIL": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2853" - } - }, - "CFGINTERRUPTMSIFUNCTIONNUMBER": { - "hide_name": 0, - "bits": [ 3893, 3894, 3895 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3267" - } - }, - "CFGINTERRUPTMSIINT": { - "hide_name": 0, - "bits": [ 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 3990, 3991, 3992 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3280" - } - }, - "CFGINTERRUPTMSIMASKUPDATE": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2854" - } - }, - "CFGINTERRUPTMSIMMENABLE": { - "hide_name": 0, - "bits": [ 1680, 1681, 1682, 1683, 1684, 1685 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3049" - } - }, - "CFGINTERRUPTMSIPENDINGSTATUS": { - "hide_name": 0, - "bits": [ 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, 4589, 4590, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, 4601, 4602, 4603, 4604, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 4630, 4631, 4632 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3303" - } - }, - "CFGINTERRUPTMSISELECT": { - "hide_name": 0, - "bits": [ 4414, 4415, 4416, 4417 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3295" - } - }, - "CFGINTERRUPTMSISENT": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2855" - } - }, - "CFGINTERRUPTMSITPHPRESENT": { - "hide_name": 0, - "bits": [ 2353 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3108" - } - }, - "CFGINTERRUPTMSITPHSTTAG": { - "hide_name": 0, - "bits": [ 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3311" - } - }, - "CFGINTERRUPTMSITPHTYPE": { - "hide_name": 0, - "bits": [ 3292, 3293 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3242" - } - }, - "CFGINTERRUPTMSIVFENABLE": { - "hide_name": 0, - "bits": [ 1686, 1687, 1688, 1689, 1690, 1691 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3050" - } - }, - "CFGINTERRUPTMSIXADDRESS": { - "hide_name": 0, - "bits": [ 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3304" - } - }, - "CFGINTERRUPTMSIXDATA": { - "hide_name": 0, - "bits": [ 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4024 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3281" - } - }, - "CFGINTERRUPTMSIXENABLE": { - "hide_name": 0, - "bits": [ 509, 510 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2937" - } - }, - "CFGINTERRUPTMSIXFAIL": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2856" - } - }, - "CFGINTERRUPTMSIXINT": { - "hide_name": 0, - "bits": [ 2354 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3109" - } - }, - "CFGINTERRUPTMSIXMASK": { - "hide_name": 0, - "bits": [ 511, 512 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2938" - } - }, - "CFGINTERRUPTMSIXSENT": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2857" - } - }, - "CFGINTERRUPTMSIXVFENABLE": { - "hide_name": 0, - "bits": [ 1692, 1693, 1694, 1695, 1696, 1697 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3051" - } - }, - "CFGINTERRUPTMSIXVFMASK": { - "hide_name": 0, - "bits": [ 1698, 1699, 1700, 1701, 1702, 1703 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3052" - } - }, - "CFGINTERRUPTPENDING": { - "hide_name": 0, - "bits": [ 3294, 3295 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3243" - } - }, - "CFGINTERRUPTSENT": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2858" - } - }, - "CFGLINKPOWERSTATE": { - "hide_name": 0, - "bits": [ 513, 514 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2939" - } - }, - "CFGLINKTRAININGENABLE": { - "hide_name": 0, - "bits": [ 2355 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3110" - } - }, - "CFGLOCALERROR": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2859" - } - }, - "CFGLTRENABLE": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2860" - } - }, - "CFGLTSSMSTATE": { - "hide_name": 0, - "bits": [ 1704, 1705, 1706, 1707, 1708, 1709 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3053" - } - }, - "CFGMAXPAYLOAD": { - "hide_name": 0, - "bits": [ 1132, 1133, 1134 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2994" - } - }, - "CFGMAXREADREQ": { - "hide_name": 0, - "bits": [ 1135, 1136, 1137 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2995" - } - }, - "CFGMCUPDATEDONE": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2861" - } - }, - "CFGMCUPDATEREQUEST": { - "hide_name": 0, - "bits": [ 2356 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3111" - } - }, - "CFGMGMTADDR": { - "hide_name": 0, - "bits": [ 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3240" - } - }, - "CFGMGMTBYTEENABLE": { - "hide_name": 0, - "bits": [ 4418, 4419, 4420, 4421 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3296" - } - }, - "CFGMGMTREAD": { - "hide_name": 0, - "bits": [ 2357 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3112" - } - }, - "CFGMGMTREADDATA": { - "hide_name": 0, - "bits": [ 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3008" - } - }, - "CFGMGMTREADWRITEDONE": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2862" - } - }, - "CFGMGMTTYPE1CFGREGACCESS": { - "hide_name": 0, - "bits": [ 2358 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3113" - } - }, - "CFGMGMTWRITE": { - "hide_name": 0, - "bits": [ 2359 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3114" - } - }, - "CFGMGMTWRITEDATA": { - "hide_name": 0, - "bits": [ 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 4053, 4054, 4055, 4056 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3282" - } - }, - "CFGMSGRECEIVED": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2863" - } - }, - "CFGMSGRECEIVEDDATA": { - "hide_name": 0, - "bits": [ 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3083" - } - }, - "CFGMSGRECEIVEDTYPE": { - "hide_name": 0, - "bits": [ 1664, 1665, 1666, 1667, 1668 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3046" - } - }, - "CFGMSGTRANSMIT": { - "hide_name": 0, - "bits": [ 2360 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3115" - } - }, - "CFGMSGTRANSMITDATA": { - "hide_name": 0, - "bits": [ 4057, 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4079, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3283" - } - }, - "CFGMSGTRANSMITDONE": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2864" - } - }, - "CFGMSGTRANSMITTYPE": { - "hide_name": 0, - "bits": [ 3896, 3897, 3898 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3268" - } - }, - "CFGNEGOTIATEDWIDTH": { - "hide_name": 0, - "bits": [ 1556, 1557, 1558, 1559 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3019" - } - }, - "CFGOBFFENABLE": { - "hide_name": 0, - "bits": [ 515, 516 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2940" - } - }, - "CFGPERFUNCSTATUSCONTROL": { - "hide_name": 0, - "bits": [ 3899, 3900, 3901 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3269" - } - }, - "CFGPERFUNCSTATUSDATA": { - "hide_name": 0, - "bits": [ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2929" - } - }, - "CFGPERFUNCTIONNUMBER": { - "hide_name": 0, - "bits": [ 3902, 3903, 3904 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3270" - } - }, - "CFGPERFUNCTIONOUTPUTREQUEST": { - "hide_name": 0, - "bits": [ 2361 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3116" - } - }, - "CFGPERFUNCTIONUPDATEDONE": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2865" - } - }, - "CFGPHYLINKDOWN": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2866" - } - }, - "CFGPHYLINKSTATUS": { - "hide_name": 0, - "bits": [ 517, 518 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2941" - } - }, - "CFGPLSTATUSCHANGE": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2867" - } - }, - "CFGPOWERSTATECHANGEACK": { - "hide_name": 0, - "bits": [ 2362 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3117" - } - }, - "CFGPOWERSTATECHANGEINTERRUPT": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2868" - } - }, - "CFGRCBSTATUS": { - "hide_name": 0, - "bits": [ 519, 520 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2942" - } - }, - "CFGREQPMTRANSITIONL23READY": { - "hide_name": 0, - "bits": [ 2363 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3118" - } - }, - "CFGREVID": { - "hide_name": 0, - "bits": [ 4713, 4714, 4715, 4716, 4717, 4718, 4719, 4720 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3307" - } - }, - "CFGSUBSYSID": { - "hide_name": 0, - "bits": [ 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930, 2931, 2932, 2933, 2934 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3220" - } - }, - "CFGSUBSYSVENDID": { - "hide_name": 0, - "bits": [ 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3221" - } - }, - "CFGTPHFUNCTIONNUM": { - "hide_name": 0, - "bits": [ 1138, 1139, 1140 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2996" - } - }, - "CFGTPHREQUESTERENABLE": { - "hide_name": 0, - "bits": [ 521, 522 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2943" - } - }, - "CFGTPHSTMODE": { - "hide_name": 0, - "bits": [ 1710, 1711, 1712, 1713, 1714, 1715 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3054" - } - }, - "CFGTPHSTTADDRESS": { - "hide_name": 0, - "bits": [ 1669, 1670, 1671, 1672, 1673 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3047" - } - }, - "CFGTPHSTTREADDATA": { - "hide_name": 0, - "bits": [ 4089, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4120 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3284" - } - }, - "CFGTPHSTTREADDATAVALID": { - "hide_name": 0, - "bits": [ 2364 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3119" - } - }, - "CFGTPHSTTREADENABLE": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2869" - } - }, - "CFGTPHSTTWRITEBYTEVALID": { - "hide_name": 0, - "bits": [ 1560, 1561, 1562, 1563 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3020" - } - }, - "CFGTPHSTTWRITEDATA": { - "hide_name": 0, - "bits": [ 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3009" - } - }, - "CFGTPHSTTWRITEENABLE": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2870" - } - }, - "CFGVENDID": { - "hide_name": 0, - "bits": [ 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3222" - } - }, - "CFGVFFLRDONE": { - "hide_name": 0, - "bits": [ 4487, 4488, 4489, 4490, 4491, 4492 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3299" - } - }, - "CFGVFFLRINPROCESS": { - "hide_name": 0, - "bits": [ 1716, 1717, 1718, 1719, 1720, 1721 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3055" - } - }, - "CFGVFPOWERSTATE": { - "hide_name": 0, - "bits": [ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2932" - } - }, - "CFGVFSTATUS": { - "hide_name": 0, - "bits": [ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2926" - } - }, - "CFGVFTPHREQUESTERENABLE": { - "hide_name": 0, - "bits": [ 1722, 1723, 1724, 1725, 1726, 1727 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3056" - } - }, - "CFGVFTPHSTMODE": { - "hide_name": 0, - "bits": [ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2933" - } - }, - "CORECLK": { - "hide_name": 0, - "bits": [ 2365 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3120" - } - }, - "CORECLKMICOMPLETIONRAML": { - "hide_name": 0, - "bits": [ 2366 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3121" - } - }, - "CORECLKMICOMPLETIONRAMU": { - "hide_name": 0, - "bits": [ 2367 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3122" - } - }, - "CORECLKMIREPLAYRAM": { - "hide_name": 0, - "bits": [ 2368 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3123" - } - }, - "CORECLKMIREQUESTRAM": { - "hide_name": 0, - "bits": [ 2369 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3124" - } - }, - "DBGDATAOUT": { - "hide_name": 0, - "bits": [ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2930" - } - }, - "DRPADDR": { - "hide_name": 0, - "bits": [ 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3215" - } - }, - "DRPCLK": { - "hide_name": 0, - "bits": [ 2370 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3125" - } - }, - "DRPDI": { - "hide_name": 0, - "bits": [ 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3223" - } - }, - "DRPDO": { - "hide_name": 0, - "bits": [ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2931" - } - }, - "DRPEN": { - "hide_name": 0, - "bits": [ 2371 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3126" - } - }, - "DRPRDY": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2871" - } - }, - "DRPWE": { - "hide_name": 0, - "bits": [ 2372 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3127" - } - }, - "MAXISCQTDATA": { - "hide_name": 0, - "bits": [ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2991" - } - }, - "MAXISCQTKEEP": { - "hide_name": 0, - "bits": [ 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3084" - } - }, - "MAXISCQTLAST": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2872" - } - }, - "MAXISCQTREADY": { - "hide_name": 0, - "bits": [ 3328, 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3260" - } - }, - "MAXISCQTUSER": { - "hide_name": 0, - "bits": [ 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3087" - } - }, - "MAXISCQTVALID": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2873" - } - }, - "MAXISRCTDATA": { - "hide_name": 0, - "bits": [ 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2992" - } - }, - "MAXISRCTKEEP": { - "hide_name": 0, - "bits": [ 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3085" - } - }, - "MAXISRCTLAST": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2874" - } - }, - "MAXISRCTREADY": { - "hide_name": 0, - "bits": [ 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3261" - } - }, - "MAXISRCTUSER": { - "hide_name": 0, - "bits": [ 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3077" - } - }, - "MAXISRCTVALID": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2875" - } - }, - "MGMTRESETN": { - "hide_name": 0, - "bits": [ 2373 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3128" - } - }, - "MGMTSTICKYRESETN": { - "hide_name": 0, - "bits": [ 2374 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3129" - } - }, - "MICOMPLETIONRAMREADADDRESSAL": { - "hide_name": 0, - "bits": [ 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3094" - } - }, - "MICOMPLETIONRAMREADADDRESSAU": { - "hide_name": 0, - "bits": [ 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3095" - } - }, - "MICOMPLETIONRAMREADADDRESSBL": { - "hide_name": 0, - "bits": [ 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3096" - } - }, - "MICOMPLETIONRAMREADADDRESSBU": { - "hide_name": 0, - "bits": [ 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3097" - } - }, - "MICOMPLETIONRAMREADDATA": { - "hide_name": 0, - "bits": [ 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3216" - } - }, - "MICOMPLETIONRAMREADENABLEL": { - "hide_name": 0, - "bits": [ 1564, 1565, 1566, 1567 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3021" - } - }, - "MICOMPLETIONRAMREADENABLEU": { - "hide_name": 0, - "bits": [ 1568, 1569, 1570, 1571 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3022" - } - }, - "MICOMPLETIONRAMWRITEADDRESSAL": { - "hide_name": 0, - "bits": [ 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3098" - } - }, - "MICOMPLETIONRAMWRITEADDRESSAU": { - "hide_name": 0, - "bits": [ 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3099" - } - }, - "MICOMPLETIONRAMWRITEADDRESSBL": { - "hide_name": 0, - "bits": [ 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3100" - } - }, - "MICOMPLETIONRAMWRITEADDRESSBU": { - "hide_name": 0, - "bits": [ 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3101" - } - }, - "MICOMPLETIONRAMWRITEDATAL": { - "hide_name": 0, - "bits": [ 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3075" - } - }, - "MICOMPLETIONRAMWRITEDATAU": { - "hide_name": 0, - "bits": [ 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3076" - } - }, - "MICOMPLETIONRAMWRITEENABLEL": { - "hide_name": 0, - "bits": [ 1572, 1573, 1574, 1575 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3023" - } - }, - "MICOMPLETIONRAMWRITEENABLEU": { - "hide_name": 0, - "bits": [ 1576, 1577, 1578, 1579 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3024" - } - }, - "MIREPLAYRAMADDRESS": { - "hide_name": 0, - "bits": [ 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3088" - } - }, - "MIREPLAYRAMREADDATA": { - "hide_name": 0, - "bits": [ 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3217" - } - }, - "MIREPLAYRAMREADENABLE": { - "hide_name": 0, - "bits": [ 523, 524 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2944" - } - }, - "MIREPLAYRAMWRITEDATA": { - "hide_name": 0, - "bits": [ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2927" - } - }, - "MIREPLAYRAMWRITEENABLE": { - "hide_name": 0, - "bits": [ 525, 526 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2945" - } - }, - "MIREQUESTRAMREADADDRESSA": { - "hide_name": 0, - "bits": [ 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3089" - } - }, - "MIREQUESTRAMREADADDRESSB": { - "hide_name": 0, - "bits": [ 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3090" - } - }, - "MIREQUESTRAMREADDATA": { - "hide_name": 0, - "bits": [ 2759, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3218" - } - }, - "MIREQUESTRAMREADENABLE": { - "hide_name": 0, - "bits": [ 1580, 1581, 1582, 1583 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3025" - } - }, - "MIREQUESTRAMWRITEADDRESSA": { - "hide_name": 0, - "bits": [ 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3091" - } - }, - "MIREQUESTRAMWRITEADDRESSB": { - "hide_name": 0, - "bits": [ 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3092" - } - }, - "MIREQUESTRAMWRITEDATA": { - "hide_name": 0, - "bits": [ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2928" - } - }, - "MIREQUESTRAMWRITEENABLE": { - "hide_name": 0, - "bits": [ 1584, 1585, 1586, 1587 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3026" - } - }, - "PCIECQNPREQ": { - "hide_name": 0, - "bits": [ 2375 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3130" - } - }, - "PCIECQNPREQCOUNT": { - "hide_name": 0, - "bits": [ 1728, 1729, 1730, 1731, 1732, 1733 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3057" - } - }, - "PCIERQSEQNUM": { - "hide_name": 0, - "bits": [ 1588, 1589, 1590, 1591 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3027" - } - }, - "PCIERQSEQNUMVLD": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2876" - } - }, - "PCIERQTAG": { - "hide_name": 0, - "bits": [ 1734, 1735, 1736, 1737, 1738, 1739 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3058" - } - }, - "PCIERQTAGAV": { - "hide_name": 0, - "bits": [ 527, 528 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2946" - } - }, - "PCIERQTAGVLD": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2877" - } - }, - "PCIETFCNPDAV": { - "hide_name": 0, - "bits": [ 529, 530 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2947" - } - }, - "PCIETFCNPHAV": { - "hide_name": 0, - "bits": [ 531, 532 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2948" - } - }, - "PIPECLK": { - "hide_name": 0, - "bits": [ 2376 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3131" - } - }, - "PIPEEQFS": { - "hide_name": 0, - "bits": [ 4493, 4494, 4495, 4496, 4497, 4498 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3300" - } - }, - "PIPEEQLF": { - "hide_name": 0, - "bits": [ 4499, 4500, 4501, 4502, 4503, 4504 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3301" - } - }, - "PIPERESETN": { - "hide_name": 0, - "bits": [ 2377 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3132" - } - }, - "PIPERX0CHARISK": { - "hide_name": 0, - "bits": [ 3296, 3297 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3244" - } - }, - "PIPERX0DATA": { - "hide_name": 0, - "bits": [ 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3285" - } - }, - "PIPERX0DATAVALID": { - "hide_name": 0, - "bits": [ 2378 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3133" - } - }, - "PIPERX0ELECIDLE": { - "hide_name": 0, - "bits": [ 2379 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3134" - } - }, - "PIPERX0EQCONTROL": { - "hide_name": 0, - "bits": [ 533, 534 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2949" - } - }, - "PIPERX0EQDONE": { - "hide_name": 0, - "bits": [ 2380 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3135" - } - }, - "PIPERX0EQLPADAPTDONE": { - "hide_name": 0, - "bits": [ 2381 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3136" - } - }, - "PIPERX0EQLPLFFS": { - "hide_name": 0, - "bits": [ 1740, 1741, 1742, 1743, 1744, 1745 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3059" - } - }, - "PIPERX0EQLPLFFSSEL": { - "hide_name": 0, - "bits": [ 2382 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3137" - } - }, - "PIPERX0EQLPNEWTXCOEFFORPRESET": { - "hide_name": 0, - "bits": [ 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3000 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3224" - } - }, - "PIPERX0EQLPTXPRESET": { - "hide_name": 0, - "bits": [ 1592, 1593, 1594, 1595 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3028" - } - }, - "PIPERX0EQPRESET": { - "hide_name": 0, - "bits": [ 1141, 1142, 1143 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2997" - } - }, - "PIPERX0PHYSTATUS": { - "hide_name": 0, - "bits": [ 2383 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3138" - } - }, - "PIPERX0POLARITY": { - "hide_name": 0, - "bits": [ 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2878" - } - }, - "PIPERX0STARTBLOCK": { - "hide_name": 0, - "bits": [ 2384 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3139" - } - }, - "PIPERX0STATUS": { - "hide_name": 0, - "bits": [ 3905, 3906, 3907 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3271" - } - }, - "PIPERX0SYNCHEADER": { - "hide_name": 0, - "bits": [ 3298, 3299 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3245" - } - }, - "PIPERX0VALID": { - "hide_name": 0, - "bits": [ 2385 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3140" - } - }, - "PIPERX1CHARISK": { - "hide_name": 0, - "bits": [ 3300, 3301 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3246" - } - }, - "PIPERX1DATA": { - "hide_name": 0, - "bits": [ 4153, 4154, 4155, 4156, 4157, 4158, 4159, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178, 4179, 4180, 4181, 4182, 4183, 4184 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3286" - } - }, - "PIPERX1DATAVALID": { - "hide_name": 0, - "bits": [ 2386 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3141" - } - }, - "PIPERX1ELECIDLE": { - "hide_name": 0, - "bits": [ 2387 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3142" - } - }, - "PIPERX1EQCONTROL": { - "hide_name": 0, - "bits": [ 535, 536 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2950" - } - }, - "PIPERX1EQDONE": { - "hide_name": 0, - "bits": [ 2388 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3143" - } - }, - "PIPERX1EQLPADAPTDONE": { - "hide_name": 0, - "bits": [ 2389 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3144" - } - }, - "PIPERX1EQLPLFFS": { - "hide_name": 0, - "bits": [ 1746, 1747, 1748, 1749, 1750, 1751 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3060" - } - }, - "PIPERX1EQLPLFFSSEL": { - "hide_name": 0, - "bits": [ 2390 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3145" - } - }, - "PIPERX1EQLPNEWTXCOEFFORPRESET": { - "hide_name": 0, - "bits": [ 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3225" - } - }, - "PIPERX1EQLPTXPRESET": { - "hide_name": 0, - "bits": [ 1596, 1597, 1598, 1599 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3029" - } - }, - "PIPERX1EQPRESET": { - "hide_name": 0, - "bits": [ 1144, 1145, 1146 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2998" - } - }, - "PIPERX1PHYSTATUS": { - "hide_name": 0, - "bits": [ 2391 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3146" - } - }, - "PIPERX1POLARITY": { - "hide_name": 0, - "bits": [ 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2879" - } - }, - "PIPERX1STARTBLOCK": { - "hide_name": 0, - "bits": [ 2392 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3147" - } - }, - "PIPERX1STATUS": { - "hide_name": 0, - "bits": [ 3908, 3909, 3910 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3272" - } - }, - "PIPERX1SYNCHEADER": { - "hide_name": 0, - "bits": [ 3302, 3303 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3247" - } - }, - "PIPERX1VALID": { - "hide_name": 0, - "bits": [ 2393 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3148" - } - }, - "PIPERX2CHARISK": { - "hide_name": 0, - "bits": [ 3304, 3305 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3248" - } - }, - "PIPERX2DATA": { - "hide_name": 0, - "bits": [ 4185, 4186, 4187, 4188, 4189, 4190, 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, 4209, 4210, 4211, 4212, 4213, 4214, 4215, 4216 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3287" - } - }, - "PIPERX2DATAVALID": { - "hide_name": 0, - "bits": [ 2394 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3149" - } - }, - "PIPERX2ELECIDLE": { - "hide_name": 0, - "bits": [ 2395 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3150" - } - }, - "PIPERX2EQCONTROL": { - "hide_name": 0, - "bits": [ 537, 538 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2951" - } - }, - "PIPERX2EQDONE": { - "hide_name": 0, - "bits": [ 2396 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3151" - } - }, - "PIPERX2EQLPADAPTDONE": { - "hide_name": 0, - "bits": [ 2397 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3152" - } - }, - "PIPERX2EQLPLFFS": { - "hide_name": 0, - "bits": [ 1752, 1753, 1754, 1755, 1756, 1757 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3061" - } - }, - "PIPERX2EQLPLFFSSEL": { - "hide_name": 0, - "bits": [ 2398 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3153" - } - }, - "PIPERX2EQLPNEWTXCOEFFORPRESET": { - "hide_name": 0, - "bits": [ 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3226" - } - }, - "PIPERX2EQLPTXPRESET": { - "hide_name": 0, - "bits": [ 1600, 1601, 1602, 1603 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3030" - } - }, - "PIPERX2EQPRESET": { - "hide_name": 0, - "bits": [ 1147, 1148, 1149 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2999" - } - }, - "PIPERX2PHYSTATUS": { - "hide_name": 0, - "bits": [ 2399 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3154" - } - }, - "PIPERX2POLARITY": { - "hide_name": 0, - "bits": [ 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2880" - } - }, - "PIPERX2STARTBLOCK": { - "hide_name": 0, - "bits": [ 2400 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3155" - } - }, - "PIPERX2STATUS": { - "hide_name": 0, - "bits": [ 3911, 3912, 3913 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3273" - } - }, - "PIPERX2SYNCHEADER": { - "hide_name": 0, - "bits": [ 3306, 3307 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3249" - } - }, - "PIPERX2VALID": { - "hide_name": 0, - "bits": [ 2401 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3156" - } - }, - "PIPERX3CHARISK": { - "hide_name": 0, - "bits": [ 3308, 3309 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3250" - } - }, - "PIPERX3DATA": { - "hide_name": 0, - "bits": [ 4217, 4218, 4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3288" - } - }, - "PIPERX3DATAVALID": { - "hide_name": 0, - "bits": [ 2402 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3157" - } - }, - "PIPERX3ELECIDLE": { - "hide_name": 0, - "bits": [ 2403 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3158" - } - }, - "PIPERX3EQCONTROL": { - "hide_name": 0, - "bits": [ 539, 540 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2952" - } - }, - "PIPERX3EQDONE": { - "hide_name": 0, - "bits": [ 2404 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3159" - } - }, - "PIPERX3EQLPADAPTDONE": { - "hide_name": 0, - "bits": [ 2405 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3160" - } - }, - "PIPERX3EQLPLFFS": { - "hide_name": 0, - "bits": [ 1758, 1759, 1760, 1761, 1762, 1763 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3062" - } - }, - "PIPERX3EQLPLFFSSEL": { - "hide_name": 0, - "bits": [ 2406 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3161" - } - }, - "PIPERX3EQLPNEWTXCOEFFORPRESET": { - "hide_name": 0, - "bits": [ 3037, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3227" - } - }, - "PIPERX3EQLPTXPRESET": { - "hide_name": 0, - "bits": [ 1604, 1605, 1606, 1607 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3031" - } - }, - "PIPERX3EQPRESET": { - "hide_name": 0, - "bits": [ 1150, 1151, 1152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3000" - } - }, - "PIPERX3PHYSTATUS": { - "hide_name": 0, - "bits": [ 2407 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3162" - } - }, - "PIPERX3POLARITY": { - "hide_name": 0, - "bits": [ 41 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2881" - } - }, - "PIPERX3STARTBLOCK": { - "hide_name": 0, - "bits": [ 2408 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3163" - } - }, - "PIPERX3STATUS": { - "hide_name": 0, - "bits": [ 3914, 3915, 3916 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3274" - } - }, - "PIPERX3SYNCHEADER": { - "hide_name": 0, - "bits": [ 3310, 3311 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3251" - } - }, - "PIPERX3VALID": { - "hide_name": 0, - "bits": [ 2409 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3164" - } - }, - "PIPERX4CHARISK": { - "hide_name": 0, - "bits": [ 3312, 3313 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3252" - } - }, - "PIPERX4DATA": { - "hide_name": 0, - "bits": [ 4249, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3289" - } - }, - "PIPERX4DATAVALID": { - "hide_name": 0, - "bits": [ 2410 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3165" - } - }, - "PIPERX4ELECIDLE": { - "hide_name": 0, - "bits": [ 2411 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3166" - } - }, - "PIPERX4EQCONTROL": { - "hide_name": 0, - "bits": [ 541, 542 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2953" - } - }, - "PIPERX4EQDONE": { - "hide_name": 0, - "bits": [ 2412 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3167" - } - }, - "PIPERX4EQLPADAPTDONE": { - "hide_name": 0, - "bits": [ 2413 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3168" - } - }, - "PIPERX4EQLPLFFS": { - "hide_name": 0, - "bits": [ 1764, 1765, 1766, 1767, 1768, 1769 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3063" - } - }, - "PIPERX4EQLPLFFSSEL": { - "hide_name": 0, - "bits": [ 2414 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3169" - } - }, - "PIPERX4EQLPNEWTXCOEFFORPRESET": { - "hide_name": 0, - "bits": [ 3055, 3056, 3057, 3058, 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3228" - } - }, - "PIPERX4EQLPTXPRESET": { - "hide_name": 0, - "bits": [ 1608, 1609, 1610, 1611 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3032" - } - }, - "PIPERX4EQPRESET": { - "hide_name": 0, - "bits": [ 1153, 1154, 1155 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3001" - } - }, - "PIPERX4PHYSTATUS": { - "hide_name": 0, - "bits": [ 2415 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3170" - } - }, - "PIPERX4POLARITY": { - "hide_name": 0, - "bits": [ 42 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2882" - } - }, - "PIPERX4STARTBLOCK": { - "hide_name": 0, - "bits": [ 2416 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3171" - } - }, - "PIPERX4STATUS": { - "hide_name": 0, - "bits": [ 3917, 3918, 3919 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3275" - } - }, - "PIPERX4SYNCHEADER": { - "hide_name": 0, - "bits": [ 3314, 3315 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3253" - } - }, - "PIPERX4VALID": { - "hide_name": 0, - "bits": [ 2417 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3172" - } - }, - "PIPERX5CHARISK": { - "hide_name": 0, - "bits": [ 3316, 3317 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3254" - } - }, - "PIPERX5DATA": { - "hide_name": 0, - "bits": [ 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307, 4308, 4309, 4310, 4311, 4312 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3290" - } - }, - "PIPERX5DATAVALID": { - "hide_name": 0, - "bits": [ 2418 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3173" - } - }, - "PIPERX5ELECIDLE": { - "hide_name": 0, - "bits": [ 2419 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3174" - } - }, - "PIPERX5EQCONTROL": { - "hide_name": 0, - "bits": [ 543, 544 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2954" - } - }, - "PIPERX5EQDONE": { - "hide_name": 0, - "bits": [ 2420 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3175" - } - }, - "PIPERX5EQLPADAPTDONE": { - "hide_name": 0, - "bits": [ 2421 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3176" - } - }, - "PIPERX5EQLPLFFS": { - "hide_name": 0, - "bits": [ 1770, 1771, 1772, 1773, 1774, 1775 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3064" - } - }, - "PIPERX5EQLPLFFSSEL": { - "hide_name": 0, - "bits": [ 2422 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3177" - } - }, - "PIPERX5EQLPNEWTXCOEFFORPRESET": { - "hide_name": 0, - "bits": [ 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3229" - } - }, - "PIPERX5EQLPTXPRESET": { - "hide_name": 0, - "bits": [ 1612, 1613, 1614, 1615 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3033" - } - }, - "PIPERX5EQPRESET": { - "hide_name": 0, - "bits": [ 1156, 1157, 1158 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3002" - } - }, - "PIPERX5PHYSTATUS": { - "hide_name": 0, - "bits": [ 2423 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3178" - } - }, - "PIPERX5POLARITY": { - "hide_name": 0, - "bits": [ 43 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2883" - } - }, - "PIPERX5STARTBLOCK": { - "hide_name": 0, - "bits": [ 2424 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3179" - } - }, - "PIPERX5STATUS": { - "hide_name": 0, - "bits": [ 3920, 3921, 3922 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3276" - } - }, - "PIPERX5SYNCHEADER": { - "hide_name": 0, - "bits": [ 3318, 3319 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3255" - } - }, - "PIPERX5VALID": { - "hide_name": 0, - "bits": [ 2425 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3180" - } - }, - "PIPERX6CHARISK": { - "hide_name": 0, - "bits": [ 3320, 3321 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3256" - } - }, - "PIPERX6DATA": { - "hide_name": 0, - "bits": [ 4313, 4314, 4315, 4316, 4317, 4318, 4319, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3291" - } - }, - "PIPERX6DATAVALID": { - "hide_name": 0, - "bits": [ 2426 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3181" - } - }, - "PIPERX6ELECIDLE": { - "hide_name": 0, - "bits": [ 2427 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3182" - } - }, - "PIPERX6EQCONTROL": { - "hide_name": 0, - "bits": [ 545, 546 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2955" - } - }, - "PIPERX6EQDONE": { - "hide_name": 0, - "bits": [ 2428 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3183" - } - }, - "PIPERX6EQLPADAPTDONE": { - "hide_name": 0, - "bits": [ 2429 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3184" - } - }, - "PIPERX6EQLPLFFS": { - "hide_name": 0, - "bits": [ 1776, 1777, 1778, 1779, 1780, 1781 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3065" - } - }, - "PIPERX6EQLPLFFSSEL": { - "hide_name": 0, - "bits": [ 2430 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3185" - } - }, - "PIPERX6EQLPNEWTXCOEFFORPRESET": { - "hide_name": 0, - "bits": [ 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3230" - } - }, - "PIPERX6EQLPTXPRESET": { - "hide_name": 0, - "bits": [ 1616, 1617, 1618, 1619 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3034" - } - }, - "PIPERX6EQPRESET": { - "hide_name": 0, - "bits": [ 1159, 1160, 1161 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3003" - } - }, - "PIPERX6PHYSTATUS": { - "hide_name": 0, - "bits": [ 2431 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3186" - } - }, - "PIPERX6POLARITY": { - "hide_name": 0, - "bits": [ 44 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2884" - } - }, - "PIPERX6STARTBLOCK": { - "hide_name": 0, - "bits": [ 2432 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3187" - } - }, - "PIPERX6STATUS": { - "hide_name": 0, - "bits": [ 3923, 3924, 3925 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3277" - } - }, - "PIPERX6SYNCHEADER": { - "hide_name": 0, - "bits": [ 3322, 3323 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3257" - } - }, - "PIPERX6VALID": { - "hide_name": 0, - "bits": [ 2433 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3188" - } - }, - "PIPERX7CHARISK": { - "hide_name": 0, - "bits": [ 3324, 3325 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3258" - } - }, - "PIPERX7DATA": { - "hide_name": 0, - "bits": [ 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3292" - } - }, - "PIPERX7DATAVALID": { - "hide_name": 0, - "bits": [ 2434 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3189" - } - }, - "PIPERX7ELECIDLE": { - "hide_name": 0, - "bits": [ 2435 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3190" - } - }, - "PIPERX7EQCONTROL": { - "hide_name": 0, - "bits": [ 547, 548 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2956" - } - }, - "PIPERX7EQDONE": { - "hide_name": 0, - "bits": [ 2436 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3191" - } - }, - "PIPERX7EQLPADAPTDONE": { - "hide_name": 0, - "bits": [ 2437 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3192" - } - }, - "PIPERX7EQLPLFFS": { - "hide_name": 0, - "bits": [ 1782, 1783, 1784, 1785, 1786, 1787 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3066" - } - }, - "PIPERX7EQLPLFFSSEL": { - "hide_name": 0, - "bits": [ 2438 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3193" - } - }, - "PIPERX7EQLPNEWTXCOEFFORPRESET": { - "hide_name": 0, - "bits": [ 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3231" - } - }, - "PIPERX7EQLPTXPRESET": { - "hide_name": 0, - "bits": [ 1620, 1621, 1622, 1623 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3035" - } - }, - "PIPERX7EQPRESET": { - "hide_name": 0, - "bits": [ 1162, 1163, 1164 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3004" - } - }, - "PIPERX7PHYSTATUS": { - "hide_name": 0, - "bits": [ 2439 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3194" - } - }, - "PIPERX7POLARITY": { - "hide_name": 0, - "bits": [ 45 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2885" - } - }, - "PIPERX7STARTBLOCK": { - "hide_name": 0, - "bits": [ 2440 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3195" - } - }, - "PIPERX7STATUS": { - "hide_name": 0, - "bits": [ 3926, 3927, 3928 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3278" - } - }, - "PIPERX7SYNCHEADER": { - "hide_name": 0, - "bits": [ 3326, 3327 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3259" - } - }, - "PIPERX7VALID": { - "hide_name": 0, - "bits": [ 2441 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3196" - } - }, - "PIPETX0CHARISK": { - "hide_name": 0, - "bits": [ 549, 550 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2957" - } - }, - "PIPETX0COMPLIANCE": { - "hide_name": 0, - "bits": [ 46 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2886" - } - }, - "PIPETX0DATA": { - "hide_name": 0, - "bits": [ 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3010" - } - }, - "PIPETX0DATAVALID": { - "hide_name": 0, - "bits": [ 47 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2887" - } - }, - "PIPETX0ELECIDLE": { - "hide_name": 0, - "bits": [ 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2888" - } - }, - "PIPETX0EQCOEFF": { - "hide_name": 0, - "bits": [ 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3232" - } - }, - "PIPETX0EQCONTROL": { - "hide_name": 0, - "bits": [ 551, 552 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2958" - } - }, - "PIPETX0EQDEEMPH": { - "hide_name": 0, - "bits": [ 1788, 1789, 1790, 1791, 1792, 1793 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3067" - } - }, - "PIPETX0EQDONE": { - "hide_name": 0, - "bits": [ 2442 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3197" - } - }, - "PIPETX0EQPRESET": { - "hide_name": 0, - "bits": [ 1624, 1625, 1626, 1627 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3036" - } - }, - "PIPETX0POWERDOWN": { - "hide_name": 0, - "bits": [ 553, 554 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2959" - } - }, - "PIPETX0STARTBLOCK": { - "hide_name": 0, - "bits": [ 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2889" - } - }, - "PIPETX0SYNCHEADER": { - "hide_name": 0, - "bits": [ 555, 556 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2960" - } - }, - "PIPETX1CHARISK": { - "hide_name": 0, - "bits": [ 557, 558 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2961" - } - }, - "PIPETX1COMPLIANCE": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2890" - } - }, - "PIPETX1DATA": { - "hide_name": 0, - "bits": [ 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3011" - } - }, - "PIPETX1DATAVALID": { - "hide_name": 0, - "bits": [ 51 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2891" - } - }, - "PIPETX1ELECIDLE": { - "hide_name": 0, - "bits": [ 52 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2892" - } - }, - "PIPETX1EQCOEFF": { - "hide_name": 0, - "bits": [ 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3233" - } - }, - "PIPETX1EQCONTROL": { - "hide_name": 0, - "bits": [ 559, 560 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2962" - } - }, - "PIPETX1EQDEEMPH": { - "hide_name": 0, - "bits": [ 1794, 1795, 1796, 1797, 1798, 1799 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3068" - } - }, - "PIPETX1EQDONE": { - "hide_name": 0, - "bits": [ 2443 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3198" - } - }, - "PIPETX1EQPRESET": { - "hide_name": 0, - "bits": [ 1628, 1629, 1630, 1631 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3037" - } - }, - "PIPETX1POWERDOWN": { - "hide_name": 0, - "bits": [ 561, 562 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2963" - } - }, - "PIPETX1STARTBLOCK": { - "hide_name": 0, - "bits": [ 53 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2893" - } - }, - "PIPETX1SYNCHEADER": { - "hide_name": 0, - "bits": [ 563, 564 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2964" - } - }, - "PIPETX2CHARISK": { - "hide_name": 0, - "bits": [ 565, 566 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2965" - } - }, - "PIPETX2COMPLIANCE": { - "hide_name": 0, - "bits": [ 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2894" - } - }, - "PIPETX2DATA": { - "hide_name": 0, - "bits": [ 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3012" - } - }, - "PIPETX2DATAVALID": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2895" - } - }, - "PIPETX2ELECIDLE": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2896" - } - }, - "PIPETX2EQCOEFF": { - "hide_name": 0, - "bits": [ 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3234" - } - }, - "PIPETX2EQCONTROL": { - "hide_name": 0, - "bits": [ 567, 568 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2966" - } - }, - "PIPETX2EQDEEMPH": { - "hide_name": 0, - "bits": [ 1800, 1801, 1802, 1803, 1804, 1805 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3069" - } - }, - "PIPETX2EQDONE": { - "hide_name": 0, - "bits": [ 2444 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3199" - } - }, - "PIPETX2EQPRESET": { - "hide_name": 0, - "bits": [ 1632, 1633, 1634, 1635 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3038" - } - }, - "PIPETX2POWERDOWN": { - "hide_name": 0, - "bits": [ 569, 570 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2967" - } - }, - "PIPETX2STARTBLOCK": { - "hide_name": 0, - "bits": [ 57 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2897" - } - }, - "PIPETX2SYNCHEADER": { - "hide_name": 0, - "bits": [ 571, 572 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2968" - } - }, - "PIPETX3CHARISK": { - "hide_name": 0, - "bits": [ 573, 574 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2969" - } - }, - "PIPETX3COMPLIANCE": { - "hide_name": 0, - "bits": [ 58 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2898" - } - }, - "PIPETX3DATA": { - "hide_name": 0, - "bits": [ 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3013" - } - }, - "PIPETX3DATAVALID": { - "hide_name": 0, - "bits": [ 59 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2899" - } - }, - "PIPETX3ELECIDLE": { - "hide_name": 0, - "bits": [ 60 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2900" - } - }, - "PIPETX3EQCOEFF": { - "hide_name": 0, - "bits": [ 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3235" - } - }, - "PIPETX3EQCONTROL": { - "hide_name": 0, - "bits": [ 575, 576 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2970" - } - }, - "PIPETX3EQDEEMPH": { - "hide_name": 0, - "bits": [ 1806, 1807, 1808, 1809, 1810, 1811 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3070" - } - }, - "PIPETX3EQDONE": { - "hide_name": 0, - "bits": [ 2445 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3200" - } - }, - "PIPETX3EQPRESET": { - "hide_name": 0, - "bits": [ 1636, 1637, 1638, 1639 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3039" - } - }, - "PIPETX3POWERDOWN": { - "hide_name": 0, - "bits": [ 577, 578 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2971" - } - }, - "PIPETX3STARTBLOCK": { - "hide_name": 0, - "bits": [ 61 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2901" - } - }, - "PIPETX3SYNCHEADER": { - "hide_name": 0, - "bits": [ 579, 580 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2972" - } - }, - "PIPETX4CHARISK": { - "hide_name": 0, - "bits": [ 581, 582 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2973" - } - }, - "PIPETX4COMPLIANCE": { - "hide_name": 0, - "bits": [ 62 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2902" - } - }, - "PIPETX4DATA": { - "hide_name": 0, - "bits": [ 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3014" - } - }, - "PIPETX4DATAVALID": { - "hide_name": 0, - "bits": [ 63 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2903" - } - }, - "PIPETX4ELECIDLE": { - "hide_name": 0, - "bits": [ 64 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2904" - } - }, - "PIPETX4EQCOEFF": { - "hide_name": 0, - "bits": [ 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3236" - } - }, - "PIPETX4EQCONTROL": { - "hide_name": 0, - "bits": [ 583, 584 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2974" - } - }, - "PIPETX4EQDEEMPH": { - "hide_name": 0, - "bits": [ 1812, 1813, 1814, 1815, 1816, 1817 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3071" - } - }, - "PIPETX4EQDONE": { - "hide_name": 0, - "bits": [ 2446 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3201" - } - }, - "PIPETX4EQPRESET": { - "hide_name": 0, - "bits": [ 1640, 1641, 1642, 1643 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3040" - } - }, - "PIPETX4POWERDOWN": { - "hide_name": 0, - "bits": [ 585, 586 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2975" - } - }, - "PIPETX4STARTBLOCK": { - "hide_name": 0, - "bits": [ 65 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2905" - } - }, - "PIPETX4SYNCHEADER": { - "hide_name": 0, - "bits": [ 587, 588 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2976" - } - }, - "PIPETX5CHARISK": { - "hide_name": 0, - "bits": [ 589, 590 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2977" - } - }, - "PIPETX5COMPLIANCE": { - "hide_name": 0, - "bits": [ 66 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2906" - } - }, - "PIPETX5DATA": { - "hide_name": 0, - "bits": [ 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3015" - } - }, - "PIPETX5DATAVALID": { - "hide_name": 0, - "bits": [ 67 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2907" - } - }, - "PIPETX5ELECIDLE": { - "hide_name": 0, - "bits": [ 68 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2908" - } - }, - "PIPETX5EQCOEFF": { - "hide_name": 0, - "bits": [ 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3237" - } - }, - "PIPETX5EQCONTROL": { - "hide_name": 0, - "bits": [ 591, 592 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2978" - } - }, - "PIPETX5EQDEEMPH": { - "hide_name": 0, - "bits": [ 1818, 1819, 1820, 1821, 1822, 1823 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3072" - } - }, - "PIPETX5EQDONE": { - "hide_name": 0, - "bits": [ 2447 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3202" - } - }, - "PIPETX5EQPRESET": { - "hide_name": 0, - "bits": [ 1644, 1645, 1646, 1647 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3041" - } - }, - "PIPETX5POWERDOWN": { - "hide_name": 0, - "bits": [ 593, 594 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2979" - } - }, - "PIPETX5STARTBLOCK": { - "hide_name": 0, - "bits": [ 69 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2909" - } - }, - "PIPETX5SYNCHEADER": { - "hide_name": 0, - "bits": [ 595, 596 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2980" - } - }, - "PIPETX6CHARISK": { - "hide_name": 0, - "bits": [ 597, 598 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2981" - } - }, - "PIPETX6COMPLIANCE": { - "hide_name": 0, - "bits": [ 70 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2910" - } - }, - "PIPETX6DATA": { - "hide_name": 0, - "bits": [ 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3016" - } - }, - "PIPETX6DATAVALID": { - "hide_name": 0, - "bits": [ 71 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2911" - } - }, - "PIPETX6ELECIDLE": { - "hide_name": 0, - "bits": [ 72 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2912" - } - }, - "PIPETX6EQCOEFF": { - "hide_name": 0, - "bits": [ 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250, 3251, 3252 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3238" - } - }, - "PIPETX6EQCONTROL": { - "hide_name": 0, - "bits": [ 599, 600 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2982" - } - }, - "PIPETX6EQDEEMPH": { - "hide_name": 0, - "bits": [ 1824, 1825, 1826, 1827, 1828, 1829 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3073" - } - }, - "PIPETX6EQDONE": { - "hide_name": 0, - "bits": [ 2448 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3203" - } - }, - "PIPETX6EQPRESET": { - "hide_name": 0, - "bits": [ 1648, 1649, 1650, 1651 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3042" - } - }, - "PIPETX6POWERDOWN": { - "hide_name": 0, - "bits": [ 601, 602 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2983" - } - }, - "PIPETX6STARTBLOCK": { - "hide_name": 0, - "bits": [ 73 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2913" - } - }, - "PIPETX6SYNCHEADER": { - "hide_name": 0, - "bits": [ 603, 604 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2984" - } - }, - "PIPETX7CHARISK": { - "hide_name": 0, - "bits": [ 605, 606 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2985" - } - }, - "PIPETX7COMPLIANCE": { - "hide_name": 0, - "bits": [ 74 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2914" - } - }, - "PIPETX7DATA": { - "hide_name": 0, - "bits": [ 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3017" - } - }, - "PIPETX7DATAVALID": { - "hide_name": 0, - "bits": [ 75 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2915" - } - }, - "PIPETX7ELECIDLE": { - "hide_name": 0, - "bits": [ 76 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2916" - } - }, - "PIPETX7EQCOEFF": { - "hide_name": 0, - "bits": [ 3253, 3254, 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3239" - } - }, - "PIPETX7EQCONTROL": { - "hide_name": 0, - "bits": [ 607, 608 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2986" - } - }, - "PIPETX7EQDEEMPH": { - "hide_name": 0, - "bits": [ 1830, 1831, 1832, 1833, 1834, 1835 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3074" - } - }, - "PIPETX7EQDONE": { - "hide_name": 0, - "bits": [ 2449 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3204" - } - }, - "PIPETX7EQPRESET": { - "hide_name": 0, - "bits": [ 1652, 1653, 1654, 1655 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3043" - } - }, - "PIPETX7POWERDOWN": { - "hide_name": 0, - "bits": [ 609, 610 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2987" - } - }, - "PIPETX7STARTBLOCK": { - "hide_name": 0, - "bits": [ 77 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2917" - } - }, - "PIPETX7SYNCHEADER": { - "hide_name": 0, - "bits": [ 611, 612 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2988" - } - }, - "PIPETXDEEMPH": { - "hide_name": 0, - "bits": [ 78 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2918" - } - }, - "PIPETXMARGIN": { - "hide_name": 0, - "bits": [ 1165, 1166, 1167 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3005" - } - }, - "PIPETXRATE": { - "hide_name": 0, - "bits": [ 613, 614 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2989" - } - }, - "PIPETXRCVRDET": { - "hide_name": 0, - "bits": [ 79 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2919" - } - }, - "PIPETXRESET": { - "hide_name": 0, - "bits": [ 80 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2920" - } - }, - "PIPETXSWING": { - "hide_name": 0, - "bits": [ 81 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2921" - } - }, - "PLDISABLESCRAMBLER": { - "hide_name": 0, - "bits": [ 2450 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3205" - } - }, - "PLEQINPROGRESS": { - "hide_name": 0, - "bits": [ 82 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2922" - } - }, - "PLEQPHASE": { - "hide_name": 0, - "bits": [ 615, 616 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:2990" - } - }, - "PLEQRESETEIEOSCOUNT": { - "hide_name": 0, - "bits": [ 2451 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3206" - } - }, - "PLGEN3PCSDISABLE": { - "hide_name": 0, - "bits": [ 2452 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3207" - } - }, - "PLGEN3PCSRXSLIDE": { - "hide_name": 0, - "bits": [ 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3086" - } - }, - "PLGEN3PCSRXSYNCDONE": { - "hide_name": 0, - "bits": [ 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3308" - } - }, - "RECCLK": { - "hide_name": 0, - "bits": [ 2453 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3208" - } - }, - "RESETN": { - "hide_name": 0, - "bits": [ 2454 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3209" - } - }, - "SAXISCCTDATA": { - "hide_name": 0, - "bits": [ 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3262" - } - }, - "SAXISCCTKEEP": { - "hide_name": 0, - "bits": [ 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3309" - } - }, - "SAXISCCTLAST": { - "hide_name": 0, - "bits": [ 2455 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3210" - } - }, - "SAXISCCTREADY": { - "hide_name": 0, - "bits": [ 1656, 1657, 1658, 1659 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3044" - } - }, - "SAXISCCTUSER": { - "hide_name": 0, - "bits": [ 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3293" - } - }, - "SAXISCCTVALID": { - "hide_name": 0, - "bits": [ 2456 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3211" - } - }, - "SAXISRQTDATA": { - "hide_name": 0, - "bits": [ 3628, 3629, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3839, 3840, 3841, 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3849, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 3880, 3881, 3882, 3883 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3263" - } - }, - "SAXISRQTKEEP": { - "hide_name": 0, - "bits": [ 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3310" - } - }, - "SAXISRQTLAST": { - "hide_name": 0, - "bits": [ 2457 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3212" - } - }, - "SAXISRQTREADY": { - "hide_name": 0, - "bits": [ 1660, 1661, 1662, 1663 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3045" - } - }, - "SAXISRQTUSER": { - "hide_name": 0, - "bits": [ 4427, 4428, 4429, 4430, 4431, 4432, 4433, 4434, 4435, 4436, 4437, 4438, 4439, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 4465, 4466, 4467, 4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 4480, 4481, 4482, 4483, 4484, 4485, 4486 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3298" - } - }, - "SAXISRQTVALID": { - "hide_name": 0, - "bits": [ 2458 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3213" - } - }, - "USERCLK": { - "hide_name": 0, - "bits": [ 2459 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3214" - } - } - } - }, - "PHASER_IN": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4436" - }, - "ports": { - "FINEOVERFLOW": { - "direction": "output", - "bits": [ 2 ] - }, - "ICLK": { - "direction": "output", - "bits": [ 3 ] - }, - "ICLKDIV": { - "direction": "output", - "bits": [ 4 ] - }, - "ISERDESRST": { - "direction": "output", - "bits": [ 5 ] - }, - "RCLK": { - "direction": "output", - "bits": [ 6 ] - }, - "COUNTERREADVAL": { - "direction": "output", - "bits": [ 7, 8, 9, 10, 11, 12 ] - }, - "COUNTERLOADEN": { - "direction": "input", - "bits": [ 13 ] - }, - "COUNTERREADEN": { - "direction": "input", - "bits": [ 14 ] - }, - "DIVIDERST": { - "direction": "input", - "bits": [ 15 ] - }, - "EDGEADV": { - "direction": "input", - "bits": [ 16 ] - }, - "FINEENABLE": { - "direction": "input", - "bits": [ 17 ] - }, - "FINEINC": { - "direction": "input", - "bits": [ 18 ] - }, - "FREQREFCLK": { - "direction": "input", - "bits": [ 19 ] - }, - "MEMREFCLK": { - "direction": "input", - "bits": [ 20 ] - }, - "PHASEREFCLK": { - "direction": "input", - "bits": [ 21 ] - }, - "RST": { - "direction": "input", - "bits": [ 22 ] - }, - "SYNCIN": { - "direction": "input", - "bits": [ 23 ] - }, - "SYSCLK": { - "direction": "input", - "bits": [ 24 ] - }, - "RANKSEL": { - "direction": "input", - "bits": [ 25, 26 ] - }, - "COUNTERLOADVAL": { - "direction": "input", - "bits": [ 27, 28, 29, 30, 31, 32 ] - } - }, - "cells": { - }, - "netnames": { - "COUNTERLOADEN": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4455" - } - }, - "COUNTERLOADVAL": { - "hide_name": 0, - "bits": [ 27, 28, 29, 30, 31, 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4469" - } - }, - "COUNTERREADEN": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4456" - } - }, - "COUNTERREADVAL": { - "hide_name": 0, - "bits": [ 7, 8, 9, 10, 11, 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4454" - } - }, - "DIVIDERST": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4457" - } - }, - "EDGEADV": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4458" - } - }, - "FINEENABLE": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4459" - } - }, - "FINEINC": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4460" - } - }, - "FINEOVERFLOW": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4449" - } - }, - "FREQREFCLK": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4461" - } - }, - "ICLK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4450" - } - }, - "ICLKDIV": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4451" - } - }, - "ISERDESRST": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4452" - } - }, - "MEMREFCLK": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4462" - } - }, - "PHASEREFCLK": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4463" - } - }, - "RANKSEL": { - "hide_name": 0, - "bits": [ 25, 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4468" - } - }, - "RCLK": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4453" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "invertible_pin": "IS_RST_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4465" - } - }, - "SYNCIN": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4466" - } - }, - "SYSCLK": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4467" - } - } - } - }, - "PHASER_IN_PHY": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4472" - }, - "ports": { - "DQSFOUND": { - "direction": "output", - "bits": [ 2 ] - }, - "DQSOUTOFRANGE": { - "direction": "output", - "bits": [ 3 ] - }, - "FINEOVERFLOW": { - "direction": "output", - "bits": [ 4 ] - }, - "ICLK": { - "direction": "output", - "bits": [ 5 ] - }, - "ICLKDIV": { - "direction": "output", - "bits": [ 6 ] - }, - "ISERDESRST": { - "direction": "output", - "bits": [ 7 ] - }, - "PHASELOCKED": { - "direction": "output", - "bits": [ 8 ] - }, - "RCLK": { - "direction": "output", - "bits": [ 9 ] - }, - "WRENABLE": { - "direction": "output", - "bits": [ 10 ] - }, - "COUNTERREADVAL": { - "direction": "output", - "bits": [ 11, 12, 13, 14, 15, 16 ] - }, - "BURSTPENDINGPHY": { - "direction": "input", - "bits": [ 17 ] - }, - "COUNTERLOADEN": { - "direction": "input", - "bits": [ 18 ] - }, - "COUNTERREADEN": { - "direction": "input", - "bits": [ 19 ] - }, - "FINEENABLE": { - "direction": "input", - "bits": [ 20 ] - }, - "FINEINC": { - "direction": "input", - "bits": [ 21 ] - }, - "FREQREFCLK": { - "direction": "input", - "bits": [ 22 ] - }, - "MEMREFCLK": { - "direction": "input", - "bits": [ 23 ] - }, - "PHASEREFCLK": { - "direction": "input", - "bits": [ 24 ] - }, - "RST": { - "direction": "input", - "bits": [ 25 ] - }, - "RSTDQSFIND": { - "direction": "input", - "bits": [ 26 ] - }, - "SYNCIN": { - "direction": "input", - "bits": [ 27 ] - }, - "SYSCLK": { - "direction": "input", - "bits": [ 28 ] - }, - "ENCALIBPHY": { - "direction": "input", - "bits": [ 29, 30 ] - }, - "RANKSELPHY": { - "direction": "input", - "bits": [ 31, 32 ] - }, - "COUNTERLOADVAL": { - "direction": "input", - "bits": [ 33, 34, 35, 36, 37, 38 ] - } - }, - "cells": { - }, - "netnames": { - "BURSTPENDINGPHY": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4498" - } - }, - "COUNTERLOADEN": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4499" - } - }, - "COUNTERLOADVAL": { - "hide_name": 0, - "bits": [ 33, 34, 35, 36, 37, 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4513" - } - }, - "COUNTERREADEN": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4500" - } - }, - "COUNTERREADVAL": { - "hide_name": 0, - "bits": [ 11, 12, 13, 14, 15, 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4497" - } - }, - "DQSFOUND": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4488" - } - }, - "DQSOUTOFRANGE": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4489" - } - }, - "ENCALIBPHY": { - "hide_name": 0, - "bits": [ 29, 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4511" - } - }, - "FINEENABLE": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4501" - } - }, - "FINEINC": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4502" - } - }, - "FINEOVERFLOW": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4490" - } - }, - "FREQREFCLK": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4503" - } - }, - "ICLK": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4491" - } - }, - "ICLKDIV": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4492" - } - }, - "ISERDESRST": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4493" - } - }, - "MEMREFCLK": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4504" - } - }, - "PHASELOCKED": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4494" - } - }, - "PHASEREFCLK": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4505" - } - }, - "RANKSELPHY": { - "hide_name": 0, - "bits": [ 31, 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4512" - } - }, - "RCLK": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4495" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "invertible_pin": "IS_RST_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4507" - } - }, - "RSTDQSFIND": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4508" - } - }, - "SYNCIN": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4509" - } - }, - "SYSCLK": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4510" - } - }, - "WRENABLE": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4496" - } - } - } - }, - "PHASER_OUT": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4516" - }, - "ports": { - "COARSEOVERFLOW": { - "direction": "output", - "bits": [ 2 ] - }, - "FINEOVERFLOW": { - "direction": "output", - "bits": [ 3 ] - }, - "OCLK": { - "direction": "output", - "bits": [ 4 ] - }, - "OCLKDELAYED": { - "direction": "output", - "bits": [ 5 ] - }, - "OCLKDIV": { - "direction": "output", - "bits": [ 6 ] - }, - "OSERDESRST": { - "direction": "output", - "bits": [ 7 ] - }, - "COUNTERREADVAL": { - "direction": "output", - "bits": [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ] - }, - "COARSEENABLE": { - "direction": "input", - "bits": [ 17 ] - }, - "COARSEINC": { - "direction": "input", - "bits": [ 18 ] - }, - "COUNTERLOADEN": { - "direction": "input", - "bits": [ 19 ] - }, - "COUNTERREADEN": { - "direction": "input", - "bits": [ 20 ] - }, - "DIVIDERST": { - "direction": "input", - "bits": [ 21 ] - }, - "EDGEADV": { - "direction": "input", - "bits": [ 22 ] - }, - "FINEENABLE": { - "direction": "input", - "bits": [ 23 ] - }, - "FINEINC": { - "direction": "input", - "bits": [ 24 ] - }, - "FREQREFCLK": { - "direction": "input", - "bits": [ 25 ] - }, - "MEMREFCLK": { - "direction": "input", - "bits": [ 26 ] - }, - "PHASEREFCLK": { - "direction": "input", - "bits": [ 27 ] - }, - "RST": { - "direction": "input", - "bits": [ 28 ] - }, - "SELFINEOCLKDELAY": { - "direction": "input", - "bits": [ 29 ] - }, - "SYNCIN": { - "direction": "input", - "bits": [ 30 ] - }, - "SYSCLK": { - "direction": "input", - "bits": [ 31 ] - }, - "COUNTERLOADVAL": { - "direction": "input", - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40 ] - } - }, - "cells": { - }, - "netnames": { - "COARSEENABLE": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4538" - } - }, - "COARSEINC": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4539" - } - }, - "COARSEOVERFLOW": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4531" - } - }, - "COUNTERLOADEN": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4540" - } - }, - "COUNTERLOADVAL": { - "hide_name": 0, - "bits": [ 32, 33, 34, 35, 36, 37, 38, 39, 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4554" - } - }, - "COUNTERREADEN": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4541" - } - }, - "COUNTERREADVAL": { - "hide_name": 0, - "bits": [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4537" - } - }, - "DIVIDERST": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4542" - } - }, - "EDGEADV": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4543" - } - }, - "FINEENABLE": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4544" - } - }, - "FINEINC": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4545" - } - }, - "FINEOVERFLOW": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4532" - } - }, - "FREQREFCLK": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4546" - } - }, - "MEMREFCLK": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4547" - } - }, - "OCLK": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4533" - } - }, - "OCLKDELAYED": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4534" - } - }, - "OCLKDIV": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4535" - } - }, - "OSERDESRST": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4536" - } - }, - "PHASEREFCLK": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4548" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "invertible_pin": "IS_RST_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4550" - } - }, - "SELFINEOCLKDELAY": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4551" - } - }, - "SYNCIN": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4552" - } - }, - "SYSCLK": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4553" - } - } - } - }, - "PHASER_OUT_PHY": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4557" - }, - "ports": { - "COARSEOVERFLOW": { - "direction": "output", - "bits": [ 2 ] - }, - "FINEOVERFLOW": { - "direction": "output", - "bits": [ 3 ] - }, - "OCLK": { - "direction": "output", - "bits": [ 4 ] - }, - "OCLKDELAYED": { - "direction": "output", - "bits": [ 5 ] - }, - "OCLKDIV": { - "direction": "output", - "bits": [ 6 ] - }, - "OSERDESRST": { - "direction": "output", - "bits": [ 7 ] - }, - "RDENABLE": { - "direction": "output", - "bits": [ 8 ] - }, - "CTSBUS": { - "direction": "output", - "bits": [ 9, 10 ] - }, - "DQSBUS": { - "direction": "output", - "bits": [ 11, 12 ] - }, - "DTSBUS": { - "direction": "output", - "bits": [ 13, 14 ] - }, - "COUNTERREADVAL": { - "direction": "output", - "bits": [ 15, 16, 17, 18, 19, 20, 21, 22, 23 ] - }, - "BURSTPENDINGPHY": { - "direction": "input", - "bits": [ 24 ] - }, - "COARSEENABLE": { - "direction": "input", - "bits": [ 25 ] - }, - "COARSEINC": { - "direction": "input", - "bits": [ 26 ] - }, - "COUNTERLOADEN": { - "direction": "input", - "bits": [ 27 ] - }, - "COUNTERREADEN": { - "direction": "input", - "bits": [ 28 ] - }, - "FINEENABLE": { - "direction": "input", - "bits": [ 29 ] - }, - "FINEINC": { - "direction": "input", - "bits": [ 30 ] - }, - "FREQREFCLK": { - "direction": "input", - "bits": [ 31 ] - }, - "MEMREFCLK": { - "direction": "input", - "bits": [ 32 ] - }, - "PHASEREFCLK": { - "direction": "input", - "bits": [ 33 ] - }, - "RST": { - "direction": "input", - "bits": [ 34 ] - }, - "SELFINEOCLKDELAY": { - "direction": "input", - "bits": [ 35 ] - }, - "SYNCIN": { - "direction": "input", - "bits": [ 36 ] - }, - "SYSCLK": { - "direction": "input", - "bits": [ 37 ] - }, - "ENCALIBPHY": { - "direction": "input", - "bits": [ 38, 39 ] - }, - "COUNTERLOADVAL": { - "direction": "input", - "bits": [ 40, 41, 42, 43, 44, 45, 46, 47, 48 ] - } - }, - "cells": { - }, - "netnames": { - "BURSTPENDINGPHY": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4584" - } - }, - "COARSEENABLE": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4585" - } - }, - "COARSEINC": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4586" - } - }, - "COARSEOVERFLOW": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4573" - } - }, - "COUNTERLOADEN": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4587" - } - }, - "COUNTERLOADVAL": { - "hide_name": 0, - "bits": [ 40, 41, 42, 43, 44, 45, 46, 47, 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4600" - } - }, - "COUNTERREADEN": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4588" - } - }, - "COUNTERREADVAL": { - "hide_name": 0, - "bits": [ 15, 16, 17, 18, 19, 20, 21, 22, 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4583" - } - }, - "CTSBUS": { - "hide_name": 0, - "bits": [ 9, 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4580" - } - }, - "DQSBUS": { - "hide_name": 0, - "bits": [ 11, 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4581" - } - }, - "DTSBUS": { - "hide_name": 0, - "bits": [ 13, 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4582" - } - }, - "ENCALIBPHY": { - "hide_name": 0, - "bits": [ 38, 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4599" - } - }, - "FINEENABLE": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4589" - } - }, - "FINEINC": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4590" - } - }, - "FINEOVERFLOW": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4574" - } - }, - "FREQREFCLK": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4591" - } - }, - "MEMREFCLK": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4592" - } - }, - "OCLK": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4575" - } - }, - "OCLKDELAYED": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4576" - } - }, - "OCLKDIV": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4577" - } - }, - "OSERDESRST": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4578" - } - }, - "PHASEREFCLK": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4593" - } - }, - "RDENABLE": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4579" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "invertible_pin": "IS_RST_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4595" - } - }, - "SELFINEOCLKDELAY": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4596" - } - }, - "SYNCIN": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4597" - } - }, - "SYSCLK": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4598" - } - } - } - }, - "PHASER_REF": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4603" - }, - "ports": { - "LOCKED": { - "direction": "output", - "bits": [ 2 ] - }, - "CLKIN": { - "direction": "input", - "bits": [ 3 ] - }, - "PWRDWN": { - "direction": "input", - "bits": [ 4 ] - }, - "RST": { - "direction": "input", - "bits": [ 5 ] - } - }, - "cells": { - }, - "netnames": { - "CLKIN": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4607" - } - }, - "LOCKED": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4606" - } - }, - "PWRDWN": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "invertible_pin": "IS_PWRDWN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4609" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_RST_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4611" - } - } - } - }, - "PHY_CONTROL": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4614" - }, - "ports": { - "PHYCTLALMOSTFULL": { - "direction": "output", - "bits": [ 2 ] - }, - "PHYCTLEMPTY": { - "direction": "output", - "bits": [ 3 ] - }, - "PHYCTLFULL": { - "direction": "output", - "bits": [ 4 ] - }, - "PHYCTLREADY": { - "direction": "output", - "bits": [ 5 ] - }, - "INRANKA": { - "direction": "output", - "bits": [ 6, 7 ] - }, - "INRANKB": { - "direction": "output", - "bits": [ 8, 9 ] - }, - "INRANKC": { - "direction": "output", - "bits": [ 10, 11 ] - }, - "INRANKD": { - "direction": "output", - "bits": [ 12, 13 ] - }, - "PCENABLECALIB": { - "direction": "output", - "bits": [ 14, 15 ] - }, - "AUXOUTPUT": { - "direction": "output", - "bits": [ 16, 17, 18, 19 ] - }, - "INBURSTPENDING": { - "direction": "output", - "bits": [ 20, 21, 22, 23 ] - }, - "OUTBURSTPENDING": { - "direction": "output", - "bits": [ 24, 25, 26, 27 ] - }, - "MEMREFCLK": { - "direction": "input", - "bits": [ 28 ] - }, - "PHYCLK": { - "direction": "input", - "bits": [ 29 ] - }, - "PHYCTLMSTREMPTY": { - "direction": "input", - "bits": [ 30 ] - }, - "PHYCTLWRENABLE": { - "direction": "input", - "bits": [ 31 ] - }, - "PLLLOCK": { - "direction": "input", - "bits": [ 32 ] - }, - "READCALIBENABLE": { - "direction": "input", - "bits": [ 33 ] - }, - "REFDLLLOCK": { - "direction": "input", - "bits": [ 34 ] - }, - "RESET": { - "direction": "input", - "bits": [ 35 ] - }, - "SYNCIN": { - "direction": "input", - "bits": [ 36 ] - }, - "WRITECALIBENABLE": { - "direction": "input", - "bits": [ 37 ] - }, - "PHYCTLWD": { - "direction": "input", - "bits": [ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69 ] - } - }, - "cells": { - }, - "netnames": { - "AUXOUTPUT": { - "hide_name": 0, - "bits": [ 16, 17, 18, 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4658" - } - }, - "INBURSTPENDING": { - "hide_name": 0, - "bits": [ 20, 21, 22, 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4659" - } - }, - "INRANKA": { - "hide_name": 0, - "bits": [ 6, 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4653" - } - }, - "INRANKB": { - "hide_name": 0, - "bits": [ 8, 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4654" - } - }, - "INRANKC": { - "hide_name": 0, - "bits": [ 10, 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4655" - } - }, - "INRANKD": { - "hide_name": 0, - "bits": [ 12, 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4656" - } - }, - "MEMREFCLK": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4661" - } - }, - "OUTBURSTPENDING": { - "hide_name": 0, - "bits": [ 24, 25, 26, 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4660" - } - }, - "PCENABLECALIB": { - "hide_name": 0, - "bits": [ 14, 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4657" - } - }, - "PHYCLK": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4662" - } - }, - "PHYCTLALMOSTFULL": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4649" - } - }, - "PHYCTLEMPTY": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4650" - } - }, - "PHYCTLFULL": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4651" - } - }, - "PHYCTLMSTREMPTY": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4663" - } - }, - "PHYCTLREADY": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4652" - } - }, - "PHYCTLWD": { - "hide_name": 0, - "bits": [ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4671" - } - }, - "PHYCTLWRENABLE": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4664" - } - }, - "PLLLOCK": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4665" - } - }, - "READCALIBENABLE": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4666" - } - }, - "REFDLLLOCK": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4667" - } - }, - "RESET": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4668" - } - }, - "SYNCIN": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4669" - } - }, - "WRITECALIBENABLE": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4670" - } - } - } - }, - "PLLE2_ADV": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3609" - }, - "ports": { - "CLKFBOUT": { - "direction": "output", - "bits": [ 2 ] - }, - "CLKOUT0": { - "direction": "output", - "bits": [ 3 ] - }, - "CLKOUT1": { - "direction": "output", - "bits": [ 4 ] - }, - "CLKOUT2": { - "direction": "output", - "bits": [ 5 ] - }, - "CLKOUT3": { - "direction": "output", - "bits": [ 6 ] - }, - "CLKOUT4": { - "direction": "output", - "bits": [ 7 ] - }, - "CLKOUT5": { - "direction": "output", - "bits": [ 8 ] - }, - "DRDY": { - "direction": "output", - "bits": [ 9 ] - }, - "LOCKED": { - "direction": "output", - "bits": [ 10 ] - }, - "DO": { - "direction": "output", - "bits": [ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ] - }, - "CLKFBIN": { - "direction": "input", - "bits": [ 27 ] - }, - "CLKIN1": { - "direction": "input", - "bits": [ 28 ] - }, - "CLKIN2": { - "direction": "input", - "bits": [ 29 ] - }, - "CLKINSEL": { - "direction": "input", - "bits": [ 30 ] - }, - "DCLK": { - "direction": "input", - "bits": [ 31 ] - }, - "DEN": { - "direction": "input", - "bits": [ 32 ] - }, - "DWE": { - "direction": "input", - "bits": [ 33 ] - }, - "PWRDWN": { - "direction": "input", - "bits": [ 34 ] - }, - "RST": { - "direction": "input", - "bits": [ 35 ] - }, - "DI": { - "direction": "input", - "bits": [ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 ] - }, - "DADDR": { - "direction": "input", - "bits": [ 52, 53, 54, 55, 56, 57, 58 ] - } - }, - "cells": { - }, - "netnames": { - "CLKFBIN": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3657" - } - }, - "CLKFBOUT": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3647" - } - }, - "CLKIN1": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3658" - } - }, - "CLKIN2": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3659" - } - }, - "CLKINSEL": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "invertible_pin": "IS_CLKINSEL_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3661" - } - }, - "CLKOUT0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3648" - } - }, - "CLKOUT1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3649" - } - }, - "CLKOUT2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3650" - } - }, - "CLKOUT3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3651" - } - }, - "CLKOUT4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3652" - } - }, - "CLKOUT5": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3653" - } - }, - "DADDR": { - "hide_name": 0, - "bits": [ 52, 53, 54, 55, 56, 57, 58 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3670" - } - }, - "DCLK": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3662" - } - }, - "DEN": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3663" - } - }, - "DI": { - "hide_name": 0, - "bits": [ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3669" - } - }, - "DO": { - "hide_name": 0, - "bits": [ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3656" - } - }, - "DRDY": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3654" - } - }, - "DWE": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3664" - } - }, - "LOCKED": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3655" - } - }, - "PWRDWN": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "invertible_pin": "IS_PWRDWN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3666" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "invertible_pin": "IS_RST_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3668" - } - } - } - }, - "PLLE2_BASE": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3673" - }, - "ports": { - "CLKFBOUT": { - "direction": "output", - "bits": [ 2 ] - }, - "CLKOUT0": { - "direction": "output", - "bits": [ 3 ] - }, - "CLKOUT1": { - "direction": "output", - "bits": [ 4 ] - }, - "CLKOUT2": { - "direction": "output", - "bits": [ 5 ] - }, - "CLKOUT3": { - "direction": "output", - "bits": [ 6 ] - }, - "CLKOUT4": { - "direction": "output", - "bits": [ 7 ] - }, - "CLKOUT5": { - "direction": "output", - "bits": [ 8 ] - }, - "LOCKED": { - "direction": "output", - "bits": [ 9 ] - }, - "CLKFBIN": { - "direction": "input", - "bits": [ 10 ] - }, - "CLKIN1": { - "direction": "input", - "bits": [ 11 ] - }, - "PWRDWN": { - "direction": "input", - "bits": [ 12 ] - }, - "RST": { - "direction": "input", - "bits": [ 13 ] - } - }, - "cells": { - }, - "netnames": { - "CLKFBIN": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3707" - } - }, - "CLKFBOUT": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3699" - } - }, - "CLKIN1": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3708" - } - }, - "CLKOUT0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3700" - } - }, - "CLKOUT1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3701" - } - }, - "CLKOUT2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3702" - } - }, - "CLKOUT3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3703" - } - }, - "CLKOUT4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3704" - } - }, - "CLKOUT5": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3705" - } - }, - "LOCKED": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3706" - } - }, - "PWRDWN": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3709" - } - }, - "RST": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3710" - } - } - } - }, - "PS7": { - "attributes": { - "blackbox": 1, - "keep": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5095" - }, - "ports": { - "DMA0DAVALID": { - "direction": "output", - "bits": [ 2 ] - }, - "DMA0DRREADY": { - "direction": "output", - "bits": [ 3 ] - }, - "DMA0RSTN": { - "direction": "output", - "bits": [ 4 ] - }, - "DMA1DAVALID": { - "direction": "output", - "bits": [ 5 ] - }, - "DMA1DRREADY": { - "direction": "output", - "bits": [ 6 ] - }, - "DMA1RSTN": { - "direction": "output", - "bits": [ 7 ] - }, - "DMA2DAVALID": { - "direction": "output", - "bits": [ 8 ] - }, - "DMA2DRREADY": { - "direction": "output", - "bits": [ 9 ] - }, - "DMA2RSTN": { - "direction": "output", - "bits": [ 10 ] - }, - "DMA3DAVALID": { - "direction": "output", - "bits": [ 11 ] - }, - "DMA3DRREADY": { - "direction": "output", - "bits": [ 12 ] - }, - "DMA3RSTN": { - "direction": "output", - "bits": [ 13 ] - }, - "EMIOCAN0PHYTX": { - "direction": "output", - "bits": [ 14 ] - }, - "EMIOCAN1PHYTX": { - "direction": "output", - "bits": [ 15 ] - }, - "EMIOENET0GMIITXEN": { - "direction": "output", - "bits": [ 16 ] - }, - "EMIOENET0GMIITXER": { - "direction": "output", - "bits": [ 17 ] - }, - "EMIOENET0MDIOMDC": { - "direction": "output", - "bits": [ 18 ] - }, - "EMIOENET0MDIOO": { - "direction": "output", - "bits": [ 19 ] - }, - "EMIOENET0MDIOTN": { - "direction": "output", - "bits": [ 20 ] - }, - "EMIOENET0PTPDELAYREQRX": { - "direction": "output", - "bits": [ 21 ] - }, - "EMIOENET0PTPDELAYREQTX": { - "direction": "output", - "bits": [ 22 ] - }, - "EMIOENET0PTPPDELAYREQRX": { - "direction": "output", - "bits": [ 23 ] - }, - "EMIOENET0PTPPDELAYREQTX": { - "direction": "output", - "bits": [ 24 ] - }, - "EMIOENET0PTPPDELAYRESPRX": { - "direction": "output", - "bits": [ 25 ] - }, - "EMIOENET0PTPPDELAYRESPTX": { - "direction": "output", - "bits": [ 26 ] - }, - "EMIOENET0PTPSYNCFRAMERX": { - "direction": "output", - "bits": [ 27 ] - }, - "EMIOENET0PTPSYNCFRAMETX": { - "direction": "output", - "bits": [ 28 ] - }, - "EMIOENET0SOFRX": { - "direction": "output", - "bits": [ 29 ] - }, - "EMIOENET0SOFTX": { - "direction": "output", - "bits": [ 30 ] - }, - "EMIOENET1GMIITXEN": { - "direction": "output", - "bits": [ 31 ] - }, - "EMIOENET1GMIITXER": { - "direction": "output", - "bits": [ 32 ] - }, - "EMIOENET1MDIOMDC": { - "direction": "output", - "bits": [ 33 ] - }, - "EMIOENET1MDIOO": { - "direction": "output", - "bits": [ 34 ] - }, - "EMIOENET1MDIOTN": { - "direction": "output", - "bits": [ 35 ] - }, - "EMIOENET1PTPDELAYREQRX": { - "direction": "output", - "bits": [ 36 ] - }, - "EMIOENET1PTPDELAYREQTX": { - "direction": "output", - "bits": [ 37 ] - }, - "EMIOENET1PTPPDELAYREQRX": { - "direction": "output", - "bits": [ 38 ] - }, - "EMIOENET1PTPPDELAYREQTX": { - "direction": "output", - "bits": [ 39 ] - }, - "EMIOENET1PTPPDELAYRESPRX": { - "direction": "output", - "bits": [ 40 ] - }, - "EMIOENET1PTPPDELAYRESPTX": { - "direction": "output", - "bits": [ 41 ] - }, - "EMIOENET1PTPSYNCFRAMERX": { - "direction": "output", - "bits": [ 42 ] - }, - "EMIOENET1PTPSYNCFRAMETX": { - "direction": "output", - "bits": [ 43 ] - }, - "EMIOENET1SOFRX": { - "direction": "output", - "bits": [ 44 ] - }, - "EMIOENET1SOFTX": { - "direction": "output", - "bits": [ 45 ] - }, - "EMIOI2C0SCLO": { - "direction": "output", - "bits": [ 46 ] - }, - "EMIOI2C0SCLTN": { - "direction": "output", - "bits": [ 47 ] - }, - "EMIOI2C0SDAO": { - "direction": "output", - "bits": [ 48 ] - }, - "EMIOI2C0SDATN": { - "direction": "output", - "bits": [ 49 ] - }, - "EMIOI2C1SCLO": { - "direction": "output", - "bits": [ 50 ] - }, - "EMIOI2C1SCLTN": { - "direction": "output", - "bits": [ 51 ] - }, - "EMIOI2C1SDAO": { - "direction": "output", - "bits": [ 52 ] - }, - "EMIOI2C1SDATN": { - "direction": "output", - "bits": [ 53 ] - }, - "EMIOPJTAGTDO": { - "direction": "output", - "bits": [ 54 ] - }, - "EMIOPJTAGTDTN": { - "direction": "output", - "bits": [ 55 ] - }, - "EMIOSDIO0BUSPOW": { - "direction": "output", - "bits": [ 56 ] - }, - "EMIOSDIO0CLK": { - "direction": "output", - "bits": [ 57 ] - }, - "EMIOSDIO0CMDO": { - "direction": "output", - "bits": [ 58 ] - }, - "EMIOSDIO0CMDTN": { - "direction": "output", - "bits": [ 59 ] - }, - "EMIOSDIO0LED": { - "direction": "output", - "bits": [ 60 ] - }, - "EMIOSDIO1BUSPOW": { - "direction": "output", - "bits": [ 61 ] - }, - "EMIOSDIO1CLK": { - "direction": "output", - "bits": [ 62 ] - }, - "EMIOSDIO1CMDO": { - "direction": "output", - "bits": [ 63 ] - }, - "EMIOSDIO1CMDTN": { - "direction": "output", - "bits": [ 64 ] - }, - "EMIOSDIO1LED": { - "direction": "output", - "bits": [ 65 ] - }, - "EMIOSPI0MO": { - "direction": "output", - "bits": [ 66 ] - }, - "EMIOSPI0MOTN": { - "direction": "output", - "bits": [ 67 ] - }, - "EMIOSPI0SCLKO": { - "direction": "output", - "bits": [ 68 ] - }, - "EMIOSPI0SCLKTN": { - "direction": "output", - "bits": [ 69 ] - }, - "EMIOSPI0SO": { - "direction": "output", - "bits": [ 70 ] - }, - "EMIOSPI0SSNTN": { - "direction": "output", - "bits": [ 71 ] - }, - "EMIOSPI0STN": { - "direction": "output", - "bits": [ 72 ] - }, - "EMIOSPI1MO": { - "direction": "output", - "bits": [ 73 ] - }, - "EMIOSPI1MOTN": { - "direction": "output", - "bits": [ 74 ] - }, - "EMIOSPI1SCLKO": { - "direction": "output", - "bits": [ 75 ] - }, - "EMIOSPI1SCLKTN": { - "direction": "output", - "bits": [ 76 ] - }, - "EMIOSPI1SO": { - "direction": "output", - "bits": [ 77 ] - }, - "EMIOSPI1SSNTN": { - "direction": "output", - "bits": [ 78 ] - }, - "EMIOSPI1STN": { - "direction": "output", - "bits": [ 79 ] - }, - "EMIOTRACECTL": { - "direction": "output", - "bits": [ 80 ] - }, - "EMIOUART0DTRN": { - "direction": "output", - "bits": [ 81 ] - }, - "EMIOUART0RTSN": { - "direction": "output", - "bits": [ 82 ] - }, - "EMIOUART0TX": { - "direction": "output", - "bits": [ 83 ] - }, - "EMIOUART1DTRN": { - "direction": "output", - "bits": [ 84 ] - }, - "EMIOUART1RTSN": { - "direction": "output", - "bits": [ 85 ] - }, - "EMIOUART1TX": { - "direction": "output", - "bits": [ 86 ] - }, - "EMIOUSB0VBUSPWRSELECT": { - "direction": "output", - "bits": [ 87 ] - }, - "EMIOUSB1VBUSPWRSELECT": { - "direction": "output", - "bits": [ 88 ] - }, - "EMIOWDTRSTO": { - "direction": "output", - "bits": [ 89 ] - }, - "EVENTEVENTO": { - "direction": "output", - "bits": [ 90 ] - }, - "MAXIGP0ARESETN": { - "direction": "output", - "bits": [ 91 ] - }, - "MAXIGP0ARVALID": { - "direction": "output", - "bits": [ 92 ] - }, - "MAXIGP0AWVALID": { - "direction": "output", - "bits": [ 93 ] - }, - "MAXIGP0BREADY": { - "direction": "output", - "bits": [ 94 ] - }, - "MAXIGP0RREADY": { - "direction": "output", - "bits": [ 95 ] - }, - "MAXIGP0WLAST": { - "direction": "output", - "bits": [ 96 ] - }, - "MAXIGP0WVALID": { - "direction": "output", - "bits": [ 97 ] - }, - "MAXIGP1ARESETN": { - "direction": "output", - "bits": [ 98 ] - }, - "MAXIGP1ARVALID": { - "direction": "output", - "bits": [ 99 ] - }, - "MAXIGP1AWVALID": { - "direction": "output", - "bits": [ 100 ] - }, - "MAXIGP1BREADY": { - "direction": "output", - "bits": [ 101 ] - }, - "MAXIGP1RREADY": { - "direction": "output", - "bits": [ 102 ] - }, - "MAXIGP1WLAST": { - "direction": "output", - "bits": [ 103 ] - }, - "MAXIGP1WVALID": { - "direction": "output", - "bits": [ 104 ] - }, - "SAXIACPARESETN": { - "direction": "output", - "bits": [ 105 ] - }, - "SAXIACPARREADY": { - "direction": "output", - "bits": [ 106 ] - }, - "SAXIACPAWREADY": { - "direction": "output", - "bits": [ 107 ] - }, - "SAXIACPBVALID": { - "direction": "output", - "bits": [ 108 ] - }, - "SAXIACPRLAST": { - "direction": "output", - "bits": [ 109 ] - }, - "SAXIACPRVALID": { - "direction": "output", - "bits": [ 110 ] - }, - "SAXIACPWREADY": { - "direction": "output", - "bits": [ 111 ] - }, - "SAXIGP0ARESETN": { - "direction": "output", - "bits": [ 112 ] - }, - "SAXIGP0ARREADY": { - "direction": "output", - "bits": [ 113 ] - }, - "SAXIGP0AWREADY": { - "direction": "output", - "bits": [ 114 ] - }, - "SAXIGP0BVALID": { - "direction": "output", - "bits": [ 115 ] - }, - "SAXIGP0RLAST": { - "direction": "output", - "bits": [ 116 ] - }, - "SAXIGP0RVALID": { - "direction": "output", - "bits": [ 117 ] - }, - "SAXIGP0WREADY": { - "direction": "output", - "bits": [ 118 ] - }, - "SAXIGP1ARESETN": { - "direction": "output", - "bits": [ 119 ] - }, - "SAXIGP1ARREADY": { - "direction": "output", - "bits": [ 120 ] - }, - "SAXIGP1AWREADY": { - "direction": "output", - "bits": [ 121 ] - }, - "SAXIGP1BVALID": { - "direction": "output", - "bits": [ 122 ] - }, - "SAXIGP1RLAST": { - "direction": "output", - "bits": [ 123 ] - }, - "SAXIGP1RVALID": { - "direction": "output", - "bits": [ 124 ] - }, - "SAXIGP1WREADY": { - "direction": "output", - "bits": [ 125 ] - }, - "SAXIHP0ARESETN": { - "direction": "output", - "bits": [ 126 ] - }, - "SAXIHP0ARREADY": { - "direction": "output", - "bits": [ 127 ] - }, - "SAXIHP0AWREADY": { - "direction": "output", - "bits": [ 128 ] - }, - "SAXIHP0BVALID": { - "direction": "output", - "bits": [ 129 ] - }, - "SAXIHP0RLAST": { - "direction": "output", - "bits": [ 130 ] - }, - "SAXIHP0RVALID": { - "direction": "output", - "bits": [ 131 ] - }, - "SAXIHP0WREADY": { - "direction": "output", - "bits": [ 132 ] - }, - "SAXIHP1ARESETN": { - "direction": "output", - "bits": [ 133 ] - }, - "SAXIHP1ARREADY": { - "direction": "output", - "bits": [ 134 ] - }, - "SAXIHP1AWREADY": { - "direction": "output", - "bits": [ 135 ] - }, - "SAXIHP1BVALID": { - "direction": "output", - "bits": [ 136 ] - }, - "SAXIHP1RLAST": { - "direction": "output", - "bits": [ 137 ] - }, - "SAXIHP1RVALID": { - "direction": "output", - "bits": [ 138 ] - }, - "SAXIHP1WREADY": { - "direction": "output", - "bits": [ 139 ] - }, - "SAXIHP2ARESETN": { - "direction": "output", - "bits": [ 140 ] - }, - "SAXIHP2ARREADY": { - "direction": "output", - "bits": [ 141 ] - }, - "SAXIHP2AWREADY": { - "direction": "output", - "bits": [ 142 ] - }, - "SAXIHP2BVALID": { - "direction": "output", - "bits": [ 143 ] - }, - "SAXIHP2RLAST": { - "direction": "output", - "bits": [ 144 ] - }, - "SAXIHP2RVALID": { - "direction": "output", - "bits": [ 145 ] - }, - "SAXIHP2WREADY": { - "direction": "output", - "bits": [ 146 ] - }, - "SAXIHP3ARESETN": { - "direction": "output", - "bits": [ 147 ] - }, - "SAXIHP3ARREADY": { - "direction": "output", - "bits": [ 148 ] - }, - "SAXIHP3AWREADY": { - "direction": "output", - "bits": [ 149 ] - }, - "SAXIHP3BVALID": { - "direction": "output", - "bits": [ 150 ] - }, - "SAXIHP3RLAST": { - "direction": "output", - "bits": [ 151 ] - }, - "SAXIHP3RVALID": { - "direction": "output", - "bits": [ 152 ] - }, - "SAXIHP3WREADY": { - "direction": "output", - "bits": [ 153 ] - }, - "MAXIGP0ARID": { - "direction": "output", - "bits": [ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165 ] - }, - "MAXIGP0AWID": { - "direction": "output", - "bits": [ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177 ] - }, - "MAXIGP0WID": { - "direction": "output", - "bits": [ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189 ] - }, - "MAXIGP1ARID": { - "direction": "output", - "bits": [ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201 ] - }, - "MAXIGP1AWID": { - "direction": "output", - "bits": [ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213 ] - }, - "MAXIGP1WID": { - "direction": "output", - "bits": [ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225 ] - }, - "DMA0DATYPE": { - "direction": "output", - "bits": [ 226, 227 ] - }, - "DMA1DATYPE": { - "direction": "output", - "bits": [ 228, 229 ] - }, - "DMA2DATYPE": { - "direction": "output", - "bits": [ 230, 231 ] - }, - "DMA3DATYPE": { - "direction": "output", - "bits": [ 232, 233 ] - }, - "EMIOUSB0PORTINDCTL": { - "direction": "output", - "bits": [ 234, 235 ] - }, - "EMIOUSB1PORTINDCTL": { - "direction": "output", - "bits": [ 236, 237 ] - }, - "EVENTSTANDBYWFE": { - "direction": "output", - "bits": [ 238, 239 ] - }, - "EVENTSTANDBYWFI": { - "direction": "output", - "bits": [ 240, 241 ] - }, - "MAXIGP0ARBURST": { - "direction": "output", - "bits": [ 242, 243 ] - }, - "MAXIGP0ARLOCK": { - "direction": "output", - "bits": [ 244, 245 ] - }, - "MAXIGP0ARSIZE": { - "direction": "output", - "bits": [ 246, 247 ] - }, - "MAXIGP0AWBURST": { - "direction": "output", - "bits": [ 248, 249 ] - }, - "MAXIGP0AWLOCK": { - "direction": "output", - "bits": [ 250, 251 ] - }, - "MAXIGP0AWSIZE": { - "direction": "output", - "bits": [ 252, 253 ] - }, - "MAXIGP1ARBURST": { - "direction": "output", - "bits": [ 254, 255 ] - }, - "MAXIGP1ARLOCK": { - "direction": "output", - "bits": [ 256, 257 ] - }, - "MAXIGP1ARSIZE": { - "direction": "output", - "bits": [ 258, 259 ] - }, - "MAXIGP1AWBURST": { - "direction": "output", - "bits": [ 260, 261 ] - }, - "MAXIGP1AWLOCK": { - "direction": "output", - "bits": [ 262, 263 ] - }, - "MAXIGP1AWSIZE": { - "direction": "output", - "bits": [ 264, 265 ] - }, - "SAXIACPBRESP": { - "direction": "output", - "bits": [ 266, 267 ] - }, - "SAXIACPRRESP": { - "direction": "output", - "bits": [ 268, 269 ] - }, - "SAXIGP0BRESP": { - "direction": "output", - "bits": [ 270, 271 ] - }, - "SAXIGP0RRESP": { - "direction": "output", - "bits": [ 272, 273 ] - }, - "SAXIGP1BRESP": { - "direction": "output", - "bits": [ 274, 275 ] - }, - "SAXIGP1RRESP": { - "direction": "output", - "bits": [ 276, 277 ] - }, - "SAXIHP0BRESP": { - "direction": "output", - "bits": [ 278, 279 ] - }, - "SAXIHP0RRESP": { - "direction": "output", - "bits": [ 280, 281 ] - }, - "SAXIHP1BRESP": { - "direction": "output", - "bits": [ 282, 283 ] - }, - "SAXIHP1RRESP": { - "direction": "output", - "bits": [ 284, 285 ] - }, - "SAXIHP2BRESP": { - "direction": "output", - "bits": [ 286, 287 ] - }, - "SAXIHP2RRESP": { - "direction": "output", - "bits": [ 288, 289 ] - }, - "SAXIHP3BRESP": { - "direction": "output", - "bits": [ 290, 291 ] - }, - "SAXIHP3RRESP": { - "direction": "output", - "bits": [ 292, 293 ] - }, - "IRQP2F": { - "direction": "output", - "bits": [ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322 ] - }, - "EMIOSDIO0BUSVOLT": { - "direction": "output", - "bits": [ 323, 324, 325 ] - }, - "EMIOSDIO1BUSVOLT": { - "direction": "output", - "bits": [ 326, 327, 328 ] - }, - "EMIOSPI0SSON": { - "direction": "output", - "bits": [ 329, 330, 331 ] - }, - "EMIOSPI1SSON": { - "direction": "output", - "bits": [ 332, 333, 334 ] - }, - "EMIOTTC0WAVEO": { - "direction": "output", - "bits": [ 335, 336, 337 ] - }, - "EMIOTTC1WAVEO": { - "direction": "output", - "bits": [ 338, 339, 340 ] - }, - "MAXIGP0ARPROT": { - "direction": "output", - "bits": [ 341, 342, 343 ] - }, - "MAXIGP0AWPROT": { - "direction": "output", - "bits": [ 344, 345, 346 ] - }, - "MAXIGP1ARPROT": { - "direction": "output", - "bits": [ 347, 348, 349 ] - }, - "MAXIGP1AWPROT": { - "direction": "output", - "bits": [ 350, 351, 352 ] - }, - "SAXIACPBID": { - "direction": "output", - "bits": [ 353, 354, 355 ] - }, - "SAXIACPRID": { - "direction": "output", - "bits": [ 356, 357, 358 ] - }, - "SAXIHP0RACOUNT": { - "direction": "output", - "bits": [ 359, 360, 361 ] - }, - "SAXIHP1RACOUNT": { - "direction": "output", - "bits": [ 362, 363, 364 ] - }, - "SAXIHP2RACOUNT": { - "direction": "output", - "bits": [ 365, 366, 367 ] - }, - "SAXIHP3RACOUNT": { - "direction": "output", - "bits": [ 368, 369, 370 ] - }, - "EMIOTRACEDATA": { - "direction": "output", - "bits": [ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402 ] - }, - "FTMTP2FDEBUG": { - "direction": "output", - "bits": [ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434 ] - }, - "MAXIGP0ARADDR": { - "direction": "output", - "bits": [ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466 ] - }, - "MAXIGP0AWADDR": { - "direction": "output", - "bits": [ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498 ] - }, - "MAXIGP0WDATA": { - "direction": "output", - "bits": [ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530 ] - }, - "MAXIGP1ARADDR": { - "direction": "output", - "bits": [ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562 ] - }, - "MAXIGP1AWADDR": { - "direction": "output", - "bits": [ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594 ] - }, - "MAXIGP1WDATA": { - "direction": "output", - "bits": [ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626 ] - }, - "SAXIGP0RDATA": { - "direction": "output", - "bits": [ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658 ] - }, - "SAXIGP1RDATA": { - "direction": "output", - "bits": [ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690 ] - }, - "EMIOSDIO0DATAO": { - "direction": "output", - "bits": [ 691, 692, 693, 694 ] - }, - "EMIOSDIO0DATATN": { - "direction": "output", - "bits": [ 695, 696, 697, 698 ] - }, - "EMIOSDIO1DATAO": { - "direction": "output", - "bits": [ 699, 700, 701, 702 ] - }, - "EMIOSDIO1DATATN": { - "direction": "output", - "bits": [ 703, 704, 705, 706 ] - }, - "FCLKCLK": { - "direction": "output", - "bits": [ 707, 708, 709, 710 ] - }, - "FCLKRESETN": { - "direction": "output", - "bits": [ 711, 712, 713, 714 ] - }, - "FTMTF2PTRIGACK": { - "direction": "output", - "bits": [ 715, 716, 717, 718 ] - }, - "FTMTP2FTRIG": { - "direction": "output", - "bits": [ 719, 720, 721, 722 ] - }, - "MAXIGP0ARCACHE": { - "direction": "output", - "bits": [ 723, 724, 725, 726 ] - }, - "MAXIGP0ARLEN": { - "direction": "output", - "bits": [ 727, 728, 729, 730 ] - }, - "MAXIGP0ARQOS": { - "direction": "output", - "bits": [ 731, 732, 733, 734 ] - }, - "MAXIGP0AWCACHE": { - "direction": "output", - "bits": [ 735, 736, 737, 738 ] - }, - "MAXIGP0AWLEN": { - "direction": "output", - "bits": [ 739, 740, 741, 742 ] - }, - "MAXIGP0AWQOS": { - "direction": "output", - "bits": [ 743, 744, 745, 746 ] - }, - "MAXIGP0WSTRB": { - "direction": "output", - "bits": [ 747, 748, 749, 750 ] - }, - "MAXIGP1ARCACHE": { - "direction": "output", - "bits": [ 751, 752, 753, 754 ] - }, - "MAXIGP1ARLEN": { - "direction": "output", - "bits": [ 755, 756, 757, 758 ] - }, - "MAXIGP1ARQOS": { - "direction": "output", - "bits": [ 759, 760, 761, 762 ] - }, - "MAXIGP1AWCACHE": { - "direction": "output", - "bits": [ 763, 764, 765, 766 ] - }, - "MAXIGP1AWLEN": { - "direction": "output", - "bits": [ 767, 768, 769, 770 ] - }, - "MAXIGP1AWQOS": { - "direction": "output", - "bits": [ 771, 772, 773, 774 ] - }, - "MAXIGP1WSTRB": { - "direction": "output", - "bits": [ 775, 776, 777, 778 ] - }, - "SAXIGP0BID": { - "direction": "output", - "bits": [ 779, 780, 781, 782, 783, 784 ] - }, - "SAXIGP0RID": { - "direction": "output", - "bits": [ 785, 786, 787, 788, 789, 790 ] - }, - "SAXIGP1BID": { - "direction": "output", - "bits": [ 791, 792, 793, 794, 795, 796 ] - }, - "SAXIGP1RID": { - "direction": "output", - "bits": [ 797, 798, 799, 800, 801, 802 ] - }, - "SAXIHP0BID": { - "direction": "output", - "bits": [ 803, 804, 805, 806, 807, 808 ] - }, - "SAXIHP0RID": { - "direction": "output", - "bits": [ 809, 810, 811, 812, 813, 814 ] - }, - "SAXIHP0WACOUNT": { - "direction": "output", - "bits": [ 815, 816, 817, 818, 819, 820 ] - }, - "SAXIHP1BID": { - "direction": "output", - "bits": [ 821, 822, 823, 824, 825, 826 ] - }, - "SAXIHP1RID": { - "direction": "output", - "bits": [ 827, 828, 829, 830, 831, 832 ] - }, - "SAXIHP1WACOUNT": { - "direction": "output", - "bits": [ 833, 834, 835, 836, 837, 838 ] - }, - "SAXIHP2BID": { - "direction": "output", - "bits": [ 839, 840, 841, 842, 843, 844 ] - }, - "SAXIHP2RID": { - "direction": "output", - "bits": [ 845, 846, 847, 848, 849, 850 ] - }, - "SAXIHP2WACOUNT": { - "direction": "output", - "bits": [ 851, 852, 853, 854, 855, 856 ] - }, - "SAXIHP3BID": { - "direction": "output", - "bits": [ 857, 858, 859, 860, 861, 862 ] - }, - "SAXIHP3RID": { - "direction": "output", - "bits": [ 863, 864, 865, 866, 867, 868 ] - }, - "SAXIHP3WACOUNT": { - "direction": "output", - "bits": [ 869, 870, 871, 872, 873, 874 ] - }, - "EMIOGPIOO": { - "direction": "output", - "bits": [ 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938 ] - }, - "EMIOGPIOTN": { - "direction": "output", - "bits": [ 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002 ] - }, - "SAXIACPRDATA": { - "direction": "output", - "bits": [ 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066 ] - }, - "SAXIHP0RDATA": { - "direction": "output", - "bits": [ 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130 ] - }, - "SAXIHP1RDATA": { - "direction": "output", - "bits": [ 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194 ] - }, - "SAXIHP2RDATA": { - "direction": "output", - "bits": [ 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258 ] - }, - "SAXIHP3RDATA": { - "direction": "output", - "bits": [ 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322 ] - }, - "EMIOENET0GMIITXD": { - "direction": "output", - "bits": [ 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330 ] - }, - "EMIOENET1GMIITXD": { - "direction": "output", - "bits": [ 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338 ] - }, - "SAXIHP0RCOUNT": { - "direction": "output", - "bits": [ 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346 ] - }, - "SAXIHP0WCOUNT": { - "direction": "output", - "bits": [ 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354 ] - }, - "SAXIHP1RCOUNT": { - "direction": "output", - "bits": [ 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362 ] - }, - "SAXIHP1WCOUNT": { - "direction": "output", - "bits": [ 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370 ] - }, - "SAXIHP2RCOUNT": { - "direction": "output", - "bits": [ 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378 ] - }, - "SAXIHP2WCOUNT": { - "direction": "output", - "bits": [ 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386 ] - }, - "SAXIHP3RCOUNT": { - "direction": "output", - "bits": [ 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394 ] - }, - "SAXIHP3WCOUNT": { - "direction": "output", - "bits": [ 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402 ] - }, - "DDRCASB": { - "direction": "inout", - "bits": [ 1403 ] - }, - "DDRCKE": { - "direction": "inout", - "bits": [ 1404 ] - }, - "DDRCKN": { - "direction": "inout", - "bits": [ 1405 ] - }, - "DDRCKP": { - "direction": "inout", - "bits": [ 1406 ] - }, - "DDRCSB": { - "direction": "inout", - "bits": [ 1407 ] - }, - "DDRDRSTB": { - "direction": "inout", - "bits": [ 1408 ] - }, - "DDRODT": { - "direction": "inout", - "bits": [ 1409 ] - }, - "DDRRASB": { - "direction": "inout", - "bits": [ 1410 ] - }, - "DDRVRN": { - "direction": "inout", - "bits": [ 1411 ] - }, - "DDRVRP": { - "direction": "inout", - "bits": [ 1412 ] - }, - "DDRWEB": { - "direction": "inout", - "bits": [ 1413 ] - }, - "PSCLK": { - "direction": "inout", - "bits": [ 1414 ] - }, - "PSPORB": { - "direction": "inout", - "bits": [ 1415 ] - }, - "PSSRSTB": { - "direction": "inout", - "bits": [ 1416 ] - }, - "DDRA": { - "direction": "inout", - "bits": [ 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431 ] - }, - "DDRBA": { - "direction": "inout", - "bits": [ 1432, 1433, 1434 ] - }, - "DDRDQ": { - "direction": "inout", - "bits": [ 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466 ] - }, - "DDRDM": { - "direction": "inout", - "bits": [ 1467, 1468, 1469, 1470 ] - }, - "DDRDQSN": { - "direction": "inout", - "bits": [ 1471, 1472, 1473, 1474 ] - }, - "DDRDQSP": { - "direction": "inout", - "bits": [ 1475, 1476, 1477, 1478 ] - }, - "MIO": { - "direction": "inout", - "bits": [ 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532 ] - }, - "DMA0ACLK": { - "direction": "input", - "bits": [ 1533 ] - }, - "DMA0DAREADY": { - "direction": "input", - "bits": [ 1534 ] - }, - "DMA0DRLAST": { - "direction": "input", - "bits": [ 1535 ] - }, - "DMA0DRVALID": { - "direction": "input", - "bits": [ 1536 ] - }, - "DMA1ACLK": { - "direction": "input", - "bits": [ 1537 ] - }, - "DMA1DAREADY": { - "direction": "input", - "bits": [ 1538 ] - }, - "DMA1DRLAST": { - "direction": "input", - "bits": [ 1539 ] - }, - "DMA1DRVALID": { - "direction": "input", - "bits": [ 1540 ] - }, - "DMA2ACLK": { - "direction": "input", - "bits": [ 1541 ] - }, - "DMA2DAREADY": { - "direction": "input", - "bits": [ 1542 ] - }, - "DMA2DRLAST": { - "direction": "input", - "bits": [ 1543 ] - }, - "DMA2DRVALID": { - "direction": "input", - "bits": [ 1544 ] - }, - "DMA3ACLK": { - "direction": "input", - "bits": [ 1545 ] - }, - "DMA3DAREADY": { - "direction": "input", - "bits": [ 1546 ] - }, - "DMA3DRLAST": { - "direction": "input", - "bits": [ 1547 ] - }, - "DMA3DRVALID": { - "direction": "input", - "bits": [ 1548 ] - }, - "EMIOCAN0PHYRX": { - "direction": "input", - "bits": [ 1549 ] - }, - "EMIOCAN1PHYRX": { - "direction": "input", - "bits": [ 1550 ] - }, - "EMIOENET0EXTINTIN": { - "direction": "input", - "bits": [ 1551 ] - }, - "EMIOENET0GMIICOL": { - "direction": "input", - "bits": [ 1552 ] - }, - "EMIOENET0GMIICRS": { - "direction": "input", - "bits": [ 1553 ] - }, - "EMIOENET0GMIIRXCLK": { - "direction": "input", - "bits": [ 1554 ] - }, - "EMIOENET0GMIIRXDV": { - "direction": "input", - "bits": [ 1555 ] - }, - "EMIOENET0GMIIRXER": { - "direction": "input", - "bits": [ 1556 ] - }, - "EMIOENET0GMIITXCLK": { - "direction": "input", - "bits": [ 1557 ] - }, - "EMIOENET0MDIOI": { - "direction": "input", - "bits": [ 1558 ] - }, - "EMIOENET1EXTINTIN": { - "direction": "input", - "bits": [ 1559 ] - }, - "EMIOENET1GMIICOL": { - "direction": "input", - "bits": [ 1560 ] - }, - "EMIOENET1GMIICRS": { - "direction": "input", - "bits": [ 1561 ] - }, - "EMIOENET1GMIIRXCLK": { - "direction": "input", - "bits": [ 1562 ] - }, - "EMIOENET1GMIIRXDV": { - "direction": "input", - "bits": [ 1563 ] - }, - "EMIOENET1GMIIRXER": { - "direction": "input", - "bits": [ 1564 ] - }, - "EMIOENET1GMIITXCLK": { - "direction": "input", - "bits": [ 1565 ] - }, - "EMIOENET1MDIOI": { - "direction": "input", - "bits": [ 1566 ] - }, - "EMIOI2C0SCLI": { - "direction": "input", - "bits": [ 1567 ] - }, - "EMIOI2C0SDAI": { - "direction": "input", - "bits": [ 1568 ] - }, - "EMIOI2C1SCLI": { - "direction": "input", - "bits": [ 1569 ] - }, - "EMIOI2C1SDAI": { - "direction": "input", - "bits": [ 1570 ] - }, - "EMIOPJTAGTCK": { - "direction": "input", - "bits": [ 1571 ] - }, - "EMIOPJTAGTDI": { - "direction": "input", - "bits": [ 1572 ] - }, - "EMIOPJTAGTMS": { - "direction": "input", - "bits": [ 1573 ] - }, - "EMIOSDIO0CDN": { - "direction": "input", - "bits": [ 1574 ] - }, - "EMIOSDIO0CLKFB": { - "direction": "input", - "bits": [ 1575 ] - }, - "EMIOSDIO0CMDI": { - "direction": "input", - "bits": [ 1576 ] - }, - "EMIOSDIO0WP": { - "direction": "input", - "bits": [ 1577 ] - }, - "EMIOSDIO1CDN": { - "direction": "input", - "bits": [ 1578 ] - }, - "EMIOSDIO1CLKFB": { - "direction": "input", - "bits": [ 1579 ] - }, - "EMIOSDIO1CMDI": { - "direction": "input", - "bits": [ 1580 ] - }, - "EMIOSDIO1WP": { - "direction": "input", - "bits": [ 1581 ] - }, - "EMIOSPI0MI": { - "direction": "input", - "bits": [ 1582 ] - }, - "EMIOSPI0SCLKI": { - "direction": "input", - "bits": [ 1583 ] - }, - "EMIOSPI0SI": { - "direction": "input", - "bits": [ 1584 ] - }, - "EMIOSPI0SSIN": { - "direction": "input", - "bits": [ 1585 ] - }, - "EMIOSPI1MI": { - "direction": "input", - "bits": [ 1586 ] - }, - "EMIOSPI1SCLKI": { - "direction": "input", - "bits": [ 1587 ] - }, - "EMIOSPI1SI": { - "direction": "input", - "bits": [ 1588 ] - }, - "EMIOSPI1SSIN": { - "direction": "input", - "bits": [ 1589 ] - }, - "EMIOSRAMINTIN": { - "direction": "input", - "bits": [ 1590 ] - }, - "EMIOTRACECLK": { - "direction": "input", - "bits": [ 1591 ] - }, - "EMIOUART0CTSN": { - "direction": "input", - "bits": [ 1592 ] - }, - "EMIOUART0DCDN": { - "direction": "input", - "bits": [ 1593 ] - }, - "EMIOUART0DSRN": { - "direction": "input", - "bits": [ 1594 ] - }, - "EMIOUART0RIN": { - "direction": "input", - "bits": [ 1595 ] - }, - "EMIOUART0RX": { - "direction": "input", - "bits": [ 1596 ] - }, - "EMIOUART1CTSN": { - "direction": "input", - "bits": [ 1597 ] - }, - "EMIOUART1DCDN": { - "direction": "input", - "bits": [ 1598 ] - }, - "EMIOUART1DSRN": { - "direction": "input", - "bits": [ 1599 ] - }, - "EMIOUART1RIN": { - "direction": "input", - "bits": [ 1600 ] - }, - "EMIOUART1RX": { - "direction": "input", - "bits": [ 1601 ] - }, - "EMIOUSB0VBUSPWRFAULT": { - "direction": "input", - "bits": [ 1602 ] - }, - "EMIOUSB1VBUSPWRFAULT": { - "direction": "input", - "bits": [ 1603 ] - }, - "EMIOWDTCLKI": { - "direction": "input", - "bits": [ 1604 ] - }, - "EVENTEVENTI": { - "direction": "input", - "bits": [ 1605 ] - }, - "FPGAIDLEN": { - "direction": "input", - "bits": [ 1606 ] - }, - "FTMDTRACEINCLOCK": { - "direction": "input", - "bits": [ 1607 ] - }, - "FTMDTRACEINVALID": { - "direction": "input", - "bits": [ 1608 ] - }, - "MAXIGP0ACLK": { - "direction": "input", - "bits": [ 1609 ] - }, - "MAXIGP0ARREADY": { - "direction": "input", - "bits": [ 1610 ] - }, - "MAXIGP0AWREADY": { - "direction": "input", - "bits": [ 1611 ] - }, - "MAXIGP0BVALID": { - "direction": "input", - "bits": [ 1612 ] - }, - "MAXIGP0RLAST": { - "direction": "input", - "bits": [ 1613 ] - }, - "MAXIGP0RVALID": { - "direction": "input", - "bits": [ 1614 ] - }, - "MAXIGP0WREADY": { - "direction": "input", - "bits": [ 1615 ] - }, - "MAXIGP1ACLK": { - "direction": "input", - "bits": [ 1616 ] - }, - "MAXIGP1ARREADY": { - "direction": "input", - "bits": [ 1617 ] - }, - "MAXIGP1AWREADY": { - "direction": "input", - "bits": [ 1618 ] - }, - "MAXIGP1BVALID": { - "direction": "input", - "bits": [ 1619 ] - }, - "MAXIGP1RLAST": { - "direction": "input", - "bits": [ 1620 ] - }, - "MAXIGP1RVALID": { - "direction": "input", - "bits": [ 1621 ] - }, - "MAXIGP1WREADY": { - "direction": "input", - "bits": [ 1622 ] - }, - "SAXIACPACLK": { - "direction": "input", - "bits": [ 1623 ] - }, - "SAXIACPARVALID": { - "direction": "input", - "bits": [ 1624 ] - }, - "SAXIACPAWVALID": { - "direction": "input", - "bits": [ 1625 ] - }, - "SAXIACPBREADY": { - "direction": "input", - "bits": [ 1626 ] - }, - "SAXIACPRREADY": { - "direction": "input", - "bits": [ 1627 ] - }, - "SAXIACPWLAST": { - "direction": "input", - "bits": [ 1628 ] - }, - "SAXIACPWVALID": { - "direction": "input", - "bits": [ 1629 ] - }, - "SAXIGP0ACLK": { - "direction": "input", - "bits": [ 1630 ] - }, - "SAXIGP0ARVALID": { - "direction": "input", - "bits": [ 1631 ] - }, - "SAXIGP0AWVALID": { - "direction": "input", - "bits": [ 1632 ] - }, - "SAXIGP0BREADY": { - "direction": "input", - "bits": [ 1633 ] - }, - "SAXIGP0RREADY": { - "direction": "input", - "bits": [ 1634 ] - }, - "SAXIGP0WLAST": { - "direction": "input", - "bits": [ 1635 ] - }, - "SAXIGP0WVALID": { - "direction": "input", - "bits": [ 1636 ] - }, - "SAXIGP1ACLK": { - "direction": "input", - "bits": [ 1637 ] - }, - "SAXIGP1ARVALID": { - "direction": "input", - "bits": [ 1638 ] - }, - "SAXIGP1AWVALID": { - "direction": "input", - "bits": [ 1639 ] - }, - "SAXIGP1BREADY": { - "direction": "input", - "bits": [ 1640 ] - }, - "SAXIGP1RREADY": { - "direction": "input", - "bits": [ 1641 ] - }, - "SAXIGP1WLAST": { - "direction": "input", - "bits": [ 1642 ] - }, - "SAXIGP1WVALID": { - "direction": "input", - "bits": [ 1643 ] - }, - "SAXIHP0ACLK": { - "direction": "input", - "bits": [ 1644 ] - }, - "SAXIHP0ARVALID": { - "direction": "input", - "bits": [ 1645 ] - }, - "SAXIHP0AWVALID": { - "direction": "input", - "bits": [ 1646 ] - }, - "SAXIHP0BREADY": { - "direction": "input", - "bits": [ 1647 ] - }, - "SAXIHP0RDISSUECAP1EN": { - "direction": "input", - "bits": [ 1648 ] - }, - "SAXIHP0RREADY": { - "direction": "input", - "bits": [ 1649 ] - }, - "SAXIHP0WLAST": { - "direction": "input", - "bits": [ 1650 ] - }, - "SAXIHP0WRISSUECAP1EN": { - "direction": "input", - "bits": [ 1651 ] - }, - "SAXIHP0WVALID": { - "direction": "input", - "bits": [ 1652 ] - }, - "SAXIHP1ACLK": { - "direction": "input", - "bits": [ 1653 ] - }, - "SAXIHP1ARVALID": { - "direction": "input", - "bits": [ 1654 ] - }, - "SAXIHP1AWVALID": { - "direction": "input", - "bits": [ 1655 ] - }, - "SAXIHP1BREADY": { - "direction": "input", - "bits": [ 1656 ] - }, - "SAXIHP1RDISSUECAP1EN": { - "direction": "input", - "bits": [ 1657 ] - }, - "SAXIHP1RREADY": { - "direction": "input", - "bits": [ 1658 ] - }, - "SAXIHP1WLAST": { - "direction": "input", - "bits": [ 1659 ] - }, - "SAXIHP1WRISSUECAP1EN": { - "direction": "input", - "bits": [ 1660 ] - }, - "SAXIHP1WVALID": { - "direction": "input", - "bits": [ 1661 ] - }, - "SAXIHP2ACLK": { - "direction": "input", - "bits": [ 1662 ] - }, - "SAXIHP2ARVALID": { - "direction": "input", - "bits": [ 1663 ] - }, - "SAXIHP2AWVALID": { - "direction": "input", - "bits": [ 1664 ] - }, - "SAXIHP2BREADY": { - "direction": "input", - "bits": [ 1665 ] - }, - "SAXIHP2RDISSUECAP1EN": { - "direction": "input", - "bits": [ 1666 ] - }, - "SAXIHP2RREADY": { - "direction": "input", - "bits": [ 1667 ] - }, - "SAXIHP2WLAST": { - "direction": "input", - "bits": [ 1668 ] - }, - "SAXIHP2WRISSUECAP1EN": { - "direction": "input", - "bits": [ 1669 ] - }, - "SAXIHP2WVALID": { - "direction": "input", - "bits": [ 1670 ] - }, - "SAXIHP3ACLK": { - "direction": "input", - "bits": [ 1671 ] - }, - "SAXIHP3ARVALID": { - "direction": "input", - "bits": [ 1672 ] - }, - "SAXIHP3AWVALID": { - "direction": "input", - "bits": [ 1673 ] - }, - "SAXIHP3BREADY": { - "direction": "input", - "bits": [ 1674 ] - }, - "SAXIHP3RDISSUECAP1EN": { - "direction": "input", - "bits": [ 1675 ] - }, - "SAXIHP3RREADY": { - "direction": "input", - "bits": [ 1676 ] - }, - "SAXIHP3WLAST": { - "direction": "input", - "bits": [ 1677 ] - }, - "SAXIHP3WRISSUECAP1EN": { - "direction": "input", - "bits": [ 1678 ] - }, - "SAXIHP3WVALID": { - "direction": "input", - "bits": [ 1679 ] - }, - "MAXIGP0BID": { - "direction": "input", - "bits": [ 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691 ] - }, - "MAXIGP0RID": { - "direction": "input", - "bits": [ 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703 ] - }, - "MAXIGP1BID": { - "direction": "input", - "bits": [ 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715 ] - }, - "MAXIGP1RID": { - "direction": "input", - "bits": [ 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727 ] - }, - "IRQF2P": { - "direction": "input", - "bits": [ 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747 ] - }, - "DMA0DRTYPE": { - "direction": "input", - "bits": [ 1748, 1749 ] - }, - "DMA1DRTYPE": { - "direction": "input", - "bits": [ 1750, 1751 ] - }, - "DMA2DRTYPE": { - "direction": "input", - "bits": [ 1752, 1753 ] - }, - "DMA3DRTYPE": { - "direction": "input", - "bits": [ 1754, 1755 ] - }, - "MAXIGP0BRESP": { - "direction": "input", - "bits": [ 1756, 1757 ] - }, - "MAXIGP0RRESP": { - "direction": "input", - "bits": [ 1758, 1759 ] - }, - "MAXIGP1BRESP": { - "direction": "input", - "bits": [ 1760, 1761 ] - }, - "MAXIGP1RRESP": { - "direction": "input", - "bits": [ 1762, 1763 ] - }, - "SAXIACPARBURST": { - "direction": "input", - "bits": [ 1764, 1765 ] - }, - "SAXIACPARLOCK": { - "direction": "input", - "bits": [ 1766, 1767 ] - }, - "SAXIACPARSIZE": { - "direction": "input", - "bits": [ 1768, 1769 ] - }, - "SAXIACPAWBURST": { - "direction": "input", - "bits": [ 1770, 1771 ] - }, - "SAXIACPAWLOCK": { - "direction": "input", - "bits": [ 1772, 1773 ] - }, - "SAXIACPAWSIZE": { - "direction": "input", - "bits": [ 1774, 1775 ] - }, - "SAXIGP0ARBURST": { - "direction": "input", - "bits": [ 1776, 1777 ] - }, - "SAXIGP0ARLOCK": { - "direction": "input", - "bits": [ 1778, 1779 ] - }, - "SAXIGP0ARSIZE": { - "direction": "input", - "bits": [ 1780, 1781 ] - }, - "SAXIGP0AWBURST": { - "direction": "input", - "bits": [ 1782, 1783 ] - }, - "SAXIGP0AWLOCK": { - "direction": "input", - "bits": [ 1784, 1785 ] - }, - "SAXIGP0AWSIZE": { - "direction": "input", - "bits": [ 1786, 1787 ] - }, - "SAXIGP1ARBURST": { - "direction": "input", - "bits": [ 1788, 1789 ] - }, - "SAXIGP1ARLOCK": { - "direction": "input", - "bits": [ 1790, 1791 ] - }, - "SAXIGP1ARSIZE": { - "direction": "input", - "bits": [ 1792, 1793 ] - }, - "SAXIGP1AWBURST": { - "direction": "input", - "bits": [ 1794, 1795 ] - }, - "SAXIGP1AWLOCK": { - "direction": "input", - "bits": [ 1796, 1797 ] - }, - "SAXIGP1AWSIZE": { - "direction": "input", - "bits": [ 1798, 1799 ] - }, - "SAXIHP0ARBURST": { - "direction": "input", - "bits": [ 1800, 1801 ] - }, - "SAXIHP0ARLOCK": { - "direction": "input", - "bits": [ 1802, 1803 ] - }, - "SAXIHP0ARSIZE": { - "direction": "input", - "bits": [ 1804, 1805 ] - }, - "SAXIHP0AWBURST": { - "direction": "input", - "bits": [ 1806, 1807 ] - }, - "SAXIHP0AWLOCK": { - "direction": "input", - "bits": [ 1808, 1809 ] - }, - "SAXIHP0AWSIZE": { - "direction": "input", - "bits": [ 1810, 1811 ] - }, - "SAXIHP1ARBURST": { - "direction": "input", - "bits": [ 1812, 1813 ] - }, - "SAXIHP1ARLOCK": { - "direction": "input", - "bits": [ 1814, 1815 ] - }, - "SAXIHP1ARSIZE": { - "direction": "input", - "bits": [ 1816, 1817 ] - }, - "SAXIHP1AWBURST": { - "direction": "input", - "bits": [ 1818, 1819 ] - }, - "SAXIHP1AWLOCK": { - "direction": "input", - "bits": [ 1820, 1821 ] - }, - "SAXIHP1AWSIZE": { - "direction": "input", - "bits": [ 1822, 1823 ] - }, - "SAXIHP2ARBURST": { - "direction": "input", - "bits": [ 1824, 1825 ] - }, - "SAXIHP2ARLOCK": { - "direction": "input", - "bits": [ 1826, 1827 ] - }, - "SAXIHP2ARSIZE": { - "direction": "input", - "bits": [ 1828, 1829 ] - }, - "SAXIHP2AWBURST": { - "direction": "input", - "bits": [ 1830, 1831 ] - }, - "SAXIHP2AWLOCK": { - "direction": "input", - "bits": [ 1832, 1833 ] - }, - "SAXIHP2AWSIZE": { - "direction": "input", - "bits": [ 1834, 1835 ] - }, - "SAXIHP3ARBURST": { - "direction": "input", - "bits": [ 1836, 1837 ] - }, - "SAXIHP3ARLOCK": { - "direction": "input", - "bits": [ 1838, 1839 ] - }, - "SAXIHP3ARSIZE": { - "direction": "input", - "bits": [ 1840, 1841 ] - }, - "SAXIHP3AWBURST": { - "direction": "input", - "bits": [ 1842, 1843 ] - }, - "SAXIHP3AWLOCK": { - "direction": "input", - "bits": [ 1844, 1845 ] - }, - "SAXIHP3AWSIZE": { - "direction": "input", - "bits": [ 1846, 1847 ] - }, - "EMIOTTC0CLKI": { - "direction": "input", - "bits": [ 1848, 1849, 1850 ] - }, - "EMIOTTC1CLKI": { - "direction": "input", - "bits": [ 1851, 1852, 1853 ] - }, - "SAXIACPARID": { - "direction": "input", - "bits": [ 1854, 1855, 1856 ] - }, - "SAXIACPARPROT": { - "direction": "input", - "bits": [ 1857, 1858, 1859 ] - }, - "SAXIACPAWID": { - "direction": "input", - "bits": [ 1860, 1861, 1862 ] - }, - "SAXIACPAWPROT": { - "direction": "input", - "bits": [ 1863, 1864, 1865 ] - }, - "SAXIACPWID": { - "direction": "input", - "bits": [ 1866, 1867, 1868 ] - }, - "SAXIGP0ARPROT": { - "direction": "input", - "bits": [ 1869, 1870, 1871 ] - }, - "SAXIGP0AWPROT": { - "direction": "input", - "bits": [ 1872, 1873, 1874 ] - }, - "SAXIGP1ARPROT": { - "direction": "input", - "bits": [ 1875, 1876, 1877 ] - }, - "SAXIGP1AWPROT": { - "direction": "input", - "bits": [ 1878, 1879, 1880 ] - }, - "SAXIHP0ARPROT": { - "direction": "input", - "bits": [ 1881, 1882, 1883 ] - }, - "SAXIHP0AWPROT": { - "direction": "input", - "bits": [ 1884, 1885, 1886 ] - }, - "SAXIHP1ARPROT": { - "direction": "input", - "bits": [ 1887, 1888, 1889 ] - }, - "SAXIHP1AWPROT": { - "direction": "input", - "bits": [ 1890, 1891, 1892 ] - }, - "SAXIHP2ARPROT": { - "direction": "input", - "bits": [ 1893, 1894, 1895 ] - }, - "SAXIHP2AWPROT": { - "direction": "input", - "bits": [ 1896, 1897, 1898 ] - }, - "SAXIHP3ARPROT": { - "direction": "input", - "bits": [ 1899, 1900, 1901 ] - }, - "SAXIHP3AWPROT": { - "direction": "input", - "bits": [ 1902, 1903, 1904 ] - }, - "FTMDTRACEINDATA": { - "direction": "input", - "bits": [ 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936 ] - }, - "FTMTF2PDEBUG": { - "direction": "input", - "bits": [ 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968 ] - }, - "MAXIGP0RDATA": { - "direction": "input", - "bits": [ 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 ] - }, - "MAXIGP1RDATA": { - "direction": "input", - "bits": [ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032 ] - }, - "SAXIACPARADDR": { - "direction": "input", - "bits": [ 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064 ] - }, - "SAXIACPAWADDR": { - "direction": "input", - "bits": [ 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096 ] - }, - "SAXIGP0ARADDR": { - "direction": "input", - "bits": [ 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128 ] - }, - "SAXIGP0AWADDR": { - "direction": "input", - "bits": [ 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160 ] - }, - "SAXIGP0WDATA": { - "direction": "input", - "bits": [ 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192 ] - }, - "SAXIGP1ARADDR": { - "direction": "input", - "bits": [ 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224 ] - }, - "SAXIGP1AWADDR": { - "direction": "input", - "bits": [ 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256 ] - }, - "SAXIGP1WDATA": { - "direction": "input", - "bits": [ 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288 ] - }, - "SAXIHP0ARADDR": { - "direction": "input", - "bits": [ 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 2320 ] - }, - "SAXIHP0AWADDR": { - "direction": "input", - "bits": [ 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352 ] - }, - "SAXIHP1ARADDR": { - "direction": "input", - "bits": [ 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2384 ] - }, - "SAXIHP1AWADDR": { - "direction": "input", - "bits": [ 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416 ] - }, - "SAXIHP2ARADDR": { - "direction": "input", - "bits": [ 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448 ] - }, - "SAXIHP2AWADDR": { - "direction": "input", - "bits": [ 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480 ] - }, - "SAXIHP3ARADDR": { - "direction": "input", - "bits": [ 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512 ] - }, - "SAXIHP3AWADDR": { - "direction": "input", - "bits": [ 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544 ] - }, - "DDRARB": { - "direction": "input", - "bits": [ 2545, 2546, 2547, 2548 ] - }, - "EMIOSDIO0DATAI": { - "direction": "input", - "bits": [ 2549, 2550, 2551, 2552 ] - }, - "EMIOSDIO1DATAI": { - "direction": "input", - "bits": [ 2553, 2554, 2555, 2556 ] - }, - "FCLKCLKTRIGN": { - "direction": "input", - "bits": [ 2557, 2558, 2559, 2560 ] - }, - "FTMDTRACEINATID": { - "direction": "input", - "bits": [ 2561, 2562, 2563, 2564 ] - }, - "FTMTF2PTRIG": { - "direction": "input", - "bits": [ 2565, 2566, 2567, 2568 ] - }, - "FTMTP2FTRIGACK": { - "direction": "input", - "bits": [ 2569, 2570, 2571, 2572 ] - }, - "SAXIACPARCACHE": { - "direction": "input", - "bits": [ 2573, 2574, 2575, 2576 ] - }, - "SAXIACPARLEN": { - "direction": "input", - "bits": [ 2577, 2578, 2579, 2580 ] - }, - "SAXIACPARQOS": { - "direction": "input", - "bits": [ 2581, 2582, 2583, 2584 ] - }, - "SAXIACPAWCACHE": { - "direction": "input", - "bits": [ 2585, 2586, 2587, 2588 ] - }, - "SAXIACPAWLEN": { - "direction": "input", - "bits": [ 2589, 2590, 2591, 2592 ] - }, - "SAXIACPAWQOS": { - "direction": "input", - "bits": [ 2593, 2594, 2595, 2596 ] - }, - "SAXIGP0ARCACHE": { - "direction": "input", - "bits": [ 2597, 2598, 2599, 2600 ] - }, - "SAXIGP0ARLEN": { - "direction": "input", - "bits": [ 2601, 2602, 2603, 2604 ] - }, - "SAXIGP0ARQOS": { - "direction": "input", - "bits": [ 2605, 2606, 2607, 2608 ] - }, - "SAXIGP0AWCACHE": { - "direction": "input", - "bits": [ 2609, 2610, 2611, 2612 ] - }, - "SAXIGP0AWLEN": { - "direction": "input", - "bits": [ 2613, 2614, 2615, 2616 ] - }, - "SAXIGP0AWQOS": { - "direction": "input", - "bits": [ 2617, 2618, 2619, 2620 ] - }, - "SAXIGP0WSTRB": { - "direction": "input", - "bits": [ 2621, 2622, 2623, 2624 ] - }, - "SAXIGP1ARCACHE": { - "direction": "input", - "bits": [ 2625, 2626, 2627, 2628 ] - }, - "SAXIGP1ARLEN": { - "direction": "input", - "bits": [ 2629, 2630, 2631, 2632 ] - }, - "SAXIGP1ARQOS": { - "direction": "input", - "bits": [ 2633, 2634, 2635, 2636 ] - }, - "SAXIGP1AWCACHE": { - "direction": "input", - "bits": [ 2637, 2638, 2639, 2640 ] - }, - "SAXIGP1AWLEN": { - "direction": "input", - "bits": [ 2641, 2642, 2643, 2644 ] - }, - "SAXIGP1AWQOS": { - "direction": "input", - "bits": [ 2645, 2646, 2647, 2648 ] - }, - "SAXIGP1WSTRB": { - "direction": "input", - "bits": [ 2649, 2650, 2651, 2652 ] - }, - "SAXIHP0ARCACHE": { - "direction": "input", - "bits": [ 2653, 2654, 2655, 2656 ] - }, - "SAXIHP0ARLEN": { - "direction": "input", - "bits": [ 2657, 2658, 2659, 2660 ] - }, - "SAXIHP0ARQOS": { - "direction": "input", - "bits": [ 2661, 2662, 2663, 2664 ] - }, - "SAXIHP0AWCACHE": { - "direction": "input", - "bits": [ 2665, 2666, 2667, 2668 ] - }, - "SAXIHP0AWLEN": { - "direction": "input", - "bits": [ 2669, 2670, 2671, 2672 ] - }, - "SAXIHP0AWQOS": { - "direction": "input", - "bits": [ 2673, 2674, 2675, 2676 ] - }, - "SAXIHP1ARCACHE": { - "direction": "input", - "bits": [ 2677, 2678, 2679, 2680 ] - }, - "SAXIHP1ARLEN": { - "direction": "input", - "bits": [ 2681, 2682, 2683, 2684 ] - }, - "SAXIHP1ARQOS": { - "direction": "input", - "bits": [ 2685, 2686, 2687, 2688 ] - }, - "SAXIHP1AWCACHE": { - "direction": "input", - "bits": [ 2689, 2690, 2691, 2692 ] - }, - "SAXIHP1AWLEN": { - "direction": "input", - "bits": [ 2693, 2694, 2695, 2696 ] - }, - "SAXIHP1AWQOS": { - "direction": "input", - "bits": [ 2697, 2698, 2699, 2700 ] - }, - "SAXIHP2ARCACHE": { - "direction": "input", - "bits": [ 2701, 2702, 2703, 2704 ] - }, - "SAXIHP2ARLEN": { - "direction": "input", - "bits": [ 2705, 2706, 2707, 2708 ] - }, - "SAXIHP2ARQOS": { - "direction": "input", - "bits": [ 2709, 2710, 2711, 2712 ] - }, - "SAXIHP2AWCACHE": { - "direction": "input", - "bits": [ 2713, 2714, 2715, 2716 ] - }, - "SAXIHP2AWLEN": { - "direction": "input", - "bits": [ 2717, 2718, 2719, 2720 ] - }, - "SAXIHP2AWQOS": { - "direction": "input", - "bits": [ 2721, 2722, 2723, 2724 ] - }, - "SAXIHP3ARCACHE": { - "direction": "input", - "bits": [ 2725, 2726, 2727, 2728 ] - }, - "SAXIHP3ARLEN": { - "direction": "input", - "bits": [ 2729, 2730, 2731, 2732 ] - }, - "SAXIHP3ARQOS": { - "direction": "input", - "bits": [ 2733, 2734, 2735, 2736 ] - }, - "SAXIHP3AWCACHE": { - "direction": "input", - "bits": [ 2737, 2738, 2739, 2740 ] - }, - "SAXIHP3AWLEN": { - "direction": "input", - "bits": [ 2741, 2742, 2743, 2744 ] - }, - "SAXIHP3AWQOS": { - "direction": "input", - "bits": [ 2745, 2746, 2747, 2748 ] - }, - "SAXIACPARUSER": { - "direction": "input", - "bits": [ 2749, 2750, 2751, 2752, 2753 ] - }, - "SAXIACPAWUSER": { - "direction": "input", - "bits": [ 2754, 2755, 2756, 2757, 2758 ] - }, - "SAXIGP0ARID": { - "direction": "input", - "bits": [ 2759, 2760, 2761, 2762, 2763, 2764 ] - }, - "SAXIGP0AWID": { - "direction": "input", - "bits": [ 2765, 2766, 2767, 2768, 2769, 2770 ] - }, - "SAXIGP0WID": { - "direction": "input", - "bits": [ 2771, 2772, 2773, 2774, 2775, 2776 ] - }, - "SAXIGP1ARID": { - "direction": "input", - "bits": [ 2777, 2778, 2779, 2780, 2781, 2782 ] - }, - "SAXIGP1AWID": { - "direction": "input", - "bits": [ 2783, 2784, 2785, 2786, 2787, 2788 ] - }, - "SAXIGP1WID": { - "direction": "input", - "bits": [ 2789, 2790, 2791, 2792, 2793, 2794 ] - }, - "SAXIHP0ARID": { - "direction": "input", - "bits": [ 2795, 2796, 2797, 2798, 2799, 2800 ] - }, - "SAXIHP0AWID": { - "direction": "input", - "bits": [ 2801, 2802, 2803, 2804, 2805, 2806 ] - }, - "SAXIHP0WID": { - "direction": "input", - "bits": [ 2807, 2808, 2809, 2810, 2811, 2812 ] - }, - "SAXIHP1ARID": { - "direction": "input", - "bits": [ 2813, 2814, 2815, 2816, 2817, 2818 ] - }, - "SAXIHP1AWID": { - "direction": "input", - "bits": [ 2819, 2820, 2821, 2822, 2823, 2824 ] - }, - "SAXIHP1WID": { - "direction": "input", - "bits": [ 2825, 2826, 2827, 2828, 2829, 2830 ] - }, - "SAXIHP2ARID": { - "direction": "input", - "bits": [ 2831, 2832, 2833, 2834, 2835, 2836 ] - }, - "SAXIHP2AWID": { - "direction": "input", - "bits": [ 2837, 2838, 2839, 2840, 2841, 2842 ] - }, - "SAXIHP2WID": { - "direction": "input", - "bits": [ 2843, 2844, 2845, 2846, 2847, 2848 ] - }, - "SAXIHP3ARID": { - "direction": "input", - "bits": [ 2849, 2850, 2851, 2852, 2853, 2854 ] - }, - "SAXIHP3AWID": { - "direction": "input", - "bits": [ 2855, 2856, 2857, 2858, 2859, 2860 ] - }, - "SAXIHP3WID": { - "direction": "input", - "bits": [ 2861, 2862, 2863, 2864, 2865, 2866 ] - }, - "EMIOGPIOI": { - "direction": "input", - "bits": [ 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930 ] - }, - "SAXIACPWDATA": { - "direction": "input", - "bits": [ 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994 ] - }, - "SAXIHP0WDATA": { - "direction": "input", - "bits": [ 2995, 2996, 2997, 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058 ] - }, - "SAXIHP1WDATA": { - "direction": "input", - "bits": [ 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122 ] - }, - "SAXIHP2WDATA": { - "direction": "input", - "bits": [ 3123, 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184, 3185, 3186 ] - }, - "SAXIHP3WDATA": { - "direction": "input", - "bits": [ 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250 ] - }, - "EMIOENET0GMIIRXD": { - "direction": "input", - "bits": [ 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258 ] - }, - "EMIOENET1GMIIRXD": { - "direction": "input", - "bits": [ 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266 ] - }, - "SAXIACPWSTRB": { - "direction": "input", - "bits": [ 3267, 3268, 3269, 3270, 3271, 3272, 3273, 3274 ] - }, - "SAXIHP0WSTRB": { - "direction": "input", - "bits": [ 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282 ] - }, - "SAXIHP1WSTRB": { - "direction": "input", - "bits": [ 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290 ] - }, - "SAXIHP2WSTRB": { - "direction": "input", - "bits": [ 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298 ] - }, - "SAXIHP3WSTRB": { - "direction": "input", - "bits": [ 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306 ] - } - }, - "cells": { - }, - "netnames": { - "DDRA": { - "hide_name": 0, - "bits": [ 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5384" - } - }, - "DDRARB": { - "hide_name": 0, - "bits": [ 2545, 2546, 2547, 2548 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5632" - } - }, - "DDRBA": { - "hide_name": 0, - "bits": [ 1432, 1433, 1434 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5385" - } - }, - "DDRCASB": { - "hide_name": 0, - "bits": [ 1403 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5370" - } - }, - "DDRCKE": { - "hide_name": 0, - "bits": [ 1404 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5371" - } - }, - "DDRCKN": { - "hide_name": 0, - "bits": [ 1405 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5372" - } - }, - "DDRCKP": { - "hide_name": 0, - "bits": [ 1406 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5373" - } - }, - "DDRCSB": { - "hide_name": 0, - "bits": [ 1407 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5374" - } - }, - "DDRDM": { - "hide_name": 0, - "bits": [ 1467, 1468, 1469, 1470 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5387" - } - }, - "DDRDQ": { - "hide_name": 0, - "bits": [ 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5386" - } - }, - "DDRDQSN": { - "hide_name": 0, - "bits": [ 1471, 1472, 1473, 1474 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5388" - } - }, - "DDRDQSP": { - "hide_name": 0, - "bits": [ 1475, 1476, 1477, 1478 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5389" - } - }, - "DDRDRSTB": { - "hide_name": 0, - "bits": [ 1408 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5375" - } - }, - "DDRODT": { - "hide_name": 0, - "bits": [ 1409 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5376" - } - }, - "DDRRASB": { - "hide_name": 0, - "bits": [ 1410 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5377" - } - }, - "DDRVRN": { - "hide_name": 0, - "bits": [ 1411 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5378" - } - }, - "DDRVRP": { - "hide_name": 0, - "bits": [ 1412 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5379" - } - }, - "DDRWEB": { - "hide_name": 0, - "bits": [ 1413 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5380" - } - }, - "DMA0ACLK": { - "hide_name": 0, - "bits": [ 1533 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5391" - } - }, - "DMA0DAREADY": { - "hide_name": 0, - "bits": [ 1534 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5392" - } - }, - "DMA0DATYPE": { - "hide_name": 0, - "bits": [ 226, 227 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5254" - } - }, - "DMA0DAVALID": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5096" - } - }, - "DMA0DRLAST": { - "hide_name": 0, - "bits": [ 1535 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5393" - } - }, - "DMA0DRREADY": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5097" - } - }, - "DMA0DRTYPE": { - "hide_name": 0, - "bits": [ 1748, 1749 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5543" - } - }, - "DMA0DRVALID": { - "hide_name": 0, - "bits": [ 1536 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5394" - } - }, - "DMA0RSTN": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5098" - } - }, - "DMA1ACLK": { - "hide_name": 0, - "bits": [ 1537 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5395" - } - }, - "DMA1DAREADY": { - "hide_name": 0, - "bits": [ 1538 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5396" - } - }, - "DMA1DATYPE": { - "hide_name": 0, - "bits": [ 228, 229 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5255" - } - }, - "DMA1DAVALID": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5099" - } - }, - "DMA1DRLAST": { - "hide_name": 0, - "bits": [ 1539 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5397" - } - }, - "DMA1DRREADY": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5100" - } - }, - "DMA1DRTYPE": { - "hide_name": 0, - "bits": [ 1750, 1751 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5544" - } - }, - "DMA1DRVALID": { - "hide_name": 0, - "bits": [ 1540 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5398" - } - }, - "DMA1RSTN": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5101" - } - }, - "DMA2ACLK": { - "hide_name": 0, - "bits": [ 1541 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5399" - } - }, - "DMA2DAREADY": { - "hide_name": 0, - "bits": [ 1542 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5400" - } - }, - "DMA2DATYPE": { - "hide_name": 0, - "bits": [ 230, 231 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5256" - } - }, - "DMA2DAVALID": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5102" - } - }, - "DMA2DRLAST": { - "hide_name": 0, - "bits": [ 1543 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5401" - } - }, - "DMA2DRREADY": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5103" - } - }, - "DMA2DRTYPE": { - "hide_name": 0, - "bits": [ 1752, 1753 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5545" - } - }, - "DMA2DRVALID": { - "hide_name": 0, - "bits": [ 1544 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5402" - } - }, - "DMA2RSTN": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5104" - } - }, - "DMA3ACLK": { - "hide_name": 0, - "bits": [ 1545 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5403" - } - }, - "DMA3DAREADY": { - "hide_name": 0, - "bits": [ 1546 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5404" - } - }, - "DMA3DATYPE": { - "hide_name": 0, - "bits": [ 232, 233 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5257" - } - }, - "DMA3DAVALID": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5105" - } - }, - "DMA3DRLAST": { - "hide_name": 0, - "bits": [ 1547 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5405" - } - }, - "DMA3DRREADY": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5106" - } - }, - "DMA3DRTYPE": { - "hide_name": 0, - "bits": [ 1754, 1755 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5546" - } - }, - "DMA3DRVALID": { - "hide_name": 0, - "bits": [ 1548 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5406" - } - }, - "DMA3RSTN": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5107" - } - }, - "EMIOCAN0PHYRX": { - "hide_name": 0, - "bits": [ 1549 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5407" - } - }, - "EMIOCAN0PHYTX": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5108" - } - }, - "EMIOCAN1PHYRX": { - "hide_name": 0, - "bits": [ 1550 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5408" - } - }, - "EMIOCAN1PHYTX": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5109" - } - }, - "EMIOENET0EXTINTIN": { - "hide_name": 0, - "bits": [ 1551 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5409" - } - }, - "EMIOENET0GMIICOL": { - "hide_name": 0, - "bits": [ 1552 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5410" - } - }, - "EMIOENET0GMIICRS": { - "hide_name": 0, - "bits": [ 1553 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5411" - } - }, - "EMIOENET0GMIIRXCLK": { - "hide_name": 0, - "bits": [ 1554 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5412" - } - }, - "EMIOENET0GMIIRXD": { - "hide_name": 0, - "bits": [ 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5709" - } - }, - "EMIOENET0GMIIRXDV": { - "hide_name": 0, - "bits": [ 1555 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5413" - } - }, - "EMIOENET0GMIIRXER": { - "hide_name": 0, - "bits": [ 1556 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5414" - } - }, - "EMIOENET0GMIITXCLK": { - "hide_name": 0, - "bits": [ 1557 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5415" - } - }, - "EMIOENET0GMIITXD": { - "hide_name": 0, - "bits": [ 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5360" - } - }, - "EMIOENET0GMIITXEN": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5110" - } - }, - "EMIOENET0GMIITXER": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5111" - } - }, - "EMIOENET0MDIOI": { - "hide_name": 0, - "bits": [ 1558 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5416" - } - }, - "EMIOENET0MDIOMDC": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5112" - } - }, - "EMIOENET0MDIOO": { - "hide_name": 0, - "bits": [ 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5113" - } - }, - "EMIOENET0MDIOTN": { - "hide_name": 0, - "bits": [ 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5114" - } - }, - "EMIOENET0PTPDELAYREQRX": { - "hide_name": 0, - "bits": [ 21 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5115" - } - }, - "EMIOENET0PTPDELAYREQTX": { - "hide_name": 0, - "bits": [ 22 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5116" - } - }, - "EMIOENET0PTPPDELAYREQRX": { - "hide_name": 0, - "bits": [ 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5117" - } - }, - "EMIOENET0PTPPDELAYREQTX": { - "hide_name": 0, - "bits": [ 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5118" - } - }, - "EMIOENET0PTPPDELAYRESPRX": { - "hide_name": 0, - "bits": [ 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5119" - } - }, - "EMIOENET0PTPPDELAYRESPTX": { - "hide_name": 0, - "bits": [ 26 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5120" - } - }, - "EMIOENET0PTPSYNCFRAMERX": { - "hide_name": 0, - "bits": [ 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5121" - } - }, - "EMIOENET0PTPSYNCFRAMETX": { - "hide_name": 0, - "bits": [ 28 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5122" - } - }, - "EMIOENET0SOFRX": { - "hide_name": 0, - "bits": [ 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5123" - } - }, - "EMIOENET0SOFTX": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5124" - } - }, - "EMIOENET1EXTINTIN": { - "hide_name": 0, - "bits": [ 1559 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5417" - } - }, - "EMIOENET1GMIICOL": { - "hide_name": 0, - "bits": [ 1560 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5418" - } - }, - "EMIOENET1GMIICRS": { - "hide_name": 0, - "bits": [ 1561 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5419" - } - }, - "EMIOENET1GMIIRXCLK": { - "hide_name": 0, - "bits": [ 1562 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5420" - } - }, - "EMIOENET1GMIIRXD": { - "hide_name": 0, - "bits": [ 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5710" - } - }, - "EMIOENET1GMIIRXDV": { - "hide_name": 0, - "bits": [ 1563 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5421" - } - }, - "EMIOENET1GMIIRXER": { - "hide_name": 0, - "bits": [ 1564 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5422" - } - }, - "EMIOENET1GMIITXCLK": { - "hide_name": 0, - "bits": [ 1565 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5423" - } - }, - "EMIOENET1GMIITXD": { - "hide_name": 0, - "bits": [ 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5361" - } - }, - "EMIOENET1GMIITXEN": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5125" - } - }, - "EMIOENET1GMIITXER": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5126" - } - }, - "EMIOENET1MDIOI": { - "hide_name": 0, - "bits": [ 1566 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5424" - } - }, - "EMIOENET1MDIOMDC": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5127" - } - }, - "EMIOENET1MDIOO": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5128" - } - }, - "EMIOENET1MDIOTN": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5129" - } - }, - "EMIOENET1PTPDELAYREQRX": { - "hide_name": 0, - "bits": [ 36 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5130" - } - }, - "EMIOENET1PTPDELAYREQTX": { - "hide_name": 0, - "bits": [ 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5131" - } - }, - "EMIOENET1PTPPDELAYREQRX": { - "hide_name": 0, - "bits": [ 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5132" - } - }, - "EMIOENET1PTPPDELAYREQTX": { - "hide_name": 0, - "bits": [ 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5133" - } - }, - "EMIOENET1PTPPDELAYRESPRX": { - "hide_name": 0, - "bits": [ 40 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5134" - } - }, - "EMIOENET1PTPPDELAYRESPTX": { - "hide_name": 0, - "bits": [ 41 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5135" - } - }, - "EMIOENET1PTPSYNCFRAMERX": { - "hide_name": 0, - "bits": [ 42 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5136" - } - }, - "EMIOENET1PTPSYNCFRAMETX": { - "hide_name": 0, - "bits": [ 43 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5137" - } - }, - "EMIOENET1SOFRX": { - "hide_name": 0, - "bits": [ 44 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5138" - } - }, - "EMIOENET1SOFTX": { - "hide_name": 0, - "bits": [ 45 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5139" - } - }, - "EMIOGPIOI": { - "hide_name": 0, - "bits": [ 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5703" - } - }, - "EMIOGPIOO": { - "hide_name": 0, - "bits": [ 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5353" - } - }, - "EMIOGPIOTN": { - "hide_name": 0, - "bits": [ 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5354" - } - }, - "EMIOI2C0SCLI": { - "hide_name": 0, - "bits": [ 1567 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5425" - } - }, - "EMIOI2C0SCLO": { - "hide_name": 0, - "bits": [ 46 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5140" - } - }, - "EMIOI2C0SCLTN": { - "hide_name": 0, - "bits": [ 47 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5141" - } - }, - "EMIOI2C0SDAI": { - "hide_name": 0, - "bits": [ 1568 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5426" - } - }, - "EMIOI2C0SDAO": { - "hide_name": 0, - "bits": [ 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5142" - } - }, - "EMIOI2C0SDATN": { - "hide_name": 0, - "bits": [ 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5143" - } - }, - "EMIOI2C1SCLI": { - "hide_name": 0, - "bits": [ 1569 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5427" - } - }, - "EMIOI2C1SCLO": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5144" - } - }, - "EMIOI2C1SCLTN": { - "hide_name": 0, - "bits": [ 51 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5145" - } - }, - "EMIOI2C1SDAI": { - "hide_name": 0, - "bits": [ 1570 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5428" - } - }, - "EMIOI2C1SDAO": { - "hide_name": 0, - "bits": [ 52 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5146" - } - }, - "EMIOI2C1SDATN": { - "hide_name": 0, - "bits": [ 53 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5147" - } - }, - "EMIOPJTAGTCK": { - "hide_name": 0, - "bits": [ 1571 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5429" - } - }, - "EMIOPJTAGTDI": { - "hide_name": 0, - "bits": [ 1572 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5430" - } - }, - "EMIOPJTAGTDO": { - "hide_name": 0, - "bits": [ 54 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5148" - } - }, - "EMIOPJTAGTDTN": { - "hide_name": 0, - "bits": [ 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5149" - } - }, - "EMIOPJTAGTMS": { - "hide_name": 0, - "bits": [ 1573 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5431" - } - }, - "EMIOSDIO0BUSPOW": { - "hide_name": 0, - "bits": [ 56 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5150" - } - }, - "EMIOSDIO0BUSVOLT": { - "hide_name": 0, - "bits": [ 323, 324, 325 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5289" - } - }, - "EMIOSDIO0CDN": { - "hide_name": 0, - "bits": [ 1574 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5432" - } - }, - "EMIOSDIO0CLK": { - "hide_name": 0, - "bits": [ 57 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5151" - } - }, - "EMIOSDIO0CLKFB": { - "hide_name": 0, - "bits": [ 1575 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5433" - } - }, - "EMIOSDIO0CMDI": { - "hide_name": 0, - "bits": [ 1576 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5434" - } - }, - "EMIOSDIO0CMDO": { - "hide_name": 0, - "bits": [ 58 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5152" - } - }, - "EMIOSDIO0CMDTN": { - "hide_name": 0, - "bits": [ 59 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5153" - } - }, - "EMIOSDIO0DATAI": { - "hide_name": 0, - "bits": [ 2549, 2550, 2551, 2552 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5633" - } - }, - "EMIOSDIO0DATAO": { - "hide_name": 0, - "bits": [ 691, 692, 693, 694 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5315" - } - }, - "EMIOSDIO0DATATN": { - "hide_name": 0, - "bits": [ 695, 696, 697, 698 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5316" - } - }, - "EMIOSDIO0LED": { - "hide_name": 0, - "bits": [ 60 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5154" - } - }, - "EMIOSDIO0WP": { - "hide_name": 0, - "bits": [ 1577 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5435" - } - }, - "EMIOSDIO1BUSPOW": { - "hide_name": 0, - "bits": [ 61 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5155" - } - }, - "EMIOSDIO1BUSVOLT": { - "hide_name": 0, - "bits": [ 326, 327, 328 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5290" - } - }, - "EMIOSDIO1CDN": { - "hide_name": 0, - "bits": [ 1578 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5436" - } - }, - "EMIOSDIO1CLK": { - "hide_name": 0, - "bits": [ 62 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5156" - } - }, - "EMIOSDIO1CLKFB": { - "hide_name": 0, - "bits": [ 1579 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5437" - } - }, - "EMIOSDIO1CMDI": { - "hide_name": 0, - "bits": [ 1580 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5438" - } - }, - "EMIOSDIO1CMDO": { - "hide_name": 0, - "bits": [ 63 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5157" - } - }, - "EMIOSDIO1CMDTN": { - "hide_name": 0, - "bits": [ 64 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5158" - } - }, - "EMIOSDIO1DATAI": { - "hide_name": 0, - "bits": [ 2553, 2554, 2555, 2556 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5634" - } - }, - "EMIOSDIO1DATAO": { - "hide_name": 0, - "bits": [ 699, 700, 701, 702 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5317" - } - }, - "EMIOSDIO1DATATN": { - "hide_name": 0, - "bits": [ 703, 704, 705, 706 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5318" - } - }, - "EMIOSDIO1LED": { - "hide_name": 0, - "bits": [ 65 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5159" - } - }, - "EMIOSDIO1WP": { - "hide_name": 0, - "bits": [ 1581 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5439" - } - }, - "EMIOSPI0MI": { - "hide_name": 0, - "bits": [ 1582 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5440" - } - }, - "EMIOSPI0MO": { - "hide_name": 0, - "bits": [ 66 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5160" - } - }, - "EMIOSPI0MOTN": { - "hide_name": 0, - "bits": [ 67 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5161" - } - }, - "EMIOSPI0SCLKI": { - "hide_name": 0, - "bits": [ 1583 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5441" - } - }, - "EMIOSPI0SCLKO": { - "hide_name": 0, - "bits": [ 68 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5162" - } - }, - "EMIOSPI0SCLKTN": { - "hide_name": 0, - "bits": [ 69 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5163" - } - }, - "EMIOSPI0SI": { - "hide_name": 0, - "bits": [ 1584 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5442" - } - }, - "EMIOSPI0SO": { - "hide_name": 0, - "bits": [ 70 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5164" - } - }, - "EMIOSPI0SSIN": { - "hide_name": 0, - "bits": [ 1585 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5443" - } - }, - "EMIOSPI0SSNTN": { - "hide_name": 0, - "bits": [ 71 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5165" - } - }, - "EMIOSPI0SSON": { - "hide_name": 0, - "bits": [ 329, 330, 331 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5291" - } - }, - "EMIOSPI0STN": { - "hide_name": 0, - "bits": [ 72 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5166" - } - }, - "EMIOSPI1MI": { - "hide_name": 0, - "bits": [ 1586 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5444" - } - }, - "EMIOSPI1MO": { - "hide_name": 0, - "bits": [ 73 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5167" - } - }, - "EMIOSPI1MOTN": { - "hide_name": 0, - "bits": [ 74 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5168" - } - }, - "EMIOSPI1SCLKI": { - "hide_name": 0, - "bits": [ 1587 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5445" - } - }, - "EMIOSPI1SCLKO": { - "hide_name": 0, - "bits": [ 75 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5169" - } - }, - "EMIOSPI1SCLKTN": { - "hide_name": 0, - "bits": [ 76 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5170" - } - }, - "EMIOSPI1SI": { - "hide_name": 0, - "bits": [ 1588 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5446" - } - }, - "EMIOSPI1SO": { - "hide_name": 0, - "bits": [ 77 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5171" - } - }, - "EMIOSPI1SSIN": { - "hide_name": 0, - "bits": [ 1589 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5447" - } - }, - "EMIOSPI1SSNTN": { - "hide_name": 0, - "bits": [ 78 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5172" - } - }, - "EMIOSPI1SSON": { - "hide_name": 0, - "bits": [ 332, 333, 334 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5292" - } - }, - "EMIOSPI1STN": { - "hide_name": 0, - "bits": [ 79 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5173" - } - }, - "EMIOSRAMINTIN": { - "hide_name": 0, - "bits": [ 1590 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5448" - } - }, - "EMIOTRACECLK": { - "hide_name": 0, - "bits": [ 1591 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5449" - } - }, - "EMIOTRACECTL": { - "hide_name": 0, - "bits": [ 80 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5174" - } - }, - "EMIOTRACEDATA": { - "hide_name": 0, - "bits": [ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5305" - } - }, - "EMIOTTC0CLKI": { - "hide_name": 0, - "bits": [ 1848, 1849, 1850 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5593" - } - }, - "EMIOTTC0WAVEO": { - "hide_name": 0, - "bits": [ 335, 336, 337 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5293" - } - }, - "EMIOTTC1CLKI": { - "hide_name": 0, - "bits": [ 1851, 1852, 1853 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5594" - } - }, - "EMIOTTC1WAVEO": { - "hide_name": 0, - "bits": [ 338, 339, 340 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5294" - } - }, - "EMIOUART0CTSN": { - "hide_name": 0, - "bits": [ 1592 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5450" - } - }, - "EMIOUART0DCDN": { - "hide_name": 0, - "bits": [ 1593 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5451" - } - }, - "EMIOUART0DSRN": { - "hide_name": 0, - "bits": [ 1594 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5452" - } - }, - "EMIOUART0DTRN": { - "hide_name": 0, - "bits": [ 81 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5175" - } - }, - "EMIOUART0RIN": { - "hide_name": 0, - "bits": [ 1595 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5453" - } - }, - "EMIOUART0RTSN": { - "hide_name": 0, - "bits": [ 82 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5176" - } - }, - "EMIOUART0RX": { - "hide_name": 0, - "bits": [ 1596 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5454" - } - }, - "EMIOUART0TX": { - "hide_name": 0, - "bits": [ 83 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5177" - } - }, - "EMIOUART1CTSN": { - "hide_name": 0, - "bits": [ 1597 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5455" - } - }, - "EMIOUART1DCDN": { - "hide_name": 0, - "bits": [ 1598 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5456" - } - }, - "EMIOUART1DSRN": { - "hide_name": 0, - "bits": [ 1599 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5457" - } - }, - "EMIOUART1DTRN": { - "hide_name": 0, - "bits": [ 84 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5178" - } - }, - "EMIOUART1RIN": { - "hide_name": 0, - "bits": [ 1600 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5458" - } - }, - "EMIOUART1RTSN": { - "hide_name": 0, - "bits": [ 85 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5179" - } - }, - "EMIOUART1RX": { - "hide_name": 0, - "bits": [ 1601 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5459" - } - }, - "EMIOUART1TX": { - "hide_name": 0, - "bits": [ 86 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5180" - } - }, - "EMIOUSB0PORTINDCTL": { - "hide_name": 0, - "bits": [ 234, 235 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5258" - } - }, - "EMIOUSB0VBUSPWRFAULT": { - "hide_name": 0, - "bits": [ 1602 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5460" - } - }, - "EMIOUSB0VBUSPWRSELECT": { - "hide_name": 0, - "bits": [ 87 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5181" - } - }, - "EMIOUSB1PORTINDCTL": { - "hide_name": 0, - "bits": [ 236, 237 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5259" - } - }, - "EMIOUSB1VBUSPWRFAULT": { - "hide_name": 0, - "bits": [ 1603 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5461" - } - }, - "EMIOUSB1VBUSPWRSELECT": { - "hide_name": 0, - "bits": [ 88 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5182" - } - }, - "EMIOWDTCLKI": { - "hide_name": 0, - "bits": [ 1604 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5462" - } - }, - "EMIOWDTRSTO": { - "hide_name": 0, - "bits": [ 89 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5183" - } - }, - "EVENTEVENTI": { - "hide_name": 0, - "bits": [ 1605 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5463" - } - }, - "EVENTEVENTO": { - "hide_name": 0, - "bits": [ 90 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5184" - } - }, - "EVENTSTANDBYWFE": { - "hide_name": 0, - "bits": [ 238, 239 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5260" - } - }, - "EVENTSTANDBYWFI": { - "hide_name": 0, - "bits": [ 240, 241 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5261" - } - }, - "FCLKCLK": { - "hide_name": 0, - "bits": [ 707, 708, 709, 710 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5319" - } - }, - "FCLKCLKTRIGN": { - "hide_name": 0, - "bits": [ 2557, 2558, 2559, 2560 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5635" - } - }, - "FCLKRESETN": { - "hide_name": 0, - "bits": [ 711, 712, 713, 714 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5320" - } - }, - "FPGAIDLEN": { - "hide_name": 0, - "bits": [ 1606 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5464" - } - }, - "FTMDTRACEINATID": { - "hide_name": 0, - "bits": [ 2561, 2562, 2563, 2564 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5636" - } - }, - "FTMDTRACEINCLOCK": { - "hide_name": 0, - "bits": [ 1607 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5465" - } - }, - "FTMDTRACEINDATA": { - "hide_name": 0, - "bits": [ 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5612" - } - }, - "FTMDTRACEINVALID": { - "hide_name": 0, - "bits": [ 1608 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5466" - } - }, - "FTMTF2PDEBUG": { - "hide_name": 0, - "bits": [ 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5613" - } - }, - "FTMTF2PTRIG": { - "hide_name": 0, - "bits": [ 2565, 2566, 2567, 2568 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5637" - } - }, - "FTMTF2PTRIGACK": { - "hide_name": 0, - "bits": [ 715, 716, 717, 718 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5321" - } - }, - "FTMTP2FDEBUG": { - "hide_name": 0, - "bits": [ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5306" - } - }, - "FTMTP2FTRIG": { - "hide_name": 0, - "bits": [ 719, 720, 721, 722 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5322" - } - }, - "FTMTP2FTRIGACK": { - "hide_name": 0, - "bits": [ 2569, 2570, 2571, 2572 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5638" - } - }, - "IRQF2P": { - "hide_name": 0, - "bits": [ 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5542" - } - }, - "IRQP2F": { - "hide_name": 0, - "bits": [ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5288" - } - }, - "MAXIGP0ACLK": { - "hide_name": 0, - "bits": [ 1609 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5467" - } - }, - "MAXIGP0ARADDR": { - "hide_name": 0, - "bits": [ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5307" - } - }, - "MAXIGP0ARBURST": { - "hide_name": 0, - "bits": [ 242, 243 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5262" - } - }, - "MAXIGP0ARCACHE": { - "hide_name": 0, - "bits": [ 723, 724, 725, 726 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5323" - } - }, - "MAXIGP0ARESETN": { - "hide_name": 0, - "bits": [ 91 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5185" - } - }, - "MAXIGP0ARID": { - "hide_name": 0, - "bits": [ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5248" - } - }, - "MAXIGP0ARLEN": { - "hide_name": 0, - "bits": [ 727, 728, 729, 730 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5324" - } - }, - "MAXIGP0ARLOCK": { - "hide_name": 0, - "bits": [ 244, 245 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5263" - } - }, - "MAXIGP0ARPROT": { - "hide_name": 0, - "bits": [ 341, 342, 343 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5295" - } - }, - "MAXIGP0ARQOS": { - "hide_name": 0, - "bits": [ 731, 732, 733, 734 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5325" - } - }, - "MAXIGP0ARREADY": { - "hide_name": 0, - "bits": [ 1610 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5468" - } - }, - "MAXIGP0ARSIZE": { - "hide_name": 0, - "bits": [ 246, 247 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5264" - } - }, - "MAXIGP0ARVALID": { - "hide_name": 0, - "bits": [ 92 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5186" - } - }, - "MAXIGP0AWADDR": { - "hide_name": 0, - "bits": [ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5308" - } - }, - "MAXIGP0AWBURST": { - "hide_name": 0, - "bits": [ 248, 249 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5265" - } - }, - "MAXIGP0AWCACHE": { - "hide_name": 0, - "bits": [ 735, 736, 737, 738 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5326" - } - }, - "MAXIGP0AWID": { - "hide_name": 0, - "bits": [ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5249" - } - }, - "MAXIGP0AWLEN": { - "hide_name": 0, - "bits": [ 739, 740, 741, 742 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5327" - } - }, - "MAXIGP0AWLOCK": { - "hide_name": 0, - "bits": [ 250, 251 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5266" - } - }, - "MAXIGP0AWPROT": { - "hide_name": 0, - "bits": [ 344, 345, 346 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5296" - } - }, - "MAXIGP0AWQOS": { - "hide_name": 0, - "bits": [ 743, 744, 745, 746 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5328" - } - }, - "MAXIGP0AWREADY": { - "hide_name": 0, - "bits": [ 1611 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5469" - } - }, - "MAXIGP0AWSIZE": { - "hide_name": 0, - "bits": [ 252, 253 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5267" - } - }, - "MAXIGP0AWVALID": { - "hide_name": 0, - "bits": [ 93 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5187" - } - }, - "MAXIGP0BID": { - "hide_name": 0, - "bits": [ 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5538" - } - }, - "MAXIGP0BREADY": { - "hide_name": 0, - "bits": [ 94 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5188" - } - }, - "MAXIGP0BRESP": { - "hide_name": 0, - "bits": [ 1756, 1757 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5547" - } - }, - "MAXIGP0BVALID": { - "hide_name": 0, - "bits": [ 1612 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5470" - } - }, - "MAXIGP0RDATA": { - "hide_name": 0, - "bits": [ 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5614" - } - }, - "MAXIGP0RID": { - "hide_name": 0, - "bits": [ 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5539" - } - }, - "MAXIGP0RLAST": { - "hide_name": 0, - "bits": [ 1613 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5471" - } - }, - "MAXIGP0RREADY": { - "hide_name": 0, - "bits": [ 95 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5189" - } - }, - "MAXIGP0RRESP": { - "hide_name": 0, - "bits": [ 1758, 1759 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5548" - } - }, - "MAXIGP0RVALID": { - "hide_name": 0, - "bits": [ 1614 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5472" - } - }, - "MAXIGP0WDATA": { - "hide_name": 0, - "bits": [ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5309" - } - }, - "MAXIGP0WID": { - "hide_name": 0, - "bits": [ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5250" - } - }, - "MAXIGP0WLAST": { - "hide_name": 0, - "bits": [ 96 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5190" - } - }, - "MAXIGP0WREADY": { - "hide_name": 0, - "bits": [ 1615 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5473" - } - }, - "MAXIGP0WSTRB": { - "hide_name": 0, - "bits": [ 747, 748, 749, 750 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5329" - } - }, - "MAXIGP0WVALID": { - "hide_name": 0, - "bits": [ 97 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5191" - } - }, - "MAXIGP1ACLK": { - "hide_name": 0, - "bits": [ 1616 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5474" - } - }, - "MAXIGP1ARADDR": { - "hide_name": 0, - "bits": [ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5310" - } - }, - "MAXIGP1ARBURST": { - "hide_name": 0, - "bits": [ 254, 255 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5268" - } - }, - "MAXIGP1ARCACHE": { - "hide_name": 0, - "bits": [ 751, 752, 753, 754 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5330" - } - }, - "MAXIGP1ARESETN": { - "hide_name": 0, - "bits": [ 98 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5192" - } - }, - "MAXIGP1ARID": { - "hide_name": 0, - "bits": [ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5251" - } - }, - "MAXIGP1ARLEN": { - "hide_name": 0, - "bits": [ 755, 756, 757, 758 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5331" - } - }, - "MAXIGP1ARLOCK": { - "hide_name": 0, - "bits": [ 256, 257 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5269" - } - }, - "MAXIGP1ARPROT": { - "hide_name": 0, - "bits": [ 347, 348, 349 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5297" - } - }, - "MAXIGP1ARQOS": { - "hide_name": 0, - "bits": [ 759, 760, 761, 762 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5332" - } - }, - "MAXIGP1ARREADY": { - "hide_name": 0, - "bits": [ 1617 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5475" - } - }, - "MAXIGP1ARSIZE": { - "hide_name": 0, - "bits": [ 258, 259 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5270" - } - }, - "MAXIGP1ARVALID": { - "hide_name": 0, - "bits": [ 99 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5193" - } - }, - "MAXIGP1AWADDR": { - "hide_name": 0, - "bits": [ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5311" - } - }, - "MAXIGP1AWBURST": { - "hide_name": 0, - "bits": [ 260, 261 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5271" - } - }, - "MAXIGP1AWCACHE": { - "hide_name": 0, - "bits": [ 763, 764, 765, 766 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5333" - } - }, - "MAXIGP1AWID": { - "hide_name": 0, - "bits": [ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5252" - } - }, - "MAXIGP1AWLEN": { - "hide_name": 0, - "bits": [ 767, 768, 769, 770 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5334" - } - }, - "MAXIGP1AWLOCK": { - "hide_name": 0, - "bits": [ 262, 263 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5272" - } - }, - "MAXIGP1AWPROT": { - "hide_name": 0, - "bits": [ 350, 351, 352 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5298" - } - }, - "MAXIGP1AWQOS": { - "hide_name": 0, - "bits": [ 771, 772, 773, 774 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5335" - } - }, - "MAXIGP1AWREADY": { - "hide_name": 0, - "bits": [ 1618 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5476" - } - }, - "MAXIGP1AWSIZE": { - "hide_name": 0, - "bits": [ 264, 265 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5273" - } - }, - "MAXIGP1AWVALID": { - "hide_name": 0, - "bits": [ 100 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5194" - } - }, - "MAXIGP1BID": { - "hide_name": 0, - "bits": [ 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5540" - } - }, - "MAXIGP1BREADY": { - "hide_name": 0, - "bits": [ 101 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5195" - } - }, - "MAXIGP1BRESP": { - "hide_name": 0, - "bits": [ 1760, 1761 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5549" - } - }, - "MAXIGP1BVALID": { - "hide_name": 0, - "bits": [ 1619 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5477" - } - }, - "MAXIGP1RDATA": { - "hide_name": 0, - "bits": [ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5615" - } - }, - "MAXIGP1RID": { - "hide_name": 0, - "bits": [ 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5541" - } - }, - "MAXIGP1RLAST": { - "hide_name": 0, - "bits": [ 1620 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5478" - } - }, - "MAXIGP1RREADY": { - "hide_name": 0, - "bits": [ 102 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5196" - } - }, - "MAXIGP1RRESP": { - "hide_name": 0, - "bits": [ 1762, 1763 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5550" - } - }, - "MAXIGP1RVALID": { - "hide_name": 0, - "bits": [ 1621 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5479" - } - }, - "MAXIGP1WDATA": { - "hide_name": 0, - "bits": [ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5312" - } - }, - "MAXIGP1WID": { - "hide_name": 0, - "bits": [ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5253" - } - }, - "MAXIGP1WLAST": { - "hide_name": 0, - "bits": [ 103 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5197" - } - }, - "MAXIGP1WREADY": { - "hide_name": 0, - "bits": [ 1622 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5480" - } - }, - "MAXIGP1WSTRB": { - "hide_name": 0, - "bits": [ 775, 776, 777, 778 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5336" - } - }, - "MAXIGP1WVALID": { - "hide_name": 0, - "bits": [ 104 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5198" - } - }, - "MIO": { - "hide_name": 0, - "bits": [ 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5390" - } - }, - "PSCLK": { - "hide_name": 0, - "bits": [ 1414 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5381" - } - }, - "PSPORB": { - "hide_name": 0, - "bits": [ 1415 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5382" - } - }, - "PSSRSTB": { - "hide_name": 0, - "bits": [ 1416 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5383" - } - }, - "SAXIACPACLK": { - "hide_name": 0, - "bits": [ 1623 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5481" - } - }, - "SAXIACPARADDR": { - "hide_name": 0, - "bits": [ 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5616" - } - }, - "SAXIACPARBURST": { - "hide_name": 0, - "bits": [ 1764, 1765 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5551" - } - }, - "SAXIACPARCACHE": { - "hide_name": 0, - "bits": [ 2573, 2574, 2575, 2576 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5639" - } - }, - "SAXIACPARESETN": { - "hide_name": 0, - "bits": [ 105 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5199" - } - }, - "SAXIACPARID": { - "hide_name": 0, - "bits": [ 1854, 1855, 1856 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5595" - } - }, - "SAXIACPARLEN": { - "hide_name": 0, - "bits": [ 2577, 2578, 2579, 2580 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5640" - } - }, - "SAXIACPARLOCK": { - "hide_name": 0, - "bits": [ 1766, 1767 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5552" - } - }, - "SAXIACPARPROT": { - "hide_name": 0, - "bits": [ 1857, 1858, 1859 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5596" - } - }, - "SAXIACPARQOS": { - "hide_name": 0, - "bits": [ 2581, 2582, 2583, 2584 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5641" - } - }, - "SAXIACPARREADY": { - "hide_name": 0, - "bits": [ 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5200" - } - }, - "SAXIACPARSIZE": { - "hide_name": 0, - "bits": [ 1768, 1769 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5553" - } - }, - "SAXIACPARUSER": { - "hide_name": 0, - "bits": [ 2749, 2750, 2751, 2752, 2753 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5683" - } - }, - "SAXIACPARVALID": { - "hide_name": 0, - "bits": [ 1624 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5482" - } - }, - "SAXIACPAWADDR": { - "hide_name": 0, - "bits": [ 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5617" - } - }, - "SAXIACPAWBURST": { - "hide_name": 0, - "bits": [ 1770, 1771 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5554" - } - }, - "SAXIACPAWCACHE": { - "hide_name": 0, - "bits": [ 2585, 2586, 2587, 2588 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5642" - } - }, - "SAXIACPAWID": { - "hide_name": 0, - "bits": [ 1860, 1861, 1862 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5597" - } - }, - "SAXIACPAWLEN": { - "hide_name": 0, - "bits": [ 2589, 2590, 2591, 2592 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5643" - } - }, - "SAXIACPAWLOCK": { - "hide_name": 0, - "bits": [ 1772, 1773 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5555" - } - }, - "SAXIACPAWPROT": { - "hide_name": 0, - "bits": [ 1863, 1864, 1865 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5598" - } - }, - "SAXIACPAWQOS": { - "hide_name": 0, - "bits": [ 2593, 2594, 2595, 2596 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5644" - } - }, - "SAXIACPAWREADY": { - "hide_name": 0, - "bits": [ 107 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5201" - } - }, - "SAXIACPAWSIZE": { - "hide_name": 0, - "bits": [ 1774, 1775 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5556" - } - }, - "SAXIACPAWUSER": { - "hide_name": 0, - "bits": [ 2754, 2755, 2756, 2757, 2758 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5684" - } - }, - "SAXIACPAWVALID": { - "hide_name": 0, - "bits": [ 1625 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5483" - } - }, - "SAXIACPBID": { - "hide_name": 0, - "bits": [ 353, 354, 355 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5299" - } - }, - "SAXIACPBREADY": { - "hide_name": 0, - "bits": [ 1626 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5484" - } - }, - "SAXIACPBRESP": { - "hide_name": 0, - "bits": [ 266, 267 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5274" - } - }, - "SAXIACPBVALID": { - "hide_name": 0, - "bits": [ 108 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5202" - } - }, - "SAXIACPRDATA": { - "hide_name": 0, - "bits": [ 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5355" - } - }, - "SAXIACPRID": { - "hide_name": 0, - "bits": [ 356, 357, 358 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5300" - } - }, - "SAXIACPRLAST": { - "hide_name": 0, - "bits": [ 109 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5203" - } - }, - "SAXIACPRREADY": { - "hide_name": 0, - "bits": [ 1627 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5485" - } - }, - "SAXIACPRRESP": { - "hide_name": 0, - "bits": [ 268, 269 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5275" - } - }, - "SAXIACPRVALID": { - "hide_name": 0, - "bits": [ 110 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5204" - } - }, - "SAXIACPWDATA": { - "hide_name": 0, - "bits": [ 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5704" - } - }, - "SAXIACPWID": { - "hide_name": 0, - "bits": [ 1866, 1867, 1868 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5599" - } - }, - "SAXIACPWLAST": { - "hide_name": 0, - "bits": [ 1628 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5486" - } - }, - "SAXIACPWREADY": { - "hide_name": 0, - "bits": [ 111 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5205" - } - }, - "SAXIACPWSTRB": { - "hide_name": 0, - "bits": [ 3267, 3268, 3269, 3270, 3271, 3272, 3273, 3274 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5711" - } - }, - "SAXIACPWVALID": { - "hide_name": 0, - "bits": [ 1629 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5487" - } - }, - "SAXIGP0ACLK": { - "hide_name": 0, - "bits": [ 1630 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5488" - } - }, - "SAXIGP0ARADDR": { - "hide_name": 0, - "bits": [ 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5618" - } - }, - "SAXIGP0ARBURST": { - "hide_name": 0, - "bits": [ 1776, 1777 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5557" - } - }, - "SAXIGP0ARCACHE": { - "hide_name": 0, - "bits": [ 2597, 2598, 2599, 2600 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5645" - } - }, - "SAXIGP0ARESETN": { - "hide_name": 0, - "bits": [ 112 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5206" - } - }, - "SAXIGP0ARID": { - "hide_name": 0, - "bits": [ 2759, 2760, 2761, 2762, 2763, 2764 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5685" - } - }, - "SAXIGP0ARLEN": { - "hide_name": 0, - "bits": [ 2601, 2602, 2603, 2604 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5646" - } - }, - "SAXIGP0ARLOCK": { - "hide_name": 0, - "bits": [ 1778, 1779 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5558" - } - }, - "SAXIGP0ARPROT": { - "hide_name": 0, - "bits": [ 1869, 1870, 1871 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5600" - } - }, - "SAXIGP0ARQOS": { - "hide_name": 0, - "bits": [ 2605, 2606, 2607, 2608 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5647" - } - }, - "SAXIGP0ARREADY": { - "hide_name": 0, - "bits": [ 113 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5207" - } - }, - "SAXIGP0ARSIZE": { - "hide_name": 0, - "bits": [ 1780, 1781 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5559" - } - }, - "SAXIGP0ARVALID": { - "hide_name": 0, - "bits": [ 1631 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5489" - } - }, - "SAXIGP0AWADDR": { - "hide_name": 0, - "bits": [ 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5619" - } - }, - "SAXIGP0AWBURST": { - "hide_name": 0, - "bits": [ 1782, 1783 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5560" - } - }, - "SAXIGP0AWCACHE": { - "hide_name": 0, - "bits": [ 2609, 2610, 2611, 2612 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5648" - } - }, - "SAXIGP0AWID": { - "hide_name": 0, - "bits": [ 2765, 2766, 2767, 2768, 2769, 2770 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5686" - } - }, - "SAXIGP0AWLEN": { - "hide_name": 0, - "bits": [ 2613, 2614, 2615, 2616 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5649" - } - }, - "SAXIGP0AWLOCK": { - "hide_name": 0, - "bits": [ 1784, 1785 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5561" - } - }, - "SAXIGP0AWPROT": { - "hide_name": 0, - "bits": [ 1872, 1873, 1874 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5601" - } - }, - "SAXIGP0AWQOS": { - "hide_name": 0, - "bits": [ 2617, 2618, 2619, 2620 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5650" - } - }, - "SAXIGP0AWREADY": { - "hide_name": 0, - "bits": [ 114 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5208" - } - }, - "SAXIGP0AWSIZE": { - "hide_name": 0, - "bits": [ 1786, 1787 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5562" - } - }, - "SAXIGP0AWVALID": { - "hide_name": 0, - "bits": [ 1632 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5490" - } - }, - "SAXIGP0BID": { - "hide_name": 0, - "bits": [ 779, 780, 781, 782, 783, 784 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5337" - } - }, - "SAXIGP0BREADY": { - "hide_name": 0, - "bits": [ 1633 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5491" - } - }, - "SAXIGP0BRESP": { - "hide_name": 0, - "bits": [ 270, 271 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5276" - } - }, - "SAXIGP0BVALID": { - "hide_name": 0, - "bits": [ 115 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5209" - } - }, - "SAXIGP0RDATA": { - "hide_name": 0, - "bits": [ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5313" - } - }, - "SAXIGP0RID": { - "hide_name": 0, - "bits": [ 785, 786, 787, 788, 789, 790 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5338" - } - }, - "SAXIGP0RLAST": { - "hide_name": 0, - "bits": [ 116 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5210" - } - }, - "SAXIGP0RREADY": { - "hide_name": 0, - "bits": [ 1634 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5492" - } - }, - "SAXIGP0RRESP": { - "hide_name": 0, - "bits": [ 272, 273 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5277" - } - }, - "SAXIGP0RVALID": { - "hide_name": 0, - "bits": [ 117 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5211" - } - }, - "SAXIGP0WDATA": { - "hide_name": 0, - "bits": [ 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5620" - } - }, - "SAXIGP0WID": { - "hide_name": 0, - "bits": [ 2771, 2772, 2773, 2774, 2775, 2776 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5687" - } - }, - "SAXIGP0WLAST": { - "hide_name": 0, - "bits": [ 1635 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5493" - } - }, - "SAXIGP0WREADY": { - "hide_name": 0, - "bits": [ 118 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5212" - } - }, - "SAXIGP0WSTRB": { - "hide_name": 0, - "bits": [ 2621, 2622, 2623, 2624 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5651" - } - }, - "SAXIGP0WVALID": { - "hide_name": 0, - "bits": [ 1636 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5494" - } - }, - "SAXIGP1ACLK": { - "hide_name": 0, - "bits": [ 1637 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5495" - } - }, - "SAXIGP1ARADDR": { - "hide_name": 0, - "bits": [ 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5621" - } - }, - "SAXIGP1ARBURST": { - "hide_name": 0, - "bits": [ 1788, 1789 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5563" - } - }, - "SAXIGP1ARCACHE": { - "hide_name": 0, - "bits": [ 2625, 2626, 2627, 2628 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5652" - } - }, - "SAXIGP1ARESETN": { - "hide_name": 0, - "bits": [ 119 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5213" - } - }, - "SAXIGP1ARID": { - "hide_name": 0, - "bits": [ 2777, 2778, 2779, 2780, 2781, 2782 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5688" - } - }, - "SAXIGP1ARLEN": { - "hide_name": 0, - "bits": [ 2629, 2630, 2631, 2632 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5653" - } - }, - "SAXIGP1ARLOCK": { - "hide_name": 0, - "bits": [ 1790, 1791 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5564" - } - }, - "SAXIGP1ARPROT": { - "hide_name": 0, - "bits": [ 1875, 1876, 1877 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5602" - } - }, - "SAXIGP1ARQOS": { - "hide_name": 0, - "bits": [ 2633, 2634, 2635, 2636 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5654" - } - }, - "SAXIGP1ARREADY": { - "hide_name": 0, - "bits": [ 120 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5214" - } - }, - "SAXIGP1ARSIZE": { - "hide_name": 0, - "bits": [ 1792, 1793 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5565" - } - }, - "SAXIGP1ARVALID": { - "hide_name": 0, - "bits": [ 1638 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5496" - } - }, - "SAXIGP1AWADDR": { - "hide_name": 0, - "bits": [ 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5622" - } - }, - "SAXIGP1AWBURST": { - "hide_name": 0, - "bits": [ 1794, 1795 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5566" - } - }, - "SAXIGP1AWCACHE": { - "hide_name": 0, - "bits": [ 2637, 2638, 2639, 2640 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5655" - } - }, - "SAXIGP1AWID": { - "hide_name": 0, - "bits": [ 2783, 2784, 2785, 2786, 2787, 2788 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5689" - } - }, - "SAXIGP1AWLEN": { - "hide_name": 0, - "bits": [ 2641, 2642, 2643, 2644 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5656" - } - }, - "SAXIGP1AWLOCK": { - "hide_name": 0, - "bits": [ 1796, 1797 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5567" - } - }, - "SAXIGP1AWPROT": { - "hide_name": 0, - "bits": [ 1878, 1879, 1880 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5603" - } - }, - "SAXIGP1AWQOS": { - "hide_name": 0, - "bits": [ 2645, 2646, 2647, 2648 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5657" - } - }, - "SAXIGP1AWREADY": { - "hide_name": 0, - "bits": [ 121 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5215" - } - }, - "SAXIGP1AWSIZE": { - "hide_name": 0, - "bits": [ 1798, 1799 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5568" - } - }, - "SAXIGP1AWVALID": { - "hide_name": 0, - "bits": [ 1639 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5497" - } - }, - "SAXIGP1BID": { - "hide_name": 0, - "bits": [ 791, 792, 793, 794, 795, 796 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5339" - } - }, - "SAXIGP1BREADY": { - "hide_name": 0, - "bits": [ 1640 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5498" - } - }, - "SAXIGP1BRESP": { - "hide_name": 0, - "bits": [ 274, 275 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5278" - } - }, - "SAXIGP1BVALID": { - "hide_name": 0, - "bits": [ 122 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5216" - } - }, - "SAXIGP1RDATA": { - "hide_name": 0, - "bits": [ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5314" - } - }, - "SAXIGP1RID": { - "hide_name": 0, - "bits": [ 797, 798, 799, 800, 801, 802 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5340" - } - }, - "SAXIGP1RLAST": { - "hide_name": 0, - "bits": [ 123 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5217" - } - }, - "SAXIGP1RREADY": { - "hide_name": 0, - "bits": [ 1641 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5499" - } - }, - "SAXIGP1RRESP": { - "hide_name": 0, - "bits": [ 276, 277 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5279" - } - }, - "SAXIGP1RVALID": { - "hide_name": 0, - "bits": [ 124 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5218" - } - }, - "SAXIGP1WDATA": { - "hide_name": 0, - "bits": [ 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5623" - } - }, - "SAXIGP1WID": { - "hide_name": 0, - "bits": [ 2789, 2790, 2791, 2792, 2793, 2794 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5690" - } - }, - "SAXIGP1WLAST": { - "hide_name": 0, - "bits": [ 1642 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5500" - } - }, - "SAXIGP1WREADY": { - "hide_name": 0, - "bits": [ 125 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5219" - } - }, - "SAXIGP1WSTRB": { - "hide_name": 0, - "bits": [ 2649, 2650, 2651, 2652 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5658" - } - }, - "SAXIGP1WVALID": { - "hide_name": 0, - "bits": [ 1643 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5501" - } - }, - "SAXIHP0ACLK": { - "hide_name": 0, - "bits": [ 1644 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5502" - } - }, - "SAXIHP0ARADDR": { - "hide_name": 0, - "bits": [ 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 2320 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5624" - } - }, - "SAXIHP0ARBURST": { - "hide_name": 0, - "bits": [ 1800, 1801 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5569" - } - }, - "SAXIHP0ARCACHE": { - "hide_name": 0, - "bits": [ 2653, 2654, 2655, 2656 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5659" - } - }, - "SAXIHP0ARESETN": { - "hide_name": 0, - "bits": [ 126 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5220" - } - }, - "SAXIHP0ARID": { - "hide_name": 0, - "bits": [ 2795, 2796, 2797, 2798, 2799, 2800 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5691" - } - }, - "SAXIHP0ARLEN": { - "hide_name": 0, - "bits": [ 2657, 2658, 2659, 2660 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5660" - } - }, - "SAXIHP0ARLOCK": { - "hide_name": 0, - "bits": [ 1802, 1803 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5570" - } - }, - "SAXIHP0ARPROT": { - "hide_name": 0, - "bits": [ 1881, 1882, 1883 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5604" - } - }, - "SAXIHP0ARQOS": { - "hide_name": 0, - "bits": [ 2661, 2662, 2663, 2664 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5661" - } - }, - "SAXIHP0ARREADY": { - "hide_name": 0, - "bits": [ 127 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5221" - } - }, - "SAXIHP0ARSIZE": { - "hide_name": 0, - "bits": [ 1804, 1805 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5571" - } - }, - "SAXIHP0ARVALID": { - "hide_name": 0, - "bits": [ 1645 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5503" - } - }, - "SAXIHP0AWADDR": { - "hide_name": 0, - "bits": [ 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5625" - } - }, - "SAXIHP0AWBURST": { - "hide_name": 0, - "bits": [ 1806, 1807 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5572" - } - }, - "SAXIHP0AWCACHE": { - "hide_name": 0, - "bits": [ 2665, 2666, 2667, 2668 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5662" - } - }, - "SAXIHP0AWID": { - "hide_name": 0, - "bits": [ 2801, 2802, 2803, 2804, 2805, 2806 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5692" - } - }, - "SAXIHP0AWLEN": { - "hide_name": 0, - "bits": [ 2669, 2670, 2671, 2672 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5663" - } - }, - "SAXIHP0AWLOCK": { - "hide_name": 0, - "bits": [ 1808, 1809 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5573" - } - }, - "SAXIHP0AWPROT": { - "hide_name": 0, - "bits": [ 1884, 1885, 1886 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5605" - } - }, - "SAXIHP0AWQOS": { - "hide_name": 0, - "bits": [ 2673, 2674, 2675, 2676 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5664" - } - }, - "SAXIHP0AWREADY": { - "hide_name": 0, - "bits": [ 128 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5222" - } - }, - "SAXIHP0AWSIZE": { - "hide_name": 0, - "bits": [ 1810, 1811 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5574" - } - }, - "SAXIHP0AWVALID": { - "hide_name": 0, - "bits": [ 1646 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5504" - } - }, - "SAXIHP0BID": { - "hide_name": 0, - "bits": [ 803, 804, 805, 806, 807, 808 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5341" - } - }, - "SAXIHP0BREADY": { - "hide_name": 0, - "bits": [ 1647 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5505" - } - }, - "SAXIHP0BRESP": { - "hide_name": 0, - "bits": [ 278, 279 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5280" - } - }, - "SAXIHP0BVALID": { - "hide_name": 0, - "bits": [ 129 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5223" - } - }, - "SAXIHP0RACOUNT": { - "hide_name": 0, - "bits": [ 359, 360, 361 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5301" - } - }, - "SAXIHP0RCOUNT": { - "hide_name": 0, - "bits": [ 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5362" - } - }, - "SAXIHP0RDATA": { - "hide_name": 0, - "bits": [ 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5356" - } - }, - "SAXIHP0RDISSUECAP1EN": { - "hide_name": 0, - "bits": [ 1648 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5506" - } - }, - "SAXIHP0RID": { - "hide_name": 0, - "bits": [ 809, 810, 811, 812, 813, 814 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5342" - } - }, - "SAXIHP0RLAST": { - "hide_name": 0, - "bits": [ 130 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5224" - } - }, - "SAXIHP0RREADY": { - "hide_name": 0, - "bits": [ 1649 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5507" - } - }, - "SAXIHP0RRESP": { - "hide_name": 0, - "bits": [ 280, 281 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5281" - } - }, - "SAXIHP0RVALID": { - "hide_name": 0, - "bits": [ 131 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5225" - } - }, - "SAXIHP0WACOUNT": { - "hide_name": 0, - "bits": [ 815, 816, 817, 818, 819, 820 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5343" - } - }, - "SAXIHP0WCOUNT": { - "hide_name": 0, - "bits": [ 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5363" - } - }, - "SAXIHP0WDATA": { - "hide_name": 0, - "bits": [ 2995, 2996, 2997, 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5705" - } - }, - "SAXIHP0WID": { - "hide_name": 0, - "bits": [ 2807, 2808, 2809, 2810, 2811, 2812 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5693" - } - }, - "SAXIHP0WLAST": { - "hide_name": 0, - "bits": [ 1650 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5508" - } - }, - "SAXIHP0WREADY": { - "hide_name": 0, - "bits": [ 132 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5226" - } - }, - "SAXIHP0WRISSUECAP1EN": { - "hide_name": 0, - "bits": [ 1651 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5509" - } - }, - "SAXIHP0WSTRB": { - "hide_name": 0, - "bits": [ 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5712" - } - }, - "SAXIHP0WVALID": { - "hide_name": 0, - "bits": [ 1652 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5510" - } - }, - "SAXIHP1ACLK": { - "hide_name": 0, - "bits": [ 1653 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5511" - } - }, - "SAXIHP1ARADDR": { - "hide_name": 0, - "bits": [ 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2384 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5626" - } - }, - "SAXIHP1ARBURST": { - "hide_name": 0, - "bits": [ 1812, 1813 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5575" - } - }, - "SAXIHP1ARCACHE": { - "hide_name": 0, - "bits": [ 2677, 2678, 2679, 2680 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5665" - } - }, - "SAXIHP1ARESETN": { - "hide_name": 0, - "bits": [ 133 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5227" - } - }, - "SAXIHP1ARID": { - "hide_name": 0, - "bits": [ 2813, 2814, 2815, 2816, 2817, 2818 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5694" - } - }, - "SAXIHP1ARLEN": { - "hide_name": 0, - "bits": [ 2681, 2682, 2683, 2684 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5666" - } - }, - "SAXIHP1ARLOCK": { - "hide_name": 0, - "bits": [ 1814, 1815 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5576" - } - }, - "SAXIHP1ARPROT": { - "hide_name": 0, - "bits": [ 1887, 1888, 1889 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5606" - } - }, - "SAXIHP1ARQOS": { - "hide_name": 0, - "bits": [ 2685, 2686, 2687, 2688 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5667" - } - }, - "SAXIHP1ARREADY": { - "hide_name": 0, - "bits": [ 134 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5228" - } - }, - "SAXIHP1ARSIZE": { - "hide_name": 0, - "bits": [ 1816, 1817 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5577" - } - }, - "SAXIHP1ARVALID": { - "hide_name": 0, - "bits": [ 1654 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5512" - } - }, - "SAXIHP1AWADDR": { - "hide_name": 0, - "bits": [ 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5627" - } - }, - "SAXIHP1AWBURST": { - "hide_name": 0, - "bits": [ 1818, 1819 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5578" - } - }, - "SAXIHP1AWCACHE": { - "hide_name": 0, - "bits": [ 2689, 2690, 2691, 2692 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5668" - } - }, - "SAXIHP1AWID": { - "hide_name": 0, - "bits": [ 2819, 2820, 2821, 2822, 2823, 2824 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5695" - } - }, - "SAXIHP1AWLEN": { - "hide_name": 0, - "bits": [ 2693, 2694, 2695, 2696 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5669" - } - }, - "SAXIHP1AWLOCK": { - "hide_name": 0, - "bits": [ 1820, 1821 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5579" - } - }, - "SAXIHP1AWPROT": { - "hide_name": 0, - "bits": [ 1890, 1891, 1892 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5607" - } - }, - "SAXIHP1AWQOS": { - "hide_name": 0, - "bits": [ 2697, 2698, 2699, 2700 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5670" - } - }, - "SAXIHP1AWREADY": { - "hide_name": 0, - "bits": [ 135 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5229" - } - }, - "SAXIHP1AWSIZE": { - "hide_name": 0, - "bits": [ 1822, 1823 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5580" - } - }, - "SAXIHP1AWVALID": { - "hide_name": 0, - "bits": [ 1655 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5513" - } - }, - "SAXIHP1BID": { - "hide_name": 0, - "bits": [ 821, 822, 823, 824, 825, 826 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5344" - } - }, - "SAXIHP1BREADY": { - "hide_name": 0, - "bits": [ 1656 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5514" - } - }, - "SAXIHP1BRESP": { - "hide_name": 0, - "bits": [ 282, 283 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5282" - } - }, - "SAXIHP1BVALID": { - "hide_name": 0, - "bits": [ 136 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5230" - } - }, - "SAXIHP1RACOUNT": { - "hide_name": 0, - "bits": [ 362, 363, 364 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5302" - } - }, - "SAXIHP1RCOUNT": { - "hide_name": 0, - "bits": [ 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5364" - } - }, - "SAXIHP1RDATA": { - "hide_name": 0, - "bits": [ 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5357" - } - }, - "SAXIHP1RDISSUECAP1EN": { - "hide_name": 0, - "bits": [ 1657 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5515" - } - }, - "SAXIHP1RID": { - "hide_name": 0, - "bits": [ 827, 828, 829, 830, 831, 832 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5345" - } - }, - "SAXIHP1RLAST": { - "hide_name": 0, - "bits": [ 137 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5231" - } - }, - "SAXIHP1RREADY": { - "hide_name": 0, - "bits": [ 1658 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5516" - } - }, - "SAXIHP1RRESP": { - "hide_name": 0, - "bits": [ 284, 285 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5283" - } - }, - "SAXIHP1RVALID": { - "hide_name": 0, - "bits": [ 138 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5232" - } - }, - "SAXIHP1WACOUNT": { - "hide_name": 0, - "bits": [ 833, 834, 835, 836, 837, 838 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5346" - } - }, - "SAXIHP1WCOUNT": { - "hide_name": 0, - "bits": [ 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5365" - } - }, - "SAXIHP1WDATA": { - "hide_name": 0, - "bits": [ 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5706" - } - }, - "SAXIHP1WID": { - "hide_name": 0, - "bits": [ 2825, 2826, 2827, 2828, 2829, 2830 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5696" - } - }, - "SAXIHP1WLAST": { - "hide_name": 0, - "bits": [ 1659 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5517" - } - }, - "SAXIHP1WREADY": { - "hide_name": 0, - "bits": [ 139 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5233" - } - }, - "SAXIHP1WRISSUECAP1EN": { - "hide_name": 0, - "bits": [ 1660 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5518" - } - }, - "SAXIHP1WSTRB": { - "hide_name": 0, - "bits": [ 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5713" - } - }, - "SAXIHP1WVALID": { - "hide_name": 0, - "bits": [ 1661 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5519" - } - }, - "SAXIHP2ACLK": { - "hide_name": 0, - "bits": [ 1662 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5520" - } - }, - "SAXIHP2ARADDR": { - "hide_name": 0, - "bits": [ 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5628" - } - }, - "SAXIHP2ARBURST": { - "hide_name": 0, - "bits": [ 1824, 1825 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5581" - } - }, - "SAXIHP2ARCACHE": { - "hide_name": 0, - "bits": [ 2701, 2702, 2703, 2704 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5671" - } - }, - "SAXIHP2ARESETN": { - "hide_name": 0, - "bits": [ 140 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5234" - } - }, - "SAXIHP2ARID": { - "hide_name": 0, - "bits": [ 2831, 2832, 2833, 2834, 2835, 2836 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5697" - } - }, - "SAXIHP2ARLEN": { - "hide_name": 0, - "bits": [ 2705, 2706, 2707, 2708 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5672" - } - }, - "SAXIHP2ARLOCK": { - "hide_name": 0, - "bits": [ 1826, 1827 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5582" - } - }, - "SAXIHP2ARPROT": { - "hide_name": 0, - "bits": [ 1893, 1894, 1895 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5608" - } - }, - "SAXIHP2ARQOS": { - "hide_name": 0, - "bits": [ 2709, 2710, 2711, 2712 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5673" - } - }, - "SAXIHP2ARREADY": { - "hide_name": 0, - "bits": [ 141 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5235" - } - }, - "SAXIHP2ARSIZE": { - "hide_name": 0, - "bits": [ 1828, 1829 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5583" - } - }, - "SAXIHP2ARVALID": { - "hide_name": 0, - "bits": [ 1663 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5521" - } - }, - "SAXIHP2AWADDR": { - "hide_name": 0, - "bits": [ 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5629" - } - }, - "SAXIHP2AWBURST": { - "hide_name": 0, - "bits": [ 1830, 1831 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5584" - } - }, - "SAXIHP2AWCACHE": { - "hide_name": 0, - "bits": [ 2713, 2714, 2715, 2716 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5674" - } - }, - "SAXIHP2AWID": { - "hide_name": 0, - "bits": [ 2837, 2838, 2839, 2840, 2841, 2842 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5698" - } - }, - "SAXIHP2AWLEN": { - "hide_name": 0, - "bits": [ 2717, 2718, 2719, 2720 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5675" - } - }, - "SAXIHP2AWLOCK": { - "hide_name": 0, - "bits": [ 1832, 1833 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5585" - } - }, - "SAXIHP2AWPROT": { - "hide_name": 0, - "bits": [ 1896, 1897, 1898 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5609" - } - }, - "SAXIHP2AWQOS": { - "hide_name": 0, - "bits": [ 2721, 2722, 2723, 2724 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5676" - } - }, - "SAXIHP2AWREADY": { - "hide_name": 0, - "bits": [ 142 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5236" - } - }, - "SAXIHP2AWSIZE": { - "hide_name": 0, - "bits": [ 1834, 1835 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5586" - } - }, - "SAXIHP2AWVALID": { - "hide_name": 0, - "bits": [ 1664 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5522" - } - }, - "SAXIHP2BID": { - "hide_name": 0, - "bits": [ 839, 840, 841, 842, 843, 844 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5347" - } - }, - "SAXIHP2BREADY": { - "hide_name": 0, - "bits": [ 1665 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5523" - } - }, - "SAXIHP2BRESP": { - "hide_name": 0, - "bits": [ 286, 287 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5284" - } - }, - "SAXIHP2BVALID": { - "hide_name": 0, - "bits": [ 143 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5237" - } - }, - "SAXIHP2RACOUNT": { - "hide_name": 0, - "bits": [ 365, 366, 367 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5303" - } - }, - "SAXIHP2RCOUNT": { - "hide_name": 0, - "bits": [ 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5366" - } - }, - "SAXIHP2RDATA": { - "hide_name": 0, - "bits": [ 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5358" - } - }, - "SAXIHP2RDISSUECAP1EN": { - "hide_name": 0, - "bits": [ 1666 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5524" - } - }, - "SAXIHP2RID": { - "hide_name": 0, - "bits": [ 845, 846, 847, 848, 849, 850 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5348" - } - }, - "SAXIHP2RLAST": { - "hide_name": 0, - "bits": [ 144 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5238" - } - }, - "SAXIHP2RREADY": { - "hide_name": 0, - "bits": [ 1667 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5525" - } - }, - "SAXIHP2RRESP": { - "hide_name": 0, - "bits": [ 288, 289 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5285" - } - }, - "SAXIHP2RVALID": { - "hide_name": 0, - "bits": [ 145 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5239" - } - }, - "SAXIHP2WACOUNT": { - "hide_name": 0, - "bits": [ 851, 852, 853, 854, 855, 856 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5349" - } - }, - "SAXIHP2WCOUNT": { - "hide_name": 0, - "bits": [ 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5367" - } - }, - "SAXIHP2WDATA": { - "hide_name": 0, - "bits": [ 3123, 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184, 3185, 3186 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5707" - } - }, - "SAXIHP2WID": { - "hide_name": 0, - "bits": [ 2843, 2844, 2845, 2846, 2847, 2848 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5699" - } - }, - "SAXIHP2WLAST": { - "hide_name": 0, - "bits": [ 1668 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5526" - } - }, - "SAXIHP2WREADY": { - "hide_name": 0, - "bits": [ 146 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5240" - } - }, - "SAXIHP2WRISSUECAP1EN": { - "hide_name": 0, - "bits": [ 1669 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5527" - } - }, - "SAXIHP2WSTRB": { - "hide_name": 0, - "bits": [ 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5714" - } - }, - "SAXIHP2WVALID": { - "hide_name": 0, - "bits": [ 1670 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5528" - } - }, - "SAXIHP3ACLK": { - "hide_name": 0, - "bits": [ 1671 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5529" - } - }, - "SAXIHP3ARADDR": { - "hide_name": 0, - "bits": [ 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5630" - } - }, - "SAXIHP3ARBURST": { - "hide_name": 0, - "bits": [ 1836, 1837 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5587" - } - }, - "SAXIHP3ARCACHE": { - "hide_name": 0, - "bits": [ 2725, 2726, 2727, 2728 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5677" - } - }, - "SAXIHP3ARESETN": { - "hide_name": 0, - "bits": [ 147 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5241" - } - }, - "SAXIHP3ARID": { - "hide_name": 0, - "bits": [ 2849, 2850, 2851, 2852, 2853, 2854 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5700" - } - }, - "SAXIHP3ARLEN": { - "hide_name": 0, - "bits": [ 2729, 2730, 2731, 2732 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5678" - } - }, - "SAXIHP3ARLOCK": { - "hide_name": 0, - "bits": [ 1838, 1839 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5588" - } - }, - "SAXIHP3ARPROT": { - "hide_name": 0, - "bits": [ 1899, 1900, 1901 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5610" - } - }, - "SAXIHP3ARQOS": { - "hide_name": 0, - "bits": [ 2733, 2734, 2735, 2736 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5679" - } - }, - "SAXIHP3ARREADY": { - "hide_name": 0, - "bits": [ 148 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5242" - } - }, - "SAXIHP3ARSIZE": { - "hide_name": 0, - "bits": [ 1840, 1841 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5589" - } - }, - "SAXIHP3ARVALID": { - "hide_name": 0, - "bits": [ 1672 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5530" - } - }, - "SAXIHP3AWADDR": { - "hide_name": 0, - "bits": [ 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5631" - } - }, - "SAXIHP3AWBURST": { - "hide_name": 0, - "bits": [ 1842, 1843 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5590" - } - }, - "SAXIHP3AWCACHE": { - "hide_name": 0, - "bits": [ 2737, 2738, 2739, 2740 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5680" - } - }, - "SAXIHP3AWID": { - "hide_name": 0, - "bits": [ 2855, 2856, 2857, 2858, 2859, 2860 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5701" - } - }, - "SAXIHP3AWLEN": { - "hide_name": 0, - "bits": [ 2741, 2742, 2743, 2744 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5681" - } - }, - "SAXIHP3AWLOCK": { - "hide_name": 0, - "bits": [ 1844, 1845 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5591" - } - }, - "SAXIHP3AWPROT": { - "hide_name": 0, - "bits": [ 1902, 1903, 1904 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5611" - } - }, - "SAXIHP3AWQOS": { - "hide_name": 0, - "bits": [ 2745, 2746, 2747, 2748 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5682" - } - }, - "SAXIHP3AWREADY": { - "hide_name": 0, - "bits": [ 149 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5243" - } - }, - "SAXIHP3AWSIZE": { - "hide_name": 0, - "bits": [ 1846, 1847 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5592" - } - }, - "SAXIHP3AWVALID": { - "hide_name": 0, - "bits": [ 1673 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5531" - } - }, - "SAXIHP3BID": { - "hide_name": 0, - "bits": [ 857, 858, 859, 860, 861, 862 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5350" - } - }, - "SAXIHP3BREADY": { - "hide_name": 0, - "bits": [ 1674 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5532" - } - }, - "SAXIHP3BRESP": { - "hide_name": 0, - "bits": [ 290, 291 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5286" - } - }, - "SAXIHP3BVALID": { - "hide_name": 0, - "bits": [ 150 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5244" - } - }, - "SAXIHP3RACOUNT": { - "hide_name": 0, - "bits": [ 368, 369, 370 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5304" - } - }, - "SAXIHP3RCOUNT": { - "hide_name": 0, - "bits": [ 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5368" - } - }, - "SAXIHP3RDATA": { - "hide_name": 0, - "bits": [ 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5359" - } - }, - "SAXIHP3RDISSUECAP1EN": { - "hide_name": 0, - "bits": [ 1675 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5533" - } - }, - "SAXIHP3RID": { - "hide_name": 0, - "bits": [ 863, 864, 865, 866, 867, 868 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5351" - } - }, - "SAXIHP3RLAST": { - "hide_name": 0, - "bits": [ 151 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5245" - } - }, - "SAXIHP3RREADY": { - "hide_name": 0, - "bits": [ 1676 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5534" - } - }, - "SAXIHP3RRESP": { - "hide_name": 0, - "bits": [ 292, 293 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5287" - } - }, - "SAXIHP3RVALID": { - "hide_name": 0, - "bits": [ 152 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5246" - } - }, - "SAXIHP3WACOUNT": { - "hide_name": 0, - "bits": [ 869, 870, 871, 872, 873, 874 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5352" - } - }, - "SAXIHP3WCOUNT": { - "hide_name": 0, - "bits": [ 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5369" - } - }, - "SAXIHP3WDATA": { - "hide_name": 0, - "bits": [ 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5708" - } - }, - "SAXIHP3WID": { - "hide_name": 0, - "bits": [ 2861, 2862, 2863, 2864, 2865, 2866 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5702" - } - }, - "SAXIHP3WLAST": { - "hide_name": 0, - "bits": [ 1677 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5535" - } - }, - "SAXIHP3WREADY": { - "hide_name": 0, - "bits": [ 153 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5247" - } - }, - "SAXIHP3WRISSUECAP1EN": { - "hide_name": 0, - "bits": [ 1678 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5536" - } - }, - "SAXIHP3WSTRB": { - "hide_name": 0, - "bits": [ 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5715" - } - }, - "SAXIHP3WVALID": { - "hide_name": 0, - "bits": [ 1679 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5537" - } - } - } - }, - "PULLDOWN": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4674" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - } - }, - "cells": { - }, - "netnames": { - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4675" - } - } - } - }, - "PULLUP": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4678" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - } - }, - "cells": { - }, - "netnames": { - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4679" - } - } - } - }, - "RAM128X1D": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:488" - }, - "ports": { - "DPO": { - "direction": "output", - "bits": [ 2 ] - }, - "SPO": { - "direction": "output", - "bits": [ 3 ] - }, - "D": { - "direction": "input", - "bits": [ 4 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 5 ] - }, - "WE": { - "direction": "input", - "bits": [ 6 ] - }, - "A": { - "direction": "input", - "bits": [ 7, 8, 9, 10, 11, 12, 13 ] - }, - "DPRA": { - "direction": "input", - "bits": [ 14, 15, 16, 17, 18, 19, 20 ] - } - }, - "cells": { - }, - "netnames": { - "A": { - "hide_name": 0, - "bits": [ 7, 8, 9, 10, 11, 12, 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:497" - } - }, - "D": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:492" - } - }, - "DPO": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 1153, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:491" - } - }, - "DPRA": { - "hide_name": 0, - "bits": [ 14, 15, 16, 17, 18, 19, 20 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:497" - } - }, - "SPO": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "abc9_arrival": 1153, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:491" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:495" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:496" - } - } - } - }, - "RAM128X1S": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4781" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "A4": { - "direction": "input", - "bits": [ 7 ] - }, - "A5": { - "direction": "input", - "bits": [ 8 ] - }, - "A6": { - "direction": "input", - "bits": [ 9 ] - }, - "D": { - "direction": "input", - "bits": [ 10 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 11 ] - }, - "WE": { - "direction": "input", - "bits": [ 12 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4785" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4786" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4787" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4788" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4789" - } - }, - "A5": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4790" - } - }, - "A6": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4791" - } - }, - "D": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4792" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4784" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4795" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4796" - } - } - } - }, - "RAM256X1S": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4799" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A": { - "direction": "input", - "bits": [ 3, 4, 5, 6, 7, 8, 9, 10 ] - }, - "D": { - "direction": "input", - "bits": [ 11 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 12 ] - }, - "WE": { - "direction": "input", - "bits": [ 13 ] - } - }, - "cells": { - }, - "netnames": { - "A": { - "hide_name": 0, - "bits": [ 3, 4, 5, 6, 7, 8, 9, 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4803" - } - }, - "D": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4804" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4802" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4807" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4808" - } - } - } - }, - "RAM32M": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4811" - }, - "ports": { - "DOA": { - "direction": "output", - "bits": [ 2, 3 ] - }, - "DOB": { - "direction": "output", - "bits": [ 4, 5 ] - }, - "DOC": { - "direction": "output", - "bits": [ 6, 7 ] - }, - "DOD": { - "direction": "output", - "bits": [ 8, 9 ] - }, - "ADDRA": { - "direction": "input", - "bits": [ 10, 11, 12, 13, 14 ] - }, - "ADDRB": { - "direction": "input", - "bits": [ 15, 16, 17, 18, 19 ] - }, - "ADDRC": { - "direction": "input", - "bits": [ 20, 21, 22, 23, 24 ] - }, - "ADDRD": { - "direction": "input", - "bits": [ 25, 26, 27, 28, 29 ] - }, - "DIA": { - "direction": "input", - "bits": [ 30, 31 ] - }, - "DIB": { - "direction": "input", - "bits": [ 32, 33 ] - }, - "DIC": { - "direction": "input", - "bits": [ 34, 35 ] - }, - "DID": { - "direction": "input", - "bits": [ 36, 37 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 38 ] - }, - "WE": { - "direction": "input", - "bits": [ 39 ] - } - }, - "cells": { - }, - "netnames": { - "ADDRA": { - "hide_name": 0, - "bits": [ 10, 11, 12, 13, 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4821" - } - }, - "ADDRB": { - "hide_name": 0, - "bits": [ 15, 16, 17, 18, 19 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4822" - } - }, - "ADDRC": { - "hide_name": 0, - "bits": [ 20, 21, 22, 23, 24 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4823" - } - }, - "ADDRD": { - "hide_name": 0, - "bits": [ 25, 26, 27, 28, 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4824" - } - }, - "DIA": { - "hide_name": 0, - "bits": [ 30, 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4825" - } - }, - "DIB": { - "hide_name": 0, - "bits": [ 32, 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4826" - } - }, - "DIC": { - "hide_name": 0, - "bits": [ 34, 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4827" - } - }, - "DID": { - "hide_name": 0, - "bits": [ 36, 37 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4828" - } - }, - "DOA": { - "hide_name": 0, - "bits": [ 2, 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4817" - } - }, - "DOB": { - "hide_name": 0, - "bits": [ 4, 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4818" - } - }, - "DOC": { - "hide_name": 0, - "bits": [ 6, 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4819" - } - }, - "DOD": { - "hide_name": 0, - "bits": [ 8, 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4820" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 38 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4831" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4832" - } - } - } - }, - "RAM32X1D": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:442" - }, - "ports": { - "DPO": { - "direction": "output", - "bits": [ 2 ] - }, - "SPO": { - "direction": "output", - "bits": [ 3 ] - }, - "D": { - "direction": "input", - "bits": [ 4 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 5 ] - }, - "WE": { - "direction": "input", - "bits": [ 6 ] - }, - "A0": { - "direction": "input", - "bits": [ 7 ] - }, - "A1": { - "direction": "input", - "bits": [ 8 ] - }, - "A2": { - "direction": "input", - "bits": [ 9 ] - }, - "A3": { - "direction": "input", - "bits": [ 10 ] - }, - "A4": { - "direction": "input", - "bits": [ 11 ] - }, - "DPRA0": { - "direction": "input", - "bits": [ 12 ] - }, - "DPRA1": { - "direction": "input", - "bits": [ 13 ] - }, - "DPRA2": { - "direction": "input", - "bits": [ 14 ] - }, - "DPRA3": { - "direction": "input", - "bits": [ 15 ] - }, - "DPRA4": { - "direction": "input", - "bits": [ 16 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:451" - } - }, - "D": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:446" - } - }, - "DPO": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 1153, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:445" - } - }, - "DPRA0": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" - } - }, - "DPRA1": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" - } - }, - "DPRA2": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" - } - }, - "DPRA3": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" - } - }, - "DPRA4": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:452" - } - }, - "SPO": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "abc9_arrival": 1153, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:445" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:449" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:450" - } - } - } - }, - "RAM32X1S": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4835" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "A4": { - "direction": "input", - "bits": [ 7 ] - }, - "D": { - "direction": "input", - "bits": [ 8 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 9 ] - }, - "WE": { - "direction": "input", - "bits": [ 10 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4839" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4840" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4841" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4842" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4843" - } - }, - "D": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4844" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4838" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4847" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4848" - } - } - } - }, - "RAM32X1S_1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4851" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "A4": { - "direction": "input", - "bits": [ 7 ] - }, - "D": { - "direction": "input", - "bits": [ 8 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 9 ] - }, - "WE": { - "direction": "input", - "bits": [ 10 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4855" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4856" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4857" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4858" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4859" - } - }, - "D": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4860" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4854" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4863" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4864" - } - } - } - }, - "RAM32X2S": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4867" - }, - "ports": { - "O0": { - "direction": "output", - "bits": [ 2 ] - }, - "O1": { - "direction": "output", - "bits": [ 3 ] - }, - "A0": { - "direction": "input", - "bits": [ 4 ] - }, - "A1": { - "direction": "input", - "bits": [ 5 ] - }, - "A2": { - "direction": "input", - "bits": [ 6 ] - }, - "A3": { - "direction": "input", - "bits": [ 7 ] - }, - "A4": { - "direction": "input", - "bits": [ 8 ] - }, - "D0": { - "direction": "input", - "bits": [ 9 ] - }, - "D1": { - "direction": "input", - "bits": [ 10 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 11 ] - }, - "WE": { - "direction": "input", - "bits": [ 12 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4873" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4874" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4875" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4876" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4877" - } - }, - "D0": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4878" - } - }, - "D1": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4879" - } - }, - "O0": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4871" - } - }, - "O1": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4872" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4882" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4883" - } - } - } - }, - "RAM64M": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4886" - }, - "ports": { - "DOA": { - "direction": "output", - "bits": [ 2 ] - }, - "DOB": { - "direction": "output", - "bits": [ 3 ] - }, - "DOC": { - "direction": "output", - "bits": [ 4 ] - }, - "DOD": { - "direction": "output", - "bits": [ 5 ] - }, - "ADDRA": { - "direction": "input", - "bits": [ 6, 7, 8, 9, 10, 11 ] - }, - "ADDRB": { - "direction": "input", - "bits": [ 12, 13, 14, 15, 16, 17 ] - }, - "ADDRC": { - "direction": "input", - "bits": [ 18, 19, 20, 21, 22, 23 ] - }, - "ADDRD": { - "direction": "input", - "bits": [ 24, 25, 26, 27, 28, 29 ] - }, - "DIA": { - "direction": "input", - "bits": [ 30 ] - }, - "DIB": { - "direction": "input", - "bits": [ 31 ] - }, - "DIC": { - "direction": "input", - "bits": [ 32 ] - }, - "DID": { - "direction": "input", - "bits": [ 33 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 34 ] - }, - "WE": { - "direction": "input", - "bits": [ 35 ] - } - }, - "cells": { - }, - "netnames": { - "ADDRA": { - "hide_name": 0, - "bits": [ 6, 7, 8, 9, 10, 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4896" - } - }, - "ADDRB": { - "hide_name": 0, - "bits": [ 12, 13, 14, 15, 16, 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4897" - } - }, - "ADDRC": { - "hide_name": 0, - "bits": [ 18, 19, 20, 21, 22, 23 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4898" - } - }, - "ADDRD": { - "hide_name": 0, - "bits": [ 24, 25, 26, 27, 28, 29 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4899" - } - }, - "DIA": { - "hide_name": 0, - "bits": [ 30 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4900" - } - }, - "DIB": { - "hide_name": 0, - "bits": [ 31 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4901" - } - }, - "DIC": { - "hide_name": 0, - "bits": [ 32 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4902" - } - }, - "DID": { - "hide_name": 0, - "bits": [ 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4903" - } - }, - "DOA": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4892" - } - }, - "DOB": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4893" - } - }, - "DOC": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4894" - } - }, - "DOD": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4895" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 34 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4906" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4907" - } - } - } - }, - "RAM64X1D": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:465" - }, - "ports": { - "DPO": { - "direction": "output", - "bits": [ 2 ] - }, - "SPO": { - "direction": "output", - "bits": [ 3 ] - }, - "D": { - "direction": "input", - "bits": [ 4 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 5 ] - }, - "WE": { - "direction": "input", - "bits": [ 6 ] - }, - "A0": { - "direction": "input", - "bits": [ 7 ] - }, - "A1": { - "direction": "input", - "bits": [ 8 ] - }, - "A2": { - "direction": "input", - "bits": [ 9 ] - }, - "A3": { - "direction": "input", - "bits": [ 10 ] - }, - "A4": { - "direction": "input", - "bits": [ 11 ] - }, - "A5": { - "direction": "input", - "bits": [ 12 ] - }, - "DPRA0": { - "direction": "input", - "bits": [ 13 ] - }, - "DPRA1": { - "direction": "input", - "bits": [ 14 ] - }, - "DPRA2": { - "direction": "input", - "bits": [ 15 ] - }, - "DPRA3": { - "direction": "input", - "bits": [ 16 ] - }, - "DPRA4": { - "direction": "input", - "bits": [ 17 ] - }, - "DPRA5": { - "direction": "input", - "bits": [ 18 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" - } - }, - "A5": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:474" - } - }, - "D": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:469" - } - }, - "DPO": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 1153, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:468" - } - }, - "DPRA0": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" - } - }, - "DPRA1": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" - } - }, - "DPRA2": { - "hide_name": 0, - "bits": [ 15 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" - } - }, - "DPRA3": { - "hide_name": 0, - "bits": [ 16 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" - } - }, - "DPRA4": { - "hide_name": 0, - "bits": [ 17 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" - } - }, - "DPRA5": { - "hide_name": 0, - "bits": [ 18 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:475" - } - }, - "SPO": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "abc9_arrival": 1153, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:468" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:472" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:473" - } - } - } - }, - "RAM64X1S": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4910" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "A4": { - "direction": "input", - "bits": [ 7 ] - }, - "A5": { - "direction": "input", - "bits": [ 8 ] - }, - "D": { - "direction": "input", - "bits": [ 9 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 10 ] - }, - "WE": { - "direction": "input", - "bits": [ 11 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4914" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4915" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4916" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4917" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4918" - } - }, - "A5": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4919" - } - }, - "D": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4920" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4913" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4923" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4924" - } - } - } - }, - "RAM64X1S_1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4927" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "A4": { - "direction": "input", - "bits": [ 7 ] - }, - "A5": { - "direction": "input", - "bits": [ 8 ] - }, - "D": { - "direction": "input", - "bits": [ 9 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 10 ] - }, - "WE": { - "direction": "input", - "bits": [ 11 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4931" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4932" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4933" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4934" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4935" - } - }, - "A5": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4936" - } - }, - "D": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4937" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4930" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4940" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4941" - } - } - } - }, - "RAM64X2S": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4944" - }, - "ports": { - "O0": { - "direction": "output", - "bits": [ 2 ] - }, - "O1": { - "direction": "output", - "bits": [ 3 ] - }, - "A0": { - "direction": "input", - "bits": [ 4 ] - }, - "A1": { - "direction": "input", - "bits": [ 5 ] - }, - "A2": { - "direction": "input", - "bits": [ 6 ] - }, - "A3": { - "direction": "input", - "bits": [ 7 ] - }, - "A4": { - "direction": "input", - "bits": [ 8 ] - }, - "A5": { - "direction": "input", - "bits": [ 9 ] - }, - "D0": { - "direction": "input", - "bits": [ 10 ] - }, - "D1": { - "direction": "input", - "bits": [ 11 ] - }, - "WCLK": { - "direction": "input", - "bits": [ 12 ] - }, - "WE": { - "direction": "input", - "bits": [ 13 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4950" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4951" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4952" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4953" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4954" - } - }, - "A5": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4955" - } - }, - "D0": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4956" - } - }, - "D1": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4957" - } - }, - "O0": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4948" - } - }, - "O1": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4949" - } - }, - "WCLK": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_WCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4960" - } - }, - "WE": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4961" - } - } - } - }, - "RAMB18E1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:3" - }, - "ports": { - "CLKARDCLK": { - "direction": "input", - "bits": [ 2 ] - }, - "CLKBWRCLK": { - "direction": "input", - "bits": [ 3 ] - }, - "ENARDEN": { - "direction": "input", - "bits": [ 4 ] - }, - "ENBWREN": { - "direction": "input", - "bits": [ 5 ] - }, - "REGCEAREGCE": { - "direction": "input", - "bits": [ 6 ] - }, - "REGCEB": { - "direction": "input", - "bits": [ 7 ] - }, - "RSTRAMARSTRAM": { - "direction": "input", - "bits": [ 8 ] - }, - "RSTRAMB": { - "direction": "input", - "bits": [ 9 ] - }, - "RSTREGARSTREG": { - "direction": "input", - "bits": [ 10 ] - }, - "RSTREGB": { - "direction": "input", - "bits": [ 11 ] - }, - "ADDRARDADDR": { - "direction": "input", - "bits": [ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ] - }, - "ADDRBWRADDR": { - "direction": "input", - "bits": [ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ] - }, - "DIADI": { - "direction": "input", - "bits": [ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55 ] - }, - "DIBDI": { - "direction": "input", - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 ] - }, - "DIPADIP": { - "direction": "input", - "bits": [ 72, 73 ] - }, - "DIPBDIP": { - "direction": "input", - "bits": [ 74, 75 ] - }, - "WEA": { - "direction": "input", - "bits": [ 76, 77 ] - }, - "WEBWE": { - "direction": "input", - "bits": [ 78, 79, 80, 81 ] - }, - "DOADO": { - "direction": "output", - "bits": [ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 ] - }, - "DOBDO": { - "direction": "output", - "bits": [ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113 ] - }, - "DOPADOP": { - "direction": "output", - "bits": [ 114, 115 ] - }, - "DOPBDOP": { - "direction": "output", - "bits": [ 116, 117 ] - } - }, - "cells": { - }, - "netnames": { - "ADDRARDADDR": { - "hide_name": 0, - "bits": [ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:25" - } - }, - "ADDRBWRADDR": { - "hide_name": 0, - "bits": [ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:26" - } - }, - "CLKARDCLK": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLKARDCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:6" - } - }, - "CLKBWRCLK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLKBWRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:9" - } - }, - "DIADI": { - "hide_name": 0, - "bits": [ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:27" - } - }, - "DIBDI": { - "hide_name": 0, - "bits": [ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:28" - } - }, - "DIPADIP": { - "hide_name": 0, - "bits": [ 72, 73 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:29" - } - }, - "DIPBDIP": { - "hide_name": 0, - "bits": [ 74, 75 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:30" - } - }, - "DOADO": { - "hide_name": 0, - "bits": [ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 ], - "attributes": { - "abc9_arrival": 2454, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:35" - } - }, - "DOBDO": { - "hide_name": 0, - "bits": [ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113 ], - "attributes": { - "abc9_arrival": 2454, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:37" - } - }, - "DOPADOP": { - "hide_name": 0, - "bits": [ 114, 115 ], - "attributes": { - "abc9_arrival": 2454, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:39" - } - }, - "DOPBDOP": { - "hide_name": 0, - "bits": [ 116, 117 ], - "attributes": { - "abc9_arrival": 2454, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:41" - } - }, - "ENARDEN": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "invertible_pin": "IS_ENARDEN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:11" - } - }, - "ENBWREN": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_ENBWREN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:13" - } - }, - "REGCEAREGCE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:14" - } - }, - "REGCEB": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:15" - } - }, - "RSTRAMARSTRAM": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "invertible_pin": "IS_RSTRAMARSTRAM_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:17" - } - }, - "RSTRAMB": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "invertible_pin": "IS_RSTRAMB_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:19" - } - }, - "RSTREGARSTREG": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "invertible_pin": "IS_RSTREGARSTREG_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:21" - } - }, - "RSTREGB": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "invertible_pin": "IS_RSTREGB_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:23" - } - }, - "WEA": { - "hide_name": 0, - "bits": [ 76, 77 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:31" - } - }, - "WEBWE": { - "hide_name": 0, - "bits": [ 78, 79, 80, 81 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:32" - } - } - } - }, - "RAMB36E1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:141" - }, - "ports": { - "CLKARDCLK": { - "direction": "input", - "bits": [ 2 ] - }, - "CLKBWRCLK": { - "direction": "input", - "bits": [ 3 ] - }, - "ENARDEN": { - "direction": "input", - "bits": [ 4 ] - }, - "ENBWREN": { - "direction": "input", - "bits": [ 5 ] - }, - "REGCEAREGCE": { - "direction": "input", - "bits": [ 6 ] - }, - "REGCEB": { - "direction": "input", - "bits": [ 7 ] - }, - "RSTRAMARSTRAM": { - "direction": "input", - "bits": [ 8 ] - }, - "RSTRAMB": { - "direction": "input", - "bits": [ 9 ] - }, - "RSTREGARSTREG": { - "direction": "input", - "bits": [ 10 ] - }, - "RSTREGB": { - "direction": "input", - "bits": [ 11 ] - }, - "ADDRARDADDR": { - "direction": "input", - "bits": [ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 ] - }, - "ADDRBWRADDR": { - "direction": "input", - "bits": [ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ] - }, - "DIADI": { - "direction": "input", - "bits": [ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75 ] - }, - "DIBDI": { - "direction": "input", - "bits": [ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107 ] - }, - "DIPADIP": { - "direction": "input", - "bits": [ 108, 109, 110, 111 ] - }, - "DIPBDIP": { - "direction": "input", - "bits": [ 112, 113, 114, 115 ] - }, - "WEA": { - "direction": "input", - "bits": [ 116, 117, 118, 119 ] - }, - "WEBWE": { - "direction": "input", - "bits": [ 120, 121, 122, 123, 124, 125, 126, 127 ] - }, - "DOADO": { - "direction": "output", - "bits": [ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159 ] - }, - "DOBDO": { - "direction": "output", - "bits": [ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191 ] - }, - "DOPADOP": { - "direction": "output", - "bits": [ 192, 193, 194, 195 ] - }, - "DOPBDOP": { - "direction": "output", - "bits": [ 196, 197, 198, 199 ] - } - }, - "cells": { - }, - "netnames": { - "ADDRARDADDR": { - "hide_name": 0, - "bits": [ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:163" - } - }, - "ADDRBWRADDR": { - "hide_name": 0, - "bits": [ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:164" - } - }, - "CLKARDCLK": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLKARDCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:144" - } - }, - "CLKBWRCLK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLKBWRCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:147" - } - }, - "DIADI": { - "hide_name": 0, - "bits": [ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:165" - } - }, - "DIBDI": { - "hide_name": 0, - "bits": [ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:166" - } - }, - "DIPADIP": { - "hide_name": 0, - "bits": [ 108, 109, 110, 111 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:167" - } - }, - "DIPBDIP": { - "hide_name": 0, - "bits": [ 112, 113, 114, 115 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:168" - } - }, - "DOADO": { - "hide_name": 0, - "bits": [ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159 ], - "attributes": { - "abc9_arrival": 2454, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:173" - } - }, - "DOBDO": { - "hide_name": 0, - "bits": [ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191 ], - "attributes": { - "abc9_arrival": 2454, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:175" - } - }, - "DOPADOP": { - "hide_name": 0, - "bits": [ 192, 193, 194, 195 ], - "attributes": { - "abc9_arrival": 2454, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:177" - } - }, - "DOPBDOP": { - "hide_name": 0, - "bits": [ 196, 197, 198, 199 ], - "attributes": { - "abc9_arrival": 2454, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:179" - } - }, - "ENARDEN": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "invertible_pin": "IS_ENARDEN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:149" - } - }, - "ENBWREN": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "invertible_pin": "IS_ENBWREN_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:151" - } - }, - "REGCEAREGCE": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:152" - } - }, - "REGCEB": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:153" - } - }, - "RSTRAMARSTRAM": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "invertible_pin": "IS_RSTRAMARSTRAM_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:155" - } - }, - "RSTRAMB": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "invertible_pin": "IS_RSTRAMB_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:157" - } - }, - "RSTREGARSTREG": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "invertible_pin": "IS_RSTREGARSTREG_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:159" - } - }, - "RSTREGB": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "invertible_pin": "IS_RSTREGB_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:161" - } - }, - "WEA": { - "hide_name": 0, - "bits": [ 116, 117, 118, 119 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:169" - } - }, - "WEBWE": { - "hide_name": 0, - "bits": [ 120, 121, 122, 123, 124, 125, 126, 127 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_brams_bb.v:170" - } - } - } - }, - "ROM128X1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4964" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "A4": { - "direction": "input", - "bits": [ 7 ] - }, - "A5": { - "direction": "input", - "bits": [ 8 ] - }, - "A6": { - "direction": "input", - "bits": [ 9 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4967" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4968" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4969" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4970" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4971" - } - }, - "A5": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4972" - } - }, - "A6": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4973" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4966" - } - } - } - }, - "ROM256X1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4976" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "A4": { - "direction": "input", - "bits": [ 7 ] - }, - "A5": { - "direction": "input", - "bits": [ 8 ] - }, - "A6": { - "direction": "input", - "bits": [ 9 ] - }, - "A7": { - "direction": "input", - "bits": [ 10 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4979" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4980" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4981" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4982" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4983" - } - }, - "A5": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4984" - } - }, - "A6": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4985" - } - }, - "A7": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4986" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4978" - } - } - } - }, - "ROM32X1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4989" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "A4": { - "direction": "input", - "bits": [ 7 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4992" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4993" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4994" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4995" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4996" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4991" - } - } - } - }, - "ROM64X1": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:4999" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "A4": { - "direction": "input", - "bits": [ 7 ] - }, - "A5": { - "direction": "input", - "bits": [ 8 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5002" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5003" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5004" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5005" - } - }, - "A4": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5006" - } - }, - "A5": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5007" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:5001" - } - } - } - }, - "SRL16E": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:508" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "A0": { - "direction": "input", - "bits": [ 3 ] - }, - "A1": { - "direction": "input", - "bits": [ 4 ] - }, - "A2": { - "direction": "input", - "bits": [ 5 ] - }, - "A3": { - "direction": "input", - "bits": [ 6 ] - }, - "CE": { - "direction": "input", - "bits": [ 7 ] - }, - "CLK": { - "direction": "input", - "bits": [ 8 ] - }, - "D": { - "direction": "input", - "bits": [ 9 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:512" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:515" - } - }, - "D": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:516" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 1472, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:511" - } - } - } - }, - "SRLC16E": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:532" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "Q15": { - "direction": "output", - "bits": [ 3 ] - }, - "A0": { - "direction": "input", - "bits": [ 4 ] - }, - "A1": { - "direction": "input", - "bits": [ 5 ] - }, - "A2": { - "direction": "input", - "bits": [ 6 ] - }, - "A3": { - "direction": "input", - "bits": [ 7 ] - }, - "CE": { - "direction": "input", - "bits": [ 8 ] - }, - "CLK": { - "direction": "input", - "bits": [ 9 ] - }, - "D": { - "direction": "input", - "bits": [ 10 ] - } - }, - "cells": { - }, - "netnames": { - "A0": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" - } - }, - "A1": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" - } - }, - "A2": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" - } - }, - "A3": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:535" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:538" - } - }, - "D": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:539" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:533" - } - }, - "Q15": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:534" - } - } - } - }, - "SRLC32E": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:556" - }, - "ports": { - "Q": { - "direction": "output", - "bits": [ 2 ] - }, - "Q31": { - "direction": "output", - "bits": [ 3 ] - }, - "A": { - "direction": "input", - "bits": [ 4, 5, 6, 7, 8 ] - }, - "CE": { - "direction": "input", - "bits": [ 9 ] - }, - "CLK": { - "direction": "input", - "bits": [ 10 ] - }, - "D": { - "direction": "input", - "bits": [ 11 ] - } - }, - "cells": { - }, - "netnames": { - "A": { - "hide_name": 0, - "bits": [ 4, 5, 6, 7, 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:562" - } - }, - "CE": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:563" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "clkbuf_sink": 1, - "invertible_pin": "IS_CLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:566" - } - }, - "D": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:567" - } - }, - "Q": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "abc9_arrival": 1472, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:559" - } - }, - "Q31": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "abc9_arrival": 1114, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:561" - } - } - } - }, - "STARTUPE2": { - "attributes": { - "blackbox": 1, - "keep": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3777" - }, - "ports": { - "CFGCLK": { - "direction": "output", - "bits": [ 2 ] - }, - "CFGMCLK": { - "direction": "output", - "bits": [ 3 ] - }, - "EOS": { - "direction": "output", - "bits": [ 4 ] - }, - "PREQ": { - "direction": "output", - "bits": [ 5 ] - }, - "CLK": { - "direction": "input", - "bits": [ 6 ] - }, - "GSR": { - "direction": "input", - "bits": [ 7 ] - }, - "GTS": { - "direction": "input", - "bits": [ 8 ] - }, - "KEYCLEARB": { - "direction": "input", - "bits": [ 9 ] - }, - "PACK": { - "direction": "input", - "bits": [ 10 ] - }, - "USRCCLKO": { - "direction": "input", - "bits": [ 11 ] - }, - "USRCCLKTS": { - "direction": "input", - "bits": [ 12 ] - }, - "USRDONEO": { - "direction": "input", - "bits": [ 13 ] - }, - "USRDONETS": { - "direction": "input", - "bits": [ 14 ] - } - }, - "cells": { - }, - "netnames": { - "CFGCLK": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3780" - } - }, - "CFGMCLK": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3781" - } - }, - "CLK": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3784" - } - }, - "EOS": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3782" - } - }, - "GSR": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3785" - } - }, - "GTS": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3786" - } - }, - "KEYCLEARB": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3787" - } - }, - "PACK": { - "hide_name": 0, - "bits": [ 10 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3788" - } - }, - "PREQ": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3783" - } - }, - "USRCCLKO": { - "hide_name": 0, - "bits": [ 11 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3789" - } - }, - "USRCCLKTS": { - "hide_name": 0, - "bits": [ 12 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3790" - } - }, - "USRDONEO": { - "hide_name": 0, - "bits": [ 13 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3791" - } - }, - "USRDONETS": { - "hide_name": 0, - "bits": [ 14 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3792" - } - } - } - }, - "USR_ACCESSE2": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3795" - }, - "ports": { - "CFGCLK": { - "direction": "output", - "bits": [ 2 ] - }, - "DATAVALID": { - "direction": "output", - "bits": [ 3 ] - }, - "DATA": { - "direction": "output", - "bits": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 ] - } - }, - "cells": { - }, - "netnames": { - "CFGCLK": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3796" - } - }, - "DATA": { - "hide_name": 0, - "bits": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3798" - } - }, - "DATAVALID": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3797" - } - } - } - }, - "VCC": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:24" - }, - "ports": { - "P": { - "direction": "output", - "bits": [ 2 ] - } - }, - "cells": { - }, - "netnames": { - "P": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:24" - } - } - } - }, - "XADC": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3314" - }, - "ports": { - "BUSY": { - "direction": "output", - "bits": [ 2 ] - }, - "DRDY": { - "direction": "output", - "bits": [ 3 ] - }, - "EOC": { - "direction": "output", - "bits": [ 4 ] - }, - "EOS": { - "direction": "output", - "bits": [ 5 ] - }, - "JTAGBUSY": { - "direction": "output", - "bits": [ 6 ] - }, - "JTAGLOCKED": { - "direction": "output", - "bits": [ 7 ] - }, - "JTAGMODIFIED": { - "direction": "output", - "bits": [ 8 ] - }, - "OT": { - "direction": "output", - "bits": [ 9 ] - }, - "DO": { - "direction": "output", - "bits": [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ] - }, - "ALM": { - "direction": "output", - "bits": [ 26, 27, 28, 29, 30, 31, 32, 33 ] - }, - "CHANNEL": { - "direction": "output", - "bits": [ 34, 35, 36, 37, 38 ] - }, - "MUXADDR": { - "direction": "output", - "bits": [ 39, 40, 41, 42, 43 ] - }, - "CONVST": { - "direction": "input", - "bits": [ 44 ] - }, - "CONVSTCLK": { - "direction": "input", - "bits": [ 45 ] - }, - "DCLK": { - "direction": "input", - "bits": [ 46 ] - }, - "DEN": { - "direction": "input", - "bits": [ 47 ] - }, - "DWE": { - "direction": "input", - "bits": [ 48 ] - }, - "RESET": { - "direction": "input", - "bits": [ 49 ] - }, - "VN": { - "direction": "input", - "bits": [ 50 ] - }, - "VP": { - "direction": "input", - "bits": [ 51 ] - }, - "DI": { - "direction": "input", - "bits": [ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 ] - }, - "VAUXN": { - "direction": "input", - "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 ] - }, - "VAUXP": { - "direction": "input", - "bits": [ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ] - }, - "DADDR": { - "direction": "input", - "bits": [ 100, 101, 102, 103, 104, 105, 106 ] - } - }, - "cells": { - }, - "netnames": { - "ALM": { - "hide_name": 0, - "bits": [ 26, 27, 28, 29, 30, 31, 32, 33 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3360" - } - }, - "BUSY": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3351" - } - }, - "CHANNEL": { - "hide_name": 0, - "bits": [ 34, 35, 36, 37, 38 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3361" - } - }, - "CONVST": { - "hide_name": 0, - "bits": [ 44 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3363" - } - }, - "CONVSTCLK": { - "hide_name": 0, - "bits": [ 45 ], - "attributes": { - "invertible_pin": "IS_CONVSTCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3365" - } - }, - "DADDR": { - "hide_name": 0, - "bits": [ 100, 101, 102, 103, 104, 105, 106 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3376" - } - }, - "DCLK": { - "hide_name": 0, - "bits": [ 46 ], - "attributes": { - "invertible_pin": "IS_DCLK_INVERTED", - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3367" - } - }, - "DEN": { - "hide_name": 0, - "bits": [ 47 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3368" - } - }, - "DI": { - "hide_name": 0, - "bits": [ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3373" - } - }, - "DO": { - "hide_name": 0, - "bits": [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3359" - } - }, - "DRDY": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3352" - } - }, - "DWE": { - "hide_name": 0, - "bits": [ 48 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3369" - } - }, - "EOC": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3353" - } - }, - "EOS": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3354" - } - }, - "JTAGBUSY": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3355" - } - }, - "JTAGLOCKED": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3356" - } - }, - "JTAGMODIFIED": { - "hide_name": 0, - "bits": [ 8 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3357" - } - }, - "MUXADDR": { - "hide_name": 0, - "bits": [ 39, 40, 41, 42, 43 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3362" - } - }, - "OT": { - "hide_name": 0, - "bits": [ 9 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3358" - } - }, - "RESET": { - "hide_name": 0, - "bits": [ 49 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3370" - } - }, - "VAUXN": { - "hide_name": 0, - "bits": [ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3374" - } - }, - "VAUXP": { - "hide_name": 0, - "bits": [ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3375" - } - }, - "VN": { - "hide_name": 0, - "bits": [ 50 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3371" - } - }, - "VP": { - "hide_name": 0, - "bits": [ 51 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/xc7_cells_xtra.v:3372" - } - } - } - }, - "XORCY": { - "attributes": { - "blackbox": 1, - "cells_not_processed": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:208" - }, - "ports": { - "O": { - "direction": "output", - "bits": [ 2 ] - }, - "CI": { - "direction": "input", - "bits": [ 3 ] - }, - "LI": { - "direction": "input", - "bits": [ 4 ] - } - }, - "cells": { - }, - "netnames": { - "CI": { - "hide_name": 0, - "bits": [ 3 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:208" - } - }, - "LI": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:208" - } - }, - "O": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "/usr/local/bin/../share/yosys/xilinx/cells_sim.v:208" - } - } - } - }, - "top": { - "attributes": { - "dynports": 1, - "top": 1, - "src": "counter.v:1" - }, - "ports": { - "clk": { - "direction": "input", - "bits": [ 2 ] - }, - "led": { - "direction": "output", - "bits": [ 3, 4, 5, 6 ] - }, - "out_a": { - "direction": "output", - "bits": [ 7 ] - }, - "out_b": { - "direction": "output", - "bits": [ 8, 9 ] - } - }, - "cells": { - "$abc$292$__5__$not$lut": { - "hide_name": 1, - "type": "LUT1", - "parameters": { - "INIT": "01" - }, - "attributes": { - "module_not_derived": 1, - "src": "/usr/local/bin/../share/yosys/xilinx/lut_map.v:59" - }, - "port_directions": { - "I0": "input", - "O": "output" - }, - "connections": { - "I0": [ 10 ], - "O": [ 11 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[0].carry": { - "hide_name": 1, - "type": "CARRY0", - "parameters": { - "CYINIT_FABRIC": 1 - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:257" - }, - "port_directions": { - "CI_INIT": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI_INIT": [ "0" ], - "CO_CHAIN": [ 12 ], - "CO_FABRIC": [ 13 ], - "DI": [ 10 ], - "O": [ 14 ], - "S": [ 11 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[10].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 15 ], - "CO_CHAIN": [ 16 ], - "CO_FABRIC": [ 17 ], - "DI": [ "0" ], - "O": [ 18 ], - "S": [ 19 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[11].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 16 ], - "CO_CHAIN": [ 20 ], - "CO_FABRIC": [ 21 ], - "DI": [ "0" ], - "O": [ 22 ], - "S": [ 23 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[12].carry": { - "hide_name": 1, - "type": "CARRY0", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 20 ], - "CO_CHAIN": [ 24 ], - "CO_FABRIC": [ 25 ], - "DI": [ "0" ], - "O": [ 26 ], - "S": [ 27 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[13].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 24 ], - "CO_CHAIN": [ 28 ], - "CO_FABRIC": [ 29 ], - "DI": [ "0" ], - "O": [ 30 ], - "S": [ 31 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[14].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 28 ], - "CO_CHAIN": [ 32 ], - "CO_FABRIC": [ 33 ], - "DI": [ "0" ], - "O": [ 34 ], - "S": [ 35 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[15].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 32 ], - "CO_CHAIN": [ 36 ], - "CO_FABRIC": [ 37 ], - "DI": [ "0" ], - "O": [ 38 ], - "S": [ 39 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[16].carry": { - "hide_name": 1, - "type": "CARRY0", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 36 ], - "CO_CHAIN": [ 40 ], - "CO_FABRIC": [ 41 ], - "DI": [ "0" ], - "O": [ 42 ], - "S": [ 43 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[17].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 40 ], - "CO_CHAIN": [ 44 ], - "CO_FABRIC": [ 45 ], - "DI": [ "0" ], - "O": [ 46 ], - "S": [ 47 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[18].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 44 ], - "CO_CHAIN": [ 48 ], - "CO_FABRIC": [ 49 ], - "DI": [ "0" ], - "O": [ 50 ], - "S": [ 51 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[19].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 48 ], - "CO_CHAIN": [ 52 ], - "CO_FABRIC": [ 53 ], - "DI": [ "0" ], - "O": [ 54 ], - "S": [ 55 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[1].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 12 ], - "CO_CHAIN": [ 56 ], - "CO_FABRIC": [ 57 ], - "DI": [ "0" ], - "O": [ 58 ], - "S": [ 59 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[20].carry": { - "hide_name": 1, - "type": "CARRY0", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 52 ], - "CO_CHAIN": [ 60 ], - "CO_FABRIC": [ 61 ], - "DI": [ "0" ], - "O": [ 62 ], - "S": [ 63 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[21].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 60 ], - "CO_CHAIN": [ 64 ], - "CO_FABRIC": [ 65 ], - "DI": [ "0" ], - "O": [ 66 ], - "S": [ 67 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[22].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 64 ], - "CO_CHAIN": [ 68 ], - "CO_FABRIC": [ 69 ], - "DI": [ "0" ], - "O": [ 70 ], - "S": [ 71 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[23].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 68 ], - "CO_CHAIN": [ 72 ], - "CO_FABRIC": [ 73 ], - "DI": [ "0" ], - "O": [ 74 ], - "S": [ 75 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[24].carry": { - "hide_name": 1, - "type": "CARRY0", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 72 ], - "CO_CHAIN": [ 76 ], - "CO_FABRIC": [ 77 ], - "DI": [ "0" ], - "O": [ 78 ], - "S": [ 79 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[25].top_of_carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:303" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 76 ], - "CO_CHAIN": [ 80 ], - "DI": [ "0" ], - "O": [ 81 ], - "S": [ 82 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[2].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 56 ], - "CO_CHAIN": [ 83 ], - "CO_FABRIC": [ 84 ], - "DI": [ "0" ], - "O": [ 85 ], - "S": [ 86 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[3].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 83 ], - "CO_CHAIN": [ 87 ], - "CO_FABRIC": [ 88 ], - "DI": [ "0" ], - "O": [ 89 ], - "S": [ 90 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[4].carry": { - "hide_name": 1, - "type": "CARRY0", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 87 ], - "CO_CHAIN": [ 91 ], - "CO_FABRIC": [ 92 ], - "DI": [ "0" ], - "O": [ 93 ], - "S": [ 94 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[5].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 91 ], - "CO_CHAIN": [ 95 ], - "CO_FABRIC": [ 96 ], - "DI": [ "0" ], - "O": [ 97 ], - "S": [ 98 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[6].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 95 ], - "CO_CHAIN": [ 99 ], - "CO_FABRIC": [ 100 ], - "DI": [ "0" ], - "O": [ 101 ], - "S": [ 102 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[7].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 99 ], - "CO_CHAIN": [ 103 ], - "CO_FABRIC": [ 104 ], - "DI": [ "0" ], - "O": [ 105 ], - "S": [ 106 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[8].carry": { - "hide_name": 1, - "type": "CARRY0", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:269" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 103 ], - "CO_CHAIN": [ 107 ], - "CO_FABRIC": [ 108 ], - "DI": [ "0" ], - "O": [ 109 ], - "S": [ 110 ] - } - }, - "$auto$alumacc.cc:485:replace_alu$19.slice[9].carry": { - "hide_name": 1, - "type": "CARRY", - "parameters": { - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:16|/usr/local/bin/../share/yosys/xilinx/arith_map.v:280" - }, - "port_directions": { - "CI": "input", - "CO_CHAIN": "output", - "CO_FABRIC": "output", - "DI": "input", - "O": "output", - "S": "input" - }, - "connections": { - "CI": [ 107 ], - "CO_CHAIN": [ 15 ], - "CO_FABRIC": [ 111 ], - "DI": [ "0" ], - "O": [ 112 ], - "S": [ 113 ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$100": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 62 ], - "Q": [ 63 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$101": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 66 ], - "Q": [ 67 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$102": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 70 ], - "Q": [ 71 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$103": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 74 ], - "Q": [ 75 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$104": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 78 ], - "Q": [ 79 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$105": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 81 ], - "Q": [ 82 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$80": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 14 ], - "Q": [ 10 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$81": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 58 ], - "Q": [ 59 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$82": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 85 ], - "Q": [ 86 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$83": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 89 ], - "Q": [ 90 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$84": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 93 ], - "Q": [ 94 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$85": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 97 ], - "Q": [ 98 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$86": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 101 ], - "Q": [ 102 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$87": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 105 ], - "Q": [ 106 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$88": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 109 ], - "Q": [ 110 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$89": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 112 ], - "Q": [ 113 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$90": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 18 ], - "Q": [ 19 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$91": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 22 ], - "Q": [ 23 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$92": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 26 ], - "Q": [ 27 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$93": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 30 ], - "Q": [ 31 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$94": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 34 ], - "Q": [ 35 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$95": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 38 ], - "Q": [ 39 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$96": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 42 ], - "Q": [ 43 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$97": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 46 ], - "Q": [ 47 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$98": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 50 ], - "Q": [ 51 ], - "R": [ "0" ] - } - }, - "$auto$simplemap.cc:420:simplemap_dff$99": { - "hide_name": 1, - "type": "FDRE", - "parameters": { - "INIT": "0" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:15|/usr/local/bin/../share/yosys/xilinx/xc7_ff_map.v:47" - }, - "port_directions": { - "C": "input", - "CE": "input", - "D": "input", - "Q": "output", - "R": "input" - }, - "connections": { - "C": [ 2 ], - "CE": [ "1" ], - "D": [ 54 ], - "Q": [ 55 ], - "R": [ "0" ] - } - }, - "OBUF_6": { - "hide_name": 0, - "type": "OBUF", - "parameters": { - "DRIVE": "I12", - "IOSTANDARD": "LVCMOS33", - "SLEW": "SLOW" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:21" - }, - "port_directions": { - "I": "input", - "O": "output" - }, - "connections": { - "I": [ 82 ], - "O": [ 3 ] - } - }, - "OBUF_7": { - "hide_name": 0, - "type": "OBUF", - "parameters": { - "IN_TERM": "UNTUNED_SPLIT_40", - "IOSTANDARD": "SSTL135", - "SLEW": "FAST" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:25" - }, - "port_directions": { - "I": "input", - "O": "output" - }, - "connections": { - "I": [ "0" ], - "O": [ 4 ] - } - }, - "OBUF_OUT": { - "hide_name": 0, - "type": "OBUF", - "parameters": { - "IN_TERM": "UNTUNED_SPLIT_40", - "IOSTANDARD": "SSTL135", - "SLEW": "FAST" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:29" - }, - "port_directions": { - "I": "input", - "O": "output" - }, - "connections": { - "I": [ "0" ], - "O": [ 7 ] - } - }, - "bottom_inst.OBUF_10": { - "hide_name": 0, - "type": "OBUF", - "parameters": { - "IOSTANDARD": "SSTL135", - "SLEW": "FAST" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:33|counter.v:58" - }, - "port_directions": { - "I": "input", - "O": "output" - }, - "connections": { - "I": [ "0" ], - "O": [ 8 ] - } - }, - "bottom_inst.OBUF_11": { - "hide_name": 0, - "type": "OBUF", - "parameters": { - "IOSTANDARD": "SSTL135", - "SLEW": "FAST" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:33|counter.v:62" - }, - "port_directions": { - "I": "input", - "O": "output" - }, - "connections": { - "I": [ "0" ], - "O": [ 9 ] - } - }, - "bottom_inst.OBUF_9": { - "hide_name": 0, - "type": "OBUF", - "parameters": { - "IOSTANDARD": "SSTL135", - "SLEW": "FAST" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:33|counter.v:54" - }, - "port_directions": { - "I": "input", - "O": "output" - }, - "connections": { - "I": [ "0" ], - "O": [ 5 ] - } - }, - "bottom_intermediate_inst.OBUF_8": { - "hide_name": 0, - "type": "OBUF", - "parameters": { - "IOSTANDARD": "SSTL135", - "SLEW": "FAST" - }, - "attributes": { - "module_not_derived": 1, - "src": "counter.v:34|counter.v:43" - }, - "port_directions": { - "I": "input", - "O": "output" - }, - "connections": { - "I": [ "0" ], - "O": [ 6 ] - } - } - }, - "netnames": { - "$0\\counter[25:0]": { - "hide_name": 1, - "bits": [ 14, 58, 85, 89, 93, 97, 101, 105, 109, 112, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 62, 66, 70, 74, 78, 81 ], - "attributes": { - "src": "counter.v:15" - } - }, - "$abc$292$auto$alumacc.cc:485:replace_alu$19.C": { - "hide_name": 1, - "bits": [ 114, 12, 56, 83, 87, 91, 95, 99, 103, 107, 15, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 60, 64, 68, 72, 76 ], - "attributes": { - "unused_bits": "0 " - } - }, - "$abc$292$auto$alumacc.cc:485:replace_alu$19.CO_CHAIN": { - "hide_name": 1, - "bits": [ 12, 56, 83, 87, 91, 95, 99, 103, 107, 15, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 60, 64, 68, 72, 76, 80 ], - "attributes": { - "unused_bits": "25" - } - }, - "$abc$292$auto$alumacc.cc:485:replace_alu$19.S": { - "hide_name": 1, - "bits": [ 11 ], - "attributes": { - } - }, - "$abc$292$auto$alumacc.cc:502:replace_alu$21": { - "hide_name": 1, - "bits": [ 13, 57, 84, 88, 92, 96, 100, 104, 108, 111, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 61, 65, 69, 73, 77 ], - "attributes": { - "unused_bits": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24" - } - }, - "LD6": { - "hide_name": 0, - "bits": [ 82 ], - "attributes": { - "src": "counter.v:8" - } - }, - "LD7": { - "hide_name": 0, - "bits": [ "0" ], - "attributes": { - "src": "counter.v:8" - } - }, - "LD8": { - "hide_name": 0, - "bits": [ "0" ], - "attributes": { - "src": "counter.v:8" - } - }, - "LD9": { - "hide_name": 0, - "bits": [ "0" ], - "attributes": { - "src": "counter.v:8" - } - }, - "bottom_inst.I": { - "hide_name": 0, - "bits": [ "0" ], - "attributes": { - "src": "counter.v:33|counter.v:50" - } - }, - "bottom_inst.O": { - "hide_name": 0, - "bits": [ 5 ], - "attributes": { - "src": "counter.v:33|counter.v:52" - } - }, - "bottom_inst.OB": { - "hide_name": 0, - "bits": [ 8, 9 ], - "attributes": { - "src": "counter.v:33|counter.v:51" - } - }, - "bottom_intermediate_inst.I": { - "hide_name": 0, - "bits": [ "0" ], - "attributes": { - "src": "counter.v:34|counter.v:38" - } - }, - "bottom_intermediate_inst.O": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "counter.v:34|counter.v:39" - } - }, - "bottom_intermediate_inst.bottom_intermediate_wire": { - "hide_name": 0, - "bits": [ 6 ], - "attributes": { - "src": "counter.v:34|counter.v:41" - } - }, - "clk": { - "hide_name": 0, - "bits": [ 2 ], - "attributes": { - "src": "counter.v:2" - } - }, - "counter": { - "hide_name": 0, - "bits": [ 10, 59, 86, 90, 94, 98, 102, 106, 110, 113, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 63, 67, 71, 75, 79, 82 ], - "attributes": { - "src": "counter.v:13" - } - }, - "inter_wire": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "counter.v:9" - } - }, - "inter_wire_2": { - "hide_name": 0, - "bits": [ 4 ], - "attributes": { - "src": "counter.v:9" - } - }, - "led": { - "hide_name": 0, - "bits": [ 3, 4, 5, 6 ], - "attributes": { - "src": "counter.v:3" - } - }, - "out_a": { - "hide_name": 0, - "bits": [ 7 ], - "attributes": { - "src": "counter.v:4" - } - }, - "out_b": { - "hide_name": 0, - "bits": [ 8, 9 ], - "attributes": { - "src": "counter.v:5" - } - } - } - } - } -} +{"OBUF_7": {"IN_TERM": "UNTUNED_SPLIT_40", "SLEW": "FAST", "IOSTANDARD": "SSTL135"}, "OBUF_6": {"IOSTANDARD": "LVCMOS33", "DRIVE": "I12", "SLEW": "SLOW"}, "bottom_inst.OBUF_9": {"IOSTANDARD": "SSTL135", "SLEW": "FAST"}, "OBUF_OUT": {"IN_TERM": "UNTUNED_SPLIT_40", "SLEW": "FAST", "IOSTANDARD": "SSTL135"}, "bottom_inst.OBUF_11": {"IOSTANDARD": "SSTL135", "SLEW": "FAST"}, "bottom_inst.OBUF_10": {"IOSTANDARD": "SSTL135", "SLEW": "FAST"}, "bottom_intermediate_inst.OBUF_8": {"IOSTANDARD": "SSTL135", "SLEW": "FAST"}} \ No newline at end of file From c44d2ebc8097e357ca3a42f480f9ce54ca7a8d88 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 20 Jan 2020 12:08:11 +0100 Subject: [PATCH 035/845] XDC: Use std::string instead of fixed length byte stack strings Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index c18c6ca3f..687e8215d 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -96,7 +96,9 @@ struct GetPorts : public Pass { } // TODO handle more than one port port_name = args.at(1); - char port[128]; + std::string port_str; + char* port = const_cast(port_str.c_str()); + port_str.reserve(port_name.size()); int bit(0); if (!sscanf(port_name.c_str(), "%[^[][%d]", port, &bit)) { log_error("Couldn't find port %s\n", port_name.c_str()); @@ -328,8 +330,10 @@ struct SetProperty : public Pass { // Extract signal name and port bit information from port name std::pair extract_signal(const std::string& port_name) { - char port[128]; int port_bit(0); + std::string port_str; + port_str.reserve(port_name.size()); + char* port = const_cast(port_str.c_str()); sscanf(port_name.c_str(), "%[^[][%d]", port, &port_bit); return std::make_pair(std::string(port), port_bit); } From cad4deb99f2c320ec41e0040f3a8d8e756b6d8bd Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 20 Jan 2020 12:22:37 +0100 Subject: [PATCH 036/845] XDC: Update part's JSON file Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/xc7a35tcsg324-1.json | 449 -------------------------- 1 file changed, 449 deletions(-) diff --git a/xdc-plugin/tests/xc7a35tcsg324-1.json b/xdc-plugin/tests/xc7a35tcsg324-1.json index 90798f5a5..602b949ab 100644 --- a/xdc-plugin/tests/xc7a35tcsg324-1.json +++ b/xdc-plugin/tests/xc7a35tcsg324-1.json @@ -1,453 +1,4 @@ { - "global_clock_regions": { - "bottom": { - "rows": { - "0": { - "configuration_buses": { - "BLOCK_RAM": { - "configuration_columns": { - "0": { - "frame_count": 128 - }, - "1": { - "frame_count": 128 - }, - "2": { - "frame_count": 128 - } - } - }, - "CLB_IO_CLK": { - "configuration_columns": { - "0": { - "frame_count": 42 - }, - "1": { - "frame_count": 30 - }, - "10": { - "frame_count": 36 - }, - "11": { - "frame_count": 36 - }, - "12": { - "frame_count": 36 - }, - "13": { - "frame_count": 36 - }, - "14": { - "frame_count": 36 - }, - "15": { - "frame_count": 36 - }, - "16": { - "frame_count": 36 - }, - "17": { - "frame_count": 36 - }, - "18": { - "frame_count": 30 - }, - "19": { - "frame_count": 36 - }, - "2": { - "frame_count": 36 - }, - "20": { - "frame_count": 36 - }, - "21": { - "frame_count": 36 - }, - "22": { - "frame_count": 36 - }, - "23": { - "frame_count": 30 - }, - "24": { - "frame_count": 36 - }, - "25": { - "frame_count": 36 - }, - "26": { - "frame_count": 36 - }, - "27": { - "frame_count": 36 - }, - "28": { - "frame_count": 36 - }, - "29": { - "frame_count": 36 - }, - "3": { - "frame_count": 36 - }, - "30": { - "frame_count": 28 - }, - "31": { - "frame_count": 36 - }, - "32": { - "frame_count": 36 - }, - "33": { - "frame_count": 36 - }, - "34": { - "frame_count": 28 - }, - "35": { - "frame_count": 36 - }, - "36": { - "frame_count": 36 - }, - "37": { - "frame_count": 28 - }, - "38": { - "frame_count": 36 - }, - "39": { - "frame_count": 36 - }, - "4": { - "frame_count": 36 - }, - "40": { - "frame_count": 36 - }, - "41": { - "frame_count": 36 - }, - "42": { - "frame_count": 30 - }, - "43": { - "frame_count": 42 - }, - "5": { - "frame_count": 36 - }, - "6": { - "frame_count": 28 - }, - "7": { - "frame_count": 36 - }, - "8": { - "frame_count": 36 - }, - "9": { - "frame_count": 28 - } - } - } - } - } - } - }, - "top": { - "rows": { - "0": { - "configuration_buses": { - "BLOCK_RAM": { - "configuration_columns": { - "0": { - "frame_count": 128 - }, - "1": { - "frame_count": 128 - }, - "2": { - "frame_count": 128 - } - } - }, - "CLB_IO_CLK": { - "configuration_columns": { - "0": { - "frame_count": 42 - }, - "1": { - "frame_count": 30 - }, - "10": { - "frame_count": 36 - }, - "11": { - "frame_count": 36 - }, - "12": { - "frame_count": 36 - }, - "13": { - "frame_count": 36 - }, - "14": { - "frame_count": 36 - }, - "15": { - "frame_count": 36 - }, - "16": { - "frame_count": 36 - }, - "17": { - "frame_count": 36 - }, - "18": { - "frame_count": 30 - }, - "19": { - "frame_count": 36 - }, - "2": { - "frame_count": 36 - }, - "20": { - "frame_count": 36 - }, - "21": { - "frame_count": 36 - }, - "22": { - "frame_count": 36 - }, - "23": { - "frame_count": 30 - }, - "24": { - "frame_count": 36 - }, - "25": { - "frame_count": 36 - }, - "26": { - "frame_count": 36 - }, - "27": { - "frame_count": 36 - }, - "28": { - "frame_count": 36 - }, - "29": { - "frame_count": 36 - }, - "3": { - "frame_count": 36 - }, - "30": { - "frame_count": 28 - }, - "31": { - "frame_count": 36 - }, - "32": { - "frame_count": 36 - }, - "33": { - "frame_count": 36 - }, - "34": { - "frame_count": 28 - }, - "35": { - "frame_count": 36 - }, - "36": { - "frame_count": 36 - }, - "37": { - "frame_count": 28 - }, - "38": { - "frame_count": 36 - }, - "39": { - "frame_count": 36 - }, - "4": { - "frame_count": 36 - }, - "40": { - "frame_count": 36 - }, - "41": { - "frame_count": 36 - }, - "42": { - "frame_count": 30 - }, - "43": { - "frame_count": 42 - }, - "5": { - "frame_count": 36 - }, - "6": { - "frame_count": 28 - }, - "7": { - "frame_count": 36 - }, - "8": { - "frame_count": 36 - }, - "9": { - "frame_count": 28 - } - } - } - } - }, - "1": { - "configuration_buses": { - "BLOCK_RAM": { - "configuration_columns": { - "0": { - "frame_count": 128 - }, - "1": { - "frame_count": 128 - } - } - }, - "CLB_IO_CLK": { - "configuration_columns": { - "0": { - "frame_count": 42 - }, - "1": { - "frame_count": 30 - }, - "10": { - "frame_count": 36 - }, - "11": { - "frame_count": 36 - }, - "12": { - "frame_count": 36 - }, - "13": { - "frame_count": 36 - }, - "14": { - "frame_count": 36 - }, - "15": { - "frame_count": 36 - }, - "16": { - "frame_count": 36 - }, - "17": { - "frame_count": 36 - }, - "18": { - "frame_count": 30 - }, - "19": { - "frame_count": 36 - }, - "2": { - "frame_count": 36 - }, - "20": { - "frame_count": 36 - }, - "21": { - "frame_count": 36 - }, - "22": { - "frame_count": 36 - }, - "23": { - "frame_count": 30 - }, - "24": { - "frame_count": 36 - }, - "25": { - "frame_count": 36 - }, - "26": { - "frame_count": 36 - }, - "27": { - "frame_count": 36 - }, - "28": { - "frame_count": 36 - }, - "29": { - "frame_count": 36 - }, - "3": { - "frame_count": 36 - }, - "30": { - "frame_count": 28 - }, - "31": { - "frame_count": 36 - }, - "32": { - "frame_count": 36 - }, - "33": { - "frame_count": 36 - }, - "34": { - "frame_count": 28 - }, - "35": { - "frame_count": 36 - }, - "36": { - "frame_count": 36 - }, - "37": { - "frame_count": 32 - }, - "4": { - "frame_count": 36 - }, - "5": { - "frame_count": 36 - }, - "6": { - "frame_count": 28 - }, - "7": { - "frame_count": 36 - }, - "8": { - "frame_count": 36 - }, - "9": { - "frame_count": 28 - } - } - } - } - } - } - } - }, - "idcode": 56807571, "iobanks": { "0": "X1Y78", "14": "X1Y26", From 76f6e0044e9beea86b4d2a9d5847e9182b8f0327 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 22 Jan 2020 09:37:51 +0100 Subject: [PATCH 037/845] XDC: Add indent to golden reference Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/compare_output_json.py | 2 +- xdc-plugin/tests/counter_golden.json | 34 ++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/xdc-plugin/tests/compare_output_json.py b/xdc-plugin/tests/compare_output_json.py index 42b72e1e4..fc1e1133d 100644 --- a/xdc-plugin/tests/compare_output_json.py +++ b/xdc-plugin/tests/compare_output_json.py @@ -30,7 +30,7 @@ def main(args): cells = read_cells(args.json) if args.update: with open(args.golden, 'w') as f: - json.dump(cells, f) + json.dump(cells, f, indent=2) else: with open(args.golden) as f: cells_golden = json.load(f) diff --git a/xdc-plugin/tests/counter_golden.json b/xdc-plugin/tests/counter_golden.json index 6de77a24b..daae40bc9 100644 --- a/xdc-plugin/tests/counter_golden.json +++ b/xdc-plugin/tests/counter_golden.json @@ -1 +1,33 @@ -{"OBUF_7": {"IN_TERM": "UNTUNED_SPLIT_40", "SLEW": "FAST", "IOSTANDARD": "SSTL135"}, "OBUF_6": {"IOSTANDARD": "LVCMOS33", "DRIVE": "I12", "SLEW": "SLOW"}, "bottom_inst.OBUF_9": {"IOSTANDARD": "SSTL135", "SLEW": "FAST"}, "OBUF_OUT": {"IN_TERM": "UNTUNED_SPLIT_40", "SLEW": "FAST", "IOSTANDARD": "SSTL135"}, "bottom_inst.OBUF_11": {"IOSTANDARD": "SSTL135", "SLEW": "FAST"}, "bottom_inst.OBUF_10": {"IOSTANDARD": "SSTL135", "SLEW": "FAST"}, "bottom_intermediate_inst.OBUF_8": {"IOSTANDARD": "SSTL135", "SLEW": "FAST"}} \ No newline at end of file +{ + "OBUF_6": { + "DRIVE": "I12", + "IOSTANDARD": "LVCMOS33", + "SLEW": "SLOW" + }, + "OBUF_7": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "OBUF_OUT": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_10": { + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_11": { + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_9": { + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "bottom_intermediate_inst.OBUF_8": { + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + } +} \ No newline at end of file From 1754a5899416d514a0a6ccdf792adb9799569378 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 22 Jan 2020 10:16:35 +0100 Subject: [PATCH 038/845] XDC: Initialize port name string to known length Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 687e8215d..074030020 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -96,9 +96,8 @@ struct GetPorts : public Pass { } // TODO handle more than one port port_name = args.at(1); - std::string port_str; + std::string port_str(port_name.size(), '\0'); char* port = const_cast(port_str.c_str()); - port_str.reserve(port_name.size()); int bit(0); if (!sscanf(port_name.c_str(), "%[^[][%d]", port, &bit)) { log_error("Couldn't find port %s\n", port_name.c_str()); @@ -331,8 +330,7 @@ struct SetProperty : public Pass { // Extract signal name and port bit information from port name std::pair extract_signal(const std::string& port_name) { int port_bit(0); - std::string port_str; - port_str.reserve(port_name.size()); + std::string port_str(port_name.size(), '\0'); char* port = const_cast(port_str.c_str()); sscanf(port_name.c_str(), "%[^[][%d]", port, &port_bit); return std::make_pair(std::string(port), port_bit); From 85ce37c769a51e8f856e56f2e1a8ca659c1ced94 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 22 Jan 2020 18:13:46 +0100 Subject: [PATCH 039/845] XDC: Replace const_cast with &port_str[0] Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 074030020..9a93d6d74 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -97,14 +97,12 @@ struct GetPorts : public Pass { // TODO handle more than one port port_name = args.at(1); std::string port_str(port_name.size(), '\0'); - char* port = const_cast(port_str.c_str()); int bit(0); - if (!sscanf(port_name.c_str(), "%[^[][%d]", port, &bit)) { + if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { log_error("Couldn't find port %s\n", port_name.c_str()); } - std::string port_signal(port); - RTLIL::IdString port_id(RTLIL::escape_id(port_signal)); + RTLIL::IdString port_id(RTLIL::escape_id(port_str)); if (auto wire = top_module->wire(port_id)) { if (isInputPort(wire) || isOutputPort(wire)) { if (bit >= wire->start_offset && bit < wire->start_offset + wire->width) { @@ -331,9 +329,8 @@ struct SetProperty : public Pass { std::pair extract_signal(const std::string& port_name) { int port_bit(0); std::string port_str(port_name.size(), '\0'); - char* port = const_cast(port_str.c_str()); - sscanf(port_name.c_str(), "%[^[][%d]", port, &port_bit); - return std::make_pair(std::string(port), port_bit); + sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &port_bit); + return std::make_pair(port_str, port_bit); } // Check if the specified port name is part of the provided connection signal From 78e391034bd8a911bbe4b28601e60c4a91054d24 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 22 Jan 2020 20:10:50 +0100 Subject: [PATCH 040/845] XDC: Resize resulting string to strlen size Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 9a93d6d74..530dc7694 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -102,6 +102,7 @@ struct GetPorts : public Pass { log_error("Couldn't find port %s\n", port_name.c_str()); } + port_str.resize(strlen(port_str.c_str())); RTLIL::IdString port_id(RTLIL::escape_id(port_str)); if (auto wire = top_module->wire(port_id)) { if (isInputPort(wire) || isOutputPort(wire)) { @@ -330,6 +331,7 @@ struct SetProperty : public Pass { int port_bit(0); std::string port_str(port_name.size(), '\0'); sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &port_bit); + port_str.resize(strlen(port_str.c_str())); return std::make_pair(port_str, port_bit); } From 886943ae97872cb2581d83f676bc7edbc6c41059 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 22 Jan 2020 20:13:47 +0100 Subject: [PATCH 041/845] XDC: Fix DRIVE value in XDC and golden files Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/counter.xdc | 2 +- xdc-plugin/tests/counter_golden.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xdc-plugin/tests/counter.xdc b/xdc-plugin/tests/counter.xdc index e530797a2..7a0b0ae43 100644 --- a/xdc-plugin/tests/counter.xdc +++ b/xdc-plugin/tests/counter.xdc @@ -1,5 +1,5 @@ #set_property LOC R2 [get_ports led] -set_property DRIVE I12 [get_ports {led[0]}] +set_property DRIVE 12 [get_ports {led[0]}] set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {led[1]}] set_property SLEW FAST [get_ports {led[1]}] set_property IOSTANDARD SSTL135 [get_ports {led[1]}] diff --git a/xdc-plugin/tests/counter_golden.json b/xdc-plugin/tests/counter_golden.json index daae40bc9..ca6da9421 100644 --- a/xdc-plugin/tests/counter_golden.json +++ b/xdc-plugin/tests/counter_golden.json @@ -1,6 +1,6 @@ { "OBUF_6": { - "DRIVE": "I12", + "DRIVE": "12", "IOSTANDARD": "LVCMOS33", "SLEW": "SLOW" }, From a6d57a70d9d7435dfdae029411cded8705a6a323 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 23 Jan 2020 08:40:38 +0100 Subject: [PATCH 042/845] XDC: Vary the SLEW/IN_TERM/IOSTANDARD in test XDC file Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/counter.xdc | 26 +++++++++++++++++--------- xdc-plugin/tests/counter_golden.json | 16 +++++++++------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/xdc-plugin/tests/counter.xdc b/xdc-plugin/tests/counter.xdc index 7a0b0ae43..410ddb377 100644 --- a/xdc-plugin/tests/counter.xdc +++ b/xdc-plugin/tests/counter.xdc @@ -1,19 +1,27 @@ #set_property LOC R2 [get_ports led] +#OBUF_6 set_property DRIVE 12 [get_ports {led[0]}] +#OBUF_7 set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {led[1]}] set_property SLEW FAST [get_ports {led[1]}] set_property IOSTANDARD SSTL135 [get_ports {led[1]}] -set_property SLEW FAST [get_ports {led[2]}] -set_property IOSTANDARD SSTL135 [get_ports {led[2]}] -set_property SLEW FAST [get_ports {led[3]}] -set_property IOSTANDARD SSTL135 [get_ports {led[3]}] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {out_a}] +#OBUF_OUT +set_property IN_TERM UNTUNED_SPLIT_50 [get_ports {out_a}] set_property SLEW FAST [get_ports {out_a}] -set_property IOSTANDARD SSTL135 [get_ports {out_a}] -set_property SLEW FAST [get_ports {out_b[0]}] -set_property IOSTANDARD SSTL135 [get_ports {out_b[0]}] +set_property IOSTANDARD LVCMOS33 [get_ports {out_a}] +#bottom_inst.OBUF_10 +set_property SLEW SLOW [get_ports {out_b[0]}] +set_property IOSTANDARD LVCMOS18 [get_ports {out_b[0]}] +#bottom_inst.OBUF_11 +set_property DRIVE 4 [get_ports {out_b[1]}] set_property SLEW FAST [get_ports {out_b[1]}] -set_property IOSTANDARD SSTL135 [get_ports {out_b[1]}] +set_property IOSTANDARD LVCMOS25 [get_ports {out_b[1]}] +#bottom_inst.OBUF_9 +set_property SLEW FAST [get_ports {led[2]}] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {led[2]}] +#bottom_intermediate_inst.OBUF_8 +set_property DRIVE 16 [get_ports {led[3]}] +set_property IOSTANDARD SSTL135 [get_ports {led[3]}] #set_property INTERNAL_VREF 0.600 [get_iobanks 14] #set_property INTERNAL_VREF 0.675 [get_iobanks 15] #set_property INTERNAL_VREF 0.750 [get_iobanks 16] diff --git a/xdc-plugin/tests/counter_golden.json b/xdc-plugin/tests/counter_golden.json index ca6da9421..25e123427 100644 --- a/xdc-plugin/tests/counter_golden.json +++ b/xdc-plugin/tests/counter_golden.json @@ -10,24 +10,26 @@ "SLEW": "FAST" }, "OBUF_OUT": { - "IN_TERM": "UNTUNED_SPLIT_40", - "IOSTANDARD": "SSTL135", + "IN_TERM": "UNTUNED_SPLIT_50", + "IOSTANDARD": "LVCMOS33", "SLEW": "FAST" }, "bottom_inst.OBUF_10": { - "IOSTANDARD": "SSTL135", - "SLEW": "FAST" + "IOSTANDARD": "LVCMOS18", + "SLEW": "SLOW" }, "bottom_inst.OBUF_11": { - "IOSTANDARD": "SSTL135", + "DRIVE": "4", + "IOSTANDARD": "LVCMOS25", "SLEW": "FAST" }, "bottom_inst.OBUF_9": { - "IOSTANDARD": "SSTL135", + "IOSTANDARD": "DIFF_SSTL135", "SLEW": "FAST" }, "bottom_intermediate_inst.OBUF_8": { + "DRIVE": "16", "IOSTANDARD": "SSTL135", - "SLEW": "FAST" + "SLEW": "SLOW" } } \ No newline at end of file From 96175984f8c9415abe5282e2ad31b8194742013f Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Fri, 21 Feb 2020 15:11:31 -0800 Subject: [PATCH 043/845] Fix OOB error in XDC plugin. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- xdc-plugin/xdc.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 530dc7694..8a87356bd 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -299,6 +299,7 @@ struct SetProperty : public Pass { void traverse_wire(std::string& port_name, RTLIL::Module* module) { auto port_signal = extract_signal(port_name); std::string signal_name(port_signal.first); + auto signal_name_idstr = RTLIL::IdString(RTLIL::escape_id(signal_name)); int port_bit = port_signal.second; for (auto connection : module->connections_) { auto dst_sig = connection.first; @@ -306,10 +307,10 @@ struct SetProperty : public Pass { if (dst_sig.is_chunk()) { auto chunk = dst_sig.as_chunk(); if (chunk.wire) { - if (chunk.wire->name != RTLIL::IdString(RTLIL::escape_id(signal_name))) { + if (chunk.wire->name != signal_name_idstr) { continue; } - if (port_bit < chunk.offset || port_bit > chunk.width) { + if (port_bit < chunk.offset || port_bit >= (chunk.offset + chunk.width)) { continue; } auto src_wires = src_sig.to_sigbit_vector(); From 48fdeb1c093c1009e40bca2670987016c423f608 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Mon, 24 Feb 2020 17:27:55 -0800 Subject: [PATCH 044/845] Move attribute check inside `is_signal_port`. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- xdc-plugin/xdc.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 8a87356bd..673c806df 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -271,21 +271,23 @@ struct SetProperty : public Pass { RTLIL::Cell* cell = cell_obj.second; // Check if the cell is of the type we are looking for - auto primitive_parameters_iter = supported_primitive_parameters.find(RTLIL::unescape_id(cell->type.str())); + auto cell_type_str = RTLIL::unescape_id(cell->type.str()); + auto primitive_parameters_iter = supported_primitive_parameters.find(cell_type_str); if (primitive_parameters_iter == supported_primitive_parameters.end()) { continue; } - // Check if the attribute is allowed for this module - auto primitive_parameters = primitive_parameters_iter->second; - if (std::find(primitive_parameters.begin(), primitive_parameters.end(), parameter) == primitive_parameters.end()) { - log_error("Cell %s of type %s doesn't support the %s attribute\n", cell->name.c_str(), cell->type.c_str(), parameter_id.c_str()); - } - // Set the parameter on the cell connected to the selected port for (auto connection : cell->connections_) { RTLIL::SigSpec cell_signal = connection.second; if (is_signal_port(cell_signal, port_name)) { + // Check if the attribute is allowed for this module + auto primitive_parameters = primitive_parameters_iter->second; + if (std::find(primitive_parameters.begin(), primitive_parameters.end(), parameter) == primitive_parameters.end()) { + log_error("Cell %s of type %s doesn't support the %s attribute\n", + cell->name.c_str(), cell->type.c_str(), + parameter_id.c_str()); + } cell->setParam(parameter_id, RTLIL::Const(value)); log("Setting parameter %s to value %s on cell %s \n", parameter_id.c_str(), value.c_str(), cell_obj.first.c_str()); } From 8343686ba4355c5c263430d4faad713e90a583e7 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Fri, 6 Mar 2020 11:46:22 +0100 Subject: [PATCH 045/845] Bumping master+wip yosys version Signed-off-by: Alessandro Comodi From 95bd01fa5f51ad00fe64eda8cdb66a8cd23e9def Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 12 May 2020 10:20:26 +0200 Subject: [PATCH 046/845] XDC: Fix port index parsing in get_ports command Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/counter.xdc | 12 ++++++------ xdc-plugin/xdc.cc | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/xdc-plugin/tests/counter.xdc b/xdc-plugin/tests/counter.xdc index 410ddb377..08833b0b6 100644 --- a/xdc-plugin/tests/counter.xdc +++ b/xdc-plugin/tests/counter.xdc @@ -1,13 +1,13 @@ #set_property LOC R2 [get_ports led] #OBUF_6 -set_property DRIVE 12 [get_ports {led[0]}] +set_property DRIVE 12 [get_ports led[0]] #OBUF_7 -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {led[1]}] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports led[1]] set_property SLEW FAST [get_ports {led[1]}] set_property IOSTANDARD SSTL135 [get_ports {led[1]}] #OBUF_OUT set_property IN_TERM UNTUNED_SPLIT_50 [get_ports {out_a}] -set_property SLEW FAST [get_ports {out_a}] +set_property SLEW FAST [get_ports out_a] set_property IOSTANDARD LVCMOS33 [get_ports {out_a}] #bottom_inst.OBUF_10 set_property SLEW SLOW [get_ports {out_b[0]}] @@ -15,13 +15,13 @@ set_property IOSTANDARD LVCMOS18 [get_ports {out_b[0]}] #bottom_inst.OBUF_11 set_property DRIVE 4 [get_ports {out_b[1]}] set_property SLEW FAST [get_ports {out_b[1]}] -set_property IOSTANDARD LVCMOS25 [get_ports {out_b[1]}] +set_property IOSTANDARD LVCMOS25 [get_ports out_b[1]] #bottom_inst.OBUF_9 set_property SLEW FAST [get_ports {led[2]}] set_property IOSTANDARD DIFF_SSTL135 [get_ports {led[2]}] #bottom_intermediate_inst.OBUF_8 -set_property DRIVE 16 [get_ports {led[3]}] -set_property IOSTANDARD SSTL135 [get_ports {led[3]}] +set_property DRIVE 16 [get_ports led[3]] +set_property IOSTANDARD SSTL135 [get_ports led[3]] #set_property INTERNAL_VREF 0.600 [get_iobanks 14] #set_property INTERNAL_VREF 0.675 [get_iobanks 15] #set_property INTERNAL_VREF 0.750 [get_iobanks 16] diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 673c806df..4d427f2e9 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -375,7 +375,6 @@ struct ReadXdc : public Frontend { if (args.size() < 2) { log_cmd_error("Missing script file.\n"); } - Tcl_Interp *interp = yosys_get_tcl_interp(); size_t argidx = 1; bank_tiles.clear(); if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { @@ -385,9 +384,25 @@ struct ReadXdc : public Frontend { extra_args(f, filename, args, argidx); std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; log("%s\n", content.c_str()); + + // According to page 6 of UG903 XDC is tcl, hence quuoting of bracketed numbers, + // such as bus indexes, is required. However, it's quite common for EDA tools + // to allow for correct processing of the bracketed numbers without quoting. + // Possible TCL implementations of such a feature include registering a TCL command + // for each integer which returns itself but surrounded with brackets or + // using the 'unknown' command which is invoked by the Tcl interpreter + // whenever a script tries to invoke a command that does not exist. + // In the XDC plugin the latter approach is used, however it's limited to + // the read_xdc command, hence the 'unknown' command works solely or the + // content of the XDC file. + Tcl_Interp* interp = yosys_get_tcl_interp(); + Tcl_Eval(interp, "rename unknown _original_unknown"); + Tcl_Eval(interp, "proc unknown args { return \\[[lindex $args 0]\\] }"); if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); } + Tcl_Eval(interp, "rename unknown \"\""); + Tcl_Eval(interp, "rename unknown _original_unknown"); } const BankTilesMap& get_bank_tiles() { return bank_tiles; From 796f53daa3656a8882e9634e48c2850adce3d27c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 18 May 2020 09:38:25 +0200 Subject: [PATCH 047/845] XDC: Add separate test for port index parsing Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/Makefile | 3 +- xdc-plugin/tests/counter.xdc | 12 ++-- xdc-plugin/tests/port_indexes.v | 67 +++++++++++++++++++++++ xdc-plugin/tests/port_indexes.xdc | 30 ++++++++++ xdc-plugin/tests/port_indexes_golden.json | 35 ++++++++++++ 5 files changed, 140 insertions(+), 7 deletions(-) create mode 100644 xdc-plugin/tests/port_indexes.v create mode 100644 xdc-plugin/tests/port_indexes.xdc create mode 100644 xdc-plugin/tests/port_indexes_golden.json diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index 328a5fa8f..e8f8d1b75 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -1,4 +1,5 @@ -TESTS = counter +TESTS = counter \ + port_indexes #Bus port indexes passed without curly braces all: $(TESTS) diff --git a/xdc-plugin/tests/counter.xdc b/xdc-plugin/tests/counter.xdc index 08833b0b6..410ddb377 100644 --- a/xdc-plugin/tests/counter.xdc +++ b/xdc-plugin/tests/counter.xdc @@ -1,13 +1,13 @@ #set_property LOC R2 [get_ports led] #OBUF_6 -set_property DRIVE 12 [get_ports led[0]] +set_property DRIVE 12 [get_ports {led[0]}] #OBUF_7 -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports led[1]] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {led[1]}] set_property SLEW FAST [get_ports {led[1]}] set_property IOSTANDARD SSTL135 [get_ports {led[1]}] #OBUF_OUT set_property IN_TERM UNTUNED_SPLIT_50 [get_ports {out_a}] -set_property SLEW FAST [get_ports out_a] +set_property SLEW FAST [get_ports {out_a}] set_property IOSTANDARD LVCMOS33 [get_ports {out_a}] #bottom_inst.OBUF_10 set_property SLEW SLOW [get_ports {out_b[0]}] @@ -15,13 +15,13 @@ set_property IOSTANDARD LVCMOS18 [get_ports {out_b[0]}] #bottom_inst.OBUF_11 set_property DRIVE 4 [get_ports {out_b[1]}] set_property SLEW FAST [get_ports {out_b[1]}] -set_property IOSTANDARD LVCMOS25 [get_ports out_b[1]] +set_property IOSTANDARD LVCMOS25 [get_ports {out_b[1]}] #bottom_inst.OBUF_9 set_property SLEW FAST [get_ports {led[2]}] set_property IOSTANDARD DIFF_SSTL135 [get_ports {led[2]}] #bottom_intermediate_inst.OBUF_8 -set_property DRIVE 16 [get_ports led[3]] -set_property IOSTANDARD SSTL135 [get_ports led[3]] +set_property DRIVE 16 [get_ports {led[3]}] +set_property IOSTANDARD SSTL135 [get_ports {led[3]}] #set_property INTERNAL_VREF 0.600 [get_iobanks 14] #set_property INTERNAL_VREF 0.675 [get_iobanks 15] #set_property INTERNAL_VREF 0.750 [get_iobanks 16] diff --git a/xdc-plugin/tests/port_indexes.v b/xdc-plugin/tests/port_indexes.v new file mode 100644 index 000000000..2ca86e229 --- /dev/null +++ b/xdc-plugin/tests/port_indexes.v @@ -0,0 +1,67 @@ +module top ( + input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + diff --git a/xdc-plugin/tests/port_indexes.xdc b/xdc-plugin/tests/port_indexes.xdc new file mode 100644 index 000000000..48202f52e --- /dev/null +++ b/xdc-plugin/tests/port_indexes.xdc @@ -0,0 +1,30 @@ +#set_property LOC R2 [get_ports led] +#OBUF_6 +set_property DRIVE 12 [get_ports led[0]] +#OBUF_7 +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports led[1]] +set_property SLEW FAST [get_ports led[1]] +set_property IOSTANDARD SSTL135 [get_ports led[1]] +#OBUF_OUT +set_property IN_TERM UNTUNED_SPLIT_50 [get_ports out_a] +set_property SLEW FAST [get_ports out_a] +set_property IOSTANDARD LVCMOS33 [get_ports out_a] +#bottom_inst.OBUF_10 +set_property SLEW SLOW [get_ports out_b[0]] +set_property IOSTANDARD LVCMOS18 [get_ports out_b[0]] +#bottom_inst.OBUF_11 +set_property DRIVE 4 [get_ports out_b[1]] +set_property SLEW FAST [get_ports out_b[1]] +set_property IOSTANDARD LVCMOS25 [get_ports out_b[1]] +#bottom_inst.OBUF_9 +set_property SLEW FAST [get_ports led[2]] +set_property IOSTANDARD DIFF_SSTL135 [get_ports led[2]] +#bottom_intermediate_inst.OBUF_8 +set_property DRIVE 16 [get_ports led[3]] +set_property IOSTANDARD SSTL135 [get_ports led[3]] +#set_property INTERNAL_VREF 0.600 [get_iobanks 14] +#set_property INTERNAL_VREF 0.675 [get_iobanks 15] +#set_property INTERNAL_VREF 0.750 [get_iobanks 16] +#set_property INTERNAL_VREF 0.900 [get_iobanks 34] +#set_property INTERNAL_VREF 0.900 [get_iobanks 35] + diff --git a/xdc-plugin/tests/port_indexes_golden.json b/xdc-plugin/tests/port_indexes_golden.json new file mode 100644 index 000000000..25e123427 --- /dev/null +++ b/xdc-plugin/tests/port_indexes_golden.json @@ -0,0 +1,35 @@ +{ + "OBUF_6": { + "DRIVE": "12", + "IOSTANDARD": "LVCMOS33", + "SLEW": "SLOW" + }, + "OBUF_7": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "OBUF_OUT": { + "IN_TERM": "UNTUNED_SPLIT_50", + "IOSTANDARD": "LVCMOS33", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_10": { + "IOSTANDARD": "LVCMOS18", + "SLEW": "SLOW" + }, + "bottom_inst.OBUF_11": { + "DRIVE": "4", + "IOSTANDARD": "LVCMOS25", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_9": { + "IOSTANDARD": "DIFF_SSTL135", + "SLEW": "FAST" + }, + "bottom_intermediate_inst.OBUF_8": { + "DRIVE": "16", + "IOSTANDARD": "SSTL135", + "SLEW": "SLOW" + } +} \ No newline at end of file From d0be3b061ef237f2a8bcb98d78b8203044e6c73d Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 18 May 2020 09:41:08 +0200 Subject: [PATCH 048/845] XDC: Fix clean target Signed-off-by: Tomasz Michalak --- xdc-plugin/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index e7525047f..a2ef6ebf9 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -26,4 +26,5 @@ install: install_modules install_plugin clean: rm -f *.d *.o xdc.so + $(MAKE) -C tests clean From 8290003c810bb54684e1b66fc48dcf963240fa9b Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 19 May 2020 19:04:59 +0200 Subject: [PATCH 049/845] XDC: Expand comment and fix small bug Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 4d427f2e9..cf821d475 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -385,16 +385,27 @@ struct ReadXdc : public Frontend { std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; log("%s\n", content.c_str()); - // According to page 6 of UG903 XDC is tcl, hence quuoting of bracketed numbers, - // such as bus indexes, is required. However, it's quite common for EDA tools - // to allow for correct processing of the bracketed numbers without quoting. + // According to page 6 of UG903 XDC is tcl, hence quoting of bracketed numbers, + // such as bus indexes, is required. For example "signal[5]" would be typically + // expanded to the concatenation of the string "signal" and result of the function call "5" + // with no arguments. Therefore in TCL the signal indices have to be wrapped in curly braces + // e.g "{signal[5]}" in order for the interpreter to not perform any variable substitution + // or function calls on the wrapped content. + // + // Nevertheless, it's quite common for EDA tools to allow for specifying signal indices + // (e.g. "signal[5]") without using non-expanding quotes. // Possible TCL implementations of such a feature include registering a TCL command - // for each integer which returns itself but surrounded with brackets or - // using the 'unknown' command which is invoked by the Tcl interpreter - // whenever a script tries to invoke a command that does not exist. - // In the XDC plugin the latter approach is used, however it's limited to - // the read_xdc command, hence the 'unknown' command works solely or the - // content of the XDC file. + // for each integer which returns itself but surrounded with brackets or using the 'unknown' + // command which is invoked by the Tcl interpreter whenever a script tries to invoke a command + // that does not exist. In the XDC plugin the latter approach is used, however it's limited to + // the 'read_xdc' command, hence the 'unknown' command works solely on the content of the XDC file. + // + // In this implementation the signal "signal[5]" is expanded in TCL to the concatenation of a string + // and function call, however this time the handling of the non-existent command '5' is passed by + // the interpreter to the 'unknown' command which returns a string that consists of the indice + // integer surrounded by square brackets, i.e. "[5]", effectively expanding the signal to "signal[5]" + // string. + // Tcl_Interp* interp = yosys_get_tcl_interp(); Tcl_Eval(interp, "rename unknown _original_unknown"); Tcl_Eval(interp, "proc unknown args { return \\[[lindex $args 0]\\] }"); @@ -402,7 +413,7 @@ struct ReadXdc : public Frontend { log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); } Tcl_Eval(interp, "rename unknown \"\""); - Tcl_Eval(interp, "rename unknown _original_unknown"); + Tcl_Eval(interp, "rename _original_unknown unknown"); } const BankTilesMap& get_bank_tiles() { return bank_tiles; From 95570816775a330758794f0d14491e9e74f24138 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 20 May 2020 09:17:20 +0200 Subject: [PATCH 050/845] XDC: Add test for proper 'unknown' proc behavior Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/Makefile | 2 +- xdc-plugin/tests/{synth.tcl => counter.tcl} | 0 xdc-plugin/tests/port_indexes.tcl | 25 +++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) rename xdc-plugin/tests/{synth.tcl => counter.tcl} (100%) create mode 100644 xdc-plugin/tests/port_indexes.tcl diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index e8f8d1b75..080f134b9 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -19,7 +19,7 @@ $(1).json: $(1).v PART_JSON=xc7a35tcsg324-1.json \ OUT_JSON=$(1).json \ INPUT_XDC_FILE=$(1).xdc \ - yosys -p "tcl synth.tcl" $$< -l yosys.log + yosys -p "tcl $(1).tcl" $$< -l yosys.log update_$(1): $(1).json @python compare_output_json.py --json $$< --golden $(1)_golden.json --update diff --git a/xdc-plugin/tests/synth.tcl b/xdc-plugin/tests/counter.tcl similarity index 100% rename from xdc-plugin/tests/synth.tcl rename to xdc-plugin/tests/counter.tcl diff --git a/xdc-plugin/tests/port_indexes.tcl b/xdc-plugin/tests/port_indexes.tcl new file mode 100644 index 000000000..17d3b9e38 --- /dev/null +++ b/xdc-plugin/tests/port_indexes.tcl @@ -0,0 +1,25 @@ +yosys -import +plugin -i xdc +#Import the commands from the plugins to the tcl interpreter +yosys -import + +# -flatten is used to ensure that the output eblif has only one module. +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + +if {[info procs unknown] != ""} { + rename unknown "" +} +proc unknown args {puts "'unknown' proc command handler"} +if {[catch {invalid command}]} { + error "Command should be handled by the 'unknown' proc" +} +#Read the design constraints +read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) + +if {[catch {invalid command}]} { + error "Command should be handled by the 'unknown' proc" +} + +# Write the design in JSON format. +write_json $::env(OUT_JSON) From 848dd7b007088690afc37bd161761fc19ed2341d Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 21 May 2020 10:04:01 +0200 Subject: [PATCH 051/845] XDC: Add verification step to tests Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/Makefile | 9 +++++++-- xdc-plugin/tests/port_indexes.tcl | 14 +++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index 080f134b9..89b2fb8ab 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -1,11 +1,16 @@ TESTS = counter \ - port_indexes #Bus port indexes passed without curly braces + port_indexes #Bus port indexes passed without curly braces + +counter_verify = $(call compare_json, counter) +port_indexes_verify = $(call compare_json, port_indexes) && test $$(grep "'unknown' proc command handler" port_indexes.txt | wc -l) -eq 2 all: $(TESTS) +compare_json = python compare_output_json.py --json $(1).json --golden $(1)_golden.json + define test_tpl = $(1): $(1).json - @python compare_output_json.py --json $$< --golden $(1)_golden.json; \ + $$($(1)_verify); RETVAL=$$$$? ; \ if [ $$$$RETVAL -eq 0 ]; then \ echo "$(1) PASS"; \ diff --git a/xdc-plugin/tests/port_indexes.tcl b/xdc-plugin/tests/port_indexes.tcl index 17d3b9e38..ac05de356 100644 --- a/xdc-plugin/tests/port_indexes.tcl +++ b/xdc-plugin/tests/port_indexes.tcl @@ -10,16 +10,24 @@ synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp if {[info procs unknown] != ""} { rename unknown "" } -proc unknown args {puts "'unknown' proc command handler"} -if {[catch {invalid command}]} { +proc unknown args {return "'unknown' proc command handler"} +set fp [open "port_indexes.txt" "w"] +if {[catch {invalid command} result]} { + close $fp error "Command should be handled by the 'unknown' proc" +} else { + puts $fp $result } #Read the design constraints read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) -if {[catch {invalid command}]} { +if {[catch {invalid command} result]} { + close $fp error "Command should be handled by the 'unknown' proc" +} else { + puts $fp $result } +close $fp # Write the design in JSON format. write_json $::env(OUT_JSON) From 5843182fa1ffd13ce11f792cf8201a3ea657c034 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 5 Jun 2020 11:55:02 +0200 Subject: [PATCH 052/845] Add .gitignore file Signed-off-by: Tomasz Michalak --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..1f63fcdd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.d +*.so +*.o +*.swp +*.log From 17062c1a847cce9c55545d912d53ea86f66e08eb Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 4 Jun 2020 19:17:19 +0200 Subject: [PATCH 053/845] XDC: Add LOC support to set_property Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index cf821d475..4daf24f71 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -44,22 +44,23 @@ static bool isOutputPort(RTLIL::Wire* wire) { return wire->port_output; } -enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD, SLEW, DRIVE, IN_TERM }; +enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD, SLEW, DRIVE, IN_TERM, LOC }; const std::unordered_map set_property_options_map = { {"INTERNAL_VREF", SetPropertyOptions::INTERNAL_VREF}, {"IOSTANDARD", SetPropertyOptions::IOSTANDARD}, {"SLEW", SetPropertyOptions::SLEW}, {"DRIVE", SetPropertyOptions::DRIVE}, - {"IN_TERM", SetPropertyOptions::IN_TERM} + {"IN_TERM", SetPropertyOptions::IN_TERM}, + {"LOC", SetPropertyOptions::LOC} }; const std::unordered_map> supported_primitive_parameters = { - {"OBUF", {"IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, - {"OBUFDS", {"IOSTANDARD", "SLEW", "IN_TERM"}}, - {"OBUFTDS", {"IOSTANDARD", "SLEW", "IN_TERM"}}, - {"IBUF", {"IOSTANDARD"}}, - {"IOBUF", {"IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}} + {"OBUF", {"LOC", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, + {"OBUFDS", {"LOC", "IOSTANDARD", "SLEW", "IN_TERM"}}, + {"OBUFTDS", {"LOC", "IOSTANDARD", "SLEW", "IN_TERM"}}, + {"IBUF", {"LOC", "IOSTANDARD"}}, + {"IOBUF", {"LOC", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}} }; void register_in_tcl_interpreter(const std::string& command) { @@ -189,6 +190,12 @@ struct SetProperty : public Pass { case SetPropertyOptions::IN_TERM: process_port_parameter(std::vector(args.begin() + 1, args.end()), design); break; + case SetPropertyOptions::LOC: { + std::vector new_args(args.begin() + 1, args.end()); + new_args.at(1) = new_args.at(2) + ":" + new_args.at(1); + process_port_parameter(new_args, design); + break; + } default: assert(false); } From 77b5f802c12a38eaba9636b5b190b011f7a78a39 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 5 Jun 2020 11:45:50 +0200 Subject: [PATCH 054/845] XDC: Append LOC parameter value Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 4daf24f71..92049e251 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -295,6 +295,10 @@ struct SetProperty : public Pass { cell->name.c_str(), cell->type.c_str(), parameter_id.c_str()); } + if (parameter_id == ID(LOC) and cell->hasParam(parameter_id)) { + std::string cur_value(cell->getParam(parameter_id).decode_string()); + value = cur_value + "," + value; + } cell->setParam(parameter_id, RTLIL::Const(value)); log("Setting parameter %s to value %s on cell %s \n", parameter_id.c_str(), value.c_str(), cell_obj.first.c_str()); } From ee20d97ff5d3febf21ccd60cf59c5a907c35c583 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 5 Jun 2020 11:53:25 +0200 Subject: [PATCH 055/845] XDC: Add minilitex ddr test Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/Makefile | 8 +- xdc-plugin/tests/VexRiscv_Lite.v | 4819 ++++++ xdc-plugin/tests/mem.init | 4795 ++++++ xdc-plugin/tests/mem_1.init | 0 xdc-plugin/tests/minilitex_ddr_arty.tcl | 15 + xdc-plugin/tests/minilitex_ddr_arty.v | 12464 ++++++++++++++++ xdc-plugin/tests/minilitex_ddr_arty.xdc | 230 + .../tests/minilitex_ddr_arty_golden.json | 247 + 8 files changed, 22577 insertions(+), 1 deletion(-) create mode 100644 xdc-plugin/tests/VexRiscv_Lite.v create mode 100644 xdc-plugin/tests/mem.init create mode 100644 xdc-plugin/tests/mem_1.init create mode 100644 xdc-plugin/tests/minilitex_ddr_arty.tcl create mode 100644 xdc-plugin/tests/minilitex_ddr_arty.v create mode 100644 xdc-plugin/tests/minilitex_ddr_arty.xdc create mode 100644 xdc-plugin/tests/minilitex_ddr_arty_golden.json diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index 89b2fb8ab..3381384a7 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -1,8 +1,14 @@ +# counter - basic test for IOSTANDARD, SLEW, DRIVE, IN_TERM properties +# port_indexes - like counter but bus port indices are passes without curly braces +# minilitex_ddr_arty - litex design with more types of IOBUFS including differential + TESTS = counter \ - port_indexes #Bus port indexes passed without curly braces + port_indexes \ + minilitex_ddr_arty counter_verify = $(call compare_json, counter) port_indexes_verify = $(call compare_json, port_indexes) && test $$(grep "'unknown' proc command handler" port_indexes.txt | wc -l) -eq 2 +minilitex_ddr_arty_verify = $(call compare_json, minilitex_ddr_arty) all: $(TESTS) diff --git a/xdc-plugin/tests/VexRiscv_Lite.v b/xdc-plugin/tests/VexRiscv_Lite.v new file mode 100644 index 000000000..2dc7b989c --- /dev/null +++ b/xdc-plugin/tests/VexRiscv_Lite.v @@ -0,0 +1,4819 @@ +// Generator : SpinalHDL v1.3.6 git head : 9bf01e7f360e003fac1dd5ca8b8f4bffec0e52b8 +// Date : 16/06/2019, 23:18:37 +// Component : VexRiscv + + +`define AluCtrlEnum_defaultEncoding_type [1:0] +`define AluCtrlEnum_defaultEncoding_ADD_SUB 2'b00 +`define AluCtrlEnum_defaultEncoding_SLT_SLTU 2'b01 +`define AluCtrlEnum_defaultEncoding_BITWISE 2'b10 + +`define AluBitwiseCtrlEnum_defaultEncoding_type [1:0] +`define AluBitwiseCtrlEnum_defaultEncoding_XOR_1 2'b00 +`define AluBitwiseCtrlEnum_defaultEncoding_OR_1 2'b01 +`define AluBitwiseCtrlEnum_defaultEncoding_AND_1 2'b10 + +`define Src2CtrlEnum_defaultEncoding_type [1:0] +`define Src2CtrlEnum_defaultEncoding_RS 2'b00 +`define Src2CtrlEnum_defaultEncoding_IMI 2'b01 +`define Src2CtrlEnum_defaultEncoding_IMS 2'b10 +`define Src2CtrlEnum_defaultEncoding_PC 2'b11 + +`define BranchCtrlEnum_defaultEncoding_type [1:0] +`define BranchCtrlEnum_defaultEncoding_INC 2'b00 +`define BranchCtrlEnum_defaultEncoding_B 2'b01 +`define BranchCtrlEnum_defaultEncoding_JAL 2'b10 +`define BranchCtrlEnum_defaultEncoding_JALR 2'b11 + +`define Src1CtrlEnum_defaultEncoding_type [1:0] +`define Src1CtrlEnum_defaultEncoding_RS 2'b00 +`define Src1CtrlEnum_defaultEncoding_IMU 2'b01 +`define Src1CtrlEnum_defaultEncoding_PC_INCREMENT 2'b10 +`define Src1CtrlEnum_defaultEncoding_URS1 2'b11 + +`define EnvCtrlEnum_defaultEncoding_type [0:0] +`define EnvCtrlEnum_defaultEncoding_NONE 1'b0 +`define EnvCtrlEnum_defaultEncoding_XRET 1'b1 + +`define ShiftCtrlEnum_defaultEncoding_type [1:0] +`define ShiftCtrlEnum_defaultEncoding_DISABLE_1 2'b00 +`define ShiftCtrlEnum_defaultEncoding_SLL_1 2'b01 +`define ShiftCtrlEnum_defaultEncoding_SRL_1 2'b10 +`define ShiftCtrlEnum_defaultEncoding_SRA_1 2'b11 + +module InstructionCache ( + input io_flush, + input io_cpu_prefetch_isValid, + output reg io_cpu_prefetch_haltIt, + input [31:0] io_cpu_prefetch_pc, + input io_cpu_fetch_isValid, + input io_cpu_fetch_isStuck, + input io_cpu_fetch_isRemoved, + input [31:0] io_cpu_fetch_pc, + output [31:0] io_cpu_fetch_data, + input io_cpu_fetch_dataBypassValid, + input [31:0] io_cpu_fetch_dataBypass, + output io_cpu_fetch_mmuBus_cmd_isValid, + output [31:0] io_cpu_fetch_mmuBus_cmd_virtualAddress, + output io_cpu_fetch_mmuBus_cmd_bypassTranslation, + input [31:0] io_cpu_fetch_mmuBus_rsp_physicalAddress, + input io_cpu_fetch_mmuBus_rsp_isIoAccess, + input io_cpu_fetch_mmuBus_rsp_allowRead, + input io_cpu_fetch_mmuBus_rsp_allowWrite, + input io_cpu_fetch_mmuBus_rsp_allowExecute, + input io_cpu_fetch_mmuBus_rsp_exception, + input io_cpu_fetch_mmuBus_rsp_refilling, + output io_cpu_fetch_mmuBus_end, + input io_cpu_fetch_mmuBus_busy, + output [31:0] io_cpu_fetch_physicalAddress, + output io_cpu_fetch_haltIt, + input io_cpu_decode_isValid, + input io_cpu_decode_isStuck, + input [31:0] io_cpu_decode_pc, + output [31:0] io_cpu_decode_physicalAddress, + output [31:0] io_cpu_decode_data, + output io_cpu_decode_cacheMiss, + output io_cpu_decode_error, + output io_cpu_decode_mmuRefilling, + output io_cpu_decode_mmuException, + input io_cpu_decode_isUser, + input io_cpu_fill_valid, + input [31:0] io_cpu_fill_payload, + output io_mem_cmd_valid, + input io_mem_cmd_ready, + output [31:0] io_mem_cmd_payload_address, + output [2:0] io_mem_cmd_payload_size, + input io_mem_rsp_valid, + input [31:0] io_mem_rsp_payload_data, + input io_mem_rsp_payload_error, + input clk, + input reset); + reg [22:0] _zz_10_; + reg [31:0] _zz_11_; + wire _zz_12_; + wire _zz_13_; + wire [0:0] _zz_14_; + wire [0:0] _zz_15_; + wire [22:0] _zz_16_; + reg _zz_1_; + reg _zz_2_; + reg lineLoader_fire; + reg lineLoader_valid; + reg [31:0] lineLoader_address; + reg lineLoader_hadError; + reg lineLoader_flushPending; + reg [6:0] lineLoader_flushCounter; + reg _zz_3_; + reg lineLoader_cmdSent; + reg lineLoader_wayToAllocate_willIncrement; + wire lineLoader_wayToAllocate_willClear; + wire lineLoader_wayToAllocate_willOverflowIfInc; + wire lineLoader_wayToAllocate_willOverflow; + reg [2:0] lineLoader_wordIndex; + wire lineLoader_write_tag_0_valid; + wire [5:0] lineLoader_write_tag_0_payload_address; + wire lineLoader_write_tag_0_payload_data_valid; + wire lineLoader_write_tag_0_payload_data_error; + wire [20:0] lineLoader_write_tag_0_payload_data_address; + wire lineLoader_write_data_0_valid; + wire [8:0] lineLoader_write_data_0_payload_address; + wire [31:0] lineLoader_write_data_0_payload_data; + wire _zz_4_; + wire [5:0] _zz_5_; + wire _zz_6_; + wire fetchStage_read_waysValues_0_tag_valid; + wire fetchStage_read_waysValues_0_tag_error; + wire [20:0] fetchStage_read_waysValues_0_tag_address; + wire [22:0] _zz_7_; + wire [8:0] _zz_8_; + wire _zz_9_; + wire [31:0] fetchStage_read_waysValues_0_data; + wire fetchStage_hit_hits_0; + wire fetchStage_hit_valid; + wire fetchStage_hit_error; + wire [31:0] fetchStage_hit_data; + wire [31:0] fetchStage_hit_word; + reg [31:0] io_cpu_fetch_data_regNextWhen; + reg [31:0] decodeStage_mmuRsp_physicalAddress; + reg decodeStage_mmuRsp_isIoAccess; + reg decodeStage_mmuRsp_allowRead; + reg decodeStage_mmuRsp_allowWrite; + reg decodeStage_mmuRsp_allowExecute; + reg decodeStage_mmuRsp_exception; + reg decodeStage_mmuRsp_refilling; + reg decodeStage_hit_valid; + reg decodeStage_hit_error; + (* ram_style = "block" *) reg [22:0] ways_0_tags [0:63]; + (* ram_style = "block" *) reg [31:0] ways_0_datas [0:511]; + assign _zz_12_ = (! lineLoader_flushCounter[6]); + assign _zz_13_ = (lineLoader_flushPending && (! (lineLoader_valid || io_cpu_fetch_isValid))); + assign _zz_14_ = _zz_7_[0 : 0]; + assign _zz_15_ = _zz_7_[1 : 1]; + assign _zz_16_ = {lineLoader_write_tag_0_payload_data_address,{lineLoader_write_tag_0_payload_data_error,lineLoader_write_tag_0_payload_data_valid}}; + always @ (posedge clk) begin + if(_zz_2_) begin + ways_0_tags[lineLoader_write_tag_0_payload_address] <= _zz_16_; + end + end + + always @ (posedge clk) begin + if(_zz_6_) begin + _zz_10_ <= ways_0_tags[_zz_5_]; + end + end + + always @ (posedge clk) begin + if(_zz_1_) begin + ways_0_datas[lineLoader_write_data_0_payload_address] <= lineLoader_write_data_0_payload_data; + end + end + + always @ (posedge clk) begin + if(_zz_9_) begin + _zz_11_ <= ways_0_datas[_zz_8_]; + end + end + + always @ (*) begin + _zz_1_ = 1'b0; + if(lineLoader_write_data_0_valid)begin + _zz_1_ = 1'b1; + end + end + + always @ (*) begin + _zz_2_ = 1'b0; + if(lineLoader_write_tag_0_valid)begin + _zz_2_ = 1'b1; + end + end + + assign io_cpu_fetch_haltIt = io_cpu_fetch_mmuBus_busy; + always @ (*) begin + lineLoader_fire = 1'b0; + if(io_mem_rsp_valid)begin + if((lineLoader_wordIndex == (3'b111)))begin + lineLoader_fire = 1'b1; + end + end + end + + always @ (*) begin + io_cpu_prefetch_haltIt = (lineLoader_valid || lineLoader_flushPending); + if(_zz_12_)begin + io_cpu_prefetch_haltIt = 1'b1; + end + if((! _zz_3_))begin + io_cpu_prefetch_haltIt = 1'b1; + end + if(io_flush)begin + io_cpu_prefetch_haltIt = 1'b1; + end + end + + assign io_mem_cmd_valid = (lineLoader_valid && (! lineLoader_cmdSent)); + assign io_mem_cmd_payload_address = {lineLoader_address[31 : 5],(5'b00000)}; + assign io_mem_cmd_payload_size = (3'b101); + always @ (*) begin + lineLoader_wayToAllocate_willIncrement = 1'b0; + if((! lineLoader_valid))begin + lineLoader_wayToAllocate_willIncrement = 1'b1; + end + end + + assign lineLoader_wayToAllocate_willClear = 1'b0; + assign lineLoader_wayToAllocate_willOverflowIfInc = 1'b1; + assign lineLoader_wayToAllocate_willOverflow = (lineLoader_wayToAllocate_willOverflowIfInc && lineLoader_wayToAllocate_willIncrement); + assign _zz_4_ = 1'b1; + assign lineLoader_write_tag_0_valid = ((_zz_4_ && lineLoader_fire) || (! lineLoader_flushCounter[6])); + assign lineLoader_write_tag_0_payload_address = (lineLoader_flushCounter[6] ? lineLoader_address[10 : 5] : lineLoader_flushCounter[5 : 0]); + assign lineLoader_write_tag_0_payload_data_valid = lineLoader_flushCounter[6]; + assign lineLoader_write_tag_0_payload_data_error = (lineLoader_hadError || io_mem_rsp_payload_error); + assign lineLoader_write_tag_0_payload_data_address = lineLoader_address[31 : 11]; + assign lineLoader_write_data_0_valid = (io_mem_rsp_valid && _zz_4_); + assign lineLoader_write_data_0_payload_address = {lineLoader_address[10 : 5],lineLoader_wordIndex}; + assign lineLoader_write_data_0_payload_data = io_mem_rsp_payload_data; + assign _zz_5_ = io_cpu_prefetch_pc[10 : 5]; + assign _zz_6_ = (! io_cpu_fetch_isStuck); + assign _zz_7_ = _zz_10_; + assign fetchStage_read_waysValues_0_tag_valid = _zz_14_[0]; + assign fetchStage_read_waysValues_0_tag_error = _zz_15_[0]; + assign fetchStage_read_waysValues_0_tag_address = _zz_7_[22 : 2]; + assign _zz_8_ = io_cpu_prefetch_pc[10 : 2]; + assign _zz_9_ = (! io_cpu_fetch_isStuck); + assign fetchStage_read_waysValues_0_data = _zz_11_; + assign fetchStage_hit_hits_0 = (fetchStage_read_waysValues_0_tag_valid && (fetchStage_read_waysValues_0_tag_address == io_cpu_fetch_mmuBus_rsp_physicalAddress[31 : 11])); + assign fetchStage_hit_valid = (fetchStage_hit_hits_0 != (1'b0)); + assign fetchStage_hit_error = fetchStage_read_waysValues_0_tag_error; + assign fetchStage_hit_data = fetchStage_read_waysValues_0_data; + assign fetchStage_hit_word = fetchStage_hit_data[31 : 0]; + assign io_cpu_fetch_data = (io_cpu_fetch_dataBypassValid ? io_cpu_fetch_dataBypass : fetchStage_hit_word); + assign io_cpu_decode_data = io_cpu_fetch_data_regNextWhen; + assign io_cpu_fetch_mmuBus_cmd_isValid = io_cpu_fetch_isValid; + assign io_cpu_fetch_mmuBus_cmd_virtualAddress = io_cpu_fetch_pc; + assign io_cpu_fetch_mmuBus_cmd_bypassTranslation = 1'b0; + assign io_cpu_fetch_mmuBus_end = ((! io_cpu_fetch_isStuck) || io_cpu_fetch_isRemoved); + assign io_cpu_fetch_physicalAddress = io_cpu_fetch_mmuBus_rsp_physicalAddress; + assign io_cpu_decode_cacheMiss = (! decodeStage_hit_valid); + assign io_cpu_decode_error = decodeStage_hit_error; + assign io_cpu_decode_mmuRefilling = decodeStage_mmuRsp_refilling; + assign io_cpu_decode_mmuException = ((! decodeStage_mmuRsp_refilling) && (decodeStage_mmuRsp_exception || (! decodeStage_mmuRsp_allowExecute))); + assign io_cpu_decode_physicalAddress = decodeStage_mmuRsp_physicalAddress; + always @ (posedge clk) begin + if(reset) begin + lineLoader_valid <= 1'b0; + lineLoader_hadError <= 1'b0; + lineLoader_flushPending <= 1'b1; + lineLoader_cmdSent <= 1'b0; + lineLoader_wordIndex <= (3'b000); + end else begin + if(lineLoader_fire)begin + lineLoader_valid <= 1'b0; + end + if(lineLoader_fire)begin + lineLoader_hadError <= 1'b0; + end + if(io_cpu_fill_valid)begin + lineLoader_valid <= 1'b1; + end + if(io_flush)begin + lineLoader_flushPending <= 1'b1; + end + if(_zz_13_)begin + lineLoader_flushPending <= 1'b0; + end + if((io_mem_cmd_valid && io_mem_cmd_ready))begin + lineLoader_cmdSent <= 1'b1; + end + if(lineLoader_fire)begin + lineLoader_cmdSent <= 1'b0; + end + if(io_mem_rsp_valid)begin + lineLoader_wordIndex <= (lineLoader_wordIndex + (3'b001)); + if(io_mem_rsp_payload_error)begin + lineLoader_hadError <= 1'b1; + end + end + end + end + + always @ (posedge clk) begin + if(io_cpu_fill_valid)begin + lineLoader_address <= io_cpu_fill_payload; + end + if(_zz_12_)begin + lineLoader_flushCounter <= (lineLoader_flushCounter + (7'b0000001)); + end + _zz_3_ <= lineLoader_flushCounter[6]; + if(_zz_13_)begin + lineLoader_flushCounter <= (7'b0000000); + end + if((! io_cpu_decode_isStuck))begin + io_cpu_fetch_data_regNextWhen <= io_cpu_fetch_data; + end + if((! io_cpu_decode_isStuck))begin + decodeStage_mmuRsp_physicalAddress <= io_cpu_fetch_mmuBus_rsp_physicalAddress; + decodeStage_mmuRsp_isIoAccess <= io_cpu_fetch_mmuBus_rsp_isIoAccess; + decodeStage_mmuRsp_allowRead <= io_cpu_fetch_mmuBus_rsp_allowRead; + decodeStage_mmuRsp_allowWrite <= io_cpu_fetch_mmuBus_rsp_allowWrite; + decodeStage_mmuRsp_allowExecute <= io_cpu_fetch_mmuBus_rsp_allowExecute; + decodeStage_mmuRsp_exception <= io_cpu_fetch_mmuBus_rsp_exception; + decodeStage_mmuRsp_refilling <= io_cpu_fetch_mmuBus_rsp_refilling; + end + if((! io_cpu_decode_isStuck))begin + decodeStage_hit_valid <= fetchStage_hit_valid; + end + if((! io_cpu_decode_isStuck))begin + decodeStage_hit_error <= fetchStage_hit_error; + end + end + +endmodule + +module VexRiscv ( + input [31:0] externalResetVector, + input timerInterrupt, + input softwareInterrupt, + input [31:0] externalInterruptArray, + output reg iBusWishbone_CYC, + output reg iBusWishbone_STB, + input iBusWishbone_ACK, + output iBusWishbone_WE, + output [29:0] iBusWishbone_ADR, + input [31:0] iBusWishbone_DAT_MISO, + output [31:0] iBusWishbone_DAT_MOSI, + output [3:0] iBusWishbone_SEL, + input iBusWishbone_ERR, + output [1:0] iBusWishbone_BTE, + output [2:0] iBusWishbone_CTI, + output dBusWishbone_CYC, + output dBusWishbone_STB, + input dBusWishbone_ACK, + output dBusWishbone_WE, + output [29:0] dBusWishbone_ADR, + input [31:0] dBusWishbone_DAT_MISO, + output [31:0] dBusWishbone_DAT_MOSI, + output reg [3:0] dBusWishbone_SEL, + input dBusWishbone_ERR, + output [1:0] dBusWishbone_BTE, + output [2:0] dBusWishbone_CTI, + input clk, + input reset); + wire _zz_205_; + wire _zz_206_; + wire _zz_207_; + wire _zz_208_; + wire [31:0] _zz_209_; + wire _zz_210_; + wire _zz_211_; + wire _zz_212_; + reg _zz_213_; + reg [31:0] _zz_214_; + reg [31:0] _zz_215_; + reg [31:0] _zz_216_; + wire IBusCachedPlugin_cache_io_cpu_prefetch_haltIt; + wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_data; + wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress; + wire IBusCachedPlugin_cache_io_cpu_fetch_haltIt; + wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; + wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; + wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; + wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; + wire IBusCachedPlugin_cache_io_cpu_decode_error; + wire IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling; + wire IBusCachedPlugin_cache_io_cpu_decode_mmuException; + wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_data; + wire IBusCachedPlugin_cache_io_cpu_decode_cacheMiss; + wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_physicalAddress; + wire IBusCachedPlugin_cache_io_mem_cmd_valid; + wire [31:0] IBusCachedPlugin_cache_io_mem_cmd_payload_address; + wire [2:0] IBusCachedPlugin_cache_io_mem_cmd_payload_size; + wire _zz_217_; + wire _zz_218_; + wire _zz_219_; + wire _zz_220_; + wire _zz_221_; + wire _zz_222_; + wire _zz_223_; + wire _zz_224_; + wire _zz_225_; + wire _zz_226_; + wire _zz_227_; + wire _zz_228_; + wire _zz_229_; + wire _zz_230_; + wire _zz_231_; + wire _zz_232_; + wire _zz_233_; + wire _zz_234_; + wire _zz_235_; + wire [1:0] _zz_236_; + wire _zz_237_; + wire _zz_238_; + wire _zz_239_; + wire _zz_240_; + wire _zz_241_; + wire _zz_242_; + wire _zz_243_; + wire _zz_244_; + wire _zz_245_; + wire _zz_246_; + wire _zz_247_; + wire _zz_248_; + wire _zz_249_; + wire _zz_250_; + wire _zz_251_; + wire _zz_252_; + wire [1:0] _zz_253_; + wire _zz_254_; + wire [4:0] _zz_255_; + wire [2:0] _zz_256_; + wire [31:0] _zz_257_; + wire [11:0] _zz_258_; + wire [31:0] _zz_259_; + wire [19:0] _zz_260_; + wire [11:0] _zz_261_; + wire [31:0] _zz_262_; + wire [31:0] _zz_263_; + wire [19:0] _zz_264_; + wire [11:0] _zz_265_; + wire [2:0] _zz_266_; + wire [0:0] _zz_267_; + wire [0:0] _zz_268_; + wire [0:0] _zz_269_; + wire [0:0] _zz_270_; + wire [0:0] _zz_271_; + wire [0:0] _zz_272_; + wire [0:0] _zz_273_; + wire [0:0] _zz_274_; + wire [0:0] _zz_275_; + wire [0:0] _zz_276_; + wire [0:0] _zz_277_; + wire [0:0] _zz_278_; + wire [0:0] _zz_279_; + wire [0:0] _zz_280_; + wire [0:0] _zz_281_; + wire [0:0] _zz_282_; + wire [0:0] _zz_283_; + wire [2:0] _zz_284_; + wire [4:0] _zz_285_; + wire [11:0] _zz_286_; + wire [11:0] _zz_287_; + wire [31:0] _zz_288_; + wire [31:0] _zz_289_; + wire [31:0] _zz_290_; + wire [31:0] _zz_291_; + wire [31:0] _zz_292_; + wire [31:0] _zz_293_; + wire [31:0] _zz_294_; + wire [31:0] _zz_295_; + wire [32:0] _zz_296_; + wire [11:0] _zz_297_; + wire [19:0] _zz_298_; + wire [11:0] _zz_299_; + wire [31:0] _zz_300_; + wire [31:0] _zz_301_; + wire [31:0] _zz_302_; + wire [11:0] _zz_303_; + wire [19:0] _zz_304_; + wire [11:0] _zz_305_; + wire [2:0] _zz_306_; + wire [1:0] _zz_307_; + wire [1:0] _zz_308_; + wire [1:0] _zz_309_; + wire [1:0] _zz_310_; + wire [0:0] _zz_311_; + wire [5:0] _zz_312_; + wire [33:0] _zz_313_; + wire [32:0] _zz_314_; + wire [33:0] _zz_315_; + wire [32:0] _zz_316_; + wire [33:0] _zz_317_; + wire [32:0] _zz_318_; + wire [0:0] _zz_319_; + wire [5:0] _zz_320_; + wire [32:0] _zz_321_; + wire [32:0] _zz_322_; + wire [31:0] _zz_323_; + wire [31:0] _zz_324_; + wire [32:0] _zz_325_; + wire [32:0] _zz_326_; + wire [32:0] _zz_327_; + wire [0:0] _zz_328_; + wire [32:0] _zz_329_; + wire [0:0] _zz_330_; + wire [32:0] _zz_331_; + wire [0:0] _zz_332_; + wire [31:0] _zz_333_; + wire [0:0] _zz_334_; + wire [0:0] _zz_335_; + wire [0:0] _zz_336_; + wire [0:0] _zz_337_; + wire [0:0] _zz_338_; + wire [0:0] _zz_339_; + wire [26:0] _zz_340_; + wire [6:0] _zz_341_; + wire _zz_342_; + wire _zz_343_; + wire [2:0] _zz_344_; + wire _zz_345_; + wire _zz_346_; + wire _zz_347_; + wire _zz_348_; + wire [0:0] _zz_349_; + wire [0:0] _zz_350_; + wire [0:0] _zz_351_; + wire [0:0] _zz_352_; + wire _zz_353_; + wire [0:0] _zz_354_; + wire [23:0] _zz_355_; + wire [31:0] _zz_356_; + wire [31:0] _zz_357_; + wire _zz_358_; + wire [0:0] _zz_359_; + wire [0:0] _zz_360_; + wire [0:0] _zz_361_; + wire [0:0] _zz_362_; + wire [1:0] _zz_363_; + wire [1:0] _zz_364_; + wire _zz_365_; + wire [0:0] _zz_366_; + wire [20:0] _zz_367_; + wire [31:0] _zz_368_; + wire [31:0] _zz_369_; + wire [31:0] _zz_370_; + wire [31:0] _zz_371_; + wire _zz_372_; + wire [0:0] _zz_373_; + wire [1:0] _zz_374_; + wire [0:0] _zz_375_; + wire [0:0] _zz_376_; + wire _zz_377_; + wire [0:0] _zz_378_; + wire [17:0] _zz_379_; + wire [31:0] _zz_380_; + wire [31:0] _zz_381_; + wire [31:0] _zz_382_; + wire [31:0] _zz_383_; + wire [31:0] _zz_384_; + wire [31:0] _zz_385_; + wire [31:0] _zz_386_; + wire [31:0] _zz_387_; + wire [0:0] _zz_388_; + wire [0:0] _zz_389_; + wire [5:0] _zz_390_; + wire [5:0] _zz_391_; + wire _zz_392_; + wire [0:0] _zz_393_; + wire [14:0] _zz_394_; + wire [31:0] _zz_395_; + wire [31:0] _zz_396_; + wire _zz_397_; + wire [0:0] _zz_398_; + wire [2:0] _zz_399_; + wire _zz_400_; + wire _zz_401_; + wire [0:0] _zz_402_; + wire [2:0] _zz_403_; + wire [0:0] _zz_404_; + wire [0:0] _zz_405_; + wire _zz_406_; + wire [0:0] _zz_407_; + wire [11:0] _zz_408_; + wire [31:0] _zz_409_; + wire [31:0] _zz_410_; + wire [31:0] _zz_411_; + wire _zz_412_; + wire [0:0] _zz_413_; + wire [0:0] _zz_414_; + wire [31:0] _zz_415_; + wire [31:0] _zz_416_; + wire [31:0] _zz_417_; + wire [31:0] _zz_418_; + wire _zz_419_; + wire [0:0] _zz_420_; + wire [0:0] _zz_421_; + wire [31:0] _zz_422_; + wire [31:0] _zz_423_; + wire [0:0] _zz_424_; + wire [0:0] _zz_425_; + wire [0:0] _zz_426_; + wire [0:0] _zz_427_; + wire _zz_428_; + wire [0:0] _zz_429_; + wire [9:0] _zz_430_; + wire [31:0] _zz_431_; + wire [31:0] _zz_432_; + wire [31:0] _zz_433_; + wire [31:0] _zz_434_; + wire [31:0] _zz_435_; + wire [31:0] _zz_436_; + wire [31:0] _zz_437_; + wire [31:0] _zz_438_; + wire [31:0] _zz_439_; + wire [31:0] _zz_440_; + wire [31:0] _zz_441_; + wire [31:0] _zz_442_; + wire [31:0] _zz_443_; + wire [31:0] _zz_444_; + wire _zz_445_; + wire [0:0] _zz_446_; + wire [0:0] _zz_447_; + wire _zz_448_; + wire [0:0] _zz_449_; + wire [7:0] _zz_450_; + wire _zz_451_; + wire [0:0] _zz_452_; + wire [0:0] _zz_453_; + wire [0:0] _zz_454_; + wire [0:0] _zz_455_; + wire [0:0] _zz_456_; + wire [0:0] _zz_457_; + wire _zz_458_; + wire [0:0] _zz_459_; + wire [3:0] _zz_460_; + wire [31:0] _zz_461_; + wire [31:0] _zz_462_; + wire [31:0] _zz_463_; + wire [31:0] _zz_464_; + wire [31:0] _zz_465_; + wire _zz_466_; + wire _zz_467_; + wire [0:0] _zz_468_; + wire [1:0] _zz_469_; + wire [2:0] _zz_470_; + wire [2:0] _zz_471_; + wire _zz_472_; + wire [0:0] _zz_473_; + wire [0:0] _zz_474_; + wire [31:0] _zz_475_; + wire [31:0] _zz_476_; + wire [31:0] _zz_477_; + wire [31:0] _zz_478_; + wire [31:0] _zz_479_; + wire _zz_480_; + wire _zz_481_; + wire [31:0] _zz_482_; + wire [31:0] _zz_483_; + wire [0:0] _zz_484_; + wire [0:0] _zz_485_; + wire _zz_486_; + wire [31:0] _zz_487_; + wire [31:0] _zz_488_; + wire [31:0] _zz_489_; + wire _zz_490_; + wire [0:0] _zz_491_; + wire [10:0] _zz_492_; + wire [31:0] _zz_493_; + wire [31:0] _zz_494_; + wire [31:0] _zz_495_; + wire _zz_496_; + wire [0:0] _zz_497_; + wire [4:0] _zz_498_; + wire [31:0] _zz_499_; + wire [31:0] _zz_500_; + wire [31:0] _zz_501_; + wire [31:0] _zz_502_; + wire [31:0] _zz_503_; + wire _zz_504_; + wire _zz_505_; + wire _zz_506_; + wire `AluCtrlEnum_defaultEncoding_type decode_ALU_CTRL; + wire `AluCtrlEnum_defaultEncoding_type _zz_1_; + wire `AluCtrlEnum_defaultEncoding_type _zz_2_; + wire `AluCtrlEnum_defaultEncoding_type _zz_3_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type decode_ALU_BITWISE_CTRL; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_4_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_5_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_6_; + wire `Src2CtrlEnum_defaultEncoding_type decode_SRC2_CTRL; + wire `Src2CtrlEnum_defaultEncoding_type _zz_7_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_8_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_9_; + wire decode_IS_RS2_SIGNED; + wire decode_BYPASSABLE_EXECUTE_STAGE; + wire decode_IS_RS1_SIGNED; + wire decode_CSR_READ_OPCODE; + wire decode_IS_DIV; + wire [1:0] memory_MEMORY_ADDRESS_LOW; + wire [1:0] execute_MEMORY_ADDRESS_LOW; + wire decode_IS_MUL; + wire [31:0] execute_BRANCH_CALC; + wire `BranchCtrlEnum_defaultEncoding_type _zz_10_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_11_; + wire `Src1CtrlEnum_defaultEncoding_type decode_SRC1_CTRL; + wire `Src1CtrlEnum_defaultEncoding_type _zz_12_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_13_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_14_; + wire execute_BYPASSABLE_MEMORY_STAGE; + wire decode_BYPASSABLE_MEMORY_STAGE; + wire decode_SRC2_FORCE_ZERO; + wire decode_CSR_WRITE_OPCODE; + wire [31:0] writeBack_REGFILE_WRITE_DATA; + wire [31:0] execute_REGFILE_WRITE_DATA; + wire execute_BRANCH_DO; + wire decode_SRC_LESS_UNSIGNED; + wire `EnvCtrlEnum_defaultEncoding_type _zz_15_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_16_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_17_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_18_; + wire `EnvCtrlEnum_defaultEncoding_type decode_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_19_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_20_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_21_; + wire [31:0] writeBack_FORMAL_PC_NEXT; + wire [31:0] memory_FORMAL_PC_NEXT; + wire [31:0] execute_FORMAL_PC_NEXT; + wire [31:0] decode_FORMAL_PC_NEXT; + wire decode_MEMORY_STORE; + wire decode_PREDICTION_HAD_BRANCHED2; + wire decode_IS_CSR; + wire `ShiftCtrlEnum_defaultEncoding_type decode_SHIFT_CTRL; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_22_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_23_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_24_; + wire [31:0] memory_MEMORY_READ_DATA; + wire execute_IS_RS1_SIGNED; + wire execute_IS_DIV; + wire execute_IS_MUL; + wire execute_IS_RS2_SIGNED; + wire memory_IS_DIV; + wire memory_IS_MUL; + wire execute_CSR_READ_OPCODE; + wire execute_CSR_WRITE_OPCODE; + wire execute_IS_CSR; + wire `EnvCtrlEnum_defaultEncoding_type memory_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_25_; + wire `EnvCtrlEnum_defaultEncoding_type execute_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_26_; + wire _zz_27_; + wire _zz_28_; + wire `EnvCtrlEnum_defaultEncoding_type writeBack_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_29_; + wire [31:0] memory_BRANCH_CALC; + wire memory_BRANCH_DO; + wire [31:0] _zz_30_; + wire [31:0] execute_PC; + wire execute_PREDICTION_HAD_BRANCHED2; + wire _zz_31_; + wire [31:0] execute_RS1; + wire execute_BRANCH_COND_RESULT; + wire `BranchCtrlEnum_defaultEncoding_type execute_BRANCH_CTRL; + wire `BranchCtrlEnum_defaultEncoding_type _zz_32_; + wire _zz_33_; + wire _zz_34_; + wire decode_RS2_USE; + wire decode_RS1_USE; + wire execute_REGFILE_WRITE_VALID; + wire execute_BYPASSABLE_EXECUTE_STAGE; + reg [31:0] _zz_35_; + wire memory_REGFILE_WRITE_VALID; + wire [31:0] memory_INSTRUCTION; + wire memory_BYPASSABLE_MEMORY_STAGE; + wire writeBack_REGFILE_WRITE_VALID; + reg [31:0] decode_RS2; + reg [31:0] decode_RS1; + reg [31:0] _zz_36_; + wire `ShiftCtrlEnum_defaultEncoding_type execute_SHIFT_CTRL; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_37_; + wire _zz_38_; + wire [31:0] _zz_39_; + wire [31:0] _zz_40_; + wire execute_SRC_LESS_UNSIGNED; + wire execute_SRC2_FORCE_ZERO; + wire execute_SRC_USE_SUB_LESS; + wire [31:0] _zz_41_; + wire `Src2CtrlEnum_defaultEncoding_type execute_SRC2_CTRL; + wire `Src2CtrlEnum_defaultEncoding_type _zz_42_; + wire [31:0] _zz_43_; + wire `Src1CtrlEnum_defaultEncoding_type execute_SRC1_CTRL; + wire `Src1CtrlEnum_defaultEncoding_type _zz_44_; + wire [31:0] _zz_45_; + wire decode_SRC_USE_SUB_LESS; + wire decode_SRC_ADD_ZERO; + wire _zz_46_; + wire [31:0] execute_SRC_ADD_SUB; + wire execute_SRC_LESS; + wire `AluCtrlEnum_defaultEncoding_type execute_ALU_CTRL; + wire `AluCtrlEnum_defaultEncoding_type _zz_47_; + wire [31:0] _zz_48_; + wire [31:0] execute_SRC2; + wire [31:0] execute_SRC1; + wire `AluBitwiseCtrlEnum_defaultEncoding_type execute_ALU_BITWISE_CTRL; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_49_; + wire [31:0] _zz_50_; + wire _zz_51_; + reg _zz_52_; + wire [31:0] _zz_53_; + wire [31:0] _zz_54_; + wire [31:0] decode_INSTRUCTION_ANTICIPATED; + reg decode_REGFILE_WRITE_VALID; + wire decode_LEGAL_INSTRUCTION; + wire decode_INSTRUCTION_READY; + wire _zz_55_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_56_; + wire _zz_57_; + wire _zz_58_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_59_; + wire _zz_60_; + wire _zz_61_; + wire _zz_62_; + wire _zz_63_; + wire _zz_64_; + wire _zz_65_; + wire _zz_66_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_67_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_68_; + wire _zz_69_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_70_; + wire _zz_71_; + wire `AluCtrlEnum_defaultEncoding_type _zz_72_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_73_; + wire _zz_74_; + wire _zz_75_; + wire _zz_76_; + wire _zz_77_; + wire _zz_78_; + wire writeBack_MEMORY_STORE; + reg [31:0] _zz_79_; + wire writeBack_MEMORY_ENABLE; + wire [1:0] writeBack_MEMORY_ADDRESS_LOW; + wire [31:0] writeBack_MEMORY_READ_DATA; + wire memory_MMU_FAULT; + wire [31:0] memory_MMU_RSP_physicalAddress; + wire memory_MMU_RSP_isIoAccess; + wire memory_MMU_RSP_allowRead; + wire memory_MMU_RSP_allowWrite; + wire memory_MMU_RSP_allowExecute; + wire memory_MMU_RSP_exception; + wire memory_MMU_RSP_refilling; + wire [31:0] memory_PC; + wire memory_ALIGNEMENT_FAULT; + wire [31:0] memory_REGFILE_WRITE_DATA; + wire memory_MEMORY_STORE; + wire memory_MEMORY_ENABLE; + wire [31:0] _zz_80_; + wire [31:0] _zz_81_; + wire _zz_82_; + wire _zz_83_; + wire _zz_84_; + wire _zz_85_; + wire _zz_86_; + wire _zz_87_; + wire execute_MMU_FAULT; + wire [31:0] execute_MMU_RSP_physicalAddress; + wire execute_MMU_RSP_isIoAccess; + wire execute_MMU_RSP_allowRead; + wire execute_MMU_RSP_allowWrite; + wire execute_MMU_RSP_allowExecute; + wire execute_MMU_RSP_exception; + wire execute_MMU_RSP_refilling; + wire _zz_88_; + wire [31:0] execute_SRC_ADD; + wire [1:0] _zz_89_; + wire [31:0] execute_RS2; + wire [31:0] execute_INSTRUCTION; + wire execute_MEMORY_STORE; + wire execute_MEMORY_ENABLE; + wire execute_ALIGNEMENT_FAULT; + wire _zz_90_; + wire decode_MEMORY_ENABLE; + wire decode_FLUSH_ALL; + reg IBusCachedPlugin_rsp_issueDetected; + reg _zz_91_; + reg _zz_92_; + reg _zz_93_; + wire [31:0] _zz_94_; + wire `BranchCtrlEnum_defaultEncoding_type decode_BRANCH_CTRL; + wire `BranchCtrlEnum_defaultEncoding_type _zz_95_; + wire [31:0] decode_INSTRUCTION; + reg [31:0] _zz_96_; + reg [31:0] _zz_97_; + wire [31:0] decode_PC; + wire [31:0] _zz_98_; + wire [31:0] _zz_99_; + wire [31:0] _zz_100_; + wire [31:0] writeBack_PC; + wire [31:0] writeBack_INSTRUCTION; + reg decode_arbitration_haltItself; + reg decode_arbitration_haltByOther; + reg decode_arbitration_removeIt; + wire decode_arbitration_flushIt; + reg decode_arbitration_flushNext; + wire decode_arbitration_isValid; + wire decode_arbitration_isStuck; + wire decode_arbitration_isStuckByOthers; + wire decode_arbitration_isFlushed; + wire decode_arbitration_isMoving; + wire decode_arbitration_isFiring; + reg execute_arbitration_haltItself; + wire execute_arbitration_haltByOther; + reg execute_arbitration_removeIt; + wire execute_arbitration_flushIt; + wire execute_arbitration_flushNext; + reg execute_arbitration_isValid; + wire execute_arbitration_isStuck; + wire execute_arbitration_isStuckByOthers; + wire execute_arbitration_isFlushed; + wire execute_arbitration_isMoving; + wire execute_arbitration_isFiring; + reg memory_arbitration_haltItself; + wire memory_arbitration_haltByOther; + reg memory_arbitration_removeIt; + reg memory_arbitration_flushIt; + reg memory_arbitration_flushNext; + reg memory_arbitration_isValid; + wire memory_arbitration_isStuck; + wire memory_arbitration_isStuckByOthers; + wire memory_arbitration_isFlushed; + wire memory_arbitration_isMoving; + wire memory_arbitration_isFiring; + wire writeBack_arbitration_haltItself; + wire writeBack_arbitration_haltByOther; + reg writeBack_arbitration_removeIt; + wire writeBack_arbitration_flushIt; + reg writeBack_arbitration_flushNext; + reg writeBack_arbitration_isValid; + wire writeBack_arbitration_isStuck; + wire writeBack_arbitration_isStuckByOthers; + wire writeBack_arbitration_isFlushed; + wire writeBack_arbitration_isMoving; + wire writeBack_arbitration_isFiring; + wire [31:0] lastStageInstruction /* verilator public */ ; + wire [31:0] lastStagePc /* verilator public */ ; + wire lastStageIsValid /* verilator public */ ; + wire lastStageIsFiring /* verilator public */ ; + reg IBusCachedPlugin_fetcherHalt; + reg IBusCachedPlugin_fetcherflushIt; + reg IBusCachedPlugin_incomingInstruction; + wire IBusCachedPlugin_predictionJumpInterface_valid; + (* syn_keep , keep *) wire [31:0] IBusCachedPlugin_predictionJumpInterface_payload /* synthesis syn_keep = 1 */ ; + reg IBusCachedPlugin_decodePrediction_cmd_hadBranch; + wire IBusCachedPlugin_decodePrediction_rsp_wasWrong; + wire IBusCachedPlugin_pcValids_0; + wire IBusCachedPlugin_pcValids_1; + wire IBusCachedPlugin_pcValids_2; + wire IBusCachedPlugin_pcValids_3; + wire IBusCachedPlugin_redoBranch_valid; + wire [31:0] IBusCachedPlugin_redoBranch_payload; + reg IBusCachedPlugin_decodeExceptionPort_valid; + reg [3:0] IBusCachedPlugin_decodeExceptionPort_payload_code; + wire [31:0] IBusCachedPlugin_decodeExceptionPort_payload_badAddr; + wire IBusCachedPlugin_mmuBus_cmd_isValid; + wire [31:0] IBusCachedPlugin_mmuBus_cmd_virtualAddress; + wire IBusCachedPlugin_mmuBus_cmd_bypassTranslation; + wire [31:0] IBusCachedPlugin_mmuBus_rsp_physicalAddress; + wire IBusCachedPlugin_mmuBus_rsp_isIoAccess; + wire IBusCachedPlugin_mmuBus_rsp_allowRead; + wire IBusCachedPlugin_mmuBus_rsp_allowWrite; + wire IBusCachedPlugin_mmuBus_rsp_allowExecute; + wire IBusCachedPlugin_mmuBus_rsp_exception; + wire IBusCachedPlugin_mmuBus_rsp_refilling; + wire IBusCachedPlugin_mmuBus_end; + wire IBusCachedPlugin_mmuBus_busy; + reg DBusSimplePlugin_memoryExceptionPort_valid; + reg [3:0] DBusSimplePlugin_memoryExceptionPort_payload_code; + wire [31:0] DBusSimplePlugin_memoryExceptionPort_payload_badAddr; + wire DBusSimplePlugin_mmuBus_cmd_isValid; + wire [31:0] DBusSimplePlugin_mmuBus_cmd_virtualAddress; + wire DBusSimplePlugin_mmuBus_cmd_bypassTranslation; + wire [31:0] DBusSimplePlugin_mmuBus_rsp_physicalAddress; + wire DBusSimplePlugin_mmuBus_rsp_isIoAccess; + wire DBusSimplePlugin_mmuBus_rsp_allowRead; + wire DBusSimplePlugin_mmuBus_rsp_allowWrite; + wire DBusSimplePlugin_mmuBus_rsp_allowExecute; + wire DBusSimplePlugin_mmuBus_rsp_exception; + wire DBusSimplePlugin_mmuBus_rsp_refilling; + wire DBusSimplePlugin_mmuBus_end; + wire DBusSimplePlugin_mmuBus_busy; + reg DBusSimplePlugin_redoBranch_valid; + wire [31:0] DBusSimplePlugin_redoBranch_payload; + wire decodeExceptionPort_valid; + wire [3:0] decodeExceptionPort_payload_code; + wire [31:0] decodeExceptionPort_payload_badAddr; + wire BranchPlugin_jumpInterface_valid; + wire [31:0] BranchPlugin_jumpInterface_payload; + wire BranchPlugin_branchExceptionPort_valid; + wire [3:0] BranchPlugin_branchExceptionPort_payload_code; + wire [31:0] BranchPlugin_branchExceptionPort_payload_badAddr; + reg CsrPlugin_jumpInterface_valid; + reg [31:0] CsrPlugin_jumpInterface_payload; + wire CsrPlugin_exceptionPendings_0; + wire CsrPlugin_exceptionPendings_1; + wire CsrPlugin_exceptionPendings_2; + wire CsrPlugin_exceptionPendings_3; + wire externalInterrupt; + wire contextSwitching; + reg [1:0] CsrPlugin_privilege; + wire CsrPlugin_forceMachineWire; + wire CsrPlugin_allowInterrupts; + wire CsrPlugin_allowException; + wire IBusCachedPlugin_jump_pcLoad_valid; + wire [31:0] IBusCachedPlugin_jump_pcLoad_payload; + wire [4:0] _zz_101_; + wire [4:0] _zz_102_; + wire _zz_103_; + wire _zz_104_; + wire _zz_105_; + wire _zz_106_; + wire IBusCachedPlugin_fetchPc_output_valid; + wire IBusCachedPlugin_fetchPc_output_ready; + wire [31:0] IBusCachedPlugin_fetchPc_output_payload; + reg [31:0] IBusCachedPlugin_fetchPc_pcReg /* verilator public */ ; + reg IBusCachedPlugin_fetchPc_corrected; + reg IBusCachedPlugin_fetchPc_pcRegPropagate; + reg IBusCachedPlugin_fetchPc_booted; + reg IBusCachedPlugin_fetchPc_inc; + reg [31:0] IBusCachedPlugin_fetchPc_pc; + wire IBusCachedPlugin_iBusRsp_stages_0_input_valid; + wire IBusCachedPlugin_iBusRsp_stages_0_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_input_payload; + wire IBusCachedPlugin_iBusRsp_stages_0_output_valid; + wire IBusCachedPlugin_iBusRsp_stages_0_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_output_payload; + reg IBusCachedPlugin_iBusRsp_stages_0_halt; + wire IBusCachedPlugin_iBusRsp_stages_0_inputSample; + wire IBusCachedPlugin_iBusRsp_stages_1_input_valid; + wire IBusCachedPlugin_iBusRsp_stages_1_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_input_payload; + wire IBusCachedPlugin_iBusRsp_stages_1_output_valid; + wire IBusCachedPlugin_iBusRsp_stages_1_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_output_payload; + reg IBusCachedPlugin_iBusRsp_stages_1_halt; + wire IBusCachedPlugin_iBusRsp_stages_1_inputSample; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; + reg IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_inputSample; + wire _zz_107_; + wire _zz_108_; + wire _zz_109_; + wire _zz_110_; + wire _zz_111_; + reg _zz_112_; + wire _zz_113_; + reg _zz_114_; + reg [31:0] _zz_115_; + reg IBusCachedPlugin_iBusRsp_readyForError; + wire IBusCachedPlugin_iBusRsp_decodeInput_valid; + wire IBusCachedPlugin_iBusRsp_decodeInput_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; + wire IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_error; + wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; + wire IBusCachedPlugin_iBusRsp_decodeInput_payload_isRvc; + reg IBusCachedPlugin_injector_nextPcCalc_valids_0; + reg IBusCachedPlugin_injector_nextPcCalc_valids_1; + reg IBusCachedPlugin_injector_nextPcCalc_valids_2; + reg IBusCachedPlugin_injector_nextPcCalc_valids_3; + reg IBusCachedPlugin_injector_nextPcCalc_valids_4; + reg IBusCachedPlugin_injector_decodeRemoved; + wire _zz_116_; + reg [18:0] _zz_117_; + wire _zz_118_; + reg [10:0] _zz_119_; + wire _zz_120_; + reg [18:0] _zz_121_; + reg _zz_122_; + wire _zz_123_; + reg [10:0] _zz_124_; + wire _zz_125_; + reg [18:0] _zz_126_; + wire iBus_cmd_valid; + wire iBus_cmd_ready; + reg [31:0] iBus_cmd_payload_address; + wire [2:0] iBus_cmd_payload_size; + wire iBus_rsp_valid; + wire [31:0] iBus_rsp_payload_data; + wire iBus_rsp_payload_error; + wire [31:0] _zz_127_; + reg [31:0] IBusCachedPlugin_rspCounter; + wire IBusCachedPlugin_s0_tightlyCoupledHit; + reg IBusCachedPlugin_s1_tightlyCoupledHit; + reg IBusCachedPlugin_s2_tightlyCoupledHit; + wire IBusCachedPlugin_rsp_iBusRspOutputHalt; + reg IBusCachedPlugin_rsp_redoFetch; + wire dBus_cmd_valid; + wire dBus_cmd_ready; + wire dBus_cmd_payload_wr; + wire [31:0] dBus_cmd_payload_address; + wire [31:0] dBus_cmd_payload_data; + wire [1:0] dBus_cmd_payload_size; + wire dBus_rsp_ready; + wire dBus_rsp_error; + wire [31:0] dBus_rsp_data; + wire _zz_128_; + reg execute_DBusSimplePlugin_skipCmd; + reg [31:0] _zz_129_; + reg [3:0] _zz_130_; + wire [3:0] execute_DBusSimplePlugin_formalMask; + reg [31:0] writeBack_DBusSimplePlugin_rspShifted; + wire _zz_131_; + reg [31:0] _zz_132_; + wire _zz_133_; + reg [31:0] _zz_134_; + reg [31:0] writeBack_DBusSimplePlugin_rspFormated; + wire [29:0] _zz_135_; + wire _zz_136_; + wire _zz_137_; + wire _zz_138_; + wire _zz_139_; + wire _zz_140_; + wire _zz_141_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_142_; + wire `AluCtrlEnum_defaultEncoding_type _zz_143_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_144_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_145_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_146_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_147_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_148_; + wire [4:0] decode_RegFilePlugin_regFileReadAddress1; + wire [4:0] decode_RegFilePlugin_regFileReadAddress2; + wire [31:0] decode_RegFilePlugin_rs1Data; + wire [31:0] decode_RegFilePlugin_rs2Data; + reg lastStageRegFileWrite_valid /* verilator public */ ; + wire [4:0] lastStageRegFileWrite_payload_address /* verilator public */ ; + wire [31:0] lastStageRegFileWrite_payload_data /* verilator public */ ; + reg _zz_149_; + reg [31:0] execute_IntAluPlugin_bitwise; + reg [31:0] _zz_150_; + reg [31:0] _zz_151_; + wire _zz_152_; + reg [19:0] _zz_153_; + wire _zz_154_; + reg [19:0] _zz_155_; + reg [31:0] _zz_156_; + reg [31:0] execute_SrcPlugin_addSub; + wire execute_SrcPlugin_less; + reg execute_LightShifterPlugin_isActive; + wire execute_LightShifterPlugin_isShift; + reg [4:0] execute_LightShifterPlugin_amplitudeReg; + wire [4:0] execute_LightShifterPlugin_amplitude; + wire [31:0] execute_LightShifterPlugin_shiftInput; + wire execute_LightShifterPlugin_done; + reg [31:0] _zz_157_; + reg _zz_158_; + reg _zz_159_; + wire _zz_160_; + reg _zz_161_; + reg [4:0] _zz_162_; + reg [31:0] _zz_163_; + wire _zz_164_; + wire _zz_165_; + wire _zz_166_; + wire _zz_167_; + wire _zz_168_; + wire _zz_169_; + wire execute_BranchPlugin_eq; + wire [2:0] _zz_170_; + reg _zz_171_; + reg _zz_172_; + wire _zz_173_; + reg [19:0] _zz_174_; + wire _zz_175_; + reg [10:0] _zz_176_; + wire _zz_177_; + reg [18:0] _zz_178_; + reg _zz_179_; + wire execute_BranchPlugin_missAlignedTarget; + reg [31:0] execute_BranchPlugin_branch_src1; + reg [31:0] execute_BranchPlugin_branch_src2; + wire _zz_180_; + reg [19:0] _zz_181_; + wire _zz_182_; + reg [10:0] _zz_183_; + wire _zz_184_; + reg [18:0] _zz_185_; + wire [31:0] execute_BranchPlugin_branchAdder; + wire [1:0] CsrPlugin_misa_base; + wire [25:0] CsrPlugin_misa_extensions; + reg [1:0] CsrPlugin_mtvec_mode; + reg [29:0] CsrPlugin_mtvec_base; + reg [31:0] CsrPlugin_mepc; + reg CsrPlugin_mstatus_MIE; + reg CsrPlugin_mstatus_MPIE; + reg [1:0] CsrPlugin_mstatus_MPP; + reg CsrPlugin_mip_MEIP; + reg CsrPlugin_mip_MTIP; + reg CsrPlugin_mip_MSIP; + reg CsrPlugin_mie_MEIE; + reg CsrPlugin_mie_MTIE; + reg CsrPlugin_mie_MSIE; + reg CsrPlugin_mcause_interrupt; + reg [3:0] CsrPlugin_mcause_exceptionCode; + reg [31:0] CsrPlugin_mtval; + reg [63:0] CsrPlugin_mcycle = 64'b0000000000000000000000000000000000000000000000000000000000000000; + reg [63:0] CsrPlugin_minstret = 64'b0000000000000000000000000000000000000000000000000000000000000000; + wire _zz_186_; + wire _zz_187_; + wire _zz_188_; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_decode; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_execute; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_memory; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; + reg [3:0] CsrPlugin_exceptionPortCtrl_exceptionContext_code; + reg [31:0] CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; + wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped; + wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; + wire [1:0] _zz_189_; + wire _zz_190_; + wire [1:0] _zz_191_; + wire _zz_192_; + reg CsrPlugin_interrupt_valid; + reg [3:0] CsrPlugin_interrupt_code /* verilator public */ ; + reg [1:0] CsrPlugin_interrupt_targetPrivilege; + wire CsrPlugin_exception; + wire CsrPlugin_lastStageWasWfi; + reg CsrPlugin_pipelineLiberator_done; + wire CsrPlugin_interruptJump /* verilator public */ ; + reg CsrPlugin_hadException; + reg [1:0] CsrPlugin_targetPrivilege; + reg [3:0] CsrPlugin_trapCause; + reg [1:0] CsrPlugin_xtvec_mode; + reg [29:0] CsrPlugin_xtvec_base; + wire execute_CsrPlugin_inWfi /* verilator public */ ; + reg execute_CsrPlugin_wfiWake; + wire execute_CsrPlugin_blockedBySideEffects; + reg execute_CsrPlugin_illegalAccess; + reg execute_CsrPlugin_illegalInstruction; + reg [31:0] execute_CsrPlugin_readData; + wire execute_CsrPlugin_writeInstruction; + wire execute_CsrPlugin_readInstruction; + wire execute_CsrPlugin_writeEnable; + wire execute_CsrPlugin_readEnable; + wire [31:0] execute_CsrPlugin_readToWriteData; + reg [31:0] execute_CsrPlugin_writeData; + wire [11:0] execute_CsrPlugin_csrAddress; + reg [32:0] memory_MulDivIterativePlugin_rs1; + reg [31:0] memory_MulDivIterativePlugin_rs2; + reg [64:0] memory_MulDivIterativePlugin_accumulator; + reg memory_MulDivIterativePlugin_mul_counter_willIncrement; + reg memory_MulDivIterativePlugin_mul_counter_willClear; + reg [5:0] memory_MulDivIterativePlugin_mul_counter_valueNext; + reg [5:0] memory_MulDivIterativePlugin_mul_counter_value; + wire memory_MulDivIterativePlugin_mul_willOverflowIfInc; + wire memory_MulDivIterativePlugin_mul_counter_willOverflow; + reg memory_MulDivIterativePlugin_div_needRevert; + reg memory_MulDivIterativePlugin_div_counter_willIncrement; + reg memory_MulDivIterativePlugin_div_counter_willClear; + reg [5:0] memory_MulDivIterativePlugin_div_counter_valueNext; + reg [5:0] memory_MulDivIterativePlugin_div_counter_value; + wire memory_MulDivIterativePlugin_div_counter_willOverflowIfInc; + wire memory_MulDivIterativePlugin_div_counter_willOverflow; + reg memory_MulDivIterativePlugin_div_done; + reg [31:0] memory_MulDivIterativePlugin_div_result; + wire [31:0] _zz_193_; + wire [32:0] _zz_194_; + wire [32:0] _zz_195_; + wire [31:0] _zz_196_; + wire _zz_197_; + wire _zz_198_; + reg [32:0] _zz_199_; + reg [31:0] externalInterruptArray_regNext; + reg [31:0] _zz_200_; + wire [31:0] _zz_201_; + reg [31:0] decode_to_execute_INSTRUCTION; + reg [31:0] execute_to_memory_INSTRUCTION; + reg [31:0] memory_to_writeBack_INSTRUCTION; + reg execute_to_memory_ALIGNEMENT_FAULT; + reg [31:0] memory_to_writeBack_MEMORY_READ_DATA; + reg `ShiftCtrlEnum_defaultEncoding_type decode_to_execute_SHIFT_CTRL; + reg decode_to_execute_IS_CSR; + reg [31:0] decode_to_execute_PC; + reg [31:0] execute_to_memory_PC; + reg [31:0] memory_to_writeBack_PC; + reg decode_to_execute_PREDICTION_HAD_BRANCHED2; + reg decode_to_execute_MEMORY_STORE; + reg execute_to_memory_MEMORY_STORE; + reg memory_to_writeBack_MEMORY_STORE; + reg [31:0] decode_to_execute_FORMAL_PC_NEXT; + reg [31:0] execute_to_memory_FORMAL_PC_NEXT; + reg [31:0] memory_to_writeBack_FORMAL_PC_NEXT; + reg `EnvCtrlEnum_defaultEncoding_type decode_to_execute_ENV_CTRL; + reg `EnvCtrlEnum_defaultEncoding_type execute_to_memory_ENV_CTRL; + reg `EnvCtrlEnum_defaultEncoding_type memory_to_writeBack_ENV_CTRL; + reg decode_to_execute_REGFILE_WRITE_VALID; + reg execute_to_memory_REGFILE_WRITE_VALID; + reg memory_to_writeBack_REGFILE_WRITE_VALID; + reg decode_to_execute_SRC_LESS_UNSIGNED; + reg execute_to_memory_BRANCH_DO; + reg [31:0] execute_to_memory_REGFILE_WRITE_DATA; + reg [31:0] memory_to_writeBack_REGFILE_WRITE_DATA; + reg decode_to_execute_CSR_WRITE_OPCODE; + reg [31:0] decode_to_execute_RS1; + reg decode_to_execute_SRC2_FORCE_ZERO; + reg decode_to_execute_BYPASSABLE_MEMORY_STAGE; + reg execute_to_memory_BYPASSABLE_MEMORY_STAGE; + reg `Src1CtrlEnum_defaultEncoding_type decode_to_execute_SRC1_CTRL; + reg `BranchCtrlEnum_defaultEncoding_type decode_to_execute_BRANCH_CTRL; + reg decode_to_execute_MEMORY_ENABLE; + reg execute_to_memory_MEMORY_ENABLE; + reg memory_to_writeBack_MEMORY_ENABLE; + reg decode_to_execute_SRC_USE_SUB_LESS; + reg execute_to_memory_MMU_FAULT; + reg [31:0] execute_to_memory_BRANCH_CALC; + reg [31:0] decode_to_execute_RS2; + reg decode_to_execute_IS_MUL; + reg execute_to_memory_IS_MUL; + reg [1:0] execute_to_memory_MEMORY_ADDRESS_LOW; + reg [1:0] memory_to_writeBack_MEMORY_ADDRESS_LOW; + reg decode_to_execute_IS_DIV; + reg execute_to_memory_IS_DIV; + reg decode_to_execute_CSR_READ_OPCODE; + reg decode_to_execute_IS_RS1_SIGNED; + reg decode_to_execute_BYPASSABLE_EXECUTE_STAGE; + reg [31:0] execute_to_memory_MMU_RSP_physicalAddress; + reg execute_to_memory_MMU_RSP_isIoAccess; + reg execute_to_memory_MMU_RSP_allowRead; + reg execute_to_memory_MMU_RSP_allowWrite; + reg execute_to_memory_MMU_RSP_allowExecute; + reg execute_to_memory_MMU_RSP_exception; + reg execute_to_memory_MMU_RSP_refilling; + reg decode_to_execute_IS_RS2_SIGNED; + reg `Src2CtrlEnum_defaultEncoding_type decode_to_execute_SRC2_CTRL; + reg `AluBitwiseCtrlEnum_defaultEncoding_type decode_to_execute_ALU_BITWISE_CTRL; + reg `AluCtrlEnum_defaultEncoding_type decode_to_execute_ALU_CTRL; + reg [2:0] _zz_202_; + reg _zz_203_; + reg [31:0] iBusWishbone_DAT_MISO_regNext; + wire dBus_cmd_halfPipe_valid; + wire dBus_cmd_halfPipe_ready; + wire dBus_cmd_halfPipe_payload_wr; + wire [31:0] dBus_cmd_halfPipe_payload_address; + wire [31:0] dBus_cmd_halfPipe_payload_data; + wire [1:0] dBus_cmd_halfPipe_payload_size; + reg dBus_cmd_halfPipe_regs_valid; + reg dBus_cmd_halfPipe_regs_ready; + reg dBus_cmd_halfPipe_regs_payload_wr; + reg [31:0] dBus_cmd_halfPipe_regs_payload_address; + reg [31:0] dBus_cmd_halfPipe_regs_payload_data; + reg [1:0] dBus_cmd_halfPipe_regs_payload_size; + reg [3:0] _zz_204_; + `ifndef SYNTHESIS + reg [63:0] decode_ALU_CTRL_string; + reg [63:0] _zz_1__string; + reg [63:0] _zz_2__string; + reg [63:0] _zz_3__string; + reg [39:0] decode_ALU_BITWISE_CTRL_string; + reg [39:0] _zz_4__string; + reg [39:0] _zz_5__string; + reg [39:0] _zz_6__string; + reg [23:0] decode_SRC2_CTRL_string; + reg [23:0] _zz_7__string; + reg [23:0] _zz_8__string; + reg [23:0] _zz_9__string; + reg [31:0] _zz_10__string; + reg [31:0] _zz_11__string; + reg [95:0] decode_SRC1_CTRL_string; + reg [95:0] _zz_12__string; + reg [95:0] _zz_13__string; + reg [95:0] _zz_14__string; + reg [31:0] _zz_15__string; + reg [31:0] _zz_16__string; + reg [31:0] _zz_17__string; + reg [31:0] _zz_18__string; + reg [31:0] decode_ENV_CTRL_string; + reg [31:0] _zz_19__string; + reg [31:0] _zz_20__string; + reg [31:0] _zz_21__string; + reg [71:0] decode_SHIFT_CTRL_string; + reg [71:0] _zz_22__string; + reg [71:0] _zz_23__string; + reg [71:0] _zz_24__string; + reg [31:0] memory_ENV_CTRL_string; + reg [31:0] _zz_25__string; + reg [31:0] execute_ENV_CTRL_string; + reg [31:0] _zz_26__string; + reg [31:0] writeBack_ENV_CTRL_string; + reg [31:0] _zz_29__string; + reg [31:0] execute_BRANCH_CTRL_string; + reg [31:0] _zz_32__string; + reg [71:0] execute_SHIFT_CTRL_string; + reg [71:0] _zz_37__string; + reg [23:0] execute_SRC2_CTRL_string; + reg [23:0] _zz_42__string; + reg [95:0] execute_SRC1_CTRL_string; + reg [95:0] _zz_44__string; + reg [63:0] execute_ALU_CTRL_string; + reg [63:0] _zz_47__string; + reg [39:0] execute_ALU_BITWISE_CTRL_string; + reg [39:0] _zz_49__string; + reg [95:0] _zz_56__string; + reg [23:0] _zz_59__string; + reg [31:0] _zz_67__string; + reg [31:0] _zz_68__string; + reg [39:0] _zz_70__string; + reg [63:0] _zz_72__string; + reg [71:0] _zz_73__string; + reg [31:0] decode_BRANCH_CTRL_string; + reg [31:0] _zz_95__string; + reg [71:0] _zz_142__string; + reg [63:0] _zz_143__string; + reg [39:0] _zz_144__string; + reg [31:0] _zz_145__string; + reg [31:0] _zz_146__string; + reg [23:0] _zz_147__string; + reg [95:0] _zz_148__string; + reg [71:0] decode_to_execute_SHIFT_CTRL_string; + reg [31:0] decode_to_execute_ENV_CTRL_string; + reg [31:0] execute_to_memory_ENV_CTRL_string; + reg [31:0] memory_to_writeBack_ENV_CTRL_string; + reg [95:0] decode_to_execute_SRC1_CTRL_string; + reg [31:0] decode_to_execute_BRANCH_CTRL_string; + reg [23:0] decode_to_execute_SRC2_CTRL_string; + reg [39:0] decode_to_execute_ALU_BITWISE_CTRL_string; + reg [63:0] decode_to_execute_ALU_CTRL_string; + `endif + + (* ram_style = "block" *) reg [31:0] RegFilePlugin_regFile [0:31] /* verilator public */ ; + assign _zz_217_ = (memory_arbitration_isValid && memory_IS_MUL); + assign _zz_218_ = (memory_arbitration_isValid && memory_IS_DIV); + assign _zz_219_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); + assign _zz_220_ = 1'b1; + assign _zz_221_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); + assign _zz_222_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); + assign _zz_223_ = ((execute_arbitration_isValid && execute_LightShifterPlugin_isShift) && (execute_SRC2[4 : 0] != (5'b00000))); + assign _zz_224_ = (execute_arbitration_isValid && execute_IS_CSR); + assign _zz_225_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_error) && (! _zz_91_)); + assign _zz_226_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_cacheMiss) && (! _zz_92_)); + assign _zz_227_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_mmuException) && (! _zz_93_)); + assign _zz_228_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling) && (! 1'b0)); + assign _zz_229_ = ({decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid} != (2'b00)); + assign _zz_230_ = (! execute_arbitration_isStuckByOthers); + assign _zz_231_ = (! memory_MulDivIterativePlugin_mul_willOverflowIfInc); + assign _zz_232_ = (! memory_MulDivIterativePlugin_div_done); + assign _zz_233_ = ({BranchPlugin_branchExceptionPort_valid,DBusSimplePlugin_memoryExceptionPort_valid} != (2'b00)); + assign _zz_234_ = (CsrPlugin_hadException || CsrPlugin_interruptJump); + assign _zz_235_ = (writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)); + assign _zz_236_ = writeBack_INSTRUCTION[29 : 28]; + assign _zz_237_ = (! IBusCachedPlugin_iBusRsp_readyForError); + assign _zz_238_ = ((dBus_rsp_ready && dBus_rsp_error) && (! memory_MEMORY_STORE)); + assign _zz_239_ = (! ((memory_arbitration_isValid && memory_MEMORY_ENABLE) && (1'b1 || (! memory_arbitration_isStuckByOthers)))); + assign _zz_240_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); + assign _zz_241_ = (1'b0 || (! 1'b1)); + assign _zz_242_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); + assign _zz_243_ = (1'b0 || (! memory_BYPASSABLE_MEMORY_STAGE)); + assign _zz_244_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); + assign _zz_245_ = (1'b0 || (! execute_BYPASSABLE_EXECUTE_STAGE)); + assign _zz_246_ = (! memory_arbitration_isStuck); + assign _zz_247_ = (iBus_cmd_valid || (_zz_202_ != (3'b000))); + assign _zz_248_ = (CsrPlugin_mstatus_MIE || (CsrPlugin_privilege < (2'b11))); + assign _zz_249_ = ((_zz_186_ && 1'b1) && (! 1'b0)); + assign _zz_250_ = ((_zz_187_ && 1'b1) && (! 1'b0)); + assign _zz_251_ = ((_zz_188_ && 1'b1) && (! 1'b0)); + assign _zz_252_ = (! dBus_cmd_halfPipe_regs_valid); + assign _zz_253_ = writeBack_INSTRUCTION[13 : 12]; + assign _zz_254_ = execute_INSTRUCTION[13]; + assign _zz_255_ = (_zz_101_ - (5'b00001)); + assign _zz_256_ = {IBusCachedPlugin_fetchPc_inc,(2'b00)}; + assign _zz_257_ = {29'd0, _zz_256_}; + assign _zz_258_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}; + assign _zz_259_ = {{_zz_117_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0}; + assign _zz_260_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}; + assign _zz_261_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}; + assign _zz_262_ = {{_zz_119_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}},1'b0}; + assign _zz_263_ = {{_zz_121_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0}; + assign _zz_264_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}; + assign _zz_265_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}; + assign _zz_266_ = (memory_MEMORY_STORE ? (3'b110) : (3'b100)); + assign _zz_267_ = _zz_135_[0 : 0]; + assign _zz_268_ = _zz_135_[1 : 1]; + assign _zz_269_ = _zz_135_[2 : 2]; + assign _zz_270_ = _zz_135_[3 : 3]; + assign _zz_271_ = _zz_135_[8 : 8]; + assign _zz_272_ = _zz_135_[11 : 11]; + assign _zz_273_ = _zz_135_[15 : 15]; + assign _zz_274_ = _zz_135_[16 : 16]; + assign _zz_275_ = _zz_135_[17 : 17]; + assign _zz_276_ = _zz_135_[18 : 18]; + assign _zz_277_ = _zz_135_[19 : 19]; + assign _zz_278_ = _zz_135_[20 : 20]; + assign _zz_279_ = _zz_135_[21 : 21]; + assign _zz_280_ = _zz_135_[24 : 24]; + assign _zz_281_ = _zz_135_[26 : 26]; + assign _zz_282_ = _zz_135_[29 : 29]; + assign _zz_283_ = execute_SRC_LESS; + assign _zz_284_ = (3'b100); + assign _zz_285_ = execute_INSTRUCTION[19 : 15]; + assign _zz_286_ = execute_INSTRUCTION[31 : 20]; + assign _zz_287_ = {execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}; + assign _zz_288_ = ($signed(_zz_289_) + $signed(_zz_292_)); + assign _zz_289_ = ($signed(_zz_290_) + $signed(_zz_291_)); + assign _zz_290_ = execute_SRC1; + assign _zz_291_ = (execute_SRC_USE_SUB_LESS ? (~ execute_SRC2) : execute_SRC2); + assign _zz_292_ = (execute_SRC_USE_SUB_LESS ? _zz_293_ : _zz_294_); + assign _zz_293_ = (32'b00000000000000000000000000000001); + assign _zz_294_ = (32'b00000000000000000000000000000000); + assign _zz_295_ = (_zz_296_ >>> 1); + assign _zz_296_ = {((execute_SHIFT_CTRL == `ShiftCtrlEnum_defaultEncoding_SRA_1) && execute_LightShifterPlugin_shiftInput[31]),execute_LightShifterPlugin_shiftInput}; + assign _zz_297_ = execute_INSTRUCTION[31 : 20]; + assign _zz_298_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}; + assign _zz_299_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}; + assign _zz_300_ = {_zz_174_,execute_INSTRUCTION[31 : 20]}; + assign _zz_301_ = {{_zz_176_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0}; + assign _zz_302_ = {{_zz_178_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0}; + assign _zz_303_ = execute_INSTRUCTION[31 : 20]; + assign _zz_304_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}; + assign _zz_305_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}; + assign _zz_306_ = (3'b100); + assign _zz_307_ = (_zz_189_ & (~ _zz_308_)); + assign _zz_308_ = (_zz_189_ - (2'b01)); + assign _zz_309_ = (_zz_191_ & (~ _zz_310_)); + assign _zz_310_ = (_zz_191_ - (2'b01)); + assign _zz_311_ = memory_MulDivIterativePlugin_mul_counter_willIncrement; + assign _zz_312_ = {5'd0, _zz_311_}; + assign _zz_313_ = (_zz_315_ + _zz_317_); + assign _zz_314_ = (memory_MulDivIterativePlugin_rs2[0] ? memory_MulDivIterativePlugin_rs1 : (33'b000000000000000000000000000000000)); + assign _zz_315_ = {{1{_zz_314_[32]}}, _zz_314_}; + assign _zz_316_ = _zz_318_; + assign _zz_317_ = {{1{_zz_316_[32]}}, _zz_316_}; + assign _zz_318_ = (memory_MulDivIterativePlugin_accumulator >>> 32); + assign _zz_319_ = memory_MulDivIterativePlugin_div_counter_willIncrement; + assign _zz_320_ = {5'd0, _zz_319_}; + assign _zz_321_ = {1'd0, memory_MulDivIterativePlugin_rs2}; + assign _zz_322_ = {_zz_193_,(! _zz_195_[32])}; + assign _zz_323_ = _zz_195_[31:0]; + assign _zz_324_ = _zz_194_[31:0]; + assign _zz_325_ = _zz_326_; + assign _zz_326_ = _zz_327_; + assign _zz_327_ = ({1'b0,(memory_MulDivIterativePlugin_div_needRevert ? (~ _zz_196_) : _zz_196_)} + _zz_329_); + assign _zz_328_ = memory_MulDivIterativePlugin_div_needRevert; + assign _zz_329_ = {32'd0, _zz_328_}; + assign _zz_330_ = _zz_198_; + assign _zz_331_ = {32'd0, _zz_330_}; + assign _zz_332_ = _zz_197_; + assign _zz_333_ = {31'd0, _zz_332_}; + assign _zz_334_ = execute_CsrPlugin_writeData[7 : 7]; + assign _zz_335_ = execute_CsrPlugin_writeData[3 : 3]; + assign _zz_336_ = execute_CsrPlugin_writeData[3 : 3]; + assign _zz_337_ = execute_CsrPlugin_writeData[11 : 11]; + assign _zz_338_ = execute_CsrPlugin_writeData[7 : 7]; + assign _zz_339_ = execute_CsrPlugin_writeData[3 : 3]; + assign _zz_340_ = (iBus_cmd_payload_address >>> 5); + assign _zz_341_ = ({3'd0,_zz_204_} <<< dBus_cmd_halfPipe_payload_address[1 : 0]); + assign _zz_342_ = 1'b1; + assign _zz_343_ = 1'b1; + assign _zz_344_ = {_zz_104_,{_zz_106_,_zz_105_}}; + assign _zz_345_ = decode_INSTRUCTION[31]; + assign _zz_346_ = decode_INSTRUCTION[31]; + assign _zz_347_ = decode_INSTRUCTION[7]; + assign _zz_348_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000010100)) == (32'b00000000000000000000000000000100)); + assign _zz_349_ = ((decode_INSTRUCTION & _zz_356_) == (32'b00000000000000000000000000000100)); + assign _zz_350_ = _zz_141_; + assign _zz_351_ = ((decode_INSTRUCTION & _zz_357_) == (32'b00000010000000000100000000100000)); + assign _zz_352_ = (1'b0); + assign _zz_353_ = ({_zz_358_,{_zz_359_,_zz_360_}} != (3'b000)); + assign _zz_354_ = ({_zz_361_,_zz_362_} != (2'b00)); + assign _zz_355_ = {(_zz_363_ != _zz_364_),{_zz_365_,{_zz_366_,_zz_367_}}}; + assign _zz_356_ = (32'b00000000000000000000000001000100); + assign _zz_357_ = (32'b00000010000000000100000001100100); + assign _zz_358_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001010000)) == (32'b00000000000000000000000001000000)); + assign _zz_359_ = ((decode_INSTRUCTION & _zz_368_) == (32'b00000000000000000000000001000000)); + assign _zz_360_ = ((decode_INSTRUCTION & _zz_369_) == (32'b00000000000000000000000000000000)); + assign _zz_361_ = _zz_140_; + assign _zz_362_ = _zz_139_; + assign _zz_363_ = {_zz_136_,(_zz_370_ == _zz_371_)}; + assign _zz_364_ = (2'b00); + assign _zz_365_ = ({_zz_136_,_zz_372_} != (2'b00)); + assign _zz_366_ = ({_zz_373_,_zz_374_} != (3'b000)); + assign _zz_367_ = {(_zz_375_ != _zz_376_),{_zz_377_,{_zz_378_,_zz_379_}}}; + assign _zz_368_ = (32'b00000000000000000011000001000000); + assign _zz_369_ = (32'b00000000000000000000000000111000); + assign _zz_370_ = (decode_INSTRUCTION & (32'b00000000000000000000000001110000)); + assign _zz_371_ = (32'b00000000000000000000000000100000); + assign _zz_372_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000100000)) == (32'b00000000000000000000000000000000)); + assign _zz_373_ = ((decode_INSTRUCTION & _zz_380_) == (32'b00000000000000000000000001000000)); + assign _zz_374_ = {(_zz_381_ == _zz_382_),(_zz_383_ == _zz_384_)}; + assign _zz_375_ = ((decode_INSTRUCTION & _zz_385_) == (32'b00000000000000000000000000100000)); + assign _zz_376_ = (1'b0); + assign _zz_377_ = ((_zz_386_ == _zz_387_) != (1'b0)); + assign _zz_378_ = ({_zz_388_,_zz_389_} != (2'b00)); + assign _zz_379_ = {(_zz_390_ != _zz_391_),{_zz_392_,{_zz_393_,_zz_394_}}}; + assign _zz_380_ = (32'b00000000000000000000000001000100); + assign _zz_381_ = (decode_INSTRUCTION & (32'b00000000000000000010000000010100)); + assign _zz_382_ = (32'b00000000000000000010000000010000); + assign _zz_383_ = (decode_INSTRUCTION & (32'b01000000000000000100000000110100)); + assign _zz_384_ = (32'b01000000000000000000000000110000); + assign _zz_385_ = (32'b00000000000000000000000000100000); + assign _zz_386_ = (decode_INSTRUCTION & (32'b00000000000000000001000001001000)); + assign _zz_387_ = (32'b00000000000000000001000000001000); + assign _zz_388_ = ((decode_INSTRUCTION & _zz_395_) == (32'b00000000000000000000000000100000)); + assign _zz_389_ = ((decode_INSTRUCTION & _zz_396_) == (32'b00000000000000000000000000100000)); + assign _zz_390_ = {_zz_138_,{_zz_397_,{_zz_398_,_zz_399_}}}; + assign _zz_391_ = (6'b000000); + assign _zz_392_ = ({_zz_400_,_zz_401_} != (2'b00)); + assign _zz_393_ = ({_zz_402_,_zz_403_} != (4'b0000)); + assign _zz_394_ = {(_zz_404_ != _zz_405_),{_zz_406_,{_zz_407_,_zz_408_}}}; + assign _zz_395_ = (32'b00000000000000000000000000110100); + assign _zz_396_ = (32'b00000000000000000000000001100100); + assign _zz_397_ = ((decode_INSTRUCTION & _zz_409_) == (32'b00000000000000000001000000010000)); + assign _zz_398_ = (_zz_410_ == _zz_411_); + assign _zz_399_ = {_zz_412_,{_zz_413_,_zz_414_}}; + assign _zz_400_ = ((decode_INSTRUCTION & _zz_415_) == (32'b00000000000000000010000000000000)); + assign _zz_401_ = ((decode_INSTRUCTION & _zz_416_) == (32'b00000000000000000001000000000000)); + assign _zz_402_ = (_zz_417_ == _zz_418_); + assign _zz_403_ = {_zz_419_,{_zz_420_,_zz_421_}}; + assign _zz_404_ = (_zz_422_ == _zz_423_); + assign _zz_405_ = (1'b0); + assign _zz_406_ = ({_zz_424_,_zz_425_} != (2'b00)); + assign _zz_407_ = (_zz_426_ != _zz_427_); + assign _zz_408_ = {_zz_428_,{_zz_429_,_zz_430_}}; + assign _zz_409_ = (32'b00000000000000000001000000010000); + assign _zz_410_ = (decode_INSTRUCTION & (32'b00000000000000000010000000010000)); + assign _zz_411_ = (32'b00000000000000000010000000010000); + assign _zz_412_ = ((decode_INSTRUCTION & _zz_431_) == (32'b00000000000000000000000000010000)); + assign _zz_413_ = (_zz_432_ == _zz_433_); + assign _zz_414_ = (_zz_434_ == _zz_435_); + assign _zz_415_ = (32'b00000000000000000010000000010000); + assign _zz_416_ = (32'b00000000000000000101000000000000); + assign _zz_417_ = (decode_INSTRUCTION & (32'b00000000000000000000000001000100)); + assign _zz_418_ = (32'b00000000000000000000000000000000); + assign _zz_419_ = ((decode_INSTRUCTION & _zz_436_) == (32'b00000000000000000000000000000000)); + assign _zz_420_ = (_zz_437_ == _zz_438_); + assign _zz_421_ = (_zz_439_ == _zz_440_); + assign _zz_422_ = (decode_INSTRUCTION & (32'b00000000000000000011000001010000)); + assign _zz_423_ = (32'b00000000000000000000000001010000); + assign _zz_424_ = _zz_138_; + assign _zz_425_ = (_zz_441_ == _zz_442_); + assign _zz_426_ = (_zz_443_ == _zz_444_); + assign _zz_427_ = (1'b0); + assign _zz_428_ = (_zz_445_ != (1'b0)); + assign _zz_429_ = (_zz_446_ != _zz_447_); + assign _zz_430_ = {_zz_448_,{_zz_449_,_zz_450_}}; + assign _zz_431_ = (32'b00000000000000000000000001010000); + assign _zz_432_ = (decode_INSTRUCTION & (32'b00000000000000000000000000001100)); + assign _zz_433_ = (32'b00000000000000000000000000000100); + assign _zz_434_ = (decode_INSTRUCTION & (32'b00000000000000000000000000101000)); + assign _zz_435_ = (32'b00000000000000000000000000000000); + assign _zz_436_ = (32'b00000000000000000000000000011000); + assign _zz_437_ = (decode_INSTRUCTION & (32'b00000000000000000110000000000100)); + assign _zz_438_ = (32'b00000000000000000010000000000000); + assign _zz_439_ = (decode_INSTRUCTION & (32'b00000000000000000101000000000100)); + assign _zz_440_ = (32'b00000000000000000001000000000000); + assign _zz_441_ = (decode_INSTRUCTION & (32'b00000000000000000000000000011100)); + assign _zz_442_ = (32'b00000000000000000000000000000100); + assign _zz_443_ = (decode_INSTRUCTION & (32'b00000000000000000000000001011000)); + assign _zz_444_ = (32'b00000000000000000000000001000000); + assign _zz_445_ = ((decode_INSTRUCTION & (32'b00000010000000000100000001110100)) == (32'b00000010000000000000000000110000)); + assign _zz_446_ = ((decode_INSTRUCTION & (32'b00000000000000000001000000000000)) == (32'b00000000000000000001000000000000)); + assign _zz_447_ = (1'b0); + assign _zz_448_ = (_zz_137_ != (1'b0)); + assign _zz_449_ = ({_zz_451_,{_zz_452_,_zz_453_}} != (3'b000)); + assign _zz_450_ = {({_zz_454_,_zz_455_} != (2'b00)),{(_zz_456_ != _zz_457_),{_zz_458_,{_zz_459_,_zz_460_}}}}; + assign _zz_451_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001100100)) == (32'b00000000000000000000000000100100)); + assign _zz_452_ = ((decode_INSTRUCTION & _zz_461_) == (32'b00000000000000000001000000010000)); + assign _zz_453_ = ((decode_INSTRUCTION & _zz_462_) == (32'b00000000000000000001000000010000)); + assign _zz_454_ = ((decode_INSTRUCTION & _zz_463_) == (32'b00000000000000000110000000010000)); + assign _zz_455_ = ((decode_INSTRUCTION & _zz_464_) == (32'b00000000000000000100000000010000)); + assign _zz_456_ = ((decode_INSTRUCTION & _zz_465_) == (32'b00000000000000000010000000010000)); + assign _zz_457_ = (1'b0); + assign _zz_458_ = ({_zz_466_,_zz_467_} != (2'b00)); + assign _zz_459_ = ({_zz_468_,_zz_469_} != (3'b000)); + assign _zz_460_ = {(_zz_470_ != _zz_471_),{_zz_472_,{_zz_473_,_zz_474_}}}; + assign _zz_461_ = (32'b00000000000000000011000000110100); + assign _zz_462_ = (32'b00000010000000000011000001010100); + assign _zz_463_ = (32'b00000000000000000110000000010100); + assign _zz_464_ = (32'b00000000000000000101000000010100); + assign _zz_465_ = (32'b00000000000000000110000000010100); + assign _zz_466_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000110100)) == (32'b00000000000000000101000000010000)); + assign _zz_467_ = ((decode_INSTRUCTION & (32'b00000010000000000111000001100100)) == (32'b00000000000000000101000000100000)); + assign _zz_468_ = ((decode_INSTRUCTION & _zz_475_) == (32'b01000000000000000001000000010000)); + assign _zz_469_ = {(_zz_476_ == _zz_477_),(_zz_478_ == _zz_479_)}; + assign _zz_470_ = {_zz_136_,{_zz_480_,_zz_481_}}; + assign _zz_471_ = (3'b000); + assign _zz_472_ = ((_zz_482_ == _zz_483_) != (1'b0)); + assign _zz_473_ = ({_zz_484_,_zz_485_} != (2'b00)); + assign _zz_474_ = (_zz_486_ != (1'b0)); + assign _zz_475_ = (32'b01000000000000000011000001010100); + assign _zz_476_ = (decode_INSTRUCTION & (32'b00000000000000000111000000110100)); + assign _zz_477_ = (32'b00000000000000000001000000010000); + assign _zz_478_ = (decode_INSTRUCTION & (32'b00000010000000000111000001010100)); + assign _zz_479_ = (32'b00000000000000000001000000010000); + assign _zz_480_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000110000)) == (32'b00000000000000000000000000010000)); + assign _zz_481_ = ((decode_INSTRUCTION & (32'b00000010000000000000000001100000)) == (32'b00000000000000000000000000100000)); + assign _zz_482_ = (decode_INSTRUCTION & (32'b00000000000000000000000001011000)); + assign _zz_483_ = (32'b00000000000000000000000000000000); + assign _zz_484_ = ((decode_INSTRUCTION & (32'b00000000000000000001000001010000)) == (32'b00000000000000000001000001010000)); + assign _zz_485_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001010000)) == (32'b00000000000000000010000001010000)); + assign _zz_486_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000010000)) == (32'b00000000000000000000000000010000)); + assign _zz_487_ = (32'b00000000000000000001000001111111); + assign _zz_488_ = (decode_INSTRUCTION & (32'b00000000000000000010000001111111)); + assign _zz_489_ = (32'b00000000000000000010000001110011); + assign _zz_490_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001111111)) == (32'b00000000000000000100000001100011)); + assign _zz_491_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000010000000010011)); + assign _zz_492_ = {((decode_INSTRUCTION & (32'b00000000000000000110000000111111)) == (32'b00000000000000000000000000100011)),{((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_493_) == (32'b00000000000000000000000000000011)),{(_zz_494_ == _zz_495_),{_zz_496_,{_zz_497_,_zz_498_}}}}}}; + assign _zz_493_ = (32'b00000000000000000101000001011111); + assign _zz_494_ = (decode_INSTRUCTION & (32'b00000000000000000111000001111011)); + assign _zz_495_ = (32'b00000000000000000000000001100011); + assign _zz_496_ = ((decode_INSTRUCTION & (32'b00000000000000000110000001111111)) == (32'b00000000000000000000000000001111)); + assign _zz_497_ = ((decode_INSTRUCTION & (32'b11111100000000000000000001111111)) == (32'b00000000000000000000000000110011)); + assign _zz_498_ = {((decode_INSTRUCTION & (32'b11111100000000000011000001011111)) == (32'b00000000000000000001000000010011)),{((decode_INSTRUCTION & (32'b10111100000000000111000001111111)) == (32'b00000000000000000101000000010011)),{((decode_INSTRUCTION & _zz_499_) == (32'b00000000000000000101000000110011)),{(_zz_500_ == _zz_501_),(_zz_502_ == _zz_503_)}}}}; + assign _zz_499_ = (32'b10111110000000000111000001111111); + assign _zz_500_ = (decode_INSTRUCTION & (32'b10111110000000000111000001111111)); + assign _zz_501_ = (32'b00000000000000000000000000110011); + assign _zz_502_ = (decode_INSTRUCTION & (32'b11011111111111111111111111111111)); + assign _zz_503_ = (32'b00010000001000000000000001110011); + assign _zz_504_ = execute_INSTRUCTION[31]; + assign _zz_505_ = execute_INSTRUCTION[31]; + assign _zz_506_ = execute_INSTRUCTION[7]; + always @ (posedge clk) begin + if(_zz_52_) begin + RegFilePlugin_regFile[lastStageRegFileWrite_payload_address] <= lastStageRegFileWrite_payload_data; + end + end + + always @ (posedge clk) begin + if(_zz_342_) begin + _zz_214_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress1]; + end + end + + always @ (posedge clk) begin + if(_zz_343_) begin + _zz_215_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress2]; + end + end + + InstructionCache IBusCachedPlugin_cache ( + .io_flush(_zz_205_), + .io_cpu_prefetch_isValid(_zz_206_), + .io_cpu_prefetch_haltIt(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt), + .io_cpu_prefetch_pc(IBusCachedPlugin_iBusRsp_stages_0_input_payload), + .io_cpu_fetch_isValid(_zz_207_), + .io_cpu_fetch_isStuck(_zz_208_), + .io_cpu_fetch_isRemoved(IBusCachedPlugin_fetcherflushIt), + .io_cpu_fetch_pc(IBusCachedPlugin_iBusRsp_stages_1_input_payload), + .io_cpu_fetch_data(IBusCachedPlugin_cache_io_cpu_fetch_data), + .io_cpu_fetch_dataBypassValid(IBusCachedPlugin_s1_tightlyCoupledHit), + .io_cpu_fetch_dataBypass(_zz_209_), + .io_cpu_fetch_mmuBus_cmd_isValid(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid), + .io_cpu_fetch_mmuBus_cmd_virtualAddress(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress), + .io_cpu_fetch_mmuBus_cmd_bypassTranslation(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation), + .io_cpu_fetch_mmuBus_rsp_physicalAddress(IBusCachedPlugin_mmuBus_rsp_physicalAddress), + .io_cpu_fetch_mmuBus_rsp_isIoAccess(IBusCachedPlugin_mmuBus_rsp_isIoAccess), + .io_cpu_fetch_mmuBus_rsp_allowRead(IBusCachedPlugin_mmuBus_rsp_allowRead), + .io_cpu_fetch_mmuBus_rsp_allowWrite(IBusCachedPlugin_mmuBus_rsp_allowWrite), + .io_cpu_fetch_mmuBus_rsp_allowExecute(IBusCachedPlugin_mmuBus_rsp_allowExecute), + .io_cpu_fetch_mmuBus_rsp_exception(IBusCachedPlugin_mmuBus_rsp_exception), + .io_cpu_fetch_mmuBus_rsp_refilling(IBusCachedPlugin_mmuBus_rsp_refilling), + .io_cpu_fetch_mmuBus_end(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end), + .io_cpu_fetch_mmuBus_busy(IBusCachedPlugin_mmuBus_busy), + .io_cpu_fetch_physicalAddress(IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress), + .io_cpu_fetch_haltIt(IBusCachedPlugin_cache_io_cpu_fetch_haltIt), + .io_cpu_decode_isValid(_zz_210_), + .io_cpu_decode_isStuck(_zz_211_), + .io_cpu_decode_pc(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload), + .io_cpu_decode_physicalAddress(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), + .io_cpu_decode_data(IBusCachedPlugin_cache_io_cpu_decode_data), + .io_cpu_decode_cacheMiss(IBusCachedPlugin_cache_io_cpu_decode_cacheMiss), + .io_cpu_decode_error(IBusCachedPlugin_cache_io_cpu_decode_error), + .io_cpu_decode_mmuRefilling(IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling), + .io_cpu_decode_mmuException(IBusCachedPlugin_cache_io_cpu_decode_mmuException), + .io_cpu_decode_isUser(_zz_212_), + .io_cpu_fill_valid(_zz_213_), + .io_cpu_fill_payload(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), + .io_mem_cmd_valid(IBusCachedPlugin_cache_io_mem_cmd_valid), + .io_mem_cmd_ready(iBus_cmd_ready), + .io_mem_cmd_payload_address(IBusCachedPlugin_cache_io_mem_cmd_payload_address), + .io_mem_cmd_payload_size(IBusCachedPlugin_cache_io_mem_cmd_payload_size), + .io_mem_rsp_valid(iBus_rsp_valid), + .io_mem_rsp_payload_data(iBus_rsp_payload_data), + .io_mem_rsp_payload_error(iBus_rsp_payload_error), + .clk(clk), + .reset(reset) + ); + always @(*) begin + case(_zz_344_) + 3'b000 : begin + _zz_216_ = CsrPlugin_jumpInterface_payload; + end + 3'b001 : begin + _zz_216_ = DBusSimplePlugin_redoBranch_payload; + end + 3'b010 : begin + _zz_216_ = BranchPlugin_jumpInterface_payload; + end + 3'b011 : begin + _zz_216_ = IBusCachedPlugin_redoBranch_payload; + end + default : begin + _zz_216_ = IBusCachedPlugin_predictionJumpInterface_payload; + end + endcase + end + + `ifndef SYNTHESIS + always @(*) begin + case(decode_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_ALU_CTRL_string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_ALU_CTRL_string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : decode_ALU_CTRL_string = "BITWISE "; + default : decode_ALU_CTRL_string = "????????"; + endcase + end + always @(*) begin + case(_zz_1_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_1__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_1__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_1__string = "BITWISE "; + default : _zz_1__string = "????????"; + endcase + end + always @(*) begin + case(_zz_2_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_2__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_2__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_2__string = "BITWISE "; + default : _zz_2__string = "????????"; + endcase + end + always @(*) begin + case(_zz_3_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_3__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_3__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_3__string = "BITWISE "; + default : _zz_3__string = "????????"; + endcase + end + always @(*) begin + case(decode_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_ALU_BITWISE_CTRL_string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_ALU_BITWISE_CTRL_string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_ALU_BITWISE_CTRL_string = "AND_1"; + default : decode_ALU_BITWISE_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_4_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_4__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_4__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_4__string = "AND_1"; + default : _zz_4__string = "?????"; + endcase + end + always @(*) begin + case(_zz_5_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_5__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_5__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_5__string = "AND_1"; + default : _zz_5__string = "?????"; + endcase + end + always @(*) begin + case(_zz_6_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_6__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_6__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_6__string = "AND_1"; + default : _zz_6__string = "?????"; + endcase + end + always @(*) begin + case(decode_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : decode_SRC2_CTRL_string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : decode_SRC2_CTRL_string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : decode_SRC2_CTRL_string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : decode_SRC2_CTRL_string = "PC "; + default : decode_SRC2_CTRL_string = "???"; + endcase + end + always @(*) begin + case(_zz_7_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_7__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_7__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_7__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_7__string = "PC "; + default : _zz_7__string = "???"; + endcase + end + always @(*) begin + case(_zz_8_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_8__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_8__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_8__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_8__string = "PC "; + default : _zz_8__string = "???"; + endcase + end + always @(*) begin + case(_zz_9_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_9__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_9__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_9__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_9__string = "PC "; + default : _zz_9__string = "???"; + endcase + end + always @(*) begin + case(_zz_10_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_10__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_10__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_10__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_10__string = "JALR"; + default : _zz_10__string = "????"; + endcase + end + always @(*) begin + case(_zz_11_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_11__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_11__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_11__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_11__string = "JALR"; + default : _zz_11__string = "????"; + endcase + end + always @(*) begin + case(decode_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : decode_SRC1_CTRL_string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : decode_SRC1_CTRL_string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_SRC1_CTRL_string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : decode_SRC1_CTRL_string = "URS1 "; + default : decode_SRC1_CTRL_string = "????????????"; + endcase + end + always @(*) begin + case(_zz_12_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_12__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_12__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_12__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_12__string = "URS1 "; + default : _zz_12__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_13_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_13__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_13__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_13__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_13__string = "URS1 "; + default : _zz_13__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_14_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_14__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_14__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_14__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_14__string = "URS1 "; + default : _zz_14__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_15_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_15__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_15__string = "XRET"; + default : _zz_15__string = "????"; + endcase + end + always @(*) begin + case(_zz_16_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_16__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_16__string = "XRET"; + default : _zz_16__string = "????"; + endcase + end + always @(*) begin + case(_zz_17_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_17__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_17__string = "XRET"; + default : _zz_17__string = "????"; + endcase + end + always @(*) begin + case(_zz_18_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_18__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_18__string = "XRET"; + default : _zz_18__string = "????"; + endcase + end + always @(*) begin + case(decode_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : decode_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : decode_ENV_CTRL_string = "XRET"; + default : decode_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_19_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_19__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_19__string = "XRET"; + default : _zz_19__string = "????"; + endcase + end + always @(*) begin + case(_zz_20_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_20__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_20__string = "XRET"; + default : _zz_20__string = "????"; + endcase + end + always @(*) begin + case(_zz_21_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_21__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_21__string = "XRET"; + default : _zz_21__string = "????"; + endcase + end + always @(*) begin + case(decode_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_SHIFT_CTRL_string = "SRA_1 "; + default : decode_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(_zz_22_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_22__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_22__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_22__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_22__string = "SRA_1 "; + default : _zz_22__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_23_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_23__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_23__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_23__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_23__string = "SRA_1 "; + default : _zz_23__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_24_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_24__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_24__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_24__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_24__string = "SRA_1 "; + default : _zz_24__string = "?????????"; + endcase + end + always @(*) begin + case(memory_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : memory_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : memory_ENV_CTRL_string = "XRET"; + default : memory_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_25_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_25__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_25__string = "XRET"; + default : _zz_25__string = "????"; + endcase + end + always @(*) begin + case(execute_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : execute_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : execute_ENV_CTRL_string = "XRET"; + default : execute_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_26_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_26__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_26__string = "XRET"; + default : _zz_26__string = "????"; + endcase + end + always @(*) begin + case(writeBack_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : writeBack_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : writeBack_ENV_CTRL_string = "XRET"; + default : writeBack_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_29_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_29__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_29__string = "XRET"; + default : _zz_29__string = "????"; + endcase + end + always @(*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : execute_BRANCH_CTRL_string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : execute_BRANCH_CTRL_string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : execute_BRANCH_CTRL_string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : execute_BRANCH_CTRL_string = "JALR"; + default : execute_BRANCH_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_32_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_32__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_32__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_32__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_32__string = "JALR"; + default : _zz_32__string = "????"; + endcase + end + always @(*) begin + case(execute_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : execute_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : execute_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : execute_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : execute_SHIFT_CTRL_string = "SRA_1 "; + default : execute_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(_zz_37_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_37__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_37__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_37__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_37__string = "SRA_1 "; + default : _zz_37__string = "?????????"; + endcase + end + always @(*) begin + case(execute_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : execute_SRC2_CTRL_string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : execute_SRC2_CTRL_string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : execute_SRC2_CTRL_string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : execute_SRC2_CTRL_string = "PC "; + default : execute_SRC2_CTRL_string = "???"; + endcase + end + always @(*) begin + case(_zz_42_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_42__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_42__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_42__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_42__string = "PC "; + default : _zz_42__string = "???"; + endcase + end + always @(*) begin + case(execute_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : execute_SRC1_CTRL_string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : execute_SRC1_CTRL_string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : execute_SRC1_CTRL_string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : execute_SRC1_CTRL_string = "URS1 "; + default : execute_SRC1_CTRL_string = "????????????"; + endcase + end + always @(*) begin + case(_zz_44_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_44__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_44__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_44__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_44__string = "URS1 "; + default : _zz_44__string = "????????????"; + endcase + end + always @(*) begin + case(execute_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_ADD_SUB : execute_ALU_CTRL_string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : execute_ALU_CTRL_string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : execute_ALU_CTRL_string = "BITWISE "; + default : execute_ALU_CTRL_string = "????????"; + endcase + end + always @(*) begin + case(_zz_47_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_47__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_47__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_47__string = "BITWISE "; + default : _zz_47__string = "????????"; + endcase + end + always @(*) begin + case(execute_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : execute_ALU_BITWISE_CTRL_string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : execute_ALU_BITWISE_CTRL_string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : execute_ALU_BITWISE_CTRL_string = "AND_1"; + default : execute_ALU_BITWISE_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_49_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_49__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_49__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_49__string = "AND_1"; + default : _zz_49__string = "?????"; + endcase + end + always @(*) begin + case(_zz_56_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_56__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_56__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_56__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_56__string = "URS1 "; + default : _zz_56__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_59_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_59__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_59__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_59__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_59__string = "PC "; + default : _zz_59__string = "???"; + endcase + end + always @(*) begin + case(_zz_67_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_67__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_67__string = "XRET"; + default : _zz_67__string = "????"; + endcase + end + always @(*) begin + case(_zz_68_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_68__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_68__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_68__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_68__string = "JALR"; + default : _zz_68__string = "????"; + endcase + end + always @(*) begin + case(_zz_70_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_70__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_70__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_70__string = "AND_1"; + default : _zz_70__string = "?????"; + endcase + end + always @(*) begin + case(_zz_72_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_72__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_72__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_72__string = "BITWISE "; + default : _zz_72__string = "????????"; + endcase + end + always @(*) begin + case(_zz_73_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_73__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_73__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_73__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_73__string = "SRA_1 "; + default : _zz_73__string = "?????????"; + endcase + end + always @(*) begin + case(decode_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : decode_BRANCH_CTRL_string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : decode_BRANCH_CTRL_string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : decode_BRANCH_CTRL_string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : decode_BRANCH_CTRL_string = "JALR"; + default : decode_BRANCH_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_95_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_95__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_95__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_95__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_95__string = "JALR"; + default : _zz_95__string = "????"; + endcase + end + always @(*) begin + case(_zz_142_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_142__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_142__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_142__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_142__string = "SRA_1 "; + default : _zz_142__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_143_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_143__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_143__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_143__string = "BITWISE "; + default : _zz_143__string = "????????"; + endcase + end + always @(*) begin + case(_zz_144_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_144__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_144__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_144__string = "AND_1"; + default : _zz_144__string = "?????"; + endcase + end + always @(*) begin + case(_zz_145_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_145__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_145__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_145__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_145__string = "JALR"; + default : _zz_145__string = "????"; + endcase + end + always @(*) begin + case(_zz_146_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_146__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_146__string = "XRET"; + default : _zz_146__string = "????"; + endcase + end + always @(*) begin + case(_zz_147_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_147__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_147__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_147__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_147__string = "PC "; + default : _zz_147__string = "???"; + endcase + end + always @(*) begin + case(_zz_148_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_148__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_148__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_148__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_148__string = "URS1 "; + default : _zz_148__string = "????????????"; + endcase + end + always @(*) begin + case(decode_to_execute_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_to_execute_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_to_execute_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_to_execute_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_to_execute_SHIFT_CTRL_string = "SRA_1 "; + default : decode_to_execute_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(decode_to_execute_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : decode_to_execute_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : decode_to_execute_ENV_CTRL_string = "XRET"; + default : decode_to_execute_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(execute_to_memory_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : execute_to_memory_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : execute_to_memory_ENV_CTRL_string = "XRET"; + default : execute_to_memory_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(memory_to_writeBack_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : memory_to_writeBack_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : memory_to_writeBack_ENV_CTRL_string = "XRET"; + default : memory_to_writeBack_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(decode_to_execute_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC1_CTRL_string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : decode_to_execute_SRC1_CTRL_string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_to_execute_SRC1_CTRL_string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : decode_to_execute_SRC1_CTRL_string = "URS1 "; + default : decode_to_execute_SRC1_CTRL_string = "????????????"; + endcase + end + always @(*) begin + case(decode_to_execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : decode_to_execute_BRANCH_CTRL_string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : decode_to_execute_BRANCH_CTRL_string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : decode_to_execute_BRANCH_CTRL_string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : decode_to_execute_BRANCH_CTRL_string = "JALR"; + default : decode_to_execute_BRANCH_CTRL_string = "????"; + endcase + end + always @(*) begin + case(decode_to_execute_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC2_CTRL_string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : decode_to_execute_SRC2_CTRL_string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : decode_to_execute_SRC2_CTRL_string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : decode_to_execute_SRC2_CTRL_string = "PC "; + default : decode_to_execute_SRC2_CTRL_string = "???"; + endcase + end + always @(*) begin + case(decode_to_execute_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "AND_1"; + default : decode_to_execute_ALU_BITWISE_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(decode_to_execute_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_to_execute_ALU_CTRL_string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_to_execute_ALU_CTRL_string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : decode_to_execute_ALU_CTRL_string = "BITWISE "; + default : decode_to_execute_ALU_CTRL_string = "????????"; + endcase + end + `endif + + assign decode_ALU_CTRL = _zz_1_; + assign _zz_2_ = _zz_3_; + assign decode_ALU_BITWISE_CTRL = _zz_4_; + assign _zz_5_ = _zz_6_; + assign decode_SRC2_CTRL = _zz_7_; + assign _zz_8_ = _zz_9_; + assign decode_IS_RS2_SIGNED = _zz_58_; + assign decode_BYPASSABLE_EXECUTE_STAGE = _zz_74_; + assign decode_IS_RS1_SIGNED = _zz_55_; + assign decode_CSR_READ_OPCODE = _zz_27_; + assign decode_IS_DIV = _zz_57_; + assign memory_MEMORY_ADDRESS_LOW = execute_to_memory_MEMORY_ADDRESS_LOW; + assign execute_MEMORY_ADDRESS_LOW = _zz_89_; + assign decode_IS_MUL = _zz_69_; + assign execute_BRANCH_CALC = _zz_30_; + assign _zz_10_ = _zz_11_; + assign decode_SRC1_CTRL = _zz_12_; + assign _zz_13_ = _zz_14_; + assign execute_BYPASSABLE_MEMORY_STAGE = decode_to_execute_BYPASSABLE_MEMORY_STAGE; + assign decode_BYPASSABLE_MEMORY_STAGE = _zz_77_; + assign decode_SRC2_FORCE_ZERO = _zz_46_; + assign decode_CSR_WRITE_OPCODE = _zz_28_; + assign writeBack_REGFILE_WRITE_DATA = memory_to_writeBack_REGFILE_WRITE_DATA; + assign execute_REGFILE_WRITE_DATA = _zz_48_; + assign execute_BRANCH_DO = _zz_31_; + assign decode_SRC_LESS_UNSIGNED = _zz_65_; + assign _zz_15_ = _zz_16_; + assign _zz_17_ = _zz_18_; + assign decode_ENV_CTRL = _zz_19_; + assign _zz_20_ = _zz_21_; + assign writeBack_FORMAL_PC_NEXT = memory_to_writeBack_FORMAL_PC_NEXT; + assign memory_FORMAL_PC_NEXT = execute_to_memory_FORMAL_PC_NEXT; + assign execute_FORMAL_PC_NEXT = decode_to_execute_FORMAL_PC_NEXT; + assign decode_FORMAL_PC_NEXT = _zz_98_; + assign decode_MEMORY_STORE = _zz_61_; + assign decode_PREDICTION_HAD_BRANCHED2 = _zz_34_; + assign decode_IS_CSR = _zz_76_; + assign decode_SHIFT_CTRL = _zz_22_; + assign _zz_23_ = _zz_24_; + assign memory_MEMORY_READ_DATA = _zz_80_; + assign execute_IS_RS1_SIGNED = decode_to_execute_IS_RS1_SIGNED; + assign execute_IS_DIV = decode_to_execute_IS_DIV; + assign execute_IS_MUL = decode_to_execute_IS_MUL; + assign execute_IS_RS2_SIGNED = decode_to_execute_IS_RS2_SIGNED; + assign memory_IS_DIV = execute_to_memory_IS_DIV; + assign memory_IS_MUL = execute_to_memory_IS_MUL; + assign execute_CSR_READ_OPCODE = decode_to_execute_CSR_READ_OPCODE; + assign execute_CSR_WRITE_OPCODE = decode_to_execute_CSR_WRITE_OPCODE; + assign execute_IS_CSR = decode_to_execute_IS_CSR; + assign memory_ENV_CTRL = _zz_25_; + assign execute_ENV_CTRL = _zz_26_; + assign writeBack_ENV_CTRL = _zz_29_; + assign memory_BRANCH_CALC = execute_to_memory_BRANCH_CALC; + assign memory_BRANCH_DO = execute_to_memory_BRANCH_DO; + assign execute_PC = decode_to_execute_PC; + assign execute_PREDICTION_HAD_BRANCHED2 = decode_to_execute_PREDICTION_HAD_BRANCHED2; + assign execute_RS1 = decode_to_execute_RS1; + assign execute_BRANCH_COND_RESULT = _zz_33_; + assign execute_BRANCH_CTRL = _zz_32_; + assign decode_RS2_USE = _zz_63_; + assign decode_RS1_USE = _zz_66_; + assign execute_REGFILE_WRITE_VALID = decode_to_execute_REGFILE_WRITE_VALID; + assign execute_BYPASSABLE_EXECUTE_STAGE = decode_to_execute_BYPASSABLE_EXECUTE_STAGE; + always @ (*) begin + _zz_35_ = memory_REGFILE_WRITE_DATA; + if(_zz_217_)begin + _zz_35_ = ((memory_INSTRUCTION[13 : 12] == (2'b00)) ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_accumulator[63 : 32]); + end + if(_zz_218_)begin + _zz_35_ = memory_MulDivIterativePlugin_div_result; + end + end + + assign memory_REGFILE_WRITE_VALID = execute_to_memory_REGFILE_WRITE_VALID; + assign memory_INSTRUCTION = execute_to_memory_INSTRUCTION; + assign memory_BYPASSABLE_MEMORY_STAGE = execute_to_memory_BYPASSABLE_MEMORY_STAGE; + assign writeBack_REGFILE_WRITE_VALID = memory_to_writeBack_REGFILE_WRITE_VALID; + always @ (*) begin + decode_RS2 = _zz_53_; + if(_zz_161_)begin + if((_zz_162_ == decode_INSTRUCTION[24 : 20]))begin + decode_RS2 = _zz_163_; + end + end + if(_zz_219_)begin + if(_zz_220_)begin + if(_zz_165_)begin + decode_RS2 = _zz_79_; + end + end + end + if(_zz_221_)begin + if(memory_BYPASSABLE_MEMORY_STAGE)begin + if(_zz_167_)begin + decode_RS2 = _zz_35_; + end + end + end + if(_zz_222_)begin + if(execute_BYPASSABLE_EXECUTE_STAGE)begin + if(_zz_169_)begin + decode_RS2 = _zz_36_; + end + end + end + end + + always @ (*) begin + decode_RS1 = _zz_54_; + if(_zz_161_)begin + if((_zz_162_ == decode_INSTRUCTION[19 : 15]))begin + decode_RS1 = _zz_163_; + end + end + if(_zz_219_)begin + if(_zz_220_)begin + if(_zz_164_)begin + decode_RS1 = _zz_79_; + end + end + end + if(_zz_221_)begin + if(memory_BYPASSABLE_MEMORY_STAGE)begin + if(_zz_166_)begin + decode_RS1 = _zz_35_; + end + end + end + if(_zz_222_)begin + if(execute_BYPASSABLE_EXECUTE_STAGE)begin + if(_zz_168_)begin + decode_RS1 = _zz_36_; + end + end + end + end + + always @ (*) begin + _zz_36_ = execute_REGFILE_WRITE_DATA; + if(_zz_223_)begin + _zz_36_ = _zz_157_; + end + if(_zz_224_)begin + _zz_36_ = execute_CsrPlugin_readData; + end + end + + assign execute_SHIFT_CTRL = _zz_37_; + assign execute_SRC_LESS_UNSIGNED = decode_to_execute_SRC_LESS_UNSIGNED; + assign execute_SRC2_FORCE_ZERO = decode_to_execute_SRC2_FORCE_ZERO; + assign execute_SRC_USE_SUB_LESS = decode_to_execute_SRC_USE_SUB_LESS; + assign _zz_41_ = execute_PC; + assign execute_SRC2_CTRL = _zz_42_; + assign execute_SRC1_CTRL = _zz_44_; + assign decode_SRC_USE_SUB_LESS = _zz_60_; + assign decode_SRC_ADD_ZERO = _zz_71_; + assign execute_SRC_ADD_SUB = _zz_40_; + assign execute_SRC_LESS = _zz_38_; + assign execute_ALU_CTRL = _zz_47_; + assign execute_SRC2 = _zz_43_; + assign execute_SRC1 = _zz_45_; + assign execute_ALU_BITWISE_CTRL = _zz_49_; + assign _zz_50_ = writeBack_INSTRUCTION; + assign _zz_51_ = writeBack_REGFILE_WRITE_VALID; + always @ (*) begin + _zz_52_ = 1'b0; + if(lastStageRegFileWrite_valid)begin + _zz_52_ = 1'b1; + end + end + + assign decode_INSTRUCTION_ANTICIPATED = _zz_94_; + always @ (*) begin + decode_REGFILE_WRITE_VALID = _zz_64_; + if((decode_INSTRUCTION[11 : 7] == (5'b00000)))begin + decode_REGFILE_WRITE_VALID = 1'b0; + end + end + + assign decode_LEGAL_INSTRUCTION = _zz_78_; + assign decode_INSTRUCTION_READY = 1'b1; + assign writeBack_MEMORY_STORE = memory_to_writeBack_MEMORY_STORE; + always @ (*) begin + _zz_79_ = writeBack_REGFILE_WRITE_DATA; + if((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE))begin + _zz_79_ = writeBack_DBusSimplePlugin_rspFormated; + end + end + + assign writeBack_MEMORY_ENABLE = memory_to_writeBack_MEMORY_ENABLE; + assign writeBack_MEMORY_ADDRESS_LOW = memory_to_writeBack_MEMORY_ADDRESS_LOW; + assign writeBack_MEMORY_READ_DATA = memory_to_writeBack_MEMORY_READ_DATA; + assign memory_MMU_FAULT = execute_to_memory_MMU_FAULT; + assign memory_MMU_RSP_physicalAddress = execute_to_memory_MMU_RSP_physicalAddress; + assign memory_MMU_RSP_isIoAccess = execute_to_memory_MMU_RSP_isIoAccess; + assign memory_MMU_RSP_allowRead = execute_to_memory_MMU_RSP_allowRead; + assign memory_MMU_RSP_allowWrite = execute_to_memory_MMU_RSP_allowWrite; + assign memory_MMU_RSP_allowExecute = execute_to_memory_MMU_RSP_allowExecute; + assign memory_MMU_RSP_exception = execute_to_memory_MMU_RSP_exception; + assign memory_MMU_RSP_refilling = execute_to_memory_MMU_RSP_refilling; + assign memory_PC = execute_to_memory_PC; + assign memory_ALIGNEMENT_FAULT = execute_to_memory_ALIGNEMENT_FAULT; + assign memory_REGFILE_WRITE_DATA = execute_to_memory_REGFILE_WRITE_DATA; + assign memory_MEMORY_STORE = execute_to_memory_MEMORY_STORE; + assign memory_MEMORY_ENABLE = execute_to_memory_MEMORY_ENABLE; + assign execute_MMU_FAULT = _zz_88_; + assign execute_MMU_RSP_physicalAddress = _zz_81_; + assign execute_MMU_RSP_isIoAccess = _zz_82_; + assign execute_MMU_RSP_allowRead = _zz_83_; + assign execute_MMU_RSP_allowWrite = _zz_84_; + assign execute_MMU_RSP_allowExecute = _zz_85_; + assign execute_MMU_RSP_exception = _zz_86_; + assign execute_MMU_RSP_refilling = _zz_87_; + assign execute_SRC_ADD = _zz_39_; + assign execute_RS2 = decode_to_execute_RS2; + assign execute_INSTRUCTION = decode_to_execute_INSTRUCTION; + assign execute_MEMORY_STORE = decode_to_execute_MEMORY_STORE; + assign execute_MEMORY_ENABLE = decode_to_execute_MEMORY_ENABLE; + assign execute_ALIGNEMENT_FAULT = _zz_90_; + assign decode_MEMORY_ENABLE = _zz_75_; + assign decode_FLUSH_ALL = _zz_62_; + always @ (*) begin + IBusCachedPlugin_rsp_issueDetected = _zz_91_; + if(_zz_225_)begin + IBusCachedPlugin_rsp_issueDetected = 1'b1; + end + end + + always @ (*) begin + _zz_91_ = _zz_92_; + if(_zz_226_)begin + _zz_91_ = 1'b1; + end + end + + always @ (*) begin + _zz_92_ = _zz_93_; + if(_zz_227_)begin + _zz_92_ = 1'b1; + end + end + + always @ (*) begin + _zz_93_ = 1'b0; + if(_zz_228_)begin + _zz_93_ = 1'b1; + end + end + + assign decode_BRANCH_CTRL = _zz_95_; + assign decode_INSTRUCTION = _zz_99_; + always @ (*) begin + _zz_96_ = memory_FORMAL_PC_NEXT; + if(DBusSimplePlugin_redoBranch_valid)begin + _zz_96_ = DBusSimplePlugin_redoBranch_payload; + end + if(BranchPlugin_jumpInterface_valid)begin + _zz_96_ = BranchPlugin_jumpInterface_payload; + end + end + + always @ (*) begin + _zz_97_ = decode_FORMAL_PC_NEXT; + if(IBusCachedPlugin_predictionJumpInterface_valid)begin + _zz_97_ = IBusCachedPlugin_predictionJumpInterface_payload; + end + if(IBusCachedPlugin_redoBranch_valid)begin + _zz_97_ = IBusCachedPlugin_redoBranch_payload; + end + end + + assign decode_PC = _zz_100_; + assign writeBack_PC = memory_to_writeBack_PC; + assign writeBack_INSTRUCTION = memory_to_writeBack_INSTRUCTION; + always @ (*) begin + decode_arbitration_haltItself = 1'b0; + if(((DBusSimplePlugin_mmuBus_busy && decode_arbitration_isValid) && decode_MEMORY_ENABLE))begin + decode_arbitration_haltItself = 1'b1; + end + end + + always @ (*) begin + decode_arbitration_haltByOther = 1'b0; + if((decode_arbitration_isValid && (_zz_158_ || _zz_159_)))begin + decode_arbitration_haltByOther = 1'b1; + end + if((CsrPlugin_interrupt_valid && CsrPlugin_allowInterrupts))begin + decode_arbitration_haltByOther = decode_arbitration_isValid; + end + if(({(writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),{(memory_arbitration_isValid && (memory_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),(execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET))}} != (3'b000)))begin + decode_arbitration_haltByOther = 1'b1; + end + end + + always @ (*) begin + decode_arbitration_removeIt = 1'b0; + if(_zz_229_)begin + decode_arbitration_removeIt = 1'b1; + end + if(decode_arbitration_isFlushed)begin + decode_arbitration_removeIt = 1'b1; + end + end + + assign decode_arbitration_flushIt = 1'b0; + always @ (*) begin + decode_arbitration_flushNext = 1'b0; + if(IBusCachedPlugin_redoBranch_valid)begin + decode_arbitration_flushNext = 1'b1; + end + if(_zz_229_)begin + decode_arbitration_flushNext = 1'b1; + end + end + + always @ (*) begin + execute_arbitration_haltItself = 1'b0; + if(((((execute_arbitration_isValid && execute_MEMORY_ENABLE) && (! dBus_cmd_ready)) && (! execute_DBusSimplePlugin_skipCmd)) && (! _zz_128_)))begin + execute_arbitration_haltItself = 1'b1; + end + if(_zz_223_)begin + if(_zz_230_)begin + if(! execute_LightShifterPlugin_done) begin + execute_arbitration_haltItself = 1'b1; + end + end + end + if(_zz_224_)begin + if(execute_CsrPlugin_blockedBySideEffects)begin + execute_arbitration_haltItself = 1'b1; + end + end + end + + assign execute_arbitration_haltByOther = 1'b0; + always @ (*) begin + execute_arbitration_removeIt = 1'b0; + if(execute_arbitration_isFlushed)begin + execute_arbitration_removeIt = 1'b1; + end + end + + assign execute_arbitration_flushIt = 1'b0; + assign execute_arbitration_flushNext = 1'b0; + always @ (*) begin + memory_arbitration_haltItself = 1'b0; + if((((memory_arbitration_isValid && memory_MEMORY_ENABLE) && (! memory_MEMORY_STORE)) && ((! dBus_rsp_ready) || 1'b0)))begin + memory_arbitration_haltItself = 1'b1; + end + if(_zz_217_)begin + if(_zz_231_)begin + memory_arbitration_haltItself = 1'b1; + end + end + if(_zz_218_)begin + if(_zz_232_)begin + memory_arbitration_haltItself = 1'b1; + end + end + end + + assign memory_arbitration_haltByOther = 1'b0; + always @ (*) begin + memory_arbitration_removeIt = 1'b0; + if(_zz_233_)begin + memory_arbitration_removeIt = 1'b1; + end + if(memory_arbitration_isFlushed)begin + memory_arbitration_removeIt = 1'b1; + end + end + + always @ (*) begin + memory_arbitration_flushIt = 1'b0; + if(DBusSimplePlugin_redoBranch_valid)begin + memory_arbitration_flushIt = 1'b1; + end + end + + always @ (*) begin + memory_arbitration_flushNext = 1'b0; + if(DBusSimplePlugin_redoBranch_valid)begin + memory_arbitration_flushNext = 1'b1; + end + if(BranchPlugin_jumpInterface_valid)begin + memory_arbitration_flushNext = 1'b1; + end + if(_zz_233_)begin + memory_arbitration_flushNext = 1'b1; + end + end + + assign writeBack_arbitration_haltItself = 1'b0; + assign writeBack_arbitration_haltByOther = 1'b0; + always @ (*) begin + writeBack_arbitration_removeIt = 1'b0; + if(writeBack_arbitration_isFlushed)begin + writeBack_arbitration_removeIt = 1'b1; + end + end + + assign writeBack_arbitration_flushIt = 1'b0; + always @ (*) begin + writeBack_arbitration_flushNext = 1'b0; + if(_zz_234_)begin + writeBack_arbitration_flushNext = 1'b1; + end + if(_zz_235_)begin + writeBack_arbitration_flushNext = 1'b1; + end + end + + assign lastStageInstruction = writeBack_INSTRUCTION; + assign lastStagePc = writeBack_PC; + assign lastStageIsValid = writeBack_arbitration_isValid; + assign lastStageIsFiring = writeBack_arbitration_isFiring; + always @ (*) begin + IBusCachedPlugin_fetcherHalt = 1'b0; + if(({CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValids_memory,{CsrPlugin_exceptionPortCtrl_exceptionValids_execute,CsrPlugin_exceptionPortCtrl_exceptionValids_decode}}} != (4'b0000)))begin + IBusCachedPlugin_fetcherHalt = 1'b1; + end + if(_zz_234_)begin + IBusCachedPlugin_fetcherHalt = 1'b1; + end + if(_zz_235_)begin + IBusCachedPlugin_fetcherHalt = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_fetcherflushIt = 1'b0; + if(({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,{execute_arbitration_flushNext,decode_arbitration_flushNext}}} != (4'b0000)))begin + IBusCachedPlugin_fetcherflushIt = 1'b1; + end + if((IBusCachedPlugin_predictionJumpInterface_valid && decode_arbitration_isFiring))begin + IBusCachedPlugin_fetcherflushIt = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_incomingInstruction = 1'b0; + if((IBusCachedPlugin_iBusRsp_stages_1_input_valid || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid))begin + IBusCachedPlugin_incomingInstruction = 1'b1; + end + end + + always @ (*) begin + CsrPlugin_jumpInterface_valid = 1'b0; + if(_zz_234_)begin + CsrPlugin_jumpInterface_valid = 1'b1; + end + if(_zz_235_)begin + CsrPlugin_jumpInterface_valid = 1'b1; + end + end + + always @ (*) begin + CsrPlugin_jumpInterface_payload = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + if(_zz_234_)begin + CsrPlugin_jumpInterface_payload = {CsrPlugin_xtvec_base,(2'b00)}; + end + if(_zz_235_)begin + case(_zz_236_) + 2'b11 : begin + CsrPlugin_jumpInterface_payload = CsrPlugin_mepc; + end + default : begin + end + endcase + end + end + + assign CsrPlugin_forceMachineWire = 1'b0; + assign CsrPlugin_allowInterrupts = 1'b1; + assign CsrPlugin_allowException = 1'b1; + assign IBusCachedPlugin_jump_pcLoad_valid = ({CsrPlugin_jumpInterface_valid,{BranchPlugin_jumpInterface_valid,{DBusSimplePlugin_redoBranch_valid,{IBusCachedPlugin_redoBranch_valid,IBusCachedPlugin_predictionJumpInterface_valid}}}} != (5'b00000)); + assign _zz_101_ = {IBusCachedPlugin_predictionJumpInterface_valid,{IBusCachedPlugin_redoBranch_valid,{BranchPlugin_jumpInterface_valid,{DBusSimplePlugin_redoBranch_valid,CsrPlugin_jumpInterface_valid}}}}; + assign _zz_102_ = (_zz_101_ & (~ _zz_255_)); + assign _zz_103_ = _zz_102_[3]; + assign _zz_104_ = _zz_102_[4]; + assign _zz_105_ = (_zz_102_[1] || _zz_103_); + assign _zz_106_ = (_zz_102_[2] || _zz_103_); + assign IBusCachedPlugin_jump_pcLoad_payload = _zz_216_; + always @ (*) begin + IBusCachedPlugin_fetchPc_corrected = 1'b0; + if(IBusCachedPlugin_jump_pcLoad_valid)begin + IBusCachedPlugin_fetchPc_corrected = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b0; + if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin + IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_fetchPc_pc = (IBusCachedPlugin_fetchPc_pcReg + _zz_257_); + if(IBusCachedPlugin_jump_pcLoad_valid)begin + IBusCachedPlugin_fetchPc_pc = IBusCachedPlugin_jump_pcLoad_payload; + end + IBusCachedPlugin_fetchPc_pc[0] = 1'b0; + IBusCachedPlugin_fetchPc_pc[1] = 1'b0; + end + + assign IBusCachedPlugin_fetchPc_output_valid = ((! IBusCachedPlugin_fetcherHalt) && IBusCachedPlugin_fetchPc_booted); + assign IBusCachedPlugin_fetchPc_output_payload = IBusCachedPlugin_fetchPc_pc; + assign IBusCachedPlugin_iBusRsp_stages_0_input_valid = IBusCachedPlugin_fetchPc_output_valid; + assign IBusCachedPlugin_fetchPc_output_ready = IBusCachedPlugin_iBusRsp_stages_0_input_ready; + assign IBusCachedPlugin_iBusRsp_stages_0_input_payload = IBusCachedPlugin_fetchPc_output_payload; + assign IBusCachedPlugin_iBusRsp_stages_0_inputSample = 1'b1; + always @ (*) begin + IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b0; + if(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt)begin + IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b1; + end + end + + assign _zz_107_ = (! IBusCachedPlugin_iBusRsp_stages_0_halt); + assign IBusCachedPlugin_iBusRsp_stages_0_input_ready = (IBusCachedPlugin_iBusRsp_stages_0_output_ready && _zz_107_); + assign IBusCachedPlugin_iBusRsp_stages_0_output_valid = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && _zz_107_); + assign IBusCachedPlugin_iBusRsp_stages_0_output_payload = IBusCachedPlugin_iBusRsp_stages_0_input_payload; + always @ (*) begin + IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b0; + if(IBusCachedPlugin_cache_io_cpu_fetch_haltIt)begin + IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b1; + end + end + + assign _zz_108_ = (! IBusCachedPlugin_iBusRsp_stages_1_halt); + assign IBusCachedPlugin_iBusRsp_stages_1_input_ready = (IBusCachedPlugin_iBusRsp_stages_1_output_ready && _zz_108_); + assign IBusCachedPlugin_iBusRsp_stages_1_output_valid = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && _zz_108_); + assign IBusCachedPlugin_iBusRsp_stages_1_output_payload = IBusCachedPlugin_iBusRsp_stages_1_input_payload; + always @ (*) begin + IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b0; + if((IBusCachedPlugin_rsp_issueDetected || IBusCachedPlugin_rsp_iBusRspOutputHalt))begin + IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b1; + end + end + + assign _zz_109_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt); + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready && _zz_109_); + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && _zz_109_); + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; + assign IBusCachedPlugin_iBusRsp_stages_0_output_ready = _zz_110_; + assign _zz_110_ = ((1'b0 && (! _zz_111_)) || IBusCachedPlugin_iBusRsp_stages_1_input_ready); + assign _zz_111_ = _zz_112_; + assign IBusCachedPlugin_iBusRsp_stages_1_input_valid = _zz_111_; + assign IBusCachedPlugin_iBusRsp_stages_1_input_payload = IBusCachedPlugin_fetchPc_pcReg; + assign IBusCachedPlugin_iBusRsp_stages_1_output_ready = ((1'b0 && (! _zz_113_)) || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); + assign _zz_113_ = _zz_114_; + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid = _zz_113_; + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload = _zz_115_; + always @ (*) begin + IBusCachedPlugin_iBusRsp_readyForError = 1'b1; + if((! IBusCachedPlugin_pcValids_0))begin + IBusCachedPlugin_iBusRsp_readyForError = 1'b0; + end + end + + assign IBusCachedPlugin_pcValids_0 = IBusCachedPlugin_injector_nextPcCalc_valids_1; + assign IBusCachedPlugin_pcValids_1 = IBusCachedPlugin_injector_nextPcCalc_valids_2; + assign IBusCachedPlugin_pcValids_2 = IBusCachedPlugin_injector_nextPcCalc_valids_3; + assign IBusCachedPlugin_pcValids_3 = IBusCachedPlugin_injector_nextPcCalc_valids_4; + assign IBusCachedPlugin_iBusRsp_decodeInput_ready = (! decode_arbitration_isStuck); + assign decode_arbitration_isValid = (IBusCachedPlugin_iBusRsp_decodeInput_valid && (! IBusCachedPlugin_injector_decodeRemoved)); + assign _zz_100_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; + assign _zz_99_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; + assign _zz_98_ = (decode_PC + (32'b00000000000000000000000000000100)); + assign _zz_116_ = _zz_258_[11]; + always @ (*) begin + _zz_117_[18] = _zz_116_; + _zz_117_[17] = _zz_116_; + _zz_117_[16] = _zz_116_; + _zz_117_[15] = _zz_116_; + _zz_117_[14] = _zz_116_; + _zz_117_[13] = _zz_116_; + _zz_117_[12] = _zz_116_; + _zz_117_[11] = _zz_116_; + _zz_117_[10] = _zz_116_; + _zz_117_[9] = _zz_116_; + _zz_117_[8] = _zz_116_; + _zz_117_[7] = _zz_116_; + _zz_117_[6] = _zz_116_; + _zz_117_[5] = _zz_116_; + _zz_117_[4] = _zz_116_; + _zz_117_[3] = _zz_116_; + _zz_117_[2] = _zz_116_; + _zz_117_[1] = _zz_116_; + _zz_117_[0] = _zz_116_; + end + + always @ (*) begin + IBusCachedPlugin_decodePrediction_cmd_hadBranch = ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) || ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_B) && _zz_259_[31])); + if(_zz_122_)begin + IBusCachedPlugin_decodePrediction_cmd_hadBranch = 1'b0; + end + end + + assign _zz_118_ = _zz_260_[19]; + always @ (*) begin + _zz_119_[10] = _zz_118_; + _zz_119_[9] = _zz_118_; + _zz_119_[8] = _zz_118_; + _zz_119_[7] = _zz_118_; + _zz_119_[6] = _zz_118_; + _zz_119_[5] = _zz_118_; + _zz_119_[4] = _zz_118_; + _zz_119_[3] = _zz_118_; + _zz_119_[2] = _zz_118_; + _zz_119_[1] = _zz_118_; + _zz_119_[0] = _zz_118_; + end + + assign _zz_120_ = _zz_261_[11]; + always @ (*) begin + _zz_121_[18] = _zz_120_; + _zz_121_[17] = _zz_120_; + _zz_121_[16] = _zz_120_; + _zz_121_[15] = _zz_120_; + _zz_121_[14] = _zz_120_; + _zz_121_[13] = _zz_120_; + _zz_121_[12] = _zz_120_; + _zz_121_[11] = _zz_120_; + _zz_121_[10] = _zz_120_; + _zz_121_[9] = _zz_120_; + _zz_121_[8] = _zz_120_; + _zz_121_[7] = _zz_120_; + _zz_121_[6] = _zz_120_; + _zz_121_[5] = _zz_120_; + _zz_121_[4] = _zz_120_; + _zz_121_[3] = _zz_120_; + _zz_121_[2] = _zz_120_; + _zz_121_[1] = _zz_120_; + _zz_121_[0] = _zz_120_; + end + + always @ (*) begin + case(decode_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_JAL : begin + _zz_122_ = _zz_262_[1]; + end + default : begin + _zz_122_ = _zz_263_[1]; + end + endcase + end + + assign IBusCachedPlugin_predictionJumpInterface_valid = (decode_arbitration_isValid && IBusCachedPlugin_decodePrediction_cmd_hadBranch); + assign _zz_123_ = _zz_264_[19]; + always @ (*) begin + _zz_124_[10] = _zz_123_; + _zz_124_[9] = _zz_123_; + _zz_124_[8] = _zz_123_; + _zz_124_[7] = _zz_123_; + _zz_124_[6] = _zz_123_; + _zz_124_[5] = _zz_123_; + _zz_124_[4] = _zz_123_; + _zz_124_[3] = _zz_123_; + _zz_124_[2] = _zz_123_; + _zz_124_[1] = _zz_123_; + _zz_124_[0] = _zz_123_; + end + + assign _zz_125_ = _zz_265_[11]; + always @ (*) begin + _zz_126_[18] = _zz_125_; + _zz_126_[17] = _zz_125_; + _zz_126_[16] = _zz_125_; + _zz_126_[15] = _zz_125_; + _zz_126_[14] = _zz_125_; + _zz_126_[13] = _zz_125_; + _zz_126_[12] = _zz_125_; + _zz_126_[11] = _zz_125_; + _zz_126_[10] = _zz_125_; + _zz_126_[9] = _zz_125_; + _zz_126_[8] = _zz_125_; + _zz_126_[7] = _zz_125_; + _zz_126_[6] = _zz_125_; + _zz_126_[5] = _zz_125_; + _zz_126_[4] = _zz_125_; + _zz_126_[3] = _zz_125_; + _zz_126_[2] = _zz_125_; + _zz_126_[1] = _zz_125_; + _zz_126_[0] = _zz_125_; + end + + assign IBusCachedPlugin_predictionJumpInterface_payload = (decode_PC + ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) ? {{_zz_124_,{{{_zz_345_,decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}},1'b0} : {{_zz_126_,{{{_zz_346_,_zz_347_},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0})); + assign iBus_cmd_valid = IBusCachedPlugin_cache_io_mem_cmd_valid; + always @ (*) begin + iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; + iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; + end + + assign iBus_cmd_payload_size = IBusCachedPlugin_cache_io_mem_cmd_payload_size; + assign IBusCachedPlugin_s0_tightlyCoupledHit = 1'b0; + assign _zz_206_ = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && (! IBusCachedPlugin_s0_tightlyCoupledHit)); + assign _zz_209_ = (32'b00000000000000000000000000000000); + assign _zz_207_ = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && (! IBusCachedPlugin_s1_tightlyCoupledHit)); + assign _zz_208_ = (! IBusCachedPlugin_iBusRsp_stages_1_input_ready); + assign _zz_210_ = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && (! IBusCachedPlugin_s2_tightlyCoupledHit)); + assign _zz_211_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); + assign _zz_212_ = (CsrPlugin_privilege == (2'b00)); + assign _zz_94_ = (decode_arbitration_isStuck ? decode_INSTRUCTION : IBusCachedPlugin_cache_io_cpu_fetch_data); + assign IBusCachedPlugin_rsp_iBusRspOutputHalt = 1'b0; + always @ (*) begin + IBusCachedPlugin_rsp_redoFetch = 1'b0; + if(_zz_228_)begin + IBusCachedPlugin_rsp_redoFetch = 1'b1; + end + if(_zz_226_)begin + IBusCachedPlugin_rsp_redoFetch = 1'b1; + end + if(_zz_237_)begin + IBusCachedPlugin_rsp_redoFetch = 1'b0; + end + end + + always @ (*) begin + _zz_213_ = (IBusCachedPlugin_rsp_redoFetch && (! IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling)); + if(_zz_226_)begin + _zz_213_ = 1'b1; + end + if(_zz_237_)begin + _zz_213_ = 1'b0; + end + end + + always @ (*) begin + IBusCachedPlugin_decodeExceptionPort_valid = 1'b0; + if(_zz_227_)begin + IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; + end + if(_zz_225_)begin + IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; + end + end + + always @ (*) begin + IBusCachedPlugin_decodeExceptionPort_payload_code = (4'bxxxx); + if(_zz_227_)begin + IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b1100); + end + if(_zz_225_)begin + IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b0001); + end + end + + assign IBusCachedPlugin_decodeExceptionPort_payload_badAddr = {IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload[31 : 2],(2'b00)}; + assign IBusCachedPlugin_redoBranch_valid = IBusCachedPlugin_rsp_redoFetch; + assign IBusCachedPlugin_redoBranch_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; + assign IBusCachedPlugin_iBusRsp_decodeInput_valid = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready = IBusCachedPlugin_iBusRsp_decodeInput_ready; + assign IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst = IBusCachedPlugin_cache_io_cpu_decode_data; + assign IBusCachedPlugin_iBusRsp_decodeInput_payload_pc = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; + assign IBusCachedPlugin_mmuBus_cmd_isValid = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; + assign IBusCachedPlugin_mmuBus_cmd_virtualAddress = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; + assign IBusCachedPlugin_mmuBus_cmd_bypassTranslation = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; + assign IBusCachedPlugin_mmuBus_end = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; + assign _zz_205_ = (decode_arbitration_isValid && decode_FLUSH_ALL); + assign _zz_128_ = 1'b0; + assign _zz_90_ = (((dBus_cmd_payload_size == (2'b10)) && (dBus_cmd_payload_address[1 : 0] != (2'b00))) || ((dBus_cmd_payload_size == (2'b01)) && (dBus_cmd_payload_address[0 : 0] != (1'b0)))); + always @ (*) begin + execute_DBusSimplePlugin_skipCmd = 1'b0; + if(execute_ALIGNEMENT_FAULT)begin + execute_DBusSimplePlugin_skipCmd = 1'b1; + end + if((execute_MMU_FAULT || execute_MMU_RSP_refilling))begin + execute_DBusSimplePlugin_skipCmd = 1'b1; + end + end + + assign dBus_cmd_valid = (((((execute_arbitration_isValid && execute_MEMORY_ENABLE) && (! execute_arbitration_isStuckByOthers)) && (! execute_arbitration_isFlushed)) && (! execute_DBusSimplePlugin_skipCmd)) && (! _zz_128_)); + assign dBus_cmd_payload_wr = execute_MEMORY_STORE; + assign dBus_cmd_payload_size = execute_INSTRUCTION[13 : 12]; + always @ (*) begin + case(dBus_cmd_payload_size) + 2'b00 : begin + _zz_129_ = {{{execute_RS2[7 : 0],execute_RS2[7 : 0]},execute_RS2[7 : 0]},execute_RS2[7 : 0]}; + end + 2'b01 : begin + _zz_129_ = {execute_RS2[15 : 0],execute_RS2[15 : 0]}; + end + default : begin + _zz_129_ = execute_RS2[31 : 0]; + end + endcase + end + + assign dBus_cmd_payload_data = _zz_129_; + assign _zz_89_ = dBus_cmd_payload_address[1 : 0]; + always @ (*) begin + case(dBus_cmd_payload_size) + 2'b00 : begin + _zz_130_ = (4'b0001); + end + 2'b01 : begin + _zz_130_ = (4'b0011); + end + default : begin + _zz_130_ = (4'b1111); + end + endcase + end + + assign execute_DBusSimplePlugin_formalMask = (_zz_130_ <<< dBus_cmd_payload_address[1 : 0]); + assign DBusSimplePlugin_mmuBus_cmd_isValid = (execute_arbitration_isValid && execute_MEMORY_ENABLE); + assign DBusSimplePlugin_mmuBus_cmd_virtualAddress = execute_SRC_ADD; + assign DBusSimplePlugin_mmuBus_cmd_bypassTranslation = 1'b0; + assign DBusSimplePlugin_mmuBus_end = ((! execute_arbitration_isStuck) || execute_arbitration_removeIt); + assign dBus_cmd_payload_address = DBusSimplePlugin_mmuBus_rsp_physicalAddress; + assign _zz_88_ = ((execute_MMU_RSP_exception || ((! execute_MMU_RSP_allowWrite) && execute_MEMORY_STORE)) || ((! execute_MMU_RSP_allowRead) && (! execute_MEMORY_STORE))); + assign _zz_81_ = DBusSimplePlugin_mmuBus_rsp_physicalAddress; + assign _zz_82_ = DBusSimplePlugin_mmuBus_rsp_isIoAccess; + assign _zz_83_ = DBusSimplePlugin_mmuBus_rsp_allowRead; + assign _zz_84_ = DBusSimplePlugin_mmuBus_rsp_allowWrite; + assign _zz_85_ = DBusSimplePlugin_mmuBus_rsp_allowExecute; + assign _zz_86_ = DBusSimplePlugin_mmuBus_rsp_exception; + assign _zz_87_ = DBusSimplePlugin_mmuBus_rsp_refilling; + assign _zz_80_ = dBus_rsp_data; + always @ (*) begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b0; + if(_zz_238_)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b1; + end + if(memory_ALIGNEMENT_FAULT)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b1; + end + if(memory_MMU_RSP_refilling)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b0; + end else begin + if(memory_MMU_FAULT)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b1; + end + end + if(_zz_239_)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b0; + end + end + + always @ (*) begin + DBusSimplePlugin_memoryExceptionPort_payload_code = (4'bxxxx); + if(_zz_238_)begin + DBusSimplePlugin_memoryExceptionPort_payload_code = (4'b0101); + end + if(memory_ALIGNEMENT_FAULT)begin + DBusSimplePlugin_memoryExceptionPort_payload_code = {1'd0, _zz_266_}; + end + if(! memory_MMU_RSP_refilling) begin + if(memory_MMU_FAULT)begin + DBusSimplePlugin_memoryExceptionPort_payload_code = (memory_MEMORY_STORE ? (4'b1111) : (4'b1101)); + end + end + end + + assign DBusSimplePlugin_memoryExceptionPort_payload_badAddr = memory_REGFILE_WRITE_DATA; + always @ (*) begin + DBusSimplePlugin_redoBranch_valid = 1'b0; + if(memory_MMU_RSP_refilling)begin + DBusSimplePlugin_redoBranch_valid = 1'b1; + end + if(_zz_239_)begin + DBusSimplePlugin_redoBranch_valid = 1'b0; + end + end + + assign DBusSimplePlugin_redoBranch_payload = memory_PC; + always @ (*) begin + writeBack_DBusSimplePlugin_rspShifted = writeBack_MEMORY_READ_DATA; + case(writeBack_MEMORY_ADDRESS_LOW) + 2'b01 : begin + writeBack_DBusSimplePlugin_rspShifted[7 : 0] = writeBack_MEMORY_READ_DATA[15 : 8]; + end + 2'b10 : begin + writeBack_DBusSimplePlugin_rspShifted[15 : 0] = writeBack_MEMORY_READ_DATA[31 : 16]; + end + 2'b11 : begin + writeBack_DBusSimplePlugin_rspShifted[7 : 0] = writeBack_MEMORY_READ_DATA[31 : 24]; + end + default : begin + end + endcase + end + + assign _zz_131_ = (writeBack_DBusSimplePlugin_rspShifted[7] && (! writeBack_INSTRUCTION[14])); + always @ (*) begin + _zz_132_[31] = _zz_131_; + _zz_132_[30] = _zz_131_; + _zz_132_[29] = _zz_131_; + _zz_132_[28] = _zz_131_; + _zz_132_[27] = _zz_131_; + _zz_132_[26] = _zz_131_; + _zz_132_[25] = _zz_131_; + _zz_132_[24] = _zz_131_; + _zz_132_[23] = _zz_131_; + _zz_132_[22] = _zz_131_; + _zz_132_[21] = _zz_131_; + _zz_132_[20] = _zz_131_; + _zz_132_[19] = _zz_131_; + _zz_132_[18] = _zz_131_; + _zz_132_[17] = _zz_131_; + _zz_132_[16] = _zz_131_; + _zz_132_[15] = _zz_131_; + _zz_132_[14] = _zz_131_; + _zz_132_[13] = _zz_131_; + _zz_132_[12] = _zz_131_; + _zz_132_[11] = _zz_131_; + _zz_132_[10] = _zz_131_; + _zz_132_[9] = _zz_131_; + _zz_132_[8] = _zz_131_; + _zz_132_[7 : 0] = writeBack_DBusSimplePlugin_rspShifted[7 : 0]; + end + + assign _zz_133_ = (writeBack_DBusSimplePlugin_rspShifted[15] && (! writeBack_INSTRUCTION[14])); + always @ (*) begin + _zz_134_[31] = _zz_133_; + _zz_134_[30] = _zz_133_; + _zz_134_[29] = _zz_133_; + _zz_134_[28] = _zz_133_; + _zz_134_[27] = _zz_133_; + _zz_134_[26] = _zz_133_; + _zz_134_[25] = _zz_133_; + _zz_134_[24] = _zz_133_; + _zz_134_[23] = _zz_133_; + _zz_134_[22] = _zz_133_; + _zz_134_[21] = _zz_133_; + _zz_134_[20] = _zz_133_; + _zz_134_[19] = _zz_133_; + _zz_134_[18] = _zz_133_; + _zz_134_[17] = _zz_133_; + _zz_134_[16] = _zz_133_; + _zz_134_[15 : 0] = writeBack_DBusSimplePlugin_rspShifted[15 : 0]; + end + + always @ (*) begin + case(_zz_253_) + 2'b00 : begin + writeBack_DBusSimplePlugin_rspFormated = _zz_132_; + end + 2'b01 : begin + writeBack_DBusSimplePlugin_rspFormated = _zz_134_; + end + default : begin + writeBack_DBusSimplePlugin_rspFormated = writeBack_DBusSimplePlugin_rspShifted; + end + endcase + end + + assign IBusCachedPlugin_mmuBus_rsp_physicalAddress = IBusCachedPlugin_mmuBus_cmd_virtualAddress; + assign IBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1; + assign IBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1; + assign IBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1; + assign IBusCachedPlugin_mmuBus_rsp_isIoAccess = IBusCachedPlugin_mmuBus_rsp_physicalAddress[31]; + assign IBusCachedPlugin_mmuBus_rsp_exception = 1'b0; + assign IBusCachedPlugin_mmuBus_rsp_refilling = 1'b0; + assign IBusCachedPlugin_mmuBus_busy = 1'b0; + assign DBusSimplePlugin_mmuBus_rsp_physicalAddress = DBusSimplePlugin_mmuBus_cmd_virtualAddress; + assign DBusSimplePlugin_mmuBus_rsp_allowRead = 1'b1; + assign DBusSimplePlugin_mmuBus_rsp_allowWrite = 1'b1; + assign DBusSimplePlugin_mmuBus_rsp_allowExecute = 1'b1; + assign DBusSimplePlugin_mmuBus_rsp_isIoAccess = DBusSimplePlugin_mmuBus_rsp_physicalAddress[31]; + assign DBusSimplePlugin_mmuBus_rsp_exception = 1'b0; + assign DBusSimplePlugin_mmuBus_rsp_refilling = 1'b0; + assign DBusSimplePlugin_mmuBus_busy = 1'b0; + assign _zz_136_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000000100)) == (32'b00000000000000000000000000000100)); + assign _zz_137_ = ((decode_INSTRUCTION & (32'b00000000000000000011000000000000)) == (32'b00000000000000000010000000000000)); + assign _zz_138_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001001000)) == (32'b00000000000000000000000001001000)); + assign _zz_139_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000000000)) == (32'b00000000000000000001000000000000)); + assign _zz_140_ = ((decode_INSTRUCTION & (32'b00000000000000000101000000000000)) == (32'b00000000000000000100000000000000)); + assign _zz_141_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001010000)) == (32'b00000000000000000100000001010000)); + assign _zz_135_ = {({_zz_140_,{_zz_137_,_zz_139_}} != (3'b000)),{({_zz_348_,_zz_141_} != (2'b00)),{({_zz_349_,_zz_350_} != (2'b00)),{(_zz_351_ != _zz_352_),{_zz_353_,{_zz_354_,_zz_355_}}}}}}; + assign _zz_78_ = ({((decode_INSTRUCTION & (32'b00000000000000000000000001011111)) == (32'b00000000000000000000000000010111)),{((decode_INSTRUCTION & (32'b00000000000000000000000001111111)) == (32'b00000000000000000000000001101111)),{((decode_INSTRUCTION & (32'b00000000000000000001000001101111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_487_) == (32'b00000000000000000001000001110011)),{(_zz_488_ == _zz_489_),{_zz_490_,{_zz_491_,_zz_492_}}}}}}} != (18'b000000000000000000)); + assign _zz_77_ = _zz_267_[0]; + assign _zz_76_ = _zz_268_[0]; + assign _zz_75_ = _zz_269_[0]; + assign _zz_74_ = _zz_270_[0]; + assign _zz_142_ = _zz_135_[5 : 4]; + assign _zz_73_ = _zz_142_; + assign _zz_143_ = _zz_135_[7 : 6]; + assign _zz_72_ = _zz_143_; + assign _zz_71_ = _zz_271_[0]; + assign _zz_144_ = _zz_135_[10 : 9]; + assign _zz_70_ = _zz_144_; + assign _zz_69_ = _zz_272_[0]; + assign _zz_145_ = _zz_135_[13 : 12]; + assign _zz_68_ = _zz_145_; + assign _zz_146_ = _zz_135_[14 : 14]; + assign _zz_67_ = _zz_146_; + assign _zz_66_ = _zz_273_[0]; + assign _zz_65_ = _zz_274_[0]; + assign _zz_64_ = _zz_275_[0]; + assign _zz_63_ = _zz_276_[0]; + assign _zz_62_ = _zz_277_[0]; + assign _zz_61_ = _zz_278_[0]; + assign _zz_60_ = _zz_279_[0]; + assign _zz_147_ = _zz_135_[23 : 22]; + assign _zz_59_ = _zz_147_; + assign _zz_58_ = _zz_280_[0]; + assign _zz_57_ = _zz_281_[0]; + assign _zz_148_ = _zz_135_[28 : 27]; + assign _zz_56_ = _zz_148_; + assign _zz_55_ = _zz_282_[0]; + assign decodeExceptionPort_valid = ((decode_arbitration_isValid && decode_INSTRUCTION_READY) && (! decode_LEGAL_INSTRUCTION)); + assign decodeExceptionPort_payload_code = (4'b0010); + assign decodeExceptionPort_payload_badAddr = decode_INSTRUCTION; + assign decode_RegFilePlugin_regFileReadAddress1 = decode_INSTRUCTION_ANTICIPATED[19 : 15]; + assign decode_RegFilePlugin_regFileReadAddress2 = decode_INSTRUCTION_ANTICIPATED[24 : 20]; + assign decode_RegFilePlugin_rs1Data = _zz_214_; + assign decode_RegFilePlugin_rs2Data = _zz_215_; + assign _zz_54_ = decode_RegFilePlugin_rs1Data; + assign _zz_53_ = decode_RegFilePlugin_rs2Data; + always @ (*) begin + lastStageRegFileWrite_valid = (_zz_51_ && writeBack_arbitration_isFiring); + if(_zz_149_)begin + lastStageRegFileWrite_valid = 1'b1; + end + end + + assign lastStageRegFileWrite_payload_address = _zz_50_[11 : 7]; + assign lastStageRegFileWrite_payload_data = _zz_79_; + always @ (*) begin + case(execute_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : begin + execute_IntAluPlugin_bitwise = (execute_SRC1 & execute_SRC2); + end + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : begin + execute_IntAluPlugin_bitwise = (execute_SRC1 | execute_SRC2); + end + default : begin + execute_IntAluPlugin_bitwise = (execute_SRC1 ^ execute_SRC2); + end + endcase + end + + always @ (*) begin + case(execute_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_BITWISE : begin + _zz_150_ = execute_IntAluPlugin_bitwise; + end + `AluCtrlEnum_defaultEncoding_SLT_SLTU : begin + _zz_150_ = {31'd0, _zz_283_}; + end + default : begin + _zz_150_ = execute_SRC_ADD_SUB; + end + endcase + end + + assign _zz_48_ = _zz_150_; + assign _zz_46_ = (decode_SRC_ADD_ZERO && (! decode_SRC_USE_SUB_LESS)); + always @ (*) begin + case(execute_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : begin + _zz_151_ = execute_RS1; + end + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : begin + _zz_151_ = {29'd0, _zz_284_}; + end + `Src1CtrlEnum_defaultEncoding_IMU : begin + _zz_151_ = {execute_INSTRUCTION[31 : 12],(12'b000000000000)}; + end + default : begin + _zz_151_ = {27'd0, _zz_285_}; + end + endcase + end + + assign _zz_45_ = _zz_151_; + assign _zz_152_ = _zz_286_[11]; + always @ (*) begin + _zz_153_[19] = _zz_152_; + _zz_153_[18] = _zz_152_; + _zz_153_[17] = _zz_152_; + _zz_153_[16] = _zz_152_; + _zz_153_[15] = _zz_152_; + _zz_153_[14] = _zz_152_; + _zz_153_[13] = _zz_152_; + _zz_153_[12] = _zz_152_; + _zz_153_[11] = _zz_152_; + _zz_153_[10] = _zz_152_; + _zz_153_[9] = _zz_152_; + _zz_153_[8] = _zz_152_; + _zz_153_[7] = _zz_152_; + _zz_153_[6] = _zz_152_; + _zz_153_[5] = _zz_152_; + _zz_153_[4] = _zz_152_; + _zz_153_[3] = _zz_152_; + _zz_153_[2] = _zz_152_; + _zz_153_[1] = _zz_152_; + _zz_153_[0] = _zz_152_; + end + + assign _zz_154_ = _zz_287_[11]; + always @ (*) begin + _zz_155_[19] = _zz_154_; + _zz_155_[18] = _zz_154_; + _zz_155_[17] = _zz_154_; + _zz_155_[16] = _zz_154_; + _zz_155_[15] = _zz_154_; + _zz_155_[14] = _zz_154_; + _zz_155_[13] = _zz_154_; + _zz_155_[12] = _zz_154_; + _zz_155_[11] = _zz_154_; + _zz_155_[10] = _zz_154_; + _zz_155_[9] = _zz_154_; + _zz_155_[8] = _zz_154_; + _zz_155_[7] = _zz_154_; + _zz_155_[6] = _zz_154_; + _zz_155_[5] = _zz_154_; + _zz_155_[4] = _zz_154_; + _zz_155_[3] = _zz_154_; + _zz_155_[2] = _zz_154_; + _zz_155_[1] = _zz_154_; + _zz_155_[0] = _zz_154_; + end + + always @ (*) begin + case(execute_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : begin + _zz_156_ = execute_RS2; + end + `Src2CtrlEnum_defaultEncoding_IMI : begin + _zz_156_ = {_zz_153_,execute_INSTRUCTION[31 : 20]}; + end + `Src2CtrlEnum_defaultEncoding_IMS : begin + _zz_156_ = {_zz_155_,{execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}}; + end + default : begin + _zz_156_ = _zz_41_; + end + endcase + end + + assign _zz_43_ = _zz_156_; + always @ (*) begin + execute_SrcPlugin_addSub = _zz_288_; + if(execute_SRC2_FORCE_ZERO)begin + execute_SrcPlugin_addSub = execute_SRC1; + end + end + + assign execute_SrcPlugin_less = ((execute_SRC1[31] == execute_SRC2[31]) ? execute_SrcPlugin_addSub[31] : (execute_SRC_LESS_UNSIGNED ? execute_SRC2[31] : execute_SRC1[31])); + assign _zz_40_ = execute_SrcPlugin_addSub; + assign _zz_39_ = execute_SrcPlugin_addSub; + assign _zz_38_ = execute_SrcPlugin_less; + assign execute_LightShifterPlugin_isShift = (execute_SHIFT_CTRL != `ShiftCtrlEnum_defaultEncoding_DISABLE_1); + assign execute_LightShifterPlugin_amplitude = (execute_LightShifterPlugin_isActive ? execute_LightShifterPlugin_amplitudeReg : execute_SRC2[4 : 0]); + assign execute_LightShifterPlugin_shiftInput = (execute_LightShifterPlugin_isActive ? memory_REGFILE_WRITE_DATA : execute_SRC1); + assign execute_LightShifterPlugin_done = (execute_LightShifterPlugin_amplitude[4 : 1] == (4'b0000)); + always @ (*) begin + case(execute_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_SLL_1 : begin + _zz_157_ = (execute_LightShifterPlugin_shiftInput <<< 1); + end + default : begin + _zz_157_ = _zz_295_; + end + endcase + end + + always @ (*) begin + _zz_158_ = 1'b0; + if(_zz_240_)begin + if(_zz_241_)begin + if(_zz_164_)begin + _zz_158_ = 1'b1; + end + end + end + if(_zz_242_)begin + if(_zz_243_)begin + if(_zz_166_)begin + _zz_158_ = 1'b1; + end + end + end + if(_zz_244_)begin + if(_zz_245_)begin + if(_zz_168_)begin + _zz_158_ = 1'b1; + end + end + end + if((! decode_RS1_USE))begin + _zz_158_ = 1'b0; + end + end + + always @ (*) begin + _zz_159_ = 1'b0; + if(_zz_240_)begin + if(_zz_241_)begin + if(_zz_165_)begin + _zz_159_ = 1'b1; + end + end + end + if(_zz_242_)begin + if(_zz_243_)begin + if(_zz_167_)begin + _zz_159_ = 1'b1; + end + end + end + if(_zz_244_)begin + if(_zz_245_)begin + if(_zz_169_)begin + _zz_159_ = 1'b1; + end + end + end + if((! decode_RS2_USE))begin + _zz_159_ = 1'b0; + end + end + + assign _zz_160_ = (_zz_51_ && writeBack_arbitration_isFiring); + assign _zz_164_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); + assign _zz_165_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); + assign _zz_166_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); + assign _zz_167_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); + assign _zz_168_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); + assign _zz_169_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); + assign _zz_34_ = IBusCachedPlugin_decodePrediction_cmd_hadBranch; + assign execute_BranchPlugin_eq = (execute_SRC1 == execute_SRC2); + assign _zz_170_ = execute_INSTRUCTION[14 : 12]; + always @ (*) begin + if((_zz_170_ == (3'b000))) begin + _zz_171_ = execute_BranchPlugin_eq; + end else if((_zz_170_ == (3'b001))) begin + _zz_171_ = (! execute_BranchPlugin_eq); + end else if((((_zz_170_ & (3'b101)) == (3'b101)))) begin + _zz_171_ = (! execute_SRC_LESS); + end else begin + _zz_171_ = execute_SRC_LESS; + end + end + + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : begin + _zz_172_ = 1'b0; + end + `BranchCtrlEnum_defaultEncoding_JAL : begin + _zz_172_ = 1'b1; + end + `BranchCtrlEnum_defaultEncoding_JALR : begin + _zz_172_ = 1'b1; + end + default : begin + _zz_172_ = _zz_171_; + end + endcase + end + + assign _zz_33_ = _zz_172_; + assign _zz_173_ = _zz_297_[11]; + always @ (*) begin + _zz_174_[19] = _zz_173_; + _zz_174_[18] = _zz_173_; + _zz_174_[17] = _zz_173_; + _zz_174_[16] = _zz_173_; + _zz_174_[15] = _zz_173_; + _zz_174_[14] = _zz_173_; + _zz_174_[13] = _zz_173_; + _zz_174_[12] = _zz_173_; + _zz_174_[11] = _zz_173_; + _zz_174_[10] = _zz_173_; + _zz_174_[9] = _zz_173_; + _zz_174_[8] = _zz_173_; + _zz_174_[7] = _zz_173_; + _zz_174_[6] = _zz_173_; + _zz_174_[5] = _zz_173_; + _zz_174_[4] = _zz_173_; + _zz_174_[3] = _zz_173_; + _zz_174_[2] = _zz_173_; + _zz_174_[1] = _zz_173_; + _zz_174_[0] = _zz_173_; + end + + assign _zz_175_ = _zz_298_[19]; + always @ (*) begin + _zz_176_[10] = _zz_175_; + _zz_176_[9] = _zz_175_; + _zz_176_[8] = _zz_175_; + _zz_176_[7] = _zz_175_; + _zz_176_[6] = _zz_175_; + _zz_176_[5] = _zz_175_; + _zz_176_[4] = _zz_175_; + _zz_176_[3] = _zz_175_; + _zz_176_[2] = _zz_175_; + _zz_176_[1] = _zz_175_; + _zz_176_[0] = _zz_175_; + end + + assign _zz_177_ = _zz_299_[11]; + always @ (*) begin + _zz_178_[18] = _zz_177_; + _zz_178_[17] = _zz_177_; + _zz_178_[16] = _zz_177_; + _zz_178_[15] = _zz_177_; + _zz_178_[14] = _zz_177_; + _zz_178_[13] = _zz_177_; + _zz_178_[12] = _zz_177_; + _zz_178_[11] = _zz_177_; + _zz_178_[10] = _zz_177_; + _zz_178_[9] = _zz_177_; + _zz_178_[8] = _zz_177_; + _zz_178_[7] = _zz_177_; + _zz_178_[6] = _zz_177_; + _zz_178_[5] = _zz_177_; + _zz_178_[4] = _zz_177_; + _zz_178_[3] = _zz_177_; + _zz_178_[2] = _zz_177_; + _zz_178_[1] = _zz_177_; + _zz_178_[0] = _zz_177_; + end + + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_JALR : begin + _zz_179_ = (_zz_300_[1] ^ execute_RS1[1]); + end + `BranchCtrlEnum_defaultEncoding_JAL : begin + _zz_179_ = _zz_301_[1]; + end + default : begin + _zz_179_ = _zz_302_[1]; + end + endcase + end + + assign execute_BranchPlugin_missAlignedTarget = (execute_BRANCH_COND_RESULT && _zz_179_); + assign _zz_31_ = ((execute_PREDICTION_HAD_BRANCHED2 != execute_BRANCH_COND_RESULT) || execute_BranchPlugin_missAlignedTarget); + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_JALR : begin + execute_BranchPlugin_branch_src1 = execute_RS1; + end + default : begin + execute_BranchPlugin_branch_src1 = execute_PC; + end + endcase + end + + assign _zz_180_ = _zz_303_[11]; + always @ (*) begin + _zz_181_[19] = _zz_180_; + _zz_181_[18] = _zz_180_; + _zz_181_[17] = _zz_180_; + _zz_181_[16] = _zz_180_; + _zz_181_[15] = _zz_180_; + _zz_181_[14] = _zz_180_; + _zz_181_[13] = _zz_180_; + _zz_181_[12] = _zz_180_; + _zz_181_[11] = _zz_180_; + _zz_181_[10] = _zz_180_; + _zz_181_[9] = _zz_180_; + _zz_181_[8] = _zz_180_; + _zz_181_[7] = _zz_180_; + _zz_181_[6] = _zz_180_; + _zz_181_[5] = _zz_180_; + _zz_181_[4] = _zz_180_; + _zz_181_[3] = _zz_180_; + _zz_181_[2] = _zz_180_; + _zz_181_[1] = _zz_180_; + _zz_181_[0] = _zz_180_; + end + + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_JALR : begin + execute_BranchPlugin_branch_src2 = {_zz_181_,execute_INSTRUCTION[31 : 20]}; + end + default : begin + execute_BranchPlugin_branch_src2 = ((execute_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) ? {{_zz_183_,{{{_zz_504_,execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0} : {{_zz_185_,{{{_zz_505_,_zz_506_},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0}); + if(execute_PREDICTION_HAD_BRANCHED2)begin + execute_BranchPlugin_branch_src2 = {29'd0, _zz_306_}; + end + end + endcase + end + + assign _zz_182_ = _zz_304_[19]; + always @ (*) begin + _zz_183_[10] = _zz_182_; + _zz_183_[9] = _zz_182_; + _zz_183_[8] = _zz_182_; + _zz_183_[7] = _zz_182_; + _zz_183_[6] = _zz_182_; + _zz_183_[5] = _zz_182_; + _zz_183_[4] = _zz_182_; + _zz_183_[3] = _zz_182_; + _zz_183_[2] = _zz_182_; + _zz_183_[1] = _zz_182_; + _zz_183_[0] = _zz_182_; + end + + assign _zz_184_ = _zz_305_[11]; + always @ (*) begin + _zz_185_[18] = _zz_184_; + _zz_185_[17] = _zz_184_; + _zz_185_[16] = _zz_184_; + _zz_185_[15] = _zz_184_; + _zz_185_[14] = _zz_184_; + _zz_185_[13] = _zz_184_; + _zz_185_[12] = _zz_184_; + _zz_185_[11] = _zz_184_; + _zz_185_[10] = _zz_184_; + _zz_185_[9] = _zz_184_; + _zz_185_[8] = _zz_184_; + _zz_185_[7] = _zz_184_; + _zz_185_[6] = _zz_184_; + _zz_185_[5] = _zz_184_; + _zz_185_[4] = _zz_184_; + _zz_185_[3] = _zz_184_; + _zz_185_[2] = _zz_184_; + _zz_185_[1] = _zz_184_; + _zz_185_[0] = _zz_184_; + end + + assign execute_BranchPlugin_branchAdder = (execute_BranchPlugin_branch_src1 + execute_BranchPlugin_branch_src2); + assign _zz_30_ = {execute_BranchPlugin_branchAdder[31 : 1],(1'b0)}; + assign BranchPlugin_jumpInterface_valid = ((memory_arbitration_isValid && memory_BRANCH_DO) && (! 1'b0)); + assign BranchPlugin_jumpInterface_payload = memory_BRANCH_CALC; + assign BranchPlugin_branchExceptionPort_valid = (memory_arbitration_isValid && (memory_BRANCH_DO && memory_BRANCH_CALC[1])); + assign BranchPlugin_branchExceptionPort_payload_code = (4'b0000); + assign BranchPlugin_branchExceptionPort_payload_badAddr = memory_BRANCH_CALC; + assign IBusCachedPlugin_decodePrediction_rsp_wasWrong = BranchPlugin_jumpInterface_valid; + always @ (*) begin + CsrPlugin_privilege = (2'b11); + if(CsrPlugin_forceMachineWire)begin + CsrPlugin_privilege = (2'b11); + end + end + + assign CsrPlugin_misa_base = (2'b01); + assign CsrPlugin_misa_extensions = (26'b00000000000000000001000010); + assign _zz_186_ = (CsrPlugin_mip_MTIP && CsrPlugin_mie_MTIE); + assign _zz_187_ = (CsrPlugin_mip_MSIP && CsrPlugin_mie_MSIE); + assign _zz_188_ = (CsrPlugin_mip_MEIP && CsrPlugin_mie_MEIE); + assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b11); + assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege = ((CsrPlugin_privilege < CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped) ? CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped : CsrPlugin_privilege); + assign _zz_189_ = {decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid}; + assign _zz_190_ = _zz_307_[0]; + assign _zz_191_ = {BranchPlugin_branchExceptionPort_valid,DBusSimplePlugin_memoryExceptionPort_valid}; + assign _zz_192_ = _zz_309_[0]; + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_decode = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; + if(_zz_229_)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b1; + end + if(decode_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b0; + end + end + + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_execute = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; + if(execute_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_execute = 1'b0; + end + end + + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_memory = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; + if(_zz_233_)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b1; + end + if(memory_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b0; + end + end + + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; + if(writeBack_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = 1'b0; + end + end + + assign CsrPlugin_exceptionPendings_0 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; + assign CsrPlugin_exceptionPendings_1 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; + assign CsrPlugin_exceptionPendings_2 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; + assign CsrPlugin_exceptionPendings_3 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; + assign CsrPlugin_exception = (CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack && CsrPlugin_allowException); + assign CsrPlugin_lastStageWasWfi = 1'b0; + always @ (*) begin + CsrPlugin_pipelineLiberator_done = ((! ({writeBack_arbitration_isValid,{memory_arbitration_isValid,execute_arbitration_isValid}} != (3'b000))) && IBusCachedPlugin_pcValids_3); + if(({CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory,CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute}} != (3'b000)))begin + CsrPlugin_pipelineLiberator_done = 1'b0; + end + if(CsrPlugin_hadException)begin + CsrPlugin_pipelineLiberator_done = 1'b0; + end + end + + assign CsrPlugin_interruptJump = ((CsrPlugin_interrupt_valid && CsrPlugin_pipelineLiberator_done) && CsrPlugin_allowInterrupts); + always @ (*) begin + CsrPlugin_targetPrivilege = CsrPlugin_interrupt_targetPrivilege; + if(CsrPlugin_hadException)begin + CsrPlugin_targetPrivilege = CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; + end + end + + always @ (*) begin + CsrPlugin_trapCause = CsrPlugin_interrupt_code; + if(CsrPlugin_hadException)begin + CsrPlugin_trapCause = CsrPlugin_exceptionPortCtrl_exceptionContext_code; + end + end + + always @ (*) begin + CsrPlugin_xtvec_mode = (2'bxx); + case(CsrPlugin_targetPrivilege) + 2'b11 : begin + CsrPlugin_xtvec_mode = CsrPlugin_mtvec_mode; + end + default : begin + end + endcase + end + + always @ (*) begin + CsrPlugin_xtvec_base = (30'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + case(CsrPlugin_targetPrivilege) + 2'b11 : begin + CsrPlugin_xtvec_base = CsrPlugin_mtvec_base; + end + default : begin + end + endcase + end + + assign contextSwitching = CsrPlugin_jumpInterface_valid; + assign _zz_28_ = (! (((decode_INSTRUCTION[14 : 13] == (2'b01)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))) || ((decode_INSTRUCTION[14 : 13] == (2'b11)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))))); + assign _zz_27_ = (decode_INSTRUCTION[13 : 7] != (7'b0100000)); + assign execute_CsrPlugin_inWfi = 1'b0; + assign execute_CsrPlugin_blockedBySideEffects = ({writeBack_arbitration_isValid,memory_arbitration_isValid} != (2'b00)); + always @ (*) begin + execute_CsrPlugin_illegalAccess = 1'b1; + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001100000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001101000001 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001100000101 : begin + if(execute_CSR_WRITE_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b001101000100 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001101000011 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b111111000000 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b001100000100 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001101000010 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + default : begin + end + endcase + if((CsrPlugin_privilege < execute_CsrPlugin_csrAddress[9 : 8]))begin + execute_CsrPlugin_illegalAccess = 1'b1; + end + if(((! execute_arbitration_isValid) || (! execute_IS_CSR)))begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + + always @ (*) begin + execute_CsrPlugin_illegalInstruction = 1'b0; + if((execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)))begin + if((CsrPlugin_privilege < execute_INSTRUCTION[29 : 28]))begin + execute_CsrPlugin_illegalInstruction = 1'b1; + end + end + end + + always @ (*) begin + execute_CsrPlugin_readData = (32'b00000000000000000000000000000000); + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + execute_CsrPlugin_readData[31 : 0] = _zz_200_; + end + 12'b001100000000 : begin + execute_CsrPlugin_readData[12 : 11] = CsrPlugin_mstatus_MPP; + execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mstatus_MPIE; + execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mstatus_MIE; + end + 12'b001101000001 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mepc; + end + 12'b001100000101 : begin + end + 12'b001101000100 : begin + execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mip_MEIP; + execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mip_MTIP; + execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mip_MSIP; + end + 12'b001101000011 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mtval; + end + 12'b111111000000 : begin + execute_CsrPlugin_readData[31 : 0] = _zz_201_; + end + 12'b001100000100 : begin + execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mie_MEIE; + execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mie_MTIE; + execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mie_MSIE; + end + 12'b001101000010 : begin + execute_CsrPlugin_readData[31 : 31] = CsrPlugin_mcause_interrupt; + execute_CsrPlugin_readData[3 : 0] = CsrPlugin_mcause_exceptionCode; + end + default : begin + end + endcase + end + + assign execute_CsrPlugin_writeInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_WRITE_OPCODE); + assign execute_CsrPlugin_readInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_READ_OPCODE); + assign execute_CsrPlugin_writeEnable = ((execute_CsrPlugin_writeInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); + assign execute_CsrPlugin_readEnable = ((execute_CsrPlugin_readInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); + assign execute_CsrPlugin_readToWriteData = execute_CsrPlugin_readData; + always @ (*) begin + case(_zz_254_) + 1'b0 : begin + execute_CsrPlugin_writeData = execute_SRC1; + end + default : begin + execute_CsrPlugin_writeData = (execute_INSTRUCTION[12] ? (execute_CsrPlugin_readToWriteData & (~ execute_SRC1)) : (execute_CsrPlugin_readToWriteData | execute_SRC1)); + end + endcase + end + + assign execute_CsrPlugin_csrAddress = execute_INSTRUCTION[31 : 20]; + always @ (*) begin + memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b0; + if(_zz_217_)begin + if(_zz_231_)begin + memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b1; + end + end + end + + always @ (*) begin + memory_MulDivIterativePlugin_mul_counter_willClear = 1'b0; + if((! memory_arbitration_isStuck))begin + memory_MulDivIterativePlugin_mul_counter_willClear = 1'b1; + end + end + + assign memory_MulDivIterativePlugin_mul_willOverflowIfInc = (memory_MulDivIterativePlugin_mul_counter_value == (6'b100000)); + assign memory_MulDivIterativePlugin_mul_counter_willOverflow = (memory_MulDivIterativePlugin_mul_willOverflowIfInc && memory_MulDivIterativePlugin_mul_counter_willIncrement); + always @ (*) begin + if(memory_MulDivIterativePlugin_mul_counter_willOverflow)begin + memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); + end else begin + memory_MulDivIterativePlugin_mul_counter_valueNext = (memory_MulDivIterativePlugin_mul_counter_value + _zz_312_); + end + if(memory_MulDivIterativePlugin_mul_counter_willClear)begin + memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); + end + end + + always @ (*) begin + memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b0; + if(_zz_218_)begin + if(_zz_232_)begin + memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b1; + end + end + end + + always @ (*) begin + memory_MulDivIterativePlugin_div_counter_willClear = 1'b0; + if(_zz_246_)begin + memory_MulDivIterativePlugin_div_counter_willClear = 1'b1; + end + end + + assign memory_MulDivIterativePlugin_div_counter_willOverflowIfInc = (memory_MulDivIterativePlugin_div_counter_value == (6'b100001)); + assign memory_MulDivIterativePlugin_div_counter_willOverflow = (memory_MulDivIterativePlugin_div_counter_willOverflowIfInc && memory_MulDivIterativePlugin_div_counter_willIncrement); + always @ (*) begin + if(memory_MulDivIterativePlugin_div_counter_willOverflow)begin + memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); + end else begin + memory_MulDivIterativePlugin_div_counter_valueNext = (memory_MulDivIterativePlugin_div_counter_value + _zz_320_); + end + if(memory_MulDivIterativePlugin_div_counter_willClear)begin + memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); + end + end + + assign _zz_193_ = memory_MulDivIterativePlugin_rs1[31 : 0]; + assign _zz_194_ = {memory_MulDivIterativePlugin_accumulator[31 : 0],_zz_193_[31]}; + assign _zz_195_ = (_zz_194_ - _zz_321_); + assign _zz_196_ = (memory_INSTRUCTION[13] ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_rs1[31 : 0]); + assign _zz_197_ = (execute_RS2[31] && execute_IS_RS2_SIGNED); + assign _zz_198_ = ((execute_IS_MUL && _zz_197_) || ((execute_IS_DIV && execute_RS1[31]) && execute_IS_RS1_SIGNED)); + always @ (*) begin + _zz_199_[32] = (execute_IS_RS1_SIGNED && execute_RS1[31]); + _zz_199_[31 : 0] = execute_RS1; + end + + assign _zz_201_ = (_zz_200_ & externalInterruptArray_regNext); + assign externalInterrupt = (_zz_201_ != (32'b00000000000000000000000000000000)); + assign _zz_24_ = decode_SHIFT_CTRL; + assign _zz_22_ = _zz_73_; + assign _zz_37_ = decode_to_execute_SHIFT_CTRL; + assign _zz_21_ = decode_ENV_CTRL; + assign _zz_18_ = execute_ENV_CTRL; + assign _zz_16_ = memory_ENV_CTRL; + assign _zz_19_ = _zz_67_; + assign _zz_26_ = decode_to_execute_ENV_CTRL; + assign _zz_25_ = execute_to_memory_ENV_CTRL; + assign _zz_29_ = memory_to_writeBack_ENV_CTRL; + assign _zz_14_ = decode_SRC1_CTRL; + assign _zz_12_ = _zz_56_; + assign _zz_44_ = decode_to_execute_SRC1_CTRL; + assign _zz_11_ = decode_BRANCH_CTRL; + assign _zz_95_ = _zz_68_; + assign _zz_32_ = decode_to_execute_BRANCH_CTRL; + assign _zz_9_ = decode_SRC2_CTRL; + assign _zz_7_ = _zz_59_; + assign _zz_42_ = decode_to_execute_SRC2_CTRL; + assign _zz_6_ = decode_ALU_BITWISE_CTRL; + assign _zz_4_ = _zz_70_; + assign _zz_49_ = decode_to_execute_ALU_BITWISE_CTRL; + assign _zz_3_ = decode_ALU_CTRL; + assign _zz_1_ = _zz_72_; + assign _zz_47_ = decode_to_execute_ALU_CTRL; + assign decode_arbitration_isFlushed = (({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,execute_arbitration_flushNext}} != (3'b000)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,{execute_arbitration_flushIt,decode_arbitration_flushIt}}} != (4'b0000))); + assign execute_arbitration_isFlushed = (({writeBack_arbitration_flushNext,memory_arbitration_flushNext} != (2'b00)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,execute_arbitration_flushIt}} != (3'b000))); + assign memory_arbitration_isFlushed = ((writeBack_arbitration_flushNext != (1'b0)) || ({writeBack_arbitration_flushIt,memory_arbitration_flushIt} != (2'b00))); + assign writeBack_arbitration_isFlushed = (1'b0 || (writeBack_arbitration_flushIt != (1'b0))); + assign decode_arbitration_isStuckByOthers = (decode_arbitration_haltByOther || (((1'b0 || execute_arbitration_isStuck) || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); + assign decode_arbitration_isStuck = (decode_arbitration_haltItself || decode_arbitration_isStuckByOthers); + assign decode_arbitration_isMoving = ((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)); + assign decode_arbitration_isFiring = ((decode_arbitration_isValid && (! decode_arbitration_isStuck)) && (! decode_arbitration_removeIt)); + assign execute_arbitration_isStuckByOthers = (execute_arbitration_haltByOther || ((1'b0 || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); + assign execute_arbitration_isStuck = (execute_arbitration_haltItself || execute_arbitration_isStuckByOthers); + assign execute_arbitration_isMoving = ((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)); + assign execute_arbitration_isFiring = ((execute_arbitration_isValid && (! execute_arbitration_isStuck)) && (! execute_arbitration_removeIt)); + assign memory_arbitration_isStuckByOthers = (memory_arbitration_haltByOther || (1'b0 || writeBack_arbitration_isStuck)); + assign memory_arbitration_isStuck = (memory_arbitration_haltItself || memory_arbitration_isStuckByOthers); + assign memory_arbitration_isMoving = ((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)); + assign memory_arbitration_isFiring = ((memory_arbitration_isValid && (! memory_arbitration_isStuck)) && (! memory_arbitration_removeIt)); + assign writeBack_arbitration_isStuckByOthers = (writeBack_arbitration_haltByOther || 1'b0); + assign writeBack_arbitration_isStuck = (writeBack_arbitration_haltItself || writeBack_arbitration_isStuckByOthers); + assign writeBack_arbitration_isMoving = ((! writeBack_arbitration_isStuck) && (! writeBack_arbitration_removeIt)); + assign writeBack_arbitration_isFiring = ((writeBack_arbitration_isValid && (! writeBack_arbitration_isStuck)) && (! writeBack_arbitration_removeIt)); + assign iBusWishbone_ADR = {_zz_340_,_zz_202_}; + assign iBusWishbone_CTI = ((_zz_202_ == (3'b111)) ? (3'b111) : (3'b010)); + assign iBusWishbone_BTE = (2'b00); + assign iBusWishbone_SEL = (4'b1111); + assign iBusWishbone_WE = 1'b0; + assign iBusWishbone_DAT_MOSI = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + always @ (*) begin + iBusWishbone_CYC = 1'b0; + if(_zz_247_)begin + iBusWishbone_CYC = 1'b1; + end + end + + always @ (*) begin + iBusWishbone_STB = 1'b0; + if(_zz_247_)begin + iBusWishbone_STB = 1'b1; + end + end + + assign iBus_cmd_ready = (iBus_cmd_valid && iBusWishbone_ACK); + assign iBus_rsp_valid = _zz_203_; + assign iBus_rsp_payload_data = iBusWishbone_DAT_MISO_regNext; + assign iBus_rsp_payload_error = 1'b0; + assign dBus_cmd_halfPipe_valid = dBus_cmd_halfPipe_regs_valid; + assign dBus_cmd_halfPipe_payload_wr = dBus_cmd_halfPipe_regs_payload_wr; + assign dBus_cmd_halfPipe_payload_address = dBus_cmd_halfPipe_regs_payload_address; + assign dBus_cmd_halfPipe_payload_data = dBus_cmd_halfPipe_regs_payload_data; + assign dBus_cmd_halfPipe_payload_size = dBus_cmd_halfPipe_regs_payload_size; + assign dBus_cmd_ready = dBus_cmd_halfPipe_regs_ready; + assign dBusWishbone_ADR = (dBus_cmd_halfPipe_payload_address >>> 2); + assign dBusWishbone_CTI = (3'b000); + assign dBusWishbone_BTE = (2'b00); + always @ (*) begin + case(dBus_cmd_halfPipe_payload_size) + 2'b00 : begin + _zz_204_ = (4'b0001); + end + 2'b01 : begin + _zz_204_ = (4'b0011); + end + default : begin + _zz_204_ = (4'b1111); + end + endcase + end + + always @ (*) begin + dBusWishbone_SEL = _zz_341_[3:0]; + if((! dBus_cmd_halfPipe_payload_wr))begin + dBusWishbone_SEL = (4'b1111); + end + end + + assign dBusWishbone_WE = dBus_cmd_halfPipe_payload_wr; + assign dBusWishbone_DAT_MOSI = dBus_cmd_halfPipe_payload_data; + assign dBus_cmd_halfPipe_ready = (dBus_cmd_halfPipe_valid && dBusWishbone_ACK); + assign dBusWishbone_CYC = dBus_cmd_halfPipe_valid; + assign dBusWishbone_STB = dBus_cmd_halfPipe_valid; + assign dBus_rsp_ready = ((dBus_cmd_halfPipe_valid && (! dBusWishbone_WE)) && dBusWishbone_ACK); + assign dBus_rsp_data = dBusWishbone_DAT_MISO; + assign dBus_rsp_error = 1'b0; + always @ (posedge clk) begin + if(reset) begin + IBusCachedPlugin_fetchPc_pcReg <= externalResetVector; + IBusCachedPlugin_fetchPc_booted <= 1'b0; + IBusCachedPlugin_fetchPc_inc <= 1'b0; + _zz_112_ <= 1'b0; + _zz_114_ <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; + IBusCachedPlugin_injector_decodeRemoved <= 1'b0; + IBusCachedPlugin_rspCounter <= _zz_127_; + IBusCachedPlugin_rspCounter <= (32'b00000000000000000000000000000000); + _zz_149_ <= 1'b1; + execute_LightShifterPlugin_isActive <= 1'b0; + _zz_161_ <= 1'b0; + CsrPlugin_mstatus_MIE <= 1'b0; + CsrPlugin_mstatus_MPIE <= 1'b0; + CsrPlugin_mstatus_MPP <= (2'b11); + CsrPlugin_mie_MEIE <= 1'b0; + CsrPlugin_mie_MTIE <= 1'b0; + CsrPlugin_mie_MSIE <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; + CsrPlugin_interrupt_valid <= 1'b0; + CsrPlugin_hadException <= 1'b0; + execute_CsrPlugin_wfiWake <= 1'b0; + memory_MulDivIterativePlugin_mul_counter_value <= (6'b000000); + memory_MulDivIterativePlugin_div_counter_value <= (6'b000000); + _zz_200_ <= (32'b00000000000000000000000000000000); + execute_arbitration_isValid <= 1'b0; + memory_arbitration_isValid <= 1'b0; + writeBack_arbitration_isValid <= 1'b0; + memory_to_writeBack_REGFILE_WRITE_DATA <= (32'b00000000000000000000000000000000); + memory_to_writeBack_INSTRUCTION <= (32'b00000000000000000000000000000000); + _zz_202_ <= (3'b000); + _zz_203_ <= 1'b0; + dBus_cmd_halfPipe_regs_valid <= 1'b0; + dBus_cmd_halfPipe_regs_ready <= 1'b1; + end else begin + IBusCachedPlugin_fetchPc_booted <= 1'b1; + if((IBusCachedPlugin_fetchPc_corrected || IBusCachedPlugin_fetchPc_pcRegPropagate))begin + IBusCachedPlugin_fetchPc_inc <= 1'b0; + end + if((IBusCachedPlugin_fetchPc_output_valid && IBusCachedPlugin_fetchPc_output_ready))begin + IBusCachedPlugin_fetchPc_inc <= 1'b1; + end + if(((! IBusCachedPlugin_fetchPc_output_valid) && IBusCachedPlugin_fetchPc_output_ready))begin + IBusCachedPlugin_fetchPc_inc <= 1'b0; + end + if((IBusCachedPlugin_fetchPc_booted && ((IBusCachedPlugin_fetchPc_output_ready || IBusCachedPlugin_fetcherflushIt) || IBusCachedPlugin_fetchPc_pcRegPropagate)))begin + IBusCachedPlugin_fetchPc_pcReg <= IBusCachedPlugin_fetchPc_pc; + end + if(IBusCachedPlugin_fetcherflushIt)begin + _zz_112_ <= 1'b0; + end + if(_zz_110_)begin + _zz_112_ <= IBusCachedPlugin_iBusRsp_stages_0_output_valid; + end + if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin + _zz_114_ <= IBusCachedPlugin_iBusRsp_stages_1_output_valid; + end + if(IBusCachedPlugin_fetcherflushIt)begin + _zz_114_ <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; + end + if((! (! IBusCachedPlugin_iBusRsp_stages_1_input_ready)))begin + IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b1; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; + end + if((! (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)))begin + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= IBusCachedPlugin_injector_nextPcCalc_valids_0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; + end + if((! execute_arbitration_isStuck))begin + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= IBusCachedPlugin_injector_nextPcCalc_valids_1; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; + end + if((! memory_arbitration_isStuck))begin + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= IBusCachedPlugin_injector_nextPcCalc_valids_2; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; + end + if((! writeBack_arbitration_isStuck))begin + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= IBusCachedPlugin_injector_nextPcCalc_valids_3; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; + end + if(decode_arbitration_removeIt)begin + IBusCachedPlugin_injector_decodeRemoved <= 1'b1; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_decodeRemoved <= 1'b0; + end + if(iBus_rsp_valid)begin + IBusCachedPlugin_rspCounter <= (IBusCachedPlugin_rspCounter + (32'b00000000000000000000000000000001)); + end + _zz_149_ <= 1'b0; + if(_zz_223_)begin + if(_zz_230_)begin + execute_LightShifterPlugin_isActive <= 1'b1; + if(execute_LightShifterPlugin_done)begin + execute_LightShifterPlugin_isActive <= 1'b0; + end + end + end + if(execute_arbitration_removeIt)begin + execute_LightShifterPlugin_isActive <= 1'b0; + end + _zz_161_ <= _zz_160_; + if((! decode_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= CsrPlugin_exceptionPortCtrl_exceptionValids_decode; + end + if((! execute_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= (CsrPlugin_exceptionPortCtrl_exceptionValids_decode && (! decode_arbitration_isStuck)); + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= CsrPlugin_exceptionPortCtrl_exceptionValids_execute; + end + if((! memory_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= (CsrPlugin_exceptionPortCtrl_exceptionValids_execute && (! execute_arbitration_isStuck)); + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= CsrPlugin_exceptionPortCtrl_exceptionValids_memory; + end + if((! writeBack_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= (CsrPlugin_exceptionPortCtrl_exceptionValids_memory && (! memory_arbitration_isStuck)); + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; + end + CsrPlugin_interrupt_valid <= 1'b0; + if(_zz_248_)begin + if(_zz_249_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_250_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_251_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + end + CsrPlugin_hadException <= CsrPlugin_exception; + if(_zz_234_)begin + case(CsrPlugin_targetPrivilege) + 2'b11 : begin + CsrPlugin_mstatus_MIE <= 1'b0; + CsrPlugin_mstatus_MPIE <= CsrPlugin_mstatus_MIE; + CsrPlugin_mstatus_MPP <= CsrPlugin_privilege; + end + default : begin + end + endcase + end + if(_zz_235_)begin + case(_zz_236_) + 2'b11 : begin + CsrPlugin_mstatus_MPP <= (2'b00); + CsrPlugin_mstatus_MIE <= CsrPlugin_mstatus_MPIE; + CsrPlugin_mstatus_MPIE <= 1'b1; + end + default : begin + end + endcase + end + execute_CsrPlugin_wfiWake <= ({_zz_188_,{_zz_187_,_zz_186_}} != (3'b000)); + memory_MulDivIterativePlugin_mul_counter_value <= memory_MulDivIterativePlugin_mul_counter_valueNext; + memory_MulDivIterativePlugin_div_counter_value <= memory_MulDivIterativePlugin_div_counter_valueNext; + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_INSTRUCTION <= memory_INSTRUCTION; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_REGFILE_WRITE_DATA <= _zz_35_; + end + if(((! execute_arbitration_isStuck) || execute_arbitration_removeIt))begin + execute_arbitration_isValid <= 1'b0; + end + if(((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)))begin + execute_arbitration_isValid <= decode_arbitration_isValid; + end + if(((! memory_arbitration_isStuck) || memory_arbitration_removeIt))begin + memory_arbitration_isValid <= 1'b0; + end + if(((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)))begin + memory_arbitration_isValid <= execute_arbitration_isValid; + end + if(((! writeBack_arbitration_isStuck) || writeBack_arbitration_removeIt))begin + writeBack_arbitration_isValid <= 1'b0; + end + if(((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)))begin + writeBack_arbitration_isValid <= memory_arbitration_isValid; + end + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + if(execute_CsrPlugin_writeEnable)begin + _zz_200_ <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b001100000000 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mstatus_MPP <= execute_CsrPlugin_writeData[12 : 11]; + CsrPlugin_mstatus_MPIE <= _zz_334_[0]; + CsrPlugin_mstatus_MIE <= _zz_335_[0]; + end + end + 12'b001101000001 : begin + end + 12'b001100000101 : begin + end + 12'b001101000100 : begin + end + 12'b001101000011 : begin + end + 12'b111111000000 : begin + end + 12'b001100000100 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mie_MEIE <= _zz_337_[0]; + CsrPlugin_mie_MTIE <= _zz_338_[0]; + CsrPlugin_mie_MSIE <= _zz_339_[0]; + end + end + 12'b001101000010 : begin + end + default : begin + end + endcase + if(_zz_247_)begin + if(iBusWishbone_ACK)begin + _zz_202_ <= (_zz_202_ + (3'b001)); + end + end + _zz_203_ <= (iBusWishbone_CYC && iBusWishbone_ACK); + if(_zz_252_)begin + dBus_cmd_halfPipe_regs_valid <= dBus_cmd_valid; + dBus_cmd_halfPipe_regs_ready <= (! dBus_cmd_valid); + end else begin + dBus_cmd_halfPipe_regs_valid <= (! dBus_cmd_halfPipe_ready); + dBus_cmd_halfPipe_regs_ready <= dBus_cmd_halfPipe_ready; + end + end + end + + always @ (posedge clk) begin + if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin + _zz_115_ <= IBusCachedPlugin_iBusRsp_stages_1_output_payload; + end + if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin + IBusCachedPlugin_s1_tightlyCoupledHit <= IBusCachedPlugin_s0_tightlyCoupledHit; + end + if(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)begin + IBusCachedPlugin_s2_tightlyCoupledHit <= IBusCachedPlugin_s1_tightlyCoupledHit; + end + if(!(! (((dBus_rsp_ready && memory_MEMORY_ENABLE) && memory_arbitration_isValid) && memory_arbitration_isStuck))) begin + $display("ERROR DBusSimplePlugin doesn't allow memory stage stall when read happend"); + end + if(!(! (((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE) && (! writeBack_MEMORY_STORE)) && writeBack_arbitration_isStuck))) begin + $display("ERROR DBusSimplePlugin doesn't allow writeback stage stall when read happend"); + end + if(_zz_223_)begin + if(_zz_230_)begin + execute_LightShifterPlugin_amplitudeReg <= (execute_LightShifterPlugin_amplitude - (5'b00001)); + end + end + if(_zz_160_)begin + _zz_162_ <= _zz_50_[11 : 7]; + _zz_163_ <= _zz_79_; + end + CsrPlugin_mip_MEIP <= externalInterrupt; + CsrPlugin_mip_MTIP <= timerInterrupt; + CsrPlugin_mip_MSIP <= softwareInterrupt; + CsrPlugin_mcycle <= (CsrPlugin_mcycle + (64'b0000000000000000000000000000000000000000000000000000000000000001)); + if(writeBack_arbitration_isFiring)begin + CsrPlugin_minstret <= (CsrPlugin_minstret + (64'b0000000000000000000000000000000000000000000000000000000000000001)); + end + if(_zz_229_)begin + CsrPlugin_exceptionPortCtrl_exceptionContext_code <= (_zz_190_ ? IBusCachedPlugin_decodeExceptionPort_payload_code : decodeExceptionPort_payload_code); + CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= (_zz_190_ ? IBusCachedPlugin_decodeExceptionPort_payload_badAddr : decodeExceptionPort_payload_badAddr); + end + if(_zz_233_)begin + CsrPlugin_exceptionPortCtrl_exceptionContext_code <= (_zz_192_ ? DBusSimplePlugin_memoryExceptionPort_payload_code : BranchPlugin_branchExceptionPort_payload_code); + CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= (_zz_192_ ? DBusSimplePlugin_memoryExceptionPort_payload_badAddr : BranchPlugin_branchExceptionPort_payload_badAddr); + end + if(_zz_248_)begin + if(_zz_249_)begin + CsrPlugin_interrupt_code <= (4'b0111); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + if(_zz_250_)begin + CsrPlugin_interrupt_code <= (4'b0011); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + if(_zz_251_)begin + CsrPlugin_interrupt_code <= (4'b1011); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + end + if(_zz_234_)begin + case(CsrPlugin_targetPrivilege) + 2'b11 : begin + CsrPlugin_mcause_interrupt <= (! CsrPlugin_hadException); + CsrPlugin_mcause_exceptionCode <= CsrPlugin_trapCause; + CsrPlugin_mepc <= writeBack_PC; + if(CsrPlugin_hadException)begin + CsrPlugin_mtval <= CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; + end + end + default : begin + end + endcase + end + if(_zz_217_)begin + if(_zz_231_)begin + memory_MulDivIterativePlugin_rs2 <= (memory_MulDivIterativePlugin_rs2 >>> 1); + memory_MulDivIterativePlugin_accumulator <= ({_zz_313_,memory_MulDivIterativePlugin_accumulator[31 : 0]} >>> 1); + end + end + if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin + memory_MulDivIterativePlugin_div_done <= 1'b1; + end + if((! memory_arbitration_isStuck))begin + memory_MulDivIterativePlugin_div_done <= 1'b0; + end + if(_zz_218_)begin + if(_zz_232_)begin + memory_MulDivIterativePlugin_rs1[31 : 0] <= _zz_322_[31:0]; + memory_MulDivIterativePlugin_accumulator[31 : 0] <= ((! _zz_195_[32]) ? _zz_323_ : _zz_324_); + if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin + memory_MulDivIterativePlugin_div_result <= _zz_325_[31:0]; + end + end + end + if(_zz_246_)begin + memory_MulDivIterativePlugin_accumulator <= (65'b00000000000000000000000000000000000000000000000000000000000000000); + memory_MulDivIterativePlugin_rs1 <= ((_zz_198_ ? (~ _zz_199_) : _zz_199_) + _zz_331_); + memory_MulDivIterativePlugin_rs2 <= ((_zz_197_ ? (~ execute_RS2) : execute_RS2) + _zz_333_); + memory_MulDivIterativePlugin_div_needRevert <= ((_zz_198_ ^ (_zz_197_ && (! execute_INSTRUCTION[13]))) && (! (((execute_RS2 == (32'b00000000000000000000000000000000)) && execute_IS_RS2_SIGNED) && (! execute_INSTRUCTION[13])))); + end + externalInterruptArray_regNext <= externalInterruptArray; + if((! execute_arbitration_isStuck))begin + decode_to_execute_INSTRUCTION <= decode_INSTRUCTION; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_INSTRUCTION <= execute_INSTRUCTION; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_ALIGNEMENT_FAULT <= execute_ALIGNEMENT_FAULT; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_READ_DATA <= memory_MEMORY_READ_DATA; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SHIFT_CTRL <= _zz_23_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_CSR <= decode_IS_CSR; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_PC <= decode_PC; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_PC <= _zz_41_; + end + if(((! writeBack_arbitration_isStuck) && (! CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack)))begin + memory_to_writeBack_PC <= memory_PC; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_PREDICTION_HAD_BRANCHED2 <= decode_PREDICTION_HAD_BRANCHED2; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_MEMORY_STORE <= decode_MEMORY_STORE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MEMORY_STORE <= execute_MEMORY_STORE; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_STORE <= memory_MEMORY_STORE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_FORMAL_PC_NEXT <= _zz_97_; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_FORMAL_PC_NEXT <= execute_FORMAL_PC_NEXT; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_FORMAL_PC_NEXT <= _zz_96_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_ENV_CTRL <= _zz_20_; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_ENV_CTRL <= _zz_17_; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_ENV_CTRL <= _zz_15_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_REGFILE_WRITE_VALID <= decode_REGFILE_WRITE_VALID; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_REGFILE_WRITE_VALID <= execute_REGFILE_WRITE_VALID; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_REGFILE_WRITE_VALID <= memory_REGFILE_WRITE_VALID; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC_LESS_UNSIGNED <= decode_SRC_LESS_UNSIGNED; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_BRANCH_DO <= execute_BRANCH_DO; + end + if(((! memory_arbitration_isStuck) && (! execute_arbitration_isStuckByOthers)))begin + execute_to_memory_REGFILE_WRITE_DATA <= _zz_36_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_CSR_WRITE_OPCODE <= decode_CSR_WRITE_OPCODE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_RS1 <= decode_RS1; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC2_FORCE_ZERO <= decode_SRC2_FORCE_ZERO; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_BYPASSABLE_MEMORY_STAGE <= decode_BYPASSABLE_MEMORY_STAGE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_BYPASSABLE_MEMORY_STAGE <= execute_BYPASSABLE_MEMORY_STAGE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC1_CTRL <= _zz_13_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_BRANCH_CTRL <= _zz_10_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_MEMORY_ENABLE <= decode_MEMORY_ENABLE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MEMORY_ENABLE <= execute_MEMORY_ENABLE; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_ENABLE <= memory_MEMORY_ENABLE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC_USE_SUB_LESS <= decode_SRC_USE_SUB_LESS; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MMU_FAULT <= execute_MMU_FAULT; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_BRANCH_CALC <= execute_BRANCH_CALC; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_RS2 <= decode_RS2; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_MUL <= decode_IS_MUL; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_IS_MUL <= execute_IS_MUL; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MEMORY_ADDRESS_LOW <= execute_MEMORY_ADDRESS_LOW; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_ADDRESS_LOW <= memory_MEMORY_ADDRESS_LOW; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_DIV <= decode_IS_DIV; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_IS_DIV <= execute_IS_DIV; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_CSR_READ_OPCODE <= decode_CSR_READ_OPCODE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_RS1_SIGNED <= decode_IS_RS1_SIGNED; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_BYPASSABLE_EXECUTE_STAGE <= decode_BYPASSABLE_EXECUTE_STAGE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MMU_RSP_physicalAddress <= execute_MMU_RSP_physicalAddress; + execute_to_memory_MMU_RSP_isIoAccess <= execute_MMU_RSP_isIoAccess; + execute_to_memory_MMU_RSP_allowRead <= execute_MMU_RSP_allowRead; + execute_to_memory_MMU_RSP_allowWrite <= execute_MMU_RSP_allowWrite; + execute_to_memory_MMU_RSP_allowExecute <= execute_MMU_RSP_allowExecute; + execute_to_memory_MMU_RSP_exception <= execute_MMU_RSP_exception; + execute_to_memory_MMU_RSP_refilling <= execute_MMU_RSP_refilling; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_RS2_SIGNED <= decode_IS_RS2_SIGNED; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC2_CTRL <= _zz_8_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_ALU_BITWISE_CTRL <= _zz_5_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_ALU_CTRL <= _zz_2_; + end + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + end + 12'b001100000000 : begin + end + 12'b001101000001 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mepc <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b001100000101 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mtvec_base <= execute_CsrPlugin_writeData[31 : 2]; + CsrPlugin_mtvec_mode <= execute_CsrPlugin_writeData[1 : 0]; + end + end + 12'b001101000100 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mip_MSIP <= _zz_336_[0]; + end + end + 12'b001101000011 : begin + end + 12'b111111000000 : begin + end + 12'b001100000100 : begin + end + 12'b001101000010 : begin + end + default : begin + end + endcase + iBusWishbone_DAT_MISO_regNext <= iBusWishbone_DAT_MISO; + if(_zz_252_)begin + dBus_cmd_halfPipe_regs_payload_wr <= dBus_cmd_payload_wr; + dBus_cmd_halfPipe_regs_payload_address <= dBus_cmd_payload_address; + dBus_cmd_halfPipe_regs_payload_data <= dBus_cmd_payload_data; + dBus_cmd_halfPipe_regs_payload_size <= dBus_cmd_payload_size; + end + end + +endmodule + diff --git a/xdc-plugin/tests/mem.init b/xdc-plugin/tests/mem.init new file mode 100644 index 000000000..c35c4f858 --- /dev/null +++ b/xdc-plugin/tests/mem.init @@ -0,0 +1,4795 @@ +b00006f +13 +13 +13 +13 +13 +13 +13 +fe112e23 +fe512c23 +fe612a23 +fe712823 +fea12623 +feb12423 +fec12223 +fed12023 +fce12e23 +fcf12c23 +fd012a23 +fd112823 +fdc12623 +fdd12423 +fde12223 +fdf12023 +fc010113 +94000ef +3c12083 +3812283 +3412303 +3012383 +2c12503 +2812583 +2412603 +2012683 +1c12703 +1812783 +1412803 +1012883 +c12e03 +812e83 +412f03 +12f83 +4010113 +30200073 +1001117 +f4c10113 +517 +f6850513 +30551073 +1000517 +f3c50513 +1000597 +6458593 +b50863 +52023 +450513 +ff5ff06f +1537 +88050513 +30451073 +20c010ef +6f +fc002773 +bc0027f3 +e7f7b3 +17f793 +78463 +5b90206f +8067 +82002737 +2872783 +2c72503 +879793 +a7e7b3 +3072503 +879793 +a7e7b3 +3472503 +879793 +a7e533 +8067 +13 +fff50513 +fe051ce3 +8067 +100713 +820037b7 +a71533 +80a7a623 +80e7a823 +8007a623 +8067 +100713 +820037b7 +a71533 +80a7a623 +80e7aa23 +8007a623 +8067 +793 +400693 +f58633 +64603 +279713 +a70733 +c72023 +178793 +fed794e3 +8067 +793 +400693 +279713 +a70733 +72703 +f58633 +178793 +e60023 +fed794e3 +8067 +f9010113 +6912223 +50493 +3537 +7c850513 +6812423 +5312e23 +5412c23 +5512a23 +5612823 +5712623 +6112623 +7212023 +5812423 +5912223 +5a12023 +3b12e23 +2010413 +3fd020ef +196a37 +3c6ef9b7 +3010b13 +2a00513 +40a93 +60da0a13 +35f98993 +400b93 +913 +a0593 +52c030ef +12407b3 +1350533 +a78023 +190913 +ff7914e3 +440413 +fd641ee3 +82004437 +42623 +42823 +900793 +42a23 +f42223 +100913 +1242423 +f00513 +eb1ff0ef +a8593 +1840513 +eedff0ef +2410593 +4c40513 +ee1ff0ef +2810593 +8040513 +ed5ff0ef +2c10593 +b440513 +ec9ff0ef +a042423 +a042623 +a042823 +1700793 +af42023 +b242223 +6042a23 +6042c23 +6042e23 +48513 +e65ff0ef +3010793 +100d13 +409d0b33 +3a37 +40978bb3 +913 +7a8a0a13 +1678c33 +3b8b93 +820047b7 +2500713 +6e7a623 +7a7a823 +f00513 +e19ff0ef +16a89b3 +413 +100c93 +8a07b3 +7a503 +1c10593 +e6dff0ef +9c703 +fecc4783 +f71863 +29c703 +fecbc783 +f70463 +c93 +440413 +1000793 +498993 +fcf414e3 +190413 +20c9063 +2000793 +f40a63 +48513 +de5ff0ef +40913 +f85ff06f +2000913 +48513 +dd1ff0ef +3010793 +82004cb7 +40978bb3 +190413 +70c8d13 +100d93 +3b8b93 +2500793 +6fca623 +1bd2023 +f00513 +d75ff0ef +993 +100793 +13a0733 +72503 +1c10593 +f12623 +dc9ff0ef +13b0733 +ea8733 +74603 +fecc4703 +c12783 +1000693 +e61c63 +40998733 +ea8733 +374603 +fecbc703 +e60463 +793 +498993 +fad99ae3 +78e63 +140413 +1f00793 +87c863 +48513 +d31ff0ef +f7dff06f +8909b3 +2000793 +4019d993 +8f91263 +3537 +7d450513 +1c1020ef +48513 +cedff0ef +413 +9344663 +820047b7 +7a623 +7a823 +7aa23 +b00713 +e7a223 +100713 +e7a423 +f00513 +cadff0ef +6c12083 +6812403 +6412483 +6012903 +5c12983 +5812a03 +5412a83 +5012b03 +4c12b83 +4812c03 +4412c83 +4012d03 +3c12d83 +7010113 +8067 +41240433 +1f45613 +860633 +3537 +40165613 +98593 +7d850513 +12d020ef +f6dff06f +48513 +c71ff0ef +140413 +f69ff06f +820047b7 +e00713 +3537 +e7a023 +7e450513 +1010206f +820047b7 +100713 +4537 +e7a023 +80850513 +e90206f +fd010113 +2112623 +54783 +4079263 +820047b7 +7a623 +7a823 +7aa23 +b00713 +e7a223 +100713 +f00513 +e7a423 +bd5ff0ef +4537 +82c50513 +a5020ef +2c12083 +3010113 +8067 +613 +1c10593 +655010ef +1c12783 +7c783 +78863 +4537 +83850513 +fd1ff06f +1051713 +1075713 +820047b7 +875713 +e7a623 +1051713 +a12623 +1075713 +e7a823 +7aa23 +900713 +e7a223 +100713 +e7a423 +f00513 +b59ff0ef +c12583 +4537 +84850513 +25020ef +f81ff06f +fd010113 +2112623 +2812423 +2912223 +3212023 +1312e23 +1412c23 +1512a23 +1612823 +8054663 +100493 +40a484b3 +200993 +3437 +7a840413 +1040a13 +4ab7 +300b13 +42503 +c10593 +48913 +b5dff0ef +c10793 +12787b3 +7c583 +85ca8513 +1390933 +7b0020ef +ff2b54e3 +440413 +fc8a18e3 +4537 +e450513 +798020ef +2c12083 +2812403 +2412483 +2012903 +1c12983 +1812a03 +1412a83 +1012b03 +3010113 +8067 +100993 +493 +f7dff06f +fe010113 +112e23 +812c23 +912a23 +54783 +2079263 +4537 +86450513 +740020ef +1c12083 +1812403 +1412483 +2010113 +8067 +58493 +613 +c10593 +4e5010ef +c12783 +50413 +7c783 +78863 +4537 +87850513 +fc1ff06f +4c783 +2078863 +48513 +613 +c10593 +4b1010ef +c12783 +50493 +7c783 +78a63 +4537 +88c50513 +f8dff06f +fff00493 +1041713 +1075713 +820047b7 +875713 +1041413 +6e7aa23 +1045413 +687ac23 +607ae23 +2500713 +6e7a623 +100713 +6e7a823 +f00513 +9b1ff0ef +48513 +e69ff0ef +f45ff06f +f8010113 +6112e23 +6812c23 +6912a23 +7212823 +7312623 +7412423 +7512223 +7612023 +5712e23 +5812c23 +5912a23 +5a12823 +5b12623 +54783 +4079663 +4537 +89c50513 +634020ef +7c12083 +7812403 +7412483 +7012903 +6c12983 +6812a03 +6412a83 +6012b03 +5c12b83 +5812c03 +5412c83 +5012d03 +4c12d83 +8010113 +8067 +613 +1810593 +3b5010ef +1812783 +a12423 +7c783 +78863 +4537 +8b050513 +f9dff06f +3010493 +4010a13 +48793 +78023 +780a3 +78123 +781a3 +478793 +ff4796e3 +82004437 +39b7 +913 +6c40a93 +2500c13 +2500c93 +100b13 +7a898993 +6042a23 +7242c23 +6042e23 +19aa023 +f00513 +7642823 +895ff0ef +2010593 +2840513 +8f9ff0ef +2410593 +5c40513 +8edff0ef +2810593 +9040513 +8e1ff0ef +2c10593 +c440513 +8d5ff0ef +b93 +400d13 +1000d93 +812783 +8fbc863 +890913 +8000793 +f8f91ce3 +4937 +400993 +413 +8487b3 +7c583 +85c90513 +140413 +500020ef +ff3416e3 +448493 +ff4490e3 +4437 +e440513 +4e8020ef +400913 +44b7 +100593 +8c448513 +4d4020ef +593 +8c448513 +4c8020ef +100593 +8c448513 +4bc020ef +593 +8c448513 +fff90913 +4ac020ef +fc0916e3 +e440513 +e6dff06f +18aa023 +7642823 +f00513 +fb4ff0ef +793 +f98733 +72503 +1c10593 +f12623 +80dff0ef +c12783 +2010713 +693 +9785b3 +f70633 +1c10713 +d70733 +74503 +64703 +5c883 +a60023 +e54733 +1176733 +e58023 +168693 +158593 +160613 +fda698e3 +478793 +fbb790e3 +1b8b93 +ef1ff06f +fd010113 +2112623 +2812423 +2912223 +3212023 +1312e23 +54783 +2079663 +4537 +8c850513 +3f4020ef +2c12083 +2812403 +2412483 +2012903 +1c12983 +3010113 +8067 +613 +810593 +195010ef +812783 +50913 +7c783 +8079263 +34b7 +7b848493 +413 +4000993 +140793 +f106a3 +4a503 +240793 +810623 +f10723 +340793 +1040413 +c10593 +ff47413 +f107a3 +448493 +ee4ff0ef +fd3416e3 +1091713 +1075713 +820047b7 +875713 +1091913 +ae7a423 +1095913 +b27a623 +a07a823 +1700713 +ae7a023 +100713 +ae7a223 +f4dff06f +4537 +87850513 +f3dff06f +fe010113 +400007b7 +aaaab737 +112e23 +812c23 +912a23 +1212823 +1312623 +1412423 +1512223 +aaa70713 +20078693 +e7a023 +478793 +fed79ce3 +348020ef +370020ef +400007b7 +aaaab737 +413 +aaa70713 +20078693 +7a603 +e60463 +140413 +478793 +fed798e3 +400007b7 +55555737 +55570713 +20078693 +e7a023 +478793 +fed79ce3 +2fc020ef +324020ef +400007b7 +55555737 +55570713 +20078693 +7a603 +e60463 +140413 +478793 +fed798e3 +40c63 +4537 +10000613 +40593 +8dc50513 +264020ef +1969b7 +3c6ef937 +400004b7 +513 +60d98993 +35f90913 +40200a37 +98593 +39d020ef +1250533 +a4a023 +448493 +ff4496e3 +284020ef +196a37 +2a8020ef +3c6ef9b7 +40000937 +493 +513 +60da0a13 +35f98993 +40200ab7 +a0593 +35d020ef +92783 +1350533 +f50463 +148493 +490913 +ff5912e3 +48c63 +4537 +80637 +48593 +90050513 +1d0020ef +400006b7 +793 +468693 +2637 +279713 +d70733 +f72023 +178793 +fec798e3 +200020ef +228020ef +40000737 +106b7 +593 +793 +470713 +fff68693 +2537 +279613 +e60633 +62603 +d67633 +f60463 +158593 +178793 +fea792e3 +4058063 +4537 +2637 +92450513 +154020ef +593 +1c12083 +1812403 +1412483 +1012903 +c12983 +812a03 +412a83 +58513 +2010113 +8067 +940433 +fc041ae3 +4537 +94850513 +114020ef +820027b7 +207a023 +7a823 +7aa23 +7ac23 +7ae23 +ff00713 +e7a023 +10737 +fff70713 +e7a223 +1000737 +fff70713 +e7a423 +fff00713 +e7a623 +100713 +2e7a023 +2e7a223 +bb8ff0ef +50913 +400006b7 +80737 +241793 +d787b3 +87a023 +140413 +fee418e3 +82002437 +100493 +2942223 +b88ff0ef +40a905b3 +3c000537 +91020ef +50913 +d8020ef +100020ef +2942023 +2942223 +b64ff0ef +50413 +400007b7 +40200737 +7a683 +478793 +fee79ce3 +820027b7 +100713 +2e7a223 +b3cff0ef +40a405b3 +3c000537 +45020ef +50613 +4537 +90593 +95450513 +28020ef +100593 +ed5ff06f +f8010113 +6112e23 +6812c23 +6912a23 +7312623 +7612023 +5912a23 +7212823 +7412423 +7512223 +5712e23 +5812c23 +5a12823 +5b12623 +ed0ff0ef +82003437 +100493 +513 +b08ff0ef +80942623 +80942c23 +80042623 +100513 +af4ff0ef +200793 +80f42623 +80942c23 +4537 +80042623 +97c50513 +7a5010ef +1967b7 +60d78793 +f12823 +37b7 +7a878793 +2c10993 +3110b13 +413 +f12a23 +4cb7 +3c6ef7b7 +100913 +35f78793 +891933 +a93 +c13 +493 +f12623 +2c0006f +48a93 +a0c13 +700793 +1ef48463 +820037b7 +8127a623 +100713 +80e7ae23 +8007a623 +148493 +3010b93 +4010d93 +2a00513 +b8a13 +d13 +1012583 +71020ef +c12783 +1ab8733 +1d0d13 +f50533 +a70023 +400793 +fefd10e3 +4b8b93 +fd7d9ae3 +82004bb7 +ba623 +ba823 +900793 +baa23 +fba223 +100d13 +1aba423 +f00513 +9ecff0ef +a0593 +18b8513 +a28ff0ef +4cb8513 +3410593 +a1cff0ef +80b8513 +3810593 +a10ff0ef +b4b8513 +3c10593 +a04ff0ef +a0ba423 +a0ba623 +a0ba823 +1700793 +afba023 +baba223 +60baa23 +60bac23 +47b7 +60bae23 +48613 +40593 +98c78513 +661010ef +40513 +98cff0ef +2000b93 +a13 +82004d37 +2500793 +6fd2623 +100713 +820047b7 +6e7a823 +f00513 +954ff0ef +b0693 +713 +100d93 +1412783 +2c10593 +d12e23 +e78633 +62503 +e12c23 +99cff0ef +1c12683 +19c603 +1812703 +6c583 +c59863 +26c583 +39c603 +c58463 +d93 +470713 +1000793 +468693 +faf71ae3 +47b7 +d8593 +99878513 +5c5010ef +40513 +fffb8b93 +1ba0a33 +904ff0ef +f60b94e3 +4537 +99c50513 +5a5010ef +820047b7 +7a623 +7a823 +7aa23 +b00713 +e7a223 +100713 +e7a423 +f00513 +8a0ff0ef +40513 +930ff0ef +e4c8513 +56d010ef +e14c4ae3 +e19ff06f +4537 +a8613 +40593 +9a050513 +551010ef +820037b7 +8127a623 +100713 +80e7ac23 +8007a623 +82003737 +793 +100693 +3579463 +40513 +8e0ff0ef +e4c8513 +51d010ef +fff98993 +fffb0b13 +2041063 +100413 +d91ff06f +81272623 +80d72e23 +80072623 +178793 +fc9ff06f +7c12083 +7812403 +7412483 +7012903 +6c12983 +6812a03 +6412a83 +6012b03 +5c12b83 +5812c03 +5412c83 +5012d03 +4c12d83 +100513 +8010113 +8067 +ff010113 +4537 +812423 +9b050513 +82004437 +112623 +912223 +1212023 +491010ef +42623 +42823 +42a23 +c00793 +c537 +f42023 +35050513 +f95fe0ef +42623 +42823 +42a23 +e00793 +2537 +f42023 +71050513 +f75fe0ef +200793 +f42623 +20000713 +e42823 +f42a23 +f00793 +f42223 +100493 +942423 +42623 +42823 +300913 +1242a23 +f42223 +942423 +42623 +600713 +e42823 +942a23 +f42223 +942423 +900713 +e42623 +1737 +92070713 +e42823 +42a23 +f42223 +942423 +c800513 +ef9fe0ef +400793 +f42623 +40000793 +f42823 +42a23 +1242223 +942423 +c800513 +ed5fe0ef +b91ff0ef +aacff0ef +879ff0ef +c12083 +812403 +412483 +12903 +a03533 +1010113 +8067 +ff010113 +812423 +50413 +52503 +2000593 +112623 +912223 +555000ef +2051863 +42483 +48513 +6e1000ef +a48533 +a42023 +c12083 +812403 +48513 +412483 +1010113 +8067 +50023 +42483 +150513 +fd9ff06f +e7010113 +18112623 +18812423 +18912223 +19212023 +17312e23 +17412c23 +17512a23 +17612823 +17712623 +17812423 +17912223 +17a12023 +15b12e23 +793 +bc079073 +30046073 +44b7 +53d010ef +e448513 +2d5010ef +4537 +9c850513 +2c9010ef +4537 +9f050513 +2bd010ef +4537 +a1850513 +2b1010ef +4537 +a3c50513 +2a5010ef +4537 +a6050513 +299010ef +e448513 +291010ef +4537 +a8c50513 +285010ef +4537 +ab450513 +279010ef +e448513 +271010ef +4537 +ad850513 +265010ef +55b7 +537 +ae85a403 +50793 +ae858593 +40f585b3 +50513 +708010ef +18a41e63 +4537 +40593 +b0050513 +231010ef +e448513 +229010ef +4537 +b7c50513 +21d010ef +4537 +b9850513 +211010ef +e448513 +209010ef +4537 +bb450513 +1fd010ef +4537 +be850513 +1f1010ef +4537 +bfc50513 +1e5010ef +4537 +3c00593 +c0850513 +1d5010ef +4537 +2000593 +c1450513 +1c5010ef +4537 +400593 +c3050513 +1b5010ef +4537 +800593 +c4c50513 +1a5010ef +4537 +405b7 +c6850513 +195010ef +e448513 +18d010ef +4537 +c8450513 +181010ef +ccdff0ef +100793 +50413 +f50863 +4537 +cb850513 +165010ef +e448513 +15d010ef +2040663 +4537 +cd850513 +14d010ef +7d4000ef +50863 +4537 +d0c50513 +139010ef +e448513 +131010ef +4537 +d2450513 +125010ef +4a37 +49b7 +4ab7 +4537 +d5850513 +8d010ef +413 +40108a3 +1000937 +a00b13 +d00b93 +7f00c13 +700c93 +800d13 +7a0010ef +94783 +4a10823 +fea78ae3 +90023 +d650e63 +4ab6863 +ff9502e3 +5a50863 +5010513 +41010ef +5014703 +15010793 +8787b3 +ece78023 +140413 +fc1ff06f +50613 +4537 +40593 +b1c50513 +95010ef +4537 +b4850513 +89010ef +e59ff06f +1750e63 +fb851ce3 +f80408e3 +d6ca0513 +fff40413 +7ec010ef +f81ff06f +1690023 +15010793 +878433 +ec040023 +e448513 +7d0010ef +1010793 +c10513 +f12623 +cbdff0ef +45b7 +d7058593 +50413 +2dd000ef +18051863 +c10513 +ca1ff0ef +50913 +c10513 +c95ff0ef +94783 +50413 +2079063 +4537 +d7450513 +1010ef +ee9ff06f +d00793 +f90023 +f91ff06f +613 +5010593 +90513 +5a9000ef +5012783 +50b13 +7c783 +78863 +4537 +87850513 +fc5ff06f +44783 +2078663 +613 +5010593 +40513 +575000ef +5012783 +7c783 +78a63 +4537 +d8c50513 +f95ff06f +400513 +50413 +4537 +da050513 +b0b93 +6fc010ef +4cb7 +4d37 +804663 +e448513 +f69ff06f +1000793 +40913 +87d463 +1000913 +4537 +b0593 +db050513 +748010ef +c13 +4db7 +18b87b3 +7c583 +dbcd8513 +1c0c13 +72c010ef +ff8916e3 +90c13 +1000d93 +5bc1a63 +db898513 +714010ef +c13 +5e00d93 +18b87b3 +7c583 +fe058793 +ff7f793 +4fdf063 +dc4d0513 +6f0010ef +1c0c13 +ff8910e3 +90c13 +1000d93 +3bc1863 +12b8bb3 +41240433 +12b0b33 +f5dff06f +bf8c8513 +6c4010ef +1c0c13 +fa1ff06f +dc8a8513 +6b4010ef +fc5ff06f +db898513 +6a8010ef +1c0c13 +fc5ff06f +45b7 +dcc58593 +40513 +13d000ef +e051063 +c10513 +b01ff0ef +50b13 +c10513 +af5ff0ef +50913 +c10513 +ae9ff0ef +b4783 +50413 +78663 +94783 +79863 +4537 +dd050513 +e4dff06f +b0513 +613 +5010593 +405000ef +5012783 +50b13 +7c783 +e60790e3 +90513 +613 +5010593 +3e5000ef +5012783 +50913 +7c783 +78863 +4537 +df050513 +e01ff06f +44783 +100513 +2078663 +613 +5010593 +40513 +3ad000ef +5012783 +7c783 +78863 +4537 +8b050513 +dcdff06f +793 +279713 +1670733 +caa784e3 +1272023 +178793 +fedff06f +45b7 +e0458593 +40513 +4d000ef +e051463 +c10513 +a11ff0ef +50b13 +c10513 +a05ff0ef +50913 +c10513 +9f9ff0ef +b4783 +50413 +78663 +94783 +79863 +4537 +e0850513 +d5dff06f +b0513 +613 +5010593 +315000ef +5012783 +50b13 +7c783 +78863 +4537 +e2050513 +d31ff06f +90513 +613 +5010593 +2e9000ef +5012783 +50913 +7c783 +78863 +4537 +e4050513 +d05ff06f +44783 +100513 +2078063 +613 +5010593 +40513 +2b1000ef +5012783 +7c783 +f00794e3 +793 +279713 +eb06b3 +e90733 +baa78ae3 +72703 +178793 +e6a023 +fe5ff06f +45b7 +e5c58593 +40513 +754000ef +8051a63 +c10513 +919ff0ef +50913 +c10513 +90dff0ef +94783 +50413 +78663 +54783 +79863 +4537 +e6050513 +c71ff06f +90513 +613 +5010593 +229000ef +5012783 +50913 +7c783 +c80792e3 +5010593 +613 +40513 +209000ef +5012783 +50593 +7c783 +c8079ae3 +90513 +ec010ef +50593 +4537 +e7850513 +418010ef +b01ff06f +45b7 +e8858593 +40513 +6b0000ef +51e63 +5010513 +494010ef +4537 +5010593 +e9050513 +fd1ff06f +45b7 +e9c58593 +40513 +684000ef +51663 +454010ef +ab9ff06f +45b7 +ea458593 +40513 +668000ef +51a63 +820007b7 +100713 +e7a023 +a95ff06f +45b7 +eac58593 +40513 +644000ef +51663 +21c000ef +a79ff06f +45b7 +eb858593 +40513 +628000ef +8051863 +4537 +ec050513 +2ac010ef +4537 +ee050513 +2a0010ef +4537 +f0050513 +294010ef +4537 +f2450513 +4437 +284010ef +13440513 +27c010ef +4537 +f4450513 +270010ef +4537 +f8050513 +264010ef +13440513 +25c010ef +4537 +fa050513 +250010ef +4537 +fc050513 +244010ef +13440513 +23c010ef +4537 +fdc50513 +230010ef +9d9ff06f +45b7 +ffc58593 +40513 +588000ef +51a63 +c10513 +f4cff0ef +9e9fe0ef +9b5ff06f +45b7 +458593 +40513 +564000ef +51663 +99dfe0ef +999ff06f +45b7 +c58593 +40513 +548000ef +51663 +999fe0ef +97dff06f +45b7 +1458593 +40513 +52c000ef +51863 +fff00513 +a59fe0ef +95dff06f +45b7 +2058593 +40513 +50c000ef +2051463 +c10513 +ed0ff0ef +50413 +c10513 +ec4ff0ef +50593 +40513 +addfe0ef +925ff06f +45b7 +2858593 +40513 +4d4000ef +51a63 +c10513 +e98ff0ef +b9dfe0ef +901ff06f +45b7 +3458593 +40513 +4b0000ef +51a63 +c10513 +e74ff0ef +dd9fe0ef +8ddff06f +45b7 +3c58593 +40513 +48c000ef +51663 +d28ff0ef +8c1ff06f +45b7 +4458593 +40513 +470000ef +51663 +9a0ff0ef +8a5ff06f +45b7 +5058593 +40513 +454000ef +51663 +e75fe0ef +889ff06f +45b7 +13458593 +40513 +438000ef +86050ae3 +4537 +5850513 +97dff06f +68067 +4537 +ec010113 +a450513 +12112e23 +12812c23 +12912a23 +13212823 +13312623 +13412423 +13512223 +13612023 +11712e23 +11812c23 +140010ef +4537 +4437 +bc50513 +8440493 +12c010ef +8440413 +4c503 +8051e63 +820027b7 +207a023 +7a823 +7aa23 +7ac23 +7ae23 +7a023 +e400713 +e7a223 +e737 +4e170713 +e7a423 +e4e737 +1c070713 +e7a623 +100713 +2e7a023 +2e7a223 +b13 +82002ab7 +5100493 +1b00913 +e00993 +100a13 +28aa783 +2caa703 +879793 +e7e7b3 +30aa703 +879793 +e7e7b3 +34aa703 +879793 +e7e7b3 +79e63 +4537 +16c50513 +d80006f +268010ef +148493 +f59ff06f +240010ef +c050a63 +1e4010ef +24950263 +25250063 +16407b3 +107c783 +aa79a63 +1b0b13 +b3b1a63 +44b7 +a93 +300993 +100913 +500413 +6c48493 +82000a37 +1a8010ef +a10623 +1a0010ef +a106a3 +198010ef +a10723 +c10b93 +18c010ef +a107a3 +b8c13 +b13 +c14583 +1c0c13 +6bb4463 +f14783 +d378863 +e14783 +d14703 +158593 +879793 +e7e7b3 +879b13 +87d793 +fb67b3 +1079b13 +f10513 +10b5b13 +43d000ef +5650463 +1a8a93 +28a9a63 +4537 +e850513 +7b1000ef +500006f +f8650513 +153b13 +34aa223 +ee1ff06f +10c010ef +ac01a3 +1b0b13 +f85ff06f +4300513 +168010ef +f4dff06f +f14783 +14f46063 +279793 +9787b3 +7a783 +78067 +4b00513 +144010ef +100513 +13c12083 +13812403 +13412483 +13012903 +12c12983 +12812a03 +12412a83 +12012b03 +11c12b83 +11812c03 +14010113 +8067 +1014783 +1114703 +1879793 +1071713 +e7e7b3 +1314703 +e7e7b3 +1214703 +871713 +e7e7b3 +ffc78793 +400713 +c14683 +e78633 +1b8b93 +d74c63 +f14783 +a93 +4b00513 +eb2794e3 +f55ff06f +7bc683 +170713 +d60023 +fd1ff06f +1014403 +1114683 +4b00513 +1841413 +1069693 +d46433 +1314683 +d46433 +1214683 +869693 +d46433 +7c010ef +4537 +40593 +11050513 +689000ef +4537 +13850513 +67d000ef +120010ef +793 +bc079073 +30047073 +6c1000ef +6e9000ef +40693 +613 +593 +513 +cd9ff0ef +6f +4b00513 +28010ef +12a2023 +e09ff06f +1a8a93 +e68a8ee3 +5500513 +ea9ff06f +4537 +17850513 +621000ef +513 +ec1ff06f +ff5f593 +54783 +b79463 +8067 +78663 +150513 +fedff06f +513 +8067 +54703 +2071263 +513 +8067 +fee68ee3 +178793 +7c683 +fe069ae3 +150513 +fddff06f +58793 +fedff06f +b505b3 +ff67613 +b50663 +54783 +79663 +513 +8067 +fef60ee3 +150513 +fe5ff06f +50793 +158593 +fff5c703 +178793 +fee78fa3 +fe0718e3 +8067 +c50633 +50793 +c79463 +8067 +5c703 +e78023 +70463 +158593 +178793 +fe5ff06f +158593 +54703 +fff5c783 +40f707b3 +1879793 +4187d793 +79663 +150513 +fe0710e3 +78513 +8067 +713 +c71863 +793 +78513 +8067 +e507b3 +7c683 +e587b3 +7c783 +40f687b3 +1879793 +4187d793 +fc079ee3 +fc068ce3 +170713 +fc9ff06f +50793 +7c703 +178693 +71e63 +158593 +fff5c703 +178793 +fee78fa3 +fe0718e3 +8067 +68793 +fd9ff06f +50793 +61663 +8067 +68793 +7c703 +178693 +fe071ae3 +c78633 +158593 +fff5c703 +178793 +fee78fa3 +fc070ce3 +fec796e3 +78023 +8067 +50793 +7c703 +71663 +40a78533 +8067 +178793 +fedff06f +fe010113 +812c23 +b12623 +50413 +112e23 +fd1ff0ef +c12583 +a40533 +ff5f593 +54783 +b78863 +fff50513 +fe857ae3 +513 +1c12083 +1812403 +2010113 +8067 +b505b3 +50793 +b78663 +7c703 +71663 +40a78533 +8067 +178793 +fe9ff06f +793 +f50733 +74683 +68e63 +58713 +c0006f +d60c63 +170713 +74603 +fe061ae3 +78513 +8067 +178793 +fd1ff06f +713 +e61663 +793 +200006f +e507b3 +e586b3 +7c783 +6c683 +170713 +40d787b3 +fc078ee3 +78513 +8067 +c50633 +50793 +c79463 +8067 +178793 +feb78fa3 +ff1ff06f +793 +f61463 +8067 +f58733 +74683 +f50733 +178793 +d70023 +fe5ff06f +2a5fa63 +fff64693 +793 +fff78793 +2f69663 +8067 +f58733 +74683 +f50733 +178793 +d70023 +fef616e3 +8067 +793 +ff5ff06f +f60733 +e58833 +84803 +e50733 +1070023 +fbdff06f +fe010113 +812c23 +50413 +58513 +1312623 +112e23 +912a23 +1212823 +1412423 +58993 +e51ff0ef +4050063 +50913 +40513 +e41ff0ef +50493 +a40a33 +409a0433 +124f663 +413 +1c0006f +90613 +98593 +40513 +fff48493 +ed5ff0ef +fc051ee3 +40513 +1c12083 +1812403 +1412483 +1012903 +c12983 +812a03 +2010113 +8067 +c50633 +ff5f593 +c51663 +513 +8067 +54703 +150793 +feb70ae3 +78513 +fe5ff06f +fd010113 +2812423 +3212023 +1312e23 +2112623 +2912223 +4937 +50413 +58993 +54783 +18490913 +4061e63 +3000713 +a00613 +4e79463 +154783 +150693 +f90733 +74703 +277713 +70663 +fe078793 +ff7f793 +5800713 +ce79e63 +244783 +f907b3 +7c783 +447f793 +c078463 +240413 +1000613 +513 +5c0006f +1000713 +fee61ae3 +3000713 +fee796e3 +154783 +f90733 +74703 +277713 +70663 +fe078793 +ff7f793 +5800713 +fce794e3 +240413 +fc1ff06f +50593 +60513 +c12623 +2c4010ef +c12603 +950533 +140413 +44783 +f90733 +74703 +4477693 +2068463 +477693 +fd078493 +69c63 +277713 +70663 +fe078793 +ff7f793 +fc978493 +fac4e8e3 +98463 +89a023 +2c12083 +2812403 +2412483 +2012903 +1c12983 +3010113 +8067 +68413 +800613 +f3dff06f +54683 +2d00713 +e68463 +eadff06f +ff010113 +150513 +112623 +e9dff0ef +c12083 +40a00533 +1010113 +8067 +4737 +50613 +18470713 +513 +62683 +6c783 +f707b3 +7c783 +47f793 +79463 +8067 +168793 +f62023 +251793 +a787b3 +6c503 +179793 +a787b3 +fd078513 +fc5ff06f +f7010113 +7312e23 +68993 +46b7 +8812423 +9212023 +7412c23 +7612823 +60a13 +18468693 +8112623 +8912223 +7512a23 +7712623 +7812423 +7912223 +4087613 +50413 +58913 +12868b13 +60463 +10068b13 +1087693 +68463 +ffe87813 +ffe98693 +2200613 +513 +22d66a63 +187693 +3000c13 +69463 +2000c13 +287693 +a93 +68a63 +80a5863 +41400a33 +fff70713 +2d00a93 +2087c93 +c8863 +1000693 +8d99e63 +ffe70713 +a0a1263 +3000693 +d10e23 +100493 +48693 +f4d463 +78693 +1187793 +40d70733 +10078463 +a8863 +1247463 +1540023 +140413 +c8e63 +800793 +ef99e63 +1247663 +3000793 +f40023 +140413 +1087813 +14080063 +40513 +d406b3 +3000613 +1480006f +487693 +68863 +fff70713 +2b00a93 +f71ff06f +887693 +f60684e3 +fff70713 +2000a93 +f5dff06f +800693 +f6d994e3 +fff70713 +f61ff06f +1c10b93 +493 +98593 +a0513 +1012623 +f12423 +e12223 +6c5000ef +ab0533 +54683 +98593 +a0513 +db8023 +6ed000ef +148493 +1b8b93 +412703 +812783 +c12803 +f33a60e3 +50a13 +fb5ff06f +127f463 +a78023 +178793 +40f58633 +fec048e3 +70793 +75463 +793 +fff70713 +f40433 +40f70733 +f01ff06f +40793 +e405b3 +2000513 +fd1ff06f +1000793 +f0f99ae3 +1247663 +3000793 +f40023 +140793 +127f663 +21b4783 +f400a3 +240413 +ef1ff06f +127f463 +1878023 +178793 +40f58633 +fec048e3 +70793 +75463 +793 +fff70713 +f40433 +40f70733 +ec9ff06f +40793 +e405b3 +fd5ff06f +1257463 +c50023 +150513 +40a687b3 +fef4c8e3 +48793 +50693 +fff00613 +fff78793 +4c79e63 +950533 +50793 +e50633 +2000593 +40f606b3 +6d04063 +75463 +713 +e50533 +8c12083 +8812403 +8412483 +8012903 +7c12983 +7812a03 +7412a83 +7012b03 +6c12b83 +6812c03 +6412c83 +9010113 +8067 +126fa63 +1c10593 +f585b3 +5c583 +b68023 +168693 +f89ff06f +127f463 +b78023 +178793 +f91ff06f +ff010113 +812423 +112623 +58413 +1d000ef +856463 +fff40513 +c12083 +812403 +1010113 +8067 +fc010113 +2d12623 +2c10693 +112e23 +2e12823 +2f12a23 +3012c23 +3112e23 +d12623 +7dc000ef +1c12083 +4010113 +8067 +fc010113 +2d12623 +2c10693 +812c23 +112e23 +58413 +2e12823 +2f12a23 +3012c23 +3112e23 +d12623 +7a0000ef +856463 +fff40513 +1c12083 +1812403 +4010113 +8067 +60693 +58613 +800005b7 +fff5c593 +7740006f +fc010113 +2c12423 +58613 +800005b7 +2d12623 +fff5c593 +2810693 +112e23 +2e12823 +2f12a23 +3012c23 +3112e23 +d12623 +73c000ef +1c12083 +4010113 +8067 +1000737 +472783 +779513 +f50533 +361967b7 +2e978793 +f50533 +a72223 +8067 +10007b7 +a7a223 +8067 +4537 +ff010113 +2d450513 +112623 +42c000ef +6f +1851713 +1855793 +106b7 +e7e7b3 +f0068693 +855713 +d77733 +e7e7b3 +851513 +ff0737 +e57533 +a7e533 +8067 +851793 +855513 +a7e533 +1051513 +1055513 +8067 +1851713 +1855793 +106b7 +e7e7b3 +f0068693 +855713 +d77733 +e7e7b3 +851513 +ff0737 +e57533 +a7e533 +8067 +851793 +855513 +a7e533 +1051513 +1055513 +8067 +46b7 +793 +b505b3 +2e068693 +40a58733 +e04663 +78513 +8067 +150513 +fff54603 +87d713 +879793 +c74733 +271713 +e68733 +75703 +1079793 +107d793 +f747b3 +fc5ff06f +46b7 +50713 +fff00793 +b508b3 +700813 +6e068693 +40e88633 +4c86a63 +35d713 +371693 +40d585b3 +d50533 +2058c63 +46b7 +b505b3 +6e068693 +150513 +fff54703 +f74733 +ff77713 +271713 +e68733 +72703 +87d793 +f747b3 +fcb51ee3 +fff7c513 +8067 +74603 +870713 +f64633 +ff67613 +261613 +c68633 +62603 +87d793 +f647b3 +ff974603 +f64633 +ff67613 +261613 +c68633 +62603 +87d793 +f64633 +ffa74783 +c7c7b3 +ff7f793 +279793 +f687b3 +7a303 +ffb74783 +865613 +c34333 +67c7b3 +ff7f793 +279793 +f687b3 +7a603 +ffc74783 +835313 +664633 +c7c7b3 +ff7f793 +279793 +f687b3 +7a303 +ffd74783 +865613 +c34333 +67c7b3 +ff7f793 +279793 +f687b3 +7a783 +ffe74603 +835313 +67c7b3 +f64633 +ff67613 +261613 +c68633 +62303 +fff74603 +87d793 +f34333 +664633 +ff67613 +261613 +c68633 +62783 +835313 +67c7b3 +ea5ff06f +10007b7 +a7a823 +8067 +10007b7 +a7a623 +10007b7 +b7a423 +8067 +ff010113 +912223 +ff57493 +812423 +50413 +48513 +112623 +36c000ef +10007b7 +107a783 +78663 +48513 +780e7 +a00793 +f41663 +d00513 +fc1ff0ef +40513 +c12083 +812403 +412483 +1010113 +8067 +ff010113 +812423 +112623 +1000437 +300000ef +50a63 +812403 +c12083 +1010113 +2980006f +842783 +fe0782e3 +780e7 +fc050ee3 +812403 +10007b7 +c12083 +c7a303 +1010113 +30067 +ff010113 +112623 +2b8000ef +2051263 +10007b7 +87a783 +78663 +780e7 +a03533 +c12083 +1010113 +8067 +100513 +ff1ff06f +ff010113 +812423 +112623 +50413 +44503 +2051063 +a00513 +f01ff0ef +c12083 +812403 +100513 +1010113 +8067 +ee9ff0ef +140413 +fd5ff06f +ff010113 +812423 +112623 +50413 +44503 +51a63 +c12083 +812403 +1010113 +8067 +eb5ff0ef +140413 +fe1ff06f +ef010113 +58693 +50613 +10000593 +10513 +10112623 +10812423 +ac5ff0ef +10010793 +50413 +a787b3 +10513 +f0078023 +f99ff0ef +40513 +10c12083 +10812403 +11010113 +8067 +fc010113 +2b12223 +2410593 +112e23 +2c12423 +2d12623 +2e12823 +2f12a23 +3012c23 +3112e23 +b12623 +f89ff0ef +1c12083 +4010113 +8067 +400f +13 +13 +13 +13 +13 +8067 +cc0027f3 +c79693 +147d713 +c6d693 +793 +d7e463 +8067 +78513 +7005500f +e787b3 +fedff06f +400007b7 +40004737 +7a683 +478793 +fee79ce3 +8067 +50023 +8067 +820027b7 +8107a703 +277793 +79863 +177713 +4071e63 +8067 +10007b7 +1c7a803 +10005b7 +820026b7 +1000637 +2458593 +200893 +8086a783 +ff7f793 +fc0798e3 +2062783 +178793 +7f7f793 +f80c63 +2062503 +8006a303 +2f62023 +a58533 +650023 +8116a823 +fcdff06f +820027b7 +100713 +80e7a823 +10007b7 +187a583 +10006b7 +1000737 +82002637 +2468693 +1472783 +b78863 +80462783 +ff7f793 +78463 +8067 +1472783 +f687b3 +807c783 +80f62023 +1472783 +178793 +7f7f793 +f72a23 +fc9ff06f +30002673 +1000737 +867613 +1c72783 +70693 +1000737 +2060663 +2072603 +fef60ee3 +1000737 +2470713 +f70733 +178793 +7f7f793 +74503 +f6ae23 +100006f +2072703 +513 +fcf71ce3 +8067 +1000737 +10007b7 +207a783 +1c72503 +40f50533 +a03533 +8067 +10006b7 +186a603 +160793 +7f7f793 +300025f3 +85f593 +1000737 +4058663 +1472583 +fef58ee3 +bc0025f3 +ffe5f813 +bc081073 +1472703 +e61a63 +82002837 +80482703 +ff77713 +2070663 +1000737 +2470713 +c70733 +8a70023 +f6ac23 +bc059073 +c0006f +1472583 +faf59ee3 +8067 +80a82023 +fe9ff06f +10007b7 +207a023 +10007b7 +7ae23 +10007b7 +7ac23 +10007b7 +7aa23 +820027b7 +8107a703 +ff77713 +80e7a823 +300713 +80e7aa23 +bc0027f3 +17e793 +bc079073 +8067 +10007b7 +187a783 +10006b7 +146a703 +fef71ee3 +8067 +fc010113 +2112e23 +2812c23 +2912a23 +3212823 +3312623 +3412423 +3512223 +3612023 +1712e23 +1812c23 +1912a23 +1a12823 +c12623 +4c05c463 +b509b3 +50a13 +58a93 +68493 +a9f663 +fff54a93 +fff00993 +4b37 +5cb7 +a0413 +2500c13 +184b0b13 +2000b93 +ae0c8c93 +2bc0006f +1878a63 +1347463 +f40023 +140413 +29c0006f +913 +2b00713 +2d00613 +3000593 +2000513 +2300813 +c12683 +168793 +f12623 +16c783 +14e78063 +12f76263 +14a78063 +15078263 +1678733 +74703 +477713 +12070e63 +c10513 +ba8ff0ef +50713 +c12683 +2e00613 +fff00793 +6c583 +2c59e63 +168793 +f12623 +16c603 +cb07b3 +7c783 +47f793 +12078663 +c10513 +e12423 +b68ff0ef +812703 +50793 +55463 +793 +c12683 +6800593 +6c603 +2b60263 +df67593 +4c00513 +a58c63 +5a00513 +a58863 +7400593 +fff00813 +2b61663 +60813 +168613 +c12623 +6c00613 +c81c63 +16c603 +1061863 +268693 +d12623 +4c00813 +c12683 +6c603 +6e00693 +2cd60c63 +ec6e063 +6300693 +14d60c63 +ac6ec63 +2d860c63 +5800693 +2cd60e63 +1347663 +2500793 +f40023 +c12783 +140713 +7c683 +2c068663 +1377463 +d400a3 +240413 +14c0006f +c78863 +eeb792e3 +196913 +ebdff06f +1096913 +eb5ff06f +496913 +eadff06f +896913 +ea5ff06f +2096913 +e9dff06f +2a00613 +fff00713 +ecc796e3 +4a703 +268693 +d12623 +448493 +ea075ce3 +40e00733 +1096913 +eadff06f +2a00593 +793 +eeb616e3 +268693 +4a503 +d12623 +448493 +ecdff06f +6400693 +d60663 +6900693 +f4d616e3 +296913 +a00693 +680006f +7300693 +14d60863 +4c6e463 +6f00693 +22d60063 +7000693 +f2d612e3 +fff00693 +d71663 +196913 +800713 +4a603 +448d13 +90813 +1000693 +40513 +98593 +a18ff0ef +50413 +1640006f +7500693 +fad602e3 +7800593 +1000693 +ecb61ee3 +4c00613 +1cc81863 +748493 +ff84f493 +848d13 +4a603 +1f80006f +1097913 +a090c63 +40793 +448693 +1347663 +4a603 +c40023 +140413 +e78733 +408707b3 +8f04e63 +68493 +c12783 +178793 +f12623 +c12783 +7c783 +d40790e3 +a8663 +1b347c63 +40023 +41440533 +3c12083 +3812403 +3412483 +3012903 +2c12983 +2812a03 +2412a83 +2012b03 +1c12b83 +1812c03 +1412c83 +1012d03 +4010113 +8067 +1347463 +1740023 +140413 +fff78793 +fef048e3 +fff70793 +e04463 +100713 +40e78733 +170713 +f51ff06f +70793 +fddff06f +1347463 +1740023 +140413 +f55ff06f +448d13 +4a483 +49463 +c8493 +78593 +48513 +e12423 +1097913 +d45fe0ef +812703 +91863 +70793 +fff70713 +2f54863 +793 +2a7cc63 +50793 +55463 +793 +f40433 +e40733 +408707b3 +2f54c63 +d0493 +efdff06f +1347463 +1740023 +140413 +fbdff06f +f406b3 +136f863 +f48633 +64603 +c68023 +178793 +fb1ff06f +1347463 +1740023 +140413 +fb9ff06f +4a783 +41440733 +448493 +e7a023 +eadff06f +c13474e3 +1840023 +c01ff06f +4096913 +1000693 +e49ff06f +fff78793 +f12623 +70413 +e85ff06f +800693 +e31ff06f +6c00613 +448d13 +e2c80ce3 +fdf87613 +5a00593 +e2b606e3 +7400613 +e2c802e3 +6800613 +297593 +e0c81ce3 +4a603 +1061613 +59863 +1065613 +90813 +dc5ff06f +41065613 +ff5ff06f +fe098fa3 +e4dff06f +513 +e49ff06f +ff010113 +112623 +812423 +912223 +50413 +58493 +28000ef +50593 +48513 +170000ef +40a40533 +c12083 +812403 +412483 +1010113 +8067 +fe010113 +112e23 +812c23 +912a23 +a058263 +50413 +8050263 +58513 +b12623 +98000ef +50493 +40513 +8c000ef +40a48533 +1f00793 +6a7ec63 +4f50e63 +c12583 +150513 +2000713 +40a70733 +e41733 +793 +a45433 +fff58813 +141413 +1f75613 +866633 +40c806b3 +41f6d693 +171713 +b6f433 +fff50513 +f76733 +40860433 +16f793 +fc051ae3 +171413 +f46433 +40513 +1c12083 +1812403 +1412483 +2010113 +8067 +413 +fe5ff06f +ffff0737 +e57733 +173693 +469693 +1000793 +40d787b3 +10737 +f557b3 +f0070713 +e7f733 +173713 +371713 +800513 +40e50533 +a7d7b3 +f07f513 +153513 +251513 +d70733 +400693 +40a686b3 +d7d7b3 +e50733 +c7f513 +153513 +200613 +151513 +40a606b3 +d7d7b3 +17d693 +16c693 +16f693 +40d006b3 +40f607b3 +f6f7b3 +e50533 +a78533 +8067 +50793 +513 +79463 +8067 +17f713 +70463 +b50533 +159593 +17d793 +fe5ff06f +0 +82004028 +8200405c +82004090 +820040c4 +82004018 +8200404c +82004080 +820040b4 +616c6564 +203a7379 +0 +2d +64323025 +30252d2b +6432 +41524453 +6f6e204d +6e752077 +20726564 +74666f73 +65726177 +6e6f6320 +6c6f7274 +a +41524453 +6f6e204d +6e752077 +20726564 +64726168 +65726177 +6e6f6320 +6c6f7274 +a +63657250 +67726168 +a6465 +6f636e69 +63657272 +6f722074 +a77 +69746341 +65746176 +6f722064 +64252077 +a +78323025 +0 +72726473 +613c2064 +65726464 +a3e7373 +0 +6f636e69 +63657272 +64612074 +73657264 +a73 +6f636e69 +63657272 +51442074 +a +72726473 +72726564 +6f633c20 +3e746e75 +a +6f636e69 +63657272 +6f632074 +a746e75 +0 +783225 +77726473 +613c2072 +65726464 +a3e7373 +0 +746d654d +20747365 +20737562 +6c696166 +203a6465 +252f6425 +72652064 +73726f72 +a +746d654d +20747365 +61746164 +69616620 +3a64656c +2f642520 +65206425 +726f7272 +a73 +746d654d +20747365 +72646461 +69616620 +3a64656c +2f642520 +65206425 +726f7272 +a73 +746d654d +20747365 +a4b4f +736d654d +64656570 +69725720 +3a736574 +4d642520 +20737062 +64616552 +25203a73 +70624d64 +a73 +64616552 +76656c20 +6e696c65 +a3a67 +2c64256d +64256220 +7c203a +6425 +207c +74736562 +256d203a +62202c64 +206425 +74696e49 +696c6169 +676e697a +52445320 +2e2e4d41 +a2e +6d315b1b +20202020 +20202020 +20205f5f +5f205f20 +2020205f +5f202020 +5f5f2020 +6d305b1b +a +6d315b1b +20202020 +2f202020 +20202f20 +20295f28 +5f5f5f2f +207c205f +2f5f2f7c +6d305b1b +a +6d315b1b +20202020 +202f2020 +2f5f5f2f +5f202f20 +2d202f5f +203e295f +5b1b3c20 +a6d30 +6d315b1b +20202020 +5f5f2f20 +5f2f5f5f +5f5f5c2f +5f5f5c2f +7c2f5f2f +5b1b7c5f +a6d30 +6d315b1b +42202020 +646c6975 +756f7920 +61682072 +61776472 +202c6572 +69736165 +1b21796c +a6d305b +0 +29632820 +706f4320 +67697279 +32207468 +2d323130 +30323032 +6a6e4520 +442d796f +74696769 +a6c61 +29632820 +706f4320 +67697279 +32207468 +2d373030 +35313032 +4c2d4d20 +a736261 +0 +4f494220 +75622053 +20746c69 +46206e6f +32206265 +30322035 +31203032 +37343a36 +a32333a +0 +4f494220 +52432053 +61702043 +64657373 +30252820 +a297838 +0 +4f494220 +52432053 +61662043 +64656c69 +78652820 +74636570 +25206465 +2c783830 +746f6720 +38302520 +a2978 +65685420 +73797320 +206d6574 +6c6c6977 +6e6f6320 +756e6974 +62202c65 +65207475 +63657078 +72702074 +656c626f +a2e736d +0 +67694d20 +67206e65 +73207469 +3a316168 +2d2d2d20 +2d2d2d2d +a2d +74694c20 +67205865 +73207469 +3a316168 +31623920 +31396531 +a39 +3d3d2d2d +3d3d3d3d +3d3d3d3d +3d3d3d3d +5b1b203d +6f536d31 +305b1b43 +3d3d206d +3d3d3d3d +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +6d315b1b +1b555043 +3a6d305b +20202020 +202020 +52786556 +76637369 +0 +25204020 +7a484d64 +a +6d315b1b +1b4d4f52 +3a6d305b +20202020 +25202020 +a424b64 +0 +6d315b1b +4d415253 +6d305b1b +2020203a +25202020 +a424b64 +0 +6d315b1b +5b1b324c +203a6d30 +20202020 +25202020 +a424b64 +0 +6d315b1b +4e49414d +4d41522d +6d305b1b +2520203a +a424b64 +0 +3d3d2d2d +3d3d3d3d +3d3d3d3d +315b1b20 +696e496d +6c616974 +74617a69 +1b6e6f69 +206d305b +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +6f6d654d +69207972 +6974696e +7a696c61 +6f697461 +6166206e +64656c69 +a +3d3d2d2d +3d3d3d3d +3d3d3d3d +3d3d3d3d +315b1b20 +6f6f426d +305b1b74 +3d3d206d +3d3d3d3d +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +62206f4e +20746f6f +6964656d +66206d75 +646e756f +a +3d3d2d2d +3d3d3d3d +3d3d3d3d +203d3d3d +6d315b1b +736e6f43 +1b656c6f +206d305b +3d3d3d3d +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +32395b1b +6c6d313b +78657469 +6d305b1b +203e +82008 +726d +3c20726d +72646461 +3e737365 +656c5b20 +6874676e +a5d +6f636e69 +63657272 +656c2074 +6874676e +a +6f6d654d +64207972 +3a706d75 +0 +2578300a +20783830 +20 +78323025 +20 +2e +6325 +776d +3c20776d +72646461 +3e737365 +61763c20 +3e65756c +6f635b20 +5d746e75 +a +6f636e69 +63657272 +61762074 +a65756c +0 +636d +3c20636d +3e747364 +72733c20 +5b203e63 +6e756f63 +a5d74 +6f636e69 +63657272 +65642074 +6e697473 +6f697461 +6461206e +73657264 +a73 +6f636e69 +63657272 +6f732074 +65637275 +64646120 +73736572 +a +637263 +20637263 +6464613c +73736572 +6c3c203e +74676e65 +a3e68 +33435243 +25203a32 +a783830 +0 +6e656469 +74 +6e656449 +25203a74 +a73 +73756c66 +326c68 +6f626572 +746f +69726573 +6f626c61 +746f +706c6568 +0 +6574694c +49422058 +202c534f +69617661 +6c62616c +6f632065 +6e616d6d +3a7364 +2020726d +20202020 +2d202020 +61657220 +64612064 +73657264 +70732073 +656361 +2020776d +20202020 +2d202020 +69727720 +61206574 +65726464 +73207373 +65636170 +0 +2020636d +20202020 +2d202020 +706f6320 +64612079 +73657264 +70732073 +656361 +20637263 +20202020 +2d202020 +6d6f6320 +65747570 +43524320 +6f203233 +20612066 +74726170 +20666f20 +20656874 +72646461 +20737365 +63617073 +65 +6e656469 +20202074 +2d202020 +73696420 +79616c70 +65646920 +6669746e +726569 +6f626572 +2020746f +2d202020 +73657220 +70207465 +65636f72 +726f7373 +0 +69726573 +6f626c61 +2d20746f +6f6f6220 +69762074 +46532061 +4c +746d656d +20747365 +2d202020 +6e757220 +6d206120 +726f6d65 +65742079 +7473 +72726473 +776f +73726473 +77 +68726473 +77 +72726473 +66756264 +0 +72726473 +64 +72726473 +72726564 +0 +77726473 +72 +69726473 +74696e +6c726473 +6c657665 +0 +746d656d +747365 +6d6d6f43 +20646e61 +20746f6e +6e756f66 +a64 +1ebc +1ef8 +1f5c +1ef8 +1dec +1fd8 +44354c73 +6d4d5364 +726b656b +a6f +4849367a +59633747 +36444944 +a6f +746f6f42 +20676e69 +6d6f7266 +72657320 +2e6c6169 +a2e2e +73657250 +20512073 +4520726f +74204353 +6261206f +2074726f +746f6f62 +6d6f6320 +74656c70 +2e796c65 +a +206f6f54 +796e616d +6e6f6320 +75636573 +65766974 +72726520 +2c73726f +6f626120 +6e697472 +67 +63657845 +6e697475 +6f622067 +6465746f +6f727020 +6d617267 +20746120 +30257830 +a0a7838 +0 +3d3d2d2d +3d3d3d3d +3d3d3d3d +203d3d3d +6d315b1b +7466694c +2166666f +6d305b1b +3d3d3d20 +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +656d6954 +a74756f +0 +636e6143 +656c6c65 +a64 +8080808 +8080808 +28282808 +8082828 +8080808 +8080808 +8080808 +8080808 +101010a0 +10101010 +10101010 +10101010 +4040404 +4040404 +10100404 +10101010 +41414110 +1414141 +1010101 +1010101 +1010101 +1010101 +10010101 +10101010 +42424210 +2424242 +2020202 +2020202 +2020202 +2020202 +10020202 +8101010 +0 +0 +0 +0 +0 +0 +0 +0 +101010a0 +10101010 +10101010 +10101010 +10101010 +10101010 +10101010 +10101010 +1010101 +1010101 +1010101 +1010101 +1010101 +10010101 +1010101 +2010101 +2020202 +2020202 +2020202 +2020202 +2020202 +10020202 +2020202 +2020202 +33323130 +37363534 +42413938 +46454443 +4a494847 +4e4d4c4b +5251504f +56555453 +5a595857 +0 +33323130 +37363534 +62613938 +66656463 +6a696867 +6e6d6c6b +7271706f +76757473 +7a797877 +0 +726f6241 +2e646574 +0 +0 +1021 +2042 +3063 +4084 +50a5 +60c6 +70e7 +8108 +9129 +a14a +b16b +c18c +d1ad +e1ce +f1ef +1231 +210 +3273 +2252 +52b5 +4294 +72f7 +62d6 +9339 +8318 +b37b +a35a +d3bd +c39c +f3ff +e3de +2462 +3443 +420 +1401 +64e6 +74c7 +44a4 +5485 +a56a +b54b +8528 +9509 +e5ee +f5cf +c5ac +d58d +3653 +2672 +1611 +630 +76d7 +66f6 +5695 +46b4 +b75b +a77a +9719 +8738 +f7df +e7fe +d79d +c7bc +48c4 +58e5 +6886 +78a7 +840 +1861 +2802 +3823 +c9cc +d9ed +e98e +f9af +8948 +9969 +a90a +b92b +5af5 +4ad4 +7ab7 +6a96 +1a71 +a50 +3a33 +2a12 +dbfd +cbdc +fbbf +eb9e +9b79 +8b58 +bb3b +ab1a +6ca6 +7c87 +4ce4 +5cc5 +2c22 +3c03 +c60 +1c41 +edae +fd8f +cdec +ddcd +ad2a +bd0b +8d68 +9d49 +7e97 +6eb6 +5ed5 +4ef4 +3e13 +2e32 +1e51 +e70 +ff9f +efbe +dfdd +cffc +bf1b +af3a +9f59 +8f78 +9188 +81a9 +b1ca +a1eb +d10c +c12d +f14e +e16f +1080 +a1 +30c2 +20e3 +5004 +4025 +7046 +6067 +83b9 +9398 +a3fb +b3da +c33d +d31c +e37f +f35e +2b1 +1290 +22f3 +32d2 +4235 +5214 +6277 +7256 +b5ea +a5cb +95a8 +8589 +f56e +e54f +d52c +c50d +34e2 +24c3 +14a0 +481 +7466 +6447 +5424 +4405 +a7db +b7fa +8799 +97b8 +e75f +f77e +c71d +d73c +26d3 +36f2 +691 +16b0 +6657 +7676 +4615 +5634 +d94c +c96d +f90e +e92f +99c8 +89e9 +b98a +a9ab +5844 +4865 +7806 +6827 +18c0 +8e1 +3882 +28a3 +cb7d +db5c +eb3f +fb1e +8bf9 +9bd8 +abbb +bb9a +4a75 +5a54 +6a37 +7a16 +af1 +1ad0 +2ab3 +3a92 +fd2e +ed0f +dd6c +cd4d +bdaa +ad8b +9de8 +8dc9 +7c26 +6c07 +5c64 +4c45 +3ca2 +2c83 +1ce0 +cc1 +ef1f +ff3e +cf5d +df7c +af9b +bfba +8fd9 +9ff8 +6e17 +7e36 +4e55 +5e74 +2e93 +3eb2 +ed1 +1ef0 +0 +77073096 +ee0e612c +990951ba +76dc419 +706af48f +e963a535 +9e6495a3 +edb8832 +79dcb8a4 +e0d5e91e +97d2d988 +9b64c2b +7eb17cbd +e7b82d07 +90bf1d91 +1db71064 +6ab020f2 +f3b97148 +84be41de +1adad47d +6ddde4eb +f4d4b551 +83d385c7 +136c9856 +646ba8c0 +fd62f97a +8a65c9ec +14015c4f +63066cd9 +fa0f3d63 +8d080df5 +3b6e20c8 +4c69105e +d56041e4 +a2677172 +3c03e4d1 +4b04d447 +d20d85fd +a50ab56b +35b5a8fa +42b2986c +dbbbc9d6 +acbcf940 +32d86ce3 +45df5c75 +dcd60dcf +abd13d59 +26d930ac +51de003a +c8d75180 +bfd06116 +21b4f4b5 +56b3c423 +cfba9599 +b8bda50f +2802b89e +5f058808 +c60cd9b2 +b10be924 +2f6f7c87 +58684c11 +c1611dab +b6662d3d +76dc4190 +1db7106 +98d220bc +efd5102a +71b18589 +6b6b51f +9fbfe4a5 +e8b8d433 +7807c9a2 +f00f934 +9609a88e +e10e9818 +7f6a0dbb +86d3d2d +91646c97 +e6635c01 +6b6b51f4 +1c6c6162 +856530d8 +f262004e +6c0695ed +1b01a57b +8208f4c1 +f50fc457 +65b0d9c6 +12b7e950 +8bbeb8ea +fcb9887c +62dd1ddf +15da2d49 +8cd37cf3 +fbd44c65 +4db26158 +3ab551ce +a3bc0074 +d4bb30e2 +4adfa541 +3dd895d7 +a4d1c46d +d3d6f4fb +4369e96a +346ed9fc +ad678846 +da60b8d0 +44042d73 +33031de5 +aa0a4c5f +dd0d7cc9 +5005713c +270241aa +be0b1010 +c90c2086 +5768b525 +206f85b3 +b966d409 +ce61e49f +5edef90e +29d9c998 +b0d09822 +c7d7a8b4 +59b33d17 +2eb40d81 +b7bd5c3b +c0ba6cad +edb88320 +9abfb3b6 +3b6e20c +74b1d29a +ead54739 +9dd277af +4db2615 +73dc1683 +e3630b12 +94643b84 +d6d6a3e +7a6a5aa8 +e40ecf0b +9309ff9d +a00ae27 +7d079eb1 +f00f9344 +8708a3d2 +1e01f268 +6906c2fe +f762575d +806567cb +196c3671 +6e6b06e7 +fed41b76 +89d32be0 +10da7a5a +67dd4acc +f9b9df6f +8ebeeff9 +17b7be43 +60b08ed5 +d6d6a3e8 +a1d1937e +38d8c2c4 +4fdff252 +d1bb67f1 +a6bc5767 +3fb506dd +48b2364b +d80d2bda +af0a1b4c +36034af6 +41047a60 +df60efc3 +a867df55 +316e8eef +4669be79 +cb61b38c +bc66831a +256fd2a0 +5268e236 +cc0c7795 +bb0b4703 +220216b9 +5505262f +c5ba3bbe +b2bd0b28 +2bb45a92 +5cb36a04 +c2d7ffa7 +b5d0cf31 +2cd99e8b +5bdeae1d +9b64c2b0 +ec63f226 +756aa39c +26d930a +9c0906a9 +eb0e363f +72076785 +5005713 +95bf4a82 +e2b87a14 +7bb12bae +cb61b38 +92d28e9b +e5d5be0d +7cdcefb7 +bdbdf21 +86d3d2d4 +f1d4e242 +68ddb3f8 +1fda836e +81be16cd +f6b9265b +6fb077e1 +18b74777 +88085ae6 +ff0f6a70 +66063bca +11010b5c +8f659eff +f862ae69 +616bffd3 +166ccf45 +a00ae278 +d70dd2ee +4e048354 +3903b3c2 +a7672661 +d06016f7 +4969474d +3e6e77db +aed16a4a +d9d65adc +40df0b66 +37d83bf0 +a9bcae53 +debb9ec5 +47b2cf7f +30b5ffe9 +bdbdf21c +cabac28a +53b39330 +24b4a3a6 +bad03605 +cdd70693 +54de5729 +23d967bf +b3667a2e +c4614ab8 +5d681b02 +2a6f2b94 +b40bbe37 +c30c8ea1 +5a05df1b +2d02ef8d +4c554e3c +3e4c +b18edfe diff --git a/xdc-plugin/tests/mem_1.init b/xdc-plugin/tests/mem_1.init new file mode 100644 index 000000000..e69de29bb diff --git a/xdc-plugin/tests/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty.tcl new file mode 100644 index 000000000..9597cd495 --- /dev/null +++ b/xdc-plugin/tests/minilitex_ddr_arty.tcl @@ -0,0 +1,15 @@ +yosys -import +plugin -i xdc +#Import the commands from the plugins to the tcl interpreter +yosys -import +read_verilog VexRiscv_Lite.v +# -flatten is used to ensure that the output eblif has only one module. +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + +#Read the design constraints +read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) + +# Write the design in JSON format. +write_json $::env(OUT_JSON) +write_blif -attr -param -cname -conn counter.eblif diff --git a/xdc-plugin/tests/minilitex_ddr_arty.v b/xdc-plugin/tests/minilitex_ddr_arty.v new file mode 100644 index 000000000..cffdfb4eb --- /dev/null +++ b/xdc-plugin/tests/minilitex_ddr_arty.v @@ -0,0 +1,12464 @@ +//-------------------------------------------------------------------------------- +// Auto-generated by Migen (--------) & LiteX (9b11e919) on 2020-02-25 16:47:33 +//-------------------------------------------------------------------------------- +module top( + output reg serial_tx, + input serial_rx, + (* dont_touch = "true" *) input clk100, + input cpu_reset, + output [13:0] ddram_a, + output [2:0] ddram_ba, + output ddram_ras_n, + output ddram_cas_n, + output ddram_we_n, + output ddram_cs_n, + output [1:0] ddram_dm, + inout [15:0] ddram_dq, + output [1:0] ddram_dqs_p, + output [1:0] ddram_dqs_n, + output ddram_clk_p, + output ddram_clk_n, + output ddram_cke, + output ddram_odt, + output ddram_reset_n, + output [3:0] led +); + +wire [3:0] led; + +assign led[0] = main_locked; +assign led[1] = idelayctl_rdy; +assign led[2] = 0; +assign led[3] = 0; + +// Manually inserted OBUFs +wire [13:0] ddram_a_iob; +wire [ 2:0] ddram_ba_iob; +wire ddram_ras_n_iob; +wire ddram_cas_n_iob; +wire ddram_we_n_iob; +wire ddram_cs_n_iob; +wire [ 1:0] ddram_dm_iob; +wire ddram_cke_iob; +wire ddram_odt_iob; +wire ddram_reset_n_iob; + +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a0 (.I(ddram_a_iob[ 0]), .O(ddram_a[ 0])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a1 (.I(ddram_a_iob[ 1]), .O(ddram_a[ 1])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a2 (.I(ddram_a_iob[ 2]), .O(ddram_a[ 2])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a3 (.I(ddram_a_iob[ 3]), .O(ddram_a[ 3])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a4 (.I(ddram_a_iob[ 4]), .O(ddram_a[ 4])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a5 (.I(ddram_a_iob[ 5]), .O(ddram_a[ 5])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a6 (.I(ddram_a_iob[ 6]), .O(ddram_a[ 6])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a7 (.I(ddram_a_iob[ 7]), .O(ddram_a[ 7])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a8 (.I(ddram_a_iob[ 8]), .O(ddram_a[ 8])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a9 (.I(ddram_a_iob[ 9]), .O(ddram_a[ 9])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a10 (.I(ddram_a_iob[10]), .O(ddram_a[10])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a11 (.I(ddram_a_iob[11]), .O(ddram_a[11])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a12 (.I(ddram_a_iob[12]), .O(ddram_a[12])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a13 (.I(ddram_a_iob[13]), .O(ddram_a[13])); + +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_ba0 (.I(ddram_ba_iob[0]), .O(ddram_ba[0])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_ba1 (.I(ddram_ba_iob[1]), .O(ddram_ba[1])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_ba2 (.I(ddram_ba_iob[2]), .O(ddram_ba[2])); + +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_dm0 (.I(ddram_dm_iob[0]), .O(ddram_dm[0])); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_dm1 (.I(ddram_dm_iob[1]), .O(ddram_dm[1])); + +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_ras (.I(ddram_ras_n_iob), .O(ddram_ras_n)); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_cas (.I(ddram_cas_n_iob), .O(ddram_cas_n)); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_we (.I(ddram_we_n_iob), .O(ddram_we_n)); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_cs (.I(ddram_cs_n_iob), .O(ddram_cs_n)); + +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_cke (.I(ddram_cke_iob), .O(ddram_cke)); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_odt (.I(ddram_odt_iob), .O(ddram_odt)); +OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_rst (.I(ddram_reset_n_iob),.O(ddram_reset_n)); + +// End manually inserted OBUFs + +wire idelayctl_rdy; +reg main_minsoc_ctrl_reset_storage = 1'd0; +reg main_minsoc_ctrl_reset_re = 1'd0; +reg [31:0] main_minsoc_ctrl_scratch_storage = 32'd305419896; +reg main_minsoc_ctrl_scratch_re = 1'd0; +wire [31:0] main_minsoc_ctrl_bus_errors_status; +wire main_minsoc_ctrl_bus_errors_we; +wire main_minsoc_ctrl_reset; +wire main_minsoc_ctrl_bus_error; +reg [31:0] main_minsoc_ctrl_bus_errors = 32'd0; +wire main_minsoc_cpu_reset; +wire [29:0] main_minsoc_cpu_ibus_adr; +wire [31:0] main_minsoc_cpu_ibus_dat_w; +wire [31:0] main_minsoc_cpu_ibus_dat_r; +wire [3:0] main_minsoc_cpu_ibus_sel; +wire main_minsoc_cpu_ibus_cyc; +wire main_minsoc_cpu_ibus_stb; +wire main_minsoc_cpu_ibus_ack; +wire main_minsoc_cpu_ibus_we; +wire [2:0] main_minsoc_cpu_ibus_cti; +wire [1:0] main_minsoc_cpu_ibus_bte; +wire main_minsoc_cpu_ibus_err; +wire [29:0] main_minsoc_cpu_dbus_adr; +wire [31:0] main_minsoc_cpu_dbus_dat_w; +wire [31:0] main_minsoc_cpu_dbus_dat_r; +wire [3:0] main_minsoc_cpu_dbus_sel; +wire main_minsoc_cpu_dbus_cyc; +wire main_minsoc_cpu_dbus_stb; +wire main_minsoc_cpu_dbus_ack; +wire main_minsoc_cpu_dbus_we; +wire [2:0] main_minsoc_cpu_dbus_cti; +wire [1:0] main_minsoc_cpu_dbus_bte; +wire main_minsoc_cpu_dbus_err; +reg [31:0] main_minsoc_cpu_interrupt = 32'd0; +reg [31:0] main_minsoc_vexriscv = 32'd0; +wire [29:0] main_minsoc_interface0_soc_bus_adr; +wire [31:0] main_minsoc_interface0_soc_bus_dat_w; +wire [31:0] main_minsoc_interface0_soc_bus_dat_r; +wire [3:0] main_minsoc_interface0_soc_bus_sel; +wire main_minsoc_interface0_soc_bus_cyc; +wire main_minsoc_interface0_soc_bus_stb; +wire main_minsoc_interface0_soc_bus_ack; +wire main_minsoc_interface0_soc_bus_we; +wire [2:0] main_minsoc_interface0_soc_bus_cti; +wire [1:0] main_minsoc_interface0_soc_bus_bte; +wire main_minsoc_interface0_soc_bus_err; +wire [29:0] main_minsoc_interface1_soc_bus_adr; +wire [31:0] main_minsoc_interface1_soc_bus_dat_w; +wire [31:0] main_minsoc_interface1_soc_bus_dat_r; +wire [3:0] main_minsoc_interface1_soc_bus_sel; +wire main_minsoc_interface1_soc_bus_cyc; +wire main_minsoc_interface1_soc_bus_stb; +wire main_minsoc_interface1_soc_bus_ack; +wire main_minsoc_interface1_soc_bus_we; +wire [2:0] main_minsoc_interface1_soc_bus_cti; +wire [1:0] main_minsoc_interface1_soc_bus_bte; +wire main_minsoc_interface1_soc_bus_err; +wire [29:0] main_minsoc_rom_bus_adr; +wire [31:0] main_minsoc_rom_bus_dat_w; +wire [31:0] main_minsoc_rom_bus_dat_r; +wire [3:0] main_minsoc_rom_bus_sel; +wire main_minsoc_rom_bus_cyc; +wire main_minsoc_rom_bus_stb; +reg main_minsoc_rom_bus_ack = 1'd0; +wire main_minsoc_rom_bus_we; +wire [2:0] main_minsoc_rom_bus_cti; +wire [1:0] main_minsoc_rom_bus_bte; +reg main_minsoc_rom_bus_err = 1'd0; +wire [12:0] main_minsoc_rom_adr; +wire [31:0] main_minsoc_rom_dat_r; +wire [29:0] main_minsoc_sram_bus_adr; +wire [31:0] main_minsoc_sram_bus_dat_w; +wire [31:0] main_minsoc_sram_bus_dat_r; +wire [3:0] main_minsoc_sram_bus_sel; +wire main_minsoc_sram_bus_cyc; +wire main_minsoc_sram_bus_stb; +reg main_minsoc_sram_bus_ack = 1'd0; +wire main_minsoc_sram_bus_we; +wire [2:0] main_minsoc_sram_bus_cti; +wire [1:0] main_minsoc_sram_bus_bte; +reg main_minsoc_sram_bus_err = 1'd0; +wire [9:0] main_minsoc_sram_adr; +wire [31:0] main_minsoc_sram_dat_r; +reg [3:0] main_minsoc_sram_we = 4'd0; +wire [31:0] main_minsoc_sram_dat_w; +reg [31:0] main_minsoc_storage = 32'd8246337; +reg main_minsoc_re = 1'd0; +wire main_minsoc_sink_valid; +reg main_minsoc_sink_ready = 1'd0; +wire main_minsoc_sink_first; +wire main_minsoc_sink_last; +wire [7:0] main_minsoc_sink_payload_data; +reg main_minsoc_uart_clk_txen = 1'd0; +reg [31:0] main_minsoc_phase_accumulator_tx = 32'd0; +reg [7:0] main_minsoc_tx_reg = 8'd0; +reg [3:0] main_minsoc_tx_bitcount = 4'd0; +reg main_minsoc_tx_busy = 1'd0; +reg main_minsoc_source_valid = 1'd0; +wire main_minsoc_source_ready; +reg main_minsoc_source_first = 1'd0; +reg main_minsoc_source_last = 1'd0; +reg [7:0] main_minsoc_source_payload_data = 8'd0; +reg main_minsoc_uart_clk_rxen = 1'd0; +reg [31:0] main_minsoc_phase_accumulator_rx = 32'd0; +wire main_minsoc_rx; +reg main_minsoc_rx_r = 1'd0; +reg [7:0] main_minsoc_rx_reg = 8'd0; +reg [3:0] main_minsoc_rx_bitcount = 4'd0; +reg main_minsoc_rx_busy = 1'd0; +wire main_minsoc_uart_rxtx_re; +wire [7:0] main_minsoc_uart_rxtx_r; +wire main_minsoc_uart_rxtx_we; +wire [7:0] main_minsoc_uart_rxtx_w; +wire main_minsoc_uart_txfull_status; +wire main_minsoc_uart_txfull_we; +wire main_minsoc_uart_rxempty_status; +wire main_minsoc_uart_rxempty_we; +wire main_minsoc_uart_irq; +wire main_minsoc_uart_tx_status; +reg main_minsoc_uart_tx_pending = 1'd0; +wire main_minsoc_uart_tx_trigger; +reg main_minsoc_uart_tx_clear = 1'd0; +reg main_minsoc_uart_tx_old_trigger = 1'd0; +wire main_minsoc_uart_rx_status; +reg main_minsoc_uart_rx_pending = 1'd0; +wire main_minsoc_uart_rx_trigger; +reg main_minsoc_uart_rx_clear = 1'd0; +reg main_minsoc_uart_rx_old_trigger = 1'd0; +wire main_minsoc_uart_eventmanager_status_re; +wire [1:0] main_minsoc_uart_eventmanager_status_r; +wire main_minsoc_uart_eventmanager_status_we; +reg [1:0] main_minsoc_uart_eventmanager_status_w = 2'd0; +wire main_minsoc_uart_eventmanager_pending_re; +wire [1:0] main_minsoc_uart_eventmanager_pending_r; +wire main_minsoc_uart_eventmanager_pending_we; +reg [1:0] main_minsoc_uart_eventmanager_pending_w = 2'd0; +reg [1:0] main_minsoc_uart_eventmanager_storage = 2'd0; +reg main_minsoc_uart_eventmanager_re = 1'd0; +wire main_minsoc_uart_uart_sink_valid; +wire main_minsoc_uart_uart_sink_ready; +wire main_minsoc_uart_uart_sink_first; +wire main_minsoc_uart_uart_sink_last; +wire [7:0] main_minsoc_uart_uart_sink_payload_data; +wire main_minsoc_uart_uart_source_valid; +wire main_minsoc_uart_uart_source_ready; +wire main_minsoc_uart_uart_source_first; +wire main_minsoc_uart_uart_source_last; +wire [7:0] main_minsoc_uart_uart_source_payload_data; +wire main_minsoc_uart_tx_fifo_sink_valid; +wire main_minsoc_uart_tx_fifo_sink_ready; +reg main_minsoc_uart_tx_fifo_sink_first = 1'd0; +reg main_minsoc_uart_tx_fifo_sink_last = 1'd0; +wire [7:0] main_minsoc_uart_tx_fifo_sink_payload_data; +wire main_minsoc_uart_tx_fifo_source_valid; +wire main_minsoc_uart_tx_fifo_source_ready; +wire main_minsoc_uart_tx_fifo_source_first; +wire main_minsoc_uart_tx_fifo_source_last; +wire [7:0] main_minsoc_uart_tx_fifo_source_payload_data; +wire main_minsoc_uart_tx_fifo_re; +reg main_minsoc_uart_tx_fifo_readable = 1'd0; +wire main_minsoc_uart_tx_fifo_syncfifo_we; +wire main_minsoc_uart_tx_fifo_syncfifo_writable; +wire main_minsoc_uart_tx_fifo_syncfifo_re; +wire main_minsoc_uart_tx_fifo_syncfifo_readable; +wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_din; +wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_dout; +reg [4:0] main_minsoc_uart_tx_fifo_level0 = 5'd0; +reg main_minsoc_uart_tx_fifo_replace = 1'd0; +reg [3:0] main_minsoc_uart_tx_fifo_produce = 4'd0; +reg [3:0] main_minsoc_uart_tx_fifo_consume = 4'd0; +reg [3:0] main_minsoc_uart_tx_fifo_wrport_adr = 4'd0; +wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_r; +wire main_minsoc_uart_tx_fifo_wrport_we; +wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_w; +wire main_minsoc_uart_tx_fifo_do_read; +wire [3:0] main_minsoc_uart_tx_fifo_rdport_adr; +wire [9:0] main_minsoc_uart_tx_fifo_rdport_dat_r; +wire main_minsoc_uart_tx_fifo_rdport_re; +wire [4:0] main_minsoc_uart_tx_fifo_level1; +wire [7:0] main_minsoc_uart_tx_fifo_fifo_in_payload_data; +wire main_minsoc_uart_tx_fifo_fifo_in_first; +wire main_minsoc_uart_tx_fifo_fifo_in_last; +wire [7:0] main_minsoc_uart_tx_fifo_fifo_out_payload_data; +wire main_minsoc_uart_tx_fifo_fifo_out_first; +wire main_minsoc_uart_tx_fifo_fifo_out_last; +wire main_minsoc_uart_rx_fifo_sink_valid; +wire main_minsoc_uart_rx_fifo_sink_ready; +wire main_minsoc_uart_rx_fifo_sink_first; +wire main_minsoc_uart_rx_fifo_sink_last; +wire [7:0] main_minsoc_uart_rx_fifo_sink_payload_data; +wire main_minsoc_uart_rx_fifo_source_valid; +wire main_minsoc_uart_rx_fifo_source_ready; +wire main_minsoc_uart_rx_fifo_source_first; +wire main_minsoc_uart_rx_fifo_source_last; +wire [7:0] main_minsoc_uart_rx_fifo_source_payload_data; +wire main_minsoc_uart_rx_fifo_re; +reg main_minsoc_uart_rx_fifo_readable = 1'd0; +wire main_minsoc_uart_rx_fifo_syncfifo_we; +wire main_minsoc_uart_rx_fifo_syncfifo_writable; +wire main_minsoc_uart_rx_fifo_syncfifo_re; +wire main_minsoc_uart_rx_fifo_syncfifo_readable; +wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_din; +wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_dout; +reg [4:0] main_minsoc_uart_rx_fifo_level0 = 5'd0; +reg main_minsoc_uart_rx_fifo_replace = 1'd0; +reg [3:0] main_minsoc_uart_rx_fifo_produce = 4'd0; +reg [3:0] main_minsoc_uart_rx_fifo_consume = 4'd0; +reg [3:0] main_minsoc_uart_rx_fifo_wrport_adr = 4'd0; +wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_r; +wire main_minsoc_uart_rx_fifo_wrport_we; +wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_w; +wire main_minsoc_uart_rx_fifo_do_read; +wire [3:0] main_minsoc_uart_rx_fifo_rdport_adr; +wire [9:0] main_minsoc_uart_rx_fifo_rdport_dat_r; +wire main_minsoc_uart_rx_fifo_rdport_re; +wire [4:0] main_minsoc_uart_rx_fifo_level1; +wire [7:0] main_minsoc_uart_rx_fifo_fifo_in_payload_data; +wire main_minsoc_uart_rx_fifo_fifo_in_first; +wire main_minsoc_uart_rx_fifo_fifo_in_last; +wire [7:0] main_minsoc_uart_rx_fifo_fifo_out_payload_data; +wire main_minsoc_uart_rx_fifo_fifo_out_first; +wire main_minsoc_uart_rx_fifo_fifo_out_last; +reg main_minsoc_uart_reset = 1'd0; +reg [31:0] main_minsoc_timer0_load_storage = 32'd0; +reg main_minsoc_timer0_load_re = 1'd0; +reg [31:0] main_minsoc_timer0_reload_storage = 32'd0; +reg main_minsoc_timer0_reload_re = 1'd0; +reg main_minsoc_timer0_en_storage = 1'd0; +reg main_minsoc_timer0_en_re = 1'd0; +reg main_minsoc_timer0_update_value_storage = 1'd0; +reg main_minsoc_timer0_update_value_re = 1'd0; +reg [31:0] main_minsoc_timer0_value_status = 32'd0; +wire main_minsoc_timer0_value_we; +wire main_minsoc_timer0_irq; +wire main_minsoc_timer0_zero_status; +reg main_minsoc_timer0_zero_pending = 1'd0; +wire main_minsoc_timer0_zero_trigger; +reg main_minsoc_timer0_zero_clear = 1'd0; +reg main_minsoc_timer0_zero_old_trigger = 1'd0; +wire main_minsoc_timer0_eventmanager_status_re; +wire main_minsoc_timer0_eventmanager_status_r; +wire main_minsoc_timer0_eventmanager_status_we; +wire main_minsoc_timer0_eventmanager_status_w; +wire main_minsoc_timer0_eventmanager_pending_re; +wire main_minsoc_timer0_eventmanager_pending_r; +wire main_minsoc_timer0_eventmanager_pending_we; +wire main_minsoc_timer0_eventmanager_pending_w; +reg main_minsoc_timer0_eventmanager_storage = 1'd0; +reg main_minsoc_timer0_eventmanager_re = 1'd0; +reg [31:0] main_minsoc_timer0_value = 32'd0; +reg [13:0] main_minsoc_interface_adr = 14'd0; +reg main_minsoc_interface_we = 1'd0; +wire [7:0] main_minsoc_interface_dat_w; +wire [7:0] main_minsoc_interface_dat_r; +wire [29:0] main_minsoc_bus_wishbone_adr; +wire [31:0] main_minsoc_bus_wishbone_dat_w; +wire [31:0] main_minsoc_bus_wishbone_dat_r; +wire [3:0] main_minsoc_bus_wishbone_sel; +wire main_minsoc_bus_wishbone_cyc; +wire main_minsoc_bus_wishbone_stb; +reg main_minsoc_bus_wishbone_ack = 1'd0; +wire main_minsoc_bus_wishbone_we; +wire [2:0] main_minsoc_bus_wishbone_cti; +wire [1:0] main_minsoc_bus_wishbone_bte; +reg main_minsoc_bus_wishbone_err = 1'd0; +wire [29:0] main_interface0_wb_sdram_adr; +wire [31:0] main_interface0_wb_sdram_dat_w; +reg [31:0] main_interface0_wb_sdram_dat_r = 32'd0; +wire [3:0] main_interface0_wb_sdram_sel; +wire main_interface0_wb_sdram_cyc; +wire main_interface0_wb_sdram_stb; +reg main_interface0_wb_sdram_ack = 1'd0; +wire main_interface0_wb_sdram_we; +wire [2:0] main_interface0_wb_sdram_cti; +wire [1:0] main_interface0_wb_sdram_bte; +reg main_interface0_wb_sdram_err = 1'd0; +wire sys_clk; +wire sys_rst; +wire sys4x_clk; +wire sys4x_dqs_clk; +wire clk200_clk; +wire clk200_rst; +wire main_pll_clkin; +wire main_reset; +wire main_locked; +wire main_clkout0; +wire main_clkout1; +wire main_clkout2; +wire main_clkout3; +reg [3:0] main_reset_counter = 4'd15; +reg main_ic_reset = 1'd1; +reg [4:0] main_a7ddrphy_half_sys8x_taps_storage = 5'd13; +reg main_a7ddrphy_half_sys8x_taps_re = 1'd0; +wire main_a7ddrphy_cdly_rst_re; +wire main_a7ddrphy_cdly_rst_r; +wire main_a7ddrphy_cdly_rst_we; +reg main_a7ddrphy_cdly_rst_w = 1'd0; +wire main_a7ddrphy_cdly_inc_re; +wire main_a7ddrphy_cdly_inc_r; +wire main_a7ddrphy_cdly_inc_we; +reg main_a7ddrphy_cdly_inc_w = 1'd0; +reg [1:0] main_a7ddrphy_dly_sel_storage = 2'd0; +reg main_a7ddrphy_dly_sel_re = 1'd0; +wire main_a7ddrphy_rdly_dq_rst_re; +wire main_a7ddrphy_rdly_dq_rst_r; +wire main_a7ddrphy_rdly_dq_rst_we; +reg main_a7ddrphy_rdly_dq_rst_w = 1'd0; +wire main_a7ddrphy_rdly_dq_inc_re; +wire main_a7ddrphy_rdly_dq_inc_r; +wire main_a7ddrphy_rdly_dq_inc_we; +reg main_a7ddrphy_rdly_dq_inc_w = 1'd0; +wire main_a7ddrphy_rdly_dq_bitslip_rst_re; +wire main_a7ddrphy_rdly_dq_bitslip_rst_r; +wire main_a7ddrphy_rdly_dq_bitslip_rst_we; +reg main_a7ddrphy_rdly_dq_bitslip_rst_w = 1'd0; +wire main_a7ddrphy_rdly_dq_bitslip_re; +wire main_a7ddrphy_rdly_dq_bitslip_r; +wire main_a7ddrphy_rdly_dq_bitslip_we; +reg main_a7ddrphy_rdly_dq_bitslip_w = 1'd0; +wire [13:0] main_a7ddrphy_dfi_p0_address; +wire [2:0] main_a7ddrphy_dfi_p0_bank; +wire main_a7ddrphy_dfi_p0_cas_n; +wire main_a7ddrphy_dfi_p0_cs_n; +wire main_a7ddrphy_dfi_p0_ras_n; +wire main_a7ddrphy_dfi_p0_we_n; +wire main_a7ddrphy_dfi_p0_cke; +wire main_a7ddrphy_dfi_p0_odt; +wire main_a7ddrphy_dfi_p0_reset_n; +wire main_a7ddrphy_dfi_p0_act_n; +wire [31:0] main_a7ddrphy_dfi_p0_wrdata; +wire main_a7ddrphy_dfi_p0_wrdata_en; +wire [3:0] main_a7ddrphy_dfi_p0_wrdata_mask; +wire main_a7ddrphy_dfi_p0_rddata_en; +reg [31:0] main_a7ddrphy_dfi_p0_rddata = 32'd0; +reg main_a7ddrphy_dfi_p0_rddata_valid = 1'd0; +wire [13:0] main_a7ddrphy_dfi_p1_address; +wire [2:0] main_a7ddrphy_dfi_p1_bank; +wire main_a7ddrphy_dfi_p1_cas_n; +wire main_a7ddrphy_dfi_p1_cs_n; +wire main_a7ddrphy_dfi_p1_ras_n; +wire main_a7ddrphy_dfi_p1_we_n; +wire main_a7ddrphy_dfi_p1_cke; +wire main_a7ddrphy_dfi_p1_odt; +wire main_a7ddrphy_dfi_p1_reset_n; +wire main_a7ddrphy_dfi_p1_act_n; +wire [31:0] main_a7ddrphy_dfi_p1_wrdata; +wire main_a7ddrphy_dfi_p1_wrdata_en; +wire [3:0] main_a7ddrphy_dfi_p1_wrdata_mask; +wire main_a7ddrphy_dfi_p1_rddata_en; +reg [31:0] main_a7ddrphy_dfi_p1_rddata = 32'd0; +reg main_a7ddrphy_dfi_p1_rddata_valid = 1'd0; +wire [13:0] main_a7ddrphy_dfi_p2_address; +wire [2:0] main_a7ddrphy_dfi_p2_bank; +wire main_a7ddrphy_dfi_p2_cas_n; +wire main_a7ddrphy_dfi_p2_cs_n; +wire main_a7ddrphy_dfi_p2_ras_n; +wire main_a7ddrphy_dfi_p2_we_n; +wire main_a7ddrphy_dfi_p2_cke; +wire main_a7ddrphy_dfi_p2_odt; +wire main_a7ddrphy_dfi_p2_reset_n; +wire main_a7ddrphy_dfi_p2_act_n; +wire [31:0] main_a7ddrphy_dfi_p2_wrdata; +wire main_a7ddrphy_dfi_p2_wrdata_en; +wire [3:0] main_a7ddrphy_dfi_p2_wrdata_mask; +wire main_a7ddrphy_dfi_p2_rddata_en; +reg [31:0] main_a7ddrphy_dfi_p2_rddata = 32'd0; +reg main_a7ddrphy_dfi_p2_rddata_valid = 1'd0; +wire [13:0] main_a7ddrphy_dfi_p3_address; +wire [2:0] main_a7ddrphy_dfi_p3_bank; +wire main_a7ddrphy_dfi_p3_cas_n; +wire main_a7ddrphy_dfi_p3_cs_n; +wire main_a7ddrphy_dfi_p3_ras_n; +wire main_a7ddrphy_dfi_p3_we_n; +wire main_a7ddrphy_dfi_p3_cke; +wire main_a7ddrphy_dfi_p3_odt; +wire main_a7ddrphy_dfi_p3_reset_n; +wire main_a7ddrphy_dfi_p3_act_n; +wire [31:0] main_a7ddrphy_dfi_p3_wrdata; +wire main_a7ddrphy_dfi_p3_wrdata_en; +wire [3:0] main_a7ddrphy_dfi_p3_wrdata_mask; +wire main_a7ddrphy_dfi_p3_rddata_en; +reg [31:0] main_a7ddrphy_dfi_p3_rddata = 32'd0; +reg main_a7ddrphy_dfi_p3_rddata_valid = 1'd0; +wire main_a7ddrphy_sd_clk_se_nodelay; +reg main_a7ddrphy_oe_dqs = 1'd0; +wire main_a7ddrphy_dqs_preamble; +wire main_a7ddrphy_dqs_postamble; +reg [7:0] main_a7ddrphy_dqs_serdes_pattern = 8'd85; +wire main_a7ddrphy_dqs_nodelay0; +wire main_a7ddrphy_dqs_t0; +wire main_a7ddrphy0; +wire main_a7ddrphy_dqs_nodelay1; +wire main_a7ddrphy_dqs_t1; +wire main_a7ddrphy1; +reg main_a7ddrphy_oe_dq = 1'd0; +wire main_a7ddrphy_dq_o_nodelay0; +wire main_a7ddrphy_dq_i_nodelay0; +wire main_a7ddrphy_dq_i_delayed0; +wire main_a7ddrphy_dq_t0; +wire [7:0] main_a7ddrphy_dq_i_data0; +wire [7:0] main_a7ddrphy_bitslip0_i; +reg [7:0] main_a7ddrphy_bitslip0_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip0_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip0_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay1; +wire main_a7ddrphy_dq_i_nodelay1; +wire main_a7ddrphy_dq_i_delayed1; +wire main_a7ddrphy_dq_t1; +wire [7:0] main_a7ddrphy_dq_i_data1; +wire [7:0] main_a7ddrphy_bitslip1_i; +reg [7:0] main_a7ddrphy_bitslip1_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip1_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip1_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay2; +wire main_a7ddrphy_dq_i_nodelay2; +wire main_a7ddrphy_dq_i_delayed2; +wire main_a7ddrphy_dq_t2; +wire [7:0] main_a7ddrphy_dq_i_data2; +wire [7:0] main_a7ddrphy_bitslip2_i; +reg [7:0] main_a7ddrphy_bitslip2_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip2_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip2_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay3; +wire main_a7ddrphy_dq_i_nodelay3; +wire main_a7ddrphy_dq_i_delayed3; +wire main_a7ddrphy_dq_t3; +wire [7:0] main_a7ddrphy_dq_i_data3; +wire [7:0] main_a7ddrphy_bitslip3_i; +reg [7:0] main_a7ddrphy_bitslip3_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip3_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip3_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay4; +wire main_a7ddrphy_dq_i_nodelay4; +wire main_a7ddrphy_dq_i_delayed4; +wire main_a7ddrphy_dq_t4; +wire [7:0] main_a7ddrphy_dq_i_data4; +wire [7:0] main_a7ddrphy_bitslip4_i; +reg [7:0] main_a7ddrphy_bitslip4_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip4_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip4_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay5; +wire main_a7ddrphy_dq_i_nodelay5; +wire main_a7ddrphy_dq_i_delayed5; +wire main_a7ddrphy_dq_t5; +wire [7:0] main_a7ddrphy_dq_i_data5; +wire [7:0] main_a7ddrphy_bitslip5_i; +reg [7:0] main_a7ddrphy_bitslip5_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip5_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip5_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay6; +wire main_a7ddrphy_dq_i_nodelay6; +wire main_a7ddrphy_dq_i_delayed6; +wire main_a7ddrphy_dq_t6; +wire [7:0] main_a7ddrphy_dq_i_data6; +wire [7:0] main_a7ddrphy_bitslip6_i; +reg [7:0] main_a7ddrphy_bitslip6_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip6_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip6_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay7; +wire main_a7ddrphy_dq_i_nodelay7; +wire main_a7ddrphy_dq_i_delayed7; +wire main_a7ddrphy_dq_t7; +wire [7:0] main_a7ddrphy_dq_i_data7; +wire [7:0] main_a7ddrphy_bitslip7_i; +reg [7:0] main_a7ddrphy_bitslip7_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip7_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip7_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay8; +wire main_a7ddrphy_dq_i_nodelay8; +wire main_a7ddrphy_dq_i_delayed8; +wire main_a7ddrphy_dq_t8; +wire [7:0] main_a7ddrphy_dq_i_data8; +wire [7:0] main_a7ddrphy_bitslip8_i; +reg [7:0] main_a7ddrphy_bitslip8_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip8_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip8_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay9; +wire main_a7ddrphy_dq_i_nodelay9; +wire main_a7ddrphy_dq_i_delayed9; +wire main_a7ddrphy_dq_t9; +wire [7:0] main_a7ddrphy_dq_i_data9; +wire [7:0] main_a7ddrphy_bitslip9_i; +reg [7:0] main_a7ddrphy_bitslip9_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip9_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip9_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay10; +wire main_a7ddrphy_dq_i_nodelay10; +wire main_a7ddrphy_dq_i_delayed10; +wire main_a7ddrphy_dq_t10; +wire [7:0] main_a7ddrphy_dq_i_data10; +wire [7:0] main_a7ddrphy_bitslip10_i; +reg [7:0] main_a7ddrphy_bitslip10_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip10_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip10_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay11; +wire main_a7ddrphy_dq_i_nodelay11; +wire main_a7ddrphy_dq_i_delayed11; +wire main_a7ddrphy_dq_t11; +wire [7:0] main_a7ddrphy_dq_i_data11; +wire [7:0] main_a7ddrphy_bitslip11_i; +reg [7:0] main_a7ddrphy_bitslip11_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip11_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip11_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay12; +wire main_a7ddrphy_dq_i_nodelay12; +wire main_a7ddrphy_dq_i_delayed12; +wire main_a7ddrphy_dq_t12; +wire [7:0] main_a7ddrphy_dq_i_data12; +wire [7:0] main_a7ddrphy_bitslip12_i; +reg [7:0] main_a7ddrphy_bitslip12_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip12_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip12_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay13; +wire main_a7ddrphy_dq_i_nodelay13; +wire main_a7ddrphy_dq_i_delayed13; +wire main_a7ddrphy_dq_t13; +wire [7:0] main_a7ddrphy_dq_i_data13; +wire [7:0] main_a7ddrphy_bitslip13_i; +reg [7:0] main_a7ddrphy_bitslip13_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip13_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip13_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay14; +wire main_a7ddrphy_dq_i_nodelay14; +wire main_a7ddrphy_dq_i_delayed14; +wire main_a7ddrphy_dq_t14; +wire [7:0] main_a7ddrphy_dq_i_data14; +wire [7:0] main_a7ddrphy_bitslip14_i; +reg [7:0] main_a7ddrphy_bitslip14_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip14_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip14_r = 16'd0; +wire main_a7ddrphy_dq_o_nodelay15; +wire main_a7ddrphy_dq_i_nodelay15; +wire main_a7ddrphy_dq_i_delayed15; +wire main_a7ddrphy_dq_t15; +wire [7:0] main_a7ddrphy_dq_i_data15; +wire [7:0] main_a7ddrphy_bitslip15_i; +reg [7:0] main_a7ddrphy_bitslip15_o = 8'd0; +reg [2:0] main_a7ddrphy_bitslip15_value = 3'd0; +reg [15:0] main_a7ddrphy_bitslip15_r = 16'd0; +reg main_a7ddrphy_n_rddata_en0 = 1'd0; +reg main_a7ddrphy_n_rddata_en1 = 1'd0; +reg main_a7ddrphy_n_rddata_en2 = 1'd0; +reg main_a7ddrphy_n_rddata_en3 = 1'd0; +reg main_a7ddrphy_n_rddata_en4 = 1'd0; +reg main_a7ddrphy_n_rddata_en5 = 1'd0; +reg main_a7ddrphy_n_rddata_en6 = 1'd0; +reg main_a7ddrphy_n_rddata_en7 = 1'd0; +wire main_a7ddrphy_oe; +reg [3:0] main_a7ddrphy_last_wrdata_en = 4'd0; +wire [13:0] main_sdram_inti_p0_address; +wire [2:0] main_sdram_inti_p0_bank; +reg main_sdram_inti_p0_cas_n = 1'd1; +reg main_sdram_inti_p0_cs_n = 1'd1; +reg main_sdram_inti_p0_ras_n = 1'd1; +reg main_sdram_inti_p0_we_n = 1'd1; +wire main_sdram_inti_p0_cke; +wire main_sdram_inti_p0_odt; +wire main_sdram_inti_p0_reset_n; +reg main_sdram_inti_p0_act_n = 1'd1; +wire [31:0] main_sdram_inti_p0_wrdata; +wire main_sdram_inti_p0_wrdata_en; +wire [3:0] main_sdram_inti_p0_wrdata_mask; +wire main_sdram_inti_p0_rddata_en; +reg [31:0] main_sdram_inti_p0_rddata = 32'd0; +reg main_sdram_inti_p0_rddata_valid = 1'd0; +wire [13:0] main_sdram_inti_p1_address; +wire [2:0] main_sdram_inti_p1_bank; +reg main_sdram_inti_p1_cas_n = 1'd1; +reg main_sdram_inti_p1_cs_n = 1'd1; +reg main_sdram_inti_p1_ras_n = 1'd1; +reg main_sdram_inti_p1_we_n = 1'd1; +wire main_sdram_inti_p1_cke; +wire main_sdram_inti_p1_odt; +wire main_sdram_inti_p1_reset_n; +reg main_sdram_inti_p1_act_n = 1'd1; +wire [31:0] main_sdram_inti_p1_wrdata; +wire main_sdram_inti_p1_wrdata_en; +wire [3:0] main_sdram_inti_p1_wrdata_mask; +wire main_sdram_inti_p1_rddata_en; +reg [31:0] main_sdram_inti_p1_rddata = 32'd0; +reg main_sdram_inti_p1_rddata_valid = 1'd0; +wire [13:0] main_sdram_inti_p2_address; +wire [2:0] main_sdram_inti_p2_bank; +reg main_sdram_inti_p2_cas_n = 1'd1; +reg main_sdram_inti_p2_cs_n = 1'd1; +reg main_sdram_inti_p2_ras_n = 1'd1; +reg main_sdram_inti_p2_we_n = 1'd1; +wire main_sdram_inti_p2_cke; +wire main_sdram_inti_p2_odt; +wire main_sdram_inti_p2_reset_n; +reg main_sdram_inti_p2_act_n = 1'd1; +wire [31:0] main_sdram_inti_p2_wrdata; +wire main_sdram_inti_p2_wrdata_en; +wire [3:0] main_sdram_inti_p2_wrdata_mask; +wire main_sdram_inti_p2_rddata_en; +reg [31:0] main_sdram_inti_p2_rddata = 32'd0; +reg main_sdram_inti_p2_rddata_valid = 1'd0; +wire [13:0] main_sdram_inti_p3_address; +wire [2:0] main_sdram_inti_p3_bank; +reg main_sdram_inti_p3_cas_n = 1'd1; +reg main_sdram_inti_p3_cs_n = 1'd1; +reg main_sdram_inti_p3_ras_n = 1'd1; +reg main_sdram_inti_p3_we_n = 1'd1; +wire main_sdram_inti_p3_cke; +wire main_sdram_inti_p3_odt; +wire main_sdram_inti_p3_reset_n; +reg main_sdram_inti_p3_act_n = 1'd1; +wire [31:0] main_sdram_inti_p3_wrdata; +wire main_sdram_inti_p3_wrdata_en; +wire [3:0] main_sdram_inti_p3_wrdata_mask; +wire main_sdram_inti_p3_rddata_en; +reg [31:0] main_sdram_inti_p3_rddata = 32'd0; +reg main_sdram_inti_p3_rddata_valid = 1'd0; +wire [13:0] main_sdram_slave_p0_address; +wire [2:0] main_sdram_slave_p0_bank; +wire main_sdram_slave_p0_cas_n; +wire main_sdram_slave_p0_cs_n; +wire main_sdram_slave_p0_ras_n; +wire main_sdram_slave_p0_we_n; +wire main_sdram_slave_p0_cke; +wire main_sdram_slave_p0_odt; +wire main_sdram_slave_p0_reset_n; +wire main_sdram_slave_p0_act_n; +wire [31:0] main_sdram_slave_p0_wrdata; +wire main_sdram_slave_p0_wrdata_en; +wire [3:0] main_sdram_slave_p0_wrdata_mask; +wire main_sdram_slave_p0_rddata_en; +reg [31:0] main_sdram_slave_p0_rddata = 32'd0; +reg main_sdram_slave_p0_rddata_valid = 1'd0; +wire [13:0] main_sdram_slave_p1_address; +wire [2:0] main_sdram_slave_p1_bank; +wire main_sdram_slave_p1_cas_n; +wire main_sdram_slave_p1_cs_n; +wire main_sdram_slave_p1_ras_n; +wire main_sdram_slave_p1_we_n; +wire main_sdram_slave_p1_cke; +wire main_sdram_slave_p1_odt; +wire main_sdram_slave_p1_reset_n; +wire main_sdram_slave_p1_act_n; +wire [31:0] main_sdram_slave_p1_wrdata; +wire main_sdram_slave_p1_wrdata_en; +wire [3:0] main_sdram_slave_p1_wrdata_mask; +wire main_sdram_slave_p1_rddata_en; +reg [31:0] main_sdram_slave_p1_rddata = 32'd0; +reg main_sdram_slave_p1_rddata_valid = 1'd0; +wire [13:0] main_sdram_slave_p2_address; +wire [2:0] main_sdram_slave_p2_bank; +wire main_sdram_slave_p2_cas_n; +wire main_sdram_slave_p2_cs_n; +wire main_sdram_slave_p2_ras_n; +wire main_sdram_slave_p2_we_n; +wire main_sdram_slave_p2_cke; +wire main_sdram_slave_p2_odt; +wire main_sdram_slave_p2_reset_n; +wire main_sdram_slave_p2_act_n; +wire [31:0] main_sdram_slave_p2_wrdata; +wire main_sdram_slave_p2_wrdata_en; +wire [3:0] main_sdram_slave_p2_wrdata_mask; +wire main_sdram_slave_p2_rddata_en; +reg [31:0] main_sdram_slave_p2_rddata = 32'd0; +reg main_sdram_slave_p2_rddata_valid = 1'd0; +wire [13:0] main_sdram_slave_p3_address; +wire [2:0] main_sdram_slave_p3_bank; +wire main_sdram_slave_p3_cas_n; +wire main_sdram_slave_p3_cs_n; +wire main_sdram_slave_p3_ras_n; +wire main_sdram_slave_p3_we_n; +wire main_sdram_slave_p3_cke; +wire main_sdram_slave_p3_odt; +wire main_sdram_slave_p3_reset_n; +wire main_sdram_slave_p3_act_n; +wire [31:0] main_sdram_slave_p3_wrdata; +wire main_sdram_slave_p3_wrdata_en; +wire [3:0] main_sdram_slave_p3_wrdata_mask; +wire main_sdram_slave_p3_rddata_en; +reg [31:0] main_sdram_slave_p3_rddata = 32'd0; +reg main_sdram_slave_p3_rddata_valid = 1'd0; +reg [13:0] main_sdram_master_p0_address = 14'd0; +reg [2:0] main_sdram_master_p0_bank = 3'd0; +reg main_sdram_master_p0_cas_n = 1'd1; +reg main_sdram_master_p0_cs_n = 1'd1; +reg main_sdram_master_p0_ras_n = 1'd1; +reg main_sdram_master_p0_we_n = 1'd1; +reg main_sdram_master_p0_cke = 1'd0; +reg main_sdram_master_p0_odt = 1'd0; +reg main_sdram_master_p0_reset_n = 1'd0; +reg main_sdram_master_p0_act_n = 1'd1; +reg [31:0] main_sdram_master_p0_wrdata = 32'd0; +reg main_sdram_master_p0_wrdata_en = 1'd0; +reg [3:0] main_sdram_master_p0_wrdata_mask = 4'd0; +reg main_sdram_master_p0_rddata_en = 1'd0; +wire [31:0] main_sdram_master_p0_rddata; +wire main_sdram_master_p0_rddata_valid; +reg [13:0] main_sdram_master_p1_address = 14'd0; +reg [2:0] main_sdram_master_p1_bank = 3'd0; +reg main_sdram_master_p1_cas_n = 1'd1; +reg main_sdram_master_p1_cs_n = 1'd1; +reg main_sdram_master_p1_ras_n = 1'd1; +reg main_sdram_master_p1_we_n = 1'd1; +reg main_sdram_master_p1_cke = 1'd0; +reg main_sdram_master_p1_odt = 1'd0; +reg main_sdram_master_p1_reset_n = 1'd0; +reg main_sdram_master_p1_act_n = 1'd1; +reg [31:0] main_sdram_master_p1_wrdata = 32'd0; +reg main_sdram_master_p1_wrdata_en = 1'd0; +reg [3:0] main_sdram_master_p1_wrdata_mask = 4'd0; +reg main_sdram_master_p1_rddata_en = 1'd0; +wire [31:0] main_sdram_master_p1_rddata; +wire main_sdram_master_p1_rddata_valid; +reg [13:0] main_sdram_master_p2_address = 14'd0; +reg [2:0] main_sdram_master_p2_bank = 3'd0; +reg main_sdram_master_p2_cas_n = 1'd1; +reg main_sdram_master_p2_cs_n = 1'd1; +reg main_sdram_master_p2_ras_n = 1'd1; +reg main_sdram_master_p2_we_n = 1'd1; +reg main_sdram_master_p2_cke = 1'd0; +reg main_sdram_master_p2_odt = 1'd0; +reg main_sdram_master_p2_reset_n = 1'd0; +reg main_sdram_master_p2_act_n = 1'd1; +reg [31:0] main_sdram_master_p2_wrdata = 32'd0; +reg main_sdram_master_p2_wrdata_en = 1'd0; +reg [3:0] main_sdram_master_p2_wrdata_mask = 4'd0; +reg main_sdram_master_p2_rddata_en = 1'd0; +wire [31:0] main_sdram_master_p2_rddata; +wire main_sdram_master_p2_rddata_valid; +reg [13:0] main_sdram_master_p3_address = 14'd0; +reg [2:0] main_sdram_master_p3_bank = 3'd0; +reg main_sdram_master_p3_cas_n = 1'd1; +reg main_sdram_master_p3_cs_n = 1'd1; +reg main_sdram_master_p3_ras_n = 1'd1; +reg main_sdram_master_p3_we_n = 1'd1; +reg main_sdram_master_p3_cke = 1'd0; +reg main_sdram_master_p3_odt = 1'd0; +reg main_sdram_master_p3_reset_n = 1'd0; +reg main_sdram_master_p3_act_n = 1'd1; +reg [31:0] main_sdram_master_p3_wrdata = 32'd0; +reg main_sdram_master_p3_wrdata_en = 1'd0; +reg [3:0] main_sdram_master_p3_wrdata_mask = 4'd0; +reg main_sdram_master_p3_rddata_en = 1'd0; +wire [31:0] main_sdram_master_p3_rddata; +wire main_sdram_master_p3_rddata_valid; +reg [3:0] main_sdram_storage = 4'd0; +reg main_sdram_re = 1'd0; +reg [5:0] main_sdram_phaseinjector0_command_storage = 6'd0; +reg main_sdram_phaseinjector0_command_re = 1'd0; +wire main_sdram_phaseinjector0_command_issue_re; +wire main_sdram_phaseinjector0_command_issue_r; +wire main_sdram_phaseinjector0_command_issue_we; +reg main_sdram_phaseinjector0_command_issue_w = 1'd0; +reg [13:0] main_sdram_phaseinjector0_address_storage = 14'd0; +reg main_sdram_phaseinjector0_address_re = 1'd0; +reg [2:0] main_sdram_phaseinjector0_baddress_storage = 3'd0; +reg main_sdram_phaseinjector0_baddress_re = 1'd0; +reg [31:0] main_sdram_phaseinjector0_wrdata_storage = 32'd0; +reg main_sdram_phaseinjector0_wrdata_re = 1'd0; +reg [31:0] main_sdram_phaseinjector0_status = 32'd0; +wire main_sdram_phaseinjector0_we; +reg [5:0] main_sdram_phaseinjector1_command_storage = 6'd0; +reg main_sdram_phaseinjector1_command_re = 1'd0; +wire main_sdram_phaseinjector1_command_issue_re; +wire main_sdram_phaseinjector1_command_issue_r; +wire main_sdram_phaseinjector1_command_issue_we; +reg main_sdram_phaseinjector1_command_issue_w = 1'd0; +reg [13:0] main_sdram_phaseinjector1_address_storage = 14'd0; +reg main_sdram_phaseinjector1_address_re = 1'd0; +reg [2:0] main_sdram_phaseinjector1_baddress_storage = 3'd0; +reg main_sdram_phaseinjector1_baddress_re = 1'd0; +reg [31:0] main_sdram_phaseinjector1_wrdata_storage = 32'd0; +reg main_sdram_phaseinjector1_wrdata_re = 1'd0; +reg [31:0] main_sdram_phaseinjector1_status = 32'd0; +wire main_sdram_phaseinjector1_we; +reg [5:0] main_sdram_phaseinjector2_command_storage = 6'd0; +reg main_sdram_phaseinjector2_command_re = 1'd0; +wire main_sdram_phaseinjector2_command_issue_re; +wire main_sdram_phaseinjector2_command_issue_r; +wire main_sdram_phaseinjector2_command_issue_we; +reg main_sdram_phaseinjector2_command_issue_w = 1'd0; +reg [13:0] main_sdram_phaseinjector2_address_storage = 14'd0; +reg main_sdram_phaseinjector2_address_re = 1'd0; +reg [2:0] main_sdram_phaseinjector2_baddress_storage = 3'd0; +reg main_sdram_phaseinjector2_baddress_re = 1'd0; +reg [31:0] main_sdram_phaseinjector2_wrdata_storage = 32'd0; +reg main_sdram_phaseinjector2_wrdata_re = 1'd0; +reg [31:0] main_sdram_phaseinjector2_status = 32'd0; +wire main_sdram_phaseinjector2_we; +reg [5:0] main_sdram_phaseinjector3_command_storage = 6'd0; +reg main_sdram_phaseinjector3_command_re = 1'd0; +wire main_sdram_phaseinjector3_command_issue_re; +wire main_sdram_phaseinjector3_command_issue_r; +wire main_sdram_phaseinjector3_command_issue_we; +reg main_sdram_phaseinjector3_command_issue_w = 1'd0; +reg [13:0] main_sdram_phaseinjector3_address_storage = 14'd0; +reg main_sdram_phaseinjector3_address_re = 1'd0; +reg [2:0] main_sdram_phaseinjector3_baddress_storage = 3'd0; +reg main_sdram_phaseinjector3_baddress_re = 1'd0; +reg [31:0] main_sdram_phaseinjector3_wrdata_storage = 32'd0; +reg main_sdram_phaseinjector3_wrdata_re = 1'd0; +reg [31:0] main_sdram_phaseinjector3_status = 32'd0; +wire main_sdram_phaseinjector3_we; +wire main_sdram_interface_bank0_valid; +wire main_sdram_interface_bank0_ready; +wire main_sdram_interface_bank0_we; +wire [20:0] main_sdram_interface_bank0_addr; +wire main_sdram_interface_bank0_lock; +wire main_sdram_interface_bank0_wdata_ready; +wire main_sdram_interface_bank0_rdata_valid; +wire main_sdram_interface_bank1_valid; +wire main_sdram_interface_bank1_ready; +wire main_sdram_interface_bank1_we; +wire [20:0] main_sdram_interface_bank1_addr; +wire main_sdram_interface_bank1_lock; +wire main_sdram_interface_bank1_wdata_ready; +wire main_sdram_interface_bank1_rdata_valid; +wire main_sdram_interface_bank2_valid; +wire main_sdram_interface_bank2_ready; +wire main_sdram_interface_bank2_we; +wire [20:0] main_sdram_interface_bank2_addr; +wire main_sdram_interface_bank2_lock; +wire main_sdram_interface_bank2_wdata_ready; +wire main_sdram_interface_bank2_rdata_valid; +wire main_sdram_interface_bank3_valid; +wire main_sdram_interface_bank3_ready; +wire main_sdram_interface_bank3_we; +wire [20:0] main_sdram_interface_bank3_addr; +wire main_sdram_interface_bank3_lock; +wire main_sdram_interface_bank3_wdata_ready; +wire main_sdram_interface_bank3_rdata_valid; +wire main_sdram_interface_bank4_valid; +wire main_sdram_interface_bank4_ready; +wire main_sdram_interface_bank4_we; +wire [20:0] main_sdram_interface_bank4_addr; +wire main_sdram_interface_bank4_lock; +wire main_sdram_interface_bank4_wdata_ready; +wire main_sdram_interface_bank4_rdata_valid; +wire main_sdram_interface_bank5_valid; +wire main_sdram_interface_bank5_ready; +wire main_sdram_interface_bank5_we; +wire [20:0] main_sdram_interface_bank5_addr; +wire main_sdram_interface_bank5_lock; +wire main_sdram_interface_bank5_wdata_ready; +wire main_sdram_interface_bank5_rdata_valid; +wire main_sdram_interface_bank6_valid; +wire main_sdram_interface_bank6_ready; +wire main_sdram_interface_bank6_we; +wire [20:0] main_sdram_interface_bank6_addr; +wire main_sdram_interface_bank6_lock; +wire main_sdram_interface_bank6_wdata_ready; +wire main_sdram_interface_bank6_rdata_valid; +wire main_sdram_interface_bank7_valid; +wire main_sdram_interface_bank7_ready; +wire main_sdram_interface_bank7_we; +wire [20:0] main_sdram_interface_bank7_addr; +wire main_sdram_interface_bank7_lock; +wire main_sdram_interface_bank7_wdata_ready; +wire main_sdram_interface_bank7_rdata_valid; +reg [127:0] main_sdram_interface_wdata = 128'd0; +reg [15:0] main_sdram_interface_wdata_we = 16'd0; +wire [127:0] main_sdram_interface_rdata; +reg [13:0] main_sdram_dfi_p0_address = 14'd0; +reg [2:0] main_sdram_dfi_p0_bank = 3'd0; +reg main_sdram_dfi_p0_cas_n = 1'd1; +reg main_sdram_dfi_p0_cs_n = 1'd1; +reg main_sdram_dfi_p0_ras_n = 1'd1; +reg main_sdram_dfi_p0_we_n = 1'd1; +wire main_sdram_dfi_p0_cke; +wire main_sdram_dfi_p0_odt; +wire main_sdram_dfi_p0_reset_n; +reg main_sdram_dfi_p0_act_n = 1'd1; +wire [31:0] main_sdram_dfi_p0_wrdata; +reg main_sdram_dfi_p0_wrdata_en = 1'd0; +wire [3:0] main_sdram_dfi_p0_wrdata_mask; +reg main_sdram_dfi_p0_rddata_en = 1'd0; +wire [31:0] main_sdram_dfi_p0_rddata; +wire main_sdram_dfi_p0_rddata_valid; +reg [13:0] main_sdram_dfi_p1_address = 14'd0; +reg [2:0] main_sdram_dfi_p1_bank = 3'd0; +reg main_sdram_dfi_p1_cas_n = 1'd1; +reg main_sdram_dfi_p1_cs_n = 1'd1; +reg main_sdram_dfi_p1_ras_n = 1'd1; +reg main_sdram_dfi_p1_we_n = 1'd1; +wire main_sdram_dfi_p1_cke; +wire main_sdram_dfi_p1_odt; +wire main_sdram_dfi_p1_reset_n; +reg main_sdram_dfi_p1_act_n = 1'd1; +wire [31:0] main_sdram_dfi_p1_wrdata; +reg main_sdram_dfi_p1_wrdata_en = 1'd0; +wire [3:0] main_sdram_dfi_p1_wrdata_mask; +reg main_sdram_dfi_p1_rddata_en = 1'd0; +wire [31:0] main_sdram_dfi_p1_rddata; +wire main_sdram_dfi_p1_rddata_valid; +reg [13:0] main_sdram_dfi_p2_address = 14'd0; +reg [2:0] main_sdram_dfi_p2_bank = 3'd0; +reg main_sdram_dfi_p2_cas_n = 1'd1; +reg main_sdram_dfi_p2_cs_n = 1'd1; +reg main_sdram_dfi_p2_ras_n = 1'd1; +reg main_sdram_dfi_p2_we_n = 1'd1; +wire main_sdram_dfi_p2_cke; +wire main_sdram_dfi_p2_odt; +wire main_sdram_dfi_p2_reset_n; +reg main_sdram_dfi_p2_act_n = 1'd1; +wire [31:0] main_sdram_dfi_p2_wrdata; +reg main_sdram_dfi_p2_wrdata_en = 1'd0; +wire [3:0] main_sdram_dfi_p2_wrdata_mask; +reg main_sdram_dfi_p2_rddata_en = 1'd0; +wire [31:0] main_sdram_dfi_p2_rddata; +wire main_sdram_dfi_p2_rddata_valid; +reg [13:0] main_sdram_dfi_p3_address = 14'd0; +reg [2:0] main_sdram_dfi_p3_bank = 3'd0; +reg main_sdram_dfi_p3_cas_n = 1'd1; +reg main_sdram_dfi_p3_cs_n = 1'd1; +reg main_sdram_dfi_p3_ras_n = 1'd1; +reg main_sdram_dfi_p3_we_n = 1'd1; +wire main_sdram_dfi_p3_cke; +wire main_sdram_dfi_p3_odt; +wire main_sdram_dfi_p3_reset_n; +reg main_sdram_dfi_p3_act_n = 1'd1; +wire [31:0] main_sdram_dfi_p3_wrdata; +reg main_sdram_dfi_p3_wrdata_en = 1'd0; +wire [3:0] main_sdram_dfi_p3_wrdata_mask; +reg main_sdram_dfi_p3_rddata_en = 1'd0; +wire [31:0] main_sdram_dfi_p3_rddata; +wire main_sdram_dfi_p3_rddata_valid; +reg main_sdram_cmd_valid = 1'd0; +reg main_sdram_cmd_ready = 1'd0; +reg main_sdram_cmd_last = 1'd0; +reg [13:0] main_sdram_cmd_payload_a = 14'd0; +reg [2:0] main_sdram_cmd_payload_ba = 3'd0; +reg main_sdram_cmd_payload_cas = 1'd0; +reg main_sdram_cmd_payload_ras = 1'd0; +reg main_sdram_cmd_payload_we = 1'd0; +reg main_sdram_cmd_payload_is_read = 1'd0; +reg main_sdram_cmd_payload_is_write = 1'd0; +wire main_sdram_wants_refresh; +wire main_sdram_wants_zqcs; +wire main_sdram_timer_wait; +wire main_sdram_timer_done0; +wire [8:0] main_sdram_timer_count0; +wire main_sdram_timer_done1; +reg [8:0] main_sdram_timer_count1 = 9'd468; +wire main_sdram_postponer_req_i; +reg main_sdram_postponer_req_o = 1'd0; +reg main_sdram_postponer_count = 1'd0; +reg main_sdram_sequencer_start0 = 1'd0; +wire main_sdram_sequencer_done0; +wire main_sdram_sequencer_start1; +reg main_sdram_sequencer_done1 = 1'd0; +reg [5:0] main_sdram_sequencer_counter = 6'd0; +reg main_sdram_sequencer_count = 1'd0; +wire main_sdram_zqcs_timer_wait; +wire main_sdram_zqcs_timer_done0; +wire [25:0] main_sdram_zqcs_timer_count0; +wire main_sdram_zqcs_timer_done1; +reg [25:0] main_sdram_zqcs_timer_count1 = 26'd59999999; +reg main_sdram_zqcs_executer_start = 1'd0; +reg main_sdram_zqcs_executer_done = 1'd0; +reg [4:0] main_sdram_zqcs_executer_counter = 5'd0; +wire main_sdram_bankmachine0_req_valid; +wire main_sdram_bankmachine0_req_ready; +wire main_sdram_bankmachine0_req_we; +wire [20:0] main_sdram_bankmachine0_req_addr; +wire main_sdram_bankmachine0_req_lock; +reg main_sdram_bankmachine0_req_wdata_ready = 1'd0; +reg main_sdram_bankmachine0_req_rdata_valid = 1'd0; +wire main_sdram_bankmachine0_refresh_req; +reg main_sdram_bankmachine0_refresh_gnt = 1'd0; +reg main_sdram_bankmachine0_cmd_valid = 1'd0; +reg main_sdram_bankmachine0_cmd_ready = 1'd0; +reg [13:0] main_sdram_bankmachine0_cmd_payload_a = 14'd0; +wire [2:0] main_sdram_bankmachine0_cmd_payload_ba; +reg main_sdram_bankmachine0_cmd_payload_cas = 1'd0; +reg main_sdram_bankmachine0_cmd_payload_ras = 1'd0; +reg main_sdram_bankmachine0_cmd_payload_we = 1'd0; +reg main_sdram_bankmachine0_cmd_payload_is_cmd = 1'd0; +reg main_sdram_bankmachine0_cmd_payload_is_read = 1'd0; +reg main_sdram_bankmachine0_cmd_payload_is_write = 1'd0; +reg main_sdram_bankmachine0_auto_precharge = 1'd0; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; +reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first = 1'd0; +reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last = 1'd0; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; +wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; +wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; +wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; +reg [3:0] main_sdram_bankmachine0_cmd_buffer_lookahead_level = 4'd0; +reg main_sdram_bankmachine0_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we; +wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_do_read; +wire [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr; +wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; +wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; +wire main_sdram_bankmachine0_cmd_buffer_sink_valid; +wire main_sdram_bankmachine0_cmd_buffer_sink_ready; +wire main_sdram_bankmachine0_cmd_buffer_sink_first; +wire main_sdram_bankmachine0_cmd_buffer_sink_last; +wire main_sdram_bankmachine0_cmd_buffer_sink_payload_we; +wire [20:0] main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; +reg main_sdram_bankmachine0_cmd_buffer_source_valid = 1'd0; +wire main_sdram_bankmachine0_cmd_buffer_source_ready; +reg main_sdram_bankmachine0_cmd_buffer_source_first = 1'd0; +reg main_sdram_bankmachine0_cmd_buffer_source_last = 1'd0; +reg main_sdram_bankmachine0_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] main_sdram_bankmachine0_cmd_buffer_source_payload_addr = 21'd0; +reg [13:0] main_sdram_bankmachine0_row = 14'd0; +reg main_sdram_bankmachine0_row_opened = 1'd0; +wire main_sdram_bankmachine0_row_hit; +reg main_sdram_bankmachine0_row_open = 1'd0; +reg main_sdram_bankmachine0_row_close = 1'd0; +reg main_sdram_bankmachine0_row_col_n_addr_sel = 1'd0; +wire main_sdram_bankmachine0_twtpcon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine0_twtpcon_ready = 1'd1; +reg [2:0] main_sdram_bankmachine0_twtpcon_count = 3'd0; +wire main_sdram_bankmachine0_trccon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine0_trccon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine0_trccon_count = 2'd0; +wire main_sdram_bankmachine0_trascon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine0_trascon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine0_trascon_count = 2'd0; +wire main_sdram_bankmachine1_req_valid; +wire main_sdram_bankmachine1_req_ready; +wire main_sdram_bankmachine1_req_we; +wire [20:0] main_sdram_bankmachine1_req_addr; +wire main_sdram_bankmachine1_req_lock; +reg main_sdram_bankmachine1_req_wdata_ready = 1'd0; +reg main_sdram_bankmachine1_req_rdata_valid = 1'd0; +wire main_sdram_bankmachine1_refresh_req; +reg main_sdram_bankmachine1_refresh_gnt = 1'd0; +reg main_sdram_bankmachine1_cmd_valid = 1'd0; +reg main_sdram_bankmachine1_cmd_ready = 1'd0; +reg [13:0] main_sdram_bankmachine1_cmd_payload_a = 14'd0; +wire [2:0] main_sdram_bankmachine1_cmd_payload_ba; +reg main_sdram_bankmachine1_cmd_payload_cas = 1'd0; +reg main_sdram_bankmachine1_cmd_payload_ras = 1'd0; +reg main_sdram_bankmachine1_cmd_payload_we = 1'd0; +reg main_sdram_bankmachine1_cmd_payload_is_cmd = 1'd0; +reg main_sdram_bankmachine1_cmd_payload_is_read = 1'd0; +reg main_sdram_bankmachine1_cmd_payload_is_write = 1'd0; +reg main_sdram_bankmachine1_auto_precharge = 1'd0; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; +reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first = 1'd0; +reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last = 1'd0; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; +wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; +wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; +wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; +reg [3:0] main_sdram_bankmachine1_cmd_buffer_lookahead_level = 4'd0; +reg main_sdram_bankmachine1_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we; +wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_do_read; +wire [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr; +wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; +wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; +wire main_sdram_bankmachine1_cmd_buffer_sink_valid; +wire main_sdram_bankmachine1_cmd_buffer_sink_ready; +wire main_sdram_bankmachine1_cmd_buffer_sink_first; +wire main_sdram_bankmachine1_cmd_buffer_sink_last; +wire main_sdram_bankmachine1_cmd_buffer_sink_payload_we; +wire [20:0] main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; +reg main_sdram_bankmachine1_cmd_buffer_source_valid = 1'd0; +wire main_sdram_bankmachine1_cmd_buffer_source_ready; +reg main_sdram_bankmachine1_cmd_buffer_source_first = 1'd0; +reg main_sdram_bankmachine1_cmd_buffer_source_last = 1'd0; +reg main_sdram_bankmachine1_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] main_sdram_bankmachine1_cmd_buffer_source_payload_addr = 21'd0; +reg [13:0] main_sdram_bankmachine1_row = 14'd0; +reg main_sdram_bankmachine1_row_opened = 1'd0; +wire main_sdram_bankmachine1_row_hit; +reg main_sdram_bankmachine1_row_open = 1'd0; +reg main_sdram_bankmachine1_row_close = 1'd0; +reg main_sdram_bankmachine1_row_col_n_addr_sel = 1'd0; +wire main_sdram_bankmachine1_twtpcon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine1_twtpcon_ready = 1'd1; +reg [2:0] main_sdram_bankmachine1_twtpcon_count = 3'd0; +wire main_sdram_bankmachine1_trccon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine1_trccon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine1_trccon_count = 2'd0; +wire main_sdram_bankmachine1_trascon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine1_trascon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine1_trascon_count = 2'd0; +wire main_sdram_bankmachine2_req_valid; +wire main_sdram_bankmachine2_req_ready; +wire main_sdram_bankmachine2_req_we; +wire [20:0] main_sdram_bankmachine2_req_addr; +wire main_sdram_bankmachine2_req_lock; +reg main_sdram_bankmachine2_req_wdata_ready = 1'd0; +reg main_sdram_bankmachine2_req_rdata_valid = 1'd0; +wire main_sdram_bankmachine2_refresh_req; +reg main_sdram_bankmachine2_refresh_gnt = 1'd0; +reg main_sdram_bankmachine2_cmd_valid = 1'd0; +reg main_sdram_bankmachine2_cmd_ready = 1'd0; +reg [13:0] main_sdram_bankmachine2_cmd_payload_a = 14'd0; +wire [2:0] main_sdram_bankmachine2_cmd_payload_ba; +reg main_sdram_bankmachine2_cmd_payload_cas = 1'd0; +reg main_sdram_bankmachine2_cmd_payload_ras = 1'd0; +reg main_sdram_bankmachine2_cmd_payload_we = 1'd0; +reg main_sdram_bankmachine2_cmd_payload_is_cmd = 1'd0; +reg main_sdram_bankmachine2_cmd_payload_is_read = 1'd0; +reg main_sdram_bankmachine2_cmd_payload_is_write = 1'd0; +reg main_sdram_bankmachine2_auto_precharge = 1'd0; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; +reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first = 1'd0; +reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last = 1'd0; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; +wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; +wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; +wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; +reg [3:0] main_sdram_bankmachine2_cmd_buffer_lookahead_level = 4'd0; +reg main_sdram_bankmachine2_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we; +wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_do_read; +wire [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr; +wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; +wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; +wire main_sdram_bankmachine2_cmd_buffer_sink_valid; +wire main_sdram_bankmachine2_cmd_buffer_sink_ready; +wire main_sdram_bankmachine2_cmd_buffer_sink_first; +wire main_sdram_bankmachine2_cmd_buffer_sink_last; +wire main_sdram_bankmachine2_cmd_buffer_sink_payload_we; +wire [20:0] main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; +reg main_sdram_bankmachine2_cmd_buffer_source_valid = 1'd0; +wire main_sdram_bankmachine2_cmd_buffer_source_ready; +reg main_sdram_bankmachine2_cmd_buffer_source_first = 1'd0; +reg main_sdram_bankmachine2_cmd_buffer_source_last = 1'd0; +reg main_sdram_bankmachine2_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] main_sdram_bankmachine2_cmd_buffer_source_payload_addr = 21'd0; +reg [13:0] main_sdram_bankmachine2_row = 14'd0; +reg main_sdram_bankmachine2_row_opened = 1'd0; +wire main_sdram_bankmachine2_row_hit; +reg main_sdram_bankmachine2_row_open = 1'd0; +reg main_sdram_bankmachine2_row_close = 1'd0; +reg main_sdram_bankmachine2_row_col_n_addr_sel = 1'd0; +wire main_sdram_bankmachine2_twtpcon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine2_twtpcon_ready = 1'd1; +reg [2:0] main_sdram_bankmachine2_twtpcon_count = 3'd0; +wire main_sdram_bankmachine2_trccon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine2_trccon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine2_trccon_count = 2'd0; +wire main_sdram_bankmachine2_trascon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine2_trascon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine2_trascon_count = 2'd0; +wire main_sdram_bankmachine3_req_valid; +wire main_sdram_bankmachine3_req_ready; +wire main_sdram_bankmachine3_req_we; +wire [20:0] main_sdram_bankmachine3_req_addr; +wire main_sdram_bankmachine3_req_lock; +reg main_sdram_bankmachine3_req_wdata_ready = 1'd0; +reg main_sdram_bankmachine3_req_rdata_valid = 1'd0; +wire main_sdram_bankmachine3_refresh_req; +reg main_sdram_bankmachine3_refresh_gnt = 1'd0; +reg main_sdram_bankmachine3_cmd_valid = 1'd0; +reg main_sdram_bankmachine3_cmd_ready = 1'd0; +reg [13:0] main_sdram_bankmachine3_cmd_payload_a = 14'd0; +wire [2:0] main_sdram_bankmachine3_cmd_payload_ba; +reg main_sdram_bankmachine3_cmd_payload_cas = 1'd0; +reg main_sdram_bankmachine3_cmd_payload_ras = 1'd0; +reg main_sdram_bankmachine3_cmd_payload_we = 1'd0; +reg main_sdram_bankmachine3_cmd_payload_is_cmd = 1'd0; +reg main_sdram_bankmachine3_cmd_payload_is_read = 1'd0; +reg main_sdram_bankmachine3_cmd_payload_is_write = 1'd0; +reg main_sdram_bankmachine3_auto_precharge = 1'd0; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; +reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first = 1'd0; +reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last = 1'd0; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; +wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; +wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; +wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; +reg [3:0] main_sdram_bankmachine3_cmd_buffer_lookahead_level = 4'd0; +reg main_sdram_bankmachine3_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we; +wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_do_read; +wire [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr; +wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; +wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; +wire main_sdram_bankmachine3_cmd_buffer_sink_valid; +wire main_sdram_bankmachine3_cmd_buffer_sink_ready; +wire main_sdram_bankmachine3_cmd_buffer_sink_first; +wire main_sdram_bankmachine3_cmd_buffer_sink_last; +wire main_sdram_bankmachine3_cmd_buffer_sink_payload_we; +wire [20:0] main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; +reg main_sdram_bankmachine3_cmd_buffer_source_valid = 1'd0; +wire main_sdram_bankmachine3_cmd_buffer_source_ready; +reg main_sdram_bankmachine3_cmd_buffer_source_first = 1'd0; +reg main_sdram_bankmachine3_cmd_buffer_source_last = 1'd0; +reg main_sdram_bankmachine3_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] main_sdram_bankmachine3_cmd_buffer_source_payload_addr = 21'd0; +reg [13:0] main_sdram_bankmachine3_row = 14'd0; +reg main_sdram_bankmachine3_row_opened = 1'd0; +wire main_sdram_bankmachine3_row_hit; +reg main_sdram_bankmachine3_row_open = 1'd0; +reg main_sdram_bankmachine3_row_close = 1'd0; +reg main_sdram_bankmachine3_row_col_n_addr_sel = 1'd0; +wire main_sdram_bankmachine3_twtpcon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine3_twtpcon_ready = 1'd1; +reg [2:0] main_sdram_bankmachine3_twtpcon_count = 3'd0; +wire main_sdram_bankmachine3_trccon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine3_trccon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine3_trccon_count = 2'd0; +wire main_sdram_bankmachine3_trascon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine3_trascon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine3_trascon_count = 2'd0; +wire main_sdram_bankmachine4_req_valid; +wire main_sdram_bankmachine4_req_ready; +wire main_sdram_bankmachine4_req_we; +wire [20:0] main_sdram_bankmachine4_req_addr; +wire main_sdram_bankmachine4_req_lock; +reg main_sdram_bankmachine4_req_wdata_ready = 1'd0; +reg main_sdram_bankmachine4_req_rdata_valid = 1'd0; +wire main_sdram_bankmachine4_refresh_req; +reg main_sdram_bankmachine4_refresh_gnt = 1'd0; +reg main_sdram_bankmachine4_cmd_valid = 1'd0; +reg main_sdram_bankmachine4_cmd_ready = 1'd0; +reg [13:0] main_sdram_bankmachine4_cmd_payload_a = 14'd0; +wire [2:0] main_sdram_bankmachine4_cmd_payload_ba; +reg main_sdram_bankmachine4_cmd_payload_cas = 1'd0; +reg main_sdram_bankmachine4_cmd_payload_ras = 1'd0; +reg main_sdram_bankmachine4_cmd_payload_we = 1'd0; +reg main_sdram_bankmachine4_cmd_payload_is_cmd = 1'd0; +reg main_sdram_bankmachine4_cmd_payload_is_read = 1'd0; +reg main_sdram_bankmachine4_cmd_payload_is_write = 1'd0; +reg main_sdram_bankmachine4_auto_precharge = 1'd0; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; +reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first = 1'd0; +reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last = 1'd0; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; +wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; +wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; +wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; +reg [3:0] main_sdram_bankmachine4_cmd_buffer_lookahead_level = 4'd0; +reg main_sdram_bankmachine4_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we; +wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_do_read; +wire [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr; +wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; +wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; +wire main_sdram_bankmachine4_cmd_buffer_sink_valid; +wire main_sdram_bankmachine4_cmd_buffer_sink_ready; +wire main_sdram_bankmachine4_cmd_buffer_sink_first; +wire main_sdram_bankmachine4_cmd_buffer_sink_last; +wire main_sdram_bankmachine4_cmd_buffer_sink_payload_we; +wire [20:0] main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; +reg main_sdram_bankmachine4_cmd_buffer_source_valid = 1'd0; +wire main_sdram_bankmachine4_cmd_buffer_source_ready; +reg main_sdram_bankmachine4_cmd_buffer_source_first = 1'd0; +reg main_sdram_bankmachine4_cmd_buffer_source_last = 1'd0; +reg main_sdram_bankmachine4_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] main_sdram_bankmachine4_cmd_buffer_source_payload_addr = 21'd0; +reg [13:0] main_sdram_bankmachine4_row = 14'd0; +reg main_sdram_bankmachine4_row_opened = 1'd0; +wire main_sdram_bankmachine4_row_hit; +reg main_sdram_bankmachine4_row_open = 1'd0; +reg main_sdram_bankmachine4_row_close = 1'd0; +reg main_sdram_bankmachine4_row_col_n_addr_sel = 1'd0; +wire main_sdram_bankmachine4_twtpcon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine4_twtpcon_ready = 1'd1; +reg [2:0] main_sdram_bankmachine4_twtpcon_count = 3'd0; +wire main_sdram_bankmachine4_trccon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine4_trccon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine4_trccon_count = 2'd0; +wire main_sdram_bankmachine4_trascon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine4_trascon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine4_trascon_count = 2'd0; +wire main_sdram_bankmachine5_req_valid; +wire main_sdram_bankmachine5_req_ready; +wire main_sdram_bankmachine5_req_we; +wire [20:0] main_sdram_bankmachine5_req_addr; +wire main_sdram_bankmachine5_req_lock; +reg main_sdram_bankmachine5_req_wdata_ready = 1'd0; +reg main_sdram_bankmachine5_req_rdata_valid = 1'd0; +wire main_sdram_bankmachine5_refresh_req; +reg main_sdram_bankmachine5_refresh_gnt = 1'd0; +reg main_sdram_bankmachine5_cmd_valid = 1'd0; +reg main_sdram_bankmachine5_cmd_ready = 1'd0; +reg [13:0] main_sdram_bankmachine5_cmd_payload_a = 14'd0; +wire [2:0] main_sdram_bankmachine5_cmd_payload_ba; +reg main_sdram_bankmachine5_cmd_payload_cas = 1'd0; +reg main_sdram_bankmachine5_cmd_payload_ras = 1'd0; +reg main_sdram_bankmachine5_cmd_payload_we = 1'd0; +reg main_sdram_bankmachine5_cmd_payload_is_cmd = 1'd0; +reg main_sdram_bankmachine5_cmd_payload_is_read = 1'd0; +reg main_sdram_bankmachine5_cmd_payload_is_write = 1'd0; +reg main_sdram_bankmachine5_auto_precharge = 1'd0; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; +reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first = 1'd0; +reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last = 1'd0; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; +wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; +wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; +wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; +reg [3:0] main_sdram_bankmachine5_cmd_buffer_lookahead_level = 4'd0; +reg main_sdram_bankmachine5_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we; +wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_do_read; +wire [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr; +wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; +wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; +wire main_sdram_bankmachine5_cmd_buffer_sink_valid; +wire main_sdram_bankmachine5_cmd_buffer_sink_ready; +wire main_sdram_bankmachine5_cmd_buffer_sink_first; +wire main_sdram_bankmachine5_cmd_buffer_sink_last; +wire main_sdram_bankmachine5_cmd_buffer_sink_payload_we; +wire [20:0] main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; +reg main_sdram_bankmachine5_cmd_buffer_source_valid = 1'd0; +wire main_sdram_bankmachine5_cmd_buffer_source_ready; +reg main_sdram_bankmachine5_cmd_buffer_source_first = 1'd0; +reg main_sdram_bankmachine5_cmd_buffer_source_last = 1'd0; +reg main_sdram_bankmachine5_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] main_sdram_bankmachine5_cmd_buffer_source_payload_addr = 21'd0; +reg [13:0] main_sdram_bankmachine5_row = 14'd0; +reg main_sdram_bankmachine5_row_opened = 1'd0; +wire main_sdram_bankmachine5_row_hit; +reg main_sdram_bankmachine5_row_open = 1'd0; +reg main_sdram_bankmachine5_row_close = 1'd0; +reg main_sdram_bankmachine5_row_col_n_addr_sel = 1'd0; +wire main_sdram_bankmachine5_twtpcon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine5_twtpcon_ready = 1'd1; +reg [2:0] main_sdram_bankmachine5_twtpcon_count = 3'd0; +wire main_sdram_bankmachine5_trccon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine5_trccon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine5_trccon_count = 2'd0; +wire main_sdram_bankmachine5_trascon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine5_trascon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine5_trascon_count = 2'd0; +wire main_sdram_bankmachine6_req_valid; +wire main_sdram_bankmachine6_req_ready; +wire main_sdram_bankmachine6_req_we; +wire [20:0] main_sdram_bankmachine6_req_addr; +wire main_sdram_bankmachine6_req_lock; +reg main_sdram_bankmachine6_req_wdata_ready = 1'd0; +reg main_sdram_bankmachine6_req_rdata_valid = 1'd0; +wire main_sdram_bankmachine6_refresh_req; +reg main_sdram_bankmachine6_refresh_gnt = 1'd0; +reg main_sdram_bankmachine6_cmd_valid = 1'd0; +reg main_sdram_bankmachine6_cmd_ready = 1'd0; +reg [13:0] main_sdram_bankmachine6_cmd_payload_a = 14'd0; +wire [2:0] main_sdram_bankmachine6_cmd_payload_ba; +reg main_sdram_bankmachine6_cmd_payload_cas = 1'd0; +reg main_sdram_bankmachine6_cmd_payload_ras = 1'd0; +reg main_sdram_bankmachine6_cmd_payload_we = 1'd0; +reg main_sdram_bankmachine6_cmd_payload_is_cmd = 1'd0; +reg main_sdram_bankmachine6_cmd_payload_is_read = 1'd0; +reg main_sdram_bankmachine6_cmd_payload_is_write = 1'd0; +reg main_sdram_bankmachine6_auto_precharge = 1'd0; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; +reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first = 1'd0; +reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last = 1'd0; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; +wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; +wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; +wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; +reg [3:0] main_sdram_bankmachine6_cmd_buffer_lookahead_level = 4'd0; +reg main_sdram_bankmachine6_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we; +wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_do_read; +wire [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr; +wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; +wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; +wire main_sdram_bankmachine6_cmd_buffer_sink_valid; +wire main_sdram_bankmachine6_cmd_buffer_sink_ready; +wire main_sdram_bankmachine6_cmd_buffer_sink_first; +wire main_sdram_bankmachine6_cmd_buffer_sink_last; +wire main_sdram_bankmachine6_cmd_buffer_sink_payload_we; +wire [20:0] main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; +reg main_sdram_bankmachine6_cmd_buffer_source_valid = 1'd0; +wire main_sdram_bankmachine6_cmd_buffer_source_ready; +reg main_sdram_bankmachine6_cmd_buffer_source_first = 1'd0; +reg main_sdram_bankmachine6_cmd_buffer_source_last = 1'd0; +reg main_sdram_bankmachine6_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] main_sdram_bankmachine6_cmd_buffer_source_payload_addr = 21'd0; +reg [13:0] main_sdram_bankmachine6_row = 14'd0; +reg main_sdram_bankmachine6_row_opened = 1'd0; +wire main_sdram_bankmachine6_row_hit; +reg main_sdram_bankmachine6_row_open = 1'd0; +reg main_sdram_bankmachine6_row_close = 1'd0; +reg main_sdram_bankmachine6_row_col_n_addr_sel = 1'd0; +wire main_sdram_bankmachine6_twtpcon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine6_twtpcon_ready = 1'd1; +reg [2:0] main_sdram_bankmachine6_twtpcon_count = 3'd0; +wire main_sdram_bankmachine6_trccon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine6_trccon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine6_trccon_count = 2'd0; +wire main_sdram_bankmachine6_trascon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine6_trascon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine6_trascon_count = 2'd0; +wire main_sdram_bankmachine7_req_valid; +wire main_sdram_bankmachine7_req_ready; +wire main_sdram_bankmachine7_req_we; +wire [20:0] main_sdram_bankmachine7_req_addr; +wire main_sdram_bankmachine7_req_lock; +reg main_sdram_bankmachine7_req_wdata_ready = 1'd0; +reg main_sdram_bankmachine7_req_rdata_valid = 1'd0; +wire main_sdram_bankmachine7_refresh_req; +reg main_sdram_bankmachine7_refresh_gnt = 1'd0; +reg main_sdram_bankmachine7_cmd_valid = 1'd0; +reg main_sdram_bankmachine7_cmd_ready = 1'd0; +reg [13:0] main_sdram_bankmachine7_cmd_payload_a = 14'd0; +wire [2:0] main_sdram_bankmachine7_cmd_payload_ba; +reg main_sdram_bankmachine7_cmd_payload_cas = 1'd0; +reg main_sdram_bankmachine7_cmd_payload_ras = 1'd0; +reg main_sdram_bankmachine7_cmd_payload_we = 1'd0; +reg main_sdram_bankmachine7_cmd_payload_is_cmd = 1'd0; +reg main_sdram_bankmachine7_cmd_payload_is_read = 1'd0; +reg main_sdram_bankmachine7_cmd_payload_is_write = 1'd0; +reg main_sdram_bankmachine7_auto_precharge = 1'd0; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; +reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first = 1'd0; +reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last = 1'd0; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; +wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; +wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; +wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; +reg [3:0] main_sdram_bankmachine7_cmd_buffer_lookahead_level = 4'd0; +reg main_sdram_bankmachine7_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we; +wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_do_read; +wire [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr; +wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; +wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; +wire main_sdram_bankmachine7_cmd_buffer_sink_valid; +wire main_sdram_bankmachine7_cmd_buffer_sink_ready; +wire main_sdram_bankmachine7_cmd_buffer_sink_first; +wire main_sdram_bankmachine7_cmd_buffer_sink_last; +wire main_sdram_bankmachine7_cmd_buffer_sink_payload_we; +wire [20:0] main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; +reg main_sdram_bankmachine7_cmd_buffer_source_valid = 1'd0; +wire main_sdram_bankmachine7_cmd_buffer_source_ready; +reg main_sdram_bankmachine7_cmd_buffer_source_first = 1'd0; +reg main_sdram_bankmachine7_cmd_buffer_source_last = 1'd0; +reg main_sdram_bankmachine7_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] main_sdram_bankmachine7_cmd_buffer_source_payload_addr = 21'd0; +reg [13:0] main_sdram_bankmachine7_row = 14'd0; +reg main_sdram_bankmachine7_row_opened = 1'd0; +wire main_sdram_bankmachine7_row_hit; +reg main_sdram_bankmachine7_row_open = 1'd0; +reg main_sdram_bankmachine7_row_close = 1'd0; +reg main_sdram_bankmachine7_row_col_n_addr_sel = 1'd0; +wire main_sdram_bankmachine7_twtpcon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine7_twtpcon_ready = 1'd1; +reg [2:0] main_sdram_bankmachine7_twtpcon_count = 3'd0; +wire main_sdram_bankmachine7_trccon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine7_trccon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine7_trccon_count = 2'd0; +wire main_sdram_bankmachine7_trascon_valid; +(* dont_touch = "true" *) reg main_sdram_bankmachine7_trascon_ready = 1'd1; +reg [1:0] main_sdram_bankmachine7_trascon_count = 2'd0; +wire main_sdram_ras_allowed; +wire main_sdram_cas_allowed; +reg main_sdram_choose_cmd_want_reads = 1'd0; +reg main_sdram_choose_cmd_want_writes = 1'd0; +reg main_sdram_choose_cmd_want_cmds = 1'd0; +reg main_sdram_choose_cmd_want_activates = 1'd0; +wire main_sdram_choose_cmd_cmd_valid; +reg main_sdram_choose_cmd_cmd_ready = 1'd0; +wire [13:0] main_sdram_choose_cmd_cmd_payload_a; +wire [2:0] main_sdram_choose_cmd_cmd_payload_ba; +reg main_sdram_choose_cmd_cmd_payload_cas = 1'd0; +reg main_sdram_choose_cmd_cmd_payload_ras = 1'd0; +reg main_sdram_choose_cmd_cmd_payload_we = 1'd0; +wire main_sdram_choose_cmd_cmd_payload_is_cmd; +wire main_sdram_choose_cmd_cmd_payload_is_read; +wire main_sdram_choose_cmd_cmd_payload_is_write; +reg [7:0] main_sdram_choose_cmd_valids = 8'd0; +wire [7:0] main_sdram_choose_cmd_request; +reg [2:0] main_sdram_choose_cmd_grant = 3'd0; +wire main_sdram_choose_cmd_ce; +reg main_sdram_choose_req_want_reads = 1'd0; +reg main_sdram_choose_req_want_writes = 1'd0; +reg main_sdram_choose_req_want_cmds = 1'd0; +reg main_sdram_choose_req_want_activates = 1'd0; +wire main_sdram_choose_req_cmd_valid; +reg main_sdram_choose_req_cmd_ready = 1'd0; +wire [13:0] main_sdram_choose_req_cmd_payload_a; +wire [2:0] main_sdram_choose_req_cmd_payload_ba; +reg main_sdram_choose_req_cmd_payload_cas = 1'd0; +reg main_sdram_choose_req_cmd_payload_ras = 1'd0; +reg main_sdram_choose_req_cmd_payload_we = 1'd0; +wire main_sdram_choose_req_cmd_payload_is_cmd; +wire main_sdram_choose_req_cmd_payload_is_read; +wire main_sdram_choose_req_cmd_payload_is_write; +reg [7:0] main_sdram_choose_req_valids = 8'd0; +wire [7:0] main_sdram_choose_req_request; +reg [2:0] main_sdram_choose_req_grant = 3'd0; +wire main_sdram_choose_req_ce; +reg [13:0] main_sdram_nop_a = 14'd0; +reg [2:0] main_sdram_nop_ba = 3'd0; +reg [1:0] main_sdram_steerer_sel0 = 2'd0; +reg [1:0] main_sdram_steerer_sel1 = 2'd0; +reg [1:0] main_sdram_steerer_sel2 = 2'd0; +reg [1:0] main_sdram_steerer_sel3 = 2'd0; +reg main_sdram_steerer0 = 1'd1; +reg main_sdram_steerer1 = 1'd1; +reg main_sdram_steerer2 = 1'd1; +reg main_sdram_steerer3 = 1'd1; +reg main_sdram_steerer4 = 1'd1; +reg main_sdram_steerer5 = 1'd1; +reg main_sdram_steerer6 = 1'd1; +reg main_sdram_steerer7 = 1'd1; +wire main_sdram_trrdcon_valid; +(* dont_touch = "true" *) reg main_sdram_trrdcon_ready = 1'd1; +reg main_sdram_trrdcon_count = 1'd0; +wire main_sdram_tfawcon_valid; +(* dont_touch = "true" *) reg main_sdram_tfawcon_ready = 1'd1; +wire [1:0] main_sdram_tfawcon_count; +reg [3:0] main_sdram_tfawcon_window = 4'd0; +wire main_sdram_tccdcon_valid; +(* dont_touch = "true" *) reg main_sdram_tccdcon_ready = 1'd1; +reg main_sdram_tccdcon_count = 1'd0; +wire main_sdram_twtrcon_valid; +(* dont_touch = "true" *) reg main_sdram_twtrcon_ready = 1'd1; +reg [2:0] main_sdram_twtrcon_count = 3'd0; +wire main_sdram_read_available; +wire main_sdram_write_available; +reg main_sdram_en0 = 1'd0; +wire main_sdram_max_time0; +reg [4:0] main_sdram_time0 = 5'd0; +reg main_sdram_en1 = 1'd0; +wire main_sdram_max_time1; +reg [3:0] main_sdram_time1 = 4'd0; +wire main_sdram_go_to_refresh; +reg main_port_cmd_valid = 1'd0; +wire main_port_cmd_ready; +reg main_port_cmd_payload_we = 1'd0; +reg [23:0] main_port_cmd_payload_addr = 24'd0; +wire main_port_wdata_valid; +wire main_port_wdata_ready; +wire main_port_wdata_first; +wire main_port_wdata_last; +wire [127:0] main_port_wdata_payload_data; +wire [15:0] main_port_wdata_payload_we; +wire main_port_rdata_valid; +wire main_port_rdata_ready; +reg main_port_rdata_first = 1'd0; +reg main_port_rdata_last = 1'd0; +wire [127:0] main_port_rdata_payload_data; +wire [29:0] main_interface1_wb_sdram_adr; +wire [31:0] main_interface1_wb_sdram_dat_w; +wire [31:0] main_interface1_wb_sdram_dat_r; +wire [3:0] main_interface1_wb_sdram_sel; +wire main_interface1_wb_sdram_cyc; +wire main_interface1_wb_sdram_stb; +wire main_interface1_wb_sdram_ack; +wire main_interface1_wb_sdram_we; +wire [2:0] main_interface1_wb_sdram_cti; +wire [1:0] main_interface1_wb_sdram_bte; +wire main_interface1_wb_sdram_err; +wire [29:0] main_adr; +wire [127:0] main_dat_w; +wire [127:0] main_dat_r; +wire [15:0] main_sel; +reg main_cyc = 1'd0; +reg main_stb = 1'd0; +reg main_ack = 1'd0; +reg main_we = 1'd0; +wire [8:0] main_data_port_adr; +wire [127:0] main_data_port_dat_r; +reg [15:0] main_data_port_we = 16'd0; +reg [127:0] main_data_port_dat_w = 128'd0; +reg main_write_from_slave = 1'd0; +reg [1:0] main_adr_offset_r = 2'd0; +wire [8:0] main_tag_port_adr; +wire [23:0] main_tag_port_dat_r; +reg main_tag_port_we = 1'd0; +wire [23:0] main_tag_port_dat_w; +wire [22:0] main_tag_do_tag; +wire main_tag_do_dirty; +wire [22:0] main_tag_di_tag; +reg main_tag_di_dirty = 1'd0; +reg main_word_clr = 1'd0; +reg main_word_inc = 1'd0; +wire main_wdata_converter_sink_valid; +wire main_wdata_converter_sink_ready; +reg main_wdata_converter_sink_first = 1'd0; +reg main_wdata_converter_sink_last = 1'd0; +wire [127:0] main_wdata_converter_sink_payload_data; +wire [15:0] main_wdata_converter_sink_payload_we; +wire main_wdata_converter_source_valid; +wire main_wdata_converter_source_ready; +wire main_wdata_converter_source_first; +wire main_wdata_converter_source_last; +wire [127:0] main_wdata_converter_source_payload_data; +wire [15:0] main_wdata_converter_source_payload_we; +wire main_wdata_converter_converter_sink_valid; +wire main_wdata_converter_converter_sink_ready; +wire main_wdata_converter_converter_sink_first; +wire main_wdata_converter_converter_sink_last; +wire [143:0] main_wdata_converter_converter_sink_payload_data; +wire main_wdata_converter_converter_source_valid; +wire main_wdata_converter_converter_source_ready; +wire main_wdata_converter_converter_source_first; +wire main_wdata_converter_converter_source_last; +wire [143:0] main_wdata_converter_converter_source_payload_data; +wire main_wdata_converter_converter_source_payload_valid_token_count; +wire main_wdata_converter_source_source_valid; +wire main_wdata_converter_source_source_ready; +wire main_wdata_converter_source_source_first; +wire main_wdata_converter_source_source_last; +wire [143:0] main_wdata_converter_source_source_payload_data; +wire main_rdata_converter_sink_valid; +wire main_rdata_converter_sink_ready; +wire main_rdata_converter_sink_first; +wire main_rdata_converter_sink_last; +wire [127:0] main_rdata_converter_sink_payload_data; +wire main_rdata_converter_source_valid; +wire main_rdata_converter_source_ready; +wire main_rdata_converter_source_first; +wire main_rdata_converter_source_last; +wire [127:0] main_rdata_converter_source_payload_data; +wire main_rdata_converter_converter_sink_valid; +wire main_rdata_converter_converter_sink_ready; +wire main_rdata_converter_converter_sink_first; +wire main_rdata_converter_converter_sink_last; +wire [127:0] main_rdata_converter_converter_sink_payload_data; +wire main_rdata_converter_converter_source_valid; +wire main_rdata_converter_converter_source_ready; +wire main_rdata_converter_converter_source_first; +wire main_rdata_converter_converter_source_last; +wire [127:0] main_rdata_converter_converter_source_payload_data; +wire main_rdata_converter_converter_source_payload_valid_token_count; +wire main_rdata_converter_source_source_valid; +wire main_rdata_converter_source_source_ready; +wire main_rdata_converter_source_source_first; +wire main_rdata_converter_source_source_last; +wire [127:0] main_rdata_converter_source_source_payload_data; +reg main_count = 1'd0; +reg builder_wb2csr_state = 1'd0; +reg builder_wb2csr_next_state = 1'd0; +wire builder_pll_fb; +reg [1:0] builder_refresher_state = 2'd0; +reg [1:0] builder_refresher_next_state = 2'd0; +reg [2:0] builder_bankmachine0_state = 3'd0; +reg [2:0] builder_bankmachine0_next_state = 3'd0; +reg [2:0] builder_bankmachine1_state = 3'd0; +reg [2:0] builder_bankmachine1_next_state = 3'd0; +reg [2:0] builder_bankmachine2_state = 3'd0; +reg [2:0] builder_bankmachine2_next_state = 3'd0; +reg [2:0] builder_bankmachine3_state = 3'd0; +reg [2:0] builder_bankmachine3_next_state = 3'd0; +reg [2:0] builder_bankmachine4_state = 3'd0; +reg [2:0] builder_bankmachine4_next_state = 3'd0; +reg [2:0] builder_bankmachine5_state = 3'd0; +reg [2:0] builder_bankmachine5_next_state = 3'd0; +reg [2:0] builder_bankmachine6_state = 3'd0; +reg [2:0] builder_bankmachine6_next_state = 3'd0; +reg [2:0] builder_bankmachine7_state = 3'd0; +reg [2:0] builder_bankmachine7_next_state = 3'd0; +reg [3:0] builder_multiplexer_state = 4'd0; +reg [3:0] builder_multiplexer_next_state = 4'd0; +wire builder_roundrobin0_request; +wire builder_roundrobin0_grant; +wire builder_roundrobin0_ce; +wire builder_roundrobin1_request; +wire builder_roundrobin1_grant; +wire builder_roundrobin1_ce; +wire builder_roundrobin2_request; +wire builder_roundrobin2_grant; +wire builder_roundrobin2_ce; +wire builder_roundrobin3_request; +wire builder_roundrobin3_grant; +wire builder_roundrobin3_ce; +wire builder_roundrobin4_request; +wire builder_roundrobin4_grant; +wire builder_roundrobin4_ce; +wire builder_roundrobin5_request; +wire builder_roundrobin5_grant; +wire builder_roundrobin5_ce; +wire builder_roundrobin6_request; +wire builder_roundrobin6_grant; +wire builder_roundrobin6_ce; +wire builder_roundrobin7_request; +wire builder_roundrobin7_grant; +wire builder_roundrobin7_ce; +reg [2:0] builder_rbank = 3'd0; +reg [2:0] builder_wbank = 3'd0; +reg builder_locked0 = 1'd0; +reg builder_locked1 = 1'd0; +reg builder_locked2 = 1'd0; +reg builder_locked3 = 1'd0; +reg builder_locked4 = 1'd0; +reg builder_locked5 = 1'd0; +reg builder_locked6 = 1'd0; +reg builder_locked7 = 1'd0; +reg builder_new_master_wdata_ready0 = 1'd0; +reg builder_new_master_wdata_ready1 = 1'd0; +reg builder_new_master_wdata_ready2 = 1'd0; +reg builder_new_master_rdata_valid0 = 1'd0; +reg builder_new_master_rdata_valid1 = 1'd0; +reg builder_new_master_rdata_valid2 = 1'd0; +reg builder_new_master_rdata_valid3 = 1'd0; +reg builder_new_master_rdata_valid4 = 1'd0; +reg builder_new_master_rdata_valid5 = 1'd0; +reg builder_new_master_rdata_valid6 = 1'd0; +reg builder_new_master_rdata_valid7 = 1'd0; +reg builder_new_master_rdata_valid8 = 1'd0; +reg builder_new_master_rdata_valid9 = 1'd0; +reg [1:0] builder_fullmemorywe_state = 2'd0; +reg [1:0] builder_fullmemorywe_next_state = 2'd0; +reg [1:0] builder_litedramwishbone2native_state = 2'd0; +reg [1:0] builder_litedramwishbone2native_next_state = 2'd0; +reg main_count_next_value = 1'd0; +reg main_count_next_value_ce = 1'd0; +wire builder_wb_sdram_con_request; +wire builder_wb_sdram_con_grant; +wire [29:0] builder_minsoc_shared_adr; +wire [31:0] builder_minsoc_shared_dat_w; +reg [31:0] builder_minsoc_shared_dat_r = 32'd0; +wire [3:0] builder_minsoc_shared_sel; +wire builder_minsoc_shared_cyc; +wire builder_minsoc_shared_stb; +reg builder_minsoc_shared_ack = 1'd0; +wire builder_minsoc_shared_we; +wire [2:0] builder_minsoc_shared_cti; +wire [1:0] builder_minsoc_shared_bte; +wire builder_minsoc_shared_err; +wire [1:0] builder_minsoc_request; +reg builder_minsoc_grant = 1'd0; +reg [3:0] builder_minsoc_slave_sel = 4'd0; +reg [3:0] builder_minsoc_slave_sel_r = 4'd0; +reg builder_minsoc_error = 1'd0; +wire builder_minsoc_wait; +wire builder_minsoc_done; +reg [19:0] builder_minsoc_count = 20'd1000000; +wire [13:0] builder_minsoc_interface0_bank_bus_adr; +wire builder_minsoc_interface0_bank_bus_we; +wire [7:0] builder_minsoc_interface0_bank_bus_dat_w; +reg [7:0] builder_minsoc_interface0_bank_bus_dat_r = 8'd0; +wire builder_minsoc_csrbank0_reset0_re; +wire builder_minsoc_csrbank0_reset0_r; +wire builder_minsoc_csrbank0_reset0_we; +wire builder_minsoc_csrbank0_reset0_w; +wire builder_minsoc_csrbank0_scratch3_re; +wire [7:0] builder_minsoc_csrbank0_scratch3_r; +wire builder_minsoc_csrbank0_scratch3_we; +wire [7:0] builder_minsoc_csrbank0_scratch3_w; +wire builder_minsoc_csrbank0_scratch2_re; +wire [7:0] builder_minsoc_csrbank0_scratch2_r; +wire builder_minsoc_csrbank0_scratch2_we; +wire [7:0] builder_minsoc_csrbank0_scratch2_w; +wire builder_minsoc_csrbank0_scratch1_re; +wire [7:0] builder_minsoc_csrbank0_scratch1_r; +wire builder_minsoc_csrbank0_scratch1_we; +wire [7:0] builder_minsoc_csrbank0_scratch1_w; +wire builder_minsoc_csrbank0_scratch0_re; +wire [7:0] builder_minsoc_csrbank0_scratch0_r; +wire builder_minsoc_csrbank0_scratch0_we; +wire [7:0] builder_minsoc_csrbank0_scratch0_w; +wire builder_minsoc_csrbank0_bus_errors3_re; +wire [7:0] builder_minsoc_csrbank0_bus_errors3_r; +wire builder_minsoc_csrbank0_bus_errors3_we; +wire [7:0] builder_minsoc_csrbank0_bus_errors3_w; +wire builder_minsoc_csrbank0_bus_errors2_re; +wire [7:0] builder_minsoc_csrbank0_bus_errors2_r; +wire builder_minsoc_csrbank0_bus_errors2_we; +wire [7:0] builder_minsoc_csrbank0_bus_errors2_w; +wire builder_minsoc_csrbank0_bus_errors1_re; +wire [7:0] builder_minsoc_csrbank0_bus_errors1_r; +wire builder_minsoc_csrbank0_bus_errors1_we; +wire [7:0] builder_minsoc_csrbank0_bus_errors1_w; +wire builder_minsoc_csrbank0_bus_errors0_re; +wire [7:0] builder_minsoc_csrbank0_bus_errors0_r; +wire builder_minsoc_csrbank0_bus_errors0_we; +wire [7:0] builder_minsoc_csrbank0_bus_errors0_w; +wire builder_minsoc_csrbank0_sel; +wire [13:0] builder_minsoc_interface1_bank_bus_adr; +wire builder_minsoc_interface1_bank_bus_we; +wire [7:0] builder_minsoc_interface1_bank_bus_dat_w; +reg [7:0] builder_minsoc_interface1_bank_bus_dat_r = 8'd0; +wire builder_minsoc_csrbank1_half_sys8x_taps0_re; +wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_r; +wire builder_minsoc_csrbank1_half_sys8x_taps0_we; +wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_w; +wire builder_minsoc_csrbank1_dly_sel0_re; +wire [1:0] builder_minsoc_csrbank1_dly_sel0_r; +wire builder_minsoc_csrbank1_dly_sel0_we; +wire [1:0] builder_minsoc_csrbank1_dly_sel0_w; +wire builder_minsoc_csrbank1_sel; +wire [13:0] builder_minsoc_interface2_bank_bus_adr; +wire builder_minsoc_interface2_bank_bus_we; +wire [7:0] builder_minsoc_interface2_bank_bus_dat_w; +reg [7:0] builder_minsoc_interface2_bank_bus_dat_r = 8'd0; +wire builder_minsoc_csrbank2_dfii_control0_re; +wire [3:0] builder_minsoc_csrbank2_dfii_control0_r; +wire builder_minsoc_csrbank2_dfii_control0_we; +wire [3:0] builder_minsoc_csrbank2_dfii_control0_w; +wire builder_minsoc_csrbank2_dfii_pi0_command0_re; +wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_r; +wire builder_minsoc_csrbank2_dfii_pi0_command0_we; +wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_w; +wire builder_minsoc_csrbank2_dfii_pi0_address1_re; +wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_r; +wire builder_minsoc_csrbank2_dfii_pi0_address1_we; +wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_w; +wire builder_minsoc_csrbank2_dfii_pi0_address0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_r; +wire builder_minsoc_csrbank2_dfii_pi0_address0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_w; +wire builder_minsoc_csrbank2_dfii_pi0_baddress0_re; +wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_r; +wire builder_minsoc_csrbank2_dfii_pi0_baddress0_we; +wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_w; +wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; +wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; +wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; +wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; +wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; +wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; +wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; +wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; +wire builder_minsoc_csrbank2_dfii_pi0_rddata3_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_r; +wire builder_minsoc_csrbank2_dfii_pi0_rddata3_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_w; +wire builder_minsoc_csrbank2_dfii_pi0_rddata2_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_r; +wire builder_minsoc_csrbank2_dfii_pi0_rddata2_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_w; +wire builder_minsoc_csrbank2_dfii_pi0_rddata1_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_r; +wire builder_minsoc_csrbank2_dfii_pi0_rddata1_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_w; +wire builder_minsoc_csrbank2_dfii_pi0_rddata0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_r; +wire builder_minsoc_csrbank2_dfii_pi0_rddata0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_w; +wire builder_minsoc_csrbank2_dfii_pi1_command0_re; +wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_r; +wire builder_minsoc_csrbank2_dfii_pi1_command0_we; +wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_w; +wire builder_minsoc_csrbank2_dfii_pi1_address1_re; +wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_r; +wire builder_minsoc_csrbank2_dfii_pi1_address1_we; +wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_w; +wire builder_minsoc_csrbank2_dfii_pi1_address0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_r; +wire builder_minsoc_csrbank2_dfii_pi1_address0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_w; +wire builder_minsoc_csrbank2_dfii_pi1_baddress0_re; +wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_r; +wire builder_minsoc_csrbank2_dfii_pi1_baddress0_we; +wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_w; +wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; +wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; +wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; +wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; +wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; +wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; +wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; +wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; +wire builder_minsoc_csrbank2_dfii_pi1_rddata3_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_r; +wire builder_minsoc_csrbank2_dfii_pi1_rddata3_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_w; +wire builder_minsoc_csrbank2_dfii_pi1_rddata2_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_r; +wire builder_minsoc_csrbank2_dfii_pi1_rddata2_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_w; +wire builder_minsoc_csrbank2_dfii_pi1_rddata1_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_r; +wire builder_minsoc_csrbank2_dfii_pi1_rddata1_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_w; +wire builder_minsoc_csrbank2_dfii_pi1_rddata0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_r; +wire builder_minsoc_csrbank2_dfii_pi1_rddata0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_w; +wire builder_minsoc_csrbank2_dfii_pi2_command0_re; +wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_r; +wire builder_minsoc_csrbank2_dfii_pi2_command0_we; +wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_w; +wire builder_minsoc_csrbank2_dfii_pi2_address1_re; +wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_r; +wire builder_minsoc_csrbank2_dfii_pi2_address1_we; +wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_w; +wire builder_minsoc_csrbank2_dfii_pi2_address0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_r; +wire builder_minsoc_csrbank2_dfii_pi2_address0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_w; +wire builder_minsoc_csrbank2_dfii_pi2_baddress0_re; +wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_r; +wire builder_minsoc_csrbank2_dfii_pi2_baddress0_we; +wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_w; +wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; +wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; +wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; +wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; +wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; +wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; +wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; +wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; +wire builder_minsoc_csrbank2_dfii_pi2_rddata3_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_r; +wire builder_minsoc_csrbank2_dfii_pi2_rddata3_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_w; +wire builder_minsoc_csrbank2_dfii_pi2_rddata2_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_r; +wire builder_minsoc_csrbank2_dfii_pi2_rddata2_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_w; +wire builder_minsoc_csrbank2_dfii_pi2_rddata1_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_r; +wire builder_minsoc_csrbank2_dfii_pi2_rddata1_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_w; +wire builder_minsoc_csrbank2_dfii_pi2_rddata0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_r; +wire builder_minsoc_csrbank2_dfii_pi2_rddata0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_w; +wire builder_minsoc_csrbank2_dfii_pi3_command0_re; +wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_r; +wire builder_minsoc_csrbank2_dfii_pi3_command0_we; +wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_w; +wire builder_minsoc_csrbank2_dfii_pi3_address1_re; +wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_r; +wire builder_minsoc_csrbank2_dfii_pi3_address1_we; +wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_w; +wire builder_minsoc_csrbank2_dfii_pi3_address0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_r; +wire builder_minsoc_csrbank2_dfii_pi3_address0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_w; +wire builder_minsoc_csrbank2_dfii_pi3_baddress0_re; +wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_r; +wire builder_minsoc_csrbank2_dfii_pi3_baddress0_we; +wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_w; +wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; +wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; +wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; +wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; +wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; +wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; +wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; +wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; +wire builder_minsoc_csrbank2_dfii_pi3_rddata3_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_r; +wire builder_minsoc_csrbank2_dfii_pi3_rddata3_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_w; +wire builder_minsoc_csrbank2_dfii_pi3_rddata2_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_r; +wire builder_minsoc_csrbank2_dfii_pi3_rddata2_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_w; +wire builder_minsoc_csrbank2_dfii_pi3_rddata1_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_r; +wire builder_minsoc_csrbank2_dfii_pi3_rddata1_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_w; +wire builder_minsoc_csrbank2_dfii_pi3_rddata0_re; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_r; +wire builder_minsoc_csrbank2_dfii_pi3_rddata0_we; +wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_w; +wire builder_minsoc_csrbank2_sel; +wire [13:0] builder_minsoc_interface3_bank_bus_adr; +wire builder_minsoc_interface3_bank_bus_we; +wire [7:0] builder_minsoc_interface3_bank_bus_dat_w; +reg [7:0] builder_minsoc_interface3_bank_bus_dat_r = 8'd0; +wire builder_minsoc_csrbank3_load3_re; +wire [7:0] builder_minsoc_csrbank3_load3_r; +wire builder_minsoc_csrbank3_load3_we; +wire [7:0] builder_minsoc_csrbank3_load3_w; +wire builder_minsoc_csrbank3_load2_re; +wire [7:0] builder_minsoc_csrbank3_load2_r; +wire builder_minsoc_csrbank3_load2_we; +wire [7:0] builder_minsoc_csrbank3_load2_w; +wire builder_minsoc_csrbank3_load1_re; +wire [7:0] builder_minsoc_csrbank3_load1_r; +wire builder_minsoc_csrbank3_load1_we; +wire [7:0] builder_minsoc_csrbank3_load1_w; +wire builder_minsoc_csrbank3_load0_re; +wire [7:0] builder_minsoc_csrbank3_load0_r; +wire builder_minsoc_csrbank3_load0_we; +wire [7:0] builder_minsoc_csrbank3_load0_w; +wire builder_minsoc_csrbank3_reload3_re; +wire [7:0] builder_minsoc_csrbank3_reload3_r; +wire builder_minsoc_csrbank3_reload3_we; +wire [7:0] builder_minsoc_csrbank3_reload3_w; +wire builder_minsoc_csrbank3_reload2_re; +wire [7:0] builder_minsoc_csrbank3_reload2_r; +wire builder_minsoc_csrbank3_reload2_we; +wire [7:0] builder_minsoc_csrbank3_reload2_w; +wire builder_minsoc_csrbank3_reload1_re; +wire [7:0] builder_minsoc_csrbank3_reload1_r; +wire builder_minsoc_csrbank3_reload1_we; +wire [7:0] builder_minsoc_csrbank3_reload1_w; +wire builder_minsoc_csrbank3_reload0_re; +wire [7:0] builder_minsoc_csrbank3_reload0_r; +wire builder_minsoc_csrbank3_reload0_we; +wire [7:0] builder_minsoc_csrbank3_reload0_w; +wire builder_minsoc_csrbank3_en0_re; +wire builder_minsoc_csrbank3_en0_r; +wire builder_minsoc_csrbank3_en0_we; +wire builder_minsoc_csrbank3_en0_w; +wire builder_minsoc_csrbank3_update_value0_re; +wire builder_minsoc_csrbank3_update_value0_r; +wire builder_minsoc_csrbank3_update_value0_we; +wire builder_minsoc_csrbank3_update_value0_w; +wire builder_minsoc_csrbank3_value3_re; +wire [7:0] builder_minsoc_csrbank3_value3_r; +wire builder_minsoc_csrbank3_value3_we; +wire [7:0] builder_minsoc_csrbank3_value3_w; +wire builder_minsoc_csrbank3_value2_re; +wire [7:0] builder_minsoc_csrbank3_value2_r; +wire builder_minsoc_csrbank3_value2_we; +wire [7:0] builder_minsoc_csrbank3_value2_w; +wire builder_minsoc_csrbank3_value1_re; +wire [7:0] builder_minsoc_csrbank3_value1_r; +wire builder_minsoc_csrbank3_value1_we; +wire [7:0] builder_minsoc_csrbank3_value1_w; +wire builder_minsoc_csrbank3_value0_re; +wire [7:0] builder_minsoc_csrbank3_value0_r; +wire builder_minsoc_csrbank3_value0_we; +wire [7:0] builder_minsoc_csrbank3_value0_w; +wire builder_minsoc_csrbank3_ev_enable0_re; +wire builder_minsoc_csrbank3_ev_enable0_r; +wire builder_minsoc_csrbank3_ev_enable0_we; +wire builder_minsoc_csrbank3_ev_enable0_w; +wire builder_minsoc_csrbank3_sel; +wire [13:0] builder_minsoc_interface4_bank_bus_adr; +wire builder_minsoc_interface4_bank_bus_we; +wire [7:0] builder_minsoc_interface4_bank_bus_dat_w; +reg [7:0] builder_minsoc_interface4_bank_bus_dat_r = 8'd0; +wire builder_minsoc_csrbank4_txfull_re; +wire builder_minsoc_csrbank4_txfull_r; +wire builder_minsoc_csrbank4_txfull_we; +wire builder_minsoc_csrbank4_txfull_w; +wire builder_minsoc_csrbank4_rxempty_re; +wire builder_minsoc_csrbank4_rxempty_r; +wire builder_minsoc_csrbank4_rxempty_we; +wire builder_minsoc_csrbank4_rxempty_w; +wire builder_minsoc_csrbank4_ev_enable0_re; +wire [1:0] builder_minsoc_csrbank4_ev_enable0_r; +wire builder_minsoc_csrbank4_ev_enable0_we; +wire [1:0] builder_minsoc_csrbank4_ev_enable0_w; +wire builder_minsoc_csrbank4_sel; +wire [13:0] builder_minsoc_interface5_bank_bus_adr; +wire builder_minsoc_interface5_bank_bus_we; +wire [7:0] builder_minsoc_interface5_bank_bus_dat_w; +reg [7:0] builder_minsoc_interface5_bank_bus_dat_r = 8'd0; +wire builder_minsoc_csrbank5_tuning_word3_re; +wire [7:0] builder_minsoc_csrbank5_tuning_word3_r; +wire builder_minsoc_csrbank5_tuning_word3_we; +wire [7:0] builder_minsoc_csrbank5_tuning_word3_w; +wire builder_minsoc_csrbank5_tuning_word2_re; +wire [7:0] builder_minsoc_csrbank5_tuning_word2_r; +wire builder_minsoc_csrbank5_tuning_word2_we; +wire [7:0] builder_minsoc_csrbank5_tuning_word2_w; +wire builder_minsoc_csrbank5_tuning_word1_re; +wire [7:0] builder_minsoc_csrbank5_tuning_word1_r; +wire builder_minsoc_csrbank5_tuning_word1_we; +wire [7:0] builder_minsoc_csrbank5_tuning_word1_w; +wire builder_minsoc_csrbank5_tuning_word0_re; +wire [7:0] builder_minsoc_csrbank5_tuning_word0_r; +wire builder_minsoc_csrbank5_tuning_word0_we; +wire [7:0] builder_minsoc_csrbank5_tuning_word0_w; +wire builder_minsoc_csrbank5_sel; +wire [13:0] builder_minsoc_adr; +wire builder_minsoc_we; +wire [7:0] builder_minsoc_dat_w; +wire [7:0] builder_minsoc_dat_r; +reg builder_rhs_array_muxed0 = 1'd0; +reg [13:0] builder_rhs_array_muxed1 = 14'd0; +reg [2:0] builder_rhs_array_muxed2 = 3'd0; +reg builder_rhs_array_muxed3 = 1'd0; +reg builder_rhs_array_muxed4 = 1'd0; +reg builder_rhs_array_muxed5 = 1'd0; +reg builder_t_array_muxed0 = 1'd0; +reg builder_t_array_muxed1 = 1'd0; +reg builder_t_array_muxed2 = 1'd0; +reg builder_rhs_array_muxed6 = 1'd0; +reg [13:0] builder_rhs_array_muxed7 = 14'd0; +reg [2:0] builder_rhs_array_muxed8 = 3'd0; +reg builder_rhs_array_muxed9 = 1'd0; +reg builder_rhs_array_muxed10 = 1'd0; +reg builder_rhs_array_muxed11 = 1'd0; +reg builder_t_array_muxed3 = 1'd0; +reg builder_t_array_muxed4 = 1'd0; +reg builder_t_array_muxed5 = 1'd0; +reg [20:0] builder_rhs_array_muxed12 = 21'd0; +reg builder_rhs_array_muxed13 = 1'd0; +reg builder_rhs_array_muxed14 = 1'd0; +reg [20:0] builder_rhs_array_muxed15 = 21'd0; +reg builder_rhs_array_muxed16 = 1'd0; +reg builder_rhs_array_muxed17 = 1'd0; +reg [20:0] builder_rhs_array_muxed18 = 21'd0; +reg builder_rhs_array_muxed19 = 1'd0; +reg builder_rhs_array_muxed20 = 1'd0; +reg [20:0] builder_rhs_array_muxed21 = 21'd0; +reg builder_rhs_array_muxed22 = 1'd0; +reg builder_rhs_array_muxed23 = 1'd0; +reg [20:0] builder_rhs_array_muxed24 = 21'd0; +reg builder_rhs_array_muxed25 = 1'd0; +reg builder_rhs_array_muxed26 = 1'd0; +reg [20:0] builder_rhs_array_muxed27 = 21'd0; +reg builder_rhs_array_muxed28 = 1'd0; +reg builder_rhs_array_muxed29 = 1'd0; +reg [20:0] builder_rhs_array_muxed30 = 21'd0; +reg builder_rhs_array_muxed31 = 1'd0; +reg builder_rhs_array_muxed32 = 1'd0; +reg [20:0] builder_rhs_array_muxed33 = 21'd0; +reg builder_rhs_array_muxed34 = 1'd0; +reg builder_rhs_array_muxed35 = 1'd0; +reg [29:0] builder_rhs_array_muxed36 = 30'd0; +reg [31:0] builder_rhs_array_muxed37 = 32'd0; +reg [3:0] builder_rhs_array_muxed38 = 4'd0; +reg builder_rhs_array_muxed39 = 1'd0; +reg builder_rhs_array_muxed40 = 1'd0; +reg builder_rhs_array_muxed41 = 1'd0; +reg [2:0] builder_rhs_array_muxed42 = 3'd0; +reg [1:0] builder_rhs_array_muxed43 = 2'd0; +reg [29:0] builder_rhs_array_muxed44 = 30'd0; +reg [31:0] builder_rhs_array_muxed45 = 32'd0; +reg [3:0] builder_rhs_array_muxed46 = 4'd0; +reg builder_rhs_array_muxed47 = 1'd0; +reg builder_rhs_array_muxed48 = 1'd0; +reg builder_rhs_array_muxed49 = 1'd0; +reg [2:0] builder_rhs_array_muxed50 = 3'd0; +reg [1:0] builder_rhs_array_muxed51 = 2'd0; +reg [2:0] builder_array_muxed0 = 3'd0; +reg [13:0] builder_array_muxed1 = 14'd0; +reg builder_array_muxed2 = 1'd0; +reg builder_array_muxed3 = 1'd0; +reg builder_array_muxed4 = 1'd0; +reg builder_array_muxed5 = 1'd0; +reg builder_array_muxed6 = 1'd0; +reg [2:0] builder_array_muxed7 = 3'd0; +reg [13:0] builder_array_muxed8 = 14'd0; +reg builder_array_muxed9 = 1'd0; +reg builder_array_muxed10 = 1'd0; +reg builder_array_muxed11 = 1'd0; +reg builder_array_muxed12 = 1'd0; +reg builder_array_muxed13 = 1'd0; +reg [2:0] builder_array_muxed14 = 3'd0; +reg [13:0] builder_array_muxed15 = 14'd0; +reg builder_array_muxed16 = 1'd0; +reg builder_array_muxed17 = 1'd0; +reg builder_array_muxed18 = 1'd0; +reg builder_array_muxed19 = 1'd0; +reg builder_array_muxed20 = 1'd0; +reg [2:0] builder_array_muxed21 = 3'd0; +reg [13:0] builder_array_muxed22 = 14'd0; +reg builder_array_muxed23 = 1'd0; +reg builder_array_muxed24 = 1'd0; +reg builder_array_muxed25 = 1'd0; +reg builder_array_muxed26 = 1'd0; +reg builder_array_muxed27 = 1'd0; +(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg builder_regs0 = 1'd0; +(* async_reg = "true", dont_touch = "true" *) reg builder_regs1 = 1'd0; +wire builder_xilinxasyncresetsynchronizerimpl0; +wire builder_xilinxasyncresetsynchronizerimpl0_rst_meta; +wire builder_xilinxasyncresetsynchronizerimpl1; +wire builder_xilinxasyncresetsynchronizerimpl1_rst_meta; +wire builder_xilinxasyncresetsynchronizerimpl1_expr; +wire builder_xilinxasyncresetsynchronizerimpl2; +wire builder_xilinxasyncresetsynchronizerimpl2_rst_meta; +wire builder_xilinxasyncresetsynchronizerimpl2_expr; +wire builder_xilinxasyncresetsynchronizerimpl3; +wire builder_xilinxasyncresetsynchronizerimpl3_rst_meta; + +assign main_minsoc_cpu_reset = main_minsoc_ctrl_reset; +assign main_minsoc_ctrl_bus_error = builder_minsoc_error; +always @(*) begin + main_minsoc_cpu_interrupt <= 32'd0; + main_minsoc_cpu_interrupt[1] <= main_minsoc_timer0_irq; + main_minsoc_cpu_interrupt[0] <= main_minsoc_uart_irq; +end +assign main_minsoc_ctrl_reset = main_minsoc_ctrl_reset_re; +assign main_minsoc_ctrl_bus_errors_status = main_minsoc_ctrl_bus_errors; +assign main_minsoc_interface0_soc_bus_adr = main_minsoc_cpu_ibus_adr; +assign main_minsoc_interface0_soc_bus_dat_w = main_minsoc_cpu_ibus_dat_w; +assign main_minsoc_cpu_ibus_dat_r = main_minsoc_interface0_soc_bus_dat_r; +assign main_minsoc_interface0_soc_bus_sel = main_minsoc_cpu_ibus_sel; +assign main_minsoc_interface0_soc_bus_cyc = main_minsoc_cpu_ibus_cyc; +assign main_minsoc_interface0_soc_bus_stb = main_minsoc_cpu_ibus_stb; +assign main_minsoc_cpu_ibus_ack = main_minsoc_interface0_soc_bus_ack; +assign main_minsoc_interface0_soc_bus_we = main_minsoc_cpu_ibus_we; +assign main_minsoc_interface0_soc_bus_cti = main_minsoc_cpu_ibus_cti; +assign main_minsoc_interface0_soc_bus_bte = main_minsoc_cpu_ibus_bte; +assign main_minsoc_cpu_ibus_err = main_minsoc_interface0_soc_bus_err; +assign main_minsoc_interface1_soc_bus_adr = main_minsoc_cpu_dbus_adr; +assign main_minsoc_interface1_soc_bus_dat_w = main_minsoc_cpu_dbus_dat_w; +assign main_minsoc_cpu_dbus_dat_r = main_minsoc_interface1_soc_bus_dat_r; +assign main_minsoc_interface1_soc_bus_sel = main_minsoc_cpu_dbus_sel; +assign main_minsoc_interface1_soc_bus_cyc = main_minsoc_cpu_dbus_cyc; +assign main_minsoc_interface1_soc_bus_stb = main_minsoc_cpu_dbus_stb; +assign main_minsoc_cpu_dbus_ack = main_minsoc_interface1_soc_bus_ack; +assign main_minsoc_interface1_soc_bus_we = main_minsoc_cpu_dbus_we; +assign main_minsoc_interface1_soc_bus_cti = main_minsoc_cpu_dbus_cti; +assign main_minsoc_interface1_soc_bus_bte = main_minsoc_cpu_dbus_bte; +assign main_minsoc_cpu_dbus_err = main_minsoc_interface1_soc_bus_err; +assign main_minsoc_rom_adr = main_minsoc_rom_bus_adr[12:0]; +assign main_minsoc_rom_bus_dat_r = main_minsoc_rom_dat_r; +always @(*) begin + main_minsoc_sram_we <= 4'd0; + main_minsoc_sram_we[0] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[0]); + main_minsoc_sram_we[1] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[1]); + main_minsoc_sram_we[2] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[2]); + main_minsoc_sram_we[3] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[3]); +end +assign main_minsoc_sram_adr = main_minsoc_sram_bus_adr[9:0]; +assign main_minsoc_sram_bus_dat_r = main_minsoc_sram_dat_r; +assign main_minsoc_sram_dat_w = main_minsoc_sram_bus_dat_w; +assign main_minsoc_uart_uart_sink_valid = main_minsoc_source_valid; +assign main_minsoc_source_ready = main_minsoc_uart_uart_sink_ready; +assign main_minsoc_uart_uart_sink_first = main_minsoc_source_first; +assign main_minsoc_uart_uart_sink_last = main_minsoc_source_last; +assign main_minsoc_uart_uart_sink_payload_data = main_minsoc_source_payload_data; +assign main_minsoc_sink_valid = main_minsoc_uart_uart_source_valid; +assign main_minsoc_uart_uart_source_ready = main_minsoc_sink_ready; +assign main_minsoc_sink_first = main_minsoc_uart_uart_source_first; +assign main_minsoc_sink_last = main_minsoc_uart_uart_source_last; +assign main_minsoc_sink_payload_data = main_minsoc_uart_uart_source_payload_data; +assign main_minsoc_uart_tx_fifo_sink_valid = main_minsoc_uart_rxtx_re; +assign main_minsoc_uart_tx_fifo_sink_payload_data = main_minsoc_uart_rxtx_r; +assign main_minsoc_uart_txfull_status = (~main_minsoc_uart_tx_fifo_sink_ready); +assign main_minsoc_uart_uart_source_valid = main_minsoc_uart_tx_fifo_source_valid; +assign main_minsoc_uart_tx_fifo_source_ready = main_minsoc_uart_uart_source_ready; +assign main_minsoc_uart_uart_source_first = main_minsoc_uart_tx_fifo_source_first; +assign main_minsoc_uart_uart_source_last = main_minsoc_uart_tx_fifo_source_last; +assign main_minsoc_uart_uart_source_payload_data = main_minsoc_uart_tx_fifo_source_payload_data; +assign main_minsoc_uart_tx_trigger = (~main_minsoc_uart_tx_fifo_sink_ready); +assign main_minsoc_uart_rx_fifo_sink_valid = main_minsoc_uart_uart_sink_valid; +assign main_minsoc_uart_uart_sink_ready = main_minsoc_uart_rx_fifo_sink_ready; +assign main_minsoc_uart_rx_fifo_sink_first = main_minsoc_uart_uart_sink_first; +assign main_minsoc_uart_rx_fifo_sink_last = main_minsoc_uart_uart_sink_last; +assign main_minsoc_uart_rx_fifo_sink_payload_data = main_minsoc_uart_uart_sink_payload_data; +assign main_minsoc_uart_rxempty_status = (~main_minsoc_uart_rx_fifo_source_valid); +assign main_minsoc_uart_rxtx_w = main_minsoc_uart_rx_fifo_source_payload_data; +assign main_minsoc_uart_rx_fifo_source_ready = (main_minsoc_uart_rx_clear | (1'd0 & main_minsoc_uart_rxtx_we)); +assign main_minsoc_uart_rx_trigger = (~main_minsoc_uart_rx_fifo_source_valid); +always @(*) begin + main_minsoc_uart_tx_clear <= 1'd0; + if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[0])) begin + main_minsoc_uart_tx_clear <= 1'd1; + end +end +always @(*) begin + main_minsoc_uart_eventmanager_status_w <= 2'd0; + main_minsoc_uart_eventmanager_status_w[0] <= main_minsoc_uart_tx_status; + main_minsoc_uart_eventmanager_status_w[1] <= main_minsoc_uart_rx_status; +end +always @(*) begin + main_minsoc_uart_rx_clear <= 1'd0; + if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[1])) begin + main_minsoc_uart_rx_clear <= 1'd1; + end +end +always @(*) begin + main_minsoc_uart_eventmanager_pending_w <= 2'd0; + main_minsoc_uart_eventmanager_pending_w[0] <= main_minsoc_uart_tx_pending; + main_minsoc_uart_eventmanager_pending_w[1] <= main_minsoc_uart_rx_pending; +end +assign main_minsoc_uart_irq = ((main_minsoc_uart_eventmanager_pending_w[0] & main_minsoc_uart_eventmanager_storage[0]) | (main_minsoc_uart_eventmanager_pending_w[1] & main_minsoc_uart_eventmanager_storage[1])); +assign main_minsoc_uart_tx_status = main_minsoc_uart_tx_trigger; +assign main_minsoc_uart_rx_status = main_minsoc_uart_rx_trigger; +assign main_minsoc_uart_tx_fifo_syncfifo_din = {main_minsoc_uart_tx_fifo_fifo_in_last, main_minsoc_uart_tx_fifo_fifo_in_first, main_minsoc_uart_tx_fifo_fifo_in_payload_data}; +assign {main_minsoc_uart_tx_fifo_fifo_out_last, main_minsoc_uart_tx_fifo_fifo_out_first, main_minsoc_uart_tx_fifo_fifo_out_payload_data} = main_minsoc_uart_tx_fifo_syncfifo_dout; +assign main_minsoc_uart_tx_fifo_sink_ready = main_minsoc_uart_tx_fifo_syncfifo_writable; +assign main_minsoc_uart_tx_fifo_syncfifo_we = main_minsoc_uart_tx_fifo_sink_valid; +assign main_minsoc_uart_tx_fifo_fifo_in_first = main_minsoc_uart_tx_fifo_sink_first; +assign main_minsoc_uart_tx_fifo_fifo_in_last = main_minsoc_uart_tx_fifo_sink_last; +assign main_minsoc_uart_tx_fifo_fifo_in_payload_data = main_minsoc_uart_tx_fifo_sink_payload_data; +assign main_minsoc_uart_tx_fifo_source_valid = main_minsoc_uart_tx_fifo_readable; +assign main_minsoc_uart_tx_fifo_source_first = main_minsoc_uart_tx_fifo_fifo_out_first; +assign main_minsoc_uart_tx_fifo_source_last = main_minsoc_uart_tx_fifo_fifo_out_last; +assign main_minsoc_uart_tx_fifo_source_payload_data = main_minsoc_uart_tx_fifo_fifo_out_payload_data; +assign main_minsoc_uart_tx_fifo_re = main_minsoc_uart_tx_fifo_source_ready; +assign main_minsoc_uart_tx_fifo_syncfifo_re = (main_minsoc_uart_tx_fifo_syncfifo_readable & ((~main_minsoc_uart_tx_fifo_readable) | main_minsoc_uart_tx_fifo_re)); +assign main_minsoc_uart_tx_fifo_level1 = (main_minsoc_uart_tx_fifo_level0 + main_minsoc_uart_tx_fifo_readable); +always @(*) begin + main_minsoc_uart_tx_fifo_wrport_adr <= 4'd0; + if (main_minsoc_uart_tx_fifo_replace) begin + main_minsoc_uart_tx_fifo_wrport_adr <= (main_minsoc_uart_tx_fifo_produce - 1'd1); + end else begin + main_minsoc_uart_tx_fifo_wrport_adr <= main_minsoc_uart_tx_fifo_produce; + end +end +assign main_minsoc_uart_tx_fifo_wrport_dat_w = main_minsoc_uart_tx_fifo_syncfifo_din; +assign main_minsoc_uart_tx_fifo_wrport_we = (main_minsoc_uart_tx_fifo_syncfifo_we & (main_minsoc_uart_tx_fifo_syncfifo_writable | main_minsoc_uart_tx_fifo_replace)); +assign main_minsoc_uart_tx_fifo_do_read = (main_minsoc_uart_tx_fifo_syncfifo_readable & main_minsoc_uart_tx_fifo_syncfifo_re); +assign main_minsoc_uart_tx_fifo_rdport_adr = main_minsoc_uart_tx_fifo_consume; +assign main_minsoc_uart_tx_fifo_syncfifo_dout = main_minsoc_uart_tx_fifo_rdport_dat_r; +assign main_minsoc_uart_tx_fifo_rdport_re = main_minsoc_uart_tx_fifo_do_read; +assign main_minsoc_uart_tx_fifo_syncfifo_writable = (main_minsoc_uart_tx_fifo_level0 != 5'd16); +assign main_minsoc_uart_tx_fifo_syncfifo_readable = (main_minsoc_uart_tx_fifo_level0 != 1'd0); +assign main_minsoc_uart_rx_fifo_syncfifo_din = {main_minsoc_uart_rx_fifo_fifo_in_last, main_minsoc_uart_rx_fifo_fifo_in_first, main_minsoc_uart_rx_fifo_fifo_in_payload_data}; +assign {main_minsoc_uart_rx_fifo_fifo_out_last, main_minsoc_uart_rx_fifo_fifo_out_first, main_minsoc_uart_rx_fifo_fifo_out_payload_data} = main_minsoc_uart_rx_fifo_syncfifo_dout; +assign main_minsoc_uart_rx_fifo_sink_ready = main_minsoc_uart_rx_fifo_syncfifo_writable; +assign main_minsoc_uart_rx_fifo_syncfifo_we = main_minsoc_uart_rx_fifo_sink_valid; +assign main_minsoc_uart_rx_fifo_fifo_in_first = main_minsoc_uart_rx_fifo_sink_first; +assign main_minsoc_uart_rx_fifo_fifo_in_last = main_minsoc_uart_rx_fifo_sink_last; +assign main_minsoc_uart_rx_fifo_fifo_in_payload_data = main_minsoc_uart_rx_fifo_sink_payload_data; +assign main_minsoc_uart_rx_fifo_source_valid = main_minsoc_uart_rx_fifo_readable; +assign main_minsoc_uart_rx_fifo_source_first = main_minsoc_uart_rx_fifo_fifo_out_first; +assign main_minsoc_uart_rx_fifo_source_last = main_minsoc_uart_rx_fifo_fifo_out_last; +assign main_minsoc_uart_rx_fifo_source_payload_data = main_minsoc_uart_rx_fifo_fifo_out_payload_data; +assign main_minsoc_uart_rx_fifo_re = main_minsoc_uart_rx_fifo_source_ready; +assign main_minsoc_uart_rx_fifo_syncfifo_re = (main_minsoc_uart_rx_fifo_syncfifo_readable & ((~main_minsoc_uart_rx_fifo_readable) | main_minsoc_uart_rx_fifo_re)); +assign main_minsoc_uart_rx_fifo_level1 = (main_minsoc_uart_rx_fifo_level0 + main_minsoc_uart_rx_fifo_readable); +always @(*) begin + main_minsoc_uart_rx_fifo_wrport_adr <= 4'd0; + if (main_minsoc_uart_rx_fifo_replace) begin + main_minsoc_uart_rx_fifo_wrport_adr <= (main_minsoc_uart_rx_fifo_produce - 1'd1); + end else begin + main_minsoc_uart_rx_fifo_wrport_adr <= main_minsoc_uart_rx_fifo_produce; + end +end +assign main_minsoc_uart_rx_fifo_wrport_dat_w = main_minsoc_uart_rx_fifo_syncfifo_din; +assign main_minsoc_uart_rx_fifo_wrport_we = (main_minsoc_uart_rx_fifo_syncfifo_we & (main_minsoc_uart_rx_fifo_syncfifo_writable | main_minsoc_uart_rx_fifo_replace)); +assign main_minsoc_uart_rx_fifo_do_read = (main_minsoc_uart_rx_fifo_syncfifo_readable & main_minsoc_uart_rx_fifo_syncfifo_re); +assign main_minsoc_uart_rx_fifo_rdport_adr = main_minsoc_uart_rx_fifo_consume; +assign main_minsoc_uart_rx_fifo_syncfifo_dout = main_minsoc_uart_rx_fifo_rdport_dat_r; +assign main_minsoc_uart_rx_fifo_rdport_re = main_minsoc_uart_rx_fifo_do_read; +assign main_minsoc_uart_rx_fifo_syncfifo_writable = (main_minsoc_uart_rx_fifo_level0 != 5'd16); +assign main_minsoc_uart_rx_fifo_syncfifo_readable = (main_minsoc_uart_rx_fifo_level0 != 1'd0); +assign main_minsoc_timer0_zero_trigger = (main_minsoc_timer0_value != 1'd0); +assign main_minsoc_timer0_eventmanager_status_w = main_minsoc_timer0_zero_status; +always @(*) begin + main_minsoc_timer0_zero_clear <= 1'd0; + if ((main_minsoc_timer0_eventmanager_pending_re & main_minsoc_timer0_eventmanager_pending_r)) begin + main_minsoc_timer0_zero_clear <= 1'd1; + end +end +assign main_minsoc_timer0_eventmanager_pending_w = main_minsoc_timer0_zero_pending; +assign main_minsoc_timer0_irq = (main_minsoc_timer0_eventmanager_pending_w & main_minsoc_timer0_eventmanager_storage); +assign main_minsoc_timer0_zero_status = main_minsoc_timer0_zero_trigger; +assign main_minsoc_interface_dat_w = main_minsoc_bus_wishbone_dat_w; +assign main_minsoc_bus_wishbone_dat_r = main_minsoc_interface_dat_r; +always @(*) begin + main_minsoc_interface_adr <= 14'd0; + main_minsoc_interface_we <= 1'd0; + builder_wb2csr_next_state <= 1'd0; + main_minsoc_bus_wishbone_ack <= 1'd0; + builder_wb2csr_next_state <= builder_wb2csr_state; + case (builder_wb2csr_state) + 1'd1: begin + main_minsoc_bus_wishbone_ack <= 1'd1; + builder_wb2csr_next_state <= 1'd0; + end + default: begin + if ((main_minsoc_bus_wishbone_cyc & main_minsoc_bus_wishbone_stb)) begin + main_minsoc_interface_adr <= main_minsoc_bus_wishbone_adr; + main_minsoc_interface_we <= main_minsoc_bus_wishbone_we; + builder_wb2csr_next_state <= 1'd1; + end + end + endcase +end +assign main_reset = (~cpu_reset); +always @(*) begin + main_a7ddrphy_dqs_serdes_pattern <= 8'd85; + main_a7ddrphy_dqs_serdes_pattern <= 7'd85; + if ((main_a7ddrphy_dqs_preamble | main_a7ddrphy_dqs_postamble)) begin + main_a7ddrphy_dqs_serdes_pattern <= 1'd0; + end +end +assign main_a7ddrphy_bitslip0_i = main_a7ddrphy_dq_i_data0; +assign main_a7ddrphy_bitslip1_i = main_a7ddrphy_dq_i_data1; +assign main_a7ddrphy_bitslip2_i = main_a7ddrphy_dq_i_data2; +assign main_a7ddrphy_bitslip3_i = main_a7ddrphy_dq_i_data3; +assign main_a7ddrphy_bitslip4_i = main_a7ddrphy_dq_i_data4; +assign main_a7ddrphy_bitslip5_i = main_a7ddrphy_dq_i_data5; +assign main_a7ddrphy_bitslip6_i = main_a7ddrphy_dq_i_data6; +assign main_a7ddrphy_bitslip7_i = main_a7ddrphy_dq_i_data7; +assign main_a7ddrphy_bitslip8_i = main_a7ddrphy_dq_i_data8; +assign main_a7ddrphy_bitslip9_i = main_a7ddrphy_dq_i_data9; +assign main_a7ddrphy_bitslip10_i = main_a7ddrphy_dq_i_data10; +assign main_a7ddrphy_bitslip11_i = main_a7ddrphy_dq_i_data11; +assign main_a7ddrphy_bitslip12_i = main_a7ddrphy_dq_i_data12; +assign main_a7ddrphy_bitslip13_i = main_a7ddrphy_dq_i_data13; +assign main_a7ddrphy_bitslip14_i = main_a7ddrphy_dq_i_data14; +assign main_a7ddrphy_bitslip15_i = main_a7ddrphy_dq_i_data15; +always @(*) begin + main_a7ddrphy_dfi_p0_rddata <= 32'd0; + main_a7ddrphy_dfi_p0_rddata[0] <= main_a7ddrphy_bitslip0_o[0]; + main_a7ddrphy_dfi_p0_rddata[16] <= main_a7ddrphy_bitslip0_o[1]; + main_a7ddrphy_dfi_p0_rddata[1] <= main_a7ddrphy_bitslip1_o[0]; + main_a7ddrphy_dfi_p0_rddata[17] <= main_a7ddrphy_bitslip1_o[1]; + main_a7ddrphy_dfi_p0_rddata[2] <= main_a7ddrphy_bitslip2_o[0]; + main_a7ddrphy_dfi_p0_rddata[18] <= main_a7ddrphy_bitslip2_o[1]; + main_a7ddrphy_dfi_p0_rddata[3] <= main_a7ddrphy_bitslip3_o[0]; + main_a7ddrphy_dfi_p0_rddata[19] <= main_a7ddrphy_bitslip3_o[1]; + main_a7ddrphy_dfi_p0_rddata[4] <= main_a7ddrphy_bitslip4_o[0]; + main_a7ddrphy_dfi_p0_rddata[20] <= main_a7ddrphy_bitslip4_o[1]; + main_a7ddrphy_dfi_p0_rddata[5] <= main_a7ddrphy_bitslip5_o[0]; + main_a7ddrphy_dfi_p0_rddata[21] <= main_a7ddrphy_bitslip5_o[1]; + main_a7ddrphy_dfi_p0_rddata[6] <= main_a7ddrphy_bitslip6_o[0]; + main_a7ddrphy_dfi_p0_rddata[22] <= main_a7ddrphy_bitslip6_o[1]; + main_a7ddrphy_dfi_p0_rddata[7] <= main_a7ddrphy_bitslip7_o[0]; + main_a7ddrphy_dfi_p0_rddata[23] <= main_a7ddrphy_bitslip7_o[1]; + main_a7ddrphy_dfi_p0_rddata[8] <= main_a7ddrphy_bitslip8_o[0]; + main_a7ddrphy_dfi_p0_rddata[24] <= main_a7ddrphy_bitslip8_o[1]; + main_a7ddrphy_dfi_p0_rddata[9] <= main_a7ddrphy_bitslip9_o[0]; + main_a7ddrphy_dfi_p0_rddata[25] <= main_a7ddrphy_bitslip9_o[1]; + main_a7ddrphy_dfi_p0_rddata[10] <= main_a7ddrphy_bitslip10_o[0]; + main_a7ddrphy_dfi_p0_rddata[26] <= main_a7ddrphy_bitslip10_o[1]; + main_a7ddrphy_dfi_p0_rddata[11] <= main_a7ddrphy_bitslip11_o[0]; + main_a7ddrphy_dfi_p0_rddata[27] <= main_a7ddrphy_bitslip11_o[1]; + main_a7ddrphy_dfi_p0_rddata[12] <= main_a7ddrphy_bitslip12_o[0]; + main_a7ddrphy_dfi_p0_rddata[28] <= main_a7ddrphy_bitslip12_o[1]; + main_a7ddrphy_dfi_p0_rddata[13] <= main_a7ddrphy_bitslip13_o[0]; + main_a7ddrphy_dfi_p0_rddata[29] <= main_a7ddrphy_bitslip13_o[1]; + main_a7ddrphy_dfi_p0_rddata[14] <= main_a7ddrphy_bitslip14_o[0]; + main_a7ddrphy_dfi_p0_rddata[30] <= main_a7ddrphy_bitslip14_o[1]; + main_a7ddrphy_dfi_p0_rddata[15] <= main_a7ddrphy_bitslip15_o[0]; + main_a7ddrphy_dfi_p0_rddata[31] <= main_a7ddrphy_bitslip15_o[1]; +end +always @(*) begin + main_a7ddrphy_dfi_p1_rddata <= 32'd0; + main_a7ddrphy_dfi_p1_rddata[0] <= main_a7ddrphy_bitslip0_o[2]; + main_a7ddrphy_dfi_p1_rddata[16] <= main_a7ddrphy_bitslip0_o[3]; + main_a7ddrphy_dfi_p1_rddata[1] <= main_a7ddrphy_bitslip1_o[2]; + main_a7ddrphy_dfi_p1_rddata[17] <= main_a7ddrphy_bitslip1_o[3]; + main_a7ddrphy_dfi_p1_rddata[2] <= main_a7ddrphy_bitslip2_o[2]; + main_a7ddrphy_dfi_p1_rddata[18] <= main_a7ddrphy_bitslip2_o[3]; + main_a7ddrphy_dfi_p1_rddata[3] <= main_a7ddrphy_bitslip3_o[2]; + main_a7ddrphy_dfi_p1_rddata[19] <= main_a7ddrphy_bitslip3_o[3]; + main_a7ddrphy_dfi_p1_rddata[4] <= main_a7ddrphy_bitslip4_o[2]; + main_a7ddrphy_dfi_p1_rddata[20] <= main_a7ddrphy_bitslip4_o[3]; + main_a7ddrphy_dfi_p1_rddata[5] <= main_a7ddrphy_bitslip5_o[2]; + main_a7ddrphy_dfi_p1_rddata[21] <= main_a7ddrphy_bitslip5_o[3]; + main_a7ddrphy_dfi_p1_rddata[6] <= main_a7ddrphy_bitslip6_o[2]; + main_a7ddrphy_dfi_p1_rddata[22] <= main_a7ddrphy_bitslip6_o[3]; + main_a7ddrphy_dfi_p1_rddata[7] <= main_a7ddrphy_bitslip7_o[2]; + main_a7ddrphy_dfi_p1_rddata[23] <= main_a7ddrphy_bitslip7_o[3]; + main_a7ddrphy_dfi_p1_rddata[8] <= main_a7ddrphy_bitslip8_o[2]; + main_a7ddrphy_dfi_p1_rddata[24] <= main_a7ddrphy_bitslip8_o[3]; + main_a7ddrphy_dfi_p1_rddata[9] <= main_a7ddrphy_bitslip9_o[2]; + main_a7ddrphy_dfi_p1_rddata[25] <= main_a7ddrphy_bitslip9_o[3]; + main_a7ddrphy_dfi_p1_rddata[10] <= main_a7ddrphy_bitslip10_o[2]; + main_a7ddrphy_dfi_p1_rddata[26] <= main_a7ddrphy_bitslip10_o[3]; + main_a7ddrphy_dfi_p1_rddata[11] <= main_a7ddrphy_bitslip11_o[2]; + main_a7ddrphy_dfi_p1_rddata[27] <= main_a7ddrphy_bitslip11_o[3]; + main_a7ddrphy_dfi_p1_rddata[12] <= main_a7ddrphy_bitslip12_o[2]; + main_a7ddrphy_dfi_p1_rddata[28] <= main_a7ddrphy_bitslip12_o[3]; + main_a7ddrphy_dfi_p1_rddata[13] <= main_a7ddrphy_bitslip13_o[2]; + main_a7ddrphy_dfi_p1_rddata[29] <= main_a7ddrphy_bitslip13_o[3]; + main_a7ddrphy_dfi_p1_rddata[14] <= main_a7ddrphy_bitslip14_o[2]; + main_a7ddrphy_dfi_p1_rddata[30] <= main_a7ddrphy_bitslip14_o[3]; + main_a7ddrphy_dfi_p1_rddata[15] <= main_a7ddrphy_bitslip15_o[2]; + main_a7ddrphy_dfi_p1_rddata[31] <= main_a7ddrphy_bitslip15_o[3]; +end +always @(*) begin + main_a7ddrphy_dfi_p2_rddata <= 32'd0; + main_a7ddrphy_dfi_p2_rddata[0] <= main_a7ddrphy_bitslip0_o[4]; + main_a7ddrphy_dfi_p2_rddata[16] <= main_a7ddrphy_bitslip0_o[5]; + main_a7ddrphy_dfi_p2_rddata[1] <= main_a7ddrphy_bitslip1_o[4]; + main_a7ddrphy_dfi_p2_rddata[17] <= main_a7ddrphy_bitslip1_o[5]; + main_a7ddrphy_dfi_p2_rddata[2] <= main_a7ddrphy_bitslip2_o[4]; + main_a7ddrphy_dfi_p2_rddata[18] <= main_a7ddrphy_bitslip2_o[5]; + main_a7ddrphy_dfi_p2_rddata[3] <= main_a7ddrphy_bitslip3_o[4]; + main_a7ddrphy_dfi_p2_rddata[19] <= main_a7ddrphy_bitslip3_o[5]; + main_a7ddrphy_dfi_p2_rddata[4] <= main_a7ddrphy_bitslip4_o[4]; + main_a7ddrphy_dfi_p2_rddata[20] <= main_a7ddrphy_bitslip4_o[5]; + main_a7ddrphy_dfi_p2_rddata[5] <= main_a7ddrphy_bitslip5_o[4]; + main_a7ddrphy_dfi_p2_rddata[21] <= main_a7ddrphy_bitslip5_o[5]; + main_a7ddrphy_dfi_p2_rddata[6] <= main_a7ddrphy_bitslip6_o[4]; + main_a7ddrphy_dfi_p2_rddata[22] <= main_a7ddrphy_bitslip6_o[5]; + main_a7ddrphy_dfi_p2_rddata[7] <= main_a7ddrphy_bitslip7_o[4]; + main_a7ddrphy_dfi_p2_rddata[23] <= main_a7ddrphy_bitslip7_o[5]; + main_a7ddrphy_dfi_p2_rddata[8] <= main_a7ddrphy_bitslip8_o[4]; + main_a7ddrphy_dfi_p2_rddata[24] <= main_a7ddrphy_bitslip8_o[5]; + main_a7ddrphy_dfi_p2_rddata[9] <= main_a7ddrphy_bitslip9_o[4]; + main_a7ddrphy_dfi_p2_rddata[25] <= main_a7ddrphy_bitslip9_o[5]; + main_a7ddrphy_dfi_p2_rddata[10] <= main_a7ddrphy_bitslip10_o[4]; + main_a7ddrphy_dfi_p2_rddata[26] <= main_a7ddrphy_bitslip10_o[5]; + main_a7ddrphy_dfi_p2_rddata[11] <= main_a7ddrphy_bitslip11_o[4]; + main_a7ddrphy_dfi_p2_rddata[27] <= main_a7ddrphy_bitslip11_o[5]; + main_a7ddrphy_dfi_p2_rddata[12] <= main_a7ddrphy_bitslip12_o[4]; + main_a7ddrphy_dfi_p2_rddata[28] <= main_a7ddrphy_bitslip12_o[5]; + main_a7ddrphy_dfi_p2_rddata[13] <= main_a7ddrphy_bitslip13_o[4]; + main_a7ddrphy_dfi_p2_rddata[29] <= main_a7ddrphy_bitslip13_o[5]; + main_a7ddrphy_dfi_p2_rddata[14] <= main_a7ddrphy_bitslip14_o[4]; + main_a7ddrphy_dfi_p2_rddata[30] <= main_a7ddrphy_bitslip14_o[5]; + main_a7ddrphy_dfi_p2_rddata[15] <= main_a7ddrphy_bitslip15_o[4]; + main_a7ddrphy_dfi_p2_rddata[31] <= main_a7ddrphy_bitslip15_o[5]; +end +always @(*) begin + main_a7ddrphy_dfi_p3_rddata <= 32'd0; + main_a7ddrphy_dfi_p3_rddata[0] <= main_a7ddrphy_bitslip0_o[6]; + main_a7ddrphy_dfi_p3_rddata[16] <= main_a7ddrphy_bitslip0_o[7]; + main_a7ddrphy_dfi_p3_rddata[1] <= main_a7ddrphy_bitslip1_o[6]; + main_a7ddrphy_dfi_p3_rddata[17] <= main_a7ddrphy_bitslip1_o[7]; + main_a7ddrphy_dfi_p3_rddata[2] <= main_a7ddrphy_bitslip2_o[6]; + main_a7ddrphy_dfi_p3_rddata[18] <= main_a7ddrphy_bitslip2_o[7]; + main_a7ddrphy_dfi_p3_rddata[3] <= main_a7ddrphy_bitslip3_o[6]; + main_a7ddrphy_dfi_p3_rddata[19] <= main_a7ddrphy_bitslip3_o[7]; + main_a7ddrphy_dfi_p3_rddata[4] <= main_a7ddrphy_bitslip4_o[6]; + main_a7ddrphy_dfi_p3_rddata[20] <= main_a7ddrphy_bitslip4_o[7]; + main_a7ddrphy_dfi_p3_rddata[5] <= main_a7ddrphy_bitslip5_o[6]; + main_a7ddrphy_dfi_p3_rddata[21] <= main_a7ddrphy_bitslip5_o[7]; + main_a7ddrphy_dfi_p3_rddata[6] <= main_a7ddrphy_bitslip6_o[6]; + main_a7ddrphy_dfi_p3_rddata[22] <= main_a7ddrphy_bitslip6_o[7]; + main_a7ddrphy_dfi_p3_rddata[7] <= main_a7ddrphy_bitslip7_o[6]; + main_a7ddrphy_dfi_p3_rddata[23] <= main_a7ddrphy_bitslip7_o[7]; + main_a7ddrphy_dfi_p3_rddata[8] <= main_a7ddrphy_bitslip8_o[6]; + main_a7ddrphy_dfi_p3_rddata[24] <= main_a7ddrphy_bitslip8_o[7]; + main_a7ddrphy_dfi_p3_rddata[9] <= main_a7ddrphy_bitslip9_o[6]; + main_a7ddrphy_dfi_p3_rddata[25] <= main_a7ddrphy_bitslip9_o[7]; + main_a7ddrphy_dfi_p3_rddata[10] <= main_a7ddrphy_bitslip10_o[6]; + main_a7ddrphy_dfi_p3_rddata[26] <= main_a7ddrphy_bitslip10_o[7]; + main_a7ddrphy_dfi_p3_rddata[11] <= main_a7ddrphy_bitslip11_o[6]; + main_a7ddrphy_dfi_p3_rddata[27] <= main_a7ddrphy_bitslip11_o[7]; + main_a7ddrphy_dfi_p3_rddata[12] <= main_a7ddrphy_bitslip12_o[6]; + main_a7ddrphy_dfi_p3_rddata[28] <= main_a7ddrphy_bitslip12_o[7]; + main_a7ddrphy_dfi_p3_rddata[13] <= main_a7ddrphy_bitslip13_o[6]; + main_a7ddrphy_dfi_p3_rddata[29] <= main_a7ddrphy_bitslip13_o[7]; + main_a7ddrphy_dfi_p3_rddata[14] <= main_a7ddrphy_bitslip14_o[6]; + main_a7ddrphy_dfi_p3_rddata[30] <= main_a7ddrphy_bitslip14_o[7]; + main_a7ddrphy_dfi_p3_rddata[15] <= main_a7ddrphy_bitslip15_o[6]; + main_a7ddrphy_dfi_p3_rddata[31] <= main_a7ddrphy_bitslip15_o[7]; +end +assign main_a7ddrphy_oe = ((main_a7ddrphy_last_wrdata_en[1] | main_a7ddrphy_last_wrdata_en[2]) | main_a7ddrphy_last_wrdata_en[3]); +assign main_a7ddrphy_dqs_preamble = (main_a7ddrphy_last_wrdata_en[1] & (~main_a7ddrphy_last_wrdata_en[2])); +assign main_a7ddrphy_dqs_postamble = (main_a7ddrphy_last_wrdata_en[3] & (~main_a7ddrphy_last_wrdata_en[2])); +assign main_a7ddrphy_dfi_p0_address = main_sdram_master_p0_address; +assign main_a7ddrphy_dfi_p0_bank = main_sdram_master_p0_bank; +assign main_a7ddrphy_dfi_p0_cas_n = main_sdram_master_p0_cas_n; +assign main_a7ddrphy_dfi_p0_cs_n = main_sdram_master_p0_cs_n; +assign main_a7ddrphy_dfi_p0_ras_n = main_sdram_master_p0_ras_n; +assign main_a7ddrphy_dfi_p0_we_n = main_sdram_master_p0_we_n; +assign main_a7ddrphy_dfi_p0_cke = main_sdram_master_p0_cke; +assign main_a7ddrphy_dfi_p0_odt = main_sdram_master_p0_odt; +assign main_a7ddrphy_dfi_p0_reset_n = main_sdram_master_p0_reset_n; +assign main_a7ddrphy_dfi_p0_act_n = main_sdram_master_p0_act_n; +assign main_a7ddrphy_dfi_p0_wrdata = main_sdram_master_p0_wrdata; +assign main_a7ddrphy_dfi_p0_wrdata_en = main_sdram_master_p0_wrdata_en; +assign main_a7ddrphy_dfi_p0_wrdata_mask = main_sdram_master_p0_wrdata_mask; +assign main_a7ddrphy_dfi_p0_rddata_en = main_sdram_master_p0_rddata_en; +assign main_sdram_master_p0_rddata = main_a7ddrphy_dfi_p0_rddata; +assign main_sdram_master_p0_rddata_valid = main_a7ddrphy_dfi_p0_rddata_valid; +assign main_a7ddrphy_dfi_p1_address = main_sdram_master_p1_address; +assign main_a7ddrphy_dfi_p1_bank = main_sdram_master_p1_bank; +assign main_a7ddrphy_dfi_p1_cas_n = main_sdram_master_p1_cas_n; +assign main_a7ddrphy_dfi_p1_cs_n = main_sdram_master_p1_cs_n; +assign main_a7ddrphy_dfi_p1_ras_n = main_sdram_master_p1_ras_n; +assign main_a7ddrphy_dfi_p1_we_n = main_sdram_master_p1_we_n; +assign main_a7ddrphy_dfi_p1_cke = main_sdram_master_p1_cke; +assign main_a7ddrphy_dfi_p1_odt = main_sdram_master_p1_odt; +assign main_a7ddrphy_dfi_p1_reset_n = main_sdram_master_p1_reset_n; +assign main_a7ddrphy_dfi_p1_act_n = main_sdram_master_p1_act_n; +assign main_a7ddrphy_dfi_p1_wrdata = main_sdram_master_p1_wrdata; +assign main_a7ddrphy_dfi_p1_wrdata_en = main_sdram_master_p1_wrdata_en; +assign main_a7ddrphy_dfi_p1_wrdata_mask = main_sdram_master_p1_wrdata_mask; +assign main_a7ddrphy_dfi_p1_rddata_en = main_sdram_master_p1_rddata_en; +assign main_sdram_master_p1_rddata = main_a7ddrphy_dfi_p1_rddata; +assign main_sdram_master_p1_rddata_valid = main_a7ddrphy_dfi_p1_rddata_valid; +assign main_a7ddrphy_dfi_p2_address = main_sdram_master_p2_address; +assign main_a7ddrphy_dfi_p2_bank = main_sdram_master_p2_bank; +assign main_a7ddrphy_dfi_p2_cas_n = main_sdram_master_p2_cas_n; +assign main_a7ddrphy_dfi_p2_cs_n = main_sdram_master_p2_cs_n; +assign main_a7ddrphy_dfi_p2_ras_n = main_sdram_master_p2_ras_n; +assign main_a7ddrphy_dfi_p2_we_n = main_sdram_master_p2_we_n; +assign main_a7ddrphy_dfi_p2_cke = main_sdram_master_p2_cke; +assign main_a7ddrphy_dfi_p2_odt = main_sdram_master_p2_odt; +assign main_a7ddrphy_dfi_p2_reset_n = main_sdram_master_p2_reset_n; +assign main_a7ddrphy_dfi_p2_act_n = main_sdram_master_p2_act_n; +assign main_a7ddrphy_dfi_p2_wrdata = main_sdram_master_p2_wrdata; +assign main_a7ddrphy_dfi_p2_wrdata_en = main_sdram_master_p2_wrdata_en; +assign main_a7ddrphy_dfi_p2_wrdata_mask = main_sdram_master_p2_wrdata_mask; +assign main_a7ddrphy_dfi_p2_rddata_en = main_sdram_master_p2_rddata_en; +assign main_sdram_master_p2_rddata = main_a7ddrphy_dfi_p2_rddata; +assign main_sdram_master_p2_rddata_valid = main_a7ddrphy_dfi_p2_rddata_valid; +assign main_a7ddrphy_dfi_p3_address = main_sdram_master_p3_address; +assign main_a7ddrphy_dfi_p3_bank = main_sdram_master_p3_bank; +assign main_a7ddrphy_dfi_p3_cas_n = main_sdram_master_p3_cas_n; +assign main_a7ddrphy_dfi_p3_cs_n = main_sdram_master_p3_cs_n; +assign main_a7ddrphy_dfi_p3_ras_n = main_sdram_master_p3_ras_n; +assign main_a7ddrphy_dfi_p3_we_n = main_sdram_master_p3_we_n; +assign main_a7ddrphy_dfi_p3_cke = main_sdram_master_p3_cke; +assign main_a7ddrphy_dfi_p3_odt = main_sdram_master_p3_odt; +assign main_a7ddrphy_dfi_p3_reset_n = main_sdram_master_p3_reset_n; +assign main_a7ddrphy_dfi_p3_act_n = main_sdram_master_p3_act_n; +assign main_a7ddrphy_dfi_p3_wrdata = main_sdram_master_p3_wrdata; +assign main_a7ddrphy_dfi_p3_wrdata_en = main_sdram_master_p3_wrdata_en; +assign main_a7ddrphy_dfi_p3_wrdata_mask = main_sdram_master_p3_wrdata_mask; +assign main_a7ddrphy_dfi_p3_rddata_en = main_sdram_master_p3_rddata_en; +assign main_sdram_master_p3_rddata = main_a7ddrphy_dfi_p3_rddata; +assign main_sdram_master_p3_rddata_valid = main_a7ddrphy_dfi_p3_rddata_valid; +assign main_sdram_slave_p0_address = main_sdram_dfi_p0_address; +assign main_sdram_slave_p0_bank = main_sdram_dfi_p0_bank; +assign main_sdram_slave_p0_cas_n = main_sdram_dfi_p0_cas_n; +assign main_sdram_slave_p0_cs_n = main_sdram_dfi_p0_cs_n; +assign main_sdram_slave_p0_ras_n = main_sdram_dfi_p0_ras_n; +assign main_sdram_slave_p0_we_n = main_sdram_dfi_p0_we_n; +assign main_sdram_slave_p0_cke = main_sdram_dfi_p0_cke; +assign main_sdram_slave_p0_odt = main_sdram_dfi_p0_odt; +assign main_sdram_slave_p0_reset_n = main_sdram_dfi_p0_reset_n; +assign main_sdram_slave_p0_act_n = main_sdram_dfi_p0_act_n; +assign main_sdram_slave_p0_wrdata = main_sdram_dfi_p0_wrdata; +assign main_sdram_slave_p0_wrdata_en = main_sdram_dfi_p0_wrdata_en; +assign main_sdram_slave_p0_wrdata_mask = main_sdram_dfi_p0_wrdata_mask; +assign main_sdram_slave_p0_rddata_en = main_sdram_dfi_p0_rddata_en; +assign main_sdram_dfi_p0_rddata = main_sdram_slave_p0_rddata; +assign main_sdram_dfi_p0_rddata_valid = main_sdram_slave_p0_rddata_valid; +assign main_sdram_slave_p1_address = main_sdram_dfi_p1_address; +assign main_sdram_slave_p1_bank = main_sdram_dfi_p1_bank; +assign main_sdram_slave_p1_cas_n = main_sdram_dfi_p1_cas_n; +assign main_sdram_slave_p1_cs_n = main_sdram_dfi_p1_cs_n; +assign main_sdram_slave_p1_ras_n = main_sdram_dfi_p1_ras_n; +assign main_sdram_slave_p1_we_n = main_sdram_dfi_p1_we_n; +assign main_sdram_slave_p1_cke = main_sdram_dfi_p1_cke; +assign main_sdram_slave_p1_odt = main_sdram_dfi_p1_odt; +assign main_sdram_slave_p1_reset_n = main_sdram_dfi_p1_reset_n; +assign main_sdram_slave_p1_act_n = main_sdram_dfi_p1_act_n; +assign main_sdram_slave_p1_wrdata = main_sdram_dfi_p1_wrdata; +assign main_sdram_slave_p1_wrdata_en = main_sdram_dfi_p1_wrdata_en; +assign main_sdram_slave_p1_wrdata_mask = main_sdram_dfi_p1_wrdata_mask; +assign main_sdram_slave_p1_rddata_en = main_sdram_dfi_p1_rddata_en; +assign main_sdram_dfi_p1_rddata = main_sdram_slave_p1_rddata; +assign main_sdram_dfi_p1_rddata_valid = main_sdram_slave_p1_rddata_valid; +assign main_sdram_slave_p2_address = main_sdram_dfi_p2_address; +assign main_sdram_slave_p2_bank = main_sdram_dfi_p2_bank; +assign main_sdram_slave_p2_cas_n = main_sdram_dfi_p2_cas_n; +assign main_sdram_slave_p2_cs_n = main_sdram_dfi_p2_cs_n; +assign main_sdram_slave_p2_ras_n = main_sdram_dfi_p2_ras_n; +assign main_sdram_slave_p2_we_n = main_sdram_dfi_p2_we_n; +assign main_sdram_slave_p2_cke = main_sdram_dfi_p2_cke; +assign main_sdram_slave_p2_odt = main_sdram_dfi_p2_odt; +assign main_sdram_slave_p2_reset_n = main_sdram_dfi_p2_reset_n; +assign main_sdram_slave_p2_act_n = main_sdram_dfi_p2_act_n; +assign main_sdram_slave_p2_wrdata = main_sdram_dfi_p2_wrdata; +assign main_sdram_slave_p2_wrdata_en = main_sdram_dfi_p2_wrdata_en; +assign main_sdram_slave_p2_wrdata_mask = main_sdram_dfi_p2_wrdata_mask; +assign main_sdram_slave_p2_rddata_en = main_sdram_dfi_p2_rddata_en; +assign main_sdram_dfi_p2_rddata = main_sdram_slave_p2_rddata; +assign main_sdram_dfi_p2_rddata_valid = main_sdram_slave_p2_rddata_valid; +assign main_sdram_slave_p3_address = main_sdram_dfi_p3_address; +assign main_sdram_slave_p3_bank = main_sdram_dfi_p3_bank; +assign main_sdram_slave_p3_cas_n = main_sdram_dfi_p3_cas_n; +assign main_sdram_slave_p3_cs_n = main_sdram_dfi_p3_cs_n; +assign main_sdram_slave_p3_ras_n = main_sdram_dfi_p3_ras_n; +assign main_sdram_slave_p3_we_n = main_sdram_dfi_p3_we_n; +assign main_sdram_slave_p3_cke = main_sdram_dfi_p3_cke; +assign main_sdram_slave_p3_odt = main_sdram_dfi_p3_odt; +assign main_sdram_slave_p3_reset_n = main_sdram_dfi_p3_reset_n; +assign main_sdram_slave_p3_act_n = main_sdram_dfi_p3_act_n; +assign main_sdram_slave_p3_wrdata = main_sdram_dfi_p3_wrdata; +assign main_sdram_slave_p3_wrdata_en = main_sdram_dfi_p3_wrdata_en; +assign main_sdram_slave_p3_wrdata_mask = main_sdram_dfi_p3_wrdata_mask; +assign main_sdram_slave_p3_rddata_en = main_sdram_dfi_p3_rddata_en; +assign main_sdram_dfi_p3_rddata = main_sdram_slave_p3_rddata; +assign main_sdram_dfi_p3_rddata_valid = main_sdram_slave_p3_rddata_valid; +always @(*) begin + main_sdram_slave_p1_rddata <= 32'd0; + main_sdram_slave_p1_rddata_valid <= 1'd0; + main_sdram_slave_p2_rddata <= 32'd0; + main_sdram_slave_p2_rddata_valid <= 1'd0; + main_sdram_slave_p3_rddata <= 32'd0; + main_sdram_slave_p3_rddata_valid <= 1'd0; + main_sdram_inti_p0_rddata <= 32'd0; + main_sdram_inti_p0_rddata_valid <= 1'd0; + main_sdram_master_p0_address <= 14'd0; + main_sdram_master_p0_bank <= 3'd0; + main_sdram_master_p0_cas_n <= 1'd1; + main_sdram_master_p0_cs_n <= 1'd1; + main_sdram_master_p0_ras_n <= 1'd1; + main_sdram_master_p0_we_n <= 1'd1; + main_sdram_master_p0_cke <= 1'd0; + main_sdram_master_p0_odt <= 1'd0; + main_sdram_master_p0_reset_n <= 1'd0; + main_sdram_master_p0_act_n <= 1'd1; + main_sdram_inti_p1_rddata <= 32'd0; + main_sdram_master_p0_wrdata <= 32'd0; + main_sdram_inti_p1_rddata_valid <= 1'd0; + main_sdram_master_p0_wrdata_en <= 1'd0; + main_sdram_master_p0_wrdata_mask <= 4'd0; + main_sdram_master_p0_rddata_en <= 1'd0; + main_sdram_master_p1_address <= 14'd0; + main_sdram_master_p1_bank <= 3'd0; + main_sdram_master_p1_cas_n <= 1'd1; + main_sdram_master_p1_cs_n <= 1'd1; + main_sdram_master_p1_ras_n <= 1'd1; + main_sdram_master_p1_we_n <= 1'd1; + main_sdram_master_p1_cke <= 1'd0; + main_sdram_master_p1_odt <= 1'd0; + main_sdram_master_p1_reset_n <= 1'd0; + main_sdram_master_p1_act_n <= 1'd1; + main_sdram_master_p1_wrdata <= 32'd0; + main_sdram_inti_p2_rddata <= 32'd0; + main_sdram_master_p1_wrdata_en <= 1'd0; + main_sdram_inti_p2_rddata_valid <= 1'd0; + main_sdram_master_p1_wrdata_mask <= 4'd0; + main_sdram_master_p1_rddata_en <= 1'd0; + main_sdram_master_p2_address <= 14'd0; + main_sdram_master_p2_bank <= 3'd0; + main_sdram_master_p2_cas_n <= 1'd1; + main_sdram_master_p2_cs_n <= 1'd1; + main_sdram_master_p2_ras_n <= 1'd1; + main_sdram_master_p2_we_n <= 1'd1; + main_sdram_master_p2_cke <= 1'd0; + main_sdram_master_p2_odt <= 1'd0; + main_sdram_master_p2_reset_n <= 1'd0; + main_sdram_master_p2_act_n <= 1'd1; + main_sdram_master_p2_wrdata <= 32'd0; + main_sdram_inti_p3_rddata <= 32'd0; + main_sdram_master_p2_wrdata_en <= 1'd0; + main_sdram_inti_p3_rddata_valid <= 1'd0; + main_sdram_master_p2_wrdata_mask <= 4'd0; + main_sdram_master_p2_rddata_en <= 1'd0; + main_sdram_master_p3_address <= 14'd0; + main_sdram_master_p3_bank <= 3'd0; + main_sdram_master_p3_cas_n <= 1'd1; + main_sdram_master_p3_cs_n <= 1'd1; + main_sdram_master_p3_ras_n <= 1'd1; + main_sdram_master_p3_we_n <= 1'd1; + main_sdram_master_p3_cke <= 1'd0; + main_sdram_master_p3_odt <= 1'd0; + main_sdram_master_p3_reset_n <= 1'd0; + main_sdram_master_p3_act_n <= 1'd1; + main_sdram_master_p3_wrdata <= 32'd0; + main_sdram_master_p3_wrdata_en <= 1'd0; + main_sdram_master_p3_wrdata_mask <= 4'd0; + main_sdram_master_p3_rddata_en <= 1'd0; + main_sdram_slave_p0_rddata <= 32'd0; + main_sdram_slave_p0_rddata_valid <= 1'd0; + if (main_sdram_storage[0]) begin + main_sdram_master_p0_address <= main_sdram_slave_p0_address; + main_sdram_master_p0_bank <= main_sdram_slave_p0_bank; + main_sdram_master_p0_cas_n <= main_sdram_slave_p0_cas_n; + main_sdram_master_p0_cs_n <= main_sdram_slave_p0_cs_n; + main_sdram_master_p0_ras_n <= main_sdram_slave_p0_ras_n; + main_sdram_master_p0_we_n <= main_sdram_slave_p0_we_n; + main_sdram_master_p0_cke <= main_sdram_slave_p0_cke; + main_sdram_master_p0_odt <= main_sdram_slave_p0_odt; + main_sdram_master_p0_reset_n <= main_sdram_slave_p0_reset_n; + main_sdram_master_p0_act_n <= main_sdram_slave_p0_act_n; + main_sdram_master_p0_wrdata <= main_sdram_slave_p0_wrdata; + main_sdram_master_p0_wrdata_en <= main_sdram_slave_p0_wrdata_en; + main_sdram_master_p0_wrdata_mask <= main_sdram_slave_p0_wrdata_mask; + main_sdram_master_p0_rddata_en <= main_sdram_slave_p0_rddata_en; + main_sdram_slave_p0_rddata <= main_sdram_master_p0_rddata; + main_sdram_slave_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; + main_sdram_master_p1_address <= main_sdram_slave_p1_address; + main_sdram_master_p1_bank <= main_sdram_slave_p1_bank; + main_sdram_master_p1_cas_n <= main_sdram_slave_p1_cas_n; + main_sdram_master_p1_cs_n <= main_sdram_slave_p1_cs_n; + main_sdram_master_p1_ras_n <= main_sdram_slave_p1_ras_n; + main_sdram_master_p1_we_n <= main_sdram_slave_p1_we_n; + main_sdram_master_p1_cke <= main_sdram_slave_p1_cke; + main_sdram_master_p1_odt <= main_sdram_slave_p1_odt; + main_sdram_master_p1_reset_n <= main_sdram_slave_p1_reset_n; + main_sdram_master_p1_act_n <= main_sdram_slave_p1_act_n; + main_sdram_master_p1_wrdata <= main_sdram_slave_p1_wrdata; + main_sdram_master_p1_wrdata_en <= main_sdram_slave_p1_wrdata_en; + main_sdram_master_p1_wrdata_mask <= main_sdram_slave_p1_wrdata_mask; + main_sdram_master_p1_rddata_en <= main_sdram_slave_p1_rddata_en; + main_sdram_slave_p1_rddata <= main_sdram_master_p1_rddata; + main_sdram_slave_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; + main_sdram_master_p2_address <= main_sdram_slave_p2_address; + main_sdram_master_p2_bank <= main_sdram_slave_p2_bank; + main_sdram_master_p2_cas_n <= main_sdram_slave_p2_cas_n; + main_sdram_master_p2_cs_n <= main_sdram_slave_p2_cs_n; + main_sdram_master_p2_ras_n <= main_sdram_slave_p2_ras_n; + main_sdram_master_p2_we_n <= main_sdram_slave_p2_we_n; + main_sdram_master_p2_cke <= main_sdram_slave_p2_cke; + main_sdram_master_p2_odt <= main_sdram_slave_p2_odt; + main_sdram_master_p2_reset_n <= main_sdram_slave_p2_reset_n; + main_sdram_master_p2_act_n <= main_sdram_slave_p2_act_n; + main_sdram_master_p2_wrdata <= main_sdram_slave_p2_wrdata; + main_sdram_master_p2_wrdata_en <= main_sdram_slave_p2_wrdata_en; + main_sdram_master_p2_wrdata_mask <= main_sdram_slave_p2_wrdata_mask; + main_sdram_master_p2_rddata_en <= main_sdram_slave_p2_rddata_en; + main_sdram_slave_p2_rddata <= main_sdram_master_p2_rddata; + main_sdram_slave_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; + main_sdram_master_p3_address <= main_sdram_slave_p3_address; + main_sdram_master_p3_bank <= main_sdram_slave_p3_bank; + main_sdram_master_p3_cas_n <= main_sdram_slave_p3_cas_n; + main_sdram_master_p3_cs_n <= main_sdram_slave_p3_cs_n; + main_sdram_master_p3_ras_n <= main_sdram_slave_p3_ras_n; + main_sdram_master_p3_we_n <= main_sdram_slave_p3_we_n; + main_sdram_master_p3_cke <= main_sdram_slave_p3_cke; + main_sdram_master_p3_odt <= main_sdram_slave_p3_odt; + main_sdram_master_p3_reset_n <= main_sdram_slave_p3_reset_n; + main_sdram_master_p3_act_n <= main_sdram_slave_p3_act_n; + main_sdram_master_p3_wrdata <= main_sdram_slave_p3_wrdata; + main_sdram_master_p3_wrdata_en <= main_sdram_slave_p3_wrdata_en; + main_sdram_master_p3_wrdata_mask <= main_sdram_slave_p3_wrdata_mask; + main_sdram_master_p3_rddata_en <= main_sdram_slave_p3_rddata_en; + main_sdram_slave_p3_rddata <= main_sdram_master_p3_rddata; + main_sdram_slave_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; + end else begin + main_sdram_master_p0_address <= main_sdram_inti_p0_address; + main_sdram_master_p0_bank <= main_sdram_inti_p0_bank; + main_sdram_master_p0_cas_n <= main_sdram_inti_p0_cas_n; + main_sdram_master_p0_cs_n <= main_sdram_inti_p0_cs_n; + main_sdram_master_p0_ras_n <= main_sdram_inti_p0_ras_n; + main_sdram_master_p0_we_n <= main_sdram_inti_p0_we_n; + main_sdram_master_p0_cke <= main_sdram_inti_p0_cke; + main_sdram_master_p0_odt <= main_sdram_inti_p0_odt; + main_sdram_master_p0_reset_n <= main_sdram_inti_p0_reset_n; + main_sdram_master_p0_act_n <= main_sdram_inti_p0_act_n; + main_sdram_master_p0_wrdata <= main_sdram_inti_p0_wrdata; + main_sdram_master_p0_wrdata_en <= main_sdram_inti_p0_wrdata_en; + main_sdram_master_p0_wrdata_mask <= main_sdram_inti_p0_wrdata_mask; + main_sdram_master_p0_rddata_en <= main_sdram_inti_p0_rddata_en; + main_sdram_inti_p0_rddata <= main_sdram_master_p0_rddata; + main_sdram_inti_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; + main_sdram_master_p1_address <= main_sdram_inti_p1_address; + main_sdram_master_p1_bank <= main_sdram_inti_p1_bank; + main_sdram_master_p1_cas_n <= main_sdram_inti_p1_cas_n; + main_sdram_master_p1_cs_n <= main_sdram_inti_p1_cs_n; + main_sdram_master_p1_ras_n <= main_sdram_inti_p1_ras_n; + main_sdram_master_p1_we_n <= main_sdram_inti_p1_we_n; + main_sdram_master_p1_cke <= main_sdram_inti_p1_cke; + main_sdram_master_p1_odt <= main_sdram_inti_p1_odt; + main_sdram_master_p1_reset_n <= main_sdram_inti_p1_reset_n; + main_sdram_master_p1_act_n <= main_sdram_inti_p1_act_n; + main_sdram_master_p1_wrdata <= main_sdram_inti_p1_wrdata; + main_sdram_master_p1_wrdata_en <= main_sdram_inti_p1_wrdata_en; + main_sdram_master_p1_wrdata_mask <= main_sdram_inti_p1_wrdata_mask; + main_sdram_master_p1_rddata_en <= main_sdram_inti_p1_rddata_en; + main_sdram_inti_p1_rddata <= main_sdram_master_p1_rddata; + main_sdram_inti_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; + main_sdram_master_p2_address <= main_sdram_inti_p2_address; + main_sdram_master_p2_bank <= main_sdram_inti_p2_bank; + main_sdram_master_p2_cas_n <= main_sdram_inti_p2_cas_n; + main_sdram_master_p2_cs_n <= main_sdram_inti_p2_cs_n; + main_sdram_master_p2_ras_n <= main_sdram_inti_p2_ras_n; + main_sdram_master_p2_we_n <= main_sdram_inti_p2_we_n; + main_sdram_master_p2_cke <= main_sdram_inti_p2_cke; + main_sdram_master_p2_odt <= main_sdram_inti_p2_odt; + main_sdram_master_p2_reset_n <= main_sdram_inti_p2_reset_n; + main_sdram_master_p2_act_n <= main_sdram_inti_p2_act_n; + main_sdram_master_p2_wrdata <= main_sdram_inti_p2_wrdata; + main_sdram_master_p2_wrdata_en <= main_sdram_inti_p2_wrdata_en; + main_sdram_master_p2_wrdata_mask <= main_sdram_inti_p2_wrdata_mask; + main_sdram_master_p2_rddata_en <= main_sdram_inti_p2_rddata_en; + main_sdram_inti_p2_rddata <= main_sdram_master_p2_rddata; + main_sdram_inti_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; + main_sdram_master_p3_address <= main_sdram_inti_p3_address; + main_sdram_master_p3_bank <= main_sdram_inti_p3_bank; + main_sdram_master_p3_cas_n <= main_sdram_inti_p3_cas_n; + main_sdram_master_p3_cs_n <= main_sdram_inti_p3_cs_n; + main_sdram_master_p3_ras_n <= main_sdram_inti_p3_ras_n; + main_sdram_master_p3_we_n <= main_sdram_inti_p3_we_n; + main_sdram_master_p3_cke <= main_sdram_inti_p3_cke; + main_sdram_master_p3_odt <= main_sdram_inti_p3_odt; + main_sdram_master_p3_reset_n <= main_sdram_inti_p3_reset_n; + main_sdram_master_p3_act_n <= main_sdram_inti_p3_act_n; + main_sdram_master_p3_wrdata <= main_sdram_inti_p3_wrdata; + main_sdram_master_p3_wrdata_en <= main_sdram_inti_p3_wrdata_en; + main_sdram_master_p3_wrdata_mask <= main_sdram_inti_p3_wrdata_mask; + main_sdram_master_p3_rddata_en <= main_sdram_inti_p3_rddata_en; + main_sdram_inti_p3_rddata <= main_sdram_master_p3_rddata; + main_sdram_inti_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; + end +end +assign main_sdram_inti_p0_cke = main_sdram_storage[1]; +assign main_sdram_inti_p1_cke = main_sdram_storage[1]; +assign main_sdram_inti_p2_cke = main_sdram_storage[1]; +assign main_sdram_inti_p3_cke = main_sdram_storage[1]; +assign main_sdram_inti_p0_odt = main_sdram_storage[2]; +assign main_sdram_inti_p1_odt = main_sdram_storage[2]; +assign main_sdram_inti_p2_odt = main_sdram_storage[2]; +assign main_sdram_inti_p3_odt = main_sdram_storage[2]; +assign main_sdram_inti_p0_reset_n = main_sdram_storage[3]; +assign main_sdram_inti_p1_reset_n = main_sdram_storage[3]; +assign main_sdram_inti_p2_reset_n = main_sdram_storage[3]; +assign main_sdram_inti_p3_reset_n = main_sdram_storage[3]; +always @(*) begin + main_sdram_inti_p0_we_n <= 1'd1; + main_sdram_inti_p0_cas_n <= 1'd1; + main_sdram_inti_p0_cs_n <= 1'd1; + main_sdram_inti_p0_ras_n <= 1'd1; + if (main_sdram_phaseinjector0_command_issue_re) begin + main_sdram_inti_p0_cs_n <= {1{(~main_sdram_phaseinjector0_command_storage[0])}}; + main_sdram_inti_p0_we_n <= (~main_sdram_phaseinjector0_command_storage[1]); + main_sdram_inti_p0_cas_n <= (~main_sdram_phaseinjector0_command_storage[2]); + main_sdram_inti_p0_ras_n <= (~main_sdram_phaseinjector0_command_storage[3]); + end else begin + main_sdram_inti_p0_cs_n <= {1{1'd1}}; + main_sdram_inti_p0_we_n <= 1'd1; + main_sdram_inti_p0_cas_n <= 1'd1; + main_sdram_inti_p0_ras_n <= 1'd1; + end +end +assign main_sdram_inti_p0_address = main_sdram_phaseinjector0_address_storage; +assign main_sdram_inti_p0_bank = main_sdram_phaseinjector0_baddress_storage; +assign main_sdram_inti_p0_wrdata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[4]); +assign main_sdram_inti_p0_rddata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[5]); +assign main_sdram_inti_p0_wrdata = main_sdram_phaseinjector0_wrdata_storage; +assign main_sdram_inti_p0_wrdata_mask = 1'd0; +always @(*) begin + main_sdram_inti_p1_we_n <= 1'd1; + main_sdram_inti_p1_cas_n <= 1'd1; + main_sdram_inti_p1_cs_n <= 1'd1; + main_sdram_inti_p1_ras_n <= 1'd1; + if (main_sdram_phaseinjector1_command_issue_re) begin + main_sdram_inti_p1_cs_n <= {1{(~main_sdram_phaseinjector1_command_storage[0])}}; + main_sdram_inti_p1_we_n <= (~main_sdram_phaseinjector1_command_storage[1]); + main_sdram_inti_p1_cas_n <= (~main_sdram_phaseinjector1_command_storage[2]); + main_sdram_inti_p1_ras_n <= (~main_sdram_phaseinjector1_command_storage[3]); + end else begin + main_sdram_inti_p1_cs_n <= {1{1'd1}}; + main_sdram_inti_p1_we_n <= 1'd1; + main_sdram_inti_p1_cas_n <= 1'd1; + main_sdram_inti_p1_ras_n <= 1'd1; + end +end +assign main_sdram_inti_p1_address = main_sdram_phaseinjector1_address_storage; +assign main_sdram_inti_p1_bank = main_sdram_phaseinjector1_baddress_storage; +assign main_sdram_inti_p1_wrdata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[4]); +assign main_sdram_inti_p1_rddata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[5]); +assign main_sdram_inti_p1_wrdata = main_sdram_phaseinjector1_wrdata_storage; +assign main_sdram_inti_p1_wrdata_mask = 1'd0; +always @(*) begin + main_sdram_inti_p2_we_n <= 1'd1; + main_sdram_inti_p2_cas_n <= 1'd1; + main_sdram_inti_p2_cs_n <= 1'd1; + main_sdram_inti_p2_ras_n <= 1'd1; + if (main_sdram_phaseinjector2_command_issue_re) begin + main_sdram_inti_p2_cs_n <= {1{(~main_sdram_phaseinjector2_command_storage[0])}}; + main_sdram_inti_p2_we_n <= (~main_sdram_phaseinjector2_command_storage[1]); + main_sdram_inti_p2_cas_n <= (~main_sdram_phaseinjector2_command_storage[2]); + main_sdram_inti_p2_ras_n <= (~main_sdram_phaseinjector2_command_storage[3]); + end else begin + main_sdram_inti_p2_cs_n <= {1{1'd1}}; + main_sdram_inti_p2_we_n <= 1'd1; + main_sdram_inti_p2_cas_n <= 1'd1; + main_sdram_inti_p2_ras_n <= 1'd1; + end +end +assign main_sdram_inti_p2_address = main_sdram_phaseinjector2_address_storage; +assign main_sdram_inti_p2_bank = main_sdram_phaseinjector2_baddress_storage; +assign main_sdram_inti_p2_wrdata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[4]); +assign main_sdram_inti_p2_rddata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[5]); +assign main_sdram_inti_p2_wrdata = main_sdram_phaseinjector2_wrdata_storage; +assign main_sdram_inti_p2_wrdata_mask = 1'd0; +always @(*) begin + main_sdram_inti_p3_we_n <= 1'd1; + main_sdram_inti_p3_cas_n <= 1'd1; + main_sdram_inti_p3_cs_n <= 1'd1; + main_sdram_inti_p3_ras_n <= 1'd1; + if (main_sdram_phaseinjector3_command_issue_re) begin + main_sdram_inti_p3_cs_n <= {1{(~main_sdram_phaseinjector3_command_storage[0])}}; + main_sdram_inti_p3_we_n <= (~main_sdram_phaseinjector3_command_storage[1]); + main_sdram_inti_p3_cas_n <= (~main_sdram_phaseinjector3_command_storage[2]); + main_sdram_inti_p3_ras_n <= (~main_sdram_phaseinjector3_command_storage[3]); + end else begin + main_sdram_inti_p3_cs_n <= {1{1'd1}}; + main_sdram_inti_p3_we_n <= 1'd1; + main_sdram_inti_p3_cas_n <= 1'd1; + main_sdram_inti_p3_ras_n <= 1'd1; + end +end +assign main_sdram_inti_p3_address = main_sdram_phaseinjector3_address_storage; +assign main_sdram_inti_p3_bank = main_sdram_phaseinjector3_baddress_storage; +assign main_sdram_inti_p3_wrdata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[4]); +assign main_sdram_inti_p3_rddata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[5]); +assign main_sdram_inti_p3_wrdata = main_sdram_phaseinjector3_wrdata_storage; +assign main_sdram_inti_p3_wrdata_mask = 1'd0; +assign main_sdram_bankmachine0_req_valid = main_sdram_interface_bank0_valid; +assign main_sdram_interface_bank0_ready = main_sdram_bankmachine0_req_ready; +assign main_sdram_bankmachine0_req_we = main_sdram_interface_bank0_we; +assign main_sdram_bankmachine0_req_addr = main_sdram_interface_bank0_addr; +assign main_sdram_interface_bank0_lock = main_sdram_bankmachine0_req_lock; +assign main_sdram_interface_bank0_wdata_ready = main_sdram_bankmachine0_req_wdata_ready; +assign main_sdram_interface_bank0_rdata_valid = main_sdram_bankmachine0_req_rdata_valid; +assign main_sdram_bankmachine1_req_valid = main_sdram_interface_bank1_valid; +assign main_sdram_interface_bank1_ready = main_sdram_bankmachine1_req_ready; +assign main_sdram_bankmachine1_req_we = main_sdram_interface_bank1_we; +assign main_sdram_bankmachine1_req_addr = main_sdram_interface_bank1_addr; +assign main_sdram_interface_bank1_lock = main_sdram_bankmachine1_req_lock; +assign main_sdram_interface_bank1_wdata_ready = main_sdram_bankmachine1_req_wdata_ready; +assign main_sdram_interface_bank1_rdata_valid = main_sdram_bankmachine1_req_rdata_valid; +assign main_sdram_bankmachine2_req_valid = main_sdram_interface_bank2_valid; +assign main_sdram_interface_bank2_ready = main_sdram_bankmachine2_req_ready; +assign main_sdram_bankmachine2_req_we = main_sdram_interface_bank2_we; +assign main_sdram_bankmachine2_req_addr = main_sdram_interface_bank2_addr; +assign main_sdram_interface_bank2_lock = main_sdram_bankmachine2_req_lock; +assign main_sdram_interface_bank2_wdata_ready = main_sdram_bankmachine2_req_wdata_ready; +assign main_sdram_interface_bank2_rdata_valid = main_sdram_bankmachine2_req_rdata_valid; +assign main_sdram_bankmachine3_req_valid = main_sdram_interface_bank3_valid; +assign main_sdram_interface_bank3_ready = main_sdram_bankmachine3_req_ready; +assign main_sdram_bankmachine3_req_we = main_sdram_interface_bank3_we; +assign main_sdram_bankmachine3_req_addr = main_sdram_interface_bank3_addr; +assign main_sdram_interface_bank3_lock = main_sdram_bankmachine3_req_lock; +assign main_sdram_interface_bank3_wdata_ready = main_sdram_bankmachine3_req_wdata_ready; +assign main_sdram_interface_bank3_rdata_valid = main_sdram_bankmachine3_req_rdata_valid; +assign main_sdram_bankmachine4_req_valid = main_sdram_interface_bank4_valid; +assign main_sdram_interface_bank4_ready = main_sdram_bankmachine4_req_ready; +assign main_sdram_bankmachine4_req_we = main_sdram_interface_bank4_we; +assign main_sdram_bankmachine4_req_addr = main_sdram_interface_bank4_addr; +assign main_sdram_interface_bank4_lock = main_sdram_bankmachine4_req_lock; +assign main_sdram_interface_bank4_wdata_ready = main_sdram_bankmachine4_req_wdata_ready; +assign main_sdram_interface_bank4_rdata_valid = main_sdram_bankmachine4_req_rdata_valid; +assign main_sdram_bankmachine5_req_valid = main_sdram_interface_bank5_valid; +assign main_sdram_interface_bank5_ready = main_sdram_bankmachine5_req_ready; +assign main_sdram_bankmachine5_req_we = main_sdram_interface_bank5_we; +assign main_sdram_bankmachine5_req_addr = main_sdram_interface_bank5_addr; +assign main_sdram_interface_bank5_lock = main_sdram_bankmachine5_req_lock; +assign main_sdram_interface_bank5_wdata_ready = main_sdram_bankmachine5_req_wdata_ready; +assign main_sdram_interface_bank5_rdata_valid = main_sdram_bankmachine5_req_rdata_valid; +assign main_sdram_bankmachine6_req_valid = main_sdram_interface_bank6_valid; +assign main_sdram_interface_bank6_ready = main_sdram_bankmachine6_req_ready; +assign main_sdram_bankmachine6_req_we = main_sdram_interface_bank6_we; +assign main_sdram_bankmachine6_req_addr = main_sdram_interface_bank6_addr; +assign main_sdram_interface_bank6_lock = main_sdram_bankmachine6_req_lock; +assign main_sdram_interface_bank6_wdata_ready = main_sdram_bankmachine6_req_wdata_ready; +assign main_sdram_interface_bank6_rdata_valid = main_sdram_bankmachine6_req_rdata_valid; +assign main_sdram_bankmachine7_req_valid = main_sdram_interface_bank7_valid; +assign main_sdram_interface_bank7_ready = main_sdram_bankmachine7_req_ready; +assign main_sdram_bankmachine7_req_we = main_sdram_interface_bank7_we; +assign main_sdram_bankmachine7_req_addr = main_sdram_interface_bank7_addr; +assign main_sdram_interface_bank7_lock = main_sdram_bankmachine7_req_lock; +assign main_sdram_interface_bank7_wdata_ready = main_sdram_bankmachine7_req_wdata_ready; +assign main_sdram_interface_bank7_rdata_valid = main_sdram_bankmachine7_req_rdata_valid; +assign main_sdram_timer_wait = (~main_sdram_timer_done0); +assign main_sdram_postponer_req_i = main_sdram_timer_done0; +assign main_sdram_wants_refresh = main_sdram_postponer_req_o; +assign main_sdram_wants_zqcs = main_sdram_zqcs_timer_done0; +assign main_sdram_zqcs_timer_wait = (~main_sdram_zqcs_executer_done); +assign main_sdram_timer_done1 = (main_sdram_timer_count1 == 1'd0); +assign main_sdram_timer_done0 = main_sdram_timer_done1; +assign main_sdram_timer_count0 = main_sdram_timer_count1; +assign main_sdram_sequencer_start1 = (main_sdram_sequencer_start0 | (main_sdram_sequencer_count != 1'd0)); +assign main_sdram_sequencer_done0 = (main_sdram_sequencer_done1 & (main_sdram_sequencer_count == 1'd0)); +assign main_sdram_zqcs_timer_done1 = (main_sdram_zqcs_timer_count1 == 1'd0); +assign main_sdram_zqcs_timer_done0 = main_sdram_zqcs_timer_done1; +assign main_sdram_zqcs_timer_count0 = main_sdram_zqcs_timer_count1; +always @(*) begin + main_sdram_cmd_valid <= 1'd0; + builder_refresher_next_state <= 2'd0; + main_sdram_zqcs_executer_start <= 1'd0; + main_sdram_cmd_last <= 1'd0; + main_sdram_sequencer_start0 <= 1'd0; + builder_refresher_next_state <= builder_refresher_state; + case (builder_refresher_state) + 1'd1: begin + main_sdram_cmd_valid <= 1'd1; + if (main_sdram_cmd_ready) begin + main_sdram_sequencer_start0 <= 1'd1; + builder_refresher_next_state <= 2'd2; + end + end + 2'd2: begin + main_sdram_cmd_valid <= 1'd1; + if (main_sdram_sequencer_done0) begin + if (main_sdram_wants_zqcs) begin + main_sdram_zqcs_executer_start <= 1'd1; + builder_refresher_next_state <= 2'd3; + end else begin + main_sdram_cmd_valid <= 1'd0; + main_sdram_cmd_last <= 1'd1; + builder_refresher_next_state <= 1'd0; + end + end + end + 2'd3: begin + main_sdram_cmd_valid <= 1'd1; + if (main_sdram_zqcs_executer_done) begin + main_sdram_cmd_valid <= 1'd0; + main_sdram_cmd_last <= 1'd1; + builder_refresher_next_state <= 1'd0; + end + end + default: begin + if (1'd1) begin + if (main_sdram_wants_refresh) begin + builder_refresher_next_state <= 1'd1; + end + end + end + endcase +end +assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine0_req_valid; +assign main_sdram_bankmachine0_req_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine0_req_we; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine0_req_addr; +assign main_sdram_bankmachine0_cmd_buffer_sink_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine0_cmd_buffer_sink_ready; +assign main_sdram_bankmachine0_cmd_buffer_sink_first = main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; +assign main_sdram_bankmachine0_cmd_buffer_sink_last = main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; +assign main_sdram_bankmachine0_cmd_buffer_sink_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; +assign main_sdram_bankmachine0_cmd_buffer_sink_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; +assign main_sdram_bankmachine0_cmd_buffer_source_ready = (main_sdram_bankmachine0_req_wdata_ready | main_sdram_bankmachine0_req_rdata_valid); +assign main_sdram_bankmachine0_req_lock = (main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine0_cmd_buffer_source_valid); +assign main_sdram_bankmachine0_row_hit = (main_sdram_bankmachine0_row == main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]); +assign main_sdram_bankmachine0_cmd_payload_ba = 1'd0; +always @(*) begin + main_sdram_bankmachine0_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine0_row_col_n_addr_sel) begin + main_sdram_bankmachine0_cmd_payload_a <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine0_cmd_payload_a <= ((main_sdram_bankmachine0_auto_precharge <<< 4'd10) | {main_sdram_bankmachine0_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign main_sdram_bankmachine0_twtpcon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_cmd_payload_is_write); +assign main_sdram_bankmachine0_trccon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); +assign main_sdram_bankmachine0_trascon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); +always @(*) begin + main_sdram_bankmachine0_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine0_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine0_auto_precharge <= (main_sdram_bankmachine0_row_close == 1'd0); + end + end +end +assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din = {main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_first = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_last = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re = main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; +always @(*) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine0_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine0_cmd_buffer_lookahead_produce; + end +end +assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable | main_sdram_bankmachine0_cmd_buffer_lookahead_replace)); +assign main_sdram_bankmachine0_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re); +assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine0_cmd_buffer_lookahead_consume; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout = main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 4'd8); +assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 1'd0); +assign main_sdram_bankmachine0_cmd_buffer_sink_ready = ((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready); +always @(*) begin + main_sdram_bankmachine0_row_open <= 1'd0; + main_sdram_bankmachine0_row_close <= 1'd0; + main_sdram_bankmachine0_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine0_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine0_cmd_payload_we <= 1'd0; + main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine0_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine0_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine0_req_wdata_ready <= 1'd0; + builder_bankmachine0_next_state <= 3'd0; + main_sdram_bankmachine0_req_rdata_valid <= 1'd0; + main_sdram_bankmachine0_refresh_gnt <= 1'd0; + main_sdram_bankmachine0_cmd_valid <= 1'd0; + builder_bankmachine0_next_state <= builder_bankmachine0_state; + case (builder_bankmachine0_state) + 1'd1: begin + if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin + main_sdram_bankmachine0_cmd_valid <= 1'd1; + if (main_sdram_bankmachine0_cmd_ready) begin + builder_bankmachine0_next_state <= 3'd5; + end + main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine0_cmd_payload_we <= 1'd1; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine0_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin + builder_bankmachine0_next_state <= 3'd5; + end + main_sdram_bankmachine0_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine0_trccon_ready) begin + main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine0_row_open <= 1'd1; + main_sdram_bankmachine0_cmd_valid <= 1'd1; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine0_cmd_ready) begin + builder_bankmachine0_next_state <= 3'd6; + end + main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine0_twtpcon_ready) begin + main_sdram_bankmachine0_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine0_row_close <= 1'd1; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine0_refresh_req)) begin + builder_bankmachine0_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine0_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine0_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine0_refresh_req) begin + builder_bankmachine0_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine0_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine0_row_opened) begin + if (main_sdram_bankmachine0_row_hit) begin + main_sdram_bankmachine0_cmd_valid <= 1'd1; + if (main_sdram_bankmachine0_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine0_req_wdata_ready <= main_sdram_bankmachine0_cmd_ready; + main_sdram_bankmachine0_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine0_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine0_req_rdata_valid <= main_sdram_bankmachine0_cmd_ready; + main_sdram_bankmachine0_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine0_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine0_cmd_ready & main_sdram_bankmachine0_auto_precharge)) begin + builder_bankmachine0_next_state <= 2'd2; + end + end else begin + builder_bankmachine0_next_state <= 1'd1; + end + end else begin + builder_bankmachine0_next_state <= 2'd3; + end + end + end + end + endcase +end +assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine1_req_valid; +assign main_sdram_bankmachine1_req_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine1_req_we; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine1_req_addr; +assign main_sdram_bankmachine1_cmd_buffer_sink_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine1_cmd_buffer_sink_ready; +assign main_sdram_bankmachine1_cmd_buffer_sink_first = main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; +assign main_sdram_bankmachine1_cmd_buffer_sink_last = main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; +assign main_sdram_bankmachine1_cmd_buffer_sink_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; +assign main_sdram_bankmachine1_cmd_buffer_sink_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; +assign main_sdram_bankmachine1_cmd_buffer_source_ready = (main_sdram_bankmachine1_req_wdata_ready | main_sdram_bankmachine1_req_rdata_valid); +assign main_sdram_bankmachine1_req_lock = (main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine1_cmd_buffer_source_valid); +assign main_sdram_bankmachine1_row_hit = (main_sdram_bankmachine1_row == main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]); +assign main_sdram_bankmachine1_cmd_payload_ba = 1'd1; +always @(*) begin + main_sdram_bankmachine1_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine1_row_col_n_addr_sel) begin + main_sdram_bankmachine1_cmd_payload_a <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine1_cmd_payload_a <= ((main_sdram_bankmachine1_auto_precharge <<< 4'd10) | {main_sdram_bankmachine1_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign main_sdram_bankmachine1_twtpcon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_cmd_payload_is_write); +assign main_sdram_bankmachine1_trccon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); +assign main_sdram_bankmachine1_trascon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); +always @(*) begin + main_sdram_bankmachine1_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine1_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine1_auto_precharge <= (main_sdram_bankmachine1_row_close == 1'd0); + end + end +end +assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din = {main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_first = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_last = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re = main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; +always @(*) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine1_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine1_cmd_buffer_lookahead_produce; + end +end +assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable | main_sdram_bankmachine1_cmd_buffer_lookahead_replace)); +assign main_sdram_bankmachine1_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re); +assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine1_cmd_buffer_lookahead_consume; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout = main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 4'd8); +assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 1'd0); +assign main_sdram_bankmachine1_cmd_buffer_sink_ready = ((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready); +always @(*) begin + main_sdram_bankmachine1_row_open <= 1'd0; + main_sdram_bankmachine1_row_close <= 1'd0; + main_sdram_bankmachine1_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine1_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine1_cmd_payload_we <= 1'd0; + main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine1_cmd_payload_is_read <= 1'd0; + builder_bankmachine1_next_state <= 3'd0; + main_sdram_bankmachine1_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine1_req_wdata_ready <= 1'd0; + main_sdram_bankmachine1_req_rdata_valid <= 1'd0; + main_sdram_bankmachine1_refresh_gnt <= 1'd0; + main_sdram_bankmachine1_cmd_valid <= 1'd0; + builder_bankmachine1_next_state <= builder_bankmachine1_state; + case (builder_bankmachine1_state) + 1'd1: begin + if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin + main_sdram_bankmachine1_cmd_valid <= 1'd1; + if (main_sdram_bankmachine1_cmd_ready) begin + builder_bankmachine1_next_state <= 3'd5; + end + main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine1_cmd_payload_we <= 1'd1; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine1_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin + builder_bankmachine1_next_state <= 3'd5; + end + main_sdram_bankmachine1_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine1_trccon_ready) begin + main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine1_row_open <= 1'd1; + main_sdram_bankmachine1_cmd_valid <= 1'd1; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine1_cmd_ready) begin + builder_bankmachine1_next_state <= 3'd6; + end + main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine1_twtpcon_ready) begin + main_sdram_bankmachine1_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine1_row_close <= 1'd1; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine1_refresh_req)) begin + builder_bankmachine1_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine1_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine1_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine1_refresh_req) begin + builder_bankmachine1_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine1_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine1_row_opened) begin + if (main_sdram_bankmachine1_row_hit) begin + main_sdram_bankmachine1_cmd_valid <= 1'd1; + if (main_sdram_bankmachine1_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine1_req_wdata_ready <= main_sdram_bankmachine1_cmd_ready; + main_sdram_bankmachine1_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine1_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine1_req_rdata_valid <= main_sdram_bankmachine1_cmd_ready; + main_sdram_bankmachine1_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine1_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine1_cmd_ready & main_sdram_bankmachine1_auto_precharge)) begin + builder_bankmachine1_next_state <= 2'd2; + end + end else begin + builder_bankmachine1_next_state <= 1'd1; + end + end else begin + builder_bankmachine1_next_state <= 2'd3; + end + end + end + end + endcase +end +assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine2_req_valid; +assign main_sdram_bankmachine2_req_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine2_req_we; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine2_req_addr; +assign main_sdram_bankmachine2_cmd_buffer_sink_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine2_cmd_buffer_sink_ready; +assign main_sdram_bankmachine2_cmd_buffer_sink_first = main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; +assign main_sdram_bankmachine2_cmd_buffer_sink_last = main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; +assign main_sdram_bankmachine2_cmd_buffer_sink_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; +assign main_sdram_bankmachine2_cmd_buffer_sink_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; +assign main_sdram_bankmachine2_cmd_buffer_source_ready = (main_sdram_bankmachine2_req_wdata_ready | main_sdram_bankmachine2_req_rdata_valid); +assign main_sdram_bankmachine2_req_lock = (main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine2_cmd_buffer_source_valid); +assign main_sdram_bankmachine2_row_hit = (main_sdram_bankmachine2_row == main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]); +assign main_sdram_bankmachine2_cmd_payload_ba = 2'd2; +always @(*) begin + main_sdram_bankmachine2_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine2_row_col_n_addr_sel) begin + main_sdram_bankmachine2_cmd_payload_a <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine2_cmd_payload_a <= ((main_sdram_bankmachine2_auto_precharge <<< 4'd10) | {main_sdram_bankmachine2_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign main_sdram_bankmachine2_twtpcon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_cmd_payload_is_write); +assign main_sdram_bankmachine2_trccon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); +assign main_sdram_bankmachine2_trascon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); +always @(*) begin + main_sdram_bankmachine2_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine2_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine2_auto_precharge <= (main_sdram_bankmachine2_row_close == 1'd0); + end + end +end +assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din = {main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_first = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_last = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re = main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; +always @(*) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine2_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine2_cmd_buffer_lookahead_produce; + end +end +assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable | main_sdram_bankmachine2_cmd_buffer_lookahead_replace)); +assign main_sdram_bankmachine2_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re); +assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine2_cmd_buffer_lookahead_consume; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout = main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 4'd8); +assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 1'd0); +assign main_sdram_bankmachine2_cmd_buffer_sink_ready = ((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready); +always @(*) begin + main_sdram_bankmachine2_row_open <= 1'd0; + main_sdram_bankmachine2_row_close <= 1'd0; + main_sdram_bankmachine2_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine2_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine2_cmd_payload_we <= 1'd0; + main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd0; + builder_bankmachine2_next_state <= 3'd0; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine2_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine2_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine2_req_wdata_ready <= 1'd0; + main_sdram_bankmachine2_req_rdata_valid <= 1'd0; + main_sdram_bankmachine2_refresh_gnt <= 1'd0; + main_sdram_bankmachine2_cmd_valid <= 1'd0; + builder_bankmachine2_next_state <= builder_bankmachine2_state; + case (builder_bankmachine2_state) + 1'd1: begin + if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin + main_sdram_bankmachine2_cmd_valid <= 1'd1; + if (main_sdram_bankmachine2_cmd_ready) begin + builder_bankmachine2_next_state <= 3'd5; + end + main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine2_cmd_payload_we <= 1'd1; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine2_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin + builder_bankmachine2_next_state <= 3'd5; + end + main_sdram_bankmachine2_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine2_trccon_ready) begin + main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine2_row_open <= 1'd1; + main_sdram_bankmachine2_cmd_valid <= 1'd1; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine2_cmd_ready) begin + builder_bankmachine2_next_state <= 3'd6; + end + main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine2_twtpcon_ready) begin + main_sdram_bankmachine2_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine2_row_close <= 1'd1; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine2_refresh_req)) begin + builder_bankmachine2_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine2_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine2_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine2_refresh_req) begin + builder_bankmachine2_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine2_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine2_row_opened) begin + if (main_sdram_bankmachine2_row_hit) begin + main_sdram_bankmachine2_cmd_valid <= 1'd1; + if (main_sdram_bankmachine2_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine2_req_wdata_ready <= main_sdram_bankmachine2_cmd_ready; + main_sdram_bankmachine2_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine2_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine2_req_rdata_valid <= main_sdram_bankmachine2_cmd_ready; + main_sdram_bankmachine2_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine2_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine2_cmd_ready & main_sdram_bankmachine2_auto_precharge)) begin + builder_bankmachine2_next_state <= 2'd2; + end + end else begin + builder_bankmachine2_next_state <= 1'd1; + end + end else begin + builder_bankmachine2_next_state <= 2'd3; + end + end + end + end + endcase +end +assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine3_req_valid; +assign main_sdram_bankmachine3_req_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine3_req_we; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine3_req_addr; +assign main_sdram_bankmachine3_cmd_buffer_sink_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine3_cmd_buffer_sink_ready; +assign main_sdram_bankmachine3_cmd_buffer_sink_first = main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; +assign main_sdram_bankmachine3_cmd_buffer_sink_last = main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; +assign main_sdram_bankmachine3_cmd_buffer_sink_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; +assign main_sdram_bankmachine3_cmd_buffer_sink_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; +assign main_sdram_bankmachine3_cmd_buffer_source_ready = (main_sdram_bankmachine3_req_wdata_ready | main_sdram_bankmachine3_req_rdata_valid); +assign main_sdram_bankmachine3_req_lock = (main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine3_cmd_buffer_source_valid); +assign main_sdram_bankmachine3_row_hit = (main_sdram_bankmachine3_row == main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]); +assign main_sdram_bankmachine3_cmd_payload_ba = 2'd3; +always @(*) begin + main_sdram_bankmachine3_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine3_row_col_n_addr_sel) begin + main_sdram_bankmachine3_cmd_payload_a <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine3_cmd_payload_a <= ((main_sdram_bankmachine3_auto_precharge <<< 4'd10) | {main_sdram_bankmachine3_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign main_sdram_bankmachine3_twtpcon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_cmd_payload_is_write); +assign main_sdram_bankmachine3_trccon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); +assign main_sdram_bankmachine3_trascon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); +always @(*) begin + main_sdram_bankmachine3_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine3_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine3_auto_precharge <= (main_sdram_bankmachine3_row_close == 1'd0); + end + end +end +assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din = {main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_first = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_last = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re = main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; +always @(*) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine3_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine3_cmd_buffer_lookahead_produce; + end +end +assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable | main_sdram_bankmachine3_cmd_buffer_lookahead_replace)); +assign main_sdram_bankmachine3_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re); +assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine3_cmd_buffer_lookahead_consume; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout = main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 4'd8); +assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 1'd0); +assign main_sdram_bankmachine3_cmd_buffer_sink_ready = ((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready); +always @(*) begin + main_sdram_bankmachine3_row_open <= 1'd0; + main_sdram_bankmachine3_row_close <= 1'd0; + main_sdram_bankmachine3_cmd_payload_cas <= 1'd0; + builder_bankmachine3_next_state <= 3'd0; + main_sdram_bankmachine3_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine3_cmd_payload_we <= 1'd0; + main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine3_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine3_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine3_req_wdata_ready <= 1'd0; + main_sdram_bankmachine3_req_rdata_valid <= 1'd0; + main_sdram_bankmachine3_refresh_gnt <= 1'd0; + main_sdram_bankmachine3_cmd_valid <= 1'd0; + builder_bankmachine3_next_state <= builder_bankmachine3_state; + case (builder_bankmachine3_state) + 1'd1: begin + if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin + main_sdram_bankmachine3_cmd_valid <= 1'd1; + if (main_sdram_bankmachine3_cmd_ready) begin + builder_bankmachine3_next_state <= 3'd5; + end + main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine3_cmd_payload_we <= 1'd1; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine3_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin + builder_bankmachine3_next_state <= 3'd5; + end + main_sdram_bankmachine3_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine3_trccon_ready) begin + main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine3_row_open <= 1'd1; + main_sdram_bankmachine3_cmd_valid <= 1'd1; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine3_cmd_ready) begin + builder_bankmachine3_next_state <= 3'd6; + end + main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine3_twtpcon_ready) begin + main_sdram_bankmachine3_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine3_row_close <= 1'd1; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine3_refresh_req)) begin + builder_bankmachine3_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine3_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine3_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine3_refresh_req) begin + builder_bankmachine3_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine3_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine3_row_opened) begin + if (main_sdram_bankmachine3_row_hit) begin + main_sdram_bankmachine3_cmd_valid <= 1'd1; + if (main_sdram_bankmachine3_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine3_req_wdata_ready <= main_sdram_bankmachine3_cmd_ready; + main_sdram_bankmachine3_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine3_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine3_req_rdata_valid <= main_sdram_bankmachine3_cmd_ready; + main_sdram_bankmachine3_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine3_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine3_cmd_ready & main_sdram_bankmachine3_auto_precharge)) begin + builder_bankmachine3_next_state <= 2'd2; + end + end else begin + builder_bankmachine3_next_state <= 1'd1; + end + end else begin + builder_bankmachine3_next_state <= 2'd3; + end + end + end + end + endcase +end +assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine4_req_valid; +assign main_sdram_bankmachine4_req_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine4_req_we; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine4_req_addr; +assign main_sdram_bankmachine4_cmd_buffer_sink_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine4_cmd_buffer_sink_ready; +assign main_sdram_bankmachine4_cmd_buffer_sink_first = main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; +assign main_sdram_bankmachine4_cmd_buffer_sink_last = main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; +assign main_sdram_bankmachine4_cmd_buffer_sink_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; +assign main_sdram_bankmachine4_cmd_buffer_sink_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; +assign main_sdram_bankmachine4_cmd_buffer_source_ready = (main_sdram_bankmachine4_req_wdata_ready | main_sdram_bankmachine4_req_rdata_valid); +assign main_sdram_bankmachine4_req_lock = (main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine4_cmd_buffer_source_valid); +assign main_sdram_bankmachine4_row_hit = (main_sdram_bankmachine4_row == main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]); +assign main_sdram_bankmachine4_cmd_payload_ba = 3'd4; +always @(*) begin + main_sdram_bankmachine4_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine4_row_col_n_addr_sel) begin + main_sdram_bankmachine4_cmd_payload_a <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine4_cmd_payload_a <= ((main_sdram_bankmachine4_auto_precharge <<< 4'd10) | {main_sdram_bankmachine4_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign main_sdram_bankmachine4_twtpcon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_cmd_payload_is_write); +assign main_sdram_bankmachine4_trccon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); +assign main_sdram_bankmachine4_trascon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); +always @(*) begin + main_sdram_bankmachine4_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine4_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine4_auto_precharge <= (main_sdram_bankmachine4_row_close == 1'd0); + end + end +end +assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din = {main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_first = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_last = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re = main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; +always @(*) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine4_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine4_cmd_buffer_lookahead_produce; + end +end +assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable | main_sdram_bankmachine4_cmd_buffer_lookahead_replace)); +assign main_sdram_bankmachine4_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re); +assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine4_cmd_buffer_lookahead_consume; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout = main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 4'd8); +assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 1'd0); +assign main_sdram_bankmachine4_cmd_buffer_sink_ready = ((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready); +always @(*) begin + main_sdram_bankmachine4_row_open <= 1'd0; + main_sdram_bankmachine4_row_close <= 1'd0; + builder_bankmachine4_next_state <= 3'd0; + main_sdram_bankmachine4_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine4_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine4_cmd_payload_we <= 1'd0; + main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine4_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine4_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine4_req_wdata_ready <= 1'd0; + main_sdram_bankmachine4_req_rdata_valid <= 1'd0; + main_sdram_bankmachine4_refresh_gnt <= 1'd0; + main_sdram_bankmachine4_cmd_valid <= 1'd0; + builder_bankmachine4_next_state <= builder_bankmachine4_state; + case (builder_bankmachine4_state) + 1'd1: begin + if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin + main_sdram_bankmachine4_cmd_valid <= 1'd1; + if (main_sdram_bankmachine4_cmd_ready) begin + builder_bankmachine4_next_state <= 3'd5; + end + main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine4_cmd_payload_we <= 1'd1; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine4_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin + builder_bankmachine4_next_state <= 3'd5; + end + main_sdram_bankmachine4_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine4_trccon_ready) begin + main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine4_row_open <= 1'd1; + main_sdram_bankmachine4_cmd_valid <= 1'd1; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine4_cmd_ready) begin + builder_bankmachine4_next_state <= 3'd6; + end + main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine4_twtpcon_ready) begin + main_sdram_bankmachine4_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine4_row_close <= 1'd1; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine4_refresh_req)) begin + builder_bankmachine4_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine4_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine4_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine4_refresh_req) begin + builder_bankmachine4_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine4_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine4_row_opened) begin + if (main_sdram_bankmachine4_row_hit) begin + main_sdram_bankmachine4_cmd_valid <= 1'd1; + if (main_sdram_bankmachine4_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine4_req_wdata_ready <= main_sdram_bankmachine4_cmd_ready; + main_sdram_bankmachine4_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine4_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine4_req_rdata_valid <= main_sdram_bankmachine4_cmd_ready; + main_sdram_bankmachine4_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine4_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine4_cmd_ready & main_sdram_bankmachine4_auto_precharge)) begin + builder_bankmachine4_next_state <= 2'd2; + end + end else begin + builder_bankmachine4_next_state <= 1'd1; + end + end else begin + builder_bankmachine4_next_state <= 2'd3; + end + end + end + end + endcase +end +assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine5_req_valid; +assign main_sdram_bankmachine5_req_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine5_req_we; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine5_req_addr; +assign main_sdram_bankmachine5_cmd_buffer_sink_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine5_cmd_buffer_sink_ready; +assign main_sdram_bankmachine5_cmd_buffer_sink_first = main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; +assign main_sdram_bankmachine5_cmd_buffer_sink_last = main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; +assign main_sdram_bankmachine5_cmd_buffer_sink_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; +assign main_sdram_bankmachine5_cmd_buffer_sink_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; +assign main_sdram_bankmachine5_cmd_buffer_source_ready = (main_sdram_bankmachine5_req_wdata_ready | main_sdram_bankmachine5_req_rdata_valid); +assign main_sdram_bankmachine5_req_lock = (main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine5_cmd_buffer_source_valid); +assign main_sdram_bankmachine5_row_hit = (main_sdram_bankmachine5_row == main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]); +assign main_sdram_bankmachine5_cmd_payload_ba = 3'd5; +always @(*) begin + main_sdram_bankmachine5_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine5_row_col_n_addr_sel) begin + main_sdram_bankmachine5_cmd_payload_a <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine5_cmd_payload_a <= ((main_sdram_bankmachine5_auto_precharge <<< 4'd10) | {main_sdram_bankmachine5_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign main_sdram_bankmachine5_twtpcon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_cmd_payload_is_write); +assign main_sdram_bankmachine5_trccon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); +assign main_sdram_bankmachine5_trascon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); +always @(*) begin + main_sdram_bankmachine5_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine5_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine5_auto_precharge <= (main_sdram_bankmachine5_row_close == 1'd0); + end + end +end +assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din = {main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_first = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_last = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re = main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; +always @(*) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine5_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine5_cmd_buffer_lookahead_produce; + end +end +assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable | main_sdram_bankmachine5_cmd_buffer_lookahead_replace)); +assign main_sdram_bankmachine5_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re); +assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine5_cmd_buffer_lookahead_consume; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout = main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 4'd8); +assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 1'd0); +assign main_sdram_bankmachine5_cmd_buffer_sink_ready = ((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready); +always @(*) begin + builder_bankmachine5_next_state <= 3'd0; + main_sdram_bankmachine5_row_open <= 1'd0; + main_sdram_bankmachine5_row_close <= 1'd0; + main_sdram_bankmachine5_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine5_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine5_cmd_payload_we <= 1'd0; + main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine5_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine5_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine5_req_wdata_ready <= 1'd0; + main_sdram_bankmachine5_req_rdata_valid <= 1'd0; + main_sdram_bankmachine5_refresh_gnt <= 1'd0; + main_sdram_bankmachine5_cmd_valid <= 1'd0; + builder_bankmachine5_next_state <= builder_bankmachine5_state; + case (builder_bankmachine5_state) + 1'd1: begin + if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin + main_sdram_bankmachine5_cmd_valid <= 1'd1; + if (main_sdram_bankmachine5_cmd_ready) begin + builder_bankmachine5_next_state <= 3'd5; + end + main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine5_cmd_payload_we <= 1'd1; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine5_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin + builder_bankmachine5_next_state <= 3'd5; + end + main_sdram_bankmachine5_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine5_trccon_ready) begin + main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine5_row_open <= 1'd1; + main_sdram_bankmachine5_cmd_valid <= 1'd1; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine5_cmd_ready) begin + builder_bankmachine5_next_state <= 3'd6; + end + main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine5_twtpcon_ready) begin + main_sdram_bankmachine5_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine5_row_close <= 1'd1; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine5_refresh_req)) begin + builder_bankmachine5_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine5_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine5_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine5_refresh_req) begin + builder_bankmachine5_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine5_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine5_row_opened) begin + if (main_sdram_bankmachine5_row_hit) begin + main_sdram_bankmachine5_cmd_valid <= 1'd1; + if (main_sdram_bankmachine5_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine5_req_wdata_ready <= main_sdram_bankmachine5_cmd_ready; + main_sdram_bankmachine5_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine5_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine5_req_rdata_valid <= main_sdram_bankmachine5_cmd_ready; + main_sdram_bankmachine5_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine5_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine5_cmd_ready & main_sdram_bankmachine5_auto_precharge)) begin + builder_bankmachine5_next_state <= 2'd2; + end + end else begin + builder_bankmachine5_next_state <= 1'd1; + end + end else begin + builder_bankmachine5_next_state <= 2'd3; + end + end + end + end + endcase +end +assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine6_req_valid; +assign main_sdram_bankmachine6_req_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine6_req_we; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine6_req_addr; +assign main_sdram_bankmachine6_cmd_buffer_sink_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine6_cmd_buffer_sink_ready; +assign main_sdram_bankmachine6_cmd_buffer_sink_first = main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; +assign main_sdram_bankmachine6_cmd_buffer_sink_last = main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; +assign main_sdram_bankmachine6_cmd_buffer_sink_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; +assign main_sdram_bankmachine6_cmd_buffer_sink_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; +assign main_sdram_bankmachine6_cmd_buffer_source_ready = (main_sdram_bankmachine6_req_wdata_ready | main_sdram_bankmachine6_req_rdata_valid); +assign main_sdram_bankmachine6_req_lock = (main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine6_cmd_buffer_source_valid); +assign main_sdram_bankmachine6_row_hit = (main_sdram_bankmachine6_row == main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]); +assign main_sdram_bankmachine6_cmd_payload_ba = 3'd6; +always @(*) begin + main_sdram_bankmachine6_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine6_row_col_n_addr_sel) begin + main_sdram_bankmachine6_cmd_payload_a <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine6_cmd_payload_a <= ((main_sdram_bankmachine6_auto_precharge <<< 4'd10) | {main_sdram_bankmachine6_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign main_sdram_bankmachine6_twtpcon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_cmd_payload_is_write); +assign main_sdram_bankmachine6_trccon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); +assign main_sdram_bankmachine6_trascon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); +always @(*) begin + main_sdram_bankmachine6_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine6_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine6_auto_precharge <= (main_sdram_bankmachine6_row_close == 1'd0); + end + end +end +assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din = {main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_first = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_last = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re = main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; +always @(*) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine6_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine6_cmd_buffer_lookahead_produce; + end +end +assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable | main_sdram_bankmachine6_cmd_buffer_lookahead_replace)); +assign main_sdram_bankmachine6_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re); +assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine6_cmd_buffer_lookahead_consume; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout = main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 4'd8); +assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 1'd0); +assign main_sdram_bankmachine6_cmd_buffer_sink_ready = ((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready); +always @(*) begin + main_sdram_bankmachine6_row_open <= 1'd0; + main_sdram_bankmachine6_row_close <= 1'd0; + main_sdram_bankmachine6_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine6_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine6_cmd_payload_we <= 1'd0; + main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine6_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine6_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine6_req_wdata_ready <= 1'd0; + main_sdram_bankmachine6_req_rdata_valid <= 1'd0; + main_sdram_bankmachine6_refresh_gnt <= 1'd0; + main_sdram_bankmachine6_cmd_valid <= 1'd0; + builder_bankmachine6_next_state <= 3'd0; + builder_bankmachine6_next_state <= builder_bankmachine6_state; + case (builder_bankmachine6_state) + 1'd1: begin + if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin + main_sdram_bankmachine6_cmd_valid <= 1'd1; + if (main_sdram_bankmachine6_cmd_ready) begin + builder_bankmachine6_next_state <= 3'd5; + end + main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine6_cmd_payload_we <= 1'd1; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine6_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin + builder_bankmachine6_next_state <= 3'd5; + end + main_sdram_bankmachine6_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine6_trccon_ready) begin + main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine6_row_open <= 1'd1; + main_sdram_bankmachine6_cmd_valid <= 1'd1; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine6_cmd_ready) begin + builder_bankmachine6_next_state <= 3'd6; + end + main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine6_twtpcon_ready) begin + main_sdram_bankmachine6_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine6_row_close <= 1'd1; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine6_refresh_req)) begin + builder_bankmachine6_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine6_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine6_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine6_refresh_req) begin + builder_bankmachine6_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine6_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine6_row_opened) begin + if (main_sdram_bankmachine6_row_hit) begin + main_sdram_bankmachine6_cmd_valid <= 1'd1; + if (main_sdram_bankmachine6_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine6_req_wdata_ready <= main_sdram_bankmachine6_cmd_ready; + main_sdram_bankmachine6_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine6_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine6_req_rdata_valid <= main_sdram_bankmachine6_cmd_ready; + main_sdram_bankmachine6_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine6_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine6_cmd_ready & main_sdram_bankmachine6_auto_precharge)) begin + builder_bankmachine6_next_state <= 2'd2; + end + end else begin + builder_bankmachine6_next_state <= 1'd1; + end + end else begin + builder_bankmachine6_next_state <= 2'd3; + end + end + end + end + endcase +end +assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine7_req_valid; +assign main_sdram_bankmachine7_req_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine7_req_we; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine7_req_addr; +assign main_sdram_bankmachine7_cmd_buffer_sink_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine7_cmd_buffer_sink_ready; +assign main_sdram_bankmachine7_cmd_buffer_sink_first = main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; +assign main_sdram_bankmachine7_cmd_buffer_sink_last = main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; +assign main_sdram_bankmachine7_cmd_buffer_sink_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; +assign main_sdram_bankmachine7_cmd_buffer_sink_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; +assign main_sdram_bankmachine7_cmd_buffer_source_ready = (main_sdram_bankmachine7_req_wdata_ready | main_sdram_bankmachine7_req_rdata_valid); +assign main_sdram_bankmachine7_req_lock = (main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine7_cmd_buffer_source_valid); +assign main_sdram_bankmachine7_row_hit = (main_sdram_bankmachine7_row == main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]); +assign main_sdram_bankmachine7_cmd_payload_ba = 3'd7; +always @(*) begin + main_sdram_bankmachine7_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine7_row_col_n_addr_sel) begin + main_sdram_bankmachine7_cmd_payload_a <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine7_cmd_payload_a <= ((main_sdram_bankmachine7_auto_precharge <<< 4'd10) | {main_sdram_bankmachine7_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign main_sdram_bankmachine7_twtpcon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_cmd_payload_is_write); +assign main_sdram_bankmachine7_trccon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); +assign main_sdram_bankmachine7_trascon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); +always @(*) begin + main_sdram_bankmachine7_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine7_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine7_auto_precharge <= (main_sdram_bankmachine7_row_close == 1'd0); + end + end +end +assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din = {main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_first = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_last = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re = main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; +always @(*) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine7_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine7_cmd_buffer_lookahead_produce; + end +end +assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable | main_sdram_bankmachine7_cmd_buffer_lookahead_replace)); +assign main_sdram_bankmachine7_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re); +assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine7_cmd_buffer_lookahead_consume; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout = main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 4'd8); +assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 1'd0); +assign main_sdram_bankmachine7_cmd_buffer_sink_ready = ((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready); +always @(*) begin + main_sdram_bankmachine7_row_open <= 1'd0; + main_sdram_bankmachine7_row_close <= 1'd0; + main_sdram_bankmachine7_refresh_gnt <= 1'd0; + main_sdram_bankmachine7_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine7_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine7_cmd_payload_we <= 1'd0; + main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine7_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine7_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine7_req_wdata_ready <= 1'd0; + main_sdram_bankmachine7_req_rdata_valid <= 1'd0; + builder_bankmachine7_next_state <= 3'd0; + main_sdram_bankmachine7_cmd_valid <= 1'd0; + builder_bankmachine7_next_state <= builder_bankmachine7_state; + case (builder_bankmachine7_state) + 1'd1: begin + if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin + main_sdram_bankmachine7_cmd_valid <= 1'd1; + if (main_sdram_bankmachine7_cmd_ready) begin + builder_bankmachine7_next_state <= 3'd5; + end + main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine7_cmd_payload_we <= 1'd1; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine7_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin + builder_bankmachine7_next_state <= 3'd5; + end + main_sdram_bankmachine7_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine7_trccon_ready) begin + main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine7_row_open <= 1'd1; + main_sdram_bankmachine7_cmd_valid <= 1'd1; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine7_cmd_ready) begin + builder_bankmachine7_next_state <= 3'd6; + end + main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine7_twtpcon_ready) begin + main_sdram_bankmachine7_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine7_row_close <= 1'd1; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine7_refresh_req)) begin + builder_bankmachine7_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine7_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine7_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine7_refresh_req) begin + builder_bankmachine7_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine7_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine7_row_opened) begin + if (main_sdram_bankmachine7_row_hit) begin + main_sdram_bankmachine7_cmd_valid <= 1'd1; + if (main_sdram_bankmachine7_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine7_req_wdata_ready <= main_sdram_bankmachine7_cmd_ready; + main_sdram_bankmachine7_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine7_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine7_req_rdata_valid <= main_sdram_bankmachine7_cmd_ready; + main_sdram_bankmachine7_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine7_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine7_cmd_ready & main_sdram_bankmachine7_auto_precharge)) begin + builder_bankmachine7_next_state <= 2'd2; + end + end else begin + builder_bankmachine7_next_state <= 1'd1; + end + end else begin + builder_bankmachine7_next_state <= 2'd3; + end + end + end + end + endcase +end +assign main_sdram_trrdcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); +assign main_sdram_tfawcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); +assign main_sdram_ras_allowed = (main_sdram_trrdcon_ready & main_sdram_tfawcon_ready); +assign main_sdram_tccdcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_cmd_payload_is_write | main_sdram_choose_req_cmd_payload_is_read)); +assign main_sdram_cas_allowed = main_sdram_tccdcon_ready; +assign main_sdram_twtrcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); +assign main_sdram_read_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_read) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_read)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_read)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_read)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_read)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_read)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_read)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_read)); +assign main_sdram_write_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_write) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_write)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_write)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_write)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_write)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_write)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_write)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_write)); +assign main_sdram_max_time0 = (main_sdram_time0 == 1'd0); +assign main_sdram_max_time1 = (main_sdram_time1 == 1'd0); +assign main_sdram_bankmachine0_refresh_req = main_sdram_cmd_valid; +assign main_sdram_bankmachine1_refresh_req = main_sdram_cmd_valid; +assign main_sdram_bankmachine2_refresh_req = main_sdram_cmd_valid; +assign main_sdram_bankmachine3_refresh_req = main_sdram_cmd_valid; +assign main_sdram_bankmachine4_refresh_req = main_sdram_cmd_valid; +assign main_sdram_bankmachine5_refresh_req = main_sdram_cmd_valid; +assign main_sdram_bankmachine6_refresh_req = main_sdram_cmd_valid; +assign main_sdram_bankmachine7_refresh_req = main_sdram_cmd_valid; +assign main_sdram_go_to_refresh = (((((((main_sdram_bankmachine0_refresh_gnt & main_sdram_bankmachine1_refresh_gnt) & main_sdram_bankmachine2_refresh_gnt) & main_sdram_bankmachine3_refresh_gnt) & main_sdram_bankmachine4_refresh_gnt) & main_sdram_bankmachine5_refresh_gnt) & main_sdram_bankmachine6_refresh_gnt) & main_sdram_bankmachine7_refresh_gnt); +assign main_sdram_interface_rdata = {main_sdram_dfi_p3_rddata, main_sdram_dfi_p2_rddata, main_sdram_dfi_p1_rddata, main_sdram_dfi_p0_rddata}; +assign {main_sdram_dfi_p3_wrdata, main_sdram_dfi_p2_wrdata, main_sdram_dfi_p1_wrdata, main_sdram_dfi_p0_wrdata} = main_sdram_interface_wdata; +assign {main_sdram_dfi_p3_wrdata_mask, main_sdram_dfi_p2_wrdata_mask, main_sdram_dfi_p1_wrdata_mask, main_sdram_dfi_p0_wrdata_mask} = (~main_sdram_interface_wdata_we); +always @(*) begin + main_sdram_choose_cmd_valids <= 8'd0; + main_sdram_choose_cmd_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); +end +assign main_sdram_choose_cmd_request = main_sdram_choose_cmd_valids; +assign main_sdram_choose_cmd_cmd_valid = builder_rhs_array_muxed0; +assign main_sdram_choose_cmd_cmd_payload_a = builder_rhs_array_muxed1; +assign main_sdram_choose_cmd_cmd_payload_ba = builder_rhs_array_muxed2; +assign main_sdram_choose_cmd_cmd_payload_is_read = builder_rhs_array_muxed3; +assign main_sdram_choose_cmd_cmd_payload_is_write = builder_rhs_array_muxed4; +assign main_sdram_choose_cmd_cmd_payload_is_cmd = builder_rhs_array_muxed5; +always @(*) begin + main_sdram_choose_cmd_cmd_payload_cas <= 1'd0; + if (main_sdram_choose_cmd_cmd_valid) begin + main_sdram_choose_cmd_cmd_payload_cas <= builder_t_array_muxed0; + end +end +always @(*) begin + main_sdram_choose_cmd_cmd_payload_ras <= 1'd0; + if (main_sdram_choose_cmd_cmd_valid) begin + main_sdram_choose_cmd_cmd_payload_ras <= builder_t_array_muxed1; + end +end +always @(*) begin + main_sdram_choose_cmd_cmd_payload_we <= 1'd0; + if (main_sdram_choose_cmd_cmd_valid) begin + main_sdram_choose_cmd_cmd_payload_we <= builder_t_array_muxed2; + end +end +assign main_sdram_choose_cmd_ce = (main_sdram_choose_cmd_cmd_ready | (~main_sdram_choose_cmd_cmd_valid)); +always @(*) begin + main_sdram_choose_req_valids <= 8'd0; + main_sdram_choose_req_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); +end +assign main_sdram_choose_req_request = main_sdram_choose_req_valids; +assign main_sdram_choose_req_cmd_valid = builder_rhs_array_muxed6; +assign main_sdram_choose_req_cmd_payload_a = builder_rhs_array_muxed7; +assign main_sdram_choose_req_cmd_payload_ba = builder_rhs_array_muxed8; +assign main_sdram_choose_req_cmd_payload_is_read = builder_rhs_array_muxed9; +assign main_sdram_choose_req_cmd_payload_is_write = builder_rhs_array_muxed10; +assign main_sdram_choose_req_cmd_payload_is_cmd = builder_rhs_array_muxed11; +always @(*) begin + main_sdram_choose_req_cmd_payload_cas <= 1'd0; + if (main_sdram_choose_req_cmd_valid) begin + main_sdram_choose_req_cmd_payload_cas <= builder_t_array_muxed3; + end +end +always @(*) begin + main_sdram_choose_req_cmd_payload_ras <= 1'd0; + if (main_sdram_choose_req_cmd_valid) begin + main_sdram_choose_req_cmd_payload_ras <= builder_t_array_muxed4; + end +end +always @(*) begin + main_sdram_choose_req_cmd_payload_we <= 1'd0; + if (main_sdram_choose_req_cmd_valid) begin + main_sdram_choose_req_cmd_payload_we <= builder_t_array_muxed5; + end +end +always @(*) begin + main_sdram_bankmachine0_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd0))) begin + main_sdram_bankmachine0_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd0))) begin + main_sdram_bankmachine0_cmd_ready <= 1'd1; + end +end +always @(*) begin + main_sdram_bankmachine1_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd1))) begin + main_sdram_bankmachine1_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd1))) begin + main_sdram_bankmachine1_cmd_ready <= 1'd1; + end +end +always @(*) begin + main_sdram_bankmachine2_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd2))) begin + main_sdram_bankmachine2_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd2))) begin + main_sdram_bankmachine2_cmd_ready <= 1'd1; + end +end +always @(*) begin + main_sdram_bankmachine3_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd3))) begin + main_sdram_bankmachine3_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd3))) begin + main_sdram_bankmachine3_cmd_ready <= 1'd1; + end +end +always @(*) begin + main_sdram_bankmachine4_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd4))) begin + main_sdram_bankmachine4_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd4))) begin + main_sdram_bankmachine4_cmd_ready <= 1'd1; + end +end +always @(*) begin + main_sdram_bankmachine5_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd5))) begin + main_sdram_bankmachine5_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd5))) begin + main_sdram_bankmachine5_cmd_ready <= 1'd1; + end +end +always @(*) begin + main_sdram_bankmachine6_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd6))) begin + main_sdram_bankmachine6_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd6))) begin + main_sdram_bankmachine6_cmd_ready <= 1'd1; + end +end +always @(*) begin + main_sdram_bankmachine7_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd7))) begin + main_sdram_bankmachine7_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd7))) begin + main_sdram_bankmachine7_cmd_ready <= 1'd1; + end +end +assign main_sdram_choose_req_ce = (main_sdram_choose_req_cmd_ready | (~main_sdram_choose_req_cmd_valid)); +assign main_sdram_dfi_p0_reset_n = 1'd1; +assign main_sdram_dfi_p0_cke = {1{main_sdram_steerer0}}; +assign main_sdram_dfi_p0_odt = {1{main_sdram_steerer1}}; +assign main_sdram_dfi_p1_reset_n = 1'd1; +assign main_sdram_dfi_p1_cke = {1{main_sdram_steerer2}}; +assign main_sdram_dfi_p1_odt = {1{main_sdram_steerer3}}; +assign main_sdram_dfi_p2_reset_n = 1'd1; +assign main_sdram_dfi_p2_cke = {1{main_sdram_steerer4}}; +assign main_sdram_dfi_p2_odt = {1{main_sdram_steerer5}}; +assign main_sdram_dfi_p3_reset_n = 1'd1; +assign main_sdram_dfi_p3_cke = {1{main_sdram_steerer6}}; +assign main_sdram_dfi_p3_odt = {1{main_sdram_steerer7}}; +assign main_sdram_tfawcon_count = (((main_sdram_tfawcon_window[0] + main_sdram_tfawcon_window[1]) + main_sdram_tfawcon_window[2]) + main_sdram_tfawcon_window[3]); +always @(*) begin + main_sdram_choose_req_cmd_ready <= 1'd0; + main_sdram_steerer_sel0 <= 2'd0; + main_sdram_steerer_sel1 <= 2'd0; + main_sdram_steerer_sel2 <= 2'd0; + main_sdram_choose_cmd_want_activates <= 1'd0; + main_sdram_en0 <= 1'd0; + main_sdram_steerer_sel3 <= 2'd0; + builder_multiplexer_next_state <= 4'd0; + main_sdram_choose_cmd_cmd_ready <= 1'd0; + main_sdram_choose_req_want_reads <= 1'd0; + main_sdram_cmd_ready <= 1'd0; + main_sdram_choose_req_want_writes <= 1'd0; + main_sdram_en1 <= 1'd0; + builder_multiplexer_next_state <= builder_multiplexer_state; + case (builder_multiplexer_state) + 1'd1: begin + main_sdram_en1 <= 1'd1; + main_sdram_choose_req_want_writes <= 1'd1; + if (1'd0) begin + main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); + end else begin + main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; + main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); + main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; + end + main_sdram_steerer_sel0 <= 1'd0; + main_sdram_steerer_sel1 <= 1'd0; + main_sdram_steerer_sel2 <= 1'd1; + main_sdram_steerer_sel3 <= 2'd2; + if (main_sdram_read_available) begin + if (((~main_sdram_write_available) | main_sdram_max_time1)) begin + builder_multiplexer_next_state <= 2'd3; + end + end + if (main_sdram_go_to_refresh) begin + builder_multiplexer_next_state <= 2'd2; + end + end + 2'd2: begin + main_sdram_steerer_sel0 <= 2'd3; + main_sdram_cmd_ready <= 1'd1; + if (main_sdram_cmd_last) begin + builder_multiplexer_next_state <= 1'd0; + end + end + 2'd3: begin + if (main_sdram_twtrcon_ready) begin + builder_multiplexer_next_state <= 1'd0; + end + end + 3'd4: begin + builder_multiplexer_next_state <= 3'd5; + end + 3'd5: begin + builder_multiplexer_next_state <= 3'd6; + end + 3'd6: begin + builder_multiplexer_next_state <= 3'd7; + end + 3'd7: begin + builder_multiplexer_next_state <= 4'd8; + end + 4'd8: begin + builder_multiplexer_next_state <= 4'd9; + end + 4'd9: begin + builder_multiplexer_next_state <= 4'd10; + end + 4'd10: begin + builder_multiplexer_next_state <= 4'd11; + end + 4'd11: begin + builder_multiplexer_next_state <= 1'd1; + end + default: begin + main_sdram_en0 <= 1'd1; + main_sdram_choose_req_want_reads <= 1'd1; + if (1'd0) begin + main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); + end else begin + main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; + main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); + main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; + end + main_sdram_steerer_sel0 <= 1'd0; + main_sdram_steerer_sel1 <= 1'd1; + main_sdram_steerer_sel2 <= 2'd2; + main_sdram_steerer_sel3 <= 1'd0; + if (main_sdram_write_available) begin + if (((~main_sdram_read_available) | main_sdram_max_time0)) begin + builder_multiplexer_next_state <= 3'd4; + end + end + if (main_sdram_go_to_refresh) begin + builder_multiplexer_next_state <= 2'd2; + end + end + endcase +end +assign builder_roundrobin0_request = {(((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; +assign builder_roundrobin0_ce = ((~main_sdram_interface_bank0_valid) & (~main_sdram_interface_bank0_lock)); +assign main_sdram_interface_bank0_addr = builder_rhs_array_muxed12; +assign main_sdram_interface_bank0_we = builder_rhs_array_muxed13; +assign main_sdram_interface_bank0_valid = builder_rhs_array_muxed14; +assign builder_roundrobin1_request = {(((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; +assign builder_roundrobin1_ce = ((~main_sdram_interface_bank1_valid) & (~main_sdram_interface_bank1_lock)); +assign main_sdram_interface_bank1_addr = builder_rhs_array_muxed15; +assign main_sdram_interface_bank1_we = builder_rhs_array_muxed16; +assign main_sdram_interface_bank1_valid = builder_rhs_array_muxed17; +assign builder_roundrobin2_request = {(((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; +assign builder_roundrobin2_ce = ((~main_sdram_interface_bank2_valid) & (~main_sdram_interface_bank2_lock)); +assign main_sdram_interface_bank2_addr = builder_rhs_array_muxed18; +assign main_sdram_interface_bank2_we = builder_rhs_array_muxed19; +assign main_sdram_interface_bank2_valid = builder_rhs_array_muxed20; +assign builder_roundrobin3_request = {(((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; +assign builder_roundrobin3_ce = ((~main_sdram_interface_bank3_valid) & (~main_sdram_interface_bank3_lock)); +assign main_sdram_interface_bank3_addr = builder_rhs_array_muxed21; +assign main_sdram_interface_bank3_we = builder_rhs_array_muxed22; +assign main_sdram_interface_bank3_valid = builder_rhs_array_muxed23; +assign builder_roundrobin4_request = {(((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; +assign builder_roundrobin4_ce = ((~main_sdram_interface_bank4_valid) & (~main_sdram_interface_bank4_lock)); +assign main_sdram_interface_bank4_addr = builder_rhs_array_muxed24; +assign main_sdram_interface_bank4_we = builder_rhs_array_muxed25; +assign main_sdram_interface_bank4_valid = builder_rhs_array_muxed26; +assign builder_roundrobin5_request = {(((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; +assign builder_roundrobin5_ce = ((~main_sdram_interface_bank5_valid) & (~main_sdram_interface_bank5_lock)); +assign main_sdram_interface_bank5_addr = builder_rhs_array_muxed27; +assign main_sdram_interface_bank5_we = builder_rhs_array_muxed28; +assign main_sdram_interface_bank5_valid = builder_rhs_array_muxed29; +assign builder_roundrobin6_request = {(((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; +assign builder_roundrobin6_ce = ((~main_sdram_interface_bank6_valid) & (~main_sdram_interface_bank6_lock)); +assign main_sdram_interface_bank6_addr = builder_rhs_array_muxed30; +assign main_sdram_interface_bank6_we = builder_rhs_array_muxed31; +assign main_sdram_interface_bank6_valid = builder_rhs_array_muxed32; +assign builder_roundrobin7_request = {(((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid)}; +assign builder_roundrobin7_ce = ((~main_sdram_interface_bank7_valid) & (~main_sdram_interface_bank7_lock)); +assign main_sdram_interface_bank7_addr = builder_rhs_array_muxed33; +assign main_sdram_interface_bank7_we = builder_rhs_array_muxed34; +assign main_sdram_interface_bank7_valid = builder_rhs_array_muxed35; +assign main_port_cmd_ready = ((((((((1'd0 | (((builder_roundrobin0_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank0_ready)) | (((builder_roundrobin1_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank1_ready)) | (((builder_roundrobin2_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank2_ready)) | (((builder_roundrobin3_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank3_ready)) | (((builder_roundrobin4_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank4_ready)) | (((builder_roundrobin5_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank5_ready)) | (((builder_roundrobin6_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank6_ready)) | (((builder_roundrobin7_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0)))))) & main_sdram_interface_bank7_ready)); +assign main_port_wdata_ready = builder_new_master_wdata_ready2; +assign main_port_rdata_valid = builder_new_master_rdata_valid9; +always @(*) begin + main_sdram_interface_wdata <= 128'd0; + main_sdram_interface_wdata_we <= 16'd0; + case ({builder_new_master_wdata_ready2}) + 1'd1: begin + main_sdram_interface_wdata <= main_port_wdata_payload_data; + main_sdram_interface_wdata_we <= main_port_wdata_payload_we; + end + default: begin + main_sdram_interface_wdata <= 1'd0; + main_sdram_interface_wdata_we <= 1'd0; + end + endcase +end +assign main_port_rdata_payload_data = main_sdram_interface_rdata; +assign builder_roundrobin0_grant = 1'd0; +assign builder_roundrobin1_grant = 1'd0; +assign builder_roundrobin2_grant = 1'd0; +assign builder_roundrobin3_grant = 1'd0; +assign builder_roundrobin4_grant = 1'd0; +assign builder_roundrobin5_grant = 1'd0; +assign builder_roundrobin6_grant = 1'd0; +assign builder_roundrobin7_grant = 1'd0; +assign main_data_port_adr = main_interface0_wb_sdram_adr[10:2]; +always @(*) begin + main_data_port_we <= 16'd0; + main_data_port_dat_w <= 128'd0; + if (main_write_from_slave) begin + main_data_port_dat_w <= main_dat_r; + main_data_port_we <= {16{1'd1}}; + end else begin + main_data_port_dat_w <= {4{main_interface0_wb_sdram_dat_w}}; + if ((((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb) & main_interface0_wb_sdram_we) & main_interface0_wb_sdram_ack)) begin + main_data_port_we <= {({4{(main_interface0_wb_sdram_adr[1:0] == 1'd0)}} & main_interface0_wb_sdram_sel), ({4{(main_interface0_wb_sdram_adr[1:0] == 1'd1)}} & main_interface0_wb_sdram_sel), ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd2)}} & main_interface0_wb_sdram_sel), ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd3)}} & main_interface0_wb_sdram_sel)}; + end + end +end +assign main_dat_w = main_data_port_dat_r; +assign main_sel = 16'd65535; +always @(*) begin + main_interface0_wb_sdram_dat_r <= 32'd0; + case (main_adr_offset_r) + 1'd0: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[127:96]; + end + 1'd1: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[95:64]; + end + 2'd2: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[63:32]; + end + default: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[31:0]; + end + endcase +end +assign {main_tag_do_dirty, main_tag_do_tag} = main_tag_port_dat_r; +assign main_tag_port_dat_w = {main_tag_di_dirty, main_tag_di_tag}; +assign main_tag_port_adr = main_interface0_wb_sdram_adr[10:2]; +assign main_tag_di_tag = main_interface0_wb_sdram_adr[29:11]; +assign main_adr = {main_tag_do_tag, main_interface0_wb_sdram_adr[10:2]}; +always @(*) begin + main_tag_di_dirty <= 1'd0; + main_interface0_wb_sdram_ack <= 1'd0; + main_word_clr <= 1'd0; + main_word_inc <= 1'd0; + main_write_from_slave <= 1'd0; + main_cyc <= 1'd0; + main_stb <= 1'd0; + main_tag_port_we <= 1'd0; + main_we <= 1'd0; + builder_fullmemorywe_next_state <= 2'd0; + builder_fullmemorywe_next_state <= builder_fullmemorywe_state; + case (builder_fullmemorywe_state) + 1'd1: begin + main_word_clr <= 1'd1; + if ((main_tag_do_tag == main_interface0_wb_sdram_adr[29:11])) begin + main_interface0_wb_sdram_ack <= 1'd1; + if (main_interface0_wb_sdram_we) begin + main_tag_di_dirty <= 1'd1; + main_tag_port_we <= 1'd1; + end + builder_fullmemorywe_next_state <= 1'd0; + end else begin + if (main_tag_do_dirty) begin + builder_fullmemorywe_next_state <= 2'd2; + end else begin + main_tag_port_we <= 1'd1; + main_word_clr <= 1'd1; + builder_fullmemorywe_next_state <= 2'd3; + end + end + end + 2'd2: begin + main_stb <= 1'd1; + main_cyc <= 1'd1; + main_we <= 1'd1; + if (main_ack) begin + main_word_inc <= 1'd1; + if (1'd1) begin + main_tag_port_we <= 1'd1; + main_word_clr <= 1'd1; + builder_fullmemorywe_next_state <= 2'd3; + end + end + end + 2'd3: begin + main_stb <= 1'd1; + main_cyc <= 1'd1; + main_we <= 1'd0; + if (main_ack) begin + main_write_from_slave <= 1'd1; + main_word_inc <= 1'd1; + if (1'd1) begin + builder_fullmemorywe_next_state <= 1'd1; + end else begin + builder_fullmemorywe_next_state <= 2'd3; + end + end + end + default: begin + if ((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb)) begin + builder_fullmemorywe_next_state <= 1'd1; + end + end + endcase +end +assign main_wdata_converter_sink_valid = ((main_cyc & main_stb) & main_we); +assign main_wdata_converter_sink_payload_data = main_dat_w; +assign main_wdata_converter_sink_payload_we = main_sel; +assign main_port_wdata_valid = main_wdata_converter_source_valid; +assign main_wdata_converter_source_ready = main_port_wdata_ready; +assign main_port_wdata_first = main_wdata_converter_source_first; +assign main_port_wdata_last = main_wdata_converter_source_last; +assign main_port_wdata_payload_data = main_wdata_converter_source_payload_data; +assign main_port_wdata_payload_we = main_wdata_converter_source_payload_we; +assign main_rdata_converter_sink_valid = main_port_rdata_valid; +assign main_port_rdata_ready = main_rdata_converter_sink_ready; +assign main_rdata_converter_sink_first = main_port_rdata_first; +assign main_rdata_converter_sink_last = main_port_rdata_last; +assign main_rdata_converter_sink_payload_data = main_port_rdata_payload_data; +assign main_rdata_converter_source_ready = 1'd1; +assign main_dat_r = main_rdata_converter_source_payload_data; +assign main_wdata_converter_converter_sink_valid = main_wdata_converter_sink_valid; +assign main_wdata_converter_converter_sink_first = main_wdata_converter_sink_first; +assign main_wdata_converter_converter_sink_last = main_wdata_converter_sink_last; +assign main_wdata_converter_sink_ready = main_wdata_converter_converter_sink_ready; +assign main_wdata_converter_converter_sink_payload_data = {main_wdata_converter_sink_payload_we, main_wdata_converter_sink_payload_data}; +assign main_wdata_converter_source_valid = main_wdata_converter_source_source_valid; +assign main_wdata_converter_source_first = main_wdata_converter_source_source_first; +assign main_wdata_converter_source_last = main_wdata_converter_source_source_last; +assign main_wdata_converter_source_source_ready = main_wdata_converter_source_ready; +assign {main_wdata_converter_source_payload_we, main_wdata_converter_source_payload_data} = main_wdata_converter_source_source_payload_data; +assign main_wdata_converter_source_source_valid = main_wdata_converter_converter_source_valid; +assign main_wdata_converter_converter_source_ready = main_wdata_converter_source_source_ready; +assign main_wdata_converter_source_source_first = main_wdata_converter_converter_source_first; +assign main_wdata_converter_source_source_last = main_wdata_converter_converter_source_last; +assign main_wdata_converter_source_source_payload_data = main_wdata_converter_converter_source_payload_data; +assign main_wdata_converter_converter_source_valid = main_wdata_converter_converter_sink_valid; +assign main_wdata_converter_converter_sink_ready = main_wdata_converter_converter_source_ready; +assign main_wdata_converter_converter_source_first = main_wdata_converter_converter_sink_first; +assign main_wdata_converter_converter_source_last = main_wdata_converter_converter_sink_last; +assign main_wdata_converter_converter_source_payload_data = main_wdata_converter_converter_sink_payload_data; +assign main_wdata_converter_converter_source_payload_valid_token_count = 1'd1; +assign main_rdata_converter_converter_sink_valid = main_rdata_converter_sink_valid; +assign main_rdata_converter_converter_sink_first = main_rdata_converter_sink_first; +assign main_rdata_converter_converter_sink_last = main_rdata_converter_sink_last; +assign main_rdata_converter_sink_ready = main_rdata_converter_converter_sink_ready; +assign main_rdata_converter_converter_sink_payload_data = {main_rdata_converter_sink_payload_data}; +assign main_rdata_converter_source_valid = main_rdata_converter_source_source_valid; +assign main_rdata_converter_source_first = main_rdata_converter_source_source_first; +assign main_rdata_converter_source_last = main_rdata_converter_source_source_last; +assign main_rdata_converter_source_source_ready = main_rdata_converter_source_ready; +assign {main_rdata_converter_source_payload_data} = main_rdata_converter_source_source_payload_data; +assign main_rdata_converter_source_source_valid = main_rdata_converter_converter_source_valid; +assign main_rdata_converter_converter_source_ready = main_rdata_converter_source_source_ready; +assign main_rdata_converter_source_source_first = main_rdata_converter_converter_source_first; +assign main_rdata_converter_source_source_last = main_rdata_converter_converter_source_last; +assign main_rdata_converter_source_source_payload_data = main_rdata_converter_converter_source_payload_data; +assign main_rdata_converter_converter_source_valid = main_rdata_converter_converter_sink_valid; +assign main_rdata_converter_converter_sink_ready = main_rdata_converter_converter_source_ready; +assign main_rdata_converter_converter_source_first = main_rdata_converter_converter_sink_first; +assign main_rdata_converter_converter_source_last = main_rdata_converter_converter_sink_last; +assign main_rdata_converter_converter_source_payload_data = main_rdata_converter_converter_sink_payload_data; +assign main_rdata_converter_converter_source_payload_valid_token_count = 1'd1; +always @(*) begin + builder_litedramwishbone2native_next_state <= 2'd0; + main_ack <= 1'd0; + main_port_cmd_payload_we <= 1'd0; + main_port_cmd_payload_addr <= 24'd0; + main_count_next_value <= 1'd0; + main_count_next_value_ce <= 1'd0; + main_port_cmd_valid <= 1'd0; + builder_litedramwishbone2native_next_state <= builder_litedramwishbone2native_state; + case (builder_litedramwishbone2native_state) + 1'd1: begin + if (main_wdata_converter_sink_ready) begin + main_ack <= 1'd1; + builder_litedramwishbone2native_next_state <= 1'd0; + end + end + 2'd2: begin + if (main_rdata_converter_source_valid) begin + main_ack <= 1'd1; + builder_litedramwishbone2native_next_state <= 1'd0; + end + end + default: begin + main_port_cmd_valid <= (main_cyc & main_stb); + main_port_cmd_payload_we <= main_we; + main_port_cmd_payload_addr <= (((main_adr * 1'd1) + main_count) - 1'd0); + if ((main_port_cmd_valid & main_port_cmd_ready)) begin + main_count_next_value <= (main_count + 1'd1); + main_count_next_value_ce <= 1'd1; + if ((main_count == 1'd0)) begin + main_count_next_value <= 1'd0; + main_count_next_value_ce <= 1'd1; + if (main_we) begin + builder_litedramwishbone2native_next_state <= 1'd1; + end else begin + builder_litedramwishbone2native_next_state <= 2'd2; + end + end + end + end + endcase +end +assign main_interface0_wb_sdram_adr = builder_rhs_array_muxed36; +assign main_interface0_wb_sdram_dat_w = builder_rhs_array_muxed37; +assign main_interface0_wb_sdram_sel = builder_rhs_array_muxed38; +assign main_interface0_wb_sdram_cyc = builder_rhs_array_muxed39; +assign main_interface0_wb_sdram_stb = builder_rhs_array_muxed40; +assign main_interface0_wb_sdram_we = builder_rhs_array_muxed41; +assign main_interface0_wb_sdram_cti = builder_rhs_array_muxed42; +assign main_interface0_wb_sdram_bte = builder_rhs_array_muxed43; +assign main_interface1_wb_sdram_dat_r = main_interface0_wb_sdram_dat_r; +assign main_interface1_wb_sdram_ack = (main_interface0_wb_sdram_ack & (builder_wb_sdram_con_grant == 1'd0)); +assign main_interface1_wb_sdram_err = (main_interface0_wb_sdram_err & (builder_wb_sdram_con_grant == 1'd0)); +assign builder_wb_sdram_con_request = {main_interface1_wb_sdram_cyc}; +assign builder_wb_sdram_con_grant = 1'd0; +assign builder_minsoc_shared_adr = builder_rhs_array_muxed44; +assign builder_minsoc_shared_dat_w = builder_rhs_array_muxed45; +assign builder_minsoc_shared_sel = builder_rhs_array_muxed46; +assign builder_minsoc_shared_cyc = builder_rhs_array_muxed47; +assign builder_minsoc_shared_stb = builder_rhs_array_muxed48; +assign builder_minsoc_shared_we = builder_rhs_array_muxed49; +assign builder_minsoc_shared_cti = builder_rhs_array_muxed50; +assign builder_minsoc_shared_bte = builder_rhs_array_muxed51; +assign main_minsoc_interface0_soc_bus_dat_r = builder_minsoc_shared_dat_r; +assign main_minsoc_interface1_soc_bus_dat_r = builder_minsoc_shared_dat_r; +assign main_minsoc_interface0_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd0)); +assign main_minsoc_interface1_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd1)); +assign main_minsoc_interface0_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd0)); +assign main_minsoc_interface1_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd1)); +assign builder_minsoc_request = {main_minsoc_interface1_soc_bus_cyc, main_minsoc_interface0_soc_bus_cyc}; +always @(*) begin + builder_minsoc_slave_sel <= 4'd0; + builder_minsoc_slave_sel[0] <= (builder_minsoc_shared_adr[28:13] == 1'd0); + builder_minsoc_slave_sel[1] <= (builder_minsoc_shared_adr[28:10] == 13'd4096); + builder_minsoc_slave_sel[2] <= (builder_minsoc_shared_adr[28:14] == 10'd512); + builder_minsoc_slave_sel[3] <= (builder_minsoc_shared_adr[28:26] == 3'd4); +end +assign main_minsoc_rom_bus_adr = builder_minsoc_shared_adr; +assign main_minsoc_rom_bus_dat_w = builder_minsoc_shared_dat_w; +assign main_minsoc_rom_bus_sel = builder_minsoc_shared_sel; +assign main_minsoc_rom_bus_stb = builder_minsoc_shared_stb; +assign main_minsoc_rom_bus_we = builder_minsoc_shared_we; +assign main_minsoc_rom_bus_cti = builder_minsoc_shared_cti; +assign main_minsoc_rom_bus_bte = builder_minsoc_shared_bte; +assign main_minsoc_sram_bus_adr = builder_minsoc_shared_adr; +assign main_minsoc_sram_bus_dat_w = builder_minsoc_shared_dat_w; +assign main_minsoc_sram_bus_sel = builder_minsoc_shared_sel; +assign main_minsoc_sram_bus_stb = builder_minsoc_shared_stb; +assign main_minsoc_sram_bus_we = builder_minsoc_shared_we; +assign main_minsoc_sram_bus_cti = builder_minsoc_shared_cti; +assign main_minsoc_sram_bus_bte = builder_minsoc_shared_bte; +assign main_minsoc_bus_wishbone_adr = builder_minsoc_shared_adr; +assign main_minsoc_bus_wishbone_dat_w = builder_minsoc_shared_dat_w; +assign main_minsoc_bus_wishbone_sel = builder_minsoc_shared_sel; +assign main_minsoc_bus_wishbone_stb = builder_minsoc_shared_stb; +assign main_minsoc_bus_wishbone_we = builder_minsoc_shared_we; +assign main_minsoc_bus_wishbone_cti = builder_minsoc_shared_cti; +assign main_minsoc_bus_wishbone_bte = builder_minsoc_shared_bte; +assign main_interface1_wb_sdram_adr = builder_minsoc_shared_adr; +assign main_interface1_wb_sdram_dat_w = builder_minsoc_shared_dat_w; +assign main_interface1_wb_sdram_sel = builder_minsoc_shared_sel; +assign main_interface1_wb_sdram_stb = builder_minsoc_shared_stb; +assign main_interface1_wb_sdram_we = builder_minsoc_shared_we; +assign main_interface1_wb_sdram_cti = builder_minsoc_shared_cti; +assign main_interface1_wb_sdram_bte = builder_minsoc_shared_bte; +assign main_minsoc_rom_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[0]); +assign main_minsoc_sram_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[1]); +assign main_minsoc_bus_wishbone_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[2]); +assign main_interface1_wb_sdram_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[3]); +assign builder_minsoc_shared_err = (((main_minsoc_rom_bus_err | main_minsoc_sram_bus_err) | main_minsoc_bus_wishbone_err) | main_interface1_wb_sdram_err); +assign builder_minsoc_wait = ((builder_minsoc_shared_stb & builder_minsoc_shared_cyc) & (~builder_minsoc_shared_ack)); +always @(*) begin + builder_minsoc_shared_ack <= 1'd0; + builder_minsoc_error <= 1'd0; + builder_minsoc_shared_dat_r <= 32'd0; + builder_minsoc_shared_ack <= (((main_minsoc_rom_bus_ack | main_minsoc_sram_bus_ack) | main_minsoc_bus_wishbone_ack) | main_interface1_wb_sdram_ack); + builder_minsoc_shared_dat_r <= (((({32{builder_minsoc_slave_sel_r[0]}} & main_minsoc_rom_bus_dat_r) | ({32{builder_minsoc_slave_sel_r[1]}} & main_minsoc_sram_bus_dat_r)) | ({32{builder_minsoc_slave_sel_r[2]}} & main_minsoc_bus_wishbone_dat_r)) | ({32{builder_minsoc_slave_sel_r[3]}} & main_interface1_wb_sdram_dat_r)); + if (builder_minsoc_done) begin + builder_minsoc_shared_dat_r <= 32'd4294967295; + builder_minsoc_shared_ack <= 1'd1; + builder_minsoc_error <= 1'd1; + end +end +assign builder_minsoc_done = (builder_minsoc_count == 1'd0); +assign builder_minsoc_csrbank0_sel = (builder_minsoc_interface0_bank_bus_adr[13:9] == 1'd0); +assign builder_minsoc_csrbank0_reset0_r = builder_minsoc_interface0_bank_bus_dat_w[0]; +assign builder_minsoc_csrbank0_reset0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); +assign builder_minsoc_csrbank0_reset0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); +assign builder_minsoc_csrbank0_scratch3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank0_scratch3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); +assign builder_minsoc_csrbank0_scratch3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); +assign builder_minsoc_csrbank0_scratch2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank0_scratch2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); +assign builder_minsoc_csrbank0_scratch2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); +assign builder_minsoc_csrbank0_scratch1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank0_scratch1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); +assign builder_minsoc_csrbank0_scratch1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); +assign builder_minsoc_csrbank0_scratch0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank0_scratch0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); +assign builder_minsoc_csrbank0_scratch0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); +assign builder_minsoc_csrbank0_bus_errors3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank0_bus_errors3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); +assign builder_minsoc_csrbank0_bus_errors3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); +assign builder_minsoc_csrbank0_bus_errors2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank0_bus_errors2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); +assign builder_minsoc_csrbank0_bus_errors2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); +assign builder_minsoc_csrbank0_bus_errors1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank0_bus_errors1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); +assign builder_minsoc_csrbank0_bus_errors1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); +assign builder_minsoc_csrbank0_bus_errors0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank0_bus_errors0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); +assign builder_minsoc_csrbank0_bus_errors0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); +assign builder_minsoc_csrbank0_reset0_w = main_minsoc_ctrl_reset_storage; +assign builder_minsoc_csrbank0_scratch3_w = main_minsoc_ctrl_scratch_storage[31:24]; +assign builder_minsoc_csrbank0_scratch2_w = main_minsoc_ctrl_scratch_storage[23:16]; +assign builder_minsoc_csrbank0_scratch1_w = main_minsoc_ctrl_scratch_storage[15:8]; +assign builder_minsoc_csrbank0_scratch0_w = main_minsoc_ctrl_scratch_storage[7:0]; +assign builder_minsoc_csrbank0_bus_errors3_w = main_minsoc_ctrl_bus_errors_status[31:24]; +assign builder_minsoc_csrbank0_bus_errors2_w = main_minsoc_ctrl_bus_errors_status[23:16]; +assign builder_minsoc_csrbank0_bus_errors1_w = main_minsoc_ctrl_bus_errors_status[15:8]; +assign builder_minsoc_csrbank0_bus_errors0_w = main_minsoc_ctrl_bus_errors_status[7:0]; +assign main_minsoc_ctrl_bus_errors_we = builder_minsoc_csrbank0_bus_errors0_we; +assign builder_minsoc_csrbank1_sel = (builder_minsoc_interface1_bank_bus_adr[13:9] == 3'd5); +assign builder_minsoc_csrbank1_half_sys8x_taps0_r = builder_minsoc_interface1_bank_bus_dat_w[4:0]; +assign builder_minsoc_csrbank1_half_sys8x_taps0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); +assign builder_minsoc_csrbank1_half_sys8x_taps0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); +assign main_a7ddrphy_cdly_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; +assign main_a7ddrphy_cdly_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); +assign main_a7ddrphy_cdly_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); +assign main_a7ddrphy_cdly_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; +assign main_a7ddrphy_cdly_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); +assign main_a7ddrphy_cdly_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); +assign builder_minsoc_csrbank1_dly_sel0_r = builder_minsoc_interface1_bank_bus_dat_w[1:0]; +assign builder_minsoc_csrbank1_dly_sel0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); +assign builder_minsoc_csrbank1_dly_sel0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); +assign main_a7ddrphy_rdly_dq_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; +assign main_a7ddrphy_rdly_dq_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); +assign main_a7ddrphy_rdly_dq_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); +assign main_a7ddrphy_rdly_dq_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; +assign main_a7ddrphy_rdly_dq_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); +assign main_a7ddrphy_rdly_dq_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); +assign main_a7ddrphy_rdly_dq_bitslip_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; +assign main_a7ddrphy_rdly_dq_bitslip_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); +assign main_a7ddrphy_rdly_dq_bitslip_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); +assign main_a7ddrphy_rdly_dq_bitslip_r = builder_minsoc_interface1_bank_bus_dat_w[0]; +assign main_a7ddrphy_rdly_dq_bitslip_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); +assign main_a7ddrphy_rdly_dq_bitslip_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); +assign builder_minsoc_csrbank1_half_sys8x_taps0_w = main_a7ddrphy_half_sys8x_taps_storage[4:0]; +assign builder_minsoc_csrbank1_dly_sel0_w = main_a7ddrphy_dly_sel_storage[1:0]; +assign builder_minsoc_csrbank2_sel = (builder_minsoc_interface2_bank_bus_adr[13:9] == 4'd8); +assign builder_minsoc_csrbank2_dfii_control0_r = builder_minsoc_interface2_bank_bus_dat_w[3:0]; +assign builder_minsoc_csrbank2_dfii_control0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); +assign builder_minsoc_csrbank2_dfii_control0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); +assign builder_minsoc_csrbank2_dfii_pi0_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; +assign builder_minsoc_csrbank2_dfii_pi0_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); +assign builder_minsoc_csrbank2_dfii_pi0_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); +assign main_sdram_phaseinjector0_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; +assign main_sdram_phaseinjector0_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); +assign main_sdram_phaseinjector0_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); +assign builder_minsoc_csrbank2_dfii_pi0_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; +assign builder_minsoc_csrbank2_dfii_pi0_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); +assign builder_minsoc_csrbank2_dfii_pi0_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); +assign builder_minsoc_csrbank2_dfii_pi0_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); +assign builder_minsoc_csrbank2_dfii_pi0_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); +assign builder_minsoc_csrbank2_dfii_pi0_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; +assign builder_minsoc_csrbank2_dfii_pi0_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); +assign builder_minsoc_csrbank2_dfii_pi0_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); +assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); +assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); +assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); +assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); +assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); +assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); +assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); +assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); +assign builder_minsoc_csrbank2_dfii_pi0_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); +assign builder_minsoc_csrbank2_dfii_pi0_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); +assign builder_minsoc_csrbank2_dfii_pi0_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); +assign builder_minsoc_csrbank2_dfii_pi0_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); +assign builder_minsoc_csrbank2_dfii_pi0_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); +assign builder_minsoc_csrbank2_dfii_pi0_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); +assign builder_minsoc_csrbank2_dfii_pi0_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); +assign builder_minsoc_csrbank2_dfii_pi0_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); +assign builder_minsoc_csrbank2_dfii_pi1_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; +assign builder_minsoc_csrbank2_dfii_pi1_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); +assign builder_minsoc_csrbank2_dfii_pi1_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); +assign main_sdram_phaseinjector1_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; +assign main_sdram_phaseinjector1_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); +assign main_sdram_phaseinjector1_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); +assign builder_minsoc_csrbank2_dfii_pi1_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; +assign builder_minsoc_csrbank2_dfii_pi1_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); +assign builder_minsoc_csrbank2_dfii_pi1_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); +assign builder_minsoc_csrbank2_dfii_pi1_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); +assign builder_minsoc_csrbank2_dfii_pi1_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); +assign builder_minsoc_csrbank2_dfii_pi1_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; +assign builder_minsoc_csrbank2_dfii_pi1_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); +assign builder_minsoc_csrbank2_dfii_pi1_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); +assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); +assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); +assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); +assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); +assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); +assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); +assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); +assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); +assign builder_minsoc_csrbank2_dfii_pi1_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); +assign builder_minsoc_csrbank2_dfii_pi1_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); +assign builder_minsoc_csrbank2_dfii_pi1_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); +assign builder_minsoc_csrbank2_dfii_pi1_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); +assign builder_minsoc_csrbank2_dfii_pi1_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); +assign builder_minsoc_csrbank2_dfii_pi1_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); +assign builder_minsoc_csrbank2_dfii_pi1_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); +assign builder_minsoc_csrbank2_dfii_pi1_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); +assign builder_minsoc_csrbank2_dfii_pi2_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; +assign builder_minsoc_csrbank2_dfii_pi2_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); +assign builder_minsoc_csrbank2_dfii_pi2_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); +assign main_sdram_phaseinjector2_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; +assign main_sdram_phaseinjector2_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); +assign main_sdram_phaseinjector2_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); +assign builder_minsoc_csrbank2_dfii_pi2_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; +assign builder_minsoc_csrbank2_dfii_pi2_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); +assign builder_minsoc_csrbank2_dfii_pi2_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); +assign builder_minsoc_csrbank2_dfii_pi2_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); +assign builder_minsoc_csrbank2_dfii_pi2_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); +assign builder_minsoc_csrbank2_dfii_pi2_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; +assign builder_minsoc_csrbank2_dfii_pi2_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); +assign builder_minsoc_csrbank2_dfii_pi2_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); +assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); +assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); +assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); +assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); +assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); +assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); +assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); +assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); +assign builder_minsoc_csrbank2_dfii_pi2_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); +assign builder_minsoc_csrbank2_dfii_pi2_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); +assign builder_minsoc_csrbank2_dfii_pi2_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); +assign builder_minsoc_csrbank2_dfii_pi2_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); +assign builder_minsoc_csrbank2_dfii_pi2_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); +assign builder_minsoc_csrbank2_dfii_pi2_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); +assign builder_minsoc_csrbank2_dfii_pi2_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); +assign builder_minsoc_csrbank2_dfii_pi2_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); +assign builder_minsoc_csrbank2_dfii_pi3_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; +assign builder_minsoc_csrbank2_dfii_pi3_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); +assign builder_minsoc_csrbank2_dfii_pi3_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); +assign main_sdram_phaseinjector3_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; +assign main_sdram_phaseinjector3_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); +assign main_sdram_phaseinjector3_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); +assign builder_minsoc_csrbank2_dfii_pi3_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; +assign builder_minsoc_csrbank2_dfii_pi3_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); +assign builder_minsoc_csrbank2_dfii_pi3_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); +assign builder_minsoc_csrbank2_dfii_pi3_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); +assign builder_minsoc_csrbank2_dfii_pi3_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); +assign builder_minsoc_csrbank2_dfii_pi3_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; +assign builder_minsoc_csrbank2_dfii_pi3_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); +assign builder_minsoc_csrbank2_dfii_pi3_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); +assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); +assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); +assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); +assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); +assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); +assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); +assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); +assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); +assign builder_minsoc_csrbank2_dfii_pi3_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); +assign builder_minsoc_csrbank2_dfii_pi3_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); +assign builder_minsoc_csrbank2_dfii_pi3_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); +assign builder_minsoc_csrbank2_dfii_pi3_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); +assign builder_minsoc_csrbank2_dfii_pi3_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); +assign builder_minsoc_csrbank2_dfii_pi3_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); +assign builder_minsoc_csrbank2_dfii_pi3_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); +assign builder_minsoc_csrbank2_dfii_pi3_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); +assign builder_minsoc_csrbank2_dfii_control0_w = main_sdram_storage[3:0]; +assign builder_minsoc_csrbank2_dfii_pi0_command0_w = main_sdram_phaseinjector0_command_storage[5:0]; +assign builder_minsoc_csrbank2_dfii_pi0_address1_w = main_sdram_phaseinjector0_address_storage[13:8]; +assign builder_minsoc_csrbank2_dfii_pi0_address0_w = main_sdram_phaseinjector0_address_storage[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_baddress0_w = main_sdram_phaseinjector0_baddress_storage[2:0]; +assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_w = main_sdram_phaseinjector0_wrdata_storage[31:24]; +assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_w = main_sdram_phaseinjector0_wrdata_storage[23:16]; +assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_w = main_sdram_phaseinjector0_wrdata_storage[15:8]; +assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_w = main_sdram_phaseinjector0_wrdata_storage[7:0]; +assign builder_minsoc_csrbank2_dfii_pi0_rddata3_w = main_sdram_phaseinjector0_status[31:24]; +assign builder_minsoc_csrbank2_dfii_pi0_rddata2_w = main_sdram_phaseinjector0_status[23:16]; +assign builder_minsoc_csrbank2_dfii_pi0_rddata1_w = main_sdram_phaseinjector0_status[15:8]; +assign builder_minsoc_csrbank2_dfii_pi0_rddata0_w = main_sdram_phaseinjector0_status[7:0]; +assign main_sdram_phaseinjector0_we = builder_minsoc_csrbank2_dfii_pi0_rddata0_we; +assign builder_minsoc_csrbank2_dfii_pi1_command0_w = main_sdram_phaseinjector1_command_storage[5:0]; +assign builder_minsoc_csrbank2_dfii_pi1_address1_w = main_sdram_phaseinjector1_address_storage[13:8]; +assign builder_minsoc_csrbank2_dfii_pi1_address0_w = main_sdram_phaseinjector1_address_storage[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_baddress0_w = main_sdram_phaseinjector1_baddress_storage[2:0]; +assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_w = main_sdram_phaseinjector1_wrdata_storage[31:24]; +assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_w = main_sdram_phaseinjector1_wrdata_storage[23:16]; +assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_w = main_sdram_phaseinjector1_wrdata_storage[15:8]; +assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_w = main_sdram_phaseinjector1_wrdata_storage[7:0]; +assign builder_minsoc_csrbank2_dfii_pi1_rddata3_w = main_sdram_phaseinjector1_status[31:24]; +assign builder_minsoc_csrbank2_dfii_pi1_rddata2_w = main_sdram_phaseinjector1_status[23:16]; +assign builder_minsoc_csrbank2_dfii_pi1_rddata1_w = main_sdram_phaseinjector1_status[15:8]; +assign builder_minsoc_csrbank2_dfii_pi1_rddata0_w = main_sdram_phaseinjector1_status[7:0]; +assign main_sdram_phaseinjector1_we = builder_minsoc_csrbank2_dfii_pi1_rddata0_we; +assign builder_minsoc_csrbank2_dfii_pi2_command0_w = main_sdram_phaseinjector2_command_storage[5:0]; +assign builder_minsoc_csrbank2_dfii_pi2_address1_w = main_sdram_phaseinjector2_address_storage[13:8]; +assign builder_minsoc_csrbank2_dfii_pi2_address0_w = main_sdram_phaseinjector2_address_storage[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_baddress0_w = main_sdram_phaseinjector2_baddress_storage[2:0]; +assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_w = main_sdram_phaseinjector2_wrdata_storage[31:24]; +assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_w = main_sdram_phaseinjector2_wrdata_storage[23:16]; +assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_w = main_sdram_phaseinjector2_wrdata_storage[15:8]; +assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_w = main_sdram_phaseinjector2_wrdata_storage[7:0]; +assign builder_minsoc_csrbank2_dfii_pi2_rddata3_w = main_sdram_phaseinjector2_status[31:24]; +assign builder_minsoc_csrbank2_dfii_pi2_rddata2_w = main_sdram_phaseinjector2_status[23:16]; +assign builder_minsoc_csrbank2_dfii_pi2_rddata1_w = main_sdram_phaseinjector2_status[15:8]; +assign builder_minsoc_csrbank2_dfii_pi2_rddata0_w = main_sdram_phaseinjector2_status[7:0]; +assign main_sdram_phaseinjector2_we = builder_minsoc_csrbank2_dfii_pi2_rddata0_we; +assign builder_minsoc_csrbank2_dfii_pi3_command0_w = main_sdram_phaseinjector3_command_storage[5:0]; +assign builder_minsoc_csrbank2_dfii_pi3_address1_w = main_sdram_phaseinjector3_address_storage[13:8]; +assign builder_minsoc_csrbank2_dfii_pi3_address0_w = main_sdram_phaseinjector3_address_storage[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_baddress0_w = main_sdram_phaseinjector3_baddress_storage[2:0]; +assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_w = main_sdram_phaseinjector3_wrdata_storage[31:24]; +assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_w = main_sdram_phaseinjector3_wrdata_storage[23:16]; +assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_w = main_sdram_phaseinjector3_wrdata_storage[15:8]; +assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_w = main_sdram_phaseinjector3_wrdata_storage[7:0]; +assign builder_minsoc_csrbank2_dfii_pi3_rddata3_w = main_sdram_phaseinjector3_status[31:24]; +assign builder_minsoc_csrbank2_dfii_pi3_rddata2_w = main_sdram_phaseinjector3_status[23:16]; +assign builder_minsoc_csrbank2_dfii_pi3_rddata1_w = main_sdram_phaseinjector3_status[15:8]; +assign builder_minsoc_csrbank2_dfii_pi3_rddata0_w = main_sdram_phaseinjector3_status[7:0]; +assign main_sdram_phaseinjector3_we = builder_minsoc_csrbank2_dfii_pi3_rddata0_we; +assign builder_minsoc_csrbank3_sel = (builder_minsoc_interface3_bank_bus_adr[13:9] == 3'd4); +assign builder_minsoc_csrbank3_load3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_load3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); +assign builder_minsoc_csrbank3_load3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); +assign builder_minsoc_csrbank3_load2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_load2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); +assign builder_minsoc_csrbank3_load2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); +assign builder_minsoc_csrbank3_load1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_load1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); +assign builder_minsoc_csrbank3_load1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); +assign builder_minsoc_csrbank3_load0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_load0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); +assign builder_minsoc_csrbank3_load0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); +assign builder_minsoc_csrbank3_reload3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_reload3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); +assign builder_minsoc_csrbank3_reload3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); +assign builder_minsoc_csrbank3_reload2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_reload2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); +assign builder_minsoc_csrbank3_reload2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); +assign builder_minsoc_csrbank3_reload1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_reload1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); +assign builder_minsoc_csrbank3_reload1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); +assign builder_minsoc_csrbank3_reload0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_reload0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); +assign builder_minsoc_csrbank3_reload0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); +assign builder_minsoc_csrbank3_en0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; +assign builder_minsoc_csrbank3_en0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); +assign builder_minsoc_csrbank3_en0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); +assign builder_minsoc_csrbank3_update_value0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; +assign builder_minsoc_csrbank3_update_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); +assign builder_minsoc_csrbank3_update_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); +assign builder_minsoc_csrbank3_value3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_value3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); +assign builder_minsoc_csrbank3_value3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); +assign builder_minsoc_csrbank3_value2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_value2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); +assign builder_minsoc_csrbank3_value2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); +assign builder_minsoc_csrbank3_value1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_value1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); +assign builder_minsoc_csrbank3_value1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); +assign builder_minsoc_csrbank3_value0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank3_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); +assign builder_minsoc_csrbank3_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); +assign main_minsoc_timer0_eventmanager_status_r = builder_minsoc_interface3_bank_bus_dat_w[0]; +assign main_minsoc_timer0_eventmanager_status_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); +assign main_minsoc_timer0_eventmanager_status_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); +assign main_minsoc_timer0_eventmanager_pending_r = builder_minsoc_interface3_bank_bus_dat_w[0]; +assign main_minsoc_timer0_eventmanager_pending_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); +assign main_minsoc_timer0_eventmanager_pending_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); +assign builder_minsoc_csrbank3_ev_enable0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; +assign builder_minsoc_csrbank3_ev_enable0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); +assign builder_minsoc_csrbank3_ev_enable0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); +assign builder_minsoc_csrbank3_load3_w = main_minsoc_timer0_load_storage[31:24]; +assign builder_minsoc_csrbank3_load2_w = main_minsoc_timer0_load_storage[23:16]; +assign builder_minsoc_csrbank3_load1_w = main_minsoc_timer0_load_storage[15:8]; +assign builder_minsoc_csrbank3_load0_w = main_minsoc_timer0_load_storage[7:0]; +assign builder_minsoc_csrbank3_reload3_w = main_minsoc_timer0_reload_storage[31:24]; +assign builder_minsoc_csrbank3_reload2_w = main_minsoc_timer0_reload_storage[23:16]; +assign builder_minsoc_csrbank3_reload1_w = main_minsoc_timer0_reload_storage[15:8]; +assign builder_minsoc_csrbank3_reload0_w = main_minsoc_timer0_reload_storage[7:0]; +assign builder_minsoc_csrbank3_en0_w = main_minsoc_timer0_en_storage; +assign builder_minsoc_csrbank3_update_value0_w = main_minsoc_timer0_update_value_storage; +assign builder_minsoc_csrbank3_value3_w = main_minsoc_timer0_value_status[31:24]; +assign builder_minsoc_csrbank3_value2_w = main_minsoc_timer0_value_status[23:16]; +assign builder_minsoc_csrbank3_value1_w = main_minsoc_timer0_value_status[15:8]; +assign builder_minsoc_csrbank3_value0_w = main_minsoc_timer0_value_status[7:0]; +assign main_minsoc_timer0_value_we = builder_minsoc_csrbank3_value0_we; +assign builder_minsoc_csrbank3_ev_enable0_w = main_minsoc_timer0_eventmanager_storage; +assign builder_minsoc_csrbank4_sel = (builder_minsoc_interface4_bank_bus_adr[13:9] == 2'd3); +assign main_minsoc_uart_rxtx_r = builder_minsoc_interface4_bank_bus_dat_w[7:0]; +assign main_minsoc_uart_rxtx_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); +assign main_minsoc_uart_rxtx_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); +assign builder_minsoc_csrbank4_txfull_r = builder_minsoc_interface4_bank_bus_dat_w[0]; +assign builder_minsoc_csrbank4_txfull_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); +assign builder_minsoc_csrbank4_txfull_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); +assign builder_minsoc_csrbank4_rxempty_r = builder_minsoc_interface4_bank_bus_dat_w[0]; +assign builder_minsoc_csrbank4_rxempty_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); +assign builder_minsoc_csrbank4_rxempty_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); +assign main_minsoc_uart_eventmanager_status_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; +assign main_minsoc_uart_eventmanager_status_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); +assign main_minsoc_uart_eventmanager_status_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); +assign main_minsoc_uart_eventmanager_pending_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; +assign main_minsoc_uart_eventmanager_pending_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); +assign main_minsoc_uart_eventmanager_pending_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); +assign builder_minsoc_csrbank4_ev_enable0_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; +assign builder_minsoc_csrbank4_ev_enable0_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); +assign builder_minsoc_csrbank4_ev_enable0_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); +assign builder_minsoc_csrbank4_txfull_w = main_minsoc_uart_txfull_status; +assign main_minsoc_uart_txfull_we = builder_minsoc_csrbank4_txfull_we; +assign builder_minsoc_csrbank4_rxempty_w = main_minsoc_uart_rxempty_status; +assign main_minsoc_uart_rxempty_we = builder_minsoc_csrbank4_rxempty_we; +assign builder_minsoc_csrbank4_ev_enable0_w = main_minsoc_uart_eventmanager_storage[1:0]; +assign builder_minsoc_csrbank5_sel = (builder_minsoc_interface5_bank_bus_adr[13:9] == 2'd2); +assign builder_minsoc_csrbank5_tuning_word3_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank5_tuning_word3_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); +assign builder_minsoc_csrbank5_tuning_word3_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); +assign builder_minsoc_csrbank5_tuning_word2_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank5_tuning_word2_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); +assign builder_minsoc_csrbank5_tuning_word2_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); +assign builder_minsoc_csrbank5_tuning_word1_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank5_tuning_word1_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); +assign builder_minsoc_csrbank5_tuning_word1_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); +assign builder_minsoc_csrbank5_tuning_word0_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; +assign builder_minsoc_csrbank5_tuning_word0_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); +assign builder_minsoc_csrbank5_tuning_word0_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); +assign builder_minsoc_csrbank5_tuning_word3_w = main_minsoc_storage[31:24]; +assign builder_minsoc_csrbank5_tuning_word2_w = main_minsoc_storage[23:16]; +assign builder_minsoc_csrbank5_tuning_word1_w = main_minsoc_storage[15:8]; +assign builder_minsoc_csrbank5_tuning_word0_w = main_minsoc_storage[7:0]; +assign builder_minsoc_adr = main_minsoc_interface_adr; +assign builder_minsoc_we = main_minsoc_interface_we; +assign builder_minsoc_dat_w = main_minsoc_interface_dat_w; +assign main_minsoc_interface_dat_r = builder_minsoc_dat_r; +assign builder_minsoc_interface0_bank_bus_adr = builder_minsoc_adr; +assign builder_minsoc_interface1_bank_bus_adr = builder_minsoc_adr; +assign builder_minsoc_interface2_bank_bus_adr = builder_minsoc_adr; +assign builder_minsoc_interface3_bank_bus_adr = builder_minsoc_adr; +assign builder_minsoc_interface4_bank_bus_adr = builder_minsoc_adr; +assign builder_minsoc_interface5_bank_bus_adr = builder_minsoc_adr; +assign builder_minsoc_interface0_bank_bus_we = builder_minsoc_we; +assign builder_minsoc_interface1_bank_bus_we = builder_minsoc_we; +assign builder_minsoc_interface2_bank_bus_we = builder_minsoc_we; +assign builder_minsoc_interface3_bank_bus_we = builder_minsoc_we; +assign builder_minsoc_interface4_bank_bus_we = builder_minsoc_we; +assign builder_minsoc_interface5_bank_bus_we = builder_minsoc_we; +assign builder_minsoc_interface0_bank_bus_dat_w = builder_minsoc_dat_w; +assign builder_minsoc_interface1_bank_bus_dat_w = builder_minsoc_dat_w; +assign builder_minsoc_interface2_bank_bus_dat_w = builder_minsoc_dat_w; +assign builder_minsoc_interface3_bank_bus_dat_w = builder_minsoc_dat_w; +assign builder_minsoc_interface4_bank_bus_dat_w = builder_minsoc_dat_w; +assign builder_minsoc_interface5_bank_bus_dat_w = builder_minsoc_dat_w; +assign builder_minsoc_dat_r = (((((builder_minsoc_interface0_bank_bus_dat_r | builder_minsoc_interface1_bank_bus_dat_r) | builder_minsoc_interface2_bank_bus_dat_r) | builder_minsoc_interface3_bank_bus_dat_r) | builder_minsoc_interface4_bank_bus_dat_r) | builder_minsoc_interface5_bank_bus_dat_r); +always @(*) begin + builder_rhs_array_muxed0 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[0]; + end + 1'd1: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[1]; + end + 2'd2: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[2]; + end + 2'd3: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[3]; + end + 3'd4: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[4]; + end + 3'd5: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[5]; + end + 3'd6: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[6]; + end + default: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[7]; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed1 <= 14'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_a; + end + 1'd1: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_a; + end + 2'd2: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_a; + end + 2'd3: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_a; + end + 3'd4: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_a; + end + 3'd5: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_a; + end + 3'd6: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_a; + end + default: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_a; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed2 <= 3'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_ba; + end + 1'd1: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_ba; + end + 2'd2: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_ba; + end + 2'd3: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_ba; + end + 3'd4: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_ba; + end + 3'd5: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_ba; + end + 3'd6: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_ba; + end + default: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_ba; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed3 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_is_read; + end + 1'd1: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_is_read; + end + 2'd2: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_is_read; + end + 2'd3: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_is_read; + end + 3'd4: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_is_read; + end + 3'd5: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_is_read; + end + 3'd6: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_is_read; + end + default: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_is_read; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed4 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_is_write; + end + 1'd1: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_is_write; + end + 2'd2: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_is_write; + end + 2'd3: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_is_write; + end + 3'd4: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_is_write; + end + 3'd5: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_is_write; + end + 3'd6: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_is_write; + end + default: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_is_write; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed5 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_is_cmd; + end + 1'd1: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_is_cmd; + end + 2'd2: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_is_cmd; + end + 2'd3: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_is_cmd; + end + 3'd4: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_is_cmd; + end + 3'd5: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_is_cmd; + end + 3'd6: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_is_cmd; + end + default: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_is_cmd; + end + endcase +end +always @(*) begin + builder_t_array_muxed0 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_t_array_muxed0 <= main_sdram_bankmachine0_cmd_payload_cas; + end + 1'd1: begin + builder_t_array_muxed0 <= main_sdram_bankmachine1_cmd_payload_cas; + end + 2'd2: begin + builder_t_array_muxed0 <= main_sdram_bankmachine2_cmd_payload_cas; + end + 2'd3: begin + builder_t_array_muxed0 <= main_sdram_bankmachine3_cmd_payload_cas; + end + 3'd4: begin + builder_t_array_muxed0 <= main_sdram_bankmachine4_cmd_payload_cas; + end + 3'd5: begin + builder_t_array_muxed0 <= main_sdram_bankmachine5_cmd_payload_cas; + end + 3'd6: begin + builder_t_array_muxed0 <= main_sdram_bankmachine6_cmd_payload_cas; + end + default: begin + builder_t_array_muxed0 <= main_sdram_bankmachine7_cmd_payload_cas; + end + endcase +end +always @(*) begin + builder_t_array_muxed1 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_t_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_ras; + end + 1'd1: begin + builder_t_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_ras; + end + 2'd2: begin + builder_t_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_ras; + end + 2'd3: begin + builder_t_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_ras; + end + 3'd4: begin + builder_t_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_ras; + end + 3'd5: begin + builder_t_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_ras; + end + 3'd6: begin + builder_t_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_ras; + end + default: begin + builder_t_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_ras; + end + endcase +end +always @(*) begin + builder_t_array_muxed2 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_t_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_we; + end + 1'd1: begin + builder_t_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_we; + end + 2'd2: begin + builder_t_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_we; + end + 2'd3: begin + builder_t_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_we; + end + 3'd4: begin + builder_t_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_we; + end + 3'd5: begin + builder_t_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_we; + end + 3'd6: begin + builder_t_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_we; + end + default: begin + builder_t_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed6 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[0]; + end + 1'd1: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[1]; + end + 2'd2: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[2]; + end + 2'd3: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[3]; + end + 3'd4: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[4]; + end + 3'd5: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[5]; + end + 3'd6: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[6]; + end + default: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[7]; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed7 <= 14'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine0_cmd_payload_a; + end + 1'd1: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine1_cmd_payload_a; + end + 2'd2: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine2_cmd_payload_a; + end + 2'd3: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine3_cmd_payload_a; + end + 3'd4: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine4_cmd_payload_a; + end + 3'd5: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine5_cmd_payload_a; + end + 3'd6: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine6_cmd_payload_a; + end + default: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine7_cmd_payload_a; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed8 <= 3'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine0_cmd_payload_ba; + end + 1'd1: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine1_cmd_payload_ba; + end + 2'd2: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine2_cmd_payload_ba; + end + 2'd3: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine3_cmd_payload_ba; + end + 3'd4: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine4_cmd_payload_ba; + end + 3'd5: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine5_cmd_payload_ba; + end + 3'd6: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine6_cmd_payload_ba; + end + default: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine7_cmd_payload_ba; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed9 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine0_cmd_payload_is_read; + end + 1'd1: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine1_cmd_payload_is_read; + end + 2'd2: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine2_cmd_payload_is_read; + end + 2'd3: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine3_cmd_payload_is_read; + end + 3'd4: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine4_cmd_payload_is_read; + end + 3'd5: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine5_cmd_payload_is_read; + end + 3'd6: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine6_cmd_payload_is_read; + end + default: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine7_cmd_payload_is_read; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed10 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine0_cmd_payload_is_write; + end + 1'd1: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine1_cmd_payload_is_write; + end + 2'd2: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine2_cmd_payload_is_write; + end + 2'd3: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine3_cmd_payload_is_write; + end + 3'd4: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine4_cmd_payload_is_write; + end + 3'd5: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine5_cmd_payload_is_write; + end + 3'd6: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine6_cmd_payload_is_write; + end + default: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine7_cmd_payload_is_write; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed11 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine0_cmd_payload_is_cmd; + end + 1'd1: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine1_cmd_payload_is_cmd; + end + 2'd2: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine2_cmd_payload_is_cmd; + end + 2'd3: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine3_cmd_payload_is_cmd; + end + 3'd4: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine4_cmd_payload_is_cmd; + end + 3'd5: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine5_cmd_payload_is_cmd; + end + 3'd6: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine6_cmd_payload_is_cmd; + end + default: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine7_cmd_payload_is_cmd; + end + endcase +end +always @(*) begin + builder_t_array_muxed3 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_t_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_cas; + end + 1'd1: begin + builder_t_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_cas; + end + 2'd2: begin + builder_t_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_cas; + end + 2'd3: begin + builder_t_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_cas; + end + 3'd4: begin + builder_t_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_cas; + end + 3'd5: begin + builder_t_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_cas; + end + 3'd6: begin + builder_t_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_cas; + end + default: begin + builder_t_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_cas; + end + endcase +end +always @(*) begin + builder_t_array_muxed4 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_t_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_ras; + end + 1'd1: begin + builder_t_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_ras; + end + 2'd2: begin + builder_t_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_ras; + end + 2'd3: begin + builder_t_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_ras; + end + 3'd4: begin + builder_t_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_ras; + end + 3'd5: begin + builder_t_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_ras; + end + 3'd6: begin + builder_t_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_ras; + end + default: begin + builder_t_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_ras; + end + endcase +end +always @(*) begin + builder_t_array_muxed5 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_t_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_we; + end + 1'd1: begin + builder_t_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_we; + end + 2'd2: begin + builder_t_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_we; + end + 2'd3: begin + builder_t_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_we; + end + 3'd4: begin + builder_t_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_we; + end + 3'd5: begin + builder_t_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_we; + end + 3'd6: begin + builder_t_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_we; + end + default: begin + builder_t_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed12 <= 21'd0; + case (builder_roundrobin0_grant) + default: begin + builder_rhs_array_muxed12 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed13 <= 1'd0; + case (builder_roundrobin0_grant) + default: begin + builder_rhs_array_muxed13 <= main_port_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed14 <= 1'd0; + case (builder_roundrobin0_grant) + default: begin + builder_rhs_array_muxed14 <= (((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase +end +always @(*) begin + builder_rhs_array_muxed15 <= 21'd0; + case (builder_roundrobin1_grant) + default: begin + builder_rhs_array_muxed15 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed16 <= 1'd0; + case (builder_roundrobin1_grant) + default: begin + builder_rhs_array_muxed16 <= main_port_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed17 <= 1'd0; + case (builder_roundrobin1_grant) + default: begin + builder_rhs_array_muxed17 <= (((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase +end +always @(*) begin + builder_rhs_array_muxed18 <= 21'd0; + case (builder_roundrobin2_grant) + default: begin + builder_rhs_array_muxed18 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed19 <= 1'd0; + case (builder_roundrobin2_grant) + default: begin + builder_rhs_array_muxed19 <= main_port_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed20 <= 1'd0; + case (builder_roundrobin2_grant) + default: begin + builder_rhs_array_muxed20 <= (((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase +end +always @(*) begin + builder_rhs_array_muxed21 <= 21'd0; + case (builder_roundrobin3_grant) + default: begin + builder_rhs_array_muxed21 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed22 <= 1'd0; + case (builder_roundrobin3_grant) + default: begin + builder_rhs_array_muxed22 <= main_port_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed23 <= 1'd0; + case (builder_roundrobin3_grant) + default: begin + builder_rhs_array_muxed23 <= (((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase +end +always @(*) begin + builder_rhs_array_muxed24 <= 21'd0; + case (builder_roundrobin4_grant) + default: begin + builder_rhs_array_muxed24 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed25 <= 1'd0; + case (builder_roundrobin4_grant) + default: begin + builder_rhs_array_muxed25 <= main_port_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed26 <= 1'd0; + case (builder_roundrobin4_grant) + default: begin + builder_rhs_array_muxed26 <= (((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase +end +always @(*) begin + builder_rhs_array_muxed27 <= 21'd0; + case (builder_roundrobin5_grant) + default: begin + builder_rhs_array_muxed27 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed28 <= 1'd0; + case (builder_roundrobin5_grant) + default: begin + builder_rhs_array_muxed28 <= main_port_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed29 <= 1'd0; + case (builder_roundrobin5_grant) + default: begin + builder_rhs_array_muxed29 <= (((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase +end +always @(*) begin + builder_rhs_array_muxed30 <= 21'd0; + case (builder_roundrobin6_grant) + default: begin + builder_rhs_array_muxed30 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed31 <= 1'd0; + case (builder_roundrobin6_grant) + default: begin + builder_rhs_array_muxed31 <= main_port_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed32 <= 1'd0; + case (builder_roundrobin6_grant) + default: begin + builder_rhs_array_muxed32 <= (((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase +end +always @(*) begin + builder_rhs_array_muxed33 <= 21'd0; + case (builder_roundrobin7_grant) + default: begin + builder_rhs_array_muxed33 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed34 <= 1'd0; + case (builder_roundrobin7_grant) + default: begin + builder_rhs_array_muxed34 <= main_port_cmd_payload_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed35 <= 1'd0; + case (builder_roundrobin7_grant) + default: begin + builder_rhs_array_muxed35 <= (((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase +end +always @(*) begin + builder_rhs_array_muxed36 <= 30'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed36 <= main_interface1_wb_sdram_adr; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed37 <= 32'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed37 <= main_interface1_wb_sdram_dat_w; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed38 <= 4'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed38 <= main_interface1_wb_sdram_sel; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed39 <= 1'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed39 <= main_interface1_wb_sdram_cyc; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed40 <= 1'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed40 <= main_interface1_wb_sdram_stb; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed41 <= 1'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed41 <= main_interface1_wb_sdram_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed42 <= 3'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed42 <= main_interface1_wb_sdram_cti; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed43 <= 2'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed43 <= main_interface1_wb_sdram_bte; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed44 <= 30'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed44 <= main_minsoc_interface0_soc_bus_adr; + end + default: begin + builder_rhs_array_muxed44 <= main_minsoc_interface1_soc_bus_adr; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed45 <= 32'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed45 <= main_minsoc_interface0_soc_bus_dat_w; + end + default: begin + builder_rhs_array_muxed45 <= main_minsoc_interface1_soc_bus_dat_w; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed46 <= 4'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed46 <= main_minsoc_interface0_soc_bus_sel; + end + default: begin + builder_rhs_array_muxed46 <= main_minsoc_interface1_soc_bus_sel; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed47 <= 1'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed47 <= main_minsoc_interface0_soc_bus_cyc; + end + default: begin + builder_rhs_array_muxed47 <= main_minsoc_interface1_soc_bus_cyc; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed48 <= 1'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed48 <= main_minsoc_interface0_soc_bus_stb; + end + default: begin + builder_rhs_array_muxed48 <= main_minsoc_interface1_soc_bus_stb; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed49 <= 1'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed49 <= main_minsoc_interface0_soc_bus_we; + end + default: begin + builder_rhs_array_muxed49 <= main_minsoc_interface1_soc_bus_we; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed50 <= 3'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed50 <= main_minsoc_interface0_soc_bus_cti; + end + default: begin + builder_rhs_array_muxed50 <= main_minsoc_interface1_soc_bus_cti; + end + endcase +end +always @(*) begin + builder_rhs_array_muxed51 <= 2'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed51 <= main_minsoc_interface0_soc_bus_bte; + end + default: begin + builder_rhs_array_muxed51 <= main_minsoc_interface1_soc_bus_bte; + end + endcase +end +always @(*) begin + builder_array_muxed0 <= 3'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed0 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed0 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed0 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed0 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase +end +always @(*) begin + builder_array_muxed1 <= 14'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed1 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed1 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed1 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed1 <= main_sdram_cmd_payload_a; + end + endcase +end +always @(*) begin + builder_array_muxed2 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed2 <= 1'd0; + end + 1'd1: begin + builder_array_muxed2 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed2 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed2 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase +end +always @(*) begin + builder_array_muxed3 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed3 <= 1'd0; + end + 1'd1: begin + builder_array_muxed3 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed3 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed3 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase +end +always @(*) begin + builder_array_muxed4 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed4 <= 1'd0; + end + 1'd1: begin + builder_array_muxed4 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed4 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed4 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase +end +always @(*) begin + builder_array_muxed5 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed5 <= 1'd0; + end + 1'd1: begin + builder_array_muxed5 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed5 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed5 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase +end +always @(*) begin + builder_array_muxed6 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed6 <= 1'd0; + end + 1'd1: begin + builder_array_muxed6 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed6 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed6 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase +end +always @(*) begin + builder_array_muxed7 <= 3'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed7 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed7 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed7 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed7 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase +end +always @(*) begin + builder_array_muxed8 <= 14'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed8 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed8 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed8 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed8 <= main_sdram_cmd_payload_a; + end + endcase +end +always @(*) begin + builder_array_muxed9 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed9 <= 1'd0; + end + 1'd1: begin + builder_array_muxed9 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed9 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed9 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase +end +always @(*) begin + builder_array_muxed10 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed10 <= 1'd0; + end + 1'd1: begin + builder_array_muxed10 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed10 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed10 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase +end +always @(*) begin + builder_array_muxed11 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed11 <= 1'd0; + end + 1'd1: begin + builder_array_muxed11 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed11 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed11 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase +end +always @(*) begin + builder_array_muxed12 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed12 <= 1'd0; + end + 1'd1: begin + builder_array_muxed12 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed12 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed12 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase +end +always @(*) begin + builder_array_muxed13 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed13 <= 1'd0; + end + 1'd1: begin + builder_array_muxed13 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed13 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed13 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase +end +always @(*) begin + builder_array_muxed14 <= 3'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed14 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed14 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed14 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed14 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase +end +always @(*) begin + builder_array_muxed15 <= 14'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed15 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed15 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed15 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed15 <= main_sdram_cmd_payload_a; + end + endcase +end +always @(*) begin + builder_array_muxed16 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed16 <= 1'd0; + end + 1'd1: begin + builder_array_muxed16 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed16 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed16 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase +end +always @(*) begin + builder_array_muxed17 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed17 <= 1'd0; + end + 1'd1: begin + builder_array_muxed17 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed17 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed17 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase +end +always @(*) begin + builder_array_muxed18 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed18 <= 1'd0; + end + 1'd1: begin + builder_array_muxed18 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed18 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed18 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase +end +always @(*) begin + builder_array_muxed19 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed19 <= 1'd0; + end + 1'd1: begin + builder_array_muxed19 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed19 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed19 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase +end +always @(*) begin + builder_array_muxed20 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed20 <= 1'd0; + end + 1'd1: begin + builder_array_muxed20 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed20 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed20 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase +end +always @(*) begin + builder_array_muxed21 <= 3'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed21 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed21 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed21 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed21 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase +end +always @(*) begin + builder_array_muxed22 <= 14'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed22 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed22 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed22 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed22 <= main_sdram_cmd_payload_a; + end + endcase +end +always @(*) begin + builder_array_muxed23 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed23 <= 1'd0; + end + 1'd1: begin + builder_array_muxed23 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed23 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed23 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase +end +always @(*) begin + builder_array_muxed24 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed24 <= 1'd0; + end + 1'd1: begin + builder_array_muxed24 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed24 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed24 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase +end +always @(*) begin + builder_array_muxed25 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed25 <= 1'd0; + end + 1'd1: begin + builder_array_muxed25 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed25 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed25 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase +end +always @(*) begin + builder_array_muxed26 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed26 <= 1'd0; + end + 1'd1: begin + builder_array_muxed26 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed26 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed26 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase +end +always @(*) begin + builder_array_muxed27 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed27 <= 1'd0; + end + 1'd1: begin + builder_array_muxed27 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed27 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed27 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase +end +assign main_minsoc_rx = builder_regs1; +assign builder_xilinxasyncresetsynchronizerimpl0 = ((~main_locked) | main_reset); +assign builder_xilinxasyncresetsynchronizerimpl1 = ((~main_locked) | main_reset); +assign builder_xilinxasyncresetsynchronizerimpl2 = ((~main_locked) | main_reset); +assign builder_xilinxasyncresetsynchronizerimpl3 = ((~main_locked) | main_reset); + +always @(posedge clk200_clk) begin + if ((main_reset_counter != 1'd0)) begin + main_reset_counter <= (main_reset_counter - 1'd1); + end else begin + main_ic_reset <= 1'd0; + end + if (clk200_rst) begin + main_reset_counter <= 4'd15; + main_ic_reset <= 1'd1; + end +end + +always @(posedge sys_clk) begin + if ((main_minsoc_ctrl_bus_errors != 32'd4294967295)) begin + if (main_minsoc_ctrl_bus_error) begin + main_minsoc_ctrl_bus_errors <= (main_minsoc_ctrl_bus_errors + 1'd1); + end + end + main_minsoc_rom_bus_ack <= 1'd0; + if (((main_minsoc_rom_bus_cyc & main_minsoc_rom_bus_stb) & (~main_minsoc_rom_bus_ack))) begin + main_minsoc_rom_bus_ack <= 1'd1; + end + main_minsoc_sram_bus_ack <= 1'd0; + if (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & (~main_minsoc_sram_bus_ack))) begin + main_minsoc_sram_bus_ack <= 1'd1; + end + main_minsoc_sink_ready <= 1'd0; + if (((main_minsoc_sink_valid & (~main_minsoc_tx_busy)) & (~main_minsoc_sink_ready))) begin + main_minsoc_tx_reg <= main_minsoc_sink_payload_data; + main_minsoc_tx_bitcount <= 1'd0; + main_minsoc_tx_busy <= 1'd1; + serial_tx <= 1'd0; + end else begin + if ((main_minsoc_uart_clk_txen & main_minsoc_tx_busy)) begin + main_minsoc_tx_bitcount <= (main_minsoc_tx_bitcount + 1'd1); + if ((main_minsoc_tx_bitcount == 4'd8)) begin + serial_tx <= 1'd1; + end else begin + if ((main_minsoc_tx_bitcount == 4'd9)) begin + serial_tx <= 1'd1; + main_minsoc_tx_busy <= 1'd0; + main_minsoc_sink_ready <= 1'd1; + end else begin + serial_tx <= main_minsoc_tx_reg[0]; + main_minsoc_tx_reg <= {1'd0, main_minsoc_tx_reg[7:1]}; + end + end + end + end + if (main_minsoc_tx_busy) begin + {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= (main_minsoc_phase_accumulator_tx + main_minsoc_storage); + end else begin + {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= 1'd0; + end + main_minsoc_source_valid <= 1'd0; + main_minsoc_rx_r <= main_minsoc_rx; + if ((~main_minsoc_rx_busy)) begin + if (((~main_minsoc_rx) & main_minsoc_rx_r)) begin + main_minsoc_rx_busy <= 1'd1; + main_minsoc_rx_bitcount <= 1'd0; + end + end else begin + if (main_minsoc_uart_clk_rxen) begin + main_minsoc_rx_bitcount <= (main_minsoc_rx_bitcount + 1'd1); + if ((main_minsoc_rx_bitcount == 1'd0)) begin + if (main_minsoc_rx) begin + main_minsoc_rx_busy <= 1'd0; + end + end else begin + if ((main_minsoc_rx_bitcount == 4'd9)) begin + main_minsoc_rx_busy <= 1'd0; + if (main_minsoc_rx) begin + main_minsoc_source_payload_data <= main_minsoc_rx_reg; + main_minsoc_source_valid <= 1'd1; + end + end else begin + main_minsoc_rx_reg <= {main_minsoc_rx, main_minsoc_rx_reg[7:1]}; + end + end + end + end + if (main_minsoc_rx_busy) begin + {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= (main_minsoc_phase_accumulator_rx + main_minsoc_storage); + end else begin + {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= 32'd2147483648; + end + if (main_minsoc_uart_tx_clear) begin + main_minsoc_uart_tx_pending <= 1'd0; + end + main_minsoc_uart_tx_old_trigger <= main_minsoc_uart_tx_trigger; + if (((~main_minsoc_uart_tx_trigger) & main_minsoc_uart_tx_old_trigger)) begin + main_minsoc_uart_tx_pending <= 1'd1; + end + if (main_minsoc_uart_rx_clear) begin + main_minsoc_uart_rx_pending <= 1'd0; + end + main_minsoc_uart_rx_old_trigger <= main_minsoc_uart_rx_trigger; + if (((~main_minsoc_uart_rx_trigger) & main_minsoc_uart_rx_old_trigger)) begin + main_minsoc_uart_rx_pending <= 1'd1; + end + if (main_minsoc_uart_tx_fifo_syncfifo_re) begin + main_minsoc_uart_tx_fifo_readable <= 1'd1; + end else begin + if (main_minsoc_uart_tx_fifo_re) begin + main_minsoc_uart_tx_fifo_readable <= 1'd0; + end + end + if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin + main_minsoc_uart_tx_fifo_produce <= (main_minsoc_uart_tx_fifo_produce + 1'd1); + end + if (main_minsoc_uart_tx_fifo_do_read) begin + main_minsoc_uart_tx_fifo_consume <= (main_minsoc_uart_tx_fifo_consume + 1'd1); + end + if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin + if ((~main_minsoc_uart_tx_fifo_do_read)) begin + main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 + 1'd1); + end + end else begin + if (main_minsoc_uart_tx_fifo_do_read) begin + main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 - 1'd1); + end + end + if (main_minsoc_uart_rx_fifo_syncfifo_re) begin + main_minsoc_uart_rx_fifo_readable <= 1'd1; + end else begin + if (main_minsoc_uart_rx_fifo_re) begin + main_minsoc_uart_rx_fifo_readable <= 1'd0; + end + end + if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin + main_minsoc_uart_rx_fifo_produce <= (main_minsoc_uart_rx_fifo_produce + 1'd1); + end + if (main_minsoc_uart_rx_fifo_do_read) begin + main_minsoc_uart_rx_fifo_consume <= (main_minsoc_uart_rx_fifo_consume + 1'd1); + end + if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin + if ((~main_minsoc_uart_rx_fifo_do_read)) begin + main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 + 1'd1); + end + end else begin + if (main_minsoc_uart_rx_fifo_do_read) begin + main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 - 1'd1); + end + end + if (main_minsoc_uart_reset) begin + main_minsoc_uart_tx_pending <= 1'd0; + main_minsoc_uart_tx_old_trigger <= 1'd0; + main_minsoc_uart_rx_pending <= 1'd0; + main_minsoc_uart_rx_old_trigger <= 1'd0; + main_minsoc_uart_tx_fifo_readable <= 1'd0; + main_minsoc_uart_tx_fifo_level0 <= 5'd0; + main_minsoc_uart_tx_fifo_produce <= 4'd0; + main_minsoc_uart_tx_fifo_consume <= 4'd0; + main_minsoc_uart_rx_fifo_readable <= 1'd0; + main_minsoc_uart_rx_fifo_level0 <= 5'd0; + main_minsoc_uart_rx_fifo_produce <= 4'd0; + main_minsoc_uart_rx_fifo_consume <= 4'd0; + end + if (main_minsoc_timer0_en_storage) begin + if ((main_minsoc_timer0_value == 1'd0)) begin + main_minsoc_timer0_value <= main_minsoc_timer0_reload_storage; + end else begin + main_minsoc_timer0_value <= (main_minsoc_timer0_value - 1'd1); + end + end else begin + main_minsoc_timer0_value <= main_minsoc_timer0_load_storage; + end + if (main_minsoc_timer0_update_value_re) begin + main_minsoc_timer0_value_status <= main_minsoc_timer0_value; + end + if (main_minsoc_timer0_zero_clear) begin + main_minsoc_timer0_zero_pending <= 1'd0; + end + main_minsoc_timer0_zero_old_trigger <= main_minsoc_timer0_zero_trigger; + if (((~main_minsoc_timer0_zero_trigger) & main_minsoc_timer0_zero_old_trigger)) begin + main_minsoc_timer0_zero_pending <= 1'd1; + end + builder_wb2csr_state <= builder_wb2csr_next_state; + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip0_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip0_value <= (main_a7ddrphy_bitslip0_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip1_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip1_value <= (main_a7ddrphy_bitslip1_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip2_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip2_value <= (main_a7ddrphy_bitslip2_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip3_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip3_value <= (main_a7ddrphy_bitslip3_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip4_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip4_value <= (main_a7ddrphy_bitslip4_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip5_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip5_value <= (main_a7ddrphy_bitslip5_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip6_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip6_value <= (main_a7ddrphy_bitslip6_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip7_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip7_value <= (main_a7ddrphy_bitslip7_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip8_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip8_value <= (main_a7ddrphy_bitslip8_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip9_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip9_value <= (main_a7ddrphy_bitslip9_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip10_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip10_value <= (main_a7ddrphy_bitslip10_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip11_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip11_value <= (main_a7ddrphy_bitslip11_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip12_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip12_value <= (main_a7ddrphy_bitslip12_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip13_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip13_value <= (main_a7ddrphy_bitslip13_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip14_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip14_value <= (main_a7ddrphy_bitslip14_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip15_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip15_value <= (main_a7ddrphy_bitslip15_value + 1'd1); + end + end + end + main_a7ddrphy_n_rddata_en0 <= main_a7ddrphy_dfi_p2_rddata_en; + main_a7ddrphy_n_rddata_en1 <= main_a7ddrphy_n_rddata_en0; + main_a7ddrphy_n_rddata_en2 <= main_a7ddrphy_n_rddata_en1; + main_a7ddrphy_n_rddata_en3 <= main_a7ddrphy_n_rddata_en2; + main_a7ddrphy_n_rddata_en4 <= main_a7ddrphy_n_rddata_en3; + main_a7ddrphy_n_rddata_en5 <= main_a7ddrphy_n_rddata_en4; + main_a7ddrphy_n_rddata_en6 <= main_a7ddrphy_n_rddata_en5; + main_a7ddrphy_n_rddata_en7 <= main_a7ddrphy_n_rddata_en6; + main_a7ddrphy_dfi_p0_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_dfi_p1_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_dfi_p2_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_dfi_p3_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_last_wrdata_en <= {main_a7ddrphy_last_wrdata_en[2:0], main_a7ddrphy_dfi_p3_wrdata_en}; + main_a7ddrphy_oe_dqs <= main_a7ddrphy_oe; + main_a7ddrphy_oe_dq <= main_a7ddrphy_oe; + main_a7ddrphy_bitslip0_r <= {main_a7ddrphy_bitslip0_i, main_a7ddrphy_bitslip0_r[15:8]}; + case (main_a7ddrphy_bitslip0_value) + 1'd0: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[14:7]; + end + endcase + main_a7ddrphy_bitslip1_r <= {main_a7ddrphy_bitslip1_i, main_a7ddrphy_bitslip1_r[15:8]}; + case (main_a7ddrphy_bitslip1_value) + 1'd0: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[14:7]; + end + endcase + main_a7ddrphy_bitslip2_r <= {main_a7ddrphy_bitslip2_i, main_a7ddrphy_bitslip2_r[15:8]}; + case (main_a7ddrphy_bitslip2_value) + 1'd0: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[14:7]; + end + endcase + main_a7ddrphy_bitslip3_r <= {main_a7ddrphy_bitslip3_i, main_a7ddrphy_bitslip3_r[15:8]}; + case (main_a7ddrphy_bitslip3_value) + 1'd0: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[14:7]; + end + endcase + main_a7ddrphy_bitslip4_r <= {main_a7ddrphy_bitslip4_i, main_a7ddrphy_bitslip4_r[15:8]}; + case (main_a7ddrphy_bitslip4_value) + 1'd0: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[14:7]; + end + endcase + main_a7ddrphy_bitslip5_r <= {main_a7ddrphy_bitslip5_i, main_a7ddrphy_bitslip5_r[15:8]}; + case (main_a7ddrphy_bitslip5_value) + 1'd0: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[14:7]; + end + endcase + main_a7ddrphy_bitslip6_r <= {main_a7ddrphy_bitslip6_i, main_a7ddrphy_bitslip6_r[15:8]}; + case (main_a7ddrphy_bitslip6_value) + 1'd0: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[14:7]; + end + endcase + main_a7ddrphy_bitslip7_r <= {main_a7ddrphy_bitslip7_i, main_a7ddrphy_bitslip7_r[15:8]}; + case (main_a7ddrphy_bitslip7_value) + 1'd0: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[14:7]; + end + endcase + main_a7ddrphy_bitslip8_r <= {main_a7ddrphy_bitslip8_i, main_a7ddrphy_bitslip8_r[15:8]}; + case (main_a7ddrphy_bitslip8_value) + 1'd0: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[14:7]; + end + endcase + main_a7ddrphy_bitslip9_r <= {main_a7ddrphy_bitslip9_i, main_a7ddrphy_bitslip9_r[15:8]}; + case (main_a7ddrphy_bitslip9_value) + 1'd0: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[14:7]; + end + endcase + main_a7ddrphy_bitslip10_r <= {main_a7ddrphy_bitslip10_i, main_a7ddrphy_bitslip10_r[15:8]}; + case (main_a7ddrphy_bitslip10_value) + 1'd0: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[14:7]; + end + endcase + main_a7ddrphy_bitslip11_r <= {main_a7ddrphy_bitslip11_i, main_a7ddrphy_bitslip11_r[15:8]}; + case (main_a7ddrphy_bitslip11_value) + 1'd0: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[14:7]; + end + endcase + main_a7ddrphy_bitslip12_r <= {main_a7ddrphy_bitslip12_i, main_a7ddrphy_bitslip12_r[15:8]}; + case (main_a7ddrphy_bitslip12_value) + 1'd0: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[14:7]; + end + endcase + main_a7ddrphy_bitslip13_r <= {main_a7ddrphy_bitslip13_i, main_a7ddrphy_bitslip13_r[15:8]}; + case (main_a7ddrphy_bitslip13_value) + 1'd0: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[14:7]; + end + endcase + main_a7ddrphy_bitslip14_r <= {main_a7ddrphy_bitslip14_i, main_a7ddrphy_bitslip14_r[15:8]}; + case (main_a7ddrphy_bitslip14_value) + 1'd0: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[14:7]; + end + endcase + main_a7ddrphy_bitslip15_r <= {main_a7ddrphy_bitslip15_i, main_a7ddrphy_bitslip15_r[15:8]}; + case (main_a7ddrphy_bitslip15_value) + 1'd0: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[14:7]; + end + endcase + if (main_sdram_inti_p0_rddata_valid) begin + main_sdram_phaseinjector0_status <= main_sdram_inti_p0_rddata; + end + if (main_sdram_inti_p1_rddata_valid) begin + main_sdram_phaseinjector1_status <= main_sdram_inti_p1_rddata; + end + if (main_sdram_inti_p2_rddata_valid) begin + main_sdram_phaseinjector2_status <= main_sdram_inti_p2_rddata; + end + if (main_sdram_inti_p3_rddata_valid) begin + main_sdram_phaseinjector3_status <= main_sdram_inti_p3_rddata; + end + if ((main_sdram_timer_wait & (~main_sdram_timer_done0))) begin + main_sdram_timer_count1 <= (main_sdram_timer_count1 - 1'd1); + end else begin + main_sdram_timer_count1 <= 9'd468; + end + main_sdram_postponer_req_o <= 1'd0; + if (main_sdram_postponer_req_i) begin + main_sdram_postponer_count <= (main_sdram_postponer_count - 1'd1); + if ((main_sdram_postponer_count == 1'd0)) begin + main_sdram_postponer_count <= 1'd0; + main_sdram_postponer_req_o <= 1'd1; + end + end + if (main_sdram_sequencer_start0) begin + main_sdram_sequencer_count <= 1'd0; + end else begin + if (main_sdram_sequencer_done1) begin + if ((main_sdram_sequencer_count != 1'd0)) begin + main_sdram_sequencer_count <= (main_sdram_sequencer_count - 1'd1); + end + end + end + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_sequencer_done1 <= 1'd0; + if ((main_sdram_sequencer_start1 & (main_sdram_sequencer_counter == 1'd0))) begin + main_sdram_cmd_payload_a <= 11'd1024; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd1; + main_sdram_cmd_payload_we <= 1'd1; + end + if ((main_sdram_sequencer_counter == 2'd2)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd1; + main_sdram_cmd_payload_ras <= 1'd1; + main_sdram_cmd_payload_we <= 1'd0; + end + if ((main_sdram_sequencer_counter == 6'd34)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_sequencer_done1 <= 1'd1; + end + if ((main_sdram_sequencer_counter == 6'd34)) begin + main_sdram_sequencer_counter <= 1'd0; + end else begin + if ((main_sdram_sequencer_counter != 1'd0)) begin + main_sdram_sequencer_counter <= (main_sdram_sequencer_counter + 1'd1); + end else begin + if (main_sdram_sequencer_start1) begin + main_sdram_sequencer_counter <= 1'd1; + end + end + end + if ((main_sdram_zqcs_timer_wait & (~main_sdram_zqcs_timer_done0))) begin + main_sdram_zqcs_timer_count1 <= (main_sdram_zqcs_timer_count1 - 1'd1); + end else begin + main_sdram_zqcs_timer_count1 <= 26'd59999999; + end + main_sdram_zqcs_executer_done <= 1'd0; + if ((main_sdram_zqcs_executer_start & (main_sdram_zqcs_executer_counter == 1'd0))) begin + main_sdram_cmd_payload_a <= 11'd1024; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd1; + main_sdram_cmd_payload_we <= 1'd1; + end + if ((main_sdram_zqcs_executer_counter == 2'd2)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd1; + end + if ((main_sdram_zqcs_executer_counter == 5'd18)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_zqcs_executer_done <= 1'd1; + end + if ((main_sdram_zqcs_executer_counter == 5'd18)) begin + main_sdram_zqcs_executer_counter <= 1'd0; + end else begin + if ((main_sdram_zqcs_executer_counter != 1'd0)) begin + main_sdram_zqcs_executer_counter <= (main_sdram_zqcs_executer_counter + 1'd1); + end else begin + if (main_sdram_zqcs_executer_start) begin + main_sdram_zqcs_executer_counter <= 1'd1; + end + end + end + builder_refresher_state <= builder_refresher_next_state; + if (main_sdram_bankmachine0_row_close) begin + main_sdram_bankmachine0_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine0_row_open) begin + main_sdram_bankmachine0_row_opened <= 1'd1; + main_sdram_bankmachine0_row <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine0_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine0_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready)) begin + main_sdram_bankmachine0_cmd_buffer_source_valid <= main_sdram_bankmachine0_cmd_buffer_sink_valid; + main_sdram_bankmachine0_cmd_buffer_source_first <= main_sdram_bankmachine0_cmd_buffer_sink_first; + main_sdram_bankmachine0_cmd_buffer_source_last <= main_sdram_bankmachine0_cmd_buffer_sink_last; + main_sdram_bankmachine0_cmd_buffer_source_payload_we <= main_sdram_bankmachine0_cmd_buffer_sink_payload_we; + main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine0_twtpcon_valid) begin + main_sdram_bankmachine0_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine0_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine0_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine0_twtpcon_ready)) begin + main_sdram_bankmachine0_twtpcon_count <= (main_sdram_bankmachine0_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine0_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine0_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine0_trccon_valid) begin + main_sdram_bankmachine0_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine0_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine0_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine0_trccon_ready)) begin + main_sdram_bankmachine0_trccon_count <= (main_sdram_bankmachine0_trccon_count - 1'd1); + if ((main_sdram_bankmachine0_trccon_count == 1'd1)) begin + main_sdram_bankmachine0_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine0_trascon_valid) begin + main_sdram_bankmachine0_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine0_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine0_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine0_trascon_ready)) begin + main_sdram_bankmachine0_trascon_count <= (main_sdram_bankmachine0_trascon_count - 1'd1); + if ((main_sdram_bankmachine0_trascon_count == 1'd1)) begin + main_sdram_bankmachine0_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine0_state <= builder_bankmachine0_next_state; + if (main_sdram_bankmachine1_row_close) begin + main_sdram_bankmachine1_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine1_row_open) begin + main_sdram_bankmachine1_row_opened <= 1'd1; + main_sdram_bankmachine1_row <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine1_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine1_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready)) begin + main_sdram_bankmachine1_cmd_buffer_source_valid <= main_sdram_bankmachine1_cmd_buffer_sink_valid; + main_sdram_bankmachine1_cmd_buffer_source_first <= main_sdram_bankmachine1_cmd_buffer_sink_first; + main_sdram_bankmachine1_cmd_buffer_source_last <= main_sdram_bankmachine1_cmd_buffer_sink_last; + main_sdram_bankmachine1_cmd_buffer_source_payload_we <= main_sdram_bankmachine1_cmd_buffer_sink_payload_we; + main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine1_twtpcon_valid) begin + main_sdram_bankmachine1_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine1_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine1_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine1_twtpcon_ready)) begin + main_sdram_bankmachine1_twtpcon_count <= (main_sdram_bankmachine1_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine1_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine1_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine1_trccon_valid) begin + main_sdram_bankmachine1_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine1_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine1_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine1_trccon_ready)) begin + main_sdram_bankmachine1_trccon_count <= (main_sdram_bankmachine1_trccon_count - 1'd1); + if ((main_sdram_bankmachine1_trccon_count == 1'd1)) begin + main_sdram_bankmachine1_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine1_trascon_valid) begin + main_sdram_bankmachine1_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine1_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine1_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine1_trascon_ready)) begin + main_sdram_bankmachine1_trascon_count <= (main_sdram_bankmachine1_trascon_count - 1'd1); + if ((main_sdram_bankmachine1_trascon_count == 1'd1)) begin + main_sdram_bankmachine1_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine1_state <= builder_bankmachine1_next_state; + if (main_sdram_bankmachine2_row_close) begin + main_sdram_bankmachine2_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine2_row_open) begin + main_sdram_bankmachine2_row_opened <= 1'd1; + main_sdram_bankmachine2_row <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine2_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine2_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready)) begin + main_sdram_bankmachine2_cmd_buffer_source_valid <= main_sdram_bankmachine2_cmd_buffer_sink_valid; + main_sdram_bankmachine2_cmd_buffer_source_first <= main_sdram_bankmachine2_cmd_buffer_sink_first; + main_sdram_bankmachine2_cmd_buffer_source_last <= main_sdram_bankmachine2_cmd_buffer_sink_last; + main_sdram_bankmachine2_cmd_buffer_source_payload_we <= main_sdram_bankmachine2_cmd_buffer_sink_payload_we; + main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine2_twtpcon_valid) begin + main_sdram_bankmachine2_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine2_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine2_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine2_twtpcon_ready)) begin + main_sdram_bankmachine2_twtpcon_count <= (main_sdram_bankmachine2_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine2_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine2_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine2_trccon_valid) begin + main_sdram_bankmachine2_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine2_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine2_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine2_trccon_ready)) begin + main_sdram_bankmachine2_trccon_count <= (main_sdram_bankmachine2_trccon_count - 1'd1); + if ((main_sdram_bankmachine2_trccon_count == 1'd1)) begin + main_sdram_bankmachine2_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine2_trascon_valid) begin + main_sdram_bankmachine2_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine2_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine2_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine2_trascon_ready)) begin + main_sdram_bankmachine2_trascon_count <= (main_sdram_bankmachine2_trascon_count - 1'd1); + if ((main_sdram_bankmachine2_trascon_count == 1'd1)) begin + main_sdram_bankmachine2_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine2_state <= builder_bankmachine2_next_state; + if (main_sdram_bankmachine3_row_close) begin + main_sdram_bankmachine3_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine3_row_open) begin + main_sdram_bankmachine3_row_opened <= 1'd1; + main_sdram_bankmachine3_row <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine3_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine3_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready)) begin + main_sdram_bankmachine3_cmd_buffer_source_valid <= main_sdram_bankmachine3_cmd_buffer_sink_valid; + main_sdram_bankmachine3_cmd_buffer_source_first <= main_sdram_bankmachine3_cmd_buffer_sink_first; + main_sdram_bankmachine3_cmd_buffer_source_last <= main_sdram_bankmachine3_cmd_buffer_sink_last; + main_sdram_bankmachine3_cmd_buffer_source_payload_we <= main_sdram_bankmachine3_cmd_buffer_sink_payload_we; + main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine3_twtpcon_valid) begin + main_sdram_bankmachine3_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine3_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine3_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine3_twtpcon_ready)) begin + main_sdram_bankmachine3_twtpcon_count <= (main_sdram_bankmachine3_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine3_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine3_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine3_trccon_valid) begin + main_sdram_bankmachine3_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine3_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine3_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine3_trccon_ready)) begin + main_sdram_bankmachine3_trccon_count <= (main_sdram_bankmachine3_trccon_count - 1'd1); + if ((main_sdram_bankmachine3_trccon_count == 1'd1)) begin + main_sdram_bankmachine3_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine3_trascon_valid) begin + main_sdram_bankmachine3_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine3_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine3_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine3_trascon_ready)) begin + main_sdram_bankmachine3_trascon_count <= (main_sdram_bankmachine3_trascon_count - 1'd1); + if ((main_sdram_bankmachine3_trascon_count == 1'd1)) begin + main_sdram_bankmachine3_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine3_state <= builder_bankmachine3_next_state; + if (main_sdram_bankmachine4_row_close) begin + main_sdram_bankmachine4_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine4_row_open) begin + main_sdram_bankmachine4_row_opened <= 1'd1; + main_sdram_bankmachine4_row <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine4_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine4_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready)) begin + main_sdram_bankmachine4_cmd_buffer_source_valid <= main_sdram_bankmachine4_cmd_buffer_sink_valid; + main_sdram_bankmachine4_cmd_buffer_source_first <= main_sdram_bankmachine4_cmd_buffer_sink_first; + main_sdram_bankmachine4_cmd_buffer_source_last <= main_sdram_bankmachine4_cmd_buffer_sink_last; + main_sdram_bankmachine4_cmd_buffer_source_payload_we <= main_sdram_bankmachine4_cmd_buffer_sink_payload_we; + main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine4_twtpcon_valid) begin + main_sdram_bankmachine4_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine4_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine4_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine4_twtpcon_ready)) begin + main_sdram_bankmachine4_twtpcon_count <= (main_sdram_bankmachine4_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine4_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine4_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine4_trccon_valid) begin + main_sdram_bankmachine4_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine4_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine4_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine4_trccon_ready)) begin + main_sdram_bankmachine4_trccon_count <= (main_sdram_bankmachine4_trccon_count - 1'd1); + if ((main_sdram_bankmachine4_trccon_count == 1'd1)) begin + main_sdram_bankmachine4_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine4_trascon_valid) begin + main_sdram_bankmachine4_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine4_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine4_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine4_trascon_ready)) begin + main_sdram_bankmachine4_trascon_count <= (main_sdram_bankmachine4_trascon_count - 1'd1); + if ((main_sdram_bankmachine4_trascon_count == 1'd1)) begin + main_sdram_bankmachine4_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine4_state <= builder_bankmachine4_next_state; + if (main_sdram_bankmachine5_row_close) begin + main_sdram_bankmachine5_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine5_row_open) begin + main_sdram_bankmachine5_row_opened <= 1'd1; + main_sdram_bankmachine5_row <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine5_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine5_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready)) begin + main_sdram_bankmachine5_cmd_buffer_source_valid <= main_sdram_bankmachine5_cmd_buffer_sink_valid; + main_sdram_bankmachine5_cmd_buffer_source_first <= main_sdram_bankmachine5_cmd_buffer_sink_first; + main_sdram_bankmachine5_cmd_buffer_source_last <= main_sdram_bankmachine5_cmd_buffer_sink_last; + main_sdram_bankmachine5_cmd_buffer_source_payload_we <= main_sdram_bankmachine5_cmd_buffer_sink_payload_we; + main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine5_twtpcon_valid) begin + main_sdram_bankmachine5_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine5_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine5_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine5_twtpcon_ready)) begin + main_sdram_bankmachine5_twtpcon_count <= (main_sdram_bankmachine5_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine5_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine5_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine5_trccon_valid) begin + main_sdram_bankmachine5_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine5_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine5_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine5_trccon_ready)) begin + main_sdram_bankmachine5_trccon_count <= (main_sdram_bankmachine5_trccon_count - 1'd1); + if ((main_sdram_bankmachine5_trccon_count == 1'd1)) begin + main_sdram_bankmachine5_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine5_trascon_valid) begin + main_sdram_bankmachine5_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine5_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine5_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine5_trascon_ready)) begin + main_sdram_bankmachine5_trascon_count <= (main_sdram_bankmachine5_trascon_count - 1'd1); + if ((main_sdram_bankmachine5_trascon_count == 1'd1)) begin + main_sdram_bankmachine5_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine5_state <= builder_bankmachine5_next_state; + if (main_sdram_bankmachine6_row_close) begin + main_sdram_bankmachine6_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine6_row_open) begin + main_sdram_bankmachine6_row_opened <= 1'd1; + main_sdram_bankmachine6_row <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine6_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine6_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready)) begin + main_sdram_bankmachine6_cmd_buffer_source_valid <= main_sdram_bankmachine6_cmd_buffer_sink_valid; + main_sdram_bankmachine6_cmd_buffer_source_first <= main_sdram_bankmachine6_cmd_buffer_sink_first; + main_sdram_bankmachine6_cmd_buffer_source_last <= main_sdram_bankmachine6_cmd_buffer_sink_last; + main_sdram_bankmachine6_cmd_buffer_source_payload_we <= main_sdram_bankmachine6_cmd_buffer_sink_payload_we; + main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine6_twtpcon_valid) begin + main_sdram_bankmachine6_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine6_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine6_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine6_twtpcon_ready)) begin + main_sdram_bankmachine6_twtpcon_count <= (main_sdram_bankmachine6_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine6_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine6_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine6_trccon_valid) begin + main_sdram_bankmachine6_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine6_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine6_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine6_trccon_ready)) begin + main_sdram_bankmachine6_trccon_count <= (main_sdram_bankmachine6_trccon_count - 1'd1); + if ((main_sdram_bankmachine6_trccon_count == 1'd1)) begin + main_sdram_bankmachine6_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine6_trascon_valid) begin + main_sdram_bankmachine6_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine6_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine6_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine6_trascon_ready)) begin + main_sdram_bankmachine6_trascon_count <= (main_sdram_bankmachine6_trascon_count - 1'd1); + if ((main_sdram_bankmachine6_trascon_count == 1'd1)) begin + main_sdram_bankmachine6_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine6_state <= builder_bankmachine6_next_state; + if (main_sdram_bankmachine7_row_close) begin + main_sdram_bankmachine7_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine7_row_open) begin + main_sdram_bankmachine7_row_opened <= 1'd1; + main_sdram_bankmachine7_row <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine7_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine7_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready)) begin + main_sdram_bankmachine7_cmd_buffer_source_valid <= main_sdram_bankmachine7_cmd_buffer_sink_valid; + main_sdram_bankmachine7_cmd_buffer_source_first <= main_sdram_bankmachine7_cmd_buffer_sink_first; + main_sdram_bankmachine7_cmd_buffer_source_last <= main_sdram_bankmachine7_cmd_buffer_sink_last; + main_sdram_bankmachine7_cmd_buffer_source_payload_we <= main_sdram_bankmachine7_cmd_buffer_sink_payload_we; + main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine7_twtpcon_valid) begin + main_sdram_bankmachine7_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine7_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine7_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine7_twtpcon_ready)) begin + main_sdram_bankmachine7_twtpcon_count <= (main_sdram_bankmachine7_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine7_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine7_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine7_trccon_valid) begin + main_sdram_bankmachine7_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine7_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine7_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine7_trccon_ready)) begin + main_sdram_bankmachine7_trccon_count <= (main_sdram_bankmachine7_trccon_count - 1'd1); + if ((main_sdram_bankmachine7_trccon_count == 1'd1)) begin + main_sdram_bankmachine7_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine7_trascon_valid) begin + main_sdram_bankmachine7_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine7_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine7_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine7_trascon_ready)) begin + main_sdram_bankmachine7_trascon_count <= (main_sdram_bankmachine7_trascon_count - 1'd1); + if ((main_sdram_bankmachine7_trascon_count == 1'd1)) begin + main_sdram_bankmachine7_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine7_state <= builder_bankmachine7_next_state; + if ((~main_sdram_en0)) begin + main_sdram_time0 <= 5'd31; + end else begin + if ((~main_sdram_max_time0)) begin + main_sdram_time0 <= (main_sdram_time0 - 1'd1); + end + end + if ((~main_sdram_en1)) begin + main_sdram_time1 <= 4'd15; + end else begin + if ((~main_sdram_max_time1)) begin + main_sdram_time1 <= (main_sdram_time1 - 1'd1); + end + end + if (main_sdram_choose_cmd_ce) begin + case (main_sdram_choose_cmd_grant) + 1'd0: begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end + end + end + end + end + end + end + end + 1'd1: begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end + end + end + end + end + end + end + end + 2'd2: begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end + end + end + end + end + end + end + end + 2'd3: begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end + end + end + end + end + end + end + end + 3'd4: begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end + end + end + end + end + end + end + end + 3'd5: begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end + end + end + end + end + end + end + end + 3'd6: begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end + end + end + end + end + end + end + end + 3'd7: begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end + end + end + end + end + end + end + end + endcase + end + if (main_sdram_choose_req_ce) begin + case (main_sdram_choose_req_grant) + 1'd0: begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end + end + end + end + end + end + end + end + 1'd1: begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end + end + end + end + end + end + end + end + 2'd2: begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end + end + end + end + end + end + end + end + 2'd3: begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end + end + end + end + end + end + end + end + 3'd4: begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end + end + end + end + end + end + end + end + 3'd5: begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end + end + end + end + end + end + end + end + 3'd6: begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end + end + end + end + end + end + end + end + 3'd7: begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end + end + end + end + end + end + end + end + endcase + end + main_sdram_dfi_p0_cs_n <= 1'd0; + main_sdram_dfi_p0_bank <= builder_array_muxed0; + main_sdram_dfi_p0_address <= builder_array_muxed1; + main_sdram_dfi_p0_cas_n <= (~builder_array_muxed2); + main_sdram_dfi_p0_ras_n <= (~builder_array_muxed3); + main_sdram_dfi_p0_we_n <= (~builder_array_muxed4); + main_sdram_dfi_p0_rddata_en <= builder_array_muxed5; + main_sdram_dfi_p0_wrdata_en <= builder_array_muxed6; + main_sdram_dfi_p1_cs_n <= 1'd0; + main_sdram_dfi_p1_bank <= builder_array_muxed7; + main_sdram_dfi_p1_address <= builder_array_muxed8; + main_sdram_dfi_p1_cas_n <= (~builder_array_muxed9); + main_sdram_dfi_p1_ras_n <= (~builder_array_muxed10); + main_sdram_dfi_p1_we_n <= (~builder_array_muxed11); + main_sdram_dfi_p1_rddata_en <= builder_array_muxed12; + main_sdram_dfi_p1_wrdata_en <= builder_array_muxed13; + main_sdram_dfi_p2_cs_n <= 1'd0; + main_sdram_dfi_p2_bank <= builder_array_muxed14; + main_sdram_dfi_p2_address <= builder_array_muxed15; + main_sdram_dfi_p2_cas_n <= (~builder_array_muxed16); + main_sdram_dfi_p2_ras_n <= (~builder_array_muxed17); + main_sdram_dfi_p2_we_n <= (~builder_array_muxed18); + main_sdram_dfi_p2_rddata_en <= builder_array_muxed19; + main_sdram_dfi_p2_wrdata_en <= builder_array_muxed20; + main_sdram_dfi_p3_cs_n <= 1'd0; + main_sdram_dfi_p3_bank <= builder_array_muxed21; + main_sdram_dfi_p3_address <= builder_array_muxed22; + main_sdram_dfi_p3_cas_n <= (~builder_array_muxed23); + main_sdram_dfi_p3_ras_n <= (~builder_array_muxed24); + main_sdram_dfi_p3_we_n <= (~builder_array_muxed25); + main_sdram_dfi_p3_rddata_en <= builder_array_muxed26; + main_sdram_dfi_p3_wrdata_en <= builder_array_muxed27; + if (main_sdram_trrdcon_valid) begin + main_sdram_trrdcon_count <= 1'd1; + if (1'd0) begin + main_sdram_trrdcon_ready <= 1'd1; + end else begin + main_sdram_trrdcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_trrdcon_ready)) begin + main_sdram_trrdcon_count <= (main_sdram_trrdcon_count - 1'd1); + if ((main_sdram_trrdcon_count == 1'd1)) begin + main_sdram_trrdcon_ready <= 1'd1; + end + end + end + main_sdram_tfawcon_window <= {main_sdram_tfawcon_window, main_sdram_tfawcon_valid}; + if ((main_sdram_tfawcon_count < 3'd4)) begin + if ((main_sdram_tfawcon_count == 2'd3)) begin + main_sdram_tfawcon_ready <= (~main_sdram_tfawcon_valid); + end else begin + main_sdram_tfawcon_ready <= 1'd1; + end + end + if (main_sdram_tccdcon_valid) begin + main_sdram_tccdcon_count <= 1'd0; + if (1'd1) begin + main_sdram_tccdcon_ready <= 1'd1; + end else begin + main_sdram_tccdcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_tccdcon_ready)) begin + main_sdram_tccdcon_count <= (main_sdram_tccdcon_count - 1'd1); + if ((main_sdram_tccdcon_count == 1'd1)) begin + main_sdram_tccdcon_ready <= 1'd1; + end + end + end + if (main_sdram_twtrcon_valid) begin + main_sdram_twtrcon_count <= 3'd4; + if (1'd0) begin + main_sdram_twtrcon_ready <= 1'd1; + end else begin + main_sdram_twtrcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_twtrcon_ready)) begin + main_sdram_twtrcon_count <= (main_sdram_twtrcon_count - 1'd1); + if ((main_sdram_twtrcon_count == 1'd1)) begin + main_sdram_twtrcon_ready <= 1'd1; + end + end + end + builder_multiplexer_state <= builder_multiplexer_next_state; + if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) begin + builder_rbank <= 1'd0; + end + if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) begin + builder_wbank <= 1'd0; + end + if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) begin + builder_rbank <= 1'd1; + end + if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) begin + builder_wbank <= 1'd1; + end + if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) begin + builder_rbank <= 2'd2; + end + if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) begin + builder_wbank <= 2'd2; + end + if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) begin + builder_rbank <= 2'd3; + end + if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) begin + builder_wbank <= 2'd3; + end + if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) begin + builder_rbank <= 3'd4; + end + if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) begin + builder_wbank <= 3'd4; + end + if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) begin + builder_rbank <= 3'd5; + end + if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) begin + builder_wbank <= 3'd5; + end + if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) begin + builder_rbank <= 3'd6; + end + if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) begin + builder_wbank <= 3'd6; + end + if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)) begin + builder_rbank <= 3'd7; + end + if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)) begin + builder_wbank <= 3'd7; + end + builder_new_master_wdata_ready0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)); + builder_new_master_wdata_ready1 <= builder_new_master_wdata_ready0; + builder_new_master_wdata_ready2 <= builder_new_master_wdata_ready1; + builder_new_master_rdata_valid0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)); + builder_new_master_rdata_valid1 <= builder_new_master_rdata_valid0; + builder_new_master_rdata_valid2 <= builder_new_master_rdata_valid1; + builder_new_master_rdata_valid3 <= builder_new_master_rdata_valid2; + builder_new_master_rdata_valid4 <= builder_new_master_rdata_valid3; + builder_new_master_rdata_valid5 <= builder_new_master_rdata_valid4; + builder_new_master_rdata_valid6 <= builder_new_master_rdata_valid5; + builder_new_master_rdata_valid7 <= builder_new_master_rdata_valid6; + builder_new_master_rdata_valid8 <= builder_new_master_rdata_valid7; + builder_new_master_rdata_valid9 <= builder_new_master_rdata_valid8; + main_adr_offset_r <= main_interface0_wb_sdram_adr[1:0]; + builder_fullmemorywe_state <= builder_fullmemorywe_next_state; + builder_litedramwishbone2native_state <= builder_litedramwishbone2native_next_state; + if (main_count_next_value_ce) begin + main_count <= main_count_next_value; + end + case (builder_minsoc_grant) + 1'd0: begin + if ((~builder_minsoc_request[0])) begin + if (builder_minsoc_request[1]) begin + builder_minsoc_grant <= 1'd1; + end + end + end + 1'd1: begin + if ((~builder_minsoc_request[1])) begin + if (builder_minsoc_request[0]) begin + builder_minsoc_grant <= 1'd0; + end + end + end + endcase + builder_minsoc_slave_sel_r <= builder_minsoc_slave_sel; + if (builder_minsoc_wait) begin + if ((~builder_minsoc_done)) begin + builder_minsoc_count <= (builder_minsoc_count - 1'd1); + end + end else begin + builder_minsoc_count <= 20'd1000000; + end + builder_minsoc_interface0_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank0_sel) begin + case (builder_minsoc_interface0_bank_bus_adr[3:0]) + 1'd0: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_reset0_w; + end + 1'd1: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch3_w; + end + 2'd2: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch2_w; + end + 2'd3: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch1_w; + end + 3'd4: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch0_w; + end + 3'd5: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors3_w; + end + 3'd6: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors2_w; + end + 3'd7: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors1_w; + end + 4'd8: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors0_w; + end + endcase + end + if (builder_minsoc_csrbank0_reset0_re) begin + main_minsoc_ctrl_reset_storage <= builder_minsoc_csrbank0_reset0_r; + end + main_minsoc_ctrl_reset_re <= builder_minsoc_csrbank0_reset0_re; + if (builder_minsoc_csrbank0_scratch3_re) begin + main_minsoc_ctrl_scratch_storage[31:24] <= builder_minsoc_csrbank0_scratch3_r; + end + if (builder_minsoc_csrbank0_scratch2_re) begin + main_minsoc_ctrl_scratch_storage[23:16] <= builder_minsoc_csrbank0_scratch2_r; + end + if (builder_minsoc_csrbank0_scratch1_re) begin + main_minsoc_ctrl_scratch_storage[15:8] <= builder_minsoc_csrbank0_scratch1_r; + end + if (builder_minsoc_csrbank0_scratch0_re) begin + main_minsoc_ctrl_scratch_storage[7:0] <= builder_minsoc_csrbank0_scratch0_r; + end + main_minsoc_ctrl_scratch_re <= builder_minsoc_csrbank0_scratch0_re; + builder_minsoc_interface1_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank1_sel) begin + case (builder_minsoc_interface1_bank_bus_adr[2:0]) + 1'd0: begin + builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_half_sys8x_taps0_w; + end + 1'd1: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_rst_w; + end + 2'd2: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_inc_w; + end + 2'd3: begin + builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_dly_sel0_w; + end + 3'd4: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_rst_w; + end + 3'd5: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_inc_w; + end + 3'd6: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_rst_w; + end + 3'd7: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_w; + end + endcase + end + if (builder_minsoc_csrbank1_half_sys8x_taps0_re) begin + main_a7ddrphy_half_sys8x_taps_storage[4:0] <= builder_minsoc_csrbank1_half_sys8x_taps0_r; + end + main_a7ddrphy_half_sys8x_taps_re <= builder_minsoc_csrbank1_half_sys8x_taps0_re; + if (builder_minsoc_csrbank1_dly_sel0_re) begin + main_a7ddrphy_dly_sel_storage[1:0] <= builder_minsoc_csrbank1_dly_sel0_r; + end + main_a7ddrphy_dly_sel_re <= builder_minsoc_csrbank1_dly_sel0_re; + builder_minsoc_interface2_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank2_sel) begin + case (builder_minsoc_interface2_bank_bus_adr[5:0]) + 1'd0: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_control0_w; + end + 1'd1: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_command0_w; + end + 2'd2: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector0_command_issue_w; + end + 2'd3: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address1_w; + end + 3'd4: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address0_w; + end + 3'd5: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_baddress0_w; + end + 3'd6: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; + end + 3'd7: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; + end + 4'd8: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; + end + 4'd9: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; + end + 4'd10: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata3_w; + end + 4'd11: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata2_w; + end + 4'd12: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata1_w; + end + 4'd13: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata0_w; + end + 4'd14: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_command0_w; + end + 4'd15: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector1_command_issue_w; + end + 5'd16: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address1_w; + end + 5'd17: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address0_w; + end + 5'd18: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_baddress0_w; + end + 5'd19: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; + end + 5'd20: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; + end + 5'd21: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; + end + 5'd22: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; + end + 5'd23: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata3_w; + end + 5'd24: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata2_w; + end + 5'd25: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata1_w; + end + 5'd26: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata0_w; + end + 5'd27: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_command0_w; + end + 5'd28: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector2_command_issue_w; + end + 5'd29: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address1_w; + end + 5'd30: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address0_w; + end + 5'd31: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_baddress0_w; + end + 6'd32: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; + end + 6'd33: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; + end + 6'd34: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; + end + 6'd35: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; + end + 6'd36: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata3_w; + end + 6'd37: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata2_w; + end + 6'd38: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata1_w; + end + 6'd39: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata0_w; + end + 6'd40: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_command0_w; + end + 6'd41: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector3_command_issue_w; + end + 6'd42: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address1_w; + end + 6'd43: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address0_w; + end + 6'd44: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_baddress0_w; + end + 6'd45: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; + end + 6'd46: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; + end + 6'd47: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; + end + 6'd48: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; + end + 6'd49: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata3_w; + end + 6'd50: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata2_w; + end + 6'd51: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata1_w; + end + 6'd52: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata0_w; + end + endcase + end + if (builder_minsoc_csrbank2_dfii_control0_re) begin + main_sdram_storage[3:0] <= builder_minsoc_csrbank2_dfii_control0_r; + end + main_sdram_re <= builder_minsoc_csrbank2_dfii_control0_re; + if (builder_minsoc_csrbank2_dfii_pi0_command0_re) begin + main_sdram_phaseinjector0_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi0_command0_r; + end + main_sdram_phaseinjector0_command_re <= builder_minsoc_csrbank2_dfii_pi0_command0_re; + if (builder_minsoc_csrbank2_dfii_pi0_address1_re) begin + main_sdram_phaseinjector0_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi0_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_address0_re) begin + main_sdram_phaseinjector0_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_address0_r; + end + main_sdram_phaseinjector0_address_re <= builder_minsoc_csrbank2_dfii_pi0_address0_re; + if (builder_minsoc_csrbank2_dfii_pi0_baddress0_re) begin + main_sdram_phaseinjector0_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi0_baddress0_r; + end + main_sdram_phaseinjector0_baddress_re <= builder_minsoc_csrbank2_dfii_pi0_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi0_wrdata3_re) begin + main_sdram_phaseinjector0_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_wrdata2_re) begin + main_sdram_phaseinjector0_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_wrdata1_re) begin + main_sdram_phaseinjector0_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_wrdata0_re) begin + main_sdram_phaseinjector0_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; + end + main_sdram_phaseinjector0_wrdata_re <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; + if (builder_minsoc_csrbank2_dfii_pi1_command0_re) begin + main_sdram_phaseinjector1_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi1_command0_r; + end + main_sdram_phaseinjector1_command_re <= builder_minsoc_csrbank2_dfii_pi1_command0_re; + if (builder_minsoc_csrbank2_dfii_pi1_address1_re) begin + main_sdram_phaseinjector1_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi1_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_address0_re) begin + main_sdram_phaseinjector1_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_address0_r; + end + main_sdram_phaseinjector1_address_re <= builder_minsoc_csrbank2_dfii_pi1_address0_re; + if (builder_minsoc_csrbank2_dfii_pi1_baddress0_re) begin + main_sdram_phaseinjector1_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi1_baddress0_r; + end + main_sdram_phaseinjector1_baddress_re <= builder_minsoc_csrbank2_dfii_pi1_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi1_wrdata3_re) begin + main_sdram_phaseinjector1_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_wrdata2_re) begin + main_sdram_phaseinjector1_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_wrdata1_re) begin + main_sdram_phaseinjector1_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_wrdata0_re) begin + main_sdram_phaseinjector1_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; + end + main_sdram_phaseinjector1_wrdata_re <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; + if (builder_minsoc_csrbank2_dfii_pi2_command0_re) begin + main_sdram_phaseinjector2_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi2_command0_r; + end + main_sdram_phaseinjector2_command_re <= builder_minsoc_csrbank2_dfii_pi2_command0_re; + if (builder_minsoc_csrbank2_dfii_pi2_address1_re) begin + main_sdram_phaseinjector2_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi2_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_address0_re) begin + main_sdram_phaseinjector2_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_address0_r; + end + main_sdram_phaseinjector2_address_re <= builder_minsoc_csrbank2_dfii_pi2_address0_re; + if (builder_minsoc_csrbank2_dfii_pi2_baddress0_re) begin + main_sdram_phaseinjector2_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi2_baddress0_r; + end + main_sdram_phaseinjector2_baddress_re <= builder_minsoc_csrbank2_dfii_pi2_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi2_wrdata3_re) begin + main_sdram_phaseinjector2_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_wrdata2_re) begin + main_sdram_phaseinjector2_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_wrdata1_re) begin + main_sdram_phaseinjector2_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_wrdata0_re) begin + main_sdram_phaseinjector2_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; + end + main_sdram_phaseinjector2_wrdata_re <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; + if (builder_minsoc_csrbank2_dfii_pi3_command0_re) begin + main_sdram_phaseinjector3_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi3_command0_r; + end + main_sdram_phaseinjector3_command_re <= builder_minsoc_csrbank2_dfii_pi3_command0_re; + if (builder_minsoc_csrbank2_dfii_pi3_address1_re) begin + main_sdram_phaseinjector3_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi3_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_address0_re) begin + main_sdram_phaseinjector3_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_address0_r; + end + main_sdram_phaseinjector3_address_re <= builder_minsoc_csrbank2_dfii_pi3_address0_re; + if (builder_minsoc_csrbank2_dfii_pi3_baddress0_re) begin + main_sdram_phaseinjector3_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi3_baddress0_r; + end + main_sdram_phaseinjector3_baddress_re <= builder_minsoc_csrbank2_dfii_pi3_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi3_wrdata3_re) begin + main_sdram_phaseinjector3_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_wrdata2_re) begin + main_sdram_phaseinjector3_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_wrdata1_re) begin + main_sdram_phaseinjector3_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_wrdata0_re) begin + main_sdram_phaseinjector3_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; + end + main_sdram_phaseinjector3_wrdata_re <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; + builder_minsoc_interface3_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank3_sel) begin + case (builder_minsoc_interface3_bank_bus_adr[4:0]) + 1'd0: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load3_w; + end + 1'd1: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load2_w; + end + 2'd2: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load1_w; + end + 2'd3: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load0_w; + end + 3'd4: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload3_w; + end + 3'd5: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload2_w; + end + 3'd6: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload1_w; + end + 3'd7: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload0_w; + end + 4'd8: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_en0_w; + end + 4'd9: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_update_value0_w; + end + 4'd10: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value3_w; + end + 4'd11: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value2_w; + end + 4'd12: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value1_w; + end + 4'd13: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value0_w; + end + 4'd14: begin + builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_status_w; + end + 4'd15: begin + builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_pending_w; + end + 5'd16: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_ev_enable0_w; + end + endcase + end + if (builder_minsoc_csrbank3_load3_re) begin + main_minsoc_timer0_load_storage[31:24] <= builder_minsoc_csrbank3_load3_r; + end + if (builder_minsoc_csrbank3_load2_re) begin + main_minsoc_timer0_load_storage[23:16] <= builder_minsoc_csrbank3_load2_r; + end + if (builder_minsoc_csrbank3_load1_re) begin + main_minsoc_timer0_load_storage[15:8] <= builder_minsoc_csrbank3_load1_r; + end + if (builder_minsoc_csrbank3_load0_re) begin + main_minsoc_timer0_load_storage[7:0] <= builder_minsoc_csrbank3_load0_r; + end + main_minsoc_timer0_load_re <= builder_minsoc_csrbank3_load0_re; + if (builder_minsoc_csrbank3_reload3_re) begin + main_minsoc_timer0_reload_storage[31:24] <= builder_minsoc_csrbank3_reload3_r; + end + if (builder_minsoc_csrbank3_reload2_re) begin + main_minsoc_timer0_reload_storage[23:16] <= builder_minsoc_csrbank3_reload2_r; + end + if (builder_minsoc_csrbank3_reload1_re) begin + main_minsoc_timer0_reload_storage[15:8] <= builder_minsoc_csrbank3_reload1_r; + end + if (builder_minsoc_csrbank3_reload0_re) begin + main_minsoc_timer0_reload_storage[7:0] <= builder_minsoc_csrbank3_reload0_r; + end + main_minsoc_timer0_reload_re <= builder_minsoc_csrbank3_reload0_re; + if (builder_minsoc_csrbank3_en0_re) begin + main_minsoc_timer0_en_storage <= builder_minsoc_csrbank3_en0_r; + end + main_minsoc_timer0_en_re <= builder_minsoc_csrbank3_en0_re; + if (builder_minsoc_csrbank3_update_value0_re) begin + main_minsoc_timer0_update_value_storage <= builder_minsoc_csrbank3_update_value0_r; + end + main_minsoc_timer0_update_value_re <= builder_minsoc_csrbank3_update_value0_re; + if (builder_minsoc_csrbank3_ev_enable0_re) begin + main_minsoc_timer0_eventmanager_storage <= builder_minsoc_csrbank3_ev_enable0_r; + end + main_minsoc_timer0_eventmanager_re <= builder_minsoc_csrbank3_ev_enable0_re; + builder_minsoc_interface4_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank4_sel) begin + case (builder_minsoc_interface4_bank_bus_adr[2:0]) + 1'd0: begin + builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_rxtx_w; + end + 1'd1: begin + builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_txfull_w; + end + 2'd2: begin + builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_rxempty_w; + end + 2'd3: begin + builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_status_w; + end + 3'd4: begin + builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_pending_w; + end + 3'd5: begin + builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_ev_enable0_w; + end + endcase + end + if (builder_minsoc_csrbank4_ev_enable0_re) begin + main_minsoc_uart_eventmanager_storage[1:0] <= builder_minsoc_csrbank4_ev_enable0_r; + end + main_minsoc_uart_eventmanager_re <= builder_minsoc_csrbank4_ev_enable0_re; + builder_minsoc_interface5_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank5_sel) begin + case (builder_minsoc_interface5_bank_bus_adr[1:0]) + 1'd0: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word3_w; + end + 1'd1: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word2_w; + end + 2'd2: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word1_w; + end + 2'd3: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word0_w; + end + endcase + end + if (builder_minsoc_csrbank5_tuning_word3_re) begin + main_minsoc_storage[31:24] <= builder_minsoc_csrbank5_tuning_word3_r; + end + if (builder_minsoc_csrbank5_tuning_word2_re) begin + main_minsoc_storage[23:16] <= builder_minsoc_csrbank5_tuning_word2_r; + end + if (builder_minsoc_csrbank5_tuning_word1_re) begin + main_minsoc_storage[15:8] <= builder_minsoc_csrbank5_tuning_word1_r; + end + if (builder_minsoc_csrbank5_tuning_word0_re) begin + main_minsoc_storage[7:0] <= builder_minsoc_csrbank5_tuning_word0_r; + end + main_minsoc_re <= builder_minsoc_csrbank5_tuning_word0_re; + if (sys_rst) begin + main_minsoc_ctrl_reset_storage <= 1'd0; + main_minsoc_ctrl_reset_re <= 1'd0; + main_minsoc_ctrl_scratch_storage <= 32'd305419896; + main_minsoc_ctrl_scratch_re <= 1'd0; + main_minsoc_ctrl_bus_errors <= 32'd0; + main_minsoc_rom_bus_ack <= 1'd0; + main_minsoc_sram_bus_ack <= 1'd0; + serial_tx <= 1'd1; + main_minsoc_storage <= 32'd8246337; + main_minsoc_re <= 1'd0; + main_minsoc_sink_ready <= 1'd0; + main_minsoc_uart_clk_txen <= 1'd0; + main_minsoc_phase_accumulator_tx <= 32'd0; + main_minsoc_tx_reg <= 8'd0; + main_minsoc_tx_bitcount <= 4'd0; + main_minsoc_tx_busy <= 1'd0; + main_minsoc_source_valid <= 1'd0; + main_minsoc_source_payload_data <= 8'd0; + main_minsoc_uart_clk_rxen <= 1'd0; + main_minsoc_phase_accumulator_rx <= 32'd0; + main_minsoc_rx_r <= 1'd0; + main_minsoc_rx_reg <= 8'd0; + main_minsoc_rx_bitcount <= 4'd0; + main_minsoc_rx_busy <= 1'd0; + main_minsoc_uart_tx_pending <= 1'd0; + main_minsoc_uart_tx_old_trigger <= 1'd0; + main_minsoc_uart_rx_pending <= 1'd0; + main_minsoc_uart_rx_old_trigger <= 1'd0; + main_minsoc_uart_eventmanager_storage <= 2'd0; + main_minsoc_uart_eventmanager_re <= 1'd0; + main_minsoc_uart_tx_fifo_readable <= 1'd0; + main_minsoc_uart_tx_fifo_level0 <= 5'd0; + main_minsoc_uart_tx_fifo_produce <= 4'd0; + main_minsoc_uart_tx_fifo_consume <= 4'd0; + main_minsoc_uart_rx_fifo_readable <= 1'd0; + main_minsoc_uart_rx_fifo_level0 <= 5'd0; + main_minsoc_uart_rx_fifo_produce <= 4'd0; + main_minsoc_uart_rx_fifo_consume <= 4'd0; + main_minsoc_timer0_load_storage <= 32'd0; + main_minsoc_timer0_load_re <= 1'd0; + main_minsoc_timer0_reload_storage <= 32'd0; + main_minsoc_timer0_reload_re <= 1'd0; + main_minsoc_timer0_en_storage <= 1'd0; + main_minsoc_timer0_en_re <= 1'd0; + main_minsoc_timer0_update_value_storage <= 1'd0; + main_minsoc_timer0_update_value_re <= 1'd0; + main_minsoc_timer0_value_status <= 32'd0; + main_minsoc_timer0_zero_pending <= 1'd0; + main_minsoc_timer0_zero_old_trigger <= 1'd0; + main_minsoc_timer0_eventmanager_storage <= 1'd0; + main_minsoc_timer0_eventmanager_re <= 1'd0; + main_minsoc_timer0_value <= 32'd0; + main_a7ddrphy_half_sys8x_taps_storage <= 5'd13; + main_a7ddrphy_half_sys8x_taps_re <= 1'd0; + main_a7ddrphy_dly_sel_storage <= 2'd0; + main_a7ddrphy_dly_sel_re <= 1'd0; + main_a7ddrphy_dfi_p0_rddata_valid <= 1'd0; + main_a7ddrphy_dfi_p1_rddata_valid <= 1'd0; + main_a7ddrphy_dfi_p2_rddata_valid <= 1'd0; + main_a7ddrphy_dfi_p3_rddata_valid <= 1'd0; + main_a7ddrphy_oe_dqs <= 1'd0; + main_a7ddrphy_oe_dq <= 1'd0; + main_a7ddrphy_bitslip0_o <= 8'd0; + main_a7ddrphy_bitslip0_value <= 3'd0; + main_a7ddrphy_bitslip0_r <= 16'd0; + main_a7ddrphy_bitslip1_o <= 8'd0; + main_a7ddrphy_bitslip1_value <= 3'd0; + main_a7ddrphy_bitslip1_r <= 16'd0; + main_a7ddrphy_bitslip2_o <= 8'd0; + main_a7ddrphy_bitslip2_value <= 3'd0; + main_a7ddrphy_bitslip2_r <= 16'd0; + main_a7ddrphy_bitslip3_o <= 8'd0; + main_a7ddrphy_bitslip3_value <= 3'd0; + main_a7ddrphy_bitslip3_r <= 16'd0; + main_a7ddrphy_bitslip4_o <= 8'd0; + main_a7ddrphy_bitslip4_value <= 3'd0; + main_a7ddrphy_bitslip4_r <= 16'd0; + main_a7ddrphy_bitslip5_o <= 8'd0; + main_a7ddrphy_bitslip5_value <= 3'd0; + main_a7ddrphy_bitslip5_r <= 16'd0; + main_a7ddrphy_bitslip6_o <= 8'd0; + main_a7ddrphy_bitslip6_value <= 3'd0; + main_a7ddrphy_bitslip6_r <= 16'd0; + main_a7ddrphy_bitslip7_o <= 8'd0; + main_a7ddrphy_bitslip7_value <= 3'd0; + main_a7ddrphy_bitslip7_r <= 16'd0; + main_a7ddrphy_bitslip8_o <= 8'd0; + main_a7ddrphy_bitslip8_value <= 3'd0; + main_a7ddrphy_bitslip8_r <= 16'd0; + main_a7ddrphy_bitslip9_o <= 8'd0; + main_a7ddrphy_bitslip9_value <= 3'd0; + main_a7ddrphy_bitslip9_r <= 16'd0; + main_a7ddrphy_bitslip10_o <= 8'd0; + main_a7ddrphy_bitslip10_value <= 3'd0; + main_a7ddrphy_bitslip10_r <= 16'd0; + main_a7ddrphy_bitslip11_o <= 8'd0; + main_a7ddrphy_bitslip11_value <= 3'd0; + main_a7ddrphy_bitslip11_r <= 16'd0; + main_a7ddrphy_bitslip12_o <= 8'd0; + main_a7ddrphy_bitslip12_value <= 3'd0; + main_a7ddrphy_bitslip12_r <= 16'd0; + main_a7ddrphy_bitslip13_o <= 8'd0; + main_a7ddrphy_bitslip13_value <= 3'd0; + main_a7ddrphy_bitslip13_r <= 16'd0; + main_a7ddrphy_bitslip14_o <= 8'd0; + main_a7ddrphy_bitslip14_value <= 3'd0; + main_a7ddrphy_bitslip14_r <= 16'd0; + main_a7ddrphy_bitslip15_o <= 8'd0; + main_a7ddrphy_bitslip15_value <= 3'd0; + main_a7ddrphy_bitslip15_r <= 16'd0; + main_a7ddrphy_n_rddata_en0 <= 1'd0; + main_a7ddrphy_n_rddata_en1 <= 1'd0; + main_a7ddrphy_n_rddata_en2 <= 1'd0; + main_a7ddrphy_n_rddata_en3 <= 1'd0; + main_a7ddrphy_n_rddata_en4 <= 1'd0; + main_a7ddrphy_n_rddata_en5 <= 1'd0; + main_a7ddrphy_n_rddata_en6 <= 1'd0; + main_a7ddrphy_n_rddata_en7 <= 1'd0; + main_a7ddrphy_last_wrdata_en <= 4'd0; + main_sdram_storage <= 4'd0; + main_sdram_re <= 1'd0; + main_sdram_phaseinjector0_command_storage <= 6'd0; + main_sdram_phaseinjector0_command_re <= 1'd0; + main_sdram_phaseinjector0_address_storage <= 14'd0; + main_sdram_phaseinjector0_address_re <= 1'd0; + main_sdram_phaseinjector0_baddress_storage <= 3'd0; + main_sdram_phaseinjector0_baddress_re <= 1'd0; + main_sdram_phaseinjector0_wrdata_storage <= 32'd0; + main_sdram_phaseinjector0_wrdata_re <= 1'd0; + main_sdram_phaseinjector0_status <= 32'd0; + main_sdram_phaseinjector1_command_storage <= 6'd0; + main_sdram_phaseinjector1_command_re <= 1'd0; + main_sdram_phaseinjector1_address_storage <= 14'd0; + main_sdram_phaseinjector1_address_re <= 1'd0; + main_sdram_phaseinjector1_baddress_storage <= 3'd0; + main_sdram_phaseinjector1_baddress_re <= 1'd0; + main_sdram_phaseinjector1_wrdata_storage <= 32'd0; + main_sdram_phaseinjector1_wrdata_re <= 1'd0; + main_sdram_phaseinjector1_status <= 32'd0; + main_sdram_phaseinjector2_command_storage <= 6'd0; + main_sdram_phaseinjector2_command_re <= 1'd0; + main_sdram_phaseinjector2_address_storage <= 14'd0; + main_sdram_phaseinjector2_address_re <= 1'd0; + main_sdram_phaseinjector2_baddress_storage <= 3'd0; + main_sdram_phaseinjector2_baddress_re <= 1'd0; + main_sdram_phaseinjector2_wrdata_storage <= 32'd0; + main_sdram_phaseinjector2_wrdata_re <= 1'd0; + main_sdram_phaseinjector2_status <= 32'd0; + main_sdram_phaseinjector3_command_storage <= 6'd0; + main_sdram_phaseinjector3_command_re <= 1'd0; + main_sdram_phaseinjector3_address_storage <= 14'd0; + main_sdram_phaseinjector3_address_re <= 1'd0; + main_sdram_phaseinjector3_baddress_storage <= 3'd0; + main_sdram_phaseinjector3_baddress_re <= 1'd0; + main_sdram_phaseinjector3_wrdata_storage <= 32'd0; + main_sdram_phaseinjector3_wrdata_re <= 1'd0; + main_sdram_phaseinjector3_status <= 32'd0; + main_sdram_dfi_p0_address <= 14'd0; + main_sdram_dfi_p0_bank <= 3'd0; + main_sdram_dfi_p0_cas_n <= 1'd1; + main_sdram_dfi_p0_cs_n <= 1'd1; + main_sdram_dfi_p0_ras_n <= 1'd1; + main_sdram_dfi_p0_we_n <= 1'd1; + main_sdram_dfi_p0_wrdata_en <= 1'd0; + main_sdram_dfi_p0_rddata_en <= 1'd0; + main_sdram_dfi_p1_address <= 14'd0; + main_sdram_dfi_p1_bank <= 3'd0; + main_sdram_dfi_p1_cas_n <= 1'd1; + main_sdram_dfi_p1_cs_n <= 1'd1; + main_sdram_dfi_p1_ras_n <= 1'd1; + main_sdram_dfi_p1_we_n <= 1'd1; + main_sdram_dfi_p1_wrdata_en <= 1'd0; + main_sdram_dfi_p1_rddata_en <= 1'd0; + main_sdram_dfi_p2_address <= 14'd0; + main_sdram_dfi_p2_bank <= 3'd0; + main_sdram_dfi_p2_cas_n <= 1'd1; + main_sdram_dfi_p2_cs_n <= 1'd1; + main_sdram_dfi_p2_ras_n <= 1'd1; + main_sdram_dfi_p2_we_n <= 1'd1; + main_sdram_dfi_p2_wrdata_en <= 1'd0; + main_sdram_dfi_p2_rddata_en <= 1'd0; + main_sdram_dfi_p3_address <= 14'd0; + main_sdram_dfi_p3_bank <= 3'd0; + main_sdram_dfi_p3_cas_n <= 1'd1; + main_sdram_dfi_p3_cs_n <= 1'd1; + main_sdram_dfi_p3_ras_n <= 1'd1; + main_sdram_dfi_p3_we_n <= 1'd1; + main_sdram_dfi_p3_wrdata_en <= 1'd0; + main_sdram_dfi_p3_rddata_en <= 1'd0; + main_sdram_cmd_payload_a <= 14'd0; + main_sdram_cmd_payload_ba <= 3'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_timer_count1 <= 9'd468; + main_sdram_postponer_req_o <= 1'd0; + main_sdram_postponer_count <= 1'd0; + main_sdram_sequencer_done1 <= 1'd0; + main_sdram_sequencer_counter <= 6'd0; + main_sdram_sequencer_count <= 1'd0; + main_sdram_zqcs_timer_count1 <= 26'd59999999; + main_sdram_zqcs_executer_done <= 1'd0; + main_sdram_zqcs_executer_counter <= 5'd0; + main_sdram_bankmachine0_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine0_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine0_row <= 14'd0; + main_sdram_bankmachine0_row_opened <= 1'd0; + main_sdram_bankmachine0_twtpcon_ready <= 1'd1; + main_sdram_bankmachine0_twtpcon_count <= 3'd0; + main_sdram_bankmachine0_trccon_ready <= 1'd1; + main_sdram_bankmachine0_trccon_count <= 2'd0; + main_sdram_bankmachine0_trascon_ready <= 1'd1; + main_sdram_bankmachine0_trascon_count <= 2'd0; + main_sdram_bankmachine1_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine1_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine1_row <= 14'd0; + main_sdram_bankmachine1_row_opened <= 1'd0; + main_sdram_bankmachine1_twtpcon_ready <= 1'd1; + main_sdram_bankmachine1_twtpcon_count <= 3'd0; + main_sdram_bankmachine1_trccon_ready <= 1'd1; + main_sdram_bankmachine1_trccon_count <= 2'd0; + main_sdram_bankmachine1_trascon_ready <= 1'd1; + main_sdram_bankmachine1_trascon_count <= 2'd0; + main_sdram_bankmachine2_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine2_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine2_row <= 14'd0; + main_sdram_bankmachine2_row_opened <= 1'd0; + main_sdram_bankmachine2_twtpcon_ready <= 1'd1; + main_sdram_bankmachine2_twtpcon_count <= 3'd0; + main_sdram_bankmachine2_trccon_ready <= 1'd1; + main_sdram_bankmachine2_trccon_count <= 2'd0; + main_sdram_bankmachine2_trascon_ready <= 1'd1; + main_sdram_bankmachine2_trascon_count <= 2'd0; + main_sdram_bankmachine3_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine3_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine3_row <= 14'd0; + main_sdram_bankmachine3_row_opened <= 1'd0; + main_sdram_bankmachine3_twtpcon_ready <= 1'd1; + main_sdram_bankmachine3_twtpcon_count <= 3'd0; + main_sdram_bankmachine3_trccon_ready <= 1'd1; + main_sdram_bankmachine3_trccon_count <= 2'd0; + main_sdram_bankmachine3_trascon_ready <= 1'd1; + main_sdram_bankmachine3_trascon_count <= 2'd0; + main_sdram_bankmachine4_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine4_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine4_row <= 14'd0; + main_sdram_bankmachine4_row_opened <= 1'd0; + main_sdram_bankmachine4_twtpcon_ready <= 1'd1; + main_sdram_bankmachine4_twtpcon_count <= 3'd0; + main_sdram_bankmachine4_trccon_ready <= 1'd1; + main_sdram_bankmachine4_trccon_count <= 2'd0; + main_sdram_bankmachine4_trascon_ready <= 1'd1; + main_sdram_bankmachine4_trascon_count <= 2'd0; + main_sdram_bankmachine5_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine5_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine5_row <= 14'd0; + main_sdram_bankmachine5_row_opened <= 1'd0; + main_sdram_bankmachine5_twtpcon_ready <= 1'd1; + main_sdram_bankmachine5_twtpcon_count <= 3'd0; + main_sdram_bankmachine5_trccon_ready <= 1'd1; + main_sdram_bankmachine5_trccon_count <= 2'd0; + main_sdram_bankmachine5_trascon_ready <= 1'd1; + main_sdram_bankmachine5_trascon_count <= 2'd0; + main_sdram_bankmachine6_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine6_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine6_row <= 14'd0; + main_sdram_bankmachine6_row_opened <= 1'd0; + main_sdram_bankmachine6_twtpcon_ready <= 1'd1; + main_sdram_bankmachine6_twtpcon_count <= 3'd0; + main_sdram_bankmachine6_trccon_ready <= 1'd1; + main_sdram_bankmachine6_trccon_count <= 2'd0; + main_sdram_bankmachine6_trascon_ready <= 1'd1; + main_sdram_bankmachine6_trascon_count <= 2'd0; + main_sdram_bankmachine7_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine7_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine7_row <= 14'd0; + main_sdram_bankmachine7_row_opened <= 1'd0; + main_sdram_bankmachine7_twtpcon_ready <= 1'd1; + main_sdram_bankmachine7_twtpcon_count <= 3'd0; + main_sdram_bankmachine7_trccon_ready <= 1'd1; + main_sdram_bankmachine7_trccon_count <= 2'd0; + main_sdram_bankmachine7_trascon_ready <= 1'd1; + main_sdram_bankmachine7_trascon_count <= 2'd0; + main_sdram_choose_cmd_grant <= 3'd0; + main_sdram_choose_req_grant <= 3'd0; + main_sdram_trrdcon_ready <= 1'd1; + main_sdram_trrdcon_count <= 1'd0; + main_sdram_tfawcon_ready <= 1'd1; + main_sdram_tfawcon_window <= 4'd0; + main_sdram_tccdcon_ready <= 1'd1; + main_sdram_tccdcon_count <= 1'd0; + main_sdram_twtrcon_ready <= 1'd1; + main_sdram_twtrcon_count <= 3'd0; + main_sdram_time0 <= 5'd0; + main_sdram_time1 <= 4'd0; + main_adr_offset_r <= 2'd0; + main_count <= 1'd0; + builder_wb2csr_state <= 1'd0; + builder_refresher_state <= 2'd0; + builder_bankmachine0_state <= 3'd0; + builder_bankmachine1_state <= 3'd0; + builder_bankmachine2_state <= 3'd0; + builder_bankmachine3_state <= 3'd0; + builder_bankmachine4_state <= 3'd0; + builder_bankmachine5_state <= 3'd0; + builder_bankmachine6_state <= 3'd0; + builder_bankmachine7_state <= 3'd0; + builder_multiplexer_state <= 4'd0; + builder_rbank <= 3'd0; + builder_wbank <= 3'd0; + builder_new_master_wdata_ready0 <= 1'd0; + builder_new_master_wdata_ready1 <= 1'd0; + builder_new_master_wdata_ready2 <= 1'd0; + builder_new_master_rdata_valid0 <= 1'd0; + builder_new_master_rdata_valid1 <= 1'd0; + builder_new_master_rdata_valid2 <= 1'd0; + builder_new_master_rdata_valid3 <= 1'd0; + builder_new_master_rdata_valid4 <= 1'd0; + builder_new_master_rdata_valid5 <= 1'd0; + builder_new_master_rdata_valid6 <= 1'd0; + builder_new_master_rdata_valid7 <= 1'd0; + builder_new_master_rdata_valid8 <= 1'd0; + builder_new_master_rdata_valid9 <= 1'd0; + builder_fullmemorywe_state <= 2'd0; + builder_litedramwishbone2native_state <= 2'd0; + builder_minsoc_grant <= 1'd0; + builder_minsoc_slave_sel_r <= 4'd0; + builder_minsoc_count <= 20'd1000000; + builder_minsoc_interface0_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface1_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface2_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface3_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface4_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface5_bank_bus_dat_r <= 8'd0; + end + builder_regs0 <= serial_rx; + builder_regs1 <= builder_regs0; +end + +reg [31:0] mem[0:8191]; +reg [31:0] memdat; +always @(posedge sys_clk) begin + memdat <= mem[main_minsoc_rom_adr]; +end + +assign main_minsoc_rom_dat_r = memdat; + +initial begin + $readmemh("mem.init", mem); +end + +reg [31:0] mem_1[0:1023]; +reg [9:0] memadr; +always @(posedge sys_clk) begin + if (main_minsoc_sram_we[0]) + mem_1[main_minsoc_sram_adr][7:0] <= main_minsoc_sram_dat_w[7:0]; + if (main_minsoc_sram_we[1]) + mem_1[main_minsoc_sram_adr][15:8] <= main_minsoc_sram_dat_w[15:8]; + if (main_minsoc_sram_we[2]) + mem_1[main_minsoc_sram_adr][23:16] <= main_minsoc_sram_dat_w[23:16]; + if (main_minsoc_sram_we[3]) + mem_1[main_minsoc_sram_adr][31:24] <= main_minsoc_sram_dat_w[31:24]; + memadr <= main_minsoc_sram_adr; +end + +assign main_minsoc_sram_dat_r = mem_1[memadr]; + +initial begin + $readmemh("mem_1.init", mem_1); +end + +reg [9:0] storage[0:15]; +reg [9:0] memdat_1; +reg [9:0] memdat_2; +always @(posedge sys_clk) begin + if (main_minsoc_uart_tx_fifo_wrport_we) + storage[main_minsoc_uart_tx_fifo_wrport_adr] <= main_minsoc_uart_tx_fifo_wrport_dat_w; + memdat_1 <= storage[main_minsoc_uart_tx_fifo_wrport_adr]; +end + +always @(posedge sys_clk) begin + if (main_minsoc_uart_tx_fifo_rdport_re) + memdat_2 <= storage[main_minsoc_uart_tx_fifo_rdport_adr]; +end + +assign main_minsoc_uart_tx_fifo_wrport_dat_r = memdat_1; +assign main_minsoc_uart_tx_fifo_rdport_dat_r = memdat_2; + +reg [9:0] storage_1[0:15]; +reg [9:0] memdat_3; +reg [9:0] memdat_4; +always @(posedge sys_clk) begin + if (main_minsoc_uart_rx_fifo_wrport_we) + storage_1[main_minsoc_uart_rx_fifo_wrport_adr] <= main_minsoc_uart_rx_fifo_wrport_dat_w; + memdat_3 <= storage_1[main_minsoc_uart_rx_fifo_wrport_adr]; +end + +always @(posedge sys_clk) begin + if (main_minsoc_uart_rx_fifo_rdport_re) + memdat_4 <= storage_1[main_minsoc_uart_rx_fifo_rdport_adr]; +end + +assign main_minsoc_uart_rx_fifo_wrport_dat_r = memdat_3; +assign main_minsoc_uart_rx_fifo_rdport_dat_r = memdat_4; + +wire clk100_ibuf; +IBUF clkbuf(.I(clk100), .O(clk100_ibuf)); + +BUFG BUFG( + .I(clk100_ibuf), + .O(main_pll_clkin) +); + +BUFG BUFG_1( + .I(main_clkout0), + .O(sys_clk) +); + +BUFG BUFG_2( + .I(main_clkout1), + .O(sys4x_clk) +); + +BUFG BUFG_3( + .I(main_clkout2), + .O(sys4x_dqs_clk) +); + +BUFG BUFG_4( + .I(main_clkout3), + .O(clk200_clk) +); + +(* LOC="IDELAYCTRL_X1Y0" *) +IDELAYCTRL IDELAYCTRL( + .REFCLK(clk200_clk), + .RST(main_ic_reset), + .RDY(idelayctl_rdy) +); + +wire tq; + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(1'd0), + .D2(1'd1), + .D3(1'd0), + .D4(1'd1), + .D5(1'd0), + .D6(1'd1), + .D7(1'd0), + .D8(1'd1), + .OCE(1'd1), + .RST(sys_rst), + .OQ(main_a7ddrphy_sd_clk_se_nodelay), + .TQ(tq), + .TCE(1'b1), + .T1(1'b0) +); + +OBUFTDS OBUFTDS_2( + .I(main_a7ddrphy_sd_clk_se_nodelay), + .O(ddram_clk_p), + .OB(ddram_clk_n), + .T(tq) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_1 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[0]), + .D2(main_a7ddrphy_dfi_p0_address[0]), + .D3(main_a7ddrphy_dfi_p1_address[0]), + .D4(main_a7ddrphy_dfi_p1_address[0]), + .D5(main_a7ddrphy_dfi_p2_address[0]), + .D6(main_a7ddrphy_dfi_p2_address[0]), + .D7(main_a7ddrphy_dfi_p3_address[0]), + .D8(main_a7ddrphy_dfi_p3_address[0]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[0]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_2 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[1]), + .D2(main_a7ddrphy_dfi_p0_address[1]), + .D3(main_a7ddrphy_dfi_p1_address[1]), + .D4(main_a7ddrphy_dfi_p1_address[1]), + .D5(main_a7ddrphy_dfi_p2_address[1]), + .D6(main_a7ddrphy_dfi_p2_address[1]), + .D7(main_a7ddrphy_dfi_p3_address[1]), + .D8(main_a7ddrphy_dfi_p3_address[1]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[1]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_3 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[2]), + .D2(main_a7ddrphy_dfi_p0_address[2]), + .D3(main_a7ddrphy_dfi_p1_address[2]), + .D4(main_a7ddrphy_dfi_p1_address[2]), + .D5(main_a7ddrphy_dfi_p2_address[2]), + .D6(main_a7ddrphy_dfi_p2_address[2]), + .D7(main_a7ddrphy_dfi_p3_address[2]), + .D8(main_a7ddrphy_dfi_p3_address[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[2]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_4 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[3]), + .D2(main_a7ddrphy_dfi_p0_address[3]), + .D3(main_a7ddrphy_dfi_p1_address[3]), + .D4(main_a7ddrphy_dfi_p1_address[3]), + .D5(main_a7ddrphy_dfi_p2_address[3]), + .D6(main_a7ddrphy_dfi_p2_address[3]), + .D7(main_a7ddrphy_dfi_p3_address[3]), + .D8(main_a7ddrphy_dfi_p3_address[3]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[3]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_5 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[4]), + .D2(main_a7ddrphy_dfi_p0_address[4]), + .D3(main_a7ddrphy_dfi_p1_address[4]), + .D4(main_a7ddrphy_dfi_p1_address[4]), + .D5(main_a7ddrphy_dfi_p2_address[4]), + .D6(main_a7ddrphy_dfi_p2_address[4]), + .D7(main_a7ddrphy_dfi_p3_address[4]), + .D8(main_a7ddrphy_dfi_p3_address[4]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[4]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_6 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[5]), + .D2(main_a7ddrphy_dfi_p0_address[5]), + .D3(main_a7ddrphy_dfi_p1_address[5]), + .D4(main_a7ddrphy_dfi_p1_address[5]), + .D5(main_a7ddrphy_dfi_p2_address[5]), + .D6(main_a7ddrphy_dfi_p2_address[5]), + .D7(main_a7ddrphy_dfi_p3_address[5]), + .D8(main_a7ddrphy_dfi_p3_address[5]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[5]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_7 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[6]), + .D2(main_a7ddrphy_dfi_p0_address[6]), + .D3(main_a7ddrphy_dfi_p1_address[6]), + .D4(main_a7ddrphy_dfi_p1_address[6]), + .D5(main_a7ddrphy_dfi_p2_address[6]), + .D6(main_a7ddrphy_dfi_p2_address[6]), + .D7(main_a7ddrphy_dfi_p3_address[6]), + .D8(main_a7ddrphy_dfi_p3_address[6]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[6]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_8 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[7]), + .D2(main_a7ddrphy_dfi_p0_address[7]), + .D3(main_a7ddrphy_dfi_p1_address[7]), + .D4(main_a7ddrphy_dfi_p1_address[7]), + .D5(main_a7ddrphy_dfi_p2_address[7]), + .D6(main_a7ddrphy_dfi_p2_address[7]), + .D7(main_a7ddrphy_dfi_p3_address[7]), + .D8(main_a7ddrphy_dfi_p3_address[7]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[7]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_9 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[8]), + .D2(main_a7ddrphy_dfi_p0_address[8]), + .D3(main_a7ddrphy_dfi_p1_address[8]), + .D4(main_a7ddrphy_dfi_p1_address[8]), + .D5(main_a7ddrphy_dfi_p2_address[8]), + .D6(main_a7ddrphy_dfi_p2_address[8]), + .D7(main_a7ddrphy_dfi_p3_address[8]), + .D8(main_a7ddrphy_dfi_p3_address[8]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[8]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_10 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[9]), + .D2(main_a7ddrphy_dfi_p0_address[9]), + .D3(main_a7ddrphy_dfi_p1_address[9]), + .D4(main_a7ddrphy_dfi_p1_address[9]), + .D5(main_a7ddrphy_dfi_p2_address[9]), + .D6(main_a7ddrphy_dfi_p2_address[9]), + .D7(main_a7ddrphy_dfi_p3_address[9]), + .D8(main_a7ddrphy_dfi_p3_address[9]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[9]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_11 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[10]), + .D2(main_a7ddrphy_dfi_p0_address[10]), + .D3(main_a7ddrphy_dfi_p1_address[10]), + .D4(main_a7ddrphy_dfi_p1_address[10]), + .D5(main_a7ddrphy_dfi_p2_address[10]), + .D6(main_a7ddrphy_dfi_p2_address[10]), + .D7(main_a7ddrphy_dfi_p3_address[10]), + .D8(main_a7ddrphy_dfi_p3_address[10]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[10]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_12 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[11]), + .D2(main_a7ddrphy_dfi_p0_address[11]), + .D3(main_a7ddrphy_dfi_p1_address[11]), + .D4(main_a7ddrphy_dfi_p1_address[11]), + .D5(main_a7ddrphy_dfi_p2_address[11]), + .D6(main_a7ddrphy_dfi_p2_address[11]), + .D7(main_a7ddrphy_dfi_p3_address[11]), + .D8(main_a7ddrphy_dfi_p3_address[11]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[11]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_13 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[12]), + .D2(main_a7ddrphy_dfi_p0_address[12]), + .D3(main_a7ddrphy_dfi_p1_address[12]), + .D4(main_a7ddrphy_dfi_p1_address[12]), + .D5(main_a7ddrphy_dfi_p2_address[12]), + .D6(main_a7ddrphy_dfi_p2_address[12]), + .D7(main_a7ddrphy_dfi_p3_address[12]), + .D8(main_a7ddrphy_dfi_p3_address[12]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[12]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_14 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[13]), + .D2(main_a7ddrphy_dfi_p0_address[13]), + .D3(main_a7ddrphy_dfi_p1_address[13]), + .D4(main_a7ddrphy_dfi_p1_address[13]), + .D5(main_a7ddrphy_dfi_p2_address[13]), + .D6(main_a7ddrphy_dfi_p2_address[13]), + .D7(main_a7ddrphy_dfi_p3_address[13]), + .D8(main_a7ddrphy_dfi_p3_address[13]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[13]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_15 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_bank[0]), + .D2(main_a7ddrphy_dfi_p0_bank[0]), + .D3(main_a7ddrphy_dfi_p1_bank[0]), + .D4(main_a7ddrphy_dfi_p1_bank[0]), + .D5(main_a7ddrphy_dfi_p2_bank[0]), + .D6(main_a7ddrphy_dfi_p2_bank[0]), + .D7(main_a7ddrphy_dfi_p3_bank[0]), + .D8(main_a7ddrphy_dfi_p3_bank[0]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba_iob[0]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_16 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_bank[1]), + .D2(main_a7ddrphy_dfi_p0_bank[1]), + .D3(main_a7ddrphy_dfi_p1_bank[1]), + .D4(main_a7ddrphy_dfi_p1_bank[1]), + .D5(main_a7ddrphy_dfi_p2_bank[1]), + .D6(main_a7ddrphy_dfi_p2_bank[1]), + .D7(main_a7ddrphy_dfi_p3_bank[1]), + .D8(main_a7ddrphy_dfi_p3_bank[1]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba_iob[1]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_17 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_bank[2]), + .D2(main_a7ddrphy_dfi_p0_bank[2]), + .D3(main_a7ddrphy_dfi_p1_bank[2]), + .D4(main_a7ddrphy_dfi_p1_bank[2]), + .D5(main_a7ddrphy_dfi_p2_bank[2]), + .D6(main_a7ddrphy_dfi_p2_bank[2]), + .D7(main_a7ddrphy_dfi_p3_bank[2]), + .D8(main_a7ddrphy_dfi_p3_bank[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba_iob[2]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_18 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_ras_n), + .D2(main_a7ddrphy_dfi_p0_ras_n), + .D3(main_a7ddrphy_dfi_p1_ras_n), + .D4(main_a7ddrphy_dfi_p1_ras_n), + .D5(main_a7ddrphy_dfi_p2_ras_n), + .D6(main_a7ddrphy_dfi_p2_ras_n), + .D7(main_a7ddrphy_dfi_p3_ras_n), + .D8(main_a7ddrphy_dfi_p3_ras_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ras_n_iob) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_19 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_cas_n), + .D2(main_a7ddrphy_dfi_p0_cas_n), + .D3(main_a7ddrphy_dfi_p1_cas_n), + .D4(main_a7ddrphy_dfi_p1_cas_n), + .D5(main_a7ddrphy_dfi_p2_cas_n), + .D6(main_a7ddrphy_dfi_p2_cas_n), + .D7(main_a7ddrphy_dfi_p3_cas_n), + .D8(main_a7ddrphy_dfi_p3_cas_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cas_n_iob) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_20 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_we_n), + .D2(main_a7ddrphy_dfi_p0_we_n), + .D3(main_a7ddrphy_dfi_p1_we_n), + .D4(main_a7ddrphy_dfi_p1_we_n), + .D5(main_a7ddrphy_dfi_p2_we_n), + .D6(main_a7ddrphy_dfi_p2_we_n), + .D7(main_a7ddrphy_dfi_p3_we_n), + .D8(main_a7ddrphy_dfi_p3_we_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_we_n_iob) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_21 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_cke), + .D2(main_a7ddrphy_dfi_p0_cke), + .D3(main_a7ddrphy_dfi_p1_cke), + .D4(main_a7ddrphy_dfi_p1_cke), + .D5(main_a7ddrphy_dfi_p2_cke), + .D6(main_a7ddrphy_dfi_p2_cke), + .D7(main_a7ddrphy_dfi_p3_cke), + .D8(main_a7ddrphy_dfi_p3_cke), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cke_iob) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_22 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_odt), + .D2(main_a7ddrphy_dfi_p0_odt), + .D3(main_a7ddrphy_dfi_p1_odt), + .D4(main_a7ddrphy_dfi_p1_odt), + .D5(main_a7ddrphy_dfi_p2_odt), + .D6(main_a7ddrphy_dfi_p2_odt), + .D7(main_a7ddrphy_dfi_p3_odt), + .D8(main_a7ddrphy_dfi_p3_odt), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_odt_iob) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_23 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_reset_n), + .D2(main_a7ddrphy_dfi_p0_reset_n), + .D3(main_a7ddrphy_dfi_p1_reset_n), + .D4(main_a7ddrphy_dfi_p1_reset_n), + .D5(main_a7ddrphy_dfi_p2_reset_n), + .D6(main_a7ddrphy_dfi_p2_reset_n), + .D7(main_a7ddrphy_dfi_p3_reset_n), + .D8(main_a7ddrphy_dfi_p3_reset_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_reset_n_iob) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_24 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_cs_n), + .D2(main_a7ddrphy_dfi_p0_cs_n), + .D3(main_a7ddrphy_dfi_p1_cs_n), + .D4(main_a7ddrphy_dfi_p1_cs_n), + .D5(main_a7ddrphy_dfi_p2_cs_n), + .D6(main_a7ddrphy_dfi_p2_cs_n), + .D7(main_a7ddrphy_dfi_p3_cs_n), + .D8(main_a7ddrphy_dfi_p3_cs_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cs_n_iob) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_25 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata_mask[0]), + .D2(main_a7ddrphy_dfi_p0_wrdata_mask[2]), + .D3(main_a7ddrphy_dfi_p1_wrdata_mask[0]), + .D4(main_a7ddrphy_dfi_p1_wrdata_mask[2]), + .D5(main_a7ddrphy_dfi_p2_wrdata_mask[0]), + .D6(main_a7ddrphy_dfi_p2_wrdata_mask[2]), + .D7(main_a7ddrphy_dfi_p3_wrdata_mask[0]), + .D8(main_a7ddrphy_dfi_p3_wrdata_mask[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_dm_iob[0]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_26 ( + .CLK(sys4x_dqs_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dqs_serdes_pattern[0]), + .D2(main_a7ddrphy_dqs_serdes_pattern[1]), + .D3(main_a7ddrphy_dqs_serdes_pattern[2]), + .D4(main_a7ddrphy_dqs_serdes_pattern[3]), + .D5(main_a7ddrphy_dqs_serdes_pattern[4]), + .D6(main_a7ddrphy_dqs_serdes_pattern[5]), + .D7(main_a7ddrphy_dqs_serdes_pattern[6]), + .D8(main_a7ddrphy_dqs_serdes_pattern[7]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dqs)), + .TCE(1'd1), + .OFB(main_a7ddrphy0), + .OQ(main_a7ddrphy_dqs_nodelay0), + .TQ(main_a7ddrphy_dqs_t0) +); + +OBUFTDS OBUFTDS( + .I(main_a7ddrphy_dqs_nodelay0), + .T(main_a7ddrphy_dqs_t0), + .O(ddram_dqs_p[0]), + .OB(ddram_dqs_n[0]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_27 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata_mask[1]), + .D2(main_a7ddrphy_dfi_p0_wrdata_mask[3]), + .D3(main_a7ddrphy_dfi_p1_wrdata_mask[1]), + .D4(main_a7ddrphy_dfi_p1_wrdata_mask[3]), + .D5(main_a7ddrphy_dfi_p2_wrdata_mask[1]), + .D6(main_a7ddrphy_dfi_p2_wrdata_mask[3]), + .D7(main_a7ddrphy_dfi_p3_wrdata_mask[1]), + .D8(main_a7ddrphy_dfi_p3_wrdata_mask[3]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_dm_iob[1]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_28 ( + .CLK(sys4x_dqs_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dqs_serdes_pattern[0]), + .D2(main_a7ddrphy_dqs_serdes_pattern[1]), + .D3(main_a7ddrphy_dqs_serdes_pattern[2]), + .D4(main_a7ddrphy_dqs_serdes_pattern[3]), + .D5(main_a7ddrphy_dqs_serdes_pattern[4]), + .D6(main_a7ddrphy_dqs_serdes_pattern[5]), + .D7(main_a7ddrphy_dqs_serdes_pattern[6]), + .D8(main_a7ddrphy_dqs_serdes_pattern[7]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dqs)), + .TCE(1'd1), + .OFB(main_a7ddrphy1), + .OQ(main_a7ddrphy_dqs_nodelay1), + .TQ(main_a7ddrphy_dqs_t1) +); + +OBUFTDS OBUFTDS_1( + .I(main_a7ddrphy_dqs_nodelay1), + .T(main_a7ddrphy_dqs_t1), + .O(ddram_dqs_p[1]), + .OB(ddram_dqs_n[1]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_29 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[0]), + .D2(main_a7ddrphy_dfi_p0_wrdata[16]), + .D3(main_a7ddrphy_dfi_p1_wrdata[0]), + .D4(main_a7ddrphy_dfi_p1_wrdata[16]), + .D5(main_a7ddrphy_dfi_p2_wrdata[0]), + .D6(main_a7ddrphy_dfi_p2_wrdata[16]), + .D7(main_a7ddrphy_dfi_p3_wrdata[0]), + .D8(main_a7ddrphy_dfi_p3_wrdata[16]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay0), + .TQ(main_a7ddrphy_dq_t0) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed0), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data0[7]), + .Q2(main_a7ddrphy_dq_i_data0[6]), + .Q3(main_a7ddrphy_dq_i_data0[5]), + .Q4(main_a7ddrphy_dq_i_data0[4]), + .Q5(main_a7ddrphy_dq_i_data0[3]), + .Q6(main_a7ddrphy_dq_i_data0[2]), + .Q7(main_a7ddrphy_dq_i_data0[1]), + .Q8(main_a7ddrphy_dq_i_data0[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay0), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed0) +); + +IOBUF IOBUF( + .I(main_a7ddrphy_dq_o_nodelay0), + .T(main_a7ddrphy_dq_t0), + .IO(ddram_dq[0]), + .O(main_a7ddrphy_dq_i_nodelay0) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_30 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[1]), + .D2(main_a7ddrphy_dfi_p0_wrdata[17]), + .D3(main_a7ddrphy_dfi_p1_wrdata[1]), + .D4(main_a7ddrphy_dfi_p1_wrdata[17]), + .D5(main_a7ddrphy_dfi_p2_wrdata[1]), + .D6(main_a7ddrphy_dfi_p2_wrdata[17]), + .D7(main_a7ddrphy_dfi_p3_wrdata[1]), + .D8(main_a7ddrphy_dfi_p3_wrdata[17]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay1), + .TQ(main_a7ddrphy_dq_t1) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_1 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed1), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data1[7]), + .Q2(main_a7ddrphy_dq_i_data1[6]), + .Q3(main_a7ddrphy_dq_i_data1[5]), + .Q4(main_a7ddrphy_dq_i_data1[4]), + .Q5(main_a7ddrphy_dq_i_data1[3]), + .Q6(main_a7ddrphy_dq_i_data1[2]), + .Q7(main_a7ddrphy_dq_i_data1[1]), + .Q8(main_a7ddrphy_dq_i_data1[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_1 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay1), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed1) +); + +IOBUF IOBUF_1( + .I(main_a7ddrphy_dq_o_nodelay1), + .T(main_a7ddrphy_dq_t1), + .IO(ddram_dq[1]), + .O(main_a7ddrphy_dq_i_nodelay1) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_31 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[2]), + .D2(main_a7ddrphy_dfi_p0_wrdata[18]), + .D3(main_a7ddrphy_dfi_p1_wrdata[2]), + .D4(main_a7ddrphy_dfi_p1_wrdata[18]), + .D5(main_a7ddrphy_dfi_p2_wrdata[2]), + .D6(main_a7ddrphy_dfi_p2_wrdata[18]), + .D7(main_a7ddrphy_dfi_p3_wrdata[2]), + .D8(main_a7ddrphy_dfi_p3_wrdata[18]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay2), + .TQ(main_a7ddrphy_dq_t2) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_2 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed2), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data2[7]), + .Q2(main_a7ddrphy_dq_i_data2[6]), + .Q3(main_a7ddrphy_dq_i_data2[5]), + .Q4(main_a7ddrphy_dq_i_data2[4]), + .Q5(main_a7ddrphy_dq_i_data2[3]), + .Q6(main_a7ddrphy_dq_i_data2[2]), + .Q7(main_a7ddrphy_dq_i_data2[1]), + .Q8(main_a7ddrphy_dq_i_data2[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_2 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay2), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed2) +); + +IOBUF IOBUF_2( + .I(main_a7ddrphy_dq_o_nodelay2), + .T(main_a7ddrphy_dq_t2), + .IO(ddram_dq[2]), + .O(main_a7ddrphy_dq_i_nodelay2) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_32 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[3]), + .D2(main_a7ddrphy_dfi_p0_wrdata[19]), + .D3(main_a7ddrphy_dfi_p1_wrdata[3]), + .D4(main_a7ddrphy_dfi_p1_wrdata[19]), + .D5(main_a7ddrphy_dfi_p2_wrdata[3]), + .D6(main_a7ddrphy_dfi_p2_wrdata[19]), + .D7(main_a7ddrphy_dfi_p3_wrdata[3]), + .D8(main_a7ddrphy_dfi_p3_wrdata[19]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay3), + .TQ(main_a7ddrphy_dq_t3) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_3 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed3), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data3[7]), + .Q2(main_a7ddrphy_dq_i_data3[6]), + .Q3(main_a7ddrphy_dq_i_data3[5]), + .Q4(main_a7ddrphy_dq_i_data3[4]), + .Q5(main_a7ddrphy_dq_i_data3[3]), + .Q6(main_a7ddrphy_dq_i_data3[2]), + .Q7(main_a7ddrphy_dq_i_data3[1]), + .Q8(main_a7ddrphy_dq_i_data3[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_3 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay3), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed3) +); + +IOBUF IOBUF_3( + .I(main_a7ddrphy_dq_o_nodelay3), + .T(main_a7ddrphy_dq_t3), + .IO(ddram_dq[3]), + .O(main_a7ddrphy_dq_i_nodelay3) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_33 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[4]), + .D2(main_a7ddrphy_dfi_p0_wrdata[20]), + .D3(main_a7ddrphy_dfi_p1_wrdata[4]), + .D4(main_a7ddrphy_dfi_p1_wrdata[20]), + .D5(main_a7ddrphy_dfi_p2_wrdata[4]), + .D6(main_a7ddrphy_dfi_p2_wrdata[20]), + .D7(main_a7ddrphy_dfi_p3_wrdata[4]), + .D8(main_a7ddrphy_dfi_p3_wrdata[20]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay4), + .TQ(main_a7ddrphy_dq_t4) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_4 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed4), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data4[7]), + .Q2(main_a7ddrphy_dq_i_data4[6]), + .Q3(main_a7ddrphy_dq_i_data4[5]), + .Q4(main_a7ddrphy_dq_i_data4[4]), + .Q5(main_a7ddrphy_dq_i_data4[3]), + .Q6(main_a7ddrphy_dq_i_data4[2]), + .Q7(main_a7ddrphy_dq_i_data4[1]), + .Q8(main_a7ddrphy_dq_i_data4[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_4 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay4), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed4) +); + +IOBUF IOBUF_4( + .I(main_a7ddrphy_dq_o_nodelay4), + .T(main_a7ddrphy_dq_t4), + .IO(ddram_dq[4]), + .O(main_a7ddrphy_dq_i_nodelay4) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_34 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[5]), + .D2(main_a7ddrphy_dfi_p0_wrdata[21]), + .D3(main_a7ddrphy_dfi_p1_wrdata[5]), + .D4(main_a7ddrphy_dfi_p1_wrdata[21]), + .D5(main_a7ddrphy_dfi_p2_wrdata[5]), + .D6(main_a7ddrphy_dfi_p2_wrdata[21]), + .D7(main_a7ddrphy_dfi_p3_wrdata[5]), + .D8(main_a7ddrphy_dfi_p3_wrdata[21]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay5), + .TQ(main_a7ddrphy_dq_t5) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_5 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed5), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data5[7]), + .Q2(main_a7ddrphy_dq_i_data5[6]), + .Q3(main_a7ddrphy_dq_i_data5[5]), + .Q4(main_a7ddrphy_dq_i_data5[4]), + .Q5(main_a7ddrphy_dq_i_data5[3]), + .Q6(main_a7ddrphy_dq_i_data5[2]), + .Q7(main_a7ddrphy_dq_i_data5[1]), + .Q8(main_a7ddrphy_dq_i_data5[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_5 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay5), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed5) +); + +IOBUF IOBUF_5( + .I(main_a7ddrphy_dq_o_nodelay5), + .T(main_a7ddrphy_dq_t5), + .IO(ddram_dq[5]), + .O(main_a7ddrphy_dq_i_nodelay5) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_35 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[6]), + .D2(main_a7ddrphy_dfi_p0_wrdata[22]), + .D3(main_a7ddrphy_dfi_p1_wrdata[6]), + .D4(main_a7ddrphy_dfi_p1_wrdata[22]), + .D5(main_a7ddrphy_dfi_p2_wrdata[6]), + .D6(main_a7ddrphy_dfi_p2_wrdata[22]), + .D7(main_a7ddrphy_dfi_p3_wrdata[6]), + .D8(main_a7ddrphy_dfi_p3_wrdata[22]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay6), + .TQ(main_a7ddrphy_dq_t6) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_6 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed6), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data6[7]), + .Q2(main_a7ddrphy_dq_i_data6[6]), + .Q3(main_a7ddrphy_dq_i_data6[5]), + .Q4(main_a7ddrphy_dq_i_data6[4]), + .Q5(main_a7ddrphy_dq_i_data6[3]), + .Q6(main_a7ddrphy_dq_i_data6[2]), + .Q7(main_a7ddrphy_dq_i_data6[1]), + .Q8(main_a7ddrphy_dq_i_data6[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_6 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay6), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed6) +); + +IOBUF IOBUF_6( + .I(main_a7ddrphy_dq_o_nodelay6), + .T(main_a7ddrphy_dq_t6), + .IO(ddram_dq[6]), + .O(main_a7ddrphy_dq_i_nodelay6) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_36 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[7]), + .D2(main_a7ddrphy_dfi_p0_wrdata[23]), + .D3(main_a7ddrphy_dfi_p1_wrdata[7]), + .D4(main_a7ddrphy_dfi_p1_wrdata[23]), + .D5(main_a7ddrphy_dfi_p2_wrdata[7]), + .D6(main_a7ddrphy_dfi_p2_wrdata[23]), + .D7(main_a7ddrphy_dfi_p3_wrdata[7]), + .D8(main_a7ddrphy_dfi_p3_wrdata[23]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay7), + .TQ(main_a7ddrphy_dq_t7) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_7 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed7), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data7[7]), + .Q2(main_a7ddrphy_dq_i_data7[6]), + .Q3(main_a7ddrphy_dq_i_data7[5]), + .Q4(main_a7ddrphy_dq_i_data7[4]), + .Q5(main_a7ddrphy_dq_i_data7[3]), + .Q6(main_a7ddrphy_dq_i_data7[2]), + .Q7(main_a7ddrphy_dq_i_data7[1]), + .Q8(main_a7ddrphy_dq_i_data7[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_7 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay7), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed7) +); + +IOBUF IOBUF_7( + .I(main_a7ddrphy_dq_o_nodelay7), + .T(main_a7ddrphy_dq_t7), + .IO(ddram_dq[7]), + .O(main_a7ddrphy_dq_i_nodelay7) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_37 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[8]), + .D2(main_a7ddrphy_dfi_p0_wrdata[24]), + .D3(main_a7ddrphy_dfi_p1_wrdata[8]), + .D4(main_a7ddrphy_dfi_p1_wrdata[24]), + .D5(main_a7ddrphy_dfi_p2_wrdata[8]), + .D6(main_a7ddrphy_dfi_p2_wrdata[24]), + .D7(main_a7ddrphy_dfi_p3_wrdata[8]), + .D8(main_a7ddrphy_dfi_p3_wrdata[24]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay8), + .TQ(main_a7ddrphy_dq_t8) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_8 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed8), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data8[7]), + .Q2(main_a7ddrphy_dq_i_data8[6]), + .Q3(main_a7ddrphy_dq_i_data8[5]), + .Q4(main_a7ddrphy_dq_i_data8[4]), + .Q5(main_a7ddrphy_dq_i_data8[3]), + .Q6(main_a7ddrphy_dq_i_data8[2]), + .Q7(main_a7ddrphy_dq_i_data8[1]), + .Q8(main_a7ddrphy_dq_i_data8[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_8 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay8), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed8) +); + +IOBUF IOBUF_8( + .I(main_a7ddrphy_dq_o_nodelay8), + .T(main_a7ddrphy_dq_t8), + .IO(ddram_dq[8]), + .O(main_a7ddrphy_dq_i_nodelay8) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_38 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[9]), + .D2(main_a7ddrphy_dfi_p0_wrdata[25]), + .D3(main_a7ddrphy_dfi_p1_wrdata[9]), + .D4(main_a7ddrphy_dfi_p1_wrdata[25]), + .D5(main_a7ddrphy_dfi_p2_wrdata[9]), + .D6(main_a7ddrphy_dfi_p2_wrdata[25]), + .D7(main_a7ddrphy_dfi_p3_wrdata[9]), + .D8(main_a7ddrphy_dfi_p3_wrdata[25]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay9), + .TQ(main_a7ddrphy_dq_t9) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_9 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed9), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data9[7]), + .Q2(main_a7ddrphy_dq_i_data9[6]), + .Q3(main_a7ddrphy_dq_i_data9[5]), + .Q4(main_a7ddrphy_dq_i_data9[4]), + .Q5(main_a7ddrphy_dq_i_data9[3]), + .Q6(main_a7ddrphy_dq_i_data9[2]), + .Q7(main_a7ddrphy_dq_i_data9[1]), + .Q8(main_a7ddrphy_dq_i_data9[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_9 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay9), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed9) +); + +IOBUF IOBUF_9( + .I(main_a7ddrphy_dq_o_nodelay9), + .T(main_a7ddrphy_dq_t9), + .IO(ddram_dq[9]), + .O(main_a7ddrphy_dq_i_nodelay9) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_39 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[10]), + .D2(main_a7ddrphy_dfi_p0_wrdata[26]), + .D3(main_a7ddrphy_dfi_p1_wrdata[10]), + .D4(main_a7ddrphy_dfi_p1_wrdata[26]), + .D5(main_a7ddrphy_dfi_p2_wrdata[10]), + .D6(main_a7ddrphy_dfi_p2_wrdata[26]), + .D7(main_a7ddrphy_dfi_p3_wrdata[10]), + .D8(main_a7ddrphy_dfi_p3_wrdata[26]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay10), + .TQ(main_a7ddrphy_dq_t10) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_10 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed10), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data10[7]), + .Q2(main_a7ddrphy_dq_i_data10[6]), + .Q3(main_a7ddrphy_dq_i_data10[5]), + .Q4(main_a7ddrphy_dq_i_data10[4]), + .Q5(main_a7ddrphy_dq_i_data10[3]), + .Q6(main_a7ddrphy_dq_i_data10[2]), + .Q7(main_a7ddrphy_dq_i_data10[1]), + .Q8(main_a7ddrphy_dq_i_data10[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_10 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay10), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed10) +); + +IOBUF IOBUF_10( + .I(main_a7ddrphy_dq_o_nodelay10), + .T(main_a7ddrphy_dq_t10), + .IO(ddram_dq[10]), + .O(main_a7ddrphy_dq_i_nodelay10) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_40 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[11]), + .D2(main_a7ddrphy_dfi_p0_wrdata[27]), + .D3(main_a7ddrphy_dfi_p1_wrdata[11]), + .D4(main_a7ddrphy_dfi_p1_wrdata[27]), + .D5(main_a7ddrphy_dfi_p2_wrdata[11]), + .D6(main_a7ddrphy_dfi_p2_wrdata[27]), + .D7(main_a7ddrphy_dfi_p3_wrdata[11]), + .D8(main_a7ddrphy_dfi_p3_wrdata[27]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay11), + .TQ(main_a7ddrphy_dq_t11) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_11 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed11), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data11[7]), + .Q2(main_a7ddrphy_dq_i_data11[6]), + .Q3(main_a7ddrphy_dq_i_data11[5]), + .Q4(main_a7ddrphy_dq_i_data11[4]), + .Q5(main_a7ddrphy_dq_i_data11[3]), + .Q6(main_a7ddrphy_dq_i_data11[2]), + .Q7(main_a7ddrphy_dq_i_data11[1]), + .Q8(main_a7ddrphy_dq_i_data11[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_11 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay11), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed11) +); + +IOBUF IOBUF_11( + .I(main_a7ddrphy_dq_o_nodelay11), + .T(main_a7ddrphy_dq_t11), + .IO(ddram_dq[11]), + .O(main_a7ddrphy_dq_i_nodelay11) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_41 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[12]), + .D2(main_a7ddrphy_dfi_p0_wrdata[28]), + .D3(main_a7ddrphy_dfi_p1_wrdata[12]), + .D4(main_a7ddrphy_dfi_p1_wrdata[28]), + .D5(main_a7ddrphy_dfi_p2_wrdata[12]), + .D6(main_a7ddrphy_dfi_p2_wrdata[28]), + .D7(main_a7ddrphy_dfi_p3_wrdata[12]), + .D8(main_a7ddrphy_dfi_p3_wrdata[28]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay12), + .TQ(main_a7ddrphy_dq_t12) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_12 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed12), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data12[7]), + .Q2(main_a7ddrphy_dq_i_data12[6]), + .Q3(main_a7ddrphy_dq_i_data12[5]), + .Q4(main_a7ddrphy_dq_i_data12[4]), + .Q5(main_a7ddrphy_dq_i_data12[3]), + .Q6(main_a7ddrphy_dq_i_data12[2]), + .Q7(main_a7ddrphy_dq_i_data12[1]), + .Q8(main_a7ddrphy_dq_i_data12[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_12 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay12), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed12) +); + +IOBUF IOBUF_12( + .I(main_a7ddrphy_dq_o_nodelay12), + .T(main_a7ddrphy_dq_t12), + .IO(ddram_dq[12]), + .O(main_a7ddrphy_dq_i_nodelay12) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_42 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[13]), + .D2(main_a7ddrphy_dfi_p0_wrdata[29]), + .D3(main_a7ddrphy_dfi_p1_wrdata[13]), + .D4(main_a7ddrphy_dfi_p1_wrdata[29]), + .D5(main_a7ddrphy_dfi_p2_wrdata[13]), + .D6(main_a7ddrphy_dfi_p2_wrdata[29]), + .D7(main_a7ddrphy_dfi_p3_wrdata[13]), + .D8(main_a7ddrphy_dfi_p3_wrdata[29]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay13), + .TQ(main_a7ddrphy_dq_t13) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_13 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed13), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data13[7]), + .Q2(main_a7ddrphy_dq_i_data13[6]), + .Q3(main_a7ddrphy_dq_i_data13[5]), + .Q4(main_a7ddrphy_dq_i_data13[4]), + .Q5(main_a7ddrphy_dq_i_data13[3]), + .Q6(main_a7ddrphy_dq_i_data13[2]), + .Q7(main_a7ddrphy_dq_i_data13[1]), + .Q8(main_a7ddrphy_dq_i_data13[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_13 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay13), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed13) +); + +IOBUF IOBUF_13( + .I(main_a7ddrphy_dq_o_nodelay13), + .T(main_a7ddrphy_dq_t13), + .IO(ddram_dq[13]), + .O(main_a7ddrphy_dq_i_nodelay13) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_43 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[14]), + .D2(main_a7ddrphy_dfi_p0_wrdata[30]), + .D3(main_a7ddrphy_dfi_p1_wrdata[14]), + .D4(main_a7ddrphy_dfi_p1_wrdata[30]), + .D5(main_a7ddrphy_dfi_p2_wrdata[14]), + .D6(main_a7ddrphy_dfi_p2_wrdata[30]), + .D7(main_a7ddrphy_dfi_p3_wrdata[14]), + .D8(main_a7ddrphy_dfi_p3_wrdata[30]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay14), + .TQ(main_a7ddrphy_dq_t14) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_14 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed14), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data14[7]), + .Q2(main_a7ddrphy_dq_i_data14[6]), + .Q3(main_a7ddrphy_dq_i_data14[5]), + .Q4(main_a7ddrphy_dq_i_data14[4]), + .Q5(main_a7ddrphy_dq_i_data14[3]), + .Q6(main_a7ddrphy_dq_i_data14[2]), + .Q7(main_a7ddrphy_dq_i_data14[1]), + .Q8(main_a7ddrphy_dq_i_data14[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_14 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay14), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed14) +); + +IOBUF IOBUF_14( + .I(main_a7ddrphy_dq_o_nodelay14), + .T(main_a7ddrphy_dq_t14), + .IO(ddram_dq[14]), + .O(main_a7ddrphy_dq_i_nodelay14) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_44 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[15]), + .D2(main_a7ddrphy_dfi_p0_wrdata[31]), + .D3(main_a7ddrphy_dfi_p1_wrdata[15]), + .D4(main_a7ddrphy_dfi_p1_wrdata[31]), + .D5(main_a7ddrphy_dfi_p2_wrdata[15]), + .D6(main_a7ddrphy_dfi_p2_wrdata[31]), + .D7(main_a7ddrphy_dfi_p3_wrdata[15]), + .D8(main_a7ddrphy_dfi_p3_wrdata[31]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay15), + .TQ(main_a7ddrphy_dq_t15) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_15 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed15), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data15[7]), + .Q2(main_a7ddrphy_dq_i_data15[6]), + .Q3(main_a7ddrphy_dq_i_data15[5]), + .Q4(main_a7ddrphy_dq_i_data15[4]), + .Q5(main_a7ddrphy_dq_i_data15[3]), + .Q6(main_a7ddrphy_dq_i_data15[2]), + .Q7(main_a7ddrphy_dq_i_data15[1]), + .Q8(main_a7ddrphy_dq_i_data15[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_15 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay15), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed15) +); + +IOBUF IOBUF_15( + .I(main_a7ddrphy_dq_o_nodelay15), + .T(main_a7ddrphy_dq_t15), + .IO(ddram_dq[15]), + .O(main_a7ddrphy_dq_i_nodelay15) +); + +reg [23:0] storage_2[0:7]; +reg [23:0] memdat_5; +always @(posedge sys_clk) begin + if (main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we) + storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; + memdat_5 <= storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r = memdat_5; +assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r = storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_3[0:7]; +reg [23:0] memdat_6; +always @(posedge sys_clk) begin + if (main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we) + storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; + memdat_6 <= storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r = memdat_6; +assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r = storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_4[0:7]; +reg [23:0] memdat_7; +always @(posedge sys_clk) begin + if (main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we) + storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; + memdat_7 <= storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r = memdat_7; +assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r = storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_5[0:7]; +reg [23:0] memdat_8; +always @(posedge sys_clk) begin + if (main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we) + storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; + memdat_8 <= storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r = memdat_8; +assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r = storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_6[0:7]; +reg [23:0] memdat_9; +always @(posedge sys_clk) begin + if (main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we) + storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; + memdat_9 <= storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r = memdat_9; +assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r = storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_7[0:7]; +reg [23:0] memdat_10; +always @(posedge sys_clk) begin + if (main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we) + storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; + memdat_10 <= storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r = memdat_10; +assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r = storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_8[0:7]; +reg [23:0] memdat_11; +always @(posedge sys_clk) begin + if (main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we) + storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; + memdat_11 <= storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r = memdat_11; +assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r = storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_9[0:7]; +reg [23:0] memdat_12; +always @(posedge sys_clk) begin + if (main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we) + storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; + memdat_12 <= storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r = memdat_12; +assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r = storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] tag_mem[0:511]; +reg [8:0] memadr_1; +always @(posedge sys_clk) begin + if (main_tag_port_we) + tag_mem[main_tag_port_adr] <= main_tag_port_dat_w; + memadr_1 <= main_tag_port_adr; +end + +assign main_tag_port_dat_r = tag_mem[memadr_1]; + +VexRiscv VexRiscv( + .clk(sys_clk), + .dBusWishbone_ACK(main_minsoc_cpu_dbus_ack), + .dBusWishbone_DAT_MISO(main_minsoc_cpu_dbus_dat_r), + .dBusWishbone_ERR(main_minsoc_cpu_dbus_err), + .externalInterruptArray(main_minsoc_cpu_interrupt), + .externalResetVector(main_minsoc_vexriscv), + .iBusWishbone_ACK(main_minsoc_cpu_ibus_ack), + .iBusWishbone_DAT_MISO(main_minsoc_cpu_ibus_dat_r), + .iBusWishbone_ERR(main_minsoc_cpu_ibus_err), + .reset((sys_rst | main_minsoc_cpu_reset)), + .softwareInterrupt(1'd0), + .timerInterrupt(1'd0), + .dBusWishbone_ADR(main_minsoc_cpu_dbus_adr), + .dBusWishbone_BTE(main_minsoc_cpu_dbus_bte), + .dBusWishbone_CTI(main_minsoc_cpu_dbus_cti), + .dBusWishbone_CYC(main_minsoc_cpu_dbus_cyc), + .dBusWishbone_DAT_MOSI(main_minsoc_cpu_dbus_dat_w), + .dBusWishbone_SEL(main_minsoc_cpu_dbus_sel), + .dBusWishbone_STB(main_minsoc_cpu_dbus_stb), + .dBusWishbone_WE(main_minsoc_cpu_dbus_we), + .iBusWishbone_ADR(main_minsoc_cpu_ibus_adr), + .iBusWishbone_BTE(main_minsoc_cpu_ibus_bte), + .iBusWishbone_CTI(main_minsoc_cpu_ibus_cti), + .iBusWishbone_CYC(main_minsoc_cpu_ibus_cyc), + .iBusWishbone_DAT_MOSI(main_minsoc_cpu_ibus_dat_w), + .iBusWishbone_SEL(main_minsoc_cpu_ibus_sel), + .iBusWishbone_STB(main_minsoc_cpu_ibus_stb), + .iBusWishbone_WE(main_minsoc_cpu_ibus_we) +); + +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(5'd20), + .CLKOUT0_PHASE(1'd0), + .CLKOUT1_DIVIDE(3'd5), + .CLKOUT1_PHASE(1'd0), + .CLKOUT2_DIVIDE(3'd5), + .CLKOUT2_PHASE(90000), + .CLKOUT3_DIVIDE(3'd6), + .CLKOUT3_PHASE(1'd0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(main_pll_clkin), + .RST(main_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .CLKOUT3(main_clkout3), + .LOCKED(main_locked) +); + +reg [7:0] data_mem_grain0[0:511]; +reg [8:0] memadr_2; +always @(posedge sys_clk) begin + if (main_data_port_we[0]) + data_mem_grain0[main_data_port_adr] <= main_data_port_dat_w[7:0]; + memadr_2 <= main_data_port_adr; +end + +assign main_data_port_dat_r[7:0] = data_mem_grain0[memadr_2]; + +reg [7:0] data_mem_grain1[0:511]; +reg [8:0] memadr_3; +always @(posedge sys_clk) begin + if (main_data_port_we[1]) + data_mem_grain1[main_data_port_adr] <= main_data_port_dat_w[15:8]; + memadr_3 <= main_data_port_adr; +end + +assign main_data_port_dat_r[15:8] = data_mem_grain1[memadr_3]; + +reg [7:0] data_mem_grain2[0:511]; +reg [8:0] memadr_4; +always @(posedge sys_clk) begin + if (main_data_port_we[2]) + data_mem_grain2[main_data_port_adr] <= main_data_port_dat_w[23:16]; + memadr_4 <= main_data_port_adr; +end + +assign main_data_port_dat_r[23:16] = data_mem_grain2[memadr_4]; + +reg [7:0] data_mem_grain3[0:511]; +reg [8:0] memadr_5; +always @(posedge sys_clk) begin + if (main_data_port_we[3]) + data_mem_grain3[main_data_port_adr] <= main_data_port_dat_w[31:24]; + memadr_5 <= main_data_port_adr; +end + +assign main_data_port_dat_r[31:24] = data_mem_grain3[memadr_5]; + +reg [7:0] data_mem_grain4[0:511]; +reg [8:0] memadr_6; +always @(posedge sys_clk) begin + if (main_data_port_we[4]) + data_mem_grain4[main_data_port_adr] <= main_data_port_dat_w[39:32]; + memadr_6 <= main_data_port_adr; +end + +assign main_data_port_dat_r[39:32] = data_mem_grain4[memadr_6]; + +reg [7:0] data_mem_grain5[0:511]; +reg [8:0] memadr_7; +always @(posedge sys_clk) begin + if (main_data_port_we[5]) + data_mem_grain5[main_data_port_adr] <= main_data_port_dat_w[47:40]; + memadr_7 <= main_data_port_adr; +end + +assign main_data_port_dat_r[47:40] = data_mem_grain5[memadr_7]; + +reg [7:0] data_mem_grain6[0:511]; +reg [8:0] memadr_8; +always @(posedge sys_clk) begin + if (main_data_port_we[6]) + data_mem_grain6[main_data_port_adr] <= main_data_port_dat_w[55:48]; + memadr_8 <= main_data_port_adr; +end + +assign main_data_port_dat_r[55:48] = data_mem_grain6[memadr_8]; + +reg [7:0] data_mem_grain7[0:511]; +reg [8:0] memadr_9; +always @(posedge sys_clk) begin + if (main_data_port_we[7]) + data_mem_grain7[main_data_port_adr] <= main_data_port_dat_w[63:56]; + memadr_9 <= main_data_port_adr; +end + +assign main_data_port_dat_r[63:56] = data_mem_grain7[memadr_9]; + +reg [7:0] data_mem_grain8[0:511]; +reg [8:0] memadr_10; +always @(posedge sys_clk) begin + if (main_data_port_we[8]) + data_mem_grain8[main_data_port_adr] <= main_data_port_dat_w[71:64]; + memadr_10 <= main_data_port_adr; +end + +assign main_data_port_dat_r[71:64] = data_mem_grain8[memadr_10]; + +reg [7:0] data_mem_grain9[0:511]; +reg [8:0] memadr_11; +always @(posedge sys_clk) begin + if (main_data_port_we[9]) + data_mem_grain9[main_data_port_adr] <= main_data_port_dat_w[79:72]; + memadr_11 <= main_data_port_adr; +end + +assign main_data_port_dat_r[79:72] = data_mem_grain9[memadr_11]; + +reg [7:0] data_mem_grain10[0:511]; +reg [8:0] memadr_12; +always @(posedge sys_clk) begin + if (main_data_port_we[10]) + data_mem_grain10[main_data_port_adr] <= main_data_port_dat_w[87:80]; + memadr_12 <= main_data_port_adr; +end + +assign main_data_port_dat_r[87:80] = data_mem_grain10[memadr_12]; + +reg [7:0] data_mem_grain11[0:511]; +reg [8:0] memadr_13; +always @(posedge sys_clk) begin + if (main_data_port_we[11]) + data_mem_grain11[main_data_port_adr] <= main_data_port_dat_w[95:88]; + memadr_13 <= main_data_port_adr; +end + +assign main_data_port_dat_r[95:88] = data_mem_grain11[memadr_13]; + +reg [7:0] data_mem_grain12[0:511]; +reg [8:0] memadr_14; +always @(posedge sys_clk) begin + if (main_data_port_we[12]) + data_mem_grain12[main_data_port_adr] <= main_data_port_dat_w[103:96]; + memadr_14 <= main_data_port_adr; +end + +assign main_data_port_dat_r[103:96] = data_mem_grain12[memadr_14]; + +reg [7:0] data_mem_grain13[0:511]; +reg [8:0] memadr_15; +always @(posedge sys_clk) begin + if (main_data_port_we[13]) + data_mem_grain13[main_data_port_adr] <= main_data_port_dat_w[111:104]; + memadr_15 <= main_data_port_adr; +end + +assign main_data_port_dat_r[111:104] = data_mem_grain13[memadr_15]; + +reg [7:0] data_mem_grain14[0:511]; +reg [8:0] memadr_16; +always @(posedge sys_clk) begin + if (main_data_port_we[14]) + data_mem_grain14[main_data_port_adr] <= main_data_port_dat_w[119:112]; + memadr_16 <= main_data_port_adr; +end + +assign main_data_port_dat_r[119:112] = data_mem_grain14[memadr_16]; + +reg [7:0] data_mem_grain15[0:511]; +reg [8:0] memadr_17; +always @(posedge sys_clk) begin + if (main_data_port_we[15]) + data_mem_grain15[main_data_port_adr] <= main_data_port_dat_w[127:120]; + memadr_17 <= main_data_port_adr; +end + +assign main_data_port_dat_r[127:120] = data_mem_grain15[memadr_17]; + +(* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE ( + .C(sys_clk), + .CE(1'd1), + .D(1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl0), + .Q(builder_xilinxasyncresetsynchronizerimpl0_rst_meta) +); + +(* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_1 ( + .C(sys_clk), + .CE(1'd1), + .D(builder_xilinxasyncresetsynchronizerimpl0_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl0), + .Q(sys_rst) +); + +(* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_2 ( + .C(sys4x_clk), + .CE(1'd1), + .D(1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl1), + .Q(builder_xilinxasyncresetsynchronizerimpl1_rst_meta) +); + +(* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_3 ( + .C(sys4x_clk), + .CE(1'd1), + .D(builder_xilinxasyncresetsynchronizerimpl1_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl1), + .Q(builder_xilinxasyncresetsynchronizerimpl1_expr) +); + +(* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_4 ( + .C(sys4x_dqs_clk), + .CE(1'd1), + .D(1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl2), + .Q(builder_xilinxasyncresetsynchronizerimpl2_rst_meta) +); + +(* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_5 ( + .C(sys4x_dqs_clk), + .CE(1'd1), + .D(builder_xilinxasyncresetsynchronizerimpl2_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl2), + .Q(builder_xilinxasyncresetsynchronizerimpl2_expr) +); + +(* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_6 ( + .C(clk200_clk), + .CE(1'd1), + .D(1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl3), + .Q(builder_xilinxasyncresetsynchronizerimpl3_rst_meta) +); + +(* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_7 ( + .C(clk200_clk), + .CE(1'd1), + .D(builder_xilinxasyncresetsynchronizerimpl3_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl3), + .Q(clk200_rst) +); + +endmodule diff --git a/xdc-plugin/tests/minilitex_ddr_arty.xdc b/xdc-plugin/tests/minilitex_ddr_arty.xdc new file mode 100644 index 000000000..bb6ded792 --- /dev/null +++ b/xdc-plugin/tests/minilitex_ddr_arty.xdc @@ -0,0 +1,230 @@ + ## serial:0.tx +set_property LOC D10 [get_ports serial_tx] +set_property IOSTANDARD LVCMOS33 [get_ports serial_tx] +# ## serial:0.rx +set_property LOC A9 [get_ports serial_rx] +set_property IOSTANDARD LVCMOS33 [get_ports serial_rx] +# ## clk100:0 +set_property LOC E3 [get_ports clk100] +set_property IOSTANDARD LVCMOS33 [get_ports clk100] +# ## cpu_reset:0 +set_property LOC C2 [get_ports cpu_reset] +set_property IOSTANDARD LVCMOS33 [get_ports cpu_reset] +# ## ddram:0.a +set_property LOC R2 [get_ports {ddram_a[0]} ] +set_property SLEW FAST [get_ports {ddram_a[0]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[0]} ] +# ## ddram:0.a +set_property LOC M6 [get_ports {ddram_a[1]} ] +set_property SLEW FAST [get_ports {ddram_a[1]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[1]} ] +# ## ddram:0.a +set_property LOC N4 [get_ports {ddram_a[2]} ] +set_property SLEW FAST [get_ports {ddram_a[2]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[2]} ] +# ## ddram:0.a +set_property LOC T1 [get_ports {ddram_a[3]} ] +set_property SLEW FAST [get_ports {ddram_a[3]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[3]} ] +# ## ddram:0.a +set_property LOC N6 [get_ports {ddram_a[4]} ] +set_property SLEW FAST [get_ports {ddram_a[4]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[4]} ] +# ## ddram:0.a +set_property LOC R7 [get_ports {ddram_a[5]} ] +set_property SLEW FAST [get_ports {ddram_a[5]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[5]} ] +# ## ddram:0.a +set_property LOC V6 [get_ports {ddram_a[6]} ] +set_property SLEW FAST [get_ports {ddram_a[6]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[6]} ] +# ## ddram:0.a +set_property LOC U7 [get_ports {ddram_a[7]} ] +set_property SLEW FAST [get_ports {ddram_a[7]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[7]} ] +# ## ddram:0.a +set_property LOC R8 [get_ports {ddram_a[8]} ] +set_property SLEW FAST [get_ports {ddram_a[8]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[8]} ] +# ## ddram:0.a +set_property LOC V7 [get_ports {ddram_a[9]} ] +set_property SLEW FAST [get_ports {ddram_a[9]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[9]} ] +# ## ddram:0.a +set_property LOC R6 [get_ports {ddram_a[10]} ] +set_property SLEW FAST [get_ports {ddram_a[10]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[10]} ] +# ## ddram:0.a +set_property LOC U6 [get_ports {ddram_a[11]} ] +set_property SLEW FAST [get_ports {ddram_a[11]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[11]} ] +# ## ddram:0.a +set_property LOC T6 [get_ports {ddram_a[12]} ] +set_property SLEW FAST [get_ports {ddram_a[12]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[12]} ] +# ## ddram:0.a +set_property LOC T8 [get_ports {ddram_a[13]} ] +set_property SLEW FAST [get_ports {ddram_a[13]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[13]} ] +# ## ddram:0.ba +set_property LOC R1 [get_ports {ddram_ba[0]} ] +set_property SLEW FAST [get_ports {ddram_ba[0]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_ba[0]} ] +# ## ddram:0.ba +set_property LOC P4 [get_ports {ddram_ba[1]} ] +set_property SLEW FAST [get_ports {ddram_ba[1]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_ba[1]} ] +# ## ddram:0.ba +set_property LOC P2 [get_ports {ddram_ba[2]} ] +set_property SLEW FAST [get_ports {ddram_ba[2]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_ba[2]} ] +# ## ddram:0.ras_n +set_property LOC P3 [get_ports ddram_ras_n] +set_property SLEW FAST [get_ports ddram_ras_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_ras_n] +# ## ddram:0.cas_n +set_property LOC M4 [get_ports ddram_cas_n] +set_property SLEW FAST [get_ports ddram_cas_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_cas_n] +# ## ddram:0.we_n +set_property LOC P5 [get_ports ddram_we_n] +set_property SLEW FAST [get_ports ddram_we_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_we_n] +# ## ddram:0.cs_n +set_property LOC U8 [get_ports ddram_cs_n] +set_property SLEW FAST [get_ports ddram_cs_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_cs_n] +# ## ddram:0.dm +set_property LOC L1 [get_ports {ddram_dm[0]} ] +set_property SLEW FAST [get_ports {ddram_dm[0]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dm[0]} ] +# ## ddram:0.dm +set_property LOC U1 [get_ports {ddram_dm[1]} ] +set_property SLEW FAST [get_ports {ddram_dm[1]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dm[1]} ] +# ## ddram:0.dq +set_property LOC K5 [get_ports {ddram_dq[0]} ] +set_property SLEW FAST [get_ports {ddram_dq[0]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[0]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[0]} ] +# ## ddram:0.dq +set_property LOC L3 [get_ports {ddram_dq[1]} ] +set_property SLEW FAST [get_ports {ddram_dq[1]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[1]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[1]} ] +# ## ddram:0.dq +set_property LOC K3 [get_ports {ddram_dq[2]} ] +set_property SLEW FAST [get_ports {ddram_dq[2]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[2]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[2]} ] +# ## ddram:0.dq +set_property LOC L6 [get_ports {ddram_dq[3]} ] +set_property SLEW FAST [get_ports {ddram_dq[3]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[3]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[3]} ] +# ## ddram:0.dq +set_property LOC M3 [get_ports {ddram_dq[4]} ] +set_property SLEW FAST [get_ports {ddram_dq[4]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[4]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[4]} ] +# ## ddram:0.dq +set_property LOC M1 [get_ports {ddram_dq[5]} ] +set_property SLEW FAST [get_ports {ddram_dq[5]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[5]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[5]} ] +# ## ddram:0.dq +set_property LOC L4 [get_ports {ddram_dq[6]} ] +set_property SLEW FAST [get_ports {ddram_dq[6]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[6]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[6]} ] +# ## ddram:0.dq +set_property LOC M2 [get_ports {ddram_dq[7]} ] +set_property SLEW FAST [get_ports {ddram_dq[7]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[7]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[7]} ] +# ## ddram:0.dq +set_property LOC V4 [get_ports {ddram_dq[8]} ] +set_property SLEW FAST [get_ports {ddram_dq[8]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[8]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[8]} ] +# ## ddram:0.dq +set_property LOC T5 [get_ports {ddram_dq[9]} ] +set_property SLEW FAST [get_ports {ddram_dq[9]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[9]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[9]} ] +# ## ddram:0.dq +set_property LOC U4 [get_ports {ddram_dq[10]} ] +set_property SLEW FAST [get_ports {ddram_dq[10]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[10]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[10]} ] +# ## ddram:0.dq +set_property LOC V5 [get_ports {ddram_dq[11]} ] +set_property SLEW FAST [get_ports {ddram_dq[11]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[11]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[11]} ] +# ## ddram:0.dq +set_property LOC V1 [get_ports {ddram_dq[12]} ] +set_property SLEW FAST [get_ports {ddram_dq[12]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[12]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[12]} ] +# ## ddram:0.dq +set_property LOC T3 [get_ports {ddram_dq[13]} ] +set_property SLEW FAST [get_ports {ddram_dq[13]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[13]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[13]} ] +# ## ddram:0.dq +set_property LOC U3 [get_ports {ddram_dq[14]} ] +set_property SLEW FAST [get_ports {ddram_dq[14]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[14]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[14]} ] +# ## ddram:0.dq +set_property LOC R3 [get_ports {ddram_dq[15]} ] +set_property SLEW FAST [get_ports {ddram_dq[15]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[15]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[15]} ] +# ## ddram:0.dqs_p +set_property LOC N2 [get_ports {ddram_dqs_p[0]} ] +set_property SLEW FAST [get_ports {ddram_dqs_p[0]} ] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_p[0]} ] +# ## ddram:0.dqs_p +set_property LOC U2 [get_ports {ddram_dqs_p[1]} ] +set_property SLEW FAST [get_ports {ddram_dqs_p[1]} ] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_p[1]} ] +# ## ddram:0.dqs_n +set_property LOC N1 [get_ports {ddram_dqs_n[0]} ] +set_property SLEW FAST [get_ports {ddram_dqs_n[0]} ] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_n[0]} ] +# ## ddram:0.dqs_n +set_property LOC V2 [get_ports {ddram_dqs_n[1]} ] +set_property SLEW FAST [get_ports {ddram_dqs_n[1]} ] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_n[1]} ] +# ## ddram:0.clk_p +set_property LOC U9 [get_ports ddram_clk_p] +set_property SLEW FAST [get_ports ddram_clk_p] +set_property IOSTANDARD DIFF_SSTL135 [get_ports ddram_clk_p] +# ## ddram:0.clk_n +set_property LOC V9 [get_ports ddram_clk_n] +set_property SLEW FAST [get_ports ddram_clk_n] +set_property IOSTANDARD DIFF_SSTL135 [get_ports ddram_clk_n] +# ## ddram:0.cke +set_property LOC N5 [get_ports ddram_cke] +set_property SLEW FAST [get_ports ddram_cke] +set_property IOSTANDARD SSTL135 [get_ports ddram_cke] +# ## ddram:0.odt +set_property LOC R5 [get_ports ddram_odt] +set_property SLEW FAST [get_ports ddram_odt] +set_property IOSTANDARD SSTL135 [get_ports ddram_odt] +# ## ddram:0.reset_n +set_property LOC K6 [get_ports ddram_reset_n] +set_property SLEW FAST [get_ports ddram_reset_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_reset_n] + +set_property INTERNAL_VREF 0.675 [get_iobanks 34] + +#create_clock -name clk100 -period 10.0 [get_nets clk100] +# +#set_false_path -quiet -to [get_nets -quiet -filter {mr_ff == TRUE}] +# +#set_false_path -quiet -to [get_pins -quiet -filter {REF_PIN_NAME == PRE} -of [get_cells -quiet -filter {ars_ff1 == TRUE || ars_ff2 == TRUE}]} ] +# +#set_max_delay 2 -quiet -from [get_pins -quiet -filter {REF_PIN_NAME == Q} -of [get_cells -quiet -filter {ars_ff1 == TRUE}]} ] -to [get_pins -quiet -filter {REF_PIN_NAME == D} -of [get_cells -quiet -filter {ars_ff2 == TRUE}]} ] diff --git a/xdc-plugin/tests/minilitex_ddr_arty_golden.json b/xdc-plugin/tests/minilitex_ddr_arty_golden.json new file mode 100644 index 000000000..84120adf7 --- /dev/null +++ b/xdc-plugin/tests/minilitex_ddr_arty_golden.json @@ -0,0 +1,247 @@ +{ + "IOBUF": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[0]:K5", + "SLEW": "FAST" + }, + "IOBUF_1": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[1]:L3", + "SLEW": "FAST" + }, + "IOBUF_10": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[10]:U4", + "SLEW": "FAST" + }, + "IOBUF_11": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[11]:V5", + "SLEW": "FAST" + }, + "IOBUF_12": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[12]:V1", + "SLEW": "FAST" + }, + "IOBUF_13": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[13]:T3", + "SLEW": "FAST" + }, + "IOBUF_14": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[14]:U3", + "SLEW": "FAST" + }, + "IOBUF_15": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[15]:R3", + "SLEW": "FAST" + }, + "IOBUF_2": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[2]:K3", + "SLEW": "FAST" + }, + "IOBUF_3": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[3]:L6", + "SLEW": "FAST" + }, + "IOBUF_4": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[4]:M3", + "SLEW": "FAST" + }, + "IOBUF_5": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[5]:M1", + "SLEW": "FAST" + }, + "IOBUF_6": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[6]:L4", + "SLEW": "FAST" + }, + "IOBUF_7": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[7]:M2", + "SLEW": "FAST" + }, + "IOBUF_8": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[8]:V4", + "SLEW": "FAST" + }, + "IOBUF_9": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dq[9]:T5", + "SLEW": "FAST" + }, + "OBUFTDS": { + "IOSTANDARD": "DIFF_SSTL135", + "LOC": "ddram_dqs_p[0]:N2,ddram_dqs_n[0]:N1", + "SLEW": "FAST" + }, + "OBUFTDS_1": { + "IOSTANDARD": "DIFF_SSTL135", + "LOC": "ddram_dqs_p[1]:U2,ddram_dqs_n[1]:V2", + "SLEW": "FAST" + }, + "OBUFTDS_2": { + "IOSTANDARD": "DIFF_SSTL135", + "LOC": "ddram_clk_p:U9,ddram_clk_n:V9", + "SLEW": "FAST" + }, + "clkbuf": { + "IOSTANDARD": "LVCMOS33", + "LOC": "clk100:E3" + }, + "obuf_a0": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[0]:R2", + "SLEW": "FAST" + }, + "obuf_a1": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[1]:M6", + "SLEW": "FAST" + }, + "obuf_a10": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[10]:R6", + "SLEW": "FAST" + }, + "obuf_a11": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[11]:U6", + "SLEW": "FAST" + }, + "obuf_a12": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[12]:T6", + "SLEW": "FAST" + }, + "obuf_a13": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[13]:T8", + "SLEW": "FAST" + }, + "obuf_a2": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[2]:N4", + "SLEW": "FAST" + }, + "obuf_a3": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[3]:T1", + "SLEW": "FAST" + }, + "obuf_a4": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[4]:N6", + "SLEW": "FAST" + }, + "obuf_a5": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[5]:R7", + "SLEW": "FAST" + }, + "obuf_a6": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[6]:V6", + "SLEW": "FAST" + }, + "obuf_a7": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[7]:U7", + "SLEW": "FAST" + }, + "obuf_a8": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[8]:R8", + "SLEW": "FAST" + }, + "obuf_a9": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_a[9]:V7", + "SLEW": "FAST" + }, + "obuf_ba0": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_ba[0]:R1", + "SLEW": "FAST" + }, + "obuf_ba1": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_ba[1]:P4", + "SLEW": "FAST" + }, + "obuf_ba2": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_ba[2]:P2", + "SLEW": "FAST" + }, + "obuf_cas": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_cas_n:M4", + "SLEW": "FAST" + }, + "obuf_cke": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_cke:N5", + "SLEW": "FAST" + }, + "obuf_cs": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_cs_n:U8", + "SLEW": "FAST" + }, + "obuf_dm0": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dm[0]:L1", + "SLEW": "FAST" + }, + "obuf_dm1": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_dm[1]:U1", + "SLEW": "FAST" + }, + "obuf_odt": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_odt:R5", + "SLEW": "FAST" + }, + "obuf_ras": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_ras_n:P3", + "SLEW": "FAST" + }, + "obuf_rst": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_reset_n:K6", + "SLEW": "FAST" + }, + "obuf_we": { + "IOSTANDARD": "SSTL135", + "LOC": "ddram_we_n:P5", + "SLEW": "FAST" + } +} \ No newline at end of file From 93ee146bd78559d4d54c0ee973af452ae867a34a Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 8 Jun 2020 22:44:23 +0200 Subject: [PATCH 056/845] XDC: Rename LOC to IO_LOC_PAIRS Signed-off-by: Tomasz Michalak --- xdc-plugin/xdc.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 92049e251..85ed1d7a1 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -44,7 +44,7 @@ static bool isOutputPort(RTLIL::Wire* wire) { return wire->port_output; } -enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD, SLEW, DRIVE, IN_TERM, LOC }; +enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD, SLEW, DRIVE, IN_TERM, IO_LOC_PAIRS }; const std::unordered_map set_property_options_map = { {"INTERNAL_VREF", SetPropertyOptions::INTERNAL_VREF}, @@ -52,15 +52,15 @@ const std::unordered_map set_property_options_m {"SLEW", SetPropertyOptions::SLEW}, {"DRIVE", SetPropertyOptions::DRIVE}, {"IN_TERM", SetPropertyOptions::IN_TERM}, - {"LOC", SetPropertyOptions::LOC} + {"LOC", SetPropertyOptions::IO_LOC_PAIRS} }; const std::unordered_map> supported_primitive_parameters = { - {"OBUF", {"LOC", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, - {"OBUFDS", {"LOC", "IOSTANDARD", "SLEW", "IN_TERM"}}, - {"OBUFTDS", {"LOC", "IOSTANDARD", "SLEW", "IN_TERM"}}, - {"IBUF", {"LOC", "IOSTANDARD"}}, - {"IOBUF", {"LOC", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}} + {"OBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, + {"OBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, + {"OBUFTDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, + {"IBUF", {"IO_LOC_PAIRS", "IOSTANDARD"}}, + {"IOBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}} }; void register_in_tcl_interpreter(const std::string& command) { @@ -190,8 +190,10 @@ struct SetProperty : public Pass { case SetPropertyOptions::IN_TERM: process_port_parameter(std::vector(args.begin() + 1, args.end()), design); break; - case SetPropertyOptions::LOC: { + case SetPropertyOptions::IO_LOC_PAIRS: { + // args "set_property LOC PAD PORT" become "IO_LOC_PAIRS PORT:PAD PORT" std::vector new_args(args.begin() + 1, args.end()); + new_args.at(0) = "IO_LOC_PAIRS"; new_args.at(1) = new_args.at(2) + ":" + new_args.at(1); process_port_parameter(new_args, design); break; @@ -295,7 +297,7 @@ struct SetProperty : public Pass { cell->name.c_str(), cell->type.c_str(), parameter_id.c_str()); } - if (parameter_id == ID(LOC) and cell->hasParam(parameter_id)) { + if (parameter_id == ID(IO_LOC_PAIRS) and cell->hasParam(parameter_id)) { std::string cur_value(cell->getParam(parameter_id).decode_string()); value = cur_value + "," + value; } From 6216fad3a63a04c4f891f42481fa71b69124ecab Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 8 Jun 2020 23:05:40 +0200 Subject: [PATCH 057/845] XDC: Move tests to separate directories Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/Makefile | 25 ++--- xdc-plugin/tests/{ => counter}/counter.tcl | 0 xdc-plugin/tests/{ => counter}/counter.v | 0 xdc-plugin/tests/{ => counter}/counter.xdc | 0 .../tests/{ => counter}/counter_golden.json | 0 .../{ => minilitex_ddr_arty}/VexRiscv_Lite.v | 0 .../tests/{ => minilitex_ddr_arty}/mem.init | 0 .../tests/{ => minilitex_ddr_arty}/mem_1.init | 0 .../minilitex_ddr_arty.tcl | 0 .../minilitex_ddr_arty.v | 0 .../minilitex_ddr_arty.xdc | 0 .../minilitex_ddr_arty_golden.json | 92 +++++++++---------- .../tests/{ => port_indexes}/port_indexes.tcl | 0 .../tests/{ => port_indexes}/port_indexes.v | 0 .../tests/{ => port_indexes}/port_indexes.xdc | 0 .../port_indexes_golden.json | 0 16 files changed, 59 insertions(+), 58 deletions(-) rename xdc-plugin/tests/{ => counter}/counter.tcl (100%) rename xdc-plugin/tests/{ => counter}/counter.v (100%) rename xdc-plugin/tests/{ => counter}/counter.xdc (100%) rename xdc-plugin/tests/{ => counter}/counter_golden.json (100%) rename xdc-plugin/tests/{ => minilitex_ddr_arty}/VexRiscv_Lite.v (100%) rename xdc-plugin/tests/{ => minilitex_ddr_arty}/mem.init (100%) rename xdc-plugin/tests/{ => minilitex_ddr_arty}/mem_1.init (100%) rename xdc-plugin/tests/{ => minilitex_ddr_arty}/minilitex_ddr_arty.tcl (100%) rename xdc-plugin/tests/{ => minilitex_ddr_arty}/minilitex_ddr_arty.v (100%) rename xdc-plugin/tests/{ => minilitex_ddr_arty}/minilitex_ddr_arty.xdc (100%) rename xdc-plugin/tests/{ => minilitex_ddr_arty}/minilitex_ddr_arty_golden.json (67%) rename xdc-plugin/tests/{ => port_indexes}/port_indexes.tcl (100%) rename xdc-plugin/tests/{ => port_indexes}/port_indexes.v (100%) rename xdc-plugin/tests/{ => port_indexes}/port_indexes.xdc (100%) rename xdc-plugin/tests/{ => port_indexes}/port_indexes_golden.json (100%) diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index 3381384a7..fa35c447a 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -6,17 +6,17 @@ TESTS = counter \ port_indexes \ minilitex_ddr_arty -counter_verify = $(call compare_json, counter) -port_indexes_verify = $(call compare_json, port_indexes) && test $$(grep "'unknown' proc command handler" port_indexes.txt | wc -l) -eq 2 -minilitex_ddr_arty_verify = $(call compare_json, minilitex_ddr_arty) +counter_verify = $(call compare_json,counter) +port_indexes_verify = $(call compare_json,port_indexes) && test $$(grep "'unknown' proc command handler" port_indexes/port_indexes.txt | wc -l) -eq 2 +minilitex_ddr_arty_verify = $(call compare_json,minilitex_ddr_arty) all: $(TESTS) -compare_json = python compare_output_json.py --json $(1).json --golden $(1)_golden.json +compare_json = python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1)_golden.json define test_tpl = -$(1): $(1).json - $$($(1)_verify); +$(1): $(1)/$(1).json + $$($(1)_verify) RETVAL=$$$$? ; \ if [ $$$$RETVAL -eq 0 ]; then \ echo "$(1) PASS"; \ @@ -26,14 +26,15 @@ $(1): $(1).json false; \ fi -$(1).json: $(1).v - PART_JSON=xc7a35tcsg324-1.json \ +$(1)/$(1).json: $(1)/$(1).v + cd $(1); \ + PART_JSON=../xc7a35tcsg324-1.json \ OUT_JSON=$(1).json \ INPUT_XDC_FILE=$(1).xdc \ - yosys -p "tcl $(1).tcl" $$< -l yosys.log + yosys -p "tcl $(1).tcl" $(1).v -l yosys.log -update_$(1): $(1).json - @python compare_output_json.py --json $$< --golden $(1)_golden.json --update +update_$(1): $(1)/$(1).json + @python compare_output_json.py --json $$< --golden $(1)/$(1)_golden.json --update endef @@ -43,4 +44,4 @@ update: $(foreach test,$(TESTS),update_$(test)) clean: - rm -rf *.log $(foreach test,$(TESTS),$(test).json) + rm -rf $(foreach test,$(TESTS),$(test)/$(test).json $(test)/$(test).eblif $(test)/$(test).txt $(test)/yosys.log) diff --git a/xdc-plugin/tests/counter.tcl b/xdc-plugin/tests/counter/counter.tcl similarity index 100% rename from xdc-plugin/tests/counter.tcl rename to xdc-plugin/tests/counter/counter.tcl diff --git a/xdc-plugin/tests/counter.v b/xdc-plugin/tests/counter/counter.v similarity index 100% rename from xdc-plugin/tests/counter.v rename to xdc-plugin/tests/counter/counter.v diff --git a/xdc-plugin/tests/counter.xdc b/xdc-plugin/tests/counter/counter.xdc similarity index 100% rename from xdc-plugin/tests/counter.xdc rename to xdc-plugin/tests/counter/counter.xdc diff --git a/xdc-plugin/tests/counter_golden.json b/xdc-plugin/tests/counter/counter_golden.json similarity index 100% rename from xdc-plugin/tests/counter_golden.json rename to xdc-plugin/tests/counter/counter_golden.json diff --git a/xdc-plugin/tests/VexRiscv_Lite.v b/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v similarity index 100% rename from xdc-plugin/tests/VexRiscv_Lite.v rename to xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v diff --git a/xdc-plugin/tests/mem.init b/xdc-plugin/tests/minilitex_ddr_arty/mem.init similarity index 100% rename from xdc-plugin/tests/mem.init rename to xdc-plugin/tests/minilitex_ddr_arty/mem.init diff --git a/xdc-plugin/tests/mem_1.init b/xdc-plugin/tests/minilitex_ddr_arty/mem_1.init similarity index 100% rename from xdc-plugin/tests/mem_1.init rename to xdc-plugin/tests/minilitex_ddr_arty/mem_1.init diff --git a/xdc-plugin/tests/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl similarity index 100% rename from xdc-plugin/tests/minilitex_ddr_arty.tcl rename to xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl diff --git a/xdc-plugin/tests/minilitex_ddr_arty.v b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v similarity index 100% rename from xdc-plugin/tests/minilitex_ddr_arty.v rename to xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v diff --git a/xdc-plugin/tests/minilitex_ddr_arty.xdc b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.xdc similarity index 100% rename from xdc-plugin/tests/minilitex_ddr_arty.xdc rename to xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.xdc diff --git a/xdc-plugin/tests/minilitex_ddr_arty_golden.json b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty_golden.json similarity index 67% rename from xdc-plugin/tests/minilitex_ddr_arty_golden.json rename to xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty_golden.json index 84120adf7..0683ae174 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty_golden.json +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty_golden.json @@ -2,246 +2,246 @@ "IOBUF": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[0]:K5", + "IO_LOC_PAIRS": "ddram_dq[0]:K5", "SLEW": "FAST" }, "IOBUF_1": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[1]:L3", + "IO_LOC_PAIRS": "ddram_dq[1]:L3", "SLEW": "FAST" }, "IOBUF_10": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[10]:U4", + "IO_LOC_PAIRS": "ddram_dq[10]:U4", "SLEW": "FAST" }, "IOBUF_11": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[11]:V5", + "IO_LOC_PAIRS": "ddram_dq[11]:V5", "SLEW": "FAST" }, "IOBUF_12": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[12]:V1", + "IO_LOC_PAIRS": "ddram_dq[12]:V1", "SLEW": "FAST" }, "IOBUF_13": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[13]:T3", + "IO_LOC_PAIRS": "ddram_dq[13]:T3", "SLEW": "FAST" }, "IOBUF_14": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[14]:U3", + "IO_LOC_PAIRS": "ddram_dq[14]:U3", "SLEW": "FAST" }, "IOBUF_15": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[15]:R3", + "IO_LOC_PAIRS": "ddram_dq[15]:R3", "SLEW": "FAST" }, "IOBUF_2": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[2]:K3", + "IO_LOC_PAIRS": "ddram_dq[2]:K3", "SLEW": "FAST" }, "IOBUF_3": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[3]:L6", + "IO_LOC_PAIRS": "ddram_dq[3]:L6", "SLEW": "FAST" }, "IOBUF_4": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[4]:M3", + "IO_LOC_PAIRS": "ddram_dq[4]:M3", "SLEW": "FAST" }, "IOBUF_5": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[5]:M1", + "IO_LOC_PAIRS": "ddram_dq[5]:M1", "SLEW": "FAST" }, "IOBUF_6": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[6]:L4", + "IO_LOC_PAIRS": "ddram_dq[6]:L4", "SLEW": "FAST" }, "IOBUF_7": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[7]:M2", + "IO_LOC_PAIRS": "ddram_dq[7]:M2", "SLEW": "FAST" }, "IOBUF_8": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[8]:V4", + "IO_LOC_PAIRS": "ddram_dq[8]:V4", "SLEW": "FAST" }, "IOBUF_9": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", - "LOC": "ddram_dq[9]:T5", + "IO_LOC_PAIRS": "ddram_dq[9]:T5", "SLEW": "FAST" }, "OBUFTDS": { "IOSTANDARD": "DIFF_SSTL135", - "LOC": "ddram_dqs_p[0]:N2,ddram_dqs_n[0]:N1", + "IO_LOC_PAIRS": "ddram_dqs_p[0]:N2,ddram_dqs_n[0]:N1", "SLEW": "FAST" }, "OBUFTDS_1": { "IOSTANDARD": "DIFF_SSTL135", - "LOC": "ddram_dqs_p[1]:U2,ddram_dqs_n[1]:V2", + "IO_LOC_PAIRS": "ddram_dqs_p[1]:U2,ddram_dqs_n[1]:V2", "SLEW": "FAST" }, "OBUFTDS_2": { "IOSTANDARD": "DIFF_SSTL135", - "LOC": "ddram_clk_p:U9,ddram_clk_n:V9", + "IO_LOC_PAIRS": "ddram_clk_p:U9,ddram_clk_n:V9", "SLEW": "FAST" }, "clkbuf": { "IOSTANDARD": "LVCMOS33", - "LOC": "clk100:E3" + "IO_LOC_PAIRS": "clk100:E3" }, "obuf_a0": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[0]:R2", + "IO_LOC_PAIRS": "ddram_a[0]:R2", "SLEW": "FAST" }, "obuf_a1": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[1]:M6", + "IO_LOC_PAIRS": "ddram_a[1]:M6", "SLEW": "FAST" }, "obuf_a10": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[10]:R6", + "IO_LOC_PAIRS": "ddram_a[10]:R6", "SLEW": "FAST" }, "obuf_a11": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[11]:U6", + "IO_LOC_PAIRS": "ddram_a[11]:U6", "SLEW": "FAST" }, "obuf_a12": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[12]:T6", + "IO_LOC_PAIRS": "ddram_a[12]:T6", "SLEW": "FAST" }, "obuf_a13": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[13]:T8", + "IO_LOC_PAIRS": "ddram_a[13]:T8", "SLEW": "FAST" }, "obuf_a2": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[2]:N4", + "IO_LOC_PAIRS": "ddram_a[2]:N4", "SLEW": "FAST" }, "obuf_a3": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[3]:T1", + "IO_LOC_PAIRS": "ddram_a[3]:T1", "SLEW": "FAST" }, "obuf_a4": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[4]:N6", + "IO_LOC_PAIRS": "ddram_a[4]:N6", "SLEW": "FAST" }, "obuf_a5": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[5]:R7", + "IO_LOC_PAIRS": "ddram_a[5]:R7", "SLEW": "FAST" }, "obuf_a6": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[6]:V6", + "IO_LOC_PAIRS": "ddram_a[6]:V6", "SLEW": "FAST" }, "obuf_a7": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[7]:U7", + "IO_LOC_PAIRS": "ddram_a[7]:U7", "SLEW": "FAST" }, "obuf_a8": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[8]:R8", + "IO_LOC_PAIRS": "ddram_a[8]:R8", "SLEW": "FAST" }, "obuf_a9": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_a[9]:V7", + "IO_LOC_PAIRS": "ddram_a[9]:V7", "SLEW": "FAST" }, "obuf_ba0": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_ba[0]:R1", + "IO_LOC_PAIRS": "ddram_ba[0]:R1", "SLEW": "FAST" }, "obuf_ba1": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_ba[1]:P4", + "IO_LOC_PAIRS": "ddram_ba[1]:P4", "SLEW": "FAST" }, "obuf_ba2": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_ba[2]:P2", + "IO_LOC_PAIRS": "ddram_ba[2]:P2", "SLEW": "FAST" }, "obuf_cas": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_cas_n:M4", + "IO_LOC_PAIRS": "ddram_cas_n:M4", "SLEW": "FAST" }, "obuf_cke": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_cke:N5", + "IO_LOC_PAIRS": "ddram_cke:N5", "SLEW": "FAST" }, "obuf_cs": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_cs_n:U8", + "IO_LOC_PAIRS": "ddram_cs_n:U8", "SLEW": "FAST" }, "obuf_dm0": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_dm[0]:L1", + "IO_LOC_PAIRS": "ddram_dm[0]:L1", "SLEW": "FAST" }, "obuf_dm1": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_dm[1]:U1", + "IO_LOC_PAIRS": "ddram_dm[1]:U1", "SLEW": "FAST" }, "obuf_odt": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_odt:R5", + "IO_LOC_PAIRS": "ddram_odt:R5", "SLEW": "FAST" }, "obuf_ras": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_ras_n:P3", + "IO_LOC_PAIRS": "ddram_ras_n:P3", "SLEW": "FAST" }, "obuf_rst": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_reset_n:K6", + "IO_LOC_PAIRS": "ddram_reset_n:K6", "SLEW": "FAST" }, "obuf_we": { "IOSTANDARD": "SSTL135", - "LOC": "ddram_we_n:P5", + "IO_LOC_PAIRS": "ddram_we_n:P5", "SLEW": "FAST" } } \ No newline at end of file diff --git a/xdc-plugin/tests/port_indexes.tcl b/xdc-plugin/tests/port_indexes/port_indexes.tcl similarity index 100% rename from xdc-plugin/tests/port_indexes.tcl rename to xdc-plugin/tests/port_indexes/port_indexes.tcl diff --git a/xdc-plugin/tests/port_indexes.v b/xdc-plugin/tests/port_indexes/port_indexes.v similarity index 100% rename from xdc-plugin/tests/port_indexes.v rename to xdc-plugin/tests/port_indexes/port_indexes.v diff --git a/xdc-plugin/tests/port_indexes.xdc b/xdc-plugin/tests/port_indexes/port_indexes.xdc similarity index 100% rename from xdc-plugin/tests/port_indexes.xdc rename to xdc-plugin/tests/port_indexes/port_indexes.xdc diff --git a/xdc-plugin/tests/port_indexes_golden.json b/xdc-plugin/tests/port_indexes/port_indexes_golden.json similarity index 100% rename from xdc-plugin/tests/port_indexes_golden.json rename to xdc-plugin/tests/port_indexes/port_indexes_golden.json From b7bd3501d238d3b835ee99a2953d395b12ba6276 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 8 Jun 2020 23:42:15 +0200 Subject: [PATCH 058/845] XDC: Add io_loc_pairs test Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/Makefile | 3 + .../tests/io_loc_pairs/io_loc_pairs.tcl | 14 ++++ xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v | 75 +++++++++++++++++++ .../tests/io_loc_pairs/io_loc_pairs.xdc | 36 +++++++++ .../io_loc_pairs/io_loc_pairs_golden.json | 47 ++++++++++++ 5 files changed, 175 insertions(+) create mode 100644 xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl create mode 100644 xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v create mode 100644 xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc create mode 100644 xdc-plugin/tests/io_loc_pairs/io_loc_pairs_golden.json diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index fa35c447a..d6036567d 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -1,13 +1,16 @@ # counter - basic test for IOSTANDARD, SLEW, DRIVE, IN_TERM properties # port_indexes - like counter but bus port indices are passes without curly braces +# io_loc_pairs - test for LOC property being set on IOBUFs as the IO_LOC_PAIRS parameter # minilitex_ddr_arty - litex design with more types of IOBUFS including differential TESTS = counter \ port_indexes \ + io_loc_pairs \ minilitex_ddr_arty counter_verify = $(call compare_json,counter) port_indexes_verify = $(call compare_json,port_indexes) && test $$(grep "'unknown' proc command handler" port_indexes/port_indexes.txt | wc -l) -eq 2 +io_loc_pairs_verify = $(call compare_json,io_loc_pairs) minilitex_ddr_arty_verify = $(call compare_json,minilitex_ddr_arty) all: $(TESTS) diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl new file mode 100644 index 000000000..8c0a57c5f --- /dev/null +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -0,0 +1,14 @@ +yosys -import +plugin -i xdc +#Import the commands from the plugins to the tcl interpreter +yosys -import + +# -flatten is used to ensure that the output eblif has only one module. +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + +#Read the design constraints +read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) + +# Write the design in JSON format. +write_json $::env(OUT_JSON) diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v new file mode 100644 index 000000000..c145e5ae7 --- /dev/null +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v @@ -0,0 +1,75 @@ +module top ( + input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2( + .I(LD6), + .O(signal_p), + .OB(signal_n), + .T(1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc new file mode 100644 index 000000000..0957374f4 --- /dev/null +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc @@ -0,0 +1,36 @@ +#OBUF_6 +set_property LOC D10 [get_ports {led[0]}] +set_property DRIVE 12 [get_ports {led[0]}] +#OBUF_7 +set_property LOC A9 [get_ports {led[1]}] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports led[1]] +set_property SLEW FAST [get_ports led[1]] +set_property IOSTANDARD SSTL135 [get_ports led[1]] +#OBUF_OUT +set_property LOC E3 [get_ports out_a] +set_property IN_TERM UNTUNED_SPLIT_50 [get_ports out_a] +set_property SLEW FAST [get_ports out_a] +set_property IOSTANDARD LVCMOS33 [get_ports out_a] +#bottom_inst.OBUF_10 +set_property LOC C2 [get_ports {out_b[0]}] +set_property SLEW SLOW [get_ports {out_b[0]}] +set_property IOSTANDARD LVCMOS18 [get_ports {out_b[0]}] +#bottom_inst.OBUF_11 +set_property LOC R2 [get_ports {out_b[1]}] +set_property DRIVE 4 [get_ports {out_b[1]}] +set_property SLEW FAST [get_ports {out_b[1]}] +set_property IOSTANDARD LVCMOS25 [get_ports {out_b[1]}] +#bottom_inst.OBUF_9 +set_property LOC M6 [get_ports {led[2]}] +set_property SLEW FAST [get_ports {led[2]}] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {led[2]}] +#bottom_intermediate_inst.OBUF_8 +set_property LOC N4 [get_ports {led[3]}] +set_property DRIVE 16 [get_ports {led[3]}] +set_property IOSTANDARD SSTL135 [get_ports {led[3]}] +#OBUFTDS_2 +set_property LOC N2 [get_ports signal_p] +set_property LOC N1 [get_ports signal_n] +set_property SLEW FAST [get_ports signal_p] +set_property IOSTANDARD DIFF_SSTL135 [get_ports signal_p] + diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs_golden.json b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs_golden.json new file mode 100644 index 000000000..2e9102dda --- /dev/null +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs_golden.json @@ -0,0 +1,47 @@ +{ + "OBUFTDS_2": { + "IOSTANDARD": "DIFF_SSTL135", + "IO_LOC_PAIRS": "signal_p:N2,signal_n:N1", + "SLEW": "FAST" + }, + "OBUF_6": { + "DRIVE": "12", + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "led[0]:D10", + "SLEW": "SLOW" + }, + "OBUF_7": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "IO_LOC_PAIRS": "led[1]:A9", + "SLEW": "FAST" + }, + "OBUF_OUT": { + "IN_TERM": "UNTUNED_SPLIT_50", + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "out_a:E3", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_10": { + "IOSTANDARD": "LVCMOS18", + "IO_LOC_PAIRS": "out_b[0]:C2", + "SLEW": "SLOW" + }, + "bottom_inst.OBUF_11": { + "DRIVE": "4", + "IOSTANDARD": "LVCMOS25", + "IO_LOC_PAIRS": "out_b[1]:R2", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_9": { + "IOSTANDARD": "DIFF_SSTL135", + "IO_LOC_PAIRS": "led[2]:M6", + "SLEW": "FAST" + }, + "bottom_intermediate_inst.OBUF_8": { + "DRIVE": "16", + "IOSTANDARD": "SSTL135", + "IO_LOC_PAIRS": "led[3]:N4", + "SLEW": "SLOW" + } +} \ No newline at end of file From 1c495fd47ddfc54a9f815c0ba97dc112e1731bd6 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Tue, 9 Jun 2020 11:10:24 -0700 Subject: [PATCH 059/845] Fix github language detection. Signed-off-by: Tim 'mithro' Ansell --- .gitattributes | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..9a5ca88ce --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +# Settings to improve linguist data reporting (used by GitHub) +*.v linguist-language=Verilog +*.vh linguist-language=Verilog +*.sql linguist-language=SQL + +third_party/** linguist-vendored + +# FIXME: All vendor files should be under third_party +xdc-plugin/tests/minilitex_ddr_arty/** linguist-vendored From 651fa7d8925ca357b629737d6829f7b2958aefbd Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Mon, 6 Jul 2020 11:15:03 -0700 Subject: [PATCH 060/845] Remove override macros that have been removed from Yosys. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fasm-plugin/fasm.cc | 4 ++-- xdc-plugin/xdc.cc | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index 7999c224d..4ddfdb24d 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -36,7 +36,7 @@ struct WriteFasm : public Backend { WriteFasm() : Backend("fasm", "Write out FASM features") {} - void help() YS_OVERRIDE { + void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" write_fasm -part_json \n"); @@ -45,7 +45,7 @@ struct WriteFasm : public Backend { log("\n"); } - void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) YS_OVERRIDE { + void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) override { size_t argidx = 1; std::string part_json; if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 85ed1d7a1..723756596 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -74,7 +74,7 @@ struct GetPorts : public Pass { register_in_tcl_interpreter(pass_name); } - void help() YS_OVERRIDE + void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); @@ -86,7 +86,7 @@ struct GetPorts : public Pass { log("\n"); } - void execute(std::vector args, RTLIL::Design* design) YS_OVERRIDE + void execute(std::vector args, RTLIL::Design* design) override { if (args.size() < 2) { log_cmd_error("No port specified.\n"); @@ -127,7 +127,7 @@ struct GetIOBanks : public Pass { register_in_tcl_interpreter(pass_name); } - void help() YS_OVERRIDE { + void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" get_iobanks \n"); @@ -136,7 +136,7 @@ struct GetIOBanks : public Pass { log("\n"); } - void execute(std::vector args, RTLIL::Design* ) YS_OVERRIDE { + void execute(std::vector args, RTLIL::Design* ) override { if (args.size() < 2) { log_cmd_error("%s: Missing bank number.\n", pass_name.c_str()); } @@ -160,7 +160,7 @@ struct SetProperty : public Pass { register_in_tcl_interpreter(pass_name); } - void help() YS_OVERRIDE { + void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" set_property PROPERTY VALUE OBJECT\n"); @@ -169,7 +169,7 @@ struct SetProperty : public Pass { log("\n"); } - void execute(std::vector args, RTLIL::Design* design) YS_OVERRIDE { + void execute(std::vector args, RTLIL::Design* design) override { if (design->top_module() == nullptr) { log_cmd_error("No top module detected\n"); } @@ -375,7 +375,7 @@ struct ReadXdc : public Frontend { , GetIOBanks(std::bind(&ReadXdc::get_bank_tiles, this)) , SetProperty(std::bind(&ReadXdc::get_bank_tiles, this)) {} - void help() YS_OVERRIDE { + void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" read_xdc -part_json \n"); @@ -384,7 +384,7 @@ struct ReadXdc : public Frontend { log("\n"); } - void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design*) YS_OVERRIDE { + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design*) override { if (args.size() < 2) { log_cmd_error("Missing script file.\n"); } @@ -444,7 +444,7 @@ struct GetBankTiles : public Pass { register_in_tcl_interpreter(pass_name); } - void help() YS_OVERRIDE + void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); @@ -454,7 +454,7 @@ struct GetBankTiles : public Pass { log("\n"); } - void execute(std::vector args, RTLIL::Design* ) YS_OVERRIDE { + void execute(std::vector args, RTLIL::Design* ) override { if (args.size() < 2) { log_cmd_error("Missing JSON file.\n"); } From bc2139b90579292f3947f2b7aa6a0817a666f2cb Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Mon, 6 Jul 2020 11:40:24 -0700 Subject: [PATCH 061/845] Change default target to avoid installation. Fixes #20 Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 06741b457..aff09e82b 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) PLUGINS_TEST := $(foreach plugin,$(PLUGIN_LIST),test_$(plugin)) -all: install +all: plugins define install_plugin = $(1).so: From 9b647da1220642f062c4f1ddc443e39a40348edf Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Mon, 6 Jul 2020 11:54:07 -0700 Subject: [PATCH 062/845] Remove install targets from test. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fasm-plugin/Makefile | 2 +- xdc-plugin/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fasm-plugin/Makefile b/fasm-plugin/Makefile index 8c1a1582b..dc171a477 100644 --- a/fasm-plugin/Makefile +++ b/fasm-plugin/Makefile @@ -14,7 +14,7 @@ install: fasm.so mkdir -p $(PLUGINS_DIR) cp $< $(PLUGINS_DIR)/$< -test: install +test: $(MAKE) -C tests all clean: diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index a2ef6ebf9..10e330181 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -18,7 +18,7 @@ install_modules: $(VERILOG_MODULES) mkdir -p $(PLUGINS_DIR)/fasm_extra_modules/ cp $< $(PLUGINS_DIR)/fasm_extra_modules/$< -test: install_plugin install_modules +test: $(MAKE) -C tests all .PHONY: install From dd2a7303014f82a03b6ba87f84bc7c2751865608 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Mon, 6 Jul 2020 15:40:26 -0700 Subject: [PATCH 063/845] Update golden file with latest yosys IOPAD behavior. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- .../minilitex_ddr_arty_golden.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty_golden.json b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty_golden.json index 0683ae174..cb0da138a 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty_golden.json +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty_golden.json @@ -1,4 +1,16 @@ { + "$iopadmap$top.cpu_reset": { + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "cpu_reset:C2" + }, + "$iopadmap$top.serial_rx": { + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "serial_rx:A9" + }, + "$iopadmap$top.serial_tx": { + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "serial_tx:D10" + }, "IOBUF": { "IN_TERM": "UNTUNED_SPLIT_40", "IOSTANDARD": "SSTL135", From 179ac3733eb913ec0ec88488165ac83dd87a00a8 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 9 Jul 2020 16:20:08 +0200 Subject: [PATCH 064/845] Params plugin: Add get_param command Signed-off-by: Tomasz Michalak --- params-plugin/Makefile | 25 +++++++++++++ params-plugin/params.cc | 82 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 params-plugin/Makefile create mode 100644 params-plugin/params.cc diff --git a/params-plugin/Makefile b/params-plugin/Makefile new file mode 100644 index 000000000..d0fd04702 --- /dev/null +++ b/params-plugin/Makefile @@ -0,0 +1,25 @@ +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) +LDFLAGS = $(shell yosys-config --ldflags) +LDLIBS = $(shell yosys-config --ldlibs) +PLUGINS_DIR = $(shell yosys-config --datdir)/plugins + +OBJS = params.o + +params.so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) + +install_plugin: params.so + mkdir -p $(PLUGINS_DIR) + cp $< $(PLUGINS_DIR)/$< + +test: install_plugin + $(MAKE) -C tests all + +.PHONY: install +install: install_plugin + +clean: + rm -f *.d *.o params.so + $(MAKE) -C tests clean + diff --git a/params-plugin/params.cc b/params-plugin/params.cc new file mode 100644 index 000000000..19cebfbb4 --- /dev/null +++ b/params-plugin/params.cc @@ -0,0 +1,82 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/log.h" + +USING_YOSYS_NAMESPACE + +PRIVATE_NAMESPACE_BEGIN + + +void register_in_tcl_interpreter(const std::string& command) { + Tcl_Interp* interp = yosys_get_tcl_interp(); + std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); + Tcl_Eval(interp, tcl_script.c_str()); +} + +struct GetParam : public Pass { + GetParam() : Pass("get_param", "get parameter on object") { + register_in_tcl_interpreter(pass_name); + } + + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" get_param name selection\n"); + log("\n"); + log("Get the given parameter on the selected object. \n"); + log("\n"); + } + + void execute(std::vector args, RTLIL::Design* design) override + { + if (args.size() == 1) { + log_error("Incorrect number of arguments"); + } + + std::string param(args.at(1)); + std::string value; + extra_args(args, 2, design); + + for (auto module : design->selected_modules()) { + for (auto cell : module->selected_cells()) { + auto params = cell->parameters; + auto it = params.find(RTLIL::IdString(RTLIL::escape_id(param))); + if (it != params.end()) { + auto param_obj = it->second; + if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { + value = param_obj.decode_string(); + } else { + value = std::to_string(param_obj.as_int()); + } + } + } + } + + char* tcl_param = Tcl_Alloc(value.size() + 1); + strcpy(tcl_param, value.c_str()); + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_SetResult(interp, tcl_param, TCL_DYNAMIC); + } + +} GetParam; + +PRIVATE_NAMESPACE_END From 0616c49a4ea0e061ac7382c84a4400990dc53c4c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 9 Jul 2020 16:19:39 +0200 Subject: [PATCH 065/845] Params plugin: Add PLL test Signed-off-by: Tomasz Michalak --- Makefile | 2 +- params-plugin/tests/Makefile | 39 + params-plugin/tests/compare_output_json.py | 53 ++ params-plugin/tests/pll/pll.golden.json | 65 ++ params-plugin/tests/pll/pll.tcl | 31 + params-plugin/tests/pll/pll.v | 38 + params-plugin/tests/pll/pll.xdc | 9 + params-plugin/tests/techmaps/cells_map.v | 866 +++++++++++++++++++++ params-plugin/tests/techmaps/cells_sim.v | 145 ++++ params-plugin/tests/xc7a35tcsg324-1.json | 10 + 10 files changed, 1257 insertions(+), 1 deletion(-) create mode 100644 params-plugin/tests/Makefile create mode 100644 params-plugin/tests/compare_output_json.py create mode 100644 params-plugin/tests/pll/pll.golden.json create mode 100644 params-plugin/tests/pll/pll.tcl create mode 100644 params-plugin/tests/pll/pll.v create mode 100644 params-plugin/tests/pll/pll.xdc create mode 100644 params-plugin/tests/techmaps/cells_map.v create mode 100644 params-plugin/tests/techmaps/cells_sim.v create mode 100644 params-plugin/tests/xc7a35tcsg324-1.json diff --git a/Makefile b/Makefile index aff09e82b..fe3f92ded 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc +PLUGIN_LIST := fasm xdc params PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/params-plugin/tests/Makefile b/params-plugin/tests/Makefile new file mode 100644 index 000000000..2ab247e79 --- /dev/null +++ b/params-plugin/tests/Makefile @@ -0,0 +1,39 @@ +TESTS = pll + +pll_verify = $(call compare_json,pll) + +all: $(TESTS) + +compare_json = python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1).golden.json + +define test_tpl = +$(1): $(1)/$(1).json + $$($(1)_verify) + RETVAL=$$$$? ; \ + if [ $$$$RETVAL -eq 0 ]; then \ + echo "$(1) PASS"; \ + true; \ + else \ + echo "$(1) FAIL"; \ + false; \ + fi + +$(1)/$(1).json: $(1)/$(1).v + cd $(1); \ + PART_JSON=../xc7a35tcsg324-1.json \ + OUT_JSON=$(1).json \ + INPUT_XDC_FILE=$(1).xdc \ + yosys -p "tcl $(1).tcl" $(1).v -l yosys.log + +update_$(1): $(1)/$(1).json + @python compare_output_json.py --json $$< --golden $(1)/$(1).golden.json --update + +endef + +$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) + +update: $(foreach test,$(TESTS),update_$(test)) + + +clean: + rm -rf $(foreach test,$(TESTS),$(test)/$(test).json $(test)/$(test).eblif $(test)/$(test).txt $(test)/yosys.log) diff --git a/params-plugin/tests/compare_output_json.py b/params-plugin/tests/compare_output_json.py new file mode 100644 index 000000000..3b437e8c3 --- /dev/null +++ b/params-plugin/tests/compare_output_json.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 +""" + +This script extracts the top module cells and their corresponding parameters +from json files produced by Yosys. +The return code of this script is used to check if the output is equivalent. +""" + +import sys +import json +import argparse + +parameters = ["CLKFBOUT_CLKOUT1_HIGH_TIME"] + +def read_cells(json_file): + with open(json_file) as f: + data = json.load(f) + f.close() + cells = data['modules']['top']['cells'] + cells_parameters = dict() + for cell, opts in cells.items(): + attributes = opts['parameters'] + if len(attributes.keys()): + if any([x in parameters for x in attributes.keys()]): + cells_parameters[cell] = attributes + return cells_parameters + + +def main(args): + cells = read_cells(args.json) + if args.update: + with open(args.golden, 'w') as f: + json.dump(cells, f, indent=2) + else: + with open(args.golden) as f: + cells_golden = json.load(f) + if cells == cells_golden: + exit(0) + else: + print(json.dumps(cells, indent=4)) + json.dump(cells, open(args.json + ".fail", 'w'), indent=2) + print("VS") + print(json.dumps(cells_golden, indent=4)) + exit(1) + f.close() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument('--json', help = 'JSON to compare', required = True) + parser.add_argument('--golden', help = 'Golden JSON file', required = True) + parser.add_argument('--update', action = 'store_true', help = 'Update golden reference') + args = parser.parse_args() + main(args) diff --git a/params-plugin/tests/pll/pll.golden.json b/params-plugin/tests/pll/pll.golden.json new file mode 100644 index 000000000..e3bf97dd1 --- /dev/null +++ b/params-plugin/tests/pll/pll.golden.json @@ -0,0 +1,65 @@ +{ + "PLLE2_ADV": { + "CLKFBOUT_CLKOUT1_HIGH_TIME": "000110", + "CLKFBOUT_CLKOUT1_LOW_TIME": "000110", + "CLKFBOUT_CLKOUT1_OUTPUT_ENABLE": "1", + "CLKFBOUT_CLKOUT1_PHASE_MUX": "000", + "CLKFBOUT_CLKOUT2_DELAY_TIME": "000000", + "CLKFBOUT_CLKOUT2_EDGE": "0", + "CLKFBOUT_CLKOUT2_NO_COUNT": "0", + "CLKOUT0_CLKOUT1_HIGH_TIME": "001010", + "CLKOUT0_CLKOUT1_LOW_TIME": "001010", + "CLKOUT0_CLKOUT1_OUTPUT_ENABLE": "1", + "CLKOUT0_CLKOUT1_PHASE_MUX": "000", + "CLKOUT0_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT0_CLKOUT2_EDGE": "0", + "CLKOUT0_CLKOUT2_NO_COUNT": "0", + "CLKOUT1_CLKOUT1_HIGH_TIME": "000010", + "CLKOUT1_CLKOUT1_LOW_TIME": "000011", + "CLKOUT1_CLKOUT1_OUTPUT_ENABLE": "1", + "CLKOUT1_CLKOUT1_PHASE_MUX": "000", + "CLKOUT1_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT1_CLKOUT2_EDGE": "1", + "CLKOUT1_CLKOUT2_NO_COUNT": "0", + "CLKOUT2_CLKOUT1_HIGH_TIME": "000010", + "CLKOUT2_CLKOUT1_LOW_TIME": "000011", + "CLKOUT2_CLKOUT1_OUTPUT_ENABLE": "0", + "CLKOUT2_CLKOUT1_PHASE_MUX": "010", + "CLKOUT2_CLKOUT2_DELAY_TIME": "000001", + "CLKOUT2_CLKOUT2_EDGE": "1", + "CLKOUT2_CLKOUT2_NO_COUNT": "0", + "CLKOUT3_CLKOUT1_HIGH_TIME": "000011", + "CLKOUT3_CLKOUT1_LOW_TIME": "000011", + "CLKOUT3_CLKOUT1_OUTPUT_ENABLE": "0", + "CLKOUT3_CLKOUT1_PHASE_MUX": "000", + "CLKOUT3_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT3_CLKOUT2_EDGE": "0", + "CLKOUT3_CLKOUT2_NO_COUNT": "0", + "CLKOUT4_CLKOUT1_HIGH_TIME": "000001", + "CLKOUT4_CLKOUT1_LOW_TIME": "000001", + "CLKOUT4_CLKOUT1_OUTPUT_ENABLE": "0", + "CLKOUT4_CLKOUT1_PHASE_MUX": "000", + "CLKOUT4_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT4_CLKOUT2_EDGE": "0", + "CLKOUT4_CLKOUT2_NO_COUNT": "1", + "CLKOUT5_CLKOUT1_HIGH_TIME": "000001", + "CLKOUT5_CLKOUT1_LOW_TIME": "000001", + "CLKOUT5_CLKOUT1_OUTPUT_ENABLE": "0", + "CLKOUT5_CLKOUT1_PHASE_MUX": "000", + "CLKOUT5_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT5_CLKOUT2_EDGE": "0", + "CLKOUT5_CLKOUT2_NO_COUNT": "1", + "DIVCLK_DIVCLK_EDGE": "0", + "DIVCLK_DIVCLK_HIGH_TIME": "000001", + "DIVCLK_DIVCLK_LOW_TIME": "000001", + "DIVCLK_DIVCLK_NO_COUNT": "1", + "FILTREG1_RESERVED": "000000001000", + "INV_CLKINSEL": "0", + "LKTABLE": "1111111111110011100111111010010000000001", + "LOCKREG3_RESERVED": "1", + "STARTUP_WAIT": "0", + "TABLE": "1111110100", + "ZINV_PWRDWN": "1", + "ZINV_RST": "0" + } +} \ No newline at end of file diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl new file mode 100644 index 000000000..c2238d116 --- /dev/null +++ b/params-plugin/tests/pll/pll.tcl @@ -0,0 +1,31 @@ +yosys -import +plugin -i xdc +plugin -i params +#Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top +set phase [get_param CLKOUT2_PHASE top/PLLE2_ADV] +puts "Phase before: $phase" +setparam -set CLKOUT2_PHASE [expr $phase * 1000] top/PLLE2_ADV +puts "Phase after: [get_param CLKOUT2_PHASE top/PLLE2_ADV]" +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -run prepare:check + +# Map Xilinx tech library to 7-series VPR tech library. +read_verilog -lib ../techmaps/cells_sim.v +techmap -map ../techmaps/cells_map.v + +# opt_expr -undriven makes sure all nets are driven, if only by the $undef +# net. +opt_expr -undriven +opt_clean + +setundef -zero -params +stat + +# Write the design in JSON format. +write_json $::env(OUT_JSON) +write_blif -attr -param -cname -conn pll.eblif diff --git a/params-plugin/tests/pll/pll.v b/params-plugin/tests/pll/pll.v new file mode 100644 index 000000000..a1eeb3876 --- /dev/null +++ b/params-plugin/tests/pll/pll.v @@ -0,0 +1,38 @@ +module top( + (* dont_touch = "true" *) input clk100, + input cpu_reset, + output [2:0] led +); + +wire [2:0] led; +wire builder_pll_fb; + +assign led[0] = main_locked; +assign led[1] = main_clkout0; +assign led[2] = main_clkout1; + +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(5'd20), + .CLKOUT0_PHASE(1'd0), + .CLKOUT1_DIVIDE(3'd5), + .CLKOUT1_PHASE(1'd0), + .CLKOUT2_DIVIDE(3'd5), + .CLKOUT2_PHASE(7'd90), + .CLKOUT3_DIVIDE(3'd6), + .CLKOUT3_PHASE(1'd0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk100), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .LOCKED(main_locked) +); + +endmodule diff --git a/params-plugin/tests/pll/pll.xdc b/params-plugin/tests/pll/pll.xdc new file mode 100644 index 000000000..2f4eba35d --- /dev/null +++ b/params-plugin/tests/pll/pll.xdc @@ -0,0 +1,9 @@ +# ## clk100:0 +set_property LOC E3 [get_ports clk100] +set_property IOSTANDARD LVCMOS33 [get_ports clk100] +# ## cpu_reset:0 +set_property LOC C2 [get_ports cpu_reset] +set_property IOSTANDARD LVCMOS33 [get_ports cpu_reset] +set_property LOC H5 [get_ports {led[0]}] +set_property LOC J5 [get_ports {led[1]}] +set_property LOC T9 [get_ports {led[2]}] diff --git a/params-plugin/tests/techmaps/cells_map.v b/params-plugin/tests/techmaps/cells_map.v new file mode 100644 index 000000000..772f5889c --- /dev/null +++ b/params-plugin/tests/techmaps/cells_map.v @@ -0,0 +1,866 @@ +// ============================================================================ +// CMT + +`define PLL_FRAC_PRECISION 10 +`define PLL_FIXED_WIDTH 32 + +// Rounds a fixed point number to a given precision +function [`PLL_FIXED_WIDTH:1] pll_round_frac +( +input [`PLL_FIXED_WIDTH:1] decimal, +input [`PLL_FIXED_WIDTH:1] precision +); + + if (decimal[(`PLL_FRAC_PRECISION - precision)] == 1'b1) begin + pll_round_frac = decimal + (1'b1 << (`PLL_FRAC_PRECISION - precision)); + end else begin + pll_round_frac = decimal; + end + +endfunction + +// Computes content of the PLLs divider registers +function [13:0] pll_divider_regs +( +input [ 7:0] divide, // Max divide is 128 +input [31:0] duty_cycle // Duty cycle is multiplied by 100,000 +); + + reg [`PLL_FIXED_WIDTH:1] duty_cycle_fix; + reg [`PLL_FIXED_WIDTH:1] duty_cycle_min; + reg [`PLL_FIXED_WIDTH:1] duty_cycle_max; + + reg [6:0] high_time; + reg [6:0] low_time; + reg w_edge; + reg no_count; + + reg [`PLL_FIXED_WIDTH:1] temp; + + if (divide >= 64) begin + duty_cycle_min = ((divide - 64) * 100_000) / divide; + duty_cycle_max = (645 / divide) * 100_00; + if (duty_cycle > duty_cycle_max) + duty_cycle = duty_cycle_max; + if (duty_cycle < duty_cycle_min) + duty_cycle = duty_cycle_min; + end + + duty_cycle_fix = (duty_cycle << `PLL_FRAC_PRECISION) / 100_000; + + if (divide == 7'h01) begin + high_time = 7'h01; + w_edge = 1'b0; + low_time = 7'h01; + no_count = 1'b1; + + end else begin + temp = pll_round_frac(duty_cycle_fix*divide, 1); + + high_time = temp[`PLL_FRAC_PRECISION+7:`PLL_FRAC_PRECISION+1]; + w_edge = temp[`PLL_FRAC_PRECISION]; + + if (high_time == 7'h00) begin + high_time = 7'h01; + w_edge = 1'b0; + end + + if (high_time == divide) begin + high_time = divide - 1; + w_edge = 1'b1; + end + + low_time = divide - high_time; + no_count = 1'b0; + end + + pll_divider_regs = {w_edge, no_count, high_time[5:0], low_time[5:0]}; +endfunction + +// Computes the PLLs phase shift registers +function [10:0] pll_phase_regs +( +input [ 7:0] divide, +input signed [31:0] phase +); + + reg [`PLL_FIXED_WIDTH:1] phase_in_cycles; + reg [`PLL_FIXED_WIDTH:1] phase_fixed; + reg [1:0] mx; + reg [5:0] delay_time; + reg [2:0] phase_mux; + + reg [`PLL_FIXED_WIDTH:1] temp; + + if(phase < 0) begin + phase_fixed = ((phase + 360000) << `PLL_FRAC_PRECISION) / 1000; + end else begin + phase_fixed = (phase << `PLL_FRAC_PRECISION) / 1000; + end + + phase_in_cycles = (phase_fixed * divide) / 360; + temp = pll_round_frac(phase_in_cycles, 3); + + mx = 2'b00; + phase_mux = temp[`PLL_FRAC_PRECISION:`PLL_FRAC_PRECISION-2]; + delay_time = temp[`PLL_FRAC_PRECISION+6:`PLL_FRAC_PRECISION+1]; + + pll_phase_regs = {mx, phase_mux, delay_time}; +endfunction + + +// Given PLL/MMCM divide, duty_cycle and phase calculates content of the +// CLKREG1 and CLKREG2. +function [37:0] pll_clkregs +( +input [7:0] divide, // Max divide is 128 +input [31:0] duty_cycle, // Multiplied by 100,000 +input signed [31:0] phase // Phase is given in degrees (-360,000 to 360,000) +); + + reg [13:0] pll_div; // EDGE, NO_COUNT, HIGH_TIME[5:0], LOW_TIME[5:0] + reg [10:0] pll_phase; // MX, PHASE_MUX[2:0], DELAY_TIME[5:0] + + pll_div = pll_divider_regs(divide, duty_cycle); + pll_phase = pll_phase_regs(divide, phase); + + pll_clkregs = { + // CLKREG2: RESERVED[6:0], MX[1:0], EDGE, NO_COUNT, DELAY_TIME[5:0] + 6'h00, pll_phase[10:9], pll_div[13:12], pll_phase[5:0], + // CLKREG1: PHASE_MUX[3:0], RESERVED, HIGH_TIME[5:0], LOW_TIME[5:0] + pll_phase[8:6], 1'b0, pll_div[11:0] + }; + +endfunction + +// This function takes the divide value and outputs the necessary lock values +function [39:0] pll_lktable_lookup +( +input [6:0] divide // Max divide is 64 +); + + reg [2559:0] lookup; + + lookup = { + // This table is composed of: + // LockRefDly_LockFBDly_LockCnt_LockSatHigh_UnlockCnt + 40'b00110_00110_1111101000_1111101001_0000000001, + 40'b00110_00110_1111101000_1111101001_0000000001, + 40'b01000_01000_1111101000_1111101001_0000000001, + 40'b01011_01011_1111101000_1111101001_0000000001, + 40'b01110_01110_1111101000_1111101001_0000000001, + 40'b10001_10001_1111101000_1111101001_0000000001, + 40'b10011_10011_1111101000_1111101001_0000000001, + 40'b10110_10110_1111101000_1111101001_0000000001, + 40'b11001_11001_1111101000_1111101001_0000000001, + 40'b11100_11100_1111101000_1111101001_0000000001, + 40'b11111_11111_1110000100_1111101001_0000000001, + 40'b11111_11111_1100111001_1111101001_0000000001, + 40'b11111_11111_1011101110_1111101001_0000000001, + 40'b11111_11111_1010111100_1111101001_0000000001, + 40'b11111_11111_1010001010_1111101001_0000000001, + 40'b11111_11111_1001110001_1111101001_0000000001, + 40'b11111_11111_1000111111_1111101001_0000000001, + 40'b11111_11111_1000100110_1111101001_0000000001, + 40'b11111_11111_1000001101_1111101001_0000000001, + 40'b11111_11111_0111110100_1111101001_0000000001, + 40'b11111_11111_0111011011_1111101001_0000000001, + 40'b11111_11111_0111000010_1111101001_0000000001, + 40'b11111_11111_0110101001_1111101001_0000000001, + 40'b11111_11111_0110010000_1111101001_0000000001, + 40'b11111_11111_0110010000_1111101001_0000000001, + 40'b11111_11111_0101110111_1111101001_0000000001, + 40'b11111_11111_0101011110_1111101001_0000000001, + 40'b11111_11111_0101011110_1111101001_0000000001, + 40'b11111_11111_0101000101_1111101001_0000000001, + 40'b11111_11111_0101000101_1111101001_0000000001, + 40'b11111_11111_0100101100_1111101001_0000000001, + 40'b11111_11111_0100101100_1111101001_0000000001, + 40'b11111_11111_0100101100_1111101001_0000000001, + 40'b11111_11111_0100010011_1111101001_0000000001, + 40'b11111_11111_0100010011_1111101001_0000000001, + 40'b11111_11111_0100010011_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001 + }; + + pll_lktable_lookup = lookup[ ((64-divide)*40) +: 40]; +endfunction + +// This function takes the divide value and the bandwidth setting of the PLL +// and outputs the digital filter settings necessary. +function [9:0] pll_table_lookup +( +input [6:0] divide, // Max divide is 64 +input [8*9:0] BANDWIDTH +); + + reg [639:0] lookup_low; + reg [639:0] lookup_high; + reg [639:0] lookup_optimized; + + reg [9:0] lookup_entry; + + lookup_low = { + // CP_RES_LFHF + 10'b0010_1111_00, + 10'b0010_1111_00, + 10'b0010_0111_00, + 10'b0010_1101_00, + 10'b0010_0101_00, + 10'b0010_0101_00, + 10'b0010_1001_00, + 10'b0010_1110_00, + 10'b0010_1110_00, + 10'b0010_0001_00, + 10'b0010_0001_00, + 10'b0010_0110_00, + 10'b0010_0110_00, + 10'b0010_0110_00, + 10'b0010_0110_00, + 10'b0010_1010_00, + 10'b0010_1010_00, + 10'b0010_1010_00, + 10'b0010_1010_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00 + }; + + lookup_high = { + // CP_RES_LFHF + 10'b0011_0111_00, + 10'b0011_0111_00, + 10'b0101_1111_00, + 10'b0111_1111_00, + 10'b0111_1011_00, + 10'b1101_0111_00, + 10'b1110_1011_00, + 10'b1110_1101_00, + 10'b1111_1101_00, + 10'b1111_0111_00, + 10'b1111_1011_00, + 10'b1111_1101_00, + 10'b1111_0011_00, + 10'b1110_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0101_1100_00, + 10'b0101_1100_00, + 10'b0101_1100_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b0100_0010_00, + 10'b0100_0010_00, + 10'b0100_0010_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0011_0100_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00 + }; + + lookup_optimized = { + // CP_RES_LFHF + 10'b0011_0111_00, + 10'b0011_0111_00, + 10'b0101_1111_00, + 10'b0111_1111_00, + 10'b0111_1011_00, + 10'b1101_0111_00, + 10'b1110_1011_00, + 10'b1110_1101_00, + 10'b1111_1101_00, + 10'b1111_0111_00, + 10'b1111_1011_00, + 10'b1111_1101_00, + 10'b1111_0011_00, + 10'b1110_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0101_1100_00, + 10'b0101_1100_00, + 10'b0101_1100_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b0100_0010_00, + 10'b0100_0010_00, + 10'b0100_0010_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0011_0100_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00 + }; + + if (BANDWIDTH == "LOW") begin + pll_table_lookup = lookup_low[((64-divide)*10) +: 10]; + end else if (BANDWIDTH == "HIGH") begin + pll_table_lookup = lookup_high[((64-divide)*10) +: 10]; + end else if (BANDWIDTH == "OPTIMIZED") begin + pll_table_lookup = lookup_optimized[((64-divide)*10) +: 10]; + end + +endfunction + +// ............................................................................ +// IMPORTANT NOTE: Due to lack of support for real type parameters in Yosys +// the PLL parameters that define duty cycles and phase shifts have to be +// provided as integers! The DUTY_CYCLE is expressed as % of high time times +// 1000 whereas the PHASE is expressed in degrees times 1000. + +// PLLE2_ADV +module PLLE2_ADV +( +input CLKFBIN, +input CLKIN1, +input CLKIN2, +input CLKINSEL, + +output CLKFBOUT, +output CLKOUT0, +output CLKOUT1, +output CLKOUT2, +output CLKOUT3, +output CLKOUT4, +output CLKOUT5, + +input PWRDWN, +input RST, +output LOCKED, + +input DCLK, +input DEN, +input DWE, +output DRDY, +input [ 6:0] DADDR, +input [15:0] DI, +output [15:0] DO +); + + parameter _TECHMAP_CONSTMSK_CLKINSEL_ = 0; + parameter _TECHMAP_CONSTVAL_CLKINSEL_ = 0; + + parameter _TECHMAP_CONSTMSK_RST_ = 0; + parameter _TECHMAP_CONSTVAL_RST_ = 0; + parameter _TECHMAP_CONSTMSK_PWRDWN_ = 0; + parameter _TECHMAP_CONSTVAL_PWRDWN_ = 0; + + parameter _TECHMAP_CONSTMSK_CLKFBOUT_ = 0; + parameter _TECHMAP_CONSTVAL_CLKFBOUT_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT0_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT0_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT1_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT1_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT2_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT2_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT3_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT3_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT4_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT4_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT5_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT5_ = 0; + + parameter _TECHMAP_CONSTMSK_DCLK_ = 0; + parameter _TECHMAP_CONSTVAL_DCLK_ = 0; + parameter _TECHMAP_CONSTMSK_DEN_ = 0; + parameter _TECHMAP_CONSTVAL_DEN_ = 0; + parameter _TECHMAP_CONSTMSK_DWE_ = 0; + parameter _TECHMAP_CONSTVAL_DWE_ = 0; + + parameter IS_CLKINSEL_INVERTED = 1'b0; + parameter IS_RST_INVERTED = 1'b0; + parameter IS_PWRDWN_INVERTED = 1'b0; + + parameter BANDWIDTH = "OPTIMIZED"; + parameter STARTUP_WAIT = "FALSE"; + parameter COMPENSATION = "ZHOLD"; + + parameter CLKIN1_PERIOD = 0.0; + parameter REF_JITTER1 = 0.01; + parameter CLKIN2_PERIOD = 0.0; + parameter REF_JITTER2 = 0.01; + + parameter [5:0] DIVCLK_DIVIDE = 1; + + parameter [5:0] CLKFBOUT_MULT = 1; + parameter CLKFBOUT_PHASE = 0; + + parameter [6:0] CLKOUT0_DIVIDE = 1; + parameter CLKOUT0_DUTY_CYCLE = 50000; + parameter signed CLKOUT0_PHASE = 0; + + parameter [6:0] CLKOUT1_DIVIDE = 1; + parameter CLKOUT1_DUTY_CYCLE = 50000; + parameter signed CLKOUT1_PHASE = 0; + + parameter [6:0] CLKOUT2_DIVIDE = 1; + parameter CLKOUT2_DUTY_CYCLE = 50000; + parameter signed CLKOUT2_PHASE = 0; + + parameter [6:0] CLKOUT3_DIVIDE = 1; + parameter CLKOUT3_DUTY_CYCLE = 50000; + parameter signed CLKOUT3_PHASE = 0; + + parameter [6:0] CLKOUT4_DIVIDE = 1; + parameter CLKOUT4_DUTY_CYCLE = 50000; + parameter signed CLKOUT4_PHASE = 0; + + parameter [6:0] CLKOUT5_DIVIDE = 1; + parameter CLKOUT5_DUTY_CYCLE = 50000; + parameter signed CLKOUT5_PHASE = 0; + + // Compute PLL's registers content + localparam CLKFBOUT_REGS = pll_clkregs(CLKFBOUT_MULT, 50000, CLKFBOUT_PHASE); + localparam DIVCLK_REGS = pll_clkregs(DIVCLK_DIVIDE, 50000, 0); + + localparam CLKOUT0_REGS = pll_clkregs(CLKOUT0_DIVIDE, CLKOUT0_DUTY_CYCLE, CLKOUT0_PHASE); + localparam CLKOUT1_REGS = pll_clkregs(CLKOUT1_DIVIDE, CLKOUT1_DUTY_CYCLE, CLKOUT1_PHASE); + localparam CLKOUT2_REGS = pll_clkregs(CLKOUT2_DIVIDE, CLKOUT2_DUTY_CYCLE, CLKOUT2_PHASE); + localparam CLKOUT3_REGS = pll_clkregs(CLKOUT3_DIVIDE, CLKOUT3_DUTY_CYCLE, CLKOUT3_PHASE); + localparam CLKOUT4_REGS = pll_clkregs(CLKOUT4_DIVIDE, CLKOUT4_DUTY_CYCLE, CLKOUT4_PHASE); + localparam CLKOUT5_REGS = pll_clkregs(CLKOUT5_DIVIDE, CLKOUT5_DUTY_CYCLE, CLKOUT5_PHASE); + + // Handle inputs that should have certain logic levels when left unconnected + generate if (_TECHMAP_CONSTMSK_CLKINSEL_ == 1) begin + localparam INV_CLKINSEL = !_TECHMAP_CONSTVAL_CLKINSEL_; + wire clkinsel = 1'b1; + end else if (_TECHMAP_CONSTVAL_CLKINSEL_ == 0) begin + localparam INV_CLKINSEL = IS_CLKINSEL_INVERTED; + wire clkinsel = 1'b1; + end else begin + localparam INV_CLKINSEL = IS_CLKINSEL_INVERTED; + wire clkinsel = CLKINSEL; + end endgenerate + + generate if (_TECHMAP_CONSTMSK_PWRDWN_ == 1) begin + localparam INV_PWRDWN = !_TECHMAP_CONSTVAL_PWRDWN_; + wire pwrdwn = 1'b1; + end else if (_TECHMAP_CONSTVAL_PWRDWN_ == 0) begin + localparam INV_PWRDWN = ~IS_PWRDWN_INVERTED; + wire pwrdwn = 1'b1; + end else begin + localparam INV_PWRDWN = IS_PWRDWN_INVERTED; + wire pwrdwn = PWRDWN; + end endgenerate + + generate if (_TECHMAP_CONSTMSK_RST_ == 1) begin + localparam INV_RST = !_TECHMAP_CONSTVAL_PWRDWN_; + wire rst = 1'b1; + end else if (_TECHMAP_CONSTVAL_RST_ == 0) begin + localparam INV_RST = ~IS_RST_INVERTED; + wire rst = 1'b1; + end else begin + localparam INV_RST = IS_RST_INVERTED; + wire rst = RST; + end endgenerate + + generate if (_TECHMAP_CONSTMSK_DCLK_ == 1) + wire dclk = _TECHMAP_CONSTVAL_DCLK_; + else if (_TECHMAP_CONSTVAL_DCLK_ == 0) + wire dclk = 1'b0; + else + wire dclk = DCLK; + endgenerate + + generate if (_TECHMAP_CONSTMSK_DEN_ == 1) + wire den = _TECHMAP_CONSTVAL_DEN_; + else if (_TECHMAP_CONSTVAL_DEN_ == 0) + wire den = 1'b0; + else + wire den = DEN; + endgenerate + + generate if (_TECHMAP_CONSTMSK_DWE_ == 1) + wire dwe = _TECHMAP_CONSTVAL_DWE_; + else if (_TECHMAP_CONSTVAL_DWE_ == 0) + wire dwe = 1'b0; + else + wire dwe = DWE; + endgenerate + + // The substituted cell + PLLE2_ADV_VPR # + ( + // Inverters + .INV_CLKINSEL(INV_CLKINSEL), + .ZINV_PWRDWN (INV_PWRDWN), + .ZINV_RST (INV_RST), + + // Straight mapped parameters + .STARTUP_WAIT(STARTUP_WAIT == "TRUE"), + + // Lookup tables + .LKTABLE(pll_lktable_lookup(CLKFBOUT_MULT)), + .TABLE(pll_table_lookup(CLKFBOUT_MULT, BANDWIDTH)), + + // FIXME: How to compute values the two below ? + .FILTREG1_RESERVED(12'b0000_00001000), + .LOCKREG3_RESERVED(1'b1), + + // Clock feedback settings + .CLKFBOUT_CLKOUT1_HIGH_TIME (CLKFBOUT_REGS[11:6]), + .CLKFBOUT_CLKOUT1_LOW_TIME (CLKFBOUT_REGS[5:0]), + .CLKFBOUT_CLKOUT1_PHASE_MUX (CLKFBOUT_REGS[15:13]), + .CLKFBOUT_CLKOUT2_DELAY_TIME (CLKFBOUT_REGS[21:16]), + .CLKFBOUT_CLKOUT2_EDGE (CLKFBOUT_REGS[23]), + .CLKFBOUT_CLKOUT2_NO_COUNT (CLKFBOUT_REGS[22]), + + // Internal VCO divider settings + .DIVCLK_DIVCLK_HIGH_TIME (DIVCLK_REGS[11:6]), + .DIVCLK_DIVCLK_LOW_TIME (DIVCLK_REGS[5:0]), + .DIVCLK_DIVCLK_NO_COUNT (DIVCLK_REGS[22]), + .DIVCLK_DIVCLK_EDGE (DIVCLK_REGS[23]), + + // CLKOUT0 + .CLKOUT0_CLKOUT1_HIGH_TIME (CLKOUT0_REGS[11:6]), + .CLKOUT0_CLKOUT1_LOW_TIME (CLKOUT0_REGS[5:0]), + .CLKOUT0_CLKOUT1_PHASE_MUX (CLKOUT0_REGS[15:13]), + .CLKOUT0_CLKOUT2_DELAY_TIME (CLKOUT0_REGS[21:16]), + .CLKOUT0_CLKOUT2_EDGE (CLKOUT0_REGS[23]), + .CLKOUT0_CLKOUT2_NO_COUNT (CLKOUT0_REGS[22]), + + // CLKOUT1 + .CLKOUT1_CLKOUT1_HIGH_TIME (CLKOUT1_REGS[11:6]), + .CLKOUT1_CLKOUT1_LOW_TIME (CLKOUT1_REGS[5:0]), + .CLKOUT1_CLKOUT1_PHASE_MUX (CLKOUT1_REGS[15:13]), + .CLKOUT1_CLKOUT2_DELAY_TIME (CLKOUT1_REGS[21:16]), + .CLKOUT1_CLKOUT2_EDGE (CLKOUT1_REGS[23]), + .CLKOUT1_CLKOUT2_NO_COUNT (CLKOUT1_REGS[22]), + + // CLKOUT2 + .CLKOUT2_CLKOUT1_HIGH_TIME (CLKOUT2_REGS[11:6]), + .CLKOUT2_CLKOUT1_LOW_TIME (CLKOUT2_REGS[5:0]), + .CLKOUT2_CLKOUT1_PHASE_MUX (CLKOUT2_REGS[15:13]), + .CLKOUT2_CLKOUT2_DELAY_TIME (CLKOUT2_REGS[21:16]), + .CLKOUT2_CLKOUT2_EDGE (CLKOUT2_REGS[23]), + .CLKOUT2_CLKOUT2_NO_COUNT (CLKOUT2_REGS[22]), + + // CLKOUT3 + .CLKOUT3_CLKOUT1_HIGH_TIME (CLKOUT3_REGS[11:6]), + .CLKOUT3_CLKOUT1_LOW_TIME (CLKOUT3_REGS[5:0]), + .CLKOUT3_CLKOUT1_PHASE_MUX (CLKOUT3_REGS[15:13]), + .CLKOUT3_CLKOUT2_DELAY_TIME (CLKOUT3_REGS[21:16]), + .CLKOUT3_CLKOUT2_EDGE (CLKOUT3_REGS[23]), + .CLKOUT3_CLKOUT2_NO_COUNT (CLKOUT3_REGS[22]), + + // CLKOUT4 + .CLKOUT4_CLKOUT1_HIGH_TIME (CLKOUT4_REGS[11:6]), + .CLKOUT4_CLKOUT1_LOW_TIME (CLKOUT4_REGS[5:0]), + .CLKOUT4_CLKOUT1_PHASE_MUX (CLKOUT4_REGS[15:13]), + .CLKOUT4_CLKOUT2_DELAY_TIME (CLKOUT4_REGS[21:16]), + .CLKOUT4_CLKOUT2_EDGE (CLKOUT4_REGS[23]), + .CLKOUT4_CLKOUT2_NO_COUNT (CLKOUT4_REGS[22]), + + // CLKOUT5 + .CLKOUT5_CLKOUT1_HIGH_TIME (CLKOUT5_REGS[11:6]), + .CLKOUT5_CLKOUT1_LOW_TIME (CLKOUT5_REGS[5:0]), + .CLKOUT5_CLKOUT1_PHASE_MUX (CLKOUT5_REGS[15:13]), + .CLKOUT5_CLKOUT2_DELAY_TIME (CLKOUT5_REGS[21:16]), + .CLKOUT5_CLKOUT2_EDGE (CLKOUT5_REGS[23]), + .CLKOUT5_CLKOUT2_NO_COUNT (CLKOUT5_REGS[22]), + + // Clock output enable controls + .CLKFBOUT_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKFBOUT_ === 1'bX), + + .CLKOUT0_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT0_ === 1'bX), + .CLKOUT1_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT1_ === 1'bX), + .CLKOUT2_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT2_ === 1'bX), + .CLKOUT3_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT3_ === 1'bX), + .CLKOUT4_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT4_ === 1'bX), + .CLKOUT5_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT5_ === 1'bX) + ) + _TECHMAP_REPLACE_ + ( + .CLKFBIN(CLKFBIN), + .CLKIN1(CLKIN1), + .CLKIN2(CLKIN2), + .CLKFBOUT(CLKFBOUT), + .CLKOUT0(CLKOUT0), + .CLKOUT1(CLKOUT1), + .CLKOUT2(CLKOUT2), + .CLKOUT3(CLKOUT3), + .CLKOUT4(CLKOUT4), + .CLKOUT5(CLKOUT5), + + .CLKINSEL (clkinsel), + + .PWRDWN (pwrdwn), + .RST (rst), + .LOCKED (LOCKED), + + .DCLK (dclk), + .DEN (den), + .DWE (dwe), + .DRDY (DRDY), + .DADDR(DADDR), + .DI (DI), + .DO (DO) + ); + +endmodule + +// PLLE2_BASE +module PLLE2_BASE +( +input CLKFBIN, +input CLKIN, + +output CLKFBOUT, +output CLKOUT0, +output CLKOUT1, +output CLKOUT2, +output CLKOUT3, +output CLKOUT4, +output CLKOUT5, + +input RST, +output LOCKED +); + + parameter IS_CLKINSEL_INVERTED = 1'b0; + parameter IS_RST_INVERTED = 1'b0; + + parameter BANDWIDTH = "OPTIMIZED"; + parameter STARTUP_WAIT = "FALSE"; + + parameter CLKIN1_PERIOD = 0.0; + parameter REF_JITTER1 = 0.1; + + parameter [5:0] DIVCLK_DIVIDE = 1; + + parameter [5:0] CLKFBOUT_MULT = 1; + parameter signed CLKFBOUT_PHASE = 0; + + parameter [6:0] CLKOUT0_DIVIDE = 1; + parameter CLKOUT0_DUTY_CYCLE = 50000; + parameter signed CLKOUT0_PHASE = 0; + + parameter [6:0] CLKOUT1_DIVIDE = 1; + parameter CLKOUT1_DUTY_CYCLE = 50000; + parameter signed CLKOUT1_PHASE = 0; + + parameter [6:0] CLKOUT2_DIVIDE = 1; + parameter CLKOUT2_DUTY_CYCLE = 50000; + parameter signed CLKOUT2_PHASE = 0; + + parameter [6:0] CLKOUT3_DIVIDE = 1; + parameter CLKOUT3_DUTY_CYCLE = 50000; + parameter signed CLKOUT3_PHASE = 0; + + parameter [6:0] CLKOUT4_DIVIDE = 1; + parameter CLKOUT4_DUTY_CYCLE = 50000; + parameter signed CLKOUT4_PHASE = 0; + + parameter [6:0] CLKOUT5_DIVIDE = 1; + parameter CLKOUT5_DUTY_CYCLE = 50000; + parameter signed CLKOUT5_PHASE = 0; + + // The substituted cell + PLLE2_ADV # + ( + .IS_CLKINSEL_INVERTED(IS_CLKINSEL_INVERTED), + .IS_RST_INVERTED(IS_RST_INVERTED), + .IS_PWRDWN_INVERTED(1'b0), + + .BANDWIDTH(BANDWIDTH), + .STARTUP_WAIT(STARTUP_WAIT), + + .CLKIN1_PERIOD(CLKIN1_PERIOD), + .REF_JITTER1(REF_JITTER1), + + .DIVCLK_DIVIDE(DIVCLK_DIVIDE), + + .CLKFBOUT_MULT(CLKFBOUT_MULT), + .CLKFBOUT_PHASE(CLKFBOUT_PHASE), + + .CLKOUT0_DIVIDE(CLKOUT0_DIVIDE), + .CLKOUT0_DUTY_CYCLE(CLKOUT0_DUTY_CYCLE), + .CLKOUT0_PHASE(CLKOUT0_PHASE), + + .CLKOUT1_DIVIDE(CLKOUT1_DIVIDE), + .CLKOUT1_DUTY_CYCLE(CLKOUT1_DUTY_CYCLE), + .CLKOUT1_PHASE(CLKOUT1_PHASE), + + .CLKOUT2_DIVIDE(CLKOUT2_DIVIDE), + .CLKOUT2_DUTY_CYCLE(CLKOUT2_DUTY_CYCLE), + .CLKOUT2_PHASE(CLKOUT2_PHASE), + + .CLKOUT3_DIVIDE(CLKOUT3_DIVIDE), + .CLKOUT3_DUTY_CYCLE(CLKOUT3_DUTY_CYCLE), + .CLKOUT3_PHASE(CLKOUT3_PHASE), + + .CLKOUT4_DIVIDE(CLKOUT4_DIVIDE), + .CLKOUT4_DUTY_CYCLE(CLKOUT4_DUTY_CYCLE), + .CLKOUT4_PHASE(CLKOUT4_PHASE), + + .CLKOUT5_DIVIDE(CLKOUT5_DIVIDE), + .CLKOUT5_DUTY_CYCLE(CLKOUT5_DUTY_CYCLE), + .CLKOUT5_PHASE(CLKOUT5_PHASE) + ) + _TECHMAP_REPLACE_ + ( + .CLKFBIN(CLKFBIN), + .CLKIN1(CLKIN), + .CLKINSEL(1'b1), + + .CLKFBOUT(CLKFBOUT), + .CLKOUT0(CLKOUT0), + .CLKOUT1(CLKOUT1), + .CLKOUT2(CLKOUT2), + .CLKOUT3(CLKOUT3), + .CLKOUT4(CLKOUT4), + .CLKOUT5(CLKOUT5), + + .PWRDWN(1'b0), + .RST(RST), + .LOCKED(LOCKED), + + .DCLK(1'b0), + .DEN(1'b0), + .DWE(1'b0), + .DRDY(), + .DADDR(7'd0), + .DI(16'd0), + .DO() + ); + +endmodule diff --git a/params-plugin/tests/techmaps/cells_sim.v b/params-plugin/tests/techmaps/cells_sim.v new file mode 100644 index 000000000..607f98b80 --- /dev/null +++ b/params-plugin/tests/techmaps/cells_sim.v @@ -0,0 +1,145 @@ +// ============================================================================ +// CMT + +// PLLE2_ADV_VPR +(* blackbox *) +module PLLE2_ADV_VPR +( +input CLKFBIN, +input CLKIN1, +input CLKIN2, +input CLKINSEL, + +output CLKFBOUT, +output CLKOUT0, +output CLKOUT1, +output CLKOUT2, +output CLKOUT3, +output CLKOUT4, +output CLKOUT5, + +input PWRDWN, +input RST, +output LOCKED, + +input DCLK, +input DEN, +input DWE, +output DRDY, +input [ 6:0] DADDR, +input [15:0] DI, +output [15:0] DO +); + + parameter [0:0] INV_CLKINSEL = 1'd0; + parameter [0:0] ZINV_PWRDWN = 1'd0; + parameter [0:0] ZINV_RST = 1'd1; + + parameter [0:0] STARTUP_WAIT = 1'd0; + + // Tables + parameter [9:0] TABLE = 10'd0; + parameter [39:0] LKTABLE = 40'd0; + parameter [15:0] POWER_REG = 16'd0; + parameter [11:0] FILTREG1_RESERVED = 12'd0; + parameter [9:0] FILTREG2_RESERVED = 10'd0; + parameter [5:0] LOCKREG1_RESERVED = 6'd0; + parameter [0:0] LOCKREG2_RESERVED = 1'b0; + parameter [0:0] LOCKREG3_RESERVED = 1'b0; + + // DIVCLK + parameter [5:0] DIVCLK_DIVCLK_HIGH_TIME = 6'd0; + parameter [5:0] DIVCLK_DIVCLK_LOW_TIME = 6'd0; + parameter [0:0] DIVCLK_DIVCLK_NO_COUNT = 1'b1; + parameter [0:0] DIVCLK_DIVCLK_EDGE = 1'b0; + + // CLKFBOUT + parameter [5:0] CLKFBOUT_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKFBOUT_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKFBOUT_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKFBOUT_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKFBOUT_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKFBOUT_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKFBOUT_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKFBOUT_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKFBOUT_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKFBOUT_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT0 + parameter [5:0] CLKOUT0_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT0_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT0_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT0_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT0_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT0_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT0_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT0_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT0_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT0_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT1 + parameter [5:0] CLKOUT1_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT1_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT1_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT1_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT1_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT1_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT1_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT1_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT1_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT1_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT2 + parameter [5:0] CLKOUT2_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT2_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT2_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT2_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT2_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT2_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT2_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT2_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT2_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT2_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT3 + parameter [5:0] CLKOUT3_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT3_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT3_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT3_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT3_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT3_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT3_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT3_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT3_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT3_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT4 + parameter [5:0] CLKOUT4_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT4_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT4_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT4_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT4_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT4_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT4_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT4_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT4_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT4_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT5 + parameter [5:0] CLKOUT5_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT5_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT5_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT5_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT5_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT5_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT5_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT5_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT5_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT5_CLKOUT2_NO_COUNT = 1'b1; + + + // TODO: Compensation parameters + + // TODO: How to simulate a PLL in verilog (i.e. the VCO) ??? + +endmodule diff --git a/params-plugin/tests/xc7a35tcsg324-1.json b/params-plugin/tests/xc7a35tcsg324-1.json new file mode 100644 index 000000000..602b949ab --- /dev/null +++ b/params-plugin/tests/xc7a35tcsg324-1.json @@ -0,0 +1,10 @@ +{ + "iobanks": { + "0": "X1Y78", + "14": "X1Y26", + "15": "X1Y78", + "16": "X1Y130", + "34": "X113Y26", + "35": "X113Y78" + } +} From 2e38efa50b56e4fa18e1dfb059056edbd093f766 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 10 Jul 2020 13:24:43 +0200 Subject: [PATCH 066/845] Params plugin: Change command name to getparam Signed-off-by: Tomasz Michalak --- params-plugin/params.cc | 4 ++-- params-plugin/tests/pll/pll.tcl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/params-plugin/params.cc b/params-plugin/params.cc index 19cebfbb4..76f4a37f5 100644 --- a/params-plugin/params.cc +++ b/params-plugin/params.cc @@ -32,7 +32,7 @@ void register_in_tcl_interpreter(const std::string& command) { } struct GetParam : public Pass { - GetParam() : Pass("get_param", "get parameter on object") { + GetParam() : Pass("getparam", "get parameter on object") { register_in_tcl_interpreter(pass_name); } @@ -40,7 +40,7 @@ struct GetParam : public Pass { { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" get_param name selection\n"); + log(" getparam name selection\n"); log("\n"); log("Get the given parameter on the selected object. \n"); log("\n"); diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl index c2238d116..039623668 100644 --- a/params-plugin/tests/pll/pll.tcl +++ b/params-plugin/tests/pll/pll.tcl @@ -7,10 +7,10 @@ yosys -import read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top -set phase [get_param CLKOUT2_PHASE top/PLLE2_ADV] +set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV] puts "Phase before: $phase" setparam -set CLKOUT2_PHASE [expr $phase * 1000] top/PLLE2_ADV -puts "Phase after: [get_param CLKOUT2_PHASE top/PLLE2_ADV]" +puts "Phase after: [getparam CLKOUT2_PHASE top/PLLE2_ADV]" # Start flow after library reading synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -run prepare:check From a6310c9b0909c41b4cc2b2bb947eae2d75c95745 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 10 Jul 2020 13:50:24 +0200 Subject: [PATCH 067/845] Params plugin: Move IdString outside of loop Signed-off-by: Tomasz Michalak --- params-plugin/params.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/params-plugin/params.cc b/params-plugin/params.cc index 76f4a37f5..a386e1f98 100644 --- a/params-plugin/params.cc +++ b/params-plugin/params.cc @@ -52,14 +52,14 @@ struct GetParam : public Pass { log_error("Incorrect number of arguments"); } - std::string param(args.at(1)); + auto param = RTLIL::IdString(RTLIL::escape_id(args.at(1))); std::string value; extra_args(args, 2, design); for (auto module : design->selected_modules()) { for (auto cell : module->selected_cells()) { auto params = cell->parameters; - auto it = params.find(RTLIL::IdString(RTLIL::escape_id(param))); + auto it = params.find(param); if (it != params.end()) { auto param_obj = it->second; if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { From 7c99fa95b3124897b0c54be7f6ceb816852e37fe Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 10 Jul 2020 16:22:39 +0200 Subject: [PATCH 068/845] Params plugin: Allow more objects in selection Signed-off-by: Tomasz Michalak --- params-plugin/params.cc | 14 +++--- params-plugin/tests/pll/pll.golden.json | 63 +++++++++++++++++++++++++ params-plugin/tests/pll/pll.tcl | 7 +-- params-plugin/tests/pll/pll.v | 23 +++++++++ 4 files changed, 97 insertions(+), 10 deletions(-) diff --git a/params-plugin/params.cc b/params-plugin/params.cc index a386e1f98..c4f169b41 100644 --- a/params-plugin/params.cc +++ b/params-plugin/params.cc @@ -51,30 +51,30 @@ struct GetParam : public Pass { if (args.size() == 1) { log_error("Incorrect number of arguments"); } + extra_args(args, 2, design); auto param = RTLIL::IdString(RTLIL::escape_id(args.at(1))); - std::string value; - extra_args(args, 2, design); + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); for (auto module : design->selected_modules()) { for (auto cell : module->selected_cells()) { auto params = cell->parameters; auto it = params.find(param); if (it != params.end()) { + std::string value; auto param_obj = it->second; if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { value = param_obj.decode_string(); } else { value = std::to_string(param_obj.as_int()); } + Tcl_Obj* value_obj = Tcl_NewStringObj(value.c_str(), value.size()); + Tcl_ListObjAppendElement(interp, tcl_list, value_obj); } } } - - char* tcl_param = Tcl_Alloc(value.size() + 1); - strcpy(tcl_param, value.c_str()); - Tcl_Interp *interp = yosys_get_tcl_interp(); - Tcl_SetResult(interp, tcl_param, TCL_DYNAMIC); + Tcl_SetObjResult(interp, tcl_list); } } GetParam; diff --git a/params-plugin/tests/pll/pll.golden.json b/params-plugin/tests/pll/pll.golden.json index e3bf97dd1..bdc478eca 100644 --- a/params-plugin/tests/pll/pll.golden.json +++ b/params-plugin/tests/pll/pll.golden.json @@ -61,5 +61,68 @@ "TABLE": "1111110100", "ZINV_PWRDWN": "1", "ZINV_RST": "0" + }, + "PLLE2_ADV_0": { + "CLKFBOUT_CLKOUT1_HIGH_TIME": "000110", + "CLKFBOUT_CLKOUT1_LOW_TIME": "000110", + "CLKFBOUT_CLKOUT1_OUTPUT_ENABLE": "1", + "CLKFBOUT_CLKOUT1_PHASE_MUX": "000", + "CLKFBOUT_CLKOUT2_DELAY_TIME": "000000", + "CLKFBOUT_CLKOUT2_EDGE": "0", + "CLKFBOUT_CLKOUT2_NO_COUNT": "0", + "CLKOUT0_CLKOUT1_HIGH_TIME": "001010", + "CLKOUT0_CLKOUT1_LOW_TIME": "001010", + "CLKOUT0_CLKOUT1_OUTPUT_ENABLE": "1", + "CLKOUT0_CLKOUT1_PHASE_MUX": "000", + "CLKOUT0_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT0_CLKOUT2_EDGE": "0", + "CLKOUT0_CLKOUT2_NO_COUNT": "0", + "CLKOUT1_CLKOUT1_HIGH_TIME": "000010", + "CLKOUT1_CLKOUT1_LOW_TIME": "000011", + "CLKOUT1_CLKOUT1_OUTPUT_ENABLE": "1", + "CLKOUT1_CLKOUT1_PHASE_MUX": "000", + "CLKOUT1_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT1_CLKOUT2_EDGE": "1", + "CLKOUT1_CLKOUT2_NO_COUNT": "0", + "CLKOUT2_CLKOUT1_HIGH_TIME": "000010", + "CLKOUT2_CLKOUT1_LOW_TIME": "000011", + "CLKOUT2_CLKOUT1_OUTPUT_ENABLE": "0", + "CLKOUT2_CLKOUT1_PHASE_MUX": "000", + "CLKOUT2_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT2_CLKOUT2_EDGE": "1", + "CLKOUT2_CLKOUT2_NO_COUNT": "0", + "CLKOUT3_CLKOUT1_HIGH_TIME": "000011", + "CLKOUT3_CLKOUT1_LOW_TIME": "000011", + "CLKOUT3_CLKOUT1_OUTPUT_ENABLE": "0", + "CLKOUT3_CLKOUT1_PHASE_MUX": "000", + "CLKOUT3_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT3_CLKOUT2_EDGE": "0", + "CLKOUT3_CLKOUT2_NO_COUNT": "0", + "CLKOUT4_CLKOUT1_HIGH_TIME": "000001", + "CLKOUT4_CLKOUT1_LOW_TIME": "000001", + "CLKOUT4_CLKOUT1_OUTPUT_ENABLE": "0", + "CLKOUT4_CLKOUT1_PHASE_MUX": "000", + "CLKOUT4_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT4_CLKOUT2_EDGE": "0", + "CLKOUT4_CLKOUT2_NO_COUNT": "1", + "CLKOUT5_CLKOUT1_HIGH_TIME": "000001", + "CLKOUT5_CLKOUT1_LOW_TIME": "000001", + "CLKOUT5_CLKOUT1_OUTPUT_ENABLE": "0", + "CLKOUT5_CLKOUT1_PHASE_MUX": "000", + "CLKOUT5_CLKOUT2_DELAY_TIME": "000000", + "CLKOUT5_CLKOUT2_EDGE": "0", + "CLKOUT5_CLKOUT2_NO_COUNT": "1", + "DIVCLK_DIVCLK_EDGE": "0", + "DIVCLK_DIVCLK_HIGH_TIME": "000001", + "DIVCLK_DIVCLK_LOW_TIME": "000001", + "DIVCLK_DIVCLK_NO_COUNT": "1", + "FILTREG1_RESERVED": "000000001000", + "INV_CLKINSEL": "0", + "LKTABLE": "1111111111110011100111111010010000000001", + "LOCKREG3_RESERVED": "1", + "STARTUP_WAIT": "0", + "TABLE": "1111110100", + "ZINV_PWRDWN": "1", + "ZINV_RST": "0" } } \ No newline at end of file diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl index 039623668..3072cde54 100644 --- a/params-plugin/tests/pll/pll.tcl +++ b/params-plugin/tests/pll/pll.tcl @@ -7,10 +7,11 @@ yosys -import read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top -set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV] +set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV] puts "Phase before: $phase" -setparam -set CLKOUT2_PHASE [expr $phase * 1000] top/PLLE2_ADV -puts "Phase after: [getparam CLKOUT2_PHASE top/PLLE2_ADV]" +setparam -set CLKOUT2_PHASE [expr [lindex $phase 0] * 1000] top/PLLE2_ADV +puts "Phase after: [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV]" + # Start flow after library reading synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -run prepare:check diff --git a/params-plugin/tests/pll/pll.v b/params-plugin/tests/pll/pll.v index a1eeb3876..b6ddcea53 100644 --- a/params-plugin/tests/pll/pll.v +++ b/params-plugin/tests/pll/pll.v @@ -11,6 +11,29 @@ assign led[0] = main_locked; assign led[1] = main_clkout0; assign led[2] = main_clkout1; +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(5'd20), + .CLKOUT0_PHASE(1'd0), + .CLKOUT1_DIVIDE(3'd5), + .CLKOUT1_PHASE(1'd0), + .CLKOUT2_DIVIDE(3'd5), + .CLKOUT2_PHASE(7'd70), + .CLKOUT3_DIVIDE(3'd6), + .CLKOUT3_PHASE(1'd0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV_0 ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk100), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .LOCKED(main_locked) +); PLLE2_ADV #( .CLKFBOUT_MULT(4'd12), .CLKIN1_PERIOD(10.0), From 6150019b6bec846ccd7666a896f99e92d42af655 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 13 Jul 2020 14:18:53 +0200 Subject: [PATCH 069/845] Params plugin: Improve getparam test Signed-off-by: Tomasz Michalak --- params-plugin/tests/Makefile | 2 +- params-plugin/tests/pll/pll.tcl | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/params-plugin/tests/Makefile b/params-plugin/tests/Makefile index 2ab247e79..a3f2ff30e 100644 --- a/params-plugin/tests/Makefile +++ b/params-plugin/tests/Makefile @@ -1,6 +1,6 @@ TESTS = pll -pll_verify = $(call compare_json,pll) +pll_verify = $(call compare_json,pll) && test $$(grep "PASS" pll/params.txt | wc -l) -eq 2 all: $(TESTS) diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl index 3072cde54..f06bc3d04 100644 --- a/params-plugin/tests/pll/pll.tcl +++ b/params-plugin/tests/pll/pll.tcl @@ -8,9 +8,25 @@ read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV] -puts "Phase before: $phase" +if {[llength $phase] != 2} { + error "Getparam should return a list with 2 elements" +} +set fp [open "params.txt" "w"] +puts -nonewline $fp "Phase before: " +if {$phase == [list 90 70]} { + puts $fp "PASS" +} else { + puts $fp "FAIL" +} setparam -set CLKOUT2_PHASE [expr [lindex $phase 0] * 1000] top/PLLE2_ADV -puts "Phase after: [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV]" +set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV] +puts -nonewline $fp "Phase after: " +if {$phase == [list 90000 70]} { + puts $fp "PASS" +} else { + puts $fp "FAIL" +} +close $fp # Start flow after library reading synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -run prepare:check From 54fd045cb46f4be3ea7d816a737a537afd0ebd13 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 13 Jul 2020 14:32:29 +0200 Subject: [PATCH 070/845] Params plugin: Don't install plugin before test Signed-off-by: Tomasz Michalak --- params-plugin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params-plugin/Makefile b/params-plugin/Makefile index d0fd04702..1cce08540 100644 --- a/params-plugin/Makefile +++ b/params-plugin/Makefile @@ -13,7 +13,7 @@ install_plugin: params.so mkdir -p $(PLUGINS_DIR) cp $< $(PLUGINS_DIR)/$< -test: install_plugin +test: $(MAKE) -C tests all .PHONY: install From 53260ea0d53e1ca560eb00658bff956b67ab9077 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 13 Jul 2020 14:41:15 +0200 Subject: [PATCH 071/845] Params plugin: Add more verbosity when test fails Signed-off-by: Tomasz Michalak --- params-plugin/tests/pll/pll.tcl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl index f06bc3d04..f6a6bf8a2 100644 --- a/params-plugin/tests/pll/pll.tcl +++ b/params-plugin/tests/pll/pll.tcl @@ -1,30 +1,38 @@ yosys -import plugin -i xdc plugin -i params -#Import the commands from the plugins to the tcl interpreter +# Import the commands from the plugins to the tcl interpreter yosys -import read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top + +# Check phase parameter values on bith PLLE2_ADV instances +set reference_phase [list 90 70] set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV] if {[llength $phase] != 2} { error "Getparam should return a list with 2 elements" } set fp [open "params.txt" "w"] puts -nonewline $fp "Phase before: " -if {$phase == [list 90 70]} { +if {$phase == $reference_phase} { puts $fp "PASS" } else { - puts $fp "FAIL" + puts $fp "FAIL: $phase != $reference_phase" } + +# Modify the phase parameter value on one of the PLLE2_ADV instances setparam -set CLKOUT2_PHASE [expr [lindex $phase 0] * 1000] top/PLLE2_ADV + +# Verify that the parameter has been correctly updated on the chosen instance +set reference_phase [list 90000 70] set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV] puts -nonewline $fp "Phase after: " -if {$phase == [list 90000 70]} { +if {$phase == $reference_phase} { puts $fp "PASS" } else { - puts $fp "FAIL" + puts $fp "FAIL: $phase != $reference_phase" } close $fp From 213f15dba3887b1738d6cc00ab78428917358ed2 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 27 Aug 2020 16:23:54 +0200 Subject: [PATCH 072/845] Selection plugin: Add initial version of selection_to_tcl_list command Signed-off-by: Tomasz Michalak --- Makefile | 2 +- selection-plugin/Makefile | 25 +++++ selection-plugin/selection.cc | 91 +++++++++++++++++++ selection-plugin/tests/Makefile | 32 +++++++ .../tests/counter/counter.golden.txt | 1 + selection-plugin/tests/counter/counter.tcl | 18 ++++ selection-plugin/tests/counter/counter.v | 36 ++++++++ 7 files changed, 204 insertions(+), 1 deletion(-) create mode 100644 selection-plugin/Makefile create mode 100644 selection-plugin/selection.cc create mode 100644 selection-plugin/tests/Makefile create mode 100644 selection-plugin/tests/counter/counter.golden.txt create mode 100644 selection-plugin/tests/counter/counter.tcl create mode 100644 selection-plugin/tests/counter/counter.v diff --git a/Makefile b/Makefile index fe3f92ded..6818481ed 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params +PLUGIN_LIST := fasm xdc params selection PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/selection-plugin/Makefile b/selection-plugin/Makefile new file mode 100644 index 000000000..6c6f96fef --- /dev/null +++ b/selection-plugin/Makefile @@ -0,0 +1,25 @@ +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) +LDFLAGS = $(shell yosys-config --ldflags) +LDLIBS = $(shell yosys-config --ldlibs) +PLUGINS_DIR = $(shell yosys-config --datdir)/plugins + +OBJS = selection.o + +selection.so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) + +install_plugin: selection.so + mkdir -p $(PLUGINS_DIR) + cp $< $(PLUGINS_DIR)/$< + +test: + $(MAKE) -C tests all + +.PHONY: install +install: install_plugin + +clean: + rm -f *.d *.o *.so + $(MAKE) -C tests clean + diff --git a/selection-plugin/selection.cc b/selection-plugin/selection.cc new file mode 100644 index 000000000..6f224ff9e --- /dev/null +++ b/selection-plugin/selection.cc @@ -0,0 +1,91 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/log.h" + +USING_YOSYS_NAMESPACE + +PRIVATE_NAMESPACE_BEGIN + + +struct SelectionToTclList : public Pass { + SelectionToTclList() : Pass("selection_to_tcl_list", "Extract selection to TCL list") {} + + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" selection_to_tcl_list selection\n"); + log("\n"); + log("Extract the current selection to a Tcl List with selection object names. \n"); + log("\n"); + } + + void AddObjectNameToTclList(RTLIL::IdString& module, RTLIL::IdString& object, Tcl_Obj* tcl_list) { + std::string name = RTLIL::unescape_id(module) + "/" + RTLIL::unescape_id(object); + Tcl_Obj* value_obj = Tcl_NewStringObj(name.c_str(), name.size()); + Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); + } + + void execute(std::vector args, RTLIL::Design* design) override + { + if (args.size() == 1) { + log_error("Incorrect number of arguments"); + } + extra_args(args, 1, design); + + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); + + auto& selection = design->selection(); + if (selection.empty()) { + log_warning("Selection is empty\n"); + } + + for (auto mod : design->modules()) { + if (selection.selected_module(mod->name)) { + for (auto wire : mod->wires()) { + if (selection.selected_member(mod->name, wire->name)) { + AddObjectNameToTclList(mod->name, wire->name, tcl_list); + } + } + for (auto &it : mod->memories) { + if (selection.selected_member(mod->name, it.first)) { + AddObjectNameToTclList(mod->name, it.first, tcl_list); + } + } + for (auto cell : mod->cells()) { + if (selection.selected_member(mod->name, cell->name)) { + AddObjectNameToTclList(mod->name, cell->name, tcl_list); + } + } + for (auto &it : mod->processes) { + if (selection.selected_member(mod->name, it.first)) { + AddObjectNameToTclList(mod->name, it.first, tcl_list); + } + } + } + } + Tcl_SetObjResult(interp, tcl_list); + } + +} SelectionToTclList; + +PRIVATE_NAMESPACE_END diff --git a/selection-plugin/tests/Makefile b/selection-plugin/tests/Makefile new file mode 100644 index 000000000..e29a406b4 --- /dev/null +++ b/selection-plugin/tests/Makefile @@ -0,0 +1,32 @@ +TESTS = counter +.PHONY: $(TESTS) + +counter_verify = $(call compare,counter,txt) + +all: $(TESTS) +compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) + +define test_tpl = +$(1): $(1)/$(1).txt + $$($(1)_verify) + RETVAL=$$$$? ; \ + if [ $$$$RETVAL -eq 0 ]; then \ + echo "$(1) PASS"; \ + true; \ + else \ + echo "$(1) FAIL"; \ + false; \ + fi + +$(1)/$(1).txt: $(1)/$(1).v + cd $(1); \ + INPUT_SDC_FILE=$(1).input.sdc \ + OUTPUT_SDC_FILE=$(1).sdc \ + yosys -p "tcl $(1).tcl" -l yosys.log + +endef + +$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) + +clean: + rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/yosys.log) diff --git a/selection-plugin/tests/counter/counter.golden.txt b/selection-plugin/tests/counter/counter.golden.txt new file mode 100644 index 000000000..aee0a91d5 --- /dev/null +++ b/selection-plugin/tests/counter/counter.golden.txt @@ -0,0 +1 @@ +{middle/$1\cnt[1:0]} {middle/$add$counter.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {top/$1\cnt[1:0]} {top/$add$counter.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk diff --git a/selection-plugin/tests/counter/counter.tcl b/selection-plugin/tests/counter/counter.tcl new file mode 100644 index 000000000..aa5a52446 --- /dev/null +++ b/selection-plugin/tests/counter/counter.tcl @@ -0,0 +1,18 @@ +yosys -import +plugin -i selection + +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog counter.v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top + +puts "List: [selection_to_tcl_list w:*]" + +# Write the selection to file +set fh [open counter.txt w] +set selection_list [selection_to_tcl_list w:*] +puts $fh $selection_list +close $fh diff --git a/selection-plugin/tests/counter/counter.v b/selection-plugin/tests/counter/counter.v new file mode 100644 index 000000000..564fae58f --- /dev/null +++ b/selection-plugin/tests/counter/counter.v @@ -0,0 +1,36 @@ +module top(input clk, + input clk2, + input [1:0] in, + output [5:0] out ); + +reg [1:0] cnt = 0; +wire clk_int_1, clk_int_2; +IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); +IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); +assign clk_int_1 = ibuf_out; +assign clk_int_2 = clk_int_1; + +always @(posedge clk_int_2) begin + cnt <= cnt + 1; +end + +middle middle_inst_1(.clk(ibuf_out), .out(out[2])); +middle middle_inst_2(.clk(clk_int_1), .out(out[3])); +middle middle_inst_3(.clk(clk_int_2), .out(out[4])); +middle middle_inst_4(.clk(clk2), .out(out[5])); + +assign out[1:0] = {cnt[0], in[0]}; +endmodule + +module middle(input clk, + output out); + +reg [1:0] cnt = 0; +wire clk_int; +assign clk_int = clk; +always @(posedge clk_int) begin + cnt <= cnt + 1; +end + +assign out = cnt[0]; +endmodule From 0819cafd3ff51fe95bbf05e5a1ff517f681e3410 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 28 Aug 2020 13:22:48 +0200 Subject: [PATCH 073/845] Selection plugin: Add testing tcl procedure Signed-off-by: Tomasz Michalak --- .../tests/counter/counter.golden.txt | 4 ++- selection-plugin/tests/counter/counter.tcl | 34 +++++++++++++++---- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/selection-plugin/tests/counter/counter.golden.txt b/selection-plugin/tests/counter/counter.golden.txt index aee0a91d5..e8183f05f 100644 --- a/selection-plugin/tests/counter/counter.golden.txt +++ b/selection-plugin/tests/counter/counter.golden.txt @@ -1 +1,3 @@ -{middle/$1\cnt[1:0]} {middle/$add$counter.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {top/$1\cnt[1:0]} {top/$add$counter.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk +1 +1 +1 diff --git a/selection-plugin/tests/counter/counter.tcl b/selection-plugin/tests/counter/counter.tcl index aa5a52446..1ec5c87b1 100644 --- a/selection-plugin/tests/counter/counter.tcl +++ b/selection-plugin/tests/counter/counter.tcl @@ -4,15 +4,37 @@ plugin -i selection # Import the commands from the plugins to the tcl interpreter yosys -import +proc selection_to_tcl_list_through_file { expression } { + set file_name "[pid].txt" + select $expression -write $file_name + set fh [open $file_name r] + set result [list] + while {[gets $fh line] >= 0} { + lappend result $line + } + close $fh + file delete $file_name + return $result +} + +proc test_selection { expression {debug 0} } { + if {$debug} { + puts "List from file: [selection_to_tcl_list_through_file $expression]" + puts "List in selection: [selection_to_tcl_list $expression]" + } + return [expr {[selection_to_tcl_list_through_file $expression] == [selection_to_tcl_list $expression]}] +} + read_verilog counter.v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top -puts "List: [selection_to_tcl_list w:*]" +# Test the selection command and write results to file +set rfh [open counter.txt w] + +puts $rfh [test_selection "t:*"] +puts $rfh [test_selection "w:*"] +puts $rfh [test_selection "*"] -# Write the selection to file -set fh [open counter.txt w] -set selection_list [selection_to_tcl_list w:*] -puts $fh $selection_list -close $fh +close $rfh From fd1992c46ce2c053a0adb687ae5c45e9e631641f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 31 Aug 2020 13:33:04 +0200 Subject: [PATCH 074/845] Params plugin: Return tcl error when test fails Signed-off-by: Tomasz Michalak --- .../tests/counter/counter.golden.txt | 6 ++--- selection-plugin/tests/counter/counter.tcl | 23 +++++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/selection-plugin/tests/counter/counter.golden.txt b/selection-plugin/tests/counter/counter.golden.txt index e8183f05f..7122e8b97 100644 --- a/selection-plugin/tests/counter/counter.golden.txt +++ b/selection-plugin/tests/counter/counter.golden.txt @@ -1,3 +1,3 @@ -1 -1 -1 +{middle/$add$counter.v:32$5} top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$counter.v:14$2} top/ibuf_inst top/ibuf_proxy +{middle/$1\cnt[1:0]} {middle/$add$counter.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {top/$1\cnt[1:0]} {top/$add$counter.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk +{middle/$1\cnt[1:0]} {middle/$add$counter.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {middle/$add$counter.v:32$5} {middle/$proc$counter.v:28$6} {middle/$proc$counter.v:31$4} {top/$1\cnt[1:0]} {top/$add$counter.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$counter.v:14$2} top/ibuf_inst top/ibuf_proxy {top/$proc$counter.v:6$3} {top/$proc$counter.v:13$1} diff --git a/selection-plugin/tests/counter/counter.tcl b/selection-plugin/tests/counter/counter.tcl index 1ec5c87b1..5475822aa 100644 --- a/selection-plugin/tests/counter/counter.tcl +++ b/selection-plugin/tests/counter/counter.tcl @@ -4,9 +4,9 @@ plugin -i selection # Import the commands from the plugins to the tcl interpreter yosys -import -proc selection_to_tcl_list_through_file { expression } { +proc selection_to_tcl_list_through_file { selection } { set file_name "[pid].txt" - select $expression -write $file_name + select $selection -write $file_name set fh [open $file_name r] set result [list] while {[gets $fh line] >= 0} { @@ -17,12 +17,14 @@ proc selection_to_tcl_list_through_file { expression } { return $result } -proc test_selection { expression {debug 0} } { - if {$debug} { - puts "List from file: [selection_to_tcl_list_through_file $expression]" - puts "List in selection: [selection_to_tcl_list $expression]" +proc test_selection { rfh selection } { + if {[expr {[selection_to_tcl_list_through_file $selection] != [selection_to_tcl_list $selection]}]} { + puts "List from file: [selection_to_tcl_list_through_file $selection]" + puts "List in selection: [selection_to_tcl_list $selection]" + error "Test with selection: $selection failed" + } else { + puts $rfh [selection_to_tcl_list $selection] } - return [expr {[selection_to_tcl_list_through_file $expression] == [selection_to_tcl_list $expression]}] } read_verilog counter.v @@ -33,8 +35,9 @@ hierarchy -check -auto-top # Test the selection command and write results to file set rfh [open counter.txt w] -puts $rfh [test_selection "t:*"] -puts $rfh [test_selection "w:*"] -puts $rfh [test_selection "*"] +set selection_tests [list "t:*" "w:*" "*"] +foreach test $selection_tests { + test_selection $rfh $test +} close $rfh From 99e718f67f7bb4e01942f5be8e032e41e68642a9 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 8 Sep 2020 09:57:19 +0200 Subject: [PATCH 075/845] XDC: Add PACKAGE_PIN property support Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/Makefile | 5 +- .../tests/package_pins/package_pins.tcl | 14 ++++ xdc-plugin/tests/package_pins/package_pins.v | 75 +++++++++++++++++++ .../tests/package_pins/package_pins.xdc | 36 +++++++++ .../package_pins/package_pins_golden.json | 47 ++++++++++++ xdc-plugin/xdc.cc | 3 +- 6 files changed, 178 insertions(+), 2 deletions(-) create mode 100644 xdc-plugin/tests/package_pins/package_pins.tcl create mode 100644 xdc-plugin/tests/package_pins/package_pins.v create mode 100644 xdc-plugin/tests/package_pins/package_pins.xdc create mode 100644 xdc-plugin/tests/package_pins/package_pins_golden.json diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index d6036567d..714ed733b 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -2,16 +2,19 @@ # port_indexes - like counter but bus port indices are passes without curly braces # io_loc_pairs - test for LOC property being set on IOBUFs as the IO_LOC_PAIRS parameter # minilitex_ddr_arty - litex design with more types of IOBUFS including differential +# package_pins - test for PACKAGE_PIN property being set on IOBUFs as the IO_LOC_PAIRS parameter TESTS = counter \ port_indexes \ io_loc_pairs \ - minilitex_ddr_arty + minilitex_ddr_arty \ + package_pins counter_verify = $(call compare_json,counter) port_indexes_verify = $(call compare_json,port_indexes) && test $$(grep "'unknown' proc command handler" port_indexes/port_indexes.txt | wc -l) -eq 2 io_loc_pairs_verify = $(call compare_json,io_loc_pairs) minilitex_ddr_arty_verify = $(call compare_json,minilitex_ddr_arty) +package_pins_verify = $(call compare_json,package_pins) all: $(TESTS) diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/xdc-plugin/tests/package_pins/package_pins.tcl new file mode 100644 index 000000000..8c0a57c5f --- /dev/null +++ b/xdc-plugin/tests/package_pins/package_pins.tcl @@ -0,0 +1,14 @@ +yosys -import +plugin -i xdc +#Import the commands from the plugins to the tcl interpreter +yosys -import + +# -flatten is used to ensure that the output eblif has only one module. +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + +#Read the design constraints +read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) + +# Write the design in JSON format. +write_json $::env(OUT_JSON) diff --git a/xdc-plugin/tests/package_pins/package_pins.v b/xdc-plugin/tests/package_pins/package_pins.v new file mode 100644 index 000000000..c145e5ae7 --- /dev/null +++ b/xdc-plugin/tests/package_pins/package_pins.v @@ -0,0 +1,75 @@ +module top ( + input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2( + .I(LD6), + .O(signal_p), + .OB(signal_n), + .T(1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + diff --git a/xdc-plugin/tests/package_pins/package_pins.xdc b/xdc-plugin/tests/package_pins/package_pins.xdc new file mode 100644 index 000000000..543edb0d6 --- /dev/null +++ b/xdc-plugin/tests/package_pins/package_pins.xdc @@ -0,0 +1,36 @@ +#OBUF_6 +set_property PACKAGE_PIN D10 [get_ports {led[0]}] +set_property DRIVE 12 [get_ports {led[0]}] +#OBUF_7 +set_property PACKAGE_PIN A9 [get_ports {led[1]}] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports led[1]] +set_property SLEW FAST [get_ports led[1]] +set_property IOSTANDARD SSTL135 [get_ports led[1]] +#OBUF_OUT +set_property PACKAGE_PIN E3 [get_ports out_a] +set_property IN_TERM UNTUNED_SPLIT_50 [get_ports out_a] +set_property SLEW FAST [get_ports out_a] +set_property IOSTANDARD LVCMOS33 [get_ports out_a] +#bottom_inst.OBUF_10 +set_property PACKAGE_PIN C2 [get_ports {out_b[0]}] +set_property SLEW SLOW [get_ports {out_b[0]}] +set_property IOSTANDARD LVCMOS18 [get_ports {out_b[0]}] +#bottom_inst.OBUF_11 +set_property PACKAGE_PIN R2 [get_ports {out_b[1]}] +set_property DRIVE 4 [get_ports {out_b[1]}] +set_property SLEW FAST [get_ports {out_b[1]}] +set_property IOSTANDARD LVCMOS25 [get_ports {out_b[1]}] +#bottom_inst.OBUF_9 +set_property PACKAGE_PIN M6 [get_ports {led[2]}] +set_property SLEW FAST [get_ports {led[2]}] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {led[2]}] +#bottom_intermediate_inst.OBUF_8 +set_property PACKAGE_PIN N4 [get_ports {led[3]}] +set_property DRIVE 16 [get_ports {led[3]}] +set_property IOSTANDARD SSTL135 [get_ports {led[3]}] +#OBUFTDS_2 +set_property PACKAGE_PIN N2 [get_ports signal_p] +set_property PACKAGE_PIN N1 [get_ports signal_n] +set_property SLEW FAST [get_ports signal_p] +set_property IOSTANDARD DIFF_SSTL135 [get_ports signal_p] + diff --git a/xdc-plugin/tests/package_pins/package_pins_golden.json b/xdc-plugin/tests/package_pins/package_pins_golden.json new file mode 100644 index 000000000..2e9102dda --- /dev/null +++ b/xdc-plugin/tests/package_pins/package_pins_golden.json @@ -0,0 +1,47 @@ +{ + "OBUFTDS_2": { + "IOSTANDARD": "DIFF_SSTL135", + "IO_LOC_PAIRS": "signal_p:N2,signal_n:N1", + "SLEW": "FAST" + }, + "OBUF_6": { + "DRIVE": "12", + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "led[0]:D10", + "SLEW": "SLOW" + }, + "OBUF_7": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "IO_LOC_PAIRS": "led[1]:A9", + "SLEW": "FAST" + }, + "OBUF_OUT": { + "IN_TERM": "UNTUNED_SPLIT_50", + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "out_a:E3", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_10": { + "IOSTANDARD": "LVCMOS18", + "IO_LOC_PAIRS": "out_b[0]:C2", + "SLEW": "SLOW" + }, + "bottom_inst.OBUF_11": { + "DRIVE": "4", + "IOSTANDARD": "LVCMOS25", + "IO_LOC_PAIRS": "out_b[1]:R2", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_9": { + "IOSTANDARD": "DIFF_SSTL135", + "IO_LOC_PAIRS": "led[2]:M6", + "SLEW": "FAST" + }, + "bottom_intermediate_inst.OBUF_8": { + "DRIVE": "16", + "IOSTANDARD": "SSTL135", + "IO_LOC_PAIRS": "led[3]:N4", + "SLEW": "SLOW" + } +} \ No newline at end of file diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 723756596..9a8e5e74d 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -52,7 +52,8 @@ const std::unordered_map set_property_options_m {"SLEW", SetPropertyOptions::SLEW}, {"DRIVE", SetPropertyOptions::DRIVE}, {"IN_TERM", SetPropertyOptions::IN_TERM}, - {"LOC", SetPropertyOptions::IO_LOC_PAIRS} + {"LOC", SetPropertyOptions::IO_LOC_PAIRS}, + {"PACKAGE_PIN", SetPropertyOptions::IO_LOC_PAIRS} }; const std::unordered_map> supported_primitive_parameters = { From 894d18dc0127b27f3c8da650f41650708d6c4009 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 17 Jul 2020 10:04:50 +0200 Subject: [PATCH 076/845] SDC: Add Base Litex test Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 41 + sdc-plugin/tests/base_litex/VexRiscv_Linux.v | 7469 ++++++++ sdc-plugin/tests/base_litex/base_litex.sdc | 59 + sdc-plugin/tests/base_litex/base_litex.tcl | 38 + sdc-plugin/tests/base_litex/base_litex.v | 15844 +++++++++++++++++ sdc-plugin/tests/base_litex/base_litex.xdc | 273 + sdc-plugin/tests/base_litex/mem.init | 6479 +++++++ sdc-plugin/tests/base_litex/mem_1.init | 0 sdc-plugin/tests/base_litex/mem_2.init | 7 + sdc-plugin/tests/compare_output_json.py | 53 + sdc-plugin/tests/techmaps/cells_map.v | 866 + sdc-plugin/tests/techmaps/cells_sim.v | 145 + sdc-plugin/tests/xc7a35tcsg324-1.json | 10 + 13 files changed, 31284 insertions(+) create mode 100644 sdc-plugin/tests/Makefile create mode 100644 sdc-plugin/tests/base_litex/VexRiscv_Linux.v create mode 100644 sdc-plugin/tests/base_litex/base_litex.sdc create mode 100644 sdc-plugin/tests/base_litex/base_litex.tcl create mode 100644 sdc-plugin/tests/base_litex/base_litex.v create mode 100644 sdc-plugin/tests/base_litex/base_litex.xdc create mode 100644 sdc-plugin/tests/base_litex/mem.init create mode 100644 sdc-plugin/tests/base_litex/mem_1.init create mode 100644 sdc-plugin/tests/base_litex/mem_2.init create mode 100644 sdc-plugin/tests/compare_output_json.py create mode 100644 sdc-plugin/tests/techmaps/cells_map.v create mode 100644 sdc-plugin/tests/techmaps/cells_sim.v create mode 100644 sdc-plugin/tests/xc7a35tcsg324-1.json diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile new file mode 100644 index 000000000..00973061a --- /dev/null +++ b/sdc-plugin/tests/Makefile @@ -0,0 +1,41 @@ +TESTS = base_litex + +base_litex_verify = $(call compare_json,base_litex) + +all: $(TESTS) + +compare_json = python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1).golden.json + +define test_tpl = +$(1): $(1)/$(1).json + $$($(1)_verify) + RETVAL=$$$$? ; \ + if [ $$$$RETVAL -eq 0 ]; then \ + echo "$(1) PASS"; \ + true; \ + else \ + echo "$(1) FAIL"; \ + false; \ + fi + +$(1)/$(1).json: $(1)/$(1).v + cd $(1); \ + PART_JSON=../xc7a35tcsg324-1.json \ + OUT_JSON=$(1).json \ + OUT_EBLIF=$(1).eblif \ + INPUT_XDC_FILE=$(1).xdc \ + INPUT_SDC_FILE=$(1).sdc \ + yosys -p "tcl $(1).tcl" -l yosys.log + +update_$(1): $(1)/$(1).json + @python compare_output_json.py --json $$< --golden $(1)/$(1).golden.json --update + +endef + +$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) + +update: $(foreach test,$(TESTS),update_$(test)) + + +clean: + rm -rf $(foreach test,$(TESTS),$(test)/$(test).json $(test)/$(test).eblif $(test)/$(test).txt $(test)/yosys.log) diff --git a/sdc-plugin/tests/base_litex/VexRiscv_Linux.v b/sdc-plugin/tests/base_litex/VexRiscv_Linux.v new file mode 100644 index 000000000..0833b573f --- /dev/null +++ b/sdc-plugin/tests/base_litex/VexRiscv_Linux.v @@ -0,0 +1,7469 @@ +// Generator : SpinalHDL v1.3.6 git head : 9bf01e7f360e003fac1dd5ca8b8f4bffec0e52b8 +// Date : 16/06/2019, 23:08:47 +// Component : VexRiscv + + +`define BranchCtrlEnum_defaultEncoding_type [1:0] +`define BranchCtrlEnum_defaultEncoding_INC 2'b00 +`define BranchCtrlEnum_defaultEncoding_B 2'b01 +`define BranchCtrlEnum_defaultEncoding_JAL 2'b10 +`define BranchCtrlEnum_defaultEncoding_JALR 2'b11 + +`define AluBitwiseCtrlEnum_defaultEncoding_type [1:0] +`define AluBitwiseCtrlEnum_defaultEncoding_XOR_1 2'b00 +`define AluBitwiseCtrlEnum_defaultEncoding_OR_1 2'b01 +`define AluBitwiseCtrlEnum_defaultEncoding_AND_1 2'b10 + +`define Src1CtrlEnum_defaultEncoding_type [1:0] +`define Src1CtrlEnum_defaultEncoding_RS 2'b00 +`define Src1CtrlEnum_defaultEncoding_IMU 2'b01 +`define Src1CtrlEnum_defaultEncoding_PC_INCREMENT 2'b10 +`define Src1CtrlEnum_defaultEncoding_URS1 2'b11 + +`define Src2CtrlEnum_defaultEncoding_type [1:0] +`define Src2CtrlEnum_defaultEncoding_RS 2'b00 +`define Src2CtrlEnum_defaultEncoding_IMI 2'b01 +`define Src2CtrlEnum_defaultEncoding_IMS 2'b10 +`define Src2CtrlEnum_defaultEncoding_PC 2'b11 + +`define EnvCtrlEnum_defaultEncoding_type [1:0] +`define EnvCtrlEnum_defaultEncoding_NONE 2'b00 +`define EnvCtrlEnum_defaultEncoding_XRET 2'b01 +`define EnvCtrlEnum_defaultEncoding_WFI 2'b10 +`define EnvCtrlEnum_defaultEncoding_ECALL 2'b11 + +`define AluCtrlEnum_defaultEncoding_type [1:0] +`define AluCtrlEnum_defaultEncoding_ADD_SUB 2'b00 +`define AluCtrlEnum_defaultEncoding_SLT_SLTU 2'b01 +`define AluCtrlEnum_defaultEncoding_BITWISE 2'b10 + +`define ShiftCtrlEnum_defaultEncoding_type [1:0] +`define ShiftCtrlEnum_defaultEncoding_DISABLE_1 2'b00 +`define ShiftCtrlEnum_defaultEncoding_SLL_1 2'b01 +`define ShiftCtrlEnum_defaultEncoding_SRL_1 2'b10 +`define ShiftCtrlEnum_defaultEncoding_SRA_1 2'b11 + +`define MmuPlugin_shared_State_defaultEncoding_type [2:0] +`define MmuPlugin_shared_State_defaultEncoding_IDLE 3'b000 +`define MmuPlugin_shared_State_defaultEncoding_L1_CMD 3'b001 +`define MmuPlugin_shared_State_defaultEncoding_L1_RSP 3'b010 +`define MmuPlugin_shared_State_defaultEncoding_L0_CMD 3'b011 +`define MmuPlugin_shared_State_defaultEncoding_L0_RSP 3'b100 + +module InstructionCache ( + input io_flush, + input io_cpu_prefetch_isValid, + output reg io_cpu_prefetch_haltIt, + input [31:0] io_cpu_prefetch_pc, + input io_cpu_fetch_isValid, + input io_cpu_fetch_isStuck, + input io_cpu_fetch_isRemoved, + input [31:0] io_cpu_fetch_pc, + output [31:0] io_cpu_fetch_data, + input io_cpu_fetch_dataBypassValid, + input [31:0] io_cpu_fetch_dataBypass, + output io_cpu_fetch_mmuBus_cmd_isValid, + output [31:0] io_cpu_fetch_mmuBus_cmd_virtualAddress, + output io_cpu_fetch_mmuBus_cmd_bypassTranslation, + input [31:0] io_cpu_fetch_mmuBus_rsp_physicalAddress, + input io_cpu_fetch_mmuBus_rsp_isIoAccess, + input io_cpu_fetch_mmuBus_rsp_allowRead, + input io_cpu_fetch_mmuBus_rsp_allowWrite, + input io_cpu_fetch_mmuBus_rsp_allowExecute, + input io_cpu_fetch_mmuBus_rsp_exception, + input io_cpu_fetch_mmuBus_rsp_refilling, + output io_cpu_fetch_mmuBus_end, + input io_cpu_fetch_mmuBus_busy, + output [31:0] io_cpu_fetch_physicalAddress, + output io_cpu_fetch_haltIt, + input io_cpu_decode_isValid, + input io_cpu_decode_isStuck, + input [31:0] io_cpu_decode_pc, + output [31:0] io_cpu_decode_physicalAddress, + output [31:0] io_cpu_decode_data, + output io_cpu_decode_cacheMiss, + output io_cpu_decode_error, + output io_cpu_decode_mmuRefilling, + output io_cpu_decode_mmuException, + input io_cpu_decode_isUser, + input io_cpu_fill_valid, + input [31:0] io_cpu_fill_payload, + output io_mem_cmd_valid, + input io_mem_cmd_ready, + output [31:0] io_mem_cmd_payload_address, + output [2:0] io_mem_cmd_payload_size, + input io_mem_rsp_valid, + input [31:0] io_mem_rsp_payload_data, + input io_mem_rsp_payload_error, + input clk, + input reset); + reg [21:0] _zz_10_; + reg [31:0] _zz_11_; + wire _zz_12_; + wire _zz_13_; + wire [0:0] _zz_14_; + wire [0:0] _zz_15_; + wire [21:0] _zz_16_; + reg _zz_1_; + reg _zz_2_; + reg lineLoader_fire; + reg lineLoader_valid; + reg [31:0] lineLoader_address; + reg lineLoader_hadError; + reg lineLoader_flushPending; + reg [7:0] lineLoader_flushCounter; + reg _zz_3_; + reg lineLoader_cmdSent; + reg lineLoader_wayToAllocate_willIncrement; + wire lineLoader_wayToAllocate_willClear; + wire lineLoader_wayToAllocate_willOverflowIfInc; + wire lineLoader_wayToAllocate_willOverflow; + reg [2:0] lineLoader_wordIndex; + wire lineLoader_write_tag_0_valid; + wire [6:0] lineLoader_write_tag_0_payload_address; + wire lineLoader_write_tag_0_payload_data_valid; + wire lineLoader_write_tag_0_payload_data_error; + wire [19:0] lineLoader_write_tag_0_payload_data_address; + wire lineLoader_write_data_0_valid; + wire [9:0] lineLoader_write_data_0_payload_address; + wire [31:0] lineLoader_write_data_0_payload_data; + wire _zz_4_; + wire [6:0] _zz_5_; + wire _zz_6_; + wire fetchStage_read_waysValues_0_tag_valid; + wire fetchStage_read_waysValues_0_tag_error; + wire [19:0] fetchStage_read_waysValues_0_tag_address; + wire [21:0] _zz_7_; + wire [9:0] _zz_8_; + wire _zz_9_; + wire [31:0] fetchStage_read_waysValues_0_data; + wire fetchStage_hit_hits_0; + wire fetchStage_hit_valid; + wire fetchStage_hit_error; + wire [31:0] fetchStage_hit_data; + wire [31:0] fetchStage_hit_word; + reg [31:0] io_cpu_fetch_data_regNextWhen; + reg [31:0] decodeStage_mmuRsp_physicalAddress; + reg decodeStage_mmuRsp_isIoAccess; + reg decodeStage_mmuRsp_allowRead; + reg decodeStage_mmuRsp_allowWrite; + reg decodeStage_mmuRsp_allowExecute; + reg decodeStage_mmuRsp_exception; + reg decodeStage_mmuRsp_refilling; + reg decodeStage_hit_valid; + reg decodeStage_hit_error; + (* ram_style = "block" *) reg [21:0] ways_0_tags [0:127]; + (* ram_style = "block" *) reg [31:0] ways_0_datas [0:1023]; + assign _zz_12_ = (! lineLoader_flushCounter[7]); + assign _zz_13_ = (lineLoader_flushPending && (! (lineLoader_valid || io_cpu_fetch_isValid))); + assign _zz_14_ = _zz_7_[0 : 0]; + assign _zz_15_ = _zz_7_[1 : 1]; + assign _zz_16_ = {lineLoader_write_tag_0_payload_data_address,{lineLoader_write_tag_0_payload_data_error,lineLoader_write_tag_0_payload_data_valid}}; + always @ (posedge clk) begin + if(_zz_2_) begin + ways_0_tags[lineLoader_write_tag_0_payload_address] <= _zz_16_; + end + end + + always @ (posedge clk) begin + if(_zz_6_) begin + _zz_10_ <= ways_0_tags[_zz_5_]; + end + end + + always @ (posedge clk) begin + if(_zz_1_) begin + ways_0_datas[lineLoader_write_data_0_payload_address] <= lineLoader_write_data_0_payload_data; + end + end + + always @ (posedge clk) begin + if(_zz_9_) begin + _zz_11_ <= ways_0_datas[_zz_8_]; + end + end + + always @ (*) begin + _zz_1_ = 1'b0; + if(lineLoader_write_data_0_valid)begin + _zz_1_ = 1'b1; + end + end + + always @ (*) begin + _zz_2_ = 1'b0; + if(lineLoader_write_tag_0_valid)begin + _zz_2_ = 1'b1; + end + end + + assign io_cpu_fetch_haltIt = io_cpu_fetch_mmuBus_busy; + always @ (*) begin + lineLoader_fire = 1'b0; + if(io_mem_rsp_valid)begin + if((lineLoader_wordIndex == (3'b111)))begin + lineLoader_fire = 1'b1; + end + end + end + + always @ (*) begin + io_cpu_prefetch_haltIt = (lineLoader_valid || lineLoader_flushPending); + if(_zz_12_)begin + io_cpu_prefetch_haltIt = 1'b1; + end + if((! _zz_3_))begin + io_cpu_prefetch_haltIt = 1'b1; + end + if(io_flush)begin + io_cpu_prefetch_haltIt = 1'b1; + end + end + + assign io_mem_cmd_valid = (lineLoader_valid && (! lineLoader_cmdSent)); + assign io_mem_cmd_payload_address = {lineLoader_address[31 : 5],(5'b00000)}; + assign io_mem_cmd_payload_size = (3'b101); + always @ (*) begin + lineLoader_wayToAllocate_willIncrement = 1'b0; + if((! lineLoader_valid))begin + lineLoader_wayToAllocate_willIncrement = 1'b1; + end + end + + assign lineLoader_wayToAllocate_willClear = 1'b0; + assign lineLoader_wayToAllocate_willOverflowIfInc = 1'b1; + assign lineLoader_wayToAllocate_willOverflow = (lineLoader_wayToAllocate_willOverflowIfInc && lineLoader_wayToAllocate_willIncrement); + assign _zz_4_ = 1'b1; + assign lineLoader_write_tag_0_valid = ((_zz_4_ && lineLoader_fire) || (! lineLoader_flushCounter[7])); + assign lineLoader_write_tag_0_payload_address = (lineLoader_flushCounter[7] ? lineLoader_address[11 : 5] : lineLoader_flushCounter[6 : 0]); + assign lineLoader_write_tag_0_payload_data_valid = lineLoader_flushCounter[7]; + assign lineLoader_write_tag_0_payload_data_error = (lineLoader_hadError || io_mem_rsp_payload_error); + assign lineLoader_write_tag_0_payload_data_address = lineLoader_address[31 : 12]; + assign lineLoader_write_data_0_valid = (io_mem_rsp_valid && _zz_4_); + assign lineLoader_write_data_0_payload_address = {lineLoader_address[11 : 5],lineLoader_wordIndex}; + assign lineLoader_write_data_0_payload_data = io_mem_rsp_payload_data; + assign _zz_5_ = io_cpu_prefetch_pc[11 : 5]; + assign _zz_6_ = (! io_cpu_fetch_isStuck); + assign _zz_7_ = _zz_10_; + assign fetchStage_read_waysValues_0_tag_valid = _zz_14_[0]; + assign fetchStage_read_waysValues_0_tag_error = _zz_15_[0]; + assign fetchStage_read_waysValues_0_tag_address = _zz_7_[21 : 2]; + assign _zz_8_ = io_cpu_prefetch_pc[11 : 2]; + assign _zz_9_ = (! io_cpu_fetch_isStuck); + assign fetchStage_read_waysValues_0_data = _zz_11_; + assign fetchStage_hit_hits_0 = (fetchStage_read_waysValues_0_tag_valid && (fetchStage_read_waysValues_0_tag_address == io_cpu_fetch_mmuBus_rsp_physicalAddress[31 : 12])); + assign fetchStage_hit_valid = (fetchStage_hit_hits_0 != (1'b0)); + assign fetchStage_hit_error = fetchStage_read_waysValues_0_tag_error; + assign fetchStage_hit_data = fetchStage_read_waysValues_0_data; + assign fetchStage_hit_word = fetchStage_hit_data[31 : 0]; + assign io_cpu_fetch_data = (io_cpu_fetch_dataBypassValid ? io_cpu_fetch_dataBypass : fetchStage_hit_word); + assign io_cpu_decode_data = io_cpu_fetch_data_regNextWhen; + assign io_cpu_fetch_mmuBus_cmd_isValid = io_cpu_fetch_isValid; + assign io_cpu_fetch_mmuBus_cmd_virtualAddress = io_cpu_fetch_pc; + assign io_cpu_fetch_mmuBus_cmd_bypassTranslation = 1'b0; + assign io_cpu_fetch_mmuBus_end = ((! io_cpu_fetch_isStuck) || io_cpu_fetch_isRemoved); + assign io_cpu_fetch_physicalAddress = io_cpu_fetch_mmuBus_rsp_physicalAddress; + assign io_cpu_decode_cacheMiss = (! decodeStage_hit_valid); + assign io_cpu_decode_error = decodeStage_hit_error; + assign io_cpu_decode_mmuRefilling = decodeStage_mmuRsp_refilling; + assign io_cpu_decode_mmuException = ((! decodeStage_mmuRsp_refilling) && (decodeStage_mmuRsp_exception || (! decodeStage_mmuRsp_allowExecute))); + assign io_cpu_decode_physicalAddress = decodeStage_mmuRsp_physicalAddress; + always @ (posedge clk) begin + if(reset) begin + lineLoader_valid <= 1'b0; + lineLoader_hadError <= 1'b0; + lineLoader_flushPending <= 1'b1; + lineLoader_cmdSent <= 1'b0; + lineLoader_wordIndex <= (3'b000); + end else begin + if(lineLoader_fire)begin + lineLoader_valid <= 1'b0; + end + if(lineLoader_fire)begin + lineLoader_hadError <= 1'b0; + end + if(io_cpu_fill_valid)begin + lineLoader_valid <= 1'b1; + end + if(io_flush)begin + lineLoader_flushPending <= 1'b1; + end + if(_zz_13_)begin + lineLoader_flushPending <= 1'b0; + end + if((io_mem_cmd_valid && io_mem_cmd_ready))begin + lineLoader_cmdSent <= 1'b1; + end + if(lineLoader_fire)begin + lineLoader_cmdSent <= 1'b0; + end + if(io_mem_rsp_valid)begin + lineLoader_wordIndex <= (lineLoader_wordIndex + (3'b001)); + if(io_mem_rsp_payload_error)begin + lineLoader_hadError <= 1'b1; + end + end + end + end + + always @ (posedge clk) begin + if(io_cpu_fill_valid)begin + lineLoader_address <= io_cpu_fill_payload; + end + if(_zz_12_)begin + lineLoader_flushCounter <= (lineLoader_flushCounter + (8'b00000001)); + end + _zz_3_ <= lineLoader_flushCounter[7]; + if(_zz_13_)begin + lineLoader_flushCounter <= (8'b00000000); + end + if((! io_cpu_decode_isStuck))begin + io_cpu_fetch_data_regNextWhen <= io_cpu_fetch_data; + end + if((! io_cpu_decode_isStuck))begin + decodeStage_mmuRsp_physicalAddress <= io_cpu_fetch_mmuBus_rsp_physicalAddress; + decodeStage_mmuRsp_isIoAccess <= io_cpu_fetch_mmuBus_rsp_isIoAccess; + decodeStage_mmuRsp_allowRead <= io_cpu_fetch_mmuBus_rsp_allowRead; + decodeStage_mmuRsp_allowWrite <= io_cpu_fetch_mmuBus_rsp_allowWrite; + decodeStage_mmuRsp_allowExecute <= io_cpu_fetch_mmuBus_rsp_allowExecute; + decodeStage_mmuRsp_exception <= io_cpu_fetch_mmuBus_rsp_exception; + decodeStage_mmuRsp_refilling <= io_cpu_fetch_mmuBus_rsp_refilling; + end + if((! io_cpu_decode_isStuck))begin + decodeStage_hit_valid <= fetchStage_hit_valid; + end + if((! io_cpu_decode_isStuck))begin + decodeStage_hit_error <= fetchStage_hit_error; + end + end + +endmodule + +module DataCache ( + input io_cpu_execute_isValid, + input [31:0] io_cpu_execute_address, + input io_cpu_execute_args_wr, + input [31:0] io_cpu_execute_args_data, + input [1:0] io_cpu_execute_args_size, + input io_cpu_execute_args_isLrsc, + input io_cpu_execute_args_isAmo, + input io_cpu_execute_args_amoCtrl_swap, + input [2:0] io_cpu_execute_args_amoCtrl_alu, + input io_cpu_memory_isValid, + input io_cpu_memory_isStuck, + input io_cpu_memory_isRemoved, + output io_cpu_memory_isWrite, + input [31:0] io_cpu_memory_address, + output io_cpu_memory_mmuBus_cmd_isValid, + output [31:0] io_cpu_memory_mmuBus_cmd_virtualAddress, + output io_cpu_memory_mmuBus_cmd_bypassTranslation, + input [31:0] io_cpu_memory_mmuBus_rsp_physicalAddress, + input io_cpu_memory_mmuBus_rsp_isIoAccess, + input io_cpu_memory_mmuBus_rsp_allowRead, + input io_cpu_memory_mmuBus_rsp_allowWrite, + input io_cpu_memory_mmuBus_rsp_allowExecute, + input io_cpu_memory_mmuBus_rsp_exception, + input io_cpu_memory_mmuBus_rsp_refilling, + output io_cpu_memory_mmuBus_end, + input io_cpu_memory_mmuBus_busy, + input io_cpu_writeBack_isValid, + input io_cpu_writeBack_isStuck, + input io_cpu_writeBack_isUser, + output reg io_cpu_writeBack_haltIt, + output io_cpu_writeBack_isWrite, + output reg [31:0] io_cpu_writeBack_data, + input [31:0] io_cpu_writeBack_address, + output io_cpu_writeBack_mmuException, + output io_cpu_writeBack_unalignedAccess, + output reg io_cpu_writeBack_accessError, + input io_cpu_writeBack_clearLrsc, + output reg io_cpu_redo, + input io_cpu_flush_valid, + output reg io_cpu_flush_ready, + output reg io_mem_cmd_valid, + input io_mem_cmd_ready, + output reg io_mem_cmd_payload_wr, + output reg [31:0] io_mem_cmd_payload_address, + output [31:0] io_mem_cmd_payload_data, + output [3:0] io_mem_cmd_payload_mask, + output reg [2:0] io_mem_cmd_payload_length, + output reg io_mem_cmd_payload_last, + input io_mem_rsp_valid, + input [31:0] io_mem_rsp_payload_data, + input io_mem_rsp_payload_error, + input clk, + input reset); + reg [21:0] _zz_10_; + reg [31:0] _zz_11_; + wire _zz_12_; + wire _zz_13_; + wire _zz_14_; + wire _zz_15_; + wire _zz_16_; + wire _zz_17_; + wire _zz_18_; + wire _zz_19_; + wire _zz_20_; + wire _zz_21_; + wire [2:0] _zz_22_; + wire [0:0] _zz_23_; + wire [0:0] _zz_24_; + wire [31:0] _zz_25_; + wire [31:0] _zz_26_; + wire [31:0] _zz_27_; + wire [31:0] _zz_28_; + wire [1:0] _zz_29_; + wire [31:0] _zz_30_; + wire [1:0] _zz_31_; + wire [1:0] _zz_32_; + wire [0:0] _zz_33_; + wire [0:0] _zz_34_; + wire [2:0] _zz_35_; + wire [1:0] _zz_36_; + wire [21:0] _zz_37_; + reg _zz_1_; + reg _zz_2_; + wire haltCpu; + reg tagsReadCmd_valid; + reg [6:0] tagsReadCmd_payload; + reg tagsWriteCmd_valid; + reg [0:0] tagsWriteCmd_payload_way; + reg [6:0] tagsWriteCmd_payload_address; + reg tagsWriteCmd_payload_data_valid; + reg tagsWriteCmd_payload_data_error; + reg [19:0] tagsWriteCmd_payload_data_address; + reg tagsWriteLastCmd_valid; + reg [0:0] tagsWriteLastCmd_payload_way; + reg [6:0] tagsWriteLastCmd_payload_address; + reg tagsWriteLastCmd_payload_data_valid; + reg tagsWriteLastCmd_payload_data_error; + reg [19:0] tagsWriteLastCmd_payload_data_address; + reg dataReadCmd_valid; + reg [9:0] dataReadCmd_payload; + reg dataWriteCmd_valid; + reg [0:0] dataWriteCmd_payload_way; + reg [9:0] dataWriteCmd_payload_address; + reg [31:0] dataWriteCmd_payload_data; + reg [3:0] dataWriteCmd_payload_mask; + wire _zz_3_; + wire ways_0_tagsReadRsp_valid; + wire ways_0_tagsReadRsp_error; + wire [19:0] ways_0_tagsReadRsp_address; + wire [21:0] _zz_4_; + wire _zz_5_; + wire [31:0] ways_0_dataReadRsp; + reg [3:0] _zz_6_; + wire [3:0] stage0_mask; + wire [0:0] stage0_colisions; + reg stageA_request_wr; + reg [31:0] stageA_request_data; + reg [1:0] stageA_request_size; + reg stageA_request_isLrsc; + reg stageA_request_isAmo; + reg stageA_request_amoCtrl_swap; + reg [2:0] stageA_request_amoCtrl_alu; + reg [3:0] stageA_mask; + wire stageA_wayHits_0; + reg [0:0] stage0_colisions_regNextWhen; + wire [0:0] _zz_7_; + wire [0:0] stageA_colisions; + reg stageB_request_wr; + reg [31:0] stageB_request_data; + reg [1:0] stageB_request_size; + reg stageB_request_isLrsc; + reg stageB_isAmo; + reg stageB_request_amoCtrl_swap; + reg [2:0] stageB_request_amoCtrl_alu; + reg stageB_mmuRspFreeze; + reg [31:0] stageB_mmuRsp_physicalAddress; + reg stageB_mmuRsp_isIoAccess; + reg stageB_mmuRsp_allowRead; + reg stageB_mmuRsp_allowWrite; + reg stageB_mmuRsp_allowExecute; + reg stageB_mmuRsp_exception; + reg stageB_mmuRsp_refilling; + reg stageB_tagsReadRsp_0_valid; + reg stageB_tagsReadRsp_0_error; + reg [19:0] stageB_tagsReadRsp_0_address; + reg [31:0] stageB_dataReadRsp_0; + wire [0:0] _zz_8_; + reg [0:0] stageB_waysHits; + wire stageB_waysHit; + wire [31:0] stageB_dataMux; + reg [3:0] stageB_mask; + reg [0:0] stageB_colisions; + reg stageB_loaderValid; + reg stageB_flusher_valid; + reg stageB_lrsc_reserved; + reg [31:0] stageB_requestDataBypass; + wire stageB_amo_compare; + wire stageB_amo_unsigned; + wire [31:0] stageB_amo_addSub; + wire stageB_amo_less; + wire stageB_amo_selectRf; + reg [31:0] stageB_amo_result; + reg stageB_amo_resultRegValid; + reg [31:0] stageB_amo_resultReg; + reg stageB_memCmdSent; + wire [0:0] _zz_9_; + reg loader_valid; + reg loader_counter_willIncrement; + wire loader_counter_willClear; + reg [2:0] loader_counter_valueNext; + reg [2:0] loader_counter_value; + wire loader_counter_willOverflowIfInc; + wire loader_counter_willOverflow; + reg [0:0] loader_waysAllocator; + reg loader_error; + (* ram_style = "block" *) reg [21:0] ways_0_tags [0:127]; + (* ram_style = "block" *) reg [7:0] ways_0_data_symbol0 [0:1023]; + (* ram_style = "block" *) reg [7:0] ways_0_data_symbol1 [0:1023]; + (* ram_style = "block" *) reg [7:0] ways_0_data_symbol2 [0:1023]; + (* ram_style = "block" *) reg [7:0] ways_0_data_symbol3 [0:1023]; + reg [7:0] _zz_38_; + reg [7:0] _zz_39_; + reg [7:0] _zz_40_; + reg [7:0] _zz_41_; + assign _zz_12_ = (io_cpu_execute_isValid && (! io_cpu_memory_isStuck)); + assign _zz_13_ = (((stageB_mmuRsp_refilling || io_cpu_writeBack_accessError) || io_cpu_writeBack_mmuException) || io_cpu_writeBack_unalignedAccess); + assign _zz_14_ = (stageB_waysHit || (stageB_request_wr && (! stageB_isAmo))); + assign _zz_15_ = (! stageB_amo_resultRegValid); + assign _zz_16_ = (stageB_request_isLrsc && (! stageB_lrsc_reserved)); + assign _zz_17_ = (loader_valid && io_mem_rsp_valid); + assign _zz_18_ = (stageB_request_isLrsc && (! stageB_lrsc_reserved)); + assign _zz_19_ = ((((io_cpu_flush_valid && (! io_cpu_execute_isValid)) && (! io_cpu_memory_isValid)) && (! io_cpu_writeBack_isValid)) && (! io_cpu_redo)); + assign _zz_20_ = (((! stageB_request_wr) || stageB_isAmo) && ((stageB_colisions & stageB_waysHits) != (1'b0))); + assign _zz_21_ = ((! io_cpu_writeBack_isStuck) && (! stageB_mmuRspFreeze)); + assign _zz_22_ = (stageB_request_amoCtrl_alu | {stageB_request_amoCtrl_swap,(2'b00)}); + assign _zz_23_ = _zz_4_[0 : 0]; + assign _zz_24_ = _zz_4_[1 : 1]; + assign _zz_25_ = ($signed(_zz_26_) + $signed(_zz_30_)); + assign _zz_26_ = ($signed(_zz_27_) + $signed(_zz_28_)); + assign _zz_27_ = stageB_request_data; + assign _zz_28_ = (stageB_amo_compare ? (~ stageB_dataMux) : stageB_dataMux); + assign _zz_29_ = (stageB_amo_compare ? _zz_31_ : _zz_32_); + assign _zz_30_ = {{30{_zz_29_[1]}}, _zz_29_}; + assign _zz_31_ = (2'b01); + assign _zz_32_ = (2'b00); + assign _zz_33_ = (! stageB_lrsc_reserved); + assign _zz_34_ = loader_counter_willIncrement; + assign _zz_35_ = {2'd0, _zz_34_}; + assign _zz_36_ = {loader_waysAllocator,loader_waysAllocator[0]}; + assign _zz_37_ = {tagsWriteCmd_payload_data_address,{tagsWriteCmd_payload_data_error,tagsWriteCmd_payload_data_valid}}; + always @ (posedge clk) begin + if(_zz_2_) begin + ways_0_tags[tagsWriteCmd_payload_address] <= _zz_37_; + end + end + + always @ (posedge clk) begin + if(_zz_3_) begin + _zz_10_ <= ways_0_tags[tagsReadCmd_payload]; + end + end + + always @ (*) begin + _zz_11_ = {_zz_41_, _zz_40_, _zz_39_, _zz_38_}; + end + always @ (posedge clk) begin + if(dataWriteCmd_payload_mask[0] && _zz_1_) begin + ways_0_data_symbol0[dataWriteCmd_payload_address] <= dataWriteCmd_payload_data[7 : 0]; + end + if(dataWriteCmd_payload_mask[1] && _zz_1_) begin + ways_0_data_symbol1[dataWriteCmd_payload_address] <= dataWriteCmd_payload_data[15 : 8]; + end + if(dataWriteCmd_payload_mask[2] && _zz_1_) begin + ways_0_data_symbol2[dataWriteCmd_payload_address] <= dataWriteCmd_payload_data[23 : 16]; + end + if(dataWriteCmd_payload_mask[3] && _zz_1_) begin + ways_0_data_symbol3[dataWriteCmd_payload_address] <= dataWriteCmd_payload_data[31 : 24]; + end + end + + always @ (posedge clk) begin + if(_zz_5_) begin + _zz_38_ <= ways_0_data_symbol0[dataReadCmd_payload]; + _zz_39_ <= ways_0_data_symbol1[dataReadCmd_payload]; + _zz_40_ <= ways_0_data_symbol2[dataReadCmd_payload]; + _zz_41_ <= ways_0_data_symbol3[dataReadCmd_payload]; + end + end + + always @ (*) begin + _zz_1_ = 1'b0; + if((dataWriteCmd_valid && dataWriteCmd_payload_way[0]))begin + _zz_1_ = 1'b1; + end + end + + always @ (*) begin + _zz_2_ = 1'b0; + if((tagsWriteCmd_valid && tagsWriteCmd_payload_way[0]))begin + _zz_2_ = 1'b1; + end + end + + assign haltCpu = 1'b0; + assign _zz_3_ = (tagsReadCmd_valid && (! io_cpu_memory_isStuck)); + assign _zz_4_ = _zz_10_; + assign ways_0_tagsReadRsp_valid = _zz_23_[0]; + assign ways_0_tagsReadRsp_error = _zz_24_[0]; + assign ways_0_tagsReadRsp_address = _zz_4_[21 : 2]; + assign _zz_5_ = (dataReadCmd_valid && (! io_cpu_memory_isStuck)); + assign ways_0_dataReadRsp = _zz_11_; + always @ (*) begin + tagsReadCmd_valid = 1'b0; + if(_zz_12_)begin + tagsReadCmd_valid = 1'b1; + end + end + + always @ (*) begin + tagsReadCmd_payload = (7'bxxxxxxx); + if(_zz_12_)begin + tagsReadCmd_payload = io_cpu_execute_address[11 : 5]; + end + end + + always @ (*) begin + dataReadCmd_valid = 1'b0; + if(_zz_12_)begin + dataReadCmd_valid = 1'b1; + end + end + + always @ (*) begin + dataReadCmd_payload = (10'bxxxxxxxxxx); + if(_zz_12_)begin + dataReadCmd_payload = io_cpu_execute_address[11 : 2]; + end + end + + always @ (*) begin + tagsWriteCmd_valid = 1'b0; + if(stageB_flusher_valid)begin + tagsWriteCmd_valid = stageB_flusher_valid; + end + if(_zz_13_)begin + tagsWriteCmd_valid = 1'b0; + end + if(loader_counter_willOverflow)begin + tagsWriteCmd_valid = 1'b1; + end + end + + always @ (*) begin + tagsWriteCmd_payload_way = (1'bx); + if(stageB_flusher_valid)begin + tagsWriteCmd_payload_way = (1'b1); + end + if(loader_counter_willOverflow)begin + tagsWriteCmd_payload_way = loader_waysAllocator; + end + end + + always @ (*) begin + tagsWriteCmd_payload_address = (7'bxxxxxxx); + if(stageB_flusher_valid)begin + tagsWriteCmd_payload_address = stageB_mmuRsp_physicalAddress[11 : 5]; + end + if(loader_counter_willOverflow)begin + tagsWriteCmd_payload_address = stageB_mmuRsp_physicalAddress[11 : 5]; + end + end + + always @ (*) begin + tagsWriteCmd_payload_data_valid = 1'bx; + if(stageB_flusher_valid)begin + tagsWriteCmd_payload_data_valid = 1'b0; + end + if(loader_counter_willOverflow)begin + tagsWriteCmd_payload_data_valid = 1'b1; + end + end + + always @ (*) begin + tagsWriteCmd_payload_data_error = 1'bx; + if(loader_counter_willOverflow)begin + tagsWriteCmd_payload_data_error = (loader_error || io_mem_rsp_payload_error); + end + end + + always @ (*) begin + tagsWriteCmd_payload_data_address = (20'bxxxxxxxxxxxxxxxxxxxx); + if(loader_counter_willOverflow)begin + tagsWriteCmd_payload_data_address = stageB_mmuRsp_physicalAddress[31 : 12]; + end + end + + always @ (*) begin + dataWriteCmd_valid = 1'b0; + if(io_cpu_writeBack_isValid)begin + if(! stageB_mmuRsp_isIoAccess) begin + if(_zz_14_)begin + if((stageB_request_wr && stageB_waysHit))begin + dataWriteCmd_valid = 1'b1; + end + if(stageB_isAmo)begin + if(_zz_15_)begin + dataWriteCmd_valid = 1'b0; + end + end + if(_zz_16_)begin + dataWriteCmd_valid = 1'b0; + end + end + end + end + if(_zz_13_)begin + dataWriteCmd_valid = 1'b0; + end + if(_zz_17_)begin + dataWriteCmd_valid = 1'b1; + end + end + + always @ (*) begin + dataWriteCmd_payload_way = (1'bx); + if(io_cpu_writeBack_isValid)begin + if(! stageB_mmuRsp_isIoAccess) begin + if(_zz_14_)begin + dataWriteCmd_payload_way = stageB_waysHits; + end + end + end + if(_zz_17_)begin + dataWriteCmd_payload_way = loader_waysAllocator; + end + end + + always @ (*) begin + dataWriteCmd_payload_address = (10'bxxxxxxxxxx); + if(io_cpu_writeBack_isValid)begin + if(! stageB_mmuRsp_isIoAccess) begin + if(_zz_14_)begin + dataWriteCmd_payload_address = stageB_mmuRsp_physicalAddress[11 : 2]; + end + end + end + if(_zz_17_)begin + dataWriteCmd_payload_address = {stageB_mmuRsp_physicalAddress[11 : 5],loader_counter_value}; + end + end + + always @ (*) begin + dataWriteCmd_payload_data = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + if(io_cpu_writeBack_isValid)begin + if(! stageB_mmuRsp_isIoAccess) begin + if(_zz_14_)begin + dataWriteCmd_payload_data = stageB_requestDataBypass; + end + end + end + if(_zz_17_)begin + dataWriteCmd_payload_data = io_mem_rsp_payload_data; + end + end + + always @ (*) begin + dataWriteCmd_payload_mask = (4'bxxxx); + if(io_cpu_writeBack_isValid)begin + if(! stageB_mmuRsp_isIoAccess) begin + if(_zz_14_)begin + dataWriteCmd_payload_mask = stageB_mask; + end + end + end + if(_zz_17_)begin + dataWriteCmd_payload_mask = (4'b1111); + end + end + + always @ (*) begin + case(io_cpu_execute_args_size) + 2'b00 : begin + _zz_6_ = (4'b0001); + end + 2'b01 : begin + _zz_6_ = (4'b0011); + end + default : begin + _zz_6_ = (4'b1111); + end + endcase + end + + assign stage0_mask = (_zz_6_ <<< io_cpu_execute_address[1 : 0]); + assign stage0_colisions[0] = (((dataWriteCmd_valid && dataWriteCmd_payload_way[0]) && (dataWriteCmd_payload_address == io_cpu_execute_address[11 : 2])) && ((stage0_mask & dataWriteCmd_payload_mask) != (4'b0000))); + assign io_cpu_memory_mmuBus_cmd_isValid = io_cpu_memory_isValid; + assign io_cpu_memory_mmuBus_cmd_virtualAddress = io_cpu_memory_address; + assign io_cpu_memory_mmuBus_cmd_bypassTranslation = 1'b0; + assign io_cpu_memory_mmuBus_end = ((! io_cpu_memory_isStuck) || io_cpu_memory_isRemoved); + assign io_cpu_memory_isWrite = stageA_request_wr; + assign stageA_wayHits_0 = ((io_cpu_memory_mmuBus_rsp_physicalAddress[31 : 12] == ways_0_tagsReadRsp_address) && ways_0_tagsReadRsp_valid); + assign _zz_7_[0] = (((dataWriteCmd_valid && dataWriteCmd_payload_way[0]) && (dataWriteCmd_payload_address == io_cpu_memory_address[11 : 2])) && ((stageA_mask & dataWriteCmd_payload_mask) != (4'b0000))); + assign stageA_colisions = (stage0_colisions_regNextWhen | _zz_7_); + always @ (*) begin + stageB_mmuRspFreeze = 1'b0; + if((stageB_loaderValid || loader_valid))begin + stageB_mmuRspFreeze = 1'b1; + end + end + + assign _zz_8_[0] = stageA_wayHits_0; + assign stageB_waysHit = (stageB_waysHits != (1'b0)); + assign stageB_dataMux = stageB_dataReadRsp_0; + always @ (*) begin + stageB_loaderValid = 1'b0; + if(io_cpu_writeBack_isValid)begin + if(! stageB_mmuRsp_isIoAccess) begin + if(! _zz_14_) begin + if(io_mem_cmd_ready)begin + stageB_loaderValid = 1'b1; + end + end + end + end + if(_zz_13_)begin + stageB_loaderValid = 1'b0; + end + end + + always @ (*) begin + io_cpu_writeBack_haltIt = io_cpu_writeBack_isValid; + if(stageB_flusher_valid)begin + io_cpu_writeBack_haltIt = 1'b1; + end + if(io_cpu_writeBack_isValid)begin + if(stageB_mmuRsp_isIoAccess)begin + if((stageB_request_wr ? io_mem_cmd_ready : io_mem_rsp_valid))begin + io_cpu_writeBack_haltIt = 1'b0; + end + if(_zz_18_)begin + io_cpu_writeBack_haltIt = 1'b0; + end + end else begin + if(_zz_14_)begin + if(((! stageB_request_wr) || io_mem_cmd_ready))begin + io_cpu_writeBack_haltIt = 1'b0; + end + if(stageB_isAmo)begin + if(_zz_15_)begin + io_cpu_writeBack_haltIt = 1'b1; + end + end + if(_zz_16_)begin + io_cpu_writeBack_haltIt = 1'b0; + end + end + end + end + if(_zz_13_)begin + io_cpu_writeBack_haltIt = 1'b0; + end + end + + always @ (*) begin + io_cpu_flush_ready = 1'b0; + if(_zz_19_)begin + io_cpu_flush_ready = 1'b1; + end + end + + always @ (*) begin + stageB_requestDataBypass = stageB_request_data; + if(stageB_isAmo)begin + stageB_requestDataBypass = stageB_amo_resultReg; + end + end + + assign stageB_amo_compare = stageB_request_amoCtrl_alu[2]; + assign stageB_amo_unsigned = (stageB_request_amoCtrl_alu[2 : 1] == (2'b11)); + assign stageB_amo_addSub = _zz_25_; + assign stageB_amo_less = ((stageB_request_data[31] == stageB_dataMux[31]) ? stageB_amo_addSub[31] : (stageB_amo_unsigned ? stageB_dataMux[31] : stageB_request_data[31])); + assign stageB_amo_selectRf = (stageB_request_amoCtrl_swap ? 1'b1 : (stageB_request_amoCtrl_alu[0] ^ stageB_amo_less)); + always @ (*) begin + case(_zz_22_) + 3'b000 : begin + stageB_amo_result = stageB_amo_addSub; + end + 3'b001 : begin + stageB_amo_result = (stageB_request_data ^ stageB_dataMux); + end + 3'b010 : begin + stageB_amo_result = (stageB_request_data | stageB_dataMux); + end + 3'b011 : begin + stageB_amo_result = (stageB_request_data & stageB_dataMux); + end + default : begin + stageB_amo_result = (stageB_amo_selectRf ? stageB_request_data : stageB_dataMux); + end + endcase + end + + always @ (*) begin + io_cpu_redo = 1'b0; + if(io_cpu_writeBack_isValid)begin + if(! stageB_mmuRsp_isIoAccess) begin + if(_zz_14_)begin + if(_zz_20_)begin + io_cpu_redo = 1'b1; + end + end + end + end + if((io_cpu_writeBack_isValid && stageB_mmuRsp_refilling))begin + io_cpu_redo = 1'b1; + end + if(loader_valid)begin + io_cpu_redo = 1'b1; + end + end + + always @ (*) begin + io_cpu_writeBack_accessError = 1'b0; + if(stageB_mmuRsp_isIoAccess)begin + io_cpu_writeBack_accessError = (io_mem_rsp_valid && io_mem_rsp_payload_error); + end else begin + io_cpu_writeBack_accessError = ((stageB_waysHits & _zz_9_) != (1'b0)); + end + end + + assign io_cpu_writeBack_mmuException = (io_cpu_writeBack_isValid && ((stageB_mmuRsp_exception || ((! stageB_mmuRsp_allowWrite) && stageB_request_wr)) || ((! stageB_mmuRsp_allowRead) && ((! stageB_request_wr) || stageB_isAmo)))); + assign io_cpu_writeBack_unalignedAccess = (io_cpu_writeBack_isValid && (((stageB_request_size == (2'b10)) && (stageB_mmuRsp_physicalAddress[1 : 0] != (2'b00))) || ((stageB_request_size == (2'b01)) && (stageB_mmuRsp_physicalAddress[0 : 0] != (1'b0))))); + assign io_cpu_writeBack_isWrite = stageB_request_wr; + always @ (*) begin + io_mem_cmd_valid = 1'b0; + if(io_cpu_writeBack_isValid)begin + if(stageB_mmuRsp_isIoAccess)begin + io_mem_cmd_valid = (! stageB_memCmdSent); + if(_zz_18_)begin + io_mem_cmd_valid = 1'b0; + end + end else begin + if(_zz_14_)begin + if(stageB_request_wr)begin + io_mem_cmd_valid = 1'b1; + end + if(stageB_isAmo)begin + if(_zz_15_)begin + io_mem_cmd_valid = 1'b0; + end + end + if(_zz_20_)begin + io_mem_cmd_valid = 1'b0; + end + if(_zz_16_)begin + io_mem_cmd_valid = 1'b0; + end + end else begin + if((! stageB_memCmdSent))begin + io_mem_cmd_valid = 1'b1; + end + end + end + end + if(_zz_13_)begin + io_mem_cmd_valid = 1'b0; + end + end + + always @ (*) begin + io_mem_cmd_payload_address = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + if(io_cpu_writeBack_isValid)begin + if(stageB_mmuRsp_isIoAccess)begin + io_mem_cmd_payload_address = {stageB_mmuRsp_physicalAddress[31 : 2],(2'b00)}; + end else begin + if(_zz_14_)begin + io_mem_cmd_payload_address = {stageB_mmuRsp_physicalAddress[31 : 2],(2'b00)}; + end else begin + io_mem_cmd_payload_address = {stageB_mmuRsp_physicalAddress[31 : 5],(5'b00000)}; + end + end + end + end + + always @ (*) begin + io_mem_cmd_payload_length = (3'bxxx); + if(io_cpu_writeBack_isValid)begin + if(stageB_mmuRsp_isIoAccess)begin + io_mem_cmd_payload_length = (3'b000); + end else begin + if(_zz_14_)begin + io_mem_cmd_payload_length = (3'b000); + end else begin + io_mem_cmd_payload_length = (3'b111); + end + end + end + end + + always @ (*) begin + io_mem_cmd_payload_last = 1'bx; + if(io_cpu_writeBack_isValid)begin + if(stageB_mmuRsp_isIoAccess)begin + io_mem_cmd_payload_last = 1'b1; + end else begin + if(_zz_14_)begin + io_mem_cmd_payload_last = 1'b1; + end else begin + io_mem_cmd_payload_last = 1'b1; + end + end + end + end + + always @ (*) begin + io_mem_cmd_payload_wr = stageB_request_wr; + if(io_cpu_writeBack_isValid)begin + if(! stageB_mmuRsp_isIoAccess) begin + if(! _zz_14_) begin + io_mem_cmd_payload_wr = 1'b0; + end + end + end + end + + assign io_mem_cmd_payload_mask = stageB_mask; + assign io_mem_cmd_payload_data = stageB_requestDataBypass; + always @ (*) begin + if(stageB_mmuRsp_isIoAccess)begin + io_cpu_writeBack_data = io_mem_rsp_payload_data; + end else begin + io_cpu_writeBack_data = stageB_dataMux; + end + if((stageB_request_isLrsc && stageB_request_wr))begin + io_cpu_writeBack_data = {31'd0, _zz_33_}; + end + end + + assign _zz_9_[0] = stageB_tagsReadRsp_0_error; + always @ (*) begin + loader_counter_willIncrement = 1'b0; + if(_zz_17_)begin + loader_counter_willIncrement = 1'b1; + end + end + + assign loader_counter_willClear = 1'b0; + assign loader_counter_willOverflowIfInc = (loader_counter_value == (3'b111)); + assign loader_counter_willOverflow = (loader_counter_willOverflowIfInc && loader_counter_willIncrement); + always @ (*) begin + loader_counter_valueNext = (loader_counter_value + _zz_35_); + if(loader_counter_willClear)begin + loader_counter_valueNext = (3'b000); + end + end + + always @ (posedge clk) begin + tagsWriteLastCmd_valid <= tagsWriteCmd_valid; + tagsWriteLastCmd_payload_way <= tagsWriteCmd_payload_way; + tagsWriteLastCmd_payload_address <= tagsWriteCmd_payload_address; + tagsWriteLastCmd_payload_data_valid <= tagsWriteCmd_payload_data_valid; + tagsWriteLastCmd_payload_data_error <= tagsWriteCmd_payload_data_error; + tagsWriteLastCmd_payload_data_address <= tagsWriteCmd_payload_data_address; + if((! io_cpu_memory_isStuck))begin + stageA_request_wr <= io_cpu_execute_args_wr; + stageA_request_data <= io_cpu_execute_args_data; + stageA_request_size <= io_cpu_execute_args_size; + stageA_request_isLrsc <= io_cpu_execute_args_isLrsc; + stageA_request_isAmo <= io_cpu_execute_args_isAmo; + stageA_request_amoCtrl_swap <= io_cpu_execute_args_amoCtrl_swap; + stageA_request_amoCtrl_alu <= io_cpu_execute_args_amoCtrl_alu; + end + if((! io_cpu_memory_isStuck))begin + stageA_mask <= stage0_mask; + end + if((! io_cpu_memory_isStuck))begin + stage0_colisions_regNextWhen <= stage0_colisions; + end + if((! io_cpu_writeBack_isStuck))begin + stageB_request_wr <= stageA_request_wr; + stageB_request_data <= stageA_request_data; + stageB_request_size <= stageA_request_size; + stageB_request_isLrsc <= stageA_request_isLrsc; + stageB_isAmo <= stageA_request_isAmo; + stageB_request_amoCtrl_swap <= stageA_request_amoCtrl_swap; + stageB_request_amoCtrl_alu <= stageA_request_amoCtrl_alu; + end + if(_zz_21_)begin + stageB_mmuRsp_isIoAccess <= io_cpu_memory_mmuBus_rsp_isIoAccess; + stageB_mmuRsp_allowRead <= io_cpu_memory_mmuBus_rsp_allowRead; + stageB_mmuRsp_allowWrite <= io_cpu_memory_mmuBus_rsp_allowWrite; + stageB_mmuRsp_allowExecute <= io_cpu_memory_mmuBus_rsp_allowExecute; + stageB_mmuRsp_exception <= io_cpu_memory_mmuBus_rsp_exception; + stageB_mmuRsp_refilling <= io_cpu_memory_mmuBus_rsp_refilling; + end + if((! io_cpu_writeBack_isStuck))begin + stageB_tagsReadRsp_0_valid <= ways_0_tagsReadRsp_valid; + stageB_tagsReadRsp_0_error <= ways_0_tagsReadRsp_error; + stageB_tagsReadRsp_0_address <= ways_0_tagsReadRsp_address; + end + if((! io_cpu_writeBack_isStuck))begin + stageB_dataReadRsp_0 <= ways_0_dataReadRsp; + end + if((! io_cpu_writeBack_isStuck))begin + stageB_waysHits <= _zz_8_; + end + if((! io_cpu_writeBack_isStuck))begin + stageB_mask <= stageA_mask; + end + if((! io_cpu_writeBack_isStuck))begin + stageB_colisions <= stageA_colisions; + end + stageB_amo_resultRegValid <= 1'b1; + if((! io_cpu_writeBack_isStuck))begin + stageB_amo_resultRegValid <= 1'b0; + end + stageB_amo_resultReg <= stageB_amo_result; + if(!(! ((io_cpu_writeBack_isValid && (! io_cpu_writeBack_haltIt)) && io_cpu_writeBack_isStuck))) begin + $display("ERROR writeBack stuck by another plugin is not allowed"); + end + end + + always @ (posedge clk) begin + if(reset) begin + stageB_flusher_valid <= 1'b1; + stageB_mmuRsp_physicalAddress <= (32'b00000000000000000000000000000000); + stageB_lrsc_reserved <= 1'b0; + stageB_memCmdSent <= 1'b0; + loader_valid <= 1'b0; + loader_counter_value <= (3'b000); + loader_waysAllocator <= (1'b1); + loader_error <= 1'b0; + end else begin + if(_zz_21_)begin + stageB_mmuRsp_physicalAddress <= io_cpu_memory_mmuBus_rsp_physicalAddress; + end + if(stageB_flusher_valid)begin + if((stageB_mmuRsp_physicalAddress[11 : 5] != (7'b1111111)))begin + stageB_mmuRsp_physicalAddress[11 : 5] <= (stageB_mmuRsp_physicalAddress[11 : 5] + (7'b0000001)); + end else begin + stageB_flusher_valid <= 1'b0; + end + end + if(_zz_19_)begin + stageB_mmuRsp_physicalAddress[11 : 5] <= (7'b0000000); + stageB_flusher_valid <= 1'b1; + end + if(((((io_cpu_writeBack_isValid && (! io_cpu_writeBack_isStuck)) && (! io_cpu_redo)) && stageB_request_isLrsc) && (! stageB_request_wr)))begin + stageB_lrsc_reserved <= 1'b1; + end + if(io_cpu_writeBack_clearLrsc)begin + stageB_lrsc_reserved <= 1'b0; + end + if(io_mem_cmd_ready)begin + stageB_memCmdSent <= 1'b1; + end + if((! io_cpu_writeBack_isStuck))begin + stageB_memCmdSent <= 1'b0; + end + if(stageB_loaderValid)begin + loader_valid <= 1'b1; + end + loader_counter_value <= loader_counter_valueNext; + if(_zz_17_)begin + loader_error <= (loader_error || io_mem_rsp_payload_error); + end + if(loader_counter_willOverflow)begin + loader_valid <= 1'b0; + loader_error <= 1'b0; + end + if((! loader_valid))begin + loader_waysAllocator <= _zz_36_[0:0]; + end + end + end + +endmodule + +module VexRiscv ( + input [31:0] externalResetVector, + input timerInterrupt, + input softwareInterrupt, + input [31:0] externalInterruptArray, + output reg iBusWishbone_CYC, + output reg iBusWishbone_STB, + input iBusWishbone_ACK, + output iBusWishbone_WE, + output [29:0] iBusWishbone_ADR, + input [31:0] iBusWishbone_DAT_MISO, + output [31:0] iBusWishbone_DAT_MOSI, + output [3:0] iBusWishbone_SEL, + input iBusWishbone_ERR, + output [1:0] iBusWishbone_BTE, + output [2:0] iBusWishbone_CTI, + output dBusWishbone_CYC, + output dBusWishbone_STB, + input dBusWishbone_ACK, + output dBusWishbone_WE, + output [29:0] dBusWishbone_ADR, + input [31:0] dBusWishbone_DAT_MISO, + output [31:0] dBusWishbone_DAT_MOSI, + output [3:0] dBusWishbone_SEL, + input dBusWishbone_ERR, + output [1:0] dBusWishbone_BTE, + output [2:0] dBusWishbone_CTI, + input clk, + input reset); + wire _zz_220_; + wire _zz_221_; + wire _zz_222_; + wire _zz_223_; + wire [31:0] _zz_224_; + wire _zz_225_; + wire _zz_226_; + wire _zz_227_; + reg _zz_228_; + reg _zz_229_; + reg [31:0] _zz_230_; + reg _zz_231_; + reg [31:0] _zz_232_; + reg [1:0] _zz_233_; + reg _zz_234_; + reg _zz_235_; + wire _zz_236_; + wire [2:0] _zz_237_; + reg _zz_238_; + wire [31:0] _zz_239_; + reg _zz_240_; + reg _zz_241_; + wire _zz_242_; + wire [31:0] _zz_243_; + wire _zz_244_; + wire _zz_245_; + reg [31:0] _zz_246_; + reg [31:0] _zz_247_; + reg [31:0] _zz_248_; + reg _zz_249_; + reg _zz_250_; + reg _zz_251_; + reg [9:0] _zz_252_; + reg [9:0] _zz_253_; + reg [9:0] _zz_254_; + reg [9:0] _zz_255_; + reg _zz_256_; + reg _zz_257_; + reg _zz_258_; + reg _zz_259_; + reg _zz_260_; + reg _zz_261_; + reg _zz_262_; + reg [9:0] _zz_263_; + reg [9:0] _zz_264_; + reg [9:0] _zz_265_; + reg [9:0] _zz_266_; + reg _zz_267_; + reg _zz_268_; + reg _zz_269_; + reg _zz_270_; + wire IBusCachedPlugin_cache_io_cpu_prefetch_haltIt; + wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_data; + wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress; + wire IBusCachedPlugin_cache_io_cpu_fetch_haltIt; + wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; + wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; + wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; + wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; + wire IBusCachedPlugin_cache_io_cpu_decode_error; + wire IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling; + wire IBusCachedPlugin_cache_io_cpu_decode_mmuException; + wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_data; + wire IBusCachedPlugin_cache_io_cpu_decode_cacheMiss; + wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_physicalAddress; + wire IBusCachedPlugin_cache_io_mem_cmd_valid; + wire [31:0] IBusCachedPlugin_cache_io_mem_cmd_payload_address; + wire [2:0] IBusCachedPlugin_cache_io_mem_cmd_payload_size; + wire dataCache_1__io_cpu_memory_isWrite; + wire dataCache_1__io_cpu_memory_mmuBus_cmd_isValid; + wire [31:0] dataCache_1__io_cpu_memory_mmuBus_cmd_virtualAddress; + wire dataCache_1__io_cpu_memory_mmuBus_cmd_bypassTranslation; + wire dataCache_1__io_cpu_memory_mmuBus_end; + wire dataCache_1__io_cpu_writeBack_haltIt; + wire [31:0] dataCache_1__io_cpu_writeBack_data; + wire dataCache_1__io_cpu_writeBack_mmuException; + wire dataCache_1__io_cpu_writeBack_unalignedAccess; + wire dataCache_1__io_cpu_writeBack_accessError; + wire dataCache_1__io_cpu_writeBack_isWrite; + wire dataCache_1__io_cpu_flush_ready; + wire dataCache_1__io_cpu_redo; + wire dataCache_1__io_mem_cmd_valid; + wire dataCache_1__io_mem_cmd_payload_wr; + wire [31:0] dataCache_1__io_mem_cmd_payload_address; + wire [31:0] dataCache_1__io_mem_cmd_payload_data; + wire [3:0] dataCache_1__io_mem_cmd_payload_mask; + wire [2:0] dataCache_1__io_mem_cmd_payload_length; + wire dataCache_1__io_mem_cmd_payload_last; + wire _zz_271_; + wire _zz_272_; + wire _zz_273_; + wire _zz_274_; + wire _zz_275_; + wire _zz_276_; + wire _zz_277_; + wire _zz_278_; + wire _zz_279_; + wire _zz_280_; + wire _zz_281_; + wire _zz_282_; + wire _zz_283_; + wire _zz_284_; + wire _zz_285_; + wire _zz_286_; + wire _zz_287_; + wire [1:0] _zz_288_; + wire _zz_289_; + wire _zz_290_; + wire _zz_291_; + wire _zz_292_; + wire _zz_293_; + wire _zz_294_; + wire _zz_295_; + wire _zz_296_; + wire _zz_297_; + wire _zz_298_; + wire _zz_299_; + wire _zz_300_; + wire _zz_301_; + wire _zz_302_; + wire _zz_303_; + wire _zz_304_; + wire _zz_305_; + wire _zz_306_; + wire _zz_307_; + wire _zz_308_; + wire _zz_309_; + wire _zz_310_; + wire _zz_311_; + wire _zz_312_; + wire _zz_313_; + wire _zz_314_; + wire _zz_315_; + wire _zz_316_; + wire _zz_317_; + wire _zz_318_; + wire _zz_319_; + wire _zz_320_; + wire _zz_321_; + wire _zz_322_; + wire _zz_323_; + wire _zz_324_; + wire _zz_325_; + wire _zz_326_; + wire _zz_327_; + wire [1:0] _zz_328_; + wire _zz_329_; + wire [3:0] _zz_330_; + wire [2:0] _zz_331_; + wire [31:0] _zz_332_; + wire [2:0] _zz_333_; + wire [2:0] _zz_334_; + wire [0:0] _zz_335_; + wire [1:0] _zz_336_; + wire [0:0] _zz_337_; + wire [1:0] _zz_338_; + wire [0:0] _zz_339_; + wire [0:0] _zz_340_; + wire [0:0] _zz_341_; + wire [0:0] _zz_342_; + wire [0:0] _zz_343_; + wire [0:0] _zz_344_; + wire [0:0] _zz_345_; + wire [0:0] _zz_346_; + wire [0:0] _zz_347_; + wire [0:0] _zz_348_; + wire [0:0] _zz_349_; + wire [0:0] _zz_350_; + wire [0:0] _zz_351_; + wire [0:0] _zz_352_; + wire [0:0] _zz_353_; + wire [0:0] _zz_354_; + wire [0:0] _zz_355_; + wire [0:0] _zz_356_; + wire [0:0] _zz_357_; + wire [0:0] _zz_358_; + wire [0:0] _zz_359_; + wire [0:0] _zz_360_; + wire [0:0] _zz_361_; + wire [0:0] _zz_362_; + wire [0:0] _zz_363_; + wire [0:0] _zz_364_; + wire [0:0] _zz_365_; + wire [0:0] _zz_366_; + wire [0:0] _zz_367_; + wire [2:0] _zz_368_; + wire [4:0] _zz_369_; + wire [11:0] _zz_370_; + wire [11:0] _zz_371_; + wire [31:0] _zz_372_; + wire [31:0] _zz_373_; + wire [31:0] _zz_374_; + wire [31:0] _zz_375_; + wire [31:0] _zz_376_; + wire [31:0] _zz_377_; + wire [31:0] _zz_378_; + wire [32:0] _zz_379_; + wire [31:0] _zz_380_; + wire [32:0] _zz_381_; + wire [19:0] _zz_382_; + wire [11:0] _zz_383_; + wire [11:0] _zz_384_; + wire [1:0] _zz_385_; + wire [1:0] _zz_386_; + wire [0:0] _zz_387_; + wire [5:0] _zz_388_; + wire [33:0] _zz_389_; + wire [32:0] _zz_390_; + wire [33:0] _zz_391_; + wire [32:0] _zz_392_; + wire [33:0] _zz_393_; + wire [32:0] _zz_394_; + wire [0:0] _zz_395_; + wire [5:0] _zz_396_; + wire [32:0] _zz_397_; + wire [32:0] _zz_398_; + wire [31:0] _zz_399_; + wire [31:0] _zz_400_; + wire [32:0] _zz_401_; + wire [32:0] _zz_402_; + wire [32:0] _zz_403_; + wire [0:0] _zz_404_; + wire [32:0] _zz_405_; + wire [0:0] _zz_406_; + wire [32:0] _zz_407_; + wire [0:0] _zz_408_; + wire [31:0] _zz_409_; + wire [0:0] _zz_410_; + wire [0:0] _zz_411_; + wire [0:0] _zz_412_; + wire [0:0] _zz_413_; + wire [0:0] _zz_414_; + wire [0:0] _zz_415_; + wire [0:0] _zz_416_; + wire [0:0] _zz_417_; + wire [0:0] _zz_418_; + wire [0:0] _zz_419_; + wire [0:0] _zz_420_; + wire [0:0] _zz_421_; + wire [0:0] _zz_422_; + wire [0:0] _zz_423_; + wire [0:0] _zz_424_; + wire [0:0] _zz_425_; + wire [0:0] _zz_426_; + wire [0:0] _zz_427_; + wire [0:0] _zz_428_; + wire [0:0] _zz_429_; + wire [0:0] _zz_430_; + wire [0:0] _zz_431_; + wire [0:0] _zz_432_; + wire [0:0] _zz_433_; + wire [0:0] _zz_434_; + wire [0:0] _zz_435_; + wire [0:0] _zz_436_; + wire [0:0] _zz_437_; + wire [0:0] _zz_438_; + wire [0:0] _zz_439_; + wire [0:0] _zz_440_; + wire [0:0] _zz_441_; + wire [0:0] _zz_442_; + wire [0:0] _zz_443_; + wire [0:0] _zz_444_; + wire [0:0] _zz_445_; + wire [0:0] _zz_446_; + wire [0:0] _zz_447_; + wire [0:0] _zz_448_; + wire [0:0] _zz_449_; + wire [0:0] _zz_450_; + wire [0:0] _zz_451_; + wire [0:0] _zz_452_; + wire [0:0] _zz_453_; + wire [0:0] _zz_454_; + wire [26:0] _zz_455_; + wire _zz_456_; + wire _zz_457_; + wire [1:0] _zz_458_; + wire [31:0] _zz_459_; + wire _zz_460_; + wire [0:0] _zz_461_; + wire [1:0] _zz_462_; + wire [0:0] _zz_463_; + wire [1:0] _zz_464_; + wire [4:0] _zz_465_; + wire [4:0] _zz_466_; + wire _zz_467_; + wire [0:0] _zz_468_; + wire [28:0] _zz_469_; + wire [31:0] _zz_470_; + wire [31:0] _zz_471_; + wire [31:0] _zz_472_; + wire _zz_473_; + wire _zz_474_; + wire [31:0] _zz_475_; + wire [31:0] _zz_476_; + wire _zz_477_; + wire _zz_478_; + wire _zz_479_; + wire [0:0] _zz_480_; + wire [2:0] _zz_481_; + wire [0:0] _zz_482_; + wire [1:0] _zz_483_; + wire [1:0] _zz_484_; + wire [1:0] _zz_485_; + wire _zz_486_; + wire [0:0] _zz_487_; + wire [26:0] _zz_488_; + wire [31:0] _zz_489_; + wire [31:0] _zz_490_; + wire [31:0] _zz_491_; + wire [31:0] _zz_492_; + wire [31:0] _zz_493_; + wire [31:0] _zz_494_; + wire [31:0] _zz_495_; + wire _zz_496_; + wire [0:0] _zz_497_; + wire [0:0] _zz_498_; + wire _zz_499_; + wire _zz_500_; + wire [0:0] _zz_501_; + wire [0:0] _zz_502_; + wire [1:0] _zz_503_; + wire [1:0] _zz_504_; + wire _zz_505_; + wire [0:0] _zz_506_; + wire [24:0] _zz_507_; + wire [31:0] _zz_508_; + wire [31:0] _zz_509_; + wire [31:0] _zz_510_; + wire [31:0] _zz_511_; + wire [31:0] _zz_512_; + wire [31:0] _zz_513_; + wire [31:0] _zz_514_; + wire _zz_515_; + wire [0:0] _zz_516_; + wire [0:0] _zz_517_; + wire [0:0] _zz_518_; + wire [0:0] _zz_519_; + wire _zz_520_; + wire [0:0] _zz_521_; + wire [22:0] _zz_522_; + wire [31:0] _zz_523_; + wire [31:0] _zz_524_; + wire [31:0] _zz_525_; + wire [31:0] _zz_526_; + wire _zz_527_; + wire [1:0] _zz_528_; + wire [1:0] _zz_529_; + wire _zz_530_; + wire [0:0] _zz_531_; + wire [18:0] _zz_532_; + wire [31:0] _zz_533_; + wire [31:0] _zz_534_; + wire [31:0] _zz_535_; + wire [31:0] _zz_536_; + wire [31:0] _zz_537_; + wire [31:0] _zz_538_; + wire [31:0] _zz_539_; + wire [0:0] _zz_540_; + wire [0:0] _zz_541_; + wire _zz_542_; + wire [0:0] _zz_543_; + wire [14:0] _zz_544_; + wire [31:0] _zz_545_; + wire [31:0] _zz_546_; + wire [31:0] _zz_547_; + wire [31:0] _zz_548_; + wire _zz_549_; + wire [0:0] _zz_550_; + wire [3:0] _zz_551_; + wire _zz_552_; + wire [2:0] _zz_553_; + wire [2:0] _zz_554_; + wire _zz_555_; + wire [0:0] _zz_556_; + wire [10:0] _zz_557_; + wire [31:0] _zz_558_; + wire [31:0] _zz_559_; + wire [31:0] _zz_560_; + wire _zz_561_; + wire [0:0] _zz_562_; + wire [1:0] _zz_563_; + wire [31:0] _zz_564_; + wire [0:0] _zz_565_; + wire [0:0] _zz_566_; + wire [0:0] _zz_567_; + wire [3:0] _zz_568_; + wire [0:0] _zz_569_; + wire [0:0] _zz_570_; + wire _zz_571_; + wire [0:0] _zz_572_; + wire [8:0] _zz_573_; + wire [31:0] _zz_574_; + wire [31:0] _zz_575_; + wire [31:0] _zz_576_; + wire _zz_577_; + wire _zz_578_; + wire _zz_579_; + wire [0:0] _zz_580_; + wire [1:0] _zz_581_; + wire [31:0] _zz_582_; + wire [31:0] _zz_583_; + wire _zz_584_; + wire [0:0] _zz_585_; + wire [0:0] _zz_586_; + wire _zz_587_; + wire [0:0] _zz_588_; + wire [6:0] _zz_589_; + wire [31:0] _zz_590_; + wire [31:0] _zz_591_; + wire [31:0] _zz_592_; + wire [31:0] _zz_593_; + wire [31:0] _zz_594_; + wire _zz_595_; + wire _zz_596_; + wire [31:0] _zz_597_; + wire [31:0] _zz_598_; + wire [31:0] _zz_599_; + wire _zz_600_; + wire [0:0] _zz_601_; + wire [0:0] _zz_602_; + wire _zz_603_; + wire [0:0] _zz_604_; + wire [4:0] _zz_605_; + wire [31:0] _zz_606_; + wire _zz_607_; + wire [0:0] _zz_608_; + wire [0:0] _zz_609_; + wire _zz_610_; + wire [0:0] _zz_611_; + wire [0:0] _zz_612_; + wire _zz_613_; + wire [0:0] _zz_614_; + wire [1:0] _zz_615_; + wire [31:0] _zz_616_; + wire [31:0] _zz_617_; + wire [31:0] _zz_618_; + wire _zz_619_; + wire _zz_620_; + wire [0:0] _zz_621_; + wire [1:0] _zz_622_; + wire [6:0] _zz_623_; + wire [6:0] _zz_624_; + wire [0:0] _zz_625_; + wire [0:0] _zz_626_; + wire [31:0] _zz_627_; + wire [31:0] _zz_628_; + wire [31:0] _zz_629_; + wire [31:0] _zz_630_; + wire _zz_631_; + wire [0:0] _zz_632_; + wire [2:0] _zz_633_; + wire [31:0] _zz_634_; + wire [31:0] _zz_635_; + wire [31:0] _zz_636_; + wire _zz_637_; + wire [0:0] _zz_638_; + wire [17:0] _zz_639_; + wire [31:0] _zz_640_; + wire [31:0] _zz_641_; + wire [31:0] _zz_642_; + wire _zz_643_; + wire [0:0] _zz_644_; + wire [11:0] _zz_645_; + wire [31:0] _zz_646_; + wire [31:0] _zz_647_; + wire [31:0] _zz_648_; + wire _zz_649_; + wire [0:0] _zz_650_; + wire [5:0] _zz_651_; + wire [31:0] _zz_652_; + wire [31:0] _zz_653_; + wire [31:0] _zz_654_; + wire _zz_655_; + wire _zz_656_; + wire decode_SRC2_FORCE_ZERO; + wire decode_BYPASSABLE_EXECUTE_STAGE; + wire decode_IS_RS2_SIGNED; + wire [31:0] execute_BRANCH_CALC; + wire `BranchCtrlEnum_defaultEncoding_type decode_BRANCH_CTRL; + wire `BranchCtrlEnum_defaultEncoding_type _zz_1_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_2_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_3_; + wire decode_CSR_WRITE_OPCODE; + wire [31:0] execute_REGFILE_WRITE_DATA; + wire memory_IS_SFENCE_VMA; + wire execute_IS_SFENCE_VMA; + wire decode_IS_SFENCE_VMA; + wire execute_IS_DBUS_SHARING; + wire `AluBitwiseCtrlEnum_defaultEncoding_type decode_ALU_BITWISE_CTRL; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_4_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_5_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_6_; + wire [1:0] memory_MEMORY_ADDRESS_LOW; + wire [1:0] execute_MEMORY_ADDRESS_LOW; + wire decode_IS_DIV; + wire decode_IS_RS1_SIGNED; + wire `Src1CtrlEnum_defaultEncoding_type decode_SRC1_CTRL; + wire `Src1CtrlEnum_defaultEncoding_type _zz_7_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_8_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_9_; + wire memory_MEMORY_WR; + wire decode_MEMORY_WR; + wire [31:0] writeBack_FORMAL_PC_NEXT; + wire [31:0] memory_FORMAL_PC_NEXT; + wire [31:0] execute_FORMAL_PC_NEXT; + wire [31:0] decode_FORMAL_PC_NEXT; + wire decode_MEMORY_AMO; + wire decode_CSR_READ_OPCODE; + wire execute_BYPASSABLE_MEMORY_STAGE; + wire decode_BYPASSABLE_MEMORY_STAGE; + wire `Src2CtrlEnum_defaultEncoding_type decode_SRC2_CTRL; + wire `Src2CtrlEnum_defaultEncoding_type _zz_10_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_11_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_12_; + wire [31:0] memory_PC; + wire `EnvCtrlEnum_defaultEncoding_type _zz_13_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_14_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_15_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_16_; + wire `EnvCtrlEnum_defaultEncoding_type decode_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_17_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_18_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_19_; + wire decode_SRC_LESS_UNSIGNED; + wire `AluCtrlEnum_defaultEncoding_type decode_ALU_CTRL; + wire `AluCtrlEnum_defaultEncoding_type _zz_20_; + wire `AluCtrlEnum_defaultEncoding_type _zz_21_; + wire `AluCtrlEnum_defaultEncoding_type _zz_22_; + wire [31:0] execute_SHIFT_RIGHT; + wire decode_IS_CSR; + wire decode_IS_MUL; + wire decode_MEMORY_MANAGMENT; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_23_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_24_; + wire `ShiftCtrlEnum_defaultEncoding_type decode_SHIFT_CTRL; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_25_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_26_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_27_; + wire decode_MEMORY_LRSC; + wire execute_BRANCH_DO; + wire execute_IS_RS1_SIGNED; + wire execute_IS_DIV; + wire execute_IS_MUL; + wire execute_IS_RS2_SIGNED; + wire memory_IS_DIV; + wire memory_IS_MUL; + wire execute_CSR_READ_OPCODE; + wire execute_CSR_WRITE_OPCODE; + wire execute_IS_CSR; + wire `EnvCtrlEnum_defaultEncoding_type memory_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_28_; + wire `EnvCtrlEnum_defaultEncoding_type execute_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_29_; + wire _zz_30_; + wire _zz_31_; + wire `EnvCtrlEnum_defaultEncoding_type writeBack_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_32_; + wire [31:0] memory_BRANCH_CALC; + wire memory_BRANCH_DO; + wire [31:0] _zz_33_; + wire [31:0] execute_PC; + wire [31:0] execute_RS1; + wire `BranchCtrlEnum_defaultEncoding_type execute_BRANCH_CTRL; + wire `BranchCtrlEnum_defaultEncoding_type _zz_34_; + wire _zz_35_; + wire decode_RS2_USE; + wire decode_RS1_USE; + reg [31:0] _zz_36_; + wire execute_REGFILE_WRITE_VALID; + wire execute_BYPASSABLE_EXECUTE_STAGE; + wire memory_REGFILE_WRITE_VALID; + wire [31:0] memory_INSTRUCTION; + wire memory_BYPASSABLE_MEMORY_STAGE; + wire writeBack_REGFILE_WRITE_VALID; + reg [31:0] decode_RS2; + reg [31:0] decode_RS1; + wire [31:0] memory_SHIFT_RIGHT; + reg [31:0] _zz_37_; + wire `ShiftCtrlEnum_defaultEncoding_type memory_SHIFT_CTRL; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_38_; + wire [31:0] _zz_39_; + wire `ShiftCtrlEnum_defaultEncoding_type execute_SHIFT_CTRL; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_40_; + wire _zz_41_; + wire [31:0] _zz_42_; + wire [31:0] _zz_43_; + wire execute_SRC_LESS_UNSIGNED; + wire execute_SRC2_FORCE_ZERO; + wire execute_SRC_USE_SUB_LESS; + wire [31:0] _zz_44_; + wire `Src2CtrlEnum_defaultEncoding_type execute_SRC2_CTRL; + wire `Src2CtrlEnum_defaultEncoding_type _zz_45_; + wire [31:0] _zz_46_; + wire `Src1CtrlEnum_defaultEncoding_type execute_SRC1_CTRL; + wire `Src1CtrlEnum_defaultEncoding_type _zz_47_; + wire [31:0] _zz_48_; + wire decode_SRC_USE_SUB_LESS; + wire decode_SRC_ADD_ZERO; + wire _zz_49_; + wire [31:0] execute_SRC_ADD_SUB; + wire execute_SRC_LESS; + wire `AluCtrlEnum_defaultEncoding_type execute_ALU_CTRL; + wire `AluCtrlEnum_defaultEncoding_type _zz_50_; + wire [31:0] _zz_51_; + wire [31:0] execute_SRC2; + wire [31:0] execute_SRC1; + wire `AluBitwiseCtrlEnum_defaultEncoding_type execute_ALU_BITWISE_CTRL; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_52_; + wire [31:0] _zz_53_; + wire _zz_54_; + reg _zz_55_; + wire [31:0] _zz_56_; + wire [31:0] _zz_57_; + wire [31:0] decode_INSTRUCTION_ANTICIPATED; + reg decode_REGFILE_WRITE_VALID; + wire decode_LEGAL_INSTRUCTION; + wire decode_INSTRUCTION_READY; + wire _zz_58_; + wire _zz_59_; + wire _zz_60_; + wire _zz_61_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_62_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_63_; + wire _zz_64_; + wire _zz_65_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_66_; + wire _zz_67_; + wire _zz_68_; + wire _zz_69_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_70_; + wire _zz_71_; + wire _zz_72_; + wire _zz_73_; + wire _zz_74_; + wire _zz_75_; + wire _zz_76_; + wire _zz_77_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_78_; + wire _zz_79_; + wire _zz_80_; + wire `AluCtrlEnum_defaultEncoding_type _zz_81_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_82_; + wire _zz_83_; + wire _zz_84_; + wire _zz_85_; + wire writeBack_IS_SFENCE_VMA; + wire writeBack_IS_DBUS_SHARING; + wire memory_IS_DBUS_SHARING; + wire _zz_86_; + reg [31:0] _zz_87_; + wire [1:0] writeBack_MEMORY_ADDRESS_LOW; + wire writeBack_MEMORY_WR; + wire [31:0] writeBack_REGFILE_WRITE_DATA; + wire writeBack_MEMORY_ENABLE; + wire [31:0] memory_REGFILE_WRITE_DATA; + wire memory_MEMORY_ENABLE; + wire [1:0] _zz_88_; + wire execute_MEMORY_AMO; + wire execute_MEMORY_LRSC; + wire execute_MEMORY_MANAGMENT; + wire [31:0] execute_RS2; + wire execute_MEMORY_WR; + wire [31:0] execute_SRC_ADD; + wire execute_MEMORY_ENABLE; + wire [31:0] execute_INSTRUCTION; + wire decode_MEMORY_ENABLE; + wire decode_FLUSH_ALL; + reg IBusCachedPlugin_rsp_issueDetected; + reg _zz_89_; + reg _zz_90_; + reg _zz_91_; + wire [31:0] decode_INSTRUCTION; + wire [31:0] _zz_92_; + reg [31:0] _zz_93_; + reg [31:0] _zz_94_; + wire [31:0] decode_PC; + wire [31:0] _zz_95_; + wire [31:0] _zz_96_; + wire [31:0] _zz_97_; + wire [31:0] writeBack_PC; + wire [31:0] writeBack_INSTRUCTION; + reg decode_arbitration_haltItself; + reg decode_arbitration_haltByOther; + reg decode_arbitration_removeIt; + wire decode_arbitration_flushIt; + reg decode_arbitration_flushNext; + wire decode_arbitration_isValid; + wire decode_arbitration_isStuck; + wire decode_arbitration_isStuckByOthers; + wire decode_arbitration_isFlushed; + wire decode_arbitration_isMoving; + wire decode_arbitration_isFiring; + reg execute_arbitration_haltItself; + wire execute_arbitration_haltByOther; + reg execute_arbitration_removeIt; + wire execute_arbitration_flushIt; + reg execute_arbitration_flushNext; + reg execute_arbitration_isValid; + wire execute_arbitration_isStuck; + wire execute_arbitration_isStuckByOthers; + wire execute_arbitration_isFlushed; + wire execute_arbitration_isMoving; + wire execute_arbitration_isFiring; + reg memory_arbitration_haltItself; + wire memory_arbitration_haltByOther; + reg memory_arbitration_removeIt; + wire memory_arbitration_flushIt; + reg memory_arbitration_flushNext; + reg memory_arbitration_isValid; + wire memory_arbitration_isStuck; + wire memory_arbitration_isStuckByOthers; + wire memory_arbitration_isFlushed; + wire memory_arbitration_isMoving; + wire memory_arbitration_isFiring; + reg writeBack_arbitration_haltItself; + wire writeBack_arbitration_haltByOther; + reg writeBack_arbitration_removeIt; + reg writeBack_arbitration_flushIt; + reg writeBack_arbitration_flushNext; + reg writeBack_arbitration_isValid; + wire writeBack_arbitration_isStuck; + wire writeBack_arbitration_isStuckByOthers; + wire writeBack_arbitration_isFlushed; + wire writeBack_arbitration_isMoving; + wire writeBack_arbitration_isFiring; + wire [31:0] lastStageInstruction /* verilator public */ ; + wire [31:0] lastStagePc /* verilator public */ ; + wire lastStageIsValid /* verilator public */ ; + wire lastStageIsFiring /* verilator public */ ; + reg IBusCachedPlugin_fetcherHalt; + reg IBusCachedPlugin_fetcherflushIt; + reg IBusCachedPlugin_incomingInstruction; + wire IBusCachedPlugin_pcValids_0; + wire IBusCachedPlugin_pcValids_1; + wire IBusCachedPlugin_pcValids_2; + wire IBusCachedPlugin_pcValids_3; + wire IBusCachedPlugin_redoBranch_valid; + wire [31:0] IBusCachedPlugin_redoBranch_payload; + reg IBusCachedPlugin_decodeExceptionPort_valid; + reg [3:0] IBusCachedPlugin_decodeExceptionPort_payload_code; + wire [31:0] IBusCachedPlugin_decodeExceptionPort_payload_badAddr; + wire IBusCachedPlugin_mmuBus_cmd_isValid; + wire [31:0] IBusCachedPlugin_mmuBus_cmd_virtualAddress; + wire IBusCachedPlugin_mmuBus_cmd_bypassTranslation; + reg [31:0] IBusCachedPlugin_mmuBus_rsp_physicalAddress; + wire IBusCachedPlugin_mmuBus_rsp_isIoAccess; + reg IBusCachedPlugin_mmuBus_rsp_allowRead; + reg IBusCachedPlugin_mmuBus_rsp_allowWrite; + reg IBusCachedPlugin_mmuBus_rsp_allowExecute; + reg IBusCachedPlugin_mmuBus_rsp_exception; + reg IBusCachedPlugin_mmuBus_rsp_refilling; + wire IBusCachedPlugin_mmuBus_end; + wire IBusCachedPlugin_mmuBus_busy; + wire DBusCachedPlugin_mmuBus_cmd_isValid; + wire [31:0] DBusCachedPlugin_mmuBus_cmd_virtualAddress; + reg DBusCachedPlugin_mmuBus_cmd_bypassTranslation; + reg [31:0] DBusCachedPlugin_mmuBus_rsp_physicalAddress; + wire DBusCachedPlugin_mmuBus_rsp_isIoAccess; + reg DBusCachedPlugin_mmuBus_rsp_allowRead; + reg DBusCachedPlugin_mmuBus_rsp_allowWrite; + reg DBusCachedPlugin_mmuBus_rsp_allowExecute; + reg DBusCachedPlugin_mmuBus_rsp_exception; + reg DBusCachedPlugin_mmuBus_rsp_refilling; + wire DBusCachedPlugin_mmuBus_end; + wire DBusCachedPlugin_mmuBus_busy; + reg DBusCachedPlugin_redoBranch_valid; + wire [31:0] DBusCachedPlugin_redoBranch_payload; + reg DBusCachedPlugin_exceptionBus_valid; + reg [3:0] DBusCachedPlugin_exceptionBus_payload_code; + wire [31:0] DBusCachedPlugin_exceptionBus_payload_badAddr; + reg MmuPlugin_dBusAccess_cmd_valid; + reg MmuPlugin_dBusAccess_cmd_ready; + reg [31:0] MmuPlugin_dBusAccess_cmd_payload_address; + wire [1:0] MmuPlugin_dBusAccess_cmd_payload_size; + wire MmuPlugin_dBusAccess_cmd_payload_write; + wire [31:0] MmuPlugin_dBusAccess_cmd_payload_data; + wire [3:0] MmuPlugin_dBusAccess_cmd_payload_writeMask; + wire MmuPlugin_dBusAccess_rsp_valid; + wire [31:0] MmuPlugin_dBusAccess_rsp_payload_data; + wire MmuPlugin_dBusAccess_rsp_payload_error; + wire MmuPlugin_dBusAccess_rsp_payload_redo; + wire decodeExceptionPort_valid; + wire [3:0] decodeExceptionPort_payload_code; + wire [31:0] decodeExceptionPort_payload_badAddr; + wire BranchPlugin_jumpInterface_valid; + wire [31:0] BranchPlugin_jumpInterface_payload; + wire BranchPlugin_branchExceptionPort_valid; + wire [3:0] BranchPlugin_branchExceptionPort_payload_code; + wire [31:0] BranchPlugin_branchExceptionPort_payload_badAddr; + reg CsrPlugin_jumpInterface_valid; + reg [31:0] CsrPlugin_jumpInterface_payload; + wire CsrPlugin_exceptionPendings_0; + wire CsrPlugin_exceptionPendings_1; + wire CsrPlugin_exceptionPendings_2; + wire CsrPlugin_exceptionPendings_3; + wire externalInterrupt; + wire externalInterruptS; + wire contextSwitching; + reg [1:0] CsrPlugin_privilege; + wire CsrPlugin_forceMachineWire; + reg CsrPlugin_selfException_valid; + reg [3:0] CsrPlugin_selfException_payload_code; + wire [31:0] CsrPlugin_selfException_payload_badAddr; + wire CsrPlugin_allowInterrupts; + wire CsrPlugin_allowException; + wire IBusCachedPlugin_jump_pcLoad_valid; + wire [31:0] IBusCachedPlugin_jump_pcLoad_payload; + wire [3:0] _zz_98_; + wire [3:0] _zz_99_; + wire _zz_100_; + wire _zz_101_; + wire _zz_102_; + wire IBusCachedPlugin_fetchPc_output_valid; + wire IBusCachedPlugin_fetchPc_output_ready; + wire [31:0] IBusCachedPlugin_fetchPc_output_payload; + reg [31:0] IBusCachedPlugin_fetchPc_pcReg /* verilator public */ ; + reg IBusCachedPlugin_fetchPc_corrected; + reg IBusCachedPlugin_fetchPc_pcRegPropagate; + reg IBusCachedPlugin_fetchPc_booted; + reg IBusCachedPlugin_fetchPc_inc; + reg [31:0] IBusCachedPlugin_fetchPc_pc; + wire IBusCachedPlugin_iBusRsp_stages_0_input_valid; + wire IBusCachedPlugin_iBusRsp_stages_0_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_input_payload; + wire IBusCachedPlugin_iBusRsp_stages_0_output_valid; + wire IBusCachedPlugin_iBusRsp_stages_0_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_output_payload; + wire IBusCachedPlugin_iBusRsp_stages_0_halt; + wire IBusCachedPlugin_iBusRsp_stages_0_inputSample; + wire IBusCachedPlugin_iBusRsp_stages_1_input_valid; + wire IBusCachedPlugin_iBusRsp_stages_1_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_input_payload; + wire IBusCachedPlugin_iBusRsp_stages_1_output_valid; + wire IBusCachedPlugin_iBusRsp_stages_1_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_output_payload; + reg IBusCachedPlugin_iBusRsp_stages_1_halt; + wire IBusCachedPlugin_iBusRsp_stages_1_inputSample; + wire IBusCachedPlugin_iBusRsp_stages_2_input_valid; + wire IBusCachedPlugin_iBusRsp_stages_2_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_2_input_payload; + wire IBusCachedPlugin_iBusRsp_stages_2_output_valid; + wire IBusCachedPlugin_iBusRsp_stages_2_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_2_output_payload; + reg IBusCachedPlugin_iBusRsp_stages_2_halt; + wire IBusCachedPlugin_iBusRsp_stages_2_inputSample; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; + reg IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_inputSample; + wire _zz_103_; + wire _zz_104_; + wire _zz_105_; + wire _zz_106_; + wire _zz_107_; + wire _zz_108_; + reg _zz_109_; + wire _zz_110_; + reg _zz_111_; + reg [31:0] _zz_112_; + wire _zz_113_; + reg _zz_114_; + reg [31:0] _zz_115_; + reg IBusCachedPlugin_iBusRsp_readyForError; + wire IBusCachedPlugin_iBusRsp_decodeInput_valid; + wire IBusCachedPlugin_iBusRsp_decodeInput_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; + wire IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_error; + wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; + wire IBusCachedPlugin_iBusRsp_decodeInput_payload_isRvc; + reg IBusCachedPlugin_injector_nextPcCalc_valids_0; + reg IBusCachedPlugin_injector_nextPcCalc_valids_1; + reg IBusCachedPlugin_injector_nextPcCalc_valids_2; + reg IBusCachedPlugin_injector_nextPcCalc_valids_3; + reg IBusCachedPlugin_injector_nextPcCalc_valids_4; + reg IBusCachedPlugin_injector_nextPcCalc_valids_5; + reg IBusCachedPlugin_injector_decodeRemoved; + wire iBus_cmd_valid; + wire iBus_cmd_ready; + reg [31:0] iBus_cmd_payload_address; + wire [2:0] iBus_cmd_payload_size; + wire iBus_rsp_valid; + wire [31:0] iBus_rsp_payload_data; + wire iBus_rsp_payload_error; + wire [31:0] _zz_116_; + reg [31:0] IBusCachedPlugin_rspCounter; + wire IBusCachedPlugin_s0_tightlyCoupledHit; + reg IBusCachedPlugin_s1_tightlyCoupledHit; + reg IBusCachedPlugin_s2_tightlyCoupledHit; + wire IBusCachedPlugin_rsp_iBusRspOutputHalt; + reg IBusCachedPlugin_rsp_redoFetch; + wire dBus_cmd_valid; + wire dBus_cmd_ready; + wire dBus_cmd_payload_wr; + wire [31:0] dBus_cmd_payload_address; + wire [31:0] dBus_cmd_payload_data; + wire [3:0] dBus_cmd_payload_mask; + wire [2:0] dBus_cmd_payload_length; + wire dBus_cmd_payload_last; + wire dBus_rsp_valid; + wire [31:0] dBus_rsp_payload_data; + wire dBus_rsp_payload_error; + wire dataCache_1__io_mem_cmd_s2mPipe_valid; + wire dataCache_1__io_mem_cmd_s2mPipe_ready; + wire dataCache_1__io_mem_cmd_s2mPipe_payload_wr; + wire [31:0] dataCache_1__io_mem_cmd_s2mPipe_payload_address; + wire [31:0] dataCache_1__io_mem_cmd_s2mPipe_payload_data; + wire [3:0] dataCache_1__io_mem_cmd_s2mPipe_payload_mask; + wire [2:0] dataCache_1__io_mem_cmd_s2mPipe_payload_length; + wire dataCache_1__io_mem_cmd_s2mPipe_payload_last; + reg _zz_117_; + reg _zz_118_; + reg [31:0] _zz_119_; + reg [31:0] _zz_120_; + reg [3:0] _zz_121_; + reg [2:0] _zz_122_; + reg _zz_123_; + wire dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_valid; + wire dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_ready; + wire dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_wr; + wire [31:0] dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_address; + wire [31:0] dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_data; + wire [3:0] dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_mask; + wire [2:0] dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_length; + wire dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_last; + reg _zz_124_; + reg _zz_125_; + reg [31:0] _zz_126_; + reg [31:0] _zz_127_; + reg [3:0] _zz_128_; + reg [2:0] _zz_129_; + reg _zz_130_; + wire [31:0] _zz_131_; + reg [31:0] DBusCachedPlugin_rspCounter; + wire [1:0] execute_DBusCachedPlugin_size; + reg [31:0] _zz_132_; + reg [31:0] writeBack_DBusCachedPlugin_rspShifted; + wire _zz_133_; + reg [31:0] _zz_134_; + wire _zz_135_; + reg [31:0] _zz_136_; + reg [31:0] writeBack_DBusCachedPlugin_rspFormated; + reg DBusCachedPlugin_forceDatapath; + reg MmuPlugin_status_sum; + reg MmuPlugin_status_mxr; + reg MmuPlugin_status_mprv; + reg MmuPlugin_satp_mode; + reg [19:0] MmuPlugin_satp_ppn; + reg MmuPlugin_ports_0_cache_0_valid; + reg MmuPlugin_ports_0_cache_0_exception; + reg MmuPlugin_ports_0_cache_0_superPage; + reg [9:0] MmuPlugin_ports_0_cache_0_virtualAddress_0; + reg [9:0] MmuPlugin_ports_0_cache_0_virtualAddress_1; + reg [9:0] MmuPlugin_ports_0_cache_0_physicalAddress_0; + reg [9:0] MmuPlugin_ports_0_cache_0_physicalAddress_1; + reg MmuPlugin_ports_0_cache_0_allowRead; + reg MmuPlugin_ports_0_cache_0_allowWrite; + reg MmuPlugin_ports_0_cache_0_allowExecute; + reg MmuPlugin_ports_0_cache_0_allowUser; + reg MmuPlugin_ports_0_cache_1_valid; + reg MmuPlugin_ports_0_cache_1_exception; + reg MmuPlugin_ports_0_cache_1_superPage; + reg [9:0] MmuPlugin_ports_0_cache_1_virtualAddress_0; + reg [9:0] MmuPlugin_ports_0_cache_1_virtualAddress_1; + reg [9:0] MmuPlugin_ports_0_cache_1_physicalAddress_0; + reg [9:0] MmuPlugin_ports_0_cache_1_physicalAddress_1; + reg MmuPlugin_ports_0_cache_1_allowRead; + reg MmuPlugin_ports_0_cache_1_allowWrite; + reg MmuPlugin_ports_0_cache_1_allowExecute; + reg MmuPlugin_ports_0_cache_1_allowUser; + reg MmuPlugin_ports_0_cache_2_valid; + reg MmuPlugin_ports_0_cache_2_exception; + reg MmuPlugin_ports_0_cache_2_superPage; + reg [9:0] MmuPlugin_ports_0_cache_2_virtualAddress_0; + reg [9:0] MmuPlugin_ports_0_cache_2_virtualAddress_1; + reg [9:0] MmuPlugin_ports_0_cache_2_physicalAddress_0; + reg [9:0] MmuPlugin_ports_0_cache_2_physicalAddress_1; + reg MmuPlugin_ports_0_cache_2_allowRead; + reg MmuPlugin_ports_0_cache_2_allowWrite; + reg MmuPlugin_ports_0_cache_2_allowExecute; + reg MmuPlugin_ports_0_cache_2_allowUser; + reg MmuPlugin_ports_0_cache_3_valid; + reg MmuPlugin_ports_0_cache_3_exception; + reg MmuPlugin_ports_0_cache_3_superPage; + reg [9:0] MmuPlugin_ports_0_cache_3_virtualAddress_0; + reg [9:0] MmuPlugin_ports_0_cache_3_virtualAddress_1; + reg [9:0] MmuPlugin_ports_0_cache_3_physicalAddress_0; + reg [9:0] MmuPlugin_ports_0_cache_3_physicalAddress_1; + reg MmuPlugin_ports_0_cache_3_allowRead; + reg MmuPlugin_ports_0_cache_3_allowWrite; + reg MmuPlugin_ports_0_cache_3_allowExecute; + reg MmuPlugin_ports_0_cache_3_allowUser; + wire MmuPlugin_ports_0_cacheHits_0; + wire MmuPlugin_ports_0_cacheHits_1; + wire MmuPlugin_ports_0_cacheHits_2; + wire MmuPlugin_ports_0_cacheHits_3; + wire MmuPlugin_ports_0_cacheHit; + wire _zz_137_; + wire _zz_138_; + wire [1:0] _zz_139_; + wire MmuPlugin_ports_0_cacheLine_valid; + wire MmuPlugin_ports_0_cacheLine_exception; + wire MmuPlugin_ports_0_cacheLine_superPage; + wire [9:0] MmuPlugin_ports_0_cacheLine_virtualAddress_0; + wire [9:0] MmuPlugin_ports_0_cacheLine_virtualAddress_1; + wire [9:0] MmuPlugin_ports_0_cacheLine_physicalAddress_0; + wire [9:0] MmuPlugin_ports_0_cacheLine_physicalAddress_1; + wire MmuPlugin_ports_0_cacheLine_allowRead; + wire MmuPlugin_ports_0_cacheLine_allowWrite; + wire MmuPlugin_ports_0_cacheLine_allowExecute; + wire MmuPlugin_ports_0_cacheLine_allowUser; + reg MmuPlugin_ports_0_entryToReplace_willIncrement; + wire MmuPlugin_ports_0_entryToReplace_willClear; + reg [1:0] MmuPlugin_ports_0_entryToReplace_valueNext; + reg [1:0] MmuPlugin_ports_0_entryToReplace_value; + wire MmuPlugin_ports_0_entryToReplace_willOverflowIfInc; + wire MmuPlugin_ports_0_entryToReplace_willOverflow; + reg MmuPlugin_ports_0_requireMmuLockup; + reg MmuPlugin_ports_1_cache_0_valid; + reg MmuPlugin_ports_1_cache_0_exception; + reg MmuPlugin_ports_1_cache_0_superPage; + reg [9:0] MmuPlugin_ports_1_cache_0_virtualAddress_0; + reg [9:0] MmuPlugin_ports_1_cache_0_virtualAddress_1; + reg [9:0] MmuPlugin_ports_1_cache_0_physicalAddress_0; + reg [9:0] MmuPlugin_ports_1_cache_0_physicalAddress_1; + reg MmuPlugin_ports_1_cache_0_allowRead; + reg MmuPlugin_ports_1_cache_0_allowWrite; + reg MmuPlugin_ports_1_cache_0_allowExecute; + reg MmuPlugin_ports_1_cache_0_allowUser; + reg MmuPlugin_ports_1_cache_1_valid; + reg MmuPlugin_ports_1_cache_1_exception; + reg MmuPlugin_ports_1_cache_1_superPage; + reg [9:0] MmuPlugin_ports_1_cache_1_virtualAddress_0; + reg [9:0] MmuPlugin_ports_1_cache_1_virtualAddress_1; + reg [9:0] MmuPlugin_ports_1_cache_1_physicalAddress_0; + reg [9:0] MmuPlugin_ports_1_cache_1_physicalAddress_1; + reg MmuPlugin_ports_1_cache_1_allowRead; + reg MmuPlugin_ports_1_cache_1_allowWrite; + reg MmuPlugin_ports_1_cache_1_allowExecute; + reg MmuPlugin_ports_1_cache_1_allowUser; + reg MmuPlugin_ports_1_cache_2_valid; + reg MmuPlugin_ports_1_cache_2_exception; + reg MmuPlugin_ports_1_cache_2_superPage; + reg [9:0] MmuPlugin_ports_1_cache_2_virtualAddress_0; + reg [9:0] MmuPlugin_ports_1_cache_2_virtualAddress_1; + reg [9:0] MmuPlugin_ports_1_cache_2_physicalAddress_0; + reg [9:0] MmuPlugin_ports_1_cache_2_physicalAddress_1; + reg MmuPlugin_ports_1_cache_2_allowRead; + reg MmuPlugin_ports_1_cache_2_allowWrite; + reg MmuPlugin_ports_1_cache_2_allowExecute; + reg MmuPlugin_ports_1_cache_2_allowUser; + reg MmuPlugin_ports_1_cache_3_valid; + reg MmuPlugin_ports_1_cache_3_exception; + reg MmuPlugin_ports_1_cache_3_superPage; + reg [9:0] MmuPlugin_ports_1_cache_3_virtualAddress_0; + reg [9:0] MmuPlugin_ports_1_cache_3_virtualAddress_1; + reg [9:0] MmuPlugin_ports_1_cache_3_physicalAddress_0; + reg [9:0] MmuPlugin_ports_1_cache_3_physicalAddress_1; + reg MmuPlugin_ports_1_cache_3_allowRead; + reg MmuPlugin_ports_1_cache_3_allowWrite; + reg MmuPlugin_ports_1_cache_3_allowExecute; + reg MmuPlugin_ports_1_cache_3_allowUser; + wire MmuPlugin_ports_1_cacheHits_0; + wire MmuPlugin_ports_1_cacheHits_1; + wire MmuPlugin_ports_1_cacheHits_2; + wire MmuPlugin_ports_1_cacheHits_3; + wire MmuPlugin_ports_1_cacheHit; + wire _zz_140_; + wire _zz_141_; + wire [1:0] _zz_142_; + wire MmuPlugin_ports_1_cacheLine_valid; + wire MmuPlugin_ports_1_cacheLine_exception; + wire MmuPlugin_ports_1_cacheLine_superPage; + wire [9:0] MmuPlugin_ports_1_cacheLine_virtualAddress_0; + wire [9:0] MmuPlugin_ports_1_cacheLine_virtualAddress_1; + wire [9:0] MmuPlugin_ports_1_cacheLine_physicalAddress_0; + wire [9:0] MmuPlugin_ports_1_cacheLine_physicalAddress_1; + wire MmuPlugin_ports_1_cacheLine_allowRead; + wire MmuPlugin_ports_1_cacheLine_allowWrite; + wire MmuPlugin_ports_1_cacheLine_allowExecute; + wire MmuPlugin_ports_1_cacheLine_allowUser; + reg MmuPlugin_ports_1_entryToReplace_willIncrement; + wire MmuPlugin_ports_1_entryToReplace_willClear; + reg [1:0] MmuPlugin_ports_1_entryToReplace_valueNext; + reg [1:0] MmuPlugin_ports_1_entryToReplace_value; + wire MmuPlugin_ports_1_entryToReplace_willOverflowIfInc; + wire MmuPlugin_ports_1_entryToReplace_willOverflow; + reg MmuPlugin_ports_1_requireMmuLockup; + reg `MmuPlugin_shared_State_defaultEncoding_type MmuPlugin_shared_state_1_; + reg [9:0] MmuPlugin_shared_vpn_0; + reg [9:0] MmuPlugin_shared_vpn_1; + reg [0:0] MmuPlugin_shared_portId; + wire MmuPlugin_shared_dBusRsp_pte_V; + wire MmuPlugin_shared_dBusRsp_pte_R; + wire MmuPlugin_shared_dBusRsp_pte_W; + wire MmuPlugin_shared_dBusRsp_pte_X; + wire MmuPlugin_shared_dBusRsp_pte_U; + wire MmuPlugin_shared_dBusRsp_pte_G; + wire MmuPlugin_shared_dBusRsp_pte_A; + wire MmuPlugin_shared_dBusRsp_pte_D; + wire [1:0] MmuPlugin_shared_dBusRsp_pte_RSW; + wire [9:0] MmuPlugin_shared_dBusRsp_pte_PPN0; + wire [11:0] MmuPlugin_shared_dBusRsp_pte_PPN1; + wire MmuPlugin_shared_dBusRsp_exception; + wire MmuPlugin_shared_dBusRsp_leaf; + reg MmuPlugin_shared_pteBuffer_V; + reg MmuPlugin_shared_pteBuffer_R; + reg MmuPlugin_shared_pteBuffer_W; + reg MmuPlugin_shared_pteBuffer_X; + reg MmuPlugin_shared_pteBuffer_U; + reg MmuPlugin_shared_pteBuffer_G; + reg MmuPlugin_shared_pteBuffer_A; + reg MmuPlugin_shared_pteBuffer_D; + reg [1:0] MmuPlugin_shared_pteBuffer_RSW; + reg [9:0] MmuPlugin_shared_pteBuffer_PPN0; + reg [11:0] MmuPlugin_shared_pteBuffer_PPN1; + wire [34:0] _zz_143_; + wire _zz_144_; + wire _zz_145_; + wire _zz_146_; + wire _zz_147_; + wire _zz_148_; + wire _zz_149_; + wire _zz_150_; + wire _zz_151_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_152_; + wire `AluCtrlEnum_defaultEncoding_type _zz_153_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_154_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_155_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_156_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_157_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_158_; + wire [4:0] decode_RegFilePlugin_regFileReadAddress1; + wire [4:0] decode_RegFilePlugin_regFileReadAddress2; + wire [31:0] decode_RegFilePlugin_rs1Data; + wire [31:0] decode_RegFilePlugin_rs2Data; + reg lastStageRegFileWrite_valid /* verilator public */ ; + wire [4:0] lastStageRegFileWrite_payload_address /* verilator public */ ; + wire [31:0] lastStageRegFileWrite_payload_data /* verilator public */ ; + reg _zz_159_; + reg [31:0] execute_IntAluPlugin_bitwise; + reg [31:0] _zz_160_; + reg [31:0] _zz_161_; + wire _zz_162_; + reg [19:0] _zz_163_; + wire _zz_164_; + reg [19:0] _zz_165_; + reg [31:0] _zz_166_; + reg [31:0] execute_SrcPlugin_addSub; + wire execute_SrcPlugin_less; + wire [4:0] execute_FullBarrelShifterPlugin_amplitude; + reg [31:0] _zz_167_; + wire [31:0] execute_FullBarrelShifterPlugin_reversed; + reg [31:0] _zz_168_; + reg _zz_169_; + reg _zz_170_; + wire _zz_171_; + reg _zz_172_; + reg [4:0] _zz_173_; + reg [31:0] _zz_174_; + wire _zz_175_; + wire _zz_176_; + wire _zz_177_; + wire _zz_178_; + wire _zz_179_; + wire _zz_180_; + wire execute_BranchPlugin_eq; + wire [2:0] _zz_181_; + reg _zz_182_; + reg _zz_183_; + wire [31:0] execute_BranchPlugin_branch_src1; + wire _zz_184_; + reg [10:0] _zz_185_; + wire _zz_186_; + reg [19:0] _zz_187_; + wire _zz_188_; + reg [18:0] _zz_189_; + reg [31:0] _zz_190_; + wire [31:0] execute_BranchPlugin_branch_src2; + wire [31:0] execute_BranchPlugin_branchAdder; + reg [1:0] _zz_191_; + wire [1:0] CsrPlugin_misa_base; + wire [25:0] CsrPlugin_misa_extensions; + reg [1:0] CsrPlugin_mtvec_mode; + reg [29:0] CsrPlugin_mtvec_base; + reg [31:0] CsrPlugin_mepc; + reg CsrPlugin_mstatus_MIE; + reg CsrPlugin_mstatus_MPIE; + reg [1:0] CsrPlugin_mstatus_MPP; + reg CsrPlugin_mip_MEIP; + reg CsrPlugin_mip_MTIP; + reg CsrPlugin_mip_MSIP; + reg CsrPlugin_mie_MEIE; + reg CsrPlugin_mie_MTIE; + reg CsrPlugin_mie_MSIE; + reg [31:0] CsrPlugin_mscratch; + reg CsrPlugin_mcause_interrupt; + reg [3:0] CsrPlugin_mcause_exceptionCode; + reg [31:0] CsrPlugin_mtval; + reg [63:0] CsrPlugin_mcycle = 64'b0000000000000000000000000000000000000000000000000000000000000000; + reg [63:0] CsrPlugin_minstret = 64'b0000000000000000000000000000000000000000000000000000000000000000; + reg CsrPlugin_medeleg_IAM; + reg CsrPlugin_medeleg_IAF; + reg CsrPlugin_medeleg_II; + reg CsrPlugin_medeleg_LAM; + reg CsrPlugin_medeleg_LAF; + reg CsrPlugin_medeleg_SAM; + reg CsrPlugin_medeleg_SAF; + reg CsrPlugin_medeleg_EU; + reg CsrPlugin_medeleg_ES; + reg CsrPlugin_medeleg_IPF; + reg CsrPlugin_medeleg_LPF; + reg CsrPlugin_medeleg_SPF; + reg CsrPlugin_mideleg_ST; + reg CsrPlugin_mideleg_SE; + reg CsrPlugin_mideleg_SS; + reg CsrPlugin_sstatus_SIE; + reg CsrPlugin_sstatus_SPIE; + reg [0:0] CsrPlugin_sstatus_SPP; + reg CsrPlugin_sip_SEIP_SOFT; + reg CsrPlugin_sip_SEIP_INPUT; + wire CsrPlugin_sip_SEIP_OR; + reg CsrPlugin_sip_STIP; + reg CsrPlugin_sip_SSIP; + reg CsrPlugin_sie_SEIE; + reg CsrPlugin_sie_STIE; + reg CsrPlugin_sie_SSIE; + reg [1:0] CsrPlugin_stvec_mode; + reg [29:0] CsrPlugin_stvec_base; + reg [31:0] CsrPlugin_sscratch; + reg CsrPlugin_scause_interrupt; + reg [3:0] CsrPlugin_scause_exceptionCode; + reg [31:0] CsrPlugin_stval; + reg [31:0] CsrPlugin_sepc; + reg [21:0] CsrPlugin_satp_PPN; + reg [8:0] CsrPlugin_satp_ASID; + reg [0:0] CsrPlugin_satp_MODE; + wire _zz_192_; + wire _zz_193_; + wire _zz_194_; + wire _zz_195_; + wire _zz_196_; + wire _zz_197_; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_decode; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_execute; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_memory; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; + reg [3:0] CsrPlugin_exceptionPortCtrl_exceptionContext_code; + reg [31:0] CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; + reg [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped; + wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; + wire [1:0] _zz_198_; + wire _zz_199_; + reg CsrPlugin_interrupt_valid; + reg [3:0] CsrPlugin_interrupt_code /* verilator public */ ; + reg [1:0] CsrPlugin_interrupt_targetPrivilege; + wire CsrPlugin_exception; + reg CsrPlugin_lastStageWasWfi; + reg CsrPlugin_pipelineLiberator_done; + wire CsrPlugin_interruptJump /* verilator public */ ; + reg CsrPlugin_hadException; + reg [1:0] CsrPlugin_targetPrivilege; + reg [3:0] CsrPlugin_trapCause; + reg [1:0] CsrPlugin_xtvec_mode; + reg [29:0] CsrPlugin_xtvec_base; + reg execute_CsrPlugin_inWfi /* verilator public */ ; + reg execute_CsrPlugin_wfiWake; + wire execute_CsrPlugin_blockedBySideEffects; + reg execute_CsrPlugin_illegalAccess; + reg execute_CsrPlugin_illegalInstruction; + reg [31:0] execute_CsrPlugin_readData; + wire execute_CsrPlugin_writeInstruction; + wire execute_CsrPlugin_readInstruction; + wire execute_CsrPlugin_writeEnable; + wire execute_CsrPlugin_readEnable; + reg [31:0] execute_CsrPlugin_readToWriteData; + reg [31:0] execute_CsrPlugin_writeData; + wire [11:0] execute_CsrPlugin_csrAddress; + reg [32:0] memory_MulDivIterativePlugin_rs1; + reg [31:0] memory_MulDivIterativePlugin_rs2; + reg [64:0] memory_MulDivIterativePlugin_accumulator; + reg memory_MulDivIterativePlugin_mul_counter_willIncrement; + reg memory_MulDivIterativePlugin_mul_counter_willClear; + reg [5:0] memory_MulDivIterativePlugin_mul_counter_valueNext; + reg [5:0] memory_MulDivIterativePlugin_mul_counter_value; + wire memory_MulDivIterativePlugin_mul_willOverflowIfInc; + wire memory_MulDivIterativePlugin_mul_counter_willOverflow; + reg memory_MulDivIterativePlugin_div_needRevert; + reg memory_MulDivIterativePlugin_div_counter_willIncrement; + reg memory_MulDivIterativePlugin_div_counter_willClear; + reg [5:0] memory_MulDivIterativePlugin_div_counter_valueNext; + reg [5:0] memory_MulDivIterativePlugin_div_counter_value; + wire memory_MulDivIterativePlugin_div_counter_willOverflowIfInc; + wire memory_MulDivIterativePlugin_div_counter_willOverflow; + reg memory_MulDivIterativePlugin_div_done; + reg [31:0] memory_MulDivIterativePlugin_div_result; + wire [31:0] _zz_200_; + wire [32:0] _zz_201_; + wire [32:0] _zz_202_; + wire [31:0] _zz_203_; + wire _zz_204_; + wire _zz_205_; + reg [32:0] _zz_206_; + reg [31:0] externalInterruptArray_regNext; + reg [31:0] _zz_207_; + wire [31:0] _zz_208_; + reg [31:0] _zz_209_; + wire [31:0] _zz_210_; + reg execute_to_memory_BRANCH_DO; + reg decode_to_execute_MEMORY_LRSC; + reg [31:0] decode_to_execute_RS2; + reg `ShiftCtrlEnum_defaultEncoding_type decode_to_execute_SHIFT_CTRL; + reg `ShiftCtrlEnum_defaultEncoding_type execute_to_memory_SHIFT_CTRL; + reg [31:0] decode_to_execute_INSTRUCTION; + reg [31:0] execute_to_memory_INSTRUCTION; + reg [31:0] memory_to_writeBack_INSTRUCTION; + reg decode_to_execute_MEMORY_MANAGMENT; + reg decode_to_execute_IS_MUL; + reg execute_to_memory_IS_MUL; + reg decode_to_execute_IS_CSR; + reg [31:0] execute_to_memory_SHIFT_RIGHT; + reg `AluCtrlEnum_defaultEncoding_type decode_to_execute_ALU_CTRL; + reg decode_to_execute_SRC_LESS_UNSIGNED; + reg decode_to_execute_REGFILE_WRITE_VALID; + reg execute_to_memory_REGFILE_WRITE_VALID; + reg memory_to_writeBack_REGFILE_WRITE_VALID; + reg `EnvCtrlEnum_defaultEncoding_type decode_to_execute_ENV_CTRL; + reg `EnvCtrlEnum_defaultEncoding_type execute_to_memory_ENV_CTRL; + reg `EnvCtrlEnum_defaultEncoding_type memory_to_writeBack_ENV_CTRL; + reg [31:0] decode_to_execute_PC; + reg [31:0] execute_to_memory_PC; + reg [31:0] memory_to_writeBack_PC; + reg `Src2CtrlEnum_defaultEncoding_type decode_to_execute_SRC2_CTRL; + reg decode_to_execute_BYPASSABLE_MEMORY_STAGE; + reg execute_to_memory_BYPASSABLE_MEMORY_STAGE; + reg decode_to_execute_SRC_USE_SUB_LESS; + reg decode_to_execute_CSR_READ_OPCODE; + reg decode_to_execute_MEMORY_AMO; + reg [31:0] decode_to_execute_FORMAL_PC_NEXT; + reg [31:0] execute_to_memory_FORMAL_PC_NEXT; + reg [31:0] memory_to_writeBack_FORMAL_PC_NEXT; + reg decode_to_execute_MEMORY_WR; + reg execute_to_memory_MEMORY_WR; + reg memory_to_writeBack_MEMORY_WR; + reg `Src1CtrlEnum_defaultEncoding_type decode_to_execute_SRC1_CTRL; + reg decode_to_execute_IS_RS1_SIGNED; + reg decode_to_execute_IS_DIV; + reg execute_to_memory_IS_DIV; + reg [1:0] execute_to_memory_MEMORY_ADDRESS_LOW; + reg [1:0] memory_to_writeBack_MEMORY_ADDRESS_LOW; + reg `AluBitwiseCtrlEnum_defaultEncoding_type decode_to_execute_ALU_BITWISE_CTRL; + reg execute_to_memory_IS_DBUS_SHARING; + reg memory_to_writeBack_IS_DBUS_SHARING; + reg decode_to_execute_IS_SFENCE_VMA; + reg execute_to_memory_IS_SFENCE_VMA; + reg memory_to_writeBack_IS_SFENCE_VMA; + reg decode_to_execute_MEMORY_ENABLE; + reg execute_to_memory_MEMORY_ENABLE; + reg memory_to_writeBack_MEMORY_ENABLE; + reg [31:0] execute_to_memory_REGFILE_WRITE_DATA; + reg [31:0] memory_to_writeBack_REGFILE_WRITE_DATA; + reg decode_to_execute_CSR_WRITE_OPCODE; + reg `BranchCtrlEnum_defaultEncoding_type decode_to_execute_BRANCH_CTRL; + reg [31:0] decode_to_execute_RS1; + reg [31:0] execute_to_memory_BRANCH_CALC; + reg decode_to_execute_IS_RS2_SIGNED; + reg decode_to_execute_BYPASSABLE_EXECUTE_STAGE; + reg decode_to_execute_SRC2_FORCE_ZERO; + reg [2:0] _zz_211_; + reg _zz_212_; + reg [31:0] iBusWishbone_DAT_MISO_regNext; + reg [2:0] _zz_213_; + wire _zz_214_; + wire _zz_215_; + wire _zz_216_; + wire _zz_217_; + wire _zz_218_; + reg _zz_219_; + reg [31:0] dBusWishbone_DAT_MISO_regNext; + `ifndef SYNTHESIS + reg [31:0] decode_BRANCH_CTRL_string; + reg [31:0] _zz_1__string; + reg [31:0] _zz_2__string; + reg [31:0] _zz_3__string; + reg [39:0] decode_ALU_BITWISE_CTRL_string; + reg [39:0] _zz_4__string; + reg [39:0] _zz_5__string; + reg [39:0] _zz_6__string; + reg [95:0] decode_SRC1_CTRL_string; + reg [95:0] _zz_7__string; + reg [95:0] _zz_8__string; + reg [95:0] _zz_9__string; + reg [23:0] decode_SRC2_CTRL_string; + reg [23:0] _zz_10__string; + reg [23:0] _zz_11__string; + reg [23:0] _zz_12__string; + reg [39:0] _zz_13__string; + reg [39:0] _zz_14__string; + reg [39:0] _zz_15__string; + reg [39:0] _zz_16__string; + reg [39:0] decode_ENV_CTRL_string; + reg [39:0] _zz_17__string; + reg [39:0] _zz_18__string; + reg [39:0] _zz_19__string; + reg [63:0] decode_ALU_CTRL_string; + reg [63:0] _zz_20__string; + reg [63:0] _zz_21__string; + reg [63:0] _zz_22__string; + reg [71:0] _zz_23__string; + reg [71:0] _zz_24__string; + reg [71:0] decode_SHIFT_CTRL_string; + reg [71:0] _zz_25__string; + reg [71:0] _zz_26__string; + reg [71:0] _zz_27__string; + reg [39:0] memory_ENV_CTRL_string; + reg [39:0] _zz_28__string; + reg [39:0] execute_ENV_CTRL_string; + reg [39:0] _zz_29__string; + reg [39:0] writeBack_ENV_CTRL_string; + reg [39:0] _zz_32__string; + reg [31:0] execute_BRANCH_CTRL_string; + reg [31:0] _zz_34__string; + reg [71:0] memory_SHIFT_CTRL_string; + reg [71:0] _zz_38__string; + reg [71:0] execute_SHIFT_CTRL_string; + reg [71:0] _zz_40__string; + reg [23:0] execute_SRC2_CTRL_string; + reg [23:0] _zz_45__string; + reg [95:0] execute_SRC1_CTRL_string; + reg [95:0] _zz_47__string; + reg [63:0] execute_ALU_CTRL_string; + reg [63:0] _zz_50__string; + reg [39:0] execute_ALU_BITWISE_CTRL_string; + reg [39:0] _zz_52__string; + reg [95:0] _zz_62__string; + reg [23:0] _zz_63__string; + reg [31:0] _zz_66__string; + reg [39:0] _zz_70__string; + reg [39:0] _zz_78__string; + reg [63:0] _zz_81__string; + reg [71:0] _zz_82__string; + reg [47:0] MmuPlugin_shared_state_1__string; + reg [71:0] _zz_152__string; + reg [63:0] _zz_153__string; + reg [39:0] _zz_154__string; + reg [39:0] _zz_155__string; + reg [31:0] _zz_156__string; + reg [23:0] _zz_157__string; + reg [95:0] _zz_158__string; + reg [71:0] decode_to_execute_SHIFT_CTRL_string; + reg [71:0] execute_to_memory_SHIFT_CTRL_string; + reg [63:0] decode_to_execute_ALU_CTRL_string; + reg [39:0] decode_to_execute_ENV_CTRL_string; + reg [39:0] execute_to_memory_ENV_CTRL_string; + reg [39:0] memory_to_writeBack_ENV_CTRL_string; + reg [23:0] decode_to_execute_SRC2_CTRL_string; + reg [95:0] decode_to_execute_SRC1_CTRL_string; + reg [39:0] decode_to_execute_ALU_BITWISE_CTRL_string; + reg [31:0] decode_to_execute_BRANCH_CTRL_string; + `endif + + (* ram_style = "block" *) reg [31:0] RegFilePlugin_regFile [0:31] /* verilator public */ ; + assign _zz_271_ = (execute_arbitration_isValid && execute_IS_CSR); + assign _zz_272_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); + assign _zz_273_ = 1'b1; + assign _zz_274_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); + assign _zz_275_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); + assign _zz_276_ = (memory_arbitration_isValid && memory_IS_MUL); + assign _zz_277_ = (memory_arbitration_isValid && memory_IS_DIV); + assign _zz_278_ = ((_zz_225_ && IBusCachedPlugin_cache_io_cpu_decode_error) && (! _zz_89_)); + assign _zz_279_ = ((_zz_225_ && IBusCachedPlugin_cache_io_cpu_decode_cacheMiss) && (! _zz_90_)); + assign _zz_280_ = ((_zz_225_ && IBusCachedPlugin_cache_io_cpu_decode_mmuException) && (! _zz_91_)); + assign _zz_281_ = ((_zz_225_ && IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling) && (! 1'b0)); + assign _zz_282_ = ({decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid} != (2'b00)); + assign _zz_283_ = (execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_WFI)); + assign _zz_284_ = (! memory_MulDivIterativePlugin_mul_willOverflowIfInc); + assign _zz_285_ = (! memory_MulDivIterativePlugin_div_done); + assign _zz_286_ = (CsrPlugin_hadException || CsrPlugin_interruptJump); + assign _zz_287_ = (writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)); + assign _zz_288_ = writeBack_INSTRUCTION[29 : 28]; + assign _zz_289_ = (! IBusCachedPlugin_iBusRsp_readyForError); + assign _zz_290_ = (! ({(writeBack_arbitration_isValid || CsrPlugin_exceptionPendings_3),{(memory_arbitration_isValid || CsrPlugin_exceptionPendings_2),(execute_arbitration_isValid || CsrPlugin_exceptionPendings_1)}} != (3'b000))); + assign _zz_291_ = (! dataCache_1__io_cpu_redo); + assign _zz_292_ = (writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE); + assign _zz_293_ = ((MmuPlugin_dBusAccess_rsp_valid && (! MmuPlugin_dBusAccess_rsp_payload_redo)) && (MmuPlugin_shared_dBusRsp_leaf || MmuPlugin_shared_dBusRsp_exception)); + assign _zz_294_ = (MmuPlugin_shared_portId == (1'b1)); + assign _zz_295_ = (MmuPlugin_shared_portId == (1'b0)); + assign _zz_296_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); + assign _zz_297_ = (1'b0 || (! 1'b1)); + assign _zz_298_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); + assign _zz_299_ = (1'b0 || (! memory_BYPASSABLE_MEMORY_STAGE)); + assign _zz_300_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); + assign _zz_301_ = (1'b0 || (! execute_BYPASSABLE_EXECUTE_STAGE)); + assign _zz_302_ = (execute_CsrPlugin_illegalAccess || execute_CsrPlugin_illegalInstruction); + assign _zz_303_ = (execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_ECALL)); + assign _zz_304_ = (! memory_arbitration_isStuck); + assign _zz_305_ = (iBus_cmd_valid || (_zz_211_ != (3'b000))); + assign _zz_306_ = (_zz_245_ && (! dataCache_1__io_mem_cmd_s2mPipe_ready)); + assign _zz_307_ = (IBusCachedPlugin_mmuBus_cmd_isValid && IBusCachedPlugin_mmuBus_rsp_refilling); + assign _zz_308_ = (DBusCachedPlugin_mmuBus_cmd_isValid && DBusCachedPlugin_mmuBus_rsp_refilling); + assign _zz_309_ = (MmuPlugin_ports_0_entryToReplace_value == (2'b00)); + assign _zz_310_ = (MmuPlugin_ports_0_entryToReplace_value == (2'b01)); + assign _zz_311_ = (MmuPlugin_ports_0_entryToReplace_value == (2'b10)); + assign _zz_312_ = (MmuPlugin_ports_0_entryToReplace_value == (2'b11)); + assign _zz_313_ = (MmuPlugin_ports_1_entryToReplace_value == (2'b00)); + assign _zz_314_ = (MmuPlugin_ports_1_entryToReplace_value == (2'b01)); + assign _zz_315_ = (MmuPlugin_ports_1_entryToReplace_value == (2'b10)); + assign _zz_316_ = (MmuPlugin_ports_1_entryToReplace_value == (2'b11)); + assign _zz_317_ = ((CsrPlugin_sstatus_SIE && (CsrPlugin_privilege == (2'b01))) || (CsrPlugin_privilege < (2'b01))); + assign _zz_318_ = ((_zz_192_ && (1'b1 && CsrPlugin_mideleg_ST)) && (! 1'b0)); + assign _zz_319_ = ((_zz_193_ && (1'b1 && CsrPlugin_mideleg_SS)) && (! 1'b0)); + assign _zz_320_ = ((_zz_194_ && (1'b1 && CsrPlugin_mideleg_SE)) && (! 1'b0)); + assign _zz_321_ = (CsrPlugin_mstatus_MIE || (CsrPlugin_privilege < (2'b11))); + assign _zz_322_ = ((_zz_192_ && 1'b1) && (! (CsrPlugin_mideleg_ST != (1'b0)))); + assign _zz_323_ = ((_zz_193_ && 1'b1) && (! (CsrPlugin_mideleg_SS != (1'b0)))); + assign _zz_324_ = ((_zz_194_ && 1'b1) && (! (CsrPlugin_mideleg_SE != (1'b0)))); + assign _zz_325_ = ((_zz_195_ && 1'b1) && (! 1'b0)); + assign _zz_326_ = ((_zz_196_ && 1'b1) && (! 1'b0)); + assign _zz_327_ = ((_zz_197_ && 1'b1) && (! 1'b0)); + assign _zz_328_ = writeBack_INSTRUCTION[13 : 12]; + assign _zz_329_ = execute_INSTRUCTION[13]; + assign _zz_330_ = (_zz_98_ - (4'b0001)); + assign _zz_331_ = {IBusCachedPlugin_fetchPc_inc,(2'b00)}; + assign _zz_332_ = {29'd0, _zz_331_}; + assign _zz_333_ = (writeBack_MEMORY_WR ? (3'b111) : (3'b101)); + assign _zz_334_ = (writeBack_MEMORY_WR ? (3'b110) : (3'b100)); + assign _zz_335_ = MmuPlugin_ports_0_entryToReplace_willIncrement; + assign _zz_336_ = {1'd0, _zz_335_}; + assign _zz_337_ = MmuPlugin_ports_1_entryToReplace_willIncrement; + assign _zz_338_ = {1'd0, _zz_337_}; + assign _zz_339_ = MmuPlugin_dBusAccess_rsp_payload_data[0 : 0]; + assign _zz_340_ = MmuPlugin_dBusAccess_rsp_payload_data[1 : 1]; + assign _zz_341_ = MmuPlugin_dBusAccess_rsp_payload_data[2 : 2]; + assign _zz_342_ = MmuPlugin_dBusAccess_rsp_payload_data[3 : 3]; + assign _zz_343_ = MmuPlugin_dBusAccess_rsp_payload_data[4 : 4]; + assign _zz_344_ = MmuPlugin_dBusAccess_rsp_payload_data[5 : 5]; + assign _zz_345_ = MmuPlugin_dBusAccess_rsp_payload_data[6 : 6]; + assign _zz_346_ = MmuPlugin_dBusAccess_rsp_payload_data[7 : 7]; + assign _zz_347_ = _zz_143_[0 : 0]; + assign _zz_348_ = _zz_143_[1 : 1]; + assign _zz_349_ = _zz_143_[6 : 6]; + assign _zz_350_ = _zz_143_[7 : 7]; + assign _zz_351_ = _zz_143_[10 : 10]; + assign _zz_352_ = _zz_143_[11 : 11]; + assign _zz_353_ = _zz_143_[12 : 12]; + assign _zz_354_ = _zz_143_[13 : 13]; + assign _zz_355_ = _zz_143_[14 : 14]; + assign _zz_356_ = _zz_143_[16 : 16]; + assign _zz_357_ = _zz_143_[17 : 17]; + assign _zz_358_ = _zz_143_[20 : 20]; + assign _zz_359_ = _zz_143_[21 : 21]; + assign _zz_360_ = _zz_143_[22 : 22]; + assign _zz_361_ = _zz_143_[25 : 25]; + assign _zz_362_ = _zz_143_[26 : 26]; + assign _zz_363_ = _zz_143_[31 : 31]; + assign _zz_364_ = _zz_143_[32 : 32]; + assign _zz_365_ = _zz_143_[33 : 33]; + assign _zz_366_ = _zz_143_[34 : 34]; + assign _zz_367_ = execute_SRC_LESS; + assign _zz_368_ = (3'b100); + assign _zz_369_ = execute_INSTRUCTION[19 : 15]; + assign _zz_370_ = execute_INSTRUCTION[31 : 20]; + assign _zz_371_ = {execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}; + assign _zz_372_ = ($signed(_zz_373_) + $signed(_zz_376_)); + assign _zz_373_ = ($signed(_zz_374_) + $signed(_zz_375_)); + assign _zz_374_ = execute_SRC1; + assign _zz_375_ = (execute_SRC_USE_SUB_LESS ? (~ execute_SRC2) : execute_SRC2); + assign _zz_376_ = (execute_SRC_USE_SUB_LESS ? _zz_377_ : _zz_378_); + assign _zz_377_ = (32'b00000000000000000000000000000001); + assign _zz_378_ = (32'b00000000000000000000000000000000); + assign _zz_379_ = ($signed(_zz_381_) >>> execute_FullBarrelShifterPlugin_amplitude); + assign _zz_380_ = _zz_379_[31 : 0]; + assign _zz_381_ = {((execute_SHIFT_CTRL == `ShiftCtrlEnum_defaultEncoding_SRA_1) && execute_FullBarrelShifterPlugin_reversed[31]),execute_FullBarrelShifterPlugin_reversed}; + assign _zz_382_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}; + assign _zz_383_ = execute_INSTRUCTION[31 : 20]; + assign _zz_384_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}; + assign _zz_385_ = (_zz_198_ & (~ _zz_386_)); + assign _zz_386_ = (_zz_198_ - (2'b01)); + assign _zz_387_ = memory_MulDivIterativePlugin_mul_counter_willIncrement; + assign _zz_388_ = {5'd0, _zz_387_}; + assign _zz_389_ = (_zz_391_ + _zz_393_); + assign _zz_390_ = (memory_MulDivIterativePlugin_rs2[0] ? memory_MulDivIterativePlugin_rs1 : (33'b000000000000000000000000000000000)); + assign _zz_391_ = {{1{_zz_390_[32]}}, _zz_390_}; + assign _zz_392_ = _zz_394_; + assign _zz_393_ = {{1{_zz_392_[32]}}, _zz_392_}; + assign _zz_394_ = (memory_MulDivIterativePlugin_accumulator >>> 32); + assign _zz_395_ = memory_MulDivIterativePlugin_div_counter_willIncrement; + assign _zz_396_ = {5'd0, _zz_395_}; + assign _zz_397_ = {1'd0, memory_MulDivIterativePlugin_rs2}; + assign _zz_398_ = {_zz_200_,(! _zz_202_[32])}; + assign _zz_399_ = _zz_202_[31:0]; + assign _zz_400_ = _zz_201_[31:0]; + assign _zz_401_ = _zz_402_; + assign _zz_402_ = _zz_403_; + assign _zz_403_ = ({1'b0,(memory_MulDivIterativePlugin_div_needRevert ? (~ _zz_203_) : _zz_203_)} + _zz_405_); + assign _zz_404_ = memory_MulDivIterativePlugin_div_needRevert; + assign _zz_405_ = {32'd0, _zz_404_}; + assign _zz_406_ = _zz_205_; + assign _zz_407_ = {32'd0, _zz_406_}; + assign _zz_408_ = _zz_204_; + assign _zz_409_ = {31'd0, _zz_408_}; + assign _zz_410_ = execute_CsrPlugin_writeData[19 : 19]; + assign _zz_411_ = execute_CsrPlugin_writeData[18 : 18]; + assign _zz_412_ = execute_CsrPlugin_writeData[17 : 17]; + assign _zz_413_ = execute_CsrPlugin_writeData[7 : 7]; + assign _zz_414_ = execute_CsrPlugin_writeData[3 : 3]; + assign _zz_415_ = execute_CsrPlugin_writeData[5 : 5]; + assign _zz_416_ = execute_CsrPlugin_writeData[1 : 1]; + assign _zz_417_ = execute_CsrPlugin_writeData[9 : 9]; + assign _zz_418_ = execute_CsrPlugin_writeData[5 : 5]; + assign _zz_419_ = execute_CsrPlugin_writeData[1 : 1]; + assign _zz_420_ = execute_CsrPlugin_writeData[31 : 31]; + assign _zz_421_ = execute_CsrPlugin_writeData[19 : 19]; + assign _zz_422_ = execute_CsrPlugin_writeData[18 : 18]; + assign _zz_423_ = execute_CsrPlugin_writeData[17 : 17]; + assign _zz_424_ = execute_CsrPlugin_writeData[5 : 5]; + assign _zz_425_ = execute_CsrPlugin_writeData[1 : 1]; + assign _zz_426_ = execute_CsrPlugin_writeData[8 : 8]; + assign _zz_427_ = execute_CsrPlugin_writeData[2 : 2]; + assign _zz_428_ = execute_CsrPlugin_writeData[5 : 5]; + assign _zz_429_ = execute_CsrPlugin_writeData[13 : 13]; + assign _zz_430_ = execute_CsrPlugin_writeData[4 : 4]; + assign _zz_431_ = execute_CsrPlugin_writeData[7 : 7]; + assign _zz_432_ = execute_CsrPlugin_writeData[1 : 1]; + assign _zz_433_ = execute_CsrPlugin_writeData[9 : 9]; + assign _zz_434_ = execute_CsrPlugin_writeData[12 : 12]; + assign _zz_435_ = execute_CsrPlugin_writeData[15 : 15]; + assign _zz_436_ = execute_CsrPlugin_writeData[6 : 6]; + assign _zz_437_ = execute_CsrPlugin_writeData[0 : 0]; + assign _zz_438_ = execute_CsrPlugin_writeData[3 : 3]; + assign _zz_439_ = execute_CsrPlugin_writeData[5 : 5]; + assign _zz_440_ = execute_CsrPlugin_writeData[1 : 1]; + assign _zz_441_ = execute_CsrPlugin_writeData[9 : 9]; + assign _zz_442_ = execute_CsrPlugin_writeData[31 : 31]; + assign _zz_443_ = execute_CsrPlugin_writeData[5 : 5]; + assign _zz_444_ = execute_CsrPlugin_writeData[1 : 1]; + assign _zz_445_ = execute_CsrPlugin_writeData[9 : 9]; + assign _zz_446_ = execute_CsrPlugin_writeData[11 : 11]; + assign _zz_447_ = execute_CsrPlugin_writeData[7 : 7]; + assign _zz_448_ = execute_CsrPlugin_writeData[3 : 3]; + assign _zz_449_ = execute_CsrPlugin_writeData[9 : 9]; + assign _zz_450_ = execute_CsrPlugin_writeData[5 : 5]; + assign _zz_451_ = execute_CsrPlugin_writeData[1 : 1]; + assign _zz_452_ = execute_CsrPlugin_writeData[9 : 9]; + assign _zz_453_ = execute_CsrPlugin_writeData[5 : 5]; + assign _zz_454_ = execute_CsrPlugin_writeData[1 : 1]; + assign _zz_455_ = (iBus_cmd_payload_address >>> 5); + assign _zz_456_ = 1'b1; + assign _zz_457_ = 1'b1; + assign _zz_458_ = {_zz_102_,_zz_101_}; + assign _zz_459_ = (32'b00010000000000000000000000001000); + assign _zz_460_ = ((decode_INSTRUCTION & _zz_470_) == (32'b00000000000000000000000000100000)); + assign _zz_461_ = (_zz_471_ == _zz_472_); + assign _zz_462_ = {_zz_473_,_zz_474_}; + assign _zz_463_ = (_zz_475_ == _zz_476_); + assign _zz_464_ = {_zz_477_,_zz_478_}; + assign _zz_465_ = {_zz_479_,{_zz_480_,_zz_481_}}; + assign _zz_466_ = (5'b00000); + assign _zz_467_ = ({_zz_482_,_zz_483_} != (3'b000)); + assign _zz_468_ = (_zz_484_ != _zz_485_); + assign _zz_469_ = {_zz_486_,{_zz_487_,_zz_488_}}; + assign _zz_470_ = (32'b00000000000000000000000000110100); + assign _zz_471_ = (decode_INSTRUCTION & (32'b00000000000000000000000001100100)); + assign _zz_472_ = (32'b00000000000000000000000000100000); + assign _zz_473_ = ((decode_INSTRUCTION & _zz_489_) == (32'b00001000000000000000000000100000)); + assign _zz_474_ = ((decode_INSTRUCTION & _zz_490_) == (32'b00000000000000000000000000100000)); + assign _zz_475_ = (decode_INSTRUCTION & (32'b00000000000000000000000001000100)); + assign _zz_476_ = (32'b00000000000000000000000001000000); + assign _zz_477_ = ((decode_INSTRUCTION & _zz_491_) == (32'b00000000000000000010000000010000)); + assign _zz_478_ = ((decode_INSTRUCTION & _zz_492_) == (32'b01000000000000000000000000110000)); + assign _zz_479_ = ((decode_INSTRUCTION & _zz_493_) == (32'b00000000000000000000000000000000)); + assign _zz_480_ = (_zz_494_ == _zz_495_); + assign _zz_481_ = {_zz_496_,{_zz_497_,_zz_498_}}; + assign _zz_482_ = _zz_145_; + assign _zz_483_ = {_zz_151_,_zz_499_}; + assign _zz_484_ = {_zz_151_,_zz_500_}; + assign _zz_485_ = (2'b00); + assign _zz_486_ = ({_zz_501_,_zz_502_} != (2'b00)); + assign _zz_487_ = (_zz_503_ != _zz_504_); + assign _zz_488_ = {_zz_505_,{_zz_506_,_zz_507_}}; + assign _zz_489_ = (32'b00001000000000000000000001110000); + assign _zz_490_ = (32'b00010000000000000000000001110000); + assign _zz_491_ = (32'b00000000000000000010000000010100); + assign _zz_492_ = (32'b01000000000000000000000000110100); + assign _zz_493_ = (32'b00000000000000000000000001000100); + assign _zz_494_ = (decode_INSTRUCTION & (32'b00000000000000000000000000011000)); + assign _zz_495_ = (32'b00000000000000000000000000000000); + assign _zz_496_ = ((decode_INSTRUCTION & _zz_508_) == (32'b00000000000000000010000000000000)); + assign _zz_497_ = (_zz_509_ == _zz_510_); + assign _zz_498_ = _zz_149_; + assign _zz_499_ = ((decode_INSTRUCTION & _zz_511_) == (32'b00000000000000000000000000000100)); + assign _zz_500_ = ((decode_INSTRUCTION & _zz_512_) == (32'b00000000000000000000000000000100)); + assign _zz_501_ = _zz_150_; + assign _zz_502_ = (_zz_513_ == _zz_514_); + assign _zz_503_ = {_zz_150_,_zz_515_}; + assign _zz_504_ = (2'b00); + assign _zz_505_ = ({_zz_516_,_zz_517_} != (2'b00)); + assign _zz_506_ = (_zz_518_ != _zz_519_); + assign _zz_507_ = {_zz_520_,{_zz_521_,_zz_522_}}; + assign _zz_508_ = (32'b00000000000000000110000000000100); + assign _zz_509_ = (decode_INSTRUCTION & (32'b00000000000000000101000000000100)); + assign _zz_510_ = (32'b00000000000000000001000000000000); + assign _zz_511_ = (32'b00000000000000000010000000010100); + assign _zz_512_ = (32'b00000000000000000000000001001100); + assign _zz_513_ = (decode_INSTRUCTION & (32'b00000000000000000000000001110000)); + assign _zz_514_ = (32'b00000000000000000000000000100000); + assign _zz_515_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000100000)) == (32'b00000000000000000000000000000000)); + assign _zz_516_ = _zz_148_; + assign _zz_517_ = _zz_146_; + assign _zz_518_ = ((decode_INSTRUCTION & (32'b00000010000000000100000001110100)) == (32'b00000010000000000000000000110000)); + assign _zz_519_ = (1'b0); + assign _zz_520_ = ({_zz_145_,(_zz_523_ == _zz_524_)} != (2'b00)); + assign _zz_521_ = ((_zz_525_ == _zz_526_) != (1'b0)); + assign _zz_522_ = {(_zz_527_ != (1'b0)),{(_zz_528_ != _zz_529_),{_zz_530_,{_zz_531_,_zz_532_}}}}; + assign _zz_523_ = (decode_INSTRUCTION & (32'b00000000000000000000000000011100)); + assign _zz_524_ = (32'b00000000000000000000000000000100); + assign _zz_525_ = (decode_INSTRUCTION & (32'b00000000000000000000000001011000)); + assign _zz_526_ = (32'b00000000000000000000000001000000); + assign _zz_527_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001100100)) == (32'b00000000000000000000000000100100)); + assign _zz_528_ = {_zz_149_,((decode_INSTRUCTION & _zz_533_) == (32'b00000000000000000000000000000000))}; + assign _zz_529_ = (2'b00); + assign _zz_530_ = ({(_zz_534_ == _zz_535_),(_zz_536_ == _zz_537_)} != (2'b00)); + assign _zz_531_ = ((_zz_538_ == _zz_539_) != (1'b0)); + assign _zz_532_ = {(_zz_147_ != (1'b0)),{(_zz_540_ != _zz_541_),{_zz_542_,{_zz_543_,_zz_544_}}}}; + assign _zz_533_ = (32'b00000000000000000000000001011000); + assign _zz_534_ = (decode_INSTRUCTION & (32'b00000000000000000001000001010000)); + assign _zz_535_ = (32'b00000000000000000001000001010000); + assign _zz_536_ = (decode_INSTRUCTION & (32'b00000000000000000010000001010000)); + assign _zz_537_ = (32'b00000000000000000010000001010000); + assign _zz_538_ = (decode_INSTRUCTION & (32'b00000000000000000001000000000000)); + assign _zz_539_ = (32'b00000000000000000001000000000000); + assign _zz_540_ = ((decode_INSTRUCTION & (32'b00000010000000000011000001010000)) == (32'b00000010000000000000000001010000)); + assign _zz_541_ = (1'b0); + assign _zz_542_ = ({(_zz_545_ == _zz_546_),(_zz_547_ == _zz_548_)} != (2'b00)); + assign _zz_543_ = ({_zz_549_,{_zz_550_,_zz_551_}} != (6'b000000)); + assign _zz_544_ = {(_zz_552_ != (1'b0)),{(_zz_553_ != _zz_554_),{_zz_555_,{_zz_556_,_zz_557_}}}}; + assign _zz_545_ = (decode_INSTRUCTION & (32'b00000000000000000010000000010000)); + assign _zz_546_ = (32'b00000000000000000010000000000000); + assign _zz_547_ = (decode_INSTRUCTION & (32'b00000000000000000101000000000000)); + assign _zz_548_ = (32'b00000000000000000001000000000000); + assign _zz_549_ = ((decode_INSTRUCTION & _zz_558_) == (32'b00000000000000000010000001000000)); + assign _zz_550_ = (_zz_559_ == _zz_560_); + assign _zz_551_ = {_zz_561_,{_zz_562_,_zz_563_}}; + assign _zz_552_ = ((decode_INSTRUCTION & _zz_564_) == (32'b00010000000000000000000000001000)); + assign _zz_553_ = {_zz_148_,{_zz_565_,_zz_566_}}; + assign _zz_554_ = (3'b000); + assign _zz_555_ = ({_zz_567_,_zz_568_} != (5'b00000)); + assign _zz_556_ = (_zz_569_ != _zz_570_); + assign _zz_557_ = {_zz_571_,{_zz_572_,_zz_573_}}; + assign _zz_558_ = (32'b00000000000000000010000001000000); + assign _zz_559_ = (decode_INSTRUCTION & (32'b00000000000000000001000001000000)); + assign _zz_560_ = (32'b00000000000000000001000001000000); + assign _zz_561_ = ((decode_INSTRUCTION & _zz_574_) == (32'b00000000000000000000000001000000)); + assign _zz_562_ = (_zz_575_ == _zz_576_); + assign _zz_563_ = {_zz_577_,_zz_578_}; + assign _zz_564_ = (32'b00010000000000000000000000001000); + assign _zz_565_ = _zz_147_; + assign _zz_566_ = _zz_146_; + assign _zz_567_ = _zz_144_; + assign _zz_568_ = {_zz_579_,{_zz_580_,_zz_581_}}; + assign _zz_569_ = (_zz_582_ == _zz_583_); + assign _zz_570_ = (1'b0); + assign _zz_571_ = (_zz_584_ != (1'b0)); + assign _zz_572_ = (_zz_585_ != _zz_586_); + assign _zz_573_ = {_zz_587_,{_zz_588_,_zz_589_}}; + assign _zz_574_ = (32'b00000000000000000000000001010000); + assign _zz_575_ = (decode_INSTRUCTION & (32'b00000010010000000000000001000000)); + assign _zz_576_ = (32'b00000000000000000000000001000000); + assign _zz_577_ = ((decode_INSTRUCTION & _zz_590_) == (32'b00000000000000000000000000000000)); + assign _zz_578_ = ((decode_INSTRUCTION & _zz_591_) == (32'b00010000000000000010000000001000)); + assign _zz_579_ = ((decode_INSTRUCTION & _zz_592_) == (32'b00000000000000000010000000010000)); + assign _zz_580_ = (_zz_593_ == _zz_594_); + assign _zz_581_ = {_zz_595_,_zz_596_}; + assign _zz_582_ = (decode_INSTRUCTION & (32'b00000010000000000100000001100100)); + assign _zz_583_ = (32'b00000010000000000100000000100000); + assign _zz_584_ = ((decode_INSTRUCTION & _zz_597_) == (32'b00000000000000000001000000001000)); + assign _zz_585_ = (_zz_598_ == _zz_599_); + assign _zz_586_ = (1'b0); + assign _zz_587_ = (_zz_600_ != (1'b0)); + assign _zz_588_ = (_zz_601_ != _zz_602_); + assign _zz_589_ = {_zz_603_,{_zz_604_,_zz_605_}}; + assign _zz_590_ = (32'b00000000000000000000000000111000); + assign _zz_591_ = (32'b00011000000000000010000000001000); + assign _zz_592_ = (32'b00000000000000000010000000110000); + assign _zz_593_ = (decode_INSTRUCTION & (32'b00000000000000000001000000110000)); + assign _zz_594_ = (32'b00000000000000000000000000010000); + assign _zz_595_ = ((decode_INSTRUCTION & (32'b00000010000000000011000000100000)) == (32'b00000000000000000000000000100000)); + assign _zz_596_ = ((decode_INSTRUCTION & (32'b00000010000000000010000001101000)) == (32'b00000000000000000010000000100000)); + assign _zz_597_ = (32'b00000000000000000101000001001000); + assign _zz_598_ = (decode_INSTRUCTION & (32'b00000010001000000011000001010000)); + assign _zz_599_ = (32'b00000000000000000000000001010000); + assign _zz_600_ = ((decode_INSTRUCTION & (32'b00000010010000000011000001010000)) == (32'b00000000000000000000000001010000)); + assign _zz_601_ = ((decode_INSTRUCTION & _zz_606_) == (32'b00000000000000000000000000010000)); + assign _zz_602_ = (1'b0); + assign _zz_603_ = ({_zz_607_,{_zz_608_,_zz_609_}} != (3'b000)); + assign _zz_604_ = (_zz_610_ != (1'b0)); + assign _zz_605_ = {(_zz_611_ != _zz_612_),{_zz_613_,{_zz_614_,_zz_615_}}}; + assign _zz_606_ = (32'b00000000000000000000000000010000); + assign _zz_607_ = ((decode_INSTRUCTION & (32'b00001000000000000000000000100000)) == (32'b00001000000000000000000000100000)); + assign _zz_608_ = ((decode_INSTRUCTION & _zz_616_) == (32'b00000000000000000000000000100000)); + assign _zz_609_ = ((decode_INSTRUCTION & _zz_617_) == (32'b00000000000000000000000000100000)); + assign _zz_610_ = ((decode_INSTRUCTION & (32'b00000000000000000100000000010100)) == (32'b00000000000000000100000000010000)); + assign _zz_611_ = ((decode_INSTRUCTION & _zz_618_) == (32'b00000000000000000010000000010000)); + assign _zz_612_ = (1'b0); + assign _zz_613_ = ({_zz_619_,_zz_620_} != (2'b00)); + assign _zz_614_ = ({_zz_621_,_zz_622_} != (3'b000)); + assign _zz_615_ = {(_zz_623_ != _zz_624_),(_zz_625_ != _zz_626_)}; + assign _zz_616_ = (32'b00010000000000000000000000100000); + assign _zz_617_ = (32'b00000000000000000000000000101000); + assign _zz_618_ = (32'b00000000000000000110000000010100); + assign _zz_619_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000110100)) == (32'b00000000000000000101000000010000)); + assign _zz_620_ = ((decode_INSTRUCTION & (32'b00000010000000000111000001100100)) == (32'b00000000000000000101000000100000)); + assign _zz_621_ = ((decode_INSTRUCTION & (32'b01000000000000000011000001010100)) == (32'b01000000000000000001000000010000)); + assign _zz_622_ = {((decode_INSTRUCTION & _zz_627_) == (32'b00000000000000000001000000010000)),((decode_INSTRUCTION & _zz_628_) == (32'b00000000000000000001000000010000))}; + assign _zz_623_ = {_zz_145_,{(_zz_629_ == _zz_630_),{_zz_631_,{_zz_632_,_zz_633_}}}}; + assign _zz_624_ = (7'b0000000); + assign _zz_625_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001001000)) == (32'b00000000000000000100000000001000)); + assign _zz_626_ = (1'b0); + assign _zz_627_ = (32'b00000000000000000111000000110100); + assign _zz_628_ = (32'b00000010000000000111000001010100); + assign _zz_629_ = (decode_INSTRUCTION & (32'b00000000000000000001000000010000)); + assign _zz_630_ = (32'b00000000000000000001000000010000); + assign _zz_631_ = ((decode_INSTRUCTION & (32'b00000000000000000010000000010000)) == (32'b00000000000000000010000000010000)); + assign _zz_632_ = ((decode_INSTRUCTION & (32'b00000000000000000010000000001000)) == (32'b00000000000000000010000000001000)); + assign _zz_633_ = {((decode_INSTRUCTION & (32'b00000000000000000000000001010000)) == (32'b00000000000000000000000000010000)),{_zz_144_,((decode_INSTRUCTION & (32'b00000000000000000000000000101000)) == (32'b00000000000000000000000000000000))}}; + assign _zz_634_ = (32'b00000000000000000001000001111111); + assign _zz_635_ = (decode_INSTRUCTION & (32'b00000000000000000010000001111111)); + assign _zz_636_ = (32'b00000000000000000010000001110011); + assign _zz_637_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001111111)) == (32'b00000000000000000100000001100011)); + assign _zz_638_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000010000000010011)); + assign _zz_639_ = {((decode_INSTRUCTION & (32'b00000000000000000110000000111111)) == (32'b00000000000000000000000000100011)),{((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_640_) == (32'b00000000000000000000000000000011)),{(_zz_641_ == _zz_642_),{_zz_643_,{_zz_644_,_zz_645_}}}}}}; + assign _zz_640_ = (32'b00000000000000000101000001011111); + assign _zz_641_ = (decode_INSTRUCTION & (32'b00000000000000000111000001111011)); + assign _zz_642_ = (32'b00000000000000000000000001100011); + assign _zz_643_ = ((decode_INSTRUCTION & (32'b00000000000000000110000001111111)) == (32'b00000000000000000000000000001111)); + assign _zz_644_ = ((decode_INSTRUCTION & (32'b00011000000000000111000001111111)) == (32'b00000000000000000010000000101111)); + assign _zz_645_ = {((decode_INSTRUCTION & (32'b11111100000000000000000001111111)) == (32'b00000000000000000000000000110011)),{((decode_INSTRUCTION & (32'b11101000000000000111000001111111)) == (32'b00001000000000000010000000101111)),{((decode_INSTRUCTION & _zz_646_) == (32'b00000000000000000001000000010011)),{(_zz_647_ == _zz_648_),{_zz_649_,{_zz_650_,_zz_651_}}}}}}; + assign _zz_646_ = (32'b11111100000000000011000001011111); + assign _zz_647_ = (decode_INSTRUCTION & (32'b00000001111100000111000001111111)); + assign _zz_648_ = (32'b00000000000000000101000000001111); + assign _zz_649_ = ((decode_INSTRUCTION & (32'b10111100000000000111000001111111)) == (32'b00000000000000000101000000010011)); + assign _zz_650_ = ((decode_INSTRUCTION & (32'b10111110000000000111000001111111)) == (32'b00000000000000000101000000110011)); + assign _zz_651_ = {((decode_INSTRUCTION & (32'b10111110000000000111000001111111)) == (32'b00000000000000000000000000110011)),{((decode_INSTRUCTION & (32'b11111001111100000111000001111111)) == (32'b00010000000000000010000000101111)),{((decode_INSTRUCTION & _zz_652_) == (32'b00010010000000000000000001110011)),{(_zz_653_ == _zz_654_),{_zz_655_,_zz_656_}}}}}; + assign _zz_652_ = (32'b11111110000000000111111111111111); + assign _zz_653_ = (decode_INSTRUCTION & (32'b11011111111111111111111111111111)); + assign _zz_654_ = (32'b00010000001000000000000001110011); + assign _zz_655_ = ((decode_INSTRUCTION & (32'b11111111111111111111111111111111)) == (32'b00010000010100000000000001110011)); + assign _zz_656_ = ((decode_INSTRUCTION & (32'b11111111111111111111111111111111)) == (32'b00000000000000000000000001110011)); + always @ (posedge clk) begin + if(_zz_55_) begin + RegFilePlugin_regFile[lastStageRegFileWrite_payload_address] <= lastStageRegFileWrite_payload_data; + end + end + + always @ (posedge clk) begin + if(_zz_456_) begin + _zz_246_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress1]; + end + end + + always @ (posedge clk) begin + if(_zz_457_) begin + _zz_247_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress2]; + end + end + + InstructionCache IBusCachedPlugin_cache ( + .io_flush(_zz_220_), + .io_cpu_prefetch_isValid(_zz_221_), + .io_cpu_prefetch_haltIt(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt), + .io_cpu_prefetch_pc(IBusCachedPlugin_iBusRsp_stages_1_input_payload), + .io_cpu_fetch_isValid(_zz_222_), + .io_cpu_fetch_isStuck(_zz_223_), + .io_cpu_fetch_isRemoved(IBusCachedPlugin_fetcherflushIt), + .io_cpu_fetch_pc(IBusCachedPlugin_iBusRsp_stages_2_input_payload), + .io_cpu_fetch_data(IBusCachedPlugin_cache_io_cpu_fetch_data), + .io_cpu_fetch_dataBypassValid(IBusCachedPlugin_s1_tightlyCoupledHit), + .io_cpu_fetch_dataBypass(_zz_224_), + .io_cpu_fetch_mmuBus_cmd_isValid(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid), + .io_cpu_fetch_mmuBus_cmd_virtualAddress(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress), + .io_cpu_fetch_mmuBus_cmd_bypassTranslation(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation), + .io_cpu_fetch_mmuBus_rsp_physicalAddress(IBusCachedPlugin_mmuBus_rsp_physicalAddress), + .io_cpu_fetch_mmuBus_rsp_isIoAccess(IBusCachedPlugin_mmuBus_rsp_isIoAccess), + .io_cpu_fetch_mmuBus_rsp_allowRead(IBusCachedPlugin_mmuBus_rsp_allowRead), + .io_cpu_fetch_mmuBus_rsp_allowWrite(IBusCachedPlugin_mmuBus_rsp_allowWrite), + .io_cpu_fetch_mmuBus_rsp_allowExecute(IBusCachedPlugin_mmuBus_rsp_allowExecute), + .io_cpu_fetch_mmuBus_rsp_exception(IBusCachedPlugin_mmuBus_rsp_exception), + .io_cpu_fetch_mmuBus_rsp_refilling(IBusCachedPlugin_mmuBus_rsp_refilling), + .io_cpu_fetch_mmuBus_end(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end), + .io_cpu_fetch_mmuBus_busy(IBusCachedPlugin_mmuBus_busy), + .io_cpu_fetch_physicalAddress(IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress), + .io_cpu_fetch_haltIt(IBusCachedPlugin_cache_io_cpu_fetch_haltIt), + .io_cpu_decode_isValid(_zz_225_), + .io_cpu_decode_isStuck(_zz_226_), + .io_cpu_decode_pc(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload), + .io_cpu_decode_physicalAddress(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), + .io_cpu_decode_data(IBusCachedPlugin_cache_io_cpu_decode_data), + .io_cpu_decode_cacheMiss(IBusCachedPlugin_cache_io_cpu_decode_cacheMiss), + .io_cpu_decode_error(IBusCachedPlugin_cache_io_cpu_decode_error), + .io_cpu_decode_mmuRefilling(IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling), + .io_cpu_decode_mmuException(IBusCachedPlugin_cache_io_cpu_decode_mmuException), + .io_cpu_decode_isUser(_zz_227_), + .io_cpu_fill_valid(_zz_228_), + .io_cpu_fill_payload(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), + .io_mem_cmd_valid(IBusCachedPlugin_cache_io_mem_cmd_valid), + .io_mem_cmd_ready(iBus_cmd_ready), + .io_mem_cmd_payload_address(IBusCachedPlugin_cache_io_mem_cmd_payload_address), + .io_mem_cmd_payload_size(IBusCachedPlugin_cache_io_mem_cmd_payload_size), + .io_mem_rsp_valid(iBus_rsp_valid), + .io_mem_rsp_payload_data(iBus_rsp_payload_data), + .io_mem_rsp_payload_error(iBus_rsp_payload_error), + .clk(clk), + .reset(reset) + ); + DataCache dataCache_1_ ( + .io_cpu_execute_isValid(_zz_229_), + .io_cpu_execute_address(_zz_230_), + .io_cpu_execute_args_wr(_zz_231_), + .io_cpu_execute_args_data(_zz_232_), + .io_cpu_execute_args_size(_zz_233_), + .io_cpu_execute_args_isLrsc(_zz_234_), + .io_cpu_execute_args_isAmo(_zz_235_), + .io_cpu_execute_args_amoCtrl_swap(_zz_236_), + .io_cpu_execute_args_amoCtrl_alu(_zz_237_), + .io_cpu_memory_isValid(_zz_238_), + .io_cpu_memory_isStuck(memory_arbitration_isStuck), + .io_cpu_memory_isRemoved(memory_arbitration_removeIt), + .io_cpu_memory_isWrite(dataCache_1__io_cpu_memory_isWrite), + .io_cpu_memory_address(_zz_239_), + .io_cpu_memory_mmuBus_cmd_isValid(dataCache_1__io_cpu_memory_mmuBus_cmd_isValid), + .io_cpu_memory_mmuBus_cmd_virtualAddress(dataCache_1__io_cpu_memory_mmuBus_cmd_virtualAddress), + .io_cpu_memory_mmuBus_cmd_bypassTranslation(dataCache_1__io_cpu_memory_mmuBus_cmd_bypassTranslation), + .io_cpu_memory_mmuBus_rsp_physicalAddress(DBusCachedPlugin_mmuBus_rsp_physicalAddress), + .io_cpu_memory_mmuBus_rsp_isIoAccess(_zz_240_), + .io_cpu_memory_mmuBus_rsp_allowRead(DBusCachedPlugin_mmuBus_rsp_allowRead), + .io_cpu_memory_mmuBus_rsp_allowWrite(DBusCachedPlugin_mmuBus_rsp_allowWrite), + .io_cpu_memory_mmuBus_rsp_allowExecute(DBusCachedPlugin_mmuBus_rsp_allowExecute), + .io_cpu_memory_mmuBus_rsp_exception(DBusCachedPlugin_mmuBus_rsp_exception), + .io_cpu_memory_mmuBus_rsp_refilling(DBusCachedPlugin_mmuBus_rsp_refilling), + .io_cpu_memory_mmuBus_end(dataCache_1__io_cpu_memory_mmuBus_end), + .io_cpu_memory_mmuBus_busy(DBusCachedPlugin_mmuBus_busy), + .io_cpu_writeBack_isValid(_zz_241_), + .io_cpu_writeBack_isStuck(writeBack_arbitration_isStuck), + .io_cpu_writeBack_isUser(_zz_242_), + .io_cpu_writeBack_haltIt(dataCache_1__io_cpu_writeBack_haltIt), + .io_cpu_writeBack_isWrite(dataCache_1__io_cpu_writeBack_isWrite), + .io_cpu_writeBack_data(dataCache_1__io_cpu_writeBack_data), + .io_cpu_writeBack_address(_zz_243_), + .io_cpu_writeBack_mmuException(dataCache_1__io_cpu_writeBack_mmuException), + .io_cpu_writeBack_unalignedAccess(dataCache_1__io_cpu_writeBack_unalignedAccess), + .io_cpu_writeBack_accessError(dataCache_1__io_cpu_writeBack_accessError), + .io_cpu_writeBack_clearLrsc(contextSwitching), + .io_cpu_redo(dataCache_1__io_cpu_redo), + .io_cpu_flush_valid(_zz_244_), + .io_cpu_flush_ready(dataCache_1__io_cpu_flush_ready), + .io_mem_cmd_valid(dataCache_1__io_mem_cmd_valid), + .io_mem_cmd_ready(_zz_245_), + .io_mem_cmd_payload_wr(dataCache_1__io_mem_cmd_payload_wr), + .io_mem_cmd_payload_address(dataCache_1__io_mem_cmd_payload_address), + .io_mem_cmd_payload_data(dataCache_1__io_mem_cmd_payload_data), + .io_mem_cmd_payload_mask(dataCache_1__io_mem_cmd_payload_mask), + .io_mem_cmd_payload_length(dataCache_1__io_mem_cmd_payload_length), + .io_mem_cmd_payload_last(dataCache_1__io_mem_cmd_payload_last), + .io_mem_rsp_valid(dBus_rsp_valid), + .io_mem_rsp_payload_data(dBus_rsp_payload_data), + .io_mem_rsp_payload_error(dBus_rsp_payload_error), + .clk(clk), + .reset(reset) + ); + always @(*) begin + case(_zz_458_) + 2'b00 : begin + _zz_248_ = DBusCachedPlugin_redoBranch_payload; + end + 2'b01 : begin + _zz_248_ = CsrPlugin_jumpInterface_payload; + end + 2'b10 : begin + _zz_248_ = BranchPlugin_jumpInterface_payload; + end + default : begin + _zz_248_ = IBusCachedPlugin_redoBranch_payload; + end + endcase + end + + always @(*) begin + case(_zz_139_) + 2'b00 : begin + _zz_249_ = MmuPlugin_ports_0_cache_0_valid; + _zz_250_ = MmuPlugin_ports_0_cache_0_exception; + _zz_251_ = MmuPlugin_ports_0_cache_0_superPage; + _zz_252_ = MmuPlugin_ports_0_cache_0_virtualAddress_0; + _zz_253_ = MmuPlugin_ports_0_cache_0_virtualAddress_1; + _zz_254_ = MmuPlugin_ports_0_cache_0_physicalAddress_0; + _zz_255_ = MmuPlugin_ports_0_cache_0_physicalAddress_1; + _zz_256_ = MmuPlugin_ports_0_cache_0_allowRead; + _zz_257_ = MmuPlugin_ports_0_cache_0_allowWrite; + _zz_258_ = MmuPlugin_ports_0_cache_0_allowExecute; + _zz_259_ = MmuPlugin_ports_0_cache_0_allowUser; + end + 2'b01 : begin + _zz_249_ = MmuPlugin_ports_0_cache_1_valid; + _zz_250_ = MmuPlugin_ports_0_cache_1_exception; + _zz_251_ = MmuPlugin_ports_0_cache_1_superPage; + _zz_252_ = MmuPlugin_ports_0_cache_1_virtualAddress_0; + _zz_253_ = MmuPlugin_ports_0_cache_1_virtualAddress_1; + _zz_254_ = MmuPlugin_ports_0_cache_1_physicalAddress_0; + _zz_255_ = MmuPlugin_ports_0_cache_1_physicalAddress_1; + _zz_256_ = MmuPlugin_ports_0_cache_1_allowRead; + _zz_257_ = MmuPlugin_ports_0_cache_1_allowWrite; + _zz_258_ = MmuPlugin_ports_0_cache_1_allowExecute; + _zz_259_ = MmuPlugin_ports_0_cache_1_allowUser; + end + 2'b10 : begin + _zz_249_ = MmuPlugin_ports_0_cache_2_valid; + _zz_250_ = MmuPlugin_ports_0_cache_2_exception; + _zz_251_ = MmuPlugin_ports_0_cache_2_superPage; + _zz_252_ = MmuPlugin_ports_0_cache_2_virtualAddress_0; + _zz_253_ = MmuPlugin_ports_0_cache_2_virtualAddress_1; + _zz_254_ = MmuPlugin_ports_0_cache_2_physicalAddress_0; + _zz_255_ = MmuPlugin_ports_0_cache_2_physicalAddress_1; + _zz_256_ = MmuPlugin_ports_0_cache_2_allowRead; + _zz_257_ = MmuPlugin_ports_0_cache_2_allowWrite; + _zz_258_ = MmuPlugin_ports_0_cache_2_allowExecute; + _zz_259_ = MmuPlugin_ports_0_cache_2_allowUser; + end + default : begin + _zz_249_ = MmuPlugin_ports_0_cache_3_valid; + _zz_250_ = MmuPlugin_ports_0_cache_3_exception; + _zz_251_ = MmuPlugin_ports_0_cache_3_superPage; + _zz_252_ = MmuPlugin_ports_0_cache_3_virtualAddress_0; + _zz_253_ = MmuPlugin_ports_0_cache_3_virtualAddress_1; + _zz_254_ = MmuPlugin_ports_0_cache_3_physicalAddress_0; + _zz_255_ = MmuPlugin_ports_0_cache_3_physicalAddress_1; + _zz_256_ = MmuPlugin_ports_0_cache_3_allowRead; + _zz_257_ = MmuPlugin_ports_0_cache_3_allowWrite; + _zz_258_ = MmuPlugin_ports_0_cache_3_allowExecute; + _zz_259_ = MmuPlugin_ports_0_cache_3_allowUser; + end + endcase + end + + always @(*) begin + case(_zz_142_) + 2'b00 : begin + _zz_260_ = MmuPlugin_ports_1_cache_0_valid; + _zz_261_ = MmuPlugin_ports_1_cache_0_exception; + _zz_262_ = MmuPlugin_ports_1_cache_0_superPage; + _zz_263_ = MmuPlugin_ports_1_cache_0_virtualAddress_0; + _zz_264_ = MmuPlugin_ports_1_cache_0_virtualAddress_1; + _zz_265_ = MmuPlugin_ports_1_cache_0_physicalAddress_0; + _zz_266_ = MmuPlugin_ports_1_cache_0_physicalAddress_1; + _zz_267_ = MmuPlugin_ports_1_cache_0_allowRead; + _zz_268_ = MmuPlugin_ports_1_cache_0_allowWrite; + _zz_269_ = MmuPlugin_ports_1_cache_0_allowExecute; + _zz_270_ = MmuPlugin_ports_1_cache_0_allowUser; + end + 2'b01 : begin + _zz_260_ = MmuPlugin_ports_1_cache_1_valid; + _zz_261_ = MmuPlugin_ports_1_cache_1_exception; + _zz_262_ = MmuPlugin_ports_1_cache_1_superPage; + _zz_263_ = MmuPlugin_ports_1_cache_1_virtualAddress_0; + _zz_264_ = MmuPlugin_ports_1_cache_1_virtualAddress_1; + _zz_265_ = MmuPlugin_ports_1_cache_1_physicalAddress_0; + _zz_266_ = MmuPlugin_ports_1_cache_1_physicalAddress_1; + _zz_267_ = MmuPlugin_ports_1_cache_1_allowRead; + _zz_268_ = MmuPlugin_ports_1_cache_1_allowWrite; + _zz_269_ = MmuPlugin_ports_1_cache_1_allowExecute; + _zz_270_ = MmuPlugin_ports_1_cache_1_allowUser; + end + 2'b10 : begin + _zz_260_ = MmuPlugin_ports_1_cache_2_valid; + _zz_261_ = MmuPlugin_ports_1_cache_2_exception; + _zz_262_ = MmuPlugin_ports_1_cache_2_superPage; + _zz_263_ = MmuPlugin_ports_1_cache_2_virtualAddress_0; + _zz_264_ = MmuPlugin_ports_1_cache_2_virtualAddress_1; + _zz_265_ = MmuPlugin_ports_1_cache_2_physicalAddress_0; + _zz_266_ = MmuPlugin_ports_1_cache_2_physicalAddress_1; + _zz_267_ = MmuPlugin_ports_1_cache_2_allowRead; + _zz_268_ = MmuPlugin_ports_1_cache_2_allowWrite; + _zz_269_ = MmuPlugin_ports_1_cache_2_allowExecute; + _zz_270_ = MmuPlugin_ports_1_cache_2_allowUser; + end + default : begin + _zz_260_ = MmuPlugin_ports_1_cache_3_valid; + _zz_261_ = MmuPlugin_ports_1_cache_3_exception; + _zz_262_ = MmuPlugin_ports_1_cache_3_superPage; + _zz_263_ = MmuPlugin_ports_1_cache_3_virtualAddress_0; + _zz_264_ = MmuPlugin_ports_1_cache_3_virtualAddress_1; + _zz_265_ = MmuPlugin_ports_1_cache_3_physicalAddress_0; + _zz_266_ = MmuPlugin_ports_1_cache_3_physicalAddress_1; + _zz_267_ = MmuPlugin_ports_1_cache_3_allowRead; + _zz_268_ = MmuPlugin_ports_1_cache_3_allowWrite; + _zz_269_ = MmuPlugin_ports_1_cache_3_allowExecute; + _zz_270_ = MmuPlugin_ports_1_cache_3_allowUser; + end + endcase + end + + `ifndef SYNTHESIS + always @(*) begin + case(decode_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : decode_BRANCH_CTRL_string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : decode_BRANCH_CTRL_string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : decode_BRANCH_CTRL_string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : decode_BRANCH_CTRL_string = "JALR"; + default : decode_BRANCH_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_1_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_1__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_1__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_1__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_1__string = "JALR"; + default : _zz_1__string = "????"; + endcase + end + always @(*) begin + case(_zz_2_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_2__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_2__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_2__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_2__string = "JALR"; + default : _zz_2__string = "????"; + endcase + end + always @(*) begin + case(_zz_3_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_3__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_3__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_3__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_3__string = "JALR"; + default : _zz_3__string = "????"; + endcase + end + always @(*) begin + case(decode_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_ALU_BITWISE_CTRL_string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_ALU_BITWISE_CTRL_string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_ALU_BITWISE_CTRL_string = "AND_1"; + default : decode_ALU_BITWISE_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_4_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_4__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_4__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_4__string = "AND_1"; + default : _zz_4__string = "?????"; + endcase + end + always @(*) begin + case(_zz_5_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_5__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_5__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_5__string = "AND_1"; + default : _zz_5__string = "?????"; + endcase + end + always @(*) begin + case(_zz_6_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_6__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_6__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_6__string = "AND_1"; + default : _zz_6__string = "?????"; + endcase + end + always @(*) begin + case(decode_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : decode_SRC1_CTRL_string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : decode_SRC1_CTRL_string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_SRC1_CTRL_string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : decode_SRC1_CTRL_string = "URS1 "; + default : decode_SRC1_CTRL_string = "????????????"; + endcase + end + always @(*) begin + case(_zz_7_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_7__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_7__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_7__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_7__string = "URS1 "; + default : _zz_7__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_8_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_8__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_8__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_8__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_8__string = "URS1 "; + default : _zz_8__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_9_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_9__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_9__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_9__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_9__string = "URS1 "; + default : _zz_9__string = "????????????"; + endcase + end + always @(*) begin + case(decode_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : decode_SRC2_CTRL_string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : decode_SRC2_CTRL_string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : decode_SRC2_CTRL_string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : decode_SRC2_CTRL_string = "PC "; + default : decode_SRC2_CTRL_string = "???"; + endcase + end + always @(*) begin + case(_zz_10_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_10__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_10__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_10__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_10__string = "PC "; + default : _zz_10__string = "???"; + endcase + end + always @(*) begin + case(_zz_11_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_11__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_11__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_11__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_11__string = "PC "; + default : _zz_11__string = "???"; + endcase + end + always @(*) begin + case(_zz_12_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_12__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_12__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_12__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_12__string = "PC "; + default : _zz_12__string = "???"; + endcase + end + always @(*) begin + case(_zz_13_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_13__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_13__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_13__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_13__string = "ECALL"; + default : _zz_13__string = "?????"; + endcase + end + always @(*) begin + case(_zz_14_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_14__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_14__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_14__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_14__string = "ECALL"; + default : _zz_14__string = "?????"; + endcase + end + always @(*) begin + case(_zz_15_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_15__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_15__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_15__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_15__string = "ECALL"; + default : _zz_15__string = "?????"; + endcase + end + always @(*) begin + case(_zz_16_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_16__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_16__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_16__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_16__string = "ECALL"; + default : _zz_16__string = "?????"; + endcase + end + always @(*) begin + case(decode_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : decode_ENV_CTRL_string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : decode_ENV_CTRL_string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : decode_ENV_CTRL_string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : decode_ENV_CTRL_string = "ECALL"; + default : decode_ENV_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_17_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_17__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_17__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_17__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_17__string = "ECALL"; + default : _zz_17__string = "?????"; + endcase + end + always @(*) begin + case(_zz_18_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_18__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_18__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_18__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_18__string = "ECALL"; + default : _zz_18__string = "?????"; + endcase + end + always @(*) begin + case(_zz_19_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_19__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_19__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_19__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_19__string = "ECALL"; + default : _zz_19__string = "?????"; + endcase + end + always @(*) begin + case(decode_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_ALU_CTRL_string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_ALU_CTRL_string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : decode_ALU_CTRL_string = "BITWISE "; + default : decode_ALU_CTRL_string = "????????"; + endcase + end + always @(*) begin + case(_zz_20_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_20__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_20__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_20__string = "BITWISE "; + default : _zz_20__string = "????????"; + endcase + end + always @(*) begin + case(_zz_21_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_21__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_21__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_21__string = "BITWISE "; + default : _zz_21__string = "????????"; + endcase + end + always @(*) begin + case(_zz_22_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_22__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_22__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_22__string = "BITWISE "; + default : _zz_22__string = "????????"; + endcase + end + always @(*) begin + case(_zz_23_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_23__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_23__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_23__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_23__string = "SRA_1 "; + default : _zz_23__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_24_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_24__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_24__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_24__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_24__string = "SRA_1 "; + default : _zz_24__string = "?????????"; + endcase + end + always @(*) begin + case(decode_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_SHIFT_CTRL_string = "SRA_1 "; + default : decode_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(_zz_25_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_25__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_25__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_25__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_25__string = "SRA_1 "; + default : _zz_25__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_26_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_26__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_26__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_26__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_26__string = "SRA_1 "; + default : _zz_26__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_27_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_27__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_27__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_27__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_27__string = "SRA_1 "; + default : _zz_27__string = "?????????"; + endcase + end + always @(*) begin + case(memory_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : memory_ENV_CTRL_string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : memory_ENV_CTRL_string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : memory_ENV_CTRL_string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : memory_ENV_CTRL_string = "ECALL"; + default : memory_ENV_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_28_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_28__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_28__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_28__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_28__string = "ECALL"; + default : _zz_28__string = "?????"; + endcase + end + always @(*) begin + case(execute_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : execute_ENV_CTRL_string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : execute_ENV_CTRL_string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : execute_ENV_CTRL_string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : execute_ENV_CTRL_string = "ECALL"; + default : execute_ENV_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_29_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_29__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_29__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_29__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_29__string = "ECALL"; + default : _zz_29__string = "?????"; + endcase + end + always @(*) begin + case(writeBack_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : writeBack_ENV_CTRL_string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : writeBack_ENV_CTRL_string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : writeBack_ENV_CTRL_string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : writeBack_ENV_CTRL_string = "ECALL"; + default : writeBack_ENV_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_32_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_32__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_32__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_32__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_32__string = "ECALL"; + default : _zz_32__string = "?????"; + endcase + end + always @(*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : execute_BRANCH_CTRL_string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : execute_BRANCH_CTRL_string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : execute_BRANCH_CTRL_string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : execute_BRANCH_CTRL_string = "JALR"; + default : execute_BRANCH_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_34_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_34__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_34__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_34__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_34__string = "JALR"; + default : _zz_34__string = "????"; + endcase + end + always @(*) begin + case(memory_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : memory_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : memory_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : memory_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : memory_SHIFT_CTRL_string = "SRA_1 "; + default : memory_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(_zz_38_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_38__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_38__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_38__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_38__string = "SRA_1 "; + default : _zz_38__string = "?????????"; + endcase + end + always @(*) begin + case(execute_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : execute_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : execute_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : execute_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : execute_SHIFT_CTRL_string = "SRA_1 "; + default : execute_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(_zz_40_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_40__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_40__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_40__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_40__string = "SRA_1 "; + default : _zz_40__string = "?????????"; + endcase + end + always @(*) begin + case(execute_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : execute_SRC2_CTRL_string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : execute_SRC2_CTRL_string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : execute_SRC2_CTRL_string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : execute_SRC2_CTRL_string = "PC "; + default : execute_SRC2_CTRL_string = "???"; + endcase + end + always @(*) begin + case(_zz_45_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_45__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_45__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_45__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_45__string = "PC "; + default : _zz_45__string = "???"; + endcase + end + always @(*) begin + case(execute_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : execute_SRC1_CTRL_string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : execute_SRC1_CTRL_string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : execute_SRC1_CTRL_string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : execute_SRC1_CTRL_string = "URS1 "; + default : execute_SRC1_CTRL_string = "????????????"; + endcase + end + always @(*) begin + case(_zz_47_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_47__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_47__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_47__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_47__string = "URS1 "; + default : _zz_47__string = "????????????"; + endcase + end + always @(*) begin + case(execute_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_ADD_SUB : execute_ALU_CTRL_string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : execute_ALU_CTRL_string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : execute_ALU_CTRL_string = "BITWISE "; + default : execute_ALU_CTRL_string = "????????"; + endcase + end + always @(*) begin + case(_zz_50_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_50__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_50__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_50__string = "BITWISE "; + default : _zz_50__string = "????????"; + endcase + end + always @(*) begin + case(execute_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : execute_ALU_BITWISE_CTRL_string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : execute_ALU_BITWISE_CTRL_string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : execute_ALU_BITWISE_CTRL_string = "AND_1"; + default : execute_ALU_BITWISE_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_52_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_52__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_52__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_52__string = "AND_1"; + default : _zz_52__string = "?????"; + endcase + end + always @(*) begin + case(_zz_62_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_62__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_62__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_62__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_62__string = "URS1 "; + default : _zz_62__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_63_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_63__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_63__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_63__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_63__string = "PC "; + default : _zz_63__string = "???"; + endcase + end + always @(*) begin + case(_zz_66_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_66__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_66__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_66__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_66__string = "JALR"; + default : _zz_66__string = "????"; + endcase + end + always @(*) begin + case(_zz_70_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_70__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_70__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_70__string = "AND_1"; + default : _zz_70__string = "?????"; + endcase + end + always @(*) begin + case(_zz_78_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_78__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_78__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_78__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_78__string = "ECALL"; + default : _zz_78__string = "?????"; + endcase + end + always @(*) begin + case(_zz_81_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_81__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_81__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_81__string = "BITWISE "; + default : _zz_81__string = "????????"; + endcase + end + always @(*) begin + case(_zz_82_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_82__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_82__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_82__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_82__string = "SRA_1 "; + default : _zz_82__string = "?????????"; + endcase + end + always @(*) begin + case(MmuPlugin_shared_state_1_) + `MmuPlugin_shared_State_defaultEncoding_IDLE : MmuPlugin_shared_state_1__string = "IDLE "; + `MmuPlugin_shared_State_defaultEncoding_L1_CMD : MmuPlugin_shared_state_1__string = "L1_CMD"; + `MmuPlugin_shared_State_defaultEncoding_L1_RSP : MmuPlugin_shared_state_1__string = "L1_RSP"; + `MmuPlugin_shared_State_defaultEncoding_L0_CMD : MmuPlugin_shared_state_1__string = "L0_CMD"; + `MmuPlugin_shared_State_defaultEncoding_L0_RSP : MmuPlugin_shared_state_1__string = "L0_RSP"; + default : MmuPlugin_shared_state_1__string = "??????"; + endcase + end + always @(*) begin + case(_zz_152_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_152__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_152__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_152__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_152__string = "SRA_1 "; + default : _zz_152__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_153_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_153__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_153__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_153__string = "BITWISE "; + default : _zz_153__string = "????????"; + endcase + end + always @(*) begin + case(_zz_154_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_154__string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_154__string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : _zz_154__string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : _zz_154__string = "ECALL"; + default : _zz_154__string = "?????"; + endcase + end + always @(*) begin + case(_zz_155_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_155__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_155__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_155__string = "AND_1"; + default : _zz_155__string = "?????"; + endcase + end + always @(*) begin + case(_zz_156_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_156__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_156__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_156__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_156__string = "JALR"; + default : _zz_156__string = "????"; + endcase + end + always @(*) begin + case(_zz_157_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_157__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_157__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_157__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_157__string = "PC "; + default : _zz_157__string = "???"; + endcase + end + always @(*) begin + case(_zz_158_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_158__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_158__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_158__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_158__string = "URS1 "; + default : _zz_158__string = "????????????"; + endcase + end + always @(*) begin + case(decode_to_execute_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_to_execute_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_to_execute_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_to_execute_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_to_execute_SHIFT_CTRL_string = "SRA_1 "; + default : decode_to_execute_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(execute_to_memory_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : execute_to_memory_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : execute_to_memory_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : execute_to_memory_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : execute_to_memory_SHIFT_CTRL_string = "SRA_1 "; + default : execute_to_memory_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(decode_to_execute_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_to_execute_ALU_CTRL_string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_to_execute_ALU_CTRL_string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : decode_to_execute_ALU_CTRL_string = "BITWISE "; + default : decode_to_execute_ALU_CTRL_string = "????????"; + endcase + end + always @(*) begin + case(decode_to_execute_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : decode_to_execute_ENV_CTRL_string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : decode_to_execute_ENV_CTRL_string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : decode_to_execute_ENV_CTRL_string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : decode_to_execute_ENV_CTRL_string = "ECALL"; + default : decode_to_execute_ENV_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(execute_to_memory_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : execute_to_memory_ENV_CTRL_string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : execute_to_memory_ENV_CTRL_string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : execute_to_memory_ENV_CTRL_string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : execute_to_memory_ENV_CTRL_string = "ECALL"; + default : execute_to_memory_ENV_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(memory_to_writeBack_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : memory_to_writeBack_ENV_CTRL_string = "NONE "; + `EnvCtrlEnum_defaultEncoding_XRET : memory_to_writeBack_ENV_CTRL_string = "XRET "; + `EnvCtrlEnum_defaultEncoding_WFI : memory_to_writeBack_ENV_CTRL_string = "WFI "; + `EnvCtrlEnum_defaultEncoding_ECALL : memory_to_writeBack_ENV_CTRL_string = "ECALL"; + default : memory_to_writeBack_ENV_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(decode_to_execute_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC2_CTRL_string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : decode_to_execute_SRC2_CTRL_string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : decode_to_execute_SRC2_CTRL_string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : decode_to_execute_SRC2_CTRL_string = "PC "; + default : decode_to_execute_SRC2_CTRL_string = "???"; + endcase + end + always @(*) begin + case(decode_to_execute_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC1_CTRL_string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : decode_to_execute_SRC1_CTRL_string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_to_execute_SRC1_CTRL_string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : decode_to_execute_SRC1_CTRL_string = "URS1 "; + default : decode_to_execute_SRC1_CTRL_string = "????????????"; + endcase + end + always @(*) begin + case(decode_to_execute_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "AND_1"; + default : decode_to_execute_ALU_BITWISE_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(decode_to_execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : decode_to_execute_BRANCH_CTRL_string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : decode_to_execute_BRANCH_CTRL_string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : decode_to_execute_BRANCH_CTRL_string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : decode_to_execute_BRANCH_CTRL_string = "JALR"; + default : decode_to_execute_BRANCH_CTRL_string = "????"; + endcase + end + `endif + + assign decode_SRC2_FORCE_ZERO = _zz_49_; + assign decode_BYPASSABLE_EXECUTE_STAGE = _zz_75_; + assign decode_IS_RS2_SIGNED = _zz_64_; + assign execute_BRANCH_CALC = _zz_33_; + assign decode_BRANCH_CTRL = _zz_1_; + assign _zz_2_ = _zz_3_; + assign decode_CSR_WRITE_OPCODE = _zz_31_; + assign execute_REGFILE_WRITE_DATA = _zz_51_; + assign memory_IS_SFENCE_VMA = execute_to_memory_IS_SFENCE_VMA; + assign execute_IS_SFENCE_VMA = decode_to_execute_IS_SFENCE_VMA; + assign decode_IS_SFENCE_VMA = _zz_71_; + assign execute_IS_DBUS_SHARING = _zz_86_; + assign decode_ALU_BITWISE_CTRL = _zz_4_; + assign _zz_5_ = _zz_6_; + assign memory_MEMORY_ADDRESS_LOW = execute_to_memory_MEMORY_ADDRESS_LOW; + assign execute_MEMORY_ADDRESS_LOW = _zz_88_; + assign decode_IS_DIV = _zz_76_; + assign decode_IS_RS1_SIGNED = _zz_74_; + assign decode_SRC1_CTRL = _zz_7_; + assign _zz_8_ = _zz_9_; + assign memory_MEMORY_WR = execute_to_memory_MEMORY_WR; + assign decode_MEMORY_WR = _zz_80_; + assign writeBack_FORMAL_PC_NEXT = memory_to_writeBack_FORMAL_PC_NEXT; + assign memory_FORMAL_PC_NEXT = execute_to_memory_FORMAL_PC_NEXT; + assign execute_FORMAL_PC_NEXT = decode_to_execute_FORMAL_PC_NEXT; + assign decode_FORMAL_PC_NEXT = _zz_95_; + assign decode_MEMORY_AMO = _zz_58_; + assign decode_CSR_READ_OPCODE = _zz_30_; + assign execute_BYPASSABLE_MEMORY_STAGE = decode_to_execute_BYPASSABLE_MEMORY_STAGE; + assign decode_BYPASSABLE_MEMORY_STAGE = _zz_79_; + assign decode_SRC2_CTRL = _zz_10_; + assign _zz_11_ = _zz_12_; + assign memory_PC = execute_to_memory_PC; + assign _zz_13_ = _zz_14_; + assign _zz_15_ = _zz_16_; + assign decode_ENV_CTRL = _zz_17_; + assign _zz_18_ = _zz_19_; + assign decode_SRC_LESS_UNSIGNED = _zz_72_; + assign decode_ALU_CTRL = _zz_20_; + assign _zz_21_ = _zz_22_; + assign execute_SHIFT_RIGHT = _zz_39_; + assign decode_IS_CSR = _zz_69_; + assign decode_IS_MUL = _zz_65_; + assign decode_MEMORY_MANAGMENT = _zz_84_; + assign _zz_23_ = _zz_24_; + assign decode_SHIFT_CTRL = _zz_25_; + assign _zz_26_ = _zz_27_; + assign decode_MEMORY_LRSC = _zz_73_; + assign execute_BRANCH_DO = _zz_35_; + assign execute_IS_RS1_SIGNED = decode_to_execute_IS_RS1_SIGNED; + assign execute_IS_DIV = decode_to_execute_IS_DIV; + assign execute_IS_MUL = decode_to_execute_IS_MUL; + assign execute_IS_RS2_SIGNED = decode_to_execute_IS_RS2_SIGNED; + assign memory_IS_DIV = execute_to_memory_IS_DIV; + assign memory_IS_MUL = execute_to_memory_IS_MUL; + assign execute_CSR_READ_OPCODE = decode_to_execute_CSR_READ_OPCODE; + assign execute_CSR_WRITE_OPCODE = decode_to_execute_CSR_WRITE_OPCODE; + assign execute_IS_CSR = decode_to_execute_IS_CSR; + assign memory_ENV_CTRL = _zz_28_; + assign execute_ENV_CTRL = _zz_29_; + assign writeBack_ENV_CTRL = _zz_32_; + assign memory_BRANCH_CALC = execute_to_memory_BRANCH_CALC; + assign memory_BRANCH_DO = execute_to_memory_BRANCH_DO; + assign execute_PC = decode_to_execute_PC; + assign execute_RS1 = decode_to_execute_RS1; + assign execute_BRANCH_CTRL = _zz_34_; + assign decode_RS2_USE = _zz_59_; + assign decode_RS1_USE = _zz_61_; + always @ (*) begin + _zz_36_ = execute_REGFILE_WRITE_DATA; + if(_zz_271_)begin + _zz_36_ = execute_CsrPlugin_readData; + end + if(DBusCachedPlugin_forceDatapath)begin + _zz_36_ = MmuPlugin_dBusAccess_cmd_payload_address; + end + end + + assign execute_REGFILE_WRITE_VALID = decode_to_execute_REGFILE_WRITE_VALID; + assign execute_BYPASSABLE_EXECUTE_STAGE = decode_to_execute_BYPASSABLE_EXECUTE_STAGE; + assign memory_REGFILE_WRITE_VALID = execute_to_memory_REGFILE_WRITE_VALID; + assign memory_INSTRUCTION = execute_to_memory_INSTRUCTION; + assign memory_BYPASSABLE_MEMORY_STAGE = execute_to_memory_BYPASSABLE_MEMORY_STAGE; + assign writeBack_REGFILE_WRITE_VALID = memory_to_writeBack_REGFILE_WRITE_VALID; + always @ (*) begin + decode_RS2 = _zz_56_; + if(_zz_172_)begin + if((_zz_173_ == decode_INSTRUCTION[24 : 20]))begin + decode_RS2 = _zz_174_; + end + end + if(_zz_272_)begin + if(_zz_273_)begin + if(_zz_176_)begin + decode_RS2 = _zz_87_; + end + end + end + if(_zz_274_)begin + if(memory_BYPASSABLE_MEMORY_STAGE)begin + if(_zz_178_)begin + decode_RS2 = _zz_37_; + end + end + end + if(_zz_275_)begin + if(execute_BYPASSABLE_EXECUTE_STAGE)begin + if(_zz_180_)begin + decode_RS2 = _zz_36_; + end + end + end + end + + always @ (*) begin + decode_RS1 = _zz_57_; + if(_zz_172_)begin + if((_zz_173_ == decode_INSTRUCTION[19 : 15]))begin + decode_RS1 = _zz_174_; + end + end + if(_zz_272_)begin + if(_zz_273_)begin + if(_zz_175_)begin + decode_RS1 = _zz_87_; + end + end + end + if(_zz_274_)begin + if(memory_BYPASSABLE_MEMORY_STAGE)begin + if(_zz_177_)begin + decode_RS1 = _zz_37_; + end + end + end + if(_zz_275_)begin + if(execute_BYPASSABLE_EXECUTE_STAGE)begin + if(_zz_179_)begin + decode_RS1 = _zz_36_; + end + end + end + end + + assign memory_SHIFT_RIGHT = execute_to_memory_SHIFT_RIGHT; + always @ (*) begin + _zz_37_ = memory_REGFILE_WRITE_DATA; + if(memory_arbitration_isValid)begin + case(memory_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_SLL_1 : begin + _zz_37_ = _zz_168_; + end + `ShiftCtrlEnum_defaultEncoding_SRL_1, `ShiftCtrlEnum_defaultEncoding_SRA_1 : begin + _zz_37_ = memory_SHIFT_RIGHT; + end + default : begin + end + endcase + end + if(_zz_276_)begin + _zz_37_ = ((memory_INSTRUCTION[13 : 12] == (2'b00)) ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_accumulator[63 : 32]); + end + if(_zz_277_)begin + _zz_37_ = memory_MulDivIterativePlugin_div_result; + end + end + + assign memory_SHIFT_CTRL = _zz_38_; + assign execute_SHIFT_CTRL = _zz_40_; + assign execute_SRC_LESS_UNSIGNED = decode_to_execute_SRC_LESS_UNSIGNED; + assign execute_SRC2_FORCE_ZERO = decode_to_execute_SRC2_FORCE_ZERO; + assign execute_SRC_USE_SUB_LESS = decode_to_execute_SRC_USE_SUB_LESS; + assign _zz_44_ = execute_PC; + assign execute_SRC2_CTRL = _zz_45_; + assign execute_SRC1_CTRL = _zz_47_; + assign decode_SRC_USE_SUB_LESS = _zz_60_; + assign decode_SRC_ADD_ZERO = _zz_67_; + assign execute_SRC_ADD_SUB = _zz_43_; + assign execute_SRC_LESS = _zz_41_; + assign execute_ALU_CTRL = _zz_50_; + assign execute_SRC2 = _zz_46_; + assign execute_SRC1 = _zz_48_; + assign execute_ALU_BITWISE_CTRL = _zz_52_; + assign _zz_53_ = writeBack_INSTRUCTION; + assign _zz_54_ = writeBack_REGFILE_WRITE_VALID; + always @ (*) begin + _zz_55_ = 1'b0; + if(lastStageRegFileWrite_valid)begin + _zz_55_ = 1'b1; + end + end + + assign decode_INSTRUCTION_ANTICIPATED = _zz_92_; + always @ (*) begin + decode_REGFILE_WRITE_VALID = _zz_83_; + if((decode_INSTRUCTION[11 : 7] == (5'b00000)))begin + decode_REGFILE_WRITE_VALID = 1'b0; + end + end + + assign decode_LEGAL_INSTRUCTION = _zz_85_; + assign decode_INSTRUCTION_READY = 1'b1; + assign writeBack_IS_SFENCE_VMA = memory_to_writeBack_IS_SFENCE_VMA; + assign writeBack_IS_DBUS_SHARING = memory_to_writeBack_IS_DBUS_SHARING; + assign memory_IS_DBUS_SHARING = execute_to_memory_IS_DBUS_SHARING; + always @ (*) begin + _zz_87_ = writeBack_REGFILE_WRITE_DATA; + if((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE))begin + _zz_87_ = writeBack_DBusCachedPlugin_rspFormated; + end + end + + assign writeBack_MEMORY_ADDRESS_LOW = memory_to_writeBack_MEMORY_ADDRESS_LOW; + assign writeBack_MEMORY_WR = memory_to_writeBack_MEMORY_WR; + assign writeBack_REGFILE_WRITE_DATA = memory_to_writeBack_REGFILE_WRITE_DATA; + assign writeBack_MEMORY_ENABLE = memory_to_writeBack_MEMORY_ENABLE; + assign memory_REGFILE_WRITE_DATA = execute_to_memory_REGFILE_WRITE_DATA; + assign memory_MEMORY_ENABLE = execute_to_memory_MEMORY_ENABLE; + assign execute_MEMORY_AMO = decode_to_execute_MEMORY_AMO; + assign execute_MEMORY_LRSC = decode_to_execute_MEMORY_LRSC; + assign execute_MEMORY_MANAGMENT = decode_to_execute_MEMORY_MANAGMENT; + assign execute_RS2 = decode_to_execute_RS2; + assign execute_MEMORY_WR = decode_to_execute_MEMORY_WR; + assign execute_SRC_ADD = _zz_42_; + assign execute_MEMORY_ENABLE = decode_to_execute_MEMORY_ENABLE; + assign execute_INSTRUCTION = decode_to_execute_INSTRUCTION; + assign decode_MEMORY_ENABLE = _zz_68_; + assign decode_FLUSH_ALL = _zz_77_; + always @ (*) begin + IBusCachedPlugin_rsp_issueDetected = _zz_89_; + if(_zz_278_)begin + IBusCachedPlugin_rsp_issueDetected = 1'b1; + end + end + + always @ (*) begin + _zz_89_ = _zz_90_; + if(_zz_279_)begin + _zz_89_ = 1'b1; + end + end + + always @ (*) begin + _zz_90_ = _zz_91_; + if(_zz_280_)begin + _zz_90_ = 1'b1; + end + end + + always @ (*) begin + _zz_91_ = 1'b0; + if(_zz_281_)begin + _zz_91_ = 1'b1; + end + end + + assign decode_INSTRUCTION = _zz_96_; + always @ (*) begin + _zz_93_ = memory_FORMAL_PC_NEXT; + if(BranchPlugin_jumpInterface_valid)begin + _zz_93_ = BranchPlugin_jumpInterface_payload; + end + end + + always @ (*) begin + _zz_94_ = decode_FORMAL_PC_NEXT; + if(IBusCachedPlugin_redoBranch_valid)begin + _zz_94_ = IBusCachedPlugin_redoBranch_payload; + end + end + + assign decode_PC = _zz_97_; + assign writeBack_PC = memory_to_writeBack_PC; + assign writeBack_INSTRUCTION = memory_to_writeBack_INSTRUCTION; + always @ (*) begin + decode_arbitration_haltItself = 1'b0; + if(((DBusCachedPlugin_mmuBus_busy && decode_arbitration_isValid) && decode_MEMORY_ENABLE))begin + decode_arbitration_haltItself = 1'b1; + end + end + + always @ (*) begin + decode_arbitration_haltByOther = 1'b0; + if(MmuPlugin_dBusAccess_cmd_valid)begin + decode_arbitration_haltByOther = 1'b1; + end + if((decode_arbitration_isValid && (_zz_169_ || _zz_170_)))begin + decode_arbitration_haltByOther = 1'b1; + end + if((CsrPlugin_interrupt_valid && CsrPlugin_allowInterrupts))begin + decode_arbitration_haltByOther = decode_arbitration_isValid; + end + if(({(writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),{(memory_arbitration_isValid && (memory_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),(execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET))}} != (3'b000)))begin + decode_arbitration_haltByOther = 1'b1; + end + end + + always @ (*) begin + decode_arbitration_removeIt = 1'b0; + if(_zz_282_)begin + decode_arbitration_removeIt = 1'b1; + end + if(decode_arbitration_isFlushed)begin + decode_arbitration_removeIt = 1'b1; + end + end + + assign decode_arbitration_flushIt = 1'b0; + always @ (*) begin + decode_arbitration_flushNext = 1'b0; + if(IBusCachedPlugin_redoBranch_valid)begin + decode_arbitration_flushNext = 1'b1; + end + if(_zz_282_)begin + decode_arbitration_flushNext = 1'b1; + end + end + + always @ (*) begin + execute_arbitration_haltItself = 1'b0; + if((_zz_244_ && (! dataCache_1__io_cpu_flush_ready)))begin + execute_arbitration_haltItself = 1'b1; + end + if(((dataCache_1__io_cpu_redo && execute_arbitration_isValid) && execute_MEMORY_ENABLE))begin + execute_arbitration_haltItself = 1'b1; + end + if(_zz_283_)begin + if((! execute_CsrPlugin_wfiWake))begin + execute_arbitration_haltItself = 1'b1; + end + end + if(_zz_271_)begin + if(execute_CsrPlugin_blockedBySideEffects)begin + execute_arbitration_haltItself = 1'b1; + end + end + end + + assign execute_arbitration_haltByOther = 1'b0; + always @ (*) begin + execute_arbitration_removeIt = 1'b0; + if(CsrPlugin_selfException_valid)begin + execute_arbitration_removeIt = 1'b1; + end + if(execute_arbitration_isFlushed)begin + execute_arbitration_removeIt = 1'b1; + end + end + + assign execute_arbitration_flushIt = 1'b0; + always @ (*) begin + execute_arbitration_flushNext = 1'b0; + if(CsrPlugin_selfException_valid)begin + execute_arbitration_flushNext = 1'b1; + end + end + + always @ (*) begin + memory_arbitration_haltItself = 1'b0; + if(_zz_276_)begin + if(_zz_284_)begin + memory_arbitration_haltItself = 1'b1; + end + end + if(_zz_277_)begin + if(_zz_285_)begin + memory_arbitration_haltItself = 1'b1; + end + end + end + + assign memory_arbitration_haltByOther = 1'b0; + always @ (*) begin + memory_arbitration_removeIt = 1'b0; + if(BranchPlugin_branchExceptionPort_valid)begin + memory_arbitration_removeIt = 1'b1; + end + if(memory_arbitration_isFlushed)begin + memory_arbitration_removeIt = 1'b1; + end + end + + assign memory_arbitration_flushIt = 1'b0; + always @ (*) begin + memory_arbitration_flushNext = 1'b0; + if(BranchPlugin_jumpInterface_valid)begin + memory_arbitration_flushNext = 1'b1; + end + if(BranchPlugin_branchExceptionPort_valid)begin + memory_arbitration_flushNext = 1'b1; + end + end + + always @ (*) begin + writeBack_arbitration_haltItself = 1'b0; + if(dataCache_1__io_cpu_writeBack_haltIt)begin + writeBack_arbitration_haltItself = 1'b1; + end + end + + assign writeBack_arbitration_haltByOther = 1'b0; + always @ (*) begin + writeBack_arbitration_removeIt = 1'b0; + if(DBusCachedPlugin_exceptionBus_valid)begin + writeBack_arbitration_removeIt = 1'b1; + end + if(writeBack_arbitration_isFlushed)begin + writeBack_arbitration_removeIt = 1'b1; + end + end + + always @ (*) begin + writeBack_arbitration_flushIt = 1'b0; + if(DBusCachedPlugin_redoBranch_valid)begin + writeBack_arbitration_flushIt = 1'b1; + end + end + + always @ (*) begin + writeBack_arbitration_flushNext = 1'b0; + if(DBusCachedPlugin_redoBranch_valid)begin + writeBack_arbitration_flushNext = 1'b1; + end + if(DBusCachedPlugin_exceptionBus_valid)begin + writeBack_arbitration_flushNext = 1'b1; + end + if(_zz_286_)begin + writeBack_arbitration_flushNext = 1'b1; + end + if(_zz_287_)begin + writeBack_arbitration_flushNext = 1'b1; + end + end + + assign lastStageInstruction = writeBack_INSTRUCTION; + assign lastStagePc = writeBack_PC; + assign lastStageIsValid = writeBack_arbitration_isValid; + assign lastStageIsFiring = writeBack_arbitration_isFiring; + always @ (*) begin + IBusCachedPlugin_fetcherHalt = 1'b0; + if(({CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValids_memory,{CsrPlugin_exceptionPortCtrl_exceptionValids_execute,CsrPlugin_exceptionPortCtrl_exceptionValids_decode}}} != (4'b0000)))begin + IBusCachedPlugin_fetcherHalt = 1'b1; + end + if(_zz_286_)begin + IBusCachedPlugin_fetcherHalt = 1'b1; + end + if(_zz_287_)begin + IBusCachedPlugin_fetcherHalt = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_fetcherflushIt = 1'b0; + if(({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,{execute_arbitration_flushNext,decode_arbitration_flushNext}}} != (4'b0000)))begin + IBusCachedPlugin_fetcherflushIt = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_incomingInstruction = 1'b0; + if(((IBusCachedPlugin_iBusRsp_stages_1_input_valid || IBusCachedPlugin_iBusRsp_stages_2_input_valid) || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid))begin + IBusCachedPlugin_incomingInstruction = 1'b1; + end + end + + always @ (*) begin + CsrPlugin_jumpInterface_valid = 1'b0; + if(_zz_286_)begin + CsrPlugin_jumpInterface_valid = 1'b1; + end + if(_zz_287_)begin + CsrPlugin_jumpInterface_valid = 1'b1; + end + end + + always @ (*) begin + CsrPlugin_jumpInterface_payload = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + if(_zz_286_)begin + CsrPlugin_jumpInterface_payload = {CsrPlugin_xtvec_base,(2'b00)}; + end + if(_zz_287_)begin + case(_zz_288_) + 2'b11 : begin + CsrPlugin_jumpInterface_payload = CsrPlugin_mepc; + end + 2'b01 : begin + CsrPlugin_jumpInterface_payload = CsrPlugin_sepc; + end + default : begin + end + endcase + end + end + + assign CsrPlugin_forceMachineWire = 1'b0; + assign CsrPlugin_allowInterrupts = 1'b1; + assign CsrPlugin_allowException = 1'b1; + assign IBusCachedPlugin_jump_pcLoad_valid = ({CsrPlugin_jumpInterface_valid,{BranchPlugin_jumpInterface_valid,{DBusCachedPlugin_redoBranch_valid,IBusCachedPlugin_redoBranch_valid}}} != (4'b0000)); + assign _zz_98_ = {IBusCachedPlugin_redoBranch_valid,{BranchPlugin_jumpInterface_valid,{CsrPlugin_jumpInterface_valid,DBusCachedPlugin_redoBranch_valid}}}; + assign _zz_99_ = (_zz_98_ & (~ _zz_330_)); + assign _zz_100_ = _zz_99_[3]; + assign _zz_101_ = (_zz_99_[1] || _zz_100_); + assign _zz_102_ = (_zz_99_[2] || _zz_100_); + assign IBusCachedPlugin_jump_pcLoad_payload = _zz_248_; + always @ (*) begin + IBusCachedPlugin_fetchPc_corrected = 1'b0; + if(IBusCachedPlugin_jump_pcLoad_valid)begin + IBusCachedPlugin_fetchPc_corrected = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b0; + if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin + IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_fetchPc_pc = (IBusCachedPlugin_fetchPc_pcReg + _zz_332_); + if(IBusCachedPlugin_jump_pcLoad_valid)begin + IBusCachedPlugin_fetchPc_pc = IBusCachedPlugin_jump_pcLoad_payload; + end + IBusCachedPlugin_fetchPc_pc[0] = 1'b0; + IBusCachedPlugin_fetchPc_pc[1] = 1'b0; + end + + assign IBusCachedPlugin_fetchPc_output_valid = ((! IBusCachedPlugin_fetcherHalt) && IBusCachedPlugin_fetchPc_booted); + assign IBusCachedPlugin_fetchPc_output_payload = IBusCachedPlugin_fetchPc_pc; + assign IBusCachedPlugin_iBusRsp_stages_0_input_valid = IBusCachedPlugin_fetchPc_output_valid; + assign IBusCachedPlugin_fetchPc_output_ready = IBusCachedPlugin_iBusRsp_stages_0_input_ready; + assign IBusCachedPlugin_iBusRsp_stages_0_input_payload = IBusCachedPlugin_fetchPc_output_payload; + assign IBusCachedPlugin_iBusRsp_stages_0_inputSample = 1'b1; + assign IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b0; + assign _zz_103_ = (! IBusCachedPlugin_iBusRsp_stages_0_halt); + assign IBusCachedPlugin_iBusRsp_stages_0_input_ready = (IBusCachedPlugin_iBusRsp_stages_0_output_ready && _zz_103_); + assign IBusCachedPlugin_iBusRsp_stages_0_output_valid = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && _zz_103_); + assign IBusCachedPlugin_iBusRsp_stages_0_output_payload = IBusCachedPlugin_iBusRsp_stages_0_input_payload; + always @ (*) begin + IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b0; + if(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt)begin + IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b1; + end + end + + assign _zz_104_ = (! IBusCachedPlugin_iBusRsp_stages_1_halt); + assign IBusCachedPlugin_iBusRsp_stages_1_input_ready = (IBusCachedPlugin_iBusRsp_stages_1_output_ready && _zz_104_); + assign IBusCachedPlugin_iBusRsp_stages_1_output_valid = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && _zz_104_); + assign IBusCachedPlugin_iBusRsp_stages_1_output_payload = IBusCachedPlugin_iBusRsp_stages_1_input_payload; + always @ (*) begin + IBusCachedPlugin_iBusRsp_stages_2_halt = 1'b0; + if(IBusCachedPlugin_cache_io_cpu_fetch_haltIt)begin + IBusCachedPlugin_iBusRsp_stages_2_halt = 1'b1; + end + end + + assign _zz_105_ = (! IBusCachedPlugin_iBusRsp_stages_2_halt); + assign IBusCachedPlugin_iBusRsp_stages_2_input_ready = (IBusCachedPlugin_iBusRsp_stages_2_output_ready && _zz_105_); + assign IBusCachedPlugin_iBusRsp_stages_2_output_valid = (IBusCachedPlugin_iBusRsp_stages_2_input_valid && _zz_105_); + assign IBusCachedPlugin_iBusRsp_stages_2_output_payload = IBusCachedPlugin_iBusRsp_stages_2_input_payload; + always @ (*) begin + IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b0; + if((IBusCachedPlugin_rsp_issueDetected || IBusCachedPlugin_rsp_iBusRspOutputHalt))begin + IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b1; + end + end + + assign _zz_106_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt); + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready && _zz_106_); + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && _zz_106_); + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; + assign IBusCachedPlugin_iBusRsp_stages_0_output_ready = _zz_107_; + assign _zz_107_ = ((1'b0 && (! _zz_108_)) || IBusCachedPlugin_iBusRsp_stages_1_input_ready); + assign _zz_108_ = _zz_109_; + assign IBusCachedPlugin_iBusRsp_stages_1_input_valid = _zz_108_; + assign IBusCachedPlugin_iBusRsp_stages_1_input_payload = IBusCachedPlugin_fetchPc_pcReg; + assign IBusCachedPlugin_iBusRsp_stages_1_output_ready = ((1'b0 && (! _zz_110_)) || IBusCachedPlugin_iBusRsp_stages_2_input_ready); + assign _zz_110_ = _zz_111_; + assign IBusCachedPlugin_iBusRsp_stages_2_input_valid = _zz_110_; + assign IBusCachedPlugin_iBusRsp_stages_2_input_payload = _zz_112_; + assign IBusCachedPlugin_iBusRsp_stages_2_output_ready = ((1'b0 && (! _zz_113_)) || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); + assign _zz_113_ = _zz_114_; + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid = _zz_113_; + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload = _zz_115_; + always @ (*) begin + IBusCachedPlugin_iBusRsp_readyForError = 1'b1; + if((! IBusCachedPlugin_pcValids_0))begin + IBusCachedPlugin_iBusRsp_readyForError = 1'b0; + end + end + + assign IBusCachedPlugin_pcValids_0 = IBusCachedPlugin_injector_nextPcCalc_valids_2; + assign IBusCachedPlugin_pcValids_1 = IBusCachedPlugin_injector_nextPcCalc_valids_3; + assign IBusCachedPlugin_pcValids_2 = IBusCachedPlugin_injector_nextPcCalc_valids_4; + assign IBusCachedPlugin_pcValids_3 = IBusCachedPlugin_injector_nextPcCalc_valids_5; + assign IBusCachedPlugin_iBusRsp_decodeInput_ready = (! decode_arbitration_isStuck); + assign decode_arbitration_isValid = (IBusCachedPlugin_iBusRsp_decodeInput_valid && (! IBusCachedPlugin_injector_decodeRemoved)); + assign _zz_97_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; + assign _zz_96_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; + assign _zz_95_ = (decode_PC + (32'b00000000000000000000000000000100)); + assign iBus_cmd_valid = IBusCachedPlugin_cache_io_mem_cmd_valid; + always @ (*) begin + iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; + iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; + end + + assign iBus_cmd_payload_size = IBusCachedPlugin_cache_io_mem_cmd_payload_size; + assign IBusCachedPlugin_s0_tightlyCoupledHit = 1'b0; + assign _zz_221_ = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && (! IBusCachedPlugin_s0_tightlyCoupledHit)); + assign _zz_224_ = (32'b00000000000000000000000000000000); + assign _zz_222_ = (IBusCachedPlugin_iBusRsp_stages_2_input_valid && (! IBusCachedPlugin_s1_tightlyCoupledHit)); + assign _zz_223_ = (! IBusCachedPlugin_iBusRsp_stages_2_input_ready); + assign _zz_225_ = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && (! IBusCachedPlugin_s2_tightlyCoupledHit)); + assign _zz_226_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); + assign _zz_227_ = (CsrPlugin_privilege == (2'b00)); + assign _zz_92_ = (decode_arbitration_isStuck ? decode_INSTRUCTION : IBusCachedPlugin_cache_io_cpu_fetch_data); + assign IBusCachedPlugin_rsp_iBusRspOutputHalt = 1'b0; + always @ (*) begin + IBusCachedPlugin_rsp_redoFetch = 1'b0; + if(_zz_281_)begin + IBusCachedPlugin_rsp_redoFetch = 1'b1; + end + if(_zz_279_)begin + IBusCachedPlugin_rsp_redoFetch = 1'b1; + end + if(_zz_289_)begin + IBusCachedPlugin_rsp_redoFetch = 1'b0; + end + end + + always @ (*) begin + _zz_228_ = (IBusCachedPlugin_rsp_redoFetch && (! IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling)); + if(_zz_279_)begin + _zz_228_ = 1'b1; + end + if(_zz_289_)begin + _zz_228_ = 1'b0; + end + end + + always @ (*) begin + IBusCachedPlugin_decodeExceptionPort_valid = 1'b0; + if(_zz_280_)begin + IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; + end + if(_zz_278_)begin + IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; + end + end + + always @ (*) begin + IBusCachedPlugin_decodeExceptionPort_payload_code = (4'bxxxx); + if(_zz_280_)begin + IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b1100); + end + if(_zz_278_)begin + IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b0001); + end + end + + assign IBusCachedPlugin_decodeExceptionPort_payload_badAddr = {IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload[31 : 2],(2'b00)}; + assign IBusCachedPlugin_redoBranch_valid = IBusCachedPlugin_rsp_redoFetch; + assign IBusCachedPlugin_redoBranch_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; + assign IBusCachedPlugin_iBusRsp_decodeInput_valid = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready = IBusCachedPlugin_iBusRsp_decodeInput_ready; + assign IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst = IBusCachedPlugin_cache_io_cpu_decode_data; + assign IBusCachedPlugin_iBusRsp_decodeInput_payload_pc = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; + assign IBusCachedPlugin_mmuBus_cmd_isValid = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; + assign IBusCachedPlugin_mmuBus_cmd_virtualAddress = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; + assign IBusCachedPlugin_mmuBus_cmd_bypassTranslation = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; + assign IBusCachedPlugin_mmuBus_end = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; + assign _zz_220_ = (decode_arbitration_isValid && decode_FLUSH_ALL); + assign dataCache_1__io_mem_cmd_s2mPipe_valid = (dataCache_1__io_mem_cmd_valid || _zz_117_); + assign _zz_245_ = (! _zz_117_); + assign dataCache_1__io_mem_cmd_s2mPipe_payload_wr = (_zz_117_ ? _zz_118_ : dataCache_1__io_mem_cmd_payload_wr); + assign dataCache_1__io_mem_cmd_s2mPipe_payload_address = (_zz_117_ ? _zz_119_ : dataCache_1__io_mem_cmd_payload_address); + assign dataCache_1__io_mem_cmd_s2mPipe_payload_data = (_zz_117_ ? _zz_120_ : dataCache_1__io_mem_cmd_payload_data); + assign dataCache_1__io_mem_cmd_s2mPipe_payload_mask = (_zz_117_ ? _zz_121_ : dataCache_1__io_mem_cmd_payload_mask); + assign dataCache_1__io_mem_cmd_s2mPipe_payload_length = (_zz_117_ ? _zz_122_ : dataCache_1__io_mem_cmd_payload_length); + assign dataCache_1__io_mem_cmd_s2mPipe_payload_last = (_zz_117_ ? _zz_123_ : dataCache_1__io_mem_cmd_payload_last); + assign dataCache_1__io_mem_cmd_s2mPipe_ready = ((1'b1 && (! dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_valid)) || dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_ready); + assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_valid = _zz_124_; + assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_wr = _zz_125_; + assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_address = _zz_126_; + assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_data = _zz_127_; + assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_mask = _zz_128_; + assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_length = _zz_129_; + assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_last = _zz_130_; + assign dBus_cmd_valid = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_valid; + assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_ready = dBus_cmd_ready; + assign dBus_cmd_payload_wr = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_wr; + assign dBus_cmd_payload_address = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_address; + assign dBus_cmd_payload_data = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_data; + assign dBus_cmd_payload_mask = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_mask; + assign dBus_cmd_payload_length = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_length; + assign dBus_cmd_payload_last = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_last; + assign execute_DBusCachedPlugin_size = execute_INSTRUCTION[13 : 12]; + always @ (*) begin + _zz_229_ = (execute_arbitration_isValid && execute_MEMORY_ENABLE); + if(MmuPlugin_dBusAccess_cmd_valid)begin + if(_zz_290_)begin + if(_zz_291_)begin + _zz_229_ = 1'b1; + end + end + end + end + + always @ (*) begin + _zz_230_ = execute_SRC_ADD; + if(MmuPlugin_dBusAccess_cmd_valid)begin + if(_zz_290_)begin + _zz_230_ = MmuPlugin_dBusAccess_cmd_payload_address; + end + end + end + + always @ (*) begin + _zz_231_ = execute_MEMORY_WR; + if(MmuPlugin_dBusAccess_cmd_valid)begin + if(_zz_290_)begin + _zz_231_ = MmuPlugin_dBusAccess_cmd_payload_write; + end + end + end + + always @ (*) begin + case(execute_DBusCachedPlugin_size) + 2'b00 : begin + _zz_132_ = {{{execute_RS2[7 : 0],execute_RS2[7 : 0]},execute_RS2[7 : 0]},execute_RS2[7 : 0]}; + end + 2'b01 : begin + _zz_132_ = {execute_RS2[15 : 0],execute_RS2[15 : 0]}; + end + default : begin + _zz_132_ = execute_RS2[31 : 0]; + end + endcase + end + + always @ (*) begin + _zz_232_ = _zz_132_; + if(MmuPlugin_dBusAccess_cmd_valid)begin + if(_zz_290_)begin + _zz_232_ = MmuPlugin_dBusAccess_cmd_payload_data; + end + end + end + + always @ (*) begin + _zz_233_ = execute_DBusCachedPlugin_size; + if(MmuPlugin_dBusAccess_cmd_valid)begin + if(_zz_290_)begin + _zz_233_ = MmuPlugin_dBusAccess_cmd_payload_size; + end + end + end + + assign _zz_244_ = (execute_arbitration_isValid && execute_MEMORY_MANAGMENT); + always @ (*) begin + _zz_234_ = 1'b0; + if(execute_MEMORY_LRSC)begin + _zz_234_ = 1'b1; + end + if(MmuPlugin_dBusAccess_cmd_valid)begin + if(_zz_290_)begin + _zz_234_ = 1'b0; + end + end + end + + always @ (*) begin + _zz_235_ = execute_MEMORY_AMO; + if(MmuPlugin_dBusAccess_cmd_valid)begin + if(_zz_290_)begin + _zz_235_ = 1'b0; + end + end + end + + assign _zz_237_ = execute_INSTRUCTION[31 : 29]; + assign _zz_236_ = execute_INSTRUCTION[27]; + assign _zz_88_ = _zz_230_[1 : 0]; + always @ (*) begin + _zz_238_ = (memory_arbitration_isValid && memory_MEMORY_ENABLE); + if(memory_IS_DBUS_SHARING)begin + _zz_238_ = 1'b1; + end + end + + assign _zz_239_ = memory_REGFILE_WRITE_DATA; + assign DBusCachedPlugin_mmuBus_cmd_isValid = dataCache_1__io_cpu_memory_mmuBus_cmd_isValid; + assign DBusCachedPlugin_mmuBus_cmd_virtualAddress = dataCache_1__io_cpu_memory_mmuBus_cmd_virtualAddress; + always @ (*) begin + DBusCachedPlugin_mmuBus_cmd_bypassTranslation = dataCache_1__io_cpu_memory_mmuBus_cmd_bypassTranslation; + if(memory_IS_DBUS_SHARING)begin + DBusCachedPlugin_mmuBus_cmd_bypassTranslation = 1'b1; + end + end + + always @ (*) begin + _zz_240_ = DBusCachedPlugin_mmuBus_rsp_isIoAccess; + if((1'b0 && (! dataCache_1__io_cpu_memory_isWrite)))begin + _zz_240_ = 1'b1; + end + end + + assign DBusCachedPlugin_mmuBus_end = dataCache_1__io_cpu_memory_mmuBus_end; + always @ (*) begin + _zz_241_ = (writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE); + if(writeBack_IS_DBUS_SHARING)begin + _zz_241_ = 1'b1; + end + end + + assign _zz_242_ = (CsrPlugin_privilege == (2'b00)); + assign _zz_243_ = writeBack_REGFILE_WRITE_DATA; + always @ (*) begin + DBusCachedPlugin_redoBranch_valid = 1'b0; + if(_zz_292_)begin + if(dataCache_1__io_cpu_redo)begin + DBusCachedPlugin_redoBranch_valid = 1'b1; + end + end + end + + assign DBusCachedPlugin_redoBranch_payload = writeBack_PC; + always @ (*) begin + DBusCachedPlugin_exceptionBus_valid = 1'b0; + if(_zz_292_)begin + if(dataCache_1__io_cpu_writeBack_accessError)begin + DBusCachedPlugin_exceptionBus_valid = 1'b1; + end + if(dataCache_1__io_cpu_writeBack_unalignedAccess)begin + DBusCachedPlugin_exceptionBus_valid = 1'b1; + end + if(dataCache_1__io_cpu_writeBack_mmuException)begin + DBusCachedPlugin_exceptionBus_valid = 1'b1; + end + if(dataCache_1__io_cpu_redo)begin + DBusCachedPlugin_exceptionBus_valid = 1'b0; + end + end + end + + assign DBusCachedPlugin_exceptionBus_payload_badAddr = writeBack_REGFILE_WRITE_DATA; + always @ (*) begin + DBusCachedPlugin_exceptionBus_payload_code = (4'bxxxx); + if(_zz_292_)begin + if(dataCache_1__io_cpu_writeBack_accessError)begin + DBusCachedPlugin_exceptionBus_payload_code = {1'd0, _zz_333_}; + end + if(dataCache_1__io_cpu_writeBack_unalignedAccess)begin + DBusCachedPlugin_exceptionBus_payload_code = {1'd0, _zz_334_}; + end + if(dataCache_1__io_cpu_writeBack_mmuException)begin + DBusCachedPlugin_exceptionBus_payload_code = (writeBack_MEMORY_WR ? (4'b1111) : (4'b1101)); + end + end + end + + always @ (*) begin + writeBack_DBusCachedPlugin_rspShifted = dataCache_1__io_cpu_writeBack_data; + case(writeBack_MEMORY_ADDRESS_LOW) + 2'b01 : begin + writeBack_DBusCachedPlugin_rspShifted[7 : 0] = dataCache_1__io_cpu_writeBack_data[15 : 8]; + end + 2'b10 : begin + writeBack_DBusCachedPlugin_rspShifted[15 : 0] = dataCache_1__io_cpu_writeBack_data[31 : 16]; + end + 2'b11 : begin + writeBack_DBusCachedPlugin_rspShifted[7 : 0] = dataCache_1__io_cpu_writeBack_data[31 : 24]; + end + default : begin + end + endcase + end + + assign _zz_133_ = (writeBack_DBusCachedPlugin_rspShifted[7] && (! writeBack_INSTRUCTION[14])); + always @ (*) begin + _zz_134_[31] = _zz_133_; + _zz_134_[30] = _zz_133_; + _zz_134_[29] = _zz_133_; + _zz_134_[28] = _zz_133_; + _zz_134_[27] = _zz_133_; + _zz_134_[26] = _zz_133_; + _zz_134_[25] = _zz_133_; + _zz_134_[24] = _zz_133_; + _zz_134_[23] = _zz_133_; + _zz_134_[22] = _zz_133_; + _zz_134_[21] = _zz_133_; + _zz_134_[20] = _zz_133_; + _zz_134_[19] = _zz_133_; + _zz_134_[18] = _zz_133_; + _zz_134_[17] = _zz_133_; + _zz_134_[16] = _zz_133_; + _zz_134_[15] = _zz_133_; + _zz_134_[14] = _zz_133_; + _zz_134_[13] = _zz_133_; + _zz_134_[12] = _zz_133_; + _zz_134_[11] = _zz_133_; + _zz_134_[10] = _zz_133_; + _zz_134_[9] = _zz_133_; + _zz_134_[8] = _zz_133_; + _zz_134_[7 : 0] = writeBack_DBusCachedPlugin_rspShifted[7 : 0]; + end + + assign _zz_135_ = (writeBack_DBusCachedPlugin_rspShifted[15] && (! writeBack_INSTRUCTION[14])); + always @ (*) begin + _zz_136_[31] = _zz_135_; + _zz_136_[30] = _zz_135_; + _zz_136_[29] = _zz_135_; + _zz_136_[28] = _zz_135_; + _zz_136_[27] = _zz_135_; + _zz_136_[26] = _zz_135_; + _zz_136_[25] = _zz_135_; + _zz_136_[24] = _zz_135_; + _zz_136_[23] = _zz_135_; + _zz_136_[22] = _zz_135_; + _zz_136_[21] = _zz_135_; + _zz_136_[20] = _zz_135_; + _zz_136_[19] = _zz_135_; + _zz_136_[18] = _zz_135_; + _zz_136_[17] = _zz_135_; + _zz_136_[16] = _zz_135_; + _zz_136_[15 : 0] = writeBack_DBusCachedPlugin_rspShifted[15 : 0]; + end + + always @ (*) begin + case(_zz_328_) + 2'b00 : begin + writeBack_DBusCachedPlugin_rspFormated = _zz_134_; + end + 2'b01 : begin + writeBack_DBusCachedPlugin_rspFormated = _zz_136_; + end + default : begin + writeBack_DBusCachedPlugin_rspFormated = writeBack_DBusCachedPlugin_rspShifted; + end + endcase + end + + always @ (*) begin + MmuPlugin_dBusAccess_cmd_ready = 1'b0; + if(MmuPlugin_dBusAccess_cmd_valid)begin + if(_zz_290_)begin + if(_zz_291_)begin + MmuPlugin_dBusAccess_cmd_ready = (! execute_arbitration_isStuck); + end + end + end + end + + always @ (*) begin + DBusCachedPlugin_forceDatapath = 1'b0; + if(MmuPlugin_dBusAccess_cmd_valid)begin + if(_zz_290_)begin + DBusCachedPlugin_forceDatapath = 1'b1; + end + end + end + + assign _zz_86_ = (MmuPlugin_dBusAccess_cmd_valid && MmuPlugin_dBusAccess_cmd_ready); + assign MmuPlugin_dBusAccess_rsp_valid = ((writeBack_IS_DBUS_SHARING && (! dataCache_1__io_cpu_writeBack_isWrite)) && (dataCache_1__io_cpu_redo || (! dataCache_1__io_cpu_writeBack_haltIt))); + assign MmuPlugin_dBusAccess_rsp_payload_data = dataCache_1__io_cpu_writeBack_data; + assign MmuPlugin_dBusAccess_rsp_payload_error = (dataCache_1__io_cpu_writeBack_unalignedAccess || dataCache_1__io_cpu_writeBack_accessError); + assign MmuPlugin_dBusAccess_rsp_payload_redo = dataCache_1__io_cpu_redo; + assign MmuPlugin_ports_0_cacheHits_0 = ((MmuPlugin_ports_0_cache_0_valid && (MmuPlugin_ports_0_cache_0_virtualAddress_1 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_0_cache_0_superPage || (MmuPlugin_ports_0_cache_0_virtualAddress_0 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); + assign MmuPlugin_ports_0_cacheHits_1 = ((MmuPlugin_ports_0_cache_1_valid && (MmuPlugin_ports_0_cache_1_virtualAddress_1 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_0_cache_1_superPage || (MmuPlugin_ports_0_cache_1_virtualAddress_0 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); + assign MmuPlugin_ports_0_cacheHits_2 = ((MmuPlugin_ports_0_cache_2_valid && (MmuPlugin_ports_0_cache_2_virtualAddress_1 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_0_cache_2_superPage || (MmuPlugin_ports_0_cache_2_virtualAddress_0 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); + assign MmuPlugin_ports_0_cacheHits_3 = ((MmuPlugin_ports_0_cache_3_valid && (MmuPlugin_ports_0_cache_3_virtualAddress_1 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_0_cache_3_superPage || (MmuPlugin_ports_0_cache_3_virtualAddress_0 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); + assign MmuPlugin_ports_0_cacheHit = ({MmuPlugin_ports_0_cacheHits_3,{MmuPlugin_ports_0_cacheHits_2,{MmuPlugin_ports_0_cacheHits_1,MmuPlugin_ports_0_cacheHits_0}}} != (4'b0000)); + assign _zz_137_ = (MmuPlugin_ports_0_cacheHits_1 || MmuPlugin_ports_0_cacheHits_3); + assign _zz_138_ = (MmuPlugin_ports_0_cacheHits_2 || MmuPlugin_ports_0_cacheHits_3); + assign _zz_139_ = {_zz_138_,_zz_137_}; + assign MmuPlugin_ports_0_cacheLine_valid = _zz_249_; + assign MmuPlugin_ports_0_cacheLine_exception = _zz_250_; + assign MmuPlugin_ports_0_cacheLine_superPage = _zz_251_; + assign MmuPlugin_ports_0_cacheLine_virtualAddress_0 = _zz_252_; + assign MmuPlugin_ports_0_cacheLine_virtualAddress_1 = _zz_253_; + assign MmuPlugin_ports_0_cacheLine_physicalAddress_0 = _zz_254_; + assign MmuPlugin_ports_0_cacheLine_physicalAddress_1 = _zz_255_; + assign MmuPlugin_ports_0_cacheLine_allowRead = _zz_256_; + assign MmuPlugin_ports_0_cacheLine_allowWrite = _zz_257_; + assign MmuPlugin_ports_0_cacheLine_allowExecute = _zz_258_; + assign MmuPlugin_ports_0_cacheLine_allowUser = _zz_259_; + always @ (*) begin + MmuPlugin_ports_0_entryToReplace_willIncrement = 1'b0; + if(_zz_293_)begin + if(_zz_294_)begin + MmuPlugin_ports_0_entryToReplace_willIncrement = 1'b1; + end + end + end + + assign MmuPlugin_ports_0_entryToReplace_willClear = 1'b0; + assign MmuPlugin_ports_0_entryToReplace_willOverflowIfInc = (MmuPlugin_ports_0_entryToReplace_value == (2'b11)); + assign MmuPlugin_ports_0_entryToReplace_willOverflow = (MmuPlugin_ports_0_entryToReplace_willOverflowIfInc && MmuPlugin_ports_0_entryToReplace_willIncrement); + always @ (*) begin + MmuPlugin_ports_0_entryToReplace_valueNext = (MmuPlugin_ports_0_entryToReplace_value + _zz_336_); + if(MmuPlugin_ports_0_entryToReplace_willClear)begin + MmuPlugin_ports_0_entryToReplace_valueNext = (2'b00); + end + end + + always @ (*) begin + MmuPlugin_ports_0_requireMmuLockup = ((1'b1 && (! DBusCachedPlugin_mmuBus_cmd_bypassTranslation)) && MmuPlugin_satp_mode); + if(((! MmuPlugin_status_mprv) && (CsrPlugin_privilege == (2'b11))))begin + MmuPlugin_ports_0_requireMmuLockup = 1'b0; + end + if((CsrPlugin_privilege == (2'b11)))begin + if(((! MmuPlugin_status_mprv) || (CsrPlugin_mstatus_MPP == (2'b11))))begin + MmuPlugin_ports_0_requireMmuLockup = 1'b0; + end + end + end + + always @ (*) begin + if(MmuPlugin_ports_0_requireMmuLockup)begin + DBusCachedPlugin_mmuBus_rsp_physicalAddress = {{MmuPlugin_ports_0_cacheLine_physicalAddress_1,(MmuPlugin_ports_0_cacheLine_superPage ? DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12] : MmuPlugin_ports_0_cacheLine_physicalAddress_0)},DBusCachedPlugin_mmuBus_cmd_virtualAddress[11 : 0]}; + end else begin + DBusCachedPlugin_mmuBus_rsp_physicalAddress = DBusCachedPlugin_mmuBus_cmd_virtualAddress; + end + end + + always @ (*) begin + if(MmuPlugin_ports_0_requireMmuLockup)begin + DBusCachedPlugin_mmuBus_rsp_allowRead = (MmuPlugin_ports_0_cacheLine_allowRead || (MmuPlugin_status_mxr && MmuPlugin_ports_0_cacheLine_allowExecute)); + end else begin + DBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1; + end + end + + always @ (*) begin + if(MmuPlugin_ports_0_requireMmuLockup)begin + DBusCachedPlugin_mmuBus_rsp_allowWrite = MmuPlugin_ports_0_cacheLine_allowWrite; + end else begin + DBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1; + end + end + + always @ (*) begin + if(MmuPlugin_ports_0_requireMmuLockup)begin + DBusCachedPlugin_mmuBus_rsp_allowExecute = MmuPlugin_ports_0_cacheLine_allowExecute; + end else begin + DBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1; + end + end + + always @ (*) begin + if(MmuPlugin_ports_0_requireMmuLockup)begin + DBusCachedPlugin_mmuBus_rsp_exception = (MmuPlugin_ports_0_cacheHit && ((MmuPlugin_ports_0_cacheLine_exception || ((MmuPlugin_ports_0_cacheLine_allowUser && (CsrPlugin_privilege == (2'b01))) && (! MmuPlugin_status_sum))) || ((! MmuPlugin_ports_0_cacheLine_allowUser) && (CsrPlugin_privilege == (2'b00))))); + end else begin + DBusCachedPlugin_mmuBus_rsp_exception = 1'b0; + end + end + + always @ (*) begin + if(MmuPlugin_ports_0_requireMmuLockup)begin + DBusCachedPlugin_mmuBus_rsp_refilling = (! MmuPlugin_ports_0_cacheHit); + end else begin + DBusCachedPlugin_mmuBus_rsp_refilling = 1'b0; + end + end + + assign DBusCachedPlugin_mmuBus_rsp_isIoAccess = (((DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1011)) || (DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1110))) || (DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1111))); + assign MmuPlugin_ports_1_cacheHits_0 = ((MmuPlugin_ports_1_cache_0_valid && (MmuPlugin_ports_1_cache_0_virtualAddress_1 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_1_cache_0_superPage || (MmuPlugin_ports_1_cache_0_virtualAddress_0 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); + assign MmuPlugin_ports_1_cacheHits_1 = ((MmuPlugin_ports_1_cache_1_valid && (MmuPlugin_ports_1_cache_1_virtualAddress_1 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_1_cache_1_superPage || (MmuPlugin_ports_1_cache_1_virtualAddress_0 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); + assign MmuPlugin_ports_1_cacheHits_2 = ((MmuPlugin_ports_1_cache_2_valid && (MmuPlugin_ports_1_cache_2_virtualAddress_1 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_1_cache_2_superPage || (MmuPlugin_ports_1_cache_2_virtualAddress_0 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); + assign MmuPlugin_ports_1_cacheHits_3 = ((MmuPlugin_ports_1_cache_3_valid && (MmuPlugin_ports_1_cache_3_virtualAddress_1 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_1_cache_3_superPage || (MmuPlugin_ports_1_cache_3_virtualAddress_0 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); + assign MmuPlugin_ports_1_cacheHit = ({MmuPlugin_ports_1_cacheHits_3,{MmuPlugin_ports_1_cacheHits_2,{MmuPlugin_ports_1_cacheHits_1,MmuPlugin_ports_1_cacheHits_0}}} != (4'b0000)); + assign _zz_140_ = (MmuPlugin_ports_1_cacheHits_1 || MmuPlugin_ports_1_cacheHits_3); + assign _zz_141_ = (MmuPlugin_ports_1_cacheHits_2 || MmuPlugin_ports_1_cacheHits_3); + assign _zz_142_ = {_zz_141_,_zz_140_}; + assign MmuPlugin_ports_1_cacheLine_valid = _zz_260_; + assign MmuPlugin_ports_1_cacheLine_exception = _zz_261_; + assign MmuPlugin_ports_1_cacheLine_superPage = _zz_262_; + assign MmuPlugin_ports_1_cacheLine_virtualAddress_0 = _zz_263_; + assign MmuPlugin_ports_1_cacheLine_virtualAddress_1 = _zz_264_; + assign MmuPlugin_ports_1_cacheLine_physicalAddress_0 = _zz_265_; + assign MmuPlugin_ports_1_cacheLine_physicalAddress_1 = _zz_266_; + assign MmuPlugin_ports_1_cacheLine_allowRead = _zz_267_; + assign MmuPlugin_ports_1_cacheLine_allowWrite = _zz_268_; + assign MmuPlugin_ports_1_cacheLine_allowExecute = _zz_269_; + assign MmuPlugin_ports_1_cacheLine_allowUser = _zz_270_; + always @ (*) begin + MmuPlugin_ports_1_entryToReplace_willIncrement = 1'b0; + if(_zz_293_)begin + if(_zz_295_)begin + MmuPlugin_ports_1_entryToReplace_willIncrement = 1'b1; + end + end + end + + assign MmuPlugin_ports_1_entryToReplace_willClear = 1'b0; + assign MmuPlugin_ports_1_entryToReplace_willOverflowIfInc = (MmuPlugin_ports_1_entryToReplace_value == (2'b11)); + assign MmuPlugin_ports_1_entryToReplace_willOverflow = (MmuPlugin_ports_1_entryToReplace_willOverflowIfInc && MmuPlugin_ports_1_entryToReplace_willIncrement); + always @ (*) begin + MmuPlugin_ports_1_entryToReplace_valueNext = (MmuPlugin_ports_1_entryToReplace_value + _zz_338_); + if(MmuPlugin_ports_1_entryToReplace_willClear)begin + MmuPlugin_ports_1_entryToReplace_valueNext = (2'b00); + end + end + + always @ (*) begin + MmuPlugin_ports_1_requireMmuLockup = ((1'b1 && (! IBusCachedPlugin_mmuBus_cmd_bypassTranslation)) && MmuPlugin_satp_mode); + if(((! MmuPlugin_status_mprv) && (CsrPlugin_privilege == (2'b11))))begin + MmuPlugin_ports_1_requireMmuLockup = 1'b0; + end + if((CsrPlugin_privilege == (2'b11)))begin + MmuPlugin_ports_1_requireMmuLockup = 1'b0; + end + end + + always @ (*) begin + if(MmuPlugin_ports_1_requireMmuLockup)begin + IBusCachedPlugin_mmuBus_rsp_physicalAddress = {{MmuPlugin_ports_1_cacheLine_physicalAddress_1,(MmuPlugin_ports_1_cacheLine_superPage ? IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12] : MmuPlugin_ports_1_cacheLine_physicalAddress_0)},IBusCachedPlugin_mmuBus_cmd_virtualAddress[11 : 0]}; + end else begin + IBusCachedPlugin_mmuBus_rsp_physicalAddress = IBusCachedPlugin_mmuBus_cmd_virtualAddress; + end + end + + always @ (*) begin + if(MmuPlugin_ports_1_requireMmuLockup)begin + IBusCachedPlugin_mmuBus_rsp_allowRead = (MmuPlugin_ports_1_cacheLine_allowRead || (MmuPlugin_status_mxr && MmuPlugin_ports_1_cacheLine_allowExecute)); + end else begin + IBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1; + end + end + + always @ (*) begin + if(MmuPlugin_ports_1_requireMmuLockup)begin + IBusCachedPlugin_mmuBus_rsp_allowWrite = MmuPlugin_ports_1_cacheLine_allowWrite; + end else begin + IBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1; + end + end + + always @ (*) begin + if(MmuPlugin_ports_1_requireMmuLockup)begin + IBusCachedPlugin_mmuBus_rsp_allowExecute = MmuPlugin_ports_1_cacheLine_allowExecute; + end else begin + IBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1; + end + end + + always @ (*) begin + if(MmuPlugin_ports_1_requireMmuLockup)begin + IBusCachedPlugin_mmuBus_rsp_exception = (MmuPlugin_ports_1_cacheHit && ((MmuPlugin_ports_1_cacheLine_exception || ((MmuPlugin_ports_1_cacheLine_allowUser && (CsrPlugin_privilege == (2'b01))) && (! MmuPlugin_status_sum))) || ((! MmuPlugin_ports_1_cacheLine_allowUser) && (CsrPlugin_privilege == (2'b00))))); + end else begin + IBusCachedPlugin_mmuBus_rsp_exception = 1'b0; + end + end + + always @ (*) begin + if(MmuPlugin_ports_1_requireMmuLockup)begin + IBusCachedPlugin_mmuBus_rsp_refilling = (! MmuPlugin_ports_1_cacheHit); + end else begin + IBusCachedPlugin_mmuBus_rsp_refilling = 1'b0; + end + end + + assign IBusCachedPlugin_mmuBus_rsp_isIoAccess = (((IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1011)) || (IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1110))) || (IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1111))); + assign MmuPlugin_shared_dBusRsp_pte_V = _zz_339_[0]; + assign MmuPlugin_shared_dBusRsp_pte_R = _zz_340_[0]; + assign MmuPlugin_shared_dBusRsp_pte_W = _zz_341_[0]; + assign MmuPlugin_shared_dBusRsp_pte_X = _zz_342_[0]; + assign MmuPlugin_shared_dBusRsp_pte_U = _zz_343_[0]; + assign MmuPlugin_shared_dBusRsp_pte_G = _zz_344_[0]; + assign MmuPlugin_shared_dBusRsp_pte_A = _zz_345_[0]; + assign MmuPlugin_shared_dBusRsp_pte_D = _zz_346_[0]; + assign MmuPlugin_shared_dBusRsp_pte_RSW = MmuPlugin_dBusAccess_rsp_payload_data[9 : 8]; + assign MmuPlugin_shared_dBusRsp_pte_PPN0 = MmuPlugin_dBusAccess_rsp_payload_data[19 : 10]; + assign MmuPlugin_shared_dBusRsp_pte_PPN1 = MmuPlugin_dBusAccess_rsp_payload_data[31 : 20]; + assign MmuPlugin_shared_dBusRsp_exception = (((! MmuPlugin_shared_dBusRsp_pte_V) || ((! MmuPlugin_shared_dBusRsp_pte_R) && MmuPlugin_shared_dBusRsp_pte_W)) || MmuPlugin_dBusAccess_rsp_payload_error); + assign MmuPlugin_shared_dBusRsp_leaf = (MmuPlugin_shared_dBusRsp_pte_R || MmuPlugin_shared_dBusRsp_pte_X); + always @ (*) begin + MmuPlugin_dBusAccess_cmd_valid = 1'b0; + case(MmuPlugin_shared_state_1_) + `MmuPlugin_shared_State_defaultEncoding_IDLE : begin + end + `MmuPlugin_shared_State_defaultEncoding_L1_CMD : begin + MmuPlugin_dBusAccess_cmd_valid = 1'b1; + end + `MmuPlugin_shared_State_defaultEncoding_L1_RSP : begin + end + `MmuPlugin_shared_State_defaultEncoding_L0_CMD : begin + MmuPlugin_dBusAccess_cmd_valid = 1'b1; + end + default : begin + end + endcase + end + + assign MmuPlugin_dBusAccess_cmd_payload_write = 1'b0; + assign MmuPlugin_dBusAccess_cmd_payload_size = (2'b10); + always @ (*) begin + MmuPlugin_dBusAccess_cmd_payload_address = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + case(MmuPlugin_shared_state_1_) + `MmuPlugin_shared_State_defaultEncoding_IDLE : begin + end + `MmuPlugin_shared_State_defaultEncoding_L1_CMD : begin + MmuPlugin_dBusAccess_cmd_payload_address = {{MmuPlugin_satp_ppn,MmuPlugin_shared_vpn_1},(2'b00)}; + end + `MmuPlugin_shared_State_defaultEncoding_L1_RSP : begin + end + `MmuPlugin_shared_State_defaultEncoding_L0_CMD : begin + MmuPlugin_dBusAccess_cmd_payload_address = {{{MmuPlugin_shared_pteBuffer_PPN1[9 : 0],MmuPlugin_shared_pteBuffer_PPN0},MmuPlugin_shared_vpn_0},(2'b00)}; + end + default : begin + end + endcase + end + + assign MmuPlugin_dBusAccess_cmd_payload_data = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + assign MmuPlugin_dBusAccess_cmd_payload_writeMask = (4'bxxxx); + assign DBusCachedPlugin_mmuBus_busy = ((MmuPlugin_shared_state_1_ != `MmuPlugin_shared_State_defaultEncoding_IDLE) && (MmuPlugin_shared_portId == (1'b1))); + assign IBusCachedPlugin_mmuBus_busy = ((MmuPlugin_shared_state_1_ != `MmuPlugin_shared_State_defaultEncoding_IDLE) && (MmuPlugin_shared_portId == (1'b0))); + assign _zz_144_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000001100)) == (32'b00000000000000000000000000000100)); + assign _zz_145_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001001000)) == (32'b00000000000000000000000001001000)); + assign _zz_146_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000000000)) == (32'b00000000000000000001000000000000)); + assign _zz_147_ = ((decode_INSTRUCTION & (32'b00000000000000000011000000000000)) == (32'b00000000000000000010000000000000)); + assign _zz_148_ = ((decode_INSTRUCTION & (32'b00000000000000000101000000000000)) == (32'b00000000000000000100000000000000)); + assign _zz_149_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001010000)) == (32'b00000000000000000010000000000000)); + assign _zz_150_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000000100)) == (32'b00000000000000000000000000000100)); + assign _zz_151_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001010000)) == (32'b00000000000000000100000001010000)); + assign _zz_143_ = {(((decode_INSTRUCTION & _zz_459_) == (32'b00000000000000000000000000001000)) != (1'b0)),{({_zz_460_,{_zz_461_,_zz_462_}} != (4'b0000)),{({_zz_463_,_zz_464_} != (3'b000)),{(_zz_465_ != _zz_466_),{_zz_467_,{_zz_468_,_zz_469_}}}}}}; + assign _zz_85_ = ({((decode_INSTRUCTION & (32'b00000000000000000000000001011111)) == (32'b00000000000000000000000000010111)),{((decode_INSTRUCTION & (32'b00000000000000000000000001111111)) == (32'b00000000000000000000000001101111)),{((decode_INSTRUCTION & (32'b00000000000000000001000001101111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_634_) == (32'b00000000000000000001000001110011)),{(_zz_635_ == _zz_636_),{_zz_637_,{_zz_638_,_zz_639_}}}}}}} != (25'b0000000000000000000000000)); + assign _zz_84_ = _zz_347_[0]; + assign _zz_83_ = _zz_348_[0]; + assign _zz_152_ = _zz_143_[3 : 2]; + assign _zz_82_ = _zz_152_; + assign _zz_153_ = _zz_143_[5 : 4]; + assign _zz_81_ = _zz_153_; + assign _zz_80_ = _zz_349_[0]; + assign _zz_79_ = _zz_350_[0]; + assign _zz_154_ = _zz_143_[9 : 8]; + assign _zz_78_ = _zz_154_; + assign _zz_77_ = _zz_351_[0]; + assign _zz_76_ = _zz_352_[0]; + assign _zz_75_ = _zz_353_[0]; + assign _zz_74_ = _zz_354_[0]; + assign _zz_73_ = _zz_355_[0]; + assign _zz_72_ = _zz_356_[0]; + assign _zz_71_ = _zz_357_[0]; + assign _zz_155_ = _zz_143_[19 : 18]; + assign _zz_70_ = _zz_155_; + assign _zz_69_ = _zz_358_[0]; + assign _zz_68_ = _zz_359_[0]; + assign _zz_67_ = _zz_360_[0]; + assign _zz_156_ = _zz_143_[24 : 23]; + assign _zz_66_ = _zz_156_; + assign _zz_65_ = _zz_361_[0]; + assign _zz_64_ = _zz_362_[0]; + assign _zz_157_ = _zz_143_[28 : 27]; + assign _zz_63_ = _zz_157_; + assign _zz_158_ = _zz_143_[30 : 29]; + assign _zz_62_ = _zz_158_; + assign _zz_61_ = _zz_363_[0]; + assign _zz_60_ = _zz_364_[0]; + assign _zz_59_ = _zz_365_[0]; + assign _zz_58_ = _zz_366_[0]; + assign decodeExceptionPort_valid = ((decode_arbitration_isValid && decode_INSTRUCTION_READY) && (! decode_LEGAL_INSTRUCTION)); + assign decodeExceptionPort_payload_code = (4'b0010); + assign decodeExceptionPort_payload_badAddr = decode_INSTRUCTION; + assign decode_RegFilePlugin_regFileReadAddress1 = decode_INSTRUCTION_ANTICIPATED[19 : 15]; + assign decode_RegFilePlugin_regFileReadAddress2 = decode_INSTRUCTION_ANTICIPATED[24 : 20]; + assign decode_RegFilePlugin_rs1Data = _zz_246_; + assign decode_RegFilePlugin_rs2Data = _zz_247_; + assign _zz_57_ = decode_RegFilePlugin_rs1Data; + assign _zz_56_ = decode_RegFilePlugin_rs2Data; + always @ (*) begin + lastStageRegFileWrite_valid = (_zz_54_ && writeBack_arbitration_isFiring); + if(_zz_159_)begin + lastStageRegFileWrite_valid = 1'b1; + end + end + + assign lastStageRegFileWrite_payload_address = _zz_53_[11 : 7]; + assign lastStageRegFileWrite_payload_data = _zz_87_; + always @ (*) begin + case(execute_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : begin + execute_IntAluPlugin_bitwise = (execute_SRC1 & execute_SRC2); + end + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : begin + execute_IntAluPlugin_bitwise = (execute_SRC1 | execute_SRC2); + end + default : begin + execute_IntAluPlugin_bitwise = (execute_SRC1 ^ execute_SRC2); + end + endcase + end + + always @ (*) begin + case(execute_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_BITWISE : begin + _zz_160_ = execute_IntAluPlugin_bitwise; + end + `AluCtrlEnum_defaultEncoding_SLT_SLTU : begin + _zz_160_ = {31'd0, _zz_367_}; + end + default : begin + _zz_160_ = execute_SRC_ADD_SUB; + end + endcase + end + + assign _zz_51_ = _zz_160_; + assign _zz_49_ = (decode_SRC_ADD_ZERO && (! decode_SRC_USE_SUB_LESS)); + always @ (*) begin + case(execute_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : begin + _zz_161_ = execute_RS1; + end + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : begin + _zz_161_ = {29'd0, _zz_368_}; + end + `Src1CtrlEnum_defaultEncoding_IMU : begin + _zz_161_ = {execute_INSTRUCTION[31 : 12],(12'b000000000000)}; + end + default : begin + _zz_161_ = {27'd0, _zz_369_}; + end + endcase + end + + assign _zz_48_ = _zz_161_; + assign _zz_162_ = _zz_370_[11]; + always @ (*) begin + _zz_163_[19] = _zz_162_; + _zz_163_[18] = _zz_162_; + _zz_163_[17] = _zz_162_; + _zz_163_[16] = _zz_162_; + _zz_163_[15] = _zz_162_; + _zz_163_[14] = _zz_162_; + _zz_163_[13] = _zz_162_; + _zz_163_[12] = _zz_162_; + _zz_163_[11] = _zz_162_; + _zz_163_[10] = _zz_162_; + _zz_163_[9] = _zz_162_; + _zz_163_[8] = _zz_162_; + _zz_163_[7] = _zz_162_; + _zz_163_[6] = _zz_162_; + _zz_163_[5] = _zz_162_; + _zz_163_[4] = _zz_162_; + _zz_163_[3] = _zz_162_; + _zz_163_[2] = _zz_162_; + _zz_163_[1] = _zz_162_; + _zz_163_[0] = _zz_162_; + end + + assign _zz_164_ = _zz_371_[11]; + always @ (*) begin + _zz_165_[19] = _zz_164_; + _zz_165_[18] = _zz_164_; + _zz_165_[17] = _zz_164_; + _zz_165_[16] = _zz_164_; + _zz_165_[15] = _zz_164_; + _zz_165_[14] = _zz_164_; + _zz_165_[13] = _zz_164_; + _zz_165_[12] = _zz_164_; + _zz_165_[11] = _zz_164_; + _zz_165_[10] = _zz_164_; + _zz_165_[9] = _zz_164_; + _zz_165_[8] = _zz_164_; + _zz_165_[7] = _zz_164_; + _zz_165_[6] = _zz_164_; + _zz_165_[5] = _zz_164_; + _zz_165_[4] = _zz_164_; + _zz_165_[3] = _zz_164_; + _zz_165_[2] = _zz_164_; + _zz_165_[1] = _zz_164_; + _zz_165_[0] = _zz_164_; + end + + always @ (*) begin + case(execute_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : begin + _zz_166_ = execute_RS2; + end + `Src2CtrlEnum_defaultEncoding_IMI : begin + _zz_166_ = {_zz_163_,execute_INSTRUCTION[31 : 20]}; + end + `Src2CtrlEnum_defaultEncoding_IMS : begin + _zz_166_ = {_zz_165_,{execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}}; + end + default : begin + _zz_166_ = _zz_44_; + end + endcase + end + + assign _zz_46_ = _zz_166_; + always @ (*) begin + execute_SrcPlugin_addSub = _zz_372_; + if(execute_SRC2_FORCE_ZERO)begin + execute_SrcPlugin_addSub = execute_SRC1; + end + end + + assign execute_SrcPlugin_less = ((execute_SRC1[31] == execute_SRC2[31]) ? execute_SrcPlugin_addSub[31] : (execute_SRC_LESS_UNSIGNED ? execute_SRC2[31] : execute_SRC1[31])); + assign _zz_43_ = execute_SrcPlugin_addSub; + assign _zz_42_ = execute_SrcPlugin_addSub; + assign _zz_41_ = execute_SrcPlugin_less; + assign execute_FullBarrelShifterPlugin_amplitude = execute_SRC2[4 : 0]; + always @ (*) begin + _zz_167_[0] = execute_SRC1[31]; + _zz_167_[1] = execute_SRC1[30]; + _zz_167_[2] = execute_SRC1[29]; + _zz_167_[3] = execute_SRC1[28]; + _zz_167_[4] = execute_SRC1[27]; + _zz_167_[5] = execute_SRC1[26]; + _zz_167_[6] = execute_SRC1[25]; + _zz_167_[7] = execute_SRC1[24]; + _zz_167_[8] = execute_SRC1[23]; + _zz_167_[9] = execute_SRC1[22]; + _zz_167_[10] = execute_SRC1[21]; + _zz_167_[11] = execute_SRC1[20]; + _zz_167_[12] = execute_SRC1[19]; + _zz_167_[13] = execute_SRC1[18]; + _zz_167_[14] = execute_SRC1[17]; + _zz_167_[15] = execute_SRC1[16]; + _zz_167_[16] = execute_SRC1[15]; + _zz_167_[17] = execute_SRC1[14]; + _zz_167_[18] = execute_SRC1[13]; + _zz_167_[19] = execute_SRC1[12]; + _zz_167_[20] = execute_SRC1[11]; + _zz_167_[21] = execute_SRC1[10]; + _zz_167_[22] = execute_SRC1[9]; + _zz_167_[23] = execute_SRC1[8]; + _zz_167_[24] = execute_SRC1[7]; + _zz_167_[25] = execute_SRC1[6]; + _zz_167_[26] = execute_SRC1[5]; + _zz_167_[27] = execute_SRC1[4]; + _zz_167_[28] = execute_SRC1[3]; + _zz_167_[29] = execute_SRC1[2]; + _zz_167_[30] = execute_SRC1[1]; + _zz_167_[31] = execute_SRC1[0]; + end + + assign execute_FullBarrelShifterPlugin_reversed = ((execute_SHIFT_CTRL == `ShiftCtrlEnum_defaultEncoding_SLL_1) ? _zz_167_ : execute_SRC1); + assign _zz_39_ = _zz_380_; + always @ (*) begin + _zz_168_[0] = memory_SHIFT_RIGHT[31]; + _zz_168_[1] = memory_SHIFT_RIGHT[30]; + _zz_168_[2] = memory_SHIFT_RIGHT[29]; + _zz_168_[3] = memory_SHIFT_RIGHT[28]; + _zz_168_[4] = memory_SHIFT_RIGHT[27]; + _zz_168_[5] = memory_SHIFT_RIGHT[26]; + _zz_168_[6] = memory_SHIFT_RIGHT[25]; + _zz_168_[7] = memory_SHIFT_RIGHT[24]; + _zz_168_[8] = memory_SHIFT_RIGHT[23]; + _zz_168_[9] = memory_SHIFT_RIGHT[22]; + _zz_168_[10] = memory_SHIFT_RIGHT[21]; + _zz_168_[11] = memory_SHIFT_RIGHT[20]; + _zz_168_[12] = memory_SHIFT_RIGHT[19]; + _zz_168_[13] = memory_SHIFT_RIGHT[18]; + _zz_168_[14] = memory_SHIFT_RIGHT[17]; + _zz_168_[15] = memory_SHIFT_RIGHT[16]; + _zz_168_[16] = memory_SHIFT_RIGHT[15]; + _zz_168_[17] = memory_SHIFT_RIGHT[14]; + _zz_168_[18] = memory_SHIFT_RIGHT[13]; + _zz_168_[19] = memory_SHIFT_RIGHT[12]; + _zz_168_[20] = memory_SHIFT_RIGHT[11]; + _zz_168_[21] = memory_SHIFT_RIGHT[10]; + _zz_168_[22] = memory_SHIFT_RIGHT[9]; + _zz_168_[23] = memory_SHIFT_RIGHT[8]; + _zz_168_[24] = memory_SHIFT_RIGHT[7]; + _zz_168_[25] = memory_SHIFT_RIGHT[6]; + _zz_168_[26] = memory_SHIFT_RIGHT[5]; + _zz_168_[27] = memory_SHIFT_RIGHT[4]; + _zz_168_[28] = memory_SHIFT_RIGHT[3]; + _zz_168_[29] = memory_SHIFT_RIGHT[2]; + _zz_168_[30] = memory_SHIFT_RIGHT[1]; + _zz_168_[31] = memory_SHIFT_RIGHT[0]; + end + + always @ (*) begin + _zz_169_ = 1'b0; + if(_zz_296_)begin + if(_zz_297_)begin + if(_zz_175_)begin + _zz_169_ = 1'b1; + end + end + end + if(_zz_298_)begin + if(_zz_299_)begin + if(_zz_177_)begin + _zz_169_ = 1'b1; + end + end + end + if(_zz_300_)begin + if(_zz_301_)begin + if(_zz_179_)begin + _zz_169_ = 1'b1; + end + end + end + if((! decode_RS1_USE))begin + _zz_169_ = 1'b0; + end + end + + always @ (*) begin + _zz_170_ = 1'b0; + if(_zz_296_)begin + if(_zz_297_)begin + if(_zz_176_)begin + _zz_170_ = 1'b1; + end + end + end + if(_zz_298_)begin + if(_zz_299_)begin + if(_zz_178_)begin + _zz_170_ = 1'b1; + end + end + end + if(_zz_300_)begin + if(_zz_301_)begin + if(_zz_180_)begin + _zz_170_ = 1'b1; + end + end + end + if((! decode_RS2_USE))begin + _zz_170_ = 1'b0; + end + end + + assign _zz_171_ = (_zz_54_ && writeBack_arbitration_isFiring); + assign _zz_175_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); + assign _zz_176_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); + assign _zz_177_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); + assign _zz_178_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); + assign _zz_179_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); + assign _zz_180_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); + assign execute_BranchPlugin_eq = (execute_SRC1 == execute_SRC2); + assign _zz_181_ = execute_INSTRUCTION[14 : 12]; + always @ (*) begin + if((_zz_181_ == (3'b000))) begin + _zz_182_ = execute_BranchPlugin_eq; + end else if((_zz_181_ == (3'b001))) begin + _zz_182_ = (! execute_BranchPlugin_eq); + end else if((((_zz_181_ & (3'b101)) == (3'b101)))) begin + _zz_182_ = (! execute_SRC_LESS); + end else begin + _zz_182_ = execute_SRC_LESS; + end + end + + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : begin + _zz_183_ = 1'b0; + end + `BranchCtrlEnum_defaultEncoding_JAL : begin + _zz_183_ = 1'b1; + end + `BranchCtrlEnum_defaultEncoding_JALR : begin + _zz_183_ = 1'b1; + end + default : begin + _zz_183_ = _zz_182_; + end + endcase + end + + assign _zz_35_ = _zz_183_; + assign execute_BranchPlugin_branch_src1 = ((execute_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JALR) ? execute_RS1 : execute_PC); + assign _zz_184_ = _zz_382_[19]; + always @ (*) begin + _zz_185_[10] = _zz_184_; + _zz_185_[9] = _zz_184_; + _zz_185_[8] = _zz_184_; + _zz_185_[7] = _zz_184_; + _zz_185_[6] = _zz_184_; + _zz_185_[5] = _zz_184_; + _zz_185_[4] = _zz_184_; + _zz_185_[3] = _zz_184_; + _zz_185_[2] = _zz_184_; + _zz_185_[1] = _zz_184_; + _zz_185_[0] = _zz_184_; + end + + assign _zz_186_ = _zz_383_[11]; + always @ (*) begin + _zz_187_[19] = _zz_186_; + _zz_187_[18] = _zz_186_; + _zz_187_[17] = _zz_186_; + _zz_187_[16] = _zz_186_; + _zz_187_[15] = _zz_186_; + _zz_187_[14] = _zz_186_; + _zz_187_[13] = _zz_186_; + _zz_187_[12] = _zz_186_; + _zz_187_[11] = _zz_186_; + _zz_187_[10] = _zz_186_; + _zz_187_[9] = _zz_186_; + _zz_187_[8] = _zz_186_; + _zz_187_[7] = _zz_186_; + _zz_187_[6] = _zz_186_; + _zz_187_[5] = _zz_186_; + _zz_187_[4] = _zz_186_; + _zz_187_[3] = _zz_186_; + _zz_187_[2] = _zz_186_; + _zz_187_[1] = _zz_186_; + _zz_187_[0] = _zz_186_; + end + + assign _zz_188_ = _zz_384_[11]; + always @ (*) begin + _zz_189_[18] = _zz_188_; + _zz_189_[17] = _zz_188_; + _zz_189_[16] = _zz_188_; + _zz_189_[15] = _zz_188_; + _zz_189_[14] = _zz_188_; + _zz_189_[13] = _zz_188_; + _zz_189_[12] = _zz_188_; + _zz_189_[11] = _zz_188_; + _zz_189_[10] = _zz_188_; + _zz_189_[9] = _zz_188_; + _zz_189_[8] = _zz_188_; + _zz_189_[7] = _zz_188_; + _zz_189_[6] = _zz_188_; + _zz_189_[5] = _zz_188_; + _zz_189_[4] = _zz_188_; + _zz_189_[3] = _zz_188_; + _zz_189_[2] = _zz_188_; + _zz_189_[1] = _zz_188_; + _zz_189_[0] = _zz_188_; + end + + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_JAL : begin + _zz_190_ = {{_zz_185_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0}; + end + `BranchCtrlEnum_defaultEncoding_JALR : begin + _zz_190_ = {_zz_187_,execute_INSTRUCTION[31 : 20]}; + end + default : begin + _zz_190_ = {{_zz_189_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0}; + end + endcase + end + + assign execute_BranchPlugin_branch_src2 = _zz_190_; + assign execute_BranchPlugin_branchAdder = (execute_BranchPlugin_branch_src1 + execute_BranchPlugin_branch_src2); + assign _zz_33_ = {execute_BranchPlugin_branchAdder[31 : 1],(1'b0)}; + assign BranchPlugin_jumpInterface_valid = ((memory_arbitration_isValid && memory_BRANCH_DO) && (! 1'b0)); + assign BranchPlugin_jumpInterface_payload = memory_BRANCH_CALC; + assign BranchPlugin_branchExceptionPort_valid = ((memory_arbitration_isValid && memory_BRANCH_DO) && BranchPlugin_jumpInterface_payload[1]); + assign BranchPlugin_branchExceptionPort_payload_code = (4'b0000); + assign BranchPlugin_branchExceptionPort_payload_badAddr = BranchPlugin_jumpInterface_payload; + always @ (*) begin + CsrPlugin_privilege = _zz_191_; + if(CsrPlugin_forceMachineWire)begin + CsrPlugin_privilege = (2'b11); + end + end + + assign CsrPlugin_misa_base = (2'b01); + assign CsrPlugin_misa_extensions = (26'b00000000000000000000000000); + assign CsrPlugin_sip_SEIP_OR = (CsrPlugin_sip_SEIP_SOFT || CsrPlugin_sip_SEIP_INPUT); + assign _zz_192_ = (CsrPlugin_sip_STIP && CsrPlugin_sie_STIE); + assign _zz_193_ = (CsrPlugin_sip_SSIP && CsrPlugin_sie_SSIE); + assign _zz_194_ = (CsrPlugin_sip_SEIP_OR && CsrPlugin_sie_SEIE); + assign _zz_195_ = (CsrPlugin_mip_MTIP && CsrPlugin_mie_MTIE); + assign _zz_196_ = (CsrPlugin_mip_MSIP && CsrPlugin_mie_MSIE); + assign _zz_197_ = (CsrPlugin_mip_MEIP && CsrPlugin_mie_MEIE); + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b11); + case(CsrPlugin_exceptionPortCtrl_exceptionContext_code) + 4'b1000 : begin + if(((1'b1 && CsrPlugin_medeleg_EU) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b0010 : begin + if(((1'b1 && CsrPlugin_medeleg_II) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b0101 : begin + if(((1'b1 && CsrPlugin_medeleg_LAF) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b1101 : begin + if(((1'b1 && CsrPlugin_medeleg_LPF) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b0100 : begin + if(((1'b1 && CsrPlugin_medeleg_LAM) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b0111 : begin + if(((1'b1 && CsrPlugin_medeleg_SAF) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b0001 : begin + if(((1'b1 && CsrPlugin_medeleg_IAF) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b1001 : begin + if(((1'b1 && CsrPlugin_medeleg_ES) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b1100 : begin + if(((1'b1 && CsrPlugin_medeleg_IPF) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b1111 : begin + if(((1'b1 && CsrPlugin_medeleg_SPF) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b0110 : begin + if(((1'b1 && CsrPlugin_medeleg_SAM) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + 4'b0000 : begin + if(((1'b1 && CsrPlugin_medeleg_IAM) && (! 1'b0)))begin + CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); + end + end + default : begin + end + endcase + end + + assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege = ((CsrPlugin_privilege < CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped) ? CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped : CsrPlugin_privilege); + assign _zz_198_ = {decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid}; + assign _zz_199_ = _zz_385_[0]; + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_decode = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; + if(_zz_282_)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b1; + end + if(decode_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b0; + end + end + + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_execute = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; + if(CsrPlugin_selfException_valid)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_execute = 1'b1; + end + if(execute_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_execute = 1'b0; + end + end + + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_memory = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; + if(BranchPlugin_branchExceptionPort_valid)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b1; + end + if(memory_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b0; + end + end + + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; + if(DBusCachedPlugin_exceptionBus_valid)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = 1'b1; + end + if(writeBack_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = 1'b0; + end + end + + assign CsrPlugin_exceptionPendings_0 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; + assign CsrPlugin_exceptionPendings_1 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; + assign CsrPlugin_exceptionPendings_2 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; + assign CsrPlugin_exceptionPendings_3 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; + assign CsrPlugin_exception = (CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack && CsrPlugin_allowException); + always @ (*) begin + CsrPlugin_pipelineLiberator_done = ((! ({writeBack_arbitration_isValid,{memory_arbitration_isValid,execute_arbitration_isValid}} != (3'b000))) && IBusCachedPlugin_pcValids_3); + if(({CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory,CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute}} != (3'b000)))begin + CsrPlugin_pipelineLiberator_done = 1'b0; + end + if(CsrPlugin_hadException)begin + CsrPlugin_pipelineLiberator_done = 1'b0; + end + end + + assign CsrPlugin_interruptJump = ((CsrPlugin_interrupt_valid && CsrPlugin_pipelineLiberator_done) && CsrPlugin_allowInterrupts); + always @ (*) begin + CsrPlugin_targetPrivilege = CsrPlugin_interrupt_targetPrivilege; + if(CsrPlugin_hadException)begin + CsrPlugin_targetPrivilege = CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; + end + end + + always @ (*) begin + CsrPlugin_trapCause = CsrPlugin_interrupt_code; + if(CsrPlugin_hadException)begin + CsrPlugin_trapCause = CsrPlugin_exceptionPortCtrl_exceptionContext_code; + end + end + + always @ (*) begin + CsrPlugin_xtvec_mode = (2'bxx); + case(CsrPlugin_targetPrivilege) + 2'b01 : begin + CsrPlugin_xtvec_mode = CsrPlugin_stvec_mode; + end + 2'b11 : begin + CsrPlugin_xtvec_mode = CsrPlugin_mtvec_mode; + end + default : begin + end + endcase + end + + always @ (*) begin + CsrPlugin_xtvec_base = (30'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + case(CsrPlugin_targetPrivilege) + 2'b01 : begin + CsrPlugin_xtvec_base = CsrPlugin_stvec_base; + end + 2'b11 : begin + CsrPlugin_xtvec_base = CsrPlugin_mtvec_base; + end + default : begin + end + endcase + end + + assign contextSwitching = CsrPlugin_jumpInterface_valid; + assign _zz_31_ = (! (((decode_INSTRUCTION[14 : 13] == (2'b01)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))) || ((decode_INSTRUCTION[14 : 13] == (2'b11)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))))); + assign _zz_30_ = (decode_INSTRUCTION[13 : 7] != (7'b0100000)); + always @ (*) begin + execute_CsrPlugin_inWfi = 1'b0; + if(_zz_283_)begin + execute_CsrPlugin_inWfi = 1'b1; + end + end + + assign execute_CsrPlugin_blockedBySideEffects = ({writeBack_arbitration_isValid,memory_arbitration_isValid} != (2'b00)); + always @ (*) begin + execute_CsrPlugin_illegalAccess = 1'b1; + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001100000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001100000011 : begin + if(execute_CSR_WRITE_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b111100010001 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b000101000010 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b111100010100 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b100111000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b000100000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001100000010 : begin + if(execute_CSR_WRITE_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b001101000001 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001101000100 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001100000101 : begin + if(execute_CSR_WRITE_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b000110000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b110011000000 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b000101000001 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b111100010011 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b000101000100 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001101000011 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b000100000101 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b111111000000 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b001101000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001100000100 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b111100010010 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b000101000011 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b110111000000 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b000101000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001101000010 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b000100000100 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + default : begin + end + endcase + if((CsrPlugin_privilege < execute_CsrPlugin_csrAddress[9 : 8]))begin + execute_CsrPlugin_illegalAccess = 1'b1; + end + if(((! execute_arbitration_isValid) || (! execute_IS_CSR)))begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + + always @ (*) begin + execute_CsrPlugin_illegalInstruction = 1'b0; + if((execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)))begin + if((CsrPlugin_privilege < execute_INSTRUCTION[29 : 28]))begin + execute_CsrPlugin_illegalInstruction = 1'b1; + end + end + end + + always @ (*) begin + CsrPlugin_selfException_valid = 1'b0; + if(_zz_302_)begin + CsrPlugin_selfException_valid = 1'b1; + end + if(_zz_303_)begin + CsrPlugin_selfException_valid = 1'b1; + end + end + + always @ (*) begin + CsrPlugin_selfException_payload_code = (4'bxxxx); + if(_zz_302_)begin + CsrPlugin_selfException_payload_code = (4'b0010); + end + if(_zz_303_)begin + case(CsrPlugin_privilege) + 2'b00 : begin + CsrPlugin_selfException_payload_code = (4'b1000); + end + 2'b01 : begin + CsrPlugin_selfException_payload_code = (4'b1001); + end + default : begin + CsrPlugin_selfException_payload_code = (4'b1011); + end + endcase + end + end + + assign CsrPlugin_selfException_payload_badAddr = execute_INSTRUCTION; + always @ (*) begin + execute_CsrPlugin_readData = (32'b00000000000000000000000000000000); + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + execute_CsrPlugin_readData[31 : 0] = _zz_207_; + end + 12'b001100000000 : begin + execute_CsrPlugin_readData[19 : 19] = MmuPlugin_status_mxr; + execute_CsrPlugin_readData[18 : 18] = MmuPlugin_status_sum; + execute_CsrPlugin_readData[17 : 17] = MmuPlugin_status_mprv; + execute_CsrPlugin_readData[12 : 11] = CsrPlugin_mstatus_MPP; + execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mstatus_MPIE; + execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mstatus_MIE; + execute_CsrPlugin_readData[8 : 8] = CsrPlugin_sstatus_SPP; + execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sstatus_SPIE; + execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sstatus_SIE; + end + 12'b001100000011 : begin + end + 12'b111100010001 : begin + execute_CsrPlugin_readData[0 : 0] = (1'b1); + end + 12'b000101000010 : begin + execute_CsrPlugin_readData[31 : 31] = CsrPlugin_scause_interrupt; + execute_CsrPlugin_readData[3 : 0] = CsrPlugin_scause_exceptionCode; + end + 12'b111100010100 : begin + end + 12'b100111000000 : begin + execute_CsrPlugin_readData[31 : 0] = _zz_209_; + end + 12'b000100000000 : begin + execute_CsrPlugin_readData[19 : 19] = MmuPlugin_status_mxr; + execute_CsrPlugin_readData[18 : 18] = MmuPlugin_status_sum; + execute_CsrPlugin_readData[17 : 17] = MmuPlugin_status_mprv; + execute_CsrPlugin_readData[8 : 8] = CsrPlugin_sstatus_SPP; + execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sstatus_SPIE; + execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sstatus_SIE; + end + 12'b001100000010 : begin + end + 12'b001101000001 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mepc; + end + 12'b001101000100 : begin + execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mip_MEIP; + execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mip_MTIP; + execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mip_MSIP; + execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sip_STIP; + execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sip_SSIP; + execute_CsrPlugin_readData[9 : 9] = CsrPlugin_sip_SEIP_OR; + end + 12'b001100000101 : begin + end + 12'b000110000000 : begin + execute_CsrPlugin_readData[31 : 31] = MmuPlugin_satp_mode; + execute_CsrPlugin_readData[19 : 0] = MmuPlugin_satp_ppn; + end + 12'b110011000000 : begin + execute_CsrPlugin_readData[12 : 0] = (13'b1000000000000); + execute_CsrPlugin_readData[25 : 20] = (6'b100000); + end + 12'b000101000001 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_sepc; + end + 12'b111100010011 : begin + execute_CsrPlugin_readData[1 : 0] = (2'b11); + end + 12'b000101000100 : begin + execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sip_STIP; + execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sip_SSIP; + execute_CsrPlugin_readData[9 : 9] = CsrPlugin_sip_SEIP_OR; + end + 12'b001101000011 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mtval; + end + 12'b000100000101 : begin + execute_CsrPlugin_readData[31 : 2] = CsrPlugin_stvec_base; + execute_CsrPlugin_readData[1 : 0] = CsrPlugin_stvec_mode; + end + 12'b111111000000 : begin + execute_CsrPlugin_readData[31 : 0] = _zz_208_; + end + 12'b001101000000 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mscratch; + end + 12'b001100000100 : begin + execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mie_MEIE; + execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mie_MTIE; + execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mie_MSIE; + execute_CsrPlugin_readData[9 : 9] = CsrPlugin_sie_SEIE; + execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sie_STIE; + execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sie_SSIE; + end + 12'b111100010010 : begin + execute_CsrPlugin_readData[1 : 0] = (2'b10); + end + 12'b000101000011 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_stval; + end + 12'b110111000000 : begin + execute_CsrPlugin_readData[31 : 0] = _zz_210_; + end + 12'b000101000000 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_sscratch; + end + 12'b001101000010 : begin + execute_CsrPlugin_readData[31 : 31] = CsrPlugin_mcause_interrupt; + execute_CsrPlugin_readData[3 : 0] = CsrPlugin_mcause_exceptionCode; + end + 12'b000100000100 : begin + execute_CsrPlugin_readData[9 : 9] = CsrPlugin_sie_SEIE; + execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sie_STIE; + execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sie_SSIE; + end + default : begin + end + endcase + end + + assign execute_CsrPlugin_writeInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_WRITE_OPCODE); + assign execute_CsrPlugin_readInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_READ_OPCODE); + assign execute_CsrPlugin_writeEnable = ((execute_CsrPlugin_writeInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); + assign execute_CsrPlugin_readEnable = ((execute_CsrPlugin_readInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); + always @ (*) begin + execute_CsrPlugin_readToWriteData = execute_CsrPlugin_readData; + case(execute_CsrPlugin_csrAddress) + 12'b001101000100 : begin + execute_CsrPlugin_readToWriteData[9 : 9] = CsrPlugin_sip_SEIP_SOFT; + end + 12'b000101000100 : begin + execute_CsrPlugin_readToWriteData[9 : 9] = CsrPlugin_sip_SEIP_SOFT; + end + default : begin + end + endcase + end + + always @ (*) begin + case(_zz_329_) + 1'b0 : begin + execute_CsrPlugin_writeData = execute_SRC1; + end + default : begin + execute_CsrPlugin_writeData = (execute_INSTRUCTION[12] ? (execute_CsrPlugin_readToWriteData & (~ execute_SRC1)) : (execute_CsrPlugin_readToWriteData | execute_SRC1)); + end + endcase + end + + assign execute_CsrPlugin_csrAddress = execute_INSTRUCTION[31 : 20]; + always @ (*) begin + memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b0; + if(_zz_276_)begin + if(_zz_284_)begin + memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b1; + end + end + end + + always @ (*) begin + memory_MulDivIterativePlugin_mul_counter_willClear = 1'b0; + if((! memory_arbitration_isStuck))begin + memory_MulDivIterativePlugin_mul_counter_willClear = 1'b1; + end + end + + assign memory_MulDivIterativePlugin_mul_willOverflowIfInc = (memory_MulDivIterativePlugin_mul_counter_value == (6'b100000)); + assign memory_MulDivIterativePlugin_mul_counter_willOverflow = (memory_MulDivIterativePlugin_mul_willOverflowIfInc && memory_MulDivIterativePlugin_mul_counter_willIncrement); + always @ (*) begin + if(memory_MulDivIterativePlugin_mul_counter_willOverflow)begin + memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); + end else begin + memory_MulDivIterativePlugin_mul_counter_valueNext = (memory_MulDivIterativePlugin_mul_counter_value + _zz_388_); + end + if(memory_MulDivIterativePlugin_mul_counter_willClear)begin + memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); + end + end + + always @ (*) begin + memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b0; + if(_zz_277_)begin + if(_zz_285_)begin + memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b1; + end + end + end + + always @ (*) begin + memory_MulDivIterativePlugin_div_counter_willClear = 1'b0; + if(_zz_304_)begin + memory_MulDivIterativePlugin_div_counter_willClear = 1'b1; + end + end + + assign memory_MulDivIterativePlugin_div_counter_willOverflowIfInc = (memory_MulDivIterativePlugin_div_counter_value == (6'b100001)); + assign memory_MulDivIterativePlugin_div_counter_willOverflow = (memory_MulDivIterativePlugin_div_counter_willOverflowIfInc && memory_MulDivIterativePlugin_div_counter_willIncrement); + always @ (*) begin + if(memory_MulDivIterativePlugin_div_counter_willOverflow)begin + memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); + end else begin + memory_MulDivIterativePlugin_div_counter_valueNext = (memory_MulDivIterativePlugin_div_counter_value + _zz_396_); + end + if(memory_MulDivIterativePlugin_div_counter_willClear)begin + memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); + end + end + + assign _zz_200_ = memory_MulDivIterativePlugin_rs1[31 : 0]; + assign _zz_201_ = {memory_MulDivIterativePlugin_accumulator[31 : 0],_zz_200_[31]}; + assign _zz_202_ = (_zz_201_ - _zz_397_); + assign _zz_203_ = (memory_INSTRUCTION[13] ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_rs1[31 : 0]); + assign _zz_204_ = (execute_RS2[31] && execute_IS_RS2_SIGNED); + assign _zz_205_ = ((execute_IS_MUL && _zz_204_) || ((execute_IS_DIV && execute_RS1[31]) && execute_IS_RS1_SIGNED)); + always @ (*) begin + _zz_206_[32] = (execute_IS_RS1_SIGNED && execute_RS1[31]); + _zz_206_[31 : 0] = execute_RS1; + end + + assign _zz_208_ = (_zz_207_ & externalInterruptArray_regNext); + assign externalInterrupt = (_zz_208_ != (32'b00000000000000000000000000000000)); + assign _zz_210_ = (_zz_209_ & externalInterruptArray_regNext); + assign externalInterruptS = (_zz_210_ != (32'b00000000000000000000000000000000)); + assign _zz_27_ = decode_SHIFT_CTRL; + assign _zz_24_ = execute_SHIFT_CTRL; + assign _zz_25_ = _zz_82_; + assign _zz_40_ = decode_to_execute_SHIFT_CTRL; + assign _zz_38_ = execute_to_memory_SHIFT_CTRL; + assign _zz_22_ = decode_ALU_CTRL; + assign _zz_20_ = _zz_81_; + assign _zz_50_ = decode_to_execute_ALU_CTRL; + assign _zz_19_ = decode_ENV_CTRL; + assign _zz_16_ = execute_ENV_CTRL; + assign _zz_14_ = memory_ENV_CTRL; + assign _zz_17_ = _zz_78_; + assign _zz_29_ = decode_to_execute_ENV_CTRL; + assign _zz_28_ = execute_to_memory_ENV_CTRL; + assign _zz_32_ = memory_to_writeBack_ENV_CTRL; + assign _zz_12_ = decode_SRC2_CTRL; + assign _zz_10_ = _zz_63_; + assign _zz_45_ = decode_to_execute_SRC2_CTRL; + assign _zz_9_ = decode_SRC1_CTRL; + assign _zz_7_ = _zz_62_; + assign _zz_47_ = decode_to_execute_SRC1_CTRL; + assign _zz_6_ = decode_ALU_BITWISE_CTRL; + assign _zz_4_ = _zz_70_; + assign _zz_52_ = decode_to_execute_ALU_BITWISE_CTRL; + assign _zz_3_ = decode_BRANCH_CTRL; + assign _zz_1_ = _zz_66_; + assign _zz_34_ = decode_to_execute_BRANCH_CTRL; + assign decode_arbitration_isFlushed = (({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,execute_arbitration_flushNext}} != (3'b000)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,{execute_arbitration_flushIt,decode_arbitration_flushIt}}} != (4'b0000))); + assign execute_arbitration_isFlushed = (({writeBack_arbitration_flushNext,memory_arbitration_flushNext} != (2'b00)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,execute_arbitration_flushIt}} != (3'b000))); + assign memory_arbitration_isFlushed = ((writeBack_arbitration_flushNext != (1'b0)) || ({writeBack_arbitration_flushIt,memory_arbitration_flushIt} != (2'b00))); + assign writeBack_arbitration_isFlushed = (1'b0 || (writeBack_arbitration_flushIt != (1'b0))); + assign decode_arbitration_isStuckByOthers = (decode_arbitration_haltByOther || (((1'b0 || execute_arbitration_isStuck) || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); + assign decode_arbitration_isStuck = (decode_arbitration_haltItself || decode_arbitration_isStuckByOthers); + assign decode_arbitration_isMoving = ((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)); + assign decode_arbitration_isFiring = ((decode_arbitration_isValid && (! decode_arbitration_isStuck)) && (! decode_arbitration_removeIt)); + assign execute_arbitration_isStuckByOthers = (execute_arbitration_haltByOther || ((1'b0 || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); + assign execute_arbitration_isStuck = (execute_arbitration_haltItself || execute_arbitration_isStuckByOthers); + assign execute_arbitration_isMoving = ((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)); + assign execute_arbitration_isFiring = ((execute_arbitration_isValid && (! execute_arbitration_isStuck)) && (! execute_arbitration_removeIt)); + assign memory_arbitration_isStuckByOthers = (memory_arbitration_haltByOther || (1'b0 || writeBack_arbitration_isStuck)); + assign memory_arbitration_isStuck = (memory_arbitration_haltItself || memory_arbitration_isStuckByOthers); + assign memory_arbitration_isMoving = ((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)); + assign memory_arbitration_isFiring = ((memory_arbitration_isValid && (! memory_arbitration_isStuck)) && (! memory_arbitration_removeIt)); + assign writeBack_arbitration_isStuckByOthers = (writeBack_arbitration_haltByOther || 1'b0); + assign writeBack_arbitration_isStuck = (writeBack_arbitration_haltItself || writeBack_arbitration_isStuckByOthers); + assign writeBack_arbitration_isMoving = ((! writeBack_arbitration_isStuck) && (! writeBack_arbitration_removeIt)); + assign writeBack_arbitration_isFiring = ((writeBack_arbitration_isValid && (! writeBack_arbitration_isStuck)) && (! writeBack_arbitration_removeIt)); + assign iBusWishbone_ADR = {_zz_455_,_zz_211_}; + assign iBusWishbone_CTI = ((_zz_211_ == (3'b111)) ? (3'b111) : (3'b010)); + assign iBusWishbone_BTE = (2'b00); + assign iBusWishbone_SEL = (4'b1111); + assign iBusWishbone_WE = 1'b0; + assign iBusWishbone_DAT_MOSI = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + always @ (*) begin + iBusWishbone_CYC = 1'b0; + if(_zz_305_)begin + iBusWishbone_CYC = 1'b1; + end + end + + always @ (*) begin + iBusWishbone_STB = 1'b0; + if(_zz_305_)begin + iBusWishbone_STB = 1'b1; + end + end + + assign iBus_cmd_ready = (iBus_cmd_valid && iBusWishbone_ACK); + assign iBus_rsp_valid = _zz_212_; + assign iBus_rsp_payload_data = iBusWishbone_DAT_MISO_regNext; + assign iBus_rsp_payload_error = 1'b0; + assign _zz_218_ = (dBus_cmd_payload_length != (3'b000)); + assign _zz_214_ = dBus_cmd_valid; + assign _zz_216_ = dBus_cmd_payload_wr; + assign _zz_217_ = (_zz_213_ == dBus_cmd_payload_length); + assign dBus_cmd_ready = (_zz_215_ && (_zz_216_ || _zz_217_)); + assign dBusWishbone_ADR = ((_zz_218_ ? {{dBus_cmd_payload_address[31 : 5],_zz_213_},(2'b00)} : {dBus_cmd_payload_address[31 : 2],(2'b00)}) >>> 2); + assign dBusWishbone_CTI = (_zz_218_ ? (_zz_217_ ? (3'b111) : (3'b010)) : (3'b000)); + assign dBusWishbone_BTE = (2'b00); + assign dBusWishbone_SEL = (_zz_216_ ? dBus_cmd_payload_mask : (4'b1111)); + assign dBusWishbone_WE = _zz_216_; + assign dBusWishbone_DAT_MOSI = dBus_cmd_payload_data; + assign _zz_215_ = (_zz_214_ && dBusWishbone_ACK); + assign dBusWishbone_CYC = _zz_214_; + assign dBusWishbone_STB = _zz_214_; + assign dBus_rsp_valid = _zz_219_; + assign dBus_rsp_payload_data = dBusWishbone_DAT_MISO_regNext; + assign dBus_rsp_payload_error = 1'b0; + always @ (posedge clk) begin + if(reset) begin + IBusCachedPlugin_fetchPc_pcReg <= externalResetVector; + IBusCachedPlugin_fetchPc_booted <= 1'b0; + IBusCachedPlugin_fetchPc_inc <= 1'b0; + _zz_109_ <= 1'b0; + _zz_111_ <= 1'b0; + _zz_114_ <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_5 <= 1'b0; + IBusCachedPlugin_injector_decodeRemoved <= 1'b0; + IBusCachedPlugin_rspCounter <= _zz_116_; + IBusCachedPlugin_rspCounter <= (32'b00000000000000000000000000000000); + _zz_117_ <= 1'b0; + _zz_124_ <= 1'b0; + DBusCachedPlugin_rspCounter <= _zz_131_; + DBusCachedPlugin_rspCounter <= (32'b00000000000000000000000000000000); + MmuPlugin_status_sum <= 1'b0; + MmuPlugin_status_mxr <= 1'b0; + MmuPlugin_status_mprv <= 1'b0; + MmuPlugin_satp_mode <= 1'b0; + MmuPlugin_ports_0_cache_0_valid <= 1'b0; + MmuPlugin_ports_0_cache_1_valid <= 1'b0; + MmuPlugin_ports_0_cache_2_valid <= 1'b0; + MmuPlugin_ports_0_cache_3_valid <= 1'b0; + MmuPlugin_ports_0_entryToReplace_value <= (2'b00); + MmuPlugin_ports_1_cache_0_valid <= 1'b0; + MmuPlugin_ports_1_cache_1_valid <= 1'b0; + MmuPlugin_ports_1_cache_2_valid <= 1'b0; + MmuPlugin_ports_1_cache_3_valid <= 1'b0; + MmuPlugin_ports_1_entryToReplace_value <= (2'b00); + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_IDLE; + _zz_159_ <= 1'b1; + _zz_172_ <= 1'b0; + _zz_191_ <= (2'b11); + CsrPlugin_mstatus_MIE <= 1'b0; + CsrPlugin_mstatus_MPIE <= 1'b0; + CsrPlugin_mstatus_MPP <= (2'b11); + CsrPlugin_mie_MEIE <= 1'b0; + CsrPlugin_mie_MTIE <= 1'b0; + CsrPlugin_mie_MSIE <= 1'b0; + CsrPlugin_medeleg_IAM <= 1'b0; + CsrPlugin_medeleg_IAF <= 1'b0; + CsrPlugin_medeleg_II <= 1'b0; + CsrPlugin_medeleg_LAM <= 1'b0; + CsrPlugin_medeleg_LAF <= 1'b0; + CsrPlugin_medeleg_SAM <= 1'b0; + CsrPlugin_medeleg_SAF <= 1'b0; + CsrPlugin_medeleg_EU <= 1'b0; + CsrPlugin_medeleg_ES <= 1'b0; + CsrPlugin_medeleg_IPF <= 1'b0; + CsrPlugin_medeleg_LPF <= 1'b0; + CsrPlugin_medeleg_SPF <= 1'b0; + CsrPlugin_mideleg_ST <= 1'b0; + CsrPlugin_mideleg_SE <= 1'b0; + CsrPlugin_mideleg_SS <= 1'b0; + CsrPlugin_sstatus_SIE <= 1'b0; + CsrPlugin_sstatus_SPIE <= 1'b0; + CsrPlugin_sstatus_SPP <= (1'b1); + CsrPlugin_sip_SEIP_SOFT <= 1'b0; + CsrPlugin_sip_STIP <= 1'b0; + CsrPlugin_sip_SSIP <= 1'b0; + CsrPlugin_sie_SEIE <= 1'b0; + CsrPlugin_sie_STIE <= 1'b0; + CsrPlugin_sie_SSIE <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; + CsrPlugin_interrupt_valid <= 1'b0; + CsrPlugin_lastStageWasWfi <= 1'b0; + CsrPlugin_hadException <= 1'b0; + execute_CsrPlugin_wfiWake <= 1'b0; + memory_MulDivIterativePlugin_mul_counter_value <= (6'b000000); + memory_MulDivIterativePlugin_div_counter_value <= (6'b000000); + _zz_207_ <= (32'b00000000000000000000000000000000); + _zz_209_ <= (32'b00000000000000000000000000000000); + execute_arbitration_isValid <= 1'b0; + memory_arbitration_isValid <= 1'b0; + writeBack_arbitration_isValid <= 1'b0; + execute_to_memory_IS_DBUS_SHARING <= 1'b0; + memory_to_writeBack_IS_DBUS_SHARING <= 1'b0; + memory_to_writeBack_REGFILE_WRITE_DATA <= (32'b00000000000000000000000000000000); + memory_to_writeBack_INSTRUCTION <= (32'b00000000000000000000000000000000); + _zz_211_ <= (3'b000); + _zz_212_ <= 1'b0; + _zz_213_ <= (3'b000); + _zz_219_ <= 1'b0; + end else begin + IBusCachedPlugin_fetchPc_booted <= 1'b1; + if((IBusCachedPlugin_fetchPc_corrected || IBusCachedPlugin_fetchPc_pcRegPropagate))begin + IBusCachedPlugin_fetchPc_inc <= 1'b0; + end + if((IBusCachedPlugin_fetchPc_output_valid && IBusCachedPlugin_fetchPc_output_ready))begin + IBusCachedPlugin_fetchPc_inc <= 1'b1; + end + if(((! IBusCachedPlugin_fetchPc_output_valid) && IBusCachedPlugin_fetchPc_output_ready))begin + IBusCachedPlugin_fetchPc_inc <= 1'b0; + end + if((IBusCachedPlugin_fetchPc_booted && ((IBusCachedPlugin_fetchPc_output_ready || IBusCachedPlugin_fetcherflushIt) || IBusCachedPlugin_fetchPc_pcRegPropagate)))begin + IBusCachedPlugin_fetchPc_pcReg <= IBusCachedPlugin_fetchPc_pc; + end + if(IBusCachedPlugin_fetcherflushIt)begin + _zz_109_ <= 1'b0; + end + if(_zz_107_)begin + _zz_109_ <= IBusCachedPlugin_iBusRsp_stages_0_output_valid; + end + if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin + _zz_111_ <= IBusCachedPlugin_iBusRsp_stages_1_output_valid; + end + if(IBusCachedPlugin_fetcherflushIt)begin + _zz_111_ <= 1'b0; + end + if(IBusCachedPlugin_iBusRsp_stages_2_output_ready)begin + _zz_114_ <= IBusCachedPlugin_iBusRsp_stages_2_output_valid; + end + if(IBusCachedPlugin_fetcherflushIt)begin + _zz_114_ <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; + end + if((! (! IBusCachedPlugin_iBusRsp_stages_1_input_ready)))begin + IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b1; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; + end + if((! (! IBusCachedPlugin_iBusRsp_stages_2_input_ready)))begin + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= IBusCachedPlugin_injector_nextPcCalc_valids_0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; + end + if((! (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)))begin + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= IBusCachedPlugin_injector_nextPcCalc_valids_1; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; + end + if((! execute_arbitration_isStuck))begin + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= IBusCachedPlugin_injector_nextPcCalc_valids_2; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; + end + if((! memory_arbitration_isStuck))begin + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= IBusCachedPlugin_injector_nextPcCalc_valids_3; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_5 <= 1'b0; + end + if((! writeBack_arbitration_isStuck))begin + IBusCachedPlugin_injector_nextPcCalc_valids_5 <= IBusCachedPlugin_injector_nextPcCalc_valids_4; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_5 <= 1'b0; + end + if(decode_arbitration_removeIt)begin + IBusCachedPlugin_injector_decodeRemoved <= 1'b1; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_decodeRemoved <= 1'b0; + end + if(iBus_rsp_valid)begin + IBusCachedPlugin_rspCounter <= (IBusCachedPlugin_rspCounter + (32'b00000000000000000000000000000001)); + end + if(dataCache_1__io_mem_cmd_s2mPipe_ready)begin + _zz_117_ <= 1'b0; + end + if(_zz_306_)begin + _zz_117_ <= dataCache_1__io_mem_cmd_valid; + end + if(dataCache_1__io_mem_cmd_s2mPipe_ready)begin + _zz_124_ <= dataCache_1__io_mem_cmd_s2mPipe_valid; + end + if(dBus_rsp_valid)begin + DBusCachedPlugin_rspCounter <= (DBusCachedPlugin_rspCounter + (32'b00000000000000000000000000000001)); + end + MmuPlugin_ports_0_entryToReplace_value <= MmuPlugin_ports_0_entryToReplace_valueNext; + if(contextSwitching)begin + if(MmuPlugin_ports_0_cache_0_exception)begin + MmuPlugin_ports_0_cache_0_valid <= 1'b0; + end + if(MmuPlugin_ports_0_cache_1_exception)begin + MmuPlugin_ports_0_cache_1_valid <= 1'b0; + end + if(MmuPlugin_ports_0_cache_2_exception)begin + MmuPlugin_ports_0_cache_2_valid <= 1'b0; + end + if(MmuPlugin_ports_0_cache_3_exception)begin + MmuPlugin_ports_0_cache_3_valid <= 1'b0; + end + end + MmuPlugin_ports_1_entryToReplace_value <= MmuPlugin_ports_1_entryToReplace_valueNext; + if(contextSwitching)begin + if(MmuPlugin_ports_1_cache_0_exception)begin + MmuPlugin_ports_1_cache_0_valid <= 1'b0; + end + if(MmuPlugin_ports_1_cache_1_exception)begin + MmuPlugin_ports_1_cache_1_valid <= 1'b0; + end + if(MmuPlugin_ports_1_cache_2_exception)begin + MmuPlugin_ports_1_cache_2_valid <= 1'b0; + end + if(MmuPlugin_ports_1_cache_3_exception)begin + MmuPlugin_ports_1_cache_3_valid <= 1'b0; + end + end + case(MmuPlugin_shared_state_1_) + `MmuPlugin_shared_State_defaultEncoding_IDLE : begin + if(_zz_307_)begin + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L1_CMD; + end + if(_zz_308_)begin + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L1_CMD; + end + end + `MmuPlugin_shared_State_defaultEncoding_L1_CMD : begin + if(MmuPlugin_dBusAccess_cmd_ready)begin + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L1_RSP; + end + end + `MmuPlugin_shared_State_defaultEncoding_L1_RSP : begin + if(MmuPlugin_dBusAccess_rsp_valid)begin + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L0_CMD; + if((MmuPlugin_shared_dBusRsp_leaf || MmuPlugin_shared_dBusRsp_exception))begin + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_IDLE; + end + if(MmuPlugin_dBusAccess_rsp_payload_redo)begin + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L1_CMD; + end + end + end + `MmuPlugin_shared_State_defaultEncoding_L0_CMD : begin + if(MmuPlugin_dBusAccess_cmd_ready)begin + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L0_RSP; + end + end + default : begin + if(MmuPlugin_dBusAccess_rsp_valid)begin + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_IDLE; + if(MmuPlugin_dBusAccess_rsp_payload_redo)begin + MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L0_CMD; + end + end + end + endcase + if(_zz_293_)begin + if(_zz_294_)begin + if(_zz_309_)begin + MmuPlugin_ports_0_cache_0_valid <= 1'b1; + end + if(_zz_310_)begin + MmuPlugin_ports_0_cache_1_valid <= 1'b1; + end + if(_zz_311_)begin + MmuPlugin_ports_0_cache_2_valid <= 1'b1; + end + if(_zz_312_)begin + MmuPlugin_ports_0_cache_3_valid <= 1'b1; + end + end + if(_zz_295_)begin + if(_zz_313_)begin + MmuPlugin_ports_1_cache_0_valid <= 1'b1; + end + if(_zz_314_)begin + MmuPlugin_ports_1_cache_1_valid <= 1'b1; + end + if(_zz_315_)begin + MmuPlugin_ports_1_cache_2_valid <= 1'b1; + end + if(_zz_316_)begin + MmuPlugin_ports_1_cache_3_valid <= 1'b1; + end + end + end + if((writeBack_arbitration_isValid && writeBack_IS_SFENCE_VMA))begin + MmuPlugin_ports_0_cache_0_valid <= 1'b0; + MmuPlugin_ports_0_cache_1_valid <= 1'b0; + MmuPlugin_ports_0_cache_2_valid <= 1'b0; + MmuPlugin_ports_0_cache_3_valid <= 1'b0; + MmuPlugin_ports_1_cache_0_valid <= 1'b0; + MmuPlugin_ports_1_cache_1_valid <= 1'b0; + MmuPlugin_ports_1_cache_2_valid <= 1'b0; + MmuPlugin_ports_1_cache_3_valid <= 1'b0; + end + _zz_159_ <= 1'b0; + _zz_172_ <= _zz_171_; + if((! decode_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= CsrPlugin_exceptionPortCtrl_exceptionValids_decode; + end + if((! execute_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= (CsrPlugin_exceptionPortCtrl_exceptionValids_decode && (! decode_arbitration_isStuck)); + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= CsrPlugin_exceptionPortCtrl_exceptionValids_execute; + end + if((! memory_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= (CsrPlugin_exceptionPortCtrl_exceptionValids_execute && (! execute_arbitration_isStuck)); + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= CsrPlugin_exceptionPortCtrl_exceptionValids_memory; + end + if((! writeBack_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= (CsrPlugin_exceptionPortCtrl_exceptionValids_memory && (! memory_arbitration_isStuck)); + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; + end + CsrPlugin_interrupt_valid <= 1'b0; + if(_zz_317_)begin + if(_zz_318_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_319_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_320_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + end + if(_zz_321_)begin + if(_zz_322_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_323_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_324_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_325_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_326_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_327_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + end + CsrPlugin_lastStageWasWfi <= (writeBack_arbitration_isFiring && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_WFI)); + CsrPlugin_hadException <= CsrPlugin_exception; + if(_zz_286_)begin + _zz_191_ <= CsrPlugin_targetPrivilege; + case(CsrPlugin_targetPrivilege) + 2'b01 : begin + CsrPlugin_sstatus_SIE <= 1'b0; + CsrPlugin_sstatus_SPIE <= CsrPlugin_sstatus_SIE; + CsrPlugin_sstatus_SPP <= CsrPlugin_privilege[0 : 0]; + end + 2'b11 : begin + CsrPlugin_mstatus_MIE <= 1'b0; + CsrPlugin_mstatus_MPIE <= CsrPlugin_mstatus_MIE; + CsrPlugin_mstatus_MPP <= CsrPlugin_privilege; + end + default : begin + end + endcase + end + if(_zz_287_)begin + case(_zz_288_) + 2'b11 : begin + CsrPlugin_mstatus_MPP <= (2'b00); + CsrPlugin_mstatus_MIE <= CsrPlugin_mstatus_MPIE; + CsrPlugin_mstatus_MPIE <= 1'b1; + _zz_191_ <= CsrPlugin_mstatus_MPP; + end + 2'b01 : begin + CsrPlugin_sstatus_SPP <= (1'b0); + CsrPlugin_sstatus_SIE <= CsrPlugin_sstatus_SPIE; + CsrPlugin_sstatus_SPIE <= 1'b1; + _zz_191_ <= {(1'b0),CsrPlugin_sstatus_SPP}; + end + default : begin + end + endcase + end + execute_CsrPlugin_wfiWake <= ({_zz_197_,{_zz_196_,{_zz_195_,{_zz_194_,{_zz_193_,_zz_192_}}}}} != (6'b000000)); + memory_MulDivIterativePlugin_mul_counter_value <= memory_MulDivIterativePlugin_mul_counter_valueNext; + memory_MulDivIterativePlugin_div_counter_value <= memory_MulDivIterativePlugin_div_counter_valueNext; + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_INSTRUCTION <= memory_INSTRUCTION; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_IS_DBUS_SHARING <= execute_IS_DBUS_SHARING; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_IS_DBUS_SHARING <= memory_IS_DBUS_SHARING; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_REGFILE_WRITE_DATA <= _zz_37_; + end + if(((! execute_arbitration_isStuck) || execute_arbitration_removeIt))begin + execute_arbitration_isValid <= 1'b0; + end + if(((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)))begin + execute_arbitration_isValid <= decode_arbitration_isValid; + end + if(((! memory_arbitration_isStuck) || memory_arbitration_removeIt))begin + memory_arbitration_isValid <= 1'b0; + end + if(((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)))begin + memory_arbitration_isValid <= execute_arbitration_isValid; + end + if(((! writeBack_arbitration_isStuck) || writeBack_arbitration_removeIt))begin + writeBack_arbitration_isValid <= 1'b0; + end + if(((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)))begin + writeBack_arbitration_isValid <= memory_arbitration_isValid; + end + if(MmuPlugin_dBusAccess_rsp_valid)begin + memory_to_writeBack_IS_DBUS_SHARING <= 1'b0; + end + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + if(execute_CsrPlugin_writeEnable)begin + _zz_207_ <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b001100000000 : begin + if(execute_CsrPlugin_writeEnable)begin + MmuPlugin_status_mxr <= _zz_410_[0]; + MmuPlugin_status_sum <= _zz_411_[0]; + MmuPlugin_status_mprv <= _zz_412_[0]; + CsrPlugin_mstatus_MPP <= execute_CsrPlugin_writeData[12 : 11]; + CsrPlugin_mstatus_MPIE <= _zz_413_[0]; + CsrPlugin_mstatus_MIE <= _zz_414_[0]; + CsrPlugin_sstatus_SPP <= execute_CsrPlugin_writeData[8 : 8]; + CsrPlugin_sstatus_SPIE <= _zz_415_[0]; + CsrPlugin_sstatus_SIE <= _zz_416_[0]; + end + end + 12'b001100000011 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mideleg_SE <= _zz_417_[0]; + CsrPlugin_mideleg_ST <= _zz_418_[0]; + CsrPlugin_mideleg_SS <= _zz_419_[0]; + end + end + 12'b111100010001 : begin + end + 12'b000101000010 : begin + end + 12'b111100010100 : begin + end + 12'b100111000000 : begin + if(execute_CsrPlugin_writeEnable)begin + _zz_209_ <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b000100000000 : begin + if(execute_CsrPlugin_writeEnable)begin + MmuPlugin_status_mxr <= _zz_421_[0]; + MmuPlugin_status_sum <= _zz_422_[0]; + MmuPlugin_status_mprv <= _zz_423_[0]; + CsrPlugin_sstatus_SPP <= execute_CsrPlugin_writeData[8 : 8]; + CsrPlugin_sstatus_SPIE <= _zz_424_[0]; + CsrPlugin_sstatus_SIE <= _zz_425_[0]; + end + end + 12'b001100000010 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_medeleg_EU <= _zz_426_[0]; + CsrPlugin_medeleg_II <= _zz_427_[0]; + CsrPlugin_medeleg_LAF <= _zz_428_[0]; + CsrPlugin_medeleg_LPF <= _zz_429_[0]; + CsrPlugin_medeleg_LAM <= _zz_430_[0]; + CsrPlugin_medeleg_SAF <= _zz_431_[0]; + CsrPlugin_medeleg_IAF <= _zz_432_[0]; + CsrPlugin_medeleg_ES <= _zz_433_[0]; + CsrPlugin_medeleg_IPF <= _zz_434_[0]; + CsrPlugin_medeleg_SPF <= _zz_435_[0]; + CsrPlugin_medeleg_SAM <= _zz_436_[0]; + CsrPlugin_medeleg_IAM <= _zz_437_[0]; + end + end + 12'b001101000001 : begin + end + 12'b001101000100 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_sip_STIP <= _zz_439_[0]; + CsrPlugin_sip_SSIP <= _zz_440_[0]; + CsrPlugin_sip_SEIP_SOFT <= _zz_441_[0]; + end + end + 12'b001100000101 : begin + end + 12'b000110000000 : begin + if(execute_CsrPlugin_writeEnable)begin + MmuPlugin_satp_mode <= _zz_442_[0]; + end + end + 12'b110011000000 : begin + end + 12'b000101000001 : begin + end + 12'b111100010011 : begin + end + 12'b000101000100 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_sip_STIP <= _zz_443_[0]; + CsrPlugin_sip_SSIP <= _zz_444_[0]; + CsrPlugin_sip_SEIP_SOFT <= _zz_445_[0]; + end + end + 12'b001101000011 : begin + end + 12'b000100000101 : begin + end + 12'b111111000000 : begin + end + 12'b001101000000 : begin + end + 12'b001100000100 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mie_MEIE <= _zz_446_[0]; + CsrPlugin_mie_MTIE <= _zz_447_[0]; + CsrPlugin_mie_MSIE <= _zz_448_[0]; + CsrPlugin_sie_SEIE <= _zz_449_[0]; + CsrPlugin_sie_STIE <= _zz_450_[0]; + CsrPlugin_sie_SSIE <= _zz_451_[0]; + end + end + 12'b111100010010 : begin + end + 12'b000101000011 : begin + end + 12'b110111000000 : begin + end + 12'b000101000000 : begin + end + 12'b001101000010 : begin + end + 12'b000100000100 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_sie_SEIE <= _zz_452_[0]; + CsrPlugin_sie_STIE <= _zz_453_[0]; + CsrPlugin_sie_SSIE <= _zz_454_[0]; + end + end + default : begin + end + endcase + if(_zz_305_)begin + if(iBusWishbone_ACK)begin + _zz_211_ <= (_zz_211_ + (3'b001)); + end + end + _zz_212_ <= (iBusWishbone_CYC && iBusWishbone_ACK); + if((_zz_214_ && _zz_215_))begin + _zz_213_ <= (_zz_213_ + (3'b001)); + if(_zz_217_)begin + _zz_213_ <= (3'b000); + end + end + _zz_219_ <= ((_zz_214_ && (! dBusWishbone_WE)) && dBusWishbone_ACK); + end + end + + always @ (posedge clk) begin + if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin + _zz_112_ <= IBusCachedPlugin_iBusRsp_stages_1_output_payload; + end + if(IBusCachedPlugin_iBusRsp_stages_2_output_ready)begin + _zz_115_ <= IBusCachedPlugin_iBusRsp_stages_2_output_payload; + end + if(IBusCachedPlugin_iBusRsp_stages_2_input_ready)begin + IBusCachedPlugin_s1_tightlyCoupledHit <= IBusCachedPlugin_s0_tightlyCoupledHit; + end + if(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)begin + IBusCachedPlugin_s2_tightlyCoupledHit <= IBusCachedPlugin_s1_tightlyCoupledHit; + end + if(_zz_306_)begin + _zz_118_ <= dataCache_1__io_mem_cmd_payload_wr; + _zz_119_ <= dataCache_1__io_mem_cmd_payload_address; + _zz_120_ <= dataCache_1__io_mem_cmd_payload_data; + _zz_121_ <= dataCache_1__io_mem_cmd_payload_mask; + _zz_122_ <= dataCache_1__io_mem_cmd_payload_length; + _zz_123_ <= dataCache_1__io_mem_cmd_payload_last; + end + if(dataCache_1__io_mem_cmd_s2mPipe_ready)begin + _zz_125_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_wr; + _zz_126_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_address; + _zz_127_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_data; + _zz_128_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_mask; + _zz_129_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_length; + _zz_130_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_last; + end + if((MmuPlugin_dBusAccess_rsp_valid && (! MmuPlugin_dBusAccess_rsp_payload_redo)))begin + MmuPlugin_shared_pteBuffer_V <= MmuPlugin_shared_dBusRsp_pte_V; + MmuPlugin_shared_pteBuffer_R <= MmuPlugin_shared_dBusRsp_pte_R; + MmuPlugin_shared_pteBuffer_W <= MmuPlugin_shared_dBusRsp_pte_W; + MmuPlugin_shared_pteBuffer_X <= MmuPlugin_shared_dBusRsp_pte_X; + MmuPlugin_shared_pteBuffer_U <= MmuPlugin_shared_dBusRsp_pte_U; + MmuPlugin_shared_pteBuffer_G <= MmuPlugin_shared_dBusRsp_pte_G; + MmuPlugin_shared_pteBuffer_A <= MmuPlugin_shared_dBusRsp_pte_A; + MmuPlugin_shared_pteBuffer_D <= MmuPlugin_shared_dBusRsp_pte_D; + MmuPlugin_shared_pteBuffer_RSW <= MmuPlugin_shared_dBusRsp_pte_RSW; + MmuPlugin_shared_pteBuffer_PPN0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; + MmuPlugin_shared_pteBuffer_PPN1 <= MmuPlugin_shared_dBusRsp_pte_PPN1; + end + case(MmuPlugin_shared_state_1_) + `MmuPlugin_shared_State_defaultEncoding_IDLE : begin + if(_zz_307_)begin + MmuPlugin_shared_vpn_1 <= IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22]; + MmuPlugin_shared_vpn_0 <= IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]; + MmuPlugin_shared_portId <= (1'b0); + end + if(_zz_308_)begin + MmuPlugin_shared_vpn_1 <= DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22]; + MmuPlugin_shared_vpn_0 <= DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]; + MmuPlugin_shared_portId <= (1'b1); + end + end + `MmuPlugin_shared_State_defaultEncoding_L1_CMD : begin + end + `MmuPlugin_shared_State_defaultEncoding_L1_RSP : begin + end + `MmuPlugin_shared_State_defaultEncoding_L0_CMD : begin + end + default : begin + end + endcase + if(_zz_293_)begin + if(_zz_294_)begin + if(_zz_309_)begin + MmuPlugin_ports_0_cache_0_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); + MmuPlugin_ports_0_cache_0_virtualAddress_0 <= MmuPlugin_shared_vpn_0; + MmuPlugin_ports_0_cache_0_virtualAddress_1 <= MmuPlugin_shared_vpn_1; + MmuPlugin_ports_0_cache_0_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; + MmuPlugin_ports_0_cache_0_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; + MmuPlugin_ports_0_cache_0_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; + MmuPlugin_ports_0_cache_0_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; + MmuPlugin_ports_0_cache_0_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; + MmuPlugin_ports_0_cache_0_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; + MmuPlugin_ports_0_cache_0_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); + end + if(_zz_310_)begin + MmuPlugin_ports_0_cache_1_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); + MmuPlugin_ports_0_cache_1_virtualAddress_0 <= MmuPlugin_shared_vpn_0; + MmuPlugin_ports_0_cache_1_virtualAddress_1 <= MmuPlugin_shared_vpn_1; + MmuPlugin_ports_0_cache_1_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; + MmuPlugin_ports_0_cache_1_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; + MmuPlugin_ports_0_cache_1_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; + MmuPlugin_ports_0_cache_1_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; + MmuPlugin_ports_0_cache_1_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; + MmuPlugin_ports_0_cache_1_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; + MmuPlugin_ports_0_cache_1_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); + end + if(_zz_311_)begin + MmuPlugin_ports_0_cache_2_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); + MmuPlugin_ports_0_cache_2_virtualAddress_0 <= MmuPlugin_shared_vpn_0; + MmuPlugin_ports_0_cache_2_virtualAddress_1 <= MmuPlugin_shared_vpn_1; + MmuPlugin_ports_0_cache_2_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; + MmuPlugin_ports_0_cache_2_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; + MmuPlugin_ports_0_cache_2_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; + MmuPlugin_ports_0_cache_2_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; + MmuPlugin_ports_0_cache_2_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; + MmuPlugin_ports_0_cache_2_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; + MmuPlugin_ports_0_cache_2_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); + end + if(_zz_312_)begin + MmuPlugin_ports_0_cache_3_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); + MmuPlugin_ports_0_cache_3_virtualAddress_0 <= MmuPlugin_shared_vpn_0; + MmuPlugin_ports_0_cache_3_virtualAddress_1 <= MmuPlugin_shared_vpn_1; + MmuPlugin_ports_0_cache_3_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; + MmuPlugin_ports_0_cache_3_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; + MmuPlugin_ports_0_cache_3_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; + MmuPlugin_ports_0_cache_3_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; + MmuPlugin_ports_0_cache_3_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; + MmuPlugin_ports_0_cache_3_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; + MmuPlugin_ports_0_cache_3_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); + end + end + if(_zz_295_)begin + if(_zz_313_)begin + MmuPlugin_ports_1_cache_0_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); + MmuPlugin_ports_1_cache_0_virtualAddress_0 <= MmuPlugin_shared_vpn_0; + MmuPlugin_ports_1_cache_0_virtualAddress_1 <= MmuPlugin_shared_vpn_1; + MmuPlugin_ports_1_cache_0_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; + MmuPlugin_ports_1_cache_0_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; + MmuPlugin_ports_1_cache_0_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; + MmuPlugin_ports_1_cache_0_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; + MmuPlugin_ports_1_cache_0_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; + MmuPlugin_ports_1_cache_0_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; + MmuPlugin_ports_1_cache_0_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); + end + if(_zz_314_)begin + MmuPlugin_ports_1_cache_1_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); + MmuPlugin_ports_1_cache_1_virtualAddress_0 <= MmuPlugin_shared_vpn_0; + MmuPlugin_ports_1_cache_1_virtualAddress_1 <= MmuPlugin_shared_vpn_1; + MmuPlugin_ports_1_cache_1_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; + MmuPlugin_ports_1_cache_1_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; + MmuPlugin_ports_1_cache_1_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; + MmuPlugin_ports_1_cache_1_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; + MmuPlugin_ports_1_cache_1_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; + MmuPlugin_ports_1_cache_1_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; + MmuPlugin_ports_1_cache_1_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); + end + if(_zz_315_)begin + MmuPlugin_ports_1_cache_2_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); + MmuPlugin_ports_1_cache_2_virtualAddress_0 <= MmuPlugin_shared_vpn_0; + MmuPlugin_ports_1_cache_2_virtualAddress_1 <= MmuPlugin_shared_vpn_1; + MmuPlugin_ports_1_cache_2_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; + MmuPlugin_ports_1_cache_2_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; + MmuPlugin_ports_1_cache_2_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; + MmuPlugin_ports_1_cache_2_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; + MmuPlugin_ports_1_cache_2_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; + MmuPlugin_ports_1_cache_2_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; + MmuPlugin_ports_1_cache_2_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); + end + if(_zz_316_)begin + MmuPlugin_ports_1_cache_3_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); + MmuPlugin_ports_1_cache_3_virtualAddress_0 <= MmuPlugin_shared_vpn_0; + MmuPlugin_ports_1_cache_3_virtualAddress_1 <= MmuPlugin_shared_vpn_1; + MmuPlugin_ports_1_cache_3_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; + MmuPlugin_ports_1_cache_3_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; + MmuPlugin_ports_1_cache_3_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; + MmuPlugin_ports_1_cache_3_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; + MmuPlugin_ports_1_cache_3_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; + MmuPlugin_ports_1_cache_3_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; + MmuPlugin_ports_1_cache_3_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); + end + end + end + if(_zz_171_)begin + _zz_173_ <= _zz_53_[11 : 7]; + _zz_174_ <= _zz_87_; + end + CsrPlugin_mip_MEIP <= externalInterrupt; + CsrPlugin_mip_MTIP <= timerInterrupt; + CsrPlugin_mip_MSIP <= softwareInterrupt; + CsrPlugin_sip_SEIP_INPUT <= externalInterruptS; + CsrPlugin_mcycle <= (CsrPlugin_mcycle + (64'b0000000000000000000000000000000000000000000000000000000000000001)); + if(writeBack_arbitration_isFiring)begin + CsrPlugin_minstret <= (CsrPlugin_minstret + (64'b0000000000000000000000000000000000000000000000000000000000000001)); + end + if(_zz_282_)begin + CsrPlugin_exceptionPortCtrl_exceptionContext_code <= (_zz_199_ ? IBusCachedPlugin_decodeExceptionPort_payload_code : decodeExceptionPort_payload_code); + CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= (_zz_199_ ? IBusCachedPlugin_decodeExceptionPort_payload_badAddr : decodeExceptionPort_payload_badAddr); + end + if(CsrPlugin_selfException_valid)begin + CsrPlugin_exceptionPortCtrl_exceptionContext_code <= CsrPlugin_selfException_payload_code; + CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= CsrPlugin_selfException_payload_badAddr; + end + if(BranchPlugin_branchExceptionPort_valid)begin + CsrPlugin_exceptionPortCtrl_exceptionContext_code <= BranchPlugin_branchExceptionPort_payload_code; + CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= BranchPlugin_branchExceptionPort_payload_badAddr; + end + if(DBusCachedPlugin_exceptionBus_valid)begin + CsrPlugin_exceptionPortCtrl_exceptionContext_code <= DBusCachedPlugin_exceptionBus_payload_code; + CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= DBusCachedPlugin_exceptionBus_payload_badAddr; + end + if(_zz_317_)begin + if(_zz_318_)begin + CsrPlugin_interrupt_code <= (4'b0101); + CsrPlugin_interrupt_targetPrivilege <= (2'b01); + end + if(_zz_319_)begin + CsrPlugin_interrupt_code <= (4'b0001); + CsrPlugin_interrupt_targetPrivilege <= (2'b01); + end + if(_zz_320_)begin + CsrPlugin_interrupt_code <= (4'b1001); + CsrPlugin_interrupt_targetPrivilege <= (2'b01); + end + end + if(_zz_321_)begin + if(_zz_322_)begin + CsrPlugin_interrupt_code <= (4'b0101); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + if(_zz_323_)begin + CsrPlugin_interrupt_code <= (4'b0001); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + if(_zz_324_)begin + CsrPlugin_interrupt_code <= (4'b1001); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + if(_zz_325_)begin + CsrPlugin_interrupt_code <= (4'b0111); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + if(_zz_326_)begin + CsrPlugin_interrupt_code <= (4'b0011); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + if(_zz_327_)begin + CsrPlugin_interrupt_code <= (4'b1011); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + end + if(_zz_286_)begin + case(CsrPlugin_targetPrivilege) + 2'b01 : begin + CsrPlugin_scause_interrupt <= (! CsrPlugin_hadException); + CsrPlugin_scause_exceptionCode <= CsrPlugin_trapCause; + CsrPlugin_sepc <= writeBack_PC; + if(CsrPlugin_hadException)begin + CsrPlugin_stval <= CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; + end + end + 2'b11 : begin + CsrPlugin_mcause_interrupt <= (! CsrPlugin_hadException); + CsrPlugin_mcause_exceptionCode <= CsrPlugin_trapCause; + CsrPlugin_mepc <= writeBack_PC; + if(CsrPlugin_hadException)begin + CsrPlugin_mtval <= CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; + end + end + default : begin + end + endcase + end + if(_zz_276_)begin + if(_zz_284_)begin + memory_MulDivIterativePlugin_rs2 <= (memory_MulDivIterativePlugin_rs2 >>> 1); + memory_MulDivIterativePlugin_accumulator <= ({_zz_389_,memory_MulDivIterativePlugin_accumulator[31 : 0]} >>> 1); + end + end + if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin + memory_MulDivIterativePlugin_div_done <= 1'b1; + end + if((! memory_arbitration_isStuck))begin + memory_MulDivIterativePlugin_div_done <= 1'b0; + end + if(_zz_277_)begin + if(_zz_285_)begin + memory_MulDivIterativePlugin_rs1[31 : 0] <= _zz_398_[31:0]; + memory_MulDivIterativePlugin_accumulator[31 : 0] <= ((! _zz_202_[32]) ? _zz_399_ : _zz_400_); + if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin + memory_MulDivIterativePlugin_div_result <= _zz_401_[31:0]; + end + end + end + if(_zz_304_)begin + memory_MulDivIterativePlugin_accumulator <= (65'b00000000000000000000000000000000000000000000000000000000000000000); + memory_MulDivIterativePlugin_rs1 <= ((_zz_205_ ? (~ _zz_206_) : _zz_206_) + _zz_407_); + memory_MulDivIterativePlugin_rs2 <= ((_zz_204_ ? (~ execute_RS2) : execute_RS2) + _zz_409_); + memory_MulDivIterativePlugin_div_needRevert <= ((_zz_205_ ^ (_zz_204_ && (! execute_INSTRUCTION[13]))) && (! (((execute_RS2 == (32'b00000000000000000000000000000000)) && execute_IS_RS2_SIGNED) && (! execute_INSTRUCTION[13])))); + end + externalInterruptArray_regNext <= externalInterruptArray; + if((! memory_arbitration_isStuck))begin + execute_to_memory_BRANCH_DO <= execute_BRANCH_DO; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_MEMORY_LRSC <= decode_MEMORY_LRSC; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_RS2 <= decode_RS2; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SHIFT_CTRL <= _zz_26_; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_SHIFT_CTRL <= _zz_23_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_INSTRUCTION <= decode_INSTRUCTION; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_INSTRUCTION <= execute_INSTRUCTION; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_MEMORY_MANAGMENT <= decode_MEMORY_MANAGMENT; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_MUL <= decode_IS_MUL; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_IS_MUL <= execute_IS_MUL; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_CSR <= decode_IS_CSR; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_SHIFT_RIGHT <= execute_SHIFT_RIGHT; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_ALU_CTRL <= _zz_21_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC_LESS_UNSIGNED <= decode_SRC_LESS_UNSIGNED; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_REGFILE_WRITE_VALID <= decode_REGFILE_WRITE_VALID; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_REGFILE_WRITE_VALID <= execute_REGFILE_WRITE_VALID; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_REGFILE_WRITE_VALID <= memory_REGFILE_WRITE_VALID; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_ENV_CTRL <= _zz_18_; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_ENV_CTRL <= _zz_15_; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_ENV_CTRL <= _zz_13_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_PC <= decode_PC; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_PC <= _zz_44_; + end + if(((! writeBack_arbitration_isStuck) && (! CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack)))begin + memory_to_writeBack_PC <= memory_PC; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC2_CTRL <= _zz_11_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_BYPASSABLE_MEMORY_STAGE <= decode_BYPASSABLE_MEMORY_STAGE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_BYPASSABLE_MEMORY_STAGE <= execute_BYPASSABLE_MEMORY_STAGE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC_USE_SUB_LESS <= decode_SRC_USE_SUB_LESS; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_CSR_READ_OPCODE <= decode_CSR_READ_OPCODE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_MEMORY_AMO <= decode_MEMORY_AMO; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_FORMAL_PC_NEXT <= _zz_94_; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_FORMAL_PC_NEXT <= execute_FORMAL_PC_NEXT; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_FORMAL_PC_NEXT <= _zz_93_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_MEMORY_WR <= decode_MEMORY_WR; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MEMORY_WR <= execute_MEMORY_WR; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_WR <= memory_MEMORY_WR; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC1_CTRL <= _zz_8_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_RS1_SIGNED <= decode_IS_RS1_SIGNED; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_DIV <= decode_IS_DIV; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_IS_DIV <= execute_IS_DIV; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MEMORY_ADDRESS_LOW <= execute_MEMORY_ADDRESS_LOW; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_ADDRESS_LOW <= memory_MEMORY_ADDRESS_LOW; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_ALU_BITWISE_CTRL <= _zz_5_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_SFENCE_VMA <= decode_IS_SFENCE_VMA; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_IS_SFENCE_VMA <= execute_IS_SFENCE_VMA; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_IS_SFENCE_VMA <= memory_IS_SFENCE_VMA; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_MEMORY_ENABLE <= decode_MEMORY_ENABLE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MEMORY_ENABLE <= execute_MEMORY_ENABLE; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_ENABLE <= memory_MEMORY_ENABLE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_REGFILE_WRITE_DATA <= _zz_36_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_CSR_WRITE_OPCODE <= decode_CSR_WRITE_OPCODE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_BRANCH_CTRL <= _zz_2_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_RS1 <= decode_RS1; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_BRANCH_CALC <= execute_BRANCH_CALC; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_RS2_SIGNED <= decode_IS_RS2_SIGNED; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_BYPASSABLE_EXECUTE_STAGE <= decode_BYPASSABLE_EXECUTE_STAGE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC2_FORCE_ZERO <= decode_SRC2_FORCE_ZERO; + end + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + end + 12'b001100000000 : begin + end + 12'b001100000011 : begin + end + 12'b111100010001 : begin + end + 12'b000101000010 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_scause_interrupt <= _zz_420_[0]; + CsrPlugin_scause_exceptionCode <= execute_CsrPlugin_writeData[3 : 0]; + end + end + 12'b111100010100 : begin + end + 12'b100111000000 : begin + end + 12'b000100000000 : begin + end + 12'b001100000010 : begin + end + 12'b001101000001 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mepc <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b001101000100 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mip_MSIP <= _zz_438_[0]; + end + end + 12'b001100000101 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mtvec_base <= execute_CsrPlugin_writeData[31 : 2]; + CsrPlugin_mtvec_mode <= execute_CsrPlugin_writeData[1 : 0]; + end + end + 12'b000110000000 : begin + if(execute_CsrPlugin_writeEnable)begin + MmuPlugin_satp_ppn <= execute_CsrPlugin_writeData[19 : 0]; + end + end + 12'b110011000000 : begin + end + 12'b000101000001 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_sepc <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b111100010011 : begin + end + 12'b000101000100 : begin + end + 12'b001101000011 : begin + end + 12'b000100000101 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_stvec_base <= execute_CsrPlugin_writeData[31 : 2]; + CsrPlugin_stvec_mode <= execute_CsrPlugin_writeData[1 : 0]; + end + end + 12'b111111000000 : begin + end + 12'b001101000000 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mscratch <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b001100000100 : begin + end + 12'b111100010010 : begin + end + 12'b000101000011 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_stval <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b110111000000 : begin + end + 12'b000101000000 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_sscratch <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b001101000010 : begin + end + 12'b000100000100 : begin + end + default : begin + end + endcase + iBusWishbone_DAT_MISO_regNext <= iBusWishbone_DAT_MISO; + dBusWishbone_DAT_MISO_regNext <= dBusWishbone_DAT_MISO; + end + +endmodule + diff --git a/sdc-plugin/tests/base_litex/base_litex.sdc b/sdc-plugin/tests/base_litex/base_litex.sdc new file mode 100644 index 000000000..7ce1f0df0 --- /dev/null +++ b/sdc-plugin/tests/base_litex/base_litex.sdc @@ -0,0 +1,59 @@ +create_clock -name clk100 -period 10.0 clk100 + +# Input clock 100 MHz +create_clock -period 10 clk100_ibuf -waveform {0.000 5.000} + +# Input clock BUFG 100 MHz +create_clock -period 10 soc_clk100bg -waveform {0.000 5.000} + +# PLL feedback loop 100 MHz +create_clock -period 10 soc_pll_fb -waveform {0.000 5.000} + +# PLL CLKOUT0 60 MHz +create_clock -period 16.666 soc_pll_sys -waveform {0.000 8.333} + +# BUFG CLKOUT0 60 MHz +create_clock -period 16.666 sys_clk -waveform {0.000 8.333} + +# PLL CLKOUT1 240 MHz +create_clock -period 4.166 soc_pll_sys4x -waveform {0.000 2.083} + +# BUFG CLKOUT1 240 MHz +create_clock -period 4.166 sys4x_clk -waveform {0.000 2.083} + +# PLL CLKOUT2 240 MHz +create_clock -period 4.166 soc_pll_sys4x_dqs -waveform {1.041 3.124} + +# BUFG CLKOUT2 240 MHz +create_clock -period 4.166 sys4x_dqs_clk -waveform {1.041 3.124} + +# PLL CLKOUT3 200 MHz +create_clock -period 5 soc_pll_clk200 -waveform {0.000 2.500} + +# BUFG CLKOUT3 200 MHz +create_clock -period 5 clk200_clk -waveform {0.000 2.500} + +# PLL CLKOUT4 25 MHz +create_clock -period 40 soc_pll_clk100 -waveform {0.000 20.000} + +# BUFG CLKOUT4 25 MHz +create_clock -period 40 eth_ref_clk_obuf -waveform {0.000 20.000} + +set_clock_groups -exclusive -group {clk100 soc_clk100bg soc_pll_fb} -group {soc_pll_sys sys_clk} -group {soc_pll_sys4x soc_pll_sys4x_dqs} -group {soc_pll_clk200 clk200_clk} +#create_clock -name sys_clk -period 16.666 [get_nets sys_clk] +# +#create_clock -name eth_rx_clk -period 40.0 [get_nets eth_rx_clk] +# +#create_clock -name eth_tx_clk -period 40.0 [get_nets eth_tx_clk] +# +#set_clock_groups -group [get_clocks -include_generated_clocks -of [get_nets sys_clk]] -group [get_clocks -include_generated_clocks -of [get_nets eth_rx_clk]] -asynchronous +# +#set_clock_groups -group [get_clocks -include_generated_clocks -of [get_nets sys_clk]] -group [get_clocks -include_generated_clocks -of [get_nets eth_tx_clk]] -asynchronous +# +#set_clock_groups -group [get_clocks -include_generated_clocks -of [get_nets eth_rx_clk]] -group [get_clocks -include_generated_clocks -of [get_nets eth_tx_clk]] -asynchronous +# +#set_false_path -quiet -to [get_nets -quiet -filter {mr_ff == TRUE}] +# +#set_false_path -quiet -to [get_pins -quiet -filter {REF_PIN_NAME == PRE} -of [get_cells -quiet -filter {ars_ff1 == TRUE || ars_ff2 == TRUE}]] +# +#set_max_delay 2 -quiet -from [get_pins -quiet -filter {REF_PIN_NAME == Q} -of [get_cells -quiet -filter {ars_ff1 == TRUE}]] -to [get_pins -quiet -filter {REF_PIN_NAME == D} -of [get_cells -quiet -filter {ars_ff2 == TRUE}]] diff --git a/sdc-plugin/tests/base_litex/base_litex.tcl b/sdc-plugin/tests/base_litex/base_litex.tcl new file mode 100644 index 000000000..efee8f4f4 --- /dev/null +++ b/sdc-plugin/tests/base_litex/base_litex.tcl @@ -0,0 +1,38 @@ +yosys -import +plugin -i xdc +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog base_litex.v +read_verilog VexRiscv_Linux.v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top + +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +write_json $::env(OUT_JSON) +return +#Read the design timing constraints +read_sdc $::env(INPUT_SDC_FILE) + +#Read the design constraints +read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) + +# Map Xilinx tech library to 7-series VPR tech library. +read_verilog -lib ../techmaps/cells_sim.v +techmap -map ../techmaps/cells_map.v + +# opt_expr -undriven makes sure all nets are driven, if only by the $undef +# net. +opt_expr -undriven +opt_clean + +setundef -zero -params +stat + +# Write the design in JSON format. +write_json $::env(OUT_JSON) +write_blif -attr -param -cname -conn $::env(OUT_EBLIF) diff --git a/sdc-plugin/tests/base_litex/base_litex.v b/sdc-plugin/tests/base_litex/base_litex.v new file mode 100644 index 000000000..1689edab0 --- /dev/null +++ b/sdc-plugin/tests/base_litex/base_litex.v @@ -0,0 +1,15844 @@ +//-------------------------------------------------------------------------------- +// Auto-generated by Migen (d11565a) & LiteX (02bfda5e) on 2020-02-19 17:32:00 +//-------------------------------------------------------------------------------- +module top( + output reg serial_tx, + input serial_rx, + input clk100, + input cpu_reset, + output eth_ref_clk, + output [13:0] ddram_a, + output [2:0] ddram_ba, + output ddram_ras_n, + output ddram_cas_n, + output ddram_we_n, + output ddram_cs_n, + output [1:0] ddram_dm, + inout [15:0] ddram_dq, + output [1:0] ddram_dqs_p, + output [1:0] ddram_dqs_n, + output ddram_clk_p, + output ddram_clk_n, + output ddram_cke, + output ddram_odt, + output ddram_reset_n, + input eth_clocks_tx, + input eth_clocks_rx, + output eth_rst_n, + inout eth_mdio, + output eth_mdc, + input eth_rx_dv, + input eth_rx_er, + input [3:0] eth_rx_data, + output reg eth_tx_en, + output reg [3:0] eth_tx_data, + input eth_col, + input eth_crs, + output [3:0] led +); + +wire [3:0] led; + +assign led[0] = idelayctl_rdy; +assign led[1] = soc_pll_locked; +assign led[2] = 0; +assign led[3] = 0; + +// Manually inserted OBUFs +wire [13:0] ddram_a; +wire [ 2:0] ddram_ba; +wire ddram_ras_n; +wire ddram_cas_n; +wire ddram_we_n; +wire ddram_cs_n; +wire [ 1:0] ddram_dm; +wire ddram_cke; +wire ddram_odt; +wire ddram_reset_n; + +// End manually inserted OBUFs + +wire eth_ref_clk_obuf; +wire idelayctl_rdy; +wire soc_netsoc_ctrl_reset_reset_re; +wire soc_netsoc_ctrl_reset_reset_r; +wire soc_netsoc_ctrl_reset_reset_we; +reg soc_netsoc_ctrl_reset_reset_w = 1'd0; +reg [31:0] soc_netsoc_ctrl_storage = 32'd305419896; +reg soc_netsoc_ctrl_re = 1'd0; +wire [31:0] soc_netsoc_ctrl_bus_errors_status; +wire soc_netsoc_ctrl_bus_errors_we; +wire soc_netsoc_ctrl_reset; +wire soc_netsoc_ctrl_bus_error; +reg [31:0] soc_netsoc_ctrl_bus_errors = 32'd0; +wire soc_netsoc_cpu_reset; +wire [29:0] soc_netsoc_cpu_ibus_adr; +wire [31:0] soc_netsoc_cpu_ibus_dat_w; +wire [31:0] soc_netsoc_cpu_ibus_dat_r; +wire [3:0] soc_netsoc_cpu_ibus_sel; +wire soc_netsoc_cpu_ibus_cyc; +wire soc_netsoc_cpu_ibus_stb; +wire soc_netsoc_cpu_ibus_ack; +wire soc_netsoc_cpu_ibus_we; +wire [2:0] soc_netsoc_cpu_ibus_cti; +wire [1:0] soc_netsoc_cpu_ibus_bte; +wire soc_netsoc_cpu_ibus_err; +wire [29:0] soc_netsoc_cpu_dbus_adr; +wire [31:0] soc_netsoc_cpu_dbus_dat_w; +wire [31:0] soc_netsoc_cpu_dbus_dat_r; +wire [3:0] soc_netsoc_cpu_dbus_sel; +wire soc_netsoc_cpu_dbus_cyc; +wire soc_netsoc_cpu_dbus_stb; +wire soc_netsoc_cpu_dbus_ack; +wire soc_netsoc_cpu_dbus_we; +wire [2:0] soc_netsoc_cpu_dbus_cti; +wire [1:0] soc_netsoc_cpu_dbus_bte; +wire soc_netsoc_cpu_dbus_err; +reg [31:0] soc_netsoc_cpu_interrupt0 = 32'd0; +wire soc_netsoc_cpu_latch_re; +wire soc_netsoc_cpu_latch_r; +wire soc_netsoc_cpu_latch_we; +reg soc_netsoc_cpu_latch_w = 1'd0; +reg [63:0] soc_netsoc_cpu_time_status = 64'd0; +wire soc_netsoc_cpu_time_we; +reg [63:0] soc_netsoc_cpu_time_cmp_storage = 64'd18446744073709551615; +reg soc_netsoc_cpu_time_cmp_re = 1'd0; +wire soc_netsoc_cpu_interrupt1; +reg [63:0] soc_netsoc_cpu_time = 64'd0; +reg [63:0] soc_netsoc_cpu_time_cmp = 64'd18446744073709551615; +wire [29:0] soc_netsoc_interface0_soc_bus_adr; +wire [31:0] soc_netsoc_interface0_soc_bus_dat_w; +wire [31:0] soc_netsoc_interface0_soc_bus_dat_r; +wire [3:0] soc_netsoc_interface0_soc_bus_sel; +wire soc_netsoc_interface0_soc_bus_cyc; +wire soc_netsoc_interface0_soc_bus_stb; +wire soc_netsoc_interface0_soc_bus_ack; +wire soc_netsoc_interface0_soc_bus_we; +wire [2:0] soc_netsoc_interface0_soc_bus_cti; +wire [1:0] soc_netsoc_interface0_soc_bus_bte; +wire soc_netsoc_interface0_soc_bus_err; +wire [29:0] soc_netsoc_interface1_soc_bus_adr; +wire [31:0] soc_netsoc_interface1_soc_bus_dat_w; +wire [31:0] soc_netsoc_interface1_soc_bus_dat_r; +wire [3:0] soc_netsoc_interface1_soc_bus_sel; +wire soc_netsoc_interface1_soc_bus_cyc; +wire soc_netsoc_interface1_soc_bus_stb; +wire soc_netsoc_interface1_soc_bus_ack; +wire soc_netsoc_interface1_soc_bus_we; +wire [2:0] soc_netsoc_interface1_soc_bus_cti; +wire [1:0] soc_netsoc_interface1_soc_bus_bte; +wire soc_netsoc_interface1_soc_bus_err; +wire [29:0] soc_netsoc_rom_bus_adr; +wire [31:0] soc_netsoc_rom_bus_dat_w; +wire [31:0] soc_netsoc_rom_bus_dat_r; +wire [3:0] soc_netsoc_rom_bus_sel; +wire soc_netsoc_rom_bus_cyc; +wire soc_netsoc_rom_bus_stb; +reg soc_netsoc_rom_bus_ack = 1'd0; +wire soc_netsoc_rom_bus_we; +wire [2:0] soc_netsoc_rom_bus_cti; +wire [1:0] soc_netsoc_rom_bus_bte; +reg soc_netsoc_rom_bus_err = 1'd0; +wire [13:0] soc_netsoc_rom_adr; +wire [31:0] soc_netsoc_rom_dat_r; +wire [29:0] soc_netsoc_sram_bus_adr; +wire [31:0] soc_netsoc_sram_bus_dat_w; +wire [31:0] soc_netsoc_sram_bus_dat_r; +wire [3:0] soc_netsoc_sram_bus_sel; +wire soc_netsoc_sram_bus_cyc; +wire soc_netsoc_sram_bus_stb; +reg soc_netsoc_sram_bus_ack = 1'd0; +wire soc_netsoc_sram_bus_we; +wire [2:0] soc_netsoc_sram_bus_cti; +wire [1:0] soc_netsoc_sram_bus_bte; +reg soc_netsoc_sram_bus_err = 1'd0; +wire [12:0] soc_netsoc_sram_adr; +wire [31:0] soc_netsoc_sram_dat_r; +reg [3:0] soc_netsoc_sram_we = 4'd0; +wire [31:0] soc_netsoc_sram_dat_w; +reg [31:0] soc_netsoc_uart_phy_storage = 32'd8246337; +reg soc_netsoc_uart_phy_re = 1'd0; +wire soc_netsoc_uart_phy_sink_valid; +reg soc_netsoc_uart_phy_sink_ready = 1'd0; +wire soc_netsoc_uart_phy_sink_first; +wire soc_netsoc_uart_phy_sink_last; +wire [7:0] soc_netsoc_uart_phy_sink_payload_data; +reg soc_netsoc_uart_phy_uart_clk_txen = 1'd0; +reg [31:0] soc_netsoc_uart_phy_phase_accumulator_tx = 32'd0; +reg [7:0] soc_netsoc_uart_phy_tx_reg = 8'd0; +reg [3:0] soc_netsoc_uart_phy_tx_bitcount = 4'd0; +reg soc_netsoc_uart_phy_tx_busy = 1'd0; +reg soc_netsoc_uart_phy_source_valid = 1'd0; +wire soc_netsoc_uart_phy_source_ready; +reg soc_netsoc_uart_phy_source_first = 1'd0; +reg soc_netsoc_uart_phy_source_last = 1'd0; +reg [7:0] soc_netsoc_uart_phy_source_payload_data = 8'd0; +reg soc_netsoc_uart_phy_uart_clk_rxen = 1'd0; +reg [31:0] soc_netsoc_uart_phy_phase_accumulator_rx = 32'd0; +wire soc_netsoc_uart_phy_rx; +reg soc_netsoc_uart_phy_rx_r = 1'd0; +reg [7:0] soc_netsoc_uart_phy_rx_reg = 8'd0; +reg [3:0] soc_netsoc_uart_phy_rx_bitcount = 4'd0; +reg soc_netsoc_uart_phy_rx_busy = 1'd0; +wire soc_netsoc_uart_rxtx_re; +wire [7:0] soc_netsoc_uart_rxtx_r; +wire soc_netsoc_uart_rxtx_we; +wire [7:0] soc_netsoc_uart_rxtx_w; +wire soc_netsoc_uart_txfull_status; +wire soc_netsoc_uart_txfull_we; +wire soc_netsoc_uart_rxempty_status; +wire soc_netsoc_uart_rxempty_we; +wire soc_netsoc_uart_irq; +wire soc_netsoc_uart_tx_status; +reg soc_netsoc_uart_tx_pending = 1'd0; +wire soc_netsoc_uart_tx_trigger; +reg soc_netsoc_uart_tx_clear = 1'd0; +reg soc_netsoc_uart_tx_old_trigger = 1'd0; +wire soc_netsoc_uart_rx_status; +reg soc_netsoc_uart_rx_pending = 1'd0; +wire soc_netsoc_uart_rx_trigger; +reg soc_netsoc_uart_rx_clear = 1'd0; +reg soc_netsoc_uart_rx_old_trigger = 1'd0; +wire soc_netsoc_uart_eventmanager_status_re; +wire [1:0] soc_netsoc_uart_eventmanager_status_r; +wire soc_netsoc_uart_eventmanager_status_we; +reg [1:0] soc_netsoc_uart_eventmanager_status_w = 2'd0; +wire soc_netsoc_uart_eventmanager_pending_re; +wire [1:0] soc_netsoc_uart_eventmanager_pending_r; +wire soc_netsoc_uart_eventmanager_pending_we; +reg [1:0] soc_netsoc_uart_eventmanager_pending_w = 2'd0; +reg [1:0] soc_netsoc_uart_eventmanager_storage = 2'd0; +reg soc_netsoc_uart_eventmanager_re = 1'd0; +wire soc_netsoc_uart_tx_fifo_sink_valid; +wire soc_netsoc_uart_tx_fifo_sink_ready; +reg soc_netsoc_uart_tx_fifo_sink_first = 1'd0; +reg soc_netsoc_uart_tx_fifo_sink_last = 1'd0; +wire [7:0] soc_netsoc_uart_tx_fifo_sink_payload_data; +wire soc_netsoc_uart_tx_fifo_source_valid; +wire soc_netsoc_uart_tx_fifo_source_ready; +wire soc_netsoc_uart_tx_fifo_source_first; +wire soc_netsoc_uart_tx_fifo_source_last; +wire [7:0] soc_netsoc_uart_tx_fifo_source_payload_data; +wire soc_netsoc_uart_tx_fifo_re; +reg soc_netsoc_uart_tx_fifo_readable = 1'd0; +wire soc_netsoc_uart_tx_fifo_syncfifo_we; +wire soc_netsoc_uart_tx_fifo_syncfifo_writable; +wire soc_netsoc_uart_tx_fifo_syncfifo_re; +wire soc_netsoc_uart_tx_fifo_syncfifo_readable; +wire [9:0] soc_netsoc_uart_tx_fifo_syncfifo_din; +wire [9:0] soc_netsoc_uart_tx_fifo_syncfifo_dout; +reg [4:0] soc_netsoc_uart_tx_fifo_level0 = 5'd0; +reg soc_netsoc_uart_tx_fifo_replace = 1'd0; +reg [3:0] soc_netsoc_uart_tx_fifo_produce = 4'd0; +reg [3:0] soc_netsoc_uart_tx_fifo_consume = 4'd0; +reg [3:0] soc_netsoc_uart_tx_fifo_wrport_adr = 4'd0; +wire [9:0] soc_netsoc_uart_tx_fifo_wrport_dat_r; +wire soc_netsoc_uart_tx_fifo_wrport_we; +wire [9:0] soc_netsoc_uart_tx_fifo_wrport_dat_w; +wire soc_netsoc_uart_tx_fifo_do_read; +wire [3:0] soc_netsoc_uart_tx_fifo_rdport_adr; +wire [9:0] soc_netsoc_uart_tx_fifo_rdport_dat_r; +wire soc_netsoc_uart_tx_fifo_rdport_re; +wire [4:0] soc_netsoc_uart_tx_fifo_level1; +wire [7:0] soc_netsoc_uart_tx_fifo_fifo_in_payload_data; +wire soc_netsoc_uart_tx_fifo_fifo_in_first; +wire soc_netsoc_uart_tx_fifo_fifo_in_last; +wire [7:0] soc_netsoc_uart_tx_fifo_fifo_out_payload_data; +wire soc_netsoc_uart_tx_fifo_fifo_out_first; +wire soc_netsoc_uart_tx_fifo_fifo_out_last; +wire soc_netsoc_uart_rx_fifo_sink_valid; +wire soc_netsoc_uart_rx_fifo_sink_ready; +wire soc_netsoc_uart_rx_fifo_sink_first; +wire soc_netsoc_uart_rx_fifo_sink_last; +wire [7:0] soc_netsoc_uart_rx_fifo_sink_payload_data; +wire soc_netsoc_uart_rx_fifo_source_valid; +wire soc_netsoc_uart_rx_fifo_source_ready; +wire soc_netsoc_uart_rx_fifo_source_first; +wire soc_netsoc_uart_rx_fifo_source_last; +wire [7:0] soc_netsoc_uart_rx_fifo_source_payload_data; +wire soc_netsoc_uart_rx_fifo_re; +reg soc_netsoc_uart_rx_fifo_readable = 1'd0; +wire soc_netsoc_uart_rx_fifo_syncfifo_we; +wire soc_netsoc_uart_rx_fifo_syncfifo_writable; +wire soc_netsoc_uart_rx_fifo_syncfifo_re; +wire soc_netsoc_uart_rx_fifo_syncfifo_readable; +wire [9:0] soc_netsoc_uart_rx_fifo_syncfifo_din; +wire [9:0] soc_netsoc_uart_rx_fifo_syncfifo_dout; +reg [4:0] soc_netsoc_uart_rx_fifo_level0 = 5'd0; +reg soc_netsoc_uart_rx_fifo_replace = 1'd0; +reg [3:0] soc_netsoc_uart_rx_fifo_produce = 4'd0; +reg [3:0] soc_netsoc_uart_rx_fifo_consume = 4'd0; +reg [3:0] soc_netsoc_uart_rx_fifo_wrport_adr = 4'd0; +wire [9:0] soc_netsoc_uart_rx_fifo_wrport_dat_r; +wire soc_netsoc_uart_rx_fifo_wrport_we; +wire [9:0] soc_netsoc_uart_rx_fifo_wrport_dat_w; +wire soc_netsoc_uart_rx_fifo_do_read; +wire [3:0] soc_netsoc_uart_rx_fifo_rdport_adr; +wire [9:0] soc_netsoc_uart_rx_fifo_rdport_dat_r; +wire soc_netsoc_uart_rx_fifo_rdport_re; +wire [4:0] soc_netsoc_uart_rx_fifo_level1; +wire [7:0] soc_netsoc_uart_rx_fifo_fifo_in_payload_data; +wire soc_netsoc_uart_rx_fifo_fifo_in_first; +wire soc_netsoc_uart_rx_fifo_fifo_in_last; +wire [7:0] soc_netsoc_uart_rx_fifo_fifo_out_payload_data; +wire soc_netsoc_uart_rx_fifo_fifo_out_first; +wire soc_netsoc_uart_rx_fifo_fifo_out_last; +reg soc_netsoc_uart_reset = 1'd0; +reg [31:0] soc_netsoc_timer0_load_storage = 32'd0; +reg soc_netsoc_timer0_load_re = 1'd0; +reg [31:0] soc_netsoc_timer0_reload_storage = 32'd0; +reg soc_netsoc_timer0_reload_re = 1'd0; +reg soc_netsoc_timer0_en_storage = 1'd0; +reg soc_netsoc_timer0_en_re = 1'd0; +reg soc_netsoc_timer0_update_value_storage = 1'd0; +reg soc_netsoc_timer0_update_value_re = 1'd0; +reg [31:0] soc_netsoc_timer0_value_status = 32'd0; +wire soc_netsoc_timer0_value_we; +wire soc_netsoc_timer0_irq; +wire soc_netsoc_timer0_zero_status; +reg soc_netsoc_timer0_zero_pending = 1'd0; +wire soc_netsoc_timer0_zero_trigger; +reg soc_netsoc_timer0_zero_clear = 1'd0; +reg soc_netsoc_timer0_zero_old_trigger = 1'd0; +wire soc_netsoc_timer0_eventmanager_status_re; +wire soc_netsoc_timer0_eventmanager_status_r; +wire soc_netsoc_timer0_eventmanager_status_we; +wire soc_netsoc_timer0_eventmanager_status_w; +wire soc_netsoc_timer0_eventmanager_pending_re; +wire soc_netsoc_timer0_eventmanager_pending_r; +wire soc_netsoc_timer0_eventmanager_pending_we; +wire soc_netsoc_timer0_eventmanager_pending_w; +reg soc_netsoc_timer0_eventmanager_storage = 1'd0; +reg soc_netsoc_timer0_eventmanager_re = 1'd0; +reg [31:0] soc_netsoc_timer0_value = 32'd0; +reg [13:0] soc_netsoc_interface_adr = 14'd0; +reg soc_netsoc_interface_we = 1'd0; +wire [7:0] soc_netsoc_interface_dat_w; +wire [7:0] soc_netsoc_interface_dat_r; +wire [29:0] soc_netsoc_bus_wishbone_adr; +wire [31:0] soc_netsoc_bus_wishbone_dat_w; +wire [31:0] soc_netsoc_bus_wishbone_dat_r; +wire [3:0] soc_netsoc_bus_wishbone_sel; +wire soc_netsoc_bus_wishbone_cyc; +wire soc_netsoc_bus_wishbone_stb; +reg soc_netsoc_bus_wishbone_ack = 1'd0; +wire soc_netsoc_bus_wishbone_we; +wire [2:0] soc_netsoc_bus_wishbone_cti; +wire [1:0] soc_netsoc_bus_wishbone_bte; +reg soc_netsoc_bus_wishbone_err = 1'd0; +wire [29:0] soc_netsoc_interface0_wb_sdram_adr; +wire [31:0] soc_netsoc_interface0_wb_sdram_dat_w; +reg [31:0] soc_netsoc_interface0_wb_sdram_dat_r = 32'd0; +wire [3:0] soc_netsoc_interface0_wb_sdram_sel; +wire soc_netsoc_interface0_wb_sdram_cyc; +wire soc_netsoc_interface0_wb_sdram_stb; +reg soc_netsoc_interface0_wb_sdram_ack = 1'd0; +wire soc_netsoc_interface0_wb_sdram_we; +wire [2:0] soc_netsoc_interface0_wb_sdram_cti; +wire [1:0] soc_netsoc_interface0_wb_sdram_bte; +reg soc_netsoc_interface0_wb_sdram_err = 1'd0; +(* dont_touch = "true" *) wire sys_clk; +wire sys_rst; +wire sys4x_clk; +wire sys4x_dqs_clk; +wire clk200_clk; +wire clk200_rst; +wire soc_pll_locked; +wire soc_pll_fb; +reg [3:0] soc_reset_counter = 4'd15; +reg soc_ic_reset = 1'd1; +wire [29:0] soc_emulator_ram_bus_adr; +wire [31:0] soc_emulator_ram_bus_dat_w; +wire [31:0] soc_emulator_ram_bus_dat_r; +wire [3:0] soc_emulator_ram_bus_sel; +wire soc_emulator_ram_bus_cyc; +wire soc_emulator_ram_bus_stb; +reg soc_emulator_ram_bus_ack = 1'd0; +wire soc_emulator_ram_bus_we; +wire [2:0] soc_emulator_ram_bus_cti; +wire [1:0] soc_emulator_ram_bus_bte; +reg soc_emulator_ram_bus_err = 1'd0; +wire [11:0] soc_emulator_ram_adr; +wire [31:0] soc_emulator_ram_dat_r; +reg [3:0] soc_emulator_ram_we = 4'd0; +wire [31:0] soc_emulator_ram_dat_w; +reg [4:0] soc_a7ddrphy_half_sys8x_taps_storage = 5'd8; +reg soc_a7ddrphy_half_sys8x_taps_re = 1'd0; +wire soc_a7ddrphy_cdly_rst_re; +wire soc_a7ddrphy_cdly_rst_r; +wire soc_a7ddrphy_cdly_rst_we; +reg soc_a7ddrphy_cdly_rst_w = 1'd0; +wire soc_a7ddrphy_cdly_inc_re; +wire soc_a7ddrphy_cdly_inc_r; +wire soc_a7ddrphy_cdly_inc_we; +reg soc_a7ddrphy_cdly_inc_w = 1'd0; +reg [1:0] soc_a7ddrphy_dly_sel_storage = 2'd0; +reg soc_a7ddrphy_dly_sel_re = 1'd0; +wire soc_a7ddrphy_rdly_dq_rst_re; +wire soc_a7ddrphy_rdly_dq_rst_r; +wire soc_a7ddrphy_rdly_dq_rst_we; +reg soc_a7ddrphy_rdly_dq_rst_w = 1'd0; +wire soc_a7ddrphy_rdly_dq_inc_re; +wire soc_a7ddrphy_rdly_dq_inc_r; +wire soc_a7ddrphy_rdly_dq_inc_we; +reg soc_a7ddrphy_rdly_dq_inc_w = 1'd0; +wire soc_a7ddrphy_rdly_dq_bitslip_rst_re; +wire soc_a7ddrphy_rdly_dq_bitslip_rst_r; +wire soc_a7ddrphy_rdly_dq_bitslip_rst_we; +reg soc_a7ddrphy_rdly_dq_bitslip_rst_w = 1'd0; +wire soc_a7ddrphy_rdly_dq_bitslip_re; +wire soc_a7ddrphy_rdly_dq_bitslip_r; +wire soc_a7ddrphy_rdly_dq_bitslip_we; +reg soc_a7ddrphy_rdly_dq_bitslip_w = 1'd0; +wire [13:0] soc_a7ddrphy_dfi_p0_address; +wire [2:0] soc_a7ddrphy_dfi_p0_bank; +wire soc_a7ddrphy_dfi_p0_cas_n; +wire soc_a7ddrphy_dfi_p0_cs_n; +wire soc_a7ddrphy_dfi_p0_ras_n; +wire soc_a7ddrphy_dfi_p0_we_n; +wire soc_a7ddrphy_dfi_p0_cke; +wire soc_a7ddrphy_dfi_p0_odt; +wire soc_a7ddrphy_dfi_p0_reset_n; +wire soc_a7ddrphy_dfi_p0_act_n; +wire [31:0] soc_a7ddrphy_dfi_p0_wrdata; +wire soc_a7ddrphy_dfi_p0_wrdata_en; +wire [3:0] soc_a7ddrphy_dfi_p0_wrdata_mask; +wire soc_a7ddrphy_dfi_p0_rddata_en; +reg [31:0] soc_a7ddrphy_dfi_p0_rddata = 32'd0; +reg soc_a7ddrphy_dfi_p0_rddata_valid = 1'd0; +wire [13:0] soc_a7ddrphy_dfi_p1_address; +wire [2:0] soc_a7ddrphy_dfi_p1_bank; +wire soc_a7ddrphy_dfi_p1_cas_n; +wire soc_a7ddrphy_dfi_p1_cs_n; +wire soc_a7ddrphy_dfi_p1_ras_n; +wire soc_a7ddrphy_dfi_p1_we_n; +wire soc_a7ddrphy_dfi_p1_cke; +wire soc_a7ddrphy_dfi_p1_odt; +wire soc_a7ddrphy_dfi_p1_reset_n; +wire soc_a7ddrphy_dfi_p1_act_n; +wire [31:0] soc_a7ddrphy_dfi_p1_wrdata; +wire soc_a7ddrphy_dfi_p1_wrdata_en; +wire [3:0] soc_a7ddrphy_dfi_p1_wrdata_mask; +wire soc_a7ddrphy_dfi_p1_rddata_en; +reg [31:0] soc_a7ddrphy_dfi_p1_rddata = 32'd0; +reg soc_a7ddrphy_dfi_p1_rddata_valid = 1'd0; +wire [13:0] soc_a7ddrphy_dfi_p2_address; +wire [2:0] soc_a7ddrphy_dfi_p2_bank; +wire soc_a7ddrphy_dfi_p2_cas_n; +wire soc_a7ddrphy_dfi_p2_cs_n; +wire soc_a7ddrphy_dfi_p2_ras_n; +wire soc_a7ddrphy_dfi_p2_we_n; +wire soc_a7ddrphy_dfi_p2_cke; +wire soc_a7ddrphy_dfi_p2_odt; +wire soc_a7ddrphy_dfi_p2_reset_n; +wire soc_a7ddrphy_dfi_p2_act_n; +wire [31:0] soc_a7ddrphy_dfi_p2_wrdata; +wire soc_a7ddrphy_dfi_p2_wrdata_en; +wire [3:0] soc_a7ddrphy_dfi_p2_wrdata_mask; +wire soc_a7ddrphy_dfi_p2_rddata_en; +reg [31:0] soc_a7ddrphy_dfi_p2_rddata = 32'd0; +reg soc_a7ddrphy_dfi_p2_rddata_valid = 1'd0; +wire [13:0] soc_a7ddrphy_dfi_p3_address; +wire [2:0] soc_a7ddrphy_dfi_p3_bank; +wire soc_a7ddrphy_dfi_p3_cas_n; +wire soc_a7ddrphy_dfi_p3_cs_n; +wire soc_a7ddrphy_dfi_p3_ras_n; +wire soc_a7ddrphy_dfi_p3_we_n; +wire soc_a7ddrphy_dfi_p3_cke; +wire soc_a7ddrphy_dfi_p3_odt; +wire soc_a7ddrphy_dfi_p3_reset_n; +wire soc_a7ddrphy_dfi_p3_act_n; +wire [31:0] soc_a7ddrphy_dfi_p3_wrdata; +wire soc_a7ddrphy_dfi_p3_wrdata_en; +wire [3:0] soc_a7ddrphy_dfi_p3_wrdata_mask; +wire soc_a7ddrphy_dfi_p3_rddata_en; +reg [31:0] soc_a7ddrphy_dfi_p3_rddata = 32'd0; +reg soc_a7ddrphy_dfi_p3_rddata_valid = 1'd0; +wire soc_a7ddrphy_sd_clk_se_nodelay; +reg soc_a7ddrphy_oe_dqs = 1'd0; +wire soc_a7ddrphy_dqs_preamble; +wire soc_a7ddrphy_dqs_postamble; +reg [7:0] soc_a7ddrphy_dqs_serdes_pattern = 8'd85; +wire soc_a7ddrphy_dqs_nodelay0; +wire soc_a7ddrphy_dqs_t0; +wire soc_a7ddrphy0; +wire soc_a7ddrphy_dqs_nodelay1; +wire soc_a7ddrphy_dqs_t1; +wire soc_a7ddrphy1; +reg soc_a7ddrphy_oe_dq = 1'd0; +wire soc_a7ddrphy_dq_o_nodelay0; +wire soc_a7ddrphy_dq_i_nodelay0; +wire soc_a7ddrphy_dq_i_delayed0; +wire soc_a7ddrphy_dq_t0; +wire [7:0] soc_a7ddrphy_dq_i_data0; +wire [7:0] soc_a7ddrphy_bitslip0_i; +reg [7:0] soc_a7ddrphy_bitslip0_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip0_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip0_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay1; +wire soc_a7ddrphy_dq_i_nodelay1; +wire soc_a7ddrphy_dq_i_delayed1; +wire soc_a7ddrphy_dq_t1; +wire [7:0] soc_a7ddrphy_dq_i_data1; +wire [7:0] soc_a7ddrphy_bitslip1_i; +reg [7:0] soc_a7ddrphy_bitslip1_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip1_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip1_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay2; +wire soc_a7ddrphy_dq_i_nodelay2; +wire soc_a7ddrphy_dq_i_delayed2; +wire soc_a7ddrphy_dq_t2; +wire [7:0] soc_a7ddrphy_dq_i_data2; +wire [7:0] soc_a7ddrphy_bitslip2_i; +reg [7:0] soc_a7ddrphy_bitslip2_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip2_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip2_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay3; +wire soc_a7ddrphy_dq_i_nodelay3; +wire soc_a7ddrphy_dq_i_delayed3; +wire soc_a7ddrphy_dq_t3; +wire [7:0] soc_a7ddrphy_dq_i_data3; +wire [7:0] soc_a7ddrphy_bitslip3_i; +reg [7:0] soc_a7ddrphy_bitslip3_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip3_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip3_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay4; +wire soc_a7ddrphy_dq_i_nodelay4; +wire soc_a7ddrphy_dq_i_delayed4; +wire soc_a7ddrphy_dq_t4; +wire [7:0] soc_a7ddrphy_dq_i_data4; +wire [7:0] soc_a7ddrphy_bitslip4_i; +reg [7:0] soc_a7ddrphy_bitslip4_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip4_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip4_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay5; +wire soc_a7ddrphy_dq_i_nodelay5; +wire soc_a7ddrphy_dq_i_delayed5; +wire soc_a7ddrphy_dq_t5; +wire [7:0] soc_a7ddrphy_dq_i_data5; +wire [7:0] soc_a7ddrphy_bitslip5_i; +reg [7:0] soc_a7ddrphy_bitslip5_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip5_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip5_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay6; +wire soc_a7ddrphy_dq_i_nodelay6; +wire soc_a7ddrphy_dq_i_delayed6; +wire soc_a7ddrphy_dq_t6; +wire [7:0] soc_a7ddrphy_dq_i_data6; +wire [7:0] soc_a7ddrphy_bitslip6_i; +reg [7:0] soc_a7ddrphy_bitslip6_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip6_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip6_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay7; +wire soc_a7ddrphy_dq_i_nodelay7; +wire soc_a7ddrphy_dq_i_delayed7; +wire soc_a7ddrphy_dq_t7; +wire [7:0] soc_a7ddrphy_dq_i_data7; +wire [7:0] soc_a7ddrphy_bitslip7_i; +reg [7:0] soc_a7ddrphy_bitslip7_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip7_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip7_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay8; +wire soc_a7ddrphy_dq_i_nodelay8; +wire soc_a7ddrphy_dq_i_delayed8; +wire soc_a7ddrphy_dq_t8; +wire [7:0] soc_a7ddrphy_dq_i_data8; +wire [7:0] soc_a7ddrphy_bitslip8_i; +reg [7:0] soc_a7ddrphy_bitslip8_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip8_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip8_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay9; +wire soc_a7ddrphy_dq_i_nodelay9; +wire soc_a7ddrphy_dq_i_delayed9; +wire soc_a7ddrphy_dq_t9; +wire [7:0] soc_a7ddrphy_dq_i_data9; +wire [7:0] soc_a7ddrphy_bitslip9_i; +reg [7:0] soc_a7ddrphy_bitslip9_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip9_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip9_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay10; +wire soc_a7ddrphy_dq_i_nodelay10; +wire soc_a7ddrphy_dq_i_delayed10; +wire soc_a7ddrphy_dq_t10; +wire [7:0] soc_a7ddrphy_dq_i_data10; +wire [7:0] soc_a7ddrphy_bitslip10_i; +reg [7:0] soc_a7ddrphy_bitslip10_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip10_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip10_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay11; +wire soc_a7ddrphy_dq_i_nodelay11; +wire soc_a7ddrphy_dq_i_delayed11; +wire soc_a7ddrphy_dq_t11; +wire [7:0] soc_a7ddrphy_dq_i_data11; +wire [7:0] soc_a7ddrphy_bitslip11_i; +reg [7:0] soc_a7ddrphy_bitslip11_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip11_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip11_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay12; +wire soc_a7ddrphy_dq_i_nodelay12; +wire soc_a7ddrphy_dq_i_delayed12; +wire soc_a7ddrphy_dq_t12; +wire [7:0] soc_a7ddrphy_dq_i_data12; +wire [7:0] soc_a7ddrphy_bitslip12_i; +reg [7:0] soc_a7ddrphy_bitslip12_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip12_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip12_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay13; +wire soc_a7ddrphy_dq_i_nodelay13; +wire soc_a7ddrphy_dq_i_delayed13; +wire soc_a7ddrphy_dq_t13; +wire [7:0] soc_a7ddrphy_dq_i_data13; +wire [7:0] soc_a7ddrphy_bitslip13_i; +reg [7:0] soc_a7ddrphy_bitslip13_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip13_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip13_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay14; +wire soc_a7ddrphy_dq_i_nodelay14; +wire soc_a7ddrphy_dq_i_delayed14; +wire soc_a7ddrphy_dq_t14; +wire [7:0] soc_a7ddrphy_dq_i_data14; +wire [7:0] soc_a7ddrphy_bitslip14_i; +reg [7:0] soc_a7ddrphy_bitslip14_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip14_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip14_r = 16'd0; +wire soc_a7ddrphy_dq_o_nodelay15; +wire soc_a7ddrphy_dq_i_nodelay15; +wire soc_a7ddrphy_dq_i_delayed15; +wire soc_a7ddrphy_dq_t15; +wire [7:0] soc_a7ddrphy_dq_i_data15; +wire [7:0] soc_a7ddrphy_bitslip15_i; +reg [7:0] soc_a7ddrphy_bitslip15_o = 8'd0; +reg [2:0] soc_a7ddrphy_bitslip15_value = 3'd0; +reg [15:0] soc_a7ddrphy_bitslip15_r = 16'd0; +reg soc_a7ddrphy_n_rddata_en0 = 1'd0; +reg soc_a7ddrphy_n_rddata_en1 = 1'd0; +reg soc_a7ddrphy_n_rddata_en2 = 1'd0; +reg soc_a7ddrphy_n_rddata_en3 = 1'd0; +reg soc_a7ddrphy_n_rddata_en4 = 1'd0; +reg soc_a7ddrphy_n_rddata_en5 = 1'd0; +reg soc_a7ddrphy_n_rddata_en6 = 1'd0; +reg soc_a7ddrphy_n_rddata_en7 = 1'd0; +wire soc_a7ddrphy_oe; +reg [3:0] soc_a7ddrphy_last_wrdata_en = 4'd0; +wire [13:0] soc_netsoc_sdram_inti_p0_address; +wire [2:0] soc_netsoc_sdram_inti_p0_bank; +reg soc_netsoc_sdram_inti_p0_cas_n = 1'd1; +reg soc_netsoc_sdram_inti_p0_cs_n = 1'd1; +reg soc_netsoc_sdram_inti_p0_ras_n = 1'd1; +reg soc_netsoc_sdram_inti_p0_we_n = 1'd1; +wire soc_netsoc_sdram_inti_p0_cke; +wire soc_netsoc_sdram_inti_p0_odt; +wire soc_netsoc_sdram_inti_p0_reset_n; +reg soc_netsoc_sdram_inti_p0_act_n = 1'd1; +wire [31:0] soc_netsoc_sdram_inti_p0_wrdata; +wire soc_netsoc_sdram_inti_p0_wrdata_en; +wire [3:0] soc_netsoc_sdram_inti_p0_wrdata_mask; +wire soc_netsoc_sdram_inti_p0_rddata_en; +reg [31:0] soc_netsoc_sdram_inti_p0_rddata = 32'd0; +reg soc_netsoc_sdram_inti_p0_rddata_valid = 1'd0; +wire [13:0] soc_netsoc_sdram_inti_p1_address; +wire [2:0] soc_netsoc_sdram_inti_p1_bank; +reg soc_netsoc_sdram_inti_p1_cas_n = 1'd1; +reg soc_netsoc_sdram_inti_p1_cs_n = 1'd1; +reg soc_netsoc_sdram_inti_p1_ras_n = 1'd1; +reg soc_netsoc_sdram_inti_p1_we_n = 1'd1; +wire soc_netsoc_sdram_inti_p1_cke; +wire soc_netsoc_sdram_inti_p1_odt; +wire soc_netsoc_sdram_inti_p1_reset_n; +reg soc_netsoc_sdram_inti_p1_act_n = 1'd1; +wire [31:0] soc_netsoc_sdram_inti_p1_wrdata; +wire soc_netsoc_sdram_inti_p1_wrdata_en; +wire [3:0] soc_netsoc_sdram_inti_p1_wrdata_mask; +wire soc_netsoc_sdram_inti_p1_rddata_en; +reg [31:0] soc_netsoc_sdram_inti_p1_rddata = 32'd0; +reg soc_netsoc_sdram_inti_p1_rddata_valid = 1'd0; +wire [13:0] soc_netsoc_sdram_inti_p2_address; +wire [2:0] soc_netsoc_sdram_inti_p2_bank; +reg soc_netsoc_sdram_inti_p2_cas_n = 1'd1; +reg soc_netsoc_sdram_inti_p2_cs_n = 1'd1; +reg soc_netsoc_sdram_inti_p2_ras_n = 1'd1; +reg soc_netsoc_sdram_inti_p2_we_n = 1'd1; +wire soc_netsoc_sdram_inti_p2_cke; +wire soc_netsoc_sdram_inti_p2_odt; +wire soc_netsoc_sdram_inti_p2_reset_n; +reg soc_netsoc_sdram_inti_p2_act_n = 1'd1; +wire [31:0] soc_netsoc_sdram_inti_p2_wrdata; +wire soc_netsoc_sdram_inti_p2_wrdata_en; +wire [3:0] soc_netsoc_sdram_inti_p2_wrdata_mask; +wire soc_netsoc_sdram_inti_p2_rddata_en; +reg [31:0] soc_netsoc_sdram_inti_p2_rddata = 32'd0; +reg soc_netsoc_sdram_inti_p2_rddata_valid = 1'd0; +wire [13:0] soc_netsoc_sdram_inti_p3_address; +wire [2:0] soc_netsoc_sdram_inti_p3_bank; +reg soc_netsoc_sdram_inti_p3_cas_n = 1'd1; +reg soc_netsoc_sdram_inti_p3_cs_n = 1'd1; +reg soc_netsoc_sdram_inti_p3_ras_n = 1'd1; +reg soc_netsoc_sdram_inti_p3_we_n = 1'd1; +wire soc_netsoc_sdram_inti_p3_cke; +wire soc_netsoc_sdram_inti_p3_odt; +wire soc_netsoc_sdram_inti_p3_reset_n; +reg soc_netsoc_sdram_inti_p3_act_n = 1'd1; +wire [31:0] soc_netsoc_sdram_inti_p3_wrdata; +wire soc_netsoc_sdram_inti_p3_wrdata_en; +wire [3:0] soc_netsoc_sdram_inti_p3_wrdata_mask; +wire soc_netsoc_sdram_inti_p3_rddata_en; +reg [31:0] soc_netsoc_sdram_inti_p3_rddata = 32'd0; +reg soc_netsoc_sdram_inti_p3_rddata_valid = 1'd0; +wire [13:0] soc_netsoc_sdram_slave_p0_address; +wire [2:0] soc_netsoc_sdram_slave_p0_bank; +wire soc_netsoc_sdram_slave_p0_cas_n; +wire soc_netsoc_sdram_slave_p0_cs_n; +wire soc_netsoc_sdram_slave_p0_ras_n; +wire soc_netsoc_sdram_slave_p0_we_n; +wire soc_netsoc_sdram_slave_p0_cke; +wire soc_netsoc_sdram_slave_p0_odt; +wire soc_netsoc_sdram_slave_p0_reset_n; +wire soc_netsoc_sdram_slave_p0_act_n; +wire [31:0] soc_netsoc_sdram_slave_p0_wrdata; +wire soc_netsoc_sdram_slave_p0_wrdata_en; +wire [3:0] soc_netsoc_sdram_slave_p0_wrdata_mask; +wire soc_netsoc_sdram_slave_p0_rddata_en; +reg [31:0] soc_netsoc_sdram_slave_p0_rddata = 32'd0; +reg soc_netsoc_sdram_slave_p0_rddata_valid = 1'd0; +wire [13:0] soc_netsoc_sdram_slave_p1_address; +wire [2:0] soc_netsoc_sdram_slave_p1_bank; +wire soc_netsoc_sdram_slave_p1_cas_n; +wire soc_netsoc_sdram_slave_p1_cs_n; +wire soc_netsoc_sdram_slave_p1_ras_n; +wire soc_netsoc_sdram_slave_p1_we_n; +wire soc_netsoc_sdram_slave_p1_cke; +wire soc_netsoc_sdram_slave_p1_odt; +wire soc_netsoc_sdram_slave_p1_reset_n; +wire soc_netsoc_sdram_slave_p1_act_n; +wire [31:0] soc_netsoc_sdram_slave_p1_wrdata; +wire soc_netsoc_sdram_slave_p1_wrdata_en; +wire [3:0] soc_netsoc_sdram_slave_p1_wrdata_mask; +wire soc_netsoc_sdram_slave_p1_rddata_en; +reg [31:0] soc_netsoc_sdram_slave_p1_rddata = 32'd0; +reg soc_netsoc_sdram_slave_p1_rddata_valid = 1'd0; +wire [13:0] soc_netsoc_sdram_slave_p2_address; +wire [2:0] soc_netsoc_sdram_slave_p2_bank; +wire soc_netsoc_sdram_slave_p2_cas_n; +wire soc_netsoc_sdram_slave_p2_cs_n; +wire soc_netsoc_sdram_slave_p2_ras_n; +wire soc_netsoc_sdram_slave_p2_we_n; +wire soc_netsoc_sdram_slave_p2_cke; +wire soc_netsoc_sdram_slave_p2_odt; +wire soc_netsoc_sdram_slave_p2_reset_n; +wire soc_netsoc_sdram_slave_p2_act_n; +wire [31:0] soc_netsoc_sdram_slave_p2_wrdata; +wire soc_netsoc_sdram_slave_p2_wrdata_en; +wire [3:0] soc_netsoc_sdram_slave_p2_wrdata_mask; +wire soc_netsoc_sdram_slave_p2_rddata_en; +reg [31:0] soc_netsoc_sdram_slave_p2_rddata = 32'd0; +reg soc_netsoc_sdram_slave_p2_rddata_valid = 1'd0; +wire [13:0] soc_netsoc_sdram_slave_p3_address; +wire [2:0] soc_netsoc_sdram_slave_p3_bank; +wire soc_netsoc_sdram_slave_p3_cas_n; +wire soc_netsoc_sdram_slave_p3_cs_n; +wire soc_netsoc_sdram_slave_p3_ras_n; +wire soc_netsoc_sdram_slave_p3_we_n; +wire soc_netsoc_sdram_slave_p3_cke; +wire soc_netsoc_sdram_slave_p3_odt; +wire soc_netsoc_sdram_slave_p3_reset_n; +wire soc_netsoc_sdram_slave_p3_act_n; +wire [31:0] soc_netsoc_sdram_slave_p3_wrdata; +wire soc_netsoc_sdram_slave_p3_wrdata_en; +wire [3:0] soc_netsoc_sdram_slave_p3_wrdata_mask; +wire soc_netsoc_sdram_slave_p3_rddata_en; +reg [31:0] soc_netsoc_sdram_slave_p3_rddata = 32'd0; +reg soc_netsoc_sdram_slave_p3_rddata_valid = 1'd0; +reg [13:0] soc_netsoc_sdram_master_p0_address = 14'd0; +reg [2:0] soc_netsoc_sdram_master_p0_bank = 3'd0; +reg soc_netsoc_sdram_master_p0_cas_n = 1'd1; +reg soc_netsoc_sdram_master_p0_cs_n = 1'd1; +reg soc_netsoc_sdram_master_p0_ras_n = 1'd1; +reg soc_netsoc_sdram_master_p0_we_n = 1'd1; +reg soc_netsoc_sdram_master_p0_cke = 1'd0; +reg soc_netsoc_sdram_master_p0_odt = 1'd0; +reg soc_netsoc_sdram_master_p0_reset_n = 1'd0; +reg soc_netsoc_sdram_master_p0_act_n = 1'd1; +reg [31:0] soc_netsoc_sdram_master_p0_wrdata = 32'd0; +reg soc_netsoc_sdram_master_p0_wrdata_en = 1'd0; +reg [3:0] soc_netsoc_sdram_master_p0_wrdata_mask = 4'd0; +reg soc_netsoc_sdram_master_p0_rddata_en = 1'd0; +wire [31:0] soc_netsoc_sdram_master_p0_rddata; +wire soc_netsoc_sdram_master_p0_rddata_valid; +reg [13:0] soc_netsoc_sdram_master_p1_address = 14'd0; +reg [2:0] soc_netsoc_sdram_master_p1_bank = 3'd0; +reg soc_netsoc_sdram_master_p1_cas_n = 1'd1; +reg soc_netsoc_sdram_master_p1_cs_n = 1'd1; +reg soc_netsoc_sdram_master_p1_ras_n = 1'd1; +reg soc_netsoc_sdram_master_p1_we_n = 1'd1; +reg soc_netsoc_sdram_master_p1_cke = 1'd0; +reg soc_netsoc_sdram_master_p1_odt = 1'd0; +reg soc_netsoc_sdram_master_p1_reset_n = 1'd0; +reg soc_netsoc_sdram_master_p1_act_n = 1'd1; +reg [31:0] soc_netsoc_sdram_master_p1_wrdata = 32'd0; +reg soc_netsoc_sdram_master_p1_wrdata_en = 1'd0; +reg [3:0] soc_netsoc_sdram_master_p1_wrdata_mask = 4'd0; +reg soc_netsoc_sdram_master_p1_rddata_en = 1'd0; +wire [31:0] soc_netsoc_sdram_master_p1_rddata; +wire soc_netsoc_sdram_master_p1_rddata_valid; +reg [13:0] soc_netsoc_sdram_master_p2_address = 14'd0; +reg [2:0] soc_netsoc_sdram_master_p2_bank = 3'd0; +reg soc_netsoc_sdram_master_p2_cas_n = 1'd1; +reg soc_netsoc_sdram_master_p2_cs_n = 1'd1; +reg soc_netsoc_sdram_master_p2_ras_n = 1'd1; +reg soc_netsoc_sdram_master_p2_we_n = 1'd1; +reg soc_netsoc_sdram_master_p2_cke = 1'd0; +reg soc_netsoc_sdram_master_p2_odt = 1'd0; +reg soc_netsoc_sdram_master_p2_reset_n = 1'd0; +reg soc_netsoc_sdram_master_p2_act_n = 1'd1; +reg [31:0] soc_netsoc_sdram_master_p2_wrdata = 32'd0; +reg soc_netsoc_sdram_master_p2_wrdata_en = 1'd0; +reg [3:0] soc_netsoc_sdram_master_p2_wrdata_mask = 4'd0; +reg soc_netsoc_sdram_master_p2_rddata_en = 1'd0; +wire [31:0] soc_netsoc_sdram_master_p2_rddata; +wire soc_netsoc_sdram_master_p2_rddata_valid; +reg [13:0] soc_netsoc_sdram_master_p3_address = 14'd0; +reg [2:0] soc_netsoc_sdram_master_p3_bank = 3'd0; +reg soc_netsoc_sdram_master_p3_cas_n = 1'd1; +reg soc_netsoc_sdram_master_p3_cs_n = 1'd1; +reg soc_netsoc_sdram_master_p3_ras_n = 1'd1; +reg soc_netsoc_sdram_master_p3_we_n = 1'd1; +reg soc_netsoc_sdram_master_p3_cke = 1'd0; +reg soc_netsoc_sdram_master_p3_odt = 1'd0; +reg soc_netsoc_sdram_master_p3_reset_n = 1'd0; +reg soc_netsoc_sdram_master_p3_act_n = 1'd1; +reg [31:0] soc_netsoc_sdram_master_p3_wrdata = 32'd0; +reg soc_netsoc_sdram_master_p3_wrdata_en = 1'd0; +reg [3:0] soc_netsoc_sdram_master_p3_wrdata_mask = 4'd0; +reg soc_netsoc_sdram_master_p3_rddata_en = 1'd0; +wire [31:0] soc_netsoc_sdram_master_p3_rddata; +wire soc_netsoc_sdram_master_p3_rddata_valid; +reg [3:0] soc_netsoc_sdram_storage = 4'd0; +reg soc_netsoc_sdram_re = 1'd0; +reg [5:0] soc_netsoc_sdram_phaseinjector0_command_storage = 6'd0; +reg soc_netsoc_sdram_phaseinjector0_command_re = 1'd0; +wire soc_netsoc_sdram_phaseinjector0_command_issue_re; +wire soc_netsoc_sdram_phaseinjector0_command_issue_r; +wire soc_netsoc_sdram_phaseinjector0_command_issue_we; +reg soc_netsoc_sdram_phaseinjector0_command_issue_w = 1'd0; +reg [13:0] soc_netsoc_sdram_phaseinjector0_address_storage = 14'd0; +reg soc_netsoc_sdram_phaseinjector0_address_re = 1'd0; +reg [2:0] soc_netsoc_sdram_phaseinjector0_baddress_storage = 3'd0; +reg soc_netsoc_sdram_phaseinjector0_baddress_re = 1'd0; +reg [31:0] soc_netsoc_sdram_phaseinjector0_wrdata_storage = 32'd0; +reg soc_netsoc_sdram_phaseinjector0_wrdata_re = 1'd0; +reg [31:0] soc_netsoc_sdram_phaseinjector0_status = 32'd0; +wire soc_netsoc_sdram_phaseinjector0_we; +reg [5:0] soc_netsoc_sdram_phaseinjector1_command_storage = 6'd0; +reg soc_netsoc_sdram_phaseinjector1_command_re = 1'd0; +wire soc_netsoc_sdram_phaseinjector1_command_issue_re; +wire soc_netsoc_sdram_phaseinjector1_command_issue_r; +wire soc_netsoc_sdram_phaseinjector1_command_issue_we; +reg soc_netsoc_sdram_phaseinjector1_command_issue_w = 1'd0; +reg [13:0] soc_netsoc_sdram_phaseinjector1_address_storage = 14'd0; +reg soc_netsoc_sdram_phaseinjector1_address_re = 1'd0; +reg [2:0] soc_netsoc_sdram_phaseinjector1_baddress_storage = 3'd0; +reg soc_netsoc_sdram_phaseinjector1_baddress_re = 1'd0; +reg [31:0] soc_netsoc_sdram_phaseinjector1_wrdata_storage = 32'd0; +reg soc_netsoc_sdram_phaseinjector1_wrdata_re = 1'd0; +reg [31:0] soc_netsoc_sdram_phaseinjector1_status = 32'd0; +wire soc_netsoc_sdram_phaseinjector1_we; +reg [5:0] soc_netsoc_sdram_phaseinjector2_command_storage = 6'd0; +reg soc_netsoc_sdram_phaseinjector2_command_re = 1'd0; +wire soc_netsoc_sdram_phaseinjector2_command_issue_re; +wire soc_netsoc_sdram_phaseinjector2_command_issue_r; +wire soc_netsoc_sdram_phaseinjector2_command_issue_we; +reg soc_netsoc_sdram_phaseinjector2_command_issue_w = 1'd0; +reg [13:0] soc_netsoc_sdram_phaseinjector2_address_storage = 14'd0; +reg soc_netsoc_sdram_phaseinjector2_address_re = 1'd0; +reg [2:0] soc_netsoc_sdram_phaseinjector2_baddress_storage = 3'd0; +reg soc_netsoc_sdram_phaseinjector2_baddress_re = 1'd0; +reg [31:0] soc_netsoc_sdram_phaseinjector2_wrdata_storage = 32'd0; +reg soc_netsoc_sdram_phaseinjector2_wrdata_re = 1'd0; +reg [31:0] soc_netsoc_sdram_phaseinjector2_status = 32'd0; +wire soc_netsoc_sdram_phaseinjector2_we; +reg [5:0] soc_netsoc_sdram_phaseinjector3_command_storage = 6'd0; +reg soc_netsoc_sdram_phaseinjector3_command_re = 1'd0; +wire soc_netsoc_sdram_phaseinjector3_command_issue_re; +wire soc_netsoc_sdram_phaseinjector3_command_issue_r; +wire soc_netsoc_sdram_phaseinjector3_command_issue_we; +reg soc_netsoc_sdram_phaseinjector3_command_issue_w = 1'd0; +reg [13:0] soc_netsoc_sdram_phaseinjector3_address_storage = 14'd0; +reg soc_netsoc_sdram_phaseinjector3_address_re = 1'd0; +reg [2:0] soc_netsoc_sdram_phaseinjector3_baddress_storage = 3'd0; +reg soc_netsoc_sdram_phaseinjector3_baddress_re = 1'd0; +reg [31:0] soc_netsoc_sdram_phaseinjector3_wrdata_storage = 32'd0; +reg soc_netsoc_sdram_phaseinjector3_wrdata_re = 1'd0; +reg [31:0] soc_netsoc_sdram_phaseinjector3_status = 32'd0; +wire soc_netsoc_sdram_phaseinjector3_we; +wire soc_netsoc_sdram_interface_bank0_valid; +wire soc_netsoc_sdram_interface_bank0_ready; +wire soc_netsoc_sdram_interface_bank0_we; +wire [20:0] soc_netsoc_sdram_interface_bank0_addr; +wire soc_netsoc_sdram_interface_bank0_lock; +wire soc_netsoc_sdram_interface_bank0_wdata_ready; +wire soc_netsoc_sdram_interface_bank0_rdata_valid; +wire soc_netsoc_sdram_interface_bank1_valid; +wire soc_netsoc_sdram_interface_bank1_ready; +wire soc_netsoc_sdram_interface_bank1_we; +wire [20:0] soc_netsoc_sdram_interface_bank1_addr; +wire soc_netsoc_sdram_interface_bank1_lock; +wire soc_netsoc_sdram_interface_bank1_wdata_ready; +wire soc_netsoc_sdram_interface_bank1_rdata_valid; +wire soc_netsoc_sdram_interface_bank2_valid; +wire soc_netsoc_sdram_interface_bank2_ready; +wire soc_netsoc_sdram_interface_bank2_we; +wire [20:0] soc_netsoc_sdram_interface_bank2_addr; +wire soc_netsoc_sdram_interface_bank2_lock; +wire soc_netsoc_sdram_interface_bank2_wdata_ready; +wire soc_netsoc_sdram_interface_bank2_rdata_valid; +wire soc_netsoc_sdram_interface_bank3_valid; +wire soc_netsoc_sdram_interface_bank3_ready; +wire soc_netsoc_sdram_interface_bank3_we; +wire [20:0] soc_netsoc_sdram_interface_bank3_addr; +wire soc_netsoc_sdram_interface_bank3_lock; +wire soc_netsoc_sdram_interface_bank3_wdata_ready; +wire soc_netsoc_sdram_interface_bank3_rdata_valid; +wire soc_netsoc_sdram_interface_bank4_valid; +wire soc_netsoc_sdram_interface_bank4_ready; +wire soc_netsoc_sdram_interface_bank4_we; +wire [20:0] soc_netsoc_sdram_interface_bank4_addr; +wire soc_netsoc_sdram_interface_bank4_lock; +wire soc_netsoc_sdram_interface_bank4_wdata_ready; +wire soc_netsoc_sdram_interface_bank4_rdata_valid; +wire soc_netsoc_sdram_interface_bank5_valid; +wire soc_netsoc_sdram_interface_bank5_ready; +wire soc_netsoc_sdram_interface_bank5_we; +wire [20:0] soc_netsoc_sdram_interface_bank5_addr; +wire soc_netsoc_sdram_interface_bank5_lock; +wire soc_netsoc_sdram_interface_bank5_wdata_ready; +wire soc_netsoc_sdram_interface_bank5_rdata_valid; +wire soc_netsoc_sdram_interface_bank6_valid; +wire soc_netsoc_sdram_interface_bank6_ready; +wire soc_netsoc_sdram_interface_bank6_we; +wire [20:0] soc_netsoc_sdram_interface_bank6_addr; +wire soc_netsoc_sdram_interface_bank6_lock; +wire soc_netsoc_sdram_interface_bank6_wdata_ready; +wire soc_netsoc_sdram_interface_bank6_rdata_valid; +wire soc_netsoc_sdram_interface_bank7_valid; +wire soc_netsoc_sdram_interface_bank7_ready; +wire soc_netsoc_sdram_interface_bank7_we; +wire [20:0] soc_netsoc_sdram_interface_bank7_addr; +wire soc_netsoc_sdram_interface_bank7_lock; +wire soc_netsoc_sdram_interface_bank7_wdata_ready; +wire soc_netsoc_sdram_interface_bank7_rdata_valid; +reg [127:0] soc_netsoc_sdram_interface_wdata = 128'd0; +reg [15:0] soc_netsoc_sdram_interface_wdata_we = 16'd0; +wire [127:0] soc_netsoc_sdram_interface_rdata; +reg [13:0] soc_netsoc_sdram_dfi_p0_address = 14'd0; +reg [2:0] soc_netsoc_sdram_dfi_p0_bank = 3'd0; +reg soc_netsoc_sdram_dfi_p0_cas_n = 1'd1; +reg soc_netsoc_sdram_dfi_p0_cs_n = 1'd1; +reg soc_netsoc_sdram_dfi_p0_ras_n = 1'd1; +reg soc_netsoc_sdram_dfi_p0_we_n = 1'd1; +wire soc_netsoc_sdram_dfi_p0_cke; +wire soc_netsoc_sdram_dfi_p0_odt; +wire soc_netsoc_sdram_dfi_p0_reset_n; +reg soc_netsoc_sdram_dfi_p0_act_n = 1'd1; +wire [31:0] soc_netsoc_sdram_dfi_p0_wrdata; +reg soc_netsoc_sdram_dfi_p0_wrdata_en = 1'd0; +wire [3:0] soc_netsoc_sdram_dfi_p0_wrdata_mask; +reg soc_netsoc_sdram_dfi_p0_rddata_en = 1'd0; +wire [31:0] soc_netsoc_sdram_dfi_p0_rddata; +wire soc_netsoc_sdram_dfi_p0_rddata_valid; +reg [13:0] soc_netsoc_sdram_dfi_p1_address = 14'd0; +reg [2:0] soc_netsoc_sdram_dfi_p1_bank = 3'd0; +reg soc_netsoc_sdram_dfi_p1_cas_n = 1'd1; +reg soc_netsoc_sdram_dfi_p1_cs_n = 1'd1; +reg soc_netsoc_sdram_dfi_p1_ras_n = 1'd1; +reg soc_netsoc_sdram_dfi_p1_we_n = 1'd1; +wire soc_netsoc_sdram_dfi_p1_cke; +wire soc_netsoc_sdram_dfi_p1_odt; +wire soc_netsoc_sdram_dfi_p1_reset_n; +reg soc_netsoc_sdram_dfi_p1_act_n = 1'd1; +wire [31:0] soc_netsoc_sdram_dfi_p1_wrdata; +reg soc_netsoc_sdram_dfi_p1_wrdata_en = 1'd0; +wire [3:0] soc_netsoc_sdram_dfi_p1_wrdata_mask; +reg soc_netsoc_sdram_dfi_p1_rddata_en = 1'd0; +wire [31:0] soc_netsoc_sdram_dfi_p1_rddata; +wire soc_netsoc_sdram_dfi_p1_rddata_valid; +reg [13:0] soc_netsoc_sdram_dfi_p2_address = 14'd0; +reg [2:0] soc_netsoc_sdram_dfi_p2_bank = 3'd0; +reg soc_netsoc_sdram_dfi_p2_cas_n = 1'd1; +reg soc_netsoc_sdram_dfi_p2_cs_n = 1'd1; +reg soc_netsoc_sdram_dfi_p2_ras_n = 1'd1; +reg soc_netsoc_sdram_dfi_p2_we_n = 1'd1; +wire soc_netsoc_sdram_dfi_p2_cke; +wire soc_netsoc_sdram_dfi_p2_odt; +wire soc_netsoc_sdram_dfi_p2_reset_n; +reg soc_netsoc_sdram_dfi_p2_act_n = 1'd1; +wire [31:0] soc_netsoc_sdram_dfi_p2_wrdata; +reg soc_netsoc_sdram_dfi_p2_wrdata_en = 1'd0; +wire [3:0] soc_netsoc_sdram_dfi_p2_wrdata_mask; +reg soc_netsoc_sdram_dfi_p2_rddata_en = 1'd0; +wire [31:0] soc_netsoc_sdram_dfi_p2_rddata; +wire soc_netsoc_sdram_dfi_p2_rddata_valid; +reg [13:0] soc_netsoc_sdram_dfi_p3_address = 14'd0; +reg [2:0] soc_netsoc_sdram_dfi_p3_bank = 3'd0; +reg soc_netsoc_sdram_dfi_p3_cas_n = 1'd1; +reg soc_netsoc_sdram_dfi_p3_cs_n = 1'd1; +reg soc_netsoc_sdram_dfi_p3_ras_n = 1'd1; +reg soc_netsoc_sdram_dfi_p3_we_n = 1'd1; +wire soc_netsoc_sdram_dfi_p3_cke; +wire soc_netsoc_sdram_dfi_p3_odt; +wire soc_netsoc_sdram_dfi_p3_reset_n; +reg soc_netsoc_sdram_dfi_p3_act_n = 1'd1; +wire [31:0] soc_netsoc_sdram_dfi_p3_wrdata; +reg soc_netsoc_sdram_dfi_p3_wrdata_en = 1'd0; +wire [3:0] soc_netsoc_sdram_dfi_p3_wrdata_mask; +reg soc_netsoc_sdram_dfi_p3_rddata_en = 1'd0; +wire [31:0] soc_netsoc_sdram_dfi_p3_rddata; +wire soc_netsoc_sdram_dfi_p3_rddata_valid; +reg soc_netsoc_sdram_cmd_valid = 1'd0; +reg soc_netsoc_sdram_cmd_ready = 1'd0; +reg soc_netsoc_sdram_cmd_last = 1'd0; +reg [13:0] soc_netsoc_sdram_cmd_payload_a = 14'd0; +reg [2:0] soc_netsoc_sdram_cmd_payload_ba = 3'd0; +reg soc_netsoc_sdram_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_cmd_payload_we = 1'd0; +reg soc_netsoc_sdram_cmd_payload_is_read = 1'd0; +reg soc_netsoc_sdram_cmd_payload_is_write = 1'd0; +wire soc_netsoc_sdram_wants_refresh; +wire soc_netsoc_sdram_wants_zqcs; +wire soc_netsoc_sdram_timer_wait; +wire soc_netsoc_sdram_timer_done0; +wire [8:0] soc_netsoc_sdram_timer_count0; +wire soc_netsoc_sdram_timer_done1; +reg [8:0] soc_netsoc_sdram_timer_count1 = 9'd468; +wire soc_netsoc_sdram_postponer_req_i; +reg soc_netsoc_sdram_postponer_req_o = 1'd0; +reg soc_netsoc_sdram_postponer_count = 1'd0; +reg soc_netsoc_sdram_sequencer_start0 = 1'd0; +wire soc_netsoc_sdram_sequencer_done0; +wire soc_netsoc_sdram_sequencer_start1; +reg soc_netsoc_sdram_sequencer_done1 = 1'd0; +reg [5:0] soc_netsoc_sdram_sequencer_counter = 6'd0; +reg soc_netsoc_sdram_sequencer_count = 1'd0; +wire soc_netsoc_sdram_zqcs_timer_wait; +wire soc_netsoc_sdram_zqcs_timer_done0; +wire [25:0] soc_netsoc_sdram_zqcs_timer_count0; +wire soc_netsoc_sdram_zqcs_timer_done1; +reg [25:0] soc_netsoc_sdram_zqcs_timer_count1 = 26'd59999999; +reg soc_netsoc_sdram_zqcs_executer_start = 1'd0; +reg soc_netsoc_sdram_zqcs_executer_done = 1'd0; +reg [4:0] soc_netsoc_sdram_zqcs_executer_counter = 5'd0; +wire soc_netsoc_sdram_bankmachine0_req_valid; +wire soc_netsoc_sdram_bankmachine0_req_ready; +wire soc_netsoc_sdram_bankmachine0_req_we; +wire [20:0] soc_netsoc_sdram_bankmachine0_req_addr; +wire soc_netsoc_sdram_bankmachine0_req_lock; +reg soc_netsoc_sdram_bankmachine0_req_wdata_ready = 1'd0; +reg soc_netsoc_sdram_bankmachine0_req_rdata_valid = 1'd0; +wire soc_netsoc_sdram_bankmachine0_refresh_req; +reg soc_netsoc_sdram_bankmachine0_refresh_gnt = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_valid = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_ready = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine0_cmd_payload_a = 14'd0; +wire [2:0] soc_netsoc_sdram_bankmachine0_cmd_payload_ba; +reg soc_netsoc_sdram_bankmachine0_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_payload_we = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_payload_is_read = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_payload_is_write = 1'd0; +reg soc_netsoc_sdram_bankmachine0_auto_precharge = 1'd0; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; +reg soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_first = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_last = 1'd0; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_first; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_last; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; +wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; +wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; +reg [3:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level = 4'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we; +wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read; +wire [2:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr; +wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_ready; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_first; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_last; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_source_ready; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_source_first; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_source_last; +reg soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr = 21'd0; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce; +wire soc_netsoc_sdram_bankmachine0_cmd_buffer_busy; +reg soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_buffer_first_n = 1'd0; +reg soc_netsoc_sdram_bankmachine0_cmd_buffer_last_n = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine0_row = 14'd0; +reg soc_netsoc_sdram_bankmachine0_row_opened = 1'd0; +wire soc_netsoc_sdram_bankmachine0_row_hit; +reg soc_netsoc_sdram_bankmachine0_row_open = 1'd0; +reg soc_netsoc_sdram_bankmachine0_row_close = 1'd0; +reg soc_netsoc_sdram_bankmachine0_row_col_n_addr_sel = 1'd0; +wire soc_netsoc_sdram_bankmachine0_twtpcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine0_twtpcon_ready = 1'd1; +reg [2:0] soc_netsoc_sdram_bankmachine0_twtpcon_count = 3'd0; +wire soc_netsoc_sdram_bankmachine0_trccon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine0_trccon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine0_trccon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine0_trascon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine0_trascon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine0_trascon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine1_req_valid; +wire soc_netsoc_sdram_bankmachine1_req_ready; +wire soc_netsoc_sdram_bankmachine1_req_we; +wire [20:0] soc_netsoc_sdram_bankmachine1_req_addr; +wire soc_netsoc_sdram_bankmachine1_req_lock; +reg soc_netsoc_sdram_bankmachine1_req_wdata_ready = 1'd0; +reg soc_netsoc_sdram_bankmachine1_req_rdata_valid = 1'd0; +wire soc_netsoc_sdram_bankmachine1_refresh_req; +reg soc_netsoc_sdram_bankmachine1_refresh_gnt = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_valid = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_ready = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine1_cmd_payload_a = 14'd0; +wire [2:0] soc_netsoc_sdram_bankmachine1_cmd_payload_ba; +reg soc_netsoc_sdram_bankmachine1_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_payload_we = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_payload_is_read = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_payload_is_write = 1'd0; +reg soc_netsoc_sdram_bankmachine1_auto_precharge = 1'd0; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; +reg soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_first = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_last = 1'd0; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_first; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_last; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; +wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; +wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; +reg [3:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level = 4'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we; +wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read; +wire [2:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr; +wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_ready; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_first; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_last; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_source_ready; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_source_first; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_source_last; +reg soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr = 21'd0; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce; +wire soc_netsoc_sdram_bankmachine1_cmd_buffer_busy; +reg soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_buffer_first_n = 1'd0; +reg soc_netsoc_sdram_bankmachine1_cmd_buffer_last_n = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine1_row = 14'd0; +reg soc_netsoc_sdram_bankmachine1_row_opened = 1'd0; +wire soc_netsoc_sdram_bankmachine1_row_hit; +reg soc_netsoc_sdram_bankmachine1_row_open = 1'd0; +reg soc_netsoc_sdram_bankmachine1_row_close = 1'd0; +reg soc_netsoc_sdram_bankmachine1_row_col_n_addr_sel = 1'd0; +wire soc_netsoc_sdram_bankmachine1_twtpcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine1_twtpcon_ready = 1'd1; +reg [2:0] soc_netsoc_sdram_bankmachine1_twtpcon_count = 3'd0; +wire soc_netsoc_sdram_bankmachine1_trccon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine1_trccon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine1_trccon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine1_trascon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine1_trascon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine1_trascon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine2_req_valid; +wire soc_netsoc_sdram_bankmachine2_req_ready; +wire soc_netsoc_sdram_bankmachine2_req_we; +wire [20:0] soc_netsoc_sdram_bankmachine2_req_addr; +wire soc_netsoc_sdram_bankmachine2_req_lock; +reg soc_netsoc_sdram_bankmachine2_req_wdata_ready = 1'd0; +reg soc_netsoc_sdram_bankmachine2_req_rdata_valid = 1'd0; +wire soc_netsoc_sdram_bankmachine2_refresh_req; +reg soc_netsoc_sdram_bankmachine2_refresh_gnt = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_valid = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_ready = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine2_cmd_payload_a = 14'd0; +wire [2:0] soc_netsoc_sdram_bankmachine2_cmd_payload_ba; +reg soc_netsoc_sdram_bankmachine2_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_payload_we = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_payload_is_read = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_payload_is_write = 1'd0; +reg soc_netsoc_sdram_bankmachine2_auto_precharge = 1'd0; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; +reg soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_first = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_last = 1'd0; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_first; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_last; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; +wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; +wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; +reg [3:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level = 4'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we; +wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read; +wire [2:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr; +wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_ready; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_first; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_last; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_source_ready; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_source_first; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_source_last; +reg soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr = 21'd0; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce; +wire soc_netsoc_sdram_bankmachine2_cmd_buffer_busy; +reg soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_buffer_first_n = 1'd0; +reg soc_netsoc_sdram_bankmachine2_cmd_buffer_last_n = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine2_row = 14'd0; +reg soc_netsoc_sdram_bankmachine2_row_opened = 1'd0; +wire soc_netsoc_sdram_bankmachine2_row_hit; +reg soc_netsoc_sdram_bankmachine2_row_open = 1'd0; +reg soc_netsoc_sdram_bankmachine2_row_close = 1'd0; +reg soc_netsoc_sdram_bankmachine2_row_col_n_addr_sel = 1'd0; +wire soc_netsoc_sdram_bankmachine2_twtpcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine2_twtpcon_ready = 1'd1; +reg [2:0] soc_netsoc_sdram_bankmachine2_twtpcon_count = 3'd0; +wire soc_netsoc_sdram_bankmachine2_trccon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine2_trccon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine2_trccon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine2_trascon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine2_trascon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine2_trascon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine3_req_valid; +wire soc_netsoc_sdram_bankmachine3_req_ready; +wire soc_netsoc_sdram_bankmachine3_req_we; +wire [20:0] soc_netsoc_sdram_bankmachine3_req_addr; +wire soc_netsoc_sdram_bankmachine3_req_lock; +reg soc_netsoc_sdram_bankmachine3_req_wdata_ready = 1'd0; +reg soc_netsoc_sdram_bankmachine3_req_rdata_valid = 1'd0; +wire soc_netsoc_sdram_bankmachine3_refresh_req; +reg soc_netsoc_sdram_bankmachine3_refresh_gnt = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_valid = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_ready = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine3_cmd_payload_a = 14'd0; +wire [2:0] soc_netsoc_sdram_bankmachine3_cmd_payload_ba; +reg soc_netsoc_sdram_bankmachine3_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_payload_we = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_payload_is_read = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_payload_is_write = 1'd0; +reg soc_netsoc_sdram_bankmachine3_auto_precharge = 1'd0; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; +reg soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_first = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_last = 1'd0; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_first; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_last; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; +wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; +wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; +reg [3:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level = 4'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we; +wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read; +wire [2:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr; +wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_ready; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_first; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_last; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_source_ready; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_source_first; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_source_last; +reg soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr = 21'd0; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce; +wire soc_netsoc_sdram_bankmachine3_cmd_buffer_busy; +reg soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_buffer_first_n = 1'd0; +reg soc_netsoc_sdram_bankmachine3_cmd_buffer_last_n = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine3_row = 14'd0; +reg soc_netsoc_sdram_bankmachine3_row_opened = 1'd0; +wire soc_netsoc_sdram_bankmachine3_row_hit; +reg soc_netsoc_sdram_bankmachine3_row_open = 1'd0; +reg soc_netsoc_sdram_bankmachine3_row_close = 1'd0; +reg soc_netsoc_sdram_bankmachine3_row_col_n_addr_sel = 1'd0; +wire soc_netsoc_sdram_bankmachine3_twtpcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine3_twtpcon_ready = 1'd1; +reg [2:0] soc_netsoc_sdram_bankmachine3_twtpcon_count = 3'd0; +wire soc_netsoc_sdram_bankmachine3_trccon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine3_trccon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine3_trccon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine3_trascon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine3_trascon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine3_trascon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine4_req_valid; +wire soc_netsoc_sdram_bankmachine4_req_ready; +wire soc_netsoc_sdram_bankmachine4_req_we; +wire [20:0] soc_netsoc_sdram_bankmachine4_req_addr; +wire soc_netsoc_sdram_bankmachine4_req_lock; +reg soc_netsoc_sdram_bankmachine4_req_wdata_ready = 1'd0; +reg soc_netsoc_sdram_bankmachine4_req_rdata_valid = 1'd0; +wire soc_netsoc_sdram_bankmachine4_refresh_req; +reg soc_netsoc_sdram_bankmachine4_refresh_gnt = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_valid = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_ready = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine4_cmd_payload_a = 14'd0; +wire [2:0] soc_netsoc_sdram_bankmachine4_cmd_payload_ba; +reg soc_netsoc_sdram_bankmachine4_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_payload_we = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_payload_is_read = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_payload_is_write = 1'd0; +reg soc_netsoc_sdram_bankmachine4_auto_precharge = 1'd0; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; +reg soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_first = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_last = 1'd0; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_first; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_last; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; +wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; +wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; +reg [3:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level = 4'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we; +wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read; +wire [2:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr; +wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_ready; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_first; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_last; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_source_ready; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_source_first; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_source_last; +reg soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr = 21'd0; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce; +wire soc_netsoc_sdram_bankmachine4_cmd_buffer_busy; +reg soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_buffer_first_n = 1'd0; +reg soc_netsoc_sdram_bankmachine4_cmd_buffer_last_n = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine4_row = 14'd0; +reg soc_netsoc_sdram_bankmachine4_row_opened = 1'd0; +wire soc_netsoc_sdram_bankmachine4_row_hit; +reg soc_netsoc_sdram_bankmachine4_row_open = 1'd0; +reg soc_netsoc_sdram_bankmachine4_row_close = 1'd0; +reg soc_netsoc_sdram_bankmachine4_row_col_n_addr_sel = 1'd0; +wire soc_netsoc_sdram_bankmachine4_twtpcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine4_twtpcon_ready = 1'd1; +reg [2:0] soc_netsoc_sdram_bankmachine4_twtpcon_count = 3'd0; +wire soc_netsoc_sdram_bankmachine4_trccon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine4_trccon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine4_trccon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine4_trascon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine4_trascon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine4_trascon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine5_req_valid; +wire soc_netsoc_sdram_bankmachine5_req_ready; +wire soc_netsoc_sdram_bankmachine5_req_we; +wire [20:0] soc_netsoc_sdram_bankmachine5_req_addr; +wire soc_netsoc_sdram_bankmachine5_req_lock; +reg soc_netsoc_sdram_bankmachine5_req_wdata_ready = 1'd0; +reg soc_netsoc_sdram_bankmachine5_req_rdata_valid = 1'd0; +wire soc_netsoc_sdram_bankmachine5_refresh_req; +reg soc_netsoc_sdram_bankmachine5_refresh_gnt = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_valid = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_ready = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine5_cmd_payload_a = 14'd0; +wire [2:0] soc_netsoc_sdram_bankmachine5_cmd_payload_ba; +reg soc_netsoc_sdram_bankmachine5_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_payload_we = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_payload_is_read = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_payload_is_write = 1'd0; +reg soc_netsoc_sdram_bankmachine5_auto_precharge = 1'd0; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; +reg soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_first = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_last = 1'd0; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_first; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_last; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; +wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; +wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; +reg [3:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level = 4'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we; +wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read; +wire [2:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr; +wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_ready; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_first; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_last; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_source_ready; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_source_first; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_source_last; +reg soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr = 21'd0; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce; +wire soc_netsoc_sdram_bankmachine5_cmd_buffer_busy; +reg soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_buffer_first_n = 1'd0; +reg soc_netsoc_sdram_bankmachine5_cmd_buffer_last_n = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine5_row = 14'd0; +reg soc_netsoc_sdram_bankmachine5_row_opened = 1'd0; +wire soc_netsoc_sdram_bankmachine5_row_hit; +reg soc_netsoc_sdram_bankmachine5_row_open = 1'd0; +reg soc_netsoc_sdram_bankmachine5_row_close = 1'd0; +reg soc_netsoc_sdram_bankmachine5_row_col_n_addr_sel = 1'd0; +wire soc_netsoc_sdram_bankmachine5_twtpcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine5_twtpcon_ready = 1'd1; +reg [2:0] soc_netsoc_sdram_bankmachine5_twtpcon_count = 3'd0; +wire soc_netsoc_sdram_bankmachine5_trccon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine5_trccon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine5_trccon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine5_trascon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine5_trascon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine5_trascon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine6_req_valid; +wire soc_netsoc_sdram_bankmachine6_req_ready; +wire soc_netsoc_sdram_bankmachine6_req_we; +wire [20:0] soc_netsoc_sdram_bankmachine6_req_addr; +wire soc_netsoc_sdram_bankmachine6_req_lock; +reg soc_netsoc_sdram_bankmachine6_req_wdata_ready = 1'd0; +reg soc_netsoc_sdram_bankmachine6_req_rdata_valid = 1'd0; +wire soc_netsoc_sdram_bankmachine6_refresh_req; +reg soc_netsoc_sdram_bankmachine6_refresh_gnt = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_valid = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_ready = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine6_cmd_payload_a = 14'd0; +wire [2:0] soc_netsoc_sdram_bankmachine6_cmd_payload_ba; +reg soc_netsoc_sdram_bankmachine6_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_payload_we = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_payload_is_read = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_payload_is_write = 1'd0; +reg soc_netsoc_sdram_bankmachine6_auto_precharge = 1'd0; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; +reg soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_first = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_last = 1'd0; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_first; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_last; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; +wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; +wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; +reg [3:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level = 4'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we; +wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read; +wire [2:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr; +wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_ready; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_first; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_last; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_source_ready; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_source_first; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_source_last; +reg soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr = 21'd0; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce; +wire soc_netsoc_sdram_bankmachine6_cmd_buffer_busy; +reg soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_buffer_first_n = 1'd0; +reg soc_netsoc_sdram_bankmachine6_cmd_buffer_last_n = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine6_row = 14'd0; +reg soc_netsoc_sdram_bankmachine6_row_opened = 1'd0; +wire soc_netsoc_sdram_bankmachine6_row_hit; +reg soc_netsoc_sdram_bankmachine6_row_open = 1'd0; +reg soc_netsoc_sdram_bankmachine6_row_close = 1'd0; +reg soc_netsoc_sdram_bankmachine6_row_col_n_addr_sel = 1'd0; +wire soc_netsoc_sdram_bankmachine6_twtpcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine6_twtpcon_ready = 1'd1; +reg [2:0] soc_netsoc_sdram_bankmachine6_twtpcon_count = 3'd0; +wire soc_netsoc_sdram_bankmachine6_trccon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine6_trccon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine6_trccon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine6_trascon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine6_trascon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine6_trascon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine7_req_valid; +wire soc_netsoc_sdram_bankmachine7_req_ready; +wire soc_netsoc_sdram_bankmachine7_req_we; +wire [20:0] soc_netsoc_sdram_bankmachine7_req_addr; +wire soc_netsoc_sdram_bankmachine7_req_lock; +reg soc_netsoc_sdram_bankmachine7_req_wdata_ready = 1'd0; +reg soc_netsoc_sdram_bankmachine7_req_rdata_valid = 1'd0; +wire soc_netsoc_sdram_bankmachine7_refresh_req; +reg soc_netsoc_sdram_bankmachine7_refresh_gnt = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_valid = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_ready = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine7_cmd_payload_a = 14'd0; +wire [2:0] soc_netsoc_sdram_bankmachine7_cmd_payload_ba; +reg soc_netsoc_sdram_bankmachine7_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_payload_we = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_payload_is_read = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_payload_is_write = 1'd0; +reg soc_netsoc_sdram_bankmachine7_auto_precharge = 1'd0; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; +reg soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_first = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_last = 1'd0; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_first; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_last; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; +wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; +wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; +reg [3:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level = 4'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace = 1'd0; +reg [2:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume = 3'd0; +reg [2:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr = 3'd0; +wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we; +wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read; +wire [2:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr; +wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_ready; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_first; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_last; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_we; +wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_addr; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_source_ready; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_source_first; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_source_last; +reg soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_we = 1'd0; +reg [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr = 21'd0; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce; +wire soc_netsoc_sdram_bankmachine7_cmd_buffer_busy; +reg soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_buffer_first_n = 1'd0; +reg soc_netsoc_sdram_bankmachine7_cmd_buffer_last_n = 1'd0; +reg [13:0] soc_netsoc_sdram_bankmachine7_row = 14'd0; +reg soc_netsoc_sdram_bankmachine7_row_opened = 1'd0; +wire soc_netsoc_sdram_bankmachine7_row_hit; +reg soc_netsoc_sdram_bankmachine7_row_open = 1'd0; +reg soc_netsoc_sdram_bankmachine7_row_close = 1'd0; +reg soc_netsoc_sdram_bankmachine7_row_col_n_addr_sel = 1'd0; +wire soc_netsoc_sdram_bankmachine7_twtpcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine7_twtpcon_ready = 1'd1; +reg [2:0] soc_netsoc_sdram_bankmachine7_twtpcon_count = 3'd0; +wire soc_netsoc_sdram_bankmachine7_trccon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine7_trccon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine7_trccon_count = 2'd0; +wire soc_netsoc_sdram_bankmachine7_trascon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine7_trascon_ready = 1'd1; +reg [1:0] soc_netsoc_sdram_bankmachine7_trascon_count = 2'd0; +wire soc_netsoc_sdram_ras_allowed; +wire soc_netsoc_sdram_cas_allowed; +reg soc_netsoc_sdram_choose_cmd_want_reads = 1'd0; +reg soc_netsoc_sdram_choose_cmd_want_writes = 1'd0; +reg soc_netsoc_sdram_choose_cmd_want_cmds = 1'd0; +reg soc_netsoc_sdram_choose_cmd_want_activates = 1'd0; +wire soc_netsoc_sdram_choose_cmd_cmd_valid; +reg soc_netsoc_sdram_choose_cmd_cmd_ready = 1'd0; +wire [13:0] soc_netsoc_sdram_choose_cmd_cmd_payload_a; +wire [2:0] soc_netsoc_sdram_choose_cmd_cmd_payload_ba; +reg soc_netsoc_sdram_choose_cmd_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_choose_cmd_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_choose_cmd_cmd_payload_we = 1'd0; +wire soc_netsoc_sdram_choose_cmd_cmd_payload_is_cmd; +wire soc_netsoc_sdram_choose_cmd_cmd_payload_is_read; +wire soc_netsoc_sdram_choose_cmd_cmd_payload_is_write; +reg [7:0] soc_netsoc_sdram_choose_cmd_valids = 8'd0; +wire [7:0] soc_netsoc_sdram_choose_cmd_request; +reg [2:0] soc_netsoc_sdram_choose_cmd_grant = 3'd0; +wire soc_netsoc_sdram_choose_cmd_ce; +reg soc_netsoc_sdram_choose_req_want_reads = 1'd0; +reg soc_netsoc_sdram_choose_req_want_writes = 1'd0; +reg soc_netsoc_sdram_choose_req_want_cmds = 1'd0; +reg soc_netsoc_sdram_choose_req_want_activates = 1'd0; +wire soc_netsoc_sdram_choose_req_cmd_valid; +reg soc_netsoc_sdram_choose_req_cmd_ready = 1'd0; +wire [13:0] soc_netsoc_sdram_choose_req_cmd_payload_a; +wire [2:0] soc_netsoc_sdram_choose_req_cmd_payload_ba; +reg soc_netsoc_sdram_choose_req_cmd_payload_cas = 1'd0; +reg soc_netsoc_sdram_choose_req_cmd_payload_ras = 1'd0; +reg soc_netsoc_sdram_choose_req_cmd_payload_we = 1'd0; +wire soc_netsoc_sdram_choose_req_cmd_payload_is_cmd; +wire soc_netsoc_sdram_choose_req_cmd_payload_is_read; +wire soc_netsoc_sdram_choose_req_cmd_payload_is_write; +reg [7:0] soc_netsoc_sdram_choose_req_valids = 8'd0; +wire [7:0] soc_netsoc_sdram_choose_req_request; +reg [2:0] soc_netsoc_sdram_choose_req_grant = 3'd0; +wire soc_netsoc_sdram_choose_req_ce; +reg [13:0] soc_netsoc_sdram_nop_a = 14'd0; +reg [2:0] soc_netsoc_sdram_nop_ba = 3'd0; +reg [1:0] soc_netsoc_sdram_steerer_sel0 = 2'd0; +reg [1:0] soc_netsoc_sdram_steerer_sel1 = 2'd0; +reg [1:0] soc_netsoc_sdram_steerer_sel2 = 2'd0; +reg [1:0] soc_netsoc_sdram_steerer_sel3 = 2'd0; +reg soc_netsoc_sdram_steerer0 = 1'd1; +reg soc_netsoc_sdram_steerer1 = 1'd1; +reg soc_netsoc_sdram_steerer2 = 1'd1; +reg soc_netsoc_sdram_steerer3 = 1'd1; +reg soc_netsoc_sdram_steerer4 = 1'd1; +reg soc_netsoc_sdram_steerer5 = 1'd1; +reg soc_netsoc_sdram_steerer6 = 1'd1; +reg soc_netsoc_sdram_steerer7 = 1'd1; +wire soc_netsoc_sdram_trrdcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_trrdcon_ready = 1'd1; +reg soc_netsoc_sdram_trrdcon_count = 1'd0; +wire soc_netsoc_sdram_tfawcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_tfawcon_ready = 1'd1; +wire [1:0] soc_netsoc_sdram_tfawcon_count; +reg [3:0] soc_netsoc_sdram_tfawcon_window = 4'd0; +wire soc_netsoc_sdram_tccdcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_tccdcon_ready = 1'd1; +reg soc_netsoc_sdram_tccdcon_count = 1'd0; +wire soc_netsoc_sdram_twtrcon_valid; +(* dont_touch = "true" *) reg soc_netsoc_sdram_twtrcon_ready = 1'd1; +reg [2:0] soc_netsoc_sdram_twtrcon_count = 3'd0; +wire soc_netsoc_sdram_read_available; +wire soc_netsoc_sdram_write_available; +reg soc_netsoc_sdram_en0 = 1'd0; +wire soc_netsoc_sdram_max_time0; +reg [4:0] soc_netsoc_sdram_time0 = 5'd0; +reg soc_netsoc_sdram_en1 = 1'd0; +wire soc_netsoc_sdram_max_time1; +reg [3:0] soc_netsoc_sdram_time1 = 4'd0; +wire soc_netsoc_sdram_go_to_refresh; +wire soc_netsoc_sdram_bandwidth_update_re; +wire soc_netsoc_sdram_bandwidth_update_r; +wire soc_netsoc_sdram_bandwidth_update_we; +reg soc_netsoc_sdram_bandwidth_update_w = 1'd0; +reg [23:0] soc_netsoc_sdram_bandwidth_nreads_status = 24'd0; +wire soc_netsoc_sdram_bandwidth_nreads_we; +reg [23:0] soc_netsoc_sdram_bandwidth_nwrites_status = 24'd0; +wire soc_netsoc_sdram_bandwidth_nwrites_we; +reg [7:0] soc_netsoc_sdram_bandwidth_data_width_status = 8'd128; +wire soc_netsoc_sdram_bandwidth_data_width_we; +reg soc_netsoc_sdram_bandwidth_cmd_valid = 1'd0; +reg soc_netsoc_sdram_bandwidth_cmd_ready = 1'd0; +reg soc_netsoc_sdram_bandwidth_cmd_is_read = 1'd0; +reg soc_netsoc_sdram_bandwidth_cmd_is_write = 1'd0; +reg [23:0] soc_netsoc_sdram_bandwidth_counter = 24'd0; +reg soc_netsoc_sdram_bandwidth_period = 1'd0; +reg [23:0] soc_netsoc_sdram_bandwidth_nreads = 24'd0; +reg [23:0] soc_netsoc_sdram_bandwidth_nwrites = 24'd0; +reg [23:0] soc_netsoc_sdram_bandwidth_nreads_r = 24'd0; +reg [23:0] soc_netsoc_sdram_bandwidth_nwrites_r = 24'd0; +reg soc_netsoc_port_cmd_valid = 1'd0; +wire soc_netsoc_port_cmd_ready; +reg soc_netsoc_port_cmd_payload_we = 1'd0; +reg [23:0] soc_netsoc_port_cmd_payload_addr = 24'd0; +wire soc_netsoc_port_wdata_valid; +wire soc_netsoc_port_wdata_ready; +wire soc_netsoc_port_wdata_first; +wire soc_netsoc_port_wdata_last; +wire [127:0] soc_netsoc_port_wdata_payload_data; +wire [15:0] soc_netsoc_port_wdata_payload_we; +wire soc_netsoc_port_rdata_valid; +wire soc_netsoc_port_rdata_ready; +reg soc_netsoc_port_rdata_first = 1'd0; +reg soc_netsoc_port_rdata_last = 1'd0; +wire [127:0] soc_netsoc_port_rdata_payload_data; +wire [29:0] soc_netsoc_interface1_wb_sdram_adr; +wire [31:0] soc_netsoc_interface1_wb_sdram_dat_w; +wire [31:0] soc_netsoc_interface1_wb_sdram_dat_r; +wire [3:0] soc_netsoc_interface1_wb_sdram_sel; +wire soc_netsoc_interface1_wb_sdram_cyc; +wire soc_netsoc_interface1_wb_sdram_stb; +wire soc_netsoc_interface1_wb_sdram_ack; +wire soc_netsoc_interface1_wb_sdram_we; +wire [2:0] soc_netsoc_interface1_wb_sdram_cti; +wire [1:0] soc_netsoc_interface1_wb_sdram_bte; +wire soc_netsoc_interface1_wb_sdram_err; +wire [29:0] soc_netsoc_adr; +wire [127:0] soc_netsoc_dat_w; +wire [127:0] soc_netsoc_dat_r; +wire [15:0] soc_netsoc_sel; +reg soc_netsoc_cyc = 1'd0; +reg soc_netsoc_stb = 1'd0; +reg soc_netsoc_ack = 1'd0; +reg soc_netsoc_we = 1'd0; +wire [8:0] soc_netsoc_data_port_adr; +wire [127:0] soc_netsoc_data_port_dat_r; +reg [15:0] soc_netsoc_data_port_we = 16'd0; +reg [127:0] soc_netsoc_data_port_dat_w = 128'd0; +reg soc_netsoc_write_from_slave = 1'd0; +reg [1:0] soc_netsoc_adr_offset_r = 2'd0; +wire [8:0] soc_netsoc_tag_port_adr; +wire [23:0] soc_netsoc_tag_port_dat_r; +reg soc_netsoc_tag_port_we = 1'd0; +wire [23:0] soc_netsoc_tag_port_dat_w; +wire [22:0] soc_netsoc_tag_do_tag; +wire soc_netsoc_tag_do_dirty; +wire [22:0] soc_netsoc_tag_di_tag; +reg soc_netsoc_tag_di_dirty = 1'd0; +reg soc_netsoc_word_clr = 1'd0; +reg soc_netsoc_word_inc = 1'd0; +wire soc_netsoc_wdata_converter_sink_valid; +wire soc_netsoc_wdata_converter_sink_ready; +reg soc_netsoc_wdata_converter_sink_first = 1'd0; +reg soc_netsoc_wdata_converter_sink_last = 1'd0; +wire [127:0] soc_netsoc_wdata_converter_sink_payload_data; +wire [15:0] soc_netsoc_wdata_converter_sink_payload_we; +wire soc_netsoc_wdata_converter_source_valid; +wire soc_netsoc_wdata_converter_source_ready; +wire soc_netsoc_wdata_converter_source_first; +wire soc_netsoc_wdata_converter_source_last; +wire [127:0] soc_netsoc_wdata_converter_source_payload_data; +wire [15:0] soc_netsoc_wdata_converter_source_payload_we; +wire soc_netsoc_wdata_converter_converter_sink_valid; +wire soc_netsoc_wdata_converter_converter_sink_ready; +wire soc_netsoc_wdata_converter_converter_sink_first; +wire soc_netsoc_wdata_converter_converter_sink_last; +wire [143:0] soc_netsoc_wdata_converter_converter_sink_payload_data; +wire soc_netsoc_wdata_converter_converter_source_valid; +wire soc_netsoc_wdata_converter_converter_source_ready; +wire soc_netsoc_wdata_converter_converter_source_first; +wire soc_netsoc_wdata_converter_converter_source_last; +wire [143:0] soc_netsoc_wdata_converter_converter_source_payload_data; +wire soc_netsoc_wdata_converter_converter_source_payload_valid_token_count; +wire soc_netsoc_wdata_converter_source_source_valid; +wire soc_netsoc_wdata_converter_source_source_ready; +wire soc_netsoc_wdata_converter_source_source_first; +wire soc_netsoc_wdata_converter_source_source_last; +wire [143:0] soc_netsoc_wdata_converter_source_source_payload_data; +wire soc_netsoc_rdata_converter_sink_valid; +wire soc_netsoc_rdata_converter_sink_ready; +wire soc_netsoc_rdata_converter_sink_first; +wire soc_netsoc_rdata_converter_sink_last; +wire [127:0] soc_netsoc_rdata_converter_sink_payload_data; +wire soc_netsoc_rdata_converter_source_valid; +wire soc_netsoc_rdata_converter_source_ready; +wire soc_netsoc_rdata_converter_source_first; +wire soc_netsoc_rdata_converter_source_last; +wire [127:0] soc_netsoc_rdata_converter_source_payload_data; +wire soc_netsoc_rdata_converter_converter_sink_valid; +wire soc_netsoc_rdata_converter_converter_sink_ready; +wire soc_netsoc_rdata_converter_converter_sink_first; +wire soc_netsoc_rdata_converter_converter_sink_last; +wire [127:0] soc_netsoc_rdata_converter_converter_sink_payload_data; +wire soc_netsoc_rdata_converter_converter_source_valid; +wire soc_netsoc_rdata_converter_converter_source_ready; +wire soc_netsoc_rdata_converter_converter_source_first; +wire soc_netsoc_rdata_converter_converter_source_last; +wire [127:0] soc_netsoc_rdata_converter_converter_source_payload_data; +wire soc_netsoc_rdata_converter_converter_source_payload_valid_token_count; +wire soc_netsoc_rdata_converter_source_source_valid; +wire soc_netsoc_rdata_converter_source_source_ready; +wire soc_netsoc_rdata_converter_source_source_first; +wire soc_netsoc_rdata_converter_source_source_last; +wire [127:0] soc_netsoc_rdata_converter_source_source_payload_data; +reg soc_netsoc_count = 1'd0; +reg soc_reset_storage = 1'd0; +reg soc_reset_re = 1'd0; +(* dont_touch = "true" *) wire eth_rx_clk; +wire eth_rx_rst; +(* dont_touch = "true" *) wire eth_tx_clk; +wire eth_tx_rst; +wire soc_reset0; +wire soc_reset1; +reg [8:0] soc_counter = 9'd0; +wire soc_counter_done; +wire soc_counter_ce; +wire soc_liteethphymiitx_sink_sink_valid; +wire soc_liteethphymiitx_sink_sink_ready; +wire soc_liteethphymiitx_sink_sink_first; +wire soc_liteethphymiitx_sink_sink_last; +wire [7:0] soc_liteethphymiitx_sink_sink_payload_data; +wire soc_liteethphymiitx_sink_sink_payload_last_be; +wire soc_liteethphymiitx_sink_sink_payload_error; +wire soc_liteethphymiitx_converter_sink_valid; +wire soc_liteethphymiitx_converter_sink_ready; +reg soc_liteethphymiitx_converter_sink_first = 1'd0; +reg soc_liteethphymiitx_converter_sink_last = 1'd0; +wire [7:0] soc_liteethphymiitx_converter_sink_payload_data; +wire soc_liteethphymiitx_converter_source_valid; +wire soc_liteethphymiitx_converter_source_ready; +wire soc_liteethphymiitx_converter_source_first; +wire soc_liteethphymiitx_converter_source_last; +wire [3:0] soc_liteethphymiitx_converter_source_payload_data; +wire soc_liteethphymiitx_converter_converter_sink_valid; +wire soc_liteethphymiitx_converter_converter_sink_ready; +wire soc_liteethphymiitx_converter_converter_sink_first; +wire soc_liteethphymiitx_converter_converter_sink_last; +reg [7:0] soc_liteethphymiitx_converter_converter_sink_payload_data = 8'd0; +wire soc_liteethphymiitx_converter_converter_source_valid; +wire soc_liteethphymiitx_converter_converter_source_ready; +wire soc_liteethphymiitx_converter_converter_source_first; +wire soc_liteethphymiitx_converter_converter_source_last; +reg [3:0] soc_liteethphymiitx_converter_converter_source_payload_data = 4'd0; +wire soc_liteethphymiitx_converter_converter_source_payload_valid_token_count; +reg soc_liteethphymiitx_converter_converter_mux = 1'd0; +wire soc_liteethphymiitx_converter_converter_first; +wire soc_liteethphymiitx_converter_converter_last; +wire soc_liteethphymiitx_converter_source_source_valid; +wire soc_liteethphymiitx_converter_source_source_ready; +wire soc_liteethphymiitx_converter_source_source_first; +wire soc_liteethphymiitx_converter_source_source_last; +wire [3:0] soc_liteethphymiitx_converter_source_source_payload_data; +wire soc_liteethphymiirx_source_source_valid; +wire soc_liteethphymiirx_source_source_ready; +wire soc_liteethphymiirx_source_source_first; +wire soc_liteethphymiirx_source_source_last; +wire [7:0] soc_liteethphymiirx_source_source_payload_data; +reg soc_liteethphymiirx_source_source_payload_last_be = 1'd0; +reg soc_liteethphymiirx_source_source_payload_error = 1'd0; +reg soc_liteethphymiirx_converter_sink_valid = 1'd0; +wire soc_liteethphymiirx_converter_sink_ready; +reg soc_liteethphymiirx_converter_sink_first = 1'd0; +wire soc_liteethphymiirx_converter_sink_last; +reg [3:0] soc_liteethphymiirx_converter_sink_payload_data = 4'd0; +wire soc_liteethphymiirx_converter_source_valid; +wire soc_liteethphymiirx_converter_source_ready; +wire soc_liteethphymiirx_converter_source_first; +wire soc_liteethphymiirx_converter_source_last; +reg [7:0] soc_liteethphymiirx_converter_source_payload_data = 8'd0; +wire soc_liteethphymiirx_converter_converter_sink_valid; +wire soc_liteethphymiirx_converter_converter_sink_ready; +wire soc_liteethphymiirx_converter_converter_sink_first; +wire soc_liteethphymiirx_converter_converter_sink_last; +wire [3:0] soc_liteethphymiirx_converter_converter_sink_payload_data; +wire soc_liteethphymiirx_converter_converter_source_valid; +wire soc_liteethphymiirx_converter_converter_source_ready; +reg soc_liteethphymiirx_converter_converter_source_first = 1'd0; +reg soc_liteethphymiirx_converter_converter_source_last = 1'd0; +reg [7:0] soc_liteethphymiirx_converter_converter_source_payload_data = 8'd0; +reg [1:0] soc_liteethphymiirx_converter_converter_source_payload_valid_token_count = 2'd0; +reg soc_liteethphymiirx_converter_converter_demux = 1'd0; +wire soc_liteethphymiirx_converter_converter_load_part; +reg soc_liteethphymiirx_converter_converter_strobe_all = 1'd0; +wire soc_liteethphymiirx_converter_source_source_valid; +wire soc_liteethphymiirx_converter_source_source_ready; +wire soc_liteethphymiirx_converter_source_source_first; +wire soc_liteethphymiirx_converter_source_source_last; +wire [7:0] soc_liteethphymiirx_converter_source_source_payload_data; +reg soc_liteethphymiirx_converter_reset = 1'd0; +wire soc_mdc; +wire soc_oe; +wire soc_w; +reg [2:0] soc_storage = 3'd0; +reg soc_re = 1'd0; +reg soc_r = 1'd0; +reg soc_status = 1'd0; +wire soc_we; +wire soc_data_w; +wire soc_data_oe; +wire soc_data_r; +wire soc_tx_gap_inserter_sink_valid; +reg soc_tx_gap_inserter_sink_ready = 1'd0; +wire soc_tx_gap_inserter_sink_first; +wire soc_tx_gap_inserter_sink_last; +wire [7:0] soc_tx_gap_inserter_sink_payload_data; +wire soc_tx_gap_inserter_sink_payload_last_be; +wire soc_tx_gap_inserter_sink_payload_error; +reg soc_tx_gap_inserter_source_valid = 1'd0; +wire soc_tx_gap_inserter_source_ready; +reg soc_tx_gap_inserter_source_first = 1'd0; +reg soc_tx_gap_inserter_source_last = 1'd0; +reg [7:0] soc_tx_gap_inserter_source_payload_data = 8'd0; +reg soc_tx_gap_inserter_source_payload_last_be = 1'd0; +reg soc_tx_gap_inserter_source_payload_error = 1'd0; +reg [3:0] soc_tx_gap_inserter_counter = 4'd0; +reg soc_tx_gap_inserter_counter_reset = 1'd0; +reg soc_tx_gap_inserter_counter_ce = 1'd0; +reg soc_preamble_crc_status = 1'd1; +wire soc_preamble_crc_we; +reg [31:0] soc_preamble_errors_status = 32'd0; +wire soc_preamble_errors_we; +reg [31:0] soc_crc_errors_status = 32'd0; +wire soc_crc_errors_we; +wire soc_preamble_inserter_sink_valid; +reg soc_preamble_inserter_sink_ready = 1'd0; +wire soc_preamble_inserter_sink_first; +wire soc_preamble_inserter_sink_last; +wire [7:0] soc_preamble_inserter_sink_payload_data; +wire soc_preamble_inserter_sink_payload_last_be; +wire soc_preamble_inserter_sink_payload_error; +reg soc_preamble_inserter_source_valid = 1'd0; +wire soc_preamble_inserter_source_ready; +reg soc_preamble_inserter_source_first = 1'd0; +reg soc_preamble_inserter_source_last = 1'd0; +reg [7:0] soc_preamble_inserter_source_payload_data = 8'd0; +wire soc_preamble_inserter_source_payload_last_be; +reg soc_preamble_inserter_source_payload_error = 1'd0; +reg [63:0] soc_preamble_inserter_preamble = 64'd15372286728091293013; +reg [2:0] soc_preamble_inserter_cnt = 3'd0; +reg soc_preamble_inserter_clr_cnt = 1'd0; +reg soc_preamble_inserter_inc_cnt = 1'd0; +wire soc_preamble_checker_sink_valid; +reg soc_preamble_checker_sink_ready = 1'd0; +wire soc_preamble_checker_sink_first; +wire soc_preamble_checker_sink_last; +wire [7:0] soc_preamble_checker_sink_payload_data; +wire soc_preamble_checker_sink_payload_last_be; +wire soc_preamble_checker_sink_payload_error; +reg soc_preamble_checker_source_valid = 1'd0; +wire soc_preamble_checker_source_ready; +reg soc_preamble_checker_source_first = 1'd0; +reg soc_preamble_checker_source_last = 1'd0; +wire [7:0] soc_preamble_checker_source_payload_data; +wire soc_preamble_checker_source_payload_last_be; +reg soc_preamble_checker_source_payload_error = 1'd0; +reg soc_preamble_checker_error = 1'd0; +wire soc_crc32_inserter_sink_valid; +reg soc_crc32_inserter_sink_ready = 1'd0; +wire soc_crc32_inserter_sink_first; +wire soc_crc32_inserter_sink_last; +wire [7:0] soc_crc32_inserter_sink_payload_data; +wire soc_crc32_inserter_sink_payload_last_be; +wire soc_crc32_inserter_sink_payload_error; +reg soc_crc32_inserter_source_valid = 1'd0; +wire soc_crc32_inserter_source_ready; +reg soc_crc32_inserter_source_first = 1'd0; +reg soc_crc32_inserter_source_last = 1'd0; +reg [7:0] soc_crc32_inserter_source_payload_data = 8'd0; +reg soc_crc32_inserter_source_payload_last_be = 1'd0; +reg soc_crc32_inserter_source_payload_error = 1'd0; +reg [7:0] soc_crc32_inserter_data0 = 8'd0; +wire [31:0] soc_crc32_inserter_value; +wire soc_crc32_inserter_error; +wire [7:0] soc_crc32_inserter_data1; +wire [31:0] soc_crc32_inserter_last; +reg [31:0] soc_crc32_inserter_next = 32'd0; +reg [31:0] soc_crc32_inserter_reg = 32'd4294967295; +reg soc_crc32_inserter_ce = 1'd0; +reg soc_crc32_inserter_reset = 1'd0; +reg [1:0] soc_crc32_inserter_cnt = 2'd3; +wire soc_crc32_inserter_cnt_done; +reg soc_crc32_inserter_is_ongoing0 = 1'd0; +reg soc_crc32_inserter_is_ongoing1 = 1'd0; +wire soc_crc32_checker_sink_sink_valid; +reg soc_crc32_checker_sink_sink_ready = 1'd0; +wire soc_crc32_checker_sink_sink_first; +wire soc_crc32_checker_sink_sink_last; +wire [7:0] soc_crc32_checker_sink_sink_payload_data; +wire soc_crc32_checker_sink_sink_payload_last_be; +wire soc_crc32_checker_sink_sink_payload_error; +wire soc_crc32_checker_source_source_valid; +wire soc_crc32_checker_source_source_ready; +reg soc_crc32_checker_source_source_first = 1'd0; +wire soc_crc32_checker_source_source_last; +wire [7:0] soc_crc32_checker_source_source_payload_data; +wire soc_crc32_checker_source_source_payload_last_be; +reg soc_crc32_checker_source_source_payload_error = 1'd0; +wire soc_crc32_checker_error; +wire [7:0] soc_crc32_checker_crc_data0; +wire [31:0] soc_crc32_checker_crc_value; +wire soc_crc32_checker_crc_error; +wire [7:0] soc_crc32_checker_crc_data1; +wire [31:0] soc_crc32_checker_crc_last; +reg [31:0] soc_crc32_checker_crc_next = 32'd0; +reg [31:0] soc_crc32_checker_crc_reg = 32'd4294967295; +reg soc_crc32_checker_crc_ce = 1'd0; +reg soc_crc32_checker_crc_reset = 1'd0; +reg soc_crc32_checker_syncfifo_sink_valid = 1'd0; +wire soc_crc32_checker_syncfifo_sink_ready; +wire soc_crc32_checker_syncfifo_sink_first; +wire soc_crc32_checker_syncfifo_sink_last; +wire [7:0] soc_crc32_checker_syncfifo_sink_payload_data; +wire soc_crc32_checker_syncfifo_sink_payload_last_be; +wire soc_crc32_checker_syncfifo_sink_payload_error; +wire soc_crc32_checker_syncfifo_source_valid; +wire soc_crc32_checker_syncfifo_source_ready; +wire soc_crc32_checker_syncfifo_source_first; +wire soc_crc32_checker_syncfifo_source_last; +wire [7:0] soc_crc32_checker_syncfifo_source_payload_data; +wire soc_crc32_checker_syncfifo_source_payload_last_be; +wire soc_crc32_checker_syncfifo_source_payload_error; +wire soc_crc32_checker_syncfifo_syncfifo_we; +wire soc_crc32_checker_syncfifo_syncfifo_writable; +wire soc_crc32_checker_syncfifo_syncfifo_re; +wire soc_crc32_checker_syncfifo_syncfifo_readable; +wire [11:0] soc_crc32_checker_syncfifo_syncfifo_din; +wire [11:0] soc_crc32_checker_syncfifo_syncfifo_dout; +reg [2:0] soc_crc32_checker_syncfifo_level = 3'd0; +reg soc_crc32_checker_syncfifo_replace = 1'd0; +reg [2:0] soc_crc32_checker_syncfifo_produce = 3'd0; +reg [2:0] soc_crc32_checker_syncfifo_consume = 3'd0; +reg [2:0] soc_crc32_checker_syncfifo_wrport_adr = 3'd0; +wire [11:0] soc_crc32_checker_syncfifo_wrport_dat_r; +wire soc_crc32_checker_syncfifo_wrport_we; +wire [11:0] soc_crc32_checker_syncfifo_wrport_dat_w; +wire soc_crc32_checker_syncfifo_do_read; +wire [2:0] soc_crc32_checker_syncfifo_rdport_adr; +wire [11:0] soc_crc32_checker_syncfifo_rdport_dat_r; +wire [7:0] soc_crc32_checker_syncfifo_fifo_in_payload_data; +wire soc_crc32_checker_syncfifo_fifo_in_payload_last_be; +wire soc_crc32_checker_syncfifo_fifo_in_payload_error; +wire soc_crc32_checker_syncfifo_fifo_in_first; +wire soc_crc32_checker_syncfifo_fifo_in_last; +wire [7:0] soc_crc32_checker_syncfifo_fifo_out_payload_data; +wire soc_crc32_checker_syncfifo_fifo_out_payload_last_be; +wire soc_crc32_checker_syncfifo_fifo_out_payload_error; +wire soc_crc32_checker_syncfifo_fifo_out_first; +wire soc_crc32_checker_syncfifo_fifo_out_last; +reg soc_crc32_checker_fifo_reset = 1'd0; +wire soc_crc32_checker_fifo_in; +wire soc_crc32_checker_fifo_out; +wire soc_crc32_checker_fifo_full; +wire soc_ps_preamble_error_i; +wire soc_ps_preamble_error_o; +reg soc_ps_preamble_error_toggle_i = 1'd0; +wire soc_ps_preamble_error_toggle_o; +reg soc_ps_preamble_error_toggle_o_r = 1'd0; +wire soc_ps_crc_error_i; +wire soc_ps_crc_error_o; +reg soc_ps_crc_error_toggle_i = 1'd0; +wire soc_ps_crc_error_toggle_o; +reg soc_ps_crc_error_toggle_o_r = 1'd0; +wire soc_padding_inserter_sink_valid; +reg soc_padding_inserter_sink_ready = 1'd0; +wire soc_padding_inserter_sink_first; +wire soc_padding_inserter_sink_last; +wire [7:0] soc_padding_inserter_sink_payload_data; +wire soc_padding_inserter_sink_payload_last_be; +wire soc_padding_inserter_sink_payload_error; +reg soc_padding_inserter_source_valid = 1'd0; +wire soc_padding_inserter_source_ready; +reg soc_padding_inserter_source_first = 1'd0; +reg soc_padding_inserter_source_last = 1'd0; +reg [7:0] soc_padding_inserter_source_payload_data = 8'd0; +reg soc_padding_inserter_source_payload_last_be = 1'd0; +reg soc_padding_inserter_source_payload_error = 1'd0; +reg [15:0] soc_padding_inserter_counter = 16'd1; +wire soc_padding_inserter_counter_done; +reg soc_padding_inserter_counter_reset = 1'd0; +reg soc_padding_inserter_counter_ce = 1'd0; +wire soc_padding_checker_sink_valid; +wire soc_padding_checker_sink_ready; +wire soc_padding_checker_sink_first; +wire soc_padding_checker_sink_last; +wire [7:0] soc_padding_checker_sink_payload_data; +wire soc_padding_checker_sink_payload_last_be; +wire soc_padding_checker_sink_payload_error; +wire soc_padding_checker_source_valid; +wire soc_padding_checker_source_ready; +wire soc_padding_checker_source_first; +wire soc_padding_checker_source_last; +wire [7:0] soc_padding_checker_source_payload_data; +wire soc_padding_checker_source_payload_last_be; +wire soc_padding_checker_source_payload_error; +wire soc_tx_last_be_sink_valid; +wire soc_tx_last_be_sink_ready; +wire soc_tx_last_be_sink_first; +wire soc_tx_last_be_sink_last; +wire [7:0] soc_tx_last_be_sink_payload_data; +wire soc_tx_last_be_sink_payload_last_be; +wire soc_tx_last_be_sink_payload_error; +wire soc_tx_last_be_source_valid; +wire soc_tx_last_be_source_ready; +reg soc_tx_last_be_source_first = 1'd0; +wire soc_tx_last_be_source_last; +wire [7:0] soc_tx_last_be_source_payload_data; +reg soc_tx_last_be_source_payload_last_be = 1'd0; +reg soc_tx_last_be_source_payload_error = 1'd0; +reg soc_tx_last_be_ongoing = 1'd1; +wire soc_rx_last_be_sink_valid; +wire soc_rx_last_be_sink_ready; +wire soc_rx_last_be_sink_first; +wire soc_rx_last_be_sink_last; +wire [7:0] soc_rx_last_be_sink_payload_data; +wire soc_rx_last_be_sink_payload_last_be; +wire soc_rx_last_be_sink_payload_error; +wire soc_rx_last_be_source_valid; +wire soc_rx_last_be_source_ready; +wire soc_rx_last_be_source_first; +wire soc_rx_last_be_source_last; +wire [7:0] soc_rx_last_be_source_payload_data; +reg soc_rx_last_be_source_payload_last_be = 1'd0; +wire soc_rx_last_be_source_payload_error; +wire soc_tx_converter_sink_valid; +wire soc_tx_converter_sink_ready; +wire soc_tx_converter_sink_first; +wire soc_tx_converter_sink_last; +wire [31:0] soc_tx_converter_sink_payload_data; +wire [3:0] soc_tx_converter_sink_payload_last_be; +wire [3:0] soc_tx_converter_sink_payload_error; +wire soc_tx_converter_source_valid; +wire soc_tx_converter_source_ready; +wire soc_tx_converter_source_first; +wire soc_tx_converter_source_last; +wire [7:0] soc_tx_converter_source_payload_data; +wire soc_tx_converter_source_payload_last_be; +wire soc_tx_converter_source_payload_error; +wire soc_tx_converter_converter_sink_valid; +wire soc_tx_converter_converter_sink_ready; +wire soc_tx_converter_converter_sink_first; +wire soc_tx_converter_converter_sink_last; +reg [39:0] soc_tx_converter_converter_sink_payload_data = 40'd0; +wire soc_tx_converter_converter_source_valid; +wire soc_tx_converter_converter_source_ready; +wire soc_tx_converter_converter_source_first; +wire soc_tx_converter_converter_source_last; +reg [9:0] soc_tx_converter_converter_source_payload_data = 10'd0; +wire soc_tx_converter_converter_source_payload_valid_token_count; +reg [1:0] soc_tx_converter_converter_mux = 2'd0; +wire soc_tx_converter_converter_first; +wire soc_tx_converter_converter_last; +wire soc_tx_converter_source_source_valid; +wire soc_tx_converter_source_source_ready; +wire soc_tx_converter_source_source_first; +wire soc_tx_converter_source_source_last; +wire [9:0] soc_tx_converter_source_source_payload_data; +wire soc_rx_converter_sink_valid; +wire soc_rx_converter_sink_ready; +wire soc_rx_converter_sink_first; +wire soc_rx_converter_sink_last; +wire [7:0] soc_rx_converter_sink_payload_data; +wire soc_rx_converter_sink_payload_last_be; +wire soc_rx_converter_sink_payload_error; +wire soc_rx_converter_source_valid; +wire soc_rx_converter_source_ready; +wire soc_rx_converter_source_first; +wire soc_rx_converter_source_last; +reg [31:0] soc_rx_converter_source_payload_data = 32'd0; +reg [3:0] soc_rx_converter_source_payload_last_be = 4'd0; +reg [3:0] soc_rx_converter_source_payload_error = 4'd0; +wire soc_rx_converter_converter_sink_valid; +wire soc_rx_converter_converter_sink_ready; +wire soc_rx_converter_converter_sink_first; +wire soc_rx_converter_converter_sink_last; +wire [9:0] soc_rx_converter_converter_sink_payload_data; +wire soc_rx_converter_converter_source_valid; +wire soc_rx_converter_converter_source_ready; +reg soc_rx_converter_converter_source_first = 1'd0; +reg soc_rx_converter_converter_source_last = 1'd0; +reg [39:0] soc_rx_converter_converter_source_payload_data = 40'd0; +reg [2:0] soc_rx_converter_converter_source_payload_valid_token_count = 3'd0; +reg [1:0] soc_rx_converter_converter_demux = 2'd0; +wire soc_rx_converter_converter_load_part; +reg soc_rx_converter_converter_strobe_all = 1'd0; +wire soc_rx_converter_source_source_valid; +wire soc_rx_converter_source_source_ready; +wire soc_rx_converter_source_source_first; +wire soc_rx_converter_source_source_last; +wire [39:0] soc_rx_converter_source_source_payload_data; +wire soc_tx_cdc_sink_valid; +wire soc_tx_cdc_sink_ready; +wire soc_tx_cdc_sink_first; +wire soc_tx_cdc_sink_last; +wire [31:0] soc_tx_cdc_sink_payload_data; +wire [3:0] soc_tx_cdc_sink_payload_last_be; +wire [3:0] soc_tx_cdc_sink_payload_error; +wire soc_tx_cdc_source_valid; +wire soc_tx_cdc_source_ready; +wire soc_tx_cdc_source_first; +wire soc_tx_cdc_source_last; +wire [31:0] soc_tx_cdc_source_payload_data; +wire [3:0] soc_tx_cdc_source_payload_last_be; +wire [3:0] soc_tx_cdc_source_payload_error; +wire soc_tx_cdc_asyncfifo_we; +wire soc_tx_cdc_asyncfifo_writable; +wire soc_tx_cdc_asyncfifo_re; +wire soc_tx_cdc_asyncfifo_readable; +wire [41:0] soc_tx_cdc_asyncfifo_din; +wire [41:0] soc_tx_cdc_asyncfifo_dout; +wire soc_tx_cdc_graycounter0_ce; +(* dont_touch = "true" *) reg [6:0] soc_tx_cdc_graycounter0_q = 7'd0; +wire [6:0] soc_tx_cdc_graycounter0_q_next; +reg [6:0] soc_tx_cdc_graycounter0_q_binary = 7'd0; +reg [6:0] soc_tx_cdc_graycounter0_q_next_binary = 7'd0; +wire soc_tx_cdc_graycounter1_ce; +(* dont_touch = "true" *) reg [6:0] soc_tx_cdc_graycounter1_q = 7'd0; +wire [6:0] soc_tx_cdc_graycounter1_q_next; +reg [6:0] soc_tx_cdc_graycounter1_q_binary = 7'd0; +reg [6:0] soc_tx_cdc_graycounter1_q_next_binary = 7'd0; +wire [6:0] soc_tx_cdc_produce_rdomain; +wire [6:0] soc_tx_cdc_consume_wdomain; +wire [5:0] soc_tx_cdc_wrport_adr; +wire [41:0] soc_tx_cdc_wrport_dat_r; +wire soc_tx_cdc_wrport_we; +wire [41:0] soc_tx_cdc_wrport_dat_w; +wire [5:0] soc_tx_cdc_rdport_adr; +wire [41:0] soc_tx_cdc_rdport_dat_r; +wire [31:0] soc_tx_cdc_fifo_in_payload_data; +wire [3:0] soc_tx_cdc_fifo_in_payload_last_be; +wire [3:0] soc_tx_cdc_fifo_in_payload_error; +wire soc_tx_cdc_fifo_in_first; +wire soc_tx_cdc_fifo_in_last; +wire [31:0] soc_tx_cdc_fifo_out_payload_data; +wire [3:0] soc_tx_cdc_fifo_out_payload_last_be; +wire [3:0] soc_tx_cdc_fifo_out_payload_error; +wire soc_tx_cdc_fifo_out_first; +wire soc_tx_cdc_fifo_out_last; +wire soc_rx_cdc_sink_valid; +wire soc_rx_cdc_sink_ready; +wire soc_rx_cdc_sink_first; +wire soc_rx_cdc_sink_last; +wire [31:0] soc_rx_cdc_sink_payload_data; +wire [3:0] soc_rx_cdc_sink_payload_last_be; +wire [3:0] soc_rx_cdc_sink_payload_error; +wire soc_rx_cdc_source_valid; +wire soc_rx_cdc_source_ready; +wire soc_rx_cdc_source_first; +wire soc_rx_cdc_source_last; +wire [31:0] soc_rx_cdc_source_payload_data; +wire [3:0] soc_rx_cdc_source_payload_last_be; +wire [3:0] soc_rx_cdc_source_payload_error; +wire soc_rx_cdc_asyncfifo_we; +wire soc_rx_cdc_asyncfifo_writable; +wire soc_rx_cdc_asyncfifo_re; +wire soc_rx_cdc_asyncfifo_readable; +wire [41:0] soc_rx_cdc_asyncfifo_din; +wire [41:0] soc_rx_cdc_asyncfifo_dout; +wire soc_rx_cdc_graycounter0_ce; +(* dont_touch = "true" *) reg [6:0] soc_rx_cdc_graycounter0_q = 7'd0; +wire [6:0] soc_rx_cdc_graycounter0_q_next; +reg [6:0] soc_rx_cdc_graycounter0_q_binary = 7'd0; +reg [6:0] soc_rx_cdc_graycounter0_q_next_binary = 7'd0; +wire soc_rx_cdc_graycounter1_ce; +(* dont_touch = "true" *) reg [6:0] soc_rx_cdc_graycounter1_q = 7'd0; +wire [6:0] soc_rx_cdc_graycounter1_q_next; +reg [6:0] soc_rx_cdc_graycounter1_q_binary = 7'd0; +reg [6:0] soc_rx_cdc_graycounter1_q_next_binary = 7'd0; +wire [6:0] soc_rx_cdc_produce_rdomain; +wire [6:0] soc_rx_cdc_consume_wdomain; +wire [5:0] soc_rx_cdc_wrport_adr; +wire [41:0] soc_rx_cdc_wrport_dat_r; +wire soc_rx_cdc_wrport_we; +wire [41:0] soc_rx_cdc_wrport_dat_w; +wire [5:0] soc_rx_cdc_rdport_adr; +wire [41:0] soc_rx_cdc_rdport_dat_r; +wire [31:0] soc_rx_cdc_fifo_in_payload_data; +wire [3:0] soc_rx_cdc_fifo_in_payload_last_be; +wire [3:0] soc_rx_cdc_fifo_in_payload_error; +wire soc_rx_cdc_fifo_in_first; +wire soc_rx_cdc_fifo_in_last; +wire [31:0] soc_rx_cdc_fifo_out_payload_data; +wire [3:0] soc_rx_cdc_fifo_out_payload_last_be; +wire [3:0] soc_rx_cdc_fifo_out_payload_error; +wire soc_rx_cdc_fifo_out_first; +wire soc_rx_cdc_fifo_out_last; +wire soc_sink_valid; +wire soc_sink_ready; +wire soc_sink_first; +wire soc_sink_last; +wire [31:0] soc_sink_payload_data; +wire [3:0] soc_sink_payload_last_be; +wire [3:0] soc_sink_payload_error; +wire soc_source_valid; +wire soc_source_ready; +wire soc_source_first; +wire soc_source_last; +wire [31:0] soc_source_payload_data; +wire [3:0] soc_source_payload_last_be; +wire [3:0] soc_source_payload_error; +wire [29:0] soc_bus_adr; +wire [31:0] soc_bus_dat_w; +wire [31:0] soc_bus_dat_r; +wire [3:0] soc_bus_sel; +wire soc_bus_cyc; +wire soc_bus_stb; +wire soc_bus_ack; +wire soc_bus_we; +wire [2:0] soc_bus_cti; +wire [1:0] soc_bus_bte; +wire soc_bus_err; +wire soc_writer_sink_sink_valid; +reg soc_writer_sink_sink_ready = 1'd1; +wire soc_writer_sink_sink_first; +wire soc_writer_sink_sink_last; +wire [31:0] soc_writer_sink_sink_payload_data; +wire [3:0] soc_writer_sink_sink_payload_last_be; +wire [3:0] soc_writer_sink_sink_payload_error; +wire soc_writer_slot_status; +wire soc_writer_slot_we; +wire [31:0] soc_writer_length_status; +wire soc_writer_length_we; +reg [31:0] soc_writer_errors_status = 32'd0; +wire soc_writer_errors_we; +wire soc_writer_irq; +wire soc_writer_available_status; +wire soc_writer_available_pending; +wire soc_writer_available_trigger; +reg soc_writer_available_clear = 1'd0; +wire soc_writer_status_re; +wire soc_writer_status_r; +wire soc_writer_status_we; +wire soc_writer_status_w; +wire soc_writer_pending_re; +wire soc_writer_pending_r; +wire soc_writer_pending_we; +wire soc_writer_pending_w; +reg soc_writer_storage = 1'd0; +reg soc_writer_re = 1'd0; +reg [2:0] soc_writer_inc = 3'd0; +reg [31:0] soc_writer_counter = 32'd0; +reg soc_writer_counter_reset = 1'd0; +reg soc_writer_counter_ce = 1'd0; +reg soc_writer_slot = 1'd0; +reg soc_writer_slot_ce = 1'd0; +reg soc_writer_ongoing = 1'd0; +reg soc_writer_fifo_sink_valid = 1'd0; +wire soc_writer_fifo_sink_ready; +reg soc_writer_fifo_sink_first = 1'd0; +reg soc_writer_fifo_sink_last = 1'd0; +wire soc_writer_fifo_sink_payload_slot; +wire [31:0] soc_writer_fifo_sink_payload_length; +wire soc_writer_fifo_source_valid; +wire soc_writer_fifo_source_ready; +wire soc_writer_fifo_source_first; +wire soc_writer_fifo_source_last; +wire soc_writer_fifo_source_payload_slot; +wire [31:0] soc_writer_fifo_source_payload_length; +wire soc_writer_fifo_syncfifo_we; +wire soc_writer_fifo_syncfifo_writable; +wire soc_writer_fifo_syncfifo_re; +wire soc_writer_fifo_syncfifo_readable; +wire [34:0] soc_writer_fifo_syncfifo_din; +wire [34:0] soc_writer_fifo_syncfifo_dout; +reg [1:0] soc_writer_fifo_level = 2'd0; +reg soc_writer_fifo_replace = 1'd0; +reg soc_writer_fifo_produce = 1'd0; +reg soc_writer_fifo_consume = 1'd0; +reg soc_writer_fifo_wrport_adr = 1'd0; +wire [34:0] soc_writer_fifo_wrport_dat_r; +wire soc_writer_fifo_wrport_we; +wire [34:0] soc_writer_fifo_wrport_dat_w; +wire soc_writer_fifo_do_read; +wire soc_writer_fifo_rdport_adr; +wire [34:0] soc_writer_fifo_rdport_dat_r; +wire soc_writer_fifo_fifo_in_payload_slot; +wire [31:0] soc_writer_fifo_fifo_in_payload_length; +wire soc_writer_fifo_fifo_in_first; +wire soc_writer_fifo_fifo_in_last; +wire soc_writer_fifo_fifo_out_payload_slot; +wire [31:0] soc_writer_fifo_fifo_out_payload_length; +wire soc_writer_fifo_fifo_out_first; +wire soc_writer_fifo_fifo_out_last; +reg [8:0] soc_writer_memory0_adr = 9'd0; +wire [31:0] soc_writer_memory0_dat_r; +reg soc_writer_memory0_we = 1'd0; +reg [31:0] soc_writer_memory0_dat_w = 32'd0; +reg [8:0] soc_writer_memory1_adr = 9'd0; +wire [31:0] soc_writer_memory1_dat_r; +reg soc_writer_memory1_we = 1'd0; +reg [31:0] soc_writer_memory1_dat_w = 32'd0; +reg soc_reader_source_source_valid = 1'd0; +wire soc_reader_source_source_ready; +reg soc_reader_source_source_first = 1'd0; +reg soc_reader_source_source_last = 1'd0; +reg [31:0] soc_reader_source_source_payload_data = 32'd0; +reg [3:0] soc_reader_source_source_payload_last_be = 4'd0; +reg [3:0] soc_reader_source_source_payload_error = 4'd0; +wire soc_reader_start_re; +wire soc_reader_start_r; +wire soc_reader_start_we; +reg soc_reader_start_w = 1'd0; +wire soc_reader_ready_status; +wire soc_reader_ready_we; +wire [1:0] soc_reader_level_status; +wire soc_reader_level_we; +reg soc_reader_slot_storage = 1'd0; +reg soc_reader_slot_re = 1'd0; +reg [10:0] soc_reader_length_storage = 11'd0; +reg soc_reader_length_re = 1'd0; +wire soc_reader_irq; +wire soc_reader_done_status; +reg soc_reader_done_pending = 1'd0; +reg soc_reader_done_trigger = 1'd0; +reg soc_reader_done_clear = 1'd0; +wire soc_reader_eventmanager_status_re; +wire soc_reader_eventmanager_status_r; +wire soc_reader_eventmanager_status_we; +wire soc_reader_eventmanager_status_w; +wire soc_reader_eventmanager_pending_re; +wire soc_reader_eventmanager_pending_r; +wire soc_reader_eventmanager_pending_we; +wire soc_reader_eventmanager_pending_w; +reg soc_reader_eventmanager_storage = 1'd0; +reg soc_reader_eventmanager_re = 1'd0; +wire soc_reader_fifo_sink_valid; +wire soc_reader_fifo_sink_ready; +reg soc_reader_fifo_sink_first = 1'd0; +reg soc_reader_fifo_sink_last = 1'd0; +wire soc_reader_fifo_sink_payload_slot; +wire [10:0] soc_reader_fifo_sink_payload_length; +wire soc_reader_fifo_source_valid; +reg soc_reader_fifo_source_ready = 1'd0; +wire soc_reader_fifo_source_first; +wire soc_reader_fifo_source_last; +wire soc_reader_fifo_source_payload_slot; +wire [10:0] soc_reader_fifo_source_payload_length; +wire soc_reader_fifo_syncfifo_we; +wire soc_reader_fifo_syncfifo_writable; +wire soc_reader_fifo_syncfifo_re; +wire soc_reader_fifo_syncfifo_readable; +wire [13:0] soc_reader_fifo_syncfifo_din; +wire [13:0] soc_reader_fifo_syncfifo_dout; +reg [1:0] soc_reader_fifo_level = 2'd0; +reg soc_reader_fifo_replace = 1'd0; +reg soc_reader_fifo_produce = 1'd0; +reg soc_reader_fifo_consume = 1'd0; +reg soc_reader_fifo_wrport_adr = 1'd0; +wire [13:0] soc_reader_fifo_wrport_dat_r; +wire soc_reader_fifo_wrport_we; +wire [13:0] soc_reader_fifo_wrport_dat_w; +wire soc_reader_fifo_do_read; +wire soc_reader_fifo_rdport_adr; +wire [13:0] soc_reader_fifo_rdport_dat_r; +wire soc_reader_fifo_fifo_in_payload_slot; +wire [10:0] soc_reader_fifo_fifo_in_payload_length; +wire soc_reader_fifo_fifo_in_first; +wire soc_reader_fifo_fifo_in_last; +wire soc_reader_fifo_fifo_out_payload_slot; +wire [10:0] soc_reader_fifo_fifo_out_payload_length; +wire soc_reader_fifo_fifo_out_first; +wire soc_reader_fifo_fifo_out_last; +reg [10:0] soc_reader_counter = 11'd0; +reg soc_reader_counter_reset = 1'd0; +reg soc_reader_counter_ce = 1'd0; +wire soc_reader_last; +reg soc_reader_last_d = 1'd0; +wire [8:0] soc_reader_memory0_adr; +wire [31:0] soc_reader_memory0_dat_r; +wire [8:0] soc_reader_memory1_adr; +wire [31:0] soc_reader_memory1_dat_r; +wire soc_ev_irq; +wire [29:0] soc_sram0_bus_adr0; +wire [31:0] soc_sram0_bus_dat_w0; +wire [31:0] soc_sram0_bus_dat_r0; +wire [3:0] soc_sram0_bus_sel0; +wire soc_sram0_bus_cyc0; +wire soc_sram0_bus_stb0; +reg soc_sram0_bus_ack0 = 1'd0; +wire soc_sram0_bus_we0; +wire [2:0] soc_sram0_bus_cti0; +wire [1:0] soc_sram0_bus_bte0; +reg soc_sram0_bus_err0 = 1'd0; +wire [8:0] soc_sram0_adr0; +wire [31:0] soc_sram0_dat_r0; +wire [29:0] soc_sram1_bus_adr0; +wire [31:0] soc_sram1_bus_dat_w0; +wire [31:0] soc_sram1_bus_dat_r0; +wire [3:0] soc_sram1_bus_sel0; +wire soc_sram1_bus_cyc0; +wire soc_sram1_bus_stb0; +reg soc_sram1_bus_ack0 = 1'd0; +wire soc_sram1_bus_we0; +wire [2:0] soc_sram1_bus_cti0; +wire [1:0] soc_sram1_bus_bte0; +reg soc_sram1_bus_err0 = 1'd0; +wire [8:0] soc_sram1_adr0; +wire [31:0] soc_sram1_dat_r0; +wire [29:0] soc_sram0_bus_adr1; +wire [31:0] soc_sram0_bus_dat_w1; +wire [31:0] soc_sram0_bus_dat_r1; +wire [3:0] soc_sram0_bus_sel1; +wire soc_sram0_bus_cyc1; +wire soc_sram0_bus_stb1; +reg soc_sram0_bus_ack1 = 1'd0; +wire soc_sram0_bus_we1; +wire [2:0] soc_sram0_bus_cti1; +wire [1:0] soc_sram0_bus_bte1; +reg soc_sram0_bus_err1 = 1'd0; +wire [8:0] soc_sram0_adr1; +wire [31:0] soc_sram0_dat_r1; +reg [3:0] soc_sram0_we = 4'd0; +wire [31:0] soc_sram0_dat_w; +wire [29:0] soc_sram1_bus_adr1; +wire [31:0] soc_sram1_bus_dat_w1; +wire [31:0] soc_sram1_bus_dat_r1; +wire [3:0] soc_sram1_bus_sel1; +wire soc_sram1_bus_cyc1; +wire soc_sram1_bus_stb1; +reg soc_sram1_bus_ack1 = 1'd0; +wire soc_sram1_bus_we1; +wire [2:0] soc_sram1_bus_cti1; +wire [1:0] soc_sram1_bus_bte1; +reg soc_sram1_bus_err1 = 1'd0; +wire [8:0] soc_sram1_adr1; +wire [31:0] soc_sram1_dat_r1; +reg [3:0] soc_sram1_we = 4'd0; +wire [31:0] soc_sram1_dat_w; +reg [3:0] soc_slave_sel = 4'd0; +reg [3:0] soc_slave_sel_r = 4'd0; +reg vns_wb2csr_state = 1'd0; +reg vns_wb2csr_next_state = 1'd0; +reg [1:0] vns_refresher_state = 2'd0; +reg [1:0] vns_refresher_next_state = 2'd0; +reg [2:0] vns_bankmachine0_state = 3'd0; +reg [2:0] vns_bankmachine0_next_state = 3'd0; +reg [2:0] vns_bankmachine1_state = 3'd0; +reg [2:0] vns_bankmachine1_next_state = 3'd0; +reg [2:0] vns_bankmachine2_state = 3'd0; +reg [2:0] vns_bankmachine2_next_state = 3'd0; +reg [2:0] vns_bankmachine3_state = 3'd0; +reg [2:0] vns_bankmachine3_next_state = 3'd0; +reg [2:0] vns_bankmachine4_state = 3'd0; +reg [2:0] vns_bankmachine4_next_state = 3'd0; +reg [2:0] vns_bankmachine5_state = 3'd0; +reg [2:0] vns_bankmachine5_next_state = 3'd0; +reg [2:0] vns_bankmachine6_state = 3'd0; +reg [2:0] vns_bankmachine6_next_state = 3'd0; +reg [2:0] vns_bankmachine7_state = 3'd0; +reg [2:0] vns_bankmachine7_next_state = 3'd0; +reg [3:0] vns_multiplexer_state = 4'd0; +reg [3:0] vns_multiplexer_next_state = 4'd0; +wire vns_roundrobin0_request; +wire vns_roundrobin0_grant; +wire vns_roundrobin0_ce; +wire vns_roundrobin1_request; +wire vns_roundrobin1_grant; +wire vns_roundrobin1_ce; +wire vns_roundrobin2_request; +wire vns_roundrobin2_grant; +wire vns_roundrobin2_ce; +wire vns_roundrobin3_request; +wire vns_roundrobin3_grant; +wire vns_roundrobin3_ce; +wire vns_roundrobin4_request; +wire vns_roundrobin4_grant; +wire vns_roundrobin4_ce; +wire vns_roundrobin5_request; +wire vns_roundrobin5_grant; +wire vns_roundrobin5_ce; +wire vns_roundrobin6_request; +wire vns_roundrobin6_grant; +wire vns_roundrobin6_ce; +wire vns_roundrobin7_request; +wire vns_roundrobin7_grant; +wire vns_roundrobin7_ce; +reg [2:0] vns_rbank = 3'd0; +reg [2:0] vns_wbank = 3'd0; +reg vns_locked0 = 1'd0; +reg vns_locked1 = 1'd0; +reg vns_locked2 = 1'd0; +reg vns_locked3 = 1'd0; +reg vns_locked4 = 1'd0; +reg vns_locked5 = 1'd0; +reg vns_locked6 = 1'd0; +reg vns_locked7 = 1'd0; +reg vns_new_master_wdata_ready0 = 1'd0; +reg vns_new_master_wdata_ready1 = 1'd0; +reg vns_new_master_wdata_ready2 = 1'd0; +reg vns_new_master_rdata_valid0 = 1'd0; +reg vns_new_master_rdata_valid1 = 1'd0; +reg vns_new_master_rdata_valid2 = 1'd0; +reg vns_new_master_rdata_valid3 = 1'd0; +reg vns_new_master_rdata_valid4 = 1'd0; +reg vns_new_master_rdata_valid5 = 1'd0; +reg vns_new_master_rdata_valid6 = 1'd0; +reg vns_new_master_rdata_valid7 = 1'd0; +reg vns_new_master_rdata_valid8 = 1'd0; +reg vns_new_master_rdata_valid9 = 1'd0; +reg [2:0] vns_fullmemorywe_state = 3'd0; +reg [2:0] vns_fullmemorywe_next_state = 3'd0; +reg [1:0] vns_litedramwishbone2native_state = 2'd0; +reg [1:0] vns_litedramwishbone2native_next_state = 2'd0; +reg soc_netsoc_count_litedramwishbone2native_next_value = 1'd0; +reg soc_netsoc_count_litedramwishbone2native_next_value_ce = 1'd0; +reg vns_liteethmacgap_state = 1'd0; +reg vns_liteethmacgap_next_state = 1'd0; +reg [1:0] vns_liteethmacpreambleinserter_state = 2'd0; +reg [1:0] vns_liteethmacpreambleinserter_next_state = 2'd0; +reg vns_liteethmacpreamblechecker_state = 1'd0; +reg vns_liteethmacpreamblechecker_next_state = 1'd0; +reg [1:0] vns_liteethmaccrc32inserter_state = 2'd0; +reg [1:0] vns_liteethmaccrc32inserter_next_state = 2'd0; +reg [1:0] vns_liteethmaccrc32checker_state = 2'd0; +reg [1:0] vns_liteethmaccrc32checker_next_state = 2'd0; +reg vns_liteethmacpaddinginserter_state = 1'd0; +reg vns_liteethmacpaddinginserter_next_state = 1'd0; +reg [2:0] vns_liteethmacsramwriter_state = 3'd0; +reg [2:0] vns_liteethmacsramwriter_next_state = 3'd0; +reg [31:0] soc_writer_errors_status_liteethmac_next_value = 32'd0; +reg soc_writer_errors_status_liteethmac_next_value_ce = 1'd0; +reg [1:0] vns_liteethmacsramreader_state = 2'd0; +reg [1:0] vns_liteethmacsramreader_next_state = 2'd0; +wire vns_wb_sdram_con_request; +wire vns_wb_sdram_con_grant; +wire [29:0] vns_netsoc_shared_adr; +wire [31:0] vns_netsoc_shared_dat_w; +reg [31:0] vns_netsoc_shared_dat_r = 32'd0; +wire [3:0] vns_netsoc_shared_sel; +wire vns_netsoc_shared_cyc; +wire vns_netsoc_shared_stb; +reg vns_netsoc_shared_ack = 1'd0; +wire vns_netsoc_shared_we; +wire [2:0] vns_netsoc_shared_cti; +wire [1:0] vns_netsoc_shared_bte; +wire vns_netsoc_shared_err; +wire [1:0] vns_netsoc_request; +reg vns_netsoc_grant = 1'd0; +reg [5:0] vns_netsoc_slave_sel = 6'd0; +reg [5:0] vns_netsoc_slave_sel_r = 6'd0; +reg vns_netsoc_error = 1'd0; +wire vns_netsoc_wait; +wire vns_netsoc_done; +reg [19:0] vns_netsoc_count = 20'd1000000; +wire [13:0] vns_netsoc_csrbankarray_interface0_bank_bus_adr; +wire vns_netsoc_csrbankarray_interface0_bank_bus_we; +wire [7:0] vns_netsoc_csrbankarray_interface0_bank_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_interface0_bank_bus_dat_r = 8'd0; +wire vns_netsoc_csrbankarray_csrbank0_timer_time7_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time7_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time7_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time7_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time6_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time6_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time6_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time6_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time5_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time5_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time5_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time5_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time4_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time4_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time4_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time4_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time3_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time3_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time2_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time2_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time1_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time1_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time0_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time0_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_w; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_r; +wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_w; +wire vns_netsoc_csrbankarray_csrbank0_sel; +wire [13:0] vns_netsoc_csrbankarray_interface1_bank_bus_adr; +wire vns_netsoc_csrbankarray_interface1_bank_bus_we; +wire [7:0] vns_netsoc_csrbankarray_interface1_bank_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_interface1_bank_bus_dat_r = 8'd0; +wire vns_netsoc_csrbankarray_csrbank1_scratch3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch3_r; +wire vns_netsoc_csrbankarray_csrbank1_scratch3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch3_w; +wire vns_netsoc_csrbankarray_csrbank1_scratch2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch2_r; +wire vns_netsoc_csrbankarray_csrbank1_scratch2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch2_w; +wire vns_netsoc_csrbankarray_csrbank1_scratch1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch1_r; +wire vns_netsoc_csrbankarray_csrbank1_scratch1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch1_w; +wire vns_netsoc_csrbankarray_csrbank1_scratch0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch0_r; +wire vns_netsoc_csrbankarray_csrbank1_scratch0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch0_w; +wire vns_netsoc_csrbankarray_csrbank1_bus_errors3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors3_r; +wire vns_netsoc_csrbankarray_csrbank1_bus_errors3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors3_w; +wire vns_netsoc_csrbankarray_csrbank1_bus_errors2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors2_r; +wire vns_netsoc_csrbankarray_csrbank1_bus_errors2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors2_w; +wire vns_netsoc_csrbankarray_csrbank1_bus_errors1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors1_r; +wire vns_netsoc_csrbankarray_csrbank1_bus_errors1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors1_w; +wire vns_netsoc_csrbankarray_csrbank1_bus_errors0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors0_r; +wire vns_netsoc_csrbankarray_csrbank1_bus_errors0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors0_w; +wire vns_netsoc_csrbankarray_csrbank1_sel; +wire [13:0] vns_netsoc_csrbankarray_interface2_bank_bus_adr; +wire vns_netsoc_csrbankarray_interface2_bank_bus_we; +wire [7:0] vns_netsoc_csrbankarray_interface2_bank_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_interface2_bank_bus_dat_r = 8'd0; +wire vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_re; +wire [4:0] vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_r; +wire vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_we; +wire [4:0] vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_w; +wire vns_netsoc_csrbankarray_csrbank2_dly_sel0_re; +wire [1:0] vns_netsoc_csrbankarray_csrbank2_dly_sel0_r; +wire vns_netsoc_csrbankarray_csrbank2_dly_sel0_we; +wire [1:0] vns_netsoc_csrbankarray_csrbank2_dly_sel0_w; +wire vns_netsoc_csrbankarray_csrbank2_sel; +wire [13:0] vns_netsoc_csrbankarray_interface3_bank_bus_adr; +wire vns_netsoc_csrbankarray_interface3_bank_bus_we; +wire [7:0] vns_netsoc_csrbankarray_interface3_bank_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_interface3_bank_bus_dat_r = 8'd0; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_re; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_we; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_re; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_we; +wire vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_re; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_we; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_level_re; +wire [1:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_level_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_level_we; +wire [1:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_level_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_re; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_we; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_re; +wire [2:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_we; +wire [2:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_w; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_re; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_r; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_we; +wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_w; +wire vns_netsoc_csrbankarray_csrbank3_preamble_crc_re; +wire vns_netsoc_csrbankarray_csrbank3_preamble_crc_r; +wire vns_netsoc_csrbankarray_csrbank3_preamble_crc_we; +wire vns_netsoc_csrbankarray_csrbank3_preamble_crc_w; +wire vns_netsoc_csrbankarray_csrbank3_preamble_errors3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors3_r; +wire vns_netsoc_csrbankarray_csrbank3_preamble_errors3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors3_w; +wire vns_netsoc_csrbankarray_csrbank3_preamble_errors2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors2_r; +wire vns_netsoc_csrbankarray_csrbank3_preamble_errors2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors2_w; +wire vns_netsoc_csrbankarray_csrbank3_preamble_errors1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors1_r; +wire vns_netsoc_csrbankarray_csrbank3_preamble_errors1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors1_w; +wire vns_netsoc_csrbankarray_csrbank3_preamble_errors0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors0_r; +wire vns_netsoc_csrbankarray_csrbank3_preamble_errors0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors0_w; +wire vns_netsoc_csrbankarray_csrbank3_crc_errors3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors3_r; +wire vns_netsoc_csrbankarray_csrbank3_crc_errors3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors3_w; +wire vns_netsoc_csrbankarray_csrbank3_crc_errors2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors2_r; +wire vns_netsoc_csrbankarray_csrbank3_crc_errors2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors2_w; +wire vns_netsoc_csrbankarray_csrbank3_crc_errors1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors1_r; +wire vns_netsoc_csrbankarray_csrbank3_crc_errors1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors1_w; +wire vns_netsoc_csrbankarray_csrbank3_crc_errors0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors0_r; +wire vns_netsoc_csrbankarray_csrbank3_crc_errors0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors0_w; +wire vns_netsoc_csrbankarray_csrbank3_sel; +wire [13:0] vns_netsoc_csrbankarray_interface4_bank_bus_adr; +wire vns_netsoc_csrbankarray_interface4_bank_bus_we; +wire [7:0] vns_netsoc_csrbankarray_interface4_bank_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_interface4_bank_bus_dat_r = 8'd0; +wire vns_netsoc_csrbankarray_csrbank4_crg_reset0_re; +wire vns_netsoc_csrbankarray_csrbank4_crg_reset0_r; +wire vns_netsoc_csrbankarray_csrbank4_crg_reset0_we; +wire vns_netsoc_csrbankarray_csrbank4_crg_reset0_w; +wire vns_netsoc_csrbankarray_csrbank4_mdio_w0_re; +wire [2:0] vns_netsoc_csrbankarray_csrbank4_mdio_w0_r; +wire vns_netsoc_csrbankarray_csrbank4_mdio_w0_we; +wire [2:0] vns_netsoc_csrbankarray_csrbank4_mdio_w0_w; +wire vns_netsoc_csrbankarray_csrbank4_mdio_r_re; +wire vns_netsoc_csrbankarray_csrbank4_mdio_r_r; +wire vns_netsoc_csrbankarray_csrbank4_mdio_r_we; +wire vns_netsoc_csrbankarray_csrbank4_mdio_r_w; +wire vns_netsoc_csrbankarray_csrbank4_sel; +wire [13:0] vns_netsoc_csrbankarray_sram_bus_adr; +wire vns_netsoc_csrbankarray_sram_bus_we; +wire [7:0] vns_netsoc_csrbankarray_sram_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_sram_bus_dat_r = 8'd0; +wire [2:0] vns_netsoc_csrbankarray_adr; +wire [7:0] vns_netsoc_csrbankarray_dat_r; +wire vns_netsoc_csrbankarray_sel; +reg vns_netsoc_csrbankarray_sel_r = 1'd0; +wire [13:0] vns_netsoc_csrbankarray_interface5_bank_bus_adr; +wire vns_netsoc_csrbankarray_interface5_bank_bus_we; +wire [7:0] vns_netsoc_csrbankarray_interface5_bank_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_interface5_bank_bus_dat_r = 8'd0; +wire vns_netsoc_csrbankarray_csrbank5_dfii_control0_re; +wire [3:0] vns_netsoc_csrbankarray_csrbank5_dfii_control0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_control0_we; +wire [3:0] vns_netsoc_csrbankarray_csrbank5_dfii_control0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_re; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_we; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_re; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_we; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_re; +wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_we; +wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_re; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_we; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_re; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_we; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_re; +wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_we; +wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_re; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_we; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_re; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_we; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_re; +wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_we; +wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_re; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_we; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_re; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_we; +wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_re; +wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_we; +wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_w; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_r; +wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_w; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_r; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_w; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_r; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_w; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_r; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_w; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_r; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_w; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_r; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_w; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_r; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_w; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_r; +wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_w; +wire vns_netsoc_csrbankarray_csrbank5_sel; +wire [13:0] vns_netsoc_csrbankarray_interface6_bank_bus_adr; +wire vns_netsoc_csrbankarray_interface6_bank_bus_we; +wire [7:0] vns_netsoc_csrbankarray_interface6_bank_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_interface6_bank_bus_dat_r = 8'd0; +wire vns_netsoc_csrbankarray_csrbank6_load3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_load3_r; +wire vns_netsoc_csrbankarray_csrbank6_load3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_load3_w; +wire vns_netsoc_csrbankarray_csrbank6_load2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_load2_r; +wire vns_netsoc_csrbankarray_csrbank6_load2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_load2_w; +wire vns_netsoc_csrbankarray_csrbank6_load1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_load1_r; +wire vns_netsoc_csrbankarray_csrbank6_load1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_load1_w; +wire vns_netsoc_csrbankarray_csrbank6_load0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_load0_r; +wire vns_netsoc_csrbankarray_csrbank6_load0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_load0_w; +wire vns_netsoc_csrbankarray_csrbank6_reload3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload3_r; +wire vns_netsoc_csrbankarray_csrbank6_reload3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload3_w; +wire vns_netsoc_csrbankarray_csrbank6_reload2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload2_r; +wire vns_netsoc_csrbankarray_csrbank6_reload2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload2_w; +wire vns_netsoc_csrbankarray_csrbank6_reload1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload1_r; +wire vns_netsoc_csrbankarray_csrbank6_reload1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload1_w; +wire vns_netsoc_csrbankarray_csrbank6_reload0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload0_r; +wire vns_netsoc_csrbankarray_csrbank6_reload0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload0_w; +wire vns_netsoc_csrbankarray_csrbank6_en0_re; +wire vns_netsoc_csrbankarray_csrbank6_en0_r; +wire vns_netsoc_csrbankarray_csrbank6_en0_we; +wire vns_netsoc_csrbankarray_csrbank6_en0_w; +wire vns_netsoc_csrbankarray_csrbank6_update_value0_re; +wire vns_netsoc_csrbankarray_csrbank6_update_value0_r; +wire vns_netsoc_csrbankarray_csrbank6_update_value0_we; +wire vns_netsoc_csrbankarray_csrbank6_update_value0_w; +wire vns_netsoc_csrbankarray_csrbank6_value3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_value3_r; +wire vns_netsoc_csrbankarray_csrbank6_value3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_value3_w; +wire vns_netsoc_csrbankarray_csrbank6_value2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_value2_r; +wire vns_netsoc_csrbankarray_csrbank6_value2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_value2_w; +wire vns_netsoc_csrbankarray_csrbank6_value1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_value1_r; +wire vns_netsoc_csrbankarray_csrbank6_value1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_value1_w; +wire vns_netsoc_csrbankarray_csrbank6_value0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_value0_r; +wire vns_netsoc_csrbankarray_csrbank6_value0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank6_value0_w; +wire vns_netsoc_csrbankarray_csrbank6_ev_enable0_re; +wire vns_netsoc_csrbankarray_csrbank6_ev_enable0_r; +wire vns_netsoc_csrbankarray_csrbank6_ev_enable0_we; +wire vns_netsoc_csrbankarray_csrbank6_ev_enable0_w; +wire vns_netsoc_csrbankarray_csrbank6_sel; +wire [13:0] vns_netsoc_csrbankarray_interface7_bank_bus_adr; +wire vns_netsoc_csrbankarray_interface7_bank_bus_we; +wire [7:0] vns_netsoc_csrbankarray_interface7_bank_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_interface7_bank_bus_dat_r = 8'd0; +wire vns_netsoc_csrbankarray_csrbank7_txfull_re; +wire vns_netsoc_csrbankarray_csrbank7_txfull_r; +wire vns_netsoc_csrbankarray_csrbank7_txfull_we; +wire vns_netsoc_csrbankarray_csrbank7_txfull_w; +wire vns_netsoc_csrbankarray_csrbank7_rxempty_re; +wire vns_netsoc_csrbankarray_csrbank7_rxempty_r; +wire vns_netsoc_csrbankarray_csrbank7_rxempty_we; +wire vns_netsoc_csrbankarray_csrbank7_rxempty_w; +wire vns_netsoc_csrbankarray_csrbank7_ev_enable0_re; +wire [1:0] vns_netsoc_csrbankarray_csrbank7_ev_enable0_r; +wire vns_netsoc_csrbankarray_csrbank7_ev_enable0_we; +wire [1:0] vns_netsoc_csrbankarray_csrbank7_ev_enable0_w; +wire vns_netsoc_csrbankarray_csrbank7_sel; +wire [13:0] vns_netsoc_csrbankarray_interface8_bank_bus_adr; +wire vns_netsoc_csrbankarray_interface8_bank_bus_we; +wire [7:0] vns_netsoc_csrbankarray_interface8_bank_bus_dat_w; +reg [7:0] vns_netsoc_csrbankarray_interface8_bank_bus_dat_r = 8'd0; +wire vns_netsoc_csrbankarray_csrbank8_tuning_word3_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word3_r; +wire vns_netsoc_csrbankarray_csrbank8_tuning_word3_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word3_w; +wire vns_netsoc_csrbankarray_csrbank8_tuning_word2_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word2_r; +wire vns_netsoc_csrbankarray_csrbank8_tuning_word2_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word2_w; +wire vns_netsoc_csrbankarray_csrbank8_tuning_word1_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word1_r; +wire vns_netsoc_csrbankarray_csrbank8_tuning_word1_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word1_w; +wire vns_netsoc_csrbankarray_csrbank8_tuning_word0_re; +wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word0_r; +wire vns_netsoc_csrbankarray_csrbank8_tuning_word0_we; +wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word0_w; +wire vns_netsoc_csrbankarray_csrbank8_sel; +wire [13:0] vns_netsoc_csrcon_adr; +wire vns_netsoc_csrcon_we; +wire [7:0] vns_netsoc_csrcon_dat_w; +wire [7:0] vns_netsoc_csrcon_dat_r; +reg vns_rhs_array_muxed0 = 1'd0; +reg [13:0] vns_rhs_array_muxed1 = 14'd0; +reg [2:0] vns_rhs_array_muxed2 = 3'd0; +reg vns_rhs_array_muxed3 = 1'd0; +reg vns_rhs_array_muxed4 = 1'd0; +reg vns_rhs_array_muxed5 = 1'd0; +reg vns_t_array_muxed0 = 1'd0; +reg vns_t_array_muxed1 = 1'd0; +reg vns_t_array_muxed2 = 1'd0; +reg vns_rhs_array_muxed6 = 1'd0; +reg [13:0] vns_rhs_array_muxed7 = 14'd0; +reg [2:0] vns_rhs_array_muxed8 = 3'd0; +reg vns_rhs_array_muxed9 = 1'd0; +reg vns_rhs_array_muxed10 = 1'd0; +reg vns_rhs_array_muxed11 = 1'd0; +reg vns_t_array_muxed3 = 1'd0; +reg vns_t_array_muxed4 = 1'd0; +reg vns_t_array_muxed5 = 1'd0; +reg [20:0] vns_rhs_array_muxed12 = 21'd0; +reg vns_rhs_array_muxed13 = 1'd0; +reg vns_rhs_array_muxed14 = 1'd0; +reg [20:0] vns_rhs_array_muxed15 = 21'd0; +reg vns_rhs_array_muxed16 = 1'd0; +reg vns_rhs_array_muxed17 = 1'd0; +reg [20:0] vns_rhs_array_muxed18 = 21'd0; +reg vns_rhs_array_muxed19 = 1'd0; +reg vns_rhs_array_muxed20 = 1'd0; +reg [20:0] vns_rhs_array_muxed21 = 21'd0; +reg vns_rhs_array_muxed22 = 1'd0; +reg vns_rhs_array_muxed23 = 1'd0; +reg [20:0] vns_rhs_array_muxed24 = 21'd0; +reg vns_rhs_array_muxed25 = 1'd0; +reg vns_rhs_array_muxed26 = 1'd0; +reg [20:0] vns_rhs_array_muxed27 = 21'd0; +reg vns_rhs_array_muxed28 = 1'd0; +reg vns_rhs_array_muxed29 = 1'd0; +reg [20:0] vns_rhs_array_muxed30 = 21'd0; +reg vns_rhs_array_muxed31 = 1'd0; +reg vns_rhs_array_muxed32 = 1'd0; +reg [20:0] vns_rhs_array_muxed33 = 21'd0; +reg vns_rhs_array_muxed34 = 1'd0; +reg vns_rhs_array_muxed35 = 1'd0; +reg [29:0] vns_rhs_array_muxed36 = 30'd0; +reg [31:0] vns_rhs_array_muxed37 = 32'd0; +reg [3:0] vns_rhs_array_muxed38 = 4'd0; +reg vns_rhs_array_muxed39 = 1'd0; +reg vns_rhs_array_muxed40 = 1'd0; +reg vns_rhs_array_muxed41 = 1'd0; +reg [2:0] vns_rhs_array_muxed42 = 3'd0; +reg [1:0] vns_rhs_array_muxed43 = 2'd0; +reg [29:0] vns_rhs_array_muxed44 = 30'd0; +reg [31:0] vns_rhs_array_muxed45 = 32'd0; +reg [3:0] vns_rhs_array_muxed46 = 4'd0; +reg vns_rhs_array_muxed47 = 1'd0; +reg vns_rhs_array_muxed48 = 1'd0; +reg vns_rhs_array_muxed49 = 1'd0; +reg [2:0] vns_rhs_array_muxed50 = 3'd0; +reg [1:0] vns_rhs_array_muxed51 = 2'd0; +reg [2:0] vns_array_muxed0 = 3'd0; +reg [13:0] vns_array_muxed1 = 14'd0; +reg vns_array_muxed2 = 1'd0; +reg vns_array_muxed3 = 1'd0; +reg vns_array_muxed4 = 1'd0; +reg vns_array_muxed5 = 1'd0; +reg vns_array_muxed6 = 1'd0; +reg [2:0] vns_array_muxed7 = 3'd0; +reg [13:0] vns_array_muxed8 = 14'd0; +reg vns_array_muxed9 = 1'd0; +reg vns_array_muxed10 = 1'd0; +reg vns_array_muxed11 = 1'd0; +reg vns_array_muxed12 = 1'd0; +reg vns_array_muxed13 = 1'd0; +reg [2:0] vns_array_muxed14 = 3'd0; +reg [13:0] vns_array_muxed15 = 14'd0; +reg vns_array_muxed16 = 1'd0; +reg vns_array_muxed17 = 1'd0; +reg vns_array_muxed18 = 1'd0; +reg vns_array_muxed19 = 1'd0; +reg vns_array_muxed20 = 1'd0; +reg [2:0] vns_array_muxed21 = 3'd0; +reg [13:0] vns_array_muxed22 = 14'd0; +reg vns_array_muxed23 = 1'd0; +reg vns_array_muxed24 = 1'd0; +reg vns_array_muxed25 = 1'd0; +reg vns_array_muxed26 = 1'd0; +reg vns_array_muxed27 = 1'd0; +(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl0_regs0 = 1'd0; +(* async_reg = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl0_regs1 = 1'd0; +wire vns_xilinxasyncresetsynchronizerimpl0; +wire vns_xilinxasyncresetsynchronizerimpl0_rst_meta; +wire vns_xilinxasyncresetsynchronizerimpl1; +wire vns_xilinxasyncresetsynchronizerimpl1_rst_meta; +wire vns_xilinxasyncresetsynchronizerimpl2_rst_meta; +wire vns_xilinxasyncresetsynchronizerimpl3_rst_meta; +(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl1_regs0 = 1'd0; +(* async_reg = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl1_regs1 = 1'd0; +(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl2_regs0 = 1'd0; +(* async_reg = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl2_regs1 = 1'd0; +(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl3_regs0 = 1'd0; +(* async_reg = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl3_regs1 = 1'd0; +(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl4_regs0 = 7'd0; +(* async_reg = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl4_regs1 = 7'd0; +(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl5_regs0 = 7'd0; +(* async_reg = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl5_regs1 = 7'd0; +(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl6_regs0 = 7'd0; +(* async_reg = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl6_regs1 = 7'd0; +(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl7_regs0 = 7'd0; +(* async_reg = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl7_regs1 = 7'd0; + +assign soc_netsoc_cpu_reset = soc_netsoc_ctrl_reset; +assign soc_netsoc_ctrl_bus_error = vns_netsoc_error; +always @(*) begin + soc_netsoc_cpu_interrupt0 <= 32'd0; + soc_netsoc_cpu_interrupt0[2] <= soc_ev_irq; + soc_netsoc_cpu_interrupt0[1] <= soc_netsoc_timer0_irq; + soc_netsoc_cpu_interrupt0[0] <= soc_netsoc_uart_irq; +end +assign soc_netsoc_ctrl_reset = soc_netsoc_ctrl_reset_reset_re; +assign soc_netsoc_ctrl_bus_errors_status = soc_netsoc_ctrl_bus_errors; +assign soc_netsoc_cpu_interrupt1 = (soc_netsoc_cpu_time >= soc_netsoc_cpu_time_cmp); +assign soc_netsoc_interface0_soc_bus_adr = soc_netsoc_cpu_ibus_adr; +assign soc_netsoc_interface0_soc_bus_dat_w = soc_netsoc_cpu_ibus_dat_w; +assign soc_netsoc_cpu_ibus_dat_r = soc_netsoc_interface0_soc_bus_dat_r; +assign soc_netsoc_interface0_soc_bus_sel = soc_netsoc_cpu_ibus_sel; +assign soc_netsoc_interface0_soc_bus_cyc = soc_netsoc_cpu_ibus_cyc; +assign soc_netsoc_interface0_soc_bus_stb = soc_netsoc_cpu_ibus_stb; +assign soc_netsoc_cpu_ibus_ack = soc_netsoc_interface0_soc_bus_ack; +assign soc_netsoc_interface0_soc_bus_we = soc_netsoc_cpu_ibus_we; +assign soc_netsoc_interface0_soc_bus_cti = soc_netsoc_cpu_ibus_cti; +assign soc_netsoc_interface0_soc_bus_bte = soc_netsoc_cpu_ibus_bte; +assign soc_netsoc_cpu_ibus_err = soc_netsoc_interface0_soc_bus_err; +assign soc_netsoc_interface1_soc_bus_adr = soc_netsoc_cpu_dbus_adr; +assign soc_netsoc_interface1_soc_bus_dat_w = soc_netsoc_cpu_dbus_dat_w; +assign soc_netsoc_cpu_dbus_dat_r = soc_netsoc_interface1_soc_bus_dat_r; +assign soc_netsoc_interface1_soc_bus_sel = soc_netsoc_cpu_dbus_sel; +assign soc_netsoc_interface1_soc_bus_cyc = soc_netsoc_cpu_dbus_cyc; +assign soc_netsoc_interface1_soc_bus_stb = soc_netsoc_cpu_dbus_stb; +assign soc_netsoc_cpu_dbus_ack = soc_netsoc_interface1_soc_bus_ack; +assign soc_netsoc_interface1_soc_bus_we = soc_netsoc_cpu_dbus_we; +assign soc_netsoc_interface1_soc_bus_cti = soc_netsoc_cpu_dbus_cti; +assign soc_netsoc_interface1_soc_bus_bte = soc_netsoc_cpu_dbus_bte; +assign soc_netsoc_cpu_dbus_err = soc_netsoc_interface1_soc_bus_err; +assign soc_netsoc_rom_adr = soc_netsoc_rom_bus_adr[13:0]; +assign soc_netsoc_rom_bus_dat_r = soc_netsoc_rom_dat_r; +always @(*) begin + soc_netsoc_sram_we <= 4'd0; + soc_netsoc_sram_we[0] <= (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & soc_netsoc_sram_bus_we) & soc_netsoc_sram_bus_sel[0]); + soc_netsoc_sram_we[1] <= (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & soc_netsoc_sram_bus_we) & soc_netsoc_sram_bus_sel[1]); + soc_netsoc_sram_we[2] <= (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & soc_netsoc_sram_bus_we) & soc_netsoc_sram_bus_sel[2]); + soc_netsoc_sram_we[3] <= (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & soc_netsoc_sram_bus_we) & soc_netsoc_sram_bus_sel[3]); +end +assign soc_netsoc_sram_adr = soc_netsoc_sram_bus_adr[12:0]; +assign soc_netsoc_sram_bus_dat_r = soc_netsoc_sram_dat_r; +assign soc_netsoc_sram_dat_w = soc_netsoc_sram_bus_dat_w; +assign soc_netsoc_uart_tx_fifo_sink_valid = soc_netsoc_uart_rxtx_re; +assign soc_netsoc_uart_tx_fifo_sink_payload_data = soc_netsoc_uart_rxtx_r; +assign soc_netsoc_uart_txfull_status = (~soc_netsoc_uart_tx_fifo_sink_ready); +assign soc_netsoc_uart_phy_sink_valid = soc_netsoc_uart_tx_fifo_source_valid; +assign soc_netsoc_uart_tx_fifo_source_ready = soc_netsoc_uart_phy_sink_ready; +assign soc_netsoc_uart_phy_sink_first = soc_netsoc_uart_tx_fifo_source_first; +assign soc_netsoc_uart_phy_sink_last = soc_netsoc_uart_tx_fifo_source_last; +assign soc_netsoc_uart_phy_sink_payload_data = soc_netsoc_uart_tx_fifo_source_payload_data; +assign soc_netsoc_uart_tx_trigger = (~soc_netsoc_uart_tx_fifo_sink_ready); +assign soc_netsoc_uart_rx_fifo_sink_valid = soc_netsoc_uart_phy_source_valid; +assign soc_netsoc_uart_phy_source_ready = soc_netsoc_uart_rx_fifo_sink_ready; +assign soc_netsoc_uart_rx_fifo_sink_first = soc_netsoc_uart_phy_source_first; +assign soc_netsoc_uart_rx_fifo_sink_last = soc_netsoc_uart_phy_source_last; +assign soc_netsoc_uart_rx_fifo_sink_payload_data = soc_netsoc_uart_phy_source_payload_data; +assign soc_netsoc_uart_rxempty_status = (~soc_netsoc_uart_rx_fifo_source_valid); +assign soc_netsoc_uart_rxtx_w = soc_netsoc_uart_rx_fifo_source_payload_data; +assign soc_netsoc_uart_rx_fifo_source_ready = soc_netsoc_uart_rx_clear; +assign soc_netsoc_uart_rx_trigger = (~soc_netsoc_uart_rx_fifo_source_valid); +always @(*) begin + soc_netsoc_uart_tx_clear <= 1'd0; + if ((soc_netsoc_uart_eventmanager_pending_re & soc_netsoc_uart_eventmanager_pending_r[0])) begin + soc_netsoc_uart_tx_clear <= 1'd1; + end +end +always @(*) begin + soc_netsoc_uart_eventmanager_status_w <= 2'd0; + soc_netsoc_uart_eventmanager_status_w[0] <= soc_netsoc_uart_tx_status; + soc_netsoc_uart_eventmanager_status_w[1] <= soc_netsoc_uart_rx_status; +end +always @(*) begin + soc_netsoc_uart_rx_clear <= 1'd0; + if ((soc_netsoc_uart_eventmanager_pending_re & soc_netsoc_uart_eventmanager_pending_r[1])) begin + soc_netsoc_uart_rx_clear <= 1'd1; + end +end +always @(*) begin + soc_netsoc_uart_eventmanager_pending_w <= 2'd0; + soc_netsoc_uart_eventmanager_pending_w[0] <= soc_netsoc_uart_tx_pending; + soc_netsoc_uart_eventmanager_pending_w[1] <= soc_netsoc_uart_rx_pending; +end +assign soc_netsoc_uart_irq = ((soc_netsoc_uart_eventmanager_pending_w[0] & soc_netsoc_uart_eventmanager_storage[0]) | (soc_netsoc_uart_eventmanager_pending_w[1] & soc_netsoc_uart_eventmanager_storage[1])); +assign soc_netsoc_uart_tx_status = soc_netsoc_uart_tx_trigger; +assign soc_netsoc_uart_rx_status = soc_netsoc_uart_rx_trigger; +assign soc_netsoc_uart_tx_fifo_syncfifo_din = {soc_netsoc_uart_tx_fifo_fifo_in_last, soc_netsoc_uart_tx_fifo_fifo_in_first, soc_netsoc_uart_tx_fifo_fifo_in_payload_data}; +assign {soc_netsoc_uart_tx_fifo_fifo_out_last, soc_netsoc_uart_tx_fifo_fifo_out_first, soc_netsoc_uart_tx_fifo_fifo_out_payload_data} = soc_netsoc_uart_tx_fifo_syncfifo_dout; +assign soc_netsoc_uart_tx_fifo_sink_ready = soc_netsoc_uart_tx_fifo_syncfifo_writable; +assign soc_netsoc_uart_tx_fifo_syncfifo_we = soc_netsoc_uart_tx_fifo_sink_valid; +assign soc_netsoc_uart_tx_fifo_fifo_in_first = soc_netsoc_uart_tx_fifo_sink_first; +assign soc_netsoc_uart_tx_fifo_fifo_in_last = soc_netsoc_uart_tx_fifo_sink_last; +assign soc_netsoc_uart_tx_fifo_fifo_in_payload_data = soc_netsoc_uart_tx_fifo_sink_payload_data; +assign soc_netsoc_uart_tx_fifo_source_valid = soc_netsoc_uart_tx_fifo_readable; +assign soc_netsoc_uart_tx_fifo_source_first = soc_netsoc_uart_tx_fifo_fifo_out_first; +assign soc_netsoc_uart_tx_fifo_source_last = soc_netsoc_uart_tx_fifo_fifo_out_last; +assign soc_netsoc_uart_tx_fifo_source_payload_data = soc_netsoc_uart_tx_fifo_fifo_out_payload_data; +assign soc_netsoc_uart_tx_fifo_re = soc_netsoc_uart_tx_fifo_source_ready; +assign soc_netsoc_uart_tx_fifo_syncfifo_re = (soc_netsoc_uart_tx_fifo_syncfifo_readable & ((~soc_netsoc_uart_tx_fifo_readable) | soc_netsoc_uart_tx_fifo_re)); +assign soc_netsoc_uart_tx_fifo_level1 = (soc_netsoc_uart_tx_fifo_level0 + soc_netsoc_uart_tx_fifo_readable); +always @(*) begin + soc_netsoc_uart_tx_fifo_wrport_adr <= 4'd0; + if (soc_netsoc_uart_tx_fifo_replace) begin + soc_netsoc_uart_tx_fifo_wrport_adr <= (soc_netsoc_uart_tx_fifo_produce - 1'd1); + end else begin + soc_netsoc_uart_tx_fifo_wrport_adr <= soc_netsoc_uart_tx_fifo_produce; + end +end +assign soc_netsoc_uart_tx_fifo_wrport_dat_w = soc_netsoc_uart_tx_fifo_syncfifo_din; +assign soc_netsoc_uart_tx_fifo_wrport_we = (soc_netsoc_uart_tx_fifo_syncfifo_we & (soc_netsoc_uart_tx_fifo_syncfifo_writable | soc_netsoc_uart_tx_fifo_replace)); +assign soc_netsoc_uart_tx_fifo_do_read = (soc_netsoc_uart_tx_fifo_syncfifo_readable & soc_netsoc_uart_tx_fifo_syncfifo_re); +assign soc_netsoc_uart_tx_fifo_rdport_adr = soc_netsoc_uart_tx_fifo_consume; +assign soc_netsoc_uart_tx_fifo_syncfifo_dout = soc_netsoc_uart_tx_fifo_rdport_dat_r; +assign soc_netsoc_uart_tx_fifo_rdport_re = soc_netsoc_uart_tx_fifo_do_read; +assign soc_netsoc_uart_tx_fifo_syncfifo_writable = (soc_netsoc_uart_tx_fifo_level0 != 5'd16); +assign soc_netsoc_uart_tx_fifo_syncfifo_readable = (soc_netsoc_uart_tx_fifo_level0 != 1'd0); +assign soc_netsoc_uart_rx_fifo_syncfifo_din = {soc_netsoc_uart_rx_fifo_fifo_in_last, soc_netsoc_uart_rx_fifo_fifo_in_first, soc_netsoc_uart_rx_fifo_fifo_in_payload_data}; +assign {soc_netsoc_uart_rx_fifo_fifo_out_last, soc_netsoc_uart_rx_fifo_fifo_out_first, soc_netsoc_uart_rx_fifo_fifo_out_payload_data} = soc_netsoc_uart_rx_fifo_syncfifo_dout; +assign soc_netsoc_uart_rx_fifo_sink_ready = soc_netsoc_uart_rx_fifo_syncfifo_writable; +assign soc_netsoc_uart_rx_fifo_syncfifo_we = soc_netsoc_uart_rx_fifo_sink_valid; +assign soc_netsoc_uart_rx_fifo_fifo_in_first = soc_netsoc_uart_rx_fifo_sink_first; +assign soc_netsoc_uart_rx_fifo_fifo_in_last = soc_netsoc_uart_rx_fifo_sink_last; +assign soc_netsoc_uart_rx_fifo_fifo_in_payload_data = soc_netsoc_uart_rx_fifo_sink_payload_data; +assign soc_netsoc_uart_rx_fifo_source_valid = soc_netsoc_uart_rx_fifo_readable; +assign soc_netsoc_uart_rx_fifo_source_first = soc_netsoc_uart_rx_fifo_fifo_out_first; +assign soc_netsoc_uart_rx_fifo_source_last = soc_netsoc_uart_rx_fifo_fifo_out_last; +assign soc_netsoc_uart_rx_fifo_source_payload_data = soc_netsoc_uart_rx_fifo_fifo_out_payload_data; +assign soc_netsoc_uart_rx_fifo_re = soc_netsoc_uart_rx_fifo_source_ready; +assign soc_netsoc_uart_rx_fifo_syncfifo_re = (soc_netsoc_uart_rx_fifo_syncfifo_readable & ((~soc_netsoc_uart_rx_fifo_readable) | soc_netsoc_uart_rx_fifo_re)); +assign soc_netsoc_uart_rx_fifo_level1 = (soc_netsoc_uart_rx_fifo_level0 + soc_netsoc_uart_rx_fifo_readable); +always @(*) begin + soc_netsoc_uart_rx_fifo_wrport_adr <= 4'd0; + if (soc_netsoc_uart_rx_fifo_replace) begin + soc_netsoc_uart_rx_fifo_wrport_adr <= (soc_netsoc_uart_rx_fifo_produce - 1'd1); + end else begin + soc_netsoc_uart_rx_fifo_wrport_adr <= soc_netsoc_uart_rx_fifo_produce; + end +end +assign soc_netsoc_uart_rx_fifo_wrport_dat_w = soc_netsoc_uart_rx_fifo_syncfifo_din; +assign soc_netsoc_uart_rx_fifo_wrport_we = (soc_netsoc_uart_rx_fifo_syncfifo_we & (soc_netsoc_uart_rx_fifo_syncfifo_writable | soc_netsoc_uart_rx_fifo_replace)); +assign soc_netsoc_uart_rx_fifo_do_read = (soc_netsoc_uart_rx_fifo_syncfifo_readable & soc_netsoc_uart_rx_fifo_syncfifo_re); +assign soc_netsoc_uart_rx_fifo_rdport_adr = soc_netsoc_uart_rx_fifo_consume; +assign soc_netsoc_uart_rx_fifo_syncfifo_dout = soc_netsoc_uart_rx_fifo_rdport_dat_r; +assign soc_netsoc_uart_rx_fifo_rdport_re = soc_netsoc_uart_rx_fifo_do_read; +assign soc_netsoc_uart_rx_fifo_syncfifo_writable = (soc_netsoc_uart_rx_fifo_level0 != 5'd16); +assign soc_netsoc_uart_rx_fifo_syncfifo_readable = (soc_netsoc_uart_rx_fifo_level0 != 1'd0); +assign soc_netsoc_timer0_zero_trigger = (soc_netsoc_timer0_value != 1'd0); +assign soc_netsoc_timer0_eventmanager_status_w = soc_netsoc_timer0_zero_status; +always @(*) begin + soc_netsoc_timer0_zero_clear <= 1'd0; + if ((soc_netsoc_timer0_eventmanager_pending_re & soc_netsoc_timer0_eventmanager_pending_r)) begin + soc_netsoc_timer0_zero_clear <= 1'd1; + end +end +assign soc_netsoc_timer0_eventmanager_pending_w = soc_netsoc_timer0_zero_pending; +assign soc_netsoc_timer0_irq = (soc_netsoc_timer0_eventmanager_pending_w & soc_netsoc_timer0_eventmanager_storage); +assign soc_netsoc_timer0_zero_status = soc_netsoc_timer0_zero_trigger; +assign soc_netsoc_interface_dat_w = soc_netsoc_bus_wishbone_dat_w; +assign soc_netsoc_bus_wishbone_dat_r = soc_netsoc_interface_dat_r; +always @(*) begin + soc_netsoc_interface_adr <= 14'd0; + vns_wb2csr_next_state <= 1'd0; + soc_netsoc_interface_we <= 1'd0; + soc_netsoc_bus_wishbone_ack <= 1'd0; + vns_wb2csr_next_state <= vns_wb2csr_state; + case (vns_wb2csr_state) + 1'd1: begin + soc_netsoc_bus_wishbone_ack <= 1'd1; + vns_wb2csr_next_state <= 1'd0; + end + default: begin + if ((soc_netsoc_bus_wishbone_cyc & soc_netsoc_bus_wishbone_stb)) begin + soc_netsoc_interface_adr <= soc_netsoc_bus_wishbone_adr; + soc_netsoc_interface_we <= soc_netsoc_bus_wishbone_we; + vns_wb2csr_next_state <= 1'd1; + end + end + endcase +end +always @(*) begin + soc_emulator_ram_we <= 4'd0; + soc_emulator_ram_we[0] <= (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & soc_emulator_ram_bus_we) & soc_emulator_ram_bus_sel[0]); + soc_emulator_ram_we[1] <= (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & soc_emulator_ram_bus_we) & soc_emulator_ram_bus_sel[1]); + soc_emulator_ram_we[2] <= (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & soc_emulator_ram_bus_we) & soc_emulator_ram_bus_sel[2]); + soc_emulator_ram_we[3] <= (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & soc_emulator_ram_bus_we) & soc_emulator_ram_bus_sel[3]); +end +assign soc_emulator_ram_adr = soc_emulator_ram_bus_adr[11:0]; +assign soc_emulator_ram_bus_dat_r = soc_emulator_ram_dat_r; +assign soc_emulator_ram_dat_w = soc_emulator_ram_bus_dat_w; +always @(*) begin + soc_a7ddrphy_dqs_serdes_pattern <= 8'd85; + soc_a7ddrphy_dqs_serdes_pattern <= 7'd85; + if ((soc_a7ddrphy_dqs_preamble | soc_a7ddrphy_dqs_postamble)) begin + soc_a7ddrphy_dqs_serdes_pattern <= 1'd0; + end +end +assign soc_a7ddrphy_bitslip0_i = soc_a7ddrphy_dq_i_data0; +assign soc_a7ddrphy_bitslip1_i = soc_a7ddrphy_dq_i_data1; +assign soc_a7ddrphy_bitslip2_i = soc_a7ddrphy_dq_i_data2; +assign soc_a7ddrphy_bitslip3_i = soc_a7ddrphy_dq_i_data3; +assign soc_a7ddrphy_bitslip4_i = soc_a7ddrphy_dq_i_data4; +assign soc_a7ddrphy_bitslip5_i = soc_a7ddrphy_dq_i_data5; +assign soc_a7ddrphy_bitslip6_i = soc_a7ddrphy_dq_i_data6; +assign soc_a7ddrphy_bitslip7_i = soc_a7ddrphy_dq_i_data7; +assign soc_a7ddrphy_bitslip8_i = soc_a7ddrphy_dq_i_data8; +assign soc_a7ddrphy_bitslip9_i = soc_a7ddrphy_dq_i_data9; +assign soc_a7ddrphy_bitslip10_i = soc_a7ddrphy_dq_i_data10; +assign soc_a7ddrphy_bitslip11_i = soc_a7ddrphy_dq_i_data11; +assign soc_a7ddrphy_bitslip12_i = soc_a7ddrphy_dq_i_data12; +assign soc_a7ddrphy_bitslip13_i = soc_a7ddrphy_dq_i_data13; +assign soc_a7ddrphy_bitslip14_i = soc_a7ddrphy_dq_i_data14; +assign soc_a7ddrphy_bitslip15_i = soc_a7ddrphy_dq_i_data15; +always @(*) begin + soc_a7ddrphy_dfi_p0_rddata <= 32'd0; + soc_a7ddrphy_dfi_p0_rddata[0] <= soc_a7ddrphy_bitslip0_o[0]; + soc_a7ddrphy_dfi_p0_rddata[16] <= soc_a7ddrphy_bitslip0_o[1]; + soc_a7ddrphy_dfi_p0_rddata[1] <= soc_a7ddrphy_bitslip1_o[0]; + soc_a7ddrphy_dfi_p0_rddata[17] <= soc_a7ddrphy_bitslip1_o[1]; + soc_a7ddrphy_dfi_p0_rddata[2] <= soc_a7ddrphy_bitslip2_o[0]; + soc_a7ddrphy_dfi_p0_rddata[18] <= soc_a7ddrphy_bitslip2_o[1]; + soc_a7ddrphy_dfi_p0_rddata[3] <= soc_a7ddrphy_bitslip3_o[0]; + soc_a7ddrphy_dfi_p0_rddata[19] <= soc_a7ddrphy_bitslip3_o[1]; + soc_a7ddrphy_dfi_p0_rddata[4] <= soc_a7ddrphy_bitslip4_o[0]; + soc_a7ddrphy_dfi_p0_rddata[20] <= soc_a7ddrphy_bitslip4_o[1]; + soc_a7ddrphy_dfi_p0_rddata[5] <= soc_a7ddrphy_bitslip5_o[0]; + soc_a7ddrphy_dfi_p0_rddata[21] <= soc_a7ddrphy_bitslip5_o[1]; + soc_a7ddrphy_dfi_p0_rddata[6] <= soc_a7ddrphy_bitslip6_o[0]; + soc_a7ddrphy_dfi_p0_rddata[22] <= soc_a7ddrphy_bitslip6_o[1]; + soc_a7ddrphy_dfi_p0_rddata[7] <= soc_a7ddrphy_bitslip7_o[0]; + soc_a7ddrphy_dfi_p0_rddata[23] <= soc_a7ddrphy_bitslip7_o[1]; + soc_a7ddrphy_dfi_p0_rddata[8] <= soc_a7ddrphy_bitslip8_o[0]; + soc_a7ddrphy_dfi_p0_rddata[24] <= soc_a7ddrphy_bitslip8_o[1]; + soc_a7ddrphy_dfi_p0_rddata[9] <= soc_a7ddrphy_bitslip9_o[0]; + soc_a7ddrphy_dfi_p0_rddata[25] <= soc_a7ddrphy_bitslip9_o[1]; + soc_a7ddrphy_dfi_p0_rddata[10] <= soc_a7ddrphy_bitslip10_o[0]; + soc_a7ddrphy_dfi_p0_rddata[26] <= soc_a7ddrphy_bitslip10_o[1]; + soc_a7ddrphy_dfi_p0_rddata[11] <= soc_a7ddrphy_bitslip11_o[0]; + soc_a7ddrphy_dfi_p0_rddata[27] <= soc_a7ddrphy_bitslip11_o[1]; + soc_a7ddrphy_dfi_p0_rddata[12] <= soc_a7ddrphy_bitslip12_o[0]; + soc_a7ddrphy_dfi_p0_rddata[28] <= soc_a7ddrphy_bitslip12_o[1]; + soc_a7ddrphy_dfi_p0_rddata[13] <= soc_a7ddrphy_bitslip13_o[0]; + soc_a7ddrphy_dfi_p0_rddata[29] <= soc_a7ddrphy_bitslip13_o[1]; + soc_a7ddrphy_dfi_p0_rddata[14] <= soc_a7ddrphy_bitslip14_o[0]; + soc_a7ddrphy_dfi_p0_rddata[30] <= soc_a7ddrphy_bitslip14_o[1]; + soc_a7ddrphy_dfi_p0_rddata[15] <= soc_a7ddrphy_bitslip15_o[0]; + soc_a7ddrphy_dfi_p0_rddata[31] <= soc_a7ddrphy_bitslip15_o[1]; +end +always @(*) begin + soc_a7ddrphy_dfi_p1_rddata <= 32'd0; + soc_a7ddrphy_dfi_p1_rddata[0] <= soc_a7ddrphy_bitslip0_o[2]; + soc_a7ddrphy_dfi_p1_rddata[16] <= soc_a7ddrphy_bitslip0_o[3]; + soc_a7ddrphy_dfi_p1_rddata[1] <= soc_a7ddrphy_bitslip1_o[2]; + soc_a7ddrphy_dfi_p1_rddata[17] <= soc_a7ddrphy_bitslip1_o[3]; + soc_a7ddrphy_dfi_p1_rddata[2] <= soc_a7ddrphy_bitslip2_o[2]; + soc_a7ddrphy_dfi_p1_rddata[18] <= soc_a7ddrphy_bitslip2_o[3]; + soc_a7ddrphy_dfi_p1_rddata[3] <= soc_a7ddrphy_bitslip3_o[2]; + soc_a7ddrphy_dfi_p1_rddata[19] <= soc_a7ddrphy_bitslip3_o[3]; + soc_a7ddrphy_dfi_p1_rddata[4] <= soc_a7ddrphy_bitslip4_o[2]; + soc_a7ddrphy_dfi_p1_rddata[20] <= soc_a7ddrphy_bitslip4_o[3]; + soc_a7ddrphy_dfi_p1_rddata[5] <= soc_a7ddrphy_bitslip5_o[2]; + soc_a7ddrphy_dfi_p1_rddata[21] <= soc_a7ddrphy_bitslip5_o[3]; + soc_a7ddrphy_dfi_p1_rddata[6] <= soc_a7ddrphy_bitslip6_o[2]; + soc_a7ddrphy_dfi_p1_rddata[22] <= soc_a7ddrphy_bitslip6_o[3]; + soc_a7ddrphy_dfi_p1_rddata[7] <= soc_a7ddrphy_bitslip7_o[2]; + soc_a7ddrphy_dfi_p1_rddata[23] <= soc_a7ddrphy_bitslip7_o[3]; + soc_a7ddrphy_dfi_p1_rddata[8] <= soc_a7ddrphy_bitslip8_o[2]; + soc_a7ddrphy_dfi_p1_rddata[24] <= soc_a7ddrphy_bitslip8_o[3]; + soc_a7ddrphy_dfi_p1_rddata[9] <= soc_a7ddrphy_bitslip9_o[2]; + soc_a7ddrphy_dfi_p1_rddata[25] <= soc_a7ddrphy_bitslip9_o[3]; + soc_a7ddrphy_dfi_p1_rddata[10] <= soc_a7ddrphy_bitslip10_o[2]; + soc_a7ddrphy_dfi_p1_rddata[26] <= soc_a7ddrphy_bitslip10_o[3]; + soc_a7ddrphy_dfi_p1_rddata[11] <= soc_a7ddrphy_bitslip11_o[2]; + soc_a7ddrphy_dfi_p1_rddata[27] <= soc_a7ddrphy_bitslip11_o[3]; + soc_a7ddrphy_dfi_p1_rddata[12] <= soc_a7ddrphy_bitslip12_o[2]; + soc_a7ddrphy_dfi_p1_rddata[28] <= soc_a7ddrphy_bitslip12_o[3]; + soc_a7ddrphy_dfi_p1_rddata[13] <= soc_a7ddrphy_bitslip13_o[2]; + soc_a7ddrphy_dfi_p1_rddata[29] <= soc_a7ddrphy_bitslip13_o[3]; + soc_a7ddrphy_dfi_p1_rddata[14] <= soc_a7ddrphy_bitslip14_o[2]; + soc_a7ddrphy_dfi_p1_rddata[30] <= soc_a7ddrphy_bitslip14_o[3]; + soc_a7ddrphy_dfi_p1_rddata[15] <= soc_a7ddrphy_bitslip15_o[2]; + soc_a7ddrphy_dfi_p1_rddata[31] <= soc_a7ddrphy_bitslip15_o[3]; +end +always @(*) begin + soc_a7ddrphy_dfi_p2_rddata <= 32'd0; + soc_a7ddrphy_dfi_p2_rddata[0] <= soc_a7ddrphy_bitslip0_o[4]; + soc_a7ddrphy_dfi_p2_rddata[16] <= soc_a7ddrphy_bitslip0_o[5]; + soc_a7ddrphy_dfi_p2_rddata[1] <= soc_a7ddrphy_bitslip1_o[4]; + soc_a7ddrphy_dfi_p2_rddata[17] <= soc_a7ddrphy_bitslip1_o[5]; + soc_a7ddrphy_dfi_p2_rddata[2] <= soc_a7ddrphy_bitslip2_o[4]; + soc_a7ddrphy_dfi_p2_rddata[18] <= soc_a7ddrphy_bitslip2_o[5]; + soc_a7ddrphy_dfi_p2_rddata[3] <= soc_a7ddrphy_bitslip3_o[4]; + soc_a7ddrphy_dfi_p2_rddata[19] <= soc_a7ddrphy_bitslip3_o[5]; + soc_a7ddrphy_dfi_p2_rddata[4] <= soc_a7ddrphy_bitslip4_o[4]; + soc_a7ddrphy_dfi_p2_rddata[20] <= soc_a7ddrphy_bitslip4_o[5]; + soc_a7ddrphy_dfi_p2_rddata[5] <= soc_a7ddrphy_bitslip5_o[4]; + soc_a7ddrphy_dfi_p2_rddata[21] <= soc_a7ddrphy_bitslip5_o[5]; + soc_a7ddrphy_dfi_p2_rddata[6] <= soc_a7ddrphy_bitslip6_o[4]; + soc_a7ddrphy_dfi_p2_rddata[22] <= soc_a7ddrphy_bitslip6_o[5]; + soc_a7ddrphy_dfi_p2_rddata[7] <= soc_a7ddrphy_bitslip7_o[4]; + soc_a7ddrphy_dfi_p2_rddata[23] <= soc_a7ddrphy_bitslip7_o[5]; + soc_a7ddrphy_dfi_p2_rddata[8] <= soc_a7ddrphy_bitslip8_o[4]; + soc_a7ddrphy_dfi_p2_rddata[24] <= soc_a7ddrphy_bitslip8_o[5]; + soc_a7ddrphy_dfi_p2_rddata[9] <= soc_a7ddrphy_bitslip9_o[4]; + soc_a7ddrphy_dfi_p2_rddata[25] <= soc_a7ddrphy_bitslip9_o[5]; + soc_a7ddrphy_dfi_p2_rddata[10] <= soc_a7ddrphy_bitslip10_o[4]; + soc_a7ddrphy_dfi_p2_rddata[26] <= soc_a7ddrphy_bitslip10_o[5]; + soc_a7ddrphy_dfi_p2_rddata[11] <= soc_a7ddrphy_bitslip11_o[4]; + soc_a7ddrphy_dfi_p2_rddata[27] <= soc_a7ddrphy_bitslip11_o[5]; + soc_a7ddrphy_dfi_p2_rddata[12] <= soc_a7ddrphy_bitslip12_o[4]; + soc_a7ddrphy_dfi_p2_rddata[28] <= soc_a7ddrphy_bitslip12_o[5]; + soc_a7ddrphy_dfi_p2_rddata[13] <= soc_a7ddrphy_bitslip13_o[4]; + soc_a7ddrphy_dfi_p2_rddata[29] <= soc_a7ddrphy_bitslip13_o[5]; + soc_a7ddrphy_dfi_p2_rddata[14] <= soc_a7ddrphy_bitslip14_o[4]; + soc_a7ddrphy_dfi_p2_rddata[30] <= soc_a7ddrphy_bitslip14_o[5]; + soc_a7ddrphy_dfi_p2_rddata[15] <= soc_a7ddrphy_bitslip15_o[4]; + soc_a7ddrphy_dfi_p2_rddata[31] <= soc_a7ddrphy_bitslip15_o[5]; +end +always @(*) begin + soc_a7ddrphy_dfi_p3_rddata <= 32'd0; + soc_a7ddrphy_dfi_p3_rddata[0] <= soc_a7ddrphy_bitslip0_o[6]; + soc_a7ddrphy_dfi_p3_rddata[16] <= soc_a7ddrphy_bitslip0_o[7]; + soc_a7ddrphy_dfi_p3_rddata[1] <= soc_a7ddrphy_bitslip1_o[6]; + soc_a7ddrphy_dfi_p3_rddata[17] <= soc_a7ddrphy_bitslip1_o[7]; + soc_a7ddrphy_dfi_p3_rddata[2] <= soc_a7ddrphy_bitslip2_o[6]; + soc_a7ddrphy_dfi_p3_rddata[18] <= soc_a7ddrphy_bitslip2_o[7]; + soc_a7ddrphy_dfi_p3_rddata[3] <= soc_a7ddrphy_bitslip3_o[6]; + soc_a7ddrphy_dfi_p3_rddata[19] <= soc_a7ddrphy_bitslip3_o[7]; + soc_a7ddrphy_dfi_p3_rddata[4] <= soc_a7ddrphy_bitslip4_o[6]; + soc_a7ddrphy_dfi_p3_rddata[20] <= soc_a7ddrphy_bitslip4_o[7]; + soc_a7ddrphy_dfi_p3_rddata[5] <= soc_a7ddrphy_bitslip5_o[6]; + soc_a7ddrphy_dfi_p3_rddata[21] <= soc_a7ddrphy_bitslip5_o[7]; + soc_a7ddrphy_dfi_p3_rddata[6] <= soc_a7ddrphy_bitslip6_o[6]; + soc_a7ddrphy_dfi_p3_rddata[22] <= soc_a7ddrphy_bitslip6_o[7]; + soc_a7ddrphy_dfi_p3_rddata[7] <= soc_a7ddrphy_bitslip7_o[6]; + soc_a7ddrphy_dfi_p3_rddata[23] <= soc_a7ddrphy_bitslip7_o[7]; + soc_a7ddrphy_dfi_p3_rddata[8] <= soc_a7ddrphy_bitslip8_o[6]; + soc_a7ddrphy_dfi_p3_rddata[24] <= soc_a7ddrphy_bitslip8_o[7]; + soc_a7ddrphy_dfi_p3_rddata[9] <= soc_a7ddrphy_bitslip9_o[6]; + soc_a7ddrphy_dfi_p3_rddata[25] <= soc_a7ddrphy_bitslip9_o[7]; + soc_a7ddrphy_dfi_p3_rddata[10] <= soc_a7ddrphy_bitslip10_o[6]; + soc_a7ddrphy_dfi_p3_rddata[26] <= soc_a7ddrphy_bitslip10_o[7]; + soc_a7ddrphy_dfi_p3_rddata[11] <= soc_a7ddrphy_bitslip11_o[6]; + soc_a7ddrphy_dfi_p3_rddata[27] <= soc_a7ddrphy_bitslip11_o[7]; + soc_a7ddrphy_dfi_p3_rddata[12] <= soc_a7ddrphy_bitslip12_o[6]; + soc_a7ddrphy_dfi_p3_rddata[28] <= soc_a7ddrphy_bitslip12_o[7]; + soc_a7ddrphy_dfi_p3_rddata[13] <= soc_a7ddrphy_bitslip13_o[6]; + soc_a7ddrphy_dfi_p3_rddata[29] <= soc_a7ddrphy_bitslip13_o[7]; + soc_a7ddrphy_dfi_p3_rddata[14] <= soc_a7ddrphy_bitslip14_o[6]; + soc_a7ddrphy_dfi_p3_rddata[30] <= soc_a7ddrphy_bitslip14_o[7]; + soc_a7ddrphy_dfi_p3_rddata[15] <= soc_a7ddrphy_bitslip15_o[6]; + soc_a7ddrphy_dfi_p3_rddata[31] <= soc_a7ddrphy_bitslip15_o[7]; +end +assign soc_a7ddrphy_oe = ((soc_a7ddrphy_last_wrdata_en[1] | soc_a7ddrphy_last_wrdata_en[2]) | soc_a7ddrphy_last_wrdata_en[3]); +assign soc_a7ddrphy_dqs_preamble = (soc_a7ddrphy_last_wrdata_en[1] & (~soc_a7ddrphy_last_wrdata_en[2])); +assign soc_a7ddrphy_dqs_postamble = (soc_a7ddrphy_last_wrdata_en[3] & (~soc_a7ddrphy_last_wrdata_en[2])); +assign soc_a7ddrphy_dfi_p0_address = soc_netsoc_sdram_master_p0_address; +assign soc_a7ddrphy_dfi_p0_bank = soc_netsoc_sdram_master_p0_bank; +assign soc_a7ddrphy_dfi_p0_cas_n = soc_netsoc_sdram_master_p0_cas_n; +assign soc_a7ddrphy_dfi_p0_cs_n = soc_netsoc_sdram_master_p0_cs_n; +assign soc_a7ddrphy_dfi_p0_ras_n = soc_netsoc_sdram_master_p0_ras_n; +assign soc_a7ddrphy_dfi_p0_we_n = soc_netsoc_sdram_master_p0_we_n; +assign soc_a7ddrphy_dfi_p0_cke = soc_netsoc_sdram_master_p0_cke; +assign soc_a7ddrphy_dfi_p0_odt = soc_netsoc_sdram_master_p0_odt; +assign soc_a7ddrphy_dfi_p0_reset_n = soc_netsoc_sdram_master_p0_reset_n; +assign soc_a7ddrphy_dfi_p0_act_n = soc_netsoc_sdram_master_p0_act_n; +assign soc_a7ddrphy_dfi_p0_wrdata = soc_netsoc_sdram_master_p0_wrdata; +assign soc_a7ddrphy_dfi_p0_wrdata_en = soc_netsoc_sdram_master_p0_wrdata_en; +assign soc_a7ddrphy_dfi_p0_wrdata_mask = soc_netsoc_sdram_master_p0_wrdata_mask; +assign soc_a7ddrphy_dfi_p0_rddata_en = soc_netsoc_sdram_master_p0_rddata_en; +assign soc_netsoc_sdram_master_p0_rddata = soc_a7ddrphy_dfi_p0_rddata; +assign soc_netsoc_sdram_master_p0_rddata_valid = soc_a7ddrphy_dfi_p0_rddata_valid; +assign soc_a7ddrphy_dfi_p1_address = soc_netsoc_sdram_master_p1_address; +assign soc_a7ddrphy_dfi_p1_bank = soc_netsoc_sdram_master_p1_bank; +assign soc_a7ddrphy_dfi_p1_cas_n = soc_netsoc_sdram_master_p1_cas_n; +assign soc_a7ddrphy_dfi_p1_cs_n = soc_netsoc_sdram_master_p1_cs_n; +assign soc_a7ddrphy_dfi_p1_ras_n = soc_netsoc_sdram_master_p1_ras_n; +assign soc_a7ddrphy_dfi_p1_we_n = soc_netsoc_sdram_master_p1_we_n; +assign soc_a7ddrphy_dfi_p1_cke = soc_netsoc_sdram_master_p1_cke; +assign soc_a7ddrphy_dfi_p1_odt = soc_netsoc_sdram_master_p1_odt; +assign soc_a7ddrphy_dfi_p1_reset_n = soc_netsoc_sdram_master_p1_reset_n; +assign soc_a7ddrphy_dfi_p1_act_n = soc_netsoc_sdram_master_p1_act_n; +assign soc_a7ddrphy_dfi_p1_wrdata = soc_netsoc_sdram_master_p1_wrdata; +assign soc_a7ddrphy_dfi_p1_wrdata_en = soc_netsoc_sdram_master_p1_wrdata_en; +assign soc_a7ddrphy_dfi_p1_wrdata_mask = soc_netsoc_sdram_master_p1_wrdata_mask; +assign soc_a7ddrphy_dfi_p1_rddata_en = soc_netsoc_sdram_master_p1_rddata_en; +assign soc_netsoc_sdram_master_p1_rddata = soc_a7ddrphy_dfi_p1_rddata; +assign soc_netsoc_sdram_master_p1_rddata_valid = soc_a7ddrphy_dfi_p1_rddata_valid; +assign soc_a7ddrphy_dfi_p2_address = soc_netsoc_sdram_master_p2_address; +assign soc_a7ddrphy_dfi_p2_bank = soc_netsoc_sdram_master_p2_bank; +assign soc_a7ddrphy_dfi_p2_cas_n = soc_netsoc_sdram_master_p2_cas_n; +assign soc_a7ddrphy_dfi_p2_cs_n = soc_netsoc_sdram_master_p2_cs_n; +assign soc_a7ddrphy_dfi_p2_ras_n = soc_netsoc_sdram_master_p2_ras_n; +assign soc_a7ddrphy_dfi_p2_we_n = soc_netsoc_sdram_master_p2_we_n; +assign soc_a7ddrphy_dfi_p2_cke = soc_netsoc_sdram_master_p2_cke; +assign soc_a7ddrphy_dfi_p2_odt = soc_netsoc_sdram_master_p2_odt; +assign soc_a7ddrphy_dfi_p2_reset_n = soc_netsoc_sdram_master_p2_reset_n; +assign soc_a7ddrphy_dfi_p2_act_n = soc_netsoc_sdram_master_p2_act_n; +assign soc_a7ddrphy_dfi_p2_wrdata = soc_netsoc_sdram_master_p2_wrdata; +assign soc_a7ddrphy_dfi_p2_wrdata_en = soc_netsoc_sdram_master_p2_wrdata_en; +assign soc_a7ddrphy_dfi_p2_wrdata_mask = soc_netsoc_sdram_master_p2_wrdata_mask; +assign soc_a7ddrphy_dfi_p2_rddata_en = soc_netsoc_sdram_master_p2_rddata_en; +assign soc_netsoc_sdram_master_p2_rddata = soc_a7ddrphy_dfi_p2_rddata; +assign soc_netsoc_sdram_master_p2_rddata_valid = soc_a7ddrphy_dfi_p2_rddata_valid; +assign soc_a7ddrphy_dfi_p3_address = soc_netsoc_sdram_master_p3_address; +assign soc_a7ddrphy_dfi_p3_bank = soc_netsoc_sdram_master_p3_bank; +assign soc_a7ddrphy_dfi_p3_cas_n = soc_netsoc_sdram_master_p3_cas_n; +assign soc_a7ddrphy_dfi_p3_cs_n = soc_netsoc_sdram_master_p3_cs_n; +assign soc_a7ddrphy_dfi_p3_ras_n = soc_netsoc_sdram_master_p3_ras_n; +assign soc_a7ddrphy_dfi_p3_we_n = soc_netsoc_sdram_master_p3_we_n; +assign soc_a7ddrphy_dfi_p3_cke = soc_netsoc_sdram_master_p3_cke; +assign soc_a7ddrphy_dfi_p3_odt = soc_netsoc_sdram_master_p3_odt; +assign soc_a7ddrphy_dfi_p3_reset_n = soc_netsoc_sdram_master_p3_reset_n; +assign soc_a7ddrphy_dfi_p3_act_n = soc_netsoc_sdram_master_p3_act_n; +assign soc_a7ddrphy_dfi_p3_wrdata = soc_netsoc_sdram_master_p3_wrdata; +assign soc_a7ddrphy_dfi_p3_wrdata_en = soc_netsoc_sdram_master_p3_wrdata_en; +assign soc_a7ddrphy_dfi_p3_wrdata_mask = soc_netsoc_sdram_master_p3_wrdata_mask; +assign soc_a7ddrphy_dfi_p3_rddata_en = soc_netsoc_sdram_master_p3_rddata_en; +assign soc_netsoc_sdram_master_p3_rddata = soc_a7ddrphy_dfi_p3_rddata; +assign soc_netsoc_sdram_master_p3_rddata_valid = soc_a7ddrphy_dfi_p3_rddata_valid; +assign soc_netsoc_sdram_slave_p0_address = soc_netsoc_sdram_dfi_p0_address; +assign soc_netsoc_sdram_slave_p0_bank = soc_netsoc_sdram_dfi_p0_bank; +assign soc_netsoc_sdram_slave_p0_cas_n = soc_netsoc_sdram_dfi_p0_cas_n; +assign soc_netsoc_sdram_slave_p0_cs_n = soc_netsoc_sdram_dfi_p0_cs_n; +assign soc_netsoc_sdram_slave_p0_ras_n = soc_netsoc_sdram_dfi_p0_ras_n; +assign soc_netsoc_sdram_slave_p0_we_n = soc_netsoc_sdram_dfi_p0_we_n; +assign soc_netsoc_sdram_slave_p0_cke = soc_netsoc_sdram_dfi_p0_cke; +assign soc_netsoc_sdram_slave_p0_odt = soc_netsoc_sdram_dfi_p0_odt; +assign soc_netsoc_sdram_slave_p0_reset_n = soc_netsoc_sdram_dfi_p0_reset_n; +assign soc_netsoc_sdram_slave_p0_act_n = soc_netsoc_sdram_dfi_p0_act_n; +assign soc_netsoc_sdram_slave_p0_wrdata = soc_netsoc_sdram_dfi_p0_wrdata; +assign soc_netsoc_sdram_slave_p0_wrdata_en = soc_netsoc_sdram_dfi_p0_wrdata_en; +assign soc_netsoc_sdram_slave_p0_wrdata_mask = soc_netsoc_sdram_dfi_p0_wrdata_mask; +assign soc_netsoc_sdram_slave_p0_rddata_en = soc_netsoc_sdram_dfi_p0_rddata_en; +assign soc_netsoc_sdram_dfi_p0_rddata = soc_netsoc_sdram_slave_p0_rddata; +assign soc_netsoc_sdram_dfi_p0_rddata_valid = soc_netsoc_sdram_slave_p0_rddata_valid; +assign soc_netsoc_sdram_slave_p1_address = soc_netsoc_sdram_dfi_p1_address; +assign soc_netsoc_sdram_slave_p1_bank = soc_netsoc_sdram_dfi_p1_bank; +assign soc_netsoc_sdram_slave_p1_cas_n = soc_netsoc_sdram_dfi_p1_cas_n; +assign soc_netsoc_sdram_slave_p1_cs_n = soc_netsoc_sdram_dfi_p1_cs_n; +assign soc_netsoc_sdram_slave_p1_ras_n = soc_netsoc_sdram_dfi_p1_ras_n; +assign soc_netsoc_sdram_slave_p1_we_n = soc_netsoc_sdram_dfi_p1_we_n; +assign soc_netsoc_sdram_slave_p1_cke = soc_netsoc_sdram_dfi_p1_cke; +assign soc_netsoc_sdram_slave_p1_odt = soc_netsoc_sdram_dfi_p1_odt; +assign soc_netsoc_sdram_slave_p1_reset_n = soc_netsoc_sdram_dfi_p1_reset_n; +assign soc_netsoc_sdram_slave_p1_act_n = soc_netsoc_sdram_dfi_p1_act_n; +assign soc_netsoc_sdram_slave_p1_wrdata = soc_netsoc_sdram_dfi_p1_wrdata; +assign soc_netsoc_sdram_slave_p1_wrdata_en = soc_netsoc_sdram_dfi_p1_wrdata_en; +assign soc_netsoc_sdram_slave_p1_wrdata_mask = soc_netsoc_sdram_dfi_p1_wrdata_mask; +assign soc_netsoc_sdram_slave_p1_rddata_en = soc_netsoc_sdram_dfi_p1_rddata_en; +assign soc_netsoc_sdram_dfi_p1_rddata = soc_netsoc_sdram_slave_p1_rddata; +assign soc_netsoc_sdram_dfi_p1_rddata_valid = soc_netsoc_sdram_slave_p1_rddata_valid; +assign soc_netsoc_sdram_slave_p2_address = soc_netsoc_sdram_dfi_p2_address; +assign soc_netsoc_sdram_slave_p2_bank = soc_netsoc_sdram_dfi_p2_bank; +assign soc_netsoc_sdram_slave_p2_cas_n = soc_netsoc_sdram_dfi_p2_cas_n; +assign soc_netsoc_sdram_slave_p2_cs_n = soc_netsoc_sdram_dfi_p2_cs_n; +assign soc_netsoc_sdram_slave_p2_ras_n = soc_netsoc_sdram_dfi_p2_ras_n; +assign soc_netsoc_sdram_slave_p2_we_n = soc_netsoc_sdram_dfi_p2_we_n; +assign soc_netsoc_sdram_slave_p2_cke = soc_netsoc_sdram_dfi_p2_cke; +assign soc_netsoc_sdram_slave_p2_odt = soc_netsoc_sdram_dfi_p2_odt; +assign soc_netsoc_sdram_slave_p2_reset_n = soc_netsoc_sdram_dfi_p2_reset_n; +assign soc_netsoc_sdram_slave_p2_act_n = soc_netsoc_sdram_dfi_p2_act_n; +assign soc_netsoc_sdram_slave_p2_wrdata = soc_netsoc_sdram_dfi_p2_wrdata; +assign soc_netsoc_sdram_slave_p2_wrdata_en = soc_netsoc_sdram_dfi_p2_wrdata_en; +assign soc_netsoc_sdram_slave_p2_wrdata_mask = soc_netsoc_sdram_dfi_p2_wrdata_mask; +assign soc_netsoc_sdram_slave_p2_rddata_en = soc_netsoc_sdram_dfi_p2_rddata_en; +assign soc_netsoc_sdram_dfi_p2_rddata = soc_netsoc_sdram_slave_p2_rddata; +assign soc_netsoc_sdram_dfi_p2_rddata_valid = soc_netsoc_sdram_slave_p2_rddata_valid; +assign soc_netsoc_sdram_slave_p3_address = soc_netsoc_sdram_dfi_p3_address; +assign soc_netsoc_sdram_slave_p3_bank = soc_netsoc_sdram_dfi_p3_bank; +assign soc_netsoc_sdram_slave_p3_cas_n = soc_netsoc_sdram_dfi_p3_cas_n; +assign soc_netsoc_sdram_slave_p3_cs_n = soc_netsoc_sdram_dfi_p3_cs_n; +assign soc_netsoc_sdram_slave_p3_ras_n = soc_netsoc_sdram_dfi_p3_ras_n; +assign soc_netsoc_sdram_slave_p3_we_n = soc_netsoc_sdram_dfi_p3_we_n; +assign soc_netsoc_sdram_slave_p3_cke = soc_netsoc_sdram_dfi_p3_cke; +assign soc_netsoc_sdram_slave_p3_odt = soc_netsoc_sdram_dfi_p3_odt; +assign soc_netsoc_sdram_slave_p3_reset_n = soc_netsoc_sdram_dfi_p3_reset_n; +assign soc_netsoc_sdram_slave_p3_act_n = soc_netsoc_sdram_dfi_p3_act_n; +assign soc_netsoc_sdram_slave_p3_wrdata = soc_netsoc_sdram_dfi_p3_wrdata; +assign soc_netsoc_sdram_slave_p3_wrdata_en = soc_netsoc_sdram_dfi_p3_wrdata_en; +assign soc_netsoc_sdram_slave_p3_wrdata_mask = soc_netsoc_sdram_dfi_p3_wrdata_mask; +assign soc_netsoc_sdram_slave_p3_rddata_en = soc_netsoc_sdram_dfi_p3_rddata_en; +assign soc_netsoc_sdram_dfi_p3_rddata = soc_netsoc_sdram_slave_p3_rddata; +assign soc_netsoc_sdram_dfi_p3_rddata_valid = soc_netsoc_sdram_slave_p3_rddata_valid; +always @(*) begin + soc_netsoc_sdram_master_p2_we_n <= 1'd1; + soc_netsoc_sdram_master_p2_cke <= 1'd0; + soc_netsoc_sdram_master_p2_odt <= 1'd0; + soc_netsoc_sdram_master_p2_reset_n <= 1'd0; + soc_netsoc_sdram_master_p2_act_n <= 1'd1; + soc_netsoc_sdram_master_p2_wrdata <= 32'd0; + soc_netsoc_sdram_inti_p3_rddata <= 32'd0; + soc_netsoc_sdram_master_p2_wrdata_en <= 1'd0; + soc_netsoc_sdram_inti_p3_rddata_valid <= 1'd0; + soc_netsoc_sdram_master_p2_wrdata_mask <= 4'd0; + soc_netsoc_sdram_master_p2_rddata_en <= 1'd0; + soc_netsoc_sdram_master_p3_address <= 14'd0; + soc_netsoc_sdram_master_p3_bank <= 3'd0; + soc_netsoc_sdram_master_p3_cas_n <= 1'd1; + soc_netsoc_sdram_master_p3_cs_n <= 1'd1; + soc_netsoc_sdram_master_p3_ras_n <= 1'd1; + soc_netsoc_sdram_master_p3_we_n <= 1'd1; + soc_netsoc_sdram_master_p3_cke <= 1'd0; + soc_netsoc_sdram_master_p3_odt <= 1'd0; + soc_netsoc_sdram_master_p3_reset_n <= 1'd0; + soc_netsoc_sdram_master_p3_act_n <= 1'd1; + soc_netsoc_sdram_master_p3_wrdata <= 32'd0; + soc_netsoc_sdram_master_p3_wrdata_en <= 1'd0; + soc_netsoc_sdram_master_p3_wrdata_mask <= 4'd0; + soc_netsoc_sdram_master_p3_rddata_en <= 1'd0; + soc_netsoc_sdram_slave_p0_rddata <= 32'd0; + soc_netsoc_sdram_slave_p0_rddata_valid <= 1'd0; + soc_netsoc_sdram_slave_p1_rddata <= 32'd0; + soc_netsoc_sdram_slave_p1_rddata_valid <= 1'd0; + soc_netsoc_sdram_slave_p2_rddata <= 32'd0; + soc_netsoc_sdram_slave_p2_rddata_valid <= 1'd0; + soc_netsoc_sdram_slave_p3_rddata <= 32'd0; + soc_netsoc_sdram_slave_p3_rddata_valid <= 1'd0; + soc_netsoc_sdram_inti_p0_rddata <= 32'd0; + soc_netsoc_sdram_inti_p0_rddata_valid <= 1'd0; + soc_netsoc_sdram_master_p0_address <= 14'd0; + soc_netsoc_sdram_master_p0_bank <= 3'd0; + soc_netsoc_sdram_master_p0_cas_n <= 1'd1; + soc_netsoc_sdram_master_p0_cs_n <= 1'd1; + soc_netsoc_sdram_master_p0_ras_n <= 1'd1; + soc_netsoc_sdram_master_p0_we_n <= 1'd1; + soc_netsoc_sdram_master_p0_cke <= 1'd0; + soc_netsoc_sdram_master_p0_odt <= 1'd0; + soc_netsoc_sdram_master_p0_reset_n <= 1'd0; + soc_netsoc_sdram_master_p0_act_n <= 1'd1; + soc_netsoc_sdram_master_p0_wrdata <= 32'd0; + soc_netsoc_sdram_inti_p1_rddata <= 32'd0; + soc_netsoc_sdram_master_p0_wrdata_en <= 1'd0; + soc_netsoc_sdram_inti_p1_rddata_valid <= 1'd0; + soc_netsoc_sdram_master_p0_wrdata_mask <= 4'd0; + soc_netsoc_sdram_master_p0_rddata_en <= 1'd0; + soc_netsoc_sdram_master_p1_address <= 14'd0; + soc_netsoc_sdram_master_p1_bank <= 3'd0; + soc_netsoc_sdram_master_p1_cas_n <= 1'd1; + soc_netsoc_sdram_master_p1_cs_n <= 1'd1; + soc_netsoc_sdram_master_p1_ras_n <= 1'd1; + soc_netsoc_sdram_master_p1_we_n <= 1'd1; + soc_netsoc_sdram_master_p1_cke <= 1'd0; + soc_netsoc_sdram_master_p1_odt <= 1'd0; + soc_netsoc_sdram_master_p1_reset_n <= 1'd0; + soc_netsoc_sdram_master_p1_act_n <= 1'd1; + soc_netsoc_sdram_master_p1_wrdata <= 32'd0; + soc_netsoc_sdram_inti_p2_rddata <= 32'd0; + soc_netsoc_sdram_master_p1_wrdata_en <= 1'd0; + soc_netsoc_sdram_inti_p2_rddata_valid <= 1'd0; + soc_netsoc_sdram_master_p1_wrdata_mask <= 4'd0; + soc_netsoc_sdram_master_p1_rddata_en <= 1'd0; + soc_netsoc_sdram_master_p2_address <= 14'd0; + soc_netsoc_sdram_master_p2_bank <= 3'd0; + soc_netsoc_sdram_master_p2_cas_n <= 1'd1; + soc_netsoc_sdram_master_p2_cs_n <= 1'd1; + soc_netsoc_sdram_master_p2_ras_n <= 1'd1; + if (soc_netsoc_sdram_storage[0]) begin + soc_netsoc_sdram_master_p0_address <= soc_netsoc_sdram_slave_p0_address; + soc_netsoc_sdram_master_p0_bank <= soc_netsoc_sdram_slave_p0_bank; + soc_netsoc_sdram_master_p0_cas_n <= soc_netsoc_sdram_slave_p0_cas_n; + soc_netsoc_sdram_master_p0_cs_n <= soc_netsoc_sdram_slave_p0_cs_n; + soc_netsoc_sdram_master_p0_ras_n <= soc_netsoc_sdram_slave_p0_ras_n; + soc_netsoc_sdram_master_p0_we_n <= soc_netsoc_sdram_slave_p0_we_n; + soc_netsoc_sdram_master_p0_cke <= soc_netsoc_sdram_slave_p0_cke; + soc_netsoc_sdram_master_p0_odt <= soc_netsoc_sdram_slave_p0_odt; + soc_netsoc_sdram_master_p0_reset_n <= soc_netsoc_sdram_slave_p0_reset_n; + soc_netsoc_sdram_master_p0_act_n <= soc_netsoc_sdram_slave_p0_act_n; + soc_netsoc_sdram_master_p0_wrdata <= soc_netsoc_sdram_slave_p0_wrdata; + soc_netsoc_sdram_master_p0_wrdata_en <= soc_netsoc_sdram_slave_p0_wrdata_en; + soc_netsoc_sdram_master_p0_wrdata_mask <= soc_netsoc_sdram_slave_p0_wrdata_mask; + soc_netsoc_sdram_master_p0_rddata_en <= soc_netsoc_sdram_slave_p0_rddata_en; + soc_netsoc_sdram_slave_p0_rddata <= soc_netsoc_sdram_master_p0_rddata; + soc_netsoc_sdram_slave_p0_rddata_valid <= soc_netsoc_sdram_master_p0_rddata_valid; + soc_netsoc_sdram_master_p1_address <= soc_netsoc_sdram_slave_p1_address; + soc_netsoc_sdram_master_p1_bank <= soc_netsoc_sdram_slave_p1_bank; + soc_netsoc_sdram_master_p1_cas_n <= soc_netsoc_sdram_slave_p1_cas_n; + soc_netsoc_sdram_master_p1_cs_n <= soc_netsoc_sdram_slave_p1_cs_n; + soc_netsoc_sdram_master_p1_ras_n <= soc_netsoc_sdram_slave_p1_ras_n; + soc_netsoc_sdram_master_p1_we_n <= soc_netsoc_sdram_slave_p1_we_n; + soc_netsoc_sdram_master_p1_cke <= soc_netsoc_sdram_slave_p1_cke; + soc_netsoc_sdram_master_p1_odt <= soc_netsoc_sdram_slave_p1_odt; + soc_netsoc_sdram_master_p1_reset_n <= soc_netsoc_sdram_slave_p1_reset_n; + soc_netsoc_sdram_master_p1_act_n <= soc_netsoc_sdram_slave_p1_act_n; + soc_netsoc_sdram_master_p1_wrdata <= soc_netsoc_sdram_slave_p1_wrdata; + soc_netsoc_sdram_master_p1_wrdata_en <= soc_netsoc_sdram_slave_p1_wrdata_en; + soc_netsoc_sdram_master_p1_wrdata_mask <= soc_netsoc_sdram_slave_p1_wrdata_mask; + soc_netsoc_sdram_master_p1_rddata_en <= soc_netsoc_sdram_slave_p1_rddata_en; + soc_netsoc_sdram_slave_p1_rddata <= soc_netsoc_sdram_master_p1_rddata; + soc_netsoc_sdram_slave_p1_rddata_valid <= soc_netsoc_sdram_master_p1_rddata_valid; + soc_netsoc_sdram_master_p2_address <= soc_netsoc_sdram_slave_p2_address; + soc_netsoc_sdram_master_p2_bank <= soc_netsoc_sdram_slave_p2_bank; + soc_netsoc_sdram_master_p2_cas_n <= soc_netsoc_sdram_slave_p2_cas_n; + soc_netsoc_sdram_master_p2_cs_n <= soc_netsoc_sdram_slave_p2_cs_n; + soc_netsoc_sdram_master_p2_ras_n <= soc_netsoc_sdram_slave_p2_ras_n; + soc_netsoc_sdram_master_p2_we_n <= soc_netsoc_sdram_slave_p2_we_n; + soc_netsoc_sdram_master_p2_cke <= soc_netsoc_sdram_slave_p2_cke; + soc_netsoc_sdram_master_p2_odt <= soc_netsoc_sdram_slave_p2_odt; + soc_netsoc_sdram_master_p2_reset_n <= soc_netsoc_sdram_slave_p2_reset_n; + soc_netsoc_sdram_master_p2_act_n <= soc_netsoc_sdram_slave_p2_act_n; + soc_netsoc_sdram_master_p2_wrdata <= soc_netsoc_sdram_slave_p2_wrdata; + soc_netsoc_sdram_master_p2_wrdata_en <= soc_netsoc_sdram_slave_p2_wrdata_en; + soc_netsoc_sdram_master_p2_wrdata_mask <= soc_netsoc_sdram_slave_p2_wrdata_mask; + soc_netsoc_sdram_master_p2_rddata_en <= soc_netsoc_sdram_slave_p2_rddata_en; + soc_netsoc_sdram_slave_p2_rddata <= soc_netsoc_sdram_master_p2_rddata; + soc_netsoc_sdram_slave_p2_rddata_valid <= soc_netsoc_sdram_master_p2_rddata_valid; + soc_netsoc_sdram_master_p3_address <= soc_netsoc_sdram_slave_p3_address; + soc_netsoc_sdram_master_p3_bank <= soc_netsoc_sdram_slave_p3_bank; + soc_netsoc_sdram_master_p3_cas_n <= soc_netsoc_sdram_slave_p3_cas_n; + soc_netsoc_sdram_master_p3_cs_n <= soc_netsoc_sdram_slave_p3_cs_n; + soc_netsoc_sdram_master_p3_ras_n <= soc_netsoc_sdram_slave_p3_ras_n; + soc_netsoc_sdram_master_p3_we_n <= soc_netsoc_sdram_slave_p3_we_n; + soc_netsoc_sdram_master_p3_cke <= soc_netsoc_sdram_slave_p3_cke; + soc_netsoc_sdram_master_p3_odt <= soc_netsoc_sdram_slave_p3_odt; + soc_netsoc_sdram_master_p3_reset_n <= soc_netsoc_sdram_slave_p3_reset_n; + soc_netsoc_sdram_master_p3_act_n <= soc_netsoc_sdram_slave_p3_act_n; + soc_netsoc_sdram_master_p3_wrdata <= soc_netsoc_sdram_slave_p3_wrdata; + soc_netsoc_sdram_master_p3_wrdata_en <= soc_netsoc_sdram_slave_p3_wrdata_en; + soc_netsoc_sdram_master_p3_wrdata_mask <= soc_netsoc_sdram_slave_p3_wrdata_mask; + soc_netsoc_sdram_master_p3_rddata_en <= soc_netsoc_sdram_slave_p3_rddata_en; + soc_netsoc_sdram_slave_p3_rddata <= soc_netsoc_sdram_master_p3_rddata; + soc_netsoc_sdram_slave_p3_rddata_valid <= soc_netsoc_sdram_master_p3_rddata_valid; + end else begin + soc_netsoc_sdram_master_p0_address <= soc_netsoc_sdram_inti_p0_address; + soc_netsoc_sdram_master_p0_bank <= soc_netsoc_sdram_inti_p0_bank; + soc_netsoc_sdram_master_p0_cas_n <= soc_netsoc_sdram_inti_p0_cas_n; + soc_netsoc_sdram_master_p0_cs_n <= soc_netsoc_sdram_inti_p0_cs_n; + soc_netsoc_sdram_master_p0_ras_n <= soc_netsoc_sdram_inti_p0_ras_n; + soc_netsoc_sdram_master_p0_we_n <= soc_netsoc_sdram_inti_p0_we_n; + soc_netsoc_sdram_master_p0_cke <= soc_netsoc_sdram_inti_p0_cke; + soc_netsoc_sdram_master_p0_odt <= soc_netsoc_sdram_inti_p0_odt; + soc_netsoc_sdram_master_p0_reset_n <= soc_netsoc_sdram_inti_p0_reset_n; + soc_netsoc_sdram_master_p0_act_n <= soc_netsoc_sdram_inti_p0_act_n; + soc_netsoc_sdram_master_p0_wrdata <= soc_netsoc_sdram_inti_p0_wrdata; + soc_netsoc_sdram_master_p0_wrdata_en <= soc_netsoc_sdram_inti_p0_wrdata_en; + soc_netsoc_sdram_master_p0_wrdata_mask <= soc_netsoc_sdram_inti_p0_wrdata_mask; + soc_netsoc_sdram_master_p0_rddata_en <= soc_netsoc_sdram_inti_p0_rddata_en; + soc_netsoc_sdram_inti_p0_rddata <= soc_netsoc_sdram_master_p0_rddata; + soc_netsoc_sdram_inti_p0_rddata_valid <= soc_netsoc_sdram_master_p0_rddata_valid; + soc_netsoc_sdram_master_p1_address <= soc_netsoc_sdram_inti_p1_address; + soc_netsoc_sdram_master_p1_bank <= soc_netsoc_sdram_inti_p1_bank; + soc_netsoc_sdram_master_p1_cas_n <= soc_netsoc_sdram_inti_p1_cas_n; + soc_netsoc_sdram_master_p1_cs_n <= soc_netsoc_sdram_inti_p1_cs_n; + soc_netsoc_sdram_master_p1_ras_n <= soc_netsoc_sdram_inti_p1_ras_n; + soc_netsoc_sdram_master_p1_we_n <= soc_netsoc_sdram_inti_p1_we_n; + soc_netsoc_sdram_master_p1_cke <= soc_netsoc_sdram_inti_p1_cke; + soc_netsoc_sdram_master_p1_odt <= soc_netsoc_sdram_inti_p1_odt; + soc_netsoc_sdram_master_p1_reset_n <= soc_netsoc_sdram_inti_p1_reset_n; + soc_netsoc_sdram_master_p1_act_n <= soc_netsoc_sdram_inti_p1_act_n; + soc_netsoc_sdram_master_p1_wrdata <= soc_netsoc_sdram_inti_p1_wrdata; + soc_netsoc_sdram_master_p1_wrdata_en <= soc_netsoc_sdram_inti_p1_wrdata_en; + soc_netsoc_sdram_master_p1_wrdata_mask <= soc_netsoc_sdram_inti_p1_wrdata_mask; + soc_netsoc_sdram_master_p1_rddata_en <= soc_netsoc_sdram_inti_p1_rddata_en; + soc_netsoc_sdram_inti_p1_rddata <= soc_netsoc_sdram_master_p1_rddata; + soc_netsoc_sdram_inti_p1_rddata_valid <= soc_netsoc_sdram_master_p1_rddata_valid; + soc_netsoc_sdram_master_p2_address <= soc_netsoc_sdram_inti_p2_address; + soc_netsoc_sdram_master_p2_bank <= soc_netsoc_sdram_inti_p2_bank; + soc_netsoc_sdram_master_p2_cas_n <= soc_netsoc_sdram_inti_p2_cas_n; + soc_netsoc_sdram_master_p2_cs_n <= soc_netsoc_sdram_inti_p2_cs_n; + soc_netsoc_sdram_master_p2_ras_n <= soc_netsoc_sdram_inti_p2_ras_n; + soc_netsoc_sdram_master_p2_we_n <= soc_netsoc_sdram_inti_p2_we_n; + soc_netsoc_sdram_master_p2_cke <= soc_netsoc_sdram_inti_p2_cke; + soc_netsoc_sdram_master_p2_odt <= soc_netsoc_sdram_inti_p2_odt; + soc_netsoc_sdram_master_p2_reset_n <= soc_netsoc_sdram_inti_p2_reset_n; + soc_netsoc_sdram_master_p2_act_n <= soc_netsoc_sdram_inti_p2_act_n; + soc_netsoc_sdram_master_p2_wrdata <= soc_netsoc_sdram_inti_p2_wrdata; + soc_netsoc_sdram_master_p2_wrdata_en <= soc_netsoc_sdram_inti_p2_wrdata_en; + soc_netsoc_sdram_master_p2_wrdata_mask <= soc_netsoc_sdram_inti_p2_wrdata_mask; + soc_netsoc_sdram_master_p2_rddata_en <= soc_netsoc_sdram_inti_p2_rddata_en; + soc_netsoc_sdram_inti_p2_rddata <= soc_netsoc_sdram_master_p2_rddata; + soc_netsoc_sdram_inti_p2_rddata_valid <= soc_netsoc_sdram_master_p2_rddata_valid; + soc_netsoc_sdram_master_p3_address <= soc_netsoc_sdram_inti_p3_address; + soc_netsoc_sdram_master_p3_bank <= soc_netsoc_sdram_inti_p3_bank; + soc_netsoc_sdram_master_p3_cas_n <= soc_netsoc_sdram_inti_p3_cas_n; + soc_netsoc_sdram_master_p3_cs_n <= soc_netsoc_sdram_inti_p3_cs_n; + soc_netsoc_sdram_master_p3_ras_n <= soc_netsoc_sdram_inti_p3_ras_n; + soc_netsoc_sdram_master_p3_we_n <= soc_netsoc_sdram_inti_p3_we_n; + soc_netsoc_sdram_master_p3_cke <= soc_netsoc_sdram_inti_p3_cke; + soc_netsoc_sdram_master_p3_odt <= soc_netsoc_sdram_inti_p3_odt; + soc_netsoc_sdram_master_p3_reset_n <= soc_netsoc_sdram_inti_p3_reset_n; + soc_netsoc_sdram_master_p3_act_n <= soc_netsoc_sdram_inti_p3_act_n; + soc_netsoc_sdram_master_p3_wrdata <= soc_netsoc_sdram_inti_p3_wrdata; + soc_netsoc_sdram_master_p3_wrdata_en <= soc_netsoc_sdram_inti_p3_wrdata_en; + soc_netsoc_sdram_master_p3_wrdata_mask <= soc_netsoc_sdram_inti_p3_wrdata_mask; + soc_netsoc_sdram_master_p3_rddata_en <= soc_netsoc_sdram_inti_p3_rddata_en; + soc_netsoc_sdram_inti_p3_rddata <= soc_netsoc_sdram_master_p3_rddata; + soc_netsoc_sdram_inti_p3_rddata_valid <= soc_netsoc_sdram_master_p3_rddata_valid; + end +end +assign soc_netsoc_sdram_inti_p0_cke = soc_netsoc_sdram_storage[1]; +assign soc_netsoc_sdram_inti_p1_cke = soc_netsoc_sdram_storage[1]; +assign soc_netsoc_sdram_inti_p2_cke = soc_netsoc_sdram_storage[1]; +assign soc_netsoc_sdram_inti_p3_cke = soc_netsoc_sdram_storage[1]; +assign soc_netsoc_sdram_inti_p0_odt = soc_netsoc_sdram_storage[2]; +assign soc_netsoc_sdram_inti_p1_odt = soc_netsoc_sdram_storage[2]; +assign soc_netsoc_sdram_inti_p2_odt = soc_netsoc_sdram_storage[2]; +assign soc_netsoc_sdram_inti_p3_odt = soc_netsoc_sdram_storage[2]; +assign soc_netsoc_sdram_inti_p0_reset_n = soc_netsoc_sdram_storage[3]; +assign soc_netsoc_sdram_inti_p1_reset_n = soc_netsoc_sdram_storage[3]; +assign soc_netsoc_sdram_inti_p2_reset_n = soc_netsoc_sdram_storage[3]; +assign soc_netsoc_sdram_inti_p3_reset_n = soc_netsoc_sdram_storage[3]; +always @(*) begin + soc_netsoc_sdram_inti_p0_we_n <= 1'd1; + soc_netsoc_sdram_inti_p0_cas_n <= 1'd1; + soc_netsoc_sdram_inti_p0_cs_n <= 1'd1; + soc_netsoc_sdram_inti_p0_ras_n <= 1'd1; + if (soc_netsoc_sdram_phaseinjector0_command_issue_re) begin + soc_netsoc_sdram_inti_p0_cs_n <= {1{(~soc_netsoc_sdram_phaseinjector0_command_storage[0])}}; + soc_netsoc_sdram_inti_p0_we_n <= (~soc_netsoc_sdram_phaseinjector0_command_storage[1]); + soc_netsoc_sdram_inti_p0_cas_n <= (~soc_netsoc_sdram_phaseinjector0_command_storage[2]); + soc_netsoc_sdram_inti_p0_ras_n <= (~soc_netsoc_sdram_phaseinjector0_command_storage[3]); + end else begin + soc_netsoc_sdram_inti_p0_cs_n <= {1{1'd1}}; + soc_netsoc_sdram_inti_p0_we_n <= 1'd1; + soc_netsoc_sdram_inti_p0_cas_n <= 1'd1; + soc_netsoc_sdram_inti_p0_ras_n <= 1'd1; + end +end +assign soc_netsoc_sdram_inti_p0_address = soc_netsoc_sdram_phaseinjector0_address_storage; +assign soc_netsoc_sdram_inti_p0_bank = soc_netsoc_sdram_phaseinjector0_baddress_storage; +assign soc_netsoc_sdram_inti_p0_wrdata_en = (soc_netsoc_sdram_phaseinjector0_command_issue_re & soc_netsoc_sdram_phaseinjector0_command_storage[4]); +assign soc_netsoc_sdram_inti_p0_rddata_en = (soc_netsoc_sdram_phaseinjector0_command_issue_re & soc_netsoc_sdram_phaseinjector0_command_storage[5]); +assign soc_netsoc_sdram_inti_p0_wrdata = soc_netsoc_sdram_phaseinjector0_wrdata_storage; +assign soc_netsoc_sdram_inti_p0_wrdata_mask = 1'd0; +always @(*) begin + soc_netsoc_sdram_inti_p1_we_n <= 1'd1; + soc_netsoc_sdram_inti_p1_cas_n <= 1'd1; + soc_netsoc_sdram_inti_p1_cs_n <= 1'd1; + soc_netsoc_sdram_inti_p1_ras_n <= 1'd1; + if (soc_netsoc_sdram_phaseinjector1_command_issue_re) begin + soc_netsoc_sdram_inti_p1_cs_n <= {1{(~soc_netsoc_sdram_phaseinjector1_command_storage[0])}}; + soc_netsoc_sdram_inti_p1_we_n <= (~soc_netsoc_sdram_phaseinjector1_command_storage[1]); + soc_netsoc_sdram_inti_p1_cas_n <= (~soc_netsoc_sdram_phaseinjector1_command_storage[2]); + soc_netsoc_sdram_inti_p1_ras_n <= (~soc_netsoc_sdram_phaseinjector1_command_storage[3]); + end else begin + soc_netsoc_sdram_inti_p1_cs_n <= {1{1'd1}}; + soc_netsoc_sdram_inti_p1_we_n <= 1'd1; + soc_netsoc_sdram_inti_p1_cas_n <= 1'd1; + soc_netsoc_sdram_inti_p1_ras_n <= 1'd1; + end +end +assign soc_netsoc_sdram_inti_p1_address = soc_netsoc_sdram_phaseinjector1_address_storage; +assign soc_netsoc_sdram_inti_p1_bank = soc_netsoc_sdram_phaseinjector1_baddress_storage; +assign soc_netsoc_sdram_inti_p1_wrdata_en = (soc_netsoc_sdram_phaseinjector1_command_issue_re & soc_netsoc_sdram_phaseinjector1_command_storage[4]); +assign soc_netsoc_sdram_inti_p1_rddata_en = (soc_netsoc_sdram_phaseinjector1_command_issue_re & soc_netsoc_sdram_phaseinjector1_command_storage[5]); +assign soc_netsoc_sdram_inti_p1_wrdata = soc_netsoc_sdram_phaseinjector1_wrdata_storage; +assign soc_netsoc_sdram_inti_p1_wrdata_mask = 1'd0; +always @(*) begin + soc_netsoc_sdram_inti_p2_we_n <= 1'd1; + soc_netsoc_sdram_inti_p2_cas_n <= 1'd1; + soc_netsoc_sdram_inti_p2_cs_n <= 1'd1; + soc_netsoc_sdram_inti_p2_ras_n <= 1'd1; + if (soc_netsoc_sdram_phaseinjector2_command_issue_re) begin + soc_netsoc_sdram_inti_p2_cs_n <= {1{(~soc_netsoc_sdram_phaseinjector2_command_storage[0])}}; + soc_netsoc_sdram_inti_p2_we_n <= (~soc_netsoc_sdram_phaseinjector2_command_storage[1]); + soc_netsoc_sdram_inti_p2_cas_n <= (~soc_netsoc_sdram_phaseinjector2_command_storage[2]); + soc_netsoc_sdram_inti_p2_ras_n <= (~soc_netsoc_sdram_phaseinjector2_command_storage[3]); + end else begin + soc_netsoc_sdram_inti_p2_cs_n <= {1{1'd1}}; + soc_netsoc_sdram_inti_p2_we_n <= 1'd1; + soc_netsoc_sdram_inti_p2_cas_n <= 1'd1; + soc_netsoc_sdram_inti_p2_ras_n <= 1'd1; + end +end +assign soc_netsoc_sdram_inti_p2_address = soc_netsoc_sdram_phaseinjector2_address_storage; +assign soc_netsoc_sdram_inti_p2_bank = soc_netsoc_sdram_phaseinjector2_baddress_storage; +assign soc_netsoc_sdram_inti_p2_wrdata_en = (soc_netsoc_sdram_phaseinjector2_command_issue_re & soc_netsoc_sdram_phaseinjector2_command_storage[4]); +assign soc_netsoc_sdram_inti_p2_rddata_en = (soc_netsoc_sdram_phaseinjector2_command_issue_re & soc_netsoc_sdram_phaseinjector2_command_storage[5]); +assign soc_netsoc_sdram_inti_p2_wrdata = soc_netsoc_sdram_phaseinjector2_wrdata_storage; +assign soc_netsoc_sdram_inti_p2_wrdata_mask = 1'd0; +always @(*) begin + soc_netsoc_sdram_inti_p3_we_n <= 1'd1; + soc_netsoc_sdram_inti_p3_cas_n <= 1'd1; + soc_netsoc_sdram_inti_p3_cs_n <= 1'd1; + soc_netsoc_sdram_inti_p3_ras_n <= 1'd1; + if (soc_netsoc_sdram_phaseinjector3_command_issue_re) begin + soc_netsoc_sdram_inti_p3_cs_n <= {1{(~soc_netsoc_sdram_phaseinjector3_command_storage[0])}}; + soc_netsoc_sdram_inti_p3_we_n <= (~soc_netsoc_sdram_phaseinjector3_command_storage[1]); + soc_netsoc_sdram_inti_p3_cas_n <= (~soc_netsoc_sdram_phaseinjector3_command_storage[2]); + soc_netsoc_sdram_inti_p3_ras_n <= (~soc_netsoc_sdram_phaseinjector3_command_storage[3]); + end else begin + soc_netsoc_sdram_inti_p3_cs_n <= {1{1'd1}}; + soc_netsoc_sdram_inti_p3_we_n <= 1'd1; + soc_netsoc_sdram_inti_p3_cas_n <= 1'd1; + soc_netsoc_sdram_inti_p3_ras_n <= 1'd1; + end +end +assign soc_netsoc_sdram_inti_p3_address = soc_netsoc_sdram_phaseinjector3_address_storage; +assign soc_netsoc_sdram_inti_p3_bank = soc_netsoc_sdram_phaseinjector3_baddress_storage; +assign soc_netsoc_sdram_inti_p3_wrdata_en = (soc_netsoc_sdram_phaseinjector3_command_issue_re & soc_netsoc_sdram_phaseinjector3_command_storage[4]); +assign soc_netsoc_sdram_inti_p3_rddata_en = (soc_netsoc_sdram_phaseinjector3_command_issue_re & soc_netsoc_sdram_phaseinjector3_command_storage[5]); +assign soc_netsoc_sdram_inti_p3_wrdata = soc_netsoc_sdram_phaseinjector3_wrdata_storage; +assign soc_netsoc_sdram_inti_p3_wrdata_mask = 1'd0; +assign soc_netsoc_sdram_bankmachine0_req_valid = soc_netsoc_sdram_interface_bank0_valid; +assign soc_netsoc_sdram_interface_bank0_ready = soc_netsoc_sdram_bankmachine0_req_ready; +assign soc_netsoc_sdram_bankmachine0_req_we = soc_netsoc_sdram_interface_bank0_we; +assign soc_netsoc_sdram_bankmachine0_req_addr = soc_netsoc_sdram_interface_bank0_addr; +assign soc_netsoc_sdram_interface_bank0_lock = soc_netsoc_sdram_bankmachine0_req_lock; +assign soc_netsoc_sdram_interface_bank0_wdata_ready = soc_netsoc_sdram_bankmachine0_req_wdata_ready; +assign soc_netsoc_sdram_interface_bank0_rdata_valid = soc_netsoc_sdram_bankmachine0_req_rdata_valid; +assign soc_netsoc_sdram_bankmachine1_req_valid = soc_netsoc_sdram_interface_bank1_valid; +assign soc_netsoc_sdram_interface_bank1_ready = soc_netsoc_sdram_bankmachine1_req_ready; +assign soc_netsoc_sdram_bankmachine1_req_we = soc_netsoc_sdram_interface_bank1_we; +assign soc_netsoc_sdram_bankmachine1_req_addr = soc_netsoc_sdram_interface_bank1_addr; +assign soc_netsoc_sdram_interface_bank1_lock = soc_netsoc_sdram_bankmachine1_req_lock; +assign soc_netsoc_sdram_interface_bank1_wdata_ready = soc_netsoc_sdram_bankmachine1_req_wdata_ready; +assign soc_netsoc_sdram_interface_bank1_rdata_valid = soc_netsoc_sdram_bankmachine1_req_rdata_valid; +assign soc_netsoc_sdram_bankmachine2_req_valid = soc_netsoc_sdram_interface_bank2_valid; +assign soc_netsoc_sdram_interface_bank2_ready = soc_netsoc_sdram_bankmachine2_req_ready; +assign soc_netsoc_sdram_bankmachine2_req_we = soc_netsoc_sdram_interface_bank2_we; +assign soc_netsoc_sdram_bankmachine2_req_addr = soc_netsoc_sdram_interface_bank2_addr; +assign soc_netsoc_sdram_interface_bank2_lock = soc_netsoc_sdram_bankmachine2_req_lock; +assign soc_netsoc_sdram_interface_bank2_wdata_ready = soc_netsoc_sdram_bankmachine2_req_wdata_ready; +assign soc_netsoc_sdram_interface_bank2_rdata_valid = soc_netsoc_sdram_bankmachine2_req_rdata_valid; +assign soc_netsoc_sdram_bankmachine3_req_valid = soc_netsoc_sdram_interface_bank3_valid; +assign soc_netsoc_sdram_interface_bank3_ready = soc_netsoc_sdram_bankmachine3_req_ready; +assign soc_netsoc_sdram_bankmachine3_req_we = soc_netsoc_sdram_interface_bank3_we; +assign soc_netsoc_sdram_bankmachine3_req_addr = soc_netsoc_sdram_interface_bank3_addr; +assign soc_netsoc_sdram_interface_bank3_lock = soc_netsoc_sdram_bankmachine3_req_lock; +assign soc_netsoc_sdram_interface_bank3_wdata_ready = soc_netsoc_sdram_bankmachine3_req_wdata_ready; +assign soc_netsoc_sdram_interface_bank3_rdata_valid = soc_netsoc_sdram_bankmachine3_req_rdata_valid; +assign soc_netsoc_sdram_bankmachine4_req_valid = soc_netsoc_sdram_interface_bank4_valid; +assign soc_netsoc_sdram_interface_bank4_ready = soc_netsoc_sdram_bankmachine4_req_ready; +assign soc_netsoc_sdram_bankmachine4_req_we = soc_netsoc_sdram_interface_bank4_we; +assign soc_netsoc_sdram_bankmachine4_req_addr = soc_netsoc_sdram_interface_bank4_addr; +assign soc_netsoc_sdram_interface_bank4_lock = soc_netsoc_sdram_bankmachine4_req_lock; +assign soc_netsoc_sdram_interface_bank4_wdata_ready = soc_netsoc_sdram_bankmachine4_req_wdata_ready; +assign soc_netsoc_sdram_interface_bank4_rdata_valid = soc_netsoc_sdram_bankmachine4_req_rdata_valid; +assign soc_netsoc_sdram_bankmachine5_req_valid = soc_netsoc_sdram_interface_bank5_valid; +assign soc_netsoc_sdram_interface_bank5_ready = soc_netsoc_sdram_bankmachine5_req_ready; +assign soc_netsoc_sdram_bankmachine5_req_we = soc_netsoc_sdram_interface_bank5_we; +assign soc_netsoc_sdram_bankmachine5_req_addr = soc_netsoc_sdram_interface_bank5_addr; +assign soc_netsoc_sdram_interface_bank5_lock = soc_netsoc_sdram_bankmachine5_req_lock; +assign soc_netsoc_sdram_interface_bank5_wdata_ready = soc_netsoc_sdram_bankmachine5_req_wdata_ready; +assign soc_netsoc_sdram_interface_bank5_rdata_valid = soc_netsoc_sdram_bankmachine5_req_rdata_valid; +assign soc_netsoc_sdram_bankmachine6_req_valid = soc_netsoc_sdram_interface_bank6_valid; +assign soc_netsoc_sdram_interface_bank6_ready = soc_netsoc_sdram_bankmachine6_req_ready; +assign soc_netsoc_sdram_bankmachine6_req_we = soc_netsoc_sdram_interface_bank6_we; +assign soc_netsoc_sdram_bankmachine6_req_addr = soc_netsoc_sdram_interface_bank6_addr; +assign soc_netsoc_sdram_interface_bank6_lock = soc_netsoc_sdram_bankmachine6_req_lock; +assign soc_netsoc_sdram_interface_bank6_wdata_ready = soc_netsoc_sdram_bankmachine6_req_wdata_ready; +assign soc_netsoc_sdram_interface_bank6_rdata_valid = soc_netsoc_sdram_bankmachine6_req_rdata_valid; +assign soc_netsoc_sdram_bankmachine7_req_valid = soc_netsoc_sdram_interface_bank7_valid; +assign soc_netsoc_sdram_interface_bank7_ready = soc_netsoc_sdram_bankmachine7_req_ready; +assign soc_netsoc_sdram_bankmachine7_req_we = soc_netsoc_sdram_interface_bank7_we; +assign soc_netsoc_sdram_bankmachine7_req_addr = soc_netsoc_sdram_interface_bank7_addr; +assign soc_netsoc_sdram_interface_bank7_lock = soc_netsoc_sdram_bankmachine7_req_lock; +assign soc_netsoc_sdram_interface_bank7_wdata_ready = soc_netsoc_sdram_bankmachine7_req_wdata_ready; +assign soc_netsoc_sdram_interface_bank7_rdata_valid = soc_netsoc_sdram_bankmachine7_req_rdata_valid; +assign soc_netsoc_sdram_timer_wait = (~soc_netsoc_sdram_timer_done0); +assign soc_netsoc_sdram_postponer_req_i = soc_netsoc_sdram_timer_done0; +assign soc_netsoc_sdram_wants_refresh = soc_netsoc_sdram_postponer_req_o; +assign soc_netsoc_sdram_wants_zqcs = soc_netsoc_sdram_zqcs_timer_done0; +assign soc_netsoc_sdram_zqcs_timer_wait = (~soc_netsoc_sdram_zqcs_executer_done); +assign soc_netsoc_sdram_timer_done1 = (soc_netsoc_sdram_timer_count1 == 1'd0); +assign soc_netsoc_sdram_timer_done0 = soc_netsoc_sdram_timer_done1; +assign soc_netsoc_sdram_timer_count0 = soc_netsoc_sdram_timer_count1; +assign soc_netsoc_sdram_sequencer_start1 = (soc_netsoc_sdram_sequencer_start0 | (soc_netsoc_sdram_sequencer_count != 1'd0)); +assign soc_netsoc_sdram_sequencer_done0 = (soc_netsoc_sdram_sequencer_done1 & (soc_netsoc_sdram_sequencer_count == 1'd0)); +assign soc_netsoc_sdram_zqcs_timer_done1 = (soc_netsoc_sdram_zqcs_timer_count1 == 1'd0); +assign soc_netsoc_sdram_zqcs_timer_done0 = soc_netsoc_sdram_zqcs_timer_done1; +assign soc_netsoc_sdram_zqcs_timer_count0 = soc_netsoc_sdram_zqcs_timer_count1; +always @(*) begin + soc_netsoc_sdram_cmd_valid <= 1'd0; + soc_netsoc_sdram_zqcs_executer_start <= 1'd0; + soc_netsoc_sdram_cmd_last <= 1'd0; + soc_netsoc_sdram_sequencer_start0 <= 1'd0; + vns_refresher_next_state <= 2'd0; + vns_refresher_next_state <= vns_refresher_state; + case (vns_refresher_state) + 1'd1: begin + soc_netsoc_sdram_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_cmd_ready) begin + soc_netsoc_sdram_sequencer_start0 <= 1'd1; + vns_refresher_next_state <= 2'd2; + end + end + 2'd2: begin + soc_netsoc_sdram_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_sequencer_done0) begin + if (soc_netsoc_sdram_wants_zqcs) begin + soc_netsoc_sdram_zqcs_executer_start <= 1'd1; + vns_refresher_next_state <= 2'd3; + end else begin + soc_netsoc_sdram_cmd_valid <= 1'd0; + soc_netsoc_sdram_cmd_last <= 1'd1; + vns_refresher_next_state <= 1'd0; + end + end + end + 2'd3: begin + soc_netsoc_sdram_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_zqcs_executer_done) begin + soc_netsoc_sdram_cmd_valid <= 1'd0; + soc_netsoc_sdram_cmd_last <= 1'd1; + vns_refresher_next_state <= 1'd0; + end + end + default: begin + if (1'd1) begin + if (soc_netsoc_sdram_wants_refresh) begin + vns_refresher_next_state <= 1'd1; + end + end + end + endcase +end +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine0_req_valid; +assign soc_netsoc_sdram_bankmachine0_req_ready = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine0_req_we; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine0_req_addr; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_ready; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_first; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_last; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine0_req_wdata_ready | soc_netsoc_sdram_bankmachine0_req_rdata_valid); +assign soc_netsoc_sdram_bankmachine0_req_lock = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid); +assign soc_netsoc_sdram_bankmachine0_row_hit = (soc_netsoc_sdram_bankmachine0_row == soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]); +assign soc_netsoc_sdram_bankmachine0_cmd_payload_ba = 1'd0; +always @(*) begin + soc_netsoc_sdram_bankmachine0_cmd_payload_a <= 14'd0; + if (soc_netsoc_sdram_bankmachine0_row_col_n_addr_sel) begin + soc_netsoc_sdram_bankmachine0_cmd_payload_a <= soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; + end else begin + soc_netsoc_sdram_bankmachine0_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine0_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign soc_netsoc_sdram_bankmachine0_twtpcon_valid = ((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_ready) & soc_netsoc_sdram_bankmachine0_cmd_payload_is_write); +assign soc_netsoc_sdram_bankmachine0_trccon_valid = ((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_ready) & soc_netsoc_sdram_bankmachine0_row_open); +assign soc_netsoc_sdram_bankmachine0_trascon_valid = ((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_ready) & soc_netsoc_sdram_bankmachine0_row_open); +always @(*) begin + soc_netsoc_sdram_bankmachine0_auto_precharge <= 1'd0; + if ((soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid)) begin + if ((soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7])) begin + soc_netsoc_sdram_bankmachine0_auto_precharge <= (soc_netsoc_sdram_bankmachine0_row_close == 1'd0); + end + end +end +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din = {soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_first; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_last; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; +always @(*) begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace) begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce - 1'd1); + end else begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce; + end +end +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable | soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace)); +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable & soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re); +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level != 4'd8); +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level != 1'd0); +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine0_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n)); +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n); +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine0_cmd_buffer_first_n; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine0_cmd_buffer_last_n; +always @(*) begin + soc_netsoc_sdram_bankmachine0_req_wdata_ready <= 1'd0; + soc_netsoc_sdram_bankmachine0_row_open <= 1'd0; + soc_netsoc_sdram_bankmachine0_req_rdata_valid <= 1'd0; + soc_netsoc_sdram_bankmachine0_row_col_n_addr_sel <= 1'd0; + soc_netsoc_sdram_bankmachine0_refresh_gnt <= 1'd0; + soc_netsoc_sdram_bankmachine0_cmd_valid <= 1'd0; + soc_netsoc_sdram_bankmachine0_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_bankmachine0_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_bankmachine0_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd0; + vns_bankmachine0_next_state <= 3'd0; + soc_netsoc_sdram_bankmachine0_cmd_payload_is_read <= 1'd0; + soc_netsoc_sdram_bankmachine0_row_close <= 1'd0; + soc_netsoc_sdram_bankmachine0_cmd_payload_is_write <= 1'd0; + vns_bankmachine0_next_state <= vns_bankmachine0_state; + case (vns_bankmachine0_state) + 1'd1: begin + if ((soc_netsoc_sdram_bankmachine0_twtpcon_ready & soc_netsoc_sdram_bankmachine0_trascon_ready)) begin + soc_netsoc_sdram_bankmachine0_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine0_cmd_ready) begin + vns_bankmachine0_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine0_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_bankmachine0_cmd_payload_we <= 1'd1; + soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + end + soc_netsoc_sdram_bankmachine0_row_close <= 1'd1; + end + 2'd2: begin + if ((soc_netsoc_sdram_bankmachine0_twtpcon_ready & soc_netsoc_sdram_bankmachine0_trascon_ready)) begin + vns_bankmachine0_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine0_row_close <= 1'd1; + end + 2'd3: begin + if (soc_netsoc_sdram_bankmachine0_trccon_ready) begin + soc_netsoc_sdram_bankmachine0_row_col_n_addr_sel <= 1'd1; + soc_netsoc_sdram_bankmachine0_row_open <= 1'd1; + soc_netsoc_sdram_bankmachine0_cmd_valid <= 1'd1; + soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + if (soc_netsoc_sdram_bankmachine0_cmd_ready) begin + vns_bankmachine0_next_state <= 3'd6; + end + soc_netsoc_sdram_bankmachine0_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (soc_netsoc_sdram_bankmachine0_twtpcon_ready) begin + soc_netsoc_sdram_bankmachine0_refresh_gnt <= 1'd1; + end + soc_netsoc_sdram_bankmachine0_row_close <= 1'd1; + soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + if ((~soc_netsoc_sdram_bankmachine0_refresh_req)) begin + vns_bankmachine0_next_state <= 1'd0; + end + end + 3'd5: begin + vns_bankmachine0_next_state <= 2'd3; + end + 3'd6: begin + vns_bankmachine0_next_state <= 1'd0; + end + default: begin + if (soc_netsoc_sdram_bankmachine0_refresh_req) begin + vns_bankmachine0_next_state <= 3'd4; + end else begin + if (soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid) begin + if (soc_netsoc_sdram_bankmachine0_row_opened) begin + if (soc_netsoc_sdram_bankmachine0_row_hit) begin + soc_netsoc_sdram_bankmachine0_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_we) begin + soc_netsoc_sdram_bankmachine0_req_wdata_ready <= soc_netsoc_sdram_bankmachine0_cmd_ready; + soc_netsoc_sdram_bankmachine0_cmd_payload_is_write <= 1'd1; + soc_netsoc_sdram_bankmachine0_cmd_payload_we <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine0_req_rdata_valid <= soc_netsoc_sdram_bankmachine0_cmd_ready; + soc_netsoc_sdram_bankmachine0_cmd_payload_is_read <= 1'd1; + end + soc_netsoc_sdram_bankmachine0_cmd_payload_cas <= 1'd1; + if ((soc_netsoc_sdram_bankmachine0_cmd_ready & soc_netsoc_sdram_bankmachine0_auto_precharge)) begin + vns_bankmachine0_next_state <= 2'd2; + end + end else begin + vns_bankmachine0_next_state <= 1'd1; + end + end else begin + vns_bankmachine0_next_state <= 2'd3; + end + end + end + end + endcase +end +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine1_req_valid; +assign soc_netsoc_sdram_bankmachine1_req_ready = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine1_req_we; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine1_req_addr; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_ready; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_first; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_last; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine1_req_wdata_ready | soc_netsoc_sdram_bankmachine1_req_rdata_valid); +assign soc_netsoc_sdram_bankmachine1_req_lock = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid); +assign soc_netsoc_sdram_bankmachine1_row_hit = (soc_netsoc_sdram_bankmachine1_row == soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]); +assign soc_netsoc_sdram_bankmachine1_cmd_payload_ba = 1'd1; +always @(*) begin + soc_netsoc_sdram_bankmachine1_cmd_payload_a <= 14'd0; + if (soc_netsoc_sdram_bankmachine1_row_col_n_addr_sel) begin + soc_netsoc_sdram_bankmachine1_cmd_payload_a <= soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; + end else begin + soc_netsoc_sdram_bankmachine1_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine1_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign soc_netsoc_sdram_bankmachine1_twtpcon_valid = ((soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_ready) & soc_netsoc_sdram_bankmachine1_cmd_payload_is_write); +assign soc_netsoc_sdram_bankmachine1_trccon_valid = ((soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_ready) & soc_netsoc_sdram_bankmachine1_row_open); +assign soc_netsoc_sdram_bankmachine1_trascon_valid = ((soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_ready) & soc_netsoc_sdram_bankmachine1_row_open); +always @(*) begin + soc_netsoc_sdram_bankmachine1_auto_precharge <= 1'd0; + if ((soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid)) begin + if ((soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7])) begin + soc_netsoc_sdram_bankmachine1_auto_precharge <= (soc_netsoc_sdram_bankmachine1_row_close == 1'd0); + end + end +end +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din = {soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_first; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_last; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; +always @(*) begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace) begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce - 1'd1); + end else begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce; + end +end +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable | soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace)); +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable & soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re); +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level != 4'd8); +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level != 1'd0); +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine1_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n)); +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n); +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine1_cmd_buffer_first_n; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine1_cmd_buffer_last_n; +always @(*) begin + soc_netsoc_sdram_bankmachine1_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_bankmachine1_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_bankmachine1_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd0; + soc_netsoc_sdram_bankmachine1_row_open <= 1'd0; + soc_netsoc_sdram_bankmachine1_cmd_payload_is_read <= 1'd0; + soc_netsoc_sdram_bankmachine1_row_close <= 1'd0; + soc_netsoc_sdram_bankmachine1_cmd_payload_is_write <= 1'd0; + soc_netsoc_sdram_bankmachine1_req_wdata_ready <= 1'd0; + soc_netsoc_sdram_bankmachine1_req_rdata_valid <= 1'd0; + soc_netsoc_sdram_bankmachine1_row_col_n_addr_sel <= 1'd0; + soc_netsoc_sdram_bankmachine1_refresh_gnt <= 1'd0; + soc_netsoc_sdram_bankmachine1_cmd_valid <= 1'd0; + vns_bankmachine1_next_state <= 3'd0; + vns_bankmachine1_next_state <= vns_bankmachine1_state; + case (vns_bankmachine1_state) + 1'd1: begin + if ((soc_netsoc_sdram_bankmachine1_twtpcon_ready & soc_netsoc_sdram_bankmachine1_trascon_ready)) begin + soc_netsoc_sdram_bankmachine1_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine1_cmd_ready) begin + vns_bankmachine1_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine1_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_bankmachine1_cmd_payload_we <= 1'd1; + soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + end + soc_netsoc_sdram_bankmachine1_row_close <= 1'd1; + end + 2'd2: begin + if ((soc_netsoc_sdram_bankmachine1_twtpcon_ready & soc_netsoc_sdram_bankmachine1_trascon_ready)) begin + vns_bankmachine1_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine1_row_close <= 1'd1; + end + 2'd3: begin + if (soc_netsoc_sdram_bankmachine1_trccon_ready) begin + soc_netsoc_sdram_bankmachine1_row_col_n_addr_sel <= 1'd1; + soc_netsoc_sdram_bankmachine1_row_open <= 1'd1; + soc_netsoc_sdram_bankmachine1_cmd_valid <= 1'd1; + soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + if (soc_netsoc_sdram_bankmachine1_cmd_ready) begin + vns_bankmachine1_next_state <= 3'd6; + end + soc_netsoc_sdram_bankmachine1_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (soc_netsoc_sdram_bankmachine1_twtpcon_ready) begin + soc_netsoc_sdram_bankmachine1_refresh_gnt <= 1'd1; + end + soc_netsoc_sdram_bankmachine1_row_close <= 1'd1; + soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + if ((~soc_netsoc_sdram_bankmachine1_refresh_req)) begin + vns_bankmachine1_next_state <= 1'd0; + end + end + 3'd5: begin + vns_bankmachine1_next_state <= 2'd3; + end + 3'd6: begin + vns_bankmachine1_next_state <= 1'd0; + end + default: begin + if (soc_netsoc_sdram_bankmachine1_refresh_req) begin + vns_bankmachine1_next_state <= 3'd4; + end else begin + if (soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid) begin + if (soc_netsoc_sdram_bankmachine1_row_opened) begin + if (soc_netsoc_sdram_bankmachine1_row_hit) begin + soc_netsoc_sdram_bankmachine1_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_we) begin + soc_netsoc_sdram_bankmachine1_req_wdata_ready <= soc_netsoc_sdram_bankmachine1_cmd_ready; + soc_netsoc_sdram_bankmachine1_cmd_payload_is_write <= 1'd1; + soc_netsoc_sdram_bankmachine1_cmd_payload_we <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine1_req_rdata_valid <= soc_netsoc_sdram_bankmachine1_cmd_ready; + soc_netsoc_sdram_bankmachine1_cmd_payload_is_read <= 1'd1; + end + soc_netsoc_sdram_bankmachine1_cmd_payload_cas <= 1'd1; + if ((soc_netsoc_sdram_bankmachine1_cmd_ready & soc_netsoc_sdram_bankmachine1_auto_precharge)) begin + vns_bankmachine1_next_state <= 2'd2; + end + end else begin + vns_bankmachine1_next_state <= 1'd1; + end + end else begin + vns_bankmachine1_next_state <= 2'd3; + end + end + end + end + endcase +end +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine2_req_valid; +assign soc_netsoc_sdram_bankmachine2_req_ready = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine2_req_we; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine2_req_addr; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_ready; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_first; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_last; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine2_req_wdata_ready | soc_netsoc_sdram_bankmachine2_req_rdata_valid); +assign soc_netsoc_sdram_bankmachine2_req_lock = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid); +assign soc_netsoc_sdram_bankmachine2_row_hit = (soc_netsoc_sdram_bankmachine2_row == soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]); +assign soc_netsoc_sdram_bankmachine2_cmd_payload_ba = 2'd2; +always @(*) begin + soc_netsoc_sdram_bankmachine2_cmd_payload_a <= 14'd0; + if (soc_netsoc_sdram_bankmachine2_row_col_n_addr_sel) begin + soc_netsoc_sdram_bankmachine2_cmd_payload_a <= soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; + end else begin + soc_netsoc_sdram_bankmachine2_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine2_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign soc_netsoc_sdram_bankmachine2_twtpcon_valid = ((soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_ready) & soc_netsoc_sdram_bankmachine2_cmd_payload_is_write); +assign soc_netsoc_sdram_bankmachine2_trccon_valid = ((soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_ready) & soc_netsoc_sdram_bankmachine2_row_open); +assign soc_netsoc_sdram_bankmachine2_trascon_valid = ((soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_ready) & soc_netsoc_sdram_bankmachine2_row_open); +always @(*) begin + soc_netsoc_sdram_bankmachine2_auto_precharge <= 1'd0; + if ((soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid)) begin + if ((soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7])) begin + soc_netsoc_sdram_bankmachine2_auto_precharge <= (soc_netsoc_sdram_bankmachine2_row_close == 1'd0); + end + end +end +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din = {soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_first; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_last; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; +always @(*) begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace) begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce - 1'd1); + end else begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce; + end +end +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable | soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace)); +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable & soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re); +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level != 4'd8); +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level != 1'd0); +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine2_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n)); +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n); +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine2_cmd_buffer_first_n; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine2_cmd_buffer_last_n; +always @(*) begin + soc_netsoc_sdram_bankmachine2_cmd_valid <= 1'd0; + soc_netsoc_sdram_bankmachine2_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_bankmachine2_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_bankmachine2_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd0; + vns_bankmachine2_next_state <= 3'd0; + soc_netsoc_sdram_bankmachine2_cmd_payload_is_read <= 1'd0; + soc_netsoc_sdram_bankmachine2_row_close <= 1'd0; + soc_netsoc_sdram_bankmachine2_cmd_payload_is_write <= 1'd0; + soc_netsoc_sdram_bankmachine2_row_open <= 1'd0; + soc_netsoc_sdram_bankmachine2_req_wdata_ready <= 1'd0; + soc_netsoc_sdram_bankmachine2_req_rdata_valid <= 1'd0; + soc_netsoc_sdram_bankmachine2_row_col_n_addr_sel <= 1'd0; + soc_netsoc_sdram_bankmachine2_refresh_gnt <= 1'd0; + vns_bankmachine2_next_state <= vns_bankmachine2_state; + case (vns_bankmachine2_state) + 1'd1: begin + if ((soc_netsoc_sdram_bankmachine2_twtpcon_ready & soc_netsoc_sdram_bankmachine2_trascon_ready)) begin + soc_netsoc_sdram_bankmachine2_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine2_cmd_ready) begin + vns_bankmachine2_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine2_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_bankmachine2_cmd_payload_we <= 1'd1; + soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + end + soc_netsoc_sdram_bankmachine2_row_close <= 1'd1; + end + 2'd2: begin + if ((soc_netsoc_sdram_bankmachine2_twtpcon_ready & soc_netsoc_sdram_bankmachine2_trascon_ready)) begin + vns_bankmachine2_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine2_row_close <= 1'd1; + end + 2'd3: begin + if (soc_netsoc_sdram_bankmachine2_trccon_ready) begin + soc_netsoc_sdram_bankmachine2_row_col_n_addr_sel <= 1'd1; + soc_netsoc_sdram_bankmachine2_row_open <= 1'd1; + soc_netsoc_sdram_bankmachine2_cmd_valid <= 1'd1; + soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + if (soc_netsoc_sdram_bankmachine2_cmd_ready) begin + vns_bankmachine2_next_state <= 3'd6; + end + soc_netsoc_sdram_bankmachine2_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (soc_netsoc_sdram_bankmachine2_twtpcon_ready) begin + soc_netsoc_sdram_bankmachine2_refresh_gnt <= 1'd1; + end + soc_netsoc_sdram_bankmachine2_row_close <= 1'd1; + soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + if ((~soc_netsoc_sdram_bankmachine2_refresh_req)) begin + vns_bankmachine2_next_state <= 1'd0; + end + end + 3'd5: begin + vns_bankmachine2_next_state <= 2'd3; + end + 3'd6: begin + vns_bankmachine2_next_state <= 1'd0; + end + default: begin + if (soc_netsoc_sdram_bankmachine2_refresh_req) begin + vns_bankmachine2_next_state <= 3'd4; + end else begin + if (soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid) begin + if (soc_netsoc_sdram_bankmachine2_row_opened) begin + if (soc_netsoc_sdram_bankmachine2_row_hit) begin + soc_netsoc_sdram_bankmachine2_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_we) begin + soc_netsoc_sdram_bankmachine2_req_wdata_ready <= soc_netsoc_sdram_bankmachine2_cmd_ready; + soc_netsoc_sdram_bankmachine2_cmd_payload_is_write <= 1'd1; + soc_netsoc_sdram_bankmachine2_cmd_payload_we <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine2_req_rdata_valid <= soc_netsoc_sdram_bankmachine2_cmd_ready; + soc_netsoc_sdram_bankmachine2_cmd_payload_is_read <= 1'd1; + end + soc_netsoc_sdram_bankmachine2_cmd_payload_cas <= 1'd1; + if ((soc_netsoc_sdram_bankmachine2_cmd_ready & soc_netsoc_sdram_bankmachine2_auto_precharge)) begin + vns_bankmachine2_next_state <= 2'd2; + end + end else begin + vns_bankmachine2_next_state <= 1'd1; + end + end else begin + vns_bankmachine2_next_state <= 2'd3; + end + end + end + end + endcase +end +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine3_req_valid; +assign soc_netsoc_sdram_bankmachine3_req_ready = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine3_req_we; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine3_req_addr; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_ready; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_first; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_last; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine3_req_wdata_ready | soc_netsoc_sdram_bankmachine3_req_rdata_valid); +assign soc_netsoc_sdram_bankmachine3_req_lock = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid); +assign soc_netsoc_sdram_bankmachine3_row_hit = (soc_netsoc_sdram_bankmachine3_row == soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]); +assign soc_netsoc_sdram_bankmachine3_cmd_payload_ba = 2'd3; +always @(*) begin + soc_netsoc_sdram_bankmachine3_cmd_payload_a <= 14'd0; + if (soc_netsoc_sdram_bankmachine3_row_col_n_addr_sel) begin + soc_netsoc_sdram_bankmachine3_cmd_payload_a <= soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; + end else begin + soc_netsoc_sdram_bankmachine3_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine3_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign soc_netsoc_sdram_bankmachine3_twtpcon_valid = ((soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_ready) & soc_netsoc_sdram_bankmachine3_cmd_payload_is_write); +assign soc_netsoc_sdram_bankmachine3_trccon_valid = ((soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_ready) & soc_netsoc_sdram_bankmachine3_row_open); +assign soc_netsoc_sdram_bankmachine3_trascon_valid = ((soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_ready) & soc_netsoc_sdram_bankmachine3_row_open); +always @(*) begin + soc_netsoc_sdram_bankmachine3_auto_precharge <= 1'd0; + if ((soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid)) begin + if ((soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7])) begin + soc_netsoc_sdram_bankmachine3_auto_precharge <= (soc_netsoc_sdram_bankmachine3_row_close == 1'd0); + end + end +end +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din = {soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_first; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_last; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; +always @(*) begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace) begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce - 1'd1); + end else begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce; + end +end +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable | soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace)); +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable & soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re); +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level != 4'd8); +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level != 1'd0); +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine3_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n)); +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n); +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine3_cmd_buffer_first_n; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine3_cmd_buffer_last_n; +always @(*) begin + soc_netsoc_sdram_bankmachine3_row_open <= 1'd0; + soc_netsoc_sdram_bankmachine3_cmd_payload_is_read <= 1'd0; + soc_netsoc_sdram_bankmachine3_row_close <= 1'd0; + soc_netsoc_sdram_bankmachine3_cmd_payload_is_write <= 1'd0; + soc_netsoc_sdram_bankmachine3_req_wdata_ready <= 1'd0; + soc_netsoc_sdram_bankmachine3_req_rdata_valid <= 1'd0; + soc_netsoc_sdram_bankmachine3_row_col_n_addr_sel <= 1'd0; + soc_netsoc_sdram_bankmachine3_refresh_gnt <= 1'd0; + soc_netsoc_sdram_bankmachine3_cmd_valid <= 1'd0; + vns_bankmachine3_next_state <= 3'd0; + soc_netsoc_sdram_bankmachine3_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_bankmachine3_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_bankmachine3_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd0; + vns_bankmachine3_next_state <= vns_bankmachine3_state; + case (vns_bankmachine3_state) + 1'd1: begin + if ((soc_netsoc_sdram_bankmachine3_twtpcon_ready & soc_netsoc_sdram_bankmachine3_trascon_ready)) begin + soc_netsoc_sdram_bankmachine3_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine3_cmd_ready) begin + vns_bankmachine3_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine3_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_bankmachine3_cmd_payload_we <= 1'd1; + soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + end + soc_netsoc_sdram_bankmachine3_row_close <= 1'd1; + end + 2'd2: begin + if ((soc_netsoc_sdram_bankmachine3_twtpcon_ready & soc_netsoc_sdram_bankmachine3_trascon_ready)) begin + vns_bankmachine3_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine3_row_close <= 1'd1; + end + 2'd3: begin + if (soc_netsoc_sdram_bankmachine3_trccon_ready) begin + soc_netsoc_sdram_bankmachine3_row_col_n_addr_sel <= 1'd1; + soc_netsoc_sdram_bankmachine3_row_open <= 1'd1; + soc_netsoc_sdram_bankmachine3_cmd_valid <= 1'd1; + soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + if (soc_netsoc_sdram_bankmachine3_cmd_ready) begin + vns_bankmachine3_next_state <= 3'd6; + end + soc_netsoc_sdram_bankmachine3_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (soc_netsoc_sdram_bankmachine3_twtpcon_ready) begin + soc_netsoc_sdram_bankmachine3_refresh_gnt <= 1'd1; + end + soc_netsoc_sdram_bankmachine3_row_close <= 1'd1; + soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + if ((~soc_netsoc_sdram_bankmachine3_refresh_req)) begin + vns_bankmachine3_next_state <= 1'd0; + end + end + 3'd5: begin + vns_bankmachine3_next_state <= 2'd3; + end + 3'd6: begin + vns_bankmachine3_next_state <= 1'd0; + end + default: begin + if (soc_netsoc_sdram_bankmachine3_refresh_req) begin + vns_bankmachine3_next_state <= 3'd4; + end else begin + if (soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid) begin + if (soc_netsoc_sdram_bankmachine3_row_opened) begin + if (soc_netsoc_sdram_bankmachine3_row_hit) begin + soc_netsoc_sdram_bankmachine3_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_we) begin + soc_netsoc_sdram_bankmachine3_req_wdata_ready <= soc_netsoc_sdram_bankmachine3_cmd_ready; + soc_netsoc_sdram_bankmachine3_cmd_payload_is_write <= 1'd1; + soc_netsoc_sdram_bankmachine3_cmd_payload_we <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine3_req_rdata_valid <= soc_netsoc_sdram_bankmachine3_cmd_ready; + soc_netsoc_sdram_bankmachine3_cmd_payload_is_read <= 1'd1; + end + soc_netsoc_sdram_bankmachine3_cmd_payload_cas <= 1'd1; + if ((soc_netsoc_sdram_bankmachine3_cmd_ready & soc_netsoc_sdram_bankmachine3_auto_precharge)) begin + vns_bankmachine3_next_state <= 2'd2; + end + end else begin + vns_bankmachine3_next_state <= 1'd1; + end + end else begin + vns_bankmachine3_next_state <= 2'd3; + end + end + end + end + endcase +end +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine4_req_valid; +assign soc_netsoc_sdram_bankmachine4_req_ready = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine4_req_we; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine4_req_addr; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_ready; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_first; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_last; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine4_req_wdata_ready | soc_netsoc_sdram_bankmachine4_req_rdata_valid); +assign soc_netsoc_sdram_bankmachine4_req_lock = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid); +assign soc_netsoc_sdram_bankmachine4_row_hit = (soc_netsoc_sdram_bankmachine4_row == soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]); +assign soc_netsoc_sdram_bankmachine4_cmd_payload_ba = 3'd4; +always @(*) begin + soc_netsoc_sdram_bankmachine4_cmd_payload_a <= 14'd0; + if (soc_netsoc_sdram_bankmachine4_row_col_n_addr_sel) begin + soc_netsoc_sdram_bankmachine4_cmd_payload_a <= soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; + end else begin + soc_netsoc_sdram_bankmachine4_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine4_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign soc_netsoc_sdram_bankmachine4_twtpcon_valid = ((soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_ready) & soc_netsoc_sdram_bankmachine4_cmd_payload_is_write); +assign soc_netsoc_sdram_bankmachine4_trccon_valid = ((soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_ready) & soc_netsoc_sdram_bankmachine4_row_open); +assign soc_netsoc_sdram_bankmachine4_trascon_valid = ((soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_ready) & soc_netsoc_sdram_bankmachine4_row_open); +always @(*) begin + soc_netsoc_sdram_bankmachine4_auto_precharge <= 1'd0; + if ((soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid)) begin + if ((soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7])) begin + soc_netsoc_sdram_bankmachine4_auto_precharge <= (soc_netsoc_sdram_bankmachine4_row_close == 1'd0); + end + end +end +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din = {soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_first; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_last; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; +always @(*) begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace) begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce - 1'd1); + end else begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce; + end +end +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable | soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace)); +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable & soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re); +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level != 4'd8); +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level != 1'd0); +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine4_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n)); +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n); +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine4_cmd_buffer_first_n; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine4_cmd_buffer_last_n; +always @(*) begin + soc_netsoc_sdram_bankmachine4_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_bankmachine4_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_bankmachine4_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd0; + vns_bankmachine4_next_state <= 3'd0; + soc_netsoc_sdram_bankmachine4_cmd_payload_is_read <= 1'd0; + soc_netsoc_sdram_bankmachine4_row_close <= 1'd0; + soc_netsoc_sdram_bankmachine4_cmd_payload_is_write <= 1'd0; + soc_netsoc_sdram_bankmachine4_row_open <= 1'd0; + soc_netsoc_sdram_bankmachine4_req_wdata_ready <= 1'd0; + soc_netsoc_sdram_bankmachine4_req_rdata_valid <= 1'd0; + soc_netsoc_sdram_bankmachine4_row_col_n_addr_sel <= 1'd0; + soc_netsoc_sdram_bankmachine4_refresh_gnt <= 1'd0; + soc_netsoc_sdram_bankmachine4_cmd_valid <= 1'd0; + vns_bankmachine4_next_state <= vns_bankmachine4_state; + case (vns_bankmachine4_state) + 1'd1: begin + if ((soc_netsoc_sdram_bankmachine4_twtpcon_ready & soc_netsoc_sdram_bankmachine4_trascon_ready)) begin + soc_netsoc_sdram_bankmachine4_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine4_cmd_ready) begin + vns_bankmachine4_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine4_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_bankmachine4_cmd_payload_we <= 1'd1; + soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + end + soc_netsoc_sdram_bankmachine4_row_close <= 1'd1; + end + 2'd2: begin + if ((soc_netsoc_sdram_bankmachine4_twtpcon_ready & soc_netsoc_sdram_bankmachine4_trascon_ready)) begin + vns_bankmachine4_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine4_row_close <= 1'd1; + end + 2'd3: begin + if (soc_netsoc_sdram_bankmachine4_trccon_ready) begin + soc_netsoc_sdram_bankmachine4_row_col_n_addr_sel <= 1'd1; + soc_netsoc_sdram_bankmachine4_row_open <= 1'd1; + soc_netsoc_sdram_bankmachine4_cmd_valid <= 1'd1; + soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + if (soc_netsoc_sdram_bankmachine4_cmd_ready) begin + vns_bankmachine4_next_state <= 3'd6; + end + soc_netsoc_sdram_bankmachine4_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (soc_netsoc_sdram_bankmachine4_twtpcon_ready) begin + soc_netsoc_sdram_bankmachine4_refresh_gnt <= 1'd1; + end + soc_netsoc_sdram_bankmachine4_row_close <= 1'd1; + soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + if ((~soc_netsoc_sdram_bankmachine4_refresh_req)) begin + vns_bankmachine4_next_state <= 1'd0; + end + end + 3'd5: begin + vns_bankmachine4_next_state <= 2'd3; + end + 3'd6: begin + vns_bankmachine4_next_state <= 1'd0; + end + default: begin + if (soc_netsoc_sdram_bankmachine4_refresh_req) begin + vns_bankmachine4_next_state <= 3'd4; + end else begin + if (soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid) begin + if (soc_netsoc_sdram_bankmachine4_row_opened) begin + if (soc_netsoc_sdram_bankmachine4_row_hit) begin + soc_netsoc_sdram_bankmachine4_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_we) begin + soc_netsoc_sdram_bankmachine4_req_wdata_ready <= soc_netsoc_sdram_bankmachine4_cmd_ready; + soc_netsoc_sdram_bankmachine4_cmd_payload_is_write <= 1'd1; + soc_netsoc_sdram_bankmachine4_cmd_payload_we <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine4_req_rdata_valid <= soc_netsoc_sdram_bankmachine4_cmd_ready; + soc_netsoc_sdram_bankmachine4_cmd_payload_is_read <= 1'd1; + end + soc_netsoc_sdram_bankmachine4_cmd_payload_cas <= 1'd1; + if ((soc_netsoc_sdram_bankmachine4_cmd_ready & soc_netsoc_sdram_bankmachine4_auto_precharge)) begin + vns_bankmachine4_next_state <= 2'd2; + end + end else begin + vns_bankmachine4_next_state <= 1'd1; + end + end else begin + vns_bankmachine4_next_state <= 2'd3; + end + end + end + end + endcase +end +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine5_req_valid; +assign soc_netsoc_sdram_bankmachine5_req_ready = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine5_req_we; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine5_req_addr; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_ready; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_first; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_last; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine5_req_wdata_ready | soc_netsoc_sdram_bankmachine5_req_rdata_valid); +assign soc_netsoc_sdram_bankmachine5_req_lock = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid); +assign soc_netsoc_sdram_bankmachine5_row_hit = (soc_netsoc_sdram_bankmachine5_row == soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]); +assign soc_netsoc_sdram_bankmachine5_cmd_payload_ba = 3'd5; +always @(*) begin + soc_netsoc_sdram_bankmachine5_cmd_payload_a <= 14'd0; + if (soc_netsoc_sdram_bankmachine5_row_col_n_addr_sel) begin + soc_netsoc_sdram_bankmachine5_cmd_payload_a <= soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; + end else begin + soc_netsoc_sdram_bankmachine5_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine5_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign soc_netsoc_sdram_bankmachine5_twtpcon_valid = ((soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_ready) & soc_netsoc_sdram_bankmachine5_cmd_payload_is_write); +assign soc_netsoc_sdram_bankmachine5_trccon_valid = ((soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_ready) & soc_netsoc_sdram_bankmachine5_row_open); +assign soc_netsoc_sdram_bankmachine5_trascon_valid = ((soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_ready) & soc_netsoc_sdram_bankmachine5_row_open); +always @(*) begin + soc_netsoc_sdram_bankmachine5_auto_precharge <= 1'd0; + if ((soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid)) begin + if ((soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7])) begin + soc_netsoc_sdram_bankmachine5_auto_precharge <= (soc_netsoc_sdram_bankmachine5_row_close == 1'd0); + end + end +end +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din = {soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_first; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_last; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; +always @(*) begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace) begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce - 1'd1); + end else begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce; + end +end +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable | soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace)); +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable & soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re); +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level != 4'd8); +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level != 1'd0); +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine5_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n)); +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n); +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine5_cmd_buffer_first_n; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine5_cmd_buffer_last_n; +always @(*) begin + soc_netsoc_sdram_bankmachine5_row_col_n_addr_sel <= 1'd0; + soc_netsoc_sdram_bankmachine5_refresh_gnt <= 1'd0; + soc_netsoc_sdram_bankmachine5_cmd_valid <= 1'd0; + vns_bankmachine5_next_state <= 3'd0; + soc_netsoc_sdram_bankmachine5_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_bankmachine5_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_bankmachine5_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd0; + soc_netsoc_sdram_bankmachine5_row_open <= 1'd0; + soc_netsoc_sdram_bankmachine5_cmd_payload_is_read <= 1'd0; + soc_netsoc_sdram_bankmachine5_row_close <= 1'd0; + soc_netsoc_sdram_bankmachine5_cmd_payload_is_write <= 1'd0; + soc_netsoc_sdram_bankmachine5_req_wdata_ready <= 1'd0; + soc_netsoc_sdram_bankmachine5_req_rdata_valid <= 1'd0; + vns_bankmachine5_next_state <= vns_bankmachine5_state; + case (vns_bankmachine5_state) + 1'd1: begin + if ((soc_netsoc_sdram_bankmachine5_twtpcon_ready & soc_netsoc_sdram_bankmachine5_trascon_ready)) begin + soc_netsoc_sdram_bankmachine5_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine5_cmd_ready) begin + vns_bankmachine5_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine5_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_bankmachine5_cmd_payload_we <= 1'd1; + soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + end + soc_netsoc_sdram_bankmachine5_row_close <= 1'd1; + end + 2'd2: begin + if ((soc_netsoc_sdram_bankmachine5_twtpcon_ready & soc_netsoc_sdram_bankmachine5_trascon_ready)) begin + vns_bankmachine5_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine5_row_close <= 1'd1; + end + 2'd3: begin + if (soc_netsoc_sdram_bankmachine5_trccon_ready) begin + soc_netsoc_sdram_bankmachine5_row_col_n_addr_sel <= 1'd1; + soc_netsoc_sdram_bankmachine5_row_open <= 1'd1; + soc_netsoc_sdram_bankmachine5_cmd_valid <= 1'd1; + soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + if (soc_netsoc_sdram_bankmachine5_cmd_ready) begin + vns_bankmachine5_next_state <= 3'd6; + end + soc_netsoc_sdram_bankmachine5_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (soc_netsoc_sdram_bankmachine5_twtpcon_ready) begin + soc_netsoc_sdram_bankmachine5_refresh_gnt <= 1'd1; + end + soc_netsoc_sdram_bankmachine5_row_close <= 1'd1; + soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + if ((~soc_netsoc_sdram_bankmachine5_refresh_req)) begin + vns_bankmachine5_next_state <= 1'd0; + end + end + 3'd5: begin + vns_bankmachine5_next_state <= 2'd3; + end + 3'd6: begin + vns_bankmachine5_next_state <= 1'd0; + end + default: begin + if (soc_netsoc_sdram_bankmachine5_refresh_req) begin + vns_bankmachine5_next_state <= 3'd4; + end else begin + if (soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid) begin + if (soc_netsoc_sdram_bankmachine5_row_opened) begin + if (soc_netsoc_sdram_bankmachine5_row_hit) begin + soc_netsoc_sdram_bankmachine5_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_we) begin + soc_netsoc_sdram_bankmachine5_req_wdata_ready <= soc_netsoc_sdram_bankmachine5_cmd_ready; + soc_netsoc_sdram_bankmachine5_cmd_payload_is_write <= 1'd1; + soc_netsoc_sdram_bankmachine5_cmd_payload_we <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine5_req_rdata_valid <= soc_netsoc_sdram_bankmachine5_cmd_ready; + soc_netsoc_sdram_bankmachine5_cmd_payload_is_read <= 1'd1; + end + soc_netsoc_sdram_bankmachine5_cmd_payload_cas <= 1'd1; + if ((soc_netsoc_sdram_bankmachine5_cmd_ready & soc_netsoc_sdram_bankmachine5_auto_precharge)) begin + vns_bankmachine5_next_state <= 2'd2; + end + end else begin + vns_bankmachine5_next_state <= 1'd1; + end + end else begin + vns_bankmachine5_next_state <= 2'd3; + end + end + end + end + endcase +end +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine6_req_valid; +assign soc_netsoc_sdram_bankmachine6_req_ready = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine6_req_we; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine6_req_addr; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_ready; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_first; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_last; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine6_req_wdata_ready | soc_netsoc_sdram_bankmachine6_req_rdata_valid); +assign soc_netsoc_sdram_bankmachine6_req_lock = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid); +assign soc_netsoc_sdram_bankmachine6_row_hit = (soc_netsoc_sdram_bankmachine6_row == soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]); +assign soc_netsoc_sdram_bankmachine6_cmd_payload_ba = 3'd6; +always @(*) begin + soc_netsoc_sdram_bankmachine6_cmd_payload_a <= 14'd0; + if (soc_netsoc_sdram_bankmachine6_row_col_n_addr_sel) begin + soc_netsoc_sdram_bankmachine6_cmd_payload_a <= soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; + end else begin + soc_netsoc_sdram_bankmachine6_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine6_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign soc_netsoc_sdram_bankmachine6_twtpcon_valid = ((soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_ready) & soc_netsoc_sdram_bankmachine6_cmd_payload_is_write); +assign soc_netsoc_sdram_bankmachine6_trccon_valid = ((soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_ready) & soc_netsoc_sdram_bankmachine6_row_open); +assign soc_netsoc_sdram_bankmachine6_trascon_valid = ((soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_ready) & soc_netsoc_sdram_bankmachine6_row_open); +always @(*) begin + soc_netsoc_sdram_bankmachine6_auto_precharge <= 1'd0; + if ((soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid)) begin + if ((soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7])) begin + soc_netsoc_sdram_bankmachine6_auto_precharge <= (soc_netsoc_sdram_bankmachine6_row_close == 1'd0); + end + end +end +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din = {soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_first; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_last; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; +always @(*) begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace) begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce - 1'd1); + end else begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce; + end +end +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable | soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace)); +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable & soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re); +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level != 4'd8); +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level != 1'd0); +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine6_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n)); +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n); +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine6_cmd_buffer_first_n; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine6_cmd_buffer_last_n; +always @(*) begin + soc_netsoc_sdram_bankmachine6_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd0; + vns_bankmachine6_next_state <= 3'd0; + soc_netsoc_sdram_bankmachine6_cmd_payload_is_read <= 1'd0; + soc_netsoc_sdram_bankmachine6_row_close <= 1'd0; + soc_netsoc_sdram_bankmachine6_cmd_payload_is_write <= 1'd0; + soc_netsoc_sdram_bankmachine6_row_open <= 1'd0; + soc_netsoc_sdram_bankmachine6_req_wdata_ready <= 1'd0; + soc_netsoc_sdram_bankmachine6_req_rdata_valid <= 1'd0; + soc_netsoc_sdram_bankmachine6_row_col_n_addr_sel <= 1'd0; + soc_netsoc_sdram_bankmachine6_refresh_gnt <= 1'd0; + soc_netsoc_sdram_bankmachine6_cmd_valid <= 1'd0; + soc_netsoc_sdram_bankmachine6_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_bankmachine6_cmd_payload_ras <= 1'd0; + vns_bankmachine6_next_state <= vns_bankmachine6_state; + case (vns_bankmachine6_state) + 1'd1: begin + if ((soc_netsoc_sdram_bankmachine6_twtpcon_ready & soc_netsoc_sdram_bankmachine6_trascon_ready)) begin + soc_netsoc_sdram_bankmachine6_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine6_cmd_ready) begin + vns_bankmachine6_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine6_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_bankmachine6_cmd_payload_we <= 1'd1; + soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + end + soc_netsoc_sdram_bankmachine6_row_close <= 1'd1; + end + 2'd2: begin + if ((soc_netsoc_sdram_bankmachine6_twtpcon_ready & soc_netsoc_sdram_bankmachine6_trascon_ready)) begin + vns_bankmachine6_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine6_row_close <= 1'd1; + end + 2'd3: begin + if (soc_netsoc_sdram_bankmachine6_trccon_ready) begin + soc_netsoc_sdram_bankmachine6_row_col_n_addr_sel <= 1'd1; + soc_netsoc_sdram_bankmachine6_row_open <= 1'd1; + soc_netsoc_sdram_bankmachine6_cmd_valid <= 1'd1; + soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + if (soc_netsoc_sdram_bankmachine6_cmd_ready) begin + vns_bankmachine6_next_state <= 3'd6; + end + soc_netsoc_sdram_bankmachine6_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (soc_netsoc_sdram_bankmachine6_twtpcon_ready) begin + soc_netsoc_sdram_bankmachine6_refresh_gnt <= 1'd1; + end + soc_netsoc_sdram_bankmachine6_row_close <= 1'd1; + soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + if ((~soc_netsoc_sdram_bankmachine6_refresh_req)) begin + vns_bankmachine6_next_state <= 1'd0; + end + end + 3'd5: begin + vns_bankmachine6_next_state <= 2'd3; + end + 3'd6: begin + vns_bankmachine6_next_state <= 1'd0; + end + default: begin + if (soc_netsoc_sdram_bankmachine6_refresh_req) begin + vns_bankmachine6_next_state <= 3'd4; + end else begin + if (soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid) begin + if (soc_netsoc_sdram_bankmachine6_row_opened) begin + if (soc_netsoc_sdram_bankmachine6_row_hit) begin + soc_netsoc_sdram_bankmachine6_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_we) begin + soc_netsoc_sdram_bankmachine6_req_wdata_ready <= soc_netsoc_sdram_bankmachine6_cmd_ready; + soc_netsoc_sdram_bankmachine6_cmd_payload_is_write <= 1'd1; + soc_netsoc_sdram_bankmachine6_cmd_payload_we <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine6_req_rdata_valid <= soc_netsoc_sdram_bankmachine6_cmd_ready; + soc_netsoc_sdram_bankmachine6_cmd_payload_is_read <= 1'd1; + end + soc_netsoc_sdram_bankmachine6_cmd_payload_cas <= 1'd1; + if ((soc_netsoc_sdram_bankmachine6_cmd_ready & soc_netsoc_sdram_bankmachine6_auto_precharge)) begin + vns_bankmachine6_next_state <= 2'd2; + end + end else begin + vns_bankmachine6_next_state <= 1'd1; + end + end else begin + vns_bankmachine6_next_state <= 2'd3; + end + end + end + end + endcase +end +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine7_req_valid; +assign soc_netsoc_sdram_bankmachine7_req_ready = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine7_req_we; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine7_req_addr; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_ready; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_first; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_last; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine7_req_wdata_ready | soc_netsoc_sdram_bankmachine7_req_rdata_valid); +assign soc_netsoc_sdram_bankmachine7_req_lock = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid); +assign soc_netsoc_sdram_bankmachine7_row_hit = (soc_netsoc_sdram_bankmachine7_row == soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]); +assign soc_netsoc_sdram_bankmachine7_cmd_payload_ba = 3'd7; +always @(*) begin + soc_netsoc_sdram_bankmachine7_cmd_payload_a <= 14'd0; + if (soc_netsoc_sdram_bankmachine7_row_col_n_addr_sel) begin + soc_netsoc_sdram_bankmachine7_cmd_payload_a <= soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; + end else begin + soc_netsoc_sdram_bankmachine7_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine7_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); + end +end +assign soc_netsoc_sdram_bankmachine7_twtpcon_valid = ((soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_ready) & soc_netsoc_sdram_bankmachine7_cmd_payload_is_write); +assign soc_netsoc_sdram_bankmachine7_trccon_valid = ((soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_ready) & soc_netsoc_sdram_bankmachine7_row_open); +assign soc_netsoc_sdram_bankmachine7_trascon_valid = ((soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_ready) & soc_netsoc_sdram_bankmachine7_row_open); +always @(*) begin + soc_netsoc_sdram_bankmachine7_auto_precharge <= 1'd0; + if ((soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid)) begin + if ((soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7])) begin + soc_netsoc_sdram_bankmachine7_auto_precharge <= (soc_netsoc_sdram_bankmachine7_row_close == 1'd0); + end + end +end +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din = {soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we}; +assign {soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_first; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_last; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; +always @(*) begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace) begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce - 1'd1); + end else begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce; + end +end +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable | soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace)); +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable & soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re); +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level != 4'd8); +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level != 1'd0); +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine7_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n)); +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n); +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine7_cmd_buffer_first_n; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine7_cmd_buffer_last_n; +always @(*) begin + vns_bankmachine7_next_state <= 3'd0; + soc_netsoc_sdram_bankmachine7_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_bankmachine7_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_bankmachine7_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd0; + soc_netsoc_sdram_bankmachine7_row_open <= 1'd0; + soc_netsoc_sdram_bankmachine7_cmd_payload_is_read <= 1'd0; + soc_netsoc_sdram_bankmachine7_row_close <= 1'd0; + soc_netsoc_sdram_bankmachine7_cmd_payload_is_write <= 1'd0; + soc_netsoc_sdram_bankmachine7_req_wdata_ready <= 1'd0; + soc_netsoc_sdram_bankmachine7_req_rdata_valid <= 1'd0; + soc_netsoc_sdram_bankmachine7_row_col_n_addr_sel <= 1'd0; + soc_netsoc_sdram_bankmachine7_refresh_gnt <= 1'd0; + soc_netsoc_sdram_bankmachine7_cmd_valid <= 1'd0; + vns_bankmachine7_next_state <= vns_bankmachine7_state; + case (vns_bankmachine7_state) + 1'd1: begin + if ((soc_netsoc_sdram_bankmachine7_twtpcon_ready & soc_netsoc_sdram_bankmachine7_trascon_ready)) begin + soc_netsoc_sdram_bankmachine7_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine7_cmd_ready) begin + vns_bankmachine7_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine7_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_bankmachine7_cmd_payload_we <= 1'd1; + soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + end + soc_netsoc_sdram_bankmachine7_row_close <= 1'd1; + end + 2'd2: begin + if ((soc_netsoc_sdram_bankmachine7_twtpcon_ready & soc_netsoc_sdram_bankmachine7_trascon_ready)) begin + vns_bankmachine7_next_state <= 3'd5; + end + soc_netsoc_sdram_bankmachine7_row_close <= 1'd1; + end + 2'd3: begin + if (soc_netsoc_sdram_bankmachine7_trccon_ready) begin + soc_netsoc_sdram_bankmachine7_row_col_n_addr_sel <= 1'd1; + soc_netsoc_sdram_bankmachine7_row_open <= 1'd1; + soc_netsoc_sdram_bankmachine7_cmd_valid <= 1'd1; + soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + if (soc_netsoc_sdram_bankmachine7_cmd_ready) begin + vns_bankmachine7_next_state <= 3'd6; + end + soc_netsoc_sdram_bankmachine7_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (soc_netsoc_sdram_bankmachine7_twtpcon_ready) begin + soc_netsoc_sdram_bankmachine7_refresh_gnt <= 1'd1; + end + soc_netsoc_sdram_bankmachine7_row_close <= 1'd1; + soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + if ((~soc_netsoc_sdram_bankmachine7_refresh_req)) begin + vns_bankmachine7_next_state <= 1'd0; + end + end + 3'd5: begin + vns_bankmachine7_next_state <= 2'd3; + end + 3'd6: begin + vns_bankmachine7_next_state <= 1'd0; + end + default: begin + if (soc_netsoc_sdram_bankmachine7_refresh_req) begin + vns_bankmachine7_next_state <= 3'd4; + end else begin + if (soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid) begin + if (soc_netsoc_sdram_bankmachine7_row_opened) begin + if (soc_netsoc_sdram_bankmachine7_row_hit) begin + soc_netsoc_sdram_bankmachine7_cmd_valid <= 1'd1; + if (soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_we) begin + soc_netsoc_sdram_bankmachine7_req_wdata_ready <= soc_netsoc_sdram_bankmachine7_cmd_ready; + soc_netsoc_sdram_bankmachine7_cmd_payload_is_write <= 1'd1; + soc_netsoc_sdram_bankmachine7_cmd_payload_we <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine7_req_rdata_valid <= soc_netsoc_sdram_bankmachine7_cmd_ready; + soc_netsoc_sdram_bankmachine7_cmd_payload_is_read <= 1'd1; + end + soc_netsoc_sdram_bankmachine7_cmd_payload_cas <= 1'd1; + if ((soc_netsoc_sdram_bankmachine7_cmd_ready & soc_netsoc_sdram_bankmachine7_auto_precharge)) begin + vns_bankmachine7_next_state <= 2'd2; + end + end else begin + vns_bankmachine7_next_state <= 1'd1; + end + end else begin + vns_bankmachine7_next_state <= 2'd3; + end + end + end + end + endcase +end +assign soc_netsoc_sdram_trrdcon_valid = ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & ((soc_netsoc_sdram_choose_cmd_cmd_payload_ras & (~soc_netsoc_sdram_choose_cmd_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_cmd_cmd_payload_we))); +assign soc_netsoc_sdram_tfawcon_valid = ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & ((soc_netsoc_sdram_choose_cmd_cmd_payload_ras & (~soc_netsoc_sdram_choose_cmd_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_cmd_cmd_payload_we))); +assign soc_netsoc_sdram_ras_allowed = (soc_netsoc_sdram_trrdcon_ready & soc_netsoc_sdram_tfawcon_ready); +assign soc_netsoc_sdram_tccdcon_valid = ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_cmd_payload_is_write | soc_netsoc_sdram_choose_req_cmd_payload_is_read)); +assign soc_netsoc_sdram_cas_allowed = soc_netsoc_sdram_tccdcon_ready; +assign soc_netsoc_sdram_twtrcon_valid = ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); +assign soc_netsoc_sdram_read_available = ((((((((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_payload_is_read) | (soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_payload_is_read)); +assign soc_netsoc_sdram_write_available = ((((((((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_payload_is_write) | (soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_payload_is_write)); +assign soc_netsoc_sdram_max_time0 = (soc_netsoc_sdram_time0 == 1'd0); +assign soc_netsoc_sdram_max_time1 = (soc_netsoc_sdram_time1 == 1'd0); +assign soc_netsoc_sdram_bankmachine0_refresh_req = soc_netsoc_sdram_cmd_valid; +assign soc_netsoc_sdram_bankmachine1_refresh_req = soc_netsoc_sdram_cmd_valid; +assign soc_netsoc_sdram_bankmachine2_refresh_req = soc_netsoc_sdram_cmd_valid; +assign soc_netsoc_sdram_bankmachine3_refresh_req = soc_netsoc_sdram_cmd_valid; +assign soc_netsoc_sdram_bankmachine4_refresh_req = soc_netsoc_sdram_cmd_valid; +assign soc_netsoc_sdram_bankmachine5_refresh_req = soc_netsoc_sdram_cmd_valid; +assign soc_netsoc_sdram_bankmachine6_refresh_req = soc_netsoc_sdram_cmd_valid; +assign soc_netsoc_sdram_bankmachine7_refresh_req = soc_netsoc_sdram_cmd_valid; +assign soc_netsoc_sdram_go_to_refresh = (((((((soc_netsoc_sdram_bankmachine0_refresh_gnt & soc_netsoc_sdram_bankmachine1_refresh_gnt) & soc_netsoc_sdram_bankmachine2_refresh_gnt) & soc_netsoc_sdram_bankmachine3_refresh_gnt) & soc_netsoc_sdram_bankmachine4_refresh_gnt) & soc_netsoc_sdram_bankmachine5_refresh_gnt) & soc_netsoc_sdram_bankmachine6_refresh_gnt) & soc_netsoc_sdram_bankmachine7_refresh_gnt); +assign soc_netsoc_sdram_interface_rdata = {soc_netsoc_sdram_dfi_p3_rddata, soc_netsoc_sdram_dfi_p2_rddata, soc_netsoc_sdram_dfi_p1_rddata, soc_netsoc_sdram_dfi_p0_rddata}; +assign {soc_netsoc_sdram_dfi_p3_wrdata, soc_netsoc_sdram_dfi_p2_wrdata, soc_netsoc_sdram_dfi_p1_wrdata, soc_netsoc_sdram_dfi_p0_wrdata} = soc_netsoc_sdram_interface_wdata; +assign {soc_netsoc_sdram_dfi_p3_wrdata_mask, soc_netsoc_sdram_dfi_p2_wrdata_mask, soc_netsoc_sdram_dfi_p1_wrdata_mask, soc_netsoc_sdram_dfi_p0_wrdata_mask} = (~soc_netsoc_sdram_interface_wdata_we); +always @(*) begin + soc_netsoc_sdram_choose_cmd_valids <= 8'd0; + soc_netsoc_sdram_choose_cmd_valids[0] <= (soc_netsoc_sdram_bankmachine0_cmd_valid & (((soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine0_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine0_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine0_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine0_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine0_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); + soc_netsoc_sdram_choose_cmd_valids[1] <= (soc_netsoc_sdram_bankmachine1_cmd_valid & (((soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine1_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine1_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine1_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine1_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine1_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); + soc_netsoc_sdram_choose_cmd_valids[2] <= (soc_netsoc_sdram_bankmachine2_cmd_valid & (((soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine2_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine2_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine2_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine2_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine2_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); + soc_netsoc_sdram_choose_cmd_valids[3] <= (soc_netsoc_sdram_bankmachine3_cmd_valid & (((soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine3_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine3_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine3_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine3_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine3_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); + soc_netsoc_sdram_choose_cmd_valids[4] <= (soc_netsoc_sdram_bankmachine4_cmd_valid & (((soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine4_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine4_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine4_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine4_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine4_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); + soc_netsoc_sdram_choose_cmd_valids[5] <= (soc_netsoc_sdram_bankmachine5_cmd_valid & (((soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine5_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine5_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine5_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine5_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine5_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); + soc_netsoc_sdram_choose_cmd_valids[6] <= (soc_netsoc_sdram_bankmachine6_cmd_valid & (((soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine6_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine6_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine6_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine6_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine6_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); + soc_netsoc_sdram_choose_cmd_valids[7] <= (soc_netsoc_sdram_bankmachine7_cmd_valid & (((soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine7_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine7_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine7_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine7_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine7_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); +end +assign soc_netsoc_sdram_choose_cmd_request = soc_netsoc_sdram_choose_cmd_valids; +assign soc_netsoc_sdram_choose_cmd_cmd_valid = vns_rhs_array_muxed0; +assign soc_netsoc_sdram_choose_cmd_cmd_payload_a = vns_rhs_array_muxed1; +assign soc_netsoc_sdram_choose_cmd_cmd_payload_ba = vns_rhs_array_muxed2; +assign soc_netsoc_sdram_choose_cmd_cmd_payload_is_read = vns_rhs_array_muxed3; +assign soc_netsoc_sdram_choose_cmd_cmd_payload_is_write = vns_rhs_array_muxed4; +assign soc_netsoc_sdram_choose_cmd_cmd_payload_is_cmd = vns_rhs_array_muxed5; +always @(*) begin + soc_netsoc_sdram_choose_cmd_cmd_payload_cas <= 1'd0; + if (soc_netsoc_sdram_choose_cmd_cmd_valid) begin + soc_netsoc_sdram_choose_cmd_cmd_payload_cas <= vns_t_array_muxed0; + end +end +always @(*) begin + soc_netsoc_sdram_choose_cmd_cmd_payload_ras <= 1'd0; + if (soc_netsoc_sdram_choose_cmd_cmd_valid) begin + soc_netsoc_sdram_choose_cmd_cmd_payload_ras <= vns_t_array_muxed1; + end +end +always @(*) begin + soc_netsoc_sdram_choose_cmd_cmd_payload_we <= 1'd0; + if (soc_netsoc_sdram_choose_cmd_cmd_valid) begin + soc_netsoc_sdram_choose_cmd_cmd_payload_we <= vns_t_array_muxed2; + end +end +assign soc_netsoc_sdram_choose_cmd_ce = (soc_netsoc_sdram_choose_cmd_cmd_ready | (~soc_netsoc_sdram_choose_cmd_cmd_valid)); +always @(*) begin + soc_netsoc_sdram_choose_req_valids <= 8'd0; + soc_netsoc_sdram_choose_req_valids[0] <= (soc_netsoc_sdram_bankmachine0_cmd_valid & (((soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine0_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine0_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine0_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine0_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine0_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); + soc_netsoc_sdram_choose_req_valids[1] <= (soc_netsoc_sdram_bankmachine1_cmd_valid & (((soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine1_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine1_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine1_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine1_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine1_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); + soc_netsoc_sdram_choose_req_valids[2] <= (soc_netsoc_sdram_bankmachine2_cmd_valid & (((soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine2_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine2_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine2_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine2_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine2_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); + soc_netsoc_sdram_choose_req_valids[3] <= (soc_netsoc_sdram_bankmachine3_cmd_valid & (((soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine3_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine3_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine3_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine3_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine3_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); + soc_netsoc_sdram_choose_req_valids[4] <= (soc_netsoc_sdram_bankmachine4_cmd_valid & (((soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine4_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine4_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine4_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine4_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine4_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); + soc_netsoc_sdram_choose_req_valids[5] <= (soc_netsoc_sdram_bankmachine5_cmd_valid & (((soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine5_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine5_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine5_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine5_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine5_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); + soc_netsoc_sdram_choose_req_valids[6] <= (soc_netsoc_sdram_bankmachine6_cmd_valid & (((soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine6_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine6_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine6_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine6_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine6_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); + soc_netsoc_sdram_choose_req_valids[7] <= (soc_netsoc_sdram_bankmachine7_cmd_valid & (((soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine7_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine7_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine7_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine7_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine7_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); +end +assign soc_netsoc_sdram_choose_req_request = soc_netsoc_sdram_choose_req_valids; +assign soc_netsoc_sdram_choose_req_cmd_valid = vns_rhs_array_muxed6; +assign soc_netsoc_sdram_choose_req_cmd_payload_a = vns_rhs_array_muxed7; +assign soc_netsoc_sdram_choose_req_cmd_payload_ba = vns_rhs_array_muxed8; +assign soc_netsoc_sdram_choose_req_cmd_payload_is_read = vns_rhs_array_muxed9; +assign soc_netsoc_sdram_choose_req_cmd_payload_is_write = vns_rhs_array_muxed10; +assign soc_netsoc_sdram_choose_req_cmd_payload_is_cmd = vns_rhs_array_muxed11; +always @(*) begin + soc_netsoc_sdram_choose_req_cmd_payload_cas <= 1'd0; + if (soc_netsoc_sdram_choose_req_cmd_valid) begin + soc_netsoc_sdram_choose_req_cmd_payload_cas <= vns_t_array_muxed3; + end +end +always @(*) begin + soc_netsoc_sdram_choose_req_cmd_payload_ras <= 1'd0; + if (soc_netsoc_sdram_choose_req_cmd_valid) begin + soc_netsoc_sdram_choose_req_cmd_payload_ras <= vns_t_array_muxed4; + end +end +always @(*) begin + soc_netsoc_sdram_choose_req_cmd_payload_we <= 1'd0; + if (soc_netsoc_sdram_choose_req_cmd_valid) begin + soc_netsoc_sdram_choose_req_cmd_payload_we <= vns_t_array_muxed5; + end +end +always @(*) begin + soc_netsoc_sdram_bankmachine0_cmd_ready <= 1'd0; + if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 1'd0))) begin + soc_netsoc_sdram_bankmachine0_cmd_ready <= 1'd1; + end + if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 1'd0))) begin + soc_netsoc_sdram_bankmachine0_cmd_ready <= 1'd1; + end +end +always @(*) begin + soc_netsoc_sdram_bankmachine1_cmd_ready <= 1'd0; + if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 1'd1))) begin + soc_netsoc_sdram_bankmachine1_cmd_ready <= 1'd1; + end + if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 1'd1))) begin + soc_netsoc_sdram_bankmachine1_cmd_ready <= 1'd1; + end +end +always @(*) begin + soc_netsoc_sdram_bankmachine2_cmd_ready <= 1'd0; + if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 2'd2))) begin + soc_netsoc_sdram_bankmachine2_cmd_ready <= 1'd1; + end + if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 2'd2))) begin + soc_netsoc_sdram_bankmachine2_cmd_ready <= 1'd1; + end +end +always @(*) begin + soc_netsoc_sdram_bankmachine3_cmd_ready <= 1'd0; + if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 2'd3))) begin + soc_netsoc_sdram_bankmachine3_cmd_ready <= 1'd1; + end + if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 2'd3))) begin + soc_netsoc_sdram_bankmachine3_cmd_ready <= 1'd1; + end +end +always @(*) begin + soc_netsoc_sdram_bankmachine4_cmd_ready <= 1'd0; + if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 3'd4))) begin + soc_netsoc_sdram_bankmachine4_cmd_ready <= 1'd1; + end + if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 3'd4))) begin + soc_netsoc_sdram_bankmachine4_cmd_ready <= 1'd1; + end +end +always @(*) begin + soc_netsoc_sdram_bankmachine5_cmd_ready <= 1'd0; + if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 3'd5))) begin + soc_netsoc_sdram_bankmachine5_cmd_ready <= 1'd1; + end + if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 3'd5))) begin + soc_netsoc_sdram_bankmachine5_cmd_ready <= 1'd1; + end +end +always @(*) begin + soc_netsoc_sdram_bankmachine6_cmd_ready <= 1'd0; + if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 3'd6))) begin + soc_netsoc_sdram_bankmachine6_cmd_ready <= 1'd1; + end + if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 3'd6))) begin + soc_netsoc_sdram_bankmachine6_cmd_ready <= 1'd1; + end +end +always @(*) begin + soc_netsoc_sdram_bankmachine7_cmd_ready <= 1'd0; + if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 3'd7))) begin + soc_netsoc_sdram_bankmachine7_cmd_ready <= 1'd1; + end + if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 3'd7))) begin + soc_netsoc_sdram_bankmachine7_cmd_ready <= 1'd1; + end +end +assign soc_netsoc_sdram_choose_req_ce = (soc_netsoc_sdram_choose_req_cmd_ready | (~soc_netsoc_sdram_choose_req_cmd_valid)); +assign soc_netsoc_sdram_dfi_p0_reset_n = 1'd1; +assign soc_netsoc_sdram_dfi_p0_cke = {1{soc_netsoc_sdram_steerer0}}; +assign soc_netsoc_sdram_dfi_p0_odt = {1{soc_netsoc_sdram_steerer1}}; +assign soc_netsoc_sdram_dfi_p1_reset_n = 1'd1; +assign soc_netsoc_sdram_dfi_p1_cke = {1{soc_netsoc_sdram_steerer2}}; +assign soc_netsoc_sdram_dfi_p1_odt = {1{soc_netsoc_sdram_steerer3}}; +assign soc_netsoc_sdram_dfi_p2_reset_n = 1'd1; +assign soc_netsoc_sdram_dfi_p2_cke = {1{soc_netsoc_sdram_steerer4}}; +assign soc_netsoc_sdram_dfi_p2_odt = {1{soc_netsoc_sdram_steerer5}}; +assign soc_netsoc_sdram_dfi_p3_reset_n = 1'd1; +assign soc_netsoc_sdram_dfi_p3_cke = {1{soc_netsoc_sdram_steerer6}}; +assign soc_netsoc_sdram_dfi_p3_odt = {1{soc_netsoc_sdram_steerer7}}; +assign soc_netsoc_sdram_tfawcon_count = (((soc_netsoc_sdram_tfawcon_window[0] + soc_netsoc_sdram_tfawcon_window[1]) + soc_netsoc_sdram_tfawcon_window[2]) + soc_netsoc_sdram_tfawcon_window[3]); +always @(*) begin + soc_netsoc_sdram_en0 <= 1'd0; + soc_netsoc_sdram_choose_cmd_want_activates <= 1'd0; + soc_netsoc_sdram_steerer_sel3 <= 2'd0; + soc_netsoc_sdram_cmd_ready <= 1'd0; + soc_netsoc_sdram_choose_cmd_cmd_ready <= 1'd0; + soc_netsoc_sdram_choose_req_want_reads <= 1'd0; + soc_netsoc_sdram_choose_req_want_writes <= 1'd0; + soc_netsoc_sdram_en1 <= 1'd0; + soc_netsoc_sdram_choose_req_cmd_ready <= 1'd0; + soc_netsoc_sdram_steerer_sel0 <= 2'd0; + vns_multiplexer_next_state <= 4'd0; + soc_netsoc_sdram_steerer_sel1 <= 2'd0; + soc_netsoc_sdram_steerer_sel2 <= 2'd0; + vns_multiplexer_next_state <= vns_multiplexer_state; + case (vns_multiplexer_state) + 1'd1: begin + soc_netsoc_sdram_en1 <= 1'd1; + soc_netsoc_sdram_choose_req_want_writes <= 1'd1; + if (1'd0) begin + soc_netsoc_sdram_choose_req_cmd_ready <= (soc_netsoc_sdram_cas_allowed & ((~((soc_netsoc_sdram_choose_req_cmd_payload_ras & (~soc_netsoc_sdram_choose_req_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_req_cmd_payload_we))) | soc_netsoc_sdram_ras_allowed)); + end else begin + soc_netsoc_sdram_choose_cmd_want_activates <= soc_netsoc_sdram_ras_allowed; + soc_netsoc_sdram_choose_cmd_cmd_ready <= ((~((soc_netsoc_sdram_choose_cmd_cmd_payload_ras & (~soc_netsoc_sdram_choose_cmd_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_cmd_cmd_payload_we))) | soc_netsoc_sdram_ras_allowed); + soc_netsoc_sdram_choose_req_cmd_ready <= soc_netsoc_sdram_cas_allowed; + end + soc_netsoc_sdram_steerer_sel0 <= 1'd0; + soc_netsoc_sdram_steerer_sel1 <= 1'd0; + soc_netsoc_sdram_steerer_sel2 <= 1'd1; + soc_netsoc_sdram_steerer_sel3 <= 2'd2; + if (soc_netsoc_sdram_read_available) begin + if (((~soc_netsoc_sdram_write_available) | soc_netsoc_sdram_max_time1)) begin + vns_multiplexer_next_state <= 2'd3; + end + end + if (soc_netsoc_sdram_go_to_refresh) begin + vns_multiplexer_next_state <= 2'd2; + end + end + 2'd2: begin + soc_netsoc_sdram_steerer_sel0 <= 2'd3; + soc_netsoc_sdram_cmd_ready <= 1'd1; + if (soc_netsoc_sdram_cmd_last) begin + vns_multiplexer_next_state <= 1'd0; + end + end + 2'd3: begin + if (soc_netsoc_sdram_twtrcon_ready) begin + vns_multiplexer_next_state <= 1'd0; + end + end + 3'd4: begin + vns_multiplexer_next_state <= 3'd5; + end + 3'd5: begin + vns_multiplexer_next_state <= 3'd6; + end + 3'd6: begin + vns_multiplexer_next_state <= 3'd7; + end + 3'd7: begin + vns_multiplexer_next_state <= 4'd8; + end + 4'd8: begin + vns_multiplexer_next_state <= 4'd9; + end + 4'd9: begin + vns_multiplexer_next_state <= 4'd10; + end + 4'd10: begin + vns_multiplexer_next_state <= 4'd11; + end + 4'd11: begin + vns_multiplexer_next_state <= 1'd1; + end + default: begin + soc_netsoc_sdram_en0 <= 1'd1; + soc_netsoc_sdram_choose_req_want_reads <= 1'd1; + if (1'd0) begin + soc_netsoc_sdram_choose_req_cmd_ready <= (soc_netsoc_sdram_cas_allowed & ((~((soc_netsoc_sdram_choose_req_cmd_payload_ras & (~soc_netsoc_sdram_choose_req_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_req_cmd_payload_we))) | soc_netsoc_sdram_ras_allowed)); + end else begin + soc_netsoc_sdram_choose_cmd_want_activates <= soc_netsoc_sdram_ras_allowed; + soc_netsoc_sdram_choose_cmd_cmd_ready <= ((~((soc_netsoc_sdram_choose_cmd_cmd_payload_ras & (~soc_netsoc_sdram_choose_cmd_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_cmd_cmd_payload_we))) | soc_netsoc_sdram_ras_allowed); + soc_netsoc_sdram_choose_req_cmd_ready <= soc_netsoc_sdram_cas_allowed; + end + soc_netsoc_sdram_steerer_sel0 <= 1'd0; + soc_netsoc_sdram_steerer_sel1 <= 1'd1; + soc_netsoc_sdram_steerer_sel2 <= 2'd2; + soc_netsoc_sdram_steerer_sel3 <= 1'd0; + if (soc_netsoc_sdram_write_available) begin + if (((~soc_netsoc_sdram_read_available) | soc_netsoc_sdram_max_time0)) begin + vns_multiplexer_next_state <= 3'd4; + end + end + if (soc_netsoc_sdram_go_to_refresh) begin + vns_multiplexer_next_state <= 2'd2; + end + end + endcase +end +assign vns_roundrobin0_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((vns_locked0 | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; +assign vns_roundrobin0_ce = ((~soc_netsoc_sdram_interface_bank0_valid) & (~soc_netsoc_sdram_interface_bank0_lock)); +assign soc_netsoc_sdram_interface_bank0_addr = vns_rhs_array_muxed12; +assign soc_netsoc_sdram_interface_bank0_we = vns_rhs_array_muxed13; +assign soc_netsoc_sdram_interface_bank0_valid = vns_rhs_array_muxed14; +assign vns_roundrobin1_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((vns_locked1 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; +assign vns_roundrobin1_ce = ((~soc_netsoc_sdram_interface_bank1_valid) & (~soc_netsoc_sdram_interface_bank1_lock)); +assign soc_netsoc_sdram_interface_bank1_addr = vns_rhs_array_muxed15; +assign soc_netsoc_sdram_interface_bank1_we = vns_rhs_array_muxed16; +assign soc_netsoc_sdram_interface_bank1_valid = vns_rhs_array_muxed17; +assign vns_roundrobin2_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((vns_locked2 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; +assign vns_roundrobin2_ce = ((~soc_netsoc_sdram_interface_bank2_valid) & (~soc_netsoc_sdram_interface_bank2_lock)); +assign soc_netsoc_sdram_interface_bank2_addr = vns_rhs_array_muxed18; +assign soc_netsoc_sdram_interface_bank2_we = vns_rhs_array_muxed19; +assign soc_netsoc_sdram_interface_bank2_valid = vns_rhs_array_muxed20; +assign vns_roundrobin3_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((vns_locked3 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; +assign vns_roundrobin3_ce = ((~soc_netsoc_sdram_interface_bank3_valid) & (~soc_netsoc_sdram_interface_bank3_lock)); +assign soc_netsoc_sdram_interface_bank3_addr = vns_rhs_array_muxed21; +assign soc_netsoc_sdram_interface_bank3_we = vns_rhs_array_muxed22; +assign soc_netsoc_sdram_interface_bank3_valid = vns_rhs_array_muxed23; +assign vns_roundrobin4_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((vns_locked4 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; +assign vns_roundrobin4_ce = ((~soc_netsoc_sdram_interface_bank4_valid) & (~soc_netsoc_sdram_interface_bank4_lock)); +assign soc_netsoc_sdram_interface_bank4_addr = vns_rhs_array_muxed24; +assign soc_netsoc_sdram_interface_bank4_we = vns_rhs_array_muxed25; +assign soc_netsoc_sdram_interface_bank4_valid = vns_rhs_array_muxed26; +assign vns_roundrobin5_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((vns_locked5 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; +assign vns_roundrobin5_ce = ((~soc_netsoc_sdram_interface_bank5_valid) & (~soc_netsoc_sdram_interface_bank5_lock)); +assign soc_netsoc_sdram_interface_bank5_addr = vns_rhs_array_muxed27; +assign soc_netsoc_sdram_interface_bank5_we = vns_rhs_array_muxed28; +assign soc_netsoc_sdram_interface_bank5_valid = vns_rhs_array_muxed29; +assign vns_roundrobin6_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((vns_locked6 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; +assign vns_roundrobin6_ce = ((~soc_netsoc_sdram_interface_bank6_valid) & (~soc_netsoc_sdram_interface_bank6_lock)); +assign soc_netsoc_sdram_interface_bank6_addr = vns_rhs_array_muxed30; +assign soc_netsoc_sdram_interface_bank6_we = vns_rhs_array_muxed31; +assign soc_netsoc_sdram_interface_bank6_valid = vns_rhs_array_muxed32; +assign vns_roundrobin7_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((vns_locked7 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; +assign vns_roundrobin7_ce = ((~soc_netsoc_sdram_interface_bank7_valid) & (~soc_netsoc_sdram_interface_bank7_lock)); +assign soc_netsoc_sdram_interface_bank7_addr = vns_rhs_array_muxed33; +assign soc_netsoc_sdram_interface_bank7_we = vns_rhs_array_muxed34; +assign soc_netsoc_sdram_interface_bank7_valid = vns_rhs_array_muxed35; +assign soc_netsoc_port_cmd_ready = ((((((((1'd0 | (((vns_roundrobin0_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((vns_locked0 | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank0_ready)) | (((vns_roundrobin1_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((vns_locked1 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank1_ready)) | (((vns_roundrobin2_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((vns_locked2 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank2_ready)) | (((vns_roundrobin3_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((vns_locked3 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank3_ready)) | (((vns_roundrobin4_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((vns_locked4 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank4_ready)) | (((vns_roundrobin5_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((vns_locked5 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank5_ready)) | (((vns_roundrobin6_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((vns_locked6 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank6_ready)) | (((vns_roundrobin7_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((vns_locked7 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank7_ready)); +assign soc_netsoc_port_wdata_ready = vns_new_master_wdata_ready2; +assign soc_netsoc_port_rdata_valid = vns_new_master_rdata_valid9; +always @(*) begin + soc_netsoc_sdram_interface_wdata <= 128'd0; + soc_netsoc_sdram_interface_wdata_we <= 16'd0; + case ({vns_new_master_wdata_ready2}) + 1'd1: begin + soc_netsoc_sdram_interface_wdata <= soc_netsoc_port_wdata_payload_data; + soc_netsoc_sdram_interface_wdata_we <= soc_netsoc_port_wdata_payload_we; + end + default: begin + soc_netsoc_sdram_interface_wdata <= 1'd0; + soc_netsoc_sdram_interface_wdata_we <= 1'd0; + end + endcase +end +assign soc_netsoc_port_rdata_payload_data = soc_netsoc_sdram_interface_rdata; +assign vns_roundrobin0_grant = 1'd0; +assign vns_roundrobin1_grant = 1'd0; +assign vns_roundrobin2_grant = 1'd0; +assign vns_roundrobin3_grant = 1'd0; +assign vns_roundrobin4_grant = 1'd0; +assign vns_roundrobin5_grant = 1'd0; +assign vns_roundrobin6_grant = 1'd0; +assign vns_roundrobin7_grant = 1'd0; +assign soc_netsoc_data_port_adr = soc_netsoc_interface0_wb_sdram_adr[10:2]; +always @(*) begin + soc_netsoc_data_port_we <= 16'd0; + soc_netsoc_data_port_dat_w <= 128'd0; + if (soc_netsoc_write_from_slave) begin + soc_netsoc_data_port_dat_w <= soc_netsoc_dat_r; + soc_netsoc_data_port_we <= {16{1'd1}}; + end else begin + soc_netsoc_data_port_dat_w <= {4{soc_netsoc_interface0_wb_sdram_dat_w}}; + if ((((soc_netsoc_interface0_wb_sdram_cyc & soc_netsoc_interface0_wb_sdram_stb) & soc_netsoc_interface0_wb_sdram_we) & soc_netsoc_interface0_wb_sdram_ack)) begin + soc_netsoc_data_port_we <= {({4{(soc_netsoc_interface0_wb_sdram_adr[1:0] == 1'd0)}} & soc_netsoc_interface0_wb_sdram_sel), ({4{(soc_netsoc_interface0_wb_sdram_adr[1:0] == 1'd1)}} & soc_netsoc_interface0_wb_sdram_sel), ({4{(soc_netsoc_interface0_wb_sdram_adr[1:0] == 2'd2)}} & soc_netsoc_interface0_wb_sdram_sel), ({4{(soc_netsoc_interface0_wb_sdram_adr[1:0] == 2'd3)}} & soc_netsoc_interface0_wb_sdram_sel)}; + end + end +end +assign soc_netsoc_dat_w = soc_netsoc_data_port_dat_r; +assign soc_netsoc_sel = 16'd65535; +always @(*) begin + soc_netsoc_interface0_wb_sdram_dat_r <= 32'd0; + case (soc_netsoc_adr_offset_r) + 1'd0: begin + soc_netsoc_interface0_wb_sdram_dat_r <= soc_netsoc_data_port_dat_r[127:96]; + end + 1'd1: begin + soc_netsoc_interface0_wb_sdram_dat_r <= soc_netsoc_data_port_dat_r[95:64]; + end + 2'd2: begin + soc_netsoc_interface0_wb_sdram_dat_r <= soc_netsoc_data_port_dat_r[63:32]; + end + default: begin + soc_netsoc_interface0_wb_sdram_dat_r <= soc_netsoc_data_port_dat_r[31:0]; + end + endcase +end +assign {soc_netsoc_tag_do_dirty, soc_netsoc_tag_do_tag} = soc_netsoc_tag_port_dat_r; +assign soc_netsoc_tag_port_dat_w = {soc_netsoc_tag_di_dirty, soc_netsoc_tag_di_tag}; +assign soc_netsoc_tag_port_adr = soc_netsoc_interface0_wb_sdram_adr[10:2]; +assign soc_netsoc_tag_di_tag = soc_netsoc_interface0_wb_sdram_adr[29:11]; +assign soc_netsoc_adr = {soc_netsoc_tag_do_tag, soc_netsoc_interface0_wb_sdram_adr[10:2]}; +always @(*) begin + vns_fullmemorywe_next_state <= 3'd0; + soc_netsoc_tag_di_dirty <= 1'd0; + soc_netsoc_word_clr <= 1'd0; + soc_netsoc_interface0_wb_sdram_ack <= 1'd0; + soc_netsoc_word_inc <= 1'd0; + soc_netsoc_write_from_slave <= 1'd0; + soc_netsoc_cyc <= 1'd0; + soc_netsoc_stb <= 1'd0; + soc_netsoc_tag_port_we <= 1'd0; + soc_netsoc_we <= 1'd0; + vns_fullmemorywe_next_state <= vns_fullmemorywe_state; + case (vns_fullmemorywe_state) + 1'd1: begin + soc_netsoc_word_clr <= 1'd1; + if ((soc_netsoc_tag_do_tag == soc_netsoc_interface0_wb_sdram_adr[29:11])) begin + soc_netsoc_interface0_wb_sdram_ack <= 1'd1; + if (soc_netsoc_interface0_wb_sdram_we) begin + soc_netsoc_tag_di_dirty <= 1'd1; + soc_netsoc_tag_port_we <= 1'd1; + end + vns_fullmemorywe_next_state <= 1'd0; + end else begin + if (soc_netsoc_tag_do_dirty) begin + vns_fullmemorywe_next_state <= 2'd2; + end else begin + vns_fullmemorywe_next_state <= 2'd3; + end + end + end + 2'd2: begin + soc_netsoc_stb <= 1'd1; + soc_netsoc_cyc <= 1'd1; + soc_netsoc_we <= 1'd1; + if (soc_netsoc_ack) begin + soc_netsoc_word_inc <= 1'd1; + if (1'd1) begin + vns_fullmemorywe_next_state <= 2'd3; + end + end + end + 2'd3: begin + soc_netsoc_tag_port_we <= 1'd1; + soc_netsoc_word_clr <= 1'd1; + vns_fullmemorywe_next_state <= 3'd4; + end + 3'd4: begin + soc_netsoc_stb <= 1'd1; + soc_netsoc_cyc <= 1'd1; + soc_netsoc_we <= 1'd0; + if (soc_netsoc_ack) begin + soc_netsoc_write_from_slave <= 1'd1; + soc_netsoc_word_inc <= 1'd1; + if (1'd1) begin + vns_fullmemorywe_next_state <= 1'd1; + end else begin + vns_fullmemorywe_next_state <= 3'd4; + end + end + end + default: begin + if ((soc_netsoc_interface0_wb_sdram_cyc & soc_netsoc_interface0_wb_sdram_stb)) begin + vns_fullmemorywe_next_state <= 1'd1; + end + end + endcase +end +assign soc_netsoc_wdata_converter_sink_valid = ((soc_netsoc_cyc & soc_netsoc_stb) & soc_netsoc_we); +assign soc_netsoc_wdata_converter_sink_payload_data = soc_netsoc_dat_w; +assign soc_netsoc_wdata_converter_sink_payload_we = soc_netsoc_sel; +assign soc_netsoc_port_wdata_valid = soc_netsoc_wdata_converter_source_valid; +assign soc_netsoc_wdata_converter_source_ready = soc_netsoc_port_wdata_ready; +assign soc_netsoc_port_wdata_first = soc_netsoc_wdata_converter_source_first; +assign soc_netsoc_port_wdata_last = soc_netsoc_wdata_converter_source_last; +assign soc_netsoc_port_wdata_payload_data = soc_netsoc_wdata_converter_source_payload_data; +assign soc_netsoc_port_wdata_payload_we = soc_netsoc_wdata_converter_source_payload_we; +assign soc_netsoc_rdata_converter_sink_valid = soc_netsoc_port_rdata_valid; +assign soc_netsoc_port_rdata_ready = soc_netsoc_rdata_converter_sink_ready; +assign soc_netsoc_rdata_converter_sink_first = soc_netsoc_port_rdata_first; +assign soc_netsoc_rdata_converter_sink_last = soc_netsoc_port_rdata_last; +assign soc_netsoc_rdata_converter_sink_payload_data = soc_netsoc_port_rdata_payload_data; +assign soc_netsoc_rdata_converter_source_ready = 1'd1; +assign soc_netsoc_dat_r = soc_netsoc_rdata_converter_source_payload_data; +assign soc_netsoc_wdata_converter_converter_sink_valid = soc_netsoc_wdata_converter_sink_valid; +assign soc_netsoc_wdata_converter_converter_sink_first = soc_netsoc_wdata_converter_sink_first; +assign soc_netsoc_wdata_converter_converter_sink_last = soc_netsoc_wdata_converter_sink_last; +assign soc_netsoc_wdata_converter_sink_ready = soc_netsoc_wdata_converter_converter_sink_ready; +assign soc_netsoc_wdata_converter_converter_sink_payload_data = {soc_netsoc_wdata_converter_sink_payload_we, soc_netsoc_wdata_converter_sink_payload_data}; +assign soc_netsoc_wdata_converter_source_valid = soc_netsoc_wdata_converter_source_source_valid; +assign soc_netsoc_wdata_converter_source_first = soc_netsoc_wdata_converter_source_source_first; +assign soc_netsoc_wdata_converter_source_last = soc_netsoc_wdata_converter_source_source_last; +assign soc_netsoc_wdata_converter_source_source_ready = soc_netsoc_wdata_converter_source_ready; +assign {soc_netsoc_wdata_converter_source_payload_we, soc_netsoc_wdata_converter_source_payload_data} = soc_netsoc_wdata_converter_source_source_payload_data; +assign soc_netsoc_wdata_converter_source_source_valid = soc_netsoc_wdata_converter_converter_source_valid; +assign soc_netsoc_wdata_converter_converter_source_ready = soc_netsoc_wdata_converter_source_source_ready; +assign soc_netsoc_wdata_converter_source_source_first = soc_netsoc_wdata_converter_converter_source_first; +assign soc_netsoc_wdata_converter_source_source_last = soc_netsoc_wdata_converter_converter_source_last; +assign soc_netsoc_wdata_converter_source_source_payload_data = soc_netsoc_wdata_converter_converter_source_payload_data; +assign soc_netsoc_wdata_converter_converter_source_valid = soc_netsoc_wdata_converter_converter_sink_valid; +assign soc_netsoc_wdata_converter_converter_sink_ready = soc_netsoc_wdata_converter_converter_source_ready; +assign soc_netsoc_wdata_converter_converter_source_first = soc_netsoc_wdata_converter_converter_sink_first; +assign soc_netsoc_wdata_converter_converter_source_last = soc_netsoc_wdata_converter_converter_sink_last; +assign soc_netsoc_wdata_converter_converter_source_payload_data = soc_netsoc_wdata_converter_converter_sink_payload_data; +assign soc_netsoc_wdata_converter_converter_source_payload_valid_token_count = 1'd1; +assign soc_netsoc_rdata_converter_converter_sink_valid = soc_netsoc_rdata_converter_sink_valid; +assign soc_netsoc_rdata_converter_converter_sink_first = soc_netsoc_rdata_converter_sink_first; +assign soc_netsoc_rdata_converter_converter_sink_last = soc_netsoc_rdata_converter_sink_last; +assign soc_netsoc_rdata_converter_sink_ready = soc_netsoc_rdata_converter_converter_sink_ready; +assign soc_netsoc_rdata_converter_converter_sink_payload_data = {soc_netsoc_rdata_converter_sink_payload_data}; +assign soc_netsoc_rdata_converter_source_valid = soc_netsoc_rdata_converter_source_source_valid; +assign soc_netsoc_rdata_converter_source_first = soc_netsoc_rdata_converter_source_source_first; +assign soc_netsoc_rdata_converter_source_last = soc_netsoc_rdata_converter_source_source_last; +assign soc_netsoc_rdata_converter_source_source_ready = soc_netsoc_rdata_converter_source_ready; +assign {soc_netsoc_rdata_converter_source_payload_data} = soc_netsoc_rdata_converter_source_source_payload_data; +assign soc_netsoc_rdata_converter_source_source_valid = soc_netsoc_rdata_converter_converter_source_valid; +assign soc_netsoc_rdata_converter_converter_source_ready = soc_netsoc_rdata_converter_source_source_ready; +assign soc_netsoc_rdata_converter_source_source_first = soc_netsoc_rdata_converter_converter_source_first; +assign soc_netsoc_rdata_converter_source_source_last = soc_netsoc_rdata_converter_converter_source_last; +assign soc_netsoc_rdata_converter_source_source_payload_data = soc_netsoc_rdata_converter_converter_source_payload_data; +assign soc_netsoc_rdata_converter_converter_source_valid = soc_netsoc_rdata_converter_converter_sink_valid; +assign soc_netsoc_rdata_converter_converter_sink_ready = soc_netsoc_rdata_converter_converter_source_ready; +assign soc_netsoc_rdata_converter_converter_source_first = soc_netsoc_rdata_converter_converter_sink_first; +assign soc_netsoc_rdata_converter_converter_source_last = soc_netsoc_rdata_converter_converter_sink_last; +assign soc_netsoc_rdata_converter_converter_source_payload_data = soc_netsoc_rdata_converter_converter_sink_payload_data; +assign soc_netsoc_rdata_converter_converter_source_payload_valid_token_count = 1'd1; +always @(*) begin + soc_netsoc_count_litedramwishbone2native_next_value <= 1'd0; + soc_netsoc_port_cmd_valid <= 1'd0; + soc_netsoc_count_litedramwishbone2native_next_value_ce <= 1'd0; + soc_netsoc_ack <= 1'd0; + soc_netsoc_port_cmd_payload_we <= 1'd0; + vns_litedramwishbone2native_next_state <= 2'd0; + soc_netsoc_port_cmd_payload_addr <= 24'd0; + vns_litedramwishbone2native_next_state <= vns_litedramwishbone2native_state; + case (vns_litedramwishbone2native_state) + 1'd1: begin + if (soc_netsoc_wdata_converter_sink_ready) begin + soc_netsoc_ack <= 1'd1; + vns_litedramwishbone2native_next_state <= 1'd0; + end + end + 2'd2: begin + if (soc_netsoc_rdata_converter_source_valid) begin + soc_netsoc_ack <= 1'd1; + vns_litedramwishbone2native_next_state <= 1'd0; + end + end + default: begin + soc_netsoc_port_cmd_valid <= (soc_netsoc_cyc & soc_netsoc_stb); + soc_netsoc_port_cmd_payload_we <= soc_netsoc_we; + soc_netsoc_port_cmd_payload_addr <= (((soc_netsoc_adr * 1'd1) + soc_netsoc_count) - 1'd0); + if ((soc_netsoc_port_cmd_valid & soc_netsoc_port_cmd_ready)) begin + soc_netsoc_count_litedramwishbone2native_next_value <= (soc_netsoc_count + 1'd1); + soc_netsoc_count_litedramwishbone2native_next_value_ce <= 1'd1; + if ((soc_netsoc_count == 1'd0)) begin + soc_netsoc_count_litedramwishbone2native_next_value <= 1'd0; + soc_netsoc_count_litedramwishbone2native_next_value_ce <= 1'd1; + if (soc_netsoc_we) begin + vns_litedramwishbone2native_next_state <= 1'd1; + end else begin + vns_litedramwishbone2native_next_state <= 2'd2; + end + end + end + end + endcase +end +assign eth_rx_clk = eth_clocks_rx; +assign eth_tx_clk = eth_clocks_tx; +assign soc_reset0 = (soc_reset_storage | soc_reset1); +assign eth_rst_n = (~soc_reset0); +assign soc_counter_done = (soc_counter == 9'd256); +assign soc_counter_ce = (~soc_counter_done); +assign soc_reset1 = (~soc_counter_done); +assign soc_liteethphymiitx_converter_sink_valid = soc_liteethphymiitx_sink_sink_valid; +assign soc_liteethphymiitx_converter_sink_payload_data = soc_liteethphymiitx_sink_sink_payload_data; +assign soc_liteethphymiitx_sink_sink_ready = soc_liteethphymiitx_converter_sink_ready; +assign soc_liteethphymiitx_converter_source_ready = 1'd1; +assign soc_liteethphymiitx_converter_converter_sink_valid = soc_liteethphymiitx_converter_sink_valid; +assign soc_liteethphymiitx_converter_converter_sink_first = soc_liteethphymiitx_converter_sink_first; +assign soc_liteethphymiitx_converter_converter_sink_last = soc_liteethphymiitx_converter_sink_last; +assign soc_liteethphymiitx_converter_sink_ready = soc_liteethphymiitx_converter_converter_sink_ready; +always @(*) begin + soc_liteethphymiitx_converter_converter_sink_payload_data <= 8'd0; + soc_liteethphymiitx_converter_converter_sink_payload_data[3:0] <= soc_liteethphymiitx_converter_sink_payload_data[3:0]; + soc_liteethphymiitx_converter_converter_sink_payload_data[7:4] <= soc_liteethphymiitx_converter_sink_payload_data[7:4]; +end +assign soc_liteethphymiitx_converter_source_valid = soc_liteethphymiitx_converter_source_source_valid; +assign soc_liteethphymiitx_converter_source_first = soc_liteethphymiitx_converter_source_source_first; +assign soc_liteethphymiitx_converter_source_last = soc_liteethphymiitx_converter_source_source_last; +assign soc_liteethphymiitx_converter_source_source_ready = soc_liteethphymiitx_converter_source_ready; +assign {soc_liteethphymiitx_converter_source_payload_data} = soc_liteethphymiitx_converter_source_source_payload_data; +assign soc_liteethphymiitx_converter_source_source_valid = soc_liteethphymiitx_converter_converter_source_valid; +assign soc_liteethphymiitx_converter_converter_source_ready = soc_liteethphymiitx_converter_source_source_ready; +assign soc_liteethphymiitx_converter_source_source_first = soc_liteethphymiitx_converter_converter_source_first; +assign soc_liteethphymiitx_converter_source_source_last = soc_liteethphymiitx_converter_converter_source_last; +assign soc_liteethphymiitx_converter_source_source_payload_data = soc_liteethphymiitx_converter_converter_source_payload_data; +assign soc_liteethphymiitx_converter_converter_first = (soc_liteethphymiitx_converter_converter_mux == 1'd0); +assign soc_liteethphymiitx_converter_converter_last = (soc_liteethphymiitx_converter_converter_mux == 1'd1); +assign soc_liteethphymiitx_converter_converter_source_valid = soc_liteethphymiitx_converter_converter_sink_valid; +assign soc_liteethphymiitx_converter_converter_source_first = (soc_liteethphymiitx_converter_converter_sink_first & soc_liteethphymiitx_converter_converter_first); +assign soc_liteethphymiitx_converter_converter_source_last = (soc_liteethphymiitx_converter_converter_sink_last & soc_liteethphymiitx_converter_converter_last); +assign soc_liteethphymiitx_converter_converter_sink_ready = (soc_liteethphymiitx_converter_converter_last & soc_liteethphymiitx_converter_converter_source_ready); +always @(*) begin + soc_liteethphymiitx_converter_converter_source_payload_data <= 4'd0; + case (soc_liteethphymiitx_converter_converter_mux) + 1'd0: begin + soc_liteethphymiitx_converter_converter_source_payload_data <= soc_liteethphymiitx_converter_converter_sink_payload_data[3:0]; + end + default: begin + soc_liteethphymiitx_converter_converter_source_payload_data <= soc_liteethphymiitx_converter_converter_sink_payload_data[7:4]; + end + endcase +end +assign soc_liteethphymiitx_converter_converter_source_payload_valid_token_count = soc_liteethphymiitx_converter_converter_last; +assign soc_liteethphymiirx_converter_sink_last = (~eth_rx_dv); +assign soc_liteethphymiirx_source_source_valid = soc_liteethphymiirx_converter_source_valid; +assign soc_liteethphymiirx_converter_source_ready = soc_liteethphymiirx_source_source_ready; +assign soc_liteethphymiirx_source_source_first = soc_liteethphymiirx_converter_source_first; +assign soc_liteethphymiirx_source_source_last = soc_liteethphymiirx_converter_source_last; +assign soc_liteethphymiirx_source_source_payload_data = soc_liteethphymiirx_converter_source_payload_data; +assign soc_liteethphymiirx_converter_converter_sink_valid = soc_liteethphymiirx_converter_sink_valid; +assign soc_liteethphymiirx_converter_converter_sink_first = soc_liteethphymiirx_converter_sink_first; +assign soc_liteethphymiirx_converter_converter_sink_last = soc_liteethphymiirx_converter_sink_last; +assign soc_liteethphymiirx_converter_sink_ready = soc_liteethphymiirx_converter_converter_sink_ready; +assign soc_liteethphymiirx_converter_converter_sink_payload_data = {soc_liteethphymiirx_converter_sink_payload_data}; +assign soc_liteethphymiirx_converter_source_valid = soc_liteethphymiirx_converter_source_source_valid; +assign soc_liteethphymiirx_converter_source_first = soc_liteethphymiirx_converter_source_source_first; +assign soc_liteethphymiirx_converter_source_last = soc_liteethphymiirx_converter_source_source_last; +assign soc_liteethphymiirx_converter_source_source_ready = soc_liteethphymiirx_converter_source_ready; +always @(*) begin + soc_liteethphymiirx_converter_source_payload_data <= 8'd0; + soc_liteethphymiirx_converter_source_payload_data[3:0] <= soc_liteethphymiirx_converter_source_source_payload_data[3:0]; + soc_liteethphymiirx_converter_source_payload_data[7:4] <= soc_liteethphymiirx_converter_source_source_payload_data[7:4]; +end +assign soc_liteethphymiirx_converter_source_source_valid = soc_liteethphymiirx_converter_converter_source_valid; +assign soc_liteethphymiirx_converter_converter_source_ready = soc_liteethphymiirx_converter_source_source_ready; +assign soc_liteethphymiirx_converter_source_source_first = soc_liteethphymiirx_converter_converter_source_first; +assign soc_liteethphymiirx_converter_source_source_last = soc_liteethphymiirx_converter_converter_source_last; +assign soc_liteethphymiirx_converter_source_source_payload_data = soc_liteethphymiirx_converter_converter_source_payload_data; +assign soc_liteethphymiirx_converter_converter_sink_ready = ((~soc_liteethphymiirx_converter_converter_strobe_all) | soc_liteethphymiirx_converter_converter_source_ready); +assign soc_liteethphymiirx_converter_converter_source_valid = soc_liteethphymiirx_converter_converter_strobe_all; +assign soc_liteethphymiirx_converter_converter_load_part = (soc_liteethphymiirx_converter_converter_sink_valid & soc_liteethphymiirx_converter_converter_sink_ready); +assign eth_mdc = soc_storage[0]; +assign soc_data_oe = soc_storage[1]; +assign soc_data_w = soc_storage[2]; +assign soc_tx_cdc_sink_valid = soc_source_valid; +assign soc_source_ready = soc_tx_cdc_sink_ready; +assign soc_tx_cdc_sink_first = soc_source_first; +assign soc_tx_cdc_sink_last = soc_source_last; +assign soc_tx_cdc_sink_payload_data = soc_source_payload_data; +assign soc_tx_cdc_sink_payload_last_be = soc_source_payload_last_be; +assign soc_tx_cdc_sink_payload_error = soc_source_payload_error; +assign soc_sink_valid = soc_rx_cdc_source_valid; +assign soc_rx_cdc_source_ready = soc_sink_ready; +assign soc_sink_first = soc_rx_cdc_source_first; +assign soc_sink_last = soc_rx_cdc_source_last; +assign soc_sink_payload_data = soc_rx_cdc_source_payload_data; +assign soc_sink_payload_last_be = soc_rx_cdc_source_payload_last_be; +assign soc_sink_payload_error = soc_rx_cdc_source_payload_error; +assign soc_ps_preamble_error_i = soc_preamble_checker_error; +assign soc_ps_crc_error_i = soc_crc32_checker_error; +always @(*) begin + soc_tx_gap_inserter_source_first <= 1'd0; + soc_tx_gap_inserter_source_last <= 1'd0; + soc_tx_gap_inserter_source_payload_data <= 8'd0; + soc_tx_gap_inserter_source_payload_last_be <= 1'd0; + soc_tx_gap_inserter_source_payload_error <= 1'd0; + soc_tx_gap_inserter_counter_reset <= 1'd0; + soc_tx_gap_inserter_counter_ce <= 1'd0; + soc_tx_gap_inserter_sink_ready <= 1'd0; + vns_liteethmacgap_next_state <= 1'd0; + soc_tx_gap_inserter_source_valid <= 1'd0; + vns_liteethmacgap_next_state <= vns_liteethmacgap_state; + case (vns_liteethmacgap_state) + 1'd1: begin + soc_tx_gap_inserter_counter_ce <= 1'd1; + if ((soc_tx_gap_inserter_counter == 4'd11)) begin + vns_liteethmacgap_next_state <= 1'd0; + end + end + default: begin + soc_tx_gap_inserter_counter_reset <= 1'd1; + soc_tx_gap_inserter_source_valid <= soc_tx_gap_inserter_sink_valid; + soc_tx_gap_inserter_sink_ready <= soc_tx_gap_inserter_source_ready; + soc_tx_gap_inserter_source_first <= soc_tx_gap_inserter_sink_first; + soc_tx_gap_inserter_source_last <= soc_tx_gap_inserter_sink_last; + soc_tx_gap_inserter_source_payload_data <= soc_tx_gap_inserter_sink_payload_data; + soc_tx_gap_inserter_source_payload_last_be <= soc_tx_gap_inserter_sink_payload_last_be; + soc_tx_gap_inserter_source_payload_error <= soc_tx_gap_inserter_sink_payload_error; + if (((soc_tx_gap_inserter_sink_valid & soc_tx_gap_inserter_sink_last) & soc_tx_gap_inserter_sink_ready)) begin + vns_liteethmacgap_next_state <= 1'd1; + end + end + endcase +end +assign soc_preamble_inserter_source_payload_last_be = soc_preamble_inserter_sink_payload_last_be; +always @(*) begin + soc_preamble_inserter_source_payload_error <= 1'd0; + vns_liteethmacpreambleinserter_next_state <= 2'd0; + soc_preamble_inserter_clr_cnt <= 1'd0; + soc_preamble_inserter_sink_ready <= 1'd0; + soc_preamble_inserter_inc_cnt <= 1'd0; + soc_preamble_inserter_source_valid <= 1'd0; + soc_preamble_inserter_source_first <= 1'd0; + soc_preamble_inserter_source_last <= 1'd0; + soc_preamble_inserter_source_payload_data <= 8'd0; + soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_sink_payload_data; + vns_liteethmacpreambleinserter_next_state <= vns_liteethmacpreambleinserter_state; + case (vns_liteethmacpreambleinserter_state) + 1'd1: begin + soc_preamble_inserter_source_valid <= 1'd1; + case (soc_preamble_inserter_cnt) + 1'd0: begin + soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[7:0]; + end + 1'd1: begin + soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[15:8]; + end + 2'd2: begin + soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[23:16]; + end + 2'd3: begin + soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[31:24]; + end + 3'd4: begin + soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[39:32]; + end + 3'd5: begin + soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[47:40]; + end + 3'd6: begin + soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[55:48]; + end + default: begin + soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[63:56]; + end + endcase + if ((soc_preamble_inserter_cnt == 3'd7)) begin + if (soc_preamble_inserter_source_ready) begin + vns_liteethmacpreambleinserter_next_state <= 2'd2; + end + end else begin + soc_preamble_inserter_inc_cnt <= soc_preamble_inserter_source_ready; + end + end + 2'd2: begin + soc_preamble_inserter_source_valid <= soc_preamble_inserter_sink_valid; + soc_preamble_inserter_sink_ready <= soc_preamble_inserter_source_ready; + soc_preamble_inserter_source_first <= soc_preamble_inserter_sink_first; + soc_preamble_inserter_source_last <= soc_preamble_inserter_sink_last; + soc_preamble_inserter_source_payload_error <= soc_preamble_inserter_sink_payload_error; + if (((soc_preamble_inserter_sink_valid & soc_preamble_inserter_sink_last) & soc_preamble_inserter_source_ready)) begin + vns_liteethmacpreambleinserter_next_state <= 1'd0; + end + end + default: begin + soc_preamble_inserter_sink_ready <= 1'd1; + soc_preamble_inserter_clr_cnt <= 1'd1; + if (soc_preamble_inserter_sink_valid) begin + soc_preamble_inserter_sink_ready <= 1'd0; + vns_liteethmacpreambleinserter_next_state <= 1'd1; + end + end + endcase +end +assign soc_preamble_checker_source_payload_data = soc_preamble_checker_sink_payload_data; +assign soc_preamble_checker_source_payload_last_be = soc_preamble_checker_sink_payload_last_be; +always @(*) begin + soc_preamble_checker_source_payload_error <= 1'd0; + soc_preamble_checker_error <= 1'd0; + soc_preamble_checker_source_valid <= 1'd0; + soc_preamble_checker_source_first <= 1'd0; + soc_preamble_checker_sink_ready <= 1'd0; + soc_preamble_checker_source_last <= 1'd0; + vns_liteethmacpreamblechecker_next_state <= 1'd0; + vns_liteethmacpreamblechecker_next_state <= vns_liteethmacpreamblechecker_state; + case (vns_liteethmacpreamblechecker_state) + 1'd1: begin + soc_preamble_checker_source_valid <= soc_preamble_checker_sink_valid; + soc_preamble_checker_sink_ready <= soc_preamble_checker_source_ready; + soc_preamble_checker_source_first <= soc_preamble_checker_sink_first; + soc_preamble_checker_source_last <= soc_preamble_checker_sink_last; + soc_preamble_checker_source_payload_error <= soc_preamble_checker_sink_payload_error; + if (((soc_preamble_checker_source_valid & soc_preamble_checker_source_last) & soc_preamble_checker_source_ready)) begin + vns_liteethmacpreamblechecker_next_state <= 1'd0; + end + end + default: begin + soc_preamble_checker_sink_ready <= 1'd1; + if (((soc_preamble_checker_sink_valid & (~soc_preamble_checker_sink_last)) & (soc_preamble_checker_sink_payload_data == 8'd213))) begin + vns_liteethmacpreamblechecker_next_state <= 1'd1; + end + if ((soc_preamble_checker_sink_valid & soc_preamble_checker_sink_last)) begin + soc_preamble_checker_error <= 1'd1; + end + end + endcase +end +assign soc_crc32_inserter_cnt_done = (soc_crc32_inserter_cnt == 1'd0); +assign soc_crc32_inserter_data1 = soc_crc32_inserter_data0; +assign soc_crc32_inserter_last = soc_crc32_inserter_reg; +assign soc_crc32_inserter_value = (~{soc_crc32_inserter_reg[0], soc_crc32_inserter_reg[1], soc_crc32_inserter_reg[2], soc_crc32_inserter_reg[3], soc_crc32_inserter_reg[4], soc_crc32_inserter_reg[5], soc_crc32_inserter_reg[6], soc_crc32_inserter_reg[7], soc_crc32_inserter_reg[8], soc_crc32_inserter_reg[9], soc_crc32_inserter_reg[10], soc_crc32_inserter_reg[11], soc_crc32_inserter_reg[12], soc_crc32_inserter_reg[13], soc_crc32_inserter_reg[14], soc_crc32_inserter_reg[15], soc_crc32_inserter_reg[16], soc_crc32_inserter_reg[17], soc_crc32_inserter_reg[18], soc_crc32_inserter_reg[19], soc_crc32_inserter_reg[20], soc_crc32_inserter_reg[21], soc_crc32_inserter_reg[22], soc_crc32_inserter_reg[23], soc_crc32_inserter_reg[24], soc_crc32_inserter_reg[25], soc_crc32_inserter_reg[26], soc_crc32_inserter_reg[27], soc_crc32_inserter_reg[28], soc_crc32_inserter_reg[29], soc_crc32_inserter_reg[30], soc_crc32_inserter_reg[31]}); +assign soc_crc32_inserter_error = (soc_crc32_inserter_next != 32'd3338984827); +always @(*) begin + soc_crc32_inserter_next <= 32'd0; + soc_crc32_inserter_next[0] <= (((soc_crc32_inserter_last[24] ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[1] <= (((((((soc_crc32_inserter_last[25] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[2] <= (((((((((soc_crc32_inserter_last[26] ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[3] <= (((((((soc_crc32_inserter_last[27] ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); + soc_crc32_inserter_next[4] <= (((((((((soc_crc32_inserter_last[28] ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[5] <= (((((((((((((soc_crc32_inserter_last[29] ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[6] <= (((((((((((soc_crc32_inserter_last[30] ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); + soc_crc32_inserter_next[7] <= (((((((((soc_crc32_inserter_last[31] ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[8] <= ((((((((soc_crc32_inserter_last[0] ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[9] <= ((((((((soc_crc32_inserter_last[1] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]); + soc_crc32_inserter_next[10] <= ((((((((soc_crc32_inserter_last[2] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[11] <= ((((((((soc_crc32_inserter_last[3] ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[12] <= ((((((((((((soc_crc32_inserter_last[4] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[13] <= ((((((((((((soc_crc32_inserter_last[5] ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); + soc_crc32_inserter_next[14] <= ((((((((((soc_crc32_inserter_last[6] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]); + soc_crc32_inserter_next[15] <= ((((((((soc_crc32_inserter_last[7] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]); + soc_crc32_inserter_next[16] <= ((((((soc_crc32_inserter_last[8] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[17] <= ((((((soc_crc32_inserter_last[9] ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]); + soc_crc32_inserter_next[18] <= ((((((soc_crc32_inserter_last[10] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]); + soc_crc32_inserter_next[19] <= ((((soc_crc32_inserter_last[11] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]); + soc_crc32_inserter_next[20] <= ((soc_crc32_inserter_last[12] ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]); + soc_crc32_inserter_next[21] <= ((soc_crc32_inserter_last[13] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]); + soc_crc32_inserter_next[22] <= ((soc_crc32_inserter_last[14] ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[23] <= ((((((soc_crc32_inserter_last[15] ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[24] <= ((((((soc_crc32_inserter_last[16] ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); + soc_crc32_inserter_next[25] <= ((((soc_crc32_inserter_last[17] ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]); + soc_crc32_inserter_next[26] <= ((((((((soc_crc32_inserter_last[18] ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); + soc_crc32_inserter_next[27] <= ((((((((soc_crc32_inserter_last[19] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); + soc_crc32_inserter_next[28] <= ((((((soc_crc32_inserter_last[20] ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]); + soc_crc32_inserter_next[29] <= ((((((soc_crc32_inserter_last[21] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]); + soc_crc32_inserter_next[30] <= ((((soc_crc32_inserter_last[22] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]); + soc_crc32_inserter_next[31] <= ((soc_crc32_inserter_last[23] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]); +end +always @(*) begin + soc_crc32_inserter_source_first <= 1'd0; + soc_crc32_inserter_source_last <= 1'd0; + soc_crc32_inserter_source_payload_data <= 8'd0; + soc_crc32_inserter_source_payload_last_be <= 1'd0; + soc_crc32_inserter_source_payload_error <= 1'd0; + soc_crc32_inserter_data0 <= 8'd0; + vns_liteethmaccrc32inserter_next_state <= 2'd0; + soc_crc32_inserter_is_ongoing0 <= 1'd0; + soc_crc32_inserter_sink_ready <= 1'd0; + soc_crc32_inserter_is_ongoing1 <= 1'd0; + soc_crc32_inserter_ce <= 1'd0; + soc_crc32_inserter_reset <= 1'd0; + soc_crc32_inserter_source_valid <= 1'd0; + vns_liteethmaccrc32inserter_next_state <= vns_liteethmaccrc32inserter_state; + case (vns_liteethmaccrc32inserter_state) + 1'd1: begin + soc_crc32_inserter_ce <= (soc_crc32_inserter_sink_valid & soc_crc32_inserter_source_ready); + soc_crc32_inserter_data0 <= soc_crc32_inserter_sink_payload_data; + soc_crc32_inserter_source_valid <= soc_crc32_inserter_sink_valid; + soc_crc32_inserter_sink_ready <= soc_crc32_inserter_source_ready; + soc_crc32_inserter_source_first <= soc_crc32_inserter_sink_first; + soc_crc32_inserter_source_last <= soc_crc32_inserter_sink_last; + soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_sink_payload_data; + soc_crc32_inserter_source_payload_last_be <= soc_crc32_inserter_sink_payload_last_be; + soc_crc32_inserter_source_payload_error <= soc_crc32_inserter_sink_payload_error; + soc_crc32_inserter_source_last <= 1'd0; + if (((soc_crc32_inserter_sink_valid & soc_crc32_inserter_sink_last) & soc_crc32_inserter_source_ready)) begin + vns_liteethmaccrc32inserter_next_state <= 2'd2; + end + end + 2'd2: begin + soc_crc32_inserter_source_valid <= 1'd1; + case (soc_crc32_inserter_cnt) + 1'd0: begin + soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_value[31:24]; + end + 1'd1: begin + soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_value[23:16]; + end + 2'd2: begin + soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_value[15:8]; + end + default: begin + soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_value[7:0]; + end + endcase + if (soc_crc32_inserter_cnt_done) begin + soc_crc32_inserter_source_last <= 1'd1; + if (soc_crc32_inserter_source_ready) begin + vns_liteethmaccrc32inserter_next_state <= 1'd0; + end + end + soc_crc32_inserter_is_ongoing1 <= 1'd1; + end + default: begin + soc_crc32_inserter_reset <= 1'd1; + soc_crc32_inserter_sink_ready <= 1'd1; + if (soc_crc32_inserter_sink_valid) begin + soc_crc32_inserter_sink_ready <= 1'd0; + vns_liteethmaccrc32inserter_next_state <= 1'd1; + end + soc_crc32_inserter_is_ongoing0 <= 1'd1; + end + endcase +end +assign soc_crc32_checker_fifo_full = (soc_crc32_checker_syncfifo_level == 3'd4); +assign soc_crc32_checker_fifo_in = (soc_crc32_checker_sink_sink_valid & ((~soc_crc32_checker_fifo_full) | soc_crc32_checker_fifo_out)); +assign soc_crc32_checker_fifo_out = (soc_crc32_checker_source_source_valid & soc_crc32_checker_source_source_ready); +assign soc_crc32_checker_syncfifo_sink_first = soc_crc32_checker_sink_sink_first; +assign soc_crc32_checker_syncfifo_sink_last = soc_crc32_checker_sink_sink_last; +assign soc_crc32_checker_syncfifo_sink_payload_data = soc_crc32_checker_sink_sink_payload_data; +assign soc_crc32_checker_syncfifo_sink_payload_last_be = soc_crc32_checker_sink_sink_payload_last_be; +assign soc_crc32_checker_syncfifo_sink_payload_error = soc_crc32_checker_sink_sink_payload_error; +always @(*) begin + soc_crc32_checker_syncfifo_sink_valid <= 1'd0; + soc_crc32_checker_syncfifo_sink_valid <= soc_crc32_checker_sink_sink_valid; + soc_crc32_checker_syncfifo_sink_valid <= soc_crc32_checker_fifo_in; +end +always @(*) begin + soc_crc32_checker_sink_sink_ready <= 1'd0; + soc_crc32_checker_sink_sink_ready <= soc_crc32_checker_syncfifo_sink_ready; + soc_crc32_checker_sink_sink_ready <= soc_crc32_checker_fifo_in; +end +assign soc_crc32_checker_source_source_valid = (soc_crc32_checker_sink_sink_valid & soc_crc32_checker_fifo_full); +assign soc_crc32_checker_source_source_last = soc_crc32_checker_sink_sink_last; +assign soc_crc32_checker_syncfifo_source_ready = soc_crc32_checker_fifo_out; +assign soc_crc32_checker_source_source_payload_data = soc_crc32_checker_syncfifo_source_payload_data; +assign soc_crc32_checker_source_source_payload_last_be = soc_crc32_checker_syncfifo_source_payload_last_be; +always @(*) begin + soc_crc32_checker_source_source_payload_error <= 1'd0; + soc_crc32_checker_source_source_payload_error <= soc_crc32_checker_syncfifo_source_payload_error; + soc_crc32_checker_source_source_payload_error <= (soc_crc32_checker_sink_sink_payload_error | soc_crc32_checker_crc_error); +end +assign soc_crc32_checker_error = ((soc_crc32_checker_source_source_valid & soc_crc32_checker_source_source_last) & soc_crc32_checker_crc_error); +assign soc_crc32_checker_crc_data0 = soc_crc32_checker_sink_sink_payload_data; +assign soc_crc32_checker_crc_data1 = soc_crc32_checker_crc_data0; +assign soc_crc32_checker_crc_last = soc_crc32_checker_crc_reg; +assign soc_crc32_checker_crc_value = (~{soc_crc32_checker_crc_reg[0], soc_crc32_checker_crc_reg[1], soc_crc32_checker_crc_reg[2], soc_crc32_checker_crc_reg[3], soc_crc32_checker_crc_reg[4], soc_crc32_checker_crc_reg[5], soc_crc32_checker_crc_reg[6], soc_crc32_checker_crc_reg[7], soc_crc32_checker_crc_reg[8], soc_crc32_checker_crc_reg[9], soc_crc32_checker_crc_reg[10], soc_crc32_checker_crc_reg[11], soc_crc32_checker_crc_reg[12], soc_crc32_checker_crc_reg[13], soc_crc32_checker_crc_reg[14], soc_crc32_checker_crc_reg[15], soc_crc32_checker_crc_reg[16], soc_crc32_checker_crc_reg[17], soc_crc32_checker_crc_reg[18], soc_crc32_checker_crc_reg[19], soc_crc32_checker_crc_reg[20], soc_crc32_checker_crc_reg[21], soc_crc32_checker_crc_reg[22], soc_crc32_checker_crc_reg[23], soc_crc32_checker_crc_reg[24], soc_crc32_checker_crc_reg[25], soc_crc32_checker_crc_reg[26], soc_crc32_checker_crc_reg[27], soc_crc32_checker_crc_reg[28], soc_crc32_checker_crc_reg[29], soc_crc32_checker_crc_reg[30], soc_crc32_checker_crc_reg[31]}); +assign soc_crc32_checker_crc_error = (soc_crc32_checker_crc_next != 32'd3338984827); +always @(*) begin + soc_crc32_checker_crc_next <= 32'd0; + soc_crc32_checker_crc_next[0] <= (((soc_crc32_checker_crc_last[24] ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[1] <= (((((((soc_crc32_checker_crc_last[25] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[2] <= (((((((((soc_crc32_checker_crc_last[26] ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[3] <= (((((((soc_crc32_checker_crc_last[27] ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); + soc_crc32_checker_crc_next[4] <= (((((((((soc_crc32_checker_crc_last[28] ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[5] <= (((((((((((((soc_crc32_checker_crc_last[29] ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[6] <= (((((((((((soc_crc32_checker_crc_last[30] ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); + soc_crc32_checker_crc_next[7] <= (((((((((soc_crc32_checker_crc_last[31] ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[8] <= ((((((((soc_crc32_checker_crc_last[0] ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[9] <= ((((((((soc_crc32_checker_crc_last[1] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]); + soc_crc32_checker_crc_next[10] <= ((((((((soc_crc32_checker_crc_last[2] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[11] <= ((((((((soc_crc32_checker_crc_last[3] ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[12] <= ((((((((((((soc_crc32_checker_crc_last[4] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[13] <= ((((((((((((soc_crc32_checker_crc_last[5] ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); + soc_crc32_checker_crc_next[14] <= ((((((((((soc_crc32_checker_crc_last[6] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]); + soc_crc32_checker_crc_next[15] <= ((((((((soc_crc32_checker_crc_last[7] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]); + soc_crc32_checker_crc_next[16] <= ((((((soc_crc32_checker_crc_last[8] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[17] <= ((((((soc_crc32_checker_crc_last[9] ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]); + soc_crc32_checker_crc_next[18] <= ((((((soc_crc32_checker_crc_last[10] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]); + soc_crc32_checker_crc_next[19] <= ((((soc_crc32_checker_crc_last[11] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]); + soc_crc32_checker_crc_next[20] <= ((soc_crc32_checker_crc_last[12] ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]); + soc_crc32_checker_crc_next[21] <= ((soc_crc32_checker_crc_last[13] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]); + soc_crc32_checker_crc_next[22] <= ((soc_crc32_checker_crc_last[14] ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[23] <= ((((((soc_crc32_checker_crc_last[15] ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[24] <= ((((((soc_crc32_checker_crc_last[16] ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); + soc_crc32_checker_crc_next[25] <= ((((soc_crc32_checker_crc_last[17] ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]); + soc_crc32_checker_crc_next[26] <= ((((((((soc_crc32_checker_crc_last[18] ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); + soc_crc32_checker_crc_next[27] <= ((((((((soc_crc32_checker_crc_last[19] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); + soc_crc32_checker_crc_next[28] <= ((((((soc_crc32_checker_crc_last[20] ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]); + soc_crc32_checker_crc_next[29] <= ((((((soc_crc32_checker_crc_last[21] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]); + soc_crc32_checker_crc_next[30] <= ((((soc_crc32_checker_crc_last[22] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]); + soc_crc32_checker_crc_next[31] <= ((soc_crc32_checker_crc_last[23] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]); +end +assign soc_crc32_checker_syncfifo_syncfifo_din = {soc_crc32_checker_syncfifo_fifo_in_last, soc_crc32_checker_syncfifo_fifo_in_first, soc_crc32_checker_syncfifo_fifo_in_payload_error, soc_crc32_checker_syncfifo_fifo_in_payload_last_be, soc_crc32_checker_syncfifo_fifo_in_payload_data}; +assign {soc_crc32_checker_syncfifo_fifo_out_last, soc_crc32_checker_syncfifo_fifo_out_first, soc_crc32_checker_syncfifo_fifo_out_payload_error, soc_crc32_checker_syncfifo_fifo_out_payload_last_be, soc_crc32_checker_syncfifo_fifo_out_payload_data} = soc_crc32_checker_syncfifo_syncfifo_dout; +assign soc_crc32_checker_syncfifo_sink_ready = soc_crc32_checker_syncfifo_syncfifo_writable; +assign soc_crc32_checker_syncfifo_syncfifo_we = soc_crc32_checker_syncfifo_sink_valid; +assign soc_crc32_checker_syncfifo_fifo_in_first = soc_crc32_checker_syncfifo_sink_first; +assign soc_crc32_checker_syncfifo_fifo_in_last = soc_crc32_checker_syncfifo_sink_last; +assign soc_crc32_checker_syncfifo_fifo_in_payload_data = soc_crc32_checker_syncfifo_sink_payload_data; +assign soc_crc32_checker_syncfifo_fifo_in_payload_last_be = soc_crc32_checker_syncfifo_sink_payload_last_be; +assign soc_crc32_checker_syncfifo_fifo_in_payload_error = soc_crc32_checker_syncfifo_sink_payload_error; +assign soc_crc32_checker_syncfifo_source_valid = soc_crc32_checker_syncfifo_syncfifo_readable; +assign soc_crc32_checker_syncfifo_source_first = soc_crc32_checker_syncfifo_fifo_out_first; +assign soc_crc32_checker_syncfifo_source_last = soc_crc32_checker_syncfifo_fifo_out_last; +assign soc_crc32_checker_syncfifo_source_payload_data = soc_crc32_checker_syncfifo_fifo_out_payload_data; +assign soc_crc32_checker_syncfifo_source_payload_last_be = soc_crc32_checker_syncfifo_fifo_out_payload_last_be; +assign soc_crc32_checker_syncfifo_source_payload_error = soc_crc32_checker_syncfifo_fifo_out_payload_error; +assign soc_crc32_checker_syncfifo_syncfifo_re = soc_crc32_checker_syncfifo_source_ready; +always @(*) begin + soc_crc32_checker_syncfifo_wrport_adr <= 3'd0; + if (soc_crc32_checker_syncfifo_replace) begin + soc_crc32_checker_syncfifo_wrport_adr <= (soc_crc32_checker_syncfifo_produce - 1'd1); + end else begin + soc_crc32_checker_syncfifo_wrport_adr <= soc_crc32_checker_syncfifo_produce; + end +end +assign soc_crc32_checker_syncfifo_wrport_dat_w = soc_crc32_checker_syncfifo_syncfifo_din; +assign soc_crc32_checker_syncfifo_wrport_we = (soc_crc32_checker_syncfifo_syncfifo_we & (soc_crc32_checker_syncfifo_syncfifo_writable | soc_crc32_checker_syncfifo_replace)); +assign soc_crc32_checker_syncfifo_do_read = (soc_crc32_checker_syncfifo_syncfifo_readable & soc_crc32_checker_syncfifo_syncfifo_re); +assign soc_crc32_checker_syncfifo_rdport_adr = soc_crc32_checker_syncfifo_consume; +assign soc_crc32_checker_syncfifo_syncfifo_dout = soc_crc32_checker_syncfifo_rdport_dat_r; +assign soc_crc32_checker_syncfifo_syncfifo_writable = (soc_crc32_checker_syncfifo_level != 3'd5); +assign soc_crc32_checker_syncfifo_syncfifo_readable = (soc_crc32_checker_syncfifo_level != 1'd0); +always @(*) begin + soc_crc32_checker_crc_ce <= 1'd0; + vns_liteethmaccrc32checker_next_state <= 2'd0; + soc_crc32_checker_crc_reset <= 1'd0; + soc_crc32_checker_fifo_reset <= 1'd0; + vns_liteethmaccrc32checker_next_state <= vns_liteethmaccrc32checker_state; + case (vns_liteethmaccrc32checker_state) + 1'd1: begin + if ((soc_crc32_checker_sink_sink_valid & soc_crc32_checker_sink_sink_ready)) begin + soc_crc32_checker_crc_ce <= 1'd1; + vns_liteethmaccrc32checker_next_state <= 2'd2; + end + end + 2'd2: begin + if ((soc_crc32_checker_sink_sink_valid & soc_crc32_checker_sink_sink_ready)) begin + soc_crc32_checker_crc_ce <= 1'd1; + if (soc_crc32_checker_sink_sink_last) begin + vns_liteethmaccrc32checker_next_state <= 1'd0; + end + end + end + default: begin + soc_crc32_checker_crc_reset <= 1'd1; + soc_crc32_checker_fifo_reset <= 1'd1; + vns_liteethmaccrc32checker_next_state <= 1'd1; + end + endcase +end +assign soc_ps_preamble_error_o = (soc_ps_preamble_error_toggle_o ^ soc_ps_preamble_error_toggle_o_r); +assign soc_ps_crc_error_o = (soc_ps_crc_error_toggle_o ^ soc_ps_crc_error_toggle_o_r); +assign soc_padding_inserter_counter_done = (soc_padding_inserter_counter >= 6'd59); +always @(*) begin + soc_padding_inserter_source_valid <= 1'd0; + soc_padding_inserter_source_first <= 1'd0; + soc_padding_inserter_source_last <= 1'd0; + soc_padding_inserter_source_payload_data <= 8'd0; + soc_padding_inserter_source_payload_last_be <= 1'd0; + soc_padding_inserter_source_payload_error <= 1'd0; + vns_liteethmacpaddinginserter_next_state <= 1'd0; + soc_padding_inserter_counter_reset <= 1'd0; + soc_padding_inserter_sink_ready <= 1'd0; + soc_padding_inserter_counter_ce <= 1'd0; + vns_liteethmacpaddinginserter_next_state <= vns_liteethmacpaddinginserter_state; + case (vns_liteethmacpaddinginserter_state) + 1'd1: begin + soc_padding_inserter_source_valid <= 1'd1; + soc_padding_inserter_source_last <= soc_padding_inserter_counter_done; + soc_padding_inserter_source_payload_data <= 1'd0; + if ((soc_padding_inserter_source_valid & soc_padding_inserter_source_ready)) begin + soc_padding_inserter_counter_ce <= 1'd1; + if (soc_padding_inserter_counter_done) begin + soc_padding_inserter_counter_reset <= 1'd1; + vns_liteethmacpaddinginserter_next_state <= 1'd0; + end + end + end + default: begin + soc_padding_inserter_source_valid <= soc_padding_inserter_sink_valid; + soc_padding_inserter_sink_ready <= soc_padding_inserter_source_ready; + soc_padding_inserter_source_first <= soc_padding_inserter_sink_first; + soc_padding_inserter_source_last <= soc_padding_inserter_sink_last; + soc_padding_inserter_source_payload_data <= soc_padding_inserter_sink_payload_data; + soc_padding_inserter_source_payload_last_be <= soc_padding_inserter_sink_payload_last_be; + soc_padding_inserter_source_payload_error <= soc_padding_inserter_sink_payload_error; + if ((soc_padding_inserter_source_valid & soc_padding_inserter_source_ready)) begin + soc_padding_inserter_counter_ce <= 1'd1; + if (soc_padding_inserter_sink_last) begin + if ((~soc_padding_inserter_counter_done)) begin + soc_padding_inserter_source_last <= 1'd0; + vns_liteethmacpaddinginserter_next_state <= 1'd1; + end else begin + soc_padding_inserter_counter_reset <= 1'd1; + end + end + end + end + endcase +end +assign soc_padding_checker_source_valid = soc_padding_checker_sink_valid; +assign soc_padding_checker_sink_ready = soc_padding_checker_source_ready; +assign soc_padding_checker_source_first = soc_padding_checker_sink_first; +assign soc_padding_checker_source_last = soc_padding_checker_sink_last; +assign soc_padding_checker_source_payload_data = soc_padding_checker_sink_payload_data; +assign soc_padding_checker_source_payload_last_be = soc_padding_checker_sink_payload_last_be; +assign soc_padding_checker_source_payload_error = soc_padding_checker_sink_payload_error; +assign soc_tx_last_be_source_valid = (soc_tx_last_be_sink_valid & soc_tx_last_be_ongoing); +assign soc_tx_last_be_source_last = soc_tx_last_be_sink_payload_last_be; +assign soc_tx_last_be_source_payload_data = soc_tx_last_be_sink_payload_data; +assign soc_tx_last_be_sink_ready = soc_tx_last_be_source_ready; +assign soc_rx_last_be_source_valid = soc_rx_last_be_sink_valid; +assign soc_rx_last_be_sink_ready = soc_rx_last_be_source_ready; +assign soc_rx_last_be_source_first = soc_rx_last_be_sink_first; +assign soc_rx_last_be_source_last = soc_rx_last_be_sink_last; +assign soc_rx_last_be_source_payload_data = soc_rx_last_be_sink_payload_data; +assign soc_rx_last_be_source_payload_error = soc_rx_last_be_sink_payload_error; +always @(*) begin + soc_rx_last_be_source_payload_last_be <= 1'd0; + soc_rx_last_be_source_payload_last_be <= soc_rx_last_be_sink_payload_last_be; + soc_rx_last_be_source_payload_last_be <= soc_rx_last_be_sink_last; +end +assign soc_tx_converter_converter_sink_valid = soc_tx_converter_sink_valid; +assign soc_tx_converter_converter_sink_first = soc_tx_converter_sink_first; +assign soc_tx_converter_converter_sink_last = soc_tx_converter_sink_last; +assign soc_tx_converter_sink_ready = soc_tx_converter_converter_sink_ready; +always @(*) begin + soc_tx_converter_converter_sink_payload_data <= 40'd0; + soc_tx_converter_converter_sink_payload_data[7:0] <= soc_tx_converter_sink_payload_data[7:0]; + soc_tx_converter_converter_sink_payload_data[8] <= soc_tx_converter_sink_payload_last_be[0]; + soc_tx_converter_converter_sink_payload_data[9] <= soc_tx_converter_sink_payload_error[0]; + soc_tx_converter_converter_sink_payload_data[17:10] <= soc_tx_converter_sink_payload_data[15:8]; + soc_tx_converter_converter_sink_payload_data[18] <= soc_tx_converter_sink_payload_last_be[1]; + soc_tx_converter_converter_sink_payload_data[19] <= soc_tx_converter_sink_payload_error[1]; + soc_tx_converter_converter_sink_payload_data[27:20] <= soc_tx_converter_sink_payload_data[23:16]; + soc_tx_converter_converter_sink_payload_data[28] <= soc_tx_converter_sink_payload_last_be[2]; + soc_tx_converter_converter_sink_payload_data[29] <= soc_tx_converter_sink_payload_error[2]; + soc_tx_converter_converter_sink_payload_data[37:30] <= soc_tx_converter_sink_payload_data[31:24]; + soc_tx_converter_converter_sink_payload_data[38] <= soc_tx_converter_sink_payload_last_be[3]; + soc_tx_converter_converter_sink_payload_data[39] <= soc_tx_converter_sink_payload_error[3]; +end +assign soc_tx_converter_source_valid = soc_tx_converter_source_source_valid; +assign soc_tx_converter_source_first = soc_tx_converter_source_source_first; +assign soc_tx_converter_source_last = soc_tx_converter_source_source_last; +assign soc_tx_converter_source_source_ready = soc_tx_converter_source_ready; +assign {soc_tx_converter_source_payload_error, soc_tx_converter_source_payload_last_be, soc_tx_converter_source_payload_data} = soc_tx_converter_source_source_payload_data; +assign soc_tx_converter_source_source_valid = soc_tx_converter_converter_source_valid; +assign soc_tx_converter_converter_source_ready = soc_tx_converter_source_source_ready; +assign soc_tx_converter_source_source_first = soc_tx_converter_converter_source_first; +assign soc_tx_converter_source_source_last = soc_tx_converter_converter_source_last; +assign soc_tx_converter_source_source_payload_data = soc_tx_converter_converter_source_payload_data; +assign soc_tx_converter_converter_first = (soc_tx_converter_converter_mux == 1'd0); +assign soc_tx_converter_converter_last = (soc_tx_converter_converter_mux == 2'd3); +assign soc_tx_converter_converter_source_valid = soc_tx_converter_converter_sink_valid; +assign soc_tx_converter_converter_source_first = (soc_tx_converter_converter_sink_first & soc_tx_converter_converter_first); +assign soc_tx_converter_converter_source_last = (soc_tx_converter_converter_sink_last & soc_tx_converter_converter_last); +assign soc_tx_converter_converter_sink_ready = (soc_tx_converter_converter_last & soc_tx_converter_converter_source_ready); +always @(*) begin + soc_tx_converter_converter_source_payload_data <= 10'd0; + case (soc_tx_converter_converter_mux) + 1'd0: begin + soc_tx_converter_converter_source_payload_data <= soc_tx_converter_converter_sink_payload_data[9:0]; + end + 1'd1: begin + soc_tx_converter_converter_source_payload_data <= soc_tx_converter_converter_sink_payload_data[19:10]; + end + 2'd2: begin + soc_tx_converter_converter_source_payload_data <= soc_tx_converter_converter_sink_payload_data[29:20]; + end + default: begin + soc_tx_converter_converter_source_payload_data <= soc_tx_converter_converter_sink_payload_data[39:30]; + end + endcase +end +assign soc_tx_converter_converter_source_payload_valid_token_count = soc_tx_converter_converter_last; +assign soc_rx_converter_converter_sink_valid = soc_rx_converter_sink_valid; +assign soc_rx_converter_converter_sink_first = soc_rx_converter_sink_first; +assign soc_rx_converter_converter_sink_last = soc_rx_converter_sink_last; +assign soc_rx_converter_sink_ready = soc_rx_converter_converter_sink_ready; +assign soc_rx_converter_converter_sink_payload_data = {soc_rx_converter_sink_payload_error, soc_rx_converter_sink_payload_last_be, soc_rx_converter_sink_payload_data}; +assign soc_rx_converter_source_valid = soc_rx_converter_source_source_valid; +assign soc_rx_converter_source_first = soc_rx_converter_source_source_first; +assign soc_rx_converter_source_last = soc_rx_converter_source_source_last; +assign soc_rx_converter_source_source_ready = soc_rx_converter_source_ready; +always @(*) begin + soc_rx_converter_source_payload_data <= 32'd0; + soc_rx_converter_source_payload_data[7:0] <= soc_rx_converter_source_source_payload_data[7:0]; + soc_rx_converter_source_payload_data[15:8] <= soc_rx_converter_source_source_payload_data[17:10]; + soc_rx_converter_source_payload_data[23:16] <= soc_rx_converter_source_source_payload_data[27:20]; + soc_rx_converter_source_payload_data[31:24] <= soc_rx_converter_source_source_payload_data[37:30]; +end +always @(*) begin + soc_rx_converter_source_payload_last_be <= 4'd0; + soc_rx_converter_source_payload_last_be[0] <= soc_rx_converter_source_source_payload_data[8]; + soc_rx_converter_source_payload_last_be[1] <= soc_rx_converter_source_source_payload_data[18]; + soc_rx_converter_source_payload_last_be[2] <= soc_rx_converter_source_source_payload_data[28]; + soc_rx_converter_source_payload_last_be[3] <= soc_rx_converter_source_source_payload_data[38]; +end +always @(*) begin + soc_rx_converter_source_payload_error <= 4'd0; + soc_rx_converter_source_payload_error[0] <= soc_rx_converter_source_source_payload_data[9]; + soc_rx_converter_source_payload_error[1] <= soc_rx_converter_source_source_payload_data[19]; + soc_rx_converter_source_payload_error[2] <= soc_rx_converter_source_source_payload_data[29]; + soc_rx_converter_source_payload_error[3] <= soc_rx_converter_source_source_payload_data[39]; +end +assign soc_rx_converter_source_source_valid = soc_rx_converter_converter_source_valid; +assign soc_rx_converter_converter_source_ready = soc_rx_converter_source_source_ready; +assign soc_rx_converter_source_source_first = soc_rx_converter_converter_source_first; +assign soc_rx_converter_source_source_last = soc_rx_converter_converter_source_last; +assign soc_rx_converter_source_source_payload_data = soc_rx_converter_converter_source_payload_data; +assign soc_rx_converter_converter_sink_ready = ((~soc_rx_converter_converter_strobe_all) | soc_rx_converter_converter_source_ready); +assign soc_rx_converter_converter_source_valid = soc_rx_converter_converter_strobe_all; +assign soc_rx_converter_converter_load_part = (soc_rx_converter_converter_sink_valid & soc_rx_converter_converter_sink_ready); +assign soc_tx_cdc_asyncfifo_din = {soc_tx_cdc_fifo_in_last, soc_tx_cdc_fifo_in_first, soc_tx_cdc_fifo_in_payload_error, soc_tx_cdc_fifo_in_payload_last_be, soc_tx_cdc_fifo_in_payload_data}; +assign {soc_tx_cdc_fifo_out_last, soc_tx_cdc_fifo_out_first, soc_tx_cdc_fifo_out_payload_error, soc_tx_cdc_fifo_out_payload_last_be, soc_tx_cdc_fifo_out_payload_data} = soc_tx_cdc_asyncfifo_dout; +assign soc_tx_cdc_sink_ready = soc_tx_cdc_asyncfifo_writable; +assign soc_tx_cdc_asyncfifo_we = soc_tx_cdc_sink_valid; +assign soc_tx_cdc_fifo_in_first = soc_tx_cdc_sink_first; +assign soc_tx_cdc_fifo_in_last = soc_tx_cdc_sink_last; +assign soc_tx_cdc_fifo_in_payload_data = soc_tx_cdc_sink_payload_data; +assign soc_tx_cdc_fifo_in_payload_last_be = soc_tx_cdc_sink_payload_last_be; +assign soc_tx_cdc_fifo_in_payload_error = soc_tx_cdc_sink_payload_error; +assign soc_tx_cdc_source_valid = soc_tx_cdc_asyncfifo_readable; +assign soc_tx_cdc_source_first = soc_tx_cdc_fifo_out_first; +assign soc_tx_cdc_source_last = soc_tx_cdc_fifo_out_last; +assign soc_tx_cdc_source_payload_data = soc_tx_cdc_fifo_out_payload_data; +assign soc_tx_cdc_source_payload_last_be = soc_tx_cdc_fifo_out_payload_last_be; +assign soc_tx_cdc_source_payload_error = soc_tx_cdc_fifo_out_payload_error; +assign soc_tx_cdc_asyncfifo_re = soc_tx_cdc_source_ready; +assign soc_tx_cdc_graycounter0_ce = (soc_tx_cdc_asyncfifo_writable & soc_tx_cdc_asyncfifo_we); +assign soc_tx_cdc_graycounter1_ce = (soc_tx_cdc_asyncfifo_readable & soc_tx_cdc_asyncfifo_re); +assign soc_tx_cdc_asyncfifo_writable = (((soc_tx_cdc_graycounter0_q[6] == soc_tx_cdc_consume_wdomain[6]) | (soc_tx_cdc_graycounter0_q[5] == soc_tx_cdc_consume_wdomain[5])) | (soc_tx_cdc_graycounter0_q[4:0] != soc_tx_cdc_consume_wdomain[4:0])); +assign soc_tx_cdc_asyncfifo_readable = (soc_tx_cdc_graycounter1_q != soc_tx_cdc_produce_rdomain); +assign soc_tx_cdc_wrport_adr = soc_tx_cdc_graycounter0_q_binary[5:0]; +assign soc_tx_cdc_wrport_dat_w = soc_tx_cdc_asyncfifo_din; +assign soc_tx_cdc_wrport_we = soc_tx_cdc_graycounter0_ce; +assign soc_tx_cdc_rdport_adr = soc_tx_cdc_graycounter1_q_next_binary[5:0]; +assign soc_tx_cdc_asyncfifo_dout = soc_tx_cdc_rdport_dat_r; +always @(*) begin + soc_tx_cdc_graycounter0_q_next_binary <= 7'd0; + if (soc_tx_cdc_graycounter0_ce) begin + soc_tx_cdc_graycounter0_q_next_binary <= (soc_tx_cdc_graycounter0_q_binary + 1'd1); + end else begin + soc_tx_cdc_graycounter0_q_next_binary <= soc_tx_cdc_graycounter0_q_binary; + end +end +assign soc_tx_cdc_graycounter0_q_next = (soc_tx_cdc_graycounter0_q_next_binary ^ soc_tx_cdc_graycounter0_q_next_binary[6:1]); +always @(*) begin + soc_tx_cdc_graycounter1_q_next_binary <= 7'd0; + if (soc_tx_cdc_graycounter1_ce) begin + soc_tx_cdc_graycounter1_q_next_binary <= (soc_tx_cdc_graycounter1_q_binary + 1'd1); + end else begin + soc_tx_cdc_graycounter1_q_next_binary <= soc_tx_cdc_graycounter1_q_binary; + end +end +assign soc_tx_cdc_graycounter1_q_next = (soc_tx_cdc_graycounter1_q_next_binary ^ soc_tx_cdc_graycounter1_q_next_binary[6:1]); +assign soc_rx_cdc_asyncfifo_din = {soc_rx_cdc_fifo_in_last, soc_rx_cdc_fifo_in_first, soc_rx_cdc_fifo_in_payload_error, soc_rx_cdc_fifo_in_payload_last_be, soc_rx_cdc_fifo_in_payload_data}; +assign {soc_rx_cdc_fifo_out_last, soc_rx_cdc_fifo_out_first, soc_rx_cdc_fifo_out_payload_error, soc_rx_cdc_fifo_out_payload_last_be, soc_rx_cdc_fifo_out_payload_data} = soc_rx_cdc_asyncfifo_dout; +assign soc_rx_cdc_sink_ready = soc_rx_cdc_asyncfifo_writable; +assign soc_rx_cdc_asyncfifo_we = soc_rx_cdc_sink_valid; +assign soc_rx_cdc_fifo_in_first = soc_rx_cdc_sink_first; +assign soc_rx_cdc_fifo_in_last = soc_rx_cdc_sink_last; +assign soc_rx_cdc_fifo_in_payload_data = soc_rx_cdc_sink_payload_data; +assign soc_rx_cdc_fifo_in_payload_last_be = soc_rx_cdc_sink_payload_last_be; +assign soc_rx_cdc_fifo_in_payload_error = soc_rx_cdc_sink_payload_error; +assign soc_rx_cdc_source_valid = soc_rx_cdc_asyncfifo_readable; +assign soc_rx_cdc_source_first = soc_rx_cdc_fifo_out_first; +assign soc_rx_cdc_source_last = soc_rx_cdc_fifo_out_last; +assign soc_rx_cdc_source_payload_data = soc_rx_cdc_fifo_out_payload_data; +assign soc_rx_cdc_source_payload_last_be = soc_rx_cdc_fifo_out_payload_last_be; +assign soc_rx_cdc_source_payload_error = soc_rx_cdc_fifo_out_payload_error; +assign soc_rx_cdc_asyncfifo_re = soc_rx_cdc_source_ready; +assign soc_rx_cdc_graycounter0_ce = (soc_rx_cdc_asyncfifo_writable & soc_rx_cdc_asyncfifo_we); +assign soc_rx_cdc_graycounter1_ce = (soc_rx_cdc_asyncfifo_readable & soc_rx_cdc_asyncfifo_re); +assign soc_rx_cdc_asyncfifo_writable = (((soc_rx_cdc_graycounter0_q[6] == soc_rx_cdc_consume_wdomain[6]) | (soc_rx_cdc_graycounter0_q[5] == soc_rx_cdc_consume_wdomain[5])) | (soc_rx_cdc_graycounter0_q[4:0] != soc_rx_cdc_consume_wdomain[4:0])); +assign soc_rx_cdc_asyncfifo_readable = (soc_rx_cdc_graycounter1_q != soc_rx_cdc_produce_rdomain); +assign soc_rx_cdc_wrport_adr = soc_rx_cdc_graycounter0_q_binary[5:0]; +assign soc_rx_cdc_wrport_dat_w = soc_rx_cdc_asyncfifo_din; +assign soc_rx_cdc_wrport_we = soc_rx_cdc_graycounter0_ce; +assign soc_rx_cdc_rdport_adr = soc_rx_cdc_graycounter1_q_next_binary[5:0]; +assign soc_rx_cdc_asyncfifo_dout = soc_rx_cdc_rdport_dat_r; +always @(*) begin + soc_rx_cdc_graycounter0_q_next_binary <= 7'd0; + if (soc_rx_cdc_graycounter0_ce) begin + soc_rx_cdc_graycounter0_q_next_binary <= (soc_rx_cdc_graycounter0_q_binary + 1'd1); + end else begin + soc_rx_cdc_graycounter0_q_next_binary <= soc_rx_cdc_graycounter0_q_binary; + end +end +assign soc_rx_cdc_graycounter0_q_next = (soc_rx_cdc_graycounter0_q_next_binary ^ soc_rx_cdc_graycounter0_q_next_binary[6:1]); +always @(*) begin + soc_rx_cdc_graycounter1_q_next_binary <= 7'd0; + if (soc_rx_cdc_graycounter1_ce) begin + soc_rx_cdc_graycounter1_q_next_binary <= (soc_rx_cdc_graycounter1_q_binary + 1'd1); + end else begin + soc_rx_cdc_graycounter1_q_next_binary <= soc_rx_cdc_graycounter1_q_binary; + end +end +assign soc_rx_cdc_graycounter1_q_next = (soc_rx_cdc_graycounter1_q_next_binary ^ soc_rx_cdc_graycounter1_q_next_binary[6:1]); +assign soc_tx_converter_sink_valid = soc_tx_cdc_source_valid; +assign soc_tx_cdc_source_ready = soc_tx_converter_sink_ready; +assign soc_tx_converter_sink_first = soc_tx_cdc_source_first; +assign soc_tx_converter_sink_last = soc_tx_cdc_source_last; +assign soc_tx_converter_sink_payload_data = soc_tx_cdc_source_payload_data; +assign soc_tx_converter_sink_payload_last_be = soc_tx_cdc_source_payload_last_be; +assign soc_tx_converter_sink_payload_error = soc_tx_cdc_source_payload_error; +assign soc_tx_last_be_sink_valid = soc_tx_converter_source_valid; +assign soc_tx_converter_source_ready = soc_tx_last_be_sink_ready; +assign soc_tx_last_be_sink_first = soc_tx_converter_source_first; +assign soc_tx_last_be_sink_last = soc_tx_converter_source_last; +assign soc_tx_last_be_sink_payload_data = soc_tx_converter_source_payload_data; +assign soc_tx_last_be_sink_payload_last_be = soc_tx_converter_source_payload_last_be; +assign soc_tx_last_be_sink_payload_error = soc_tx_converter_source_payload_error; +assign soc_padding_inserter_sink_valid = soc_tx_last_be_source_valid; +assign soc_tx_last_be_source_ready = soc_padding_inserter_sink_ready; +assign soc_padding_inserter_sink_first = soc_tx_last_be_source_first; +assign soc_padding_inserter_sink_last = soc_tx_last_be_source_last; +assign soc_padding_inserter_sink_payload_data = soc_tx_last_be_source_payload_data; +assign soc_padding_inserter_sink_payload_last_be = soc_tx_last_be_source_payload_last_be; +assign soc_padding_inserter_sink_payload_error = soc_tx_last_be_source_payload_error; +assign soc_crc32_inserter_sink_valid = soc_padding_inserter_source_valid; +assign soc_padding_inserter_source_ready = soc_crc32_inserter_sink_ready; +assign soc_crc32_inserter_sink_first = soc_padding_inserter_source_first; +assign soc_crc32_inserter_sink_last = soc_padding_inserter_source_last; +assign soc_crc32_inserter_sink_payload_data = soc_padding_inserter_source_payload_data; +assign soc_crc32_inserter_sink_payload_last_be = soc_padding_inserter_source_payload_last_be; +assign soc_crc32_inserter_sink_payload_error = soc_padding_inserter_source_payload_error; +assign soc_preamble_inserter_sink_valid = soc_crc32_inserter_source_valid; +assign soc_crc32_inserter_source_ready = soc_preamble_inserter_sink_ready; +assign soc_preamble_inserter_sink_first = soc_crc32_inserter_source_first; +assign soc_preamble_inserter_sink_last = soc_crc32_inserter_source_last; +assign soc_preamble_inserter_sink_payload_data = soc_crc32_inserter_source_payload_data; +assign soc_preamble_inserter_sink_payload_last_be = soc_crc32_inserter_source_payload_last_be; +assign soc_preamble_inserter_sink_payload_error = soc_crc32_inserter_source_payload_error; +assign soc_tx_gap_inserter_sink_valid = soc_preamble_inserter_source_valid; +assign soc_preamble_inserter_source_ready = soc_tx_gap_inserter_sink_ready; +assign soc_tx_gap_inserter_sink_first = soc_preamble_inserter_source_first; +assign soc_tx_gap_inserter_sink_last = soc_preamble_inserter_source_last; +assign soc_tx_gap_inserter_sink_payload_data = soc_preamble_inserter_source_payload_data; +assign soc_tx_gap_inserter_sink_payload_last_be = soc_preamble_inserter_source_payload_last_be; +assign soc_tx_gap_inserter_sink_payload_error = soc_preamble_inserter_source_payload_error; +assign soc_liteethphymiitx_sink_sink_valid = soc_tx_gap_inserter_source_valid; +assign soc_tx_gap_inserter_source_ready = soc_liteethphymiitx_sink_sink_ready; +assign soc_liteethphymiitx_sink_sink_first = soc_tx_gap_inserter_source_first; +assign soc_liteethphymiitx_sink_sink_last = soc_tx_gap_inserter_source_last; +assign soc_liteethphymiitx_sink_sink_payload_data = soc_tx_gap_inserter_source_payload_data; +assign soc_liteethphymiitx_sink_sink_payload_last_be = soc_tx_gap_inserter_source_payload_last_be; +assign soc_liteethphymiitx_sink_sink_payload_error = soc_tx_gap_inserter_source_payload_error; +assign soc_preamble_checker_sink_valid = soc_liteethphymiirx_source_source_valid; +assign soc_liteethphymiirx_source_source_ready = soc_preamble_checker_sink_ready; +assign soc_preamble_checker_sink_first = soc_liteethphymiirx_source_source_first; +assign soc_preamble_checker_sink_last = soc_liteethphymiirx_source_source_last; +assign soc_preamble_checker_sink_payload_data = soc_liteethphymiirx_source_source_payload_data; +assign soc_preamble_checker_sink_payload_last_be = soc_liteethphymiirx_source_source_payload_last_be; +assign soc_preamble_checker_sink_payload_error = soc_liteethphymiirx_source_source_payload_error; +assign soc_crc32_checker_sink_sink_valid = soc_preamble_checker_source_valid; +assign soc_preamble_checker_source_ready = soc_crc32_checker_sink_sink_ready; +assign soc_crc32_checker_sink_sink_first = soc_preamble_checker_source_first; +assign soc_crc32_checker_sink_sink_last = soc_preamble_checker_source_last; +assign soc_crc32_checker_sink_sink_payload_data = soc_preamble_checker_source_payload_data; +assign soc_crc32_checker_sink_sink_payload_last_be = soc_preamble_checker_source_payload_last_be; +assign soc_crc32_checker_sink_sink_payload_error = soc_preamble_checker_source_payload_error; +assign soc_padding_checker_sink_valid = soc_crc32_checker_source_source_valid; +assign soc_crc32_checker_source_source_ready = soc_padding_checker_sink_ready; +assign soc_padding_checker_sink_first = soc_crc32_checker_source_source_first; +assign soc_padding_checker_sink_last = soc_crc32_checker_source_source_last; +assign soc_padding_checker_sink_payload_data = soc_crc32_checker_source_source_payload_data; +assign soc_padding_checker_sink_payload_last_be = soc_crc32_checker_source_source_payload_last_be; +assign soc_padding_checker_sink_payload_error = soc_crc32_checker_source_source_payload_error; +assign soc_rx_last_be_sink_valid = soc_padding_checker_source_valid; +assign soc_padding_checker_source_ready = soc_rx_last_be_sink_ready; +assign soc_rx_last_be_sink_first = soc_padding_checker_source_first; +assign soc_rx_last_be_sink_last = soc_padding_checker_source_last; +assign soc_rx_last_be_sink_payload_data = soc_padding_checker_source_payload_data; +assign soc_rx_last_be_sink_payload_last_be = soc_padding_checker_source_payload_last_be; +assign soc_rx_last_be_sink_payload_error = soc_padding_checker_source_payload_error; +assign soc_rx_converter_sink_valid = soc_rx_last_be_source_valid; +assign soc_rx_last_be_source_ready = soc_rx_converter_sink_ready; +assign soc_rx_converter_sink_first = soc_rx_last_be_source_first; +assign soc_rx_converter_sink_last = soc_rx_last_be_source_last; +assign soc_rx_converter_sink_payload_data = soc_rx_last_be_source_payload_data; +assign soc_rx_converter_sink_payload_last_be = soc_rx_last_be_source_payload_last_be; +assign soc_rx_converter_sink_payload_error = soc_rx_last_be_source_payload_error; +assign soc_rx_cdc_sink_valid = soc_rx_converter_source_valid; +assign soc_rx_converter_source_ready = soc_rx_cdc_sink_ready; +assign soc_rx_cdc_sink_first = soc_rx_converter_source_first; +assign soc_rx_cdc_sink_last = soc_rx_converter_source_last; +assign soc_rx_cdc_sink_payload_data = soc_rx_converter_source_payload_data; +assign soc_rx_cdc_sink_payload_last_be = soc_rx_converter_source_payload_last_be; +assign soc_rx_cdc_sink_payload_error = soc_rx_converter_source_payload_error; +assign soc_writer_sink_sink_valid = soc_sink_valid; +assign soc_sink_ready = soc_writer_sink_sink_ready; +assign soc_writer_sink_sink_first = soc_sink_first; +assign soc_writer_sink_sink_last = soc_sink_last; +assign soc_writer_sink_sink_payload_data = soc_sink_payload_data; +assign soc_writer_sink_sink_payload_last_be = soc_sink_payload_last_be; +assign soc_writer_sink_sink_payload_error = soc_sink_payload_error; +assign soc_source_valid = soc_reader_source_source_valid; +assign soc_reader_source_source_ready = soc_source_ready; +assign soc_source_first = soc_reader_source_source_first; +assign soc_source_last = soc_reader_source_source_last; +assign soc_source_payload_data = soc_reader_source_source_payload_data; +assign soc_source_payload_last_be = soc_reader_source_source_payload_last_be; +assign soc_source_payload_error = soc_reader_source_source_payload_error; +always @(*) begin + soc_writer_inc <= 3'd0; + case (soc_writer_sink_sink_payload_last_be) + 1'd1: begin + soc_writer_inc <= 1'd1; + end + 2'd2: begin + soc_writer_inc <= 2'd2; + end + 3'd4: begin + soc_writer_inc <= 2'd3; + end + default: begin + soc_writer_inc <= 3'd4; + end + endcase +end +assign soc_writer_fifo_sink_payload_slot = soc_writer_slot; +assign soc_writer_fifo_sink_payload_length = soc_writer_counter; +assign soc_writer_fifo_source_ready = soc_writer_available_clear; +assign soc_writer_available_trigger = soc_writer_fifo_source_valid; +assign soc_writer_slot_status = soc_writer_fifo_source_payload_slot; +assign soc_writer_length_status = soc_writer_fifo_source_payload_length; +always @(*) begin + soc_writer_memory0_adr <= 9'd0; + soc_writer_memory1_dat_w <= 32'd0; + soc_writer_memory0_we <= 1'd0; + soc_writer_memory0_dat_w <= 32'd0; + soc_writer_memory1_adr <= 9'd0; + soc_writer_memory1_we <= 1'd0; + case (soc_writer_slot) + 1'd0: begin + soc_writer_memory0_adr <= soc_writer_counter[31:2]; + soc_writer_memory0_dat_w <= soc_writer_sink_sink_payload_data; + if ((soc_writer_sink_sink_valid & soc_writer_ongoing)) begin + soc_writer_memory0_we <= 4'd15; + end + end + 1'd1: begin + soc_writer_memory1_adr <= soc_writer_counter[31:2]; + soc_writer_memory1_dat_w <= soc_writer_sink_sink_payload_data; + if ((soc_writer_sink_sink_valid & soc_writer_ongoing)) begin + soc_writer_memory1_we <= 4'd15; + end + end + endcase +end +assign soc_writer_status_w = soc_writer_available_status; +always @(*) begin + soc_writer_available_clear <= 1'd0; + if ((soc_writer_pending_re & soc_writer_pending_r)) begin + soc_writer_available_clear <= 1'd1; + end +end +assign soc_writer_pending_w = soc_writer_available_pending; +assign soc_writer_irq = (soc_writer_pending_w & soc_writer_storage); +assign soc_writer_available_status = soc_writer_available_trigger; +assign soc_writer_available_pending = soc_writer_available_trigger; +assign soc_writer_fifo_syncfifo_din = {soc_writer_fifo_fifo_in_last, soc_writer_fifo_fifo_in_first, soc_writer_fifo_fifo_in_payload_length, soc_writer_fifo_fifo_in_payload_slot}; +assign {soc_writer_fifo_fifo_out_last, soc_writer_fifo_fifo_out_first, soc_writer_fifo_fifo_out_payload_length, soc_writer_fifo_fifo_out_payload_slot} = soc_writer_fifo_syncfifo_dout; +assign soc_writer_fifo_sink_ready = soc_writer_fifo_syncfifo_writable; +assign soc_writer_fifo_syncfifo_we = soc_writer_fifo_sink_valid; +assign soc_writer_fifo_fifo_in_first = soc_writer_fifo_sink_first; +assign soc_writer_fifo_fifo_in_last = soc_writer_fifo_sink_last; +assign soc_writer_fifo_fifo_in_payload_slot = soc_writer_fifo_sink_payload_slot; +assign soc_writer_fifo_fifo_in_payload_length = soc_writer_fifo_sink_payload_length; +assign soc_writer_fifo_source_valid = soc_writer_fifo_syncfifo_readable; +assign soc_writer_fifo_source_first = soc_writer_fifo_fifo_out_first; +assign soc_writer_fifo_source_last = soc_writer_fifo_fifo_out_last; +assign soc_writer_fifo_source_payload_slot = soc_writer_fifo_fifo_out_payload_slot; +assign soc_writer_fifo_source_payload_length = soc_writer_fifo_fifo_out_payload_length; +assign soc_writer_fifo_syncfifo_re = soc_writer_fifo_source_ready; +always @(*) begin + soc_writer_fifo_wrport_adr <= 1'd0; + if (soc_writer_fifo_replace) begin + soc_writer_fifo_wrport_adr <= (soc_writer_fifo_produce - 1'd1); + end else begin + soc_writer_fifo_wrport_adr <= soc_writer_fifo_produce; + end +end +assign soc_writer_fifo_wrport_dat_w = soc_writer_fifo_syncfifo_din; +assign soc_writer_fifo_wrport_we = (soc_writer_fifo_syncfifo_we & (soc_writer_fifo_syncfifo_writable | soc_writer_fifo_replace)); +assign soc_writer_fifo_do_read = (soc_writer_fifo_syncfifo_readable & soc_writer_fifo_syncfifo_re); +assign soc_writer_fifo_rdport_adr = soc_writer_fifo_consume; +assign soc_writer_fifo_syncfifo_dout = soc_writer_fifo_rdport_dat_r; +assign soc_writer_fifo_syncfifo_writable = (soc_writer_fifo_level != 2'd2); +assign soc_writer_fifo_syncfifo_readable = (soc_writer_fifo_level != 1'd0); +always @(*) begin + soc_writer_slot_ce <= 1'd0; + soc_writer_errors_status_liteethmac_next_value <= 32'd0; + soc_writer_errors_status_liteethmac_next_value_ce <= 1'd0; + soc_writer_ongoing <= 1'd0; + soc_writer_fifo_sink_valid <= 1'd0; + soc_writer_counter_reset <= 1'd0; + soc_writer_counter_ce <= 1'd0; + vns_liteethmacsramwriter_next_state <= 3'd0; + vns_liteethmacsramwriter_next_state <= vns_liteethmacsramwriter_state; + case (vns_liteethmacsramwriter_state) + 1'd1: begin + if (soc_writer_sink_sink_valid) begin + if ((soc_writer_counter == 11'd1530)) begin + vns_liteethmacsramwriter_next_state <= 2'd3; + end else begin + soc_writer_counter_ce <= 1'd1; + soc_writer_ongoing <= 1'd1; + end + if (soc_writer_sink_sink_last) begin + if (((soc_writer_sink_sink_payload_error & soc_writer_sink_sink_payload_last_be) != 1'd0)) begin + vns_liteethmacsramwriter_next_state <= 2'd2; + end else begin + vns_liteethmacsramwriter_next_state <= 3'd4; + end + end + end + end + 2'd2: begin + soc_writer_counter_reset <= 1'd1; + vns_liteethmacsramwriter_next_state <= 1'd0; + end + 2'd3: begin + if ((soc_writer_sink_sink_valid & soc_writer_sink_sink_last)) begin + vns_liteethmacsramwriter_next_state <= 3'd4; + end + end + 3'd4: begin + soc_writer_counter_reset <= 1'd1; + soc_writer_slot_ce <= 1'd1; + soc_writer_fifo_sink_valid <= 1'd1; + vns_liteethmacsramwriter_next_state <= 1'd0; + end + default: begin + if (soc_writer_sink_sink_valid) begin + if (soc_writer_fifo_sink_ready) begin + soc_writer_ongoing <= 1'd1; + soc_writer_counter_ce <= 1'd1; + vns_liteethmacsramwriter_next_state <= 1'd1; + end else begin + soc_writer_errors_status_liteethmac_next_value <= (soc_writer_errors_status + 1'd1); + soc_writer_errors_status_liteethmac_next_value_ce <= 1'd1; + vns_liteethmacsramwriter_next_state <= 2'd3; + end + end + end + endcase +end +assign soc_reader_fifo_sink_valid = soc_reader_start_re; +assign soc_reader_fifo_sink_payload_slot = soc_reader_slot_storage; +assign soc_reader_fifo_sink_payload_length = soc_reader_length_storage; +assign soc_reader_ready_status = soc_reader_fifo_sink_ready; +assign soc_reader_level_status = soc_reader_fifo_level; +always @(*) begin + soc_reader_source_source_payload_last_be <= 4'd0; + if (soc_reader_last) begin + case (soc_reader_fifo_source_payload_length[1:0]) + 1'd0: begin + soc_reader_source_source_payload_last_be <= 4'd8; + end + 1'd1: begin + soc_reader_source_source_payload_last_be <= 1'd1; + end + 2'd2: begin + soc_reader_source_source_payload_last_be <= 2'd2; + end + 2'd3: begin + soc_reader_source_source_payload_last_be <= 3'd4; + end + endcase + end +end +assign soc_reader_last = ((soc_reader_counter + 3'd4) >= soc_reader_fifo_source_payload_length); +assign soc_reader_memory0_adr = soc_reader_counter[10:2]; +assign soc_reader_memory1_adr = soc_reader_counter[10:2]; +always @(*) begin + soc_reader_source_source_payload_data <= 32'd0; + case (soc_reader_fifo_source_payload_slot) + 1'd0: begin + soc_reader_source_source_payload_data <= soc_reader_memory0_dat_r; + end + 1'd1: begin + soc_reader_source_source_payload_data <= soc_reader_memory1_dat_r; + end + endcase +end +assign soc_reader_eventmanager_status_w = soc_reader_done_status; +always @(*) begin + soc_reader_done_clear <= 1'd0; + if ((soc_reader_eventmanager_pending_re & soc_reader_eventmanager_pending_r)) begin + soc_reader_done_clear <= 1'd1; + end +end +assign soc_reader_eventmanager_pending_w = soc_reader_done_pending; +assign soc_reader_irq = (soc_reader_eventmanager_pending_w & soc_reader_eventmanager_storage); +assign soc_reader_done_status = 1'd0; +assign soc_reader_fifo_syncfifo_din = {soc_reader_fifo_fifo_in_last, soc_reader_fifo_fifo_in_first, soc_reader_fifo_fifo_in_payload_length, soc_reader_fifo_fifo_in_payload_slot}; +assign {soc_reader_fifo_fifo_out_last, soc_reader_fifo_fifo_out_first, soc_reader_fifo_fifo_out_payload_length, soc_reader_fifo_fifo_out_payload_slot} = soc_reader_fifo_syncfifo_dout; +assign soc_reader_fifo_sink_ready = soc_reader_fifo_syncfifo_writable; +assign soc_reader_fifo_syncfifo_we = soc_reader_fifo_sink_valid; +assign soc_reader_fifo_fifo_in_first = soc_reader_fifo_sink_first; +assign soc_reader_fifo_fifo_in_last = soc_reader_fifo_sink_last; +assign soc_reader_fifo_fifo_in_payload_slot = soc_reader_fifo_sink_payload_slot; +assign soc_reader_fifo_fifo_in_payload_length = soc_reader_fifo_sink_payload_length; +assign soc_reader_fifo_source_valid = soc_reader_fifo_syncfifo_readable; +assign soc_reader_fifo_source_first = soc_reader_fifo_fifo_out_first; +assign soc_reader_fifo_source_last = soc_reader_fifo_fifo_out_last; +assign soc_reader_fifo_source_payload_slot = soc_reader_fifo_fifo_out_payload_slot; +assign soc_reader_fifo_source_payload_length = soc_reader_fifo_fifo_out_payload_length; +assign soc_reader_fifo_syncfifo_re = soc_reader_fifo_source_ready; +always @(*) begin + soc_reader_fifo_wrport_adr <= 1'd0; + if (soc_reader_fifo_replace) begin + soc_reader_fifo_wrport_adr <= (soc_reader_fifo_produce - 1'd1); + end else begin + soc_reader_fifo_wrport_adr <= soc_reader_fifo_produce; + end +end +assign soc_reader_fifo_wrport_dat_w = soc_reader_fifo_syncfifo_din; +assign soc_reader_fifo_wrport_we = (soc_reader_fifo_syncfifo_we & (soc_reader_fifo_syncfifo_writable | soc_reader_fifo_replace)); +assign soc_reader_fifo_do_read = (soc_reader_fifo_syncfifo_readable & soc_reader_fifo_syncfifo_re); +assign soc_reader_fifo_rdport_adr = soc_reader_fifo_consume; +assign soc_reader_fifo_syncfifo_dout = soc_reader_fifo_rdport_dat_r; +assign soc_reader_fifo_syncfifo_writable = (soc_reader_fifo_level != 2'd2); +assign soc_reader_fifo_syncfifo_readable = (soc_reader_fifo_level != 1'd0); +always @(*) begin + soc_reader_counter_reset <= 1'd0; + soc_reader_counter_ce <= 1'd0; + soc_reader_source_source_last <= 1'd0; + soc_reader_fifo_source_ready <= 1'd0; + vns_liteethmacsramreader_next_state <= 2'd0; + soc_reader_source_source_valid <= 1'd0; + soc_reader_done_trigger <= 1'd0; + vns_liteethmacsramreader_next_state <= vns_liteethmacsramreader_state; + case (vns_liteethmacsramreader_state) + 1'd1: begin + if ((~soc_reader_last_d)) begin + vns_liteethmacsramreader_next_state <= 2'd2; + end else begin + vns_liteethmacsramreader_next_state <= 2'd3; + end + end + 2'd2: begin + soc_reader_source_source_valid <= 1'd1; + soc_reader_source_source_last <= soc_reader_last; + if (soc_reader_source_source_ready) begin + soc_reader_counter_ce <= (~soc_reader_last); + vns_liteethmacsramreader_next_state <= 1'd1; + end + end + 2'd3: begin + soc_reader_fifo_source_ready <= 1'd1; + soc_reader_done_trigger <= 1'd1; + vns_liteethmacsramreader_next_state <= 1'd0; + end + default: begin + soc_reader_counter_reset <= 1'd1; + if (soc_reader_fifo_source_valid) begin + vns_liteethmacsramreader_next_state <= 1'd1; + end + end + endcase +end +assign soc_ev_irq = (soc_writer_irq | soc_reader_irq); +assign soc_sram0_adr0 = soc_sram0_bus_adr0[8:0]; +assign soc_sram0_bus_dat_r0 = soc_sram0_dat_r0; +assign soc_sram1_adr0 = soc_sram1_bus_adr0[8:0]; +assign soc_sram1_bus_dat_r0 = soc_sram1_dat_r0; +always @(*) begin + soc_sram0_we <= 4'd0; + soc_sram0_we[0] <= (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & soc_sram0_bus_we1) & soc_sram0_bus_sel1[0]); + soc_sram0_we[1] <= (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & soc_sram0_bus_we1) & soc_sram0_bus_sel1[1]); + soc_sram0_we[2] <= (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & soc_sram0_bus_we1) & soc_sram0_bus_sel1[2]); + soc_sram0_we[3] <= (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & soc_sram0_bus_we1) & soc_sram0_bus_sel1[3]); +end +assign soc_sram0_adr1 = soc_sram0_bus_adr1[8:0]; +assign soc_sram0_bus_dat_r1 = soc_sram0_dat_r1; +assign soc_sram0_dat_w = soc_sram0_bus_dat_w1; +always @(*) begin + soc_sram1_we <= 4'd0; + soc_sram1_we[0] <= (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & soc_sram1_bus_we1) & soc_sram1_bus_sel1[0]); + soc_sram1_we[1] <= (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & soc_sram1_bus_we1) & soc_sram1_bus_sel1[1]); + soc_sram1_we[2] <= (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & soc_sram1_bus_we1) & soc_sram1_bus_sel1[2]); + soc_sram1_we[3] <= (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & soc_sram1_bus_we1) & soc_sram1_bus_sel1[3]); +end +assign soc_sram1_adr1 = soc_sram1_bus_adr1[8:0]; +assign soc_sram1_bus_dat_r1 = soc_sram1_dat_r1; +assign soc_sram1_dat_w = soc_sram1_bus_dat_w1; +always @(*) begin + soc_slave_sel <= 4'd0; + soc_slave_sel[0] <= (soc_bus_adr[10:9] == 1'd0); + soc_slave_sel[1] <= (soc_bus_adr[10:9] == 1'd1); + soc_slave_sel[2] <= (soc_bus_adr[10:9] == 2'd2); + soc_slave_sel[3] <= (soc_bus_adr[10:9] == 2'd3); +end +assign soc_sram0_bus_adr0 = soc_bus_adr; +assign soc_sram0_bus_dat_w0 = soc_bus_dat_w; +assign soc_sram0_bus_sel0 = soc_bus_sel; +assign soc_sram0_bus_stb0 = soc_bus_stb; +assign soc_sram0_bus_we0 = soc_bus_we; +assign soc_sram0_bus_cti0 = soc_bus_cti; +assign soc_sram0_bus_bte0 = soc_bus_bte; +assign soc_sram1_bus_adr0 = soc_bus_adr; +assign soc_sram1_bus_dat_w0 = soc_bus_dat_w; +assign soc_sram1_bus_sel0 = soc_bus_sel; +assign soc_sram1_bus_stb0 = soc_bus_stb; +assign soc_sram1_bus_we0 = soc_bus_we; +assign soc_sram1_bus_cti0 = soc_bus_cti; +assign soc_sram1_bus_bte0 = soc_bus_bte; +assign soc_sram0_bus_adr1 = soc_bus_adr; +assign soc_sram0_bus_dat_w1 = soc_bus_dat_w; +assign soc_sram0_bus_sel1 = soc_bus_sel; +assign soc_sram0_bus_stb1 = soc_bus_stb; +assign soc_sram0_bus_we1 = soc_bus_we; +assign soc_sram0_bus_cti1 = soc_bus_cti; +assign soc_sram0_bus_bte1 = soc_bus_bte; +assign soc_sram1_bus_adr1 = soc_bus_adr; +assign soc_sram1_bus_dat_w1 = soc_bus_dat_w; +assign soc_sram1_bus_sel1 = soc_bus_sel; +assign soc_sram1_bus_stb1 = soc_bus_stb; +assign soc_sram1_bus_we1 = soc_bus_we; +assign soc_sram1_bus_cti1 = soc_bus_cti; +assign soc_sram1_bus_bte1 = soc_bus_bte; +assign soc_sram0_bus_cyc0 = (soc_bus_cyc & soc_slave_sel[0]); +assign soc_sram1_bus_cyc0 = (soc_bus_cyc & soc_slave_sel[1]); +assign soc_sram0_bus_cyc1 = (soc_bus_cyc & soc_slave_sel[2]); +assign soc_sram1_bus_cyc1 = (soc_bus_cyc & soc_slave_sel[3]); +assign soc_bus_ack = (((soc_sram0_bus_ack0 | soc_sram1_bus_ack0) | soc_sram0_bus_ack1) | soc_sram1_bus_ack1); +assign soc_bus_err = (((soc_sram0_bus_err0 | soc_sram1_bus_err0) | soc_sram0_bus_err1) | soc_sram1_bus_err1); +assign soc_bus_dat_r = (((({32{soc_slave_sel_r[0]}} & soc_sram0_bus_dat_r0) | ({32{soc_slave_sel_r[1]}} & soc_sram1_bus_dat_r0)) | ({32{soc_slave_sel_r[2]}} & soc_sram0_bus_dat_r1)) | ({32{soc_slave_sel_r[3]}} & soc_sram1_bus_dat_r1)); +assign soc_netsoc_interface0_wb_sdram_adr = vns_rhs_array_muxed36; +assign soc_netsoc_interface0_wb_sdram_dat_w = vns_rhs_array_muxed37; +assign soc_netsoc_interface0_wb_sdram_sel = vns_rhs_array_muxed38; +assign soc_netsoc_interface0_wb_sdram_cyc = vns_rhs_array_muxed39; +assign soc_netsoc_interface0_wb_sdram_stb = vns_rhs_array_muxed40; +assign soc_netsoc_interface0_wb_sdram_we = vns_rhs_array_muxed41; +assign soc_netsoc_interface0_wb_sdram_cti = vns_rhs_array_muxed42; +assign soc_netsoc_interface0_wb_sdram_bte = vns_rhs_array_muxed43; +assign soc_netsoc_interface1_wb_sdram_dat_r = soc_netsoc_interface0_wb_sdram_dat_r; +assign soc_netsoc_interface1_wb_sdram_ack = (soc_netsoc_interface0_wb_sdram_ack & (vns_wb_sdram_con_grant == 1'd0)); +assign soc_netsoc_interface1_wb_sdram_err = (soc_netsoc_interface0_wb_sdram_err & (vns_wb_sdram_con_grant == 1'd0)); +assign vns_wb_sdram_con_request = {soc_netsoc_interface1_wb_sdram_cyc}; +assign vns_wb_sdram_con_grant = 1'd0; +assign vns_netsoc_shared_adr = vns_rhs_array_muxed44; +assign vns_netsoc_shared_dat_w = vns_rhs_array_muxed45; +assign vns_netsoc_shared_sel = vns_rhs_array_muxed46; +assign vns_netsoc_shared_cyc = vns_rhs_array_muxed47; +assign vns_netsoc_shared_stb = vns_rhs_array_muxed48; +assign vns_netsoc_shared_we = vns_rhs_array_muxed49; +assign vns_netsoc_shared_cti = vns_rhs_array_muxed50; +assign vns_netsoc_shared_bte = vns_rhs_array_muxed51; +assign soc_netsoc_interface0_soc_bus_dat_r = vns_netsoc_shared_dat_r; +assign soc_netsoc_interface1_soc_bus_dat_r = vns_netsoc_shared_dat_r; +assign soc_netsoc_interface0_soc_bus_ack = (vns_netsoc_shared_ack & (vns_netsoc_grant == 1'd0)); +assign soc_netsoc_interface1_soc_bus_ack = (vns_netsoc_shared_ack & (vns_netsoc_grant == 1'd1)); +assign soc_netsoc_interface0_soc_bus_err = (vns_netsoc_shared_err & (vns_netsoc_grant == 1'd0)); +assign soc_netsoc_interface1_soc_bus_err = (vns_netsoc_shared_err & (vns_netsoc_grant == 1'd1)); +assign vns_netsoc_request = {soc_netsoc_interface1_soc_bus_cyc, soc_netsoc_interface0_soc_bus_cyc}; +always @(*) begin + vns_netsoc_slave_sel <= 6'd0; + vns_netsoc_slave_sel[0] <= (vns_netsoc_shared_adr[28:14] == 1'd0); + vns_netsoc_slave_sel[1] <= (vns_netsoc_shared_adr[28:13] == 14'd8192); + vns_netsoc_slave_sel[2] <= (vns_netsoc_shared_adr[28:22] == 7'd112); + vns_netsoc_slave_sel[3] <= (vns_netsoc_shared_adr[28:12] == 17'd81920); + vns_netsoc_slave_sel[4] <= (vns_netsoc_shared_adr[28:26] == 3'd4); + vns_netsoc_slave_sel[5] <= (vns_netsoc_shared_adr[28:26] == 2'd3); +end +assign soc_netsoc_rom_bus_adr = vns_netsoc_shared_adr; +assign soc_netsoc_rom_bus_dat_w = vns_netsoc_shared_dat_w; +assign soc_netsoc_rom_bus_sel = vns_netsoc_shared_sel; +assign soc_netsoc_rom_bus_stb = vns_netsoc_shared_stb; +assign soc_netsoc_rom_bus_we = vns_netsoc_shared_we; +assign soc_netsoc_rom_bus_cti = vns_netsoc_shared_cti; +assign soc_netsoc_rom_bus_bte = vns_netsoc_shared_bte; +assign soc_netsoc_sram_bus_adr = vns_netsoc_shared_adr; +assign soc_netsoc_sram_bus_dat_w = vns_netsoc_shared_dat_w; +assign soc_netsoc_sram_bus_sel = vns_netsoc_shared_sel; +assign soc_netsoc_sram_bus_stb = vns_netsoc_shared_stb; +assign soc_netsoc_sram_bus_we = vns_netsoc_shared_we; +assign soc_netsoc_sram_bus_cti = vns_netsoc_shared_cti; +assign soc_netsoc_sram_bus_bte = vns_netsoc_shared_bte; +assign soc_netsoc_bus_wishbone_adr = vns_netsoc_shared_adr; +assign soc_netsoc_bus_wishbone_dat_w = vns_netsoc_shared_dat_w; +assign soc_netsoc_bus_wishbone_sel = vns_netsoc_shared_sel; +assign soc_netsoc_bus_wishbone_stb = vns_netsoc_shared_stb; +assign soc_netsoc_bus_wishbone_we = vns_netsoc_shared_we; +assign soc_netsoc_bus_wishbone_cti = vns_netsoc_shared_cti; +assign soc_netsoc_bus_wishbone_bte = vns_netsoc_shared_bte; +assign soc_emulator_ram_bus_adr = vns_netsoc_shared_adr; +assign soc_emulator_ram_bus_dat_w = vns_netsoc_shared_dat_w; +assign soc_emulator_ram_bus_sel = vns_netsoc_shared_sel; +assign soc_emulator_ram_bus_stb = vns_netsoc_shared_stb; +assign soc_emulator_ram_bus_we = vns_netsoc_shared_we; +assign soc_emulator_ram_bus_cti = vns_netsoc_shared_cti; +assign soc_emulator_ram_bus_bte = vns_netsoc_shared_bte; +assign soc_netsoc_interface1_wb_sdram_adr = vns_netsoc_shared_adr; +assign soc_netsoc_interface1_wb_sdram_dat_w = vns_netsoc_shared_dat_w; +assign soc_netsoc_interface1_wb_sdram_sel = vns_netsoc_shared_sel; +assign soc_netsoc_interface1_wb_sdram_stb = vns_netsoc_shared_stb; +assign soc_netsoc_interface1_wb_sdram_we = vns_netsoc_shared_we; +assign soc_netsoc_interface1_wb_sdram_cti = vns_netsoc_shared_cti; +assign soc_netsoc_interface1_wb_sdram_bte = vns_netsoc_shared_bte; +assign soc_bus_adr = vns_netsoc_shared_adr; +assign soc_bus_dat_w = vns_netsoc_shared_dat_w; +assign soc_bus_sel = vns_netsoc_shared_sel; +assign soc_bus_stb = vns_netsoc_shared_stb; +assign soc_bus_we = vns_netsoc_shared_we; +assign soc_bus_cti = vns_netsoc_shared_cti; +assign soc_bus_bte = vns_netsoc_shared_bte; +assign soc_netsoc_rom_bus_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[0]); +assign soc_netsoc_sram_bus_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[1]); +assign soc_netsoc_bus_wishbone_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[2]); +assign soc_emulator_ram_bus_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[3]); +assign soc_netsoc_interface1_wb_sdram_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[4]); +assign soc_bus_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[5]); +assign vns_netsoc_shared_err = (((((soc_netsoc_rom_bus_err | soc_netsoc_sram_bus_err) | soc_netsoc_bus_wishbone_err) | soc_emulator_ram_bus_err) | soc_netsoc_interface1_wb_sdram_err) | soc_bus_err); +assign vns_netsoc_wait = ((vns_netsoc_shared_stb & vns_netsoc_shared_cyc) & (~vns_netsoc_shared_ack)); +always @(*) begin + vns_netsoc_error <= 1'd0; + vns_netsoc_shared_ack <= 1'd0; + vns_netsoc_shared_dat_r <= 32'd0; + vns_netsoc_shared_ack <= (((((soc_netsoc_rom_bus_ack | soc_netsoc_sram_bus_ack) | soc_netsoc_bus_wishbone_ack) | soc_emulator_ram_bus_ack) | soc_netsoc_interface1_wb_sdram_ack) | soc_bus_ack); + vns_netsoc_shared_dat_r <= (((((({32{vns_netsoc_slave_sel_r[0]}} & soc_netsoc_rom_bus_dat_r) | ({32{vns_netsoc_slave_sel_r[1]}} & soc_netsoc_sram_bus_dat_r)) | ({32{vns_netsoc_slave_sel_r[2]}} & soc_netsoc_bus_wishbone_dat_r)) | ({32{vns_netsoc_slave_sel_r[3]}} & soc_emulator_ram_bus_dat_r)) | ({32{vns_netsoc_slave_sel_r[4]}} & soc_netsoc_interface1_wb_sdram_dat_r)) | ({32{vns_netsoc_slave_sel_r[5]}} & soc_bus_dat_r)); + if (vns_netsoc_done) begin + vns_netsoc_shared_dat_r <= 32'd4294967295; + vns_netsoc_shared_ack <= 1'd1; + vns_netsoc_error <= 1'd1; + end +end +assign vns_netsoc_done = (vns_netsoc_count == 1'd0); +assign vns_netsoc_csrbankarray_csrbank0_sel = (vns_netsoc_csrbankarray_interface0_bank_bus_adr[13:9] == 1'd1); +assign soc_netsoc_cpu_latch_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[0]; +assign soc_netsoc_cpu_latch_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 1'd0)); +assign soc_netsoc_cpu_latch_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time7_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time7_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time7_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time6_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time6_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time6_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time5_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time5_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time5_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time4_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time4_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time4_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time3_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time3_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time3_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time2_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time2_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time2_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time1_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time1_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time1_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time0_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time0_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd8)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time0_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd8)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd9)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd9)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd10)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd10)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd11)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd11)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd12)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd12)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd13)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd13)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd14)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd14)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd15)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd15)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 5'd16)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 5'd16)); +assign vns_netsoc_csrbankarray_csrbank0_timer_time7_w = soc_netsoc_cpu_time_status[63:56]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time6_w = soc_netsoc_cpu_time_status[55:48]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time5_w = soc_netsoc_cpu_time_status[47:40]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time4_w = soc_netsoc_cpu_time_status[39:32]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time3_w = soc_netsoc_cpu_time_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time2_w = soc_netsoc_cpu_time_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time1_w = soc_netsoc_cpu_time_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time0_w = soc_netsoc_cpu_time_status[7:0]; +assign soc_netsoc_cpu_time_we = vns_netsoc_csrbankarray_csrbank0_timer_time0_we; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_w = soc_netsoc_cpu_time_cmp_storage[63:56]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_w = soc_netsoc_cpu_time_cmp_storage[55:48]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_w = soc_netsoc_cpu_time_cmp_storage[47:40]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_w = soc_netsoc_cpu_time_cmp_storage[39:32]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_w = soc_netsoc_cpu_time_cmp_storage[31:24]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_w = soc_netsoc_cpu_time_cmp_storage[23:16]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_w = soc_netsoc_cpu_time_cmp_storage[15:8]; +assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_w = soc_netsoc_cpu_time_cmp_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_sel = (vns_netsoc_csrbankarray_interface1_bank_bus_adr[13:9] == 1'd0); +assign soc_netsoc_ctrl_reset_reset_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[0]; +assign soc_netsoc_ctrl_reset_reset_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 1'd0)); +assign soc_netsoc_ctrl_reset_reset_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank1_scratch3_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_scratch3_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank1_scratch3_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank1_scratch2_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_scratch2_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank1_scratch2_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank1_scratch1_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_scratch1_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank1_scratch1_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank1_scratch0_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_scratch0_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank1_scratch0_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank1_bus_errors3_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_bus_errors3_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank1_bus_errors3_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank1_bus_errors2_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_bus_errors2_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank1_bus_errors2_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank1_bus_errors1_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_bus_errors1_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank1_bus_errors1_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank1_bus_errors0_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_bus_errors0_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 4'd8)); +assign vns_netsoc_csrbankarray_csrbank1_bus_errors0_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 4'd8)); +assign vns_netsoc_csrbankarray_csrbank1_scratch3_w = soc_netsoc_ctrl_storage[31:24]; +assign vns_netsoc_csrbankarray_csrbank1_scratch2_w = soc_netsoc_ctrl_storage[23:16]; +assign vns_netsoc_csrbankarray_csrbank1_scratch1_w = soc_netsoc_ctrl_storage[15:8]; +assign vns_netsoc_csrbankarray_csrbank1_scratch0_w = soc_netsoc_ctrl_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank1_bus_errors3_w = soc_netsoc_ctrl_bus_errors_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank1_bus_errors2_w = soc_netsoc_ctrl_bus_errors_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank1_bus_errors1_w = soc_netsoc_ctrl_bus_errors_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank1_bus_errors0_w = soc_netsoc_ctrl_bus_errors_status[7:0]; +assign soc_netsoc_ctrl_bus_errors_we = vns_netsoc_csrbankarray_csrbank1_bus_errors0_we; +assign vns_netsoc_csrbankarray_csrbank2_sel = (vns_netsoc_csrbankarray_interface2_bank_bus_adr[13:9] == 4'd11); +assign vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[4:0]; +assign vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 1'd0)); +assign soc_a7ddrphy_cdly_rst_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; +assign soc_a7ddrphy_cdly_rst_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 1'd1)); +assign soc_a7ddrphy_cdly_rst_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 1'd1)); +assign soc_a7ddrphy_cdly_inc_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; +assign soc_a7ddrphy_cdly_inc_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 2'd2)); +assign soc_a7ddrphy_cdly_inc_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank2_dly_sel0_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[1:0]; +assign vns_netsoc_csrbankarray_csrbank2_dly_sel0_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank2_dly_sel0_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 2'd3)); +assign soc_a7ddrphy_rdly_dq_rst_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; +assign soc_a7ddrphy_rdly_dq_rst_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd4)); +assign soc_a7ddrphy_rdly_dq_rst_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd4)); +assign soc_a7ddrphy_rdly_dq_inc_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; +assign soc_a7ddrphy_rdly_dq_inc_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd5)); +assign soc_a7ddrphy_rdly_dq_inc_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd5)); +assign soc_a7ddrphy_rdly_dq_bitslip_rst_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; +assign soc_a7ddrphy_rdly_dq_bitslip_rst_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd6)); +assign soc_a7ddrphy_rdly_dq_bitslip_rst_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd6)); +assign soc_a7ddrphy_rdly_dq_bitslip_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; +assign soc_a7ddrphy_rdly_dq_bitslip_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd7)); +assign soc_a7ddrphy_rdly_dq_bitslip_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_w = soc_a7ddrphy_half_sys8x_taps_storage[4:0]; +assign vns_netsoc_csrbankarray_csrbank2_dly_sel0_w = soc_a7ddrphy_dly_sel_storage[1:0]; +assign vns_netsoc_csrbankarray_csrbank3_sel = (vns_netsoc_csrbankarray_interface3_bank_bus_adr[13:9] == 4'd15); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd8)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd8)); +assign soc_writer_status_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign soc_writer_status_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd9)); +assign soc_writer_status_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd9)); +assign soc_writer_pending_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign soc_writer_pending_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd10)); +assign soc_writer_pending_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd10)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd11)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd11)); +assign soc_reader_start_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign soc_reader_start_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd12)); +assign soc_reader_start_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd12)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd13)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd13)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_level_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[1:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_level_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd14)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_level_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd14)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd15)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd15)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[2:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd16)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd16)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd17)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd17)); +assign soc_reader_eventmanager_status_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign soc_reader_eventmanager_status_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd18)); +assign soc_reader_eventmanager_status_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd18)); +assign soc_reader_eventmanager_pending_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign soc_reader_eventmanager_pending_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd19)); +assign soc_reader_eventmanager_pending_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd19)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd20)); +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd20)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_crc_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank3_preamble_crc_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd21)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_crc_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd21)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors3_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors3_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd22)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors3_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd22)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors2_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors2_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd23)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors2_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd23)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd24)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd24)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd25)); +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd25)); +assign vns_netsoc_csrbankarray_csrbank3_crc_errors3_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_crc_errors3_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd26)); +assign vns_netsoc_csrbankarray_csrbank3_crc_errors3_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd26)); +assign vns_netsoc_csrbankarray_csrbank3_crc_errors2_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_crc_errors2_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd27)); +assign vns_netsoc_csrbankarray_csrbank3_crc_errors2_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd27)); +assign vns_netsoc_csrbankarray_csrbank3_crc_errors1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_crc_errors1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd28)); +assign vns_netsoc_csrbankarray_csrbank3_crc_errors1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd28)); +assign vns_netsoc_csrbankarray_csrbank3_crc_errors0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_crc_errors0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd29)); +assign vns_netsoc_csrbankarray_csrbank3_crc_errors0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd29)); +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_w = soc_writer_slot_status; +assign soc_writer_slot_we = vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_we; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_w = soc_writer_length_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_w = soc_writer_length_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_w = soc_writer_length_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_w = soc_writer_length_status[7:0]; +assign soc_writer_length_we = vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_we; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_w = soc_writer_errors_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_w = soc_writer_errors_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_w = soc_writer_errors_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_w = soc_writer_errors_status[7:0]; +assign soc_writer_errors_we = vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_we; +assign vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_w = soc_writer_storage; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_w = soc_reader_ready_status; +assign soc_reader_ready_we = vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_we; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_level_w = soc_reader_level_status[1:0]; +assign soc_reader_level_we = vns_netsoc_csrbankarray_csrbank3_sram_reader_level_we; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_w = soc_reader_slot_storage; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_w = soc_reader_length_storage[10:8]; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_w = soc_reader_length_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_w = soc_reader_eventmanager_storage; +assign vns_netsoc_csrbankarray_csrbank3_preamble_crc_w = soc_preamble_crc_status; +assign soc_preamble_crc_we = vns_netsoc_csrbankarray_csrbank3_preamble_crc_we; +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors3_w = soc_preamble_errors_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors2_w = soc_preamble_errors_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors1_w = soc_preamble_errors_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank3_preamble_errors0_w = soc_preamble_errors_status[7:0]; +assign soc_preamble_errors_we = vns_netsoc_csrbankarray_csrbank3_preamble_errors0_we; +assign vns_netsoc_csrbankarray_csrbank3_crc_errors3_w = soc_crc_errors_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank3_crc_errors2_w = soc_crc_errors_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank3_crc_errors1_w = soc_crc_errors_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank3_crc_errors0_w = soc_crc_errors_status[7:0]; +assign soc_crc_errors_we = vns_netsoc_csrbankarray_csrbank3_crc_errors0_we; +assign vns_netsoc_csrbankarray_csrbank4_sel = (vns_netsoc_csrbankarray_interface4_bank_bus_adr[13:9] == 4'd14); +assign vns_netsoc_csrbankarray_csrbank4_crg_reset0_r = vns_netsoc_csrbankarray_interface4_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank4_crg_reset0_re = ((vns_netsoc_csrbankarray_csrbank4_sel & vns_netsoc_csrbankarray_interface4_bank_bus_we) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank4_crg_reset0_we = ((vns_netsoc_csrbankarray_csrbank4_sel & (~vns_netsoc_csrbankarray_interface4_bank_bus_we)) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank4_mdio_w0_r = vns_netsoc_csrbankarray_interface4_bank_bus_dat_w[2:0]; +assign vns_netsoc_csrbankarray_csrbank4_mdio_w0_re = ((vns_netsoc_csrbankarray_csrbank4_sel & vns_netsoc_csrbankarray_interface4_bank_bus_we) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank4_mdio_w0_we = ((vns_netsoc_csrbankarray_csrbank4_sel & (~vns_netsoc_csrbankarray_interface4_bank_bus_we)) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank4_mdio_r_r = vns_netsoc_csrbankarray_interface4_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank4_mdio_r_re = ((vns_netsoc_csrbankarray_csrbank4_sel & vns_netsoc_csrbankarray_interface4_bank_bus_we) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank4_mdio_r_we = ((vns_netsoc_csrbankarray_csrbank4_sel & (~vns_netsoc_csrbankarray_interface4_bank_bus_we)) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank4_crg_reset0_w = soc_reset_storage; +assign soc_mdc = soc_storage[0]; +assign soc_oe = soc_storage[1]; +assign soc_w = soc_storage[2]; +assign vns_netsoc_csrbankarray_csrbank4_mdio_w0_w = soc_storage[2:0]; +assign vns_netsoc_csrbankarray_csrbank4_mdio_r_w = soc_status; +assign soc_we = vns_netsoc_csrbankarray_csrbank4_mdio_r_we; +assign vns_netsoc_csrbankarray_sel = (vns_netsoc_csrbankarray_sram_bus_adr[13:9] == 3'd4); +always @(*) begin + vns_netsoc_csrbankarray_sram_bus_dat_r <= 8'd0; + if (vns_netsoc_csrbankarray_sel_r) begin + vns_netsoc_csrbankarray_sram_bus_dat_r <= vns_netsoc_csrbankarray_dat_r; + end +end +assign vns_netsoc_csrbankarray_adr = vns_netsoc_csrbankarray_sram_bus_adr[2:0]; +assign vns_netsoc_csrbankarray_csrbank5_sel = (vns_netsoc_csrbankarray_interface5_bank_bus_adr[13:9] == 4'd8); +assign vns_netsoc_csrbankarray_csrbank5_dfii_control0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[3:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_control0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_control0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 1'd1)); +assign soc_netsoc_sdram_phaseinjector0_command_issue_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; +assign soc_netsoc_sdram_phaseinjector0_command_issue_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 2'd2)); +assign soc_netsoc_sdram_phaseinjector0_command_issue_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[2:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd8)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd8)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd9)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd9)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd10)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd10)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd11)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd11)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd12)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd12)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd13)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd13)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd14)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd14)); +assign soc_netsoc_sdram_phaseinjector1_command_issue_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; +assign soc_netsoc_sdram_phaseinjector1_command_issue_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd15)); +assign soc_netsoc_sdram_phaseinjector1_command_issue_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd15)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd16)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd16)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd17)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd17)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[2:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd18)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd18)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd19)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd19)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd20)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd20)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd21)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd21)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd22)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd22)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd23)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd23)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd24)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd24)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd25)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd25)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd26)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd26)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd27)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd27)); +assign soc_netsoc_sdram_phaseinjector2_command_issue_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; +assign soc_netsoc_sdram_phaseinjector2_command_issue_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd28)); +assign soc_netsoc_sdram_phaseinjector2_command_issue_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd28)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd29)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd29)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd30)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd30)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[2:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd31)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd31)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd32)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd32)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd33)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd33)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd34)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd34)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd35)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd35)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd36)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd36)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd37)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd37)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd38)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd38)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd39)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd39)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd40)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd40)); +assign soc_netsoc_sdram_phaseinjector3_command_issue_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; +assign soc_netsoc_sdram_phaseinjector3_command_issue_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd41)); +assign soc_netsoc_sdram_phaseinjector3_command_issue_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd41)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd42)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd42)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd43)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd43)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[2:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd44)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd44)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd45)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd45)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd46)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd46)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd47)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd47)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd48)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd48)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd49)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd49)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd50)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd50)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd51)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd51)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd52)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd52)); +assign soc_netsoc_sdram_bandwidth_update_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; +assign soc_netsoc_sdram_bandwidth_update_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd53)); +assign soc_netsoc_sdram_bandwidth_update_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd53)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd54)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd54)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd55)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd55)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd56)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd56)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd57)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd57)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd58)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd58)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd59)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd59)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd60)); +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd60)); +assign vns_netsoc_csrbankarray_csrbank5_dfii_control0_w = soc_netsoc_sdram_storage[3:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_w = soc_netsoc_sdram_phaseinjector0_command_storage[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_w = soc_netsoc_sdram_phaseinjector0_address_storage[13:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_w = soc_netsoc_sdram_phaseinjector0_address_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_w = soc_netsoc_sdram_phaseinjector0_baddress_storage[2:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_w = soc_netsoc_sdram_phaseinjector0_wrdata_storage[31:24]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_w = soc_netsoc_sdram_phaseinjector0_wrdata_storage[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_w = soc_netsoc_sdram_phaseinjector0_wrdata_storage[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_w = soc_netsoc_sdram_phaseinjector0_wrdata_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_w = soc_netsoc_sdram_phaseinjector0_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_w = soc_netsoc_sdram_phaseinjector0_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_w = soc_netsoc_sdram_phaseinjector0_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_w = soc_netsoc_sdram_phaseinjector0_status[7:0]; +assign soc_netsoc_sdram_phaseinjector0_we = vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_we; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_w = soc_netsoc_sdram_phaseinjector1_command_storage[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_w = soc_netsoc_sdram_phaseinjector1_address_storage[13:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_w = soc_netsoc_sdram_phaseinjector1_address_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_w = soc_netsoc_sdram_phaseinjector1_baddress_storage[2:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_w = soc_netsoc_sdram_phaseinjector1_wrdata_storage[31:24]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_w = soc_netsoc_sdram_phaseinjector1_wrdata_storage[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_w = soc_netsoc_sdram_phaseinjector1_wrdata_storage[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_w = soc_netsoc_sdram_phaseinjector1_wrdata_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_w = soc_netsoc_sdram_phaseinjector1_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_w = soc_netsoc_sdram_phaseinjector1_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_w = soc_netsoc_sdram_phaseinjector1_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_w = soc_netsoc_sdram_phaseinjector1_status[7:0]; +assign soc_netsoc_sdram_phaseinjector1_we = vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_we; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_w = soc_netsoc_sdram_phaseinjector2_command_storage[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_w = soc_netsoc_sdram_phaseinjector2_address_storage[13:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_w = soc_netsoc_sdram_phaseinjector2_address_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_w = soc_netsoc_sdram_phaseinjector2_baddress_storage[2:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_w = soc_netsoc_sdram_phaseinjector2_wrdata_storage[31:24]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_w = soc_netsoc_sdram_phaseinjector2_wrdata_storage[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_w = soc_netsoc_sdram_phaseinjector2_wrdata_storage[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_w = soc_netsoc_sdram_phaseinjector2_wrdata_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_w = soc_netsoc_sdram_phaseinjector2_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_w = soc_netsoc_sdram_phaseinjector2_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_w = soc_netsoc_sdram_phaseinjector2_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_w = soc_netsoc_sdram_phaseinjector2_status[7:0]; +assign soc_netsoc_sdram_phaseinjector2_we = vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_we; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_w = soc_netsoc_sdram_phaseinjector3_command_storage[5:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_w = soc_netsoc_sdram_phaseinjector3_address_storage[13:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_w = soc_netsoc_sdram_phaseinjector3_address_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_w = soc_netsoc_sdram_phaseinjector3_baddress_storage[2:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_w = soc_netsoc_sdram_phaseinjector3_wrdata_storage[31:24]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_w = soc_netsoc_sdram_phaseinjector3_wrdata_storage[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_w = soc_netsoc_sdram_phaseinjector3_wrdata_storage[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_w = soc_netsoc_sdram_phaseinjector3_wrdata_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_w = soc_netsoc_sdram_phaseinjector3_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_w = soc_netsoc_sdram_phaseinjector3_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_w = soc_netsoc_sdram_phaseinjector3_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_w = soc_netsoc_sdram_phaseinjector3_status[7:0]; +assign soc_netsoc_sdram_phaseinjector3_we = vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_we; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_w = soc_netsoc_sdram_bandwidth_nreads_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_w = soc_netsoc_sdram_bandwidth_nreads_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_w = soc_netsoc_sdram_bandwidth_nreads_status[7:0]; +assign soc_netsoc_sdram_bandwidth_nreads_we = vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_we; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_w = soc_netsoc_sdram_bandwidth_nwrites_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_w = soc_netsoc_sdram_bandwidth_nwrites_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_w = soc_netsoc_sdram_bandwidth_nwrites_status[7:0]; +assign soc_netsoc_sdram_bandwidth_nwrites_we = vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_we; +assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_w = soc_netsoc_sdram_bandwidth_data_width_status[7:0]; +assign soc_netsoc_sdram_bandwidth_data_width_we = vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_we; +assign vns_netsoc_csrbankarray_csrbank6_sel = (vns_netsoc_csrbankarray_interface6_bank_bus_adr[13:9] == 3'd5); +assign vns_netsoc_csrbankarray_csrbank6_load3_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_load3_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank6_load3_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank6_load2_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_load2_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank6_load2_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank6_load1_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_load1_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank6_load1_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank6_load0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_load0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank6_load0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank6_reload3_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_reload3_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank6_reload3_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank6_reload2_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_reload2_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank6_reload2_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank6_reload1_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_reload1_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank6_reload1_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd6)); +assign vns_netsoc_csrbankarray_csrbank6_reload0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_reload0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank6_reload0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd7)); +assign vns_netsoc_csrbankarray_csrbank6_en0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank6_en0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd8)); +assign vns_netsoc_csrbankarray_csrbank6_en0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd8)); +assign vns_netsoc_csrbankarray_csrbank6_update_value0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank6_update_value0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd9)); +assign vns_netsoc_csrbankarray_csrbank6_update_value0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd9)); +assign vns_netsoc_csrbankarray_csrbank6_value3_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_value3_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd10)); +assign vns_netsoc_csrbankarray_csrbank6_value3_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd10)); +assign vns_netsoc_csrbankarray_csrbank6_value2_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_value2_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd11)); +assign vns_netsoc_csrbankarray_csrbank6_value2_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd11)); +assign vns_netsoc_csrbankarray_csrbank6_value1_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_value1_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd12)); +assign vns_netsoc_csrbankarray_csrbank6_value1_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd12)); +assign vns_netsoc_csrbankarray_csrbank6_value0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_value0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd13)); +assign vns_netsoc_csrbankarray_csrbank6_value0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd13)); +assign soc_netsoc_timer0_eventmanager_status_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; +assign soc_netsoc_timer0_eventmanager_status_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd14)); +assign soc_netsoc_timer0_eventmanager_status_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd14)); +assign soc_netsoc_timer0_eventmanager_pending_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; +assign soc_netsoc_timer0_eventmanager_pending_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd15)); +assign soc_netsoc_timer0_eventmanager_pending_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd15)); +assign vns_netsoc_csrbankarray_csrbank6_ev_enable0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank6_ev_enable0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 5'd16)); +assign vns_netsoc_csrbankarray_csrbank6_ev_enable0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 5'd16)); +assign vns_netsoc_csrbankarray_csrbank6_load3_w = soc_netsoc_timer0_load_storage[31:24]; +assign vns_netsoc_csrbankarray_csrbank6_load2_w = soc_netsoc_timer0_load_storage[23:16]; +assign vns_netsoc_csrbankarray_csrbank6_load1_w = soc_netsoc_timer0_load_storage[15:8]; +assign vns_netsoc_csrbankarray_csrbank6_load0_w = soc_netsoc_timer0_load_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_reload3_w = soc_netsoc_timer0_reload_storage[31:24]; +assign vns_netsoc_csrbankarray_csrbank6_reload2_w = soc_netsoc_timer0_reload_storage[23:16]; +assign vns_netsoc_csrbankarray_csrbank6_reload1_w = soc_netsoc_timer0_reload_storage[15:8]; +assign vns_netsoc_csrbankarray_csrbank6_reload0_w = soc_netsoc_timer0_reload_storage[7:0]; +assign vns_netsoc_csrbankarray_csrbank6_en0_w = soc_netsoc_timer0_en_storage; +assign vns_netsoc_csrbankarray_csrbank6_update_value0_w = soc_netsoc_timer0_update_value_storage; +assign vns_netsoc_csrbankarray_csrbank6_value3_w = soc_netsoc_timer0_value_status[31:24]; +assign vns_netsoc_csrbankarray_csrbank6_value2_w = soc_netsoc_timer0_value_status[23:16]; +assign vns_netsoc_csrbankarray_csrbank6_value1_w = soc_netsoc_timer0_value_status[15:8]; +assign vns_netsoc_csrbankarray_csrbank6_value0_w = soc_netsoc_timer0_value_status[7:0]; +assign soc_netsoc_timer0_value_we = vns_netsoc_csrbankarray_csrbank6_value0_we; +assign vns_netsoc_csrbankarray_csrbank6_ev_enable0_w = soc_netsoc_timer0_eventmanager_storage; +assign vns_netsoc_csrbankarray_csrbank7_sel = (vns_netsoc_csrbankarray_interface7_bank_bus_adr[13:9] == 2'd3); +assign soc_netsoc_uart_rxtx_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[7:0]; +assign soc_netsoc_uart_rxtx_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 1'd0)); +assign soc_netsoc_uart_rxtx_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank7_txfull_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank7_txfull_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank7_txfull_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank7_rxempty_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[0]; +assign vns_netsoc_csrbankarray_csrbank7_rxempty_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank7_rxempty_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 2'd2)); +assign soc_netsoc_uart_eventmanager_status_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[1:0]; +assign soc_netsoc_uart_eventmanager_status_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 2'd3)); +assign soc_netsoc_uart_eventmanager_status_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 2'd3)); +assign soc_netsoc_uart_eventmanager_pending_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[1:0]; +assign soc_netsoc_uart_eventmanager_pending_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 3'd4)); +assign soc_netsoc_uart_eventmanager_pending_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 3'd4)); +assign vns_netsoc_csrbankarray_csrbank7_ev_enable0_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[1:0]; +assign vns_netsoc_csrbankarray_csrbank7_ev_enable0_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank7_ev_enable0_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 3'd5)); +assign vns_netsoc_csrbankarray_csrbank7_txfull_w = soc_netsoc_uart_txfull_status; +assign soc_netsoc_uart_txfull_we = vns_netsoc_csrbankarray_csrbank7_txfull_we; +assign vns_netsoc_csrbankarray_csrbank7_rxempty_w = soc_netsoc_uart_rxempty_status; +assign soc_netsoc_uart_rxempty_we = vns_netsoc_csrbankarray_csrbank7_rxempty_we; +assign vns_netsoc_csrbankarray_csrbank7_ev_enable0_w = soc_netsoc_uart_eventmanager_storage[1:0]; +assign vns_netsoc_csrbankarray_csrbank8_sel = (vns_netsoc_csrbankarray_interface8_bank_bus_adr[13:9] == 2'd2); +assign vns_netsoc_csrbankarray_csrbank8_tuning_word3_r = vns_netsoc_csrbankarray_interface8_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank8_tuning_word3_re = ((vns_netsoc_csrbankarray_csrbank8_sel & vns_netsoc_csrbankarray_interface8_bank_bus_we) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank8_tuning_word3_we = ((vns_netsoc_csrbankarray_csrbank8_sel & (~vns_netsoc_csrbankarray_interface8_bank_bus_we)) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 1'd0)); +assign vns_netsoc_csrbankarray_csrbank8_tuning_word2_r = vns_netsoc_csrbankarray_interface8_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank8_tuning_word2_re = ((vns_netsoc_csrbankarray_csrbank8_sel & vns_netsoc_csrbankarray_interface8_bank_bus_we) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank8_tuning_word2_we = ((vns_netsoc_csrbankarray_csrbank8_sel & (~vns_netsoc_csrbankarray_interface8_bank_bus_we)) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 1'd1)); +assign vns_netsoc_csrbankarray_csrbank8_tuning_word1_r = vns_netsoc_csrbankarray_interface8_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank8_tuning_word1_re = ((vns_netsoc_csrbankarray_csrbank8_sel & vns_netsoc_csrbankarray_interface8_bank_bus_we) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank8_tuning_word1_we = ((vns_netsoc_csrbankarray_csrbank8_sel & (~vns_netsoc_csrbankarray_interface8_bank_bus_we)) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 2'd2)); +assign vns_netsoc_csrbankarray_csrbank8_tuning_word0_r = vns_netsoc_csrbankarray_interface8_bank_bus_dat_w[7:0]; +assign vns_netsoc_csrbankarray_csrbank8_tuning_word0_re = ((vns_netsoc_csrbankarray_csrbank8_sel & vns_netsoc_csrbankarray_interface8_bank_bus_we) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank8_tuning_word0_we = ((vns_netsoc_csrbankarray_csrbank8_sel & (~vns_netsoc_csrbankarray_interface8_bank_bus_we)) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 2'd3)); +assign vns_netsoc_csrbankarray_csrbank8_tuning_word3_w = soc_netsoc_uart_phy_storage[31:24]; +assign vns_netsoc_csrbankarray_csrbank8_tuning_word2_w = soc_netsoc_uart_phy_storage[23:16]; +assign vns_netsoc_csrbankarray_csrbank8_tuning_word1_w = soc_netsoc_uart_phy_storage[15:8]; +assign vns_netsoc_csrbankarray_csrbank8_tuning_word0_w = soc_netsoc_uart_phy_storage[7:0]; +assign vns_netsoc_csrcon_adr = soc_netsoc_interface_adr; +assign vns_netsoc_csrcon_we = soc_netsoc_interface_we; +assign vns_netsoc_csrcon_dat_w = soc_netsoc_interface_dat_w; +assign soc_netsoc_interface_dat_r = vns_netsoc_csrcon_dat_r; +assign vns_netsoc_csrbankarray_interface0_bank_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_interface1_bank_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_interface2_bank_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_interface3_bank_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_interface4_bank_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_interface5_bank_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_interface6_bank_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_interface7_bank_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_interface8_bank_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_sram_bus_adr = vns_netsoc_csrcon_adr; +assign vns_netsoc_csrbankarray_interface0_bank_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_interface1_bank_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_interface2_bank_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_interface3_bank_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_interface4_bank_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_interface5_bank_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_interface6_bank_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_interface7_bank_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_interface8_bank_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_sram_bus_we = vns_netsoc_csrcon_we; +assign vns_netsoc_csrbankarray_interface0_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrbankarray_interface1_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrbankarray_interface2_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrbankarray_interface3_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrbankarray_interface4_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrbankarray_interface5_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrbankarray_interface6_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrbankarray_interface7_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrbankarray_interface8_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrbankarray_sram_bus_dat_w = vns_netsoc_csrcon_dat_w; +assign vns_netsoc_csrcon_dat_r = (((((((((vns_netsoc_csrbankarray_interface0_bank_bus_dat_r | vns_netsoc_csrbankarray_interface1_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface2_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface3_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface4_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface5_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface6_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface7_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface8_bank_bus_dat_r) | vns_netsoc_csrbankarray_sram_bus_dat_r); +always @(*) begin + vns_rhs_array_muxed0 <= 1'd0; + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[0]; + end + 1'd1: begin + vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[1]; + end + 2'd2: begin + vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[2]; + end + 2'd3: begin + vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[3]; + end + 3'd4: begin + vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[4]; + end + 3'd5: begin + vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[5]; + end + 3'd6: begin + vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[6]; + end + default: begin + vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[7]; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed1 <= 14'd0; + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine0_cmd_payload_a; + end + 1'd1: begin + vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine1_cmd_payload_a; + end + 2'd2: begin + vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine2_cmd_payload_a; + end + 2'd3: begin + vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine3_cmd_payload_a; + end + 3'd4: begin + vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine4_cmd_payload_a; + end + 3'd5: begin + vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine5_cmd_payload_a; + end + 3'd6: begin + vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine6_cmd_payload_a; + end + default: begin + vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine7_cmd_payload_a; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed2 <= 3'd0; + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine0_cmd_payload_ba; + end + 1'd1: begin + vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine1_cmd_payload_ba; + end + 2'd2: begin + vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine2_cmd_payload_ba; + end + 2'd3: begin + vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine3_cmd_payload_ba; + end + 3'd4: begin + vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine4_cmd_payload_ba; + end + 3'd5: begin + vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine5_cmd_payload_ba; + end + 3'd6: begin + vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine6_cmd_payload_ba; + end + default: begin + vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine7_cmd_payload_ba; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed3 <= 1'd0; + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_read; + end + 1'd1: begin + vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_read; + end + 2'd2: begin + vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_read; + end + 2'd3: begin + vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_read; + end + 3'd4: begin + vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_read; + end + 3'd5: begin + vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_read; + end + 3'd6: begin + vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_read; + end + default: begin + vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_read; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed4 <= 1'd0; + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_write; + end + 1'd1: begin + vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_write; + end + 2'd2: begin + vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_write; + end + 2'd3: begin + vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_write; + end + 3'd4: begin + vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_write; + end + 3'd5: begin + vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_write; + end + 3'd6: begin + vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_write; + end + default: begin + vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_write; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed5 <= 1'd0; + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd; + end + 1'd1: begin + vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd; + end + 2'd2: begin + vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd; + end + 2'd3: begin + vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd; + end + 3'd4: begin + vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd; + end + 3'd5: begin + vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd; + end + 3'd6: begin + vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd; + end + default: begin + vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd; + end + endcase +end +always @(*) begin + vns_t_array_muxed0 <= 1'd0; + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine0_cmd_payload_cas; + end + 1'd1: begin + vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine1_cmd_payload_cas; + end + 2'd2: begin + vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine2_cmd_payload_cas; + end + 2'd3: begin + vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine3_cmd_payload_cas; + end + 3'd4: begin + vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine4_cmd_payload_cas; + end + 3'd5: begin + vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine5_cmd_payload_cas; + end + 3'd6: begin + vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine6_cmd_payload_cas; + end + default: begin + vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine7_cmd_payload_cas; + end + endcase +end +always @(*) begin + vns_t_array_muxed1 <= 1'd0; + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine0_cmd_payload_ras; + end + 1'd1: begin + vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine1_cmd_payload_ras; + end + 2'd2: begin + vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine2_cmd_payload_ras; + end + 2'd3: begin + vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine3_cmd_payload_ras; + end + 3'd4: begin + vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine4_cmd_payload_ras; + end + 3'd5: begin + vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine5_cmd_payload_ras; + end + 3'd6: begin + vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine6_cmd_payload_ras; + end + default: begin + vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine7_cmd_payload_ras; + end + endcase +end +always @(*) begin + vns_t_array_muxed2 <= 1'd0; + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine0_cmd_payload_we; + end + 1'd1: begin + vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine1_cmd_payload_we; + end + 2'd2: begin + vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine2_cmd_payload_we; + end + 2'd3: begin + vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine3_cmd_payload_we; + end + 3'd4: begin + vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine4_cmd_payload_we; + end + 3'd5: begin + vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine5_cmd_payload_we; + end + 3'd6: begin + vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine6_cmd_payload_we; + end + default: begin + vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine7_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed6 <= 1'd0; + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[0]; + end + 1'd1: begin + vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[1]; + end + 2'd2: begin + vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[2]; + end + 2'd3: begin + vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[3]; + end + 3'd4: begin + vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[4]; + end + 3'd5: begin + vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[5]; + end + 3'd6: begin + vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[6]; + end + default: begin + vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[7]; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed7 <= 14'd0; + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine0_cmd_payload_a; + end + 1'd1: begin + vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine1_cmd_payload_a; + end + 2'd2: begin + vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine2_cmd_payload_a; + end + 2'd3: begin + vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine3_cmd_payload_a; + end + 3'd4: begin + vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine4_cmd_payload_a; + end + 3'd5: begin + vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine5_cmd_payload_a; + end + 3'd6: begin + vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine6_cmd_payload_a; + end + default: begin + vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine7_cmd_payload_a; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed8 <= 3'd0; + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine0_cmd_payload_ba; + end + 1'd1: begin + vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine1_cmd_payload_ba; + end + 2'd2: begin + vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine2_cmd_payload_ba; + end + 2'd3: begin + vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine3_cmd_payload_ba; + end + 3'd4: begin + vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine4_cmd_payload_ba; + end + 3'd5: begin + vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine5_cmd_payload_ba; + end + 3'd6: begin + vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine6_cmd_payload_ba; + end + default: begin + vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine7_cmd_payload_ba; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed9 <= 1'd0; + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_read; + end + 1'd1: begin + vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_read; + end + 2'd2: begin + vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_read; + end + 2'd3: begin + vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_read; + end + 3'd4: begin + vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_read; + end + 3'd5: begin + vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_read; + end + 3'd6: begin + vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_read; + end + default: begin + vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_read; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed10 <= 1'd0; + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_write; + end + 1'd1: begin + vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_write; + end + 2'd2: begin + vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_write; + end + 2'd3: begin + vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_write; + end + 3'd4: begin + vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_write; + end + 3'd5: begin + vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_write; + end + 3'd6: begin + vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_write; + end + default: begin + vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_write; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed11 <= 1'd0; + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd; + end + 1'd1: begin + vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd; + end + 2'd2: begin + vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd; + end + 2'd3: begin + vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd; + end + 3'd4: begin + vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd; + end + 3'd5: begin + vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd; + end + 3'd6: begin + vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd; + end + default: begin + vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd; + end + endcase +end +always @(*) begin + vns_t_array_muxed3 <= 1'd0; + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine0_cmd_payload_cas; + end + 1'd1: begin + vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine1_cmd_payload_cas; + end + 2'd2: begin + vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine2_cmd_payload_cas; + end + 2'd3: begin + vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine3_cmd_payload_cas; + end + 3'd4: begin + vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine4_cmd_payload_cas; + end + 3'd5: begin + vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine5_cmd_payload_cas; + end + 3'd6: begin + vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine6_cmd_payload_cas; + end + default: begin + vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine7_cmd_payload_cas; + end + endcase +end +always @(*) begin + vns_t_array_muxed4 <= 1'd0; + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine0_cmd_payload_ras; + end + 1'd1: begin + vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine1_cmd_payload_ras; + end + 2'd2: begin + vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine2_cmd_payload_ras; + end + 2'd3: begin + vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine3_cmd_payload_ras; + end + 3'd4: begin + vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine4_cmd_payload_ras; + end + 3'd5: begin + vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine5_cmd_payload_ras; + end + 3'd6: begin + vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine6_cmd_payload_ras; + end + default: begin + vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine7_cmd_payload_ras; + end + endcase +end +always @(*) begin + vns_t_array_muxed5 <= 1'd0; + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine0_cmd_payload_we; + end + 1'd1: begin + vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine1_cmd_payload_we; + end + 2'd2: begin + vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine2_cmd_payload_we; + end + 2'd3: begin + vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine3_cmd_payload_we; + end + 3'd4: begin + vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine4_cmd_payload_we; + end + 3'd5: begin + vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine5_cmd_payload_we; + end + 3'd6: begin + vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine6_cmd_payload_we; + end + default: begin + vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine7_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed12 <= 21'd0; + case (vns_roundrobin0_grant) + default: begin + vns_rhs_array_muxed12 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed13 <= 1'd0; + case (vns_roundrobin0_grant) + default: begin + vns_rhs_array_muxed13 <= soc_netsoc_port_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed14 <= 1'd0; + case (vns_roundrobin0_grant) + default: begin + vns_rhs_array_muxed14 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((vns_locked0 | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); + end + endcase +end +always @(*) begin + vns_rhs_array_muxed15 <= 21'd0; + case (vns_roundrobin1_grant) + default: begin + vns_rhs_array_muxed15 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed16 <= 1'd0; + case (vns_roundrobin1_grant) + default: begin + vns_rhs_array_muxed16 <= soc_netsoc_port_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed17 <= 1'd0; + case (vns_roundrobin1_grant) + default: begin + vns_rhs_array_muxed17 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((vns_locked1 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); + end + endcase +end +always @(*) begin + vns_rhs_array_muxed18 <= 21'd0; + case (vns_roundrobin2_grant) + default: begin + vns_rhs_array_muxed18 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed19 <= 1'd0; + case (vns_roundrobin2_grant) + default: begin + vns_rhs_array_muxed19 <= soc_netsoc_port_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed20 <= 1'd0; + case (vns_roundrobin2_grant) + default: begin + vns_rhs_array_muxed20 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((vns_locked2 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); + end + endcase +end +always @(*) begin + vns_rhs_array_muxed21 <= 21'd0; + case (vns_roundrobin3_grant) + default: begin + vns_rhs_array_muxed21 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed22 <= 1'd0; + case (vns_roundrobin3_grant) + default: begin + vns_rhs_array_muxed22 <= soc_netsoc_port_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed23 <= 1'd0; + case (vns_roundrobin3_grant) + default: begin + vns_rhs_array_muxed23 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((vns_locked3 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); + end + endcase +end +always @(*) begin + vns_rhs_array_muxed24 <= 21'd0; + case (vns_roundrobin4_grant) + default: begin + vns_rhs_array_muxed24 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed25 <= 1'd0; + case (vns_roundrobin4_grant) + default: begin + vns_rhs_array_muxed25 <= soc_netsoc_port_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed26 <= 1'd0; + case (vns_roundrobin4_grant) + default: begin + vns_rhs_array_muxed26 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((vns_locked4 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); + end + endcase +end +always @(*) begin + vns_rhs_array_muxed27 <= 21'd0; + case (vns_roundrobin5_grant) + default: begin + vns_rhs_array_muxed27 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed28 <= 1'd0; + case (vns_roundrobin5_grant) + default: begin + vns_rhs_array_muxed28 <= soc_netsoc_port_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed29 <= 1'd0; + case (vns_roundrobin5_grant) + default: begin + vns_rhs_array_muxed29 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((vns_locked5 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); + end + endcase +end +always @(*) begin + vns_rhs_array_muxed30 <= 21'd0; + case (vns_roundrobin6_grant) + default: begin + vns_rhs_array_muxed30 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed31 <= 1'd0; + case (vns_roundrobin6_grant) + default: begin + vns_rhs_array_muxed31 <= soc_netsoc_port_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed32 <= 1'd0; + case (vns_roundrobin6_grant) + default: begin + vns_rhs_array_muxed32 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((vns_locked6 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); + end + endcase +end +always @(*) begin + vns_rhs_array_muxed33 <= 21'd0; + case (vns_roundrobin7_grant) + default: begin + vns_rhs_array_muxed33 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed34 <= 1'd0; + case (vns_roundrobin7_grant) + default: begin + vns_rhs_array_muxed34 <= soc_netsoc_port_cmd_payload_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed35 <= 1'd0; + case (vns_roundrobin7_grant) + default: begin + vns_rhs_array_muxed35 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((vns_locked7 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); + end + endcase +end +always @(*) begin + vns_rhs_array_muxed36 <= 30'd0; + case (vns_wb_sdram_con_grant) + default: begin + vns_rhs_array_muxed36 <= soc_netsoc_interface1_wb_sdram_adr; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed37 <= 32'd0; + case (vns_wb_sdram_con_grant) + default: begin + vns_rhs_array_muxed37 <= soc_netsoc_interface1_wb_sdram_dat_w; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed38 <= 4'd0; + case (vns_wb_sdram_con_grant) + default: begin + vns_rhs_array_muxed38 <= soc_netsoc_interface1_wb_sdram_sel; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed39 <= 1'd0; + case (vns_wb_sdram_con_grant) + default: begin + vns_rhs_array_muxed39 <= soc_netsoc_interface1_wb_sdram_cyc; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed40 <= 1'd0; + case (vns_wb_sdram_con_grant) + default: begin + vns_rhs_array_muxed40 <= soc_netsoc_interface1_wb_sdram_stb; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed41 <= 1'd0; + case (vns_wb_sdram_con_grant) + default: begin + vns_rhs_array_muxed41 <= soc_netsoc_interface1_wb_sdram_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed42 <= 3'd0; + case (vns_wb_sdram_con_grant) + default: begin + vns_rhs_array_muxed42 <= soc_netsoc_interface1_wb_sdram_cti; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed43 <= 2'd0; + case (vns_wb_sdram_con_grant) + default: begin + vns_rhs_array_muxed43 <= soc_netsoc_interface1_wb_sdram_bte; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed44 <= 30'd0; + case (vns_netsoc_grant) + 1'd0: begin + vns_rhs_array_muxed44 <= soc_netsoc_interface0_soc_bus_adr; + end + default: begin + vns_rhs_array_muxed44 <= soc_netsoc_interface1_soc_bus_adr; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed45 <= 32'd0; + case (vns_netsoc_grant) + 1'd0: begin + vns_rhs_array_muxed45 <= soc_netsoc_interface0_soc_bus_dat_w; + end + default: begin + vns_rhs_array_muxed45 <= soc_netsoc_interface1_soc_bus_dat_w; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed46 <= 4'd0; + case (vns_netsoc_grant) + 1'd0: begin + vns_rhs_array_muxed46 <= soc_netsoc_interface0_soc_bus_sel; + end + default: begin + vns_rhs_array_muxed46 <= soc_netsoc_interface1_soc_bus_sel; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed47 <= 1'd0; + case (vns_netsoc_grant) + 1'd0: begin + vns_rhs_array_muxed47 <= soc_netsoc_interface0_soc_bus_cyc; + end + default: begin + vns_rhs_array_muxed47 <= soc_netsoc_interface1_soc_bus_cyc; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed48 <= 1'd0; + case (vns_netsoc_grant) + 1'd0: begin + vns_rhs_array_muxed48 <= soc_netsoc_interface0_soc_bus_stb; + end + default: begin + vns_rhs_array_muxed48 <= soc_netsoc_interface1_soc_bus_stb; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed49 <= 1'd0; + case (vns_netsoc_grant) + 1'd0: begin + vns_rhs_array_muxed49 <= soc_netsoc_interface0_soc_bus_we; + end + default: begin + vns_rhs_array_muxed49 <= soc_netsoc_interface1_soc_bus_we; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed50 <= 3'd0; + case (vns_netsoc_grant) + 1'd0: begin + vns_rhs_array_muxed50 <= soc_netsoc_interface0_soc_bus_cti; + end + default: begin + vns_rhs_array_muxed50 <= soc_netsoc_interface1_soc_bus_cti; + end + endcase +end +always @(*) begin + vns_rhs_array_muxed51 <= 2'd0; + case (vns_netsoc_grant) + 1'd0: begin + vns_rhs_array_muxed51 <= soc_netsoc_interface0_soc_bus_bte; + end + default: begin + vns_rhs_array_muxed51 <= soc_netsoc_interface1_soc_bus_bte; + end + endcase +end +always @(*) begin + vns_array_muxed0 <= 3'd0; + case (soc_netsoc_sdram_steerer_sel0) + 1'd0: begin + vns_array_muxed0 <= soc_netsoc_sdram_nop_ba[2:0]; + end + 1'd1: begin + vns_array_muxed0 <= soc_netsoc_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + vns_array_muxed0 <= soc_netsoc_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + vns_array_muxed0 <= soc_netsoc_sdram_cmd_payload_ba[2:0]; + end + endcase +end +always @(*) begin + vns_array_muxed1 <= 14'd0; + case (soc_netsoc_sdram_steerer_sel0) + 1'd0: begin + vns_array_muxed1 <= soc_netsoc_sdram_nop_a; + end + 1'd1: begin + vns_array_muxed1 <= soc_netsoc_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + vns_array_muxed1 <= soc_netsoc_sdram_choose_req_cmd_payload_a; + end + default: begin + vns_array_muxed1 <= soc_netsoc_sdram_cmd_payload_a; + end + endcase +end +always @(*) begin + vns_array_muxed2 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel0) + 1'd0: begin + vns_array_muxed2 <= 1'd0; + end + 1'd1: begin + vns_array_muxed2 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + vns_array_muxed2 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_cas); + end + default: begin + vns_array_muxed2 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_cas); + end + endcase +end +always @(*) begin + vns_array_muxed3 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel0) + 1'd0: begin + vns_array_muxed3 <= 1'd0; + end + 1'd1: begin + vns_array_muxed3 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + vns_array_muxed3 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_ras); + end + default: begin + vns_array_muxed3 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_ras); + end + endcase +end +always @(*) begin + vns_array_muxed4 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel0) + 1'd0: begin + vns_array_muxed4 <= 1'd0; + end + 1'd1: begin + vns_array_muxed4 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + vns_array_muxed4 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_we); + end + default: begin + vns_array_muxed4 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_we); + end + endcase +end +always @(*) begin + vns_array_muxed5 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel0) + 1'd0: begin + vns_array_muxed5 <= 1'd0; + end + 1'd1: begin + vns_array_muxed5 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + vns_array_muxed5 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_read); + end + default: begin + vns_array_muxed5 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_read); + end + endcase +end +always @(*) begin + vns_array_muxed6 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel0) + 1'd0: begin + vns_array_muxed6 <= 1'd0; + end + 1'd1: begin + vns_array_muxed6 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + vns_array_muxed6 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); + end + default: begin + vns_array_muxed6 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_write); + end + endcase +end +always @(*) begin + vns_array_muxed7 <= 3'd0; + case (soc_netsoc_sdram_steerer_sel1) + 1'd0: begin + vns_array_muxed7 <= soc_netsoc_sdram_nop_ba[2:0]; + end + 1'd1: begin + vns_array_muxed7 <= soc_netsoc_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + vns_array_muxed7 <= soc_netsoc_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + vns_array_muxed7 <= soc_netsoc_sdram_cmd_payload_ba[2:0]; + end + endcase +end +always @(*) begin + vns_array_muxed8 <= 14'd0; + case (soc_netsoc_sdram_steerer_sel1) + 1'd0: begin + vns_array_muxed8 <= soc_netsoc_sdram_nop_a; + end + 1'd1: begin + vns_array_muxed8 <= soc_netsoc_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + vns_array_muxed8 <= soc_netsoc_sdram_choose_req_cmd_payload_a; + end + default: begin + vns_array_muxed8 <= soc_netsoc_sdram_cmd_payload_a; + end + endcase +end +always @(*) begin + vns_array_muxed9 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel1) + 1'd0: begin + vns_array_muxed9 <= 1'd0; + end + 1'd1: begin + vns_array_muxed9 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + vns_array_muxed9 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_cas); + end + default: begin + vns_array_muxed9 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_cas); + end + endcase +end +always @(*) begin + vns_array_muxed10 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel1) + 1'd0: begin + vns_array_muxed10 <= 1'd0; + end + 1'd1: begin + vns_array_muxed10 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + vns_array_muxed10 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_ras); + end + default: begin + vns_array_muxed10 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_ras); + end + endcase +end +always @(*) begin + vns_array_muxed11 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel1) + 1'd0: begin + vns_array_muxed11 <= 1'd0; + end + 1'd1: begin + vns_array_muxed11 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + vns_array_muxed11 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_we); + end + default: begin + vns_array_muxed11 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_we); + end + endcase +end +always @(*) begin + vns_array_muxed12 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel1) + 1'd0: begin + vns_array_muxed12 <= 1'd0; + end + 1'd1: begin + vns_array_muxed12 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + vns_array_muxed12 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_read); + end + default: begin + vns_array_muxed12 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_read); + end + endcase +end +always @(*) begin + vns_array_muxed13 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel1) + 1'd0: begin + vns_array_muxed13 <= 1'd0; + end + 1'd1: begin + vns_array_muxed13 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + vns_array_muxed13 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); + end + default: begin + vns_array_muxed13 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_write); + end + endcase +end +always @(*) begin + vns_array_muxed14 <= 3'd0; + case (soc_netsoc_sdram_steerer_sel2) + 1'd0: begin + vns_array_muxed14 <= soc_netsoc_sdram_nop_ba[2:0]; + end + 1'd1: begin + vns_array_muxed14 <= soc_netsoc_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + vns_array_muxed14 <= soc_netsoc_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + vns_array_muxed14 <= soc_netsoc_sdram_cmd_payload_ba[2:0]; + end + endcase +end +always @(*) begin + vns_array_muxed15 <= 14'd0; + case (soc_netsoc_sdram_steerer_sel2) + 1'd0: begin + vns_array_muxed15 <= soc_netsoc_sdram_nop_a; + end + 1'd1: begin + vns_array_muxed15 <= soc_netsoc_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + vns_array_muxed15 <= soc_netsoc_sdram_choose_req_cmd_payload_a; + end + default: begin + vns_array_muxed15 <= soc_netsoc_sdram_cmd_payload_a; + end + endcase +end +always @(*) begin + vns_array_muxed16 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel2) + 1'd0: begin + vns_array_muxed16 <= 1'd0; + end + 1'd1: begin + vns_array_muxed16 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + vns_array_muxed16 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_cas); + end + default: begin + vns_array_muxed16 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_cas); + end + endcase +end +always @(*) begin + vns_array_muxed17 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel2) + 1'd0: begin + vns_array_muxed17 <= 1'd0; + end + 1'd1: begin + vns_array_muxed17 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + vns_array_muxed17 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_ras); + end + default: begin + vns_array_muxed17 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_ras); + end + endcase +end +always @(*) begin + vns_array_muxed18 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel2) + 1'd0: begin + vns_array_muxed18 <= 1'd0; + end + 1'd1: begin + vns_array_muxed18 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + vns_array_muxed18 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_we); + end + default: begin + vns_array_muxed18 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_we); + end + endcase +end +always @(*) begin + vns_array_muxed19 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel2) + 1'd0: begin + vns_array_muxed19 <= 1'd0; + end + 1'd1: begin + vns_array_muxed19 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + vns_array_muxed19 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_read); + end + default: begin + vns_array_muxed19 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_read); + end + endcase +end +always @(*) begin + vns_array_muxed20 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel2) + 1'd0: begin + vns_array_muxed20 <= 1'd0; + end + 1'd1: begin + vns_array_muxed20 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + vns_array_muxed20 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); + end + default: begin + vns_array_muxed20 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_write); + end + endcase +end +always @(*) begin + vns_array_muxed21 <= 3'd0; + case (soc_netsoc_sdram_steerer_sel3) + 1'd0: begin + vns_array_muxed21 <= soc_netsoc_sdram_nop_ba[2:0]; + end + 1'd1: begin + vns_array_muxed21 <= soc_netsoc_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + vns_array_muxed21 <= soc_netsoc_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + vns_array_muxed21 <= soc_netsoc_sdram_cmd_payload_ba[2:0]; + end + endcase +end +always @(*) begin + vns_array_muxed22 <= 14'd0; + case (soc_netsoc_sdram_steerer_sel3) + 1'd0: begin + vns_array_muxed22 <= soc_netsoc_sdram_nop_a; + end + 1'd1: begin + vns_array_muxed22 <= soc_netsoc_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + vns_array_muxed22 <= soc_netsoc_sdram_choose_req_cmd_payload_a; + end + default: begin + vns_array_muxed22 <= soc_netsoc_sdram_cmd_payload_a; + end + endcase +end +always @(*) begin + vns_array_muxed23 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel3) + 1'd0: begin + vns_array_muxed23 <= 1'd0; + end + 1'd1: begin + vns_array_muxed23 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + vns_array_muxed23 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_cas); + end + default: begin + vns_array_muxed23 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_cas); + end + endcase +end +always @(*) begin + vns_array_muxed24 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel3) + 1'd0: begin + vns_array_muxed24 <= 1'd0; + end + 1'd1: begin + vns_array_muxed24 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + vns_array_muxed24 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_ras); + end + default: begin + vns_array_muxed24 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_ras); + end + endcase +end +always @(*) begin + vns_array_muxed25 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel3) + 1'd0: begin + vns_array_muxed25 <= 1'd0; + end + 1'd1: begin + vns_array_muxed25 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + vns_array_muxed25 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_we); + end + default: begin + vns_array_muxed25 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_we); + end + endcase +end +always @(*) begin + vns_array_muxed26 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel3) + 1'd0: begin + vns_array_muxed26 <= 1'd0; + end + 1'd1: begin + vns_array_muxed26 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + vns_array_muxed26 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_read); + end + default: begin + vns_array_muxed26 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_read); + end + endcase +end +always @(*) begin + vns_array_muxed27 <= 1'd0; + case (soc_netsoc_sdram_steerer_sel3) + 1'd0: begin + vns_array_muxed27 <= 1'd0; + end + 1'd1: begin + vns_array_muxed27 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + vns_array_muxed27 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); + end + default: begin + vns_array_muxed27 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_write); + end + endcase +end +assign soc_netsoc_uart_phy_rx = vns_xilinxmultiregimpl0_regs1; +assign vns_xilinxasyncresetsynchronizerimpl0 = ((~soc_pll_locked) | (~cpu_reset)); +assign vns_xilinxasyncresetsynchronizerimpl1 = ((~soc_pll_locked) | (~cpu_reset)); +always @(*) begin + soc_status <= 1'd0; + soc_status <= soc_r; + soc_status <= vns_xilinxmultiregimpl1_regs1; +end +assign soc_ps_preamble_error_toggle_o = vns_xilinxmultiregimpl2_regs1; +assign soc_ps_crc_error_toggle_o = vns_xilinxmultiregimpl3_regs1; +assign soc_tx_cdc_produce_rdomain = vns_xilinxmultiregimpl4_regs1; +assign soc_tx_cdc_consume_wdomain = vns_xilinxmultiregimpl5_regs1; +assign soc_rx_cdc_produce_rdomain = vns_xilinxmultiregimpl6_regs1; +assign soc_rx_cdc_consume_wdomain = vns_xilinxmultiregimpl7_regs1; + +always @(posedge clk200_clk) begin + if ((soc_reset_counter != 1'd0)) begin + soc_reset_counter <= (soc_reset_counter - 1'd1); + end else begin + soc_ic_reset <= 1'd0; + end + if (clk200_rst) begin + soc_reset_counter <= 4'd15; + soc_ic_reset <= 1'd1; + end +end + +always @(posedge eth_rx_clk) begin + soc_liteethphymiirx_converter_reset <= (~eth_rx_dv); + soc_liteethphymiirx_converter_sink_valid <= 1'd1; + soc_liteethphymiirx_converter_sink_payload_data <= eth_rx_data; + if (soc_liteethphymiirx_converter_converter_source_ready) begin + soc_liteethphymiirx_converter_converter_strobe_all <= 1'd0; + end + if (soc_liteethphymiirx_converter_converter_load_part) begin + if (((soc_liteethphymiirx_converter_converter_demux == 1'd1) | soc_liteethphymiirx_converter_converter_sink_last)) begin + soc_liteethphymiirx_converter_converter_demux <= 1'd0; + soc_liteethphymiirx_converter_converter_strobe_all <= 1'd1; + end else begin + soc_liteethphymiirx_converter_converter_demux <= (soc_liteethphymiirx_converter_converter_demux + 1'd1); + end + end + if ((soc_liteethphymiirx_converter_converter_source_valid & soc_liteethphymiirx_converter_converter_source_ready)) begin + if ((soc_liteethphymiirx_converter_converter_sink_valid & soc_liteethphymiirx_converter_converter_sink_ready)) begin + soc_liteethphymiirx_converter_converter_source_first <= soc_liteethphymiirx_converter_converter_sink_first; + soc_liteethphymiirx_converter_converter_source_last <= soc_liteethphymiirx_converter_converter_sink_last; + end else begin + soc_liteethphymiirx_converter_converter_source_first <= 1'd0; + soc_liteethphymiirx_converter_converter_source_last <= 1'd0; + end + end else begin + if ((soc_liteethphymiirx_converter_converter_sink_valid & soc_liteethphymiirx_converter_converter_sink_ready)) begin + soc_liteethphymiirx_converter_converter_source_first <= (soc_liteethphymiirx_converter_converter_sink_first | soc_liteethphymiirx_converter_converter_source_first); + soc_liteethphymiirx_converter_converter_source_last <= (soc_liteethphymiirx_converter_converter_sink_last | soc_liteethphymiirx_converter_converter_source_last); + end + end + if (soc_liteethphymiirx_converter_converter_load_part) begin + case (soc_liteethphymiirx_converter_converter_demux) + 1'd0: begin + soc_liteethphymiirx_converter_converter_source_payload_data[3:0] <= soc_liteethphymiirx_converter_converter_sink_payload_data; + end + 1'd1: begin + soc_liteethphymiirx_converter_converter_source_payload_data[7:4] <= soc_liteethphymiirx_converter_converter_sink_payload_data; + end + endcase + end + if (soc_liteethphymiirx_converter_converter_load_part) begin + soc_liteethphymiirx_converter_converter_source_payload_valid_token_count <= (soc_liteethphymiirx_converter_converter_demux + 1'd1); + end + if (soc_liteethphymiirx_converter_reset) begin + soc_liteethphymiirx_converter_converter_source_first <= 1'd0; + soc_liteethphymiirx_converter_converter_source_last <= 1'd0; + soc_liteethphymiirx_converter_converter_source_payload_data <= 8'd0; + soc_liteethphymiirx_converter_converter_source_payload_valid_token_count <= 2'd0; + soc_liteethphymiirx_converter_converter_demux <= 1'd0; + soc_liteethphymiirx_converter_converter_strobe_all <= 1'd0; + end + vns_liteethmacpreamblechecker_state <= vns_liteethmacpreamblechecker_next_state; + if (soc_crc32_checker_crc_ce) begin + soc_crc32_checker_crc_reg <= soc_crc32_checker_crc_next; + end + if (soc_crc32_checker_crc_reset) begin + soc_crc32_checker_crc_reg <= 32'd4294967295; + end + if (((soc_crc32_checker_syncfifo_syncfifo_we & soc_crc32_checker_syncfifo_syncfifo_writable) & (~soc_crc32_checker_syncfifo_replace))) begin + if ((soc_crc32_checker_syncfifo_produce == 3'd4)) begin + soc_crc32_checker_syncfifo_produce <= 1'd0; + end else begin + soc_crc32_checker_syncfifo_produce <= (soc_crc32_checker_syncfifo_produce + 1'd1); + end + end + if (soc_crc32_checker_syncfifo_do_read) begin + if ((soc_crc32_checker_syncfifo_consume == 3'd4)) begin + soc_crc32_checker_syncfifo_consume <= 1'd0; + end else begin + soc_crc32_checker_syncfifo_consume <= (soc_crc32_checker_syncfifo_consume + 1'd1); + end + end + if (((soc_crc32_checker_syncfifo_syncfifo_we & soc_crc32_checker_syncfifo_syncfifo_writable) & (~soc_crc32_checker_syncfifo_replace))) begin + if ((~soc_crc32_checker_syncfifo_do_read)) begin + soc_crc32_checker_syncfifo_level <= (soc_crc32_checker_syncfifo_level + 1'd1); + end + end else begin + if (soc_crc32_checker_syncfifo_do_read) begin + soc_crc32_checker_syncfifo_level <= (soc_crc32_checker_syncfifo_level - 1'd1); + end + end + if (soc_crc32_checker_fifo_reset) begin + soc_crc32_checker_syncfifo_level <= 3'd0; + soc_crc32_checker_syncfifo_produce <= 3'd0; + soc_crc32_checker_syncfifo_consume <= 3'd0; + end + vns_liteethmaccrc32checker_state <= vns_liteethmaccrc32checker_next_state; + if (soc_ps_preamble_error_i) begin + soc_ps_preamble_error_toggle_i <= (~soc_ps_preamble_error_toggle_i); + end + if (soc_ps_crc_error_i) begin + soc_ps_crc_error_toggle_i <= (~soc_ps_crc_error_toggle_i); + end + if (soc_rx_converter_converter_source_ready) begin + soc_rx_converter_converter_strobe_all <= 1'd0; + end + if (soc_rx_converter_converter_load_part) begin + if (((soc_rx_converter_converter_demux == 2'd3) | soc_rx_converter_converter_sink_last)) begin + soc_rx_converter_converter_demux <= 1'd0; + soc_rx_converter_converter_strobe_all <= 1'd1; + end else begin + soc_rx_converter_converter_demux <= (soc_rx_converter_converter_demux + 1'd1); + end + end + if ((soc_rx_converter_converter_source_valid & soc_rx_converter_converter_source_ready)) begin + if ((soc_rx_converter_converter_sink_valid & soc_rx_converter_converter_sink_ready)) begin + soc_rx_converter_converter_source_first <= soc_rx_converter_converter_sink_first; + soc_rx_converter_converter_source_last <= soc_rx_converter_converter_sink_last; + end else begin + soc_rx_converter_converter_source_first <= 1'd0; + soc_rx_converter_converter_source_last <= 1'd0; + end + end else begin + if ((soc_rx_converter_converter_sink_valid & soc_rx_converter_converter_sink_ready)) begin + soc_rx_converter_converter_source_first <= (soc_rx_converter_converter_sink_first | soc_rx_converter_converter_source_first); + soc_rx_converter_converter_source_last <= (soc_rx_converter_converter_sink_last | soc_rx_converter_converter_source_last); + end + end + if (soc_rx_converter_converter_load_part) begin + case (soc_rx_converter_converter_demux) + 1'd0: begin + soc_rx_converter_converter_source_payload_data[9:0] <= soc_rx_converter_converter_sink_payload_data; + end + 1'd1: begin + soc_rx_converter_converter_source_payload_data[19:10] <= soc_rx_converter_converter_sink_payload_data; + end + 2'd2: begin + soc_rx_converter_converter_source_payload_data[29:20] <= soc_rx_converter_converter_sink_payload_data; + end + 2'd3: begin + soc_rx_converter_converter_source_payload_data[39:30] <= soc_rx_converter_converter_sink_payload_data; + end + endcase + end + if (soc_rx_converter_converter_load_part) begin + soc_rx_converter_converter_source_payload_valid_token_count <= (soc_rx_converter_converter_demux + 1'd1); + end + soc_rx_cdc_graycounter0_q_binary <= soc_rx_cdc_graycounter0_q_next_binary; + soc_rx_cdc_graycounter0_q <= soc_rx_cdc_graycounter0_q_next; + if (eth_rx_rst) begin + soc_liteethphymiirx_converter_sink_valid <= 1'd0; + soc_liteethphymiirx_converter_sink_payload_data <= 4'd0; + soc_liteethphymiirx_converter_converter_source_first <= 1'd0; + soc_liteethphymiirx_converter_converter_source_last <= 1'd0; + soc_liteethphymiirx_converter_converter_source_payload_data <= 8'd0; + soc_liteethphymiirx_converter_converter_source_payload_valid_token_count <= 2'd0; + soc_liteethphymiirx_converter_converter_demux <= 1'd0; + soc_liteethphymiirx_converter_converter_strobe_all <= 1'd0; + soc_liteethphymiirx_converter_reset <= 1'd0; + soc_crc32_checker_crc_reg <= 32'd4294967295; + soc_crc32_checker_syncfifo_level <= 3'd0; + soc_crc32_checker_syncfifo_produce <= 3'd0; + soc_crc32_checker_syncfifo_consume <= 3'd0; + soc_rx_converter_converter_source_first <= 1'd0; + soc_rx_converter_converter_source_last <= 1'd0; + soc_rx_converter_converter_source_payload_data <= 40'd0; + soc_rx_converter_converter_source_payload_valid_token_count <= 3'd0; + soc_rx_converter_converter_demux <= 2'd0; + soc_rx_converter_converter_strobe_all <= 1'd0; + soc_rx_cdc_graycounter0_q <= 7'd0; + soc_rx_cdc_graycounter0_q_binary <= 7'd0; + vns_liteethmacpreamblechecker_state <= 1'd0; + vns_liteethmaccrc32checker_state <= 2'd0; + end + vns_xilinxmultiregimpl7_regs0 <= soc_rx_cdc_graycounter1_q; + vns_xilinxmultiregimpl7_regs1 <= vns_xilinxmultiregimpl7_regs0; +end + +always @(posedge eth_tx_clk) begin + eth_tx_en <= soc_liteethphymiitx_converter_source_valid; + eth_tx_data <= soc_liteethphymiitx_converter_source_payload_data; + if ((soc_liteethphymiitx_converter_converter_source_valid & soc_liteethphymiitx_converter_converter_source_ready)) begin + if (soc_liteethphymiitx_converter_converter_last) begin + soc_liteethphymiitx_converter_converter_mux <= 1'd0; + end else begin + soc_liteethphymiitx_converter_converter_mux <= (soc_liteethphymiitx_converter_converter_mux + 1'd1); + end + end + if (soc_tx_gap_inserter_counter_reset) begin + soc_tx_gap_inserter_counter <= 1'd0; + end else begin + if (soc_tx_gap_inserter_counter_ce) begin + soc_tx_gap_inserter_counter <= (soc_tx_gap_inserter_counter + 1'd1); + end + end + vns_liteethmacgap_state <= vns_liteethmacgap_next_state; + if (soc_preamble_inserter_clr_cnt) begin + soc_preamble_inserter_cnt <= 1'd0; + end else begin + if (soc_preamble_inserter_inc_cnt) begin + soc_preamble_inserter_cnt <= (soc_preamble_inserter_cnt + 1'd1); + end + end + vns_liteethmacpreambleinserter_state <= vns_liteethmacpreambleinserter_next_state; + if (soc_crc32_inserter_is_ongoing0) begin + soc_crc32_inserter_cnt <= 2'd3; + end else begin + if ((soc_crc32_inserter_is_ongoing1 & (~soc_crc32_inserter_cnt_done))) begin + soc_crc32_inserter_cnt <= (soc_crc32_inserter_cnt - soc_crc32_inserter_source_ready); + end + end + if (soc_crc32_inserter_ce) begin + soc_crc32_inserter_reg <= soc_crc32_inserter_next; + end + if (soc_crc32_inserter_reset) begin + soc_crc32_inserter_reg <= 32'd4294967295; + end + vns_liteethmaccrc32inserter_state <= vns_liteethmaccrc32inserter_next_state; + if (soc_padding_inserter_counter_reset) begin + soc_padding_inserter_counter <= 1'd0; + end else begin + if (soc_padding_inserter_counter_ce) begin + soc_padding_inserter_counter <= (soc_padding_inserter_counter + 1'd1); + end + end + vns_liteethmacpaddinginserter_state <= vns_liteethmacpaddinginserter_next_state; + if ((soc_tx_last_be_sink_valid & soc_tx_last_be_sink_ready)) begin + if (soc_tx_last_be_sink_last) begin + soc_tx_last_be_ongoing <= 1'd1; + end else begin + if (soc_tx_last_be_sink_payload_last_be) begin + soc_tx_last_be_ongoing <= 1'd0; + end + end + end + if ((soc_tx_converter_converter_source_valid & soc_tx_converter_converter_source_ready)) begin + if (soc_tx_converter_converter_last) begin + soc_tx_converter_converter_mux <= 1'd0; + end else begin + soc_tx_converter_converter_mux <= (soc_tx_converter_converter_mux + 1'd1); + end + end + soc_tx_cdc_graycounter1_q_binary <= soc_tx_cdc_graycounter1_q_next_binary; + soc_tx_cdc_graycounter1_q <= soc_tx_cdc_graycounter1_q_next; + if (eth_tx_rst) begin + soc_liteethphymiitx_converter_converter_mux <= 1'd0; + soc_crc32_inserter_reg <= 32'd4294967295; + soc_crc32_inserter_cnt <= 2'd3; + soc_padding_inserter_counter <= 16'd1; + soc_tx_last_be_ongoing <= 1'd1; + soc_tx_converter_converter_mux <= 2'd0; + soc_tx_cdc_graycounter1_q <= 7'd0; + soc_tx_cdc_graycounter1_q_binary <= 7'd0; + vns_liteethmacgap_state <= 1'd0; + vns_liteethmacpreambleinserter_state <= 2'd0; + vns_liteethmaccrc32inserter_state <= 2'd0; + vns_liteethmacpaddinginserter_state <= 1'd0; + end + vns_xilinxmultiregimpl4_regs0 <= soc_tx_cdc_graycounter0_q; + vns_xilinxmultiregimpl4_regs1 <= vns_xilinxmultiregimpl4_regs0; +end + +always @(posedge sys_clk) begin + if ((soc_netsoc_ctrl_bus_errors != 32'd4294967295)) begin + if (soc_netsoc_ctrl_bus_error) begin + soc_netsoc_ctrl_bus_errors <= (soc_netsoc_ctrl_bus_errors + 1'd1); + end + end + soc_netsoc_cpu_time <= (soc_netsoc_cpu_time + 1'd1); + if (soc_netsoc_cpu_latch_re) begin + soc_netsoc_cpu_time_status <= soc_netsoc_cpu_time; + end + if (soc_netsoc_cpu_latch_re) begin + soc_netsoc_cpu_time_cmp <= soc_netsoc_cpu_time_cmp_storage; + end + soc_netsoc_rom_bus_ack <= 1'd0; + if (((soc_netsoc_rom_bus_cyc & soc_netsoc_rom_bus_stb) & (~soc_netsoc_rom_bus_ack))) begin + soc_netsoc_rom_bus_ack <= 1'd1; + end + soc_netsoc_sram_bus_ack <= 1'd0; + if (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & (~soc_netsoc_sram_bus_ack))) begin + soc_netsoc_sram_bus_ack <= 1'd1; + end + soc_netsoc_uart_phy_sink_ready <= 1'd0; + if (((soc_netsoc_uart_phy_sink_valid & (~soc_netsoc_uart_phy_tx_busy)) & (~soc_netsoc_uart_phy_sink_ready))) begin + soc_netsoc_uart_phy_tx_reg <= soc_netsoc_uart_phy_sink_payload_data; + soc_netsoc_uart_phy_tx_bitcount <= 1'd0; + soc_netsoc_uart_phy_tx_busy <= 1'd1; + serial_tx <= 1'd0; + end else begin + if ((soc_netsoc_uart_phy_uart_clk_txen & soc_netsoc_uart_phy_tx_busy)) begin + soc_netsoc_uart_phy_tx_bitcount <= (soc_netsoc_uart_phy_tx_bitcount + 1'd1); + if ((soc_netsoc_uart_phy_tx_bitcount == 4'd8)) begin + serial_tx <= 1'd1; + end else begin + if ((soc_netsoc_uart_phy_tx_bitcount == 4'd9)) begin + serial_tx <= 1'd1; + soc_netsoc_uart_phy_tx_busy <= 1'd0; + soc_netsoc_uart_phy_sink_ready <= 1'd1; + end else begin + serial_tx <= soc_netsoc_uart_phy_tx_reg[0]; + soc_netsoc_uart_phy_tx_reg <= {1'd0, soc_netsoc_uart_phy_tx_reg[7:1]}; + end + end + end + end + if (soc_netsoc_uart_phy_tx_busy) begin + {soc_netsoc_uart_phy_uart_clk_txen, soc_netsoc_uart_phy_phase_accumulator_tx} <= (soc_netsoc_uart_phy_phase_accumulator_tx + soc_netsoc_uart_phy_storage); + end else begin + {soc_netsoc_uart_phy_uart_clk_txen, soc_netsoc_uart_phy_phase_accumulator_tx} <= 1'd0; + end + soc_netsoc_uart_phy_source_valid <= 1'd0; + soc_netsoc_uart_phy_rx_r <= soc_netsoc_uart_phy_rx; + if ((~soc_netsoc_uart_phy_rx_busy)) begin + if (((~soc_netsoc_uart_phy_rx) & soc_netsoc_uart_phy_rx_r)) begin + soc_netsoc_uart_phy_rx_busy <= 1'd1; + soc_netsoc_uart_phy_rx_bitcount <= 1'd0; + end + end else begin + if (soc_netsoc_uart_phy_uart_clk_rxen) begin + soc_netsoc_uart_phy_rx_bitcount <= (soc_netsoc_uart_phy_rx_bitcount + 1'd1); + if ((soc_netsoc_uart_phy_rx_bitcount == 1'd0)) begin + if (soc_netsoc_uart_phy_rx) begin + soc_netsoc_uart_phy_rx_busy <= 1'd0; + end + end else begin + if ((soc_netsoc_uart_phy_rx_bitcount == 4'd9)) begin + soc_netsoc_uart_phy_rx_busy <= 1'd0; + if (soc_netsoc_uart_phy_rx) begin + soc_netsoc_uart_phy_source_payload_data <= soc_netsoc_uart_phy_rx_reg; + soc_netsoc_uart_phy_source_valid <= 1'd1; + end + end else begin + soc_netsoc_uart_phy_rx_reg <= {soc_netsoc_uart_phy_rx, soc_netsoc_uart_phy_rx_reg[7:1]}; + end + end + end + end + if (soc_netsoc_uart_phy_rx_busy) begin + {soc_netsoc_uart_phy_uart_clk_rxen, soc_netsoc_uart_phy_phase_accumulator_rx} <= (soc_netsoc_uart_phy_phase_accumulator_rx + soc_netsoc_uart_phy_storage); + end else begin + {soc_netsoc_uart_phy_uart_clk_rxen, soc_netsoc_uart_phy_phase_accumulator_rx} <= 32'd2147483648; + end + if (soc_netsoc_uart_tx_clear) begin + soc_netsoc_uart_tx_pending <= 1'd0; + end + soc_netsoc_uart_tx_old_trigger <= soc_netsoc_uart_tx_trigger; + if (((~soc_netsoc_uart_tx_trigger) & soc_netsoc_uart_tx_old_trigger)) begin + soc_netsoc_uart_tx_pending <= 1'd1; + end + if (soc_netsoc_uart_rx_clear) begin + soc_netsoc_uart_rx_pending <= 1'd0; + end + soc_netsoc_uart_rx_old_trigger <= soc_netsoc_uart_rx_trigger; + if (((~soc_netsoc_uart_rx_trigger) & soc_netsoc_uart_rx_old_trigger)) begin + soc_netsoc_uart_rx_pending <= 1'd1; + end + if (soc_netsoc_uart_tx_fifo_syncfifo_re) begin + soc_netsoc_uart_tx_fifo_readable <= 1'd1; + end else begin + if (soc_netsoc_uart_tx_fifo_re) begin + soc_netsoc_uart_tx_fifo_readable <= 1'd0; + end + end + if (((soc_netsoc_uart_tx_fifo_syncfifo_we & soc_netsoc_uart_tx_fifo_syncfifo_writable) & (~soc_netsoc_uart_tx_fifo_replace))) begin + soc_netsoc_uart_tx_fifo_produce <= (soc_netsoc_uart_tx_fifo_produce + 1'd1); + end + if (soc_netsoc_uart_tx_fifo_do_read) begin + soc_netsoc_uart_tx_fifo_consume <= (soc_netsoc_uart_tx_fifo_consume + 1'd1); + end + if (((soc_netsoc_uart_tx_fifo_syncfifo_we & soc_netsoc_uart_tx_fifo_syncfifo_writable) & (~soc_netsoc_uart_tx_fifo_replace))) begin + if ((~soc_netsoc_uart_tx_fifo_do_read)) begin + soc_netsoc_uart_tx_fifo_level0 <= (soc_netsoc_uart_tx_fifo_level0 + 1'd1); + end + end else begin + if (soc_netsoc_uart_tx_fifo_do_read) begin + soc_netsoc_uart_tx_fifo_level0 <= (soc_netsoc_uart_tx_fifo_level0 - 1'd1); + end + end + if (soc_netsoc_uart_rx_fifo_syncfifo_re) begin + soc_netsoc_uart_rx_fifo_readable <= 1'd1; + end else begin + if (soc_netsoc_uart_rx_fifo_re) begin + soc_netsoc_uart_rx_fifo_readable <= 1'd0; + end + end + if (((soc_netsoc_uart_rx_fifo_syncfifo_we & soc_netsoc_uart_rx_fifo_syncfifo_writable) & (~soc_netsoc_uart_rx_fifo_replace))) begin + soc_netsoc_uart_rx_fifo_produce <= (soc_netsoc_uart_rx_fifo_produce + 1'd1); + end + if (soc_netsoc_uart_rx_fifo_do_read) begin + soc_netsoc_uart_rx_fifo_consume <= (soc_netsoc_uart_rx_fifo_consume + 1'd1); + end + if (((soc_netsoc_uart_rx_fifo_syncfifo_we & soc_netsoc_uart_rx_fifo_syncfifo_writable) & (~soc_netsoc_uart_rx_fifo_replace))) begin + if ((~soc_netsoc_uart_rx_fifo_do_read)) begin + soc_netsoc_uart_rx_fifo_level0 <= (soc_netsoc_uart_rx_fifo_level0 + 1'd1); + end + end else begin + if (soc_netsoc_uart_rx_fifo_do_read) begin + soc_netsoc_uart_rx_fifo_level0 <= (soc_netsoc_uart_rx_fifo_level0 - 1'd1); + end + end + if (soc_netsoc_uart_reset) begin + soc_netsoc_uart_tx_pending <= 1'd0; + soc_netsoc_uart_tx_old_trigger <= 1'd0; + soc_netsoc_uart_rx_pending <= 1'd0; + soc_netsoc_uart_rx_old_trigger <= 1'd0; + soc_netsoc_uart_tx_fifo_readable <= 1'd0; + soc_netsoc_uart_tx_fifo_level0 <= 5'd0; + soc_netsoc_uart_tx_fifo_produce <= 4'd0; + soc_netsoc_uart_tx_fifo_consume <= 4'd0; + soc_netsoc_uart_rx_fifo_readable <= 1'd0; + soc_netsoc_uart_rx_fifo_level0 <= 5'd0; + soc_netsoc_uart_rx_fifo_produce <= 4'd0; + soc_netsoc_uart_rx_fifo_consume <= 4'd0; + end + if (soc_netsoc_timer0_en_storage) begin + if ((soc_netsoc_timer0_value == 1'd0)) begin + soc_netsoc_timer0_value <= soc_netsoc_timer0_reload_storage; + end else begin + soc_netsoc_timer0_value <= (soc_netsoc_timer0_value - 1'd1); + end + end else begin + soc_netsoc_timer0_value <= soc_netsoc_timer0_load_storage; + end + if (soc_netsoc_timer0_update_value_re) begin + soc_netsoc_timer0_value_status <= soc_netsoc_timer0_value; + end + if (soc_netsoc_timer0_zero_clear) begin + soc_netsoc_timer0_zero_pending <= 1'd0; + end + soc_netsoc_timer0_zero_old_trigger <= soc_netsoc_timer0_zero_trigger; + if (((~soc_netsoc_timer0_zero_trigger) & soc_netsoc_timer0_zero_old_trigger)) begin + soc_netsoc_timer0_zero_pending <= 1'd1; + end + vns_wb2csr_state <= vns_wb2csr_next_state; + soc_emulator_ram_bus_ack <= 1'd0; + if (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & (~soc_emulator_ram_bus_ack))) begin + soc_emulator_ram_bus_ack <= 1'd1; + end + if (soc_a7ddrphy_dly_sel_storage[0]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip0_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip0_value <= (soc_a7ddrphy_bitslip0_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[0]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip1_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip1_value <= (soc_a7ddrphy_bitslip1_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[0]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip2_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip2_value <= (soc_a7ddrphy_bitslip2_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[0]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip3_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip3_value <= (soc_a7ddrphy_bitslip3_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[0]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip4_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip4_value <= (soc_a7ddrphy_bitslip4_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[0]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip5_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip5_value <= (soc_a7ddrphy_bitslip5_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[0]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip6_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip6_value <= (soc_a7ddrphy_bitslip6_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[0]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip7_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip7_value <= (soc_a7ddrphy_bitslip7_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[1]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip8_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip8_value <= (soc_a7ddrphy_bitslip8_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[1]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip9_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip9_value <= (soc_a7ddrphy_bitslip9_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[1]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip10_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip10_value <= (soc_a7ddrphy_bitslip10_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[1]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip11_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip11_value <= (soc_a7ddrphy_bitslip11_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[1]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip12_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip12_value <= (soc_a7ddrphy_bitslip12_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[1]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip13_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip13_value <= (soc_a7ddrphy_bitslip13_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[1]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip14_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip14_value <= (soc_a7ddrphy_bitslip14_value + 1'd1); + end + end + end + if (soc_a7ddrphy_dly_sel_storage[1]) begin + if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin + soc_a7ddrphy_bitslip15_value <= 1'd0; + end else begin + if (soc_a7ddrphy_rdly_dq_bitslip_re) begin + soc_a7ddrphy_bitslip15_value <= (soc_a7ddrphy_bitslip15_value + 1'd1); + end + end + end + soc_a7ddrphy_n_rddata_en0 <= soc_a7ddrphy_dfi_p2_rddata_en; + soc_a7ddrphy_n_rddata_en1 <= soc_a7ddrphy_n_rddata_en0; + soc_a7ddrphy_n_rddata_en2 <= soc_a7ddrphy_n_rddata_en1; + soc_a7ddrphy_n_rddata_en3 <= soc_a7ddrphy_n_rddata_en2; + soc_a7ddrphy_n_rddata_en4 <= soc_a7ddrphy_n_rddata_en3; + soc_a7ddrphy_n_rddata_en5 <= soc_a7ddrphy_n_rddata_en4; + soc_a7ddrphy_n_rddata_en6 <= soc_a7ddrphy_n_rddata_en5; + soc_a7ddrphy_n_rddata_en7 <= soc_a7ddrphy_n_rddata_en6; + soc_a7ddrphy_dfi_p0_rddata_valid <= soc_a7ddrphy_n_rddata_en7; + soc_a7ddrphy_dfi_p1_rddata_valid <= soc_a7ddrphy_n_rddata_en7; + soc_a7ddrphy_dfi_p2_rddata_valid <= soc_a7ddrphy_n_rddata_en7; + soc_a7ddrphy_dfi_p3_rddata_valid <= soc_a7ddrphy_n_rddata_en7; + soc_a7ddrphy_last_wrdata_en <= {soc_a7ddrphy_last_wrdata_en[2:0], soc_a7ddrphy_dfi_p3_wrdata_en}; + soc_a7ddrphy_oe_dqs <= soc_a7ddrphy_oe; + soc_a7ddrphy_oe_dq <= soc_a7ddrphy_oe; + soc_a7ddrphy_bitslip0_r <= {soc_a7ddrphy_bitslip0_i, soc_a7ddrphy_bitslip0_r[15:8]}; + case (soc_a7ddrphy_bitslip0_value) + 1'd0: begin + soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip1_r <= {soc_a7ddrphy_bitslip1_i, soc_a7ddrphy_bitslip1_r[15:8]}; + case (soc_a7ddrphy_bitslip1_value) + 1'd0: begin + soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip2_r <= {soc_a7ddrphy_bitslip2_i, soc_a7ddrphy_bitslip2_r[15:8]}; + case (soc_a7ddrphy_bitslip2_value) + 1'd0: begin + soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip3_r <= {soc_a7ddrphy_bitslip3_i, soc_a7ddrphy_bitslip3_r[15:8]}; + case (soc_a7ddrphy_bitslip3_value) + 1'd0: begin + soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip4_r <= {soc_a7ddrphy_bitslip4_i, soc_a7ddrphy_bitslip4_r[15:8]}; + case (soc_a7ddrphy_bitslip4_value) + 1'd0: begin + soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip5_r <= {soc_a7ddrphy_bitslip5_i, soc_a7ddrphy_bitslip5_r[15:8]}; + case (soc_a7ddrphy_bitslip5_value) + 1'd0: begin + soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip6_r <= {soc_a7ddrphy_bitslip6_i, soc_a7ddrphy_bitslip6_r[15:8]}; + case (soc_a7ddrphy_bitslip6_value) + 1'd0: begin + soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip7_r <= {soc_a7ddrphy_bitslip7_i, soc_a7ddrphy_bitslip7_r[15:8]}; + case (soc_a7ddrphy_bitslip7_value) + 1'd0: begin + soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip8_r <= {soc_a7ddrphy_bitslip8_i, soc_a7ddrphy_bitslip8_r[15:8]}; + case (soc_a7ddrphy_bitslip8_value) + 1'd0: begin + soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip9_r <= {soc_a7ddrphy_bitslip9_i, soc_a7ddrphy_bitslip9_r[15:8]}; + case (soc_a7ddrphy_bitslip9_value) + 1'd0: begin + soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip10_r <= {soc_a7ddrphy_bitslip10_i, soc_a7ddrphy_bitslip10_r[15:8]}; + case (soc_a7ddrphy_bitslip10_value) + 1'd0: begin + soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip11_r <= {soc_a7ddrphy_bitslip11_i, soc_a7ddrphy_bitslip11_r[15:8]}; + case (soc_a7ddrphy_bitslip11_value) + 1'd0: begin + soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip12_r <= {soc_a7ddrphy_bitslip12_i, soc_a7ddrphy_bitslip12_r[15:8]}; + case (soc_a7ddrphy_bitslip12_value) + 1'd0: begin + soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip13_r <= {soc_a7ddrphy_bitslip13_i, soc_a7ddrphy_bitslip13_r[15:8]}; + case (soc_a7ddrphy_bitslip13_value) + 1'd0: begin + soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip14_r <= {soc_a7ddrphy_bitslip14_i, soc_a7ddrphy_bitslip14_r[15:8]}; + case (soc_a7ddrphy_bitslip14_value) + 1'd0: begin + soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[14:7]; + end + endcase + soc_a7ddrphy_bitslip15_r <= {soc_a7ddrphy_bitslip15_i, soc_a7ddrphy_bitslip15_r[15:8]}; + case (soc_a7ddrphy_bitslip15_value) + 1'd0: begin + soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[7:0]; + end + 1'd1: begin + soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[8:1]; + end + 2'd2: begin + soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[9:2]; + end + 2'd3: begin + soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[10:3]; + end + 3'd4: begin + soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[11:4]; + end + 3'd5: begin + soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[12:5]; + end + 3'd6: begin + soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[13:6]; + end + 3'd7: begin + soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[14:7]; + end + endcase + if (soc_netsoc_sdram_inti_p0_rddata_valid) begin + soc_netsoc_sdram_phaseinjector0_status <= soc_netsoc_sdram_inti_p0_rddata; + end + if (soc_netsoc_sdram_inti_p1_rddata_valid) begin + soc_netsoc_sdram_phaseinjector1_status <= soc_netsoc_sdram_inti_p1_rddata; + end + if (soc_netsoc_sdram_inti_p2_rddata_valid) begin + soc_netsoc_sdram_phaseinjector2_status <= soc_netsoc_sdram_inti_p2_rddata; + end + if (soc_netsoc_sdram_inti_p3_rddata_valid) begin + soc_netsoc_sdram_phaseinjector3_status <= soc_netsoc_sdram_inti_p3_rddata; + end + if ((soc_netsoc_sdram_timer_wait & (~soc_netsoc_sdram_timer_done0))) begin + soc_netsoc_sdram_timer_count1 <= (soc_netsoc_sdram_timer_count1 - 1'd1); + end else begin + soc_netsoc_sdram_timer_count1 <= 9'd468; + end + soc_netsoc_sdram_postponer_req_o <= 1'd0; + if (soc_netsoc_sdram_postponer_req_i) begin + soc_netsoc_sdram_postponer_count <= (soc_netsoc_sdram_postponer_count - 1'd1); + if ((soc_netsoc_sdram_postponer_count == 1'd0)) begin + soc_netsoc_sdram_postponer_count <= 1'd0; + soc_netsoc_sdram_postponer_req_o <= 1'd1; + end + end + if (soc_netsoc_sdram_sequencer_start0) begin + soc_netsoc_sdram_sequencer_count <= 1'd0; + end else begin + if (soc_netsoc_sdram_sequencer_done1) begin + if ((soc_netsoc_sdram_sequencer_count != 1'd0)) begin + soc_netsoc_sdram_sequencer_count <= (soc_netsoc_sdram_sequencer_count - 1'd1); + end + end + end + soc_netsoc_sdram_cmd_payload_a <= 1'd0; + soc_netsoc_sdram_cmd_payload_ba <= 1'd0; + soc_netsoc_sdram_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_sequencer_done1 <= 1'd0; + if ((soc_netsoc_sdram_sequencer_start1 & (soc_netsoc_sdram_sequencer_counter == 1'd0))) begin + soc_netsoc_sdram_cmd_payload_a <= 11'd1024; + soc_netsoc_sdram_cmd_payload_ba <= 1'd0; + soc_netsoc_sdram_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_cmd_payload_we <= 1'd1; + end + if ((soc_netsoc_sdram_sequencer_counter == 2'd2)) begin + soc_netsoc_sdram_cmd_payload_a <= 1'd0; + soc_netsoc_sdram_cmd_payload_ba <= 1'd0; + soc_netsoc_sdram_cmd_payload_cas <= 1'd1; + soc_netsoc_sdram_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_cmd_payload_we <= 1'd0; + end + if ((soc_netsoc_sdram_sequencer_counter == 6'd34)) begin + soc_netsoc_sdram_cmd_payload_a <= 1'd0; + soc_netsoc_sdram_cmd_payload_ba <= 1'd0; + soc_netsoc_sdram_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_sequencer_done1 <= 1'd1; + end + if ((soc_netsoc_sdram_sequencer_counter == 6'd34)) begin + soc_netsoc_sdram_sequencer_counter <= 1'd0; + end else begin + if ((soc_netsoc_sdram_sequencer_counter != 1'd0)) begin + soc_netsoc_sdram_sequencer_counter <= (soc_netsoc_sdram_sequencer_counter + 1'd1); + end else begin + if (soc_netsoc_sdram_sequencer_start1) begin + soc_netsoc_sdram_sequencer_counter <= 1'd1; + end + end + end + if ((soc_netsoc_sdram_zqcs_timer_wait & (~soc_netsoc_sdram_zqcs_timer_done0))) begin + soc_netsoc_sdram_zqcs_timer_count1 <= (soc_netsoc_sdram_zqcs_timer_count1 - 1'd1); + end else begin + soc_netsoc_sdram_zqcs_timer_count1 <= 26'd59999999; + end + soc_netsoc_sdram_zqcs_executer_done <= 1'd0; + if ((soc_netsoc_sdram_zqcs_executer_start & (soc_netsoc_sdram_zqcs_executer_counter == 1'd0))) begin + soc_netsoc_sdram_cmd_payload_a <= 11'd1024; + soc_netsoc_sdram_cmd_payload_ba <= 1'd0; + soc_netsoc_sdram_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_cmd_payload_ras <= 1'd1; + soc_netsoc_sdram_cmd_payload_we <= 1'd1; + end + if ((soc_netsoc_sdram_zqcs_executer_counter == 2'd2)) begin + soc_netsoc_sdram_cmd_payload_a <= 1'd0; + soc_netsoc_sdram_cmd_payload_ba <= 1'd0; + soc_netsoc_sdram_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_cmd_payload_we <= 1'd1; + end + if ((soc_netsoc_sdram_zqcs_executer_counter == 5'd18)) begin + soc_netsoc_sdram_cmd_payload_a <= 1'd0; + soc_netsoc_sdram_cmd_payload_ba <= 1'd0; + soc_netsoc_sdram_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_zqcs_executer_done <= 1'd1; + end + if ((soc_netsoc_sdram_zqcs_executer_counter == 5'd18)) begin + soc_netsoc_sdram_zqcs_executer_counter <= 1'd0; + end else begin + if ((soc_netsoc_sdram_zqcs_executer_counter != 1'd0)) begin + soc_netsoc_sdram_zqcs_executer_counter <= (soc_netsoc_sdram_zqcs_executer_counter + 1'd1); + end else begin + if (soc_netsoc_sdram_zqcs_executer_start) begin + soc_netsoc_sdram_zqcs_executer_counter <= 1'd1; + end + end + end + vns_refresher_state <= vns_refresher_next_state; + if (soc_netsoc_sdram_bankmachine0_row_close) begin + soc_netsoc_sdram_bankmachine0_row_opened <= 1'd0; + end else begin + if (soc_netsoc_sdram_bankmachine0_row_open) begin + soc_netsoc_sdram_bankmachine0_row_opened <= 1'd1; + soc_netsoc_sdram_bankmachine0_row <= soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce + 1'd1); + end + if (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume + 1'd1); + end + if (((soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin + if ((~soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read)) begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level - 1'd1); + end + end + if (soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid; + end + if (soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_first); + soc_netsoc_sdram_bankmachine0_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_last); + end + if (soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_we; + soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_addr; + end + if (soc_netsoc_sdram_bankmachine0_twtpcon_valid) begin + soc_netsoc_sdram_bankmachine0_twtpcon_count <= 3'd4; + if (1'd0) begin + soc_netsoc_sdram_bankmachine0_twtpcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine0_twtpcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine0_twtpcon_ready)) begin + soc_netsoc_sdram_bankmachine0_twtpcon_count <= (soc_netsoc_sdram_bankmachine0_twtpcon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine0_twtpcon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine0_twtpcon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine0_trccon_valid) begin + soc_netsoc_sdram_bankmachine0_trccon_count <= 2'd3; + if (1'd0) begin + soc_netsoc_sdram_bankmachine0_trccon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine0_trccon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine0_trccon_ready)) begin + soc_netsoc_sdram_bankmachine0_trccon_count <= (soc_netsoc_sdram_bankmachine0_trccon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine0_trccon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine0_trccon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine0_trascon_valid) begin + soc_netsoc_sdram_bankmachine0_trascon_count <= 2'd2; + if (1'd0) begin + soc_netsoc_sdram_bankmachine0_trascon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine0_trascon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine0_trascon_ready)) begin + soc_netsoc_sdram_bankmachine0_trascon_count <= (soc_netsoc_sdram_bankmachine0_trascon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine0_trascon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine0_trascon_ready <= 1'd1; + end + end + end + vns_bankmachine0_state <= vns_bankmachine0_next_state; + if (soc_netsoc_sdram_bankmachine1_row_close) begin + soc_netsoc_sdram_bankmachine1_row_opened <= 1'd0; + end else begin + if (soc_netsoc_sdram_bankmachine1_row_open) begin + soc_netsoc_sdram_bankmachine1_row_opened <= 1'd1; + soc_netsoc_sdram_bankmachine1_row <= soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce + 1'd1); + end + if (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume + 1'd1); + end + if (((soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin + if ((~soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read)) begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level - 1'd1); + end + end + if (soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid; + end + if (soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_first); + soc_netsoc_sdram_bankmachine1_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_last); + end + if (soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_we; + soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_addr; + end + if (soc_netsoc_sdram_bankmachine1_twtpcon_valid) begin + soc_netsoc_sdram_bankmachine1_twtpcon_count <= 3'd4; + if (1'd0) begin + soc_netsoc_sdram_bankmachine1_twtpcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine1_twtpcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine1_twtpcon_ready)) begin + soc_netsoc_sdram_bankmachine1_twtpcon_count <= (soc_netsoc_sdram_bankmachine1_twtpcon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine1_twtpcon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine1_twtpcon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine1_trccon_valid) begin + soc_netsoc_sdram_bankmachine1_trccon_count <= 2'd3; + if (1'd0) begin + soc_netsoc_sdram_bankmachine1_trccon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine1_trccon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine1_trccon_ready)) begin + soc_netsoc_sdram_bankmachine1_trccon_count <= (soc_netsoc_sdram_bankmachine1_trccon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine1_trccon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine1_trccon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine1_trascon_valid) begin + soc_netsoc_sdram_bankmachine1_trascon_count <= 2'd2; + if (1'd0) begin + soc_netsoc_sdram_bankmachine1_trascon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine1_trascon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine1_trascon_ready)) begin + soc_netsoc_sdram_bankmachine1_trascon_count <= (soc_netsoc_sdram_bankmachine1_trascon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine1_trascon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine1_trascon_ready <= 1'd1; + end + end + end + vns_bankmachine1_state <= vns_bankmachine1_next_state; + if (soc_netsoc_sdram_bankmachine2_row_close) begin + soc_netsoc_sdram_bankmachine2_row_opened <= 1'd0; + end else begin + if (soc_netsoc_sdram_bankmachine2_row_open) begin + soc_netsoc_sdram_bankmachine2_row_opened <= 1'd1; + soc_netsoc_sdram_bankmachine2_row <= soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce + 1'd1); + end + if (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume + 1'd1); + end + if (((soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin + if ((~soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read)) begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level - 1'd1); + end + end + if (soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid; + end + if (soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_first); + soc_netsoc_sdram_bankmachine2_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_last); + end + if (soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_we; + soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_addr; + end + if (soc_netsoc_sdram_bankmachine2_twtpcon_valid) begin + soc_netsoc_sdram_bankmachine2_twtpcon_count <= 3'd4; + if (1'd0) begin + soc_netsoc_sdram_bankmachine2_twtpcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine2_twtpcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine2_twtpcon_ready)) begin + soc_netsoc_sdram_bankmachine2_twtpcon_count <= (soc_netsoc_sdram_bankmachine2_twtpcon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine2_twtpcon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine2_twtpcon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine2_trccon_valid) begin + soc_netsoc_sdram_bankmachine2_trccon_count <= 2'd3; + if (1'd0) begin + soc_netsoc_sdram_bankmachine2_trccon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine2_trccon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine2_trccon_ready)) begin + soc_netsoc_sdram_bankmachine2_trccon_count <= (soc_netsoc_sdram_bankmachine2_trccon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine2_trccon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine2_trccon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine2_trascon_valid) begin + soc_netsoc_sdram_bankmachine2_trascon_count <= 2'd2; + if (1'd0) begin + soc_netsoc_sdram_bankmachine2_trascon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine2_trascon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine2_trascon_ready)) begin + soc_netsoc_sdram_bankmachine2_trascon_count <= (soc_netsoc_sdram_bankmachine2_trascon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine2_trascon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine2_trascon_ready <= 1'd1; + end + end + end + vns_bankmachine2_state <= vns_bankmachine2_next_state; + if (soc_netsoc_sdram_bankmachine3_row_close) begin + soc_netsoc_sdram_bankmachine3_row_opened <= 1'd0; + end else begin + if (soc_netsoc_sdram_bankmachine3_row_open) begin + soc_netsoc_sdram_bankmachine3_row_opened <= 1'd1; + soc_netsoc_sdram_bankmachine3_row <= soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce + 1'd1); + end + if (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume + 1'd1); + end + if (((soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin + if ((~soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read)) begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level - 1'd1); + end + end + if (soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid; + end + if (soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_first); + soc_netsoc_sdram_bankmachine3_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_last); + end + if (soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_we; + soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_addr; + end + if (soc_netsoc_sdram_bankmachine3_twtpcon_valid) begin + soc_netsoc_sdram_bankmachine3_twtpcon_count <= 3'd4; + if (1'd0) begin + soc_netsoc_sdram_bankmachine3_twtpcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine3_twtpcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine3_twtpcon_ready)) begin + soc_netsoc_sdram_bankmachine3_twtpcon_count <= (soc_netsoc_sdram_bankmachine3_twtpcon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine3_twtpcon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine3_twtpcon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine3_trccon_valid) begin + soc_netsoc_sdram_bankmachine3_trccon_count <= 2'd3; + if (1'd0) begin + soc_netsoc_sdram_bankmachine3_trccon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine3_trccon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine3_trccon_ready)) begin + soc_netsoc_sdram_bankmachine3_trccon_count <= (soc_netsoc_sdram_bankmachine3_trccon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine3_trccon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine3_trccon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine3_trascon_valid) begin + soc_netsoc_sdram_bankmachine3_trascon_count <= 2'd2; + if (1'd0) begin + soc_netsoc_sdram_bankmachine3_trascon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine3_trascon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine3_trascon_ready)) begin + soc_netsoc_sdram_bankmachine3_trascon_count <= (soc_netsoc_sdram_bankmachine3_trascon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine3_trascon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine3_trascon_ready <= 1'd1; + end + end + end + vns_bankmachine3_state <= vns_bankmachine3_next_state; + if (soc_netsoc_sdram_bankmachine4_row_close) begin + soc_netsoc_sdram_bankmachine4_row_opened <= 1'd0; + end else begin + if (soc_netsoc_sdram_bankmachine4_row_open) begin + soc_netsoc_sdram_bankmachine4_row_opened <= 1'd1; + soc_netsoc_sdram_bankmachine4_row <= soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce + 1'd1); + end + if (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume + 1'd1); + end + if (((soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin + if ((~soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read)) begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level - 1'd1); + end + end + if (soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid; + end + if (soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_first); + soc_netsoc_sdram_bankmachine4_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_last); + end + if (soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_we; + soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_addr; + end + if (soc_netsoc_sdram_bankmachine4_twtpcon_valid) begin + soc_netsoc_sdram_bankmachine4_twtpcon_count <= 3'd4; + if (1'd0) begin + soc_netsoc_sdram_bankmachine4_twtpcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine4_twtpcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine4_twtpcon_ready)) begin + soc_netsoc_sdram_bankmachine4_twtpcon_count <= (soc_netsoc_sdram_bankmachine4_twtpcon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine4_twtpcon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine4_twtpcon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine4_trccon_valid) begin + soc_netsoc_sdram_bankmachine4_trccon_count <= 2'd3; + if (1'd0) begin + soc_netsoc_sdram_bankmachine4_trccon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine4_trccon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine4_trccon_ready)) begin + soc_netsoc_sdram_bankmachine4_trccon_count <= (soc_netsoc_sdram_bankmachine4_trccon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine4_trccon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine4_trccon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine4_trascon_valid) begin + soc_netsoc_sdram_bankmachine4_trascon_count <= 2'd2; + if (1'd0) begin + soc_netsoc_sdram_bankmachine4_trascon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine4_trascon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine4_trascon_ready)) begin + soc_netsoc_sdram_bankmachine4_trascon_count <= (soc_netsoc_sdram_bankmachine4_trascon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine4_trascon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine4_trascon_ready <= 1'd1; + end + end + end + vns_bankmachine4_state <= vns_bankmachine4_next_state; + if (soc_netsoc_sdram_bankmachine5_row_close) begin + soc_netsoc_sdram_bankmachine5_row_opened <= 1'd0; + end else begin + if (soc_netsoc_sdram_bankmachine5_row_open) begin + soc_netsoc_sdram_bankmachine5_row_opened <= 1'd1; + soc_netsoc_sdram_bankmachine5_row <= soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce + 1'd1); + end + if (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume + 1'd1); + end + if (((soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin + if ((~soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read)) begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level - 1'd1); + end + end + if (soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid; + end + if (soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_first); + soc_netsoc_sdram_bankmachine5_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_last); + end + if (soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_we; + soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_addr; + end + if (soc_netsoc_sdram_bankmachine5_twtpcon_valid) begin + soc_netsoc_sdram_bankmachine5_twtpcon_count <= 3'd4; + if (1'd0) begin + soc_netsoc_sdram_bankmachine5_twtpcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine5_twtpcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine5_twtpcon_ready)) begin + soc_netsoc_sdram_bankmachine5_twtpcon_count <= (soc_netsoc_sdram_bankmachine5_twtpcon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine5_twtpcon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine5_twtpcon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine5_trccon_valid) begin + soc_netsoc_sdram_bankmachine5_trccon_count <= 2'd3; + if (1'd0) begin + soc_netsoc_sdram_bankmachine5_trccon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine5_trccon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine5_trccon_ready)) begin + soc_netsoc_sdram_bankmachine5_trccon_count <= (soc_netsoc_sdram_bankmachine5_trccon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine5_trccon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine5_trccon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine5_trascon_valid) begin + soc_netsoc_sdram_bankmachine5_trascon_count <= 2'd2; + if (1'd0) begin + soc_netsoc_sdram_bankmachine5_trascon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine5_trascon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine5_trascon_ready)) begin + soc_netsoc_sdram_bankmachine5_trascon_count <= (soc_netsoc_sdram_bankmachine5_trascon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine5_trascon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine5_trascon_ready <= 1'd1; + end + end + end + vns_bankmachine5_state <= vns_bankmachine5_next_state; + if (soc_netsoc_sdram_bankmachine6_row_close) begin + soc_netsoc_sdram_bankmachine6_row_opened <= 1'd0; + end else begin + if (soc_netsoc_sdram_bankmachine6_row_open) begin + soc_netsoc_sdram_bankmachine6_row_opened <= 1'd1; + soc_netsoc_sdram_bankmachine6_row <= soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce + 1'd1); + end + if (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume + 1'd1); + end + if (((soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin + if ((~soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read)) begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level - 1'd1); + end + end + if (soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid; + end + if (soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_first); + soc_netsoc_sdram_bankmachine6_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_last); + end + if (soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_we; + soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_addr; + end + if (soc_netsoc_sdram_bankmachine6_twtpcon_valid) begin + soc_netsoc_sdram_bankmachine6_twtpcon_count <= 3'd4; + if (1'd0) begin + soc_netsoc_sdram_bankmachine6_twtpcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine6_twtpcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine6_twtpcon_ready)) begin + soc_netsoc_sdram_bankmachine6_twtpcon_count <= (soc_netsoc_sdram_bankmachine6_twtpcon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine6_twtpcon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine6_twtpcon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine6_trccon_valid) begin + soc_netsoc_sdram_bankmachine6_trccon_count <= 2'd3; + if (1'd0) begin + soc_netsoc_sdram_bankmachine6_trccon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine6_trccon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine6_trccon_ready)) begin + soc_netsoc_sdram_bankmachine6_trccon_count <= (soc_netsoc_sdram_bankmachine6_trccon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine6_trccon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine6_trccon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine6_trascon_valid) begin + soc_netsoc_sdram_bankmachine6_trascon_count <= 2'd2; + if (1'd0) begin + soc_netsoc_sdram_bankmachine6_trascon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine6_trascon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine6_trascon_ready)) begin + soc_netsoc_sdram_bankmachine6_trascon_count <= (soc_netsoc_sdram_bankmachine6_trascon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine6_trascon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine6_trascon_ready <= 1'd1; + end + end + end + vns_bankmachine6_state <= vns_bankmachine6_next_state; + if (soc_netsoc_sdram_bankmachine7_row_close) begin + soc_netsoc_sdram_bankmachine7_row_opened <= 1'd0; + end else begin + if (soc_netsoc_sdram_bankmachine7_row_open) begin + soc_netsoc_sdram_bankmachine7_row_opened <= 1'd1; + soc_netsoc_sdram_bankmachine7_row <= soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce + 1'd1); + end + if (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume + 1'd1); + end + if (((soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin + if ((~soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read)) begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level - 1'd1); + end + end + if (soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid; + end + if (soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_first); + soc_netsoc_sdram_bankmachine7_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_last); + end + if (soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce) begin + soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_we; + soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_addr; + end + if (soc_netsoc_sdram_bankmachine7_twtpcon_valid) begin + soc_netsoc_sdram_bankmachine7_twtpcon_count <= 3'd4; + if (1'd0) begin + soc_netsoc_sdram_bankmachine7_twtpcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine7_twtpcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine7_twtpcon_ready)) begin + soc_netsoc_sdram_bankmachine7_twtpcon_count <= (soc_netsoc_sdram_bankmachine7_twtpcon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine7_twtpcon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine7_twtpcon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine7_trccon_valid) begin + soc_netsoc_sdram_bankmachine7_trccon_count <= 2'd3; + if (1'd0) begin + soc_netsoc_sdram_bankmachine7_trccon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine7_trccon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine7_trccon_ready)) begin + soc_netsoc_sdram_bankmachine7_trccon_count <= (soc_netsoc_sdram_bankmachine7_trccon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine7_trccon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine7_trccon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_bankmachine7_trascon_valid) begin + soc_netsoc_sdram_bankmachine7_trascon_count <= 2'd2; + if (1'd0) begin + soc_netsoc_sdram_bankmachine7_trascon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_bankmachine7_trascon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_bankmachine7_trascon_ready)) begin + soc_netsoc_sdram_bankmachine7_trascon_count <= (soc_netsoc_sdram_bankmachine7_trascon_count - 1'd1); + if ((soc_netsoc_sdram_bankmachine7_trascon_count == 1'd1)) begin + soc_netsoc_sdram_bankmachine7_trascon_ready <= 1'd1; + end + end + end + vns_bankmachine7_state <= vns_bankmachine7_next_state; + if ((~soc_netsoc_sdram_en0)) begin + soc_netsoc_sdram_time0 <= 5'd31; + end else begin + if ((~soc_netsoc_sdram_max_time0)) begin + soc_netsoc_sdram_time0 <= (soc_netsoc_sdram_time0 - 1'd1); + end + end + if ((~soc_netsoc_sdram_en1)) begin + soc_netsoc_sdram_time1 <= 4'd15; + end else begin + if ((~soc_netsoc_sdram_max_time1)) begin + soc_netsoc_sdram_time1 <= (soc_netsoc_sdram_time1 - 1'd1); + end + end + if (soc_netsoc_sdram_choose_cmd_ce) begin + case (soc_netsoc_sdram_choose_cmd_grant) + 1'd0: begin + if (soc_netsoc_sdram_choose_cmd_request[1]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[2]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[3]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[4]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[5]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[6]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[7]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd7; + end + end + end + end + end + end + end + end + 1'd1: begin + if (soc_netsoc_sdram_choose_cmd_request[2]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[3]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[4]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[5]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[6]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[7]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[0]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd0; + end + end + end + end + end + end + end + end + 2'd2: begin + if (soc_netsoc_sdram_choose_cmd_request[3]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[4]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[5]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[6]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[7]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[0]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[1]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd1; + end + end + end + end + end + end + end + end + 2'd3: begin + if (soc_netsoc_sdram_choose_cmd_request[4]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[5]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[6]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[7]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[0]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[1]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[2]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd2; + end + end + end + end + end + end + end + end + 3'd4: begin + if (soc_netsoc_sdram_choose_cmd_request[5]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[6]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[7]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[0]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[1]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[2]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[3]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd3; + end + end + end + end + end + end + end + end + 3'd5: begin + if (soc_netsoc_sdram_choose_cmd_request[6]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[7]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[0]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[1]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[2]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[3]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[4]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd4; + end + end + end + end + end + end + end + end + 3'd6: begin + if (soc_netsoc_sdram_choose_cmd_request[7]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[0]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[1]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[2]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[3]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[4]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[5]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd5; + end + end + end + end + end + end + end + end + 3'd7: begin + if (soc_netsoc_sdram_choose_cmd_request[0]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[1]) begin + soc_netsoc_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[2]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[3]) begin + soc_netsoc_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[4]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[5]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_cmd_request[6]) begin + soc_netsoc_sdram_choose_cmd_grant <= 3'd6; + end + end + end + end + end + end + end + end + endcase + end + if (soc_netsoc_sdram_choose_req_ce) begin + case (soc_netsoc_sdram_choose_req_grant) + 1'd0: begin + if (soc_netsoc_sdram_choose_req_request[1]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_req_request[2]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_req_request[3]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_req_request[4]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_req_request[5]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_req_request[6]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_req_request[7]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd7; + end + end + end + end + end + end + end + end + 1'd1: begin + if (soc_netsoc_sdram_choose_req_request[2]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_req_request[3]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_req_request[4]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_req_request[5]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_req_request[6]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_req_request[7]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_req_request[0]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd0; + end + end + end + end + end + end + end + end + 2'd2: begin + if (soc_netsoc_sdram_choose_req_request[3]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_req_request[4]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_req_request[5]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_req_request[6]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_req_request[7]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_req_request[0]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_req_request[1]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd1; + end + end + end + end + end + end + end + end + 2'd3: begin + if (soc_netsoc_sdram_choose_req_request[4]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_req_request[5]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_req_request[6]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_req_request[7]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_req_request[0]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_req_request[1]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_req_request[2]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd2; + end + end + end + end + end + end + end + end + 3'd4: begin + if (soc_netsoc_sdram_choose_req_request[5]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_req_request[6]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_req_request[7]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_req_request[0]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_req_request[1]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_req_request[2]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_req_request[3]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd3; + end + end + end + end + end + end + end + end + 3'd5: begin + if (soc_netsoc_sdram_choose_req_request[6]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd6; + end else begin + if (soc_netsoc_sdram_choose_req_request[7]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_req_request[0]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_req_request[1]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_req_request[2]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_req_request[3]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_req_request[4]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd4; + end + end + end + end + end + end + end + end + 3'd6: begin + if (soc_netsoc_sdram_choose_req_request[7]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd7; + end else begin + if (soc_netsoc_sdram_choose_req_request[0]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_req_request[1]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_req_request[2]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_req_request[3]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_req_request[4]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_req_request[5]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd5; + end + end + end + end + end + end + end + end + 3'd7: begin + if (soc_netsoc_sdram_choose_req_request[0]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd0; + end else begin + if (soc_netsoc_sdram_choose_req_request[1]) begin + soc_netsoc_sdram_choose_req_grant <= 1'd1; + end else begin + if (soc_netsoc_sdram_choose_req_request[2]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd2; + end else begin + if (soc_netsoc_sdram_choose_req_request[3]) begin + soc_netsoc_sdram_choose_req_grant <= 2'd3; + end else begin + if (soc_netsoc_sdram_choose_req_request[4]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd4; + end else begin + if (soc_netsoc_sdram_choose_req_request[5]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd5; + end else begin + if (soc_netsoc_sdram_choose_req_request[6]) begin + soc_netsoc_sdram_choose_req_grant <= 3'd6; + end + end + end + end + end + end + end + end + endcase + end + soc_netsoc_sdram_dfi_p0_cs_n <= 1'd0; + soc_netsoc_sdram_dfi_p0_bank <= vns_array_muxed0; + soc_netsoc_sdram_dfi_p0_address <= vns_array_muxed1; + soc_netsoc_sdram_dfi_p0_cas_n <= (~vns_array_muxed2); + soc_netsoc_sdram_dfi_p0_ras_n <= (~vns_array_muxed3); + soc_netsoc_sdram_dfi_p0_we_n <= (~vns_array_muxed4); + soc_netsoc_sdram_dfi_p0_rddata_en <= vns_array_muxed5; + soc_netsoc_sdram_dfi_p0_wrdata_en <= vns_array_muxed6; + soc_netsoc_sdram_dfi_p1_cs_n <= 1'd0; + soc_netsoc_sdram_dfi_p1_bank <= vns_array_muxed7; + soc_netsoc_sdram_dfi_p1_address <= vns_array_muxed8; + soc_netsoc_sdram_dfi_p1_cas_n <= (~vns_array_muxed9); + soc_netsoc_sdram_dfi_p1_ras_n <= (~vns_array_muxed10); + soc_netsoc_sdram_dfi_p1_we_n <= (~vns_array_muxed11); + soc_netsoc_sdram_dfi_p1_rddata_en <= vns_array_muxed12; + soc_netsoc_sdram_dfi_p1_wrdata_en <= vns_array_muxed13; + soc_netsoc_sdram_dfi_p2_cs_n <= 1'd0; + soc_netsoc_sdram_dfi_p2_bank <= vns_array_muxed14; + soc_netsoc_sdram_dfi_p2_address <= vns_array_muxed15; + soc_netsoc_sdram_dfi_p2_cas_n <= (~vns_array_muxed16); + soc_netsoc_sdram_dfi_p2_ras_n <= (~vns_array_muxed17); + soc_netsoc_sdram_dfi_p2_we_n <= (~vns_array_muxed18); + soc_netsoc_sdram_dfi_p2_rddata_en <= vns_array_muxed19; + soc_netsoc_sdram_dfi_p2_wrdata_en <= vns_array_muxed20; + soc_netsoc_sdram_dfi_p3_cs_n <= 1'd0; + soc_netsoc_sdram_dfi_p3_bank <= vns_array_muxed21; + soc_netsoc_sdram_dfi_p3_address <= vns_array_muxed22; + soc_netsoc_sdram_dfi_p3_cas_n <= (~vns_array_muxed23); + soc_netsoc_sdram_dfi_p3_ras_n <= (~vns_array_muxed24); + soc_netsoc_sdram_dfi_p3_we_n <= (~vns_array_muxed25); + soc_netsoc_sdram_dfi_p3_rddata_en <= vns_array_muxed26; + soc_netsoc_sdram_dfi_p3_wrdata_en <= vns_array_muxed27; + if (soc_netsoc_sdram_trrdcon_valid) begin + soc_netsoc_sdram_trrdcon_count <= 1'd1; + if (1'd0) begin + soc_netsoc_sdram_trrdcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_trrdcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_trrdcon_ready)) begin + soc_netsoc_sdram_trrdcon_count <= (soc_netsoc_sdram_trrdcon_count - 1'd1); + if ((soc_netsoc_sdram_trrdcon_count == 1'd1)) begin + soc_netsoc_sdram_trrdcon_ready <= 1'd1; + end + end + end + soc_netsoc_sdram_tfawcon_window <= {soc_netsoc_sdram_tfawcon_window, soc_netsoc_sdram_tfawcon_valid}; + if ((soc_netsoc_sdram_tfawcon_count < 3'd4)) begin + if ((soc_netsoc_sdram_tfawcon_count == 2'd3)) begin + soc_netsoc_sdram_tfawcon_ready <= (~soc_netsoc_sdram_tfawcon_valid); + end else begin + soc_netsoc_sdram_tfawcon_ready <= 1'd1; + end + end + if (soc_netsoc_sdram_tccdcon_valid) begin + soc_netsoc_sdram_tccdcon_count <= 1'd0; + if (1'd1) begin + soc_netsoc_sdram_tccdcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_tccdcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_tccdcon_ready)) begin + soc_netsoc_sdram_tccdcon_count <= (soc_netsoc_sdram_tccdcon_count - 1'd1); + if ((soc_netsoc_sdram_tccdcon_count == 1'd1)) begin + soc_netsoc_sdram_tccdcon_ready <= 1'd1; + end + end + end + if (soc_netsoc_sdram_twtrcon_valid) begin + soc_netsoc_sdram_twtrcon_count <= 3'd4; + if (1'd0) begin + soc_netsoc_sdram_twtrcon_ready <= 1'd1; + end else begin + soc_netsoc_sdram_twtrcon_ready <= 1'd0; + end + end else begin + if ((~soc_netsoc_sdram_twtrcon_ready)) begin + soc_netsoc_sdram_twtrcon_count <= (soc_netsoc_sdram_twtrcon_count - 1'd1); + if ((soc_netsoc_sdram_twtrcon_count == 1'd1)) begin + soc_netsoc_sdram_twtrcon_ready <= 1'd1; + end + end + end + vns_multiplexer_state <= vns_multiplexer_next_state; + soc_netsoc_sdram_bandwidth_cmd_valid <= soc_netsoc_sdram_choose_req_cmd_valid; + soc_netsoc_sdram_bandwidth_cmd_ready <= soc_netsoc_sdram_choose_req_cmd_ready; + soc_netsoc_sdram_bandwidth_cmd_is_read <= soc_netsoc_sdram_choose_req_cmd_payload_is_read; + soc_netsoc_sdram_bandwidth_cmd_is_write <= soc_netsoc_sdram_choose_req_cmd_payload_is_write; + {soc_netsoc_sdram_bandwidth_period, soc_netsoc_sdram_bandwidth_counter} <= (soc_netsoc_sdram_bandwidth_counter + 1'd1); + if (soc_netsoc_sdram_bandwidth_period) begin + soc_netsoc_sdram_bandwidth_nreads_r <= soc_netsoc_sdram_bandwidth_nreads; + soc_netsoc_sdram_bandwidth_nwrites_r <= soc_netsoc_sdram_bandwidth_nwrites; + soc_netsoc_sdram_bandwidth_nreads <= 1'd0; + soc_netsoc_sdram_bandwidth_nwrites <= 1'd0; + end else begin + if ((soc_netsoc_sdram_bandwidth_cmd_valid & soc_netsoc_sdram_bandwidth_cmd_ready)) begin + if (soc_netsoc_sdram_bandwidth_cmd_is_read) begin + soc_netsoc_sdram_bandwidth_nreads <= (soc_netsoc_sdram_bandwidth_nreads + 1'd1); + end + if (soc_netsoc_sdram_bandwidth_cmd_is_write) begin + soc_netsoc_sdram_bandwidth_nwrites <= (soc_netsoc_sdram_bandwidth_nwrites + 1'd1); + end + end + end + if (soc_netsoc_sdram_bandwidth_update_re) begin + soc_netsoc_sdram_bandwidth_nreads_status <= soc_netsoc_sdram_bandwidth_nreads_r; + soc_netsoc_sdram_bandwidth_nwrites_status <= soc_netsoc_sdram_bandwidth_nwrites_r; + end + if (((vns_roundrobin0_grant == 1'd0) & soc_netsoc_sdram_interface_bank0_rdata_valid)) begin + vns_rbank <= 1'd0; + end + if (((vns_roundrobin0_grant == 1'd0) & soc_netsoc_sdram_interface_bank0_wdata_ready)) begin + vns_wbank <= 1'd0; + end + if (((vns_roundrobin1_grant == 1'd0) & soc_netsoc_sdram_interface_bank1_rdata_valid)) begin + vns_rbank <= 1'd1; + end + if (((vns_roundrobin1_grant == 1'd0) & soc_netsoc_sdram_interface_bank1_wdata_ready)) begin + vns_wbank <= 1'd1; + end + if (((vns_roundrobin2_grant == 1'd0) & soc_netsoc_sdram_interface_bank2_rdata_valid)) begin + vns_rbank <= 2'd2; + end + if (((vns_roundrobin2_grant == 1'd0) & soc_netsoc_sdram_interface_bank2_wdata_ready)) begin + vns_wbank <= 2'd2; + end + if (((vns_roundrobin3_grant == 1'd0) & soc_netsoc_sdram_interface_bank3_rdata_valid)) begin + vns_rbank <= 2'd3; + end + if (((vns_roundrobin3_grant == 1'd0) & soc_netsoc_sdram_interface_bank3_wdata_ready)) begin + vns_wbank <= 2'd3; + end + if (((vns_roundrobin4_grant == 1'd0) & soc_netsoc_sdram_interface_bank4_rdata_valid)) begin + vns_rbank <= 3'd4; + end + if (((vns_roundrobin4_grant == 1'd0) & soc_netsoc_sdram_interface_bank4_wdata_ready)) begin + vns_wbank <= 3'd4; + end + if (((vns_roundrobin5_grant == 1'd0) & soc_netsoc_sdram_interface_bank5_rdata_valid)) begin + vns_rbank <= 3'd5; + end + if (((vns_roundrobin5_grant == 1'd0) & soc_netsoc_sdram_interface_bank5_wdata_ready)) begin + vns_wbank <= 3'd5; + end + if (((vns_roundrobin6_grant == 1'd0) & soc_netsoc_sdram_interface_bank6_rdata_valid)) begin + vns_rbank <= 3'd6; + end + if (((vns_roundrobin6_grant == 1'd0) & soc_netsoc_sdram_interface_bank6_wdata_ready)) begin + vns_wbank <= 3'd6; + end + if (((vns_roundrobin7_grant == 1'd0) & soc_netsoc_sdram_interface_bank7_rdata_valid)) begin + vns_rbank <= 3'd7; + end + if (((vns_roundrobin7_grant == 1'd0) & soc_netsoc_sdram_interface_bank7_wdata_ready)) begin + vns_wbank <= 3'd7; + end + vns_new_master_wdata_ready0 <= ((((((((1'd0 | ((vns_roundrobin0_grant == 1'd0) & soc_netsoc_sdram_interface_bank0_wdata_ready)) | ((vns_roundrobin1_grant == 1'd0) & soc_netsoc_sdram_interface_bank1_wdata_ready)) | ((vns_roundrobin2_grant == 1'd0) & soc_netsoc_sdram_interface_bank2_wdata_ready)) | ((vns_roundrobin3_grant == 1'd0) & soc_netsoc_sdram_interface_bank3_wdata_ready)) | ((vns_roundrobin4_grant == 1'd0) & soc_netsoc_sdram_interface_bank4_wdata_ready)) | ((vns_roundrobin5_grant == 1'd0) & soc_netsoc_sdram_interface_bank5_wdata_ready)) | ((vns_roundrobin6_grant == 1'd0) & soc_netsoc_sdram_interface_bank6_wdata_ready)) | ((vns_roundrobin7_grant == 1'd0) & soc_netsoc_sdram_interface_bank7_wdata_ready)); + vns_new_master_wdata_ready1 <= vns_new_master_wdata_ready0; + vns_new_master_wdata_ready2 <= vns_new_master_wdata_ready1; + vns_new_master_rdata_valid0 <= ((((((((1'd0 | ((vns_roundrobin0_grant == 1'd0) & soc_netsoc_sdram_interface_bank0_rdata_valid)) | ((vns_roundrobin1_grant == 1'd0) & soc_netsoc_sdram_interface_bank1_rdata_valid)) | ((vns_roundrobin2_grant == 1'd0) & soc_netsoc_sdram_interface_bank2_rdata_valid)) | ((vns_roundrobin3_grant == 1'd0) & soc_netsoc_sdram_interface_bank3_rdata_valid)) | ((vns_roundrobin4_grant == 1'd0) & soc_netsoc_sdram_interface_bank4_rdata_valid)) | ((vns_roundrobin5_grant == 1'd0) & soc_netsoc_sdram_interface_bank5_rdata_valid)) | ((vns_roundrobin6_grant == 1'd0) & soc_netsoc_sdram_interface_bank6_rdata_valid)) | ((vns_roundrobin7_grant == 1'd0) & soc_netsoc_sdram_interface_bank7_rdata_valid)); + vns_new_master_rdata_valid1 <= vns_new_master_rdata_valid0; + vns_new_master_rdata_valid2 <= vns_new_master_rdata_valid1; + vns_new_master_rdata_valid3 <= vns_new_master_rdata_valid2; + vns_new_master_rdata_valid4 <= vns_new_master_rdata_valid3; + vns_new_master_rdata_valid5 <= vns_new_master_rdata_valid4; + vns_new_master_rdata_valid6 <= vns_new_master_rdata_valid5; + vns_new_master_rdata_valid7 <= vns_new_master_rdata_valid6; + vns_new_master_rdata_valid8 <= vns_new_master_rdata_valid7; + vns_new_master_rdata_valid9 <= vns_new_master_rdata_valid8; + soc_netsoc_adr_offset_r <= soc_netsoc_interface0_wb_sdram_adr[1:0]; + vns_fullmemorywe_state <= vns_fullmemorywe_next_state; + vns_litedramwishbone2native_state <= vns_litedramwishbone2native_next_state; + if (soc_netsoc_count_litedramwishbone2native_next_value_ce) begin + soc_netsoc_count <= soc_netsoc_count_litedramwishbone2native_next_value; + end + if (soc_counter_ce) begin + soc_counter <= (soc_counter + 1'd1); + end + if (soc_ps_preamble_error_o) begin + soc_preamble_errors_status <= (soc_preamble_errors_status + 1'd1); + end + if (soc_ps_crc_error_o) begin + soc_crc_errors_status <= (soc_crc_errors_status + 1'd1); + end + soc_ps_preamble_error_toggle_o_r <= soc_ps_preamble_error_toggle_o; + soc_ps_crc_error_toggle_o_r <= soc_ps_crc_error_toggle_o; + soc_tx_cdc_graycounter0_q_binary <= soc_tx_cdc_graycounter0_q_next_binary; + soc_tx_cdc_graycounter0_q <= soc_tx_cdc_graycounter0_q_next; + soc_rx_cdc_graycounter1_q_binary <= soc_rx_cdc_graycounter1_q_next_binary; + soc_rx_cdc_graycounter1_q <= soc_rx_cdc_graycounter1_q_next; + if (soc_writer_counter_reset) begin + soc_writer_counter <= 1'd0; + end else begin + if (soc_writer_counter_ce) begin + soc_writer_counter <= (soc_writer_counter + soc_writer_inc); + end + end + if (soc_writer_slot_ce) begin + soc_writer_slot <= (soc_writer_slot + 1'd1); + end + if (((soc_writer_fifo_syncfifo_we & soc_writer_fifo_syncfifo_writable) & (~soc_writer_fifo_replace))) begin + soc_writer_fifo_produce <= (soc_writer_fifo_produce + 1'd1); + end + if (soc_writer_fifo_do_read) begin + soc_writer_fifo_consume <= (soc_writer_fifo_consume + 1'd1); + end + if (((soc_writer_fifo_syncfifo_we & soc_writer_fifo_syncfifo_writable) & (~soc_writer_fifo_replace))) begin + if ((~soc_writer_fifo_do_read)) begin + soc_writer_fifo_level <= (soc_writer_fifo_level + 1'd1); + end + end else begin + if (soc_writer_fifo_do_read) begin + soc_writer_fifo_level <= (soc_writer_fifo_level - 1'd1); + end + end + vns_liteethmacsramwriter_state <= vns_liteethmacsramwriter_next_state; + if (soc_writer_errors_status_liteethmac_next_value_ce) begin + soc_writer_errors_status <= soc_writer_errors_status_liteethmac_next_value; + end + if (soc_reader_counter_reset) begin + soc_reader_counter <= 1'd0; + end else begin + if (soc_reader_counter_ce) begin + soc_reader_counter <= (soc_reader_counter + 3'd4); + end + end + soc_reader_last_d <= soc_reader_last; + if (soc_reader_done_clear) begin + soc_reader_done_pending <= 1'd0; + end + if (soc_reader_done_trigger) begin + soc_reader_done_pending <= 1'd1; + end + if (((soc_reader_fifo_syncfifo_we & soc_reader_fifo_syncfifo_writable) & (~soc_reader_fifo_replace))) begin + soc_reader_fifo_produce <= (soc_reader_fifo_produce + 1'd1); + end + if (soc_reader_fifo_do_read) begin + soc_reader_fifo_consume <= (soc_reader_fifo_consume + 1'd1); + end + if (((soc_reader_fifo_syncfifo_we & soc_reader_fifo_syncfifo_writable) & (~soc_reader_fifo_replace))) begin + if ((~soc_reader_fifo_do_read)) begin + soc_reader_fifo_level <= (soc_reader_fifo_level + 1'd1); + end + end else begin + if (soc_reader_fifo_do_read) begin + soc_reader_fifo_level <= (soc_reader_fifo_level - 1'd1); + end + end + vns_liteethmacsramreader_state <= vns_liteethmacsramreader_next_state; + soc_sram0_bus_ack0 <= 1'd0; + if (((soc_sram0_bus_cyc0 & soc_sram0_bus_stb0) & (~soc_sram0_bus_ack0))) begin + soc_sram0_bus_ack0 <= 1'd1; + end + soc_sram1_bus_ack0 <= 1'd0; + if (((soc_sram1_bus_cyc0 & soc_sram1_bus_stb0) & (~soc_sram1_bus_ack0))) begin + soc_sram1_bus_ack0 <= 1'd1; + end + soc_sram0_bus_ack1 <= 1'd0; + if (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & (~soc_sram0_bus_ack1))) begin + soc_sram0_bus_ack1 <= 1'd1; + end + soc_sram1_bus_ack1 <= 1'd0; + if (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & (~soc_sram1_bus_ack1))) begin + soc_sram1_bus_ack1 <= 1'd1; + end + soc_slave_sel_r <= soc_slave_sel; + case (vns_netsoc_grant) + 1'd0: begin + if ((~vns_netsoc_request[0])) begin + if (vns_netsoc_request[1]) begin + vns_netsoc_grant <= 1'd1; + end + end + end + 1'd1: begin + if ((~vns_netsoc_request[1])) begin + if (vns_netsoc_request[0]) begin + vns_netsoc_grant <= 1'd0; + end + end + end + endcase + vns_netsoc_slave_sel_r <= vns_netsoc_slave_sel; + if (vns_netsoc_wait) begin + if ((~vns_netsoc_done)) begin + vns_netsoc_count <= (vns_netsoc_count - 1'd1); + end + end else begin + vns_netsoc_count <= 20'd1000000; + end + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= 1'd0; + if (vns_netsoc_csrbankarray_csrbank0_sel) begin + case (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0]) + 1'd0: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= soc_netsoc_cpu_latch_w; + end + 1'd1: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time7_w; + end + 2'd2: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time6_w; + end + 2'd3: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time5_w; + end + 3'd4: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time4_w; + end + 3'd5: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time3_w; + end + 3'd6: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time2_w; + end + 3'd7: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time1_w; + end + 4'd8: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time0_w; + end + 4'd9: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_w; + end + 4'd10: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_w; + end + 4'd11: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_w; + end + 4'd12: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_w; + end + 4'd13: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_w; + end + 4'd14: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_w; + end + 4'd15: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_w; + end + 5'd16: begin + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_w; + end + endcase + end + if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_re) begin + soc_netsoc_cpu_time_cmp_storage[63:56] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_r; + end + if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_re) begin + soc_netsoc_cpu_time_cmp_storage[55:48] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_r; + end + if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_re) begin + soc_netsoc_cpu_time_cmp_storage[47:40] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_r; + end + if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_re) begin + soc_netsoc_cpu_time_cmp_storage[39:32] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_r; + end + if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_re) begin + soc_netsoc_cpu_time_cmp_storage[31:24] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_r; + end + if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_re) begin + soc_netsoc_cpu_time_cmp_storage[23:16] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_r; + end + if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_re) begin + soc_netsoc_cpu_time_cmp_storage[15:8] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_r; + end + if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_re) begin + soc_netsoc_cpu_time_cmp_storage[7:0] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_r; + end + soc_netsoc_cpu_time_cmp_re <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_re; + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= 1'd0; + if (vns_netsoc_csrbankarray_csrbank1_sel) begin + case (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0]) + 1'd0: begin + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= soc_netsoc_ctrl_reset_reset_w; + end + 1'd1: begin + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_scratch3_w; + end + 2'd2: begin + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_scratch2_w; + end + 2'd3: begin + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_scratch1_w; + end + 3'd4: begin + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_scratch0_w; + end + 3'd5: begin + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_bus_errors3_w; + end + 3'd6: begin + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_bus_errors2_w; + end + 3'd7: begin + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_bus_errors1_w; + end + 4'd8: begin + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_bus_errors0_w; + end + endcase + end + if (vns_netsoc_csrbankarray_csrbank1_scratch3_re) begin + soc_netsoc_ctrl_storage[31:24] <= vns_netsoc_csrbankarray_csrbank1_scratch3_r; + end + if (vns_netsoc_csrbankarray_csrbank1_scratch2_re) begin + soc_netsoc_ctrl_storage[23:16] <= vns_netsoc_csrbankarray_csrbank1_scratch2_r; + end + if (vns_netsoc_csrbankarray_csrbank1_scratch1_re) begin + soc_netsoc_ctrl_storage[15:8] <= vns_netsoc_csrbankarray_csrbank1_scratch1_r; + end + if (vns_netsoc_csrbankarray_csrbank1_scratch0_re) begin + soc_netsoc_ctrl_storage[7:0] <= vns_netsoc_csrbankarray_csrbank1_scratch0_r; + end + soc_netsoc_ctrl_re <= vns_netsoc_csrbankarray_csrbank1_scratch0_re; + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= 1'd0; + if (vns_netsoc_csrbankarray_csrbank2_sel) begin + case (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0]) + 1'd0: begin + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_w; + end + 1'd1: begin + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_cdly_rst_w; + end + 2'd2: begin + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_cdly_inc_w; + end + 2'd3: begin + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank2_dly_sel0_w; + end + 3'd4: begin + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_rdly_dq_rst_w; + end + 3'd5: begin + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_rdly_dq_inc_w; + end + 3'd6: begin + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_rdly_dq_bitslip_rst_w; + end + 3'd7: begin + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_rdly_dq_bitslip_w; + end + endcase + end + if (vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_re) begin + soc_a7ddrphy_half_sys8x_taps_storage[4:0] <= vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_r; + end + soc_a7ddrphy_half_sys8x_taps_re <= vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_re; + if (vns_netsoc_csrbankarray_csrbank2_dly_sel0_re) begin + soc_a7ddrphy_dly_sel_storage[1:0] <= vns_netsoc_csrbankarray_csrbank2_dly_sel0_r; + end + soc_a7ddrphy_dly_sel_re <= vns_netsoc_csrbankarray_csrbank2_dly_sel0_re; + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= 1'd0; + if (vns_netsoc_csrbankarray_csrbank3_sel) begin + case (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0]) + 1'd0: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_w; + end + 1'd1: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_w; + end + 2'd2: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_w; + end + 2'd3: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_w; + end + 3'd4: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_w; + end + 3'd5: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_w; + end + 3'd6: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_w; + end + 3'd7: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_w; + end + 4'd8: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_w; + end + 4'd9: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_writer_status_w; + end + 4'd10: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_writer_pending_w; + end + 4'd11: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_w; + end + 4'd12: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_reader_start_w; + end + 4'd13: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_w; + end + 4'd14: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_level_w; + end + 4'd15: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_w; + end + 5'd16: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_w; + end + 5'd17: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_w; + end + 5'd18: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_reader_eventmanager_status_w; + end + 5'd19: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_reader_eventmanager_pending_w; + end + 5'd20: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_w; + end + 5'd21: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_crc_w; + end + 5'd22: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_errors3_w; + end + 5'd23: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_errors2_w; + end + 5'd24: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_errors1_w; + end + 5'd25: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_errors0_w; + end + 5'd26: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_crc_errors3_w; + end + 5'd27: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_crc_errors2_w; + end + 5'd28: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_crc_errors1_w; + end + 5'd29: begin + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_crc_errors0_w; + end + endcase + end + if (vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_re) begin + soc_writer_storage <= vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_r; + end + soc_writer_re <= vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_re; + if (vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_re) begin + soc_reader_slot_storage <= vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_r; + end + soc_reader_slot_re <= vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_re; + if (vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_re) begin + soc_reader_length_storage[10:8] <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_r; + end + if (vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_re) begin + soc_reader_length_storage[7:0] <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_r; + end + soc_reader_length_re <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_re; + if (vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_re) begin + soc_reader_eventmanager_storage <= vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_r; + end + soc_reader_eventmanager_re <= vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_re; + vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= 1'd0; + if (vns_netsoc_csrbankarray_csrbank4_sel) begin + case (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0]) + 1'd0: begin + vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank4_crg_reset0_w; + end + 1'd1: begin + vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank4_mdio_w0_w; + end + 2'd2: begin + vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank4_mdio_r_w; + end + endcase + end + if (vns_netsoc_csrbankarray_csrbank4_crg_reset0_re) begin + soc_reset_storage <= vns_netsoc_csrbankarray_csrbank4_crg_reset0_r; + end + soc_reset_re <= vns_netsoc_csrbankarray_csrbank4_crg_reset0_re; + if (vns_netsoc_csrbankarray_csrbank4_mdio_w0_re) begin + soc_storage[2:0] <= vns_netsoc_csrbankarray_csrbank4_mdio_w0_r; + end + soc_re <= vns_netsoc_csrbankarray_csrbank4_mdio_w0_re; + vns_netsoc_csrbankarray_sel_r <= vns_netsoc_csrbankarray_sel; + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= 1'd0; + if (vns_netsoc_csrbankarray_csrbank5_sel) begin + case (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0]) + 1'd0: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_control0_w; + end + 1'd1: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_w; + end + 2'd2: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_phaseinjector0_command_issue_w; + end + 2'd3: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_w; + end + 3'd4: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_w; + end + 3'd5: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_w; + end + 3'd6: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_w; + end + 3'd7: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_w; + end + 4'd8: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_w; + end + 4'd9: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_w; + end + 4'd10: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_w; + end + 4'd11: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_w; + end + 4'd12: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_w; + end + 4'd13: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_w; + end + 4'd14: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_w; + end + 4'd15: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_phaseinjector1_command_issue_w; + end + 5'd16: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_w; + end + 5'd17: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_w; + end + 5'd18: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_w; + end + 5'd19: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_w; + end + 5'd20: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_w; + end + 5'd21: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_w; + end + 5'd22: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_w; + end + 5'd23: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_w; + end + 5'd24: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_w; + end + 5'd25: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_w; + end + 5'd26: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_w; + end + 5'd27: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_w; + end + 5'd28: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_phaseinjector2_command_issue_w; + end + 5'd29: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_w; + end + 5'd30: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_w; + end + 5'd31: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_w; + end + 6'd32: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_w; + end + 6'd33: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_w; + end + 6'd34: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_w; + end + 6'd35: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_w; + end + 6'd36: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_w; + end + 6'd37: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_w; + end + 6'd38: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_w; + end + 6'd39: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_w; + end + 6'd40: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_w; + end + 6'd41: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_phaseinjector3_command_issue_w; + end + 6'd42: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_w; + end + 6'd43: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_w; + end + 6'd44: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_w; + end + 6'd45: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_w; + end + 6'd46: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_w; + end + 6'd47: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_w; + end + 6'd48: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_w; + end + 6'd49: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_w; + end + 6'd50: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_w; + end + 6'd51: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_w; + end + 6'd52: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_w; + end + 6'd53: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_bandwidth_update_w; + end + 6'd54: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_w; + end + 6'd55: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_w; + end + 6'd56: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_w; + end + 6'd57: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_w; + end + 6'd58: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_w; + end + 6'd59: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_w; + end + 6'd60: begin + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_w; + end + endcase + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_control0_re) begin + soc_netsoc_sdram_storage[3:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_control0_r; + end + soc_netsoc_sdram_re <= vns_netsoc_csrbankarray_csrbank5_dfii_control0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_re) begin + soc_netsoc_sdram_phaseinjector0_command_storage[5:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_r; + end + soc_netsoc_sdram_phaseinjector0_command_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_re) begin + soc_netsoc_sdram_phaseinjector0_address_storage[13:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_re) begin + soc_netsoc_sdram_phaseinjector0_address_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_r; + end + soc_netsoc_sdram_phaseinjector0_address_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_re) begin + soc_netsoc_sdram_phaseinjector0_baddress_storage[2:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_r; + end + soc_netsoc_sdram_phaseinjector0_baddress_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_re) begin + soc_netsoc_sdram_phaseinjector0_wrdata_storage[31:24] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_re) begin + soc_netsoc_sdram_phaseinjector0_wrdata_storage[23:16] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_re) begin + soc_netsoc_sdram_phaseinjector0_wrdata_storage[15:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_re) begin + soc_netsoc_sdram_phaseinjector0_wrdata_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_r; + end + soc_netsoc_sdram_phaseinjector0_wrdata_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_re) begin + soc_netsoc_sdram_phaseinjector1_command_storage[5:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_r; + end + soc_netsoc_sdram_phaseinjector1_command_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_re) begin + soc_netsoc_sdram_phaseinjector1_address_storage[13:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_re) begin + soc_netsoc_sdram_phaseinjector1_address_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_r; + end + soc_netsoc_sdram_phaseinjector1_address_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_re) begin + soc_netsoc_sdram_phaseinjector1_baddress_storage[2:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_r; + end + soc_netsoc_sdram_phaseinjector1_baddress_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_re) begin + soc_netsoc_sdram_phaseinjector1_wrdata_storage[31:24] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_re) begin + soc_netsoc_sdram_phaseinjector1_wrdata_storage[23:16] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_re) begin + soc_netsoc_sdram_phaseinjector1_wrdata_storage[15:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_re) begin + soc_netsoc_sdram_phaseinjector1_wrdata_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_r; + end + soc_netsoc_sdram_phaseinjector1_wrdata_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_re) begin + soc_netsoc_sdram_phaseinjector2_command_storage[5:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_r; + end + soc_netsoc_sdram_phaseinjector2_command_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_re) begin + soc_netsoc_sdram_phaseinjector2_address_storage[13:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_re) begin + soc_netsoc_sdram_phaseinjector2_address_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_r; + end + soc_netsoc_sdram_phaseinjector2_address_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_re) begin + soc_netsoc_sdram_phaseinjector2_baddress_storage[2:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_r; + end + soc_netsoc_sdram_phaseinjector2_baddress_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_re) begin + soc_netsoc_sdram_phaseinjector2_wrdata_storage[31:24] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_re) begin + soc_netsoc_sdram_phaseinjector2_wrdata_storage[23:16] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_re) begin + soc_netsoc_sdram_phaseinjector2_wrdata_storage[15:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_re) begin + soc_netsoc_sdram_phaseinjector2_wrdata_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_r; + end + soc_netsoc_sdram_phaseinjector2_wrdata_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_re) begin + soc_netsoc_sdram_phaseinjector3_command_storage[5:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_r; + end + soc_netsoc_sdram_phaseinjector3_command_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_re) begin + soc_netsoc_sdram_phaseinjector3_address_storage[13:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_re) begin + soc_netsoc_sdram_phaseinjector3_address_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_r; + end + soc_netsoc_sdram_phaseinjector3_address_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_re) begin + soc_netsoc_sdram_phaseinjector3_baddress_storage[2:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_r; + end + soc_netsoc_sdram_phaseinjector3_baddress_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_re; + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_re) begin + soc_netsoc_sdram_phaseinjector3_wrdata_storage[31:24] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_re) begin + soc_netsoc_sdram_phaseinjector3_wrdata_storage[23:16] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_re) begin + soc_netsoc_sdram_phaseinjector3_wrdata_storage[15:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_r; + end + if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_re) begin + soc_netsoc_sdram_phaseinjector3_wrdata_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_r; + end + soc_netsoc_sdram_phaseinjector3_wrdata_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_re; + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= 1'd0; + if (vns_netsoc_csrbankarray_csrbank6_sel) begin + case (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0]) + 1'd0: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_load3_w; + end + 1'd1: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_load2_w; + end + 2'd2: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_load1_w; + end + 2'd3: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_load0_w; + end + 3'd4: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_reload3_w; + end + 3'd5: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_reload2_w; + end + 3'd6: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_reload1_w; + end + 3'd7: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_reload0_w; + end + 4'd8: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_en0_w; + end + 4'd9: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_update_value0_w; + end + 4'd10: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_value3_w; + end + 4'd11: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_value2_w; + end + 4'd12: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_value1_w; + end + 4'd13: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_value0_w; + end + 4'd14: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= soc_netsoc_timer0_eventmanager_status_w; + end + 4'd15: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= soc_netsoc_timer0_eventmanager_pending_w; + end + 5'd16: begin + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_ev_enable0_w; + end + endcase + end + if (vns_netsoc_csrbankarray_csrbank6_load3_re) begin + soc_netsoc_timer0_load_storage[31:24] <= vns_netsoc_csrbankarray_csrbank6_load3_r; + end + if (vns_netsoc_csrbankarray_csrbank6_load2_re) begin + soc_netsoc_timer0_load_storage[23:16] <= vns_netsoc_csrbankarray_csrbank6_load2_r; + end + if (vns_netsoc_csrbankarray_csrbank6_load1_re) begin + soc_netsoc_timer0_load_storage[15:8] <= vns_netsoc_csrbankarray_csrbank6_load1_r; + end + if (vns_netsoc_csrbankarray_csrbank6_load0_re) begin + soc_netsoc_timer0_load_storage[7:0] <= vns_netsoc_csrbankarray_csrbank6_load0_r; + end + soc_netsoc_timer0_load_re <= vns_netsoc_csrbankarray_csrbank6_load0_re; + if (vns_netsoc_csrbankarray_csrbank6_reload3_re) begin + soc_netsoc_timer0_reload_storage[31:24] <= vns_netsoc_csrbankarray_csrbank6_reload3_r; + end + if (vns_netsoc_csrbankarray_csrbank6_reload2_re) begin + soc_netsoc_timer0_reload_storage[23:16] <= vns_netsoc_csrbankarray_csrbank6_reload2_r; + end + if (vns_netsoc_csrbankarray_csrbank6_reload1_re) begin + soc_netsoc_timer0_reload_storage[15:8] <= vns_netsoc_csrbankarray_csrbank6_reload1_r; + end + if (vns_netsoc_csrbankarray_csrbank6_reload0_re) begin + soc_netsoc_timer0_reload_storage[7:0] <= vns_netsoc_csrbankarray_csrbank6_reload0_r; + end + soc_netsoc_timer0_reload_re <= vns_netsoc_csrbankarray_csrbank6_reload0_re; + if (vns_netsoc_csrbankarray_csrbank6_en0_re) begin + soc_netsoc_timer0_en_storage <= vns_netsoc_csrbankarray_csrbank6_en0_r; + end + soc_netsoc_timer0_en_re <= vns_netsoc_csrbankarray_csrbank6_en0_re; + if (vns_netsoc_csrbankarray_csrbank6_update_value0_re) begin + soc_netsoc_timer0_update_value_storage <= vns_netsoc_csrbankarray_csrbank6_update_value0_r; + end + soc_netsoc_timer0_update_value_re <= vns_netsoc_csrbankarray_csrbank6_update_value0_re; + if (vns_netsoc_csrbankarray_csrbank6_ev_enable0_re) begin + soc_netsoc_timer0_eventmanager_storage <= vns_netsoc_csrbankarray_csrbank6_ev_enable0_r; + end + soc_netsoc_timer0_eventmanager_re <= vns_netsoc_csrbankarray_csrbank6_ev_enable0_re; + vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= 1'd0; + if (vns_netsoc_csrbankarray_csrbank7_sel) begin + case (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0]) + 1'd0: begin + vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= soc_netsoc_uart_rxtx_w; + end + 1'd1: begin + vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank7_txfull_w; + end + 2'd2: begin + vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank7_rxempty_w; + end + 2'd3: begin + vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= soc_netsoc_uart_eventmanager_status_w; + end + 3'd4: begin + vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= soc_netsoc_uart_eventmanager_pending_w; + end + 3'd5: begin + vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank7_ev_enable0_w; + end + endcase + end + if (vns_netsoc_csrbankarray_csrbank7_ev_enable0_re) begin + soc_netsoc_uart_eventmanager_storage[1:0] <= vns_netsoc_csrbankarray_csrbank7_ev_enable0_r; + end + soc_netsoc_uart_eventmanager_re <= vns_netsoc_csrbankarray_csrbank7_ev_enable0_re; + vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= 1'd0; + if (vns_netsoc_csrbankarray_csrbank8_sel) begin + case (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0]) + 1'd0: begin + vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank8_tuning_word3_w; + end + 1'd1: begin + vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank8_tuning_word2_w; + end + 2'd2: begin + vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank8_tuning_word1_w; + end + 2'd3: begin + vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank8_tuning_word0_w; + end + endcase + end + if (vns_netsoc_csrbankarray_csrbank8_tuning_word3_re) begin + soc_netsoc_uart_phy_storage[31:24] <= vns_netsoc_csrbankarray_csrbank8_tuning_word3_r; + end + if (vns_netsoc_csrbankarray_csrbank8_tuning_word2_re) begin + soc_netsoc_uart_phy_storage[23:16] <= vns_netsoc_csrbankarray_csrbank8_tuning_word2_r; + end + if (vns_netsoc_csrbankarray_csrbank8_tuning_word1_re) begin + soc_netsoc_uart_phy_storage[15:8] <= vns_netsoc_csrbankarray_csrbank8_tuning_word1_r; + end + if (vns_netsoc_csrbankarray_csrbank8_tuning_word0_re) begin + soc_netsoc_uart_phy_storage[7:0] <= vns_netsoc_csrbankarray_csrbank8_tuning_word0_r; + end + soc_netsoc_uart_phy_re <= vns_netsoc_csrbankarray_csrbank8_tuning_word0_re; + if (sys_rst) begin + soc_netsoc_ctrl_storage <= 32'd305419896; + soc_netsoc_ctrl_re <= 1'd0; + soc_netsoc_ctrl_bus_errors <= 32'd0; + soc_netsoc_cpu_time_status <= 64'd0; + soc_netsoc_cpu_time_cmp_storage <= 64'd18446744073709551615; + soc_netsoc_cpu_time_cmp_re <= 1'd0; + soc_netsoc_cpu_time <= 64'd0; + soc_netsoc_cpu_time_cmp <= 64'd18446744073709551615; + soc_netsoc_rom_bus_ack <= 1'd0; + soc_netsoc_sram_bus_ack <= 1'd0; + serial_tx <= 1'd1; + soc_netsoc_uart_phy_storage <= 32'd8246337; + soc_netsoc_uart_phy_re <= 1'd0; + soc_netsoc_uart_phy_sink_ready <= 1'd0; + soc_netsoc_uart_phy_uart_clk_txen <= 1'd0; + soc_netsoc_uart_phy_phase_accumulator_tx <= 32'd0; + soc_netsoc_uart_phy_tx_reg <= 8'd0; + soc_netsoc_uart_phy_tx_bitcount <= 4'd0; + soc_netsoc_uart_phy_tx_busy <= 1'd0; + soc_netsoc_uart_phy_source_valid <= 1'd0; + soc_netsoc_uart_phy_source_payload_data <= 8'd0; + soc_netsoc_uart_phy_uart_clk_rxen <= 1'd0; + soc_netsoc_uart_phy_phase_accumulator_rx <= 32'd0; + soc_netsoc_uart_phy_rx_r <= 1'd0; + soc_netsoc_uart_phy_rx_reg <= 8'd0; + soc_netsoc_uart_phy_rx_bitcount <= 4'd0; + soc_netsoc_uart_phy_rx_busy <= 1'd0; + soc_netsoc_uart_tx_pending <= 1'd0; + soc_netsoc_uart_tx_old_trigger <= 1'd0; + soc_netsoc_uart_rx_pending <= 1'd0; + soc_netsoc_uart_rx_old_trigger <= 1'd0; + soc_netsoc_uart_eventmanager_storage <= 2'd0; + soc_netsoc_uart_eventmanager_re <= 1'd0; + soc_netsoc_uart_tx_fifo_readable <= 1'd0; + soc_netsoc_uart_tx_fifo_level0 <= 5'd0; + soc_netsoc_uart_tx_fifo_produce <= 4'd0; + soc_netsoc_uart_tx_fifo_consume <= 4'd0; + soc_netsoc_uart_rx_fifo_readable <= 1'd0; + soc_netsoc_uart_rx_fifo_level0 <= 5'd0; + soc_netsoc_uart_rx_fifo_produce <= 4'd0; + soc_netsoc_uart_rx_fifo_consume <= 4'd0; + soc_netsoc_timer0_load_storage <= 32'd0; + soc_netsoc_timer0_load_re <= 1'd0; + soc_netsoc_timer0_reload_storage <= 32'd0; + soc_netsoc_timer0_reload_re <= 1'd0; + soc_netsoc_timer0_en_storage <= 1'd0; + soc_netsoc_timer0_en_re <= 1'd0; + soc_netsoc_timer0_update_value_storage <= 1'd0; + soc_netsoc_timer0_update_value_re <= 1'd0; + soc_netsoc_timer0_value_status <= 32'd0; + soc_netsoc_timer0_zero_pending <= 1'd0; + soc_netsoc_timer0_zero_old_trigger <= 1'd0; + soc_netsoc_timer0_eventmanager_storage <= 1'd0; + soc_netsoc_timer0_eventmanager_re <= 1'd0; + soc_netsoc_timer0_value <= 32'd0; + soc_emulator_ram_bus_ack <= 1'd0; + soc_a7ddrphy_half_sys8x_taps_storage <= 5'd8; + soc_a7ddrphy_half_sys8x_taps_re <= 1'd0; + soc_a7ddrphy_dly_sel_storage <= 2'd0; + soc_a7ddrphy_dly_sel_re <= 1'd0; + soc_a7ddrphy_dfi_p0_rddata_valid <= 1'd0; + soc_a7ddrphy_dfi_p1_rddata_valid <= 1'd0; + soc_a7ddrphy_dfi_p2_rddata_valid <= 1'd0; + soc_a7ddrphy_dfi_p3_rddata_valid <= 1'd0; + soc_a7ddrphy_oe_dqs <= 1'd0; + soc_a7ddrphy_oe_dq <= 1'd0; + soc_a7ddrphy_bitslip0_o <= 8'd0; + soc_a7ddrphy_bitslip0_value <= 3'd0; + soc_a7ddrphy_bitslip0_r <= 16'd0; + soc_a7ddrphy_bitslip1_o <= 8'd0; + soc_a7ddrphy_bitslip1_value <= 3'd0; + soc_a7ddrphy_bitslip1_r <= 16'd0; + soc_a7ddrphy_bitslip2_o <= 8'd0; + soc_a7ddrphy_bitslip2_value <= 3'd0; + soc_a7ddrphy_bitslip2_r <= 16'd0; + soc_a7ddrphy_bitslip3_o <= 8'd0; + soc_a7ddrphy_bitslip3_value <= 3'd0; + soc_a7ddrphy_bitslip3_r <= 16'd0; + soc_a7ddrphy_bitslip4_o <= 8'd0; + soc_a7ddrphy_bitslip4_value <= 3'd0; + soc_a7ddrphy_bitslip4_r <= 16'd0; + soc_a7ddrphy_bitslip5_o <= 8'd0; + soc_a7ddrphy_bitslip5_value <= 3'd0; + soc_a7ddrphy_bitslip5_r <= 16'd0; + soc_a7ddrphy_bitslip6_o <= 8'd0; + soc_a7ddrphy_bitslip6_value <= 3'd0; + soc_a7ddrphy_bitslip6_r <= 16'd0; + soc_a7ddrphy_bitslip7_o <= 8'd0; + soc_a7ddrphy_bitslip7_value <= 3'd0; + soc_a7ddrphy_bitslip7_r <= 16'd0; + soc_a7ddrphy_bitslip8_o <= 8'd0; + soc_a7ddrphy_bitslip8_value <= 3'd0; + soc_a7ddrphy_bitslip8_r <= 16'd0; + soc_a7ddrphy_bitslip9_o <= 8'd0; + soc_a7ddrphy_bitslip9_value <= 3'd0; + soc_a7ddrphy_bitslip9_r <= 16'd0; + soc_a7ddrphy_bitslip10_o <= 8'd0; + soc_a7ddrphy_bitslip10_value <= 3'd0; + soc_a7ddrphy_bitslip10_r <= 16'd0; + soc_a7ddrphy_bitslip11_o <= 8'd0; + soc_a7ddrphy_bitslip11_value <= 3'd0; + soc_a7ddrphy_bitslip11_r <= 16'd0; + soc_a7ddrphy_bitslip12_o <= 8'd0; + soc_a7ddrphy_bitslip12_value <= 3'd0; + soc_a7ddrphy_bitslip12_r <= 16'd0; + soc_a7ddrphy_bitslip13_o <= 8'd0; + soc_a7ddrphy_bitslip13_value <= 3'd0; + soc_a7ddrphy_bitslip13_r <= 16'd0; + soc_a7ddrphy_bitslip14_o <= 8'd0; + soc_a7ddrphy_bitslip14_value <= 3'd0; + soc_a7ddrphy_bitslip14_r <= 16'd0; + soc_a7ddrphy_bitslip15_o <= 8'd0; + soc_a7ddrphy_bitslip15_value <= 3'd0; + soc_a7ddrphy_bitslip15_r <= 16'd0; + soc_a7ddrphy_n_rddata_en0 <= 1'd0; + soc_a7ddrphy_n_rddata_en1 <= 1'd0; + soc_a7ddrphy_n_rddata_en2 <= 1'd0; + soc_a7ddrphy_n_rddata_en3 <= 1'd0; + soc_a7ddrphy_n_rddata_en4 <= 1'd0; + soc_a7ddrphy_n_rddata_en5 <= 1'd0; + soc_a7ddrphy_n_rddata_en6 <= 1'd0; + soc_a7ddrphy_n_rddata_en7 <= 1'd0; + soc_a7ddrphy_last_wrdata_en <= 4'd0; + soc_netsoc_sdram_storage <= 4'd0; + soc_netsoc_sdram_re <= 1'd0; + soc_netsoc_sdram_phaseinjector0_command_storage <= 6'd0; + soc_netsoc_sdram_phaseinjector0_command_re <= 1'd0; + soc_netsoc_sdram_phaseinjector0_address_storage <= 14'd0; + soc_netsoc_sdram_phaseinjector0_address_re <= 1'd0; + soc_netsoc_sdram_phaseinjector0_baddress_storage <= 3'd0; + soc_netsoc_sdram_phaseinjector0_baddress_re <= 1'd0; + soc_netsoc_sdram_phaseinjector0_wrdata_storage <= 32'd0; + soc_netsoc_sdram_phaseinjector0_wrdata_re <= 1'd0; + soc_netsoc_sdram_phaseinjector0_status <= 32'd0; + soc_netsoc_sdram_phaseinjector1_command_storage <= 6'd0; + soc_netsoc_sdram_phaseinjector1_command_re <= 1'd0; + soc_netsoc_sdram_phaseinjector1_address_storage <= 14'd0; + soc_netsoc_sdram_phaseinjector1_address_re <= 1'd0; + soc_netsoc_sdram_phaseinjector1_baddress_storage <= 3'd0; + soc_netsoc_sdram_phaseinjector1_baddress_re <= 1'd0; + soc_netsoc_sdram_phaseinjector1_wrdata_storage <= 32'd0; + soc_netsoc_sdram_phaseinjector1_wrdata_re <= 1'd0; + soc_netsoc_sdram_phaseinjector1_status <= 32'd0; + soc_netsoc_sdram_phaseinjector2_command_storage <= 6'd0; + soc_netsoc_sdram_phaseinjector2_command_re <= 1'd0; + soc_netsoc_sdram_phaseinjector2_address_storage <= 14'd0; + soc_netsoc_sdram_phaseinjector2_address_re <= 1'd0; + soc_netsoc_sdram_phaseinjector2_baddress_storage <= 3'd0; + soc_netsoc_sdram_phaseinjector2_baddress_re <= 1'd0; + soc_netsoc_sdram_phaseinjector2_wrdata_storage <= 32'd0; + soc_netsoc_sdram_phaseinjector2_wrdata_re <= 1'd0; + soc_netsoc_sdram_phaseinjector2_status <= 32'd0; + soc_netsoc_sdram_phaseinjector3_command_storage <= 6'd0; + soc_netsoc_sdram_phaseinjector3_command_re <= 1'd0; + soc_netsoc_sdram_phaseinjector3_address_storage <= 14'd0; + soc_netsoc_sdram_phaseinjector3_address_re <= 1'd0; + soc_netsoc_sdram_phaseinjector3_baddress_storage <= 3'd0; + soc_netsoc_sdram_phaseinjector3_baddress_re <= 1'd0; + soc_netsoc_sdram_phaseinjector3_wrdata_storage <= 32'd0; + soc_netsoc_sdram_phaseinjector3_wrdata_re <= 1'd0; + soc_netsoc_sdram_phaseinjector3_status <= 32'd0; + soc_netsoc_sdram_dfi_p0_address <= 14'd0; + soc_netsoc_sdram_dfi_p0_bank <= 3'd0; + soc_netsoc_sdram_dfi_p0_cas_n <= 1'd1; + soc_netsoc_sdram_dfi_p0_cs_n <= 1'd1; + soc_netsoc_sdram_dfi_p0_ras_n <= 1'd1; + soc_netsoc_sdram_dfi_p0_we_n <= 1'd1; + soc_netsoc_sdram_dfi_p0_wrdata_en <= 1'd0; + soc_netsoc_sdram_dfi_p0_rddata_en <= 1'd0; + soc_netsoc_sdram_dfi_p1_address <= 14'd0; + soc_netsoc_sdram_dfi_p1_bank <= 3'd0; + soc_netsoc_sdram_dfi_p1_cas_n <= 1'd1; + soc_netsoc_sdram_dfi_p1_cs_n <= 1'd1; + soc_netsoc_sdram_dfi_p1_ras_n <= 1'd1; + soc_netsoc_sdram_dfi_p1_we_n <= 1'd1; + soc_netsoc_sdram_dfi_p1_wrdata_en <= 1'd0; + soc_netsoc_sdram_dfi_p1_rddata_en <= 1'd0; + soc_netsoc_sdram_dfi_p2_address <= 14'd0; + soc_netsoc_sdram_dfi_p2_bank <= 3'd0; + soc_netsoc_sdram_dfi_p2_cas_n <= 1'd1; + soc_netsoc_sdram_dfi_p2_cs_n <= 1'd1; + soc_netsoc_sdram_dfi_p2_ras_n <= 1'd1; + soc_netsoc_sdram_dfi_p2_we_n <= 1'd1; + soc_netsoc_sdram_dfi_p2_wrdata_en <= 1'd0; + soc_netsoc_sdram_dfi_p2_rddata_en <= 1'd0; + soc_netsoc_sdram_dfi_p3_address <= 14'd0; + soc_netsoc_sdram_dfi_p3_bank <= 3'd0; + soc_netsoc_sdram_dfi_p3_cas_n <= 1'd1; + soc_netsoc_sdram_dfi_p3_cs_n <= 1'd1; + soc_netsoc_sdram_dfi_p3_ras_n <= 1'd1; + soc_netsoc_sdram_dfi_p3_we_n <= 1'd1; + soc_netsoc_sdram_dfi_p3_wrdata_en <= 1'd0; + soc_netsoc_sdram_dfi_p3_rddata_en <= 1'd0; + soc_netsoc_sdram_cmd_payload_a <= 14'd0; + soc_netsoc_sdram_cmd_payload_ba <= 3'd0; + soc_netsoc_sdram_cmd_payload_cas <= 1'd0; + soc_netsoc_sdram_cmd_payload_ras <= 1'd0; + soc_netsoc_sdram_cmd_payload_we <= 1'd0; + soc_netsoc_sdram_timer_count1 <= 9'd468; + soc_netsoc_sdram_postponer_req_o <= 1'd0; + soc_netsoc_sdram_postponer_count <= 1'd0; + soc_netsoc_sdram_sequencer_done1 <= 1'd0; + soc_netsoc_sdram_sequencer_counter <= 6'd0; + soc_netsoc_sdram_sequencer_count <= 1'd0; + soc_netsoc_sdram_zqcs_timer_count1 <= 26'd59999999; + soc_netsoc_sdram_zqcs_executer_done <= 1'd0; + soc_netsoc_sdram_zqcs_executer_counter <= 5'd0; + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level <= 4'd0; + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce <= 3'd0; + soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume <= 3'd0; + soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr <= 21'd0; + soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n <= 1'd0; + soc_netsoc_sdram_bankmachine0_cmd_buffer_first_n <= 1'd0; + soc_netsoc_sdram_bankmachine0_cmd_buffer_last_n <= 1'd0; + soc_netsoc_sdram_bankmachine0_row <= 14'd0; + soc_netsoc_sdram_bankmachine0_row_opened <= 1'd0; + soc_netsoc_sdram_bankmachine0_twtpcon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine0_twtpcon_count <= 3'd0; + soc_netsoc_sdram_bankmachine0_trccon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine0_trccon_count <= 2'd0; + soc_netsoc_sdram_bankmachine0_trascon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine0_trascon_count <= 2'd0; + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level <= 4'd0; + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce <= 3'd0; + soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume <= 3'd0; + soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr <= 21'd0; + soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n <= 1'd0; + soc_netsoc_sdram_bankmachine1_cmd_buffer_first_n <= 1'd0; + soc_netsoc_sdram_bankmachine1_cmd_buffer_last_n <= 1'd0; + soc_netsoc_sdram_bankmachine1_row <= 14'd0; + soc_netsoc_sdram_bankmachine1_row_opened <= 1'd0; + soc_netsoc_sdram_bankmachine1_twtpcon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine1_twtpcon_count <= 3'd0; + soc_netsoc_sdram_bankmachine1_trccon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine1_trccon_count <= 2'd0; + soc_netsoc_sdram_bankmachine1_trascon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine1_trascon_count <= 2'd0; + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level <= 4'd0; + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce <= 3'd0; + soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume <= 3'd0; + soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr <= 21'd0; + soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n <= 1'd0; + soc_netsoc_sdram_bankmachine2_cmd_buffer_first_n <= 1'd0; + soc_netsoc_sdram_bankmachine2_cmd_buffer_last_n <= 1'd0; + soc_netsoc_sdram_bankmachine2_row <= 14'd0; + soc_netsoc_sdram_bankmachine2_row_opened <= 1'd0; + soc_netsoc_sdram_bankmachine2_twtpcon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine2_twtpcon_count <= 3'd0; + soc_netsoc_sdram_bankmachine2_trccon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine2_trccon_count <= 2'd0; + soc_netsoc_sdram_bankmachine2_trascon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine2_trascon_count <= 2'd0; + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level <= 4'd0; + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce <= 3'd0; + soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume <= 3'd0; + soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr <= 21'd0; + soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n <= 1'd0; + soc_netsoc_sdram_bankmachine3_cmd_buffer_first_n <= 1'd0; + soc_netsoc_sdram_bankmachine3_cmd_buffer_last_n <= 1'd0; + soc_netsoc_sdram_bankmachine3_row <= 14'd0; + soc_netsoc_sdram_bankmachine3_row_opened <= 1'd0; + soc_netsoc_sdram_bankmachine3_twtpcon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine3_twtpcon_count <= 3'd0; + soc_netsoc_sdram_bankmachine3_trccon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine3_trccon_count <= 2'd0; + soc_netsoc_sdram_bankmachine3_trascon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine3_trascon_count <= 2'd0; + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level <= 4'd0; + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce <= 3'd0; + soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume <= 3'd0; + soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr <= 21'd0; + soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n <= 1'd0; + soc_netsoc_sdram_bankmachine4_cmd_buffer_first_n <= 1'd0; + soc_netsoc_sdram_bankmachine4_cmd_buffer_last_n <= 1'd0; + soc_netsoc_sdram_bankmachine4_row <= 14'd0; + soc_netsoc_sdram_bankmachine4_row_opened <= 1'd0; + soc_netsoc_sdram_bankmachine4_twtpcon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine4_twtpcon_count <= 3'd0; + soc_netsoc_sdram_bankmachine4_trccon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine4_trccon_count <= 2'd0; + soc_netsoc_sdram_bankmachine4_trascon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine4_trascon_count <= 2'd0; + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level <= 4'd0; + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce <= 3'd0; + soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume <= 3'd0; + soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr <= 21'd0; + soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n <= 1'd0; + soc_netsoc_sdram_bankmachine5_cmd_buffer_first_n <= 1'd0; + soc_netsoc_sdram_bankmachine5_cmd_buffer_last_n <= 1'd0; + soc_netsoc_sdram_bankmachine5_row <= 14'd0; + soc_netsoc_sdram_bankmachine5_row_opened <= 1'd0; + soc_netsoc_sdram_bankmachine5_twtpcon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine5_twtpcon_count <= 3'd0; + soc_netsoc_sdram_bankmachine5_trccon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine5_trccon_count <= 2'd0; + soc_netsoc_sdram_bankmachine5_trascon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine5_trascon_count <= 2'd0; + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level <= 4'd0; + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce <= 3'd0; + soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume <= 3'd0; + soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr <= 21'd0; + soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n <= 1'd0; + soc_netsoc_sdram_bankmachine6_cmd_buffer_first_n <= 1'd0; + soc_netsoc_sdram_bankmachine6_cmd_buffer_last_n <= 1'd0; + soc_netsoc_sdram_bankmachine6_row <= 14'd0; + soc_netsoc_sdram_bankmachine6_row_opened <= 1'd0; + soc_netsoc_sdram_bankmachine6_twtpcon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine6_twtpcon_count <= 3'd0; + soc_netsoc_sdram_bankmachine6_trccon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine6_trccon_count <= 2'd0; + soc_netsoc_sdram_bankmachine6_trascon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine6_trascon_count <= 2'd0; + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level <= 4'd0; + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce <= 3'd0; + soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume <= 3'd0; + soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_we <= 1'd0; + soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr <= 21'd0; + soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n <= 1'd0; + soc_netsoc_sdram_bankmachine7_cmd_buffer_first_n <= 1'd0; + soc_netsoc_sdram_bankmachine7_cmd_buffer_last_n <= 1'd0; + soc_netsoc_sdram_bankmachine7_row <= 14'd0; + soc_netsoc_sdram_bankmachine7_row_opened <= 1'd0; + soc_netsoc_sdram_bankmachine7_twtpcon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine7_twtpcon_count <= 3'd0; + soc_netsoc_sdram_bankmachine7_trccon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine7_trccon_count <= 2'd0; + soc_netsoc_sdram_bankmachine7_trascon_ready <= 1'd1; + soc_netsoc_sdram_bankmachine7_trascon_count <= 2'd0; + soc_netsoc_sdram_choose_cmd_grant <= 3'd0; + soc_netsoc_sdram_choose_req_grant <= 3'd0; + soc_netsoc_sdram_trrdcon_ready <= 1'd1; + soc_netsoc_sdram_trrdcon_count <= 1'd0; + soc_netsoc_sdram_tfawcon_ready <= 1'd1; + soc_netsoc_sdram_tfawcon_window <= 4'd0; + soc_netsoc_sdram_tccdcon_ready <= 1'd1; + soc_netsoc_sdram_tccdcon_count <= 1'd0; + soc_netsoc_sdram_twtrcon_ready <= 1'd1; + soc_netsoc_sdram_twtrcon_count <= 3'd0; + soc_netsoc_sdram_time0 <= 5'd0; + soc_netsoc_sdram_time1 <= 4'd0; + soc_netsoc_sdram_bandwidth_nreads_status <= 24'd0; + soc_netsoc_sdram_bandwidth_nwrites_status <= 24'd0; + soc_netsoc_sdram_bandwidth_cmd_valid <= 1'd0; + soc_netsoc_sdram_bandwidth_cmd_ready <= 1'd0; + soc_netsoc_sdram_bandwidth_cmd_is_read <= 1'd0; + soc_netsoc_sdram_bandwidth_cmd_is_write <= 1'd0; + soc_netsoc_sdram_bandwidth_counter <= 24'd0; + soc_netsoc_sdram_bandwidth_period <= 1'd0; + soc_netsoc_sdram_bandwidth_nreads <= 24'd0; + soc_netsoc_sdram_bandwidth_nwrites <= 24'd0; + soc_netsoc_sdram_bandwidth_nreads_r <= 24'd0; + soc_netsoc_sdram_bandwidth_nwrites_r <= 24'd0; + soc_netsoc_adr_offset_r <= 2'd0; + soc_netsoc_count <= 1'd0; + soc_reset_storage <= 1'd0; + soc_reset_re <= 1'd0; + soc_counter <= 9'd0; + soc_storage <= 3'd0; + soc_re <= 1'd0; + soc_preamble_errors_status <= 32'd0; + soc_crc_errors_status <= 32'd0; + soc_tx_cdc_graycounter0_q <= 7'd0; + soc_tx_cdc_graycounter0_q_binary <= 7'd0; + soc_rx_cdc_graycounter1_q <= 7'd0; + soc_rx_cdc_graycounter1_q_binary <= 7'd0; + soc_writer_errors_status <= 32'd0; + soc_writer_storage <= 1'd0; + soc_writer_re <= 1'd0; + soc_writer_counter <= 32'd0; + soc_writer_slot <= 1'd0; + soc_writer_fifo_level <= 2'd0; + soc_writer_fifo_produce <= 1'd0; + soc_writer_fifo_consume <= 1'd0; + soc_reader_slot_storage <= 1'd0; + soc_reader_slot_re <= 1'd0; + soc_reader_length_storage <= 11'd0; + soc_reader_length_re <= 1'd0; + soc_reader_done_pending <= 1'd0; + soc_reader_eventmanager_storage <= 1'd0; + soc_reader_eventmanager_re <= 1'd0; + soc_reader_fifo_level <= 2'd0; + soc_reader_fifo_produce <= 1'd0; + soc_reader_fifo_consume <= 1'd0; + soc_reader_counter <= 11'd0; + soc_reader_last_d <= 1'd0; + soc_sram0_bus_ack0 <= 1'd0; + soc_sram1_bus_ack0 <= 1'd0; + soc_sram0_bus_ack1 <= 1'd0; + soc_sram1_bus_ack1 <= 1'd0; + soc_slave_sel_r <= 4'd0; + vns_wb2csr_state <= 1'd0; + vns_refresher_state <= 2'd0; + vns_bankmachine0_state <= 3'd0; + vns_bankmachine1_state <= 3'd0; + vns_bankmachine2_state <= 3'd0; + vns_bankmachine3_state <= 3'd0; + vns_bankmachine4_state <= 3'd0; + vns_bankmachine5_state <= 3'd0; + vns_bankmachine6_state <= 3'd0; + vns_bankmachine7_state <= 3'd0; + vns_multiplexer_state <= 4'd0; + vns_rbank <= 3'd0; + vns_wbank <= 3'd0; + vns_new_master_wdata_ready0 <= 1'd0; + vns_new_master_wdata_ready1 <= 1'd0; + vns_new_master_wdata_ready2 <= 1'd0; + vns_new_master_rdata_valid0 <= 1'd0; + vns_new_master_rdata_valid1 <= 1'd0; + vns_new_master_rdata_valid2 <= 1'd0; + vns_new_master_rdata_valid3 <= 1'd0; + vns_new_master_rdata_valid4 <= 1'd0; + vns_new_master_rdata_valid5 <= 1'd0; + vns_new_master_rdata_valid6 <= 1'd0; + vns_new_master_rdata_valid7 <= 1'd0; + vns_new_master_rdata_valid8 <= 1'd0; + vns_new_master_rdata_valid9 <= 1'd0; + vns_fullmemorywe_state <= 3'd0; + vns_litedramwishbone2native_state <= 2'd0; + vns_liteethmacsramwriter_state <= 3'd0; + vns_liteethmacsramreader_state <= 2'd0; + vns_netsoc_grant <= 1'd0; + vns_netsoc_slave_sel_r <= 6'd0; + vns_netsoc_count <= 20'd1000000; + vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= 8'd0; + vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= 8'd0; + vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= 8'd0; + vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= 8'd0; + vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= 8'd0; + vns_netsoc_csrbankarray_sel_r <= 1'd0; + vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= 8'd0; + vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= 8'd0; + vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= 8'd0; + vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= 8'd0; + end + vns_xilinxmultiregimpl0_regs0 <= serial_rx; + vns_xilinxmultiregimpl0_regs1 <= vns_xilinxmultiregimpl0_regs0; + vns_xilinxmultiregimpl1_regs0 <= soc_data_r; + vns_xilinxmultiregimpl1_regs1 <= vns_xilinxmultiregimpl1_regs0; + vns_xilinxmultiregimpl2_regs0 <= soc_ps_preamble_error_toggle_i; + vns_xilinxmultiregimpl2_regs1 <= vns_xilinxmultiregimpl2_regs0; + vns_xilinxmultiregimpl3_regs0 <= soc_ps_crc_error_toggle_i; + vns_xilinxmultiregimpl3_regs1 <= vns_xilinxmultiregimpl3_regs0; + vns_xilinxmultiregimpl5_regs0 <= soc_tx_cdc_graycounter1_q; + vns_xilinxmultiregimpl5_regs1 <= vns_xilinxmultiregimpl5_regs0; + vns_xilinxmultiregimpl6_regs0 <= soc_rx_cdc_graycounter0_q; + vns_xilinxmultiregimpl6_regs1 <= vns_xilinxmultiregimpl6_regs0; +end + +reg [31:0] mem[0:16383]; +reg [31:0] memdat; +always @(posedge sys_clk) begin + memdat <= mem[soc_netsoc_rom_adr]; +end + +assign soc_netsoc_rom_dat_r = memdat; + +initial begin + $readmemh("mem.init", mem); +end + +reg [31:0] mem_1[0:8191]; +reg [12:0] memadr; +always @(posedge sys_clk) begin + if (soc_netsoc_sram_we[0]) + mem_1[soc_netsoc_sram_adr][7:0] <= soc_netsoc_sram_dat_w[7:0]; + if (soc_netsoc_sram_we[1]) + mem_1[soc_netsoc_sram_adr][15:8] <= soc_netsoc_sram_dat_w[15:8]; + if (soc_netsoc_sram_we[2]) + mem_1[soc_netsoc_sram_adr][23:16] <= soc_netsoc_sram_dat_w[23:16]; + if (soc_netsoc_sram_we[3]) + mem_1[soc_netsoc_sram_adr][31:24] <= soc_netsoc_sram_dat_w[31:24]; + memadr <= soc_netsoc_sram_adr; +end + +assign soc_netsoc_sram_dat_r = mem_1[memadr]; + +initial begin + $readmemh("mem_1.init", mem_1); +end + +reg [9:0] storage[0:15]; +reg [9:0] memdat_1; +reg [9:0] memdat_2; +always @(posedge sys_clk) begin + if (soc_netsoc_uart_tx_fifo_wrport_we) + storage[soc_netsoc_uart_tx_fifo_wrport_adr] <= soc_netsoc_uart_tx_fifo_wrport_dat_w; + memdat_1 <= storage[soc_netsoc_uart_tx_fifo_wrport_adr]; +end + +always @(posedge sys_clk) begin + if (soc_netsoc_uart_tx_fifo_rdport_re) + memdat_2 <= storage[soc_netsoc_uart_tx_fifo_rdport_adr]; +end + +assign soc_netsoc_uart_tx_fifo_wrport_dat_r = memdat_1; +assign soc_netsoc_uart_tx_fifo_rdport_dat_r = memdat_2; + +reg [9:0] storage_1[0:15]; +reg [9:0] memdat_3; +reg [9:0] memdat_4; +always @(posedge sys_clk) begin + if (soc_netsoc_uart_rx_fifo_wrport_we) + storage_1[soc_netsoc_uart_rx_fifo_wrport_adr] <= soc_netsoc_uart_rx_fifo_wrport_dat_w; + memdat_3 <= storage_1[soc_netsoc_uart_rx_fifo_wrport_adr]; +end + +always @(posedge sys_clk) begin + if (soc_netsoc_uart_rx_fifo_rdport_re) + memdat_4 <= storage_1[soc_netsoc_uart_rx_fifo_rdport_adr]; +end + +assign soc_netsoc_uart_rx_fifo_wrport_dat_r = memdat_3; +assign soc_netsoc_uart_rx_fifo_rdport_dat_r = memdat_4; + +reg [7:0] mem_2[0:6]; +reg [2:0] memadr_1; +always @(posedge sys_clk) begin + memadr_1 <= vns_netsoc_csrbankarray_adr; +end + +assign vns_netsoc_csrbankarray_dat_r = mem_2[memadr_1]; + +initial begin + $readmemh("mem_2.init", mem_2); +end + +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(5'd20), + .CLKOUT0_PHASE(1'd0), + .CLKOUT1_DIVIDE(3'd5), + .CLKOUT1_PHASE(1'd0), + .CLKOUT2_DIVIDE(3'd5), + .CLKOUT2_PHASE(90000), + .CLKOUT3_DIVIDE(3'd6), + .CLKOUT3_PHASE(1'd0), + .CLKOUT4_DIVIDE(6'd48), + .CLKOUT5_PHASE(1'd0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(soc_pll_fb), + .CLKIN1(clk100), + .CLKFBOUT(soc_pll_fb), + .CLKOUT0(sys_clk), + .CLKOUT1(sys4x_clk), + .CLKOUT2(sys4x_dqs_clk), + .CLKOUT3(clk200_clk), + .CLKOUT4(eth_ref_clk_obuf), + .LOCKED(soc_pll_locked) +); + +OBUF clk_eth_buf(.I(eth_ref_clk_obuf), .O(eth_ref_clk)); + +(* LOC="IDELAYCTRL_X1Y0" *) +IDELAYCTRL IDELAYCTRL( + .REFCLK(clk200_clk), + .RST(soc_ic_reset), + .RDY(idelayctl_rdy) +); + +reg [31:0] mem_3[0:4095]; +reg [11:0] memadr_2; +always @(posedge sys_clk) begin + if (soc_emulator_ram_we[0]) + mem_3[soc_emulator_ram_adr][7:0] <= soc_emulator_ram_dat_w[7:0]; + if (soc_emulator_ram_we[1]) + mem_3[soc_emulator_ram_adr][15:8] <= soc_emulator_ram_dat_w[15:8]; + if (soc_emulator_ram_we[2]) + mem_3[soc_emulator_ram_adr][23:16] <= soc_emulator_ram_dat_w[23:16]; + if (soc_emulator_ram_we[3]) + mem_3[soc_emulator_ram_adr][31:24] <= soc_emulator_ram_dat_w[31:24]; + memadr_2 <= soc_emulator_ram_adr; +end + +assign soc_emulator_ram_dat_r = mem_3[memadr_2]; + +wire tq; + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(1'd0), + .D2(1'd1), + .D3(1'd0), + .D4(1'd1), + .D5(1'd0), + .D6(1'd1), + .D7(1'd0), + .D8(1'd1), + .OCE(1'd1), + .RST(sys_rst), + .OQ(soc_a7ddrphy_sd_clk_se_nodelay), + .TQ(tq), + .TCE(1'd1), + .T1(1'b0) +); + +OBUFTDS OBUFTDS_0( + .I(soc_a7ddrphy_sd_clk_se_nodelay), + .O(ddram_clk_p), + .OB(ddram_clk_n), + .T(tq) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_1 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[0]), + .D2(soc_a7ddrphy_dfi_p0_address[0]), + .D3(soc_a7ddrphy_dfi_p1_address[0]), + .D4(soc_a7ddrphy_dfi_p1_address[0]), + .D5(soc_a7ddrphy_dfi_p2_address[0]), + .D6(soc_a7ddrphy_dfi_p2_address[0]), + .D7(soc_a7ddrphy_dfi_p3_address[0]), + .D8(soc_a7ddrphy_dfi_p3_address[0]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[0]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_2 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[1]), + .D2(soc_a7ddrphy_dfi_p0_address[1]), + .D3(soc_a7ddrphy_dfi_p1_address[1]), + .D4(soc_a7ddrphy_dfi_p1_address[1]), + .D5(soc_a7ddrphy_dfi_p2_address[1]), + .D6(soc_a7ddrphy_dfi_p2_address[1]), + .D7(soc_a7ddrphy_dfi_p3_address[1]), + .D8(soc_a7ddrphy_dfi_p3_address[1]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[1]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_3 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[2]), + .D2(soc_a7ddrphy_dfi_p0_address[2]), + .D3(soc_a7ddrphy_dfi_p1_address[2]), + .D4(soc_a7ddrphy_dfi_p1_address[2]), + .D5(soc_a7ddrphy_dfi_p2_address[2]), + .D6(soc_a7ddrphy_dfi_p2_address[2]), + .D7(soc_a7ddrphy_dfi_p3_address[2]), + .D8(soc_a7ddrphy_dfi_p3_address[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[2]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_4 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[3]), + .D2(soc_a7ddrphy_dfi_p0_address[3]), + .D3(soc_a7ddrphy_dfi_p1_address[3]), + .D4(soc_a7ddrphy_dfi_p1_address[3]), + .D5(soc_a7ddrphy_dfi_p2_address[3]), + .D6(soc_a7ddrphy_dfi_p2_address[3]), + .D7(soc_a7ddrphy_dfi_p3_address[3]), + .D8(soc_a7ddrphy_dfi_p3_address[3]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[3]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_5 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[4]), + .D2(soc_a7ddrphy_dfi_p0_address[4]), + .D3(soc_a7ddrphy_dfi_p1_address[4]), + .D4(soc_a7ddrphy_dfi_p1_address[4]), + .D5(soc_a7ddrphy_dfi_p2_address[4]), + .D6(soc_a7ddrphy_dfi_p2_address[4]), + .D7(soc_a7ddrphy_dfi_p3_address[4]), + .D8(soc_a7ddrphy_dfi_p3_address[4]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[4]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_6 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[5]), + .D2(soc_a7ddrphy_dfi_p0_address[5]), + .D3(soc_a7ddrphy_dfi_p1_address[5]), + .D4(soc_a7ddrphy_dfi_p1_address[5]), + .D5(soc_a7ddrphy_dfi_p2_address[5]), + .D6(soc_a7ddrphy_dfi_p2_address[5]), + .D7(soc_a7ddrphy_dfi_p3_address[5]), + .D8(soc_a7ddrphy_dfi_p3_address[5]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[5]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_7 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[6]), + .D2(soc_a7ddrphy_dfi_p0_address[6]), + .D3(soc_a7ddrphy_dfi_p1_address[6]), + .D4(soc_a7ddrphy_dfi_p1_address[6]), + .D5(soc_a7ddrphy_dfi_p2_address[6]), + .D6(soc_a7ddrphy_dfi_p2_address[6]), + .D7(soc_a7ddrphy_dfi_p3_address[6]), + .D8(soc_a7ddrphy_dfi_p3_address[6]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[6]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_8 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[7]), + .D2(soc_a7ddrphy_dfi_p0_address[7]), + .D3(soc_a7ddrphy_dfi_p1_address[7]), + .D4(soc_a7ddrphy_dfi_p1_address[7]), + .D5(soc_a7ddrphy_dfi_p2_address[7]), + .D6(soc_a7ddrphy_dfi_p2_address[7]), + .D7(soc_a7ddrphy_dfi_p3_address[7]), + .D8(soc_a7ddrphy_dfi_p3_address[7]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[7]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_9 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[8]), + .D2(soc_a7ddrphy_dfi_p0_address[8]), + .D3(soc_a7ddrphy_dfi_p1_address[8]), + .D4(soc_a7ddrphy_dfi_p1_address[8]), + .D5(soc_a7ddrphy_dfi_p2_address[8]), + .D6(soc_a7ddrphy_dfi_p2_address[8]), + .D7(soc_a7ddrphy_dfi_p3_address[8]), + .D8(soc_a7ddrphy_dfi_p3_address[8]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[8]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_10 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[9]), + .D2(soc_a7ddrphy_dfi_p0_address[9]), + .D3(soc_a7ddrphy_dfi_p1_address[9]), + .D4(soc_a7ddrphy_dfi_p1_address[9]), + .D5(soc_a7ddrphy_dfi_p2_address[9]), + .D6(soc_a7ddrphy_dfi_p2_address[9]), + .D7(soc_a7ddrphy_dfi_p3_address[9]), + .D8(soc_a7ddrphy_dfi_p3_address[9]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[9]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_11 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[10]), + .D2(soc_a7ddrphy_dfi_p0_address[10]), + .D3(soc_a7ddrphy_dfi_p1_address[10]), + .D4(soc_a7ddrphy_dfi_p1_address[10]), + .D5(soc_a7ddrphy_dfi_p2_address[10]), + .D6(soc_a7ddrphy_dfi_p2_address[10]), + .D7(soc_a7ddrphy_dfi_p3_address[10]), + .D8(soc_a7ddrphy_dfi_p3_address[10]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[10]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_12 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[11]), + .D2(soc_a7ddrphy_dfi_p0_address[11]), + .D3(soc_a7ddrphy_dfi_p1_address[11]), + .D4(soc_a7ddrphy_dfi_p1_address[11]), + .D5(soc_a7ddrphy_dfi_p2_address[11]), + .D6(soc_a7ddrphy_dfi_p2_address[11]), + .D7(soc_a7ddrphy_dfi_p3_address[11]), + .D8(soc_a7ddrphy_dfi_p3_address[11]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[11]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_13 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[12]), + .D2(soc_a7ddrphy_dfi_p0_address[12]), + .D3(soc_a7ddrphy_dfi_p1_address[12]), + .D4(soc_a7ddrphy_dfi_p1_address[12]), + .D5(soc_a7ddrphy_dfi_p2_address[12]), + .D6(soc_a7ddrphy_dfi_p2_address[12]), + .D7(soc_a7ddrphy_dfi_p3_address[12]), + .D8(soc_a7ddrphy_dfi_p3_address[12]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[12]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_14 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_address[13]), + .D2(soc_a7ddrphy_dfi_p0_address[13]), + .D3(soc_a7ddrphy_dfi_p1_address[13]), + .D4(soc_a7ddrphy_dfi_p1_address[13]), + .D5(soc_a7ddrphy_dfi_p2_address[13]), + .D6(soc_a7ddrphy_dfi_p2_address[13]), + .D7(soc_a7ddrphy_dfi_p3_address[13]), + .D8(soc_a7ddrphy_dfi_p3_address[13]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a[13]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_15 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_bank[0]), + .D2(soc_a7ddrphy_dfi_p0_bank[0]), + .D3(soc_a7ddrphy_dfi_p1_bank[0]), + .D4(soc_a7ddrphy_dfi_p1_bank[0]), + .D5(soc_a7ddrphy_dfi_p2_bank[0]), + .D6(soc_a7ddrphy_dfi_p2_bank[0]), + .D7(soc_a7ddrphy_dfi_p3_bank[0]), + .D8(soc_a7ddrphy_dfi_p3_bank[0]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba[0]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_16 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_bank[1]), + .D2(soc_a7ddrphy_dfi_p0_bank[1]), + .D3(soc_a7ddrphy_dfi_p1_bank[1]), + .D4(soc_a7ddrphy_dfi_p1_bank[1]), + .D5(soc_a7ddrphy_dfi_p2_bank[1]), + .D6(soc_a7ddrphy_dfi_p2_bank[1]), + .D7(soc_a7ddrphy_dfi_p3_bank[1]), + .D8(soc_a7ddrphy_dfi_p3_bank[1]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba[1]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_17 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_bank[2]), + .D2(soc_a7ddrphy_dfi_p0_bank[2]), + .D3(soc_a7ddrphy_dfi_p1_bank[2]), + .D4(soc_a7ddrphy_dfi_p1_bank[2]), + .D5(soc_a7ddrphy_dfi_p2_bank[2]), + .D6(soc_a7ddrphy_dfi_p2_bank[2]), + .D7(soc_a7ddrphy_dfi_p3_bank[2]), + .D8(soc_a7ddrphy_dfi_p3_bank[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba[2]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_18 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_ras_n), + .D2(soc_a7ddrphy_dfi_p0_ras_n), + .D3(soc_a7ddrphy_dfi_p1_ras_n), + .D4(soc_a7ddrphy_dfi_p1_ras_n), + .D5(soc_a7ddrphy_dfi_p2_ras_n), + .D6(soc_a7ddrphy_dfi_p2_ras_n), + .D7(soc_a7ddrphy_dfi_p3_ras_n), + .D8(soc_a7ddrphy_dfi_p3_ras_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ras_n) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_19 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_cas_n), + .D2(soc_a7ddrphy_dfi_p0_cas_n), + .D3(soc_a7ddrphy_dfi_p1_cas_n), + .D4(soc_a7ddrphy_dfi_p1_cas_n), + .D5(soc_a7ddrphy_dfi_p2_cas_n), + .D6(soc_a7ddrphy_dfi_p2_cas_n), + .D7(soc_a7ddrphy_dfi_p3_cas_n), + .D8(soc_a7ddrphy_dfi_p3_cas_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cas_n) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_20 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_we_n), + .D2(soc_a7ddrphy_dfi_p0_we_n), + .D3(soc_a7ddrphy_dfi_p1_we_n), + .D4(soc_a7ddrphy_dfi_p1_we_n), + .D5(soc_a7ddrphy_dfi_p2_we_n), + .D6(soc_a7ddrphy_dfi_p2_we_n), + .D7(soc_a7ddrphy_dfi_p3_we_n), + .D8(soc_a7ddrphy_dfi_p3_we_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_we_n) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_21 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_cke), + .D2(soc_a7ddrphy_dfi_p0_cke), + .D3(soc_a7ddrphy_dfi_p1_cke), + .D4(soc_a7ddrphy_dfi_p1_cke), + .D5(soc_a7ddrphy_dfi_p2_cke), + .D6(soc_a7ddrphy_dfi_p2_cke), + .D7(soc_a7ddrphy_dfi_p3_cke), + .D8(soc_a7ddrphy_dfi_p3_cke), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cke) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_22 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_odt), + .D2(soc_a7ddrphy_dfi_p0_odt), + .D3(soc_a7ddrphy_dfi_p1_odt), + .D4(soc_a7ddrphy_dfi_p1_odt), + .D5(soc_a7ddrphy_dfi_p2_odt), + .D6(soc_a7ddrphy_dfi_p2_odt), + .D7(soc_a7ddrphy_dfi_p3_odt), + .D8(soc_a7ddrphy_dfi_p3_odt), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_odt) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_23 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_reset_n), + .D2(soc_a7ddrphy_dfi_p0_reset_n), + .D3(soc_a7ddrphy_dfi_p1_reset_n), + .D4(soc_a7ddrphy_dfi_p1_reset_n), + .D5(soc_a7ddrphy_dfi_p2_reset_n), + .D6(soc_a7ddrphy_dfi_p2_reset_n), + .D7(soc_a7ddrphy_dfi_p3_reset_n), + .D8(soc_a7ddrphy_dfi_p3_reset_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_reset_n) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_24 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_cs_n), + .D2(soc_a7ddrphy_dfi_p0_cs_n), + .D3(soc_a7ddrphy_dfi_p1_cs_n), + .D4(soc_a7ddrphy_dfi_p1_cs_n), + .D5(soc_a7ddrphy_dfi_p2_cs_n), + .D6(soc_a7ddrphy_dfi_p2_cs_n), + .D7(soc_a7ddrphy_dfi_p3_cs_n), + .D8(soc_a7ddrphy_dfi_p3_cs_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cs_n) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_25 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata_mask[0]), + .D2(soc_a7ddrphy_dfi_p0_wrdata_mask[2]), + .D3(soc_a7ddrphy_dfi_p1_wrdata_mask[0]), + .D4(soc_a7ddrphy_dfi_p1_wrdata_mask[2]), + .D5(soc_a7ddrphy_dfi_p2_wrdata_mask[0]), + .D6(soc_a7ddrphy_dfi_p2_wrdata_mask[2]), + .D7(soc_a7ddrphy_dfi_p3_wrdata_mask[0]), + .D8(soc_a7ddrphy_dfi_p3_wrdata_mask[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_dm[0]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_26 ( + .CLK(sys4x_dqs_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dqs_serdes_pattern[0]), + .D2(soc_a7ddrphy_dqs_serdes_pattern[1]), + .D3(soc_a7ddrphy_dqs_serdes_pattern[2]), + .D4(soc_a7ddrphy_dqs_serdes_pattern[3]), + .D5(soc_a7ddrphy_dqs_serdes_pattern[4]), + .D6(soc_a7ddrphy_dqs_serdes_pattern[5]), + .D7(soc_a7ddrphy_dqs_serdes_pattern[6]), + .D8(soc_a7ddrphy_dqs_serdes_pattern[7]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dqs)), + .TCE(1'd1), + .OFB(soc_a7ddrphy0), + .OQ(soc_a7ddrphy_dqs_nodelay0), + .TQ(soc_a7ddrphy_dqs_t0) +); + +OBUFTDS OBUFTDS( + .I(soc_a7ddrphy_dqs_nodelay0), + .T(soc_a7ddrphy_dqs_t0), + .O(ddram_dqs_p[0]), + .OB(ddram_dqs_n[0]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_27 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata_mask[1]), + .D2(soc_a7ddrphy_dfi_p0_wrdata_mask[3]), + .D3(soc_a7ddrphy_dfi_p1_wrdata_mask[1]), + .D4(soc_a7ddrphy_dfi_p1_wrdata_mask[3]), + .D5(soc_a7ddrphy_dfi_p2_wrdata_mask[1]), + .D6(soc_a7ddrphy_dfi_p2_wrdata_mask[3]), + .D7(soc_a7ddrphy_dfi_p3_wrdata_mask[1]), + .D8(soc_a7ddrphy_dfi_p3_wrdata_mask[3]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_dm[1]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_28 ( + .CLK(sys4x_dqs_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dqs_serdes_pattern[0]), + .D2(soc_a7ddrphy_dqs_serdes_pattern[1]), + .D3(soc_a7ddrphy_dqs_serdes_pattern[2]), + .D4(soc_a7ddrphy_dqs_serdes_pattern[3]), + .D5(soc_a7ddrphy_dqs_serdes_pattern[4]), + .D6(soc_a7ddrphy_dqs_serdes_pattern[5]), + .D7(soc_a7ddrphy_dqs_serdes_pattern[6]), + .D8(soc_a7ddrphy_dqs_serdes_pattern[7]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dqs)), + .TCE(1'd1), + .OFB(soc_a7ddrphy1), + .OQ(soc_a7ddrphy_dqs_nodelay1), + .TQ(soc_a7ddrphy_dqs_t1) +); + +OBUFTDS OBUFTDS_1( + .I(soc_a7ddrphy_dqs_nodelay1), + .T(soc_a7ddrphy_dqs_t1), + .O(ddram_dqs_p[1]), + .OB(ddram_dqs_n[1]) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_29 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[0]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[16]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[0]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[16]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[0]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[16]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[0]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[16]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay0), + .TQ(soc_a7ddrphy_dq_t0) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed0), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data0[7]), + .Q2(soc_a7ddrphy_dq_i_data0[6]), + .Q3(soc_a7ddrphy_dq_i_data0[5]), + .Q4(soc_a7ddrphy_dq_i_data0[4]), + .Q5(soc_a7ddrphy_dq_i_data0[3]), + .Q6(soc_a7ddrphy_dq_i_data0[2]), + .Q7(soc_a7ddrphy_dq_i_data0[1]), + .Q8(soc_a7ddrphy_dq_i_data0[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay0), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed0) +); + +IOBUF IOBUF( + .I(soc_a7ddrphy_dq_o_nodelay0), + .T(soc_a7ddrphy_dq_t0), + .IO(ddram_dq[0]), + .O(soc_a7ddrphy_dq_i_nodelay0) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_30 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[1]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[17]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[1]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[17]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[1]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[17]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[1]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[17]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay1), + .TQ(soc_a7ddrphy_dq_t1) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_1 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed1), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data1[7]), + .Q2(soc_a7ddrphy_dq_i_data1[6]), + .Q3(soc_a7ddrphy_dq_i_data1[5]), + .Q4(soc_a7ddrphy_dq_i_data1[4]), + .Q5(soc_a7ddrphy_dq_i_data1[3]), + .Q6(soc_a7ddrphy_dq_i_data1[2]), + .Q7(soc_a7ddrphy_dq_i_data1[1]), + .Q8(soc_a7ddrphy_dq_i_data1[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_1 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay1), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed1) +); + +IOBUF IOBUF_1( + .I(soc_a7ddrphy_dq_o_nodelay1), + .T(soc_a7ddrphy_dq_t1), + .IO(ddram_dq[1]), + .O(soc_a7ddrphy_dq_i_nodelay1) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_31 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[2]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[18]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[2]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[18]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[2]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[18]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[2]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[18]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay2), + .TQ(soc_a7ddrphy_dq_t2) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_2 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed2), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data2[7]), + .Q2(soc_a7ddrphy_dq_i_data2[6]), + .Q3(soc_a7ddrphy_dq_i_data2[5]), + .Q4(soc_a7ddrphy_dq_i_data2[4]), + .Q5(soc_a7ddrphy_dq_i_data2[3]), + .Q6(soc_a7ddrphy_dq_i_data2[2]), + .Q7(soc_a7ddrphy_dq_i_data2[1]), + .Q8(soc_a7ddrphy_dq_i_data2[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_2 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay2), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed2) +); + +IOBUF IOBUF_2( + .I(soc_a7ddrphy_dq_o_nodelay2), + .T(soc_a7ddrphy_dq_t2), + .IO(ddram_dq[2]), + .O(soc_a7ddrphy_dq_i_nodelay2) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_32 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[3]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[19]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[3]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[19]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[3]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[19]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[3]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[19]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay3), + .TQ(soc_a7ddrphy_dq_t3) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_3 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed3), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data3[7]), + .Q2(soc_a7ddrphy_dq_i_data3[6]), + .Q3(soc_a7ddrphy_dq_i_data3[5]), + .Q4(soc_a7ddrphy_dq_i_data3[4]), + .Q5(soc_a7ddrphy_dq_i_data3[3]), + .Q6(soc_a7ddrphy_dq_i_data3[2]), + .Q7(soc_a7ddrphy_dq_i_data3[1]), + .Q8(soc_a7ddrphy_dq_i_data3[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_3 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay3), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed3) +); + +IOBUF IOBUF_3( + .I(soc_a7ddrphy_dq_o_nodelay3), + .T(soc_a7ddrphy_dq_t3), + .IO(ddram_dq[3]), + .O(soc_a7ddrphy_dq_i_nodelay3) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_33 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[4]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[20]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[4]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[20]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[4]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[20]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[4]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[20]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay4), + .TQ(soc_a7ddrphy_dq_t4) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_4 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed4), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data4[7]), + .Q2(soc_a7ddrphy_dq_i_data4[6]), + .Q3(soc_a7ddrphy_dq_i_data4[5]), + .Q4(soc_a7ddrphy_dq_i_data4[4]), + .Q5(soc_a7ddrphy_dq_i_data4[3]), + .Q6(soc_a7ddrphy_dq_i_data4[2]), + .Q7(soc_a7ddrphy_dq_i_data4[1]), + .Q8(soc_a7ddrphy_dq_i_data4[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_4 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay4), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed4) +); + +IOBUF IOBUF_4( + .I(soc_a7ddrphy_dq_o_nodelay4), + .T(soc_a7ddrphy_dq_t4), + .IO(ddram_dq[4]), + .O(soc_a7ddrphy_dq_i_nodelay4) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_34 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[5]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[21]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[5]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[21]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[5]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[21]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[5]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[21]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay5), + .TQ(soc_a7ddrphy_dq_t5) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_5 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed5), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data5[7]), + .Q2(soc_a7ddrphy_dq_i_data5[6]), + .Q3(soc_a7ddrphy_dq_i_data5[5]), + .Q4(soc_a7ddrphy_dq_i_data5[4]), + .Q5(soc_a7ddrphy_dq_i_data5[3]), + .Q6(soc_a7ddrphy_dq_i_data5[2]), + .Q7(soc_a7ddrphy_dq_i_data5[1]), + .Q8(soc_a7ddrphy_dq_i_data5[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_5 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay5), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed5) +); + +IOBUF IOBUF_5( + .I(soc_a7ddrphy_dq_o_nodelay5), + .T(soc_a7ddrphy_dq_t5), + .IO(ddram_dq[5]), + .O(soc_a7ddrphy_dq_i_nodelay5) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_35 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[6]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[22]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[6]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[22]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[6]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[22]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[6]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[22]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay6), + .TQ(soc_a7ddrphy_dq_t6) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_6 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed6), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data6[7]), + .Q2(soc_a7ddrphy_dq_i_data6[6]), + .Q3(soc_a7ddrphy_dq_i_data6[5]), + .Q4(soc_a7ddrphy_dq_i_data6[4]), + .Q5(soc_a7ddrphy_dq_i_data6[3]), + .Q6(soc_a7ddrphy_dq_i_data6[2]), + .Q7(soc_a7ddrphy_dq_i_data6[1]), + .Q8(soc_a7ddrphy_dq_i_data6[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_6 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay6), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed6) +); + +IOBUF IOBUF_6( + .I(soc_a7ddrphy_dq_o_nodelay6), + .T(soc_a7ddrphy_dq_t6), + .IO(ddram_dq[6]), + .O(soc_a7ddrphy_dq_i_nodelay6) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_36 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[7]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[23]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[7]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[23]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[7]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[23]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[7]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[23]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay7), + .TQ(soc_a7ddrphy_dq_t7) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_7 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed7), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data7[7]), + .Q2(soc_a7ddrphy_dq_i_data7[6]), + .Q3(soc_a7ddrphy_dq_i_data7[5]), + .Q4(soc_a7ddrphy_dq_i_data7[4]), + .Q5(soc_a7ddrphy_dq_i_data7[3]), + .Q6(soc_a7ddrphy_dq_i_data7[2]), + .Q7(soc_a7ddrphy_dq_i_data7[1]), + .Q8(soc_a7ddrphy_dq_i_data7[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_7 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay7), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed7) +); + +IOBUF IOBUF_7( + .I(soc_a7ddrphy_dq_o_nodelay7), + .T(soc_a7ddrphy_dq_t7), + .IO(ddram_dq[7]), + .O(soc_a7ddrphy_dq_i_nodelay7) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_37 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[8]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[24]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[8]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[24]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[8]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[24]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[8]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[24]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay8), + .TQ(soc_a7ddrphy_dq_t8) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_8 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed8), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data8[7]), + .Q2(soc_a7ddrphy_dq_i_data8[6]), + .Q3(soc_a7ddrphy_dq_i_data8[5]), + .Q4(soc_a7ddrphy_dq_i_data8[4]), + .Q5(soc_a7ddrphy_dq_i_data8[3]), + .Q6(soc_a7ddrphy_dq_i_data8[2]), + .Q7(soc_a7ddrphy_dq_i_data8[1]), + .Q8(soc_a7ddrphy_dq_i_data8[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_8 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay8), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed8) +); + +IOBUF IOBUF_8( + .I(soc_a7ddrphy_dq_o_nodelay8), + .T(soc_a7ddrphy_dq_t8), + .IO(ddram_dq[8]), + .O(soc_a7ddrphy_dq_i_nodelay8) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_38 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[9]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[25]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[9]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[25]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[9]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[25]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[9]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[25]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay9), + .TQ(soc_a7ddrphy_dq_t9) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_9 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed9), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data9[7]), + .Q2(soc_a7ddrphy_dq_i_data9[6]), + .Q3(soc_a7ddrphy_dq_i_data9[5]), + .Q4(soc_a7ddrphy_dq_i_data9[4]), + .Q5(soc_a7ddrphy_dq_i_data9[3]), + .Q6(soc_a7ddrphy_dq_i_data9[2]), + .Q7(soc_a7ddrphy_dq_i_data9[1]), + .Q8(soc_a7ddrphy_dq_i_data9[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_9 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay9), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed9) +); + +IOBUF IOBUF_9( + .I(soc_a7ddrphy_dq_o_nodelay9), + .T(soc_a7ddrphy_dq_t9), + .IO(ddram_dq[9]), + .O(soc_a7ddrphy_dq_i_nodelay9) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_39 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[10]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[26]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[10]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[26]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[10]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[26]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[10]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[26]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay10), + .TQ(soc_a7ddrphy_dq_t10) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_10 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed10), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data10[7]), + .Q2(soc_a7ddrphy_dq_i_data10[6]), + .Q3(soc_a7ddrphy_dq_i_data10[5]), + .Q4(soc_a7ddrphy_dq_i_data10[4]), + .Q5(soc_a7ddrphy_dq_i_data10[3]), + .Q6(soc_a7ddrphy_dq_i_data10[2]), + .Q7(soc_a7ddrphy_dq_i_data10[1]), + .Q8(soc_a7ddrphy_dq_i_data10[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_10 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay10), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed10) +); + +IOBUF IOBUF_10( + .I(soc_a7ddrphy_dq_o_nodelay10), + .T(soc_a7ddrphy_dq_t10), + .IO(ddram_dq[10]), + .O(soc_a7ddrphy_dq_i_nodelay10) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_40 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[11]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[27]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[11]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[27]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[11]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[27]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[11]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[27]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay11), + .TQ(soc_a7ddrphy_dq_t11) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_11 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed11), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data11[7]), + .Q2(soc_a7ddrphy_dq_i_data11[6]), + .Q3(soc_a7ddrphy_dq_i_data11[5]), + .Q4(soc_a7ddrphy_dq_i_data11[4]), + .Q5(soc_a7ddrphy_dq_i_data11[3]), + .Q6(soc_a7ddrphy_dq_i_data11[2]), + .Q7(soc_a7ddrphy_dq_i_data11[1]), + .Q8(soc_a7ddrphy_dq_i_data11[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_11 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay11), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed11) +); + +IOBUF IOBUF_11( + .I(soc_a7ddrphy_dq_o_nodelay11), + .T(soc_a7ddrphy_dq_t11), + .IO(ddram_dq[11]), + .O(soc_a7ddrphy_dq_i_nodelay11) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_41 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[12]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[28]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[12]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[28]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[12]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[28]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[12]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[28]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay12), + .TQ(soc_a7ddrphy_dq_t12) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_12 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed12), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data12[7]), + .Q2(soc_a7ddrphy_dq_i_data12[6]), + .Q3(soc_a7ddrphy_dq_i_data12[5]), + .Q4(soc_a7ddrphy_dq_i_data12[4]), + .Q5(soc_a7ddrphy_dq_i_data12[3]), + .Q6(soc_a7ddrphy_dq_i_data12[2]), + .Q7(soc_a7ddrphy_dq_i_data12[1]), + .Q8(soc_a7ddrphy_dq_i_data12[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_12 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay12), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed12) +); + +IOBUF IOBUF_12( + .I(soc_a7ddrphy_dq_o_nodelay12), + .T(soc_a7ddrphy_dq_t12), + .IO(ddram_dq[12]), + .O(soc_a7ddrphy_dq_i_nodelay12) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_42 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[13]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[29]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[13]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[29]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[13]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[29]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[13]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[29]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay13), + .TQ(soc_a7ddrphy_dq_t13) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_13 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed13), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data13[7]), + .Q2(soc_a7ddrphy_dq_i_data13[6]), + .Q3(soc_a7ddrphy_dq_i_data13[5]), + .Q4(soc_a7ddrphy_dq_i_data13[4]), + .Q5(soc_a7ddrphy_dq_i_data13[3]), + .Q6(soc_a7ddrphy_dq_i_data13[2]), + .Q7(soc_a7ddrphy_dq_i_data13[1]), + .Q8(soc_a7ddrphy_dq_i_data13[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_13 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay13), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed13) +); + +IOBUF IOBUF_13( + .I(soc_a7ddrphy_dq_o_nodelay13), + .T(soc_a7ddrphy_dq_t13), + .IO(ddram_dq[13]), + .O(soc_a7ddrphy_dq_i_nodelay13) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_43 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[14]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[30]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[14]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[30]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[14]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[30]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[14]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[30]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay14), + .TQ(soc_a7ddrphy_dq_t14) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_14 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed14), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data14[7]), + .Q2(soc_a7ddrphy_dq_i_data14[6]), + .Q3(soc_a7ddrphy_dq_i_data14[5]), + .Q4(soc_a7ddrphy_dq_i_data14[4]), + .Q5(soc_a7ddrphy_dq_i_data14[3]), + .Q6(soc_a7ddrphy_dq_i_data14[2]), + .Q7(soc_a7ddrphy_dq_i_data14[1]), + .Q8(soc_a7ddrphy_dq_i_data14[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_14 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay14), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed14) +); + +IOBUF IOBUF_14( + .I(soc_a7ddrphy_dq_o_nodelay14), + .T(soc_a7ddrphy_dq_t14), + .IO(ddram_dq[14]), + .O(soc_a7ddrphy_dq_i_nodelay14) +); + +OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) +) OSERDESE2_44 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(soc_a7ddrphy_dfi_p0_wrdata[15]), + .D2(soc_a7ddrphy_dfi_p0_wrdata[31]), + .D3(soc_a7ddrphy_dfi_p1_wrdata[15]), + .D4(soc_a7ddrphy_dfi_p1_wrdata[31]), + .D5(soc_a7ddrphy_dfi_p2_wrdata[15]), + .D6(soc_a7ddrphy_dfi_p2_wrdata[31]), + .D7(soc_a7ddrphy_dfi_p3_wrdata[15]), + .D8(soc_a7ddrphy_dfi_p3_wrdata[31]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~soc_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(soc_a7ddrphy_dq_o_nodelay15), + .TQ(soc_a7ddrphy_dq_t15) +); + +ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") +) ISERDESE2_15 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(soc_a7ddrphy_dq_i_delayed15), + .RST(sys_rst), + .Q1(soc_a7ddrphy_dq_i_data15[7]), + .Q2(soc_a7ddrphy_dq_i_data15[6]), + .Q3(soc_a7ddrphy_dq_i_data15[5]), + .Q4(soc_a7ddrphy_dq_i_data15[4]), + .Q5(soc_a7ddrphy_dq_i_data15[3]), + .Q6(soc_a7ddrphy_dq_i_data15[2]), + .Q7(soc_a7ddrphy_dq_i_data15[1]), + .Q8(soc_a7ddrphy_dq_i_data15[0]) +); + +IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") +) IDELAYE2_15 ( + .C(sys_clk), + .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(soc_a7ddrphy_dq_i_nodelay15), + .INC(1'd1), + .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(soc_a7ddrphy_dq_i_delayed15) +); + +IOBUF IOBUF_15( + .I(soc_a7ddrphy_dq_o_nodelay15), + .T(soc_a7ddrphy_dq_t15), + .IO(ddram_dq[15]), + .O(soc_a7ddrphy_dq_i_nodelay15) +); + +reg [23:0] storage_2[0:7]; +reg [23:0] memdat_5; +always @(posedge sys_clk) begin + if (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we) + storage_2[soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; + memdat_5 <= storage_2[soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r = memdat_5; +assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r = storage_2[soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_3[0:7]; +reg [23:0] memdat_6; +always @(posedge sys_clk) begin + if (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we) + storage_3[soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; + memdat_6 <= storage_3[soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r = memdat_6; +assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r = storage_3[soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_4[0:7]; +reg [23:0] memdat_7; +always @(posedge sys_clk) begin + if (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we) + storage_4[soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; + memdat_7 <= storage_4[soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r = memdat_7; +assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r = storage_4[soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_5[0:7]; +reg [23:0] memdat_8; +always @(posedge sys_clk) begin + if (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we) + storage_5[soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; + memdat_8 <= storage_5[soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r = memdat_8; +assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r = storage_5[soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_6[0:7]; +reg [23:0] memdat_9; +always @(posedge sys_clk) begin + if (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we) + storage_6[soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; + memdat_9 <= storage_6[soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r = memdat_9; +assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r = storage_6[soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_7[0:7]; +reg [23:0] memdat_10; +always @(posedge sys_clk) begin + if (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we) + storage_7[soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; + memdat_10 <= storage_7[soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r = memdat_10; +assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r = storage_7[soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_8[0:7]; +reg [23:0] memdat_11; +always @(posedge sys_clk) begin + if (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we) + storage_8[soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; + memdat_11 <= storage_8[soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r = memdat_11; +assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r = storage_8[soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] storage_9[0:7]; +reg [23:0] memdat_12; +always @(posedge sys_clk) begin + if (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we) + storage_9[soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; + memdat_12 <= storage_9[soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r = memdat_12; +assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r = storage_9[soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr]; + +reg [23:0] tag_mem[0:511]; +reg [8:0] memadr_3; +always @(posedge sys_clk) begin + if (soc_netsoc_tag_port_we) + tag_mem[soc_netsoc_tag_port_adr] <= soc_netsoc_tag_port_dat_w; + memadr_3 <= soc_netsoc_tag_port_adr; +end + +assign soc_netsoc_tag_port_dat_r = tag_mem[memadr_3]; + +assign eth_mdio = soc_data_oe ? soc_data_w : 1'bz; +assign soc_data_r = eth_mdio; + +reg [11:0] storage_10[0:4]; +reg [11:0] memdat_13; +always @(posedge eth_rx_clk) begin + if (soc_crc32_checker_syncfifo_wrport_we) + storage_10[soc_crc32_checker_syncfifo_wrport_adr] <= soc_crc32_checker_syncfifo_wrport_dat_w; + memdat_13 <= storage_10[soc_crc32_checker_syncfifo_wrport_adr]; +end + +always @(posedge eth_rx_clk) begin +end + +assign soc_crc32_checker_syncfifo_wrport_dat_r = memdat_13; +assign soc_crc32_checker_syncfifo_rdport_dat_r = storage_10[soc_crc32_checker_syncfifo_rdport_adr]; + +reg [41:0] storage_11[0:63]; +reg [5:0] memadr_4; +reg [5:0] memadr_5; +always @(posedge sys_clk) begin + if (soc_tx_cdc_wrport_we) + storage_11[soc_tx_cdc_wrport_adr] <= soc_tx_cdc_wrport_dat_w; + memadr_4 <= soc_tx_cdc_wrport_adr; +end + +always @(posedge eth_tx_clk) begin + memadr_5 <= soc_tx_cdc_rdport_adr; +end + +assign soc_tx_cdc_wrport_dat_r = storage_11[memadr_4]; +assign soc_tx_cdc_rdport_dat_r = storage_11[memadr_5]; + +reg [41:0] storage_12[0:63]; +reg [5:0] memadr_6; +reg [5:0] memadr_7; +always @(posedge eth_rx_clk) begin + if (soc_rx_cdc_wrport_we) + storage_12[soc_rx_cdc_wrport_adr] <= soc_rx_cdc_wrport_dat_w; + memadr_6 <= soc_rx_cdc_wrport_adr; +end + +always @(posedge sys_clk) begin + memadr_7 <= soc_rx_cdc_rdport_adr; +end + +assign soc_rx_cdc_wrport_dat_r = storage_12[memadr_6]; +assign soc_rx_cdc_rdport_dat_r = storage_12[memadr_7]; + +reg [34:0] storage_13[0:1]; +reg [34:0] memdat_14; +always @(posedge sys_clk) begin + if (soc_writer_fifo_wrport_we) + storage_13[soc_writer_fifo_wrport_adr] <= soc_writer_fifo_wrport_dat_w; + memdat_14 <= storage_13[soc_writer_fifo_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_writer_fifo_wrport_dat_r = memdat_14; +assign soc_writer_fifo_rdport_dat_r = storage_13[soc_writer_fifo_rdport_adr]; + +reg [31:0] mem_4[0:381]; +reg [8:0] memadr_8; +reg [31:0] memdat_15; +always @(posedge sys_clk) begin + if (soc_writer_memory0_we) + mem_4[soc_writer_memory0_adr] <= soc_writer_memory0_dat_w; + memadr_8 <= soc_writer_memory0_adr; +end + +always @(posedge sys_clk) begin + memdat_15 <= mem_4[soc_sram0_adr0]; +end + +assign soc_writer_memory0_dat_r = mem_4[memadr_8]; +assign soc_sram0_dat_r0 = memdat_15; + +reg [31:0] mem_5[0:381]; +reg [8:0] memadr_9; +reg [31:0] memdat_16; +always @(posedge sys_clk) begin + if (soc_writer_memory1_we) + mem_5[soc_writer_memory1_adr] <= soc_writer_memory1_dat_w; + memadr_9 <= soc_writer_memory1_adr; +end + +always @(posedge sys_clk) begin + memdat_16 <= mem_5[soc_sram1_adr0]; +end + +assign soc_writer_memory1_dat_r = mem_5[memadr_9]; +assign soc_sram1_dat_r0 = memdat_16; + +reg [13:0] storage_14[0:1]; +reg [13:0] memdat_17; +always @(posedge sys_clk) begin + if (soc_reader_fifo_wrport_we) + storage_14[soc_reader_fifo_wrport_adr] <= soc_reader_fifo_wrport_dat_w; + memdat_17 <= storage_14[soc_reader_fifo_wrport_adr]; +end + +always @(posedge sys_clk) begin +end + +assign soc_reader_fifo_wrport_dat_r = memdat_17; +assign soc_reader_fifo_rdport_dat_r = storage_14[soc_reader_fifo_rdport_adr]; + +reg [31:0] mem_6[0:381]; +reg [8:0] memadr_10; +reg [8:0] memadr_11; +always @(posedge sys_clk) begin + memadr_10 <= soc_reader_memory0_adr; +end + +always @(posedge sys_clk) begin + if (soc_sram0_we[0]) + mem_6[soc_sram0_adr1][7:0] <= soc_sram0_dat_w[7:0]; + if (soc_sram0_we[1]) + mem_6[soc_sram0_adr1][15:8] <= soc_sram0_dat_w[15:8]; + if (soc_sram0_we[2]) + mem_6[soc_sram0_adr1][23:16] <= soc_sram0_dat_w[23:16]; + if (soc_sram0_we[3]) + mem_6[soc_sram0_adr1][31:24] <= soc_sram0_dat_w[31:24]; + memadr_11 <= soc_sram0_adr1; +end + +assign soc_reader_memory0_dat_r = mem_6[memadr_10]; +assign soc_sram0_dat_r1 = mem_6[memadr_11]; + +reg [31:0] mem_7[0:381]; +reg [8:0] memadr_12; +reg [8:0] memadr_13; +always @(posedge sys_clk) begin + memadr_12 <= soc_reader_memory1_adr; +end + +always @(posedge sys_clk) begin + if (soc_sram1_we[0]) + mem_7[soc_sram1_adr1][7:0] <= soc_sram1_dat_w[7:0]; + if (soc_sram1_we[1]) + mem_7[soc_sram1_adr1][15:8] <= soc_sram1_dat_w[15:8]; + if (soc_sram1_we[2]) + mem_7[soc_sram1_adr1][23:16] <= soc_sram1_dat_w[23:16]; + if (soc_sram1_we[3]) + mem_7[soc_sram1_adr1][31:24] <= soc_sram1_dat_w[31:24]; + memadr_13 <= soc_sram1_adr1; +end + +assign soc_reader_memory1_dat_r = mem_7[memadr_12]; +assign soc_sram1_dat_r1 = mem_7[memadr_13]; + +VexRiscv VexRiscv( + .clk(sys_clk), + .dBusWishbone_ACK(soc_netsoc_cpu_dbus_ack), + .dBusWishbone_DAT_MISO(soc_netsoc_cpu_dbus_dat_r), + .dBusWishbone_ERR(soc_netsoc_cpu_dbus_err), + .externalInterruptArray(soc_netsoc_cpu_interrupt0), + .externalResetVector(1'd0), + .iBusWishbone_ACK(soc_netsoc_cpu_ibus_ack), + .iBusWishbone_DAT_MISO(soc_netsoc_cpu_ibus_dat_r), + .iBusWishbone_ERR(soc_netsoc_cpu_ibus_err), + .reset((sys_rst | soc_netsoc_cpu_reset)), + .softwareInterrupt(1'd0), + .timerInterrupt(soc_netsoc_cpu_interrupt1), + .dBusWishbone_ADR(soc_netsoc_cpu_dbus_adr), + .dBusWishbone_BTE(soc_netsoc_cpu_dbus_bte), + .dBusWishbone_CTI(soc_netsoc_cpu_dbus_cti), + .dBusWishbone_CYC(soc_netsoc_cpu_dbus_cyc), + .dBusWishbone_DAT_MOSI(soc_netsoc_cpu_dbus_dat_w), + .dBusWishbone_SEL(soc_netsoc_cpu_dbus_sel), + .dBusWishbone_STB(soc_netsoc_cpu_dbus_stb), + .dBusWishbone_WE(soc_netsoc_cpu_dbus_we), + .iBusWishbone_ADR(soc_netsoc_cpu_ibus_adr), + .iBusWishbone_BTE(soc_netsoc_cpu_ibus_bte), + .iBusWishbone_CTI(soc_netsoc_cpu_ibus_cti), + .iBusWishbone_CYC(soc_netsoc_cpu_ibus_cyc), + .iBusWishbone_DAT_MOSI(soc_netsoc_cpu_ibus_dat_w), + .iBusWishbone_SEL(soc_netsoc_cpu_ibus_sel), + .iBusWishbone_STB(soc_netsoc_cpu_ibus_stb), + .iBusWishbone_WE(soc_netsoc_cpu_ibus_we) +); + +reg [7:0] data_mem_grain0[0:511]; +reg [8:0] memadr_14; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[0]) + data_mem_grain0[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[7:0]; + memadr_14 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[7:0] = data_mem_grain0[memadr_14]; + +reg [7:0] data_mem_grain1[0:511]; +reg [8:0] memadr_15; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[1]) + data_mem_grain1[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[15:8]; + memadr_15 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[15:8] = data_mem_grain1[memadr_15]; + +reg [7:0] data_mem_grain2[0:511]; +reg [8:0] memadr_16; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[2]) + data_mem_grain2[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[23:16]; + memadr_16 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[23:16] = data_mem_grain2[memadr_16]; + +reg [7:0] data_mem_grain3[0:511]; +reg [8:0] memadr_17; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[3]) + data_mem_grain3[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[31:24]; + memadr_17 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[31:24] = data_mem_grain3[memadr_17]; + +reg [7:0] data_mem_grain4[0:511]; +reg [8:0] memadr_18; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[4]) + data_mem_grain4[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[39:32]; + memadr_18 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[39:32] = data_mem_grain4[memadr_18]; + +reg [7:0] data_mem_grain5[0:511]; +reg [8:0] memadr_19; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[5]) + data_mem_grain5[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[47:40]; + memadr_19 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[47:40] = data_mem_grain5[memadr_19]; + +reg [7:0] data_mem_grain6[0:511]; +reg [8:0] memadr_20; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[6]) + data_mem_grain6[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[55:48]; + memadr_20 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[55:48] = data_mem_grain6[memadr_20]; + +reg [7:0] data_mem_grain7[0:511]; +reg [8:0] memadr_21; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[7]) + data_mem_grain7[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[63:56]; + memadr_21 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[63:56] = data_mem_grain7[memadr_21]; + +reg [7:0] data_mem_grain8[0:511]; +reg [8:0] memadr_22; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[8]) + data_mem_grain8[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[71:64]; + memadr_22 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[71:64] = data_mem_grain8[memadr_22]; + +reg [7:0] data_mem_grain9[0:511]; +reg [8:0] memadr_23; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[9]) + data_mem_grain9[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[79:72]; + memadr_23 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[79:72] = data_mem_grain9[memadr_23]; + +reg [7:0] data_mem_grain10[0:511]; +reg [8:0] memadr_24; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[10]) + data_mem_grain10[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[87:80]; + memadr_24 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[87:80] = data_mem_grain10[memadr_24]; + +reg [7:0] data_mem_grain11[0:511]; +reg [8:0] memadr_25; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[11]) + data_mem_grain11[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[95:88]; + memadr_25 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[95:88] = data_mem_grain11[memadr_25]; + +reg [7:0] data_mem_grain12[0:511]; +reg [8:0] memadr_26; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[12]) + data_mem_grain12[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[103:96]; + memadr_26 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[103:96] = data_mem_grain12[memadr_26]; + +reg [7:0] data_mem_grain13[0:511]; +reg [8:0] memadr_27; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[13]) + data_mem_grain13[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[111:104]; + memadr_27 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[111:104] = data_mem_grain13[memadr_27]; + +reg [7:0] data_mem_grain14[0:511]; +reg [8:0] memadr_28; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[14]) + data_mem_grain14[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[119:112]; + memadr_28 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[119:112] = data_mem_grain14[memadr_28]; + +reg [7:0] data_mem_grain15[0:511]; +reg [8:0] memadr_29; +always @(posedge sys_clk) begin + if (soc_netsoc_data_port_we[15]) + data_mem_grain15[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[127:120]; + memadr_29 <= soc_netsoc_data_port_adr; +end + +assign soc_netsoc_data_port_dat_r[127:120] = data_mem_grain15[memadr_29]; + +(* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE ( + .C(sys_clk), + .CE(1'd1), + .D(1'd0), + .PRE(vns_xilinxasyncresetsynchronizerimpl0), + .Q(vns_xilinxasyncresetsynchronizerimpl0_rst_meta) +); + +(* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_1 ( + .C(sys_clk), + .CE(1'd1), + .D(vns_xilinxasyncresetsynchronizerimpl0_rst_meta), + .PRE(vns_xilinxasyncresetsynchronizerimpl0), + .Q(sys_rst) +); + +(* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_2 ( + .C(clk200_clk), + .CE(1'd1), + .D(1'd0), + .PRE(vns_xilinxasyncresetsynchronizerimpl1), + .Q(vns_xilinxasyncresetsynchronizerimpl1_rst_meta) +); + +(* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_3 ( + .C(clk200_clk), + .CE(1'd1), + .D(vns_xilinxasyncresetsynchronizerimpl1_rst_meta), + .PRE(vns_xilinxasyncresetsynchronizerimpl1), + .Q(clk200_rst) +); + +(* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_4 ( + .C(eth_tx_clk), + .CE(1'd1), + .D(1'd0), + .PRE(soc_reset0), + .Q(vns_xilinxasyncresetsynchronizerimpl2_rst_meta) +); + +(* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_5 ( + .C(eth_tx_clk), + .CE(1'd1), + .D(vns_xilinxasyncresetsynchronizerimpl2_rst_meta), + .PRE(soc_reset0), + .Q(eth_tx_rst) +); + +(* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_6 ( + .C(eth_rx_clk), + .CE(1'd1), + .D(1'd0), + .PRE(soc_reset0), + .Q(vns_xilinxasyncresetsynchronizerimpl3_rst_meta) +); + +(* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) +) FDPE_7 ( + .C(eth_rx_clk), + .CE(1'd1), + .D(vns_xilinxasyncresetsynchronizerimpl3_rst_meta), + .PRE(soc_reset0), + .Q(eth_rx_rst) +); + +endmodule diff --git a/sdc-plugin/tests/base_litex/base_litex.xdc b/sdc-plugin/tests/base_litex/base_litex.xdc new file mode 100644 index 000000000..0fd7ee993 --- /dev/null +++ b/sdc-plugin/tests/base_litex/base_litex.xdc @@ -0,0 +1,273 @@ +### serial:0.tx +set_property LOC D10 [get_ports serial_tx] +set_property IOSTANDARD LVCMOS33 [get_ports serial_tx] +### serial:0.rx +set_property LOC A9 [get_ports serial_rx] +set_property IOSTANDARD LVCMOS33 [get_ports serial_rx] +### clk100:0 +set_property LOC E3 [get_ports clk100] +set_property IOSTANDARD LVCMOS33 [get_ports clk100] +### eth_ref_clk:0 +set_property LOC G18 [get_ports eth_ref_clk] +set_property IOSTANDARD LVCMOS33 [get_ports eth_ref_clk] +### cpu_reset:0 +set_property LOC C2 [get_ports cpu_reset] +set_property IOSTANDARD LVCMOS33 [get_ports cpu_reset] +### ddram:0.a +set_property LOC R2 [get_ports {ddram_a[0]} ] +set_property SLEW FAST [get_ports {ddram_a[0]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[0]} ] +### ddram:0.a +set_property LOC M6 [get_ports {ddram_a[1]} ] +set_property SLEW FAST [get_ports {ddram_a[1]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[1]} ] +### ddram:0.a +set_property LOC N4 [get_ports {ddram_a[2]} ] +set_property SLEW FAST [get_ports {ddram_a[2]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[2]} ] +### ddram:0.a +set_property LOC T1 [get_ports {ddram_a[3]} ] +set_property SLEW FAST [get_ports {ddram_a[3]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[3]} ] +### ddram:0.a +set_property LOC N6 [get_ports {ddram_a[4]} ] +set_property SLEW FAST [get_ports {ddram_a[4]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[4]} ] +### ddram:0.a +set_property LOC R7 [get_ports {ddram_a[5]} ] +set_property SLEW FAST [get_ports {ddram_a[5]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[5]} ] +### ddram:0.a +set_property LOC V6 [get_ports {ddram_a[6]} ] +set_property SLEW FAST [get_ports {ddram_a[6]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[6]} ] +### ddram:0.a +set_property LOC U7 [get_ports {ddram_a[7]} ] +set_property SLEW FAST [get_ports {ddram_a[7]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[7]} ] +### ddram:0.a +set_property LOC R8 [get_ports {ddram_a[8]} ] +set_property SLEW FAST [get_ports {ddram_a[8]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[8]} ] +### ddram:0.a +set_property LOC V7 [get_ports {ddram_a[9]} ] +set_property SLEW FAST [get_ports {ddram_a[9]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[9]} ] +### ddram:0.a +set_property LOC R6 [get_ports {ddram_a[10]} ] +set_property SLEW FAST [get_ports {ddram_a[10]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[10]} ] +### ddram:0.a +set_property LOC U6 [get_ports {ddram_a[11]} ] +set_property SLEW FAST [get_ports {ddram_a[11]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[11]} ] +### ddram:0.a +set_property LOC T6 [get_ports {ddram_a[12]} ] +set_property SLEW FAST [get_ports {ddram_a[12]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[12]} ] +### ddram:0.a +set_property LOC T8 [get_ports {ddram_a[13]} ] +set_property SLEW FAST [get_ports {ddram_a[13]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_a[13]} ] +### ddram:0.ba +set_property LOC R1 [get_ports {ddram_ba[0]} ] +set_property SLEW FAST [get_ports {ddram_ba[0]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_ba[0]} ] +### ddram:0.ba +set_property LOC P4 [get_ports {ddram_ba[1]} ] +set_property SLEW FAST [get_ports {ddram_ba[1]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_ba[1]} ] +### ddram:0.ba +set_property LOC P2 [get_ports {ddram_ba[2]} ] +set_property SLEW FAST [get_ports {ddram_ba[2]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_ba[2]} ] +### ddram:0.ras_n +set_property LOC P3 [get_ports ddram_ras_n] +set_property SLEW FAST [get_ports ddram_ras_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_ras_n] +### ddram:0.cas_n +set_property LOC M4 [get_ports ddram_cas_n] +set_property SLEW FAST [get_ports ddram_cas_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_cas_n] +### ddram:0.we_n +set_property LOC P5 [get_ports ddram_we_n] +set_property SLEW FAST [get_ports ddram_we_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_we_n] +### ddram:0.cs_n +set_property LOC U8 [get_ports ddram_cs_n] +set_property SLEW FAST [get_ports ddram_cs_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_cs_n] +### ddram:0.dm +set_property LOC L1 [get_ports {ddram_dm[0]} ] +set_property SLEW FAST [get_ports {ddram_dm[0]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dm[0]} ] +### ddram:0.dm +set_property LOC U1 [get_ports {ddram_dm[1]} ] +set_property SLEW FAST [get_ports {ddram_dm[1]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dm[1]} ] +### ddram:0.dq +set_property LOC K5 [get_ports {ddram_dq[0]} ] +set_property SLEW FAST [get_ports {ddram_dq[0]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[0]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[0]} ] +### ddram:0.dq +set_property LOC L3 [get_ports {ddram_dq[1]} ] +set_property SLEW FAST [get_ports {ddram_dq[1]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[1]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[1]} ] +### ddram:0.dq +set_property LOC K3 [get_ports {ddram_dq[2]} ] +set_property SLEW FAST [get_ports {ddram_dq[2]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[2]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[2]} ] +### ddram:0.dq +set_property LOC L6 [get_ports {ddram_dq[3]} ] +set_property SLEW FAST [get_ports {ddram_dq[3]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[3]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[3]} ] +### ddram:0.dq +set_property LOC M3 [get_ports {ddram_dq[4]} ] +set_property SLEW FAST [get_ports {ddram_dq[4]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[4]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[4]} ] +### ddram:0.dq +set_property LOC M1 [get_ports {ddram_dq[5]} ] +set_property SLEW FAST [get_ports {ddram_dq[5]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[5]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[5]} ] +### ddram:0.dq +set_property LOC L4 [get_ports {ddram_dq[6]} ] +set_property SLEW FAST [get_ports {ddram_dq[6]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[6]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[6]} ] +### ddram:0.dq +set_property LOC M2 [get_ports {ddram_dq[7]} ] +set_property SLEW FAST [get_ports {ddram_dq[7]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[7]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[7]} ] +### ddram:0.dq +set_property LOC V4 [get_ports {ddram_dq[8]} ] +set_property SLEW FAST [get_ports {ddram_dq[8]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[8]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[8]} ] +### ddram:0.dq +set_property LOC T5 [get_ports {ddram_dq[9]} ] +set_property SLEW FAST [get_ports {ddram_dq[9]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[9]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[9]} ] +### ddram:0.dq +set_property LOC U4 [get_ports {ddram_dq[10]} ] +set_property SLEW FAST [get_ports {ddram_dq[10]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[10]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[10]} ] +### ddram:0.dq +set_property LOC V5 [get_ports {ddram_dq[11]} ] +set_property SLEW FAST [get_ports {ddram_dq[11]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[11]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[11]} ] +### ddram:0.dq +set_property LOC V1 [get_ports {ddram_dq[12]} ] +set_property SLEW FAST [get_ports {ddram_dq[12]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[12]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[12]} ] +### ddram:0.dq +set_property LOC T3 [get_ports {ddram_dq[13]} ] +set_property SLEW FAST [get_ports {ddram_dq[13]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[13]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[13]} ] +### ddram:0.dq +set_property LOC U3 [get_ports {ddram_dq[14]} ] +set_property SLEW FAST [get_ports {ddram_dq[14]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[14]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[14]} ] +### ddram:0.dq +set_property LOC R3 [get_ports {ddram_dq[15]} ] +set_property SLEW FAST [get_ports {ddram_dq[15]} ] +set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[15]} ] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[15]} ] +### ddram:0.dqs_p +set_property LOC N2 [get_ports {ddram_dqs_p[0]} ] +set_property SLEW FAST [get_ports {ddram_dqs_p[0]} ] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_p[0]} ] +### ddram:0.dqs_p +set_property LOC U2 [get_ports {ddram_dqs_p[1]} ] +set_property SLEW FAST [get_ports {ddram_dqs_p[1]} ] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_p[1]} ] +### ddram:0.dqs_n +set_property LOC N1 [get_ports {ddram_dqs_n[0]} ] +set_property SLEW FAST [get_ports {ddram_dqs_n[0]} ] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_n[0]} ] +### ddram:0.dqs_n +set_property LOC V2 [get_ports {ddram_dqs_n[1]} ] +set_property SLEW FAST [get_ports {ddram_dqs_n[1]} ] +set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_n[1]} ] +### ddram:0.clk_p +set_property LOC U9 [get_ports ddram_clk_p] +set_property SLEW FAST [get_ports ddram_clk_p] +set_property IOSTANDARD DIFF_SSTL135 [get_ports ddram_clk_p] +### ddram:0.clk_n +set_property LOC V9 [get_ports ddram_clk_n] +set_property SLEW FAST [get_ports ddram_clk_n] +set_property IOSTANDARD DIFF_SSTL135 [get_ports ddram_clk_n] +### ddram:0.cke +set_property LOC N5 [get_ports ddram_cke] +set_property SLEW FAST [get_ports ddram_cke] +set_property IOSTANDARD SSTL135 [get_ports ddram_cke] +### ddram:0.odt +set_property LOC R5 [get_ports ddram_odt] +set_property SLEW FAST [get_ports ddram_odt] +set_property IOSTANDARD SSTL135 [get_ports ddram_odt] +### ddram:0.reset_n +set_property LOC K6 [get_ports ddram_reset_n] +set_property SLEW FAST [get_ports ddram_reset_n] +set_property IOSTANDARD SSTL135 [get_ports ddram_reset_n] +### eth:0.rst_n +set_property LOC C16 [get_ports eth_rst_n] +set_property IOSTANDARD LVCMOS33 [get_ports eth_rst_n] +### eth:0.mdio +set_property LOC K13 [get_ports eth_mdio] +set_property IOSTANDARD LVCMOS33 [get_ports eth_mdio] +### eth:0.mdc +set_property LOC F16 [get_ports eth_mdc] +set_property IOSTANDARD LVCMOS33 [get_ports eth_mdc] +### eth:0.rx_dv +set_property LOC G16 [get_ports eth_rx_dv] +set_property IOSTANDARD LVCMOS33 [get_ports eth_rx_dv] +### eth:0.rx_er +set_property LOC C17 [get_ports eth_rx_er] +set_property IOSTANDARD LVCMOS33 [get_ports eth_rx_er] +### eth:0.rx_data +set_property LOC D18 [get_ports {eth_rx_data[0]}] +set_property IOSTANDARD LVCMOS33 [get_ports {eth_rx_data[0]}] +### eth:0.rx_data +set_property LOC E17 [get_ports {eth_rx_data[1]}] +set_property IOSTANDARD LVCMOS33 [get_ports {eth_rx_data[1]}] +### eth:0.rx_data +set_property LOC E18 [get_ports {eth_rx_data[2]}] +set_property IOSTANDARD LVCMOS33 [get_ports {eth_rx_data[2]}] +### eth:0.rx_data +set_property LOC G17 [get_ports {eth_rx_data[3]}] +set_property IOSTANDARD LVCMOS33 [get_ports {eth_rx_data[3]}] +### eth:0.tx_en +set_property LOC H15 [get_ports eth_tx_en] +set_property IOSTANDARD LVCMOS33 [get_ports eth_tx_en] +### eth:0.tx_data +set_property LOC H14 [get_ports {eth_tx_data[0]}] +set_property IOSTANDARD LVCMOS33 [get_ports {eth_tx_data[0]}] +### eth:0.tx_data +set_property LOC J14 [get_ports {eth_tx_data[1]}] +set_property IOSTANDARD LVCMOS33 [get_ports {eth_tx_data[1]}] +### eth:0.tx_data +set_property LOC J13 [get_ports {eth_tx_data[2]}] +set_property IOSTANDARD LVCMOS33 [get_ports {eth_tx_data[2]}] +### eth:0.tx_data +set_property LOC H17 [get_ports {eth_tx_data[3]}] +set_property IOSTANDARD LVCMOS33 [get_ports {eth_tx_data[3]}] +### eth:0.col +set_property LOC D17 [get_ports eth_col] +set_property IOSTANDARD LVCMOS33 [get_ports eth_col] +### eth:0.crs +set_property LOC G14 [get_ports eth_crs] +set_property IOSTANDARD LVCMOS33 [get_ports eth_crs] + +set_property INTERNAL_VREF 0.750 [get_iobanks 34] diff --git a/sdc-plugin/tests/base_litex/mem.init b/sdc-plugin/tests/base_litex/mem.init new file mode 100644 index 000000000..ec98d9878 --- /dev/null +++ b/sdc-plugin/tests/base_litex/mem.init @@ -0,0 +1,6479 @@ +b00006f +13 +13 +13 +13 +13 +13 +13 +fe112e23 +fe512c23 +fe612a23 +fe712823 +fea12623 +feb12423 +fec12223 +fed12023 +fce12e23 +fcf12c23 +fd012a23 +fd112823 +fdc12623 +fdd12423 +fde12223 +fdf12023 +fc010113 +94000ef +3c12083 +3812283 +3412303 +3012383 +2c12503 +2812583 +2412603 +2012683 +1c12703 +1812783 +1412803 +1012883 +c12e03 +812e83 +412f03 +12f83 +4010113 +30200073 +10008117 +f4c10113 +517 +f6850513 +30551073 +10000517 +f3c50513 +10000597 +ac58593 +b50863 +52023 +450513 +ff5ff06f +1537 +88050513 +30451073 +b8010ef +6f +fc002773 +bc0027f3 +e7f7b3 +17f793 +78463 +36c0406f +8067 +13 +fff50513 +fe051ce3 +8067 +100713 +f00067b7 +a71533 +80a7a623 +80e7a823 +8007a623 +8067 +100713 +f00067b7 +a71533 +80a7a623 +80e7aa23 +8007a623 +8067 +fb010113 +4812423 +50413 +5537 +e5050513 +4912223 +3512a23 +4112623 +5212023 +3312e23 +3412c23 +3612823 +3712623 +3812423 +3912223 +3a12023 +220040ef +1010493 +196637 +3c6ef5b7 +2010513 +48693 +2a00793 +48a93 +60d60613 +35f58593 +400813 +713 +2c787b3 +e688b3 +170713 +b787b3 +f88023 +ff0716e3 +468693 +fed510e3 +f00047b7 +7a623 +7a823 +7aa23 +900713 +e7a223 +100713 +e7a423 +f00513 +f05ff0ef +5b37 +793 +e30b0b13 +1000693 +fb0733 +72703 +4c603 +478793 +448493 +c72023 +ffd4c603 +c72223 +ffe4c603 +c72423 +fff4c603 +c72623 +fcd798e3 +f00047b7 +a07a423 +a07a623 +a07a823 +1700713 +ae7a023 +100713 +ae7a223 +607aa23 +607ac23 +607ae23 +40513 +e9dff0ef +100c93 +c10793 +408c8c33 +18789b3 +2010793 +5a37 +408784b3 +913 +e40a0a13 +348493 +f00047b7 +2500713 +6e7a623 +797a823 +f00513 +e4dff0ef +18a8bb3 +b8713 +793 +100613 +10b0513 +1000593 +f506b3 +6a683 +6a803 +1010623 +46a803 +10106a3 +86a803 +c6a683 +1010723 +d107a3 +74803 +9c683 +d81863 +274803 +fec4c683 +d80463 +613 +478793 +470713 +fab79ae3 +190d13 +2061063 +2000793 +fd0a63 +40513 +df9ff0ef +d0913 +f65ff06f +2000913 +40513 +de5ff0ef +2010793 +f0004c37 +40878b33 +190493 +70c0c93 +100d13 +3b0b13 +2500793 +6fc2623 +1aca023 +f00513 +d89ff0ef +793 +100693 +1000613 +fa0733 +72703 +72583 +b10623 +472583 +b106a3 +872583 +c72703 +b10723 +e107a3 +fb8733 +74583 +9c703 +e59c63 +40878733 +ea8733 +374583 +fecb4703 +e58463 +693 +478793 +fac796e3 +68e63 +148493 +1f00793 +97c863 +40513 +d39ff0ef +f71ff06f +9909b3 +2000793 +4019d993 +6f91e63 +5537 +e5c50513 +795030ef +40513 +cf5ff0ef +493 +934c063 +f00047b7 +7a623 +7a823 +7aa23 +b00713 +4812403 +e7a223 +4c12083 +4412483 +4012903 +3c12983 +3812a03 +3412a83 +3012b03 +2c12b83 +2812c03 +2412c83 +2012d03 +100713 +e7a423 +f00513 +5010113 +c81ff06f +412484b3 +200613 +2c4c633 +5537 +98593 +e6050513 +70d030ef +f79ff06f +40513 +c85ff0ef +148493 +f75ff06f +f00047b7 +e00713 +5537 +e7a023 +e6c50513 +6e10306f +f00047b7 +100713 +5537 +e7a023 +e9050513 +6c90306f +fd010113 +2112623 +54783 +4079263 +f00047b7 +7a623 +7a823 +7aa23 +b00713 +e7a223 +100713 +f00513 +e7a423 +be9ff0ef +5537 +eb450513 +685030ef +2c12083 +3010113 +8067 +613 +1c10593 +4f8030ef +1c12783 +7c783 +78863 +5537 +ec050513 +fd1ff06f +1051713 +1075713 +f00047b7 +875713 +e7a623 +1051713 +a12623 +1075713 +e7a823 +7aa23 +900713 +e7a223 +100713 +e7a423 +f00513 +b6dff0ef +c12583 +5537 +ed050513 +605030ef +f81ff06f +fd010113 +2112623 +2812423 +2912223 +3212023 +1312e23 +1412c23 +1512a23 +1612823 +a054263 +100913 +40a90933 +200a13 +57b7 +e3078793 +1078993 +2078413 +5ab7 +300b13 +9a783 +90493 +7a703 +e10623 +47a703 +e106a3 +87a703 +c7a783 +e10723 +f107a3 +c10793 +9787b3 +7c583 +ee4a8513 +14484b3 +575030ef +fe9b54e3 +498993 +fb341ce3 +2812403 +2c12083 +2412483 +2012903 +1c12983 +1812a03 +1412a83 +1012b03 +6537 +87450513 +3010113 +5390306f +100a13 +913 +f65ff06f +fe010113 +112e23 +812c23 +912a23 +54783 +2079263 +5537 +eec50513 +509030ef +1c12083 +1812403 +1412483 +2010113 +8067 +58493 +613 +c10593 +370030ef +c12783 +50413 +7c783 +78863 +5537 +f0050513 +fc1ff06f +4c783 +2078863 +48513 +613 +c10593 +33c030ef +c12783 +50493 +7c783 +78a63 +5537 +f1450513 +f8dff06f +fff00493 +1041713 +1075713 +f00047b7 +875713 +1041413 +6e7aa23 +1045413 +687ac23 +607ae23 +2500713 +6e7a623 +100713 +6e7a823 +f00513 +9adff0ef +48513 +e51ff0ef +f45ff06f +fa010113 +4112e23 +4812c23 +4912a23 +5212823 +5312623 +5412423 +5512223 +5612023 +3712e23 +3812c23 +3912a23 +3a12823 +54783 +4079463 +5537 +f2450513 +401030ef +5c12083 +5812403 +5412483 +5012903 +4c12983 +4812a03 +4412a83 +4012b03 +3c12b83 +3812c03 +3412c83 +3012d03 +6010113 +8067 +613 +c10593 +248030ef +c12783 +50b13 +7c783 +78863 +5537 +f3850513 +fa1ff06f +3010713 +2010793 +78023 +780a3 +78123 +781a3 +478793 +fee796e3 +f0004437 +54b7 +5937 +c93 +6c40993 +2500b93 +2500c13 +100a13 +e4048493 +1000a93 +e4090913 +6042a23 +7942c23 +6042e23 +189a023 +7442823 +f00513 +891ff0ef +1010793 +713 +e486b3 +6a683 +470713 +478793 +6a603 +fec78e23 +46a603 +fec78ea3 +86a603 +c6a683 +fec78f23 +fed78fa3 +fd5718e3 +d13 +96d4663 +8c8c93 +8000793 +f8fc9ce3 +413 +5937 +1000493 +2010793 +8787b3 +7c583 +ee490513 +140413 +2c5030ef +fe9414e3 +6437 +87440513 +2b5030ef +400913 +54b7 +100593 +f4c48513 +2a1030ef +593 +f4c48513 +295030ef +100593 +f4c48513 +289030ef +593 +f4c48513 +fff90913 +279030ef +fc0916e3 +87440513 +e6dff06f +179a023 +7442823 +f00513 +fb4ff0ef +793 +f90733 +72703 +2010693 +f685b3 +1010693 +f68633 +1070813 +72503 +64683 +5c883 +ff57513 +d546b3 +116e6b3 +d58023 +a60023 +470713 +158593 +160613 +fd071ae3 +478793 +fb5798e3 +1d0d13 +f09ff06f +fe010113 +112e23 +54783 +79e63 +5537 +f5050513 +1e1030ef +1c12083 +2010113 +8067 +613 +c10593 +54030ef +c12783 +7c783 +8079263 +5737 +e3070713 +4000593 +72683 +178613 +ff67613 +f6a023 +c6a223 +278613 +ff67613 +c6a423 +378613 +ff67613 +1078793 +c6a623 +ff7f793 +470713 +fcb794e3 +1051713 +1075713 +f00047b7 +875713 +1051513 +ae7a423 +1055513 +aa7a623 +a07a823 +1700713 +ae7a023 +100713 +ae7a223 +f61ff06f +5537 +f0050513 +f51ff06f +ff010113 +c00007b7 +aaaab737 +112623 +812423 +912223 +aaa70713 +20078693 +e7a023 +478793 +fed79ce3 +159030ef +181030ef +c00007b7 +aaaab737 +413 +aaa70713 +20078693 +7a603 +e60463 +140413 +478793 +fed798e3 +c00007b7 +55555737 +55570713 +20078693 +e7a023 +478793 +fed79ce3 +10d030ef +135030ef +c00007b7 +55555737 +55570713 +20078693 +7a603 +e60463 +140413 +478793 +fed798e3 +40c63 +5537 +10000613 +40593 +f6450513 +75030ef +196637 +3c6ef6b7 +c0000737 +793 +60d60613 +35f68693 +c02005b7 +2c787b3 +470713 +d787b3 +fef72e23 +feb718e3 +99030ef +c1030ef +1966b7 +3c6ef637 +c0000737 +493 +793 +60d68693 +35f60613 +c02005b7 +2d787b3 +72503 +c787b3 +a78463 +148493 +470713 +feb714e3 +48c63 +5537 +80637 +48593 +f8850513 +7e8030ef +c00006b7 +793 +468693 +2637 +279713 +d70733 +f72023 +178793 +fec798e3 +19030ef +41030ef +c0000737 +106b7 +593 +793 +470713 +fff68693 +2537 +279613 +e60633 +62603 +d67633 +f60463 +158593 +178793 +fea792e3 +2058863 +5537 +2637 +fac50513 +76c030ef +593 +c12083 +812403 +412483 +58513 +1010113 +8067 +940433 +fe0412e3 +5537 +fd050513 +73c030ef +100593 +fd1ff06f +f9010113 +6112623 +6812423 +6912223 +5312e23 +5412c23 +5712623 +5912223 +7212023 +5512a23 +5612823 +5812423 +5a12023 +3b12e23 +805ff0ef +f0006437 +100493 +513 +c50ff0ef +80942623 +80942c23 +80042623 +100513 +c3cff0ef +200793 +80f42623 +80942c23 +5537 +80042623 +fdc50513 +6b8030ef +1967b7 +60d78793 +5a37 +1c10993 +2110b93 +413 +f12223 +e30a0a13 +6cb7 +3c6ef7b7 +100913 +35f78793 +891933 +b13 +c13 +493 +f12423 +2c0006f +48b13 +a8c13 +700793 +20f48863 +f00067b7 +8127a623 +100713 +80e7ae23 +8007a623 +148493 +2010a93 +3010613 +a8693 +2a00793 +400593 +713 +412503 +2a787b3 +812503 +a787b3 +e68533 +f50023 +170713 +feb712e3 +468693 +fcd61ce3 +f00047b7 +7a623 +7a823 +7aa23 +900713 +e7a223 +100713 +e7a423 +f00513 +b38ff0ef +793 +1000693 +fa0733 +72703 +ac603 +478793 +4a8a93 +c72023 +ffdac603 +c72223 +ffeac603 +c72423 +fffac603 +c72623 +fcd798e3 +f00047b7 +a07a423 +a07a623 +a07a823 +1700713 +ae7a023 +100713 +ae7a223 +607aa23 +607ac23 +5537 +607ae23 +48613 +40593 +fec50513 +564030ef +40513 +ac4ff0ef +2000d93 +a93 +f0004d37 +2500793 +6fd2623 +100713 +f00047b7 +6e7a823 +f00513 +a8cff0ef +b8713 +693 +100793 +5637 +e4060613 +d60633 +62603 +62583 +b10e23 +462583 +b10ea3 +862583 +c62603 +b10f23 +c10fa3 +74583 +19c603 +c59863 +274583 +39c603 +c58463 +793 +468693 +1000613 +470713 +fac694e3 +78593 +f12623 +57b7 +ff878513 +4b8030ef +c12783 +40513 +fffd8d93 +fa8ab3 +a28ff0ef +f40d9ae3 +5537 +ffc50513 +494030ef +f00047b7 +7a623 +7a823 +7aa23 +b00713 +e7a223 +100713 +e7a423 +f00513 +9c4ff0ef +40513 +a04ff0ef +874c8513 +45c030ef +df5c46e3 +df1ff06f +5537 +b0613 +40593 +50513 +440030ef +f00067b7 +8127a623 +100713 +80e7ac23 +8007a623 +f0006737 +793 +100693 +3679463 +40513 +9b4ff0ef +874c8513 +40c030ef +fff98993 +fffb8b93 +2041063 +100413 +d69ff06f +81272623 +80d72e23 +80072623 +178793 +fc9ff06f +6c12083 +6812403 +6412483 +6012903 +5c12983 +5812a03 +5412a83 +5012b03 +4c12b83 +4812c03 +4412c83 +4012d03 +3c12d83 +100513 +7010113 +8067 +ff010113 +5537 +812423 +1050513 +f0004437 +112623 +912223 +1212023 +380030ef +42623 +42823 +42a23 +c00793 +c537 +f42023 +35050513 +8b8ff0ef +42623 +42823 +42a23 +e00793 +2537 +f42023 +71050513 +898ff0ef +200793 +f42623 +20000713 +e42823 +f42a23 +f00793 +f42223 +100493 +942423 +42623 +42823 +300913 +1242a23 +f42223 +942423 +42623 +600713 +e42823 +942a23 +f42223 +942423 +900713 +e42623 +1737 +92070713 +e42823 +42a23 +f42223 +942423 +c800513 +81cff0ef +400793 +f42623 +40000793 +f42823 +42a23 +1242223 +942423 +c800513 +ff9fe0ef +b6dff0ef +bbcff0ef +969ff0ef +c12083 +812403 +412483 +12903 +a03533 +1010113 +8067 +ff010113 +812423 +50413 +52503 +2000593 +112623 +912223 +508020ef +2051863 +42483 +48513 +694020ef +a48533 +a42023 +c12083 +812403 +48513 +412483 +1010113 +8067 +50023 +42483 +150513 +fd9ff06f +e7010113 +18112623 +18812423 +18912223 +19212023 +17312e23 +17412c23 +17512a23 +17612823 +17712623 +17812423 +17912223 +17a12023 +15b12e23 +793 +bc079073 +30046073 +64b7 +444030ef +87448513 +1c4030ef +5537 +2850513 +1b8030ef +5537 +5050513 +1ac030ef +5537 +7850513 +1a0030ef +5537 +9c50513 +194030ef +87448513 +18c030ef +5537 +c050513 +180030ef +87448513 +178030ef +5537 +e850513 +16c030ef +65b7 +537 +5385a403 +50793 +53858593 +40f585b3 +50513 +609020ef +1aa41463 +5537 +40593 +11050513 +138030ef +87448513 +130030ef +5537 +18c50513 +124030ef +5537 +1a850513 +118030ef +87448513 +110030ef +5537 +1c450513 +104030ef +5537 +1f850513 +f8030ef +5537 +20c50513 +ec030ef +5537 +3c00593 +21850513 +dc030ef +5537 +4000593 +22450513 +cc030ef +5537 +2000593 +24050513 +bc030ef +5537 +800593 +25c50513 +ac030ef +5537 +405b7 +27850513 +9c030ef +87448513 +94030ef +5537 +29450513 +88030ef +585010ef +ce1ff0ef +100793 +50413 +f50863 +5537 +2c850513 +68030ef +87448513 +60030ef +2040a63 +5537 +2e850513 +50030ef +461000ef +50c63 +ac010ef +771000ef +5537 +31c50513 +34030ef +87448513 +2c030ef +5537 +33450513 +20030ef +5a37 +59b7 +5ab7 +5537 +36850513 +789020ef +413 +40108a3 +10000937 +a00b13 +d00b93 +7f00c13 +700c93 +800d13 +69d020ef +94783 +4a10823 +fea78ae3 +90023 +d650e63 +4ab6863 +ff9502e3 +5a50863 +5010513 +73d020ef +5014703 +15010793 +8787b3 +ece78023 +140413 +fc1ff06f +50613 +5537 +40593 +12c50513 +791020ef +5537 +15850513 +785020ef +e4dff06f +1750e63 +fb851ce3 +f80408e3 +37ca0513 +fff40413 +6e9020ef +f81ff06f +1690023 +15010793 +878433 +ec040023 +87448513 +6cd020ef +1010793 +c10513 +f12623 +cc9ff0ef +55b7 +38058593 +50413 +29c020ef +18051863 +c10513 +cadff0ef +50913 +c10513 +ca1ff0ef +94783 +50413 +2079063 +5537 +38450513 +6fd020ef +ee9ff06f +d00793 +f90023 +f91ff06f +613 +5010593 +90513 +568020ef +5012783 +50b13 +7c783 +78863 +5537 +f0050513 +fc5ff06f +44783 +2078663 +613 +5010593 +40513 +534020ef +5012783 +7c783 +78a63 +5537 +39c50513 +f95ff06f +400513 +50413 +5537 +3b050513 +b0b93 +5f9020ef +5cb7 +5d37 +804663 +87448513 +f69ff06f +1000793 +40913 +87d463 +1000913 +5537 +b0593 +3c050513 +645020ef +c13 +5db7 +18b87b3 +7c583 +3ccd8513 +1c0c13 +629020ef +ff8916e3 +90c13 +1000d93 +5bc1a63 +3c898513 +611020ef +c13 +5e00d93 +18b87b3 +7c583 +fe058793 +ff7f793 +4fdf063 +3d4d0513 +5ed020ef +1c0c13 +ff8910e3 +90c13 +1000d93 +3bc1863 +12b8bb3 +41240433 +12b0b33 +f5dff06f +208c8513 +5c1020ef +1c0c13 +fa1ff06f +3d8a8513 +5b1020ef +fc5ff06f +3c898513 +5a5020ef +1c0c13 +fc5ff06f +55b7 +3dc58593 +40513 +fc020ef +e051063 +c10513 +b0dff0ef +50b13 +c10513 +b01ff0ef +50913 +c10513 +af5ff0ef +b4783 +50413 +78663 +94783 +79863 +5537 +3e050513 +e4dff06f +b0513 +613 +5010593 +3c4020ef +5012783 +50b13 +7c783 +e60790e3 +90513 +613 +5010593 +3a4020ef +5012783 +50913 +7c783 +78863 +5537 +40050513 +e01ff06f +44783 +100513 +2078663 +613 +5010593 +40513 +36c020ef +5012783 +7c783 +78863 +5537 +f3850513 +dcdff06f +793 +279713 +1670733 +caa784e3 +1272023 +178793 +fedff06f +55b7 +41458593 +40513 +c020ef +e051463 +c10513 +a1dff0ef +50b13 +c10513 +a11ff0ef +50913 +c10513 +a05ff0ef +b4783 +50413 +78663 +94783 +79863 +5537 +41850513 +d5dff06f +b0513 +613 +5010593 +2d4020ef +5012783 +50b13 +7c783 +78863 +5537 +43050513 +d31ff06f +90513 +613 +5010593 +2a8020ef +5012783 +50913 +7c783 +78863 +5537 +45050513 +d05ff06f +44783 +100513 +2078063 +613 +5010593 +40513 +270020ef +5012783 +7c783 +f00794e3 +793 +279713 +eb06b3 +e90733 +baa78ae3 +72703 +178793 +e6a023 +fe5ff06f +55b7 +46c58593 +40513 +715010ef +e051063 +c10513 +925ff0ef +50b13 +c10513 +919ff0ef +50913 +c10513 +90dff0ef +b4783 +50413 +78a63 +94783 +78663 +54783 +79863 +5537 +47450513 +c5dff06f +b0513 +613 +5010593 +1d4020ef +5012783 +50b13 +7c783 +78863 +5537 +49450513 +c31ff06f +90513 +613 +5010593 +1a8020ef +5012783 +50913 +7c783 +78863 +5537 +4a850513 +c05ff06f +613 +5010593 +40513 +17c020ef +5012783 +50613 +7c783 +78863 +5537 +4b850513 +bd9ff06f +90593 +b0513 +6c5020ef +ab5ff06f +55b7 +4c858593 +40513 +625010ef +8051e63 +c10513 +835ff0ef +50913 +c10513 +829ff0ef +94783 +50413 +78663 +54783 +79863 +5537 +4d050513 +b81ff06f +90513 +613 +5010593 +f8020ef +5012783 +50913 +7c783 +f20794e3 +40513 +613 +5010593 +d8020ef +5012783 +50413 +7c783 +f2079ae3 +50593 +90513 +6c1020ef +50613 +5537 +40593 +4e850513 +21d020ef +a09ff06f +55b7 +4f858593 +40513 +579010ef +50913 +a051a63 +c10513 +f84ff0ef +50413 +c10513 +f78ff0ef +44783 +50b13 +78663 +54783 +79863 +5537 +50050513 +ad1ff06f +40513 +613 +5010593 +48020ef +5012783 +50413 +7c783 +e6079ce3 +b0513 +613 +5010593 +28020ef +5012783 +50b13 +7c783 +ca079ee3 +5537 +40593 +51850513 +17d020ef +5bb7 +976902e3 +90593 +40513 +5f9020ef +50613 +90593 +4e8b8513 +159020ef +190913 +fddff06f +55b7 +52c58593 +40513 +4b1010ef +8051a63 +c10513 +ec0ff0ef +50913 +c10513 +eb4ff0ef +94783 +50413 +78663 +54783 +79863 +5537 +53050513 +a0dff06f +90513 +613 +5010593 +785010ef +5012783 +50913 +7c783 +a20790e3 +5010593 +613 +40513 +765010ef +5012783 +50593 +7c783 +a20798e3 +90513 +57c020ef +50593 +5537 +54850513 +b1020ef +89dff06f +55b7 +55858593 +40513 +40d010ef +51e63 +5010513 +12d020ef +5537 +5010593 +56050513 +fd1ff06f +55b7 +56c58593 +40513 +3e1010ef +51663 +ed020ef +855ff06f +55b7 +57458593 +40513 +3c5010ef +51a63 +f00007b7 +100713 +e7a023 +831ff06f +55b7 +57c58593 +40513 +3a1010ef +51663 +91000ef +815ff06f +55b7 +58858593 +40513 +385010ef +51663 +420000ef +ff8ff06f +55b7 +59458593 +40513 +369010ef +51663 +720000ef +fdcff06f +55b7 +59c58593 +40513 +34d010ef +c051663 +5537 +5a450513 +70c020ef +5537 +5c450513 +700020ef +5537 +5e450513 +6f4020ef +5537 +60850513 +6e8020ef +5537 +62850513 +6dc020ef +5537 +64c50513 +6d0020ef +5537 +66c50513 +6437 +6c0020ef +8f440513 +6b8020ef +5537 +69050513 +6ac020ef +5537 +6cc50513 +6a0020ef +8f440513 +698020ef +5537 +6ec50513 +68c020ef +5537 +70c50513 +680020ef +5537 +72850513 +674020ef +5537 +74450513 +668020ef +8f440513 +660020ef +5537 +76450513 +654020ef +f00ff06f +55b7 +78458593 +40513 +271010ef +51a63 +c10513 +c80ff0ef +82dfe0ef +edcff06f +55b7 +78c58593 +40513 +24d010ef +51663 +fe0fe0ef +ec0ff06f +55b7 +79458593 +40513 +231010ef +51663 +fdcfe0ef +ea4ff06f +55b7 +79c58593 +40513 +215010ef +51863 +fff00513 +89dfe0ef +e84ff06f +55b7 +7a858593 +40513 +1f5010ef +2051463 +c10513 +c04ff0ef +50413 +c10513 +bf8ff0ef +50593 +40513 +939fe0ef +e4cff06f +55b7 +7b058593 +40513 +1bd010ef +51a63 +c10513 +bccff0ef +9f9fe0ef +e28ff06f +55b7 +7bc58593 +40513 +199010ef +51a63 +c10513 +ba8ff0ef +c21fe0ef +e04ff06f +55b7 +7c458593 +40513 +175010ef +51663 +a5cff0ef +de8ff06f +55b7 +7cc58593 +40513 +159010ef +51663 +eb1fe0ef +dccff06f +55b7 +7d858593 +40513 +13d010ef +51663 +c99fe0ef +db0ff06f +65b7 +8f458593 +40513 +121010ef +d8050e63 +5537 +7e050513 +ea4ff06f +68067 +ff010113 +812423 +52403 +4007b7 +112623 +912223 +fe040713 +fe078793 +2e7f863 +6537 +40593 +82c50513 +568020ef +413 +40513 +c12083 +812403 +412483 +1010113 +8067 +452483 +40593 +850513 +1f8020ef +50613 +fca48ae3 +6537 +48593 +85050513 +524020ef +fbdff06f +ff010113 +812423 +912223 +112623 +50493 +58413 +f6dff0ef +2050663 +50613 +848593 +40513 +24d010ef +100513 +c12083 +812403 +412483 +1010113 +8067 +513 +fe9ff06f +ff010113 +912223 +1212023 +58693 +50613 +50493 +58913 +c0a86537 +15b7 +7b558593 +46450513 +812423 +112623 +3cc010ef +50413 +2a05c63 +50593 +6537 +90693 +48613 +87850513 +478020ef +40513 +c12083 +812403 +412483 +12903 +1010113 +8067 +6537 +48593 +8ac50513 +44c020ef +fd5ff06f +fe010113 +50593 +a12623 +6537 +8d050513 +112e23 +42c020ef +6537 +8f850513 +420020ef +6dc020ef +793 +bc079073 +30047073 +464020ef +48c020ef +c12683 +613 +593 +513 +e59ff0ef +6f +6537 +ec010113 +92c50513 +12112e23 +12812c23 +12912a23 +13212823 +13312623 +13412423 +13512223 +13612023 +11712e23 +11812c23 +3b8020ef +6537 +6437 +94450513 +80c40493 +3a4020ef +80c40413 +4c503 +8051e63 +f00037b7 +8207a023 +8007a823 +8007aa23 +8007ac23 +8007ae23 +8007a023 +e400713 +80e7a223 +e737 +4e170713 +80e7a423 +e4e737 +1c070713 +80e7a623 +100713 +82e7a023 +82e7a223 +b13 +f0003ab7 +5100493 +1b00913 +e00993 +100a13 +828aa783 +82caa703 +879793 +e7e7b3 +830aa703 +879793 +e7e7b3 +834aa703 +879793 +e7e7b3 +79e63 +6537 +99850513 +d80006f +4f8020ef +148493 +f59ff06f +4d0020ef +c050a63 +474020ef +20950063 +1f250e63 +16407b3 +107c783 +aa79a63 +1b0b13 +b3b1a63 +54b7 +a93 +300993 +100913 +500413 +7f448493 +f0000a37 +438020ef +a10623 +430020ef +a106a3 +428020ef +a10723 +c10b93 +41c020ef +a107a3 +b8c13 +b13 +c14583 +1c0c13 +6bb4463 +f14783 +d378863 +e14783 +d14703 +158593 +879793 +e7e7b3 +879b13 +87d793 +fb67b3 +1079b13 +f10513 +10b5b13 +6ad010ef +5650463 +1a8a93 +28a9a63 +6537 +97050513 +228020ef +500006f +f8650513 +153b13 +834aa223 +ee1ff06f +39c020ef +ac01a3 +1b0b13 +f85ff06f +4300513 +3f8020ef +f4dff06f +f14783 +ef46e63 +279793 +9787b3 +7a783 +78067 +4b00513 +3d4020ef +100513 +13c12083 +13812403 +13412483 +13012903 +12c12983 +12812a03 +12412a83 +12012b03 +11c12b83 +11812c03 +14010113 +8067 +1014783 +1114703 +1879793 +1071713 +e7e7b3 +1314703 +e7e7b3 +1214703 +871713 +e7e7b3 +ffc78793 +400713 +c14683 +e78633 +1b8b93 +d74c63 +f14783 +a93 +4b00513 +eb2794e3 +f55ff06f +7bc683 +170713 +d60023 +fd1ff06f +1014403 +1114783 +4b00513 +1841413 +1079793 +f46433 +1314783 +f46433 +1214783 +879793 +f46433 +30c020ef +40513 +cc5ff0ef +4b00513 +2fc020ef +12a2023 +e4dff06f +1a8a93 +ec8a80e3 +5500513 +eedff06f +6537 +9a450513 +dc020ef +513 +f05ff06f +6537 +ff010113 +9b050513 +112623 +c0020ef +6537 +3200713 +6400693 +a800613 +c000593 +9cc50513 +a4020ef +6537 +6400713 +6400693 +a800613 +c000593 +9e450513 +88020ef +c0a865b7 +6537 +43258593 +52850513 +650000ef +15b7 +6537 +7b558593 +9fc50513 +60020ef +6537 +c00005b7 +a1450513 +b85ff0ef +4a04263 +6537 +a1c50513 +40020ef +6537 +aa050513 +34020ef +6537 +c00005b7 +adc50513 +b59ff0ef +8a04063 +c12083 +6537 +a1c50513 +1010113 +c0206f +6537 +c08005b7 +a3450513 +b31ff0ef +a04863 +6537 +a4050513 +fadff06f +6537 +c10005b7 +a5850513 +b11ff0ef +a04863 +6537 +a6450513 +f8dff06f +6537 +500005b7 +a7850513 +af1ff0ef +a04863 +6537 +a8850513 +f6dff06f +50000537 +b61ff0ef +c0000537 +ff9ff06f +6537 +fe010113 +ae850513 +112e23 +812c23 +785010ef +500005b7 +20d29537 +a5dff0ef +6050863 +50413 +6537 +b0c50513 +765010ef +c00005b7 +20228537 +a3dff0ef +857433 +4040663 +6537 +b2c50513 +745010ef +c08005b7 +20628537 +a1dff0ef +857433 +2040663 +6537 +b5050513 +725010ef +c10005b7 +20d28537 +9fdff0ef +857533 +50663 +50000537 +ac5ff0ef +6537 +b7050513 +6fd010ef +20228537 +95dff0ef +2050a63 +50593 +a12623 +6537 +b8850513 +6dd010ef +c12603 +202285b7 +858593 +c0000537 +424010ef +c0000537 +fb9ff06f +1c12083 +1812403 +2010113 +8067 +f00087b7 +8347a703 +ff77713 +fe070ce3 +100006b7 +286c703 +82e7ae23 +10000737 +2472703 +1071613 +1065613 +865613 +1071713 +84c7a023 +1075713 +84e7a223 +100713 +82e7a823 +286a783 +160737 +270713 +178793 +17f793 +2f6a423 +e787b3 +b79793 +10000737 +2f72023 +8067 +ffe67613 +c58633 +2b61a63 +107b7 +fff78793 +1055713 +4071063 +68a63 +107b7 +fff78793 +f50463 +f54533 +1051513 +1055513 +8067 +5c783 +15c703 +258593 +879793 +e7e7b3 +f50533 +fb5ff06f +f57533 +e50533 +fb5ff06f +f00037b7 +8207a023 +8007a823 +8007aa23 +8007ac23 +8007ae23 +8007a023 +b700713 +80e7a223 +b737 +71b70713 +80e7a423 +b72737 +b0070713 +80e7a623 +100713 +82e7a023 +82e7a223 +100613 +f0003737 +82872783 +82c72683 +879793 +d7e7b3 +83072683 +879793 +d7e7b3 +83472683 +879793 +d7e7b3 +79463 +8067 +82c72223 +fcdff06f +ff010113 +812423 +112623 +50413 +793 +600713 +f586b3 +6c503 +f406b3 +178793 +a68023 +fee796e3 +100007b7 +187c703 +1878793 +60513 +e40323 +17c703 +e403a3 +27c703 +e40423 +37c703 +e404a3 +47c703 +57c783 +e40523 +f405a3 +e9010ef +a40623 +855513 +a406a3 +c12083 +812403 +1010113 +8067 +100007b7 +207a503 +2a50513 +8067 +fd010113 +1412c23 +58a13 +100005b7 +2112623 +2812423 +2912223 +3212023 +1312e23 +1512a23 +c58713 +174683 +c5c783 +d7e7b3 +274683 +d7e7b3 +374683 +d7e7b3 +474683 +574703 +d7e7b3 +e7e7b3 +22078063 +2a60713 +3b00693 +50a93 +60913 +100007b7 +20e6f063 +10000437 +2042503 +1637 +80060613 +c58593 +1091993 +2e7a223 +109d993 +ed1ff0ef +2042483 +1c98513 +4500793 +1051513 +f48723 +487a3 +1055513 +5010ef +a48823 +855513 +a488a3 +2042483 +513 +7ec010ef +a48923 +855513 +a489a3 +2042483 +4537 +7d4010ef +a48a23 +855513 +a48aa3 +2042483 +4000793 +f48b23 +1100793 +f48ba3 +f106a3 +100007b7 +147a503 +48c23 +48ca3 +768010ef +855793 +f48da3 +1055793 +f48e23 +1855793 +f48ea3 +100007b7 +a48d23 +a12223 +87a503 +2042483 +738010ef +855793 +f48fa3 +1055793 +2f48023 +1855793 +2f480a3 +a48f23 +2042483 +100693 +1400613 +e48593 +a12423 +513 +cf5ff0ef +730010ef +a48c23 +855513 +a48ca3 +2042483 +a8513 +718010ef +2a48123 +855513 +2a481a3 +2042483 +a0513 +700010ef +2a48223 +855513 +2a482a3 +898513 +1051513 +2042483 +1055513 +6e0010ef +2042403 +855793 +2a48323 +2f483a3 +a11723 +2040423 +20404a3 +693 +c00613 +410593 +513 +10623 +c6dff0ef +197793 +78863 +12407b3 +2078523 +190913 +100693 +890613 +2240593 +c49ff0ef +684010ef +2a40423 +855513 +2a404a3 +bc1ff0ef +100513 +2c12083 +2812403 +2412483 +2012903 +1c12983 +1812a03 +1412a83 +3010113 +8067 +3c00713 +e01ff06f +513 +fd1ff06f +100007b7 +a7a223 +8067 +f00087b7 +100713 +84e7a623 +82e7a423 +10000737 +793 +1870713 +600693 +f50633 +64803 +e78633 +178793 +1060023 +fed796e3 +100007b7 +b7aa23 +100007b7 +7a423 +100007b7 +7a623 +c78793 +79223 +100007b7 +207a423 +f00087b7 +8207ae23 +b0001737 +100007b7 +2e7a023 +100007b7 +b0000737 +2e7a623 +100007b7 +7a223 +8067 +f0008737 +82872783 +17f793 +48078463 +80072783 +1606b7 +fd010113 +ff7f793 +d787b3 +2812423 +b79793 +10000437 +2f42623 +80472783 +80872683 +2912223 +879793 +d7e7b3 +80c72683 +879793 +81072703 +d7e7b3 +879793 +e7e7b3 +100004b7 +2112623 +2f4a823 +3212023 +1312e23 +1412c23 +1512a23 +175010ef +2c42783 +c7c503 +d7c783 +879793 +a7e533 +558010ef +17b7 +80678793 +2af51063 +304a703 +3b00793 +ee7f063 +2c42403 +10000a37 +20a2483 +f44783 +e44503 +879793 +a7e533 +520010ef +100793 +50913 +af51a63 +1144783 +1044503 +879793 +a7e533 +500010ef +80050513 +8051c63 +1244703 +600793 +8f71663 +1344703 +400793 +8f71063 +1544783 +1444503 +879793 +a7e533 +4cc010ef +200793 +8f51a63 +1d44503 +1c44783 +851513 +f56533 +1e44783 +1079793 +a7e7b3 +1f44503 +1851513 +f56533 +464010ef +100007b7 +87a783 +2f51663 +10000737 +793 +c70713 +600693 +f40633 +1664583 +e78633 +178793 +b60023 +fed796e3 +2c12083 +2812403 +f00087b7 +100713 +82e7a423 +2412483 +2012903 +1c12983 +1812a03 +1412a83 +3010113 +8067 +1544783 +1444503 +879793 +a7e533 +420010ef +fb251ee3 +2744503 +2644783 +851513 +f56533 +2844783 +1079793 +a7e7b3 +2944503 +1851513 +f56533 +3bc010ef +100007b7 +147a703 +78993 +f8e510e3 +20a2503 +1ab7 +1640913 +806a8613 +90593 +a29ff0ef +3c00713 +100007b7 +100513 +2e7a223 +368010ef +a48723 +855513 +a487a3 +800a8513 +354010ef +600793 +a48823 +f48923 +855513 +400793 +f489a3 +a488a3 +200513 +330010ef +a48a23 +855513 +a48aa3 +149a503 +2e8010ef +855793 +a48e23 +f48ea3 +10000737 +1055793 +1855513 +f48f23 +a48fa3 +793 +1870713 +600693 +e78633 +64583 +f48633 +178793 +b60b23 +fed796e3 +1d44503 +1c44783 +2048493 +851513 +f56533 +1e44783 +1c40413 +1079793 +a7e7b3 +344503 +1851513 +f56533 +2bc010ef +26c010ef +855793 +a48323 +f483a3 +1055793 +1855513 +f48423 +a484a3 +90593 +5c783 +158593 +148493 +fef48fa3 +fe8598e3 +fb4ff0ef +e51ff06f +2c42783 +c7c503 +d7c783 +879793 +a7e533 +298010ef +80050513 +e20518e3 +304a703 +2900793 +e2e7f2e3 +2c42403 +4500793 +e44703 +e0f71ae3 +1144783 +1044503 +879793 +a7e533 +260010ef +1b00793 +dea7fce3 +1744703 +1100793 +def716e3 +1f44503 +1e44783 +851513 +f56533 +2044783 +1079793 +a7e7b3 +2144503 +1851513 +f56533 +1ec010ef +100007b7 +147a783 +daf51ae3 +2744783 +2644503 +879793 +a7e533 +200010ef +700793 +d8a7fce3 +100007b7 +47a483 +d80486e3 +1b44503 +1a44783 +851513 +f56533 +1c44783 +1079793 +a7e7b3 +1d44503 +1851513 +f56533 +18c010ef +2344783 +50913 +2244503 +879793 +a7e533 +1a8010ef +a12623 +2544783 +2444503 +879793 +a7e533 +190010ef +a12423 +2744783 +2644503 +879793 +a7e533 +178010ef +812603 +c12583 +ff850713 +2a40693 +90513 +480e7 +cfdff06f +8067 +100007b7 +87a703 +fc010113 +3412423 +100006b7 +2112e23 +2812c23 +2912a23 +3212823 +3312623 +3512223 +3612023 +1712e23 +1812c23 +1912a23 +1a12823 +1b12623 +c68a13 +2a71063 +713 +600613 +ea05b3 +5c583 +18059e63 +170713 +fec718e3 +100009b7 +50493 +a7a423 +6a623 +a1223 +6400913 +10000ab7 +1b37 +6c37 +10000cb7 +3c00d93 +10000d37 +1898993 +600b93 +20aa503 +806b0613 +530c0593 +f08ff0ef +20aa403 +100513 +3bca223 +4c010ef +a40723 +855513 +a407a3 +800b0513 +38010ef +600793 +a40823 +f40923 +855513 +400793 +f409a3 +a408a3 +100513 +14010ef +a40a23 +855513 +a40aa3 +14d2503 +7cd000ef +855793 +a40e23 +f40ea3 +1055793 +1855513 +f40f23 +a40fa3 +793 +1378733 +74683 +f40733 +178793 +d70b23 +ff7796e3 +48513 +78d000ef +855793 +2a40323 +2f403a3 +1055793 +1855513 +2f40423 +2a404a3 +2040023 +20400a3 +2040123 +20401a3 +2040223 +20402a3 +18437 +cd0ff0ef +6a040413 +9ddff0ef +793 +fa0733 +74703 +4071e63 +178793 +ff7798e3 +fff40413 +fe0410e3 +fff90913 +ee0916e3 +513 +3c12083 +3812403 +3412483 +3012903 +2c12983 +2812a03 +2412a83 +2012b03 +1c12b83 +1812c03 +1412c83 +1012d03 +c12d83 +4010113 +8067 +100513 +fc1ff06f +6537 +ff010113 +ba850513 +112623 +812423 +2ec010ef +f0007437 +100793 +f42023 +d08ff0ef +42023 +812403 +c12083 +1010113 +cf4ff06f +fd010113 +3212023 +50913 +60513 +2112623 +2812423 +2912223 +1312e23 +60493 +b12623 +6e8000ef +c12583 +290413 +50993 +b900a3 +50613 +48593 +90023 +40513 +7d4000ef +1340533 +6f00793 +f500a3 +6300793 +f50123 +6500713 +7400793 +50023 +f501a3 +e50223 +f502a3 +50323 +48513 +68c000ef +2c12083 +2812403 +2412483 +2012903 +1c12983 +950513 +3010113 +8067 +300513 +14e57463 +27b7 +dda78793 +12f61e63 +fe010113 +912a23 +112e23 +812c23 +6c783 +16c603 +26c403 +879793 +c7e7b3 +36c603 +841413 +c46433 +1041413 +41045413 +1041493 +400613 +104d493 +2c79463 +100007b7 +2b79a23 +100007b7 +297ac23 +1c12083 +1812403 +1412483 +2010113 +8067 +fe0486e3 +aa79263 +fff48613 +961513 +10000637 +3c62603 +468793 +ffc70813 +a60633 +e686b3 +6d79663 +10000737 +4472783 +10787b3 +4f72223 +1ff00793 +107e863 +100007b7 +100713 +4e7a023 +b12623 +c88ff0ef +400793 +f500a3 +84d793 +50023 +f50123 +8501a3 +1812403 +c12583 +1c12083 +1412483 +2537 +400613 +dda50513 +2010113 +c5cff06f +7c703 +160613 +178793 +fee60fa3 +f85ff06f +500713 +f4e790e3 +100007b7 +fff00713 +4e7a223 +100007b7 +100713 +4e7a023 +f25ff06f +8067 +fd010113 +2812423 +1512a23 +1612823 +2112623 +2912223 +3212023 +1312e23 +1412c23 +1712623 +58a93 +60b13 +68413 +b99ff0ef +8050a63 +3537 +1a050513 +e58ff0ef +100007b7 +100004b7 +10000937 +29b7 +287ae23 +404a223 +4092023 +500413 +dda98993 +1e8bb7 +b9cff0ef +b0613 +100593 +d8dff0ef +50613 +a8593 +98513 +b90ff0ef +480b8a13 +ea0ff0ef +444a703 +e04a63 +4092783 +79663 +fffa0a13 +fe0a14e3 +4092783 +ae04a63 +a079863 +fff40413 +fa0418e3 +513 +dd4ff0ef +fff00513 +5c0006f +444aa03 +8ea0063 +15a77b3 +98b93 +2079463 +140b93 +347413 +1640433 +44503 +b8413 +98b93 +629000ef +800513 +621000ef +e28ff0ef +a0713 +b8793 +4092683 +fa068ce3 +513 +d78ff0ef +444a503 +2c12083 +2812403 +2412483 +2012903 +1c12983 +1812a03 +1412a83 +1012b03 +c12b83 +3010113 +8067 +70a13 +fff78b93 +fa0796e3 +f61ff06f +b727b7 +8ab7 +b729b7 +6b37 +413 +b0078793 +fffa8a93 +aff98993 +bbcb0b13 +f8dff06f +fb010113 +3312e23 +3612823 +3712623 +4112623 +4812423 +4912223 +5212023 +3412c23 +3512a23 +3812423 +3912223 +3a12023 +1b12e23 +58b13 +60b93 +68993 +e12423 +9f5ff0ef +8050a63 +3537 +1a050513 +cb4ff0ef +a20ff0ef +100007b7 +100004b7 +2a37 +10000937 +407a223 +404a023 +500413 +ddaa0a13 +1e8c37 +90d13 +fff00c93 +9f0ff0ef +b8613 +200593 +be1ff0ef +50613 +b0593 +a0513 +9e4ff0ef +480c0d93 +3992c23 +cf0ff0ef +3892a83 +20a8663 +404a783 +79a63 +fffd8d93 +fe0d92e3 +fff40413 +fa041ce3 +513 +c30ff0ef +fff00413 +b40006f +2a37 +413 +20000d93 +10000cb7 +ddaa0a13 +812783 +1ff40693 +1a8a93 +20000b93 +f6c463 +40878bb3 +10a9913 +1095913 +895913 +500b13 +4b8c13 +954ff0ef +300793 +f500a3 +50023 +1250123 +15501a3 +b8613 +98593 +450513 +34c000ef +34cd583 +c0613 +a0513 +930ff0ef +b727b7 +b0078613 +c12623 +c38ff0ef +404a583 +f60592e3 +38d2583 +c12603 +5559c63 +1740433 +17989b3 +f7bb88e3 +513 +b78ff0ef +40513 +4c12083 +4812403 +4412483 +4012903 +3c12983 +3812a03 +3412a83 +3012b03 +2c12b83 +2812c03 +2412c83 +2012d03 +1c12d83 +5010113 +8067 +fff60613 +f80616e3 +fffb0b13 +f40b12e3 +ef1ff06f +ff5f593 +54783 +b79463 +8067 +78663 +150513 +fedff06f +513 +8067 +54703 +2071263 +513 +8067 +fee68ee3 +178793 +7c683 +fe069ae3 +150513 +fddff06f +58793 +fedff06f +b505b3 +ff67613 +b50663 +54783 +79663 +513 +8067 +fef60ee3 +150513 +fe5ff06f +50793 +158593 +fff5c703 +178793 +fee78fa3 +fe0718e3 +8067 +c50633 +50793 +c79463 +8067 +5c703 +e78023 +70463 +158593 +178793 +fe5ff06f +158593 +54703 +fff5c783 +40f707b3 +1879793 +4187d793 +79663 +150513 +fe0710e3 +78513 +8067 +713 +c71863 +793 +78513 +8067 +e507b3 +7c683 +e587b3 +7c783 +40f687b3 +1879793 +4187d793 +fc079ee3 +fc068ce3 +170713 +fc9ff06f +50793 +7c703 +178693 +71e63 +158593 +fff5c703 +178793 +fee78fa3 +fe0718e3 +8067 +68793 +fd9ff06f +50793 +61663 +8067 +68793 +7c703 +178693 +fe071ae3 +c78633 +158593 +fff5c703 +178793 +fee78fa3 +fc070ce3 +fec796e3 +78023 +8067 +50793 +7c703 +71663 +40a78533 +8067 +178793 +fedff06f +fe010113 +812c23 +b12623 +50413 +112e23 +fd1ff0ef +c12583 +a40533 +ff5f593 +54783 +b78863 +fff50513 +fe857ae3 +513 +1c12083 +1812403 +2010113 +8067 +b505b3 +50793 +b78663 +7c703 +71663 +40a78533 +8067 +178793 +fe9ff06f +793 +f50733 +74683 +68e63 +58713 +c0006f +d60c63 +170713 +74603 +fe061ae3 +78513 +8067 +178793 +fd1ff06f +713 +e61663 +793 +200006f +e507b3 +e586b3 +7c783 +6c683 +170713 +40d787b3 +fc078ee3 +78513 +8067 +c50633 +50793 +c79463 +8067 +178793 +feb78fa3 +ff1ff06f +793 +f61463 +8067 +f58733 +74683 +f50733 +178793 +d70023 +fe5ff06f +2a5fa63 +fff64693 +793 +fff78793 +2f69663 +8067 +f58733 +74683 +f50733 +178793 +d70023 +fef616e3 +8067 +793 +ff5ff06f +f60733 +e58833 +84803 +e50733 +1070023 +fbdff06f +fe010113 +812c23 +50413 +58513 +1312623 +112e23 +912a23 +1212823 +1412423 +58993 +e51ff0ef +4050063 +50913 +40513 +e41ff0ef +50493 +a40a33 +409a0433 +124f663 +413 +1c0006f +90613 +98593 +40513 +fff48493 +ed5ff0ef +fc051ee3 +40513 +1c12083 +1812403 +1412483 +1012903 +c12983 +812a03 +2010113 +8067 +c50633 +ff5f593 +c51663 +513 +8067 +54703 +150793 +feb70ae3 +78513 +fe5ff06f +66b7 +50793 +54703 +bc468693 +4061e63 +3000513 +a00613 +4a71463 +17c703 +178513 +e68633 +64603 +267613 +60663 +fe070713 +ff77713 +5800613 +ac71063 +27c703 +e68733 +74703 +4477713 +8070663 +278793 +1000613 +513 +4c0006f +1000513 +fea61ae3 +3000513 +fea716e3 +17c703 +e68533 +54503 +257513 +50663 +fe070713 +ff77713 +5800513 +fca714e3 +278793 +fc1ff06f +2a60533 +178793 +e50533 +7c703 +e68833 +84803 +4487893 +88a63 +487893 +2088263 +fd070713 +fcc76ae3 +58463 +f5a023 +8067 +50793 +800613 +f79ff06f +287813 +80663 +fe070713 +ff77713 +fc970713 +fd1ff06f +54683 +2d00713 +e68463 +eedff06f +ff010113 +150513 +112623 +eddff0ef +c12083 +40a00533 +1010113 +8067 +66b7 +793 +bc468693 +a00593 +52603 +64703 +e68733 +74703 +477713 +71663 +78513 +8067 +2b787b3 +160713 +e52023 +64703 +e787b3 +fd078793 +fc9ff06f +68b7 +bc488893 +4087313 +12888e13 +30463 +10088e13 +1087893 +88463 +ffe87813 +ffe68313 +2200e93 +893 +246ee263 +187893 +fb010113 +3000f93 +89463 +2000f93 +287893 +313 +88a63 +8065663 +40c00633 +fff70713 +2d00313 +2087293 +28863 +1000893 +9169c63 +ffe70713 +a061063 +3000613 +c10623 +100893 +88613 +f8d463 +78613 +1187793 +40c70733 +c078e63 +30863 +b57463 +650023 +150513 +28e63 +800793 +cf69863 +b57663 +3000793 +f50023 +150513 +1087813 +10080a63 +c50633 +3000693 +1200006f +487893 +88863 +fff70713 +2b00313 +f75ff06f +887893 +f60886e3 +fff70713 +2000313 +f61ff06f +800893 +f71696e3 +fff70713 +f65ff06f +c10e93 +893 +2d67f33 +188893 +1e8e93 +1ee0f33 +f4f03 +ffee8fa3 +2d65f33 +f4d666e3 +f0613 +fddff06f +b7f463 +778023 +178793 +40ff0eb3 +ffd048e3 +70793 +75463 +793 +fff70713 +f50533 +40f70733 +f2dff06f +50793 +e50f33 +2000393 +fd1ff06f +1000793 +f4f690e3 +b57663 +3000793 +f50023 +150793 +b7f663 +21e4783 +f500a3 +250513 +f1dff06f +b7f463 +1f78023 +178793 +40f806b3 +fed048e3 +70793 +75463 +793 +fff70713 +f50533 +40f70733 +ef5ff06f +50793 +e50833 +fd5ff06f +b57463 +d50023 +150513 +40a607b3 +fef8c8e3 +88793 +50693 +fff00613 +fff78793 +2c79a63 +1150533 +50793 +e50633 +2000813 +40f606b3 +2d04c63 +75463 +713 +e508b3 +88513 +5010113 +8067 +b6fa63 +c10813 +f80833 +84803 +1068023 +168693 +fb1ff06f +b7f463 +1078023 +178793 +fb9ff06f +88513 +8067 +ff010113 +812423 +112623 +58413 +2cd000ef +856463 +fff40513 +c12083 +812403 +1010113 +8067 +fc010113 +2d12623 +2c10693 +112e23 +2e12823 +2f12a23 +3012c23 +3112e23 +d12623 +28d000ef +1c12083 +4010113 +8067 +fc010113 +2d12623 +2c10693 +812c23 +112e23 +58413 +2e12823 +2f12a23 +3012c23 +3112e23 +d12623 +251000ef +856463 +fff40513 +1c12083 +1812403 +4010113 +8067 +60693 +58613 +800005b7 +fff5c593 +2250006f +fc010113 +2c12423 +58613 +800005b7 +2d12623 +fff5c593 +2810693 +112e23 +2e12823 +2f12a23 +3012c23 +3112e23 +d12623 +1ed000ef +1c12083 +4010113 +8067 +10000737 +4872783 +8100513 +2f50533 +361967b7 +2e978793 +f50533 +4a72423 +8067 +100007b7 +4a7a423 +8067 +6537 +ff010113 +d1450513 +112623 +434000ef +6f +1851713 +1855793 +106b7 +e7e7b3 +f0068693 +855713 +d77733 +e7e7b3 +851513 +ff0737 +e57533 +a7e533 +8067 +851793 +855513 +a7e533 +1051513 +1055513 +8067 +1851713 +1855793 +106b7 +e7e7b3 +f0068693 +855713 +d77733 +e7e7b3 +851513 +ff0737 +e57533 +a7e533 +8067 +851793 +855513 +a7e533 +1051513 +1055513 +8067 +66b7 +793 +b505b3 +d2068693 +40a58733 +e04663 +78513 +8067 +150513 +fff54603 +87d713 +879793 +c74733 +271713 +e68733 +75703 +1079793 +107d793 +f747b3 +fc5ff06f +66b7 +50713 +fff00793 +b508b3 +700813 +12068693 +40e88633 +4c86e63 +35d713 +371693 +d50533 +ff800693 +2d70733 +b705b3 +2058c63 +66b7 +b505b3 +12068693 +150513 +fff54703 +f74733 +ff77713 +271713 +e68733 +72703 +87d793 +f747b3 +fcb51ee3 +fff7c513 +8067 +74603 +870713 +f64633 +ff67613 +261613 +c68633 +62603 +87d793 +f647b3 +ff974603 +f64633 +ff67613 +261613 +c68633 +62603 +87d793 +f64633 +ffa74783 +c7c7b3 +ff7f793 +279793 +f687b3 +7a303 +ffb74783 +865613 +c34333 +67c7b3 +ff7f793 +279793 +f687b3 +7a603 +ffc74783 +835313 +664633 +c7c7b3 +ff7f793 +279793 +f687b3 +7a303 +ffd74783 +865613 +c34333 +67c7b3 +ff7f793 +279793 +f687b3 +7a783 +ffe74603 +835313 +67c7b3 +f64633 +ff67613 +261613 +c68633 +62303 +fff74603 +87d793 +f34333 +664633 +ff67613 +261613 +c68633 +62783 +835313 +67c7b3 +e9dff06f +100007b7 +4a7aa23 +8067 +100007b7 +4a7a823 +100007b7 +4b7a623 +8067 +ff010113 +912223 +ff57493 +812423 +50413 +48513 +112623 +384000ef +100007b7 +547a783 +78663 +48513 +780e7 +a00793 +f41663 +d00513 +fc1ff0ef +40513 +c12083 +812403 +412483 +1010113 +8067 +ff010113 +812423 +112623 +10000437 +318000ef +50a63 +812403 +c12083 +1010113 +2b00006f +4c42783 +fe0782e3 +780e7 +fc050ee3 +812403 +100007b7 +c12083 +507a303 +1010113 +30067 +ff010113 +112623 +2d0000ef +2051263 +100007b7 +4c7a783 +78663 +780e7 +a03533 +c12083 +1010113 +8067 +100513 +ff1ff06f +ff010113 +812423 +112623 +50413 +44503 +2051063 +a00513 +f01ff0ef +c12083 +812403 +100513 +1010113 +8067 +ee9ff0ef +140413 +fd5ff06f +ff010113 +812423 +112623 +50413 +44503 +51a63 +c12083 +812403 +1010113 +8067 +eb5ff0ef +140413 +fe1ff06f +ef010113 +58693 +50613 +10000593 +10513 +10112623 +10812423 +abdff0ef +10010793 +50413 +a787b3 +10513 +f0078023 +f99ff0ef +40513 +10c12083 +10812403 +11010113 +8067 +fc010113 +2b12223 +2410593 +112e23 +2c12423 +2d12623 +2e12823 +2f12a23 +3012c23 +3112e23 +b12623 +f89ff0ef +1c12083 +4010113 +8067 +400f +13 +13 +13 +13 +13 +8067 +cc0027f3 +c79693 +147d713 +c6d693 +793 +d7e463 +8067 +78513 +7005500f +e787b3 +fedff06f +c00007b7 +c0004737 +7a683 +478793 +fee79ce3 +8067 +f00027b7 +40078713 +7a683 +478793 +150513 +fed50fa3 +fee798e3 +8067 +f00027b7 +8107a703 +277793 +2078463 +100005b7 +f00026b7 +10000637 +10000837 +6858593 +200893 +8086a783 +ff7f793 +78863 +177713 +2071c63 +8067 +6462783 +6082503 +178793 +7f7f793 +f50c63 +6462503 +8006a303 +6f62223 +a58533 +650023 +8116a823 +fbdff06f +100713 +f00027b7 +100006b7 +80e7a823 +100005b7 +10000737 +f0002637 +6868693 +5872503 +5c5a783 +f50863 +80462783 +ff7f793 +78463 +8067 +5872783 +f687b3 +807c783 +80f62023 +5872783 +178793 +7f7f793 +4f72c23 +fc5ff06f +30002673 +10000737 +867613 +6072783 +70693 +10000737 +2060663 +6472603 +fef60ee3 +10000737 +6870713 +f70733 +178793 +7f7f793 +74503 +6f6a023 +100006f +6472703 +513 +fcf71ce3 +8067 +10000737 +100007b7 +647a783 +6072503 +40f50533 +a03533 +8067 +100006b7 +5c6a603 +160793 +7f7f793 +300025f3 +85f593 +10000737 +4058663 +5872583 +fef58ee3 +bc0025f3 +ffe5f813 +bc081073 +5872703 +e61a63 +f0002837 +80482703 +ff77713 +2070663 +10000737 +6870713 +c70733 +8a70023 +4f6ae23 +bc059073 +c0006f +5872583 +faf59ee3 +8067 +80a82023 +fe9ff06f +100007b7 +607a223 +100007b7 +607a023 +100007b7 +407ae23 +100007b7 +407ac23 +f00027b7 +8107a703 +ff77713 +80e7a823 +300713 +80e7aa23 +bc0027f3 +17e793 +bc079073 +8067 +100007b7 +5c7a783 +100006b7 +586a703 +fef71ee3 +8067 +ff010113 +12623 +6300713 +c12783 +f75663 +1010113 +8067 +c12783 +178793 +f12623 +fe5ff06f +fe010113 +812c23 +2000413 +40b40433 +912a23 +1212823 +1312623 +1412423 +1512223 +1612023 +112e23 +58913 +851433 +f00074b7 +200993 +300a93 +600a13 +700b13 +4045663 +144a223 +f85ff0ef +164a223 +f7dff0ef +144a223 +fff90913 +141413 +fe0910e3 +1c12083 +1812403 +1412483 +1012903 +c12983 +812a03 +412a83 +12b03 +2010113 +8067 +134a223 +f3dff0ef +154a223 +f35ff0ef +134a223 +fb9ff06f +ff010113 +812423 +912223 +f0007437 +100493 +112623 +f11ff0ef +942223 +f09ff0ef +42223 +f01ff0ef +942223 +ef9ff0ef +c12083 +42223 +812403 +412483 +1010113 +8067 +fe010113 +112e23 +c12623 +812c23 +912a23 +f00077b7 +200713 +e7a223 +50493 +58413 +fff00513 +2000593 +ed9ff0ef +200593 +100513 +ecdff0ef +200593 +100513 +ec1ff0ef +48513 +500593 +eb5ff0ef +40513 +500593 +ea9ff0ef +200593 +200513 +e9dff0ef +c12603 +1000593 +60513 +e8dff0ef +1812403 +1c12083 +1412483 +2010113 +f25ff06f +fe010113 +112e23 +f00077b7 +200713 +812c23 +912a23 +1212823 +1312623 +1412423 +e7a223 +50493 +58413 +fff00513 +2000593 +e3dff0ef +200593 +100513 +e31ff0ef +200593 +200513 +e25ff0ef +48513 +500593 +e19ff0ef +40513 +500593 +f00079b7 +e09ff0ef +1000493 +eadff0ef +413 +498913 +100a13 +89a783 +141413 +17f793 +78463 +146413 +1492023 +dadff0ef +fff48493 +92023 +da1ff0ef +fc049ce3 +e71ff0ef +40513 +1c12083 +1812403 +1412483 +1012903 +c12983 +812a03 +2010113 +8067 +fc010113 +2112e23 +2812c23 +2912a23 +3212823 +3312623 +3412423 +3512223 +3612023 +1712e23 +1812c23 +1912a23 +1a12823 +c12623 +4c05c463 +b509b3 +50a13 +58a93 +68493 +a9f663 +fff54a93 +fff00993 +6b37 +6cb7 +a0413 +2500c13 +bc4b0b13 +2000b93 +520c8c93 +2bc0006f +1878a63 +1347463 +f40023 +140413 +29c0006f +913 +2b00713 +2d00613 +3000593 +2000513 +2300813 +c12683 +168793 +f12623 +16c783 +14e78063 +12f76263 +14a78063 +15078263 +1678733 +74703 +477713 +12070e63 +c10513 +984ff0ef +50713 +c12683 +2e00613 +fff00793 +6c583 +2c59e63 +168793 +f12623 +16c603 +cb07b3 +7c783 +47f793 +12078663 +c10513 +e12423 +944ff0ef +812703 +50793 +55463 +793 +c12683 +6800593 +6c603 +2b60263 +df67593 +4c00513 +a58c63 +5a00513 +a58863 +7400593 +fff00813 +2b61663 +60813 +168613 +c12623 +6c00613 +c81c63 +16c603 +1061863 +268693 +d12623 +4c00813 +c12683 +6c603 +6e00693 +2cd60c63 +ec6e063 +6300693 +14d60c63 +ac6ec63 +2d860c63 +5800693 +2cd60e63 +1347663 +2500793 +f40023 +c12783 +140713 +7c683 +2c068663 +1377463 +d400a3 +240413 +14c0006f +c78863 +eeb792e3 +196913 +ebdff06f +1096913 +eb5ff06f +496913 +eadff06f +896913 +ea5ff06f +2096913 +e9dff06f +2a00613 +fff00713 +ecc796e3 +4a703 +268693 +d12623 +448493 +ea075ce3 +40e00733 +1096913 +eadff06f +2a00593 +793 +eeb616e3 +268693 +4a503 +d12623 +448493 +ecdff06f +6400693 +d60663 +6900693 +f4d616e3 +296913 +a00693 +680006f +7300693 +14d60863 +4c6e463 +6f00693 +22d60063 +7000693 +f2d612e3 +fff00693 +d71663 +196913 +800713 +4a603 +448d13 +90813 +1000693 +40513 +98593 +ff1fe0ef +50413 +1640006f +7500693 +fad602e3 +7800593 +1000693 +ecb61ee3 +4c00613 +1cc81863 +748493 +ff84f493 +848d13 +4a603 +1f80006f +1097913 +a090c63 +40793 +448693 +1347663 +4a603 +c40023 +140413 +e78733 +408707b3 +8f04e63 +68493 +c12783 +178793 +f12623 +c12783 +7c783 +d40790e3 +a8663 +1b347c63 +40023 +41440533 +3c12083 +3812403 +3412483 +3012903 +2c12983 +2812a03 +2412a83 +2012b03 +1c12b83 +1812c03 +1412c83 +1012d03 +4010113 +8067 +1347463 +1740023 +140413 +fff78793 +fef048e3 +fff70793 +e04463 +100713 +40e78733 +170713 +f51ff06f +70793 +fddff06f +1347463 +1740023 +140413 +f55ff06f +448d13 +4a483 +49463 +c8493 +78593 +48513 +e12423 +1097913 +b61fe0ef +812703 +91863 +70793 +fff70713 +2f54863 +793 +2a7cc63 +50793 +55463 +793 +f40433 +e40733 +408707b3 +2f54c63 +d0493 +efdff06f +1347463 +1740023 +140413 +fbdff06f +f406b3 +136f863 +f48633 +64603 +c68023 +178793 +fb1ff06f +1347463 +1740023 +140413 +fb9ff06f +4a783 +41440733 +448493 +e7a023 +eadff06f +c13474e3 +1840023 +c01ff06f +4096913 +1000693 +e49ff06f +fff78793 +f12623 +70413 +e85ff06f +800693 +e31ff06f +6c00613 +448d13 +e2c80ce3 +fdf87613 +5a00593 +e2b606e3 +7400613 +e2c802e3 +6800613 +297593 +e0c81ce3 +4a603 +1061613 +59863 +1065613 +90813 +dc5ff06f +41065613 +ff5ff06f +fe098fa3 +e4dff06f +513 +e49ff06f +0 +f0004018 +f000404c +f0004080 +f00040b4 +f0004028 +f000405c +f0004090 +f00040c4 +616c6564 +203a7379 +0 +2d +64323025 +30252d2b +6432 +41524453 +6f6e204d +6e752077 +20726564 +74666f73 +65726177 +6e6f6320 +6c6f7274 +a +41524453 +6f6e204d +6e752077 +20726564 +64726168 +65726177 +6e6f6320 +6c6f7274 +a +63657250 +67726168 +a6465 +6f636e69 +63657272 +6f722074 +a77 +69746341 +65746176 +6f722064 +64252077 +a +78323025 +0 +72726473 +613c2064 +65726464 +a3e7373 +0 +6f636e69 +63657272 +64612074 +73657264 +a73 +6f636e69 +63657272 +51442074 +a +72726473 +72726564 +6f633c20 +3e746e75 +a +6f636e69 +63657272 +6f632074 +a746e75 +0 +783225 +77726473 +613c2072 +65726464 +a3e7373 +0 +746d654d +20747365 +20737562 +6c696166 +203a6465 +252f6425 +72652064 +73726f72 +a +746d654d +20747365 +61746164 +69616620 +3a64656c +2f642520 +65206425 +726f7272 +a73 +746d654d +20747365 +72646461 +69616620 +3a64656c +2f642520 +65206425 +726f7272 +a73 +746d654d +20747365 +a4b4f +64616552 +76656c20 +6e696c65 +a3a67 +2c64256d +64256220 +7c203a +6425 +207c +74736562 +256d203a +62202c64 +206425 +74696e49 +696c6169 +676e697a +52445320 +2e2e4d41 +a2e +6d315b1b +20202020 +20202020 +20205f5f +5f205f20 +2020205f +5f202020 +5f5f2020 +6d305b1b +a +6d315b1b +20202020 +2f202020 +20202f20 +20295f28 +5f5f5f2f +207c205f +2f5f2f7c +6d305b1b +a +6d315b1b +20202020 +202f2020 +2f5f5f2f +5f202f20 +2d202f5f +203e295f +5b1b3c20 +a6d30 +6d315b1b +20202020 +5f5f2f20 +5f2f5f5f +5f5f5c2f +5f5f5c2f +7c2f5f2f +5b1b7c5f +a6d30 +29632820 +706f4320 +67697279 +32207468 +2d323130 +39313032 +6a6e4520 +442d796f +74696769 +a6c61 +4f494220 +75622053 +20746c69 +46206e6f +32206265 +30322031 +31203032 +34303a35 +a35353a +0 +4f494220 +52432053 +61702043 +64657373 +30252820 +a297838 +0 +4f494220 +52432053 +61662043 +64656c69 +78652820 +74636570 +25206465 +2c783830 +746f6720 +38302520 +a2978 +65685420 +73797320 +206d6574 +6c6c6977 +6e6f6320 +756e6974 +62202c65 +65207475 +63657078 +72702074 +656c626f +a2e736d +0 +67694d20 +67206e65 +73207469 +3a316168 +31316420 +61353635 +a +74694c20 +67205865 +73207469 +3a316168 +62323020 +35616466 +a65 +3d3d2d2d +3d3d3d3d +3d3d3d3d +3d3d3d3d +5b1b203d +6f536d31 +305b1b43 +3d3d206d +3d3d3d3d +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +6d315b1b +1b555043 +3a6d305b +20202020 +202020 +52786556 +76637369 +0 +25204020 +7a484d64 +a +6d315b1b +1b4d4f52 +3a6d305b +20202020 +25202020 +a424b64 +0 +6d315b1b +4d415253 +6d305b1b +2020203a +25202020 +a424b64 +0 +6d315b1b +5b1b324c +203a6d30 +20202020 +25202020 +a424b64 +0 +6d315b1b +4e49414d +4d41522d +6d305b1b +2520203a +a424b64 +0 +3d3d2d2d +3d3d3d3d +3d3d3d3d +315b1b20 +696e496d +6c616974 +74617a69 +1b6e6f69 +206d305b +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +6f6d654d +69207972 +6974696e +7a696c61 +6f697461 +6166206e +64656c69 +a +3d3d2d2d +3d3d3d3d +3d3d3d3d +3d3d3d3d +315b1b20 +6f6f426d +305b1b74 +3d3d206d +3d3d3d3d +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +62206f4e +20746f6f +6964656d +66206d75 +646e756f +a +3d3d2d2d +3d3d3d3d +3d3d3d3d +203d3d3d +6d315b1b +736e6f43 +1b656c6f +206d305b +3d3d3d3d +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +32395b1b +6c6d313b +78657469 +6d305b1b +203e +82008 +726d +3c20726d +72646461 +3e737365 +656c5b20 +6874676e +a5d +6f636e69 +63657272 +656c2074 +6874676e +a +6f6d654d +64207972 +3a706d75 +0 +2578300a +20783830 +20 +78323025 +20 +2e +6325 +776d +3c20776d +72646461 +3e737365 +61763c20 +3e65756c +6f635b20 +5d746e75 +a +6f636e69 +63657272 +61762074 +a65756c +0 +636d +3c20636d +3e747364 +72733c20 +5b203e63 +6e756f63 +a5d74 +6f636e69 +63657272 +65642074 +6e697473 +6f697461 +6461206e +73657264 +a73 +6f636e69 +63657272 +6f732074 +65637275 +64646120 +73736572 +a +6f69646d +77 +6f69646d +703c2077 +64617968 +3c203e72 +3e676572 +61763c20 +3e65756c +a +6f636e69 +63657272 +68702074 +72646179 +a +6f636e69 +63657272 +65722074 +a67 +6f636e69 +63657272 +61762074 +a6c +6f69646d +72 +6f69646d +703c2072 +64617968 +3c203e72 +3e676572 +a +20676572 +203a6425 +30257830 +a7834 +6f69646d +64 +6f69646d +703c2064 +64617968 +3c203e72 +6e756f63 +a3e74 +4f49444d +6d756420 +30402070 +3a782578 +a +637263 +20637263 +6464613c +73736572 +6c3c203e +74676e65 +a3e68 +33435243 +25203a32 +a783830 +0 +6e656469 +74 +6e656449 +25203a74 +a73 +73756c66 +326c68 +6f626572 +746f +73616c66 +6f6f6268 +74 +69726573 +6f626c61 +746f +6274656e +746f6f +706c6568 +0 +6574694c +49422058 +202c534f +69617661 +6c62616c +6f632065 +6e616d6d +3a7364 +2020726d +20202020 +2d202020 +61657220 +64612064 +73657264 +70732073 +656361 +2020776d +20202020 +2d202020 +69727720 +61206574 +65726464 +73207373 +65636170 +0 +2020636d +20202020 +2d202020 +706f6320 +64612079 +73657264 +70732073 +656361 +6f69646d +20202077 +2d202020 +69727720 +4d206574 +204f4944 +69676572 +72657473 +0 +6f69646d +20202072 +2d202020 +61657220 +444d2064 +72204f49 +73696765 +726574 +6f69646d +20202064 +2d202020 +6d756420 +444d2070 +72204f49 +73696765 +73726574 +0 +20637263 +20202020 +2d202020 +6d6f6320 +65747570 +43524320 +6f203233 +20612066 +74726170 +20666f20 +20656874 +72646461 +20737365 +63617073 +65 +6e656469 +20202074 +2d202020 +73696420 +79616c70 +65646920 +6669746e +726569 +6f626572 +2020746f +2d202020 +73657220 +70207465 +65636f72 +726f7373 +0 +6274656e +20746f6f +2d202020 +6f6f6220 +69762074 +46542061 +5054 +69726573 +6f626c61 +2d20746f +6f6f6220 +69762074 +46532061 +4c +73616c66 +6f6f6268 +2d202074 +6f6f6220 +72662074 +66206d6f +6873616c +0 +746d656d +20747365 +2d202020 +6e757220 +6d206120 +726f6d65 +65742079 +7473 +72726473 +776f +73726473 +77 +68726473 +77 +72726473 +66756264 +0 +72726473 +64 +72726473 +72726564 +0 +77726473 +72 +69726473 +74696e +6c726473 +6c657665 +0 +746d656d +747365 +6d6d6f43 +20646e61 +20746f6e +6e756f66 +a64 +21e0 +221c +2280 +221c +2110 +22b8 +44354c73 +6d4d5364 +726b656b +a6f +4849367a +59633747 +36444944 +a6f +6f727245 +49203a72 +6c61766e +69206469 +6567616d +6e656c20 +20687467 +30257830 +a7838 +20435243 +6c696166 +28206465 +65707865 +64657463 +38302520 +67202c78 +2520746f +29783830 +a +6e776f44 +64616f6c +25206465 +79622064 +20736574 +6d6f7266 +20732520 +7265766f +54465420 +6f742050 +25783020 +a783830 +0 +62616e55 +7420656c +6f64206f +6f6c6e77 +25206461 +766f2073 +54207265 +a505446 +0 +63657845 +6e697475 +6f622067 +6465746f +6f727020 +6d617267 +20746120 +30257830 +a0a7838 +0 +3d3d2d2d +3d3d3d3d +3d3d3d3d +203d3d3d +6d315b1b +7466694c +2166666f +6d305b1b +3d3d3d20 +3d3d3d3d +3d3d3d3d +3d3d3d3d +a2d2d +746f6f42 +20676e69 +6d6f7266 +72657320 +2e6c6169 +a2e2e +73657250 +20512073 +4520726f +74204353 +6261206f +2074726f +746f6f62 +6d6f6320 +74656c70 +2e796c65 +a +206f6f54 +796e616d +6e6f6320 +75636573 +65766974 +72726520 +2c73726f +6f626120 +6e697472 +67 +656d6954 +a74756f +0 +636e6143 +656c6c65 +a64 +746f6f42 +20676e69 +6d6f7266 +74656e20 +6b726f77 +a2e2e2e +0 +61636f4c +5049206c +25203a20 +64252e64 +2e64252e +a6425 +6f6d6552 +49206574 +25203a50 +64252e64 +2e64252e +a6425 +63746546 +676e6968 +6f726620 +55203a6d +252f5044 +a64 +67616d49 +65 +7774654e +206b726f +746f6f62 +69616620 +a64656c +0 +746f6f72 +632e7366 +6f6970 +72206f4e +66746f6f +70632e73 +66206f69 +646e756f +a +32337672 +6274642e +0 +72206f4e +2e323376 +20627464 +6e756f66 +a64 +6c756d65 +726f7461 +6e69622e +0 +65206f4e +616c756d +2e726f74 +206e6962 +6e756f66 +a64 +62616e55 +7420656c +6f64206f +6f6c6e77 +4c206461 +78756e69 +616d6920 +2c736567 +6c616620 +676e696c +63616220 +6f74206b +6f6f6220 +69622e74 +a6e +746f6f62 +6e69622e +0 +64616f4c +20676e69 +6c756d65 +726f7461 +6e69622e +6f726620 +6c66206d +2e687361 +a2e2e +64616f4c +20676e69 +67616d49 +72662065 +66206d6f +6873616c +a2e2e2e +0 +64616f4c +20676e69 +746f6f72 +632e7366 +206f6970 +6d6f7266 +616c6620 +2e2e6873 +a2e +64616f4c +20676e69 +32337672 +6274642e +6f726620 +6c66206d +2e687361 +a2e2e +746f6f42 +20676e69 +6d6f7266 +616c6620 +2e2e6873 +a2e +64616f4c +20676e69 +62206425 +73657479 +6f726620 +6c66206d +2e687361 +a2e2e +65687445 +74656e72 +696e6920 +2e2e2e74 +a +5c2d2f7c +0 +8080808 +8080808 +28282808 +8082828 +8080808 +8080808 +8080808 +8080808 +101010a0 +10101010 +10101010 +10101010 +4040404 +4040404 +10100404 +10101010 +41414110 +1414141 +1010101 +1010101 +1010101 +1010101 +10010101 +10101010 +42424210 +2424242 +2020202 +2020202 +2020202 +2020202 +10020202 +8101010 +0 +0 +0 +0 +0 +0 +0 +0 +101010a0 +10101010 +10101010 +10101010 +10101010 +10101010 +10101010 +10101010 +1010101 +1010101 +1010101 +1010101 +1010101 +10010101 +1010101 +2010101 +2020202 +2020202 +2020202 +2020202 +2020202 +10020202 +2020202 +2020202 +33323130 +37363534 +42413938 +46454443 +4a494847 +4e4d4c4b +5251504f +56555453 +5a595857 +0 +33323130 +37363534 +62613938 +66656463 +6a696867 +6e6d6c6b +7271706f +76757473 +7a797877 +0 +726f6241 +2e646574 +0 +0 +1021 +2042 +3063 +4084 +50a5 +60c6 +70e7 +8108 +9129 +a14a +b16b +c18c +d1ad +e1ce +f1ef +1231 +210 +3273 +2252 +52b5 +4294 +72f7 +62d6 +9339 +8318 +b37b +a35a +d3bd +c39c +f3ff +e3de +2462 +3443 +420 +1401 +64e6 +74c7 +44a4 +5485 +a56a +b54b +8528 +9509 +e5ee +f5cf +c5ac +d58d +3653 +2672 +1611 +630 +76d7 +66f6 +5695 +46b4 +b75b +a77a +9719 +8738 +f7df +e7fe +d79d +c7bc +48c4 +58e5 +6886 +78a7 +840 +1861 +2802 +3823 +c9cc +d9ed +e98e +f9af +8948 +9969 +a90a +b92b +5af5 +4ad4 +7ab7 +6a96 +1a71 +a50 +3a33 +2a12 +dbfd +cbdc +fbbf +eb9e +9b79 +8b58 +bb3b +ab1a +6ca6 +7c87 +4ce4 +5cc5 +2c22 +3c03 +c60 +1c41 +edae +fd8f +cdec +ddcd +ad2a +bd0b +8d68 +9d49 +7e97 +6eb6 +5ed5 +4ef4 +3e13 +2e32 +1e51 +e70 +ff9f +efbe +dfdd +cffc +bf1b +af3a +9f59 +8f78 +9188 +81a9 +b1ca +a1eb +d10c +c12d +f14e +e16f +1080 +a1 +30c2 +20e3 +5004 +4025 +7046 +6067 +83b9 +9398 +a3fb +b3da +c33d +d31c +e37f +f35e +2b1 +1290 +22f3 +32d2 +4235 +5214 +6277 +7256 +b5ea +a5cb +95a8 +8589 +f56e +e54f +d52c +c50d +34e2 +24c3 +14a0 +481 +7466 +6447 +5424 +4405 +a7db +b7fa +8799 +97b8 +e75f +f77e +c71d +d73c +26d3 +36f2 +691 +16b0 +6657 +7676 +4615 +5634 +d94c +c96d +f90e +e92f +99c8 +89e9 +b98a +a9ab +5844 +4865 +7806 +6827 +18c0 +8e1 +3882 +28a3 +cb7d +db5c +eb3f +fb1e +8bf9 +9bd8 +abbb +bb9a +4a75 +5a54 +6a37 +7a16 +af1 +1ad0 +2ab3 +3a92 +fd2e +ed0f +dd6c +cd4d +bdaa +ad8b +9de8 +8dc9 +7c26 +6c07 +5c64 +4c45 +3ca2 +2c83 +1ce0 +cc1 +ef1f +ff3e +cf5d +df7c +af9b +bfba +8fd9 +9ff8 +6e17 +7e36 +4e55 +5e74 +2e93 +3eb2 +ed1 +1ef0 +0 +77073096 +ee0e612c +990951ba +76dc419 +706af48f +e963a535 +9e6495a3 +edb8832 +79dcb8a4 +e0d5e91e +97d2d988 +9b64c2b +7eb17cbd +e7b82d07 +90bf1d91 +1db71064 +6ab020f2 +f3b97148 +84be41de +1adad47d +6ddde4eb +f4d4b551 +83d385c7 +136c9856 +646ba8c0 +fd62f97a +8a65c9ec +14015c4f +63066cd9 +fa0f3d63 +8d080df5 +3b6e20c8 +4c69105e +d56041e4 +a2677172 +3c03e4d1 +4b04d447 +d20d85fd +a50ab56b +35b5a8fa +42b2986c +dbbbc9d6 +acbcf940 +32d86ce3 +45df5c75 +dcd60dcf +abd13d59 +26d930ac +51de003a +c8d75180 +bfd06116 +21b4f4b5 +56b3c423 +cfba9599 +b8bda50f +2802b89e +5f058808 +c60cd9b2 +b10be924 +2f6f7c87 +58684c11 +c1611dab +b6662d3d +76dc4190 +1db7106 +98d220bc +efd5102a +71b18589 +6b6b51f +9fbfe4a5 +e8b8d433 +7807c9a2 +f00f934 +9609a88e +e10e9818 +7f6a0dbb +86d3d2d +91646c97 +e6635c01 +6b6b51f4 +1c6c6162 +856530d8 +f262004e +6c0695ed +1b01a57b +8208f4c1 +f50fc457 +65b0d9c6 +12b7e950 +8bbeb8ea +fcb9887c +62dd1ddf +15da2d49 +8cd37cf3 +fbd44c65 +4db26158 +3ab551ce +a3bc0074 +d4bb30e2 +4adfa541 +3dd895d7 +a4d1c46d +d3d6f4fb +4369e96a +346ed9fc +ad678846 +da60b8d0 +44042d73 +33031de5 +aa0a4c5f +dd0d7cc9 +5005713c +270241aa +be0b1010 +c90c2086 +5768b525 +206f85b3 +b966d409 +ce61e49f +5edef90e +29d9c998 +b0d09822 +c7d7a8b4 +59b33d17 +2eb40d81 +b7bd5c3b +c0ba6cad +edb88320 +9abfb3b6 +3b6e20c +74b1d29a +ead54739 +9dd277af +4db2615 +73dc1683 +e3630b12 +94643b84 +d6d6a3e +7a6a5aa8 +e40ecf0b +9309ff9d +a00ae27 +7d079eb1 +f00f9344 +8708a3d2 +1e01f268 +6906c2fe +f762575d +806567cb +196c3671 +6e6b06e7 +fed41b76 +89d32be0 +10da7a5a +67dd4acc +f9b9df6f +8ebeeff9 +17b7be43 +60b08ed5 +d6d6a3e8 +a1d1937e +38d8c2c4 +4fdff252 +d1bb67f1 +a6bc5767 +3fb506dd +48b2364b +d80d2bda +af0a1b4c +36034af6 +41047a60 +df60efc3 +a867df55 +316e8eef +4669be79 +cb61b38c +bc66831a +256fd2a0 +5268e236 +cc0c7795 +bb0b4703 +220216b9 +5505262f +c5ba3bbe +b2bd0b28 +2bb45a92 +5cb36a04 +c2d7ffa7 +b5d0cf31 +2cd99e8b +5bdeae1d +9b64c2b0 +ec63f226 +756aa39c +26d930a +9c0906a9 +eb0e363f +72076785 +5005713 +95bf4a82 +e2b87a14 +7bb12bae +cb61b38 +92d28e9b +e5d5be0d +7cdcefb7 +bdbdf21 +86d3d2d4 +f1d4e242 +68ddb3f8 +1fda836e +81be16cd +f6b9265b +6fb077e1 +18b74777 +88085ae6 +ff0f6a70 +66063bca +11010b5c +8f659eff +f862ae69 +616bffd3 +166ccf45 +a00ae278 +d70dd2ee +4e048354 +3903b3c2 +a7672661 +d06016f7 +4969474d +3e6e77db +aed16a4a +d9d65adc +40df0b66 +37d83bf0 +a9bcae53 +debb9ec5 +47b2cf7f +30b5ffe9 +bdbdf21c +cabac28a +53b39330 +24b4a3a6 +bad03605 +cdd70693 +54de5729 +23d967bf +b3667a2e +c4614ab8 +5d681b02 +2a6f2b94 +b40bbe37 +c30c8ea1 +5a05df1b +2d02ef8d +4c554e3c +3e4c +d5e210 +0 +ffffffff +ffff +a3c14d97 diff --git a/sdc-plugin/tests/base_litex/mem_1.init b/sdc-plugin/tests/base_litex/mem_1.init new file mode 100644 index 000000000..e69de29bb diff --git a/sdc-plugin/tests/base_litex/mem_2.init b/sdc-plugin/tests/base_litex/mem_2.init new file mode 100644 index 000000000..3158a5729 --- /dev/null +++ b/sdc-plugin/tests/base_litex/mem_2.init @@ -0,0 +1,7 @@ +4e +65 +74 +53 +6f +43 +0 diff --git a/sdc-plugin/tests/compare_output_json.py b/sdc-plugin/tests/compare_output_json.py new file mode 100644 index 000000000..3b437e8c3 --- /dev/null +++ b/sdc-plugin/tests/compare_output_json.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 +""" + +This script extracts the top module cells and their corresponding parameters +from json files produced by Yosys. +The return code of this script is used to check if the output is equivalent. +""" + +import sys +import json +import argparse + +parameters = ["CLKFBOUT_CLKOUT1_HIGH_TIME"] + +def read_cells(json_file): + with open(json_file) as f: + data = json.load(f) + f.close() + cells = data['modules']['top']['cells'] + cells_parameters = dict() + for cell, opts in cells.items(): + attributes = opts['parameters'] + if len(attributes.keys()): + if any([x in parameters for x in attributes.keys()]): + cells_parameters[cell] = attributes + return cells_parameters + + +def main(args): + cells = read_cells(args.json) + if args.update: + with open(args.golden, 'w') as f: + json.dump(cells, f, indent=2) + else: + with open(args.golden) as f: + cells_golden = json.load(f) + if cells == cells_golden: + exit(0) + else: + print(json.dumps(cells, indent=4)) + json.dump(cells, open(args.json + ".fail", 'w'), indent=2) + print("VS") + print(json.dumps(cells_golden, indent=4)) + exit(1) + f.close() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument('--json', help = 'JSON to compare', required = True) + parser.add_argument('--golden', help = 'Golden JSON file', required = True) + parser.add_argument('--update', action = 'store_true', help = 'Update golden reference') + args = parser.parse_args() + main(args) diff --git a/sdc-plugin/tests/techmaps/cells_map.v b/sdc-plugin/tests/techmaps/cells_map.v new file mode 100644 index 000000000..772f5889c --- /dev/null +++ b/sdc-plugin/tests/techmaps/cells_map.v @@ -0,0 +1,866 @@ +// ============================================================================ +// CMT + +`define PLL_FRAC_PRECISION 10 +`define PLL_FIXED_WIDTH 32 + +// Rounds a fixed point number to a given precision +function [`PLL_FIXED_WIDTH:1] pll_round_frac +( +input [`PLL_FIXED_WIDTH:1] decimal, +input [`PLL_FIXED_WIDTH:1] precision +); + + if (decimal[(`PLL_FRAC_PRECISION - precision)] == 1'b1) begin + pll_round_frac = decimal + (1'b1 << (`PLL_FRAC_PRECISION - precision)); + end else begin + pll_round_frac = decimal; + end + +endfunction + +// Computes content of the PLLs divider registers +function [13:0] pll_divider_regs +( +input [ 7:0] divide, // Max divide is 128 +input [31:0] duty_cycle // Duty cycle is multiplied by 100,000 +); + + reg [`PLL_FIXED_WIDTH:1] duty_cycle_fix; + reg [`PLL_FIXED_WIDTH:1] duty_cycle_min; + reg [`PLL_FIXED_WIDTH:1] duty_cycle_max; + + reg [6:0] high_time; + reg [6:0] low_time; + reg w_edge; + reg no_count; + + reg [`PLL_FIXED_WIDTH:1] temp; + + if (divide >= 64) begin + duty_cycle_min = ((divide - 64) * 100_000) / divide; + duty_cycle_max = (645 / divide) * 100_00; + if (duty_cycle > duty_cycle_max) + duty_cycle = duty_cycle_max; + if (duty_cycle < duty_cycle_min) + duty_cycle = duty_cycle_min; + end + + duty_cycle_fix = (duty_cycle << `PLL_FRAC_PRECISION) / 100_000; + + if (divide == 7'h01) begin + high_time = 7'h01; + w_edge = 1'b0; + low_time = 7'h01; + no_count = 1'b1; + + end else begin + temp = pll_round_frac(duty_cycle_fix*divide, 1); + + high_time = temp[`PLL_FRAC_PRECISION+7:`PLL_FRAC_PRECISION+1]; + w_edge = temp[`PLL_FRAC_PRECISION]; + + if (high_time == 7'h00) begin + high_time = 7'h01; + w_edge = 1'b0; + end + + if (high_time == divide) begin + high_time = divide - 1; + w_edge = 1'b1; + end + + low_time = divide - high_time; + no_count = 1'b0; + end + + pll_divider_regs = {w_edge, no_count, high_time[5:0], low_time[5:0]}; +endfunction + +// Computes the PLLs phase shift registers +function [10:0] pll_phase_regs +( +input [ 7:0] divide, +input signed [31:0] phase +); + + reg [`PLL_FIXED_WIDTH:1] phase_in_cycles; + reg [`PLL_FIXED_WIDTH:1] phase_fixed; + reg [1:0] mx; + reg [5:0] delay_time; + reg [2:0] phase_mux; + + reg [`PLL_FIXED_WIDTH:1] temp; + + if(phase < 0) begin + phase_fixed = ((phase + 360000) << `PLL_FRAC_PRECISION) / 1000; + end else begin + phase_fixed = (phase << `PLL_FRAC_PRECISION) / 1000; + end + + phase_in_cycles = (phase_fixed * divide) / 360; + temp = pll_round_frac(phase_in_cycles, 3); + + mx = 2'b00; + phase_mux = temp[`PLL_FRAC_PRECISION:`PLL_FRAC_PRECISION-2]; + delay_time = temp[`PLL_FRAC_PRECISION+6:`PLL_FRAC_PRECISION+1]; + + pll_phase_regs = {mx, phase_mux, delay_time}; +endfunction + + +// Given PLL/MMCM divide, duty_cycle and phase calculates content of the +// CLKREG1 and CLKREG2. +function [37:0] pll_clkregs +( +input [7:0] divide, // Max divide is 128 +input [31:0] duty_cycle, // Multiplied by 100,000 +input signed [31:0] phase // Phase is given in degrees (-360,000 to 360,000) +); + + reg [13:0] pll_div; // EDGE, NO_COUNT, HIGH_TIME[5:0], LOW_TIME[5:0] + reg [10:0] pll_phase; // MX, PHASE_MUX[2:0], DELAY_TIME[5:0] + + pll_div = pll_divider_regs(divide, duty_cycle); + pll_phase = pll_phase_regs(divide, phase); + + pll_clkregs = { + // CLKREG2: RESERVED[6:0], MX[1:0], EDGE, NO_COUNT, DELAY_TIME[5:0] + 6'h00, pll_phase[10:9], pll_div[13:12], pll_phase[5:0], + // CLKREG1: PHASE_MUX[3:0], RESERVED, HIGH_TIME[5:0], LOW_TIME[5:0] + pll_phase[8:6], 1'b0, pll_div[11:0] + }; + +endfunction + +// This function takes the divide value and outputs the necessary lock values +function [39:0] pll_lktable_lookup +( +input [6:0] divide // Max divide is 64 +); + + reg [2559:0] lookup; + + lookup = { + // This table is composed of: + // LockRefDly_LockFBDly_LockCnt_LockSatHigh_UnlockCnt + 40'b00110_00110_1111101000_1111101001_0000000001, + 40'b00110_00110_1111101000_1111101001_0000000001, + 40'b01000_01000_1111101000_1111101001_0000000001, + 40'b01011_01011_1111101000_1111101001_0000000001, + 40'b01110_01110_1111101000_1111101001_0000000001, + 40'b10001_10001_1111101000_1111101001_0000000001, + 40'b10011_10011_1111101000_1111101001_0000000001, + 40'b10110_10110_1111101000_1111101001_0000000001, + 40'b11001_11001_1111101000_1111101001_0000000001, + 40'b11100_11100_1111101000_1111101001_0000000001, + 40'b11111_11111_1110000100_1111101001_0000000001, + 40'b11111_11111_1100111001_1111101001_0000000001, + 40'b11111_11111_1011101110_1111101001_0000000001, + 40'b11111_11111_1010111100_1111101001_0000000001, + 40'b11111_11111_1010001010_1111101001_0000000001, + 40'b11111_11111_1001110001_1111101001_0000000001, + 40'b11111_11111_1000111111_1111101001_0000000001, + 40'b11111_11111_1000100110_1111101001_0000000001, + 40'b11111_11111_1000001101_1111101001_0000000001, + 40'b11111_11111_0111110100_1111101001_0000000001, + 40'b11111_11111_0111011011_1111101001_0000000001, + 40'b11111_11111_0111000010_1111101001_0000000001, + 40'b11111_11111_0110101001_1111101001_0000000001, + 40'b11111_11111_0110010000_1111101001_0000000001, + 40'b11111_11111_0110010000_1111101001_0000000001, + 40'b11111_11111_0101110111_1111101001_0000000001, + 40'b11111_11111_0101011110_1111101001_0000000001, + 40'b11111_11111_0101011110_1111101001_0000000001, + 40'b11111_11111_0101000101_1111101001_0000000001, + 40'b11111_11111_0101000101_1111101001_0000000001, + 40'b11111_11111_0100101100_1111101001_0000000001, + 40'b11111_11111_0100101100_1111101001_0000000001, + 40'b11111_11111_0100101100_1111101001_0000000001, + 40'b11111_11111_0100010011_1111101001_0000000001, + 40'b11111_11111_0100010011_1111101001_0000000001, + 40'b11111_11111_0100010011_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001, + 40'b11111_11111_0011111010_1111101001_0000000001 + }; + + pll_lktable_lookup = lookup[ ((64-divide)*40) +: 40]; +endfunction + +// This function takes the divide value and the bandwidth setting of the PLL +// and outputs the digital filter settings necessary. +function [9:0] pll_table_lookup +( +input [6:0] divide, // Max divide is 64 +input [8*9:0] BANDWIDTH +); + + reg [639:0] lookup_low; + reg [639:0] lookup_high; + reg [639:0] lookup_optimized; + + reg [9:0] lookup_entry; + + lookup_low = { + // CP_RES_LFHF + 10'b0010_1111_00, + 10'b0010_1111_00, + 10'b0010_0111_00, + 10'b0010_1101_00, + 10'b0010_0101_00, + 10'b0010_0101_00, + 10'b0010_1001_00, + 10'b0010_1110_00, + 10'b0010_1110_00, + 10'b0010_0001_00, + 10'b0010_0001_00, + 10'b0010_0110_00, + 10'b0010_0110_00, + 10'b0010_0110_00, + 10'b0010_0110_00, + 10'b0010_1010_00, + 10'b0010_1010_00, + 10'b0010_1010_00, + 10'b0010_1010_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_1100_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0010_0010_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0011_1100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00 + }; + + lookup_high = { + // CP_RES_LFHF + 10'b0011_0111_00, + 10'b0011_0111_00, + 10'b0101_1111_00, + 10'b0111_1111_00, + 10'b0111_1011_00, + 10'b1101_0111_00, + 10'b1110_1011_00, + 10'b1110_1101_00, + 10'b1111_1101_00, + 10'b1111_0111_00, + 10'b1111_1011_00, + 10'b1111_1101_00, + 10'b1111_0011_00, + 10'b1110_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0101_1100_00, + 10'b0101_1100_00, + 10'b0101_1100_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b0100_0010_00, + 10'b0100_0010_00, + 10'b0100_0010_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0011_0100_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00 + }; + + lookup_optimized = { + // CP_RES_LFHF + 10'b0011_0111_00, + 10'b0011_0111_00, + 10'b0101_1111_00, + 10'b0111_1111_00, + 10'b0111_1011_00, + 10'b1101_0111_00, + 10'b1110_1011_00, + 10'b1110_1101_00, + 10'b1111_1101_00, + 10'b1111_0111_00, + 10'b1111_1011_00, + 10'b1111_1101_00, + 10'b1111_0011_00, + 10'b1110_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b1111_0101_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0111_0110_00, + 10'b0101_1100_00, + 10'b0101_1100_00, + 10'b0101_1100_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b1100_0001_00, + 10'b0100_0010_00, + 10'b0100_0010_00, + 10'b0100_0010_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0011_0100_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0010_1000_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0100_1100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00, + 10'b0010_0100_00 + }; + + if (BANDWIDTH == "LOW") begin + pll_table_lookup = lookup_low[((64-divide)*10) +: 10]; + end else if (BANDWIDTH == "HIGH") begin + pll_table_lookup = lookup_high[((64-divide)*10) +: 10]; + end else if (BANDWIDTH == "OPTIMIZED") begin + pll_table_lookup = lookup_optimized[((64-divide)*10) +: 10]; + end + +endfunction + +// ............................................................................ +// IMPORTANT NOTE: Due to lack of support for real type parameters in Yosys +// the PLL parameters that define duty cycles and phase shifts have to be +// provided as integers! The DUTY_CYCLE is expressed as % of high time times +// 1000 whereas the PHASE is expressed in degrees times 1000. + +// PLLE2_ADV +module PLLE2_ADV +( +input CLKFBIN, +input CLKIN1, +input CLKIN2, +input CLKINSEL, + +output CLKFBOUT, +output CLKOUT0, +output CLKOUT1, +output CLKOUT2, +output CLKOUT3, +output CLKOUT4, +output CLKOUT5, + +input PWRDWN, +input RST, +output LOCKED, + +input DCLK, +input DEN, +input DWE, +output DRDY, +input [ 6:0] DADDR, +input [15:0] DI, +output [15:0] DO +); + + parameter _TECHMAP_CONSTMSK_CLKINSEL_ = 0; + parameter _TECHMAP_CONSTVAL_CLKINSEL_ = 0; + + parameter _TECHMAP_CONSTMSK_RST_ = 0; + parameter _TECHMAP_CONSTVAL_RST_ = 0; + parameter _TECHMAP_CONSTMSK_PWRDWN_ = 0; + parameter _TECHMAP_CONSTVAL_PWRDWN_ = 0; + + parameter _TECHMAP_CONSTMSK_CLKFBOUT_ = 0; + parameter _TECHMAP_CONSTVAL_CLKFBOUT_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT0_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT0_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT1_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT1_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT2_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT2_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT3_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT3_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT4_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT4_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT5_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT5_ = 0; + + parameter _TECHMAP_CONSTMSK_DCLK_ = 0; + parameter _TECHMAP_CONSTVAL_DCLK_ = 0; + parameter _TECHMAP_CONSTMSK_DEN_ = 0; + parameter _TECHMAP_CONSTVAL_DEN_ = 0; + parameter _TECHMAP_CONSTMSK_DWE_ = 0; + parameter _TECHMAP_CONSTVAL_DWE_ = 0; + + parameter IS_CLKINSEL_INVERTED = 1'b0; + parameter IS_RST_INVERTED = 1'b0; + parameter IS_PWRDWN_INVERTED = 1'b0; + + parameter BANDWIDTH = "OPTIMIZED"; + parameter STARTUP_WAIT = "FALSE"; + parameter COMPENSATION = "ZHOLD"; + + parameter CLKIN1_PERIOD = 0.0; + parameter REF_JITTER1 = 0.01; + parameter CLKIN2_PERIOD = 0.0; + parameter REF_JITTER2 = 0.01; + + parameter [5:0] DIVCLK_DIVIDE = 1; + + parameter [5:0] CLKFBOUT_MULT = 1; + parameter CLKFBOUT_PHASE = 0; + + parameter [6:0] CLKOUT0_DIVIDE = 1; + parameter CLKOUT0_DUTY_CYCLE = 50000; + parameter signed CLKOUT0_PHASE = 0; + + parameter [6:0] CLKOUT1_DIVIDE = 1; + parameter CLKOUT1_DUTY_CYCLE = 50000; + parameter signed CLKOUT1_PHASE = 0; + + parameter [6:0] CLKOUT2_DIVIDE = 1; + parameter CLKOUT2_DUTY_CYCLE = 50000; + parameter signed CLKOUT2_PHASE = 0; + + parameter [6:0] CLKOUT3_DIVIDE = 1; + parameter CLKOUT3_DUTY_CYCLE = 50000; + parameter signed CLKOUT3_PHASE = 0; + + parameter [6:0] CLKOUT4_DIVIDE = 1; + parameter CLKOUT4_DUTY_CYCLE = 50000; + parameter signed CLKOUT4_PHASE = 0; + + parameter [6:0] CLKOUT5_DIVIDE = 1; + parameter CLKOUT5_DUTY_CYCLE = 50000; + parameter signed CLKOUT5_PHASE = 0; + + // Compute PLL's registers content + localparam CLKFBOUT_REGS = pll_clkregs(CLKFBOUT_MULT, 50000, CLKFBOUT_PHASE); + localparam DIVCLK_REGS = pll_clkregs(DIVCLK_DIVIDE, 50000, 0); + + localparam CLKOUT0_REGS = pll_clkregs(CLKOUT0_DIVIDE, CLKOUT0_DUTY_CYCLE, CLKOUT0_PHASE); + localparam CLKOUT1_REGS = pll_clkregs(CLKOUT1_DIVIDE, CLKOUT1_DUTY_CYCLE, CLKOUT1_PHASE); + localparam CLKOUT2_REGS = pll_clkregs(CLKOUT2_DIVIDE, CLKOUT2_DUTY_CYCLE, CLKOUT2_PHASE); + localparam CLKOUT3_REGS = pll_clkregs(CLKOUT3_DIVIDE, CLKOUT3_DUTY_CYCLE, CLKOUT3_PHASE); + localparam CLKOUT4_REGS = pll_clkregs(CLKOUT4_DIVIDE, CLKOUT4_DUTY_CYCLE, CLKOUT4_PHASE); + localparam CLKOUT5_REGS = pll_clkregs(CLKOUT5_DIVIDE, CLKOUT5_DUTY_CYCLE, CLKOUT5_PHASE); + + // Handle inputs that should have certain logic levels when left unconnected + generate if (_TECHMAP_CONSTMSK_CLKINSEL_ == 1) begin + localparam INV_CLKINSEL = !_TECHMAP_CONSTVAL_CLKINSEL_; + wire clkinsel = 1'b1; + end else if (_TECHMAP_CONSTVAL_CLKINSEL_ == 0) begin + localparam INV_CLKINSEL = IS_CLKINSEL_INVERTED; + wire clkinsel = 1'b1; + end else begin + localparam INV_CLKINSEL = IS_CLKINSEL_INVERTED; + wire clkinsel = CLKINSEL; + end endgenerate + + generate if (_TECHMAP_CONSTMSK_PWRDWN_ == 1) begin + localparam INV_PWRDWN = !_TECHMAP_CONSTVAL_PWRDWN_; + wire pwrdwn = 1'b1; + end else if (_TECHMAP_CONSTVAL_PWRDWN_ == 0) begin + localparam INV_PWRDWN = ~IS_PWRDWN_INVERTED; + wire pwrdwn = 1'b1; + end else begin + localparam INV_PWRDWN = IS_PWRDWN_INVERTED; + wire pwrdwn = PWRDWN; + end endgenerate + + generate if (_TECHMAP_CONSTMSK_RST_ == 1) begin + localparam INV_RST = !_TECHMAP_CONSTVAL_PWRDWN_; + wire rst = 1'b1; + end else if (_TECHMAP_CONSTVAL_RST_ == 0) begin + localparam INV_RST = ~IS_RST_INVERTED; + wire rst = 1'b1; + end else begin + localparam INV_RST = IS_RST_INVERTED; + wire rst = RST; + end endgenerate + + generate if (_TECHMAP_CONSTMSK_DCLK_ == 1) + wire dclk = _TECHMAP_CONSTVAL_DCLK_; + else if (_TECHMAP_CONSTVAL_DCLK_ == 0) + wire dclk = 1'b0; + else + wire dclk = DCLK; + endgenerate + + generate if (_TECHMAP_CONSTMSK_DEN_ == 1) + wire den = _TECHMAP_CONSTVAL_DEN_; + else if (_TECHMAP_CONSTVAL_DEN_ == 0) + wire den = 1'b0; + else + wire den = DEN; + endgenerate + + generate if (_TECHMAP_CONSTMSK_DWE_ == 1) + wire dwe = _TECHMAP_CONSTVAL_DWE_; + else if (_TECHMAP_CONSTVAL_DWE_ == 0) + wire dwe = 1'b0; + else + wire dwe = DWE; + endgenerate + + // The substituted cell + PLLE2_ADV_VPR # + ( + // Inverters + .INV_CLKINSEL(INV_CLKINSEL), + .ZINV_PWRDWN (INV_PWRDWN), + .ZINV_RST (INV_RST), + + // Straight mapped parameters + .STARTUP_WAIT(STARTUP_WAIT == "TRUE"), + + // Lookup tables + .LKTABLE(pll_lktable_lookup(CLKFBOUT_MULT)), + .TABLE(pll_table_lookup(CLKFBOUT_MULT, BANDWIDTH)), + + // FIXME: How to compute values the two below ? + .FILTREG1_RESERVED(12'b0000_00001000), + .LOCKREG3_RESERVED(1'b1), + + // Clock feedback settings + .CLKFBOUT_CLKOUT1_HIGH_TIME (CLKFBOUT_REGS[11:6]), + .CLKFBOUT_CLKOUT1_LOW_TIME (CLKFBOUT_REGS[5:0]), + .CLKFBOUT_CLKOUT1_PHASE_MUX (CLKFBOUT_REGS[15:13]), + .CLKFBOUT_CLKOUT2_DELAY_TIME (CLKFBOUT_REGS[21:16]), + .CLKFBOUT_CLKOUT2_EDGE (CLKFBOUT_REGS[23]), + .CLKFBOUT_CLKOUT2_NO_COUNT (CLKFBOUT_REGS[22]), + + // Internal VCO divider settings + .DIVCLK_DIVCLK_HIGH_TIME (DIVCLK_REGS[11:6]), + .DIVCLK_DIVCLK_LOW_TIME (DIVCLK_REGS[5:0]), + .DIVCLK_DIVCLK_NO_COUNT (DIVCLK_REGS[22]), + .DIVCLK_DIVCLK_EDGE (DIVCLK_REGS[23]), + + // CLKOUT0 + .CLKOUT0_CLKOUT1_HIGH_TIME (CLKOUT0_REGS[11:6]), + .CLKOUT0_CLKOUT1_LOW_TIME (CLKOUT0_REGS[5:0]), + .CLKOUT0_CLKOUT1_PHASE_MUX (CLKOUT0_REGS[15:13]), + .CLKOUT0_CLKOUT2_DELAY_TIME (CLKOUT0_REGS[21:16]), + .CLKOUT0_CLKOUT2_EDGE (CLKOUT0_REGS[23]), + .CLKOUT0_CLKOUT2_NO_COUNT (CLKOUT0_REGS[22]), + + // CLKOUT1 + .CLKOUT1_CLKOUT1_HIGH_TIME (CLKOUT1_REGS[11:6]), + .CLKOUT1_CLKOUT1_LOW_TIME (CLKOUT1_REGS[5:0]), + .CLKOUT1_CLKOUT1_PHASE_MUX (CLKOUT1_REGS[15:13]), + .CLKOUT1_CLKOUT2_DELAY_TIME (CLKOUT1_REGS[21:16]), + .CLKOUT1_CLKOUT2_EDGE (CLKOUT1_REGS[23]), + .CLKOUT1_CLKOUT2_NO_COUNT (CLKOUT1_REGS[22]), + + // CLKOUT2 + .CLKOUT2_CLKOUT1_HIGH_TIME (CLKOUT2_REGS[11:6]), + .CLKOUT2_CLKOUT1_LOW_TIME (CLKOUT2_REGS[5:0]), + .CLKOUT2_CLKOUT1_PHASE_MUX (CLKOUT2_REGS[15:13]), + .CLKOUT2_CLKOUT2_DELAY_TIME (CLKOUT2_REGS[21:16]), + .CLKOUT2_CLKOUT2_EDGE (CLKOUT2_REGS[23]), + .CLKOUT2_CLKOUT2_NO_COUNT (CLKOUT2_REGS[22]), + + // CLKOUT3 + .CLKOUT3_CLKOUT1_HIGH_TIME (CLKOUT3_REGS[11:6]), + .CLKOUT3_CLKOUT1_LOW_TIME (CLKOUT3_REGS[5:0]), + .CLKOUT3_CLKOUT1_PHASE_MUX (CLKOUT3_REGS[15:13]), + .CLKOUT3_CLKOUT2_DELAY_TIME (CLKOUT3_REGS[21:16]), + .CLKOUT3_CLKOUT2_EDGE (CLKOUT3_REGS[23]), + .CLKOUT3_CLKOUT2_NO_COUNT (CLKOUT3_REGS[22]), + + // CLKOUT4 + .CLKOUT4_CLKOUT1_HIGH_TIME (CLKOUT4_REGS[11:6]), + .CLKOUT4_CLKOUT1_LOW_TIME (CLKOUT4_REGS[5:0]), + .CLKOUT4_CLKOUT1_PHASE_MUX (CLKOUT4_REGS[15:13]), + .CLKOUT4_CLKOUT2_DELAY_TIME (CLKOUT4_REGS[21:16]), + .CLKOUT4_CLKOUT2_EDGE (CLKOUT4_REGS[23]), + .CLKOUT4_CLKOUT2_NO_COUNT (CLKOUT4_REGS[22]), + + // CLKOUT5 + .CLKOUT5_CLKOUT1_HIGH_TIME (CLKOUT5_REGS[11:6]), + .CLKOUT5_CLKOUT1_LOW_TIME (CLKOUT5_REGS[5:0]), + .CLKOUT5_CLKOUT1_PHASE_MUX (CLKOUT5_REGS[15:13]), + .CLKOUT5_CLKOUT2_DELAY_TIME (CLKOUT5_REGS[21:16]), + .CLKOUT5_CLKOUT2_EDGE (CLKOUT5_REGS[23]), + .CLKOUT5_CLKOUT2_NO_COUNT (CLKOUT5_REGS[22]), + + // Clock output enable controls + .CLKFBOUT_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKFBOUT_ === 1'bX), + + .CLKOUT0_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT0_ === 1'bX), + .CLKOUT1_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT1_ === 1'bX), + .CLKOUT2_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT2_ === 1'bX), + .CLKOUT3_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT3_ === 1'bX), + .CLKOUT4_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT4_ === 1'bX), + .CLKOUT5_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT5_ === 1'bX) + ) + _TECHMAP_REPLACE_ + ( + .CLKFBIN(CLKFBIN), + .CLKIN1(CLKIN1), + .CLKIN2(CLKIN2), + .CLKFBOUT(CLKFBOUT), + .CLKOUT0(CLKOUT0), + .CLKOUT1(CLKOUT1), + .CLKOUT2(CLKOUT2), + .CLKOUT3(CLKOUT3), + .CLKOUT4(CLKOUT4), + .CLKOUT5(CLKOUT5), + + .CLKINSEL (clkinsel), + + .PWRDWN (pwrdwn), + .RST (rst), + .LOCKED (LOCKED), + + .DCLK (dclk), + .DEN (den), + .DWE (dwe), + .DRDY (DRDY), + .DADDR(DADDR), + .DI (DI), + .DO (DO) + ); + +endmodule + +// PLLE2_BASE +module PLLE2_BASE +( +input CLKFBIN, +input CLKIN, + +output CLKFBOUT, +output CLKOUT0, +output CLKOUT1, +output CLKOUT2, +output CLKOUT3, +output CLKOUT4, +output CLKOUT5, + +input RST, +output LOCKED +); + + parameter IS_CLKINSEL_INVERTED = 1'b0; + parameter IS_RST_INVERTED = 1'b0; + + parameter BANDWIDTH = "OPTIMIZED"; + parameter STARTUP_WAIT = "FALSE"; + + parameter CLKIN1_PERIOD = 0.0; + parameter REF_JITTER1 = 0.1; + + parameter [5:0] DIVCLK_DIVIDE = 1; + + parameter [5:0] CLKFBOUT_MULT = 1; + parameter signed CLKFBOUT_PHASE = 0; + + parameter [6:0] CLKOUT0_DIVIDE = 1; + parameter CLKOUT0_DUTY_CYCLE = 50000; + parameter signed CLKOUT0_PHASE = 0; + + parameter [6:0] CLKOUT1_DIVIDE = 1; + parameter CLKOUT1_DUTY_CYCLE = 50000; + parameter signed CLKOUT1_PHASE = 0; + + parameter [6:0] CLKOUT2_DIVIDE = 1; + parameter CLKOUT2_DUTY_CYCLE = 50000; + parameter signed CLKOUT2_PHASE = 0; + + parameter [6:0] CLKOUT3_DIVIDE = 1; + parameter CLKOUT3_DUTY_CYCLE = 50000; + parameter signed CLKOUT3_PHASE = 0; + + parameter [6:0] CLKOUT4_DIVIDE = 1; + parameter CLKOUT4_DUTY_CYCLE = 50000; + parameter signed CLKOUT4_PHASE = 0; + + parameter [6:0] CLKOUT5_DIVIDE = 1; + parameter CLKOUT5_DUTY_CYCLE = 50000; + parameter signed CLKOUT5_PHASE = 0; + + // The substituted cell + PLLE2_ADV # + ( + .IS_CLKINSEL_INVERTED(IS_CLKINSEL_INVERTED), + .IS_RST_INVERTED(IS_RST_INVERTED), + .IS_PWRDWN_INVERTED(1'b0), + + .BANDWIDTH(BANDWIDTH), + .STARTUP_WAIT(STARTUP_WAIT), + + .CLKIN1_PERIOD(CLKIN1_PERIOD), + .REF_JITTER1(REF_JITTER1), + + .DIVCLK_DIVIDE(DIVCLK_DIVIDE), + + .CLKFBOUT_MULT(CLKFBOUT_MULT), + .CLKFBOUT_PHASE(CLKFBOUT_PHASE), + + .CLKOUT0_DIVIDE(CLKOUT0_DIVIDE), + .CLKOUT0_DUTY_CYCLE(CLKOUT0_DUTY_CYCLE), + .CLKOUT0_PHASE(CLKOUT0_PHASE), + + .CLKOUT1_DIVIDE(CLKOUT1_DIVIDE), + .CLKOUT1_DUTY_CYCLE(CLKOUT1_DUTY_CYCLE), + .CLKOUT1_PHASE(CLKOUT1_PHASE), + + .CLKOUT2_DIVIDE(CLKOUT2_DIVIDE), + .CLKOUT2_DUTY_CYCLE(CLKOUT2_DUTY_CYCLE), + .CLKOUT2_PHASE(CLKOUT2_PHASE), + + .CLKOUT3_DIVIDE(CLKOUT3_DIVIDE), + .CLKOUT3_DUTY_CYCLE(CLKOUT3_DUTY_CYCLE), + .CLKOUT3_PHASE(CLKOUT3_PHASE), + + .CLKOUT4_DIVIDE(CLKOUT4_DIVIDE), + .CLKOUT4_DUTY_CYCLE(CLKOUT4_DUTY_CYCLE), + .CLKOUT4_PHASE(CLKOUT4_PHASE), + + .CLKOUT5_DIVIDE(CLKOUT5_DIVIDE), + .CLKOUT5_DUTY_CYCLE(CLKOUT5_DUTY_CYCLE), + .CLKOUT5_PHASE(CLKOUT5_PHASE) + ) + _TECHMAP_REPLACE_ + ( + .CLKFBIN(CLKFBIN), + .CLKIN1(CLKIN), + .CLKINSEL(1'b1), + + .CLKFBOUT(CLKFBOUT), + .CLKOUT0(CLKOUT0), + .CLKOUT1(CLKOUT1), + .CLKOUT2(CLKOUT2), + .CLKOUT3(CLKOUT3), + .CLKOUT4(CLKOUT4), + .CLKOUT5(CLKOUT5), + + .PWRDWN(1'b0), + .RST(RST), + .LOCKED(LOCKED), + + .DCLK(1'b0), + .DEN(1'b0), + .DWE(1'b0), + .DRDY(), + .DADDR(7'd0), + .DI(16'd0), + .DO() + ); + +endmodule diff --git a/sdc-plugin/tests/techmaps/cells_sim.v b/sdc-plugin/tests/techmaps/cells_sim.v new file mode 100644 index 000000000..607f98b80 --- /dev/null +++ b/sdc-plugin/tests/techmaps/cells_sim.v @@ -0,0 +1,145 @@ +// ============================================================================ +// CMT + +// PLLE2_ADV_VPR +(* blackbox *) +module PLLE2_ADV_VPR +( +input CLKFBIN, +input CLKIN1, +input CLKIN2, +input CLKINSEL, + +output CLKFBOUT, +output CLKOUT0, +output CLKOUT1, +output CLKOUT2, +output CLKOUT3, +output CLKOUT4, +output CLKOUT5, + +input PWRDWN, +input RST, +output LOCKED, + +input DCLK, +input DEN, +input DWE, +output DRDY, +input [ 6:0] DADDR, +input [15:0] DI, +output [15:0] DO +); + + parameter [0:0] INV_CLKINSEL = 1'd0; + parameter [0:0] ZINV_PWRDWN = 1'd0; + parameter [0:0] ZINV_RST = 1'd1; + + parameter [0:0] STARTUP_WAIT = 1'd0; + + // Tables + parameter [9:0] TABLE = 10'd0; + parameter [39:0] LKTABLE = 40'd0; + parameter [15:0] POWER_REG = 16'd0; + parameter [11:0] FILTREG1_RESERVED = 12'd0; + parameter [9:0] FILTREG2_RESERVED = 10'd0; + parameter [5:0] LOCKREG1_RESERVED = 6'd0; + parameter [0:0] LOCKREG2_RESERVED = 1'b0; + parameter [0:0] LOCKREG3_RESERVED = 1'b0; + + // DIVCLK + parameter [5:0] DIVCLK_DIVCLK_HIGH_TIME = 6'd0; + parameter [5:0] DIVCLK_DIVCLK_LOW_TIME = 6'd0; + parameter [0:0] DIVCLK_DIVCLK_NO_COUNT = 1'b1; + parameter [0:0] DIVCLK_DIVCLK_EDGE = 1'b0; + + // CLKFBOUT + parameter [5:0] CLKFBOUT_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKFBOUT_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKFBOUT_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKFBOUT_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKFBOUT_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKFBOUT_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKFBOUT_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKFBOUT_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKFBOUT_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKFBOUT_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT0 + parameter [5:0] CLKOUT0_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT0_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT0_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT0_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT0_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT0_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT0_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT0_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT0_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT0_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT1 + parameter [5:0] CLKOUT1_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT1_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT1_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT1_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT1_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT1_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT1_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT1_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT1_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT1_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT2 + parameter [5:0] CLKOUT2_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT2_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT2_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT2_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT2_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT2_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT2_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT2_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT2_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT2_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT3 + parameter [5:0] CLKOUT3_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT3_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT3_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT3_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT3_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT3_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT3_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT3_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT3_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT3_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT4 + parameter [5:0] CLKOUT4_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT4_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT4_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT4_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT4_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT4_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT4_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT4_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT4_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT4_CLKOUT2_NO_COUNT = 1'b1; + + // CLKOUT5 + parameter [5:0] CLKOUT5_CLKOUT1_HIGH_TIME = 6'd0; + parameter [5:0] CLKOUT5_CLKOUT1_LOW_TIME = 6'd0; + parameter [0:0] CLKOUT5_CLKOUT1_OUTPUT_ENABLE = 1'b0; + parameter [2:0] CLKOUT5_CLKOUT1_PHASE_MUX = 3'd0; + parameter [5:0] CLKOUT5_CLKOUT2_DELAY_TIME = 6'd0; + parameter [0:0] CLKOUT5_CLKOUT2_EDGE = 1'b0; + parameter [2:0] CLKOUT5_CLKOUT2_FRAC = 3'd0; + parameter [0:0] CLKOUT5_CLKOUT2_FRAC_EN = 1'b0; + parameter [0:0] CLKOUT5_CLKOUT2_FRAC_WF_R = 1'b0; + parameter [0:0] CLKOUT5_CLKOUT2_NO_COUNT = 1'b1; + + + // TODO: Compensation parameters + + // TODO: How to simulate a PLL in verilog (i.e. the VCO) ??? + +endmodule diff --git a/sdc-plugin/tests/xc7a35tcsg324-1.json b/sdc-plugin/tests/xc7a35tcsg324-1.json new file mode 100644 index 000000000..602b949ab --- /dev/null +++ b/sdc-plugin/tests/xc7a35tcsg324-1.json @@ -0,0 +1,10 @@ +{ + "iobanks": { + "0": "X1Y78", + "14": "X1Y26", + "15": "X1Y78", + "16": "X1Y130", + "34": "X113Y26", + "35": "X113Y78" + } +} From 2eb05c3746044d18e3e6a655a363e735ca816f68 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 17 Jul 2020 10:19:13 +0200 Subject: [PATCH 077/845] SDC: Add counter test Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 3 ++- sdc-plugin/tests/counter/counter.sdc | 1 + sdc-plugin/tests/counter/counter.tcl | 36 ++++++++++++++++++++++++++++ sdc-plugin/tests/counter/counter.v | 30 +++++++++++++++++++++++ sdc-plugin/tests/counter/counter.xdc | 15 ++++++++++++ 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/counter/counter.sdc create mode 100644 sdc-plugin/tests/counter/counter.tcl create mode 100644 sdc-plugin/tests/counter/counter.v create mode 100644 sdc-plugin/tests/counter/counter.xdc diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 00973061a..eba2c4d0c 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,6 +1,7 @@ -TESTS = base_litex +TESTS = base_litex counter base_litex_verify = $(call compare_json,base_litex) +counter_verify = $(call compare_json,counter) all: $(TESTS) diff --git a/sdc-plugin/tests/counter/counter.sdc b/sdc-plugin/tests/counter/counter.sdc new file mode 100644 index 000000000..a253f8dff --- /dev/null +++ b/sdc-plugin/tests/counter/counter.sdc @@ -0,0 +1 @@ +create_clock -name clk -period 10.0 clk diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl new file mode 100644 index 000000000..1bf2fc9b6 --- /dev/null +++ b/sdc-plugin/tests/counter/counter.tcl @@ -0,0 +1,36 @@ +yosys -import +plugin -i xdc +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog counter.v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top + +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +# +##Read the design timing constraints +#read_sdc $::env(INPUT_SDC_FILE) +#return +# +##Read the design constraints +#read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) +# +## Map Xilinx tech library to 7-series VPR tech library. +#read_verilog -lib ../techmaps/cells_sim.v +#techmap -map ../techmaps/cells_map.v +# +## opt_expr -undriven makes sure all nets are driven, if only by the $undef +## net. +opt_expr -undriven +opt_clean +# +setundef -zero -params +stat +# +## Write the design in JSON format. +write_json $::env(OUT_JSON) +write_blif -attr -param -cname -conn $::env(OUT_EBLIF) diff --git a/sdc-plugin/tests/counter/counter.v b/sdc-plugin/tests/counter/counter.v new file mode 100644 index 000000000..80418c035 --- /dev/null +++ b/sdc-plugin/tests/counter/counter.v @@ -0,0 +1,30 @@ +module top(input clk, + input [1:0] in, + output [1:0] out); + +reg [1:0] cnt = 0; + +always @(posedge clk) begin + cnt <= cnt + 1; +end + +assign out = {cnt[0], in[0]}; +endmodule +/* +module dut(); +reg clk; +wire [1:0] out; + +top dut(.clk(clk), .in(2'b11), .out(out)); +initial begin + $dumpfile("test.vcd"); + $dumpvars(0,dut); + clk = 0; +end + +always +begin + clk = #5 !clk; +end +endmodule +*/ diff --git a/sdc-plugin/tests/counter/counter.xdc b/sdc-plugin/tests/counter/counter.xdc new file mode 100644 index 000000000..327fb51e4 --- /dev/null +++ b/sdc-plugin/tests/counter/counter.xdc @@ -0,0 +1,15 @@ +set_property LOC E3 [get_ports clk] +set_property IOSTANDARD LVCMOS33 [get_ports clk] + +set_property LOC J13 [get_ports {in[0]}] +set_property IOSTANDARD LVCMOS33 [get_ports {in[0]}] + +set_property LOC J14 [get_ports {in[1]}] +set_property IOSTANDARD LVCMOS33 [get_ports {in[1]}] + +set_property LOC K15 [get_ports {out[0]}] +set_property IOSTANDARD LVCMOS33 [get_ports {out[0]}] + +set_property LOC K16 [get_ports {out[1]}] +set_property IOSTANDARD LVCMOS33 [get_ports {out[1]}] + From a8629ee95fe79c70a1ff1f45f38d8896e21bafaf Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 17 Jul 2020 15:17:27 +0200 Subject: [PATCH 078/845] SDC: Add PLL example Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 3 +- sdc-plugin/tests/pll/pll.tcl | 36 ++++++++++++++++ sdc-plugin/tests/pll/pll.v | 80 ++++++++++++++++++++++++++++++++++++ sdc-plugin/tests/pll/pll.xdc | 9 ++++ 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/pll/pll.tcl create mode 100644 sdc-plugin/tests/pll/pll.v create mode 100644 sdc-plugin/tests/pll/pll.xdc diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index eba2c4d0c..703acfbdf 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,7 +1,8 @@ -TESTS = base_litex counter +TESTS = base_litex counter pll base_litex_verify = $(call compare_json,base_litex) counter_verify = $(call compare_json,counter) +pll_verify = $(call compare_json,pll) all: $(TESTS) diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl new file mode 100644 index 000000000..df939987c --- /dev/null +++ b/sdc-plugin/tests/pll/pll.tcl @@ -0,0 +1,36 @@ +yosys -import +plugin -i xdc +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog pll.v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top + +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +# +##Read the design timing constraints +#read_sdc $::env(INPUT_SDC_FILE) +#return +# +##Read the design constraints +#read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) +# +## Map Xilinx tech library to 7-series VPR tech library. +#read_verilog -lib ../techmaps/cells_sim.v +#techmap -map ../techmaps/cells_map.v +# +## opt_expr -undriven makes sure all nets are driven, if only by the $undef +## net. +opt_expr -undriven +opt_clean +# +setundef -zero -params +stat +# +## Write the design in JSON format. +write_json $::env(OUT_JSON) +write_blif -attr -param -cname -conn $::env(OUT_EBLIF) diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v new file mode 100644 index 000000000..1bb3a9790 --- /dev/null +++ b/sdc-plugin/tests/pll/pll.v @@ -0,0 +1,80 @@ +module top( + input clk, + input cpu_reset, + input data_in, + output[4:0] data_out +); + +wire [4:0] data_out; +wire builder_pll_fb; +wire fdce_0_out, fdce_1_out; +wire main_locked; + +FDCE FDCE_0 ( + .D(data_in), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(fdce_0_out) +); + +FDCE FDCE_1 ( + .D(fdce_0_out), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[0]) +); + +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(1'd0), + .CLKOUT1_DIVIDE(2'd3), + .CLKOUT1_PHASE(1'd0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .LOCKED(main_locked) +); + +FDCE FDCE_PLLx1 ( + .D(data_in), + .C(main_clkout0), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[1]) +); + +FDCE FDCE_PLLx4_0 ( + .D(data_in), + .C(main_clkout1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[2]) +); + +FDCE FDCE_PLLx4_1 ( + .D(data_in), + .C(main_clkout1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[3]) +); + +FDCE FDCE_PLLx4_2 ( + .D(data_in), + .C(main_clkout1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[4]) +); +endmodule diff --git a/sdc-plugin/tests/pll/pll.xdc b/sdc-plugin/tests/pll/pll.xdc new file mode 100644 index 000000000..2f4eba35d --- /dev/null +++ b/sdc-plugin/tests/pll/pll.xdc @@ -0,0 +1,9 @@ +# ## clk100:0 +set_property LOC E3 [get_ports clk100] +set_property IOSTANDARD LVCMOS33 [get_ports clk100] +# ## cpu_reset:0 +set_property LOC C2 [get_ports cpu_reset] +set_property IOSTANDARD LVCMOS33 [get_ports cpu_reset] +set_property LOC H5 [get_ports {led[0]}] +set_property LOC J5 [get_ports {led[1]}] +set_property LOC T9 [get_ports {led[2]}] From 8c09829cab0a7a286d2eb3e5968ae8426ef7c4a3 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 17 Jul 2020 15:18:13 +0200 Subject: [PATCH 079/845] SDC: Add sdc plugin stub Signed-off-by: Tomasz Michalak --- sdc-plugin/Makefile | 25 +++++++++++++++++ sdc-plugin/sdc.cc | 65 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 sdc-plugin/Makefile create mode 100644 sdc-plugin/sdc.cc diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile new file mode 100644 index 000000000..ed7bfb78c --- /dev/null +++ b/sdc-plugin/Makefile @@ -0,0 +1,25 @@ +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) +LDFLAGS = $(shell yosys-config --ldflags) +LDLIBS = $(shell yosys-config --ldlibs) +PLUGINS_DIR = $(shell yosys-config --datdir)/plugins + +OBJS = sdc.o + +sdc.so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) + +install_plugin: sdc.so + mkdir -p $(PLUGINS_DIR) + cp $< $(PLUGINS_DIR)/$< + +test: + $(MAKE) -C tests all + +.PHONY: install +install: install_plugin + +clean: + rm -f *.d *.o *.so + $(MAKE) -C tests clean + diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc new file mode 100644 index 000000000..1a9da3308 --- /dev/null +++ b/sdc-plugin/sdc.cc @@ -0,0 +1,65 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/log.h" + +USING_YOSYS_NAMESPACE + +PRIVATE_NAMESPACE_BEGIN + + +void register_in_tcl_interpreter(const std::string& command) { + Tcl_Interp* interp = yosys_get_tcl_interp(); + std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); + Tcl_Eval(interp, tcl_script.c_str()); +} + +struct ReadSdc : public Frontend { + ReadSdc() + : Frontend("sdc", "Read SDC file"){} + + void help() override { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_sdc \n"); + log("\n"); + log("Read SDC file.\n"); + log("\n"); + } + + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design*) override { + if (args.size() < 2) { + log_cmd_error("Missing script file.\n"); + } + size_t argidx = 1; + extra_args(f, filename, args, argidx); + std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; + log("%s\n", content.c_str()); + Tcl_Interp* interp = yosys_get_tcl_interp(); + if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { + log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); + } + + } + +} ReadSdc; + + +PRIVATE_NAMESPACE_END From b309d8241cc78fe99d8ca559d2c6463fc072c27e Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 27 Jul 2020 15:48:18 +0200 Subject: [PATCH 080/845] SDC: Add create_clock command Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 101 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 91 insertions(+), 10 deletions(-) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 1a9da3308..6ee311f6c 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -24,15 +24,8 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN - -void register_in_tcl_interpreter(const std::string& command) { - Tcl_Interp* interp = yosys_get_tcl_interp(); - std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); - Tcl_Eval(interp, tcl_script.c_str()); -} - -struct ReadSdc : public Frontend { - ReadSdc() +struct ReadSdcCmd : public Frontend { + ReadSdcCmd() : Frontend("sdc", "Read SDC file"){} void help() override { @@ -56,10 +49,98 @@ struct ReadSdc : public Frontend { if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); } + } +}; + +using Clocks = std::vector; + +struct CreateClockCmd : public Pass { + CreateClockCmd(Clocks& clocks) + : Pass("create_clock", "Create clock object") + , clocks_(clocks) + {} + + void help() override + { + log("\n"); + log(" create_clock [ -name clock_name ] -period period_value [-waveform ] \n"); + log("Define a clock.\n"); + log("If name is not specified then the name of the first target is selected as the clock's name.\n"); + log("Period is expressed in nanoseconds.\n"); + log("The waveform option specifies the duty cycle (the rising a falling edges) of the clock.\n"); + log("It is specified as a list of two elements/time values: the first rising edge and the next falling edge.\n"); + log("\n"); + } + + void execute(std::vector args, RTLIL::Design *design) override + { + size_t argidx; + std::string name; + float rising_edge(0); + float falling_edge(0); + float period(0); + for (argidx = 1; argidx < args.size(); argidx++) + { + std::string arg = args[argidx]; + if (arg == "-name" && argidx + 1 < args.size()) { + name = args[++argidx]; + continue; + } + if (arg == "-period" && argidx + 1 < args.size()) { + period = std::stof(args[++argidx]); + continue; + } + if (arg == "-waveform" && argidx + 2 < args.size()) { + rising_edge = std::stof(args[++argidx]); + falling_edge = std::stof(args[++argidx]); + continue; + } + break; + } + // Add "w:" prefix to selection arguments to enforce wire object selection + AddWirePrefix(args, argidx); + extra_args(args, argidx, design); + // If clock name is not specified then take the name of the first target + for (auto module : design->modules()) { + if (!design->selected(module)) { + continue; + } + for (auto wire : module->wires()) { + if (design->selected(module, wire)) { + log("Selected wire %s\n", wire->name.c_str()); + clocks_.push_back(wire); + } + } + } + if (name.empty()) { + name = clocks_.at(0)->name.str(); + } + + log("Created clock %s with period %f, waveform %f,%f\n", name.c_str(), period, rising_edge, falling_edge); + } + void AddWirePrefix(std::vector& args, size_t argidx) { + auto selection_begin = args.begin() + argidx; + std::transform(selection_begin, args.end(), selection_begin, [](std::string& w) {return "w:" + w;}); } -} ReadSdc; + Clocks& clocks_; +}; + +class SdcPlugin { + public: + SdcPlugin() + : create_clock_cmd_(clocks_) + {log("Loaded SDC plugin\n");} + + ReadSdcCmd read_sdc_cmd_; + CreateClockCmd create_clock_cmd_; + + private: + Clocks clocks_; +} SdcPlugin; + + PRIVATE_NAMESPACE_END From b889196bab01ae9bbef0ed6a435f3d6cd78612c6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 28 Jul 2020 13:46:43 +0200 Subject: [PATCH 081/845] SDC: Add classes dedicated for Clock information Signed-off-by: Tomasz Michalak --- sdc-plugin/Makefile | 2 +- sdc-plugin/clocks.cc | 57 ++++++++++++ sdc-plugin/clocks.h | 68 ++++++++++++++ sdc-plugin/sdc.cc | 216 ++++++++++++++++++++++--------------------- 4 files changed, 238 insertions(+), 105 deletions(-) create mode 100644 sdc-plugin/clocks.cc create mode 100644 sdc-plugin/clocks.h diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index ed7bfb78c..4626fd4fa 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -4,7 +4,7 @@ LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins -OBJS = sdc.o +OBJS = clocks.o sdc.o sdc.so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc new file mode 100644 index 000000000..39582c424 --- /dev/null +++ b/sdc-plugin/clocks.cc @@ -0,0 +1,57 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "clocks.h" +#include +#include "kernel/log.h" +#include "kernel/register.h" + +void Clocks::AddClock(const std::string& name, + const std::vector& clock_wires, float period, + float rising_edge, float falling_edge) { + std::for_each(clock_wires.begin(), clock_wires.end(), [&, this](RTLIL::Wire* wire) { + AddClockWire(name, wire, period, rising_edge, falling_edge); + }); +} + +void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, + float period) { + // Set default duty cycle 50% + AddClockWire(name, wire, period, 0, period / 2); +} + +void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, + float period, float rising_edge, float falling_edge) { + auto clock = clocks_.find(name); + if (clock == clocks_.end()) { + clocks_.emplace(std::make_pair( + name, Clock(name, wire, period, rising_edge, falling_edge))); + } else { + clock->second.AddClockWire(wire, period, rising_edge, falling_edge); + } +} + +Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge) + : Clock(name) { + AddClockWire(wire, period, rising_edge, falling_edge); +} + +void Clock::AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, + float falling_edge) { + clock_wires_.emplace_back(wire, period, rising_edge, falling_edge); +} diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h new file mode 100644 index 000000000..9204b267a --- /dev/null +++ b/sdc-plugin/clocks.h @@ -0,0 +1,68 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _CLOCKS_H_ +#define _CLOCKS_H_ + +#include +#include +#include "kernel/rtlil.h" + +USING_YOSYS_NAMESPACE +class ClockWire { + public: + ClockWire(RTLIL::Wire* wire, float period, float rising_edge, + float falling_edge) + : wire_(wire), + period_(period), + rising_edge_(rising_edge), + falling_edge_(falling_edge) {} + + private: + RTLIL::Wire* wire_; + float period_; + float rising_edge_; + float falling_edge_; +}; + +class Clock { + public: + Clock(const std::string& name) : name_(name) {} + Clock(const std::string& name, RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge); + void AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, + float falling_edge); + + private: + std::string name_; + std::vector clock_wires_; +}; + +class Clocks { + public: + void AddClock(const std::string& name, + const std::vector& clock_wires, float period, + float rising_edge, float falling_edge); + void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period); + void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge); + + private: + std::unordered_map clocks_; +}; + +#endif // _CLOCKS_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 6ee311f6c..426684071 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -1,7 +1,6 @@ /* * yosys -- Yosys Open SYnthesis Suite * - * Copyright (C) 2012 Clifford Wolf * Copyright (C) 2020 The Symbiflow Authors * * Permission to use, copy, modify, and/or distribute this software for any @@ -16,131 +15,140 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "clocks.h" +#include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" -#include "kernel/log.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN struct ReadSdcCmd : public Frontend { - ReadSdcCmd() - : Frontend("sdc", "Read SDC file"){} - - void help() override { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" read_sdc \n"); - log("\n"); - log("Read SDC file.\n"); - log("\n"); + ReadSdcCmd() : Frontend("sdc", "Read SDC file") {} + + void help() override { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_sdc \n"); + log("\n"); + log("Read SDC file.\n"); + log("\n"); + } + + void execute(std::istream*& f, std::string filename, + std::vector args, RTLIL::Design*) override { + if (args.size() < 2) { + log_cmd_error("Missing script file.\n"); } - - void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design*) override { - if (args.size() < 2) { - log_cmd_error("Missing script file.\n"); - } - size_t argidx = 1; - extra_args(f, filename, args, argidx); - std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; - log("%s\n", content.c_str()); - Tcl_Interp* interp = yosys_get_tcl_interp(); - if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { - log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); - } + size_t argidx = 1; + extra_args(f, filename, args, argidx); + std::string content{std::istreambuf_iterator(*f), + std::istreambuf_iterator()}; + log("%s\n", content.c_str()); + Tcl_Interp* interp = yosys_get_tcl_interp(); + if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { + log_cmd_error("TCL interpreter returned an error: %s\n", + Tcl_GetStringResult(interp)); } + } }; -using Clocks = std::vector; - struct CreateClockCmd : public Pass { - CreateClockCmd(Clocks& clocks) - : Pass("create_clock", "Create clock object") - , clocks_(clocks) - {} - - void help() override - { - log("\n"); - log(" create_clock [ -name clock_name ] -period period_value [-waveform ] \n"); - log("Define a clock.\n"); - log("If name is not specified then the name of the first target is selected as the clock's name.\n"); - log("Period is expressed in nanoseconds.\n"); - log("The waveform option specifies the duty cycle (the rising a falling edges) of the clock.\n"); - log("It is specified as a list of two elements/time values: the first rising edge and the next falling edge.\n"); - log("\n"); + CreateClockCmd(Clocks& clocks) + : Pass("create_clock", "Create clock object"), clocks_(clocks) {} + + void help() override { + log("\n"); + log(" create_clock [ -name clock_name ] -period period_value " + "[-waveform ] \n"); + log("Define a clock.\n"); + log("If name is not specified then the name of the first target is " + "selected as the clock's name.\n"); + log("Period is expressed in nanoseconds.\n"); + log("The waveform option specifies the duty cycle (the rising a " + "falling edges) of the clock.\n"); + log("It is specified as a list of two elements/time values: the first " + "rising edge and the next falling edge.\n"); + log("\n"); + } + + void execute(std::vector args, + RTLIL::Design* design) override { + size_t argidx; + std::string name; + float rising_edge(0); + float falling_edge(0); + float period(0); + if (args.size() < 4) { + log_cmd_error("Incorrect number of arguments\n"); } - - void execute(std::vector args, RTLIL::Design *design) override - { - size_t argidx; - std::string name; - float rising_edge(0); - float falling_edge(0); - float period(0); - for (argidx = 1; argidx < args.size(); argidx++) - { - std::string arg = args[argidx]; - if (arg == "-name" && argidx + 1 < args.size()) { - name = args[++argidx]; - continue; - } - if (arg == "-period" && argidx + 1 < args.size()) { - period = std::stof(args[++argidx]); - continue; - } - if (arg == "-waveform" && argidx + 2 < args.size()) { - rising_edge = std::stof(args[++argidx]); - falling_edge = std::stof(args[++argidx]); - continue; - } - break; - } - // Add "w:" prefix to selection arguments to enforce wire object selection - AddWirePrefix(args, argidx); - extra_args(args, argidx, design); - // If clock name is not specified then take the name of the first target - for (auto module : design->modules()) { - if (!design->selected(module)) { - continue; - } - for (auto wire : module->wires()) { - if (design->selected(module, wire)) { - log("Selected wire %s\n", wire->name.c_str()); - clocks_.push_back(wire); - } - } - } - if (name.empty()) { - name = clocks_.at(0)->name.str(); + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-name" && argidx + 1 < args.size()) { + name = args[++argidx]; + continue; + } + if (arg == "-period" && argidx + 1 < args.size()) { + period = std::stof(args[++argidx]); + continue; + } + if (arg == "-waveform" && argidx + 2 < args.size()) { + rising_edge = std::stof(args[++argidx]); + falling_edge = std::stof(args[++argidx]); + continue; + } + break; + } + if (period <= 0) { + log_cmd_error("Incorrect period value\n"); + } + // Add "w:" prefix to selection arguments to enforce wire object + // selection + AddWirePrefix(args, argidx); + extra_args(args, argidx, design); + // If clock name is not specified then take the name of the first target + std::vector selected_wires; + for (auto module : design->modules()) { + if (!design->selected(module)) { + continue; + } + for (auto wire : module->wires()) { + if (design->selected(module, wire)) { + log("Selected wire %s\n", wire->name.c_str()); + selected_wires.push_back(wire); } - - log("Created clock %s with period %f, waveform %f,%f\n", name.c_str(), period, rising_edge, falling_edge); + } } - - void AddWirePrefix(std::vector& args, size_t argidx) { - auto selection_begin = args.begin() + argidx; - std::transform(selection_begin, args.end(), selection_begin, [](std::string& w) {return "w:" + w;}); + if (selected_wires.size() == 0) { + log_cmd_error("Target selection is empty\n"); } - - Clocks& clocks_; + if (name.empty()) { + name = selected_wires.at(0)->name.str(); + } + clocks_.AddClock(name, selected_wires, period, rising_edge, falling_edge); + log("Created clock %s with period %f, waveform %f,%f\n", name.c_str(), + period, rising_edge, falling_edge); + } + + void AddWirePrefix(std::vector& args, size_t argidx) { + auto selection_begin = args.begin() + argidx; + std::transform(selection_begin, args.end(), selection_begin, + [](std::string& w) { return "w:" + w; }); + } + + Clocks& clocks_; }; class SdcPlugin { - public: - SdcPlugin() - : create_clock_cmd_(clocks_) - {log("Loaded SDC plugin\n");} + public: + SdcPlugin() : create_clock_cmd_(clocks_) { log("Loaded SDC plugin\n"); } - ReadSdcCmd read_sdc_cmd_; - CreateClockCmd create_clock_cmd_; + ReadSdcCmd read_sdc_cmd_; + CreateClockCmd create_clock_cmd_; - private: - Clocks clocks_; + private: + Clocks clocks_; } SdcPlugin; - - - PRIVATE_NAMESPACE_END From 41fd98042a30eee2006e09fe2baa7056561d2cd8 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 28 Jul 2020 13:47:25 +0200 Subject: [PATCH 082/845] SDC: Add clang format configuration Signed-off-by: Tomasz Michalak --- sdc-plugin/.clang-format | 151 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 sdc-plugin/.clang-format diff --git a/sdc-plugin/.clang-format b/sdc-plugin/.clang-format new file mode 100644 index 000000000..3b943525e --- /dev/null +++ b/sdc-plugin/.clang-format @@ -0,0 +1,151 @@ +--- +Language: Cpp +BasedOnStyle: Chromium +AccessModifierOffset: -1 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Attach +BreakBeforeInheritanceComma: false +BreakInheritanceList: BeforeColon +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeColon +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 80 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: true +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IncludeBlocks: Preserve +IncludeCategories: + - Regex: '^' + Priority: 2 + - Regex: '^<.*\.h>' + Priority: 1 + - Regex: '^<.*' + Priority: 2 + - Regex: '.*' + Priority: 3 +IncludeIsMainRegex: '([-_](test|unittest))?$' +IndentCaseLabels: true +IndentPPDirectives: None +IndentWidth: 4 +IndentWrappedFunctionNames: false +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: false +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBinPackProtocolList: Never +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 200 +PointerAlignment: Left +RawStringFormats: + - Language: Cpp + Delimiters: + - cc + - CC + - cpp + - Cpp + - CPP + - 'c++' + - 'C++' + CanonicalDelimiter: '' + BasedOnStyle: google + - Language: TextProto + Delimiters: + - pb + - PB + - proto + - PROTO + EnclosingFunctions: + - EqualsProto + - EquivToProto + - PARSE_PARTIAL_TEXT_PROTO + - PARSE_TEST_PROTO + - PARSE_TEXT_PROTO + - ParseTextOrDie + - ParseTextProtoOrDie + CanonicalDelimiter: '' + BasedOnStyle: google +ReflowComments: true +SortIncludes: true +SortUsingDeclarations: true +SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Auto +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TabWidth: 8 +UseTab: ForIndentation +... + From 8aedfc94da0de9d56489f01d2af1474a36c2b813 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 28 Jul 2020 14:37:03 +0200 Subject: [PATCH 083/845] SDC: Add get_clocks command Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 9 +++++++++ sdc-plugin/clocks.h | 1 + sdc-plugin/sdc.cc | 39 +++++++++++++++++++++++++++++++++++++-- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 39582c424..3f50ecf96 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -45,6 +45,15 @@ void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, } } +std::vector Clocks::GetClockNames() { + std::vector res; + for (auto clock : clocks_) { + res.push_back(clock.first); + } + return res; +} + + Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) : Clock(name) { diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 9204b267a..fbfae9b3a 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -60,6 +60,7 @@ class Clocks { void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period); void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); + std::vector GetClockNames(); private: std::unordered_map clocks_; diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 426684071..8f734d8d0 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -126,7 +126,8 @@ struct CreateClockCmd : public Pass { if (name.empty()) { name = selected_wires.at(0)->name.str(); } - clocks_.AddClock(name, selected_wires, period, rising_edge, falling_edge); + clocks_.AddClock(name, selected_wires, period, rising_edge, + falling_edge); log("Created clock %s with period %f, waveform %f,%f\n", name.c_str(), period, rising_edge, falling_edge); } @@ -140,12 +141,46 @@ struct CreateClockCmd : public Pass { Clocks& clocks_; }; +struct GetClocksCmd : public Pass { + GetClocksCmd(Clocks& clocks) + : Pass("get_clocks", "Create clock object"), clocks_(clocks) {} + + void help() override { + log("\n"); + log(" get_clocks\n"); + log("\n"); + log("Returns all clocks in the design.\n"); + log("\n"); + } + + void execute(std::vector args, + RTLIL::Design* design) override { + + std::vector clock_names(clocks_.GetClockNames()); + if (clock_names.size() == 0) { + log_warning("No clocks found in design\n"); + } + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); + for (auto name : clock_names) { + Tcl_Obj* name_obj = Tcl_NewStringObj(name.c_str(), name.size()); + Tcl_ListObjAppendElement(interp, tcl_list, name_obj); + } + Tcl_SetObjResult(interp, tcl_list); + } + + Clocks& clocks_; +}; + class SdcPlugin { public: - SdcPlugin() : create_clock_cmd_(clocks_) { log("Loaded SDC plugin\n"); } + SdcPlugin() : create_clock_cmd_(clocks_), get_clocks_cmd_(clocks_) { + log("Loaded SDC plugin\n"); + } ReadSdcCmd read_sdc_cmd_; CreateClockCmd create_clock_cmd_; + GetClocksCmd get_clocks_cmd_; private: Clocks clocks_; From c33b54d06e8e041f31244565b999fc7624c6ca16 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 30 Jul 2020 15:12:55 +0200 Subject: [PATCH 084/845] SDC: Add stubs for natural and buffer propagation Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 10 +++++- sdc-plugin/clocks.h | 6 ++++ sdc-plugin/propagation.h | 57 ++++++++++++++++++++++++++++++ sdc-plugin/sdc.cc | 33 +++++++++++++++-- sdc-plugin/tests/counter/counter.v | 27 ++++++++++++-- 5 files changed, 126 insertions(+), 7 deletions(-) create mode 100644 sdc-plugin/propagation.h diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 3f50ecf96..14ddb0995 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -15,8 +15,9 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "clocks.h" #include +#include "clocks.h" +#include "propagation.h" #include "kernel/log.h" #include "kernel/register.h" @@ -53,6 +54,13 @@ std::vector Clocks::GetClockNames() { return res; } +void Clocks::Propagate(NaturalPropagation* pass) { + (void)pass; +} + +void Clocks::Propagate(BufferPropagation* pass) { + (void)pass; +} Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index fbfae9b3a..95b2e9bba 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -23,6 +23,10 @@ #include "kernel/rtlil.h" USING_YOSYS_NAMESPACE + +class NaturalPropagation; +class BufferPropagation; + class ClockWire { public: ClockWire(RTLIL::Wire* wire, float period, float rising_edge, @@ -61,6 +65,8 @@ class Clocks { void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); std::vector GetClockNames(); + void Propagate(NaturalPropagation* pass); + void Propagate(BufferPropagation* pass); private: std::unordered_map clocks_; diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h new file mode 100644 index 000000000..271d21936 --- /dev/null +++ b/sdc-plugin/propagation.h @@ -0,0 +1,57 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _PROPAGATION_H_ +#define _PROPAGATION_H_ + +#include "kernel/rtlil.h" +#include "clocks.h" + +USING_YOSYS_NAMESPACE + +class Propagation { + public: + Propagation(RTLIL::Design* design) + : design_(design) {} + + virtual void RunPass(Clocks& clocks) = 0; + + public: + RTLIL::Design* design_; +}; + +class NaturalPropagation : public Propagation { + public: + NaturalPropagation(RTLIL::Design* design) + : Propagation(design) {} + + void RunPass(Clocks& clocks) override { + clocks.Propagate(this); + } +}; + +class BufferPropagation : public Propagation { + public: + BufferPropagation(RTLIL::Design* design) + : Propagation(design) {} + + void RunPass(Clocks& clocks) override { + clocks.Propagate(this); + } +}; + +#endif // PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 8f734d8d0..a991272cd 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -16,6 +16,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "clocks.h" +#include "propagation.h" #include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" @@ -153,9 +154,8 @@ struct GetClocksCmd : public Pass { log("\n"); } - void execute(std::vector args, + void execute(__attribute__((unused)) std::vector args, RTLIL::Design* design) override { - std::vector clock_names(clocks_.GetClockNames()); if (clock_names.size() == 0) { log_warning("No clocks found in design\n"); @@ -172,15 +172,42 @@ struct GetClocksCmd : public Pass { Clocks& clocks_; }; +struct PropagateClocksCmd : public Pass { + PropagateClocksCmd(Clocks& clocks) + : Pass("propagate_clocks", "Propagate clock information"), clocks_(clocks) {} + + void help() override { + log("\n"); + log(" propagate_clocks\n"); + log("\n"); + log("Propagate clock information throughout the design.\n"); + log("\n"); + } + + void execute(__attribute__((unused)) std::vector args, + RTLIL::Design* design) override { + NaturalPropagation natural(design); + natural.RunPass(clocks_); + /* BufferPropagation buffer(design); */ + /* buffer.RunPass(clocks_); */ + } + + Clocks& clocks_; +}; + class SdcPlugin { public: - SdcPlugin() : create_clock_cmd_(clocks_), get_clocks_cmd_(clocks_) { + SdcPlugin() + : create_clock_cmd_(clocks_), + get_clocks_cmd_(clocks_), + propagate_clocks_cmd_(clocks_) { log("Loaded SDC plugin\n"); } ReadSdcCmd read_sdc_cmd_; CreateClockCmd create_clock_cmd_; GetClocksCmd get_clocks_cmd_; + PropagateClocksCmd propagate_clocks_cmd_; private: Clocks clocks_; diff --git a/sdc-plugin/tests/counter/counter.v b/sdc-plugin/tests/counter/counter.v index 80418c035..8d2bcd964 100644 --- a/sdc-plugin/tests/counter/counter.v +++ b/sdc-plugin/tests/counter/counter.v @@ -1,14 +1,35 @@ module top(input clk, input [1:0] in, - output [1:0] out); + output [4:0] out); reg [1:0] cnt = 0; +wire clk_int_1, clk_int_2; -always @(posedge clk) begin +assign clk_int_1 = clk; +assign clk_int_2 = clk_int_1; + +always @(posedge clk_int) begin + cnt <= cnt + 1; +end + +middle middle_inst_1(.clk(clk_int_1), .out(out[2])); +middle middle_inst_2(.clk(clk_int_1), .out(out[3])); +middle middle_inst_3(.clk(clk_int_2), .out(out[4])); + +assign out[1:0] = {cnt[0], in[0]}; +endmodule + +module middle(input clk, + output out); + +reg [1:0] cnt = 0; +wire clk_int; +assign clk_int = clk; +always @(posedge clk_int) begin cnt <= cnt + 1; end -assign out = {cnt[0], in[0]}; +assign out = cnt[0]; endmodule /* module dut(); From 8e26e9a6022cb06ea79244ffd33a2140a0c4c537 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 31 Jul 2020 12:42:10 +0200 Subject: [PATCH 085/845] SDC: Implement initial version of natural propagation Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 41 +++++++++++++++++++++++++++++++--------- sdc-plugin/clocks.h | 27 ++++++++++++++++++++++++-- sdc-plugin/propagation.h | 30 ++++++++++++++++++++++++----- sdc-plugin/sdc.cc | 12 ++++++++---- 4 files changed, 90 insertions(+), 20 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 14ddb0995..905ef6269 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -21,10 +21,10 @@ #include "kernel/log.h" #include "kernel/register.h" -void Clocks::AddClock(const std::string& name, - const std::vector& clock_wires, float period, +void Clocks::AddClockWires(const std::string& name, + const std::vector& wires, float period, float rising_edge, float falling_edge) { - std::for_each(clock_wires.begin(), clock_wires.end(), [&, this](RTLIL::Wire* wire) { + std::for_each(wires.begin(), wires.end(), [&, this](RTLIL::Wire* wire) { AddClockWire(name, wire, period, rising_edge, falling_edge); }); } @@ -39,23 +39,44 @@ void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { auto clock = clocks_.find(name); if (clock == clocks_.end()) { - clocks_.emplace(std::make_pair( - name, Clock(name, wire, period, rising_edge, falling_edge))); - } else { - clock->second.AddClockWire(wire, period, rising_edge, falling_edge); + clock = clocks_.emplace(std::make_pair(name, Clock(name))).first; } + clock->second.AddClockWire(wire, period, rising_edge, falling_edge); } std::vector Clocks::GetClockNames() { std::vector res; for (auto clock : clocks_) { res.push_back(clock.first); + log("Wires in clock %s:\n", clock.first.c_str()); + for (auto wire_name : GetClockWireNames(clock.first)) { + log("%s\n", wire_name.c_str()); + } + } + return res; +} + +std::vector Clocks::GetClockWireNames(const std::string& clock_name) { + std::vector res; + auto clock = clocks_.find(clock_name); + if (clock != clocks_.end()) { + for (auto clock_wire : clock->second.GetClockWires()) { + auto wire_name = clock_wire.Wire()->name.str(); + res.push_back(wire_name); + } } return res; } void Clocks::Propagate(NaturalPropagation* pass) { - (void)pass; + for (auto clock : clocks_) { + log("Processing clock %s\n", clock.first.c_str()); + auto clock_wires = clock.second.GetClockWires(); + for (auto clock_wire : clock_wires) { + auto aliases = pass->SelectAliases(clock_wire.Wire()); + AddClockWires(clock.first, aliases, clock_wire.Period(), clock_wire.RisingEdge(), clock_wire.FallingEdge()); + } + } } void Clocks::Propagate(BufferPropagation* pass) { @@ -70,5 +91,7 @@ Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, void Clock::AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { - clock_wires_.emplace_back(wire, period, rising_edge, falling_edge); + if (std::find_if(clock_wires_.begin(), clock_wires_.end(), [wire](ClockWire& clock_wire) {return clock_wire.Wire() == wire;}) == clock_wires_.end()) { + clock_wires_.emplace_back(wire, period, rising_edge, falling_edge); + } } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 95b2e9bba..ca943e343 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -35,6 +35,18 @@ class ClockWire { period_(period), rising_edge_(rising_edge), falling_edge_(falling_edge) {} + RTLIL::Wire* Wire() { + return wire_; + } + float Period() { + return period_; + } + float RisingEdge() { + return rising_edge_; + } + float FallingEdge() { + return falling_edge_; + } private: RTLIL::Wire* wire_; @@ -50,6 +62,16 @@ class Clock { float rising_edge, float falling_edge); void AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); + std::vector GetClockWires() { + return clock_wires_; + } + ClockWire* RootWire() { + if (clock_wires_.size()) { + return &clock_wires_[0]; + } else { + return NULL; + } + } private: std::string name_; @@ -58,13 +80,14 @@ class Clock { class Clocks { public: - void AddClock(const std::string& name, - const std::vector& clock_wires, float period, + void AddClockWires(const std::string& name, + const std::vector& wires, float period, float rising_edge, float falling_edge); void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period); void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); std::vector GetClockNames(); + std::vector GetClockWireNames(const std::string& clock_name); void Propagate(NaturalPropagation* pass); void Propagate(BufferPropagation* pass); diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 271d21936..a5242165c 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -18,7 +18,9 @@ #ifndef _PROPAGATION_H_ #define _PROPAGATION_H_ +#include #include "kernel/rtlil.h" +#include "kernel/register.h" #include "clocks.h" USING_YOSYS_NAMESPACE @@ -28,7 +30,7 @@ class Propagation { Propagation(RTLIL::Design* design) : design_(design) {} - virtual void RunPass(Clocks& clocks) = 0; + virtual void Run(Clocks& clocks) = 0; public: RTLIL::Design* design_; @@ -36,12 +38,30 @@ class Propagation { class NaturalPropagation : public Propagation { public: - NaturalPropagation(RTLIL::Design* design) - : Propagation(design) {} + NaturalPropagation(RTLIL::Design* design, Pass* pass) + : Propagation(design) + , pass_(pass) {} - void RunPass(Clocks& clocks) override { + void Run(Clocks& clocks) override { clocks.Propagate(this); } + std::vector SelectAliases(RTLIL::Wire* wire) { + RTLIL::Module* top_module = design_->top_module(); + assert(top_module); + std::vector selected_wires; + pass_->extra_args(std::vector{top_module->name.str() + "/w:" + wire->name.str(), "%a"}, 0, design_); + for (auto module : design_->selected_modules()) { + //log("Wires selected in module %s:\n", module->name.c_str()); + for (auto wire : module->selected_wires()) { + //log("%s\n", wire->name.c_str()); + selected_wires.push_back(wire); + } + } + return selected_wires; + } + + private: + Pass* pass_; }; class BufferPropagation : public Propagation { @@ -49,7 +69,7 @@ class BufferPropagation : public Propagation { BufferPropagation(RTLIL::Design* design) : Propagation(design) {} - void RunPass(Clocks& clocks) override { + void Run(Clocks& clocks) override { clocks.Propagate(this); } }; diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index a991272cd..226427af6 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -127,7 +127,7 @@ struct CreateClockCmd : public Pass { if (name.empty()) { name = selected_wires.at(0)->name.str(); } - clocks_.AddClock(name, selected_wires, period, rising_edge, + clocks_.AddClockWires(name, selected_wires, period, rising_edge, falling_edge); log("Created clock %s with period %f, waveform %f,%f\n", name.c_str(), period, rising_edge, falling_edge); @@ -155,7 +155,7 @@ struct GetClocksCmd : public Pass { } void execute(__attribute__((unused)) std::vector args, - RTLIL::Design* design) override { + __attribute__((unused)) RTLIL::Design* design) override { std::vector clock_names(clocks_.GetClockNames()); if (clock_names.size() == 0) { log_warning("No clocks found in design\n"); @@ -186,8 +186,12 @@ struct PropagateClocksCmd : public Pass { void execute(__attribute__((unused)) std::vector args, RTLIL::Design* design) override { - NaturalPropagation natural(design); - natural.RunPass(clocks_); + + if (!design->top_module()) { + log_cmd_error("No top module selected\n"); + } + NaturalPropagation natural_propagation(design, this); + natural_propagation.Run(clocks_); /* BufferPropagation buffer(design); */ /* buffer.RunPass(clocks_); */ } From c6a9057c8073b9ec84e7e1a59dee3943513340d2 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 31 Jul 2020 15:00:48 +0200 Subject: [PATCH 086/845] SDC: Run passes in common loop Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 226427af6..d16971c7b 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -190,10 +190,15 @@ struct PropagateClocksCmd : public Pass { if (!design->top_module()) { log_cmd_error("No top module selected\n"); } - NaturalPropagation natural_propagation(design, this); - natural_propagation.Run(clocks_); - /* BufferPropagation buffer(design); */ - /* buffer.RunPass(clocks_); */ + + std::array, 2> passes{ + std::unique_ptr( + new NaturalPropagation(design, this)), + std::unique_ptr(new BufferPropagation(design))}; + + for (auto& pass : passes) { + pass->Run(clocks_); + } } Clocks& clocks_; From b7c28a50c665024674e7a8fb1a32407a0da52e5b Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 31 Jul 2020 15:02:32 +0200 Subject: [PATCH 087/845] SDC: Run Clang format Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 23 ++++++++------ sdc-plugin/clocks.h | 28 ++++++----------- sdc-plugin/propagation.h | 66 +++++++++++++++++++--------------------- sdc-plugin/sdc.cc | 10 +++--- 4 files changed, 58 insertions(+), 69 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 905ef6269..1fa678a1f 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -15,15 +15,15 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include "clocks.h" -#include "propagation.h" +#include #include "kernel/log.h" #include "kernel/register.h" +#include "propagation.h" void Clocks::AddClockWires(const std::string& name, - const std::vector& wires, float period, - float rising_edge, float falling_edge) { + const std::vector& wires, float period, + float rising_edge, float falling_edge) { std::for_each(wires.begin(), wires.end(), [&, this](RTLIL::Wire* wire) { AddClockWire(name, wire, period, rising_edge, falling_edge); }); @@ -56,7 +56,8 @@ std::vector Clocks::GetClockNames() { return res; } -std::vector Clocks::GetClockWireNames(const std::string& clock_name) { +std::vector Clocks::GetClockWireNames( + const std::string& clock_name) { std::vector res; auto clock = clocks_.find(clock_name); if (clock != clocks_.end()) { @@ -74,14 +75,13 @@ void Clocks::Propagate(NaturalPropagation* pass) { auto clock_wires = clock.second.GetClockWires(); for (auto clock_wire : clock_wires) { auto aliases = pass->SelectAliases(clock_wire.Wire()); - AddClockWires(clock.first, aliases, clock_wire.Period(), clock_wire.RisingEdge(), clock_wire.FallingEdge()); + AddClockWires(clock.first, aliases, clock_wire.Period(), + clock_wire.RisingEdge(), clock_wire.FallingEdge()); } } } -void Clocks::Propagate(BufferPropagation* pass) { - (void)pass; -} +void Clocks::Propagate(BufferPropagation* pass) { (void)pass; } Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) @@ -91,7 +91,10 @@ Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, void Clock::AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { - if (std::find_if(clock_wires_.begin(), clock_wires_.end(), [wire](ClockWire& clock_wire) {return clock_wire.Wire() == wire;}) == clock_wires_.end()) { + if (std::find_if(clock_wires_.begin(), clock_wires_.end(), + [wire](ClockWire& clock_wire) { + return clock_wire.Wire() == wire; + }) == clock_wires_.end()) { clock_wires_.emplace_back(wire, period, rising_edge, falling_edge); } } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index ca943e343..563d8f7a8 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -18,8 +18,8 @@ #ifndef _CLOCKS_H_ #define _CLOCKS_H_ -#include #include +#include #include "kernel/rtlil.h" USING_YOSYS_NAMESPACE @@ -35,18 +35,10 @@ class ClockWire { period_(period), rising_edge_(rising_edge), falling_edge_(falling_edge) {} - RTLIL::Wire* Wire() { - return wire_; - } - float Period() { - return period_; - } - float RisingEdge() { - return rising_edge_; - } - float FallingEdge() { - return falling_edge_; - } + RTLIL::Wire* Wire() { return wire_; } + float Period() { return period_; } + float RisingEdge() { return rising_edge_; } + float FallingEdge() { return falling_edge_; } private: RTLIL::Wire* wire_; @@ -62,9 +54,7 @@ class Clock { float rising_edge, float falling_edge); void AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); - std::vector GetClockWires() { - return clock_wires_; - } + std::vector GetClockWires() { return clock_wires_; } ClockWire* RootWire() { if (clock_wires_.size()) { return &clock_wires_[0]; @@ -81,11 +71,11 @@ class Clock { class Clocks { public: void AddClockWires(const std::string& name, - const std::vector& wires, float period, - float rising_edge, float falling_edge); + const std::vector& wires, float period, + float rising_edge, float falling_edge); void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period); void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); + float rising_edge, float falling_edge); std::vector GetClockNames(); std::vector GetClockWireNames(const std::string& clock_name); void Propagate(NaturalPropagation* pass); diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index a5242165c..c46b42ee1 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -19,59 +19,55 @@ #define _PROPAGATION_H_ #include -#include "kernel/rtlil.h" -#include "kernel/register.h" #include "clocks.h" +#include "kernel/register.h" +#include "kernel/rtlil.h" USING_YOSYS_NAMESPACE class Propagation { - public: - Propagation(RTLIL::Design* design) - : design_(design) {} + public: + Propagation(RTLIL::Design* design) : design_(design) {} - virtual void Run(Clocks& clocks) = 0; + virtual void Run(Clocks& clocks) = 0; - public: - RTLIL::Design* design_; + public: + RTLIL::Design* design_; }; class NaturalPropagation : public Propagation { - public: - NaturalPropagation(RTLIL::Design* design, Pass* pass) - : Propagation(design) - , pass_(pass) {} + public: + NaturalPropagation(RTLIL::Design* design, Pass* pass) + : Propagation(design), pass_(pass) {} - void Run(Clocks& clocks) override { - clocks.Propagate(this); - } - std::vector SelectAliases(RTLIL::Wire* wire) { - RTLIL::Module* top_module = design_->top_module(); - assert(top_module); - std::vector selected_wires; - pass_->extra_args(std::vector{top_module->name.str() + "/w:" + wire->name.str(), "%a"}, 0, design_); - for (auto module : design_->selected_modules()) { - //log("Wires selected in module %s:\n", module->name.c_str()); - for (auto wire : module->selected_wires()) { - //log("%s\n", wire->name.c_str()); - selected_wires.push_back(wire); - } + void Run(Clocks& clocks) override { clocks.Propagate(this); } + std::vector SelectAliases(RTLIL::Wire* wire) { + RTLIL::Module* top_module = design_->top_module(); + assert(top_module); + std::vector selected_wires; + pass_->extra_args( + std::vector{ + top_module->name.str() + "/w:" + wire->name.str(), "%a"}, + 0, design_); + for (auto module : design_->selected_modules()) { + // log("Wires selected in module %s:\n", module->name.c_str()); + for (auto wire : module->selected_wires()) { + // log("%s\n", wire->name.c_str()); + selected_wires.push_back(wire); } - return selected_wires; } + return selected_wires; + } - private: - Pass* pass_; + private: + Pass* pass_; }; class BufferPropagation : public Propagation { - public: - BufferPropagation(RTLIL::Design* design) - : Propagation(design) {} + public: + BufferPropagation(RTLIL::Design* design) : Propagation(design) {} - void Run(Clocks& clocks) override { - clocks.Propagate(this); - } + void Run(Clocks& clocks) override { clocks.Propagate(this); } }; #endif // PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index d16971c7b..afec56936 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -16,10 +16,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "clocks.h" -#include "propagation.h" #include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" +#include "propagation.h" USING_YOSYS_NAMESPACE @@ -128,7 +128,7 @@ struct CreateClockCmd : public Pass { name = selected_wires.at(0)->name.str(); } clocks_.AddClockWires(name, selected_wires, period, rising_edge, - falling_edge); + falling_edge); log("Created clock %s with period %f, waveform %f,%f\n", name.c_str(), period, rising_edge, falling_edge); } @@ -160,7 +160,7 @@ struct GetClocksCmd : public Pass { if (clock_names.size() == 0) { log_warning("No clocks found in design\n"); } - Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_Interp* interp = yosys_get_tcl_interp(); Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); for (auto name : clock_names) { Tcl_Obj* name_obj = Tcl_NewStringObj(name.c_str(), name.size()); @@ -174,7 +174,8 @@ struct GetClocksCmd : public Pass { struct PropagateClocksCmd : public Pass { PropagateClocksCmd(Clocks& clocks) - : Pass("propagate_clocks", "Propagate clock information"), clocks_(clocks) {} + : Pass("propagate_clocks", "Propagate clock information"), + clocks_(clocks) {} void help() override { log("\n"); @@ -186,7 +187,6 @@ struct PropagateClocksCmd : public Pass { void execute(__attribute__((unused)) std::vector args, RTLIL::Design* design) override { - if (!design->top_module()) { log_cmd_error("No top module selected\n"); } From ef50eef9aa3e75443002fe8603c79e6d249c9e6c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 4 Aug 2020 09:41:55 +0200 Subject: [PATCH 088/845] SDC: Implement IBUF buffer propagation Signed-off-by: Tomasz Michalak --- sdc-plugin/Makefile | 2 +- sdc-plugin/clocks.cc | 17 ++++++- sdc-plugin/clocks.h | 7 --- sdc-plugin/propagation.cc | 98 +++++++++++++++++++++++++++++++++++++++ sdc-plugin/propagation.h | 38 +++++---------- sdc-plugin/sdc.cc | 2 +- 6 files changed, 126 insertions(+), 38 deletions(-) create mode 100644 sdc-plugin/propagation.cc diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index 4626fd4fa..2d206b4fe 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -4,7 +4,7 @@ LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins -OBJS = clocks.o sdc.o +OBJS = clocks.o propagation.o sdc.o sdc.so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 1fa678a1f..8cfcbf415 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -74,14 +74,27 @@ void Clocks::Propagate(NaturalPropagation* pass) { log("Processing clock %s\n", clock.first.c_str()); auto clock_wires = clock.second.GetClockWires(); for (auto clock_wire : clock_wires) { - auto aliases = pass->SelectAliases(clock_wire.Wire()); + auto aliases = pass->FindAliasWires(clock_wire.Wire()); AddClockWires(clock.first, aliases, clock_wire.Period(), clock_wire.RisingEdge(), clock_wire.FallingEdge()); } } } -void Clocks::Propagate(BufferPropagation* pass) { (void)pass; } +void Clocks::Propagate(BufferPropagation* pass) { + for (auto clock : clocks_) { + log("Processing clock %s\n", clock.first.c_str()); + auto clock_wires = clock.second.GetClockWires(); + for (auto clock_wire : clock_wires) { + log("Clock wire %s\n", clock_wire.Wire()->name.c_str()); + auto ibuf_wires = pass->FindIBufWires(clock_wire.Wire()); + for (auto wire : ibuf_wires) { + log("IBUF wire: %s\n", wire->name.c_str()); + } + } + + } +} Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 563d8f7a8..138233185 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -55,13 +55,6 @@ class Clock { void AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); std::vector GetClockWires() { return clock_wires_; } - ClockWire* RootWire() { - if (clock_wires_.size()) { - return &clock_wires_[0]; - } else { - return NULL; - } - } private: std::string name_; diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc new file mode 100644 index 000000000..fa82b9309 --- /dev/null +++ b/sdc-plugin/propagation.cc @@ -0,0 +1,98 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include +#include "propagation.h" + +USING_YOSYS_NAMESPACE + +std::vector NaturalPropagation::FindAliasWires( + RTLIL::Wire* wire) { + RTLIL::Module* top_module = design_->top_module(); + assert(top_module); + std::vector alias_wires; + pass_->extra_args( + std::vector{ + top_module->name.str() + "/w:" + wire->name.str(), "%a"}, + 0, design_); + for (auto module : design_->selected_modules()) { + for (auto wire : module->selected_wires()) { + alias_wires.push_back(wire); + } + } + return alias_wires; +} + +std::vector BufferPropagation::FindIBufWires(RTLIL::Wire* wire) { + std::vector wires; + auto ibuf_cell = FindSinkCell(wire, "IBUF"); + RTLIL::Wire* ibuf_wire = FindSinkWireOnPort(ibuf_cell, "O"); + if (ibuf_wire) { + wires.push_back(ibuf_wire); + auto ibuf_wires = FindIBufWires(ibuf_wire); + std::copy(ibuf_wires.begin(), ibuf_wires.end(), + std::back_inserter(wires)); + } + return wires; +} + +RTLIL::Cell* BufferPropagation::FindSinkCell(RTLIL::Wire* wire, + const std::string& type) { + RTLIL::Cell* sink_cell = NULL; + if (!wire) { + return sink_cell; + } + RTLIL::Module* top_module = design_->top_module(); + assert(top_module); + std::string base_selection = + top_module->name.str() + "/w:" + wire->name.str(); + pass_->extra_args(std::vector{base_selection, "%co:+" + type, + base_selection, "%d"}, + 0, design_); + auto selected_cells = top_module->selected_cells(); + // FIXME Handle more than one sink + assert(selected_cells.size() <= 1); + if (selected_cells.size() > 0) { + sink_cell = selected_cells.at(0); + log("Found cell: %s\n", sink_cell->name.c_str()); + } + return sink_cell; +} + +RTLIL::Wire* BufferPropagation::FindSinkWireOnPort( + RTLIL::Cell* cell, const std::string& port_name) { + RTLIL::Wire* sink_wire = NULL; + if (!cell) { + return sink_wire; + } + RTLIL::Module* top_module = design_->top_module(); + assert(top_module); + std::string base_selection = + top_module->name.str() + "/c:" + cell->name.str(); + pass_->extra_args( + std::vector{base_selection, "%co:+[" + port_name + "]", + base_selection, "%d"}, + 0, design_); + auto selected_wires = top_module->selected_wires(); + // FIXME Handle more than one sink + assert(selected_wires.size() <= 1); + if (selected_wires.size() > 0) { + sink_wire = selected_wires.at(0); + log("Found wire: %s\n", sink_wire->name.c_str()); + } + return sink_wire; +} diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index c46b42ee1..7770dcd81 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -18,56 +18,40 @@ #ifndef _PROPAGATION_H_ #define _PROPAGATION_H_ -#include #include "clocks.h" -#include "kernel/register.h" -#include "kernel/rtlil.h" USING_YOSYS_NAMESPACE class Propagation { public: - Propagation(RTLIL::Design* design) : design_(design) {} + Propagation(RTLIL::Design* design, Pass* pass) : design_(design), pass_(pass) {} virtual void Run(Clocks& clocks) = 0; - public: + protected: RTLIL::Design* design_; + Pass* pass_; }; class NaturalPropagation : public Propagation { public: NaturalPropagation(RTLIL::Design* design, Pass* pass) - : Propagation(design), pass_(pass) {} + : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } - std::vector SelectAliases(RTLIL::Wire* wire) { - RTLIL::Module* top_module = design_->top_module(); - assert(top_module); - std::vector selected_wires; - pass_->extra_args( - std::vector{ - top_module->name.str() + "/w:" + wire->name.str(), "%a"}, - 0, design_); - for (auto module : design_->selected_modules()) { - // log("Wires selected in module %s:\n", module->name.c_str()); - for (auto wire : module->selected_wires()) { - // log("%s\n", wire->name.c_str()); - selected_wires.push_back(wire); - } - } - return selected_wires; - } - - private: - Pass* pass_; + std::vector FindAliasWires(RTLIL::Wire* wire); }; class BufferPropagation : public Propagation { public: - BufferPropagation(RTLIL::Design* design) : Propagation(design) {} + BufferPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } + std::vector FindIBufWires(RTLIL::Wire* wire); + + private: + RTLIL::Cell* FindSinkCell(RTLIL::Wire* wire, const std::string& type); + RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, const std::string& port_name); }; #endif // PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index afec56936..d90150792 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -194,7 +194,7 @@ struct PropagateClocksCmd : public Pass { std::array, 2> passes{ std::unique_ptr( new NaturalPropagation(design, this)), - std::unique_ptr(new BufferPropagation(design))}; + std::unique_ptr(new BufferPropagation(design, this))}; for (auto& pass : passes) { pass->Run(clocks_); From e6f479ce938a8684a4ae59e6b8c3df6492a1003f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 4 Aug 2020 13:00:44 +0200 Subject: [PATCH 089/845] SDC: Update tests Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/counter/counter.sdc | 3 ++- sdc-plugin/tests/counter/counter.tcl | 24 ++++++++++++++---------- sdc-plugin/tests/counter/counter.v | 14 +++++++++----- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/sdc-plugin/tests/counter/counter.sdc b/sdc-plugin/tests/counter/counter.sdc index a253f8dff..796e8499f 100644 --- a/sdc-plugin/tests/counter/counter.sdc +++ b/sdc-plugin/tests/counter/counter.sdc @@ -1 +1,2 @@ -create_clock -name clk -period 10.0 clk +create_clock -period 10.0 -name clk2 -waveform {0.000 5.000} clk_int_1 +create_clock -period 10.0 -name clk -waveform {0.000 5.000} clk diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index 1bf2fc9b6..16614a216 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -8,12 +8,16 @@ read_verilog counter.v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top - # Start flow after library reading synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check -# -##Read the design timing constraints -#read_sdc $::env(INPUT_SDC_FILE) +# Read the design's timing constraints +set ::env(INPUT_SDC_FILE) counter.sdc +read_sdc $::env(INPUT_SDC_FILE) +set clocks [get_clocks] +puts $clocks +stop +#select top/w:clk %a + #return # ##Read the design constraints @@ -25,12 +29,12 @@ synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # ## opt_expr -undriven makes sure all nets are driven, if only by the $undef ## net. -opt_expr -undriven -opt_clean +#opt_expr -undriven +#opt_clean # -setundef -zero -params -stat +#setundef -zero -params +#stat # ## Write the design in JSON format. -write_json $::env(OUT_JSON) -write_blif -attr -param -cname -conn $::env(OUT_EBLIF) +#write_json $::env(OUT_JSON) +#write_blif -attr -param -cname -conn $::env(OUT_EBLIF) diff --git a/sdc-plugin/tests/counter/counter.v b/sdc-plugin/tests/counter/counter.v index 8d2bcd964..70e02f54f 100644 --- a/sdc-plugin/tests/counter/counter.v +++ b/sdc-plugin/tests/counter/counter.v @@ -1,18 +1,22 @@ module top(input clk, input [1:0] in, - output [4:0] out); + output [4:0] out ); reg [1:0] cnt = 0; +//wire [4:1] out; wire clk_int_1, clk_int_2; - -assign clk_int_1 = clk; +IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); +IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); +//IBUF ibuf_inst_2(.I(ibuf_out_1), .O(ibuf_out_2)); +assign clk_int_1 = ibuf_out; assign clk_int_2 = clk_int_1; +//assign do = out[0]; -always @(posedge clk_int) begin +always @(posedge clk_int_2) begin cnt <= cnt + 1; end -middle middle_inst_1(.clk(clk_int_1), .out(out[2])); +middle middle_inst_1(.clk(ibuf_out), .out(out[2])); middle middle_inst_2(.clk(clk_int_1), .out(out[3])); middle middle_inst_3(.clk(clk_int_2), .out(out[4])); From 0b42cbc23fdeffecdcdb38962b0245449bf3ca51 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 4 Aug 2020 14:10:36 +0200 Subject: [PATCH 090/845] SDC: Update clocks after IBUF propagation Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 56 ++++++++++++++++++++++++--------------- sdc-plugin/clocks.h | 5 +++- sdc-plugin/propagation.cc | 19 +++++++++++-- sdc-plugin/propagation.h | 2 ++ sdc-plugin/sdc.cc | 10 ++++--- 5 files changed, 64 insertions(+), 28 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 8cfcbf415..5024fff67 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -16,11 +16,13 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "clocks.h" -#include +#include #include "kernel/log.h" #include "kernel/register.h" #include "propagation.h" +int Clocks::ibuf_delay = 1; + void Clocks::AddClockWires(const std::string& name, const std::vector& wires, float period, float rising_edge, float falling_edge) { @@ -48,28 +50,19 @@ std::vector Clocks::GetClockNames() { std::vector res; for (auto clock : clocks_) { res.push_back(clock.first); +#ifdef SDC_DEBUG + // FIXME this is just for debugging log("Wires in clock %s:\n", clock.first.c_str()); - for (auto wire_name : GetClockWireNames(clock.first)) { - log("%s\n", wire_name.c_str()); - } - } - return res; -} - -std::vector Clocks::GetClockWireNames( - const std::string& clock_name) { - std::vector res; - auto clock = clocks_.find(clock_name); - if (clock != clocks_.end()) { - for (auto clock_wire : clock->second.GetClockWires()) { - auto wire_name = clock_wire.Wire()->name.str(); - res.push_back(wire_name); + for (auto clock_wire : clock.second.GetClockWires()) { + log("create_clock -period %f -name %s -waveform {%f %f} %s\n", clock_wire.Period(), clock.first.c_str(), clock_wire.RisingEdge(), clock_wire.FallingEdge(), clock_wire.Name().c_str()); } +#endif } return res; } void Clocks::Propagate(NaturalPropagation* pass) { + log("Start natural clock propagation\n"); for (auto clock : clocks_) { log("Processing clock %s\n", clock.first.c_str()); auto clock_wires = clock.second.GetClockWires(); @@ -79,21 +72,25 @@ void Clocks::Propagate(NaturalPropagation* pass) { clock_wire.RisingEdge(), clock_wire.FallingEdge()); } } + log("Finish natural clock propagation\n"); } void Clocks::Propagate(BufferPropagation* pass) { + log("Start buffer clock propagation\n"); for (auto clock : clocks_) { log("Processing clock %s\n", clock.first.c_str()); auto clock_wires = clock.second.GetClockWires(); for (auto clock_wire : clock_wires) { - log("Clock wire %s\n", clock_wire.Wire()->name.c_str()); auto ibuf_wires = pass->FindIBufWires(clock_wire.Wire()); + int path_delay(0); for (auto wire : ibuf_wires) { log("IBUF wire: %s\n", wire->name.c_str()); + path_delay += ibuf_delay; + AddClockWire(clock.first, wire, clock_wire.Period(), clock_wire.RisingEdge() + path_delay, clock_wire.FallingEdge() + path_delay); } } - } + log("Finish buffer clock propagation\n"); } Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, @@ -104,10 +101,25 @@ Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, void Clock::AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { - if (std::find_if(clock_wires_.begin(), clock_wires_.end(), - [wire](ClockWire& clock_wire) { - return clock_wire.Wire() == wire; - }) == clock_wires_.end()) { + auto clock_wire = std::find_if( + clock_wires_.begin(), clock_wires_.end(), + [wire](ClockWire& clock_wire) { return clock_wire.Wire() == wire; }); + if (clock_wire == clock_wires_.end()) { clock_wires_.emplace_back(wire, period, rising_edge, falling_edge); + } else { + clock_wire->UpdatePeriod(period); + clock_wire->UpdateWaveform(rising_edge, falling_edge); } } + +void ClockWire::UpdatePeriod(float period) { + period_ = period; + rising_edge_ = 0; + falling_edge_ = period / 2; +} + +void ClockWire::UpdateWaveform(float rising_edge, float falling_edge) { + rising_edge_ = rising_edge; + falling_edge_ = falling_edge; + assert(falling_edge - rising_edge == period_ / 2); +} diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 138233185..36314c3d9 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -36,9 +36,12 @@ class ClockWire { rising_edge_(rising_edge), falling_edge_(falling_edge) {} RTLIL::Wire* Wire() { return wire_; } + std::string Name() { return RTLIL::unescape_id(wire_->name); } float Period() { return period_; } float RisingEdge() { return rising_edge_; } float FallingEdge() { return falling_edge_; } + void UpdatePeriod(float period); + void UpdateWaveform(float rising_edge, float falling_edge); private: RTLIL::Wire* wire_; @@ -70,12 +73,12 @@ class Clocks { void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); std::vector GetClockNames(); - std::vector GetClockWireNames(const std::string& clock_name); void Propagate(NaturalPropagation* pass); void Propagate(BufferPropagation* pass); private: std::unordered_map clocks_; + static int ibuf_delay; }; #endif // _CLOCKS_H_ diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index fa82b9309..6d4b3799f 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -50,6 +50,21 @@ std::vector BufferPropagation::FindIBufWires(RTLIL::Wire* wire) { return wires; } +std::vector BufferPropagation::FindSinkWiresForCellType(RTLIL::Wire* driver_wire, + const std::string& type) { + if (!driver_wire) { + return std::vector(); + } + RTLIL::Module* top_module = design_->top_module(); + assert(top_module); + std::string base_selection = + top_module->name.str() + "/w:" + driver_wire->name.str(); + pass_->extra_args(std::vector{base_selection, "%co*:+" + type, + base_selection, "%d"}, + 0, design_); + return top_module->selected_wires(); +} + RTLIL::Cell* BufferPropagation::FindSinkCell(RTLIL::Wire* wire, const std::string& type) { RTLIL::Cell* sink_cell = NULL; @@ -68,7 +83,7 @@ RTLIL::Cell* BufferPropagation::FindSinkCell(RTLIL::Wire* wire, assert(selected_cells.size() <= 1); if (selected_cells.size() > 0) { sink_cell = selected_cells.at(0); - log("Found cell: %s\n", sink_cell->name.c_str()); + log("Found sink cell: %s\n", sink_cell->name.c_str()); } return sink_cell; } @@ -92,7 +107,7 @@ RTLIL::Wire* BufferPropagation::FindSinkWireOnPort( assert(selected_wires.size() <= 1); if (selected_wires.size() > 0) { sink_wire = selected_wires.at(0); - log("Found wire: %s\n", sink_wire->name.c_str()); + log("Found sink wire: %s\n", sink_wire->name.c_str()); } return sink_wire; } diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 7770dcd81..00fb50b2e 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -48,6 +48,8 @@ class BufferPropagation : public Propagation { void Run(Clocks& clocks) override { clocks.Propagate(this); } std::vector FindIBufWires(RTLIL::Wire* wire); + std::vector FindSinkWiresForCellType(RTLIL::Wire* driver_wire, + const std::string& type); private: RTLIL::Cell* FindSinkCell(RTLIL::Wire* wire, const std::string& type); diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index d90150792..df2f551b2 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -15,6 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include "clocks.h" #include "kernel/log.h" #include "kernel/register.h" @@ -94,9 +95,12 @@ struct CreateClockCmd : public Pass { period = std::stof(args[++argidx]); continue; } - if (arg == "-waveform" && argidx + 2 < args.size()) { - rising_edge = std::stof(args[++argidx]); - falling_edge = std::stof(args[++argidx]); + if (arg == "-waveform" && argidx + 1 < args.size()) { + std::string edges(args[++argidx]); + std::copy_if(edges.begin(), edges.end(), edges.begin(), + [](char c) { return c != '{' or c != '}'; }); + std::stringstream ss(edges); + ss >> rising_edge >> falling_edge; continue; } break; From 1ebd7b3d49b1a7bfb9a6d6b98059d1feb4ae4186 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 4 Aug 2020 17:40:07 +0200 Subject: [PATCH 091/845] SDC: Generalize Propagate methods for BUFG Signed-off-by: Tomasz Michalak --- sdc-plugin/Makefile | 2 +- sdc-plugin/buffers.h | 36 ++++++++++++++++++++++++++++ sdc-plugin/clocks.cc | 33 +++++++++++++++---------- sdc-plugin/clocks.h | 4 +++- sdc-plugin/propagation.cc | 20 +++++++++------- sdc-plugin/propagation.h | 5 ++-- sdc-plugin/tests/counter/counter.tcl | 2 ++ 7 files changed, 77 insertions(+), 25 deletions(-) create mode 100644 sdc-plugin/buffers.h diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index 2d206b4fe..7a31092ab 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -1,5 +1,5 @@ CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) +CXXFLAGS = $(shell yosys-config --cxxflags) -DSDC_DEBUG LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h new file mode 100644 index 000000000..b0f80b133 --- /dev/null +++ b/sdc-plugin/buffers.h @@ -0,0 +1,36 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _BUFFERS_H_ +#define _BUFFERS_H_ + +struct Buffer { + Buffer(float delay, const std::string& name, const std::string& output) : delay(delay), name(name), output(output) {} + float delay; + std::string name; + std::string output; +}; + +struct IBuf : Buffer { + IBuf() : Buffer(1, "IBUF", "O") {}; +}; + +struct Bufg : Buffer { + Bufg() : Buffer(1, "BUFG", "O") {}; +}; + +#endif // _BUFFERS_H_ diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 5024fff67..f16f5a2ae 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -21,8 +21,6 @@ #include "kernel/register.h" #include "propagation.h" -int Clocks::ibuf_delay = 1; - void Clocks::AddClockWires(const std::string& name, const std::vector& wires, float period, float rising_edge, float falling_edge) { @@ -77,22 +75,31 @@ void Clocks::Propagate(NaturalPropagation* pass) { void Clocks::Propagate(BufferPropagation* pass) { log("Start buffer clock propagation\n"); - for (auto clock : clocks_) { + for (auto& clock : clocks_) { log("Processing clock %s\n", clock.first.c_str()); - auto clock_wires = clock.second.GetClockWires(); - for (auto clock_wire : clock_wires) { - auto ibuf_wires = pass->FindIBufWires(clock_wire.Wire()); - int path_delay(0); - for (auto wire : ibuf_wires) { - log("IBUF wire: %s\n", wire->name.c_str()); - path_delay += ibuf_delay; - AddClockWire(clock.first, wire, clock_wire.Period(), clock_wire.RisingEdge() + path_delay, clock_wire.FallingEdge() + path_delay); - } - } + PropagateThroughBuffer(pass, clock, IBuf()); + PropagateThroughBuffer(pass, clock, Bufg()); } log("Finish buffer clock propagation\n"); } +void Clocks::PropagateThroughBuffer(BufferPropagation* pass, decltype(clocks_)::value_type clock, + Buffer buffer) { + auto clock_wires = clock.second.GetClockWires(); + for (auto clock_wire : clock_wires) { + auto buf_wires = pass->FindSinkWiresForCellType( + clock_wire.Wire(), buffer.name, buffer.output); + int path_delay(0); + for (auto wire : buf_wires) { + log("%s wire: %s\n", buffer.name.c_str(), wire->name.c_str()); + path_delay += buffer.delay; + AddClockWire(clock.first, wire, clock_wire.Period(), + clock_wire.RisingEdge() + path_delay, + clock_wire.FallingEdge() + path_delay); + } + } +} + Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) : Clock(name) { diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 36314c3d9..94d80aed9 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -20,6 +20,7 @@ #include #include +#include "buffers.h" #include "kernel/rtlil.h" USING_YOSYS_NAMESPACE @@ -64,6 +65,7 @@ class Clock { std::vector clock_wires_; }; + class Clocks { public: void AddClockWires(const std::string& name, @@ -78,7 +80,7 @@ class Clocks { private: std::unordered_map clocks_; - static int ibuf_delay; + void PropagateThroughBuffer(BufferPropagation* pass, decltype(clocks_)::value_type clock, Buffer buffer); }; #endif // _CLOCKS_H_ diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 6d4b3799f..cca692921 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -37,20 +37,24 @@ std::vector NaturalPropagation::FindAliasWires( return alias_wires; } -std::vector BufferPropagation::FindIBufWires(RTLIL::Wire* wire) { +std::vector BufferPropagation::FindSinkWiresForCellType(RTLIL::Wire* driver_wire, + const std::string& cell_type, const std::string& cell_port) { std::vector wires; - auto ibuf_cell = FindSinkCell(wire, "IBUF"); - RTLIL::Wire* ibuf_wire = FindSinkWireOnPort(ibuf_cell, "O"); - if (ibuf_wire) { - wires.push_back(ibuf_wire); - auto ibuf_wires = FindIBufWires(ibuf_wire); - std::copy(ibuf_wires.begin(), ibuf_wires.end(), + if (!driver_wire) { + return wires; + } + auto cell = FindSinkCell(driver_wire, cell_type); + RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); + if (wire) { + wires.push_back(wire); + auto further_wires = FindSinkWiresForCellType(wire, cell_type, cell_port); + std::copy(further_wires.begin(), further_wires.end(), std::back_inserter(wires)); } return wires; } -std::vector BufferPropagation::FindSinkWiresForCellType(RTLIL::Wire* driver_wire, +std::vector BufferPropagation::FindSinkWiresForCellType2(RTLIL::Wire* driver_wire, const std::string& type) { if (!driver_wire) { return std::vector(); diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 00fb50b2e..456f0384a 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -47,13 +47,14 @@ class BufferPropagation : public Propagation { BufferPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } - std::vector FindIBufWires(RTLIL::Wire* wire); std::vector FindSinkWiresForCellType(RTLIL::Wire* driver_wire, - const std::string& type); + const std::string& cell_type, const std::string& cell_port); private: RTLIL::Cell* FindSinkCell(RTLIL::Wire* wire, const std::string& type); RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, const std::string& port_name); + std::vector FindSinkWiresForCellType2(RTLIL::Wire* driver_wire, + const std::string& type); }; #endif // PROPAGATION_H_ diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index 16614a216..4471078b1 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -15,6 +15,8 @@ set ::env(INPUT_SDC_FILE) counter.sdc read_sdc $::env(INPUT_SDC_FILE) set clocks [get_clocks] puts $clocks +propagate_clocks +get_clocks stop #select top/w:clk %a From 4bb530e32ee384950ccf2946d31a02fad010ec44 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 5 Aug 2020 15:37:01 +0200 Subject: [PATCH 092/845] SDC: Add ClockDividerPropagation stub Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 8 ++++++++ sdc-plugin/clocks.h | 2 ++ sdc-plugin/propagation.cc | 6 +++--- sdc-plugin/propagation.h | 16 ++++++++++++---- sdc-plugin/sdc.cc | 5 +++-- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index f16f5a2ae..0102037dd 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -83,6 +83,14 @@ void Clocks::Propagate(BufferPropagation* pass) { log("Finish buffer clock propagation\n"); } +void Clocks::Propagate(ClockDividerPropagation* pass) { + log("Start clock divider clock propagation\n"); + for (auto& clock : clocks_) { + log("Processing clock %s\n", clock.first.c_str()); + } + log("Finish clock divider clock propagation\n"); +} + void Clocks::PropagateThroughBuffer(BufferPropagation* pass, decltype(clocks_)::value_type clock, Buffer buffer) { auto clock_wires = clock.second.GetClockWires(); diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 94d80aed9..021246a0c 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -27,6 +27,7 @@ USING_YOSYS_NAMESPACE class NaturalPropagation; class BufferPropagation; +class ClockDividerPropagation; class ClockWire { public: @@ -77,6 +78,7 @@ class Clocks { std::vector GetClockNames(); void Propagate(NaturalPropagation* pass); void Propagate(BufferPropagation* pass); + void Propagate(ClockDividerPropagation* pass); private: std::unordered_map clocks_; diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index cca692921..41a1616ff 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -37,7 +37,7 @@ std::vector NaturalPropagation::FindAliasWires( return alias_wires; } -std::vector BufferPropagation::FindSinkWiresForCellType(RTLIL::Wire* driver_wire, +std::vector Propagation::FindSinkWiresForCellType(RTLIL::Wire* driver_wire, const std::string& cell_type, const std::string& cell_port) { std::vector wires; if (!driver_wire) { @@ -69,7 +69,7 @@ std::vector BufferPropagation::FindSinkWiresForCellType2(RTLIL::Wi return top_module->selected_wires(); } -RTLIL::Cell* BufferPropagation::FindSinkCell(RTLIL::Wire* wire, +RTLIL::Cell* Propagation::FindSinkCell(RTLIL::Wire* wire, const std::string& type) { RTLIL::Cell* sink_cell = NULL; if (!wire) { @@ -92,7 +92,7 @@ RTLIL::Cell* BufferPropagation::FindSinkCell(RTLIL::Wire* wire, return sink_cell; } -RTLIL::Wire* BufferPropagation::FindSinkWireOnPort( +RTLIL::Wire* Propagation::FindSinkWireOnPort( RTLIL::Cell* cell, const std::string& port_name) { RTLIL::Wire* sink_wire = NULL; if (!cell) { diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 456f0384a..575f0f5a1 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -27,10 +27,15 @@ class Propagation { Propagation(RTLIL::Design* design, Pass* pass) : design_(design), pass_(pass) {} virtual void Run(Clocks& clocks) = 0; + std::vector FindSinkWiresForCellType(RTLIL::Wire* driver_wire, + const std::string& cell_type, const std::string& cell_port); protected: RTLIL::Design* design_; Pass* pass_; + + RTLIL::Cell* FindSinkCell(RTLIL::Wire* wire, const std::string& type); + RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, const std::string& port_name); }; class NaturalPropagation : public Propagation { @@ -47,14 +52,17 @@ class BufferPropagation : public Propagation { BufferPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } - std::vector FindSinkWiresForCellType(RTLIL::Wire* driver_wire, - const std::string& cell_type, const std::string& cell_port); private: - RTLIL::Cell* FindSinkCell(RTLIL::Wire* wire, const std::string& type); - RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, const std::string& port_name); std::vector FindSinkWiresForCellType2(RTLIL::Wire* driver_wire, const std::string& type); }; +class ClockDividerPropagation : public Propagation { + public: + ClockDividerPropagation(RTLIL::Design* design, Pass* pass) + : Propagation(design, pass) {} + + void Run(Clocks& clocks) override { clocks.Propagate(this); } +}; #endif // PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index df2f551b2..e74762232 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -195,10 +195,11 @@ struct PropagateClocksCmd : public Pass { log_cmd_error("No top module selected\n"); } - std::array, 2> passes{ + std::array, 3> passes{ std::unique_ptr( new NaturalPropagation(design, this)), - std::unique_ptr(new BufferPropagation(design, this))}; + std::unique_ptr(new BufferPropagation(design, this)), + std::unique_ptr(new ClockDividerPropagation(design, this))}; for (auto& pass : passes) { pass->Run(clocks_); From ede49b7215cc684a37e3a8f2a604626fb344a751 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 5 Aug 2020 23:55:54 +0200 Subject: [PATCH 093/845] SDC: Implement Clock Divider Propagation Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.h | 10 ++++++++++ sdc-plugin/clocks.cc | 22 ++++++++++++++++++++-- sdc-plugin/propagation.cc | 15 +++++++++++++++ sdc-plugin/propagation.h | 2 ++ sdc-plugin/tests/pll/pll.tcl | 5 +++-- 5 files changed, 50 insertions(+), 4 deletions(-) diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index b0f80b133..caa5cbbf9 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -18,11 +18,18 @@ #ifndef _BUFFERS_H_ #define _BUFFERS_H_ +#include +#include +#include +#include + struct Buffer { Buffer(float delay, const std::string& name, const std::string& output) : delay(delay), name(name), output(output) {} + Buffer(float delay, const std::string& name, const std::initializer_list& outputs) : delay(delay), name(name), outputs(outputs.begin(), outputs.end()) {} float delay; std::string name; std::string output; + std::vector outputs; }; struct IBuf : Buffer { @@ -33,4 +40,7 @@ struct Bufg : Buffer { Bufg() : Buffer(1, "BUFG", "O") {}; }; +struct Pll : Buffer { + Pll() : Buffer(1, "PLLE2_ADV", {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", "CLKOUT5"}) {}; +}; #endif // _BUFFERS_H_ diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 0102037dd..ac19bf4d4 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -52,7 +52,10 @@ std::vector Clocks::GetClockNames() { // FIXME this is just for debugging log("Wires in clock %s:\n", clock.first.c_str()); for (auto clock_wire : clock.second.GetClockWires()) { - log("create_clock -period %f -name %s -waveform {%f %f} %s\n", clock_wire.Period(), clock.first.c_str(), clock_wire.RisingEdge(), clock_wire.FallingEdge(), clock_wire.Name().c_str()); + log("create_clock -period %f -name %s -waveform {%f %f} %s\n", + clock_wire.Period(), clock.first.c_str(), + clock_wire.RisingEdge(), clock_wire.FallingEdge(), + clock_wire.Name().c_str()); } #endif } @@ -87,11 +90,26 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { log("Start clock divider clock propagation\n"); for (auto& clock : clocks_) { log("Processing clock %s\n", clock.first.c_str()); + auto clock_wires = clock.second.GetClockWires(); + for (auto clock_wire : clock_wires) { + Pll pll; + for (auto output : pll.outputs) { + auto pll_wires = pass->FindSinkWiresForCellType( + clock_wire, "PLLE2_ADV", output); + for (auto wire : pll_wires) { + log("%s wire on output %s: %s\n", pll.name.c_str(), + output.c_str(), wire.Name().c_str()); + //CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE / CLKFBOUT_MULT + //AddClockWire(wire); + } + } + } } log("Finish clock divider clock propagation\n"); } -void Clocks::PropagateThroughBuffer(BufferPropagation* pass, decltype(clocks_)::value_type clock, +void Clocks::PropagateThroughBuffer(BufferPropagation* pass, + decltype(clocks_)::value_type clock, Buffer buffer) { auto clock_wires = clock.second.GetClockWires(); for (auto clock_wire : clock_wires) { diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 41a1616ff..dedf693d4 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -37,6 +37,21 @@ std::vector NaturalPropagation::FindAliasWires( return alias_wires; } +std::vector ClockDividerPropagation::FindSinkWiresForCellType(ClockWire& driver_wire, + const std::string& cell_type, const std::string& cell_port) { + std::vector wires; + //CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE / CLKFBOUT_MULT + /* auto cell = FindSinkCell(driver_wire, cell_type); */ + /* RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); */ + /* if (wire) { */ + /* wires.push_back(wire); */ + /* auto further_wires = FindSinkWiresForCellType(wire, cell_type, cell_port); */ + /* std::copy(further_wires.begin(), further_wires.end(), */ + /* std::back_inserter(wires)); */ + /* } */ + return wires; +} + std::vector Propagation::FindSinkWiresForCellType(RTLIL::Wire* driver_wire, const std::string& cell_type, const std::string& cell_port) { std::vector wires; diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 575f0f5a1..4e1b78e92 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -64,5 +64,7 @@ class ClockDividerPropagation : public Propagation { : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } + std::vector FindSinkWiresForCellType(ClockWire& driver_wire, + const std::string& cell_type, const std::string& cell_port); }; #endif // PROPAGATION_H_ diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl index df939987c..a8d157302 100644 --- a/sdc-plugin/tests/pll/pll.tcl +++ b/sdc-plugin/tests/pll/pll.tcl @@ -12,8 +12,9 @@ hierarchy -check -auto-top # Start flow after library reading synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # -##Read the design timing constraints -#read_sdc $::env(INPUT_SDC_FILE) +#Read the design timing constraints +set ::env(INPUT_SDC_FILE) pll.sdc +read_sdc $::env(INPUT_SDC_FILE) #return # ##Read the design constraints From f41b12b24e907030aa2720ceb8f52cb1ce35f636 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 6 Aug 2020 11:57:55 +0200 Subject: [PATCH 094/845] SDC: Add PLL buffer with period dividers Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.h | 52 ++++++++++++++++++++++++++++++--------- sdc-plugin/clocks.cc | 14 +++-------- sdc-plugin/propagation.cc | 26 +++++++++++++------- sdc-plugin/propagation.h | 24 ++++++++++-------- 4 files changed, 75 insertions(+), 41 deletions(-) diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index caa5cbbf9..44307335c 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -18,29 +18,57 @@ #ifndef _BUFFERS_H_ #define _BUFFERS_H_ -#include #include -#include #include +#include +#include +#include +#include "kernel/rtlil.h" + +USING_YOSYS_NAMESPACE struct Buffer { - Buffer(float delay, const std::string& name, const std::string& output) : delay(delay), name(name), output(output) {} - Buffer(float delay, const std::string& name, const std::initializer_list& outputs) : delay(delay), name(name), outputs(outputs.begin(), outputs.end()) {} - float delay; - std::string name; - std::string output; - std::vector outputs; + Buffer(float delay, const std::string& name, const std::string& output) + : delay(delay), name(name), output(output) {} + float delay; + std::string name; + std::string output; }; struct IBuf : Buffer { - IBuf() : Buffer(1, "IBUF", "O") {}; + IBuf() : Buffer(1, "IBUF", "O"){}; }; struct Bufg : Buffer { - Bufg() : Buffer(1, "BUFG", "O") {}; + Bufg() : Buffer(1, "BUFG", "O"){}; }; -struct Pll : Buffer { - Pll() : Buffer(1, "PLLE2_ADV", {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", "CLKOUT5"}) {}; +struct Pll { + Pll(float delay, const std::string& name, + const std::initializer_list& outputs) + : delay(delay), name(name), outputs(outputs.begin(), outputs.end()) {} + Pll(RTLIL::Cell* cell) + : Pll(1, "PLLE2_ADV", + {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", + "CLKOUT5"}) + { + assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); + if (cell->hasParam(ID(CLKIN1_PERIOD))) { + clkin1_period = + std::stof(cell->getParam(ID(CLKIN1_PERIOD)).decode_string()); + } + if (cell->hasParam(ID(CLKIN2_PERIOD))) { + clkin2_period = + std::stof(cell->getParam(ID(CLKIN2_PERIOD)).decode_string()); + } + }; + + float delay; + std::string name; + std::vector outputs; + RTLIL::Cell* cell; + float clkin1_period; + float clkin2_period; }; + #endif // _BUFFERS_H_ diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index ac19bf4d4..e1c1c57b5 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -92,16 +92,10 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { log("Processing clock %s\n", clock.first.c_str()); auto clock_wires = clock.second.GetClockWires(); for (auto clock_wire : clock_wires) { - Pll pll; - for (auto output : pll.outputs) { - auto pll_wires = pass->FindSinkWiresForCellType( - clock_wire, "PLLE2_ADV", output); - for (auto wire : pll_wires) { - log("%s wire on output %s: %s\n", pll.name.c_str(), - output.c_str(), wire.Name().c_str()); - //CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE / CLKFBOUT_MULT - //AddClockWire(wire); - } + auto pll_wires = pass->FindSinkWiresForCellType( + clock_wire, "PLLE2_ADV"); + for (auto wire : pll_wires) { + //AddClockWire(wire); } } } diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index dedf693d4..cd8b7b40e 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -38,17 +38,25 @@ std::vector NaturalPropagation::FindAliasWires( } std::vector ClockDividerPropagation::FindSinkWiresForCellType(ClockWire& driver_wire, - const std::string& cell_type, const std::string& cell_port) { + const std::string& cell_type) { std::vector wires; + auto cell = FindSinkCell(driver_wire.Wire(), cell_type); + if (!cell) { + return wires; + } + if (cell_type == "PLLE2_ADV") { //CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE / CLKFBOUT_MULT - /* auto cell = FindSinkCell(driver_wire, cell_type); */ - /* RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); */ - /* if (wire) { */ - /* wires.push_back(wire); */ - /* auto further_wires = FindSinkWiresForCellType(wire, cell_type, cell_port); */ - /* std::copy(further_wires.begin(), further_wires.end(), */ - /* std::back_inserter(wires)); */ - /* } */ + Pll pll(cell); + log("c1: %f, c2: %f", pll.clkin1_period, pll.clkin2_period); + /* for (auto output : pll.outputs) { */ + /* RTLIL::Wire* wire = FindSinkWireOnPort(pll.cell, output); */ + /* if (wire) { */ + /* wires.push_back(wire); */ + /* auto further_wires = FindSinkWiresForCellType(wire, cell_type, cell_port); */ + /* std::copy(further_wires.begin(), further_wires.end(), */ + /* std::back_inserter(wires)); */ + /* } */ + } return wires; } diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 4e1b78e92..7396a0746 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -24,18 +24,21 @@ USING_YOSYS_NAMESPACE class Propagation { public: - Propagation(RTLIL::Design* design, Pass* pass) : design_(design), pass_(pass) {} + Propagation(RTLIL::Design* design, Pass* pass) + : design_(design), pass_(pass) {} virtual void Run(Clocks& clocks) = 0; - std::vector FindSinkWiresForCellType(RTLIL::Wire* driver_wire, - const std::string& cell_type, const std::string& cell_port); + std::vector FindSinkWiresForCellType( + RTLIL::Wire* driver_wire, const std::string& cell_type, + const std::string& cell_port); protected: RTLIL::Design* design_; Pass* pass_; RTLIL::Cell* FindSinkCell(RTLIL::Wire* wire, const std::string& type); - RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, const std::string& port_name); + RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, + const std::string& port_name); }; class NaturalPropagation : public Propagation { @@ -49,22 +52,23 @@ class NaturalPropagation : public Propagation { class BufferPropagation : public Propagation { public: - BufferPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} + BufferPropagation(RTLIL::Design* design, Pass* pass) + : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } private: - std::vector FindSinkWiresForCellType2(RTLIL::Wire* driver_wire, - const std::string& type); + std::vector FindSinkWiresForCellType2( + RTLIL::Wire* driver_wire, const std::string& type); }; class ClockDividerPropagation : public Propagation { - public: + public: ClockDividerPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } - std::vector FindSinkWiresForCellType(ClockWire& driver_wire, - const std::string& cell_type, const std::string& cell_port); + std::vector FindSinkWiresForCellType( + ClockWire& driver_wire, const std::string& cell_type); }; #endif // PROPAGATION_H_ From 7aca127387c3a9f2d52dc04ebfdc18022648cac9 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 6 Aug 2020 14:00:06 +0200 Subject: [PATCH 095/845] SDC: Find PLL sink clock wires Signed-off-by: Tomasz Michalak --- sdc-plugin/Makefile | 2 +- sdc-plugin/buffers.cc | 6 ++++ sdc-plugin/buffers.h | 18 ++++-------- sdc-plugin/propagation.cc | 62 +++++++++++++++++++++++++++++---------- sdc-plugin/propagation.h | 3 +- 5 files changed, 61 insertions(+), 30 deletions(-) create mode 100644 sdc-plugin/buffers.cc diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index 7a31092ab..3b4628a19 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -4,7 +4,7 @@ LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins -OBJS = clocks.o propagation.o sdc.o +OBJS = buffers.o clocks.o propagation.o sdc.o sdc.so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc new file mode 100644 index 000000000..40c7cb229 --- /dev/null +++ b/sdc-plugin/buffers.cc @@ -0,0 +1,6 @@ +#include "buffers.h" + +const std::vector Pll::inputs = {"CLKIN1", "CLKIN2"}; +const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", "CLKOUT5"}; +const float Pll::delay = 1; +const std::string Pll::name = "PLLE2_ADV"; diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index 44307335c..14c8c820b 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -18,11 +18,11 @@ #ifndef _BUFFERS_H_ #define _BUFFERS_H_ +#include #include #include #include #include -#include #include "kernel/rtlil.h" USING_YOSYS_NAMESPACE @@ -44,14 +44,7 @@ struct Bufg : Buffer { }; struct Pll { - Pll(float delay, const std::string& name, - const std::initializer_list& outputs) - : delay(delay), name(name), outputs(outputs.begin(), outputs.end()) {} - Pll(RTLIL::Cell* cell) - : Pll(1, "PLLE2_ADV", - {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", - "CLKOUT5"}) - { + Pll(RTLIL::Cell* cell) : cell(cell) { assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); if (cell->hasParam(ID(CLKIN1_PERIOD))) { clkin1_period = @@ -63,9 +56,10 @@ struct Pll { } }; - float delay; - std::string name; - std::vector outputs; + static const float delay; + static const std::string name; + static const std::vector inputs; + static const std::vector outputs; RTLIL::Cell* cell; float clkin1_period; float clkin2_period; diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index cd8b7b40e..d5016f25a 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -40,22 +40,29 @@ std::vector NaturalPropagation::FindAliasWires( std::vector ClockDividerPropagation::FindSinkWiresForCellType(ClockWire& driver_wire, const std::string& cell_type) { std::vector wires; - auto cell = FindSinkCell(driver_wire.Wire(), cell_type); - if (!cell) { - return wires; - } if (cell_type == "PLLE2_ADV") { - //CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE / CLKFBOUT_MULT + RTLIL::Cell* cell; + for (auto input : Pll::inputs) { + cell = FindSinkCellOnPort(driver_wire.Wire(), input); + if (cell and RTLIL::unescape_id(cell->type) == cell_type) { + break; + } + } + if (!cell) { + return wires; + } Pll pll(cell); - log("c1: %f, c2: %f", pll.clkin1_period, pll.clkin2_period); - /* for (auto output : pll.outputs) { */ - /* RTLIL::Wire* wire = FindSinkWireOnPort(pll.cell, output); */ - /* if (wire) { */ - /* wires.push_back(wire); */ - /* auto further_wires = FindSinkWiresForCellType(wire, cell_type, cell_port); */ - /* std::copy(further_wires.begin(), further_wires.end(), */ - /* std::back_inserter(wires)); */ - /* } */ + //CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE / CLKFBOUT_MULT + for (auto output : Pll::outputs) { + RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); + if (wire) { + ClockWire clock_wire(wire, 10, 0, 2.5); + wires.push_back(clock_wire); + auto further_wires = FindSinkWiresForCellType(clock_wire, cell_type); + std::copy(further_wires.begin(), further_wires.end(), + std::back_inserter(wires)); + } + } } return wires; } @@ -66,7 +73,7 @@ std::vector Propagation::FindSinkWiresForCellType(RTLIL::Wire* dri if (!driver_wire) { return wires; } - auto cell = FindSinkCell(driver_wire, cell_type); + auto cell = FindSinkCellOfType(driver_wire, cell_type); RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); if (wire) { wires.push_back(wire); @@ -92,7 +99,7 @@ std::vector BufferPropagation::FindSinkWiresForCellType2(RTLIL::Wi return top_module->selected_wires(); } -RTLIL::Cell* Propagation::FindSinkCell(RTLIL::Wire* wire, +RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, const std::string& type) { RTLIL::Cell* sink_cell = NULL; if (!wire) { @@ -115,6 +122,29 @@ RTLIL::Cell* Propagation::FindSinkCell(RTLIL::Wire* wire, return sink_cell; } +RTLIL::Cell* Propagation::FindSinkCellOnPort(RTLIL::Wire* wire, + const std::string& port) { + RTLIL::Cell* sink_cell; + if (!wire) { + return sink_cell; + } + RTLIL::Module* top_module = design_->top_module(); + assert(top_module); + std::string base_selection = + top_module->name.str() + "/w:" + wire->name.str(); + pass_->extra_args(std::vector{base_selection, "%co:+[" + port +"]", + base_selection, "%d"}, + 0, design_); + auto selected_cells = top_module->selected_cells(); + // FIXME Handle more than one sink + assert(selected_cells.size() <= 1); + if (selected_cells.size() > 0) { + sink_cell = selected_cells.at(0); + log("Found sink cell: %s\n", sink_cell->name.c_str()); + } + return sink_cell; +} + RTLIL::Wire* Propagation::FindSinkWireOnPort( RTLIL::Cell* cell, const std::string& port_name) { RTLIL::Wire* sink_wire = NULL; diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 7396a0746..c4c6aa9d6 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -36,7 +36,8 @@ class Propagation { RTLIL::Design* design_; Pass* pass_; - RTLIL::Cell* FindSinkCell(RTLIL::Wire* wire, const std::string& type); + RTLIL::Cell* FindSinkCellOfType(RTLIL::Wire* wire, const std::string& type); + RTLIL::Cell* FindSinkCellOnPort(RTLIL::Wire* wire, const std::string& port); RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, const std::string& port_name); }; From 9ffe2434262039c74e22f6febb25660fb3143c29 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 6 Aug 2020 14:48:39 +0200 Subject: [PATCH 096/845] SDC: Add clock wire from ClockWire Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 11 ++++++-- sdc-plugin/clocks.h | 1 + sdc-plugin/propagation.cc | 59 +++++++++++++++------------------------ sdc-plugin/propagation.h | 6 +--- 4 files changed, 32 insertions(+), 45 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index e1c1c57b5..3d27f70ea 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -44,6 +44,10 @@ void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, clock->second.AddClockWire(wire, period, rising_edge, falling_edge); } +void Clocks::AddClockWire(const std::string& name, ClockWire& clock_wire) { + AddClockWire(name, clock_wire.Wire(), clock_wire.Period(), clock_wire.RisingEdge(), clock_wire.FallingEdge()); +} + std::vector Clocks::GetClockNames() { std::vector res; for (auto clock : clocks_) { @@ -92,10 +96,11 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { log("Processing clock %s\n", clock.first.c_str()); auto clock_wires = clock.second.GetClockWires(); for (auto clock_wire : clock_wires) { - auto pll_wires = pass->FindSinkWiresForCellType( + auto pll_clock_wires = pass->FindSinkClockWiresForCellType( clock_wire, "PLLE2_ADV"); - for (auto wire : pll_wires) { - //AddClockWire(wire); + for (auto pll_clock_wire : pll_clock_wires) { + log("PLL wire: %s\n", pll_clock_wire.Name().c_str()); + AddClockWire(clock.first, pll_clock_wire); } } } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 021246a0c..22c96d15a 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -75,6 +75,7 @@ class Clocks { void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period); void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); + void AddClockWire(const std::string& name, ClockWire& clock_wire); std::vector GetClockNames(); void Propagate(NaturalPropagation* pass); void Propagate(BufferPropagation* pass); diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index d5016f25a..899810d4b 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -37,11 +37,11 @@ std::vector NaturalPropagation::FindAliasWires( return alias_wires; } -std::vector ClockDividerPropagation::FindSinkWiresForCellType(ClockWire& driver_wire, +std::vector ClockDividerPropagation::FindSinkClockWiresForCellType(ClockWire& driver_wire, const std::string& cell_type) { std::vector wires; if (cell_type == "PLLE2_ADV") { - RTLIL::Cell* cell; + RTLIL::Cell* cell = NULL; for (auto input : Pll::inputs) { cell = FindSinkCellOnPort(driver_wire.Wire(), input); if (cell and RTLIL::unescape_id(cell->type) == cell_type) { @@ -56,9 +56,9 @@ std::vector ClockDividerPropagation::FindSinkWiresForCellType(ClockWi for (auto output : Pll::outputs) { RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); if (wire) { - ClockWire clock_wire(wire, 10, 0, 2.5); + ClockWire clock_wire(wire, 10, 0, 5); wires.push_back(clock_wire); - auto further_wires = FindSinkWiresForCellType(clock_wire, cell_type); + auto further_wires = FindSinkClockWiresForCellType(clock_wire, cell_type); std::copy(further_wires.begin(), further_wires.end(), std::back_inserter(wires)); } @@ -67,38 +67,6 @@ std::vector ClockDividerPropagation::FindSinkWiresForCellType(ClockWi return wires; } -std::vector Propagation::FindSinkWiresForCellType(RTLIL::Wire* driver_wire, - const std::string& cell_type, const std::string& cell_port) { - std::vector wires; - if (!driver_wire) { - return wires; - } - auto cell = FindSinkCellOfType(driver_wire, cell_type); - RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); - if (wire) { - wires.push_back(wire); - auto further_wires = FindSinkWiresForCellType(wire, cell_type, cell_port); - std::copy(further_wires.begin(), further_wires.end(), - std::back_inserter(wires)); - } - return wires; -} - -std::vector BufferPropagation::FindSinkWiresForCellType2(RTLIL::Wire* driver_wire, - const std::string& type) { - if (!driver_wire) { - return std::vector(); - } - RTLIL::Module* top_module = design_->top_module(); - assert(top_module); - std::string base_selection = - top_module->name.str() + "/w:" + driver_wire->name.str(); - pass_->extra_args(std::vector{base_selection, "%co*:+" + type, - base_selection, "%d"}, - 0, design_); - return top_module->selected_wires(); -} - RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, const std::string& type) { RTLIL::Cell* sink_cell = NULL; @@ -122,9 +90,26 @@ RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, return sink_cell; } +std::vector Propagation::FindSinkWiresForCellType(RTLIL::Wire* driver_wire, + const std::string& cell_type, const std::string& cell_port) { + std::vector wires; + if (!driver_wire) { + return wires; + } + auto cell = FindSinkCellOfType(driver_wire, cell_type); + RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); + if (wire) { + wires.push_back(wire); + auto further_wires = FindSinkWiresForCellType(wire, cell_type, cell_port); + std::copy(further_wires.begin(), further_wires.end(), + std::back_inserter(wires)); + } + return wires; +} + RTLIL::Cell* Propagation::FindSinkCellOnPort(RTLIL::Wire* wire, const std::string& port) { - RTLIL::Cell* sink_cell; + RTLIL::Cell* sink_cell = NULL; if (!wire) { return sink_cell; } diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index c4c6aa9d6..4680ff986 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -57,10 +57,6 @@ class BufferPropagation : public Propagation { : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } - - private: - std::vector FindSinkWiresForCellType2( - RTLIL::Wire* driver_wire, const std::string& type); }; class ClockDividerPropagation : public Propagation { @@ -69,7 +65,7 @@ class ClockDividerPropagation : public Propagation { : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } - std::vector FindSinkWiresForCellType( + std::vector FindSinkClockWiresForCellType( ClockWire& driver_wire, const std::string& cell_type); }; #endif // PROPAGATION_H_ From b58929808547924c3a02db174198097974ba8280 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 6 Aug 2020 16:04:50 +0200 Subject: [PATCH 097/845] SDC: Calculate period values on sink clock wires Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.h | 29 +++++++++++++++++++++++++++-- sdc-plugin/propagation.cc | 4 ++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index 14c8c820b..32a60b27f 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -54,15 +54,40 @@ struct Pll { clkin2_period = std::stof(cell->getParam(ID(CLKIN2_PERIOD)).decode_string()); } + if (cell->hasParam(ID(CLKFBOUT_MULT))) { + clk_mult = cell->getParam(ID(CLKFBOUT_MULT)).as_int(); + } + if (cell->hasParam(ID(DIVCLK_DIVIDE))) { + divclk_divisor = cell->getParam(ID(DIVCLK_DIVIDE)).as_int(); + } + for (auto clk_output : outputs) { + RTLIL::IdString param(RTLIL::escape_id(clk_output + "_DIVIDE")); + if (cell->hasParam(param)) { + clkout_divisors[clk_output] = cell->getParam(param).as_int(); + } else { + clkout_divisors[clk_output] = 1; + } + } }; + // CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE * DIVCLK_DIVIDE / + // CLKFBOUT_MULT + // TODO Check the value on CLKINSEL + float CalculatePeriod(const std::string& output) { + return clkin1_period * clkout_divisors.at(output) / clk_mult * + divclk_divisor; + } + static const float delay; static const std::string name; static const std::vector inputs; static const std::vector outputs; RTLIL::Cell* cell; - float clkin1_period; - float clkin2_period; + float clkin1_period = 0; + float clkin2_period = 0; + std::unordered_map clkout_divisors; + int divclk_divisor = 1; + int clk_mult = 5; }; #endif // _BUFFERS_H_ diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 899810d4b..1a954e237 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -52,11 +52,11 @@ std::vector ClockDividerPropagation::FindSinkClockWiresForCellType(Cl return wires; } Pll pll(cell); - //CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE / CLKFBOUT_MULT for (auto output : Pll::outputs) { RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); if (wire) { - ClockWire clock_wire(wire, 10, 0, 5); + float period(pll.CalculatePeriod(output)); + ClockWire clock_wire(wire, period, 0, period / 2); wires.push_back(clock_wire); auto further_wires = FindSinkClockWiresForCellType(clock_wire, cell_type); std::copy(further_wires.begin(), further_wires.end(), From 37f84efd8d8f863ab9abb387dc27ebdbf3cede06 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 6 Aug 2020 16:05:38 +0200 Subject: [PATCH 098/845] SDC: Update pll test tcl script Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/pll/pll.tcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl index a8d157302..237381fe3 100644 --- a/sdc-plugin/tests/pll/pll.tcl +++ b/sdc-plugin/tests/pll/pll.tcl @@ -15,6 +15,8 @@ synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check #Read the design timing constraints set ::env(INPUT_SDC_FILE) pll.sdc read_sdc $::env(INPUT_SDC_FILE) +propagate_clocks +get_clocks #return # ##Read the design constraints From c146164b0d83a74d1beca8d56c3d8f5e61dcab65 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 6 Aug 2020 16:08:40 +0200 Subject: [PATCH 099/845] SDC: Add license header to buffers.cc Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index 40c7cb229..ba8fd81e6 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -1,3 +1,20 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ #include "buffers.h" const std::vector Pll::inputs = {"CLKIN1", "CLKIN2"}; From aec8a1e5cbb8e96838136b5cf67d93d3b54d7121 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 7 Aug 2020 11:31:08 +0200 Subject: [PATCH 100/845] SDC: Add new clock names in Buffer and Clock Divider propagation Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 8 ++++---- sdc-plugin/clocks.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 3d27f70ea..a2c1edd8a 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -59,7 +59,7 @@ std::vector Clocks::GetClockNames() { log("create_clock -period %f -name %s -waveform {%f %f} %s\n", clock_wire.Period(), clock.first.c_str(), clock_wire.RisingEdge(), clock_wire.FallingEdge(), - clock_wire.Name().c_str()); + clock_wire.WireName().c_str()); } #endif } @@ -99,8 +99,8 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { auto pll_clock_wires = pass->FindSinkClockWiresForCellType( clock_wire, "PLLE2_ADV"); for (auto pll_clock_wire : pll_clock_wires) { - log("PLL wire: %s\n", pll_clock_wire.Name().c_str()); - AddClockWire(clock.first, pll_clock_wire); + log("PLL wire: %s\n", pll_clock_wire.WireName().c_str()); + AddClockWire(pll_clock_wire.WireName(), pll_clock_wire); } } } @@ -118,7 +118,7 @@ void Clocks::PropagateThroughBuffer(BufferPropagation* pass, for (auto wire : buf_wires) { log("%s wire: %s\n", buffer.name.c_str(), wire->name.c_str()); path_delay += buffer.delay; - AddClockWire(clock.first, wire, clock_wire.Period(), + AddClockWire(wire->name.str(), wire, clock_wire.Period(), clock_wire.RisingEdge() + path_delay, clock_wire.FallingEdge() + path_delay); } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 22c96d15a..f0fe5204e 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -38,7 +38,7 @@ class ClockWire { rising_edge_(rising_edge), falling_edge_(falling_edge) {} RTLIL::Wire* Wire() { return wire_; } - std::string Name() { return RTLIL::unescape_id(wire_->name); } + std::string WireName() { return RTLIL::unescape_id(wire_->name); } float Period() { return period_; } float RisingEdge() { return rising_edge_; } float FallingEdge() { return falling_edge_; } From 1b4e699f20f724255e896c00de70cbc0f277adac Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 7 Aug 2020 11:37:06 +0200 Subject: [PATCH 101/845] SDC: Hide debug logs behind SDC_DEBUG Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 29 +++++++++++++++++++++++++---- sdc-plugin/propagation.cc | 6 ++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index a2c1edd8a..4870d28c5 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -53,7 +53,6 @@ std::vector Clocks::GetClockNames() { for (auto clock : clocks_) { res.push_back(clock.first); #ifdef SDC_DEBUG - // FIXME this is just for debugging log("Wires in clock %s:\n", clock.first.c_str()); for (auto clock_wire : clock.second.GetClockWires()) { log("create_clock -period %f -name %s -waveform {%f %f} %s\n", @@ -67,9 +66,13 @@ std::vector Clocks::GetClockNames() { } void Clocks::Propagate(NaturalPropagation* pass) { +#ifdef SDC_DEBUG log("Start natural clock propagation\n"); +#endif for (auto clock : clocks_) { +#ifdef SDC_DEBUG log("Processing clock %s\n", clock.first.c_str()); +#endif auto clock_wires = clock.second.GetClockWires(); for (auto clock_wire : clock_wires) { auto aliases = pass->FindAliasWires(clock_wire.Wire()); @@ -77,34 +80,50 @@ void Clocks::Propagate(NaturalPropagation* pass) { clock_wire.RisingEdge(), clock_wire.FallingEdge()); } } - log("Finish natural clock propagation\n"); +#ifdef SDC_DEBUG + log("Finish natural clock propagation\n\n"); +#endif } void Clocks::Propagate(BufferPropagation* pass) { +#ifdef SDC_DEBUG log("Start buffer clock propagation\n"); +#endif for (auto& clock : clocks_) { +#ifdef SDC_DEBUG log("Processing clock %s\n", clock.first.c_str()); +#endif PropagateThroughBuffer(pass, clock, IBuf()); PropagateThroughBuffer(pass, clock, Bufg()); } - log("Finish buffer clock propagation\n"); +#ifdef SDC_DEBUG + log("Finish buffer clock propagation\n\n"); +#endif } void Clocks::Propagate(ClockDividerPropagation* pass) { +#ifdef SDC_DEBUG log("Start clock divider clock propagation\n"); +#endif for (auto& clock : clocks_) { +#ifdef SDC_DEBUG log("Processing clock %s\n", clock.first.c_str()); +#endif auto clock_wires = clock.second.GetClockWires(); for (auto clock_wire : clock_wires) { auto pll_clock_wires = pass->FindSinkClockWiresForCellType( clock_wire, "PLLE2_ADV"); for (auto pll_clock_wire : pll_clock_wires) { +#ifdef SDC_DEBUG log("PLL wire: %s\n", pll_clock_wire.WireName().c_str()); +#endif AddClockWire(pll_clock_wire.WireName(), pll_clock_wire); } } } - log("Finish clock divider clock propagation\n"); +#ifdef SDC_DEBUG + log("Finish clock divider clock propagation\n\n"); +#endif } void Clocks::PropagateThroughBuffer(BufferPropagation* pass, @@ -116,7 +135,9 @@ void Clocks::PropagateThroughBuffer(BufferPropagation* pass, clock_wire.Wire(), buffer.name, buffer.output); int path_delay(0); for (auto wire : buf_wires) { +#ifdef SDC_DEBUG log("%s wire: %s\n", buffer.name.c_str(), wire->name.c_str()); +#endif path_delay += buffer.delay; AddClockWire(wire->name.str(), wire, clock_wire.Period(), clock_wire.RisingEdge() + path_delay, diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 1a954e237..c719dbb92 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -85,7 +85,9 @@ RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, assert(selected_cells.size() <= 1); if (selected_cells.size() > 0) { sink_cell = selected_cells.at(0); +#ifdef SDC_DEBUG log("Found sink cell: %s\n", sink_cell->name.c_str()); +#endif } return sink_cell; } @@ -125,7 +127,9 @@ RTLIL::Cell* Propagation::FindSinkCellOnPort(RTLIL::Wire* wire, assert(selected_cells.size() <= 1); if (selected_cells.size() > 0) { sink_cell = selected_cells.at(0); +#ifdef SDC_DEBUG log("Found sink cell: %s\n", sink_cell->name.c_str()); +#endif } return sink_cell; } @@ -149,7 +153,9 @@ RTLIL::Wire* Propagation::FindSinkWireOnPort( assert(selected_wires.size() <= 1); if (selected_wires.size() > 0) { sink_wire = selected_wires.at(0); +#ifdef SDC_DEBUG log("Found sink wire: %s\n", sink_wire->name.c_str()); +#endif } return sink_wire; } From 9cbaed8bbc00f981ef9a4c13032cede29d5c1465 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 7 Aug 2020 11:55:49 +0200 Subject: [PATCH 102/845] SDC: Inform about SDC being read Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index e74762232..f44020dc1 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -43,6 +43,7 @@ struct ReadSdcCmd : public Frontend { if (args.size() < 2) { log_cmd_error("Missing script file.\n"); } + log("\nReading clock constraints file(SDC)\n\n"); size_t argidx = 1; extra_args(f, filename, args, argidx); std::string content{std::istreambuf_iterator(*f), @@ -120,7 +121,9 @@ struct CreateClockCmd : public Pass { } for (auto wire : module->wires()) { if (design->selected(module, wire)) { - log("Selected wire %s\n", wire->name.c_str()); +#ifdef SDC_DEBUG + log("Selected wire %s\n", RTLIL::unescape_id(wire->name).c_str()); +#endif selected_wires.push_back(wire); } } @@ -129,11 +132,11 @@ struct CreateClockCmd : public Pass { log_cmd_error("Target selection is empty\n"); } if (name.empty()) { - name = selected_wires.at(0)->name.str(); + name = RTLIL::unescape_id(selected_wires.at(0)->name); } clocks_.AddClockWires(name, selected_wires, period, rising_edge, falling_edge); - log("Created clock %s with period %f, waveform %f,%f\n", name.c_str(), + log("Created clock %s with period %f, waveform {%f %f}\n", name.c_str(), period, rising_edge, falling_edge); } From 17aa4bf2285e2b6607846b582ec792df9b5ed04f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 7 Aug 2020 11:56:36 +0200 Subject: [PATCH 103/845] SDC: Modify counter design Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/counter/counter.sdc | 4 ++-- sdc-plugin/tests/counter/counter.v | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sdc-plugin/tests/counter/counter.sdc b/sdc-plugin/tests/counter/counter.sdc index 796e8499f..01debad8a 100644 --- a/sdc-plugin/tests/counter/counter.sdc +++ b/sdc-plugin/tests/counter/counter.sdc @@ -1,2 +1,2 @@ -create_clock -period 10.0 -name clk2 -waveform {0.000 5.000} clk_int_1 -create_clock -period 10.0 -name clk -waveform {0.000 5.000} clk +create_clock -period 10.0 -waveform {0.000 5.000} clk_int_1 +create_clock -period 10.0 -name clk -waveform {0.000 5.000} clk clk2 diff --git a/sdc-plugin/tests/counter/counter.v b/sdc-plugin/tests/counter/counter.v index 70e02f54f..2b671bba5 100644 --- a/sdc-plugin/tests/counter/counter.v +++ b/sdc-plugin/tests/counter/counter.v @@ -1,16 +1,14 @@ module top(input clk, + input clk2, input [1:0] in, - output [4:0] out ); + output [5:0] out ); reg [1:0] cnt = 0; -//wire [4:1] out; wire clk_int_1, clk_int_2; IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); -//IBUF ibuf_inst_2(.I(ibuf_out_1), .O(ibuf_out_2)); assign clk_int_1 = ibuf_out; assign clk_int_2 = clk_int_1; -//assign do = out[0]; always @(posedge clk_int_2) begin cnt <= cnt + 1; @@ -19,6 +17,7 @@ end middle middle_inst_1(.clk(ibuf_out), .out(out[2])); middle middle_inst_2(.clk(clk_int_1), .out(out[3])); middle middle_inst_3(.clk(clk_int_2), .out(out[4])); +middle middle_inst_4(.clk(clk2), .out(out[5])); assign out[1:0] = {cnt[0], in[0]}; endmodule From 48856a7c5391f1fa5e0aa77a1fd582246688f229 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 7 Aug 2020 12:53:29 +0200 Subject: [PATCH 104/845] SDC: Refactor Clocks methods Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 13 ++++--------- sdc-plugin/clocks.h | 2 -- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 4870d28c5..6bf4eb192 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -29,19 +29,14 @@ void Clocks::AddClockWires(const std::string& name, }); } -void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, - float period) { - // Set default duty cycle 50% - AddClockWire(name, wire, period, 0, period / 2); -} - void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { auto clock = clocks_.find(name); if (clock == clocks_.end()) { - clock = clocks_.emplace(std::make_pair(name, Clock(name))).first; + clocks_.emplace(std::make_pair(name, Clock(name, wire, period, rising_edge, falling_edge))); + } else { + clock->second.AddClockWire(wire, period, rising_edge, falling_edge); } - clock->second.AddClockWire(wire, period, rising_edge, falling_edge); } void Clocks::AddClockWire(const std::string& name, ClockWire& clock_wire) { @@ -148,7 +143,7 @@ void Clocks::PropagateThroughBuffer(BufferPropagation* pass, Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) - : Clock(name) { + : name_(name) { AddClockWire(wire, period, rising_edge, falling_edge); } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index f0fe5204e..e17543eb2 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -54,7 +54,6 @@ class ClockWire { class Clock { public: - Clock(const std::string& name) : name_(name) {} Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); void AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, @@ -72,7 +71,6 @@ class Clocks { void AddClockWires(const std::string& name, const std::vector& wires, float period, float rising_edge, float falling_edge); - void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period); void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); void AddClockWire(const std::string& name, ClockWire& clock_wire); From 250fcdb9f7ad078d9f52a72b503fdaf8c730dc1a Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 7 Aug 2020 13:03:20 +0200 Subject: [PATCH 105/845] SDC: Implement WriteSdc command Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 17 +++++++++++++++++ sdc-plugin/clocks.h | 1 + sdc-plugin/sdc.cc | 30 ++++++++++++++++++++++++++++-- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 6bf4eb192..06c19335e 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -141,6 +141,23 @@ void Clocks::PropagateThroughBuffer(BufferPropagation* pass, } } +void Clocks::WriteSdc(std::ostream& file) { + for (auto& clock : clocks_) { + auto clock_wires = clock.second.GetClockWires(); + file << "create_clock"; + for (auto clock_wire : clock_wires) { + file << " -period " << clock_wire.Period(); + if (clock_wires.size() > 1) { + file << " -name " << clock.first; + } + } + /* log("create_clock -period %f -name %s -waveform {%f %f} %s\n", */ + /* clock_wire.Period(), clock.first.c_str(), */ + /* clock_wire.RisingEdge(), clock_wire.FallingEdge(), */ + /* clock_wire.WireName().c_str()); */ + } +} + Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) : name_(name) { diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index e17543eb2..1fdce011c 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -78,6 +78,7 @@ class Clocks { void Propagate(NaturalPropagation* pass); void Propagate(BufferPropagation* pass); void Propagate(ClockDividerPropagation* pass); + void WriteSdc(std::ostream& file); private: std::unordered_map clocks_; diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index f44020dc1..e344acb8a 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -30,7 +30,6 @@ struct ReadSdcCmd : public Frontend { ReadSdcCmd() : Frontend("sdc", "Read SDC file") {} void help() override { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" read_sdc \n"); log("\n"); @@ -57,6 +56,31 @@ struct ReadSdcCmd : public Frontend { } }; +struct WriteSdcCmd : public Backend { + WriteSdcCmd(Clocks& clocks) + : Backend("sdc", "Write SDC file"), clocks_(clocks) {} + + void help() override { + log("\n"); + log(" write_sdc \n"); + log("\n"); + log("Write SDC file.\n"); + log("\n"); + } + + void execute(std::ostream*& f, std::string filename, + std::vector args, RTLIL::Design*) override { + if (args.size() < 2) { + log_cmd_error("Missing output file.\n"); + } + log("\nWriting out clock constraints file(SDC)\n\n"); + extra_args(f, filename, args, 1); + clocks_.WriteSdc(*f); + } + + Clocks& clocks_; +}; + struct CreateClockCmd : public Pass { CreateClockCmd(Clocks& clocks) : Pass("create_clock", "Create clock object"), clocks_(clocks) {} @@ -215,13 +239,15 @@ struct PropagateClocksCmd : public Pass { class SdcPlugin { public: SdcPlugin() - : create_clock_cmd_(clocks_), + : write_sdc_cmd_(clocks_), + create_clock_cmd_(clocks_), get_clocks_cmd_(clocks_), propagate_clocks_cmd_(clocks_) { log("Loaded SDC plugin\n"); } ReadSdcCmd read_sdc_cmd_; + WriteSdcCmd write_sdc_cmd_; CreateClockCmd create_clock_cmd_; GetClocksCmd get_clocks_cmd_; PropagateClocksCmd propagate_clocks_cmd_; From 5b41747f738faeb300d880349f863e965fff6691 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 7 Aug 2020 17:26:02 +0200 Subject: [PATCH 106/845] SDC: Refactor Clock classes Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 143 ++++++++++++++++++++++---------------- sdc-plugin/clocks.h | 47 +++++-------- sdc-plugin/propagation.cc | 26 +++---- sdc-plugin/propagation.h | 4 +- sdc-plugin/sdc.cc | 4 +- 5 files changed, 120 insertions(+), 104 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 06c19335e..a9b4607de 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -21,8 +21,29 @@ #include "kernel/register.h" #include "propagation.h" +void Clocks::AddClock(const std::string& name, + std::vector wires, float period, + float rising_edge, float falling_edge) { + AddClockWires(name, wires, period, rising_edge, falling_edge); +} + +void Clocks::AddClock(const std::string& name, + RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge) { + auto clock = std::find_if(clocks_.begin(), clocks_.end(), [&](Clock& clock) { return clock.Name() == name; }); + if (clock != clocks_.end()) { + log("Clock %s already exists and will be overwritten\n", name.c_str()); + clocks_.erase(clock); + } + clocks_.emplace_back(name, wire, period, rising_edge, falling_edge); +} + +void Clocks::AddClock(Clock& clock) { + AddClock(clock.Name(), clock.GetClockWires(), clock.Period(), clock.RisingEdge(), clock.FallingEdge()); +} + void Clocks::AddClockWires(const std::string& name, - const std::vector& wires, float period, + std::vector wires, float period, float rising_edge, float falling_edge) { std::for_each(wires.begin(), wires.end(), [&, this](RTLIL::Wire* wire) { AddClockWire(name, wire, period, rising_edge, falling_edge); @@ -31,32 +52,28 @@ void Clocks::AddClockWires(const std::string& name, void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { - auto clock = clocks_.find(name); + auto clock = std::find_if(clocks_.begin(), clocks_.end(), [&](Clock& clock) { return clock.Name() == name; }); if (clock == clocks_.end()) { - clocks_.emplace(std::make_pair(name, Clock(name, wire, period, rising_edge, falling_edge))); + AddClock(name, wire, period, rising_edge, falling_edge); } else { - clock->second.AddClockWire(wire, period, rising_edge, falling_edge); + clock->AddWire(wire); } } -void Clocks::AddClockWire(const std::string& name, ClockWire& clock_wire) { - AddClockWire(name, clock_wire.Wire(), clock_wire.Period(), clock_wire.RisingEdge(), clock_wire.FallingEdge()); -} - std::vector Clocks::GetClockNames() { std::vector res; for (auto clock : clocks_) { - res.push_back(clock.first); + res.push_back(clock.Name()); #ifdef SDC_DEBUG - log("Wires in clock %s:\n", clock.first.c_str()); - for (auto clock_wire : clock.second.GetClockWires()) { - log("create_clock -period %f -name %s -waveform {%f %f} %s\n", - clock_wire.Period(), clock.first.c_str(), - clock_wire.RisingEdge(), clock_wire.FallingEdge(), - clock_wire.WireName().c_str()); + std::stringstream ss; + for (auto clock_wire : clock.GetClockWires()) { + ss << RTLIL::unescape_id(clock_wire->name) << " "; } -#endif + log("create_clock -period %f -name %s -waveform {%f %f} %s\n", + clock.Period(), clock.Name().c_str(), + clock.RisingEdge(), clock.FallingEdge(), ss.str().c_str()); } +#endif return res; } @@ -66,13 +83,13 @@ void Clocks::Propagate(NaturalPropagation* pass) { #endif for (auto clock : clocks_) { #ifdef SDC_DEBUG - log("Processing clock %s\n", clock.first.c_str()); + log("Processing clock %s\n", clock.Name().c_str()); #endif - auto clock_wires = clock.second.GetClockWires(); + auto clock_wires = clock.GetClockWires(); for (auto clock_wire : clock_wires) { - auto aliases = pass->FindAliasWires(clock_wire.Wire()); - AddClockWires(clock.first, aliases, clock_wire.Period(), - clock_wire.RisingEdge(), clock_wire.FallingEdge()); + auto aliases = pass->FindAliasWires(clock_wire); + AddClockWires(clock.Name(), aliases, clock.Period(), + clock.RisingEdge(), clock.FallingEdge()); } } #ifdef SDC_DEBUG @@ -84,9 +101,9 @@ void Clocks::Propagate(BufferPropagation* pass) { #ifdef SDC_DEBUG log("Start buffer clock propagation\n"); #endif - for (auto& clock : clocks_) { + for (auto clock : clocks_) { #ifdef SDC_DEBUG - log("Processing clock %s\n", clock.first.c_str()); + log("Processing clock %s\n", clock.Name().c_str()); #endif PropagateThroughBuffer(pass, clock, IBuf()); PropagateThroughBuffer(pass, clock, Bufg()); @@ -100,19 +117,19 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { #ifdef SDC_DEBUG log("Start clock divider clock propagation\n"); #endif - for (auto& clock : clocks_) { + for (auto clock : clocks_) { #ifdef SDC_DEBUG - log("Processing clock %s\n", clock.first.c_str()); + log("Processing clock %s\n", clock.Name().c_str()); #endif - auto clock_wires = clock.second.GetClockWires(); + auto clock_wires = clock.GetClockWires(); for (auto clock_wire : clock_wires) { - auto pll_clock_wires = pass->FindSinkClockWiresForCellType( + auto pll_clocks = pass->FindSinkClocksForCellType( clock_wire, "PLLE2_ADV"); - for (auto pll_clock_wire : pll_clock_wires) { + for (auto pll_clock : pll_clocks) { #ifdef SDC_DEBUG - log("PLL wire: %s\n", pll_clock_wire.WireName().c_str()); + log("PLL clock: %s\n", pll_clock.Name().c_str()); #endif - AddClockWire(pll_clock_wire.WireName(), pll_clock_wire); + AddClock(pll_clock); } } } @@ -122,68 +139,76 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { } void Clocks::PropagateThroughBuffer(BufferPropagation* pass, - decltype(clocks_)::value_type clock, + Clock& clock, Buffer buffer) { - auto clock_wires = clock.second.GetClockWires(); + auto clock_wires = clock.GetClockWires(); for (auto clock_wire : clock_wires) { + log("%s\n", clock_wire->name.c_str()); auto buf_wires = pass->FindSinkWiresForCellType( - clock_wire.Wire(), buffer.name, buffer.output); + clock_wire, buffer.name, buffer.output); int path_delay(0); for (auto wire : buf_wires) { #ifdef SDC_DEBUG - log("%s wire: %s\n", buffer.name.c_str(), wire->name.c_str()); + log("%s wire: %s\n", buffer.name.c_str(), RTLIL::unescape_id(wire->name).c_str()); #endif path_delay += buffer.delay; - AddClockWire(wire->name.str(), wire, clock_wire.Period(), - clock_wire.RisingEdge() + path_delay, - clock_wire.FallingEdge() + path_delay); + AddClock(RTLIL::unescape_id(wire->name), wire, clock.Period(), + clock.RisingEdge() + path_delay, + clock.FallingEdge() + path_delay); } } } void Clocks::WriteSdc(std::ostream& file) { for (auto& clock : clocks_) { - auto clock_wires = clock.second.GetClockWires(); - file << "create_clock"; + auto clock_wires = clock.GetClockWires(); + file << "create_clock -period " << clock.Period(); + if (clock_wires.size() > 1) { + file << " -name " << clock.Name(); + } + file << " -waveform {" << clock.RisingEdge() << " " << clock.FallingEdge() << "}"; for (auto clock_wire : clock_wires) { - file << " -period " << clock_wire.Period(); - if (clock_wires.size() > 1) { - file << " -name " << clock.first; - } + file << " " << RTLIL::unescape_id(clock_wire->name) << std::endl; } - /* log("create_clock -period %f -name %s -waveform {%f %f} %s\n", */ - /* clock_wire.Period(), clock.first.c_str(), */ - /* clock_wire.RisingEdge(), clock_wire.FallingEdge(), */ - /* clock_wire.WireName().c_str()); */ } } Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) - : name_(name) { - AddClockWire(wire, period, rising_edge, falling_edge); + : name_(name), + period_(period), + rising_edge_(rising_edge), + falling_edge_(falling_edge) { + AddWire(wire); } -void Clock::AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, - float falling_edge) { - auto clock_wire = std::find_if( +Clock::Clock(const std::string& name, std::vector wires, + float period, float rising_edge, float falling_edge) + : name_(name), + period_(period), + rising_edge_(rising_edge), + falling_edge_(falling_edge) { + std::for_each(wires.begin(), wires.end(), [&, this](RTLIL::Wire* wire) { + AddWire(wire); + }); +} + +void Clock::AddWire(RTLIL::Wire* wire) { + auto clock_wire = std::find( clock_wires_.begin(), clock_wires_.end(), - [wire](ClockWire& clock_wire) { return clock_wire.Wire() == wire; }); + wire); if (clock_wire == clock_wires_.end()) { - clock_wires_.emplace_back(wire, period, rising_edge, falling_edge); - } else { - clock_wire->UpdatePeriod(period); - clock_wire->UpdateWaveform(rising_edge, falling_edge); + clock_wires_.push_back(wire); } } -void ClockWire::UpdatePeriod(float period) { +void Clock::UpdatePeriod(float period) { period_ = period; rising_edge_ = 0; falling_edge_ = period / 2; } -void ClockWire::UpdateWaveform(float rising_edge, float falling_edge) { +void Clock::UpdateWaveform(float rising_edge, float falling_edge) { rising_edge_ = rising_edge; falling_edge_ = falling_edge; assert(falling_edge - rising_edge == period_ / 2); diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 1fdce011c..97fe75c57 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -29,16 +29,15 @@ class NaturalPropagation; class BufferPropagation; class ClockDividerPropagation; -class ClockWire { +class Clock { public: - ClockWire(RTLIL::Wire* wire, float period, float rising_edge, - float falling_edge) - : wire_(wire), - period_(period), - rising_edge_(rising_edge), - falling_edge_(falling_edge) {} - RTLIL::Wire* Wire() { return wire_; } - std::string WireName() { return RTLIL::unescape_id(wire_->name); } + Clock(const std::string& name, RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge); + Clock(const std::string& name, std::vector wires, float period, + float rising_edge, float falling_edge); + void AddWire(RTLIL::Wire* wire); + std::vector GetClockWires() { return clock_wires_; } + const std::string& Name() const { return name_; } float Period() { return period_; } float RisingEdge() { return rising_edge_; } float FallingEdge() { return falling_edge_; } @@ -46,34 +45,26 @@ class ClockWire { void UpdateWaveform(float rising_edge, float falling_edge); private: - RTLIL::Wire* wire_; + std::string name_; + std::vector clock_wires_; float period_; float rising_edge_; float falling_edge_; }; -class Clock { - public: - Clock(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); - void AddClockWire(RTLIL::Wire* wire, float period, float rising_edge, - float falling_edge); - std::vector GetClockWires() { return clock_wires_; } - - private: - std::string name_; - std::vector clock_wires_; -}; - - class Clocks { public: + void AddClock(const std::string& name, + std::vector wires, float period, + float rising_edge, float falling_edge); + void AddClock(const std::string& name, RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge); + void AddClock(Clock& clock); void AddClockWires(const std::string& name, - const std::vector& wires, float period, + std::vector wires, float period, float rising_edge, float falling_edge); void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); - void AddClockWire(const std::string& name, ClockWire& clock_wire); std::vector GetClockNames(); void Propagate(NaturalPropagation* pass); void Propagate(BufferPropagation* pass); @@ -81,8 +72,8 @@ class Clocks { void WriteSdc(std::ostream& file); private: - std::unordered_map clocks_; - void PropagateThroughBuffer(BufferPropagation* pass, decltype(clocks_)::value_type clock, Buffer buffer); + std::vector clocks_; + void PropagateThroughBuffer(BufferPropagation* pass, Clock& clock, Buffer buffer); }; #endif // _CLOCKS_H_ diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index c719dbb92..e8a519ebe 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -37,34 +37,34 @@ std::vector NaturalPropagation::FindAliasWires( return alias_wires; } -std::vector ClockDividerPropagation::FindSinkClockWiresForCellType(ClockWire& driver_wire, +std::vector ClockDividerPropagation::FindSinkClocksForCellType(RTLIL::Wire* driver_wire, const std::string& cell_type) { - std::vector wires; + std::vector clocks; if (cell_type == "PLLE2_ADV") { RTLIL::Cell* cell = NULL; for (auto input : Pll::inputs) { - cell = FindSinkCellOnPort(driver_wire.Wire(), input); + cell = FindSinkCellOnPort(driver_wire, input); if (cell and RTLIL::unescape_id(cell->type) == cell_type) { break; } } if (!cell) { - return wires; + return clocks; } Pll pll(cell); for (auto output : Pll::outputs) { RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); if (wire) { float period(pll.CalculatePeriod(output)); - ClockWire clock_wire(wire, period, 0, period / 2); - wires.push_back(clock_wire); - auto further_wires = FindSinkClockWiresForCellType(clock_wire, cell_type); - std::copy(further_wires.begin(), further_wires.end(), - std::back_inserter(wires)); + Clock clock(RTLIL::unescape_id(wire->name), wire, period, 0, period / 2); + clocks.push_back(clock); + auto further_clocks = FindSinkClocksForCellType(wire, cell_type); + std::copy(further_clocks.begin(), further_clocks.end(), + std::back_inserter(clocks)); } } } - return wires; + return clocks; } RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, @@ -86,7 +86,7 @@ RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, if (selected_cells.size() > 0) { sink_cell = selected_cells.at(0); #ifdef SDC_DEBUG - log("Found sink cell: %s\n", sink_cell->name.c_str()); + log("Found sink cell: %s\n", RTLIL::unescape_id(sink_cell->name).c_str()); #endif } return sink_cell; @@ -128,7 +128,7 @@ RTLIL::Cell* Propagation::FindSinkCellOnPort(RTLIL::Wire* wire, if (selected_cells.size() > 0) { sink_cell = selected_cells.at(0); #ifdef SDC_DEBUG - log("Found sink cell: %s\n", sink_cell->name.c_str()); + log("Found sink cell: %s\n", RTLIL::unescape_id(sink_cell->name).c_str()); #endif } return sink_cell; @@ -154,7 +154,7 @@ RTLIL::Wire* Propagation::FindSinkWireOnPort( if (selected_wires.size() > 0) { sink_wire = selected_wires.at(0); #ifdef SDC_DEBUG - log("Found sink wire: %s\n", sink_wire->name.c_str()); + log("Found sink wire: %s\n", RTLIL::unescape_id(sink_wire->name).c_str()); #endif } return sink_wire; diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 4680ff986..e09fc84ea 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -65,7 +65,7 @@ class ClockDividerPropagation : public Propagation { : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } - std::vector FindSinkClockWiresForCellType( - ClockWire& driver_wire, const std::string& cell_type); + std::vector FindSinkClocksForCellType( + RTLIL::Wire* driver_wire, const std::string& cell_type); }; #endif // PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index e344acb8a..60a1f8398 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -73,7 +73,7 @@ struct WriteSdcCmd : public Backend { if (args.size() < 2) { log_cmd_error("Missing output file.\n"); } - log("\nWriting out clock constraints file(SDC)\n\n"); + log("\nWriting out clock constraints file(SDC)\n"); extra_args(f, filename, args, 1); clocks_.WriteSdc(*f); } @@ -158,7 +158,7 @@ struct CreateClockCmd : public Pass { if (name.empty()) { name = RTLIL::unescape_id(selected_wires.at(0)->name); } - clocks_.AddClockWires(name, selected_wires, period, rising_edge, + clocks_.AddClock(name, selected_wires, period, rising_edge, falling_edge); log("Created clock %s with period %f, waveform {%f %f}\n", name.c_str(), period, rising_edge, falling_edge); From 19cf6f6cef232453da7bce796bf3b85afa5b0da4 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 17 Aug 2020 13:34:03 +0200 Subject: [PATCH 107/845] SDC: Don't add new line between wires Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index a9b4607de..d7056c12f 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -168,8 +168,9 @@ void Clocks::WriteSdc(std::ostream& file) { } file << " -waveform {" << clock.RisingEdge() << " " << clock.FallingEdge() << "}"; for (auto clock_wire : clock_wires) { - file << " " << RTLIL::unescape_id(clock_wire->name) << std::endl; + file << " " << RTLIL::unescape_id(clock_wire->name); } + file << std::endl; } } From 01e3ae9e243f06064226ce1d989ac3c5601fc030 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 19 Aug 2020 09:58:20 +0200 Subject: [PATCH 108/845] SDC: Clang format Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 3 +- sdc-plugin/clocks.cc | 59 ++++++++++++++++++++------------------- sdc-plugin/propagation.cc | 42 +++++++++++++++++----------- sdc-plugin/sdc.cc | 13 +++++---- 4 files changed, 65 insertions(+), 52 deletions(-) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index ba8fd81e6..072efe1ce 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -18,6 +18,7 @@ #include "buffers.h" const std::vector Pll::inputs = {"CLKIN1", "CLKIN2"}; -const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", "CLKOUT5"}; +const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", + "CLKOUT3", "CLKOUT4", "CLKOUT5"}; const float Pll::delay = 1; const std::string Pll::name = "PLLE2_ADV"; diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index d7056c12f..c7f6e9db8 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -21,16 +21,16 @@ #include "kernel/register.h" #include "propagation.h" -void Clocks::AddClock(const std::string& name, - std::vector wires, float period, - float rising_edge, float falling_edge) { +void Clocks::AddClock(const std::string& name, std::vector wires, + float period, float rising_edge, float falling_edge) { AddClockWires(name, wires, period, rising_edge, falling_edge); } -void Clocks::AddClock(const std::string& name, - RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge) { - auto clock = std::find_if(clocks_.begin(), clocks_.end(), [&](Clock& clock) { return clock.Name() == name; }); +void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge) { + auto clock = + std::find_if(clocks_.begin(), clocks_.end(), + [&](Clock& clock) { return clock.Name() == name; }); if (clock != clocks_.end()) { log("Clock %s already exists and will be overwritten\n", name.c_str()); clocks_.erase(clock); @@ -39,7 +39,8 @@ void Clocks::AddClock(const std::string& name, } void Clocks::AddClock(Clock& clock) { - AddClock(clock.Name(), clock.GetClockWires(), clock.Period(), clock.RisingEdge(), clock.FallingEdge()); + AddClock(clock.Name(), clock.GetClockWires(), clock.Period(), + clock.RisingEdge(), clock.FallingEdge()); } void Clocks::AddClockWires(const std::string& name, @@ -52,11 +53,13 @@ void Clocks::AddClockWires(const std::string& name, void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { - auto clock = std::find_if(clocks_.begin(), clocks_.end(), [&](Clock& clock) { return clock.Name() == name; }); + auto clock = + std::find_if(clocks_.begin(), clocks_.end(), + [&](Clock& clock) { return clock.Name() == name; }); if (clock == clocks_.end()) { AddClock(name, wire, period, rising_edge, falling_edge); } else { - clock->AddWire(wire); + clock->AddWire(wire); } } @@ -70,8 +73,8 @@ std::vector Clocks::GetClockNames() { ss << RTLIL::unescape_id(clock_wire->name) << " "; } log("create_clock -period %f -name %s -waveform {%f %f} %s\n", - clock.Period(), clock.Name().c_str(), - clock.RisingEdge(), clock.FallingEdge(), ss.str().c_str()); + clock.Period(), clock.Name().c_str(), clock.RisingEdge(), + clock.FallingEdge(), ss.str().c_str()); } #endif return res; @@ -123,8 +126,8 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { #endif auto clock_wires = clock.GetClockWires(); for (auto clock_wire : clock_wires) { - auto pll_clocks = pass->FindSinkClocksForCellType( - clock_wire, "PLLE2_ADV"); + auto pll_clocks = + pass->FindSinkClocksForCellType(clock_wire, "PLLE2_ADV"); for (auto pll_clock : pll_clocks) { #ifdef SDC_DEBUG log("PLL clock: %s\n", pll_clock.Name().c_str()); @@ -138,23 +141,23 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { #endif } -void Clocks::PropagateThroughBuffer(BufferPropagation* pass, - Clock& clock, +void Clocks::PropagateThroughBuffer(BufferPropagation* pass, Clock& clock, Buffer buffer) { auto clock_wires = clock.GetClockWires(); for (auto clock_wire : clock_wires) { log("%s\n", clock_wire->name.c_str()); - auto buf_wires = pass->FindSinkWiresForCellType( - clock_wire, buffer.name, buffer.output); + auto buf_wires = pass->FindSinkWiresForCellType(clock_wire, buffer.name, + buffer.output); int path_delay(0); for (auto wire : buf_wires) { #ifdef SDC_DEBUG - log("%s wire: %s\n", buffer.name.c_str(), RTLIL::unescape_id(wire->name).c_str()); + log("%s wire: %s\n", buffer.name.c_str(), + RTLIL::unescape_id(wire->name).c_str()); #endif path_delay += buffer.delay; AddClock(RTLIL::unescape_id(wire->name), wire, clock.Period(), - clock.RisingEdge() + path_delay, - clock.FallingEdge() + path_delay); + clock.RisingEdge() + path_delay, + clock.FallingEdge() + path_delay); } } } @@ -166,9 +169,10 @@ void Clocks::WriteSdc(std::ostream& file) { if (clock_wires.size() > 1) { file << " -name " << clock.Name(); } - file << " -waveform {" << clock.RisingEdge() << " " << clock.FallingEdge() << "}"; + file << " -waveform {" << clock.RisingEdge() << " " + << clock.FallingEdge() << "}"; for (auto clock_wire : clock_wires) { - file << " " << RTLIL::unescape_id(clock_wire->name); + file << " " << RTLIL::unescape_id(clock_wire->name); } file << std::endl; } @@ -189,15 +193,12 @@ Clock::Clock(const std::string& name, std::vector wires, period_(period), rising_edge_(rising_edge), falling_edge_(falling_edge) { - std::for_each(wires.begin(), wires.end(), [&, this](RTLIL::Wire* wire) { - AddWire(wire); - }); + std::for_each(wires.begin(), wires.end(), + [&, this](RTLIL::Wire* wire) { AddWire(wire); }); } void Clock::AddWire(RTLIL::Wire* wire) { - auto clock_wire = std::find( - clock_wires_.begin(), clock_wires_.end(), - wire); + auto clock_wire = std::find(clock_wires_.begin(), clock_wires_.end(), wire); if (clock_wire == clock_wires_.end()) { clock_wires_.push_back(wire); } diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index e8a519ebe..35e86f3f7 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -15,8 +15,8 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include "propagation.h" +#include USING_YOSYS_NAMESPACE @@ -37,8 +37,8 @@ std::vector NaturalPropagation::FindAliasWires( return alias_wires; } -std::vector ClockDividerPropagation::FindSinkClocksForCellType(RTLIL::Wire* driver_wire, - const std::string& cell_type) { +std::vector ClockDividerPropagation::FindSinkClocksForCellType( + RTLIL::Wire* driver_wire, const std::string& cell_type) { std::vector clocks; if (cell_type == "PLLE2_ADV") { RTLIL::Cell* cell = NULL; @@ -56,11 +56,13 @@ std::vector ClockDividerPropagation::FindSinkClocksForCellType(RTLIL::Wir RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); if (wire) { float period(pll.CalculatePeriod(output)); - Clock clock(RTLIL::unescape_id(wire->name), wire, period, 0, period / 2); + Clock clock(RTLIL::unescape_id(wire->name), wire, period, 0, + period / 2); clocks.push_back(clock); - auto further_clocks = FindSinkClocksForCellType(wire, cell_type); + auto further_clocks = + FindSinkClocksForCellType(wire, cell_type); std::copy(further_clocks.begin(), further_clocks.end(), - std::back_inserter(clocks)); + std::back_inserter(clocks)); } } } @@ -86,14 +88,16 @@ RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, if (selected_cells.size() > 0) { sink_cell = selected_cells.at(0); #ifdef SDC_DEBUG - log("Found sink cell: %s\n", RTLIL::unescape_id(sink_cell->name).c_str()); + log("Found sink cell: %s\n", + RTLIL::unescape_id(sink_cell->name).c_str()); #endif } return sink_cell; } -std::vector Propagation::FindSinkWiresForCellType(RTLIL::Wire* driver_wire, - const std::string& cell_type, const std::string& cell_port) { +std::vector Propagation::FindSinkWiresForCellType( + RTLIL::Wire* driver_wire, const std::string& cell_type, + const std::string& cell_port) { std::vector wires; if (!driver_wire) { return wires; @@ -102,7 +106,8 @@ std::vector Propagation::FindSinkWiresForCellType(RTLIL::Wire* dri RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); if (wire) { wires.push_back(wire); - auto further_wires = FindSinkWiresForCellType(wire, cell_type, cell_port); + auto further_wires = + FindSinkWiresForCellType(wire, cell_type, cell_port); std::copy(further_wires.begin(), further_wires.end(), std::back_inserter(wires)); } @@ -119,23 +124,25 @@ RTLIL::Cell* Propagation::FindSinkCellOnPort(RTLIL::Wire* wire, assert(top_module); std::string base_selection = top_module->name.str() + "/w:" + wire->name.str(); - pass_->extra_args(std::vector{base_selection, "%co:+[" + port +"]", - base_selection, "%d"}, - 0, design_); + pass_->extra_args( + std::vector{base_selection, "%co:+[" + port + "]", + base_selection, "%d"}, + 0, design_); auto selected_cells = top_module->selected_cells(); // FIXME Handle more than one sink assert(selected_cells.size() <= 1); if (selected_cells.size() > 0) { sink_cell = selected_cells.at(0); #ifdef SDC_DEBUG - log("Found sink cell: %s\n", RTLIL::unescape_id(sink_cell->name).c_str()); + log("Found sink cell: %s\n", + RTLIL::unescape_id(sink_cell->name).c_str()); #endif } return sink_cell; } -RTLIL::Wire* Propagation::FindSinkWireOnPort( - RTLIL::Cell* cell, const std::string& port_name) { +RTLIL::Wire* Propagation::FindSinkWireOnPort(RTLIL::Cell* cell, + const std::string& port_name) { RTLIL::Wire* sink_wire = NULL; if (!cell) { return sink_wire; @@ -154,7 +161,8 @@ RTLIL::Wire* Propagation::FindSinkWireOnPort( if (selected_wires.size() > 0) { sink_wire = selected_wires.at(0); #ifdef SDC_DEBUG - log("Found sink wire: %s\n", RTLIL::unescape_id(sink_wire->name).c_str()); + log("Found sink wire: %s\n", + RTLIL::unescape_id(sink_wire->name).c_str()); #endif } return sink_wire; diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 60a1f8398..d158e5bdc 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -146,7 +146,8 @@ struct CreateClockCmd : public Pass { for (auto wire : module->wires()) { if (design->selected(module, wire)) { #ifdef SDC_DEBUG - log("Selected wire %s\n", RTLIL::unescape_id(wire->name).c_str()); + log("Selected wire %s\n", + RTLIL::unescape_id(wire->name).c_str()); #endif selected_wires.push_back(wire); } @@ -159,7 +160,7 @@ struct CreateClockCmd : public Pass { name = RTLIL::unescape_id(selected_wires.at(0)->name); } clocks_.AddClock(name, selected_wires, period, rising_edge, - falling_edge); + falling_edge); log("Created clock %s with period %f, waveform {%f %f}\n", name.c_str(), period, rising_edge, falling_edge); } @@ -225,8 +226,10 @@ struct PropagateClocksCmd : public Pass { std::array, 3> passes{ std::unique_ptr( new NaturalPropagation(design, this)), - std::unique_ptr(new BufferPropagation(design, this)), - std::unique_ptr(new ClockDividerPropagation(design, this))}; + std::unique_ptr( + new BufferPropagation(design, this)), + std::unique_ptr( + new ClockDividerPropagation(design, this))}; for (auto& pass : passes) { pass->Run(clocks_); @@ -240,7 +243,7 @@ class SdcPlugin { public: SdcPlugin() : write_sdc_cmd_(clocks_), - create_clock_cmd_(clocks_), + create_clock_cmd_(clocks_), get_clocks_cmd_(clocks_), propagate_clocks_cmd_(clocks_) { log("Loaded SDC plugin\n"); From 8365bb39470e73383430135d26f4766c8940058a Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 17 Aug 2020 13:41:12 +0200 Subject: [PATCH 109/845] SDC: Cleanup tests Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 30 +- sdc-plugin/tests/base_litex/VexRiscv_Linux.v | 7469 -------- sdc-plugin/tests/base_litex/base_litex.sdc | 59 - sdc-plugin/tests/base_litex/base_litex.tcl | 38 - sdc-plugin/tests/base_litex/base_litex.v | 15844 ---------------- sdc-plugin/tests/base_litex/base_litex.xdc | 273 - sdc-plugin/tests/base_litex/mem.init | 6479 ------- sdc-plugin/tests/base_litex/mem_1.init | 0 sdc-plugin/tests/base_litex/mem_2.init | 7 - sdc-plugin/tests/compare_output_json.py | 53 - sdc-plugin/tests/counter/counter.golden.sdc | 5 + sdc-plugin/tests/counter/counter.golden.txt | 1 + .../{counter.sdc => counter.input.sdc} | 0 sdc-plugin/tests/counter/counter.tcl | 38 +- sdc-plugin/tests/counter/counter.v | 18 - sdc-plugin/tests/counter/counter.xdc | 15 - sdc-plugin/tests/pll/pll.golden.sdc | 7 + sdc-plugin/tests/pll/pll.input.sdc | 1 + sdc-plugin/tests/pll/pll.tcl | 34 +- sdc-plugin/tests/pll/pll.xdc | 9 - sdc-plugin/tests/techmaps/cells_map.v | 866 - sdc-plugin/tests/techmaps/cells_sim.v | 145 - sdc-plugin/tests/xc7a35tcsg324-1.json | 10 - 23 files changed, 44 insertions(+), 31357 deletions(-) delete mode 100644 sdc-plugin/tests/base_litex/VexRiscv_Linux.v delete mode 100644 sdc-plugin/tests/base_litex/base_litex.sdc delete mode 100644 sdc-plugin/tests/base_litex/base_litex.tcl delete mode 100644 sdc-plugin/tests/base_litex/base_litex.v delete mode 100644 sdc-plugin/tests/base_litex/base_litex.xdc delete mode 100644 sdc-plugin/tests/base_litex/mem.init delete mode 100644 sdc-plugin/tests/base_litex/mem_1.init delete mode 100644 sdc-plugin/tests/base_litex/mem_2.init delete mode 100644 sdc-plugin/tests/compare_output_json.py create mode 100644 sdc-plugin/tests/counter/counter.golden.sdc create mode 100644 sdc-plugin/tests/counter/counter.golden.txt rename sdc-plugin/tests/counter/{counter.sdc => counter.input.sdc} (100%) delete mode 100644 sdc-plugin/tests/counter/counter.xdc create mode 100644 sdc-plugin/tests/pll/pll.golden.sdc create mode 100644 sdc-plugin/tests/pll/pll.input.sdc delete mode 100644 sdc-plugin/tests/pll/pll.xdc delete mode 100644 sdc-plugin/tests/techmaps/cells_map.v delete mode 100644 sdc-plugin/tests/techmaps/cells_sim.v delete mode 100644 sdc-plugin/tests/xc7a35tcsg324-1.json diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 703acfbdf..400d516ed 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,15 +1,14 @@ -TESTS = base_litex counter pll +TESTS = counter pll +.PHONY: $(TESTS) -base_litex_verify = $(call compare_json,base_litex) -counter_verify = $(call compare_json,counter) -pll_verify = $(call compare_json,pll) +counter_verify = $(call compare,counter,sdc) && $(call compare,counter,txt) +pll_verify = $(call compare,pll,sdc) all: $(TESTS) - -compare_json = python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1).golden.json +compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) define test_tpl = -$(1): $(1)/$(1).json +$(1): $(1)/$(1).sdc $$($(1)_verify) RETVAL=$$$$? ; \ if [ $$$$RETVAL -eq 0 ]; then \ @@ -20,24 +19,15 @@ $(1): $(1)/$(1).json false; \ fi -$(1)/$(1).json: $(1)/$(1).v +$(1)/$(1).sdc: $(1)/$(1).v cd $(1); \ - PART_JSON=../xc7a35tcsg324-1.json \ - OUT_JSON=$(1).json \ - OUT_EBLIF=$(1).eblif \ - INPUT_XDC_FILE=$(1).xdc \ - INPUT_SDC_FILE=$(1).sdc \ + INPUT_SDC_FILE=$(1).input.sdc \ + OUTPUT_SDC_FILE=$(1).sdc \ yosys -p "tcl $(1).tcl" -l yosys.log -update_$(1): $(1)/$(1).json - @python compare_output_json.py --json $$< --golden $(1)/$(1).golden.json --update - endef $(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) -update: $(foreach test,$(TESTS),update_$(test)) - - clean: - rm -rf $(foreach test,$(TESTS),$(test)/$(test).json $(test)/$(test).eblif $(test)/$(test).txt $(test)/yosys.log) + rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/yosys.log) diff --git a/sdc-plugin/tests/base_litex/VexRiscv_Linux.v b/sdc-plugin/tests/base_litex/VexRiscv_Linux.v deleted file mode 100644 index 0833b573f..000000000 --- a/sdc-plugin/tests/base_litex/VexRiscv_Linux.v +++ /dev/null @@ -1,7469 +0,0 @@ -// Generator : SpinalHDL v1.3.6 git head : 9bf01e7f360e003fac1dd5ca8b8f4bffec0e52b8 -// Date : 16/06/2019, 23:08:47 -// Component : VexRiscv - - -`define BranchCtrlEnum_defaultEncoding_type [1:0] -`define BranchCtrlEnum_defaultEncoding_INC 2'b00 -`define BranchCtrlEnum_defaultEncoding_B 2'b01 -`define BranchCtrlEnum_defaultEncoding_JAL 2'b10 -`define BranchCtrlEnum_defaultEncoding_JALR 2'b11 - -`define AluBitwiseCtrlEnum_defaultEncoding_type [1:0] -`define AluBitwiseCtrlEnum_defaultEncoding_XOR_1 2'b00 -`define AluBitwiseCtrlEnum_defaultEncoding_OR_1 2'b01 -`define AluBitwiseCtrlEnum_defaultEncoding_AND_1 2'b10 - -`define Src1CtrlEnum_defaultEncoding_type [1:0] -`define Src1CtrlEnum_defaultEncoding_RS 2'b00 -`define Src1CtrlEnum_defaultEncoding_IMU 2'b01 -`define Src1CtrlEnum_defaultEncoding_PC_INCREMENT 2'b10 -`define Src1CtrlEnum_defaultEncoding_URS1 2'b11 - -`define Src2CtrlEnum_defaultEncoding_type [1:0] -`define Src2CtrlEnum_defaultEncoding_RS 2'b00 -`define Src2CtrlEnum_defaultEncoding_IMI 2'b01 -`define Src2CtrlEnum_defaultEncoding_IMS 2'b10 -`define Src2CtrlEnum_defaultEncoding_PC 2'b11 - -`define EnvCtrlEnum_defaultEncoding_type [1:0] -`define EnvCtrlEnum_defaultEncoding_NONE 2'b00 -`define EnvCtrlEnum_defaultEncoding_XRET 2'b01 -`define EnvCtrlEnum_defaultEncoding_WFI 2'b10 -`define EnvCtrlEnum_defaultEncoding_ECALL 2'b11 - -`define AluCtrlEnum_defaultEncoding_type [1:0] -`define AluCtrlEnum_defaultEncoding_ADD_SUB 2'b00 -`define AluCtrlEnum_defaultEncoding_SLT_SLTU 2'b01 -`define AluCtrlEnum_defaultEncoding_BITWISE 2'b10 - -`define ShiftCtrlEnum_defaultEncoding_type [1:0] -`define ShiftCtrlEnum_defaultEncoding_DISABLE_1 2'b00 -`define ShiftCtrlEnum_defaultEncoding_SLL_1 2'b01 -`define ShiftCtrlEnum_defaultEncoding_SRL_1 2'b10 -`define ShiftCtrlEnum_defaultEncoding_SRA_1 2'b11 - -`define MmuPlugin_shared_State_defaultEncoding_type [2:0] -`define MmuPlugin_shared_State_defaultEncoding_IDLE 3'b000 -`define MmuPlugin_shared_State_defaultEncoding_L1_CMD 3'b001 -`define MmuPlugin_shared_State_defaultEncoding_L1_RSP 3'b010 -`define MmuPlugin_shared_State_defaultEncoding_L0_CMD 3'b011 -`define MmuPlugin_shared_State_defaultEncoding_L0_RSP 3'b100 - -module InstructionCache ( - input io_flush, - input io_cpu_prefetch_isValid, - output reg io_cpu_prefetch_haltIt, - input [31:0] io_cpu_prefetch_pc, - input io_cpu_fetch_isValid, - input io_cpu_fetch_isStuck, - input io_cpu_fetch_isRemoved, - input [31:0] io_cpu_fetch_pc, - output [31:0] io_cpu_fetch_data, - input io_cpu_fetch_dataBypassValid, - input [31:0] io_cpu_fetch_dataBypass, - output io_cpu_fetch_mmuBus_cmd_isValid, - output [31:0] io_cpu_fetch_mmuBus_cmd_virtualAddress, - output io_cpu_fetch_mmuBus_cmd_bypassTranslation, - input [31:0] io_cpu_fetch_mmuBus_rsp_physicalAddress, - input io_cpu_fetch_mmuBus_rsp_isIoAccess, - input io_cpu_fetch_mmuBus_rsp_allowRead, - input io_cpu_fetch_mmuBus_rsp_allowWrite, - input io_cpu_fetch_mmuBus_rsp_allowExecute, - input io_cpu_fetch_mmuBus_rsp_exception, - input io_cpu_fetch_mmuBus_rsp_refilling, - output io_cpu_fetch_mmuBus_end, - input io_cpu_fetch_mmuBus_busy, - output [31:0] io_cpu_fetch_physicalAddress, - output io_cpu_fetch_haltIt, - input io_cpu_decode_isValid, - input io_cpu_decode_isStuck, - input [31:0] io_cpu_decode_pc, - output [31:0] io_cpu_decode_physicalAddress, - output [31:0] io_cpu_decode_data, - output io_cpu_decode_cacheMiss, - output io_cpu_decode_error, - output io_cpu_decode_mmuRefilling, - output io_cpu_decode_mmuException, - input io_cpu_decode_isUser, - input io_cpu_fill_valid, - input [31:0] io_cpu_fill_payload, - output io_mem_cmd_valid, - input io_mem_cmd_ready, - output [31:0] io_mem_cmd_payload_address, - output [2:0] io_mem_cmd_payload_size, - input io_mem_rsp_valid, - input [31:0] io_mem_rsp_payload_data, - input io_mem_rsp_payload_error, - input clk, - input reset); - reg [21:0] _zz_10_; - reg [31:0] _zz_11_; - wire _zz_12_; - wire _zz_13_; - wire [0:0] _zz_14_; - wire [0:0] _zz_15_; - wire [21:0] _zz_16_; - reg _zz_1_; - reg _zz_2_; - reg lineLoader_fire; - reg lineLoader_valid; - reg [31:0] lineLoader_address; - reg lineLoader_hadError; - reg lineLoader_flushPending; - reg [7:0] lineLoader_flushCounter; - reg _zz_3_; - reg lineLoader_cmdSent; - reg lineLoader_wayToAllocate_willIncrement; - wire lineLoader_wayToAllocate_willClear; - wire lineLoader_wayToAllocate_willOverflowIfInc; - wire lineLoader_wayToAllocate_willOverflow; - reg [2:0] lineLoader_wordIndex; - wire lineLoader_write_tag_0_valid; - wire [6:0] lineLoader_write_tag_0_payload_address; - wire lineLoader_write_tag_0_payload_data_valid; - wire lineLoader_write_tag_0_payload_data_error; - wire [19:0] lineLoader_write_tag_0_payload_data_address; - wire lineLoader_write_data_0_valid; - wire [9:0] lineLoader_write_data_0_payload_address; - wire [31:0] lineLoader_write_data_0_payload_data; - wire _zz_4_; - wire [6:0] _zz_5_; - wire _zz_6_; - wire fetchStage_read_waysValues_0_tag_valid; - wire fetchStage_read_waysValues_0_tag_error; - wire [19:0] fetchStage_read_waysValues_0_tag_address; - wire [21:0] _zz_7_; - wire [9:0] _zz_8_; - wire _zz_9_; - wire [31:0] fetchStage_read_waysValues_0_data; - wire fetchStage_hit_hits_0; - wire fetchStage_hit_valid; - wire fetchStage_hit_error; - wire [31:0] fetchStage_hit_data; - wire [31:0] fetchStage_hit_word; - reg [31:0] io_cpu_fetch_data_regNextWhen; - reg [31:0] decodeStage_mmuRsp_physicalAddress; - reg decodeStage_mmuRsp_isIoAccess; - reg decodeStage_mmuRsp_allowRead; - reg decodeStage_mmuRsp_allowWrite; - reg decodeStage_mmuRsp_allowExecute; - reg decodeStage_mmuRsp_exception; - reg decodeStage_mmuRsp_refilling; - reg decodeStage_hit_valid; - reg decodeStage_hit_error; - (* ram_style = "block" *) reg [21:0] ways_0_tags [0:127]; - (* ram_style = "block" *) reg [31:0] ways_0_datas [0:1023]; - assign _zz_12_ = (! lineLoader_flushCounter[7]); - assign _zz_13_ = (lineLoader_flushPending && (! (lineLoader_valid || io_cpu_fetch_isValid))); - assign _zz_14_ = _zz_7_[0 : 0]; - assign _zz_15_ = _zz_7_[1 : 1]; - assign _zz_16_ = {lineLoader_write_tag_0_payload_data_address,{lineLoader_write_tag_0_payload_data_error,lineLoader_write_tag_0_payload_data_valid}}; - always @ (posedge clk) begin - if(_zz_2_) begin - ways_0_tags[lineLoader_write_tag_0_payload_address] <= _zz_16_; - end - end - - always @ (posedge clk) begin - if(_zz_6_) begin - _zz_10_ <= ways_0_tags[_zz_5_]; - end - end - - always @ (posedge clk) begin - if(_zz_1_) begin - ways_0_datas[lineLoader_write_data_0_payload_address] <= lineLoader_write_data_0_payload_data; - end - end - - always @ (posedge clk) begin - if(_zz_9_) begin - _zz_11_ <= ways_0_datas[_zz_8_]; - end - end - - always @ (*) begin - _zz_1_ = 1'b0; - if(lineLoader_write_data_0_valid)begin - _zz_1_ = 1'b1; - end - end - - always @ (*) begin - _zz_2_ = 1'b0; - if(lineLoader_write_tag_0_valid)begin - _zz_2_ = 1'b1; - end - end - - assign io_cpu_fetch_haltIt = io_cpu_fetch_mmuBus_busy; - always @ (*) begin - lineLoader_fire = 1'b0; - if(io_mem_rsp_valid)begin - if((lineLoader_wordIndex == (3'b111)))begin - lineLoader_fire = 1'b1; - end - end - end - - always @ (*) begin - io_cpu_prefetch_haltIt = (lineLoader_valid || lineLoader_flushPending); - if(_zz_12_)begin - io_cpu_prefetch_haltIt = 1'b1; - end - if((! _zz_3_))begin - io_cpu_prefetch_haltIt = 1'b1; - end - if(io_flush)begin - io_cpu_prefetch_haltIt = 1'b1; - end - end - - assign io_mem_cmd_valid = (lineLoader_valid && (! lineLoader_cmdSent)); - assign io_mem_cmd_payload_address = {lineLoader_address[31 : 5],(5'b00000)}; - assign io_mem_cmd_payload_size = (3'b101); - always @ (*) begin - lineLoader_wayToAllocate_willIncrement = 1'b0; - if((! lineLoader_valid))begin - lineLoader_wayToAllocate_willIncrement = 1'b1; - end - end - - assign lineLoader_wayToAllocate_willClear = 1'b0; - assign lineLoader_wayToAllocate_willOverflowIfInc = 1'b1; - assign lineLoader_wayToAllocate_willOverflow = (lineLoader_wayToAllocate_willOverflowIfInc && lineLoader_wayToAllocate_willIncrement); - assign _zz_4_ = 1'b1; - assign lineLoader_write_tag_0_valid = ((_zz_4_ && lineLoader_fire) || (! lineLoader_flushCounter[7])); - assign lineLoader_write_tag_0_payload_address = (lineLoader_flushCounter[7] ? lineLoader_address[11 : 5] : lineLoader_flushCounter[6 : 0]); - assign lineLoader_write_tag_0_payload_data_valid = lineLoader_flushCounter[7]; - assign lineLoader_write_tag_0_payload_data_error = (lineLoader_hadError || io_mem_rsp_payload_error); - assign lineLoader_write_tag_0_payload_data_address = lineLoader_address[31 : 12]; - assign lineLoader_write_data_0_valid = (io_mem_rsp_valid && _zz_4_); - assign lineLoader_write_data_0_payload_address = {lineLoader_address[11 : 5],lineLoader_wordIndex}; - assign lineLoader_write_data_0_payload_data = io_mem_rsp_payload_data; - assign _zz_5_ = io_cpu_prefetch_pc[11 : 5]; - assign _zz_6_ = (! io_cpu_fetch_isStuck); - assign _zz_7_ = _zz_10_; - assign fetchStage_read_waysValues_0_tag_valid = _zz_14_[0]; - assign fetchStage_read_waysValues_0_tag_error = _zz_15_[0]; - assign fetchStage_read_waysValues_0_tag_address = _zz_7_[21 : 2]; - assign _zz_8_ = io_cpu_prefetch_pc[11 : 2]; - assign _zz_9_ = (! io_cpu_fetch_isStuck); - assign fetchStage_read_waysValues_0_data = _zz_11_; - assign fetchStage_hit_hits_0 = (fetchStage_read_waysValues_0_tag_valid && (fetchStage_read_waysValues_0_tag_address == io_cpu_fetch_mmuBus_rsp_physicalAddress[31 : 12])); - assign fetchStage_hit_valid = (fetchStage_hit_hits_0 != (1'b0)); - assign fetchStage_hit_error = fetchStage_read_waysValues_0_tag_error; - assign fetchStage_hit_data = fetchStage_read_waysValues_0_data; - assign fetchStage_hit_word = fetchStage_hit_data[31 : 0]; - assign io_cpu_fetch_data = (io_cpu_fetch_dataBypassValid ? io_cpu_fetch_dataBypass : fetchStage_hit_word); - assign io_cpu_decode_data = io_cpu_fetch_data_regNextWhen; - assign io_cpu_fetch_mmuBus_cmd_isValid = io_cpu_fetch_isValid; - assign io_cpu_fetch_mmuBus_cmd_virtualAddress = io_cpu_fetch_pc; - assign io_cpu_fetch_mmuBus_cmd_bypassTranslation = 1'b0; - assign io_cpu_fetch_mmuBus_end = ((! io_cpu_fetch_isStuck) || io_cpu_fetch_isRemoved); - assign io_cpu_fetch_physicalAddress = io_cpu_fetch_mmuBus_rsp_physicalAddress; - assign io_cpu_decode_cacheMiss = (! decodeStage_hit_valid); - assign io_cpu_decode_error = decodeStage_hit_error; - assign io_cpu_decode_mmuRefilling = decodeStage_mmuRsp_refilling; - assign io_cpu_decode_mmuException = ((! decodeStage_mmuRsp_refilling) && (decodeStage_mmuRsp_exception || (! decodeStage_mmuRsp_allowExecute))); - assign io_cpu_decode_physicalAddress = decodeStage_mmuRsp_physicalAddress; - always @ (posedge clk) begin - if(reset) begin - lineLoader_valid <= 1'b0; - lineLoader_hadError <= 1'b0; - lineLoader_flushPending <= 1'b1; - lineLoader_cmdSent <= 1'b0; - lineLoader_wordIndex <= (3'b000); - end else begin - if(lineLoader_fire)begin - lineLoader_valid <= 1'b0; - end - if(lineLoader_fire)begin - lineLoader_hadError <= 1'b0; - end - if(io_cpu_fill_valid)begin - lineLoader_valid <= 1'b1; - end - if(io_flush)begin - lineLoader_flushPending <= 1'b1; - end - if(_zz_13_)begin - lineLoader_flushPending <= 1'b0; - end - if((io_mem_cmd_valid && io_mem_cmd_ready))begin - lineLoader_cmdSent <= 1'b1; - end - if(lineLoader_fire)begin - lineLoader_cmdSent <= 1'b0; - end - if(io_mem_rsp_valid)begin - lineLoader_wordIndex <= (lineLoader_wordIndex + (3'b001)); - if(io_mem_rsp_payload_error)begin - lineLoader_hadError <= 1'b1; - end - end - end - end - - always @ (posedge clk) begin - if(io_cpu_fill_valid)begin - lineLoader_address <= io_cpu_fill_payload; - end - if(_zz_12_)begin - lineLoader_flushCounter <= (lineLoader_flushCounter + (8'b00000001)); - end - _zz_3_ <= lineLoader_flushCounter[7]; - if(_zz_13_)begin - lineLoader_flushCounter <= (8'b00000000); - end - if((! io_cpu_decode_isStuck))begin - io_cpu_fetch_data_regNextWhen <= io_cpu_fetch_data; - end - if((! io_cpu_decode_isStuck))begin - decodeStage_mmuRsp_physicalAddress <= io_cpu_fetch_mmuBus_rsp_physicalAddress; - decodeStage_mmuRsp_isIoAccess <= io_cpu_fetch_mmuBus_rsp_isIoAccess; - decodeStage_mmuRsp_allowRead <= io_cpu_fetch_mmuBus_rsp_allowRead; - decodeStage_mmuRsp_allowWrite <= io_cpu_fetch_mmuBus_rsp_allowWrite; - decodeStage_mmuRsp_allowExecute <= io_cpu_fetch_mmuBus_rsp_allowExecute; - decodeStage_mmuRsp_exception <= io_cpu_fetch_mmuBus_rsp_exception; - decodeStage_mmuRsp_refilling <= io_cpu_fetch_mmuBus_rsp_refilling; - end - if((! io_cpu_decode_isStuck))begin - decodeStage_hit_valid <= fetchStage_hit_valid; - end - if((! io_cpu_decode_isStuck))begin - decodeStage_hit_error <= fetchStage_hit_error; - end - end - -endmodule - -module DataCache ( - input io_cpu_execute_isValid, - input [31:0] io_cpu_execute_address, - input io_cpu_execute_args_wr, - input [31:0] io_cpu_execute_args_data, - input [1:0] io_cpu_execute_args_size, - input io_cpu_execute_args_isLrsc, - input io_cpu_execute_args_isAmo, - input io_cpu_execute_args_amoCtrl_swap, - input [2:0] io_cpu_execute_args_amoCtrl_alu, - input io_cpu_memory_isValid, - input io_cpu_memory_isStuck, - input io_cpu_memory_isRemoved, - output io_cpu_memory_isWrite, - input [31:0] io_cpu_memory_address, - output io_cpu_memory_mmuBus_cmd_isValid, - output [31:0] io_cpu_memory_mmuBus_cmd_virtualAddress, - output io_cpu_memory_mmuBus_cmd_bypassTranslation, - input [31:0] io_cpu_memory_mmuBus_rsp_physicalAddress, - input io_cpu_memory_mmuBus_rsp_isIoAccess, - input io_cpu_memory_mmuBus_rsp_allowRead, - input io_cpu_memory_mmuBus_rsp_allowWrite, - input io_cpu_memory_mmuBus_rsp_allowExecute, - input io_cpu_memory_mmuBus_rsp_exception, - input io_cpu_memory_mmuBus_rsp_refilling, - output io_cpu_memory_mmuBus_end, - input io_cpu_memory_mmuBus_busy, - input io_cpu_writeBack_isValid, - input io_cpu_writeBack_isStuck, - input io_cpu_writeBack_isUser, - output reg io_cpu_writeBack_haltIt, - output io_cpu_writeBack_isWrite, - output reg [31:0] io_cpu_writeBack_data, - input [31:0] io_cpu_writeBack_address, - output io_cpu_writeBack_mmuException, - output io_cpu_writeBack_unalignedAccess, - output reg io_cpu_writeBack_accessError, - input io_cpu_writeBack_clearLrsc, - output reg io_cpu_redo, - input io_cpu_flush_valid, - output reg io_cpu_flush_ready, - output reg io_mem_cmd_valid, - input io_mem_cmd_ready, - output reg io_mem_cmd_payload_wr, - output reg [31:0] io_mem_cmd_payload_address, - output [31:0] io_mem_cmd_payload_data, - output [3:0] io_mem_cmd_payload_mask, - output reg [2:0] io_mem_cmd_payload_length, - output reg io_mem_cmd_payload_last, - input io_mem_rsp_valid, - input [31:0] io_mem_rsp_payload_data, - input io_mem_rsp_payload_error, - input clk, - input reset); - reg [21:0] _zz_10_; - reg [31:0] _zz_11_; - wire _zz_12_; - wire _zz_13_; - wire _zz_14_; - wire _zz_15_; - wire _zz_16_; - wire _zz_17_; - wire _zz_18_; - wire _zz_19_; - wire _zz_20_; - wire _zz_21_; - wire [2:0] _zz_22_; - wire [0:0] _zz_23_; - wire [0:0] _zz_24_; - wire [31:0] _zz_25_; - wire [31:0] _zz_26_; - wire [31:0] _zz_27_; - wire [31:0] _zz_28_; - wire [1:0] _zz_29_; - wire [31:0] _zz_30_; - wire [1:0] _zz_31_; - wire [1:0] _zz_32_; - wire [0:0] _zz_33_; - wire [0:0] _zz_34_; - wire [2:0] _zz_35_; - wire [1:0] _zz_36_; - wire [21:0] _zz_37_; - reg _zz_1_; - reg _zz_2_; - wire haltCpu; - reg tagsReadCmd_valid; - reg [6:0] tagsReadCmd_payload; - reg tagsWriteCmd_valid; - reg [0:0] tagsWriteCmd_payload_way; - reg [6:0] tagsWriteCmd_payload_address; - reg tagsWriteCmd_payload_data_valid; - reg tagsWriteCmd_payload_data_error; - reg [19:0] tagsWriteCmd_payload_data_address; - reg tagsWriteLastCmd_valid; - reg [0:0] tagsWriteLastCmd_payload_way; - reg [6:0] tagsWriteLastCmd_payload_address; - reg tagsWriteLastCmd_payload_data_valid; - reg tagsWriteLastCmd_payload_data_error; - reg [19:0] tagsWriteLastCmd_payload_data_address; - reg dataReadCmd_valid; - reg [9:0] dataReadCmd_payload; - reg dataWriteCmd_valid; - reg [0:0] dataWriteCmd_payload_way; - reg [9:0] dataWriteCmd_payload_address; - reg [31:0] dataWriteCmd_payload_data; - reg [3:0] dataWriteCmd_payload_mask; - wire _zz_3_; - wire ways_0_tagsReadRsp_valid; - wire ways_0_tagsReadRsp_error; - wire [19:0] ways_0_tagsReadRsp_address; - wire [21:0] _zz_4_; - wire _zz_5_; - wire [31:0] ways_0_dataReadRsp; - reg [3:0] _zz_6_; - wire [3:0] stage0_mask; - wire [0:0] stage0_colisions; - reg stageA_request_wr; - reg [31:0] stageA_request_data; - reg [1:0] stageA_request_size; - reg stageA_request_isLrsc; - reg stageA_request_isAmo; - reg stageA_request_amoCtrl_swap; - reg [2:0] stageA_request_amoCtrl_alu; - reg [3:0] stageA_mask; - wire stageA_wayHits_0; - reg [0:0] stage0_colisions_regNextWhen; - wire [0:0] _zz_7_; - wire [0:0] stageA_colisions; - reg stageB_request_wr; - reg [31:0] stageB_request_data; - reg [1:0] stageB_request_size; - reg stageB_request_isLrsc; - reg stageB_isAmo; - reg stageB_request_amoCtrl_swap; - reg [2:0] stageB_request_amoCtrl_alu; - reg stageB_mmuRspFreeze; - reg [31:0] stageB_mmuRsp_physicalAddress; - reg stageB_mmuRsp_isIoAccess; - reg stageB_mmuRsp_allowRead; - reg stageB_mmuRsp_allowWrite; - reg stageB_mmuRsp_allowExecute; - reg stageB_mmuRsp_exception; - reg stageB_mmuRsp_refilling; - reg stageB_tagsReadRsp_0_valid; - reg stageB_tagsReadRsp_0_error; - reg [19:0] stageB_tagsReadRsp_0_address; - reg [31:0] stageB_dataReadRsp_0; - wire [0:0] _zz_8_; - reg [0:0] stageB_waysHits; - wire stageB_waysHit; - wire [31:0] stageB_dataMux; - reg [3:0] stageB_mask; - reg [0:0] stageB_colisions; - reg stageB_loaderValid; - reg stageB_flusher_valid; - reg stageB_lrsc_reserved; - reg [31:0] stageB_requestDataBypass; - wire stageB_amo_compare; - wire stageB_amo_unsigned; - wire [31:0] stageB_amo_addSub; - wire stageB_amo_less; - wire stageB_amo_selectRf; - reg [31:0] stageB_amo_result; - reg stageB_amo_resultRegValid; - reg [31:0] stageB_amo_resultReg; - reg stageB_memCmdSent; - wire [0:0] _zz_9_; - reg loader_valid; - reg loader_counter_willIncrement; - wire loader_counter_willClear; - reg [2:0] loader_counter_valueNext; - reg [2:0] loader_counter_value; - wire loader_counter_willOverflowIfInc; - wire loader_counter_willOverflow; - reg [0:0] loader_waysAllocator; - reg loader_error; - (* ram_style = "block" *) reg [21:0] ways_0_tags [0:127]; - (* ram_style = "block" *) reg [7:0] ways_0_data_symbol0 [0:1023]; - (* ram_style = "block" *) reg [7:0] ways_0_data_symbol1 [0:1023]; - (* ram_style = "block" *) reg [7:0] ways_0_data_symbol2 [0:1023]; - (* ram_style = "block" *) reg [7:0] ways_0_data_symbol3 [0:1023]; - reg [7:0] _zz_38_; - reg [7:0] _zz_39_; - reg [7:0] _zz_40_; - reg [7:0] _zz_41_; - assign _zz_12_ = (io_cpu_execute_isValid && (! io_cpu_memory_isStuck)); - assign _zz_13_ = (((stageB_mmuRsp_refilling || io_cpu_writeBack_accessError) || io_cpu_writeBack_mmuException) || io_cpu_writeBack_unalignedAccess); - assign _zz_14_ = (stageB_waysHit || (stageB_request_wr && (! stageB_isAmo))); - assign _zz_15_ = (! stageB_amo_resultRegValid); - assign _zz_16_ = (stageB_request_isLrsc && (! stageB_lrsc_reserved)); - assign _zz_17_ = (loader_valid && io_mem_rsp_valid); - assign _zz_18_ = (stageB_request_isLrsc && (! stageB_lrsc_reserved)); - assign _zz_19_ = ((((io_cpu_flush_valid && (! io_cpu_execute_isValid)) && (! io_cpu_memory_isValid)) && (! io_cpu_writeBack_isValid)) && (! io_cpu_redo)); - assign _zz_20_ = (((! stageB_request_wr) || stageB_isAmo) && ((stageB_colisions & stageB_waysHits) != (1'b0))); - assign _zz_21_ = ((! io_cpu_writeBack_isStuck) && (! stageB_mmuRspFreeze)); - assign _zz_22_ = (stageB_request_amoCtrl_alu | {stageB_request_amoCtrl_swap,(2'b00)}); - assign _zz_23_ = _zz_4_[0 : 0]; - assign _zz_24_ = _zz_4_[1 : 1]; - assign _zz_25_ = ($signed(_zz_26_) + $signed(_zz_30_)); - assign _zz_26_ = ($signed(_zz_27_) + $signed(_zz_28_)); - assign _zz_27_ = stageB_request_data; - assign _zz_28_ = (stageB_amo_compare ? (~ stageB_dataMux) : stageB_dataMux); - assign _zz_29_ = (stageB_amo_compare ? _zz_31_ : _zz_32_); - assign _zz_30_ = {{30{_zz_29_[1]}}, _zz_29_}; - assign _zz_31_ = (2'b01); - assign _zz_32_ = (2'b00); - assign _zz_33_ = (! stageB_lrsc_reserved); - assign _zz_34_ = loader_counter_willIncrement; - assign _zz_35_ = {2'd0, _zz_34_}; - assign _zz_36_ = {loader_waysAllocator,loader_waysAllocator[0]}; - assign _zz_37_ = {tagsWriteCmd_payload_data_address,{tagsWriteCmd_payload_data_error,tagsWriteCmd_payload_data_valid}}; - always @ (posedge clk) begin - if(_zz_2_) begin - ways_0_tags[tagsWriteCmd_payload_address] <= _zz_37_; - end - end - - always @ (posedge clk) begin - if(_zz_3_) begin - _zz_10_ <= ways_0_tags[tagsReadCmd_payload]; - end - end - - always @ (*) begin - _zz_11_ = {_zz_41_, _zz_40_, _zz_39_, _zz_38_}; - end - always @ (posedge clk) begin - if(dataWriteCmd_payload_mask[0] && _zz_1_) begin - ways_0_data_symbol0[dataWriteCmd_payload_address] <= dataWriteCmd_payload_data[7 : 0]; - end - if(dataWriteCmd_payload_mask[1] && _zz_1_) begin - ways_0_data_symbol1[dataWriteCmd_payload_address] <= dataWriteCmd_payload_data[15 : 8]; - end - if(dataWriteCmd_payload_mask[2] && _zz_1_) begin - ways_0_data_symbol2[dataWriteCmd_payload_address] <= dataWriteCmd_payload_data[23 : 16]; - end - if(dataWriteCmd_payload_mask[3] && _zz_1_) begin - ways_0_data_symbol3[dataWriteCmd_payload_address] <= dataWriteCmd_payload_data[31 : 24]; - end - end - - always @ (posedge clk) begin - if(_zz_5_) begin - _zz_38_ <= ways_0_data_symbol0[dataReadCmd_payload]; - _zz_39_ <= ways_0_data_symbol1[dataReadCmd_payload]; - _zz_40_ <= ways_0_data_symbol2[dataReadCmd_payload]; - _zz_41_ <= ways_0_data_symbol3[dataReadCmd_payload]; - end - end - - always @ (*) begin - _zz_1_ = 1'b0; - if((dataWriteCmd_valid && dataWriteCmd_payload_way[0]))begin - _zz_1_ = 1'b1; - end - end - - always @ (*) begin - _zz_2_ = 1'b0; - if((tagsWriteCmd_valid && tagsWriteCmd_payload_way[0]))begin - _zz_2_ = 1'b1; - end - end - - assign haltCpu = 1'b0; - assign _zz_3_ = (tagsReadCmd_valid && (! io_cpu_memory_isStuck)); - assign _zz_4_ = _zz_10_; - assign ways_0_tagsReadRsp_valid = _zz_23_[0]; - assign ways_0_tagsReadRsp_error = _zz_24_[0]; - assign ways_0_tagsReadRsp_address = _zz_4_[21 : 2]; - assign _zz_5_ = (dataReadCmd_valid && (! io_cpu_memory_isStuck)); - assign ways_0_dataReadRsp = _zz_11_; - always @ (*) begin - tagsReadCmd_valid = 1'b0; - if(_zz_12_)begin - tagsReadCmd_valid = 1'b1; - end - end - - always @ (*) begin - tagsReadCmd_payload = (7'bxxxxxxx); - if(_zz_12_)begin - tagsReadCmd_payload = io_cpu_execute_address[11 : 5]; - end - end - - always @ (*) begin - dataReadCmd_valid = 1'b0; - if(_zz_12_)begin - dataReadCmd_valid = 1'b1; - end - end - - always @ (*) begin - dataReadCmd_payload = (10'bxxxxxxxxxx); - if(_zz_12_)begin - dataReadCmd_payload = io_cpu_execute_address[11 : 2]; - end - end - - always @ (*) begin - tagsWriteCmd_valid = 1'b0; - if(stageB_flusher_valid)begin - tagsWriteCmd_valid = stageB_flusher_valid; - end - if(_zz_13_)begin - tagsWriteCmd_valid = 1'b0; - end - if(loader_counter_willOverflow)begin - tagsWriteCmd_valid = 1'b1; - end - end - - always @ (*) begin - tagsWriteCmd_payload_way = (1'bx); - if(stageB_flusher_valid)begin - tagsWriteCmd_payload_way = (1'b1); - end - if(loader_counter_willOverflow)begin - tagsWriteCmd_payload_way = loader_waysAllocator; - end - end - - always @ (*) begin - tagsWriteCmd_payload_address = (7'bxxxxxxx); - if(stageB_flusher_valid)begin - tagsWriteCmd_payload_address = stageB_mmuRsp_physicalAddress[11 : 5]; - end - if(loader_counter_willOverflow)begin - tagsWriteCmd_payload_address = stageB_mmuRsp_physicalAddress[11 : 5]; - end - end - - always @ (*) begin - tagsWriteCmd_payload_data_valid = 1'bx; - if(stageB_flusher_valid)begin - tagsWriteCmd_payload_data_valid = 1'b0; - end - if(loader_counter_willOverflow)begin - tagsWriteCmd_payload_data_valid = 1'b1; - end - end - - always @ (*) begin - tagsWriteCmd_payload_data_error = 1'bx; - if(loader_counter_willOverflow)begin - tagsWriteCmd_payload_data_error = (loader_error || io_mem_rsp_payload_error); - end - end - - always @ (*) begin - tagsWriteCmd_payload_data_address = (20'bxxxxxxxxxxxxxxxxxxxx); - if(loader_counter_willOverflow)begin - tagsWriteCmd_payload_data_address = stageB_mmuRsp_physicalAddress[31 : 12]; - end - end - - always @ (*) begin - dataWriteCmd_valid = 1'b0; - if(io_cpu_writeBack_isValid)begin - if(! stageB_mmuRsp_isIoAccess) begin - if(_zz_14_)begin - if((stageB_request_wr && stageB_waysHit))begin - dataWriteCmd_valid = 1'b1; - end - if(stageB_isAmo)begin - if(_zz_15_)begin - dataWriteCmd_valid = 1'b0; - end - end - if(_zz_16_)begin - dataWriteCmd_valid = 1'b0; - end - end - end - end - if(_zz_13_)begin - dataWriteCmd_valid = 1'b0; - end - if(_zz_17_)begin - dataWriteCmd_valid = 1'b1; - end - end - - always @ (*) begin - dataWriteCmd_payload_way = (1'bx); - if(io_cpu_writeBack_isValid)begin - if(! stageB_mmuRsp_isIoAccess) begin - if(_zz_14_)begin - dataWriteCmd_payload_way = stageB_waysHits; - end - end - end - if(_zz_17_)begin - dataWriteCmd_payload_way = loader_waysAllocator; - end - end - - always @ (*) begin - dataWriteCmd_payload_address = (10'bxxxxxxxxxx); - if(io_cpu_writeBack_isValid)begin - if(! stageB_mmuRsp_isIoAccess) begin - if(_zz_14_)begin - dataWriteCmd_payload_address = stageB_mmuRsp_physicalAddress[11 : 2]; - end - end - end - if(_zz_17_)begin - dataWriteCmd_payload_address = {stageB_mmuRsp_physicalAddress[11 : 5],loader_counter_value}; - end - end - - always @ (*) begin - dataWriteCmd_payload_data = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - if(io_cpu_writeBack_isValid)begin - if(! stageB_mmuRsp_isIoAccess) begin - if(_zz_14_)begin - dataWriteCmd_payload_data = stageB_requestDataBypass; - end - end - end - if(_zz_17_)begin - dataWriteCmd_payload_data = io_mem_rsp_payload_data; - end - end - - always @ (*) begin - dataWriteCmd_payload_mask = (4'bxxxx); - if(io_cpu_writeBack_isValid)begin - if(! stageB_mmuRsp_isIoAccess) begin - if(_zz_14_)begin - dataWriteCmd_payload_mask = stageB_mask; - end - end - end - if(_zz_17_)begin - dataWriteCmd_payload_mask = (4'b1111); - end - end - - always @ (*) begin - case(io_cpu_execute_args_size) - 2'b00 : begin - _zz_6_ = (4'b0001); - end - 2'b01 : begin - _zz_6_ = (4'b0011); - end - default : begin - _zz_6_ = (4'b1111); - end - endcase - end - - assign stage0_mask = (_zz_6_ <<< io_cpu_execute_address[1 : 0]); - assign stage0_colisions[0] = (((dataWriteCmd_valid && dataWriteCmd_payload_way[0]) && (dataWriteCmd_payload_address == io_cpu_execute_address[11 : 2])) && ((stage0_mask & dataWriteCmd_payload_mask) != (4'b0000))); - assign io_cpu_memory_mmuBus_cmd_isValid = io_cpu_memory_isValid; - assign io_cpu_memory_mmuBus_cmd_virtualAddress = io_cpu_memory_address; - assign io_cpu_memory_mmuBus_cmd_bypassTranslation = 1'b0; - assign io_cpu_memory_mmuBus_end = ((! io_cpu_memory_isStuck) || io_cpu_memory_isRemoved); - assign io_cpu_memory_isWrite = stageA_request_wr; - assign stageA_wayHits_0 = ((io_cpu_memory_mmuBus_rsp_physicalAddress[31 : 12] == ways_0_tagsReadRsp_address) && ways_0_tagsReadRsp_valid); - assign _zz_7_[0] = (((dataWriteCmd_valid && dataWriteCmd_payload_way[0]) && (dataWriteCmd_payload_address == io_cpu_memory_address[11 : 2])) && ((stageA_mask & dataWriteCmd_payload_mask) != (4'b0000))); - assign stageA_colisions = (stage0_colisions_regNextWhen | _zz_7_); - always @ (*) begin - stageB_mmuRspFreeze = 1'b0; - if((stageB_loaderValid || loader_valid))begin - stageB_mmuRspFreeze = 1'b1; - end - end - - assign _zz_8_[0] = stageA_wayHits_0; - assign stageB_waysHit = (stageB_waysHits != (1'b0)); - assign stageB_dataMux = stageB_dataReadRsp_0; - always @ (*) begin - stageB_loaderValid = 1'b0; - if(io_cpu_writeBack_isValid)begin - if(! stageB_mmuRsp_isIoAccess) begin - if(! _zz_14_) begin - if(io_mem_cmd_ready)begin - stageB_loaderValid = 1'b1; - end - end - end - end - if(_zz_13_)begin - stageB_loaderValid = 1'b0; - end - end - - always @ (*) begin - io_cpu_writeBack_haltIt = io_cpu_writeBack_isValid; - if(stageB_flusher_valid)begin - io_cpu_writeBack_haltIt = 1'b1; - end - if(io_cpu_writeBack_isValid)begin - if(stageB_mmuRsp_isIoAccess)begin - if((stageB_request_wr ? io_mem_cmd_ready : io_mem_rsp_valid))begin - io_cpu_writeBack_haltIt = 1'b0; - end - if(_zz_18_)begin - io_cpu_writeBack_haltIt = 1'b0; - end - end else begin - if(_zz_14_)begin - if(((! stageB_request_wr) || io_mem_cmd_ready))begin - io_cpu_writeBack_haltIt = 1'b0; - end - if(stageB_isAmo)begin - if(_zz_15_)begin - io_cpu_writeBack_haltIt = 1'b1; - end - end - if(_zz_16_)begin - io_cpu_writeBack_haltIt = 1'b0; - end - end - end - end - if(_zz_13_)begin - io_cpu_writeBack_haltIt = 1'b0; - end - end - - always @ (*) begin - io_cpu_flush_ready = 1'b0; - if(_zz_19_)begin - io_cpu_flush_ready = 1'b1; - end - end - - always @ (*) begin - stageB_requestDataBypass = stageB_request_data; - if(stageB_isAmo)begin - stageB_requestDataBypass = stageB_amo_resultReg; - end - end - - assign stageB_amo_compare = stageB_request_amoCtrl_alu[2]; - assign stageB_amo_unsigned = (stageB_request_amoCtrl_alu[2 : 1] == (2'b11)); - assign stageB_amo_addSub = _zz_25_; - assign stageB_amo_less = ((stageB_request_data[31] == stageB_dataMux[31]) ? stageB_amo_addSub[31] : (stageB_amo_unsigned ? stageB_dataMux[31] : stageB_request_data[31])); - assign stageB_amo_selectRf = (stageB_request_amoCtrl_swap ? 1'b1 : (stageB_request_amoCtrl_alu[0] ^ stageB_amo_less)); - always @ (*) begin - case(_zz_22_) - 3'b000 : begin - stageB_amo_result = stageB_amo_addSub; - end - 3'b001 : begin - stageB_amo_result = (stageB_request_data ^ stageB_dataMux); - end - 3'b010 : begin - stageB_amo_result = (stageB_request_data | stageB_dataMux); - end - 3'b011 : begin - stageB_amo_result = (stageB_request_data & stageB_dataMux); - end - default : begin - stageB_amo_result = (stageB_amo_selectRf ? stageB_request_data : stageB_dataMux); - end - endcase - end - - always @ (*) begin - io_cpu_redo = 1'b0; - if(io_cpu_writeBack_isValid)begin - if(! stageB_mmuRsp_isIoAccess) begin - if(_zz_14_)begin - if(_zz_20_)begin - io_cpu_redo = 1'b1; - end - end - end - end - if((io_cpu_writeBack_isValid && stageB_mmuRsp_refilling))begin - io_cpu_redo = 1'b1; - end - if(loader_valid)begin - io_cpu_redo = 1'b1; - end - end - - always @ (*) begin - io_cpu_writeBack_accessError = 1'b0; - if(stageB_mmuRsp_isIoAccess)begin - io_cpu_writeBack_accessError = (io_mem_rsp_valid && io_mem_rsp_payload_error); - end else begin - io_cpu_writeBack_accessError = ((stageB_waysHits & _zz_9_) != (1'b0)); - end - end - - assign io_cpu_writeBack_mmuException = (io_cpu_writeBack_isValid && ((stageB_mmuRsp_exception || ((! stageB_mmuRsp_allowWrite) && stageB_request_wr)) || ((! stageB_mmuRsp_allowRead) && ((! stageB_request_wr) || stageB_isAmo)))); - assign io_cpu_writeBack_unalignedAccess = (io_cpu_writeBack_isValid && (((stageB_request_size == (2'b10)) && (stageB_mmuRsp_physicalAddress[1 : 0] != (2'b00))) || ((stageB_request_size == (2'b01)) && (stageB_mmuRsp_physicalAddress[0 : 0] != (1'b0))))); - assign io_cpu_writeBack_isWrite = stageB_request_wr; - always @ (*) begin - io_mem_cmd_valid = 1'b0; - if(io_cpu_writeBack_isValid)begin - if(stageB_mmuRsp_isIoAccess)begin - io_mem_cmd_valid = (! stageB_memCmdSent); - if(_zz_18_)begin - io_mem_cmd_valid = 1'b0; - end - end else begin - if(_zz_14_)begin - if(stageB_request_wr)begin - io_mem_cmd_valid = 1'b1; - end - if(stageB_isAmo)begin - if(_zz_15_)begin - io_mem_cmd_valid = 1'b0; - end - end - if(_zz_20_)begin - io_mem_cmd_valid = 1'b0; - end - if(_zz_16_)begin - io_mem_cmd_valid = 1'b0; - end - end else begin - if((! stageB_memCmdSent))begin - io_mem_cmd_valid = 1'b1; - end - end - end - end - if(_zz_13_)begin - io_mem_cmd_valid = 1'b0; - end - end - - always @ (*) begin - io_mem_cmd_payload_address = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - if(io_cpu_writeBack_isValid)begin - if(stageB_mmuRsp_isIoAccess)begin - io_mem_cmd_payload_address = {stageB_mmuRsp_physicalAddress[31 : 2],(2'b00)}; - end else begin - if(_zz_14_)begin - io_mem_cmd_payload_address = {stageB_mmuRsp_physicalAddress[31 : 2],(2'b00)}; - end else begin - io_mem_cmd_payload_address = {stageB_mmuRsp_physicalAddress[31 : 5],(5'b00000)}; - end - end - end - end - - always @ (*) begin - io_mem_cmd_payload_length = (3'bxxx); - if(io_cpu_writeBack_isValid)begin - if(stageB_mmuRsp_isIoAccess)begin - io_mem_cmd_payload_length = (3'b000); - end else begin - if(_zz_14_)begin - io_mem_cmd_payload_length = (3'b000); - end else begin - io_mem_cmd_payload_length = (3'b111); - end - end - end - end - - always @ (*) begin - io_mem_cmd_payload_last = 1'bx; - if(io_cpu_writeBack_isValid)begin - if(stageB_mmuRsp_isIoAccess)begin - io_mem_cmd_payload_last = 1'b1; - end else begin - if(_zz_14_)begin - io_mem_cmd_payload_last = 1'b1; - end else begin - io_mem_cmd_payload_last = 1'b1; - end - end - end - end - - always @ (*) begin - io_mem_cmd_payload_wr = stageB_request_wr; - if(io_cpu_writeBack_isValid)begin - if(! stageB_mmuRsp_isIoAccess) begin - if(! _zz_14_) begin - io_mem_cmd_payload_wr = 1'b0; - end - end - end - end - - assign io_mem_cmd_payload_mask = stageB_mask; - assign io_mem_cmd_payload_data = stageB_requestDataBypass; - always @ (*) begin - if(stageB_mmuRsp_isIoAccess)begin - io_cpu_writeBack_data = io_mem_rsp_payload_data; - end else begin - io_cpu_writeBack_data = stageB_dataMux; - end - if((stageB_request_isLrsc && stageB_request_wr))begin - io_cpu_writeBack_data = {31'd0, _zz_33_}; - end - end - - assign _zz_9_[0] = stageB_tagsReadRsp_0_error; - always @ (*) begin - loader_counter_willIncrement = 1'b0; - if(_zz_17_)begin - loader_counter_willIncrement = 1'b1; - end - end - - assign loader_counter_willClear = 1'b0; - assign loader_counter_willOverflowIfInc = (loader_counter_value == (3'b111)); - assign loader_counter_willOverflow = (loader_counter_willOverflowIfInc && loader_counter_willIncrement); - always @ (*) begin - loader_counter_valueNext = (loader_counter_value + _zz_35_); - if(loader_counter_willClear)begin - loader_counter_valueNext = (3'b000); - end - end - - always @ (posedge clk) begin - tagsWriteLastCmd_valid <= tagsWriteCmd_valid; - tagsWriteLastCmd_payload_way <= tagsWriteCmd_payload_way; - tagsWriteLastCmd_payload_address <= tagsWriteCmd_payload_address; - tagsWriteLastCmd_payload_data_valid <= tagsWriteCmd_payload_data_valid; - tagsWriteLastCmd_payload_data_error <= tagsWriteCmd_payload_data_error; - tagsWriteLastCmd_payload_data_address <= tagsWriteCmd_payload_data_address; - if((! io_cpu_memory_isStuck))begin - stageA_request_wr <= io_cpu_execute_args_wr; - stageA_request_data <= io_cpu_execute_args_data; - stageA_request_size <= io_cpu_execute_args_size; - stageA_request_isLrsc <= io_cpu_execute_args_isLrsc; - stageA_request_isAmo <= io_cpu_execute_args_isAmo; - stageA_request_amoCtrl_swap <= io_cpu_execute_args_amoCtrl_swap; - stageA_request_amoCtrl_alu <= io_cpu_execute_args_amoCtrl_alu; - end - if((! io_cpu_memory_isStuck))begin - stageA_mask <= stage0_mask; - end - if((! io_cpu_memory_isStuck))begin - stage0_colisions_regNextWhen <= stage0_colisions; - end - if((! io_cpu_writeBack_isStuck))begin - stageB_request_wr <= stageA_request_wr; - stageB_request_data <= stageA_request_data; - stageB_request_size <= stageA_request_size; - stageB_request_isLrsc <= stageA_request_isLrsc; - stageB_isAmo <= stageA_request_isAmo; - stageB_request_amoCtrl_swap <= stageA_request_amoCtrl_swap; - stageB_request_amoCtrl_alu <= stageA_request_amoCtrl_alu; - end - if(_zz_21_)begin - stageB_mmuRsp_isIoAccess <= io_cpu_memory_mmuBus_rsp_isIoAccess; - stageB_mmuRsp_allowRead <= io_cpu_memory_mmuBus_rsp_allowRead; - stageB_mmuRsp_allowWrite <= io_cpu_memory_mmuBus_rsp_allowWrite; - stageB_mmuRsp_allowExecute <= io_cpu_memory_mmuBus_rsp_allowExecute; - stageB_mmuRsp_exception <= io_cpu_memory_mmuBus_rsp_exception; - stageB_mmuRsp_refilling <= io_cpu_memory_mmuBus_rsp_refilling; - end - if((! io_cpu_writeBack_isStuck))begin - stageB_tagsReadRsp_0_valid <= ways_0_tagsReadRsp_valid; - stageB_tagsReadRsp_0_error <= ways_0_tagsReadRsp_error; - stageB_tagsReadRsp_0_address <= ways_0_tagsReadRsp_address; - end - if((! io_cpu_writeBack_isStuck))begin - stageB_dataReadRsp_0 <= ways_0_dataReadRsp; - end - if((! io_cpu_writeBack_isStuck))begin - stageB_waysHits <= _zz_8_; - end - if((! io_cpu_writeBack_isStuck))begin - stageB_mask <= stageA_mask; - end - if((! io_cpu_writeBack_isStuck))begin - stageB_colisions <= stageA_colisions; - end - stageB_amo_resultRegValid <= 1'b1; - if((! io_cpu_writeBack_isStuck))begin - stageB_amo_resultRegValid <= 1'b0; - end - stageB_amo_resultReg <= stageB_amo_result; - if(!(! ((io_cpu_writeBack_isValid && (! io_cpu_writeBack_haltIt)) && io_cpu_writeBack_isStuck))) begin - $display("ERROR writeBack stuck by another plugin is not allowed"); - end - end - - always @ (posedge clk) begin - if(reset) begin - stageB_flusher_valid <= 1'b1; - stageB_mmuRsp_physicalAddress <= (32'b00000000000000000000000000000000); - stageB_lrsc_reserved <= 1'b0; - stageB_memCmdSent <= 1'b0; - loader_valid <= 1'b0; - loader_counter_value <= (3'b000); - loader_waysAllocator <= (1'b1); - loader_error <= 1'b0; - end else begin - if(_zz_21_)begin - stageB_mmuRsp_physicalAddress <= io_cpu_memory_mmuBus_rsp_physicalAddress; - end - if(stageB_flusher_valid)begin - if((stageB_mmuRsp_physicalAddress[11 : 5] != (7'b1111111)))begin - stageB_mmuRsp_physicalAddress[11 : 5] <= (stageB_mmuRsp_physicalAddress[11 : 5] + (7'b0000001)); - end else begin - stageB_flusher_valid <= 1'b0; - end - end - if(_zz_19_)begin - stageB_mmuRsp_physicalAddress[11 : 5] <= (7'b0000000); - stageB_flusher_valid <= 1'b1; - end - if(((((io_cpu_writeBack_isValid && (! io_cpu_writeBack_isStuck)) && (! io_cpu_redo)) && stageB_request_isLrsc) && (! stageB_request_wr)))begin - stageB_lrsc_reserved <= 1'b1; - end - if(io_cpu_writeBack_clearLrsc)begin - stageB_lrsc_reserved <= 1'b0; - end - if(io_mem_cmd_ready)begin - stageB_memCmdSent <= 1'b1; - end - if((! io_cpu_writeBack_isStuck))begin - stageB_memCmdSent <= 1'b0; - end - if(stageB_loaderValid)begin - loader_valid <= 1'b1; - end - loader_counter_value <= loader_counter_valueNext; - if(_zz_17_)begin - loader_error <= (loader_error || io_mem_rsp_payload_error); - end - if(loader_counter_willOverflow)begin - loader_valid <= 1'b0; - loader_error <= 1'b0; - end - if((! loader_valid))begin - loader_waysAllocator <= _zz_36_[0:0]; - end - end - end - -endmodule - -module VexRiscv ( - input [31:0] externalResetVector, - input timerInterrupt, - input softwareInterrupt, - input [31:0] externalInterruptArray, - output reg iBusWishbone_CYC, - output reg iBusWishbone_STB, - input iBusWishbone_ACK, - output iBusWishbone_WE, - output [29:0] iBusWishbone_ADR, - input [31:0] iBusWishbone_DAT_MISO, - output [31:0] iBusWishbone_DAT_MOSI, - output [3:0] iBusWishbone_SEL, - input iBusWishbone_ERR, - output [1:0] iBusWishbone_BTE, - output [2:0] iBusWishbone_CTI, - output dBusWishbone_CYC, - output dBusWishbone_STB, - input dBusWishbone_ACK, - output dBusWishbone_WE, - output [29:0] dBusWishbone_ADR, - input [31:0] dBusWishbone_DAT_MISO, - output [31:0] dBusWishbone_DAT_MOSI, - output [3:0] dBusWishbone_SEL, - input dBusWishbone_ERR, - output [1:0] dBusWishbone_BTE, - output [2:0] dBusWishbone_CTI, - input clk, - input reset); - wire _zz_220_; - wire _zz_221_; - wire _zz_222_; - wire _zz_223_; - wire [31:0] _zz_224_; - wire _zz_225_; - wire _zz_226_; - wire _zz_227_; - reg _zz_228_; - reg _zz_229_; - reg [31:0] _zz_230_; - reg _zz_231_; - reg [31:0] _zz_232_; - reg [1:0] _zz_233_; - reg _zz_234_; - reg _zz_235_; - wire _zz_236_; - wire [2:0] _zz_237_; - reg _zz_238_; - wire [31:0] _zz_239_; - reg _zz_240_; - reg _zz_241_; - wire _zz_242_; - wire [31:0] _zz_243_; - wire _zz_244_; - wire _zz_245_; - reg [31:0] _zz_246_; - reg [31:0] _zz_247_; - reg [31:0] _zz_248_; - reg _zz_249_; - reg _zz_250_; - reg _zz_251_; - reg [9:0] _zz_252_; - reg [9:0] _zz_253_; - reg [9:0] _zz_254_; - reg [9:0] _zz_255_; - reg _zz_256_; - reg _zz_257_; - reg _zz_258_; - reg _zz_259_; - reg _zz_260_; - reg _zz_261_; - reg _zz_262_; - reg [9:0] _zz_263_; - reg [9:0] _zz_264_; - reg [9:0] _zz_265_; - reg [9:0] _zz_266_; - reg _zz_267_; - reg _zz_268_; - reg _zz_269_; - reg _zz_270_; - wire IBusCachedPlugin_cache_io_cpu_prefetch_haltIt; - wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_data; - wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress; - wire IBusCachedPlugin_cache_io_cpu_fetch_haltIt; - wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; - wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; - wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; - wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; - wire IBusCachedPlugin_cache_io_cpu_decode_error; - wire IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling; - wire IBusCachedPlugin_cache_io_cpu_decode_mmuException; - wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_data; - wire IBusCachedPlugin_cache_io_cpu_decode_cacheMiss; - wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_physicalAddress; - wire IBusCachedPlugin_cache_io_mem_cmd_valid; - wire [31:0] IBusCachedPlugin_cache_io_mem_cmd_payload_address; - wire [2:0] IBusCachedPlugin_cache_io_mem_cmd_payload_size; - wire dataCache_1__io_cpu_memory_isWrite; - wire dataCache_1__io_cpu_memory_mmuBus_cmd_isValid; - wire [31:0] dataCache_1__io_cpu_memory_mmuBus_cmd_virtualAddress; - wire dataCache_1__io_cpu_memory_mmuBus_cmd_bypassTranslation; - wire dataCache_1__io_cpu_memory_mmuBus_end; - wire dataCache_1__io_cpu_writeBack_haltIt; - wire [31:0] dataCache_1__io_cpu_writeBack_data; - wire dataCache_1__io_cpu_writeBack_mmuException; - wire dataCache_1__io_cpu_writeBack_unalignedAccess; - wire dataCache_1__io_cpu_writeBack_accessError; - wire dataCache_1__io_cpu_writeBack_isWrite; - wire dataCache_1__io_cpu_flush_ready; - wire dataCache_1__io_cpu_redo; - wire dataCache_1__io_mem_cmd_valid; - wire dataCache_1__io_mem_cmd_payload_wr; - wire [31:0] dataCache_1__io_mem_cmd_payload_address; - wire [31:0] dataCache_1__io_mem_cmd_payload_data; - wire [3:0] dataCache_1__io_mem_cmd_payload_mask; - wire [2:0] dataCache_1__io_mem_cmd_payload_length; - wire dataCache_1__io_mem_cmd_payload_last; - wire _zz_271_; - wire _zz_272_; - wire _zz_273_; - wire _zz_274_; - wire _zz_275_; - wire _zz_276_; - wire _zz_277_; - wire _zz_278_; - wire _zz_279_; - wire _zz_280_; - wire _zz_281_; - wire _zz_282_; - wire _zz_283_; - wire _zz_284_; - wire _zz_285_; - wire _zz_286_; - wire _zz_287_; - wire [1:0] _zz_288_; - wire _zz_289_; - wire _zz_290_; - wire _zz_291_; - wire _zz_292_; - wire _zz_293_; - wire _zz_294_; - wire _zz_295_; - wire _zz_296_; - wire _zz_297_; - wire _zz_298_; - wire _zz_299_; - wire _zz_300_; - wire _zz_301_; - wire _zz_302_; - wire _zz_303_; - wire _zz_304_; - wire _zz_305_; - wire _zz_306_; - wire _zz_307_; - wire _zz_308_; - wire _zz_309_; - wire _zz_310_; - wire _zz_311_; - wire _zz_312_; - wire _zz_313_; - wire _zz_314_; - wire _zz_315_; - wire _zz_316_; - wire _zz_317_; - wire _zz_318_; - wire _zz_319_; - wire _zz_320_; - wire _zz_321_; - wire _zz_322_; - wire _zz_323_; - wire _zz_324_; - wire _zz_325_; - wire _zz_326_; - wire _zz_327_; - wire [1:0] _zz_328_; - wire _zz_329_; - wire [3:0] _zz_330_; - wire [2:0] _zz_331_; - wire [31:0] _zz_332_; - wire [2:0] _zz_333_; - wire [2:0] _zz_334_; - wire [0:0] _zz_335_; - wire [1:0] _zz_336_; - wire [0:0] _zz_337_; - wire [1:0] _zz_338_; - wire [0:0] _zz_339_; - wire [0:0] _zz_340_; - wire [0:0] _zz_341_; - wire [0:0] _zz_342_; - wire [0:0] _zz_343_; - wire [0:0] _zz_344_; - wire [0:0] _zz_345_; - wire [0:0] _zz_346_; - wire [0:0] _zz_347_; - wire [0:0] _zz_348_; - wire [0:0] _zz_349_; - wire [0:0] _zz_350_; - wire [0:0] _zz_351_; - wire [0:0] _zz_352_; - wire [0:0] _zz_353_; - wire [0:0] _zz_354_; - wire [0:0] _zz_355_; - wire [0:0] _zz_356_; - wire [0:0] _zz_357_; - wire [0:0] _zz_358_; - wire [0:0] _zz_359_; - wire [0:0] _zz_360_; - wire [0:0] _zz_361_; - wire [0:0] _zz_362_; - wire [0:0] _zz_363_; - wire [0:0] _zz_364_; - wire [0:0] _zz_365_; - wire [0:0] _zz_366_; - wire [0:0] _zz_367_; - wire [2:0] _zz_368_; - wire [4:0] _zz_369_; - wire [11:0] _zz_370_; - wire [11:0] _zz_371_; - wire [31:0] _zz_372_; - wire [31:0] _zz_373_; - wire [31:0] _zz_374_; - wire [31:0] _zz_375_; - wire [31:0] _zz_376_; - wire [31:0] _zz_377_; - wire [31:0] _zz_378_; - wire [32:0] _zz_379_; - wire [31:0] _zz_380_; - wire [32:0] _zz_381_; - wire [19:0] _zz_382_; - wire [11:0] _zz_383_; - wire [11:0] _zz_384_; - wire [1:0] _zz_385_; - wire [1:0] _zz_386_; - wire [0:0] _zz_387_; - wire [5:0] _zz_388_; - wire [33:0] _zz_389_; - wire [32:0] _zz_390_; - wire [33:0] _zz_391_; - wire [32:0] _zz_392_; - wire [33:0] _zz_393_; - wire [32:0] _zz_394_; - wire [0:0] _zz_395_; - wire [5:0] _zz_396_; - wire [32:0] _zz_397_; - wire [32:0] _zz_398_; - wire [31:0] _zz_399_; - wire [31:0] _zz_400_; - wire [32:0] _zz_401_; - wire [32:0] _zz_402_; - wire [32:0] _zz_403_; - wire [0:0] _zz_404_; - wire [32:0] _zz_405_; - wire [0:0] _zz_406_; - wire [32:0] _zz_407_; - wire [0:0] _zz_408_; - wire [31:0] _zz_409_; - wire [0:0] _zz_410_; - wire [0:0] _zz_411_; - wire [0:0] _zz_412_; - wire [0:0] _zz_413_; - wire [0:0] _zz_414_; - wire [0:0] _zz_415_; - wire [0:0] _zz_416_; - wire [0:0] _zz_417_; - wire [0:0] _zz_418_; - wire [0:0] _zz_419_; - wire [0:0] _zz_420_; - wire [0:0] _zz_421_; - wire [0:0] _zz_422_; - wire [0:0] _zz_423_; - wire [0:0] _zz_424_; - wire [0:0] _zz_425_; - wire [0:0] _zz_426_; - wire [0:0] _zz_427_; - wire [0:0] _zz_428_; - wire [0:0] _zz_429_; - wire [0:0] _zz_430_; - wire [0:0] _zz_431_; - wire [0:0] _zz_432_; - wire [0:0] _zz_433_; - wire [0:0] _zz_434_; - wire [0:0] _zz_435_; - wire [0:0] _zz_436_; - wire [0:0] _zz_437_; - wire [0:0] _zz_438_; - wire [0:0] _zz_439_; - wire [0:0] _zz_440_; - wire [0:0] _zz_441_; - wire [0:0] _zz_442_; - wire [0:0] _zz_443_; - wire [0:0] _zz_444_; - wire [0:0] _zz_445_; - wire [0:0] _zz_446_; - wire [0:0] _zz_447_; - wire [0:0] _zz_448_; - wire [0:0] _zz_449_; - wire [0:0] _zz_450_; - wire [0:0] _zz_451_; - wire [0:0] _zz_452_; - wire [0:0] _zz_453_; - wire [0:0] _zz_454_; - wire [26:0] _zz_455_; - wire _zz_456_; - wire _zz_457_; - wire [1:0] _zz_458_; - wire [31:0] _zz_459_; - wire _zz_460_; - wire [0:0] _zz_461_; - wire [1:0] _zz_462_; - wire [0:0] _zz_463_; - wire [1:0] _zz_464_; - wire [4:0] _zz_465_; - wire [4:0] _zz_466_; - wire _zz_467_; - wire [0:0] _zz_468_; - wire [28:0] _zz_469_; - wire [31:0] _zz_470_; - wire [31:0] _zz_471_; - wire [31:0] _zz_472_; - wire _zz_473_; - wire _zz_474_; - wire [31:0] _zz_475_; - wire [31:0] _zz_476_; - wire _zz_477_; - wire _zz_478_; - wire _zz_479_; - wire [0:0] _zz_480_; - wire [2:0] _zz_481_; - wire [0:0] _zz_482_; - wire [1:0] _zz_483_; - wire [1:0] _zz_484_; - wire [1:0] _zz_485_; - wire _zz_486_; - wire [0:0] _zz_487_; - wire [26:0] _zz_488_; - wire [31:0] _zz_489_; - wire [31:0] _zz_490_; - wire [31:0] _zz_491_; - wire [31:0] _zz_492_; - wire [31:0] _zz_493_; - wire [31:0] _zz_494_; - wire [31:0] _zz_495_; - wire _zz_496_; - wire [0:0] _zz_497_; - wire [0:0] _zz_498_; - wire _zz_499_; - wire _zz_500_; - wire [0:0] _zz_501_; - wire [0:0] _zz_502_; - wire [1:0] _zz_503_; - wire [1:0] _zz_504_; - wire _zz_505_; - wire [0:0] _zz_506_; - wire [24:0] _zz_507_; - wire [31:0] _zz_508_; - wire [31:0] _zz_509_; - wire [31:0] _zz_510_; - wire [31:0] _zz_511_; - wire [31:0] _zz_512_; - wire [31:0] _zz_513_; - wire [31:0] _zz_514_; - wire _zz_515_; - wire [0:0] _zz_516_; - wire [0:0] _zz_517_; - wire [0:0] _zz_518_; - wire [0:0] _zz_519_; - wire _zz_520_; - wire [0:0] _zz_521_; - wire [22:0] _zz_522_; - wire [31:0] _zz_523_; - wire [31:0] _zz_524_; - wire [31:0] _zz_525_; - wire [31:0] _zz_526_; - wire _zz_527_; - wire [1:0] _zz_528_; - wire [1:0] _zz_529_; - wire _zz_530_; - wire [0:0] _zz_531_; - wire [18:0] _zz_532_; - wire [31:0] _zz_533_; - wire [31:0] _zz_534_; - wire [31:0] _zz_535_; - wire [31:0] _zz_536_; - wire [31:0] _zz_537_; - wire [31:0] _zz_538_; - wire [31:0] _zz_539_; - wire [0:0] _zz_540_; - wire [0:0] _zz_541_; - wire _zz_542_; - wire [0:0] _zz_543_; - wire [14:0] _zz_544_; - wire [31:0] _zz_545_; - wire [31:0] _zz_546_; - wire [31:0] _zz_547_; - wire [31:0] _zz_548_; - wire _zz_549_; - wire [0:0] _zz_550_; - wire [3:0] _zz_551_; - wire _zz_552_; - wire [2:0] _zz_553_; - wire [2:0] _zz_554_; - wire _zz_555_; - wire [0:0] _zz_556_; - wire [10:0] _zz_557_; - wire [31:0] _zz_558_; - wire [31:0] _zz_559_; - wire [31:0] _zz_560_; - wire _zz_561_; - wire [0:0] _zz_562_; - wire [1:0] _zz_563_; - wire [31:0] _zz_564_; - wire [0:0] _zz_565_; - wire [0:0] _zz_566_; - wire [0:0] _zz_567_; - wire [3:0] _zz_568_; - wire [0:0] _zz_569_; - wire [0:0] _zz_570_; - wire _zz_571_; - wire [0:0] _zz_572_; - wire [8:0] _zz_573_; - wire [31:0] _zz_574_; - wire [31:0] _zz_575_; - wire [31:0] _zz_576_; - wire _zz_577_; - wire _zz_578_; - wire _zz_579_; - wire [0:0] _zz_580_; - wire [1:0] _zz_581_; - wire [31:0] _zz_582_; - wire [31:0] _zz_583_; - wire _zz_584_; - wire [0:0] _zz_585_; - wire [0:0] _zz_586_; - wire _zz_587_; - wire [0:0] _zz_588_; - wire [6:0] _zz_589_; - wire [31:0] _zz_590_; - wire [31:0] _zz_591_; - wire [31:0] _zz_592_; - wire [31:0] _zz_593_; - wire [31:0] _zz_594_; - wire _zz_595_; - wire _zz_596_; - wire [31:0] _zz_597_; - wire [31:0] _zz_598_; - wire [31:0] _zz_599_; - wire _zz_600_; - wire [0:0] _zz_601_; - wire [0:0] _zz_602_; - wire _zz_603_; - wire [0:0] _zz_604_; - wire [4:0] _zz_605_; - wire [31:0] _zz_606_; - wire _zz_607_; - wire [0:0] _zz_608_; - wire [0:0] _zz_609_; - wire _zz_610_; - wire [0:0] _zz_611_; - wire [0:0] _zz_612_; - wire _zz_613_; - wire [0:0] _zz_614_; - wire [1:0] _zz_615_; - wire [31:0] _zz_616_; - wire [31:0] _zz_617_; - wire [31:0] _zz_618_; - wire _zz_619_; - wire _zz_620_; - wire [0:0] _zz_621_; - wire [1:0] _zz_622_; - wire [6:0] _zz_623_; - wire [6:0] _zz_624_; - wire [0:0] _zz_625_; - wire [0:0] _zz_626_; - wire [31:0] _zz_627_; - wire [31:0] _zz_628_; - wire [31:0] _zz_629_; - wire [31:0] _zz_630_; - wire _zz_631_; - wire [0:0] _zz_632_; - wire [2:0] _zz_633_; - wire [31:0] _zz_634_; - wire [31:0] _zz_635_; - wire [31:0] _zz_636_; - wire _zz_637_; - wire [0:0] _zz_638_; - wire [17:0] _zz_639_; - wire [31:0] _zz_640_; - wire [31:0] _zz_641_; - wire [31:0] _zz_642_; - wire _zz_643_; - wire [0:0] _zz_644_; - wire [11:0] _zz_645_; - wire [31:0] _zz_646_; - wire [31:0] _zz_647_; - wire [31:0] _zz_648_; - wire _zz_649_; - wire [0:0] _zz_650_; - wire [5:0] _zz_651_; - wire [31:0] _zz_652_; - wire [31:0] _zz_653_; - wire [31:0] _zz_654_; - wire _zz_655_; - wire _zz_656_; - wire decode_SRC2_FORCE_ZERO; - wire decode_BYPASSABLE_EXECUTE_STAGE; - wire decode_IS_RS2_SIGNED; - wire [31:0] execute_BRANCH_CALC; - wire `BranchCtrlEnum_defaultEncoding_type decode_BRANCH_CTRL; - wire `BranchCtrlEnum_defaultEncoding_type _zz_1_; - wire `BranchCtrlEnum_defaultEncoding_type _zz_2_; - wire `BranchCtrlEnum_defaultEncoding_type _zz_3_; - wire decode_CSR_WRITE_OPCODE; - wire [31:0] execute_REGFILE_WRITE_DATA; - wire memory_IS_SFENCE_VMA; - wire execute_IS_SFENCE_VMA; - wire decode_IS_SFENCE_VMA; - wire execute_IS_DBUS_SHARING; - wire `AluBitwiseCtrlEnum_defaultEncoding_type decode_ALU_BITWISE_CTRL; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_4_; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_5_; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_6_; - wire [1:0] memory_MEMORY_ADDRESS_LOW; - wire [1:0] execute_MEMORY_ADDRESS_LOW; - wire decode_IS_DIV; - wire decode_IS_RS1_SIGNED; - wire `Src1CtrlEnum_defaultEncoding_type decode_SRC1_CTRL; - wire `Src1CtrlEnum_defaultEncoding_type _zz_7_; - wire `Src1CtrlEnum_defaultEncoding_type _zz_8_; - wire `Src1CtrlEnum_defaultEncoding_type _zz_9_; - wire memory_MEMORY_WR; - wire decode_MEMORY_WR; - wire [31:0] writeBack_FORMAL_PC_NEXT; - wire [31:0] memory_FORMAL_PC_NEXT; - wire [31:0] execute_FORMAL_PC_NEXT; - wire [31:0] decode_FORMAL_PC_NEXT; - wire decode_MEMORY_AMO; - wire decode_CSR_READ_OPCODE; - wire execute_BYPASSABLE_MEMORY_STAGE; - wire decode_BYPASSABLE_MEMORY_STAGE; - wire `Src2CtrlEnum_defaultEncoding_type decode_SRC2_CTRL; - wire `Src2CtrlEnum_defaultEncoding_type _zz_10_; - wire `Src2CtrlEnum_defaultEncoding_type _zz_11_; - wire `Src2CtrlEnum_defaultEncoding_type _zz_12_; - wire [31:0] memory_PC; - wire `EnvCtrlEnum_defaultEncoding_type _zz_13_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_14_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_15_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_16_; - wire `EnvCtrlEnum_defaultEncoding_type decode_ENV_CTRL; - wire `EnvCtrlEnum_defaultEncoding_type _zz_17_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_18_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_19_; - wire decode_SRC_LESS_UNSIGNED; - wire `AluCtrlEnum_defaultEncoding_type decode_ALU_CTRL; - wire `AluCtrlEnum_defaultEncoding_type _zz_20_; - wire `AluCtrlEnum_defaultEncoding_type _zz_21_; - wire `AluCtrlEnum_defaultEncoding_type _zz_22_; - wire [31:0] execute_SHIFT_RIGHT; - wire decode_IS_CSR; - wire decode_IS_MUL; - wire decode_MEMORY_MANAGMENT; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_23_; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_24_; - wire `ShiftCtrlEnum_defaultEncoding_type decode_SHIFT_CTRL; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_25_; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_26_; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_27_; - wire decode_MEMORY_LRSC; - wire execute_BRANCH_DO; - wire execute_IS_RS1_SIGNED; - wire execute_IS_DIV; - wire execute_IS_MUL; - wire execute_IS_RS2_SIGNED; - wire memory_IS_DIV; - wire memory_IS_MUL; - wire execute_CSR_READ_OPCODE; - wire execute_CSR_WRITE_OPCODE; - wire execute_IS_CSR; - wire `EnvCtrlEnum_defaultEncoding_type memory_ENV_CTRL; - wire `EnvCtrlEnum_defaultEncoding_type _zz_28_; - wire `EnvCtrlEnum_defaultEncoding_type execute_ENV_CTRL; - wire `EnvCtrlEnum_defaultEncoding_type _zz_29_; - wire _zz_30_; - wire _zz_31_; - wire `EnvCtrlEnum_defaultEncoding_type writeBack_ENV_CTRL; - wire `EnvCtrlEnum_defaultEncoding_type _zz_32_; - wire [31:0] memory_BRANCH_CALC; - wire memory_BRANCH_DO; - wire [31:0] _zz_33_; - wire [31:0] execute_PC; - wire [31:0] execute_RS1; - wire `BranchCtrlEnum_defaultEncoding_type execute_BRANCH_CTRL; - wire `BranchCtrlEnum_defaultEncoding_type _zz_34_; - wire _zz_35_; - wire decode_RS2_USE; - wire decode_RS1_USE; - reg [31:0] _zz_36_; - wire execute_REGFILE_WRITE_VALID; - wire execute_BYPASSABLE_EXECUTE_STAGE; - wire memory_REGFILE_WRITE_VALID; - wire [31:0] memory_INSTRUCTION; - wire memory_BYPASSABLE_MEMORY_STAGE; - wire writeBack_REGFILE_WRITE_VALID; - reg [31:0] decode_RS2; - reg [31:0] decode_RS1; - wire [31:0] memory_SHIFT_RIGHT; - reg [31:0] _zz_37_; - wire `ShiftCtrlEnum_defaultEncoding_type memory_SHIFT_CTRL; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_38_; - wire [31:0] _zz_39_; - wire `ShiftCtrlEnum_defaultEncoding_type execute_SHIFT_CTRL; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_40_; - wire _zz_41_; - wire [31:0] _zz_42_; - wire [31:0] _zz_43_; - wire execute_SRC_LESS_UNSIGNED; - wire execute_SRC2_FORCE_ZERO; - wire execute_SRC_USE_SUB_LESS; - wire [31:0] _zz_44_; - wire `Src2CtrlEnum_defaultEncoding_type execute_SRC2_CTRL; - wire `Src2CtrlEnum_defaultEncoding_type _zz_45_; - wire [31:0] _zz_46_; - wire `Src1CtrlEnum_defaultEncoding_type execute_SRC1_CTRL; - wire `Src1CtrlEnum_defaultEncoding_type _zz_47_; - wire [31:0] _zz_48_; - wire decode_SRC_USE_SUB_LESS; - wire decode_SRC_ADD_ZERO; - wire _zz_49_; - wire [31:0] execute_SRC_ADD_SUB; - wire execute_SRC_LESS; - wire `AluCtrlEnum_defaultEncoding_type execute_ALU_CTRL; - wire `AluCtrlEnum_defaultEncoding_type _zz_50_; - wire [31:0] _zz_51_; - wire [31:0] execute_SRC2; - wire [31:0] execute_SRC1; - wire `AluBitwiseCtrlEnum_defaultEncoding_type execute_ALU_BITWISE_CTRL; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_52_; - wire [31:0] _zz_53_; - wire _zz_54_; - reg _zz_55_; - wire [31:0] _zz_56_; - wire [31:0] _zz_57_; - wire [31:0] decode_INSTRUCTION_ANTICIPATED; - reg decode_REGFILE_WRITE_VALID; - wire decode_LEGAL_INSTRUCTION; - wire decode_INSTRUCTION_READY; - wire _zz_58_; - wire _zz_59_; - wire _zz_60_; - wire _zz_61_; - wire `Src1CtrlEnum_defaultEncoding_type _zz_62_; - wire `Src2CtrlEnum_defaultEncoding_type _zz_63_; - wire _zz_64_; - wire _zz_65_; - wire `BranchCtrlEnum_defaultEncoding_type _zz_66_; - wire _zz_67_; - wire _zz_68_; - wire _zz_69_; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_70_; - wire _zz_71_; - wire _zz_72_; - wire _zz_73_; - wire _zz_74_; - wire _zz_75_; - wire _zz_76_; - wire _zz_77_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_78_; - wire _zz_79_; - wire _zz_80_; - wire `AluCtrlEnum_defaultEncoding_type _zz_81_; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_82_; - wire _zz_83_; - wire _zz_84_; - wire _zz_85_; - wire writeBack_IS_SFENCE_VMA; - wire writeBack_IS_DBUS_SHARING; - wire memory_IS_DBUS_SHARING; - wire _zz_86_; - reg [31:0] _zz_87_; - wire [1:0] writeBack_MEMORY_ADDRESS_LOW; - wire writeBack_MEMORY_WR; - wire [31:0] writeBack_REGFILE_WRITE_DATA; - wire writeBack_MEMORY_ENABLE; - wire [31:0] memory_REGFILE_WRITE_DATA; - wire memory_MEMORY_ENABLE; - wire [1:0] _zz_88_; - wire execute_MEMORY_AMO; - wire execute_MEMORY_LRSC; - wire execute_MEMORY_MANAGMENT; - wire [31:0] execute_RS2; - wire execute_MEMORY_WR; - wire [31:0] execute_SRC_ADD; - wire execute_MEMORY_ENABLE; - wire [31:0] execute_INSTRUCTION; - wire decode_MEMORY_ENABLE; - wire decode_FLUSH_ALL; - reg IBusCachedPlugin_rsp_issueDetected; - reg _zz_89_; - reg _zz_90_; - reg _zz_91_; - wire [31:0] decode_INSTRUCTION; - wire [31:0] _zz_92_; - reg [31:0] _zz_93_; - reg [31:0] _zz_94_; - wire [31:0] decode_PC; - wire [31:0] _zz_95_; - wire [31:0] _zz_96_; - wire [31:0] _zz_97_; - wire [31:0] writeBack_PC; - wire [31:0] writeBack_INSTRUCTION; - reg decode_arbitration_haltItself; - reg decode_arbitration_haltByOther; - reg decode_arbitration_removeIt; - wire decode_arbitration_flushIt; - reg decode_arbitration_flushNext; - wire decode_arbitration_isValid; - wire decode_arbitration_isStuck; - wire decode_arbitration_isStuckByOthers; - wire decode_arbitration_isFlushed; - wire decode_arbitration_isMoving; - wire decode_arbitration_isFiring; - reg execute_arbitration_haltItself; - wire execute_arbitration_haltByOther; - reg execute_arbitration_removeIt; - wire execute_arbitration_flushIt; - reg execute_arbitration_flushNext; - reg execute_arbitration_isValid; - wire execute_arbitration_isStuck; - wire execute_arbitration_isStuckByOthers; - wire execute_arbitration_isFlushed; - wire execute_arbitration_isMoving; - wire execute_arbitration_isFiring; - reg memory_arbitration_haltItself; - wire memory_arbitration_haltByOther; - reg memory_arbitration_removeIt; - wire memory_arbitration_flushIt; - reg memory_arbitration_flushNext; - reg memory_arbitration_isValid; - wire memory_arbitration_isStuck; - wire memory_arbitration_isStuckByOthers; - wire memory_arbitration_isFlushed; - wire memory_arbitration_isMoving; - wire memory_arbitration_isFiring; - reg writeBack_arbitration_haltItself; - wire writeBack_arbitration_haltByOther; - reg writeBack_arbitration_removeIt; - reg writeBack_arbitration_flushIt; - reg writeBack_arbitration_flushNext; - reg writeBack_arbitration_isValid; - wire writeBack_arbitration_isStuck; - wire writeBack_arbitration_isStuckByOthers; - wire writeBack_arbitration_isFlushed; - wire writeBack_arbitration_isMoving; - wire writeBack_arbitration_isFiring; - wire [31:0] lastStageInstruction /* verilator public */ ; - wire [31:0] lastStagePc /* verilator public */ ; - wire lastStageIsValid /* verilator public */ ; - wire lastStageIsFiring /* verilator public */ ; - reg IBusCachedPlugin_fetcherHalt; - reg IBusCachedPlugin_fetcherflushIt; - reg IBusCachedPlugin_incomingInstruction; - wire IBusCachedPlugin_pcValids_0; - wire IBusCachedPlugin_pcValids_1; - wire IBusCachedPlugin_pcValids_2; - wire IBusCachedPlugin_pcValids_3; - wire IBusCachedPlugin_redoBranch_valid; - wire [31:0] IBusCachedPlugin_redoBranch_payload; - reg IBusCachedPlugin_decodeExceptionPort_valid; - reg [3:0] IBusCachedPlugin_decodeExceptionPort_payload_code; - wire [31:0] IBusCachedPlugin_decodeExceptionPort_payload_badAddr; - wire IBusCachedPlugin_mmuBus_cmd_isValid; - wire [31:0] IBusCachedPlugin_mmuBus_cmd_virtualAddress; - wire IBusCachedPlugin_mmuBus_cmd_bypassTranslation; - reg [31:0] IBusCachedPlugin_mmuBus_rsp_physicalAddress; - wire IBusCachedPlugin_mmuBus_rsp_isIoAccess; - reg IBusCachedPlugin_mmuBus_rsp_allowRead; - reg IBusCachedPlugin_mmuBus_rsp_allowWrite; - reg IBusCachedPlugin_mmuBus_rsp_allowExecute; - reg IBusCachedPlugin_mmuBus_rsp_exception; - reg IBusCachedPlugin_mmuBus_rsp_refilling; - wire IBusCachedPlugin_mmuBus_end; - wire IBusCachedPlugin_mmuBus_busy; - wire DBusCachedPlugin_mmuBus_cmd_isValid; - wire [31:0] DBusCachedPlugin_mmuBus_cmd_virtualAddress; - reg DBusCachedPlugin_mmuBus_cmd_bypassTranslation; - reg [31:0] DBusCachedPlugin_mmuBus_rsp_physicalAddress; - wire DBusCachedPlugin_mmuBus_rsp_isIoAccess; - reg DBusCachedPlugin_mmuBus_rsp_allowRead; - reg DBusCachedPlugin_mmuBus_rsp_allowWrite; - reg DBusCachedPlugin_mmuBus_rsp_allowExecute; - reg DBusCachedPlugin_mmuBus_rsp_exception; - reg DBusCachedPlugin_mmuBus_rsp_refilling; - wire DBusCachedPlugin_mmuBus_end; - wire DBusCachedPlugin_mmuBus_busy; - reg DBusCachedPlugin_redoBranch_valid; - wire [31:0] DBusCachedPlugin_redoBranch_payload; - reg DBusCachedPlugin_exceptionBus_valid; - reg [3:0] DBusCachedPlugin_exceptionBus_payload_code; - wire [31:0] DBusCachedPlugin_exceptionBus_payload_badAddr; - reg MmuPlugin_dBusAccess_cmd_valid; - reg MmuPlugin_dBusAccess_cmd_ready; - reg [31:0] MmuPlugin_dBusAccess_cmd_payload_address; - wire [1:0] MmuPlugin_dBusAccess_cmd_payload_size; - wire MmuPlugin_dBusAccess_cmd_payload_write; - wire [31:0] MmuPlugin_dBusAccess_cmd_payload_data; - wire [3:0] MmuPlugin_dBusAccess_cmd_payload_writeMask; - wire MmuPlugin_dBusAccess_rsp_valid; - wire [31:0] MmuPlugin_dBusAccess_rsp_payload_data; - wire MmuPlugin_dBusAccess_rsp_payload_error; - wire MmuPlugin_dBusAccess_rsp_payload_redo; - wire decodeExceptionPort_valid; - wire [3:0] decodeExceptionPort_payload_code; - wire [31:0] decodeExceptionPort_payload_badAddr; - wire BranchPlugin_jumpInterface_valid; - wire [31:0] BranchPlugin_jumpInterface_payload; - wire BranchPlugin_branchExceptionPort_valid; - wire [3:0] BranchPlugin_branchExceptionPort_payload_code; - wire [31:0] BranchPlugin_branchExceptionPort_payload_badAddr; - reg CsrPlugin_jumpInterface_valid; - reg [31:0] CsrPlugin_jumpInterface_payload; - wire CsrPlugin_exceptionPendings_0; - wire CsrPlugin_exceptionPendings_1; - wire CsrPlugin_exceptionPendings_2; - wire CsrPlugin_exceptionPendings_3; - wire externalInterrupt; - wire externalInterruptS; - wire contextSwitching; - reg [1:0] CsrPlugin_privilege; - wire CsrPlugin_forceMachineWire; - reg CsrPlugin_selfException_valid; - reg [3:0] CsrPlugin_selfException_payload_code; - wire [31:0] CsrPlugin_selfException_payload_badAddr; - wire CsrPlugin_allowInterrupts; - wire CsrPlugin_allowException; - wire IBusCachedPlugin_jump_pcLoad_valid; - wire [31:0] IBusCachedPlugin_jump_pcLoad_payload; - wire [3:0] _zz_98_; - wire [3:0] _zz_99_; - wire _zz_100_; - wire _zz_101_; - wire _zz_102_; - wire IBusCachedPlugin_fetchPc_output_valid; - wire IBusCachedPlugin_fetchPc_output_ready; - wire [31:0] IBusCachedPlugin_fetchPc_output_payload; - reg [31:0] IBusCachedPlugin_fetchPc_pcReg /* verilator public */ ; - reg IBusCachedPlugin_fetchPc_corrected; - reg IBusCachedPlugin_fetchPc_pcRegPropagate; - reg IBusCachedPlugin_fetchPc_booted; - reg IBusCachedPlugin_fetchPc_inc; - reg [31:0] IBusCachedPlugin_fetchPc_pc; - wire IBusCachedPlugin_iBusRsp_stages_0_input_valid; - wire IBusCachedPlugin_iBusRsp_stages_0_input_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_input_payload; - wire IBusCachedPlugin_iBusRsp_stages_0_output_valid; - wire IBusCachedPlugin_iBusRsp_stages_0_output_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_output_payload; - wire IBusCachedPlugin_iBusRsp_stages_0_halt; - wire IBusCachedPlugin_iBusRsp_stages_0_inputSample; - wire IBusCachedPlugin_iBusRsp_stages_1_input_valid; - wire IBusCachedPlugin_iBusRsp_stages_1_input_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_input_payload; - wire IBusCachedPlugin_iBusRsp_stages_1_output_valid; - wire IBusCachedPlugin_iBusRsp_stages_1_output_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_output_payload; - reg IBusCachedPlugin_iBusRsp_stages_1_halt; - wire IBusCachedPlugin_iBusRsp_stages_1_inputSample; - wire IBusCachedPlugin_iBusRsp_stages_2_input_valid; - wire IBusCachedPlugin_iBusRsp_stages_2_input_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_2_input_payload; - wire IBusCachedPlugin_iBusRsp_stages_2_output_valid; - wire IBusCachedPlugin_iBusRsp_stages_2_output_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_2_output_payload; - reg IBusCachedPlugin_iBusRsp_stages_2_halt; - wire IBusCachedPlugin_iBusRsp_stages_2_inputSample; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; - reg IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_inputSample; - wire _zz_103_; - wire _zz_104_; - wire _zz_105_; - wire _zz_106_; - wire _zz_107_; - wire _zz_108_; - reg _zz_109_; - wire _zz_110_; - reg _zz_111_; - reg [31:0] _zz_112_; - wire _zz_113_; - reg _zz_114_; - reg [31:0] _zz_115_; - reg IBusCachedPlugin_iBusRsp_readyForError; - wire IBusCachedPlugin_iBusRsp_decodeInput_valid; - wire IBusCachedPlugin_iBusRsp_decodeInput_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; - wire IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_error; - wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; - wire IBusCachedPlugin_iBusRsp_decodeInput_payload_isRvc; - reg IBusCachedPlugin_injector_nextPcCalc_valids_0; - reg IBusCachedPlugin_injector_nextPcCalc_valids_1; - reg IBusCachedPlugin_injector_nextPcCalc_valids_2; - reg IBusCachedPlugin_injector_nextPcCalc_valids_3; - reg IBusCachedPlugin_injector_nextPcCalc_valids_4; - reg IBusCachedPlugin_injector_nextPcCalc_valids_5; - reg IBusCachedPlugin_injector_decodeRemoved; - wire iBus_cmd_valid; - wire iBus_cmd_ready; - reg [31:0] iBus_cmd_payload_address; - wire [2:0] iBus_cmd_payload_size; - wire iBus_rsp_valid; - wire [31:0] iBus_rsp_payload_data; - wire iBus_rsp_payload_error; - wire [31:0] _zz_116_; - reg [31:0] IBusCachedPlugin_rspCounter; - wire IBusCachedPlugin_s0_tightlyCoupledHit; - reg IBusCachedPlugin_s1_tightlyCoupledHit; - reg IBusCachedPlugin_s2_tightlyCoupledHit; - wire IBusCachedPlugin_rsp_iBusRspOutputHalt; - reg IBusCachedPlugin_rsp_redoFetch; - wire dBus_cmd_valid; - wire dBus_cmd_ready; - wire dBus_cmd_payload_wr; - wire [31:0] dBus_cmd_payload_address; - wire [31:0] dBus_cmd_payload_data; - wire [3:0] dBus_cmd_payload_mask; - wire [2:0] dBus_cmd_payload_length; - wire dBus_cmd_payload_last; - wire dBus_rsp_valid; - wire [31:0] dBus_rsp_payload_data; - wire dBus_rsp_payload_error; - wire dataCache_1__io_mem_cmd_s2mPipe_valid; - wire dataCache_1__io_mem_cmd_s2mPipe_ready; - wire dataCache_1__io_mem_cmd_s2mPipe_payload_wr; - wire [31:0] dataCache_1__io_mem_cmd_s2mPipe_payload_address; - wire [31:0] dataCache_1__io_mem_cmd_s2mPipe_payload_data; - wire [3:0] dataCache_1__io_mem_cmd_s2mPipe_payload_mask; - wire [2:0] dataCache_1__io_mem_cmd_s2mPipe_payload_length; - wire dataCache_1__io_mem_cmd_s2mPipe_payload_last; - reg _zz_117_; - reg _zz_118_; - reg [31:0] _zz_119_; - reg [31:0] _zz_120_; - reg [3:0] _zz_121_; - reg [2:0] _zz_122_; - reg _zz_123_; - wire dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_valid; - wire dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_ready; - wire dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_wr; - wire [31:0] dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_address; - wire [31:0] dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_data; - wire [3:0] dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_mask; - wire [2:0] dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_length; - wire dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_last; - reg _zz_124_; - reg _zz_125_; - reg [31:0] _zz_126_; - reg [31:0] _zz_127_; - reg [3:0] _zz_128_; - reg [2:0] _zz_129_; - reg _zz_130_; - wire [31:0] _zz_131_; - reg [31:0] DBusCachedPlugin_rspCounter; - wire [1:0] execute_DBusCachedPlugin_size; - reg [31:0] _zz_132_; - reg [31:0] writeBack_DBusCachedPlugin_rspShifted; - wire _zz_133_; - reg [31:0] _zz_134_; - wire _zz_135_; - reg [31:0] _zz_136_; - reg [31:0] writeBack_DBusCachedPlugin_rspFormated; - reg DBusCachedPlugin_forceDatapath; - reg MmuPlugin_status_sum; - reg MmuPlugin_status_mxr; - reg MmuPlugin_status_mprv; - reg MmuPlugin_satp_mode; - reg [19:0] MmuPlugin_satp_ppn; - reg MmuPlugin_ports_0_cache_0_valid; - reg MmuPlugin_ports_0_cache_0_exception; - reg MmuPlugin_ports_0_cache_0_superPage; - reg [9:0] MmuPlugin_ports_0_cache_0_virtualAddress_0; - reg [9:0] MmuPlugin_ports_0_cache_0_virtualAddress_1; - reg [9:0] MmuPlugin_ports_0_cache_0_physicalAddress_0; - reg [9:0] MmuPlugin_ports_0_cache_0_physicalAddress_1; - reg MmuPlugin_ports_0_cache_0_allowRead; - reg MmuPlugin_ports_0_cache_0_allowWrite; - reg MmuPlugin_ports_0_cache_0_allowExecute; - reg MmuPlugin_ports_0_cache_0_allowUser; - reg MmuPlugin_ports_0_cache_1_valid; - reg MmuPlugin_ports_0_cache_1_exception; - reg MmuPlugin_ports_0_cache_1_superPage; - reg [9:0] MmuPlugin_ports_0_cache_1_virtualAddress_0; - reg [9:0] MmuPlugin_ports_0_cache_1_virtualAddress_1; - reg [9:0] MmuPlugin_ports_0_cache_1_physicalAddress_0; - reg [9:0] MmuPlugin_ports_0_cache_1_physicalAddress_1; - reg MmuPlugin_ports_0_cache_1_allowRead; - reg MmuPlugin_ports_0_cache_1_allowWrite; - reg MmuPlugin_ports_0_cache_1_allowExecute; - reg MmuPlugin_ports_0_cache_1_allowUser; - reg MmuPlugin_ports_0_cache_2_valid; - reg MmuPlugin_ports_0_cache_2_exception; - reg MmuPlugin_ports_0_cache_2_superPage; - reg [9:0] MmuPlugin_ports_0_cache_2_virtualAddress_0; - reg [9:0] MmuPlugin_ports_0_cache_2_virtualAddress_1; - reg [9:0] MmuPlugin_ports_0_cache_2_physicalAddress_0; - reg [9:0] MmuPlugin_ports_0_cache_2_physicalAddress_1; - reg MmuPlugin_ports_0_cache_2_allowRead; - reg MmuPlugin_ports_0_cache_2_allowWrite; - reg MmuPlugin_ports_0_cache_2_allowExecute; - reg MmuPlugin_ports_0_cache_2_allowUser; - reg MmuPlugin_ports_0_cache_3_valid; - reg MmuPlugin_ports_0_cache_3_exception; - reg MmuPlugin_ports_0_cache_3_superPage; - reg [9:0] MmuPlugin_ports_0_cache_3_virtualAddress_0; - reg [9:0] MmuPlugin_ports_0_cache_3_virtualAddress_1; - reg [9:0] MmuPlugin_ports_0_cache_3_physicalAddress_0; - reg [9:0] MmuPlugin_ports_0_cache_3_physicalAddress_1; - reg MmuPlugin_ports_0_cache_3_allowRead; - reg MmuPlugin_ports_0_cache_3_allowWrite; - reg MmuPlugin_ports_0_cache_3_allowExecute; - reg MmuPlugin_ports_0_cache_3_allowUser; - wire MmuPlugin_ports_0_cacheHits_0; - wire MmuPlugin_ports_0_cacheHits_1; - wire MmuPlugin_ports_0_cacheHits_2; - wire MmuPlugin_ports_0_cacheHits_3; - wire MmuPlugin_ports_0_cacheHit; - wire _zz_137_; - wire _zz_138_; - wire [1:0] _zz_139_; - wire MmuPlugin_ports_0_cacheLine_valid; - wire MmuPlugin_ports_0_cacheLine_exception; - wire MmuPlugin_ports_0_cacheLine_superPage; - wire [9:0] MmuPlugin_ports_0_cacheLine_virtualAddress_0; - wire [9:0] MmuPlugin_ports_0_cacheLine_virtualAddress_1; - wire [9:0] MmuPlugin_ports_0_cacheLine_physicalAddress_0; - wire [9:0] MmuPlugin_ports_0_cacheLine_physicalAddress_1; - wire MmuPlugin_ports_0_cacheLine_allowRead; - wire MmuPlugin_ports_0_cacheLine_allowWrite; - wire MmuPlugin_ports_0_cacheLine_allowExecute; - wire MmuPlugin_ports_0_cacheLine_allowUser; - reg MmuPlugin_ports_0_entryToReplace_willIncrement; - wire MmuPlugin_ports_0_entryToReplace_willClear; - reg [1:0] MmuPlugin_ports_0_entryToReplace_valueNext; - reg [1:0] MmuPlugin_ports_0_entryToReplace_value; - wire MmuPlugin_ports_0_entryToReplace_willOverflowIfInc; - wire MmuPlugin_ports_0_entryToReplace_willOverflow; - reg MmuPlugin_ports_0_requireMmuLockup; - reg MmuPlugin_ports_1_cache_0_valid; - reg MmuPlugin_ports_1_cache_0_exception; - reg MmuPlugin_ports_1_cache_0_superPage; - reg [9:0] MmuPlugin_ports_1_cache_0_virtualAddress_0; - reg [9:0] MmuPlugin_ports_1_cache_0_virtualAddress_1; - reg [9:0] MmuPlugin_ports_1_cache_0_physicalAddress_0; - reg [9:0] MmuPlugin_ports_1_cache_0_physicalAddress_1; - reg MmuPlugin_ports_1_cache_0_allowRead; - reg MmuPlugin_ports_1_cache_0_allowWrite; - reg MmuPlugin_ports_1_cache_0_allowExecute; - reg MmuPlugin_ports_1_cache_0_allowUser; - reg MmuPlugin_ports_1_cache_1_valid; - reg MmuPlugin_ports_1_cache_1_exception; - reg MmuPlugin_ports_1_cache_1_superPage; - reg [9:0] MmuPlugin_ports_1_cache_1_virtualAddress_0; - reg [9:0] MmuPlugin_ports_1_cache_1_virtualAddress_1; - reg [9:0] MmuPlugin_ports_1_cache_1_physicalAddress_0; - reg [9:0] MmuPlugin_ports_1_cache_1_physicalAddress_1; - reg MmuPlugin_ports_1_cache_1_allowRead; - reg MmuPlugin_ports_1_cache_1_allowWrite; - reg MmuPlugin_ports_1_cache_1_allowExecute; - reg MmuPlugin_ports_1_cache_1_allowUser; - reg MmuPlugin_ports_1_cache_2_valid; - reg MmuPlugin_ports_1_cache_2_exception; - reg MmuPlugin_ports_1_cache_2_superPage; - reg [9:0] MmuPlugin_ports_1_cache_2_virtualAddress_0; - reg [9:0] MmuPlugin_ports_1_cache_2_virtualAddress_1; - reg [9:0] MmuPlugin_ports_1_cache_2_physicalAddress_0; - reg [9:0] MmuPlugin_ports_1_cache_2_physicalAddress_1; - reg MmuPlugin_ports_1_cache_2_allowRead; - reg MmuPlugin_ports_1_cache_2_allowWrite; - reg MmuPlugin_ports_1_cache_2_allowExecute; - reg MmuPlugin_ports_1_cache_2_allowUser; - reg MmuPlugin_ports_1_cache_3_valid; - reg MmuPlugin_ports_1_cache_3_exception; - reg MmuPlugin_ports_1_cache_3_superPage; - reg [9:0] MmuPlugin_ports_1_cache_3_virtualAddress_0; - reg [9:0] MmuPlugin_ports_1_cache_3_virtualAddress_1; - reg [9:0] MmuPlugin_ports_1_cache_3_physicalAddress_0; - reg [9:0] MmuPlugin_ports_1_cache_3_physicalAddress_1; - reg MmuPlugin_ports_1_cache_3_allowRead; - reg MmuPlugin_ports_1_cache_3_allowWrite; - reg MmuPlugin_ports_1_cache_3_allowExecute; - reg MmuPlugin_ports_1_cache_3_allowUser; - wire MmuPlugin_ports_1_cacheHits_0; - wire MmuPlugin_ports_1_cacheHits_1; - wire MmuPlugin_ports_1_cacheHits_2; - wire MmuPlugin_ports_1_cacheHits_3; - wire MmuPlugin_ports_1_cacheHit; - wire _zz_140_; - wire _zz_141_; - wire [1:0] _zz_142_; - wire MmuPlugin_ports_1_cacheLine_valid; - wire MmuPlugin_ports_1_cacheLine_exception; - wire MmuPlugin_ports_1_cacheLine_superPage; - wire [9:0] MmuPlugin_ports_1_cacheLine_virtualAddress_0; - wire [9:0] MmuPlugin_ports_1_cacheLine_virtualAddress_1; - wire [9:0] MmuPlugin_ports_1_cacheLine_physicalAddress_0; - wire [9:0] MmuPlugin_ports_1_cacheLine_physicalAddress_1; - wire MmuPlugin_ports_1_cacheLine_allowRead; - wire MmuPlugin_ports_1_cacheLine_allowWrite; - wire MmuPlugin_ports_1_cacheLine_allowExecute; - wire MmuPlugin_ports_1_cacheLine_allowUser; - reg MmuPlugin_ports_1_entryToReplace_willIncrement; - wire MmuPlugin_ports_1_entryToReplace_willClear; - reg [1:0] MmuPlugin_ports_1_entryToReplace_valueNext; - reg [1:0] MmuPlugin_ports_1_entryToReplace_value; - wire MmuPlugin_ports_1_entryToReplace_willOverflowIfInc; - wire MmuPlugin_ports_1_entryToReplace_willOverflow; - reg MmuPlugin_ports_1_requireMmuLockup; - reg `MmuPlugin_shared_State_defaultEncoding_type MmuPlugin_shared_state_1_; - reg [9:0] MmuPlugin_shared_vpn_0; - reg [9:0] MmuPlugin_shared_vpn_1; - reg [0:0] MmuPlugin_shared_portId; - wire MmuPlugin_shared_dBusRsp_pte_V; - wire MmuPlugin_shared_dBusRsp_pte_R; - wire MmuPlugin_shared_dBusRsp_pte_W; - wire MmuPlugin_shared_dBusRsp_pte_X; - wire MmuPlugin_shared_dBusRsp_pte_U; - wire MmuPlugin_shared_dBusRsp_pte_G; - wire MmuPlugin_shared_dBusRsp_pte_A; - wire MmuPlugin_shared_dBusRsp_pte_D; - wire [1:0] MmuPlugin_shared_dBusRsp_pte_RSW; - wire [9:0] MmuPlugin_shared_dBusRsp_pte_PPN0; - wire [11:0] MmuPlugin_shared_dBusRsp_pte_PPN1; - wire MmuPlugin_shared_dBusRsp_exception; - wire MmuPlugin_shared_dBusRsp_leaf; - reg MmuPlugin_shared_pteBuffer_V; - reg MmuPlugin_shared_pteBuffer_R; - reg MmuPlugin_shared_pteBuffer_W; - reg MmuPlugin_shared_pteBuffer_X; - reg MmuPlugin_shared_pteBuffer_U; - reg MmuPlugin_shared_pteBuffer_G; - reg MmuPlugin_shared_pteBuffer_A; - reg MmuPlugin_shared_pteBuffer_D; - reg [1:0] MmuPlugin_shared_pteBuffer_RSW; - reg [9:0] MmuPlugin_shared_pteBuffer_PPN0; - reg [11:0] MmuPlugin_shared_pteBuffer_PPN1; - wire [34:0] _zz_143_; - wire _zz_144_; - wire _zz_145_; - wire _zz_146_; - wire _zz_147_; - wire _zz_148_; - wire _zz_149_; - wire _zz_150_; - wire _zz_151_; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_152_; - wire `AluCtrlEnum_defaultEncoding_type _zz_153_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_154_; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_155_; - wire `BranchCtrlEnum_defaultEncoding_type _zz_156_; - wire `Src2CtrlEnum_defaultEncoding_type _zz_157_; - wire `Src1CtrlEnum_defaultEncoding_type _zz_158_; - wire [4:0] decode_RegFilePlugin_regFileReadAddress1; - wire [4:0] decode_RegFilePlugin_regFileReadAddress2; - wire [31:0] decode_RegFilePlugin_rs1Data; - wire [31:0] decode_RegFilePlugin_rs2Data; - reg lastStageRegFileWrite_valid /* verilator public */ ; - wire [4:0] lastStageRegFileWrite_payload_address /* verilator public */ ; - wire [31:0] lastStageRegFileWrite_payload_data /* verilator public */ ; - reg _zz_159_; - reg [31:0] execute_IntAluPlugin_bitwise; - reg [31:0] _zz_160_; - reg [31:0] _zz_161_; - wire _zz_162_; - reg [19:0] _zz_163_; - wire _zz_164_; - reg [19:0] _zz_165_; - reg [31:0] _zz_166_; - reg [31:0] execute_SrcPlugin_addSub; - wire execute_SrcPlugin_less; - wire [4:0] execute_FullBarrelShifterPlugin_amplitude; - reg [31:0] _zz_167_; - wire [31:0] execute_FullBarrelShifterPlugin_reversed; - reg [31:0] _zz_168_; - reg _zz_169_; - reg _zz_170_; - wire _zz_171_; - reg _zz_172_; - reg [4:0] _zz_173_; - reg [31:0] _zz_174_; - wire _zz_175_; - wire _zz_176_; - wire _zz_177_; - wire _zz_178_; - wire _zz_179_; - wire _zz_180_; - wire execute_BranchPlugin_eq; - wire [2:0] _zz_181_; - reg _zz_182_; - reg _zz_183_; - wire [31:0] execute_BranchPlugin_branch_src1; - wire _zz_184_; - reg [10:0] _zz_185_; - wire _zz_186_; - reg [19:0] _zz_187_; - wire _zz_188_; - reg [18:0] _zz_189_; - reg [31:0] _zz_190_; - wire [31:0] execute_BranchPlugin_branch_src2; - wire [31:0] execute_BranchPlugin_branchAdder; - reg [1:0] _zz_191_; - wire [1:0] CsrPlugin_misa_base; - wire [25:0] CsrPlugin_misa_extensions; - reg [1:0] CsrPlugin_mtvec_mode; - reg [29:0] CsrPlugin_mtvec_base; - reg [31:0] CsrPlugin_mepc; - reg CsrPlugin_mstatus_MIE; - reg CsrPlugin_mstatus_MPIE; - reg [1:0] CsrPlugin_mstatus_MPP; - reg CsrPlugin_mip_MEIP; - reg CsrPlugin_mip_MTIP; - reg CsrPlugin_mip_MSIP; - reg CsrPlugin_mie_MEIE; - reg CsrPlugin_mie_MTIE; - reg CsrPlugin_mie_MSIE; - reg [31:0] CsrPlugin_mscratch; - reg CsrPlugin_mcause_interrupt; - reg [3:0] CsrPlugin_mcause_exceptionCode; - reg [31:0] CsrPlugin_mtval; - reg [63:0] CsrPlugin_mcycle = 64'b0000000000000000000000000000000000000000000000000000000000000000; - reg [63:0] CsrPlugin_minstret = 64'b0000000000000000000000000000000000000000000000000000000000000000; - reg CsrPlugin_medeleg_IAM; - reg CsrPlugin_medeleg_IAF; - reg CsrPlugin_medeleg_II; - reg CsrPlugin_medeleg_LAM; - reg CsrPlugin_medeleg_LAF; - reg CsrPlugin_medeleg_SAM; - reg CsrPlugin_medeleg_SAF; - reg CsrPlugin_medeleg_EU; - reg CsrPlugin_medeleg_ES; - reg CsrPlugin_medeleg_IPF; - reg CsrPlugin_medeleg_LPF; - reg CsrPlugin_medeleg_SPF; - reg CsrPlugin_mideleg_ST; - reg CsrPlugin_mideleg_SE; - reg CsrPlugin_mideleg_SS; - reg CsrPlugin_sstatus_SIE; - reg CsrPlugin_sstatus_SPIE; - reg [0:0] CsrPlugin_sstatus_SPP; - reg CsrPlugin_sip_SEIP_SOFT; - reg CsrPlugin_sip_SEIP_INPUT; - wire CsrPlugin_sip_SEIP_OR; - reg CsrPlugin_sip_STIP; - reg CsrPlugin_sip_SSIP; - reg CsrPlugin_sie_SEIE; - reg CsrPlugin_sie_STIE; - reg CsrPlugin_sie_SSIE; - reg [1:0] CsrPlugin_stvec_mode; - reg [29:0] CsrPlugin_stvec_base; - reg [31:0] CsrPlugin_sscratch; - reg CsrPlugin_scause_interrupt; - reg [3:0] CsrPlugin_scause_exceptionCode; - reg [31:0] CsrPlugin_stval; - reg [31:0] CsrPlugin_sepc; - reg [21:0] CsrPlugin_satp_PPN; - reg [8:0] CsrPlugin_satp_ASID; - reg [0:0] CsrPlugin_satp_MODE; - wire _zz_192_; - wire _zz_193_; - wire _zz_194_; - wire _zz_195_; - wire _zz_196_; - wire _zz_197_; - reg CsrPlugin_exceptionPortCtrl_exceptionValids_decode; - reg CsrPlugin_exceptionPortCtrl_exceptionValids_execute; - reg CsrPlugin_exceptionPortCtrl_exceptionValids_memory; - reg CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack; - reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; - reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; - reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; - reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; - reg [3:0] CsrPlugin_exceptionPortCtrl_exceptionContext_code; - reg [31:0] CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; - reg [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped; - wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; - wire [1:0] _zz_198_; - wire _zz_199_; - reg CsrPlugin_interrupt_valid; - reg [3:0] CsrPlugin_interrupt_code /* verilator public */ ; - reg [1:0] CsrPlugin_interrupt_targetPrivilege; - wire CsrPlugin_exception; - reg CsrPlugin_lastStageWasWfi; - reg CsrPlugin_pipelineLiberator_done; - wire CsrPlugin_interruptJump /* verilator public */ ; - reg CsrPlugin_hadException; - reg [1:0] CsrPlugin_targetPrivilege; - reg [3:0] CsrPlugin_trapCause; - reg [1:0] CsrPlugin_xtvec_mode; - reg [29:0] CsrPlugin_xtvec_base; - reg execute_CsrPlugin_inWfi /* verilator public */ ; - reg execute_CsrPlugin_wfiWake; - wire execute_CsrPlugin_blockedBySideEffects; - reg execute_CsrPlugin_illegalAccess; - reg execute_CsrPlugin_illegalInstruction; - reg [31:0] execute_CsrPlugin_readData; - wire execute_CsrPlugin_writeInstruction; - wire execute_CsrPlugin_readInstruction; - wire execute_CsrPlugin_writeEnable; - wire execute_CsrPlugin_readEnable; - reg [31:0] execute_CsrPlugin_readToWriteData; - reg [31:0] execute_CsrPlugin_writeData; - wire [11:0] execute_CsrPlugin_csrAddress; - reg [32:0] memory_MulDivIterativePlugin_rs1; - reg [31:0] memory_MulDivIterativePlugin_rs2; - reg [64:0] memory_MulDivIterativePlugin_accumulator; - reg memory_MulDivIterativePlugin_mul_counter_willIncrement; - reg memory_MulDivIterativePlugin_mul_counter_willClear; - reg [5:0] memory_MulDivIterativePlugin_mul_counter_valueNext; - reg [5:0] memory_MulDivIterativePlugin_mul_counter_value; - wire memory_MulDivIterativePlugin_mul_willOverflowIfInc; - wire memory_MulDivIterativePlugin_mul_counter_willOverflow; - reg memory_MulDivIterativePlugin_div_needRevert; - reg memory_MulDivIterativePlugin_div_counter_willIncrement; - reg memory_MulDivIterativePlugin_div_counter_willClear; - reg [5:0] memory_MulDivIterativePlugin_div_counter_valueNext; - reg [5:0] memory_MulDivIterativePlugin_div_counter_value; - wire memory_MulDivIterativePlugin_div_counter_willOverflowIfInc; - wire memory_MulDivIterativePlugin_div_counter_willOverflow; - reg memory_MulDivIterativePlugin_div_done; - reg [31:0] memory_MulDivIterativePlugin_div_result; - wire [31:0] _zz_200_; - wire [32:0] _zz_201_; - wire [32:0] _zz_202_; - wire [31:0] _zz_203_; - wire _zz_204_; - wire _zz_205_; - reg [32:0] _zz_206_; - reg [31:0] externalInterruptArray_regNext; - reg [31:0] _zz_207_; - wire [31:0] _zz_208_; - reg [31:0] _zz_209_; - wire [31:0] _zz_210_; - reg execute_to_memory_BRANCH_DO; - reg decode_to_execute_MEMORY_LRSC; - reg [31:0] decode_to_execute_RS2; - reg `ShiftCtrlEnum_defaultEncoding_type decode_to_execute_SHIFT_CTRL; - reg `ShiftCtrlEnum_defaultEncoding_type execute_to_memory_SHIFT_CTRL; - reg [31:0] decode_to_execute_INSTRUCTION; - reg [31:0] execute_to_memory_INSTRUCTION; - reg [31:0] memory_to_writeBack_INSTRUCTION; - reg decode_to_execute_MEMORY_MANAGMENT; - reg decode_to_execute_IS_MUL; - reg execute_to_memory_IS_MUL; - reg decode_to_execute_IS_CSR; - reg [31:0] execute_to_memory_SHIFT_RIGHT; - reg `AluCtrlEnum_defaultEncoding_type decode_to_execute_ALU_CTRL; - reg decode_to_execute_SRC_LESS_UNSIGNED; - reg decode_to_execute_REGFILE_WRITE_VALID; - reg execute_to_memory_REGFILE_WRITE_VALID; - reg memory_to_writeBack_REGFILE_WRITE_VALID; - reg `EnvCtrlEnum_defaultEncoding_type decode_to_execute_ENV_CTRL; - reg `EnvCtrlEnum_defaultEncoding_type execute_to_memory_ENV_CTRL; - reg `EnvCtrlEnum_defaultEncoding_type memory_to_writeBack_ENV_CTRL; - reg [31:0] decode_to_execute_PC; - reg [31:0] execute_to_memory_PC; - reg [31:0] memory_to_writeBack_PC; - reg `Src2CtrlEnum_defaultEncoding_type decode_to_execute_SRC2_CTRL; - reg decode_to_execute_BYPASSABLE_MEMORY_STAGE; - reg execute_to_memory_BYPASSABLE_MEMORY_STAGE; - reg decode_to_execute_SRC_USE_SUB_LESS; - reg decode_to_execute_CSR_READ_OPCODE; - reg decode_to_execute_MEMORY_AMO; - reg [31:0] decode_to_execute_FORMAL_PC_NEXT; - reg [31:0] execute_to_memory_FORMAL_PC_NEXT; - reg [31:0] memory_to_writeBack_FORMAL_PC_NEXT; - reg decode_to_execute_MEMORY_WR; - reg execute_to_memory_MEMORY_WR; - reg memory_to_writeBack_MEMORY_WR; - reg `Src1CtrlEnum_defaultEncoding_type decode_to_execute_SRC1_CTRL; - reg decode_to_execute_IS_RS1_SIGNED; - reg decode_to_execute_IS_DIV; - reg execute_to_memory_IS_DIV; - reg [1:0] execute_to_memory_MEMORY_ADDRESS_LOW; - reg [1:0] memory_to_writeBack_MEMORY_ADDRESS_LOW; - reg `AluBitwiseCtrlEnum_defaultEncoding_type decode_to_execute_ALU_BITWISE_CTRL; - reg execute_to_memory_IS_DBUS_SHARING; - reg memory_to_writeBack_IS_DBUS_SHARING; - reg decode_to_execute_IS_SFENCE_VMA; - reg execute_to_memory_IS_SFENCE_VMA; - reg memory_to_writeBack_IS_SFENCE_VMA; - reg decode_to_execute_MEMORY_ENABLE; - reg execute_to_memory_MEMORY_ENABLE; - reg memory_to_writeBack_MEMORY_ENABLE; - reg [31:0] execute_to_memory_REGFILE_WRITE_DATA; - reg [31:0] memory_to_writeBack_REGFILE_WRITE_DATA; - reg decode_to_execute_CSR_WRITE_OPCODE; - reg `BranchCtrlEnum_defaultEncoding_type decode_to_execute_BRANCH_CTRL; - reg [31:0] decode_to_execute_RS1; - reg [31:0] execute_to_memory_BRANCH_CALC; - reg decode_to_execute_IS_RS2_SIGNED; - reg decode_to_execute_BYPASSABLE_EXECUTE_STAGE; - reg decode_to_execute_SRC2_FORCE_ZERO; - reg [2:0] _zz_211_; - reg _zz_212_; - reg [31:0] iBusWishbone_DAT_MISO_regNext; - reg [2:0] _zz_213_; - wire _zz_214_; - wire _zz_215_; - wire _zz_216_; - wire _zz_217_; - wire _zz_218_; - reg _zz_219_; - reg [31:0] dBusWishbone_DAT_MISO_regNext; - `ifndef SYNTHESIS - reg [31:0] decode_BRANCH_CTRL_string; - reg [31:0] _zz_1__string; - reg [31:0] _zz_2__string; - reg [31:0] _zz_3__string; - reg [39:0] decode_ALU_BITWISE_CTRL_string; - reg [39:0] _zz_4__string; - reg [39:0] _zz_5__string; - reg [39:0] _zz_6__string; - reg [95:0] decode_SRC1_CTRL_string; - reg [95:0] _zz_7__string; - reg [95:0] _zz_8__string; - reg [95:0] _zz_9__string; - reg [23:0] decode_SRC2_CTRL_string; - reg [23:0] _zz_10__string; - reg [23:0] _zz_11__string; - reg [23:0] _zz_12__string; - reg [39:0] _zz_13__string; - reg [39:0] _zz_14__string; - reg [39:0] _zz_15__string; - reg [39:0] _zz_16__string; - reg [39:0] decode_ENV_CTRL_string; - reg [39:0] _zz_17__string; - reg [39:0] _zz_18__string; - reg [39:0] _zz_19__string; - reg [63:0] decode_ALU_CTRL_string; - reg [63:0] _zz_20__string; - reg [63:0] _zz_21__string; - reg [63:0] _zz_22__string; - reg [71:0] _zz_23__string; - reg [71:0] _zz_24__string; - reg [71:0] decode_SHIFT_CTRL_string; - reg [71:0] _zz_25__string; - reg [71:0] _zz_26__string; - reg [71:0] _zz_27__string; - reg [39:0] memory_ENV_CTRL_string; - reg [39:0] _zz_28__string; - reg [39:0] execute_ENV_CTRL_string; - reg [39:0] _zz_29__string; - reg [39:0] writeBack_ENV_CTRL_string; - reg [39:0] _zz_32__string; - reg [31:0] execute_BRANCH_CTRL_string; - reg [31:0] _zz_34__string; - reg [71:0] memory_SHIFT_CTRL_string; - reg [71:0] _zz_38__string; - reg [71:0] execute_SHIFT_CTRL_string; - reg [71:0] _zz_40__string; - reg [23:0] execute_SRC2_CTRL_string; - reg [23:0] _zz_45__string; - reg [95:0] execute_SRC1_CTRL_string; - reg [95:0] _zz_47__string; - reg [63:0] execute_ALU_CTRL_string; - reg [63:0] _zz_50__string; - reg [39:0] execute_ALU_BITWISE_CTRL_string; - reg [39:0] _zz_52__string; - reg [95:0] _zz_62__string; - reg [23:0] _zz_63__string; - reg [31:0] _zz_66__string; - reg [39:0] _zz_70__string; - reg [39:0] _zz_78__string; - reg [63:0] _zz_81__string; - reg [71:0] _zz_82__string; - reg [47:0] MmuPlugin_shared_state_1__string; - reg [71:0] _zz_152__string; - reg [63:0] _zz_153__string; - reg [39:0] _zz_154__string; - reg [39:0] _zz_155__string; - reg [31:0] _zz_156__string; - reg [23:0] _zz_157__string; - reg [95:0] _zz_158__string; - reg [71:0] decode_to_execute_SHIFT_CTRL_string; - reg [71:0] execute_to_memory_SHIFT_CTRL_string; - reg [63:0] decode_to_execute_ALU_CTRL_string; - reg [39:0] decode_to_execute_ENV_CTRL_string; - reg [39:0] execute_to_memory_ENV_CTRL_string; - reg [39:0] memory_to_writeBack_ENV_CTRL_string; - reg [23:0] decode_to_execute_SRC2_CTRL_string; - reg [95:0] decode_to_execute_SRC1_CTRL_string; - reg [39:0] decode_to_execute_ALU_BITWISE_CTRL_string; - reg [31:0] decode_to_execute_BRANCH_CTRL_string; - `endif - - (* ram_style = "block" *) reg [31:0] RegFilePlugin_regFile [0:31] /* verilator public */ ; - assign _zz_271_ = (execute_arbitration_isValid && execute_IS_CSR); - assign _zz_272_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); - assign _zz_273_ = 1'b1; - assign _zz_274_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); - assign _zz_275_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); - assign _zz_276_ = (memory_arbitration_isValid && memory_IS_MUL); - assign _zz_277_ = (memory_arbitration_isValid && memory_IS_DIV); - assign _zz_278_ = ((_zz_225_ && IBusCachedPlugin_cache_io_cpu_decode_error) && (! _zz_89_)); - assign _zz_279_ = ((_zz_225_ && IBusCachedPlugin_cache_io_cpu_decode_cacheMiss) && (! _zz_90_)); - assign _zz_280_ = ((_zz_225_ && IBusCachedPlugin_cache_io_cpu_decode_mmuException) && (! _zz_91_)); - assign _zz_281_ = ((_zz_225_ && IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling) && (! 1'b0)); - assign _zz_282_ = ({decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid} != (2'b00)); - assign _zz_283_ = (execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_WFI)); - assign _zz_284_ = (! memory_MulDivIterativePlugin_mul_willOverflowIfInc); - assign _zz_285_ = (! memory_MulDivIterativePlugin_div_done); - assign _zz_286_ = (CsrPlugin_hadException || CsrPlugin_interruptJump); - assign _zz_287_ = (writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)); - assign _zz_288_ = writeBack_INSTRUCTION[29 : 28]; - assign _zz_289_ = (! IBusCachedPlugin_iBusRsp_readyForError); - assign _zz_290_ = (! ({(writeBack_arbitration_isValid || CsrPlugin_exceptionPendings_3),{(memory_arbitration_isValid || CsrPlugin_exceptionPendings_2),(execute_arbitration_isValid || CsrPlugin_exceptionPendings_1)}} != (3'b000))); - assign _zz_291_ = (! dataCache_1__io_cpu_redo); - assign _zz_292_ = (writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE); - assign _zz_293_ = ((MmuPlugin_dBusAccess_rsp_valid && (! MmuPlugin_dBusAccess_rsp_payload_redo)) && (MmuPlugin_shared_dBusRsp_leaf || MmuPlugin_shared_dBusRsp_exception)); - assign _zz_294_ = (MmuPlugin_shared_portId == (1'b1)); - assign _zz_295_ = (MmuPlugin_shared_portId == (1'b0)); - assign _zz_296_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); - assign _zz_297_ = (1'b0 || (! 1'b1)); - assign _zz_298_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); - assign _zz_299_ = (1'b0 || (! memory_BYPASSABLE_MEMORY_STAGE)); - assign _zz_300_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); - assign _zz_301_ = (1'b0 || (! execute_BYPASSABLE_EXECUTE_STAGE)); - assign _zz_302_ = (execute_CsrPlugin_illegalAccess || execute_CsrPlugin_illegalInstruction); - assign _zz_303_ = (execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_ECALL)); - assign _zz_304_ = (! memory_arbitration_isStuck); - assign _zz_305_ = (iBus_cmd_valid || (_zz_211_ != (3'b000))); - assign _zz_306_ = (_zz_245_ && (! dataCache_1__io_mem_cmd_s2mPipe_ready)); - assign _zz_307_ = (IBusCachedPlugin_mmuBus_cmd_isValid && IBusCachedPlugin_mmuBus_rsp_refilling); - assign _zz_308_ = (DBusCachedPlugin_mmuBus_cmd_isValid && DBusCachedPlugin_mmuBus_rsp_refilling); - assign _zz_309_ = (MmuPlugin_ports_0_entryToReplace_value == (2'b00)); - assign _zz_310_ = (MmuPlugin_ports_0_entryToReplace_value == (2'b01)); - assign _zz_311_ = (MmuPlugin_ports_0_entryToReplace_value == (2'b10)); - assign _zz_312_ = (MmuPlugin_ports_0_entryToReplace_value == (2'b11)); - assign _zz_313_ = (MmuPlugin_ports_1_entryToReplace_value == (2'b00)); - assign _zz_314_ = (MmuPlugin_ports_1_entryToReplace_value == (2'b01)); - assign _zz_315_ = (MmuPlugin_ports_1_entryToReplace_value == (2'b10)); - assign _zz_316_ = (MmuPlugin_ports_1_entryToReplace_value == (2'b11)); - assign _zz_317_ = ((CsrPlugin_sstatus_SIE && (CsrPlugin_privilege == (2'b01))) || (CsrPlugin_privilege < (2'b01))); - assign _zz_318_ = ((_zz_192_ && (1'b1 && CsrPlugin_mideleg_ST)) && (! 1'b0)); - assign _zz_319_ = ((_zz_193_ && (1'b1 && CsrPlugin_mideleg_SS)) && (! 1'b0)); - assign _zz_320_ = ((_zz_194_ && (1'b1 && CsrPlugin_mideleg_SE)) && (! 1'b0)); - assign _zz_321_ = (CsrPlugin_mstatus_MIE || (CsrPlugin_privilege < (2'b11))); - assign _zz_322_ = ((_zz_192_ && 1'b1) && (! (CsrPlugin_mideleg_ST != (1'b0)))); - assign _zz_323_ = ((_zz_193_ && 1'b1) && (! (CsrPlugin_mideleg_SS != (1'b0)))); - assign _zz_324_ = ((_zz_194_ && 1'b1) && (! (CsrPlugin_mideleg_SE != (1'b0)))); - assign _zz_325_ = ((_zz_195_ && 1'b1) && (! 1'b0)); - assign _zz_326_ = ((_zz_196_ && 1'b1) && (! 1'b0)); - assign _zz_327_ = ((_zz_197_ && 1'b1) && (! 1'b0)); - assign _zz_328_ = writeBack_INSTRUCTION[13 : 12]; - assign _zz_329_ = execute_INSTRUCTION[13]; - assign _zz_330_ = (_zz_98_ - (4'b0001)); - assign _zz_331_ = {IBusCachedPlugin_fetchPc_inc,(2'b00)}; - assign _zz_332_ = {29'd0, _zz_331_}; - assign _zz_333_ = (writeBack_MEMORY_WR ? (3'b111) : (3'b101)); - assign _zz_334_ = (writeBack_MEMORY_WR ? (3'b110) : (3'b100)); - assign _zz_335_ = MmuPlugin_ports_0_entryToReplace_willIncrement; - assign _zz_336_ = {1'd0, _zz_335_}; - assign _zz_337_ = MmuPlugin_ports_1_entryToReplace_willIncrement; - assign _zz_338_ = {1'd0, _zz_337_}; - assign _zz_339_ = MmuPlugin_dBusAccess_rsp_payload_data[0 : 0]; - assign _zz_340_ = MmuPlugin_dBusAccess_rsp_payload_data[1 : 1]; - assign _zz_341_ = MmuPlugin_dBusAccess_rsp_payload_data[2 : 2]; - assign _zz_342_ = MmuPlugin_dBusAccess_rsp_payload_data[3 : 3]; - assign _zz_343_ = MmuPlugin_dBusAccess_rsp_payload_data[4 : 4]; - assign _zz_344_ = MmuPlugin_dBusAccess_rsp_payload_data[5 : 5]; - assign _zz_345_ = MmuPlugin_dBusAccess_rsp_payload_data[6 : 6]; - assign _zz_346_ = MmuPlugin_dBusAccess_rsp_payload_data[7 : 7]; - assign _zz_347_ = _zz_143_[0 : 0]; - assign _zz_348_ = _zz_143_[1 : 1]; - assign _zz_349_ = _zz_143_[6 : 6]; - assign _zz_350_ = _zz_143_[7 : 7]; - assign _zz_351_ = _zz_143_[10 : 10]; - assign _zz_352_ = _zz_143_[11 : 11]; - assign _zz_353_ = _zz_143_[12 : 12]; - assign _zz_354_ = _zz_143_[13 : 13]; - assign _zz_355_ = _zz_143_[14 : 14]; - assign _zz_356_ = _zz_143_[16 : 16]; - assign _zz_357_ = _zz_143_[17 : 17]; - assign _zz_358_ = _zz_143_[20 : 20]; - assign _zz_359_ = _zz_143_[21 : 21]; - assign _zz_360_ = _zz_143_[22 : 22]; - assign _zz_361_ = _zz_143_[25 : 25]; - assign _zz_362_ = _zz_143_[26 : 26]; - assign _zz_363_ = _zz_143_[31 : 31]; - assign _zz_364_ = _zz_143_[32 : 32]; - assign _zz_365_ = _zz_143_[33 : 33]; - assign _zz_366_ = _zz_143_[34 : 34]; - assign _zz_367_ = execute_SRC_LESS; - assign _zz_368_ = (3'b100); - assign _zz_369_ = execute_INSTRUCTION[19 : 15]; - assign _zz_370_ = execute_INSTRUCTION[31 : 20]; - assign _zz_371_ = {execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}; - assign _zz_372_ = ($signed(_zz_373_) + $signed(_zz_376_)); - assign _zz_373_ = ($signed(_zz_374_) + $signed(_zz_375_)); - assign _zz_374_ = execute_SRC1; - assign _zz_375_ = (execute_SRC_USE_SUB_LESS ? (~ execute_SRC2) : execute_SRC2); - assign _zz_376_ = (execute_SRC_USE_SUB_LESS ? _zz_377_ : _zz_378_); - assign _zz_377_ = (32'b00000000000000000000000000000001); - assign _zz_378_ = (32'b00000000000000000000000000000000); - assign _zz_379_ = ($signed(_zz_381_) >>> execute_FullBarrelShifterPlugin_amplitude); - assign _zz_380_ = _zz_379_[31 : 0]; - assign _zz_381_ = {((execute_SHIFT_CTRL == `ShiftCtrlEnum_defaultEncoding_SRA_1) && execute_FullBarrelShifterPlugin_reversed[31]),execute_FullBarrelShifterPlugin_reversed}; - assign _zz_382_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}; - assign _zz_383_ = execute_INSTRUCTION[31 : 20]; - assign _zz_384_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}; - assign _zz_385_ = (_zz_198_ & (~ _zz_386_)); - assign _zz_386_ = (_zz_198_ - (2'b01)); - assign _zz_387_ = memory_MulDivIterativePlugin_mul_counter_willIncrement; - assign _zz_388_ = {5'd0, _zz_387_}; - assign _zz_389_ = (_zz_391_ + _zz_393_); - assign _zz_390_ = (memory_MulDivIterativePlugin_rs2[0] ? memory_MulDivIterativePlugin_rs1 : (33'b000000000000000000000000000000000)); - assign _zz_391_ = {{1{_zz_390_[32]}}, _zz_390_}; - assign _zz_392_ = _zz_394_; - assign _zz_393_ = {{1{_zz_392_[32]}}, _zz_392_}; - assign _zz_394_ = (memory_MulDivIterativePlugin_accumulator >>> 32); - assign _zz_395_ = memory_MulDivIterativePlugin_div_counter_willIncrement; - assign _zz_396_ = {5'd0, _zz_395_}; - assign _zz_397_ = {1'd0, memory_MulDivIterativePlugin_rs2}; - assign _zz_398_ = {_zz_200_,(! _zz_202_[32])}; - assign _zz_399_ = _zz_202_[31:0]; - assign _zz_400_ = _zz_201_[31:0]; - assign _zz_401_ = _zz_402_; - assign _zz_402_ = _zz_403_; - assign _zz_403_ = ({1'b0,(memory_MulDivIterativePlugin_div_needRevert ? (~ _zz_203_) : _zz_203_)} + _zz_405_); - assign _zz_404_ = memory_MulDivIterativePlugin_div_needRevert; - assign _zz_405_ = {32'd0, _zz_404_}; - assign _zz_406_ = _zz_205_; - assign _zz_407_ = {32'd0, _zz_406_}; - assign _zz_408_ = _zz_204_; - assign _zz_409_ = {31'd0, _zz_408_}; - assign _zz_410_ = execute_CsrPlugin_writeData[19 : 19]; - assign _zz_411_ = execute_CsrPlugin_writeData[18 : 18]; - assign _zz_412_ = execute_CsrPlugin_writeData[17 : 17]; - assign _zz_413_ = execute_CsrPlugin_writeData[7 : 7]; - assign _zz_414_ = execute_CsrPlugin_writeData[3 : 3]; - assign _zz_415_ = execute_CsrPlugin_writeData[5 : 5]; - assign _zz_416_ = execute_CsrPlugin_writeData[1 : 1]; - assign _zz_417_ = execute_CsrPlugin_writeData[9 : 9]; - assign _zz_418_ = execute_CsrPlugin_writeData[5 : 5]; - assign _zz_419_ = execute_CsrPlugin_writeData[1 : 1]; - assign _zz_420_ = execute_CsrPlugin_writeData[31 : 31]; - assign _zz_421_ = execute_CsrPlugin_writeData[19 : 19]; - assign _zz_422_ = execute_CsrPlugin_writeData[18 : 18]; - assign _zz_423_ = execute_CsrPlugin_writeData[17 : 17]; - assign _zz_424_ = execute_CsrPlugin_writeData[5 : 5]; - assign _zz_425_ = execute_CsrPlugin_writeData[1 : 1]; - assign _zz_426_ = execute_CsrPlugin_writeData[8 : 8]; - assign _zz_427_ = execute_CsrPlugin_writeData[2 : 2]; - assign _zz_428_ = execute_CsrPlugin_writeData[5 : 5]; - assign _zz_429_ = execute_CsrPlugin_writeData[13 : 13]; - assign _zz_430_ = execute_CsrPlugin_writeData[4 : 4]; - assign _zz_431_ = execute_CsrPlugin_writeData[7 : 7]; - assign _zz_432_ = execute_CsrPlugin_writeData[1 : 1]; - assign _zz_433_ = execute_CsrPlugin_writeData[9 : 9]; - assign _zz_434_ = execute_CsrPlugin_writeData[12 : 12]; - assign _zz_435_ = execute_CsrPlugin_writeData[15 : 15]; - assign _zz_436_ = execute_CsrPlugin_writeData[6 : 6]; - assign _zz_437_ = execute_CsrPlugin_writeData[0 : 0]; - assign _zz_438_ = execute_CsrPlugin_writeData[3 : 3]; - assign _zz_439_ = execute_CsrPlugin_writeData[5 : 5]; - assign _zz_440_ = execute_CsrPlugin_writeData[1 : 1]; - assign _zz_441_ = execute_CsrPlugin_writeData[9 : 9]; - assign _zz_442_ = execute_CsrPlugin_writeData[31 : 31]; - assign _zz_443_ = execute_CsrPlugin_writeData[5 : 5]; - assign _zz_444_ = execute_CsrPlugin_writeData[1 : 1]; - assign _zz_445_ = execute_CsrPlugin_writeData[9 : 9]; - assign _zz_446_ = execute_CsrPlugin_writeData[11 : 11]; - assign _zz_447_ = execute_CsrPlugin_writeData[7 : 7]; - assign _zz_448_ = execute_CsrPlugin_writeData[3 : 3]; - assign _zz_449_ = execute_CsrPlugin_writeData[9 : 9]; - assign _zz_450_ = execute_CsrPlugin_writeData[5 : 5]; - assign _zz_451_ = execute_CsrPlugin_writeData[1 : 1]; - assign _zz_452_ = execute_CsrPlugin_writeData[9 : 9]; - assign _zz_453_ = execute_CsrPlugin_writeData[5 : 5]; - assign _zz_454_ = execute_CsrPlugin_writeData[1 : 1]; - assign _zz_455_ = (iBus_cmd_payload_address >>> 5); - assign _zz_456_ = 1'b1; - assign _zz_457_ = 1'b1; - assign _zz_458_ = {_zz_102_,_zz_101_}; - assign _zz_459_ = (32'b00010000000000000000000000001000); - assign _zz_460_ = ((decode_INSTRUCTION & _zz_470_) == (32'b00000000000000000000000000100000)); - assign _zz_461_ = (_zz_471_ == _zz_472_); - assign _zz_462_ = {_zz_473_,_zz_474_}; - assign _zz_463_ = (_zz_475_ == _zz_476_); - assign _zz_464_ = {_zz_477_,_zz_478_}; - assign _zz_465_ = {_zz_479_,{_zz_480_,_zz_481_}}; - assign _zz_466_ = (5'b00000); - assign _zz_467_ = ({_zz_482_,_zz_483_} != (3'b000)); - assign _zz_468_ = (_zz_484_ != _zz_485_); - assign _zz_469_ = {_zz_486_,{_zz_487_,_zz_488_}}; - assign _zz_470_ = (32'b00000000000000000000000000110100); - assign _zz_471_ = (decode_INSTRUCTION & (32'b00000000000000000000000001100100)); - assign _zz_472_ = (32'b00000000000000000000000000100000); - assign _zz_473_ = ((decode_INSTRUCTION & _zz_489_) == (32'b00001000000000000000000000100000)); - assign _zz_474_ = ((decode_INSTRUCTION & _zz_490_) == (32'b00000000000000000000000000100000)); - assign _zz_475_ = (decode_INSTRUCTION & (32'b00000000000000000000000001000100)); - assign _zz_476_ = (32'b00000000000000000000000001000000); - assign _zz_477_ = ((decode_INSTRUCTION & _zz_491_) == (32'b00000000000000000010000000010000)); - assign _zz_478_ = ((decode_INSTRUCTION & _zz_492_) == (32'b01000000000000000000000000110000)); - assign _zz_479_ = ((decode_INSTRUCTION & _zz_493_) == (32'b00000000000000000000000000000000)); - assign _zz_480_ = (_zz_494_ == _zz_495_); - assign _zz_481_ = {_zz_496_,{_zz_497_,_zz_498_}}; - assign _zz_482_ = _zz_145_; - assign _zz_483_ = {_zz_151_,_zz_499_}; - assign _zz_484_ = {_zz_151_,_zz_500_}; - assign _zz_485_ = (2'b00); - assign _zz_486_ = ({_zz_501_,_zz_502_} != (2'b00)); - assign _zz_487_ = (_zz_503_ != _zz_504_); - assign _zz_488_ = {_zz_505_,{_zz_506_,_zz_507_}}; - assign _zz_489_ = (32'b00001000000000000000000001110000); - assign _zz_490_ = (32'b00010000000000000000000001110000); - assign _zz_491_ = (32'b00000000000000000010000000010100); - assign _zz_492_ = (32'b01000000000000000000000000110100); - assign _zz_493_ = (32'b00000000000000000000000001000100); - assign _zz_494_ = (decode_INSTRUCTION & (32'b00000000000000000000000000011000)); - assign _zz_495_ = (32'b00000000000000000000000000000000); - assign _zz_496_ = ((decode_INSTRUCTION & _zz_508_) == (32'b00000000000000000010000000000000)); - assign _zz_497_ = (_zz_509_ == _zz_510_); - assign _zz_498_ = _zz_149_; - assign _zz_499_ = ((decode_INSTRUCTION & _zz_511_) == (32'b00000000000000000000000000000100)); - assign _zz_500_ = ((decode_INSTRUCTION & _zz_512_) == (32'b00000000000000000000000000000100)); - assign _zz_501_ = _zz_150_; - assign _zz_502_ = (_zz_513_ == _zz_514_); - assign _zz_503_ = {_zz_150_,_zz_515_}; - assign _zz_504_ = (2'b00); - assign _zz_505_ = ({_zz_516_,_zz_517_} != (2'b00)); - assign _zz_506_ = (_zz_518_ != _zz_519_); - assign _zz_507_ = {_zz_520_,{_zz_521_,_zz_522_}}; - assign _zz_508_ = (32'b00000000000000000110000000000100); - assign _zz_509_ = (decode_INSTRUCTION & (32'b00000000000000000101000000000100)); - assign _zz_510_ = (32'b00000000000000000001000000000000); - assign _zz_511_ = (32'b00000000000000000010000000010100); - assign _zz_512_ = (32'b00000000000000000000000001001100); - assign _zz_513_ = (decode_INSTRUCTION & (32'b00000000000000000000000001110000)); - assign _zz_514_ = (32'b00000000000000000000000000100000); - assign _zz_515_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000100000)) == (32'b00000000000000000000000000000000)); - assign _zz_516_ = _zz_148_; - assign _zz_517_ = _zz_146_; - assign _zz_518_ = ((decode_INSTRUCTION & (32'b00000010000000000100000001110100)) == (32'b00000010000000000000000000110000)); - assign _zz_519_ = (1'b0); - assign _zz_520_ = ({_zz_145_,(_zz_523_ == _zz_524_)} != (2'b00)); - assign _zz_521_ = ((_zz_525_ == _zz_526_) != (1'b0)); - assign _zz_522_ = {(_zz_527_ != (1'b0)),{(_zz_528_ != _zz_529_),{_zz_530_,{_zz_531_,_zz_532_}}}}; - assign _zz_523_ = (decode_INSTRUCTION & (32'b00000000000000000000000000011100)); - assign _zz_524_ = (32'b00000000000000000000000000000100); - assign _zz_525_ = (decode_INSTRUCTION & (32'b00000000000000000000000001011000)); - assign _zz_526_ = (32'b00000000000000000000000001000000); - assign _zz_527_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001100100)) == (32'b00000000000000000000000000100100)); - assign _zz_528_ = {_zz_149_,((decode_INSTRUCTION & _zz_533_) == (32'b00000000000000000000000000000000))}; - assign _zz_529_ = (2'b00); - assign _zz_530_ = ({(_zz_534_ == _zz_535_),(_zz_536_ == _zz_537_)} != (2'b00)); - assign _zz_531_ = ((_zz_538_ == _zz_539_) != (1'b0)); - assign _zz_532_ = {(_zz_147_ != (1'b0)),{(_zz_540_ != _zz_541_),{_zz_542_,{_zz_543_,_zz_544_}}}}; - assign _zz_533_ = (32'b00000000000000000000000001011000); - assign _zz_534_ = (decode_INSTRUCTION & (32'b00000000000000000001000001010000)); - assign _zz_535_ = (32'b00000000000000000001000001010000); - assign _zz_536_ = (decode_INSTRUCTION & (32'b00000000000000000010000001010000)); - assign _zz_537_ = (32'b00000000000000000010000001010000); - assign _zz_538_ = (decode_INSTRUCTION & (32'b00000000000000000001000000000000)); - assign _zz_539_ = (32'b00000000000000000001000000000000); - assign _zz_540_ = ((decode_INSTRUCTION & (32'b00000010000000000011000001010000)) == (32'b00000010000000000000000001010000)); - assign _zz_541_ = (1'b0); - assign _zz_542_ = ({(_zz_545_ == _zz_546_),(_zz_547_ == _zz_548_)} != (2'b00)); - assign _zz_543_ = ({_zz_549_,{_zz_550_,_zz_551_}} != (6'b000000)); - assign _zz_544_ = {(_zz_552_ != (1'b0)),{(_zz_553_ != _zz_554_),{_zz_555_,{_zz_556_,_zz_557_}}}}; - assign _zz_545_ = (decode_INSTRUCTION & (32'b00000000000000000010000000010000)); - assign _zz_546_ = (32'b00000000000000000010000000000000); - assign _zz_547_ = (decode_INSTRUCTION & (32'b00000000000000000101000000000000)); - assign _zz_548_ = (32'b00000000000000000001000000000000); - assign _zz_549_ = ((decode_INSTRUCTION & _zz_558_) == (32'b00000000000000000010000001000000)); - assign _zz_550_ = (_zz_559_ == _zz_560_); - assign _zz_551_ = {_zz_561_,{_zz_562_,_zz_563_}}; - assign _zz_552_ = ((decode_INSTRUCTION & _zz_564_) == (32'b00010000000000000000000000001000)); - assign _zz_553_ = {_zz_148_,{_zz_565_,_zz_566_}}; - assign _zz_554_ = (3'b000); - assign _zz_555_ = ({_zz_567_,_zz_568_} != (5'b00000)); - assign _zz_556_ = (_zz_569_ != _zz_570_); - assign _zz_557_ = {_zz_571_,{_zz_572_,_zz_573_}}; - assign _zz_558_ = (32'b00000000000000000010000001000000); - assign _zz_559_ = (decode_INSTRUCTION & (32'b00000000000000000001000001000000)); - assign _zz_560_ = (32'b00000000000000000001000001000000); - assign _zz_561_ = ((decode_INSTRUCTION & _zz_574_) == (32'b00000000000000000000000001000000)); - assign _zz_562_ = (_zz_575_ == _zz_576_); - assign _zz_563_ = {_zz_577_,_zz_578_}; - assign _zz_564_ = (32'b00010000000000000000000000001000); - assign _zz_565_ = _zz_147_; - assign _zz_566_ = _zz_146_; - assign _zz_567_ = _zz_144_; - assign _zz_568_ = {_zz_579_,{_zz_580_,_zz_581_}}; - assign _zz_569_ = (_zz_582_ == _zz_583_); - assign _zz_570_ = (1'b0); - assign _zz_571_ = (_zz_584_ != (1'b0)); - assign _zz_572_ = (_zz_585_ != _zz_586_); - assign _zz_573_ = {_zz_587_,{_zz_588_,_zz_589_}}; - assign _zz_574_ = (32'b00000000000000000000000001010000); - assign _zz_575_ = (decode_INSTRUCTION & (32'b00000010010000000000000001000000)); - assign _zz_576_ = (32'b00000000000000000000000001000000); - assign _zz_577_ = ((decode_INSTRUCTION & _zz_590_) == (32'b00000000000000000000000000000000)); - assign _zz_578_ = ((decode_INSTRUCTION & _zz_591_) == (32'b00010000000000000010000000001000)); - assign _zz_579_ = ((decode_INSTRUCTION & _zz_592_) == (32'b00000000000000000010000000010000)); - assign _zz_580_ = (_zz_593_ == _zz_594_); - assign _zz_581_ = {_zz_595_,_zz_596_}; - assign _zz_582_ = (decode_INSTRUCTION & (32'b00000010000000000100000001100100)); - assign _zz_583_ = (32'b00000010000000000100000000100000); - assign _zz_584_ = ((decode_INSTRUCTION & _zz_597_) == (32'b00000000000000000001000000001000)); - assign _zz_585_ = (_zz_598_ == _zz_599_); - assign _zz_586_ = (1'b0); - assign _zz_587_ = (_zz_600_ != (1'b0)); - assign _zz_588_ = (_zz_601_ != _zz_602_); - assign _zz_589_ = {_zz_603_,{_zz_604_,_zz_605_}}; - assign _zz_590_ = (32'b00000000000000000000000000111000); - assign _zz_591_ = (32'b00011000000000000010000000001000); - assign _zz_592_ = (32'b00000000000000000010000000110000); - assign _zz_593_ = (decode_INSTRUCTION & (32'b00000000000000000001000000110000)); - assign _zz_594_ = (32'b00000000000000000000000000010000); - assign _zz_595_ = ((decode_INSTRUCTION & (32'b00000010000000000011000000100000)) == (32'b00000000000000000000000000100000)); - assign _zz_596_ = ((decode_INSTRUCTION & (32'b00000010000000000010000001101000)) == (32'b00000000000000000010000000100000)); - assign _zz_597_ = (32'b00000000000000000101000001001000); - assign _zz_598_ = (decode_INSTRUCTION & (32'b00000010001000000011000001010000)); - assign _zz_599_ = (32'b00000000000000000000000001010000); - assign _zz_600_ = ((decode_INSTRUCTION & (32'b00000010010000000011000001010000)) == (32'b00000000000000000000000001010000)); - assign _zz_601_ = ((decode_INSTRUCTION & _zz_606_) == (32'b00000000000000000000000000010000)); - assign _zz_602_ = (1'b0); - assign _zz_603_ = ({_zz_607_,{_zz_608_,_zz_609_}} != (3'b000)); - assign _zz_604_ = (_zz_610_ != (1'b0)); - assign _zz_605_ = {(_zz_611_ != _zz_612_),{_zz_613_,{_zz_614_,_zz_615_}}}; - assign _zz_606_ = (32'b00000000000000000000000000010000); - assign _zz_607_ = ((decode_INSTRUCTION & (32'b00001000000000000000000000100000)) == (32'b00001000000000000000000000100000)); - assign _zz_608_ = ((decode_INSTRUCTION & _zz_616_) == (32'b00000000000000000000000000100000)); - assign _zz_609_ = ((decode_INSTRUCTION & _zz_617_) == (32'b00000000000000000000000000100000)); - assign _zz_610_ = ((decode_INSTRUCTION & (32'b00000000000000000100000000010100)) == (32'b00000000000000000100000000010000)); - assign _zz_611_ = ((decode_INSTRUCTION & _zz_618_) == (32'b00000000000000000010000000010000)); - assign _zz_612_ = (1'b0); - assign _zz_613_ = ({_zz_619_,_zz_620_} != (2'b00)); - assign _zz_614_ = ({_zz_621_,_zz_622_} != (3'b000)); - assign _zz_615_ = {(_zz_623_ != _zz_624_),(_zz_625_ != _zz_626_)}; - assign _zz_616_ = (32'b00010000000000000000000000100000); - assign _zz_617_ = (32'b00000000000000000000000000101000); - assign _zz_618_ = (32'b00000000000000000110000000010100); - assign _zz_619_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000110100)) == (32'b00000000000000000101000000010000)); - assign _zz_620_ = ((decode_INSTRUCTION & (32'b00000010000000000111000001100100)) == (32'b00000000000000000101000000100000)); - assign _zz_621_ = ((decode_INSTRUCTION & (32'b01000000000000000011000001010100)) == (32'b01000000000000000001000000010000)); - assign _zz_622_ = {((decode_INSTRUCTION & _zz_627_) == (32'b00000000000000000001000000010000)),((decode_INSTRUCTION & _zz_628_) == (32'b00000000000000000001000000010000))}; - assign _zz_623_ = {_zz_145_,{(_zz_629_ == _zz_630_),{_zz_631_,{_zz_632_,_zz_633_}}}}; - assign _zz_624_ = (7'b0000000); - assign _zz_625_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001001000)) == (32'b00000000000000000100000000001000)); - assign _zz_626_ = (1'b0); - assign _zz_627_ = (32'b00000000000000000111000000110100); - assign _zz_628_ = (32'b00000010000000000111000001010100); - assign _zz_629_ = (decode_INSTRUCTION & (32'b00000000000000000001000000010000)); - assign _zz_630_ = (32'b00000000000000000001000000010000); - assign _zz_631_ = ((decode_INSTRUCTION & (32'b00000000000000000010000000010000)) == (32'b00000000000000000010000000010000)); - assign _zz_632_ = ((decode_INSTRUCTION & (32'b00000000000000000010000000001000)) == (32'b00000000000000000010000000001000)); - assign _zz_633_ = {((decode_INSTRUCTION & (32'b00000000000000000000000001010000)) == (32'b00000000000000000000000000010000)),{_zz_144_,((decode_INSTRUCTION & (32'b00000000000000000000000000101000)) == (32'b00000000000000000000000000000000))}}; - assign _zz_634_ = (32'b00000000000000000001000001111111); - assign _zz_635_ = (decode_INSTRUCTION & (32'b00000000000000000010000001111111)); - assign _zz_636_ = (32'b00000000000000000010000001110011); - assign _zz_637_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001111111)) == (32'b00000000000000000100000001100011)); - assign _zz_638_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000010000000010011)); - assign _zz_639_ = {((decode_INSTRUCTION & (32'b00000000000000000110000000111111)) == (32'b00000000000000000000000000100011)),{((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_640_) == (32'b00000000000000000000000000000011)),{(_zz_641_ == _zz_642_),{_zz_643_,{_zz_644_,_zz_645_}}}}}}; - assign _zz_640_ = (32'b00000000000000000101000001011111); - assign _zz_641_ = (decode_INSTRUCTION & (32'b00000000000000000111000001111011)); - assign _zz_642_ = (32'b00000000000000000000000001100011); - assign _zz_643_ = ((decode_INSTRUCTION & (32'b00000000000000000110000001111111)) == (32'b00000000000000000000000000001111)); - assign _zz_644_ = ((decode_INSTRUCTION & (32'b00011000000000000111000001111111)) == (32'b00000000000000000010000000101111)); - assign _zz_645_ = {((decode_INSTRUCTION & (32'b11111100000000000000000001111111)) == (32'b00000000000000000000000000110011)),{((decode_INSTRUCTION & (32'b11101000000000000111000001111111)) == (32'b00001000000000000010000000101111)),{((decode_INSTRUCTION & _zz_646_) == (32'b00000000000000000001000000010011)),{(_zz_647_ == _zz_648_),{_zz_649_,{_zz_650_,_zz_651_}}}}}}; - assign _zz_646_ = (32'b11111100000000000011000001011111); - assign _zz_647_ = (decode_INSTRUCTION & (32'b00000001111100000111000001111111)); - assign _zz_648_ = (32'b00000000000000000101000000001111); - assign _zz_649_ = ((decode_INSTRUCTION & (32'b10111100000000000111000001111111)) == (32'b00000000000000000101000000010011)); - assign _zz_650_ = ((decode_INSTRUCTION & (32'b10111110000000000111000001111111)) == (32'b00000000000000000101000000110011)); - assign _zz_651_ = {((decode_INSTRUCTION & (32'b10111110000000000111000001111111)) == (32'b00000000000000000000000000110011)),{((decode_INSTRUCTION & (32'b11111001111100000111000001111111)) == (32'b00010000000000000010000000101111)),{((decode_INSTRUCTION & _zz_652_) == (32'b00010010000000000000000001110011)),{(_zz_653_ == _zz_654_),{_zz_655_,_zz_656_}}}}}; - assign _zz_652_ = (32'b11111110000000000111111111111111); - assign _zz_653_ = (decode_INSTRUCTION & (32'b11011111111111111111111111111111)); - assign _zz_654_ = (32'b00010000001000000000000001110011); - assign _zz_655_ = ((decode_INSTRUCTION & (32'b11111111111111111111111111111111)) == (32'b00010000010100000000000001110011)); - assign _zz_656_ = ((decode_INSTRUCTION & (32'b11111111111111111111111111111111)) == (32'b00000000000000000000000001110011)); - always @ (posedge clk) begin - if(_zz_55_) begin - RegFilePlugin_regFile[lastStageRegFileWrite_payload_address] <= lastStageRegFileWrite_payload_data; - end - end - - always @ (posedge clk) begin - if(_zz_456_) begin - _zz_246_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress1]; - end - end - - always @ (posedge clk) begin - if(_zz_457_) begin - _zz_247_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress2]; - end - end - - InstructionCache IBusCachedPlugin_cache ( - .io_flush(_zz_220_), - .io_cpu_prefetch_isValid(_zz_221_), - .io_cpu_prefetch_haltIt(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt), - .io_cpu_prefetch_pc(IBusCachedPlugin_iBusRsp_stages_1_input_payload), - .io_cpu_fetch_isValid(_zz_222_), - .io_cpu_fetch_isStuck(_zz_223_), - .io_cpu_fetch_isRemoved(IBusCachedPlugin_fetcherflushIt), - .io_cpu_fetch_pc(IBusCachedPlugin_iBusRsp_stages_2_input_payload), - .io_cpu_fetch_data(IBusCachedPlugin_cache_io_cpu_fetch_data), - .io_cpu_fetch_dataBypassValid(IBusCachedPlugin_s1_tightlyCoupledHit), - .io_cpu_fetch_dataBypass(_zz_224_), - .io_cpu_fetch_mmuBus_cmd_isValid(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid), - .io_cpu_fetch_mmuBus_cmd_virtualAddress(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress), - .io_cpu_fetch_mmuBus_cmd_bypassTranslation(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation), - .io_cpu_fetch_mmuBus_rsp_physicalAddress(IBusCachedPlugin_mmuBus_rsp_physicalAddress), - .io_cpu_fetch_mmuBus_rsp_isIoAccess(IBusCachedPlugin_mmuBus_rsp_isIoAccess), - .io_cpu_fetch_mmuBus_rsp_allowRead(IBusCachedPlugin_mmuBus_rsp_allowRead), - .io_cpu_fetch_mmuBus_rsp_allowWrite(IBusCachedPlugin_mmuBus_rsp_allowWrite), - .io_cpu_fetch_mmuBus_rsp_allowExecute(IBusCachedPlugin_mmuBus_rsp_allowExecute), - .io_cpu_fetch_mmuBus_rsp_exception(IBusCachedPlugin_mmuBus_rsp_exception), - .io_cpu_fetch_mmuBus_rsp_refilling(IBusCachedPlugin_mmuBus_rsp_refilling), - .io_cpu_fetch_mmuBus_end(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end), - .io_cpu_fetch_mmuBus_busy(IBusCachedPlugin_mmuBus_busy), - .io_cpu_fetch_physicalAddress(IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress), - .io_cpu_fetch_haltIt(IBusCachedPlugin_cache_io_cpu_fetch_haltIt), - .io_cpu_decode_isValid(_zz_225_), - .io_cpu_decode_isStuck(_zz_226_), - .io_cpu_decode_pc(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload), - .io_cpu_decode_physicalAddress(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), - .io_cpu_decode_data(IBusCachedPlugin_cache_io_cpu_decode_data), - .io_cpu_decode_cacheMiss(IBusCachedPlugin_cache_io_cpu_decode_cacheMiss), - .io_cpu_decode_error(IBusCachedPlugin_cache_io_cpu_decode_error), - .io_cpu_decode_mmuRefilling(IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling), - .io_cpu_decode_mmuException(IBusCachedPlugin_cache_io_cpu_decode_mmuException), - .io_cpu_decode_isUser(_zz_227_), - .io_cpu_fill_valid(_zz_228_), - .io_cpu_fill_payload(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), - .io_mem_cmd_valid(IBusCachedPlugin_cache_io_mem_cmd_valid), - .io_mem_cmd_ready(iBus_cmd_ready), - .io_mem_cmd_payload_address(IBusCachedPlugin_cache_io_mem_cmd_payload_address), - .io_mem_cmd_payload_size(IBusCachedPlugin_cache_io_mem_cmd_payload_size), - .io_mem_rsp_valid(iBus_rsp_valid), - .io_mem_rsp_payload_data(iBus_rsp_payload_data), - .io_mem_rsp_payload_error(iBus_rsp_payload_error), - .clk(clk), - .reset(reset) - ); - DataCache dataCache_1_ ( - .io_cpu_execute_isValid(_zz_229_), - .io_cpu_execute_address(_zz_230_), - .io_cpu_execute_args_wr(_zz_231_), - .io_cpu_execute_args_data(_zz_232_), - .io_cpu_execute_args_size(_zz_233_), - .io_cpu_execute_args_isLrsc(_zz_234_), - .io_cpu_execute_args_isAmo(_zz_235_), - .io_cpu_execute_args_amoCtrl_swap(_zz_236_), - .io_cpu_execute_args_amoCtrl_alu(_zz_237_), - .io_cpu_memory_isValid(_zz_238_), - .io_cpu_memory_isStuck(memory_arbitration_isStuck), - .io_cpu_memory_isRemoved(memory_arbitration_removeIt), - .io_cpu_memory_isWrite(dataCache_1__io_cpu_memory_isWrite), - .io_cpu_memory_address(_zz_239_), - .io_cpu_memory_mmuBus_cmd_isValid(dataCache_1__io_cpu_memory_mmuBus_cmd_isValid), - .io_cpu_memory_mmuBus_cmd_virtualAddress(dataCache_1__io_cpu_memory_mmuBus_cmd_virtualAddress), - .io_cpu_memory_mmuBus_cmd_bypassTranslation(dataCache_1__io_cpu_memory_mmuBus_cmd_bypassTranslation), - .io_cpu_memory_mmuBus_rsp_physicalAddress(DBusCachedPlugin_mmuBus_rsp_physicalAddress), - .io_cpu_memory_mmuBus_rsp_isIoAccess(_zz_240_), - .io_cpu_memory_mmuBus_rsp_allowRead(DBusCachedPlugin_mmuBus_rsp_allowRead), - .io_cpu_memory_mmuBus_rsp_allowWrite(DBusCachedPlugin_mmuBus_rsp_allowWrite), - .io_cpu_memory_mmuBus_rsp_allowExecute(DBusCachedPlugin_mmuBus_rsp_allowExecute), - .io_cpu_memory_mmuBus_rsp_exception(DBusCachedPlugin_mmuBus_rsp_exception), - .io_cpu_memory_mmuBus_rsp_refilling(DBusCachedPlugin_mmuBus_rsp_refilling), - .io_cpu_memory_mmuBus_end(dataCache_1__io_cpu_memory_mmuBus_end), - .io_cpu_memory_mmuBus_busy(DBusCachedPlugin_mmuBus_busy), - .io_cpu_writeBack_isValid(_zz_241_), - .io_cpu_writeBack_isStuck(writeBack_arbitration_isStuck), - .io_cpu_writeBack_isUser(_zz_242_), - .io_cpu_writeBack_haltIt(dataCache_1__io_cpu_writeBack_haltIt), - .io_cpu_writeBack_isWrite(dataCache_1__io_cpu_writeBack_isWrite), - .io_cpu_writeBack_data(dataCache_1__io_cpu_writeBack_data), - .io_cpu_writeBack_address(_zz_243_), - .io_cpu_writeBack_mmuException(dataCache_1__io_cpu_writeBack_mmuException), - .io_cpu_writeBack_unalignedAccess(dataCache_1__io_cpu_writeBack_unalignedAccess), - .io_cpu_writeBack_accessError(dataCache_1__io_cpu_writeBack_accessError), - .io_cpu_writeBack_clearLrsc(contextSwitching), - .io_cpu_redo(dataCache_1__io_cpu_redo), - .io_cpu_flush_valid(_zz_244_), - .io_cpu_flush_ready(dataCache_1__io_cpu_flush_ready), - .io_mem_cmd_valid(dataCache_1__io_mem_cmd_valid), - .io_mem_cmd_ready(_zz_245_), - .io_mem_cmd_payload_wr(dataCache_1__io_mem_cmd_payload_wr), - .io_mem_cmd_payload_address(dataCache_1__io_mem_cmd_payload_address), - .io_mem_cmd_payload_data(dataCache_1__io_mem_cmd_payload_data), - .io_mem_cmd_payload_mask(dataCache_1__io_mem_cmd_payload_mask), - .io_mem_cmd_payload_length(dataCache_1__io_mem_cmd_payload_length), - .io_mem_cmd_payload_last(dataCache_1__io_mem_cmd_payload_last), - .io_mem_rsp_valid(dBus_rsp_valid), - .io_mem_rsp_payload_data(dBus_rsp_payload_data), - .io_mem_rsp_payload_error(dBus_rsp_payload_error), - .clk(clk), - .reset(reset) - ); - always @(*) begin - case(_zz_458_) - 2'b00 : begin - _zz_248_ = DBusCachedPlugin_redoBranch_payload; - end - 2'b01 : begin - _zz_248_ = CsrPlugin_jumpInterface_payload; - end - 2'b10 : begin - _zz_248_ = BranchPlugin_jumpInterface_payload; - end - default : begin - _zz_248_ = IBusCachedPlugin_redoBranch_payload; - end - endcase - end - - always @(*) begin - case(_zz_139_) - 2'b00 : begin - _zz_249_ = MmuPlugin_ports_0_cache_0_valid; - _zz_250_ = MmuPlugin_ports_0_cache_0_exception; - _zz_251_ = MmuPlugin_ports_0_cache_0_superPage; - _zz_252_ = MmuPlugin_ports_0_cache_0_virtualAddress_0; - _zz_253_ = MmuPlugin_ports_0_cache_0_virtualAddress_1; - _zz_254_ = MmuPlugin_ports_0_cache_0_physicalAddress_0; - _zz_255_ = MmuPlugin_ports_0_cache_0_physicalAddress_1; - _zz_256_ = MmuPlugin_ports_0_cache_0_allowRead; - _zz_257_ = MmuPlugin_ports_0_cache_0_allowWrite; - _zz_258_ = MmuPlugin_ports_0_cache_0_allowExecute; - _zz_259_ = MmuPlugin_ports_0_cache_0_allowUser; - end - 2'b01 : begin - _zz_249_ = MmuPlugin_ports_0_cache_1_valid; - _zz_250_ = MmuPlugin_ports_0_cache_1_exception; - _zz_251_ = MmuPlugin_ports_0_cache_1_superPage; - _zz_252_ = MmuPlugin_ports_0_cache_1_virtualAddress_0; - _zz_253_ = MmuPlugin_ports_0_cache_1_virtualAddress_1; - _zz_254_ = MmuPlugin_ports_0_cache_1_physicalAddress_0; - _zz_255_ = MmuPlugin_ports_0_cache_1_physicalAddress_1; - _zz_256_ = MmuPlugin_ports_0_cache_1_allowRead; - _zz_257_ = MmuPlugin_ports_0_cache_1_allowWrite; - _zz_258_ = MmuPlugin_ports_0_cache_1_allowExecute; - _zz_259_ = MmuPlugin_ports_0_cache_1_allowUser; - end - 2'b10 : begin - _zz_249_ = MmuPlugin_ports_0_cache_2_valid; - _zz_250_ = MmuPlugin_ports_0_cache_2_exception; - _zz_251_ = MmuPlugin_ports_0_cache_2_superPage; - _zz_252_ = MmuPlugin_ports_0_cache_2_virtualAddress_0; - _zz_253_ = MmuPlugin_ports_0_cache_2_virtualAddress_1; - _zz_254_ = MmuPlugin_ports_0_cache_2_physicalAddress_0; - _zz_255_ = MmuPlugin_ports_0_cache_2_physicalAddress_1; - _zz_256_ = MmuPlugin_ports_0_cache_2_allowRead; - _zz_257_ = MmuPlugin_ports_0_cache_2_allowWrite; - _zz_258_ = MmuPlugin_ports_0_cache_2_allowExecute; - _zz_259_ = MmuPlugin_ports_0_cache_2_allowUser; - end - default : begin - _zz_249_ = MmuPlugin_ports_0_cache_3_valid; - _zz_250_ = MmuPlugin_ports_0_cache_3_exception; - _zz_251_ = MmuPlugin_ports_0_cache_3_superPage; - _zz_252_ = MmuPlugin_ports_0_cache_3_virtualAddress_0; - _zz_253_ = MmuPlugin_ports_0_cache_3_virtualAddress_1; - _zz_254_ = MmuPlugin_ports_0_cache_3_physicalAddress_0; - _zz_255_ = MmuPlugin_ports_0_cache_3_physicalAddress_1; - _zz_256_ = MmuPlugin_ports_0_cache_3_allowRead; - _zz_257_ = MmuPlugin_ports_0_cache_3_allowWrite; - _zz_258_ = MmuPlugin_ports_0_cache_3_allowExecute; - _zz_259_ = MmuPlugin_ports_0_cache_3_allowUser; - end - endcase - end - - always @(*) begin - case(_zz_142_) - 2'b00 : begin - _zz_260_ = MmuPlugin_ports_1_cache_0_valid; - _zz_261_ = MmuPlugin_ports_1_cache_0_exception; - _zz_262_ = MmuPlugin_ports_1_cache_0_superPage; - _zz_263_ = MmuPlugin_ports_1_cache_0_virtualAddress_0; - _zz_264_ = MmuPlugin_ports_1_cache_0_virtualAddress_1; - _zz_265_ = MmuPlugin_ports_1_cache_0_physicalAddress_0; - _zz_266_ = MmuPlugin_ports_1_cache_0_physicalAddress_1; - _zz_267_ = MmuPlugin_ports_1_cache_0_allowRead; - _zz_268_ = MmuPlugin_ports_1_cache_0_allowWrite; - _zz_269_ = MmuPlugin_ports_1_cache_0_allowExecute; - _zz_270_ = MmuPlugin_ports_1_cache_0_allowUser; - end - 2'b01 : begin - _zz_260_ = MmuPlugin_ports_1_cache_1_valid; - _zz_261_ = MmuPlugin_ports_1_cache_1_exception; - _zz_262_ = MmuPlugin_ports_1_cache_1_superPage; - _zz_263_ = MmuPlugin_ports_1_cache_1_virtualAddress_0; - _zz_264_ = MmuPlugin_ports_1_cache_1_virtualAddress_1; - _zz_265_ = MmuPlugin_ports_1_cache_1_physicalAddress_0; - _zz_266_ = MmuPlugin_ports_1_cache_1_physicalAddress_1; - _zz_267_ = MmuPlugin_ports_1_cache_1_allowRead; - _zz_268_ = MmuPlugin_ports_1_cache_1_allowWrite; - _zz_269_ = MmuPlugin_ports_1_cache_1_allowExecute; - _zz_270_ = MmuPlugin_ports_1_cache_1_allowUser; - end - 2'b10 : begin - _zz_260_ = MmuPlugin_ports_1_cache_2_valid; - _zz_261_ = MmuPlugin_ports_1_cache_2_exception; - _zz_262_ = MmuPlugin_ports_1_cache_2_superPage; - _zz_263_ = MmuPlugin_ports_1_cache_2_virtualAddress_0; - _zz_264_ = MmuPlugin_ports_1_cache_2_virtualAddress_1; - _zz_265_ = MmuPlugin_ports_1_cache_2_physicalAddress_0; - _zz_266_ = MmuPlugin_ports_1_cache_2_physicalAddress_1; - _zz_267_ = MmuPlugin_ports_1_cache_2_allowRead; - _zz_268_ = MmuPlugin_ports_1_cache_2_allowWrite; - _zz_269_ = MmuPlugin_ports_1_cache_2_allowExecute; - _zz_270_ = MmuPlugin_ports_1_cache_2_allowUser; - end - default : begin - _zz_260_ = MmuPlugin_ports_1_cache_3_valid; - _zz_261_ = MmuPlugin_ports_1_cache_3_exception; - _zz_262_ = MmuPlugin_ports_1_cache_3_superPage; - _zz_263_ = MmuPlugin_ports_1_cache_3_virtualAddress_0; - _zz_264_ = MmuPlugin_ports_1_cache_3_virtualAddress_1; - _zz_265_ = MmuPlugin_ports_1_cache_3_physicalAddress_0; - _zz_266_ = MmuPlugin_ports_1_cache_3_physicalAddress_1; - _zz_267_ = MmuPlugin_ports_1_cache_3_allowRead; - _zz_268_ = MmuPlugin_ports_1_cache_3_allowWrite; - _zz_269_ = MmuPlugin_ports_1_cache_3_allowExecute; - _zz_270_ = MmuPlugin_ports_1_cache_3_allowUser; - end - endcase - end - - `ifndef SYNTHESIS - always @(*) begin - case(decode_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_INC : decode_BRANCH_CTRL_string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : decode_BRANCH_CTRL_string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : decode_BRANCH_CTRL_string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : decode_BRANCH_CTRL_string = "JALR"; - default : decode_BRANCH_CTRL_string = "????"; - endcase - end - always @(*) begin - case(_zz_1_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_1__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_1__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_1__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_1__string = "JALR"; - default : _zz_1__string = "????"; - endcase - end - always @(*) begin - case(_zz_2_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_2__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_2__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_2__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_2__string = "JALR"; - default : _zz_2__string = "????"; - endcase - end - always @(*) begin - case(_zz_3_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_3__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_3__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_3__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_3__string = "JALR"; - default : _zz_3__string = "????"; - endcase - end - always @(*) begin - case(decode_ALU_BITWISE_CTRL) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_ALU_BITWISE_CTRL_string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_ALU_BITWISE_CTRL_string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_ALU_BITWISE_CTRL_string = "AND_1"; - default : decode_ALU_BITWISE_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(_zz_4_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_4__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_4__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_4__string = "AND_1"; - default : _zz_4__string = "?????"; - endcase - end - always @(*) begin - case(_zz_5_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_5__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_5__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_5__string = "AND_1"; - default : _zz_5__string = "?????"; - endcase - end - always @(*) begin - case(_zz_6_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_6__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_6__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_6__string = "AND_1"; - default : _zz_6__string = "?????"; - endcase - end - always @(*) begin - case(decode_SRC1_CTRL) - `Src1CtrlEnum_defaultEncoding_RS : decode_SRC1_CTRL_string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : decode_SRC1_CTRL_string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_SRC1_CTRL_string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : decode_SRC1_CTRL_string = "URS1 "; - default : decode_SRC1_CTRL_string = "????????????"; - endcase - end - always @(*) begin - case(_zz_7_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_7__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_7__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_7__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_7__string = "URS1 "; - default : _zz_7__string = "????????????"; - endcase - end - always @(*) begin - case(_zz_8_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_8__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_8__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_8__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_8__string = "URS1 "; - default : _zz_8__string = "????????????"; - endcase - end - always @(*) begin - case(_zz_9_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_9__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_9__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_9__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_9__string = "URS1 "; - default : _zz_9__string = "????????????"; - endcase - end - always @(*) begin - case(decode_SRC2_CTRL) - `Src2CtrlEnum_defaultEncoding_RS : decode_SRC2_CTRL_string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : decode_SRC2_CTRL_string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : decode_SRC2_CTRL_string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : decode_SRC2_CTRL_string = "PC "; - default : decode_SRC2_CTRL_string = "???"; - endcase - end - always @(*) begin - case(_zz_10_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_10__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_10__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_10__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_10__string = "PC "; - default : _zz_10__string = "???"; - endcase - end - always @(*) begin - case(_zz_11_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_11__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_11__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_11__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_11__string = "PC "; - default : _zz_11__string = "???"; - endcase - end - always @(*) begin - case(_zz_12_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_12__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_12__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_12__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_12__string = "PC "; - default : _zz_12__string = "???"; - endcase - end - always @(*) begin - case(_zz_13_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_13__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_13__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_13__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_13__string = "ECALL"; - default : _zz_13__string = "?????"; - endcase - end - always @(*) begin - case(_zz_14_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_14__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_14__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_14__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_14__string = "ECALL"; - default : _zz_14__string = "?????"; - endcase - end - always @(*) begin - case(_zz_15_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_15__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_15__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_15__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_15__string = "ECALL"; - default : _zz_15__string = "?????"; - endcase - end - always @(*) begin - case(_zz_16_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_16__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_16__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_16__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_16__string = "ECALL"; - default : _zz_16__string = "?????"; - endcase - end - always @(*) begin - case(decode_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : decode_ENV_CTRL_string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : decode_ENV_CTRL_string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : decode_ENV_CTRL_string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : decode_ENV_CTRL_string = "ECALL"; - default : decode_ENV_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(_zz_17_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_17__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_17__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_17__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_17__string = "ECALL"; - default : _zz_17__string = "?????"; - endcase - end - always @(*) begin - case(_zz_18_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_18__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_18__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_18__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_18__string = "ECALL"; - default : _zz_18__string = "?????"; - endcase - end - always @(*) begin - case(_zz_19_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_19__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_19__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_19__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_19__string = "ECALL"; - default : _zz_19__string = "?????"; - endcase - end - always @(*) begin - case(decode_ALU_CTRL) - `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_ALU_CTRL_string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_ALU_CTRL_string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : decode_ALU_CTRL_string = "BITWISE "; - default : decode_ALU_CTRL_string = "????????"; - endcase - end - always @(*) begin - case(_zz_20_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_20__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_20__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_20__string = "BITWISE "; - default : _zz_20__string = "????????"; - endcase - end - always @(*) begin - case(_zz_21_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_21__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_21__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_21__string = "BITWISE "; - default : _zz_21__string = "????????"; - endcase - end - always @(*) begin - case(_zz_22_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_22__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_22__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_22__string = "BITWISE "; - default : _zz_22__string = "????????"; - endcase - end - always @(*) begin - case(_zz_23_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_23__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_23__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_23__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_23__string = "SRA_1 "; - default : _zz_23__string = "?????????"; - endcase - end - always @(*) begin - case(_zz_24_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_24__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_24__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_24__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_24__string = "SRA_1 "; - default : _zz_24__string = "?????????"; - endcase - end - always @(*) begin - case(decode_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_SHIFT_CTRL_string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_SHIFT_CTRL_string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_SHIFT_CTRL_string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_SHIFT_CTRL_string = "SRA_1 "; - default : decode_SHIFT_CTRL_string = "?????????"; - endcase - end - always @(*) begin - case(_zz_25_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_25__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_25__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_25__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_25__string = "SRA_1 "; - default : _zz_25__string = "?????????"; - endcase - end - always @(*) begin - case(_zz_26_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_26__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_26__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_26__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_26__string = "SRA_1 "; - default : _zz_26__string = "?????????"; - endcase - end - always @(*) begin - case(_zz_27_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_27__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_27__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_27__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_27__string = "SRA_1 "; - default : _zz_27__string = "?????????"; - endcase - end - always @(*) begin - case(memory_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : memory_ENV_CTRL_string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : memory_ENV_CTRL_string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : memory_ENV_CTRL_string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : memory_ENV_CTRL_string = "ECALL"; - default : memory_ENV_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(_zz_28_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_28__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_28__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_28__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_28__string = "ECALL"; - default : _zz_28__string = "?????"; - endcase - end - always @(*) begin - case(execute_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : execute_ENV_CTRL_string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : execute_ENV_CTRL_string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : execute_ENV_CTRL_string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : execute_ENV_CTRL_string = "ECALL"; - default : execute_ENV_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(_zz_29_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_29__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_29__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_29__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_29__string = "ECALL"; - default : _zz_29__string = "?????"; - endcase - end - always @(*) begin - case(writeBack_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : writeBack_ENV_CTRL_string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : writeBack_ENV_CTRL_string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : writeBack_ENV_CTRL_string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : writeBack_ENV_CTRL_string = "ECALL"; - default : writeBack_ENV_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(_zz_32_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_32__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_32__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_32__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_32__string = "ECALL"; - default : _zz_32__string = "?????"; - endcase - end - always @(*) begin - case(execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_INC : execute_BRANCH_CTRL_string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : execute_BRANCH_CTRL_string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : execute_BRANCH_CTRL_string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : execute_BRANCH_CTRL_string = "JALR"; - default : execute_BRANCH_CTRL_string = "????"; - endcase - end - always @(*) begin - case(_zz_34_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_34__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_34__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_34__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_34__string = "JALR"; - default : _zz_34__string = "????"; - endcase - end - always @(*) begin - case(memory_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : memory_SHIFT_CTRL_string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : memory_SHIFT_CTRL_string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : memory_SHIFT_CTRL_string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : memory_SHIFT_CTRL_string = "SRA_1 "; - default : memory_SHIFT_CTRL_string = "?????????"; - endcase - end - always @(*) begin - case(_zz_38_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_38__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_38__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_38__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_38__string = "SRA_1 "; - default : _zz_38__string = "?????????"; - endcase - end - always @(*) begin - case(execute_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : execute_SHIFT_CTRL_string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : execute_SHIFT_CTRL_string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : execute_SHIFT_CTRL_string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : execute_SHIFT_CTRL_string = "SRA_1 "; - default : execute_SHIFT_CTRL_string = "?????????"; - endcase - end - always @(*) begin - case(_zz_40_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_40__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_40__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_40__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_40__string = "SRA_1 "; - default : _zz_40__string = "?????????"; - endcase - end - always @(*) begin - case(execute_SRC2_CTRL) - `Src2CtrlEnum_defaultEncoding_RS : execute_SRC2_CTRL_string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : execute_SRC2_CTRL_string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : execute_SRC2_CTRL_string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : execute_SRC2_CTRL_string = "PC "; - default : execute_SRC2_CTRL_string = "???"; - endcase - end - always @(*) begin - case(_zz_45_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_45__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_45__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_45__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_45__string = "PC "; - default : _zz_45__string = "???"; - endcase - end - always @(*) begin - case(execute_SRC1_CTRL) - `Src1CtrlEnum_defaultEncoding_RS : execute_SRC1_CTRL_string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : execute_SRC1_CTRL_string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : execute_SRC1_CTRL_string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : execute_SRC1_CTRL_string = "URS1 "; - default : execute_SRC1_CTRL_string = "????????????"; - endcase - end - always @(*) begin - case(_zz_47_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_47__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_47__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_47__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_47__string = "URS1 "; - default : _zz_47__string = "????????????"; - endcase - end - always @(*) begin - case(execute_ALU_CTRL) - `AluCtrlEnum_defaultEncoding_ADD_SUB : execute_ALU_CTRL_string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : execute_ALU_CTRL_string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : execute_ALU_CTRL_string = "BITWISE "; - default : execute_ALU_CTRL_string = "????????"; - endcase - end - always @(*) begin - case(_zz_50_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_50__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_50__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_50__string = "BITWISE "; - default : _zz_50__string = "????????"; - endcase - end - always @(*) begin - case(execute_ALU_BITWISE_CTRL) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : execute_ALU_BITWISE_CTRL_string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : execute_ALU_BITWISE_CTRL_string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : execute_ALU_BITWISE_CTRL_string = "AND_1"; - default : execute_ALU_BITWISE_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(_zz_52_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_52__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_52__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_52__string = "AND_1"; - default : _zz_52__string = "?????"; - endcase - end - always @(*) begin - case(_zz_62_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_62__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_62__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_62__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_62__string = "URS1 "; - default : _zz_62__string = "????????????"; - endcase - end - always @(*) begin - case(_zz_63_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_63__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_63__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_63__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_63__string = "PC "; - default : _zz_63__string = "???"; - endcase - end - always @(*) begin - case(_zz_66_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_66__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_66__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_66__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_66__string = "JALR"; - default : _zz_66__string = "????"; - endcase - end - always @(*) begin - case(_zz_70_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_70__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_70__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_70__string = "AND_1"; - default : _zz_70__string = "?????"; - endcase - end - always @(*) begin - case(_zz_78_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_78__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_78__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_78__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_78__string = "ECALL"; - default : _zz_78__string = "?????"; - endcase - end - always @(*) begin - case(_zz_81_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_81__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_81__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_81__string = "BITWISE "; - default : _zz_81__string = "????????"; - endcase - end - always @(*) begin - case(_zz_82_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_82__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_82__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_82__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_82__string = "SRA_1 "; - default : _zz_82__string = "?????????"; - endcase - end - always @(*) begin - case(MmuPlugin_shared_state_1_) - `MmuPlugin_shared_State_defaultEncoding_IDLE : MmuPlugin_shared_state_1__string = "IDLE "; - `MmuPlugin_shared_State_defaultEncoding_L1_CMD : MmuPlugin_shared_state_1__string = "L1_CMD"; - `MmuPlugin_shared_State_defaultEncoding_L1_RSP : MmuPlugin_shared_state_1__string = "L1_RSP"; - `MmuPlugin_shared_State_defaultEncoding_L0_CMD : MmuPlugin_shared_state_1__string = "L0_CMD"; - `MmuPlugin_shared_State_defaultEncoding_L0_RSP : MmuPlugin_shared_state_1__string = "L0_RSP"; - default : MmuPlugin_shared_state_1__string = "??????"; - endcase - end - always @(*) begin - case(_zz_152_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_152__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_152__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_152__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_152__string = "SRA_1 "; - default : _zz_152__string = "?????????"; - endcase - end - always @(*) begin - case(_zz_153_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_153__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_153__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_153__string = "BITWISE "; - default : _zz_153__string = "????????"; - endcase - end - always @(*) begin - case(_zz_154_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_154__string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_154__string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : _zz_154__string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : _zz_154__string = "ECALL"; - default : _zz_154__string = "?????"; - endcase - end - always @(*) begin - case(_zz_155_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_155__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_155__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_155__string = "AND_1"; - default : _zz_155__string = "?????"; - endcase - end - always @(*) begin - case(_zz_156_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_156__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_156__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_156__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_156__string = "JALR"; - default : _zz_156__string = "????"; - endcase - end - always @(*) begin - case(_zz_157_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_157__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_157__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_157__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_157__string = "PC "; - default : _zz_157__string = "???"; - endcase - end - always @(*) begin - case(_zz_158_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_158__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_158__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_158__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_158__string = "URS1 "; - default : _zz_158__string = "????????????"; - endcase - end - always @(*) begin - case(decode_to_execute_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_to_execute_SHIFT_CTRL_string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_to_execute_SHIFT_CTRL_string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_to_execute_SHIFT_CTRL_string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_to_execute_SHIFT_CTRL_string = "SRA_1 "; - default : decode_to_execute_SHIFT_CTRL_string = "?????????"; - endcase - end - always @(*) begin - case(execute_to_memory_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : execute_to_memory_SHIFT_CTRL_string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : execute_to_memory_SHIFT_CTRL_string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : execute_to_memory_SHIFT_CTRL_string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : execute_to_memory_SHIFT_CTRL_string = "SRA_1 "; - default : execute_to_memory_SHIFT_CTRL_string = "?????????"; - endcase - end - always @(*) begin - case(decode_to_execute_ALU_CTRL) - `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_to_execute_ALU_CTRL_string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_to_execute_ALU_CTRL_string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : decode_to_execute_ALU_CTRL_string = "BITWISE "; - default : decode_to_execute_ALU_CTRL_string = "????????"; - endcase - end - always @(*) begin - case(decode_to_execute_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : decode_to_execute_ENV_CTRL_string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : decode_to_execute_ENV_CTRL_string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : decode_to_execute_ENV_CTRL_string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : decode_to_execute_ENV_CTRL_string = "ECALL"; - default : decode_to_execute_ENV_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(execute_to_memory_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : execute_to_memory_ENV_CTRL_string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : execute_to_memory_ENV_CTRL_string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : execute_to_memory_ENV_CTRL_string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : execute_to_memory_ENV_CTRL_string = "ECALL"; - default : execute_to_memory_ENV_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(memory_to_writeBack_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : memory_to_writeBack_ENV_CTRL_string = "NONE "; - `EnvCtrlEnum_defaultEncoding_XRET : memory_to_writeBack_ENV_CTRL_string = "XRET "; - `EnvCtrlEnum_defaultEncoding_WFI : memory_to_writeBack_ENV_CTRL_string = "WFI "; - `EnvCtrlEnum_defaultEncoding_ECALL : memory_to_writeBack_ENV_CTRL_string = "ECALL"; - default : memory_to_writeBack_ENV_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(decode_to_execute_SRC2_CTRL) - `Src2CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC2_CTRL_string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : decode_to_execute_SRC2_CTRL_string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : decode_to_execute_SRC2_CTRL_string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : decode_to_execute_SRC2_CTRL_string = "PC "; - default : decode_to_execute_SRC2_CTRL_string = "???"; - endcase - end - always @(*) begin - case(decode_to_execute_SRC1_CTRL) - `Src1CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC1_CTRL_string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : decode_to_execute_SRC1_CTRL_string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_to_execute_SRC1_CTRL_string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : decode_to_execute_SRC1_CTRL_string = "URS1 "; - default : decode_to_execute_SRC1_CTRL_string = "????????????"; - endcase - end - always @(*) begin - case(decode_to_execute_ALU_BITWISE_CTRL) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "AND_1"; - default : decode_to_execute_ALU_BITWISE_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(decode_to_execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_INC : decode_to_execute_BRANCH_CTRL_string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : decode_to_execute_BRANCH_CTRL_string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : decode_to_execute_BRANCH_CTRL_string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : decode_to_execute_BRANCH_CTRL_string = "JALR"; - default : decode_to_execute_BRANCH_CTRL_string = "????"; - endcase - end - `endif - - assign decode_SRC2_FORCE_ZERO = _zz_49_; - assign decode_BYPASSABLE_EXECUTE_STAGE = _zz_75_; - assign decode_IS_RS2_SIGNED = _zz_64_; - assign execute_BRANCH_CALC = _zz_33_; - assign decode_BRANCH_CTRL = _zz_1_; - assign _zz_2_ = _zz_3_; - assign decode_CSR_WRITE_OPCODE = _zz_31_; - assign execute_REGFILE_WRITE_DATA = _zz_51_; - assign memory_IS_SFENCE_VMA = execute_to_memory_IS_SFENCE_VMA; - assign execute_IS_SFENCE_VMA = decode_to_execute_IS_SFENCE_VMA; - assign decode_IS_SFENCE_VMA = _zz_71_; - assign execute_IS_DBUS_SHARING = _zz_86_; - assign decode_ALU_BITWISE_CTRL = _zz_4_; - assign _zz_5_ = _zz_6_; - assign memory_MEMORY_ADDRESS_LOW = execute_to_memory_MEMORY_ADDRESS_LOW; - assign execute_MEMORY_ADDRESS_LOW = _zz_88_; - assign decode_IS_DIV = _zz_76_; - assign decode_IS_RS1_SIGNED = _zz_74_; - assign decode_SRC1_CTRL = _zz_7_; - assign _zz_8_ = _zz_9_; - assign memory_MEMORY_WR = execute_to_memory_MEMORY_WR; - assign decode_MEMORY_WR = _zz_80_; - assign writeBack_FORMAL_PC_NEXT = memory_to_writeBack_FORMAL_PC_NEXT; - assign memory_FORMAL_PC_NEXT = execute_to_memory_FORMAL_PC_NEXT; - assign execute_FORMAL_PC_NEXT = decode_to_execute_FORMAL_PC_NEXT; - assign decode_FORMAL_PC_NEXT = _zz_95_; - assign decode_MEMORY_AMO = _zz_58_; - assign decode_CSR_READ_OPCODE = _zz_30_; - assign execute_BYPASSABLE_MEMORY_STAGE = decode_to_execute_BYPASSABLE_MEMORY_STAGE; - assign decode_BYPASSABLE_MEMORY_STAGE = _zz_79_; - assign decode_SRC2_CTRL = _zz_10_; - assign _zz_11_ = _zz_12_; - assign memory_PC = execute_to_memory_PC; - assign _zz_13_ = _zz_14_; - assign _zz_15_ = _zz_16_; - assign decode_ENV_CTRL = _zz_17_; - assign _zz_18_ = _zz_19_; - assign decode_SRC_LESS_UNSIGNED = _zz_72_; - assign decode_ALU_CTRL = _zz_20_; - assign _zz_21_ = _zz_22_; - assign execute_SHIFT_RIGHT = _zz_39_; - assign decode_IS_CSR = _zz_69_; - assign decode_IS_MUL = _zz_65_; - assign decode_MEMORY_MANAGMENT = _zz_84_; - assign _zz_23_ = _zz_24_; - assign decode_SHIFT_CTRL = _zz_25_; - assign _zz_26_ = _zz_27_; - assign decode_MEMORY_LRSC = _zz_73_; - assign execute_BRANCH_DO = _zz_35_; - assign execute_IS_RS1_SIGNED = decode_to_execute_IS_RS1_SIGNED; - assign execute_IS_DIV = decode_to_execute_IS_DIV; - assign execute_IS_MUL = decode_to_execute_IS_MUL; - assign execute_IS_RS2_SIGNED = decode_to_execute_IS_RS2_SIGNED; - assign memory_IS_DIV = execute_to_memory_IS_DIV; - assign memory_IS_MUL = execute_to_memory_IS_MUL; - assign execute_CSR_READ_OPCODE = decode_to_execute_CSR_READ_OPCODE; - assign execute_CSR_WRITE_OPCODE = decode_to_execute_CSR_WRITE_OPCODE; - assign execute_IS_CSR = decode_to_execute_IS_CSR; - assign memory_ENV_CTRL = _zz_28_; - assign execute_ENV_CTRL = _zz_29_; - assign writeBack_ENV_CTRL = _zz_32_; - assign memory_BRANCH_CALC = execute_to_memory_BRANCH_CALC; - assign memory_BRANCH_DO = execute_to_memory_BRANCH_DO; - assign execute_PC = decode_to_execute_PC; - assign execute_RS1 = decode_to_execute_RS1; - assign execute_BRANCH_CTRL = _zz_34_; - assign decode_RS2_USE = _zz_59_; - assign decode_RS1_USE = _zz_61_; - always @ (*) begin - _zz_36_ = execute_REGFILE_WRITE_DATA; - if(_zz_271_)begin - _zz_36_ = execute_CsrPlugin_readData; - end - if(DBusCachedPlugin_forceDatapath)begin - _zz_36_ = MmuPlugin_dBusAccess_cmd_payload_address; - end - end - - assign execute_REGFILE_WRITE_VALID = decode_to_execute_REGFILE_WRITE_VALID; - assign execute_BYPASSABLE_EXECUTE_STAGE = decode_to_execute_BYPASSABLE_EXECUTE_STAGE; - assign memory_REGFILE_WRITE_VALID = execute_to_memory_REGFILE_WRITE_VALID; - assign memory_INSTRUCTION = execute_to_memory_INSTRUCTION; - assign memory_BYPASSABLE_MEMORY_STAGE = execute_to_memory_BYPASSABLE_MEMORY_STAGE; - assign writeBack_REGFILE_WRITE_VALID = memory_to_writeBack_REGFILE_WRITE_VALID; - always @ (*) begin - decode_RS2 = _zz_56_; - if(_zz_172_)begin - if((_zz_173_ == decode_INSTRUCTION[24 : 20]))begin - decode_RS2 = _zz_174_; - end - end - if(_zz_272_)begin - if(_zz_273_)begin - if(_zz_176_)begin - decode_RS2 = _zz_87_; - end - end - end - if(_zz_274_)begin - if(memory_BYPASSABLE_MEMORY_STAGE)begin - if(_zz_178_)begin - decode_RS2 = _zz_37_; - end - end - end - if(_zz_275_)begin - if(execute_BYPASSABLE_EXECUTE_STAGE)begin - if(_zz_180_)begin - decode_RS2 = _zz_36_; - end - end - end - end - - always @ (*) begin - decode_RS1 = _zz_57_; - if(_zz_172_)begin - if((_zz_173_ == decode_INSTRUCTION[19 : 15]))begin - decode_RS1 = _zz_174_; - end - end - if(_zz_272_)begin - if(_zz_273_)begin - if(_zz_175_)begin - decode_RS1 = _zz_87_; - end - end - end - if(_zz_274_)begin - if(memory_BYPASSABLE_MEMORY_STAGE)begin - if(_zz_177_)begin - decode_RS1 = _zz_37_; - end - end - end - if(_zz_275_)begin - if(execute_BYPASSABLE_EXECUTE_STAGE)begin - if(_zz_179_)begin - decode_RS1 = _zz_36_; - end - end - end - end - - assign memory_SHIFT_RIGHT = execute_to_memory_SHIFT_RIGHT; - always @ (*) begin - _zz_37_ = memory_REGFILE_WRITE_DATA; - if(memory_arbitration_isValid)begin - case(memory_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_SLL_1 : begin - _zz_37_ = _zz_168_; - end - `ShiftCtrlEnum_defaultEncoding_SRL_1, `ShiftCtrlEnum_defaultEncoding_SRA_1 : begin - _zz_37_ = memory_SHIFT_RIGHT; - end - default : begin - end - endcase - end - if(_zz_276_)begin - _zz_37_ = ((memory_INSTRUCTION[13 : 12] == (2'b00)) ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_accumulator[63 : 32]); - end - if(_zz_277_)begin - _zz_37_ = memory_MulDivIterativePlugin_div_result; - end - end - - assign memory_SHIFT_CTRL = _zz_38_; - assign execute_SHIFT_CTRL = _zz_40_; - assign execute_SRC_LESS_UNSIGNED = decode_to_execute_SRC_LESS_UNSIGNED; - assign execute_SRC2_FORCE_ZERO = decode_to_execute_SRC2_FORCE_ZERO; - assign execute_SRC_USE_SUB_LESS = decode_to_execute_SRC_USE_SUB_LESS; - assign _zz_44_ = execute_PC; - assign execute_SRC2_CTRL = _zz_45_; - assign execute_SRC1_CTRL = _zz_47_; - assign decode_SRC_USE_SUB_LESS = _zz_60_; - assign decode_SRC_ADD_ZERO = _zz_67_; - assign execute_SRC_ADD_SUB = _zz_43_; - assign execute_SRC_LESS = _zz_41_; - assign execute_ALU_CTRL = _zz_50_; - assign execute_SRC2 = _zz_46_; - assign execute_SRC1 = _zz_48_; - assign execute_ALU_BITWISE_CTRL = _zz_52_; - assign _zz_53_ = writeBack_INSTRUCTION; - assign _zz_54_ = writeBack_REGFILE_WRITE_VALID; - always @ (*) begin - _zz_55_ = 1'b0; - if(lastStageRegFileWrite_valid)begin - _zz_55_ = 1'b1; - end - end - - assign decode_INSTRUCTION_ANTICIPATED = _zz_92_; - always @ (*) begin - decode_REGFILE_WRITE_VALID = _zz_83_; - if((decode_INSTRUCTION[11 : 7] == (5'b00000)))begin - decode_REGFILE_WRITE_VALID = 1'b0; - end - end - - assign decode_LEGAL_INSTRUCTION = _zz_85_; - assign decode_INSTRUCTION_READY = 1'b1; - assign writeBack_IS_SFENCE_VMA = memory_to_writeBack_IS_SFENCE_VMA; - assign writeBack_IS_DBUS_SHARING = memory_to_writeBack_IS_DBUS_SHARING; - assign memory_IS_DBUS_SHARING = execute_to_memory_IS_DBUS_SHARING; - always @ (*) begin - _zz_87_ = writeBack_REGFILE_WRITE_DATA; - if((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE))begin - _zz_87_ = writeBack_DBusCachedPlugin_rspFormated; - end - end - - assign writeBack_MEMORY_ADDRESS_LOW = memory_to_writeBack_MEMORY_ADDRESS_LOW; - assign writeBack_MEMORY_WR = memory_to_writeBack_MEMORY_WR; - assign writeBack_REGFILE_WRITE_DATA = memory_to_writeBack_REGFILE_WRITE_DATA; - assign writeBack_MEMORY_ENABLE = memory_to_writeBack_MEMORY_ENABLE; - assign memory_REGFILE_WRITE_DATA = execute_to_memory_REGFILE_WRITE_DATA; - assign memory_MEMORY_ENABLE = execute_to_memory_MEMORY_ENABLE; - assign execute_MEMORY_AMO = decode_to_execute_MEMORY_AMO; - assign execute_MEMORY_LRSC = decode_to_execute_MEMORY_LRSC; - assign execute_MEMORY_MANAGMENT = decode_to_execute_MEMORY_MANAGMENT; - assign execute_RS2 = decode_to_execute_RS2; - assign execute_MEMORY_WR = decode_to_execute_MEMORY_WR; - assign execute_SRC_ADD = _zz_42_; - assign execute_MEMORY_ENABLE = decode_to_execute_MEMORY_ENABLE; - assign execute_INSTRUCTION = decode_to_execute_INSTRUCTION; - assign decode_MEMORY_ENABLE = _zz_68_; - assign decode_FLUSH_ALL = _zz_77_; - always @ (*) begin - IBusCachedPlugin_rsp_issueDetected = _zz_89_; - if(_zz_278_)begin - IBusCachedPlugin_rsp_issueDetected = 1'b1; - end - end - - always @ (*) begin - _zz_89_ = _zz_90_; - if(_zz_279_)begin - _zz_89_ = 1'b1; - end - end - - always @ (*) begin - _zz_90_ = _zz_91_; - if(_zz_280_)begin - _zz_90_ = 1'b1; - end - end - - always @ (*) begin - _zz_91_ = 1'b0; - if(_zz_281_)begin - _zz_91_ = 1'b1; - end - end - - assign decode_INSTRUCTION = _zz_96_; - always @ (*) begin - _zz_93_ = memory_FORMAL_PC_NEXT; - if(BranchPlugin_jumpInterface_valid)begin - _zz_93_ = BranchPlugin_jumpInterface_payload; - end - end - - always @ (*) begin - _zz_94_ = decode_FORMAL_PC_NEXT; - if(IBusCachedPlugin_redoBranch_valid)begin - _zz_94_ = IBusCachedPlugin_redoBranch_payload; - end - end - - assign decode_PC = _zz_97_; - assign writeBack_PC = memory_to_writeBack_PC; - assign writeBack_INSTRUCTION = memory_to_writeBack_INSTRUCTION; - always @ (*) begin - decode_arbitration_haltItself = 1'b0; - if(((DBusCachedPlugin_mmuBus_busy && decode_arbitration_isValid) && decode_MEMORY_ENABLE))begin - decode_arbitration_haltItself = 1'b1; - end - end - - always @ (*) begin - decode_arbitration_haltByOther = 1'b0; - if(MmuPlugin_dBusAccess_cmd_valid)begin - decode_arbitration_haltByOther = 1'b1; - end - if((decode_arbitration_isValid && (_zz_169_ || _zz_170_)))begin - decode_arbitration_haltByOther = 1'b1; - end - if((CsrPlugin_interrupt_valid && CsrPlugin_allowInterrupts))begin - decode_arbitration_haltByOther = decode_arbitration_isValid; - end - if(({(writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),{(memory_arbitration_isValid && (memory_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),(execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET))}} != (3'b000)))begin - decode_arbitration_haltByOther = 1'b1; - end - end - - always @ (*) begin - decode_arbitration_removeIt = 1'b0; - if(_zz_282_)begin - decode_arbitration_removeIt = 1'b1; - end - if(decode_arbitration_isFlushed)begin - decode_arbitration_removeIt = 1'b1; - end - end - - assign decode_arbitration_flushIt = 1'b0; - always @ (*) begin - decode_arbitration_flushNext = 1'b0; - if(IBusCachedPlugin_redoBranch_valid)begin - decode_arbitration_flushNext = 1'b1; - end - if(_zz_282_)begin - decode_arbitration_flushNext = 1'b1; - end - end - - always @ (*) begin - execute_arbitration_haltItself = 1'b0; - if((_zz_244_ && (! dataCache_1__io_cpu_flush_ready)))begin - execute_arbitration_haltItself = 1'b1; - end - if(((dataCache_1__io_cpu_redo && execute_arbitration_isValid) && execute_MEMORY_ENABLE))begin - execute_arbitration_haltItself = 1'b1; - end - if(_zz_283_)begin - if((! execute_CsrPlugin_wfiWake))begin - execute_arbitration_haltItself = 1'b1; - end - end - if(_zz_271_)begin - if(execute_CsrPlugin_blockedBySideEffects)begin - execute_arbitration_haltItself = 1'b1; - end - end - end - - assign execute_arbitration_haltByOther = 1'b0; - always @ (*) begin - execute_arbitration_removeIt = 1'b0; - if(CsrPlugin_selfException_valid)begin - execute_arbitration_removeIt = 1'b1; - end - if(execute_arbitration_isFlushed)begin - execute_arbitration_removeIt = 1'b1; - end - end - - assign execute_arbitration_flushIt = 1'b0; - always @ (*) begin - execute_arbitration_flushNext = 1'b0; - if(CsrPlugin_selfException_valid)begin - execute_arbitration_flushNext = 1'b1; - end - end - - always @ (*) begin - memory_arbitration_haltItself = 1'b0; - if(_zz_276_)begin - if(_zz_284_)begin - memory_arbitration_haltItself = 1'b1; - end - end - if(_zz_277_)begin - if(_zz_285_)begin - memory_arbitration_haltItself = 1'b1; - end - end - end - - assign memory_arbitration_haltByOther = 1'b0; - always @ (*) begin - memory_arbitration_removeIt = 1'b0; - if(BranchPlugin_branchExceptionPort_valid)begin - memory_arbitration_removeIt = 1'b1; - end - if(memory_arbitration_isFlushed)begin - memory_arbitration_removeIt = 1'b1; - end - end - - assign memory_arbitration_flushIt = 1'b0; - always @ (*) begin - memory_arbitration_flushNext = 1'b0; - if(BranchPlugin_jumpInterface_valid)begin - memory_arbitration_flushNext = 1'b1; - end - if(BranchPlugin_branchExceptionPort_valid)begin - memory_arbitration_flushNext = 1'b1; - end - end - - always @ (*) begin - writeBack_arbitration_haltItself = 1'b0; - if(dataCache_1__io_cpu_writeBack_haltIt)begin - writeBack_arbitration_haltItself = 1'b1; - end - end - - assign writeBack_arbitration_haltByOther = 1'b0; - always @ (*) begin - writeBack_arbitration_removeIt = 1'b0; - if(DBusCachedPlugin_exceptionBus_valid)begin - writeBack_arbitration_removeIt = 1'b1; - end - if(writeBack_arbitration_isFlushed)begin - writeBack_arbitration_removeIt = 1'b1; - end - end - - always @ (*) begin - writeBack_arbitration_flushIt = 1'b0; - if(DBusCachedPlugin_redoBranch_valid)begin - writeBack_arbitration_flushIt = 1'b1; - end - end - - always @ (*) begin - writeBack_arbitration_flushNext = 1'b0; - if(DBusCachedPlugin_redoBranch_valid)begin - writeBack_arbitration_flushNext = 1'b1; - end - if(DBusCachedPlugin_exceptionBus_valid)begin - writeBack_arbitration_flushNext = 1'b1; - end - if(_zz_286_)begin - writeBack_arbitration_flushNext = 1'b1; - end - if(_zz_287_)begin - writeBack_arbitration_flushNext = 1'b1; - end - end - - assign lastStageInstruction = writeBack_INSTRUCTION; - assign lastStagePc = writeBack_PC; - assign lastStageIsValid = writeBack_arbitration_isValid; - assign lastStageIsFiring = writeBack_arbitration_isFiring; - always @ (*) begin - IBusCachedPlugin_fetcherHalt = 1'b0; - if(({CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValids_memory,{CsrPlugin_exceptionPortCtrl_exceptionValids_execute,CsrPlugin_exceptionPortCtrl_exceptionValids_decode}}} != (4'b0000)))begin - IBusCachedPlugin_fetcherHalt = 1'b1; - end - if(_zz_286_)begin - IBusCachedPlugin_fetcherHalt = 1'b1; - end - if(_zz_287_)begin - IBusCachedPlugin_fetcherHalt = 1'b1; - end - end - - always @ (*) begin - IBusCachedPlugin_fetcherflushIt = 1'b0; - if(({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,{execute_arbitration_flushNext,decode_arbitration_flushNext}}} != (4'b0000)))begin - IBusCachedPlugin_fetcherflushIt = 1'b1; - end - end - - always @ (*) begin - IBusCachedPlugin_incomingInstruction = 1'b0; - if(((IBusCachedPlugin_iBusRsp_stages_1_input_valid || IBusCachedPlugin_iBusRsp_stages_2_input_valid) || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid))begin - IBusCachedPlugin_incomingInstruction = 1'b1; - end - end - - always @ (*) begin - CsrPlugin_jumpInterface_valid = 1'b0; - if(_zz_286_)begin - CsrPlugin_jumpInterface_valid = 1'b1; - end - if(_zz_287_)begin - CsrPlugin_jumpInterface_valid = 1'b1; - end - end - - always @ (*) begin - CsrPlugin_jumpInterface_payload = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - if(_zz_286_)begin - CsrPlugin_jumpInterface_payload = {CsrPlugin_xtvec_base,(2'b00)}; - end - if(_zz_287_)begin - case(_zz_288_) - 2'b11 : begin - CsrPlugin_jumpInterface_payload = CsrPlugin_mepc; - end - 2'b01 : begin - CsrPlugin_jumpInterface_payload = CsrPlugin_sepc; - end - default : begin - end - endcase - end - end - - assign CsrPlugin_forceMachineWire = 1'b0; - assign CsrPlugin_allowInterrupts = 1'b1; - assign CsrPlugin_allowException = 1'b1; - assign IBusCachedPlugin_jump_pcLoad_valid = ({CsrPlugin_jumpInterface_valid,{BranchPlugin_jumpInterface_valid,{DBusCachedPlugin_redoBranch_valid,IBusCachedPlugin_redoBranch_valid}}} != (4'b0000)); - assign _zz_98_ = {IBusCachedPlugin_redoBranch_valid,{BranchPlugin_jumpInterface_valid,{CsrPlugin_jumpInterface_valid,DBusCachedPlugin_redoBranch_valid}}}; - assign _zz_99_ = (_zz_98_ & (~ _zz_330_)); - assign _zz_100_ = _zz_99_[3]; - assign _zz_101_ = (_zz_99_[1] || _zz_100_); - assign _zz_102_ = (_zz_99_[2] || _zz_100_); - assign IBusCachedPlugin_jump_pcLoad_payload = _zz_248_; - always @ (*) begin - IBusCachedPlugin_fetchPc_corrected = 1'b0; - if(IBusCachedPlugin_jump_pcLoad_valid)begin - IBusCachedPlugin_fetchPc_corrected = 1'b1; - end - end - - always @ (*) begin - IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b0; - if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin - IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b1; - end - end - - always @ (*) begin - IBusCachedPlugin_fetchPc_pc = (IBusCachedPlugin_fetchPc_pcReg + _zz_332_); - if(IBusCachedPlugin_jump_pcLoad_valid)begin - IBusCachedPlugin_fetchPc_pc = IBusCachedPlugin_jump_pcLoad_payload; - end - IBusCachedPlugin_fetchPc_pc[0] = 1'b0; - IBusCachedPlugin_fetchPc_pc[1] = 1'b0; - end - - assign IBusCachedPlugin_fetchPc_output_valid = ((! IBusCachedPlugin_fetcherHalt) && IBusCachedPlugin_fetchPc_booted); - assign IBusCachedPlugin_fetchPc_output_payload = IBusCachedPlugin_fetchPc_pc; - assign IBusCachedPlugin_iBusRsp_stages_0_input_valid = IBusCachedPlugin_fetchPc_output_valid; - assign IBusCachedPlugin_fetchPc_output_ready = IBusCachedPlugin_iBusRsp_stages_0_input_ready; - assign IBusCachedPlugin_iBusRsp_stages_0_input_payload = IBusCachedPlugin_fetchPc_output_payload; - assign IBusCachedPlugin_iBusRsp_stages_0_inputSample = 1'b1; - assign IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b0; - assign _zz_103_ = (! IBusCachedPlugin_iBusRsp_stages_0_halt); - assign IBusCachedPlugin_iBusRsp_stages_0_input_ready = (IBusCachedPlugin_iBusRsp_stages_0_output_ready && _zz_103_); - assign IBusCachedPlugin_iBusRsp_stages_0_output_valid = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && _zz_103_); - assign IBusCachedPlugin_iBusRsp_stages_0_output_payload = IBusCachedPlugin_iBusRsp_stages_0_input_payload; - always @ (*) begin - IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b0; - if(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt)begin - IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b1; - end - end - - assign _zz_104_ = (! IBusCachedPlugin_iBusRsp_stages_1_halt); - assign IBusCachedPlugin_iBusRsp_stages_1_input_ready = (IBusCachedPlugin_iBusRsp_stages_1_output_ready && _zz_104_); - assign IBusCachedPlugin_iBusRsp_stages_1_output_valid = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && _zz_104_); - assign IBusCachedPlugin_iBusRsp_stages_1_output_payload = IBusCachedPlugin_iBusRsp_stages_1_input_payload; - always @ (*) begin - IBusCachedPlugin_iBusRsp_stages_2_halt = 1'b0; - if(IBusCachedPlugin_cache_io_cpu_fetch_haltIt)begin - IBusCachedPlugin_iBusRsp_stages_2_halt = 1'b1; - end - end - - assign _zz_105_ = (! IBusCachedPlugin_iBusRsp_stages_2_halt); - assign IBusCachedPlugin_iBusRsp_stages_2_input_ready = (IBusCachedPlugin_iBusRsp_stages_2_output_ready && _zz_105_); - assign IBusCachedPlugin_iBusRsp_stages_2_output_valid = (IBusCachedPlugin_iBusRsp_stages_2_input_valid && _zz_105_); - assign IBusCachedPlugin_iBusRsp_stages_2_output_payload = IBusCachedPlugin_iBusRsp_stages_2_input_payload; - always @ (*) begin - IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b0; - if((IBusCachedPlugin_rsp_issueDetected || IBusCachedPlugin_rsp_iBusRspOutputHalt))begin - IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b1; - end - end - - assign _zz_106_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt); - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready && _zz_106_); - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && _zz_106_); - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; - assign IBusCachedPlugin_iBusRsp_stages_0_output_ready = _zz_107_; - assign _zz_107_ = ((1'b0 && (! _zz_108_)) || IBusCachedPlugin_iBusRsp_stages_1_input_ready); - assign _zz_108_ = _zz_109_; - assign IBusCachedPlugin_iBusRsp_stages_1_input_valid = _zz_108_; - assign IBusCachedPlugin_iBusRsp_stages_1_input_payload = IBusCachedPlugin_fetchPc_pcReg; - assign IBusCachedPlugin_iBusRsp_stages_1_output_ready = ((1'b0 && (! _zz_110_)) || IBusCachedPlugin_iBusRsp_stages_2_input_ready); - assign _zz_110_ = _zz_111_; - assign IBusCachedPlugin_iBusRsp_stages_2_input_valid = _zz_110_; - assign IBusCachedPlugin_iBusRsp_stages_2_input_payload = _zz_112_; - assign IBusCachedPlugin_iBusRsp_stages_2_output_ready = ((1'b0 && (! _zz_113_)) || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); - assign _zz_113_ = _zz_114_; - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid = _zz_113_; - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload = _zz_115_; - always @ (*) begin - IBusCachedPlugin_iBusRsp_readyForError = 1'b1; - if((! IBusCachedPlugin_pcValids_0))begin - IBusCachedPlugin_iBusRsp_readyForError = 1'b0; - end - end - - assign IBusCachedPlugin_pcValids_0 = IBusCachedPlugin_injector_nextPcCalc_valids_2; - assign IBusCachedPlugin_pcValids_1 = IBusCachedPlugin_injector_nextPcCalc_valids_3; - assign IBusCachedPlugin_pcValids_2 = IBusCachedPlugin_injector_nextPcCalc_valids_4; - assign IBusCachedPlugin_pcValids_3 = IBusCachedPlugin_injector_nextPcCalc_valids_5; - assign IBusCachedPlugin_iBusRsp_decodeInput_ready = (! decode_arbitration_isStuck); - assign decode_arbitration_isValid = (IBusCachedPlugin_iBusRsp_decodeInput_valid && (! IBusCachedPlugin_injector_decodeRemoved)); - assign _zz_97_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; - assign _zz_96_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; - assign _zz_95_ = (decode_PC + (32'b00000000000000000000000000000100)); - assign iBus_cmd_valid = IBusCachedPlugin_cache_io_mem_cmd_valid; - always @ (*) begin - iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; - iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; - end - - assign iBus_cmd_payload_size = IBusCachedPlugin_cache_io_mem_cmd_payload_size; - assign IBusCachedPlugin_s0_tightlyCoupledHit = 1'b0; - assign _zz_221_ = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && (! IBusCachedPlugin_s0_tightlyCoupledHit)); - assign _zz_224_ = (32'b00000000000000000000000000000000); - assign _zz_222_ = (IBusCachedPlugin_iBusRsp_stages_2_input_valid && (! IBusCachedPlugin_s1_tightlyCoupledHit)); - assign _zz_223_ = (! IBusCachedPlugin_iBusRsp_stages_2_input_ready); - assign _zz_225_ = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && (! IBusCachedPlugin_s2_tightlyCoupledHit)); - assign _zz_226_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); - assign _zz_227_ = (CsrPlugin_privilege == (2'b00)); - assign _zz_92_ = (decode_arbitration_isStuck ? decode_INSTRUCTION : IBusCachedPlugin_cache_io_cpu_fetch_data); - assign IBusCachedPlugin_rsp_iBusRspOutputHalt = 1'b0; - always @ (*) begin - IBusCachedPlugin_rsp_redoFetch = 1'b0; - if(_zz_281_)begin - IBusCachedPlugin_rsp_redoFetch = 1'b1; - end - if(_zz_279_)begin - IBusCachedPlugin_rsp_redoFetch = 1'b1; - end - if(_zz_289_)begin - IBusCachedPlugin_rsp_redoFetch = 1'b0; - end - end - - always @ (*) begin - _zz_228_ = (IBusCachedPlugin_rsp_redoFetch && (! IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling)); - if(_zz_279_)begin - _zz_228_ = 1'b1; - end - if(_zz_289_)begin - _zz_228_ = 1'b0; - end - end - - always @ (*) begin - IBusCachedPlugin_decodeExceptionPort_valid = 1'b0; - if(_zz_280_)begin - IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; - end - if(_zz_278_)begin - IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; - end - end - - always @ (*) begin - IBusCachedPlugin_decodeExceptionPort_payload_code = (4'bxxxx); - if(_zz_280_)begin - IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b1100); - end - if(_zz_278_)begin - IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b0001); - end - end - - assign IBusCachedPlugin_decodeExceptionPort_payload_badAddr = {IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload[31 : 2],(2'b00)}; - assign IBusCachedPlugin_redoBranch_valid = IBusCachedPlugin_rsp_redoFetch; - assign IBusCachedPlugin_redoBranch_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; - assign IBusCachedPlugin_iBusRsp_decodeInput_valid = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready = IBusCachedPlugin_iBusRsp_decodeInput_ready; - assign IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst = IBusCachedPlugin_cache_io_cpu_decode_data; - assign IBusCachedPlugin_iBusRsp_decodeInput_payload_pc = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; - assign IBusCachedPlugin_mmuBus_cmd_isValid = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; - assign IBusCachedPlugin_mmuBus_cmd_virtualAddress = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; - assign IBusCachedPlugin_mmuBus_cmd_bypassTranslation = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; - assign IBusCachedPlugin_mmuBus_end = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; - assign _zz_220_ = (decode_arbitration_isValid && decode_FLUSH_ALL); - assign dataCache_1__io_mem_cmd_s2mPipe_valid = (dataCache_1__io_mem_cmd_valid || _zz_117_); - assign _zz_245_ = (! _zz_117_); - assign dataCache_1__io_mem_cmd_s2mPipe_payload_wr = (_zz_117_ ? _zz_118_ : dataCache_1__io_mem_cmd_payload_wr); - assign dataCache_1__io_mem_cmd_s2mPipe_payload_address = (_zz_117_ ? _zz_119_ : dataCache_1__io_mem_cmd_payload_address); - assign dataCache_1__io_mem_cmd_s2mPipe_payload_data = (_zz_117_ ? _zz_120_ : dataCache_1__io_mem_cmd_payload_data); - assign dataCache_1__io_mem_cmd_s2mPipe_payload_mask = (_zz_117_ ? _zz_121_ : dataCache_1__io_mem_cmd_payload_mask); - assign dataCache_1__io_mem_cmd_s2mPipe_payload_length = (_zz_117_ ? _zz_122_ : dataCache_1__io_mem_cmd_payload_length); - assign dataCache_1__io_mem_cmd_s2mPipe_payload_last = (_zz_117_ ? _zz_123_ : dataCache_1__io_mem_cmd_payload_last); - assign dataCache_1__io_mem_cmd_s2mPipe_ready = ((1'b1 && (! dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_valid)) || dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_ready); - assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_valid = _zz_124_; - assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_wr = _zz_125_; - assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_address = _zz_126_; - assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_data = _zz_127_; - assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_mask = _zz_128_; - assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_length = _zz_129_; - assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_last = _zz_130_; - assign dBus_cmd_valid = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_valid; - assign dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_ready = dBus_cmd_ready; - assign dBus_cmd_payload_wr = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_wr; - assign dBus_cmd_payload_address = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_address; - assign dBus_cmd_payload_data = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_data; - assign dBus_cmd_payload_mask = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_mask; - assign dBus_cmd_payload_length = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_length; - assign dBus_cmd_payload_last = dataCache_1__io_mem_cmd_s2mPipe_m2sPipe_payload_last; - assign execute_DBusCachedPlugin_size = execute_INSTRUCTION[13 : 12]; - always @ (*) begin - _zz_229_ = (execute_arbitration_isValid && execute_MEMORY_ENABLE); - if(MmuPlugin_dBusAccess_cmd_valid)begin - if(_zz_290_)begin - if(_zz_291_)begin - _zz_229_ = 1'b1; - end - end - end - end - - always @ (*) begin - _zz_230_ = execute_SRC_ADD; - if(MmuPlugin_dBusAccess_cmd_valid)begin - if(_zz_290_)begin - _zz_230_ = MmuPlugin_dBusAccess_cmd_payload_address; - end - end - end - - always @ (*) begin - _zz_231_ = execute_MEMORY_WR; - if(MmuPlugin_dBusAccess_cmd_valid)begin - if(_zz_290_)begin - _zz_231_ = MmuPlugin_dBusAccess_cmd_payload_write; - end - end - end - - always @ (*) begin - case(execute_DBusCachedPlugin_size) - 2'b00 : begin - _zz_132_ = {{{execute_RS2[7 : 0],execute_RS2[7 : 0]},execute_RS2[7 : 0]},execute_RS2[7 : 0]}; - end - 2'b01 : begin - _zz_132_ = {execute_RS2[15 : 0],execute_RS2[15 : 0]}; - end - default : begin - _zz_132_ = execute_RS2[31 : 0]; - end - endcase - end - - always @ (*) begin - _zz_232_ = _zz_132_; - if(MmuPlugin_dBusAccess_cmd_valid)begin - if(_zz_290_)begin - _zz_232_ = MmuPlugin_dBusAccess_cmd_payload_data; - end - end - end - - always @ (*) begin - _zz_233_ = execute_DBusCachedPlugin_size; - if(MmuPlugin_dBusAccess_cmd_valid)begin - if(_zz_290_)begin - _zz_233_ = MmuPlugin_dBusAccess_cmd_payload_size; - end - end - end - - assign _zz_244_ = (execute_arbitration_isValid && execute_MEMORY_MANAGMENT); - always @ (*) begin - _zz_234_ = 1'b0; - if(execute_MEMORY_LRSC)begin - _zz_234_ = 1'b1; - end - if(MmuPlugin_dBusAccess_cmd_valid)begin - if(_zz_290_)begin - _zz_234_ = 1'b0; - end - end - end - - always @ (*) begin - _zz_235_ = execute_MEMORY_AMO; - if(MmuPlugin_dBusAccess_cmd_valid)begin - if(_zz_290_)begin - _zz_235_ = 1'b0; - end - end - end - - assign _zz_237_ = execute_INSTRUCTION[31 : 29]; - assign _zz_236_ = execute_INSTRUCTION[27]; - assign _zz_88_ = _zz_230_[1 : 0]; - always @ (*) begin - _zz_238_ = (memory_arbitration_isValid && memory_MEMORY_ENABLE); - if(memory_IS_DBUS_SHARING)begin - _zz_238_ = 1'b1; - end - end - - assign _zz_239_ = memory_REGFILE_WRITE_DATA; - assign DBusCachedPlugin_mmuBus_cmd_isValid = dataCache_1__io_cpu_memory_mmuBus_cmd_isValid; - assign DBusCachedPlugin_mmuBus_cmd_virtualAddress = dataCache_1__io_cpu_memory_mmuBus_cmd_virtualAddress; - always @ (*) begin - DBusCachedPlugin_mmuBus_cmd_bypassTranslation = dataCache_1__io_cpu_memory_mmuBus_cmd_bypassTranslation; - if(memory_IS_DBUS_SHARING)begin - DBusCachedPlugin_mmuBus_cmd_bypassTranslation = 1'b1; - end - end - - always @ (*) begin - _zz_240_ = DBusCachedPlugin_mmuBus_rsp_isIoAccess; - if((1'b0 && (! dataCache_1__io_cpu_memory_isWrite)))begin - _zz_240_ = 1'b1; - end - end - - assign DBusCachedPlugin_mmuBus_end = dataCache_1__io_cpu_memory_mmuBus_end; - always @ (*) begin - _zz_241_ = (writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE); - if(writeBack_IS_DBUS_SHARING)begin - _zz_241_ = 1'b1; - end - end - - assign _zz_242_ = (CsrPlugin_privilege == (2'b00)); - assign _zz_243_ = writeBack_REGFILE_WRITE_DATA; - always @ (*) begin - DBusCachedPlugin_redoBranch_valid = 1'b0; - if(_zz_292_)begin - if(dataCache_1__io_cpu_redo)begin - DBusCachedPlugin_redoBranch_valid = 1'b1; - end - end - end - - assign DBusCachedPlugin_redoBranch_payload = writeBack_PC; - always @ (*) begin - DBusCachedPlugin_exceptionBus_valid = 1'b0; - if(_zz_292_)begin - if(dataCache_1__io_cpu_writeBack_accessError)begin - DBusCachedPlugin_exceptionBus_valid = 1'b1; - end - if(dataCache_1__io_cpu_writeBack_unalignedAccess)begin - DBusCachedPlugin_exceptionBus_valid = 1'b1; - end - if(dataCache_1__io_cpu_writeBack_mmuException)begin - DBusCachedPlugin_exceptionBus_valid = 1'b1; - end - if(dataCache_1__io_cpu_redo)begin - DBusCachedPlugin_exceptionBus_valid = 1'b0; - end - end - end - - assign DBusCachedPlugin_exceptionBus_payload_badAddr = writeBack_REGFILE_WRITE_DATA; - always @ (*) begin - DBusCachedPlugin_exceptionBus_payload_code = (4'bxxxx); - if(_zz_292_)begin - if(dataCache_1__io_cpu_writeBack_accessError)begin - DBusCachedPlugin_exceptionBus_payload_code = {1'd0, _zz_333_}; - end - if(dataCache_1__io_cpu_writeBack_unalignedAccess)begin - DBusCachedPlugin_exceptionBus_payload_code = {1'd0, _zz_334_}; - end - if(dataCache_1__io_cpu_writeBack_mmuException)begin - DBusCachedPlugin_exceptionBus_payload_code = (writeBack_MEMORY_WR ? (4'b1111) : (4'b1101)); - end - end - end - - always @ (*) begin - writeBack_DBusCachedPlugin_rspShifted = dataCache_1__io_cpu_writeBack_data; - case(writeBack_MEMORY_ADDRESS_LOW) - 2'b01 : begin - writeBack_DBusCachedPlugin_rspShifted[7 : 0] = dataCache_1__io_cpu_writeBack_data[15 : 8]; - end - 2'b10 : begin - writeBack_DBusCachedPlugin_rspShifted[15 : 0] = dataCache_1__io_cpu_writeBack_data[31 : 16]; - end - 2'b11 : begin - writeBack_DBusCachedPlugin_rspShifted[7 : 0] = dataCache_1__io_cpu_writeBack_data[31 : 24]; - end - default : begin - end - endcase - end - - assign _zz_133_ = (writeBack_DBusCachedPlugin_rspShifted[7] && (! writeBack_INSTRUCTION[14])); - always @ (*) begin - _zz_134_[31] = _zz_133_; - _zz_134_[30] = _zz_133_; - _zz_134_[29] = _zz_133_; - _zz_134_[28] = _zz_133_; - _zz_134_[27] = _zz_133_; - _zz_134_[26] = _zz_133_; - _zz_134_[25] = _zz_133_; - _zz_134_[24] = _zz_133_; - _zz_134_[23] = _zz_133_; - _zz_134_[22] = _zz_133_; - _zz_134_[21] = _zz_133_; - _zz_134_[20] = _zz_133_; - _zz_134_[19] = _zz_133_; - _zz_134_[18] = _zz_133_; - _zz_134_[17] = _zz_133_; - _zz_134_[16] = _zz_133_; - _zz_134_[15] = _zz_133_; - _zz_134_[14] = _zz_133_; - _zz_134_[13] = _zz_133_; - _zz_134_[12] = _zz_133_; - _zz_134_[11] = _zz_133_; - _zz_134_[10] = _zz_133_; - _zz_134_[9] = _zz_133_; - _zz_134_[8] = _zz_133_; - _zz_134_[7 : 0] = writeBack_DBusCachedPlugin_rspShifted[7 : 0]; - end - - assign _zz_135_ = (writeBack_DBusCachedPlugin_rspShifted[15] && (! writeBack_INSTRUCTION[14])); - always @ (*) begin - _zz_136_[31] = _zz_135_; - _zz_136_[30] = _zz_135_; - _zz_136_[29] = _zz_135_; - _zz_136_[28] = _zz_135_; - _zz_136_[27] = _zz_135_; - _zz_136_[26] = _zz_135_; - _zz_136_[25] = _zz_135_; - _zz_136_[24] = _zz_135_; - _zz_136_[23] = _zz_135_; - _zz_136_[22] = _zz_135_; - _zz_136_[21] = _zz_135_; - _zz_136_[20] = _zz_135_; - _zz_136_[19] = _zz_135_; - _zz_136_[18] = _zz_135_; - _zz_136_[17] = _zz_135_; - _zz_136_[16] = _zz_135_; - _zz_136_[15 : 0] = writeBack_DBusCachedPlugin_rspShifted[15 : 0]; - end - - always @ (*) begin - case(_zz_328_) - 2'b00 : begin - writeBack_DBusCachedPlugin_rspFormated = _zz_134_; - end - 2'b01 : begin - writeBack_DBusCachedPlugin_rspFormated = _zz_136_; - end - default : begin - writeBack_DBusCachedPlugin_rspFormated = writeBack_DBusCachedPlugin_rspShifted; - end - endcase - end - - always @ (*) begin - MmuPlugin_dBusAccess_cmd_ready = 1'b0; - if(MmuPlugin_dBusAccess_cmd_valid)begin - if(_zz_290_)begin - if(_zz_291_)begin - MmuPlugin_dBusAccess_cmd_ready = (! execute_arbitration_isStuck); - end - end - end - end - - always @ (*) begin - DBusCachedPlugin_forceDatapath = 1'b0; - if(MmuPlugin_dBusAccess_cmd_valid)begin - if(_zz_290_)begin - DBusCachedPlugin_forceDatapath = 1'b1; - end - end - end - - assign _zz_86_ = (MmuPlugin_dBusAccess_cmd_valid && MmuPlugin_dBusAccess_cmd_ready); - assign MmuPlugin_dBusAccess_rsp_valid = ((writeBack_IS_DBUS_SHARING && (! dataCache_1__io_cpu_writeBack_isWrite)) && (dataCache_1__io_cpu_redo || (! dataCache_1__io_cpu_writeBack_haltIt))); - assign MmuPlugin_dBusAccess_rsp_payload_data = dataCache_1__io_cpu_writeBack_data; - assign MmuPlugin_dBusAccess_rsp_payload_error = (dataCache_1__io_cpu_writeBack_unalignedAccess || dataCache_1__io_cpu_writeBack_accessError); - assign MmuPlugin_dBusAccess_rsp_payload_redo = dataCache_1__io_cpu_redo; - assign MmuPlugin_ports_0_cacheHits_0 = ((MmuPlugin_ports_0_cache_0_valid && (MmuPlugin_ports_0_cache_0_virtualAddress_1 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_0_cache_0_superPage || (MmuPlugin_ports_0_cache_0_virtualAddress_0 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); - assign MmuPlugin_ports_0_cacheHits_1 = ((MmuPlugin_ports_0_cache_1_valid && (MmuPlugin_ports_0_cache_1_virtualAddress_1 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_0_cache_1_superPage || (MmuPlugin_ports_0_cache_1_virtualAddress_0 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); - assign MmuPlugin_ports_0_cacheHits_2 = ((MmuPlugin_ports_0_cache_2_valid && (MmuPlugin_ports_0_cache_2_virtualAddress_1 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_0_cache_2_superPage || (MmuPlugin_ports_0_cache_2_virtualAddress_0 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); - assign MmuPlugin_ports_0_cacheHits_3 = ((MmuPlugin_ports_0_cache_3_valid && (MmuPlugin_ports_0_cache_3_virtualAddress_1 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_0_cache_3_superPage || (MmuPlugin_ports_0_cache_3_virtualAddress_0 == DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); - assign MmuPlugin_ports_0_cacheHit = ({MmuPlugin_ports_0_cacheHits_3,{MmuPlugin_ports_0_cacheHits_2,{MmuPlugin_ports_0_cacheHits_1,MmuPlugin_ports_0_cacheHits_0}}} != (4'b0000)); - assign _zz_137_ = (MmuPlugin_ports_0_cacheHits_1 || MmuPlugin_ports_0_cacheHits_3); - assign _zz_138_ = (MmuPlugin_ports_0_cacheHits_2 || MmuPlugin_ports_0_cacheHits_3); - assign _zz_139_ = {_zz_138_,_zz_137_}; - assign MmuPlugin_ports_0_cacheLine_valid = _zz_249_; - assign MmuPlugin_ports_0_cacheLine_exception = _zz_250_; - assign MmuPlugin_ports_0_cacheLine_superPage = _zz_251_; - assign MmuPlugin_ports_0_cacheLine_virtualAddress_0 = _zz_252_; - assign MmuPlugin_ports_0_cacheLine_virtualAddress_1 = _zz_253_; - assign MmuPlugin_ports_0_cacheLine_physicalAddress_0 = _zz_254_; - assign MmuPlugin_ports_0_cacheLine_physicalAddress_1 = _zz_255_; - assign MmuPlugin_ports_0_cacheLine_allowRead = _zz_256_; - assign MmuPlugin_ports_0_cacheLine_allowWrite = _zz_257_; - assign MmuPlugin_ports_0_cacheLine_allowExecute = _zz_258_; - assign MmuPlugin_ports_0_cacheLine_allowUser = _zz_259_; - always @ (*) begin - MmuPlugin_ports_0_entryToReplace_willIncrement = 1'b0; - if(_zz_293_)begin - if(_zz_294_)begin - MmuPlugin_ports_0_entryToReplace_willIncrement = 1'b1; - end - end - end - - assign MmuPlugin_ports_0_entryToReplace_willClear = 1'b0; - assign MmuPlugin_ports_0_entryToReplace_willOverflowIfInc = (MmuPlugin_ports_0_entryToReplace_value == (2'b11)); - assign MmuPlugin_ports_0_entryToReplace_willOverflow = (MmuPlugin_ports_0_entryToReplace_willOverflowIfInc && MmuPlugin_ports_0_entryToReplace_willIncrement); - always @ (*) begin - MmuPlugin_ports_0_entryToReplace_valueNext = (MmuPlugin_ports_0_entryToReplace_value + _zz_336_); - if(MmuPlugin_ports_0_entryToReplace_willClear)begin - MmuPlugin_ports_0_entryToReplace_valueNext = (2'b00); - end - end - - always @ (*) begin - MmuPlugin_ports_0_requireMmuLockup = ((1'b1 && (! DBusCachedPlugin_mmuBus_cmd_bypassTranslation)) && MmuPlugin_satp_mode); - if(((! MmuPlugin_status_mprv) && (CsrPlugin_privilege == (2'b11))))begin - MmuPlugin_ports_0_requireMmuLockup = 1'b0; - end - if((CsrPlugin_privilege == (2'b11)))begin - if(((! MmuPlugin_status_mprv) || (CsrPlugin_mstatus_MPP == (2'b11))))begin - MmuPlugin_ports_0_requireMmuLockup = 1'b0; - end - end - end - - always @ (*) begin - if(MmuPlugin_ports_0_requireMmuLockup)begin - DBusCachedPlugin_mmuBus_rsp_physicalAddress = {{MmuPlugin_ports_0_cacheLine_physicalAddress_1,(MmuPlugin_ports_0_cacheLine_superPage ? DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12] : MmuPlugin_ports_0_cacheLine_physicalAddress_0)},DBusCachedPlugin_mmuBus_cmd_virtualAddress[11 : 0]}; - end else begin - DBusCachedPlugin_mmuBus_rsp_physicalAddress = DBusCachedPlugin_mmuBus_cmd_virtualAddress; - end - end - - always @ (*) begin - if(MmuPlugin_ports_0_requireMmuLockup)begin - DBusCachedPlugin_mmuBus_rsp_allowRead = (MmuPlugin_ports_0_cacheLine_allowRead || (MmuPlugin_status_mxr && MmuPlugin_ports_0_cacheLine_allowExecute)); - end else begin - DBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1; - end - end - - always @ (*) begin - if(MmuPlugin_ports_0_requireMmuLockup)begin - DBusCachedPlugin_mmuBus_rsp_allowWrite = MmuPlugin_ports_0_cacheLine_allowWrite; - end else begin - DBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1; - end - end - - always @ (*) begin - if(MmuPlugin_ports_0_requireMmuLockup)begin - DBusCachedPlugin_mmuBus_rsp_allowExecute = MmuPlugin_ports_0_cacheLine_allowExecute; - end else begin - DBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1; - end - end - - always @ (*) begin - if(MmuPlugin_ports_0_requireMmuLockup)begin - DBusCachedPlugin_mmuBus_rsp_exception = (MmuPlugin_ports_0_cacheHit && ((MmuPlugin_ports_0_cacheLine_exception || ((MmuPlugin_ports_0_cacheLine_allowUser && (CsrPlugin_privilege == (2'b01))) && (! MmuPlugin_status_sum))) || ((! MmuPlugin_ports_0_cacheLine_allowUser) && (CsrPlugin_privilege == (2'b00))))); - end else begin - DBusCachedPlugin_mmuBus_rsp_exception = 1'b0; - end - end - - always @ (*) begin - if(MmuPlugin_ports_0_requireMmuLockup)begin - DBusCachedPlugin_mmuBus_rsp_refilling = (! MmuPlugin_ports_0_cacheHit); - end else begin - DBusCachedPlugin_mmuBus_rsp_refilling = 1'b0; - end - end - - assign DBusCachedPlugin_mmuBus_rsp_isIoAccess = (((DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1011)) || (DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1110))) || (DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1111))); - assign MmuPlugin_ports_1_cacheHits_0 = ((MmuPlugin_ports_1_cache_0_valid && (MmuPlugin_ports_1_cache_0_virtualAddress_1 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_1_cache_0_superPage || (MmuPlugin_ports_1_cache_0_virtualAddress_0 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); - assign MmuPlugin_ports_1_cacheHits_1 = ((MmuPlugin_ports_1_cache_1_valid && (MmuPlugin_ports_1_cache_1_virtualAddress_1 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_1_cache_1_superPage || (MmuPlugin_ports_1_cache_1_virtualAddress_0 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); - assign MmuPlugin_ports_1_cacheHits_2 = ((MmuPlugin_ports_1_cache_2_valid && (MmuPlugin_ports_1_cache_2_virtualAddress_1 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_1_cache_2_superPage || (MmuPlugin_ports_1_cache_2_virtualAddress_0 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); - assign MmuPlugin_ports_1_cacheHits_3 = ((MmuPlugin_ports_1_cache_3_valid && (MmuPlugin_ports_1_cache_3_virtualAddress_1 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22])) && (MmuPlugin_ports_1_cache_3_superPage || (MmuPlugin_ports_1_cache_3_virtualAddress_0 == IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]))); - assign MmuPlugin_ports_1_cacheHit = ({MmuPlugin_ports_1_cacheHits_3,{MmuPlugin_ports_1_cacheHits_2,{MmuPlugin_ports_1_cacheHits_1,MmuPlugin_ports_1_cacheHits_0}}} != (4'b0000)); - assign _zz_140_ = (MmuPlugin_ports_1_cacheHits_1 || MmuPlugin_ports_1_cacheHits_3); - assign _zz_141_ = (MmuPlugin_ports_1_cacheHits_2 || MmuPlugin_ports_1_cacheHits_3); - assign _zz_142_ = {_zz_141_,_zz_140_}; - assign MmuPlugin_ports_1_cacheLine_valid = _zz_260_; - assign MmuPlugin_ports_1_cacheLine_exception = _zz_261_; - assign MmuPlugin_ports_1_cacheLine_superPage = _zz_262_; - assign MmuPlugin_ports_1_cacheLine_virtualAddress_0 = _zz_263_; - assign MmuPlugin_ports_1_cacheLine_virtualAddress_1 = _zz_264_; - assign MmuPlugin_ports_1_cacheLine_physicalAddress_0 = _zz_265_; - assign MmuPlugin_ports_1_cacheLine_physicalAddress_1 = _zz_266_; - assign MmuPlugin_ports_1_cacheLine_allowRead = _zz_267_; - assign MmuPlugin_ports_1_cacheLine_allowWrite = _zz_268_; - assign MmuPlugin_ports_1_cacheLine_allowExecute = _zz_269_; - assign MmuPlugin_ports_1_cacheLine_allowUser = _zz_270_; - always @ (*) begin - MmuPlugin_ports_1_entryToReplace_willIncrement = 1'b0; - if(_zz_293_)begin - if(_zz_295_)begin - MmuPlugin_ports_1_entryToReplace_willIncrement = 1'b1; - end - end - end - - assign MmuPlugin_ports_1_entryToReplace_willClear = 1'b0; - assign MmuPlugin_ports_1_entryToReplace_willOverflowIfInc = (MmuPlugin_ports_1_entryToReplace_value == (2'b11)); - assign MmuPlugin_ports_1_entryToReplace_willOverflow = (MmuPlugin_ports_1_entryToReplace_willOverflowIfInc && MmuPlugin_ports_1_entryToReplace_willIncrement); - always @ (*) begin - MmuPlugin_ports_1_entryToReplace_valueNext = (MmuPlugin_ports_1_entryToReplace_value + _zz_338_); - if(MmuPlugin_ports_1_entryToReplace_willClear)begin - MmuPlugin_ports_1_entryToReplace_valueNext = (2'b00); - end - end - - always @ (*) begin - MmuPlugin_ports_1_requireMmuLockup = ((1'b1 && (! IBusCachedPlugin_mmuBus_cmd_bypassTranslation)) && MmuPlugin_satp_mode); - if(((! MmuPlugin_status_mprv) && (CsrPlugin_privilege == (2'b11))))begin - MmuPlugin_ports_1_requireMmuLockup = 1'b0; - end - if((CsrPlugin_privilege == (2'b11)))begin - MmuPlugin_ports_1_requireMmuLockup = 1'b0; - end - end - - always @ (*) begin - if(MmuPlugin_ports_1_requireMmuLockup)begin - IBusCachedPlugin_mmuBus_rsp_physicalAddress = {{MmuPlugin_ports_1_cacheLine_physicalAddress_1,(MmuPlugin_ports_1_cacheLine_superPage ? IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12] : MmuPlugin_ports_1_cacheLine_physicalAddress_0)},IBusCachedPlugin_mmuBus_cmd_virtualAddress[11 : 0]}; - end else begin - IBusCachedPlugin_mmuBus_rsp_physicalAddress = IBusCachedPlugin_mmuBus_cmd_virtualAddress; - end - end - - always @ (*) begin - if(MmuPlugin_ports_1_requireMmuLockup)begin - IBusCachedPlugin_mmuBus_rsp_allowRead = (MmuPlugin_ports_1_cacheLine_allowRead || (MmuPlugin_status_mxr && MmuPlugin_ports_1_cacheLine_allowExecute)); - end else begin - IBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1; - end - end - - always @ (*) begin - if(MmuPlugin_ports_1_requireMmuLockup)begin - IBusCachedPlugin_mmuBus_rsp_allowWrite = MmuPlugin_ports_1_cacheLine_allowWrite; - end else begin - IBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1; - end - end - - always @ (*) begin - if(MmuPlugin_ports_1_requireMmuLockup)begin - IBusCachedPlugin_mmuBus_rsp_allowExecute = MmuPlugin_ports_1_cacheLine_allowExecute; - end else begin - IBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1; - end - end - - always @ (*) begin - if(MmuPlugin_ports_1_requireMmuLockup)begin - IBusCachedPlugin_mmuBus_rsp_exception = (MmuPlugin_ports_1_cacheHit && ((MmuPlugin_ports_1_cacheLine_exception || ((MmuPlugin_ports_1_cacheLine_allowUser && (CsrPlugin_privilege == (2'b01))) && (! MmuPlugin_status_sum))) || ((! MmuPlugin_ports_1_cacheLine_allowUser) && (CsrPlugin_privilege == (2'b00))))); - end else begin - IBusCachedPlugin_mmuBus_rsp_exception = 1'b0; - end - end - - always @ (*) begin - if(MmuPlugin_ports_1_requireMmuLockup)begin - IBusCachedPlugin_mmuBus_rsp_refilling = (! MmuPlugin_ports_1_cacheHit); - end else begin - IBusCachedPlugin_mmuBus_rsp_refilling = 1'b0; - end - end - - assign IBusCachedPlugin_mmuBus_rsp_isIoAccess = (((IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1011)) || (IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1110))) || (IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] == (4'b1111))); - assign MmuPlugin_shared_dBusRsp_pte_V = _zz_339_[0]; - assign MmuPlugin_shared_dBusRsp_pte_R = _zz_340_[0]; - assign MmuPlugin_shared_dBusRsp_pte_W = _zz_341_[0]; - assign MmuPlugin_shared_dBusRsp_pte_X = _zz_342_[0]; - assign MmuPlugin_shared_dBusRsp_pte_U = _zz_343_[0]; - assign MmuPlugin_shared_dBusRsp_pte_G = _zz_344_[0]; - assign MmuPlugin_shared_dBusRsp_pte_A = _zz_345_[0]; - assign MmuPlugin_shared_dBusRsp_pte_D = _zz_346_[0]; - assign MmuPlugin_shared_dBusRsp_pte_RSW = MmuPlugin_dBusAccess_rsp_payload_data[9 : 8]; - assign MmuPlugin_shared_dBusRsp_pte_PPN0 = MmuPlugin_dBusAccess_rsp_payload_data[19 : 10]; - assign MmuPlugin_shared_dBusRsp_pte_PPN1 = MmuPlugin_dBusAccess_rsp_payload_data[31 : 20]; - assign MmuPlugin_shared_dBusRsp_exception = (((! MmuPlugin_shared_dBusRsp_pte_V) || ((! MmuPlugin_shared_dBusRsp_pte_R) && MmuPlugin_shared_dBusRsp_pte_W)) || MmuPlugin_dBusAccess_rsp_payload_error); - assign MmuPlugin_shared_dBusRsp_leaf = (MmuPlugin_shared_dBusRsp_pte_R || MmuPlugin_shared_dBusRsp_pte_X); - always @ (*) begin - MmuPlugin_dBusAccess_cmd_valid = 1'b0; - case(MmuPlugin_shared_state_1_) - `MmuPlugin_shared_State_defaultEncoding_IDLE : begin - end - `MmuPlugin_shared_State_defaultEncoding_L1_CMD : begin - MmuPlugin_dBusAccess_cmd_valid = 1'b1; - end - `MmuPlugin_shared_State_defaultEncoding_L1_RSP : begin - end - `MmuPlugin_shared_State_defaultEncoding_L0_CMD : begin - MmuPlugin_dBusAccess_cmd_valid = 1'b1; - end - default : begin - end - endcase - end - - assign MmuPlugin_dBusAccess_cmd_payload_write = 1'b0; - assign MmuPlugin_dBusAccess_cmd_payload_size = (2'b10); - always @ (*) begin - MmuPlugin_dBusAccess_cmd_payload_address = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - case(MmuPlugin_shared_state_1_) - `MmuPlugin_shared_State_defaultEncoding_IDLE : begin - end - `MmuPlugin_shared_State_defaultEncoding_L1_CMD : begin - MmuPlugin_dBusAccess_cmd_payload_address = {{MmuPlugin_satp_ppn,MmuPlugin_shared_vpn_1},(2'b00)}; - end - `MmuPlugin_shared_State_defaultEncoding_L1_RSP : begin - end - `MmuPlugin_shared_State_defaultEncoding_L0_CMD : begin - MmuPlugin_dBusAccess_cmd_payload_address = {{{MmuPlugin_shared_pteBuffer_PPN1[9 : 0],MmuPlugin_shared_pteBuffer_PPN0},MmuPlugin_shared_vpn_0},(2'b00)}; - end - default : begin - end - endcase - end - - assign MmuPlugin_dBusAccess_cmd_payload_data = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - assign MmuPlugin_dBusAccess_cmd_payload_writeMask = (4'bxxxx); - assign DBusCachedPlugin_mmuBus_busy = ((MmuPlugin_shared_state_1_ != `MmuPlugin_shared_State_defaultEncoding_IDLE) && (MmuPlugin_shared_portId == (1'b1))); - assign IBusCachedPlugin_mmuBus_busy = ((MmuPlugin_shared_state_1_ != `MmuPlugin_shared_State_defaultEncoding_IDLE) && (MmuPlugin_shared_portId == (1'b0))); - assign _zz_144_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000001100)) == (32'b00000000000000000000000000000100)); - assign _zz_145_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001001000)) == (32'b00000000000000000000000001001000)); - assign _zz_146_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000000000)) == (32'b00000000000000000001000000000000)); - assign _zz_147_ = ((decode_INSTRUCTION & (32'b00000000000000000011000000000000)) == (32'b00000000000000000010000000000000)); - assign _zz_148_ = ((decode_INSTRUCTION & (32'b00000000000000000101000000000000)) == (32'b00000000000000000100000000000000)); - assign _zz_149_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001010000)) == (32'b00000000000000000010000000000000)); - assign _zz_150_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000000100)) == (32'b00000000000000000000000000000100)); - assign _zz_151_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001010000)) == (32'b00000000000000000100000001010000)); - assign _zz_143_ = {(((decode_INSTRUCTION & _zz_459_) == (32'b00000000000000000000000000001000)) != (1'b0)),{({_zz_460_,{_zz_461_,_zz_462_}} != (4'b0000)),{({_zz_463_,_zz_464_} != (3'b000)),{(_zz_465_ != _zz_466_),{_zz_467_,{_zz_468_,_zz_469_}}}}}}; - assign _zz_85_ = ({((decode_INSTRUCTION & (32'b00000000000000000000000001011111)) == (32'b00000000000000000000000000010111)),{((decode_INSTRUCTION & (32'b00000000000000000000000001111111)) == (32'b00000000000000000000000001101111)),{((decode_INSTRUCTION & (32'b00000000000000000001000001101111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_634_) == (32'b00000000000000000001000001110011)),{(_zz_635_ == _zz_636_),{_zz_637_,{_zz_638_,_zz_639_}}}}}}} != (25'b0000000000000000000000000)); - assign _zz_84_ = _zz_347_[0]; - assign _zz_83_ = _zz_348_[0]; - assign _zz_152_ = _zz_143_[3 : 2]; - assign _zz_82_ = _zz_152_; - assign _zz_153_ = _zz_143_[5 : 4]; - assign _zz_81_ = _zz_153_; - assign _zz_80_ = _zz_349_[0]; - assign _zz_79_ = _zz_350_[0]; - assign _zz_154_ = _zz_143_[9 : 8]; - assign _zz_78_ = _zz_154_; - assign _zz_77_ = _zz_351_[0]; - assign _zz_76_ = _zz_352_[0]; - assign _zz_75_ = _zz_353_[0]; - assign _zz_74_ = _zz_354_[0]; - assign _zz_73_ = _zz_355_[0]; - assign _zz_72_ = _zz_356_[0]; - assign _zz_71_ = _zz_357_[0]; - assign _zz_155_ = _zz_143_[19 : 18]; - assign _zz_70_ = _zz_155_; - assign _zz_69_ = _zz_358_[0]; - assign _zz_68_ = _zz_359_[0]; - assign _zz_67_ = _zz_360_[0]; - assign _zz_156_ = _zz_143_[24 : 23]; - assign _zz_66_ = _zz_156_; - assign _zz_65_ = _zz_361_[0]; - assign _zz_64_ = _zz_362_[0]; - assign _zz_157_ = _zz_143_[28 : 27]; - assign _zz_63_ = _zz_157_; - assign _zz_158_ = _zz_143_[30 : 29]; - assign _zz_62_ = _zz_158_; - assign _zz_61_ = _zz_363_[0]; - assign _zz_60_ = _zz_364_[0]; - assign _zz_59_ = _zz_365_[0]; - assign _zz_58_ = _zz_366_[0]; - assign decodeExceptionPort_valid = ((decode_arbitration_isValid && decode_INSTRUCTION_READY) && (! decode_LEGAL_INSTRUCTION)); - assign decodeExceptionPort_payload_code = (4'b0010); - assign decodeExceptionPort_payload_badAddr = decode_INSTRUCTION; - assign decode_RegFilePlugin_regFileReadAddress1 = decode_INSTRUCTION_ANTICIPATED[19 : 15]; - assign decode_RegFilePlugin_regFileReadAddress2 = decode_INSTRUCTION_ANTICIPATED[24 : 20]; - assign decode_RegFilePlugin_rs1Data = _zz_246_; - assign decode_RegFilePlugin_rs2Data = _zz_247_; - assign _zz_57_ = decode_RegFilePlugin_rs1Data; - assign _zz_56_ = decode_RegFilePlugin_rs2Data; - always @ (*) begin - lastStageRegFileWrite_valid = (_zz_54_ && writeBack_arbitration_isFiring); - if(_zz_159_)begin - lastStageRegFileWrite_valid = 1'b1; - end - end - - assign lastStageRegFileWrite_payload_address = _zz_53_[11 : 7]; - assign lastStageRegFileWrite_payload_data = _zz_87_; - always @ (*) begin - case(execute_ALU_BITWISE_CTRL) - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : begin - execute_IntAluPlugin_bitwise = (execute_SRC1 & execute_SRC2); - end - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : begin - execute_IntAluPlugin_bitwise = (execute_SRC1 | execute_SRC2); - end - default : begin - execute_IntAluPlugin_bitwise = (execute_SRC1 ^ execute_SRC2); - end - endcase - end - - always @ (*) begin - case(execute_ALU_CTRL) - `AluCtrlEnum_defaultEncoding_BITWISE : begin - _zz_160_ = execute_IntAluPlugin_bitwise; - end - `AluCtrlEnum_defaultEncoding_SLT_SLTU : begin - _zz_160_ = {31'd0, _zz_367_}; - end - default : begin - _zz_160_ = execute_SRC_ADD_SUB; - end - endcase - end - - assign _zz_51_ = _zz_160_; - assign _zz_49_ = (decode_SRC_ADD_ZERO && (! decode_SRC_USE_SUB_LESS)); - always @ (*) begin - case(execute_SRC1_CTRL) - `Src1CtrlEnum_defaultEncoding_RS : begin - _zz_161_ = execute_RS1; - end - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : begin - _zz_161_ = {29'd0, _zz_368_}; - end - `Src1CtrlEnum_defaultEncoding_IMU : begin - _zz_161_ = {execute_INSTRUCTION[31 : 12],(12'b000000000000)}; - end - default : begin - _zz_161_ = {27'd0, _zz_369_}; - end - endcase - end - - assign _zz_48_ = _zz_161_; - assign _zz_162_ = _zz_370_[11]; - always @ (*) begin - _zz_163_[19] = _zz_162_; - _zz_163_[18] = _zz_162_; - _zz_163_[17] = _zz_162_; - _zz_163_[16] = _zz_162_; - _zz_163_[15] = _zz_162_; - _zz_163_[14] = _zz_162_; - _zz_163_[13] = _zz_162_; - _zz_163_[12] = _zz_162_; - _zz_163_[11] = _zz_162_; - _zz_163_[10] = _zz_162_; - _zz_163_[9] = _zz_162_; - _zz_163_[8] = _zz_162_; - _zz_163_[7] = _zz_162_; - _zz_163_[6] = _zz_162_; - _zz_163_[5] = _zz_162_; - _zz_163_[4] = _zz_162_; - _zz_163_[3] = _zz_162_; - _zz_163_[2] = _zz_162_; - _zz_163_[1] = _zz_162_; - _zz_163_[0] = _zz_162_; - end - - assign _zz_164_ = _zz_371_[11]; - always @ (*) begin - _zz_165_[19] = _zz_164_; - _zz_165_[18] = _zz_164_; - _zz_165_[17] = _zz_164_; - _zz_165_[16] = _zz_164_; - _zz_165_[15] = _zz_164_; - _zz_165_[14] = _zz_164_; - _zz_165_[13] = _zz_164_; - _zz_165_[12] = _zz_164_; - _zz_165_[11] = _zz_164_; - _zz_165_[10] = _zz_164_; - _zz_165_[9] = _zz_164_; - _zz_165_[8] = _zz_164_; - _zz_165_[7] = _zz_164_; - _zz_165_[6] = _zz_164_; - _zz_165_[5] = _zz_164_; - _zz_165_[4] = _zz_164_; - _zz_165_[3] = _zz_164_; - _zz_165_[2] = _zz_164_; - _zz_165_[1] = _zz_164_; - _zz_165_[0] = _zz_164_; - end - - always @ (*) begin - case(execute_SRC2_CTRL) - `Src2CtrlEnum_defaultEncoding_RS : begin - _zz_166_ = execute_RS2; - end - `Src2CtrlEnum_defaultEncoding_IMI : begin - _zz_166_ = {_zz_163_,execute_INSTRUCTION[31 : 20]}; - end - `Src2CtrlEnum_defaultEncoding_IMS : begin - _zz_166_ = {_zz_165_,{execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}}; - end - default : begin - _zz_166_ = _zz_44_; - end - endcase - end - - assign _zz_46_ = _zz_166_; - always @ (*) begin - execute_SrcPlugin_addSub = _zz_372_; - if(execute_SRC2_FORCE_ZERO)begin - execute_SrcPlugin_addSub = execute_SRC1; - end - end - - assign execute_SrcPlugin_less = ((execute_SRC1[31] == execute_SRC2[31]) ? execute_SrcPlugin_addSub[31] : (execute_SRC_LESS_UNSIGNED ? execute_SRC2[31] : execute_SRC1[31])); - assign _zz_43_ = execute_SrcPlugin_addSub; - assign _zz_42_ = execute_SrcPlugin_addSub; - assign _zz_41_ = execute_SrcPlugin_less; - assign execute_FullBarrelShifterPlugin_amplitude = execute_SRC2[4 : 0]; - always @ (*) begin - _zz_167_[0] = execute_SRC1[31]; - _zz_167_[1] = execute_SRC1[30]; - _zz_167_[2] = execute_SRC1[29]; - _zz_167_[3] = execute_SRC1[28]; - _zz_167_[4] = execute_SRC1[27]; - _zz_167_[5] = execute_SRC1[26]; - _zz_167_[6] = execute_SRC1[25]; - _zz_167_[7] = execute_SRC1[24]; - _zz_167_[8] = execute_SRC1[23]; - _zz_167_[9] = execute_SRC1[22]; - _zz_167_[10] = execute_SRC1[21]; - _zz_167_[11] = execute_SRC1[20]; - _zz_167_[12] = execute_SRC1[19]; - _zz_167_[13] = execute_SRC1[18]; - _zz_167_[14] = execute_SRC1[17]; - _zz_167_[15] = execute_SRC1[16]; - _zz_167_[16] = execute_SRC1[15]; - _zz_167_[17] = execute_SRC1[14]; - _zz_167_[18] = execute_SRC1[13]; - _zz_167_[19] = execute_SRC1[12]; - _zz_167_[20] = execute_SRC1[11]; - _zz_167_[21] = execute_SRC1[10]; - _zz_167_[22] = execute_SRC1[9]; - _zz_167_[23] = execute_SRC1[8]; - _zz_167_[24] = execute_SRC1[7]; - _zz_167_[25] = execute_SRC1[6]; - _zz_167_[26] = execute_SRC1[5]; - _zz_167_[27] = execute_SRC1[4]; - _zz_167_[28] = execute_SRC1[3]; - _zz_167_[29] = execute_SRC1[2]; - _zz_167_[30] = execute_SRC1[1]; - _zz_167_[31] = execute_SRC1[0]; - end - - assign execute_FullBarrelShifterPlugin_reversed = ((execute_SHIFT_CTRL == `ShiftCtrlEnum_defaultEncoding_SLL_1) ? _zz_167_ : execute_SRC1); - assign _zz_39_ = _zz_380_; - always @ (*) begin - _zz_168_[0] = memory_SHIFT_RIGHT[31]; - _zz_168_[1] = memory_SHIFT_RIGHT[30]; - _zz_168_[2] = memory_SHIFT_RIGHT[29]; - _zz_168_[3] = memory_SHIFT_RIGHT[28]; - _zz_168_[4] = memory_SHIFT_RIGHT[27]; - _zz_168_[5] = memory_SHIFT_RIGHT[26]; - _zz_168_[6] = memory_SHIFT_RIGHT[25]; - _zz_168_[7] = memory_SHIFT_RIGHT[24]; - _zz_168_[8] = memory_SHIFT_RIGHT[23]; - _zz_168_[9] = memory_SHIFT_RIGHT[22]; - _zz_168_[10] = memory_SHIFT_RIGHT[21]; - _zz_168_[11] = memory_SHIFT_RIGHT[20]; - _zz_168_[12] = memory_SHIFT_RIGHT[19]; - _zz_168_[13] = memory_SHIFT_RIGHT[18]; - _zz_168_[14] = memory_SHIFT_RIGHT[17]; - _zz_168_[15] = memory_SHIFT_RIGHT[16]; - _zz_168_[16] = memory_SHIFT_RIGHT[15]; - _zz_168_[17] = memory_SHIFT_RIGHT[14]; - _zz_168_[18] = memory_SHIFT_RIGHT[13]; - _zz_168_[19] = memory_SHIFT_RIGHT[12]; - _zz_168_[20] = memory_SHIFT_RIGHT[11]; - _zz_168_[21] = memory_SHIFT_RIGHT[10]; - _zz_168_[22] = memory_SHIFT_RIGHT[9]; - _zz_168_[23] = memory_SHIFT_RIGHT[8]; - _zz_168_[24] = memory_SHIFT_RIGHT[7]; - _zz_168_[25] = memory_SHIFT_RIGHT[6]; - _zz_168_[26] = memory_SHIFT_RIGHT[5]; - _zz_168_[27] = memory_SHIFT_RIGHT[4]; - _zz_168_[28] = memory_SHIFT_RIGHT[3]; - _zz_168_[29] = memory_SHIFT_RIGHT[2]; - _zz_168_[30] = memory_SHIFT_RIGHT[1]; - _zz_168_[31] = memory_SHIFT_RIGHT[0]; - end - - always @ (*) begin - _zz_169_ = 1'b0; - if(_zz_296_)begin - if(_zz_297_)begin - if(_zz_175_)begin - _zz_169_ = 1'b1; - end - end - end - if(_zz_298_)begin - if(_zz_299_)begin - if(_zz_177_)begin - _zz_169_ = 1'b1; - end - end - end - if(_zz_300_)begin - if(_zz_301_)begin - if(_zz_179_)begin - _zz_169_ = 1'b1; - end - end - end - if((! decode_RS1_USE))begin - _zz_169_ = 1'b0; - end - end - - always @ (*) begin - _zz_170_ = 1'b0; - if(_zz_296_)begin - if(_zz_297_)begin - if(_zz_176_)begin - _zz_170_ = 1'b1; - end - end - end - if(_zz_298_)begin - if(_zz_299_)begin - if(_zz_178_)begin - _zz_170_ = 1'b1; - end - end - end - if(_zz_300_)begin - if(_zz_301_)begin - if(_zz_180_)begin - _zz_170_ = 1'b1; - end - end - end - if((! decode_RS2_USE))begin - _zz_170_ = 1'b0; - end - end - - assign _zz_171_ = (_zz_54_ && writeBack_arbitration_isFiring); - assign _zz_175_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); - assign _zz_176_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); - assign _zz_177_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); - assign _zz_178_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); - assign _zz_179_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); - assign _zz_180_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); - assign execute_BranchPlugin_eq = (execute_SRC1 == execute_SRC2); - assign _zz_181_ = execute_INSTRUCTION[14 : 12]; - always @ (*) begin - if((_zz_181_ == (3'b000))) begin - _zz_182_ = execute_BranchPlugin_eq; - end else if((_zz_181_ == (3'b001))) begin - _zz_182_ = (! execute_BranchPlugin_eq); - end else if((((_zz_181_ & (3'b101)) == (3'b101)))) begin - _zz_182_ = (! execute_SRC_LESS); - end else begin - _zz_182_ = execute_SRC_LESS; - end - end - - always @ (*) begin - case(execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_INC : begin - _zz_183_ = 1'b0; - end - `BranchCtrlEnum_defaultEncoding_JAL : begin - _zz_183_ = 1'b1; - end - `BranchCtrlEnum_defaultEncoding_JALR : begin - _zz_183_ = 1'b1; - end - default : begin - _zz_183_ = _zz_182_; - end - endcase - end - - assign _zz_35_ = _zz_183_; - assign execute_BranchPlugin_branch_src1 = ((execute_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JALR) ? execute_RS1 : execute_PC); - assign _zz_184_ = _zz_382_[19]; - always @ (*) begin - _zz_185_[10] = _zz_184_; - _zz_185_[9] = _zz_184_; - _zz_185_[8] = _zz_184_; - _zz_185_[7] = _zz_184_; - _zz_185_[6] = _zz_184_; - _zz_185_[5] = _zz_184_; - _zz_185_[4] = _zz_184_; - _zz_185_[3] = _zz_184_; - _zz_185_[2] = _zz_184_; - _zz_185_[1] = _zz_184_; - _zz_185_[0] = _zz_184_; - end - - assign _zz_186_ = _zz_383_[11]; - always @ (*) begin - _zz_187_[19] = _zz_186_; - _zz_187_[18] = _zz_186_; - _zz_187_[17] = _zz_186_; - _zz_187_[16] = _zz_186_; - _zz_187_[15] = _zz_186_; - _zz_187_[14] = _zz_186_; - _zz_187_[13] = _zz_186_; - _zz_187_[12] = _zz_186_; - _zz_187_[11] = _zz_186_; - _zz_187_[10] = _zz_186_; - _zz_187_[9] = _zz_186_; - _zz_187_[8] = _zz_186_; - _zz_187_[7] = _zz_186_; - _zz_187_[6] = _zz_186_; - _zz_187_[5] = _zz_186_; - _zz_187_[4] = _zz_186_; - _zz_187_[3] = _zz_186_; - _zz_187_[2] = _zz_186_; - _zz_187_[1] = _zz_186_; - _zz_187_[0] = _zz_186_; - end - - assign _zz_188_ = _zz_384_[11]; - always @ (*) begin - _zz_189_[18] = _zz_188_; - _zz_189_[17] = _zz_188_; - _zz_189_[16] = _zz_188_; - _zz_189_[15] = _zz_188_; - _zz_189_[14] = _zz_188_; - _zz_189_[13] = _zz_188_; - _zz_189_[12] = _zz_188_; - _zz_189_[11] = _zz_188_; - _zz_189_[10] = _zz_188_; - _zz_189_[9] = _zz_188_; - _zz_189_[8] = _zz_188_; - _zz_189_[7] = _zz_188_; - _zz_189_[6] = _zz_188_; - _zz_189_[5] = _zz_188_; - _zz_189_[4] = _zz_188_; - _zz_189_[3] = _zz_188_; - _zz_189_[2] = _zz_188_; - _zz_189_[1] = _zz_188_; - _zz_189_[0] = _zz_188_; - end - - always @ (*) begin - case(execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_JAL : begin - _zz_190_ = {{_zz_185_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0}; - end - `BranchCtrlEnum_defaultEncoding_JALR : begin - _zz_190_ = {_zz_187_,execute_INSTRUCTION[31 : 20]}; - end - default : begin - _zz_190_ = {{_zz_189_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0}; - end - endcase - end - - assign execute_BranchPlugin_branch_src2 = _zz_190_; - assign execute_BranchPlugin_branchAdder = (execute_BranchPlugin_branch_src1 + execute_BranchPlugin_branch_src2); - assign _zz_33_ = {execute_BranchPlugin_branchAdder[31 : 1],(1'b0)}; - assign BranchPlugin_jumpInterface_valid = ((memory_arbitration_isValid && memory_BRANCH_DO) && (! 1'b0)); - assign BranchPlugin_jumpInterface_payload = memory_BRANCH_CALC; - assign BranchPlugin_branchExceptionPort_valid = ((memory_arbitration_isValid && memory_BRANCH_DO) && BranchPlugin_jumpInterface_payload[1]); - assign BranchPlugin_branchExceptionPort_payload_code = (4'b0000); - assign BranchPlugin_branchExceptionPort_payload_badAddr = BranchPlugin_jumpInterface_payload; - always @ (*) begin - CsrPlugin_privilege = _zz_191_; - if(CsrPlugin_forceMachineWire)begin - CsrPlugin_privilege = (2'b11); - end - end - - assign CsrPlugin_misa_base = (2'b01); - assign CsrPlugin_misa_extensions = (26'b00000000000000000000000000); - assign CsrPlugin_sip_SEIP_OR = (CsrPlugin_sip_SEIP_SOFT || CsrPlugin_sip_SEIP_INPUT); - assign _zz_192_ = (CsrPlugin_sip_STIP && CsrPlugin_sie_STIE); - assign _zz_193_ = (CsrPlugin_sip_SSIP && CsrPlugin_sie_SSIE); - assign _zz_194_ = (CsrPlugin_sip_SEIP_OR && CsrPlugin_sie_SEIE); - assign _zz_195_ = (CsrPlugin_mip_MTIP && CsrPlugin_mie_MTIE); - assign _zz_196_ = (CsrPlugin_mip_MSIP && CsrPlugin_mie_MSIE); - assign _zz_197_ = (CsrPlugin_mip_MEIP && CsrPlugin_mie_MEIE); - always @ (*) begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b11); - case(CsrPlugin_exceptionPortCtrl_exceptionContext_code) - 4'b1000 : begin - if(((1'b1 && CsrPlugin_medeleg_EU) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b0010 : begin - if(((1'b1 && CsrPlugin_medeleg_II) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b0101 : begin - if(((1'b1 && CsrPlugin_medeleg_LAF) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b1101 : begin - if(((1'b1 && CsrPlugin_medeleg_LPF) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b0100 : begin - if(((1'b1 && CsrPlugin_medeleg_LAM) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b0111 : begin - if(((1'b1 && CsrPlugin_medeleg_SAF) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b0001 : begin - if(((1'b1 && CsrPlugin_medeleg_IAF) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b1001 : begin - if(((1'b1 && CsrPlugin_medeleg_ES) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b1100 : begin - if(((1'b1 && CsrPlugin_medeleg_IPF) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b1111 : begin - if(((1'b1 && CsrPlugin_medeleg_SPF) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b0110 : begin - if(((1'b1 && CsrPlugin_medeleg_SAM) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - 4'b0000 : begin - if(((1'b1 && CsrPlugin_medeleg_IAM) && (! 1'b0)))begin - CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b01); - end - end - default : begin - end - endcase - end - - assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege = ((CsrPlugin_privilege < CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped) ? CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped : CsrPlugin_privilege); - assign _zz_198_ = {decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid}; - assign _zz_199_ = _zz_385_[0]; - always @ (*) begin - CsrPlugin_exceptionPortCtrl_exceptionValids_decode = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; - if(_zz_282_)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b1; - end - if(decode_arbitration_isFlushed)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b0; - end - end - - always @ (*) begin - CsrPlugin_exceptionPortCtrl_exceptionValids_execute = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; - if(CsrPlugin_selfException_valid)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_execute = 1'b1; - end - if(execute_arbitration_isFlushed)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_execute = 1'b0; - end - end - - always @ (*) begin - CsrPlugin_exceptionPortCtrl_exceptionValids_memory = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; - if(BranchPlugin_branchExceptionPort_valid)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b1; - end - if(memory_arbitration_isFlushed)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b0; - end - end - - always @ (*) begin - CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; - if(DBusCachedPlugin_exceptionBus_valid)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = 1'b1; - end - if(writeBack_arbitration_isFlushed)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = 1'b0; - end - end - - assign CsrPlugin_exceptionPendings_0 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; - assign CsrPlugin_exceptionPendings_1 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; - assign CsrPlugin_exceptionPendings_2 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; - assign CsrPlugin_exceptionPendings_3 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; - assign CsrPlugin_exception = (CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack && CsrPlugin_allowException); - always @ (*) begin - CsrPlugin_pipelineLiberator_done = ((! ({writeBack_arbitration_isValid,{memory_arbitration_isValid,execute_arbitration_isValid}} != (3'b000))) && IBusCachedPlugin_pcValids_3); - if(({CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory,CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute}} != (3'b000)))begin - CsrPlugin_pipelineLiberator_done = 1'b0; - end - if(CsrPlugin_hadException)begin - CsrPlugin_pipelineLiberator_done = 1'b0; - end - end - - assign CsrPlugin_interruptJump = ((CsrPlugin_interrupt_valid && CsrPlugin_pipelineLiberator_done) && CsrPlugin_allowInterrupts); - always @ (*) begin - CsrPlugin_targetPrivilege = CsrPlugin_interrupt_targetPrivilege; - if(CsrPlugin_hadException)begin - CsrPlugin_targetPrivilege = CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; - end - end - - always @ (*) begin - CsrPlugin_trapCause = CsrPlugin_interrupt_code; - if(CsrPlugin_hadException)begin - CsrPlugin_trapCause = CsrPlugin_exceptionPortCtrl_exceptionContext_code; - end - end - - always @ (*) begin - CsrPlugin_xtvec_mode = (2'bxx); - case(CsrPlugin_targetPrivilege) - 2'b01 : begin - CsrPlugin_xtvec_mode = CsrPlugin_stvec_mode; - end - 2'b11 : begin - CsrPlugin_xtvec_mode = CsrPlugin_mtvec_mode; - end - default : begin - end - endcase - end - - always @ (*) begin - CsrPlugin_xtvec_base = (30'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - case(CsrPlugin_targetPrivilege) - 2'b01 : begin - CsrPlugin_xtvec_base = CsrPlugin_stvec_base; - end - 2'b11 : begin - CsrPlugin_xtvec_base = CsrPlugin_mtvec_base; - end - default : begin - end - endcase - end - - assign contextSwitching = CsrPlugin_jumpInterface_valid; - assign _zz_31_ = (! (((decode_INSTRUCTION[14 : 13] == (2'b01)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))) || ((decode_INSTRUCTION[14 : 13] == (2'b11)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))))); - assign _zz_30_ = (decode_INSTRUCTION[13 : 7] != (7'b0100000)); - always @ (*) begin - execute_CsrPlugin_inWfi = 1'b0; - if(_zz_283_)begin - execute_CsrPlugin_inWfi = 1'b1; - end - end - - assign execute_CsrPlugin_blockedBySideEffects = ({writeBack_arbitration_isValid,memory_arbitration_isValid} != (2'b00)); - always @ (*) begin - execute_CsrPlugin_illegalAccess = 1'b1; - case(execute_CsrPlugin_csrAddress) - 12'b101111000000 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001100000000 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001100000011 : begin - if(execute_CSR_WRITE_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b111100010001 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b000101000010 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b111100010100 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b100111000000 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b000100000000 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001100000010 : begin - if(execute_CSR_WRITE_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b001101000001 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001101000100 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001100000101 : begin - if(execute_CSR_WRITE_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b000110000000 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b110011000000 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b000101000001 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b111100010011 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b000101000100 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001101000011 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b000100000101 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b111111000000 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b001101000000 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001100000100 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b111100010010 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b000101000011 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b110111000000 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b000101000000 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001101000010 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b000100000100 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - default : begin - end - endcase - if((CsrPlugin_privilege < execute_CsrPlugin_csrAddress[9 : 8]))begin - execute_CsrPlugin_illegalAccess = 1'b1; - end - if(((! execute_arbitration_isValid) || (! execute_IS_CSR)))begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - - always @ (*) begin - execute_CsrPlugin_illegalInstruction = 1'b0; - if((execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)))begin - if((CsrPlugin_privilege < execute_INSTRUCTION[29 : 28]))begin - execute_CsrPlugin_illegalInstruction = 1'b1; - end - end - end - - always @ (*) begin - CsrPlugin_selfException_valid = 1'b0; - if(_zz_302_)begin - CsrPlugin_selfException_valid = 1'b1; - end - if(_zz_303_)begin - CsrPlugin_selfException_valid = 1'b1; - end - end - - always @ (*) begin - CsrPlugin_selfException_payload_code = (4'bxxxx); - if(_zz_302_)begin - CsrPlugin_selfException_payload_code = (4'b0010); - end - if(_zz_303_)begin - case(CsrPlugin_privilege) - 2'b00 : begin - CsrPlugin_selfException_payload_code = (4'b1000); - end - 2'b01 : begin - CsrPlugin_selfException_payload_code = (4'b1001); - end - default : begin - CsrPlugin_selfException_payload_code = (4'b1011); - end - endcase - end - end - - assign CsrPlugin_selfException_payload_badAddr = execute_INSTRUCTION; - always @ (*) begin - execute_CsrPlugin_readData = (32'b00000000000000000000000000000000); - case(execute_CsrPlugin_csrAddress) - 12'b101111000000 : begin - execute_CsrPlugin_readData[31 : 0] = _zz_207_; - end - 12'b001100000000 : begin - execute_CsrPlugin_readData[19 : 19] = MmuPlugin_status_mxr; - execute_CsrPlugin_readData[18 : 18] = MmuPlugin_status_sum; - execute_CsrPlugin_readData[17 : 17] = MmuPlugin_status_mprv; - execute_CsrPlugin_readData[12 : 11] = CsrPlugin_mstatus_MPP; - execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mstatus_MPIE; - execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mstatus_MIE; - execute_CsrPlugin_readData[8 : 8] = CsrPlugin_sstatus_SPP; - execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sstatus_SPIE; - execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sstatus_SIE; - end - 12'b001100000011 : begin - end - 12'b111100010001 : begin - execute_CsrPlugin_readData[0 : 0] = (1'b1); - end - 12'b000101000010 : begin - execute_CsrPlugin_readData[31 : 31] = CsrPlugin_scause_interrupt; - execute_CsrPlugin_readData[3 : 0] = CsrPlugin_scause_exceptionCode; - end - 12'b111100010100 : begin - end - 12'b100111000000 : begin - execute_CsrPlugin_readData[31 : 0] = _zz_209_; - end - 12'b000100000000 : begin - execute_CsrPlugin_readData[19 : 19] = MmuPlugin_status_mxr; - execute_CsrPlugin_readData[18 : 18] = MmuPlugin_status_sum; - execute_CsrPlugin_readData[17 : 17] = MmuPlugin_status_mprv; - execute_CsrPlugin_readData[8 : 8] = CsrPlugin_sstatus_SPP; - execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sstatus_SPIE; - execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sstatus_SIE; - end - 12'b001100000010 : begin - end - 12'b001101000001 : begin - execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mepc; - end - 12'b001101000100 : begin - execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mip_MEIP; - execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mip_MTIP; - execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mip_MSIP; - execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sip_STIP; - execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sip_SSIP; - execute_CsrPlugin_readData[9 : 9] = CsrPlugin_sip_SEIP_OR; - end - 12'b001100000101 : begin - end - 12'b000110000000 : begin - execute_CsrPlugin_readData[31 : 31] = MmuPlugin_satp_mode; - execute_CsrPlugin_readData[19 : 0] = MmuPlugin_satp_ppn; - end - 12'b110011000000 : begin - execute_CsrPlugin_readData[12 : 0] = (13'b1000000000000); - execute_CsrPlugin_readData[25 : 20] = (6'b100000); - end - 12'b000101000001 : begin - execute_CsrPlugin_readData[31 : 0] = CsrPlugin_sepc; - end - 12'b111100010011 : begin - execute_CsrPlugin_readData[1 : 0] = (2'b11); - end - 12'b000101000100 : begin - execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sip_STIP; - execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sip_SSIP; - execute_CsrPlugin_readData[9 : 9] = CsrPlugin_sip_SEIP_OR; - end - 12'b001101000011 : begin - execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mtval; - end - 12'b000100000101 : begin - execute_CsrPlugin_readData[31 : 2] = CsrPlugin_stvec_base; - execute_CsrPlugin_readData[1 : 0] = CsrPlugin_stvec_mode; - end - 12'b111111000000 : begin - execute_CsrPlugin_readData[31 : 0] = _zz_208_; - end - 12'b001101000000 : begin - execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mscratch; - end - 12'b001100000100 : begin - execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mie_MEIE; - execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mie_MTIE; - execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mie_MSIE; - execute_CsrPlugin_readData[9 : 9] = CsrPlugin_sie_SEIE; - execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sie_STIE; - execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sie_SSIE; - end - 12'b111100010010 : begin - execute_CsrPlugin_readData[1 : 0] = (2'b10); - end - 12'b000101000011 : begin - execute_CsrPlugin_readData[31 : 0] = CsrPlugin_stval; - end - 12'b110111000000 : begin - execute_CsrPlugin_readData[31 : 0] = _zz_210_; - end - 12'b000101000000 : begin - execute_CsrPlugin_readData[31 : 0] = CsrPlugin_sscratch; - end - 12'b001101000010 : begin - execute_CsrPlugin_readData[31 : 31] = CsrPlugin_mcause_interrupt; - execute_CsrPlugin_readData[3 : 0] = CsrPlugin_mcause_exceptionCode; - end - 12'b000100000100 : begin - execute_CsrPlugin_readData[9 : 9] = CsrPlugin_sie_SEIE; - execute_CsrPlugin_readData[5 : 5] = CsrPlugin_sie_STIE; - execute_CsrPlugin_readData[1 : 1] = CsrPlugin_sie_SSIE; - end - default : begin - end - endcase - end - - assign execute_CsrPlugin_writeInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_WRITE_OPCODE); - assign execute_CsrPlugin_readInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_READ_OPCODE); - assign execute_CsrPlugin_writeEnable = ((execute_CsrPlugin_writeInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); - assign execute_CsrPlugin_readEnable = ((execute_CsrPlugin_readInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); - always @ (*) begin - execute_CsrPlugin_readToWriteData = execute_CsrPlugin_readData; - case(execute_CsrPlugin_csrAddress) - 12'b001101000100 : begin - execute_CsrPlugin_readToWriteData[9 : 9] = CsrPlugin_sip_SEIP_SOFT; - end - 12'b000101000100 : begin - execute_CsrPlugin_readToWriteData[9 : 9] = CsrPlugin_sip_SEIP_SOFT; - end - default : begin - end - endcase - end - - always @ (*) begin - case(_zz_329_) - 1'b0 : begin - execute_CsrPlugin_writeData = execute_SRC1; - end - default : begin - execute_CsrPlugin_writeData = (execute_INSTRUCTION[12] ? (execute_CsrPlugin_readToWriteData & (~ execute_SRC1)) : (execute_CsrPlugin_readToWriteData | execute_SRC1)); - end - endcase - end - - assign execute_CsrPlugin_csrAddress = execute_INSTRUCTION[31 : 20]; - always @ (*) begin - memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b0; - if(_zz_276_)begin - if(_zz_284_)begin - memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b1; - end - end - end - - always @ (*) begin - memory_MulDivIterativePlugin_mul_counter_willClear = 1'b0; - if((! memory_arbitration_isStuck))begin - memory_MulDivIterativePlugin_mul_counter_willClear = 1'b1; - end - end - - assign memory_MulDivIterativePlugin_mul_willOverflowIfInc = (memory_MulDivIterativePlugin_mul_counter_value == (6'b100000)); - assign memory_MulDivIterativePlugin_mul_counter_willOverflow = (memory_MulDivIterativePlugin_mul_willOverflowIfInc && memory_MulDivIterativePlugin_mul_counter_willIncrement); - always @ (*) begin - if(memory_MulDivIterativePlugin_mul_counter_willOverflow)begin - memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); - end else begin - memory_MulDivIterativePlugin_mul_counter_valueNext = (memory_MulDivIterativePlugin_mul_counter_value + _zz_388_); - end - if(memory_MulDivIterativePlugin_mul_counter_willClear)begin - memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); - end - end - - always @ (*) begin - memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b0; - if(_zz_277_)begin - if(_zz_285_)begin - memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b1; - end - end - end - - always @ (*) begin - memory_MulDivIterativePlugin_div_counter_willClear = 1'b0; - if(_zz_304_)begin - memory_MulDivIterativePlugin_div_counter_willClear = 1'b1; - end - end - - assign memory_MulDivIterativePlugin_div_counter_willOverflowIfInc = (memory_MulDivIterativePlugin_div_counter_value == (6'b100001)); - assign memory_MulDivIterativePlugin_div_counter_willOverflow = (memory_MulDivIterativePlugin_div_counter_willOverflowIfInc && memory_MulDivIterativePlugin_div_counter_willIncrement); - always @ (*) begin - if(memory_MulDivIterativePlugin_div_counter_willOverflow)begin - memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); - end else begin - memory_MulDivIterativePlugin_div_counter_valueNext = (memory_MulDivIterativePlugin_div_counter_value + _zz_396_); - end - if(memory_MulDivIterativePlugin_div_counter_willClear)begin - memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); - end - end - - assign _zz_200_ = memory_MulDivIterativePlugin_rs1[31 : 0]; - assign _zz_201_ = {memory_MulDivIterativePlugin_accumulator[31 : 0],_zz_200_[31]}; - assign _zz_202_ = (_zz_201_ - _zz_397_); - assign _zz_203_ = (memory_INSTRUCTION[13] ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_rs1[31 : 0]); - assign _zz_204_ = (execute_RS2[31] && execute_IS_RS2_SIGNED); - assign _zz_205_ = ((execute_IS_MUL && _zz_204_) || ((execute_IS_DIV && execute_RS1[31]) && execute_IS_RS1_SIGNED)); - always @ (*) begin - _zz_206_[32] = (execute_IS_RS1_SIGNED && execute_RS1[31]); - _zz_206_[31 : 0] = execute_RS1; - end - - assign _zz_208_ = (_zz_207_ & externalInterruptArray_regNext); - assign externalInterrupt = (_zz_208_ != (32'b00000000000000000000000000000000)); - assign _zz_210_ = (_zz_209_ & externalInterruptArray_regNext); - assign externalInterruptS = (_zz_210_ != (32'b00000000000000000000000000000000)); - assign _zz_27_ = decode_SHIFT_CTRL; - assign _zz_24_ = execute_SHIFT_CTRL; - assign _zz_25_ = _zz_82_; - assign _zz_40_ = decode_to_execute_SHIFT_CTRL; - assign _zz_38_ = execute_to_memory_SHIFT_CTRL; - assign _zz_22_ = decode_ALU_CTRL; - assign _zz_20_ = _zz_81_; - assign _zz_50_ = decode_to_execute_ALU_CTRL; - assign _zz_19_ = decode_ENV_CTRL; - assign _zz_16_ = execute_ENV_CTRL; - assign _zz_14_ = memory_ENV_CTRL; - assign _zz_17_ = _zz_78_; - assign _zz_29_ = decode_to_execute_ENV_CTRL; - assign _zz_28_ = execute_to_memory_ENV_CTRL; - assign _zz_32_ = memory_to_writeBack_ENV_CTRL; - assign _zz_12_ = decode_SRC2_CTRL; - assign _zz_10_ = _zz_63_; - assign _zz_45_ = decode_to_execute_SRC2_CTRL; - assign _zz_9_ = decode_SRC1_CTRL; - assign _zz_7_ = _zz_62_; - assign _zz_47_ = decode_to_execute_SRC1_CTRL; - assign _zz_6_ = decode_ALU_BITWISE_CTRL; - assign _zz_4_ = _zz_70_; - assign _zz_52_ = decode_to_execute_ALU_BITWISE_CTRL; - assign _zz_3_ = decode_BRANCH_CTRL; - assign _zz_1_ = _zz_66_; - assign _zz_34_ = decode_to_execute_BRANCH_CTRL; - assign decode_arbitration_isFlushed = (({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,execute_arbitration_flushNext}} != (3'b000)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,{execute_arbitration_flushIt,decode_arbitration_flushIt}}} != (4'b0000))); - assign execute_arbitration_isFlushed = (({writeBack_arbitration_flushNext,memory_arbitration_flushNext} != (2'b00)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,execute_arbitration_flushIt}} != (3'b000))); - assign memory_arbitration_isFlushed = ((writeBack_arbitration_flushNext != (1'b0)) || ({writeBack_arbitration_flushIt,memory_arbitration_flushIt} != (2'b00))); - assign writeBack_arbitration_isFlushed = (1'b0 || (writeBack_arbitration_flushIt != (1'b0))); - assign decode_arbitration_isStuckByOthers = (decode_arbitration_haltByOther || (((1'b0 || execute_arbitration_isStuck) || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); - assign decode_arbitration_isStuck = (decode_arbitration_haltItself || decode_arbitration_isStuckByOthers); - assign decode_arbitration_isMoving = ((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)); - assign decode_arbitration_isFiring = ((decode_arbitration_isValid && (! decode_arbitration_isStuck)) && (! decode_arbitration_removeIt)); - assign execute_arbitration_isStuckByOthers = (execute_arbitration_haltByOther || ((1'b0 || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); - assign execute_arbitration_isStuck = (execute_arbitration_haltItself || execute_arbitration_isStuckByOthers); - assign execute_arbitration_isMoving = ((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)); - assign execute_arbitration_isFiring = ((execute_arbitration_isValid && (! execute_arbitration_isStuck)) && (! execute_arbitration_removeIt)); - assign memory_arbitration_isStuckByOthers = (memory_arbitration_haltByOther || (1'b0 || writeBack_arbitration_isStuck)); - assign memory_arbitration_isStuck = (memory_arbitration_haltItself || memory_arbitration_isStuckByOthers); - assign memory_arbitration_isMoving = ((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)); - assign memory_arbitration_isFiring = ((memory_arbitration_isValid && (! memory_arbitration_isStuck)) && (! memory_arbitration_removeIt)); - assign writeBack_arbitration_isStuckByOthers = (writeBack_arbitration_haltByOther || 1'b0); - assign writeBack_arbitration_isStuck = (writeBack_arbitration_haltItself || writeBack_arbitration_isStuckByOthers); - assign writeBack_arbitration_isMoving = ((! writeBack_arbitration_isStuck) && (! writeBack_arbitration_removeIt)); - assign writeBack_arbitration_isFiring = ((writeBack_arbitration_isValid && (! writeBack_arbitration_isStuck)) && (! writeBack_arbitration_removeIt)); - assign iBusWishbone_ADR = {_zz_455_,_zz_211_}; - assign iBusWishbone_CTI = ((_zz_211_ == (3'b111)) ? (3'b111) : (3'b010)); - assign iBusWishbone_BTE = (2'b00); - assign iBusWishbone_SEL = (4'b1111); - assign iBusWishbone_WE = 1'b0; - assign iBusWishbone_DAT_MOSI = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - always @ (*) begin - iBusWishbone_CYC = 1'b0; - if(_zz_305_)begin - iBusWishbone_CYC = 1'b1; - end - end - - always @ (*) begin - iBusWishbone_STB = 1'b0; - if(_zz_305_)begin - iBusWishbone_STB = 1'b1; - end - end - - assign iBus_cmd_ready = (iBus_cmd_valid && iBusWishbone_ACK); - assign iBus_rsp_valid = _zz_212_; - assign iBus_rsp_payload_data = iBusWishbone_DAT_MISO_regNext; - assign iBus_rsp_payload_error = 1'b0; - assign _zz_218_ = (dBus_cmd_payload_length != (3'b000)); - assign _zz_214_ = dBus_cmd_valid; - assign _zz_216_ = dBus_cmd_payload_wr; - assign _zz_217_ = (_zz_213_ == dBus_cmd_payload_length); - assign dBus_cmd_ready = (_zz_215_ && (_zz_216_ || _zz_217_)); - assign dBusWishbone_ADR = ((_zz_218_ ? {{dBus_cmd_payload_address[31 : 5],_zz_213_},(2'b00)} : {dBus_cmd_payload_address[31 : 2],(2'b00)}) >>> 2); - assign dBusWishbone_CTI = (_zz_218_ ? (_zz_217_ ? (3'b111) : (3'b010)) : (3'b000)); - assign dBusWishbone_BTE = (2'b00); - assign dBusWishbone_SEL = (_zz_216_ ? dBus_cmd_payload_mask : (4'b1111)); - assign dBusWishbone_WE = _zz_216_; - assign dBusWishbone_DAT_MOSI = dBus_cmd_payload_data; - assign _zz_215_ = (_zz_214_ && dBusWishbone_ACK); - assign dBusWishbone_CYC = _zz_214_; - assign dBusWishbone_STB = _zz_214_; - assign dBus_rsp_valid = _zz_219_; - assign dBus_rsp_payload_data = dBusWishbone_DAT_MISO_regNext; - assign dBus_rsp_payload_error = 1'b0; - always @ (posedge clk) begin - if(reset) begin - IBusCachedPlugin_fetchPc_pcReg <= externalResetVector; - IBusCachedPlugin_fetchPc_booted <= 1'b0; - IBusCachedPlugin_fetchPc_inc <= 1'b0; - _zz_109_ <= 1'b0; - _zz_111_ <= 1'b0; - _zz_114_ <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_5 <= 1'b0; - IBusCachedPlugin_injector_decodeRemoved <= 1'b0; - IBusCachedPlugin_rspCounter <= _zz_116_; - IBusCachedPlugin_rspCounter <= (32'b00000000000000000000000000000000); - _zz_117_ <= 1'b0; - _zz_124_ <= 1'b0; - DBusCachedPlugin_rspCounter <= _zz_131_; - DBusCachedPlugin_rspCounter <= (32'b00000000000000000000000000000000); - MmuPlugin_status_sum <= 1'b0; - MmuPlugin_status_mxr <= 1'b0; - MmuPlugin_status_mprv <= 1'b0; - MmuPlugin_satp_mode <= 1'b0; - MmuPlugin_ports_0_cache_0_valid <= 1'b0; - MmuPlugin_ports_0_cache_1_valid <= 1'b0; - MmuPlugin_ports_0_cache_2_valid <= 1'b0; - MmuPlugin_ports_0_cache_3_valid <= 1'b0; - MmuPlugin_ports_0_entryToReplace_value <= (2'b00); - MmuPlugin_ports_1_cache_0_valid <= 1'b0; - MmuPlugin_ports_1_cache_1_valid <= 1'b0; - MmuPlugin_ports_1_cache_2_valid <= 1'b0; - MmuPlugin_ports_1_cache_3_valid <= 1'b0; - MmuPlugin_ports_1_entryToReplace_value <= (2'b00); - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_IDLE; - _zz_159_ <= 1'b1; - _zz_172_ <= 1'b0; - _zz_191_ <= (2'b11); - CsrPlugin_mstatus_MIE <= 1'b0; - CsrPlugin_mstatus_MPIE <= 1'b0; - CsrPlugin_mstatus_MPP <= (2'b11); - CsrPlugin_mie_MEIE <= 1'b0; - CsrPlugin_mie_MTIE <= 1'b0; - CsrPlugin_mie_MSIE <= 1'b0; - CsrPlugin_medeleg_IAM <= 1'b0; - CsrPlugin_medeleg_IAF <= 1'b0; - CsrPlugin_medeleg_II <= 1'b0; - CsrPlugin_medeleg_LAM <= 1'b0; - CsrPlugin_medeleg_LAF <= 1'b0; - CsrPlugin_medeleg_SAM <= 1'b0; - CsrPlugin_medeleg_SAF <= 1'b0; - CsrPlugin_medeleg_EU <= 1'b0; - CsrPlugin_medeleg_ES <= 1'b0; - CsrPlugin_medeleg_IPF <= 1'b0; - CsrPlugin_medeleg_LPF <= 1'b0; - CsrPlugin_medeleg_SPF <= 1'b0; - CsrPlugin_mideleg_ST <= 1'b0; - CsrPlugin_mideleg_SE <= 1'b0; - CsrPlugin_mideleg_SS <= 1'b0; - CsrPlugin_sstatus_SIE <= 1'b0; - CsrPlugin_sstatus_SPIE <= 1'b0; - CsrPlugin_sstatus_SPP <= (1'b1); - CsrPlugin_sip_SEIP_SOFT <= 1'b0; - CsrPlugin_sip_STIP <= 1'b0; - CsrPlugin_sip_SSIP <= 1'b0; - CsrPlugin_sie_SEIE <= 1'b0; - CsrPlugin_sie_STIE <= 1'b0; - CsrPlugin_sie_SSIE <= 1'b0; - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= 1'b0; - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= 1'b0; - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; - CsrPlugin_interrupt_valid <= 1'b0; - CsrPlugin_lastStageWasWfi <= 1'b0; - CsrPlugin_hadException <= 1'b0; - execute_CsrPlugin_wfiWake <= 1'b0; - memory_MulDivIterativePlugin_mul_counter_value <= (6'b000000); - memory_MulDivIterativePlugin_div_counter_value <= (6'b000000); - _zz_207_ <= (32'b00000000000000000000000000000000); - _zz_209_ <= (32'b00000000000000000000000000000000); - execute_arbitration_isValid <= 1'b0; - memory_arbitration_isValid <= 1'b0; - writeBack_arbitration_isValid <= 1'b0; - execute_to_memory_IS_DBUS_SHARING <= 1'b0; - memory_to_writeBack_IS_DBUS_SHARING <= 1'b0; - memory_to_writeBack_REGFILE_WRITE_DATA <= (32'b00000000000000000000000000000000); - memory_to_writeBack_INSTRUCTION <= (32'b00000000000000000000000000000000); - _zz_211_ <= (3'b000); - _zz_212_ <= 1'b0; - _zz_213_ <= (3'b000); - _zz_219_ <= 1'b0; - end else begin - IBusCachedPlugin_fetchPc_booted <= 1'b1; - if((IBusCachedPlugin_fetchPc_corrected || IBusCachedPlugin_fetchPc_pcRegPropagate))begin - IBusCachedPlugin_fetchPc_inc <= 1'b0; - end - if((IBusCachedPlugin_fetchPc_output_valid && IBusCachedPlugin_fetchPc_output_ready))begin - IBusCachedPlugin_fetchPc_inc <= 1'b1; - end - if(((! IBusCachedPlugin_fetchPc_output_valid) && IBusCachedPlugin_fetchPc_output_ready))begin - IBusCachedPlugin_fetchPc_inc <= 1'b0; - end - if((IBusCachedPlugin_fetchPc_booted && ((IBusCachedPlugin_fetchPc_output_ready || IBusCachedPlugin_fetcherflushIt) || IBusCachedPlugin_fetchPc_pcRegPropagate)))begin - IBusCachedPlugin_fetchPc_pcReg <= IBusCachedPlugin_fetchPc_pc; - end - if(IBusCachedPlugin_fetcherflushIt)begin - _zz_109_ <= 1'b0; - end - if(_zz_107_)begin - _zz_109_ <= IBusCachedPlugin_iBusRsp_stages_0_output_valid; - end - if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin - _zz_111_ <= IBusCachedPlugin_iBusRsp_stages_1_output_valid; - end - if(IBusCachedPlugin_fetcherflushIt)begin - _zz_111_ <= 1'b0; - end - if(IBusCachedPlugin_iBusRsp_stages_2_output_ready)begin - _zz_114_ <= IBusCachedPlugin_iBusRsp_stages_2_output_valid; - end - if(IBusCachedPlugin_fetcherflushIt)begin - _zz_114_ <= 1'b0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; - end - if((! (! IBusCachedPlugin_iBusRsp_stages_1_input_ready)))begin - IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b1; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; - end - if((! (! IBusCachedPlugin_iBusRsp_stages_2_input_ready)))begin - IBusCachedPlugin_injector_nextPcCalc_valids_1 <= IBusCachedPlugin_injector_nextPcCalc_valids_0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; - end - if((! (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)))begin - IBusCachedPlugin_injector_nextPcCalc_valids_2 <= IBusCachedPlugin_injector_nextPcCalc_valids_1; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; - end - if((! execute_arbitration_isStuck))begin - IBusCachedPlugin_injector_nextPcCalc_valids_3 <= IBusCachedPlugin_injector_nextPcCalc_valids_2; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; - end - if((! memory_arbitration_isStuck))begin - IBusCachedPlugin_injector_nextPcCalc_valids_4 <= IBusCachedPlugin_injector_nextPcCalc_valids_3; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_5 <= 1'b0; - end - if((! writeBack_arbitration_isStuck))begin - IBusCachedPlugin_injector_nextPcCalc_valids_5 <= IBusCachedPlugin_injector_nextPcCalc_valids_4; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_5 <= 1'b0; - end - if(decode_arbitration_removeIt)begin - IBusCachedPlugin_injector_decodeRemoved <= 1'b1; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_decodeRemoved <= 1'b0; - end - if(iBus_rsp_valid)begin - IBusCachedPlugin_rspCounter <= (IBusCachedPlugin_rspCounter + (32'b00000000000000000000000000000001)); - end - if(dataCache_1__io_mem_cmd_s2mPipe_ready)begin - _zz_117_ <= 1'b0; - end - if(_zz_306_)begin - _zz_117_ <= dataCache_1__io_mem_cmd_valid; - end - if(dataCache_1__io_mem_cmd_s2mPipe_ready)begin - _zz_124_ <= dataCache_1__io_mem_cmd_s2mPipe_valid; - end - if(dBus_rsp_valid)begin - DBusCachedPlugin_rspCounter <= (DBusCachedPlugin_rspCounter + (32'b00000000000000000000000000000001)); - end - MmuPlugin_ports_0_entryToReplace_value <= MmuPlugin_ports_0_entryToReplace_valueNext; - if(contextSwitching)begin - if(MmuPlugin_ports_0_cache_0_exception)begin - MmuPlugin_ports_0_cache_0_valid <= 1'b0; - end - if(MmuPlugin_ports_0_cache_1_exception)begin - MmuPlugin_ports_0_cache_1_valid <= 1'b0; - end - if(MmuPlugin_ports_0_cache_2_exception)begin - MmuPlugin_ports_0_cache_2_valid <= 1'b0; - end - if(MmuPlugin_ports_0_cache_3_exception)begin - MmuPlugin_ports_0_cache_3_valid <= 1'b0; - end - end - MmuPlugin_ports_1_entryToReplace_value <= MmuPlugin_ports_1_entryToReplace_valueNext; - if(contextSwitching)begin - if(MmuPlugin_ports_1_cache_0_exception)begin - MmuPlugin_ports_1_cache_0_valid <= 1'b0; - end - if(MmuPlugin_ports_1_cache_1_exception)begin - MmuPlugin_ports_1_cache_1_valid <= 1'b0; - end - if(MmuPlugin_ports_1_cache_2_exception)begin - MmuPlugin_ports_1_cache_2_valid <= 1'b0; - end - if(MmuPlugin_ports_1_cache_3_exception)begin - MmuPlugin_ports_1_cache_3_valid <= 1'b0; - end - end - case(MmuPlugin_shared_state_1_) - `MmuPlugin_shared_State_defaultEncoding_IDLE : begin - if(_zz_307_)begin - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L1_CMD; - end - if(_zz_308_)begin - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L1_CMD; - end - end - `MmuPlugin_shared_State_defaultEncoding_L1_CMD : begin - if(MmuPlugin_dBusAccess_cmd_ready)begin - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L1_RSP; - end - end - `MmuPlugin_shared_State_defaultEncoding_L1_RSP : begin - if(MmuPlugin_dBusAccess_rsp_valid)begin - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L0_CMD; - if((MmuPlugin_shared_dBusRsp_leaf || MmuPlugin_shared_dBusRsp_exception))begin - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_IDLE; - end - if(MmuPlugin_dBusAccess_rsp_payload_redo)begin - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L1_CMD; - end - end - end - `MmuPlugin_shared_State_defaultEncoding_L0_CMD : begin - if(MmuPlugin_dBusAccess_cmd_ready)begin - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L0_RSP; - end - end - default : begin - if(MmuPlugin_dBusAccess_rsp_valid)begin - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_IDLE; - if(MmuPlugin_dBusAccess_rsp_payload_redo)begin - MmuPlugin_shared_state_1_ <= `MmuPlugin_shared_State_defaultEncoding_L0_CMD; - end - end - end - endcase - if(_zz_293_)begin - if(_zz_294_)begin - if(_zz_309_)begin - MmuPlugin_ports_0_cache_0_valid <= 1'b1; - end - if(_zz_310_)begin - MmuPlugin_ports_0_cache_1_valid <= 1'b1; - end - if(_zz_311_)begin - MmuPlugin_ports_0_cache_2_valid <= 1'b1; - end - if(_zz_312_)begin - MmuPlugin_ports_0_cache_3_valid <= 1'b1; - end - end - if(_zz_295_)begin - if(_zz_313_)begin - MmuPlugin_ports_1_cache_0_valid <= 1'b1; - end - if(_zz_314_)begin - MmuPlugin_ports_1_cache_1_valid <= 1'b1; - end - if(_zz_315_)begin - MmuPlugin_ports_1_cache_2_valid <= 1'b1; - end - if(_zz_316_)begin - MmuPlugin_ports_1_cache_3_valid <= 1'b1; - end - end - end - if((writeBack_arbitration_isValid && writeBack_IS_SFENCE_VMA))begin - MmuPlugin_ports_0_cache_0_valid <= 1'b0; - MmuPlugin_ports_0_cache_1_valid <= 1'b0; - MmuPlugin_ports_0_cache_2_valid <= 1'b0; - MmuPlugin_ports_0_cache_3_valid <= 1'b0; - MmuPlugin_ports_1_cache_0_valid <= 1'b0; - MmuPlugin_ports_1_cache_1_valid <= 1'b0; - MmuPlugin_ports_1_cache_2_valid <= 1'b0; - MmuPlugin_ports_1_cache_3_valid <= 1'b0; - end - _zz_159_ <= 1'b0; - _zz_172_ <= _zz_171_; - if((! decode_arbitration_isStuck))begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; - end else begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= CsrPlugin_exceptionPortCtrl_exceptionValids_decode; - end - if((! execute_arbitration_isStuck))begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= (CsrPlugin_exceptionPortCtrl_exceptionValids_decode && (! decode_arbitration_isStuck)); - end else begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= CsrPlugin_exceptionPortCtrl_exceptionValids_execute; - end - if((! memory_arbitration_isStuck))begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= (CsrPlugin_exceptionPortCtrl_exceptionValids_execute && (! execute_arbitration_isStuck)); - end else begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= CsrPlugin_exceptionPortCtrl_exceptionValids_memory; - end - if((! writeBack_arbitration_isStuck))begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= (CsrPlugin_exceptionPortCtrl_exceptionValids_memory && (! memory_arbitration_isStuck)); - end else begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; - end - CsrPlugin_interrupt_valid <= 1'b0; - if(_zz_317_)begin - if(_zz_318_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - if(_zz_319_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - if(_zz_320_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - end - if(_zz_321_)begin - if(_zz_322_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - if(_zz_323_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - if(_zz_324_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - if(_zz_325_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - if(_zz_326_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - if(_zz_327_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - end - CsrPlugin_lastStageWasWfi <= (writeBack_arbitration_isFiring && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_WFI)); - CsrPlugin_hadException <= CsrPlugin_exception; - if(_zz_286_)begin - _zz_191_ <= CsrPlugin_targetPrivilege; - case(CsrPlugin_targetPrivilege) - 2'b01 : begin - CsrPlugin_sstatus_SIE <= 1'b0; - CsrPlugin_sstatus_SPIE <= CsrPlugin_sstatus_SIE; - CsrPlugin_sstatus_SPP <= CsrPlugin_privilege[0 : 0]; - end - 2'b11 : begin - CsrPlugin_mstatus_MIE <= 1'b0; - CsrPlugin_mstatus_MPIE <= CsrPlugin_mstatus_MIE; - CsrPlugin_mstatus_MPP <= CsrPlugin_privilege; - end - default : begin - end - endcase - end - if(_zz_287_)begin - case(_zz_288_) - 2'b11 : begin - CsrPlugin_mstatus_MPP <= (2'b00); - CsrPlugin_mstatus_MIE <= CsrPlugin_mstatus_MPIE; - CsrPlugin_mstatus_MPIE <= 1'b1; - _zz_191_ <= CsrPlugin_mstatus_MPP; - end - 2'b01 : begin - CsrPlugin_sstatus_SPP <= (1'b0); - CsrPlugin_sstatus_SIE <= CsrPlugin_sstatus_SPIE; - CsrPlugin_sstatus_SPIE <= 1'b1; - _zz_191_ <= {(1'b0),CsrPlugin_sstatus_SPP}; - end - default : begin - end - endcase - end - execute_CsrPlugin_wfiWake <= ({_zz_197_,{_zz_196_,{_zz_195_,{_zz_194_,{_zz_193_,_zz_192_}}}}} != (6'b000000)); - memory_MulDivIterativePlugin_mul_counter_value <= memory_MulDivIterativePlugin_mul_counter_valueNext; - memory_MulDivIterativePlugin_div_counter_value <= memory_MulDivIterativePlugin_div_counter_valueNext; - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_INSTRUCTION <= memory_INSTRUCTION; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_IS_DBUS_SHARING <= execute_IS_DBUS_SHARING; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_IS_DBUS_SHARING <= memory_IS_DBUS_SHARING; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_REGFILE_WRITE_DATA <= _zz_37_; - end - if(((! execute_arbitration_isStuck) || execute_arbitration_removeIt))begin - execute_arbitration_isValid <= 1'b0; - end - if(((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)))begin - execute_arbitration_isValid <= decode_arbitration_isValid; - end - if(((! memory_arbitration_isStuck) || memory_arbitration_removeIt))begin - memory_arbitration_isValid <= 1'b0; - end - if(((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)))begin - memory_arbitration_isValid <= execute_arbitration_isValid; - end - if(((! writeBack_arbitration_isStuck) || writeBack_arbitration_removeIt))begin - writeBack_arbitration_isValid <= 1'b0; - end - if(((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)))begin - writeBack_arbitration_isValid <= memory_arbitration_isValid; - end - if(MmuPlugin_dBusAccess_rsp_valid)begin - memory_to_writeBack_IS_DBUS_SHARING <= 1'b0; - end - case(execute_CsrPlugin_csrAddress) - 12'b101111000000 : begin - if(execute_CsrPlugin_writeEnable)begin - _zz_207_ <= execute_CsrPlugin_writeData[31 : 0]; - end - end - 12'b001100000000 : begin - if(execute_CsrPlugin_writeEnable)begin - MmuPlugin_status_mxr <= _zz_410_[0]; - MmuPlugin_status_sum <= _zz_411_[0]; - MmuPlugin_status_mprv <= _zz_412_[0]; - CsrPlugin_mstatus_MPP <= execute_CsrPlugin_writeData[12 : 11]; - CsrPlugin_mstatus_MPIE <= _zz_413_[0]; - CsrPlugin_mstatus_MIE <= _zz_414_[0]; - CsrPlugin_sstatus_SPP <= execute_CsrPlugin_writeData[8 : 8]; - CsrPlugin_sstatus_SPIE <= _zz_415_[0]; - CsrPlugin_sstatus_SIE <= _zz_416_[0]; - end - end - 12'b001100000011 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mideleg_SE <= _zz_417_[0]; - CsrPlugin_mideleg_ST <= _zz_418_[0]; - CsrPlugin_mideleg_SS <= _zz_419_[0]; - end - end - 12'b111100010001 : begin - end - 12'b000101000010 : begin - end - 12'b111100010100 : begin - end - 12'b100111000000 : begin - if(execute_CsrPlugin_writeEnable)begin - _zz_209_ <= execute_CsrPlugin_writeData[31 : 0]; - end - end - 12'b000100000000 : begin - if(execute_CsrPlugin_writeEnable)begin - MmuPlugin_status_mxr <= _zz_421_[0]; - MmuPlugin_status_sum <= _zz_422_[0]; - MmuPlugin_status_mprv <= _zz_423_[0]; - CsrPlugin_sstatus_SPP <= execute_CsrPlugin_writeData[8 : 8]; - CsrPlugin_sstatus_SPIE <= _zz_424_[0]; - CsrPlugin_sstatus_SIE <= _zz_425_[0]; - end - end - 12'b001100000010 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_medeleg_EU <= _zz_426_[0]; - CsrPlugin_medeleg_II <= _zz_427_[0]; - CsrPlugin_medeleg_LAF <= _zz_428_[0]; - CsrPlugin_medeleg_LPF <= _zz_429_[0]; - CsrPlugin_medeleg_LAM <= _zz_430_[0]; - CsrPlugin_medeleg_SAF <= _zz_431_[0]; - CsrPlugin_medeleg_IAF <= _zz_432_[0]; - CsrPlugin_medeleg_ES <= _zz_433_[0]; - CsrPlugin_medeleg_IPF <= _zz_434_[0]; - CsrPlugin_medeleg_SPF <= _zz_435_[0]; - CsrPlugin_medeleg_SAM <= _zz_436_[0]; - CsrPlugin_medeleg_IAM <= _zz_437_[0]; - end - end - 12'b001101000001 : begin - end - 12'b001101000100 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_sip_STIP <= _zz_439_[0]; - CsrPlugin_sip_SSIP <= _zz_440_[0]; - CsrPlugin_sip_SEIP_SOFT <= _zz_441_[0]; - end - end - 12'b001100000101 : begin - end - 12'b000110000000 : begin - if(execute_CsrPlugin_writeEnable)begin - MmuPlugin_satp_mode <= _zz_442_[0]; - end - end - 12'b110011000000 : begin - end - 12'b000101000001 : begin - end - 12'b111100010011 : begin - end - 12'b000101000100 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_sip_STIP <= _zz_443_[0]; - CsrPlugin_sip_SSIP <= _zz_444_[0]; - CsrPlugin_sip_SEIP_SOFT <= _zz_445_[0]; - end - end - 12'b001101000011 : begin - end - 12'b000100000101 : begin - end - 12'b111111000000 : begin - end - 12'b001101000000 : begin - end - 12'b001100000100 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mie_MEIE <= _zz_446_[0]; - CsrPlugin_mie_MTIE <= _zz_447_[0]; - CsrPlugin_mie_MSIE <= _zz_448_[0]; - CsrPlugin_sie_SEIE <= _zz_449_[0]; - CsrPlugin_sie_STIE <= _zz_450_[0]; - CsrPlugin_sie_SSIE <= _zz_451_[0]; - end - end - 12'b111100010010 : begin - end - 12'b000101000011 : begin - end - 12'b110111000000 : begin - end - 12'b000101000000 : begin - end - 12'b001101000010 : begin - end - 12'b000100000100 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_sie_SEIE <= _zz_452_[0]; - CsrPlugin_sie_STIE <= _zz_453_[0]; - CsrPlugin_sie_SSIE <= _zz_454_[0]; - end - end - default : begin - end - endcase - if(_zz_305_)begin - if(iBusWishbone_ACK)begin - _zz_211_ <= (_zz_211_ + (3'b001)); - end - end - _zz_212_ <= (iBusWishbone_CYC && iBusWishbone_ACK); - if((_zz_214_ && _zz_215_))begin - _zz_213_ <= (_zz_213_ + (3'b001)); - if(_zz_217_)begin - _zz_213_ <= (3'b000); - end - end - _zz_219_ <= ((_zz_214_ && (! dBusWishbone_WE)) && dBusWishbone_ACK); - end - end - - always @ (posedge clk) begin - if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin - _zz_112_ <= IBusCachedPlugin_iBusRsp_stages_1_output_payload; - end - if(IBusCachedPlugin_iBusRsp_stages_2_output_ready)begin - _zz_115_ <= IBusCachedPlugin_iBusRsp_stages_2_output_payload; - end - if(IBusCachedPlugin_iBusRsp_stages_2_input_ready)begin - IBusCachedPlugin_s1_tightlyCoupledHit <= IBusCachedPlugin_s0_tightlyCoupledHit; - end - if(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)begin - IBusCachedPlugin_s2_tightlyCoupledHit <= IBusCachedPlugin_s1_tightlyCoupledHit; - end - if(_zz_306_)begin - _zz_118_ <= dataCache_1__io_mem_cmd_payload_wr; - _zz_119_ <= dataCache_1__io_mem_cmd_payload_address; - _zz_120_ <= dataCache_1__io_mem_cmd_payload_data; - _zz_121_ <= dataCache_1__io_mem_cmd_payload_mask; - _zz_122_ <= dataCache_1__io_mem_cmd_payload_length; - _zz_123_ <= dataCache_1__io_mem_cmd_payload_last; - end - if(dataCache_1__io_mem_cmd_s2mPipe_ready)begin - _zz_125_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_wr; - _zz_126_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_address; - _zz_127_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_data; - _zz_128_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_mask; - _zz_129_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_length; - _zz_130_ <= dataCache_1__io_mem_cmd_s2mPipe_payload_last; - end - if((MmuPlugin_dBusAccess_rsp_valid && (! MmuPlugin_dBusAccess_rsp_payload_redo)))begin - MmuPlugin_shared_pteBuffer_V <= MmuPlugin_shared_dBusRsp_pte_V; - MmuPlugin_shared_pteBuffer_R <= MmuPlugin_shared_dBusRsp_pte_R; - MmuPlugin_shared_pteBuffer_W <= MmuPlugin_shared_dBusRsp_pte_W; - MmuPlugin_shared_pteBuffer_X <= MmuPlugin_shared_dBusRsp_pte_X; - MmuPlugin_shared_pteBuffer_U <= MmuPlugin_shared_dBusRsp_pte_U; - MmuPlugin_shared_pteBuffer_G <= MmuPlugin_shared_dBusRsp_pte_G; - MmuPlugin_shared_pteBuffer_A <= MmuPlugin_shared_dBusRsp_pte_A; - MmuPlugin_shared_pteBuffer_D <= MmuPlugin_shared_dBusRsp_pte_D; - MmuPlugin_shared_pteBuffer_RSW <= MmuPlugin_shared_dBusRsp_pte_RSW; - MmuPlugin_shared_pteBuffer_PPN0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; - MmuPlugin_shared_pteBuffer_PPN1 <= MmuPlugin_shared_dBusRsp_pte_PPN1; - end - case(MmuPlugin_shared_state_1_) - `MmuPlugin_shared_State_defaultEncoding_IDLE : begin - if(_zz_307_)begin - MmuPlugin_shared_vpn_1 <= IBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22]; - MmuPlugin_shared_vpn_0 <= IBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]; - MmuPlugin_shared_portId <= (1'b0); - end - if(_zz_308_)begin - MmuPlugin_shared_vpn_1 <= DBusCachedPlugin_mmuBus_cmd_virtualAddress[31 : 22]; - MmuPlugin_shared_vpn_0 <= DBusCachedPlugin_mmuBus_cmd_virtualAddress[21 : 12]; - MmuPlugin_shared_portId <= (1'b1); - end - end - `MmuPlugin_shared_State_defaultEncoding_L1_CMD : begin - end - `MmuPlugin_shared_State_defaultEncoding_L1_RSP : begin - end - `MmuPlugin_shared_State_defaultEncoding_L0_CMD : begin - end - default : begin - end - endcase - if(_zz_293_)begin - if(_zz_294_)begin - if(_zz_309_)begin - MmuPlugin_ports_0_cache_0_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); - MmuPlugin_ports_0_cache_0_virtualAddress_0 <= MmuPlugin_shared_vpn_0; - MmuPlugin_ports_0_cache_0_virtualAddress_1 <= MmuPlugin_shared_vpn_1; - MmuPlugin_ports_0_cache_0_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; - MmuPlugin_ports_0_cache_0_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; - MmuPlugin_ports_0_cache_0_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; - MmuPlugin_ports_0_cache_0_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; - MmuPlugin_ports_0_cache_0_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; - MmuPlugin_ports_0_cache_0_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; - MmuPlugin_ports_0_cache_0_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); - end - if(_zz_310_)begin - MmuPlugin_ports_0_cache_1_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); - MmuPlugin_ports_0_cache_1_virtualAddress_0 <= MmuPlugin_shared_vpn_0; - MmuPlugin_ports_0_cache_1_virtualAddress_1 <= MmuPlugin_shared_vpn_1; - MmuPlugin_ports_0_cache_1_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; - MmuPlugin_ports_0_cache_1_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; - MmuPlugin_ports_0_cache_1_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; - MmuPlugin_ports_0_cache_1_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; - MmuPlugin_ports_0_cache_1_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; - MmuPlugin_ports_0_cache_1_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; - MmuPlugin_ports_0_cache_1_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); - end - if(_zz_311_)begin - MmuPlugin_ports_0_cache_2_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); - MmuPlugin_ports_0_cache_2_virtualAddress_0 <= MmuPlugin_shared_vpn_0; - MmuPlugin_ports_0_cache_2_virtualAddress_1 <= MmuPlugin_shared_vpn_1; - MmuPlugin_ports_0_cache_2_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; - MmuPlugin_ports_0_cache_2_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; - MmuPlugin_ports_0_cache_2_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; - MmuPlugin_ports_0_cache_2_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; - MmuPlugin_ports_0_cache_2_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; - MmuPlugin_ports_0_cache_2_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; - MmuPlugin_ports_0_cache_2_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); - end - if(_zz_312_)begin - MmuPlugin_ports_0_cache_3_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); - MmuPlugin_ports_0_cache_3_virtualAddress_0 <= MmuPlugin_shared_vpn_0; - MmuPlugin_ports_0_cache_3_virtualAddress_1 <= MmuPlugin_shared_vpn_1; - MmuPlugin_ports_0_cache_3_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; - MmuPlugin_ports_0_cache_3_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; - MmuPlugin_ports_0_cache_3_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; - MmuPlugin_ports_0_cache_3_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; - MmuPlugin_ports_0_cache_3_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; - MmuPlugin_ports_0_cache_3_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; - MmuPlugin_ports_0_cache_3_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); - end - end - if(_zz_295_)begin - if(_zz_313_)begin - MmuPlugin_ports_1_cache_0_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); - MmuPlugin_ports_1_cache_0_virtualAddress_0 <= MmuPlugin_shared_vpn_0; - MmuPlugin_ports_1_cache_0_virtualAddress_1 <= MmuPlugin_shared_vpn_1; - MmuPlugin_ports_1_cache_0_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; - MmuPlugin_ports_1_cache_0_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; - MmuPlugin_ports_1_cache_0_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; - MmuPlugin_ports_1_cache_0_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; - MmuPlugin_ports_1_cache_0_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; - MmuPlugin_ports_1_cache_0_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; - MmuPlugin_ports_1_cache_0_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); - end - if(_zz_314_)begin - MmuPlugin_ports_1_cache_1_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); - MmuPlugin_ports_1_cache_1_virtualAddress_0 <= MmuPlugin_shared_vpn_0; - MmuPlugin_ports_1_cache_1_virtualAddress_1 <= MmuPlugin_shared_vpn_1; - MmuPlugin_ports_1_cache_1_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; - MmuPlugin_ports_1_cache_1_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; - MmuPlugin_ports_1_cache_1_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; - MmuPlugin_ports_1_cache_1_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; - MmuPlugin_ports_1_cache_1_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; - MmuPlugin_ports_1_cache_1_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; - MmuPlugin_ports_1_cache_1_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); - end - if(_zz_315_)begin - MmuPlugin_ports_1_cache_2_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); - MmuPlugin_ports_1_cache_2_virtualAddress_0 <= MmuPlugin_shared_vpn_0; - MmuPlugin_ports_1_cache_2_virtualAddress_1 <= MmuPlugin_shared_vpn_1; - MmuPlugin_ports_1_cache_2_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; - MmuPlugin_ports_1_cache_2_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; - MmuPlugin_ports_1_cache_2_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; - MmuPlugin_ports_1_cache_2_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; - MmuPlugin_ports_1_cache_2_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; - MmuPlugin_ports_1_cache_2_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; - MmuPlugin_ports_1_cache_2_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); - end - if(_zz_316_)begin - MmuPlugin_ports_1_cache_3_exception <= (MmuPlugin_shared_dBusRsp_exception || ((MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP) && (MmuPlugin_shared_dBusRsp_pte_PPN0 != (10'b0000000000)))); - MmuPlugin_ports_1_cache_3_virtualAddress_0 <= MmuPlugin_shared_vpn_0; - MmuPlugin_ports_1_cache_3_virtualAddress_1 <= MmuPlugin_shared_vpn_1; - MmuPlugin_ports_1_cache_3_physicalAddress_0 <= MmuPlugin_shared_dBusRsp_pte_PPN0; - MmuPlugin_ports_1_cache_3_physicalAddress_1 <= MmuPlugin_shared_dBusRsp_pte_PPN1[9 : 0]; - MmuPlugin_ports_1_cache_3_allowRead <= MmuPlugin_shared_dBusRsp_pte_R; - MmuPlugin_ports_1_cache_3_allowWrite <= MmuPlugin_shared_dBusRsp_pte_W; - MmuPlugin_ports_1_cache_3_allowExecute <= MmuPlugin_shared_dBusRsp_pte_X; - MmuPlugin_ports_1_cache_3_allowUser <= MmuPlugin_shared_dBusRsp_pte_U; - MmuPlugin_ports_1_cache_3_superPage <= (MmuPlugin_shared_state_1_ == `MmuPlugin_shared_State_defaultEncoding_L1_RSP); - end - end - end - if(_zz_171_)begin - _zz_173_ <= _zz_53_[11 : 7]; - _zz_174_ <= _zz_87_; - end - CsrPlugin_mip_MEIP <= externalInterrupt; - CsrPlugin_mip_MTIP <= timerInterrupt; - CsrPlugin_mip_MSIP <= softwareInterrupt; - CsrPlugin_sip_SEIP_INPUT <= externalInterruptS; - CsrPlugin_mcycle <= (CsrPlugin_mcycle + (64'b0000000000000000000000000000000000000000000000000000000000000001)); - if(writeBack_arbitration_isFiring)begin - CsrPlugin_minstret <= (CsrPlugin_minstret + (64'b0000000000000000000000000000000000000000000000000000000000000001)); - end - if(_zz_282_)begin - CsrPlugin_exceptionPortCtrl_exceptionContext_code <= (_zz_199_ ? IBusCachedPlugin_decodeExceptionPort_payload_code : decodeExceptionPort_payload_code); - CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= (_zz_199_ ? IBusCachedPlugin_decodeExceptionPort_payload_badAddr : decodeExceptionPort_payload_badAddr); - end - if(CsrPlugin_selfException_valid)begin - CsrPlugin_exceptionPortCtrl_exceptionContext_code <= CsrPlugin_selfException_payload_code; - CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= CsrPlugin_selfException_payload_badAddr; - end - if(BranchPlugin_branchExceptionPort_valid)begin - CsrPlugin_exceptionPortCtrl_exceptionContext_code <= BranchPlugin_branchExceptionPort_payload_code; - CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= BranchPlugin_branchExceptionPort_payload_badAddr; - end - if(DBusCachedPlugin_exceptionBus_valid)begin - CsrPlugin_exceptionPortCtrl_exceptionContext_code <= DBusCachedPlugin_exceptionBus_payload_code; - CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= DBusCachedPlugin_exceptionBus_payload_badAddr; - end - if(_zz_317_)begin - if(_zz_318_)begin - CsrPlugin_interrupt_code <= (4'b0101); - CsrPlugin_interrupt_targetPrivilege <= (2'b01); - end - if(_zz_319_)begin - CsrPlugin_interrupt_code <= (4'b0001); - CsrPlugin_interrupt_targetPrivilege <= (2'b01); - end - if(_zz_320_)begin - CsrPlugin_interrupt_code <= (4'b1001); - CsrPlugin_interrupt_targetPrivilege <= (2'b01); - end - end - if(_zz_321_)begin - if(_zz_322_)begin - CsrPlugin_interrupt_code <= (4'b0101); - CsrPlugin_interrupt_targetPrivilege <= (2'b11); - end - if(_zz_323_)begin - CsrPlugin_interrupt_code <= (4'b0001); - CsrPlugin_interrupt_targetPrivilege <= (2'b11); - end - if(_zz_324_)begin - CsrPlugin_interrupt_code <= (4'b1001); - CsrPlugin_interrupt_targetPrivilege <= (2'b11); - end - if(_zz_325_)begin - CsrPlugin_interrupt_code <= (4'b0111); - CsrPlugin_interrupt_targetPrivilege <= (2'b11); - end - if(_zz_326_)begin - CsrPlugin_interrupt_code <= (4'b0011); - CsrPlugin_interrupt_targetPrivilege <= (2'b11); - end - if(_zz_327_)begin - CsrPlugin_interrupt_code <= (4'b1011); - CsrPlugin_interrupt_targetPrivilege <= (2'b11); - end - end - if(_zz_286_)begin - case(CsrPlugin_targetPrivilege) - 2'b01 : begin - CsrPlugin_scause_interrupt <= (! CsrPlugin_hadException); - CsrPlugin_scause_exceptionCode <= CsrPlugin_trapCause; - CsrPlugin_sepc <= writeBack_PC; - if(CsrPlugin_hadException)begin - CsrPlugin_stval <= CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; - end - end - 2'b11 : begin - CsrPlugin_mcause_interrupt <= (! CsrPlugin_hadException); - CsrPlugin_mcause_exceptionCode <= CsrPlugin_trapCause; - CsrPlugin_mepc <= writeBack_PC; - if(CsrPlugin_hadException)begin - CsrPlugin_mtval <= CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; - end - end - default : begin - end - endcase - end - if(_zz_276_)begin - if(_zz_284_)begin - memory_MulDivIterativePlugin_rs2 <= (memory_MulDivIterativePlugin_rs2 >>> 1); - memory_MulDivIterativePlugin_accumulator <= ({_zz_389_,memory_MulDivIterativePlugin_accumulator[31 : 0]} >>> 1); - end - end - if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin - memory_MulDivIterativePlugin_div_done <= 1'b1; - end - if((! memory_arbitration_isStuck))begin - memory_MulDivIterativePlugin_div_done <= 1'b0; - end - if(_zz_277_)begin - if(_zz_285_)begin - memory_MulDivIterativePlugin_rs1[31 : 0] <= _zz_398_[31:0]; - memory_MulDivIterativePlugin_accumulator[31 : 0] <= ((! _zz_202_[32]) ? _zz_399_ : _zz_400_); - if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin - memory_MulDivIterativePlugin_div_result <= _zz_401_[31:0]; - end - end - end - if(_zz_304_)begin - memory_MulDivIterativePlugin_accumulator <= (65'b00000000000000000000000000000000000000000000000000000000000000000); - memory_MulDivIterativePlugin_rs1 <= ((_zz_205_ ? (~ _zz_206_) : _zz_206_) + _zz_407_); - memory_MulDivIterativePlugin_rs2 <= ((_zz_204_ ? (~ execute_RS2) : execute_RS2) + _zz_409_); - memory_MulDivIterativePlugin_div_needRevert <= ((_zz_205_ ^ (_zz_204_ && (! execute_INSTRUCTION[13]))) && (! (((execute_RS2 == (32'b00000000000000000000000000000000)) && execute_IS_RS2_SIGNED) && (! execute_INSTRUCTION[13])))); - end - externalInterruptArray_regNext <= externalInterruptArray; - if((! memory_arbitration_isStuck))begin - execute_to_memory_BRANCH_DO <= execute_BRANCH_DO; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_MEMORY_LRSC <= decode_MEMORY_LRSC; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_RS2 <= decode_RS2; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SHIFT_CTRL <= _zz_26_; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_SHIFT_CTRL <= _zz_23_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_INSTRUCTION <= decode_INSTRUCTION; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_INSTRUCTION <= execute_INSTRUCTION; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_MEMORY_MANAGMENT <= decode_MEMORY_MANAGMENT; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_MUL <= decode_IS_MUL; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_IS_MUL <= execute_IS_MUL; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_CSR <= decode_IS_CSR; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_SHIFT_RIGHT <= execute_SHIFT_RIGHT; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_ALU_CTRL <= _zz_21_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC_LESS_UNSIGNED <= decode_SRC_LESS_UNSIGNED; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_REGFILE_WRITE_VALID <= decode_REGFILE_WRITE_VALID; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_REGFILE_WRITE_VALID <= execute_REGFILE_WRITE_VALID; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_REGFILE_WRITE_VALID <= memory_REGFILE_WRITE_VALID; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_ENV_CTRL <= _zz_18_; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_ENV_CTRL <= _zz_15_; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_ENV_CTRL <= _zz_13_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_PC <= decode_PC; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_PC <= _zz_44_; - end - if(((! writeBack_arbitration_isStuck) && (! CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack)))begin - memory_to_writeBack_PC <= memory_PC; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC2_CTRL <= _zz_11_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_BYPASSABLE_MEMORY_STAGE <= decode_BYPASSABLE_MEMORY_STAGE; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_BYPASSABLE_MEMORY_STAGE <= execute_BYPASSABLE_MEMORY_STAGE; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC_USE_SUB_LESS <= decode_SRC_USE_SUB_LESS; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_CSR_READ_OPCODE <= decode_CSR_READ_OPCODE; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_MEMORY_AMO <= decode_MEMORY_AMO; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_FORMAL_PC_NEXT <= _zz_94_; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_FORMAL_PC_NEXT <= execute_FORMAL_PC_NEXT; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_FORMAL_PC_NEXT <= _zz_93_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_MEMORY_WR <= decode_MEMORY_WR; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_MEMORY_WR <= execute_MEMORY_WR; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_MEMORY_WR <= memory_MEMORY_WR; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC1_CTRL <= _zz_8_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_RS1_SIGNED <= decode_IS_RS1_SIGNED; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_DIV <= decode_IS_DIV; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_IS_DIV <= execute_IS_DIV; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_MEMORY_ADDRESS_LOW <= execute_MEMORY_ADDRESS_LOW; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_MEMORY_ADDRESS_LOW <= memory_MEMORY_ADDRESS_LOW; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_ALU_BITWISE_CTRL <= _zz_5_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_SFENCE_VMA <= decode_IS_SFENCE_VMA; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_IS_SFENCE_VMA <= execute_IS_SFENCE_VMA; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_IS_SFENCE_VMA <= memory_IS_SFENCE_VMA; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_MEMORY_ENABLE <= decode_MEMORY_ENABLE; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_MEMORY_ENABLE <= execute_MEMORY_ENABLE; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_MEMORY_ENABLE <= memory_MEMORY_ENABLE; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_REGFILE_WRITE_DATA <= _zz_36_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_CSR_WRITE_OPCODE <= decode_CSR_WRITE_OPCODE; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_BRANCH_CTRL <= _zz_2_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_RS1 <= decode_RS1; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_BRANCH_CALC <= execute_BRANCH_CALC; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_RS2_SIGNED <= decode_IS_RS2_SIGNED; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_BYPASSABLE_EXECUTE_STAGE <= decode_BYPASSABLE_EXECUTE_STAGE; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC2_FORCE_ZERO <= decode_SRC2_FORCE_ZERO; - end - case(execute_CsrPlugin_csrAddress) - 12'b101111000000 : begin - end - 12'b001100000000 : begin - end - 12'b001100000011 : begin - end - 12'b111100010001 : begin - end - 12'b000101000010 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_scause_interrupt <= _zz_420_[0]; - CsrPlugin_scause_exceptionCode <= execute_CsrPlugin_writeData[3 : 0]; - end - end - 12'b111100010100 : begin - end - 12'b100111000000 : begin - end - 12'b000100000000 : begin - end - 12'b001100000010 : begin - end - 12'b001101000001 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mepc <= execute_CsrPlugin_writeData[31 : 0]; - end - end - 12'b001101000100 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mip_MSIP <= _zz_438_[0]; - end - end - 12'b001100000101 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mtvec_base <= execute_CsrPlugin_writeData[31 : 2]; - CsrPlugin_mtvec_mode <= execute_CsrPlugin_writeData[1 : 0]; - end - end - 12'b000110000000 : begin - if(execute_CsrPlugin_writeEnable)begin - MmuPlugin_satp_ppn <= execute_CsrPlugin_writeData[19 : 0]; - end - end - 12'b110011000000 : begin - end - 12'b000101000001 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_sepc <= execute_CsrPlugin_writeData[31 : 0]; - end - end - 12'b111100010011 : begin - end - 12'b000101000100 : begin - end - 12'b001101000011 : begin - end - 12'b000100000101 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_stvec_base <= execute_CsrPlugin_writeData[31 : 2]; - CsrPlugin_stvec_mode <= execute_CsrPlugin_writeData[1 : 0]; - end - end - 12'b111111000000 : begin - end - 12'b001101000000 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mscratch <= execute_CsrPlugin_writeData[31 : 0]; - end - end - 12'b001100000100 : begin - end - 12'b111100010010 : begin - end - 12'b000101000011 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_stval <= execute_CsrPlugin_writeData[31 : 0]; - end - end - 12'b110111000000 : begin - end - 12'b000101000000 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_sscratch <= execute_CsrPlugin_writeData[31 : 0]; - end - end - 12'b001101000010 : begin - end - 12'b000100000100 : begin - end - default : begin - end - endcase - iBusWishbone_DAT_MISO_regNext <= iBusWishbone_DAT_MISO; - dBusWishbone_DAT_MISO_regNext <= dBusWishbone_DAT_MISO; - end - -endmodule - diff --git a/sdc-plugin/tests/base_litex/base_litex.sdc b/sdc-plugin/tests/base_litex/base_litex.sdc deleted file mode 100644 index 7ce1f0df0..000000000 --- a/sdc-plugin/tests/base_litex/base_litex.sdc +++ /dev/null @@ -1,59 +0,0 @@ -create_clock -name clk100 -period 10.0 clk100 - -# Input clock 100 MHz -create_clock -period 10 clk100_ibuf -waveform {0.000 5.000} - -# Input clock BUFG 100 MHz -create_clock -period 10 soc_clk100bg -waveform {0.000 5.000} - -# PLL feedback loop 100 MHz -create_clock -period 10 soc_pll_fb -waveform {0.000 5.000} - -# PLL CLKOUT0 60 MHz -create_clock -period 16.666 soc_pll_sys -waveform {0.000 8.333} - -# BUFG CLKOUT0 60 MHz -create_clock -period 16.666 sys_clk -waveform {0.000 8.333} - -# PLL CLKOUT1 240 MHz -create_clock -period 4.166 soc_pll_sys4x -waveform {0.000 2.083} - -# BUFG CLKOUT1 240 MHz -create_clock -period 4.166 sys4x_clk -waveform {0.000 2.083} - -# PLL CLKOUT2 240 MHz -create_clock -period 4.166 soc_pll_sys4x_dqs -waveform {1.041 3.124} - -# BUFG CLKOUT2 240 MHz -create_clock -period 4.166 sys4x_dqs_clk -waveform {1.041 3.124} - -# PLL CLKOUT3 200 MHz -create_clock -period 5 soc_pll_clk200 -waveform {0.000 2.500} - -# BUFG CLKOUT3 200 MHz -create_clock -period 5 clk200_clk -waveform {0.000 2.500} - -# PLL CLKOUT4 25 MHz -create_clock -period 40 soc_pll_clk100 -waveform {0.000 20.000} - -# BUFG CLKOUT4 25 MHz -create_clock -period 40 eth_ref_clk_obuf -waveform {0.000 20.000} - -set_clock_groups -exclusive -group {clk100 soc_clk100bg soc_pll_fb} -group {soc_pll_sys sys_clk} -group {soc_pll_sys4x soc_pll_sys4x_dqs} -group {soc_pll_clk200 clk200_clk} -#create_clock -name sys_clk -period 16.666 [get_nets sys_clk] -# -#create_clock -name eth_rx_clk -period 40.0 [get_nets eth_rx_clk] -# -#create_clock -name eth_tx_clk -period 40.0 [get_nets eth_tx_clk] -# -#set_clock_groups -group [get_clocks -include_generated_clocks -of [get_nets sys_clk]] -group [get_clocks -include_generated_clocks -of [get_nets eth_rx_clk]] -asynchronous -# -#set_clock_groups -group [get_clocks -include_generated_clocks -of [get_nets sys_clk]] -group [get_clocks -include_generated_clocks -of [get_nets eth_tx_clk]] -asynchronous -# -#set_clock_groups -group [get_clocks -include_generated_clocks -of [get_nets eth_rx_clk]] -group [get_clocks -include_generated_clocks -of [get_nets eth_tx_clk]] -asynchronous -# -#set_false_path -quiet -to [get_nets -quiet -filter {mr_ff == TRUE}] -# -#set_false_path -quiet -to [get_pins -quiet -filter {REF_PIN_NAME == PRE} -of [get_cells -quiet -filter {ars_ff1 == TRUE || ars_ff2 == TRUE}]] -# -#set_max_delay 2 -quiet -from [get_pins -quiet -filter {REF_PIN_NAME == Q} -of [get_cells -quiet -filter {ars_ff1 == TRUE}]] -to [get_pins -quiet -filter {REF_PIN_NAME == D} -of [get_cells -quiet -filter {ars_ff2 == TRUE}]] diff --git a/sdc-plugin/tests/base_litex/base_litex.tcl b/sdc-plugin/tests/base_litex/base_litex.tcl deleted file mode 100644 index efee8f4f4..000000000 --- a/sdc-plugin/tests/base_litex/base_litex.tcl +++ /dev/null @@ -1,38 +0,0 @@ -yosys -import -plugin -i xdc -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import - -read_verilog base_litex.v -read_verilog VexRiscv_Linux.v -read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v -read_verilog -lib +/xilinx/cells_xtra.v -hierarchy -check -auto-top - -# Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check - -write_json $::env(OUT_JSON) -return -#Read the design timing constraints -read_sdc $::env(INPUT_SDC_FILE) - -#Read the design constraints -read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) - -# Map Xilinx tech library to 7-series VPR tech library. -read_verilog -lib ../techmaps/cells_sim.v -techmap -map ../techmaps/cells_map.v - -# opt_expr -undriven makes sure all nets are driven, if only by the $undef -# net. -opt_expr -undriven -opt_clean - -setundef -zero -params -stat - -# Write the design in JSON format. -write_json $::env(OUT_JSON) -write_blif -attr -param -cname -conn $::env(OUT_EBLIF) diff --git a/sdc-plugin/tests/base_litex/base_litex.v b/sdc-plugin/tests/base_litex/base_litex.v deleted file mode 100644 index 1689edab0..000000000 --- a/sdc-plugin/tests/base_litex/base_litex.v +++ /dev/null @@ -1,15844 +0,0 @@ -//-------------------------------------------------------------------------------- -// Auto-generated by Migen (d11565a) & LiteX (02bfda5e) on 2020-02-19 17:32:00 -//-------------------------------------------------------------------------------- -module top( - output reg serial_tx, - input serial_rx, - input clk100, - input cpu_reset, - output eth_ref_clk, - output [13:0] ddram_a, - output [2:0] ddram_ba, - output ddram_ras_n, - output ddram_cas_n, - output ddram_we_n, - output ddram_cs_n, - output [1:0] ddram_dm, - inout [15:0] ddram_dq, - output [1:0] ddram_dqs_p, - output [1:0] ddram_dqs_n, - output ddram_clk_p, - output ddram_clk_n, - output ddram_cke, - output ddram_odt, - output ddram_reset_n, - input eth_clocks_tx, - input eth_clocks_rx, - output eth_rst_n, - inout eth_mdio, - output eth_mdc, - input eth_rx_dv, - input eth_rx_er, - input [3:0] eth_rx_data, - output reg eth_tx_en, - output reg [3:0] eth_tx_data, - input eth_col, - input eth_crs, - output [3:0] led -); - -wire [3:0] led; - -assign led[0] = idelayctl_rdy; -assign led[1] = soc_pll_locked; -assign led[2] = 0; -assign led[3] = 0; - -// Manually inserted OBUFs -wire [13:0] ddram_a; -wire [ 2:0] ddram_ba; -wire ddram_ras_n; -wire ddram_cas_n; -wire ddram_we_n; -wire ddram_cs_n; -wire [ 1:0] ddram_dm; -wire ddram_cke; -wire ddram_odt; -wire ddram_reset_n; - -// End manually inserted OBUFs - -wire eth_ref_clk_obuf; -wire idelayctl_rdy; -wire soc_netsoc_ctrl_reset_reset_re; -wire soc_netsoc_ctrl_reset_reset_r; -wire soc_netsoc_ctrl_reset_reset_we; -reg soc_netsoc_ctrl_reset_reset_w = 1'd0; -reg [31:0] soc_netsoc_ctrl_storage = 32'd305419896; -reg soc_netsoc_ctrl_re = 1'd0; -wire [31:0] soc_netsoc_ctrl_bus_errors_status; -wire soc_netsoc_ctrl_bus_errors_we; -wire soc_netsoc_ctrl_reset; -wire soc_netsoc_ctrl_bus_error; -reg [31:0] soc_netsoc_ctrl_bus_errors = 32'd0; -wire soc_netsoc_cpu_reset; -wire [29:0] soc_netsoc_cpu_ibus_adr; -wire [31:0] soc_netsoc_cpu_ibus_dat_w; -wire [31:0] soc_netsoc_cpu_ibus_dat_r; -wire [3:0] soc_netsoc_cpu_ibus_sel; -wire soc_netsoc_cpu_ibus_cyc; -wire soc_netsoc_cpu_ibus_stb; -wire soc_netsoc_cpu_ibus_ack; -wire soc_netsoc_cpu_ibus_we; -wire [2:0] soc_netsoc_cpu_ibus_cti; -wire [1:0] soc_netsoc_cpu_ibus_bte; -wire soc_netsoc_cpu_ibus_err; -wire [29:0] soc_netsoc_cpu_dbus_adr; -wire [31:0] soc_netsoc_cpu_dbus_dat_w; -wire [31:0] soc_netsoc_cpu_dbus_dat_r; -wire [3:0] soc_netsoc_cpu_dbus_sel; -wire soc_netsoc_cpu_dbus_cyc; -wire soc_netsoc_cpu_dbus_stb; -wire soc_netsoc_cpu_dbus_ack; -wire soc_netsoc_cpu_dbus_we; -wire [2:0] soc_netsoc_cpu_dbus_cti; -wire [1:0] soc_netsoc_cpu_dbus_bte; -wire soc_netsoc_cpu_dbus_err; -reg [31:0] soc_netsoc_cpu_interrupt0 = 32'd0; -wire soc_netsoc_cpu_latch_re; -wire soc_netsoc_cpu_latch_r; -wire soc_netsoc_cpu_latch_we; -reg soc_netsoc_cpu_latch_w = 1'd0; -reg [63:0] soc_netsoc_cpu_time_status = 64'd0; -wire soc_netsoc_cpu_time_we; -reg [63:0] soc_netsoc_cpu_time_cmp_storage = 64'd18446744073709551615; -reg soc_netsoc_cpu_time_cmp_re = 1'd0; -wire soc_netsoc_cpu_interrupt1; -reg [63:0] soc_netsoc_cpu_time = 64'd0; -reg [63:0] soc_netsoc_cpu_time_cmp = 64'd18446744073709551615; -wire [29:0] soc_netsoc_interface0_soc_bus_adr; -wire [31:0] soc_netsoc_interface0_soc_bus_dat_w; -wire [31:0] soc_netsoc_interface0_soc_bus_dat_r; -wire [3:0] soc_netsoc_interface0_soc_bus_sel; -wire soc_netsoc_interface0_soc_bus_cyc; -wire soc_netsoc_interface0_soc_bus_stb; -wire soc_netsoc_interface0_soc_bus_ack; -wire soc_netsoc_interface0_soc_bus_we; -wire [2:0] soc_netsoc_interface0_soc_bus_cti; -wire [1:0] soc_netsoc_interface0_soc_bus_bte; -wire soc_netsoc_interface0_soc_bus_err; -wire [29:0] soc_netsoc_interface1_soc_bus_adr; -wire [31:0] soc_netsoc_interface1_soc_bus_dat_w; -wire [31:0] soc_netsoc_interface1_soc_bus_dat_r; -wire [3:0] soc_netsoc_interface1_soc_bus_sel; -wire soc_netsoc_interface1_soc_bus_cyc; -wire soc_netsoc_interface1_soc_bus_stb; -wire soc_netsoc_interface1_soc_bus_ack; -wire soc_netsoc_interface1_soc_bus_we; -wire [2:0] soc_netsoc_interface1_soc_bus_cti; -wire [1:0] soc_netsoc_interface1_soc_bus_bte; -wire soc_netsoc_interface1_soc_bus_err; -wire [29:0] soc_netsoc_rom_bus_adr; -wire [31:0] soc_netsoc_rom_bus_dat_w; -wire [31:0] soc_netsoc_rom_bus_dat_r; -wire [3:0] soc_netsoc_rom_bus_sel; -wire soc_netsoc_rom_bus_cyc; -wire soc_netsoc_rom_bus_stb; -reg soc_netsoc_rom_bus_ack = 1'd0; -wire soc_netsoc_rom_bus_we; -wire [2:0] soc_netsoc_rom_bus_cti; -wire [1:0] soc_netsoc_rom_bus_bte; -reg soc_netsoc_rom_bus_err = 1'd0; -wire [13:0] soc_netsoc_rom_adr; -wire [31:0] soc_netsoc_rom_dat_r; -wire [29:0] soc_netsoc_sram_bus_adr; -wire [31:0] soc_netsoc_sram_bus_dat_w; -wire [31:0] soc_netsoc_sram_bus_dat_r; -wire [3:0] soc_netsoc_sram_bus_sel; -wire soc_netsoc_sram_bus_cyc; -wire soc_netsoc_sram_bus_stb; -reg soc_netsoc_sram_bus_ack = 1'd0; -wire soc_netsoc_sram_bus_we; -wire [2:0] soc_netsoc_sram_bus_cti; -wire [1:0] soc_netsoc_sram_bus_bte; -reg soc_netsoc_sram_bus_err = 1'd0; -wire [12:0] soc_netsoc_sram_adr; -wire [31:0] soc_netsoc_sram_dat_r; -reg [3:0] soc_netsoc_sram_we = 4'd0; -wire [31:0] soc_netsoc_sram_dat_w; -reg [31:0] soc_netsoc_uart_phy_storage = 32'd8246337; -reg soc_netsoc_uart_phy_re = 1'd0; -wire soc_netsoc_uart_phy_sink_valid; -reg soc_netsoc_uart_phy_sink_ready = 1'd0; -wire soc_netsoc_uart_phy_sink_first; -wire soc_netsoc_uart_phy_sink_last; -wire [7:0] soc_netsoc_uart_phy_sink_payload_data; -reg soc_netsoc_uart_phy_uart_clk_txen = 1'd0; -reg [31:0] soc_netsoc_uart_phy_phase_accumulator_tx = 32'd0; -reg [7:0] soc_netsoc_uart_phy_tx_reg = 8'd0; -reg [3:0] soc_netsoc_uart_phy_tx_bitcount = 4'd0; -reg soc_netsoc_uart_phy_tx_busy = 1'd0; -reg soc_netsoc_uart_phy_source_valid = 1'd0; -wire soc_netsoc_uart_phy_source_ready; -reg soc_netsoc_uart_phy_source_first = 1'd0; -reg soc_netsoc_uart_phy_source_last = 1'd0; -reg [7:0] soc_netsoc_uart_phy_source_payload_data = 8'd0; -reg soc_netsoc_uart_phy_uart_clk_rxen = 1'd0; -reg [31:0] soc_netsoc_uart_phy_phase_accumulator_rx = 32'd0; -wire soc_netsoc_uart_phy_rx; -reg soc_netsoc_uart_phy_rx_r = 1'd0; -reg [7:0] soc_netsoc_uart_phy_rx_reg = 8'd0; -reg [3:0] soc_netsoc_uart_phy_rx_bitcount = 4'd0; -reg soc_netsoc_uart_phy_rx_busy = 1'd0; -wire soc_netsoc_uart_rxtx_re; -wire [7:0] soc_netsoc_uart_rxtx_r; -wire soc_netsoc_uart_rxtx_we; -wire [7:0] soc_netsoc_uart_rxtx_w; -wire soc_netsoc_uart_txfull_status; -wire soc_netsoc_uart_txfull_we; -wire soc_netsoc_uart_rxempty_status; -wire soc_netsoc_uart_rxempty_we; -wire soc_netsoc_uart_irq; -wire soc_netsoc_uart_tx_status; -reg soc_netsoc_uart_tx_pending = 1'd0; -wire soc_netsoc_uart_tx_trigger; -reg soc_netsoc_uart_tx_clear = 1'd0; -reg soc_netsoc_uart_tx_old_trigger = 1'd0; -wire soc_netsoc_uart_rx_status; -reg soc_netsoc_uart_rx_pending = 1'd0; -wire soc_netsoc_uart_rx_trigger; -reg soc_netsoc_uart_rx_clear = 1'd0; -reg soc_netsoc_uart_rx_old_trigger = 1'd0; -wire soc_netsoc_uart_eventmanager_status_re; -wire [1:0] soc_netsoc_uart_eventmanager_status_r; -wire soc_netsoc_uart_eventmanager_status_we; -reg [1:0] soc_netsoc_uart_eventmanager_status_w = 2'd0; -wire soc_netsoc_uart_eventmanager_pending_re; -wire [1:0] soc_netsoc_uart_eventmanager_pending_r; -wire soc_netsoc_uart_eventmanager_pending_we; -reg [1:0] soc_netsoc_uart_eventmanager_pending_w = 2'd0; -reg [1:0] soc_netsoc_uart_eventmanager_storage = 2'd0; -reg soc_netsoc_uart_eventmanager_re = 1'd0; -wire soc_netsoc_uart_tx_fifo_sink_valid; -wire soc_netsoc_uart_tx_fifo_sink_ready; -reg soc_netsoc_uart_tx_fifo_sink_first = 1'd0; -reg soc_netsoc_uart_tx_fifo_sink_last = 1'd0; -wire [7:0] soc_netsoc_uart_tx_fifo_sink_payload_data; -wire soc_netsoc_uart_tx_fifo_source_valid; -wire soc_netsoc_uart_tx_fifo_source_ready; -wire soc_netsoc_uart_tx_fifo_source_first; -wire soc_netsoc_uart_tx_fifo_source_last; -wire [7:0] soc_netsoc_uart_tx_fifo_source_payload_data; -wire soc_netsoc_uart_tx_fifo_re; -reg soc_netsoc_uart_tx_fifo_readable = 1'd0; -wire soc_netsoc_uart_tx_fifo_syncfifo_we; -wire soc_netsoc_uart_tx_fifo_syncfifo_writable; -wire soc_netsoc_uart_tx_fifo_syncfifo_re; -wire soc_netsoc_uart_tx_fifo_syncfifo_readable; -wire [9:0] soc_netsoc_uart_tx_fifo_syncfifo_din; -wire [9:0] soc_netsoc_uart_tx_fifo_syncfifo_dout; -reg [4:0] soc_netsoc_uart_tx_fifo_level0 = 5'd0; -reg soc_netsoc_uart_tx_fifo_replace = 1'd0; -reg [3:0] soc_netsoc_uart_tx_fifo_produce = 4'd0; -reg [3:0] soc_netsoc_uart_tx_fifo_consume = 4'd0; -reg [3:0] soc_netsoc_uart_tx_fifo_wrport_adr = 4'd0; -wire [9:0] soc_netsoc_uart_tx_fifo_wrport_dat_r; -wire soc_netsoc_uart_tx_fifo_wrport_we; -wire [9:0] soc_netsoc_uart_tx_fifo_wrport_dat_w; -wire soc_netsoc_uart_tx_fifo_do_read; -wire [3:0] soc_netsoc_uart_tx_fifo_rdport_adr; -wire [9:0] soc_netsoc_uart_tx_fifo_rdport_dat_r; -wire soc_netsoc_uart_tx_fifo_rdport_re; -wire [4:0] soc_netsoc_uart_tx_fifo_level1; -wire [7:0] soc_netsoc_uart_tx_fifo_fifo_in_payload_data; -wire soc_netsoc_uart_tx_fifo_fifo_in_first; -wire soc_netsoc_uart_tx_fifo_fifo_in_last; -wire [7:0] soc_netsoc_uart_tx_fifo_fifo_out_payload_data; -wire soc_netsoc_uart_tx_fifo_fifo_out_first; -wire soc_netsoc_uart_tx_fifo_fifo_out_last; -wire soc_netsoc_uart_rx_fifo_sink_valid; -wire soc_netsoc_uart_rx_fifo_sink_ready; -wire soc_netsoc_uart_rx_fifo_sink_first; -wire soc_netsoc_uart_rx_fifo_sink_last; -wire [7:0] soc_netsoc_uart_rx_fifo_sink_payload_data; -wire soc_netsoc_uart_rx_fifo_source_valid; -wire soc_netsoc_uart_rx_fifo_source_ready; -wire soc_netsoc_uart_rx_fifo_source_first; -wire soc_netsoc_uart_rx_fifo_source_last; -wire [7:0] soc_netsoc_uart_rx_fifo_source_payload_data; -wire soc_netsoc_uart_rx_fifo_re; -reg soc_netsoc_uart_rx_fifo_readable = 1'd0; -wire soc_netsoc_uart_rx_fifo_syncfifo_we; -wire soc_netsoc_uart_rx_fifo_syncfifo_writable; -wire soc_netsoc_uart_rx_fifo_syncfifo_re; -wire soc_netsoc_uart_rx_fifo_syncfifo_readable; -wire [9:0] soc_netsoc_uart_rx_fifo_syncfifo_din; -wire [9:0] soc_netsoc_uart_rx_fifo_syncfifo_dout; -reg [4:0] soc_netsoc_uart_rx_fifo_level0 = 5'd0; -reg soc_netsoc_uart_rx_fifo_replace = 1'd0; -reg [3:0] soc_netsoc_uart_rx_fifo_produce = 4'd0; -reg [3:0] soc_netsoc_uart_rx_fifo_consume = 4'd0; -reg [3:0] soc_netsoc_uart_rx_fifo_wrport_adr = 4'd0; -wire [9:0] soc_netsoc_uart_rx_fifo_wrport_dat_r; -wire soc_netsoc_uart_rx_fifo_wrport_we; -wire [9:0] soc_netsoc_uart_rx_fifo_wrport_dat_w; -wire soc_netsoc_uart_rx_fifo_do_read; -wire [3:0] soc_netsoc_uart_rx_fifo_rdport_adr; -wire [9:0] soc_netsoc_uart_rx_fifo_rdport_dat_r; -wire soc_netsoc_uart_rx_fifo_rdport_re; -wire [4:0] soc_netsoc_uart_rx_fifo_level1; -wire [7:0] soc_netsoc_uart_rx_fifo_fifo_in_payload_data; -wire soc_netsoc_uart_rx_fifo_fifo_in_first; -wire soc_netsoc_uart_rx_fifo_fifo_in_last; -wire [7:0] soc_netsoc_uart_rx_fifo_fifo_out_payload_data; -wire soc_netsoc_uart_rx_fifo_fifo_out_first; -wire soc_netsoc_uart_rx_fifo_fifo_out_last; -reg soc_netsoc_uart_reset = 1'd0; -reg [31:0] soc_netsoc_timer0_load_storage = 32'd0; -reg soc_netsoc_timer0_load_re = 1'd0; -reg [31:0] soc_netsoc_timer0_reload_storage = 32'd0; -reg soc_netsoc_timer0_reload_re = 1'd0; -reg soc_netsoc_timer0_en_storage = 1'd0; -reg soc_netsoc_timer0_en_re = 1'd0; -reg soc_netsoc_timer0_update_value_storage = 1'd0; -reg soc_netsoc_timer0_update_value_re = 1'd0; -reg [31:0] soc_netsoc_timer0_value_status = 32'd0; -wire soc_netsoc_timer0_value_we; -wire soc_netsoc_timer0_irq; -wire soc_netsoc_timer0_zero_status; -reg soc_netsoc_timer0_zero_pending = 1'd0; -wire soc_netsoc_timer0_zero_trigger; -reg soc_netsoc_timer0_zero_clear = 1'd0; -reg soc_netsoc_timer0_zero_old_trigger = 1'd0; -wire soc_netsoc_timer0_eventmanager_status_re; -wire soc_netsoc_timer0_eventmanager_status_r; -wire soc_netsoc_timer0_eventmanager_status_we; -wire soc_netsoc_timer0_eventmanager_status_w; -wire soc_netsoc_timer0_eventmanager_pending_re; -wire soc_netsoc_timer0_eventmanager_pending_r; -wire soc_netsoc_timer0_eventmanager_pending_we; -wire soc_netsoc_timer0_eventmanager_pending_w; -reg soc_netsoc_timer0_eventmanager_storage = 1'd0; -reg soc_netsoc_timer0_eventmanager_re = 1'd0; -reg [31:0] soc_netsoc_timer0_value = 32'd0; -reg [13:0] soc_netsoc_interface_adr = 14'd0; -reg soc_netsoc_interface_we = 1'd0; -wire [7:0] soc_netsoc_interface_dat_w; -wire [7:0] soc_netsoc_interface_dat_r; -wire [29:0] soc_netsoc_bus_wishbone_adr; -wire [31:0] soc_netsoc_bus_wishbone_dat_w; -wire [31:0] soc_netsoc_bus_wishbone_dat_r; -wire [3:0] soc_netsoc_bus_wishbone_sel; -wire soc_netsoc_bus_wishbone_cyc; -wire soc_netsoc_bus_wishbone_stb; -reg soc_netsoc_bus_wishbone_ack = 1'd0; -wire soc_netsoc_bus_wishbone_we; -wire [2:0] soc_netsoc_bus_wishbone_cti; -wire [1:0] soc_netsoc_bus_wishbone_bte; -reg soc_netsoc_bus_wishbone_err = 1'd0; -wire [29:0] soc_netsoc_interface0_wb_sdram_adr; -wire [31:0] soc_netsoc_interface0_wb_sdram_dat_w; -reg [31:0] soc_netsoc_interface0_wb_sdram_dat_r = 32'd0; -wire [3:0] soc_netsoc_interface0_wb_sdram_sel; -wire soc_netsoc_interface0_wb_sdram_cyc; -wire soc_netsoc_interface0_wb_sdram_stb; -reg soc_netsoc_interface0_wb_sdram_ack = 1'd0; -wire soc_netsoc_interface0_wb_sdram_we; -wire [2:0] soc_netsoc_interface0_wb_sdram_cti; -wire [1:0] soc_netsoc_interface0_wb_sdram_bte; -reg soc_netsoc_interface0_wb_sdram_err = 1'd0; -(* dont_touch = "true" *) wire sys_clk; -wire sys_rst; -wire sys4x_clk; -wire sys4x_dqs_clk; -wire clk200_clk; -wire clk200_rst; -wire soc_pll_locked; -wire soc_pll_fb; -reg [3:0] soc_reset_counter = 4'd15; -reg soc_ic_reset = 1'd1; -wire [29:0] soc_emulator_ram_bus_adr; -wire [31:0] soc_emulator_ram_bus_dat_w; -wire [31:0] soc_emulator_ram_bus_dat_r; -wire [3:0] soc_emulator_ram_bus_sel; -wire soc_emulator_ram_bus_cyc; -wire soc_emulator_ram_bus_stb; -reg soc_emulator_ram_bus_ack = 1'd0; -wire soc_emulator_ram_bus_we; -wire [2:0] soc_emulator_ram_bus_cti; -wire [1:0] soc_emulator_ram_bus_bte; -reg soc_emulator_ram_bus_err = 1'd0; -wire [11:0] soc_emulator_ram_adr; -wire [31:0] soc_emulator_ram_dat_r; -reg [3:0] soc_emulator_ram_we = 4'd0; -wire [31:0] soc_emulator_ram_dat_w; -reg [4:0] soc_a7ddrphy_half_sys8x_taps_storage = 5'd8; -reg soc_a7ddrphy_half_sys8x_taps_re = 1'd0; -wire soc_a7ddrphy_cdly_rst_re; -wire soc_a7ddrphy_cdly_rst_r; -wire soc_a7ddrphy_cdly_rst_we; -reg soc_a7ddrphy_cdly_rst_w = 1'd0; -wire soc_a7ddrphy_cdly_inc_re; -wire soc_a7ddrphy_cdly_inc_r; -wire soc_a7ddrphy_cdly_inc_we; -reg soc_a7ddrphy_cdly_inc_w = 1'd0; -reg [1:0] soc_a7ddrphy_dly_sel_storage = 2'd0; -reg soc_a7ddrphy_dly_sel_re = 1'd0; -wire soc_a7ddrphy_rdly_dq_rst_re; -wire soc_a7ddrphy_rdly_dq_rst_r; -wire soc_a7ddrphy_rdly_dq_rst_we; -reg soc_a7ddrphy_rdly_dq_rst_w = 1'd0; -wire soc_a7ddrphy_rdly_dq_inc_re; -wire soc_a7ddrphy_rdly_dq_inc_r; -wire soc_a7ddrphy_rdly_dq_inc_we; -reg soc_a7ddrphy_rdly_dq_inc_w = 1'd0; -wire soc_a7ddrphy_rdly_dq_bitslip_rst_re; -wire soc_a7ddrphy_rdly_dq_bitslip_rst_r; -wire soc_a7ddrphy_rdly_dq_bitslip_rst_we; -reg soc_a7ddrphy_rdly_dq_bitslip_rst_w = 1'd0; -wire soc_a7ddrphy_rdly_dq_bitslip_re; -wire soc_a7ddrphy_rdly_dq_bitslip_r; -wire soc_a7ddrphy_rdly_dq_bitslip_we; -reg soc_a7ddrphy_rdly_dq_bitslip_w = 1'd0; -wire [13:0] soc_a7ddrphy_dfi_p0_address; -wire [2:0] soc_a7ddrphy_dfi_p0_bank; -wire soc_a7ddrphy_dfi_p0_cas_n; -wire soc_a7ddrphy_dfi_p0_cs_n; -wire soc_a7ddrphy_dfi_p0_ras_n; -wire soc_a7ddrphy_dfi_p0_we_n; -wire soc_a7ddrphy_dfi_p0_cke; -wire soc_a7ddrphy_dfi_p0_odt; -wire soc_a7ddrphy_dfi_p0_reset_n; -wire soc_a7ddrphy_dfi_p0_act_n; -wire [31:0] soc_a7ddrphy_dfi_p0_wrdata; -wire soc_a7ddrphy_dfi_p0_wrdata_en; -wire [3:0] soc_a7ddrphy_dfi_p0_wrdata_mask; -wire soc_a7ddrphy_dfi_p0_rddata_en; -reg [31:0] soc_a7ddrphy_dfi_p0_rddata = 32'd0; -reg soc_a7ddrphy_dfi_p0_rddata_valid = 1'd0; -wire [13:0] soc_a7ddrphy_dfi_p1_address; -wire [2:0] soc_a7ddrphy_dfi_p1_bank; -wire soc_a7ddrphy_dfi_p1_cas_n; -wire soc_a7ddrphy_dfi_p1_cs_n; -wire soc_a7ddrphy_dfi_p1_ras_n; -wire soc_a7ddrphy_dfi_p1_we_n; -wire soc_a7ddrphy_dfi_p1_cke; -wire soc_a7ddrphy_dfi_p1_odt; -wire soc_a7ddrphy_dfi_p1_reset_n; -wire soc_a7ddrphy_dfi_p1_act_n; -wire [31:0] soc_a7ddrphy_dfi_p1_wrdata; -wire soc_a7ddrphy_dfi_p1_wrdata_en; -wire [3:0] soc_a7ddrphy_dfi_p1_wrdata_mask; -wire soc_a7ddrphy_dfi_p1_rddata_en; -reg [31:0] soc_a7ddrphy_dfi_p1_rddata = 32'd0; -reg soc_a7ddrphy_dfi_p1_rddata_valid = 1'd0; -wire [13:0] soc_a7ddrphy_dfi_p2_address; -wire [2:0] soc_a7ddrphy_dfi_p2_bank; -wire soc_a7ddrphy_dfi_p2_cas_n; -wire soc_a7ddrphy_dfi_p2_cs_n; -wire soc_a7ddrphy_dfi_p2_ras_n; -wire soc_a7ddrphy_dfi_p2_we_n; -wire soc_a7ddrphy_dfi_p2_cke; -wire soc_a7ddrphy_dfi_p2_odt; -wire soc_a7ddrphy_dfi_p2_reset_n; -wire soc_a7ddrphy_dfi_p2_act_n; -wire [31:0] soc_a7ddrphy_dfi_p2_wrdata; -wire soc_a7ddrphy_dfi_p2_wrdata_en; -wire [3:0] soc_a7ddrphy_dfi_p2_wrdata_mask; -wire soc_a7ddrphy_dfi_p2_rddata_en; -reg [31:0] soc_a7ddrphy_dfi_p2_rddata = 32'd0; -reg soc_a7ddrphy_dfi_p2_rddata_valid = 1'd0; -wire [13:0] soc_a7ddrphy_dfi_p3_address; -wire [2:0] soc_a7ddrphy_dfi_p3_bank; -wire soc_a7ddrphy_dfi_p3_cas_n; -wire soc_a7ddrphy_dfi_p3_cs_n; -wire soc_a7ddrphy_dfi_p3_ras_n; -wire soc_a7ddrphy_dfi_p3_we_n; -wire soc_a7ddrphy_dfi_p3_cke; -wire soc_a7ddrphy_dfi_p3_odt; -wire soc_a7ddrphy_dfi_p3_reset_n; -wire soc_a7ddrphy_dfi_p3_act_n; -wire [31:0] soc_a7ddrphy_dfi_p3_wrdata; -wire soc_a7ddrphy_dfi_p3_wrdata_en; -wire [3:0] soc_a7ddrphy_dfi_p3_wrdata_mask; -wire soc_a7ddrphy_dfi_p3_rddata_en; -reg [31:0] soc_a7ddrphy_dfi_p3_rddata = 32'd0; -reg soc_a7ddrphy_dfi_p3_rddata_valid = 1'd0; -wire soc_a7ddrphy_sd_clk_se_nodelay; -reg soc_a7ddrphy_oe_dqs = 1'd0; -wire soc_a7ddrphy_dqs_preamble; -wire soc_a7ddrphy_dqs_postamble; -reg [7:0] soc_a7ddrphy_dqs_serdes_pattern = 8'd85; -wire soc_a7ddrphy_dqs_nodelay0; -wire soc_a7ddrphy_dqs_t0; -wire soc_a7ddrphy0; -wire soc_a7ddrphy_dqs_nodelay1; -wire soc_a7ddrphy_dqs_t1; -wire soc_a7ddrphy1; -reg soc_a7ddrphy_oe_dq = 1'd0; -wire soc_a7ddrphy_dq_o_nodelay0; -wire soc_a7ddrphy_dq_i_nodelay0; -wire soc_a7ddrphy_dq_i_delayed0; -wire soc_a7ddrphy_dq_t0; -wire [7:0] soc_a7ddrphy_dq_i_data0; -wire [7:0] soc_a7ddrphy_bitslip0_i; -reg [7:0] soc_a7ddrphy_bitslip0_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip0_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip0_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay1; -wire soc_a7ddrphy_dq_i_nodelay1; -wire soc_a7ddrphy_dq_i_delayed1; -wire soc_a7ddrphy_dq_t1; -wire [7:0] soc_a7ddrphy_dq_i_data1; -wire [7:0] soc_a7ddrphy_bitslip1_i; -reg [7:0] soc_a7ddrphy_bitslip1_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip1_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip1_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay2; -wire soc_a7ddrphy_dq_i_nodelay2; -wire soc_a7ddrphy_dq_i_delayed2; -wire soc_a7ddrphy_dq_t2; -wire [7:0] soc_a7ddrphy_dq_i_data2; -wire [7:0] soc_a7ddrphy_bitslip2_i; -reg [7:0] soc_a7ddrphy_bitslip2_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip2_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip2_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay3; -wire soc_a7ddrphy_dq_i_nodelay3; -wire soc_a7ddrphy_dq_i_delayed3; -wire soc_a7ddrphy_dq_t3; -wire [7:0] soc_a7ddrphy_dq_i_data3; -wire [7:0] soc_a7ddrphy_bitslip3_i; -reg [7:0] soc_a7ddrphy_bitslip3_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip3_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip3_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay4; -wire soc_a7ddrphy_dq_i_nodelay4; -wire soc_a7ddrphy_dq_i_delayed4; -wire soc_a7ddrphy_dq_t4; -wire [7:0] soc_a7ddrphy_dq_i_data4; -wire [7:0] soc_a7ddrphy_bitslip4_i; -reg [7:0] soc_a7ddrphy_bitslip4_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip4_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip4_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay5; -wire soc_a7ddrphy_dq_i_nodelay5; -wire soc_a7ddrphy_dq_i_delayed5; -wire soc_a7ddrphy_dq_t5; -wire [7:0] soc_a7ddrphy_dq_i_data5; -wire [7:0] soc_a7ddrphy_bitslip5_i; -reg [7:0] soc_a7ddrphy_bitslip5_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip5_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip5_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay6; -wire soc_a7ddrphy_dq_i_nodelay6; -wire soc_a7ddrphy_dq_i_delayed6; -wire soc_a7ddrphy_dq_t6; -wire [7:0] soc_a7ddrphy_dq_i_data6; -wire [7:0] soc_a7ddrphy_bitslip6_i; -reg [7:0] soc_a7ddrphy_bitslip6_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip6_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip6_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay7; -wire soc_a7ddrphy_dq_i_nodelay7; -wire soc_a7ddrphy_dq_i_delayed7; -wire soc_a7ddrphy_dq_t7; -wire [7:0] soc_a7ddrphy_dq_i_data7; -wire [7:0] soc_a7ddrphy_bitslip7_i; -reg [7:0] soc_a7ddrphy_bitslip7_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip7_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip7_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay8; -wire soc_a7ddrphy_dq_i_nodelay8; -wire soc_a7ddrphy_dq_i_delayed8; -wire soc_a7ddrphy_dq_t8; -wire [7:0] soc_a7ddrphy_dq_i_data8; -wire [7:0] soc_a7ddrphy_bitslip8_i; -reg [7:0] soc_a7ddrphy_bitslip8_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip8_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip8_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay9; -wire soc_a7ddrphy_dq_i_nodelay9; -wire soc_a7ddrphy_dq_i_delayed9; -wire soc_a7ddrphy_dq_t9; -wire [7:0] soc_a7ddrphy_dq_i_data9; -wire [7:0] soc_a7ddrphy_bitslip9_i; -reg [7:0] soc_a7ddrphy_bitslip9_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip9_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip9_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay10; -wire soc_a7ddrphy_dq_i_nodelay10; -wire soc_a7ddrphy_dq_i_delayed10; -wire soc_a7ddrphy_dq_t10; -wire [7:0] soc_a7ddrphy_dq_i_data10; -wire [7:0] soc_a7ddrphy_bitslip10_i; -reg [7:0] soc_a7ddrphy_bitslip10_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip10_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip10_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay11; -wire soc_a7ddrphy_dq_i_nodelay11; -wire soc_a7ddrphy_dq_i_delayed11; -wire soc_a7ddrphy_dq_t11; -wire [7:0] soc_a7ddrphy_dq_i_data11; -wire [7:0] soc_a7ddrphy_bitslip11_i; -reg [7:0] soc_a7ddrphy_bitslip11_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip11_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip11_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay12; -wire soc_a7ddrphy_dq_i_nodelay12; -wire soc_a7ddrphy_dq_i_delayed12; -wire soc_a7ddrphy_dq_t12; -wire [7:0] soc_a7ddrphy_dq_i_data12; -wire [7:0] soc_a7ddrphy_bitslip12_i; -reg [7:0] soc_a7ddrphy_bitslip12_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip12_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip12_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay13; -wire soc_a7ddrphy_dq_i_nodelay13; -wire soc_a7ddrphy_dq_i_delayed13; -wire soc_a7ddrphy_dq_t13; -wire [7:0] soc_a7ddrphy_dq_i_data13; -wire [7:0] soc_a7ddrphy_bitslip13_i; -reg [7:0] soc_a7ddrphy_bitslip13_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip13_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip13_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay14; -wire soc_a7ddrphy_dq_i_nodelay14; -wire soc_a7ddrphy_dq_i_delayed14; -wire soc_a7ddrphy_dq_t14; -wire [7:0] soc_a7ddrphy_dq_i_data14; -wire [7:0] soc_a7ddrphy_bitslip14_i; -reg [7:0] soc_a7ddrphy_bitslip14_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip14_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip14_r = 16'd0; -wire soc_a7ddrphy_dq_o_nodelay15; -wire soc_a7ddrphy_dq_i_nodelay15; -wire soc_a7ddrphy_dq_i_delayed15; -wire soc_a7ddrphy_dq_t15; -wire [7:0] soc_a7ddrphy_dq_i_data15; -wire [7:0] soc_a7ddrphy_bitslip15_i; -reg [7:0] soc_a7ddrphy_bitslip15_o = 8'd0; -reg [2:0] soc_a7ddrphy_bitslip15_value = 3'd0; -reg [15:0] soc_a7ddrphy_bitslip15_r = 16'd0; -reg soc_a7ddrphy_n_rddata_en0 = 1'd0; -reg soc_a7ddrphy_n_rddata_en1 = 1'd0; -reg soc_a7ddrphy_n_rddata_en2 = 1'd0; -reg soc_a7ddrphy_n_rddata_en3 = 1'd0; -reg soc_a7ddrphy_n_rddata_en4 = 1'd0; -reg soc_a7ddrphy_n_rddata_en5 = 1'd0; -reg soc_a7ddrphy_n_rddata_en6 = 1'd0; -reg soc_a7ddrphy_n_rddata_en7 = 1'd0; -wire soc_a7ddrphy_oe; -reg [3:0] soc_a7ddrphy_last_wrdata_en = 4'd0; -wire [13:0] soc_netsoc_sdram_inti_p0_address; -wire [2:0] soc_netsoc_sdram_inti_p0_bank; -reg soc_netsoc_sdram_inti_p0_cas_n = 1'd1; -reg soc_netsoc_sdram_inti_p0_cs_n = 1'd1; -reg soc_netsoc_sdram_inti_p0_ras_n = 1'd1; -reg soc_netsoc_sdram_inti_p0_we_n = 1'd1; -wire soc_netsoc_sdram_inti_p0_cke; -wire soc_netsoc_sdram_inti_p0_odt; -wire soc_netsoc_sdram_inti_p0_reset_n; -reg soc_netsoc_sdram_inti_p0_act_n = 1'd1; -wire [31:0] soc_netsoc_sdram_inti_p0_wrdata; -wire soc_netsoc_sdram_inti_p0_wrdata_en; -wire [3:0] soc_netsoc_sdram_inti_p0_wrdata_mask; -wire soc_netsoc_sdram_inti_p0_rddata_en; -reg [31:0] soc_netsoc_sdram_inti_p0_rddata = 32'd0; -reg soc_netsoc_sdram_inti_p0_rddata_valid = 1'd0; -wire [13:0] soc_netsoc_sdram_inti_p1_address; -wire [2:0] soc_netsoc_sdram_inti_p1_bank; -reg soc_netsoc_sdram_inti_p1_cas_n = 1'd1; -reg soc_netsoc_sdram_inti_p1_cs_n = 1'd1; -reg soc_netsoc_sdram_inti_p1_ras_n = 1'd1; -reg soc_netsoc_sdram_inti_p1_we_n = 1'd1; -wire soc_netsoc_sdram_inti_p1_cke; -wire soc_netsoc_sdram_inti_p1_odt; -wire soc_netsoc_sdram_inti_p1_reset_n; -reg soc_netsoc_sdram_inti_p1_act_n = 1'd1; -wire [31:0] soc_netsoc_sdram_inti_p1_wrdata; -wire soc_netsoc_sdram_inti_p1_wrdata_en; -wire [3:0] soc_netsoc_sdram_inti_p1_wrdata_mask; -wire soc_netsoc_sdram_inti_p1_rddata_en; -reg [31:0] soc_netsoc_sdram_inti_p1_rddata = 32'd0; -reg soc_netsoc_sdram_inti_p1_rddata_valid = 1'd0; -wire [13:0] soc_netsoc_sdram_inti_p2_address; -wire [2:0] soc_netsoc_sdram_inti_p2_bank; -reg soc_netsoc_sdram_inti_p2_cas_n = 1'd1; -reg soc_netsoc_sdram_inti_p2_cs_n = 1'd1; -reg soc_netsoc_sdram_inti_p2_ras_n = 1'd1; -reg soc_netsoc_sdram_inti_p2_we_n = 1'd1; -wire soc_netsoc_sdram_inti_p2_cke; -wire soc_netsoc_sdram_inti_p2_odt; -wire soc_netsoc_sdram_inti_p2_reset_n; -reg soc_netsoc_sdram_inti_p2_act_n = 1'd1; -wire [31:0] soc_netsoc_sdram_inti_p2_wrdata; -wire soc_netsoc_sdram_inti_p2_wrdata_en; -wire [3:0] soc_netsoc_sdram_inti_p2_wrdata_mask; -wire soc_netsoc_sdram_inti_p2_rddata_en; -reg [31:0] soc_netsoc_sdram_inti_p2_rddata = 32'd0; -reg soc_netsoc_sdram_inti_p2_rddata_valid = 1'd0; -wire [13:0] soc_netsoc_sdram_inti_p3_address; -wire [2:0] soc_netsoc_sdram_inti_p3_bank; -reg soc_netsoc_sdram_inti_p3_cas_n = 1'd1; -reg soc_netsoc_sdram_inti_p3_cs_n = 1'd1; -reg soc_netsoc_sdram_inti_p3_ras_n = 1'd1; -reg soc_netsoc_sdram_inti_p3_we_n = 1'd1; -wire soc_netsoc_sdram_inti_p3_cke; -wire soc_netsoc_sdram_inti_p3_odt; -wire soc_netsoc_sdram_inti_p3_reset_n; -reg soc_netsoc_sdram_inti_p3_act_n = 1'd1; -wire [31:0] soc_netsoc_sdram_inti_p3_wrdata; -wire soc_netsoc_sdram_inti_p3_wrdata_en; -wire [3:0] soc_netsoc_sdram_inti_p3_wrdata_mask; -wire soc_netsoc_sdram_inti_p3_rddata_en; -reg [31:0] soc_netsoc_sdram_inti_p3_rddata = 32'd0; -reg soc_netsoc_sdram_inti_p3_rddata_valid = 1'd0; -wire [13:0] soc_netsoc_sdram_slave_p0_address; -wire [2:0] soc_netsoc_sdram_slave_p0_bank; -wire soc_netsoc_sdram_slave_p0_cas_n; -wire soc_netsoc_sdram_slave_p0_cs_n; -wire soc_netsoc_sdram_slave_p0_ras_n; -wire soc_netsoc_sdram_slave_p0_we_n; -wire soc_netsoc_sdram_slave_p0_cke; -wire soc_netsoc_sdram_slave_p0_odt; -wire soc_netsoc_sdram_slave_p0_reset_n; -wire soc_netsoc_sdram_slave_p0_act_n; -wire [31:0] soc_netsoc_sdram_slave_p0_wrdata; -wire soc_netsoc_sdram_slave_p0_wrdata_en; -wire [3:0] soc_netsoc_sdram_slave_p0_wrdata_mask; -wire soc_netsoc_sdram_slave_p0_rddata_en; -reg [31:0] soc_netsoc_sdram_slave_p0_rddata = 32'd0; -reg soc_netsoc_sdram_slave_p0_rddata_valid = 1'd0; -wire [13:0] soc_netsoc_sdram_slave_p1_address; -wire [2:0] soc_netsoc_sdram_slave_p1_bank; -wire soc_netsoc_sdram_slave_p1_cas_n; -wire soc_netsoc_sdram_slave_p1_cs_n; -wire soc_netsoc_sdram_slave_p1_ras_n; -wire soc_netsoc_sdram_slave_p1_we_n; -wire soc_netsoc_sdram_slave_p1_cke; -wire soc_netsoc_sdram_slave_p1_odt; -wire soc_netsoc_sdram_slave_p1_reset_n; -wire soc_netsoc_sdram_slave_p1_act_n; -wire [31:0] soc_netsoc_sdram_slave_p1_wrdata; -wire soc_netsoc_sdram_slave_p1_wrdata_en; -wire [3:0] soc_netsoc_sdram_slave_p1_wrdata_mask; -wire soc_netsoc_sdram_slave_p1_rddata_en; -reg [31:0] soc_netsoc_sdram_slave_p1_rddata = 32'd0; -reg soc_netsoc_sdram_slave_p1_rddata_valid = 1'd0; -wire [13:0] soc_netsoc_sdram_slave_p2_address; -wire [2:0] soc_netsoc_sdram_slave_p2_bank; -wire soc_netsoc_sdram_slave_p2_cas_n; -wire soc_netsoc_sdram_slave_p2_cs_n; -wire soc_netsoc_sdram_slave_p2_ras_n; -wire soc_netsoc_sdram_slave_p2_we_n; -wire soc_netsoc_sdram_slave_p2_cke; -wire soc_netsoc_sdram_slave_p2_odt; -wire soc_netsoc_sdram_slave_p2_reset_n; -wire soc_netsoc_sdram_slave_p2_act_n; -wire [31:0] soc_netsoc_sdram_slave_p2_wrdata; -wire soc_netsoc_sdram_slave_p2_wrdata_en; -wire [3:0] soc_netsoc_sdram_slave_p2_wrdata_mask; -wire soc_netsoc_sdram_slave_p2_rddata_en; -reg [31:0] soc_netsoc_sdram_slave_p2_rddata = 32'd0; -reg soc_netsoc_sdram_slave_p2_rddata_valid = 1'd0; -wire [13:0] soc_netsoc_sdram_slave_p3_address; -wire [2:0] soc_netsoc_sdram_slave_p3_bank; -wire soc_netsoc_sdram_slave_p3_cas_n; -wire soc_netsoc_sdram_slave_p3_cs_n; -wire soc_netsoc_sdram_slave_p3_ras_n; -wire soc_netsoc_sdram_slave_p3_we_n; -wire soc_netsoc_sdram_slave_p3_cke; -wire soc_netsoc_sdram_slave_p3_odt; -wire soc_netsoc_sdram_slave_p3_reset_n; -wire soc_netsoc_sdram_slave_p3_act_n; -wire [31:0] soc_netsoc_sdram_slave_p3_wrdata; -wire soc_netsoc_sdram_slave_p3_wrdata_en; -wire [3:0] soc_netsoc_sdram_slave_p3_wrdata_mask; -wire soc_netsoc_sdram_slave_p3_rddata_en; -reg [31:0] soc_netsoc_sdram_slave_p3_rddata = 32'd0; -reg soc_netsoc_sdram_slave_p3_rddata_valid = 1'd0; -reg [13:0] soc_netsoc_sdram_master_p0_address = 14'd0; -reg [2:0] soc_netsoc_sdram_master_p0_bank = 3'd0; -reg soc_netsoc_sdram_master_p0_cas_n = 1'd1; -reg soc_netsoc_sdram_master_p0_cs_n = 1'd1; -reg soc_netsoc_sdram_master_p0_ras_n = 1'd1; -reg soc_netsoc_sdram_master_p0_we_n = 1'd1; -reg soc_netsoc_sdram_master_p0_cke = 1'd0; -reg soc_netsoc_sdram_master_p0_odt = 1'd0; -reg soc_netsoc_sdram_master_p0_reset_n = 1'd0; -reg soc_netsoc_sdram_master_p0_act_n = 1'd1; -reg [31:0] soc_netsoc_sdram_master_p0_wrdata = 32'd0; -reg soc_netsoc_sdram_master_p0_wrdata_en = 1'd0; -reg [3:0] soc_netsoc_sdram_master_p0_wrdata_mask = 4'd0; -reg soc_netsoc_sdram_master_p0_rddata_en = 1'd0; -wire [31:0] soc_netsoc_sdram_master_p0_rddata; -wire soc_netsoc_sdram_master_p0_rddata_valid; -reg [13:0] soc_netsoc_sdram_master_p1_address = 14'd0; -reg [2:0] soc_netsoc_sdram_master_p1_bank = 3'd0; -reg soc_netsoc_sdram_master_p1_cas_n = 1'd1; -reg soc_netsoc_sdram_master_p1_cs_n = 1'd1; -reg soc_netsoc_sdram_master_p1_ras_n = 1'd1; -reg soc_netsoc_sdram_master_p1_we_n = 1'd1; -reg soc_netsoc_sdram_master_p1_cke = 1'd0; -reg soc_netsoc_sdram_master_p1_odt = 1'd0; -reg soc_netsoc_sdram_master_p1_reset_n = 1'd0; -reg soc_netsoc_sdram_master_p1_act_n = 1'd1; -reg [31:0] soc_netsoc_sdram_master_p1_wrdata = 32'd0; -reg soc_netsoc_sdram_master_p1_wrdata_en = 1'd0; -reg [3:0] soc_netsoc_sdram_master_p1_wrdata_mask = 4'd0; -reg soc_netsoc_sdram_master_p1_rddata_en = 1'd0; -wire [31:0] soc_netsoc_sdram_master_p1_rddata; -wire soc_netsoc_sdram_master_p1_rddata_valid; -reg [13:0] soc_netsoc_sdram_master_p2_address = 14'd0; -reg [2:0] soc_netsoc_sdram_master_p2_bank = 3'd0; -reg soc_netsoc_sdram_master_p2_cas_n = 1'd1; -reg soc_netsoc_sdram_master_p2_cs_n = 1'd1; -reg soc_netsoc_sdram_master_p2_ras_n = 1'd1; -reg soc_netsoc_sdram_master_p2_we_n = 1'd1; -reg soc_netsoc_sdram_master_p2_cke = 1'd0; -reg soc_netsoc_sdram_master_p2_odt = 1'd0; -reg soc_netsoc_sdram_master_p2_reset_n = 1'd0; -reg soc_netsoc_sdram_master_p2_act_n = 1'd1; -reg [31:0] soc_netsoc_sdram_master_p2_wrdata = 32'd0; -reg soc_netsoc_sdram_master_p2_wrdata_en = 1'd0; -reg [3:0] soc_netsoc_sdram_master_p2_wrdata_mask = 4'd0; -reg soc_netsoc_sdram_master_p2_rddata_en = 1'd0; -wire [31:0] soc_netsoc_sdram_master_p2_rddata; -wire soc_netsoc_sdram_master_p2_rddata_valid; -reg [13:0] soc_netsoc_sdram_master_p3_address = 14'd0; -reg [2:0] soc_netsoc_sdram_master_p3_bank = 3'd0; -reg soc_netsoc_sdram_master_p3_cas_n = 1'd1; -reg soc_netsoc_sdram_master_p3_cs_n = 1'd1; -reg soc_netsoc_sdram_master_p3_ras_n = 1'd1; -reg soc_netsoc_sdram_master_p3_we_n = 1'd1; -reg soc_netsoc_sdram_master_p3_cke = 1'd0; -reg soc_netsoc_sdram_master_p3_odt = 1'd0; -reg soc_netsoc_sdram_master_p3_reset_n = 1'd0; -reg soc_netsoc_sdram_master_p3_act_n = 1'd1; -reg [31:0] soc_netsoc_sdram_master_p3_wrdata = 32'd0; -reg soc_netsoc_sdram_master_p3_wrdata_en = 1'd0; -reg [3:0] soc_netsoc_sdram_master_p3_wrdata_mask = 4'd0; -reg soc_netsoc_sdram_master_p3_rddata_en = 1'd0; -wire [31:0] soc_netsoc_sdram_master_p3_rddata; -wire soc_netsoc_sdram_master_p3_rddata_valid; -reg [3:0] soc_netsoc_sdram_storage = 4'd0; -reg soc_netsoc_sdram_re = 1'd0; -reg [5:0] soc_netsoc_sdram_phaseinjector0_command_storage = 6'd0; -reg soc_netsoc_sdram_phaseinjector0_command_re = 1'd0; -wire soc_netsoc_sdram_phaseinjector0_command_issue_re; -wire soc_netsoc_sdram_phaseinjector0_command_issue_r; -wire soc_netsoc_sdram_phaseinjector0_command_issue_we; -reg soc_netsoc_sdram_phaseinjector0_command_issue_w = 1'd0; -reg [13:0] soc_netsoc_sdram_phaseinjector0_address_storage = 14'd0; -reg soc_netsoc_sdram_phaseinjector0_address_re = 1'd0; -reg [2:0] soc_netsoc_sdram_phaseinjector0_baddress_storage = 3'd0; -reg soc_netsoc_sdram_phaseinjector0_baddress_re = 1'd0; -reg [31:0] soc_netsoc_sdram_phaseinjector0_wrdata_storage = 32'd0; -reg soc_netsoc_sdram_phaseinjector0_wrdata_re = 1'd0; -reg [31:0] soc_netsoc_sdram_phaseinjector0_status = 32'd0; -wire soc_netsoc_sdram_phaseinjector0_we; -reg [5:0] soc_netsoc_sdram_phaseinjector1_command_storage = 6'd0; -reg soc_netsoc_sdram_phaseinjector1_command_re = 1'd0; -wire soc_netsoc_sdram_phaseinjector1_command_issue_re; -wire soc_netsoc_sdram_phaseinjector1_command_issue_r; -wire soc_netsoc_sdram_phaseinjector1_command_issue_we; -reg soc_netsoc_sdram_phaseinjector1_command_issue_w = 1'd0; -reg [13:0] soc_netsoc_sdram_phaseinjector1_address_storage = 14'd0; -reg soc_netsoc_sdram_phaseinjector1_address_re = 1'd0; -reg [2:0] soc_netsoc_sdram_phaseinjector1_baddress_storage = 3'd0; -reg soc_netsoc_sdram_phaseinjector1_baddress_re = 1'd0; -reg [31:0] soc_netsoc_sdram_phaseinjector1_wrdata_storage = 32'd0; -reg soc_netsoc_sdram_phaseinjector1_wrdata_re = 1'd0; -reg [31:0] soc_netsoc_sdram_phaseinjector1_status = 32'd0; -wire soc_netsoc_sdram_phaseinjector1_we; -reg [5:0] soc_netsoc_sdram_phaseinjector2_command_storage = 6'd0; -reg soc_netsoc_sdram_phaseinjector2_command_re = 1'd0; -wire soc_netsoc_sdram_phaseinjector2_command_issue_re; -wire soc_netsoc_sdram_phaseinjector2_command_issue_r; -wire soc_netsoc_sdram_phaseinjector2_command_issue_we; -reg soc_netsoc_sdram_phaseinjector2_command_issue_w = 1'd0; -reg [13:0] soc_netsoc_sdram_phaseinjector2_address_storage = 14'd0; -reg soc_netsoc_sdram_phaseinjector2_address_re = 1'd0; -reg [2:0] soc_netsoc_sdram_phaseinjector2_baddress_storage = 3'd0; -reg soc_netsoc_sdram_phaseinjector2_baddress_re = 1'd0; -reg [31:0] soc_netsoc_sdram_phaseinjector2_wrdata_storage = 32'd0; -reg soc_netsoc_sdram_phaseinjector2_wrdata_re = 1'd0; -reg [31:0] soc_netsoc_sdram_phaseinjector2_status = 32'd0; -wire soc_netsoc_sdram_phaseinjector2_we; -reg [5:0] soc_netsoc_sdram_phaseinjector3_command_storage = 6'd0; -reg soc_netsoc_sdram_phaseinjector3_command_re = 1'd0; -wire soc_netsoc_sdram_phaseinjector3_command_issue_re; -wire soc_netsoc_sdram_phaseinjector3_command_issue_r; -wire soc_netsoc_sdram_phaseinjector3_command_issue_we; -reg soc_netsoc_sdram_phaseinjector3_command_issue_w = 1'd0; -reg [13:0] soc_netsoc_sdram_phaseinjector3_address_storage = 14'd0; -reg soc_netsoc_sdram_phaseinjector3_address_re = 1'd0; -reg [2:0] soc_netsoc_sdram_phaseinjector3_baddress_storage = 3'd0; -reg soc_netsoc_sdram_phaseinjector3_baddress_re = 1'd0; -reg [31:0] soc_netsoc_sdram_phaseinjector3_wrdata_storage = 32'd0; -reg soc_netsoc_sdram_phaseinjector3_wrdata_re = 1'd0; -reg [31:0] soc_netsoc_sdram_phaseinjector3_status = 32'd0; -wire soc_netsoc_sdram_phaseinjector3_we; -wire soc_netsoc_sdram_interface_bank0_valid; -wire soc_netsoc_sdram_interface_bank0_ready; -wire soc_netsoc_sdram_interface_bank0_we; -wire [20:0] soc_netsoc_sdram_interface_bank0_addr; -wire soc_netsoc_sdram_interface_bank0_lock; -wire soc_netsoc_sdram_interface_bank0_wdata_ready; -wire soc_netsoc_sdram_interface_bank0_rdata_valid; -wire soc_netsoc_sdram_interface_bank1_valid; -wire soc_netsoc_sdram_interface_bank1_ready; -wire soc_netsoc_sdram_interface_bank1_we; -wire [20:0] soc_netsoc_sdram_interface_bank1_addr; -wire soc_netsoc_sdram_interface_bank1_lock; -wire soc_netsoc_sdram_interface_bank1_wdata_ready; -wire soc_netsoc_sdram_interface_bank1_rdata_valid; -wire soc_netsoc_sdram_interface_bank2_valid; -wire soc_netsoc_sdram_interface_bank2_ready; -wire soc_netsoc_sdram_interface_bank2_we; -wire [20:0] soc_netsoc_sdram_interface_bank2_addr; -wire soc_netsoc_sdram_interface_bank2_lock; -wire soc_netsoc_sdram_interface_bank2_wdata_ready; -wire soc_netsoc_sdram_interface_bank2_rdata_valid; -wire soc_netsoc_sdram_interface_bank3_valid; -wire soc_netsoc_sdram_interface_bank3_ready; -wire soc_netsoc_sdram_interface_bank3_we; -wire [20:0] soc_netsoc_sdram_interface_bank3_addr; -wire soc_netsoc_sdram_interface_bank3_lock; -wire soc_netsoc_sdram_interface_bank3_wdata_ready; -wire soc_netsoc_sdram_interface_bank3_rdata_valid; -wire soc_netsoc_sdram_interface_bank4_valid; -wire soc_netsoc_sdram_interface_bank4_ready; -wire soc_netsoc_sdram_interface_bank4_we; -wire [20:0] soc_netsoc_sdram_interface_bank4_addr; -wire soc_netsoc_sdram_interface_bank4_lock; -wire soc_netsoc_sdram_interface_bank4_wdata_ready; -wire soc_netsoc_sdram_interface_bank4_rdata_valid; -wire soc_netsoc_sdram_interface_bank5_valid; -wire soc_netsoc_sdram_interface_bank5_ready; -wire soc_netsoc_sdram_interface_bank5_we; -wire [20:0] soc_netsoc_sdram_interface_bank5_addr; -wire soc_netsoc_sdram_interface_bank5_lock; -wire soc_netsoc_sdram_interface_bank5_wdata_ready; -wire soc_netsoc_sdram_interface_bank5_rdata_valid; -wire soc_netsoc_sdram_interface_bank6_valid; -wire soc_netsoc_sdram_interface_bank6_ready; -wire soc_netsoc_sdram_interface_bank6_we; -wire [20:0] soc_netsoc_sdram_interface_bank6_addr; -wire soc_netsoc_sdram_interface_bank6_lock; -wire soc_netsoc_sdram_interface_bank6_wdata_ready; -wire soc_netsoc_sdram_interface_bank6_rdata_valid; -wire soc_netsoc_sdram_interface_bank7_valid; -wire soc_netsoc_sdram_interface_bank7_ready; -wire soc_netsoc_sdram_interface_bank7_we; -wire [20:0] soc_netsoc_sdram_interface_bank7_addr; -wire soc_netsoc_sdram_interface_bank7_lock; -wire soc_netsoc_sdram_interface_bank7_wdata_ready; -wire soc_netsoc_sdram_interface_bank7_rdata_valid; -reg [127:0] soc_netsoc_sdram_interface_wdata = 128'd0; -reg [15:0] soc_netsoc_sdram_interface_wdata_we = 16'd0; -wire [127:0] soc_netsoc_sdram_interface_rdata; -reg [13:0] soc_netsoc_sdram_dfi_p0_address = 14'd0; -reg [2:0] soc_netsoc_sdram_dfi_p0_bank = 3'd0; -reg soc_netsoc_sdram_dfi_p0_cas_n = 1'd1; -reg soc_netsoc_sdram_dfi_p0_cs_n = 1'd1; -reg soc_netsoc_sdram_dfi_p0_ras_n = 1'd1; -reg soc_netsoc_sdram_dfi_p0_we_n = 1'd1; -wire soc_netsoc_sdram_dfi_p0_cke; -wire soc_netsoc_sdram_dfi_p0_odt; -wire soc_netsoc_sdram_dfi_p0_reset_n; -reg soc_netsoc_sdram_dfi_p0_act_n = 1'd1; -wire [31:0] soc_netsoc_sdram_dfi_p0_wrdata; -reg soc_netsoc_sdram_dfi_p0_wrdata_en = 1'd0; -wire [3:0] soc_netsoc_sdram_dfi_p0_wrdata_mask; -reg soc_netsoc_sdram_dfi_p0_rddata_en = 1'd0; -wire [31:0] soc_netsoc_sdram_dfi_p0_rddata; -wire soc_netsoc_sdram_dfi_p0_rddata_valid; -reg [13:0] soc_netsoc_sdram_dfi_p1_address = 14'd0; -reg [2:0] soc_netsoc_sdram_dfi_p1_bank = 3'd0; -reg soc_netsoc_sdram_dfi_p1_cas_n = 1'd1; -reg soc_netsoc_sdram_dfi_p1_cs_n = 1'd1; -reg soc_netsoc_sdram_dfi_p1_ras_n = 1'd1; -reg soc_netsoc_sdram_dfi_p1_we_n = 1'd1; -wire soc_netsoc_sdram_dfi_p1_cke; -wire soc_netsoc_sdram_dfi_p1_odt; -wire soc_netsoc_sdram_dfi_p1_reset_n; -reg soc_netsoc_sdram_dfi_p1_act_n = 1'd1; -wire [31:0] soc_netsoc_sdram_dfi_p1_wrdata; -reg soc_netsoc_sdram_dfi_p1_wrdata_en = 1'd0; -wire [3:0] soc_netsoc_sdram_dfi_p1_wrdata_mask; -reg soc_netsoc_sdram_dfi_p1_rddata_en = 1'd0; -wire [31:0] soc_netsoc_sdram_dfi_p1_rddata; -wire soc_netsoc_sdram_dfi_p1_rddata_valid; -reg [13:0] soc_netsoc_sdram_dfi_p2_address = 14'd0; -reg [2:0] soc_netsoc_sdram_dfi_p2_bank = 3'd0; -reg soc_netsoc_sdram_dfi_p2_cas_n = 1'd1; -reg soc_netsoc_sdram_dfi_p2_cs_n = 1'd1; -reg soc_netsoc_sdram_dfi_p2_ras_n = 1'd1; -reg soc_netsoc_sdram_dfi_p2_we_n = 1'd1; -wire soc_netsoc_sdram_dfi_p2_cke; -wire soc_netsoc_sdram_dfi_p2_odt; -wire soc_netsoc_sdram_dfi_p2_reset_n; -reg soc_netsoc_sdram_dfi_p2_act_n = 1'd1; -wire [31:0] soc_netsoc_sdram_dfi_p2_wrdata; -reg soc_netsoc_sdram_dfi_p2_wrdata_en = 1'd0; -wire [3:0] soc_netsoc_sdram_dfi_p2_wrdata_mask; -reg soc_netsoc_sdram_dfi_p2_rddata_en = 1'd0; -wire [31:0] soc_netsoc_sdram_dfi_p2_rddata; -wire soc_netsoc_sdram_dfi_p2_rddata_valid; -reg [13:0] soc_netsoc_sdram_dfi_p3_address = 14'd0; -reg [2:0] soc_netsoc_sdram_dfi_p3_bank = 3'd0; -reg soc_netsoc_sdram_dfi_p3_cas_n = 1'd1; -reg soc_netsoc_sdram_dfi_p3_cs_n = 1'd1; -reg soc_netsoc_sdram_dfi_p3_ras_n = 1'd1; -reg soc_netsoc_sdram_dfi_p3_we_n = 1'd1; -wire soc_netsoc_sdram_dfi_p3_cke; -wire soc_netsoc_sdram_dfi_p3_odt; -wire soc_netsoc_sdram_dfi_p3_reset_n; -reg soc_netsoc_sdram_dfi_p3_act_n = 1'd1; -wire [31:0] soc_netsoc_sdram_dfi_p3_wrdata; -reg soc_netsoc_sdram_dfi_p3_wrdata_en = 1'd0; -wire [3:0] soc_netsoc_sdram_dfi_p3_wrdata_mask; -reg soc_netsoc_sdram_dfi_p3_rddata_en = 1'd0; -wire [31:0] soc_netsoc_sdram_dfi_p3_rddata; -wire soc_netsoc_sdram_dfi_p3_rddata_valid; -reg soc_netsoc_sdram_cmd_valid = 1'd0; -reg soc_netsoc_sdram_cmd_ready = 1'd0; -reg soc_netsoc_sdram_cmd_last = 1'd0; -reg [13:0] soc_netsoc_sdram_cmd_payload_a = 14'd0; -reg [2:0] soc_netsoc_sdram_cmd_payload_ba = 3'd0; -reg soc_netsoc_sdram_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_cmd_payload_we = 1'd0; -reg soc_netsoc_sdram_cmd_payload_is_read = 1'd0; -reg soc_netsoc_sdram_cmd_payload_is_write = 1'd0; -wire soc_netsoc_sdram_wants_refresh; -wire soc_netsoc_sdram_wants_zqcs; -wire soc_netsoc_sdram_timer_wait; -wire soc_netsoc_sdram_timer_done0; -wire [8:0] soc_netsoc_sdram_timer_count0; -wire soc_netsoc_sdram_timer_done1; -reg [8:0] soc_netsoc_sdram_timer_count1 = 9'd468; -wire soc_netsoc_sdram_postponer_req_i; -reg soc_netsoc_sdram_postponer_req_o = 1'd0; -reg soc_netsoc_sdram_postponer_count = 1'd0; -reg soc_netsoc_sdram_sequencer_start0 = 1'd0; -wire soc_netsoc_sdram_sequencer_done0; -wire soc_netsoc_sdram_sequencer_start1; -reg soc_netsoc_sdram_sequencer_done1 = 1'd0; -reg [5:0] soc_netsoc_sdram_sequencer_counter = 6'd0; -reg soc_netsoc_sdram_sequencer_count = 1'd0; -wire soc_netsoc_sdram_zqcs_timer_wait; -wire soc_netsoc_sdram_zqcs_timer_done0; -wire [25:0] soc_netsoc_sdram_zqcs_timer_count0; -wire soc_netsoc_sdram_zqcs_timer_done1; -reg [25:0] soc_netsoc_sdram_zqcs_timer_count1 = 26'd59999999; -reg soc_netsoc_sdram_zqcs_executer_start = 1'd0; -reg soc_netsoc_sdram_zqcs_executer_done = 1'd0; -reg [4:0] soc_netsoc_sdram_zqcs_executer_counter = 5'd0; -wire soc_netsoc_sdram_bankmachine0_req_valid; -wire soc_netsoc_sdram_bankmachine0_req_ready; -wire soc_netsoc_sdram_bankmachine0_req_we; -wire [20:0] soc_netsoc_sdram_bankmachine0_req_addr; -wire soc_netsoc_sdram_bankmachine0_req_lock; -reg soc_netsoc_sdram_bankmachine0_req_wdata_ready = 1'd0; -reg soc_netsoc_sdram_bankmachine0_req_rdata_valid = 1'd0; -wire soc_netsoc_sdram_bankmachine0_refresh_req; -reg soc_netsoc_sdram_bankmachine0_refresh_gnt = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_valid = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_ready = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine0_cmd_payload_a = 14'd0; -wire [2:0] soc_netsoc_sdram_bankmachine0_cmd_payload_ba; -reg soc_netsoc_sdram_bankmachine0_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_payload_we = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_payload_is_read = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_payload_is_write = 1'd0; -reg soc_netsoc_sdram_bankmachine0_auto_precharge = 1'd0; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; -reg soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_first = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_last = 1'd0; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_first; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_last; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; -wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; -wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; -reg [3:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level = 4'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we; -wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read; -wire [2:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr; -wire [23:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_ready; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_first; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_last; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_source_ready; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_source_first; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_source_last; -reg soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr = 21'd0; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce; -wire soc_netsoc_sdram_bankmachine0_cmd_buffer_busy; -reg soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_buffer_first_n = 1'd0; -reg soc_netsoc_sdram_bankmachine0_cmd_buffer_last_n = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine0_row = 14'd0; -reg soc_netsoc_sdram_bankmachine0_row_opened = 1'd0; -wire soc_netsoc_sdram_bankmachine0_row_hit; -reg soc_netsoc_sdram_bankmachine0_row_open = 1'd0; -reg soc_netsoc_sdram_bankmachine0_row_close = 1'd0; -reg soc_netsoc_sdram_bankmachine0_row_col_n_addr_sel = 1'd0; -wire soc_netsoc_sdram_bankmachine0_twtpcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine0_twtpcon_ready = 1'd1; -reg [2:0] soc_netsoc_sdram_bankmachine0_twtpcon_count = 3'd0; -wire soc_netsoc_sdram_bankmachine0_trccon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine0_trccon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine0_trccon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine0_trascon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine0_trascon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine0_trascon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine1_req_valid; -wire soc_netsoc_sdram_bankmachine1_req_ready; -wire soc_netsoc_sdram_bankmachine1_req_we; -wire [20:0] soc_netsoc_sdram_bankmachine1_req_addr; -wire soc_netsoc_sdram_bankmachine1_req_lock; -reg soc_netsoc_sdram_bankmachine1_req_wdata_ready = 1'd0; -reg soc_netsoc_sdram_bankmachine1_req_rdata_valid = 1'd0; -wire soc_netsoc_sdram_bankmachine1_refresh_req; -reg soc_netsoc_sdram_bankmachine1_refresh_gnt = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_valid = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_ready = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine1_cmd_payload_a = 14'd0; -wire [2:0] soc_netsoc_sdram_bankmachine1_cmd_payload_ba; -reg soc_netsoc_sdram_bankmachine1_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_payload_we = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_payload_is_read = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_payload_is_write = 1'd0; -reg soc_netsoc_sdram_bankmachine1_auto_precharge = 1'd0; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; -reg soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_first = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_last = 1'd0; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_first; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_last; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; -wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; -wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; -reg [3:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level = 4'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we; -wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read; -wire [2:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr; -wire [23:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_ready; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_first; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_last; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_source_ready; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_source_first; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_source_last; -reg soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr = 21'd0; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce; -wire soc_netsoc_sdram_bankmachine1_cmd_buffer_busy; -reg soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_buffer_first_n = 1'd0; -reg soc_netsoc_sdram_bankmachine1_cmd_buffer_last_n = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine1_row = 14'd0; -reg soc_netsoc_sdram_bankmachine1_row_opened = 1'd0; -wire soc_netsoc_sdram_bankmachine1_row_hit; -reg soc_netsoc_sdram_bankmachine1_row_open = 1'd0; -reg soc_netsoc_sdram_bankmachine1_row_close = 1'd0; -reg soc_netsoc_sdram_bankmachine1_row_col_n_addr_sel = 1'd0; -wire soc_netsoc_sdram_bankmachine1_twtpcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine1_twtpcon_ready = 1'd1; -reg [2:0] soc_netsoc_sdram_bankmachine1_twtpcon_count = 3'd0; -wire soc_netsoc_sdram_bankmachine1_trccon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine1_trccon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine1_trccon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine1_trascon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine1_trascon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine1_trascon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine2_req_valid; -wire soc_netsoc_sdram_bankmachine2_req_ready; -wire soc_netsoc_sdram_bankmachine2_req_we; -wire [20:0] soc_netsoc_sdram_bankmachine2_req_addr; -wire soc_netsoc_sdram_bankmachine2_req_lock; -reg soc_netsoc_sdram_bankmachine2_req_wdata_ready = 1'd0; -reg soc_netsoc_sdram_bankmachine2_req_rdata_valid = 1'd0; -wire soc_netsoc_sdram_bankmachine2_refresh_req; -reg soc_netsoc_sdram_bankmachine2_refresh_gnt = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_valid = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_ready = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine2_cmd_payload_a = 14'd0; -wire [2:0] soc_netsoc_sdram_bankmachine2_cmd_payload_ba; -reg soc_netsoc_sdram_bankmachine2_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_payload_we = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_payload_is_read = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_payload_is_write = 1'd0; -reg soc_netsoc_sdram_bankmachine2_auto_precharge = 1'd0; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; -reg soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_first = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_last = 1'd0; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_first; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_last; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; -wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; -wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; -reg [3:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level = 4'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we; -wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read; -wire [2:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr; -wire [23:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_ready; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_first; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_last; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_source_ready; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_source_first; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_source_last; -reg soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr = 21'd0; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce; -wire soc_netsoc_sdram_bankmachine2_cmd_buffer_busy; -reg soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_buffer_first_n = 1'd0; -reg soc_netsoc_sdram_bankmachine2_cmd_buffer_last_n = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine2_row = 14'd0; -reg soc_netsoc_sdram_bankmachine2_row_opened = 1'd0; -wire soc_netsoc_sdram_bankmachine2_row_hit; -reg soc_netsoc_sdram_bankmachine2_row_open = 1'd0; -reg soc_netsoc_sdram_bankmachine2_row_close = 1'd0; -reg soc_netsoc_sdram_bankmachine2_row_col_n_addr_sel = 1'd0; -wire soc_netsoc_sdram_bankmachine2_twtpcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine2_twtpcon_ready = 1'd1; -reg [2:0] soc_netsoc_sdram_bankmachine2_twtpcon_count = 3'd0; -wire soc_netsoc_sdram_bankmachine2_trccon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine2_trccon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine2_trccon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine2_trascon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine2_trascon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine2_trascon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine3_req_valid; -wire soc_netsoc_sdram_bankmachine3_req_ready; -wire soc_netsoc_sdram_bankmachine3_req_we; -wire [20:0] soc_netsoc_sdram_bankmachine3_req_addr; -wire soc_netsoc_sdram_bankmachine3_req_lock; -reg soc_netsoc_sdram_bankmachine3_req_wdata_ready = 1'd0; -reg soc_netsoc_sdram_bankmachine3_req_rdata_valid = 1'd0; -wire soc_netsoc_sdram_bankmachine3_refresh_req; -reg soc_netsoc_sdram_bankmachine3_refresh_gnt = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_valid = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_ready = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine3_cmd_payload_a = 14'd0; -wire [2:0] soc_netsoc_sdram_bankmachine3_cmd_payload_ba; -reg soc_netsoc_sdram_bankmachine3_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_payload_we = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_payload_is_read = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_payload_is_write = 1'd0; -reg soc_netsoc_sdram_bankmachine3_auto_precharge = 1'd0; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; -reg soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_first = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_last = 1'd0; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_first; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_last; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; -wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; -wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; -reg [3:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level = 4'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we; -wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read; -wire [2:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr; -wire [23:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_ready; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_first; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_last; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_source_ready; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_source_first; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_source_last; -reg soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr = 21'd0; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce; -wire soc_netsoc_sdram_bankmachine3_cmd_buffer_busy; -reg soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_buffer_first_n = 1'd0; -reg soc_netsoc_sdram_bankmachine3_cmd_buffer_last_n = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine3_row = 14'd0; -reg soc_netsoc_sdram_bankmachine3_row_opened = 1'd0; -wire soc_netsoc_sdram_bankmachine3_row_hit; -reg soc_netsoc_sdram_bankmachine3_row_open = 1'd0; -reg soc_netsoc_sdram_bankmachine3_row_close = 1'd0; -reg soc_netsoc_sdram_bankmachine3_row_col_n_addr_sel = 1'd0; -wire soc_netsoc_sdram_bankmachine3_twtpcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine3_twtpcon_ready = 1'd1; -reg [2:0] soc_netsoc_sdram_bankmachine3_twtpcon_count = 3'd0; -wire soc_netsoc_sdram_bankmachine3_trccon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine3_trccon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine3_trccon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine3_trascon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine3_trascon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine3_trascon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine4_req_valid; -wire soc_netsoc_sdram_bankmachine4_req_ready; -wire soc_netsoc_sdram_bankmachine4_req_we; -wire [20:0] soc_netsoc_sdram_bankmachine4_req_addr; -wire soc_netsoc_sdram_bankmachine4_req_lock; -reg soc_netsoc_sdram_bankmachine4_req_wdata_ready = 1'd0; -reg soc_netsoc_sdram_bankmachine4_req_rdata_valid = 1'd0; -wire soc_netsoc_sdram_bankmachine4_refresh_req; -reg soc_netsoc_sdram_bankmachine4_refresh_gnt = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_valid = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_ready = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine4_cmd_payload_a = 14'd0; -wire [2:0] soc_netsoc_sdram_bankmachine4_cmd_payload_ba; -reg soc_netsoc_sdram_bankmachine4_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_payload_we = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_payload_is_read = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_payload_is_write = 1'd0; -reg soc_netsoc_sdram_bankmachine4_auto_precharge = 1'd0; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; -reg soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_first = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_last = 1'd0; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_first; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_last; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; -wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; -wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; -reg [3:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level = 4'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we; -wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read; -wire [2:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr; -wire [23:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_ready; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_first; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_last; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_source_ready; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_source_first; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_source_last; -reg soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr = 21'd0; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce; -wire soc_netsoc_sdram_bankmachine4_cmd_buffer_busy; -reg soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_buffer_first_n = 1'd0; -reg soc_netsoc_sdram_bankmachine4_cmd_buffer_last_n = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine4_row = 14'd0; -reg soc_netsoc_sdram_bankmachine4_row_opened = 1'd0; -wire soc_netsoc_sdram_bankmachine4_row_hit; -reg soc_netsoc_sdram_bankmachine4_row_open = 1'd0; -reg soc_netsoc_sdram_bankmachine4_row_close = 1'd0; -reg soc_netsoc_sdram_bankmachine4_row_col_n_addr_sel = 1'd0; -wire soc_netsoc_sdram_bankmachine4_twtpcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine4_twtpcon_ready = 1'd1; -reg [2:0] soc_netsoc_sdram_bankmachine4_twtpcon_count = 3'd0; -wire soc_netsoc_sdram_bankmachine4_trccon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine4_trccon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine4_trccon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine4_trascon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine4_trascon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine4_trascon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine5_req_valid; -wire soc_netsoc_sdram_bankmachine5_req_ready; -wire soc_netsoc_sdram_bankmachine5_req_we; -wire [20:0] soc_netsoc_sdram_bankmachine5_req_addr; -wire soc_netsoc_sdram_bankmachine5_req_lock; -reg soc_netsoc_sdram_bankmachine5_req_wdata_ready = 1'd0; -reg soc_netsoc_sdram_bankmachine5_req_rdata_valid = 1'd0; -wire soc_netsoc_sdram_bankmachine5_refresh_req; -reg soc_netsoc_sdram_bankmachine5_refresh_gnt = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_valid = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_ready = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine5_cmd_payload_a = 14'd0; -wire [2:0] soc_netsoc_sdram_bankmachine5_cmd_payload_ba; -reg soc_netsoc_sdram_bankmachine5_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_payload_we = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_payload_is_read = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_payload_is_write = 1'd0; -reg soc_netsoc_sdram_bankmachine5_auto_precharge = 1'd0; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; -reg soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_first = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_last = 1'd0; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_first; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_last; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; -wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; -wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; -reg [3:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level = 4'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we; -wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read; -wire [2:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr; -wire [23:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_ready; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_first; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_last; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_source_ready; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_source_first; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_source_last; -reg soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr = 21'd0; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce; -wire soc_netsoc_sdram_bankmachine5_cmd_buffer_busy; -reg soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_buffer_first_n = 1'd0; -reg soc_netsoc_sdram_bankmachine5_cmd_buffer_last_n = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine5_row = 14'd0; -reg soc_netsoc_sdram_bankmachine5_row_opened = 1'd0; -wire soc_netsoc_sdram_bankmachine5_row_hit; -reg soc_netsoc_sdram_bankmachine5_row_open = 1'd0; -reg soc_netsoc_sdram_bankmachine5_row_close = 1'd0; -reg soc_netsoc_sdram_bankmachine5_row_col_n_addr_sel = 1'd0; -wire soc_netsoc_sdram_bankmachine5_twtpcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine5_twtpcon_ready = 1'd1; -reg [2:0] soc_netsoc_sdram_bankmachine5_twtpcon_count = 3'd0; -wire soc_netsoc_sdram_bankmachine5_trccon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine5_trccon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine5_trccon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine5_trascon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine5_trascon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine5_trascon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine6_req_valid; -wire soc_netsoc_sdram_bankmachine6_req_ready; -wire soc_netsoc_sdram_bankmachine6_req_we; -wire [20:0] soc_netsoc_sdram_bankmachine6_req_addr; -wire soc_netsoc_sdram_bankmachine6_req_lock; -reg soc_netsoc_sdram_bankmachine6_req_wdata_ready = 1'd0; -reg soc_netsoc_sdram_bankmachine6_req_rdata_valid = 1'd0; -wire soc_netsoc_sdram_bankmachine6_refresh_req; -reg soc_netsoc_sdram_bankmachine6_refresh_gnt = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_valid = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_ready = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine6_cmd_payload_a = 14'd0; -wire [2:0] soc_netsoc_sdram_bankmachine6_cmd_payload_ba; -reg soc_netsoc_sdram_bankmachine6_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_payload_we = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_payload_is_read = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_payload_is_write = 1'd0; -reg soc_netsoc_sdram_bankmachine6_auto_precharge = 1'd0; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; -reg soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_first = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_last = 1'd0; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_first; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_last; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; -wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; -wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; -reg [3:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level = 4'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we; -wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read; -wire [2:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr; -wire [23:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_ready; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_first; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_last; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_source_ready; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_source_first; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_source_last; -reg soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr = 21'd0; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce; -wire soc_netsoc_sdram_bankmachine6_cmd_buffer_busy; -reg soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_buffer_first_n = 1'd0; -reg soc_netsoc_sdram_bankmachine6_cmd_buffer_last_n = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine6_row = 14'd0; -reg soc_netsoc_sdram_bankmachine6_row_opened = 1'd0; -wire soc_netsoc_sdram_bankmachine6_row_hit; -reg soc_netsoc_sdram_bankmachine6_row_open = 1'd0; -reg soc_netsoc_sdram_bankmachine6_row_close = 1'd0; -reg soc_netsoc_sdram_bankmachine6_row_col_n_addr_sel = 1'd0; -wire soc_netsoc_sdram_bankmachine6_twtpcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine6_twtpcon_ready = 1'd1; -reg [2:0] soc_netsoc_sdram_bankmachine6_twtpcon_count = 3'd0; -wire soc_netsoc_sdram_bankmachine6_trccon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine6_trccon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine6_trccon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine6_trascon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine6_trascon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine6_trascon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine7_req_valid; -wire soc_netsoc_sdram_bankmachine7_req_ready; -wire soc_netsoc_sdram_bankmachine7_req_we; -wire [20:0] soc_netsoc_sdram_bankmachine7_req_addr; -wire soc_netsoc_sdram_bankmachine7_req_lock; -reg soc_netsoc_sdram_bankmachine7_req_wdata_ready = 1'd0; -reg soc_netsoc_sdram_bankmachine7_req_rdata_valid = 1'd0; -wire soc_netsoc_sdram_bankmachine7_refresh_req; -reg soc_netsoc_sdram_bankmachine7_refresh_gnt = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_valid = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_ready = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine7_cmd_payload_a = 14'd0; -wire [2:0] soc_netsoc_sdram_bankmachine7_cmd_payload_ba; -reg soc_netsoc_sdram_bankmachine7_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_payload_we = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_payload_is_read = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_payload_is_write = 1'd0; -reg soc_netsoc_sdram_bankmachine7_auto_precharge = 1'd0; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; -reg soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_first = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_last = 1'd0; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_first; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_last; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; -wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; -wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; -reg [3:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level = 4'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we; -wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read; -wire [2:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr; -wire [23:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_ready; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_first; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_last; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_we; -wire [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_addr; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_source_ready; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_source_first; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_source_last; -reg soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr = 21'd0; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce; -wire soc_netsoc_sdram_bankmachine7_cmd_buffer_busy; -reg soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_buffer_first_n = 1'd0; -reg soc_netsoc_sdram_bankmachine7_cmd_buffer_last_n = 1'd0; -reg [13:0] soc_netsoc_sdram_bankmachine7_row = 14'd0; -reg soc_netsoc_sdram_bankmachine7_row_opened = 1'd0; -wire soc_netsoc_sdram_bankmachine7_row_hit; -reg soc_netsoc_sdram_bankmachine7_row_open = 1'd0; -reg soc_netsoc_sdram_bankmachine7_row_close = 1'd0; -reg soc_netsoc_sdram_bankmachine7_row_col_n_addr_sel = 1'd0; -wire soc_netsoc_sdram_bankmachine7_twtpcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine7_twtpcon_ready = 1'd1; -reg [2:0] soc_netsoc_sdram_bankmachine7_twtpcon_count = 3'd0; -wire soc_netsoc_sdram_bankmachine7_trccon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine7_trccon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine7_trccon_count = 2'd0; -wire soc_netsoc_sdram_bankmachine7_trascon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_bankmachine7_trascon_ready = 1'd1; -reg [1:0] soc_netsoc_sdram_bankmachine7_trascon_count = 2'd0; -wire soc_netsoc_sdram_ras_allowed; -wire soc_netsoc_sdram_cas_allowed; -reg soc_netsoc_sdram_choose_cmd_want_reads = 1'd0; -reg soc_netsoc_sdram_choose_cmd_want_writes = 1'd0; -reg soc_netsoc_sdram_choose_cmd_want_cmds = 1'd0; -reg soc_netsoc_sdram_choose_cmd_want_activates = 1'd0; -wire soc_netsoc_sdram_choose_cmd_cmd_valid; -reg soc_netsoc_sdram_choose_cmd_cmd_ready = 1'd0; -wire [13:0] soc_netsoc_sdram_choose_cmd_cmd_payload_a; -wire [2:0] soc_netsoc_sdram_choose_cmd_cmd_payload_ba; -reg soc_netsoc_sdram_choose_cmd_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_choose_cmd_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_choose_cmd_cmd_payload_we = 1'd0; -wire soc_netsoc_sdram_choose_cmd_cmd_payload_is_cmd; -wire soc_netsoc_sdram_choose_cmd_cmd_payload_is_read; -wire soc_netsoc_sdram_choose_cmd_cmd_payload_is_write; -reg [7:0] soc_netsoc_sdram_choose_cmd_valids = 8'd0; -wire [7:0] soc_netsoc_sdram_choose_cmd_request; -reg [2:0] soc_netsoc_sdram_choose_cmd_grant = 3'd0; -wire soc_netsoc_sdram_choose_cmd_ce; -reg soc_netsoc_sdram_choose_req_want_reads = 1'd0; -reg soc_netsoc_sdram_choose_req_want_writes = 1'd0; -reg soc_netsoc_sdram_choose_req_want_cmds = 1'd0; -reg soc_netsoc_sdram_choose_req_want_activates = 1'd0; -wire soc_netsoc_sdram_choose_req_cmd_valid; -reg soc_netsoc_sdram_choose_req_cmd_ready = 1'd0; -wire [13:0] soc_netsoc_sdram_choose_req_cmd_payload_a; -wire [2:0] soc_netsoc_sdram_choose_req_cmd_payload_ba; -reg soc_netsoc_sdram_choose_req_cmd_payload_cas = 1'd0; -reg soc_netsoc_sdram_choose_req_cmd_payload_ras = 1'd0; -reg soc_netsoc_sdram_choose_req_cmd_payload_we = 1'd0; -wire soc_netsoc_sdram_choose_req_cmd_payload_is_cmd; -wire soc_netsoc_sdram_choose_req_cmd_payload_is_read; -wire soc_netsoc_sdram_choose_req_cmd_payload_is_write; -reg [7:0] soc_netsoc_sdram_choose_req_valids = 8'd0; -wire [7:0] soc_netsoc_sdram_choose_req_request; -reg [2:0] soc_netsoc_sdram_choose_req_grant = 3'd0; -wire soc_netsoc_sdram_choose_req_ce; -reg [13:0] soc_netsoc_sdram_nop_a = 14'd0; -reg [2:0] soc_netsoc_sdram_nop_ba = 3'd0; -reg [1:0] soc_netsoc_sdram_steerer_sel0 = 2'd0; -reg [1:0] soc_netsoc_sdram_steerer_sel1 = 2'd0; -reg [1:0] soc_netsoc_sdram_steerer_sel2 = 2'd0; -reg [1:0] soc_netsoc_sdram_steerer_sel3 = 2'd0; -reg soc_netsoc_sdram_steerer0 = 1'd1; -reg soc_netsoc_sdram_steerer1 = 1'd1; -reg soc_netsoc_sdram_steerer2 = 1'd1; -reg soc_netsoc_sdram_steerer3 = 1'd1; -reg soc_netsoc_sdram_steerer4 = 1'd1; -reg soc_netsoc_sdram_steerer5 = 1'd1; -reg soc_netsoc_sdram_steerer6 = 1'd1; -reg soc_netsoc_sdram_steerer7 = 1'd1; -wire soc_netsoc_sdram_trrdcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_trrdcon_ready = 1'd1; -reg soc_netsoc_sdram_trrdcon_count = 1'd0; -wire soc_netsoc_sdram_tfawcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_tfawcon_ready = 1'd1; -wire [1:0] soc_netsoc_sdram_tfawcon_count; -reg [3:0] soc_netsoc_sdram_tfawcon_window = 4'd0; -wire soc_netsoc_sdram_tccdcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_tccdcon_ready = 1'd1; -reg soc_netsoc_sdram_tccdcon_count = 1'd0; -wire soc_netsoc_sdram_twtrcon_valid; -(* dont_touch = "true" *) reg soc_netsoc_sdram_twtrcon_ready = 1'd1; -reg [2:0] soc_netsoc_sdram_twtrcon_count = 3'd0; -wire soc_netsoc_sdram_read_available; -wire soc_netsoc_sdram_write_available; -reg soc_netsoc_sdram_en0 = 1'd0; -wire soc_netsoc_sdram_max_time0; -reg [4:0] soc_netsoc_sdram_time0 = 5'd0; -reg soc_netsoc_sdram_en1 = 1'd0; -wire soc_netsoc_sdram_max_time1; -reg [3:0] soc_netsoc_sdram_time1 = 4'd0; -wire soc_netsoc_sdram_go_to_refresh; -wire soc_netsoc_sdram_bandwidth_update_re; -wire soc_netsoc_sdram_bandwidth_update_r; -wire soc_netsoc_sdram_bandwidth_update_we; -reg soc_netsoc_sdram_bandwidth_update_w = 1'd0; -reg [23:0] soc_netsoc_sdram_bandwidth_nreads_status = 24'd0; -wire soc_netsoc_sdram_bandwidth_nreads_we; -reg [23:0] soc_netsoc_sdram_bandwidth_nwrites_status = 24'd0; -wire soc_netsoc_sdram_bandwidth_nwrites_we; -reg [7:0] soc_netsoc_sdram_bandwidth_data_width_status = 8'd128; -wire soc_netsoc_sdram_bandwidth_data_width_we; -reg soc_netsoc_sdram_bandwidth_cmd_valid = 1'd0; -reg soc_netsoc_sdram_bandwidth_cmd_ready = 1'd0; -reg soc_netsoc_sdram_bandwidth_cmd_is_read = 1'd0; -reg soc_netsoc_sdram_bandwidth_cmd_is_write = 1'd0; -reg [23:0] soc_netsoc_sdram_bandwidth_counter = 24'd0; -reg soc_netsoc_sdram_bandwidth_period = 1'd0; -reg [23:0] soc_netsoc_sdram_bandwidth_nreads = 24'd0; -reg [23:0] soc_netsoc_sdram_bandwidth_nwrites = 24'd0; -reg [23:0] soc_netsoc_sdram_bandwidth_nreads_r = 24'd0; -reg [23:0] soc_netsoc_sdram_bandwidth_nwrites_r = 24'd0; -reg soc_netsoc_port_cmd_valid = 1'd0; -wire soc_netsoc_port_cmd_ready; -reg soc_netsoc_port_cmd_payload_we = 1'd0; -reg [23:0] soc_netsoc_port_cmd_payload_addr = 24'd0; -wire soc_netsoc_port_wdata_valid; -wire soc_netsoc_port_wdata_ready; -wire soc_netsoc_port_wdata_first; -wire soc_netsoc_port_wdata_last; -wire [127:0] soc_netsoc_port_wdata_payload_data; -wire [15:0] soc_netsoc_port_wdata_payload_we; -wire soc_netsoc_port_rdata_valid; -wire soc_netsoc_port_rdata_ready; -reg soc_netsoc_port_rdata_first = 1'd0; -reg soc_netsoc_port_rdata_last = 1'd0; -wire [127:0] soc_netsoc_port_rdata_payload_data; -wire [29:0] soc_netsoc_interface1_wb_sdram_adr; -wire [31:0] soc_netsoc_interface1_wb_sdram_dat_w; -wire [31:0] soc_netsoc_interface1_wb_sdram_dat_r; -wire [3:0] soc_netsoc_interface1_wb_sdram_sel; -wire soc_netsoc_interface1_wb_sdram_cyc; -wire soc_netsoc_interface1_wb_sdram_stb; -wire soc_netsoc_interface1_wb_sdram_ack; -wire soc_netsoc_interface1_wb_sdram_we; -wire [2:0] soc_netsoc_interface1_wb_sdram_cti; -wire [1:0] soc_netsoc_interface1_wb_sdram_bte; -wire soc_netsoc_interface1_wb_sdram_err; -wire [29:0] soc_netsoc_adr; -wire [127:0] soc_netsoc_dat_w; -wire [127:0] soc_netsoc_dat_r; -wire [15:0] soc_netsoc_sel; -reg soc_netsoc_cyc = 1'd0; -reg soc_netsoc_stb = 1'd0; -reg soc_netsoc_ack = 1'd0; -reg soc_netsoc_we = 1'd0; -wire [8:0] soc_netsoc_data_port_adr; -wire [127:0] soc_netsoc_data_port_dat_r; -reg [15:0] soc_netsoc_data_port_we = 16'd0; -reg [127:0] soc_netsoc_data_port_dat_w = 128'd0; -reg soc_netsoc_write_from_slave = 1'd0; -reg [1:0] soc_netsoc_adr_offset_r = 2'd0; -wire [8:0] soc_netsoc_tag_port_adr; -wire [23:0] soc_netsoc_tag_port_dat_r; -reg soc_netsoc_tag_port_we = 1'd0; -wire [23:0] soc_netsoc_tag_port_dat_w; -wire [22:0] soc_netsoc_tag_do_tag; -wire soc_netsoc_tag_do_dirty; -wire [22:0] soc_netsoc_tag_di_tag; -reg soc_netsoc_tag_di_dirty = 1'd0; -reg soc_netsoc_word_clr = 1'd0; -reg soc_netsoc_word_inc = 1'd0; -wire soc_netsoc_wdata_converter_sink_valid; -wire soc_netsoc_wdata_converter_sink_ready; -reg soc_netsoc_wdata_converter_sink_first = 1'd0; -reg soc_netsoc_wdata_converter_sink_last = 1'd0; -wire [127:0] soc_netsoc_wdata_converter_sink_payload_data; -wire [15:0] soc_netsoc_wdata_converter_sink_payload_we; -wire soc_netsoc_wdata_converter_source_valid; -wire soc_netsoc_wdata_converter_source_ready; -wire soc_netsoc_wdata_converter_source_first; -wire soc_netsoc_wdata_converter_source_last; -wire [127:0] soc_netsoc_wdata_converter_source_payload_data; -wire [15:0] soc_netsoc_wdata_converter_source_payload_we; -wire soc_netsoc_wdata_converter_converter_sink_valid; -wire soc_netsoc_wdata_converter_converter_sink_ready; -wire soc_netsoc_wdata_converter_converter_sink_first; -wire soc_netsoc_wdata_converter_converter_sink_last; -wire [143:0] soc_netsoc_wdata_converter_converter_sink_payload_data; -wire soc_netsoc_wdata_converter_converter_source_valid; -wire soc_netsoc_wdata_converter_converter_source_ready; -wire soc_netsoc_wdata_converter_converter_source_first; -wire soc_netsoc_wdata_converter_converter_source_last; -wire [143:0] soc_netsoc_wdata_converter_converter_source_payload_data; -wire soc_netsoc_wdata_converter_converter_source_payload_valid_token_count; -wire soc_netsoc_wdata_converter_source_source_valid; -wire soc_netsoc_wdata_converter_source_source_ready; -wire soc_netsoc_wdata_converter_source_source_first; -wire soc_netsoc_wdata_converter_source_source_last; -wire [143:0] soc_netsoc_wdata_converter_source_source_payload_data; -wire soc_netsoc_rdata_converter_sink_valid; -wire soc_netsoc_rdata_converter_sink_ready; -wire soc_netsoc_rdata_converter_sink_first; -wire soc_netsoc_rdata_converter_sink_last; -wire [127:0] soc_netsoc_rdata_converter_sink_payload_data; -wire soc_netsoc_rdata_converter_source_valid; -wire soc_netsoc_rdata_converter_source_ready; -wire soc_netsoc_rdata_converter_source_first; -wire soc_netsoc_rdata_converter_source_last; -wire [127:0] soc_netsoc_rdata_converter_source_payload_data; -wire soc_netsoc_rdata_converter_converter_sink_valid; -wire soc_netsoc_rdata_converter_converter_sink_ready; -wire soc_netsoc_rdata_converter_converter_sink_first; -wire soc_netsoc_rdata_converter_converter_sink_last; -wire [127:0] soc_netsoc_rdata_converter_converter_sink_payload_data; -wire soc_netsoc_rdata_converter_converter_source_valid; -wire soc_netsoc_rdata_converter_converter_source_ready; -wire soc_netsoc_rdata_converter_converter_source_first; -wire soc_netsoc_rdata_converter_converter_source_last; -wire [127:0] soc_netsoc_rdata_converter_converter_source_payload_data; -wire soc_netsoc_rdata_converter_converter_source_payload_valid_token_count; -wire soc_netsoc_rdata_converter_source_source_valid; -wire soc_netsoc_rdata_converter_source_source_ready; -wire soc_netsoc_rdata_converter_source_source_first; -wire soc_netsoc_rdata_converter_source_source_last; -wire [127:0] soc_netsoc_rdata_converter_source_source_payload_data; -reg soc_netsoc_count = 1'd0; -reg soc_reset_storage = 1'd0; -reg soc_reset_re = 1'd0; -(* dont_touch = "true" *) wire eth_rx_clk; -wire eth_rx_rst; -(* dont_touch = "true" *) wire eth_tx_clk; -wire eth_tx_rst; -wire soc_reset0; -wire soc_reset1; -reg [8:0] soc_counter = 9'd0; -wire soc_counter_done; -wire soc_counter_ce; -wire soc_liteethphymiitx_sink_sink_valid; -wire soc_liteethphymiitx_sink_sink_ready; -wire soc_liteethphymiitx_sink_sink_first; -wire soc_liteethphymiitx_sink_sink_last; -wire [7:0] soc_liteethphymiitx_sink_sink_payload_data; -wire soc_liteethphymiitx_sink_sink_payload_last_be; -wire soc_liteethphymiitx_sink_sink_payload_error; -wire soc_liteethphymiitx_converter_sink_valid; -wire soc_liteethphymiitx_converter_sink_ready; -reg soc_liteethphymiitx_converter_sink_first = 1'd0; -reg soc_liteethphymiitx_converter_sink_last = 1'd0; -wire [7:0] soc_liteethphymiitx_converter_sink_payload_data; -wire soc_liteethphymiitx_converter_source_valid; -wire soc_liteethphymiitx_converter_source_ready; -wire soc_liteethphymiitx_converter_source_first; -wire soc_liteethphymiitx_converter_source_last; -wire [3:0] soc_liteethphymiitx_converter_source_payload_data; -wire soc_liteethphymiitx_converter_converter_sink_valid; -wire soc_liteethphymiitx_converter_converter_sink_ready; -wire soc_liteethphymiitx_converter_converter_sink_first; -wire soc_liteethphymiitx_converter_converter_sink_last; -reg [7:0] soc_liteethphymiitx_converter_converter_sink_payload_data = 8'd0; -wire soc_liteethphymiitx_converter_converter_source_valid; -wire soc_liteethphymiitx_converter_converter_source_ready; -wire soc_liteethphymiitx_converter_converter_source_first; -wire soc_liteethphymiitx_converter_converter_source_last; -reg [3:0] soc_liteethphymiitx_converter_converter_source_payload_data = 4'd0; -wire soc_liteethphymiitx_converter_converter_source_payload_valid_token_count; -reg soc_liteethphymiitx_converter_converter_mux = 1'd0; -wire soc_liteethphymiitx_converter_converter_first; -wire soc_liteethphymiitx_converter_converter_last; -wire soc_liteethphymiitx_converter_source_source_valid; -wire soc_liteethphymiitx_converter_source_source_ready; -wire soc_liteethphymiitx_converter_source_source_first; -wire soc_liteethphymiitx_converter_source_source_last; -wire [3:0] soc_liteethphymiitx_converter_source_source_payload_data; -wire soc_liteethphymiirx_source_source_valid; -wire soc_liteethphymiirx_source_source_ready; -wire soc_liteethphymiirx_source_source_first; -wire soc_liteethphymiirx_source_source_last; -wire [7:0] soc_liteethphymiirx_source_source_payload_data; -reg soc_liteethphymiirx_source_source_payload_last_be = 1'd0; -reg soc_liteethphymiirx_source_source_payload_error = 1'd0; -reg soc_liteethphymiirx_converter_sink_valid = 1'd0; -wire soc_liteethphymiirx_converter_sink_ready; -reg soc_liteethphymiirx_converter_sink_first = 1'd0; -wire soc_liteethphymiirx_converter_sink_last; -reg [3:0] soc_liteethphymiirx_converter_sink_payload_data = 4'd0; -wire soc_liteethphymiirx_converter_source_valid; -wire soc_liteethphymiirx_converter_source_ready; -wire soc_liteethphymiirx_converter_source_first; -wire soc_liteethphymiirx_converter_source_last; -reg [7:0] soc_liteethphymiirx_converter_source_payload_data = 8'd0; -wire soc_liteethphymiirx_converter_converter_sink_valid; -wire soc_liteethphymiirx_converter_converter_sink_ready; -wire soc_liteethphymiirx_converter_converter_sink_first; -wire soc_liteethphymiirx_converter_converter_sink_last; -wire [3:0] soc_liteethphymiirx_converter_converter_sink_payload_data; -wire soc_liteethphymiirx_converter_converter_source_valid; -wire soc_liteethphymiirx_converter_converter_source_ready; -reg soc_liteethphymiirx_converter_converter_source_first = 1'd0; -reg soc_liteethphymiirx_converter_converter_source_last = 1'd0; -reg [7:0] soc_liteethphymiirx_converter_converter_source_payload_data = 8'd0; -reg [1:0] soc_liteethphymiirx_converter_converter_source_payload_valid_token_count = 2'd0; -reg soc_liteethphymiirx_converter_converter_demux = 1'd0; -wire soc_liteethphymiirx_converter_converter_load_part; -reg soc_liteethphymiirx_converter_converter_strobe_all = 1'd0; -wire soc_liteethphymiirx_converter_source_source_valid; -wire soc_liteethphymiirx_converter_source_source_ready; -wire soc_liteethphymiirx_converter_source_source_first; -wire soc_liteethphymiirx_converter_source_source_last; -wire [7:0] soc_liteethphymiirx_converter_source_source_payload_data; -reg soc_liteethphymiirx_converter_reset = 1'd0; -wire soc_mdc; -wire soc_oe; -wire soc_w; -reg [2:0] soc_storage = 3'd0; -reg soc_re = 1'd0; -reg soc_r = 1'd0; -reg soc_status = 1'd0; -wire soc_we; -wire soc_data_w; -wire soc_data_oe; -wire soc_data_r; -wire soc_tx_gap_inserter_sink_valid; -reg soc_tx_gap_inserter_sink_ready = 1'd0; -wire soc_tx_gap_inserter_sink_first; -wire soc_tx_gap_inserter_sink_last; -wire [7:0] soc_tx_gap_inserter_sink_payload_data; -wire soc_tx_gap_inserter_sink_payload_last_be; -wire soc_tx_gap_inserter_sink_payload_error; -reg soc_tx_gap_inserter_source_valid = 1'd0; -wire soc_tx_gap_inserter_source_ready; -reg soc_tx_gap_inserter_source_first = 1'd0; -reg soc_tx_gap_inserter_source_last = 1'd0; -reg [7:0] soc_tx_gap_inserter_source_payload_data = 8'd0; -reg soc_tx_gap_inserter_source_payload_last_be = 1'd0; -reg soc_tx_gap_inserter_source_payload_error = 1'd0; -reg [3:0] soc_tx_gap_inserter_counter = 4'd0; -reg soc_tx_gap_inserter_counter_reset = 1'd0; -reg soc_tx_gap_inserter_counter_ce = 1'd0; -reg soc_preamble_crc_status = 1'd1; -wire soc_preamble_crc_we; -reg [31:0] soc_preamble_errors_status = 32'd0; -wire soc_preamble_errors_we; -reg [31:0] soc_crc_errors_status = 32'd0; -wire soc_crc_errors_we; -wire soc_preamble_inserter_sink_valid; -reg soc_preamble_inserter_sink_ready = 1'd0; -wire soc_preamble_inserter_sink_first; -wire soc_preamble_inserter_sink_last; -wire [7:0] soc_preamble_inserter_sink_payload_data; -wire soc_preamble_inserter_sink_payload_last_be; -wire soc_preamble_inserter_sink_payload_error; -reg soc_preamble_inserter_source_valid = 1'd0; -wire soc_preamble_inserter_source_ready; -reg soc_preamble_inserter_source_first = 1'd0; -reg soc_preamble_inserter_source_last = 1'd0; -reg [7:0] soc_preamble_inserter_source_payload_data = 8'd0; -wire soc_preamble_inserter_source_payload_last_be; -reg soc_preamble_inserter_source_payload_error = 1'd0; -reg [63:0] soc_preamble_inserter_preamble = 64'd15372286728091293013; -reg [2:0] soc_preamble_inserter_cnt = 3'd0; -reg soc_preamble_inserter_clr_cnt = 1'd0; -reg soc_preamble_inserter_inc_cnt = 1'd0; -wire soc_preamble_checker_sink_valid; -reg soc_preamble_checker_sink_ready = 1'd0; -wire soc_preamble_checker_sink_first; -wire soc_preamble_checker_sink_last; -wire [7:0] soc_preamble_checker_sink_payload_data; -wire soc_preamble_checker_sink_payload_last_be; -wire soc_preamble_checker_sink_payload_error; -reg soc_preamble_checker_source_valid = 1'd0; -wire soc_preamble_checker_source_ready; -reg soc_preamble_checker_source_first = 1'd0; -reg soc_preamble_checker_source_last = 1'd0; -wire [7:0] soc_preamble_checker_source_payload_data; -wire soc_preamble_checker_source_payload_last_be; -reg soc_preamble_checker_source_payload_error = 1'd0; -reg soc_preamble_checker_error = 1'd0; -wire soc_crc32_inserter_sink_valid; -reg soc_crc32_inserter_sink_ready = 1'd0; -wire soc_crc32_inserter_sink_first; -wire soc_crc32_inserter_sink_last; -wire [7:0] soc_crc32_inserter_sink_payload_data; -wire soc_crc32_inserter_sink_payload_last_be; -wire soc_crc32_inserter_sink_payload_error; -reg soc_crc32_inserter_source_valid = 1'd0; -wire soc_crc32_inserter_source_ready; -reg soc_crc32_inserter_source_first = 1'd0; -reg soc_crc32_inserter_source_last = 1'd0; -reg [7:0] soc_crc32_inserter_source_payload_data = 8'd0; -reg soc_crc32_inserter_source_payload_last_be = 1'd0; -reg soc_crc32_inserter_source_payload_error = 1'd0; -reg [7:0] soc_crc32_inserter_data0 = 8'd0; -wire [31:0] soc_crc32_inserter_value; -wire soc_crc32_inserter_error; -wire [7:0] soc_crc32_inserter_data1; -wire [31:0] soc_crc32_inserter_last; -reg [31:0] soc_crc32_inserter_next = 32'd0; -reg [31:0] soc_crc32_inserter_reg = 32'd4294967295; -reg soc_crc32_inserter_ce = 1'd0; -reg soc_crc32_inserter_reset = 1'd0; -reg [1:0] soc_crc32_inserter_cnt = 2'd3; -wire soc_crc32_inserter_cnt_done; -reg soc_crc32_inserter_is_ongoing0 = 1'd0; -reg soc_crc32_inserter_is_ongoing1 = 1'd0; -wire soc_crc32_checker_sink_sink_valid; -reg soc_crc32_checker_sink_sink_ready = 1'd0; -wire soc_crc32_checker_sink_sink_first; -wire soc_crc32_checker_sink_sink_last; -wire [7:0] soc_crc32_checker_sink_sink_payload_data; -wire soc_crc32_checker_sink_sink_payload_last_be; -wire soc_crc32_checker_sink_sink_payload_error; -wire soc_crc32_checker_source_source_valid; -wire soc_crc32_checker_source_source_ready; -reg soc_crc32_checker_source_source_first = 1'd0; -wire soc_crc32_checker_source_source_last; -wire [7:0] soc_crc32_checker_source_source_payload_data; -wire soc_crc32_checker_source_source_payload_last_be; -reg soc_crc32_checker_source_source_payload_error = 1'd0; -wire soc_crc32_checker_error; -wire [7:0] soc_crc32_checker_crc_data0; -wire [31:0] soc_crc32_checker_crc_value; -wire soc_crc32_checker_crc_error; -wire [7:0] soc_crc32_checker_crc_data1; -wire [31:0] soc_crc32_checker_crc_last; -reg [31:0] soc_crc32_checker_crc_next = 32'd0; -reg [31:0] soc_crc32_checker_crc_reg = 32'd4294967295; -reg soc_crc32_checker_crc_ce = 1'd0; -reg soc_crc32_checker_crc_reset = 1'd0; -reg soc_crc32_checker_syncfifo_sink_valid = 1'd0; -wire soc_crc32_checker_syncfifo_sink_ready; -wire soc_crc32_checker_syncfifo_sink_first; -wire soc_crc32_checker_syncfifo_sink_last; -wire [7:0] soc_crc32_checker_syncfifo_sink_payload_data; -wire soc_crc32_checker_syncfifo_sink_payload_last_be; -wire soc_crc32_checker_syncfifo_sink_payload_error; -wire soc_crc32_checker_syncfifo_source_valid; -wire soc_crc32_checker_syncfifo_source_ready; -wire soc_crc32_checker_syncfifo_source_first; -wire soc_crc32_checker_syncfifo_source_last; -wire [7:0] soc_crc32_checker_syncfifo_source_payload_data; -wire soc_crc32_checker_syncfifo_source_payload_last_be; -wire soc_crc32_checker_syncfifo_source_payload_error; -wire soc_crc32_checker_syncfifo_syncfifo_we; -wire soc_crc32_checker_syncfifo_syncfifo_writable; -wire soc_crc32_checker_syncfifo_syncfifo_re; -wire soc_crc32_checker_syncfifo_syncfifo_readable; -wire [11:0] soc_crc32_checker_syncfifo_syncfifo_din; -wire [11:0] soc_crc32_checker_syncfifo_syncfifo_dout; -reg [2:0] soc_crc32_checker_syncfifo_level = 3'd0; -reg soc_crc32_checker_syncfifo_replace = 1'd0; -reg [2:0] soc_crc32_checker_syncfifo_produce = 3'd0; -reg [2:0] soc_crc32_checker_syncfifo_consume = 3'd0; -reg [2:0] soc_crc32_checker_syncfifo_wrport_adr = 3'd0; -wire [11:0] soc_crc32_checker_syncfifo_wrport_dat_r; -wire soc_crc32_checker_syncfifo_wrport_we; -wire [11:0] soc_crc32_checker_syncfifo_wrport_dat_w; -wire soc_crc32_checker_syncfifo_do_read; -wire [2:0] soc_crc32_checker_syncfifo_rdport_adr; -wire [11:0] soc_crc32_checker_syncfifo_rdport_dat_r; -wire [7:0] soc_crc32_checker_syncfifo_fifo_in_payload_data; -wire soc_crc32_checker_syncfifo_fifo_in_payload_last_be; -wire soc_crc32_checker_syncfifo_fifo_in_payload_error; -wire soc_crc32_checker_syncfifo_fifo_in_first; -wire soc_crc32_checker_syncfifo_fifo_in_last; -wire [7:0] soc_crc32_checker_syncfifo_fifo_out_payload_data; -wire soc_crc32_checker_syncfifo_fifo_out_payload_last_be; -wire soc_crc32_checker_syncfifo_fifo_out_payload_error; -wire soc_crc32_checker_syncfifo_fifo_out_first; -wire soc_crc32_checker_syncfifo_fifo_out_last; -reg soc_crc32_checker_fifo_reset = 1'd0; -wire soc_crc32_checker_fifo_in; -wire soc_crc32_checker_fifo_out; -wire soc_crc32_checker_fifo_full; -wire soc_ps_preamble_error_i; -wire soc_ps_preamble_error_o; -reg soc_ps_preamble_error_toggle_i = 1'd0; -wire soc_ps_preamble_error_toggle_o; -reg soc_ps_preamble_error_toggle_o_r = 1'd0; -wire soc_ps_crc_error_i; -wire soc_ps_crc_error_o; -reg soc_ps_crc_error_toggle_i = 1'd0; -wire soc_ps_crc_error_toggle_o; -reg soc_ps_crc_error_toggle_o_r = 1'd0; -wire soc_padding_inserter_sink_valid; -reg soc_padding_inserter_sink_ready = 1'd0; -wire soc_padding_inserter_sink_first; -wire soc_padding_inserter_sink_last; -wire [7:0] soc_padding_inserter_sink_payload_data; -wire soc_padding_inserter_sink_payload_last_be; -wire soc_padding_inserter_sink_payload_error; -reg soc_padding_inserter_source_valid = 1'd0; -wire soc_padding_inserter_source_ready; -reg soc_padding_inserter_source_first = 1'd0; -reg soc_padding_inserter_source_last = 1'd0; -reg [7:0] soc_padding_inserter_source_payload_data = 8'd0; -reg soc_padding_inserter_source_payload_last_be = 1'd0; -reg soc_padding_inserter_source_payload_error = 1'd0; -reg [15:0] soc_padding_inserter_counter = 16'd1; -wire soc_padding_inserter_counter_done; -reg soc_padding_inserter_counter_reset = 1'd0; -reg soc_padding_inserter_counter_ce = 1'd0; -wire soc_padding_checker_sink_valid; -wire soc_padding_checker_sink_ready; -wire soc_padding_checker_sink_first; -wire soc_padding_checker_sink_last; -wire [7:0] soc_padding_checker_sink_payload_data; -wire soc_padding_checker_sink_payload_last_be; -wire soc_padding_checker_sink_payload_error; -wire soc_padding_checker_source_valid; -wire soc_padding_checker_source_ready; -wire soc_padding_checker_source_first; -wire soc_padding_checker_source_last; -wire [7:0] soc_padding_checker_source_payload_data; -wire soc_padding_checker_source_payload_last_be; -wire soc_padding_checker_source_payload_error; -wire soc_tx_last_be_sink_valid; -wire soc_tx_last_be_sink_ready; -wire soc_tx_last_be_sink_first; -wire soc_tx_last_be_sink_last; -wire [7:0] soc_tx_last_be_sink_payload_data; -wire soc_tx_last_be_sink_payload_last_be; -wire soc_tx_last_be_sink_payload_error; -wire soc_tx_last_be_source_valid; -wire soc_tx_last_be_source_ready; -reg soc_tx_last_be_source_first = 1'd0; -wire soc_tx_last_be_source_last; -wire [7:0] soc_tx_last_be_source_payload_data; -reg soc_tx_last_be_source_payload_last_be = 1'd0; -reg soc_tx_last_be_source_payload_error = 1'd0; -reg soc_tx_last_be_ongoing = 1'd1; -wire soc_rx_last_be_sink_valid; -wire soc_rx_last_be_sink_ready; -wire soc_rx_last_be_sink_first; -wire soc_rx_last_be_sink_last; -wire [7:0] soc_rx_last_be_sink_payload_data; -wire soc_rx_last_be_sink_payload_last_be; -wire soc_rx_last_be_sink_payload_error; -wire soc_rx_last_be_source_valid; -wire soc_rx_last_be_source_ready; -wire soc_rx_last_be_source_first; -wire soc_rx_last_be_source_last; -wire [7:0] soc_rx_last_be_source_payload_data; -reg soc_rx_last_be_source_payload_last_be = 1'd0; -wire soc_rx_last_be_source_payload_error; -wire soc_tx_converter_sink_valid; -wire soc_tx_converter_sink_ready; -wire soc_tx_converter_sink_first; -wire soc_tx_converter_sink_last; -wire [31:0] soc_tx_converter_sink_payload_data; -wire [3:0] soc_tx_converter_sink_payload_last_be; -wire [3:0] soc_tx_converter_sink_payload_error; -wire soc_tx_converter_source_valid; -wire soc_tx_converter_source_ready; -wire soc_tx_converter_source_first; -wire soc_tx_converter_source_last; -wire [7:0] soc_tx_converter_source_payload_data; -wire soc_tx_converter_source_payload_last_be; -wire soc_tx_converter_source_payload_error; -wire soc_tx_converter_converter_sink_valid; -wire soc_tx_converter_converter_sink_ready; -wire soc_tx_converter_converter_sink_first; -wire soc_tx_converter_converter_sink_last; -reg [39:0] soc_tx_converter_converter_sink_payload_data = 40'd0; -wire soc_tx_converter_converter_source_valid; -wire soc_tx_converter_converter_source_ready; -wire soc_tx_converter_converter_source_first; -wire soc_tx_converter_converter_source_last; -reg [9:0] soc_tx_converter_converter_source_payload_data = 10'd0; -wire soc_tx_converter_converter_source_payload_valid_token_count; -reg [1:0] soc_tx_converter_converter_mux = 2'd0; -wire soc_tx_converter_converter_first; -wire soc_tx_converter_converter_last; -wire soc_tx_converter_source_source_valid; -wire soc_tx_converter_source_source_ready; -wire soc_tx_converter_source_source_first; -wire soc_tx_converter_source_source_last; -wire [9:0] soc_tx_converter_source_source_payload_data; -wire soc_rx_converter_sink_valid; -wire soc_rx_converter_sink_ready; -wire soc_rx_converter_sink_first; -wire soc_rx_converter_sink_last; -wire [7:0] soc_rx_converter_sink_payload_data; -wire soc_rx_converter_sink_payload_last_be; -wire soc_rx_converter_sink_payload_error; -wire soc_rx_converter_source_valid; -wire soc_rx_converter_source_ready; -wire soc_rx_converter_source_first; -wire soc_rx_converter_source_last; -reg [31:0] soc_rx_converter_source_payload_data = 32'd0; -reg [3:0] soc_rx_converter_source_payload_last_be = 4'd0; -reg [3:0] soc_rx_converter_source_payload_error = 4'd0; -wire soc_rx_converter_converter_sink_valid; -wire soc_rx_converter_converter_sink_ready; -wire soc_rx_converter_converter_sink_first; -wire soc_rx_converter_converter_sink_last; -wire [9:0] soc_rx_converter_converter_sink_payload_data; -wire soc_rx_converter_converter_source_valid; -wire soc_rx_converter_converter_source_ready; -reg soc_rx_converter_converter_source_first = 1'd0; -reg soc_rx_converter_converter_source_last = 1'd0; -reg [39:0] soc_rx_converter_converter_source_payload_data = 40'd0; -reg [2:0] soc_rx_converter_converter_source_payload_valid_token_count = 3'd0; -reg [1:0] soc_rx_converter_converter_demux = 2'd0; -wire soc_rx_converter_converter_load_part; -reg soc_rx_converter_converter_strobe_all = 1'd0; -wire soc_rx_converter_source_source_valid; -wire soc_rx_converter_source_source_ready; -wire soc_rx_converter_source_source_first; -wire soc_rx_converter_source_source_last; -wire [39:0] soc_rx_converter_source_source_payload_data; -wire soc_tx_cdc_sink_valid; -wire soc_tx_cdc_sink_ready; -wire soc_tx_cdc_sink_first; -wire soc_tx_cdc_sink_last; -wire [31:0] soc_tx_cdc_sink_payload_data; -wire [3:0] soc_tx_cdc_sink_payload_last_be; -wire [3:0] soc_tx_cdc_sink_payload_error; -wire soc_tx_cdc_source_valid; -wire soc_tx_cdc_source_ready; -wire soc_tx_cdc_source_first; -wire soc_tx_cdc_source_last; -wire [31:0] soc_tx_cdc_source_payload_data; -wire [3:0] soc_tx_cdc_source_payload_last_be; -wire [3:0] soc_tx_cdc_source_payload_error; -wire soc_tx_cdc_asyncfifo_we; -wire soc_tx_cdc_asyncfifo_writable; -wire soc_tx_cdc_asyncfifo_re; -wire soc_tx_cdc_asyncfifo_readable; -wire [41:0] soc_tx_cdc_asyncfifo_din; -wire [41:0] soc_tx_cdc_asyncfifo_dout; -wire soc_tx_cdc_graycounter0_ce; -(* dont_touch = "true" *) reg [6:0] soc_tx_cdc_graycounter0_q = 7'd0; -wire [6:0] soc_tx_cdc_graycounter0_q_next; -reg [6:0] soc_tx_cdc_graycounter0_q_binary = 7'd0; -reg [6:0] soc_tx_cdc_graycounter0_q_next_binary = 7'd0; -wire soc_tx_cdc_graycounter1_ce; -(* dont_touch = "true" *) reg [6:0] soc_tx_cdc_graycounter1_q = 7'd0; -wire [6:0] soc_tx_cdc_graycounter1_q_next; -reg [6:0] soc_tx_cdc_graycounter1_q_binary = 7'd0; -reg [6:0] soc_tx_cdc_graycounter1_q_next_binary = 7'd0; -wire [6:0] soc_tx_cdc_produce_rdomain; -wire [6:0] soc_tx_cdc_consume_wdomain; -wire [5:0] soc_tx_cdc_wrport_adr; -wire [41:0] soc_tx_cdc_wrport_dat_r; -wire soc_tx_cdc_wrport_we; -wire [41:0] soc_tx_cdc_wrport_dat_w; -wire [5:0] soc_tx_cdc_rdport_adr; -wire [41:0] soc_tx_cdc_rdport_dat_r; -wire [31:0] soc_tx_cdc_fifo_in_payload_data; -wire [3:0] soc_tx_cdc_fifo_in_payload_last_be; -wire [3:0] soc_tx_cdc_fifo_in_payload_error; -wire soc_tx_cdc_fifo_in_first; -wire soc_tx_cdc_fifo_in_last; -wire [31:0] soc_tx_cdc_fifo_out_payload_data; -wire [3:0] soc_tx_cdc_fifo_out_payload_last_be; -wire [3:0] soc_tx_cdc_fifo_out_payload_error; -wire soc_tx_cdc_fifo_out_first; -wire soc_tx_cdc_fifo_out_last; -wire soc_rx_cdc_sink_valid; -wire soc_rx_cdc_sink_ready; -wire soc_rx_cdc_sink_first; -wire soc_rx_cdc_sink_last; -wire [31:0] soc_rx_cdc_sink_payload_data; -wire [3:0] soc_rx_cdc_sink_payload_last_be; -wire [3:0] soc_rx_cdc_sink_payload_error; -wire soc_rx_cdc_source_valid; -wire soc_rx_cdc_source_ready; -wire soc_rx_cdc_source_first; -wire soc_rx_cdc_source_last; -wire [31:0] soc_rx_cdc_source_payload_data; -wire [3:0] soc_rx_cdc_source_payload_last_be; -wire [3:0] soc_rx_cdc_source_payload_error; -wire soc_rx_cdc_asyncfifo_we; -wire soc_rx_cdc_asyncfifo_writable; -wire soc_rx_cdc_asyncfifo_re; -wire soc_rx_cdc_asyncfifo_readable; -wire [41:0] soc_rx_cdc_asyncfifo_din; -wire [41:0] soc_rx_cdc_asyncfifo_dout; -wire soc_rx_cdc_graycounter0_ce; -(* dont_touch = "true" *) reg [6:0] soc_rx_cdc_graycounter0_q = 7'd0; -wire [6:0] soc_rx_cdc_graycounter0_q_next; -reg [6:0] soc_rx_cdc_graycounter0_q_binary = 7'd0; -reg [6:0] soc_rx_cdc_graycounter0_q_next_binary = 7'd0; -wire soc_rx_cdc_graycounter1_ce; -(* dont_touch = "true" *) reg [6:0] soc_rx_cdc_graycounter1_q = 7'd0; -wire [6:0] soc_rx_cdc_graycounter1_q_next; -reg [6:0] soc_rx_cdc_graycounter1_q_binary = 7'd0; -reg [6:0] soc_rx_cdc_graycounter1_q_next_binary = 7'd0; -wire [6:0] soc_rx_cdc_produce_rdomain; -wire [6:0] soc_rx_cdc_consume_wdomain; -wire [5:0] soc_rx_cdc_wrport_adr; -wire [41:0] soc_rx_cdc_wrport_dat_r; -wire soc_rx_cdc_wrport_we; -wire [41:0] soc_rx_cdc_wrport_dat_w; -wire [5:0] soc_rx_cdc_rdport_adr; -wire [41:0] soc_rx_cdc_rdport_dat_r; -wire [31:0] soc_rx_cdc_fifo_in_payload_data; -wire [3:0] soc_rx_cdc_fifo_in_payload_last_be; -wire [3:0] soc_rx_cdc_fifo_in_payload_error; -wire soc_rx_cdc_fifo_in_first; -wire soc_rx_cdc_fifo_in_last; -wire [31:0] soc_rx_cdc_fifo_out_payload_data; -wire [3:0] soc_rx_cdc_fifo_out_payload_last_be; -wire [3:0] soc_rx_cdc_fifo_out_payload_error; -wire soc_rx_cdc_fifo_out_first; -wire soc_rx_cdc_fifo_out_last; -wire soc_sink_valid; -wire soc_sink_ready; -wire soc_sink_first; -wire soc_sink_last; -wire [31:0] soc_sink_payload_data; -wire [3:0] soc_sink_payload_last_be; -wire [3:0] soc_sink_payload_error; -wire soc_source_valid; -wire soc_source_ready; -wire soc_source_first; -wire soc_source_last; -wire [31:0] soc_source_payload_data; -wire [3:0] soc_source_payload_last_be; -wire [3:0] soc_source_payload_error; -wire [29:0] soc_bus_adr; -wire [31:0] soc_bus_dat_w; -wire [31:0] soc_bus_dat_r; -wire [3:0] soc_bus_sel; -wire soc_bus_cyc; -wire soc_bus_stb; -wire soc_bus_ack; -wire soc_bus_we; -wire [2:0] soc_bus_cti; -wire [1:0] soc_bus_bte; -wire soc_bus_err; -wire soc_writer_sink_sink_valid; -reg soc_writer_sink_sink_ready = 1'd1; -wire soc_writer_sink_sink_first; -wire soc_writer_sink_sink_last; -wire [31:0] soc_writer_sink_sink_payload_data; -wire [3:0] soc_writer_sink_sink_payload_last_be; -wire [3:0] soc_writer_sink_sink_payload_error; -wire soc_writer_slot_status; -wire soc_writer_slot_we; -wire [31:0] soc_writer_length_status; -wire soc_writer_length_we; -reg [31:0] soc_writer_errors_status = 32'd0; -wire soc_writer_errors_we; -wire soc_writer_irq; -wire soc_writer_available_status; -wire soc_writer_available_pending; -wire soc_writer_available_trigger; -reg soc_writer_available_clear = 1'd0; -wire soc_writer_status_re; -wire soc_writer_status_r; -wire soc_writer_status_we; -wire soc_writer_status_w; -wire soc_writer_pending_re; -wire soc_writer_pending_r; -wire soc_writer_pending_we; -wire soc_writer_pending_w; -reg soc_writer_storage = 1'd0; -reg soc_writer_re = 1'd0; -reg [2:0] soc_writer_inc = 3'd0; -reg [31:0] soc_writer_counter = 32'd0; -reg soc_writer_counter_reset = 1'd0; -reg soc_writer_counter_ce = 1'd0; -reg soc_writer_slot = 1'd0; -reg soc_writer_slot_ce = 1'd0; -reg soc_writer_ongoing = 1'd0; -reg soc_writer_fifo_sink_valid = 1'd0; -wire soc_writer_fifo_sink_ready; -reg soc_writer_fifo_sink_first = 1'd0; -reg soc_writer_fifo_sink_last = 1'd0; -wire soc_writer_fifo_sink_payload_slot; -wire [31:0] soc_writer_fifo_sink_payload_length; -wire soc_writer_fifo_source_valid; -wire soc_writer_fifo_source_ready; -wire soc_writer_fifo_source_first; -wire soc_writer_fifo_source_last; -wire soc_writer_fifo_source_payload_slot; -wire [31:0] soc_writer_fifo_source_payload_length; -wire soc_writer_fifo_syncfifo_we; -wire soc_writer_fifo_syncfifo_writable; -wire soc_writer_fifo_syncfifo_re; -wire soc_writer_fifo_syncfifo_readable; -wire [34:0] soc_writer_fifo_syncfifo_din; -wire [34:0] soc_writer_fifo_syncfifo_dout; -reg [1:0] soc_writer_fifo_level = 2'd0; -reg soc_writer_fifo_replace = 1'd0; -reg soc_writer_fifo_produce = 1'd0; -reg soc_writer_fifo_consume = 1'd0; -reg soc_writer_fifo_wrport_adr = 1'd0; -wire [34:0] soc_writer_fifo_wrport_dat_r; -wire soc_writer_fifo_wrport_we; -wire [34:0] soc_writer_fifo_wrport_dat_w; -wire soc_writer_fifo_do_read; -wire soc_writer_fifo_rdport_adr; -wire [34:0] soc_writer_fifo_rdport_dat_r; -wire soc_writer_fifo_fifo_in_payload_slot; -wire [31:0] soc_writer_fifo_fifo_in_payload_length; -wire soc_writer_fifo_fifo_in_first; -wire soc_writer_fifo_fifo_in_last; -wire soc_writer_fifo_fifo_out_payload_slot; -wire [31:0] soc_writer_fifo_fifo_out_payload_length; -wire soc_writer_fifo_fifo_out_first; -wire soc_writer_fifo_fifo_out_last; -reg [8:0] soc_writer_memory0_adr = 9'd0; -wire [31:0] soc_writer_memory0_dat_r; -reg soc_writer_memory0_we = 1'd0; -reg [31:0] soc_writer_memory0_dat_w = 32'd0; -reg [8:0] soc_writer_memory1_adr = 9'd0; -wire [31:0] soc_writer_memory1_dat_r; -reg soc_writer_memory1_we = 1'd0; -reg [31:0] soc_writer_memory1_dat_w = 32'd0; -reg soc_reader_source_source_valid = 1'd0; -wire soc_reader_source_source_ready; -reg soc_reader_source_source_first = 1'd0; -reg soc_reader_source_source_last = 1'd0; -reg [31:0] soc_reader_source_source_payload_data = 32'd0; -reg [3:0] soc_reader_source_source_payload_last_be = 4'd0; -reg [3:0] soc_reader_source_source_payload_error = 4'd0; -wire soc_reader_start_re; -wire soc_reader_start_r; -wire soc_reader_start_we; -reg soc_reader_start_w = 1'd0; -wire soc_reader_ready_status; -wire soc_reader_ready_we; -wire [1:0] soc_reader_level_status; -wire soc_reader_level_we; -reg soc_reader_slot_storage = 1'd0; -reg soc_reader_slot_re = 1'd0; -reg [10:0] soc_reader_length_storage = 11'd0; -reg soc_reader_length_re = 1'd0; -wire soc_reader_irq; -wire soc_reader_done_status; -reg soc_reader_done_pending = 1'd0; -reg soc_reader_done_trigger = 1'd0; -reg soc_reader_done_clear = 1'd0; -wire soc_reader_eventmanager_status_re; -wire soc_reader_eventmanager_status_r; -wire soc_reader_eventmanager_status_we; -wire soc_reader_eventmanager_status_w; -wire soc_reader_eventmanager_pending_re; -wire soc_reader_eventmanager_pending_r; -wire soc_reader_eventmanager_pending_we; -wire soc_reader_eventmanager_pending_w; -reg soc_reader_eventmanager_storage = 1'd0; -reg soc_reader_eventmanager_re = 1'd0; -wire soc_reader_fifo_sink_valid; -wire soc_reader_fifo_sink_ready; -reg soc_reader_fifo_sink_first = 1'd0; -reg soc_reader_fifo_sink_last = 1'd0; -wire soc_reader_fifo_sink_payload_slot; -wire [10:0] soc_reader_fifo_sink_payload_length; -wire soc_reader_fifo_source_valid; -reg soc_reader_fifo_source_ready = 1'd0; -wire soc_reader_fifo_source_first; -wire soc_reader_fifo_source_last; -wire soc_reader_fifo_source_payload_slot; -wire [10:0] soc_reader_fifo_source_payload_length; -wire soc_reader_fifo_syncfifo_we; -wire soc_reader_fifo_syncfifo_writable; -wire soc_reader_fifo_syncfifo_re; -wire soc_reader_fifo_syncfifo_readable; -wire [13:0] soc_reader_fifo_syncfifo_din; -wire [13:0] soc_reader_fifo_syncfifo_dout; -reg [1:0] soc_reader_fifo_level = 2'd0; -reg soc_reader_fifo_replace = 1'd0; -reg soc_reader_fifo_produce = 1'd0; -reg soc_reader_fifo_consume = 1'd0; -reg soc_reader_fifo_wrport_adr = 1'd0; -wire [13:0] soc_reader_fifo_wrport_dat_r; -wire soc_reader_fifo_wrport_we; -wire [13:0] soc_reader_fifo_wrport_dat_w; -wire soc_reader_fifo_do_read; -wire soc_reader_fifo_rdport_adr; -wire [13:0] soc_reader_fifo_rdport_dat_r; -wire soc_reader_fifo_fifo_in_payload_slot; -wire [10:0] soc_reader_fifo_fifo_in_payload_length; -wire soc_reader_fifo_fifo_in_first; -wire soc_reader_fifo_fifo_in_last; -wire soc_reader_fifo_fifo_out_payload_slot; -wire [10:0] soc_reader_fifo_fifo_out_payload_length; -wire soc_reader_fifo_fifo_out_first; -wire soc_reader_fifo_fifo_out_last; -reg [10:0] soc_reader_counter = 11'd0; -reg soc_reader_counter_reset = 1'd0; -reg soc_reader_counter_ce = 1'd0; -wire soc_reader_last; -reg soc_reader_last_d = 1'd0; -wire [8:0] soc_reader_memory0_adr; -wire [31:0] soc_reader_memory0_dat_r; -wire [8:0] soc_reader_memory1_adr; -wire [31:0] soc_reader_memory1_dat_r; -wire soc_ev_irq; -wire [29:0] soc_sram0_bus_adr0; -wire [31:0] soc_sram0_bus_dat_w0; -wire [31:0] soc_sram0_bus_dat_r0; -wire [3:0] soc_sram0_bus_sel0; -wire soc_sram0_bus_cyc0; -wire soc_sram0_bus_stb0; -reg soc_sram0_bus_ack0 = 1'd0; -wire soc_sram0_bus_we0; -wire [2:0] soc_sram0_bus_cti0; -wire [1:0] soc_sram0_bus_bte0; -reg soc_sram0_bus_err0 = 1'd0; -wire [8:0] soc_sram0_adr0; -wire [31:0] soc_sram0_dat_r0; -wire [29:0] soc_sram1_bus_adr0; -wire [31:0] soc_sram1_bus_dat_w0; -wire [31:0] soc_sram1_bus_dat_r0; -wire [3:0] soc_sram1_bus_sel0; -wire soc_sram1_bus_cyc0; -wire soc_sram1_bus_stb0; -reg soc_sram1_bus_ack0 = 1'd0; -wire soc_sram1_bus_we0; -wire [2:0] soc_sram1_bus_cti0; -wire [1:0] soc_sram1_bus_bte0; -reg soc_sram1_bus_err0 = 1'd0; -wire [8:0] soc_sram1_adr0; -wire [31:0] soc_sram1_dat_r0; -wire [29:0] soc_sram0_bus_adr1; -wire [31:0] soc_sram0_bus_dat_w1; -wire [31:0] soc_sram0_bus_dat_r1; -wire [3:0] soc_sram0_bus_sel1; -wire soc_sram0_bus_cyc1; -wire soc_sram0_bus_stb1; -reg soc_sram0_bus_ack1 = 1'd0; -wire soc_sram0_bus_we1; -wire [2:0] soc_sram0_bus_cti1; -wire [1:0] soc_sram0_bus_bte1; -reg soc_sram0_bus_err1 = 1'd0; -wire [8:0] soc_sram0_adr1; -wire [31:0] soc_sram0_dat_r1; -reg [3:0] soc_sram0_we = 4'd0; -wire [31:0] soc_sram0_dat_w; -wire [29:0] soc_sram1_bus_adr1; -wire [31:0] soc_sram1_bus_dat_w1; -wire [31:0] soc_sram1_bus_dat_r1; -wire [3:0] soc_sram1_bus_sel1; -wire soc_sram1_bus_cyc1; -wire soc_sram1_bus_stb1; -reg soc_sram1_bus_ack1 = 1'd0; -wire soc_sram1_bus_we1; -wire [2:0] soc_sram1_bus_cti1; -wire [1:0] soc_sram1_bus_bte1; -reg soc_sram1_bus_err1 = 1'd0; -wire [8:0] soc_sram1_adr1; -wire [31:0] soc_sram1_dat_r1; -reg [3:0] soc_sram1_we = 4'd0; -wire [31:0] soc_sram1_dat_w; -reg [3:0] soc_slave_sel = 4'd0; -reg [3:0] soc_slave_sel_r = 4'd0; -reg vns_wb2csr_state = 1'd0; -reg vns_wb2csr_next_state = 1'd0; -reg [1:0] vns_refresher_state = 2'd0; -reg [1:0] vns_refresher_next_state = 2'd0; -reg [2:0] vns_bankmachine0_state = 3'd0; -reg [2:0] vns_bankmachine0_next_state = 3'd0; -reg [2:0] vns_bankmachine1_state = 3'd0; -reg [2:0] vns_bankmachine1_next_state = 3'd0; -reg [2:0] vns_bankmachine2_state = 3'd0; -reg [2:0] vns_bankmachine2_next_state = 3'd0; -reg [2:0] vns_bankmachine3_state = 3'd0; -reg [2:0] vns_bankmachine3_next_state = 3'd0; -reg [2:0] vns_bankmachine4_state = 3'd0; -reg [2:0] vns_bankmachine4_next_state = 3'd0; -reg [2:0] vns_bankmachine5_state = 3'd0; -reg [2:0] vns_bankmachine5_next_state = 3'd0; -reg [2:0] vns_bankmachine6_state = 3'd0; -reg [2:0] vns_bankmachine6_next_state = 3'd0; -reg [2:0] vns_bankmachine7_state = 3'd0; -reg [2:0] vns_bankmachine7_next_state = 3'd0; -reg [3:0] vns_multiplexer_state = 4'd0; -reg [3:0] vns_multiplexer_next_state = 4'd0; -wire vns_roundrobin0_request; -wire vns_roundrobin0_grant; -wire vns_roundrobin0_ce; -wire vns_roundrobin1_request; -wire vns_roundrobin1_grant; -wire vns_roundrobin1_ce; -wire vns_roundrobin2_request; -wire vns_roundrobin2_grant; -wire vns_roundrobin2_ce; -wire vns_roundrobin3_request; -wire vns_roundrobin3_grant; -wire vns_roundrobin3_ce; -wire vns_roundrobin4_request; -wire vns_roundrobin4_grant; -wire vns_roundrobin4_ce; -wire vns_roundrobin5_request; -wire vns_roundrobin5_grant; -wire vns_roundrobin5_ce; -wire vns_roundrobin6_request; -wire vns_roundrobin6_grant; -wire vns_roundrobin6_ce; -wire vns_roundrobin7_request; -wire vns_roundrobin7_grant; -wire vns_roundrobin7_ce; -reg [2:0] vns_rbank = 3'd0; -reg [2:0] vns_wbank = 3'd0; -reg vns_locked0 = 1'd0; -reg vns_locked1 = 1'd0; -reg vns_locked2 = 1'd0; -reg vns_locked3 = 1'd0; -reg vns_locked4 = 1'd0; -reg vns_locked5 = 1'd0; -reg vns_locked6 = 1'd0; -reg vns_locked7 = 1'd0; -reg vns_new_master_wdata_ready0 = 1'd0; -reg vns_new_master_wdata_ready1 = 1'd0; -reg vns_new_master_wdata_ready2 = 1'd0; -reg vns_new_master_rdata_valid0 = 1'd0; -reg vns_new_master_rdata_valid1 = 1'd0; -reg vns_new_master_rdata_valid2 = 1'd0; -reg vns_new_master_rdata_valid3 = 1'd0; -reg vns_new_master_rdata_valid4 = 1'd0; -reg vns_new_master_rdata_valid5 = 1'd0; -reg vns_new_master_rdata_valid6 = 1'd0; -reg vns_new_master_rdata_valid7 = 1'd0; -reg vns_new_master_rdata_valid8 = 1'd0; -reg vns_new_master_rdata_valid9 = 1'd0; -reg [2:0] vns_fullmemorywe_state = 3'd0; -reg [2:0] vns_fullmemorywe_next_state = 3'd0; -reg [1:0] vns_litedramwishbone2native_state = 2'd0; -reg [1:0] vns_litedramwishbone2native_next_state = 2'd0; -reg soc_netsoc_count_litedramwishbone2native_next_value = 1'd0; -reg soc_netsoc_count_litedramwishbone2native_next_value_ce = 1'd0; -reg vns_liteethmacgap_state = 1'd0; -reg vns_liteethmacgap_next_state = 1'd0; -reg [1:0] vns_liteethmacpreambleinserter_state = 2'd0; -reg [1:0] vns_liteethmacpreambleinserter_next_state = 2'd0; -reg vns_liteethmacpreamblechecker_state = 1'd0; -reg vns_liteethmacpreamblechecker_next_state = 1'd0; -reg [1:0] vns_liteethmaccrc32inserter_state = 2'd0; -reg [1:0] vns_liteethmaccrc32inserter_next_state = 2'd0; -reg [1:0] vns_liteethmaccrc32checker_state = 2'd0; -reg [1:0] vns_liteethmaccrc32checker_next_state = 2'd0; -reg vns_liteethmacpaddinginserter_state = 1'd0; -reg vns_liteethmacpaddinginserter_next_state = 1'd0; -reg [2:0] vns_liteethmacsramwriter_state = 3'd0; -reg [2:0] vns_liteethmacsramwriter_next_state = 3'd0; -reg [31:0] soc_writer_errors_status_liteethmac_next_value = 32'd0; -reg soc_writer_errors_status_liteethmac_next_value_ce = 1'd0; -reg [1:0] vns_liteethmacsramreader_state = 2'd0; -reg [1:0] vns_liteethmacsramreader_next_state = 2'd0; -wire vns_wb_sdram_con_request; -wire vns_wb_sdram_con_grant; -wire [29:0] vns_netsoc_shared_adr; -wire [31:0] vns_netsoc_shared_dat_w; -reg [31:0] vns_netsoc_shared_dat_r = 32'd0; -wire [3:0] vns_netsoc_shared_sel; -wire vns_netsoc_shared_cyc; -wire vns_netsoc_shared_stb; -reg vns_netsoc_shared_ack = 1'd0; -wire vns_netsoc_shared_we; -wire [2:0] vns_netsoc_shared_cti; -wire [1:0] vns_netsoc_shared_bte; -wire vns_netsoc_shared_err; -wire [1:0] vns_netsoc_request; -reg vns_netsoc_grant = 1'd0; -reg [5:0] vns_netsoc_slave_sel = 6'd0; -reg [5:0] vns_netsoc_slave_sel_r = 6'd0; -reg vns_netsoc_error = 1'd0; -wire vns_netsoc_wait; -wire vns_netsoc_done; -reg [19:0] vns_netsoc_count = 20'd1000000; -wire [13:0] vns_netsoc_csrbankarray_interface0_bank_bus_adr; -wire vns_netsoc_csrbankarray_interface0_bank_bus_we; -wire [7:0] vns_netsoc_csrbankarray_interface0_bank_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_interface0_bank_bus_dat_r = 8'd0; -wire vns_netsoc_csrbankarray_csrbank0_timer_time7_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time7_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time7_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time7_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time6_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time6_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time6_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time6_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time5_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time5_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time5_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time5_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time4_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time4_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time4_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time4_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time3_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time3_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time2_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time2_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time1_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time1_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time0_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time0_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_w; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_r; -wire vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_w; -wire vns_netsoc_csrbankarray_csrbank0_sel; -wire [13:0] vns_netsoc_csrbankarray_interface1_bank_bus_adr; -wire vns_netsoc_csrbankarray_interface1_bank_bus_we; -wire [7:0] vns_netsoc_csrbankarray_interface1_bank_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_interface1_bank_bus_dat_r = 8'd0; -wire vns_netsoc_csrbankarray_csrbank1_scratch3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch3_r; -wire vns_netsoc_csrbankarray_csrbank1_scratch3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch3_w; -wire vns_netsoc_csrbankarray_csrbank1_scratch2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch2_r; -wire vns_netsoc_csrbankarray_csrbank1_scratch2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch2_w; -wire vns_netsoc_csrbankarray_csrbank1_scratch1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch1_r; -wire vns_netsoc_csrbankarray_csrbank1_scratch1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch1_w; -wire vns_netsoc_csrbankarray_csrbank1_scratch0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch0_r; -wire vns_netsoc_csrbankarray_csrbank1_scratch0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_scratch0_w; -wire vns_netsoc_csrbankarray_csrbank1_bus_errors3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors3_r; -wire vns_netsoc_csrbankarray_csrbank1_bus_errors3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors3_w; -wire vns_netsoc_csrbankarray_csrbank1_bus_errors2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors2_r; -wire vns_netsoc_csrbankarray_csrbank1_bus_errors2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors2_w; -wire vns_netsoc_csrbankarray_csrbank1_bus_errors1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors1_r; -wire vns_netsoc_csrbankarray_csrbank1_bus_errors1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors1_w; -wire vns_netsoc_csrbankarray_csrbank1_bus_errors0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors0_r; -wire vns_netsoc_csrbankarray_csrbank1_bus_errors0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank1_bus_errors0_w; -wire vns_netsoc_csrbankarray_csrbank1_sel; -wire [13:0] vns_netsoc_csrbankarray_interface2_bank_bus_adr; -wire vns_netsoc_csrbankarray_interface2_bank_bus_we; -wire [7:0] vns_netsoc_csrbankarray_interface2_bank_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_interface2_bank_bus_dat_r = 8'd0; -wire vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_re; -wire [4:0] vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_r; -wire vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_we; -wire [4:0] vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_w; -wire vns_netsoc_csrbankarray_csrbank2_dly_sel0_re; -wire [1:0] vns_netsoc_csrbankarray_csrbank2_dly_sel0_r; -wire vns_netsoc_csrbankarray_csrbank2_dly_sel0_we; -wire [1:0] vns_netsoc_csrbankarray_csrbank2_dly_sel0_w; -wire vns_netsoc_csrbankarray_csrbank2_sel; -wire [13:0] vns_netsoc_csrbankarray_interface3_bank_bus_adr; -wire vns_netsoc_csrbankarray_interface3_bank_bus_we; -wire [7:0] vns_netsoc_csrbankarray_interface3_bank_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_interface3_bank_bus_dat_r = 8'd0; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_re; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_we; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_re; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_we; -wire vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_re; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_we; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_level_re; -wire [1:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_level_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_level_we; -wire [1:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_level_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_re; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_we; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_re; -wire [2:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_we; -wire [2:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_w; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_re; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_r; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_we; -wire vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_w; -wire vns_netsoc_csrbankarray_csrbank3_preamble_crc_re; -wire vns_netsoc_csrbankarray_csrbank3_preamble_crc_r; -wire vns_netsoc_csrbankarray_csrbank3_preamble_crc_we; -wire vns_netsoc_csrbankarray_csrbank3_preamble_crc_w; -wire vns_netsoc_csrbankarray_csrbank3_preamble_errors3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors3_r; -wire vns_netsoc_csrbankarray_csrbank3_preamble_errors3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors3_w; -wire vns_netsoc_csrbankarray_csrbank3_preamble_errors2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors2_r; -wire vns_netsoc_csrbankarray_csrbank3_preamble_errors2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors2_w; -wire vns_netsoc_csrbankarray_csrbank3_preamble_errors1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors1_r; -wire vns_netsoc_csrbankarray_csrbank3_preamble_errors1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors1_w; -wire vns_netsoc_csrbankarray_csrbank3_preamble_errors0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors0_r; -wire vns_netsoc_csrbankarray_csrbank3_preamble_errors0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_preamble_errors0_w; -wire vns_netsoc_csrbankarray_csrbank3_crc_errors3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors3_r; -wire vns_netsoc_csrbankarray_csrbank3_crc_errors3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors3_w; -wire vns_netsoc_csrbankarray_csrbank3_crc_errors2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors2_r; -wire vns_netsoc_csrbankarray_csrbank3_crc_errors2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors2_w; -wire vns_netsoc_csrbankarray_csrbank3_crc_errors1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors1_r; -wire vns_netsoc_csrbankarray_csrbank3_crc_errors1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors1_w; -wire vns_netsoc_csrbankarray_csrbank3_crc_errors0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors0_r; -wire vns_netsoc_csrbankarray_csrbank3_crc_errors0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank3_crc_errors0_w; -wire vns_netsoc_csrbankarray_csrbank3_sel; -wire [13:0] vns_netsoc_csrbankarray_interface4_bank_bus_adr; -wire vns_netsoc_csrbankarray_interface4_bank_bus_we; -wire [7:0] vns_netsoc_csrbankarray_interface4_bank_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_interface4_bank_bus_dat_r = 8'd0; -wire vns_netsoc_csrbankarray_csrbank4_crg_reset0_re; -wire vns_netsoc_csrbankarray_csrbank4_crg_reset0_r; -wire vns_netsoc_csrbankarray_csrbank4_crg_reset0_we; -wire vns_netsoc_csrbankarray_csrbank4_crg_reset0_w; -wire vns_netsoc_csrbankarray_csrbank4_mdio_w0_re; -wire [2:0] vns_netsoc_csrbankarray_csrbank4_mdio_w0_r; -wire vns_netsoc_csrbankarray_csrbank4_mdio_w0_we; -wire [2:0] vns_netsoc_csrbankarray_csrbank4_mdio_w0_w; -wire vns_netsoc_csrbankarray_csrbank4_mdio_r_re; -wire vns_netsoc_csrbankarray_csrbank4_mdio_r_r; -wire vns_netsoc_csrbankarray_csrbank4_mdio_r_we; -wire vns_netsoc_csrbankarray_csrbank4_mdio_r_w; -wire vns_netsoc_csrbankarray_csrbank4_sel; -wire [13:0] vns_netsoc_csrbankarray_sram_bus_adr; -wire vns_netsoc_csrbankarray_sram_bus_we; -wire [7:0] vns_netsoc_csrbankarray_sram_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_sram_bus_dat_r = 8'd0; -wire [2:0] vns_netsoc_csrbankarray_adr; -wire [7:0] vns_netsoc_csrbankarray_dat_r; -wire vns_netsoc_csrbankarray_sel; -reg vns_netsoc_csrbankarray_sel_r = 1'd0; -wire [13:0] vns_netsoc_csrbankarray_interface5_bank_bus_adr; -wire vns_netsoc_csrbankarray_interface5_bank_bus_we; -wire [7:0] vns_netsoc_csrbankarray_interface5_bank_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_interface5_bank_bus_dat_r = 8'd0; -wire vns_netsoc_csrbankarray_csrbank5_dfii_control0_re; -wire [3:0] vns_netsoc_csrbankarray_csrbank5_dfii_control0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_control0_we; -wire [3:0] vns_netsoc_csrbankarray_csrbank5_dfii_control0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_re; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_we; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_re; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_we; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_re; -wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_we; -wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_re; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_we; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_re; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_we; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_re; -wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_we; -wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_re; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_we; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_re; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_we; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_re; -wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_we; -wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_re; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_we; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_re; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_we; -wire [5:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_re; -wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_we; -wire [2:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_w; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_r; -wire vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_w; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_r; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_w; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_r; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_w; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_r; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_w; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_r; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_w; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_r; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_w; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_r; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_w; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_r; -wire vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_w; -wire vns_netsoc_csrbankarray_csrbank5_sel; -wire [13:0] vns_netsoc_csrbankarray_interface6_bank_bus_adr; -wire vns_netsoc_csrbankarray_interface6_bank_bus_we; -wire [7:0] vns_netsoc_csrbankarray_interface6_bank_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_interface6_bank_bus_dat_r = 8'd0; -wire vns_netsoc_csrbankarray_csrbank6_load3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_load3_r; -wire vns_netsoc_csrbankarray_csrbank6_load3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_load3_w; -wire vns_netsoc_csrbankarray_csrbank6_load2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_load2_r; -wire vns_netsoc_csrbankarray_csrbank6_load2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_load2_w; -wire vns_netsoc_csrbankarray_csrbank6_load1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_load1_r; -wire vns_netsoc_csrbankarray_csrbank6_load1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_load1_w; -wire vns_netsoc_csrbankarray_csrbank6_load0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_load0_r; -wire vns_netsoc_csrbankarray_csrbank6_load0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_load0_w; -wire vns_netsoc_csrbankarray_csrbank6_reload3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload3_r; -wire vns_netsoc_csrbankarray_csrbank6_reload3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload3_w; -wire vns_netsoc_csrbankarray_csrbank6_reload2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload2_r; -wire vns_netsoc_csrbankarray_csrbank6_reload2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload2_w; -wire vns_netsoc_csrbankarray_csrbank6_reload1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload1_r; -wire vns_netsoc_csrbankarray_csrbank6_reload1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload1_w; -wire vns_netsoc_csrbankarray_csrbank6_reload0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload0_r; -wire vns_netsoc_csrbankarray_csrbank6_reload0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_reload0_w; -wire vns_netsoc_csrbankarray_csrbank6_en0_re; -wire vns_netsoc_csrbankarray_csrbank6_en0_r; -wire vns_netsoc_csrbankarray_csrbank6_en0_we; -wire vns_netsoc_csrbankarray_csrbank6_en0_w; -wire vns_netsoc_csrbankarray_csrbank6_update_value0_re; -wire vns_netsoc_csrbankarray_csrbank6_update_value0_r; -wire vns_netsoc_csrbankarray_csrbank6_update_value0_we; -wire vns_netsoc_csrbankarray_csrbank6_update_value0_w; -wire vns_netsoc_csrbankarray_csrbank6_value3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_value3_r; -wire vns_netsoc_csrbankarray_csrbank6_value3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_value3_w; -wire vns_netsoc_csrbankarray_csrbank6_value2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_value2_r; -wire vns_netsoc_csrbankarray_csrbank6_value2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_value2_w; -wire vns_netsoc_csrbankarray_csrbank6_value1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_value1_r; -wire vns_netsoc_csrbankarray_csrbank6_value1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_value1_w; -wire vns_netsoc_csrbankarray_csrbank6_value0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_value0_r; -wire vns_netsoc_csrbankarray_csrbank6_value0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank6_value0_w; -wire vns_netsoc_csrbankarray_csrbank6_ev_enable0_re; -wire vns_netsoc_csrbankarray_csrbank6_ev_enable0_r; -wire vns_netsoc_csrbankarray_csrbank6_ev_enable0_we; -wire vns_netsoc_csrbankarray_csrbank6_ev_enable0_w; -wire vns_netsoc_csrbankarray_csrbank6_sel; -wire [13:0] vns_netsoc_csrbankarray_interface7_bank_bus_adr; -wire vns_netsoc_csrbankarray_interface7_bank_bus_we; -wire [7:0] vns_netsoc_csrbankarray_interface7_bank_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_interface7_bank_bus_dat_r = 8'd0; -wire vns_netsoc_csrbankarray_csrbank7_txfull_re; -wire vns_netsoc_csrbankarray_csrbank7_txfull_r; -wire vns_netsoc_csrbankarray_csrbank7_txfull_we; -wire vns_netsoc_csrbankarray_csrbank7_txfull_w; -wire vns_netsoc_csrbankarray_csrbank7_rxempty_re; -wire vns_netsoc_csrbankarray_csrbank7_rxempty_r; -wire vns_netsoc_csrbankarray_csrbank7_rxempty_we; -wire vns_netsoc_csrbankarray_csrbank7_rxempty_w; -wire vns_netsoc_csrbankarray_csrbank7_ev_enable0_re; -wire [1:0] vns_netsoc_csrbankarray_csrbank7_ev_enable0_r; -wire vns_netsoc_csrbankarray_csrbank7_ev_enable0_we; -wire [1:0] vns_netsoc_csrbankarray_csrbank7_ev_enable0_w; -wire vns_netsoc_csrbankarray_csrbank7_sel; -wire [13:0] vns_netsoc_csrbankarray_interface8_bank_bus_adr; -wire vns_netsoc_csrbankarray_interface8_bank_bus_we; -wire [7:0] vns_netsoc_csrbankarray_interface8_bank_bus_dat_w; -reg [7:0] vns_netsoc_csrbankarray_interface8_bank_bus_dat_r = 8'd0; -wire vns_netsoc_csrbankarray_csrbank8_tuning_word3_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word3_r; -wire vns_netsoc_csrbankarray_csrbank8_tuning_word3_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word3_w; -wire vns_netsoc_csrbankarray_csrbank8_tuning_word2_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word2_r; -wire vns_netsoc_csrbankarray_csrbank8_tuning_word2_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word2_w; -wire vns_netsoc_csrbankarray_csrbank8_tuning_word1_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word1_r; -wire vns_netsoc_csrbankarray_csrbank8_tuning_word1_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word1_w; -wire vns_netsoc_csrbankarray_csrbank8_tuning_word0_re; -wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word0_r; -wire vns_netsoc_csrbankarray_csrbank8_tuning_word0_we; -wire [7:0] vns_netsoc_csrbankarray_csrbank8_tuning_word0_w; -wire vns_netsoc_csrbankarray_csrbank8_sel; -wire [13:0] vns_netsoc_csrcon_adr; -wire vns_netsoc_csrcon_we; -wire [7:0] vns_netsoc_csrcon_dat_w; -wire [7:0] vns_netsoc_csrcon_dat_r; -reg vns_rhs_array_muxed0 = 1'd0; -reg [13:0] vns_rhs_array_muxed1 = 14'd0; -reg [2:0] vns_rhs_array_muxed2 = 3'd0; -reg vns_rhs_array_muxed3 = 1'd0; -reg vns_rhs_array_muxed4 = 1'd0; -reg vns_rhs_array_muxed5 = 1'd0; -reg vns_t_array_muxed0 = 1'd0; -reg vns_t_array_muxed1 = 1'd0; -reg vns_t_array_muxed2 = 1'd0; -reg vns_rhs_array_muxed6 = 1'd0; -reg [13:0] vns_rhs_array_muxed7 = 14'd0; -reg [2:0] vns_rhs_array_muxed8 = 3'd0; -reg vns_rhs_array_muxed9 = 1'd0; -reg vns_rhs_array_muxed10 = 1'd0; -reg vns_rhs_array_muxed11 = 1'd0; -reg vns_t_array_muxed3 = 1'd0; -reg vns_t_array_muxed4 = 1'd0; -reg vns_t_array_muxed5 = 1'd0; -reg [20:0] vns_rhs_array_muxed12 = 21'd0; -reg vns_rhs_array_muxed13 = 1'd0; -reg vns_rhs_array_muxed14 = 1'd0; -reg [20:0] vns_rhs_array_muxed15 = 21'd0; -reg vns_rhs_array_muxed16 = 1'd0; -reg vns_rhs_array_muxed17 = 1'd0; -reg [20:0] vns_rhs_array_muxed18 = 21'd0; -reg vns_rhs_array_muxed19 = 1'd0; -reg vns_rhs_array_muxed20 = 1'd0; -reg [20:0] vns_rhs_array_muxed21 = 21'd0; -reg vns_rhs_array_muxed22 = 1'd0; -reg vns_rhs_array_muxed23 = 1'd0; -reg [20:0] vns_rhs_array_muxed24 = 21'd0; -reg vns_rhs_array_muxed25 = 1'd0; -reg vns_rhs_array_muxed26 = 1'd0; -reg [20:0] vns_rhs_array_muxed27 = 21'd0; -reg vns_rhs_array_muxed28 = 1'd0; -reg vns_rhs_array_muxed29 = 1'd0; -reg [20:0] vns_rhs_array_muxed30 = 21'd0; -reg vns_rhs_array_muxed31 = 1'd0; -reg vns_rhs_array_muxed32 = 1'd0; -reg [20:0] vns_rhs_array_muxed33 = 21'd0; -reg vns_rhs_array_muxed34 = 1'd0; -reg vns_rhs_array_muxed35 = 1'd0; -reg [29:0] vns_rhs_array_muxed36 = 30'd0; -reg [31:0] vns_rhs_array_muxed37 = 32'd0; -reg [3:0] vns_rhs_array_muxed38 = 4'd0; -reg vns_rhs_array_muxed39 = 1'd0; -reg vns_rhs_array_muxed40 = 1'd0; -reg vns_rhs_array_muxed41 = 1'd0; -reg [2:0] vns_rhs_array_muxed42 = 3'd0; -reg [1:0] vns_rhs_array_muxed43 = 2'd0; -reg [29:0] vns_rhs_array_muxed44 = 30'd0; -reg [31:0] vns_rhs_array_muxed45 = 32'd0; -reg [3:0] vns_rhs_array_muxed46 = 4'd0; -reg vns_rhs_array_muxed47 = 1'd0; -reg vns_rhs_array_muxed48 = 1'd0; -reg vns_rhs_array_muxed49 = 1'd0; -reg [2:0] vns_rhs_array_muxed50 = 3'd0; -reg [1:0] vns_rhs_array_muxed51 = 2'd0; -reg [2:0] vns_array_muxed0 = 3'd0; -reg [13:0] vns_array_muxed1 = 14'd0; -reg vns_array_muxed2 = 1'd0; -reg vns_array_muxed3 = 1'd0; -reg vns_array_muxed4 = 1'd0; -reg vns_array_muxed5 = 1'd0; -reg vns_array_muxed6 = 1'd0; -reg [2:0] vns_array_muxed7 = 3'd0; -reg [13:0] vns_array_muxed8 = 14'd0; -reg vns_array_muxed9 = 1'd0; -reg vns_array_muxed10 = 1'd0; -reg vns_array_muxed11 = 1'd0; -reg vns_array_muxed12 = 1'd0; -reg vns_array_muxed13 = 1'd0; -reg [2:0] vns_array_muxed14 = 3'd0; -reg [13:0] vns_array_muxed15 = 14'd0; -reg vns_array_muxed16 = 1'd0; -reg vns_array_muxed17 = 1'd0; -reg vns_array_muxed18 = 1'd0; -reg vns_array_muxed19 = 1'd0; -reg vns_array_muxed20 = 1'd0; -reg [2:0] vns_array_muxed21 = 3'd0; -reg [13:0] vns_array_muxed22 = 14'd0; -reg vns_array_muxed23 = 1'd0; -reg vns_array_muxed24 = 1'd0; -reg vns_array_muxed25 = 1'd0; -reg vns_array_muxed26 = 1'd0; -reg vns_array_muxed27 = 1'd0; -(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl0_regs0 = 1'd0; -(* async_reg = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl0_regs1 = 1'd0; -wire vns_xilinxasyncresetsynchronizerimpl0; -wire vns_xilinxasyncresetsynchronizerimpl0_rst_meta; -wire vns_xilinxasyncresetsynchronizerimpl1; -wire vns_xilinxasyncresetsynchronizerimpl1_rst_meta; -wire vns_xilinxasyncresetsynchronizerimpl2_rst_meta; -wire vns_xilinxasyncresetsynchronizerimpl3_rst_meta; -(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl1_regs0 = 1'd0; -(* async_reg = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl1_regs1 = 1'd0; -(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl2_regs0 = 1'd0; -(* async_reg = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl2_regs1 = 1'd0; -(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl3_regs0 = 1'd0; -(* async_reg = "true", dont_touch = "true" *) reg vns_xilinxmultiregimpl3_regs1 = 1'd0; -(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl4_regs0 = 7'd0; -(* async_reg = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl4_regs1 = 7'd0; -(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl5_regs0 = 7'd0; -(* async_reg = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl5_regs1 = 7'd0; -(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl6_regs0 = 7'd0; -(* async_reg = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl6_regs1 = 7'd0; -(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl7_regs0 = 7'd0; -(* async_reg = "true", dont_touch = "true" *) reg [6:0] vns_xilinxmultiregimpl7_regs1 = 7'd0; - -assign soc_netsoc_cpu_reset = soc_netsoc_ctrl_reset; -assign soc_netsoc_ctrl_bus_error = vns_netsoc_error; -always @(*) begin - soc_netsoc_cpu_interrupt0 <= 32'd0; - soc_netsoc_cpu_interrupt0[2] <= soc_ev_irq; - soc_netsoc_cpu_interrupt0[1] <= soc_netsoc_timer0_irq; - soc_netsoc_cpu_interrupt0[0] <= soc_netsoc_uart_irq; -end -assign soc_netsoc_ctrl_reset = soc_netsoc_ctrl_reset_reset_re; -assign soc_netsoc_ctrl_bus_errors_status = soc_netsoc_ctrl_bus_errors; -assign soc_netsoc_cpu_interrupt1 = (soc_netsoc_cpu_time >= soc_netsoc_cpu_time_cmp); -assign soc_netsoc_interface0_soc_bus_adr = soc_netsoc_cpu_ibus_adr; -assign soc_netsoc_interface0_soc_bus_dat_w = soc_netsoc_cpu_ibus_dat_w; -assign soc_netsoc_cpu_ibus_dat_r = soc_netsoc_interface0_soc_bus_dat_r; -assign soc_netsoc_interface0_soc_bus_sel = soc_netsoc_cpu_ibus_sel; -assign soc_netsoc_interface0_soc_bus_cyc = soc_netsoc_cpu_ibus_cyc; -assign soc_netsoc_interface0_soc_bus_stb = soc_netsoc_cpu_ibus_stb; -assign soc_netsoc_cpu_ibus_ack = soc_netsoc_interface0_soc_bus_ack; -assign soc_netsoc_interface0_soc_bus_we = soc_netsoc_cpu_ibus_we; -assign soc_netsoc_interface0_soc_bus_cti = soc_netsoc_cpu_ibus_cti; -assign soc_netsoc_interface0_soc_bus_bte = soc_netsoc_cpu_ibus_bte; -assign soc_netsoc_cpu_ibus_err = soc_netsoc_interface0_soc_bus_err; -assign soc_netsoc_interface1_soc_bus_adr = soc_netsoc_cpu_dbus_adr; -assign soc_netsoc_interface1_soc_bus_dat_w = soc_netsoc_cpu_dbus_dat_w; -assign soc_netsoc_cpu_dbus_dat_r = soc_netsoc_interface1_soc_bus_dat_r; -assign soc_netsoc_interface1_soc_bus_sel = soc_netsoc_cpu_dbus_sel; -assign soc_netsoc_interface1_soc_bus_cyc = soc_netsoc_cpu_dbus_cyc; -assign soc_netsoc_interface1_soc_bus_stb = soc_netsoc_cpu_dbus_stb; -assign soc_netsoc_cpu_dbus_ack = soc_netsoc_interface1_soc_bus_ack; -assign soc_netsoc_interface1_soc_bus_we = soc_netsoc_cpu_dbus_we; -assign soc_netsoc_interface1_soc_bus_cti = soc_netsoc_cpu_dbus_cti; -assign soc_netsoc_interface1_soc_bus_bte = soc_netsoc_cpu_dbus_bte; -assign soc_netsoc_cpu_dbus_err = soc_netsoc_interface1_soc_bus_err; -assign soc_netsoc_rom_adr = soc_netsoc_rom_bus_adr[13:0]; -assign soc_netsoc_rom_bus_dat_r = soc_netsoc_rom_dat_r; -always @(*) begin - soc_netsoc_sram_we <= 4'd0; - soc_netsoc_sram_we[0] <= (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & soc_netsoc_sram_bus_we) & soc_netsoc_sram_bus_sel[0]); - soc_netsoc_sram_we[1] <= (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & soc_netsoc_sram_bus_we) & soc_netsoc_sram_bus_sel[1]); - soc_netsoc_sram_we[2] <= (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & soc_netsoc_sram_bus_we) & soc_netsoc_sram_bus_sel[2]); - soc_netsoc_sram_we[3] <= (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & soc_netsoc_sram_bus_we) & soc_netsoc_sram_bus_sel[3]); -end -assign soc_netsoc_sram_adr = soc_netsoc_sram_bus_adr[12:0]; -assign soc_netsoc_sram_bus_dat_r = soc_netsoc_sram_dat_r; -assign soc_netsoc_sram_dat_w = soc_netsoc_sram_bus_dat_w; -assign soc_netsoc_uart_tx_fifo_sink_valid = soc_netsoc_uart_rxtx_re; -assign soc_netsoc_uart_tx_fifo_sink_payload_data = soc_netsoc_uart_rxtx_r; -assign soc_netsoc_uart_txfull_status = (~soc_netsoc_uart_tx_fifo_sink_ready); -assign soc_netsoc_uart_phy_sink_valid = soc_netsoc_uart_tx_fifo_source_valid; -assign soc_netsoc_uart_tx_fifo_source_ready = soc_netsoc_uart_phy_sink_ready; -assign soc_netsoc_uart_phy_sink_first = soc_netsoc_uart_tx_fifo_source_first; -assign soc_netsoc_uart_phy_sink_last = soc_netsoc_uart_tx_fifo_source_last; -assign soc_netsoc_uart_phy_sink_payload_data = soc_netsoc_uart_tx_fifo_source_payload_data; -assign soc_netsoc_uart_tx_trigger = (~soc_netsoc_uart_tx_fifo_sink_ready); -assign soc_netsoc_uart_rx_fifo_sink_valid = soc_netsoc_uart_phy_source_valid; -assign soc_netsoc_uart_phy_source_ready = soc_netsoc_uart_rx_fifo_sink_ready; -assign soc_netsoc_uart_rx_fifo_sink_first = soc_netsoc_uart_phy_source_first; -assign soc_netsoc_uart_rx_fifo_sink_last = soc_netsoc_uart_phy_source_last; -assign soc_netsoc_uart_rx_fifo_sink_payload_data = soc_netsoc_uart_phy_source_payload_data; -assign soc_netsoc_uart_rxempty_status = (~soc_netsoc_uart_rx_fifo_source_valid); -assign soc_netsoc_uart_rxtx_w = soc_netsoc_uart_rx_fifo_source_payload_data; -assign soc_netsoc_uart_rx_fifo_source_ready = soc_netsoc_uart_rx_clear; -assign soc_netsoc_uart_rx_trigger = (~soc_netsoc_uart_rx_fifo_source_valid); -always @(*) begin - soc_netsoc_uart_tx_clear <= 1'd0; - if ((soc_netsoc_uart_eventmanager_pending_re & soc_netsoc_uart_eventmanager_pending_r[0])) begin - soc_netsoc_uart_tx_clear <= 1'd1; - end -end -always @(*) begin - soc_netsoc_uart_eventmanager_status_w <= 2'd0; - soc_netsoc_uart_eventmanager_status_w[0] <= soc_netsoc_uart_tx_status; - soc_netsoc_uart_eventmanager_status_w[1] <= soc_netsoc_uart_rx_status; -end -always @(*) begin - soc_netsoc_uart_rx_clear <= 1'd0; - if ((soc_netsoc_uart_eventmanager_pending_re & soc_netsoc_uart_eventmanager_pending_r[1])) begin - soc_netsoc_uart_rx_clear <= 1'd1; - end -end -always @(*) begin - soc_netsoc_uart_eventmanager_pending_w <= 2'd0; - soc_netsoc_uart_eventmanager_pending_w[0] <= soc_netsoc_uart_tx_pending; - soc_netsoc_uart_eventmanager_pending_w[1] <= soc_netsoc_uart_rx_pending; -end -assign soc_netsoc_uart_irq = ((soc_netsoc_uart_eventmanager_pending_w[0] & soc_netsoc_uart_eventmanager_storage[0]) | (soc_netsoc_uart_eventmanager_pending_w[1] & soc_netsoc_uart_eventmanager_storage[1])); -assign soc_netsoc_uart_tx_status = soc_netsoc_uart_tx_trigger; -assign soc_netsoc_uart_rx_status = soc_netsoc_uart_rx_trigger; -assign soc_netsoc_uart_tx_fifo_syncfifo_din = {soc_netsoc_uart_tx_fifo_fifo_in_last, soc_netsoc_uart_tx_fifo_fifo_in_first, soc_netsoc_uart_tx_fifo_fifo_in_payload_data}; -assign {soc_netsoc_uart_tx_fifo_fifo_out_last, soc_netsoc_uart_tx_fifo_fifo_out_first, soc_netsoc_uart_tx_fifo_fifo_out_payload_data} = soc_netsoc_uart_tx_fifo_syncfifo_dout; -assign soc_netsoc_uart_tx_fifo_sink_ready = soc_netsoc_uart_tx_fifo_syncfifo_writable; -assign soc_netsoc_uart_tx_fifo_syncfifo_we = soc_netsoc_uart_tx_fifo_sink_valid; -assign soc_netsoc_uart_tx_fifo_fifo_in_first = soc_netsoc_uart_tx_fifo_sink_first; -assign soc_netsoc_uart_tx_fifo_fifo_in_last = soc_netsoc_uart_tx_fifo_sink_last; -assign soc_netsoc_uart_tx_fifo_fifo_in_payload_data = soc_netsoc_uart_tx_fifo_sink_payload_data; -assign soc_netsoc_uart_tx_fifo_source_valid = soc_netsoc_uart_tx_fifo_readable; -assign soc_netsoc_uart_tx_fifo_source_first = soc_netsoc_uart_tx_fifo_fifo_out_first; -assign soc_netsoc_uart_tx_fifo_source_last = soc_netsoc_uart_tx_fifo_fifo_out_last; -assign soc_netsoc_uart_tx_fifo_source_payload_data = soc_netsoc_uart_tx_fifo_fifo_out_payload_data; -assign soc_netsoc_uart_tx_fifo_re = soc_netsoc_uart_tx_fifo_source_ready; -assign soc_netsoc_uart_tx_fifo_syncfifo_re = (soc_netsoc_uart_tx_fifo_syncfifo_readable & ((~soc_netsoc_uart_tx_fifo_readable) | soc_netsoc_uart_tx_fifo_re)); -assign soc_netsoc_uart_tx_fifo_level1 = (soc_netsoc_uart_tx_fifo_level0 + soc_netsoc_uart_tx_fifo_readable); -always @(*) begin - soc_netsoc_uart_tx_fifo_wrport_adr <= 4'd0; - if (soc_netsoc_uart_tx_fifo_replace) begin - soc_netsoc_uart_tx_fifo_wrport_adr <= (soc_netsoc_uart_tx_fifo_produce - 1'd1); - end else begin - soc_netsoc_uart_tx_fifo_wrport_adr <= soc_netsoc_uart_tx_fifo_produce; - end -end -assign soc_netsoc_uart_tx_fifo_wrport_dat_w = soc_netsoc_uart_tx_fifo_syncfifo_din; -assign soc_netsoc_uart_tx_fifo_wrport_we = (soc_netsoc_uart_tx_fifo_syncfifo_we & (soc_netsoc_uart_tx_fifo_syncfifo_writable | soc_netsoc_uart_tx_fifo_replace)); -assign soc_netsoc_uart_tx_fifo_do_read = (soc_netsoc_uart_tx_fifo_syncfifo_readable & soc_netsoc_uart_tx_fifo_syncfifo_re); -assign soc_netsoc_uart_tx_fifo_rdport_adr = soc_netsoc_uart_tx_fifo_consume; -assign soc_netsoc_uart_tx_fifo_syncfifo_dout = soc_netsoc_uart_tx_fifo_rdport_dat_r; -assign soc_netsoc_uart_tx_fifo_rdport_re = soc_netsoc_uart_tx_fifo_do_read; -assign soc_netsoc_uart_tx_fifo_syncfifo_writable = (soc_netsoc_uart_tx_fifo_level0 != 5'd16); -assign soc_netsoc_uart_tx_fifo_syncfifo_readable = (soc_netsoc_uart_tx_fifo_level0 != 1'd0); -assign soc_netsoc_uart_rx_fifo_syncfifo_din = {soc_netsoc_uart_rx_fifo_fifo_in_last, soc_netsoc_uart_rx_fifo_fifo_in_first, soc_netsoc_uart_rx_fifo_fifo_in_payload_data}; -assign {soc_netsoc_uart_rx_fifo_fifo_out_last, soc_netsoc_uart_rx_fifo_fifo_out_first, soc_netsoc_uart_rx_fifo_fifo_out_payload_data} = soc_netsoc_uart_rx_fifo_syncfifo_dout; -assign soc_netsoc_uart_rx_fifo_sink_ready = soc_netsoc_uart_rx_fifo_syncfifo_writable; -assign soc_netsoc_uart_rx_fifo_syncfifo_we = soc_netsoc_uart_rx_fifo_sink_valid; -assign soc_netsoc_uart_rx_fifo_fifo_in_first = soc_netsoc_uart_rx_fifo_sink_first; -assign soc_netsoc_uart_rx_fifo_fifo_in_last = soc_netsoc_uart_rx_fifo_sink_last; -assign soc_netsoc_uart_rx_fifo_fifo_in_payload_data = soc_netsoc_uart_rx_fifo_sink_payload_data; -assign soc_netsoc_uart_rx_fifo_source_valid = soc_netsoc_uart_rx_fifo_readable; -assign soc_netsoc_uart_rx_fifo_source_first = soc_netsoc_uart_rx_fifo_fifo_out_first; -assign soc_netsoc_uart_rx_fifo_source_last = soc_netsoc_uart_rx_fifo_fifo_out_last; -assign soc_netsoc_uart_rx_fifo_source_payload_data = soc_netsoc_uart_rx_fifo_fifo_out_payload_data; -assign soc_netsoc_uart_rx_fifo_re = soc_netsoc_uart_rx_fifo_source_ready; -assign soc_netsoc_uart_rx_fifo_syncfifo_re = (soc_netsoc_uart_rx_fifo_syncfifo_readable & ((~soc_netsoc_uart_rx_fifo_readable) | soc_netsoc_uart_rx_fifo_re)); -assign soc_netsoc_uart_rx_fifo_level1 = (soc_netsoc_uart_rx_fifo_level0 + soc_netsoc_uart_rx_fifo_readable); -always @(*) begin - soc_netsoc_uart_rx_fifo_wrport_adr <= 4'd0; - if (soc_netsoc_uart_rx_fifo_replace) begin - soc_netsoc_uart_rx_fifo_wrport_adr <= (soc_netsoc_uart_rx_fifo_produce - 1'd1); - end else begin - soc_netsoc_uart_rx_fifo_wrport_adr <= soc_netsoc_uart_rx_fifo_produce; - end -end -assign soc_netsoc_uart_rx_fifo_wrport_dat_w = soc_netsoc_uart_rx_fifo_syncfifo_din; -assign soc_netsoc_uart_rx_fifo_wrport_we = (soc_netsoc_uart_rx_fifo_syncfifo_we & (soc_netsoc_uart_rx_fifo_syncfifo_writable | soc_netsoc_uart_rx_fifo_replace)); -assign soc_netsoc_uart_rx_fifo_do_read = (soc_netsoc_uart_rx_fifo_syncfifo_readable & soc_netsoc_uart_rx_fifo_syncfifo_re); -assign soc_netsoc_uart_rx_fifo_rdport_adr = soc_netsoc_uart_rx_fifo_consume; -assign soc_netsoc_uart_rx_fifo_syncfifo_dout = soc_netsoc_uart_rx_fifo_rdport_dat_r; -assign soc_netsoc_uart_rx_fifo_rdport_re = soc_netsoc_uart_rx_fifo_do_read; -assign soc_netsoc_uart_rx_fifo_syncfifo_writable = (soc_netsoc_uart_rx_fifo_level0 != 5'd16); -assign soc_netsoc_uart_rx_fifo_syncfifo_readable = (soc_netsoc_uart_rx_fifo_level0 != 1'd0); -assign soc_netsoc_timer0_zero_trigger = (soc_netsoc_timer0_value != 1'd0); -assign soc_netsoc_timer0_eventmanager_status_w = soc_netsoc_timer0_zero_status; -always @(*) begin - soc_netsoc_timer0_zero_clear <= 1'd0; - if ((soc_netsoc_timer0_eventmanager_pending_re & soc_netsoc_timer0_eventmanager_pending_r)) begin - soc_netsoc_timer0_zero_clear <= 1'd1; - end -end -assign soc_netsoc_timer0_eventmanager_pending_w = soc_netsoc_timer0_zero_pending; -assign soc_netsoc_timer0_irq = (soc_netsoc_timer0_eventmanager_pending_w & soc_netsoc_timer0_eventmanager_storage); -assign soc_netsoc_timer0_zero_status = soc_netsoc_timer0_zero_trigger; -assign soc_netsoc_interface_dat_w = soc_netsoc_bus_wishbone_dat_w; -assign soc_netsoc_bus_wishbone_dat_r = soc_netsoc_interface_dat_r; -always @(*) begin - soc_netsoc_interface_adr <= 14'd0; - vns_wb2csr_next_state <= 1'd0; - soc_netsoc_interface_we <= 1'd0; - soc_netsoc_bus_wishbone_ack <= 1'd0; - vns_wb2csr_next_state <= vns_wb2csr_state; - case (vns_wb2csr_state) - 1'd1: begin - soc_netsoc_bus_wishbone_ack <= 1'd1; - vns_wb2csr_next_state <= 1'd0; - end - default: begin - if ((soc_netsoc_bus_wishbone_cyc & soc_netsoc_bus_wishbone_stb)) begin - soc_netsoc_interface_adr <= soc_netsoc_bus_wishbone_adr; - soc_netsoc_interface_we <= soc_netsoc_bus_wishbone_we; - vns_wb2csr_next_state <= 1'd1; - end - end - endcase -end -always @(*) begin - soc_emulator_ram_we <= 4'd0; - soc_emulator_ram_we[0] <= (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & soc_emulator_ram_bus_we) & soc_emulator_ram_bus_sel[0]); - soc_emulator_ram_we[1] <= (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & soc_emulator_ram_bus_we) & soc_emulator_ram_bus_sel[1]); - soc_emulator_ram_we[2] <= (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & soc_emulator_ram_bus_we) & soc_emulator_ram_bus_sel[2]); - soc_emulator_ram_we[3] <= (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & soc_emulator_ram_bus_we) & soc_emulator_ram_bus_sel[3]); -end -assign soc_emulator_ram_adr = soc_emulator_ram_bus_adr[11:0]; -assign soc_emulator_ram_bus_dat_r = soc_emulator_ram_dat_r; -assign soc_emulator_ram_dat_w = soc_emulator_ram_bus_dat_w; -always @(*) begin - soc_a7ddrphy_dqs_serdes_pattern <= 8'd85; - soc_a7ddrphy_dqs_serdes_pattern <= 7'd85; - if ((soc_a7ddrphy_dqs_preamble | soc_a7ddrphy_dqs_postamble)) begin - soc_a7ddrphy_dqs_serdes_pattern <= 1'd0; - end -end -assign soc_a7ddrphy_bitslip0_i = soc_a7ddrphy_dq_i_data0; -assign soc_a7ddrphy_bitslip1_i = soc_a7ddrphy_dq_i_data1; -assign soc_a7ddrphy_bitslip2_i = soc_a7ddrphy_dq_i_data2; -assign soc_a7ddrphy_bitslip3_i = soc_a7ddrphy_dq_i_data3; -assign soc_a7ddrphy_bitslip4_i = soc_a7ddrphy_dq_i_data4; -assign soc_a7ddrphy_bitslip5_i = soc_a7ddrphy_dq_i_data5; -assign soc_a7ddrphy_bitslip6_i = soc_a7ddrphy_dq_i_data6; -assign soc_a7ddrphy_bitslip7_i = soc_a7ddrphy_dq_i_data7; -assign soc_a7ddrphy_bitslip8_i = soc_a7ddrphy_dq_i_data8; -assign soc_a7ddrphy_bitslip9_i = soc_a7ddrphy_dq_i_data9; -assign soc_a7ddrphy_bitslip10_i = soc_a7ddrphy_dq_i_data10; -assign soc_a7ddrphy_bitslip11_i = soc_a7ddrphy_dq_i_data11; -assign soc_a7ddrphy_bitslip12_i = soc_a7ddrphy_dq_i_data12; -assign soc_a7ddrphy_bitslip13_i = soc_a7ddrphy_dq_i_data13; -assign soc_a7ddrphy_bitslip14_i = soc_a7ddrphy_dq_i_data14; -assign soc_a7ddrphy_bitslip15_i = soc_a7ddrphy_dq_i_data15; -always @(*) begin - soc_a7ddrphy_dfi_p0_rddata <= 32'd0; - soc_a7ddrphy_dfi_p0_rddata[0] <= soc_a7ddrphy_bitslip0_o[0]; - soc_a7ddrphy_dfi_p0_rddata[16] <= soc_a7ddrphy_bitslip0_o[1]; - soc_a7ddrphy_dfi_p0_rddata[1] <= soc_a7ddrphy_bitslip1_o[0]; - soc_a7ddrphy_dfi_p0_rddata[17] <= soc_a7ddrphy_bitslip1_o[1]; - soc_a7ddrphy_dfi_p0_rddata[2] <= soc_a7ddrphy_bitslip2_o[0]; - soc_a7ddrphy_dfi_p0_rddata[18] <= soc_a7ddrphy_bitslip2_o[1]; - soc_a7ddrphy_dfi_p0_rddata[3] <= soc_a7ddrphy_bitslip3_o[0]; - soc_a7ddrphy_dfi_p0_rddata[19] <= soc_a7ddrphy_bitslip3_o[1]; - soc_a7ddrphy_dfi_p0_rddata[4] <= soc_a7ddrphy_bitslip4_o[0]; - soc_a7ddrphy_dfi_p0_rddata[20] <= soc_a7ddrphy_bitslip4_o[1]; - soc_a7ddrphy_dfi_p0_rddata[5] <= soc_a7ddrphy_bitslip5_o[0]; - soc_a7ddrphy_dfi_p0_rddata[21] <= soc_a7ddrphy_bitslip5_o[1]; - soc_a7ddrphy_dfi_p0_rddata[6] <= soc_a7ddrphy_bitslip6_o[0]; - soc_a7ddrphy_dfi_p0_rddata[22] <= soc_a7ddrphy_bitslip6_o[1]; - soc_a7ddrphy_dfi_p0_rddata[7] <= soc_a7ddrphy_bitslip7_o[0]; - soc_a7ddrphy_dfi_p0_rddata[23] <= soc_a7ddrphy_bitslip7_o[1]; - soc_a7ddrphy_dfi_p0_rddata[8] <= soc_a7ddrphy_bitslip8_o[0]; - soc_a7ddrphy_dfi_p0_rddata[24] <= soc_a7ddrphy_bitslip8_o[1]; - soc_a7ddrphy_dfi_p0_rddata[9] <= soc_a7ddrphy_bitslip9_o[0]; - soc_a7ddrphy_dfi_p0_rddata[25] <= soc_a7ddrphy_bitslip9_o[1]; - soc_a7ddrphy_dfi_p0_rddata[10] <= soc_a7ddrphy_bitslip10_o[0]; - soc_a7ddrphy_dfi_p0_rddata[26] <= soc_a7ddrphy_bitslip10_o[1]; - soc_a7ddrphy_dfi_p0_rddata[11] <= soc_a7ddrphy_bitslip11_o[0]; - soc_a7ddrphy_dfi_p0_rddata[27] <= soc_a7ddrphy_bitslip11_o[1]; - soc_a7ddrphy_dfi_p0_rddata[12] <= soc_a7ddrphy_bitslip12_o[0]; - soc_a7ddrphy_dfi_p0_rddata[28] <= soc_a7ddrphy_bitslip12_o[1]; - soc_a7ddrphy_dfi_p0_rddata[13] <= soc_a7ddrphy_bitslip13_o[0]; - soc_a7ddrphy_dfi_p0_rddata[29] <= soc_a7ddrphy_bitslip13_o[1]; - soc_a7ddrphy_dfi_p0_rddata[14] <= soc_a7ddrphy_bitslip14_o[0]; - soc_a7ddrphy_dfi_p0_rddata[30] <= soc_a7ddrphy_bitslip14_o[1]; - soc_a7ddrphy_dfi_p0_rddata[15] <= soc_a7ddrphy_bitslip15_o[0]; - soc_a7ddrphy_dfi_p0_rddata[31] <= soc_a7ddrphy_bitslip15_o[1]; -end -always @(*) begin - soc_a7ddrphy_dfi_p1_rddata <= 32'd0; - soc_a7ddrphy_dfi_p1_rddata[0] <= soc_a7ddrphy_bitslip0_o[2]; - soc_a7ddrphy_dfi_p1_rddata[16] <= soc_a7ddrphy_bitslip0_o[3]; - soc_a7ddrphy_dfi_p1_rddata[1] <= soc_a7ddrphy_bitslip1_o[2]; - soc_a7ddrphy_dfi_p1_rddata[17] <= soc_a7ddrphy_bitslip1_o[3]; - soc_a7ddrphy_dfi_p1_rddata[2] <= soc_a7ddrphy_bitslip2_o[2]; - soc_a7ddrphy_dfi_p1_rddata[18] <= soc_a7ddrphy_bitslip2_o[3]; - soc_a7ddrphy_dfi_p1_rddata[3] <= soc_a7ddrphy_bitslip3_o[2]; - soc_a7ddrphy_dfi_p1_rddata[19] <= soc_a7ddrphy_bitslip3_o[3]; - soc_a7ddrphy_dfi_p1_rddata[4] <= soc_a7ddrphy_bitslip4_o[2]; - soc_a7ddrphy_dfi_p1_rddata[20] <= soc_a7ddrphy_bitslip4_o[3]; - soc_a7ddrphy_dfi_p1_rddata[5] <= soc_a7ddrphy_bitslip5_o[2]; - soc_a7ddrphy_dfi_p1_rddata[21] <= soc_a7ddrphy_bitslip5_o[3]; - soc_a7ddrphy_dfi_p1_rddata[6] <= soc_a7ddrphy_bitslip6_o[2]; - soc_a7ddrphy_dfi_p1_rddata[22] <= soc_a7ddrphy_bitslip6_o[3]; - soc_a7ddrphy_dfi_p1_rddata[7] <= soc_a7ddrphy_bitslip7_o[2]; - soc_a7ddrphy_dfi_p1_rddata[23] <= soc_a7ddrphy_bitslip7_o[3]; - soc_a7ddrphy_dfi_p1_rddata[8] <= soc_a7ddrphy_bitslip8_o[2]; - soc_a7ddrphy_dfi_p1_rddata[24] <= soc_a7ddrphy_bitslip8_o[3]; - soc_a7ddrphy_dfi_p1_rddata[9] <= soc_a7ddrphy_bitslip9_o[2]; - soc_a7ddrphy_dfi_p1_rddata[25] <= soc_a7ddrphy_bitslip9_o[3]; - soc_a7ddrphy_dfi_p1_rddata[10] <= soc_a7ddrphy_bitslip10_o[2]; - soc_a7ddrphy_dfi_p1_rddata[26] <= soc_a7ddrphy_bitslip10_o[3]; - soc_a7ddrphy_dfi_p1_rddata[11] <= soc_a7ddrphy_bitslip11_o[2]; - soc_a7ddrphy_dfi_p1_rddata[27] <= soc_a7ddrphy_bitslip11_o[3]; - soc_a7ddrphy_dfi_p1_rddata[12] <= soc_a7ddrphy_bitslip12_o[2]; - soc_a7ddrphy_dfi_p1_rddata[28] <= soc_a7ddrphy_bitslip12_o[3]; - soc_a7ddrphy_dfi_p1_rddata[13] <= soc_a7ddrphy_bitslip13_o[2]; - soc_a7ddrphy_dfi_p1_rddata[29] <= soc_a7ddrphy_bitslip13_o[3]; - soc_a7ddrphy_dfi_p1_rddata[14] <= soc_a7ddrphy_bitslip14_o[2]; - soc_a7ddrphy_dfi_p1_rddata[30] <= soc_a7ddrphy_bitslip14_o[3]; - soc_a7ddrphy_dfi_p1_rddata[15] <= soc_a7ddrphy_bitslip15_o[2]; - soc_a7ddrphy_dfi_p1_rddata[31] <= soc_a7ddrphy_bitslip15_o[3]; -end -always @(*) begin - soc_a7ddrphy_dfi_p2_rddata <= 32'd0; - soc_a7ddrphy_dfi_p2_rddata[0] <= soc_a7ddrphy_bitslip0_o[4]; - soc_a7ddrphy_dfi_p2_rddata[16] <= soc_a7ddrphy_bitslip0_o[5]; - soc_a7ddrphy_dfi_p2_rddata[1] <= soc_a7ddrphy_bitslip1_o[4]; - soc_a7ddrphy_dfi_p2_rddata[17] <= soc_a7ddrphy_bitslip1_o[5]; - soc_a7ddrphy_dfi_p2_rddata[2] <= soc_a7ddrphy_bitslip2_o[4]; - soc_a7ddrphy_dfi_p2_rddata[18] <= soc_a7ddrphy_bitslip2_o[5]; - soc_a7ddrphy_dfi_p2_rddata[3] <= soc_a7ddrphy_bitslip3_o[4]; - soc_a7ddrphy_dfi_p2_rddata[19] <= soc_a7ddrphy_bitslip3_o[5]; - soc_a7ddrphy_dfi_p2_rddata[4] <= soc_a7ddrphy_bitslip4_o[4]; - soc_a7ddrphy_dfi_p2_rddata[20] <= soc_a7ddrphy_bitslip4_o[5]; - soc_a7ddrphy_dfi_p2_rddata[5] <= soc_a7ddrphy_bitslip5_o[4]; - soc_a7ddrphy_dfi_p2_rddata[21] <= soc_a7ddrphy_bitslip5_o[5]; - soc_a7ddrphy_dfi_p2_rddata[6] <= soc_a7ddrphy_bitslip6_o[4]; - soc_a7ddrphy_dfi_p2_rddata[22] <= soc_a7ddrphy_bitslip6_o[5]; - soc_a7ddrphy_dfi_p2_rddata[7] <= soc_a7ddrphy_bitslip7_o[4]; - soc_a7ddrphy_dfi_p2_rddata[23] <= soc_a7ddrphy_bitslip7_o[5]; - soc_a7ddrphy_dfi_p2_rddata[8] <= soc_a7ddrphy_bitslip8_o[4]; - soc_a7ddrphy_dfi_p2_rddata[24] <= soc_a7ddrphy_bitslip8_o[5]; - soc_a7ddrphy_dfi_p2_rddata[9] <= soc_a7ddrphy_bitslip9_o[4]; - soc_a7ddrphy_dfi_p2_rddata[25] <= soc_a7ddrphy_bitslip9_o[5]; - soc_a7ddrphy_dfi_p2_rddata[10] <= soc_a7ddrphy_bitslip10_o[4]; - soc_a7ddrphy_dfi_p2_rddata[26] <= soc_a7ddrphy_bitslip10_o[5]; - soc_a7ddrphy_dfi_p2_rddata[11] <= soc_a7ddrphy_bitslip11_o[4]; - soc_a7ddrphy_dfi_p2_rddata[27] <= soc_a7ddrphy_bitslip11_o[5]; - soc_a7ddrphy_dfi_p2_rddata[12] <= soc_a7ddrphy_bitslip12_o[4]; - soc_a7ddrphy_dfi_p2_rddata[28] <= soc_a7ddrphy_bitslip12_o[5]; - soc_a7ddrphy_dfi_p2_rddata[13] <= soc_a7ddrphy_bitslip13_o[4]; - soc_a7ddrphy_dfi_p2_rddata[29] <= soc_a7ddrphy_bitslip13_o[5]; - soc_a7ddrphy_dfi_p2_rddata[14] <= soc_a7ddrphy_bitslip14_o[4]; - soc_a7ddrphy_dfi_p2_rddata[30] <= soc_a7ddrphy_bitslip14_o[5]; - soc_a7ddrphy_dfi_p2_rddata[15] <= soc_a7ddrphy_bitslip15_o[4]; - soc_a7ddrphy_dfi_p2_rddata[31] <= soc_a7ddrphy_bitslip15_o[5]; -end -always @(*) begin - soc_a7ddrphy_dfi_p3_rddata <= 32'd0; - soc_a7ddrphy_dfi_p3_rddata[0] <= soc_a7ddrphy_bitslip0_o[6]; - soc_a7ddrphy_dfi_p3_rddata[16] <= soc_a7ddrphy_bitslip0_o[7]; - soc_a7ddrphy_dfi_p3_rddata[1] <= soc_a7ddrphy_bitslip1_o[6]; - soc_a7ddrphy_dfi_p3_rddata[17] <= soc_a7ddrphy_bitslip1_o[7]; - soc_a7ddrphy_dfi_p3_rddata[2] <= soc_a7ddrphy_bitslip2_o[6]; - soc_a7ddrphy_dfi_p3_rddata[18] <= soc_a7ddrphy_bitslip2_o[7]; - soc_a7ddrphy_dfi_p3_rddata[3] <= soc_a7ddrphy_bitslip3_o[6]; - soc_a7ddrphy_dfi_p3_rddata[19] <= soc_a7ddrphy_bitslip3_o[7]; - soc_a7ddrphy_dfi_p3_rddata[4] <= soc_a7ddrphy_bitslip4_o[6]; - soc_a7ddrphy_dfi_p3_rddata[20] <= soc_a7ddrphy_bitslip4_o[7]; - soc_a7ddrphy_dfi_p3_rddata[5] <= soc_a7ddrphy_bitslip5_o[6]; - soc_a7ddrphy_dfi_p3_rddata[21] <= soc_a7ddrphy_bitslip5_o[7]; - soc_a7ddrphy_dfi_p3_rddata[6] <= soc_a7ddrphy_bitslip6_o[6]; - soc_a7ddrphy_dfi_p3_rddata[22] <= soc_a7ddrphy_bitslip6_o[7]; - soc_a7ddrphy_dfi_p3_rddata[7] <= soc_a7ddrphy_bitslip7_o[6]; - soc_a7ddrphy_dfi_p3_rddata[23] <= soc_a7ddrphy_bitslip7_o[7]; - soc_a7ddrphy_dfi_p3_rddata[8] <= soc_a7ddrphy_bitslip8_o[6]; - soc_a7ddrphy_dfi_p3_rddata[24] <= soc_a7ddrphy_bitslip8_o[7]; - soc_a7ddrphy_dfi_p3_rddata[9] <= soc_a7ddrphy_bitslip9_o[6]; - soc_a7ddrphy_dfi_p3_rddata[25] <= soc_a7ddrphy_bitslip9_o[7]; - soc_a7ddrphy_dfi_p3_rddata[10] <= soc_a7ddrphy_bitslip10_o[6]; - soc_a7ddrphy_dfi_p3_rddata[26] <= soc_a7ddrphy_bitslip10_o[7]; - soc_a7ddrphy_dfi_p3_rddata[11] <= soc_a7ddrphy_bitslip11_o[6]; - soc_a7ddrphy_dfi_p3_rddata[27] <= soc_a7ddrphy_bitslip11_o[7]; - soc_a7ddrphy_dfi_p3_rddata[12] <= soc_a7ddrphy_bitslip12_o[6]; - soc_a7ddrphy_dfi_p3_rddata[28] <= soc_a7ddrphy_bitslip12_o[7]; - soc_a7ddrphy_dfi_p3_rddata[13] <= soc_a7ddrphy_bitslip13_o[6]; - soc_a7ddrphy_dfi_p3_rddata[29] <= soc_a7ddrphy_bitslip13_o[7]; - soc_a7ddrphy_dfi_p3_rddata[14] <= soc_a7ddrphy_bitslip14_o[6]; - soc_a7ddrphy_dfi_p3_rddata[30] <= soc_a7ddrphy_bitslip14_o[7]; - soc_a7ddrphy_dfi_p3_rddata[15] <= soc_a7ddrphy_bitslip15_o[6]; - soc_a7ddrphy_dfi_p3_rddata[31] <= soc_a7ddrphy_bitslip15_o[7]; -end -assign soc_a7ddrphy_oe = ((soc_a7ddrphy_last_wrdata_en[1] | soc_a7ddrphy_last_wrdata_en[2]) | soc_a7ddrphy_last_wrdata_en[3]); -assign soc_a7ddrphy_dqs_preamble = (soc_a7ddrphy_last_wrdata_en[1] & (~soc_a7ddrphy_last_wrdata_en[2])); -assign soc_a7ddrphy_dqs_postamble = (soc_a7ddrphy_last_wrdata_en[3] & (~soc_a7ddrphy_last_wrdata_en[2])); -assign soc_a7ddrphy_dfi_p0_address = soc_netsoc_sdram_master_p0_address; -assign soc_a7ddrphy_dfi_p0_bank = soc_netsoc_sdram_master_p0_bank; -assign soc_a7ddrphy_dfi_p0_cas_n = soc_netsoc_sdram_master_p0_cas_n; -assign soc_a7ddrphy_dfi_p0_cs_n = soc_netsoc_sdram_master_p0_cs_n; -assign soc_a7ddrphy_dfi_p0_ras_n = soc_netsoc_sdram_master_p0_ras_n; -assign soc_a7ddrphy_dfi_p0_we_n = soc_netsoc_sdram_master_p0_we_n; -assign soc_a7ddrphy_dfi_p0_cke = soc_netsoc_sdram_master_p0_cke; -assign soc_a7ddrphy_dfi_p0_odt = soc_netsoc_sdram_master_p0_odt; -assign soc_a7ddrphy_dfi_p0_reset_n = soc_netsoc_sdram_master_p0_reset_n; -assign soc_a7ddrphy_dfi_p0_act_n = soc_netsoc_sdram_master_p0_act_n; -assign soc_a7ddrphy_dfi_p0_wrdata = soc_netsoc_sdram_master_p0_wrdata; -assign soc_a7ddrphy_dfi_p0_wrdata_en = soc_netsoc_sdram_master_p0_wrdata_en; -assign soc_a7ddrphy_dfi_p0_wrdata_mask = soc_netsoc_sdram_master_p0_wrdata_mask; -assign soc_a7ddrphy_dfi_p0_rddata_en = soc_netsoc_sdram_master_p0_rddata_en; -assign soc_netsoc_sdram_master_p0_rddata = soc_a7ddrphy_dfi_p0_rddata; -assign soc_netsoc_sdram_master_p0_rddata_valid = soc_a7ddrphy_dfi_p0_rddata_valid; -assign soc_a7ddrphy_dfi_p1_address = soc_netsoc_sdram_master_p1_address; -assign soc_a7ddrphy_dfi_p1_bank = soc_netsoc_sdram_master_p1_bank; -assign soc_a7ddrphy_dfi_p1_cas_n = soc_netsoc_sdram_master_p1_cas_n; -assign soc_a7ddrphy_dfi_p1_cs_n = soc_netsoc_sdram_master_p1_cs_n; -assign soc_a7ddrphy_dfi_p1_ras_n = soc_netsoc_sdram_master_p1_ras_n; -assign soc_a7ddrphy_dfi_p1_we_n = soc_netsoc_sdram_master_p1_we_n; -assign soc_a7ddrphy_dfi_p1_cke = soc_netsoc_sdram_master_p1_cke; -assign soc_a7ddrphy_dfi_p1_odt = soc_netsoc_sdram_master_p1_odt; -assign soc_a7ddrphy_dfi_p1_reset_n = soc_netsoc_sdram_master_p1_reset_n; -assign soc_a7ddrphy_dfi_p1_act_n = soc_netsoc_sdram_master_p1_act_n; -assign soc_a7ddrphy_dfi_p1_wrdata = soc_netsoc_sdram_master_p1_wrdata; -assign soc_a7ddrphy_dfi_p1_wrdata_en = soc_netsoc_sdram_master_p1_wrdata_en; -assign soc_a7ddrphy_dfi_p1_wrdata_mask = soc_netsoc_sdram_master_p1_wrdata_mask; -assign soc_a7ddrphy_dfi_p1_rddata_en = soc_netsoc_sdram_master_p1_rddata_en; -assign soc_netsoc_sdram_master_p1_rddata = soc_a7ddrphy_dfi_p1_rddata; -assign soc_netsoc_sdram_master_p1_rddata_valid = soc_a7ddrphy_dfi_p1_rddata_valid; -assign soc_a7ddrphy_dfi_p2_address = soc_netsoc_sdram_master_p2_address; -assign soc_a7ddrphy_dfi_p2_bank = soc_netsoc_sdram_master_p2_bank; -assign soc_a7ddrphy_dfi_p2_cas_n = soc_netsoc_sdram_master_p2_cas_n; -assign soc_a7ddrphy_dfi_p2_cs_n = soc_netsoc_sdram_master_p2_cs_n; -assign soc_a7ddrphy_dfi_p2_ras_n = soc_netsoc_sdram_master_p2_ras_n; -assign soc_a7ddrphy_dfi_p2_we_n = soc_netsoc_sdram_master_p2_we_n; -assign soc_a7ddrphy_dfi_p2_cke = soc_netsoc_sdram_master_p2_cke; -assign soc_a7ddrphy_dfi_p2_odt = soc_netsoc_sdram_master_p2_odt; -assign soc_a7ddrphy_dfi_p2_reset_n = soc_netsoc_sdram_master_p2_reset_n; -assign soc_a7ddrphy_dfi_p2_act_n = soc_netsoc_sdram_master_p2_act_n; -assign soc_a7ddrphy_dfi_p2_wrdata = soc_netsoc_sdram_master_p2_wrdata; -assign soc_a7ddrphy_dfi_p2_wrdata_en = soc_netsoc_sdram_master_p2_wrdata_en; -assign soc_a7ddrphy_dfi_p2_wrdata_mask = soc_netsoc_sdram_master_p2_wrdata_mask; -assign soc_a7ddrphy_dfi_p2_rddata_en = soc_netsoc_sdram_master_p2_rddata_en; -assign soc_netsoc_sdram_master_p2_rddata = soc_a7ddrphy_dfi_p2_rddata; -assign soc_netsoc_sdram_master_p2_rddata_valid = soc_a7ddrphy_dfi_p2_rddata_valid; -assign soc_a7ddrphy_dfi_p3_address = soc_netsoc_sdram_master_p3_address; -assign soc_a7ddrphy_dfi_p3_bank = soc_netsoc_sdram_master_p3_bank; -assign soc_a7ddrphy_dfi_p3_cas_n = soc_netsoc_sdram_master_p3_cas_n; -assign soc_a7ddrphy_dfi_p3_cs_n = soc_netsoc_sdram_master_p3_cs_n; -assign soc_a7ddrphy_dfi_p3_ras_n = soc_netsoc_sdram_master_p3_ras_n; -assign soc_a7ddrphy_dfi_p3_we_n = soc_netsoc_sdram_master_p3_we_n; -assign soc_a7ddrphy_dfi_p3_cke = soc_netsoc_sdram_master_p3_cke; -assign soc_a7ddrphy_dfi_p3_odt = soc_netsoc_sdram_master_p3_odt; -assign soc_a7ddrphy_dfi_p3_reset_n = soc_netsoc_sdram_master_p3_reset_n; -assign soc_a7ddrphy_dfi_p3_act_n = soc_netsoc_sdram_master_p3_act_n; -assign soc_a7ddrphy_dfi_p3_wrdata = soc_netsoc_sdram_master_p3_wrdata; -assign soc_a7ddrphy_dfi_p3_wrdata_en = soc_netsoc_sdram_master_p3_wrdata_en; -assign soc_a7ddrphy_dfi_p3_wrdata_mask = soc_netsoc_sdram_master_p3_wrdata_mask; -assign soc_a7ddrphy_dfi_p3_rddata_en = soc_netsoc_sdram_master_p3_rddata_en; -assign soc_netsoc_sdram_master_p3_rddata = soc_a7ddrphy_dfi_p3_rddata; -assign soc_netsoc_sdram_master_p3_rddata_valid = soc_a7ddrphy_dfi_p3_rddata_valid; -assign soc_netsoc_sdram_slave_p0_address = soc_netsoc_sdram_dfi_p0_address; -assign soc_netsoc_sdram_slave_p0_bank = soc_netsoc_sdram_dfi_p0_bank; -assign soc_netsoc_sdram_slave_p0_cas_n = soc_netsoc_sdram_dfi_p0_cas_n; -assign soc_netsoc_sdram_slave_p0_cs_n = soc_netsoc_sdram_dfi_p0_cs_n; -assign soc_netsoc_sdram_slave_p0_ras_n = soc_netsoc_sdram_dfi_p0_ras_n; -assign soc_netsoc_sdram_slave_p0_we_n = soc_netsoc_sdram_dfi_p0_we_n; -assign soc_netsoc_sdram_slave_p0_cke = soc_netsoc_sdram_dfi_p0_cke; -assign soc_netsoc_sdram_slave_p0_odt = soc_netsoc_sdram_dfi_p0_odt; -assign soc_netsoc_sdram_slave_p0_reset_n = soc_netsoc_sdram_dfi_p0_reset_n; -assign soc_netsoc_sdram_slave_p0_act_n = soc_netsoc_sdram_dfi_p0_act_n; -assign soc_netsoc_sdram_slave_p0_wrdata = soc_netsoc_sdram_dfi_p0_wrdata; -assign soc_netsoc_sdram_slave_p0_wrdata_en = soc_netsoc_sdram_dfi_p0_wrdata_en; -assign soc_netsoc_sdram_slave_p0_wrdata_mask = soc_netsoc_sdram_dfi_p0_wrdata_mask; -assign soc_netsoc_sdram_slave_p0_rddata_en = soc_netsoc_sdram_dfi_p0_rddata_en; -assign soc_netsoc_sdram_dfi_p0_rddata = soc_netsoc_sdram_slave_p0_rddata; -assign soc_netsoc_sdram_dfi_p0_rddata_valid = soc_netsoc_sdram_slave_p0_rddata_valid; -assign soc_netsoc_sdram_slave_p1_address = soc_netsoc_sdram_dfi_p1_address; -assign soc_netsoc_sdram_slave_p1_bank = soc_netsoc_sdram_dfi_p1_bank; -assign soc_netsoc_sdram_slave_p1_cas_n = soc_netsoc_sdram_dfi_p1_cas_n; -assign soc_netsoc_sdram_slave_p1_cs_n = soc_netsoc_sdram_dfi_p1_cs_n; -assign soc_netsoc_sdram_slave_p1_ras_n = soc_netsoc_sdram_dfi_p1_ras_n; -assign soc_netsoc_sdram_slave_p1_we_n = soc_netsoc_sdram_dfi_p1_we_n; -assign soc_netsoc_sdram_slave_p1_cke = soc_netsoc_sdram_dfi_p1_cke; -assign soc_netsoc_sdram_slave_p1_odt = soc_netsoc_sdram_dfi_p1_odt; -assign soc_netsoc_sdram_slave_p1_reset_n = soc_netsoc_sdram_dfi_p1_reset_n; -assign soc_netsoc_sdram_slave_p1_act_n = soc_netsoc_sdram_dfi_p1_act_n; -assign soc_netsoc_sdram_slave_p1_wrdata = soc_netsoc_sdram_dfi_p1_wrdata; -assign soc_netsoc_sdram_slave_p1_wrdata_en = soc_netsoc_sdram_dfi_p1_wrdata_en; -assign soc_netsoc_sdram_slave_p1_wrdata_mask = soc_netsoc_sdram_dfi_p1_wrdata_mask; -assign soc_netsoc_sdram_slave_p1_rddata_en = soc_netsoc_sdram_dfi_p1_rddata_en; -assign soc_netsoc_sdram_dfi_p1_rddata = soc_netsoc_sdram_slave_p1_rddata; -assign soc_netsoc_sdram_dfi_p1_rddata_valid = soc_netsoc_sdram_slave_p1_rddata_valid; -assign soc_netsoc_sdram_slave_p2_address = soc_netsoc_sdram_dfi_p2_address; -assign soc_netsoc_sdram_slave_p2_bank = soc_netsoc_sdram_dfi_p2_bank; -assign soc_netsoc_sdram_slave_p2_cas_n = soc_netsoc_sdram_dfi_p2_cas_n; -assign soc_netsoc_sdram_slave_p2_cs_n = soc_netsoc_sdram_dfi_p2_cs_n; -assign soc_netsoc_sdram_slave_p2_ras_n = soc_netsoc_sdram_dfi_p2_ras_n; -assign soc_netsoc_sdram_slave_p2_we_n = soc_netsoc_sdram_dfi_p2_we_n; -assign soc_netsoc_sdram_slave_p2_cke = soc_netsoc_sdram_dfi_p2_cke; -assign soc_netsoc_sdram_slave_p2_odt = soc_netsoc_sdram_dfi_p2_odt; -assign soc_netsoc_sdram_slave_p2_reset_n = soc_netsoc_sdram_dfi_p2_reset_n; -assign soc_netsoc_sdram_slave_p2_act_n = soc_netsoc_sdram_dfi_p2_act_n; -assign soc_netsoc_sdram_slave_p2_wrdata = soc_netsoc_sdram_dfi_p2_wrdata; -assign soc_netsoc_sdram_slave_p2_wrdata_en = soc_netsoc_sdram_dfi_p2_wrdata_en; -assign soc_netsoc_sdram_slave_p2_wrdata_mask = soc_netsoc_sdram_dfi_p2_wrdata_mask; -assign soc_netsoc_sdram_slave_p2_rddata_en = soc_netsoc_sdram_dfi_p2_rddata_en; -assign soc_netsoc_sdram_dfi_p2_rddata = soc_netsoc_sdram_slave_p2_rddata; -assign soc_netsoc_sdram_dfi_p2_rddata_valid = soc_netsoc_sdram_slave_p2_rddata_valid; -assign soc_netsoc_sdram_slave_p3_address = soc_netsoc_sdram_dfi_p3_address; -assign soc_netsoc_sdram_slave_p3_bank = soc_netsoc_sdram_dfi_p3_bank; -assign soc_netsoc_sdram_slave_p3_cas_n = soc_netsoc_sdram_dfi_p3_cas_n; -assign soc_netsoc_sdram_slave_p3_cs_n = soc_netsoc_sdram_dfi_p3_cs_n; -assign soc_netsoc_sdram_slave_p3_ras_n = soc_netsoc_sdram_dfi_p3_ras_n; -assign soc_netsoc_sdram_slave_p3_we_n = soc_netsoc_sdram_dfi_p3_we_n; -assign soc_netsoc_sdram_slave_p3_cke = soc_netsoc_sdram_dfi_p3_cke; -assign soc_netsoc_sdram_slave_p3_odt = soc_netsoc_sdram_dfi_p3_odt; -assign soc_netsoc_sdram_slave_p3_reset_n = soc_netsoc_sdram_dfi_p3_reset_n; -assign soc_netsoc_sdram_slave_p3_act_n = soc_netsoc_sdram_dfi_p3_act_n; -assign soc_netsoc_sdram_slave_p3_wrdata = soc_netsoc_sdram_dfi_p3_wrdata; -assign soc_netsoc_sdram_slave_p3_wrdata_en = soc_netsoc_sdram_dfi_p3_wrdata_en; -assign soc_netsoc_sdram_slave_p3_wrdata_mask = soc_netsoc_sdram_dfi_p3_wrdata_mask; -assign soc_netsoc_sdram_slave_p3_rddata_en = soc_netsoc_sdram_dfi_p3_rddata_en; -assign soc_netsoc_sdram_dfi_p3_rddata = soc_netsoc_sdram_slave_p3_rddata; -assign soc_netsoc_sdram_dfi_p3_rddata_valid = soc_netsoc_sdram_slave_p3_rddata_valid; -always @(*) begin - soc_netsoc_sdram_master_p2_we_n <= 1'd1; - soc_netsoc_sdram_master_p2_cke <= 1'd0; - soc_netsoc_sdram_master_p2_odt <= 1'd0; - soc_netsoc_sdram_master_p2_reset_n <= 1'd0; - soc_netsoc_sdram_master_p2_act_n <= 1'd1; - soc_netsoc_sdram_master_p2_wrdata <= 32'd0; - soc_netsoc_sdram_inti_p3_rddata <= 32'd0; - soc_netsoc_sdram_master_p2_wrdata_en <= 1'd0; - soc_netsoc_sdram_inti_p3_rddata_valid <= 1'd0; - soc_netsoc_sdram_master_p2_wrdata_mask <= 4'd0; - soc_netsoc_sdram_master_p2_rddata_en <= 1'd0; - soc_netsoc_sdram_master_p3_address <= 14'd0; - soc_netsoc_sdram_master_p3_bank <= 3'd0; - soc_netsoc_sdram_master_p3_cas_n <= 1'd1; - soc_netsoc_sdram_master_p3_cs_n <= 1'd1; - soc_netsoc_sdram_master_p3_ras_n <= 1'd1; - soc_netsoc_sdram_master_p3_we_n <= 1'd1; - soc_netsoc_sdram_master_p3_cke <= 1'd0; - soc_netsoc_sdram_master_p3_odt <= 1'd0; - soc_netsoc_sdram_master_p3_reset_n <= 1'd0; - soc_netsoc_sdram_master_p3_act_n <= 1'd1; - soc_netsoc_sdram_master_p3_wrdata <= 32'd0; - soc_netsoc_sdram_master_p3_wrdata_en <= 1'd0; - soc_netsoc_sdram_master_p3_wrdata_mask <= 4'd0; - soc_netsoc_sdram_master_p3_rddata_en <= 1'd0; - soc_netsoc_sdram_slave_p0_rddata <= 32'd0; - soc_netsoc_sdram_slave_p0_rddata_valid <= 1'd0; - soc_netsoc_sdram_slave_p1_rddata <= 32'd0; - soc_netsoc_sdram_slave_p1_rddata_valid <= 1'd0; - soc_netsoc_sdram_slave_p2_rddata <= 32'd0; - soc_netsoc_sdram_slave_p2_rddata_valid <= 1'd0; - soc_netsoc_sdram_slave_p3_rddata <= 32'd0; - soc_netsoc_sdram_slave_p3_rddata_valid <= 1'd0; - soc_netsoc_sdram_inti_p0_rddata <= 32'd0; - soc_netsoc_sdram_inti_p0_rddata_valid <= 1'd0; - soc_netsoc_sdram_master_p0_address <= 14'd0; - soc_netsoc_sdram_master_p0_bank <= 3'd0; - soc_netsoc_sdram_master_p0_cas_n <= 1'd1; - soc_netsoc_sdram_master_p0_cs_n <= 1'd1; - soc_netsoc_sdram_master_p0_ras_n <= 1'd1; - soc_netsoc_sdram_master_p0_we_n <= 1'd1; - soc_netsoc_sdram_master_p0_cke <= 1'd0; - soc_netsoc_sdram_master_p0_odt <= 1'd0; - soc_netsoc_sdram_master_p0_reset_n <= 1'd0; - soc_netsoc_sdram_master_p0_act_n <= 1'd1; - soc_netsoc_sdram_master_p0_wrdata <= 32'd0; - soc_netsoc_sdram_inti_p1_rddata <= 32'd0; - soc_netsoc_sdram_master_p0_wrdata_en <= 1'd0; - soc_netsoc_sdram_inti_p1_rddata_valid <= 1'd0; - soc_netsoc_sdram_master_p0_wrdata_mask <= 4'd0; - soc_netsoc_sdram_master_p0_rddata_en <= 1'd0; - soc_netsoc_sdram_master_p1_address <= 14'd0; - soc_netsoc_sdram_master_p1_bank <= 3'd0; - soc_netsoc_sdram_master_p1_cas_n <= 1'd1; - soc_netsoc_sdram_master_p1_cs_n <= 1'd1; - soc_netsoc_sdram_master_p1_ras_n <= 1'd1; - soc_netsoc_sdram_master_p1_we_n <= 1'd1; - soc_netsoc_sdram_master_p1_cke <= 1'd0; - soc_netsoc_sdram_master_p1_odt <= 1'd0; - soc_netsoc_sdram_master_p1_reset_n <= 1'd0; - soc_netsoc_sdram_master_p1_act_n <= 1'd1; - soc_netsoc_sdram_master_p1_wrdata <= 32'd0; - soc_netsoc_sdram_inti_p2_rddata <= 32'd0; - soc_netsoc_sdram_master_p1_wrdata_en <= 1'd0; - soc_netsoc_sdram_inti_p2_rddata_valid <= 1'd0; - soc_netsoc_sdram_master_p1_wrdata_mask <= 4'd0; - soc_netsoc_sdram_master_p1_rddata_en <= 1'd0; - soc_netsoc_sdram_master_p2_address <= 14'd0; - soc_netsoc_sdram_master_p2_bank <= 3'd0; - soc_netsoc_sdram_master_p2_cas_n <= 1'd1; - soc_netsoc_sdram_master_p2_cs_n <= 1'd1; - soc_netsoc_sdram_master_p2_ras_n <= 1'd1; - if (soc_netsoc_sdram_storage[0]) begin - soc_netsoc_sdram_master_p0_address <= soc_netsoc_sdram_slave_p0_address; - soc_netsoc_sdram_master_p0_bank <= soc_netsoc_sdram_slave_p0_bank; - soc_netsoc_sdram_master_p0_cas_n <= soc_netsoc_sdram_slave_p0_cas_n; - soc_netsoc_sdram_master_p0_cs_n <= soc_netsoc_sdram_slave_p0_cs_n; - soc_netsoc_sdram_master_p0_ras_n <= soc_netsoc_sdram_slave_p0_ras_n; - soc_netsoc_sdram_master_p0_we_n <= soc_netsoc_sdram_slave_p0_we_n; - soc_netsoc_sdram_master_p0_cke <= soc_netsoc_sdram_slave_p0_cke; - soc_netsoc_sdram_master_p0_odt <= soc_netsoc_sdram_slave_p0_odt; - soc_netsoc_sdram_master_p0_reset_n <= soc_netsoc_sdram_slave_p0_reset_n; - soc_netsoc_sdram_master_p0_act_n <= soc_netsoc_sdram_slave_p0_act_n; - soc_netsoc_sdram_master_p0_wrdata <= soc_netsoc_sdram_slave_p0_wrdata; - soc_netsoc_sdram_master_p0_wrdata_en <= soc_netsoc_sdram_slave_p0_wrdata_en; - soc_netsoc_sdram_master_p0_wrdata_mask <= soc_netsoc_sdram_slave_p0_wrdata_mask; - soc_netsoc_sdram_master_p0_rddata_en <= soc_netsoc_sdram_slave_p0_rddata_en; - soc_netsoc_sdram_slave_p0_rddata <= soc_netsoc_sdram_master_p0_rddata; - soc_netsoc_sdram_slave_p0_rddata_valid <= soc_netsoc_sdram_master_p0_rddata_valid; - soc_netsoc_sdram_master_p1_address <= soc_netsoc_sdram_slave_p1_address; - soc_netsoc_sdram_master_p1_bank <= soc_netsoc_sdram_slave_p1_bank; - soc_netsoc_sdram_master_p1_cas_n <= soc_netsoc_sdram_slave_p1_cas_n; - soc_netsoc_sdram_master_p1_cs_n <= soc_netsoc_sdram_slave_p1_cs_n; - soc_netsoc_sdram_master_p1_ras_n <= soc_netsoc_sdram_slave_p1_ras_n; - soc_netsoc_sdram_master_p1_we_n <= soc_netsoc_sdram_slave_p1_we_n; - soc_netsoc_sdram_master_p1_cke <= soc_netsoc_sdram_slave_p1_cke; - soc_netsoc_sdram_master_p1_odt <= soc_netsoc_sdram_slave_p1_odt; - soc_netsoc_sdram_master_p1_reset_n <= soc_netsoc_sdram_slave_p1_reset_n; - soc_netsoc_sdram_master_p1_act_n <= soc_netsoc_sdram_slave_p1_act_n; - soc_netsoc_sdram_master_p1_wrdata <= soc_netsoc_sdram_slave_p1_wrdata; - soc_netsoc_sdram_master_p1_wrdata_en <= soc_netsoc_sdram_slave_p1_wrdata_en; - soc_netsoc_sdram_master_p1_wrdata_mask <= soc_netsoc_sdram_slave_p1_wrdata_mask; - soc_netsoc_sdram_master_p1_rddata_en <= soc_netsoc_sdram_slave_p1_rddata_en; - soc_netsoc_sdram_slave_p1_rddata <= soc_netsoc_sdram_master_p1_rddata; - soc_netsoc_sdram_slave_p1_rddata_valid <= soc_netsoc_sdram_master_p1_rddata_valid; - soc_netsoc_sdram_master_p2_address <= soc_netsoc_sdram_slave_p2_address; - soc_netsoc_sdram_master_p2_bank <= soc_netsoc_sdram_slave_p2_bank; - soc_netsoc_sdram_master_p2_cas_n <= soc_netsoc_sdram_slave_p2_cas_n; - soc_netsoc_sdram_master_p2_cs_n <= soc_netsoc_sdram_slave_p2_cs_n; - soc_netsoc_sdram_master_p2_ras_n <= soc_netsoc_sdram_slave_p2_ras_n; - soc_netsoc_sdram_master_p2_we_n <= soc_netsoc_sdram_slave_p2_we_n; - soc_netsoc_sdram_master_p2_cke <= soc_netsoc_sdram_slave_p2_cke; - soc_netsoc_sdram_master_p2_odt <= soc_netsoc_sdram_slave_p2_odt; - soc_netsoc_sdram_master_p2_reset_n <= soc_netsoc_sdram_slave_p2_reset_n; - soc_netsoc_sdram_master_p2_act_n <= soc_netsoc_sdram_slave_p2_act_n; - soc_netsoc_sdram_master_p2_wrdata <= soc_netsoc_sdram_slave_p2_wrdata; - soc_netsoc_sdram_master_p2_wrdata_en <= soc_netsoc_sdram_slave_p2_wrdata_en; - soc_netsoc_sdram_master_p2_wrdata_mask <= soc_netsoc_sdram_slave_p2_wrdata_mask; - soc_netsoc_sdram_master_p2_rddata_en <= soc_netsoc_sdram_slave_p2_rddata_en; - soc_netsoc_sdram_slave_p2_rddata <= soc_netsoc_sdram_master_p2_rddata; - soc_netsoc_sdram_slave_p2_rddata_valid <= soc_netsoc_sdram_master_p2_rddata_valid; - soc_netsoc_sdram_master_p3_address <= soc_netsoc_sdram_slave_p3_address; - soc_netsoc_sdram_master_p3_bank <= soc_netsoc_sdram_slave_p3_bank; - soc_netsoc_sdram_master_p3_cas_n <= soc_netsoc_sdram_slave_p3_cas_n; - soc_netsoc_sdram_master_p3_cs_n <= soc_netsoc_sdram_slave_p3_cs_n; - soc_netsoc_sdram_master_p3_ras_n <= soc_netsoc_sdram_slave_p3_ras_n; - soc_netsoc_sdram_master_p3_we_n <= soc_netsoc_sdram_slave_p3_we_n; - soc_netsoc_sdram_master_p3_cke <= soc_netsoc_sdram_slave_p3_cke; - soc_netsoc_sdram_master_p3_odt <= soc_netsoc_sdram_slave_p3_odt; - soc_netsoc_sdram_master_p3_reset_n <= soc_netsoc_sdram_slave_p3_reset_n; - soc_netsoc_sdram_master_p3_act_n <= soc_netsoc_sdram_slave_p3_act_n; - soc_netsoc_sdram_master_p3_wrdata <= soc_netsoc_sdram_slave_p3_wrdata; - soc_netsoc_sdram_master_p3_wrdata_en <= soc_netsoc_sdram_slave_p3_wrdata_en; - soc_netsoc_sdram_master_p3_wrdata_mask <= soc_netsoc_sdram_slave_p3_wrdata_mask; - soc_netsoc_sdram_master_p3_rddata_en <= soc_netsoc_sdram_slave_p3_rddata_en; - soc_netsoc_sdram_slave_p3_rddata <= soc_netsoc_sdram_master_p3_rddata; - soc_netsoc_sdram_slave_p3_rddata_valid <= soc_netsoc_sdram_master_p3_rddata_valid; - end else begin - soc_netsoc_sdram_master_p0_address <= soc_netsoc_sdram_inti_p0_address; - soc_netsoc_sdram_master_p0_bank <= soc_netsoc_sdram_inti_p0_bank; - soc_netsoc_sdram_master_p0_cas_n <= soc_netsoc_sdram_inti_p0_cas_n; - soc_netsoc_sdram_master_p0_cs_n <= soc_netsoc_sdram_inti_p0_cs_n; - soc_netsoc_sdram_master_p0_ras_n <= soc_netsoc_sdram_inti_p0_ras_n; - soc_netsoc_sdram_master_p0_we_n <= soc_netsoc_sdram_inti_p0_we_n; - soc_netsoc_sdram_master_p0_cke <= soc_netsoc_sdram_inti_p0_cke; - soc_netsoc_sdram_master_p0_odt <= soc_netsoc_sdram_inti_p0_odt; - soc_netsoc_sdram_master_p0_reset_n <= soc_netsoc_sdram_inti_p0_reset_n; - soc_netsoc_sdram_master_p0_act_n <= soc_netsoc_sdram_inti_p0_act_n; - soc_netsoc_sdram_master_p0_wrdata <= soc_netsoc_sdram_inti_p0_wrdata; - soc_netsoc_sdram_master_p0_wrdata_en <= soc_netsoc_sdram_inti_p0_wrdata_en; - soc_netsoc_sdram_master_p0_wrdata_mask <= soc_netsoc_sdram_inti_p0_wrdata_mask; - soc_netsoc_sdram_master_p0_rddata_en <= soc_netsoc_sdram_inti_p0_rddata_en; - soc_netsoc_sdram_inti_p0_rddata <= soc_netsoc_sdram_master_p0_rddata; - soc_netsoc_sdram_inti_p0_rddata_valid <= soc_netsoc_sdram_master_p0_rddata_valid; - soc_netsoc_sdram_master_p1_address <= soc_netsoc_sdram_inti_p1_address; - soc_netsoc_sdram_master_p1_bank <= soc_netsoc_sdram_inti_p1_bank; - soc_netsoc_sdram_master_p1_cas_n <= soc_netsoc_sdram_inti_p1_cas_n; - soc_netsoc_sdram_master_p1_cs_n <= soc_netsoc_sdram_inti_p1_cs_n; - soc_netsoc_sdram_master_p1_ras_n <= soc_netsoc_sdram_inti_p1_ras_n; - soc_netsoc_sdram_master_p1_we_n <= soc_netsoc_sdram_inti_p1_we_n; - soc_netsoc_sdram_master_p1_cke <= soc_netsoc_sdram_inti_p1_cke; - soc_netsoc_sdram_master_p1_odt <= soc_netsoc_sdram_inti_p1_odt; - soc_netsoc_sdram_master_p1_reset_n <= soc_netsoc_sdram_inti_p1_reset_n; - soc_netsoc_sdram_master_p1_act_n <= soc_netsoc_sdram_inti_p1_act_n; - soc_netsoc_sdram_master_p1_wrdata <= soc_netsoc_sdram_inti_p1_wrdata; - soc_netsoc_sdram_master_p1_wrdata_en <= soc_netsoc_sdram_inti_p1_wrdata_en; - soc_netsoc_sdram_master_p1_wrdata_mask <= soc_netsoc_sdram_inti_p1_wrdata_mask; - soc_netsoc_sdram_master_p1_rddata_en <= soc_netsoc_sdram_inti_p1_rddata_en; - soc_netsoc_sdram_inti_p1_rddata <= soc_netsoc_sdram_master_p1_rddata; - soc_netsoc_sdram_inti_p1_rddata_valid <= soc_netsoc_sdram_master_p1_rddata_valid; - soc_netsoc_sdram_master_p2_address <= soc_netsoc_sdram_inti_p2_address; - soc_netsoc_sdram_master_p2_bank <= soc_netsoc_sdram_inti_p2_bank; - soc_netsoc_sdram_master_p2_cas_n <= soc_netsoc_sdram_inti_p2_cas_n; - soc_netsoc_sdram_master_p2_cs_n <= soc_netsoc_sdram_inti_p2_cs_n; - soc_netsoc_sdram_master_p2_ras_n <= soc_netsoc_sdram_inti_p2_ras_n; - soc_netsoc_sdram_master_p2_we_n <= soc_netsoc_sdram_inti_p2_we_n; - soc_netsoc_sdram_master_p2_cke <= soc_netsoc_sdram_inti_p2_cke; - soc_netsoc_sdram_master_p2_odt <= soc_netsoc_sdram_inti_p2_odt; - soc_netsoc_sdram_master_p2_reset_n <= soc_netsoc_sdram_inti_p2_reset_n; - soc_netsoc_sdram_master_p2_act_n <= soc_netsoc_sdram_inti_p2_act_n; - soc_netsoc_sdram_master_p2_wrdata <= soc_netsoc_sdram_inti_p2_wrdata; - soc_netsoc_sdram_master_p2_wrdata_en <= soc_netsoc_sdram_inti_p2_wrdata_en; - soc_netsoc_sdram_master_p2_wrdata_mask <= soc_netsoc_sdram_inti_p2_wrdata_mask; - soc_netsoc_sdram_master_p2_rddata_en <= soc_netsoc_sdram_inti_p2_rddata_en; - soc_netsoc_sdram_inti_p2_rddata <= soc_netsoc_sdram_master_p2_rddata; - soc_netsoc_sdram_inti_p2_rddata_valid <= soc_netsoc_sdram_master_p2_rddata_valid; - soc_netsoc_sdram_master_p3_address <= soc_netsoc_sdram_inti_p3_address; - soc_netsoc_sdram_master_p3_bank <= soc_netsoc_sdram_inti_p3_bank; - soc_netsoc_sdram_master_p3_cas_n <= soc_netsoc_sdram_inti_p3_cas_n; - soc_netsoc_sdram_master_p3_cs_n <= soc_netsoc_sdram_inti_p3_cs_n; - soc_netsoc_sdram_master_p3_ras_n <= soc_netsoc_sdram_inti_p3_ras_n; - soc_netsoc_sdram_master_p3_we_n <= soc_netsoc_sdram_inti_p3_we_n; - soc_netsoc_sdram_master_p3_cke <= soc_netsoc_sdram_inti_p3_cke; - soc_netsoc_sdram_master_p3_odt <= soc_netsoc_sdram_inti_p3_odt; - soc_netsoc_sdram_master_p3_reset_n <= soc_netsoc_sdram_inti_p3_reset_n; - soc_netsoc_sdram_master_p3_act_n <= soc_netsoc_sdram_inti_p3_act_n; - soc_netsoc_sdram_master_p3_wrdata <= soc_netsoc_sdram_inti_p3_wrdata; - soc_netsoc_sdram_master_p3_wrdata_en <= soc_netsoc_sdram_inti_p3_wrdata_en; - soc_netsoc_sdram_master_p3_wrdata_mask <= soc_netsoc_sdram_inti_p3_wrdata_mask; - soc_netsoc_sdram_master_p3_rddata_en <= soc_netsoc_sdram_inti_p3_rddata_en; - soc_netsoc_sdram_inti_p3_rddata <= soc_netsoc_sdram_master_p3_rddata; - soc_netsoc_sdram_inti_p3_rddata_valid <= soc_netsoc_sdram_master_p3_rddata_valid; - end -end -assign soc_netsoc_sdram_inti_p0_cke = soc_netsoc_sdram_storage[1]; -assign soc_netsoc_sdram_inti_p1_cke = soc_netsoc_sdram_storage[1]; -assign soc_netsoc_sdram_inti_p2_cke = soc_netsoc_sdram_storage[1]; -assign soc_netsoc_sdram_inti_p3_cke = soc_netsoc_sdram_storage[1]; -assign soc_netsoc_sdram_inti_p0_odt = soc_netsoc_sdram_storage[2]; -assign soc_netsoc_sdram_inti_p1_odt = soc_netsoc_sdram_storage[2]; -assign soc_netsoc_sdram_inti_p2_odt = soc_netsoc_sdram_storage[2]; -assign soc_netsoc_sdram_inti_p3_odt = soc_netsoc_sdram_storage[2]; -assign soc_netsoc_sdram_inti_p0_reset_n = soc_netsoc_sdram_storage[3]; -assign soc_netsoc_sdram_inti_p1_reset_n = soc_netsoc_sdram_storage[3]; -assign soc_netsoc_sdram_inti_p2_reset_n = soc_netsoc_sdram_storage[3]; -assign soc_netsoc_sdram_inti_p3_reset_n = soc_netsoc_sdram_storage[3]; -always @(*) begin - soc_netsoc_sdram_inti_p0_we_n <= 1'd1; - soc_netsoc_sdram_inti_p0_cas_n <= 1'd1; - soc_netsoc_sdram_inti_p0_cs_n <= 1'd1; - soc_netsoc_sdram_inti_p0_ras_n <= 1'd1; - if (soc_netsoc_sdram_phaseinjector0_command_issue_re) begin - soc_netsoc_sdram_inti_p0_cs_n <= {1{(~soc_netsoc_sdram_phaseinjector0_command_storage[0])}}; - soc_netsoc_sdram_inti_p0_we_n <= (~soc_netsoc_sdram_phaseinjector0_command_storage[1]); - soc_netsoc_sdram_inti_p0_cas_n <= (~soc_netsoc_sdram_phaseinjector0_command_storage[2]); - soc_netsoc_sdram_inti_p0_ras_n <= (~soc_netsoc_sdram_phaseinjector0_command_storage[3]); - end else begin - soc_netsoc_sdram_inti_p0_cs_n <= {1{1'd1}}; - soc_netsoc_sdram_inti_p0_we_n <= 1'd1; - soc_netsoc_sdram_inti_p0_cas_n <= 1'd1; - soc_netsoc_sdram_inti_p0_ras_n <= 1'd1; - end -end -assign soc_netsoc_sdram_inti_p0_address = soc_netsoc_sdram_phaseinjector0_address_storage; -assign soc_netsoc_sdram_inti_p0_bank = soc_netsoc_sdram_phaseinjector0_baddress_storage; -assign soc_netsoc_sdram_inti_p0_wrdata_en = (soc_netsoc_sdram_phaseinjector0_command_issue_re & soc_netsoc_sdram_phaseinjector0_command_storage[4]); -assign soc_netsoc_sdram_inti_p0_rddata_en = (soc_netsoc_sdram_phaseinjector0_command_issue_re & soc_netsoc_sdram_phaseinjector0_command_storage[5]); -assign soc_netsoc_sdram_inti_p0_wrdata = soc_netsoc_sdram_phaseinjector0_wrdata_storage; -assign soc_netsoc_sdram_inti_p0_wrdata_mask = 1'd0; -always @(*) begin - soc_netsoc_sdram_inti_p1_we_n <= 1'd1; - soc_netsoc_sdram_inti_p1_cas_n <= 1'd1; - soc_netsoc_sdram_inti_p1_cs_n <= 1'd1; - soc_netsoc_sdram_inti_p1_ras_n <= 1'd1; - if (soc_netsoc_sdram_phaseinjector1_command_issue_re) begin - soc_netsoc_sdram_inti_p1_cs_n <= {1{(~soc_netsoc_sdram_phaseinjector1_command_storage[0])}}; - soc_netsoc_sdram_inti_p1_we_n <= (~soc_netsoc_sdram_phaseinjector1_command_storage[1]); - soc_netsoc_sdram_inti_p1_cas_n <= (~soc_netsoc_sdram_phaseinjector1_command_storage[2]); - soc_netsoc_sdram_inti_p1_ras_n <= (~soc_netsoc_sdram_phaseinjector1_command_storage[3]); - end else begin - soc_netsoc_sdram_inti_p1_cs_n <= {1{1'd1}}; - soc_netsoc_sdram_inti_p1_we_n <= 1'd1; - soc_netsoc_sdram_inti_p1_cas_n <= 1'd1; - soc_netsoc_sdram_inti_p1_ras_n <= 1'd1; - end -end -assign soc_netsoc_sdram_inti_p1_address = soc_netsoc_sdram_phaseinjector1_address_storage; -assign soc_netsoc_sdram_inti_p1_bank = soc_netsoc_sdram_phaseinjector1_baddress_storage; -assign soc_netsoc_sdram_inti_p1_wrdata_en = (soc_netsoc_sdram_phaseinjector1_command_issue_re & soc_netsoc_sdram_phaseinjector1_command_storage[4]); -assign soc_netsoc_sdram_inti_p1_rddata_en = (soc_netsoc_sdram_phaseinjector1_command_issue_re & soc_netsoc_sdram_phaseinjector1_command_storage[5]); -assign soc_netsoc_sdram_inti_p1_wrdata = soc_netsoc_sdram_phaseinjector1_wrdata_storage; -assign soc_netsoc_sdram_inti_p1_wrdata_mask = 1'd0; -always @(*) begin - soc_netsoc_sdram_inti_p2_we_n <= 1'd1; - soc_netsoc_sdram_inti_p2_cas_n <= 1'd1; - soc_netsoc_sdram_inti_p2_cs_n <= 1'd1; - soc_netsoc_sdram_inti_p2_ras_n <= 1'd1; - if (soc_netsoc_sdram_phaseinjector2_command_issue_re) begin - soc_netsoc_sdram_inti_p2_cs_n <= {1{(~soc_netsoc_sdram_phaseinjector2_command_storage[0])}}; - soc_netsoc_sdram_inti_p2_we_n <= (~soc_netsoc_sdram_phaseinjector2_command_storage[1]); - soc_netsoc_sdram_inti_p2_cas_n <= (~soc_netsoc_sdram_phaseinjector2_command_storage[2]); - soc_netsoc_sdram_inti_p2_ras_n <= (~soc_netsoc_sdram_phaseinjector2_command_storage[3]); - end else begin - soc_netsoc_sdram_inti_p2_cs_n <= {1{1'd1}}; - soc_netsoc_sdram_inti_p2_we_n <= 1'd1; - soc_netsoc_sdram_inti_p2_cas_n <= 1'd1; - soc_netsoc_sdram_inti_p2_ras_n <= 1'd1; - end -end -assign soc_netsoc_sdram_inti_p2_address = soc_netsoc_sdram_phaseinjector2_address_storage; -assign soc_netsoc_sdram_inti_p2_bank = soc_netsoc_sdram_phaseinjector2_baddress_storage; -assign soc_netsoc_sdram_inti_p2_wrdata_en = (soc_netsoc_sdram_phaseinjector2_command_issue_re & soc_netsoc_sdram_phaseinjector2_command_storage[4]); -assign soc_netsoc_sdram_inti_p2_rddata_en = (soc_netsoc_sdram_phaseinjector2_command_issue_re & soc_netsoc_sdram_phaseinjector2_command_storage[5]); -assign soc_netsoc_sdram_inti_p2_wrdata = soc_netsoc_sdram_phaseinjector2_wrdata_storage; -assign soc_netsoc_sdram_inti_p2_wrdata_mask = 1'd0; -always @(*) begin - soc_netsoc_sdram_inti_p3_we_n <= 1'd1; - soc_netsoc_sdram_inti_p3_cas_n <= 1'd1; - soc_netsoc_sdram_inti_p3_cs_n <= 1'd1; - soc_netsoc_sdram_inti_p3_ras_n <= 1'd1; - if (soc_netsoc_sdram_phaseinjector3_command_issue_re) begin - soc_netsoc_sdram_inti_p3_cs_n <= {1{(~soc_netsoc_sdram_phaseinjector3_command_storage[0])}}; - soc_netsoc_sdram_inti_p3_we_n <= (~soc_netsoc_sdram_phaseinjector3_command_storage[1]); - soc_netsoc_sdram_inti_p3_cas_n <= (~soc_netsoc_sdram_phaseinjector3_command_storage[2]); - soc_netsoc_sdram_inti_p3_ras_n <= (~soc_netsoc_sdram_phaseinjector3_command_storage[3]); - end else begin - soc_netsoc_sdram_inti_p3_cs_n <= {1{1'd1}}; - soc_netsoc_sdram_inti_p3_we_n <= 1'd1; - soc_netsoc_sdram_inti_p3_cas_n <= 1'd1; - soc_netsoc_sdram_inti_p3_ras_n <= 1'd1; - end -end -assign soc_netsoc_sdram_inti_p3_address = soc_netsoc_sdram_phaseinjector3_address_storage; -assign soc_netsoc_sdram_inti_p3_bank = soc_netsoc_sdram_phaseinjector3_baddress_storage; -assign soc_netsoc_sdram_inti_p3_wrdata_en = (soc_netsoc_sdram_phaseinjector3_command_issue_re & soc_netsoc_sdram_phaseinjector3_command_storage[4]); -assign soc_netsoc_sdram_inti_p3_rddata_en = (soc_netsoc_sdram_phaseinjector3_command_issue_re & soc_netsoc_sdram_phaseinjector3_command_storage[5]); -assign soc_netsoc_sdram_inti_p3_wrdata = soc_netsoc_sdram_phaseinjector3_wrdata_storage; -assign soc_netsoc_sdram_inti_p3_wrdata_mask = 1'd0; -assign soc_netsoc_sdram_bankmachine0_req_valid = soc_netsoc_sdram_interface_bank0_valid; -assign soc_netsoc_sdram_interface_bank0_ready = soc_netsoc_sdram_bankmachine0_req_ready; -assign soc_netsoc_sdram_bankmachine0_req_we = soc_netsoc_sdram_interface_bank0_we; -assign soc_netsoc_sdram_bankmachine0_req_addr = soc_netsoc_sdram_interface_bank0_addr; -assign soc_netsoc_sdram_interface_bank0_lock = soc_netsoc_sdram_bankmachine0_req_lock; -assign soc_netsoc_sdram_interface_bank0_wdata_ready = soc_netsoc_sdram_bankmachine0_req_wdata_ready; -assign soc_netsoc_sdram_interface_bank0_rdata_valid = soc_netsoc_sdram_bankmachine0_req_rdata_valid; -assign soc_netsoc_sdram_bankmachine1_req_valid = soc_netsoc_sdram_interface_bank1_valid; -assign soc_netsoc_sdram_interface_bank1_ready = soc_netsoc_sdram_bankmachine1_req_ready; -assign soc_netsoc_sdram_bankmachine1_req_we = soc_netsoc_sdram_interface_bank1_we; -assign soc_netsoc_sdram_bankmachine1_req_addr = soc_netsoc_sdram_interface_bank1_addr; -assign soc_netsoc_sdram_interface_bank1_lock = soc_netsoc_sdram_bankmachine1_req_lock; -assign soc_netsoc_sdram_interface_bank1_wdata_ready = soc_netsoc_sdram_bankmachine1_req_wdata_ready; -assign soc_netsoc_sdram_interface_bank1_rdata_valid = soc_netsoc_sdram_bankmachine1_req_rdata_valid; -assign soc_netsoc_sdram_bankmachine2_req_valid = soc_netsoc_sdram_interface_bank2_valid; -assign soc_netsoc_sdram_interface_bank2_ready = soc_netsoc_sdram_bankmachine2_req_ready; -assign soc_netsoc_sdram_bankmachine2_req_we = soc_netsoc_sdram_interface_bank2_we; -assign soc_netsoc_sdram_bankmachine2_req_addr = soc_netsoc_sdram_interface_bank2_addr; -assign soc_netsoc_sdram_interface_bank2_lock = soc_netsoc_sdram_bankmachine2_req_lock; -assign soc_netsoc_sdram_interface_bank2_wdata_ready = soc_netsoc_sdram_bankmachine2_req_wdata_ready; -assign soc_netsoc_sdram_interface_bank2_rdata_valid = soc_netsoc_sdram_bankmachine2_req_rdata_valid; -assign soc_netsoc_sdram_bankmachine3_req_valid = soc_netsoc_sdram_interface_bank3_valid; -assign soc_netsoc_sdram_interface_bank3_ready = soc_netsoc_sdram_bankmachine3_req_ready; -assign soc_netsoc_sdram_bankmachine3_req_we = soc_netsoc_sdram_interface_bank3_we; -assign soc_netsoc_sdram_bankmachine3_req_addr = soc_netsoc_sdram_interface_bank3_addr; -assign soc_netsoc_sdram_interface_bank3_lock = soc_netsoc_sdram_bankmachine3_req_lock; -assign soc_netsoc_sdram_interface_bank3_wdata_ready = soc_netsoc_sdram_bankmachine3_req_wdata_ready; -assign soc_netsoc_sdram_interface_bank3_rdata_valid = soc_netsoc_sdram_bankmachine3_req_rdata_valid; -assign soc_netsoc_sdram_bankmachine4_req_valid = soc_netsoc_sdram_interface_bank4_valid; -assign soc_netsoc_sdram_interface_bank4_ready = soc_netsoc_sdram_bankmachine4_req_ready; -assign soc_netsoc_sdram_bankmachine4_req_we = soc_netsoc_sdram_interface_bank4_we; -assign soc_netsoc_sdram_bankmachine4_req_addr = soc_netsoc_sdram_interface_bank4_addr; -assign soc_netsoc_sdram_interface_bank4_lock = soc_netsoc_sdram_bankmachine4_req_lock; -assign soc_netsoc_sdram_interface_bank4_wdata_ready = soc_netsoc_sdram_bankmachine4_req_wdata_ready; -assign soc_netsoc_sdram_interface_bank4_rdata_valid = soc_netsoc_sdram_bankmachine4_req_rdata_valid; -assign soc_netsoc_sdram_bankmachine5_req_valid = soc_netsoc_sdram_interface_bank5_valid; -assign soc_netsoc_sdram_interface_bank5_ready = soc_netsoc_sdram_bankmachine5_req_ready; -assign soc_netsoc_sdram_bankmachine5_req_we = soc_netsoc_sdram_interface_bank5_we; -assign soc_netsoc_sdram_bankmachine5_req_addr = soc_netsoc_sdram_interface_bank5_addr; -assign soc_netsoc_sdram_interface_bank5_lock = soc_netsoc_sdram_bankmachine5_req_lock; -assign soc_netsoc_sdram_interface_bank5_wdata_ready = soc_netsoc_sdram_bankmachine5_req_wdata_ready; -assign soc_netsoc_sdram_interface_bank5_rdata_valid = soc_netsoc_sdram_bankmachine5_req_rdata_valid; -assign soc_netsoc_sdram_bankmachine6_req_valid = soc_netsoc_sdram_interface_bank6_valid; -assign soc_netsoc_sdram_interface_bank6_ready = soc_netsoc_sdram_bankmachine6_req_ready; -assign soc_netsoc_sdram_bankmachine6_req_we = soc_netsoc_sdram_interface_bank6_we; -assign soc_netsoc_sdram_bankmachine6_req_addr = soc_netsoc_sdram_interface_bank6_addr; -assign soc_netsoc_sdram_interface_bank6_lock = soc_netsoc_sdram_bankmachine6_req_lock; -assign soc_netsoc_sdram_interface_bank6_wdata_ready = soc_netsoc_sdram_bankmachine6_req_wdata_ready; -assign soc_netsoc_sdram_interface_bank6_rdata_valid = soc_netsoc_sdram_bankmachine6_req_rdata_valid; -assign soc_netsoc_sdram_bankmachine7_req_valid = soc_netsoc_sdram_interface_bank7_valid; -assign soc_netsoc_sdram_interface_bank7_ready = soc_netsoc_sdram_bankmachine7_req_ready; -assign soc_netsoc_sdram_bankmachine7_req_we = soc_netsoc_sdram_interface_bank7_we; -assign soc_netsoc_sdram_bankmachine7_req_addr = soc_netsoc_sdram_interface_bank7_addr; -assign soc_netsoc_sdram_interface_bank7_lock = soc_netsoc_sdram_bankmachine7_req_lock; -assign soc_netsoc_sdram_interface_bank7_wdata_ready = soc_netsoc_sdram_bankmachine7_req_wdata_ready; -assign soc_netsoc_sdram_interface_bank7_rdata_valid = soc_netsoc_sdram_bankmachine7_req_rdata_valid; -assign soc_netsoc_sdram_timer_wait = (~soc_netsoc_sdram_timer_done0); -assign soc_netsoc_sdram_postponer_req_i = soc_netsoc_sdram_timer_done0; -assign soc_netsoc_sdram_wants_refresh = soc_netsoc_sdram_postponer_req_o; -assign soc_netsoc_sdram_wants_zqcs = soc_netsoc_sdram_zqcs_timer_done0; -assign soc_netsoc_sdram_zqcs_timer_wait = (~soc_netsoc_sdram_zqcs_executer_done); -assign soc_netsoc_sdram_timer_done1 = (soc_netsoc_sdram_timer_count1 == 1'd0); -assign soc_netsoc_sdram_timer_done0 = soc_netsoc_sdram_timer_done1; -assign soc_netsoc_sdram_timer_count0 = soc_netsoc_sdram_timer_count1; -assign soc_netsoc_sdram_sequencer_start1 = (soc_netsoc_sdram_sequencer_start0 | (soc_netsoc_sdram_sequencer_count != 1'd0)); -assign soc_netsoc_sdram_sequencer_done0 = (soc_netsoc_sdram_sequencer_done1 & (soc_netsoc_sdram_sequencer_count == 1'd0)); -assign soc_netsoc_sdram_zqcs_timer_done1 = (soc_netsoc_sdram_zqcs_timer_count1 == 1'd0); -assign soc_netsoc_sdram_zqcs_timer_done0 = soc_netsoc_sdram_zqcs_timer_done1; -assign soc_netsoc_sdram_zqcs_timer_count0 = soc_netsoc_sdram_zqcs_timer_count1; -always @(*) begin - soc_netsoc_sdram_cmd_valid <= 1'd0; - soc_netsoc_sdram_zqcs_executer_start <= 1'd0; - soc_netsoc_sdram_cmd_last <= 1'd0; - soc_netsoc_sdram_sequencer_start0 <= 1'd0; - vns_refresher_next_state <= 2'd0; - vns_refresher_next_state <= vns_refresher_state; - case (vns_refresher_state) - 1'd1: begin - soc_netsoc_sdram_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_cmd_ready) begin - soc_netsoc_sdram_sequencer_start0 <= 1'd1; - vns_refresher_next_state <= 2'd2; - end - end - 2'd2: begin - soc_netsoc_sdram_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_sequencer_done0) begin - if (soc_netsoc_sdram_wants_zqcs) begin - soc_netsoc_sdram_zqcs_executer_start <= 1'd1; - vns_refresher_next_state <= 2'd3; - end else begin - soc_netsoc_sdram_cmd_valid <= 1'd0; - soc_netsoc_sdram_cmd_last <= 1'd1; - vns_refresher_next_state <= 1'd0; - end - end - end - 2'd3: begin - soc_netsoc_sdram_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_zqcs_executer_done) begin - soc_netsoc_sdram_cmd_valid <= 1'd0; - soc_netsoc_sdram_cmd_last <= 1'd1; - vns_refresher_next_state <= 1'd0; - end - end - default: begin - if (1'd1) begin - if (soc_netsoc_sdram_wants_refresh) begin - vns_refresher_next_state <= 1'd1; - end - end - end - endcase -end -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine0_req_valid; -assign soc_netsoc_sdram_bankmachine0_req_ready = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine0_req_we; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine0_req_addr; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_ready; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_first; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_last; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine0_req_wdata_ready | soc_netsoc_sdram_bankmachine0_req_rdata_valid); -assign soc_netsoc_sdram_bankmachine0_req_lock = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid); -assign soc_netsoc_sdram_bankmachine0_row_hit = (soc_netsoc_sdram_bankmachine0_row == soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]); -assign soc_netsoc_sdram_bankmachine0_cmd_payload_ba = 1'd0; -always @(*) begin - soc_netsoc_sdram_bankmachine0_cmd_payload_a <= 14'd0; - if (soc_netsoc_sdram_bankmachine0_row_col_n_addr_sel) begin - soc_netsoc_sdram_bankmachine0_cmd_payload_a <= soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; - end else begin - soc_netsoc_sdram_bankmachine0_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine0_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign soc_netsoc_sdram_bankmachine0_twtpcon_valid = ((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_ready) & soc_netsoc_sdram_bankmachine0_cmd_payload_is_write); -assign soc_netsoc_sdram_bankmachine0_trccon_valid = ((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_ready) & soc_netsoc_sdram_bankmachine0_row_open); -assign soc_netsoc_sdram_bankmachine0_trascon_valid = ((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_ready) & soc_netsoc_sdram_bankmachine0_row_open); -always @(*) begin - soc_netsoc_sdram_bankmachine0_auto_precharge <= 1'd0; - if ((soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid)) begin - if ((soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7])) begin - soc_netsoc_sdram_bankmachine0_auto_precharge <= (soc_netsoc_sdram_bankmachine0_row_close == 1'd0); - end - end -end -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din = {soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_first; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_last; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; -always @(*) begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace) begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce - 1'd1); - end else begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce; - end -end -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable | soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace)); -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable & soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re); -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout = soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level != 4'd8); -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable = (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level != 1'd0); -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine0_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n)); -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n); -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine0_cmd_buffer_first_n; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine0_cmd_buffer_last_n; -always @(*) begin - soc_netsoc_sdram_bankmachine0_req_wdata_ready <= 1'd0; - soc_netsoc_sdram_bankmachine0_row_open <= 1'd0; - soc_netsoc_sdram_bankmachine0_req_rdata_valid <= 1'd0; - soc_netsoc_sdram_bankmachine0_row_col_n_addr_sel <= 1'd0; - soc_netsoc_sdram_bankmachine0_refresh_gnt <= 1'd0; - soc_netsoc_sdram_bankmachine0_cmd_valid <= 1'd0; - soc_netsoc_sdram_bankmachine0_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_bankmachine0_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_bankmachine0_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd0; - vns_bankmachine0_next_state <= 3'd0; - soc_netsoc_sdram_bankmachine0_cmd_payload_is_read <= 1'd0; - soc_netsoc_sdram_bankmachine0_row_close <= 1'd0; - soc_netsoc_sdram_bankmachine0_cmd_payload_is_write <= 1'd0; - vns_bankmachine0_next_state <= vns_bankmachine0_state; - case (vns_bankmachine0_state) - 1'd1: begin - if ((soc_netsoc_sdram_bankmachine0_twtpcon_ready & soc_netsoc_sdram_bankmachine0_trascon_ready)) begin - soc_netsoc_sdram_bankmachine0_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine0_cmd_ready) begin - vns_bankmachine0_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine0_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_bankmachine0_cmd_payload_we <= 1'd1; - soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; - end - soc_netsoc_sdram_bankmachine0_row_close <= 1'd1; - end - 2'd2: begin - if ((soc_netsoc_sdram_bankmachine0_twtpcon_ready & soc_netsoc_sdram_bankmachine0_trascon_ready)) begin - vns_bankmachine0_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine0_row_close <= 1'd1; - end - 2'd3: begin - if (soc_netsoc_sdram_bankmachine0_trccon_ready) begin - soc_netsoc_sdram_bankmachine0_row_col_n_addr_sel <= 1'd1; - soc_netsoc_sdram_bankmachine0_row_open <= 1'd1; - soc_netsoc_sdram_bankmachine0_cmd_valid <= 1'd1; - soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; - if (soc_netsoc_sdram_bankmachine0_cmd_ready) begin - vns_bankmachine0_next_state <= 3'd6; - end - soc_netsoc_sdram_bankmachine0_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (soc_netsoc_sdram_bankmachine0_twtpcon_ready) begin - soc_netsoc_sdram_bankmachine0_refresh_gnt <= 1'd1; - end - soc_netsoc_sdram_bankmachine0_row_close <= 1'd1; - soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; - if ((~soc_netsoc_sdram_bankmachine0_refresh_req)) begin - vns_bankmachine0_next_state <= 1'd0; - end - end - 3'd5: begin - vns_bankmachine0_next_state <= 2'd3; - end - 3'd6: begin - vns_bankmachine0_next_state <= 1'd0; - end - default: begin - if (soc_netsoc_sdram_bankmachine0_refresh_req) begin - vns_bankmachine0_next_state <= 3'd4; - end else begin - if (soc_netsoc_sdram_bankmachine0_cmd_buffer_source_valid) begin - if (soc_netsoc_sdram_bankmachine0_row_opened) begin - if (soc_netsoc_sdram_bankmachine0_row_hit) begin - soc_netsoc_sdram_bankmachine0_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_we) begin - soc_netsoc_sdram_bankmachine0_req_wdata_ready <= soc_netsoc_sdram_bankmachine0_cmd_ready; - soc_netsoc_sdram_bankmachine0_cmd_payload_is_write <= 1'd1; - soc_netsoc_sdram_bankmachine0_cmd_payload_we <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine0_req_rdata_valid <= soc_netsoc_sdram_bankmachine0_cmd_ready; - soc_netsoc_sdram_bankmachine0_cmd_payload_is_read <= 1'd1; - end - soc_netsoc_sdram_bankmachine0_cmd_payload_cas <= 1'd1; - if ((soc_netsoc_sdram_bankmachine0_cmd_ready & soc_netsoc_sdram_bankmachine0_auto_precharge)) begin - vns_bankmachine0_next_state <= 2'd2; - end - end else begin - vns_bankmachine0_next_state <= 1'd1; - end - end else begin - vns_bankmachine0_next_state <= 2'd3; - end - end - end - end - endcase -end -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine1_req_valid; -assign soc_netsoc_sdram_bankmachine1_req_ready = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine1_req_we; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine1_req_addr; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_ready; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_first; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_last; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine1_req_wdata_ready | soc_netsoc_sdram_bankmachine1_req_rdata_valid); -assign soc_netsoc_sdram_bankmachine1_req_lock = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid); -assign soc_netsoc_sdram_bankmachine1_row_hit = (soc_netsoc_sdram_bankmachine1_row == soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]); -assign soc_netsoc_sdram_bankmachine1_cmd_payload_ba = 1'd1; -always @(*) begin - soc_netsoc_sdram_bankmachine1_cmd_payload_a <= 14'd0; - if (soc_netsoc_sdram_bankmachine1_row_col_n_addr_sel) begin - soc_netsoc_sdram_bankmachine1_cmd_payload_a <= soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; - end else begin - soc_netsoc_sdram_bankmachine1_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine1_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign soc_netsoc_sdram_bankmachine1_twtpcon_valid = ((soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_ready) & soc_netsoc_sdram_bankmachine1_cmd_payload_is_write); -assign soc_netsoc_sdram_bankmachine1_trccon_valid = ((soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_ready) & soc_netsoc_sdram_bankmachine1_row_open); -assign soc_netsoc_sdram_bankmachine1_trascon_valid = ((soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_ready) & soc_netsoc_sdram_bankmachine1_row_open); -always @(*) begin - soc_netsoc_sdram_bankmachine1_auto_precharge <= 1'd0; - if ((soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid)) begin - if ((soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7])) begin - soc_netsoc_sdram_bankmachine1_auto_precharge <= (soc_netsoc_sdram_bankmachine1_row_close == 1'd0); - end - end -end -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din = {soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_first; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_last; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; -always @(*) begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace) begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce - 1'd1); - end else begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce; - end -end -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable | soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace)); -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable & soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re); -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout = soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level != 4'd8); -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable = (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level != 1'd0); -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine1_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n)); -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n); -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine1_cmd_buffer_first_n; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine1_cmd_buffer_last_n; -always @(*) begin - soc_netsoc_sdram_bankmachine1_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_bankmachine1_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_bankmachine1_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd0; - soc_netsoc_sdram_bankmachine1_row_open <= 1'd0; - soc_netsoc_sdram_bankmachine1_cmd_payload_is_read <= 1'd0; - soc_netsoc_sdram_bankmachine1_row_close <= 1'd0; - soc_netsoc_sdram_bankmachine1_cmd_payload_is_write <= 1'd0; - soc_netsoc_sdram_bankmachine1_req_wdata_ready <= 1'd0; - soc_netsoc_sdram_bankmachine1_req_rdata_valid <= 1'd0; - soc_netsoc_sdram_bankmachine1_row_col_n_addr_sel <= 1'd0; - soc_netsoc_sdram_bankmachine1_refresh_gnt <= 1'd0; - soc_netsoc_sdram_bankmachine1_cmd_valid <= 1'd0; - vns_bankmachine1_next_state <= 3'd0; - vns_bankmachine1_next_state <= vns_bankmachine1_state; - case (vns_bankmachine1_state) - 1'd1: begin - if ((soc_netsoc_sdram_bankmachine1_twtpcon_ready & soc_netsoc_sdram_bankmachine1_trascon_ready)) begin - soc_netsoc_sdram_bankmachine1_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine1_cmd_ready) begin - vns_bankmachine1_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine1_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_bankmachine1_cmd_payload_we <= 1'd1; - soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; - end - soc_netsoc_sdram_bankmachine1_row_close <= 1'd1; - end - 2'd2: begin - if ((soc_netsoc_sdram_bankmachine1_twtpcon_ready & soc_netsoc_sdram_bankmachine1_trascon_ready)) begin - vns_bankmachine1_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine1_row_close <= 1'd1; - end - 2'd3: begin - if (soc_netsoc_sdram_bankmachine1_trccon_ready) begin - soc_netsoc_sdram_bankmachine1_row_col_n_addr_sel <= 1'd1; - soc_netsoc_sdram_bankmachine1_row_open <= 1'd1; - soc_netsoc_sdram_bankmachine1_cmd_valid <= 1'd1; - soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; - if (soc_netsoc_sdram_bankmachine1_cmd_ready) begin - vns_bankmachine1_next_state <= 3'd6; - end - soc_netsoc_sdram_bankmachine1_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (soc_netsoc_sdram_bankmachine1_twtpcon_ready) begin - soc_netsoc_sdram_bankmachine1_refresh_gnt <= 1'd1; - end - soc_netsoc_sdram_bankmachine1_row_close <= 1'd1; - soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; - if ((~soc_netsoc_sdram_bankmachine1_refresh_req)) begin - vns_bankmachine1_next_state <= 1'd0; - end - end - 3'd5: begin - vns_bankmachine1_next_state <= 2'd3; - end - 3'd6: begin - vns_bankmachine1_next_state <= 1'd0; - end - default: begin - if (soc_netsoc_sdram_bankmachine1_refresh_req) begin - vns_bankmachine1_next_state <= 3'd4; - end else begin - if (soc_netsoc_sdram_bankmachine1_cmd_buffer_source_valid) begin - if (soc_netsoc_sdram_bankmachine1_row_opened) begin - if (soc_netsoc_sdram_bankmachine1_row_hit) begin - soc_netsoc_sdram_bankmachine1_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_we) begin - soc_netsoc_sdram_bankmachine1_req_wdata_ready <= soc_netsoc_sdram_bankmachine1_cmd_ready; - soc_netsoc_sdram_bankmachine1_cmd_payload_is_write <= 1'd1; - soc_netsoc_sdram_bankmachine1_cmd_payload_we <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine1_req_rdata_valid <= soc_netsoc_sdram_bankmachine1_cmd_ready; - soc_netsoc_sdram_bankmachine1_cmd_payload_is_read <= 1'd1; - end - soc_netsoc_sdram_bankmachine1_cmd_payload_cas <= 1'd1; - if ((soc_netsoc_sdram_bankmachine1_cmd_ready & soc_netsoc_sdram_bankmachine1_auto_precharge)) begin - vns_bankmachine1_next_state <= 2'd2; - end - end else begin - vns_bankmachine1_next_state <= 1'd1; - end - end else begin - vns_bankmachine1_next_state <= 2'd3; - end - end - end - end - endcase -end -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine2_req_valid; -assign soc_netsoc_sdram_bankmachine2_req_ready = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine2_req_we; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine2_req_addr; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_ready; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_first; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_last; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine2_req_wdata_ready | soc_netsoc_sdram_bankmachine2_req_rdata_valid); -assign soc_netsoc_sdram_bankmachine2_req_lock = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid); -assign soc_netsoc_sdram_bankmachine2_row_hit = (soc_netsoc_sdram_bankmachine2_row == soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]); -assign soc_netsoc_sdram_bankmachine2_cmd_payload_ba = 2'd2; -always @(*) begin - soc_netsoc_sdram_bankmachine2_cmd_payload_a <= 14'd0; - if (soc_netsoc_sdram_bankmachine2_row_col_n_addr_sel) begin - soc_netsoc_sdram_bankmachine2_cmd_payload_a <= soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; - end else begin - soc_netsoc_sdram_bankmachine2_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine2_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign soc_netsoc_sdram_bankmachine2_twtpcon_valid = ((soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_ready) & soc_netsoc_sdram_bankmachine2_cmd_payload_is_write); -assign soc_netsoc_sdram_bankmachine2_trccon_valid = ((soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_ready) & soc_netsoc_sdram_bankmachine2_row_open); -assign soc_netsoc_sdram_bankmachine2_trascon_valid = ((soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_ready) & soc_netsoc_sdram_bankmachine2_row_open); -always @(*) begin - soc_netsoc_sdram_bankmachine2_auto_precharge <= 1'd0; - if ((soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid)) begin - if ((soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7])) begin - soc_netsoc_sdram_bankmachine2_auto_precharge <= (soc_netsoc_sdram_bankmachine2_row_close == 1'd0); - end - end -end -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din = {soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_first; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_last; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; -always @(*) begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace) begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce - 1'd1); - end else begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce; - end -end -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable | soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace)); -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable & soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re); -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout = soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level != 4'd8); -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable = (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level != 1'd0); -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine2_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n)); -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n); -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine2_cmd_buffer_first_n; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine2_cmd_buffer_last_n; -always @(*) begin - soc_netsoc_sdram_bankmachine2_cmd_valid <= 1'd0; - soc_netsoc_sdram_bankmachine2_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_bankmachine2_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_bankmachine2_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd0; - vns_bankmachine2_next_state <= 3'd0; - soc_netsoc_sdram_bankmachine2_cmd_payload_is_read <= 1'd0; - soc_netsoc_sdram_bankmachine2_row_close <= 1'd0; - soc_netsoc_sdram_bankmachine2_cmd_payload_is_write <= 1'd0; - soc_netsoc_sdram_bankmachine2_row_open <= 1'd0; - soc_netsoc_sdram_bankmachine2_req_wdata_ready <= 1'd0; - soc_netsoc_sdram_bankmachine2_req_rdata_valid <= 1'd0; - soc_netsoc_sdram_bankmachine2_row_col_n_addr_sel <= 1'd0; - soc_netsoc_sdram_bankmachine2_refresh_gnt <= 1'd0; - vns_bankmachine2_next_state <= vns_bankmachine2_state; - case (vns_bankmachine2_state) - 1'd1: begin - if ((soc_netsoc_sdram_bankmachine2_twtpcon_ready & soc_netsoc_sdram_bankmachine2_trascon_ready)) begin - soc_netsoc_sdram_bankmachine2_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine2_cmd_ready) begin - vns_bankmachine2_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine2_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_bankmachine2_cmd_payload_we <= 1'd1; - soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; - end - soc_netsoc_sdram_bankmachine2_row_close <= 1'd1; - end - 2'd2: begin - if ((soc_netsoc_sdram_bankmachine2_twtpcon_ready & soc_netsoc_sdram_bankmachine2_trascon_ready)) begin - vns_bankmachine2_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine2_row_close <= 1'd1; - end - 2'd3: begin - if (soc_netsoc_sdram_bankmachine2_trccon_ready) begin - soc_netsoc_sdram_bankmachine2_row_col_n_addr_sel <= 1'd1; - soc_netsoc_sdram_bankmachine2_row_open <= 1'd1; - soc_netsoc_sdram_bankmachine2_cmd_valid <= 1'd1; - soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; - if (soc_netsoc_sdram_bankmachine2_cmd_ready) begin - vns_bankmachine2_next_state <= 3'd6; - end - soc_netsoc_sdram_bankmachine2_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (soc_netsoc_sdram_bankmachine2_twtpcon_ready) begin - soc_netsoc_sdram_bankmachine2_refresh_gnt <= 1'd1; - end - soc_netsoc_sdram_bankmachine2_row_close <= 1'd1; - soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; - if ((~soc_netsoc_sdram_bankmachine2_refresh_req)) begin - vns_bankmachine2_next_state <= 1'd0; - end - end - 3'd5: begin - vns_bankmachine2_next_state <= 2'd3; - end - 3'd6: begin - vns_bankmachine2_next_state <= 1'd0; - end - default: begin - if (soc_netsoc_sdram_bankmachine2_refresh_req) begin - vns_bankmachine2_next_state <= 3'd4; - end else begin - if (soc_netsoc_sdram_bankmachine2_cmd_buffer_source_valid) begin - if (soc_netsoc_sdram_bankmachine2_row_opened) begin - if (soc_netsoc_sdram_bankmachine2_row_hit) begin - soc_netsoc_sdram_bankmachine2_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_we) begin - soc_netsoc_sdram_bankmachine2_req_wdata_ready <= soc_netsoc_sdram_bankmachine2_cmd_ready; - soc_netsoc_sdram_bankmachine2_cmd_payload_is_write <= 1'd1; - soc_netsoc_sdram_bankmachine2_cmd_payload_we <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine2_req_rdata_valid <= soc_netsoc_sdram_bankmachine2_cmd_ready; - soc_netsoc_sdram_bankmachine2_cmd_payload_is_read <= 1'd1; - end - soc_netsoc_sdram_bankmachine2_cmd_payload_cas <= 1'd1; - if ((soc_netsoc_sdram_bankmachine2_cmd_ready & soc_netsoc_sdram_bankmachine2_auto_precharge)) begin - vns_bankmachine2_next_state <= 2'd2; - end - end else begin - vns_bankmachine2_next_state <= 1'd1; - end - end else begin - vns_bankmachine2_next_state <= 2'd3; - end - end - end - end - endcase -end -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine3_req_valid; -assign soc_netsoc_sdram_bankmachine3_req_ready = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine3_req_we; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine3_req_addr; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_ready; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_first; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_last; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine3_req_wdata_ready | soc_netsoc_sdram_bankmachine3_req_rdata_valid); -assign soc_netsoc_sdram_bankmachine3_req_lock = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid); -assign soc_netsoc_sdram_bankmachine3_row_hit = (soc_netsoc_sdram_bankmachine3_row == soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]); -assign soc_netsoc_sdram_bankmachine3_cmd_payload_ba = 2'd3; -always @(*) begin - soc_netsoc_sdram_bankmachine3_cmd_payload_a <= 14'd0; - if (soc_netsoc_sdram_bankmachine3_row_col_n_addr_sel) begin - soc_netsoc_sdram_bankmachine3_cmd_payload_a <= soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; - end else begin - soc_netsoc_sdram_bankmachine3_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine3_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign soc_netsoc_sdram_bankmachine3_twtpcon_valid = ((soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_ready) & soc_netsoc_sdram_bankmachine3_cmd_payload_is_write); -assign soc_netsoc_sdram_bankmachine3_trccon_valid = ((soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_ready) & soc_netsoc_sdram_bankmachine3_row_open); -assign soc_netsoc_sdram_bankmachine3_trascon_valid = ((soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_ready) & soc_netsoc_sdram_bankmachine3_row_open); -always @(*) begin - soc_netsoc_sdram_bankmachine3_auto_precharge <= 1'd0; - if ((soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid)) begin - if ((soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7])) begin - soc_netsoc_sdram_bankmachine3_auto_precharge <= (soc_netsoc_sdram_bankmachine3_row_close == 1'd0); - end - end -end -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din = {soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_first; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_last; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; -always @(*) begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace) begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce - 1'd1); - end else begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce; - end -end -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable | soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace)); -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable & soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re); -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout = soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level != 4'd8); -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable = (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level != 1'd0); -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine3_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n)); -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n); -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine3_cmd_buffer_first_n; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine3_cmd_buffer_last_n; -always @(*) begin - soc_netsoc_sdram_bankmachine3_row_open <= 1'd0; - soc_netsoc_sdram_bankmachine3_cmd_payload_is_read <= 1'd0; - soc_netsoc_sdram_bankmachine3_row_close <= 1'd0; - soc_netsoc_sdram_bankmachine3_cmd_payload_is_write <= 1'd0; - soc_netsoc_sdram_bankmachine3_req_wdata_ready <= 1'd0; - soc_netsoc_sdram_bankmachine3_req_rdata_valid <= 1'd0; - soc_netsoc_sdram_bankmachine3_row_col_n_addr_sel <= 1'd0; - soc_netsoc_sdram_bankmachine3_refresh_gnt <= 1'd0; - soc_netsoc_sdram_bankmachine3_cmd_valid <= 1'd0; - vns_bankmachine3_next_state <= 3'd0; - soc_netsoc_sdram_bankmachine3_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_bankmachine3_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_bankmachine3_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd0; - vns_bankmachine3_next_state <= vns_bankmachine3_state; - case (vns_bankmachine3_state) - 1'd1: begin - if ((soc_netsoc_sdram_bankmachine3_twtpcon_ready & soc_netsoc_sdram_bankmachine3_trascon_ready)) begin - soc_netsoc_sdram_bankmachine3_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine3_cmd_ready) begin - vns_bankmachine3_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine3_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_bankmachine3_cmd_payload_we <= 1'd1; - soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; - end - soc_netsoc_sdram_bankmachine3_row_close <= 1'd1; - end - 2'd2: begin - if ((soc_netsoc_sdram_bankmachine3_twtpcon_ready & soc_netsoc_sdram_bankmachine3_trascon_ready)) begin - vns_bankmachine3_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine3_row_close <= 1'd1; - end - 2'd3: begin - if (soc_netsoc_sdram_bankmachine3_trccon_ready) begin - soc_netsoc_sdram_bankmachine3_row_col_n_addr_sel <= 1'd1; - soc_netsoc_sdram_bankmachine3_row_open <= 1'd1; - soc_netsoc_sdram_bankmachine3_cmd_valid <= 1'd1; - soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; - if (soc_netsoc_sdram_bankmachine3_cmd_ready) begin - vns_bankmachine3_next_state <= 3'd6; - end - soc_netsoc_sdram_bankmachine3_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (soc_netsoc_sdram_bankmachine3_twtpcon_ready) begin - soc_netsoc_sdram_bankmachine3_refresh_gnt <= 1'd1; - end - soc_netsoc_sdram_bankmachine3_row_close <= 1'd1; - soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; - if ((~soc_netsoc_sdram_bankmachine3_refresh_req)) begin - vns_bankmachine3_next_state <= 1'd0; - end - end - 3'd5: begin - vns_bankmachine3_next_state <= 2'd3; - end - 3'd6: begin - vns_bankmachine3_next_state <= 1'd0; - end - default: begin - if (soc_netsoc_sdram_bankmachine3_refresh_req) begin - vns_bankmachine3_next_state <= 3'd4; - end else begin - if (soc_netsoc_sdram_bankmachine3_cmd_buffer_source_valid) begin - if (soc_netsoc_sdram_bankmachine3_row_opened) begin - if (soc_netsoc_sdram_bankmachine3_row_hit) begin - soc_netsoc_sdram_bankmachine3_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_we) begin - soc_netsoc_sdram_bankmachine3_req_wdata_ready <= soc_netsoc_sdram_bankmachine3_cmd_ready; - soc_netsoc_sdram_bankmachine3_cmd_payload_is_write <= 1'd1; - soc_netsoc_sdram_bankmachine3_cmd_payload_we <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine3_req_rdata_valid <= soc_netsoc_sdram_bankmachine3_cmd_ready; - soc_netsoc_sdram_bankmachine3_cmd_payload_is_read <= 1'd1; - end - soc_netsoc_sdram_bankmachine3_cmd_payload_cas <= 1'd1; - if ((soc_netsoc_sdram_bankmachine3_cmd_ready & soc_netsoc_sdram_bankmachine3_auto_precharge)) begin - vns_bankmachine3_next_state <= 2'd2; - end - end else begin - vns_bankmachine3_next_state <= 1'd1; - end - end else begin - vns_bankmachine3_next_state <= 2'd3; - end - end - end - end - endcase -end -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine4_req_valid; -assign soc_netsoc_sdram_bankmachine4_req_ready = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine4_req_we; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine4_req_addr; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_ready; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_first; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_last; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine4_req_wdata_ready | soc_netsoc_sdram_bankmachine4_req_rdata_valid); -assign soc_netsoc_sdram_bankmachine4_req_lock = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid); -assign soc_netsoc_sdram_bankmachine4_row_hit = (soc_netsoc_sdram_bankmachine4_row == soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]); -assign soc_netsoc_sdram_bankmachine4_cmd_payload_ba = 3'd4; -always @(*) begin - soc_netsoc_sdram_bankmachine4_cmd_payload_a <= 14'd0; - if (soc_netsoc_sdram_bankmachine4_row_col_n_addr_sel) begin - soc_netsoc_sdram_bankmachine4_cmd_payload_a <= soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; - end else begin - soc_netsoc_sdram_bankmachine4_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine4_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign soc_netsoc_sdram_bankmachine4_twtpcon_valid = ((soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_ready) & soc_netsoc_sdram_bankmachine4_cmd_payload_is_write); -assign soc_netsoc_sdram_bankmachine4_trccon_valid = ((soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_ready) & soc_netsoc_sdram_bankmachine4_row_open); -assign soc_netsoc_sdram_bankmachine4_trascon_valid = ((soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_ready) & soc_netsoc_sdram_bankmachine4_row_open); -always @(*) begin - soc_netsoc_sdram_bankmachine4_auto_precharge <= 1'd0; - if ((soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid)) begin - if ((soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7])) begin - soc_netsoc_sdram_bankmachine4_auto_precharge <= (soc_netsoc_sdram_bankmachine4_row_close == 1'd0); - end - end -end -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din = {soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_first; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_last; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; -always @(*) begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace) begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce - 1'd1); - end else begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce; - end -end -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable | soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace)); -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable & soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re); -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout = soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level != 4'd8); -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable = (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level != 1'd0); -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine4_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n)); -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n); -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine4_cmd_buffer_first_n; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine4_cmd_buffer_last_n; -always @(*) begin - soc_netsoc_sdram_bankmachine4_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_bankmachine4_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_bankmachine4_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd0; - vns_bankmachine4_next_state <= 3'd0; - soc_netsoc_sdram_bankmachine4_cmd_payload_is_read <= 1'd0; - soc_netsoc_sdram_bankmachine4_row_close <= 1'd0; - soc_netsoc_sdram_bankmachine4_cmd_payload_is_write <= 1'd0; - soc_netsoc_sdram_bankmachine4_row_open <= 1'd0; - soc_netsoc_sdram_bankmachine4_req_wdata_ready <= 1'd0; - soc_netsoc_sdram_bankmachine4_req_rdata_valid <= 1'd0; - soc_netsoc_sdram_bankmachine4_row_col_n_addr_sel <= 1'd0; - soc_netsoc_sdram_bankmachine4_refresh_gnt <= 1'd0; - soc_netsoc_sdram_bankmachine4_cmd_valid <= 1'd0; - vns_bankmachine4_next_state <= vns_bankmachine4_state; - case (vns_bankmachine4_state) - 1'd1: begin - if ((soc_netsoc_sdram_bankmachine4_twtpcon_ready & soc_netsoc_sdram_bankmachine4_trascon_ready)) begin - soc_netsoc_sdram_bankmachine4_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine4_cmd_ready) begin - vns_bankmachine4_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine4_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_bankmachine4_cmd_payload_we <= 1'd1; - soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; - end - soc_netsoc_sdram_bankmachine4_row_close <= 1'd1; - end - 2'd2: begin - if ((soc_netsoc_sdram_bankmachine4_twtpcon_ready & soc_netsoc_sdram_bankmachine4_trascon_ready)) begin - vns_bankmachine4_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine4_row_close <= 1'd1; - end - 2'd3: begin - if (soc_netsoc_sdram_bankmachine4_trccon_ready) begin - soc_netsoc_sdram_bankmachine4_row_col_n_addr_sel <= 1'd1; - soc_netsoc_sdram_bankmachine4_row_open <= 1'd1; - soc_netsoc_sdram_bankmachine4_cmd_valid <= 1'd1; - soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; - if (soc_netsoc_sdram_bankmachine4_cmd_ready) begin - vns_bankmachine4_next_state <= 3'd6; - end - soc_netsoc_sdram_bankmachine4_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (soc_netsoc_sdram_bankmachine4_twtpcon_ready) begin - soc_netsoc_sdram_bankmachine4_refresh_gnt <= 1'd1; - end - soc_netsoc_sdram_bankmachine4_row_close <= 1'd1; - soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; - if ((~soc_netsoc_sdram_bankmachine4_refresh_req)) begin - vns_bankmachine4_next_state <= 1'd0; - end - end - 3'd5: begin - vns_bankmachine4_next_state <= 2'd3; - end - 3'd6: begin - vns_bankmachine4_next_state <= 1'd0; - end - default: begin - if (soc_netsoc_sdram_bankmachine4_refresh_req) begin - vns_bankmachine4_next_state <= 3'd4; - end else begin - if (soc_netsoc_sdram_bankmachine4_cmd_buffer_source_valid) begin - if (soc_netsoc_sdram_bankmachine4_row_opened) begin - if (soc_netsoc_sdram_bankmachine4_row_hit) begin - soc_netsoc_sdram_bankmachine4_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_we) begin - soc_netsoc_sdram_bankmachine4_req_wdata_ready <= soc_netsoc_sdram_bankmachine4_cmd_ready; - soc_netsoc_sdram_bankmachine4_cmd_payload_is_write <= 1'd1; - soc_netsoc_sdram_bankmachine4_cmd_payload_we <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine4_req_rdata_valid <= soc_netsoc_sdram_bankmachine4_cmd_ready; - soc_netsoc_sdram_bankmachine4_cmd_payload_is_read <= 1'd1; - end - soc_netsoc_sdram_bankmachine4_cmd_payload_cas <= 1'd1; - if ((soc_netsoc_sdram_bankmachine4_cmd_ready & soc_netsoc_sdram_bankmachine4_auto_precharge)) begin - vns_bankmachine4_next_state <= 2'd2; - end - end else begin - vns_bankmachine4_next_state <= 1'd1; - end - end else begin - vns_bankmachine4_next_state <= 2'd3; - end - end - end - end - endcase -end -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine5_req_valid; -assign soc_netsoc_sdram_bankmachine5_req_ready = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine5_req_we; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine5_req_addr; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_ready; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_first; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_last; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine5_req_wdata_ready | soc_netsoc_sdram_bankmachine5_req_rdata_valid); -assign soc_netsoc_sdram_bankmachine5_req_lock = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid); -assign soc_netsoc_sdram_bankmachine5_row_hit = (soc_netsoc_sdram_bankmachine5_row == soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]); -assign soc_netsoc_sdram_bankmachine5_cmd_payload_ba = 3'd5; -always @(*) begin - soc_netsoc_sdram_bankmachine5_cmd_payload_a <= 14'd0; - if (soc_netsoc_sdram_bankmachine5_row_col_n_addr_sel) begin - soc_netsoc_sdram_bankmachine5_cmd_payload_a <= soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; - end else begin - soc_netsoc_sdram_bankmachine5_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine5_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign soc_netsoc_sdram_bankmachine5_twtpcon_valid = ((soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_ready) & soc_netsoc_sdram_bankmachine5_cmd_payload_is_write); -assign soc_netsoc_sdram_bankmachine5_trccon_valid = ((soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_ready) & soc_netsoc_sdram_bankmachine5_row_open); -assign soc_netsoc_sdram_bankmachine5_trascon_valid = ((soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_ready) & soc_netsoc_sdram_bankmachine5_row_open); -always @(*) begin - soc_netsoc_sdram_bankmachine5_auto_precharge <= 1'd0; - if ((soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid)) begin - if ((soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7])) begin - soc_netsoc_sdram_bankmachine5_auto_precharge <= (soc_netsoc_sdram_bankmachine5_row_close == 1'd0); - end - end -end -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din = {soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_first; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_last; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; -always @(*) begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace) begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce - 1'd1); - end else begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce; - end -end -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable | soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace)); -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable & soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re); -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout = soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level != 4'd8); -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable = (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level != 1'd0); -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine5_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n)); -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n); -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine5_cmd_buffer_first_n; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine5_cmd_buffer_last_n; -always @(*) begin - soc_netsoc_sdram_bankmachine5_row_col_n_addr_sel <= 1'd0; - soc_netsoc_sdram_bankmachine5_refresh_gnt <= 1'd0; - soc_netsoc_sdram_bankmachine5_cmd_valid <= 1'd0; - vns_bankmachine5_next_state <= 3'd0; - soc_netsoc_sdram_bankmachine5_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_bankmachine5_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_bankmachine5_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd0; - soc_netsoc_sdram_bankmachine5_row_open <= 1'd0; - soc_netsoc_sdram_bankmachine5_cmd_payload_is_read <= 1'd0; - soc_netsoc_sdram_bankmachine5_row_close <= 1'd0; - soc_netsoc_sdram_bankmachine5_cmd_payload_is_write <= 1'd0; - soc_netsoc_sdram_bankmachine5_req_wdata_ready <= 1'd0; - soc_netsoc_sdram_bankmachine5_req_rdata_valid <= 1'd0; - vns_bankmachine5_next_state <= vns_bankmachine5_state; - case (vns_bankmachine5_state) - 1'd1: begin - if ((soc_netsoc_sdram_bankmachine5_twtpcon_ready & soc_netsoc_sdram_bankmachine5_trascon_ready)) begin - soc_netsoc_sdram_bankmachine5_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine5_cmd_ready) begin - vns_bankmachine5_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine5_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_bankmachine5_cmd_payload_we <= 1'd1; - soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; - end - soc_netsoc_sdram_bankmachine5_row_close <= 1'd1; - end - 2'd2: begin - if ((soc_netsoc_sdram_bankmachine5_twtpcon_ready & soc_netsoc_sdram_bankmachine5_trascon_ready)) begin - vns_bankmachine5_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine5_row_close <= 1'd1; - end - 2'd3: begin - if (soc_netsoc_sdram_bankmachine5_trccon_ready) begin - soc_netsoc_sdram_bankmachine5_row_col_n_addr_sel <= 1'd1; - soc_netsoc_sdram_bankmachine5_row_open <= 1'd1; - soc_netsoc_sdram_bankmachine5_cmd_valid <= 1'd1; - soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; - if (soc_netsoc_sdram_bankmachine5_cmd_ready) begin - vns_bankmachine5_next_state <= 3'd6; - end - soc_netsoc_sdram_bankmachine5_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (soc_netsoc_sdram_bankmachine5_twtpcon_ready) begin - soc_netsoc_sdram_bankmachine5_refresh_gnt <= 1'd1; - end - soc_netsoc_sdram_bankmachine5_row_close <= 1'd1; - soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; - if ((~soc_netsoc_sdram_bankmachine5_refresh_req)) begin - vns_bankmachine5_next_state <= 1'd0; - end - end - 3'd5: begin - vns_bankmachine5_next_state <= 2'd3; - end - 3'd6: begin - vns_bankmachine5_next_state <= 1'd0; - end - default: begin - if (soc_netsoc_sdram_bankmachine5_refresh_req) begin - vns_bankmachine5_next_state <= 3'd4; - end else begin - if (soc_netsoc_sdram_bankmachine5_cmd_buffer_source_valid) begin - if (soc_netsoc_sdram_bankmachine5_row_opened) begin - if (soc_netsoc_sdram_bankmachine5_row_hit) begin - soc_netsoc_sdram_bankmachine5_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_we) begin - soc_netsoc_sdram_bankmachine5_req_wdata_ready <= soc_netsoc_sdram_bankmachine5_cmd_ready; - soc_netsoc_sdram_bankmachine5_cmd_payload_is_write <= 1'd1; - soc_netsoc_sdram_bankmachine5_cmd_payload_we <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine5_req_rdata_valid <= soc_netsoc_sdram_bankmachine5_cmd_ready; - soc_netsoc_sdram_bankmachine5_cmd_payload_is_read <= 1'd1; - end - soc_netsoc_sdram_bankmachine5_cmd_payload_cas <= 1'd1; - if ((soc_netsoc_sdram_bankmachine5_cmd_ready & soc_netsoc_sdram_bankmachine5_auto_precharge)) begin - vns_bankmachine5_next_state <= 2'd2; - end - end else begin - vns_bankmachine5_next_state <= 1'd1; - end - end else begin - vns_bankmachine5_next_state <= 2'd3; - end - end - end - end - endcase -end -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine6_req_valid; -assign soc_netsoc_sdram_bankmachine6_req_ready = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine6_req_we; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine6_req_addr; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_ready; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_first; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_last; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine6_req_wdata_ready | soc_netsoc_sdram_bankmachine6_req_rdata_valid); -assign soc_netsoc_sdram_bankmachine6_req_lock = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid); -assign soc_netsoc_sdram_bankmachine6_row_hit = (soc_netsoc_sdram_bankmachine6_row == soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]); -assign soc_netsoc_sdram_bankmachine6_cmd_payload_ba = 3'd6; -always @(*) begin - soc_netsoc_sdram_bankmachine6_cmd_payload_a <= 14'd0; - if (soc_netsoc_sdram_bankmachine6_row_col_n_addr_sel) begin - soc_netsoc_sdram_bankmachine6_cmd_payload_a <= soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; - end else begin - soc_netsoc_sdram_bankmachine6_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine6_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign soc_netsoc_sdram_bankmachine6_twtpcon_valid = ((soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_ready) & soc_netsoc_sdram_bankmachine6_cmd_payload_is_write); -assign soc_netsoc_sdram_bankmachine6_trccon_valid = ((soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_ready) & soc_netsoc_sdram_bankmachine6_row_open); -assign soc_netsoc_sdram_bankmachine6_trascon_valid = ((soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_ready) & soc_netsoc_sdram_bankmachine6_row_open); -always @(*) begin - soc_netsoc_sdram_bankmachine6_auto_precharge <= 1'd0; - if ((soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid)) begin - if ((soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7])) begin - soc_netsoc_sdram_bankmachine6_auto_precharge <= (soc_netsoc_sdram_bankmachine6_row_close == 1'd0); - end - end -end -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din = {soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_first; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_last; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; -always @(*) begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace) begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce - 1'd1); - end else begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce; - end -end -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable | soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace)); -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable & soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re); -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout = soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level != 4'd8); -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable = (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level != 1'd0); -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine6_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n)); -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n); -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine6_cmd_buffer_first_n; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine6_cmd_buffer_last_n; -always @(*) begin - soc_netsoc_sdram_bankmachine6_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd0; - vns_bankmachine6_next_state <= 3'd0; - soc_netsoc_sdram_bankmachine6_cmd_payload_is_read <= 1'd0; - soc_netsoc_sdram_bankmachine6_row_close <= 1'd0; - soc_netsoc_sdram_bankmachine6_cmd_payload_is_write <= 1'd0; - soc_netsoc_sdram_bankmachine6_row_open <= 1'd0; - soc_netsoc_sdram_bankmachine6_req_wdata_ready <= 1'd0; - soc_netsoc_sdram_bankmachine6_req_rdata_valid <= 1'd0; - soc_netsoc_sdram_bankmachine6_row_col_n_addr_sel <= 1'd0; - soc_netsoc_sdram_bankmachine6_refresh_gnt <= 1'd0; - soc_netsoc_sdram_bankmachine6_cmd_valid <= 1'd0; - soc_netsoc_sdram_bankmachine6_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_bankmachine6_cmd_payload_ras <= 1'd0; - vns_bankmachine6_next_state <= vns_bankmachine6_state; - case (vns_bankmachine6_state) - 1'd1: begin - if ((soc_netsoc_sdram_bankmachine6_twtpcon_ready & soc_netsoc_sdram_bankmachine6_trascon_ready)) begin - soc_netsoc_sdram_bankmachine6_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine6_cmd_ready) begin - vns_bankmachine6_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine6_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_bankmachine6_cmd_payload_we <= 1'd1; - soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; - end - soc_netsoc_sdram_bankmachine6_row_close <= 1'd1; - end - 2'd2: begin - if ((soc_netsoc_sdram_bankmachine6_twtpcon_ready & soc_netsoc_sdram_bankmachine6_trascon_ready)) begin - vns_bankmachine6_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine6_row_close <= 1'd1; - end - 2'd3: begin - if (soc_netsoc_sdram_bankmachine6_trccon_ready) begin - soc_netsoc_sdram_bankmachine6_row_col_n_addr_sel <= 1'd1; - soc_netsoc_sdram_bankmachine6_row_open <= 1'd1; - soc_netsoc_sdram_bankmachine6_cmd_valid <= 1'd1; - soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; - if (soc_netsoc_sdram_bankmachine6_cmd_ready) begin - vns_bankmachine6_next_state <= 3'd6; - end - soc_netsoc_sdram_bankmachine6_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (soc_netsoc_sdram_bankmachine6_twtpcon_ready) begin - soc_netsoc_sdram_bankmachine6_refresh_gnt <= 1'd1; - end - soc_netsoc_sdram_bankmachine6_row_close <= 1'd1; - soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; - if ((~soc_netsoc_sdram_bankmachine6_refresh_req)) begin - vns_bankmachine6_next_state <= 1'd0; - end - end - 3'd5: begin - vns_bankmachine6_next_state <= 2'd3; - end - 3'd6: begin - vns_bankmachine6_next_state <= 1'd0; - end - default: begin - if (soc_netsoc_sdram_bankmachine6_refresh_req) begin - vns_bankmachine6_next_state <= 3'd4; - end else begin - if (soc_netsoc_sdram_bankmachine6_cmd_buffer_source_valid) begin - if (soc_netsoc_sdram_bankmachine6_row_opened) begin - if (soc_netsoc_sdram_bankmachine6_row_hit) begin - soc_netsoc_sdram_bankmachine6_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_we) begin - soc_netsoc_sdram_bankmachine6_req_wdata_ready <= soc_netsoc_sdram_bankmachine6_cmd_ready; - soc_netsoc_sdram_bankmachine6_cmd_payload_is_write <= 1'd1; - soc_netsoc_sdram_bankmachine6_cmd_payload_we <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine6_req_rdata_valid <= soc_netsoc_sdram_bankmachine6_cmd_ready; - soc_netsoc_sdram_bankmachine6_cmd_payload_is_read <= 1'd1; - end - soc_netsoc_sdram_bankmachine6_cmd_payload_cas <= 1'd1; - if ((soc_netsoc_sdram_bankmachine6_cmd_ready & soc_netsoc_sdram_bankmachine6_auto_precharge)) begin - vns_bankmachine6_next_state <= 2'd2; - end - end else begin - vns_bankmachine6_next_state <= 1'd1; - end - end else begin - vns_bankmachine6_next_state <= 2'd3; - end - end - end - end - endcase -end -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid = soc_netsoc_sdram_bankmachine7_req_valid; -assign soc_netsoc_sdram_bankmachine7_req_ready = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we = soc_netsoc_sdram_bankmachine7_req_we; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr = soc_netsoc_sdram_bankmachine7_req_addr; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_ready = soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_ready; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_first = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_first; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_last = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_last; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_we = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_addr = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_source_ready = (soc_netsoc_sdram_bankmachine7_req_wdata_ready | soc_netsoc_sdram_bankmachine7_req_rdata_valid); -assign soc_netsoc_sdram_bankmachine7_req_lock = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid | soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid); -assign soc_netsoc_sdram_bankmachine7_row_hit = (soc_netsoc_sdram_bankmachine7_row == soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]); -assign soc_netsoc_sdram_bankmachine7_cmd_payload_ba = 3'd7; -always @(*) begin - soc_netsoc_sdram_bankmachine7_cmd_payload_a <= 14'd0; - if (soc_netsoc_sdram_bankmachine7_row_col_n_addr_sel) begin - soc_netsoc_sdram_bankmachine7_cmd_payload_a <= soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; - end else begin - soc_netsoc_sdram_bankmachine7_cmd_payload_a <= ((soc_netsoc_sdram_bankmachine7_auto_precharge <<< 4'd10) | {soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign soc_netsoc_sdram_bankmachine7_twtpcon_valid = ((soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_ready) & soc_netsoc_sdram_bankmachine7_cmd_payload_is_write); -assign soc_netsoc_sdram_bankmachine7_trccon_valid = ((soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_ready) & soc_netsoc_sdram_bankmachine7_row_open); -assign soc_netsoc_sdram_bankmachine7_trascon_valid = ((soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_ready) & soc_netsoc_sdram_bankmachine7_row_open); -always @(*) begin - soc_netsoc_sdram_bankmachine7_auto_precharge <= 1'd0; - if ((soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid & soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid)) begin - if ((soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr[20:7] != soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7])) begin - soc_netsoc_sdram_bankmachine7_auto_precharge <= (soc_netsoc_sdram_bankmachine7_row_close == 1'd0); - end - end -end -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din = {soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr, soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we} = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_first; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_last; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_valid = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_first = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_last = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; -always @(*) begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace) begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce - 1'd1); - end else begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce; - end -end -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable | soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace)); -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable & soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re); -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout = soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level != 4'd8); -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable = (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level != 1'd0); -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce = (soc_netsoc_sdram_bankmachine7_cmd_buffer_source_ready | (~soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n)); -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_ready = soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid = soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_busy = (1'd0 | soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n); -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_source_first = soc_netsoc_sdram_bankmachine7_cmd_buffer_first_n; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_source_last = soc_netsoc_sdram_bankmachine7_cmd_buffer_last_n; -always @(*) begin - vns_bankmachine7_next_state <= 3'd0; - soc_netsoc_sdram_bankmachine7_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_bankmachine7_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_bankmachine7_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd0; - soc_netsoc_sdram_bankmachine7_row_open <= 1'd0; - soc_netsoc_sdram_bankmachine7_cmd_payload_is_read <= 1'd0; - soc_netsoc_sdram_bankmachine7_row_close <= 1'd0; - soc_netsoc_sdram_bankmachine7_cmd_payload_is_write <= 1'd0; - soc_netsoc_sdram_bankmachine7_req_wdata_ready <= 1'd0; - soc_netsoc_sdram_bankmachine7_req_rdata_valid <= 1'd0; - soc_netsoc_sdram_bankmachine7_row_col_n_addr_sel <= 1'd0; - soc_netsoc_sdram_bankmachine7_refresh_gnt <= 1'd0; - soc_netsoc_sdram_bankmachine7_cmd_valid <= 1'd0; - vns_bankmachine7_next_state <= vns_bankmachine7_state; - case (vns_bankmachine7_state) - 1'd1: begin - if ((soc_netsoc_sdram_bankmachine7_twtpcon_ready & soc_netsoc_sdram_bankmachine7_trascon_ready)) begin - soc_netsoc_sdram_bankmachine7_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine7_cmd_ready) begin - vns_bankmachine7_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine7_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_bankmachine7_cmd_payload_we <= 1'd1; - soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; - end - soc_netsoc_sdram_bankmachine7_row_close <= 1'd1; - end - 2'd2: begin - if ((soc_netsoc_sdram_bankmachine7_twtpcon_ready & soc_netsoc_sdram_bankmachine7_trascon_ready)) begin - vns_bankmachine7_next_state <= 3'd5; - end - soc_netsoc_sdram_bankmachine7_row_close <= 1'd1; - end - 2'd3: begin - if (soc_netsoc_sdram_bankmachine7_trccon_ready) begin - soc_netsoc_sdram_bankmachine7_row_col_n_addr_sel <= 1'd1; - soc_netsoc_sdram_bankmachine7_row_open <= 1'd1; - soc_netsoc_sdram_bankmachine7_cmd_valid <= 1'd1; - soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; - if (soc_netsoc_sdram_bankmachine7_cmd_ready) begin - vns_bankmachine7_next_state <= 3'd6; - end - soc_netsoc_sdram_bankmachine7_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (soc_netsoc_sdram_bankmachine7_twtpcon_ready) begin - soc_netsoc_sdram_bankmachine7_refresh_gnt <= 1'd1; - end - soc_netsoc_sdram_bankmachine7_row_close <= 1'd1; - soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; - if ((~soc_netsoc_sdram_bankmachine7_refresh_req)) begin - vns_bankmachine7_next_state <= 1'd0; - end - end - 3'd5: begin - vns_bankmachine7_next_state <= 2'd3; - end - 3'd6: begin - vns_bankmachine7_next_state <= 1'd0; - end - default: begin - if (soc_netsoc_sdram_bankmachine7_refresh_req) begin - vns_bankmachine7_next_state <= 3'd4; - end else begin - if (soc_netsoc_sdram_bankmachine7_cmd_buffer_source_valid) begin - if (soc_netsoc_sdram_bankmachine7_row_opened) begin - if (soc_netsoc_sdram_bankmachine7_row_hit) begin - soc_netsoc_sdram_bankmachine7_cmd_valid <= 1'd1; - if (soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_we) begin - soc_netsoc_sdram_bankmachine7_req_wdata_ready <= soc_netsoc_sdram_bankmachine7_cmd_ready; - soc_netsoc_sdram_bankmachine7_cmd_payload_is_write <= 1'd1; - soc_netsoc_sdram_bankmachine7_cmd_payload_we <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine7_req_rdata_valid <= soc_netsoc_sdram_bankmachine7_cmd_ready; - soc_netsoc_sdram_bankmachine7_cmd_payload_is_read <= 1'd1; - end - soc_netsoc_sdram_bankmachine7_cmd_payload_cas <= 1'd1; - if ((soc_netsoc_sdram_bankmachine7_cmd_ready & soc_netsoc_sdram_bankmachine7_auto_precharge)) begin - vns_bankmachine7_next_state <= 2'd2; - end - end else begin - vns_bankmachine7_next_state <= 1'd1; - end - end else begin - vns_bankmachine7_next_state <= 2'd3; - end - end - end - end - endcase -end -assign soc_netsoc_sdram_trrdcon_valid = ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & ((soc_netsoc_sdram_choose_cmd_cmd_payload_ras & (~soc_netsoc_sdram_choose_cmd_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_cmd_cmd_payload_we))); -assign soc_netsoc_sdram_tfawcon_valid = ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & ((soc_netsoc_sdram_choose_cmd_cmd_payload_ras & (~soc_netsoc_sdram_choose_cmd_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_cmd_cmd_payload_we))); -assign soc_netsoc_sdram_ras_allowed = (soc_netsoc_sdram_trrdcon_ready & soc_netsoc_sdram_tfawcon_ready); -assign soc_netsoc_sdram_tccdcon_valid = ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_cmd_payload_is_write | soc_netsoc_sdram_choose_req_cmd_payload_is_read)); -assign soc_netsoc_sdram_cas_allowed = soc_netsoc_sdram_tccdcon_ready; -assign soc_netsoc_sdram_twtrcon_valid = ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); -assign soc_netsoc_sdram_read_available = ((((((((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_payload_is_read) | (soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_payload_is_read)) | (soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_payload_is_read)); -assign soc_netsoc_sdram_write_available = ((((((((soc_netsoc_sdram_bankmachine0_cmd_valid & soc_netsoc_sdram_bankmachine0_cmd_payload_is_write) | (soc_netsoc_sdram_bankmachine1_cmd_valid & soc_netsoc_sdram_bankmachine1_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine2_cmd_valid & soc_netsoc_sdram_bankmachine2_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine3_cmd_valid & soc_netsoc_sdram_bankmachine3_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine4_cmd_valid & soc_netsoc_sdram_bankmachine4_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine5_cmd_valid & soc_netsoc_sdram_bankmachine5_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine6_cmd_valid & soc_netsoc_sdram_bankmachine6_cmd_payload_is_write)) | (soc_netsoc_sdram_bankmachine7_cmd_valid & soc_netsoc_sdram_bankmachine7_cmd_payload_is_write)); -assign soc_netsoc_sdram_max_time0 = (soc_netsoc_sdram_time0 == 1'd0); -assign soc_netsoc_sdram_max_time1 = (soc_netsoc_sdram_time1 == 1'd0); -assign soc_netsoc_sdram_bankmachine0_refresh_req = soc_netsoc_sdram_cmd_valid; -assign soc_netsoc_sdram_bankmachine1_refresh_req = soc_netsoc_sdram_cmd_valid; -assign soc_netsoc_sdram_bankmachine2_refresh_req = soc_netsoc_sdram_cmd_valid; -assign soc_netsoc_sdram_bankmachine3_refresh_req = soc_netsoc_sdram_cmd_valid; -assign soc_netsoc_sdram_bankmachine4_refresh_req = soc_netsoc_sdram_cmd_valid; -assign soc_netsoc_sdram_bankmachine5_refresh_req = soc_netsoc_sdram_cmd_valid; -assign soc_netsoc_sdram_bankmachine6_refresh_req = soc_netsoc_sdram_cmd_valid; -assign soc_netsoc_sdram_bankmachine7_refresh_req = soc_netsoc_sdram_cmd_valid; -assign soc_netsoc_sdram_go_to_refresh = (((((((soc_netsoc_sdram_bankmachine0_refresh_gnt & soc_netsoc_sdram_bankmachine1_refresh_gnt) & soc_netsoc_sdram_bankmachine2_refresh_gnt) & soc_netsoc_sdram_bankmachine3_refresh_gnt) & soc_netsoc_sdram_bankmachine4_refresh_gnt) & soc_netsoc_sdram_bankmachine5_refresh_gnt) & soc_netsoc_sdram_bankmachine6_refresh_gnt) & soc_netsoc_sdram_bankmachine7_refresh_gnt); -assign soc_netsoc_sdram_interface_rdata = {soc_netsoc_sdram_dfi_p3_rddata, soc_netsoc_sdram_dfi_p2_rddata, soc_netsoc_sdram_dfi_p1_rddata, soc_netsoc_sdram_dfi_p0_rddata}; -assign {soc_netsoc_sdram_dfi_p3_wrdata, soc_netsoc_sdram_dfi_p2_wrdata, soc_netsoc_sdram_dfi_p1_wrdata, soc_netsoc_sdram_dfi_p0_wrdata} = soc_netsoc_sdram_interface_wdata; -assign {soc_netsoc_sdram_dfi_p3_wrdata_mask, soc_netsoc_sdram_dfi_p2_wrdata_mask, soc_netsoc_sdram_dfi_p1_wrdata_mask, soc_netsoc_sdram_dfi_p0_wrdata_mask} = (~soc_netsoc_sdram_interface_wdata_we); -always @(*) begin - soc_netsoc_sdram_choose_cmd_valids <= 8'd0; - soc_netsoc_sdram_choose_cmd_valids[0] <= (soc_netsoc_sdram_bankmachine0_cmd_valid & (((soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine0_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine0_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine0_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine0_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine0_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); - soc_netsoc_sdram_choose_cmd_valids[1] <= (soc_netsoc_sdram_bankmachine1_cmd_valid & (((soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine1_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine1_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine1_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine1_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine1_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); - soc_netsoc_sdram_choose_cmd_valids[2] <= (soc_netsoc_sdram_bankmachine2_cmd_valid & (((soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine2_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine2_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine2_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine2_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine2_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); - soc_netsoc_sdram_choose_cmd_valids[3] <= (soc_netsoc_sdram_bankmachine3_cmd_valid & (((soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine3_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine3_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine3_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine3_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine3_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); - soc_netsoc_sdram_choose_cmd_valids[4] <= (soc_netsoc_sdram_bankmachine4_cmd_valid & (((soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine4_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine4_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine4_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine4_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine4_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); - soc_netsoc_sdram_choose_cmd_valids[5] <= (soc_netsoc_sdram_bankmachine5_cmd_valid & (((soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine5_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine5_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine5_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine5_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine5_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); - soc_netsoc_sdram_choose_cmd_valids[6] <= (soc_netsoc_sdram_bankmachine6_cmd_valid & (((soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine6_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine6_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine6_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine6_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine6_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); - soc_netsoc_sdram_choose_cmd_valids[7] <= (soc_netsoc_sdram_bankmachine7_cmd_valid & (((soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd & soc_netsoc_sdram_choose_cmd_want_cmds) & ((~((soc_netsoc_sdram_bankmachine7_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine7_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine7_cmd_payload_we))) | soc_netsoc_sdram_choose_cmd_want_activates)) | ((soc_netsoc_sdram_bankmachine7_cmd_payload_is_read == soc_netsoc_sdram_choose_cmd_want_reads) & (soc_netsoc_sdram_bankmachine7_cmd_payload_is_write == soc_netsoc_sdram_choose_cmd_want_writes)))); -end -assign soc_netsoc_sdram_choose_cmd_request = soc_netsoc_sdram_choose_cmd_valids; -assign soc_netsoc_sdram_choose_cmd_cmd_valid = vns_rhs_array_muxed0; -assign soc_netsoc_sdram_choose_cmd_cmd_payload_a = vns_rhs_array_muxed1; -assign soc_netsoc_sdram_choose_cmd_cmd_payload_ba = vns_rhs_array_muxed2; -assign soc_netsoc_sdram_choose_cmd_cmd_payload_is_read = vns_rhs_array_muxed3; -assign soc_netsoc_sdram_choose_cmd_cmd_payload_is_write = vns_rhs_array_muxed4; -assign soc_netsoc_sdram_choose_cmd_cmd_payload_is_cmd = vns_rhs_array_muxed5; -always @(*) begin - soc_netsoc_sdram_choose_cmd_cmd_payload_cas <= 1'd0; - if (soc_netsoc_sdram_choose_cmd_cmd_valid) begin - soc_netsoc_sdram_choose_cmd_cmd_payload_cas <= vns_t_array_muxed0; - end -end -always @(*) begin - soc_netsoc_sdram_choose_cmd_cmd_payload_ras <= 1'd0; - if (soc_netsoc_sdram_choose_cmd_cmd_valid) begin - soc_netsoc_sdram_choose_cmd_cmd_payload_ras <= vns_t_array_muxed1; - end -end -always @(*) begin - soc_netsoc_sdram_choose_cmd_cmd_payload_we <= 1'd0; - if (soc_netsoc_sdram_choose_cmd_cmd_valid) begin - soc_netsoc_sdram_choose_cmd_cmd_payload_we <= vns_t_array_muxed2; - end -end -assign soc_netsoc_sdram_choose_cmd_ce = (soc_netsoc_sdram_choose_cmd_cmd_ready | (~soc_netsoc_sdram_choose_cmd_cmd_valid)); -always @(*) begin - soc_netsoc_sdram_choose_req_valids <= 8'd0; - soc_netsoc_sdram_choose_req_valids[0] <= (soc_netsoc_sdram_bankmachine0_cmd_valid & (((soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine0_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine0_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine0_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine0_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine0_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); - soc_netsoc_sdram_choose_req_valids[1] <= (soc_netsoc_sdram_bankmachine1_cmd_valid & (((soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine1_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine1_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine1_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine1_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine1_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); - soc_netsoc_sdram_choose_req_valids[2] <= (soc_netsoc_sdram_bankmachine2_cmd_valid & (((soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine2_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine2_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine2_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine2_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine2_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); - soc_netsoc_sdram_choose_req_valids[3] <= (soc_netsoc_sdram_bankmachine3_cmd_valid & (((soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine3_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine3_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine3_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine3_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine3_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); - soc_netsoc_sdram_choose_req_valids[4] <= (soc_netsoc_sdram_bankmachine4_cmd_valid & (((soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine4_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine4_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine4_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine4_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine4_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); - soc_netsoc_sdram_choose_req_valids[5] <= (soc_netsoc_sdram_bankmachine5_cmd_valid & (((soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine5_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine5_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine5_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine5_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine5_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); - soc_netsoc_sdram_choose_req_valids[6] <= (soc_netsoc_sdram_bankmachine6_cmd_valid & (((soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine6_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine6_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine6_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine6_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine6_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); - soc_netsoc_sdram_choose_req_valids[7] <= (soc_netsoc_sdram_bankmachine7_cmd_valid & (((soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd & soc_netsoc_sdram_choose_req_want_cmds) & ((~((soc_netsoc_sdram_bankmachine7_cmd_payload_ras & (~soc_netsoc_sdram_bankmachine7_cmd_payload_cas)) & (~soc_netsoc_sdram_bankmachine7_cmd_payload_we))) | soc_netsoc_sdram_choose_req_want_activates)) | ((soc_netsoc_sdram_bankmachine7_cmd_payload_is_read == soc_netsoc_sdram_choose_req_want_reads) & (soc_netsoc_sdram_bankmachine7_cmd_payload_is_write == soc_netsoc_sdram_choose_req_want_writes)))); -end -assign soc_netsoc_sdram_choose_req_request = soc_netsoc_sdram_choose_req_valids; -assign soc_netsoc_sdram_choose_req_cmd_valid = vns_rhs_array_muxed6; -assign soc_netsoc_sdram_choose_req_cmd_payload_a = vns_rhs_array_muxed7; -assign soc_netsoc_sdram_choose_req_cmd_payload_ba = vns_rhs_array_muxed8; -assign soc_netsoc_sdram_choose_req_cmd_payload_is_read = vns_rhs_array_muxed9; -assign soc_netsoc_sdram_choose_req_cmd_payload_is_write = vns_rhs_array_muxed10; -assign soc_netsoc_sdram_choose_req_cmd_payload_is_cmd = vns_rhs_array_muxed11; -always @(*) begin - soc_netsoc_sdram_choose_req_cmd_payload_cas <= 1'd0; - if (soc_netsoc_sdram_choose_req_cmd_valid) begin - soc_netsoc_sdram_choose_req_cmd_payload_cas <= vns_t_array_muxed3; - end -end -always @(*) begin - soc_netsoc_sdram_choose_req_cmd_payload_ras <= 1'd0; - if (soc_netsoc_sdram_choose_req_cmd_valid) begin - soc_netsoc_sdram_choose_req_cmd_payload_ras <= vns_t_array_muxed4; - end -end -always @(*) begin - soc_netsoc_sdram_choose_req_cmd_payload_we <= 1'd0; - if (soc_netsoc_sdram_choose_req_cmd_valid) begin - soc_netsoc_sdram_choose_req_cmd_payload_we <= vns_t_array_muxed5; - end -end -always @(*) begin - soc_netsoc_sdram_bankmachine0_cmd_ready <= 1'd0; - if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 1'd0))) begin - soc_netsoc_sdram_bankmachine0_cmd_ready <= 1'd1; - end - if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 1'd0))) begin - soc_netsoc_sdram_bankmachine0_cmd_ready <= 1'd1; - end -end -always @(*) begin - soc_netsoc_sdram_bankmachine1_cmd_ready <= 1'd0; - if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 1'd1))) begin - soc_netsoc_sdram_bankmachine1_cmd_ready <= 1'd1; - end - if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 1'd1))) begin - soc_netsoc_sdram_bankmachine1_cmd_ready <= 1'd1; - end -end -always @(*) begin - soc_netsoc_sdram_bankmachine2_cmd_ready <= 1'd0; - if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 2'd2))) begin - soc_netsoc_sdram_bankmachine2_cmd_ready <= 1'd1; - end - if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 2'd2))) begin - soc_netsoc_sdram_bankmachine2_cmd_ready <= 1'd1; - end -end -always @(*) begin - soc_netsoc_sdram_bankmachine3_cmd_ready <= 1'd0; - if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 2'd3))) begin - soc_netsoc_sdram_bankmachine3_cmd_ready <= 1'd1; - end - if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 2'd3))) begin - soc_netsoc_sdram_bankmachine3_cmd_ready <= 1'd1; - end -end -always @(*) begin - soc_netsoc_sdram_bankmachine4_cmd_ready <= 1'd0; - if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 3'd4))) begin - soc_netsoc_sdram_bankmachine4_cmd_ready <= 1'd1; - end - if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 3'd4))) begin - soc_netsoc_sdram_bankmachine4_cmd_ready <= 1'd1; - end -end -always @(*) begin - soc_netsoc_sdram_bankmachine5_cmd_ready <= 1'd0; - if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 3'd5))) begin - soc_netsoc_sdram_bankmachine5_cmd_ready <= 1'd1; - end - if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 3'd5))) begin - soc_netsoc_sdram_bankmachine5_cmd_ready <= 1'd1; - end -end -always @(*) begin - soc_netsoc_sdram_bankmachine6_cmd_ready <= 1'd0; - if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 3'd6))) begin - soc_netsoc_sdram_bankmachine6_cmd_ready <= 1'd1; - end - if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 3'd6))) begin - soc_netsoc_sdram_bankmachine6_cmd_ready <= 1'd1; - end -end -always @(*) begin - soc_netsoc_sdram_bankmachine7_cmd_ready <= 1'd0; - if (((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & (soc_netsoc_sdram_choose_cmd_grant == 3'd7))) begin - soc_netsoc_sdram_bankmachine7_cmd_ready <= 1'd1; - end - if (((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & (soc_netsoc_sdram_choose_req_grant == 3'd7))) begin - soc_netsoc_sdram_bankmachine7_cmd_ready <= 1'd1; - end -end -assign soc_netsoc_sdram_choose_req_ce = (soc_netsoc_sdram_choose_req_cmd_ready | (~soc_netsoc_sdram_choose_req_cmd_valid)); -assign soc_netsoc_sdram_dfi_p0_reset_n = 1'd1; -assign soc_netsoc_sdram_dfi_p0_cke = {1{soc_netsoc_sdram_steerer0}}; -assign soc_netsoc_sdram_dfi_p0_odt = {1{soc_netsoc_sdram_steerer1}}; -assign soc_netsoc_sdram_dfi_p1_reset_n = 1'd1; -assign soc_netsoc_sdram_dfi_p1_cke = {1{soc_netsoc_sdram_steerer2}}; -assign soc_netsoc_sdram_dfi_p1_odt = {1{soc_netsoc_sdram_steerer3}}; -assign soc_netsoc_sdram_dfi_p2_reset_n = 1'd1; -assign soc_netsoc_sdram_dfi_p2_cke = {1{soc_netsoc_sdram_steerer4}}; -assign soc_netsoc_sdram_dfi_p2_odt = {1{soc_netsoc_sdram_steerer5}}; -assign soc_netsoc_sdram_dfi_p3_reset_n = 1'd1; -assign soc_netsoc_sdram_dfi_p3_cke = {1{soc_netsoc_sdram_steerer6}}; -assign soc_netsoc_sdram_dfi_p3_odt = {1{soc_netsoc_sdram_steerer7}}; -assign soc_netsoc_sdram_tfawcon_count = (((soc_netsoc_sdram_tfawcon_window[0] + soc_netsoc_sdram_tfawcon_window[1]) + soc_netsoc_sdram_tfawcon_window[2]) + soc_netsoc_sdram_tfawcon_window[3]); -always @(*) begin - soc_netsoc_sdram_en0 <= 1'd0; - soc_netsoc_sdram_choose_cmd_want_activates <= 1'd0; - soc_netsoc_sdram_steerer_sel3 <= 2'd0; - soc_netsoc_sdram_cmd_ready <= 1'd0; - soc_netsoc_sdram_choose_cmd_cmd_ready <= 1'd0; - soc_netsoc_sdram_choose_req_want_reads <= 1'd0; - soc_netsoc_sdram_choose_req_want_writes <= 1'd0; - soc_netsoc_sdram_en1 <= 1'd0; - soc_netsoc_sdram_choose_req_cmd_ready <= 1'd0; - soc_netsoc_sdram_steerer_sel0 <= 2'd0; - vns_multiplexer_next_state <= 4'd0; - soc_netsoc_sdram_steerer_sel1 <= 2'd0; - soc_netsoc_sdram_steerer_sel2 <= 2'd0; - vns_multiplexer_next_state <= vns_multiplexer_state; - case (vns_multiplexer_state) - 1'd1: begin - soc_netsoc_sdram_en1 <= 1'd1; - soc_netsoc_sdram_choose_req_want_writes <= 1'd1; - if (1'd0) begin - soc_netsoc_sdram_choose_req_cmd_ready <= (soc_netsoc_sdram_cas_allowed & ((~((soc_netsoc_sdram_choose_req_cmd_payload_ras & (~soc_netsoc_sdram_choose_req_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_req_cmd_payload_we))) | soc_netsoc_sdram_ras_allowed)); - end else begin - soc_netsoc_sdram_choose_cmd_want_activates <= soc_netsoc_sdram_ras_allowed; - soc_netsoc_sdram_choose_cmd_cmd_ready <= ((~((soc_netsoc_sdram_choose_cmd_cmd_payload_ras & (~soc_netsoc_sdram_choose_cmd_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_cmd_cmd_payload_we))) | soc_netsoc_sdram_ras_allowed); - soc_netsoc_sdram_choose_req_cmd_ready <= soc_netsoc_sdram_cas_allowed; - end - soc_netsoc_sdram_steerer_sel0 <= 1'd0; - soc_netsoc_sdram_steerer_sel1 <= 1'd0; - soc_netsoc_sdram_steerer_sel2 <= 1'd1; - soc_netsoc_sdram_steerer_sel3 <= 2'd2; - if (soc_netsoc_sdram_read_available) begin - if (((~soc_netsoc_sdram_write_available) | soc_netsoc_sdram_max_time1)) begin - vns_multiplexer_next_state <= 2'd3; - end - end - if (soc_netsoc_sdram_go_to_refresh) begin - vns_multiplexer_next_state <= 2'd2; - end - end - 2'd2: begin - soc_netsoc_sdram_steerer_sel0 <= 2'd3; - soc_netsoc_sdram_cmd_ready <= 1'd1; - if (soc_netsoc_sdram_cmd_last) begin - vns_multiplexer_next_state <= 1'd0; - end - end - 2'd3: begin - if (soc_netsoc_sdram_twtrcon_ready) begin - vns_multiplexer_next_state <= 1'd0; - end - end - 3'd4: begin - vns_multiplexer_next_state <= 3'd5; - end - 3'd5: begin - vns_multiplexer_next_state <= 3'd6; - end - 3'd6: begin - vns_multiplexer_next_state <= 3'd7; - end - 3'd7: begin - vns_multiplexer_next_state <= 4'd8; - end - 4'd8: begin - vns_multiplexer_next_state <= 4'd9; - end - 4'd9: begin - vns_multiplexer_next_state <= 4'd10; - end - 4'd10: begin - vns_multiplexer_next_state <= 4'd11; - end - 4'd11: begin - vns_multiplexer_next_state <= 1'd1; - end - default: begin - soc_netsoc_sdram_en0 <= 1'd1; - soc_netsoc_sdram_choose_req_want_reads <= 1'd1; - if (1'd0) begin - soc_netsoc_sdram_choose_req_cmd_ready <= (soc_netsoc_sdram_cas_allowed & ((~((soc_netsoc_sdram_choose_req_cmd_payload_ras & (~soc_netsoc_sdram_choose_req_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_req_cmd_payload_we))) | soc_netsoc_sdram_ras_allowed)); - end else begin - soc_netsoc_sdram_choose_cmd_want_activates <= soc_netsoc_sdram_ras_allowed; - soc_netsoc_sdram_choose_cmd_cmd_ready <= ((~((soc_netsoc_sdram_choose_cmd_cmd_payload_ras & (~soc_netsoc_sdram_choose_cmd_cmd_payload_cas)) & (~soc_netsoc_sdram_choose_cmd_cmd_payload_we))) | soc_netsoc_sdram_ras_allowed); - soc_netsoc_sdram_choose_req_cmd_ready <= soc_netsoc_sdram_cas_allowed; - end - soc_netsoc_sdram_steerer_sel0 <= 1'd0; - soc_netsoc_sdram_steerer_sel1 <= 1'd1; - soc_netsoc_sdram_steerer_sel2 <= 2'd2; - soc_netsoc_sdram_steerer_sel3 <= 1'd0; - if (soc_netsoc_sdram_write_available) begin - if (((~soc_netsoc_sdram_read_available) | soc_netsoc_sdram_max_time0)) begin - vns_multiplexer_next_state <= 3'd4; - end - end - if (soc_netsoc_sdram_go_to_refresh) begin - vns_multiplexer_next_state <= 2'd2; - end - end - endcase -end -assign vns_roundrobin0_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((vns_locked0 | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; -assign vns_roundrobin0_ce = ((~soc_netsoc_sdram_interface_bank0_valid) & (~soc_netsoc_sdram_interface_bank0_lock)); -assign soc_netsoc_sdram_interface_bank0_addr = vns_rhs_array_muxed12; -assign soc_netsoc_sdram_interface_bank0_we = vns_rhs_array_muxed13; -assign soc_netsoc_sdram_interface_bank0_valid = vns_rhs_array_muxed14; -assign vns_roundrobin1_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((vns_locked1 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; -assign vns_roundrobin1_ce = ((~soc_netsoc_sdram_interface_bank1_valid) & (~soc_netsoc_sdram_interface_bank1_lock)); -assign soc_netsoc_sdram_interface_bank1_addr = vns_rhs_array_muxed15; -assign soc_netsoc_sdram_interface_bank1_we = vns_rhs_array_muxed16; -assign soc_netsoc_sdram_interface_bank1_valid = vns_rhs_array_muxed17; -assign vns_roundrobin2_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((vns_locked2 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; -assign vns_roundrobin2_ce = ((~soc_netsoc_sdram_interface_bank2_valid) & (~soc_netsoc_sdram_interface_bank2_lock)); -assign soc_netsoc_sdram_interface_bank2_addr = vns_rhs_array_muxed18; -assign soc_netsoc_sdram_interface_bank2_we = vns_rhs_array_muxed19; -assign soc_netsoc_sdram_interface_bank2_valid = vns_rhs_array_muxed20; -assign vns_roundrobin3_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((vns_locked3 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; -assign vns_roundrobin3_ce = ((~soc_netsoc_sdram_interface_bank3_valid) & (~soc_netsoc_sdram_interface_bank3_lock)); -assign soc_netsoc_sdram_interface_bank3_addr = vns_rhs_array_muxed21; -assign soc_netsoc_sdram_interface_bank3_we = vns_rhs_array_muxed22; -assign soc_netsoc_sdram_interface_bank3_valid = vns_rhs_array_muxed23; -assign vns_roundrobin4_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((vns_locked4 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; -assign vns_roundrobin4_ce = ((~soc_netsoc_sdram_interface_bank4_valid) & (~soc_netsoc_sdram_interface_bank4_lock)); -assign soc_netsoc_sdram_interface_bank4_addr = vns_rhs_array_muxed24; -assign soc_netsoc_sdram_interface_bank4_we = vns_rhs_array_muxed25; -assign soc_netsoc_sdram_interface_bank4_valid = vns_rhs_array_muxed26; -assign vns_roundrobin5_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((vns_locked5 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; -assign vns_roundrobin5_ce = ((~soc_netsoc_sdram_interface_bank5_valid) & (~soc_netsoc_sdram_interface_bank5_lock)); -assign soc_netsoc_sdram_interface_bank5_addr = vns_rhs_array_muxed27; -assign soc_netsoc_sdram_interface_bank5_we = vns_rhs_array_muxed28; -assign soc_netsoc_sdram_interface_bank5_valid = vns_rhs_array_muxed29; -assign vns_roundrobin6_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((vns_locked6 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; -assign vns_roundrobin6_ce = ((~soc_netsoc_sdram_interface_bank6_valid) & (~soc_netsoc_sdram_interface_bank6_lock)); -assign soc_netsoc_sdram_interface_bank6_addr = vns_rhs_array_muxed30; -assign soc_netsoc_sdram_interface_bank6_we = vns_rhs_array_muxed31; -assign soc_netsoc_sdram_interface_bank6_valid = vns_rhs_array_muxed32; -assign vns_roundrobin7_request = {(((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((vns_locked7 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))))) & soc_netsoc_port_cmd_valid)}; -assign vns_roundrobin7_ce = ((~soc_netsoc_sdram_interface_bank7_valid) & (~soc_netsoc_sdram_interface_bank7_lock)); -assign soc_netsoc_sdram_interface_bank7_addr = vns_rhs_array_muxed33; -assign soc_netsoc_sdram_interface_bank7_we = vns_rhs_array_muxed34; -assign soc_netsoc_sdram_interface_bank7_valid = vns_rhs_array_muxed35; -assign soc_netsoc_port_cmd_ready = ((((((((1'd0 | (((vns_roundrobin0_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((vns_locked0 | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank0_ready)) | (((vns_roundrobin1_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((vns_locked1 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank1_ready)) | (((vns_roundrobin2_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((vns_locked2 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank2_ready)) | (((vns_roundrobin3_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((vns_locked3 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank3_ready)) | (((vns_roundrobin4_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((vns_locked4 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank4_ready)) | (((vns_roundrobin5_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((vns_locked5 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank5_ready)) | (((vns_roundrobin6_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((vns_locked6 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank6_ready)) | (((vns_roundrobin7_grant == 1'd0) & ((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((vns_locked7 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0)))))) & soc_netsoc_sdram_interface_bank7_ready)); -assign soc_netsoc_port_wdata_ready = vns_new_master_wdata_ready2; -assign soc_netsoc_port_rdata_valid = vns_new_master_rdata_valid9; -always @(*) begin - soc_netsoc_sdram_interface_wdata <= 128'd0; - soc_netsoc_sdram_interface_wdata_we <= 16'd0; - case ({vns_new_master_wdata_ready2}) - 1'd1: begin - soc_netsoc_sdram_interface_wdata <= soc_netsoc_port_wdata_payload_data; - soc_netsoc_sdram_interface_wdata_we <= soc_netsoc_port_wdata_payload_we; - end - default: begin - soc_netsoc_sdram_interface_wdata <= 1'd0; - soc_netsoc_sdram_interface_wdata_we <= 1'd0; - end - endcase -end -assign soc_netsoc_port_rdata_payload_data = soc_netsoc_sdram_interface_rdata; -assign vns_roundrobin0_grant = 1'd0; -assign vns_roundrobin1_grant = 1'd0; -assign vns_roundrobin2_grant = 1'd0; -assign vns_roundrobin3_grant = 1'd0; -assign vns_roundrobin4_grant = 1'd0; -assign vns_roundrobin5_grant = 1'd0; -assign vns_roundrobin6_grant = 1'd0; -assign vns_roundrobin7_grant = 1'd0; -assign soc_netsoc_data_port_adr = soc_netsoc_interface0_wb_sdram_adr[10:2]; -always @(*) begin - soc_netsoc_data_port_we <= 16'd0; - soc_netsoc_data_port_dat_w <= 128'd0; - if (soc_netsoc_write_from_slave) begin - soc_netsoc_data_port_dat_w <= soc_netsoc_dat_r; - soc_netsoc_data_port_we <= {16{1'd1}}; - end else begin - soc_netsoc_data_port_dat_w <= {4{soc_netsoc_interface0_wb_sdram_dat_w}}; - if ((((soc_netsoc_interface0_wb_sdram_cyc & soc_netsoc_interface0_wb_sdram_stb) & soc_netsoc_interface0_wb_sdram_we) & soc_netsoc_interface0_wb_sdram_ack)) begin - soc_netsoc_data_port_we <= {({4{(soc_netsoc_interface0_wb_sdram_adr[1:0] == 1'd0)}} & soc_netsoc_interface0_wb_sdram_sel), ({4{(soc_netsoc_interface0_wb_sdram_adr[1:0] == 1'd1)}} & soc_netsoc_interface0_wb_sdram_sel), ({4{(soc_netsoc_interface0_wb_sdram_adr[1:0] == 2'd2)}} & soc_netsoc_interface0_wb_sdram_sel), ({4{(soc_netsoc_interface0_wb_sdram_adr[1:0] == 2'd3)}} & soc_netsoc_interface0_wb_sdram_sel)}; - end - end -end -assign soc_netsoc_dat_w = soc_netsoc_data_port_dat_r; -assign soc_netsoc_sel = 16'd65535; -always @(*) begin - soc_netsoc_interface0_wb_sdram_dat_r <= 32'd0; - case (soc_netsoc_adr_offset_r) - 1'd0: begin - soc_netsoc_interface0_wb_sdram_dat_r <= soc_netsoc_data_port_dat_r[127:96]; - end - 1'd1: begin - soc_netsoc_interface0_wb_sdram_dat_r <= soc_netsoc_data_port_dat_r[95:64]; - end - 2'd2: begin - soc_netsoc_interface0_wb_sdram_dat_r <= soc_netsoc_data_port_dat_r[63:32]; - end - default: begin - soc_netsoc_interface0_wb_sdram_dat_r <= soc_netsoc_data_port_dat_r[31:0]; - end - endcase -end -assign {soc_netsoc_tag_do_dirty, soc_netsoc_tag_do_tag} = soc_netsoc_tag_port_dat_r; -assign soc_netsoc_tag_port_dat_w = {soc_netsoc_tag_di_dirty, soc_netsoc_tag_di_tag}; -assign soc_netsoc_tag_port_adr = soc_netsoc_interface0_wb_sdram_adr[10:2]; -assign soc_netsoc_tag_di_tag = soc_netsoc_interface0_wb_sdram_adr[29:11]; -assign soc_netsoc_adr = {soc_netsoc_tag_do_tag, soc_netsoc_interface0_wb_sdram_adr[10:2]}; -always @(*) begin - vns_fullmemorywe_next_state <= 3'd0; - soc_netsoc_tag_di_dirty <= 1'd0; - soc_netsoc_word_clr <= 1'd0; - soc_netsoc_interface0_wb_sdram_ack <= 1'd0; - soc_netsoc_word_inc <= 1'd0; - soc_netsoc_write_from_slave <= 1'd0; - soc_netsoc_cyc <= 1'd0; - soc_netsoc_stb <= 1'd0; - soc_netsoc_tag_port_we <= 1'd0; - soc_netsoc_we <= 1'd0; - vns_fullmemorywe_next_state <= vns_fullmemorywe_state; - case (vns_fullmemorywe_state) - 1'd1: begin - soc_netsoc_word_clr <= 1'd1; - if ((soc_netsoc_tag_do_tag == soc_netsoc_interface0_wb_sdram_adr[29:11])) begin - soc_netsoc_interface0_wb_sdram_ack <= 1'd1; - if (soc_netsoc_interface0_wb_sdram_we) begin - soc_netsoc_tag_di_dirty <= 1'd1; - soc_netsoc_tag_port_we <= 1'd1; - end - vns_fullmemorywe_next_state <= 1'd0; - end else begin - if (soc_netsoc_tag_do_dirty) begin - vns_fullmemorywe_next_state <= 2'd2; - end else begin - vns_fullmemorywe_next_state <= 2'd3; - end - end - end - 2'd2: begin - soc_netsoc_stb <= 1'd1; - soc_netsoc_cyc <= 1'd1; - soc_netsoc_we <= 1'd1; - if (soc_netsoc_ack) begin - soc_netsoc_word_inc <= 1'd1; - if (1'd1) begin - vns_fullmemorywe_next_state <= 2'd3; - end - end - end - 2'd3: begin - soc_netsoc_tag_port_we <= 1'd1; - soc_netsoc_word_clr <= 1'd1; - vns_fullmemorywe_next_state <= 3'd4; - end - 3'd4: begin - soc_netsoc_stb <= 1'd1; - soc_netsoc_cyc <= 1'd1; - soc_netsoc_we <= 1'd0; - if (soc_netsoc_ack) begin - soc_netsoc_write_from_slave <= 1'd1; - soc_netsoc_word_inc <= 1'd1; - if (1'd1) begin - vns_fullmemorywe_next_state <= 1'd1; - end else begin - vns_fullmemorywe_next_state <= 3'd4; - end - end - end - default: begin - if ((soc_netsoc_interface0_wb_sdram_cyc & soc_netsoc_interface0_wb_sdram_stb)) begin - vns_fullmemorywe_next_state <= 1'd1; - end - end - endcase -end -assign soc_netsoc_wdata_converter_sink_valid = ((soc_netsoc_cyc & soc_netsoc_stb) & soc_netsoc_we); -assign soc_netsoc_wdata_converter_sink_payload_data = soc_netsoc_dat_w; -assign soc_netsoc_wdata_converter_sink_payload_we = soc_netsoc_sel; -assign soc_netsoc_port_wdata_valid = soc_netsoc_wdata_converter_source_valid; -assign soc_netsoc_wdata_converter_source_ready = soc_netsoc_port_wdata_ready; -assign soc_netsoc_port_wdata_first = soc_netsoc_wdata_converter_source_first; -assign soc_netsoc_port_wdata_last = soc_netsoc_wdata_converter_source_last; -assign soc_netsoc_port_wdata_payload_data = soc_netsoc_wdata_converter_source_payload_data; -assign soc_netsoc_port_wdata_payload_we = soc_netsoc_wdata_converter_source_payload_we; -assign soc_netsoc_rdata_converter_sink_valid = soc_netsoc_port_rdata_valid; -assign soc_netsoc_port_rdata_ready = soc_netsoc_rdata_converter_sink_ready; -assign soc_netsoc_rdata_converter_sink_first = soc_netsoc_port_rdata_first; -assign soc_netsoc_rdata_converter_sink_last = soc_netsoc_port_rdata_last; -assign soc_netsoc_rdata_converter_sink_payload_data = soc_netsoc_port_rdata_payload_data; -assign soc_netsoc_rdata_converter_source_ready = 1'd1; -assign soc_netsoc_dat_r = soc_netsoc_rdata_converter_source_payload_data; -assign soc_netsoc_wdata_converter_converter_sink_valid = soc_netsoc_wdata_converter_sink_valid; -assign soc_netsoc_wdata_converter_converter_sink_first = soc_netsoc_wdata_converter_sink_first; -assign soc_netsoc_wdata_converter_converter_sink_last = soc_netsoc_wdata_converter_sink_last; -assign soc_netsoc_wdata_converter_sink_ready = soc_netsoc_wdata_converter_converter_sink_ready; -assign soc_netsoc_wdata_converter_converter_sink_payload_data = {soc_netsoc_wdata_converter_sink_payload_we, soc_netsoc_wdata_converter_sink_payload_data}; -assign soc_netsoc_wdata_converter_source_valid = soc_netsoc_wdata_converter_source_source_valid; -assign soc_netsoc_wdata_converter_source_first = soc_netsoc_wdata_converter_source_source_first; -assign soc_netsoc_wdata_converter_source_last = soc_netsoc_wdata_converter_source_source_last; -assign soc_netsoc_wdata_converter_source_source_ready = soc_netsoc_wdata_converter_source_ready; -assign {soc_netsoc_wdata_converter_source_payload_we, soc_netsoc_wdata_converter_source_payload_data} = soc_netsoc_wdata_converter_source_source_payload_data; -assign soc_netsoc_wdata_converter_source_source_valid = soc_netsoc_wdata_converter_converter_source_valid; -assign soc_netsoc_wdata_converter_converter_source_ready = soc_netsoc_wdata_converter_source_source_ready; -assign soc_netsoc_wdata_converter_source_source_first = soc_netsoc_wdata_converter_converter_source_first; -assign soc_netsoc_wdata_converter_source_source_last = soc_netsoc_wdata_converter_converter_source_last; -assign soc_netsoc_wdata_converter_source_source_payload_data = soc_netsoc_wdata_converter_converter_source_payload_data; -assign soc_netsoc_wdata_converter_converter_source_valid = soc_netsoc_wdata_converter_converter_sink_valid; -assign soc_netsoc_wdata_converter_converter_sink_ready = soc_netsoc_wdata_converter_converter_source_ready; -assign soc_netsoc_wdata_converter_converter_source_first = soc_netsoc_wdata_converter_converter_sink_first; -assign soc_netsoc_wdata_converter_converter_source_last = soc_netsoc_wdata_converter_converter_sink_last; -assign soc_netsoc_wdata_converter_converter_source_payload_data = soc_netsoc_wdata_converter_converter_sink_payload_data; -assign soc_netsoc_wdata_converter_converter_source_payload_valid_token_count = 1'd1; -assign soc_netsoc_rdata_converter_converter_sink_valid = soc_netsoc_rdata_converter_sink_valid; -assign soc_netsoc_rdata_converter_converter_sink_first = soc_netsoc_rdata_converter_sink_first; -assign soc_netsoc_rdata_converter_converter_sink_last = soc_netsoc_rdata_converter_sink_last; -assign soc_netsoc_rdata_converter_sink_ready = soc_netsoc_rdata_converter_converter_sink_ready; -assign soc_netsoc_rdata_converter_converter_sink_payload_data = {soc_netsoc_rdata_converter_sink_payload_data}; -assign soc_netsoc_rdata_converter_source_valid = soc_netsoc_rdata_converter_source_source_valid; -assign soc_netsoc_rdata_converter_source_first = soc_netsoc_rdata_converter_source_source_first; -assign soc_netsoc_rdata_converter_source_last = soc_netsoc_rdata_converter_source_source_last; -assign soc_netsoc_rdata_converter_source_source_ready = soc_netsoc_rdata_converter_source_ready; -assign {soc_netsoc_rdata_converter_source_payload_data} = soc_netsoc_rdata_converter_source_source_payload_data; -assign soc_netsoc_rdata_converter_source_source_valid = soc_netsoc_rdata_converter_converter_source_valid; -assign soc_netsoc_rdata_converter_converter_source_ready = soc_netsoc_rdata_converter_source_source_ready; -assign soc_netsoc_rdata_converter_source_source_first = soc_netsoc_rdata_converter_converter_source_first; -assign soc_netsoc_rdata_converter_source_source_last = soc_netsoc_rdata_converter_converter_source_last; -assign soc_netsoc_rdata_converter_source_source_payload_data = soc_netsoc_rdata_converter_converter_source_payload_data; -assign soc_netsoc_rdata_converter_converter_source_valid = soc_netsoc_rdata_converter_converter_sink_valid; -assign soc_netsoc_rdata_converter_converter_sink_ready = soc_netsoc_rdata_converter_converter_source_ready; -assign soc_netsoc_rdata_converter_converter_source_first = soc_netsoc_rdata_converter_converter_sink_first; -assign soc_netsoc_rdata_converter_converter_source_last = soc_netsoc_rdata_converter_converter_sink_last; -assign soc_netsoc_rdata_converter_converter_source_payload_data = soc_netsoc_rdata_converter_converter_sink_payload_data; -assign soc_netsoc_rdata_converter_converter_source_payload_valid_token_count = 1'd1; -always @(*) begin - soc_netsoc_count_litedramwishbone2native_next_value <= 1'd0; - soc_netsoc_port_cmd_valid <= 1'd0; - soc_netsoc_count_litedramwishbone2native_next_value_ce <= 1'd0; - soc_netsoc_ack <= 1'd0; - soc_netsoc_port_cmd_payload_we <= 1'd0; - vns_litedramwishbone2native_next_state <= 2'd0; - soc_netsoc_port_cmd_payload_addr <= 24'd0; - vns_litedramwishbone2native_next_state <= vns_litedramwishbone2native_state; - case (vns_litedramwishbone2native_state) - 1'd1: begin - if (soc_netsoc_wdata_converter_sink_ready) begin - soc_netsoc_ack <= 1'd1; - vns_litedramwishbone2native_next_state <= 1'd0; - end - end - 2'd2: begin - if (soc_netsoc_rdata_converter_source_valid) begin - soc_netsoc_ack <= 1'd1; - vns_litedramwishbone2native_next_state <= 1'd0; - end - end - default: begin - soc_netsoc_port_cmd_valid <= (soc_netsoc_cyc & soc_netsoc_stb); - soc_netsoc_port_cmd_payload_we <= soc_netsoc_we; - soc_netsoc_port_cmd_payload_addr <= (((soc_netsoc_adr * 1'd1) + soc_netsoc_count) - 1'd0); - if ((soc_netsoc_port_cmd_valid & soc_netsoc_port_cmd_ready)) begin - soc_netsoc_count_litedramwishbone2native_next_value <= (soc_netsoc_count + 1'd1); - soc_netsoc_count_litedramwishbone2native_next_value_ce <= 1'd1; - if ((soc_netsoc_count == 1'd0)) begin - soc_netsoc_count_litedramwishbone2native_next_value <= 1'd0; - soc_netsoc_count_litedramwishbone2native_next_value_ce <= 1'd1; - if (soc_netsoc_we) begin - vns_litedramwishbone2native_next_state <= 1'd1; - end else begin - vns_litedramwishbone2native_next_state <= 2'd2; - end - end - end - end - endcase -end -assign eth_rx_clk = eth_clocks_rx; -assign eth_tx_clk = eth_clocks_tx; -assign soc_reset0 = (soc_reset_storage | soc_reset1); -assign eth_rst_n = (~soc_reset0); -assign soc_counter_done = (soc_counter == 9'd256); -assign soc_counter_ce = (~soc_counter_done); -assign soc_reset1 = (~soc_counter_done); -assign soc_liteethphymiitx_converter_sink_valid = soc_liteethphymiitx_sink_sink_valid; -assign soc_liteethphymiitx_converter_sink_payload_data = soc_liteethphymiitx_sink_sink_payload_data; -assign soc_liteethphymiitx_sink_sink_ready = soc_liteethphymiitx_converter_sink_ready; -assign soc_liteethphymiitx_converter_source_ready = 1'd1; -assign soc_liteethphymiitx_converter_converter_sink_valid = soc_liteethphymiitx_converter_sink_valid; -assign soc_liteethphymiitx_converter_converter_sink_first = soc_liteethphymiitx_converter_sink_first; -assign soc_liteethphymiitx_converter_converter_sink_last = soc_liteethphymiitx_converter_sink_last; -assign soc_liteethphymiitx_converter_sink_ready = soc_liteethphymiitx_converter_converter_sink_ready; -always @(*) begin - soc_liteethphymiitx_converter_converter_sink_payload_data <= 8'd0; - soc_liteethphymiitx_converter_converter_sink_payload_data[3:0] <= soc_liteethphymiitx_converter_sink_payload_data[3:0]; - soc_liteethphymiitx_converter_converter_sink_payload_data[7:4] <= soc_liteethphymiitx_converter_sink_payload_data[7:4]; -end -assign soc_liteethphymiitx_converter_source_valid = soc_liteethphymiitx_converter_source_source_valid; -assign soc_liteethphymiitx_converter_source_first = soc_liteethphymiitx_converter_source_source_first; -assign soc_liteethphymiitx_converter_source_last = soc_liteethphymiitx_converter_source_source_last; -assign soc_liteethphymiitx_converter_source_source_ready = soc_liteethphymiitx_converter_source_ready; -assign {soc_liteethphymiitx_converter_source_payload_data} = soc_liteethphymiitx_converter_source_source_payload_data; -assign soc_liteethphymiitx_converter_source_source_valid = soc_liteethphymiitx_converter_converter_source_valid; -assign soc_liteethphymiitx_converter_converter_source_ready = soc_liteethphymiitx_converter_source_source_ready; -assign soc_liteethphymiitx_converter_source_source_first = soc_liteethphymiitx_converter_converter_source_first; -assign soc_liteethphymiitx_converter_source_source_last = soc_liteethphymiitx_converter_converter_source_last; -assign soc_liteethphymiitx_converter_source_source_payload_data = soc_liteethphymiitx_converter_converter_source_payload_data; -assign soc_liteethphymiitx_converter_converter_first = (soc_liteethphymiitx_converter_converter_mux == 1'd0); -assign soc_liteethphymiitx_converter_converter_last = (soc_liteethphymiitx_converter_converter_mux == 1'd1); -assign soc_liteethphymiitx_converter_converter_source_valid = soc_liteethphymiitx_converter_converter_sink_valid; -assign soc_liteethphymiitx_converter_converter_source_first = (soc_liteethphymiitx_converter_converter_sink_first & soc_liteethphymiitx_converter_converter_first); -assign soc_liteethphymiitx_converter_converter_source_last = (soc_liteethphymiitx_converter_converter_sink_last & soc_liteethphymiitx_converter_converter_last); -assign soc_liteethphymiitx_converter_converter_sink_ready = (soc_liteethphymiitx_converter_converter_last & soc_liteethphymiitx_converter_converter_source_ready); -always @(*) begin - soc_liteethphymiitx_converter_converter_source_payload_data <= 4'd0; - case (soc_liteethphymiitx_converter_converter_mux) - 1'd0: begin - soc_liteethphymiitx_converter_converter_source_payload_data <= soc_liteethphymiitx_converter_converter_sink_payload_data[3:0]; - end - default: begin - soc_liteethphymiitx_converter_converter_source_payload_data <= soc_liteethphymiitx_converter_converter_sink_payload_data[7:4]; - end - endcase -end -assign soc_liteethphymiitx_converter_converter_source_payload_valid_token_count = soc_liteethphymiitx_converter_converter_last; -assign soc_liteethphymiirx_converter_sink_last = (~eth_rx_dv); -assign soc_liteethphymiirx_source_source_valid = soc_liteethphymiirx_converter_source_valid; -assign soc_liteethphymiirx_converter_source_ready = soc_liteethphymiirx_source_source_ready; -assign soc_liteethphymiirx_source_source_first = soc_liteethphymiirx_converter_source_first; -assign soc_liteethphymiirx_source_source_last = soc_liteethphymiirx_converter_source_last; -assign soc_liteethphymiirx_source_source_payload_data = soc_liteethphymiirx_converter_source_payload_data; -assign soc_liteethphymiirx_converter_converter_sink_valid = soc_liteethphymiirx_converter_sink_valid; -assign soc_liteethphymiirx_converter_converter_sink_first = soc_liteethphymiirx_converter_sink_first; -assign soc_liteethphymiirx_converter_converter_sink_last = soc_liteethphymiirx_converter_sink_last; -assign soc_liteethphymiirx_converter_sink_ready = soc_liteethphymiirx_converter_converter_sink_ready; -assign soc_liteethphymiirx_converter_converter_sink_payload_data = {soc_liteethphymiirx_converter_sink_payload_data}; -assign soc_liteethphymiirx_converter_source_valid = soc_liteethphymiirx_converter_source_source_valid; -assign soc_liteethphymiirx_converter_source_first = soc_liteethphymiirx_converter_source_source_first; -assign soc_liteethphymiirx_converter_source_last = soc_liteethphymiirx_converter_source_source_last; -assign soc_liteethphymiirx_converter_source_source_ready = soc_liteethphymiirx_converter_source_ready; -always @(*) begin - soc_liteethphymiirx_converter_source_payload_data <= 8'd0; - soc_liteethphymiirx_converter_source_payload_data[3:0] <= soc_liteethphymiirx_converter_source_source_payload_data[3:0]; - soc_liteethphymiirx_converter_source_payload_data[7:4] <= soc_liteethphymiirx_converter_source_source_payload_data[7:4]; -end -assign soc_liteethphymiirx_converter_source_source_valid = soc_liteethphymiirx_converter_converter_source_valid; -assign soc_liteethphymiirx_converter_converter_source_ready = soc_liteethphymiirx_converter_source_source_ready; -assign soc_liteethphymiirx_converter_source_source_first = soc_liteethphymiirx_converter_converter_source_first; -assign soc_liteethphymiirx_converter_source_source_last = soc_liteethphymiirx_converter_converter_source_last; -assign soc_liteethphymiirx_converter_source_source_payload_data = soc_liteethphymiirx_converter_converter_source_payload_data; -assign soc_liteethphymiirx_converter_converter_sink_ready = ((~soc_liteethphymiirx_converter_converter_strobe_all) | soc_liteethphymiirx_converter_converter_source_ready); -assign soc_liteethphymiirx_converter_converter_source_valid = soc_liteethphymiirx_converter_converter_strobe_all; -assign soc_liteethphymiirx_converter_converter_load_part = (soc_liteethphymiirx_converter_converter_sink_valid & soc_liteethphymiirx_converter_converter_sink_ready); -assign eth_mdc = soc_storage[0]; -assign soc_data_oe = soc_storage[1]; -assign soc_data_w = soc_storage[2]; -assign soc_tx_cdc_sink_valid = soc_source_valid; -assign soc_source_ready = soc_tx_cdc_sink_ready; -assign soc_tx_cdc_sink_first = soc_source_first; -assign soc_tx_cdc_sink_last = soc_source_last; -assign soc_tx_cdc_sink_payload_data = soc_source_payload_data; -assign soc_tx_cdc_sink_payload_last_be = soc_source_payload_last_be; -assign soc_tx_cdc_sink_payload_error = soc_source_payload_error; -assign soc_sink_valid = soc_rx_cdc_source_valid; -assign soc_rx_cdc_source_ready = soc_sink_ready; -assign soc_sink_first = soc_rx_cdc_source_first; -assign soc_sink_last = soc_rx_cdc_source_last; -assign soc_sink_payload_data = soc_rx_cdc_source_payload_data; -assign soc_sink_payload_last_be = soc_rx_cdc_source_payload_last_be; -assign soc_sink_payload_error = soc_rx_cdc_source_payload_error; -assign soc_ps_preamble_error_i = soc_preamble_checker_error; -assign soc_ps_crc_error_i = soc_crc32_checker_error; -always @(*) begin - soc_tx_gap_inserter_source_first <= 1'd0; - soc_tx_gap_inserter_source_last <= 1'd0; - soc_tx_gap_inserter_source_payload_data <= 8'd0; - soc_tx_gap_inserter_source_payload_last_be <= 1'd0; - soc_tx_gap_inserter_source_payload_error <= 1'd0; - soc_tx_gap_inserter_counter_reset <= 1'd0; - soc_tx_gap_inserter_counter_ce <= 1'd0; - soc_tx_gap_inserter_sink_ready <= 1'd0; - vns_liteethmacgap_next_state <= 1'd0; - soc_tx_gap_inserter_source_valid <= 1'd0; - vns_liteethmacgap_next_state <= vns_liteethmacgap_state; - case (vns_liteethmacgap_state) - 1'd1: begin - soc_tx_gap_inserter_counter_ce <= 1'd1; - if ((soc_tx_gap_inserter_counter == 4'd11)) begin - vns_liteethmacgap_next_state <= 1'd0; - end - end - default: begin - soc_tx_gap_inserter_counter_reset <= 1'd1; - soc_tx_gap_inserter_source_valid <= soc_tx_gap_inserter_sink_valid; - soc_tx_gap_inserter_sink_ready <= soc_tx_gap_inserter_source_ready; - soc_tx_gap_inserter_source_first <= soc_tx_gap_inserter_sink_first; - soc_tx_gap_inserter_source_last <= soc_tx_gap_inserter_sink_last; - soc_tx_gap_inserter_source_payload_data <= soc_tx_gap_inserter_sink_payload_data; - soc_tx_gap_inserter_source_payload_last_be <= soc_tx_gap_inserter_sink_payload_last_be; - soc_tx_gap_inserter_source_payload_error <= soc_tx_gap_inserter_sink_payload_error; - if (((soc_tx_gap_inserter_sink_valid & soc_tx_gap_inserter_sink_last) & soc_tx_gap_inserter_sink_ready)) begin - vns_liteethmacgap_next_state <= 1'd1; - end - end - endcase -end -assign soc_preamble_inserter_source_payload_last_be = soc_preamble_inserter_sink_payload_last_be; -always @(*) begin - soc_preamble_inserter_source_payload_error <= 1'd0; - vns_liteethmacpreambleinserter_next_state <= 2'd0; - soc_preamble_inserter_clr_cnt <= 1'd0; - soc_preamble_inserter_sink_ready <= 1'd0; - soc_preamble_inserter_inc_cnt <= 1'd0; - soc_preamble_inserter_source_valid <= 1'd0; - soc_preamble_inserter_source_first <= 1'd0; - soc_preamble_inserter_source_last <= 1'd0; - soc_preamble_inserter_source_payload_data <= 8'd0; - soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_sink_payload_data; - vns_liteethmacpreambleinserter_next_state <= vns_liteethmacpreambleinserter_state; - case (vns_liteethmacpreambleinserter_state) - 1'd1: begin - soc_preamble_inserter_source_valid <= 1'd1; - case (soc_preamble_inserter_cnt) - 1'd0: begin - soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[7:0]; - end - 1'd1: begin - soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[15:8]; - end - 2'd2: begin - soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[23:16]; - end - 2'd3: begin - soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[31:24]; - end - 3'd4: begin - soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[39:32]; - end - 3'd5: begin - soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[47:40]; - end - 3'd6: begin - soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[55:48]; - end - default: begin - soc_preamble_inserter_source_payload_data <= soc_preamble_inserter_preamble[63:56]; - end - endcase - if ((soc_preamble_inserter_cnt == 3'd7)) begin - if (soc_preamble_inserter_source_ready) begin - vns_liteethmacpreambleinserter_next_state <= 2'd2; - end - end else begin - soc_preamble_inserter_inc_cnt <= soc_preamble_inserter_source_ready; - end - end - 2'd2: begin - soc_preamble_inserter_source_valid <= soc_preamble_inserter_sink_valid; - soc_preamble_inserter_sink_ready <= soc_preamble_inserter_source_ready; - soc_preamble_inserter_source_first <= soc_preamble_inserter_sink_first; - soc_preamble_inserter_source_last <= soc_preamble_inserter_sink_last; - soc_preamble_inserter_source_payload_error <= soc_preamble_inserter_sink_payload_error; - if (((soc_preamble_inserter_sink_valid & soc_preamble_inserter_sink_last) & soc_preamble_inserter_source_ready)) begin - vns_liteethmacpreambleinserter_next_state <= 1'd0; - end - end - default: begin - soc_preamble_inserter_sink_ready <= 1'd1; - soc_preamble_inserter_clr_cnt <= 1'd1; - if (soc_preamble_inserter_sink_valid) begin - soc_preamble_inserter_sink_ready <= 1'd0; - vns_liteethmacpreambleinserter_next_state <= 1'd1; - end - end - endcase -end -assign soc_preamble_checker_source_payload_data = soc_preamble_checker_sink_payload_data; -assign soc_preamble_checker_source_payload_last_be = soc_preamble_checker_sink_payload_last_be; -always @(*) begin - soc_preamble_checker_source_payload_error <= 1'd0; - soc_preamble_checker_error <= 1'd0; - soc_preamble_checker_source_valid <= 1'd0; - soc_preamble_checker_source_first <= 1'd0; - soc_preamble_checker_sink_ready <= 1'd0; - soc_preamble_checker_source_last <= 1'd0; - vns_liteethmacpreamblechecker_next_state <= 1'd0; - vns_liteethmacpreamblechecker_next_state <= vns_liteethmacpreamblechecker_state; - case (vns_liteethmacpreamblechecker_state) - 1'd1: begin - soc_preamble_checker_source_valid <= soc_preamble_checker_sink_valid; - soc_preamble_checker_sink_ready <= soc_preamble_checker_source_ready; - soc_preamble_checker_source_first <= soc_preamble_checker_sink_first; - soc_preamble_checker_source_last <= soc_preamble_checker_sink_last; - soc_preamble_checker_source_payload_error <= soc_preamble_checker_sink_payload_error; - if (((soc_preamble_checker_source_valid & soc_preamble_checker_source_last) & soc_preamble_checker_source_ready)) begin - vns_liteethmacpreamblechecker_next_state <= 1'd0; - end - end - default: begin - soc_preamble_checker_sink_ready <= 1'd1; - if (((soc_preamble_checker_sink_valid & (~soc_preamble_checker_sink_last)) & (soc_preamble_checker_sink_payload_data == 8'd213))) begin - vns_liteethmacpreamblechecker_next_state <= 1'd1; - end - if ((soc_preamble_checker_sink_valid & soc_preamble_checker_sink_last)) begin - soc_preamble_checker_error <= 1'd1; - end - end - endcase -end -assign soc_crc32_inserter_cnt_done = (soc_crc32_inserter_cnt == 1'd0); -assign soc_crc32_inserter_data1 = soc_crc32_inserter_data0; -assign soc_crc32_inserter_last = soc_crc32_inserter_reg; -assign soc_crc32_inserter_value = (~{soc_crc32_inserter_reg[0], soc_crc32_inserter_reg[1], soc_crc32_inserter_reg[2], soc_crc32_inserter_reg[3], soc_crc32_inserter_reg[4], soc_crc32_inserter_reg[5], soc_crc32_inserter_reg[6], soc_crc32_inserter_reg[7], soc_crc32_inserter_reg[8], soc_crc32_inserter_reg[9], soc_crc32_inserter_reg[10], soc_crc32_inserter_reg[11], soc_crc32_inserter_reg[12], soc_crc32_inserter_reg[13], soc_crc32_inserter_reg[14], soc_crc32_inserter_reg[15], soc_crc32_inserter_reg[16], soc_crc32_inserter_reg[17], soc_crc32_inserter_reg[18], soc_crc32_inserter_reg[19], soc_crc32_inserter_reg[20], soc_crc32_inserter_reg[21], soc_crc32_inserter_reg[22], soc_crc32_inserter_reg[23], soc_crc32_inserter_reg[24], soc_crc32_inserter_reg[25], soc_crc32_inserter_reg[26], soc_crc32_inserter_reg[27], soc_crc32_inserter_reg[28], soc_crc32_inserter_reg[29], soc_crc32_inserter_reg[30], soc_crc32_inserter_reg[31]}); -assign soc_crc32_inserter_error = (soc_crc32_inserter_next != 32'd3338984827); -always @(*) begin - soc_crc32_inserter_next <= 32'd0; - soc_crc32_inserter_next[0] <= (((soc_crc32_inserter_last[24] ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[1] <= (((((((soc_crc32_inserter_last[25] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[2] <= (((((((((soc_crc32_inserter_last[26] ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[3] <= (((((((soc_crc32_inserter_last[27] ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); - soc_crc32_inserter_next[4] <= (((((((((soc_crc32_inserter_last[28] ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[5] <= (((((((((((((soc_crc32_inserter_last[29] ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[6] <= (((((((((((soc_crc32_inserter_last[30] ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); - soc_crc32_inserter_next[7] <= (((((((((soc_crc32_inserter_last[31] ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[8] <= ((((((((soc_crc32_inserter_last[0] ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[9] <= ((((((((soc_crc32_inserter_last[1] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]); - soc_crc32_inserter_next[10] <= ((((((((soc_crc32_inserter_last[2] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[11] <= ((((((((soc_crc32_inserter_last[3] ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[12] <= ((((((((((((soc_crc32_inserter_last[4] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[13] <= ((((((((((((soc_crc32_inserter_last[5] ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); - soc_crc32_inserter_next[14] <= ((((((((((soc_crc32_inserter_last[6] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]); - soc_crc32_inserter_next[15] <= ((((((((soc_crc32_inserter_last[7] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]); - soc_crc32_inserter_next[16] <= ((((((soc_crc32_inserter_last[8] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[17] <= ((((((soc_crc32_inserter_last[9] ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]); - soc_crc32_inserter_next[18] <= ((((((soc_crc32_inserter_last[10] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]); - soc_crc32_inserter_next[19] <= ((((soc_crc32_inserter_last[11] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]); - soc_crc32_inserter_next[20] <= ((soc_crc32_inserter_last[12] ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]); - soc_crc32_inserter_next[21] <= ((soc_crc32_inserter_last[13] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]); - soc_crc32_inserter_next[22] <= ((soc_crc32_inserter_last[14] ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[23] <= ((((((soc_crc32_inserter_last[15] ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_data1[6]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[24] <= ((((((soc_crc32_inserter_last[16] ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); - soc_crc32_inserter_next[25] <= ((((soc_crc32_inserter_last[17] ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]); - soc_crc32_inserter_next[26] <= ((((((((soc_crc32_inserter_last[18] ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]) ^ soc_crc32_inserter_last[24]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_data1[7]); - soc_crc32_inserter_next[27] <= ((((((((soc_crc32_inserter_last[19] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]) ^ soc_crc32_inserter_last[25]) ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_data1[6]); - soc_crc32_inserter_next[28] <= ((((((soc_crc32_inserter_last[20] ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]) ^ soc_crc32_inserter_last[26]) ^ soc_crc32_inserter_data1[5]); - soc_crc32_inserter_next[29] <= ((((((soc_crc32_inserter_last[21] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[30]) ^ soc_crc32_inserter_data1[1]) ^ soc_crc32_inserter_last[27]) ^ soc_crc32_inserter_data1[4]); - soc_crc32_inserter_next[30] <= ((((soc_crc32_inserter_last[22] ^ soc_crc32_inserter_last[31]) ^ soc_crc32_inserter_data1[0]) ^ soc_crc32_inserter_last[28]) ^ soc_crc32_inserter_data1[3]); - soc_crc32_inserter_next[31] <= ((soc_crc32_inserter_last[23] ^ soc_crc32_inserter_last[29]) ^ soc_crc32_inserter_data1[2]); -end -always @(*) begin - soc_crc32_inserter_source_first <= 1'd0; - soc_crc32_inserter_source_last <= 1'd0; - soc_crc32_inserter_source_payload_data <= 8'd0; - soc_crc32_inserter_source_payload_last_be <= 1'd0; - soc_crc32_inserter_source_payload_error <= 1'd0; - soc_crc32_inserter_data0 <= 8'd0; - vns_liteethmaccrc32inserter_next_state <= 2'd0; - soc_crc32_inserter_is_ongoing0 <= 1'd0; - soc_crc32_inserter_sink_ready <= 1'd0; - soc_crc32_inserter_is_ongoing1 <= 1'd0; - soc_crc32_inserter_ce <= 1'd0; - soc_crc32_inserter_reset <= 1'd0; - soc_crc32_inserter_source_valid <= 1'd0; - vns_liteethmaccrc32inserter_next_state <= vns_liteethmaccrc32inserter_state; - case (vns_liteethmaccrc32inserter_state) - 1'd1: begin - soc_crc32_inserter_ce <= (soc_crc32_inserter_sink_valid & soc_crc32_inserter_source_ready); - soc_crc32_inserter_data0 <= soc_crc32_inserter_sink_payload_data; - soc_crc32_inserter_source_valid <= soc_crc32_inserter_sink_valid; - soc_crc32_inserter_sink_ready <= soc_crc32_inserter_source_ready; - soc_crc32_inserter_source_first <= soc_crc32_inserter_sink_first; - soc_crc32_inserter_source_last <= soc_crc32_inserter_sink_last; - soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_sink_payload_data; - soc_crc32_inserter_source_payload_last_be <= soc_crc32_inserter_sink_payload_last_be; - soc_crc32_inserter_source_payload_error <= soc_crc32_inserter_sink_payload_error; - soc_crc32_inserter_source_last <= 1'd0; - if (((soc_crc32_inserter_sink_valid & soc_crc32_inserter_sink_last) & soc_crc32_inserter_source_ready)) begin - vns_liteethmaccrc32inserter_next_state <= 2'd2; - end - end - 2'd2: begin - soc_crc32_inserter_source_valid <= 1'd1; - case (soc_crc32_inserter_cnt) - 1'd0: begin - soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_value[31:24]; - end - 1'd1: begin - soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_value[23:16]; - end - 2'd2: begin - soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_value[15:8]; - end - default: begin - soc_crc32_inserter_source_payload_data <= soc_crc32_inserter_value[7:0]; - end - endcase - if (soc_crc32_inserter_cnt_done) begin - soc_crc32_inserter_source_last <= 1'd1; - if (soc_crc32_inserter_source_ready) begin - vns_liteethmaccrc32inserter_next_state <= 1'd0; - end - end - soc_crc32_inserter_is_ongoing1 <= 1'd1; - end - default: begin - soc_crc32_inserter_reset <= 1'd1; - soc_crc32_inserter_sink_ready <= 1'd1; - if (soc_crc32_inserter_sink_valid) begin - soc_crc32_inserter_sink_ready <= 1'd0; - vns_liteethmaccrc32inserter_next_state <= 1'd1; - end - soc_crc32_inserter_is_ongoing0 <= 1'd1; - end - endcase -end -assign soc_crc32_checker_fifo_full = (soc_crc32_checker_syncfifo_level == 3'd4); -assign soc_crc32_checker_fifo_in = (soc_crc32_checker_sink_sink_valid & ((~soc_crc32_checker_fifo_full) | soc_crc32_checker_fifo_out)); -assign soc_crc32_checker_fifo_out = (soc_crc32_checker_source_source_valid & soc_crc32_checker_source_source_ready); -assign soc_crc32_checker_syncfifo_sink_first = soc_crc32_checker_sink_sink_first; -assign soc_crc32_checker_syncfifo_sink_last = soc_crc32_checker_sink_sink_last; -assign soc_crc32_checker_syncfifo_sink_payload_data = soc_crc32_checker_sink_sink_payload_data; -assign soc_crc32_checker_syncfifo_sink_payload_last_be = soc_crc32_checker_sink_sink_payload_last_be; -assign soc_crc32_checker_syncfifo_sink_payload_error = soc_crc32_checker_sink_sink_payload_error; -always @(*) begin - soc_crc32_checker_syncfifo_sink_valid <= 1'd0; - soc_crc32_checker_syncfifo_sink_valid <= soc_crc32_checker_sink_sink_valid; - soc_crc32_checker_syncfifo_sink_valid <= soc_crc32_checker_fifo_in; -end -always @(*) begin - soc_crc32_checker_sink_sink_ready <= 1'd0; - soc_crc32_checker_sink_sink_ready <= soc_crc32_checker_syncfifo_sink_ready; - soc_crc32_checker_sink_sink_ready <= soc_crc32_checker_fifo_in; -end -assign soc_crc32_checker_source_source_valid = (soc_crc32_checker_sink_sink_valid & soc_crc32_checker_fifo_full); -assign soc_crc32_checker_source_source_last = soc_crc32_checker_sink_sink_last; -assign soc_crc32_checker_syncfifo_source_ready = soc_crc32_checker_fifo_out; -assign soc_crc32_checker_source_source_payload_data = soc_crc32_checker_syncfifo_source_payload_data; -assign soc_crc32_checker_source_source_payload_last_be = soc_crc32_checker_syncfifo_source_payload_last_be; -always @(*) begin - soc_crc32_checker_source_source_payload_error <= 1'd0; - soc_crc32_checker_source_source_payload_error <= soc_crc32_checker_syncfifo_source_payload_error; - soc_crc32_checker_source_source_payload_error <= (soc_crc32_checker_sink_sink_payload_error | soc_crc32_checker_crc_error); -end -assign soc_crc32_checker_error = ((soc_crc32_checker_source_source_valid & soc_crc32_checker_source_source_last) & soc_crc32_checker_crc_error); -assign soc_crc32_checker_crc_data0 = soc_crc32_checker_sink_sink_payload_data; -assign soc_crc32_checker_crc_data1 = soc_crc32_checker_crc_data0; -assign soc_crc32_checker_crc_last = soc_crc32_checker_crc_reg; -assign soc_crc32_checker_crc_value = (~{soc_crc32_checker_crc_reg[0], soc_crc32_checker_crc_reg[1], soc_crc32_checker_crc_reg[2], soc_crc32_checker_crc_reg[3], soc_crc32_checker_crc_reg[4], soc_crc32_checker_crc_reg[5], soc_crc32_checker_crc_reg[6], soc_crc32_checker_crc_reg[7], soc_crc32_checker_crc_reg[8], soc_crc32_checker_crc_reg[9], soc_crc32_checker_crc_reg[10], soc_crc32_checker_crc_reg[11], soc_crc32_checker_crc_reg[12], soc_crc32_checker_crc_reg[13], soc_crc32_checker_crc_reg[14], soc_crc32_checker_crc_reg[15], soc_crc32_checker_crc_reg[16], soc_crc32_checker_crc_reg[17], soc_crc32_checker_crc_reg[18], soc_crc32_checker_crc_reg[19], soc_crc32_checker_crc_reg[20], soc_crc32_checker_crc_reg[21], soc_crc32_checker_crc_reg[22], soc_crc32_checker_crc_reg[23], soc_crc32_checker_crc_reg[24], soc_crc32_checker_crc_reg[25], soc_crc32_checker_crc_reg[26], soc_crc32_checker_crc_reg[27], soc_crc32_checker_crc_reg[28], soc_crc32_checker_crc_reg[29], soc_crc32_checker_crc_reg[30], soc_crc32_checker_crc_reg[31]}); -assign soc_crc32_checker_crc_error = (soc_crc32_checker_crc_next != 32'd3338984827); -always @(*) begin - soc_crc32_checker_crc_next <= 32'd0; - soc_crc32_checker_crc_next[0] <= (((soc_crc32_checker_crc_last[24] ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[1] <= (((((((soc_crc32_checker_crc_last[25] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[2] <= (((((((((soc_crc32_checker_crc_last[26] ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[3] <= (((((((soc_crc32_checker_crc_last[27] ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); - soc_crc32_checker_crc_next[4] <= (((((((((soc_crc32_checker_crc_last[28] ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[5] <= (((((((((((((soc_crc32_checker_crc_last[29] ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[6] <= (((((((((((soc_crc32_checker_crc_last[30] ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); - soc_crc32_checker_crc_next[7] <= (((((((((soc_crc32_checker_crc_last[31] ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[8] <= ((((((((soc_crc32_checker_crc_last[0] ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[9] <= ((((((((soc_crc32_checker_crc_last[1] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]); - soc_crc32_checker_crc_next[10] <= ((((((((soc_crc32_checker_crc_last[2] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[11] <= ((((((((soc_crc32_checker_crc_last[3] ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[12] <= ((((((((((((soc_crc32_checker_crc_last[4] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[13] <= ((((((((((((soc_crc32_checker_crc_last[5] ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); - soc_crc32_checker_crc_next[14] <= ((((((((((soc_crc32_checker_crc_last[6] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]); - soc_crc32_checker_crc_next[15] <= ((((((((soc_crc32_checker_crc_last[7] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]); - soc_crc32_checker_crc_next[16] <= ((((((soc_crc32_checker_crc_last[8] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[17] <= ((((((soc_crc32_checker_crc_last[9] ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]); - soc_crc32_checker_crc_next[18] <= ((((((soc_crc32_checker_crc_last[10] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]); - soc_crc32_checker_crc_next[19] <= ((((soc_crc32_checker_crc_last[11] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]); - soc_crc32_checker_crc_next[20] <= ((soc_crc32_checker_crc_last[12] ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]); - soc_crc32_checker_crc_next[21] <= ((soc_crc32_checker_crc_last[13] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]); - soc_crc32_checker_crc_next[22] <= ((soc_crc32_checker_crc_last[14] ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[23] <= ((((((soc_crc32_checker_crc_last[15] ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_data1[6]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[24] <= ((((((soc_crc32_checker_crc_last[16] ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); - soc_crc32_checker_crc_next[25] <= ((((soc_crc32_checker_crc_last[17] ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]); - soc_crc32_checker_crc_next[26] <= ((((((((soc_crc32_checker_crc_last[18] ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]) ^ soc_crc32_checker_crc_last[24]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_data1[7]); - soc_crc32_checker_crc_next[27] <= ((((((((soc_crc32_checker_crc_last[19] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]) ^ soc_crc32_checker_crc_last[25]) ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_data1[6]); - soc_crc32_checker_crc_next[28] <= ((((((soc_crc32_checker_crc_last[20] ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]) ^ soc_crc32_checker_crc_last[26]) ^ soc_crc32_checker_crc_data1[5]); - soc_crc32_checker_crc_next[29] <= ((((((soc_crc32_checker_crc_last[21] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[30]) ^ soc_crc32_checker_crc_data1[1]) ^ soc_crc32_checker_crc_last[27]) ^ soc_crc32_checker_crc_data1[4]); - soc_crc32_checker_crc_next[30] <= ((((soc_crc32_checker_crc_last[22] ^ soc_crc32_checker_crc_last[31]) ^ soc_crc32_checker_crc_data1[0]) ^ soc_crc32_checker_crc_last[28]) ^ soc_crc32_checker_crc_data1[3]); - soc_crc32_checker_crc_next[31] <= ((soc_crc32_checker_crc_last[23] ^ soc_crc32_checker_crc_last[29]) ^ soc_crc32_checker_crc_data1[2]); -end -assign soc_crc32_checker_syncfifo_syncfifo_din = {soc_crc32_checker_syncfifo_fifo_in_last, soc_crc32_checker_syncfifo_fifo_in_first, soc_crc32_checker_syncfifo_fifo_in_payload_error, soc_crc32_checker_syncfifo_fifo_in_payload_last_be, soc_crc32_checker_syncfifo_fifo_in_payload_data}; -assign {soc_crc32_checker_syncfifo_fifo_out_last, soc_crc32_checker_syncfifo_fifo_out_first, soc_crc32_checker_syncfifo_fifo_out_payload_error, soc_crc32_checker_syncfifo_fifo_out_payload_last_be, soc_crc32_checker_syncfifo_fifo_out_payload_data} = soc_crc32_checker_syncfifo_syncfifo_dout; -assign soc_crc32_checker_syncfifo_sink_ready = soc_crc32_checker_syncfifo_syncfifo_writable; -assign soc_crc32_checker_syncfifo_syncfifo_we = soc_crc32_checker_syncfifo_sink_valid; -assign soc_crc32_checker_syncfifo_fifo_in_first = soc_crc32_checker_syncfifo_sink_first; -assign soc_crc32_checker_syncfifo_fifo_in_last = soc_crc32_checker_syncfifo_sink_last; -assign soc_crc32_checker_syncfifo_fifo_in_payload_data = soc_crc32_checker_syncfifo_sink_payload_data; -assign soc_crc32_checker_syncfifo_fifo_in_payload_last_be = soc_crc32_checker_syncfifo_sink_payload_last_be; -assign soc_crc32_checker_syncfifo_fifo_in_payload_error = soc_crc32_checker_syncfifo_sink_payload_error; -assign soc_crc32_checker_syncfifo_source_valid = soc_crc32_checker_syncfifo_syncfifo_readable; -assign soc_crc32_checker_syncfifo_source_first = soc_crc32_checker_syncfifo_fifo_out_first; -assign soc_crc32_checker_syncfifo_source_last = soc_crc32_checker_syncfifo_fifo_out_last; -assign soc_crc32_checker_syncfifo_source_payload_data = soc_crc32_checker_syncfifo_fifo_out_payload_data; -assign soc_crc32_checker_syncfifo_source_payload_last_be = soc_crc32_checker_syncfifo_fifo_out_payload_last_be; -assign soc_crc32_checker_syncfifo_source_payload_error = soc_crc32_checker_syncfifo_fifo_out_payload_error; -assign soc_crc32_checker_syncfifo_syncfifo_re = soc_crc32_checker_syncfifo_source_ready; -always @(*) begin - soc_crc32_checker_syncfifo_wrport_adr <= 3'd0; - if (soc_crc32_checker_syncfifo_replace) begin - soc_crc32_checker_syncfifo_wrport_adr <= (soc_crc32_checker_syncfifo_produce - 1'd1); - end else begin - soc_crc32_checker_syncfifo_wrport_adr <= soc_crc32_checker_syncfifo_produce; - end -end -assign soc_crc32_checker_syncfifo_wrport_dat_w = soc_crc32_checker_syncfifo_syncfifo_din; -assign soc_crc32_checker_syncfifo_wrport_we = (soc_crc32_checker_syncfifo_syncfifo_we & (soc_crc32_checker_syncfifo_syncfifo_writable | soc_crc32_checker_syncfifo_replace)); -assign soc_crc32_checker_syncfifo_do_read = (soc_crc32_checker_syncfifo_syncfifo_readable & soc_crc32_checker_syncfifo_syncfifo_re); -assign soc_crc32_checker_syncfifo_rdport_adr = soc_crc32_checker_syncfifo_consume; -assign soc_crc32_checker_syncfifo_syncfifo_dout = soc_crc32_checker_syncfifo_rdport_dat_r; -assign soc_crc32_checker_syncfifo_syncfifo_writable = (soc_crc32_checker_syncfifo_level != 3'd5); -assign soc_crc32_checker_syncfifo_syncfifo_readable = (soc_crc32_checker_syncfifo_level != 1'd0); -always @(*) begin - soc_crc32_checker_crc_ce <= 1'd0; - vns_liteethmaccrc32checker_next_state <= 2'd0; - soc_crc32_checker_crc_reset <= 1'd0; - soc_crc32_checker_fifo_reset <= 1'd0; - vns_liteethmaccrc32checker_next_state <= vns_liteethmaccrc32checker_state; - case (vns_liteethmaccrc32checker_state) - 1'd1: begin - if ((soc_crc32_checker_sink_sink_valid & soc_crc32_checker_sink_sink_ready)) begin - soc_crc32_checker_crc_ce <= 1'd1; - vns_liteethmaccrc32checker_next_state <= 2'd2; - end - end - 2'd2: begin - if ((soc_crc32_checker_sink_sink_valid & soc_crc32_checker_sink_sink_ready)) begin - soc_crc32_checker_crc_ce <= 1'd1; - if (soc_crc32_checker_sink_sink_last) begin - vns_liteethmaccrc32checker_next_state <= 1'd0; - end - end - end - default: begin - soc_crc32_checker_crc_reset <= 1'd1; - soc_crc32_checker_fifo_reset <= 1'd1; - vns_liteethmaccrc32checker_next_state <= 1'd1; - end - endcase -end -assign soc_ps_preamble_error_o = (soc_ps_preamble_error_toggle_o ^ soc_ps_preamble_error_toggle_o_r); -assign soc_ps_crc_error_o = (soc_ps_crc_error_toggle_o ^ soc_ps_crc_error_toggle_o_r); -assign soc_padding_inserter_counter_done = (soc_padding_inserter_counter >= 6'd59); -always @(*) begin - soc_padding_inserter_source_valid <= 1'd0; - soc_padding_inserter_source_first <= 1'd0; - soc_padding_inserter_source_last <= 1'd0; - soc_padding_inserter_source_payload_data <= 8'd0; - soc_padding_inserter_source_payload_last_be <= 1'd0; - soc_padding_inserter_source_payload_error <= 1'd0; - vns_liteethmacpaddinginserter_next_state <= 1'd0; - soc_padding_inserter_counter_reset <= 1'd0; - soc_padding_inserter_sink_ready <= 1'd0; - soc_padding_inserter_counter_ce <= 1'd0; - vns_liteethmacpaddinginserter_next_state <= vns_liteethmacpaddinginserter_state; - case (vns_liteethmacpaddinginserter_state) - 1'd1: begin - soc_padding_inserter_source_valid <= 1'd1; - soc_padding_inserter_source_last <= soc_padding_inserter_counter_done; - soc_padding_inserter_source_payload_data <= 1'd0; - if ((soc_padding_inserter_source_valid & soc_padding_inserter_source_ready)) begin - soc_padding_inserter_counter_ce <= 1'd1; - if (soc_padding_inserter_counter_done) begin - soc_padding_inserter_counter_reset <= 1'd1; - vns_liteethmacpaddinginserter_next_state <= 1'd0; - end - end - end - default: begin - soc_padding_inserter_source_valid <= soc_padding_inserter_sink_valid; - soc_padding_inserter_sink_ready <= soc_padding_inserter_source_ready; - soc_padding_inserter_source_first <= soc_padding_inserter_sink_first; - soc_padding_inserter_source_last <= soc_padding_inserter_sink_last; - soc_padding_inserter_source_payload_data <= soc_padding_inserter_sink_payload_data; - soc_padding_inserter_source_payload_last_be <= soc_padding_inserter_sink_payload_last_be; - soc_padding_inserter_source_payload_error <= soc_padding_inserter_sink_payload_error; - if ((soc_padding_inserter_source_valid & soc_padding_inserter_source_ready)) begin - soc_padding_inserter_counter_ce <= 1'd1; - if (soc_padding_inserter_sink_last) begin - if ((~soc_padding_inserter_counter_done)) begin - soc_padding_inserter_source_last <= 1'd0; - vns_liteethmacpaddinginserter_next_state <= 1'd1; - end else begin - soc_padding_inserter_counter_reset <= 1'd1; - end - end - end - end - endcase -end -assign soc_padding_checker_source_valid = soc_padding_checker_sink_valid; -assign soc_padding_checker_sink_ready = soc_padding_checker_source_ready; -assign soc_padding_checker_source_first = soc_padding_checker_sink_first; -assign soc_padding_checker_source_last = soc_padding_checker_sink_last; -assign soc_padding_checker_source_payload_data = soc_padding_checker_sink_payload_data; -assign soc_padding_checker_source_payload_last_be = soc_padding_checker_sink_payload_last_be; -assign soc_padding_checker_source_payload_error = soc_padding_checker_sink_payload_error; -assign soc_tx_last_be_source_valid = (soc_tx_last_be_sink_valid & soc_tx_last_be_ongoing); -assign soc_tx_last_be_source_last = soc_tx_last_be_sink_payload_last_be; -assign soc_tx_last_be_source_payload_data = soc_tx_last_be_sink_payload_data; -assign soc_tx_last_be_sink_ready = soc_tx_last_be_source_ready; -assign soc_rx_last_be_source_valid = soc_rx_last_be_sink_valid; -assign soc_rx_last_be_sink_ready = soc_rx_last_be_source_ready; -assign soc_rx_last_be_source_first = soc_rx_last_be_sink_first; -assign soc_rx_last_be_source_last = soc_rx_last_be_sink_last; -assign soc_rx_last_be_source_payload_data = soc_rx_last_be_sink_payload_data; -assign soc_rx_last_be_source_payload_error = soc_rx_last_be_sink_payload_error; -always @(*) begin - soc_rx_last_be_source_payload_last_be <= 1'd0; - soc_rx_last_be_source_payload_last_be <= soc_rx_last_be_sink_payload_last_be; - soc_rx_last_be_source_payload_last_be <= soc_rx_last_be_sink_last; -end -assign soc_tx_converter_converter_sink_valid = soc_tx_converter_sink_valid; -assign soc_tx_converter_converter_sink_first = soc_tx_converter_sink_first; -assign soc_tx_converter_converter_sink_last = soc_tx_converter_sink_last; -assign soc_tx_converter_sink_ready = soc_tx_converter_converter_sink_ready; -always @(*) begin - soc_tx_converter_converter_sink_payload_data <= 40'd0; - soc_tx_converter_converter_sink_payload_data[7:0] <= soc_tx_converter_sink_payload_data[7:0]; - soc_tx_converter_converter_sink_payload_data[8] <= soc_tx_converter_sink_payload_last_be[0]; - soc_tx_converter_converter_sink_payload_data[9] <= soc_tx_converter_sink_payload_error[0]; - soc_tx_converter_converter_sink_payload_data[17:10] <= soc_tx_converter_sink_payload_data[15:8]; - soc_tx_converter_converter_sink_payload_data[18] <= soc_tx_converter_sink_payload_last_be[1]; - soc_tx_converter_converter_sink_payload_data[19] <= soc_tx_converter_sink_payload_error[1]; - soc_tx_converter_converter_sink_payload_data[27:20] <= soc_tx_converter_sink_payload_data[23:16]; - soc_tx_converter_converter_sink_payload_data[28] <= soc_tx_converter_sink_payload_last_be[2]; - soc_tx_converter_converter_sink_payload_data[29] <= soc_tx_converter_sink_payload_error[2]; - soc_tx_converter_converter_sink_payload_data[37:30] <= soc_tx_converter_sink_payload_data[31:24]; - soc_tx_converter_converter_sink_payload_data[38] <= soc_tx_converter_sink_payload_last_be[3]; - soc_tx_converter_converter_sink_payload_data[39] <= soc_tx_converter_sink_payload_error[3]; -end -assign soc_tx_converter_source_valid = soc_tx_converter_source_source_valid; -assign soc_tx_converter_source_first = soc_tx_converter_source_source_first; -assign soc_tx_converter_source_last = soc_tx_converter_source_source_last; -assign soc_tx_converter_source_source_ready = soc_tx_converter_source_ready; -assign {soc_tx_converter_source_payload_error, soc_tx_converter_source_payload_last_be, soc_tx_converter_source_payload_data} = soc_tx_converter_source_source_payload_data; -assign soc_tx_converter_source_source_valid = soc_tx_converter_converter_source_valid; -assign soc_tx_converter_converter_source_ready = soc_tx_converter_source_source_ready; -assign soc_tx_converter_source_source_first = soc_tx_converter_converter_source_first; -assign soc_tx_converter_source_source_last = soc_tx_converter_converter_source_last; -assign soc_tx_converter_source_source_payload_data = soc_tx_converter_converter_source_payload_data; -assign soc_tx_converter_converter_first = (soc_tx_converter_converter_mux == 1'd0); -assign soc_tx_converter_converter_last = (soc_tx_converter_converter_mux == 2'd3); -assign soc_tx_converter_converter_source_valid = soc_tx_converter_converter_sink_valid; -assign soc_tx_converter_converter_source_first = (soc_tx_converter_converter_sink_first & soc_tx_converter_converter_first); -assign soc_tx_converter_converter_source_last = (soc_tx_converter_converter_sink_last & soc_tx_converter_converter_last); -assign soc_tx_converter_converter_sink_ready = (soc_tx_converter_converter_last & soc_tx_converter_converter_source_ready); -always @(*) begin - soc_tx_converter_converter_source_payload_data <= 10'd0; - case (soc_tx_converter_converter_mux) - 1'd0: begin - soc_tx_converter_converter_source_payload_data <= soc_tx_converter_converter_sink_payload_data[9:0]; - end - 1'd1: begin - soc_tx_converter_converter_source_payload_data <= soc_tx_converter_converter_sink_payload_data[19:10]; - end - 2'd2: begin - soc_tx_converter_converter_source_payload_data <= soc_tx_converter_converter_sink_payload_data[29:20]; - end - default: begin - soc_tx_converter_converter_source_payload_data <= soc_tx_converter_converter_sink_payload_data[39:30]; - end - endcase -end -assign soc_tx_converter_converter_source_payload_valid_token_count = soc_tx_converter_converter_last; -assign soc_rx_converter_converter_sink_valid = soc_rx_converter_sink_valid; -assign soc_rx_converter_converter_sink_first = soc_rx_converter_sink_first; -assign soc_rx_converter_converter_sink_last = soc_rx_converter_sink_last; -assign soc_rx_converter_sink_ready = soc_rx_converter_converter_sink_ready; -assign soc_rx_converter_converter_sink_payload_data = {soc_rx_converter_sink_payload_error, soc_rx_converter_sink_payload_last_be, soc_rx_converter_sink_payload_data}; -assign soc_rx_converter_source_valid = soc_rx_converter_source_source_valid; -assign soc_rx_converter_source_first = soc_rx_converter_source_source_first; -assign soc_rx_converter_source_last = soc_rx_converter_source_source_last; -assign soc_rx_converter_source_source_ready = soc_rx_converter_source_ready; -always @(*) begin - soc_rx_converter_source_payload_data <= 32'd0; - soc_rx_converter_source_payload_data[7:0] <= soc_rx_converter_source_source_payload_data[7:0]; - soc_rx_converter_source_payload_data[15:8] <= soc_rx_converter_source_source_payload_data[17:10]; - soc_rx_converter_source_payload_data[23:16] <= soc_rx_converter_source_source_payload_data[27:20]; - soc_rx_converter_source_payload_data[31:24] <= soc_rx_converter_source_source_payload_data[37:30]; -end -always @(*) begin - soc_rx_converter_source_payload_last_be <= 4'd0; - soc_rx_converter_source_payload_last_be[0] <= soc_rx_converter_source_source_payload_data[8]; - soc_rx_converter_source_payload_last_be[1] <= soc_rx_converter_source_source_payload_data[18]; - soc_rx_converter_source_payload_last_be[2] <= soc_rx_converter_source_source_payload_data[28]; - soc_rx_converter_source_payload_last_be[3] <= soc_rx_converter_source_source_payload_data[38]; -end -always @(*) begin - soc_rx_converter_source_payload_error <= 4'd0; - soc_rx_converter_source_payload_error[0] <= soc_rx_converter_source_source_payload_data[9]; - soc_rx_converter_source_payload_error[1] <= soc_rx_converter_source_source_payload_data[19]; - soc_rx_converter_source_payload_error[2] <= soc_rx_converter_source_source_payload_data[29]; - soc_rx_converter_source_payload_error[3] <= soc_rx_converter_source_source_payload_data[39]; -end -assign soc_rx_converter_source_source_valid = soc_rx_converter_converter_source_valid; -assign soc_rx_converter_converter_source_ready = soc_rx_converter_source_source_ready; -assign soc_rx_converter_source_source_first = soc_rx_converter_converter_source_first; -assign soc_rx_converter_source_source_last = soc_rx_converter_converter_source_last; -assign soc_rx_converter_source_source_payload_data = soc_rx_converter_converter_source_payload_data; -assign soc_rx_converter_converter_sink_ready = ((~soc_rx_converter_converter_strobe_all) | soc_rx_converter_converter_source_ready); -assign soc_rx_converter_converter_source_valid = soc_rx_converter_converter_strobe_all; -assign soc_rx_converter_converter_load_part = (soc_rx_converter_converter_sink_valid & soc_rx_converter_converter_sink_ready); -assign soc_tx_cdc_asyncfifo_din = {soc_tx_cdc_fifo_in_last, soc_tx_cdc_fifo_in_first, soc_tx_cdc_fifo_in_payload_error, soc_tx_cdc_fifo_in_payload_last_be, soc_tx_cdc_fifo_in_payload_data}; -assign {soc_tx_cdc_fifo_out_last, soc_tx_cdc_fifo_out_first, soc_tx_cdc_fifo_out_payload_error, soc_tx_cdc_fifo_out_payload_last_be, soc_tx_cdc_fifo_out_payload_data} = soc_tx_cdc_asyncfifo_dout; -assign soc_tx_cdc_sink_ready = soc_tx_cdc_asyncfifo_writable; -assign soc_tx_cdc_asyncfifo_we = soc_tx_cdc_sink_valid; -assign soc_tx_cdc_fifo_in_first = soc_tx_cdc_sink_first; -assign soc_tx_cdc_fifo_in_last = soc_tx_cdc_sink_last; -assign soc_tx_cdc_fifo_in_payload_data = soc_tx_cdc_sink_payload_data; -assign soc_tx_cdc_fifo_in_payload_last_be = soc_tx_cdc_sink_payload_last_be; -assign soc_tx_cdc_fifo_in_payload_error = soc_tx_cdc_sink_payload_error; -assign soc_tx_cdc_source_valid = soc_tx_cdc_asyncfifo_readable; -assign soc_tx_cdc_source_first = soc_tx_cdc_fifo_out_first; -assign soc_tx_cdc_source_last = soc_tx_cdc_fifo_out_last; -assign soc_tx_cdc_source_payload_data = soc_tx_cdc_fifo_out_payload_data; -assign soc_tx_cdc_source_payload_last_be = soc_tx_cdc_fifo_out_payload_last_be; -assign soc_tx_cdc_source_payload_error = soc_tx_cdc_fifo_out_payload_error; -assign soc_tx_cdc_asyncfifo_re = soc_tx_cdc_source_ready; -assign soc_tx_cdc_graycounter0_ce = (soc_tx_cdc_asyncfifo_writable & soc_tx_cdc_asyncfifo_we); -assign soc_tx_cdc_graycounter1_ce = (soc_tx_cdc_asyncfifo_readable & soc_tx_cdc_asyncfifo_re); -assign soc_tx_cdc_asyncfifo_writable = (((soc_tx_cdc_graycounter0_q[6] == soc_tx_cdc_consume_wdomain[6]) | (soc_tx_cdc_graycounter0_q[5] == soc_tx_cdc_consume_wdomain[5])) | (soc_tx_cdc_graycounter0_q[4:0] != soc_tx_cdc_consume_wdomain[4:0])); -assign soc_tx_cdc_asyncfifo_readable = (soc_tx_cdc_graycounter1_q != soc_tx_cdc_produce_rdomain); -assign soc_tx_cdc_wrport_adr = soc_tx_cdc_graycounter0_q_binary[5:0]; -assign soc_tx_cdc_wrport_dat_w = soc_tx_cdc_asyncfifo_din; -assign soc_tx_cdc_wrport_we = soc_tx_cdc_graycounter0_ce; -assign soc_tx_cdc_rdport_adr = soc_tx_cdc_graycounter1_q_next_binary[5:0]; -assign soc_tx_cdc_asyncfifo_dout = soc_tx_cdc_rdport_dat_r; -always @(*) begin - soc_tx_cdc_graycounter0_q_next_binary <= 7'd0; - if (soc_tx_cdc_graycounter0_ce) begin - soc_tx_cdc_graycounter0_q_next_binary <= (soc_tx_cdc_graycounter0_q_binary + 1'd1); - end else begin - soc_tx_cdc_graycounter0_q_next_binary <= soc_tx_cdc_graycounter0_q_binary; - end -end -assign soc_tx_cdc_graycounter0_q_next = (soc_tx_cdc_graycounter0_q_next_binary ^ soc_tx_cdc_graycounter0_q_next_binary[6:1]); -always @(*) begin - soc_tx_cdc_graycounter1_q_next_binary <= 7'd0; - if (soc_tx_cdc_graycounter1_ce) begin - soc_tx_cdc_graycounter1_q_next_binary <= (soc_tx_cdc_graycounter1_q_binary + 1'd1); - end else begin - soc_tx_cdc_graycounter1_q_next_binary <= soc_tx_cdc_graycounter1_q_binary; - end -end -assign soc_tx_cdc_graycounter1_q_next = (soc_tx_cdc_graycounter1_q_next_binary ^ soc_tx_cdc_graycounter1_q_next_binary[6:1]); -assign soc_rx_cdc_asyncfifo_din = {soc_rx_cdc_fifo_in_last, soc_rx_cdc_fifo_in_first, soc_rx_cdc_fifo_in_payload_error, soc_rx_cdc_fifo_in_payload_last_be, soc_rx_cdc_fifo_in_payload_data}; -assign {soc_rx_cdc_fifo_out_last, soc_rx_cdc_fifo_out_first, soc_rx_cdc_fifo_out_payload_error, soc_rx_cdc_fifo_out_payload_last_be, soc_rx_cdc_fifo_out_payload_data} = soc_rx_cdc_asyncfifo_dout; -assign soc_rx_cdc_sink_ready = soc_rx_cdc_asyncfifo_writable; -assign soc_rx_cdc_asyncfifo_we = soc_rx_cdc_sink_valid; -assign soc_rx_cdc_fifo_in_first = soc_rx_cdc_sink_first; -assign soc_rx_cdc_fifo_in_last = soc_rx_cdc_sink_last; -assign soc_rx_cdc_fifo_in_payload_data = soc_rx_cdc_sink_payload_data; -assign soc_rx_cdc_fifo_in_payload_last_be = soc_rx_cdc_sink_payload_last_be; -assign soc_rx_cdc_fifo_in_payload_error = soc_rx_cdc_sink_payload_error; -assign soc_rx_cdc_source_valid = soc_rx_cdc_asyncfifo_readable; -assign soc_rx_cdc_source_first = soc_rx_cdc_fifo_out_first; -assign soc_rx_cdc_source_last = soc_rx_cdc_fifo_out_last; -assign soc_rx_cdc_source_payload_data = soc_rx_cdc_fifo_out_payload_data; -assign soc_rx_cdc_source_payload_last_be = soc_rx_cdc_fifo_out_payload_last_be; -assign soc_rx_cdc_source_payload_error = soc_rx_cdc_fifo_out_payload_error; -assign soc_rx_cdc_asyncfifo_re = soc_rx_cdc_source_ready; -assign soc_rx_cdc_graycounter0_ce = (soc_rx_cdc_asyncfifo_writable & soc_rx_cdc_asyncfifo_we); -assign soc_rx_cdc_graycounter1_ce = (soc_rx_cdc_asyncfifo_readable & soc_rx_cdc_asyncfifo_re); -assign soc_rx_cdc_asyncfifo_writable = (((soc_rx_cdc_graycounter0_q[6] == soc_rx_cdc_consume_wdomain[6]) | (soc_rx_cdc_graycounter0_q[5] == soc_rx_cdc_consume_wdomain[5])) | (soc_rx_cdc_graycounter0_q[4:0] != soc_rx_cdc_consume_wdomain[4:0])); -assign soc_rx_cdc_asyncfifo_readable = (soc_rx_cdc_graycounter1_q != soc_rx_cdc_produce_rdomain); -assign soc_rx_cdc_wrport_adr = soc_rx_cdc_graycounter0_q_binary[5:0]; -assign soc_rx_cdc_wrport_dat_w = soc_rx_cdc_asyncfifo_din; -assign soc_rx_cdc_wrport_we = soc_rx_cdc_graycounter0_ce; -assign soc_rx_cdc_rdport_adr = soc_rx_cdc_graycounter1_q_next_binary[5:0]; -assign soc_rx_cdc_asyncfifo_dout = soc_rx_cdc_rdport_dat_r; -always @(*) begin - soc_rx_cdc_graycounter0_q_next_binary <= 7'd0; - if (soc_rx_cdc_graycounter0_ce) begin - soc_rx_cdc_graycounter0_q_next_binary <= (soc_rx_cdc_graycounter0_q_binary + 1'd1); - end else begin - soc_rx_cdc_graycounter0_q_next_binary <= soc_rx_cdc_graycounter0_q_binary; - end -end -assign soc_rx_cdc_graycounter0_q_next = (soc_rx_cdc_graycounter0_q_next_binary ^ soc_rx_cdc_graycounter0_q_next_binary[6:1]); -always @(*) begin - soc_rx_cdc_graycounter1_q_next_binary <= 7'd0; - if (soc_rx_cdc_graycounter1_ce) begin - soc_rx_cdc_graycounter1_q_next_binary <= (soc_rx_cdc_graycounter1_q_binary + 1'd1); - end else begin - soc_rx_cdc_graycounter1_q_next_binary <= soc_rx_cdc_graycounter1_q_binary; - end -end -assign soc_rx_cdc_graycounter1_q_next = (soc_rx_cdc_graycounter1_q_next_binary ^ soc_rx_cdc_graycounter1_q_next_binary[6:1]); -assign soc_tx_converter_sink_valid = soc_tx_cdc_source_valid; -assign soc_tx_cdc_source_ready = soc_tx_converter_sink_ready; -assign soc_tx_converter_sink_first = soc_tx_cdc_source_first; -assign soc_tx_converter_sink_last = soc_tx_cdc_source_last; -assign soc_tx_converter_sink_payload_data = soc_tx_cdc_source_payload_data; -assign soc_tx_converter_sink_payload_last_be = soc_tx_cdc_source_payload_last_be; -assign soc_tx_converter_sink_payload_error = soc_tx_cdc_source_payload_error; -assign soc_tx_last_be_sink_valid = soc_tx_converter_source_valid; -assign soc_tx_converter_source_ready = soc_tx_last_be_sink_ready; -assign soc_tx_last_be_sink_first = soc_tx_converter_source_first; -assign soc_tx_last_be_sink_last = soc_tx_converter_source_last; -assign soc_tx_last_be_sink_payload_data = soc_tx_converter_source_payload_data; -assign soc_tx_last_be_sink_payload_last_be = soc_tx_converter_source_payload_last_be; -assign soc_tx_last_be_sink_payload_error = soc_tx_converter_source_payload_error; -assign soc_padding_inserter_sink_valid = soc_tx_last_be_source_valid; -assign soc_tx_last_be_source_ready = soc_padding_inserter_sink_ready; -assign soc_padding_inserter_sink_first = soc_tx_last_be_source_first; -assign soc_padding_inserter_sink_last = soc_tx_last_be_source_last; -assign soc_padding_inserter_sink_payload_data = soc_tx_last_be_source_payload_data; -assign soc_padding_inserter_sink_payload_last_be = soc_tx_last_be_source_payload_last_be; -assign soc_padding_inserter_sink_payload_error = soc_tx_last_be_source_payload_error; -assign soc_crc32_inserter_sink_valid = soc_padding_inserter_source_valid; -assign soc_padding_inserter_source_ready = soc_crc32_inserter_sink_ready; -assign soc_crc32_inserter_sink_first = soc_padding_inserter_source_first; -assign soc_crc32_inserter_sink_last = soc_padding_inserter_source_last; -assign soc_crc32_inserter_sink_payload_data = soc_padding_inserter_source_payload_data; -assign soc_crc32_inserter_sink_payload_last_be = soc_padding_inserter_source_payload_last_be; -assign soc_crc32_inserter_sink_payload_error = soc_padding_inserter_source_payload_error; -assign soc_preamble_inserter_sink_valid = soc_crc32_inserter_source_valid; -assign soc_crc32_inserter_source_ready = soc_preamble_inserter_sink_ready; -assign soc_preamble_inserter_sink_first = soc_crc32_inserter_source_first; -assign soc_preamble_inserter_sink_last = soc_crc32_inserter_source_last; -assign soc_preamble_inserter_sink_payload_data = soc_crc32_inserter_source_payload_data; -assign soc_preamble_inserter_sink_payload_last_be = soc_crc32_inserter_source_payload_last_be; -assign soc_preamble_inserter_sink_payload_error = soc_crc32_inserter_source_payload_error; -assign soc_tx_gap_inserter_sink_valid = soc_preamble_inserter_source_valid; -assign soc_preamble_inserter_source_ready = soc_tx_gap_inserter_sink_ready; -assign soc_tx_gap_inserter_sink_first = soc_preamble_inserter_source_first; -assign soc_tx_gap_inserter_sink_last = soc_preamble_inserter_source_last; -assign soc_tx_gap_inserter_sink_payload_data = soc_preamble_inserter_source_payload_data; -assign soc_tx_gap_inserter_sink_payload_last_be = soc_preamble_inserter_source_payload_last_be; -assign soc_tx_gap_inserter_sink_payload_error = soc_preamble_inserter_source_payload_error; -assign soc_liteethphymiitx_sink_sink_valid = soc_tx_gap_inserter_source_valid; -assign soc_tx_gap_inserter_source_ready = soc_liteethphymiitx_sink_sink_ready; -assign soc_liteethphymiitx_sink_sink_first = soc_tx_gap_inserter_source_first; -assign soc_liteethphymiitx_sink_sink_last = soc_tx_gap_inserter_source_last; -assign soc_liteethphymiitx_sink_sink_payload_data = soc_tx_gap_inserter_source_payload_data; -assign soc_liteethphymiitx_sink_sink_payload_last_be = soc_tx_gap_inserter_source_payload_last_be; -assign soc_liteethphymiitx_sink_sink_payload_error = soc_tx_gap_inserter_source_payload_error; -assign soc_preamble_checker_sink_valid = soc_liteethphymiirx_source_source_valid; -assign soc_liteethphymiirx_source_source_ready = soc_preamble_checker_sink_ready; -assign soc_preamble_checker_sink_first = soc_liteethphymiirx_source_source_first; -assign soc_preamble_checker_sink_last = soc_liteethphymiirx_source_source_last; -assign soc_preamble_checker_sink_payload_data = soc_liteethphymiirx_source_source_payload_data; -assign soc_preamble_checker_sink_payload_last_be = soc_liteethphymiirx_source_source_payload_last_be; -assign soc_preamble_checker_sink_payload_error = soc_liteethphymiirx_source_source_payload_error; -assign soc_crc32_checker_sink_sink_valid = soc_preamble_checker_source_valid; -assign soc_preamble_checker_source_ready = soc_crc32_checker_sink_sink_ready; -assign soc_crc32_checker_sink_sink_first = soc_preamble_checker_source_first; -assign soc_crc32_checker_sink_sink_last = soc_preamble_checker_source_last; -assign soc_crc32_checker_sink_sink_payload_data = soc_preamble_checker_source_payload_data; -assign soc_crc32_checker_sink_sink_payload_last_be = soc_preamble_checker_source_payload_last_be; -assign soc_crc32_checker_sink_sink_payload_error = soc_preamble_checker_source_payload_error; -assign soc_padding_checker_sink_valid = soc_crc32_checker_source_source_valid; -assign soc_crc32_checker_source_source_ready = soc_padding_checker_sink_ready; -assign soc_padding_checker_sink_first = soc_crc32_checker_source_source_first; -assign soc_padding_checker_sink_last = soc_crc32_checker_source_source_last; -assign soc_padding_checker_sink_payload_data = soc_crc32_checker_source_source_payload_data; -assign soc_padding_checker_sink_payload_last_be = soc_crc32_checker_source_source_payload_last_be; -assign soc_padding_checker_sink_payload_error = soc_crc32_checker_source_source_payload_error; -assign soc_rx_last_be_sink_valid = soc_padding_checker_source_valid; -assign soc_padding_checker_source_ready = soc_rx_last_be_sink_ready; -assign soc_rx_last_be_sink_first = soc_padding_checker_source_first; -assign soc_rx_last_be_sink_last = soc_padding_checker_source_last; -assign soc_rx_last_be_sink_payload_data = soc_padding_checker_source_payload_data; -assign soc_rx_last_be_sink_payload_last_be = soc_padding_checker_source_payload_last_be; -assign soc_rx_last_be_sink_payload_error = soc_padding_checker_source_payload_error; -assign soc_rx_converter_sink_valid = soc_rx_last_be_source_valid; -assign soc_rx_last_be_source_ready = soc_rx_converter_sink_ready; -assign soc_rx_converter_sink_first = soc_rx_last_be_source_first; -assign soc_rx_converter_sink_last = soc_rx_last_be_source_last; -assign soc_rx_converter_sink_payload_data = soc_rx_last_be_source_payload_data; -assign soc_rx_converter_sink_payload_last_be = soc_rx_last_be_source_payload_last_be; -assign soc_rx_converter_sink_payload_error = soc_rx_last_be_source_payload_error; -assign soc_rx_cdc_sink_valid = soc_rx_converter_source_valid; -assign soc_rx_converter_source_ready = soc_rx_cdc_sink_ready; -assign soc_rx_cdc_sink_first = soc_rx_converter_source_first; -assign soc_rx_cdc_sink_last = soc_rx_converter_source_last; -assign soc_rx_cdc_sink_payload_data = soc_rx_converter_source_payload_data; -assign soc_rx_cdc_sink_payload_last_be = soc_rx_converter_source_payload_last_be; -assign soc_rx_cdc_sink_payload_error = soc_rx_converter_source_payload_error; -assign soc_writer_sink_sink_valid = soc_sink_valid; -assign soc_sink_ready = soc_writer_sink_sink_ready; -assign soc_writer_sink_sink_first = soc_sink_first; -assign soc_writer_sink_sink_last = soc_sink_last; -assign soc_writer_sink_sink_payload_data = soc_sink_payload_data; -assign soc_writer_sink_sink_payload_last_be = soc_sink_payload_last_be; -assign soc_writer_sink_sink_payload_error = soc_sink_payload_error; -assign soc_source_valid = soc_reader_source_source_valid; -assign soc_reader_source_source_ready = soc_source_ready; -assign soc_source_first = soc_reader_source_source_first; -assign soc_source_last = soc_reader_source_source_last; -assign soc_source_payload_data = soc_reader_source_source_payload_data; -assign soc_source_payload_last_be = soc_reader_source_source_payload_last_be; -assign soc_source_payload_error = soc_reader_source_source_payload_error; -always @(*) begin - soc_writer_inc <= 3'd0; - case (soc_writer_sink_sink_payload_last_be) - 1'd1: begin - soc_writer_inc <= 1'd1; - end - 2'd2: begin - soc_writer_inc <= 2'd2; - end - 3'd4: begin - soc_writer_inc <= 2'd3; - end - default: begin - soc_writer_inc <= 3'd4; - end - endcase -end -assign soc_writer_fifo_sink_payload_slot = soc_writer_slot; -assign soc_writer_fifo_sink_payload_length = soc_writer_counter; -assign soc_writer_fifo_source_ready = soc_writer_available_clear; -assign soc_writer_available_trigger = soc_writer_fifo_source_valid; -assign soc_writer_slot_status = soc_writer_fifo_source_payload_slot; -assign soc_writer_length_status = soc_writer_fifo_source_payload_length; -always @(*) begin - soc_writer_memory0_adr <= 9'd0; - soc_writer_memory1_dat_w <= 32'd0; - soc_writer_memory0_we <= 1'd0; - soc_writer_memory0_dat_w <= 32'd0; - soc_writer_memory1_adr <= 9'd0; - soc_writer_memory1_we <= 1'd0; - case (soc_writer_slot) - 1'd0: begin - soc_writer_memory0_adr <= soc_writer_counter[31:2]; - soc_writer_memory0_dat_w <= soc_writer_sink_sink_payload_data; - if ((soc_writer_sink_sink_valid & soc_writer_ongoing)) begin - soc_writer_memory0_we <= 4'd15; - end - end - 1'd1: begin - soc_writer_memory1_adr <= soc_writer_counter[31:2]; - soc_writer_memory1_dat_w <= soc_writer_sink_sink_payload_data; - if ((soc_writer_sink_sink_valid & soc_writer_ongoing)) begin - soc_writer_memory1_we <= 4'd15; - end - end - endcase -end -assign soc_writer_status_w = soc_writer_available_status; -always @(*) begin - soc_writer_available_clear <= 1'd0; - if ((soc_writer_pending_re & soc_writer_pending_r)) begin - soc_writer_available_clear <= 1'd1; - end -end -assign soc_writer_pending_w = soc_writer_available_pending; -assign soc_writer_irq = (soc_writer_pending_w & soc_writer_storage); -assign soc_writer_available_status = soc_writer_available_trigger; -assign soc_writer_available_pending = soc_writer_available_trigger; -assign soc_writer_fifo_syncfifo_din = {soc_writer_fifo_fifo_in_last, soc_writer_fifo_fifo_in_first, soc_writer_fifo_fifo_in_payload_length, soc_writer_fifo_fifo_in_payload_slot}; -assign {soc_writer_fifo_fifo_out_last, soc_writer_fifo_fifo_out_first, soc_writer_fifo_fifo_out_payload_length, soc_writer_fifo_fifo_out_payload_slot} = soc_writer_fifo_syncfifo_dout; -assign soc_writer_fifo_sink_ready = soc_writer_fifo_syncfifo_writable; -assign soc_writer_fifo_syncfifo_we = soc_writer_fifo_sink_valid; -assign soc_writer_fifo_fifo_in_first = soc_writer_fifo_sink_first; -assign soc_writer_fifo_fifo_in_last = soc_writer_fifo_sink_last; -assign soc_writer_fifo_fifo_in_payload_slot = soc_writer_fifo_sink_payload_slot; -assign soc_writer_fifo_fifo_in_payload_length = soc_writer_fifo_sink_payload_length; -assign soc_writer_fifo_source_valid = soc_writer_fifo_syncfifo_readable; -assign soc_writer_fifo_source_first = soc_writer_fifo_fifo_out_first; -assign soc_writer_fifo_source_last = soc_writer_fifo_fifo_out_last; -assign soc_writer_fifo_source_payload_slot = soc_writer_fifo_fifo_out_payload_slot; -assign soc_writer_fifo_source_payload_length = soc_writer_fifo_fifo_out_payload_length; -assign soc_writer_fifo_syncfifo_re = soc_writer_fifo_source_ready; -always @(*) begin - soc_writer_fifo_wrport_adr <= 1'd0; - if (soc_writer_fifo_replace) begin - soc_writer_fifo_wrport_adr <= (soc_writer_fifo_produce - 1'd1); - end else begin - soc_writer_fifo_wrport_adr <= soc_writer_fifo_produce; - end -end -assign soc_writer_fifo_wrport_dat_w = soc_writer_fifo_syncfifo_din; -assign soc_writer_fifo_wrport_we = (soc_writer_fifo_syncfifo_we & (soc_writer_fifo_syncfifo_writable | soc_writer_fifo_replace)); -assign soc_writer_fifo_do_read = (soc_writer_fifo_syncfifo_readable & soc_writer_fifo_syncfifo_re); -assign soc_writer_fifo_rdport_adr = soc_writer_fifo_consume; -assign soc_writer_fifo_syncfifo_dout = soc_writer_fifo_rdport_dat_r; -assign soc_writer_fifo_syncfifo_writable = (soc_writer_fifo_level != 2'd2); -assign soc_writer_fifo_syncfifo_readable = (soc_writer_fifo_level != 1'd0); -always @(*) begin - soc_writer_slot_ce <= 1'd0; - soc_writer_errors_status_liteethmac_next_value <= 32'd0; - soc_writer_errors_status_liteethmac_next_value_ce <= 1'd0; - soc_writer_ongoing <= 1'd0; - soc_writer_fifo_sink_valid <= 1'd0; - soc_writer_counter_reset <= 1'd0; - soc_writer_counter_ce <= 1'd0; - vns_liteethmacsramwriter_next_state <= 3'd0; - vns_liteethmacsramwriter_next_state <= vns_liteethmacsramwriter_state; - case (vns_liteethmacsramwriter_state) - 1'd1: begin - if (soc_writer_sink_sink_valid) begin - if ((soc_writer_counter == 11'd1530)) begin - vns_liteethmacsramwriter_next_state <= 2'd3; - end else begin - soc_writer_counter_ce <= 1'd1; - soc_writer_ongoing <= 1'd1; - end - if (soc_writer_sink_sink_last) begin - if (((soc_writer_sink_sink_payload_error & soc_writer_sink_sink_payload_last_be) != 1'd0)) begin - vns_liteethmacsramwriter_next_state <= 2'd2; - end else begin - vns_liteethmacsramwriter_next_state <= 3'd4; - end - end - end - end - 2'd2: begin - soc_writer_counter_reset <= 1'd1; - vns_liteethmacsramwriter_next_state <= 1'd0; - end - 2'd3: begin - if ((soc_writer_sink_sink_valid & soc_writer_sink_sink_last)) begin - vns_liteethmacsramwriter_next_state <= 3'd4; - end - end - 3'd4: begin - soc_writer_counter_reset <= 1'd1; - soc_writer_slot_ce <= 1'd1; - soc_writer_fifo_sink_valid <= 1'd1; - vns_liteethmacsramwriter_next_state <= 1'd0; - end - default: begin - if (soc_writer_sink_sink_valid) begin - if (soc_writer_fifo_sink_ready) begin - soc_writer_ongoing <= 1'd1; - soc_writer_counter_ce <= 1'd1; - vns_liteethmacsramwriter_next_state <= 1'd1; - end else begin - soc_writer_errors_status_liteethmac_next_value <= (soc_writer_errors_status + 1'd1); - soc_writer_errors_status_liteethmac_next_value_ce <= 1'd1; - vns_liteethmacsramwriter_next_state <= 2'd3; - end - end - end - endcase -end -assign soc_reader_fifo_sink_valid = soc_reader_start_re; -assign soc_reader_fifo_sink_payload_slot = soc_reader_slot_storage; -assign soc_reader_fifo_sink_payload_length = soc_reader_length_storage; -assign soc_reader_ready_status = soc_reader_fifo_sink_ready; -assign soc_reader_level_status = soc_reader_fifo_level; -always @(*) begin - soc_reader_source_source_payload_last_be <= 4'd0; - if (soc_reader_last) begin - case (soc_reader_fifo_source_payload_length[1:0]) - 1'd0: begin - soc_reader_source_source_payload_last_be <= 4'd8; - end - 1'd1: begin - soc_reader_source_source_payload_last_be <= 1'd1; - end - 2'd2: begin - soc_reader_source_source_payload_last_be <= 2'd2; - end - 2'd3: begin - soc_reader_source_source_payload_last_be <= 3'd4; - end - endcase - end -end -assign soc_reader_last = ((soc_reader_counter + 3'd4) >= soc_reader_fifo_source_payload_length); -assign soc_reader_memory0_adr = soc_reader_counter[10:2]; -assign soc_reader_memory1_adr = soc_reader_counter[10:2]; -always @(*) begin - soc_reader_source_source_payload_data <= 32'd0; - case (soc_reader_fifo_source_payload_slot) - 1'd0: begin - soc_reader_source_source_payload_data <= soc_reader_memory0_dat_r; - end - 1'd1: begin - soc_reader_source_source_payload_data <= soc_reader_memory1_dat_r; - end - endcase -end -assign soc_reader_eventmanager_status_w = soc_reader_done_status; -always @(*) begin - soc_reader_done_clear <= 1'd0; - if ((soc_reader_eventmanager_pending_re & soc_reader_eventmanager_pending_r)) begin - soc_reader_done_clear <= 1'd1; - end -end -assign soc_reader_eventmanager_pending_w = soc_reader_done_pending; -assign soc_reader_irq = (soc_reader_eventmanager_pending_w & soc_reader_eventmanager_storage); -assign soc_reader_done_status = 1'd0; -assign soc_reader_fifo_syncfifo_din = {soc_reader_fifo_fifo_in_last, soc_reader_fifo_fifo_in_first, soc_reader_fifo_fifo_in_payload_length, soc_reader_fifo_fifo_in_payload_slot}; -assign {soc_reader_fifo_fifo_out_last, soc_reader_fifo_fifo_out_first, soc_reader_fifo_fifo_out_payload_length, soc_reader_fifo_fifo_out_payload_slot} = soc_reader_fifo_syncfifo_dout; -assign soc_reader_fifo_sink_ready = soc_reader_fifo_syncfifo_writable; -assign soc_reader_fifo_syncfifo_we = soc_reader_fifo_sink_valid; -assign soc_reader_fifo_fifo_in_first = soc_reader_fifo_sink_first; -assign soc_reader_fifo_fifo_in_last = soc_reader_fifo_sink_last; -assign soc_reader_fifo_fifo_in_payload_slot = soc_reader_fifo_sink_payload_slot; -assign soc_reader_fifo_fifo_in_payload_length = soc_reader_fifo_sink_payload_length; -assign soc_reader_fifo_source_valid = soc_reader_fifo_syncfifo_readable; -assign soc_reader_fifo_source_first = soc_reader_fifo_fifo_out_first; -assign soc_reader_fifo_source_last = soc_reader_fifo_fifo_out_last; -assign soc_reader_fifo_source_payload_slot = soc_reader_fifo_fifo_out_payload_slot; -assign soc_reader_fifo_source_payload_length = soc_reader_fifo_fifo_out_payload_length; -assign soc_reader_fifo_syncfifo_re = soc_reader_fifo_source_ready; -always @(*) begin - soc_reader_fifo_wrport_adr <= 1'd0; - if (soc_reader_fifo_replace) begin - soc_reader_fifo_wrport_adr <= (soc_reader_fifo_produce - 1'd1); - end else begin - soc_reader_fifo_wrport_adr <= soc_reader_fifo_produce; - end -end -assign soc_reader_fifo_wrport_dat_w = soc_reader_fifo_syncfifo_din; -assign soc_reader_fifo_wrport_we = (soc_reader_fifo_syncfifo_we & (soc_reader_fifo_syncfifo_writable | soc_reader_fifo_replace)); -assign soc_reader_fifo_do_read = (soc_reader_fifo_syncfifo_readable & soc_reader_fifo_syncfifo_re); -assign soc_reader_fifo_rdport_adr = soc_reader_fifo_consume; -assign soc_reader_fifo_syncfifo_dout = soc_reader_fifo_rdport_dat_r; -assign soc_reader_fifo_syncfifo_writable = (soc_reader_fifo_level != 2'd2); -assign soc_reader_fifo_syncfifo_readable = (soc_reader_fifo_level != 1'd0); -always @(*) begin - soc_reader_counter_reset <= 1'd0; - soc_reader_counter_ce <= 1'd0; - soc_reader_source_source_last <= 1'd0; - soc_reader_fifo_source_ready <= 1'd0; - vns_liteethmacsramreader_next_state <= 2'd0; - soc_reader_source_source_valid <= 1'd0; - soc_reader_done_trigger <= 1'd0; - vns_liteethmacsramreader_next_state <= vns_liteethmacsramreader_state; - case (vns_liteethmacsramreader_state) - 1'd1: begin - if ((~soc_reader_last_d)) begin - vns_liteethmacsramreader_next_state <= 2'd2; - end else begin - vns_liteethmacsramreader_next_state <= 2'd3; - end - end - 2'd2: begin - soc_reader_source_source_valid <= 1'd1; - soc_reader_source_source_last <= soc_reader_last; - if (soc_reader_source_source_ready) begin - soc_reader_counter_ce <= (~soc_reader_last); - vns_liteethmacsramreader_next_state <= 1'd1; - end - end - 2'd3: begin - soc_reader_fifo_source_ready <= 1'd1; - soc_reader_done_trigger <= 1'd1; - vns_liteethmacsramreader_next_state <= 1'd0; - end - default: begin - soc_reader_counter_reset <= 1'd1; - if (soc_reader_fifo_source_valid) begin - vns_liteethmacsramreader_next_state <= 1'd1; - end - end - endcase -end -assign soc_ev_irq = (soc_writer_irq | soc_reader_irq); -assign soc_sram0_adr0 = soc_sram0_bus_adr0[8:0]; -assign soc_sram0_bus_dat_r0 = soc_sram0_dat_r0; -assign soc_sram1_adr0 = soc_sram1_bus_adr0[8:0]; -assign soc_sram1_bus_dat_r0 = soc_sram1_dat_r0; -always @(*) begin - soc_sram0_we <= 4'd0; - soc_sram0_we[0] <= (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & soc_sram0_bus_we1) & soc_sram0_bus_sel1[0]); - soc_sram0_we[1] <= (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & soc_sram0_bus_we1) & soc_sram0_bus_sel1[1]); - soc_sram0_we[2] <= (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & soc_sram0_bus_we1) & soc_sram0_bus_sel1[2]); - soc_sram0_we[3] <= (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & soc_sram0_bus_we1) & soc_sram0_bus_sel1[3]); -end -assign soc_sram0_adr1 = soc_sram0_bus_adr1[8:0]; -assign soc_sram0_bus_dat_r1 = soc_sram0_dat_r1; -assign soc_sram0_dat_w = soc_sram0_bus_dat_w1; -always @(*) begin - soc_sram1_we <= 4'd0; - soc_sram1_we[0] <= (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & soc_sram1_bus_we1) & soc_sram1_bus_sel1[0]); - soc_sram1_we[1] <= (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & soc_sram1_bus_we1) & soc_sram1_bus_sel1[1]); - soc_sram1_we[2] <= (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & soc_sram1_bus_we1) & soc_sram1_bus_sel1[2]); - soc_sram1_we[3] <= (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & soc_sram1_bus_we1) & soc_sram1_bus_sel1[3]); -end -assign soc_sram1_adr1 = soc_sram1_bus_adr1[8:0]; -assign soc_sram1_bus_dat_r1 = soc_sram1_dat_r1; -assign soc_sram1_dat_w = soc_sram1_bus_dat_w1; -always @(*) begin - soc_slave_sel <= 4'd0; - soc_slave_sel[0] <= (soc_bus_adr[10:9] == 1'd0); - soc_slave_sel[1] <= (soc_bus_adr[10:9] == 1'd1); - soc_slave_sel[2] <= (soc_bus_adr[10:9] == 2'd2); - soc_slave_sel[3] <= (soc_bus_adr[10:9] == 2'd3); -end -assign soc_sram0_bus_adr0 = soc_bus_adr; -assign soc_sram0_bus_dat_w0 = soc_bus_dat_w; -assign soc_sram0_bus_sel0 = soc_bus_sel; -assign soc_sram0_bus_stb0 = soc_bus_stb; -assign soc_sram0_bus_we0 = soc_bus_we; -assign soc_sram0_bus_cti0 = soc_bus_cti; -assign soc_sram0_bus_bte0 = soc_bus_bte; -assign soc_sram1_bus_adr0 = soc_bus_adr; -assign soc_sram1_bus_dat_w0 = soc_bus_dat_w; -assign soc_sram1_bus_sel0 = soc_bus_sel; -assign soc_sram1_bus_stb0 = soc_bus_stb; -assign soc_sram1_bus_we0 = soc_bus_we; -assign soc_sram1_bus_cti0 = soc_bus_cti; -assign soc_sram1_bus_bte0 = soc_bus_bte; -assign soc_sram0_bus_adr1 = soc_bus_adr; -assign soc_sram0_bus_dat_w1 = soc_bus_dat_w; -assign soc_sram0_bus_sel1 = soc_bus_sel; -assign soc_sram0_bus_stb1 = soc_bus_stb; -assign soc_sram0_bus_we1 = soc_bus_we; -assign soc_sram0_bus_cti1 = soc_bus_cti; -assign soc_sram0_bus_bte1 = soc_bus_bte; -assign soc_sram1_bus_adr1 = soc_bus_adr; -assign soc_sram1_bus_dat_w1 = soc_bus_dat_w; -assign soc_sram1_bus_sel1 = soc_bus_sel; -assign soc_sram1_bus_stb1 = soc_bus_stb; -assign soc_sram1_bus_we1 = soc_bus_we; -assign soc_sram1_bus_cti1 = soc_bus_cti; -assign soc_sram1_bus_bte1 = soc_bus_bte; -assign soc_sram0_bus_cyc0 = (soc_bus_cyc & soc_slave_sel[0]); -assign soc_sram1_bus_cyc0 = (soc_bus_cyc & soc_slave_sel[1]); -assign soc_sram0_bus_cyc1 = (soc_bus_cyc & soc_slave_sel[2]); -assign soc_sram1_bus_cyc1 = (soc_bus_cyc & soc_slave_sel[3]); -assign soc_bus_ack = (((soc_sram0_bus_ack0 | soc_sram1_bus_ack0) | soc_sram0_bus_ack1) | soc_sram1_bus_ack1); -assign soc_bus_err = (((soc_sram0_bus_err0 | soc_sram1_bus_err0) | soc_sram0_bus_err1) | soc_sram1_bus_err1); -assign soc_bus_dat_r = (((({32{soc_slave_sel_r[0]}} & soc_sram0_bus_dat_r0) | ({32{soc_slave_sel_r[1]}} & soc_sram1_bus_dat_r0)) | ({32{soc_slave_sel_r[2]}} & soc_sram0_bus_dat_r1)) | ({32{soc_slave_sel_r[3]}} & soc_sram1_bus_dat_r1)); -assign soc_netsoc_interface0_wb_sdram_adr = vns_rhs_array_muxed36; -assign soc_netsoc_interface0_wb_sdram_dat_w = vns_rhs_array_muxed37; -assign soc_netsoc_interface0_wb_sdram_sel = vns_rhs_array_muxed38; -assign soc_netsoc_interface0_wb_sdram_cyc = vns_rhs_array_muxed39; -assign soc_netsoc_interface0_wb_sdram_stb = vns_rhs_array_muxed40; -assign soc_netsoc_interface0_wb_sdram_we = vns_rhs_array_muxed41; -assign soc_netsoc_interface0_wb_sdram_cti = vns_rhs_array_muxed42; -assign soc_netsoc_interface0_wb_sdram_bte = vns_rhs_array_muxed43; -assign soc_netsoc_interface1_wb_sdram_dat_r = soc_netsoc_interface0_wb_sdram_dat_r; -assign soc_netsoc_interface1_wb_sdram_ack = (soc_netsoc_interface0_wb_sdram_ack & (vns_wb_sdram_con_grant == 1'd0)); -assign soc_netsoc_interface1_wb_sdram_err = (soc_netsoc_interface0_wb_sdram_err & (vns_wb_sdram_con_grant == 1'd0)); -assign vns_wb_sdram_con_request = {soc_netsoc_interface1_wb_sdram_cyc}; -assign vns_wb_sdram_con_grant = 1'd0; -assign vns_netsoc_shared_adr = vns_rhs_array_muxed44; -assign vns_netsoc_shared_dat_w = vns_rhs_array_muxed45; -assign vns_netsoc_shared_sel = vns_rhs_array_muxed46; -assign vns_netsoc_shared_cyc = vns_rhs_array_muxed47; -assign vns_netsoc_shared_stb = vns_rhs_array_muxed48; -assign vns_netsoc_shared_we = vns_rhs_array_muxed49; -assign vns_netsoc_shared_cti = vns_rhs_array_muxed50; -assign vns_netsoc_shared_bte = vns_rhs_array_muxed51; -assign soc_netsoc_interface0_soc_bus_dat_r = vns_netsoc_shared_dat_r; -assign soc_netsoc_interface1_soc_bus_dat_r = vns_netsoc_shared_dat_r; -assign soc_netsoc_interface0_soc_bus_ack = (vns_netsoc_shared_ack & (vns_netsoc_grant == 1'd0)); -assign soc_netsoc_interface1_soc_bus_ack = (vns_netsoc_shared_ack & (vns_netsoc_grant == 1'd1)); -assign soc_netsoc_interface0_soc_bus_err = (vns_netsoc_shared_err & (vns_netsoc_grant == 1'd0)); -assign soc_netsoc_interface1_soc_bus_err = (vns_netsoc_shared_err & (vns_netsoc_grant == 1'd1)); -assign vns_netsoc_request = {soc_netsoc_interface1_soc_bus_cyc, soc_netsoc_interface0_soc_bus_cyc}; -always @(*) begin - vns_netsoc_slave_sel <= 6'd0; - vns_netsoc_slave_sel[0] <= (vns_netsoc_shared_adr[28:14] == 1'd0); - vns_netsoc_slave_sel[1] <= (vns_netsoc_shared_adr[28:13] == 14'd8192); - vns_netsoc_slave_sel[2] <= (vns_netsoc_shared_adr[28:22] == 7'd112); - vns_netsoc_slave_sel[3] <= (vns_netsoc_shared_adr[28:12] == 17'd81920); - vns_netsoc_slave_sel[4] <= (vns_netsoc_shared_adr[28:26] == 3'd4); - vns_netsoc_slave_sel[5] <= (vns_netsoc_shared_adr[28:26] == 2'd3); -end -assign soc_netsoc_rom_bus_adr = vns_netsoc_shared_adr; -assign soc_netsoc_rom_bus_dat_w = vns_netsoc_shared_dat_w; -assign soc_netsoc_rom_bus_sel = vns_netsoc_shared_sel; -assign soc_netsoc_rom_bus_stb = vns_netsoc_shared_stb; -assign soc_netsoc_rom_bus_we = vns_netsoc_shared_we; -assign soc_netsoc_rom_bus_cti = vns_netsoc_shared_cti; -assign soc_netsoc_rom_bus_bte = vns_netsoc_shared_bte; -assign soc_netsoc_sram_bus_adr = vns_netsoc_shared_adr; -assign soc_netsoc_sram_bus_dat_w = vns_netsoc_shared_dat_w; -assign soc_netsoc_sram_bus_sel = vns_netsoc_shared_sel; -assign soc_netsoc_sram_bus_stb = vns_netsoc_shared_stb; -assign soc_netsoc_sram_bus_we = vns_netsoc_shared_we; -assign soc_netsoc_sram_bus_cti = vns_netsoc_shared_cti; -assign soc_netsoc_sram_bus_bte = vns_netsoc_shared_bte; -assign soc_netsoc_bus_wishbone_adr = vns_netsoc_shared_adr; -assign soc_netsoc_bus_wishbone_dat_w = vns_netsoc_shared_dat_w; -assign soc_netsoc_bus_wishbone_sel = vns_netsoc_shared_sel; -assign soc_netsoc_bus_wishbone_stb = vns_netsoc_shared_stb; -assign soc_netsoc_bus_wishbone_we = vns_netsoc_shared_we; -assign soc_netsoc_bus_wishbone_cti = vns_netsoc_shared_cti; -assign soc_netsoc_bus_wishbone_bte = vns_netsoc_shared_bte; -assign soc_emulator_ram_bus_adr = vns_netsoc_shared_adr; -assign soc_emulator_ram_bus_dat_w = vns_netsoc_shared_dat_w; -assign soc_emulator_ram_bus_sel = vns_netsoc_shared_sel; -assign soc_emulator_ram_bus_stb = vns_netsoc_shared_stb; -assign soc_emulator_ram_bus_we = vns_netsoc_shared_we; -assign soc_emulator_ram_bus_cti = vns_netsoc_shared_cti; -assign soc_emulator_ram_bus_bte = vns_netsoc_shared_bte; -assign soc_netsoc_interface1_wb_sdram_adr = vns_netsoc_shared_adr; -assign soc_netsoc_interface1_wb_sdram_dat_w = vns_netsoc_shared_dat_w; -assign soc_netsoc_interface1_wb_sdram_sel = vns_netsoc_shared_sel; -assign soc_netsoc_interface1_wb_sdram_stb = vns_netsoc_shared_stb; -assign soc_netsoc_interface1_wb_sdram_we = vns_netsoc_shared_we; -assign soc_netsoc_interface1_wb_sdram_cti = vns_netsoc_shared_cti; -assign soc_netsoc_interface1_wb_sdram_bte = vns_netsoc_shared_bte; -assign soc_bus_adr = vns_netsoc_shared_adr; -assign soc_bus_dat_w = vns_netsoc_shared_dat_w; -assign soc_bus_sel = vns_netsoc_shared_sel; -assign soc_bus_stb = vns_netsoc_shared_stb; -assign soc_bus_we = vns_netsoc_shared_we; -assign soc_bus_cti = vns_netsoc_shared_cti; -assign soc_bus_bte = vns_netsoc_shared_bte; -assign soc_netsoc_rom_bus_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[0]); -assign soc_netsoc_sram_bus_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[1]); -assign soc_netsoc_bus_wishbone_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[2]); -assign soc_emulator_ram_bus_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[3]); -assign soc_netsoc_interface1_wb_sdram_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[4]); -assign soc_bus_cyc = (vns_netsoc_shared_cyc & vns_netsoc_slave_sel[5]); -assign vns_netsoc_shared_err = (((((soc_netsoc_rom_bus_err | soc_netsoc_sram_bus_err) | soc_netsoc_bus_wishbone_err) | soc_emulator_ram_bus_err) | soc_netsoc_interface1_wb_sdram_err) | soc_bus_err); -assign vns_netsoc_wait = ((vns_netsoc_shared_stb & vns_netsoc_shared_cyc) & (~vns_netsoc_shared_ack)); -always @(*) begin - vns_netsoc_error <= 1'd0; - vns_netsoc_shared_ack <= 1'd0; - vns_netsoc_shared_dat_r <= 32'd0; - vns_netsoc_shared_ack <= (((((soc_netsoc_rom_bus_ack | soc_netsoc_sram_bus_ack) | soc_netsoc_bus_wishbone_ack) | soc_emulator_ram_bus_ack) | soc_netsoc_interface1_wb_sdram_ack) | soc_bus_ack); - vns_netsoc_shared_dat_r <= (((((({32{vns_netsoc_slave_sel_r[0]}} & soc_netsoc_rom_bus_dat_r) | ({32{vns_netsoc_slave_sel_r[1]}} & soc_netsoc_sram_bus_dat_r)) | ({32{vns_netsoc_slave_sel_r[2]}} & soc_netsoc_bus_wishbone_dat_r)) | ({32{vns_netsoc_slave_sel_r[3]}} & soc_emulator_ram_bus_dat_r)) | ({32{vns_netsoc_slave_sel_r[4]}} & soc_netsoc_interface1_wb_sdram_dat_r)) | ({32{vns_netsoc_slave_sel_r[5]}} & soc_bus_dat_r)); - if (vns_netsoc_done) begin - vns_netsoc_shared_dat_r <= 32'd4294967295; - vns_netsoc_shared_ack <= 1'd1; - vns_netsoc_error <= 1'd1; - end -end -assign vns_netsoc_done = (vns_netsoc_count == 1'd0); -assign vns_netsoc_csrbankarray_csrbank0_sel = (vns_netsoc_csrbankarray_interface0_bank_bus_adr[13:9] == 1'd1); -assign soc_netsoc_cpu_latch_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[0]; -assign soc_netsoc_cpu_latch_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 1'd0)); -assign soc_netsoc_cpu_latch_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time7_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time7_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time7_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time6_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time6_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time6_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time5_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time5_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time5_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time4_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time4_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time4_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time3_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time3_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time3_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time2_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time2_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time2_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time1_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time1_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time1_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time0_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time0_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd8)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time0_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd8)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd9)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd9)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd10)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd10)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd11)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd11)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd12)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd12)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd13)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd13)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd14)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd14)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd15)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 4'd15)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_r = vns_netsoc_csrbankarray_interface0_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_re = ((vns_netsoc_csrbankarray_csrbank0_sel & vns_netsoc_csrbankarray_interface0_bank_bus_we) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 5'd16)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_we = ((vns_netsoc_csrbankarray_csrbank0_sel & (~vns_netsoc_csrbankarray_interface0_bank_bus_we)) & (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0] == 5'd16)); -assign vns_netsoc_csrbankarray_csrbank0_timer_time7_w = soc_netsoc_cpu_time_status[63:56]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time6_w = soc_netsoc_cpu_time_status[55:48]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time5_w = soc_netsoc_cpu_time_status[47:40]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time4_w = soc_netsoc_cpu_time_status[39:32]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time3_w = soc_netsoc_cpu_time_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time2_w = soc_netsoc_cpu_time_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time1_w = soc_netsoc_cpu_time_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time0_w = soc_netsoc_cpu_time_status[7:0]; -assign soc_netsoc_cpu_time_we = vns_netsoc_csrbankarray_csrbank0_timer_time0_we; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_w = soc_netsoc_cpu_time_cmp_storage[63:56]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_w = soc_netsoc_cpu_time_cmp_storage[55:48]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_w = soc_netsoc_cpu_time_cmp_storage[47:40]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_w = soc_netsoc_cpu_time_cmp_storage[39:32]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_w = soc_netsoc_cpu_time_cmp_storage[31:24]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_w = soc_netsoc_cpu_time_cmp_storage[23:16]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_w = soc_netsoc_cpu_time_cmp_storage[15:8]; -assign vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_w = soc_netsoc_cpu_time_cmp_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_sel = (vns_netsoc_csrbankarray_interface1_bank_bus_adr[13:9] == 1'd0); -assign soc_netsoc_ctrl_reset_reset_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[0]; -assign soc_netsoc_ctrl_reset_reset_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 1'd0)); -assign soc_netsoc_ctrl_reset_reset_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank1_scratch3_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_scratch3_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank1_scratch3_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank1_scratch2_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_scratch2_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank1_scratch2_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank1_scratch1_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_scratch1_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank1_scratch1_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank1_scratch0_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_scratch0_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank1_scratch0_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank1_bus_errors3_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_bus_errors3_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank1_bus_errors3_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank1_bus_errors2_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_bus_errors2_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank1_bus_errors2_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank1_bus_errors1_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_bus_errors1_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank1_bus_errors1_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank1_bus_errors0_r = vns_netsoc_csrbankarray_interface1_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_bus_errors0_re = ((vns_netsoc_csrbankarray_csrbank1_sel & vns_netsoc_csrbankarray_interface1_bank_bus_we) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 4'd8)); -assign vns_netsoc_csrbankarray_csrbank1_bus_errors0_we = ((vns_netsoc_csrbankarray_csrbank1_sel & (~vns_netsoc_csrbankarray_interface1_bank_bus_we)) & (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0] == 4'd8)); -assign vns_netsoc_csrbankarray_csrbank1_scratch3_w = soc_netsoc_ctrl_storage[31:24]; -assign vns_netsoc_csrbankarray_csrbank1_scratch2_w = soc_netsoc_ctrl_storage[23:16]; -assign vns_netsoc_csrbankarray_csrbank1_scratch1_w = soc_netsoc_ctrl_storage[15:8]; -assign vns_netsoc_csrbankarray_csrbank1_scratch0_w = soc_netsoc_ctrl_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank1_bus_errors3_w = soc_netsoc_ctrl_bus_errors_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank1_bus_errors2_w = soc_netsoc_ctrl_bus_errors_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank1_bus_errors1_w = soc_netsoc_ctrl_bus_errors_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank1_bus_errors0_w = soc_netsoc_ctrl_bus_errors_status[7:0]; -assign soc_netsoc_ctrl_bus_errors_we = vns_netsoc_csrbankarray_csrbank1_bus_errors0_we; -assign vns_netsoc_csrbankarray_csrbank2_sel = (vns_netsoc_csrbankarray_interface2_bank_bus_adr[13:9] == 4'd11); -assign vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[4:0]; -assign vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 1'd0)); -assign soc_a7ddrphy_cdly_rst_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; -assign soc_a7ddrphy_cdly_rst_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 1'd1)); -assign soc_a7ddrphy_cdly_rst_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 1'd1)); -assign soc_a7ddrphy_cdly_inc_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; -assign soc_a7ddrphy_cdly_inc_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 2'd2)); -assign soc_a7ddrphy_cdly_inc_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank2_dly_sel0_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[1:0]; -assign vns_netsoc_csrbankarray_csrbank2_dly_sel0_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank2_dly_sel0_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 2'd3)); -assign soc_a7ddrphy_rdly_dq_rst_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; -assign soc_a7ddrphy_rdly_dq_rst_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd4)); -assign soc_a7ddrphy_rdly_dq_rst_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd4)); -assign soc_a7ddrphy_rdly_dq_inc_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; -assign soc_a7ddrphy_rdly_dq_inc_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd5)); -assign soc_a7ddrphy_rdly_dq_inc_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd5)); -assign soc_a7ddrphy_rdly_dq_bitslip_rst_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; -assign soc_a7ddrphy_rdly_dq_bitslip_rst_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd6)); -assign soc_a7ddrphy_rdly_dq_bitslip_rst_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd6)); -assign soc_a7ddrphy_rdly_dq_bitslip_r = vns_netsoc_csrbankarray_interface2_bank_bus_dat_w[0]; -assign soc_a7ddrphy_rdly_dq_bitslip_re = ((vns_netsoc_csrbankarray_csrbank2_sel & vns_netsoc_csrbankarray_interface2_bank_bus_we) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd7)); -assign soc_a7ddrphy_rdly_dq_bitslip_we = ((vns_netsoc_csrbankarray_csrbank2_sel & (~vns_netsoc_csrbankarray_interface2_bank_bus_we)) & (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_w = soc_a7ddrphy_half_sys8x_taps_storage[4:0]; -assign vns_netsoc_csrbankarray_csrbank2_dly_sel0_w = soc_a7ddrphy_dly_sel_storage[1:0]; -assign vns_netsoc_csrbankarray_csrbank3_sel = (vns_netsoc_csrbankarray_interface3_bank_bus_adr[13:9] == 4'd15); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd8)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd8)); -assign soc_writer_status_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign soc_writer_status_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd9)); -assign soc_writer_status_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd9)); -assign soc_writer_pending_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign soc_writer_pending_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd10)); -assign soc_writer_pending_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd10)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd11)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd11)); -assign soc_reader_start_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign soc_reader_start_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd12)); -assign soc_reader_start_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd12)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd13)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd13)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_level_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[1:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_level_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd14)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_level_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd14)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd15)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 4'd15)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[2:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd16)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd16)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd17)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd17)); -assign soc_reader_eventmanager_status_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign soc_reader_eventmanager_status_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd18)); -assign soc_reader_eventmanager_status_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd18)); -assign soc_reader_eventmanager_pending_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign soc_reader_eventmanager_pending_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd19)); -assign soc_reader_eventmanager_pending_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd19)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd20)); -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd20)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_crc_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank3_preamble_crc_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd21)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_crc_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd21)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors3_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors3_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd22)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors3_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd22)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors2_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors2_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd23)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors2_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd23)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd24)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd24)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd25)); -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd25)); -assign vns_netsoc_csrbankarray_csrbank3_crc_errors3_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_crc_errors3_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd26)); -assign vns_netsoc_csrbankarray_csrbank3_crc_errors3_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd26)); -assign vns_netsoc_csrbankarray_csrbank3_crc_errors2_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_crc_errors2_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd27)); -assign vns_netsoc_csrbankarray_csrbank3_crc_errors2_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd27)); -assign vns_netsoc_csrbankarray_csrbank3_crc_errors1_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_crc_errors1_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd28)); -assign vns_netsoc_csrbankarray_csrbank3_crc_errors1_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd28)); -assign vns_netsoc_csrbankarray_csrbank3_crc_errors0_r = vns_netsoc_csrbankarray_interface3_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_crc_errors0_re = ((vns_netsoc_csrbankarray_csrbank3_sel & vns_netsoc_csrbankarray_interface3_bank_bus_we) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd29)); -assign vns_netsoc_csrbankarray_csrbank3_crc_errors0_we = ((vns_netsoc_csrbankarray_csrbank3_sel & (~vns_netsoc_csrbankarray_interface3_bank_bus_we)) & (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0] == 5'd29)); -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_w = soc_writer_slot_status; -assign soc_writer_slot_we = vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_we; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_w = soc_writer_length_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_w = soc_writer_length_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_w = soc_writer_length_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_w = soc_writer_length_status[7:0]; -assign soc_writer_length_we = vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_we; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_w = soc_writer_errors_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_w = soc_writer_errors_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_w = soc_writer_errors_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_w = soc_writer_errors_status[7:0]; -assign soc_writer_errors_we = vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_we; -assign vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_w = soc_writer_storage; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_w = soc_reader_ready_status; -assign soc_reader_ready_we = vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_we; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_level_w = soc_reader_level_status[1:0]; -assign soc_reader_level_we = vns_netsoc_csrbankarray_csrbank3_sram_reader_level_we; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_w = soc_reader_slot_storage; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_w = soc_reader_length_storage[10:8]; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_w = soc_reader_length_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_w = soc_reader_eventmanager_storage; -assign vns_netsoc_csrbankarray_csrbank3_preamble_crc_w = soc_preamble_crc_status; -assign soc_preamble_crc_we = vns_netsoc_csrbankarray_csrbank3_preamble_crc_we; -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors3_w = soc_preamble_errors_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors2_w = soc_preamble_errors_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors1_w = soc_preamble_errors_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank3_preamble_errors0_w = soc_preamble_errors_status[7:0]; -assign soc_preamble_errors_we = vns_netsoc_csrbankarray_csrbank3_preamble_errors0_we; -assign vns_netsoc_csrbankarray_csrbank3_crc_errors3_w = soc_crc_errors_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank3_crc_errors2_w = soc_crc_errors_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank3_crc_errors1_w = soc_crc_errors_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank3_crc_errors0_w = soc_crc_errors_status[7:0]; -assign soc_crc_errors_we = vns_netsoc_csrbankarray_csrbank3_crc_errors0_we; -assign vns_netsoc_csrbankarray_csrbank4_sel = (vns_netsoc_csrbankarray_interface4_bank_bus_adr[13:9] == 4'd14); -assign vns_netsoc_csrbankarray_csrbank4_crg_reset0_r = vns_netsoc_csrbankarray_interface4_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank4_crg_reset0_re = ((vns_netsoc_csrbankarray_csrbank4_sel & vns_netsoc_csrbankarray_interface4_bank_bus_we) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank4_crg_reset0_we = ((vns_netsoc_csrbankarray_csrbank4_sel & (~vns_netsoc_csrbankarray_interface4_bank_bus_we)) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank4_mdio_w0_r = vns_netsoc_csrbankarray_interface4_bank_bus_dat_w[2:0]; -assign vns_netsoc_csrbankarray_csrbank4_mdio_w0_re = ((vns_netsoc_csrbankarray_csrbank4_sel & vns_netsoc_csrbankarray_interface4_bank_bus_we) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank4_mdio_w0_we = ((vns_netsoc_csrbankarray_csrbank4_sel & (~vns_netsoc_csrbankarray_interface4_bank_bus_we)) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank4_mdio_r_r = vns_netsoc_csrbankarray_interface4_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank4_mdio_r_re = ((vns_netsoc_csrbankarray_csrbank4_sel & vns_netsoc_csrbankarray_interface4_bank_bus_we) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank4_mdio_r_we = ((vns_netsoc_csrbankarray_csrbank4_sel & (~vns_netsoc_csrbankarray_interface4_bank_bus_we)) & (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank4_crg_reset0_w = soc_reset_storage; -assign soc_mdc = soc_storage[0]; -assign soc_oe = soc_storage[1]; -assign soc_w = soc_storage[2]; -assign vns_netsoc_csrbankarray_csrbank4_mdio_w0_w = soc_storage[2:0]; -assign vns_netsoc_csrbankarray_csrbank4_mdio_r_w = soc_status; -assign soc_we = vns_netsoc_csrbankarray_csrbank4_mdio_r_we; -assign vns_netsoc_csrbankarray_sel = (vns_netsoc_csrbankarray_sram_bus_adr[13:9] == 3'd4); -always @(*) begin - vns_netsoc_csrbankarray_sram_bus_dat_r <= 8'd0; - if (vns_netsoc_csrbankarray_sel_r) begin - vns_netsoc_csrbankarray_sram_bus_dat_r <= vns_netsoc_csrbankarray_dat_r; - end -end -assign vns_netsoc_csrbankarray_adr = vns_netsoc_csrbankarray_sram_bus_adr[2:0]; -assign vns_netsoc_csrbankarray_csrbank5_sel = (vns_netsoc_csrbankarray_interface5_bank_bus_adr[13:9] == 4'd8); -assign vns_netsoc_csrbankarray_csrbank5_dfii_control0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[3:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_control0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_control0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 1'd1)); -assign soc_netsoc_sdram_phaseinjector0_command_issue_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; -assign soc_netsoc_sdram_phaseinjector0_command_issue_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 2'd2)); -assign soc_netsoc_sdram_phaseinjector0_command_issue_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[2:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd8)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd8)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd9)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd9)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd10)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd10)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd11)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd11)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd12)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd12)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd13)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd13)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd14)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd14)); -assign soc_netsoc_sdram_phaseinjector1_command_issue_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; -assign soc_netsoc_sdram_phaseinjector1_command_issue_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd15)); -assign soc_netsoc_sdram_phaseinjector1_command_issue_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 4'd15)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd16)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd16)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd17)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd17)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[2:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd18)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd18)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd19)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd19)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd20)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd20)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd21)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd21)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd22)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd22)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd23)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd23)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd24)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd24)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd25)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd25)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd26)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd26)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd27)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd27)); -assign soc_netsoc_sdram_phaseinjector2_command_issue_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; -assign soc_netsoc_sdram_phaseinjector2_command_issue_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd28)); -assign soc_netsoc_sdram_phaseinjector2_command_issue_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd28)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd29)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd29)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd30)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd30)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[2:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd31)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 5'd31)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd32)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd32)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd33)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd33)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd34)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd34)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd35)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd35)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd36)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd36)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd37)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd37)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd38)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd38)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd39)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd39)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd40)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd40)); -assign soc_netsoc_sdram_phaseinjector3_command_issue_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; -assign soc_netsoc_sdram_phaseinjector3_command_issue_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd41)); -assign soc_netsoc_sdram_phaseinjector3_command_issue_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd41)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd42)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd42)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd43)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd43)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[2:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd44)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd44)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd45)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd45)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd46)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd46)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd47)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd47)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd48)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd48)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd49)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd49)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd50)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd50)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd51)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd51)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd52)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd52)); -assign soc_netsoc_sdram_bandwidth_update_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[0]; -assign soc_netsoc_sdram_bandwidth_update_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd53)); -assign soc_netsoc_sdram_bandwidth_update_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd53)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd54)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd54)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd55)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd55)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd56)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd56)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd57)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd57)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd58)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd58)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd59)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd59)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_r = vns_netsoc_csrbankarray_interface5_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_re = ((vns_netsoc_csrbankarray_csrbank5_sel & vns_netsoc_csrbankarray_interface5_bank_bus_we) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd60)); -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_we = ((vns_netsoc_csrbankarray_csrbank5_sel & (~vns_netsoc_csrbankarray_interface5_bank_bus_we)) & (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0] == 6'd60)); -assign vns_netsoc_csrbankarray_csrbank5_dfii_control0_w = soc_netsoc_sdram_storage[3:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_w = soc_netsoc_sdram_phaseinjector0_command_storage[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_w = soc_netsoc_sdram_phaseinjector0_address_storage[13:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_w = soc_netsoc_sdram_phaseinjector0_address_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_w = soc_netsoc_sdram_phaseinjector0_baddress_storage[2:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_w = soc_netsoc_sdram_phaseinjector0_wrdata_storage[31:24]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_w = soc_netsoc_sdram_phaseinjector0_wrdata_storage[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_w = soc_netsoc_sdram_phaseinjector0_wrdata_storage[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_w = soc_netsoc_sdram_phaseinjector0_wrdata_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_w = soc_netsoc_sdram_phaseinjector0_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_w = soc_netsoc_sdram_phaseinjector0_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_w = soc_netsoc_sdram_phaseinjector0_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_w = soc_netsoc_sdram_phaseinjector0_status[7:0]; -assign soc_netsoc_sdram_phaseinjector0_we = vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_we; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_w = soc_netsoc_sdram_phaseinjector1_command_storage[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_w = soc_netsoc_sdram_phaseinjector1_address_storage[13:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_w = soc_netsoc_sdram_phaseinjector1_address_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_w = soc_netsoc_sdram_phaseinjector1_baddress_storage[2:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_w = soc_netsoc_sdram_phaseinjector1_wrdata_storage[31:24]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_w = soc_netsoc_sdram_phaseinjector1_wrdata_storage[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_w = soc_netsoc_sdram_phaseinjector1_wrdata_storage[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_w = soc_netsoc_sdram_phaseinjector1_wrdata_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_w = soc_netsoc_sdram_phaseinjector1_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_w = soc_netsoc_sdram_phaseinjector1_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_w = soc_netsoc_sdram_phaseinjector1_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_w = soc_netsoc_sdram_phaseinjector1_status[7:0]; -assign soc_netsoc_sdram_phaseinjector1_we = vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_we; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_w = soc_netsoc_sdram_phaseinjector2_command_storage[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_w = soc_netsoc_sdram_phaseinjector2_address_storage[13:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_w = soc_netsoc_sdram_phaseinjector2_address_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_w = soc_netsoc_sdram_phaseinjector2_baddress_storage[2:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_w = soc_netsoc_sdram_phaseinjector2_wrdata_storage[31:24]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_w = soc_netsoc_sdram_phaseinjector2_wrdata_storage[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_w = soc_netsoc_sdram_phaseinjector2_wrdata_storage[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_w = soc_netsoc_sdram_phaseinjector2_wrdata_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_w = soc_netsoc_sdram_phaseinjector2_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_w = soc_netsoc_sdram_phaseinjector2_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_w = soc_netsoc_sdram_phaseinjector2_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_w = soc_netsoc_sdram_phaseinjector2_status[7:0]; -assign soc_netsoc_sdram_phaseinjector2_we = vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_we; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_w = soc_netsoc_sdram_phaseinjector3_command_storage[5:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_w = soc_netsoc_sdram_phaseinjector3_address_storage[13:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_w = soc_netsoc_sdram_phaseinjector3_address_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_w = soc_netsoc_sdram_phaseinjector3_baddress_storage[2:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_w = soc_netsoc_sdram_phaseinjector3_wrdata_storage[31:24]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_w = soc_netsoc_sdram_phaseinjector3_wrdata_storage[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_w = soc_netsoc_sdram_phaseinjector3_wrdata_storage[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_w = soc_netsoc_sdram_phaseinjector3_wrdata_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_w = soc_netsoc_sdram_phaseinjector3_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_w = soc_netsoc_sdram_phaseinjector3_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_w = soc_netsoc_sdram_phaseinjector3_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_w = soc_netsoc_sdram_phaseinjector3_status[7:0]; -assign soc_netsoc_sdram_phaseinjector3_we = vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_we; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_w = soc_netsoc_sdram_bandwidth_nreads_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_w = soc_netsoc_sdram_bandwidth_nreads_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_w = soc_netsoc_sdram_bandwidth_nreads_status[7:0]; -assign soc_netsoc_sdram_bandwidth_nreads_we = vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_we; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_w = soc_netsoc_sdram_bandwidth_nwrites_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_w = soc_netsoc_sdram_bandwidth_nwrites_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_w = soc_netsoc_sdram_bandwidth_nwrites_status[7:0]; -assign soc_netsoc_sdram_bandwidth_nwrites_we = vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_we; -assign vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_w = soc_netsoc_sdram_bandwidth_data_width_status[7:0]; -assign soc_netsoc_sdram_bandwidth_data_width_we = vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_we; -assign vns_netsoc_csrbankarray_csrbank6_sel = (vns_netsoc_csrbankarray_interface6_bank_bus_adr[13:9] == 3'd5); -assign vns_netsoc_csrbankarray_csrbank6_load3_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_load3_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank6_load3_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank6_load2_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_load2_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank6_load2_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank6_load1_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_load1_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank6_load1_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank6_load0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_load0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank6_load0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank6_reload3_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_reload3_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank6_reload3_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank6_reload2_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_reload2_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank6_reload2_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank6_reload1_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_reload1_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank6_reload1_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd6)); -assign vns_netsoc_csrbankarray_csrbank6_reload0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_reload0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank6_reload0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 3'd7)); -assign vns_netsoc_csrbankarray_csrbank6_en0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank6_en0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd8)); -assign vns_netsoc_csrbankarray_csrbank6_en0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd8)); -assign vns_netsoc_csrbankarray_csrbank6_update_value0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank6_update_value0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd9)); -assign vns_netsoc_csrbankarray_csrbank6_update_value0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd9)); -assign vns_netsoc_csrbankarray_csrbank6_value3_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_value3_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd10)); -assign vns_netsoc_csrbankarray_csrbank6_value3_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd10)); -assign vns_netsoc_csrbankarray_csrbank6_value2_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_value2_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd11)); -assign vns_netsoc_csrbankarray_csrbank6_value2_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd11)); -assign vns_netsoc_csrbankarray_csrbank6_value1_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_value1_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd12)); -assign vns_netsoc_csrbankarray_csrbank6_value1_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd12)); -assign vns_netsoc_csrbankarray_csrbank6_value0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_value0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd13)); -assign vns_netsoc_csrbankarray_csrbank6_value0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd13)); -assign soc_netsoc_timer0_eventmanager_status_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; -assign soc_netsoc_timer0_eventmanager_status_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd14)); -assign soc_netsoc_timer0_eventmanager_status_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd14)); -assign soc_netsoc_timer0_eventmanager_pending_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; -assign soc_netsoc_timer0_eventmanager_pending_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd15)); -assign soc_netsoc_timer0_eventmanager_pending_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 4'd15)); -assign vns_netsoc_csrbankarray_csrbank6_ev_enable0_r = vns_netsoc_csrbankarray_interface6_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank6_ev_enable0_re = ((vns_netsoc_csrbankarray_csrbank6_sel & vns_netsoc_csrbankarray_interface6_bank_bus_we) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 5'd16)); -assign vns_netsoc_csrbankarray_csrbank6_ev_enable0_we = ((vns_netsoc_csrbankarray_csrbank6_sel & (~vns_netsoc_csrbankarray_interface6_bank_bus_we)) & (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0] == 5'd16)); -assign vns_netsoc_csrbankarray_csrbank6_load3_w = soc_netsoc_timer0_load_storage[31:24]; -assign vns_netsoc_csrbankarray_csrbank6_load2_w = soc_netsoc_timer0_load_storage[23:16]; -assign vns_netsoc_csrbankarray_csrbank6_load1_w = soc_netsoc_timer0_load_storage[15:8]; -assign vns_netsoc_csrbankarray_csrbank6_load0_w = soc_netsoc_timer0_load_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_reload3_w = soc_netsoc_timer0_reload_storage[31:24]; -assign vns_netsoc_csrbankarray_csrbank6_reload2_w = soc_netsoc_timer0_reload_storage[23:16]; -assign vns_netsoc_csrbankarray_csrbank6_reload1_w = soc_netsoc_timer0_reload_storage[15:8]; -assign vns_netsoc_csrbankarray_csrbank6_reload0_w = soc_netsoc_timer0_reload_storage[7:0]; -assign vns_netsoc_csrbankarray_csrbank6_en0_w = soc_netsoc_timer0_en_storage; -assign vns_netsoc_csrbankarray_csrbank6_update_value0_w = soc_netsoc_timer0_update_value_storage; -assign vns_netsoc_csrbankarray_csrbank6_value3_w = soc_netsoc_timer0_value_status[31:24]; -assign vns_netsoc_csrbankarray_csrbank6_value2_w = soc_netsoc_timer0_value_status[23:16]; -assign vns_netsoc_csrbankarray_csrbank6_value1_w = soc_netsoc_timer0_value_status[15:8]; -assign vns_netsoc_csrbankarray_csrbank6_value0_w = soc_netsoc_timer0_value_status[7:0]; -assign soc_netsoc_timer0_value_we = vns_netsoc_csrbankarray_csrbank6_value0_we; -assign vns_netsoc_csrbankarray_csrbank6_ev_enable0_w = soc_netsoc_timer0_eventmanager_storage; -assign vns_netsoc_csrbankarray_csrbank7_sel = (vns_netsoc_csrbankarray_interface7_bank_bus_adr[13:9] == 2'd3); -assign soc_netsoc_uart_rxtx_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[7:0]; -assign soc_netsoc_uart_rxtx_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 1'd0)); -assign soc_netsoc_uart_rxtx_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank7_txfull_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank7_txfull_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank7_txfull_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank7_rxempty_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[0]; -assign vns_netsoc_csrbankarray_csrbank7_rxempty_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank7_rxempty_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 2'd2)); -assign soc_netsoc_uart_eventmanager_status_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[1:0]; -assign soc_netsoc_uart_eventmanager_status_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 2'd3)); -assign soc_netsoc_uart_eventmanager_status_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 2'd3)); -assign soc_netsoc_uart_eventmanager_pending_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[1:0]; -assign soc_netsoc_uart_eventmanager_pending_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 3'd4)); -assign soc_netsoc_uart_eventmanager_pending_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 3'd4)); -assign vns_netsoc_csrbankarray_csrbank7_ev_enable0_r = vns_netsoc_csrbankarray_interface7_bank_bus_dat_w[1:0]; -assign vns_netsoc_csrbankarray_csrbank7_ev_enable0_re = ((vns_netsoc_csrbankarray_csrbank7_sel & vns_netsoc_csrbankarray_interface7_bank_bus_we) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank7_ev_enable0_we = ((vns_netsoc_csrbankarray_csrbank7_sel & (~vns_netsoc_csrbankarray_interface7_bank_bus_we)) & (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0] == 3'd5)); -assign vns_netsoc_csrbankarray_csrbank7_txfull_w = soc_netsoc_uart_txfull_status; -assign soc_netsoc_uart_txfull_we = vns_netsoc_csrbankarray_csrbank7_txfull_we; -assign vns_netsoc_csrbankarray_csrbank7_rxempty_w = soc_netsoc_uart_rxempty_status; -assign soc_netsoc_uart_rxempty_we = vns_netsoc_csrbankarray_csrbank7_rxempty_we; -assign vns_netsoc_csrbankarray_csrbank7_ev_enable0_w = soc_netsoc_uart_eventmanager_storage[1:0]; -assign vns_netsoc_csrbankarray_csrbank8_sel = (vns_netsoc_csrbankarray_interface8_bank_bus_adr[13:9] == 2'd2); -assign vns_netsoc_csrbankarray_csrbank8_tuning_word3_r = vns_netsoc_csrbankarray_interface8_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank8_tuning_word3_re = ((vns_netsoc_csrbankarray_csrbank8_sel & vns_netsoc_csrbankarray_interface8_bank_bus_we) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank8_tuning_word3_we = ((vns_netsoc_csrbankarray_csrbank8_sel & (~vns_netsoc_csrbankarray_interface8_bank_bus_we)) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 1'd0)); -assign vns_netsoc_csrbankarray_csrbank8_tuning_word2_r = vns_netsoc_csrbankarray_interface8_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank8_tuning_word2_re = ((vns_netsoc_csrbankarray_csrbank8_sel & vns_netsoc_csrbankarray_interface8_bank_bus_we) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank8_tuning_word2_we = ((vns_netsoc_csrbankarray_csrbank8_sel & (~vns_netsoc_csrbankarray_interface8_bank_bus_we)) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 1'd1)); -assign vns_netsoc_csrbankarray_csrbank8_tuning_word1_r = vns_netsoc_csrbankarray_interface8_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank8_tuning_word1_re = ((vns_netsoc_csrbankarray_csrbank8_sel & vns_netsoc_csrbankarray_interface8_bank_bus_we) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank8_tuning_word1_we = ((vns_netsoc_csrbankarray_csrbank8_sel & (~vns_netsoc_csrbankarray_interface8_bank_bus_we)) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 2'd2)); -assign vns_netsoc_csrbankarray_csrbank8_tuning_word0_r = vns_netsoc_csrbankarray_interface8_bank_bus_dat_w[7:0]; -assign vns_netsoc_csrbankarray_csrbank8_tuning_word0_re = ((vns_netsoc_csrbankarray_csrbank8_sel & vns_netsoc_csrbankarray_interface8_bank_bus_we) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank8_tuning_word0_we = ((vns_netsoc_csrbankarray_csrbank8_sel & (~vns_netsoc_csrbankarray_interface8_bank_bus_we)) & (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0] == 2'd3)); -assign vns_netsoc_csrbankarray_csrbank8_tuning_word3_w = soc_netsoc_uart_phy_storage[31:24]; -assign vns_netsoc_csrbankarray_csrbank8_tuning_word2_w = soc_netsoc_uart_phy_storage[23:16]; -assign vns_netsoc_csrbankarray_csrbank8_tuning_word1_w = soc_netsoc_uart_phy_storage[15:8]; -assign vns_netsoc_csrbankarray_csrbank8_tuning_word0_w = soc_netsoc_uart_phy_storage[7:0]; -assign vns_netsoc_csrcon_adr = soc_netsoc_interface_adr; -assign vns_netsoc_csrcon_we = soc_netsoc_interface_we; -assign vns_netsoc_csrcon_dat_w = soc_netsoc_interface_dat_w; -assign soc_netsoc_interface_dat_r = vns_netsoc_csrcon_dat_r; -assign vns_netsoc_csrbankarray_interface0_bank_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_interface1_bank_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_interface2_bank_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_interface3_bank_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_interface4_bank_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_interface5_bank_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_interface6_bank_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_interface7_bank_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_interface8_bank_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_sram_bus_adr = vns_netsoc_csrcon_adr; -assign vns_netsoc_csrbankarray_interface0_bank_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_interface1_bank_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_interface2_bank_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_interface3_bank_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_interface4_bank_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_interface5_bank_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_interface6_bank_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_interface7_bank_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_interface8_bank_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_sram_bus_we = vns_netsoc_csrcon_we; -assign vns_netsoc_csrbankarray_interface0_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrbankarray_interface1_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrbankarray_interface2_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrbankarray_interface3_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrbankarray_interface4_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrbankarray_interface5_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrbankarray_interface6_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrbankarray_interface7_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrbankarray_interface8_bank_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrbankarray_sram_bus_dat_w = vns_netsoc_csrcon_dat_w; -assign vns_netsoc_csrcon_dat_r = (((((((((vns_netsoc_csrbankarray_interface0_bank_bus_dat_r | vns_netsoc_csrbankarray_interface1_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface2_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface3_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface4_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface5_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface6_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface7_bank_bus_dat_r) | vns_netsoc_csrbankarray_interface8_bank_bus_dat_r) | vns_netsoc_csrbankarray_sram_bus_dat_r); -always @(*) begin - vns_rhs_array_muxed0 <= 1'd0; - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[0]; - end - 1'd1: begin - vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[1]; - end - 2'd2: begin - vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[2]; - end - 2'd3: begin - vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[3]; - end - 3'd4: begin - vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[4]; - end - 3'd5: begin - vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[5]; - end - 3'd6: begin - vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[6]; - end - default: begin - vns_rhs_array_muxed0 <= soc_netsoc_sdram_choose_cmd_valids[7]; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed1 <= 14'd0; - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine0_cmd_payload_a; - end - 1'd1: begin - vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine1_cmd_payload_a; - end - 2'd2: begin - vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine2_cmd_payload_a; - end - 2'd3: begin - vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine3_cmd_payload_a; - end - 3'd4: begin - vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine4_cmd_payload_a; - end - 3'd5: begin - vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine5_cmd_payload_a; - end - 3'd6: begin - vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine6_cmd_payload_a; - end - default: begin - vns_rhs_array_muxed1 <= soc_netsoc_sdram_bankmachine7_cmd_payload_a; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed2 <= 3'd0; - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine0_cmd_payload_ba; - end - 1'd1: begin - vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine1_cmd_payload_ba; - end - 2'd2: begin - vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine2_cmd_payload_ba; - end - 2'd3: begin - vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine3_cmd_payload_ba; - end - 3'd4: begin - vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine4_cmd_payload_ba; - end - 3'd5: begin - vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine5_cmd_payload_ba; - end - 3'd6: begin - vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine6_cmd_payload_ba; - end - default: begin - vns_rhs_array_muxed2 <= soc_netsoc_sdram_bankmachine7_cmd_payload_ba; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed3 <= 1'd0; - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_read; - end - 1'd1: begin - vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_read; - end - 2'd2: begin - vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_read; - end - 2'd3: begin - vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_read; - end - 3'd4: begin - vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_read; - end - 3'd5: begin - vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_read; - end - 3'd6: begin - vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_read; - end - default: begin - vns_rhs_array_muxed3 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_read; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed4 <= 1'd0; - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_write; - end - 1'd1: begin - vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_write; - end - 2'd2: begin - vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_write; - end - 2'd3: begin - vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_write; - end - 3'd4: begin - vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_write; - end - 3'd5: begin - vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_write; - end - 3'd6: begin - vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_write; - end - default: begin - vns_rhs_array_muxed4 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_write; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed5 <= 1'd0; - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd; - end - 1'd1: begin - vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd; - end - 2'd2: begin - vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd; - end - 2'd3: begin - vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd; - end - 3'd4: begin - vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd; - end - 3'd5: begin - vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd; - end - 3'd6: begin - vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd; - end - default: begin - vns_rhs_array_muxed5 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd; - end - endcase -end -always @(*) begin - vns_t_array_muxed0 <= 1'd0; - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine0_cmd_payload_cas; - end - 1'd1: begin - vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine1_cmd_payload_cas; - end - 2'd2: begin - vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine2_cmd_payload_cas; - end - 2'd3: begin - vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine3_cmd_payload_cas; - end - 3'd4: begin - vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine4_cmd_payload_cas; - end - 3'd5: begin - vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine5_cmd_payload_cas; - end - 3'd6: begin - vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine6_cmd_payload_cas; - end - default: begin - vns_t_array_muxed0 <= soc_netsoc_sdram_bankmachine7_cmd_payload_cas; - end - endcase -end -always @(*) begin - vns_t_array_muxed1 <= 1'd0; - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine0_cmd_payload_ras; - end - 1'd1: begin - vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine1_cmd_payload_ras; - end - 2'd2: begin - vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine2_cmd_payload_ras; - end - 2'd3: begin - vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine3_cmd_payload_ras; - end - 3'd4: begin - vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine4_cmd_payload_ras; - end - 3'd5: begin - vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine5_cmd_payload_ras; - end - 3'd6: begin - vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine6_cmd_payload_ras; - end - default: begin - vns_t_array_muxed1 <= soc_netsoc_sdram_bankmachine7_cmd_payload_ras; - end - endcase -end -always @(*) begin - vns_t_array_muxed2 <= 1'd0; - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine0_cmd_payload_we; - end - 1'd1: begin - vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine1_cmd_payload_we; - end - 2'd2: begin - vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine2_cmd_payload_we; - end - 2'd3: begin - vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine3_cmd_payload_we; - end - 3'd4: begin - vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine4_cmd_payload_we; - end - 3'd5: begin - vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine5_cmd_payload_we; - end - 3'd6: begin - vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine6_cmd_payload_we; - end - default: begin - vns_t_array_muxed2 <= soc_netsoc_sdram_bankmachine7_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed6 <= 1'd0; - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[0]; - end - 1'd1: begin - vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[1]; - end - 2'd2: begin - vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[2]; - end - 2'd3: begin - vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[3]; - end - 3'd4: begin - vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[4]; - end - 3'd5: begin - vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[5]; - end - 3'd6: begin - vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[6]; - end - default: begin - vns_rhs_array_muxed6 <= soc_netsoc_sdram_choose_req_valids[7]; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed7 <= 14'd0; - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine0_cmd_payload_a; - end - 1'd1: begin - vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine1_cmd_payload_a; - end - 2'd2: begin - vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine2_cmd_payload_a; - end - 2'd3: begin - vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine3_cmd_payload_a; - end - 3'd4: begin - vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine4_cmd_payload_a; - end - 3'd5: begin - vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine5_cmd_payload_a; - end - 3'd6: begin - vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine6_cmd_payload_a; - end - default: begin - vns_rhs_array_muxed7 <= soc_netsoc_sdram_bankmachine7_cmd_payload_a; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed8 <= 3'd0; - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine0_cmd_payload_ba; - end - 1'd1: begin - vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine1_cmd_payload_ba; - end - 2'd2: begin - vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine2_cmd_payload_ba; - end - 2'd3: begin - vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine3_cmd_payload_ba; - end - 3'd4: begin - vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine4_cmd_payload_ba; - end - 3'd5: begin - vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine5_cmd_payload_ba; - end - 3'd6: begin - vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine6_cmd_payload_ba; - end - default: begin - vns_rhs_array_muxed8 <= soc_netsoc_sdram_bankmachine7_cmd_payload_ba; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed9 <= 1'd0; - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_read; - end - 1'd1: begin - vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_read; - end - 2'd2: begin - vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_read; - end - 2'd3: begin - vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_read; - end - 3'd4: begin - vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_read; - end - 3'd5: begin - vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_read; - end - 3'd6: begin - vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_read; - end - default: begin - vns_rhs_array_muxed9 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_read; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed10 <= 1'd0; - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_write; - end - 1'd1: begin - vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_write; - end - 2'd2: begin - vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_write; - end - 2'd3: begin - vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_write; - end - 3'd4: begin - vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_write; - end - 3'd5: begin - vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_write; - end - 3'd6: begin - vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_write; - end - default: begin - vns_rhs_array_muxed10 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_write; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed11 <= 1'd0; - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine0_cmd_payload_is_cmd; - end - 1'd1: begin - vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine1_cmd_payload_is_cmd; - end - 2'd2: begin - vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine2_cmd_payload_is_cmd; - end - 2'd3: begin - vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine3_cmd_payload_is_cmd; - end - 3'd4: begin - vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine4_cmd_payload_is_cmd; - end - 3'd5: begin - vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine5_cmd_payload_is_cmd; - end - 3'd6: begin - vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine6_cmd_payload_is_cmd; - end - default: begin - vns_rhs_array_muxed11 <= soc_netsoc_sdram_bankmachine7_cmd_payload_is_cmd; - end - endcase -end -always @(*) begin - vns_t_array_muxed3 <= 1'd0; - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine0_cmd_payload_cas; - end - 1'd1: begin - vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine1_cmd_payload_cas; - end - 2'd2: begin - vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine2_cmd_payload_cas; - end - 2'd3: begin - vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine3_cmd_payload_cas; - end - 3'd4: begin - vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine4_cmd_payload_cas; - end - 3'd5: begin - vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine5_cmd_payload_cas; - end - 3'd6: begin - vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine6_cmd_payload_cas; - end - default: begin - vns_t_array_muxed3 <= soc_netsoc_sdram_bankmachine7_cmd_payload_cas; - end - endcase -end -always @(*) begin - vns_t_array_muxed4 <= 1'd0; - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine0_cmd_payload_ras; - end - 1'd1: begin - vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine1_cmd_payload_ras; - end - 2'd2: begin - vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine2_cmd_payload_ras; - end - 2'd3: begin - vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine3_cmd_payload_ras; - end - 3'd4: begin - vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine4_cmd_payload_ras; - end - 3'd5: begin - vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine5_cmd_payload_ras; - end - 3'd6: begin - vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine6_cmd_payload_ras; - end - default: begin - vns_t_array_muxed4 <= soc_netsoc_sdram_bankmachine7_cmd_payload_ras; - end - endcase -end -always @(*) begin - vns_t_array_muxed5 <= 1'd0; - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine0_cmd_payload_we; - end - 1'd1: begin - vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine1_cmd_payload_we; - end - 2'd2: begin - vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine2_cmd_payload_we; - end - 2'd3: begin - vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine3_cmd_payload_we; - end - 3'd4: begin - vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine4_cmd_payload_we; - end - 3'd5: begin - vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine5_cmd_payload_we; - end - 3'd6: begin - vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine6_cmd_payload_we; - end - default: begin - vns_t_array_muxed5 <= soc_netsoc_sdram_bankmachine7_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed12 <= 21'd0; - case (vns_roundrobin0_grant) - default: begin - vns_rhs_array_muxed12 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed13 <= 1'd0; - case (vns_roundrobin0_grant) - default: begin - vns_rhs_array_muxed13 <= soc_netsoc_port_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed14 <= 1'd0; - case (vns_roundrobin0_grant) - default: begin - vns_rhs_array_muxed14 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((vns_locked0 | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); - end - endcase -end -always @(*) begin - vns_rhs_array_muxed15 <= 21'd0; - case (vns_roundrobin1_grant) - default: begin - vns_rhs_array_muxed15 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed16 <= 1'd0; - case (vns_roundrobin1_grant) - default: begin - vns_rhs_array_muxed16 <= soc_netsoc_port_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed17 <= 1'd0; - case (vns_roundrobin1_grant) - default: begin - vns_rhs_array_muxed17 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((vns_locked1 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); - end - endcase -end -always @(*) begin - vns_rhs_array_muxed18 <= 21'd0; - case (vns_roundrobin2_grant) - default: begin - vns_rhs_array_muxed18 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed19 <= 1'd0; - case (vns_roundrobin2_grant) - default: begin - vns_rhs_array_muxed19 <= soc_netsoc_port_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed20 <= 1'd0; - case (vns_roundrobin2_grant) - default: begin - vns_rhs_array_muxed20 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((vns_locked2 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); - end - endcase -end -always @(*) begin - vns_rhs_array_muxed21 <= 21'd0; - case (vns_roundrobin3_grant) - default: begin - vns_rhs_array_muxed21 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed22 <= 1'd0; - case (vns_roundrobin3_grant) - default: begin - vns_rhs_array_muxed22 <= soc_netsoc_port_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed23 <= 1'd0; - case (vns_roundrobin3_grant) - default: begin - vns_rhs_array_muxed23 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((vns_locked3 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); - end - endcase -end -always @(*) begin - vns_rhs_array_muxed24 <= 21'd0; - case (vns_roundrobin4_grant) - default: begin - vns_rhs_array_muxed24 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed25 <= 1'd0; - case (vns_roundrobin4_grant) - default: begin - vns_rhs_array_muxed25 <= soc_netsoc_port_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed26 <= 1'd0; - case (vns_roundrobin4_grant) - default: begin - vns_rhs_array_muxed26 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((vns_locked4 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); - end - endcase -end -always @(*) begin - vns_rhs_array_muxed27 <= 21'd0; - case (vns_roundrobin5_grant) - default: begin - vns_rhs_array_muxed27 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed28 <= 1'd0; - case (vns_roundrobin5_grant) - default: begin - vns_rhs_array_muxed28 <= soc_netsoc_port_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed29 <= 1'd0; - case (vns_roundrobin5_grant) - default: begin - vns_rhs_array_muxed29 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((vns_locked5 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); - end - endcase -end -always @(*) begin - vns_rhs_array_muxed30 <= 21'd0; - case (vns_roundrobin6_grant) - default: begin - vns_rhs_array_muxed30 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed31 <= 1'd0; - case (vns_roundrobin6_grant) - default: begin - vns_rhs_array_muxed31 <= soc_netsoc_port_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed32 <= 1'd0; - case (vns_roundrobin6_grant) - default: begin - vns_rhs_array_muxed32 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((vns_locked6 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank7_lock & (vns_roundrobin7_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); - end - endcase -end -always @(*) begin - vns_rhs_array_muxed33 <= 21'd0; - case (vns_roundrobin7_grant) - default: begin - vns_rhs_array_muxed33 <= {soc_netsoc_port_cmd_payload_addr[23:10], soc_netsoc_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed34 <= 1'd0; - case (vns_roundrobin7_grant) - default: begin - vns_rhs_array_muxed34 <= soc_netsoc_port_cmd_payload_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed35 <= 1'd0; - case (vns_roundrobin7_grant) - default: begin - vns_rhs_array_muxed35 <= (((soc_netsoc_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((vns_locked7 | (soc_netsoc_sdram_interface_bank0_lock & (vns_roundrobin0_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank1_lock & (vns_roundrobin1_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank2_lock & (vns_roundrobin2_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank3_lock & (vns_roundrobin3_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank4_lock & (vns_roundrobin4_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank5_lock & (vns_roundrobin5_grant == 1'd0))) | (soc_netsoc_sdram_interface_bank6_lock & (vns_roundrobin6_grant == 1'd0))))) & soc_netsoc_port_cmd_valid); - end - endcase -end -always @(*) begin - vns_rhs_array_muxed36 <= 30'd0; - case (vns_wb_sdram_con_grant) - default: begin - vns_rhs_array_muxed36 <= soc_netsoc_interface1_wb_sdram_adr; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed37 <= 32'd0; - case (vns_wb_sdram_con_grant) - default: begin - vns_rhs_array_muxed37 <= soc_netsoc_interface1_wb_sdram_dat_w; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed38 <= 4'd0; - case (vns_wb_sdram_con_grant) - default: begin - vns_rhs_array_muxed38 <= soc_netsoc_interface1_wb_sdram_sel; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed39 <= 1'd0; - case (vns_wb_sdram_con_grant) - default: begin - vns_rhs_array_muxed39 <= soc_netsoc_interface1_wb_sdram_cyc; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed40 <= 1'd0; - case (vns_wb_sdram_con_grant) - default: begin - vns_rhs_array_muxed40 <= soc_netsoc_interface1_wb_sdram_stb; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed41 <= 1'd0; - case (vns_wb_sdram_con_grant) - default: begin - vns_rhs_array_muxed41 <= soc_netsoc_interface1_wb_sdram_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed42 <= 3'd0; - case (vns_wb_sdram_con_grant) - default: begin - vns_rhs_array_muxed42 <= soc_netsoc_interface1_wb_sdram_cti; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed43 <= 2'd0; - case (vns_wb_sdram_con_grant) - default: begin - vns_rhs_array_muxed43 <= soc_netsoc_interface1_wb_sdram_bte; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed44 <= 30'd0; - case (vns_netsoc_grant) - 1'd0: begin - vns_rhs_array_muxed44 <= soc_netsoc_interface0_soc_bus_adr; - end - default: begin - vns_rhs_array_muxed44 <= soc_netsoc_interface1_soc_bus_adr; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed45 <= 32'd0; - case (vns_netsoc_grant) - 1'd0: begin - vns_rhs_array_muxed45 <= soc_netsoc_interface0_soc_bus_dat_w; - end - default: begin - vns_rhs_array_muxed45 <= soc_netsoc_interface1_soc_bus_dat_w; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed46 <= 4'd0; - case (vns_netsoc_grant) - 1'd0: begin - vns_rhs_array_muxed46 <= soc_netsoc_interface0_soc_bus_sel; - end - default: begin - vns_rhs_array_muxed46 <= soc_netsoc_interface1_soc_bus_sel; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed47 <= 1'd0; - case (vns_netsoc_grant) - 1'd0: begin - vns_rhs_array_muxed47 <= soc_netsoc_interface0_soc_bus_cyc; - end - default: begin - vns_rhs_array_muxed47 <= soc_netsoc_interface1_soc_bus_cyc; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed48 <= 1'd0; - case (vns_netsoc_grant) - 1'd0: begin - vns_rhs_array_muxed48 <= soc_netsoc_interface0_soc_bus_stb; - end - default: begin - vns_rhs_array_muxed48 <= soc_netsoc_interface1_soc_bus_stb; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed49 <= 1'd0; - case (vns_netsoc_grant) - 1'd0: begin - vns_rhs_array_muxed49 <= soc_netsoc_interface0_soc_bus_we; - end - default: begin - vns_rhs_array_muxed49 <= soc_netsoc_interface1_soc_bus_we; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed50 <= 3'd0; - case (vns_netsoc_grant) - 1'd0: begin - vns_rhs_array_muxed50 <= soc_netsoc_interface0_soc_bus_cti; - end - default: begin - vns_rhs_array_muxed50 <= soc_netsoc_interface1_soc_bus_cti; - end - endcase -end -always @(*) begin - vns_rhs_array_muxed51 <= 2'd0; - case (vns_netsoc_grant) - 1'd0: begin - vns_rhs_array_muxed51 <= soc_netsoc_interface0_soc_bus_bte; - end - default: begin - vns_rhs_array_muxed51 <= soc_netsoc_interface1_soc_bus_bte; - end - endcase -end -always @(*) begin - vns_array_muxed0 <= 3'd0; - case (soc_netsoc_sdram_steerer_sel0) - 1'd0: begin - vns_array_muxed0 <= soc_netsoc_sdram_nop_ba[2:0]; - end - 1'd1: begin - vns_array_muxed0 <= soc_netsoc_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - vns_array_muxed0 <= soc_netsoc_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - vns_array_muxed0 <= soc_netsoc_sdram_cmd_payload_ba[2:0]; - end - endcase -end -always @(*) begin - vns_array_muxed1 <= 14'd0; - case (soc_netsoc_sdram_steerer_sel0) - 1'd0: begin - vns_array_muxed1 <= soc_netsoc_sdram_nop_a; - end - 1'd1: begin - vns_array_muxed1 <= soc_netsoc_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - vns_array_muxed1 <= soc_netsoc_sdram_choose_req_cmd_payload_a; - end - default: begin - vns_array_muxed1 <= soc_netsoc_sdram_cmd_payload_a; - end - endcase -end -always @(*) begin - vns_array_muxed2 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel0) - 1'd0: begin - vns_array_muxed2 <= 1'd0; - end - 1'd1: begin - vns_array_muxed2 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - vns_array_muxed2 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_cas); - end - default: begin - vns_array_muxed2 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_cas); - end - endcase -end -always @(*) begin - vns_array_muxed3 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel0) - 1'd0: begin - vns_array_muxed3 <= 1'd0; - end - 1'd1: begin - vns_array_muxed3 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - vns_array_muxed3 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_ras); - end - default: begin - vns_array_muxed3 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_ras); - end - endcase -end -always @(*) begin - vns_array_muxed4 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel0) - 1'd0: begin - vns_array_muxed4 <= 1'd0; - end - 1'd1: begin - vns_array_muxed4 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - vns_array_muxed4 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_we); - end - default: begin - vns_array_muxed4 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_we); - end - endcase -end -always @(*) begin - vns_array_muxed5 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel0) - 1'd0: begin - vns_array_muxed5 <= 1'd0; - end - 1'd1: begin - vns_array_muxed5 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - vns_array_muxed5 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_read); - end - default: begin - vns_array_muxed5 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_read); - end - endcase -end -always @(*) begin - vns_array_muxed6 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel0) - 1'd0: begin - vns_array_muxed6 <= 1'd0; - end - 1'd1: begin - vns_array_muxed6 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - vns_array_muxed6 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); - end - default: begin - vns_array_muxed6 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_write); - end - endcase -end -always @(*) begin - vns_array_muxed7 <= 3'd0; - case (soc_netsoc_sdram_steerer_sel1) - 1'd0: begin - vns_array_muxed7 <= soc_netsoc_sdram_nop_ba[2:0]; - end - 1'd1: begin - vns_array_muxed7 <= soc_netsoc_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - vns_array_muxed7 <= soc_netsoc_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - vns_array_muxed7 <= soc_netsoc_sdram_cmd_payload_ba[2:0]; - end - endcase -end -always @(*) begin - vns_array_muxed8 <= 14'd0; - case (soc_netsoc_sdram_steerer_sel1) - 1'd0: begin - vns_array_muxed8 <= soc_netsoc_sdram_nop_a; - end - 1'd1: begin - vns_array_muxed8 <= soc_netsoc_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - vns_array_muxed8 <= soc_netsoc_sdram_choose_req_cmd_payload_a; - end - default: begin - vns_array_muxed8 <= soc_netsoc_sdram_cmd_payload_a; - end - endcase -end -always @(*) begin - vns_array_muxed9 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel1) - 1'd0: begin - vns_array_muxed9 <= 1'd0; - end - 1'd1: begin - vns_array_muxed9 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - vns_array_muxed9 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_cas); - end - default: begin - vns_array_muxed9 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_cas); - end - endcase -end -always @(*) begin - vns_array_muxed10 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel1) - 1'd0: begin - vns_array_muxed10 <= 1'd0; - end - 1'd1: begin - vns_array_muxed10 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - vns_array_muxed10 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_ras); - end - default: begin - vns_array_muxed10 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_ras); - end - endcase -end -always @(*) begin - vns_array_muxed11 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel1) - 1'd0: begin - vns_array_muxed11 <= 1'd0; - end - 1'd1: begin - vns_array_muxed11 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - vns_array_muxed11 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_we); - end - default: begin - vns_array_muxed11 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_we); - end - endcase -end -always @(*) begin - vns_array_muxed12 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel1) - 1'd0: begin - vns_array_muxed12 <= 1'd0; - end - 1'd1: begin - vns_array_muxed12 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - vns_array_muxed12 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_read); - end - default: begin - vns_array_muxed12 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_read); - end - endcase -end -always @(*) begin - vns_array_muxed13 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel1) - 1'd0: begin - vns_array_muxed13 <= 1'd0; - end - 1'd1: begin - vns_array_muxed13 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - vns_array_muxed13 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); - end - default: begin - vns_array_muxed13 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_write); - end - endcase -end -always @(*) begin - vns_array_muxed14 <= 3'd0; - case (soc_netsoc_sdram_steerer_sel2) - 1'd0: begin - vns_array_muxed14 <= soc_netsoc_sdram_nop_ba[2:0]; - end - 1'd1: begin - vns_array_muxed14 <= soc_netsoc_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - vns_array_muxed14 <= soc_netsoc_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - vns_array_muxed14 <= soc_netsoc_sdram_cmd_payload_ba[2:0]; - end - endcase -end -always @(*) begin - vns_array_muxed15 <= 14'd0; - case (soc_netsoc_sdram_steerer_sel2) - 1'd0: begin - vns_array_muxed15 <= soc_netsoc_sdram_nop_a; - end - 1'd1: begin - vns_array_muxed15 <= soc_netsoc_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - vns_array_muxed15 <= soc_netsoc_sdram_choose_req_cmd_payload_a; - end - default: begin - vns_array_muxed15 <= soc_netsoc_sdram_cmd_payload_a; - end - endcase -end -always @(*) begin - vns_array_muxed16 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel2) - 1'd0: begin - vns_array_muxed16 <= 1'd0; - end - 1'd1: begin - vns_array_muxed16 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - vns_array_muxed16 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_cas); - end - default: begin - vns_array_muxed16 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_cas); - end - endcase -end -always @(*) begin - vns_array_muxed17 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel2) - 1'd0: begin - vns_array_muxed17 <= 1'd0; - end - 1'd1: begin - vns_array_muxed17 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - vns_array_muxed17 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_ras); - end - default: begin - vns_array_muxed17 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_ras); - end - endcase -end -always @(*) begin - vns_array_muxed18 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel2) - 1'd0: begin - vns_array_muxed18 <= 1'd0; - end - 1'd1: begin - vns_array_muxed18 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - vns_array_muxed18 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_we); - end - default: begin - vns_array_muxed18 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_we); - end - endcase -end -always @(*) begin - vns_array_muxed19 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel2) - 1'd0: begin - vns_array_muxed19 <= 1'd0; - end - 1'd1: begin - vns_array_muxed19 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - vns_array_muxed19 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_read); - end - default: begin - vns_array_muxed19 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_read); - end - endcase -end -always @(*) begin - vns_array_muxed20 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel2) - 1'd0: begin - vns_array_muxed20 <= 1'd0; - end - 1'd1: begin - vns_array_muxed20 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - vns_array_muxed20 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); - end - default: begin - vns_array_muxed20 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_write); - end - endcase -end -always @(*) begin - vns_array_muxed21 <= 3'd0; - case (soc_netsoc_sdram_steerer_sel3) - 1'd0: begin - vns_array_muxed21 <= soc_netsoc_sdram_nop_ba[2:0]; - end - 1'd1: begin - vns_array_muxed21 <= soc_netsoc_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - vns_array_muxed21 <= soc_netsoc_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - vns_array_muxed21 <= soc_netsoc_sdram_cmd_payload_ba[2:0]; - end - endcase -end -always @(*) begin - vns_array_muxed22 <= 14'd0; - case (soc_netsoc_sdram_steerer_sel3) - 1'd0: begin - vns_array_muxed22 <= soc_netsoc_sdram_nop_a; - end - 1'd1: begin - vns_array_muxed22 <= soc_netsoc_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - vns_array_muxed22 <= soc_netsoc_sdram_choose_req_cmd_payload_a; - end - default: begin - vns_array_muxed22 <= soc_netsoc_sdram_cmd_payload_a; - end - endcase -end -always @(*) begin - vns_array_muxed23 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel3) - 1'd0: begin - vns_array_muxed23 <= 1'd0; - end - 1'd1: begin - vns_array_muxed23 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - vns_array_muxed23 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_cas); - end - default: begin - vns_array_muxed23 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_cas); - end - endcase -end -always @(*) begin - vns_array_muxed24 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel3) - 1'd0: begin - vns_array_muxed24 <= 1'd0; - end - 1'd1: begin - vns_array_muxed24 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - vns_array_muxed24 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_ras); - end - default: begin - vns_array_muxed24 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_ras); - end - endcase -end -always @(*) begin - vns_array_muxed25 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel3) - 1'd0: begin - vns_array_muxed25 <= 1'd0; - end - 1'd1: begin - vns_array_muxed25 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - vns_array_muxed25 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_we); - end - default: begin - vns_array_muxed25 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_we); - end - endcase -end -always @(*) begin - vns_array_muxed26 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel3) - 1'd0: begin - vns_array_muxed26 <= 1'd0; - end - 1'd1: begin - vns_array_muxed26 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - vns_array_muxed26 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_read); - end - default: begin - vns_array_muxed26 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_read); - end - endcase -end -always @(*) begin - vns_array_muxed27 <= 1'd0; - case (soc_netsoc_sdram_steerer_sel3) - 1'd0: begin - vns_array_muxed27 <= 1'd0; - end - 1'd1: begin - vns_array_muxed27 <= ((soc_netsoc_sdram_choose_cmd_cmd_valid & soc_netsoc_sdram_choose_cmd_cmd_ready) & soc_netsoc_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - vns_array_muxed27 <= ((soc_netsoc_sdram_choose_req_cmd_valid & soc_netsoc_sdram_choose_req_cmd_ready) & soc_netsoc_sdram_choose_req_cmd_payload_is_write); - end - default: begin - vns_array_muxed27 <= ((soc_netsoc_sdram_cmd_valid & soc_netsoc_sdram_cmd_ready) & soc_netsoc_sdram_cmd_payload_is_write); - end - endcase -end -assign soc_netsoc_uart_phy_rx = vns_xilinxmultiregimpl0_regs1; -assign vns_xilinxasyncresetsynchronizerimpl0 = ((~soc_pll_locked) | (~cpu_reset)); -assign vns_xilinxasyncresetsynchronizerimpl1 = ((~soc_pll_locked) | (~cpu_reset)); -always @(*) begin - soc_status <= 1'd0; - soc_status <= soc_r; - soc_status <= vns_xilinxmultiregimpl1_regs1; -end -assign soc_ps_preamble_error_toggle_o = vns_xilinxmultiregimpl2_regs1; -assign soc_ps_crc_error_toggle_o = vns_xilinxmultiregimpl3_regs1; -assign soc_tx_cdc_produce_rdomain = vns_xilinxmultiregimpl4_regs1; -assign soc_tx_cdc_consume_wdomain = vns_xilinxmultiregimpl5_regs1; -assign soc_rx_cdc_produce_rdomain = vns_xilinxmultiregimpl6_regs1; -assign soc_rx_cdc_consume_wdomain = vns_xilinxmultiregimpl7_regs1; - -always @(posedge clk200_clk) begin - if ((soc_reset_counter != 1'd0)) begin - soc_reset_counter <= (soc_reset_counter - 1'd1); - end else begin - soc_ic_reset <= 1'd0; - end - if (clk200_rst) begin - soc_reset_counter <= 4'd15; - soc_ic_reset <= 1'd1; - end -end - -always @(posedge eth_rx_clk) begin - soc_liteethphymiirx_converter_reset <= (~eth_rx_dv); - soc_liteethphymiirx_converter_sink_valid <= 1'd1; - soc_liteethphymiirx_converter_sink_payload_data <= eth_rx_data; - if (soc_liteethphymiirx_converter_converter_source_ready) begin - soc_liteethphymiirx_converter_converter_strobe_all <= 1'd0; - end - if (soc_liteethphymiirx_converter_converter_load_part) begin - if (((soc_liteethphymiirx_converter_converter_demux == 1'd1) | soc_liteethphymiirx_converter_converter_sink_last)) begin - soc_liteethphymiirx_converter_converter_demux <= 1'd0; - soc_liteethphymiirx_converter_converter_strobe_all <= 1'd1; - end else begin - soc_liteethphymiirx_converter_converter_demux <= (soc_liteethphymiirx_converter_converter_demux + 1'd1); - end - end - if ((soc_liteethphymiirx_converter_converter_source_valid & soc_liteethphymiirx_converter_converter_source_ready)) begin - if ((soc_liteethphymiirx_converter_converter_sink_valid & soc_liteethphymiirx_converter_converter_sink_ready)) begin - soc_liteethphymiirx_converter_converter_source_first <= soc_liteethphymiirx_converter_converter_sink_first; - soc_liteethphymiirx_converter_converter_source_last <= soc_liteethphymiirx_converter_converter_sink_last; - end else begin - soc_liteethphymiirx_converter_converter_source_first <= 1'd0; - soc_liteethphymiirx_converter_converter_source_last <= 1'd0; - end - end else begin - if ((soc_liteethphymiirx_converter_converter_sink_valid & soc_liteethphymiirx_converter_converter_sink_ready)) begin - soc_liteethphymiirx_converter_converter_source_first <= (soc_liteethphymiirx_converter_converter_sink_first | soc_liteethphymiirx_converter_converter_source_first); - soc_liteethphymiirx_converter_converter_source_last <= (soc_liteethphymiirx_converter_converter_sink_last | soc_liteethphymiirx_converter_converter_source_last); - end - end - if (soc_liteethphymiirx_converter_converter_load_part) begin - case (soc_liteethphymiirx_converter_converter_demux) - 1'd0: begin - soc_liteethphymiirx_converter_converter_source_payload_data[3:0] <= soc_liteethphymiirx_converter_converter_sink_payload_data; - end - 1'd1: begin - soc_liteethphymiirx_converter_converter_source_payload_data[7:4] <= soc_liteethphymiirx_converter_converter_sink_payload_data; - end - endcase - end - if (soc_liteethphymiirx_converter_converter_load_part) begin - soc_liteethphymiirx_converter_converter_source_payload_valid_token_count <= (soc_liteethphymiirx_converter_converter_demux + 1'd1); - end - if (soc_liteethphymiirx_converter_reset) begin - soc_liteethphymiirx_converter_converter_source_first <= 1'd0; - soc_liteethphymiirx_converter_converter_source_last <= 1'd0; - soc_liteethphymiirx_converter_converter_source_payload_data <= 8'd0; - soc_liteethphymiirx_converter_converter_source_payload_valid_token_count <= 2'd0; - soc_liteethphymiirx_converter_converter_demux <= 1'd0; - soc_liteethphymiirx_converter_converter_strobe_all <= 1'd0; - end - vns_liteethmacpreamblechecker_state <= vns_liteethmacpreamblechecker_next_state; - if (soc_crc32_checker_crc_ce) begin - soc_crc32_checker_crc_reg <= soc_crc32_checker_crc_next; - end - if (soc_crc32_checker_crc_reset) begin - soc_crc32_checker_crc_reg <= 32'd4294967295; - end - if (((soc_crc32_checker_syncfifo_syncfifo_we & soc_crc32_checker_syncfifo_syncfifo_writable) & (~soc_crc32_checker_syncfifo_replace))) begin - if ((soc_crc32_checker_syncfifo_produce == 3'd4)) begin - soc_crc32_checker_syncfifo_produce <= 1'd0; - end else begin - soc_crc32_checker_syncfifo_produce <= (soc_crc32_checker_syncfifo_produce + 1'd1); - end - end - if (soc_crc32_checker_syncfifo_do_read) begin - if ((soc_crc32_checker_syncfifo_consume == 3'd4)) begin - soc_crc32_checker_syncfifo_consume <= 1'd0; - end else begin - soc_crc32_checker_syncfifo_consume <= (soc_crc32_checker_syncfifo_consume + 1'd1); - end - end - if (((soc_crc32_checker_syncfifo_syncfifo_we & soc_crc32_checker_syncfifo_syncfifo_writable) & (~soc_crc32_checker_syncfifo_replace))) begin - if ((~soc_crc32_checker_syncfifo_do_read)) begin - soc_crc32_checker_syncfifo_level <= (soc_crc32_checker_syncfifo_level + 1'd1); - end - end else begin - if (soc_crc32_checker_syncfifo_do_read) begin - soc_crc32_checker_syncfifo_level <= (soc_crc32_checker_syncfifo_level - 1'd1); - end - end - if (soc_crc32_checker_fifo_reset) begin - soc_crc32_checker_syncfifo_level <= 3'd0; - soc_crc32_checker_syncfifo_produce <= 3'd0; - soc_crc32_checker_syncfifo_consume <= 3'd0; - end - vns_liteethmaccrc32checker_state <= vns_liteethmaccrc32checker_next_state; - if (soc_ps_preamble_error_i) begin - soc_ps_preamble_error_toggle_i <= (~soc_ps_preamble_error_toggle_i); - end - if (soc_ps_crc_error_i) begin - soc_ps_crc_error_toggle_i <= (~soc_ps_crc_error_toggle_i); - end - if (soc_rx_converter_converter_source_ready) begin - soc_rx_converter_converter_strobe_all <= 1'd0; - end - if (soc_rx_converter_converter_load_part) begin - if (((soc_rx_converter_converter_demux == 2'd3) | soc_rx_converter_converter_sink_last)) begin - soc_rx_converter_converter_demux <= 1'd0; - soc_rx_converter_converter_strobe_all <= 1'd1; - end else begin - soc_rx_converter_converter_demux <= (soc_rx_converter_converter_demux + 1'd1); - end - end - if ((soc_rx_converter_converter_source_valid & soc_rx_converter_converter_source_ready)) begin - if ((soc_rx_converter_converter_sink_valid & soc_rx_converter_converter_sink_ready)) begin - soc_rx_converter_converter_source_first <= soc_rx_converter_converter_sink_first; - soc_rx_converter_converter_source_last <= soc_rx_converter_converter_sink_last; - end else begin - soc_rx_converter_converter_source_first <= 1'd0; - soc_rx_converter_converter_source_last <= 1'd0; - end - end else begin - if ((soc_rx_converter_converter_sink_valid & soc_rx_converter_converter_sink_ready)) begin - soc_rx_converter_converter_source_first <= (soc_rx_converter_converter_sink_first | soc_rx_converter_converter_source_first); - soc_rx_converter_converter_source_last <= (soc_rx_converter_converter_sink_last | soc_rx_converter_converter_source_last); - end - end - if (soc_rx_converter_converter_load_part) begin - case (soc_rx_converter_converter_demux) - 1'd0: begin - soc_rx_converter_converter_source_payload_data[9:0] <= soc_rx_converter_converter_sink_payload_data; - end - 1'd1: begin - soc_rx_converter_converter_source_payload_data[19:10] <= soc_rx_converter_converter_sink_payload_data; - end - 2'd2: begin - soc_rx_converter_converter_source_payload_data[29:20] <= soc_rx_converter_converter_sink_payload_data; - end - 2'd3: begin - soc_rx_converter_converter_source_payload_data[39:30] <= soc_rx_converter_converter_sink_payload_data; - end - endcase - end - if (soc_rx_converter_converter_load_part) begin - soc_rx_converter_converter_source_payload_valid_token_count <= (soc_rx_converter_converter_demux + 1'd1); - end - soc_rx_cdc_graycounter0_q_binary <= soc_rx_cdc_graycounter0_q_next_binary; - soc_rx_cdc_graycounter0_q <= soc_rx_cdc_graycounter0_q_next; - if (eth_rx_rst) begin - soc_liteethphymiirx_converter_sink_valid <= 1'd0; - soc_liteethphymiirx_converter_sink_payload_data <= 4'd0; - soc_liteethphymiirx_converter_converter_source_first <= 1'd0; - soc_liteethphymiirx_converter_converter_source_last <= 1'd0; - soc_liteethphymiirx_converter_converter_source_payload_data <= 8'd0; - soc_liteethphymiirx_converter_converter_source_payload_valid_token_count <= 2'd0; - soc_liteethphymiirx_converter_converter_demux <= 1'd0; - soc_liteethphymiirx_converter_converter_strobe_all <= 1'd0; - soc_liteethphymiirx_converter_reset <= 1'd0; - soc_crc32_checker_crc_reg <= 32'd4294967295; - soc_crc32_checker_syncfifo_level <= 3'd0; - soc_crc32_checker_syncfifo_produce <= 3'd0; - soc_crc32_checker_syncfifo_consume <= 3'd0; - soc_rx_converter_converter_source_first <= 1'd0; - soc_rx_converter_converter_source_last <= 1'd0; - soc_rx_converter_converter_source_payload_data <= 40'd0; - soc_rx_converter_converter_source_payload_valid_token_count <= 3'd0; - soc_rx_converter_converter_demux <= 2'd0; - soc_rx_converter_converter_strobe_all <= 1'd0; - soc_rx_cdc_graycounter0_q <= 7'd0; - soc_rx_cdc_graycounter0_q_binary <= 7'd0; - vns_liteethmacpreamblechecker_state <= 1'd0; - vns_liteethmaccrc32checker_state <= 2'd0; - end - vns_xilinxmultiregimpl7_regs0 <= soc_rx_cdc_graycounter1_q; - vns_xilinxmultiregimpl7_regs1 <= vns_xilinxmultiregimpl7_regs0; -end - -always @(posedge eth_tx_clk) begin - eth_tx_en <= soc_liteethphymiitx_converter_source_valid; - eth_tx_data <= soc_liteethphymiitx_converter_source_payload_data; - if ((soc_liteethphymiitx_converter_converter_source_valid & soc_liteethphymiitx_converter_converter_source_ready)) begin - if (soc_liteethphymiitx_converter_converter_last) begin - soc_liteethphymiitx_converter_converter_mux <= 1'd0; - end else begin - soc_liteethphymiitx_converter_converter_mux <= (soc_liteethphymiitx_converter_converter_mux + 1'd1); - end - end - if (soc_tx_gap_inserter_counter_reset) begin - soc_tx_gap_inserter_counter <= 1'd0; - end else begin - if (soc_tx_gap_inserter_counter_ce) begin - soc_tx_gap_inserter_counter <= (soc_tx_gap_inserter_counter + 1'd1); - end - end - vns_liteethmacgap_state <= vns_liteethmacgap_next_state; - if (soc_preamble_inserter_clr_cnt) begin - soc_preamble_inserter_cnt <= 1'd0; - end else begin - if (soc_preamble_inserter_inc_cnt) begin - soc_preamble_inserter_cnt <= (soc_preamble_inserter_cnt + 1'd1); - end - end - vns_liteethmacpreambleinserter_state <= vns_liteethmacpreambleinserter_next_state; - if (soc_crc32_inserter_is_ongoing0) begin - soc_crc32_inserter_cnt <= 2'd3; - end else begin - if ((soc_crc32_inserter_is_ongoing1 & (~soc_crc32_inserter_cnt_done))) begin - soc_crc32_inserter_cnt <= (soc_crc32_inserter_cnt - soc_crc32_inserter_source_ready); - end - end - if (soc_crc32_inserter_ce) begin - soc_crc32_inserter_reg <= soc_crc32_inserter_next; - end - if (soc_crc32_inserter_reset) begin - soc_crc32_inserter_reg <= 32'd4294967295; - end - vns_liteethmaccrc32inserter_state <= vns_liteethmaccrc32inserter_next_state; - if (soc_padding_inserter_counter_reset) begin - soc_padding_inserter_counter <= 1'd0; - end else begin - if (soc_padding_inserter_counter_ce) begin - soc_padding_inserter_counter <= (soc_padding_inserter_counter + 1'd1); - end - end - vns_liteethmacpaddinginserter_state <= vns_liteethmacpaddinginserter_next_state; - if ((soc_tx_last_be_sink_valid & soc_tx_last_be_sink_ready)) begin - if (soc_tx_last_be_sink_last) begin - soc_tx_last_be_ongoing <= 1'd1; - end else begin - if (soc_tx_last_be_sink_payload_last_be) begin - soc_tx_last_be_ongoing <= 1'd0; - end - end - end - if ((soc_tx_converter_converter_source_valid & soc_tx_converter_converter_source_ready)) begin - if (soc_tx_converter_converter_last) begin - soc_tx_converter_converter_mux <= 1'd0; - end else begin - soc_tx_converter_converter_mux <= (soc_tx_converter_converter_mux + 1'd1); - end - end - soc_tx_cdc_graycounter1_q_binary <= soc_tx_cdc_graycounter1_q_next_binary; - soc_tx_cdc_graycounter1_q <= soc_tx_cdc_graycounter1_q_next; - if (eth_tx_rst) begin - soc_liteethphymiitx_converter_converter_mux <= 1'd0; - soc_crc32_inserter_reg <= 32'd4294967295; - soc_crc32_inserter_cnt <= 2'd3; - soc_padding_inserter_counter <= 16'd1; - soc_tx_last_be_ongoing <= 1'd1; - soc_tx_converter_converter_mux <= 2'd0; - soc_tx_cdc_graycounter1_q <= 7'd0; - soc_tx_cdc_graycounter1_q_binary <= 7'd0; - vns_liteethmacgap_state <= 1'd0; - vns_liteethmacpreambleinserter_state <= 2'd0; - vns_liteethmaccrc32inserter_state <= 2'd0; - vns_liteethmacpaddinginserter_state <= 1'd0; - end - vns_xilinxmultiregimpl4_regs0 <= soc_tx_cdc_graycounter0_q; - vns_xilinxmultiregimpl4_regs1 <= vns_xilinxmultiregimpl4_regs0; -end - -always @(posedge sys_clk) begin - if ((soc_netsoc_ctrl_bus_errors != 32'd4294967295)) begin - if (soc_netsoc_ctrl_bus_error) begin - soc_netsoc_ctrl_bus_errors <= (soc_netsoc_ctrl_bus_errors + 1'd1); - end - end - soc_netsoc_cpu_time <= (soc_netsoc_cpu_time + 1'd1); - if (soc_netsoc_cpu_latch_re) begin - soc_netsoc_cpu_time_status <= soc_netsoc_cpu_time; - end - if (soc_netsoc_cpu_latch_re) begin - soc_netsoc_cpu_time_cmp <= soc_netsoc_cpu_time_cmp_storage; - end - soc_netsoc_rom_bus_ack <= 1'd0; - if (((soc_netsoc_rom_bus_cyc & soc_netsoc_rom_bus_stb) & (~soc_netsoc_rom_bus_ack))) begin - soc_netsoc_rom_bus_ack <= 1'd1; - end - soc_netsoc_sram_bus_ack <= 1'd0; - if (((soc_netsoc_sram_bus_cyc & soc_netsoc_sram_bus_stb) & (~soc_netsoc_sram_bus_ack))) begin - soc_netsoc_sram_bus_ack <= 1'd1; - end - soc_netsoc_uart_phy_sink_ready <= 1'd0; - if (((soc_netsoc_uart_phy_sink_valid & (~soc_netsoc_uart_phy_tx_busy)) & (~soc_netsoc_uart_phy_sink_ready))) begin - soc_netsoc_uart_phy_tx_reg <= soc_netsoc_uart_phy_sink_payload_data; - soc_netsoc_uart_phy_tx_bitcount <= 1'd0; - soc_netsoc_uart_phy_tx_busy <= 1'd1; - serial_tx <= 1'd0; - end else begin - if ((soc_netsoc_uart_phy_uart_clk_txen & soc_netsoc_uart_phy_tx_busy)) begin - soc_netsoc_uart_phy_tx_bitcount <= (soc_netsoc_uart_phy_tx_bitcount + 1'd1); - if ((soc_netsoc_uart_phy_tx_bitcount == 4'd8)) begin - serial_tx <= 1'd1; - end else begin - if ((soc_netsoc_uart_phy_tx_bitcount == 4'd9)) begin - serial_tx <= 1'd1; - soc_netsoc_uart_phy_tx_busy <= 1'd0; - soc_netsoc_uart_phy_sink_ready <= 1'd1; - end else begin - serial_tx <= soc_netsoc_uart_phy_tx_reg[0]; - soc_netsoc_uart_phy_tx_reg <= {1'd0, soc_netsoc_uart_phy_tx_reg[7:1]}; - end - end - end - end - if (soc_netsoc_uart_phy_tx_busy) begin - {soc_netsoc_uart_phy_uart_clk_txen, soc_netsoc_uart_phy_phase_accumulator_tx} <= (soc_netsoc_uart_phy_phase_accumulator_tx + soc_netsoc_uart_phy_storage); - end else begin - {soc_netsoc_uart_phy_uart_clk_txen, soc_netsoc_uart_phy_phase_accumulator_tx} <= 1'd0; - end - soc_netsoc_uart_phy_source_valid <= 1'd0; - soc_netsoc_uart_phy_rx_r <= soc_netsoc_uart_phy_rx; - if ((~soc_netsoc_uart_phy_rx_busy)) begin - if (((~soc_netsoc_uart_phy_rx) & soc_netsoc_uart_phy_rx_r)) begin - soc_netsoc_uart_phy_rx_busy <= 1'd1; - soc_netsoc_uart_phy_rx_bitcount <= 1'd0; - end - end else begin - if (soc_netsoc_uart_phy_uart_clk_rxen) begin - soc_netsoc_uart_phy_rx_bitcount <= (soc_netsoc_uart_phy_rx_bitcount + 1'd1); - if ((soc_netsoc_uart_phy_rx_bitcount == 1'd0)) begin - if (soc_netsoc_uart_phy_rx) begin - soc_netsoc_uart_phy_rx_busy <= 1'd0; - end - end else begin - if ((soc_netsoc_uart_phy_rx_bitcount == 4'd9)) begin - soc_netsoc_uart_phy_rx_busy <= 1'd0; - if (soc_netsoc_uart_phy_rx) begin - soc_netsoc_uart_phy_source_payload_data <= soc_netsoc_uart_phy_rx_reg; - soc_netsoc_uart_phy_source_valid <= 1'd1; - end - end else begin - soc_netsoc_uart_phy_rx_reg <= {soc_netsoc_uart_phy_rx, soc_netsoc_uart_phy_rx_reg[7:1]}; - end - end - end - end - if (soc_netsoc_uart_phy_rx_busy) begin - {soc_netsoc_uart_phy_uart_clk_rxen, soc_netsoc_uart_phy_phase_accumulator_rx} <= (soc_netsoc_uart_phy_phase_accumulator_rx + soc_netsoc_uart_phy_storage); - end else begin - {soc_netsoc_uart_phy_uart_clk_rxen, soc_netsoc_uart_phy_phase_accumulator_rx} <= 32'd2147483648; - end - if (soc_netsoc_uart_tx_clear) begin - soc_netsoc_uart_tx_pending <= 1'd0; - end - soc_netsoc_uart_tx_old_trigger <= soc_netsoc_uart_tx_trigger; - if (((~soc_netsoc_uart_tx_trigger) & soc_netsoc_uart_tx_old_trigger)) begin - soc_netsoc_uart_tx_pending <= 1'd1; - end - if (soc_netsoc_uart_rx_clear) begin - soc_netsoc_uart_rx_pending <= 1'd0; - end - soc_netsoc_uart_rx_old_trigger <= soc_netsoc_uart_rx_trigger; - if (((~soc_netsoc_uart_rx_trigger) & soc_netsoc_uart_rx_old_trigger)) begin - soc_netsoc_uart_rx_pending <= 1'd1; - end - if (soc_netsoc_uart_tx_fifo_syncfifo_re) begin - soc_netsoc_uart_tx_fifo_readable <= 1'd1; - end else begin - if (soc_netsoc_uart_tx_fifo_re) begin - soc_netsoc_uart_tx_fifo_readable <= 1'd0; - end - end - if (((soc_netsoc_uart_tx_fifo_syncfifo_we & soc_netsoc_uart_tx_fifo_syncfifo_writable) & (~soc_netsoc_uart_tx_fifo_replace))) begin - soc_netsoc_uart_tx_fifo_produce <= (soc_netsoc_uart_tx_fifo_produce + 1'd1); - end - if (soc_netsoc_uart_tx_fifo_do_read) begin - soc_netsoc_uart_tx_fifo_consume <= (soc_netsoc_uart_tx_fifo_consume + 1'd1); - end - if (((soc_netsoc_uart_tx_fifo_syncfifo_we & soc_netsoc_uart_tx_fifo_syncfifo_writable) & (~soc_netsoc_uart_tx_fifo_replace))) begin - if ((~soc_netsoc_uart_tx_fifo_do_read)) begin - soc_netsoc_uart_tx_fifo_level0 <= (soc_netsoc_uart_tx_fifo_level0 + 1'd1); - end - end else begin - if (soc_netsoc_uart_tx_fifo_do_read) begin - soc_netsoc_uart_tx_fifo_level0 <= (soc_netsoc_uart_tx_fifo_level0 - 1'd1); - end - end - if (soc_netsoc_uart_rx_fifo_syncfifo_re) begin - soc_netsoc_uart_rx_fifo_readable <= 1'd1; - end else begin - if (soc_netsoc_uart_rx_fifo_re) begin - soc_netsoc_uart_rx_fifo_readable <= 1'd0; - end - end - if (((soc_netsoc_uart_rx_fifo_syncfifo_we & soc_netsoc_uart_rx_fifo_syncfifo_writable) & (~soc_netsoc_uart_rx_fifo_replace))) begin - soc_netsoc_uart_rx_fifo_produce <= (soc_netsoc_uart_rx_fifo_produce + 1'd1); - end - if (soc_netsoc_uart_rx_fifo_do_read) begin - soc_netsoc_uart_rx_fifo_consume <= (soc_netsoc_uart_rx_fifo_consume + 1'd1); - end - if (((soc_netsoc_uart_rx_fifo_syncfifo_we & soc_netsoc_uart_rx_fifo_syncfifo_writable) & (~soc_netsoc_uart_rx_fifo_replace))) begin - if ((~soc_netsoc_uart_rx_fifo_do_read)) begin - soc_netsoc_uart_rx_fifo_level0 <= (soc_netsoc_uart_rx_fifo_level0 + 1'd1); - end - end else begin - if (soc_netsoc_uart_rx_fifo_do_read) begin - soc_netsoc_uart_rx_fifo_level0 <= (soc_netsoc_uart_rx_fifo_level0 - 1'd1); - end - end - if (soc_netsoc_uart_reset) begin - soc_netsoc_uart_tx_pending <= 1'd0; - soc_netsoc_uart_tx_old_trigger <= 1'd0; - soc_netsoc_uart_rx_pending <= 1'd0; - soc_netsoc_uart_rx_old_trigger <= 1'd0; - soc_netsoc_uart_tx_fifo_readable <= 1'd0; - soc_netsoc_uart_tx_fifo_level0 <= 5'd0; - soc_netsoc_uart_tx_fifo_produce <= 4'd0; - soc_netsoc_uart_tx_fifo_consume <= 4'd0; - soc_netsoc_uart_rx_fifo_readable <= 1'd0; - soc_netsoc_uart_rx_fifo_level0 <= 5'd0; - soc_netsoc_uart_rx_fifo_produce <= 4'd0; - soc_netsoc_uart_rx_fifo_consume <= 4'd0; - end - if (soc_netsoc_timer0_en_storage) begin - if ((soc_netsoc_timer0_value == 1'd0)) begin - soc_netsoc_timer0_value <= soc_netsoc_timer0_reload_storage; - end else begin - soc_netsoc_timer0_value <= (soc_netsoc_timer0_value - 1'd1); - end - end else begin - soc_netsoc_timer0_value <= soc_netsoc_timer0_load_storage; - end - if (soc_netsoc_timer0_update_value_re) begin - soc_netsoc_timer0_value_status <= soc_netsoc_timer0_value; - end - if (soc_netsoc_timer0_zero_clear) begin - soc_netsoc_timer0_zero_pending <= 1'd0; - end - soc_netsoc_timer0_zero_old_trigger <= soc_netsoc_timer0_zero_trigger; - if (((~soc_netsoc_timer0_zero_trigger) & soc_netsoc_timer0_zero_old_trigger)) begin - soc_netsoc_timer0_zero_pending <= 1'd1; - end - vns_wb2csr_state <= vns_wb2csr_next_state; - soc_emulator_ram_bus_ack <= 1'd0; - if (((soc_emulator_ram_bus_cyc & soc_emulator_ram_bus_stb) & (~soc_emulator_ram_bus_ack))) begin - soc_emulator_ram_bus_ack <= 1'd1; - end - if (soc_a7ddrphy_dly_sel_storage[0]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip0_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip0_value <= (soc_a7ddrphy_bitslip0_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[0]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip1_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip1_value <= (soc_a7ddrphy_bitslip1_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[0]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip2_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip2_value <= (soc_a7ddrphy_bitslip2_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[0]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip3_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip3_value <= (soc_a7ddrphy_bitslip3_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[0]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip4_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip4_value <= (soc_a7ddrphy_bitslip4_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[0]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip5_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip5_value <= (soc_a7ddrphy_bitslip5_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[0]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip6_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip6_value <= (soc_a7ddrphy_bitslip6_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[0]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip7_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip7_value <= (soc_a7ddrphy_bitslip7_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[1]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip8_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip8_value <= (soc_a7ddrphy_bitslip8_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[1]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip9_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip9_value <= (soc_a7ddrphy_bitslip9_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[1]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip10_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip10_value <= (soc_a7ddrphy_bitslip10_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[1]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip11_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip11_value <= (soc_a7ddrphy_bitslip11_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[1]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip12_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip12_value <= (soc_a7ddrphy_bitslip12_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[1]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip13_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip13_value <= (soc_a7ddrphy_bitslip13_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[1]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip14_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip14_value <= (soc_a7ddrphy_bitslip14_value + 1'd1); - end - end - end - if (soc_a7ddrphy_dly_sel_storage[1]) begin - if (soc_a7ddrphy_rdly_dq_bitslip_rst_re) begin - soc_a7ddrphy_bitslip15_value <= 1'd0; - end else begin - if (soc_a7ddrphy_rdly_dq_bitslip_re) begin - soc_a7ddrphy_bitslip15_value <= (soc_a7ddrphy_bitslip15_value + 1'd1); - end - end - end - soc_a7ddrphy_n_rddata_en0 <= soc_a7ddrphy_dfi_p2_rddata_en; - soc_a7ddrphy_n_rddata_en1 <= soc_a7ddrphy_n_rddata_en0; - soc_a7ddrphy_n_rddata_en2 <= soc_a7ddrphy_n_rddata_en1; - soc_a7ddrphy_n_rddata_en3 <= soc_a7ddrphy_n_rddata_en2; - soc_a7ddrphy_n_rddata_en4 <= soc_a7ddrphy_n_rddata_en3; - soc_a7ddrphy_n_rddata_en5 <= soc_a7ddrphy_n_rddata_en4; - soc_a7ddrphy_n_rddata_en6 <= soc_a7ddrphy_n_rddata_en5; - soc_a7ddrphy_n_rddata_en7 <= soc_a7ddrphy_n_rddata_en6; - soc_a7ddrphy_dfi_p0_rddata_valid <= soc_a7ddrphy_n_rddata_en7; - soc_a7ddrphy_dfi_p1_rddata_valid <= soc_a7ddrphy_n_rddata_en7; - soc_a7ddrphy_dfi_p2_rddata_valid <= soc_a7ddrphy_n_rddata_en7; - soc_a7ddrphy_dfi_p3_rddata_valid <= soc_a7ddrphy_n_rddata_en7; - soc_a7ddrphy_last_wrdata_en <= {soc_a7ddrphy_last_wrdata_en[2:0], soc_a7ddrphy_dfi_p3_wrdata_en}; - soc_a7ddrphy_oe_dqs <= soc_a7ddrphy_oe; - soc_a7ddrphy_oe_dq <= soc_a7ddrphy_oe; - soc_a7ddrphy_bitslip0_r <= {soc_a7ddrphy_bitslip0_i, soc_a7ddrphy_bitslip0_r[15:8]}; - case (soc_a7ddrphy_bitslip0_value) - 1'd0: begin - soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip0_o <= soc_a7ddrphy_bitslip0_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip1_r <= {soc_a7ddrphy_bitslip1_i, soc_a7ddrphy_bitslip1_r[15:8]}; - case (soc_a7ddrphy_bitslip1_value) - 1'd0: begin - soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip1_o <= soc_a7ddrphy_bitslip1_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip2_r <= {soc_a7ddrphy_bitslip2_i, soc_a7ddrphy_bitslip2_r[15:8]}; - case (soc_a7ddrphy_bitslip2_value) - 1'd0: begin - soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip2_o <= soc_a7ddrphy_bitslip2_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip3_r <= {soc_a7ddrphy_bitslip3_i, soc_a7ddrphy_bitslip3_r[15:8]}; - case (soc_a7ddrphy_bitslip3_value) - 1'd0: begin - soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip3_o <= soc_a7ddrphy_bitslip3_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip4_r <= {soc_a7ddrphy_bitslip4_i, soc_a7ddrphy_bitslip4_r[15:8]}; - case (soc_a7ddrphy_bitslip4_value) - 1'd0: begin - soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip4_o <= soc_a7ddrphy_bitslip4_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip5_r <= {soc_a7ddrphy_bitslip5_i, soc_a7ddrphy_bitslip5_r[15:8]}; - case (soc_a7ddrphy_bitslip5_value) - 1'd0: begin - soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip5_o <= soc_a7ddrphy_bitslip5_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip6_r <= {soc_a7ddrphy_bitslip6_i, soc_a7ddrphy_bitslip6_r[15:8]}; - case (soc_a7ddrphy_bitslip6_value) - 1'd0: begin - soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip6_o <= soc_a7ddrphy_bitslip6_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip7_r <= {soc_a7ddrphy_bitslip7_i, soc_a7ddrphy_bitslip7_r[15:8]}; - case (soc_a7ddrphy_bitslip7_value) - 1'd0: begin - soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip7_o <= soc_a7ddrphy_bitslip7_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip8_r <= {soc_a7ddrphy_bitslip8_i, soc_a7ddrphy_bitslip8_r[15:8]}; - case (soc_a7ddrphy_bitslip8_value) - 1'd0: begin - soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip8_o <= soc_a7ddrphy_bitslip8_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip9_r <= {soc_a7ddrphy_bitslip9_i, soc_a7ddrphy_bitslip9_r[15:8]}; - case (soc_a7ddrphy_bitslip9_value) - 1'd0: begin - soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip9_o <= soc_a7ddrphy_bitslip9_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip10_r <= {soc_a7ddrphy_bitslip10_i, soc_a7ddrphy_bitslip10_r[15:8]}; - case (soc_a7ddrphy_bitslip10_value) - 1'd0: begin - soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip10_o <= soc_a7ddrphy_bitslip10_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip11_r <= {soc_a7ddrphy_bitslip11_i, soc_a7ddrphy_bitslip11_r[15:8]}; - case (soc_a7ddrphy_bitslip11_value) - 1'd0: begin - soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip11_o <= soc_a7ddrphy_bitslip11_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip12_r <= {soc_a7ddrphy_bitslip12_i, soc_a7ddrphy_bitslip12_r[15:8]}; - case (soc_a7ddrphy_bitslip12_value) - 1'd0: begin - soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip12_o <= soc_a7ddrphy_bitslip12_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip13_r <= {soc_a7ddrphy_bitslip13_i, soc_a7ddrphy_bitslip13_r[15:8]}; - case (soc_a7ddrphy_bitslip13_value) - 1'd0: begin - soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip13_o <= soc_a7ddrphy_bitslip13_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip14_r <= {soc_a7ddrphy_bitslip14_i, soc_a7ddrphy_bitslip14_r[15:8]}; - case (soc_a7ddrphy_bitslip14_value) - 1'd0: begin - soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip14_o <= soc_a7ddrphy_bitslip14_r[14:7]; - end - endcase - soc_a7ddrphy_bitslip15_r <= {soc_a7ddrphy_bitslip15_i, soc_a7ddrphy_bitslip15_r[15:8]}; - case (soc_a7ddrphy_bitslip15_value) - 1'd0: begin - soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[7:0]; - end - 1'd1: begin - soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[8:1]; - end - 2'd2: begin - soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[9:2]; - end - 2'd3: begin - soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[10:3]; - end - 3'd4: begin - soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[11:4]; - end - 3'd5: begin - soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[12:5]; - end - 3'd6: begin - soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[13:6]; - end - 3'd7: begin - soc_a7ddrphy_bitslip15_o <= soc_a7ddrphy_bitslip15_r[14:7]; - end - endcase - if (soc_netsoc_sdram_inti_p0_rddata_valid) begin - soc_netsoc_sdram_phaseinjector0_status <= soc_netsoc_sdram_inti_p0_rddata; - end - if (soc_netsoc_sdram_inti_p1_rddata_valid) begin - soc_netsoc_sdram_phaseinjector1_status <= soc_netsoc_sdram_inti_p1_rddata; - end - if (soc_netsoc_sdram_inti_p2_rddata_valid) begin - soc_netsoc_sdram_phaseinjector2_status <= soc_netsoc_sdram_inti_p2_rddata; - end - if (soc_netsoc_sdram_inti_p3_rddata_valid) begin - soc_netsoc_sdram_phaseinjector3_status <= soc_netsoc_sdram_inti_p3_rddata; - end - if ((soc_netsoc_sdram_timer_wait & (~soc_netsoc_sdram_timer_done0))) begin - soc_netsoc_sdram_timer_count1 <= (soc_netsoc_sdram_timer_count1 - 1'd1); - end else begin - soc_netsoc_sdram_timer_count1 <= 9'd468; - end - soc_netsoc_sdram_postponer_req_o <= 1'd0; - if (soc_netsoc_sdram_postponer_req_i) begin - soc_netsoc_sdram_postponer_count <= (soc_netsoc_sdram_postponer_count - 1'd1); - if ((soc_netsoc_sdram_postponer_count == 1'd0)) begin - soc_netsoc_sdram_postponer_count <= 1'd0; - soc_netsoc_sdram_postponer_req_o <= 1'd1; - end - end - if (soc_netsoc_sdram_sequencer_start0) begin - soc_netsoc_sdram_sequencer_count <= 1'd0; - end else begin - if (soc_netsoc_sdram_sequencer_done1) begin - if ((soc_netsoc_sdram_sequencer_count != 1'd0)) begin - soc_netsoc_sdram_sequencer_count <= (soc_netsoc_sdram_sequencer_count - 1'd1); - end - end - end - soc_netsoc_sdram_cmd_payload_a <= 1'd0; - soc_netsoc_sdram_cmd_payload_ba <= 1'd0; - soc_netsoc_sdram_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_sequencer_done1 <= 1'd0; - if ((soc_netsoc_sdram_sequencer_start1 & (soc_netsoc_sdram_sequencer_counter == 1'd0))) begin - soc_netsoc_sdram_cmd_payload_a <= 11'd1024; - soc_netsoc_sdram_cmd_payload_ba <= 1'd0; - soc_netsoc_sdram_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_cmd_payload_we <= 1'd1; - end - if ((soc_netsoc_sdram_sequencer_counter == 2'd2)) begin - soc_netsoc_sdram_cmd_payload_a <= 1'd0; - soc_netsoc_sdram_cmd_payload_ba <= 1'd0; - soc_netsoc_sdram_cmd_payload_cas <= 1'd1; - soc_netsoc_sdram_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_cmd_payload_we <= 1'd0; - end - if ((soc_netsoc_sdram_sequencer_counter == 6'd34)) begin - soc_netsoc_sdram_cmd_payload_a <= 1'd0; - soc_netsoc_sdram_cmd_payload_ba <= 1'd0; - soc_netsoc_sdram_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_sequencer_done1 <= 1'd1; - end - if ((soc_netsoc_sdram_sequencer_counter == 6'd34)) begin - soc_netsoc_sdram_sequencer_counter <= 1'd0; - end else begin - if ((soc_netsoc_sdram_sequencer_counter != 1'd0)) begin - soc_netsoc_sdram_sequencer_counter <= (soc_netsoc_sdram_sequencer_counter + 1'd1); - end else begin - if (soc_netsoc_sdram_sequencer_start1) begin - soc_netsoc_sdram_sequencer_counter <= 1'd1; - end - end - end - if ((soc_netsoc_sdram_zqcs_timer_wait & (~soc_netsoc_sdram_zqcs_timer_done0))) begin - soc_netsoc_sdram_zqcs_timer_count1 <= (soc_netsoc_sdram_zqcs_timer_count1 - 1'd1); - end else begin - soc_netsoc_sdram_zqcs_timer_count1 <= 26'd59999999; - end - soc_netsoc_sdram_zqcs_executer_done <= 1'd0; - if ((soc_netsoc_sdram_zqcs_executer_start & (soc_netsoc_sdram_zqcs_executer_counter == 1'd0))) begin - soc_netsoc_sdram_cmd_payload_a <= 11'd1024; - soc_netsoc_sdram_cmd_payload_ba <= 1'd0; - soc_netsoc_sdram_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_cmd_payload_ras <= 1'd1; - soc_netsoc_sdram_cmd_payload_we <= 1'd1; - end - if ((soc_netsoc_sdram_zqcs_executer_counter == 2'd2)) begin - soc_netsoc_sdram_cmd_payload_a <= 1'd0; - soc_netsoc_sdram_cmd_payload_ba <= 1'd0; - soc_netsoc_sdram_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_cmd_payload_we <= 1'd1; - end - if ((soc_netsoc_sdram_zqcs_executer_counter == 5'd18)) begin - soc_netsoc_sdram_cmd_payload_a <= 1'd0; - soc_netsoc_sdram_cmd_payload_ba <= 1'd0; - soc_netsoc_sdram_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_zqcs_executer_done <= 1'd1; - end - if ((soc_netsoc_sdram_zqcs_executer_counter == 5'd18)) begin - soc_netsoc_sdram_zqcs_executer_counter <= 1'd0; - end else begin - if ((soc_netsoc_sdram_zqcs_executer_counter != 1'd0)) begin - soc_netsoc_sdram_zqcs_executer_counter <= (soc_netsoc_sdram_zqcs_executer_counter + 1'd1); - end else begin - if (soc_netsoc_sdram_zqcs_executer_start) begin - soc_netsoc_sdram_zqcs_executer_counter <= 1'd1; - end - end - end - vns_refresher_state <= vns_refresher_next_state; - if (soc_netsoc_sdram_bankmachine0_row_close) begin - soc_netsoc_sdram_bankmachine0_row_opened <= 1'd0; - end else begin - if (soc_netsoc_sdram_bankmachine0_row_open) begin - soc_netsoc_sdram_bankmachine0_row_opened <= 1'd1; - soc_netsoc_sdram_bankmachine0_row <= soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce + 1'd1); - end - if (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume + 1'd1); - end - if (((soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin - if ((~soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read)) begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level - 1'd1); - end - end - if (soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid; - end - if (soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_first); - soc_netsoc_sdram_bankmachine0_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_last); - end - if (soc_netsoc_sdram_bankmachine0_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_we; - soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine0_cmd_buffer_sink_payload_addr; - end - if (soc_netsoc_sdram_bankmachine0_twtpcon_valid) begin - soc_netsoc_sdram_bankmachine0_twtpcon_count <= 3'd4; - if (1'd0) begin - soc_netsoc_sdram_bankmachine0_twtpcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine0_twtpcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine0_twtpcon_ready)) begin - soc_netsoc_sdram_bankmachine0_twtpcon_count <= (soc_netsoc_sdram_bankmachine0_twtpcon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine0_twtpcon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine0_twtpcon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine0_trccon_valid) begin - soc_netsoc_sdram_bankmachine0_trccon_count <= 2'd3; - if (1'd0) begin - soc_netsoc_sdram_bankmachine0_trccon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine0_trccon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine0_trccon_ready)) begin - soc_netsoc_sdram_bankmachine0_trccon_count <= (soc_netsoc_sdram_bankmachine0_trccon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine0_trccon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine0_trccon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine0_trascon_valid) begin - soc_netsoc_sdram_bankmachine0_trascon_count <= 2'd2; - if (1'd0) begin - soc_netsoc_sdram_bankmachine0_trascon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine0_trascon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine0_trascon_ready)) begin - soc_netsoc_sdram_bankmachine0_trascon_count <= (soc_netsoc_sdram_bankmachine0_trascon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine0_trascon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine0_trascon_ready <= 1'd1; - end - end - end - vns_bankmachine0_state <= vns_bankmachine0_next_state; - if (soc_netsoc_sdram_bankmachine1_row_close) begin - soc_netsoc_sdram_bankmachine1_row_opened <= 1'd0; - end else begin - if (soc_netsoc_sdram_bankmachine1_row_open) begin - soc_netsoc_sdram_bankmachine1_row_opened <= 1'd1; - soc_netsoc_sdram_bankmachine1_row <= soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce + 1'd1); - end - if (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume + 1'd1); - end - if (((soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin - if ((~soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read)) begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level - 1'd1); - end - end - if (soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid; - end - if (soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_first); - soc_netsoc_sdram_bankmachine1_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_last); - end - if (soc_netsoc_sdram_bankmachine1_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_we; - soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine1_cmd_buffer_sink_payload_addr; - end - if (soc_netsoc_sdram_bankmachine1_twtpcon_valid) begin - soc_netsoc_sdram_bankmachine1_twtpcon_count <= 3'd4; - if (1'd0) begin - soc_netsoc_sdram_bankmachine1_twtpcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine1_twtpcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine1_twtpcon_ready)) begin - soc_netsoc_sdram_bankmachine1_twtpcon_count <= (soc_netsoc_sdram_bankmachine1_twtpcon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine1_twtpcon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine1_twtpcon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine1_trccon_valid) begin - soc_netsoc_sdram_bankmachine1_trccon_count <= 2'd3; - if (1'd0) begin - soc_netsoc_sdram_bankmachine1_trccon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine1_trccon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine1_trccon_ready)) begin - soc_netsoc_sdram_bankmachine1_trccon_count <= (soc_netsoc_sdram_bankmachine1_trccon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine1_trccon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine1_trccon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine1_trascon_valid) begin - soc_netsoc_sdram_bankmachine1_trascon_count <= 2'd2; - if (1'd0) begin - soc_netsoc_sdram_bankmachine1_trascon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine1_trascon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine1_trascon_ready)) begin - soc_netsoc_sdram_bankmachine1_trascon_count <= (soc_netsoc_sdram_bankmachine1_trascon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine1_trascon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine1_trascon_ready <= 1'd1; - end - end - end - vns_bankmachine1_state <= vns_bankmachine1_next_state; - if (soc_netsoc_sdram_bankmachine2_row_close) begin - soc_netsoc_sdram_bankmachine2_row_opened <= 1'd0; - end else begin - if (soc_netsoc_sdram_bankmachine2_row_open) begin - soc_netsoc_sdram_bankmachine2_row_opened <= 1'd1; - soc_netsoc_sdram_bankmachine2_row <= soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce + 1'd1); - end - if (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume + 1'd1); - end - if (((soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin - if ((~soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read)) begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level - 1'd1); - end - end - if (soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid; - end - if (soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_first); - soc_netsoc_sdram_bankmachine2_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_last); - end - if (soc_netsoc_sdram_bankmachine2_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_we; - soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine2_cmd_buffer_sink_payload_addr; - end - if (soc_netsoc_sdram_bankmachine2_twtpcon_valid) begin - soc_netsoc_sdram_bankmachine2_twtpcon_count <= 3'd4; - if (1'd0) begin - soc_netsoc_sdram_bankmachine2_twtpcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine2_twtpcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine2_twtpcon_ready)) begin - soc_netsoc_sdram_bankmachine2_twtpcon_count <= (soc_netsoc_sdram_bankmachine2_twtpcon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine2_twtpcon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine2_twtpcon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine2_trccon_valid) begin - soc_netsoc_sdram_bankmachine2_trccon_count <= 2'd3; - if (1'd0) begin - soc_netsoc_sdram_bankmachine2_trccon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine2_trccon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine2_trccon_ready)) begin - soc_netsoc_sdram_bankmachine2_trccon_count <= (soc_netsoc_sdram_bankmachine2_trccon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine2_trccon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine2_trccon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine2_trascon_valid) begin - soc_netsoc_sdram_bankmachine2_trascon_count <= 2'd2; - if (1'd0) begin - soc_netsoc_sdram_bankmachine2_trascon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine2_trascon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine2_trascon_ready)) begin - soc_netsoc_sdram_bankmachine2_trascon_count <= (soc_netsoc_sdram_bankmachine2_trascon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine2_trascon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine2_trascon_ready <= 1'd1; - end - end - end - vns_bankmachine2_state <= vns_bankmachine2_next_state; - if (soc_netsoc_sdram_bankmachine3_row_close) begin - soc_netsoc_sdram_bankmachine3_row_opened <= 1'd0; - end else begin - if (soc_netsoc_sdram_bankmachine3_row_open) begin - soc_netsoc_sdram_bankmachine3_row_opened <= 1'd1; - soc_netsoc_sdram_bankmachine3_row <= soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce + 1'd1); - end - if (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume + 1'd1); - end - if (((soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin - if ((~soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read)) begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level - 1'd1); - end - end - if (soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid; - end - if (soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_first); - soc_netsoc_sdram_bankmachine3_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_last); - end - if (soc_netsoc_sdram_bankmachine3_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_we; - soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine3_cmd_buffer_sink_payload_addr; - end - if (soc_netsoc_sdram_bankmachine3_twtpcon_valid) begin - soc_netsoc_sdram_bankmachine3_twtpcon_count <= 3'd4; - if (1'd0) begin - soc_netsoc_sdram_bankmachine3_twtpcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine3_twtpcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine3_twtpcon_ready)) begin - soc_netsoc_sdram_bankmachine3_twtpcon_count <= (soc_netsoc_sdram_bankmachine3_twtpcon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine3_twtpcon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine3_twtpcon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine3_trccon_valid) begin - soc_netsoc_sdram_bankmachine3_trccon_count <= 2'd3; - if (1'd0) begin - soc_netsoc_sdram_bankmachine3_trccon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine3_trccon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine3_trccon_ready)) begin - soc_netsoc_sdram_bankmachine3_trccon_count <= (soc_netsoc_sdram_bankmachine3_trccon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine3_trccon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine3_trccon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine3_trascon_valid) begin - soc_netsoc_sdram_bankmachine3_trascon_count <= 2'd2; - if (1'd0) begin - soc_netsoc_sdram_bankmachine3_trascon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine3_trascon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine3_trascon_ready)) begin - soc_netsoc_sdram_bankmachine3_trascon_count <= (soc_netsoc_sdram_bankmachine3_trascon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine3_trascon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine3_trascon_ready <= 1'd1; - end - end - end - vns_bankmachine3_state <= vns_bankmachine3_next_state; - if (soc_netsoc_sdram_bankmachine4_row_close) begin - soc_netsoc_sdram_bankmachine4_row_opened <= 1'd0; - end else begin - if (soc_netsoc_sdram_bankmachine4_row_open) begin - soc_netsoc_sdram_bankmachine4_row_opened <= 1'd1; - soc_netsoc_sdram_bankmachine4_row <= soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce + 1'd1); - end - if (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume + 1'd1); - end - if (((soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin - if ((~soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read)) begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level - 1'd1); - end - end - if (soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid; - end - if (soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_first); - soc_netsoc_sdram_bankmachine4_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_last); - end - if (soc_netsoc_sdram_bankmachine4_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_we; - soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine4_cmd_buffer_sink_payload_addr; - end - if (soc_netsoc_sdram_bankmachine4_twtpcon_valid) begin - soc_netsoc_sdram_bankmachine4_twtpcon_count <= 3'd4; - if (1'd0) begin - soc_netsoc_sdram_bankmachine4_twtpcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine4_twtpcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine4_twtpcon_ready)) begin - soc_netsoc_sdram_bankmachine4_twtpcon_count <= (soc_netsoc_sdram_bankmachine4_twtpcon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine4_twtpcon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine4_twtpcon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine4_trccon_valid) begin - soc_netsoc_sdram_bankmachine4_trccon_count <= 2'd3; - if (1'd0) begin - soc_netsoc_sdram_bankmachine4_trccon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine4_trccon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine4_trccon_ready)) begin - soc_netsoc_sdram_bankmachine4_trccon_count <= (soc_netsoc_sdram_bankmachine4_trccon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine4_trccon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine4_trccon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine4_trascon_valid) begin - soc_netsoc_sdram_bankmachine4_trascon_count <= 2'd2; - if (1'd0) begin - soc_netsoc_sdram_bankmachine4_trascon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine4_trascon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine4_trascon_ready)) begin - soc_netsoc_sdram_bankmachine4_trascon_count <= (soc_netsoc_sdram_bankmachine4_trascon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine4_trascon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine4_trascon_ready <= 1'd1; - end - end - end - vns_bankmachine4_state <= vns_bankmachine4_next_state; - if (soc_netsoc_sdram_bankmachine5_row_close) begin - soc_netsoc_sdram_bankmachine5_row_opened <= 1'd0; - end else begin - if (soc_netsoc_sdram_bankmachine5_row_open) begin - soc_netsoc_sdram_bankmachine5_row_opened <= 1'd1; - soc_netsoc_sdram_bankmachine5_row <= soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce + 1'd1); - end - if (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume + 1'd1); - end - if (((soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin - if ((~soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read)) begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level - 1'd1); - end - end - if (soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid; - end - if (soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_first); - soc_netsoc_sdram_bankmachine5_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_last); - end - if (soc_netsoc_sdram_bankmachine5_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_we; - soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine5_cmd_buffer_sink_payload_addr; - end - if (soc_netsoc_sdram_bankmachine5_twtpcon_valid) begin - soc_netsoc_sdram_bankmachine5_twtpcon_count <= 3'd4; - if (1'd0) begin - soc_netsoc_sdram_bankmachine5_twtpcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine5_twtpcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine5_twtpcon_ready)) begin - soc_netsoc_sdram_bankmachine5_twtpcon_count <= (soc_netsoc_sdram_bankmachine5_twtpcon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine5_twtpcon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine5_twtpcon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine5_trccon_valid) begin - soc_netsoc_sdram_bankmachine5_trccon_count <= 2'd3; - if (1'd0) begin - soc_netsoc_sdram_bankmachine5_trccon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine5_trccon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine5_trccon_ready)) begin - soc_netsoc_sdram_bankmachine5_trccon_count <= (soc_netsoc_sdram_bankmachine5_trccon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine5_trccon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine5_trccon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine5_trascon_valid) begin - soc_netsoc_sdram_bankmachine5_trascon_count <= 2'd2; - if (1'd0) begin - soc_netsoc_sdram_bankmachine5_trascon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine5_trascon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine5_trascon_ready)) begin - soc_netsoc_sdram_bankmachine5_trascon_count <= (soc_netsoc_sdram_bankmachine5_trascon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine5_trascon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine5_trascon_ready <= 1'd1; - end - end - end - vns_bankmachine5_state <= vns_bankmachine5_next_state; - if (soc_netsoc_sdram_bankmachine6_row_close) begin - soc_netsoc_sdram_bankmachine6_row_opened <= 1'd0; - end else begin - if (soc_netsoc_sdram_bankmachine6_row_open) begin - soc_netsoc_sdram_bankmachine6_row_opened <= 1'd1; - soc_netsoc_sdram_bankmachine6_row <= soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce + 1'd1); - end - if (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume + 1'd1); - end - if (((soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin - if ((~soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read)) begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level - 1'd1); - end - end - if (soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid; - end - if (soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_first); - soc_netsoc_sdram_bankmachine6_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_last); - end - if (soc_netsoc_sdram_bankmachine6_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_we; - soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine6_cmd_buffer_sink_payload_addr; - end - if (soc_netsoc_sdram_bankmachine6_twtpcon_valid) begin - soc_netsoc_sdram_bankmachine6_twtpcon_count <= 3'd4; - if (1'd0) begin - soc_netsoc_sdram_bankmachine6_twtpcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine6_twtpcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine6_twtpcon_ready)) begin - soc_netsoc_sdram_bankmachine6_twtpcon_count <= (soc_netsoc_sdram_bankmachine6_twtpcon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine6_twtpcon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine6_twtpcon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine6_trccon_valid) begin - soc_netsoc_sdram_bankmachine6_trccon_count <= 2'd3; - if (1'd0) begin - soc_netsoc_sdram_bankmachine6_trccon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine6_trccon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine6_trccon_ready)) begin - soc_netsoc_sdram_bankmachine6_trccon_count <= (soc_netsoc_sdram_bankmachine6_trccon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine6_trccon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine6_trccon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine6_trascon_valid) begin - soc_netsoc_sdram_bankmachine6_trascon_count <= 2'd2; - if (1'd0) begin - soc_netsoc_sdram_bankmachine6_trascon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine6_trascon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine6_trascon_ready)) begin - soc_netsoc_sdram_bankmachine6_trascon_count <= (soc_netsoc_sdram_bankmachine6_trascon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine6_trascon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine6_trascon_ready <= 1'd1; - end - end - end - vns_bankmachine6_state <= vns_bankmachine6_next_state; - if (soc_netsoc_sdram_bankmachine7_row_close) begin - soc_netsoc_sdram_bankmachine7_row_opened <= 1'd0; - end else begin - if (soc_netsoc_sdram_bankmachine7_row_open) begin - soc_netsoc_sdram_bankmachine7_row_opened <= 1'd1; - soc_netsoc_sdram_bankmachine7_row <= soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce + 1'd1); - end - if (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume + 1'd1); - end - if (((soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin - if ((~soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read)) begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level - 1'd1); - end - end - if (soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n <= soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid; - end - if (soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_first_n <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_first); - soc_netsoc_sdram_bankmachine7_cmd_buffer_last_n <= (soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_valid & soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_last); - end - if (soc_netsoc_sdram_bankmachine7_cmd_buffer_pipe_ce) begin - soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_we <= soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_we; - soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr <= soc_netsoc_sdram_bankmachine7_cmd_buffer_sink_payload_addr; - end - if (soc_netsoc_sdram_bankmachine7_twtpcon_valid) begin - soc_netsoc_sdram_bankmachine7_twtpcon_count <= 3'd4; - if (1'd0) begin - soc_netsoc_sdram_bankmachine7_twtpcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine7_twtpcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine7_twtpcon_ready)) begin - soc_netsoc_sdram_bankmachine7_twtpcon_count <= (soc_netsoc_sdram_bankmachine7_twtpcon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine7_twtpcon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine7_twtpcon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine7_trccon_valid) begin - soc_netsoc_sdram_bankmachine7_trccon_count <= 2'd3; - if (1'd0) begin - soc_netsoc_sdram_bankmachine7_trccon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine7_trccon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine7_trccon_ready)) begin - soc_netsoc_sdram_bankmachine7_trccon_count <= (soc_netsoc_sdram_bankmachine7_trccon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine7_trccon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine7_trccon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_bankmachine7_trascon_valid) begin - soc_netsoc_sdram_bankmachine7_trascon_count <= 2'd2; - if (1'd0) begin - soc_netsoc_sdram_bankmachine7_trascon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_bankmachine7_trascon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_bankmachine7_trascon_ready)) begin - soc_netsoc_sdram_bankmachine7_trascon_count <= (soc_netsoc_sdram_bankmachine7_trascon_count - 1'd1); - if ((soc_netsoc_sdram_bankmachine7_trascon_count == 1'd1)) begin - soc_netsoc_sdram_bankmachine7_trascon_ready <= 1'd1; - end - end - end - vns_bankmachine7_state <= vns_bankmachine7_next_state; - if ((~soc_netsoc_sdram_en0)) begin - soc_netsoc_sdram_time0 <= 5'd31; - end else begin - if ((~soc_netsoc_sdram_max_time0)) begin - soc_netsoc_sdram_time0 <= (soc_netsoc_sdram_time0 - 1'd1); - end - end - if ((~soc_netsoc_sdram_en1)) begin - soc_netsoc_sdram_time1 <= 4'd15; - end else begin - if ((~soc_netsoc_sdram_max_time1)) begin - soc_netsoc_sdram_time1 <= (soc_netsoc_sdram_time1 - 1'd1); - end - end - if (soc_netsoc_sdram_choose_cmd_ce) begin - case (soc_netsoc_sdram_choose_cmd_grant) - 1'd0: begin - if (soc_netsoc_sdram_choose_cmd_request[1]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[2]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[3]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[4]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[5]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[6]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[7]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd7; - end - end - end - end - end - end - end - end - 1'd1: begin - if (soc_netsoc_sdram_choose_cmd_request[2]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[3]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[4]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[5]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[6]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[7]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[0]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd0; - end - end - end - end - end - end - end - end - 2'd2: begin - if (soc_netsoc_sdram_choose_cmd_request[3]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[4]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[5]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[6]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[7]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[0]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[1]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd1; - end - end - end - end - end - end - end - end - 2'd3: begin - if (soc_netsoc_sdram_choose_cmd_request[4]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[5]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[6]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[7]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[0]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[1]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[2]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd2; - end - end - end - end - end - end - end - end - 3'd4: begin - if (soc_netsoc_sdram_choose_cmd_request[5]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[6]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[7]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[0]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[1]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[2]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[3]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd3; - end - end - end - end - end - end - end - end - 3'd5: begin - if (soc_netsoc_sdram_choose_cmd_request[6]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[7]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[0]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[1]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[2]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[3]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[4]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd4; - end - end - end - end - end - end - end - end - 3'd6: begin - if (soc_netsoc_sdram_choose_cmd_request[7]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[0]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[1]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[2]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[3]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[4]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[5]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd5; - end - end - end - end - end - end - end - end - 3'd7: begin - if (soc_netsoc_sdram_choose_cmd_request[0]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[1]) begin - soc_netsoc_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[2]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[3]) begin - soc_netsoc_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[4]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[5]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_cmd_request[6]) begin - soc_netsoc_sdram_choose_cmd_grant <= 3'd6; - end - end - end - end - end - end - end - end - endcase - end - if (soc_netsoc_sdram_choose_req_ce) begin - case (soc_netsoc_sdram_choose_req_grant) - 1'd0: begin - if (soc_netsoc_sdram_choose_req_request[1]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_req_request[2]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_req_request[3]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_req_request[4]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_req_request[5]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_req_request[6]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_req_request[7]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd7; - end - end - end - end - end - end - end - end - 1'd1: begin - if (soc_netsoc_sdram_choose_req_request[2]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_req_request[3]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_req_request[4]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_req_request[5]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_req_request[6]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_req_request[7]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_req_request[0]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd0; - end - end - end - end - end - end - end - end - 2'd2: begin - if (soc_netsoc_sdram_choose_req_request[3]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_req_request[4]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_req_request[5]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_req_request[6]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_req_request[7]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_req_request[0]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_req_request[1]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd1; - end - end - end - end - end - end - end - end - 2'd3: begin - if (soc_netsoc_sdram_choose_req_request[4]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_req_request[5]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_req_request[6]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_req_request[7]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_req_request[0]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_req_request[1]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_req_request[2]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd2; - end - end - end - end - end - end - end - end - 3'd4: begin - if (soc_netsoc_sdram_choose_req_request[5]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_req_request[6]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_req_request[7]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_req_request[0]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_req_request[1]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_req_request[2]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_req_request[3]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd3; - end - end - end - end - end - end - end - end - 3'd5: begin - if (soc_netsoc_sdram_choose_req_request[6]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd6; - end else begin - if (soc_netsoc_sdram_choose_req_request[7]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_req_request[0]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_req_request[1]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_req_request[2]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_req_request[3]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_req_request[4]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd4; - end - end - end - end - end - end - end - end - 3'd6: begin - if (soc_netsoc_sdram_choose_req_request[7]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd7; - end else begin - if (soc_netsoc_sdram_choose_req_request[0]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_req_request[1]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_req_request[2]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_req_request[3]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_req_request[4]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_req_request[5]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd5; - end - end - end - end - end - end - end - end - 3'd7: begin - if (soc_netsoc_sdram_choose_req_request[0]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd0; - end else begin - if (soc_netsoc_sdram_choose_req_request[1]) begin - soc_netsoc_sdram_choose_req_grant <= 1'd1; - end else begin - if (soc_netsoc_sdram_choose_req_request[2]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd2; - end else begin - if (soc_netsoc_sdram_choose_req_request[3]) begin - soc_netsoc_sdram_choose_req_grant <= 2'd3; - end else begin - if (soc_netsoc_sdram_choose_req_request[4]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd4; - end else begin - if (soc_netsoc_sdram_choose_req_request[5]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd5; - end else begin - if (soc_netsoc_sdram_choose_req_request[6]) begin - soc_netsoc_sdram_choose_req_grant <= 3'd6; - end - end - end - end - end - end - end - end - endcase - end - soc_netsoc_sdram_dfi_p0_cs_n <= 1'd0; - soc_netsoc_sdram_dfi_p0_bank <= vns_array_muxed0; - soc_netsoc_sdram_dfi_p0_address <= vns_array_muxed1; - soc_netsoc_sdram_dfi_p0_cas_n <= (~vns_array_muxed2); - soc_netsoc_sdram_dfi_p0_ras_n <= (~vns_array_muxed3); - soc_netsoc_sdram_dfi_p0_we_n <= (~vns_array_muxed4); - soc_netsoc_sdram_dfi_p0_rddata_en <= vns_array_muxed5; - soc_netsoc_sdram_dfi_p0_wrdata_en <= vns_array_muxed6; - soc_netsoc_sdram_dfi_p1_cs_n <= 1'd0; - soc_netsoc_sdram_dfi_p1_bank <= vns_array_muxed7; - soc_netsoc_sdram_dfi_p1_address <= vns_array_muxed8; - soc_netsoc_sdram_dfi_p1_cas_n <= (~vns_array_muxed9); - soc_netsoc_sdram_dfi_p1_ras_n <= (~vns_array_muxed10); - soc_netsoc_sdram_dfi_p1_we_n <= (~vns_array_muxed11); - soc_netsoc_sdram_dfi_p1_rddata_en <= vns_array_muxed12; - soc_netsoc_sdram_dfi_p1_wrdata_en <= vns_array_muxed13; - soc_netsoc_sdram_dfi_p2_cs_n <= 1'd0; - soc_netsoc_sdram_dfi_p2_bank <= vns_array_muxed14; - soc_netsoc_sdram_dfi_p2_address <= vns_array_muxed15; - soc_netsoc_sdram_dfi_p2_cas_n <= (~vns_array_muxed16); - soc_netsoc_sdram_dfi_p2_ras_n <= (~vns_array_muxed17); - soc_netsoc_sdram_dfi_p2_we_n <= (~vns_array_muxed18); - soc_netsoc_sdram_dfi_p2_rddata_en <= vns_array_muxed19; - soc_netsoc_sdram_dfi_p2_wrdata_en <= vns_array_muxed20; - soc_netsoc_sdram_dfi_p3_cs_n <= 1'd0; - soc_netsoc_sdram_dfi_p3_bank <= vns_array_muxed21; - soc_netsoc_sdram_dfi_p3_address <= vns_array_muxed22; - soc_netsoc_sdram_dfi_p3_cas_n <= (~vns_array_muxed23); - soc_netsoc_sdram_dfi_p3_ras_n <= (~vns_array_muxed24); - soc_netsoc_sdram_dfi_p3_we_n <= (~vns_array_muxed25); - soc_netsoc_sdram_dfi_p3_rddata_en <= vns_array_muxed26; - soc_netsoc_sdram_dfi_p3_wrdata_en <= vns_array_muxed27; - if (soc_netsoc_sdram_trrdcon_valid) begin - soc_netsoc_sdram_trrdcon_count <= 1'd1; - if (1'd0) begin - soc_netsoc_sdram_trrdcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_trrdcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_trrdcon_ready)) begin - soc_netsoc_sdram_trrdcon_count <= (soc_netsoc_sdram_trrdcon_count - 1'd1); - if ((soc_netsoc_sdram_trrdcon_count == 1'd1)) begin - soc_netsoc_sdram_trrdcon_ready <= 1'd1; - end - end - end - soc_netsoc_sdram_tfawcon_window <= {soc_netsoc_sdram_tfawcon_window, soc_netsoc_sdram_tfawcon_valid}; - if ((soc_netsoc_sdram_tfawcon_count < 3'd4)) begin - if ((soc_netsoc_sdram_tfawcon_count == 2'd3)) begin - soc_netsoc_sdram_tfawcon_ready <= (~soc_netsoc_sdram_tfawcon_valid); - end else begin - soc_netsoc_sdram_tfawcon_ready <= 1'd1; - end - end - if (soc_netsoc_sdram_tccdcon_valid) begin - soc_netsoc_sdram_tccdcon_count <= 1'd0; - if (1'd1) begin - soc_netsoc_sdram_tccdcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_tccdcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_tccdcon_ready)) begin - soc_netsoc_sdram_tccdcon_count <= (soc_netsoc_sdram_tccdcon_count - 1'd1); - if ((soc_netsoc_sdram_tccdcon_count == 1'd1)) begin - soc_netsoc_sdram_tccdcon_ready <= 1'd1; - end - end - end - if (soc_netsoc_sdram_twtrcon_valid) begin - soc_netsoc_sdram_twtrcon_count <= 3'd4; - if (1'd0) begin - soc_netsoc_sdram_twtrcon_ready <= 1'd1; - end else begin - soc_netsoc_sdram_twtrcon_ready <= 1'd0; - end - end else begin - if ((~soc_netsoc_sdram_twtrcon_ready)) begin - soc_netsoc_sdram_twtrcon_count <= (soc_netsoc_sdram_twtrcon_count - 1'd1); - if ((soc_netsoc_sdram_twtrcon_count == 1'd1)) begin - soc_netsoc_sdram_twtrcon_ready <= 1'd1; - end - end - end - vns_multiplexer_state <= vns_multiplexer_next_state; - soc_netsoc_sdram_bandwidth_cmd_valid <= soc_netsoc_sdram_choose_req_cmd_valid; - soc_netsoc_sdram_bandwidth_cmd_ready <= soc_netsoc_sdram_choose_req_cmd_ready; - soc_netsoc_sdram_bandwidth_cmd_is_read <= soc_netsoc_sdram_choose_req_cmd_payload_is_read; - soc_netsoc_sdram_bandwidth_cmd_is_write <= soc_netsoc_sdram_choose_req_cmd_payload_is_write; - {soc_netsoc_sdram_bandwidth_period, soc_netsoc_sdram_bandwidth_counter} <= (soc_netsoc_sdram_bandwidth_counter + 1'd1); - if (soc_netsoc_sdram_bandwidth_period) begin - soc_netsoc_sdram_bandwidth_nreads_r <= soc_netsoc_sdram_bandwidth_nreads; - soc_netsoc_sdram_bandwidth_nwrites_r <= soc_netsoc_sdram_bandwidth_nwrites; - soc_netsoc_sdram_bandwidth_nreads <= 1'd0; - soc_netsoc_sdram_bandwidth_nwrites <= 1'd0; - end else begin - if ((soc_netsoc_sdram_bandwidth_cmd_valid & soc_netsoc_sdram_bandwidth_cmd_ready)) begin - if (soc_netsoc_sdram_bandwidth_cmd_is_read) begin - soc_netsoc_sdram_bandwidth_nreads <= (soc_netsoc_sdram_bandwidth_nreads + 1'd1); - end - if (soc_netsoc_sdram_bandwidth_cmd_is_write) begin - soc_netsoc_sdram_bandwidth_nwrites <= (soc_netsoc_sdram_bandwidth_nwrites + 1'd1); - end - end - end - if (soc_netsoc_sdram_bandwidth_update_re) begin - soc_netsoc_sdram_bandwidth_nreads_status <= soc_netsoc_sdram_bandwidth_nreads_r; - soc_netsoc_sdram_bandwidth_nwrites_status <= soc_netsoc_sdram_bandwidth_nwrites_r; - end - if (((vns_roundrobin0_grant == 1'd0) & soc_netsoc_sdram_interface_bank0_rdata_valid)) begin - vns_rbank <= 1'd0; - end - if (((vns_roundrobin0_grant == 1'd0) & soc_netsoc_sdram_interface_bank0_wdata_ready)) begin - vns_wbank <= 1'd0; - end - if (((vns_roundrobin1_grant == 1'd0) & soc_netsoc_sdram_interface_bank1_rdata_valid)) begin - vns_rbank <= 1'd1; - end - if (((vns_roundrobin1_grant == 1'd0) & soc_netsoc_sdram_interface_bank1_wdata_ready)) begin - vns_wbank <= 1'd1; - end - if (((vns_roundrobin2_grant == 1'd0) & soc_netsoc_sdram_interface_bank2_rdata_valid)) begin - vns_rbank <= 2'd2; - end - if (((vns_roundrobin2_grant == 1'd0) & soc_netsoc_sdram_interface_bank2_wdata_ready)) begin - vns_wbank <= 2'd2; - end - if (((vns_roundrobin3_grant == 1'd0) & soc_netsoc_sdram_interface_bank3_rdata_valid)) begin - vns_rbank <= 2'd3; - end - if (((vns_roundrobin3_grant == 1'd0) & soc_netsoc_sdram_interface_bank3_wdata_ready)) begin - vns_wbank <= 2'd3; - end - if (((vns_roundrobin4_grant == 1'd0) & soc_netsoc_sdram_interface_bank4_rdata_valid)) begin - vns_rbank <= 3'd4; - end - if (((vns_roundrobin4_grant == 1'd0) & soc_netsoc_sdram_interface_bank4_wdata_ready)) begin - vns_wbank <= 3'd4; - end - if (((vns_roundrobin5_grant == 1'd0) & soc_netsoc_sdram_interface_bank5_rdata_valid)) begin - vns_rbank <= 3'd5; - end - if (((vns_roundrobin5_grant == 1'd0) & soc_netsoc_sdram_interface_bank5_wdata_ready)) begin - vns_wbank <= 3'd5; - end - if (((vns_roundrobin6_grant == 1'd0) & soc_netsoc_sdram_interface_bank6_rdata_valid)) begin - vns_rbank <= 3'd6; - end - if (((vns_roundrobin6_grant == 1'd0) & soc_netsoc_sdram_interface_bank6_wdata_ready)) begin - vns_wbank <= 3'd6; - end - if (((vns_roundrobin7_grant == 1'd0) & soc_netsoc_sdram_interface_bank7_rdata_valid)) begin - vns_rbank <= 3'd7; - end - if (((vns_roundrobin7_grant == 1'd0) & soc_netsoc_sdram_interface_bank7_wdata_ready)) begin - vns_wbank <= 3'd7; - end - vns_new_master_wdata_ready0 <= ((((((((1'd0 | ((vns_roundrobin0_grant == 1'd0) & soc_netsoc_sdram_interface_bank0_wdata_ready)) | ((vns_roundrobin1_grant == 1'd0) & soc_netsoc_sdram_interface_bank1_wdata_ready)) | ((vns_roundrobin2_grant == 1'd0) & soc_netsoc_sdram_interface_bank2_wdata_ready)) | ((vns_roundrobin3_grant == 1'd0) & soc_netsoc_sdram_interface_bank3_wdata_ready)) | ((vns_roundrobin4_grant == 1'd0) & soc_netsoc_sdram_interface_bank4_wdata_ready)) | ((vns_roundrobin5_grant == 1'd0) & soc_netsoc_sdram_interface_bank5_wdata_ready)) | ((vns_roundrobin6_grant == 1'd0) & soc_netsoc_sdram_interface_bank6_wdata_ready)) | ((vns_roundrobin7_grant == 1'd0) & soc_netsoc_sdram_interface_bank7_wdata_ready)); - vns_new_master_wdata_ready1 <= vns_new_master_wdata_ready0; - vns_new_master_wdata_ready2 <= vns_new_master_wdata_ready1; - vns_new_master_rdata_valid0 <= ((((((((1'd0 | ((vns_roundrobin0_grant == 1'd0) & soc_netsoc_sdram_interface_bank0_rdata_valid)) | ((vns_roundrobin1_grant == 1'd0) & soc_netsoc_sdram_interface_bank1_rdata_valid)) | ((vns_roundrobin2_grant == 1'd0) & soc_netsoc_sdram_interface_bank2_rdata_valid)) | ((vns_roundrobin3_grant == 1'd0) & soc_netsoc_sdram_interface_bank3_rdata_valid)) | ((vns_roundrobin4_grant == 1'd0) & soc_netsoc_sdram_interface_bank4_rdata_valid)) | ((vns_roundrobin5_grant == 1'd0) & soc_netsoc_sdram_interface_bank5_rdata_valid)) | ((vns_roundrobin6_grant == 1'd0) & soc_netsoc_sdram_interface_bank6_rdata_valid)) | ((vns_roundrobin7_grant == 1'd0) & soc_netsoc_sdram_interface_bank7_rdata_valid)); - vns_new_master_rdata_valid1 <= vns_new_master_rdata_valid0; - vns_new_master_rdata_valid2 <= vns_new_master_rdata_valid1; - vns_new_master_rdata_valid3 <= vns_new_master_rdata_valid2; - vns_new_master_rdata_valid4 <= vns_new_master_rdata_valid3; - vns_new_master_rdata_valid5 <= vns_new_master_rdata_valid4; - vns_new_master_rdata_valid6 <= vns_new_master_rdata_valid5; - vns_new_master_rdata_valid7 <= vns_new_master_rdata_valid6; - vns_new_master_rdata_valid8 <= vns_new_master_rdata_valid7; - vns_new_master_rdata_valid9 <= vns_new_master_rdata_valid8; - soc_netsoc_adr_offset_r <= soc_netsoc_interface0_wb_sdram_adr[1:0]; - vns_fullmemorywe_state <= vns_fullmemorywe_next_state; - vns_litedramwishbone2native_state <= vns_litedramwishbone2native_next_state; - if (soc_netsoc_count_litedramwishbone2native_next_value_ce) begin - soc_netsoc_count <= soc_netsoc_count_litedramwishbone2native_next_value; - end - if (soc_counter_ce) begin - soc_counter <= (soc_counter + 1'd1); - end - if (soc_ps_preamble_error_o) begin - soc_preamble_errors_status <= (soc_preamble_errors_status + 1'd1); - end - if (soc_ps_crc_error_o) begin - soc_crc_errors_status <= (soc_crc_errors_status + 1'd1); - end - soc_ps_preamble_error_toggle_o_r <= soc_ps_preamble_error_toggle_o; - soc_ps_crc_error_toggle_o_r <= soc_ps_crc_error_toggle_o; - soc_tx_cdc_graycounter0_q_binary <= soc_tx_cdc_graycounter0_q_next_binary; - soc_tx_cdc_graycounter0_q <= soc_tx_cdc_graycounter0_q_next; - soc_rx_cdc_graycounter1_q_binary <= soc_rx_cdc_graycounter1_q_next_binary; - soc_rx_cdc_graycounter1_q <= soc_rx_cdc_graycounter1_q_next; - if (soc_writer_counter_reset) begin - soc_writer_counter <= 1'd0; - end else begin - if (soc_writer_counter_ce) begin - soc_writer_counter <= (soc_writer_counter + soc_writer_inc); - end - end - if (soc_writer_slot_ce) begin - soc_writer_slot <= (soc_writer_slot + 1'd1); - end - if (((soc_writer_fifo_syncfifo_we & soc_writer_fifo_syncfifo_writable) & (~soc_writer_fifo_replace))) begin - soc_writer_fifo_produce <= (soc_writer_fifo_produce + 1'd1); - end - if (soc_writer_fifo_do_read) begin - soc_writer_fifo_consume <= (soc_writer_fifo_consume + 1'd1); - end - if (((soc_writer_fifo_syncfifo_we & soc_writer_fifo_syncfifo_writable) & (~soc_writer_fifo_replace))) begin - if ((~soc_writer_fifo_do_read)) begin - soc_writer_fifo_level <= (soc_writer_fifo_level + 1'd1); - end - end else begin - if (soc_writer_fifo_do_read) begin - soc_writer_fifo_level <= (soc_writer_fifo_level - 1'd1); - end - end - vns_liteethmacsramwriter_state <= vns_liteethmacsramwriter_next_state; - if (soc_writer_errors_status_liteethmac_next_value_ce) begin - soc_writer_errors_status <= soc_writer_errors_status_liteethmac_next_value; - end - if (soc_reader_counter_reset) begin - soc_reader_counter <= 1'd0; - end else begin - if (soc_reader_counter_ce) begin - soc_reader_counter <= (soc_reader_counter + 3'd4); - end - end - soc_reader_last_d <= soc_reader_last; - if (soc_reader_done_clear) begin - soc_reader_done_pending <= 1'd0; - end - if (soc_reader_done_trigger) begin - soc_reader_done_pending <= 1'd1; - end - if (((soc_reader_fifo_syncfifo_we & soc_reader_fifo_syncfifo_writable) & (~soc_reader_fifo_replace))) begin - soc_reader_fifo_produce <= (soc_reader_fifo_produce + 1'd1); - end - if (soc_reader_fifo_do_read) begin - soc_reader_fifo_consume <= (soc_reader_fifo_consume + 1'd1); - end - if (((soc_reader_fifo_syncfifo_we & soc_reader_fifo_syncfifo_writable) & (~soc_reader_fifo_replace))) begin - if ((~soc_reader_fifo_do_read)) begin - soc_reader_fifo_level <= (soc_reader_fifo_level + 1'd1); - end - end else begin - if (soc_reader_fifo_do_read) begin - soc_reader_fifo_level <= (soc_reader_fifo_level - 1'd1); - end - end - vns_liteethmacsramreader_state <= vns_liteethmacsramreader_next_state; - soc_sram0_bus_ack0 <= 1'd0; - if (((soc_sram0_bus_cyc0 & soc_sram0_bus_stb0) & (~soc_sram0_bus_ack0))) begin - soc_sram0_bus_ack0 <= 1'd1; - end - soc_sram1_bus_ack0 <= 1'd0; - if (((soc_sram1_bus_cyc0 & soc_sram1_bus_stb0) & (~soc_sram1_bus_ack0))) begin - soc_sram1_bus_ack0 <= 1'd1; - end - soc_sram0_bus_ack1 <= 1'd0; - if (((soc_sram0_bus_cyc1 & soc_sram0_bus_stb1) & (~soc_sram0_bus_ack1))) begin - soc_sram0_bus_ack1 <= 1'd1; - end - soc_sram1_bus_ack1 <= 1'd0; - if (((soc_sram1_bus_cyc1 & soc_sram1_bus_stb1) & (~soc_sram1_bus_ack1))) begin - soc_sram1_bus_ack1 <= 1'd1; - end - soc_slave_sel_r <= soc_slave_sel; - case (vns_netsoc_grant) - 1'd0: begin - if ((~vns_netsoc_request[0])) begin - if (vns_netsoc_request[1]) begin - vns_netsoc_grant <= 1'd1; - end - end - end - 1'd1: begin - if ((~vns_netsoc_request[1])) begin - if (vns_netsoc_request[0]) begin - vns_netsoc_grant <= 1'd0; - end - end - end - endcase - vns_netsoc_slave_sel_r <= vns_netsoc_slave_sel; - if (vns_netsoc_wait) begin - if ((~vns_netsoc_done)) begin - vns_netsoc_count <= (vns_netsoc_count - 1'd1); - end - end else begin - vns_netsoc_count <= 20'd1000000; - end - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= 1'd0; - if (vns_netsoc_csrbankarray_csrbank0_sel) begin - case (vns_netsoc_csrbankarray_interface0_bank_bus_adr[4:0]) - 1'd0: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= soc_netsoc_cpu_latch_w; - end - 1'd1: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time7_w; - end - 2'd2: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time6_w; - end - 2'd3: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time5_w; - end - 3'd4: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time4_w; - end - 3'd5: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time3_w; - end - 3'd6: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time2_w; - end - 3'd7: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time1_w; - end - 4'd8: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time0_w; - end - 4'd9: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_w; - end - 4'd10: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_w; - end - 4'd11: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_w; - end - 4'd12: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_w; - end - 4'd13: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_w; - end - 4'd14: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_w; - end - 4'd15: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_w; - end - 5'd16: begin - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_w; - end - endcase - end - if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_re) begin - soc_netsoc_cpu_time_cmp_storage[63:56] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp7_r; - end - if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_re) begin - soc_netsoc_cpu_time_cmp_storage[55:48] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp6_r; - end - if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_re) begin - soc_netsoc_cpu_time_cmp_storage[47:40] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp5_r; - end - if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_re) begin - soc_netsoc_cpu_time_cmp_storage[39:32] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp4_r; - end - if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_re) begin - soc_netsoc_cpu_time_cmp_storage[31:24] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp3_r; - end - if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_re) begin - soc_netsoc_cpu_time_cmp_storage[23:16] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp2_r; - end - if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_re) begin - soc_netsoc_cpu_time_cmp_storage[15:8] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp1_r; - end - if (vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_re) begin - soc_netsoc_cpu_time_cmp_storage[7:0] <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_r; - end - soc_netsoc_cpu_time_cmp_re <= vns_netsoc_csrbankarray_csrbank0_timer_time_cmp0_re; - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= 1'd0; - if (vns_netsoc_csrbankarray_csrbank1_sel) begin - case (vns_netsoc_csrbankarray_interface1_bank_bus_adr[3:0]) - 1'd0: begin - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= soc_netsoc_ctrl_reset_reset_w; - end - 1'd1: begin - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_scratch3_w; - end - 2'd2: begin - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_scratch2_w; - end - 2'd3: begin - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_scratch1_w; - end - 3'd4: begin - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_scratch0_w; - end - 3'd5: begin - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_bus_errors3_w; - end - 3'd6: begin - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_bus_errors2_w; - end - 3'd7: begin - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_bus_errors1_w; - end - 4'd8: begin - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank1_bus_errors0_w; - end - endcase - end - if (vns_netsoc_csrbankarray_csrbank1_scratch3_re) begin - soc_netsoc_ctrl_storage[31:24] <= vns_netsoc_csrbankarray_csrbank1_scratch3_r; - end - if (vns_netsoc_csrbankarray_csrbank1_scratch2_re) begin - soc_netsoc_ctrl_storage[23:16] <= vns_netsoc_csrbankarray_csrbank1_scratch2_r; - end - if (vns_netsoc_csrbankarray_csrbank1_scratch1_re) begin - soc_netsoc_ctrl_storage[15:8] <= vns_netsoc_csrbankarray_csrbank1_scratch1_r; - end - if (vns_netsoc_csrbankarray_csrbank1_scratch0_re) begin - soc_netsoc_ctrl_storage[7:0] <= vns_netsoc_csrbankarray_csrbank1_scratch0_r; - end - soc_netsoc_ctrl_re <= vns_netsoc_csrbankarray_csrbank1_scratch0_re; - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= 1'd0; - if (vns_netsoc_csrbankarray_csrbank2_sel) begin - case (vns_netsoc_csrbankarray_interface2_bank_bus_adr[2:0]) - 1'd0: begin - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_w; - end - 1'd1: begin - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_cdly_rst_w; - end - 2'd2: begin - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_cdly_inc_w; - end - 2'd3: begin - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank2_dly_sel0_w; - end - 3'd4: begin - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_rdly_dq_rst_w; - end - 3'd5: begin - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_rdly_dq_inc_w; - end - 3'd6: begin - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_rdly_dq_bitslip_rst_w; - end - 3'd7: begin - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= soc_a7ddrphy_rdly_dq_bitslip_w; - end - endcase - end - if (vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_re) begin - soc_a7ddrphy_half_sys8x_taps_storage[4:0] <= vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_r; - end - soc_a7ddrphy_half_sys8x_taps_re <= vns_netsoc_csrbankarray_csrbank2_half_sys8x_taps0_re; - if (vns_netsoc_csrbankarray_csrbank2_dly_sel0_re) begin - soc_a7ddrphy_dly_sel_storage[1:0] <= vns_netsoc_csrbankarray_csrbank2_dly_sel0_r; - end - soc_a7ddrphy_dly_sel_re <= vns_netsoc_csrbankarray_csrbank2_dly_sel0_re; - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= 1'd0; - if (vns_netsoc_csrbankarray_csrbank3_sel) begin - case (vns_netsoc_csrbankarray_interface3_bank_bus_adr[4:0]) - 1'd0: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_slot_w; - end - 1'd1: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_length3_w; - end - 2'd2: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_length2_w; - end - 2'd3: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_length1_w; - end - 3'd4: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_length0_w; - end - 3'd5: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_errors3_w; - end - 3'd6: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_errors2_w; - end - 3'd7: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_errors1_w; - end - 4'd8: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_errors0_w; - end - 4'd9: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_writer_status_w; - end - 4'd10: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_writer_pending_w; - end - 4'd11: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_w; - end - 4'd12: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_reader_start_w; - end - 4'd13: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_ready_w; - end - 4'd14: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_level_w; - end - 4'd15: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_w; - end - 5'd16: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_w; - end - 5'd17: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_w; - end - 5'd18: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_reader_eventmanager_status_w; - end - 5'd19: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= soc_reader_eventmanager_pending_w; - end - 5'd20: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_w; - end - 5'd21: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_crc_w; - end - 5'd22: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_errors3_w; - end - 5'd23: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_errors2_w; - end - 5'd24: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_errors1_w; - end - 5'd25: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_preamble_errors0_w; - end - 5'd26: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_crc_errors3_w; - end - 5'd27: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_crc_errors2_w; - end - 5'd28: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_crc_errors1_w; - end - 5'd29: begin - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank3_crc_errors0_w; - end - endcase - end - if (vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_re) begin - soc_writer_storage <= vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_r; - end - soc_writer_re <= vns_netsoc_csrbankarray_csrbank3_sram_writer_ev_enable0_re; - if (vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_re) begin - soc_reader_slot_storage <= vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_r; - end - soc_reader_slot_re <= vns_netsoc_csrbankarray_csrbank3_sram_reader_slot0_re; - if (vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_re) begin - soc_reader_length_storage[10:8] <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length1_r; - end - if (vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_re) begin - soc_reader_length_storage[7:0] <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_r; - end - soc_reader_length_re <= vns_netsoc_csrbankarray_csrbank3_sram_reader_length0_re; - if (vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_re) begin - soc_reader_eventmanager_storage <= vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_r; - end - soc_reader_eventmanager_re <= vns_netsoc_csrbankarray_csrbank3_sram_reader_ev_enable0_re; - vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= 1'd0; - if (vns_netsoc_csrbankarray_csrbank4_sel) begin - case (vns_netsoc_csrbankarray_interface4_bank_bus_adr[1:0]) - 1'd0: begin - vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank4_crg_reset0_w; - end - 1'd1: begin - vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank4_mdio_w0_w; - end - 2'd2: begin - vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank4_mdio_r_w; - end - endcase - end - if (vns_netsoc_csrbankarray_csrbank4_crg_reset0_re) begin - soc_reset_storage <= vns_netsoc_csrbankarray_csrbank4_crg_reset0_r; - end - soc_reset_re <= vns_netsoc_csrbankarray_csrbank4_crg_reset0_re; - if (vns_netsoc_csrbankarray_csrbank4_mdio_w0_re) begin - soc_storage[2:0] <= vns_netsoc_csrbankarray_csrbank4_mdio_w0_r; - end - soc_re <= vns_netsoc_csrbankarray_csrbank4_mdio_w0_re; - vns_netsoc_csrbankarray_sel_r <= vns_netsoc_csrbankarray_sel; - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= 1'd0; - if (vns_netsoc_csrbankarray_csrbank5_sel) begin - case (vns_netsoc_csrbankarray_interface5_bank_bus_adr[5:0]) - 1'd0: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_control0_w; - end - 1'd1: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_w; - end - 2'd2: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_phaseinjector0_command_issue_w; - end - 2'd3: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_w; - end - 3'd4: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_w; - end - 3'd5: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_w; - end - 3'd6: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_w; - end - 3'd7: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_w; - end - 4'd8: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_w; - end - 4'd9: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_w; - end - 4'd10: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata3_w; - end - 4'd11: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata2_w; - end - 4'd12: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata1_w; - end - 4'd13: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_rddata0_w; - end - 4'd14: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_w; - end - 4'd15: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_phaseinjector1_command_issue_w; - end - 5'd16: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_w; - end - 5'd17: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_w; - end - 5'd18: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_w; - end - 5'd19: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_w; - end - 5'd20: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_w; - end - 5'd21: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_w; - end - 5'd22: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_w; - end - 5'd23: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata3_w; - end - 5'd24: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata2_w; - end - 5'd25: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata1_w; - end - 5'd26: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_rddata0_w; - end - 5'd27: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_w; - end - 5'd28: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_phaseinjector2_command_issue_w; - end - 5'd29: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_w; - end - 5'd30: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_w; - end - 5'd31: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_w; - end - 6'd32: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_w; - end - 6'd33: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_w; - end - 6'd34: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_w; - end - 6'd35: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_w; - end - 6'd36: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata3_w; - end - 6'd37: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata2_w; - end - 6'd38: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata1_w; - end - 6'd39: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_rddata0_w; - end - 6'd40: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_w; - end - 6'd41: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_phaseinjector3_command_issue_w; - end - 6'd42: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_w; - end - 6'd43: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_w; - end - 6'd44: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_w; - end - 6'd45: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_w; - end - 6'd46: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_w; - end - 6'd47: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_w; - end - 6'd48: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_w; - end - 6'd49: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata3_w; - end - 6'd50: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata2_w; - end - 6'd51: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata1_w; - end - 6'd52: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_rddata0_w; - end - 6'd53: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= soc_netsoc_sdram_bandwidth_update_w; - end - 6'd54: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads2_w; - end - 6'd55: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads1_w; - end - 6'd56: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nreads0_w; - end - 6'd57: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites2_w; - end - 6'd58: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites1_w; - end - 6'd59: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_nwrites0_w; - end - 6'd60: begin - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank5_controller_bandwidth_data_width_w; - end - endcase - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_control0_re) begin - soc_netsoc_sdram_storage[3:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_control0_r; - end - soc_netsoc_sdram_re <= vns_netsoc_csrbankarray_csrbank5_dfii_control0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_re) begin - soc_netsoc_sdram_phaseinjector0_command_storage[5:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_r; - end - soc_netsoc_sdram_phaseinjector0_command_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_command0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_re) begin - soc_netsoc_sdram_phaseinjector0_address_storage[13:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address1_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_re) begin - soc_netsoc_sdram_phaseinjector0_address_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_r; - end - soc_netsoc_sdram_phaseinjector0_address_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_address0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_re) begin - soc_netsoc_sdram_phaseinjector0_baddress_storage[2:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_r; - end - soc_netsoc_sdram_phaseinjector0_baddress_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_baddress0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_re) begin - soc_netsoc_sdram_phaseinjector0_wrdata_storage[31:24] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata3_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_re) begin - soc_netsoc_sdram_phaseinjector0_wrdata_storage[23:16] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata2_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_re) begin - soc_netsoc_sdram_phaseinjector0_wrdata_storage[15:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata1_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_re) begin - soc_netsoc_sdram_phaseinjector0_wrdata_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_r; - end - soc_netsoc_sdram_phaseinjector0_wrdata_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi0_wrdata0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_re) begin - soc_netsoc_sdram_phaseinjector1_command_storage[5:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_r; - end - soc_netsoc_sdram_phaseinjector1_command_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_command0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_re) begin - soc_netsoc_sdram_phaseinjector1_address_storage[13:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address1_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_re) begin - soc_netsoc_sdram_phaseinjector1_address_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_r; - end - soc_netsoc_sdram_phaseinjector1_address_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_address0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_re) begin - soc_netsoc_sdram_phaseinjector1_baddress_storage[2:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_r; - end - soc_netsoc_sdram_phaseinjector1_baddress_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_baddress0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_re) begin - soc_netsoc_sdram_phaseinjector1_wrdata_storage[31:24] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata3_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_re) begin - soc_netsoc_sdram_phaseinjector1_wrdata_storage[23:16] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata2_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_re) begin - soc_netsoc_sdram_phaseinjector1_wrdata_storage[15:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata1_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_re) begin - soc_netsoc_sdram_phaseinjector1_wrdata_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_r; - end - soc_netsoc_sdram_phaseinjector1_wrdata_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi1_wrdata0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_re) begin - soc_netsoc_sdram_phaseinjector2_command_storage[5:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_r; - end - soc_netsoc_sdram_phaseinjector2_command_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_command0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_re) begin - soc_netsoc_sdram_phaseinjector2_address_storage[13:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address1_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_re) begin - soc_netsoc_sdram_phaseinjector2_address_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_r; - end - soc_netsoc_sdram_phaseinjector2_address_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_address0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_re) begin - soc_netsoc_sdram_phaseinjector2_baddress_storage[2:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_r; - end - soc_netsoc_sdram_phaseinjector2_baddress_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_baddress0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_re) begin - soc_netsoc_sdram_phaseinjector2_wrdata_storage[31:24] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata3_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_re) begin - soc_netsoc_sdram_phaseinjector2_wrdata_storage[23:16] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata2_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_re) begin - soc_netsoc_sdram_phaseinjector2_wrdata_storage[15:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata1_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_re) begin - soc_netsoc_sdram_phaseinjector2_wrdata_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_r; - end - soc_netsoc_sdram_phaseinjector2_wrdata_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi2_wrdata0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_re) begin - soc_netsoc_sdram_phaseinjector3_command_storage[5:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_r; - end - soc_netsoc_sdram_phaseinjector3_command_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_command0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_re) begin - soc_netsoc_sdram_phaseinjector3_address_storage[13:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address1_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_re) begin - soc_netsoc_sdram_phaseinjector3_address_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_r; - end - soc_netsoc_sdram_phaseinjector3_address_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_address0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_re) begin - soc_netsoc_sdram_phaseinjector3_baddress_storage[2:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_r; - end - soc_netsoc_sdram_phaseinjector3_baddress_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_baddress0_re; - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_re) begin - soc_netsoc_sdram_phaseinjector3_wrdata_storage[31:24] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata3_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_re) begin - soc_netsoc_sdram_phaseinjector3_wrdata_storage[23:16] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata2_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_re) begin - soc_netsoc_sdram_phaseinjector3_wrdata_storage[15:8] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata1_r; - end - if (vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_re) begin - soc_netsoc_sdram_phaseinjector3_wrdata_storage[7:0] <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_r; - end - soc_netsoc_sdram_phaseinjector3_wrdata_re <= vns_netsoc_csrbankarray_csrbank5_dfii_pi3_wrdata0_re; - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= 1'd0; - if (vns_netsoc_csrbankarray_csrbank6_sel) begin - case (vns_netsoc_csrbankarray_interface6_bank_bus_adr[4:0]) - 1'd0: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_load3_w; - end - 1'd1: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_load2_w; - end - 2'd2: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_load1_w; - end - 2'd3: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_load0_w; - end - 3'd4: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_reload3_w; - end - 3'd5: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_reload2_w; - end - 3'd6: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_reload1_w; - end - 3'd7: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_reload0_w; - end - 4'd8: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_en0_w; - end - 4'd9: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_update_value0_w; - end - 4'd10: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_value3_w; - end - 4'd11: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_value2_w; - end - 4'd12: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_value1_w; - end - 4'd13: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_value0_w; - end - 4'd14: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= soc_netsoc_timer0_eventmanager_status_w; - end - 4'd15: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= soc_netsoc_timer0_eventmanager_pending_w; - end - 5'd16: begin - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank6_ev_enable0_w; - end - endcase - end - if (vns_netsoc_csrbankarray_csrbank6_load3_re) begin - soc_netsoc_timer0_load_storage[31:24] <= vns_netsoc_csrbankarray_csrbank6_load3_r; - end - if (vns_netsoc_csrbankarray_csrbank6_load2_re) begin - soc_netsoc_timer0_load_storage[23:16] <= vns_netsoc_csrbankarray_csrbank6_load2_r; - end - if (vns_netsoc_csrbankarray_csrbank6_load1_re) begin - soc_netsoc_timer0_load_storage[15:8] <= vns_netsoc_csrbankarray_csrbank6_load1_r; - end - if (vns_netsoc_csrbankarray_csrbank6_load0_re) begin - soc_netsoc_timer0_load_storage[7:0] <= vns_netsoc_csrbankarray_csrbank6_load0_r; - end - soc_netsoc_timer0_load_re <= vns_netsoc_csrbankarray_csrbank6_load0_re; - if (vns_netsoc_csrbankarray_csrbank6_reload3_re) begin - soc_netsoc_timer0_reload_storage[31:24] <= vns_netsoc_csrbankarray_csrbank6_reload3_r; - end - if (vns_netsoc_csrbankarray_csrbank6_reload2_re) begin - soc_netsoc_timer0_reload_storage[23:16] <= vns_netsoc_csrbankarray_csrbank6_reload2_r; - end - if (vns_netsoc_csrbankarray_csrbank6_reload1_re) begin - soc_netsoc_timer0_reload_storage[15:8] <= vns_netsoc_csrbankarray_csrbank6_reload1_r; - end - if (vns_netsoc_csrbankarray_csrbank6_reload0_re) begin - soc_netsoc_timer0_reload_storage[7:0] <= vns_netsoc_csrbankarray_csrbank6_reload0_r; - end - soc_netsoc_timer0_reload_re <= vns_netsoc_csrbankarray_csrbank6_reload0_re; - if (vns_netsoc_csrbankarray_csrbank6_en0_re) begin - soc_netsoc_timer0_en_storage <= vns_netsoc_csrbankarray_csrbank6_en0_r; - end - soc_netsoc_timer0_en_re <= vns_netsoc_csrbankarray_csrbank6_en0_re; - if (vns_netsoc_csrbankarray_csrbank6_update_value0_re) begin - soc_netsoc_timer0_update_value_storage <= vns_netsoc_csrbankarray_csrbank6_update_value0_r; - end - soc_netsoc_timer0_update_value_re <= vns_netsoc_csrbankarray_csrbank6_update_value0_re; - if (vns_netsoc_csrbankarray_csrbank6_ev_enable0_re) begin - soc_netsoc_timer0_eventmanager_storage <= vns_netsoc_csrbankarray_csrbank6_ev_enable0_r; - end - soc_netsoc_timer0_eventmanager_re <= vns_netsoc_csrbankarray_csrbank6_ev_enable0_re; - vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= 1'd0; - if (vns_netsoc_csrbankarray_csrbank7_sel) begin - case (vns_netsoc_csrbankarray_interface7_bank_bus_adr[2:0]) - 1'd0: begin - vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= soc_netsoc_uart_rxtx_w; - end - 1'd1: begin - vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank7_txfull_w; - end - 2'd2: begin - vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank7_rxempty_w; - end - 2'd3: begin - vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= soc_netsoc_uart_eventmanager_status_w; - end - 3'd4: begin - vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= soc_netsoc_uart_eventmanager_pending_w; - end - 3'd5: begin - vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank7_ev_enable0_w; - end - endcase - end - if (vns_netsoc_csrbankarray_csrbank7_ev_enable0_re) begin - soc_netsoc_uart_eventmanager_storage[1:0] <= vns_netsoc_csrbankarray_csrbank7_ev_enable0_r; - end - soc_netsoc_uart_eventmanager_re <= vns_netsoc_csrbankarray_csrbank7_ev_enable0_re; - vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= 1'd0; - if (vns_netsoc_csrbankarray_csrbank8_sel) begin - case (vns_netsoc_csrbankarray_interface8_bank_bus_adr[1:0]) - 1'd0: begin - vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank8_tuning_word3_w; - end - 1'd1: begin - vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank8_tuning_word2_w; - end - 2'd2: begin - vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank8_tuning_word1_w; - end - 2'd3: begin - vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= vns_netsoc_csrbankarray_csrbank8_tuning_word0_w; - end - endcase - end - if (vns_netsoc_csrbankarray_csrbank8_tuning_word3_re) begin - soc_netsoc_uart_phy_storage[31:24] <= vns_netsoc_csrbankarray_csrbank8_tuning_word3_r; - end - if (vns_netsoc_csrbankarray_csrbank8_tuning_word2_re) begin - soc_netsoc_uart_phy_storage[23:16] <= vns_netsoc_csrbankarray_csrbank8_tuning_word2_r; - end - if (vns_netsoc_csrbankarray_csrbank8_tuning_word1_re) begin - soc_netsoc_uart_phy_storage[15:8] <= vns_netsoc_csrbankarray_csrbank8_tuning_word1_r; - end - if (vns_netsoc_csrbankarray_csrbank8_tuning_word0_re) begin - soc_netsoc_uart_phy_storage[7:0] <= vns_netsoc_csrbankarray_csrbank8_tuning_word0_r; - end - soc_netsoc_uart_phy_re <= vns_netsoc_csrbankarray_csrbank8_tuning_word0_re; - if (sys_rst) begin - soc_netsoc_ctrl_storage <= 32'd305419896; - soc_netsoc_ctrl_re <= 1'd0; - soc_netsoc_ctrl_bus_errors <= 32'd0; - soc_netsoc_cpu_time_status <= 64'd0; - soc_netsoc_cpu_time_cmp_storage <= 64'd18446744073709551615; - soc_netsoc_cpu_time_cmp_re <= 1'd0; - soc_netsoc_cpu_time <= 64'd0; - soc_netsoc_cpu_time_cmp <= 64'd18446744073709551615; - soc_netsoc_rom_bus_ack <= 1'd0; - soc_netsoc_sram_bus_ack <= 1'd0; - serial_tx <= 1'd1; - soc_netsoc_uart_phy_storage <= 32'd8246337; - soc_netsoc_uart_phy_re <= 1'd0; - soc_netsoc_uart_phy_sink_ready <= 1'd0; - soc_netsoc_uart_phy_uart_clk_txen <= 1'd0; - soc_netsoc_uart_phy_phase_accumulator_tx <= 32'd0; - soc_netsoc_uart_phy_tx_reg <= 8'd0; - soc_netsoc_uart_phy_tx_bitcount <= 4'd0; - soc_netsoc_uart_phy_tx_busy <= 1'd0; - soc_netsoc_uart_phy_source_valid <= 1'd0; - soc_netsoc_uart_phy_source_payload_data <= 8'd0; - soc_netsoc_uart_phy_uart_clk_rxen <= 1'd0; - soc_netsoc_uart_phy_phase_accumulator_rx <= 32'd0; - soc_netsoc_uart_phy_rx_r <= 1'd0; - soc_netsoc_uart_phy_rx_reg <= 8'd0; - soc_netsoc_uart_phy_rx_bitcount <= 4'd0; - soc_netsoc_uart_phy_rx_busy <= 1'd0; - soc_netsoc_uart_tx_pending <= 1'd0; - soc_netsoc_uart_tx_old_trigger <= 1'd0; - soc_netsoc_uart_rx_pending <= 1'd0; - soc_netsoc_uart_rx_old_trigger <= 1'd0; - soc_netsoc_uart_eventmanager_storage <= 2'd0; - soc_netsoc_uart_eventmanager_re <= 1'd0; - soc_netsoc_uart_tx_fifo_readable <= 1'd0; - soc_netsoc_uart_tx_fifo_level0 <= 5'd0; - soc_netsoc_uart_tx_fifo_produce <= 4'd0; - soc_netsoc_uart_tx_fifo_consume <= 4'd0; - soc_netsoc_uart_rx_fifo_readable <= 1'd0; - soc_netsoc_uart_rx_fifo_level0 <= 5'd0; - soc_netsoc_uart_rx_fifo_produce <= 4'd0; - soc_netsoc_uart_rx_fifo_consume <= 4'd0; - soc_netsoc_timer0_load_storage <= 32'd0; - soc_netsoc_timer0_load_re <= 1'd0; - soc_netsoc_timer0_reload_storage <= 32'd0; - soc_netsoc_timer0_reload_re <= 1'd0; - soc_netsoc_timer0_en_storage <= 1'd0; - soc_netsoc_timer0_en_re <= 1'd0; - soc_netsoc_timer0_update_value_storage <= 1'd0; - soc_netsoc_timer0_update_value_re <= 1'd0; - soc_netsoc_timer0_value_status <= 32'd0; - soc_netsoc_timer0_zero_pending <= 1'd0; - soc_netsoc_timer0_zero_old_trigger <= 1'd0; - soc_netsoc_timer0_eventmanager_storage <= 1'd0; - soc_netsoc_timer0_eventmanager_re <= 1'd0; - soc_netsoc_timer0_value <= 32'd0; - soc_emulator_ram_bus_ack <= 1'd0; - soc_a7ddrphy_half_sys8x_taps_storage <= 5'd8; - soc_a7ddrphy_half_sys8x_taps_re <= 1'd0; - soc_a7ddrphy_dly_sel_storage <= 2'd0; - soc_a7ddrphy_dly_sel_re <= 1'd0; - soc_a7ddrphy_dfi_p0_rddata_valid <= 1'd0; - soc_a7ddrphy_dfi_p1_rddata_valid <= 1'd0; - soc_a7ddrphy_dfi_p2_rddata_valid <= 1'd0; - soc_a7ddrphy_dfi_p3_rddata_valid <= 1'd0; - soc_a7ddrphy_oe_dqs <= 1'd0; - soc_a7ddrphy_oe_dq <= 1'd0; - soc_a7ddrphy_bitslip0_o <= 8'd0; - soc_a7ddrphy_bitslip0_value <= 3'd0; - soc_a7ddrphy_bitslip0_r <= 16'd0; - soc_a7ddrphy_bitslip1_o <= 8'd0; - soc_a7ddrphy_bitslip1_value <= 3'd0; - soc_a7ddrphy_bitslip1_r <= 16'd0; - soc_a7ddrphy_bitslip2_o <= 8'd0; - soc_a7ddrphy_bitslip2_value <= 3'd0; - soc_a7ddrphy_bitslip2_r <= 16'd0; - soc_a7ddrphy_bitslip3_o <= 8'd0; - soc_a7ddrphy_bitslip3_value <= 3'd0; - soc_a7ddrphy_bitslip3_r <= 16'd0; - soc_a7ddrphy_bitslip4_o <= 8'd0; - soc_a7ddrphy_bitslip4_value <= 3'd0; - soc_a7ddrphy_bitslip4_r <= 16'd0; - soc_a7ddrphy_bitslip5_o <= 8'd0; - soc_a7ddrphy_bitslip5_value <= 3'd0; - soc_a7ddrphy_bitslip5_r <= 16'd0; - soc_a7ddrphy_bitslip6_o <= 8'd0; - soc_a7ddrphy_bitslip6_value <= 3'd0; - soc_a7ddrphy_bitslip6_r <= 16'd0; - soc_a7ddrphy_bitslip7_o <= 8'd0; - soc_a7ddrphy_bitslip7_value <= 3'd0; - soc_a7ddrphy_bitslip7_r <= 16'd0; - soc_a7ddrphy_bitslip8_o <= 8'd0; - soc_a7ddrphy_bitslip8_value <= 3'd0; - soc_a7ddrphy_bitslip8_r <= 16'd0; - soc_a7ddrphy_bitslip9_o <= 8'd0; - soc_a7ddrphy_bitslip9_value <= 3'd0; - soc_a7ddrphy_bitslip9_r <= 16'd0; - soc_a7ddrphy_bitslip10_o <= 8'd0; - soc_a7ddrphy_bitslip10_value <= 3'd0; - soc_a7ddrphy_bitslip10_r <= 16'd0; - soc_a7ddrphy_bitslip11_o <= 8'd0; - soc_a7ddrphy_bitslip11_value <= 3'd0; - soc_a7ddrphy_bitslip11_r <= 16'd0; - soc_a7ddrphy_bitslip12_o <= 8'd0; - soc_a7ddrphy_bitslip12_value <= 3'd0; - soc_a7ddrphy_bitslip12_r <= 16'd0; - soc_a7ddrphy_bitslip13_o <= 8'd0; - soc_a7ddrphy_bitslip13_value <= 3'd0; - soc_a7ddrphy_bitslip13_r <= 16'd0; - soc_a7ddrphy_bitslip14_o <= 8'd0; - soc_a7ddrphy_bitslip14_value <= 3'd0; - soc_a7ddrphy_bitslip14_r <= 16'd0; - soc_a7ddrphy_bitslip15_o <= 8'd0; - soc_a7ddrphy_bitslip15_value <= 3'd0; - soc_a7ddrphy_bitslip15_r <= 16'd0; - soc_a7ddrphy_n_rddata_en0 <= 1'd0; - soc_a7ddrphy_n_rddata_en1 <= 1'd0; - soc_a7ddrphy_n_rddata_en2 <= 1'd0; - soc_a7ddrphy_n_rddata_en3 <= 1'd0; - soc_a7ddrphy_n_rddata_en4 <= 1'd0; - soc_a7ddrphy_n_rddata_en5 <= 1'd0; - soc_a7ddrphy_n_rddata_en6 <= 1'd0; - soc_a7ddrphy_n_rddata_en7 <= 1'd0; - soc_a7ddrphy_last_wrdata_en <= 4'd0; - soc_netsoc_sdram_storage <= 4'd0; - soc_netsoc_sdram_re <= 1'd0; - soc_netsoc_sdram_phaseinjector0_command_storage <= 6'd0; - soc_netsoc_sdram_phaseinjector0_command_re <= 1'd0; - soc_netsoc_sdram_phaseinjector0_address_storage <= 14'd0; - soc_netsoc_sdram_phaseinjector0_address_re <= 1'd0; - soc_netsoc_sdram_phaseinjector0_baddress_storage <= 3'd0; - soc_netsoc_sdram_phaseinjector0_baddress_re <= 1'd0; - soc_netsoc_sdram_phaseinjector0_wrdata_storage <= 32'd0; - soc_netsoc_sdram_phaseinjector0_wrdata_re <= 1'd0; - soc_netsoc_sdram_phaseinjector0_status <= 32'd0; - soc_netsoc_sdram_phaseinjector1_command_storage <= 6'd0; - soc_netsoc_sdram_phaseinjector1_command_re <= 1'd0; - soc_netsoc_sdram_phaseinjector1_address_storage <= 14'd0; - soc_netsoc_sdram_phaseinjector1_address_re <= 1'd0; - soc_netsoc_sdram_phaseinjector1_baddress_storage <= 3'd0; - soc_netsoc_sdram_phaseinjector1_baddress_re <= 1'd0; - soc_netsoc_sdram_phaseinjector1_wrdata_storage <= 32'd0; - soc_netsoc_sdram_phaseinjector1_wrdata_re <= 1'd0; - soc_netsoc_sdram_phaseinjector1_status <= 32'd0; - soc_netsoc_sdram_phaseinjector2_command_storage <= 6'd0; - soc_netsoc_sdram_phaseinjector2_command_re <= 1'd0; - soc_netsoc_sdram_phaseinjector2_address_storage <= 14'd0; - soc_netsoc_sdram_phaseinjector2_address_re <= 1'd0; - soc_netsoc_sdram_phaseinjector2_baddress_storage <= 3'd0; - soc_netsoc_sdram_phaseinjector2_baddress_re <= 1'd0; - soc_netsoc_sdram_phaseinjector2_wrdata_storage <= 32'd0; - soc_netsoc_sdram_phaseinjector2_wrdata_re <= 1'd0; - soc_netsoc_sdram_phaseinjector2_status <= 32'd0; - soc_netsoc_sdram_phaseinjector3_command_storage <= 6'd0; - soc_netsoc_sdram_phaseinjector3_command_re <= 1'd0; - soc_netsoc_sdram_phaseinjector3_address_storage <= 14'd0; - soc_netsoc_sdram_phaseinjector3_address_re <= 1'd0; - soc_netsoc_sdram_phaseinjector3_baddress_storage <= 3'd0; - soc_netsoc_sdram_phaseinjector3_baddress_re <= 1'd0; - soc_netsoc_sdram_phaseinjector3_wrdata_storage <= 32'd0; - soc_netsoc_sdram_phaseinjector3_wrdata_re <= 1'd0; - soc_netsoc_sdram_phaseinjector3_status <= 32'd0; - soc_netsoc_sdram_dfi_p0_address <= 14'd0; - soc_netsoc_sdram_dfi_p0_bank <= 3'd0; - soc_netsoc_sdram_dfi_p0_cas_n <= 1'd1; - soc_netsoc_sdram_dfi_p0_cs_n <= 1'd1; - soc_netsoc_sdram_dfi_p0_ras_n <= 1'd1; - soc_netsoc_sdram_dfi_p0_we_n <= 1'd1; - soc_netsoc_sdram_dfi_p0_wrdata_en <= 1'd0; - soc_netsoc_sdram_dfi_p0_rddata_en <= 1'd0; - soc_netsoc_sdram_dfi_p1_address <= 14'd0; - soc_netsoc_sdram_dfi_p1_bank <= 3'd0; - soc_netsoc_sdram_dfi_p1_cas_n <= 1'd1; - soc_netsoc_sdram_dfi_p1_cs_n <= 1'd1; - soc_netsoc_sdram_dfi_p1_ras_n <= 1'd1; - soc_netsoc_sdram_dfi_p1_we_n <= 1'd1; - soc_netsoc_sdram_dfi_p1_wrdata_en <= 1'd0; - soc_netsoc_sdram_dfi_p1_rddata_en <= 1'd0; - soc_netsoc_sdram_dfi_p2_address <= 14'd0; - soc_netsoc_sdram_dfi_p2_bank <= 3'd0; - soc_netsoc_sdram_dfi_p2_cas_n <= 1'd1; - soc_netsoc_sdram_dfi_p2_cs_n <= 1'd1; - soc_netsoc_sdram_dfi_p2_ras_n <= 1'd1; - soc_netsoc_sdram_dfi_p2_we_n <= 1'd1; - soc_netsoc_sdram_dfi_p2_wrdata_en <= 1'd0; - soc_netsoc_sdram_dfi_p2_rddata_en <= 1'd0; - soc_netsoc_sdram_dfi_p3_address <= 14'd0; - soc_netsoc_sdram_dfi_p3_bank <= 3'd0; - soc_netsoc_sdram_dfi_p3_cas_n <= 1'd1; - soc_netsoc_sdram_dfi_p3_cs_n <= 1'd1; - soc_netsoc_sdram_dfi_p3_ras_n <= 1'd1; - soc_netsoc_sdram_dfi_p3_we_n <= 1'd1; - soc_netsoc_sdram_dfi_p3_wrdata_en <= 1'd0; - soc_netsoc_sdram_dfi_p3_rddata_en <= 1'd0; - soc_netsoc_sdram_cmd_payload_a <= 14'd0; - soc_netsoc_sdram_cmd_payload_ba <= 3'd0; - soc_netsoc_sdram_cmd_payload_cas <= 1'd0; - soc_netsoc_sdram_cmd_payload_ras <= 1'd0; - soc_netsoc_sdram_cmd_payload_we <= 1'd0; - soc_netsoc_sdram_timer_count1 <= 9'd468; - soc_netsoc_sdram_postponer_req_o <= 1'd0; - soc_netsoc_sdram_postponer_count <= 1'd0; - soc_netsoc_sdram_sequencer_done1 <= 1'd0; - soc_netsoc_sdram_sequencer_counter <= 6'd0; - soc_netsoc_sdram_sequencer_count <= 1'd0; - soc_netsoc_sdram_zqcs_timer_count1 <= 26'd59999999; - soc_netsoc_sdram_zqcs_executer_done <= 1'd0; - soc_netsoc_sdram_zqcs_executer_counter <= 5'd0; - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_level <= 4'd0; - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_produce <= 3'd0; - soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_consume <= 3'd0; - soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine0_cmd_buffer_source_payload_addr <= 21'd0; - soc_netsoc_sdram_bankmachine0_cmd_buffer_valid_n <= 1'd0; - soc_netsoc_sdram_bankmachine0_cmd_buffer_first_n <= 1'd0; - soc_netsoc_sdram_bankmachine0_cmd_buffer_last_n <= 1'd0; - soc_netsoc_sdram_bankmachine0_row <= 14'd0; - soc_netsoc_sdram_bankmachine0_row_opened <= 1'd0; - soc_netsoc_sdram_bankmachine0_twtpcon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine0_twtpcon_count <= 3'd0; - soc_netsoc_sdram_bankmachine0_trccon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine0_trccon_count <= 2'd0; - soc_netsoc_sdram_bankmachine0_trascon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine0_trascon_count <= 2'd0; - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_level <= 4'd0; - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_produce <= 3'd0; - soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_consume <= 3'd0; - soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine1_cmd_buffer_source_payload_addr <= 21'd0; - soc_netsoc_sdram_bankmachine1_cmd_buffer_valid_n <= 1'd0; - soc_netsoc_sdram_bankmachine1_cmd_buffer_first_n <= 1'd0; - soc_netsoc_sdram_bankmachine1_cmd_buffer_last_n <= 1'd0; - soc_netsoc_sdram_bankmachine1_row <= 14'd0; - soc_netsoc_sdram_bankmachine1_row_opened <= 1'd0; - soc_netsoc_sdram_bankmachine1_twtpcon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine1_twtpcon_count <= 3'd0; - soc_netsoc_sdram_bankmachine1_trccon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine1_trccon_count <= 2'd0; - soc_netsoc_sdram_bankmachine1_trascon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine1_trascon_count <= 2'd0; - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_level <= 4'd0; - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_produce <= 3'd0; - soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_consume <= 3'd0; - soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine2_cmd_buffer_source_payload_addr <= 21'd0; - soc_netsoc_sdram_bankmachine2_cmd_buffer_valid_n <= 1'd0; - soc_netsoc_sdram_bankmachine2_cmd_buffer_first_n <= 1'd0; - soc_netsoc_sdram_bankmachine2_cmd_buffer_last_n <= 1'd0; - soc_netsoc_sdram_bankmachine2_row <= 14'd0; - soc_netsoc_sdram_bankmachine2_row_opened <= 1'd0; - soc_netsoc_sdram_bankmachine2_twtpcon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine2_twtpcon_count <= 3'd0; - soc_netsoc_sdram_bankmachine2_trccon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine2_trccon_count <= 2'd0; - soc_netsoc_sdram_bankmachine2_trascon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine2_trascon_count <= 2'd0; - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_level <= 4'd0; - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_produce <= 3'd0; - soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_consume <= 3'd0; - soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine3_cmd_buffer_source_payload_addr <= 21'd0; - soc_netsoc_sdram_bankmachine3_cmd_buffer_valid_n <= 1'd0; - soc_netsoc_sdram_bankmachine3_cmd_buffer_first_n <= 1'd0; - soc_netsoc_sdram_bankmachine3_cmd_buffer_last_n <= 1'd0; - soc_netsoc_sdram_bankmachine3_row <= 14'd0; - soc_netsoc_sdram_bankmachine3_row_opened <= 1'd0; - soc_netsoc_sdram_bankmachine3_twtpcon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine3_twtpcon_count <= 3'd0; - soc_netsoc_sdram_bankmachine3_trccon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine3_trccon_count <= 2'd0; - soc_netsoc_sdram_bankmachine3_trascon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine3_trascon_count <= 2'd0; - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_level <= 4'd0; - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_produce <= 3'd0; - soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_consume <= 3'd0; - soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine4_cmd_buffer_source_payload_addr <= 21'd0; - soc_netsoc_sdram_bankmachine4_cmd_buffer_valid_n <= 1'd0; - soc_netsoc_sdram_bankmachine4_cmd_buffer_first_n <= 1'd0; - soc_netsoc_sdram_bankmachine4_cmd_buffer_last_n <= 1'd0; - soc_netsoc_sdram_bankmachine4_row <= 14'd0; - soc_netsoc_sdram_bankmachine4_row_opened <= 1'd0; - soc_netsoc_sdram_bankmachine4_twtpcon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine4_twtpcon_count <= 3'd0; - soc_netsoc_sdram_bankmachine4_trccon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine4_trccon_count <= 2'd0; - soc_netsoc_sdram_bankmachine4_trascon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine4_trascon_count <= 2'd0; - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_level <= 4'd0; - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_produce <= 3'd0; - soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_consume <= 3'd0; - soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine5_cmd_buffer_source_payload_addr <= 21'd0; - soc_netsoc_sdram_bankmachine5_cmd_buffer_valid_n <= 1'd0; - soc_netsoc_sdram_bankmachine5_cmd_buffer_first_n <= 1'd0; - soc_netsoc_sdram_bankmachine5_cmd_buffer_last_n <= 1'd0; - soc_netsoc_sdram_bankmachine5_row <= 14'd0; - soc_netsoc_sdram_bankmachine5_row_opened <= 1'd0; - soc_netsoc_sdram_bankmachine5_twtpcon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine5_twtpcon_count <= 3'd0; - soc_netsoc_sdram_bankmachine5_trccon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine5_trccon_count <= 2'd0; - soc_netsoc_sdram_bankmachine5_trascon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine5_trascon_count <= 2'd0; - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_level <= 4'd0; - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_produce <= 3'd0; - soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_consume <= 3'd0; - soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine6_cmd_buffer_source_payload_addr <= 21'd0; - soc_netsoc_sdram_bankmachine6_cmd_buffer_valid_n <= 1'd0; - soc_netsoc_sdram_bankmachine6_cmd_buffer_first_n <= 1'd0; - soc_netsoc_sdram_bankmachine6_cmd_buffer_last_n <= 1'd0; - soc_netsoc_sdram_bankmachine6_row <= 14'd0; - soc_netsoc_sdram_bankmachine6_row_opened <= 1'd0; - soc_netsoc_sdram_bankmachine6_twtpcon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine6_twtpcon_count <= 3'd0; - soc_netsoc_sdram_bankmachine6_trccon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine6_trccon_count <= 2'd0; - soc_netsoc_sdram_bankmachine6_trascon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine6_trascon_count <= 2'd0; - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_level <= 4'd0; - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_produce <= 3'd0; - soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_consume <= 3'd0; - soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_we <= 1'd0; - soc_netsoc_sdram_bankmachine7_cmd_buffer_source_payload_addr <= 21'd0; - soc_netsoc_sdram_bankmachine7_cmd_buffer_valid_n <= 1'd0; - soc_netsoc_sdram_bankmachine7_cmd_buffer_first_n <= 1'd0; - soc_netsoc_sdram_bankmachine7_cmd_buffer_last_n <= 1'd0; - soc_netsoc_sdram_bankmachine7_row <= 14'd0; - soc_netsoc_sdram_bankmachine7_row_opened <= 1'd0; - soc_netsoc_sdram_bankmachine7_twtpcon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine7_twtpcon_count <= 3'd0; - soc_netsoc_sdram_bankmachine7_trccon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine7_trccon_count <= 2'd0; - soc_netsoc_sdram_bankmachine7_trascon_ready <= 1'd1; - soc_netsoc_sdram_bankmachine7_trascon_count <= 2'd0; - soc_netsoc_sdram_choose_cmd_grant <= 3'd0; - soc_netsoc_sdram_choose_req_grant <= 3'd0; - soc_netsoc_sdram_trrdcon_ready <= 1'd1; - soc_netsoc_sdram_trrdcon_count <= 1'd0; - soc_netsoc_sdram_tfawcon_ready <= 1'd1; - soc_netsoc_sdram_tfawcon_window <= 4'd0; - soc_netsoc_sdram_tccdcon_ready <= 1'd1; - soc_netsoc_sdram_tccdcon_count <= 1'd0; - soc_netsoc_sdram_twtrcon_ready <= 1'd1; - soc_netsoc_sdram_twtrcon_count <= 3'd0; - soc_netsoc_sdram_time0 <= 5'd0; - soc_netsoc_sdram_time1 <= 4'd0; - soc_netsoc_sdram_bandwidth_nreads_status <= 24'd0; - soc_netsoc_sdram_bandwidth_nwrites_status <= 24'd0; - soc_netsoc_sdram_bandwidth_cmd_valid <= 1'd0; - soc_netsoc_sdram_bandwidth_cmd_ready <= 1'd0; - soc_netsoc_sdram_bandwidth_cmd_is_read <= 1'd0; - soc_netsoc_sdram_bandwidth_cmd_is_write <= 1'd0; - soc_netsoc_sdram_bandwidth_counter <= 24'd0; - soc_netsoc_sdram_bandwidth_period <= 1'd0; - soc_netsoc_sdram_bandwidth_nreads <= 24'd0; - soc_netsoc_sdram_bandwidth_nwrites <= 24'd0; - soc_netsoc_sdram_bandwidth_nreads_r <= 24'd0; - soc_netsoc_sdram_bandwidth_nwrites_r <= 24'd0; - soc_netsoc_adr_offset_r <= 2'd0; - soc_netsoc_count <= 1'd0; - soc_reset_storage <= 1'd0; - soc_reset_re <= 1'd0; - soc_counter <= 9'd0; - soc_storage <= 3'd0; - soc_re <= 1'd0; - soc_preamble_errors_status <= 32'd0; - soc_crc_errors_status <= 32'd0; - soc_tx_cdc_graycounter0_q <= 7'd0; - soc_tx_cdc_graycounter0_q_binary <= 7'd0; - soc_rx_cdc_graycounter1_q <= 7'd0; - soc_rx_cdc_graycounter1_q_binary <= 7'd0; - soc_writer_errors_status <= 32'd0; - soc_writer_storage <= 1'd0; - soc_writer_re <= 1'd0; - soc_writer_counter <= 32'd0; - soc_writer_slot <= 1'd0; - soc_writer_fifo_level <= 2'd0; - soc_writer_fifo_produce <= 1'd0; - soc_writer_fifo_consume <= 1'd0; - soc_reader_slot_storage <= 1'd0; - soc_reader_slot_re <= 1'd0; - soc_reader_length_storage <= 11'd0; - soc_reader_length_re <= 1'd0; - soc_reader_done_pending <= 1'd0; - soc_reader_eventmanager_storage <= 1'd0; - soc_reader_eventmanager_re <= 1'd0; - soc_reader_fifo_level <= 2'd0; - soc_reader_fifo_produce <= 1'd0; - soc_reader_fifo_consume <= 1'd0; - soc_reader_counter <= 11'd0; - soc_reader_last_d <= 1'd0; - soc_sram0_bus_ack0 <= 1'd0; - soc_sram1_bus_ack0 <= 1'd0; - soc_sram0_bus_ack1 <= 1'd0; - soc_sram1_bus_ack1 <= 1'd0; - soc_slave_sel_r <= 4'd0; - vns_wb2csr_state <= 1'd0; - vns_refresher_state <= 2'd0; - vns_bankmachine0_state <= 3'd0; - vns_bankmachine1_state <= 3'd0; - vns_bankmachine2_state <= 3'd0; - vns_bankmachine3_state <= 3'd0; - vns_bankmachine4_state <= 3'd0; - vns_bankmachine5_state <= 3'd0; - vns_bankmachine6_state <= 3'd0; - vns_bankmachine7_state <= 3'd0; - vns_multiplexer_state <= 4'd0; - vns_rbank <= 3'd0; - vns_wbank <= 3'd0; - vns_new_master_wdata_ready0 <= 1'd0; - vns_new_master_wdata_ready1 <= 1'd0; - vns_new_master_wdata_ready2 <= 1'd0; - vns_new_master_rdata_valid0 <= 1'd0; - vns_new_master_rdata_valid1 <= 1'd0; - vns_new_master_rdata_valid2 <= 1'd0; - vns_new_master_rdata_valid3 <= 1'd0; - vns_new_master_rdata_valid4 <= 1'd0; - vns_new_master_rdata_valid5 <= 1'd0; - vns_new_master_rdata_valid6 <= 1'd0; - vns_new_master_rdata_valid7 <= 1'd0; - vns_new_master_rdata_valid8 <= 1'd0; - vns_new_master_rdata_valid9 <= 1'd0; - vns_fullmemorywe_state <= 3'd0; - vns_litedramwishbone2native_state <= 2'd0; - vns_liteethmacsramwriter_state <= 3'd0; - vns_liteethmacsramreader_state <= 2'd0; - vns_netsoc_grant <= 1'd0; - vns_netsoc_slave_sel_r <= 6'd0; - vns_netsoc_count <= 20'd1000000; - vns_netsoc_csrbankarray_interface0_bank_bus_dat_r <= 8'd0; - vns_netsoc_csrbankarray_interface1_bank_bus_dat_r <= 8'd0; - vns_netsoc_csrbankarray_interface2_bank_bus_dat_r <= 8'd0; - vns_netsoc_csrbankarray_interface3_bank_bus_dat_r <= 8'd0; - vns_netsoc_csrbankarray_interface4_bank_bus_dat_r <= 8'd0; - vns_netsoc_csrbankarray_sel_r <= 1'd0; - vns_netsoc_csrbankarray_interface5_bank_bus_dat_r <= 8'd0; - vns_netsoc_csrbankarray_interface6_bank_bus_dat_r <= 8'd0; - vns_netsoc_csrbankarray_interface7_bank_bus_dat_r <= 8'd0; - vns_netsoc_csrbankarray_interface8_bank_bus_dat_r <= 8'd0; - end - vns_xilinxmultiregimpl0_regs0 <= serial_rx; - vns_xilinxmultiregimpl0_regs1 <= vns_xilinxmultiregimpl0_regs0; - vns_xilinxmultiregimpl1_regs0 <= soc_data_r; - vns_xilinxmultiregimpl1_regs1 <= vns_xilinxmultiregimpl1_regs0; - vns_xilinxmultiregimpl2_regs0 <= soc_ps_preamble_error_toggle_i; - vns_xilinxmultiregimpl2_regs1 <= vns_xilinxmultiregimpl2_regs0; - vns_xilinxmultiregimpl3_regs0 <= soc_ps_crc_error_toggle_i; - vns_xilinxmultiregimpl3_regs1 <= vns_xilinxmultiregimpl3_regs0; - vns_xilinxmultiregimpl5_regs0 <= soc_tx_cdc_graycounter1_q; - vns_xilinxmultiregimpl5_regs1 <= vns_xilinxmultiregimpl5_regs0; - vns_xilinxmultiregimpl6_regs0 <= soc_rx_cdc_graycounter0_q; - vns_xilinxmultiregimpl6_regs1 <= vns_xilinxmultiregimpl6_regs0; -end - -reg [31:0] mem[0:16383]; -reg [31:0] memdat; -always @(posedge sys_clk) begin - memdat <= mem[soc_netsoc_rom_adr]; -end - -assign soc_netsoc_rom_dat_r = memdat; - -initial begin - $readmemh("mem.init", mem); -end - -reg [31:0] mem_1[0:8191]; -reg [12:0] memadr; -always @(posedge sys_clk) begin - if (soc_netsoc_sram_we[0]) - mem_1[soc_netsoc_sram_adr][7:0] <= soc_netsoc_sram_dat_w[7:0]; - if (soc_netsoc_sram_we[1]) - mem_1[soc_netsoc_sram_adr][15:8] <= soc_netsoc_sram_dat_w[15:8]; - if (soc_netsoc_sram_we[2]) - mem_1[soc_netsoc_sram_adr][23:16] <= soc_netsoc_sram_dat_w[23:16]; - if (soc_netsoc_sram_we[3]) - mem_1[soc_netsoc_sram_adr][31:24] <= soc_netsoc_sram_dat_w[31:24]; - memadr <= soc_netsoc_sram_adr; -end - -assign soc_netsoc_sram_dat_r = mem_1[memadr]; - -initial begin - $readmemh("mem_1.init", mem_1); -end - -reg [9:0] storage[0:15]; -reg [9:0] memdat_1; -reg [9:0] memdat_2; -always @(posedge sys_clk) begin - if (soc_netsoc_uart_tx_fifo_wrport_we) - storage[soc_netsoc_uart_tx_fifo_wrport_adr] <= soc_netsoc_uart_tx_fifo_wrport_dat_w; - memdat_1 <= storage[soc_netsoc_uart_tx_fifo_wrport_adr]; -end - -always @(posedge sys_clk) begin - if (soc_netsoc_uart_tx_fifo_rdport_re) - memdat_2 <= storage[soc_netsoc_uart_tx_fifo_rdport_adr]; -end - -assign soc_netsoc_uart_tx_fifo_wrport_dat_r = memdat_1; -assign soc_netsoc_uart_tx_fifo_rdport_dat_r = memdat_2; - -reg [9:0] storage_1[0:15]; -reg [9:0] memdat_3; -reg [9:0] memdat_4; -always @(posedge sys_clk) begin - if (soc_netsoc_uart_rx_fifo_wrport_we) - storage_1[soc_netsoc_uart_rx_fifo_wrport_adr] <= soc_netsoc_uart_rx_fifo_wrport_dat_w; - memdat_3 <= storage_1[soc_netsoc_uart_rx_fifo_wrport_adr]; -end - -always @(posedge sys_clk) begin - if (soc_netsoc_uart_rx_fifo_rdport_re) - memdat_4 <= storage_1[soc_netsoc_uart_rx_fifo_rdport_adr]; -end - -assign soc_netsoc_uart_rx_fifo_wrport_dat_r = memdat_3; -assign soc_netsoc_uart_rx_fifo_rdport_dat_r = memdat_4; - -reg [7:0] mem_2[0:6]; -reg [2:0] memadr_1; -always @(posedge sys_clk) begin - memadr_1 <= vns_netsoc_csrbankarray_adr; -end - -assign vns_netsoc_csrbankarray_dat_r = mem_2[memadr_1]; - -initial begin - $readmemh("mem_2.init", mem_2); -end - -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(5'd20), - .CLKOUT0_PHASE(1'd0), - .CLKOUT1_DIVIDE(3'd5), - .CLKOUT1_PHASE(1'd0), - .CLKOUT2_DIVIDE(3'd5), - .CLKOUT2_PHASE(90000), - .CLKOUT3_DIVIDE(3'd6), - .CLKOUT3_PHASE(1'd0), - .CLKOUT4_DIVIDE(6'd48), - .CLKOUT5_PHASE(1'd0), - .DIVCLK_DIVIDE(1'd1), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(soc_pll_fb), - .CLKIN1(clk100), - .CLKFBOUT(soc_pll_fb), - .CLKOUT0(sys_clk), - .CLKOUT1(sys4x_clk), - .CLKOUT2(sys4x_dqs_clk), - .CLKOUT3(clk200_clk), - .CLKOUT4(eth_ref_clk_obuf), - .LOCKED(soc_pll_locked) -); - -OBUF clk_eth_buf(.I(eth_ref_clk_obuf), .O(eth_ref_clk)); - -(* LOC="IDELAYCTRL_X1Y0" *) -IDELAYCTRL IDELAYCTRL( - .REFCLK(clk200_clk), - .RST(soc_ic_reset), - .RDY(idelayctl_rdy) -); - -reg [31:0] mem_3[0:4095]; -reg [11:0] memadr_2; -always @(posedge sys_clk) begin - if (soc_emulator_ram_we[0]) - mem_3[soc_emulator_ram_adr][7:0] <= soc_emulator_ram_dat_w[7:0]; - if (soc_emulator_ram_we[1]) - mem_3[soc_emulator_ram_adr][15:8] <= soc_emulator_ram_dat_w[15:8]; - if (soc_emulator_ram_we[2]) - mem_3[soc_emulator_ram_adr][23:16] <= soc_emulator_ram_dat_w[23:16]; - if (soc_emulator_ram_we[3]) - mem_3[soc_emulator_ram_adr][31:24] <= soc_emulator_ram_dat_w[31:24]; - memadr_2 <= soc_emulator_ram_adr; -end - -assign soc_emulator_ram_dat_r = mem_3[memadr_2]; - -wire tq; - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(1'd0), - .D2(1'd1), - .D3(1'd0), - .D4(1'd1), - .D5(1'd0), - .D6(1'd1), - .D7(1'd0), - .D8(1'd1), - .OCE(1'd1), - .RST(sys_rst), - .OQ(soc_a7ddrphy_sd_clk_se_nodelay), - .TQ(tq), - .TCE(1'd1), - .T1(1'b0) -); - -OBUFTDS OBUFTDS_0( - .I(soc_a7ddrphy_sd_clk_se_nodelay), - .O(ddram_clk_p), - .OB(ddram_clk_n), - .T(tq) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_1 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[0]), - .D2(soc_a7ddrphy_dfi_p0_address[0]), - .D3(soc_a7ddrphy_dfi_p1_address[0]), - .D4(soc_a7ddrphy_dfi_p1_address[0]), - .D5(soc_a7ddrphy_dfi_p2_address[0]), - .D6(soc_a7ddrphy_dfi_p2_address[0]), - .D7(soc_a7ddrphy_dfi_p3_address[0]), - .D8(soc_a7ddrphy_dfi_p3_address[0]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[0]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_2 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[1]), - .D2(soc_a7ddrphy_dfi_p0_address[1]), - .D3(soc_a7ddrphy_dfi_p1_address[1]), - .D4(soc_a7ddrphy_dfi_p1_address[1]), - .D5(soc_a7ddrphy_dfi_p2_address[1]), - .D6(soc_a7ddrphy_dfi_p2_address[1]), - .D7(soc_a7ddrphy_dfi_p3_address[1]), - .D8(soc_a7ddrphy_dfi_p3_address[1]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[1]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_3 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[2]), - .D2(soc_a7ddrphy_dfi_p0_address[2]), - .D3(soc_a7ddrphy_dfi_p1_address[2]), - .D4(soc_a7ddrphy_dfi_p1_address[2]), - .D5(soc_a7ddrphy_dfi_p2_address[2]), - .D6(soc_a7ddrphy_dfi_p2_address[2]), - .D7(soc_a7ddrphy_dfi_p3_address[2]), - .D8(soc_a7ddrphy_dfi_p3_address[2]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[2]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_4 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[3]), - .D2(soc_a7ddrphy_dfi_p0_address[3]), - .D3(soc_a7ddrphy_dfi_p1_address[3]), - .D4(soc_a7ddrphy_dfi_p1_address[3]), - .D5(soc_a7ddrphy_dfi_p2_address[3]), - .D6(soc_a7ddrphy_dfi_p2_address[3]), - .D7(soc_a7ddrphy_dfi_p3_address[3]), - .D8(soc_a7ddrphy_dfi_p3_address[3]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[3]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_5 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[4]), - .D2(soc_a7ddrphy_dfi_p0_address[4]), - .D3(soc_a7ddrphy_dfi_p1_address[4]), - .D4(soc_a7ddrphy_dfi_p1_address[4]), - .D5(soc_a7ddrphy_dfi_p2_address[4]), - .D6(soc_a7ddrphy_dfi_p2_address[4]), - .D7(soc_a7ddrphy_dfi_p3_address[4]), - .D8(soc_a7ddrphy_dfi_p3_address[4]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[4]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_6 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[5]), - .D2(soc_a7ddrphy_dfi_p0_address[5]), - .D3(soc_a7ddrphy_dfi_p1_address[5]), - .D4(soc_a7ddrphy_dfi_p1_address[5]), - .D5(soc_a7ddrphy_dfi_p2_address[5]), - .D6(soc_a7ddrphy_dfi_p2_address[5]), - .D7(soc_a7ddrphy_dfi_p3_address[5]), - .D8(soc_a7ddrphy_dfi_p3_address[5]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[5]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_7 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[6]), - .D2(soc_a7ddrphy_dfi_p0_address[6]), - .D3(soc_a7ddrphy_dfi_p1_address[6]), - .D4(soc_a7ddrphy_dfi_p1_address[6]), - .D5(soc_a7ddrphy_dfi_p2_address[6]), - .D6(soc_a7ddrphy_dfi_p2_address[6]), - .D7(soc_a7ddrphy_dfi_p3_address[6]), - .D8(soc_a7ddrphy_dfi_p3_address[6]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[6]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_8 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[7]), - .D2(soc_a7ddrphy_dfi_p0_address[7]), - .D3(soc_a7ddrphy_dfi_p1_address[7]), - .D4(soc_a7ddrphy_dfi_p1_address[7]), - .D5(soc_a7ddrphy_dfi_p2_address[7]), - .D6(soc_a7ddrphy_dfi_p2_address[7]), - .D7(soc_a7ddrphy_dfi_p3_address[7]), - .D8(soc_a7ddrphy_dfi_p3_address[7]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[7]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_9 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[8]), - .D2(soc_a7ddrphy_dfi_p0_address[8]), - .D3(soc_a7ddrphy_dfi_p1_address[8]), - .D4(soc_a7ddrphy_dfi_p1_address[8]), - .D5(soc_a7ddrphy_dfi_p2_address[8]), - .D6(soc_a7ddrphy_dfi_p2_address[8]), - .D7(soc_a7ddrphy_dfi_p3_address[8]), - .D8(soc_a7ddrphy_dfi_p3_address[8]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[8]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_10 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[9]), - .D2(soc_a7ddrphy_dfi_p0_address[9]), - .D3(soc_a7ddrphy_dfi_p1_address[9]), - .D4(soc_a7ddrphy_dfi_p1_address[9]), - .D5(soc_a7ddrphy_dfi_p2_address[9]), - .D6(soc_a7ddrphy_dfi_p2_address[9]), - .D7(soc_a7ddrphy_dfi_p3_address[9]), - .D8(soc_a7ddrphy_dfi_p3_address[9]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[9]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_11 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[10]), - .D2(soc_a7ddrphy_dfi_p0_address[10]), - .D3(soc_a7ddrphy_dfi_p1_address[10]), - .D4(soc_a7ddrphy_dfi_p1_address[10]), - .D5(soc_a7ddrphy_dfi_p2_address[10]), - .D6(soc_a7ddrphy_dfi_p2_address[10]), - .D7(soc_a7ddrphy_dfi_p3_address[10]), - .D8(soc_a7ddrphy_dfi_p3_address[10]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[10]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_12 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[11]), - .D2(soc_a7ddrphy_dfi_p0_address[11]), - .D3(soc_a7ddrphy_dfi_p1_address[11]), - .D4(soc_a7ddrphy_dfi_p1_address[11]), - .D5(soc_a7ddrphy_dfi_p2_address[11]), - .D6(soc_a7ddrphy_dfi_p2_address[11]), - .D7(soc_a7ddrphy_dfi_p3_address[11]), - .D8(soc_a7ddrphy_dfi_p3_address[11]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[11]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_13 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[12]), - .D2(soc_a7ddrphy_dfi_p0_address[12]), - .D3(soc_a7ddrphy_dfi_p1_address[12]), - .D4(soc_a7ddrphy_dfi_p1_address[12]), - .D5(soc_a7ddrphy_dfi_p2_address[12]), - .D6(soc_a7ddrphy_dfi_p2_address[12]), - .D7(soc_a7ddrphy_dfi_p3_address[12]), - .D8(soc_a7ddrphy_dfi_p3_address[12]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[12]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_14 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_address[13]), - .D2(soc_a7ddrphy_dfi_p0_address[13]), - .D3(soc_a7ddrphy_dfi_p1_address[13]), - .D4(soc_a7ddrphy_dfi_p1_address[13]), - .D5(soc_a7ddrphy_dfi_p2_address[13]), - .D6(soc_a7ddrphy_dfi_p2_address[13]), - .D7(soc_a7ddrphy_dfi_p3_address[13]), - .D8(soc_a7ddrphy_dfi_p3_address[13]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a[13]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_15 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_bank[0]), - .D2(soc_a7ddrphy_dfi_p0_bank[0]), - .D3(soc_a7ddrphy_dfi_p1_bank[0]), - .D4(soc_a7ddrphy_dfi_p1_bank[0]), - .D5(soc_a7ddrphy_dfi_p2_bank[0]), - .D6(soc_a7ddrphy_dfi_p2_bank[0]), - .D7(soc_a7ddrphy_dfi_p3_bank[0]), - .D8(soc_a7ddrphy_dfi_p3_bank[0]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ba[0]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_16 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_bank[1]), - .D2(soc_a7ddrphy_dfi_p0_bank[1]), - .D3(soc_a7ddrphy_dfi_p1_bank[1]), - .D4(soc_a7ddrphy_dfi_p1_bank[1]), - .D5(soc_a7ddrphy_dfi_p2_bank[1]), - .D6(soc_a7ddrphy_dfi_p2_bank[1]), - .D7(soc_a7ddrphy_dfi_p3_bank[1]), - .D8(soc_a7ddrphy_dfi_p3_bank[1]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ba[1]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_17 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_bank[2]), - .D2(soc_a7ddrphy_dfi_p0_bank[2]), - .D3(soc_a7ddrphy_dfi_p1_bank[2]), - .D4(soc_a7ddrphy_dfi_p1_bank[2]), - .D5(soc_a7ddrphy_dfi_p2_bank[2]), - .D6(soc_a7ddrphy_dfi_p2_bank[2]), - .D7(soc_a7ddrphy_dfi_p3_bank[2]), - .D8(soc_a7ddrphy_dfi_p3_bank[2]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ba[2]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_18 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_ras_n), - .D2(soc_a7ddrphy_dfi_p0_ras_n), - .D3(soc_a7ddrphy_dfi_p1_ras_n), - .D4(soc_a7ddrphy_dfi_p1_ras_n), - .D5(soc_a7ddrphy_dfi_p2_ras_n), - .D6(soc_a7ddrphy_dfi_p2_ras_n), - .D7(soc_a7ddrphy_dfi_p3_ras_n), - .D8(soc_a7ddrphy_dfi_p3_ras_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ras_n) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_19 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_cas_n), - .D2(soc_a7ddrphy_dfi_p0_cas_n), - .D3(soc_a7ddrphy_dfi_p1_cas_n), - .D4(soc_a7ddrphy_dfi_p1_cas_n), - .D5(soc_a7ddrphy_dfi_p2_cas_n), - .D6(soc_a7ddrphy_dfi_p2_cas_n), - .D7(soc_a7ddrphy_dfi_p3_cas_n), - .D8(soc_a7ddrphy_dfi_p3_cas_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_cas_n) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_20 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_we_n), - .D2(soc_a7ddrphy_dfi_p0_we_n), - .D3(soc_a7ddrphy_dfi_p1_we_n), - .D4(soc_a7ddrphy_dfi_p1_we_n), - .D5(soc_a7ddrphy_dfi_p2_we_n), - .D6(soc_a7ddrphy_dfi_p2_we_n), - .D7(soc_a7ddrphy_dfi_p3_we_n), - .D8(soc_a7ddrphy_dfi_p3_we_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_we_n) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_21 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_cke), - .D2(soc_a7ddrphy_dfi_p0_cke), - .D3(soc_a7ddrphy_dfi_p1_cke), - .D4(soc_a7ddrphy_dfi_p1_cke), - .D5(soc_a7ddrphy_dfi_p2_cke), - .D6(soc_a7ddrphy_dfi_p2_cke), - .D7(soc_a7ddrphy_dfi_p3_cke), - .D8(soc_a7ddrphy_dfi_p3_cke), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_cke) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_22 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_odt), - .D2(soc_a7ddrphy_dfi_p0_odt), - .D3(soc_a7ddrphy_dfi_p1_odt), - .D4(soc_a7ddrphy_dfi_p1_odt), - .D5(soc_a7ddrphy_dfi_p2_odt), - .D6(soc_a7ddrphy_dfi_p2_odt), - .D7(soc_a7ddrphy_dfi_p3_odt), - .D8(soc_a7ddrphy_dfi_p3_odt), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_odt) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_23 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_reset_n), - .D2(soc_a7ddrphy_dfi_p0_reset_n), - .D3(soc_a7ddrphy_dfi_p1_reset_n), - .D4(soc_a7ddrphy_dfi_p1_reset_n), - .D5(soc_a7ddrphy_dfi_p2_reset_n), - .D6(soc_a7ddrphy_dfi_p2_reset_n), - .D7(soc_a7ddrphy_dfi_p3_reset_n), - .D8(soc_a7ddrphy_dfi_p3_reset_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_reset_n) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_24 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_cs_n), - .D2(soc_a7ddrphy_dfi_p0_cs_n), - .D3(soc_a7ddrphy_dfi_p1_cs_n), - .D4(soc_a7ddrphy_dfi_p1_cs_n), - .D5(soc_a7ddrphy_dfi_p2_cs_n), - .D6(soc_a7ddrphy_dfi_p2_cs_n), - .D7(soc_a7ddrphy_dfi_p3_cs_n), - .D8(soc_a7ddrphy_dfi_p3_cs_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_cs_n) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_25 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata_mask[0]), - .D2(soc_a7ddrphy_dfi_p0_wrdata_mask[2]), - .D3(soc_a7ddrphy_dfi_p1_wrdata_mask[0]), - .D4(soc_a7ddrphy_dfi_p1_wrdata_mask[2]), - .D5(soc_a7ddrphy_dfi_p2_wrdata_mask[0]), - .D6(soc_a7ddrphy_dfi_p2_wrdata_mask[2]), - .D7(soc_a7ddrphy_dfi_p3_wrdata_mask[0]), - .D8(soc_a7ddrphy_dfi_p3_wrdata_mask[2]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_dm[0]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_26 ( - .CLK(sys4x_dqs_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dqs_serdes_pattern[0]), - .D2(soc_a7ddrphy_dqs_serdes_pattern[1]), - .D3(soc_a7ddrphy_dqs_serdes_pattern[2]), - .D4(soc_a7ddrphy_dqs_serdes_pattern[3]), - .D5(soc_a7ddrphy_dqs_serdes_pattern[4]), - .D6(soc_a7ddrphy_dqs_serdes_pattern[5]), - .D7(soc_a7ddrphy_dqs_serdes_pattern[6]), - .D8(soc_a7ddrphy_dqs_serdes_pattern[7]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dqs)), - .TCE(1'd1), - .OFB(soc_a7ddrphy0), - .OQ(soc_a7ddrphy_dqs_nodelay0), - .TQ(soc_a7ddrphy_dqs_t0) -); - -OBUFTDS OBUFTDS( - .I(soc_a7ddrphy_dqs_nodelay0), - .T(soc_a7ddrphy_dqs_t0), - .O(ddram_dqs_p[0]), - .OB(ddram_dqs_n[0]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_27 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata_mask[1]), - .D2(soc_a7ddrphy_dfi_p0_wrdata_mask[3]), - .D3(soc_a7ddrphy_dfi_p1_wrdata_mask[1]), - .D4(soc_a7ddrphy_dfi_p1_wrdata_mask[3]), - .D5(soc_a7ddrphy_dfi_p2_wrdata_mask[1]), - .D6(soc_a7ddrphy_dfi_p2_wrdata_mask[3]), - .D7(soc_a7ddrphy_dfi_p3_wrdata_mask[1]), - .D8(soc_a7ddrphy_dfi_p3_wrdata_mask[3]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_dm[1]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_28 ( - .CLK(sys4x_dqs_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dqs_serdes_pattern[0]), - .D2(soc_a7ddrphy_dqs_serdes_pattern[1]), - .D3(soc_a7ddrphy_dqs_serdes_pattern[2]), - .D4(soc_a7ddrphy_dqs_serdes_pattern[3]), - .D5(soc_a7ddrphy_dqs_serdes_pattern[4]), - .D6(soc_a7ddrphy_dqs_serdes_pattern[5]), - .D7(soc_a7ddrphy_dqs_serdes_pattern[6]), - .D8(soc_a7ddrphy_dqs_serdes_pattern[7]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dqs)), - .TCE(1'd1), - .OFB(soc_a7ddrphy1), - .OQ(soc_a7ddrphy_dqs_nodelay1), - .TQ(soc_a7ddrphy_dqs_t1) -); - -OBUFTDS OBUFTDS_1( - .I(soc_a7ddrphy_dqs_nodelay1), - .T(soc_a7ddrphy_dqs_t1), - .O(ddram_dqs_p[1]), - .OB(ddram_dqs_n[1]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_29 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[0]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[16]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[0]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[16]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[0]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[16]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[0]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[16]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay0), - .TQ(soc_a7ddrphy_dq_t0) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed0), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data0[7]), - .Q2(soc_a7ddrphy_dq_i_data0[6]), - .Q3(soc_a7ddrphy_dq_i_data0[5]), - .Q4(soc_a7ddrphy_dq_i_data0[4]), - .Q5(soc_a7ddrphy_dq_i_data0[3]), - .Q6(soc_a7ddrphy_dq_i_data0[2]), - .Q7(soc_a7ddrphy_dq_i_data0[1]), - .Q8(soc_a7ddrphy_dq_i_data0[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay0), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed0) -); - -IOBUF IOBUF( - .I(soc_a7ddrphy_dq_o_nodelay0), - .T(soc_a7ddrphy_dq_t0), - .IO(ddram_dq[0]), - .O(soc_a7ddrphy_dq_i_nodelay0) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_30 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[1]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[17]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[1]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[17]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[1]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[17]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[1]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[17]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay1), - .TQ(soc_a7ddrphy_dq_t1) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_1 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed1), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data1[7]), - .Q2(soc_a7ddrphy_dq_i_data1[6]), - .Q3(soc_a7ddrphy_dq_i_data1[5]), - .Q4(soc_a7ddrphy_dq_i_data1[4]), - .Q5(soc_a7ddrphy_dq_i_data1[3]), - .Q6(soc_a7ddrphy_dq_i_data1[2]), - .Q7(soc_a7ddrphy_dq_i_data1[1]), - .Q8(soc_a7ddrphy_dq_i_data1[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_1 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay1), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed1) -); - -IOBUF IOBUF_1( - .I(soc_a7ddrphy_dq_o_nodelay1), - .T(soc_a7ddrphy_dq_t1), - .IO(ddram_dq[1]), - .O(soc_a7ddrphy_dq_i_nodelay1) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_31 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[2]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[18]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[2]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[18]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[2]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[18]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[2]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[18]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay2), - .TQ(soc_a7ddrphy_dq_t2) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_2 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed2), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data2[7]), - .Q2(soc_a7ddrphy_dq_i_data2[6]), - .Q3(soc_a7ddrphy_dq_i_data2[5]), - .Q4(soc_a7ddrphy_dq_i_data2[4]), - .Q5(soc_a7ddrphy_dq_i_data2[3]), - .Q6(soc_a7ddrphy_dq_i_data2[2]), - .Q7(soc_a7ddrphy_dq_i_data2[1]), - .Q8(soc_a7ddrphy_dq_i_data2[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_2 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay2), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed2) -); - -IOBUF IOBUF_2( - .I(soc_a7ddrphy_dq_o_nodelay2), - .T(soc_a7ddrphy_dq_t2), - .IO(ddram_dq[2]), - .O(soc_a7ddrphy_dq_i_nodelay2) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_32 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[3]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[19]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[3]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[19]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[3]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[19]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[3]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[19]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay3), - .TQ(soc_a7ddrphy_dq_t3) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_3 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed3), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data3[7]), - .Q2(soc_a7ddrphy_dq_i_data3[6]), - .Q3(soc_a7ddrphy_dq_i_data3[5]), - .Q4(soc_a7ddrphy_dq_i_data3[4]), - .Q5(soc_a7ddrphy_dq_i_data3[3]), - .Q6(soc_a7ddrphy_dq_i_data3[2]), - .Q7(soc_a7ddrphy_dq_i_data3[1]), - .Q8(soc_a7ddrphy_dq_i_data3[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_3 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay3), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed3) -); - -IOBUF IOBUF_3( - .I(soc_a7ddrphy_dq_o_nodelay3), - .T(soc_a7ddrphy_dq_t3), - .IO(ddram_dq[3]), - .O(soc_a7ddrphy_dq_i_nodelay3) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_33 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[4]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[20]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[4]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[20]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[4]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[20]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[4]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[20]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay4), - .TQ(soc_a7ddrphy_dq_t4) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_4 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed4), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data4[7]), - .Q2(soc_a7ddrphy_dq_i_data4[6]), - .Q3(soc_a7ddrphy_dq_i_data4[5]), - .Q4(soc_a7ddrphy_dq_i_data4[4]), - .Q5(soc_a7ddrphy_dq_i_data4[3]), - .Q6(soc_a7ddrphy_dq_i_data4[2]), - .Q7(soc_a7ddrphy_dq_i_data4[1]), - .Q8(soc_a7ddrphy_dq_i_data4[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_4 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay4), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed4) -); - -IOBUF IOBUF_4( - .I(soc_a7ddrphy_dq_o_nodelay4), - .T(soc_a7ddrphy_dq_t4), - .IO(ddram_dq[4]), - .O(soc_a7ddrphy_dq_i_nodelay4) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_34 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[5]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[21]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[5]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[21]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[5]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[21]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[5]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[21]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay5), - .TQ(soc_a7ddrphy_dq_t5) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_5 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed5), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data5[7]), - .Q2(soc_a7ddrphy_dq_i_data5[6]), - .Q3(soc_a7ddrphy_dq_i_data5[5]), - .Q4(soc_a7ddrphy_dq_i_data5[4]), - .Q5(soc_a7ddrphy_dq_i_data5[3]), - .Q6(soc_a7ddrphy_dq_i_data5[2]), - .Q7(soc_a7ddrphy_dq_i_data5[1]), - .Q8(soc_a7ddrphy_dq_i_data5[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_5 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay5), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed5) -); - -IOBUF IOBUF_5( - .I(soc_a7ddrphy_dq_o_nodelay5), - .T(soc_a7ddrphy_dq_t5), - .IO(ddram_dq[5]), - .O(soc_a7ddrphy_dq_i_nodelay5) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_35 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[6]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[22]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[6]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[22]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[6]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[22]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[6]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[22]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay6), - .TQ(soc_a7ddrphy_dq_t6) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_6 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed6), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data6[7]), - .Q2(soc_a7ddrphy_dq_i_data6[6]), - .Q3(soc_a7ddrphy_dq_i_data6[5]), - .Q4(soc_a7ddrphy_dq_i_data6[4]), - .Q5(soc_a7ddrphy_dq_i_data6[3]), - .Q6(soc_a7ddrphy_dq_i_data6[2]), - .Q7(soc_a7ddrphy_dq_i_data6[1]), - .Q8(soc_a7ddrphy_dq_i_data6[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_6 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay6), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed6) -); - -IOBUF IOBUF_6( - .I(soc_a7ddrphy_dq_o_nodelay6), - .T(soc_a7ddrphy_dq_t6), - .IO(ddram_dq[6]), - .O(soc_a7ddrphy_dq_i_nodelay6) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_36 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[7]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[23]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[7]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[23]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[7]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[23]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[7]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[23]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay7), - .TQ(soc_a7ddrphy_dq_t7) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_7 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed7), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data7[7]), - .Q2(soc_a7ddrphy_dq_i_data7[6]), - .Q3(soc_a7ddrphy_dq_i_data7[5]), - .Q4(soc_a7ddrphy_dq_i_data7[4]), - .Q5(soc_a7ddrphy_dq_i_data7[3]), - .Q6(soc_a7ddrphy_dq_i_data7[2]), - .Q7(soc_a7ddrphy_dq_i_data7[1]), - .Q8(soc_a7ddrphy_dq_i_data7[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_7 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay7), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[0] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed7) -); - -IOBUF IOBUF_7( - .I(soc_a7ddrphy_dq_o_nodelay7), - .T(soc_a7ddrphy_dq_t7), - .IO(ddram_dq[7]), - .O(soc_a7ddrphy_dq_i_nodelay7) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_37 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[8]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[24]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[8]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[24]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[8]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[24]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[8]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[24]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay8), - .TQ(soc_a7ddrphy_dq_t8) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_8 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed8), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data8[7]), - .Q2(soc_a7ddrphy_dq_i_data8[6]), - .Q3(soc_a7ddrphy_dq_i_data8[5]), - .Q4(soc_a7ddrphy_dq_i_data8[4]), - .Q5(soc_a7ddrphy_dq_i_data8[3]), - .Q6(soc_a7ddrphy_dq_i_data8[2]), - .Q7(soc_a7ddrphy_dq_i_data8[1]), - .Q8(soc_a7ddrphy_dq_i_data8[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_8 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay8), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed8) -); - -IOBUF IOBUF_8( - .I(soc_a7ddrphy_dq_o_nodelay8), - .T(soc_a7ddrphy_dq_t8), - .IO(ddram_dq[8]), - .O(soc_a7ddrphy_dq_i_nodelay8) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_38 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[9]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[25]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[9]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[25]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[9]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[25]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[9]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[25]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay9), - .TQ(soc_a7ddrphy_dq_t9) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_9 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed9), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data9[7]), - .Q2(soc_a7ddrphy_dq_i_data9[6]), - .Q3(soc_a7ddrphy_dq_i_data9[5]), - .Q4(soc_a7ddrphy_dq_i_data9[4]), - .Q5(soc_a7ddrphy_dq_i_data9[3]), - .Q6(soc_a7ddrphy_dq_i_data9[2]), - .Q7(soc_a7ddrphy_dq_i_data9[1]), - .Q8(soc_a7ddrphy_dq_i_data9[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_9 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay9), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed9) -); - -IOBUF IOBUF_9( - .I(soc_a7ddrphy_dq_o_nodelay9), - .T(soc_a7ddrphy_dq_t9), - .IO(ddram_dq[9]), - .O(soc_a7ddrphy_dq_i_nodelay9) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_39 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[10]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[26]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[10]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[26]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[10]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[26]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[10]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[26]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay10), - .TQ(soc_a7ddrphy_dq_t10) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_10 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed10), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data10[7]), - .Q2(soc_a7ddrphy_dq_i_data10[6]), - .Q3(soc_a7ddrphy_dq_i_data10[5]), - .Q4(soc_a7ddrphy_dq_i_data10[4]), - .Q5(soc_a7ddrphy_dq_i_data10[3]), - .Q6(soc_a7ddrphy_dq_i_data10[2]), - .Q7(soc_a7ddrphy_dq_i_data10[1]), - .Q8(soc_a7ddrphy_dq_i_data10[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_10 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay10), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed10) -); - -IOBUF IOBUF_10( - .I(soc_a7ddrphy_dq_o_nodelay10), - .T(soc_a7ddrphy_dq_t10), - .IO(ddram_dq[10]), - .O(soc_a7ddrphy_dq_i_nodelay10) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_40 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[11]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[27]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[11]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[27]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[11]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[27]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[11]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[27]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay11), - .TQ(soc_a7ddrphy_dq_t11) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_11 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed11), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data11[7]), - .Q2(soc_a7ddrphy_dq_i_data11[6]), - .Q3(soc_a7ddrphy_dq_i_data11[5]), - .Q4(soc_a7ddrphy_dq_i_data11[4]), - .Q5(soc_a7ddrphy_dq_i_data11[3]), - .Q6(soc_a7ddrphy_dq_i_data11[2]), - .Q7(soc_a7ddrphy_dq_i_data11[1]), - .Q8(soc_a7ddrphy_dq_i_data11[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_11 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay11), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed11) -); - -IOBUF IOBUF_11( - .I(soc_a7ddrphy_dq_o_nodelay11), - .T(soc_a7ddrphy_dq_t11), - .IO(ddram_dq[11]), - .O(soc_a7ddrphy_dq_i_nodelay11) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_41 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[12]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[28]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[12]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[28]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[12]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[28]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[12]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[28]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay12), - .TQ(soc_a7ddrphy_dq_t12) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_12 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed12), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data12[7]), - .Q2(soc_a7ddrphy_dq_i_data12[6]), - .Q3(soc_a7ddrphy_dq_i_data12[5]), - .Q4(soc_a7ddrphy_dq_i_data12[4]), - .Q5(soc_a7ddrphy_dq_i_data12[3]), - .Q6(soc_a7ddrphy_dq_i_data12[2]), - .Q7(soc_a7ddrphy_dq_i_data12[1]), - .Q8(soc_a7ddrphy_dq_i_data12[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_12 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay12), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed12) -); - -IOBUF IOBUF_12( - .I(soc_a7ddrphy_dq_o_nodelay12), - .T(soc_a7ddrphy_dq_t12), - .IO(ddram_dq[12]), - .O(soc_a7ddrphy_dq_i_nodelay12) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_42 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[13]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[29]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[13]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[29]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[13]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[29]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[13]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[29]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay13), - .TQ(soc_a7ddrphy_dq_t13) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_13 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed13), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data13[7]), - .Q2(soc_a7ddrphy_dq_i_data13[6]), - .Q3(soc_a7ddrphy_dq_i_data13[5]), - .Q4(soc_a7ddrphy_dq_i_data13[4]), - .Q5(soc_a7ddrphy_dq_i_data13[3]), - .Q6(soc_a7ddrphy_dq_i_data13[2]), - .Q7(soc_a7ddrphy_dq_i_data13[1]), - .Q8(soc_a7ddrphy_dq_i_data13[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_13 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay13), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed13) -); - -IOBUF IOBUF_13( - .I(soc_a7ddrphy_dq_o_nodelay13), - .T(soc_a7ddrphy_dq_t13), - .IO(ddram_dq[13]), - .O(soc_a7ddrphy_dq_i_nodelay13) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_43 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[14]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[30]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[14]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[30]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[14]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[30]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[14]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[30]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay14), - .TQ(soc_a7ddrphy_dq_t14) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_14 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed14), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data14[7]), - .Q2(soc_a7ddrphy_dq_i_data14[6]), - .Q3(soc_a7ddrphy_dq_i_data14[5]), - .Q4(soc_a7ddrphy_dq_i_data14[4]), - .Q5(soc_a7ddrphy_dq_i_data14[3]), - .Q6(soc_a7ddrphy_dq_i_data14[2]), - .Q7(soc_a7ddrphy_dq_i_data14[1]), - .Q8(soc_a7ddrphy_dq_i_data14[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_14 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay14), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed14) -); - -IOBUF IOBUF_14( - .I(soc_a7ddrphy_dq_o_nodelay14), - .T(soc_a7ddrphy_dq_t14), - .IO(ddram_dq[14]), - .O(soc_a7ddrphy_dq_i_nodelay14) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_44 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(soc_a7ddrphy_dfi_p0_wrdata[15]), - .D2(soc_a7ddrphy_dfi_p0_wrdata[31]), - .D3(soc_a7ddrphy_dfi_p1_wrdata[15]), - .D4(soc_a7ddrphy_dfi_p1_wrdata[31]), - .D5(soc_a7ddrphy_dfi_p2_wrdata[15]), - .D6(soc_a7ddrphy_dfi_p2_wrdata[31]), - .D7(soc_a7ddrphy_dfi_p3_wrdata[15]), - .D8(soc_a7ddrphy_dfi_p3_wrdata[31]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~soc_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(soc_a7ddrphy_dq_o_nodelay15), - .TQ(soc_a7ddrphy_dq_t15) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_15 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(soc_a7ddrphy_dq_i_delayed15), - .RST(sys_rst), - .Q1(soc_a7ddrphy_dq_i_data15[7]), - .Q2(soc_a7ddrphy_dq_i_data15[6]), - .Q3(soc_a7ddrphy_dq_i_data15[5]), - .Q4(soc_a7ddrphy_dq_i_data15[4]), - .Q5(soc_a7ddrphy_dq_i_data15[3]), - .Q6(soc_a7ddrphy_dq_i_data15[2]), - .Q7(soc_a7ddrphy_dq_i_data15[1]), - .Q8(soc_a7ddrphy_dq_i_data15[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_15 ( - .C(sys_clk), - .CE((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(soc_a7ddrphy_dq_i_nodelay15), - .INC(1'd1), - .LD((soc_a7ddrphy_dly_sel_storage[1] & soc_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(soc_a7ddrphy_dq_i_delayed15) -); - -IOBUF IOBUF_15( - .I(soc_a7ddrphy_dq_o_nodelay15), - .T(soc_a7ddrphy_dq_t15), - .IO(ddram_dq[15]), - .O(soc_a7ddrphy_dq_i_nodelay15) -); - -reg [23:0] storage_2[0:7]; -reg [23:0] memdat_5; -always @(posedge sys_clk) begin - if (soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we) - storage_2[soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; - memdat_5 <= storage_2[soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r = memdat_5; -assign soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r = storage_2[soc_netsoc_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_3[0:7]; -reg [23:0] memdat_6; -always @(posedge sys_clk) begin - if (soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we) - storage_3[soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; - memdat_6 <= storage_3[soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r = memdat_6; -assign soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r = storage_3[soc_netsoc_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_4[0:7]; -reg [23:0] memdat_7; -always @(posedge sys_clk) begin - if (soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we) - storage_4[soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; - memdat_7 <= storage_4[soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r = memdat_7; -assign soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r = storage_4[soc_netsoc_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_5[0:7]; -reg [23:0] memdat_8; -always @(posedge sys_clk) begin - if (soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we) - storage_5[soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; - memdat_8 <= storage_5[soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r = memdat_8; -assign soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r = storage_5[soc_netsoc_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_6[0:7]; -reg [23:0] memdat_9; -always @(posedge sys_clk) begin - if (soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we) - storage_6[soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; - memdat_9 <= storage_6[soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r = memdat_9; -assign soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r = storage_6[soc_netsoc_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_7[0:7]; -reg [23:0] memdat_10; -always @(posedge sys_clk) begin - if (soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we) - storage_7[soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; - memdat_10 <= storage_7[soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r = memdat_10; -assign soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r = storage_7[soc_netsoc_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_8[0:7]; -reg [23:0] memdat_11; -always @(posedge sys_clk) begin - if (soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we) - storage_8[soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; - memdat_11 <= storage_8[soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r = memdat_11; -assign soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r = storage_8[soc_netsoc_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_9[0:7]; -reg [23:0] memdat_12; -always @(posedge sys_clk) begin - if (soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we) - storage_9[soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr] <= soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; - memdat_12 <= storage_9[soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r = memdat_12; -assign soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r = storage_9[soc_netsoc_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] tag_mem[0:511]; -reg [8:0] memadr_3; -always @(posedge sys_clk) begin - if (soc_netsoc_tag_port_we) - tag_mem[soc_netsoc_tag_port_adr] <= soc_netsoc_tag_port_dat_w; - memadr_3 <= soc_netsoc_tag_port_adr; -end - -assign soc_netsoc_tag_port_dat_r = tag_mem[memadr_3]; - -assign eth_mdio = soc_data_oe ? soc_data_w : 1'bz; -assign soc_data_r = eth_mdio; - -reg [11:0] storage_10[0:4]; -reg [11:0] memdat_13; -always @(posedge eth_rx_clk) begin - if (soc_crc32_checker_syncfifo_wrport_we) - storage_10[soc_crc32_checker_syncfifo_wrport_adr] <= soc_crc32_checker_syncfifo_wrport_dat_w; - memdat_13 <= storage_10[soc_crc32_checker_syncfifo_wrport_adr]; -end - -always @(posedge eth_rx_clk) begin -end - -assign soc_crc32_checker_syncfifo_wrport_dat_r = memdat_13; -assign soc_crc32_checker_syncfifo_rdport_dat_r = storage_10[soc_crc32_checker_syncfifo_rdport_adr]; - -reg [41:0] storage_11[0:63]; -reg [5:0] memadr_4; -reg [5:0] memadr_5; -always @(posedge sys_clk) begin - if (soc_tx_cdc_wrport_we) - storage_11[soc_tx_cdc_wrport_adr] <= soc_tx_cdc_wrport_dat_w; - memadr_4 <= soc_tx_cdc_wrport_adr; -end - -always @(posedge eth_tx_clk) begin - memadr_5 <= soc_tx_cdc_rdport_adr; -end - -assign soc_tx_cdc_wrport_dat_r = storage_11[memadr_4]; -assign soc_tx_cdc_rdport_dat_r = storage_11[memadr_5]; - -reg [41:0] storage_12[0:63]; -reg [5:0] memadr_6; -reg [5:0] memadr_7; -always @(posedge eth_rx_clk) begin - if (soc_rx_cdc_wrport_we) - storage_12[soc_rx_cdc_wrport_adr] <= soc_rx_cdc_wrport_dat_w; - memadr_6 <= soc_rx_cdc_wrport_adr; -end - -always @(posedge sys_clk) begin - memadr_7 <= soc_rx_cdc_rdport_adr; -end - -assign soc_rx_cdc_wrport_dat_r = storage_12[memadr_6]; -assign soc_rx_cdc_rdport_dat_r = storage_12[memadr_7]; - -reg [34:0] storage_13[0:1]; -reg [34:0] memdat_14; -always @(posedge sys_clk) begin - if (soc_writer_fifo_wrport_we) - storage_13[soc_writer_fifo_wrport_adr] <= soc_writer_fifo_wrport_dat_w; - memdat_14 <= storage_13[soc_writer_fifo_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_writer_fifo_wrport_dat_r = memdat_14; -assign soc_writer_fifo_rdport_dat_r = storage_13[soc_writer_fifo_rdport_adr]; - -reg [31:0] mem_4[0:381]; -reg [8:0] memadr_8; -reg [31:0] memdat_15; -always @(posedge sys_clk) begin - if (soc_writer_memory0_we) - mem_4[soc_writer_memory0_adr] <= soc_writer_memory0_dat_w; - memadr_8 <= soc_writer_memory0_adr; -end - -always @(posedge sys_clk) begin - memdat_15 <= mem_4[soc_sram0_adr0]; -end - -assign soc_writer_memory0_dat_r = mem_4[memadr_8]; -assign soc_sram0_dat_r0 = memdat_15; - -reg [31:0] mem_5[0:381]; -reg [8:0] memadr_9; -reg [31:0] memdat_16; -always @(posedge sys_clk) begin - if (soc_writer_memory1_we) - mem_5[soc_writer_memory1_adr] <= soc_writer_memory1_dat_w; - memadr_9 <= soc_writer_memory1_adr; -end - -always @(posedge sys_clk) begin - memdat_16 <= mem_5[soc_sram1_adr0]; -end - -assign soc_writer_memory1_dat_r = mem_5[memadr_9]; -assign soc_sram1_dat_r0 = memdat_16; - -reg [13:0] storage_14[0:1]; -reg [13:0] memdat_17; -always @(posedge sys_clk) begin - if (soc_reader_fifo_wrport_we) - storage_14[soc_reader_fifo_wrport_adr] <= soc_reader_fifo_wrport_dat_w; - memdat_17 <= storage_14[soc_reader_fifo_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign soc_reader_fifo_wrport_dat_r = memdat_17; -assign soc_reader_fifo_rdport_dat_r = storage_14[soc_reader_fifo_rdport_adr]; - -reg [31:0] mem_6[0:381]; -reg [8:0] memadr_10; -reg [8:0] memadr_11; -always @(posedge sys_clk) begin - memadr_10 <= soc_reader_memory0_adr; -end - -always @(posedge sys_clk) begin - if (soc_sram0_we[0]) - mem_6[soc_sram0_adr1][7:0] <= soc_sram0_dat_w[7:0]; - if (soc_sram0_we[1]) - mem_6[soc_sram0_adr1][15:8] <= soc_sram0_dat_w[15:8]; - if (soc_sram0_we[2]) - mem_6[soc_sram0_adr1][23:16] <= soc_sram0_dat_w[23:16]; - if (soc_sram0_we[3]) - mem_6[soc_sram0_adr1][31:24] <= soc_sram0_dat_w[31:24]; - memadr_11 <= soc_sram0_adr1; -end - -assign soc_reader_memory0_dat_r = mem_6[memadr_10]; -assign soc_sram0_dat_r1 = mem_6[memadr_11]; - -reg [31:0] mem_7[0:381]; -reg [8:0] memadr_12; -reg [8:0] memadr_13; -always @(posedge sys_clk) begin - memadr_12 <= soc_reader_memory1_adr; -end - -always @(posedge sys_clk) begin - if (soc_sram1_we[0]) - mem_7[soc_sram1_adr1][7:0] <= soc_sram1_dat_w[7:0]; - if (soc_sram1_we[1]) - mem_7[soc_sram1_adr1][15:8] <= soc_sram1_dat_w[15:8]; - if (soc_sram1_we[2]) - mem_7[soc_sram1_adr1][23:16] <= soc_sram1_dat_w[23:16]; - if (soc_sram1_we[3]) - mem_7[soc_sram1_adr1][31:24] <= soc_sram1_dat_w[31:24]; - memadr_13 <= soc_sram1_adr1; -end - -assign soc_reader_memory1_dat_r = mem_7[memadr_12]; -assign soc_sram1_dat_r1 = mem_7[memadr_13]; - -VexRiscv VexRiscv( - .clk(sys_clk), - .dBusWishbone_ACK(soc_netsoc_cpu_dbus_ack), - .dBusWishbone_DAT_MISO(soc_netsoc_cpu_dbus_dat_r), - .dBusWishbone_ERR(soc_netsoc_cpu_dbus_err), - .externalInterruptArray(soc_netsoc_cpu_interrupt0), - .externalResetVector(1'd0), - .iBusWishbone_ACK(soc_netsoc_cpu_ibus_ack), - .iBusWishbone_DAT_MISO(soc_netsoc_cpu_ibus_dat_r), - .iBusWishbone_ERR(soc_netsoc_cpu_ibus_err), - .reset((sys_rst | soc_netsoc_cpu_reset)), - .softwareInterrupt(1'd0), - .timerInterrupt(soc_netsoc_cpu_interrupt1), - .dBusWishbone_ADR(soc_netsoc_cpu_dbus_adr), - .dBusWishbone_BTE(soc_netsoc_cpu_dbus_bte), - .dBusWishbone_CTI(soc_netsoc_cpu_dbus_cti), - .dBusWishbone_CYC(soc_netsoc_cpu_dbus_cyc), - .dBusWishbone_DAT_MOSI(soc_netsoc_cpu_dbus_dat_w), - .dBusWishbone_SEL(soc_netsoc_cpu_dbus_sel), - .dBusWishbone_STB(soc_netsoc_cpu_dbus_stb), - .dBusWishbone_WE(soc_netsoc_cpu_dbus_we), - .iBusWishbone_ADR(soc_netsoc_cpu_ibus_adr), - .iBusWishbone_BTE(soc_netsoc_cpu_ibus_bte), - .iBusWishbone_CTI(soc_netsoc_cpu_ibus_cti), - .iBusWishbone_CYC(soc_netsoc_cpu_ibus_cyc), - .iBusWishbone_DAT_MOSI(soc_netsoc_cpu_ibus_dat_w), - .iBusWishbone_SEL(soc_netsoc_cpu_ibus_sel), - .iBusWishbone_STB(soc_netsoc_cpu_ibus_stb), - .iBusWishbone_WE(soc_netsoc_cpu_ibus_we) -); - -reg [7:0] data_mem_grain0[0:511]; -reg [8:0] memadr_14; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[0]) - data_mem_grain0[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[7:0]; - memadr_14 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[7:0] = data_mem_grain0[memadr_14]; - -reg [7:0] data_mem_grain1[0:511]; -reg [8:0] memadr_15; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[1]) - data_mem_grain1[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[15:8]; - memadr_15 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[15:8] = data_mem_grain1[memadr_15]; - -reg [7:0] data_mem_grain2[0:511]; -reg [8:0] memadr_16; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[2]) - data_mem_grain2[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[23:16]; - memadr_16 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[23:16] = data_mem_grain2[memadr_16]; - -reg [7:0] data_mem_grain3[0:511]; -reg [8:0] memadr_17; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[3]) - data_mem_grain3[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[31:24]; - memadr_17 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[31:24] = data_mem_grain3[memadr_17]; - -reg [7:0] data_mem_grain4[0:511]; -reg [8:0] memadr_18; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[4]) - data_mem_grain4[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[39:32]; - memadr_18 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[39:32] = data_mem_grain4[memadr_18]; - -reg [7:0] data_mem_grain5[0:511]; -reg [8:0] memadr_19; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[5]) - data_mem_grain5[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[47:40]; - memadr_19 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[47:40] = data_mem_grain5[memadr_19]; - -reg [7:0] data_mem_grain6[0:511]; -reg [8:0] memadr_20; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[6]) - data_mem_grain6[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[55:48]; - memadr_20 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[55:48] = data_mem_grain6[memadr_20]; - -reg [7:0] data_mem_grain7[0:511]; -reg [8:0] memadr_21; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[7]) - data_mem_grain7[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[63:56]; - memadr_21 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[63:56] = data_mem_grain7[memadr_21]; - -reg [7:0] data_mem_grain8[0:511]; -reg [8:0] memadr_22; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[8]) - data_mem_grain8[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[71:64]; - memadr_22 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[71:64] = data_mem_grain8[memadr_22]; - -reg [7:0] data_mem_grain9[0:511]; -reg [8:0] memadr_23; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[9]) - data_mem_grain9[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[79:72]; - memadr_23 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[79:72] = data_mem_grain9[memadr_23]; - -reg [7:0] data_mem_grain10[0:511]; -reg [8:0] memadr_24; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[10]) - data_mem_grain10[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[87:80]; - memadr_24 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[87:80] = data_mem_grain10[memadr_24]; - -reg [7:0] data_mem_grain11[0:511]; -reg [8:0] memadr_25; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[11]) - data_mem_grain11[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[95:88]; - memadr_25 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[95:88] = data_mem_grain11[memadr_25]; - -reg [7:0] data_mem_grain12[0:511]; -reg [8:0] memadr_26; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[12]) - data_mem_grain12[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[103:96]; - memadr_26 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[103:96] = data_mem_grain12[memadr_26]; - -reg [7:0] data_mem_grain13[0:511]; -reg [8:0] memadr_27; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[13]) - data_mem_grain13[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[111:104]; - memadr_27 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[111:104] = data_mem_grain13[memadr_27]; - -reg [7:0] data_mem_grain14[0:511]; -reg [8:0] memadr_28; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[14]) - data_mem_grain14[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[119:112]; - memadr_28 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[119:112] = data_mem_grain14[memadr_28]; - -reg [7:0] data_mem_grain15[0:511]; -reg [8:0] memadr_29; -always @(posedge sys_clk) begin - if (soc_netsoc_data_port_we[15]) - data_mem_grain15[soc_netsoc_data_port_adr] <= soc_netsoc_data_port_dat_w[127:120]; - memadr_29 <= soc_netsoc_data_port_adr; -end - -assign soc_netsoc_data_port_dat_r[127:120] = data_mem_grain15[memadr_29]; - -(* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE ( - .C(sys_clk), - .CE(1'd1), - .D(1'd0), - .PRE(vns_xilinxasyncresetsynchronizerimpl0), - .Q(vns_xilinxasyncresetsynchronizerimpl0_rst_meta) -); - -(* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_1 ( - .C(sys_clk), - .CE(1'd1), - .D(vns_xilinxasyncresetsynchronizerimpl0_rst_meta), - .PRE(vns_xilinxasyncresetsynchronizerimpl0), - .Q(sys_rst) -); - -(* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_2 ( - .C(clk200_clk), - .CE(1'd1), - .D(1'd0), - .PRE(vns_xilinxasyncresetsynchronizerimpl1), - .Q(vns_xilinxasyncresetsynchronizerimpl1_rst_meta) -); - -(* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_3 ( - .C(clk200_clk), - .CE(1'd1), - .D(vns_xilinxasyncresetsynchronizerimpl1_rst_meta), - .PRE(vns_xilinxasyncresetsynchronizerimpl1), - .Q(clk200_rst) -); - -(* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_4 ( - .C(eth_tx_clk), - .CE(1'd1), - .D(1'd0), - .PRE(soc_reset0), - .Q(vns_xilinxasyncresetsynchronizerimpl2_rst_meta) -); - -(* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_5 ( - .C(eth_tx_clk), - .CE(1'd1), - .D(vns_xilinxasyncresetsynchronizerimpl2_rst_meta), - .PRE(soc_reset0), - .Q(eth_tx_rst) -); - -(* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_6 ( - .C(eth_rx_clk), - .CE(1'd1), - .D(1'd0), - .PRE(soc_reset0), - .Q(vns_xilinxasyncresetsynchronizerimpl3_rst_meta) -); - -(* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_7 ( - .C(eth_rx_clk), - .CE(1'd1), - .D(vns_xilinxasyncresetsynchronizerimpl3_rst_meta), - .PRE(soc_reset0), - .Q(eth_rx_rst) -); - -endmodule diff --git a/sdc-plugin/tests/base_litex/base_litex.xdc b/sdc-plugin/tests/base_litex/base_litex.xdc deleted file mode 100644 index 0fd7ee993..000000000 --- a/sdc-plugin/tests/base_litex/base_litex.xdc +++ /dev/null @@ -1,273 +0,0 @@ -### serial:0.tx -set_property LOC D10 [get_ports serial_tx] -set_property IOSTANDARD LVCMOS33 [get_ports serial_tx] -### serial:0.rx -set_property LOC A9 [get_ports serial_rx] -set_property IOSTANDARD LVCMOS33 [get_ports serial_rx] -### clk100:0 -set_property LOC E3 [get_ports clk100] -set_property IOSTANDARD LVCMOS33 [get_ports clk100] -### eth_ref_clk:0 -set_property LOC G18 [get_ports eth_ref_clk] -set_property IOSTANDARD LVCMOS33 [get_ports eth_ref_clk] -### cpu_reset:0 -set_property LOC C2 [get_ports cpu_reset] -set_property IOSTANDARD LVCMOS33 [get_ports cpu_reset] -### ddram:0.a -set_property LOC R2 [get_ports {ddram_a[0]} ] -set_property SLEW FAST [get_ports {ddram_a[0]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[0]} ] -### ddram:0.a -set_property LOC M6 [get_ports {ddram_a[1]} ] -set_property SLEW FAST [get_ports {ddram_a[1]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[1]} ] -### ddram:0.a -set_property LOC N4 [get_ports {ddram_a[2]} ] -set_property SLEW FAST [get_ports {ddram_a[2]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[2]} ] -### ddram:0.a -set_property LOC T1 [get_ports {ddram_a[3]} ] -set_property SLEW FAST [get_ports {ddram_a[3]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[3]} ] -### ddram:0.a -set_property LOC N6 [get_ports {ddram_a[4]} ] -set_property SLEW FAST [get_ports {ddram_a[4]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[4]} ] -### ddram:0.a -set_property LOC R7 [get_ports {ddram_a[5]} ] -set_property SLEW FAST [get_ports {ddram_a[5]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[5]} ] -### ddram:0.a -set_property LOC V6 [get_ports {ddram_a[6]} ] -set_property SLEW FAST [get_ports {ddram_a[6]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[6]} ] -### ddram:0.a -set_property LOC U7 [get_ports {ddram_a[7]} ] -set_property SLEW FAST [get_ports {ddram_a[7]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[7]} ] -### ddram:0.a -set_property LOC R8 [get_ports {ddram_a[8]} ] -set_property SLEW FAST [get_ports {ddram_a[8]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[8]} ] -### ddram:0.a -set_property LOC V7 [get_ports {ddram_a[9]} ] -set_property SLEW FAST [get_ports {ddram_a[9]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[9]} ] -### ddram:0.a -set_property LOC R6 [get_ports {ddram_a[10]} ] -set_property SLEW FAST [get_ports {ddram_a[10]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[10]} ] -### ddram:0.a -set_property LOC U6 [get_ports {ddram_a[11]} ] -set_property SLEW FAST [get_ports {ddram_a[11]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[11]} ] -### ddram:0.a -set_property LOC T6 [get_ports {ddram_a[12]} ] -set_property SLEW FAST [get_ports {ddram_a[12]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[12]} ] -### ddram:0.a -set_property LOC T8 [get_ports {ddram_a[13]} ] -set_property SLEW FAST [get_ports {ddram_a[13]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_a[13]} ] -### ddram:0.ba -set_property LOC R1 [get_ports {ddram_ba[0]} ] -set_property SLEW FAST [get_ports {ddram_ba[0]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_ba[0]} ] -### ddram:0.ba -set_property LOC P4 [get_ports {ddram_ba[1]} ] -set_property SLEW FAST [get_ports {ddram_ba[1]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_ba[1]} ] -### ddram:0.ba -set_property LOC P2 [get_ports {ddram_ba[2]} ] -set_property SLEW FAST [get_ports {ddram_ba[2]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_ba[2]} ] -### ddram:0.ras_n -set_property LOC P3 [get_ports ddram_ras_n] -set_property SLEW FAST [get_ports ddram_ras_n] -set_property IOSTANDARD SSTL135 [get_ports ddram_ras_n] -### ddram:0.cas_n -set_property LOC M4 [get_ports ddram_cas_n] -set_property SLEW FAST [get_ports ddram_cas_n] -set_property IOSTANDARD SSTL135 [get_ports ddram_cas_n] -### ddram:0.we_n -set_property LOC P5 [get_ports ddram_we_n] -set_property SLEW FAST [get_ports ddram_we_n] -set_property IOSTANDARD SSTL135 [get_ports ddram_we_n] -### ddram:0.cs_n -set_property LOC U8 [get_ports ddram_cs_n] -set_property SLEW FAST [get_ports ddram_cs_n] -set_property IOSTANDARD SSTL135 [get_ports ddram_cs_n] -### ddram:0.dm -set_property LOC L1 [get_ports {ddram_dm[0]} ] -set_property SLEW FAST [get_ports {ddram_dm[0]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dm[0]} ] -### ddram:0.dm -set_property LOC U1 [get_ports {ddram_dm[1]} ] -set_property SLEW FAST [get_ports {ddram_dm[1]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dm[1]} ] -### ddram:0.dq -set_property LOC K5 [get_ports {ddram_dq[0]} ] -set_property SLEW FAST [get_ports {ddram_dq[0]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[0]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[0]} ] -### ddram:0.dq -set_property LOC L3 [get_ports {ddram_dq[1]} ] -set_property SLEW FAST [get_ports {ddram_dq[1]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[1]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[1]} ] -### ddram:0.dq -set_property LOC K3 [get_ports {ddram_dq[2]} ] -set_property SLEW FAST [get_ports {ddram_dq[2]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[2]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[2]} ] -### ddram:0.dq -set_property LOC L6 [get_ports {ddram_dq[3]} ] -set_property SLEW FAST [get_ports {ddram_dq[3]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[3]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[3]} ] -### ddram:0.dq -set_property LOC M3 [get_ports {ddram_dq[4]} ] -set_property SLEW FAST [get_ports {ddram_dq[4]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[4]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[4]} ] -### ddram:0.dq -set_property LOC M1 [get_ports {ddram_dq[5]} ] -set_property SLEW FAST [get_ports {ddram_dq[5]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[5]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[5]} ] -### ddram:0.dq -set_property LOC L4 [get_ports {ddram_dq[6]} ] -set_property SLEW FAST [get_ports {ddram_dq[6]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[6]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[6]} ] -### ddram:0.dq -set_property LOC M2 [get_ports {ddram_dq[7]} ] -set_property SLEW FAST [get_ports {ddram_dq[7]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[7]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[7]} ] -### ddram:0.dq -set_property LOC V4 [get_ports {ddram_dq[8]} ] -set_property SLEW FAST [get_ports {ddram_dq[8]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[8]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[8]} ] -### ddram:0.dq -set_property LOC T5 [get_ports {ddram_dq[9]} ] -set_property SLEW FAST [get_ports {ddram_dq[9]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[9]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[9]} ] -### ddram:0.dq -set_property LOC U4 [get_ports {ddram_dq[10]} ] -set_property SLEW FAST [get_ports {ddram_dq[10]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[10]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[10]} ] -### ddram:0.dq -set_property LOC V5 [get_ports {ddram_dq[11]} ] -set_property SLEW FAST [get_ports {ddram_dq[11]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[11]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[11]} ] -### ddram:0.dq -set_property LOC V1 [get_ports {ddram_dq[12]} ] -set_property SLEW FAST [get_ports {ddram_dq[12]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[12]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[12]} ] -### ddram:0.dq -set_property LOC T3 [get_ports {ddram_dq[13]} ] -set_property SLEW FAST [get_ports {ddram_dq[13]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[13]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[13]} ] -### ddram:0.dq -set_property LOC U3 [get_ports {ddram_dq[14]} ] -set_property SLEW FAST [get_ports {ddram_dq[14]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[14]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[14]} ] -### ddram:0.dq -set_property LOC R3 [get_ports {ddram_dq[15]} ] -set_property SLEW FAST [get_ports {ddram_dq[15]} ] -set_property IOSTANDARD SSTL135 [get_ports {ddram_dq[15]} ] -set_property IN_TERM UNTUNED_SPLIT_40 [get_ports {ddram_dq[15]} ] -### ddram:0.dqs_p -set_property LOC N2 [get_ports {ddram_dqs_p[0]} ] -set_property SLEW FAST [get_ports {ddram_dqs_p[0]} ] -set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_p[0]} ] -### ddram:0.dqs_p -set_property LOC U2 [get_ports {ddram_dqs_p[1]} ] -set_property SLEW FAST [get_ports {ddram_dqs_p[1]} ] -set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_p[1]} ] -### ddram:0.dqs_n -set_property LOC N1 [get_ports {ddram_dqs_n[0]} ] -set_property SLEW FAST [get_ports {ddram_dqs_n[0]} ] -set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_n[0]} ] -### ddram:0.dqs_n -set_property LOC V2 [get_ports {ddram_dqs_n[1]} ] -set_property SLEW FAST [get_ports {ddram_dqs_n[1]} ] -set_property IOSTANDARD DIFF_SSTL135 [get_ports {ddram_dqs_n[1]} ] -### ddram:0.clk_p -set_property LOC U9 [get_ports ddram_clk_p] -set_property SLEW FAST [get_ports ddram_clk_p] -set_property IOSTANDARD DIFF_SSTL135 [get_ports ddram_clk_p] -### ddram:0.clk_n -set_property LOC V9 [get_ports ddram_clk_n] -set_property SLEW FAST [get_ports ddram_clk_n] -set_property IOSTANDARD DIFF_SSTL135 [get_ports ddram_clk_n] -### ddram:0.cke -set_property LOC N5 [get_ports ddram_cke] -set_property SLEW FAST [get_ports ddram_cke] -set_property IOSTANDARD SSTL135 [get_ports ddram_cke] -### ddram:0.odt -set_property LOC R5 [get_ports ddram_odt] -set_property SLEW FAST [get_ports ddram_odt] -set_property IOSTANDARD SSTL135 [get_ports ddram_odt] -### ddram:0.reset_n -set_property LOC K6 [get_ports ddram_reset_n] -set_property SLEW FAST [get_ports ddram_reset_n] -set_property IOSTANDARD SSTL135 [get_ports ddram_reset_n] -### eth:0.rst_n -set_property LOC C16 [get_ports eth_rst_n] -set_property IOSTANDARD LVCMOS33 [get_ports eth_rst_n] -### eth:0.mdio -set_property LOC K13 [get_ports eth_mdio] -set_property IOSTANDARD LVCMOS33 [get_ports eth_mdio] -### eth:0.mdc -set_property LOC F16 [get_ports eth_mdc] -set_property IOSTANDARD LVCMOS33 [get_ports eth_mdc] -### eth:0.rx_dv -set_property LOC G16 [get_ports eth_rx_dv] -set_property IOSTANDARD LVCMOS33 [get_ports eth_rx_dv] -### eth:0.rx_er -set_property LOC C17 [get_ports eth_rx_er] -set_property IOSTANDARD LVCMOS33 [get_ports eth_rx_er] -### eth:0.rx_data -set_property LOC D18 [get_ports {eth_rx_data[0]}] -set_property IOSTANDARD LVCMOS33 [get_ports {eth_rx_data[0]}] -### eth:0.rx_data -set_property LOC E17 [get_ports {eth_rx_data[1]}] -set_property IOSTANDARD LVCMOS33 [get_ports {eth_rx_data[1]}] -### eth:0.rx_data -set_property LOC E18 [get_ports {eth_rx_data[2]}] -set_property IOSTANDARD LVCMOS33 [get_ports {eth_rx_data[2]}] -### eth:0.rx_data -set_property LOC G17 [get_ports {eth_rx_data[3]}] -set_property IOSTANDARD LVCMOS33 [get_ports {eth_rx_data[3]}] -### eth:0.tx_en -set_property LOC H15 [get_ports eth_tx_en] -set_property IOSTANDARD LVCMOS33 [get_ports eth_tx_en] -### eth:0.tx_data -set_property LOC H14 [get_ports {eth_tx_data[0]}] -set_property IOSTANDARD LVCMOS33 [get_ports {eth_tx_data[0]}] -### eth:0.tx_data -set_property LOC J14 [get_ports {eth_tx_data[1]}] -set_property IOSTANDARD LVCMOS33 [get_ports {eth_tx_data[1]}] -### eth:0.tx_data -set_property LOC J13 [get_ports {eth_tx_data[2]}] -set_property IOSTANDARD LVCMOS33 [get_ports {eth_tx_data[2]}] -### eth:0.tx_data -set_property LOC H17 [get_ports {eth_tx_data[3]}] -set_property IOSTANDARD LVCMOS33 [get_ports {eth_tx_data[3]}] -### eth:0.col -set_property LOC D17 [get_ports eth_col] -set_property IOSTANDARD LVCMOS33 [get_ports eth_col] -### eth:0.crs -set_property LOC G14 [get_ports eth_crs] -set_property IOSTANDARD LVCMOS33 [get_ports eth_crs] - -set_property INTERNAL_VREF 0.750 [get_iobanks 34] diff --git a/sdc-plugin/tests/base_litex/mem.init b/sdc-plugin/tests/base_litex/mem.init deleted file mode 100644 index ec98d9878..000000000 --- a/sdc-plugin/tests/base_litex/mem.init +++ /dev/null @@ -1,6479 +0,0 @@ -b00006f -13 -13 -13 -13 -13 -13 -13 -fe112e23 -fe512c23 -fe612a23 -fe712823 -fea12623 -feb12423 -fec12223 -fed12023 -fce12e23 -fcf12c23 -fd012a23 -fd112823 -fdc12623 -fdd12423 -fde12223 -fdf12023 -fc010113 -94000ef -3c12083 -3812283 -3412303 -3012383 -2c12503 -2812583 -2412603 -2012683 -1c12703 -1812783 -1412803 -1012883 -c12e03 -812e83 -412f03 -12f83 -4010113 -30200073 -10008117 -f4c10113 -517 -f6850513 -30551073 -10000517 -f3c50513 -10000597 -ac58593 -b50863 -52023 -450513 -ff5ff06f -1537 -88050513 -30451073 -b8010ef -6f -fc002773 -bc0027f3 -e7f7b3 -17f793 -78463 -36c0406f -8067 -13 -fff50513 -fe051ce3 -8067 -100713 -f00067b7 -a71533 -80a7a623 -80e7a823 -8007a623 -8067 -100713 -f00067b7 -a71533 -80a7a623 -80e7aa23 -8007a623 -8067 -fb010113 -4812423 -50413 -5537 -e5050513 -4912223 -3512a23 -4112623 -5212023 -3312e23 -3412c23 -3612823 -3712623 -3812423 -3912223 -3a12023 -220040ef -1010493 -196637 -3c6ef5b7 -2010513 -48693 -2a00793 -48a93 -60d60613 -35f58593 -400813 -713 -2c787b3 -e688b3 -170713 -b787b3 -f88023 -ff0716e3 -468693 -fed510e3 -f00047b7 -7a623 -7a823 -7aa23 -900713 -e7a223 -100713 -e7a423 -f00513 -f05ff0ef -5b37 -793 -e30b0b13 -1000693 -fb0733 -72703 -4c603 -478793 -448493 -c72023 -ffd4c603 -c72223 -ffe4c603 -c72423 -fff4c603 -c72623 -fcd798e3 -f00047b7 -a07a423 -a07a623 -a07a823 -1700713 -ae7a023 -100713 -ae7a223 -607aa23 -607ac23 -607ae23 -40513 -e9dff0ef -100c93 -c10793 -408c8c33 -18789b3 -2010793 -5a37 -408784b3 -913 -e40a0a13 -348493 -f00047b7 -2500713 -6e7a623 -797a823 -f00513 -e4dff0ef -18a8bb3 -b8713 -793 -100613 -10b0513 -1000593 -f506b3 -6a683 -6a803 -1010623 -46a803 -10106a3 -86a803 -c6a683 -1010723 -d107a3 -74803 -9c683 -d81863 -274803 -fec4c683 -d80463 -613 -478793 -470713 -fab79ae3 -190d13 -2061063 -2000793 -fd0a63 -40513 -df9ff0ef -d0913 -f65ff06f -2000913 -40513 -de5ff0ef -2010793 -f0004c37 -40878b33 -190493 -70c0c93 -100d13 -3b0b13 -2500793 -6fc2623 -1aca023 -f00513 -d89ff0ef -793 -100693 -1000613 -fa0733 -72703 -72583 -b10623 -472583 -b106a3 -872583 -c72703 -b10723 -e107a3 -fb8733 -74583 -9c703 -e59c63 -40878733 -ea8733 -374583 -fecb4703 -e58463 -693 -478793 -fac796e3 -68e63 -148493 -1f00793 -97c863 -40513 -d39ff0ef -f71ff06f -9909b3 -2000793 -4019d993 -6f91e63 -5537 -e5c50513 -795030ef -40513 -cf5ff0ef -493 -934c063 -f00047b7 -7a623 -7a823 -7aa23 -b00713 -4812403 -e7a223 -4c12083 -4412483 -4012903 -3c12983 -3812a03 -3412a83 -3012b03 -2c12b83 -2812c03 -2412c83 -2012d03 -100713 -e7a423 -f00513 -5010113 -c81ff06f -412484b3 -200613 -2c4c633 -5537 -98593 -e6050513 -70d030ef -f79ff06f -40513 -c85ff0ef -148493 -f75ff06f -f00047b7 -e00713 -5537 -e7a023 -e6c50513 -6e10306f -f00047b7 -100713 -5537 -e7a023 -e9050513 -6c90306f -fd010113 -2112623 -54783 -4079263 -f00047b7 -7a623 -7a823 -7aa23 -b00713 -e7a223 -100713 -f00513 -e7a423 -be9ff0ef -5537 -eb450513 -685030ef -2c12083 -3010113 -8067 -613 -1c10593 -4f8030ef -1c12783 -7c783 -78863 -5537 -ec050513 -fd1ff06f -1051713 -1075713 -f00047b7 -875713 -e7a623 -1051713 -a12623 -1075713 -e7a823 -7aa23 -900713 -e7a223 -100713 -e7a423 -f00513 -b6dff0ef -c12583 -5537 -ed050513 -605030ef -f81ff06f -fd010113 -2112623 -2812423 -2912223 -3212023 -1312e23 -1412c23 -1512a23 -1612823 -a054263 -100913 -40a90933 -200a13 -57b7 -e3078793 -1078993 -2078413 -5ab7 -300b13 -9a783 -90493 -7a703 -e10623 -47a703 -e106a3 -87a703 -c7a783 -e10723 -f107a3 -c10793 -9787b3 -7c583 -ee4a8513 -14484b3 -575030ef -fe9b54e3 -498993 -fb341ce3 -2812403 -2c12083 -2412483 -2012903 -1c12983 -1812a03 -1412a83 -1012b03 -6537 -87450513 -3010113 -5390306f -100a13 -913 -f65ff06f -fe010113 -112e23 -812c23 -912a23 -54783 -2079263 -5537 -eec50513 -509030ef -1c12083 -1812403 -1412483 -2010113 -8067 -58493 -613 -c10593 -370030ef -c12783 -50413 -7c783 -78863 -5537 -f0050513 -fc1ff06f -4c783 -2078863 -48513 -613 -c10593 -33c030ef -c12783 -50493 -7c783 -78a63 -5537 -f1450513 -f8dff06f -fff00493 -1041713 -1075713 -f00047b7 -875713 -1041413 -6e7aa23 -1045413 -687ac23 -607ae23 -2500713 -6e7a623 -100713 -6e7a823 -f00513 -9adff0ef -48513 -e51ff0ef -f45ff06f -fa010113 -4112e23 -4812c23 -4912a23 -5212823 -5312623 -5412423 -5512223 -5612023 -3712e23 -3812c23 -3912a23 -3a12823 -54783 -4079463 -5537 -f2450513 -401030ef -5c12083 -5812403 -5412483 -5012903 -4c12983 -4812a03 -4412a83 -4012b03 -3c12b83 -3812c03 -3412c83 -3012d03 -6010113 -8067 -613 -c10593 -248030ef -c12783 -50b13 -7c783 -78863 -5537 -f3850513 -fa1ff06f -3010713 -2010793 -78023 -780a3 -78123 -781a3 -478793 -fee796e3 -f0004437 -54b7 -5937 -c93 -6c40993 -2500b93 -2500c13 -100a13 -e4048493 -1000a93 -e4090913 -6042a23 -7942c23 -6042e23 -189a023 -7442823 -f00513 -891ff0ef -1010793 -713 -e486b3 -6a683 -470713 -478793 -6a603 -fec78e23 -46a603 -fec78ea3 -86a603 -c6a683 -fec78f23 -fed78fa3 -fd5718e3 -d13 -96d4663 -8c8c93 -8000793 -f8fc9ce3 -413 -5937 -1000493 -2010793 -8787b3 -7c583 -ee490513 -140413 -2c5030ef -fe9414e3 -6437 -87440513 -2b5030ef -400913 -54b7 -100593 -f4c48513 -2a1030ef -593 -f4c48513 -295030ef -100593 -f4c48513 -289030ef -593 -f4c48513 -fff90913 -279030ef -fc0916e3 -87440513 -e6dff06f -179a023 -7442823 -f00513 -fb4ff0ef -793 -f90733 -72703 -2010693 -f685b3 -1010693 -f68633 -1070813 -72503 -64683 -5c883 -ff57513 -d546b3 -116e6b3 -d58023 -a60023 -470713 -158593 -160613 -fd071ae3 -478793 -fb5798e3 -1d0d13 -f09ff06f -fe010113 -112e23 -54783 -79e63 -5537 -f5050513 -1e1030ef -1c12083 -2010113 -8067 -613 -c10593 -54030ef -c12783 -7c783 -8079263 -5737 -e3070713 -4000593 -72683 -178613 -ff67613 -f6a023 -c6a223 -278613 -ff67613 -c6a423 -378613 -ff67613 -1078793 -c6a623 -ff7f793 -470713 -fcb794e3 -1051713 -1075713 -f00047b7 -875713 -1051513 -ae7a423 -1055513 -aa7a623 -a07a823 -1700713 -ae7a023 -100713 -ae7a223 -f61ff06f -5537 -f0050513 -f51ff06f -ff010113 -c00007b7 -aaaab737 -112623 -812423 -912223 -aaa70713 -20078693 -e7a023 -478793 -fed79ce3 -159030ef -181030ef -c00007b7 -aaaab737 -413 -aaa70713 -20078693 -7a603 -e60463 -140413 -478793 -fed798e3 -c00007b7 -55555737 -55570713 -20078693 -e7a023 -478793 -fed79ce3 -10d030ef -135030ef -c00007b7 -55555737 -55570713 -20078693 -7a603 -e60463 -140413 -478793 -fed798e3 -40c63 -5537 -10000613 -40593 -f6450513 -75030ef -196637 -3c6ef6b7 -c0000737 -793 -60d60613 -35f68693 -c02005b7 -2c787b3 -470713 -d787b3 -fef72e23 -feb718e3 -99030ef -c1030ef -1966b7 -3c6ef637 -c0000737 -493 -793 -60d68693 -35f60613 -c02005b7 -2d787b3 -72503 -c787b3 -a78463 -148493 -470713 -feb714e3 -48c63 -5537 -80637 -48593 -f8850513 -7e8030ef -c00006b7 -793 -468693 -2637 -279713 -d70733 -f72023 -178793 -fec798e3 -19030ef -41030ef -c0000737 -106b7 -593 -793 -470713 -fff68693 -2537 -279613 -e60633 -62603 -d67633 -f60463 -158593 -178793 -fea792e3 -2058863 -5537 -2637 -fac50513 -76c030ef -593 -c12083 -812403 -412483 -58513 -1010113 -8067 -940433 -fe0412e3 -5537 -fd050513 -73c030ef -100593 -fd1ff06f -f9010113 -6112623 -6812423 -6912223 -5312e23 -5412c23 -5712623 -5912223 -7212023 -5512a23 -5612823 -5812423 -5a12023 -3b12e23 -805ff0ef -f0006437 -100493 -513 -c50ff0ef -80942623 -80942c23 -80042623 -100513 -c3cff0ef -200793 -80f42623 -80942c23 -5537 -80042623 -fdc50513 -6b8030ef -1967b7 -60d78793 -5a37 -1c10993 -2110b93 -413 -f12223 -e30a0a13 -6cb7 -3c6ef7b7 -100913 -35f78793 -891933 -b13 -c13 -493 -f12423 -2c0006f -48b13 -a8c13 -700793 -20f48863 -f00067b7 -8127a623 -100713 -80e7ae23 -8007a623 -148493 -2010a93 -3010613 -a8693 -2a00793 -400593 -713 -412503 -2a787b3 -812503 -a787b3 -e68533 -f50023 -170713 -feb712e3 -468693 -fcd61ce3 -f00047b7 -7a623 -7a823 -7aa23 -900713 -e7a223 -100713 -e7a423 -f00513 -b38ff0ef -793 -1000693 -fa0733 -72703 -ac603 -478793 -4a8a93 -c72023 -ffdac603 -c72223 -ffeac603 -c72423 -fffac603 -c72623 -fcd798e3 -f00047b7 -a07a423 -a07a623 -a07a823 -1700713 -ae7a023 -100713 -ae7a223 -607aa23 -607ac23 -5537 -607ae23 -48613 -40593 -fec50513 -564030ef -40513 -ac4ff0ef -2000d93 -a93 -f0004d37 -2500793 -6fd2623 -100713 -f00047b7 -6e7a823 -f00513 -a8cff0ef -b8713 -693 -100793 -5637 -e4060613 -d60633 -62603 -62583 -b10e23 -462583 -b10ea3 -862583 -c62603 -b10f23 -c10fa3 -74583 -19c603 -c59863 -274583 -39c603 -c58463 -793 -468693 -1000613 -470713 -fac694e3 -78593 -f12623 -57b7 -ff878513 -4b8030ef -c12783 -40513 -fffd8d93 -fa8ab3 -a28ff0ef -f40d9ae3 -5537 -ffc50513 -494030ef -f00047b7 -7a623 -7a823 -7aa23 -b00713 -e7a223 -100713 -e7a423 -f00513 -9c4ff0ef -40513 -a04ff0ef -874c8513 -45c030ef -df5c46e3 -df1ff06f -5537 -b0613 -40593 -50513 -440030ef -f00067b7 -8127a623 -100713 -80e7ac23 -8007a623 -f0006737 -793 -100693 -3679463 -40513 -9b4ff0ef -874c8513 -40c030ef -fff98993 -fffb8b93 -2041063 -100413 -d69ff06f -81272623 -80d72e23 -80072623 -178793 -fc9ff06f -6c12083 -6812403 -6412483 -6012903 -5c12983 -5812a03 -5412a83 -5012b03 -4c12b83 -4812c03 -4412c83 -4012d03 -3c12d83 -100513 -7010113 -8067 -ff010113 -5537 -812423 -1050513 -f0004437 -112623 -912223 -1212023 -380030ef -42623 -42823 -42a23 -c00793 -c537 -f42023 -35050513 -8b8ff0ef -42623 -42823 -42a23 -e00793 -2537 -f42023 -71050513 -898ff0ef -200793 -f42623 -20000713 -e42823 -f42a23 -f00793 -f42223 -100493 -942423 -42623 -42823 -300913 -1242a23 -f42223 -942423 -42623 -600713 -e42823 -942a23 -f42223 -942423 -900713 -e42623 -1737 -92070713 -e42823 -42a23 -f42223 -942423 -c800513 -81cff0ef -400793 -f42623 -40000793 -f42823 -42a23 -1242223 -942423 -c800513 -ff9fe0ef -b6dff0ef -bbcff0ef -969ff0ef -c12083 -812403 -412483 -12903 -a03533 -1010113 -8067 -ff010113 -812423 -50413 -52503 -2000593 -112623 -912223 -508020ef -2051863 -42483 -48513 -694020ef -a48533 -a42023 -c12083 -812403 -48513 -412483 -1010113 -8067 -50023 -42483 -150513 -fd9ff06f -e7010113 -18112623 -18812423 -18912223 -19212023 -17312e23 -17412c23 -17512a23 -17612823 -17712623 -17812423 -17912223 -17a12023 -15b12e23 -793 -bc079073 -30046073 -64b7 -444030ef -87448513 -1c4030ef -5537 -2850513 -1b8030ef -5537 -5050513 -1ac030ef -5537 -7850513 -1a0030ef -5537 -9c50513 -194030ef -87448513 -18c030ef -5537 -c050513 -180030ef -87448513 -178030ef -5537 -e850513 -16c030ef -65b7 -537 -5385a403 -50793 -53858593 -40f585b3 -50513 -609020ef -1aa41463 -5537 -40593 -11050513 -138030ef -87448513 -130030ef -5537 -18c50513 -124030ef -5537 -1a850513 -118030ef -87448513 -110030ef -5537 -1c450513 -104030ef -5537 -1f850513 -f8030ef -5537 -20c50513 -ec030ef -5537 -3c00593 -21850513 -dc030ef -5537 -4000593 -22450513 -cc030ef -5537 -2000593 -24050513 -bc030ef -5537 -800593 -25c50513 -ac030ef -5537 -405b7 -27850513 -9c030ef -87448513 -94030ef -5537 -29450513 -88030ef -585010ef -ce1ff0ef -100793 -50413 -f50863 -5537 -2c850513 -68030ef -87448513 -60030ef -2040a63 -5537 -2e850513 -50030ef -461000ef -50c63 -ac010ef -771000ef -5537 -31c50513 -34030ef -87448513 -2c030ef -5537 -33450513 -20030ef -5a37 -59b7 -5ab7 -5537 -36850513 -789020ef -413 -40108a3 -10000937 -a00b13 -d00b93 -7f00c13 -700c93 -800d13 -69d020ef -94783 -4a10823 -fea78ae3 -90023 -d650e63 -4ab6863 -ff9502e3 -5a50863 -5010513 -73d020ef -5014703 -15010793 -8787b3 -ece78023 -140413 -fc1ff06f -50613 -5537 -40593 -12c50513 -791020ef -5537 -15850513 -785020ef -e4dff06f -1750e63 -fb851ce3 -f80408e3 -37ca0513 -fff40413 -6e9020ef -f81ff06f -1690023 -15010793 -878433 -ec040023 -87448513 -6cd020ef -1010793 -c10513 -f12623 -cc9ff0ef -55b7 -38058593 -50413 -29c020ef -18051863 -c10513 -cadff0ef -50913 -c10513 -ca1ff0ef -94783 -50413 -2079063 -5537 -38450513 -6fd020ef -ee9ff06f -d00793 -f90023 -f91ff06f -613 -5010593 -90513 -568020ef -5012783 -50b13 -7c783 -78863 -5537 -f0050513 -fc5ff06f -44783 -2078663 -613 -5010593 -40513 -534020ef -5012783 -7c783 -78a63 -5537 -39c50513 -f95ff06f -400513 -50413 -5537 -3b050513 -b0b93 -5f9020ef -5cb7 -5d37 -804663 -87448513 -f69ff06f -1000793 -40913 -87d463 -1000913 -5537 -b0593 -3c050513 -645020ef -c13 -5db7 -18b87b3 -7c583 -3ccd8513 -1c0c13 -629020ef -ff8916e3 -90c13 -1000d93 -5bc1a63 -3c898513 -611020ef -c13 -5e00d93 -18b87b3 -7c583 -fe058793 -ff7f793 -4fdf063 -3d4d0513 -5ed020ef -1c0c13 -ff8910e3 -90c13 -1000d93 -3bc1863 -12b8bb3 -41240433 -12b0b33 -f5dff06f -208c8513 -5c1020ef -1c0c13 -fa1ff06f -3d8a8513 -5b1020ef -fc5ff06f -3c898513 -5a5020ef -1c0c13 -fc5ff06f -55b7 -3dc58593 -40513 -fc020ef -e051063 -c10513 -b0dff0ef -50b13 -c10513 -b01ff0ef -50913 -c10513 -af5ff0ef -b4783 -50413 -78663 -94783 -79863 -5537 -3e050513 -e4dff06f -b0513 -613 -5010593 -3c4020ef -5012783 -50b13 -7c783 -e60790e3 -90513 -613 -5010593 -3a4020ef -5012783 -50913 -7c783 -78863 -5537 -40050513 -e01ff06f -44783 -100513 -2078663 -613 -5010593 -40513 -36c020ef -5012783 -7c783 -78863 -5537 -f3850513 -dcdff06f -793 -279713 -1670733 -caa784e3 -1272023 -178793 -fedff06f -55b7 -41458593 -40513 -c020ef -e051463 -c10513 -a1dff0ef -50b13 -c10513 -a11ff0ef -50913 -c10513 -a05ff0ef -b4783 -50413 -78663 -94783 -79863 -5537 -41850513 -d5dff06f -b0513 -613 -5010593 -2d4020ef -5012783 -50b13 -7c783 -78863 -5537 -43050513 -d31ff06f -90513 -613 -5010593 -2a8020ef -5012783 -50913 -7c783 -78863 -5537 -45050513 -d05ff06f -44783 -100513 -2078063 -613 -5010593 -40513 -270020ef -5012783 -7c783 -f00794e3 -793 -279713 -eb06b3 -e90733 -baa78ae3 -72703 -178793 -e6a023 -fe5ff06f -55b7 -46c58593 -40513 -715010ef -e051063 -c10513 -925ff0ef -50b13 -c10513 -919ff0ef -50913 -c10513 -90dff0ef -b4783 -50413 -78a63 -94783 -78663 -54783 -79863 -5537 -47450513 -c5dff06f -b0513 -613 -5010593 -1d4020ef -5012783 -50b13 -7c783 -78863 -5537 -49450513 -c31ff06f -90513 -613 -5010593 -1a8020ef -5012783 -50913 -7c783 -78863 -5537 -4a850513 -c05ff06f -613 -5010593 -40513 -17c020ef -5012783 -50613 -7c783 -78863 -5537 -4b850513 -bd9ff06f -90593 -b0513 -6c5020ef -ab5ff06f -55b7 -4c858593 -40513 -625010ef -8051e63 -c10513 -835ff0ef -50913 -c10513 -829ff0ef -94783 -50413 -78663 -54783 -79863 -5537 -4d050513 -b81ff06f -90513 -613 -5010593 -f8020ef -5012783 -50913 -7c783 -f20794e3 -40513 -613 -5010593 -d8020ef -5012783 -50413 -7c783 -f2079ae3 -50593 -90513 -6c1020ef -50613 -5537 -40593 -4e850513 -21d020ef -a09ff06f -55b7 -4f858593 -40513 -579010ef -50913 -a051a63 -c10513 -f84ff0ef -50413 -c10513 -f78ff0ef -44783 -50b13 -78663 -54783 -79863 -5537 -50050513 -ad1ff06f -40513 -613 -5010593 -48020ef -5012783 -50413 -7c783 -e6079ce3 -b0513 -613 -5010593 -28020ef -5012783 -50b13 -7c783 -ca079ee3 -5537 -40593 -51850513 -17d020ef -5bb7 -976902e3 -90593 -40513 -5f9020ef -50613 -90593 -4e8b8513 -159020ef -190913 -fddff06f -55b7 -52c58593 -40513 -4b1010ef -8051a63 -c10513 -ec0ff0ef -50913 -c10513 -eb4ff0ef -94783 -50413 -78663 -54783 -79863 -5537 -53050513 -a0dff06f -90513 -613 -5010593 -785010ef -5012783 -50913 -7c783 -a20790e3 -5010593 -613 -40513 -765010ef -5012783 -50593 -7c783 -a20798e3 -90513 -57c020ef -50593 -5537 -54850513 -b1020ef -89dff06f -55b7 -55858593 -40513 -40d010ef -51e63 -5010513 -12d020ef -5537 -5010593 -56050513 -fd1ff06f -55b7 -56c58593 -40513 -3e1010ef -51663 -ed020ef -855ff06f -55b7 -57458593 -40513 -3c5010ef -51a63 -f00007b7 -100713 -e7a023 -831ff06f -55b7 -57c58593 -40513 -3a1010ef -51663 -91000ef -815ff06f -55b7 -58858593 -40513 -385010ef -51663 -420000ef -ff8ff06f -55b7 -59458593 -40513 -369010ef -51663 -720000ef -fdcff06f -55b7 -59c58593 -40513 -34d010ef -c051663 -5537 -5a450513 -70c020ef -5537 -5c450513 -700020ef -5537 -5e450513 -6f4020ef -5537 -60850513 -6e8020ef -5537 -62850513 -6dc020ef -5537 -64c50513 -6d0020ef -5537 -66c50513 -6437 -6c0020ef -8f440513 -6b8020ef -5537 -69050513 -6ac020ef -5537 -6cc50513 -6a0020ef -8f440513 -698020ef -5537 -6ec50513 -68c020ef -5537 -70c50513 -680020ef -5537 -72850513 -674020ef -5537 -74450513 -668020ef -8f440513 -660020ef -5537 -76450513 -654020ef -f00ff06f -55b7 -78458593 -40513 -271010ef -51a63 -c10513 -c80ff0ef -82dfe0ef -edcff06f -55b7 -78c58593 -40513 -24d010ef -51663 -fe0fe0ef -ec0ff06f -55b7 -79458593 -40513 -231010ef -51663 -fdcfe0ef -ea4ff06f -55b7 -79c58593 -40513 -215010ef -51863 -fff00513 -89dfe0ef -e84ff06f -55b7 -7a858593 -40513 -1f5010ef -2051463 -c10513 -c04ff0ef -50413 -c10513 -bf8ff0ef -50593 -40513 -939fe0ef -e4cff06f -55b7 -7b058593 -40513 -1bd010ef -51a63 -c10513 -bccff0ef -9f9fe0ef -e28ff06f -55b7 -7bc58593 -40513 -199010ef -51a63 -c10513 -ba8ff0ef -c21fe0ef -e04ff06f -55b7 -7c458593 -40513 -175010ef -51663 -a5cff0ef -de8ff06f -55b7 -7cc58593 -40513 -159010ef -51663 -eb1fe0ef -dccff06f -55b7 -7d858593 -40513 -13d010ef -51663 -c99fe0ef -db0ff06f -65b7 -8f458593 -40513 -121010ef -d8050e63 -5537 -7e050513 -ea4ff06f -68067 -ff010113 -812423 -52403 -4007b7 -112623 -912223 -fe040713 -fe078793 -2e7f863 -6537 -40593 -82c50513 -568020ef -413 -40513 -c12083 -812403 -412483 -1010113 -8067 -452483 -40593 -850513 -1f8020ef -50613 -fca48ae3 -6537 -48593 -85050513 -524020ef -fbdff06f -ff010113 -812423 -912223 -112623 -50493 -58413 -f6dff0ef -2050663 -50613 -848593 -40513 -24d010ef -100513 -c12083 -812403 -412483 -1010113 -8067 -513 -fe9ff06f -ff010113 -912223 -1212023 -58693 -50613 -50493 -58913 -c0a86537 -15b7 -7b558593 -46450513 -812423 -112623 -3cc010ef -50413 -2a05c63 -50593 -6537 -90693 -48613 -87850513 -478020ef -40513 -c12083 -812403 -412483 -12903 -1010113 -8067 -6537 -48593 -8ac50513 -44c020ef -fd5ff06f -fe010113 -50593 -a12623 -6537 -8d050513 -112e23 -42c020ef -6537 -8f850513 -420020ef -6dc020ef -793 -bc079073 -30047073 -464020ef -48c020ef -c12683 -613 -593 -513 -e59ff0ef -6f -6537 -ec010113 -92c50513 -12112e23 -12812c23 -12912a23 -13212823 -13312623 -13412423 -13512223 -13612023 -11712e23 -11812c23 -3b8020ef -6537 -6437 -94450513 -80c40493 -3a4020ef -80c40413 -4c503 -8051e63 -f00037b7 -8207a023 -8007a823 -8007aa23 -8007ac23 -8007ae23 -8007a023 -e400713 -80e7a223 -e737 -4e170713 -80e7a423 -e4e737 -1c070713 -80e7a623 -100713 -82e7a023 -82e7a223 -b13 -f0003ab7 -5100493 -1b00913 -e00993 -100a13 -828aa783 -82caa703 -879793 -e7e7b3 -830aa703 -879793 -e7e7b3 -834aa703 -879793 -e7e7b3 -79e63 -6537 -99850513 -d80006f -4f8020ef -148493 -f59ff06f -4d0020ef -c050a63 -474020ef -20950063 -1f250e63 -16407b3 -107c783 -aa79a63 -1b0b13 -b3b1a63 -54b7 -a93 -300993 -100913 -500413 -7f448493 -f0000a37 -438020ef -a10623 -430020ef -a106a3 -428020ef -a10723 -c10b93 -41c020ef -a107a3 -b8c13 -b13 -c14583 -1c0c13 -6bb4463 -f14783 -d378863 -e14783 -d14703 -158593 -879793 -e7e7b3 -879b13 -87d793 -fb67b3 -1079b13 -f10513 -10b5b13 -6ad010ef -5650463 -1a8a93 -28a9a63 -6537 -97050513 -228020ef -500006f -f8650513 -153b13 -834aa223 -ee1ff06f -39c020ef -ac01a3 -1b0b13 -f85ff06f -4300513 -3f8020ef -f4dff06f -f14783 -ef46e63 -279793 -9787b3 -7a783 -78067 -4b00513 -3d4020ef -100513 -13c12083 -13812403 -13412483 -13012903 -12c12983 -12812a03 -12412a83 -12012b03 -11c12b83 -11812c03 -14010113 -8067 -1014783 -1114703 -1879793 -1071713 -e7e7b3 -1314703 -e7e7b3 -1214703 -871713 -e7e7b3 -ffc78793 -400713 -c14683 -e78633 -1b8b93 -d74c63 -f14783 -a93 -4b00513 -eb2794e3 -f55ff06f -7bc683 -170713 -d60023 -fd1ff06f -1014403 -1114783 -4b00513 -1841413 -1079793 -f46433 -1314783 -f46433 -1214783 -879793 -f46433 -30c020ef -40513 -cc5ff0ef -4b00513 -2fc020ef -12a2023 -e4dff06f -1a8a93 -ec8a80e3 -5500513 -eedff06f -6537 -9a450513 -dc020ef -513 -f05ff06f -6537 -ff010113 -9b050513 -112623 -c0020ef -6537 -3200713 -6400693 -a800613 -c000593 -9cc50513 -a4020ef -6537 -6400713 -6400693 -a800613 -c000593 -9e450513 -88020ef -c0a865b7 -6537 -43258593 -52850513 -650000ef -15b7 -6537 -7b558593 -9fc50513 -60020ef -6537 -c00005b7 -a1450513 -b85ff0ef -4a04263 -6537 -a1c50513 -40020ef -6537 -aa050513 -34020ef -6537 -c00005b7 -adc50513 -b59ff0ef -8a04063 -c12083 -6537 -a1c50513 -1010113 -c0206f -6537 -c08005b7 -a3450513 -b31ff0ef -a04863 -6537 -a4050513 -fadff06f -6537 -c10005b7 -a5850513 -b11ff0ef -a04863 -6537 -a6450513 -f8dff06f -6537 -500005b7 -a7850513 -af1ff0ef -a04863 -6537 -a8850513 -f6dff06f -50000537 -b61ff0ef -c0000537 -ff9ff06f -6537 -fe010113 -ae850513 -112e23 -812c23 -785010ef -500005b7 -20d29537 -a5dff0ef -6050863 -50413 -6537 -b0c50513 -765010ef -c00005b7 -20228537 -a3dff0ef -857433 -4040663 -6537 -b2c50513 -745010ef -c08005b7 -20628537 -a1dff0ef -857433 -2040663 -6537 -b5050513 -725010ef -c10005b7 -20d28537 -9fdff0ef -857533 -50663 -50000537 -ac5ff0ef -6537 -b7050513 -6fd010ef -20228537 -95dff0ef -2050a63 -50593 -a12623 -6537 -b8850513 -6dd010ef -c12603 -202285b7 -858593 -c0000537 -424010ef -c0000537 -fb9ff06f -1c12083 -1812403 -2010113 -8067 -f00087b7 -8347a703 -ff77713 -fe070ce3 -100006b7 -286c703 -82e7ae23 -10000737 -2472703 -1071613 -1065613 -865613 -1071713 -84c7a023 -1075713 -84e7a223 -100713 -82e7a823 -286a783 -160737 -270713 -178793 -17f793 -2f6a423 -e787b3 -b79793 -10000737 -2f72023 -8067 -ffe67613 -c58633 -2b61a63 -107b7 -fff78793 -1055713 -4071063 -68a63 -107b7 -fff78793 -f50463 -f54533 -1051513 -1055513 -8067 -5c783 -15c703 -258593 -879793 -e7e7b3 -f50533 -fb5ff06f -f57533 -e50533 -fb5ff06f -f00037b7 -8207a023 -8007a823 -8007aa23 -8007ac23 -8007ae23 -8007a023 -b700713 -80e7a223 -b737 -71b70713 -80e7a423 -b72737 -b0070713 -80e7a623 -100713 -82e7a023 -82e7a223 -100613 -f0003737 -82872783 -82c72683 -879793 -d7e7b3 -83072683 -879793 -d7e7b3 -83472683 -879793 -d7e7b3 -79463 -8067 -82c72223 -fcdff06f -ff010113 -812423 -112623 -50413 -793 -600713 -f586b3 -6c503 -f406b3 -178793 -a68023 -fee796e3 -100007b7 -187c703 -1878793 -60513 -e40323 -17c703 -e403a3 -27c703 -e40423 -37c703 -e404a3 -47c703 -57c783 -e40523 -f405a3 -e9010ef -a40623 -855513 -a406a3 -c12083 -812403 -1010113 -8067 -100007b7 -207a503 -2a50513 -8067 -fd010113 -1412c23 -58a13 -100005b7 -2112623 -2812423 -2912223 -3212023 -1312e23 -1512a23 -c58713 -174683 -c5c783 -d7e7b3 -274683 -d7e7b3 -374683 -d7e7b3 -474683 -574703 -d7e7b3 -e7e7b3 -22078063 -2a60713 -3b00693 -50a93 -60913 -100007b7 -20e6f063 -10000437 -2042503 -1637 -80060613 -c58593 -1091993 -2e7a223 -109d993 -ed1ff0ef -2042483 -1c98513 -4500793 -1051513 -f48723 -487a3 -1055513 -5010ef -a48823 -855513 -a488a3 -2042483 -513 -7ec010ef -a48923 -855513 -a489a3 -2042483 -4537 -7d4010ef -a48a23 -855513 -a48aa3 -2042483 -4000793 -f48b23 -1100793 -f48ba3 -f106a3 -100007b7 -147a503 -48c23 -48ca3 -768010ef -855793 -f48da3 -1055793 -f48e23 -1855793 -f48ea3 -100007b7 -a48d23 -a12223 -87a503 -2042483 -738010ef -855793 -f48fa3 -1055793 -2f48023 -1855793 -2f480a3 -a48f23 -2042483 -100693 -1400613 -e48593 -a12423 -513 -cf5ff0ef -730010ef -a48c23 -855513 -a48ca3 -2042483 -a8513 -718010ef -2a48123 -855513 -2a481a3 -2042483 -a0513 -700010ef -2a48223 -855513 -2a482a3 -898513 -1051513 -2042483 -1055513 -6e0010ef -2042403 -855793 -2a48323 -2f483a3 -a11723 -2040423 -20404a3 -693 -c00613 -410593 -513 -10623 -c6dff0ef -197793 -78863 -12407b3 -2078523 -190913 -100693 -890613 -2240593 -c49ff0ef -684010ef -2a40423 -855513 -2a404a3 -bc1ff0ef -100513 -2c12083 -2812403 -2412483 -2012903 -1c12983 -1812a03 -1412a83 -3010113 -8067 -3c00713 -e01ff06f -513 -fd1ff06f -100007b7 -a7a223 -8067 -f00087b7 -100713 -84e7a623 -82e7a423 -10000737 -793 -1870713 -600693 -f50633 -64803 -e78633 -178793 -1060023 -fed796e3 -100007b7 -b7aa23 -100007b7 -7a423 -100007b7 -7a623 -c78793 -79223 -100007b7 -207a423 -f00087b7 -8207ae23 -b0001737 -100007b7 -2e7a023 -100007b7 -b0000737 -2e7a623 -100007b7 -7a223 -8067 -f0008737 -82872783 -17f793 -48078463 -80072783 -1606b7 -fd010113 -ff7f793 -d787b3 -2812423 -b79793 -10000437 -2f42623 -80472783 -80872683 -2912223 -879793 -d7e7b3 -80c72683 -879793 -81072703 -d7e7b3 -879793 -e7e7b3 -100004b7 -2112623 -2f4a823 -3212023 -1312e23 -1412c23 -1512a23 -175010ef -2c42783 -c7c503 -d7c783 -879793 -a7e533 -558010ef -17b7 -80678793 -2af51063 -304a703 -3b00793 -ee7f063 -2c42403 -10000a37 -20a2483 -f44783 -e44503 -879793 -a7e533 -520010ef -100793 -50913 -af51a63 -1144783 -1044503 -879793 -a7e533 -500010ef -80050513 -8051c63 -1244703 -600793 -8f71663 -1344703 -400793 -8f71063 -1544783 -1444503 -879793 -a7e533 -4cc010ef -200793 -8f51a63 -1d44503 -1c44783 -851513 -f56533 -1e44783 -1079793 -a7e7b3 -1f44503 -1851513 -f56533 -464010ef -100007b7 -87a783 -2f51663 -10000737 -793 -c70713 -600693 -f40633 -1664583 -e78633 -178793 -b60023 -fed796e3 -2c12083 -2812403 -f00087b7 -100713 -82e7a423 -2412483 -2012903 -1c12983 -1812a03 -1412a83 -3010113 -8067 -1544783 -1444503 -879793 -a7e533 -420010ef -fb251ee3 -2744503 -2644783 -851513 -f56533 -2844783 -1079793 -a7e7b3 -2944503 -1851513 -f56533 -3bc010ef -100007b7 -147a703 -78993 -f8e510e3 -20a2503 -1ab7 -1640913 -806a8613 -90593 -a29ff0ef -3c00713 -100007b7 -100513 -2e7a223 -368010ef -a48723 -855513 -a487a3 -800a8513 -354010ef -600793 -a48823 -f48923 -855513 -400793 -f489a3 -a488a3 -200513 -330010ef -a48a23 -855513 -a48aa3 -149a503 -2e8010ef -855793 -a48e23 -f48ea3 -10000737 -1055793 -1855513 -f48f23 -a48fa3 -793 -1870713 -600693 -e78633 -64583 -f48633 -178793 -b60b23 -fed796e3 -1d44503 -1c44783 -2048493 -851513 -f56533 -1e44783 -1c40413 -1079793 -a7e7b3 -344503 -1851513 -f56533 -2bc010ef -26c010ef -855793 -a48323 -f483a3 -1055793 -1855513 -f48423 -a484a3 -90593 -5c783 -158593 -148493 -fef48fa3 -fe8598e3 -fb4ff0ef -e51ff06f -2c42783 -c7c503 -d7c783 -879793 -a7e533 -298010ef -80050513 -e20518e3 -304a703 -2900793 -e2e7f2e3 -2c42403 -4500793 -e44703 -e0f71ae3 -1144783 -1044503 -879793 -a7e533 -260010ef -1b00793 -dea7fce3 -1744703 -1100793 -def716e3 -1f44503 -1e44783 -851513 -f56533 -2044783 -1079793 -a7e7b3 -2144503 -1851513 -f56533 -1ec010ef -100007b7 -147a783 -daf51ae3 -2744783 -2644503 -879793 -a7e533 -200010ef -700793 -d8a7fce3 -100007b7 -47a483 -d80486e3 -1b44503 -1a44783 -851513 -f56533 -1c44783 -1079793 -a7e7b3 -1d44503 -1851513 -f56533 -18c010ef -2344783 -50913 -2244503 -879793 -a7e533 -1a8010ef -a12623 -2544783 -2444503 -879793 -a7e533 -190010ef -a12423 -2744783 -2644503 -879793 -a7e533 -178010ef -812603 -c12583 -ff850713 -2a40693 -90513 -480e7 -cfdff06f -8067 -100007b7 -87a703 -fc010113 -3412423 -100006b7 -2112e23 -2812c23 -2912a23 -3212823 -3312623 -3512223 -3612023 -1712e23 -1812c23 -1912a23 -1a12823 -1b12623 -c68a13 -2a71063 -713 -600613 -ea05b3 -5c583 -18059e63 -170713 -fec718e3 -100009b7 -50493 -a7a423 -6a623 -a1223 -6400913 -10000ab7 -1b37 -6c37 -10000cb7 -3c00d93 -10000d37 -1898993 -600b93 -20aa503 -806b0613 -530c0593 -f08ff0ef -20aa403 -100513 -3bca223 -4c010ef -a40723 -855513 -a407a3 -800b0513 -38010ef -600793 -a40823 -f40923 -855513 -400793 -f409a3 -a408a3 -100513 -14010ef -a40a23 -855513 -a40aa3 -14d2503 -7cd000ef -855793 -a40e23 -f40ea3 -1055793 -1855513 -f40f23 -a40fa3 -793 -1378733 -74683 -f40733 -178793 -d70b23 -ff7796e3 -48513 -78d000ef -855793 -2a40323 -2f403a3 -1055793 -1855513 -2f40423 -2a404a3 -2040023 -20400a3 -2040123 -20401a3 -2040223 -20402a3 -18437 -cd0ff0ef -6a040413 -9ddff0ef -793 -fa0733 -74703 -4071e63 -178793 -ff7798e3 -fff40413 -fe0410e3 -fff90913 -ee0916e3 -513 -3c12083 -3812403 -3412483 -3012903 -2c12983 -2812a03 -2412a83 -2012b03 -1c12b83 -1812c03 -1412c83 -1012d03 -c12d83 -4010113 -8067 -100513 -fc1ff06f -6537 -ff010113 -ba850513 -112623 -812423 -2ec010ef -f0007437 -100793 -f42023 -d08ff0ef -42023 -812403 -c12083 -1010113 -cf4ff06f -fd010113 -3212023 -50913 -60513 -2112623 -2812423 -2912223 -1312e23 -60493 -b12623 -6e8000ef -c12583 -290413 -50993 -b900a3 -50613 -48593 -90023 -40513 -7d4000ef -1340533 -6f00793 -f500a3 -6300793 -f50123 -6500713 -7400793 -50023 -f501a3 -e50223 -f502a3 -50323 -48513 -68c000ef -2c12083 -2812403 -2412483 -2012903 -1c12983 -950513 -3010113 -8067 -300513 -14e57463 -27b7 -dda78793 -12f61e63 -fe010113 -912a23 -112e23 -812c23 -6c783 -16c603 -26c403 -879793 -c7e7b3 -36c603 -841413 -c46433 -1041413 -41045413 -1041493 -400613 -104d493 -2c79463 -100007b7 -2b79a23 -100007b7 -297ac23 -1c12083 -1812403 -1412483 -2010113 -8067 -fe0486e3 -aa79263 -fff48613 -961513 -10000637 -3c62603 -468793 -ffc70813 -a60633 -e686b3 -6d79663 -10000737 -4472783 -10787b3 -4f72223 -1ff00793 -107e863 -100007b7 -100713 -4e7a023 -b12623 -c88ff0ef -400793 -f500a3 -84d793 -50023 -f50123 -8501a3 -1812403 -c12583 -1c12083 -1412483 -2537 -400613 -dda50513 -2010113 -c5cff06f -7c703 -160613 -178793 -fee60fa3 -f85ff06f -500713 -f4e790e3 -100007b7 -fff00713 -4e7a223 -100007b7 -100713 -4e7a023 -f25ff06f -8067 -fd010113 -2812423 -1512a23 -1612823 -2112623 -2912223 -3212023 -1312e23 -1412c23 -1712623 -58a93 -60b13 -68413 -b99ff0ef -8050a63 -3537 -1a050513 -e58ff0ef -100007b7 -100004b7 -10000937 -29b7 -287ae23 -404a223 -4092023 -500413 -dda98993 -1e8bb7 -b9cff0ef -b0613 -100593 -d8dff0ef -50613 -a8593 -98513 -b90ff0ef -480b8a13 -ea0ff0ef -444a703 -e04a63 -4092783 -79663 -fffa0a13 -fe0a14e3 -4092783 -ae04a63 -a079863 -fff40413 -fa0418e3 -513 -dd4ff0ef -fff00513 -5c0006f -444aa03 -8ea0063 -15a77b3 -98b93 -2079463 -140b93 -347413 -1640433 -44503 -b8413 -98b93 -629000ef -800513 -621000ef -e28ff0ef -a0713 -b8793 -4092683 -fa068ce3 -513 -d78ff0ef -444a503 -2c12083 -2812403 -2412483 -2012903 -1c12983 -1812a03 -1412a83 -1012b03 -c12b83 -3010113 -8067 -70a13 -fff78b93 -fa0796e3 -f61ff06f -b727b7 -8ab7 -b729b7 -6b37 -413 -b0078793 -fffa8a93 -aff98993 -bbcb0b13 -f8dff06f -fb010113 -3312e23 -3612823 -3712623 -4112623 -4812423 -4912223 -5212023 -3412c23 -3512a23 -3812423 -3912223 -3a12023 -1b12e23 -58b13 -60b93 -68993 -e12423 -9f5ff0ef -8050a63 -3537 -1a050513 -cb4ff0ef -a20ff0ef -100007b7 -100004b7 -2a37 -10000937 -407a223 -404a023 -500413 -ddaa0a13 -1e8c37 -90d13 -fff00c93 -9f0ff0ef -b8613 -200593 -be1ff0ef -50613 -b0593 -a0513 -9e4ff0ef -480c0d93 -3992c23 -cf0ff0ef -3892a83 -20a8663 -404a783 -79a63 -fffd8d93 -fe0d92e3 -fff40413 -fa041ce3 -513 -c30ff0ef -fff00413 -b40006f -2a37 -413 -20000d93 -10000cb7 -ddaa0a13 -812783 -1ff40693 -1a8a93 -20000b93 -f6c463 -40878bb3 -10a9913 -1095913 -895913 -500b13 -4b8c13 -954ff0ef -300793 -f500a3 -50023 -1250123 -15501a3 -b8613 -98593 -450513 -34c000ef -34cd583 -c0613 -a0513 -930ff0ef -b727b7 -b0078613 -c12623 -c38ff0ef -404a583 -f60592e3 -38d2583 -c12603 -5559c63 -1740433 -17989b3 -f7bb88e3 -513 -b78ff0ef -40513 -4c12083 -4812403 -4412483 -4012903 -3c12983 -3812a03 -3412a83 -3012b03 -2c12b83 -2812c03 -2412c83 -2012d03 -1c12d83 -5010113 -8067 -fff60613 -f80616e3 -fffb0b13 -f40b12e3 -ef1ff06f -ff5f593 -54783 -b79463 -8067 -78663 -150513 -fedff06f -513 -8067 -54703 -2071263 -513 -8067 -fee68ee3 -178793 -7c683 -fe069ae3 -150513 -fddff06f -58793 -fedff06f -b505b3 -ff67613 -b50663 -54783 -79663 -513 -8067 -fef60ee3 -150513 -fe5ff06f -50793 -158593 -fff5c703 -178793 -fee78fa3 -fe0718e3 -8067 -c50633 -50793 -c79463 -8067 -5c703 -e78023 -70463 -158593 -178793 -fe5ff06f -158593 -54703 -fff5c783 -40f707b3 -1879793 -4187d793 -79663 -150513 -fe0710e3 -78513 -8067 -713 -c71863 -793 -78513 -8067 -e507b3 -7c683 -e587b3 -7c783 -40f687b3 -1879793 -4187d793 -fc079ee3 -fc068ce3 -170713 -fc9ff06f -50793 -7c703 -178693 -71e63 -158593 -fff5c703 -178793 -fee78fa3 -fe0718e3 -8067 -68793 -fd9ff06f -50793 -61663 -8067 -68793 -7c703 -178693 -fe071ae3 -c78633 -158593 -fff5c703 -178793 -fee78fa3 -fc070ce3 -fec796e3 -78023 -8067 -50793 -7c703 -71663 -40a78533 -8067 -178793 -fedff06f -fe010113 -812c23 -b12623 -50413 -112e23 -fd1ff0ef -c12583 -a40533 -ff5f593 -54783 -b78863 -fff50513 -fe857ae3 -513 -1c12083 -1812403 -2010113 -8067 -b505b3 -50793 -b78663 -7c703 -71663 -40a78533 -8067 -178793 -fe9ff06f -793 -f50733 -74683 -68e63 -58713 -c0006f -d60c63 -170713 -74603 -fe061ae3 -78513 -8067 -178793 -fd1ff06f -713 -e61663 -793 -200006f -e507b3 -e586b3 -7c783 -6c683 -170713 -40d787b3 -fc078ee3 -78513 -8067 -c50633 -50793 -c79463 -8067 -178793 -feb78fa3 -ff1ff06f -793 -f61463 -8067 -f58733 -74683 -f50733 -178793 -d70023 -fe5ff06f -2a5fa63 -fff64693 -793 -fff78793 -2f69663 -8067 -f58733 -74683 -f50733 -178793 -d70023 -fef616e3 -8067 -793 -ff5ff06f -f60733 -e58833 -84803 -e50733 -1070023 -fbdff06f -fe010113 -812c23 -50413 -58513 -1312623 -112e23 -912a23 -1212823 -1412423 -58993 -e51ff0ef -4050063 -50913 -40513 -e41ff0ef -50493 -a40a33 -409a0433 -124f663 -413 -1c0006f -90613 -98593 -40513 -fff48493 -ed5ff0ef -fc051ee3 -40513 -1c12083 -1812403 -1412483 -1012903 -c12983 -812a03 -2010113 -8067 -c50633 -ff5f593 -c51663 -513 -8067 -54703 -150793 -feb70ae3 -78513 -fe5ff06f -66b7 -50793 -54703 -bc468693 -4061e63 -3000513 -a00613 -4a71463 -17c703 -178513 -e68633 -64603 -267613 -60663 -fe070713 -ff77713 -5800613 -ac71063 -27c703 -e68733 -74703 -4477713 -8070663 -278793 -1000613 -513 -4c0006f -1000513 -fea61ae3 -3000513 -fea716e3 -17c703 -e68533 -54503 -257513 -50663 -fe070713 -ff77713 -5800513 -fca714e3 -278793 -fc1ff06f -2a60533 -178793 -e50533 -7c703 -e68833 -84803 -4487893 -88a63 -487893 -2088263 -fd070713 -fcc76ae3 -58463 -f5a023 -8067 -50793 -800613 -f79ff06f -287813 -80663 -fe070713 -ff77713 -fc970713 -fd1ff06f -54683 -2d00713 -e68463 -eedff06f -ff010113 -150513 -112623 -eddff0ef -c12083 -40a00533 -1010113 -8067 -66b7 -793 -bc468693 -a00593 -52603 -64703 -e68733 -74703 -477713 -71663 -78513 -8067 -2b787b3 -160713 -e52023 -64703 -e787b3 -fd078793 -fc9ff06f -68b7 -bc488893 -4087313 -12888e13 -30463 -10088e13 -1087893 -88463 -ffe87813 -ffe68313 -2200e93 -893 -246ee263 -187893 -fb010113 -3000f93 -89463 -2000f93 -287893 -313 -88a63 -8065663 -40c00633 -fff70713 -2d00313 -2087293 -28863 -1000893 -9169c63 -ffe70713 -a061063 -3000613 -c10623 -100893 -88613 -f8d463 -78613 -1187793 -40c70733 -c078e63 -30863 -b57463 -650023 -150513 -28e63 -800793 -cf69863 -b57663 -3000793 -f50023 -150513 -1087813 -10080a63 -c50633 -3000693 -1200006f -487893 -88863 -fff70713 -2b00313 -f75ff06f -887893 -f60886e3 -fff70713 -2000313 -f61ff06f -800893 -f71696e3 -fff70713 -f65ff06f -c10e93 -893 -2d67f33 -188893 -1e8e93 -1ee0f33 -f4f03 -ffee8fa3 -2d65f33 -f4d666e3 -f0613 -fddff06f -b7f463 -778023 -178793 -40ff0eb3 -ffd048e3 -70793 -75463 -793 -fff70713 -f50533 -40f70733 -f2dff06f -50793 -e50f33 -2000393 -fd1ff06f -1000793 -f4f690e3 -b57663 -3000793 -f50023 -150793 -b7f663 -21e4783 -f500a3 -250513 -f1dff06f -b7f463 -1f78023 -178793 -40f806b3 -fed048e3 -70793 -75463 -793 -fff70713 -f50533 -40f70733 -ef5ff06f -50793 -e50833 -fd5ff06f -b57463 -d50023 -150513 -40a607b3 -fef8c8e3 -88793 -50693 -fff00613 -fff78793 -2c79a63 -1150533 -50793 -e50633 -2000813 -40f606b3 -2d04c63 -75463 -713 -e508b3 -88513 -5010113 -8067 -b6fa63 -c10813 -f80833 -84803 -1068023 -168693 -fb1ff06f -b7f463 -1078023 -178793 -fb9ff06f -88513 -8067 -ff010113 -812423 -112623 -58413 -2cd000ef -856463 -fff40513 -c12083 -812403 -1010113 -8067 -fc010113 -2d12623 -2c10693 -112e23 -2e12823 -2f12a23 -3012c23 -3112e23 -d12623 -28d000ef -1c12083 -4010113 -8067 -fc010113 -2d12623 -2c10693 -812c23 -112e23 -58413 -2e12823 -2f12a23 -3012c23 -3112e23 -d12623 -251000ef -856463 -fff40513 -1c12083 -1812403 -4010113 -8067 -60693 -58613 -800005b7 -fff5c593 -2250006f -fc010113 -2c12423 -58613 -800005b7 -2d12623 -fff5c593 -2810693 -112e23 -2e12823 -2f12a23 -3012c23 -3112e23 -d12623 -1ed000ef -1c12083 -4010113 -8067 -10000737 -4872783 -8100513 -2f50533 -361967b7 -2e978793 -f50533 -4a72423 -8067 -100007b7 -4a7a423 -8067 -6537 -ff010113 -d1450513 -112623 -434000ef -6f -1851713 -1855793 -106b7 -e7e7b3 -f0068693 -855713 -d77733 -e7e7b3 -851513 -ff0737 -e57533 -a7e533 -8067 -851793 -855513 -a7e533 -1051513 -1055513 -8067 -1851713 -1855793 -106b7 -e7e7b3 -f0068693 -855713 -d77733 -e7e7b3 -851513 -ff0737 -e57533 -a7e533 -8067 -851793 -855513 -a7e533 -1051513 -1055513 -8067 -66b7 -793 -b505b3 -d2068693 -40a58733 -e04663 -78513 -8067 -150513 -fff54603 -87d713 -879793 -c74733 -271713 -e68733 -75703 -1079793 -107d793 -f747b3 -fc5ff06f -66b7 -50713 -fff00793 -b508b3 -700813 -12068693 -40e88633 -4c86e63 -35d713 -371693 -d50533 -ff800693 -2d70733 -b705b3 -2058c63 -66b7 -b505b3 -12068693 -150513 -fff54703 -f74733 -ff77713 -271713 -e68733 -72703 -87d793 -f747b3 -fcb51ee3 -fff7c513 -8067 -74603 -870713 -f64633 -ff67613 -261613 -c68633 -62603 -87d793 -f647b3 -ff974603 -f64633 -ff67613 -261613 -c68633 -62603 -87d793 -f64633 -ffa74783 -c7c7b3 -ff7f793 -279793 -f687b3 -7a303 -ffb74783 -865613 -c34333 -67c7b3 -ff7f793 -279793 -f687b3 -7a603 -ffc74783 -835313 -664633 -c7c7b3 -ff7f793 -279793 -f687b3 -7a303 -ffd74783 -865613 -c34333 -67c7b3 -ff7f793 -279793 -f687b3 -7a783 -ffe74603 -835313 -67c7b3 -f64633 -ff67613 -261613 -c68633 -62303 -fff74603 -87d793 -f34333 -664633 -ff67613 -261613 -c68633 -62783 -835313 -67c7b3 -e9dff06f -100007b7 -4a7aa23 -8067 -100007b7 -4a7a823 -100007b7 -4b7a623 -8067 -ff010113 -912223 -ff57493 -812423 -50413 -48513 -112623 -384000ef -100007b7 -547a783 -78663 -48513 -780e7 -a00793 -f41663 -d00513 -fc1ff0ef -40513 -c12083 -812403 -412483 -1010113 -8067 -ff010113 -812423 -112623 -10000437 -318000ef -50a63 -812403 -c12083 -1010113 -2b00006f -4c42783 -fe0782e3 -780e7 -fc050ee3 -812403 -100007b7 -c12083 -507a303 -1010113 -30067 -ff010113 -112623 -2d0000ef -2051263 -100007b7 -4c7a783 -78663 -780e7 -a03533 -c12083 -1010113 -8067 -100513 -ff1ff06f -ff010113 -812423 -112623 -50413 -44503 -2051063 -a00513 -f01ff0ef -c12083 -812403 -100513 -1010113 -8067 -ee9ff0ef -140413 -fd5ff06f -ff010113 -812423 -112623 -50413 -44503 -51a63 -c12083 -812403 -1010113 -8067 -eb5ff0ef -140413 -fe1ff06f -ef010113 -58693 -50613 -10000593 -10513 -10112623 -10812423 -abdff0ef -10010793 -50413 -a787b3 -10513 -f0078023 -f99ff0ef -40513 -10c12083 -10812403 -11010113 -8067 -fc010113 -2b12223 -2410593 -112e23 -2c12423 -2d12623 -2e12823 -2f12a23 -3012c23 -3112e23 -b12623 -f89ff0ef -1c12083 -4010113 -8067 -400f -13 -13 -13 -13 -13 -8067 -cc0027f3 -c79693 -147d713 -c6d693 -793 -d7e463 -8067 -78513 -7005500f -e787b3 -fedff06f -c00007b7 -c0004737 -7a683 -478793 -fee79ce3 -8067 -f00027b7 -40078713 -7a683 -478793 -150513 -fed50fa3 -fee798e3 -8067 -f00027b7 -8107a703 -277793 -2078463 -100005b7 -f00026b7 -10000637 -10000837 -6858593 -200893 -8086a783 -ff7f793 -78863 -177713 -2071c63 -8067 -6462783 -6082503 -178793 -7f7f793 -f50c63 -6462503 -8006a303 -6f62223 -a58533 -650023 -8116a823 -fbdff06f -100713 -f00027b7 -100006b7 -80e7a823 -100005b7 -10000737 -f0002637 -6868693 -5872503 -5c5a783 -f50863 -80462783 -ff7f793 -78463 -8067 -5872783 -f687b3 -807c783 -80f62023 -5872783 -178793 -7f7f793 -4f72c23 -fc5ff06f -30002673 -10000737 -867613 -6072783 -70693 -10000737 -2060663 -6472603 -fef60ee3 -10000737 -6870713 -f70733 -178793 -7f7f793 -74503 -6f6a023 -100006f -6472703 -513 -fcf71ce3 -8067 -10000737 -100007b7 -647a783 -6072503 -40f50533 -a03533 -8067 -100006b7 -5c6a603 -160793 -7f7f793 -300025f3 -85f593 -10000737 -4058663 -5872583 -fef58ee3 -bc0025f3 -ffe5f813 -bc081073 -5872703 -e61a63 -f0002837 -80482703 -ff77713 -2070663 -10000737 -6870713 -c70733 -8a70023 -4f6ae23 -bc059073 -c0006f -5872583 -faf59ee3 -8067 -80a82023 -fe9ff06f -100007b7 -607a223 -100007b7 -607a023 -100007b7 -407ae23 -100007b7 -407ac23 -f00027b7 -8107a703 -ff77713 -80e7a823 -300713 -80e7aa23 -bc0027f3 -17e793 -bc079073 -8067 -100007b7 -5c7a783 -100006b7 -586a703 -fef71ee3 -8067 -ff010113 -12623 -6300713 -c12783 -f75663 -1010113 -8067 -c12783 -178793 -f12623 -fe5ff06f -fe010113 -812c23 -2000413 -40b40433 -912a23 -1212823 -1312623 -1412423 -1512223 -1612023 -112e23 -58913 -851433 -f00074b7 -200993 -300a93 -600a13 -700b13 -4045663 -144a223 -f85ff0ef -164a223 -f7dff0ef -144a223 -fff90913 -141413 -fe0910e3 -1c12083 -1812403 -1412483 -1012903 -c12983 -812a03 -412a83 -12b03 -2010113 -8067 -134a223 -f3dff0ef -154a223 -f35ff0ef -134a223 -fb9ff06f -ff010113 -812423 -912223 -f0007437 -100493 -112623 -f11ff0ef -942223 -f09ff0ef -42223 -f01ff0ef -942223 -ef9ff0ef -c12083 -42223 -812403 -412483 -1010113 -8067 -fe010113 -112e23 -c12623 -812c23 -912a23 -f00077b7 -200713 -e7a223 -50493 -58413 -fff00513 -2000593 -ed9ff0ef -200593 -100513 -ecdff0ef -200593 -100513 -ec1ff0ef -48513 -500593 -eb5ff0ef -40513 -500593 -ea9ff0ef -200593 -200513 -e9dff0ef -c12603 -1000593 -60513 -e8dff0ef -1812403 -1c12083 -1412483 -2010113 -f25ff06f -fe010113 -112e23 -f00077b7 -200713 -812c23 -912a23 -1212823 -1312623 -1412423 -e7a223 -50493 -58413 -fff00513 -2000593 -e3dff0ef -200593 -100513 -e31ff0ef -200593 -200513 -e25ff0ef -48513 -500593 -e19ff0ef -40513 -500593 -f00079b7 -e09ff0ef -1000493 -eadff0ef -413 -498913 -100a13 -89a783 -141413 -17f793 -78463 -146413 -1492023 -dadff0ef -fff48493 -92023 -da1ff0ef -fc049ce3 -e71ff0ef -40513 -1c12083 -1812403 -1412483 -1012903 -c12983 -812a03 -2010113 -8067 -fc010113 -2112e23 -2812c23 -2912a23 -3212823 -3312623 -3412423 -3512223 -3612023 -1712e23 -1812c23 -1912a23 -1a12823 -c12623 -4c05c463 -b509b3 -50a13 -58a93 -68493 -a9f663 -fff54a93 -fff00993 -6b37 -6cb7 -a0413 -2500c13 -bc4b0b13 -2000b93 -520c8c93 -2bc0006f -1878a63 -1347463 -f40023 -140413 -29c0006f -913 -2b00713 -2d00613 -3000593 -2000513 -2300813 -c12683 -168793 -f12623 -16c783 -14e78063 -12f76263 -14a78063 -15078263 -1678733 -74703 -477713 -12070e63 -c10513 -984ff0ef -50713 -c12683 -2e00613 -fff00793 -6c583 -2c59e63 -168793 -f12623 -16c603 -cb07b3 -7c783 -47f793 -12078663 -c10513 -e12423 -944ff0ef -812703 -50793 -55463 -793 -c12683 -6800593 -6c603 -2b60263 -df67593 -4c00513 -a58c63 -5a00513 -a58863 -7400593 -fff00813 -2b61663 -60813 -168613 -c12623 -6c00613 -c81c63 -16c603 -1061863 -268693 -d12623 -4c00813 -c12683 -6c603 -6e00693 -2cd60c63 -ec6e063 -6300693 -14d60c63 -ac6ec63 -2d860c63 -5800693 -2cd60e63 -1347663 -2500793 -f40023 -c12783 -140713 -7c683 -2c068663 -1377463 -d400a3 -240413 -14c0006f -c78863 -eeb792e3 -196913 -ebdff06f -1096913 -eb5ff06f -496913 -eadff06f -896913 -ea5ff06f -2096913 -e9dff06f -2a00613 -fff00713 -ecc796e3 -4a703 -268693 -d12623 -448493 -ea075ce3 -40e00733 -1096913 -eadff06f -2a00593 -793 -eeb616e3 -268693 -4a503 -d12623 -448493 -ecdff06f -6400693 -d60663 -6900693 -f4d616e3 -296913 -a00693 -680006f -7300693 -14d60863 -4c6e463 -6f00693 -22d60063 -7000693 -f2d612e3 -fff00693 -d71663 -196913 -800713 -4a603 -448d13 -90813 -1000693 -40513 -98593 -ff1fe0ef -50413 -1640006f -7500693 -fad602e3 -7800593 -1000693 -ecb61ee3 -4c00613 -1cc81863 -748493 -ff84f493 -848d13 -4a603 -1f80006f -1097913 -a090c63 -40793 -448693 -1347663 -4a603 -c40023 -140413 -e78733 -408707b3 -8f04e63 -68493 -c12783 -178793 -f12623 -c12783 -7c783 -d40790e3 -a8663 -1b347c63 -40023 -41440533 -3c12083 -3812403 -3412483 -3012903 -2c12983 -2812a03 -2412a83 -2012b03 -1c12b83 -1812c03 -1412c83 -1012d03 -4010113 -8067 -1347463 -1740023 -140413 -fff78793 -fef048e3 -fff70793 -e04463 -100713 -40e78733 -170713 -f51ff06f -70793 -fddff06f -1347463 -1740023 -140413 -f55ff06f -448d13 -4a483 -49463 -c8493 -78593 -48513 -e12423 -1097913 -b61fe0ef -812703 -91863 -70793 -fff70713 -2f54863 -793 -2a7cc63 -50793 -55463 -793 -f40433 -e40733 -408707b3 -2f54c63 -d0493 -efdff06f -1347463 -1740023 -140413 -fbdff06f -f406b3 -136f863 -f48633 -64603 -c68023 -178793 -fb1ff06f -1347463 -1740023 -140413 -fb9ff06f -4a783 -41440733 -448493 -e7a023 -eadff06f -c13474e3 -1840023 -c01ff06f -4096913 -1000693 -e49ff06f -fff78793 -f12623 -70413 -e85ff06f -800693 -e31ff06f -6c00613 -448d13 -e2c80ce3 -fdf87613 -5a00593 -e2b606e3 -7400613 -e2c802e3 -6800613 -297593 -e0c81ce3 -4a603 -1061613 -59863 -1065613 -90813 -dc5ff06f -41065613 -ff5ff06f -fe098fa3 -e4dff06f -513 -e49ff06f -0 -f0004018 -f000404c -f0004080 -f00040b4 -f0004028 -f000405c -f0004090 -f00040c4 -616c6564 -203a7379 -0 -2d -64323025 -30252d2b -6432 -41524453 -6f6e204d -6e752077 -20726564 -74666f73 -65726177 -6e6f6320 -6c6f7274 -a -41524453 -6f6e204d -6e752077 -20726564 -64726168 -65726177 -6e6f6320 -6c6f7274 -a -63657250 -67726168 -a6465 -6f636e69 -63657272 -6f722074 -a77 -69746341 -65746176 -6f722064 -64252077 -a -78323025 -0 -72726473 -613c2064 -65726464 -a3e7373 -0 -6f636e69 -63657272 -64612074 -73657264 -a73 -6f636e69 -63657272 -51442074 -a -72726473 -72726564 -6f633c20 -3e746e75 -a -6f636e69 -63657272 -6f632074 -a746e75 -0 -783225 -77726473 -613c2072 -65726464 -a3e7373 -0 -746d654d -20747365 -20737562 -6c696166 -203a6465 -252f6425 -72652064 -73726f72 -a -746d654d -20747365 -61746164 -69616620 -3a64656c -2f642520 -65206425 -726f7272 -a73 -746d654d -20747365 -72646461 -69616620 -3a64656c -2f642520 -65206425 -726f7272 -a73 -746d654d -20747365 -a4b4f -64616552 -76656c20 -6e696c65 -a3a67 -2c64256d -64256220 -7c203a -6425 -207c -74736562 -256d203a -62202c64 -206425 -74696e49 -696c6169 -676e697a -52445320 -2e2e4d41 -a2e -6d315b1b -20202020 -20202020 -20205f5f -5f205f20 -2020205f -5f202020 -5f5f2020 -6d305b1b -a -6d315b1b -20202020 -2f202020 -20202f20 -20295f28 -5f5f5f2f -207c205f -2f5f2f7c -6d305b1b -a -6d315b1b -20202020 -202f2020 -2f5f5f2f -5f202f20 -2d202f5f -203e295f -5b1b3c20 -a6d30 -6d315b1b -20202020 -5f5f2f20 -5f2f5f5f -5f5f5c2f -5f5f5c2f -7c2f5f2f -5b1b7c5f -a6d30 -29632820 -706f4320 -67697279 -32207468 -2d323130 -39313032 -6a6e4520 -442d796f -74696769 -a6c61 -4f494220 -75622053 -20746c69 -46206e6f -32206265 -30322031 -31203032 -34303a35 -a35353a -0 -4f494220 -52432053 -61702043 -64657373 -30252820 -a297838 -0 -4f494220 -52432053 -61662043 -64656c69 -78652820 -74636570 -25206465 -2c783830 -746f6720 -38302520 -a2978 -65685420 -73797320 -206d6574 -6c6c6977 -6e6f6320 -756e6974 -62202c65 -65207475 -63657078 -72702074 -656c626f -a2e736d -0 -67694d20 -67206e65 -73207469 -3a316168 -31316420 -61353635 -a -74694c20 -67205865 -73207469 -3a316168 -62323020 -35616466 -a65 -3d3d2d2d -3d3d3d3d -3d3d3d3d -3d3d3d3d -5b1b203d -6f536d31 -305b1b43 -3d3d206d -3d3d3d3d -3d3d3d3d -3d3d3d3d -3d3d3d3d -a2d2d -6d315b1b -1b555043 -3a6d305b -20202020 -202020 -52786556 -76637369 -0 -25204020 -7a484d64 -a -6d315b1b -1b4d4f52 -3a6d305b -20202020 -25202020 -a424b64 -0 -6d315b1b -4d415253 -6d305b1b -2020203a -25202020 -a424b64 -0 -6d315b1b -5b1b324c -203a6d30 -20202020 -25202020 -a424b64 -0 -6d315b1b -4e49414d -4d41522d -6d305b1b -2520203a -a424b64 -0 -3d3d2d2d -3d3d3d3d -3d3d3d3d -315b1b20 -696e496d -6c616974 -74617a69 -1b6e6f69 -206d305b -3d3d3d3d -3d3d3d3d -3d3d3d3d -a2d2d -6f6d654d -69207972 -6974696e -7a696c61 -6f697461 -6166206e -64656c69 -a -3d3d2d2d -3d3d3d3d -3d3d3d3d -3d3d3d3d -315b1b20 -6f6f426d -305b1b74 -3d3d206d -3d3d3d3d -3d3d3d3d -3d3d3d3d -3d3d3d3d -a2d2d -62206f4e -20746f6f -6964656d -66206d75 -646e756f -a -3d3d2d2d -3d3d3d3d -3d3d3d3d -203d3d3d -6d315b1b -736e6f43 -1b656c6f -206d305b -3d3d3d3d -3d3d3d3d -3d3d3d3d -3d3d3d3d -a2d2d -32395b1b -6c6d313b -78657469 -6d305b1b -203e -82008 -726d -3c20726d -72646461 -3e737365 -656c5b20 -6874676e -a5d -6f636e69 -63657272 -656c2074 -6874676e -a -6f6d654d -64207972 -3a706d75 -0 -2578300a -20783830 -20 -78323025 -20 -2e -6325 -776d -3c20776d -72646461 -3e737365 -61763c20 -3e65756c -6f635b20 -5d746e75 -a -6f636e69 -63657272 -61762074 -a65756c -0 -636d -3c20636d -3e747364 -72733c20 -5b203e63 -6e756f63 -a5d74 -6f636e69 -63657272 -65642074 -6e697473 -6f697461 -6461206e -73657264 -a73 -6f636e69 -63657272 -6f732074 -65637275 -64646120 -73736572 -a -6f69646d -77 -6f69646d -703c2077 -64617968 -3c203e72 -3e676572 -61763c20 -3e65756c -a -6f636e69 -63657272 -68702074 -72646179 -a -6f636e69 -63657272 -65722074 -a67 -6f636e69 -63657272 -61762074 -a6c -6f69646d -72 -6f69646d -703c2072 -64617968 -3c203e72 -3e676572 -a -20676572 -203a6425 -30257830 -a7834 -6f69646d -64 -6f69646d -703c2064 -64617968 -3c203e72 -6e756f63 -a3e74 -4f49444d -6d756420 -30402070 -3a782578 -a -637263 -20637263 -6464613c -73736572 -6c3c203e -74676e65 -a3e68 -33435243 -25203a32 -a783830 -0 -6e656469 -74 -6e656449 -25203a74 -a73 -73756c66 -326c68 -6f626572 -746f -73616c66 -6f6f6268 -74 -69726573 -6f626c61 -746f -6274656e -746f6f -706c6568 -0 -6574694c -49422058 -202c534f -69617661 -6c62616c -6f632065 -6e616d6d -3a7364 -2020726d -20202020 -2d202020 -61657220 -64612064 -73657264 -70732073 -656361 -2020776d -20202020 -2d202020 -69727720 -61206574 -65726464 -73207373 -65636170 -0 -2020636d -20202020 -2d202020 -706f6320 -64612079 -73657264 -70732073 -656361 -6f69646d -20202077 -2d202020 -69727720 -4d206574 -204f4944 -69676572 -72657473 -0 -6f69646d -20202072 -2d202020 -61657220 -444d2064 -72204f49 -73696765 -726574 -6f69646d -20202064 -2d202020 -6d756420 -444d2070 -72204f49 -73696765 -73726574 -0 -20637263 -20202020 -2d202020 -6d6f6320 -65747570 -43524320 -6f203233 -20612066 -74726170 -20666f20 -20656874 -72646461 -20737365 -63617073 -65 -6e656469 -20202074 -2d202020 -73696420 -79616c70 -65646920 -6669746e -726569 -6f626572 -2020746f -2d202020 -73657220 -70207465 -65636f72 -726f7373 -0 -6274656e -20746f6f -2d202020 -6f6f6220 -69762074 -46542061 -5054 -69726573 -6f626c61 -2d20746f -6f6f6220 -69762074 -46532061 -4c -73616c66 -6f6f6268 -2d202074 -6f6f6220 -72662074 -66206d6f -6873616c -0 -746d656d -20747365 -2d202020 -6e757220 -6d206120 -726f6d65 -65742079 -7473 -72726473 -776f -73726473 -77 -68726473 -77 -72726473 -66756264 -0 -72726473 -64 -72726473 -72726564 -0 -77726473 -72 -69726473 -74696e -6c726473 -6c657665 -0 -746d656d -747365 -6d6d6f43 -20646e61 -20746f6e -6e756f66 -a64 -21e0 -221c -2280 -221c -2110 -22b8 -44354c73 -6d4d5364 -726b656b -a6f -4849367a -59633747 -36444944 -a6f -6f727245 -49203a72 -6c61766e -69206469 -6567616d -6e656c20 -20687467 -30257830 -a7838 -20435243 -6c696166 -28206465 -65707865 -64657463 -38302520 -67202c78 -2520746f -29783830 -a -6e776f44 -64616f6c -25206465 -79622064 -20736574 -6d6f7266 -20732520 -7265766f -54465420 -6f742050 -25783020 -a783830 -0 -62616e55 -7420656c -6f64206f -6f6c6e77 -25206461 -766f2073 -54207265 -a505446 -0 -63657845 -6e697475 -6f622067 -6465746f -6f727020 -6d617267 -20746120 -30257830 -a0a7838 -0 -3d3d2d2d -3d3d3d3d -3d3d3d3d -203d3d3d -6d315b1b -7466694c -2166666f -6d305b1b -3d3d3d20 -3d3d3d3d -3d3d3d3d -3d3d3d3d -a2d2d -746f6f42 -20676e69 -6d6f7266 -72657320 -2e6c6169 -a2e2e -73657250 -20512073 -4520726f -74204353 -6261206f -2074726f -746f6f62 -6d6f6320 -74656c70 -2e796c65 -a -206f6f54 -796e616d -6e6f6320 -75636573 -65766974 -72726520 -2c73726f -6f626120 -6e697472 -67 -656d6954 -a74756f -0 -636e6143 -656c6c65 -a64 -746f6f42 -20676e69 -6d6f7266 -74656e20 -6b726f77 -a2e2e2e -0 -61636f4c -5049206c -25203a20 -64252e64 -2e64252e -a6425 -6f6d6552 -49206574 -25203a50 -64252e64 -2e64252e -a6425 -63746546 -676e6968 -6f726620 -55203a6d -252f5044 -a64 -67616d49 -65 -7774654e -206b726f -746f6f62 -69616620 -a64656c -0 -746f6f72 -632e7366 -6f6970 -72206f4e -66746f6f -70632e73 -66206f69 -646e756f -a -32337672 -6274642e -0 -72206f4e -2e323376 -20627464 -6e756f66 -a64 -6c756d65 -726f7461 -6e69622e -0 -65206f4e -616c756d -2e726f74 -206e6962 -6e756f66 -a64 -62616e55 -7420656c -6f64206f -6f6c6e77 -4c206461 -78756e69 -616d6920 -2c736567 -6c616620 -676e696c -63616220 -6f74206b -6f6f6220 -69622e74 -a6e -746f6f62 -6e69622e -0 -64616f4c -20676e69 -6c756d65 -726f7461 -6e69622e -6f726620 -6c66206d -2e687361 -a2e2e -64616f4c -20676e69 -67616d49 -72662065 -66206d6f -6873616c -a2e2e2e -0 -64616f4c -20676e69 -746f6f72 -632e7366 -206f6970 -6d6f7266 -616c6620 -2e2e6873 -a2e -64616f4c -20676e69 -32337672 -6274642e -6f726620 -6c66206d -2e687361 -a2e2e -746f6f42 -20676e69 -6d6f7266 -616c6620 -2e2e6873 -a2e -64616f4c -20676e69 -62206425 -73657479 -6f726620 -6c66206d -2e687361 -a2e2e -65687445 -74656e72 -696e6920 -2e2e2e74 -a -5c2d2f7c -0 -8080808 -8080808 -28282808 -8082828 -8080808 -8080808 -8080808 -8080808 -101010a0 -10101010 -10101010 -10101010 -4040404 -4040404 -10100404 -10101010 -41414110 -1414141 -1010101 -1010101 -1010101 -1010101 -10010101 -10101010 -42424210 -2424242 -2020202 -2020202 -2020202 -2020202 -10020202 -8101010 -0 -0 -0 -0 -0 -0 -0 -0 -101010a0 -10101010 -10101010 -10101010 -10101010 -10101010 -10101010 -10101010 -1010101 -1010101 -1010101 -1010101 -1010101 -10010101 -1010101 -2010101 -2020202 -2020202 -2020202 -2020202 -2020202 -10020202 -2020202 -2020202 -33323130 -37363534 -42413938 -46454443 -4a494847 -4e4d4c4b -5251504f -56555453 -5a595857 -0 -33323130 -37363534 -62613938 -66656463 -6a696867 -6e6d6c6b -7271706f -76757473 -7a797877 -0 -726f6241 -2e646574 -0 -0 -1021 -2042 -3063 -4084 -50a5 -60c6 -70e7 -8108 -9129 -a14a -b16b -c18c -d1ad -e1ce -f1ef -1231 -210 -3273 -2252 -52b5 -4294 -72f7 -62d6 -9339 -8318 -b37b -a35a -d3bd -c39c -f3ff -e3de -2462 -3443 -420 -1401 -64e6 -74c7 -44a4 -5485 -a56a -b54b -8528 -9509 -e5ee -f5cf -c5ac -d58d -3653 -2672 -1611 -630 -76d7 -66f6 -5695 -46b4 -b75b -a77a -9719 -8738 -f7df -e7fe -d79d -c7bc -48c4 -58e5 -6886 -78a7 -840 -1861 -2802 -3823 -c9cc -d9ed -e98e -f9af -8948 -9969 -a90a -b92b -5af5 -4ad4 -7ab7 -6a96 -1a71 -a50 -3a33 -2a12 -dbfd -cbdc -fbbf -eb9e -9b79 -8b58 -bb3b -ab1a -6ca6 -7c87 -4ce4 -5cc5 -2c22 -3c03 -c60 -1c41 -edae -fd8f -cdec -ddcd -ad2a -bd0b -8d68 -9d49 -7e97 -6eb6 -5ed5 -4ef4 -3e13 -2e32 -1e51 -e70 -ff9f -efbe -dfdd -cffc -bf1b -af3a -9f59 -8f78 -9188 -81a9 -b1ca -a1eb -d10c -c12d -f14e -e16f -1080 -a1 -30c2 -20e3 -5004 -4025 -7046 -6067 -83b9 -9398 -a3fb -b3da -c33d -d31c -e37f -f35e -2b1 -1290 -22f3 -32d2 -4235 -5214 -6277 -7256 -b5ea -a5cb -95a8 -8589 -f56e -e54f -d52c -c50d -34e2 -24c3 -14a0 -481 -7466 -6447 -5424 -4405 -a7db -b7fa -8799 -97b8 -e75f -f77e -c71d -d73c -26d3 -36f2 -691 -16b0 -6657 -7676 -4615 -5634 -d94c -c96d -f90e -e92f -99c8 -89e9 -b98a -a9ab -5844 -4865 -7806 -6827 -18c0 -8e1 -3882 -28a3 -cb7d -db5c -eb3f -fb1e -8bf9 -9bd8 -abbb -bb9a -4a75 -5a54 -6a37 -7a16 -af1 -1ad0 -2ab3 -3a92 -fd2e -ed0f -dd6c -cd4d -bdaa -ad8b -9de8 -8dc9 -7c26 -6c07 -5c64 -4c45 -3ca2 -2c83 -1ce0 -cc1 -ef1f -ff3e -cf5d -df7c -af9b -bfba -8fd9 -9ff8 -6e17 -7e36 -4e55 -5e74 -2e93 -3eb2 -ed1 -1ef0 -0 -77073096 -ee0e612c -990951ba -76dc419 -706af48f -e963a535 -9e6495a3 -edb8832 -79dcb8a4 -e0d5e91e -97d2d988 -9b64c2b -7eb17cbd -e7b82d07 -90bf1d91 -1db71064 -6ab020f2 -f3b97148 -84be41de -1adad47d -6ddde4eb -f4d4b551 -83d385c7 -136c9856 -646ba8c0 -fd62f97a -8a65c9ec -14015c4f -63066cd9 -fa0f3d63 -8d080df5 -3b6e20c8 -4c69105e -d56041e4 -a2677172 -3c03e4d1 -4b04d447 -d20d85fd -a50ab56b -35b5a8fa -42b2986c -dbbbc9d6 -acbcf940 -32d86ce3 -45df5c75 -dcd60dcf -abd13d59 -26d930ac -51de003a -c8d75180 -bfd06116 -21b4f4b5 -56b3c423 -cfba9599 -b8bda50f -2802b89e -5f058808 -c60cd9b2 -b10be924 -2f6f7c87 -58684c11 -c1611dab -b6662d3d -76dc4190 -1db7106 -98d220bc -efd5102a -71b18589 -6b6b51f -9fbfe4a5 -e8b8d433 -7807c9a2 -f00f934 -9609a88e -e10e9818 -7f6a0dbb -86d3d2d -91646c97 -e6635c01 -6b6b51f4 -1c6c6162 -856530d8 -f262004e -6c0695ed -1b01a57b -8208f4c1 -f50fc457 -65b0d9c6 -12b7e950 -8bbeb8ea -fcb9887c -62dd1ddf -15da2d49 -8cd37cf3 -fbd44c65 -4db26158 -3ab551ce -a3bc0074 -d4bb30e2 -4adfa541 -3dd895d7 -a4d1c46d -d3d6f4fb -4369e96a -346ed9fc -ad678846 -da60b8d0 -44042d73 -33031de5 -aa0a4c5f -dd0d7cc9 -5005713c -270241aa -be0b1010 -c90c2086 -5768b525 -206f85b3 -b966d409 -ce61e49f -5edef90e -29d9c998 -b0d09822 -c7d7a8b4 -59b33d17 -2eb40d81 -b7bd5c3b -c0ba6cad -edb88320 -9abfb3b6 -3b6e20c -74b1d29a -ead54739 -9dd277af -4db2615 -73dc1683 -e3630b12 -94643b84 -d6d6a3e -7a6a5aa8 -e40ecf0b -9309ff9d -a00ae27 -7d079eb1 -f00f9344 -8708a3d2 -1e01f268 -6906c2fe -f762575d -806567cb -196c3671 -6e6b06e7 -fed41b76 -89d32be0 -10da7a5a -67dd4acc -f9b9df6f -8ebeeff9 -17b7be43 -60b08ed5 -d6d6a3e8 -a1d1937e -38d8c2c4 -4fdff252 -d1bb67f1 -a6bc5767 -3fb506dd -48b2364b -d80d2bda -af0a1b4c -36034af6 -41047a60 -df60efc3 -a867df55 -316e8eef -4669be79 -cb61b38c -bc66831a -256fd2a0 -5268e236 -cc0c7795 -bb0b4703 -220216b9 -5505262f -c5ba3bbe -b2bd0b28 -2bb45a92 -5cb36a04 -c2d7ffa7 -b5d0cf31 -2cd99e8b -5bdeae1d -9b64c2b0 -ec63f226 -756aa39c -26d930a -9c0906a9 -eb0e363f -72076785 -5005713 -95bf4a82 -e2b87a14 -7bb12bae -cb61b38 -92d28e9b -e5d5be0d -7cdcefb7 -bdbdf21 -86d3d2d4 -f1d4e242 -68ddb3f8 -1fda836e -81be16cd -f6b9265b -6fb077e1 -18b74777 -88085ae6 -ff0f6a70 -66063bca -11010b5c -8f659eff -f862ae69 -616bffd3 -166ccf45 -a00ae278 -d70dd2ee -4e048354 -3903b3c2 -a7672661 -d06016f7 -4969474d -3e6e77db -aed16a4a -d9d65adc -40df0b66 -37d83bf0 -a9bcae53 -debb9ec5 -47b2cf7f -30b5ffe9 -bdbdf21c -cabac28a -53b39330 -24b4a3a6 -bad03605 -cdd70693 -54de5729 -23d967bf -b3667a2e -c4614ab8 -5d681b02 -2a6f2b94 -b40bbe37 -c30c8ea1 -5a05df1b -2d02ef8d -4c554e3c -3e4c -d5e210 -0 -ffffffff -ffff -a3c14d97 diff --git a/sdc-plugin/tests/base_litex/mem_1.init b/sdc-plugin/tests/base_litex/mem_1.init deleted file mode 100644 index e69de29bb..000000000 diff --git a/sdc-plugin/tests/base_litex/mem_2.init b/sdc-plugin/tests/base_litex/mem_2.init deleted file mode 100644 index 3158a5729..000000000 --- a/sdc-plugin/tests/base_litex/mem_2.init +++ /dev/null @@ -1,7 +0,0 @@ -4e -65 -74 -53 -6f -43 -0 diff --git a/sdc-plugin/tests/compare_output_json.py b/sdc-plugin/tests/compare_output_json.py deleted file mode 100644 index 3b437e8c3..000000000 --- a/sdc-plugin/tests/compare_output_json.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python3 -""" - -This script extracts the top module cells and their corresponding parameters -from json files produced by Yosys. -The return code of this script is used to check if the output is equivalent. -""" - -import sys -import json -import argparse - -parameters = ["CLKFBOUT_CLKOUT1_HIGH_TIME"] - -def read_cells(json_file): - with open(json_file) as f: - data = json.load(f) - f.close() - cells = data['modules']['top']['cells'] - cells_parameters = dict() - for cell, opts in cells.items(): - attributes = opts['parameters'] - if len(attributes.keys()): - if any([x in parameters for x in attributes.keys()]): - cells_parameters[cell] = attributes - return cells_parameters - - -def main(args): - cells = read_cells(args.json) - if args.update: - with open(args.golden, 'w') as f: - json.dump(cells, f, indent=2) - else: - with open(args.golden) as f: - cells_golden = json.load(f) - if cells == cells_golden: - exit(0) - else: - print(json.dumps(cells, indent=4)) - json.dump(cells, open(args.json + ".fail", 'w'), indent=2) - print("VS") - print(json.dumps(cells_golden, indent=4)) - exit(1) - f.close() - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument('--json', help = 'JSON to compare', required = True) - parser.add_argument('--golden', help = 'Golden JSON file', required = True) - parser.add_argument('--update', action = 'store_true', help = 'Update golden reference') - args = parser.parse_args() - main(args) diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/sdc-plugin/tests/counter/counter.golden.sdc new file mode 100644 index 000000000..0ab3ac8de --- /dev/null +++ b/sdc-plugin/tests/counter/counter.golden.sdc @@ -0,0 +1,5 @@ +create_clock -period 10 -name clk_int_1 -waveform {0 5} clk_int_1 clk_int_2 ibuf_out middle_inst_1.clk middle_inst_1.clk_int middle_inst_2.clk middle_inst_2.clk_int middle_inst_3.clk middle_inst_3.clk_int +create_clock -period 10 -name clk -waveform {0 5} clk clk2 +create_clock -period 10 -waveform {1 6} ibuf_proxy_out +create_clock -period 10 -waveform {2 7} $auto$clkbufmap.cc:247:execute$1918 +create_clock -period 10 -waveform {1 6} $auto$clkbufmap.cc:247:execute$1920 diff --git a/sdc-plugin/tests/counter/counter.golden.txt b/sdc-plugin/tests/counter/counter.golden.txt new file mode 100644 index 000000000..2f3dfce9d --- /dev/null +++ b/sdc-plugin/tests/counter/counter.golden.txt @@ -0,0 +1 @@ +clk_int_1 clk ibuf_proxy_out {$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} diff --git a/sdc-plugin/tests/counter/counter.sdc b/sdc-plugin/tests/counter/counter.input.sdc similarity index 100% rename from sdc-plugin/tests/counter/counter.sdc rename to sdc-plugin/tests/counter/counter.input.sdc diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index 4471078b1..a27caf929 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -1,5 +1,4 @@ yosys -import -plugin -i xdc plugin -i sdc # Import the commands from the plugins to the tcl interpreter yosys -import @@ -10,33 +9,18 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + # Read the design's timing constraints -set ::env(INPUT_SDC_FILE) counter.sdc read_sdc $::env(INPUT_SDC_FILE) -set clocks [get_clocks] -puts $clocks + +# Propagate the clocks propagate_clocks -get_clocks -stop -#select top/w:clk %a -#return -# -##Read the design constraints -#read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) -# -## Map Xilinx tech library to 7-series VPR tech library. -#read_verilog -lib ../techmaps/cells_sim.v -#techmap -map ../techmaps/cells_map.v -# -## opt_expr -undriven makes sure all nets are driven, if only by the $undef -## net. -#opt_expr -undriven -#opt_clean -# -#setundef -zero -params -#stat -# -## Write the design in JSON format. -#write_json $::env(OUT_JSON) -#write_blif -attr -param -cname -conn $::env(OUT_EBLIF) +# Write the clocks to file +set fh [open counter.txt w] +set clocks [get_clocks] +puts $fh $clocks +close $fh + +# Write out the SDC file after the clock propagation step +write_sdc $::env(OUTPUT_SDC_FILE) diff --git a/sdc-plugin/tests/counter/counter.v b/sdc-plugin/tests/counter/counter.v index 2b671bba5..564fae58f 100644 --- a/sdc-plugin/tests/counter/counter.v +++ b/sdc-plugin/tests/counter/counter.v @@ -34,21 +34,3 @@ end assign out = cnt[0]; endmodule -/* -module dut(); -reg clk; -wire [1:0] out; - -top dut(.clk(clk), .in(2'b11), .out(out)); -initial begin - $dumpfile("test.vcd"); - $dumpvars(0,dut); - clk = 0; -end - -always -begin - clk = #5 !clk; -end -endmodule -*/ diff --git a/sdc-plugin/tests/counter/counter.xdc b/sdc-plugin/tests/counter/counter.xdc deleted file mode 100644 index 327fb51e4..000000000 --- a/sdc-plugin/tests/counter/counter.xdc +++ /dev/null @@ -1,15 +0,0 @@ -set_property LOC E3 [get_ports clk] -set_property IOSTANDARD LVCMOS33 [get_ports clk] - -set_property LOC J13 [get_ports {in[0]}] -set_property IOSTANDARD LVCMOS33 [get_ports {in[0]}] - -set_property LOC J14 [get_ports {in[1]}] -set_property IOSTANDARD LVCMOS33 [get_ports {in[1]}] - -set_property LOC K15 [get_ports {out[0]}] -set_property IOSTANDARD LVCMOS33 [get_ports {out[0]}] - -set_property LOC K16 [get_ports {out[1]}] -set_property IOSTANDARD LVCMOS33 [get_ports {out[1]}] - diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc new file mode 100644 index 000000000..72d68b15b --- /dev/null +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -0,0 +1,7 @@ +create_clock -period 10 -waveform {0 5} clk +create_clock -period 10 -waveform {0 5} $auto$clkbufmap.cc:247:execute$1829 +create_clock -period 2.5 -waveform {0 1.25} $auto$clkbufmap.cc:247:execute$1831 +create_clock -period 10 -waveform {1 6} $auto$clkbufmap.cc:247:execute$1827 +create_clock -period 10 -waveform {1 6} main_clkout0 +create_clock -period 2.5 -waveform {1 2.25} main_clkout1 +create_clock -period 10 -waveform {2 7} $techmap1716\FDCE_0.C diff --git a/sdc-plugin/tests/pll/pll.input.sdc b/sdc-plugin/tests/pll/pll.input.sdc new file mode 100644 index 000000000..00354d767 --- /dev/null +++ b/sdc-plugin/tests/pll/pll.input.sdc @@ -0,0 +1 @@ +create_clock -period 10 -waveform {0 5} clk diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl index 237381fe3..e103a5333 100644 --- a/sdc-plugin/tests/pll/pll.tcl +++ b/sdc-plugin/tests/pll/pll.tcl @@ -1,5 +1,4 @@ yosys -import -plugin -i xdc plugin -i sdc # Import the commands from the plugins to the tcl interpreter yosys -import @@ -11,29 +10,14 @@ hierarchy -check -auto-top # Start flow after library reading synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check -# -#Read the design timing constraints -set ::env(INPUT_SDC_FILE) pll.sdc + +# Read the design timing constraints read_sdc $::env(INPUT_SDC_FILE) + +# Propagate the clocks +propagate_clocks propagate_clocks -get_clocks -#return -# -##Read the design constraints -#read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) -# -## Map Xilinx tech library to 7-series VPR tech library. -#read_verilog -lib ../techmaps/cells_sim.v -#techmap -map ../techmaps/cells_map.v -# -## opt_expr -undriven makes sure all nets are driven, if only by the $undef -## net. -opt_expr -undriven -opt_clean -# -setundef -zero -params -stat -# -## Write the design in JSON format. -write_json $::env(OUT_JSON) -write_blif -attr -param -cname -conn $::env(OUT_EBLIF) +propagate_clocks + +# Write out the SDC file after the clock propagation step +write_sdc $::env(OUTPUT_SDC_FILE) diff --git a/sdc-plugin/tests/pll/pll.xdc b/sdc-plugin/tests/pll/pll.xdc deleted file mode 100644 index 2f4eba35d..000000000 --- a/sdc-plugin/tests/pll/pll.xdc +++ /dev/null @@ -1,9 +0,0 @@ -# ## clk100:0 -set_property LOC E3 [get_ports clk100] -set_property IOSTANDARD LVCMOS33 [get_ports clk100] -# ## cpu_reset:0 -set_property LOC C2 [get_ports cpu_reset] -set_property IOSTANDARD LVCMOS33 [get_ports cpu_reset] -set_property LOC H5 [get_ports {led[0]}] -set_property LOC J5 [get_ports {led[1]}] -set_property LOC T9 [get_ports {led[2]}] diff --git a/sdc-plugin/tests/techmaps/cells_map.v b/sdc-plugin/tests/techmaps/cells_map.v deleted file mode 100644 index 772f5889c..000000000 --- a/sdc-plugin/tests/techmaps/cells_map.v +++ /dev/null @@ -1,866 +0,0 @@ -// ============================================================================ -// CMT - -`define PLL_FRAC_PRECISION 10 -`define PLL_FIXED_WIDTH 32 - -// Rounds a fixed point number to a given precision -function [`PLL_FIXED_WIDTH:1] pll_round_frac -( -input [`PLL_FIXED_WIDTH:1] decimal, -input [`PLL_FIXED_WIDTH:1] precision -); - - if (decimal[(`PLL_FRAC_PRECISION - precision)] == 1'b1) begin - pll_round_frac = decimal + (1'b1 << (`PLL_FRAC_PRECISION - precision)); - end else begin - pll_round_frac = decimal; - end - -endfunction - -// Computes content of the PLLs divider registers -function [13:0] pll_divider_regs -( -input [ 7:0] divide, // Max divide is 128 -input [31:0] duty_cycle // Duty cycle is multiplied by 100,000 -); - - reg [`PLL_FIXED_WIDTH:1] duty_cycle_fix; - reg [`PLL_FIXED_WIDTH:1] duty_cycle_min; - reg [`PLL_FIXED_WIDTH:1] duty_cycle_max; - - reg [6:0] high_time; - reg [6:0] low_time; - reg w_edge; - reg no_count; - - reg [`PLL_FIXED_WIDTH:1] temp; - - if (divide >= 64) begin - duty_cycle_min = ((divide - 64) * 100_000) / divide; - duty_cycle_max = (645 / divide) * 100_00; - if (duty_cycle > duty_cycle_max) - duty_cycle = duty_cycle_max; - if (duty_cycle < duty_cycle_min) - duty_cycle = duty_cycle_min; - end - - duty_cycle_fix = (duty_cycle << `PLL_FRAC_PRECISION) / 100_000; - - if (divide == 7'h01) begin - high_time = 7'h01; - w_edge = 1'b0; - low_time = 7'h01; - no_count = 1'b1; - - end else begin - temp = pll_round_frac(duty_cycle_fix*divide, 1); - - high_time = temp[`PLL_FRAC_PRECISION+7:`PLL_FRAC_PRECISION+1]; - w_edge = temp[`PLL_FRAC_PRECISION]; - - if (high_time == 7'h00) begin - high_time = 7'h01; - w_edge = 1'b0; - end - - if (high_time == divide) begin - high_time = divide - 1; - w_edge = 1'b1; - end - - low_time = divide - high_time; - no_count = 1'b0; - end - - pll_divider_regs = {w_edge, no_count, high_time[5:0], low_time[5:0]}; -endfunction - -// Computes the PLLs phase shift registers -function [10:0] pll_phase_regs -( -input [ 7:0] divide, -input signed [31:0] phase -); - - reg [`PLL_FIXED_WIDTH:1] phase_in_cycles; - reg [`PLL_FIXED_WIDTH:1] phase_fixed; - reg [1:0] mx; - reg [5:0] delay_time; - reg [2:0] phase_mux; - - reg [`PLL_FIXED_WIDTH:1] temp; - - if(phase < 0) begin - phase_fixed = ((phase + 360000) << `PLL_FRAC_PRECISION) / 1000; - end else begin - phase_fixed = (phase << `PLL_FRAC_PRECISION) / 1000; - end - - phase_in_cycles = (phase_fixed * divide) / 360; - temp = pll_round_frac(phase_in_cycles, 3); - - mx = 2'b00; - phase_mux = temp[`PLL_FRAC_PRECISION:`PLL_FRAC_PRECISION-2]; - delay_time = temp[`PLL_FRAC_PRECISION+6:`PLL_FRAC_PRECISION+1]; - - pll_phase_regs = {mx, phase_mux, delay_time}; -endfunction - - -// Given PLL/MMCM divide, duty_cycle and phase calculates content of the -// CLKREG1 and CLKREG2. -function [37:0] pll_clkregs -( -input [7:0] divide, // Max divide is 128 -input [31:0] duty_cycle, // Multiplied by 100,000 -input signed [31:0] phase // Phase is given in degrees (-360,000 to 360,000) -); - - reg [13:0] pll_div; // EDGE, NO_COUNT, HIGH_TIME[5:0], LOW_TIME[5:0] - reg [10:0] pll_phase; // MX, PHASE_MUX[2:0], DELAY_TIME[5:0] - - pll_div = pll_divider_regs(divide, duty_cycle); - pll_phase = pll_phase_regs(divide, phase); - - pll_clkregs = { - // CLKREG2: RESERVED[6:0], MX[1:0], EDGE, NO_COUNT, DELAY_TIME[5:0] - 6'h00, pll_phase[10:9], pll_div[13:12], pll_phase[5:0], - // CLKREG1: PHASE_MUX[3:0], RESERVED, HIGH_TIME[5:0], LOW_TIME[5:0] - pll_phase[8:6], 1'b0, pll_div[11:0] - }; - -endfunction - -// This function takes the divide value and outputs the necessary lock values -function [39:0] pll_lktable_lookup -( -input [6:0] divide // Max divide is 64 -); - - reg [2559:0] lookup; - - lookup = { - // This table is composed of: - // LockRefDly_LockFBDly_LockCnt_LockSatHigh_UnlockCnt - 40'b00110_00110_1111101000_1111101001_0000000001, - 40'b00110_00110_1111101000_1111101001_0000000001, - 40'b01000_01000_1111101000_1111101001_0000000001, - 40'b01011_01011_1111101000_1111101001_0000000001, - 40'b01110_01110_1111101000_1111101001_0000000001, - 40'b10001_10001_1111101000_1111101001_0000000001, - 40'b10011_10011_1111101000_1111101001_0000000001, - 40'b10110_10110_1111101000_1111101001_0000000001, - 40'b11001_11001_1111101000_1111101001_0000000001, - 40'b11100_11100_1111101000_1111101001_0000000001, - 40'b11111_11111_1110000100_1111101001_0000000001, - 40'b11111_11111_1100111001_1111101001_0000000001, - 40'b11111_11111_1011101110_1111101001_0000000001, - 40'b11111_11111_1010111100_1111101001_0000000001, - 40'b11111_11111_1010001010_1111101001_0000000001, - 40'b11111_11111_1001110001_1111101001_0000000001, - 40'b11111_11111_1000111111_1111101001_0000000001, - 40'b11111_11111_1000100110_1111101001_0000000001, - 40'b11111_11111_1000001101_1111101001_0000000001, - 40'b11111_11111_0111110100_1111101001_0000000001, - 40'b11111_11111_0111011011_1111101001_0000000001, - 40'b11111_11111_0111000010_1111101001_0000000001, - 40'b11111_11111_0110101001_1111101001_0000000001, - 40'b11111_11111_0110010000_1111101001_0000000001, - 40'b11111_11111_0110010000_1111101001_0000000001, - 40'b11111_11111_0101110111_1111101001_0000000001, - 40'b11111_11111_0101011110_1111101001_0000000001, - 40'b11111_11111_0101011110_1111101001_0000000001, - 40'b11111_11111_0101000101_1111101001_0000000001, - 40'b11111_11111_0101000101_1111101001_0000000001, - 40'b11111_11111_0100101100_1111101001_0000000001, - 40'b11111_11111_0100101100_1111101001_0000000001, - 40'b11111_11111_0100101100_1111101001_0000000001, - 40'b11111_11111_0100010011_1111101001_0000000001, - 40'b11111_11111_0100010011_1111101001_0000000001, - 40'b11111_11111_0100010011_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001, - 40'b11111_11111_0011111010_1111101001_0000000001 - }; - - pll_lktable_lookup = lookup[ ((64-divide)*40) +: 40]; -endfunction - -// This function takes the divide value and the bandwidth setting of the PLL -// and outputs the digital filter settings necessary. -function [9:0] pll_table_lookup -( -input [6:0] divide, // Max divide is 64 -input [8*9:0] BANDWIDTH -); - - reg [639:0] lookup_low; - reg [639:0] lookup_high; - reg [639:0] lookup_optimized; - - reg [9:0] lookup_entry; - - lookup_low = { - // CP_RES_LFHF - 10'b0010_1111_00, - 10'b0010_1111_00, - 10'b0010_0111_00, - 10'b0010_1101_00, - 10'b0010_0101_00, - 10'b0010_0101_00, - 10'b0010_1001_00, - 10'b0010_1110_00, - 10'b0010_1110_00, - 10'b0010_0001_00, - 10'b0010_0001_00, - 10'b0010_0110_00, - 10'b0010_0110_00, - 10'b0010_0110_00, - 10'b0010_0110_00, - 10'b0010_1010_00, - 10'b0010_1010_00, - 10'b0010_1010_00, - 10'b0010_1010_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_1100_00, - 10'b0010_0010_00, - 10'b0010_0010_00, - 10'b0010_0010_00, - 10'b0010_0010_00, - 10'b0010_0010_00, - 10'b0010_0010_00, - 10'b0010_0010_00, - 10'b0010_0010_00, - 10'b0010_0010_00, - 10'b0010_0010_00, - 10'b0011_1100_00, - 10'b0011_1100_00, - 10'b0011_1100_00, - 10'b0011_1100_00, - 10'b0011_1100_00, - 10'b0011_1100_00, - 10'b0011_1100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00 - }; - - lookup_high = { - // CP_RES_LFHF - 10'b0011_0111_00, - 10'b0011_0111_00, - 10'b0101_1111_00, - 10'b0111_1111_00, - 10'b0111_1011_00, - 10'b1101_0111_00, - 10'b1110_1011_00, - 10'b1110_1101_00, - 10'b1111_1101_00, - 10'b1111_0111_00, - 10'b1111_1011_00, - 10'b1111_1101_00, - 10'b1111_0011_00, - 10'b1110_0101_00, - 10'b1111_0101_00, - 10'b1111_0101_00, - 10'b1111_0101_00, - 10'b1111_0101_00, - 10'b0111_0110_00, - 10'b0111_0110_00, - 10'b0111_0110_00, - 10'b0111_0110_00, - 10'b0101_1100_00, - 10'b0101_1100_00, - 10'b0101_1100_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b0100_0010_00, - 10'b0100_0010_00, - 10'b0100_0010_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0011_0100_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00 - }; - - lookup_optimized = { - // CP_RES_LFHF - 10'b0011_0111_00, - 10'b0011_0111_00, - 10'b0101_1111_00, - 10'b0111_1111_00, - 10'b0111_1011_00, - 10'b1101_0111_00, - 10'b1110_1011_00, - 10'b1110_1101_00, - 10'b1111_1101_00, - 10'b1111_0111_00, - 10'b1111_1011_00, - 10'b1111_1101_00, - 10'b1111_0011_00, - 10'b1110_0101_00, - 10'b1111_0101_00, - 10'b1111_0101_00, - 10'b1111_0101_00, - 10'b1111_0101_00, - 10'b0111_0110_00, - 10'b0111_0110_00, - 10'b0111_0110_00, - 10'b0111_0110_00, - 10'b0101_1100_00, - 10'b0101_1100_00, - 10'b0101_1100_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b1100_0001_00, - 10'b0100_0010_00, - 10'b0100_0010_00, - 10'b0100_0010_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0011_0100_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0010_1000_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0100_1100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00, - 10'b0010_0100_00 - }; - - if (BANDWIDTH == "LOW") begin - pll_table_lookup = lookup_low[((64-divide)*10) +: 10]; - end else if (BANDWIDTH == "HIGH") begin - pll_table_lookup = lookup_high[((64-divide)*10) +: 10]; - end else if (BANDWIDTH == "OPTIMIZED") begin - pll_table_lookup = lookup_optimized[((64-divide)*10) +: 10]; - end - -endfunction - -// ............................................................................ -// IMPORTANT NOTE: Due to lack of support for real type parameters in Yosys -// the PLL parameters that define duty cycles and phase shifts have to be -// provided as integers! The DUTY_CYCLE is expressed as % of high time times -// 1000 whereas the PHASE is expressed in degrees times 1000. - -// PLLE2_ADV -module PLLE2_ADV -( -input CLKFBIN, -input CLKIN1, -input CLKIN2, -input CLKINSEL, - -output CLKFBOUT, -output CLKOUT0, -output CLKOUT1, -output CLKOUT2, -output CLKOUT3, -output CLKOUT4, -output CLKOUT5, - -input PWRDWN, -input RST, -output LOCKED, - -input DCLK, -input DEN, -input DWE, -output DRDY, -input [ 6:0] DADDR, -input [15:0] DI, -output [15:0] DO -); - - parameter _TECHMAP_CONSTMSK_CLKINSEL_ = 0; - parameter _TECHMAP_CONSTVAL_CLKINSEL_ = 0; - - parameter _TECHMAP_CONSTMSK_RST_ = 0; - parameter _TECHMAP_CONSTVAL_RST_ = 0; - parameter _TECHMAP_CONSTMSK_PWRDWN_ = 0; - parameter _TECHMAP_CONSTVAL_PWRDWN_ = 0; - - parameter _TECHMAP_CONSTMSK_CLKFBOUT_ = 0; - parameter _TECHMAP_CONSTVAL_CLKFBOUT_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT0_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT0_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT1_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT1_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT2_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT2_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT3_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT3_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT4_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT4_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT5_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT5_ = 0; - - parameter _TECHMAP_CONSTMSK_DCLK_ = 0; - parameter _TECHMAP_CONSTVAL_DCLK_ = 0; - parameter _TECHMAP_CONSTMSK_DEN_ = 0; - parameter _TECHMAP_CONSTVAL_DEN_ = 0; - parameter _TECHMAP_CONSTMSK_DWE_ = 0; - parameter _TECHMAP_CONSTVAL_DWE_ = 0; - - parameter IS_CLKINSEL_INVERTED = 1'b0; - parameter IS_RST_INVERTED = 1'b0; - parameter IS_PWRDWN_INVERTED = 1'b0; - - parameter BANDWIDTH = "OPTIMIZED"; - parameter STARTUP_WAIT = "FALSE"; - parameter COMPENSATION = "ZHOLD"; - - parameter CLKIN1_PERIOD = 0.0; - parameter REF_JITTER1 = 0.01; - parameter CLKIN2_PERIOD = 0.0; - parameter REF_JITTER2 = 0.01; - - parameter [5:0] DIVCLK_DIVIDE = 1; - - parameter [5:0] CLKFBOUT_MULT = 1; - parameter CLKFBOUT_PHASE = 0; - - parameter [6:0] CLKOUT0_DIVIDE = 1; - parameter CLKOUT0_DUTY_CYCLE = 50000; - parameter signed CLKOUT0_PHASE = 0; - - parameter [6:0] CLKOUT1_DIVIDE = 1; - parameter CLKOUT1_DUTY_CYCLE = 50000; - parameter signed CLKOUT1_PHASE = 0; - - parameter [6:0] CLKOUT2_DIVIDE = 1; - parameter CLKOUT2_DUTY_CYCLE = 50000; - parameter signed CLKOUT2_PHASE = 0; - - parameter [6:0] CLKOUT3_DIVIDE = 1; - parameter CLKOUT3_DUTY_CYCLE = 50000; - parameter signed CLKOUT3_PHASE = 0; - - parameter [6:0] CLKOUT4_DIVIDE = 1; - parameter CLKOUT4_DUTY_CYCLE = 50000; - parameter signed CLKOUT4_PHASE = 0; - - parameter [6:0] CLKOUT5_DIVIDE = 1; - parameter CLKOUT5_DUTY_CYCLE = 50000; - parameter signed CLKOUT5_PHASE = 0; - - // Compute PLL's registers content - localparam CLKFBOUT_REGS = pll_clkregs(CLKFBOUT_MULT, 50000, CLKFBOUT_PHASE); - localparam DIVCLK_REGS = pll_clkregs(DIVCLK_DIVIDE, 50000, 0); - - localparam CLKOUT0_REGS = pll_clkregs(CLKOUT0_DIVIDE, CLKOUT0_DUTY_CYCLE, CLKOUT0_PHASE); - localparam CLKOUT1_REGS = pll_clkregs(CLKOUT1_DIVIDE, CLKOUT1_DUTY_CYCLE, CLKOUT1_PHASE); - localparam CLKOUT2_REGS = pll_clkregs(CLKOUT2_DIVIDE, CLKOUT2_DUTY_CYCLE, CLKOUT2_PHASE); - localparam CLKOUT3_REGS = pll_clkregs(CLKOUT3_DIVIDE, CLKOUT3_DUTY_CYCLE, CLKOUT3_PHASE); - localparam CLKOUT4_REGS = pll_clkregs(CLKOUT4_DIVIDE, CLKOUT4_DUTY_CYCLE, CLKOUT4_PHASE); - localparam CLKOUT5_REGS = pll_clkregs(CLKOUT5_DIVIDE, CLKOUT5_DUTY_CYCLE, CLKOUT5_PHASE); - - // Handle inputs that should have certain logic levels when left unconnected - generate if (_TECHMAP_CONSTMSK_CLKINSEL_ == 1) begin - localparam INV_CLKINSEL = !_TECHMAP_CONSTVAL_CLKINSEL_; - wire clkinsel = 1'b1; - end else if (_TECHMAP_CONSTVAL_CLKINSEL_ == 0) begin - localparam INV_CLKINSEL = IS_CLKINSEL_INVERTED; - wire clkinsel = 1'b1; - end else begin - localparam INV_CLKINSEL = IS_CLKINSEL_INVERTED; - wire clkinsel = CLKINSEL; - end endgenerate - - generate if (_TECHMAP_CONSTMSK_PWRDWN_ == 1) begin - localparam INV_PWRDWN = !_TECHMAP_CONSTVAL_PWRDWN_; - wire pwrdwn = 1'b1; - end else if (_TECHMAP_CONSTVAL_PWRDWN_ == 0) begin - localparam INV_PWRDWN = ~IS_PWRDWN_INVERTED; - wire pwrdwn = 1'b1; - end else begin - localparam INV_PWRDWN = IS_PWRDWN_INVERTED; - wire pwrdwn = PWRDWN; - end endgenerate - - generate if (_TECHMAP_CONSTMSK_RST_ == 1) begin - localparam INV_RST = !_TECHMAP_CONSTVAL_PWRDWN_; - wire rst = 1'b1; - end else if (_TECHMAP_CONSTVAL_RST_ == 0) begin - localparam INV_RST = ~IS_RST_INVERTED; - wire rst = 1'b1; - end else begin - localparam INV_RST = IS_RST_INVERTED; - wire rst = RST; - end endgenerate - - generate if (_TECHMAP_CONSTMSK_DCLK_ == 1) - wire dclk = _TECHMAP_CONSTVAL_DCLK_; - else if (_TECHMAP_CONSTVAL_DCLK_ == 0) - wire dclk = 1'b0; - else - wire dclk = DCLK; - endgenerate - - generate if (_TECHMAP_CONSTMSK_DEN_ == 1) - wire den = _TECHMAP_CONSTVAL_DEN_; - else if (_TECHMAP_CONSTVAL_DEN_ == 0) - wire den = 1'b0; - else - wire den = DEN; - endgenerate - - generate if (_TECHMAP_CONSTMSK_DWE_ == 1) - wire dwe = _TECHMAP_CONSTVAL_DWE_; - else if (_TECHMAP_CONSTVAL_DWE_ == 0) - wire dwe = 1'b0; - else - wire dwe = DWE; - endgenerate - - // The substituted cell - PLLE2_ADV_VPR # - ( - // Inverters - .INV_CLKINSEL(INV_CLKINSEL), - .ZINV_PWRDWN (INV_PWRDWN), - .ZINV_RST (INV_RST), - - // Straight mapped parameters - .STARTUP_WAIT(STARTUP_WAIT == "TRUE"), - - // Lookup tables - .LKTABLE(pll_lktable_lookup(CLKFBOUT_MULT)), - .TABLE(pll_table_lookup(CLKFBOUT_MULT, BANDWIDTH)), - - // FIXME: How to compute values the two below ? - .FILTREG1_RESERVED(12'b0000_00001000), - .LOCKREG3_RESERVED(1'b1), - - // Clock feedback settings - .CLKFBOUT_CLKOUT1_HIGH_TIME (CLKFBOUT_REGS[11:6]), - .CLKFBOUT_CLKOUT1_LOW_TIME (CLKFBOUT_REGS[5:0]), - .CLKFBOUT_CLKOUT1_PHASE_MUX (CLKFBOUT_REGS[15:13]), - .CLKFBOUT_CLKOUT2_DELAY_TIME (CLKFBOUT_REGS[21:16]), - .CLKFBOUT_CLKOUT2_EDGE (CLKFBOUT_REGS[23]), - .CLKFBOUT_CLKOUT2_NO_COUNT (CLKFBOUT_REGS[22]), - - // Internal VCO divider settings - .DIVCLK_DIVCLK_HIGH_TIME (DIVCLK_REGS[11:6]), - .DIVCLK_DIVCLK_LOW_TIME (DIVCLK_REGS[5:0]), - .DIVCLK_DIVCLK_NO_COUNT (DIVCLK_REGS[22]), - .DIVCLK_DIVCLK_EDGE (DIVCLK_REGS[23]), - - // CLKOUT0 - .CLKOUT0_CLKOUT1_HIGH_TIME (CLKOUT0_REGS[11:6]), - .CLKOUT0_CLKOUT1_LOW_TIME (CLKOUT0_REGS[5:0]), - .CLKOUT0_CLKOUT1_PHASE_MUX (CLKOUT0_REGS[15:13]), - .CLKOUT0_CLKOUT2_DELAY_TIME (CLKOUT0_REGS[21:16]), - .CLKOUT0_CLKOUT2_EDGE (CLKOUT0_REGS[23]), - .CLKOUT0_CLKOUT2_NO_COUNT (CLKOUT0_REGS[22]), - - // CLKOUT1 - .CLKOUT1_CLKOUT1_HIGH_TIME (CLKOUT1_REGS[11:6]), - .CLKOUT1_CLKOUT1_LOW_TIME (CLKOUT1_REGS[5:0]), - .CLKOUT1_CLKOUT1_PHASE_MUX (CLKOUT1_REGS[15:13]), - .CLKOUT1_CLKOUT2_DELAY_TIME (CLKOUT1_REGS[21:16]), - .CLKOUT1_CLKOUT2_EDGE (CLKOUT1_REGS[23]), - .CLKOUT1_CLKOUT2_NO_COUNT (CLKOUT1_REGS[22]), - - // CLKOUT2 - .CLKOUT2_CLKOUT1_HIGH_TIME (CLKOUT2_REGS[11:6]), - .CLKOUT2_CLKOUT1_LOW_TIME (CLKOUT2_REGS[5:0]), - .CLKOUT2_CLKOUT1_PHASE_MUX (CLKOUT2_REGS[15:13]), - .CLKOUT2_CLKOUT2_DELAY_TIME (CLKOUT2_REGS[21:16]), - .CLKOUT2_CLKOUT2_EDGE (CLKOUT2_REGS[23]), - .CLKOUT2_CLKOUT2_NO_COUNT (CLKOUT2_REGS[22]), - - // CLKOUT3 - .CLKOUT3_CLKOUT1_HIGH_TIME (CLKOUT3_REGS[11:6]), - .CLKOUT3_CLKOUT1_LOW_TIME (CLKOUT3_REGS[5:0]), - .CLKOUT3_CLKOUT1_PHASE_MUX (CLKOUT3_REGS[15:13]), - .CLKOUT3_CLKOUT2_DELAY_TIME (CLKOUT3_REGS[21:16]), - .CLKOUT3_CLKOUT2_EDGE (CLKOUT3_REGS[23]), - .CLKOUT3_CLKOUT2_NO_COUNT (CLKOUT3_REGS[22]), - - // CLKOUT4 - .CLKOUT4_CLKOUT1_HIGH_TIME (CLKOUT4_REGS[11:6]), - .CLKOUT4_CLKOUT1_LOW_TIME (CLKOUT4_REGS[5:0]), - .CLKOUT4_CLKOUT1_PHASE_MUX (CLKOUT4_REGS[15:13]), - .CLKOUT4_CLKOUT2_DELAY_TIME (CLKOUT4_REGS[21:16]), - .CLKOUT4_CLKOUT2_EDGE (CLKOUT4_REGS[23]), - .CLKOUT4_CLKOUT2_NO_COUNT (CLKOUT4_REGS[22]), - - // CLKOUT5 - .CLKOUT5_CLKOUT1_HIGH_TIME (CLKOUT5_REGS[11:6]), - .CLKOUT5_CLKOUT1_LOW_TIME (CLKOUT5_REGS[5:0]), - .CLKOUT5_CLKOUT1_PHASE_MUX (CLKOUT5_REGS[15:13]), - .CLKOUT5_CLKOUT2_DELAY_TIME (CLKOUT5_REGS[21:16]), - .CLKOUT5_CLKOUT2_EDGE (CLKOUT5_REGS[23]), - .CLKOUT5_CLKOUT2_NO_COUNT (CLKOUT5_REGS[22]), - - // Clock output enable controls - .CLKFBOUT_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKFBOUT_ === 1'bX), - - .CLKOUT0_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT0_ === 1'bX), - .CLKOUT1_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT1_ === 1'bX), - .CLKOUT2_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT2_ === 1'bX), - .CLKOUT3_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT3_ === 1'bX), - .CLKOUT4_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT4_ === 1'bX), - .CLKOUT5_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT5_ === 1'bX) - ) - _TECHMAP_REPLACE_ - ( - .CLKFBIN(CLKFBIN), - .CLKIN1(CLKIN1), - .CLKIN2(CLKIN2), - .CLKFBOUT(CLKFBOUT), - .CLKOUT0(CLKOUT0), - .CLKOUT1(CLKOUT1), - .CLKOUT2(CLKOUT2), - .CLKOUT3(CLKOUT3), - .CLKOUT4(CLKOUT4), - .CLKOUT5(CLKOUT5), - - .CLKINSEL (clkinsel), - - .PWRDWN (pwrdwn), - .RST (rst), - .LOCKED (LOCKED), - - .DCLK (dclk), - .DEN (den), - .DWE (dwe), - .DRDY (DRDY), - .DADDR(DADDR), - .DI (DI), - .DO (DO) - ); - -endmodule - -// PLLE2_BASE -module PLLE2_BASE -( -input CLKFBIN, -input CLKIN, - -output CLKFBOUT, -output CLKOUT0, -output CLKOUT1, -output CLKOUT2, -output CLKOUT3, -output CLKOUT4, -output CLKOUT5, - -input RST, -output LOCKED -); - - parameter IS_CLKINSEL_INVERTED = 1'b0; - parameter IS_RST_INVERTED = 1'b0; - - parameter BANDWIDTH = "OPTIMIZED"; - parameter STARTUP_WAIT = "FALSE"; - - parameter CLKIN1_PERIOD = 0.0; - parameter REF_JITTER1 = 0.1; - - parameter [5:0] DIVCLK_DIVIDE = 1; - - parameter [5:0] CLKFBOUT_MULT = 1; - parameter signed CLKFBOUT_PHASE = 0; - - parameter [6:0] CLKOUT0_DIVIDE = 1; - parameter CLKOUT0_DUTY_CYCLE = 50000; - parameter signed CLKOUT0_PHASE = 0; - - parameter [6:0] CLKOUT1_DIVIDE = 1; - parameter CLKOUT1_DUTY_CYCLE = 50000; - parameter signed CLKOUT1_PHASE = 0; - - parameter [6:0] CLKOUT2_DIVIDE = 1; - parameter CLKOUT2_DUTY_CYCLE = 50000; - parameter signed CLKOUT2_PHASE = 0; - - parameter [6:0] CLKOUT3_DIVIDE = 1; - parameter CLKOUT3_DUTY_CYCLE = 50000; - parameter signed CLKOUT3_PHASE = 0; - - parameter [6:0] CLKOUT4_DIVIDE = 1; - parameter CLKOUT4_DUTY_CYCLE = 50000; - parameter signed CLKOUT4_PHASE = 0; - - parameter [6:0] CLKOUT5_DIVIDE = 1; - parameter CLKOUT5_DUTY_CYCLE = 50000; - parameter signed CLKOUT5_PHASE = 0; - - // The substituted cell - PLLE2_ADV # - ( - .IS_CLKINSEL_INVERTED(IS_CLKINSEL_INVERTED), - .IS_RST_INVERTED(IS_RST_INVERTED), - .IS_PWRDWN_INVERTED(1'b0), - - .BANDWIDTH(BANDWIDTH), - .STARTUP_WAIT(STARTUP_WAIT), - - .CLKIN1_PERIOD(CLKIN1_PERIOD), - .REF_JITTER1(REF_JITTER1), - - .DIVCLK_DIVIDE(DIVCLK_DIVIDE), - - .CLKFBOUT_MULT(CLKFBOUT_MULT), - .CLKFBOUT_PHASE(CLKFBOUT_PHASE), - - .CLKOUT0_DIVIDE(CLKOUT0_DIVIDE), - .CLKOUT0_DUTY_CYCLE(CLKOUT0_DUTY_CYCLE), - .CLKOUT0_PHASE(CLKOUT0_PHASE), - - .CLKOUT1_DIVIDE(CLKOUT1_DIVIDE), - .CLKOUT1_DUTY_CYCLE(CLKOUT1_DUTY_CYCLE), - .CLKOUT1_PHASE(CLKOUT1_PHASE), - - .CLKOUT2_DIVIDE(CLKOUT2_DIVIDE), - .CLKOUT2_DUTY_CYCLE(CLKOUT2_DUTY_CYCLE), - .CLKOUT2_PHASE(CLKOUT2_PHASE), - - .CLKOUT3_DIVIDE(CLKOUT3_DIVIDE), - .CLKOUT3_DUTY_CYCLE(CLKOUT3_DUTY_CYCLE), - .CLKOUT3_PHASE(CLKOUT3_PHASE), - - .CLKOUT4_DIVIDE(CLKOUT4_DIVIDE), - .CLKOUT4_DUTY_CYCLE(CLKOUT4_DUTY_CYCLE), - .CLKOUT4_PHASE(CLKOUT4_PHASE), - - .CLKOUT5_DIVIDE(CLKOUT5_DIVIDE), - .CLKOUT5_DUTY_CYCLE(CLKOUT5_DUTY_CYCLE), - .CLKOUT5_PHASE(CLKOUT5_PHASE) - ) - _TECHMAP_REPLACE_ - ( - .CLKFBIN(CLKFBIN), - .CLKIN1(CLKIN), - .CLKINSEL(1'b1), - - .CLKFBOUT(CLKFBOUT), - .CLKOUT0(CLKOUT0), - .CLKOUT1(CLKOUT1), - .CLKOUT2(CLKOUT2), - .CLKOUT3(CLKOUT3), - .CLKOUT4(CLKOUT4), - .CLKOUT5(CLKOUT5), - - .PWRDWN(1'b0), - .RST(RST), - .LOCKED(LOCKED), - - .DCLK(1'b0), - .DEN(1'b0), - .DWE(1'b0), - .DRDY(), - .DADDR(7'd0), - .DI(16'd0), - .DO() - ); - -endmodule diff --git a/sdc-plugin/tests/techmaps/cells_sim.v b/sdc-plugin/tests/techmaps/cells_sim.v deleted file mode 100644 index 607f98b80..000000000 --- a/sdc-plugin/tests/techmaps/cells_sim.v +++ /dev/null @@ -1,145 +0,0 @@ -// ============================================================================ -// CMT - -// PLLE2_ADV_VPR -(* blackbox *) -module PLLE2_ADV_VPR -( -input CLKFBIN, -input CLKIN1, -input CLKIN2, -input CLKINSEL, - -output CLKFBOUT, -output CLKOUT0, -output CLKOUT1, -output CLKOUT2, -output CLKOUT3, -output CLKOUT4, -output CLKOUT5, - -input PWRDWN, -input RST, -output LOCKED, - -input DCLK, -input DEN, -input DWE, -output DRDY, -input [ 6:0] DADDR, -input [15:0] DI, -output [15:0] DO -); - - parameter [0:0] INV_CLKINSEL = 1'd0; - parameter [0:0] ZINV_PWRDWN = 1'd0; - parameter [0:0] ZINV_RST = 1'd1; - - parameter [0:0] STARTUP_WAIT = 1'd0; - - // Tables - parameter [9:0] TABLE = 10'd0; - parameter [39:0] LKTABLE = 40'd0; - parameter [15:0] POWER_REG = 16'd0; - parameter [11:0] FILTREG1_RESERVED = 12'd0; - parameter [9:0] FILTREG2_RESERVED = 10'd0; - parameter [5:0] LOCKREG1_RESERVED = 6'd0; - parameter [0:0] LOCKREG2_RESERVED = 1'b0; - parameter [0:0] LOCKREG3_RESERVED = 1'b0; - - // DIVCLK - parameter [5:0] DIVCLK_DIVCLK_HIGH_TIME = 6'd0; - parameter [5:0] DIVCLK_DIVCLK_LOW_TIME = 6'd0; - parameter [0:0] DIVCLK_DIVCLK_NO_COUNT = 1'b1; - parameter [0:0] DIVCLK_DIVCLK_EDGE = 1'b0; - - // CLKFBOUT - parameter [5:0] CLKFBOUT_CLKOUT1_HIGH_TIME = 6'd0; - parameter [5:0] CLKFBOUT_CLKOUT1_LOW_TIME = 6'd0; - parameter [0:0] CLKFBOUT_CLKOUT1_OUTPUT_ENABLE = 1'b0; - parameter [2:0] CLKFBOUT_CLKOUT1_PHASE_MUX = 3'd0; - parameter [5:0] CLKFBOUT_CLKOUT2_DELAY_TIME = 6'd0; - parameter [0:0] CLKFBOUT_CLKOUT2_EDGE = 1'b0; - parameter [2:0] CLKFBOUT_CLKOUT2_FRAC = 3'd0; - parameter [0:0] CLKFBOUT_CLKOUT2_FRAC_EN = 1'b0; - parameter [0:0] CLKFBOUT_CLKOUT2_FRAC_WF_R = 1'b0; - parameter [0:0] CLKFBOUT_CLKOUT2_NO_COUNT = 1'b1; - - // CLKOUT0 - parameter [5:0] CLKOUT0_CLKOUT1_HIGH_TIME = 6'd0; - parameter [5:0] CLKOUT0_CLKOUT1_LOW_TIME = 6'd0; - parameter [0:0] CLKOUT0_CLKOUT1_OUTPUT_ENABLE = 1'b0; - parameter [2:0] CLKOUT0_CLKOUT1_PHASE_MUX = 3'd0; - parameter [5:0] CLKOUT0_CLKOUT2_DELAY_TIME = 6'd0; - parameter [0:0] CLKOUT0_CLKOUT2_EDGE = 1'b0; - parameter [2:0] CLKOUT0_CLKOUT2_FRAC = 3'd0; - parameter [0:0] CLKOUT0_CLKOUT2_FRAC_EN = 1'b0; - parameter [0:0] CLKOUT0_CLKOUT2_FRAC_WF_R = 1'b0; - parameter [0:0] CLKOUT0_CLKOUT2_NO_COUNT = 1'b1; - - // CLKOUT1 - parameter [5:0] CLKOUT1_CLKOUT1_HIGH_TIME = 6'd0; - parameter [5:0] CLKOUT1_CLKOUT1_LOW_TIME = 6'd0; - parameter [0:0] CLKOUT1_CLKOUT1_OUTPUT_ENABLE = 1'b0; - parameter [2:0] CLKOUT1_CLKOUT1_PHASE_MUX = 3'd0; - parameter [5:0] CLKOUT1_CLKOUT2_DELAY_TIME = 6'd0; - parameter [0:0] CLKOUT1_CLKOUT2_EDGE = 1'b0; - parameter [2:0] CLKOUT1_CLKOUT2_FRAC = 3'd0; - parameter [0:0] CLKOUT1_CLKOUT2_FRAC_EN = 1'b0; - parameter [0:0] CLKOUT1_CLKOUT2_FRAC_WF_R = 1'b0; - parameter [0:0] CLKOUT1_CLKOUT2_NO_COUNT = 1'b1; - - // CLKOUT2 - parameter [5:0] CLKOUT2_CLKOUT1_HIGH_TIME = 6'd0; - parameter [5:0] CLKOUT2_CLKOUT1_LOW_TIME = 6'd0; - parameter [0:0] CLKOUT2_CLKOUT1_OUTPUT_ENABLE = 1'b0; - parameter [2:0] CLKOUT2_CLKOUT1_PHASE_MUX = 3'd0; - parameter [5:0] CLKOUT2_CLKOUT2_DELAY_TIME = 6'd0; - parameter [0:0] CLKOUT2_CLKOUT2_EDGE = 1'b0; - parameter [2:0] CLKOUT2_CLKOUT2_FRAC = 3'd0; - parameter [0:0] CLKOUT2_CLKOUT2_FRAC_EN = 1'b0; - parameter [0:0] CLKOUT2_CLKOUT2_FRAC_WF_R = 1'b0; - parameter [0:0] CLKOUT2_CLKOUT2_NO_COUNT = 1'b1; - - // CLKOUT3 - parameter [5:0] CLKOUT3_CLKOUT1_HIGH_TIME = 6'd0; - parameter [5:0] CLKOUT3_CLKOUT1_LOW_TIME = 6'd0; - parameter [0:0] CLKOUT3_CLKOUT1_OUTPUT_ENABLE = 1'b0; - parameter [2:0] CLKOUT3_CLKOUT1_PHASE_MUX = 3'd0; - parameter [5:0] CLKOUT3_CLKOUT2_DELAY_TIME = 6'd0; - parameter [0:0] CLKOUT3_CLKOUT2_EDGE = 1'b0; - parameter [2:0] CLKOUT3_CLKOUT2_FRAC = 3'd0; - parameter [0:0] CLKOUT3_CLKOUT2_FRAC_EN = 1'b0; - parameter [0:0] CLKOUT3_CLKOUT2_FRAC_WF_R = 1'b0; - parameter [0:0] CLKOUT3_CLKOUT2_NO_COUNT = 1'b1; - - // CLKOUT4 - parameter [5:0] CLKOUT4_CLKOUT1_HIGH_TIME = 6'd0; - parameter [5:0] CLKOUT4_CLKOUT1_LOW_TIME = 6'd0; - parameter [0:0] CLKOUT4_CLKOUT1_OUTPUT_ENABLE = 1'b0; - parameter [2:0] CLKOUT4_CLKOUT1_PHASE_MUX = 3'd0; - parameter [5:0] CLKOUT4_CLKOUT2_DELAY_TIME = 6'd0; - parameter [0:0] CLKOUT4_CLKOUT2_EDGE = 1'b0; - parameter [2:0] CLKOUT4_CLKOUT2_FRAC = 3'd0; - parameter [0:0] CLKOUT4_CLKOUT2_FRAC_EN = 1'b0; - parameter [0:0] CLKOUT4_CLKOUT2_FRAC_WF_R = 1'b0; - parameter [0:0] CLKOUT4_CLKOUT2_NO_COUNT = 1'b1; - - // CLKOUT5 - parameter [5:0] CLKOUT5_CLKOUT1_HIGH_TIME = 6'd0; - parameter [5:0] CLKOUT5_CLKOUT1_LOW_TIME = 6'd0; - parameter [0:0] CLKOUT5_CLKOUT1_OUTPUT_ENABLE = 1'b0; - parameter [2:0] CLKOUT5_CLKOUT1_PHASE_MUX = 3'd0; - parameter [5:0] CLKOUT5_CLKOUT2_DELAY_TIME = 6'd0; - parameter [0:0] CLKOUT5_CLKOUT2_EDGE = 1'b0; - parameter [2:0] CLKOUT5_CLKOUT2_FRAC = 3'd0; - parameter [0:0] CLKOUT5_CLKOUT2_FRAC_EN = 1'b0; - parameter [0:0] CLKOUT5_CLKOUT2_FRAC_WF_R = 1'b0; - parameter [0:0] CLKOUT5_CLKOUT2_NO_COUNT = 1'b1; - - - // TODO: Compensation parameters - - // TODO: How to simulate a PLL in verilog (i.e. the VCO) ??? - -endmodule diff --git a/sdc-plugin/tests/xc7a35tcsg324-1.json b/sdc-plugin/tests/xc7a35tcsg324-1.json deleted file mode 100644 index 602b949ab..000000000 --- a/sdc-plugin/tests/xc7a35tcsg324-1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "iobanks": { - "0": "X1Y78", - "14": "X1Y26", - "15": "X1Y78", - "16": "X1Y130", - "34": "X113Y26", - "35": "X113Y78" - } -} From b27d71493d03321fe0e736204eedbb486c592e16 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 20 Aug 2020 14:45:52 +0200 Subject: [PATCH 110/845] SDC: Update existing clock instead of replacing with new Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 5 ++--- sdc-plugin/clocks.cc | 26 +++++++++++++++++++++----- sdc-plugin/clocks.h | 7 +++++-- sdc-plugin/sdc.cc | 6 ++++++ 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index 072efe1ce..125b549c8 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -18,7 +18,6 @@ #include "buffers.h" const std::vector Pll::inputs = {"CLKIN1", "CLKIN2"}; -const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", - "CLKOUT3", "CLKOUT4", "CLKOUT5"}; -const float Pll::delay = 1; +const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", "CLKOUT5"}; +const float Pll::delay = 0; const std::string Pll::name = "PLLE2_ADV"; diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index c7f6e9db8..dc1dbcf6d 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -33,9 +33,11 @@ void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, [&](Clock& clock) { return clock.Name() == name; }); if (clock != clocks_.end()) { log("Clock %s already exists and will be overwritten\n", name.c_str()); - clocks_.erase(clock); + clock->UpdateClock(wire, period, rising_edge, falling_edge); + } else { + log("Inserting clock %s with period %f, r:%f, f:%f\n", name.c_str(), period, rising_edge, falling_edge); + clocks_.emplace_back(name, wire, period, rising_edge, falling_edge); } - clocks_.emplace_back(name, wire, period, rising_edge, falling_edge); } void Clocks::AddClock(Clock& clock) { @@ -145,9 +147,11 @@ void Clocks::PropagateThroughBuffer(BufferPropagation* pass, Clock& clock, Buffer buffer) { auto clock_wires = clock.GetClockWires(); for (auto clock_wire : clock_wires) { - log("%s\n", clock_wire->name.c_str()); - auto buf_wires = pass->FindSinkWiresForCellType(clock_wire, buffer.name, - buffer.output); +#ifdef SDC_DEBUG + log("Clock wire %s\n", RTLIL::unescape_id(clock_wire->name).c_str()); +#endif + auto buf_wires = pass->FindSinkWiresForCellType( + clock_wire, buffer.name, buffer.output); int path_delay(0); for (auto wire : buf_wires) { #ifdef SDC_DEBUG @@ -204,6 +208,18 @@ void Clock::AddWire(RTLIL::Wire* wire) { } } +void Clock::UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { + UpdateWires(wire); + UpdatePeriod(period); + UpdateWaveform(rising_edge, falling_edge); +} + +void Clock::UpdateWires(RTLIL::Wire* wire) { + if (std::find(clock_wires_.begin(), clock_wires_.end(), wire) == clock_wires_.end()) { + clock_wires_.push_back(wire); + } +} + void Clock::UpdatePeriod(float period) { period_ = period; rising_edge_ = 0; diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 97fe75c57..d98d5b492 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -41,8 +41,7 @@ class Clock { float Period() { return period_; } float RisingEdge() { return rising_edge_; } float FallingEdge() { return falling_edge_; } - void UpdatePeriod(float period); - void UpdateWaveform(float rising_edge, float falling_edge); + void UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); private: std::string name_; @@ -50,6 +49,10 @@ class Clock { float period_; float rising_edge_; float falling_edge_; + + void UpdateWires(RTLIL::Wire* wire); + void UpdatePeriod(float period); + void UpdateWaveform(float rising_edge, float falling_edge); }; class Clocks { diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index d158e5bdc..73eec15f8 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -104,6 +104,7 @@ struct CreateClockCmd : public Pass { RTLIL::Design* design) override { size_t argidx; std::string name; + bool is_waveform_specified(false); float rising_edge(0); float falling_edge(0); float period(0); @@ -126,6 +127,7 @@ struct CreateClockCmd : public Pass { [](char c) { return c != '{' or c != '}'; }); std::stringstream ss(edges); ss >> rising_edge >> falling_edge; + is_waveform_specified = true; continue; } break; @@ -159,6 +161,10 @@ struct CreateClockCmd : public Pass { if (name.empty()) { name = RTLIL::unescape_id(selected_wires.at(0)->name); } + if (!is_waveform_specified) { + rising_edge = 0; + falling_edge = period / 2; + } clocks_.AddClock(name, selected_wires, period, rising_edge, falling_edge); log("Created clock %s with period %f, waveform {%f %f}\n", name.c_str(), From 1da9b170ecb6f248b8e1e343b317073abf832bab Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 20 Aug 2020 15:23:05 +0200 Subject: [PATCH 111/845] SDC: Adjust SDC output for VPR Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 18 ++++++++++-------- sdc-plugin/clocks.h | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index dc1dbcf6d..09acff72e 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -170,14 +170,8 @@ void Clocks::WriteSdc(std::ostream& file) { for (auto& clock : clocks_) { auto clock_wires = clock.GetClockWires(); file << "create_clock -period " << clock.Period(); - if (clock_wires.size() > 1) { - file << " -name " << clock.Name(); - } - file << " -waveform {" << clock.RisingEdge() << " " - << clock.FallingEdge() << "}"; - for (auto clock_wire : clock_wires) { - file << " " << RTLIL::unescape_id(clock_wire->name); - } + file << " -waveform {" << clock.RisingEdge() << " " << clock.FallingEdge() << "}"; + file << " " << Clock::ClockWireName(clock_wires.at(0)); file << std::endl; } } @@ -231,3 +225,11 @@ void Clock::UpdateWaveform(float rising_edge, float falling_edge) { falling_edge_ = falling_edge; assert(falling_edge - rising_edge == period_ / 2); } + +std::string Clock::ClockWireName(RTLIL::Wire* wire) { + if (!wire) { + return std::string(); + } + std::string wire_name(RTLIL::unescape_id(wire->name)); + return std::regex_replace(wire_name, std::regex{"\\$"}, "\\$"); +} diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index d98d5b492..c1147a008 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -42,6 +42,7 @@ class Clock { float RisingEdge() { return rising_edge_; } float FallingEdge() { return falling_edge_; } void UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); + static std::string ClockWireName(RTLIL::Wire* wire); private: std::string name_; From 4241e81656592deb557a01ed8427ed9ed17fcde6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 20 Aug 2020 15:40:28 +0200 Subject: [PATCH 112/845] SDC: Clang format Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 3 ++- sdc-plugin/clocks.cc | 16 ++++++++++------ sdc-plugin/clocks.h | 20 ++++++++++---------- sdc-plugin/propagation.h | 4 ++-- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index 125b549c8..eb4d0a7be 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -18,6 +18,7 @@ #include "buffers.h" const std::vector Pll::inputs = {"CLKIN1", "CLKIN2"}; -const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", "CLKOUT5"}; +const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", + "CLKOUT3", "CLKOUT4", "CLKOUT5"}; const float Pll::delay = 0; const std::string Pll::name = "PLLE2_ADV"; diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 09acff72e..4a99e3775 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -35,7 +35,8 @@ void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, log("Clock %s already exists and will be overwritten\n", name.c_str()); clock->UpdateClock(wire, period, rising_edge, falling_edge); } else { - log("Inserting clock %s with period %f, r:%f, f:%f\n", name.c_str(), period, rising_edge, falling_edge); + log("Inserting clock %s with period %f, r:%f, f:%f\n", name.c_str(), + period, rising_edge, falling_edge); clocks_.emplace_back(name, wire, period, rising_edge, falling_edge); } } @@ -150,8 +151,8 @@ void Clocks::PropagateThroughBuffer(BufferPropagation* pass, Clock& clock, #ifdef SDC_DEBUG log("Clock wire %s\n", RTLIL::unescape_id(clock_wire->name).c_str()); #endif - auto buf_wires = pass->FindSinkWiresForCellType( - clock_wire, buffer.name, buffer.output); + auto buf_wires = pass->FindSinkWiresForCellType(clock_wire, buffer.name, + buffer.output); int path_delay(0); for (auto wire : buf_wires) { #ifdef SDC_DEBUG @@ -170,7 +171,8 @@ void Clocks::WriteSdc(std::ostream& file) { for (auto& clock : clocks_) { auto clock_wires = clock.GetClockWires(); file << "create_clock -period " << clock.Period(); - file << " -waveform {" << clock.RisingEdge() << " " << clock.FallingEdge() << "}"; + file << " -waveform {" << clock.RisingEdge() << " " + << clock.FallingEdge() << "}"; file << " " << Clock::ClockWireName(clock_wires.at(0)); file << std::endl; } @@ -202,14 +204,16 @@ void Clock::AddWire(RTLIL::Wire* wire) { } } -void Clock::UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { +void Clock::UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, + float falling_edge) { UpdateWires(wire); UpdatePeriod(period); UpdateWaveform(rising_edge, falling_edge); } void Clock::UpdateWires(RTLIL::Wire* wire) { - if (std::find(clock_wires_.begin(), clock_wires_.end(), wire) == clock_wires_.end()) { + if (std::find(clock_wires_.begin(), clock_wires_.end(), wire) == + clock_wires_.end()) { clock_wires_.push_back(wire); } } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index c1147a008..df60b6d82 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -33,15 +33,16 @@ class Clock { public: Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); - Clock(const std::string& name, std::vector wires, float period, - float rising_edge, float falling_edge); + Clock(const std::string& name, std::vector wires, + float period, float rising_edge, float falling_edge); void AddWire(RTLIL::Wire* wire); std::vector GetClockWires() { return clock_wires_; } const std::string& Name() const { return name_; } float Period() { return period_; } float RisingEdge() { return rising_edge_; } float FallingEdge() { return falling_edge_; } - void UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); + void UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, + float falling_edge); static std::string ClockWireName(RTLIL::Wire* wire); private: @@ -58,15 +59,13 @@ class Clock { class Clocks { public: - void AddClock(const std::string& name, - std::vector wires, float period, - float rising_edge, float falling_edge); + void AddClock(const std::string& name, std::vector wires, + float period, float rising_edge, float falling_edge); void AddClock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); void AddClock(Clock& clock); - void AddClockWires(const std::string& name, - std::vector wires, float period, - float rising_edge, float falling_edge); + void AddClockWires(const std::string& name, std::vector wires, + float period, float rising_edge, float falling_edge); void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); std::vector GetClockNames(); @@ -77,7 +76,8 @@ class Clocks { private: std::vector clocks_; - void PropagateThroughBuffer(BufferPropagation* pass, Clock& clock, Buffer buffer); + void PropagateThroughBuffer(BufferPropagation* pass, Clock& clock, + Buffer buffer); }; #endif // _CLOCKS_H_ diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index e09fc84ea..1f3125cbe 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -65,7 +65,7 @@ class ClockDividerPropagation : public Propagation { : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } - std::vector FindSinkClocksForCellType( - RTLIL::Wire* driver_wire, const std::string& cell_type); + std::vector FindSinkClocksForCellType(RTLIL::Wire* driver_wire, + const std::string& cell_type); }; #endif // PROPAGATION_H_ From ce2ccf0d90e7b654888adedaae05a4d8ba291cd8 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 20 Aug 2020 15:43:28 +0200 Subject: [PATCH 113/845] SDC: Update test references Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/counter/counter.golden.sdc | 8 ++++---- sdc-plugin/tests/pll/pll.golden.sdc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/sdc-plugin/tests/counter/counter.golden.sdc index 0ab3ac8de..852ce4fc5 100644 --- a/sdc-plugin/tests/counter/counter.golden.sdc +++ b/sdc-plugin/tests/counter/counter.golden.sdc @@ -1,5 +1,5 @@ -create_clock -period 10 -name clk_int_1 -waveform {0 5} clk_int_1 clk_int_2 ibuf_out middle_inst_1.clk middle_inst_1.clk_int middle_inst_2.clk middle_inst_2.clk_int middle_inst_3.clk middle_inst_3.clk_int -create_clock -period 10 -name clk -waveform {0 5} clk clk2 +create_clock -period 10 -waveform {0 5} clk_int_1 +create_clock -period 10 -waveform {0 5} clk create_clock -period 10 -waveform {1 6} ibuf_proxy_out -create_clock -period 10 -waveform {2 7} $auto$clkbufmap.cc:247:execute$1918 -create_clock -period 10 -waveform {1 6} $auto$clkbufmap.cc:247:execute$1920 +create_clock -period 10 -waveform {2 7} \$auto\$clkbufmap.cc:247:execute\$1918 +create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1920 diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index 72d68b15b..a37f82838 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,7 +1,7 @@ create_clock -period 10 -waveform {0 5} clk -create_clock -period 10 -waveform {0 5} $auto$clkbufmap.cc:247:execute$1829 -create_clock -period 2.5 -waveform {0 1.25} $auto$clkbufmap.cc:247:execute$1831 -create_clock -period 10 -waveform {1 6} $auto$clkbufmap.cc:247:execute$1827 +create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1827 +create_clock -period 10 -waveform {2 7} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 +create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:247:execute\$1831 create_clock -period 10 -waveform {1 6} main_clkout0 create_clock -period 2.5 -waveform {1 2.25} main_clkout1 -create_clock -period 10 -waveform {2 7} $techmap1716\FDCE_0.C From 634dad99635e400ea749b2690bf95945a9920bc6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 21 Aug 2020 15:13:49 +0200 Subject: [PATCH 114/845] SDC: Don't write create_clock commands for port nets Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 4a99e3775..e0c7e9d08 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -170,10 +170,20 @@ void Clocks::PropagateThroughBuffer(BufferPropagation* pass, Clock& clock, void Clocks::WriteSdc(std::ostream& file) { for (auto& clock : clocks_) { auto clock_wires = clock.GetClockWires(); + // FIXME: Input port nets are not found in VPR + if (std::all_of(clock_wires.begin(), clock_wires.end(), + [&](RTLIL::Wire* wire) { return wire->port_input; })) { + continue; + } file << "create_clock -period " << clock.Period(); file << " -waveform {" << clock.RisingEdge() << " " << clock.FallingEdge() << "}"; - file << " " << Clock::ClockWireName(clock_wires.at(0)); + for (auto clock_wire : clock_wires) { + if (clock_wire->port_input) { + continue; + } + file << " " << Clock::ClockWireName(clock_wire); + } file << std::endl; } } From c824d79b8ac0432cb1c65ceb055a83e875868f98 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 21 Aug 2020 15:14:45 +0200 Subject: [PATCH 115/845] SDC: Don't perform natural propagation Alias nets in clock targets cause errors in VPR Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 73eec15f8..888fbdf3d 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -229,9 +229,7 @@ struct PropagateClocksCmd : public Pass { log_cmd_error("No top module selected\n"); } - std::array, 3> passes{ - std::unique_ptr( - new NaturalPropagation(design, this)), + std::array, 2> passes{ std::unique_ptr( new BufferPropagation(design, this)), std::unique_ptr( From de839d118a0e079493aa1d49c08687396f9767f5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 25 Aug 2020 14:03:28 +0200 Subject: [PATCH 116/845] SDC: Don't set SDC_DEBUG macro Signed-off-by: Tomasz Michalak --- sdc-plugin/Makefile | 2 +- sdc-plugin/clocks.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index 3b4628a19..b4694ca86 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -1,5 +1,5 @@ CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -DSDC_DEBUG +CXXFLAGS = $(shell yosys-config --cxxflags) LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index e0c7e9d08..85de7a6ba 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -78,8 +78,8 @@ std::vector Clocks::GetClockNames() { log("create_clock -period %f -name %s -waveform {%f %f} %s\n", clock.Period(), clock.Name().c_str(), clock.RisingEdge(), clock.FallingEdge(), ss.str().c_str()); - } #endif + } return res; } From d6d5b54a531574100a5974bf2a711cdc73d56cd2 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 25 Aug 2020 14:16:36 +0200 Subject: [PATCH 117/845] SDC: Update tests and make them run in CI Signed-off-by: Tomasz Michalak --- Makefile | 2 +- sdc-plugin/tests/counter/counter.golden.sdc | 1 - sdc-plugin/tests/pll/pll.golden.sdc | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6818481ed..0427c0dd2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params selection +PLUGIN_LIST := fasm xdc params selection sdc PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/sdc-plugin/tests/counter/counter.golden.sdc index 852ce4fc5..41a186576 100644 --- a/sdc-plugin/tests/counter/counter.golden.sdc +++ b/sdc-plugin/tests/counter/counter.golden.sdc @@ -1,5 +1,4 @@ create_clock -period 10 -waveform {0 5} clk_int_1 -create_clock -period 10 -waveform {0 5} clk create_clock -period 10 -waveform {1 6} ibuf_proxy_out create_clock -period 10 -waveform {2 7} \$auto\$clkbufmap.cc:247:execute\$1918 create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1920 diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index a37f82838..03918cada 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,4 +1,3 @@ -create_clock -period 10 -waveform {0 5} clk create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1827 create_clock -period 10 -waveform {2 7} \$techmap1716\FDCE_0.C create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 From ab3c62c5e0058298b3c764b187c93a926f8a3f4b Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 26 Aug 2020 16:59:50 +0200 Subject: [PATCH 118/845] SDC: Perform buffer propagation in two steps Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 85de7a6ba..82944a436 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -112,6 +112,11 @@ void Clocks::Propagate(BufferPropagation* pass) { log("Processing clock %s\n", clock.Name().c_str()); #endif PropagateThroughBuffer(pass, clock, IBuf()); + } + for (auto clock : clocks_) { +#ifdef SDC_DEBUG + log("Processing clock %s\n", clock.Name().c_str()); +#endif PropagateThroughBuffer(pass, clock, Bufg()); } #ifdef SDC_DEBUG From b594bf661fffad5937c54045771ad7f8973d2b9b Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 26 Aug 2020 17:00:26 +0200 Subject: [PATCH 119/845] SDC: Perform buffer propagation after clock divider propagation Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 3 ++- sdc-plugin/clocks.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 82944a436..d634bb74c 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -141,6 +141,7 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { log("PLL clock: %s\n", pll_clock.Name().c_str()); #endif AddClock(pll_clock); + PropagateThroughBuffer(pass, pll_clock, Bufg()); } } } @@ -149,7 +150,7 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { #endif } -void Clocks::PropagateThroughBuffer(BufferPropagation* pass, Clock& clock, +void Clocks::PropagateThroughBuffer(Propagation* pass, Clock& clock, Buffer buffer) { auto clock_wires = clock.GetClockWires(); for (auto clock_wire : clock_wires) { diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index df60b6d82..f4b0e53cd 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -28,6 +28,7 @@ USING_YOSYS_NAMESPACE class NaturalPropagation; class BufferPropagation; class ClockDividerPropagation; +class Propagation; class Clock { public: @@ -76,7 +77,7 @@ class Clocks { private: std::vector clocks_; - void PropagateThroughBuffer(BufferPropagation* pass, Clock& clock, + void PropagateThroughBuffer(Propagation* pass, Clock& clock, Buffer buffer); }; From 16626f20dfe14fa87613ff547be41fce0cf0716c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 26 Aug 2020 17:01:21 +0200 Subject: [PATCH 120/845] SDC: Update PLL test Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/pll/pll.golden.sdc | 2 +- sdc-plugin/tests/pll/pll.tcl | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index 03918cada..4f9a132fc 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,6 +1,6 @@ create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1827 create_clock -period 10 -waveform {2 7} \$techmap1716\FDCE_0.C create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:247:execute\$1831 create_clock -period 10 -waveform {1 6} main_clkout0 +create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:247:execute\$1831 create_clock -period 2.5 -waveform {1 2.25} main_clkout1 diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl index e103a5333..61e67f6d6 100644 --- a/sdc-plugin/tests/pll/pll.tcl +++ b/sdc-plugin/tests/pll/pll.tcl @@ -16,8 +16,6 @@ read_sdc $::env(INPUT_SDC_FILE) # Propagate the clocks propagate_clocks -propagate_clocks -propagate_clocks # Write out the SDC file after the clock propagation step write_sdc $::env(OUTPUT_SDC_FILE) From 94084ee118077eb384d8449bbb37d5d20230fa42 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 26 Aug 2020 17:11:05 +0200 Subject: [PATCH 121/845] SDC: Fix counter test references Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/counter/counter.golden.sdc | 2 ++ sdc-plugin/tests/counter/counter.golden.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/sdc-plugin/tests/counter/counter.golden.sdc index 41a186576..3c9a20c61 100644 --- a/sdc-plugin/tests/counter/counter.golden.sdc +++ b/sdc-plugin/tests/counter/counter.golden.sdc @@ -2,3 +2,5 @@ create_clock -period 10 -waveform {0 5} clk_int_1 create_clock -period 10 -waveform {1 6} ibuf_proxy_out create_clock -period 10 -waveform {2 7} \$auto\$clkbufmap.cc:247:execute\$1918 create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1920 +create_clock -period 10 -waveform {3 8} middle_inst_1.clk_int +create_clock -period 10 -waveform {2 7} middle_inst_4.clk diff --git a/sdc-plugin/tests/counter/counter.golden.txt b/sdc-plugin/tests/counter/counter.golden.txt index 2f3dfce9d..065b11094 100644 --- a/sdc-plugin/tests/counter/counter.golden.txt +++ b/sdc-plugin/tests/counter/counter.golden.txt @@ -1 +1 @@ -clk_int_1 clk ibuf_proxy_out {$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} +clk_int_1 clk ibuf_proxy_out {$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} middle_inst_1.clk_int middle_inst_4.clk From 44429fb14ebe51e85f2c7838056043cb16522ee7 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 2 Sep 2020 14:18:26 +0200 Subject: [PATCH 122/845] SDC: Change default IBUF delay to 0 Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.h | 2 +- sdc-plugin/tests/counter/counter.golden.sdc | 10 +++++----- sdc-plugin/tests/pll/pll.golden.sdc | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index 32a60b27f..024416bbd 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -36,7 +36,7 @@ struct Buffer { }; struct IBuf : Buffer { - IBuf() : Buffer(1, "IBUF", "O"){}; + IBuf() : Buffer(0, "IBUF", "O"){}; }; struct Bufg : Buffer { diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/sdc-plugin/tests/counter/counter.golden.sdc index 3c9a20c61..a70e95d8e 100644 --- a/sdc-plugin/tests/counter/counter.golden.sdc +++ b/sdc-plugin/tests/counter/counter.golden.sdc @@ -1,6 +1,6 @@ create_clock -period 10 -waveform {0 5} clk_int_1 -create_clock -period 10 -waveform {1 6} ibuf_proxy_out -create_clock -period 10 -waveform {2 7} \$auto\$clkbufmap.cc:247:execute\$1918 -create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1920 -create_clock -period 10 -waveform {3 8} middle_inst_1.clk_int -create_clock -period 10 -waveform {2 7} middle_inst_4.clk +create_clock -period 10 -waveform {0 5} ibuf_proxy_out +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1918 +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1920 +create_clock -period 10 -waveform {1 6} middle_inst_1.clk_int +create_clock -period 10 -waveform {1 6} middle_inst_4.clk diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index 4f9a132fc..c6ba07aa8 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,5 +1,5 @@ -create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1827 -create_clock -period 10 -waveform {2 7} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1827 +create_clock -period 10 -waveform {1 6} \$techmap1716\FDCE_0.C create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 create_clock -period 10 -waveform {1 6} main_clkout0 create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:247:execute\$1831 From ea92198645eaf102d092c74d68ab5d8a3f226cb9 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 9 Sep 2020 13:03:18 +0200 Subject: [PATCH 123/845] SDC: Simplify API Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 47 +++++++++++++------------------------------- sdc-plugin/clocks.h | 5 ----- 2 files changed, 14 insertions(+), 38 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index d634bb74c..86e40e0d9 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -23,7 +23,9 @@ void Clocks::AddClock(const std::string& name, std::vector wires, float period, float rising_edge, float falling_edge) { - AddClockWires(name, wires, period, rising_edge, falling_edge); + std::for_each(wires.begin(), wires.end(), [&, this](RTLIL::Wire* wire) { + AddClock(name, wire, period, rising_edge, falling_edge); + }); } void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, @@ -46,26 +48,6 @@ void Clocks::AddClock(Clock& clock) { clock.RisingEdge(), clock.FallingEdge()); } -void Clocks::AddClockWires(const std::string& name, - std::vector wires, float period, - float rising_edge, float falling_edge) { - std::for_each(wires.begin(), wires.end(), [&, this](RTLIL::Wire* wire) { - AddClockWire(name, wire, period, rising_edge, falling_edge); - }); -} - -void Clocks::AddClockWire(const std::string& name, RTLIL::Wire* wire, - float period, float rising_edge, float falling_edge) { - auto clock = - std::find_if(clocks_.begin(), clocks_.end(), - [&](Clock& clock) { return clock.Name() == name; }); - if (clock == clocks_.end()) { - AddClock(name, wire, period, rising_edge, falling_edge); - } else { - clock->AddWire(wire); - } -} - std::vector Clocks::GetClockNames() { std::vector res; for (auto clock : clocks_) { @@ -94,7 +76,7 @@ void Clocks::Propagate(NaturalPropagation* pass) { auto clock_wires = clock.GetClockWires(); for (auto clock_wire : clock_wires) { auto aliases = pass->FindAliasWires(clock_wire); - AddClockWires(clock.Name(), aliases, clock.Period(), + AddClock(clock.Name(), aliases, clock.Period(), clock.RisingEdge(), clock.FallingEdge()); } } @@ -106,14 +88,20 @@ void Clocks::Propagate(NaturalPropagation* pass) { void Clocks::Propagate(BufferPropagation* pass) { #ifdef SDC_DEBUG log("Start buffer clock propagation\n"); + log("IBUF pass\n"); #endif - for (auto clock : clocks_) { + std::vector clocks(clocks_); + for (auto clock : clocks) { #ifdef SDC_DEBUG log("Processing clock %s\n", clock.Name().c_str()); #endif PropagateThroughBuffer(pass, clock, IBuf()); } - for (auto clock : clocks_) { +#ifdef SDC_DEBUG + log("BUFG pass\n"); +#endif + clocks = clocks_; + for (auto clock : clocks) { #ifdef SDC_DEBUG log("Processing clock %s\n", clock.Name().c_str()); #endif @@ -200,7 +188,7 @@ Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, period_(period), rising_edge_(rising_edge), falling_edge_(falling_edge) { - AddWire(wire); + UpdateWires(wire); } Clock::Clock(const std::string& name, std::vector wires, @@ -210,14 +198,7 @@ Clock::Clock(const std::string& name, std::vector wires, rising_edge_(rising_edge), falling_edge_(falling_edge) { std::for_each(wires.begin(), wires.end(), - [&, this](RTLIL::Wire* wire) { AddWire(wire); }); -} - -void Clock::AddWire(RTLIL::Wire* wire) { - auto clock_wire = std::find(clock_wires_.begin(), clock_wires_.end(), wire); - if (clock_wire == clock_wires_.end()) { - clock_wires_.push_back(wire); - } + [&, this](RTLIL::Wire* wire) { UpdateWires(wire); }); } void Clock::UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index f4b0e53cd..faa8aec47 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -36,7 +36,6 @@ class Clock { float rising_edge, float falling_edge); Clock(const std::string& name, std::vector wires, float period, float rising_edge, float falling_edge); - void AddWire(RTLIL::Wire* wire); std::vector GetClockWires() { return clock_wires_; } const std::string& Name() const { return name_; } float Period() { return period_; } @@ -65,10 +64,6 @@ class Clocks { void AddClock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); void AddClock(Clock& clock); - void AddClockWires(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge); - void AddClockWire(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); std::vector GetClockNames(); void Propagate(NaturalPropagation* pass); void Propagate(BufferPropagation* pass); From e5a04f5f8499ef2252d8e8d58c2e75fce717cde5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 9 Sep 2020 13:04:00 +0200 Subject: [PATCH 124/845] SDC: Remove some assumptions when updating period and waveform values Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 86e40e0d9..ce1b7046a 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -217,14 +217,11 @@ void Clock::UpdateWires(RTLIL::Wire* wire) { void Clock::UpdatePeriod(float period) { period_ = period; - rising_edge_ = 0; - falling_edge_ = period / 2; } void Clock::UpdateWaveform(float rising_edge, float falling_edge) { rising_edge_ = rising_edge; falling_edge_ = falling_edge; - assert(falling_edge - rising_edge == period_ / 2); } std::string Clock::ClockWireName(RTLIL::Wire* wire) { From 56efb7460aef981788b35bbba6be108632337eec Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 10 Sep 2020 17:28:21 +0200 Subject: [PATCH 125/845] SDC: Add duty cycle and input clock delay to output clock Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.h | 28 ++++++++++++++++++++++++++++ sdc-plugin/clocks.cc | 9 +++++++++ sdc-plugin/clocks.h | 1 + sdc-plugin/propagation.cc | 8 +++++--- sdc-plugin/tests/pll/pll.golden.sdc | 8 ++++---- sdc-plugin/tests/pll/pll.v | 4 ++-- 6 files changed, 49 insertions(+), 9 deletions(-) diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index 024416bbd..fcce64f17 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -61,12 +61,32 @@ struct Pll { divclk_divisor = cell->getParam(ID(DIVCLK_DIVIDE)).as_int(); } for (auto clk_output : outputs) { + // CLKOUT[0-5]_DIVIDE RTLIL::IdString param(RTLIL::escape_id(clk_output + "_DIVIDE")); if (cell->hasParam(param)) { clkout_divisors[clk_output] = cell->getParam(param).as_int(); } else { clkout_divisors[clk_output] = 1; } + clkout_period[clk_output] = CalculatePeriod(clk_output); + + // CLKOUT[0-5]_PHASE + param = RTLIL::escape_id(clk_output + "_PHASE"); + if (cell->hasParam(param)) { + clkout_phase[clk_output] = std::stof(cell->getParam(param).decode_string()); + } else { + clkout_phase[clk_output] = 0.0; + } + // Take the delay off the PLL into account + clkout_shift[clk_output] = CalculateShift(clk_output) + delay; + + // CLKOUT[0-5]_DUTY_CYCLE + param = RTLIL::escape_id(clk_output + "_DUTY_CYCLE"); + if (cell->hasParam(param)) { + clkout_duty_cycle[clk_output] = std::stof(cell->getParam(param).decode_string()); + } else { + clkout_duty_cycle[clk_output] = 0.5; + } } }; @@ -78,6 +98,10 @@ struct Pll { divclk_divisor; } + float CalculateShift(const std::string& output) { + return clkout_period.at(output) * clkout_phase.at(output) / 360.0; + } + static const float delay; static const std::string name; static const std::vector inputs; @@ -85,6 +109,10 @@ struct Pll { RTLIL::Cell* cell; float clkin1_period = 0; float clkin2_period = 0; + std::unordered_map clkout_period; + std::unordered_map clkout_duty_cycle; + std::unordered_map clkout_phase; + std::unordered_map clkout_shift; std::unordered_map clkout_divisors; int divclk_divisor = 1; int clk_mult = 5; diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index ce1b7046a..38541083a 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -128,6 +128,7 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { #ifdef SDC_DEBUG log("PLL clock: %s\n", pll_clock.Name().c_str()); #endif + pll_clock.ApplyShift(clock.RisingEdge()); AddClock(pll_clock); PropagateThroughBuffer(pass, pll_clock, Bufg()); } @@ -224,6 +225,14 @@ void Clock::UpdateWaveform(float rising_edge, float falling_edge) { falling_edge_ = falling_edge; } +void Clock::ApplyShift(float rising_edge) { + rising_edge_ += rising_edge; + falling_edge_ += rising_edge; + if (falling_edge_ > period_) { + log_error("Phase shift exceeds 360 degrees\n"); + } +} + std::string Clock::ClockWireName(RTLIL::Wire* wire) { if (!wire) { return std::string(); diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index faa8aec47..28cd7f725 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -43,6 +43,7 @@ class Clock { float FallingEdge() { return falling_edge_; } void UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); + void ApplyShift(float shift); static std::string ClockWireName(RTLIL::Wire* wire); private: diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 35e86f3f7..39ea476d0 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -55,9 +55,11 @@ std::vector ClockDividerPropagation::FindSinkClocksForCellType( for (auto output : Pll::outputs) { RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); if (wire) { - float period(pll.CalculatePeriod(output)); - Clock clock(RTLIL::unescape_id(wire->name), wire, period, 0, - period / 2); + float clkout_period(pll.clkout_period.at(output)); + float clkout_shift(pll.clkout_shift.at(output)); + float clkout_duty_cycle(pll.clkout_duty_cycle.at(output)); + Clock clock(RTLIL::unescape_id(wire->name), wire, clkout_period, clkout_shift, + clkout_shift + clkout_duty_cycle * clkout_period); clocks.push_back(clock); auto further_clocks = FindSinkClocksForCellType(wire, cell_type); diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index c6ba07aa8..4080fa45a 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,6 +1,6 @@ create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1827 create_clock -period 10 -waveform {1 6} \$techmap1716\FDCE_0.C -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 10 -waveform {1 6} main_clkout0 -create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 2.5 -waveform {1 2.25} main_clkout1 +create_clock -period 10 -waveform {3.5 8.5} \$auto\$clkbufmap.cc:247:execute\$1829 +create_clock -period 10 -waveform {4.5 9.5} main_clkout0 +create_clock -period 2.5 -waveform {1 2.25} \$auto\$clkbufmap.cc:247:execute\$1831 +create_clock -period 2.5 -waveform {2 3.25} main_clkout1 diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index 1bb3a9790..17a006443 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -30,9 +30,9 @@ PLLE2_ADV #( .CLKFBOUT_MULT(4'd12), .CLKIN1_PERIOD(10.0), .CLKOUT0_DIVIDE(4'd12), - .CLKOUT0_PHASE(1'd0), + .CLKOUT0_PHASE(90.0), .CLKOUT1_DIVIDE(2'd3), - .CLKOUT1_PHASE(1'd0), + .CLKOUT1_PHASE(0.0), .DIVCLK_DIVIDE(1'd1), .REF_JITTER1(0.01), .STARTUP_WAIT("FALSE") From 3bc1485451d47ab2986bd137067eabd6d4d56f90 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 15 Sep 2020 15:31:27 +0200 Subject: [PATCH 126/845] SDC: Check waveform values when adding clock Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 14 +++++++++----- sdc-plugin/tests/pll/pll.golden.sdc | 4 ++-- sdc-plugin/tests/pll/pll.v | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 38541083a..9fa811efe 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -39,6 +39,9 @@ void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, } else { log("Inserting clock %s with period %f, r:%f, f:%f\n", name.c_str(), period, rising_edge, falling_edge); + if (falling_edge > period) { + log_error("Phase shift on clock %s exceeds 360 degrees\nRising edge: %f, Falling edge: %f, Clock period:%f\n", name.c_str(), rising_edge, falling_edge, period); + } clocks_.emplace_back(name, wire, period, rising_edge, falling_edge); } } @@ -223,14 +226,15 @@ void Clock::UpdatePeriod(float period) { void Clock::UpdateWaveform(float rising_edge, float falling_edge) { rising_edge_ = rising_edge; falling_edge_ = falling_edge; + if (falling_edge_ > period_) { + log_error("Phase shift on clock %s exceeds 360 degrees\nRising edge: %f, Falling edge: %f, Clock period:%f\n", name_.c_str(), rising_edge_, falling_edge_, period_); + } } void Clock::ApplyShift(float rising_edge) { - rising_edge_ += rising_edge; - falling_edge_ += rising_edge; - if (falling_edge_ > period_) { - log_error("Phase shift exceeds 360 degrees\n"); - } + float new_rising_edge = rising_edge_ + rising_edge; + float new_falling_edge = falling_edge_ + rising_edge; + UpdateWaveform(new_rising_edge, new_falling_edge); } std::string Clock::ClockWireName(RTLIL::Wire* wire) { diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index 4080fa45a..8f82a9374 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -2,5 +2,5 @@ create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1827 create_clock -period 10 -waveform {1 6} \$techmap1716\FDCE_0.C create_clock -period 10 -waveform {3.5 8.5} \$auto\$clkbufmap.cc:247:execute\$1829 create_clock -period 10 -waveform {4.5 9.5} main_clkout0 -create_clock -period 2.5 -waveform {1 2.25} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 2.5 -waveform {2 3.25} main_clkout1 +create_clock -period 5 -waveform {1 3.5} \$auto\$clkbufmap.cc:247:execute\$1831 +create_clock -period 5 -waveform {2 4.5} main_clkout1 diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index 17a006443..64b975069 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -31,7 +31,7 @@ PLLE2_ADV #( .CLKIN1_PERIOD(10.0), .CLKOUT0_DIVIDE(4'd12), .CLKOUT0_PHASE(90.0), - .CLKOUT1_DIVIDE(2'd3), + .CLKOUT1_DIVIDE(3'd6), .CLKOUT1_PHASE(0.0), .DIVCLK_DIVIDE(1'd1), .REF_JITTER1(0.01), From c9c59e6736d93caef89acc807e9e918996e1a6c8 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 15 Sep 2020 16:34:11 +0200 Subject: [PATCH 127/845] SDC: Add more test cases for create_clock Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 3 +- sdc-plugin/tests/counter2/counter.txt | 1 + sdc-plugin/tests/counter2/counter2.golden.sdc | 6 ++++ sdc-plugin/tests/counter2/counter2.golden.txt | 1 + sdc-plugin/tests/counter2/counter2.input.sdc | 3 ++ sdc-plugin/tests/counter2/counter2.tcl | 26 ++++++++++++++ sdc-plugin/tests/counter2/counter2.v | 36 +++++++++++++++++++ 7 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/counter2/counter.txt create mode 100644 sdc-plugin/tests/counter2/counter2.golden.sdc create mode 100644 sdc-plugin/tests/counter2/counter2.golden.txt create mode 100644 sdc-plugin/tests/counter2/counter2.input.sdc create mode 100644 sdc-plugin/tests/counter2/counter2.tcl create mode 100644 sdc-plugin/tests/counter2/counter2.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 400d516ed..68c3e458c 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,7 +1,8 @@ -TESTS = counter pll +TESTS = counter counter2 pll .PHONY: $(TESTS) counter_verify = $(call compare,counter,sdc) && $(call compare,counter,txt) +counter2_verify = $(call compare,counter2,sdc) && $(call compare,counter2,txt) pll_verify = $(call compare,pll,sdc) all: $(TESTS) diff --git a/sdc-plugin/tests/counter2/counter.txt b/sdc-plugin/tests/counter2/counter.txt new file mode 100644 index 000000000..065b11094 --- /dev/null +++ b/sdc-plugin/tests/counter2/counter.txt @@ -0,0 +1 @@ +clk_int_1 clk ibuf_proxy_out {$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} middle_inst_1.clk_int middle_inst_4.clk diff --git a/sdc-plugin/tests/counter2/counter2.golden.sdc b/sdc-plugin/tests/counter2/counter2.golden.sdc new file mode 100644 index 000000000..b3e8cca83 --- /dev/null +++ b/sdc-plugin/tests/counter2/counter2.golden.sdc @@ -0,0 +1,6 @@ +create_clock -period 10 -waveform {0 5} clk_int_1 +create_clock -period 10 -waveform {0 5} ibuf_proxy_out +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1918 +create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1920 +create_clock -period 10 -waveform {1 6} middle_inst_1.clk_int +create_clock -period 10 -waveform {2 7} middle_inst_4.clk diff --git a/sdc-plugin/tests/counter2/counter2.golden.txt b/sdc-plugin/tests/counter2/counter2.golden.txt new file mode 100644 index 000000000..ca1b18786 --- /dev/null +++ b/sdc-plugin/tests/counter2/counter2.golden.txt @@ -0,0 +1 @@ +clk_int_1 clk clk2 ibuf_proxy_out {$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} middle_inst_1.clk_int middle_inst_4.clk diff --git a/sdc-plugin/tests/counter2/counter2.input.sdc b/sdc-plugin/tests/counter2/counter2.input.sdc new file mode 100644 index 000000000..3b1ac05ba --- /dev/null +++ b/sdc-plugin/tests/counter2/counter2.input.sdc @@ -0,0 +1,3 @@ +create_clock -period 10.0 -waveform {0.000 5.000} clk_int_1 +create_clock -period 10.0 clk +create_clock -period 10.0 -waveform {1.000 6.000} clk2 diff --git a/sdc-plugin/tests/counter2/counter2.tcl b/sdc-plugin/tests/counter2/counter2.tcl new file mode 100644 index 000000000..80bce1b5b --- /dev/null +++ b/sdc-plugin/tests/counter2/counter2.tcl @@ -0,0 +1,26 @@ +yosys -import +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog counter2.v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Read the design's timing constraints +read_sdc $::env(INPUT_SDC_FILE) + +# Propagate the clocks +propagate_clocks + +# Write the clocks to file +set fh [open counter2.txt w] +set clocks [get_clocks] +puts $fh $clocks +close $fh + +# Write out the SDC file after the clock propagation step +write_sdc $::env(OUTPUT_SDC_FILE) diff --git a/sdc-plugin/tests/counter2/counter2.v b/sdc-plugin/tests/counter2/counter2.v new file mode 100644 index 000000000..564fae58f --- /dev/null +++ b/sdc-plugin/tests/counter2/counter2.v @@ -0,0 +1,36 @@ +module top(input clk, + input clk2, + input [1:0] in, + output [5:0] out ); + +reg [1:0] cnt = 0; +wire clk_int_1, clk_int_2; +IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); +IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); +assign clk_int_1 = ibuf_out; +assign clk_int_2 = clk_int_1; + +always @(posedge clk_int_2) begin + cnt <= cnt + 1; +end + +middle middle_inst_1(.clk(ibuf_out), .out(out[2])); +middle middle_inst_2(.clk(clk_int_1), .out(out[3])); +middle middle_inst_3(.clk(clk_int_2), .out(out[4])); +middle middle_inst_4(.clk(clk2), .out(out[5])); + +assign out[1:0] = {cnt[0], in[0]}; +endmodule + +module middle(input clk, + output out); + +reg [1:0] cnt = 0; +wire clk_int; +assign clk_int = clk; +always @(posedge clk_int) begin + cnt <= cnt + 1; +end + +assign out = cnt[0]; +endmodule From e1ca5df51ae386c160dc61e23e3dfaad3545b5d5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 15 Sep 2020 19:09:58 +0200 Subject: [PATCH 128/845] SDC: Refactor PLL param getter Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.h | 65 +++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index fcce64f17..7b512e22e 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -46,47 +46,23 @@ struct Bufg : Buffer { struct Pll { Pll(RTLIL::Cell* cell) : cell(cell) { assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); - if (cell->hasParam(ID(CLKIN1_PERIOD))) { - clkin1_period = - std::stof(cell->getParam(ID(CLKIN1_PERIOD)).decode_string()); - } - if (cell->hasParam(ID(CLKIN2_PERIOD))) { - clkin2_period = - std::stof(cell->getParam(ID(CLKIN2_PERIOD)).decode_string()); - } - if (cell->hasParam(ID(CLKFBOUT_MULT))) { - clk_mult = cell->getParam(ID(CLKFBOUT_MULT)).as_int(); - } - if (cell->hasParam(ID(DIVCLK_DIVIDE))) { - divclk_divisor = cell->getParam(ID(DIVCLK_DIVIDE)).as_int(); - } + clkin1_period = FetchParam(cell, "CLKIN1_PERIOD", 0.0); + clkin2_period = FetchParam(cell, "CLKIN2_PERIOD", 0.0); + clk_mult = FetchParam(cell, "CLKFBOUT_MULT", 5.0); + divclk_divisor = FetchParam(cell, "DIVCLK_DIVIDE", 1.0); for (auto clk_output : outputs) { // CLKOUT[0-5]_DIVIDE - RTLIL::IdString param(RTLIL::escape_id(clk_output + "_DIVIDE")); - if (cell->hasParam(param)) { - clkout_divisors[clk_output] = cell->getParam(param).as_int(); - } else { - clkout_divisors[clk_output] = 1; - } + clkout_divisors[clk_output] = FetchParam(cell, clk_output + "_DIVIDE", 1.0); clkout_period[clk_output] = CalculatePeriod(clk_output); // CLKOUT[0-5]_PHASE - param = RTLIL::escape_id(clk_output + "_PHASE"); - if (cell->hasParam(param)) { - clkout_phase[clk_output] = std::stof(cell->getParam(param).decode_string()); - } else { - clkout_phase[clk_output] = 0.0; - } + clkout_phase[clk_output] = FetchParam(cell, clk_output + "_PHASE", 0.0); + // Take the delay off the PLL into account clkout_shift[clk_output] = CalculateShift(clk_output) + delay; // CLKOUT[0-5]_DUTY_CYCLE - param = RTLIL::escape_id(clk_output + "_DUTY_CYCLE"); - if (cell->hasParam(param)) { - clkout_duty_cycle[clk_output] = std::stof(cell->getParam(param).decode_string()); - } else { - clkout_duty_cycle[clk_output] = 0.5; - } + clkout_duty_cycle[clk_output] = FetchParam(cell, clk_output + "_DUTY_CYCLE", 0.5); } }; @@ -102,20 +78,35 @@ struct Pll { return clkout_period.at(output) * clkout_phase.at(output) / 360.0; } + float FetchParam(RTLIL::Cell* cell, std::string&& param_name, float default_value) { + RTLIL::IdString param(RTLIL::escape_id(param_name)); + if (cell->hasParam(param)) { + auto param_obj = cell->parameters.at(param); + std::string value; + if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { + value = param_obj.decode_string(); + } else { + value = std::to_string(param_obj.as_int()); + } + return std::stof(value); + } + return default_value; + } + static const float delay; static const std::string name; static const std::vector inputs; static const std::vector outputs; RTLIL::Cell* cell; - float clkin1_period = 0; - float clkin2_period = 0; std::unordered_map clkout_period; std::unordered_map clkout_duty_cycle; std::unordered_map clkout_phase; std::unordered_map clkout_shift; - std::unordered_map clkout_divisors; - int divclk_divisor = 1; - int clk_mult = 5; + std::unordered_map clkout_divisors; + float clkin1_period; + float clkin2_period; + float divclk_divisor; + float clk_mult; }; #endif // _BUFFERS_H_ From 15e7b1e43dbdbf639869c79b62e1f4643de08b7f Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 24 Jul 2020 14:12:16 +0200 Subject: [PATCH 129/845] An object counting plugin Signed-off-by: Maciej Kurc --- Makefile | 2 +- get_count-plugin/Makefile | 24 ++++ get_count-plugin/get_count.cc | 133 +++++++++++++++++++++++ get_count-plugin/tests/Makefile | 15 +++ get_count-plugin/tests/simple/Makefile | 8 ++ get_count-plugin/tests/simple/design.v | 23 ++++ get_count-plugin/tests/simple/script.tcl | 30 +++++ 7 files changed, 234 insertions(+), 1 deletion(-) create mode 100644 get_count-plugin/Makefile create mode 100644 get_count-plugin/get_count.cc create mode 100644 get_count-plugin/tests/Makefile create mode 100644 get_count-plugin/tests/simple/Makefile create mode 100644 get_count-plugin/tests/simple/design.v create mode 100644 get_count-plugin/tests/simple/script.tcl diff --git a/Makefile b/Makefile index 0427c0dd2..6e7415800 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params selection sdc +PLUGIN_LIST := fasm xdc params selection sdc get_count PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/get_count-plugin/Makefile b/get_count-plugin/Makefile new file mode 100644 index 000000000..cc0119d1c --- /dev/null +++ b/get_count-plugin/Makefile @@ -0,0 +1,24 @@ +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) +LDFLAGS = $(shell yosys-config --ldflags) +LDLIBS = $(shell yosys-config --ldlibs) +PLUGINS_DIR = $(shell yosys-config --datdir)/plugins + +NAME = get_count +OBJS = $(NAME).o + +$(NAME).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) + +.PHONY: install test + +install: test + mkdir -p $(PLUGINS_DIR) + cp $(NAME).so $(PLUGINS_DIR)/$(NAME).so + +test: $(NAME).so + $(MAKE) -C tests all + +clean: + rm -f *.d *.o *.so + $(MAKE) -C tests clean diff --git a/get_count-plugin/get_count.cc b/get_count-plugin/get_count.cc new file mode 100644 index 000000000..8a4a0eeaa --- /dev/null +++ b/get_count-plugin/get_count.cc @@ -0,0 +1,133 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "kernel/register.h" +#include "kernel/rtlil.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +void register_in_tcl_interpreter(const std::string& command) { + Tcl_Interp* interp = yosys_get_tcl_interp(); + std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); + Tcl_Eval(interp, tcl_script.c_str()); +} + +struct GetCount : public Pass { + + enum class ObjectType { + NONE, + MODULE, + CELL, + WIRE + }; + + GetCount () : + Pass("get_count", "Returns count of various selected object types to the TCL interpreter") { + register_in_tcl_interpreter(pass_name); + } + + void help() YS_OVERRIDE { + log("\n"); + log(" get_count [selection]"); + log("\n"); + log("When used from inside the TCL interpreter returns count of selected objects.\n"); + log("The object type to count may be given as an argument. Only one at a time.\n"); + log("If none is given then the total count of all selected objects is returned.\n"); + log("\n"); + log(" -modules\n"); + log(" Returns the count of modules in selection\n"); + log("\n"); + log(" -cells\n"); + log(" Returns the count of cells in selection\n"); + log("\n"); + log(" -wires\n"); + log(" Returns the count of wires in selection\n"); + log("\n"); + } + + void execute(std::vector a_Args, RTLIL::Design* a_Design) YS_OVERRIDE { + + // Parse args + ObjectType type = ObjectType::NONE; + if (a_Args.size() < 2) { + log_error("Invalid argument!\n"); + } + + if (a_Args[1] == "-modules") { + type = ObjectType::MODULE; + } + else if (a_Args[1] == "-cells") { + type = ObjectType::CELL; + } + else if (a_Args[1] == "-wires") { + type = ObjectType::WIRE; + } + else if (a_Args[1][0] == '-') { + log_error("Invalid argument '%s'!\n", a_Args[1].c_str()); + } + else { + log_error("Object type not specified!\n"); + } + + extra_args(a_Args, 2, a_Design); + + // Get the TCL interpreter + Tcl_Interp* tclInterp = yosys_get_tcl_interp(); + Tcl_Obj* tclList = Tcl_NewListObj(0, NULL); + + // Count objects + size_t moduleCount = 0; + size_t cellCount = 0; + size_t wireCount = 0; + + moduleCount += a_Design->selected_modules().size(); + for (auto module : a_Design->selected_modules()) { + cellCount += module->selected_cells().size(); + wireCount += module->selected_wires().size(); + } + + size_t count = 0; + switch (type) + { + case ObjectType::MODULE: + count = moduleCount; + break; + case ObjectType::CELL: + count = cellCount; + break; + case ObjectType::WIRE: + count = wireCount; + break; + default: + log_assert(false); + } + + // Return the value as string to the TCL interpreter + std::string value = std::to_string(count); + + Tcl_Obj* tclStr = Tcl_NewStringObj(value.c_str(), value.size()); + Tcl_ListObjAppendElement(tclInterp, tclList, tclStr); + Tcl_SetObjResult(tclInterp, tclList); + } + +} GetCount; + +PRIVATE_NAMESPACE_END diff --git a/get_count-plugin/tests/Makefile b/get_count-plugin/tests/Makefile new file mode 100644 index 000000000..487e07ec1 --- /dev/null +++ b/get_count-plugin/tests/Makefile @@ -0,0 +1,15 @@ +TESTS = $(subst /, ,$(wildcard */)) + +all: $(addsuffix /ok,$(TESTS)) + +clean: + @find . -name "ok" | xargs rm -rf + +define maketest = +$1/ok: + cd $1 && $(MAKE) test +endef + +$(foreach _,${TESTS},$(eval $(call maketest,$_))) + +.PHONY: all clean diff --git a/get_count-plugin/tests/simple/Makefile b/get_count-plugin/tests/simple/Makefile new file mode 100644 index 000000000..163215137 --- /dev/null +++ b/get_count-plugin/tests/simple/Makefile @@ -0,0 +1,8 @@ +test: + yosys -p "tcl script.tcl" + touch ok + +clean: + rm -rf ok + +.PHONY: test clean diff --git a/get_count-plugin/tests/simple/design.v b/get_count-plugin/tests/simple/design.v new file mode 100644 index 000000000..935a0c1aa --- /dev/null +++ b/get_count-plugin/tests/simple/design.v @@ -0,0 +1,23 @@ +module my_gate ( + input wire A, + output wire Y +); + + assign Y = ~A; +endmodule + +module top ( + input wire [7:0] di, + output wire [7:0] do +); + + my_gate c0 (.A(di[0]), .Y(do[0])); + \$_BUF_ c1 (.A(di[1]), .Y(do[1])); + \$_BUF_ c2 (.A(di[2]), .Y(do[2])); + \$_BUF_ c3 (.A(di[3]), .Y(do[3])); + \$_BUF_ c4 (.A(di[4]), .Y(do[4])); + \$_NOT_ c5 (.A(di[5]), .Y(do[5])); + \$_NOT_ c6 (.A(di[6]), .Y(do[6])); + \$_NOT_ c7 (.A(di[7]), .Y(do[7])); + +endmodule diff --git a/get_count-plugin/tests/simple/script.tcl b/get_count-plugin/tests/simple/script.tcl new file mode 100644 index 000000000..6e8cdf082 --- /dev/null +++ b/get_count-plugin/tests/simple/script.tcl @@ -0,0 +1,30 @@ +yosys plugin -i ../../get_count.so +yosys -import + +read_verilog -icells design.v +hierarchy -auto-top + +set n [get_count -modules my_gate] +puts "Module count: $n" +if {$n != "1"} { + error "Invalid count" +} + +set n [get_count -cells t:\$_BUF_] +puts "BUF count: $n" +if {$n != "4"} { + error "Invalid count" +} + +set n [get_count -cells t:\$_NOT_] +puts "NOT count: $n" +if {$n != "3"} { + error "Invalid count" +} + +set n [get_count -wires w:*] +puts "Wire count: $n" +if {$n != "5"} { + error "Invalid count" +} + From c604cc8e778d002d541f1f4e192db774070feabb Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 24 Sep 2020 11:21:42 +0200 Subject: [PATCH 130/845] Fixes to build get_count for newer Yosys versions Signed-off-by: Maciej Kurc --- get_count-plugin/get_count.cc | 4 ++++ get_count-plugin/tests/Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/get_count-plugin/get_count.cc b/get_count-plugin/get_count.cc index 8a4a0eeaa..1e68973bf 100644 --- a/get_count-plugin/get_count.cc +++ b/get_count-plugin/get_count.cc @@ -21,6 +21,10 @@ #include "kernel/register.h" #include "kernel/rtlil.h" +#ifndef YS_OVERRIDE +#define YS_OVERRIDE override +#endif + USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN diff --git a/get_count-plugin/tests/Makefile b/get_count-plugin/tests/Makefile index 487e07ec1..80cdc79c5 100644 --- a/get_count-plugin/tests/Makefile +++ b/get_count-plugin/tests/Makefile @@ -1,6 +1,6 @@ TESTS = $(subst /, ,$(wildcard */)) -all: $(addsuffix /ok,$(TESTS)) +all: clean $(addsuffix /ok,$(TESTS)) clean: @find . -name "ok" | xargs rm -rf From 4935157ebb18301a537dd2e9bce11330b2896604 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 24 Sep 2020 14:18:55 +0200 Subject: [PATCH 131/845] Addressed review comments. Signed-off-by: Maciej Kurc --- get_count-plugin/get_count.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/get_count-plugin/get_count.cc b/get_count-plugin/get_count.cc index 1e68973bf..b78f9b82d 100644 --- a/get_count-plugin/get_count.cc +++ b/get_count-plugin/get_count.cc @@ -28,12 +28,6 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -void register_in_tcl_interpreter(const std::string& command) { - Tcl_Interp* interp = yosys_get_tcl_interp(); - std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); - Tcl_Eval(interp, tcl_script.c_str()); -} - struct GetCount : public Pass { enum class ObjectType { @@ -45,7 +39,6 @@ struct GetCount : public Pass { GetCount () : Pass("get_count", "Returns count of various selected object types to the TCL interpreter") { - register_in_tcl_interpreter(pass_name); } void help() YS_OVERRIDE { @@ -95,7 +88,6 @@ struct GetCount : public Pass { // Get the TCL interpreter Tcl_Interp* tclInterp = yosys_get_tcl_interp(); - Tcl_Obj* tclList = Tcl_NewListObj(0, NULL); // Count objects size_t moduleCount = 0; @@ -128,8 +120,7 @@ struct GetCount : public Pass { std::string value = std::to_string(count); Tcl_Obj* tclStr = Tcl_NewStringObj(value.c_str(), value.size()); - Tcl_ListObjAppendElement(tclInterp, tclList, tclStr); - Tcl_SetObjResult(tclInterp, tclList); + Tcl_SetObjResult(tclInterp, tclStr); } } GetCount; From fa4cfbc41be5096996e9ec0a369c008f72036f75 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Sep 2020 13:44:40 +0200 Subject: [PATCH 132/845] Removed install dependency on test Signed-off-by: Maciej Kurc --- get_count-plugin/Makefile | 2 +- get_count-plugin/tests/simple/script.tcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/get_count-plugin/Makefile b/get_count-plugin/Makefile index cc0119d1c..2c860b6da 100644 --- a/get_count-plugin/Makefile +++ b/get_count-plugin/Makefile @@ -12,7 +12,7 @@ $(NAME).so: $(OBJS) .PHONY: install test -install: test +install: $(NAME).so mkdir -p $(PLUGINS_DIR) cp $(NAME).so $(PLUGINS_DIR)/$(NAME).so diff --git a/get_count-plugin/tests/simple/script.tcl b/get_count-plugin/tests/simple/script.tcl index 6e8cdf082..e21a36d82 100644 --- a/get_count-plugin/tests/simple/script.tcl +++ b/get_count-plugin/tests/simple/script.tcl @@ -1,4 +1,4 @@ -yosys plugin -i ../../get_count.so +yosys plugin -i get_count yosys -import read_verilog -icells design.v From 0a3668a266f0163893a232a40d63abbf043cd8ea Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 24 Sep 2020 11:13:11 +0200 Subject: [PATCH 133/845] SDC: Handle input clock phase shift on clock generators Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 58 +++++++++++++++++++++++++++++++++++ sdc-plugin/buffers.h | 64 +++++++++------------------------------ sdc-plugin/clocks.cc | 43 +++++++++++--------------- sdc-plugin/clocks.h | 3 +- sdc-plugin/propagation.cc | 48 ++++++++++++++--------------- sdc-plugin/propagation.h | 2 +- sdc-plugin/sdc.cc | 4 +-- 7 files changed, 117 insertions(+), 105 deletions(-) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index eb4d0a7be..5b42129b7 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -15,6 +15,8 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include +#include #include "buffers.h" const std::vector Pll::inputs = {"CLKIN1", "CLKIN2"}; @@ -22,3 +24,59 @@ const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", "CLKOUT5"}; const float Pll::delay = 0; const std::string Pll::name = "PLLE2_ADV"; + +Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_shift) { + assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); + + FetchParams(cell); + CalculateOutputClockPeriods(); + CalculateOutputClockWaveforms(input_clock_period, input_clock_shift); +} + +void Pll::FetchParams(RTLIL::Cell* cell) { + clkin1_period = FetchParam(cell, "CLKIN1_PERIOD", 0.0); + clkin2_period = FetchParam(cell, "CLKIN2_PERIOD", 0.0); + clk_mult = FetchParam(cell, "CLKFBOUT_MULT", 5.0); + clk_fbout_phase = FetchParam(cell, "CLKFBOUT_PHASE", 0.0); + divclk_divisor = FetchParam(cell, "DIVCLK_DIVIDE", 1.0); + for (auto output : outputs) { + // CLKOUT[0-5]_DUTY_CYCLE + clkout_duty_cycle[output] = FetchParam(cell, output + "_DUTY_CYCLE", 0.5); + // CLKOUT[0-5]_DIVIDE + clkout_divisor[output] = FetchParam(cell, output + "_DIVIDE", 1.0); + // CLKOUT[0-5]_PHASE + clkout_phase[output] = FetchParam(cell, output + "_PHASE", 0.0); + } +} + +void Pll::CalculateOutputClockPeriods() { + for (auto output : outputs) { + // CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE * DIVCLK_DIVIDE / + // CLKFBOUT_MULT + clkout_period[output] = clkin1_period * clkout_divisor.at(output) / clk_mult * + divclk_divisor; + } +} + +void Pll::CalculateOutputClockWaveforms(float input_clock_period, float input_clock_shift) { + for (auto output : outputs) { + float output_clock_period = clkout_period.at(output); + clkout_rising_edge[output] = fmod(input_clock_shift - (clk_fbout_phase / 360.0) * input_clock_period + output_clock_period * (clkout_phase[output] / 360.0), output_clock_period); + clkout_falling_edge[output] = fmod(clkout_rising_edge[output] + clkout_duty_cycle[output] * output_clock_period, output_clock_period); + } +} + +float Pll::FetchParam(RTLIL::Cell* cell, std::string&& param_name, float default_value) { + RTLIL::IdString param(RTLIL::escape_id(param_name)); + if (cell->hasParam(param)) { + auto param_obj = cell->parameters.at(param); + std::string value; + if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { + value = param_obj.decode_string(); + } else { + value = std::to_string(param_obj.as_int()); + } + return std::stof(value); + } + return default_value; +} diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index 7b512e22e..d3f7c30b8 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -18,8 +18,6 @@ #ifndef _BUFFERS_H_ #define _BUFFERS_H_ -#include -#include #include #include #include @@ -40,73 +38,39 @@ struct IBuf : Buffer { }; struct Bufg : Buffer { - Bufg() : Buffer(1, "BUFG", "O"){}; + Bufg() : Buffer(0, "BUFG", "O"){}; }; struct Pll { - Pll(RTLIL::Cell* cell) : cell(cell) { - assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); - clkin1_period = FetchParam(cell, "CLKIN1_PERIOD", 0.0); - clkin2_period = FetchParam(cell, "CLKIN2_PERIOD", 0.0); - clk_mult = FetchParam(cell, "CLKFBOUT_MULT", 5.0); - divclk_divisor = FetchParam(cell, "DIVCLK_DIVIDE", 1.0); - for (auto clk_output : outputs) { - // CLKOUT[0-5]_DIVIDE - clkout_divisors[clk_output] = FetchParam(cell, clk_output + "_DIVIDE", 1.0); - clkout_period[clk_output] = CalculatePeriod(clk_output); + Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_shift); - // CLKOUT[0-5]_PHASE - clkout_phase[clk_output] = FetchParam(cell, clk_output + "_PHASE", 0.0); + // Fetch cell's parameters needed for further calculations + void FetchParams(RTLIL::Cell* cell); - // Take the delay off the PLL into account - clkout_shift[clk_output] = CalculateShift(clk_output) + delay; + // Calculate the period on the output clocks + void CalculateOutputClockPeriods(); - // CLKOUT[0-5]_DUTY_CYCLE - clkout_duty_cycle[clk_output] = FetchParam(cell, clk_output + "_DUTY_CYCLE", 0.5); - } - }; + // Calculate the rising and falling edges of the output clocks + void CalculateOutputClockWaveforms(float input_clock_period, float input_clock_shift); - // CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE * DIVCLK_DIVIDE / - // CLKFBOUT_MULT - // TODO Check the value on CLKINSEL - float CalculatePeriod(const std::string& output) { - return clkin1_period * clkout_divisors.at(output) / clk_mult * - divclk_divisor; - } - - float CalculateShift(const std::string& output) { - return clkout_period.at(output) * clkout_phase.at(output) / 360.0; - } - - float FetchParam(RTLIL::Cell* cell, std::string&& param_name, float default_value) { - RTLIL::IdString param(RTLIL::escape_id(param_name)); - if (cell->hasParam(param)) { - auto param_obj = cell->parameters.at(param); - std::string value; - if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { - value = param_obj.decode_string(); - } else { - value = std::to_string(param_obj.as_int()); - } - return std::stof(value); - } - return default_value; - } + // Helper function to fetch a cell parameter or return a default value + static float FetchParam(RTLIL::Cell* cell, std::string&& param_name, float default_value); static const float delay; static const std::string name; static const std::vector inputs; static const std::vector outputs; - RTLIL::Cell* cell; std::unordered_map clkout_period; std::unordered_map clkout_duty_cycle; + std::unordered_map clkout_divisor; std::unordered_map clkout_phase; - std::unordered_map clkout_shift; - std::unordered_map clkout_divisors; + std::unordered_map clkout_rising_edge; + std::unordered_map clkout_falling_edge; float clkin1_period; float clkin2_period; float divclk_divisor; float clk_mult; + float clk_fbout_phase; }; #endif // _BUFFERS_H_ diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 9fa811efe..0a1572a35 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -17,6 +17,7 @@ */ #include "clocks.h" #include +#include #include "kernel/log.h" #include "kernel/register.h" #include "propagation.h" @@ -37,12 +38,11 @@ void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, log("Clock %s already exists and will be overwritten\n", name.c_str()); clock->UpdateClock(wire, period, rising_edge, falling_edge); } else { - log("Inserting clock %s with period %f, r:%f, f:%f\n", name.c_str(), - period, rising_edge, falling_edge); - if (falling_edge > period) { - log_error("Phase shift on clock %s exceeds 360 degrees\nRising edge: %f, Falling edge: %f, Clock period:%f\n", name.c_str(), rising_edge, falling_edge, period); - } + rising_edge = fmod(rising_edge, period); + falling_edge = fmod(falling_edge, period); clocks_.emplace_back(name, wire, period, rising_edge, falling_edge); + log("Added clock %s with period %f, rising_edge:%f, falling_edge:%f\n", name.c_str(), + period, rising_edge, falling_edge); } } @@ -123,18 +123,14 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { #ifdef SDC_DEBUG log("Processing clock %s\n", clock.Name().c_str()); #endif - auto clock_wires = clock.GetClockWires(); - for (auto clock_wire : clock_wires) { - auto pll_clocks = - pass->FindSinkClocksForCellType(clock_wire, "PLLE2_ADV"); - for (auto pll_clock : pll_clocks) { + auto pll_clocks = + pass->FindSinkClocksForCellType(clock, "PLLE2_ADV"); + for (auto pll_clock : pll_clocks) { #ifdef SDC_DEBUG - log("PLL clock: %s\n", pll_clock.Name().c_str()); + log("PLL clock: %s\n", pll_clock.Name().c_str()); #endif - pll_clock.ApplyShift(clock.RisingEdge()); - AddClock(pll_clock); - PropagateThroughBuffer(pass, pll_clock, Bufg()); - } + AddClock(pll_clock); + PropagateThroughBuffer(pass, pll_clock, Bufg()); } } #ifdef SDC_DEBUG @@ -205,6 +201,10 @@ Clock::Clock(const std::string& name, std::vector wires, [&, this](RTLIL::Wire* wire) { UpdateWires(wire); }); } +Clock::Clock(RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge) + : Clock(RTLIL::id2cstr(wire->name), wire, period, rising_edge, falling_edge) {} + void Clock::UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { UpdateWires(wire); @@ -224,17 +224,8 @@ void Clock::UpdatePeriod(float period) { } void Clock::UpdateWaveform(float rising_edge, float falling_edge) { - rising_edge_ = rising_edge; - falling_edge_ = falling_edge; - if (falling_edge_ > period_) { - log_error("Phase shift on clock %s exceeds 360 degrees\nRising edge: %f, Falling edge: %f, Clock period:%f\n", name_.c_str(), rising_edge_, falling_edge_, period_); - } -} - -void Clock::ApplyShift(float rising_edge) { - float new_rising_edge = rising_edge_ + rising_edge; - float new_falling_edge = falling_edge_ + rising_edge; - UpdateWaveform(new_rising_edge, new_falling_edge); + rising_edge_ = fmod(rising_edge, period_); + falling_edge_ = fmod(falling_edge, period_); } std::string Clock::ClockWireName(RTLIL::Wire* wire) { diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 28cd7f725..ff02bd5c1 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -36,6 +36,8 @@ class Clock { float rising_edge, float falling_edge); Clock(const std::string& name, std::vector wires, float period, float rising_edge, float falling_edge); + Clock(RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge); std::vector GetClockWires() { return clock_wires_; } const std::string& Name() const { return name_; } float Period() { return period_; } @@ -43,7 +45,6 @@ class Clock { float FallingEdge() { return falling_edge_; } void UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); - void ApplyShift(float shift); static std::string ClockWireName(RTLIL::Wire* wire); private: diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 39ea476d0..e741e1afa 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -38,33 +38,31 @@ std::vector NaturalPropagation::FindAliasWires( } std::vector ClockDividerPropagation::FindSinkClocksForCellType( - RTLIL::Wire* driver_wire, const std::string& cell_type) { + Clock driving_clock, const std::string& cell_type) { std::vector clocks; - if (cell_type == "PLLE2_ADV") { - RTLIL::Cell* cell = NULL; - for (auto input : Pll::inputs) { - cell = FindSinkCellOnPort(driver_wire, input); - if (cell and RTLIL::unescape_id(cell->type) == cell_type) { - break; + auto clock_wires = driving_clock.GetClockWires(); + for (auto clock_wire : clock_wires) { + if (cell_type == "PLLE2_ADV") { + RTLIL::Cell* cell = NULL; + for (auto input : Pll::inputs) { + cell = FindSinkCellOnPort(clock_wire, input); + if (cell and RTLIL::unescape_id(cell->type) == cell_type) { + break; + } } - } - if (!cell) { - return clocks; - } - Pll pll(cell); - for (auto output : Pll::outputs) { - RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); - if (wire) { - float clkout_period(pll.clkout_period.at(output)); - float clkout_shift(pll.clkout_shift.at(output)); - float clkout_duty_cycle(pll.clkout_duty_cycle.at(output)); - Clock clock(RTLIL::unescape_id(wire->name), wire, clkout_period, clkout_shift, - clkout_shift + clkout_duty_cycle * clkout_period); - clocks.push_back(clock); - auto further_clocks = - FindSinkClocksForCellType(wire, cell_type); - std::copy(further_clocks.begin(), further_clocks.end(), - std::back_inserter(clocks)); + if (!cell) { + return clocks; + } + Pll pll(cell, driving_clock.Period(), driving_clock.RisingEdge()); + for (auto output : Pll::outputs) { + RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); + if (wire) { + float clkout_period(pll.clkout_period.at(output)); + float clkout_rising_edge(pll.clkout_rising_edge.at(output)); + float clkout_falling_edge(pll.clkout_falling_edge.at(output)); + Clock clock(wire, clkout_period, clkout_rising_edge, clkout_falling_edge); + clocks.push_back(clock); + } } } } diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 1f3125cbe..bc7a6d25a 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -65,7 +65,7 @@ class ClockDividerPropagation : public Propagation { : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(this); } - std::vector FindSinkClocksForCellType(RTLIL::Wire* driver_wire, + std::vector FindSinkClocksForCellType(Clock driver_wire, const std::string& cell_type); }; #endif // PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 888fbdf3d..4233d0182 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -167,8 +167,6 @@ struct CreateClockCmd : public Pass { } clocks_.AddClock(name, selected_wires, period, rising_edge, falling_edge); - log("Created clock %s with period %f, waveform {%f %f}\n", name.c_str(), - period, rising_edge, falling_edge); } void AddWirePrefix(std::vector& args, size_t argidx) { @@ -235,6 +233,8 @@ struct PropagateClocksCmd : public Pass { std::unique_ptr( new ClockDividerPropagation(design, this))}; + log("Perform clock propagation\n"); + for (auto& pass : passes) { pass->Run(clocks_); } From 7370dca46f537ad59f062c59a819f7f55bf13cbf Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 24 Sep 2020 11:14:59 +0200 Subject: [PATCH 134/845] SDC: Update tests after input clock phase shift fix Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 3 +- sdc-plugin/tests/counter/counter.golden.sdc | 4 +- sdc-plugin/tests/counter2/counter2.golden.sdc | 4 +- sdc-plugin/tests/pll/pll.golden.sdc | 14 +-- sdc-plugin/tests/pll/pll.v | 25 +++-- sdc-plugin/tests/pll_div/pll_div.golden.sdc | 8 ++ sdc-plugin/tests/pll_div/pll_div.input.sdc | 1 + sdc-plugin/tests/pll_div/pll_div.tcl | 21 +++++ sdc-plugin/tests/pll_div/pll_div.v | 91 +++++++++++++++++++ 9 files changed, 153 insertions(+), 18 deletions(-) create mode 100644 sdc-plugin/tests/pll_div/pll_div.golden.sdc create mode 100644 sdc-plugin/tests/pll_div/pll_div.input.sdc create mode 100644 sdc-plugin/tests/pll_div/pll_div.tcl create mode 100644 sdc-plugin/tests/pll_div/pll_div.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 68c3e458c..b352043c0 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,9 +1,10 @@ -TESTS = counter counter2 pll +TESTS = counter counter2 pll pll_div .PHONY: $(TESTS) counter_verify = $(call compare,counter,sdc) && $(call compare,counter,txt) counter2_verify = $(call compare,counter2,sdc) && $(call compare,counter2,txt) pll_verify = $(call compare,pll,sdc) +pll_div_verify = $(call compare,pll_div,sdc) all: $(TESTS) compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/sdc-plugin/tests/counter/counter.golden.sdc index a70e95d8e..c1a2ea140 100644 --- a/sdc-plugin/tests/counter/counter.golden.sdc +++ b/sdc-plugin/tests/counter/counter.golden.sdc @@ -2,5 +2,5 @@ create_clock -period 10 -waveform {0 5} clk_int_1 create_clock -period 10 -waveform {0 5} ibuf_proxy_out create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1918 create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1920 -create_clock -period 10 -waveform {1 6} middle_inst_1.clk_int -create_clock -period 10 -waveform {1 6} middle_inst_4.clk +create_clock -period 10 -waveform {0 5} middle_inst_1.clk_int +create_clock -period 10 -waveform {0 5} middle_inst_4.clk diff --git a/sdc-plugin/tests/counter2/counter2.golden.sdc b/sdc-plugin/tests/counter2/counter2.golden.sdc index b3e8cca83..4bf0bf250 100644 --- a/sdc-plugin/tests/counter2/counter2.golden.sdc +++ b/sdc-plugin/tests/counter2/counter2.golden.sdc @@ -2,5 +2,5 @@ create_clock -period 10 -waveform {0 5} clk_int_1 create_clock -period 10 -waveform {0 5} ibuf_proxy_out create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1918 create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1920 -create_clock -period 10 -waveform {1 6} middle_inst_1.clk_int -create_clock -period 10 -waveform {2 7} middle_inst_4.clk +create_clock -period 10 -waveform {0 5} middle_inst_1.clk_int +create_clock -period 10 -waveform {1 6} middle_inst_4.clk diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index 8f82a9374..7fe2b2a57 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,6 +1,8 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1827 -create_clock -period 10 -waveform {1 6} \$techmap1716\FDCE_0.C -create_clock -period 10 -waveform {3.5 8.5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 10 -waveform {4.5 9.5} main_clkout0 -create_clock -period 5 -waveform {1 3.5} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 5 -waveform {2 4.5} main_clkout1 +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 +create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:247:execute\$1831 +create_clock -period 10 -waveform {2.5 7.5} main_clkout0 +create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:247:execute\$1833 +create_clock -period 2.5 -waveform {0 1.25} main_clkout1 +create_clock -period 5 -waveform {1.25 3.75} \$auto\$clkbufmap.cc:247:execute\$1835 +create_clock -period 5 -waveform {1.25 3.75} main_clkout2 diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index 64b975069..63542da0c 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -2,10 +2,10 @@ module top( input clk, input cpu_reset, input data_in, - output[4:0] data_out + output[5:0] data_out ); -wire [4:0] data_out; +wire [5:0] data_out; wire builder_pll_fb; wire fdce_0_out, fdce_1_out; wire main_locked; @@ -31,8 +31,10 @@ PLLE2_ADV #( .CLKIN1_PERIOD(10.0), .CLKOUT0_DIVIDE(4'd12), .CLKOUT0_PHASE(90.0), - .CLKOUT1_DIVIDE(3'd6), + .CLKOUT1_DIVIDE(2'd3), .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(3'd6), + .CLKOUT2_PHASE(90.0), .DIVCLK_DIVIDE(1'd1), .REF_JITTER1(0.01), .STARTUP_WAIT("FALSE") @@ -43,10 +45,11 @@ PLLE2_ADV #( .CLKFBOUT(builder_pll_fb), .CLKOUT0(main_clkout0), .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), .LOCKED(main_locked) ); -FDCE FDCE_PLLx1 ( +FDCE FDCE_PLLx1_PH90 ( .D(data_in), .C(main_clkout0), .CE(1'b1), @@ -54,7 +57,7 @@ FDCE FDCE_PLLx1 ( .Q(data_out[1]) ); -FDCE FDCE_PLLx4_0 ( +FDCE FDCE_PLLx4_PH0_0 ( .D(data_in), .C(main_clkout1), .CE(1'b1), @@ -62,7 +65,7 @@ FDCE FDCE_PLLx4_0 ( .Q(data_out[2]) ); -FDCE FDCE_PLLx4_1 ( +FDCE FDCE_PLLx4_PH0_1 ( .D(data_in), .C(main_clkout1), .CE(1'b1), @@ -70,11 +73,19 @@ FDCE FDCE_PLLx4_1 ( .Q(data_out[3]) ); -FDCE FDCE_PLLx4_2 ( +FDCE FDCE_PLLx4_PH0_2 ( .D(data_in), .C(main_clkout1), .CE(1'b1), .CLR(1'b0), .Q(data_out[4]) ); + +FDCE FDCE_PLLx2_PH90_0 ( + .D(data_in), + .C(main_clkout2), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[5]) +); endmodule diff --git a/sdc-plugin/tests/pll_div/pll_div.golden.sdc b/sdc-plugin/tests/pll_div/pll_div.golden.sdc new file mode 100644 index 000000000..14ea0bcf1 --- /dev/null +++ b/sdc-plugin/tests/pll_div/pll_div.golden.sdc @@ -0,0 +1,8 @@ +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 +create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 20 -waveform {5 15} \$auto\$clkbufmap.cc:247:execute\$1831 +create_clock -period 20 -waveform {5 15} main_clkout0 +create_clock -period 5 -waveform {0 2.5} \$auto\$clkbufmap.cc:247:execute\$1833 +create_clock -period 5 -waveform {0 2.5} main_clkout1 +create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:247:execute\$1835 +create_clock -period 10 -waveform {2.5 7.5} main_clkout2 diff --git a/sdc-plugin/tests/pll_div/pll_div.input.sdc b/sdc-plugin/tests/pll_div/pll_div.input.sdc new file mode 100644 index 000000000..00354d767 --- /dev/null +++ b/sdc-plugin/tests/pll_div/pll_div.input.sdc @@ -0,0 +1 @@ +create_clock -period 10 -waveform {0 5} clk diff --git a/sdc-plugin/tests/pll_div/pll_div.tcl b/sdc-plugin/tests/pll_div/pll_div.tcl new file mode 100644 index 000000000..f8f0a9f47 --- /dev/null +++ b/sdc-plugin/tests/pll_div/pll_div.tcl @@ -0,0 +1,21 @@ +yosys -import +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog pll_div.v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top + +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Read the design timing constraints +read_sdc $::env(INPUT_SDC_FILE) + +# Propagate the clocks +propagate_clocks + +# Write out the SDC file after the clock propagation step +write_sdc $::env(OUTPUT_SDC_FILE) diff --git a/sdc-plugin/tests/pll_div/pll_div.v b/sdc-plugin/tests/pll_div/pll_div.v new file mode 100644 index 000000000..b4055efd2 --- /dev/null +++ b/sdc-plugin/tests/pll_div/pll_div.v @@ -0,0 +1,91 @@ +module top( + input clk, + input cpu_reset, + input data_in, + output[5:0] data_out +); + +wire [5:0] data_out; +wire builder_pll_fb; +wire fdce_0_out, fdce_1_out; +wire main_locked; + +FDCE FDCE_0 ( + .D(data_in), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(fdce_0_out) +); + +FDCE FDCE_1 ( + .D(fdce_0_out), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[0]) +); + +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .CLKOUT1_DIVIDE(2'd3), + .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(3'd6), + .CLKOUT2_PHASE(90.0), + .DIVCLK_DIVIDE(2'd2), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .LOCKED(main_locked) +); + +FDCE FDCE_PLLx1_PH90 ( + .D(data_in), + .C(main_clkout0), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[1]) +); + +FDCE FDCE_PLLx4_PH0_0 ( + .D(data_in), + .C(main_clkout1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[2]) +); + +FDCE FDCE_PLLx4_PH0_1 ( + .D(data_in), + .C(main_clkout1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[3]) +); + +FDCE FDCE_PLLx4_PH0_2 ( + .D(data_in), + .C(main_clkout1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[4]) +); + +FDCE FDCE_PLLx2_PH90_0 ( + .D(data_in), + .C(main_clkout2), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[5]) +); +endmodule From 5aed81e0ad3b4548f8a2b2fb353da837f09411b6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 24 Sep 2020 12:42:15 +0200 Subject: [PATCH 135/845] SDC: Check if period of CLKIN1_PERIOD is equal to input clock Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index 5b42129b7..ab998882b 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -29,6 +29,13 @@ Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_shift) { assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); FetchParams(cell); + if (clkin1_period != input_clock_period) { + log_cmd_error( + "CLKIN1_PERIOD doesn't match the virtual clock constraint " + "propagated to the CLKIN1 input of the clock divider cell: " + "%s.\nInput clock period: %f, CLKIN1_PERIOD: %f\n", + RTLIL::id2cstr(cell->name), input_clock_period, clkin1_period); + } CalculateOutputClockPeriods(); CalculateOutputClockWaveforms(input_clock_period, input_clock_shift); } From 6d039d09d662a9d14fb80ea3bc010dda23671ca8 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 24 Sep 2020 12:43:31 +0200 Subject: [PATCH 136/845] SDC: Add test for non default CLKFBOUT_PHASE Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 3 +- .../pll_fbout_phase.golden.sdc | 8 ++ .../pll_fbout_phase/pll_fbout_phase.input.sdc | 1 + .../tests/pll_fbout_phase/pll_fbout_phase.tcl | 21 +++++ .../tests/pll_fbout_phase/pll_fbout_phase.v | 91 +++++++++++++++++++ 5 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc create mode 100644 sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.input.sdc create mode 100644 sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl create mode 100644 sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index b352043c0..ea5e5a1d7 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,10 +1,11 @@ -TESTS = counter counter2 pll pll_div +TESTS = counter counter2 pll pll_div pll_fbout_phase .PHONY: $(TESTS) counter_verify = $(call compare,counter,sdc) && $(call compare,counter,txt) counter2_verify = $(call compare,counter2,sdc) && $(call compare,counter2,txt) pll_verify = $(call compare,pll,sdc) pll_div_verify = $(call compare,pll_div,sdc) +pll_fbout_phase_verify = $(call compare,pll_fbout_phase,sdc) all: $(TESTS) compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc new file mode 100644 index 000000000..e3f281c1b --- /dev/null +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc @@ -0,0 +1,8 @@ +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 +create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1831 +create_clock -period 10 -waveform {0 5} main_clkout_x1 +create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:247:execute\$1833 +create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 +create_clock -period 2.5 -waveform {-1.875 -0.625} \$auto\$clkbufmap.cc:247:execute\$1835 +create_clock -period 2.5 -waveform {-1.875 -0.625} main_clkout_x4 diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.input.sdc b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.input.sdc new file mode 100644 index 000000000..00354d767 --- /dev/null +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.input.sdc @@ -0,0 +1 @@ +create_clock -period 10 -waveform {0 5} clk diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl new file mode 100644 index 000000000..6b6db7365 --- /dev/null +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl @@ -0,0 +1,21 @@ +yosys -import +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog pll_fbout_phase.v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top + +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Read the design timing constraints +read_sdc $::env(INPUT_SDC_FILE) + +# Propagate the clocks +propagate_clocks + +# Write out the SDC file after the clock propagation step +write_sdc $::env(OUTPUT_SDC_FILE) diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v new file mode 100644 index 000000000..2dc6c00e3 --- /dev/null +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v @@ -0,0 +1,91 @@ +module top( + input clk, + input cpu_reset, + input data_in, + output[5:0] data_out +); + +wire [5:0] data_out; +wire builder_pll_fb; +wire fdce_0_out, fdce_1_out; +wire main_locked; + +FDCE FDCE_0 ( + .D(data_in), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(fdce_0_out) +); + +FDCE FDCE_1 ( + .D(fdce_0_out), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[0]) +); + +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKFBOUT_PHASE(90.0), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .CLKOUT1_DIVIDE(3'd6), + .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(2'd3), + .CLKOUT2_PHASE(90.0), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout_x1), + .CLKOUT1(main_clkout_x2), + .CLKOUT2(main_clkout_x4), + .LOCKED(main_locked) +); + +FDCE FDCE_PLLx1_PH90 ( + .D(data_in), + .C(main_clkout_x1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[1]) +); + +FDCE FDCE_PLLx4_PH0_0 ( + .D(data_in), + .C(main_clkout_x2), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[2]) +); + +FDCE FDCE_PLLx4_PH0_1 ( + .D(data_in), + .C(main_clkout_x2), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[3]) +); + +FDCE FDCE_PLLx4_PH0_2 ( + .D(data_in), + .C(main_clkout_x2), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[4]) +); + +FDCE FDCE_PLLx2_PH90_0 ( + .D(data_in), + .C(main_clkout_x4), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[5]) +); +endmodule From a423917c0ea73ba8d8156379dc138edffa392d6f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 25 Sep 2020 11:50:42 +0200 Subject: [PATCH 137/845] SDC: Implement approximate equality check of input clock period Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 27 ++++++++++++++++----------- sdc-plugin/buffers.h | 12 +++++++++++- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index ab998882b..709c7f922 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -27,17 +27,22 @@ const std::string Pll::name = "PLLE2_ADV"; Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_shift) { assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); - FetchParams(cell); - if (clkin1_period != input_clock_period) { + CheckInputClockPeriod(cell, input_clock_period); + CalculateOutputClockPeriods(); + CalculateOutputClockWaveforms(input_clock_shift); +} + +void Pll::CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period) { + float abs_diff = fabs(ClkinPeriod() - input_clock_period); + bool approx_equal = abs_diff < max(ClkinPeriod(), input_clock_period) * kApproxEqualFactor; + if (!approx_equal) { log_cmd_error( - "CLKIN1_PERIOD doesn't match the virtual clock constraint " - "propagated to the CLKIN1 input of the clock divider cell: " - "%s.\nInput clock period: %f, CLKIN1_PERIOD: %f\n", - RTLIL::id2cstr(cell->name), input_clock_period, clkin1_period); + "CLKIN[1/2]_PERIOD isn't approximately equal (+/-%.2f%%) to the virtual clock constraint " + "propagated to the CLKIN[1/2] input of the clock divider cell: " + "%s.\nInput clock period: %f, CLKIN[1/2]_PERIOD: %f\n", + kApproxEqualFactor * 100, RTLIL::id2cstr(cell->name), input_clock_period, ClkinPeriod()); } - CalculateOutputClockPeriods(); - CalculateOutputClockWaveforms(input_clock_period, input_clock_shift); } void Pll::FetchParams(RTLIL::Cell* cell) { @@ -60,15 +65,15 @@ void Pll::CalculateOutputClockPeriods() { for (auto output : outputs) { // CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE * DIVCLK_DIVIDE / // CLKFBOUT_MULT - clkout_period[output] = clkin1_period * clkout_divisor.at(output) / clk_mult * + clkout_period[output] = ClkinPeriod() * clkout_divisor.at(output) / clk_mult * divclk_divisor; } } -void Pll::CalculateOutputClockWaveforms(float input_clock_period, float input_clock_shift) { +void Pll::CalculateOutputClockWaveforms(float input_clock_shift) { for (auto output : outputs) { float output_clock_period = clkout_period.at(output); - clkout_rising_edge[output] = fmod(input_clock_shift - (clk_fbout_phase / 360.0) * input_clock_period + output_clock_period * (clkout_phase[output] / 360.0), output_clock_period); + clkout_rising_edge[output] = fmod(input_clock_shift - (clk_fbout_phase / 360.0) * ClkinPeriod() + output_clock_period * (clkout_phase[output] / 360.0), output_clock_period); clkout_falling_edge[output] = fmod(clkout_rising_edge[output] + clkout_duty_cycle[output] * output_clock_period, output_clock_period); } } diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index d3f7c30b8..2797f5275 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -44,6 +44,10 @@ struct Bufg : Buffer { struct Pll { Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_shift); + // Approximate equality check of the input clock period and specified in CLKIN[1/2]_PERIOD parameter + // kApproxEqualFactor specifies the percentage of the maximum accepted difference + void CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period); + // Fetch cell's parameters needed for further calculations void FetchParams(RTLIL::Cell* cell); @@ -51,11 +55,15 @@ struct Pll { void CalculateOutputClockPeriods(); // Calculate the rising and falling edges of the output clocks - void CalculateOutputClockWaveforms(float input_clock_period, float input_clock_shift); + void CalculateOutputClockWaveforms(float input_clock_shift); // Helper function to fetch a cell parameter or return a default value static float FetchParam(RTLIL::Cell* cell, std::string&& param_name, float default_value); + // Get the period of the input clock + // TODO Add support for CLKINSEL + float ClkinPeriod() { return clkin1_period; } + static const float delay; static const std::string name; static const std::vector inputs; @@ -71,6 +79,8 @@ struct Pll { float divclk_divisor; float clk_mult; float clk_fbout_phase; + // Approximate equality factor of 1% + const float kApproxEqualFactor = 0.01; }; #endif // _BUFFERS_H_ From c9515364cd693ce195c31a9777bffadddb145468 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 25 Sep 2020 11:51:45 +0200 Subject: [PATCH 138/845] SDC: Add test for approximate equality on input clock Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 3 +- .../pll_approx_equal.golden.sdc | 8 ++ .../pll_approx_equal.input.sdc | 1 + .../pll_approx_equal/pll_approx_equal.tcl | 21 +++++ .../tests/pll_approx_equal/pll_approx_equal.v | 91 +++++++++++++++++++ 5 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc create mode 100644 sdc-plugin/tests/pll_approx_equal/pll_approx_equal.input.sdc create mode 100644 sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl create mode 100644 sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index ea5e5a1d7..d19f19df9 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,4 +1,4 @@ -TESTS = counter counter2 pll pll_div pll_fbout_phase +TESTS = counter counter2 pll pll_div pll_fbout_phase pll_approx_equal .PHONY: $(TESTS) counter_verify = $(call compare,counter,sdc) && $(call compare,counter,txt) @@ -6,6 +6,7 @@ counter2_verify = $(call compare,counter2,sdc) && $(call compare,counter2,txt) pll_verify = $(call compare,pll,sdc) pll_div_verify = $(call compare,pll_div,sdc) pll_fbout_phase_verify = $(call compare,pll_fbout_phase,sdc) +pll_approx_equal_verify = $(call compare,pll_approx_equal,sdc) all: $(TESTS) compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc new file mode 100644 index 000000000..c27b90ad0 --- /dev/null +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc @@ -0,0 +1,8 @@ +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 +create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 9.91 -waveform {0 4.955} \$auto\$clkbufmap.cc:247:execute\$1831 +create_clock -period 9.91 -waveform {0 4.955} main_clkout_x1 +create_clock -period 4.955 -waveform {-2.4775 0} \$auto\$clkbufmap.cc:247:execute\$1833 +create_clock -period 4.955 -waveform {-2.4775 0} main_clkout_x2 +create_clock -period 2.4775 -waveform {-1.85812 -0.619375} \$auto\$clkbufmap.cc:247:execute\$1835 +create_clock -period 2.4775 -waveform {-1.85812 -0.619375} main_clkout_x4 diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.input.sdc b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.input.sdc new file mode 100644 index 000000000..00354d767 --- /dev/null +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.input.sdc @@ -0,0 +1 @@ +create_clock -period 10 -waveform {0 5} clk diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl new file mode 100644 index 000000000..13c889049 --- /dev/null +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl @@ -0,0 +1,21 @@ +yosys -import +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog pll_approx_equal.v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top + +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Read the design timing constraints +read_sdc $::env(INPUT_SDC_FILE) + +# Propagate the clocks +propagate_clocks + +# Write out the SDC file after the clock propagation step +write_sdc $::env(OUTPUT_SDC_FILE) diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v new file mode 100644 index 000000000..9b2e13a74 --- /dev/null +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v @@ -0,0 +1,91 @@ +module top( + input clk, + input cpu_reset, + input data_in, + output[5:0] data_out +); + +wire [5:0] data_out; +wire builder_pll_fb; +wire fdce_0_out, fdce_1_out; +wire main_locked; + +FDCE FDCE_0 ( + .D(data_in), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(fdce_0_out) +); + +FDCE FDCE_1 ( + .D(fdce_0_out), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[0]) +); + +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKFBOUT_PHASE(90.0), + .CLKIN1_PERIOD(9.91), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .CLKOUT1_DIVIDE(3'd6), + .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(2'd3), + .CLKOUT2_PHASE(90.0), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout_x1), + .CLKOUT1(main_clkout_x2), + .CLKOUT2(main_clkout_x4), + .LOCKED(main_locked) +); + +FDCE FDCE_PLLx1_PH90 ( + .D(data_in), + .C(main_clkout_x1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[1]) +); + +FDCE FDCE_PLLx4_PH0_0 ( + .D(data_in), + .C(main_clkout_x2), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[2]) +); + +FDCE FDCE_PLLx4_PH0_1 ( + .D(data_in), + .C(main_clkout_x2), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[3]) +); + +FDCE FDCE_PLLx4_PH0_2 ( + .D(data_in), + .C(main_clkout_x2), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[4]) +); + +FDCE FDCE_PLLx2_PH90_0 ( + .D(data_in), + .C(main_clkout_x4), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[5]) +); +endmodule From 12fd6b4eac3f43b4693c79b8b29a82d12770dbea Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 25 Sep 2020 18:58:15 +0200 Subject: [PATCH 139/845] SDC: Make all not required Pll methods and fields private Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.h | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index 2797f5275..d89f79232 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -44,8 +44,25 @@ struct Bufg : Buffer { struct Pll { Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_shift); - // Approximate equality check of the input clock period and specified in CLKIN[1/2]_PERIOD parameter - // kApproxEqualFactor specifies the percentage of the maximum accepted difference + // Helper function to fetch a cell parameter or return a default value + static float FetchParam(RTLIL::Cell* cell, std::string&& param_name, + float default_value); + + // Get the period of the input clock + // TODO Add support for CLKINSEL + float ClkinPeriod() { return clkin1_period; } + + static const std::vector inputs; + static const std::vector outputs; + std::unordered_map clkout_period; + std::unordered_map clkout_duty_cycle; + std::unordered_map clkout_rising_edge; + std::unordered_map clkout_falling_edge; + + private: + // Approximate equality check of the input clock period and specified in + // CLKIN[1/2]_PERIOD parameter kApproxEqualFactor specifies the percentage + // of the maximum accepted difference void CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period); // Fetch cell's parameters needed for further calculations @@ -57,23 +74,10 @@ struct Pll { // Calculate the rising and falling edges of the output clocks void CalculateOutputClockWaveforms(float input_clock_shift); - // Helper function to fetch a cell parameter or return a default value - static float FetchParam(RTLIL::Cell* cell, std::string&& param_name, float default_value); - - // Get the period of the input clock - // TODO Add support for CLKINSEL - float ClkinPeriod() { return clkin1_period; } - static const float delay; static const std::string name; - static const std::vector inputs; - static const std::vector outputs; - std::unordered_map clkout_period; - std::unordered_map clkout_duty_cycle; std::unordered_map clkout_divisor; std::unordered_map clkout_phase; - std::unordered_map clkout_rising_edge; - std::unordered_map clkout_falling_edge; float clkin1_period; float clkin2_period; float divclk_divisor; From 96e8adffb95ac2dfc0e40ec39a75a6481fa63084 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 25 Sep 2020 19:00:39 +0200 Subject: [PATCH 140/845] SDC: Rename Pll input clock variable Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 8 ++++---- sdc-plugin/buffers.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index 709c7f922..c997bfaf0 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -25,12 +25,12 @@ const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", const float Pll::delay = 0; const std::string Pll::name = "PLLE2_ADV"; -Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_shift) { +Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_edge) { assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); FetchParams(cell); CheckInputClockPeriod(cell, input_clock_period); CalculateOutputClockPeriods(); - CalculateOutputClockWaveforms(input_clock_shift); + CalculateOutputClockWaveforms(input_clock_rising_edge); } void Pll::CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period) { @@ -70,10 +70,10 @@ void Pll::CalculateOutputClockPeriods() { } } -void Pll::CalculateOutputClockWaveforms(float input_clock_shift) { +void Pll::CalculateOutputClockWaveforms(float input_clock_rising_edge) { for (auto output : outputs) { float output_clock_period = clkout_period.at(output); - clkout_rising_edge[output] = fmod(input_clock_shift - (clk_fbout_phase / 360.0) * ClkinPeriod() + output_clock_period * (clkout_phase[output] / 360.0), output_clock_period); + clkout_rising_edge[output] = fmod(input_clock_rising_edge - (clk_fbout_phase / 360.0) * ClkinPeriod() + output_clock_period * (clkout_phase[output] / 360.0), output_clock_period); clkout_falling_edge[output] = fmod(clkout_rising_edge[output] + clkout_duty_cycle[output] * output_clock_period, output_clock_period); } } diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index d89f79232..72beb0b03 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -42,7 +42,7 @@ struct Bufg : Buffer { }; struct Pll { - Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_shift); + Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_edge); // Helper function to fetch a cell parameter or return a default value static float FetchParam(RTLIL::Cell* cell, std::string&& param_name, @@ -72,7 +72,7 @@ struct Pll { void CalculateOutputClockPeriods(); // Calculate the rising and falling edges of the output clocks - void CalculateOutputClockWaveforms(float input_clock_shift); + void CalculateOutputClockWaveforms(float input_clock_rising_edge); static const float delay; static const std::string name; From d08393590bd411ebd679dbd18128da0737a00023 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 25 Sep 2020 19:13:05 +0200 Subject: [PATCH 141/845] SDC: Fix approximate equality condition Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 6 +++--- sdc-plugin/buffers.h | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index c997bfaf0..cb5474373 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -35,13 +35,13 @@ Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_e void Pll::CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period) { float abs_diff = fabs(ClkinPeriod() - input_clock_period); - bool approx_equal = abs_diff < max(ClkinPeriod(), input_clock_period) * kApproxEqualFactor; + bool approx_equal = abs_diff < max(ClkinPeriod(), input_clock_period) * 10 * std::numeric_limits::epsilon(); if (!approx_equal) { log_cmd_error( - "CLKIN[1/2]_PERIOD isn't approximately equal (+/-%.2f%%) to the virtual clock constraint " + "CLKIN[1/2]_PERIOD doesn't match the virtual clock constraint " "propagated to the CLKIN[1/2] input of the clock divider cell: " "%s.\nInput clock period: %f, CLKIN[1/2]_PERIOD: %f\n", - kApproxEqualFactor * 100, RTLIL::id2cstr(cell->name), input_clock_period, ClkinPeriod()); + RTLIL::id2cstr(cell->name), input_clock_period, ClkinPeriod()); } } diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index 72beb0b03..5f5153578 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -61,8 +61,7 @@ struct Pll { private: // Approximate equality check of the input clock period and specified in - // CLKIN[1/2]_PERIOD parameter kApproxEqualFactor specifies the percentage - // of the maximum accepted difference + // CLKIN[1/2]_PERIOD parameter void CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period); // Fetch cell's parameters needed for further calculations @@ -83,8 +82,6 @@ struct Pll { float divclk_divisor; float clk_mult; float clk_fbout_phase; - // Approximate equality factor of 1% - const float kApproxEqualFactor = 0.01; }; #endif // _BUFFERS_H_ From 621198f722001bf322b9762bfaf8d5669929c093 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 25 Sep 2020 19:13:52 +0200 Subject: [PATCH 142/845] SDC: Fix pll test for approximate equality Signed-off-by: Tomasz Michalak --- .../pll_approx_equal/pll_approx_equal.golden.sdc | 12 ++++++------ sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc index c27b90ad0..add4f6abe 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc @@ -1,8 +1,8 @@ create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C -create_clock -period 9.91 -waveform {0 4.955} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 9.91 -waveform {0 4.955} main_clkout_x1 -create_clock -period 4.955 -waveform {-2.4775 0} \$auto\$clkbufmap.cc:247:execute\$1833 -create_clock -period 4.955 -waveform {-2.4775 0} main_clkout_x2 -create_clock -period 2.4775 -waveform {-1.85812 -0.619375} \$auto\$clkbufmap.cc:247:execute\$1835 -create_clock -period 2.4775 -waveform {-1.85812 -0.619375} main_clkout_x4 +create_clock -period 9.99999 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1831 +create_clock -period 9.99999 -waveform {0 5} main_clkout_x1 +create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:247:execute\$1833 +create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 +create_clock -period 2.5 -waveform {-1.875 -0.624999} \$auto\$clkbufmap.cc:247:execute\$1835 +create_clock -period 2.5 -waveform {-1.875 -0.624999} main_clkout_x4 diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v index 9b2e13a74..11913d24b 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v @@ -29,7 +29,7 @@ FDCE FDCE_1 ( PLLE2_ADV #( .CLKFBOUT_MULT(4'd12), .CLKFBOUT_PHASE(90.0), - .CLKIN1_PERIOD(9.91), + .CLKIN1_PERIOD(9.99999), .CLKOUT0_DIVIDE(4'd12), .CLKOUT0_PHASE(90.0), .CLKOUT1_DIVIDE(3'd6), From 1f37df2874c8b1ebe10e237e3222fa2810138dcd Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 1 Apr 2020 14:57:22 +0200 Subject: [PATCH 143/845] Initial Yosys pass. Parses PCF and pinmap CSV Signed-off-by: Maciej Kurc --- Makefile | 2 +- ql-iob-plugin/Makefile | 24 +++++++ ql-iob-plugin/pcf_parser.cc | 74 ++++++++++++++++++++++ ql-iob-plugin/pcf_parser.hh | 63 +++++++++++++++++++ ql-iob-plugin/pinmap_parser.cc | 110 +++++++++++++++++++++++++++++++++ ql-iob-plugin/pinmap_parser.hh | 63 +++++++++++++++++++ ql-iob-plugin/ql-iob.cc | 76 +++++++++++++++++++++++ ql-iob-plugin/tests/Makefile | 6 ++ ql-iob-plugin/tests/pinmap.csv | 47 ++++++++++++++ ql-iob-plugin/tests/test.pcf | 9 +++ 10 files changed, 473 insertions(+), 1 deletion(-) create mode 100644 ql-iob-plugin/Makefile create mode 100644 ql-iob-plugin/pcf_parser.cc create mode 100644 ql-iob-plugin/pcf_parser.hh create mode 100644 ql-iob-plugin/pinmap_parser.cc create mode 100644 ql-iob-plugin/pinmap_parser.hh create mode 100644 ql-iob-plugin/ql-iob.cc create mode 100644 ql-iob-plugin/tests/Makefile create mode 100644 ql-iob-plugin/tests/pinmap.csv create mode 100644 ql-iob-plugin/tests/test.pcf diff --git a/Makefile b/Makefile index 6e7415800..72611b40b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params selection sdc get_count +PLUGIN_LIST := fasm xdc params selection sdc get_count ql-iob PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile new file mode 100644 index 000000000..9a0d2f100 --- /dev/null +++ b/ql-iob-plugin/Makefile @@ -0,0 +1,24 @@ +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) +LDFLAGS = $(shell yosys-config --ldflags) +LDLIBS = $(shell yosys-config --ldlibs) +PLUGINS_DIR = $(shell yosys-config --datdir)/plugins + +NAME = ql-iob +OBJS = $(NAME).o pcf_parser.cc pinmap_parser.cc + +$(NAME).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) + +.PHONY: install + +install: $(NAME).so + mkdir -p $(PLUGINS_DIR) + cp $< $(PLUGINS_DIR)/$< + +test: install + $(MAKE) -C tests all + +clean: + rm -f *.d *.o *.so + diff --git a/ql-iob-plugin/pcf_parser.cc b/ql-iob-plugin/pcf_parser.cc new file mode 100644 index 000000000..ea937628f --- /dev/null +++ b/ql-iob-plugin/pcf_parser.cc @@ -0,0 +1,74 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +#include "pcf_parser.hh" + +#include +#include + +// ============================================================================ + +bool PcfParser::parse (const std::string& a_FileName) { + + // Open the file + std::fstream file(a_FileName.c_str(), std::ifstream::in); + + // Parse it + std::istream* stream = &file; + return parse(stream); +} + +const std::vector PcfParser::getConstraints () const { + return m_Constraints; +} + + +// ============================================================================ + +bool PcfParser::parse (std::istream*& a_Stream) { + + if (a_Stream == nullptr) { + return false; + } + + // Clear constraints + m_Constraints.clear(); + + // Parse PCF lines + std::regex re("^\\s*set_io\\s+([^#\\s]+)\\s+([^#\\s]+)(?:\\s+#(.*))?"); + + while (a_Stream->good()) { + std::string line; + std::getline(*a_Stream, line); + + // Match against regex + std::cmatch cm; + if (std::regex_match(line.c_str(), cm, re)) { + m_Constraints.push_back( + Constraint( + cm[1].str(), + cm[2].str(), + cm[3].str() + ) + ); + } + } + + return true; +} diff --git a/ql-iob-plugin/pcf_parser.hh b/ql-iob-plugin/pcf_parser.hh new file mode 100644 index 000000000..671b01749 --- /dev/null +++ b/ql-iob-plugin/pcf_parser.hh @@ -0,0 +1,63 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +#ifndef PCF_PARSER_HH +#define PCF_PARSER_HH + +#include +#include +#include + +// ============================================================================ + +class PcfParser { +public: + + /// A constraint + struct Constraint { + + const std::string netName; + const std::string padName; + const std::string comment; + + Constraint ( + const std::string& a_NetName, + const std::string& a_PadName, + const std::string& a_Comment = std::string() + ) : netName(a_NetName), padName(a_PadName), comment(a_Comment) {} + }; + + /// Constructor + PcfParser () = default; + + /// Parses a PCF file and stores constraint within the class instance. + /// Returns false in case of error + bool parse (const std::string& a_FileName); + bool parse (std::istream*& a_Stream); + + /// Returns the constraint list + const std::vector getConstraints () const; + +protected: + + /// A list of constraints + std::vector m_Constraints; +}; + +#endif // PCF_PARSER_HH diff --git a/ql-iob-plugin/pinmap_parser.cc b/ql-iob-plugin/pinmap_parser.cc new file mode 100644 index 000000000..8215ca701 --- /dev/null +++ b/ql-iob-plugin/pinmap_parser.cc @@ -0,0 +1,110 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +#include "pinmap_parser.hh" + +#include +#include + +// ============================================================================ + +bool PinmapParser::parse (const std::string& a_FileName) { + + // Open the file + std::fstream file(a_FileName.c_str(), std::ifstream::in); + + // Parse it + std::istream* stream = &file; + return parse(stream); +} + +const std::vector PinmapParser::getEntries() const { + return m_Entries; +} + +// ============================================================================ + +std::vector PinmapParser::getFields (const std::string& a_String) { + + std::vector fields; + std::stringstream ss(a_String); + + while (ss.good()) { + std::string field; + std::getline(ss, field, ','); + + fields.push_back(field); + } + + return fields; +} + +bool PinmapParser::parseHeader (std::istream*& a_Stream) { + + // Get the header line + std::string header; + std::getline(*a_Stream, header); + + // Parse fields + m_Fields = getFields(header); + return true; +} + +bool PinmapParser::parseData (std::istream*& a_Stream) { + + // Parse lines as they come + while (a_Stream->good()) { + std::string line; + std::getline(*a_Stream, line); + + // Parse datafields + auto data = getFields(line); + + // Assign data fields to columns + Entry entry; + for (size_t i=0; i + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +#ifndef PINMAP_PARSER_HH +#define PINMAP_PARSER_HH + +#include +#include +#include +#include + +// ============================================================================ + +class PinmapParser { +public: + + /// A pinmap entry type + typedef std::map Entry; + + /// Constructor + PinmapParser () = default; + + /// Parses a pinmap CSV file + bool parse (const std::string& a_FileName); + bool parse (std::istream*& a_Stream); + + /// Returns a vector of entries + const std::vector getEntries() const; + +protected: + + /// Splits the input string into a vector of fields. Fields are comma + /// separated. + static std::vector getFields (const std::string& a_String); + + /// Parses the header + bool parseHeader (std::istream*& a_Stream); + /// Parses the data + bool parseData (std::istream*& a_Stream); + + /// Header fields + std::vector m_Fields; + /// A list of entries + std::vector m_Entries; +}; + +#endif // PINMAP_PARSER_HH diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc new file mode 100644 index 000000000..72a4b0af0 --- /dev/null +++ b/ql-iob-plugin/ql-iob.cc @@ -0,0 +1,76 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "pcf_parser.hh" +#include "pinmap_parser.hh" + +#include "kernel/register.h" +#include "kernel/rtlil.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +void register_in_tcl_interpreter(const std::string& command) { + Tcl_Interp* interp = yosys_get_tcl_interp(); + std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); + Tcl_Eval(interp, tcl_script.c_str()); +} + +struct QuicklogicIob : public Pass { + + QuicklogicIob () : + Pass("quicklogic_iob", "Map IO buffers to cells that correspond to their assigned locations") { + register_in_tcl_interpreter(pass_name); + } + + void help() YS_OVERRIDE { + log("Help!\n"); + } + + void execute(std::vector a_Args, RTLIL::Design* a_Design) YS_OVERRIDE { + if (a_Args.size() < 3) { + log_cmd_error("Usage: quicklogic_iob "); + } + + // Get the top module of the design + RTLIL::Module* topModule = a_Design->top_module(); + if (topModule == nullptr) { + log_cmd_error("No top module detected!\n"); + } + + // Read and parse the PCF file + log("Loading PCF from '%s'...\n", a_Args[1].c_str()); + auto pcfParser = PcfParser(); + if (!pcfParser.parse(a_Args[1])) { + log_cmd_error("Failed to parse the PCF file!\n"); + } + + // Read and parse pinmap CSV file + log("Loading pinmap CSV from '%s'...\n", a_Args[2].c_str()); + auto pinmapParser = PinmapParser(); + if (!pinmapParser.parse(a_Args[2])) { + log_cmd_error("Failed to parse the pinmap CSV file!\n"); + } + + } + +} QuicklogicIob; + +PRIVATE_NAMESPACE_END diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile new file mode 100644 index 000000000..f5ddc6299 --- /dev/null +++ b/ql-iob-plugin/tests/Makefile @@ -0,0 +1,6 @@ +TESTS = dummy + +all: $(TESTS) + +dummy: + @echo $@ PASS diff --git a/ql-iob-plugin/tests/pinmap.csv b/ql-iob-plugin/tests/pinmap.csv new file mode 100644 index 000000000..03446625f --- /dev/null +++ b/ql-iob-plugin/tests/pinmap.csv @@ -0,0 +1,47 @@ +name,x,y,z,cell +FBIO_0,2,2,0,BIDIR +FBIO_1,4,2,0,BIDIR +FBIO_2,6,2,0,BIDIR +FBIO_3,8,2,0,BIDIR +FBIO_4,10,2,0,BIDIR +FBIO_5,12,2,0,BIDIR +FBIO_6,14,2,0,BIDIR +FBIO_7,16,2,0,BIDIR +FBIO_8,18,2,0,BIDIR +FBIO_9,20,2,0,BIDIR +FBIO_10,22,2,0,BIDIR +FBIO_11,24,2,0,BIDIR +FBIO_12,26,2,0,BIDIR +FBIO_13,28,2,0,BIDIR +FBIO_14,30,2,0,BIDIR +FBIO_15,32,2,0,BIDIR +FBIO_16,32,31,0,BIDIR +FBIO_17,30,31,0,BIDIR +FBIO_18,28,31,0,BIDIR +FBIO_19,26,31,0,BIDIR +FBIO_20,24,31,0,BIDIR +FBIO_21,22,31,0,BIDIR +FBIO_22,20,31,0,BIDIR +FBIO_23,18,31,0,BIDIR +FBIO_24,16,31,0,BIDIR +FBIO_25,14,31,0,BIDIR +FBIO_26,12,31,0,BIDIR +FBIO_27,10,31,0,BIDIR +FBIO_28,8,31,0,BIDIR +FBIO_29,6,31,0,BIDIR +FBIO_30,4,31,0,BIDIR +FBIO_31,2,31,0,BIDIR +SFBIO_0,1,30,0,SDIOMUX +SFBIO_1,1,30,0,SDIOMUX +SFBIO_2,1,30,0,SDIOMUX +SFBIO_3,1,29,0,SDIOMUX +SFBIO_4,1,29,0,SDIOMUX +SFBIO_5,1,29,0,SDIOMUX +SFBIO_6,1,28,0,SDIOMUX +SFBIO_7,1,28,0,SDIOMUX +SFBIO_8,1,28,0,SDIOMUX +SFBIO_9,1,27,0,SDIOMUX +SFBIO_10,1,27,0,SDIOMUX +SFBIO_11,1,27,0,SDIOMUX +SFBIO_12,1,26,0,SDIOMUX +SFBIO_13,1,26,0,SDIOMUX diff --git a/ql-iob-plugin/tests/test.pcf b/ql-iob-plugin/tests/test.pcf new file mode 100644 index 000000000..f6a01587a --- /dev/null +++ b/ql-iob-plugin/tests/test.pcf @@ -0,0 +1,9 @@ +set_io inp FBIO_0 +set_io out FBIO_1 # A comment + +# Another comment + +set_io led[5] FBIO_2 +set_io bus(7) FBIO_3 +set_io btn SFBIO_15 +#set_io sw[8] SFBIO_16 From 6debfe83df55aef1de82f9e047a06fe4aaa2311c Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 1 Apr 2020 14:58:07 +0200 Subject: [PATCH 144/845] Added .gitignore Signed-off-by: Maciej Kurc --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1f63fcdd7..4c85aa2d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ *.d -*.so *.o +*.so *.swp *.log From 5c4b82814e77df7e32a7722e768426ad0d1dd95b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 1 Apr 2020 15:47:03 +0200 Subject: [PATCH 145/845] Added test. Signed-off-by: Maciej Kurc --- ql-iob-plugin/Makefile | 4 ++-- ql-iob-plugin/tests/Makefile | 5 +++-- ql-iob-plugin/tests/design.pcf | 5 +++++ ql-iob-plugin/tests/design.v | 17 +++++++++++++++++ ql-iob-plugin/tests/test.pcf | 9 --------- 5 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 ql-iob-plugin/tests/design.pcf create mode 100644 ql-iob-plugin/tests/design.v delete mode 100644 ql-iob-plugin/tests/test.pcf diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile index 9a0d2f100..e7a16b41b 100644 --- a/ql-iob-plugin/Makefile +++ b/ql-iob-plugin/Makefile @@ -12,11 +12,11 @@ $(NAME).so: $(OBJS) .PHONY: install -install: $(NAME).so +install: test mkdir -p $(PLUGINS_DIR) cp $< $(PLUGINS_DIR)/$< -test: install +test: $(NAME).so $(MAKE) -C tests all clean: diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile index f5ddc6299..e6268e66b 100644 --- a/ql-iob-plugin/tests/Makefile +++ b/ql-iob-plugin/tests/Makefile @@ -1,6 +1,7 @@ -TESTS = dummy +TESTS = generic all: $(TESTS) -dummy: +generic: + yosys -p "plugin -i ../ql-iob.so; read_verilog design.v; synth_quicklogic -flatten; stat; quicklogic_iob design.pcf pinmap.csv; stat" @echo $@ PASS diff --git a/ql-iob-plugin/tests/design.pcf b/ql-iob-plugin/tests/design.pcf new file mode 100644 index 000000000..5e7afd360 --- /dev/null +++ b/ql-iob-plugin/tests/design.pcf @@ -0,0 +1,5 @@ +set_io clk FBIO_8 +set_io led(0) FBIO_0 +set_io led(1) FBIO_1 +set_io led(2) SFBIO_2 +set_io led(3) SFBIO_3 diff --git a/ql-iob-plugin/tests/design.v b/ql-iob-plugin/tests/design.v new file mode 100644 index 000000000..1aa05fb25 --- /dev/null +++ b/ql-iob-plugin/tests/design.v @@ -0,0 +1,17 @@ +module top +( + input wire clk, + output wire [3:0] led, + inout wire io +); + + reg [3:0] r; + initial r <= 0; + + always @(posedge clk) + r <= r + io; + + assign led = {r[0], r[1], r[2], r[3]}; + assign io = r[0] ? 1 : 1'bz; + +endmodule diff --git a/ql-iob-plugin/tests/test.pcf b/ql-iob-plugin/tests/test.pcf deleted file mode 100644 index f6a01587a..000000000 --- a/ql-iob-plugin/tests/test.pcf +++ /dev/null @@ -1,9 +0,0 @@ -set_io inp FBIO_0 -set_io out FBIO_1 # A comment - -# Another comment - -set_io led[5] FBIO_2 -set_io bus(7) FBIO_3 -set_io btn SFBIO_15 -#set_io sw[8] SFBIO_16 From 6ab7d2bdefa5273268cb5fbb9a3a598540c90247 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 1 Apr 2020 17:30:35 +0200 Subject: [PATCH 146/845] Preliminary matching cell instance to constrained location names. Signed-off-by: Maciej Kurc --- ql-iob-plugin/pcf_parser.hh | 2 + ql-iob-plugin/ql-iob.cc | 142 +++++++++++++++++++++++++++++++++++- 2 files changed, 141 insertions(+), 3 deletions(-) diff --git a/ql-iob-plugin/pcf_parser.hh b/ql-iob-plugin/pcf_parser.hh index 671b01749..22263fdd6 100644 --- a/ql-iob-plugin/pcf_parser.hh +++ b/ql-iob-plugin/pcf_parser.hh @@ -36,6 +36,8 @@ public: const std::string padName; const std::string comment; + Constraint () = default; + Constraint ( const std::string& a_NetName, const std::string& a_PadName, diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 72a4b0af0..40aeddc83 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -38,7 +38,7 @@ struct QuicklogicIob : public Pass { QuicklogicIob () : Pass("quicklogic_iob", "Map IO buffers to cells that correspond to their assigned locations") { register_in_tcl_interpreter(pass_name); - } + } void help() YS_OVERRIDE { log("Help!\n"); @@ -50,8 +50,8 @@ struct QuicklogicIob : public Pass { } // Get the top module of the design - RTLIL::Module* topModule = a_Design->top_module(); - if (topModule == nullptr) { + m_topModule = a_Design->top_module(); + if (m_topModule == nullptr) { log_cmd_error("No top module detected!\n"); } @@ -62,6 +62,15 @@ struct QuicklogicIob : public Pass { log_cmd_error("Failed to parse the PCF file!\n"); } + // Build a map of net names to constraints + std::unordered_map constraintMap; + for (auto& constraint : pcfParser.getConstraints()) { + if (constraintMap.count(constraint.netName) != 0) { + log_cmd_error("The net '%s' is constrained twice!", constraint.netName.c_str()); + } + constraintMap.emplace(constraint.netName, constraint); + } + // Read and parse pinmap CSV file log("Loading pinmap CSV from '%s'...\n", a_Args[2].c_str()); auto pinmapParser = PinmapParser(); @@ -69,6 +78,133 @@ struct QuicklogicIob : public Pass { log_cmd_error("Failed to parse the pinmap CSV file!\n"); } + // A map of IO cell types and their port names that should go to a pad + std::unordered_map ioCellTypes; + + // TODO + ioCellTypes.insert(std::make_pair("inpad", "P")); + ioCellTypes.insert(std::make_pair("outpad", "P")); + + // Check all IO cells + for (auto cell : m_topModule->cells()) { + auto cellType = RTLIL::unescape_id(cell->type); + + // No an IO cell + if (ioCellTypes.count(cellType) == 0) { + continue; + } + + log(" %-16s %-40s ", cellType.c_str(), cell->name.c_str()); + + // Get connections to the specified port + std::string port = RTLIL::escape_id(ioCellTypes.at(cellType)); + if (cell->connections().count(port) == 0) { + log(" Port '%s' not found!\n", port.c_str()); + continue; + } + + // Get the sigspec of the connection + auto sigspec = cell->connections().at(port); + + // Get the connected wire + if (!sigspec.is_wire()) { + log(" Couldn't determine connection\n"); + continue; + } + auto wire = sigspec.as_wire(); + + // Has to be top level wire + if (!wire->port_input && !wire->port_output) { + log(" No top-level port!\n"); + continue; + } + + // Check if the wire is constrained + auto wireName = RTLIL::unescape_id(wire->name); + if (constraintMap.count(wireName) == 0) { + log("\n"); + continue; + } + + // Get the constraint + auto constraint = constraintMap.at(wireName); + log("%s\n", constraint.padName.c_str()); + } + +// log("%zu connections\n", m_topModule->connections().size()); + +// for (auto cell : m_topModule->cells()) { +// log("'%s' '%s' %zu\n", cell->name.c_str(), cell->type.c_str(), cell->connections().size()); +// for (auto c : cell->connections()) { +// log(" '%s'\n", c.first.c_str()); +// } +// } + +/* // Get top-level wires + for (auto wire : m_topModule->wires()) { + + // Not a top-level + if (!wire->port_input && !wire->port_output) { + continue; + } + + log("'%s'\n", wire->name.c_str()); + //getConnectedCell(wire, 0); + }*/ + } + + // .............................................................. + + RTLIL::Module* m_topModule = nullptr; + + // .............................................................. + + RTLIL::Module* getConnectedCell(RTLIL::Wire* wire, size_t bit = 0) { + + RTLIL::Module* module = wire->module; + + log("'%s' %d\n", wire->name.c_str(), bit); + for (auto connection : m_topModule->connections_) { + log("k"); + auto dst_sig = connection.first; + auto src_sig = connection.second; + + // Go down + if (dst_sig.is_chunk()) { + auto chunk = dst_sig.as_chunk(); + if (chunk.wire) { + log(" '%s'\n", chunk.wire->name.c_str()); + } + log("%d\n", chunk.width); + } + + if (dst_sig.is_wire()) { + auto w = dst_sig.as_wire(); + log(" '%s'\n",w->name.c_str()); + } + +/* if (dst_sig.is_chunk()) { + auto chunk = dst_sig.as_chunk(); + + if (chunk.wire) { + + if (chunk.wire->name != wire->name) { + continue; + } + if (bit < chunk.offset || bit >= (chunk.offset + chunk.width)) { + continue; + } + + auto src_wires = src_sig.to_sigbit_vector(); + auto src_wire_sigbit = src_wires.at(bit - chunk.offset); + if (src_wire_sigbit.wire) { + log(" '%s'\n", src_wire_sigbit.wire->name.c_str()); + } + } + }*/ + } + + return nullptr; } } QuicklogicIob; From dcd0e31571513130244d73cbecf82aa22a07dc6b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 2 Apr 2020 09:32:02 +0200 Subject: [PATCH 147/845] Working prototype, sets specific parameters on given IO cells. Signed-off-by: Maciej Kurc --- ql-iob-plugin/ql-iob.cc | 117 +++++++++++++---------------------- ql-iob-plugin/tests/Makefile | 2 +- 2 files changed, 43 insertions(+), 76 deletions(-) diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 40aeddc83..1d99283ce 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -50,8 +50,8 @@ struct QuicklogicIob : public Pass { } // Get the top module of the design - m_topModule = a_Design->top_module(); - if (m_topModule == nullptr) { + RTLIL::Module* topModule = a_Design->top_module(); + if (topModule == nullptr) { log_cmd_error("No top module detected!\n"); } @@ -78,6 +78,14 @@ struct QuicklogicIob : public Pass { log_cmd_error("Failed to parse the pinmap CSV file!\n"); } + // Build a map of pad names to entries + std::unordered_map pinmapMap; + for (auto& entry : pinmapParser.getEntries()) { + if (entry.count("name") != 0) { + pinmapMap.emplace(entry.at("name"), entry); + } + } + // A map of IO cell types and their port names that should go to a pad std::unordered_map ioCellTypes; @@ -86,15 +94,18 @@ struct QuicklogicIob : public Pass { ioCellTypes.insert(std::make_pair("outpad", "P")); // Check all IO cells - for (auto cell : m_topModule->cells()) { + log("\n"); + log(" type | instance | pad | loc | cell \n"); + log(" ------------+----------------------+------------+----------+----------\n"); + for (auto cell : topModule->cells()) { auto cellType = RTLIL::unescape_id(cell->type); - // No an IO cell + // Not an IO cell if (ioCellTypes.count(cellType) == 0) { continue; } - log(" %-16s %-40s ", cellType.c_str(), cell->name.c_str()); + log(" %-10s | %-20s ", cellType.c_str(), cell->name.c_str()); // Get connections to the specified port std::string port = RTLIL::escape_id(ioCellTypes.at(cellType)); @@ -108,14 +119,14 @@ struct QuicklogicIob : public Pass { // Get the connected wire if (!sigspec.is_wire()) { - log(" Couldn't determine connection\n"); + log(" Couldn't determine the connection!\n"); continue; } auto wire = sigspec.as_wire(); // Has to be top level wire if (!wire->port_input && !wire->port_output) { - log(" No top-level port!\n"); + log(" Not a top-level wire!\n"); continue; } @@ -128,83 +139,39 @@ struct QuicklogicIob : public Pass { // Get the constraint auto constraint = constraintMap.at(wireName); - log("%s\n", constraint.padName.c_str()); - } - -// log("%zu connections\n", m_topModule->connections().size()); + log("| %-10s ", constraint.padName.c_str()); -// for (auto cell : m_topModule->cells()) { -// log("'%s' '%s' %zu\n", cell->name.c_str(), cell->type.c_str(), cell->connections().size()); -// for (auto c : cell->connections()) { -// log(" '%s'\n", c.first.c_str()); -// } -// } - -/* // Get top-level wires - for (auto wire : m_topModule->wires()) { - - // Not a top-level - if (!wire->port_input && !wire->port_output) { + // Check if there is an entry in the pinmap for this pad name + if (pinmapMap.count(constraint.padName) == 0) { + log("\n"); continue; } - log("'%s'\n", wire->name.c_str()); - //getConnectedCell(wire, 0); - }*/ - } - - // .............................................................. + // Get the entry + auto entry = pinmapMap.at(constraint.padName); - RTLIL::Module* m_topModule = nullptr; - - // .............................................................. - - RTLIL::Module* getConnectedCell(RTLIL::Wire* wire, size_t bit = 0) { - - RTLIL::Module* module = wire->module; - - log("'%s' %d\n", wire->name.c_str(), bit); - for (auto connection : m_topModule->connections_) { - log("k"); - auto dst_sig = connection.first; - auto src_sig = connection.second; - - // Go down - if (dst_sig.is_chunk()) { - auto chunk = dst_sig.as_chunk(); - if (chunk.wire) { - log(" '%s'\n", chunk.wire->name.c_str()); - } - log("%d\n", chunk.width); + // The pinmap entry does not have cell type defined, skip it. + if (entry.count("cell") == 0) { + log("\n"); + continue; } - - if (dst_sig.is_wire()) { - auto w = dst_sig.as_wire(); - log(" '%s'\n",w->name.c_str()); + + // Location string + std::string loc; + if (entry.count("x") && entry.count("y")) { + loc = stringf("X%sY%s", + entry.at("x").c_str(), + entry.at("y").c_str() + ); } -/* if (dst_sig.is_chunk()) { - auto chunk = dst_sig.as_chunk(); - - if (chunk.wire) { - - if (chunk.wire->name != wire->name) { - continue; - } - if (bit < chunk.offset || bit >= (chunk.offset + chunk.width)) { - continue; - } - - auto src_wires = src_sig.to_sigbit_vector(); - auto src_wire_sigbit = src_wires.at(bit - chunk.offset); - if (src_wire_sigbit.wire) { - log(" '%s'\n", src_wire_sigbit.wire->name.c_str()); - } - } - }*/ - } + log("| %-8s | %s\n", loc.c_str(), entry.at("cell").c_str()); - return nullptr; + // Annotate the cell by setting its parameters + cell->setParam(RTLIL::escape_id("IO_PAD"), constraint.padName); + cell->setParam(RTLIL::escape_id("IO_LOC"), loc); + cell->setParam(RTLIL::escape_id("IO_TYPE"), entry.at("cell")); + } } } QuicklogicIob; diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile index e6268e66b..40145a8f5 100644 --- a/ql-iob-plugin/tests/Makefile +++ b/ql-iob-plugin/tests/Makefile @@ -3,5 +3,5 @@ TESTS = generic all: $(TESTS) generic: - yosys -p "plugin -i ../ql-iob.so; read_verilog design.v; synth_quicklogic -flatten; stat; quicklogic_iob design.pcf pinmap.csv; stat" + yosys -p "plugin -i ../ql-iob.so; read_verilog design.v; synth_quicklogic -flatten; stat; quicklogic_iob design.pcf pinmap.csv; stat; write_blif -attr -param -cname design.eblif" @echo $@ PASS From 2f5b0ad9adf1d03f31f9a0705d40eb14b91f3caa Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 2 Apr 2020 09:44:49 +0200 Subject: [PATCH 148/845] Code refactoring. Signed-off-by: Maciej Kurc --- ql-iob-plugin/ql-iob.cc | 114 ++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 58 deletions(-) diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 1d99283ce..c24551217 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -107,70 +107,68 @@ struct QuicklogicIob : public Pass { log(" %-10s | %-20s ", cellType.c_str(), cell->name.c_str()); + std::string padName; + std::string locName; + std::string cellName; + // Get connections to the specified port std::string port = RTLIL::escape_id(ioCellTypes.at(cellType)); - if (cell->connections().count(port) == 0) { - log(" Port '%s' not found!\n", port.c_str()); - continue; - } - - // Get the sigspec of the connection - auto sigspec = cell->connections().at(port); - - // Get the connected wire - if (!sigspec.is_wire()) { - log(" Couldn't determine the connection!\n"); - continue; - } - auto wire = sigspec.as_wire(); - - // Has to be top level wire - if (!wire->port_input && !wire->port_output) { - log(" Not a top-level wire!\n"); - continue; - } - - // Check if the wire is constrained - auto wireName = RTLIL::unescape_id(wire->name); - if (constraintMap.count(wireName) == 0) { - log("\n"); - continue; - } - - // Get the constraint - auto constraint = constraintMap.at(wireName); - log("| %-10s ", constraint.padName.c_str()); - - // Check if there is an entry in the pinmap for this pad name - if (pinmapMap.count(constraint.padName) == 0) { - log("\n"); - continue; - } - - // Get the entry - auto entry = pinmapMap.at(constraint.padName); - - // The pinmap entry does not have cell type defined, skip it. - if (entry.count("cell") == 0) { - log("\n"); - continue; - } - - // Location string - std::string loc; - if (entry.count("x") && entry.count("y")) { - loc = stringf("X%sY%s", - entry.at("x").c_str(), - entry.at("y").c_str() - ); + if (cell->connections().count(port)) { + + // Get the sigspec of the connection + auto sigspec = cell->connections().at(port); + + // Get the connected wire + // FIXME: This assumes that the cell is directly connected to a + // top-level port. + if (sigspec.is_wire()) { + auto wire = sigspec.as_wire(); + + // Has to be top level wire + if (wire->port_input || wire->port_output) { + + // Check if the wire is constrained + auto wireName = RTLIL::unescape_id(wire->name); + if (constraintMap.count(wireName)) { + + // Get the constraint + auto constraint = constraintMap.at(wireName); + + // Check if there is an entry in the pinmap for this pad name + if (pinmapMap.count(constraint.padName)) { + + // Get the entry + auto entry = pinmapMap.at(constraint.padName); + padName = constraint.padName; + + // Location string + if (entry.count("x") && entry.count("y")) { + locName = stringf("X%sY%s", + entry.at("x").c_str(), + entry.at("y").c_str() + ); + } + + // Cell name + if (entry.count("cell")) { + cellName = entry.at("cell"); + } + } + } + } + } } - log("| %-8s | %s\n", loc.c_str(), entry.at("cell").c_str()); + log("| %-10s | %-8s | %s\n", + padName.c_str(), + locName.c_str(), + cellName.c_str() + ); // Annotate the cell by setting its parameters - cell->setParam(RTLIL::escape_id("IO_PAD"), constraint.padName); - cell->setParam(RTLIL::escape_id("IO_LOC"), loc); - cell->setParam(RTLIL::escape_id("IO_TYPE"), entry.at("cell")); + cell->setParam(RTLIL::escape_id("IO_PAD"), padName); + cell->setParam(RTLIL::escape_id("IO_LOC"), locName); + cell->setParam(RTLIL::escape_id("IO_TYPE"), cellName); } } From d684ae2f90b14ef59d9a3da5ee2e61c558861077 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 2 Apr 2020 10:18:15 +0200 Subject: [PATCH 149/845] Added IO cell types as optional arguments. Added help. Signed-off-by: Maciej Kurc --- ql-iob-plugin/ql-iob.cc | 82 +++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 16 deletions(-) diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index c24551217..8910cd3e6 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -24,6 +24,8 @@ #include "kernel/register.h" #include "kernel/rtlil.h" +#include + USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN @@ -41,12 +43,64 @@ struct QuicklogicIob : public Pass { } void help() YS_OVERRIDE { - log("Help!\n"); + log("\n"); + log(" quicklogic_iob []"); + log("\n"); + log("This command assigns certain parameters of the specified IO cell types\n"); + log("basing on the placement constraints and the pin map of the target device\n"); + log("\n"); + log("Each affected IO cell is assigned the followin parameters:\n"); + log(" - IO_PAD = \"\"\n"); + log(" - IO_LOC = \"\"\n"); + log(" - IO_CELL = \"\"\n"); + log("\n"); + log("Parameters:\n"); + log("\n"); + log(" - \n"); + log(" Path to a PCF file with IO constraints for the design\n"); + log("\n"); + log(" - \n"); + log(" Path to a pinmap CSV file with package pin map\n"); + log("\n"); + log(" - \n"); + log(" A space-separated list of :. Each\n"); + log(" entry defines a type of IO cell to be affected an its port\n"); + log(" name that should connect to the top-level port of the design.\n"); + log("\n"); } void execute(std::vector a_Args, RTLIL::Design* a_Design) YS_OVERRIDE { if (a_Args.size() < 3) { - log_cmd_error("Usage: quicklogic_iob "); + log_cmd_error(" Usage: quicklogic_iob []"); + } + + // A map of IO cell types and their port names that should go to a pad + std::unordered_map ioCellTypes; + + // Parse io cell specification + if (a_Args.size() > 3) { + + // FIXME: Are these characters set the only ones that can be in + // cell / port name ? + std::regex re("^([\\w$]+):([\\w$]+)$"); + + for (size_t i=3; i ioCellTypes; - - // TODO - ioCellTypes.insert(std::make_pair("inpad", "P")); - ioCellTypes.insert(std::make_pair("outpad", "P")); - // Check all IO cells + log("Processing cells..."); log("\n"); - log(" type | instance | pad | loc | cell \n"); - log(" ------------+----------------------+------------+----------+----------\n"); + log(" type | instance | net | pad | loc | cell \n"); + log(" ------------+----------------------+------------+------------+----------+----------\n"); for (auto cell : topModule->cells()) { auto cellType = RTLIL::unescape_id(cell->type); @@ -105,8 +153,9 @@ struct QuicklogicIob : public Pass { continue; } - log(" %-10s | %-20s ", cellType.c_str(), cell->name.c_str()); + log(" %-10s | %-20s ", cellType.c_str(), cell->name.c_str()); + std::string netName; std::string padName; std::string locName; std::string cellName; @@ -128,11 +177,11 @@ struct QuicklogicIob : public Pass { if (wire->port_input || wire->port_output) { // Check if the wire is constrained - auto wireName = RTLIL::unescape_id(wire->name); - if (constraintMap.count(wireName)) { + netName = RTLIL::unescape_id(wire->name); + if (constraintMap.count(netName)) { // Get the constraint - auto constraint = constraintMap.at(wireName); + auto constraint = constraintMap.at(netName); // Check if there is an entry in the pinmap for this pad name if (pinmapMap.count(constraint.padName)) { @@ -159,7 +208,8 @@ struct QuicklogicIob : public Pass { } } - log("| %-10s | %-8s | %s\n", + log("| %-10s | %-10s | %-8s | %s\n", + netName.c_str(), padName.c_str(), locName.c_str(), cellName.c_str() From 60a82ddb44a1912587e7771fde1db52775f171ca Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 2 Apr 2020 10:20:54 +0200 Subject: [PATCH 150/845] Fixed makefile Signed-off-by: Maciej Kurc --- ql-iob-plugin/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile index e7a16b41b..446dfc7e3 100644 --- a/ql-iob-plugin/Makefile +++ b/ql-iob-plugin/Makefile @@ -10,11 +10,11 @@ OBJS = $(NAME).o pcf_parser.cc pinmap_parser.cc $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) -.PHONY: install +.PHONY: install test install: test mkdir -p $(PLUGINS_DIR) - cp $< $(PLUGINS_DIR)/$< + cp $(NAME).so $(PLUGINS_DIR)/$(NAME).so test: $(NAME).so $(MAKE) -C tests all From dfb598480913e043be50fbe76f9df68d4b9236f6 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 2 Apr 2020 11:47:24 +0200 Subject: [PATCH 151/845] Updated naming convention Signed-off-by: Maciej Kurc --- ql-iob-plugin/ql-iob.cc | 20 ++++++++++---------- ql-iob-plugin/tests/pinmap.csv | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 8910cd3e6..fa8d8ba68 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -146,22 +146,22 @@ struct QuicklogicIob : public Pass { log(" type | instance | net | pad | loc | cell \n"); log(" ------------+----------------------+------------+------------+----------+----------\n"); for (auto cell : topModule->cells()) { - auto cellType = RTLIL::unescape_id(cell->type); + auto ysCellType = RTLIL::unescape_id(cell->type); // Not an IO cell - if (ioCellTypes.count(cellType) == 0) { + if (ioCellTypes.count(ysCellType) == 0) { continue; } - log(" %-10s | %-20s ", cellType.c_str(), cell->name.c_str()); + log(" %-10s | %-20s ", ysCellType.c_str(), cell->name.c_str()); std::string netName; std::string padName; std::string locName; - std::string cellName; + std::string cellType; // Get connections to the specified port - std::string port = RTLIL::escape_id(ioCellTypes.at(cellType)); + std::string port = RTLIL::escape_id(ioCellTypes.at(ysCellType)); if (cell->connections().count(port)) { // Get the sigspec of the connection @@ -198,9 +198,9 @@ struct QuicklogicIob : public Pass { ); } - // Cell name - if (entry.count("cell")) { - cellName = entry.at("cell"); + // Cell type + if (entry.count("type")) { + cellType = entry.at("type"); } } } @@ -212,13 +212,13 @@ struct QuicklogicIob : public Pass { netName.c_str(), padName.c_str(), locName.c_str(), - cellName.c_str() + cellType.c_str() ); // Annotate the cell by setting its parameters cell->setParam(RTLIL::escape_id("IO_PAD"), padName); cell->setParam(RTLIL::escape_id("IO_LOC"), locName); - cell->setParam(RTLIL::escape_id("IO_TYPE"), cellName); + cell->setParam(RTLIL::escape_id("IO_TYPE"), cellType); } } diff --git a/ql-iob-plugin/tests/pinmap.csv b/ql-iob-plugin/tests/pinmap.csv index 03446625f..1587df5db 100644 --- a/ql-iob-plugin/tests/pinmap.csv +++ b/ql-iob-plugin/tests/pinmap.csv @@ -1,4 +1,4 @@ -name,x,y,z,cell +name,x,y,z,type FBIO_0,2,2,0,BIDIR FBIO_1,4,2,0,BIDIR FBIO_2,6,2,0,BIDIR From 08593b578ccbaf89778b4e403738a9a215298c6b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 2 Apr 2020 13:33:28 +0200 Subject: [PATCH 152/845] Added README.md Signed-off-by: Maciej Kurc --- ql-iob-plugin/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 ql-iob-plugin/README.md diff --git a/ql-iob-plugin/README.md b/ql-iob-plugin/README.md new file mode 100644 index 000000000..8e3e85a82 --- /dev/null +++ b/ql-iob-plugin/README.md @@ -0,0 +1,11 @@ +# QuickLogic IO buffer plugin + +This plugin allows to annotate IO buffer cells with information from IO placement constraints. This is required to determine at the netlist level what types of IO buffers have to be used where. + +The plugin reads IO constraints from a PCF file and a board pinmap from a pinmap CSV file. The pinmap file should contain the followin columns: `name`, `x`, `y` and `type` (optional). Basing on this information each IO cell has the following parameters set: + +- IO_PAD - Name of the IO pad, +- IO_LOC - Location of the IO pad (eg. "X10Y20"), +- IO_TYPE - Type of the IO buffer (to be used inside techmap). + +See the plugin's help for more details. From 85f20b8009510aeda268a6b7ae839852006fa870 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 14 Apr 2020 17:07:27 +0200 Subject: [PATCH 153/845] "re-tabbed" code. Signed-off-by: Maciej Kurc --- ql-iob-plugin/ql-iob.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index fa8d8ba68..3129d315b 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -104,10 +104,10 @@ struct QuicklogicIob : public Pass { } // Get the top module of the design - RTLIL::Module* topModule = a_Design->top_module(); - if (topModule == nullptr) { - log_cmd_error("No top module detected!\n"); - } + RTLIL::Module* topModule = a_Design->top_module(); + if (topModule == nullptr) { + log_cmd_error("No top module detected!\n"); + } // Read and parse the PCF file log("Loading PCF from '%s'...\n", a_Args[1].c_str()); From ede4ca5949ce6b2bda924c886b48d9804b45dc01 Mon Sep 17 00:00:00 2001 From: rakeshm75 <54097448+rakeshm75@users.noreply.github.com> Date: Sat, 20 Jun 2020 22:39:28 +0530 Subject: [PATCH 154/845] removed -flatten command option Signed-off-by: Maciej Kurc --- ql-iob-plugin/tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile index 40145a8f5..f6ddd6ac2 100644 --- a/ql-iob-plugin/tests/Makefile +++ b/ql-iob-plugin/tests/Makefile @@ -3,5 +3,5 @@ TESTS = generic all: $(TESTS) generic: - yosys -p "plugin -i ../ql-iob.so; read_verilog design.v; synth_quicklogic -flatten; stat; quicklogic_iob design.pcf pinmap.csv; stat; write_blif -attr -param -cname design.eblif" + yosys -p "plugin -i ../ql-iob.so; read_verilog design.v; synth_quicklogic ; stat; quicklogic_iob design.pcf pinmap.csv; stat; write_blif -attr -param -cname design.eblif" @echo $@ PASS From 531559a33fbd5ed6ad2b97b3cce2f8b1c138afe4 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 26 Jun 2020 12:38:32 +0200 Subject: [PATCH 155/845] Updated tests for the ql-ios plugin. Signed-off-by: Maciej Kurc --- ql-iob-plugin/Makefile | 2 +- ql-iob-plugin/tests/.gitignore | 2 + ql-iob-plugin/tests/Makefile | 16 ++-- ql-iob-plugin/tests/ckpad/Makefile | 4 + ql-iob-plugin/tests/ckpad/design.pcf | 14 ++++ ql-iob-plugin/tests/ckpad/design.v | 22 +++++ ql-iob-plugin/tests/ckpad/script.ys | 14 ++++ ql-iob-plugin/tests/design.pcf | 5 -- ql-iob-plugin/tests/pinmap.csv | 97 ++++++++++++---------- ql-iob-plugin/tests/sdiomux/Makefile | 4 + ql-iob-plugin/tests/sdiomux/design.pcf | 5 ++ ql-iob-plugin/tests/{ => sdiomux}/design.v | 0 ql-iob-plugin/tests/sdiomux/script.ys | 13 +++ 13 files changed, 141 insertions(+), 57 deletions(-) create mode 100644 ql-iob-plugin/tests/.gitignore create mode 100644 ql-iob-plugin/tests/ckpad/Makefile create mode 100644 ql-iob-plugin/tests/ckpad/design.pcf create mode 100644 ql-iob-plugin/tests/ckpad/design.v create mode 100644 ql-iob-plugin/tests/ckpad/script.ys delete mode 100644 ql-iob-plugin/tests/design.pcf create mode 100644 ql-iob-plugin/tests/sdiomux/Makefile create mode 100644 ql-iob-plugin/tests/sdiomux/design.pcf rename ql-iob-plugin/tests/{ => sdiomux}/design.v (100%) create mode 100644 ql-iob-plugin/tests/sdiomux/script.ys diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile index 446dfc7e3..94b8536e7 100644 --- a/ql-iob-plugin/Makefile +++ b/ql-iob-plugin/Makefile @@ -21,4 +21,4 @@ test: $(NAME).so clean: rm -f *.d *.o *.so - + $(MAKE) -C tests clean diff --git a/ql-iob-plugin/tests/.gitignore b/ql-iob-plugin/tests/.gitignore new file mode 100644 index 000000000..744eec9c3 --- /dev/null +++ b/ql-iob-plugin/tests/.gitignore @@ -0,0 +1,2 @@ +*.eblif +ok diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile index f6ddd6ac2..11a370434 100644 --- a/ql-iob-plugin/tests/Makefile +++ b/ql-iob-plugin/tests/Makefile @@ -1,7 +1,13 @@ -TESTS = generic +TESTS = sdiomux ckpad -all: $(TESTS) +all: $(addsuffix /ok,$(TESTS)) -generic: - yosys -p "plugin -i ../ql-iob.so; read_verilog design.v; synth_quicklogic ; stat; quicklogic_iob design.pcf pinmap.csv; stat; write_blif -attr -param -cname design.eblif" - @echo $@ PASS +clean: + @find . -name "ok" | xargs rm -rf + +sdiomux/ok: + cd sdiomux && $(MAKE) test +ckpad/ok: + cd ckpad && $(MAKE) test + +.PHONY: all clean diff --git a/ql-iob-plugin/tests/ckpad/Makefile b/ql-iob-plugin/tests/ckpad/Makefile new file mode 100644 index 000000000..ac7b66425 --- /dev/null +++ b/ql-iob-plugin/tests/ckpad/Makefile @@ -0,0 +1,4 @@ +test: + yosys -s script.ys + @echo $@ PASS + @touch ok diff --git a/ql-iob-plugin/tests/ckpad/design.pcf b/ql-iob-plugin/tests/ckpad/design.pcf new file mode 100644 index 000000000..00563c565 --- /dev/null +++ b/ql-iob-plugin/tests/ckpad/design.pcf @@ -0,0 +1,14 @@ +set_io clk0 B3 # to a BIDIR +set_io clk1 A3 # to a BIDIR/CLOCK +set_io clk2 B4 # to a BIDIR +set_io clk3 C4 # to a BIDIR/CLOCK + +set_io d(0) C1 +set_io d(1) A1 +set_io d(2) A2 +set_io d(3) B2 + +set_io q(0) B5 +set_io q(1) D6 +set_io q(2) A5 +set_io q(3) C6 diff --git a/ql-iob-plugin/tests/ckpad/design.v b/ql-iob-plugin/tests/ckpad/design.v new file mode 100644 index 000000000..8ef141870 --- /dev/null +++ b/ql-iob-plugin/tests/ckpad/design.v @@ -0,0 +1,22 @@ +module top ( + input wire clk0, + input wire clk1, + (* clkbuf_inhibit *) + input wire clk2, + (* clkbuf_inhibit *) + input wire clk3, + + input wire [3:0] d, + output reg [3:0] q +); + + always @(posedge clk0) + q[0] <= d[0]; + always @(posedge clk1) + q[1] <= d[1]; + always @(posedge clk2) + q[2] <= d[2]; + always @(posedge clk3) + q[3] <= d[3]; + +endmodule diff --git a/ql-iob-plugin/tests/ckpad/script.ys b/ql-iob-plugin/tests/ckpad/script.ys new file mode 100644 index 000000000..fad6921db --- /dev/null +++ b/ql-iob-plugin/tests/ckpad/script.ys @@ -0,0 +1,14 @@ +plugin -i ../../ql-iob.so +read_verilog design.v + +synth_quicklogic +stat + +quicklogic_iob design.pcf ../pinmap.csv + +select r:IO_TYPE=BIDIR -assert-count 11 +select r:IO_TYPE=CLOCK -assert-count 1 +select r:IO_TYPE=SDIOMUX -assert-count 0 +select r:IO_TYPE= -assert-count 0 + +write_blif -attr -param -cname design.eblif diff --git a/ql-iob-plugin/tests/design.pcf b/ql-iob-plugin/tests/design.pcf deleted file mode 100644 index 5e7afd360..000000000 --- a/ql-iob-plugin/tests/design.pcf +++ /dev/null @@ -1,5 +0,0 @@ -set_io clk FBIO_8 -set_io led(0) FBIO_0 -set_io led(1) FBIO_1 -set_io led(2) SFBIO_2 -set_io led(3) SFBIO_3 diff --git a/ql-iob-plugin/tests/pinmap.csv b/ql-iob-plugin/tests/pinmap.csv index 1587df5db..c7edb1723 100644 --- a/ql-iob-plugin/tests/pinmap.csv +++ b/ql-iob-plugin/tests/pinmap.csv @@ -1,47 +1,52 @@ name,x,y,z,type -FBIO_0,2,2,0,BIDIR -FBIO_1,4,2,0,BIDIR -FBIO_2,6,2,0,BIDIR -FBIO_3,8,2,0,BIDIR -FBIO_4,10,2,0,BIDIR -FBIO_5,12,2,0,BIDIR -FBIO_6,14,2,0,BIDIR -FBIO_7,16,2,0,BIDIR -FBIO_8,18,2,0,BIDIR -FBIO_9,20,2,0,BIDIR -FBIO_10,22,2,0,BIDIR -FBIO_11,24,2,0,BIDIR -FBIO_12,26,2,0,BIDIR -FBIO_13,28,2,0,BIDIR -FBIO_14,30,2,0,BIDIR -FBIO_15,32,2,0,BIDIR -FBIO_16,32,31,0,BIDIR -FBIO_17,30,31,0,BIDIR -FBIO_18,28,31,0,BIDIR -FBIO_19,26,31,0,BIDIR -FBIO_20,24,31,0,BIDIR -FBIO_21,22,31,0,BIDIR -FBIO_22,20,31,0,BIDIR -FBIO_23,18,31,0,BIDIR -FBIO_24,16,31,0,BIDIR -FBIO_25,14,31,0,BIDIR -FBIO_26,12,31,0,BIDIR -FBIO_27,10,31,0,BIDIR -FBIO_28,8,31,0,BIDIR -FBIO_29,6,31,0,BIDIR -FBIO_30,4,31,0,BIDIR -FBIO_31,2,31,0,BIDIR -SFBIO_0,1,30,0,SDIOMUX -SFBIO_1,1,30,0,SDIOMUX -SFBIO_2,1,30,0,SDIOMUX -SFBIO_3,1,29,0,SDIOMUX -SFBIO_4,1,29,0,SDIOMUX -SFBIO_5,1,29,0,SDIOMUX -SFBIO_6,1,28,0,SDIOMUX -SFBIO_7,1,28,0,SDIOMUX -SFBIO_8,1,28,0,SDIOMUX -SFBIO_9,1,27,0,SDIOMUX -SFBIO_10,1,27,0,SDIOMUX -SFBIO_11,1,27,0,SDIOMUX -SFBIO_12,1,26,0,SDIOMUX -SFBIO_13,1,26,0,SDIOMUX +B1,4,3,0,BIDIR +C1,6,3,0,BIDIR +A1,8,3,0,BIDIR +A2,10,3,0,BIDIR +B2,12,3,0,BIDIR +C3,14,3,0,BIDIR +B3,16,3,0,BIDIR +A3,18,2,0,CLOCK +A3,18,3,0,BIDIR +C4,20,2,0,CLOCK +C4,20,3,0,BIDIR +B4,22,3,0,BIDIR +A4,24,3,0,BIDIR +C5,26,3,0,BIDIR +B5,28,3,0,BIDIR +D6,30,3,0,BIDIR +A5,32,3,0,BIDIR +C6,34,3,0,BIDIR +E7,34,32,0,BIDIR +D7,32,32,0,BIDIR +E8,30,32,0,BIDIR +H8,28,32,0,BIDIR +G8,26,32,0,BIDIR +H7,24,32,0,BIDIR +G7,22,33,0,CLOCK +G7,22,32,0,BIDIR +H6,20,32,0,BIDIR +H6,20,33,0,CLOCK +G6,18,32,0,BIDIR +G6,18,33,0,CLOCK +F7,16,32,0,BIDIR +F6,14,32,0,BIDIR +H5,12,32,0,BIDIR +G5,10,32,0,BIDIR +F5,8,32,0,BIDIR +F4,6,32,0,BIDIR +G4,4,32,0,BIDIR +H4,3,31,0,SDIOMUX +E3,2,31,0,SDIOMUX +F3,1,31,0,SDIOMUX +F2,3,30,0,SDIOMUX +H3,2,30,0,SDIOMUX +G2,1,30,0,SDIOMUX +E2,3,29,0,SDIOMUX +H2,2,29,0,SDIOMUX +D2,1,29,0,SDIOMUX +F1,3,28,0,SDIOMUX +H1,2,28,0,SDIOMUX +D1,1,28,0,SDIOMUX +E1,3,27,0,SDIOMUX +G1,2,27,0,SDIOMUX diff --git a/ql-iob-plugin/tests/sdiomux/Makefile b/ql-iob-plugin/tests/sdiomux/Makefile new file mode 100644 index 000000000..ac7b66425 --- /dev/null +++ b/ql-iob-plugin/tests/sdiomux/Makefile @@ -0,0 +1,4 @@ +test: + yosys -s script.ys + @echo $@ PASS + @touch ok diff --git a/ql-iob-plugin/tests/sdiomux/design.pcf b/ql-iob-plugin/tests/sdiomux/design.pcf new file mode 100644 index 000000000..9aa05514b --- /dev/null +++ b/ql-iob-plugin/tests/sdiomux/design.pcf @@ -0,0 +1,5 @@ +set_io clk B1 +set_io led(0) C1 +set_io led(1) A1 +set_io led(2) H3 +set_io led(3) E3 diff --git a/ql-iob-plugin/tests/design.v b/ql-iob-plugin/tests/sdiomux/design.v similarity index 100% rename from ql-iob-plugin/tests/design.v rename to ql-iob-plugin/tests/sdiomux/design.v diff --git a/ql-iob-plugin/tests/sdiomux/script.ys b/ql-iob-plugin/tests/sdiomux/script.ys new file mode 100644 index 000000000..57eb53b29 --- /dev/null +++ b/ql-iob-plugin/tests/sdiomux/script.ys @@ -0,0 +1,13 @@ +plugin -i ../../ql-iob.so +read_verilog design.v + +synth_quicklogic +stat + +quicklogic_iob design.pcf ../pinmap.csv + +select r:IO_TYPE=BIDIR -assert-count 3 +select r:IO_TYPE=SDIOMUX -assert-count 2 +select r:IO_TYPE= -assert-count 1 + +write_blif -attr -param -cname design.eblif From 000167c08ceebc23c43e3e497b3d5d98f35d39dd Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 26 Jun 2020 12:54:18 +0200 Subject: [PATCH 156/845] Added IO cell type preference Signed-off-by: Maciej Kurc --- ql-iob-plugin/pinmap_parser.cc | 4 ++ ql-iob-plugin/ql-iob.cc | 116 +++++++++++++++++++++++++++------ 2 files changed, 99 insertions(+), 21 deletions(-) diff --git a/ql-iob-plugin/pinmap_parser.cc b/ql-iob-plugin/pinmap_parser.cc index 8215ca701..89a8da87d 100644 --- a/ql-iob-plugin/pinmap_parser.cc +++ b/ql-iob-plugin/pinmap_parser.cc @@ -73,6 +73,10 @@ bool PinmapParser::parseData (std::istream*& a_Stream) { std::string line; std::getline(*a_Stream, line); + if (line.empty()) { + continue; + } + // Parse datafields auto data = getFields(line); diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 3129d315b..e382cea44 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -25,6 +25,7 @@ #include "kernel/rtlil.h" #include +#include USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN @@ -37,6 +38,18 @@ void register_in_tcl_interpreter(const std::string& command) { struct QuicklogicIob : public Pass { + struct IoCellType { + std::string type; // Cell type + std::string port; // Name of the port that goes to a pad + std::vector preferredTypes; // A list of preferred IO cell types + + IoCellType (const std::string& _type, const std::string& _port, const std::vector _preferredTypes = std::vector()) : + type(_type), + port(_port), + preferredTypes(_preferredTypes) + {} + }; + QuicklogicIob () : Pass("quicklogic_iob", "Map IO buffers to cells that correspond to their assigned locations") { register_in_tcl_interpreter(pass_name); @@ -62,11 +75,15 @@ struct QuicklogicIob : public Pass { log(" - \n"); log(" Path to a pinmap CSV file with package pin map\n"); log("\n"); - log(" - \n"); - log(" A space-separated list of :. Each\n"); - log(" entry defines a type of IO cell to be affected an its port\n"); + log(" - (optional)\n"); + log(" A space-separated list of : or of\n"); + log(" ::,...\n"); + log(" Each entry defines a type of IO cell to be affected an its port\n"); log(" name that should connect to the top-level port of the design.\n"); log("\n"); + log(" The third argument is a comma-separated list of preferred IO cell\n"); + log(" types in order of preference.\n"); + log("\n"); } void execute(std::vector a_Args, RTLIL::Design* a_Design) YS_OVERRIDE { @@ -75,20 +92,41 @@ struct QuicklogicIob : public Pass { } // A map of IO cell types and their port names that should go to a pad - std::unordered_map ioCellTypes; + std::unordered_map ioCellTypes; + // Parse io cell specification if (a_Args.size() > 3) { // FIXME: Are these characters set the only ones that can be in // cell / port name ? - std::regex re("^([\\w$]+):([\\w$]+)$"); + std::regex re1("^([\\w$]+):([\\w$]+)$"); + std::regex re2("^([\\w$]+):([\\w$]+):([\\w,$]+)$"); for (size_t i=3; i preferredTypes; + std::stringstream ss(cm[3]); + + while (ss.good()) { + std::string field; + std::getline(ss, field, ','); + + preferredTypes.push_back(field); + } + + ioCellTypes.emplace(cm[1].str(), IoCellType(cm[1], cm[2], preferredTypes)); } + + // Invalid else { log_cmd_error("Invalid IO cell+port spec: '%s'\n", a_Args[i].c_str()); } @@ -97,10 +135,10 @@ struct QuicklogicIob : public Pass { // Use the default IO cells for QuickLogic FPGAs else { - ioCellTypes.insert(std::make_pair("inpad", "P")); - ioCellTypes.insert(std::make_pair("outpad", "P")); - ioCellTypes.insert(std::make_pair("bipad", "P")); - ioCellTypes.insert(std::make_pair("ckpad", "P")); + ioCellTypes.emplace("inpad", IoCellType("inpad", "P", {"BIDIR", "SDIOMUX"})); + ioCellTypes.emplace("outpad", IoCellType("outpad", "P", {"BIDIR", "SDIOMUX"})); + ioCellTypes.emplace("bipad", IoCellType("bipad", "P", {"BIDIR", "SDIOMUX"})); + ioCellTypes.emplace("ckpad", IoCellType("ckpad", "P", {"CLOCK", "BIDIR", "SDIOMUX"})); } // Get the top module of the design @@ -133,18 +171,24 @@ struct QuicklogicIob : public Pass { } // Build a map of pad names to entries - std::unordered_map pinmapMap; + std::unordered_map> pinmapMap; for (auto& entry : pinmapParser.getEntries()) { if (entry.count("name") != 0) { - pinmapMap.emplace(entry.at("name"), entry); + auto& name = entry.at("name"); + + if (pinmapMap.count(name) == 0) { + pinmapMap[name] = std::vector(); + } + + pinmapMap[name].push_back(entry); } } // Check all IO cells log("Processing cells..."); log("\n"); - log(" type | instance | net | pad | loc | cell \n"); - log(" ------------+----------------------+------------+------------+----------+----------\n"); + log(" type | net | pad | loc | type | instance\n"); + log(" ------------+------------+------------+----------+----------+-----------\n"); for (auto cell : topModule->cells()) { auto ysCellType = RTLIL::unescape_id(cell->type); @@ -153,7 +197,7 @@ struct QuicklogicIob : public Pass { continue; } - log(" %-10s | %-20s ", ysCellType.c_str(), cell->name.c_str()); + log(" %-10s ", ysCellType.c_str()); std::string netName; std::string padName; @@ -161,7 +205,8 @@ struct QuicklogicIob : public Pass { std::string cellType; // Get connections to the specified port - std::string port = RTLIL::escape_id(ioCellTypes.at(ysCellType)); + const auto& ioCellType = ioCellTypes.at(ysCellType); + const std::string port = RTLIL::escape_id(ioCellType.port); if (cell->connections().count(port)) { // Get the sigspec of the connection @@ -186,8 +231,12 @@ struct QuicklogicIob : public Pass { // Check if there is an entry in the pinmap for this pad name if (pinmapMap.count(constraint.padName)) { - // Get the entry - auto entry = pinmapMap.at(constraint.padName); + // Choose a correct entry for the cell + auto entry = choosePinmapEntry( + pinmapMap.at(constraint.padName), + ioCellType + ); + padName = constraint.padName; // Location string @@ -208,11 +257,12 @@ struct QuicklogicIob : public Pass { } } - log("| %-10s | %-10s | %-8s | %s\n", + log("| %-10s | %-10s | %-8s | %-8s | %s\n", netName.c_str(), padName.c_str(), locName.c_str(), - cellType.c_str() + cellType.c_str(), + cell->name.c_str() ); // Annotate the cell by setting its parameters @@ -222,6 +272,30 @@ struct QuicklogicIob : public Pass { } } + PinmapParser::Entry choosePinmapEntry( + const std::vector& a_Entries, + const IoCellType& a_IoCellType) + { + // No preferred types, pick the first one + if (a_IoCellType.preferredTypes.empty()) { + return a_Entries[0]; + } + + // Loop over preferred types + for (auto& type : a_IoCellType.preferredTypes) { + + // Find an entry for that type. If found then return it. + for (auto& entry : a_Entries) { + if (type == entry.at("type")) { + return entry; + } + } + } + + // No preferred type was found, pick the first one. + return a_Entries[0]; + } + } QuicklogicIob; PRIVATE_NAMESPACE_END From 1c820736b83b68af447052db713bda38b6ef7c41 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 23 Sep 2020 16:02:47 +0200 Subject: [PATCH 157/845] Fixed the ql-iob plugin to work with multi-bit nets Signed-off-by: Maciej Kurc --- ql-iob-plugin/ql-iob.cc | 50 ++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index e382cea44..47d04a909 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -27,6 +27,10 @@ #include #include +#ifndef YOSYS_OVERRIDE +#define YOSYS_OVERRIDE override +#endif + USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN @@ -213,32 +217,42 @@ struct QuicklogicIob : public Pass { auto sigspec = cell->connections().at(port); // Get the connected wire - // FIXME: This assumes that the cell is directly connected to a - // top-level port. - if (sigspec.is_wire()) { - auto wire = sigspec.as_wire(); - - // Has to be top level wire - if (wire->port_input || wire->port_output) { - - // Check if the wire is constrained - netName = RTLIL::unescape_id(wire->name); - if (constraintMap.count(netName)) { - - // Get the constraint - auto constraint = constraintMap.at(netName); + for (auto sigbit : sigspec.bits()) { + if (sigbit.wire != nullptr) { + auto wire = sigbit.wire; + + // Has to be top level wire + if (wire->port_input || wire->port_output) { + + // Check if the wire is constrained. Get pad name. + std::string baseName = RTLIL::unescape_id(wire->name); + std::string netNames[] = { + baseName, + stringf("%s[%d]", baseName.c_str(), sigbit.offset), + stringf("%s(%d)", baseName.c_str(), sigbit.offset), + }; + + padName = ""; + netName = ""; + + for (auto& name : netNames) { + if (constraintMap.count(name)) { + auto constraint = constraintMap.at(name); + padName = constraint.padName; + netName = name; + break; + } + } // Check if there is an entry in the pinmap for this pad name - if (pinmapMap.count(constraint.padName)) { + if (pinmapMap.count(padName)) { // Choose a correct entry for the cell auto entry = choosePinmapEntry( - pinmapMap.at(constraint.padName), + pinmapMap.at(padName), ioCellType ); - padName = constraint.padName; - // Location string if (entry.count("x") && entry.count("y")) { locName = stringf("X%sY%s", From 4bb7749e7cebf3b89593f810f302d3fae2552abb Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 23 Sep 2020 16:03:50 +0200 Subject: [PATCH 158/845] Fixed ql-iob plugin tests so they do not require the synth_quicklogic command. Signed-off-by: Maciej Kurc --- ql-iob-plugin/ql-iob.cc | 4 +- ql-iob-plugin/tests/Makefile | 2 +- ql-iob-plugin/tests/ckpad/script.ys | 13 +++++- ql-iob-plugin/tests/common/pp3_cells_map.v | 7 ++++ ql-iob-plugin/tests/common/pp3_cells_sim.v | 48 ++++++++++++++++++++++ ql-iob-plugin/tests/sdiomux/script.ys | 13 +++++- 6 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 ql-iob-plugin/tests/common/pp3_cells_map.v create mode 100644 ql-iob-plugin/tests/common/pp3_cells_sim.v diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 47d04a909..351759cb6 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -27,8 +27,8 @@ #include #include -#ifndef YOSYS_OVERRIDE -#define YOSYS_OVERRIDE override +#ifndef YS_OVERRIDE +#define YS_OVERRIDE override #endif USING_YOSYS_NAMESPACE diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile index 11a370434..ed853e1dd 100644 --- a/ql-iob-plugin/tests/Makefile +++ b/ql-iob-plugin/tests/Makefile @@ -1,6 +1,6 @@ TESTS = sdiomux ckpad -all: $(addsuffix /ok,$(TESTS)) +all: clean $(addsuffix /ok,$(TESTS)) clean: @find . -name "ok" | xargs rm -rf diff --git a/ql-iob-plugin/tests/ckpad/script.ys b/ql-iob-plugin/tests/ckpad/script.ys index fad6921db..fa37835a8 100644 --- a/ql-iob-plugin/tests/ckpad/script.ys +++ b/ql-iob-plugin/tests/ckpad/script.ys @@ -1,7 +1,18 @@ plugin -i ../../ql-iob.so read_verilog design.v -synth_quicklogic +# Generic synthesis +synth -lut 4 -flatten -auto-top + +# Techmap +read_verilog -lib ../common/pp3_cells_sim.v +techmap -map ../common/pp3_cells_map.v + +# Insert QuickLogic specific IOBs and clock buffers +clkbufmap -buf $_BUF_ Y:A -inpad ckpad Q:P +iopadmap -bits -outpad outpad A:P -inpad inpad Q:P -tinoutpad bipad EN:Q:A:P A:top +opt_clean + stat quicklogic_iob design.pcf ../pinmap.csv diff --git a/ql-iob-plugin/tests/common/pp3_cells_map.v b/ql-iob-plugin/tests/common/pp3_cells_map.v new file mode 100644 index 000000000..c68042e45 --- /dev/null +++ b/ql-iob-plugin/tests/common/pp3_cells_map.v @@ -0,0 +1,7 @@ +module \$_DFF_P_ (D, Q, C); + input D; + input C; + output Q; + dff _TECHMAP_REPLACE_ (.Q(Q), .D(D), .CLK(C)); +endmodule + diff --git a/ql-iob-plugin/tests/common/pp3_cells_sim.v b/ql-iob-plugin/tests/common/pp3_cells_sim.v new file mode 100644 index 000000000..f77ea11df --- /dev/null +++ b/ql-iob-plugin/tests/common/pp3_cells_sim.v @@ -0,0 +1,48 @@ +module inpad( + output Q, + (* iopad_external_pin *) + input P +); + assign Q = P; +endmodule + +module outpad( + (* iopad_external_pin *) + output P, + input A +); + assign P = A; +endmodule + +module ckpad( + output Q, + (* iopad_external_pin *) + input P +); + assign Q = P; +endmodule + +module bipad( + input A, + input EN, + output Q, + (* iopad_external_pin *) + inout P +); + assign Q = P; + assign P = EN ? A : 1'bz; +endmodule + + +module dff( + output reg Q, + input D, + (* clkbuf_sink *) + input CLK +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + always @(posedge CLK) + Q <= D; +endmodule + diff --git a/ql-iob-plugin/tests/sdiomux/script.ys b/ql-iob-plugin/tests/sdiomux/script.ys index 57eb53b29..34587cc44 100644 --- a/ql-iob-plugin/tests/sdiomux/script.ys +++ b/ql-iob-plugin/tests/sdiomux/script.ys @@ -1,7 +1,18 @@ plugin -i ../../ql-iob.so read_verilog design.v -synth_quicklogic +# Generic synthesis +synth -lut 4 -flatten -auto-top + +# Techmap +read_verilog -lib ../common/pp3_cells_sim.v +techmap -map ../common/pp3_cells_map.v + +# Insert QuickLogic specific IOBs and clock buffers +clkbufmap -buf $_BUF_ Y:A -inpad ckpad Q:P +iopadmap -bits -outpad outpad A:P -inpad inpad Q:P -tinoutpad bipad EN:Q:A:P A:top +opt_clean + stat quicklogic_iob design.pcf ../pinmap.csv From 6fc4e1c8a7f64463064573b56971cf0e02b22814 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Sep 2020 13:58:42 +0200 Subject: [PATCH 159/845] Removed install dependency on test Signed-off-by: Maciej Kurc --- ql-iob-plugin/Makefile | 2 +- ql-iob-plugin/tests/ckpad/script.ys | 2 +- ql-iob-plugin/tests/sdiomux/script.ys | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile index 94b8536e7..636ebfe00 100644 --- a/ql-iob-plugin/Makefile +++ b/ql-iob-plugin/Makefile @@ -12,7 +12,7 @@ $(NAME).so: $(OBJS) .PHONY: install test -install: test +install: $(NAME).so mkdir -p $(PLUGINS_DIR) cp $(NAME).so $(PLUGINS_DIR)/$(NAME).so diff --git a/ql-iob-plugin/tests/ckpad/script.ys b/ql-iob-plugin/tests/ckpad/script.ys index fa37835a8..b5b87139d 100644 --- a/ql-iob-plugin/tests/ckpad/script.ys +++ b/ql-iob-plugin/tests/ckpad/script.ys @@ -1,4 +1,4 @@ -plugin -i ../../ql-iob.so +plugin -i ql-iob read_verilog design.v # Generic synthesis diff --git a/ql-iob-plugin/tests/sdiomux/script.ys b/ql-iob-plugin/tests/sdiomux/script.ys index 34587cc44..0af0a0e8e 100644 --- a/ql-iob-plugin/tests/sdiomux/script.ys +++ b/ql-iob-plugin/tests/sdiomux/script.ys @@ -1,4 +1,4 @@ -plugin -i ../../ql-iob.so +plugin -i ql-iob read_verilog design.v # Generic synthesis From c3095f437a96b55826dfacb4296b81e5dbbb0509 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 28 Sep 2020 13:22:45 +0200 Subject: [PATCH 160/845] Addressed code review comments Signed-off-by: Maciej Kurc --- ql-iob-plugin/pcf_parser.cc | 14 ++++++-------- ql-iob-plugin/pcf_parser.hh | 6 +++--- ql-iob-plugin/pinmap_parser.cc | 29 ++++++++++++++++++----------- ql-iob-plugin/pinmap_parser.hh | 10 +++++----- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/ql-iob-plugin/pcf_parser.cc b/ql-iob-plugin/pcf_parser.cc index ea937628f..c7a9309b7 100644 --- a/ql-iob-plugin/pcf_parser.cc +++ b/ql-iob-plugin/pcf_parser.cc @@ -19,7 +19,6 @@ */ #include "pcf_parser.hh" -#include #include // ============================================================================ @@ -27,11 +26,10 @@ bool PcfParser::parse (const std::string& a_FileName) { // Open the file - std::fstream file(a_FileName.c_str(), std::ifstream::in); + std::ifstream file(a_FileName.c_str()); // Parse it - std::istream* stream = &file; - return parse(stream); + return parse(file); } const std::vector PcfParser::getConstraints () const { @@ -41,9 +39,9 @@ const std::vector PcfParser::getConstraints () const { // ============================================================================ -bool PcfParser::parse (std::istream*& a_Stream) { +bool PcfParser::parse (std::ifstream& a_Stream) { - if (a_Stream == nullptr) { + if (!a_Stream.good()) { return false; } @@ -53,9 +51,9 @@ bool PcfParser::parse (std::istream*& a_Stream) { // Parse PCF lines std::regex re("^\\s*set_io\\s+([^#\\s]+)\\s+([^#\\s]+)(?:\\s+#(.*))?"); - while (a_Stream->good()) { + while (a_Stream.good()) { std::string line; - std::getline(*a_Stream, line); + std::getline(a_Stream, line); // Match against regex std::cmatch cm; diff --git a/ql-iob-plugin/pcf_parser.hh b/ql-iob-plugin/pcf_parser.hh index 22263fdd6..8a4a92085 100644 --- a/ql-iob-plugin/pcf_parser.hh +++ b/ql-iob-plugin/pcf_parser.hh @@ -20,7 +20,7 @@ #ifndef PCF_PARSER_HH #define PCF_PARSER_HH -#include +#include #include #include @@ -51,12 +51,12 @@ public: /// Parses a PCF file and stores constraint within the class instance. /// Returns false in case of error bool parse (const std::string& a_FileName); - bool parse (std::istream*& a_Stream); + bool parse (std::ifstream& a_Stream); /// Returns the constraint list const std::vector getConstraints () const; -protected: +private: /// A list of constraints std::vector m_Constraints; diff --git a/ql-iob-plugin/pinmap_parser.cc b/ql-iob-plugin/pinmap_parser.cc index 89a8da87d..77e3662fd 100644 --- a/ql-iob-plugin/pinmap_parser.cc +++ b/ql-iob-plugin/pinmap_parser.cc @@ -19,7 +19,6 @@ */ #include "pinmap_parser.hh" -#include #include // ============================================================================ @@ -27,11 +26,10 @@ bool PinmapParser::parse (const std::string& a_FileName) { // Open the file - std::fstream file(a_FileName.c_str(), std::ifstream::in); + std::ifstream file(a_FileName.c_str()); // Parse it - std::istream* stream = &file; - return parse(stream); + return parse(file); } const std::vector PinmapParser::getEntries() const { @@ -55,23 +53,27 @@ std::vector PinmapParser::getFields (const std::string& a_String) { return fields; } -bool PinmapParser::parseHeader (std::istream*& a_Stream) { +bool PinmapParser::parseHeader (std::ifstream& a_Stream) { // Get the header line std::string header; - std::getline(*a_Stream, header); + std::getline(a_Stream, header); // Parse fields m_Fields = getFields(header); + if (m_Fields.empty()) { + return false; + } + return true; } -bool PinmapParser::parseData (std::istream*& a_Stream) { +bool PinmapParser::parseData (std::ifstream& a_Stream) { // Parse lines as they come - while (a_Stream->good()) { + while (a_Stream.good()) { std::string line; - std::getline(*a_Stream, line); + std::getline(a_Stream, line); if (line.empty()) { continue; @@ -83,6 +85,11 @@ bool PinmapParser::parseData (std::istream*& a_Stream) { // Assign data fields to columns Entry entry; for (size_t i=0; i= m_Fields.size()) { + return false; + } + entry[m_Fields[i]] = data[i]; } @@ -92,9 +99,9 @@ bool PinmapParser::parseData (std::istream*& a_Stream) { return true; } -bool PinmapParser::parse (std::istream*& a_Stream) { +bool PinmapParser::parse (std::ifstream& a_Stream) { - if (a_Stream == nullptr) { + if (!a_Stream.good()) { return false; } diff --git a/ql-iob-plugin/pinmap_parser.hh b/ql-iob-plugin/pinmap_parser.hh index 6d729be84..5139244de 100644 --- a/ql-iob-plugin/pinmap_parser.hh +++ b/ql-iob-plugin/pinmap_parser.hh @@ -20,7 +20,7 @@ #ifndef PINMAP_PARSER_HH #define PINMAP_PARSER_HH -#include +#include #include #include #include @@ -38,21 +38,21 @@ public: /// Parses a pinmap CSV file bool parse (const std::string& a_FileName); - bool parse (std::istream*& a_Stream); + bool parse (std::ifstream& a_Stream); /// Returns a vector of entries const std::vector getEntries() const; -protected: +private: /// Splits the input string into a vector of fields. Fields are comma /// separated. static std::vector getFields (const std::string& a_String); /// Parses the header - bool parseHeader (std::istream*& a_Stream); + bool parseHeader (std::ifstream& a_Stream); /// Parses the data - bool parseData (std::istream*& a_Stream); + bool parseData (std::ifstream& a_Stream); /// Header fields std::vector m_Fields; From 6bd3ddd1b32f5b53a6faf11e4d11bb8e6349e757 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 28 Sep 2020 13:23:35 +0200 Subject: [PATCH 161/845] Removed explicit command registration in TCL interpreter. Signed-off-by: Maciej Kurc --- ql-iob-plugin/ql-iob.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 351759cb6..6574535a2 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -34,12 +34,6 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -void register_in_tcl_interpreter(const std::string& command) { - Tcl_Interp* interp = yosys_get_tcl_interp(); - std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); - Tcl_Eval(interp, tcl_script.c_str()); -} - struct QuicklogicIob : public Pass { struct IoCellType { @@ -56,7 +50,6 @@ struct QuicklogicIob : public Pass { QuicklogicIob () : Pass("quicklogic_iob", "Map IO buffers to cells that correspond to their assigned locations") { - register_in_tcl_interpreter(pass_name); } void help() YS_OVERRIDE { From ae56c662ffd2e39dead5ca2b7bd257906af0dbb2 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 22 Sep 2020 13:42:56 +0200 Subject: [PATCH 162/845] SDC: Implement sdc writer class Signed-off-by: Tomasz Michalak --- sdc-plugin/Makefile | 2 +- sdc-plugin/sdc_writer.cc | 63 ++++++++++++++++++++++++++++++++++++++++ sdc-plugin/sdc_writer.h | 41 ++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/sdc_writer.cc create mode 100644 sdc-plugin/sdc_writer.h diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index b4694ca86..30895541a 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -4,7 +4,7 @@ LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins -OBJS = buffers.o clocks.o propagation.o sdc.o +OBJS = buffers.o clocks.o propagation.o sdc.o sdc_writer.o set_false_path.o sdc.so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc new file mode 100644 index 000000000..daae7e2ad --- /dev/null +++ b/sdc-plugin/sdc_writer.cc @@ -0,0 +1,63 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "sdc_writer.h" + +USING_YOSYS_NAMESPACE + +void SdcWriter::AddFalsePath(FalsePath false_path) { + false_paths_.push_back(false_path); +} + +void SdcWriter::WriteSdc(Clocks& clocks, std::ostream& file) { + WriteClocks(clocks, file); + WriteFalsePaths(file); +} + +void SdcWriter::WriteClocks(Clocks& clocks, std::ostream& file) { + for (auto clock : clocks.GetClocks()) { + auto clock_wires = clock.GetClockWires(); + // FIXME: Input port nets are not found in VPR + if (std::all_of(clock_wires.begin(), clock_wires.end(), + [&](RTLIL::Wire* wire) { return wire->port_input; })) { + continue; + } + file << "create_clock -period " << clock.Period(); + file << " -waveform {" << clock.RisingEdge() << " " + << clock.FallingEdge() << "}"; + for (auto clock_wire : clock_wires) { + if (clock_wire->port_input) { + continue; + } + file << " " << Clock::ClockWireName(clock_wire); + } + file << std::endl; + } +} + +void SdcWriter::WriteFalsePaths(std::ostream& file) { + for (auto path : false_paths_) { + file << "set_false_path"; + if (!path.from_pin.empty()) { + file << " -from " << path.from_pin; + } + if (!path.to_pin.empty()) { + file << " -to " << path.to_pin; + } + file << std::endl; + } +} diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h new file mode 100644 index 000000000..f5f18b3e0 --- /dev/null +++ b/sdc-plugin/sdc_writer.h @@ -0,0 +1,41 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _SDC_WRITER_H_ +#define _SDC_WRITER_H_ +#include "clocks.h" + +USING_YOSYS_NAMESPACE + +struct FalsePath { + std::string from_pin; + std::string to_pin; +}; + +class SdcWriter { + public: + void AddFalsePath(FalsePath false_path); + void WriteSdc(Clocks& clocks, std::ostream& file); + + private: + void WriteClocks(Clocks& clocks, std::ostream& file); + void WriteFalsePaths(std::ostream& file); + + std::vector false_paths_; +}; + +#endif // _SDC_WRITER_H_ From 1a40d6f8831fb104f9f3d34d3c50ce4e6d98af5c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 22 Sep 2020 13:21:20 +0200 Subject: [PATCH 163/845] SDC: Add set_false_path command Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.h | 3 ++ sdc-plugin/sdc.cc | 16 +++++-- sdc-plugin/set_false_path.cc | 90 ++++++++++++++++++++++++++++++++++++ sdc-plugin/set_false_path.h | 39 ++++++++++++++++ 4 files changed, 143 insertions(+), 5 deletions(-) create mode 100644 sdc-plugin/set_false_path.cc create mode 100644 sdc-plugin/set_false_path.h diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index ff02bd5c1..f5b491c66 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -71,6 +71,9 @@ class Clocks { void Propagate(BufferPropagation* pass); void Propagate(ClockDividerPropagation* pass); void WriteSdc(std::ostream& file); + const std::vector GetClocks() { + return clocks_; + } private: std::vector clocks_; diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 4233d0182..5f8cad1b4 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -21,6 +21,8 @@ #include "kernel/register.h" #include "kernel/rtlil.h" #include "propagation.h" +#include "set_false_path.h" +#include "sdc_writer.h" USING_YOSYS_NAMESPACE @@ -57,8 +59,8 @@ struct ReadSdcCmd : public Frontend { }; struct WriteSdcCmd : public Backend { - WriteSdcCmd(Clocks& clocks) - : Backend("sdc", "Write SDC file"), clocks_(clocks) {} + WriteSdcCmd(Clocks& clocks, SdcWriter& sdc_writer) + : Backend("sdc", "Write SDC file"), clocks_(clocks), sdc_writer_(sdc_writer) {} void help() override { log("\n"); @@ -75,10 +77,11 @@ struct WriteSdcCmd : public Backend { } log("\nWriting out clock constraints file(SDC)\n"); extra_args(f, filename, args, 1); - clocks_.WriteSdc(*f); + sdc_writer_.WriteSdc(clocks_, *f); } Clocks& clocks_; + SdcWriter& sdc_writer_; }; struct CreateClockCmd : public Pass { @@ -246,10 +249,11 @@ struct PropagateClocksCmd : public Pass { class SdcPlugin { public: SdcPlugin() - : write_sdc_cmd_(clocks_), + : write_sdc_cmd_(clocks_, sdc_writer_), create_clock_cmd_(clocks_), get_clocks_cmd_(clocks_), - propagate_clocks_cmd_(clocks_) { + propagate_clocks_cmd_(clocks_), + set_false_path_cmd_(sdc_writer_) { log("Loaded SDC plugin\n"); } @@ -258,9 +262,11 @@ class SdcPlugin { CreateClockCmd create_clock_cmd_; GetClocksCmd get_clocks_cmd_; PropagateClocksCmd propagate_clocks_cmd_; + SetFalsePath set_false_path_cmd_; private: Clocks clocks_; + SdcWriter sdc_writer_; } SdcPlugin; PRIVATE_NAMESPACE_END diff --git a/sdc-plugin/set_false_path.cc b/sdc-plugin/set_false_path.cc new file mode 100644 index 000000000..72bb41c6e --- /dev/null +++ b/sdc-plugin/set_false_path.cc @@ -0,0 +1,90 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "set_false_path.h" +#include +#include "kernel/log.h" +#include "sdc_writer.h" + +USING_YOSYS_NAMESPACE + +void SetFalsePath::help() { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" set_false_path [-quiet] [-from ] [-to ] \n"); + log("\n"); + log("Set false path on the specified net\n"); + log("\n"); + log("Print the output to stdout too. This is useful when all Yosys is " + "executed.\n"); + log("\n"); + log(" -quiet\n"); + log(" Don't print the result of the execution to stdout.\n"); + log("\n"); + log(" -from\n"); + log(" List of start points or clocks.\n"); + log("\n"); + log(" -to\n"); + log(" List of end points or clocks.\n"); + log("\n"); +} + +void SetFalsePath::execute(std::vector args, + RTLIL::Design* design) { + RTLIL::Module* top_module = design->top_module(); + if (top_module == nullptr) { + log_cmd_error("No top module detected\n"); + } + + size_t argidx; + bool is_quiet = false; + std::string from_pin; + std::string to_pin; + + // Parse command arguments + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-quiet") { + is_quiet = true; + continue; + } + + if (arg == "-from" and argidx + 1 < args.size()) { + from_pin = args[++argidx]; + log("From: %s\n", from_pin.c_str()); + continue; + } + + if (arg == "-to" and argidx + 1 < args.size()) { + to_pin = args[++argidx]; + log("To: %s\n", to_pin.c_str()); + continue; + } + + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } + + break; + } + if (!is_quiet) { + std::string msg = (from_pin.empty()) ? "" : "-from " + from_pin; + msg += (to_pin.empty()) ? "" : " -to " + to_pin; + log("Adding false path %s\n", msg.c_str()); + } + sdc_writer_.AddFalsePath(FalsePath{.from_pin = from_pin, .to_pin = to_pin}); +} diff --git a/sdc-plugin/set_false_path.h b/sdc-plugin/set_false_path.h new file mode 100644 index 000000000..47bf08a72 --- /dev/null +++ b/sdc-plugin/set_false_path.h @@ -0,0 +1,39 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _SET_FALSE_PATH_H_ +#define _SET_FALSE_PATH_H_ + +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "sdc_writer.h" + +USING_YOSYS_NAMESPACE + +struct SetFalsePath : public Pass { + SetFalsePath(SdcWriter& sdc_writer) + : Pass("set_false_path", "Set false path on net"), + sdc_writer_(sdc_writer) {} + + void help() override; + + void execute(std::vector args, RTLIL::Design* design) override; + + SdcWriter& sdc_writer_; +}; + +#endif //_SET_FALSE_PATH_H_ From d95f2724412a3d8721af7091846d3e3d7429e779 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 22 Sep 2020 13:50:05 +0200 Subject: [PATCH 164/845] SDC: Add test for set_false_path Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 13 +++- .../set_false_path/set_false_path.golden.sdc | 3 + .../tests/set_false_path/set_false_path.tcl | 19 +++++ .../tests/set_false_path/set_false_path.v | 75 +++++++++++++++++++ 4 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/set_false_path/set_false_path.golden.sdc create mode 100644 sdc-plugin/tests/set_false_path/set_false_path.tcl create mode 100644 sdc-plugin/tests/set_false_path/set_false_path.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index d19f19df9..86292f5ab 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,4 +1,14 @@ -TESTS = counter counter2 pll pll_div pll_fbout_phase pll_approx_equal +# counter, counter2, pll - test buffer and clock divider propagation +# set_false_path - test the set_false_path command + +TESTS = counter \ + counter2 \ + pll \ + pll_div \ + pll_fbout_phase \ + pll_approx_equal \ + set_false_path + .PHONY: $(TESTS) counter_verify = $(call compare,counter,sdc) && $(call compare,counter,txt) @@ -7,6 +17,7 @@ pll_verify = $(call compare,pll,sdc) pll_div_verify = $(call compare,pll_div,sdc) pll_fbout_phase_verify = $(call compare,pll_fbout_phase,sdc) pll_approx_equal_verify = $(call compare,pll_approx_equal,sdc) +set_false_path_verify = $(call compare,set_false_path,sdc) all: $(TESTS) compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) diff --git a/sdc-plugin/tests/set_false_path/set_false_path.golden.sdc b/sdc-plugin/tests/set_false_path/set_false_path.golden.sdc new file mode 100644 index 000000000..4e75de4ba --- /dev/null +++ b/sdc-plugin/tests/set_false_path/set_false_path.golden.sdc @@ -0,0 +1,3 @@ +set_false_path -to inter_wire +set_false_path -from clk +set_false_path -from clk -to bottom_inst.I diff --git a/sdc-plugin/tests/set_false_path/set_false_path.tcl b/sdc-plugin/tests/set_false_path/set_false_path.tcl new file mode 100644 index 000000000..39a51c0a5 --- /dev/null +++ b/sdc-plugin/tests/set_false_path/set_false_path.tcl @@ -0,0 +1,19 @@ +yosys -import +plugin -i sdc +#Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog set_false_path.v +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + +# -to inter_wire net +set_false_path -to inter_wire + +# -from clk net (quiet) +set_false_path -quiet -from clk + +# -from clk to bottom_inst/I +set_false_path -from clk -to bottom_inst.I + +write_sdc set_false_path.sdc diff --git a/sdc-plugin/tests/set_false_path/set_false_path.v b/sdc-plugin/tests/set_false_path/set_false_path.v new file mode 100644 index 000000000..d40055b17 --- /dev/null +++ b/sdc-plugin/tests/set_false_path/set_false_path.v @@ -0,0 +1,75 @@ +module top ( + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2( + .I(LD6), + .O(signal_p), + .OB(signal_n), + .T(1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + From 214471e2b480279aa2bf3ca23d01bc29e99e74f9 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 28 Sep 2020 13:08:03 +0200 Subject: [PATCH 165/845] SDC: Add set_max_delay command Signed-off-by: Tomasz Michalak --- sdc-plugin/set_max_delay.cc | 92 +++++++++++++++++++++++++++++++++++++ sdc-plugin/set_max_delay.h | 39 ++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 sdc-plugin/set_max_delay.cc create mode 100644 sdc-plugin/set_max_delay.h diff --git a/sdc-plugin/set_max_delay.cc b/sdc-plugin/set_max_delay.cc new file mode 100644 index 000000000..055e3428d --- /dev/null +++ b/sdc-plugin/set_max_delay.cc @@ -0,0 +1,92 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "set_max_delay.h" +#include "kernel/log.h" +#include "sdc_writer.h" + +USING_YOSYS_NAMESPACE + +void SetMaxDelay::help() { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" set_max_delay [-quiet] [-from ] [-to ] \n"); + log("\n"); + log("Specify maximum delay for timing paths\n"); + log("\n"); + log("Print the output to stdout too. This is useful when all Yosys is " + "executed.\n"); + log("\n"); + log(" -quiet\n"); + log(" Don't print the result of the execution to stdout.\n"); + log("\n"); + log(" -from\n"); + log(" List of start points or clocks.\n"); + log("\n"); + log(" -to\n"); + log(" List of end points or clocks.\n"); + log("\n"); +} + +void SetMaxDelay::execute(std::vector args, + RTLIL::Design* design) { + RTLIL::Module* top_module = design->top_module(); + if (top_module == nullptr) { + log_cmd_error("No top module detected\n"); + } + + size_t argidx; + bool is_quiet = false; + std::string from_pin; + std::string to_pin; + float max_delay(0.0); + + // Parse command arguments + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-quiet") { + is_quiet = true; + continue; + } + + if (arg == "-from" and argidx + 1 < args.size()) { + from_pin = args[++argidx]; + log("From: %s\n", from_pin.c_str()); + continue; + } + + if (arg == "-to" and argidx + 1 < args.size()) { + to_pin = args[++argidx]; + log("To: %s\n", to_pin.c_str()); + continue; + } + + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } + + max_delay = std::stof(args[argidx]); + } + + if (!is_quiet) { + std::string msg = (from_pin.empty()) ? "" : "-from " + from_pin; + msg += (to_pin.empty()) ? "" : " -to " + to_pin; + log("Adding max path delay of %f on path %s\n", max_delay, msg.c_str()); + } + sdc_writer_.SetMaxDelay(TimingPath{ + .from_pin = from_pin, .to_pin = to_pin, .max_delay = max_delay}); +} diff --git a/sdc-plugin/set_max_delay.h b/sdc-plugin/set_max_delay.h new file mode 100644 index 000000000..7272839e7 --- /dev/null +++ b/sdc-plugin/set_max_delay.h @@ -0,0 +1,39 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _SET_MAX_DELAY_H_ +#define _SET_MAX_DELAY_H_ + +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "sdc_writer.h" + +USING_YOSYS_NAMESPACE + +struct SetMaxDelay : public Pass { + SetMaxDelay(SdcWriter& sdc_writer) + : Pass("set_max_delay", "Specify maximum delay for timing paths"), + sdc_writer_(sdc_writer) {} + + void help() override; + + void execute(std::vector args, RTLIL::Design* design) override; + + SdcWriter& sdc_writer_; +}; + +#endif //_SET_MAX_DELAY_H_ From d00a6364f0a7eb9338192b4c98434bfbf4e009d7 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 28 Sep 2020 13:08:55 +0200 Subject: [PATCH 166/845] SDC: Update SdcWriter class to write set_max_delay commands Signed-off-by: Tomasz Michalak --- sdc-plugin/Makefile | 2 +- sdc-plugin/sdc.cc | 5 ++++- sdc-plugin/sdc_writer.cc | 18 ++++++++++++++++++ sdc-plugin/sdc_writer.h | 9 +++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index 30895541a..0c9461dce 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -4,7 +4,7 @@ LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins -OBJS = buffers.o clocks.o propagation.o sdc.o sdc_writer.o set_false_path.o +OBJS = buffers.o clocks.o propagation.o sdc.o sdc_writer.o set_false_path.o set_max_delay.o sdc.so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 5f8cad1b4..df09526f6 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -22,6 +22,7 @@ #include "kernel/rtlil.h" #include "propagation.h" #include "set_false_path.h" +#include "set_max_delay.h" #include "sdc_writer.h" USING_YOSYS_NAMESPACE @@ -253,7 +254,8 @@ class SdcPlugin { create_clock_cmd_(clocks_), get_clocks_cmd_(clocks_), propagate_clocks_cmd_(clocks_), - set_false_path_cmd_(sdc_writer_) { + set_false_path_cmd_(sdc_writer_), + set_max_delay_cmd_(sdc_writer_) { log("Loaded SDC plugin\n"); } @@ -263,6 +265,7 @@ class SdcPlugin { GetClocksCmd get_clocks_cmd_; PropagateClocksCmd propagate_clocks_cmd_; SetFalsePath set_false_path_cmd_; + SetMaxDelay set_max_delay_cmd_; private: Clocks clocks_; diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index daae7e2ad..3c106d379 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -23,9 +23,14 @@ void SdcWriter::AddFalsePath(FalsePath false_path) { false_paths_.push_back(false_path); } +void SdcWriter::SetMaxDelay(TimingPath timing_path) { + timing_paths_.push_back(timing_path); +} + void SdcWriter::WriteSdc(Clocks& clocks, std::ostream& file) { WriteClocks(clocks, file); WriteFalsePaths(file); + WriteMaxDelay(file); } void SdcWriter::WriteClocks(Clocks& clocks, std::ostream& file) { @@ -61,3 +66,16 @@ void SdcWriter::WriteFalsePaths(std::ostream& file) { file << std::endl; } } + +void SdcWriter::WriteMaxDelay(std::ostream& file) { + for (auto path : timing_paths_) { + file << "set_max_delay " << path.max_delay; + if (!path.from_pin.empty()) { + file << " -from " << path.from_pin; + } + if (!path.to_pin.empty()) { + file << " -to " << path.to_pin; + } + file << std::endl; + } +} diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h index f5f18b3e0..562084112 100644 --- a/sdc-plugin/sdc_writer.h +++ b/sdc-plugin/sdc_writer.h @@ -26,16 +26,25 @@ struct FalsePath { std::string to_pin; }; +struct TimingPath { + std::string from_pin; + std::string to_pin; + float max_delay; +}; + class SdcWriter { public: void AddFalsePath(FalsePath false_path); + void SetMaxDelay(TimingPath timing_path); void WriteSdc(Clocks& clocks, std::ostream& file); private: void WriteClocks(Clocks& clocks, std::ostream& file); void WriteFalsePaths(std::ostream& file); + void WriteMaxDelay(std::ostream& file); std::vector false_paths_; + std::vector timing_paths_; }; #endif // _SDC_WRITER_H_ From d953ece13326352e42668e5eeaf62139b756ce6e Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 28 Sep 2020 13:24:30 +0200 Subject: [PATCH 167/845] SDC: Add test for set_max_delay Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 5 +- .../set_max_delay/set_max_delay.golden.sdc | 3 + .../tests/set_max_delay/set_max_delay.tcl | 19 +++++ .../tests/set_max_delay/set_max_delay.v | 75 +++++++++++++++++++ 4 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/set_max_delay/set_max_delay.golden.sdc create mode 100644 sdc-plugin/tests/set_max_delay/set_max_delay.tcl create mode 100644 sdc-plugin/tests/set_max_delay/set_max_delay.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 86292f5ab..718241c44 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,5 +1,6 @@ # counter, counter2, pll - test buffer and clock divider propagation # set_false_path - test the set_false_path command +# set_max_delay - test the set_max_delay command TESTS = counter \ counter2 \ @@ -7,7 +8,8 @@ TESTS = counter \ pll_div \ pll_fbout_phase \ pll_approx_equal \ - set_false_path + set_false_path \ + set_max_delay .PHONY: $(TESTS) @@ -18,6 +20,7 @@ pll_div_verify = $(call compare,pll_div,sdc) pll_fbout_phase_verify = $(call compare,pll_fbout_phase,sdc) pll_approx_equal_verify = $(call compare,pll_approx_equal,sdc) set_false_path_verify = $(call compare,set_false_path,sdc) +set_max_delay_verify = $(call compare,set_max_delay,sdc) all: $(TESTS) compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.golden.sdc b/sdc-plugin/tests/set_max_delay/set_max_delay.golden.sdc new file mode 100644 index 000000000..02ed95df6 --- /dev/null +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.golden.sdc @@ -0,0 +1,3 @@ +set_max_delay 1 -to inter_wire +set_max_delay 2 -from clk +set_max_delay 3 -from clk -to bottom_inst.I diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl new file mode 100644 index 000000000..8cfde6a73 --- /dev/null +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl @@ -0,0 +1,19 @@ +yosys -import +plugin -i sdc +#Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog set_max_delay.v +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + +# -to inter_wire net +set_max_delay 1 -to inter_wire + +# -from clk net (quiet) +set_max_delay 2 -quiet -from clk + +# -from clk to bottom_inst/I +set_max_delay 3 -from clk -to bottom_inst.I + +write_sdc set_max_delay.sdc diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.v b/sdc-plugin/tests/set_max_delay/set_max_delay.v new file mode 100644 index 000000000..d40055b17 --- /dev/null +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.v @@ -0,0 +1,75 @@ +module top ( + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2( + .I(LD6), + .O(signal_p), + .OB(signal_n), + .T(1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + From faecdde78f312197dfb1636de0b288b2981f9e46 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 6 Oct 2020 14:45:53 +0200 Subject: [PATCH 168/845] Create common Makefile for plugin tests Signed-off-by: Tomasz Michalak --- Makefile_test.common | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Makefile_test.common diff --git a/Makefile_test.common b/Makefile_test.common new file mode 100644 index 000000000..fe8ffce28 --- /dev/null +++ b/Makefile_test.common @@ -0,0 +1,45 @@ +# Each plugin shall have a directory named 'test' that contains test cases +# directories and a Makefile which includes this Makefile template. +# The test Makefile specifies which tests to execute and how to verify them. +# The test to execute should be explicitly specified in the TESTS variable. +# Each test needs a verification step define in the name_of_test_verify variable. +# A simple diff verification template have been defined in the template Makefile +# diff_test performs a simple diff and takes name of file and its extension +# Example of a test Makefile is given below: +# +# include $(shell pwd)/../../Makefile_test.common +# TESTS = test1 test2 +# test1_verify = $(call diff_test,test1,ext) && test $$(grep "PASS" test1/test1.txt | wc -l) -eq 2 +# test2_verify = $(call diff_test,test2,ext) +# +define test_tpl = +$(1): $(1)/ok + @$$($(1)_verify); \ + RETVAL=$$$$? ; \ + if [ $$$$RETVAL -eq 0 ]; then \ + echo "Test $(1) PASSED"; \ + touch $$<; \ + true; \ + else \ + echo "Test $(1) FAILED"; \ + false; \ + fi + +$(1)/ok: $(1)/$(1).v + @echo "Running test $(1)" + @cd $(1); \ + DESIGN_TOP=$(1) \ + yosys -c $(1).tcl -q -l $(1).log + +endef + +diff_test = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) + +all: $(TESTS) +.PHONY: all clean $(TESTS) + +$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) + +clean: + @rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/$(test).eblif $(test)/$(test).json) + @find . -name "ok" -or -name "*.log" | xargs rm -rf From 946d4e741644aa53c49dbb78f743cd6ae41e3306 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 6 Oct 2020 14:46:45 +0200 Subject: [PATCH 169/845] get_count plugin: Use common plugin test Makefile Signed-off-by: Tomasz Michalak --- get_count-plugin/tests/Makefile | 16 +++------------- .../tests/simple/{script.tcl => simple.tcl} | 2 +- .../tests/simple/{design.v => simple.v} | 0 3 files changed, 4 insertions(+), 14 deletions(-) rename get_count-plugin/tests/simple/{script.tcl => simple.tcl} (93%) rename get_count-plugin/tests/simple/{design.v => simple.v} (100%) diff --git a/get_count-plugin/tests/Makefile b/get_count-plugin/tests/Makefile index 80cdc79c5..676689e7d 100644 --- a/get_count-plugin/tests/Makefile +++ b/get_count-plugin/tests/Makefile @@ -1,15 +1,5 @@ -TESTS = $(subst /, ,$(wildcard */)) +TESTS = simple -all: clean $(addsuffix /ok,$(TESTS)) +include $(shell pwd)/../../Makefile_test.common -clean: - @find . -name "ok" | xargs rm -rf - -define maketest = -$1/ok: - cd $1 && $(MAKE) test -endef - -$(foreach _,${TESTS},$(eval $(call maketest,$_))) - -.PHONY: all clean +simple_verify = true diff --git a/get_count-plugin/tests/simple/script.tcl b/get_count-plugin/tests/simple/simple.tcl similarity index 93% rename from get_count-plugin/tests/simple/script.tcl rename to get_count-plugin/tests/simple/simple.tcl index e21a36d82..f933c9443 100644 --- a/get_count-plugin/tests/simple/script.tcl +++ b/get_count-plugin/tests/simple/simple.tcl @@ -1,7 +1,7 @@ yosys plugin -i get_count yosys -import -read_verilog -icells design.v +read_verilog -icells simple.v hierarchy -auto-top set n [get_count -modules my_gate] diff --git a/get_count-plugin/tests/simple/design.v b/get_count-plugin/tests/simple/simple.v similarity index 100% rename from get_count-plugin/tests/simple/design.v rename to get_count-plugin/tests/simple/simple.v From c8678cde7d07ea5503c2ea6c0915ab3eb578f5ce Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 6 Oct 2020 14:54:48 +0200 Subject: [PATCH 170/845] Params plugin: Use common plugin test Makefile Signed-off-by: Tomasz Michalak --- params-plugin/tests/Makefile | 39 +++---------------- params-plugin/tests/pll/pll.tcl | 11 +++--- .../tests/{ => pll}/techmaps/cells_map.v | 0 .../tests/{ => pll}/techmaps/cells_sim.v | 0 params-plugin/tests/xc7a35tcsg324-1.json | 10 ----- 5 files changed, 12 insertions(+), 48 deletions(-) rename params-plugin/tests/{ => pll}/techmaps/cells_map.v (100%) rename params-plugin/tests/{ => pll}/techmaps/cells_sim.v (100%) delete mode 100644 params-plugin/tests/xc7a35tcsg324-1.json diff --git a/params-plugin/tests/Makefile b/params-plugin/tests/Makefile index a3f2ff30e..eceb128fe 100644 --- a/params-plugin/tests/Makefile +++ b/params-plugin/tests/Makefile @@ -1,39 +1,12 @@ TESTS = pll +include $(shell pwd)/../../Makefile_test.common -pll_verify = $(call compare_json,pll) && test $$(grep "PASS" pll/params.txt | wc -l) -eq 2 - -all: $(TESTS) - -compare_json = python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1).golden.json - -define test_tpl = -$(1): $(1)/$(1).json - $$($(1)_verify) - RETVAL=$$$$? ; \ - if [ $$$$RETVAL -eq 0 ]; then \ - echo "$(1) PASS"; \ - true; \ - else \ - echo "$(1) FAIL"; \ - false; \ - fi - -$(1)/$(1).json: $(1)/$(1).v - cd $(1); \ - PART_JSON=../xc7a35tcsg324-1.json \ - OUT_JSON=$(1).json \ - INPUT_XDC_FILE=$(1).xdc \ - yosys -p "tcl $(1).tcl" $(1).v -l yosys.log - -update_$(1): $(1)/$(1).json - @python compare_output_json.py --json $$< --golden $(1)/$(1).golden.json --update +json_test = python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1).golden.json +define json_update = +$(1)_update_json: + python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1).golden.json --update endef -$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) - -update: $(foreach test,$(TESTS),update_$(test)) - +pll_verify = $(call json_test,pll) && test $$(grep "PASS" pll/pll.txt | wc -l) -eq 2 -clean: - rm -rf $(foreach test,$(TESTS),$(test)/$(test).json $(test)/$(test).eblif $(test)/$(test).txt $(test)/yosys.log) diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl index f6a6bf8a2..cc6e7b39f 100644 --- a/params-plugin/tests/pll/pll.tcl +++ b/params-plugin/tests/pll/pll.tcl @@ -4,6 +4,7 @@ plugin -i params # Import the commands from the plugins to the tcl interpreter yosys -import +read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top @@ -14,7 +15,7 @@ set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV] if {[llength $phase] != 2} { error "Getparam should return a list with 2 elements" } -set fp [open "params.txt" "w"] +set fp [open "pll.txt" "w"] puts -nonewline $fp "Phase before: " if {$phase == $reference_phase} { puts $fp "PASS" @@ -25,7 +26,7 @@ if {$phase == $reference_phase} { # Modify the phase parameter value on one of the PLLE2_ADV instances setparam -set CLKOUT2_PHASE [expr [lindex $phase 0] * 1000] top/PLLE2_ADV -# Verify that the parameter has been correctly updated on the chosen instance +# Verify that the parameter has been correctly updated on the chosen instance set reference_phase [list 90000 70] set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV] puts -nonewline $fp "Phase after: " @@ -40,8 +41,8 @@ close $fp synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -run prepare:check # Map Xilinx tech library to 7-series VPR tech library. -read_verilog -lib ../techmaps/cells_sim.v -techmap -map ../techmaps/cells_map.v +read_verilog -lib ./techmaps/cells_sim.v +techmap -map ./techmaps/cells_map.v # opt_expr -undriven makes sure all nets are driven, if only by the $undef # net. @@ -52,5 +53,5 @@ setundef -zero -params stat # Write the design in JSON format. -write_json $::env(OUT_JSON) +write_json $::env(DESIGN_TOP).json write_blif -attr -param -cname -conn pll.eblif diff --git a/params-plugin/tests/techmaps/cells_map.v b/params-plugin/tests/pll/techmaps/cells_map.v similarity index 100% rename from params-plugin/tests/techmaps/cells_map.v rename to params-plugin/tests/pll/techmaps/cells_map.v diff --git a/params-plugin/tests/techmaps/cells_sim.v b/params-plugin/tests/pll/techmaps/cells_sim.v similarity index 100% rename from params-plugin/tests/techmaps/cells_sim.v rename to params-plugin/tests/pll/techmaps/cells_sim.v diff --git a/params-plugin/tests/xc7a35tcsg324-1.json b/params-plugin/tests/xc7a35tcsg324-1.json deleted file mode 100644 index 602b949ab..000000000 --- a/params-plugin/tests/xc7a35tcsg324-1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "iobanks": { - "0": "X1Y78", - "14": "X1Y26", - "15": "X1Y78", - "16": "X1Y130", - "34": "X113Y26", - "35": "X113Y78" - } -} From edb9ed5e64b2e421ebf47f9f9e807aa2c9ca0baa Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 6 Oct 2020 14:56:49 +0200 Subject: [PATCH 171/845] Fasm plugin: Use common plugin test Makefile Signed-off-by: Tomasz Michalak --- fasm-plugin/tests/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fasm-plugin/tests/Makefile b/fasm-plugin/tests/Makefile index f5ddc6299..320dfcfcb 100644 --- a/fasm-plugin/tests/Makefile +++ b/fasm-plugin/tests/Makefile @@ -1,6 +1 @@ -TESTS = dummy - -all: $(TESTS) - -dummy: - @echo $@ PASS +include $(shell pwd)/../../Makefile_test.common From 01e5f4e65dcff4107432870f9fb7d60c20b9510a Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 6 Oct 2020 15:29:59 +0200 Subject: [PATCH 172/845] SDC plugin: Use common plugin test Makefile Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 50 ++++--------------- sdc-plugin/tests/counter/counter.tcl | 8 +-- sdc-plugin/tests/counter2/counter2.tcl | 8 +-- sdc-plugin/tests/pll/pll.tcl | 6 +-- .../pll_approx_equal/pll_approx_equal.tcl | 6 +-- sdc-plugin/tests/pll_div/pll_div.tcl | 6 +-- .../tests/pll_fbout_phase/pll_fbout_phase.tcl | 6 +-- .../tests/set_false_path/set_false_path.tcl | 4 +- .../tests/set_max_delay/set_max_delay.tcl | 4 +- 9 files changed, 34 insertions(+), 64 deletions(-) diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 718241c44..b2d146a4f 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,7 +1,6 @@ # counter, counter2, pll - test buffer and clock divider propagation # set_false_path - test the set_false_path command # set_max_delay - test the set_max_delay command - TESTS = counter \ counter2 \ pll \ @@ -10,42 +9,13 @@ TESTS = counter \ pll_approx_equal \ set_false_path \ set_max_delay - -.PHONY: $(TESTS) - -counter_verify = $(call compare,counter,sdc) && $(call compare,counter,txt) -counter2_verify = $(call compare,counter2,sdc) && $(call compare,counter2,txt) -pll_verify = $(call compare,pll,sdc) -pll_div_verify = $(call compare,pll_div,sdc) -pll_fbout_phase_verify = $(call compare,pll_fbout_phase,sdc) -pll_approx_equal_verify = $(call compare,pll_approx_equal,sdc) -set_false_path_verify = $(call compare,set_false_path,sdc) -set_max_delay_verify = $(call compare,set_max_delay,sdc) - -all: $(TESTS) -compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) - -define test_tpl = -$(1): $(1)/$(1).sdc - $$($(1)_verify) - RETVAL=$$$$? ; \ - if [ $$$$RETVAL -eq 0 ]; then \ - echo "$(1) PASS"; \ - true; \ - else \ - echo "$(1) FAIL"; \ - false; \ - fi - -$(1)/$(1).sdc: $(1)/$(1).v - cd $(1); \ - INPUT_SDC_FILE=$(1).input.sdc \ - OUTPUT_SDC_FILE=$(1).sdc \ - yosys -p "tcl $(1).tcl" -l yosys.log - -endef - -$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) - -clean: - rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/yosys.log) +include $(shell pwd)/../../Makefile_test.common + +counter_verify = $(call diff_test,counter,sdc) && $(call diff_test,counter,txt) +counter2_verify = $(call diff_test,counter2,sdc) && $(call diff_test,counter2,txt) +pll_verify = $(call diff_test,pll,sdc) +pll_div_verify = $(call diff_test,pll_div,sdc) +pll_fbout_phase_verify = $(call diff_test,pll_fbout_phase,sdc) +pll_approx_equal_verify = $(call diff_test,pll_approx_equal,sdc) +set_false_path_verify = $(call diff_test,set_false_path,sdc) +set_max_delay_verify = $(call diff_test,set_max_delay,sdc) diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index a27caf929..4fcf9bef7 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -3,7 +3,7 @@ plugin -i sdc # Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog counter.v +read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top @@ -11,16 +11,16 @@ hierarchy -check -auto-top synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design's timing constraints -read_sdc $::env(INPUT_SDC_FILE) +read_sdc $::env(DESIGN_TOP).input.sdc # Propagate the clocks propagate_clocks # Write the clocks to file -set fh [open counter.txt w] +set fh [open $::env(DESIGN_TOP).txt w] set clocks [get_clocks] puts $fh $clocks close $fh # Write out the SDC file after the clock propagation step -write_sdc $::env(OUTPUT_SDC_FILE) +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/counter2/counter2.tcl b/sdc-plugin/tests/counter2/counter2.tcl index 80bce1b5b..4fcf9bef7 100644 --- a/sdc-plugin/tests/counter2/counter2.tcl +++ b/sdc-plugin/tests/counter2/counter2.tcl @@ -3,7 +3,7 @@ plugin -i sdc # Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog counter2.v +read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top @@ -11,16 +11,16 @@ hierarchy -check -auto-top synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design's timing constraints -read_sdc $::env(INPUT_SDC_FILE) +read_sdc $::env(DESIGN_TOP).input.sdc # Propagate the clocks propagate_clocks # Write the clocks to file -set fh [open counter2.txt w] +set fh [open $::env(DESIGN_TOP).txt w] set clocks [get_clocks] puts $fh $clocks close $fh # Write out the SDC file after the clock propagation step -write_sdc $::env(OUTPUT_SDC_FILE) +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl index 61e67f6d6..5a2e3c47e 100644 --- a/sdc-plugin/tests/pll/pll.tcl +++ b/sdc-plugin/tests/pll/pll.tcl @@ -3,7 +3,7 @@ plugin -i sdc # Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog pll.v +read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top @@ -12,10 +12,10 @@ hierarchy -check -auto-top synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design timing constraints -read_sdc $::env(INPUT_SDC_FILE) +read_sdc $::env(DESIGN_TOP).input.sdc # Propagate the clocks propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(OUTPUT_SDC_FILE) +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl index 13c889049..5a2e3c47e 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl @@ -3,7 +3,7 @@ plugin -i sdc # Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog pll_approx_equal.v +read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top @@ -12,10 +12,10 @@ hierarchy -check -auto-top synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design timing constraints -read_sdc $::env(INPUT_SDC_FILE) +read_sdc $::env(DESIGN_TOP).input.sdc # Propagate the clocks propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(OUTPUT_SDC_FILE) +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/pll_div/pll_div.tcl b/sdc-plugin/tests/pll_div/pll_div.tcl index f8f0a9f47..5a2e3c47e 100644 --- a/sdc-plugin/tests/pll_div/pll_div.tcl +++ b/sdc-plugin/tests/pll_div/pll_div.tcl @@ -3,7 +3,7 @@ plugin -i sdc # Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog pll_div.v +read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top @@ -12,10 +12,10 @@ hierarchy -check -auto-top synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design timing constraints -read_sdc $::env(INPUT_SDC_FILE) +read_sdc $::env(DESIGN_TOP).input.sdc # Propagate the clocks propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(OUTPUT_SDC_FILE) +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl index 6b6db7365..5a2e3c47e 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl @@ -3,7 +3,7 @@ plugin -i sdc # Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog pll_fbout_phase.v +read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top @@ -12,10 +12,10 @@ hierarchy -check -auto-top synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design timing constraints -read_sdc $::env(INPUT_SDC_FILE) +read_sdc $::env(DESIGN_TOP).input.sdc # Propagate the clocks propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(OUTPUT_SDC_FILE) +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/set_false_path/set_false_path.tcl b/sdc-plugin/tests/set_false_path/set_false_path.tcl index 39a51c0a5..a4e01f4c3 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.tcl +++ b/sdc-plugin/tests/set_false_path/set_false_path.tcl @@ -3,7 +3,7 @@ plugin -i sdc #Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog set_false_path.v +read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp @@ -16,4 +16,4 @@ set_false_path -quiet -from clk # -from clk to bottom_inst/I set_false_path -from clk -to bottom_inst.I -write_sdc set_false_path.sdc +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl index 8cfde6a73..f2a5b4f66 100644 --- a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl @@ -3,7 +3,7 @@ plugin -i sdc #Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog set_max_delay.v +read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp @@ -16,4 +16,4 @@ set_max_delay 2 -quiet -from clk # -from clk to bottom_inst/I set_max_delay 3 -from clk -to bottom_inst.I -write_sdc set_max_delay.sdc +write_sdc $::env(DESIGN_TOP).sdc From 1609d30f539e872c20f3f758f54a5deaa1872495 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 6 Oct 2020 15:32:10 +0200 Subject: [PATCH 173/845] Selection plugin: Use common plugin test Makefile Signed-off-by: Tomasz Michalak --- selection-plugin/tests/Makefile | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/selection-plugin/tests/Makefile b/selection-plugin/tests/Makefile index e29a406b4..e20374103 100644 --- a/selection-plugin/tests/Makefile +++ b/selection-plugin/tests/Makefile @@ -1,32 +1,3 @@ TESTS = counter -.PHONY: $(TESTS) - -counter_verify = $(call compare,counter,txt) - -all: $(TESTS) -compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) - -define test_tpl = -$(1): $(1)/$(1).txt - $$($(1)_verify) - RETVAL=$$$$? ; \ - if [ $$$$RETVAL -eq 0 ]; then \ - echo "$(1) PASS"; \ - true; \ - else \ - echo "$(1) FAIL"; \ - false; \ - fi - -$(1)/$(1).txt: $(1)/$(1).v - cd $(1); \ - INPUT_SDC_FILE=$(1).input.sdc \ - OUTPUT_SDC_FILE=$(1).sdc \ - yosys -p "tcl $(1).tcl" -l yosys.log - -endef - -$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) - -clean: - rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/yosys.log) +include $(shell pwd)/../../Makefile_test.common +counter_verify = $(call diff_test,counter,txt) From 2dca3196b2b10183d1b9660ae8cf03b95af622a5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 6 Oct 2020 16:00:33 +0200 Subject: [PATCH 174/845] XDC plugin: Use common plugin test Makefile Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/Makefile | 48 ++++--------------- ...ounter_golden.json => counter.golden.json} | 0 xdc-plugin/tests/counter/counter.tcl | 7 ++- ...s_golden.json => io_loc_pairs.golden.json} | 0 .../tests/io_loc_pairs/io_loc_pairs.tcl | 6 ++- ...en.json => minilitex_ddr_arty.golden.json} | 0 .../minilitex_ddr_arty/minilitex_ddr_arty.tcl | 7 +-- ...s_golden.json => package_pins.golden.json} | 0 .../tests/package_pins/package_pins.tcl | 5 +- ...s_golden.json => port_indexes.golden.json} | 0 .../tests/port_indexes/port_indexes.tcl | 6 ++- 11 files changed, 30 insertions(+), 49 deletions(-) rename xdc-plugin/tests/counter/{counter_golden.json => counter.golden.json} (100%) rename xdc-plugin/tests/io_loc_pairs/{io_loc_pairs_golden.json => io_loc_pairs.golden.json} (100%) rename xdc-plugin/tests/minilitex_ddr_arty/{minilitex_ddr_arty_golden.json => minilitex_ddr_arty.golden.json} (100%) rename xdc-plugin/tests/package_pins/{package_pins_golden.json => package_pins.golden.json} (100%) rename xdc-plugin/tests/port_indexes/{port_indexes_golden.json => port_indexes.golden.json} (100%) diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index 714ed733b..76d224149 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -3,51 +3,23 @@ # io_loc_pairs - test for LOC property being set on IOBUFs as the IO_LOC_PAIRS parameter # minilitex_ddr_arty - litex design with more types of IOBUFS including differential # package_pins - test for PACKAGE_PIN property being set on IOBUFs as the IO_LOC_PAIRS parameter - TESTS = counter \ port_indexes \ io_loc_pairs \ minilitex_ddr_arty \ package_pins -counter_verify = $(call compare_json,counter) -port_indexes_verify = $(call compare_json,port_indexes) && test $$(grep "'unknown' proc command handler" port_indexes/port_indexes.txt | wc -l) -eq 2 -io_loc_pairs_verify = $(call compare_json,io_loc_pairs) -minilitex_ddr_arty_verify = $(call compare_json,minilitex_ddr_arty) -package_pins_verify = $(call compare_json,package_pins) - -all: $(TESTS) - -compare_json = python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1)_golden.json - -define test_tpl = -$(1): $(1)/$(1).json - $$($(1)_verify) - RETVAL=$$$$? ; \ - if [ $$$$RETVAL -eq 0 ]; then \ - echo "$(1) PASS"; \ - true; \ - else \ - echo "$(1) FAIL"; \ - false; \ - fi +include $(shell pwd)/../../Makefile_test.common -$(1)/$(1).json: $(1)/$(1).v - cd $(1); \ - PART_JSON=../xc7a35tcsg324-1.json \ - OUT_JSON=$(1).json \ - INPUT_XDC_FILE=$(1).xdc \ - yosys -p "tcl $(1).tcl" $(1).v -l yosys.log - -update_$(1): $(1)/$(1).json - @python compare_output_json.py --json $$< --golden $(1)/$(1)_golden.json --update +json_test = python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1).golden.json +define json_update = +$(1)_update_json: + python compare_output_json.py --json $(1)/$(1).json --golden $(1)/$(1).golden.json --update endef -$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) - -update: $(foreach test,$(TESTS),update_$(test)) - - -clean: - rm -rf $(foreach test,$(TESTS),$(test)/$(test).json $(test)/$(test).eblif $(test)/$(test).txt $(test)/yosys.log) +counter_verify = $(call json_test,counter) +port_indexes_verify = $(call json_test,port_indexes) && test $$(grep "'unknown' proc command handler" port_indexes/port_indexes.txt | wc -l) -eq 2 +io_loc_pairs_verify = $(call json_test,io_loc_pairs) +minilitex_ddr_arty_verify = $(call json_test,minilitex_ddr_arty) +package_pins_verify = $(call json_test,package_pins) diff --git a/xdc-plugin/tests/counter/counter_golden.json b/xdc-plugin/tests/counter/counter.golden.json similarity index 100% rename from xdc-plugin/tests/counter/counter_golden.json rename to xdc-plugin/tests/counter/counter.golden.json diff --git a/xdc-plugin/tests/counter/counter.tcl b/xdc-plugin/tests/counter/counter.tcl index 696dc4d6d..b7090c801 100644 --- a/xdc-plugin/tests/counter/counter.tcl +++ b/xdc-plugin/tests/counter/counter.tcl @@ -2,12 +2,15 @@ yosys -import plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import + +read_verilog $::env(DESIGN_TOP).v + # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints -read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) +read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc # Write the design in JSON format. -write_json $::env(OUT_JSON) +write_json $::env(DESIGN_TOP).json diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs_golden.json b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.golden.json similarity index 100% rename from xdc-plugin/tests/io_loc_pairs/io_loc_pairs_golden.json rename to xdc-plugin/tests/io_loc_pairs/io_loc_pairs.golden.json diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl index 8c0a57c5f..b7090c801 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -3,12 +3,14 @@ plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import +read_verilog $::env(DESIGN_TOP).v + # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints -read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) +read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc # Write the design in JSON format. -write_json $::env(OUT_JSON) +write_json $::env(DESIGN_TOP).json diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty_golden.json b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.golden.json similarity index 100% rename from xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty_golden.json rename to xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.golden.json diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl index 9597cd495..af91ce614 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl @@ -2,14 +2,15 @@ yosys -import plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import + +read_verilog $::env(DESIGN_TOP).v read_verilog VexRiscv_Lite.v # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints -read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) +read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc # Write the design in JSON format. -write_json $::env(OUT_JSON) -write_blif -attr -param -cname -conn counter.eblif +write_json $::env(DESIGN_TOP).json diff --git a/xdc-plugin/tests/package_pins/package_pins_golden.json b/xdc-plugin/tests/package_pins/package_pins.golden.json similarity index 100% rename from xdc-plugin/tests/package_pins/package_pins_golden.json rename to xdc-plugin/tests/package_pins/package_pins.golden.json diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/xdc-plugin/tests/package_pins/package_pins.tcl index 8c0a57c5f..66bd21d49 100644 --- a/xdc-plugin/tests/package_pins/package_pins.tcl +++ b/xdc-plugin/tests/package_pins/package_pins.tcl @@ -3,12 +3,13 @@ plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import +read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints -read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) +read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc # Write the design in JSON format. -write_json $::env(OUT_JSON) +write_json $::env(DESIGN_TOP).json diff --git a/xdc-plugin/tests/port_indexes/port_indexes_golden.json b/xdc-plugin/tests/port_indexes/port_indexes.golden.json similarity index 100% rename from xdc-plugin/tests/port_indexes/port_indexes_golden.json rename to xdc-plugin/tests/port_indexes/port_indexes.golden.json diff --git a/xdc-plugin/tests/port_indexes/port_indexes.tcl b/xdc-plugin/tests/port_indexes/port_indexes.tcl index ac05de356..ed35c69ff 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.tcl +++ b/xdc-plugin/tests/port_indexes/port_indexes.tcl @@ -3,6 +3,8 @@ plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import +read_verilog $::env(DESIGN_TOP).v + # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp @@ -19,7 +21,7 @@ if {[catch {invalid command} result]} { puts $fp $result } #Read the design constraints -read_xdc -part_json $::env(PART_JSON) $::env(INPUT_XDC_FILE) +read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc if {[catch {invalid command} result]} { close $fp @@ -30,4 +32,4 @@ if {[catch {invalid command} result]} { close $fp # Write the design in JSON format. -write_json $::env(OUT_JSON) +write_json $::env(DESIGN_TOP).json From 000cc6baf1f81fcde1df8398a369974854d5dc73 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 6 Oct 2020 12:13:07 +0200 Subject: [PATCH 175/845] Create common Makefile template to be used by all plugins Signed-off-by: Tomasz Michalak --- Makefile_plugin.common | 26 ++++++++++++++++++++++++++ fasm-plugin/Makefile | 23 +---------------------- get_count-plugin/Makefile | 25 +------------------------ params-plugin/Makefile | 26 +------------------------- ql-iob-plugin/Makefile | 25 +------------------------ sdc-plugin/Makefile | 26 +------------------------- selection-plugin/Makefile | 26 +------------------------- xdc-plugin/Makefile | 26 ++------------------------ 8 files changed, 34 insertions(+), 169 deletions(-) create mode 100644 Makefile_plugin.common diff --git a/Makefile_plugin.common b/Makefile_plugin.common new file mode 100644 index 000000000..ab8d2f9c5 --- /dev/null +++ b/Makefile_plugin.common @@ -0,0 +1,26 @@ +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) +LDFLAGS = $(shell yosys-config --ldflags) +LDLIBS = $(shell yosys-config --ldlibs) +PLUGINS_DIR = $(shell yosys-config --datdir)/plugins + +SOURCES := $(shell find -name '*.cc') +OBJS := $(SOURCES:cc=o) +NAME := $(patsubst %-plugin,%,$(notdir $(shell pwd))) + +$(NAME).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) + +install_plugin: $(NAME).so + mkdir -p $(PLUGINS_DIR) + cp $< $(PLUGINS_DIR)/$< + +test: + $(MAKE) -C tests all + +.PHONY: install +install: install_plugin + +clean: + rm -f *.d *.o *.so + $(MAKE) -C tests clean diff --git a/fasm-plugin/Makefile b/fasm-plugin/Makefile index dc171a477..321e17c2a 100644 --- a/fasm-plugin/Makefile +++ b/fasm-plugin/Makefile @@ -1,22 +1 @@ -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -LDFLAGS = $(shell yosys-config --ldflags) -LDLIBS = $(shell yosys-config --ldlibs) -PLUGINS_DIR = $(shell yosys-config --datdir)/plugins - -OBJS = fasm.o - -fasm.so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) - -.PHONY: install -install: fasm.so - mkdir -p $(PLUGINS_DIR) - cp $< $(PLUGINS_DIR)/$< - -test: - $(MAKE) -C tests all - -clean: - rm -f *.d *.o fasm.so - +include ../Makefile_plugin.common diff --git a/get_count-plugin/Makefile b/get_count-plugin/Makefile index 2c860b6da..321e17c2a 100644 --- a/get_count-plugin/Makefile +++ b/get_count-plugin/Makefile @@ -1,24 +1 @@ -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -LDFLAGS = $(shell yosys-config --ldflags) -LDLIBS = $(shell yosys-config --ldlibs) -PLUGINS_DIR = $(shell yosys-config --datdir)/plugins - -NAME = get_count -OBJS = $(NAME).o - -$(NAME).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) - -.PHONY: install test - -install: $(NAME).so - mkdir -p $(PLUGINS_DIR) - cp $(NAME).so $(PLUGINS_DIR)/$(NAME).so - -test: $(NAME).so - $(MAKE) -C tests all - -clean: - rm -f *.d *.o *.so - $(MAKE) -C tests clean +include ../Makefile_plugin.common diff --git a/params-plugin/Makefile b/params-plugin/Makefile index 1cce08540..321e17c2a 100644 --- a/params-plugin/Makefile +++ b/params-plugin/Makefile @@ -1,25 +1 @@ -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -LDFLAGS = $(shell yosys-config --ldflags) -LDLIBS = $(shell yosys-config --ldlibs) -PLUGINS_DIR = $(shell yosys-config --datdir)/plugins - -OBJS = params.o - -params.so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) - -install_plugin: params.so - mkdir -p $(PLUGINS_DIR) - cp $< $(PLUGINS_DIR)/$< - -test: - $(MAKE) -C tests all - -.PHONY: install -install: install_plugin - -clean: - rm -f *.d *.o params.so - $(MAKE) -C tests clean - +include ../Makefile_plugin.common diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile index 636ebfe00..321e17c2a 100644 --- a/ql-iob-plugin/Makefile +++ b/ql-iob-plugin/Makefile @@ -1,24 +1 @@ -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -LDFLAGS = $(shell yosys-config --ldflags) -LDLIBS = $(shell yosys-config --ldlibs) -PLUGINS_DIR = $(shell yosys-config --datdir)/plugins - -NAME = ql-iob -OBJS = $(NAME).o pcf_parser.cc pinmap_parser.cc - -$(NAME).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) - -.PHONY: install test - -install: $(NAME).so - mkdir -p $(PLUGINS_DIR) - cp $(NAME).so $(PLUGINS_DIR)/$(NAME).so - -test: $(NAME).so - $(MAKE) -C tests all - -clean: - rm -f *.d *.o *.so - $(MAKE) -C tests clean +include ../Makefile_plugin.common diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index 0c9461dce..321e17c2a 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -1,25 +1 @@ -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -LDFLAGS = $(shell yosys-config --ldflags) -LDLIBS = $(shell yosys-config --ldlibs) -PLUGINS_DIR = $(shell yosys-config --datdir)/plugins - -OBJS = buffers.o clocks.o propagation.o sdc.o sdc_writer.o set_false_path.o set_max_delay.o - -sdc.so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) - -install_plugin: sdc.so - mkdir -p $(PLUGINS_DIR) - cp $< $(PLUGINS_DIR)/$< - -test: - $(MAKE) -C tests all - -.PHONY: install -install: install_plugin - -clean: - rm -f *.d *.o *.so - $(MAKE) -C tests clean - +include ../Makefile_plugin.common diff --git a/selection-plugin/Makefile b/selection-plugin/Makefile index 6c6f96fef..321e17c2a 100644 --- a/selection-plugin/Makefile +++ b/selection-plugin/Makefile @@ -1,25 +1 @@ -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -LDFLAGS = $(shell yosys-config --ldflags) -LDLIBS = $(shell yosys-config --ldlibs) -PLUGINS_DIR = $(shell yosys-config --datdir)/plugins - -OBJS = selection.o - -selection.so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) - -install_plugin: selection.so - mkdir -p $(PLUGINS_DIR) - cp $< $(PLUGINS_DIR)/$< - -test: - $(MAKE) -C tests all - -.PHONY: install -install: install_plugin - -clean: - rm -f *.d *.o *.so - $(MAKE) -C tests clean - +include ../Makefile_plugin.common diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index 10e330181..bf097a58a 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -1,30 +1,8 @@ -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -LDFLAGS = $(shell yosys-config --ldflags) -LDLIBS = $(shell yosys-config --ldlibs) -PLUGINS_DIR = $(shell yosys-config --datdir)/plugins - -OBJS = xdc.o +include ../Makefile_plugin.common VERILOG_MODULES = BANK.v -xdc.so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) - -install_plugin: xdc.so - mkdir -p $(PLUGINS_DIR) - cp $< $(PLUGINS_DIR)/$< - install_modules: $(VERILOG_MODULES) mkdir -p $(PLUGINS_DIR)/fasm_extra_modules/ cp $< $(PLUGINS_DIR)/fasm_extra_modules/$< -test: - $(MAKE) -C tests all - -.PHONY: install -install: install_modules install_plugin - -clean: - rm -f *.d *.o xdc.so - $(MAKE) -C tests clean - +install: install_modules From c43dd9edc9e3625a733866d086eca4034e9f785d Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 7 Oct 2020 09:43:30 +0200 Subject: [PATCH 176/845] Explicitly specify name of plugin and its sources Signed-off-by: Tomasz Michalak --- Makefile_plugin.common | 2 -- fasm-plugin/Makefile | 3 +++ get_count-plugin/Makefile | 2 ++ params-plugin/Makefile | 2 ++ ql-iob-plugin/Makefile | 2 ++ sdc-plugin/Makefile | 2 ++ selection-plugin/Makefile | 2 ++ xdc-plugin/Makefile | 2 ++ 8 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index ab8d2f9c5..325386784 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -4,9 +4,7 @@ LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins -SOURCES := $(shell find -name '*.cc') OBJS := $(SOURCES:cc=o) -NAME := $(patsubst %-plugin,%,$(notdir $(shell pwd))) $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/fasm-plugin/Makefile b/fasm-plugin/Makefile index 321e17c2a..71188e0f5 100644 --- a/fasm-plugin/Makefile +++ b/fasm-plugin/Makefile @@ -1 +1,4 @@ +NAME = fasm +SOURCES = fasm.cc include ../Makefile_plugin.common + diff --git a/get_count-plugin/Makefile b/get_count-plugin/Makefile index 321e17c2a..761d82c30 100644 --- a/get_count-plugin/Makefile +++ b/get_count-plugin/Makefile @@ -1 +1,3 @@ +NAME = get_count +SOURCES = get_count.cc include ../Makefile_plugin.common diff --git a/params-plugin/Makefile b/params-plugin/Makefile index 321e17c2a..ec98ed124 100644 --- a/params-plugin/Makefile +++ b/params-plugin/Makefile @@ -1 +1,3 @@ +NAME = params +SOURCES = params.cc include ../Makefile_plugin.common diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile index 321e17c2a..741d031e2 100644 --- a/ql-iob-plugin/Makefile +++ b/ql-iob-plugin/Makefile @@ -1 +1,3 @@ +NAME = ql-iob +SOURCES = ql-iob.cc pcf_parser.cc pinmap_parser.cc include ../Makefile_plugin.common diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index 321e17c2a..68b09171a 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -1 +1,3 @@ +NAME = sdc +SOURCES = buffers.cc clocks.cc propagation.cc sdc.cc sdc_writer.cc set_false_path.cc set_max_delay.cc include ../Makefile_plugin.common diff --git a/selection-plugin/Makefile b/selection-plugin/Makefile index 321e17c2a..5745bbb72 100644 --- a/selection-plugin/Makefile +++ b/selection-plugin/Makefile @@ -1 +1,3 @@ +NAME = selection +SOURCES = selection.cc include ../Makefile_plugin.common diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index bf097a58a..bd454a1da 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -1,3 +1,5 @@ +NAME = xdc +SOURCES = xdc.cc include ../Makefile_plugin.common VERILOG_MODULES = BANK.v From 09e3c5ad5829b664b4b9da21f16e748c4d3bf9e7 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 7 Oct 2020 19:32:34 +0200 Subject: [PATCH 177/845] Use nproc jobs in Travis CI Signed-off-by: Tomasz Michalak --- .travis/build-and-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis/build-and-test.sh b/.travis/build-and-test.sh index 928f1a391..e1cd5dfa6 100755 --- a/.travis/build-and-test.sh +++ b/.travis/build-and-test.sh @@ -28,7 +28,7 @@ echo echo 'Building plugins..' && echo -en 'travis_fold:start:script.build\\r' echo -make plugins +make plugins -j`nproc` echo echo -en 'travis_fold:end:script.build\\r' @@ -40,7 +40,7 @@ echo echo 'Installing plugins...' && echo -en 'travis_fold:start:script.build\\r' echo -make install +make install -j`nproc` echo echo -en 'travis_fold:end:script.build\\r' @@ -52,7 +52,7 @@ echo echo 'Testing...' && echo -en 'travis_fold:start:script.test\\r' echo -make test +make test -j`nproc` echo echo -en 'travis_fold:end:script.test\\r' From e615d803ab0bd9444ce16585b878ebaec3189e6b Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 7 Oct 2020 21:05:21 +0200 Subject: [PATCH 178/845] Add documentation about plugin Makefile Signed-off-by: Tomasz Michalak --- Makefile_plugin.common | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 325386784..6215cbb4b 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -1,3 +1,41 @@ +# This Makefile template is supposed to be included in each plugin's Makefile. +# Plugin Makefiles need to specify the plugin's name and source files. +# The plugin name is how the final shared object will be named. +# This shared object can be imported to Yosys with `plugin -i` command. +# +# Below is an example of a plugin Makefile that uses this template: +# NAME = plugin_name +# SOURCES = source1.cc source2.cc +# include ../Makefile_plugin.common +# +# For the above example the final plugin shared object will be named plugin_name.so. +# In order to test the plugin it has to be copied to Yosys's shared folder. +# The install target in this Makefile copies the plugins into the shared folder +# of the Yosys installation that is found in the PATH. +# This is needed because the shared folder is where Yosys will look for the +# plugin object when `plugin -i` is called in Yosys's synthesis script. +# +# To add tests for the plugin the Makefile_test.common Makefile should be used. +# Refer to Makefile_test.common to learn more details. +# +# Below is a directory structure which shows how the plugin sources and tests +# should be laid out +# +# |-- Makefile_plugin.common +# |-- Makefile_test.common +# |-- example-plugin +# | |-- Makefile +# | |-- source1.cc +# | |-- source2.cc +# | |-- tests +# | |-- Makefile +# | |-- test_case_1 +# | | |-- test_case_1.tcl +# | | |-- test_case_1.v +# | | |-- test_case_1.golden.ext +# | | |-- ... +# |-- example2-plugin +# |-- ... CXX = $(shell yosys-config --cxx) CXXFLAGS = $(shell yosys-config --cxxflags) LDFLAGS = $(shell yosys-config --ldflags) From 54e230f7ab6fe762ef2640872ea71bda8fa27524 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 5 Oct 2020 16:12:22 +0200 Subject: [PATCH 179/845] SDC: Add set_clock_groups command and adjust SDC Writer Signed-off-by: Tomasz Michalak --- sdc-plugin/Makefile | 9 ++- sdc-plugin/sdc.cc | 5 +- sdc-plugin/sdc_writer.cc | 31 +++++++++ sdc-plugin/sdc_writer.h | 26 ++++++++ sdc-plugin/set_clock_groups.cc | 116 +++++++++++++++++++++++++++++++++ sdc-plugin/set_clock_groups.h | 39 +++++++++++ 6 files changed, 224 insertions(+), 2 deletions(-) create mode 100644 sdc-plugin/set_clock_groups.cc create mode 100644 sdc-plugin/set_clock_groups.h diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index 68b09171a..f45efdce3 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -1,3 +1,10 @@ NAME = sdc -SOURCES = buffers.cc clocks.cc propagation.cc sdc.cc sdc_writer.cc set_false_path.cc set_max_delay.cc +SOURCES = buffers.cc \ + clocks.cc \ + propagation.cc \ + sdc.cc \ + sdc_writer.cc \ + set_false_path.cc \ + set_max_delay.cc \ + set_clock_groups.cc include ../Makefile_plugin.common diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index df09526f6..c138b04f0 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -23,6 +23,7 @@ #include "propagation.h" #include "set_false_path.h" #include "set_max_delay.h" +#include "set_clock_groups.h" #include "sdc_writer.h" USING_YOSYS_NAMESPACE @@ -255,7 +256,8 @@ class SdcPlugin { get_clocks_cmd_(clocks_), propagate_clocks_cmd_(clocks_), set_false_path_cmd_(sdc_writer_), - set_max_delay_cmd_(sdc_writer_) { + set_max_delay_cmd_(sdc_writer_), + set_clock_groups_cmd_(sdc_writer_) { log("Loaded SDC plugin\n"); } @@ -266,6 +268,7 @@ class SdcPlugin { PropagateClocksCmd propagate_clocks_cmd_; SetFalsePath set_false_path_cmd_; SetMaxDelay set_max_delay_cmd_; + SetClockGroups set_clock_groups_cmd_; private: Clocks clocks_; diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index 3c106d379..e4076f889 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -19,6 +19,12 @@ USING_YOSYS_NAMESPACE +const std::map ClockGroups::relation_name_map = { + {NONE, ""}, + {ASYNCHRONOUS, "asynchronous"}, + {PHYSICALLY_EXCLUSIVE, "physically_exclusive"}, + {LOGICALLY_EXCLUSIVE, "logically_exclusive"}}; + void SdcWriter::AddFalsePath(FalsePath false_path) { false_paths_.push_back(false_path); } @@ -27,10 +33,15 @@ void SdcWriter::SetMaxDelay(TimingPath timing_path) { timing_paths_.push_back(timing_path); } +void SdcWriter::AddClockGroup(ClockGroups::ClockGroup clock_group, ClockGroups::ClockGroupRelation relation) { + clock_groups_.Add(clock_group, relation); +} + void SdcWriter::WriteSdc(Clocks& clocks, std::ostream& file) { WriteClocks(clocks, file); WriteFalsePaths(file); WriteMaxDelay(file); + WriteClockGroups(file); } void SdcWriter::WriteClocks(Clocks& clocks, std::ostream& file) { @@ -79,3 +90,23 @@ void SdcWriter::WriteMaxDelay(std::ostream& file) { file << std::endl; } } + +void SdcWriter::WriteClockGroups(std::ostream& file) { + for (size_t relation = 0; relation <= ClockGroups::CLOCK_GROUP_RELATION_SIZE; relation++) { + auto clock_groups = clock_groups_.GetGroups(static_cast(relation)); + if (clock_groups.size() == 0) { + continue; + } + file << "create_clock_groups "; + for (auto group : clock_groups) { + file << "-group "; + for (auto signal : group) { + file << signal << " "; + } + } + if (relation != ClockGroups::ClockGroupRelation::NONE) { + file << "-" + ClockGroups::relation_name_map.at(static_cast(relation)); + } + file << std::endl; + } +} diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h index 562084112..05a8dea2b 100644 --- a/sdc-plugin/sdc_writer.h +++ b/sdc-plugin/sdc_writer.h @@ -18,6 +18,7 @@ #ifndef _SDC_WRITER_H_ #define _SDC_WRITER_H_ #include "clocks.h" +#include USING_YOSYS_NAMESPACE @@ -32,19 +33,44 @@ struct TimingPath { float max_delay; }; +struct ClockGroups { + enum ClockGroupRelation { NONE, ASYNCHRONOUS, PHYSICALLY_EXCLUSIVE, LOGICALLY_EXCLUSIVE, CLOCK_GROUP_RELATION_SIZE }; + using ClockGroup = std::vector; + static const std::map relation_name_map; + + void Add(ClockGroup& group, ClockGroupRelation relation) { + groups_[relation].push_back(group); + } + std::vector GetGroups(ClockGroupRelation relation) { + if (groups_.count(relation)) { + return groups_.at(relation); + } + return std::vector(); + } + size_t size() { + return groups_.size(); + } + + private: + std::map> groups_; +}; + class SdcWriter { public: void AddFalsePath(FalsePath false_path); void SetMaxDelay(TimingPath timing_path); + void AddClockGroup(ClockGroups::ClockGroup clock_group, ClockGroups::ClockGroupRelation relation); void WriteSdc(Clocks& clocks, std::ostream& file); private: void WriteClocks(Clocks& clocks, std::ostream& file); void WriteFalsePaths(std::ostream& file); void WriteMaxDelay(std::ostream& file); + void WriteClockGroups(std::ostream& file); std::vector false_paths_; std::vector timing_paths_; + ClockGroups clock_groups_; }; #endif // _SDC_WRITER_H_ diff --git a/sdc-plugin/set_clock_groups.cc b/sdc-plugin/set_clock_groups.cc new file mode 100644 index 000000000..301ca9605 --- /dev/null +++ b/sdc-plugin/set_clock_groups.cc @@ -0,0 +1,116 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "set_clock_groups.h" +#include +#include "kernel/log.h" + +USING_YOSYS_NAMESPACE + +void SetClockGroups::help() { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" set_clock_groups [-quiet] [-group ] [-asynchronous] \n"); + log("\n"); + log("Set exclusive or asynchronous clock groups\n"); + log("\n"); + log("Print the output to stdout too. This is useful when all Yosys is " + "executed.\n"); + log("\n"); + log(" -quiet\n"); + log(" Don't print the result of the execution to stdout.\n"); + log("\n"); + log(" -group\n"); + log(" List of clocks to be included in the clock group.\n"); + log("\n"); + log(" -asynchronous\n"); + log(" The specified clocks are asynchronous to each other.\n"); + log("\n"); +} + +void SetClockGroups::execute(std::vector args, + RTLIL::Design* design) { + RTLIL::Module* top_module = design->top_module(); + if (top_module == nullptr) { + log_cmd_error("No top module detected\n"); + } + + size_t argidx; + bool is_quiet = false; + std::vector clock_groups; + auto clock_groups_relation = ClockGroups::NONE; + + // Parse command arguments + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-quiet") { + is_quiet = true; + continue; + } + + // Parse clock groups relation: asynchronous, logically_exclusive, physically_exclusive + auto is_relation_arg = + [arg](std::pair + relation) { + if (arg.substr(1) == relation.second) { + return true; + } + return false; + }; + auto relation_map_it = + std::find_if(ClockGroups::relation_name_map.begin(), + ClockGroups::relation_name_map.end(), is_relation_arg); + if (relation_map_it != ClockGroups::relation_name_map.end()) { + clock_groups_relation = relation_map_it->first; + continue; + } + + if (arg == "-group" and argidx + 1 < args.size()) { + ClockGroups::ClockGroup clock_group; + while (argidx + 1 < args.size() and args[argidx+1][0] != '-') { + clock_group.push_back(args[++argidx]); + } + clock_groups.push_back(clock_group); + continue; + } + + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } + + break; + } + + if (clock_groups.size()) { + if (!is_quiet) { + std::string msg = ClockGroups::relation_name_map.at(clock_groups_relation); + msg += (!msg.empty()) ? " " : ""; + log("Adding %sclock group with following clocks:\n", msg.c_str()); + } + size_t count(0); + for (auto& group : clock_groups) { + sdc_writer_.AddClockGroup(group, clock_groups_relation); + if (!is_quiet) { + log("%zu: ", count++); + for (auto clk : group) { + log("%s ", clk.c_str()); + } + log("\n"); + } + } + } +} diff --git a/sdc-plugin/set_clock_groups.h b/sdc-plugin/set_clock_groups.h new file mode 100644 index 000000000..31145780e --- /dev/null +++ b/sdc-plugin/set_clock_groups.h @@ -0,0 +1,39 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _SET_CLOCK_GROUPS_H_ +#define _SET_CLOCK_GROUPS_H_ + +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "sdc_writer.h" + +USING_YOSYS_NAMESPACE + +struct SetClockGroups : public Pass { + SetClockGroups(SdcWriter& sdc_writer) + : Pass("set_clock_groups", "Set exclusive or asynchronous clock groups"), + sdc_writer_(sdc_writer) {} + + void help() override; + + void execute(std::vector args, RTLIL::Design* design) override; + + SdcWriter& sdc_writer_; +}; + +#endif //_SET_CLOCK_GROUPS_H_ From bae79abc7f5c744f5a92413f217bd40ca309b19a Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 5 Oct 2020 16:17:19 +0200 Subject: [PATCH 180/845] SDC: Add test for set_clock_groups Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 7 +- .../set_clock_groups.golden.sdc | 4 + .../set_clock_groups/set_clock_groups.tcl | 16 ++++ .../tests/set_clock_groups/set_clock_groups.v | 75 +++++++++++++++++++ 4 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/set_clock_groups/set_clock_groups.golden.sdc create mode 100644 sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl create mode 100644 sdc-plugin/tests/set_clock_groups/set_clock_groups.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index b2d146a4f..3b45b57ab 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,6 +1,8 @@ # counter, counter2, pll - test buffer and clock divider propagation # set_false_path - test the set_false_path command # set_max_delay - test the set_max_delay command +# set_clock_groups - test the set_clock_groups command + TESTS = counter \ counter2 \ pll \ @@ -8,7 +10,9 @@ TESTS = counter \ pll_fbout_phase \ pll_approx_equal \ set_false_path \ - set_max_delay + set_max_delay \ + set_clock_groups + include $(shell pwd)/../../Makefile_test.common counter_verify = $(call diff_test,counter,sdc) && $(call diff_test,counter,txt) @@ -19,3 +23,4 @@ pll_fbout_phase_verify = $(call diff_test,pll_fbout_phase,sdc) pll_approx_equal_verify = $(call diff_test,pll_approx_equal,sdc) set_false_path_verify = $(call diff_test,set_false_path,sdc) set_max_delay_verify = $(call diff_test,set_max_delay,sdc) +set_clock_groups_verify = $(call diff_test,set_clock_groups,sdc) diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.golden.sdc b/sdc-plugin/tests/set_clock_groups/set_clock_groups.golden.sdc new file mode 100644 index 000000000..162e4d077 --- /dev/null +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.golden.sdc @@ -0,0 +1,4 @@ +create_clock_groups -group clk1 clk2 +create_clock_groups -group clk3 clk4 -group clk11 clk12 -group clk13 clk14 -asynchronous +create_clock_groups -group clk7 clk8 -group clk9 clk10 -physically_exclusive +create_clock_groups -group clk5 clk6 -logically_exclusive diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl new file mode 100644 index 000000000..5e06b2cf4 --- /dev/null +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl @@ -0,0 +1,16 @@ +yosys -import +plugin -i sdc +#Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog set_clock_groups.v +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + +set_clock_groups -group clk1 clk2 +set_clock_groups -asynchronous -group clk3 clk4 +set_clock_groups -group clk5 clk6 -logically_exclusive +set_clock_groups -group clk7 clk8 -physically_exclusive -group clk9 clk10 +set_clock_groups -quiet -group clk11 clk12 -asynchronous -group clk13 clk14 + +write_sdc set_clock_groups.sdc diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v new file mode 100644 index 000000000..d40055b17 --- /dev/null +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v @@ -0,0 +1,75 @@ +module top ( + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2( + .I(LD6), + .O(signal_p), + .OB(signal_n), + .T(1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + From d2c9ec987cbf84ebd167c2ae304bbf9a85251046 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 12 Oct 2020 14:19:10 +0200 Subject: [PATCH 181/845] Refactor to fix Clang warnings Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 2 +- sdc-plugin/clocks.cc | 1 + sdc-plugin/clocks.h | 1 - sdc-plugin/propagation.h | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index cb5474373..919de28b4 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -35,7 +35,7 @@ Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_e void Pll::CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period) { float abs_diff = fabs(ClkinPeriod() - input_clock_period); - bool approx_equal = abs_diff < max(ClkinPeriod(), input_clock_period) * 10 * std::numeric_limits::epsilon(); + bool approx_equal = abs_diff < std::max(ClkinPeriod(), input_clock_period) * 10 * std::numeric_limits::epsilon(); if (!approx_equal) { log_cmd_error( "CLKIN[1/2]_PERIOD doesn't match the virtual clock constraint " diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 0a1572a35..c177f6aeb 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -18,6 +18,7 @@ #include "clocks.h" #include #include +#include #include "kernel/log.h" #include "kernel/register.h" #include "propagation.h" diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index f5b491c66..67ca272cb 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -18,7 +18,6 @@ #ifndef _CLOCKS_H_ #define _CLOCKS_H_ -#include #include #include "buffers.h" #include "kernel/rtlil.h" diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index bc7a6d25a..677406277 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -26,6 +26,7 @@ class Propagation { public: Propagation(RTLIL::Design* design, Pass* pass) : design_(design), pass_(pass) {} + virtual ~Propagation(){} virtual void Run(Clocks& clocks) = 0; std::vector FindSinkWiresForCellType( From 6b77d18f29e2eab999ad6231e0c07225ae58224d Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Mon, 12 Oct 2020 17:31:18 +0200 Subject: [PATCH 182/845] xdc-plugin: fix missing IOBUFDS Signed-off-by: Alessandro Comodi --- xdc-plugin/xdc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 9a8e5e74d..8dd72c2a5 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -61,7 +61,8 @@ const std::unordered_map> supported_primit {"OBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, {"OBUFTDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, {"IBUF", {"IO_LOC_PAIRS", "IOSTANDARD"}}, - {"IOBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}} + {"IOBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, + {"IOBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}} }; void register_in_tcl_interpreter(const std::string& command) { From 55e9a828ee59ecfe9ad3e5079346c17efbe001e5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 28 Sep 2020 15:21:20 +0200 Subject: [PATCH 183/845] Introspection: Add initial version of plugin with get_nets command Signed-off-by: Tomasz Michalak --- Makefile | 2 +- design_introspection-plugin/Makefile | 26 ++++ .../design_introspection.cc | 33 +++++ design_introspection-plugin/get_nets.cc | 138 ++++++++++++++++++ design_introspection-plugin/get_nets.h | 10 ++ design_introspection-plugin/tests/Makefile | 32 ++++ 6 files changed, 240 insertions(+), 1 deletion(-) create mode 100644 design_introspection-plugin/Makefile create mode 100644 design_introspection-plugin/design_introspection.cc create mode 100644 design_introspection-plugin/get_nets.cc create mode 100644 design_introspection-plugin/get_nets.h create mode 100644 design_introspection-plugin/tests/Makefile diff --git a/Makefile b/Makefile index 72611b40b..c39785903 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params selection sdc get_count ql-iob +PLUGIN_LIST := fasm xdc params selection sdc get_count ql-iob design_introspection PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile new file mode 100644 index 000000000..1b6589214 --- /dev/null +++ b/design_introspection-plugin/Makefile @@ -0,0 +1,26 @@ +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) +LDFLAGS = $(shell yosys-config --ldflags) +LDLIBS = $(shell yosys-config --ldlibs) +PLUGINS_DIR = $(shell yosys-config --datdir)/plugins + +NAME = design_introspection +OBJS = $(NAME).o get_nets.o + +$(NAME).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) + +install_plugin: $(NAME).so + mkdir -p $(PLUGINS_DIR) + cp $< $(PLUGINS_DIR)/$< + +test: + $(MAKE) -C tests all + +.PHONY: install +install: install_plugin + +clean: + rm -f *.d *.o *.so + $(MAKE) -C tests clean + diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc new file mode 100644 index 000000000..51921b0d1 --- /dev/null +++ b/design_introspection-plugin/design_introspection.cc @@ -0,0 +1,33 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2019 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "get_nets.h" + +USING_YOSYS_NAMESPACE + +PRIVATE_NAMESPACE_BEGIN + +struct DesignIntrospection { + DesignIntrospection(){} + GetNets get_nets_cmd; +} DesignIntrospection; + + +PRIVATE_NAMESPACE_END diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc new file mode 100644 index 000000000..4b5e4a00a --- /dev/null +++ b/design_introspection-plugin/get_nets.cc @@ -0,0 +1,138 @@ +#include "get_nets.h" +#include +#include "kernel/log.h" +#include "kernel/register.h" +#include "kernel/rtlil.h" + +USING_YOSYS_NAMESPACE + +void GetNets::help() { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" get_nets [-quiet] [-filter filter_expression] \n"); + log("\n"); + log("Get matching nets\n"); + log("\n"); + log("Print the output to stdout too. This is useful when all Yosys is " + "executed.\n"); + log("\n"); + log(" -filter\n"); + log(" Name and value of attribute to be taken into account.\n"); + log(" e.g. -filter { attr == \"true\" }\n"); + log("\n"); + log(" -quiet\n"); + log(" Don't print the result of the execution to stdout.\n"); + log("\n"); + log(" \n"); + log(" Selection of net name. Default are all nets in the design.\n"); + log("\n"); +} + +void GetNets::execute(std::vector args, RTLIL::Design* design) { + RTLIL::Module* top_module = design->top_module(); + if (top_module == nullptr) { + log_cmd_error("No top module detected\n"); + } + + size_t argidx; + std::vector> filters; + bool is_quiet = false; + bool has_filter = false; + + // Parse command arguments + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-quiet") { + is_quiet = true; + continue; + } + + if (arg == "-filter" and argidx + 1 < args.size()) { + std::string filter_arg = args[++argidx]; + + // Remove spaces + filter_arg.erase( + std::remove_if(filter_arg.begin(), filter_arg.end(), isspace), + filter_arg.end()); + + // Parse filters + std::regex filter_attr_regex("(\\w+\\s?==\\s?\\w+)([(||)(&&)]*)"); + std::regex_token_iterator regex_end; + std::regex_token_iterator matches( + filter_arg.begin(), filter_arg.end(), filter_attr_regex, 1); + if (matches == regex_end) { + log_warning( + "Currently -filter switch supports only a single " + "'equal(==)' condition expression, the rest will be " + "ignored\n"); + } + + while (matches != regex_end) { + std::string filter(*matches++); + auto separator = filter.find("=="); + if (separator == std::string::npos) { + log_cmd_error("Incorrect filter expression: %s\n", + args[argidx].c_str()); + } + filters.emplace_back(filter.substr(0, separator), + filter.substr(separator + 2)); + } + size_t filter_cnt = filters.size(); + has_filter = filter_cnt > 0; + if (filter_cnt > 1) { + log_warning( + "Currently -filter switch supports only a single " + "'equal(==)' condition expression, the rest will be " + "ignored\n"); + } + continue; + } + + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } + + break; + } + + // Add name of top module to selection string + std::vector selection_args; + std::transform(args.begin() + argidx, args.end(), + std::back_inserter(selection_args), [&](std::string& net) { + return RTLIL::unescape_id(top_module->name) + + "/w:" + net; + }); + + // Execute the selection + extra_args(selection_args, 0, design); + if (design->selected_modules().empty()) { + if (!is_quiet) { + log_warning("Specified net not found in design\n"); + } + } + + // Pack the selected nets into Tcl List + Tcl_Interp* interp = yosys_get_tcl_interp(); + Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); + for (auto module : design->selected_modules()) { + for (auto wire : module->selected_wires()) { + if (has_filter) { + std::pair filter = filters.at(0); + std::string attr_value = wire->get_string_attribute( + RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } + } + if (!is_quiet) { + log("%s ", id2cstr(wire->name)); + } + Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); + Tcl_ListObjAppendElement(interp, tcl_list, value_obj); + } + } + if (!is_quiet) { + log("\n"); + } + Tcl_SetObjResult(interp, tcl_list); +} diff --git a/design_introspection-plugin/get_nets.h b/design_introspection-plugin/get_nets.h new file mode 100644 index 000000000..8b66abe5e --- /dev/null +++ b/design_introspection-plugin/get_nets.h @@ -0,0 +1,10 @@ +#include "kernel/register.h" + +USING_YOSYS_NAMESPACE + +struct GetNets : public Pass { + GetNets() : Pass("get_nets", "Print matching nets") {} + + void help() override; + void execute(std::vector args, RTLIL::Design* design) override; +}; diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile new file mode 100644 index 000000000..e31bab67e --- /dev/null +++ b/design_introspection-plugin/tests/Makefile @@ -0,0 +1,32 @@ +TESTS = get_nets +.PHONY: $(TESTS) + +get_nets_verify = $(call compare,get_nets,txt) + +all: $(TESTS) +compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) + +define test_tpl = +$(1): $(1)/$(1).sdc + $$($(1)_verify) + RETVAL=$$$$? ; \ + if [ $$$$RETVAL -eq 0 ]; then \ + echo "$(1) PASS"; \ + true; \ + else \ + echo "$(1) FAIL"; \ + false; \ + fi + +$(1)/$(1).sdc: $(1)/$(1).v + cd $(1); \ + INPUT_SDC_FILE=$(1).input.sdc \ + OUTPUT_SDC_FILE=$(1).sdc \ + yosys -p "tcl $(1).tcl" -l yosys.log + +endef + +$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) + +clean: + rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/yosys.log) From a57d8481befd7408e4fab6c8f44fdf8e7af14f5a Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 28 Sep 2020 15:22:12 +0200 Subject: [PATCH 184/845] Introspection: Add test for get_nets Signed-off-by: Tomasz Michalak --- .../tests/get_nets/get_nets.golden.txt | 10 +++ .../tests/get_nets/get_nets.tcl | 33 ++++++++ .../tests/get_nets/get_nets.v | 75 +++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 design_introspection-plugin/tests/get_nets/get_nets.golden.txt create mode 100644 design_introspection-plugin/tests/get_nets/get_nets.tcl create mode 100644 design_introspection-plugin/tests/get_nets/get_nets.v diff --git a/design_introspection-plugin/tests/get_nets/get_nets.golden.txt b/design_introspection-plugin/tests/get_nets/get_nets.golden.txt new file mode 100644 index 000000000..24c2e2f61 --- /dev/null +++ b/design_introspection-plugin/tests/get_nets/get_nets.golden.txt @@ -0,0 +1,10 @@ +*inter* nets quiet +bottom_intermediate_inst.I bottom_intermediate_inst.O bottom_intermediate_inst.bottom_intermediate_wire inter_wire inter_wire_2 +*inter* nets +bottom_intermediate_inst.I bottom_intermediate_inst.O bottom_intermediate_inst.bottom_intermediate_wire inter_wire inter_wire_2 +*inter* nets with invalid filter expression +bottom_intermediate_inst.I bottom_intermediate_inst.O bottom_intermediate_inst.bottom_intermediate_wire inter_wire inter_wire_2 +Filtered nets +clk +All nets +{$abc$2135$aiger2134$38} {$abc$2135$aiger2134$42} {$abc$2135$aiger2134$43} {$abc$2135$aiger2134$48} {$abc$2135$aiger2134$49} {$abc$2135$aiger2134$54} {$abc$2135$aiger2134$55} {$abc$2135$aiger2134$60} {$abc$2135$aiger2134$61} {$abc$2135$aiger2134$66} {$abc$2135$aiger2134$67} {$abc$2135$aiger2134$72} {$abc$2135$aiger2134$73} {$abc$2135$aiger2134$76} {$abc$2135$aiger2134$77} {$abc$2135$aiger2134$78} {$abc$2135$iopadmap$clk} {$auto$alumacc.cc:485:replace_alu$1469.O} LD6 LD7 LD8 LD9 bottom_inst.I bottom_inst.O bottom_inst.OB bottom_intermediate_inst.I bottom_intermediate_inst.O bottom_intermediate_inst.bottom_intermediate_wire clk counter inter_wire inter_wire_2 led out_a out_b signal_n signal_p diff --git a/design_introspection-plugin/tests/get_nets/get_nets.tcl b/design_introspection-plugin/tests/get_nets/get_nets.tcl new file mode 100644 index 000000000..c4fe329ea --- /dev/null +++ b/design_introspection-plugin/tests/get_nets/get_nets.tcl @@ -0,0 +1,33 @@ +yosys -import +plugin -i design_introspection +#Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog get_nets.v +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + + +set fp [open "get_nets.txt" "w"] + +puts "\n*inter* nets quiet" +puts $fp "*inter* nets quiet" +puts $fp [get_nets -quiet *inter*] + +puts "\n*inter* nets" +puts $fp "*inter* nets" +puts $fp [get_nets *inter*] + +puts "\n*inter* nets with invalid filter expression" +puts $fp "*inter* nets with invalid filter expression" +puts $fp [get_nets -filter {mr_ff != true} *inter* ] + +puts "\nFiltered nets" +puts $fp "Filtered nets" +puts $fp [get_nets -filter {mr_ff == true || async_reg == true && dont_touch == true} ] + +puts "\nAll nets" +puts $fp "All nets" +puts $fp [get_nets] + +close $fp diff --git a/design_introspection-plugin/tests/get_nets/get_nets.v b/design_introspection-plugin/tests/get_nets/get_nets.v new file mode 100644 index 000000000..d40055b17 --- /dev/null +++ b/design_introspection-plugin/tests/get_nets/get_nets.v @@ -0,0 +1,75 @@ +module top ( + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2( + .I(LD6), + .O(signal_p), + .OB(signal_n), + .T(1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + From fb38600326b067086a3576fd85dde9681721c6b5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 28 Sep 2020 15:24:17 +0200 Subject: [PATCH 185/845] Introspection: Move get_ports command from XDC plugin Signed-off-by: Tomasz Michalak --- design_introspection-plugin/Makefile | 2 +- .../design_introspection.cc | 2 + design_introspection-plugin/get_ports.cc | 48 +++++++++++++++++ design_introspection-plugin/get_ports.h | 11 ++++ xdc-plugin/xdc.cc | 52 ------------------- 5 files changed, 62 insertions(+), 53 deletions(-) create mode 100644 design_introspection-plugin/get_ports.cc create mode 100644 design_introspection-plugin/get_ports.h diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index 1b6589214..436000e63 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -5,7 +5,7 @@ LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins NAME = design_introspection -OBJS = $(NAME).o get_nets.o +OBJS = $(NAME).o get_nets.o get_ports.o $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc index 51921b0d1..3ebebf931 100644 --- a/design_introspection-plugin/design_introspection.cc +++ b/design_introspection-plugin/design_introspection.cc @@ -19,6 +19,7 @@ */ #include "get_nets.h" +#include "get_ports.h" USING_YOSYS_NAMESPACE @@ -27,6 +28,7 @@ PRIVATE_NAMESPACE_BEGIN struct DesignIntrospection { DesignIntrospection(){} GetNets get_nets_cmd; + GetPorts get_ports_cmd; } DesignIntrospection; diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc new file mode 100644 index 000000000..1d616d81a --- /dev/null +++ b/design_introspection-plugin/get_ports.cc @@ -0,0 +1,48 @@ +#include "get_ports.h" + +USING_YOSYS_NAMESPACE + +void GetPorts::help() { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" get_ports \n"); + log("\n"); + log("Get matching ports\n"); + log("\n"); + log("Print the output to stdout too. This is useful when all Yosys is " + "executed\n"); + log("\n"); +} + +void GetPorts::execute(std::vector args, RTLIL::Design* design) { + if (args.size() < 2) { + log_cmd_error("No port specified.\n"); + } + RTLIL::Module* top_module = design->top_module(); + if (top_module == nullptr) { + log_cmd_error("No top module detected\n"); + } + // TODO handle more than one port + std::string port_name = args.at(1); + std::string port_str(port_name.size(), '\0'); + int bit(0); + if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { + log_error("Couldn't find port %s\n", port_name.c_str()); + } + + port_str.resize(strlen(port_str.c_str())); + RTLIL::IdString port_id(RTLIL::escape_id(port_str)); + Tcl_Interp* interp = yosys_get_tcl_interp(); + if (auto wire = top_module->wire(port_id)) { + if (wire->port_input || wire->port_output) { + if (bit >= wire->start_offset && + bit < wire->start_offset + wire->width) { + Tcl_Obj* tcl_string = Tcl_NewStringObj(port_name.c_str(), -1); + Tcl_SetObjResult(interp, tcl_string); + log("Found port %s\n", port_name.c_str()); + return; + } + } + } + log_error("Couldn't find port %s\n", port_name.c_str()); +} diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h new file mode 100644 index 000000000..72f3c91d4 --- /dev/null +++ b/design_introspection-plugin/get_ports.h @@ -0,0 +1,11 @@ +#include "kernel/register.h" + +USING_YOSYS_NAMESPACE + +struct GetPorts : public Pass { + GetPorts() : Pass("get_ports", "Print matching ports") {} + + void help() override; + + void execute(std::vector args, RTLIL::Design* design) override; +}; diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 8dd72c2a5..a27bdf720 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -71,57 +71,6 @@ void register_in_tcl_interpreter(const std::string& command) { Tcl_Eval(interp, tcl_script.c_str()); } -struct GetPorts : public Pass { - GetPorts() : Pass("get_ports", "Print matching ports") { - register_in_tcl_interpreter(pass_name); - } - - void help() override - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" get_ports \n"); - log("\n"); - log("Get matching ports\n"); - log("\n"); - log("Print the output to stdout too. This is useful when all Yosys is executed\n"); - log("\n"); - } - - void execute(std::vector args, RTLIL::Design* design) override - { - if (args.size() < 2) { - log_cmd_error("No port specified.\n"); - } - RTLIL::Module* top_module = design->top_module(); - if (top_module == nullptr) { - log_cmd_error("No top module detected\n"); - } - // TODO handle more than one port - port_name = args.at(1); - std::string port_str(port_name.size(), '\0'); - int bit(0); - if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { - log_error("Couldn't find port %s\n", port_name.c_str()); - } - - port_str.resize(strlen(port_str.c_str())); - RTLIL::IdString port_id(RTLIL::escape_id(port_str)); - if (auto wire = top_module->wire(port_id)) { - if (isInputPort(wire) || isOutputPort(wire)) { - if (bit >= wire->start_offset && bit < wire->start_offset + wire->width) { - Tcl_Interp *interp = yosys_get_tcl_interp(); - Tcl_SetResult(interp, const_cast(port_name.c_str()), NULL); - log("Found port %s\n", port_name.c_str()); - return; - } - } - } - log_error("Couldn't find port %s\n", port_name.c_str()); - } - std::string port_name; -}; - struct GetIOBanks : public Pass { GetIOBanks(std::function get_bank_tiles) : Pass("get_iobanks", "Set IO Bank number") @@ -435,7 +384,6 @@ struct ReadXdc : public Frontend { } BankTilesMap bank_tiles; - struct GetPorts GetPorts; struct GetIOBanks GetIOBanks; struct SetProperty SetProperty; } ReadXdc; From e96d1b11e4b2bb5caf75444a01520619239f72c6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 28 Sep 2020 15:37:47 +0200 Subject: [PATCH 186/845] XDC: Update test script to use design introspection plugin Signed-off-by: Tomasz Michalak --- xdc-plugin/tests/counter/counter.tcl | 1 + xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl | 1 + xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl | 1 + xdc-plugin/tests/package_pins/package_pins.tcl | 1 + xdc-plugin/tests/port_indexes/port_indexes.tcl | 1 + 5 files changed, 5 insertions(+) diff --git a/xdc-plugin/tests/counter/counter.tcl b/xdc-plugin/tests/counter/counter.tcl index b7090c801..be26ddeaa 100644 --- a/xdc-plugin/tests/counter/counter.tcl +++ b/xdc-plugin/tests/counter/counter.tcl @@ -1,4 +1,5 @@ yosys -import +plugin -i design_introspection plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl index b7090c801..be26ddeaa 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -1,4 +1,5 @@ yosys -import +plugin -i design_introspection plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl index af91ce614..34d7947bc 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl @@ -1,4 +1,5 @@ yosys -import +plugin -i design_introspection plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/xdc-plugin/tests/package_pins/package_pins.tcl index 66bd21d49..2df419a10 100644 --- a/xdc-plugin/tests/package_pins/package_pins.tcl +++ b/xdc-plugin/tests/package_pins/package_pins.tcl @@ -1,4 +1,5 @@ yosys -import +plugin -i design_introspection plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import diff --git a/xdc-plugin/tests/port_indexes/port_indexes.tcl b/xdc-plugin/tests/port_indexes/port_indexes.tcl index ed35c69ff..283cce592 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.tcl +++ b/xdc-plugin/tests/port_indexes/port_indexes.tcl @@ -1,4 +1,5 @@ yosys -import +plugin -i design_introspection plugin -i xdc #Import the commands from the plugins to the tcl interpreter yosys -import From 07aae42b7b5974a401ef3f3cafee297af8be4536 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 28 Sep 2020 16:29:29 +0200 Subject: [PATCH 187/845] Introspection: Use GetCmd base class for GetNets Signed-off-by: Tomasz Michalak --- design_introspection-plugin/Makefile | 2 +- design_introspection-plugin/get_cmd.cc | 142 ++++++++++++++++++++++++ design_introspection-plugin/get_cmd.h | 16 +++ design_introspection-plugin/get_nets.cc | 134 +--------------------- design_introspection-plugin/get_nets.h | 14 ++- 5 files changed, 170 insertions(+), 138 deletions(-) create mode 100644 design_introspection-plugin/get_cmd.cc create mode 100644 design_introspection-plugin/get_cmd.h diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index 436000e63..c9b43b3a9 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -5,7 +5,7 @@ LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins NAME = design_introspection -OBJS = $(NAME).o get_nets.o get_ports.o +OBJS = $(NAME).o get_cmd.o get_nets.o get_ports.o $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/design_introspection-plugin/get_cmd.cc b/design_introspection-plugin/get_cmd.cc new file mode 100644 index 000000000..b69d016eb --- /dev/null +++ b/design_introspection-plugin/get_cmd.cc @@ -0,0 +1,142 @@ +#include "get_cmd.h" + +USING_YOSYS_NAMESPACE + +void GetCmd::help() { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" get_%ss [-quiet] [-filter filter_expression] " + "<%s_selection> \n", + TypeName().c_str(), TypeName().c_str()); + log("\n"); + log("Get matching %ss\n", TypeName().c_str()); + log("\n"); + log("Print the output to stdout too. This is useful when all Yosys " + "is " + "executed.\n"); + log("\n"); + log(" -filter\n"); + log(" Name and value of attribute to be taken into " + "account.\n"); + log(" e.g. -filter { attr == \"true\" }\n"); + log("\n"); + log(" -quiet\n"); + log(" Don't print the result of the execution to stdout.\n"); + log("\n"); + log(" \n"); + log(" Selection of %s names. Default are all %ss in the " + "design.\n", + TypeName().c_str(), TypeName().c_str()); + log("\n"); +} + +void GetCmd::execute(std::vector args, RTLIL::Design* design) { + RTLIL::Module* top_module = design->top_module(); + if (top_module == nullptr) { + log_cmd_error("No top module detected\n"); + } + + size_t argidx; + std::vector> filters; + bool is_quiet = false; + bool has_filter = false; + + // Parse command arguments + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-quiet") { + is_quiet = true; + continue; + } + + if (arg == "-filter" and argidx + 1 < args.size()) { + std::string filter_arg = args[++argidx]; + + // Remove spaces + filter_arg.erase( + std::remove_if(filter_arg.begin(), filter_arg.end(), isspace), + filter_arg.end()); + + // Parse filters + std::regex filter_attr_regex("(\\w+\\s?==\\s?\\w+)([(||)(&&)]*)"); + std::regex_token_iterator regex_end; + std::regex_token_iterator matches( + filter_arg.begin(), filter_arg.end(), filter_attr_regex, 1); + if (matches == regex_end) { + log_warning( + "Currently -filter switch supports only a single " + "'equal(==)' condition expression, the rest will be " + "ignored\n"); + } + + while (matches != regex_end) { + std::string filter(*matches++); + auto separator = filter.find("=="); + if (separator == std::string::npos) { + log_cmd_error("Incorrect filter expression: %s\n", + args[argidx].c_str()); + } + filters.emplace_back(filter.substr(0, separator), + filter.substr(separator + 2)); + } + size_t filter_cnt = filters.size(); + has_filter = filter_cnt > 0; + if (filter_cnt > 1) { + log_warning( + "Currently -filter switch supports only a single " + "'equal(==)' condition expression, the rest will be " + "ignored\n"); + } + continue; + } + + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } + + break; + } + + // Add name of top module to selection string + std::vector selection_args; + std::transform(args.begin() + argidx, args.end(), + std::back_inserter(selection_args), [&](std::string& net) { + return RTLIL::unescape_id(top_module->name) + + "/w:" + net; + }); + + // Execute the selection + extra_args(selection_args, 0, design); + if (design->selected_modules().empty()) { + if (!is_quiet) { + log_warning("Specified net not found in design\n"); + } + } + + // Pack the selected nets into Tcl List + Tcl_Interp* interp = yosys_get_tcl_interp(); + Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); + for (auto module : design->selected_modules()) { + for (auto wire : module->selected_wires()) { + if (has_filter) { + std::pair filter = filters.at(0); + std::string attr_value = wire->get_string_attribute( + RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } + } + if (!is_quiet) { + log("%s ", id2cstr(wire->name)); + } + Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); + Tcl_ListObjAppendElement(interp, tcl_list, value_obj); + } + } + if (!is_quiet) { + log("\n"); + } + Tcl_SetObjResult(interp, tcl_list); +} +/* void execute(std::vector args, RTLIL::Design* design) override; + */ diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h new file mode 100644 index 000000000..6376b05ee --- /dev/null +++ b/design_introspection-plugin/get_cmd.h @@ -0,0 +1,16 @@ +#ifndef _GET_CMD_H_ +#define _GET_CMD_H_ + +#include "kernel/register.h" + +USING_YOSYS_NAMESPACE + +struct GetCmd : public Pass { + GetCmd(const std::string& name, const std::string& description) : Pass(name, description) {} + + void help() override; + void execute(std::vector args, RTLIL::Design* design) override; + virtual std::string TypeName() = 0; +}; + +#endif // GET_CMD_H_ diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc index 4b5e4a00a..25ce177fe 100644 --- a/design_introspection-plugin/get_nets.cc +++ b/design_introspection-plugin/get_nets.cc @@ -1,138 +1,8 @@ #include "get_nets.h" -#include -#include "kernel/log.h" -#include "kernel/register.h" -#include "kernel/rtlil.h" USING_YOSYS_NAMESPACE -void GetNets::help() { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" get_nets [-quiet] [-filter filter_expression] \n"); - log("\n"); - log("Get matching nets\n"); - log("\n"); - log("Print the output to stdout too. This is useful when all Yosys is " - "executed.\n"); - log("\n"); - log(" -filter\n"); - log(" Name and value of attribute to be taken into account.\n"); - log(" e.g. -filter { attr == \"true\" }\n"); - log("\n"); - log(" -quiet\n"); - log(" Don't print the result of the execution to stdout.\n"); - log("\n"); - log(" \n"); - log(" Selection of net name. Default are all nets in the design.\n"); - log("\n"); +std::string GetNets::TypeName() { + return "net"; } -void GetNets::execute(std::vector args, RTLIL::Design* design) { - RTLIL::Module* top_module = design->top_module(); - if (top_module == nullptr) { - log_cmd_error("No top module detected\n"); - } - - size_t argidx; - std::vector> filters; - bool is_quiet = false; - bool has_filter = false; - - // Parse command arguments - for (argidx = 1; argidx < args.size(); argidx++) { - std::string arg = args[argidx]; - if (arg == "-quiet") { - is_quiet = true; - continue; - } - - if (arg == "-filter" and argidx + 1 < args.size()) { - std::string filter_arg = args[++argidx]; - - // Remove spaces - filter_arg.erase( - std::remove_if(filter_arg.begin(), filter_arg.end(), isspace), - filter_arg.end()); - - // Parse filters - std::regex filter_attr_regex("(\\w+\\s?==\\s?\\w+)([(||)(&&)]*)"); - std::regex_token_iterator regex_end; - std::regex_token_iterator matches( - filter_arg.begin(), filter_arg.end(), filter_attr_regex, 1); - if (matches == regex_end) { - log_warning( - "Currently -filter switch supports only a single " - "'equal(==)' condition expression, the rest will be " - "ignored\n"); - } - - while (matches != regex_end) { - std::string filter(*matches++); - auto separator = filter.find("=="); - if (separator == std::string::npos) { - log_cmd_error("Incorrect filter expression: %s\n", - args[argidx].c_str()); - } - filters.emplace_back(filter.substr(0, separator), - filter.substr(separator + 2)); - } - size_t filter_cnt = filters.size(); - has_filter = filter_cnt > 0; - if (filter_cnt > 1) { - log_warning( - "Currently -filter switch supports only a single " - "'equal(==)' condition expression, the rest will be " - "ignored\n"); - } - continue; - } - - if (arg.size() > 0 and arg[0] == '-') { - log_cmd_error("Unknown option %s.\n", arg.c_str()); - } - - break; - } - - // Add name of top module to selection string - std::vector selection_args; - std::transform(args.begin() + argidx, args.end(), - std::back_inserter(selection_args), [&](std::string& net) { - return RTLIL::unescape_id(top_module->name) + - "/w:" + net; - }); - - // Execute the selection - extra_args(selection_args, 0, design); - if (design->selected_modules().empty()) { - if (!is_quiet) { - log_warning("Specified net not found in design\n"); - } - } - - // Pack the selected nets into Tcl List - Tcl_Interp* interp = yosys_get_tcl_interp(); - Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); - for (auto module : design->selected_modules()) { - for (auto wire : module->selected_wires()) { - if (has_filter) { - std::pair filter = filters.at(0); - std::string attr_value = wire->get_string_attribute( - RTLIL::IdString(RTLIL::escape_id(filter.first))); - if (attr_value.compare(filter.second)) { - continue; - } - } - if (!is_quiet) { - log("%s ", id2cstr(wire->name)); - } - Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); - Tcl_ListObjAppendElement(interp, tcl_list, value_obj); - } - } - if (!is_quiet) { - log("\n"); - } - Tcl_SetObjResult(interp, tcl_list); -} diff --git a/design_introspection-plugin/get_nets.h b/design_introspection-plugin/get_nets.h index 8b66abe5e..57b988505 100644 --- a/design_introspection-plugin/get_nets.h +++ b/design_introspection-plugin/get_nets.h @@ -1,10 +1,14 @@ -#include "kernel/register.h" +#ifndef _GET_NETS_H_ +#define _GET_NETS_H_ + +#include "get_cmd.h" USING_YOSYS_NAMESPACE -struct GetNets : public Pass { - GetNets() : Pass("get_nets", "Print matching nets") {} +struct GetNets : public GetCmd { + GetNets() : GetCmd("get_nets", "Print matching nets") {} - void help() override; - void execute(std::vector args, RTLIL::Design* design) override; + std::string TypeName() override; }; + +#endif // GET_NETS_H_ From 8ad75b1761a8433f8aada18f88a2a4204a054155 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 29 Sep 2020 13:28:51 +0200 Subject: [PATCH 188/845] Introspection: Extract common code from GetNets to GetCmd Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_cmd.cc | 31 +++++-------------------- design_introspection-plugin/get_cmd.h | 14 +++++++---- design_introspection-plugin/get_nets.cc | 24 ++++++++++++++++--- design_introspection-plugin/get_nets.h | 7 ++++-- 4 files changed, 42 insertions(+), 34 deletions(-) diff --git a/design_introspection-plugin/get_cmd.cc b/design_introspection-plugin/get_cmd.cc index b69d016eb..0dc6dc445 100644 --- a/design_introspection-plugin/get_cmd.cc +++ b/design_introspection-plugin/get_cmd.cc @@ -37,9 +37,8 @@ void GetCmd::execute(std::vector args, RTLIL::Design* design) { } size_t argidx; - std::vector> filters; + Filters filters; bool is_quiet = false; - bool has_filter = false; // Parse command arguments for (argidx = 1; argidx < args.size(); argidx++) { @@ -79,9 +78,7 @@ void GetCmd::execute(std::vector args, RTLIL::Design* design) { filters.emplace_back(filter.substr(0, separator), filter.substr(separator + 2)); } - size_t filter_cnt = filters.size(); - has_filter = filter_cnt > 0; - if (filter_cnt > 1) { + if (filters.size() > 1) { log_warning( "Currently -filter switch supports only a single " "'equal(==)' condition expression, the rest will be " @@ -100,16 +97,16 @@ void GetCmd::execute(std::vector args, RTLIL::Design* design) { // Add name of top module to selection string std::vector selection_args; std::transform(args.begin() + argidx, args.end(), - std::back_inserter(selection_args), [&](std::string& net) { + std::back_inserter(selection_args), [&](std::string& obj) { return RTLIL::unescape_id(top_module->name) + - "/w:" + net; + "/" + SelectionType() + ":" + obj; }); // Execute the selection extra_args(selection_args, 0, design); if (design->selected_modules().empty()) { if (!is_quiet) { - log_warning("Specified net not found in design\n"); + log_warning("Specified %s not found in design\n", TypeName().c_str()); } } @@ -117,26 +114,10 @@ void GetCmd::execute(std::vector args, RTLIL::Design* design) { Tcl_Interp* interp = yosys_get_tcl_interp(); Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); for (auto module : design->selected_modules()) { - for (auto wire : module->selected_wires()) { - if (has_filter) { - std::pair filter = filters.at(0); - std::string attr_value = wire->get_string_attribute( - RTLIL::IdString(RTLIL::escape_id(filter.first))); - if (attr_value.compare(filter.second)) { - continue; - } - } - if (!is_quiet) { - log("%s ", id2cstr(wire->name)); - } - Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); - Tcl_ListObjAppendElement(interp, tcl_list, value_obj); - } + ExtractSelection(tcl_list, module, filters, is_quiet); } if (!is_quiet) { log("\n"); } Tcl_SetObjResult(interp, tcl_list); } -/* void execute(std::vector args, RTLIL::Design* design) override; - */ diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h index 6376b05ee..078694ee8 100644 --- a/design_introspection-plugin/get_cmd.h +++ b/design_introspection-plugin/get_cmd.h @@ -6,11 +6,17 @@ USING_YOSYS_NAMESPACE struct GetCmd : public Pass { - GetCmd(const std::string& name, const std::string& description) : Pass(name, description) {} + using Filter = std::pair; + using Filters = std::vector; - void help() override; - void execute(std::vector args, RTLIL::Design* design) override; - virtual std::string TypeName() = 0; + GetCmd(const std::string& name, const std::string& description) + : Pass(name, description) {} + + void help() override; + void execute(std::vector args, RTLIL::Design* design) override; + virtual std::string TypeName() = 0; + virtual std::string SelectionType() = 0; + virtual void ExtractSelection(Tcl_Obj*, RTLIL::Module*, Filters&, bool) = 0; }; #endif // GET_CMD_H_ diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc index 25ce177fe..d44eb630c 100644 --- a/design_introspection-plugin/get_nets.cc +++ b/design_introspection-plugin/get_nets.cc @@ -2,7 +2,25 @@ USING_YOSYS_NAMESPACE -std::string GetNets::TypeName() { - return "net"; -} +std::string GetNets::TypeName() { return "net"; } + +std::string GetNets::SelectionType() { return "w"; } +void GetNets::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, + Filters& filters, bool is_quiet) { + for (auto wire : module->selected_wires()) { + if (filters.size() > 0) { + Filter filter = filters.at(0); + std::string attr_value = wire->get_string_attribute( + RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } + } + if (!is_quiet) { + log("%s ", id2cstr(wire->name)); + } + Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); + Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); + } +} diff --git a/design_introspection-plugin/get_nets.h b/design_introspection-plugin/get_nets.h index 57b988505..8af0b9fd4 100644 --- a/design_introspection-plugin/get_nets.h +++ b/design_introspection-plugin/get_nets.h @@ -6,9 +6,12 @@ USING_YOSYS_NAMESPACE struct GetNets : public GetCmd { - GetNets() : GetCmd("get_nets", "Print matching nets") {} + GetNets() : GetCmd("get_nets", "Print matching nets") {} - std::string TypeName() override; + std::string TypeName() override; + std::string SelectionType() override; + void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, + Filters& filters, bool is_quiet) override; }; #endif // GET_NETS_H_ From c61444b8e9c0d7052b77d22fb87b04bf2c653698 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 29 Sep 2020 13:37:03 +0200 Subject: [PATCH 189/845] Introspection: Adjust GetPorts to use GetCmd base class Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_ports.cc | 91 ++++++++++++++---------- design_introspection-plugin/get_ports.h | 18 +++-- 2 files changed, 65 insertions(+), 44 deletions(-) diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index 1d616d81a..241a00a4b 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -2,47 +2,62 @@ USING_YOSYS_NAMESPACE -void GetPorts::help() { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" get_ports \n"); - log("\n"); - log("Get matching ports\n"); - log("\n"); - log("Print the output to stdout too. This is useful when all Yosys is " - "executed\n"); - log("\n"); -} +std::string GetPorts::TypeName() { return "port"; } -void GetPorts::execute(std::vector args, RTLIL::Design* design) { - if (args.size() < 2) { - log_cmd_error("No port specified.\n"); - } - RTLIL::Module* top_module = design->top_module(); - if (top_module == nullptr) { - log_cmd_error("No top module detected\n"); - } - // TODO handle more than one port - std::string port_name = args.at(1); - std::string port_str(port_name.size(), '\0'); - int bit(0); - if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { - log_error("Couldn't find port %s\n", port_name.c_str()); - } +std::string GetPorts::SelectionType() { return "x"; } - port_str.resize(strlen(port_str.c_str())); - RTLIL::IdString port_id(RTLIL::escape_id(port_str)); - Tcl_Interp* interp = yosys_get_tcl_interp(); - if (auto wire = top_module->wire(port_id)) { - if (wire->port_input || wire->port_output) { - if (bit >= wire->start_offset && - bit < wire->start_offset + wire->width) { - Tcl_Obj* tcl_string = Tcl_NewStringObj(port_name.c_str(), -1); - Tcl_SetObjResult(interp, tcl_string); - log("Found port %s\n", port_name.c_str()); - return; +void GetPorts::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, + GetCmd::Filters& filters, bool is_quiet) { + for (auto wire : module->selected_wires()) { + if (!wire->port_input and !wire->port_output) { + continue; + } + if (filters.size() > 0) { + Filter filter = filters.at(0); + std::string attr_value = wire->get_string_attribute( + RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; } } + if (!is_quiet) { + log("%s ", id2cstr(wire->name)); + } + Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); + Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); } - log_error("Couldn't find port %s\n", port_name.c_str()); } +/* void GetPorts::execute(std::vector args, RTLIL::Design* design) + * { */ +/* if (args.size() < 2) { */ +/* log_cmd_error("No port specified.\n"); */ +/* } */ +/* RTLIL::Module* top_module = design->top_module(); */ +/* if (top_module == nullptr) { */ +/* log_cmd_error("No top module detected\n"); */ +/* } */ +/* // TODO handle more than one port */ +/* std::string port_name = args.at(1); */ +/* std::string port_str(port_name.size(), '\0'); */ +/* int bit(0); */ +/* if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { */ +/* log_error("Couldn't find port %s\n", port_name.c_str()); */ +/* } */ + +/* port_str.resize(strlen(port_str.c_str())); */ +/* RTLIL::IdString port_id(RTLIL::escape_id(port_str)); */ +/* Tcl_Interp* interp = yosys_get_tcl_interp(); */ +/* if (auto wire = top_module->wire(port_id)) { */ +/* if (wire->port_input || wire->port_output) { */ +/* if (bit >= wire->start_offset && */ +/* bit < wire->start_offset + wire->width) { */ +/* Tcl_Obj* tcl_string = Tcl_NewStringObj(port_name.c_str(), -1); + */ +/* Tcl_SetObjResult(interp, tcl_string); */ +/* log("Found port %s\n", port_name.c_str()); */ +/* return; */ +/* } */ +/* } */ +/* } */ +/* log_error("Couldn't find port %s\n", port_name.c_str()); */ +/* } */ diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index 72f3c91d4..eb8c0993e 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -1,11 +1,17 @@ -#include "kernel/register.h" +#ifndef _GET_PORTS_H_ +#define _GET_PORTS_H_ -USING_YOSYS_NAMESPACE +#include "get_cmd.h" -struct GetPorts : public Pass { - GetPorts() : Pass("get_ports", "Print matching ports") {} +USING_YOSYS_NAMESPACE - void help() override; +struct GetPorts : public GetCmd { + GetPorts() : GetCmd("get_ports", "Print matching ports") {} - void execute(std::vector args, RTLIL::Design* design) override; + std::string TypeName() override; + std::string SelectionType() override; + void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, + Filters& filters, bool is_quiet) override; }; + +#endif // GET_PORTS_H_ From d14a3631185dc9ba95f15e1fed8ae4eddcbcfb03 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 29 Sep 2020 13:38:51 +0200 Subject: [PATCH 190/845] Introspection: Add test for get_ports Signed-off-by: Tomasz Michalak --- design_introspection-plugin/tests/Makefile | 3 +- .../tests/get_ports/get_ports.golden.txt | 10 +++ .../tests/get_ports/get_ports.tcl | 33 ++++++++ .../tests/get_ports/get_ports.v | 75 +++++++++++++++++++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 design_introspection-plugin/tests/get_ports/get_ports.golden.txt create mode 100644 design_introspection-plugin/tests/get_ports/get_ports.tcl create mode 100644 design_introspection-plugin/tests/get_ports/get_ports.v diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index e31bab67e..6eed865ff 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -1,7 +1,8 @@ -TESTS = get_nets +TESTS = get_nets get_ports .PHONY: $(TESTS) get_nets_verify = $(call compare,get_nets,txt) +get_ports_verify = $(call compare,get_ports,txt) all: $(TESTS) compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) diff --git a/design_introspection-plugin/tests/get_ports/get_ports.golden.txt b/design_introspection-plugin/tests/get_ports/get_ports.golden.txt new file mode 100644 index 000000000..16e7e9805 --- /dev/null +++ b/design_introspection-plugin/tests/get_ports/get_ports.golden.txt @@ -0,0 +1,10 @@ +signal_* ports quiet +signal_n signal_p +signal_* ports +signal_n signal_p +led ports with filter expression +led +Filtered ports +clk +All ports +clk led out_a out_b signal_n signal_p diff --git a/design_introspection-plugin/tests/get_ports/get_ports.tcl b/design_introspection-plugin/tests/get_ports/get_ports.tcl new file mode 100644 index 000000000..b71fd65b4 --- /dev/null +++ b/design_introspection-plugin/tests/get_ports/get_ports.tcl @@ -0,0 +1,33 @@ +yosys -import +plugin -i design_introspection +#Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog get_ports.v +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +help get_ports + +set fp [open "get_ports.txt" "w"] + +puts "\nsignal_* ports quiet" +puts $fp "signal_* ports quiet" +puts $fp [get_ports -quiet signal_*] + +puts "\nsignal_* ports" +puts $fp "signal_* ports" +puts $fp [get_ports signal_*] + +puts "\nled ports with filter expression" +puts $fp "led ports with filter expression" +puts $fp [get_ports -filter {mr_ff != true} led] + +puts "\nFiltered ports" +puts $fp "Filtered ports" +puts $fp [get_ports -filter {mr_ff == true || async_reg == true && dont_touch == true} ] + +puts "\nAll ports" +puts $fp "All ports" +puts $fp [get_ports] + +close $fp diff --git a/design_introspection-plugin/tests/get_ports/get_ports.v b/design_introspection-plugin/tests/get_ports/get_ports.v new file mode 100644 index 000000000..d40055b17 --- /dev/null +++ b/design_introspection-plugin/tests/get_ports/get_ports.v @@ -0,0 +1,75 @@ +module top ( + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2( + .I(LD6), + .O(signal_p), + .OB(signal_n), + .T(1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + From f5e6f26301fb3b4e65cc6ab055700766d57ad455 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 29 Sep 2020 17:46:38 +0200 Subject: [PATCH 191/845] Introspection: Use dedicated execute method for get_ports Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_ports.cc | 65 +++++++++---------- design_introspection-plugin/get_ports.h | 1 + .../tests/get_ports/get_ports.golden.txt | 14 ++-- .../tests/get_ports/get_ports.tcl | 50 ++++++++------ 4 files changed, 69 insertions(+), 61 deletions(-) diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index 241a00a4b..1eaad8bc9 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -27,37 +27,36 @@ void GetPorts::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); } } -/* void GetPorts::execute(std::vector args, RTLIL::Design* design) - * { */ -/* if (args.size() < 2) { */ -/* log_cmd_error("No port specified.\n"); */ -/* } */ -/* RTLIL::Module* top_module = design->top_module(); */ -/* if (top_module == nullptr) { */ -/* log_cmd_error("No top module detected\n"); */ -/* } */ -/* // TODO handle more than one port */ -/* std::string port_name = args.at(1); */ -/* std::string port_str(port_name.size(), '\0'); */ -/* int bit(0); */ -/* if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { */ -/* log_error("Couldn't find port %s\n", port_name.c_str()); */ -/* } */ -/* port_str.resize(strlen(port_str.c_str())); */ -/* RTLIL::IdString port_id(RTLIL::escape_id(port_str)); */ -/* Tcl_Interp* interp = yosys_get_tcl_interp(); */ -/* if (auto wire = top_module->wire(port_id)) { */ -/* if (wire->port_input || wire->port_output) { */ -/* if (bit >= wire->start_offset && */ -/* bit < wire->start_offset + wire->width) { */ -/* Tcl_Obj* tcl_string = Tcl_NewStringObj(port_name.c_str(), -1); - */ -/* Tcl_SetObjResult(interp, tcl_string); */ -/* log("Found port %s\n", port_name.c_str()); */ -/* return; */ -/* } */ -/* } */ -/* } */ -/* log_error("Couldn't find port %s\n", port_name.c_str()); */ -/* } */ +void GetPorts::execute(std::vector args, RTLIL::Design* design) { + if (args.size() < 2) { + log_cmd_error("No port specified.\n"); + } + RTLIL::Module* top_module = design->top_module(); + if (top_module == nullptr) { + log_cmd_error("No top module detected\n"); + } + // TODO handle more than one port + std::string port_name = args.at(1); + std::string port_str(port_name.size(), '\0'); + int bit(0); + if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { + log_error("Couldn't find port %s\n", port_name.c_str()); + } + + port_str.resize(strlen(port_str.c_str())); + RTLIL::IdString port_id(RTLIL::escape_id(port_str)); + Tcl_Interp* interp = yosys_get_tcl_interp(); + if (auto wire = top_module->wire(port_id)) { + if (wire->port_input || wire->port_output) { + if (bit >= wire->start_offset && + bit < wire->start_offset + wire->width) { + Tcl_Obj* tcl_string = Tcl_NewStringObj(port_name.c_str(), -1); + Tcl_SetObjResult(interp, tcl_string); + log("Found port %s\n", port_name.c_str()); + return; + } + } + } + log_error("Couldn't find port %s\n", port_name.c_str()); +} diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index eb8c0993e..f00dd5f01 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -12,6 +12,7 @@ struct GetPorts : public GetCmd { std::string SelectionType() override; void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, Filters& filters, bool is_quiet) override; + void execute(std::vector args, RTLIL::Design* design) override; }; #endif // GET_PORTS_H_ diff --git a/design_introspection-plugin/tests/get_ports/get_ports.golden.txt b/design_introspection-plugin/tests/get_ports/get_ports.golden.txt index 16e7e9805..d87ba55bf 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.golden.txt +++ b/design_introspection-plugin/tests/get_ports/get_ports.golden.txt @@ -1,10 +1,6 @@ -signal_* ports quiet -signal_n signal_p -signal_* ports -signal_n signal_p -led ports with filter expression -led -Filtered ports +signal_p port +signal_p +clk port clk -All ports -clk led out_a out_b signal_n signal_p +led[0] port +led[0] diff --git a/design_introspection-plugin/tests/get_ports/get_ports.tcl b/design_introspection-plugin/tests/get_ports/get_ports.tcl index b71fd65b4..1ac5903c0 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.tcl +++ b/design_introspection-plugin/tests/get_ports/get_ports.tcl @@ -10,24 +10,36 @@ help get_ports set fp [open "get_ports.txt" "w"] -puts "\nsignal_* ports quiet" -puts $fp "signal_* ports quiet" -puts $fp [get_ports -quiet signal_*] - -puts "\nsignal_* ports" -puts $fp "signal_* ports" -puts $fp [get_ports signal_*] - -puts "\nled ports with filter expression" -puts $fp "led ports with filter expression" -puts $fp [get_ports -filter {mr_ff != true} led] - -puts "\nFiltered ports" -puts $fp "Filtered ports" -puts $fp [get_ports -filter {mr_ff == true || async_reg == true && dont_touch == true} ] - -puts "\nAll ports" -puts $fp "All ports" -puts $fp [get_ports] +puts "\nsignal_p port" +puts $fp "signal_p port" +puts $fp [get_ports signal_p] + +puts "\nclk port" +puts $fp "clk port" +puts $fp [get_ports clk] + +puts {\nled[0] port} +puts $fp {led[0] port} +puts $fp [get_ports {led[0]}] + +#puts "\nsignal_* ports quiet" +#puts $fp "signal_* ports quiet" +#puts $fp [get_ports -quiet signal_*] +# +#puts "\nsignal_* ports" +#puts $fp "signal_* ports" +#puts $fp [get_ports signal_*] +# +#puts "\nled ports with filter expression" +#puts $fp "led ports with filter expression" +#puts $fp [get_ports -filter {mr_ff != true} led] +# +#puts "\nFiltered ports" +#puts $fp "Filtered ports" +#puts $fp [get_ports -filter {mr_ff == true || async_reg == true && dont_touch == true} ] +# +#puts "\nAll ports" +#puts $fp "All ports" +#puts $fp [get_ports] close $fp From 0fe8d2b5da5bf7e6f0ec8edfc677ad48f9f7a971 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 30 Sep 2020 09:10:14 +0200 Subject: [PATCH 192/845] Introspection: Add get_cells command Signed-off-by: Tomasz Michalak --- design_introspection-plugin/Makefile | 2 +- .../design_introspection.cc | 2 ++ design_introspection-plugin/get_cells.cc | 26 +++++++++++++++++++ design_introspection-plugin/get_cells.h | 17 ++++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 design_introspection-plugin/get_cells.cc create mode 100644 design_introspection-plugin/get_cells.h diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index c9b43b3a9..181effbae 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -5,7 +5,7 @@ LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins NAME = design_introspection -OBJS = $(NAME).o get_cmd.o get_nets.o get_ports.o +OBJS = $(NAME).o get_cmd.o get_nets.o get_ports.o get_cells.o $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc index 3ebebf931..c14ca80f2 100644 --- a/design_introspection-plugin/design_introspection.cc +++ b/design_introspection-plugin/design_introspection.cc @@ -20,6 +20,7 @@ #include "get_nets.h" #include "get_ports.h" +#include "get_cells.h" USING_YOSYS_NAMESPACE @@ -29,6 +30,7 @@ struct DesignIntrospection { DesignIntrospection(){} GetNets get_nets_cmd; GetPorts get_ports_cmd; + GetCells get_cells_cmd; } DesignIntrospection; diff --git a/design_introspection-plugin/get_cells.cc b/design_introspection-plugin/get_cells.cc new file mode 100644 index 000000000..8e9abe7fb --- /dev/null +++ b/design_introspection-plugin/get_cells.cc @@ -0,0 +1,26 @@ +#include "get_cells.h" + +USING_YOSYS_NAMESPACE + +std::string GetCells::TypeName() { return "cell"; } + +std::string GetCells::SelectionType() { return "c"; } + +void GetCells::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, + Filters& filters, bool is_quiet) { + for (auto cell : module->selected_cells()) { + if (filters.size() > 0) { + Filter filter = filters.at(0); + std::string attr_value = cell->get_string_attribute( + RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } + } + if (!is_quiet) { + log("%s ", id2cstr(cell->name)); + } + Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(cell->name), -1); + Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); + } +} diff --git a/design_introspection-plugin/get_cells.h b/design_introspection-plugin/get_cells.h new file mode 100644 index 000000000..ae7610bad --- /dev/null +++ b/design_introspection-plugin/get_cells.h @@ -0,0 +1,17 @@ +#ifndef _GET_CELLS_H_ +#define _GET_CELLS_H_ + +#include "get_cmd.h" + +USING_YOSYS_NAMESPACE + +struct GetCells : public GetCmd { + GetCells() : GetCmd("get_cells", "Print matching cells") {} + + std::string TypeName() override; + std::string SelectionType() override; + void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, + Filters& filters, bool is_quiet) override; +}; + +#endif // GET_CELLS_H_ From ee7cfac0a729726c01534a1ac49760a08d51c4af Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 30 Sep 2020 09:10:38 +0200 Subject: [PATCH 193/845] Introspection: Add test for get_cells Signed-off-by: Tomasz Michalak --- design_introspection-plugin/tests/Makefile | 3 +- .../tests/get_cells/get_cells.golden.txt | 15 ++++ .../tests/get_cells/get_cells.tcl | 33 ++++++++ .../tests/get_cells/get_cells.v | 77 +++++++++++++++++++ 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 design_introspection-plugin/tests/get_cells/get_cells.golden.txt create mode 100644 design_introspection-plugin/tests/get_cells/get_cells.tcl create mode 100644 design_introspection-plugin/tests/get_cells/get_cells.v diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index 6eed865ff..f89ce42d6 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -1,8 +1,9 @@ -TESTS = get_nets get_ports +TESTS = get_nets get_ports get_cells .PHONY: $(TESTS) get_nets_verify = $(call compare,get_nets,txt) get_ports_verify = $(call compare,get_ports,txt) +get_cells_verify = $(call compare,get_cells,txt) all: $(TESTS) compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) diff --git a/design_introspection-plugin/tests/get_cells/get_cells.golden.txt b/design_introspection-plugin/tests/get_cells/get_cells.golden.txt new file mode 100644 index 000000000..d33818de7 --- /dev/null +++ b/design_introspection-plugin/tests/get_cells/get_cells.golden.txt @@ -0,0 +1,15 @@ + +*inter* cells quiet +bottom_intermediate_inst.OBUF_8 + +*inter* cells +bottom_intermediate_inst.OBUF_8 + +*inter* cells with invalid filter expression +bottom_intermediate_inst.OBUF_8 + +Filtered cells +OBUFTDS_2 + +All cells +{$abc$2135$lut$not$aiger2134$1} {$auto$alumacc.cc:485:replace_alu$1469.slice[0].carry4_1st_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[0].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[1].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[1].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[2].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[2].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[3].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[3].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[4].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[4].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[5].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[5].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[6].carry4_part} {$auto$simplemap.cc:420:simplemap_dff$1476} {$auto$simplemap.cc:420:simplemap_dff$1477} {$auto$simplemap.cc:420:simplemap_dff$1478} {$auto$simplemap.cc:420:simplemap_dff$1479} {$auto$simplemap.cc:420:simplemap_dff$1480} {$auto$simplemap.cc:420:simplemap_dff$1481} {$auto$simplemap.cc:420:simplemap_dff$1482} {$auto$simplemap.cc:420:simplemap_dff$1483} {$auto$simplemap.cc:420:simplemap_dff$1484} {$auto$simplemap.cc:420:simplemap_dff$1485} {$auto$simplemap.cc:420:simplemap_dff$1486} {$auto$simplemap.cc:420:simplemap_dff$1487} {$auto$simplemap.cc:420:simplemap_dff$1488} {$auto$simplemap.cc:420:simplemap_dff$1489} {$auto$simplemap.cc:420:simplemap_dff$1490} {$auto$simplemap.cc:420:simplemap_dff$1491} {$auto$simplemap.cc:420:simplemap_dff$1492} {$auto$simplemap.cc:420:simplemap_dff$1493} {$auto$simplemap.cc:420:simplemap_dff$1494} {$auto$simplemap.cc:420:simplemap_dff$1495} {$auto$simplemap.cc:420:simplemap_dff$1496} {$auto$simplemap.cc:420:simplemap_dff$1497} {$auto$simplemap.cc:420:simplemap_dff$1498} {$auto$simplemap.cc:420:simplemap_dff$1499} {$auto$simplemap.cc:420:simplemap_dff$1500} {$auto$simplemap.cc:420:simplemap_dff$1501} {$iopadmap$top.clk} OBUFTDS_2 OBUF_6 OBUF_7 OBUF_OUT bottom_inst.OBUF_10 bottom_inst.OBUF_11 bottom_inst.OBUF_9 bottom_intermediate_inst.OBUF_8 diff --git a/design_introspection-plugin/tests/get_cells/get_cells.tcl b/design_introspection-plugin/tests/get_cells/get_cells.tcl new file mode 100644 index 000000000..861e6a954 --- /dev/null +++ b/design_introspection-plugin/tests/get_cells/get_cells.tcl @@ -0,0 +1,33 @@ +yosys -import +plugin -i design_introspection +#Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog get_cells.v +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + + +set fp [open "get_cells.txt" "w"] + +puts "\n*inter* cells quiet" +puts $fp "\n*inter* cells quiet" +puts $fp [get_cells -quiet *inter*] + +puts "\n*inter* cells" +puts $fp "\n*inter* cells" +puts $fp [get_cells *inter*] + +puts "\n*inter* cells with invalid filter expression" +puts $fp "\n*inter* cells with invalid filter expression" +puts $fp [get_cells -filter {mr_ff != true} *inter* ] + +puts "\nFiltered cells" +puts $fp "\nFiltered cells" +puts $fp [get_cells -filter {mr_ff == true || async_reg == true && dont_touch == true} ] + +puts "\nAll cells" +puts $fp "\nAll cells" +puts $fp [get_cells] + +close $fp diff --git a/design_introspection-plugin/tests/get_cells/get_cells.v b/design_introspection-plugin/tests/get_cells/get_cells.v new file mode 100644 index 000000000..e2af7fc58 --- /dev/null +++ b/design_introspection-plugin/tests/get_cells/get_cells.v @@ -0,0 +1,77 @@ +module top ( + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) + OBUFTDS OBUFTDS_2( + .I(LD6), + .O(signal_p), + .OB(signal_n), + .T(1'b1) + ); + (* async_reg = "false", mr_ff = "false", dont_touch = "true" *) + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6(.I(LD6), .O(led[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + From 6f9bbb0ae3bc6d3bf30186ba515ebcaa91817a51 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 30 Sep 2020 11:07:39 +0200 Subject: [PATCH 194/845] Introspection: Extract ExecuteSelection method Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_cmd.cc | 35 +++++++++++++------------- design_introspection-plugin/get_cmd.h | 5 ++++ 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/design_introspection-plugin/get_cmd.cc b/design_introspection-plugin/get_cmd.cc index 0dc6dc445..b9ab13b8f 100644 --- a/design_introspection-plugin/get_cmd.cc +++ b/design_introspection-plugin/get_cmd.cc @@ -30,9 +30,24 @@ void GetCmd::help() { log("\n"); } +void GetCmd::ExecuteSelection(RTLIL::Design* design, std::vector& args, size_t argidx, bool is_quiet) { + std::vector selection_args; + // Add name of top module to selection string + std::transform(args.begin() + argidx, args.end(), + std::back_inserter(selection_args), [&](std::string& obj) { + return RTLIL::unescape_id(design->top_module()->name) + "/" + + SelectionType() + ":" + obj; + }); + extra_args(selection_args, 0, design); + if (design->selected_modules().empty()) { + if (!is_quiet) { + log_warning("Specified %s not found in design\n", TypeName().c_str()); + } + } +} + void GetCmd::execute(std::vector args, RTLIL::Design* design) { - RTLIL::Module* top_module = design->top_module(); - if (top_module == nullptr) { + if (design->top_module() == nullptr) { log_cmd_error("No top module detected\n"); } @@ -94,21 +109,7 @@ void GetCmd::execute(std::vector args, RTLIL::Design* design) { break; } - // Add name of top module to selection string - std::vector selection_args; - std::transform(args.begin() + argidx, args.end(), - std::back_inserter(selection_args), [&](std::string& obj) { - return RTLIL::unescape_id(top_module->name) + - "/" + SelectionType() + ":" + obj; - }); - - // Execute the selection - extra_args(selection_args, 0, design); - if (design->selected_modules().empty()) { - if (!is_quiet) { - log_warning("Specified %s not found in design\n", TypeName().c_str()); - } - } + ExecuteSelection(design, args, argidx, is_quiet); // Pack the selected nets into Tcl List Tcl_Interp* interp = yosys_get_tcl_interp(); diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h index 078694ee8..0cfdaee3f 100644 --- a/design_introspection-plugin/get_cmd.h +++ b/design_introspection-plugin/get_cmd.h @@ -14,9 +14,14 @@ struct GetCmd : public Pass { void help() override; void execute(std::vector args, RTLIL::Design* design) override; + + private: virtual std::string TypeName() = 0; virtual std::string SelectionType() = 0; virtual void ExtractSelection(Tcl_Obj*, RTLIL::Module*, Filters&, bool) = 0; + virtual void ExecuteSelection(RTLIL::Design* design, + std::vector& args, size_t argidx, + bool is_quiet); }; #endif // GET_CMD_H_ From f20c8f82ef248d20a7c6554bfc3d5c0cac5c2ce1 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 1 Oct 2020 14:49:47 +0200 Subject: [PATCH 195/845] Introspection: Extract ParseCommand method Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_cells.cc | 8 ++-- design_introspection-plugin/get_cells.h | 2 +- design_introspection-plugin/get_cmd.cc | 56 ++++++++++++++---------- design_introspection-plugin/get_cmd.h | 16 +++++-- design_introspection-plugin/get_nets.cc | 8 ++-- design_introspection-plugin/get_nets.h | 2 +- design_introspection-plugin/get_ports.cc | 8 ++-- design_introspection-plugin/get_ports.h | 2 +- 8 files changed, 59 insertions(+), 43 deletions(-) diff --git a/design_introspection-plugin/get_cells.cc b/design_introspection-plugin/get_cells.cc index 8e9abe7fb..6c4f0c984 100644 --- a/design_introspection-plugin/get_cells.cc +++ b/design_introspection-plugin/get_cells.cc @@ -7,17 +7,17 @@ std::string GetCells::TypeName() { return "cell"; } std::string GetCells::SelectionType() { return "c"; } void GetCells::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - Filters& filters, bool is_quiet) { + const CommandArgs& args) { for (auto cell : module->selected_cells()) { - if (filters.size() > 0) { - Filter filter = filters.at(0); + if (args.filters.size() > 0) { + Filter filter = args.filters.at(0); std::string attr_value = cell->get_string_attribute( RTLIL::IdString(RTLIL::escape_id(filter.first))); if (attr_value.compare(filter.second)) { continue; } } - if (!is_quiet) { + if (!args.is_quiet) { log("%s ", id2cstr(cell->name)); } Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(cell->name), -1); diff --git a/design_introspection-plugin/get_cells.h b/design_introspection-plugin/get_cells.h index ae7610bad..48f6b3057 100644 --- a/design_introspection-plugin/get_cells.h +++ b/design_introspection-plugin/get_cells.h @@ -11,7 +11,7 @@ struct GetCells : public GetCmd { std::string TypeName() override; std::string SelectionType() override; void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - Filters& filters, bool is_quiet) override; + const CommandArgs& args) override; }; #endif // GET_CELLS_H_ diff --git a/design_introspection-plugin/get_cmd.cc b/design_introspection-plugin/get_cmd.cc index b9ab13b8f..3341b3c53 100644 --- a/design_introspection-plugin/get_cmd.cc +++ b/design_introspection-plugin/get_cmd.cc @@ -30,36 +30,44 @@ void GetCmd::help() { log("\n"); } -void GetCmd::ExecuteSelection(RTLIL::Design* design, std::vector& args, size_t argidx, bool is_quiet) { +void GetCmd::ExecuteSelection(RTLIL::Design* design, std::vector& raw_args, const CommandArgs& args) { std::vector selection_args; // Add name of top module to selection string - std::transform(args.begin() + argidx, args.end(), + std::transform(raw_args.begin() + args.current_args_idx, raw_args.end(), std::back_inserter(selection_args), [&](std::string& obj) { return RTLIL::unescape_id(design->top_module()->name) + "/" + SelectionType() + ":" + obj; }); extra_args(selection_args, 0, design); if (design->selected_modules().empty()) { - if (!is_quiet) { + if (!args.is_quiet) { log_warning("Specified %s not found in design\n", TypeName().c_str()); } } } -void GetCmd::execute(std::vector args, RTLIL::Design* design) { - if (design->top_module() == nullptr) { - log_cmd_error("No top module detected\n"); +void GetCmd::PackSelectionToTcl(RTLIL::Design* design, const CommandArgs& args) { + // Pack the selected nets into Tcl List + Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); + for (auto module : design->selected_modules()) { + ExtractSelection(tcl_list, module, args); } + if (!args.is_quiet) { + log("\n"); + } + Tcl_SetObjResult(yosys_get_tcl_interp(), tcl_list); +} +GetCmd::CommandArgs GetCmd::ParseCommand(const std::vector& args) { + CommandArgs parsed_args{.current_args_idx = 0, + .filters = Filters(), + .is_quiet = false, + .selection_objects = SelectionObjects()}; size_t argidx; - Filters filters; - bool is_quiet = false; - - // Parse command arguments for (argidx = 1; argidx < args.size(); argidx++) { std::string arg = args[argidx]; if (arg == "-quiet") { - is_quiet = true; + parsed_args.is_quiet = true; continue; } @@ -90,10 +98,10 @@ void GetCmd::execute(std::vector args, RTLIL::Design* design) { log_cmd_error("Incorrect filter expression: %s\n", args[argidx].c_str()); } - filters.emplace_back(filter.substr(0, separator), + parsed_args.filters.emplace_back(filter.substr(0, separator), filter.substr(separator + 2)); } - if (filters.size() > 1) { + if (parsed_args.filters.size() > 1) { log_warning( "Currently -filter switch supports only a single " "'equal(==)' condition expression, the rest will be " @@ -108,17 +116,17 @@ void GetCmd::execute(std::vector args, RTLIL::Design* design) { break; } + std::copy(args.begin() + argidx, args.end(), std::back_inserter(parsed_args.selection_objects)); + parsed_args.current_args_idx = argidx; + return parsed_args; +} - ExecuteSelection(design, args, argidx, is_quiet); - - // Pack the selected nets into Tcl List - Tcl_Interp* interp = yosys_get_tcl_interp(); - Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); - for (auto module : design->selected_modules()) { - ExtractSelection(tcl_list, module, filters, is_quiet); - } - if (!is_quiet) { - log("\n"); +void GetCmd::execute(std::vector args, RTLIL::Design* design) { + if (design->top_module() == nullptr) { + log_cmd_error("No top module detected\n"); } - Tcl_SetObjResult(interp, tcl_list); + + CommandArgs parsed_args(ParseCommand(args)); + ExecuteSelection(design, args, parsed_args); + PackSelectionToTcl(design, parsed_args); } diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h index 0cfdaee3f..70aaa5b52 100644 --- a/design_introspection-plugin/get_cmd.h +++ b/design_introspection-plugin/get_cmd.h @@ -8,6 +8,13 @@ USING_YOSYS_NAMESPACE struct GetCmd : public Pass { using Filter = std::pair; using Filters = std::vector; + using SelectionObjects = std::vector; + struct CommandArgs { + size_t current_args_idx; + Filters filters; + bool is_quiet; + SelectionObjects selection_objects; + }; GetCmd(const std::string& name, const std::string& description) : Pass(name, description) {} @@ -15,13 +22,14 @@ struct GetCmd : public Pass { void help() override; void execute(std::vector args, RTLIL::Design* design) override; - private: + protected: virtual std::string TypeName() = 0; virtual std::string SelectionType() = 0; - virtual void ExtractSelection(Tcl_Obj*, RTLIL::Module*, Filters&, bool) = 0; + CommandArgs ParseCommand(const std::vector& args); + virtual void ExtractSelection(Tcl_Obj*, RTLIL::Module*, const CommandArgs& args) {} virtual void ExecuteSelection(RTLIL::Design* design, - std::vector& args, size_t argidx, - bool is_quiet); + std::vector& raw_args, const CommandArgs& args); + virtual void PackSelectionToTcl(RTLIL::Design* design, const CommandArgs& args); }; #endif // GET_CMD_H_ diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc index d44eb630c..75adf910b 100644 --- a/design_introspection-plugin/get_nets.cc +++ b/design_introspection-plugin/get_nets.cc @@ -7,17 +7,17 @@ std::string GetNets::TypeName() { return "net"; } std::string GetNets::SelectionType() { return "w"; } void GetNets::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - Filters& filters, bool is_quiet) { + const CommandArgs& args) { for (auto wire : module->selected_wires()) { - if (filters.size() > 0) { - Filter filter = filters.at(0); + if (args.filters.size() > 0) { + Filter filter = args.filters.at(0); std::string attr_value = wire->get_string_attribute( RTLIL::IdString(RTLIL::escape_id(filter.first))); if (attr_value.compare(filter.second)) { continue; } } - if (!is_quiet) { + if (!args.is_quiet) { log("%s ", id2cstr(wire->name)); } Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); diff --git a/design_introspection-plugin/get_nets.h b/design_introspection-plugin/get_nets.h index 8af0b9fd4..bd0f453d7 100644 --- a/design_introspection-plugin/get_nets.h +++ b/design_introspection-plugin/get_nets.h @@ -11,7 +11,7 @@ struct GetNets : public GetCmd { std::string TypeName() override; std::string SelectionType() override; void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - Filters& filters, bool is_quiet) override; + const CommandArgs& args) override; }; #endif // GET_NETS_H_ diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index 1eaad8bc9..ccc422a39 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -7,20 +7,20 @@ std::string GetPorts::TypeName() { return "port"; } std::string GetPorts::SelectionType() { return "x"; } void GetPorts::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - GetCmd::Filters& filters, bool is_quiet) { + const CommandArgs& args) { for (auto wire : module->selected_wires()) { if (!wire->port_input and !wire->port_output) { continue; } - if (filters.size() > 0) { - Filter filter = filters.at(0); + if (args.filters.size() > 0) { + Filter filter = args.filters.at(0); std::string attr_value = wire->get_string_attribute( RTLIL::IdString(RTLIL::escape_id(filter.first))); if (attr_value.compare(filter.second)) { continue; } } - if (!is_quiet) { + if (!args.is_quiet) { log("%s ", id2cstr(wire->name)); } Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index f00dd5f01..70c4996c5 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -11,7 +11,7 @@ struct GetPorts : public GetCmd { std::string TypeName() override; std::string SelectionType() override; void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - Filters& filters, bool is_quiet) override; + const CommandArgs& args) override; void execute(std::vector args, RTLIL::Design* design) override; }; From 67a93b536ca674d9913ed843da7d58b902c7052c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 2 Oct 2020 10:53:23 +0200 Subject: [PATCH 196/845] Introspection: Cleanup get_ports command Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_ports.cc | 22 ---------------------- design_introspection-plugin/get_ports.h | 2 -- 2 files changed, 24 deletions(-) diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index ccc422a39..0476ef1d0 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -6,28 +6,6 @@ std::string GetPorts::TypeName() { return "port"; } std::string GetPorts::SelectionType() { return "x"; } -void GetPorts::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - const CommandArgs& args) { - for (auto wire : module->selected_wires()) { - if (!wire->port_input and !wire->port_output) { - continue; - } - if (args.filters.size() > 0) { - Filter filter = args.filters.at(0); - std::string attr_value = wire->get_string_attribute( - RTLIL::IdString(RTLIL::escape_id(filter.first))); - if (attr_value.compare(filter.second)) { - continue; - } - } - if (!args.is_quiet) { - log("%s ", id2cstr(wire->name)); - } - Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); - Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); - } -} - void GetPorts::execute(std::vector args, RTLIL::Design* design) { if (args.size() < 2) { log_cmd_error("No port specified.\n"); diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index 70c4996c5..a06bc5330 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -10,8 +10,6 @@ struct GetPorts : public GetCmd { std::string TypeName() override; std::string SelectionType() override; - void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - const CommandArgs& args) override; void execute(std::vector args, RTLIL::Design* design) override; }; From 6556bcee55780df4492cb1c8501d58b24aa3eda5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 2 Oct 2020 10:54:00 +0200 Subject: [PATCH 197/845] Introspection: Add get_pins command Signed-off-by: Tomasz Michalak --- design_introspection-plugin/Makefile | 2 +- .../design_introspection.cc | 2 + design_introspection-plugin/get_pins.cc | 63 +++++++++++++++++++ design_introspection-plugin/get_pins.h | 21 +++++++ 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 design_introspection-plugin/get_pins.cc create mode 100644 design_introspection-plugin/get_pins.h diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index 181effbae..296f5cd0f 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -5,7 +5,7 @@ LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins NAME = design_introspection -OBJS = $(NAME).o get_cmd.o get_nets.o get_ports.o get_cells.o +OBJS = $(NAME).o get_cmd.o get_nets.o get_ports.o get_cells.o get_pins.o $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc index c14ca80f2..5982a99c0 100644 --- a/design_introspection-plugin/design_introspection.cc +++ b/design_introspection-plugin/design_introspection.cc @@ -21,6 +21,7 @@ #include "get_nets.h" #include "get_ports.h" #include "get_cells.h" +#include "get_pins.h" USING_YOSYS_NAMESPACE @@ -31,6 +32,7 @@ struct DesignIntrospection { GetNets get_nets_cmd; GetPorts get_ports_cmd; GetCells get_cells_cmd; + GetPins get_pins_cmd; } DesignIntrospection; diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc new file mode 100644 index 000000000..ef6e88796 --- /dev/null +++ b/design_introspection-plugin/get_pins.cc @@ -0,0 +1,63 @@ +#include "get_pins.h" + +USING_YOSYS_NAMESPACE + +std::string GetPins::TypeName() { return "pin"; } + +std::string GetPins::SelectionType() { return "c"; } + +void GetPins::execute(std::vector args, RTLIL::Design* design) { + if (design->top_module() == nullptr) { + log_cmd_error("No top module detected\n"); + } + + CommandArgs parsed_args(ParseCommand(args)); + Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); + for (auto obj : parsed_args.selection_objects) { + size_t port_separator = obj.find_last_of("/"); + std::string cell = obj.substr(0, port_separator); + std::string port = obj.substr(port_separator + 1); + SelectionObjects selection{RTLIL::unescape_id(design->top_module()->name) + "/" + + SelectionType() + ":" + cell}; + extra_args(selection, 0, design); + ExtractSingleSelection(tcl_list, design, port, parsed_args); + } + if (!parsed_args.is_quiet) { + log("\n"); + } + Tcl_SetObjResult(yosys_get_tcl_interp(), tcl_list); +} + +void GetPins::ExtractSingleSelection(Tcl_Obj* tcl_list, RTLIL::Design* design, + const std::string& port_name, + const CommandArgs& args) { + if (design->selected_modules().empty()) { + if (!args.is_quiet) { + log_warning("Specified %s not found in design\n", + TypeName().c_str()); + } + } + for (auto module : design->selected_modules()) { + for (auto cell : module->selected_cells()) { + if (!cell->hasPort(RTLIL::escape_id(port_name))) { + continue; + } + if (args.filters.size() > 0) { + Filter filter = args.filters.at(0); + std::string attr_value = cell->get_string_attribute( + RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } + } + std::string pin_name(RTLIL::unescape_id(cell->name) + "/" + port_name); + if (!args.is_quiet) { + log("%s ", pin_name.c_str()); + } + Tcl_Obj* value_obj = Tcl_NewStringObj(pin_name.c_str(), -1); + Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, + value_obj); + } + } +} + diff --git a/design_introspection-plugin/get_pins.h b/design_introspection-plugin/get_pins.h new file mode 100644 index 000000000..0a7e90e7c --- /dev/null +++ b/design_introspection-plugin/get_pins.h @@ -0,0 +1,21 @@ +#ifndef _GET_PINS_H_ +#define _GET_PINS_H_ + +#include "get_cmd.h" + +USING_YOSYS_NAMESPACE + +struct GetPins : public GetCmd { + GetPins() : GetCmd("get_pins", "Print matching pins") {} + + std::string TypeName() override; + std::string SelectionType() override; + void execute(std::vector args, RTLIL::Design* design) override; + + private: + void ExtractSingleSelection(Tcl_Obj* tcl_list, RTLIL::Design* design, + const std::string& port_name, + const CommandArgs& args); +}; + +#endif // GET_PINS_H_ From 1616443ec886b9b8575ce2d35b9d7b35dd2aafb1 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 2 Oct 2020 11:08:47 +0200 Subject: [PATCH 198/845] Introspection: Add test for get_pins command Signed-off-by: Tomasz Michalak --- design_introspection-plugin/tests/Makefile | 3 +- .../tests/get_pins/get_pins.golden.txt | 12 +++ .../tests/get_pins/get_pins.tcl | 29 +++++++ .../tests/get_pins/get_pins.v | 76 +++++++++++++++++++ 4 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 design_introspection-plugin/tests/get_pins/get_pins.golden.txt create mode 100644 design_introspection-plugin/tests/get_pins/get_pins.tcl create mode 100644 design_introspection-plugin/tests/get_pins/get_pins.v diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index f89ce42d6..7f51d0f9c 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -1,9 +1,10 @@ -TESTS = get_nets get_ports get_cells +TESTS = get_nets get_ports get_cells get_pins .PHONY: $(TESTS) get_nets_verify = $(call compare,get_nets,txt) get_ports_verify = $(call compare,get_ports,txt) get_cells_verify = $(call compare,get_cells,txt) +get_pins_verify = $(call compare,get_pins,txt) all: $(TESTS) compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) diff --git a/design_introspection-plugin/tests/get_pins/get_pins.golden.txt b/design_introspection-plugin/tests/get_pins/get_pins.golden.txt new file mode 100644 index 000000000..b92d21a97 --- /dev/null +++ b/design_introspection-plugin/tests/get_pins/get_pins.golden.txt @@ -0,0 +1,12 @@ + +*inter* pins quiet +OBUF_6/I + +*inter* pins +OBUF_6/I + +*inter* pins with invalid filter expression +bottom_intermediate_inst.OBUF_8/I + +Filtered pins +OBUF_7/I OBUF_OUT/I diff --git a/design_introspection-plugin/tests/get_pins/get_pins.tcl b/design_introspection-plugin/tests/get_pins/get_pins.tcl new file mode 100644 index 000000000..144d453ef --- /dev/null +++ b/design_introspection-plugin/tests/get_pins/get_pins.tcl @@ -0,0 +1,29 @@ +yosys -import +plugin -i design_introspection +#Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog get_pins.v +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp + + +set fp [open "get_pins.txt" "w"] + +puts "\n*inter* pins quiet" +puts $fp "\n*inter* pins quiet" +puts $fp [get_pins -quiet OBUF_6/I] + +puts "\n*inter* pins" +puts $fp "\n*inter* pins" +puts $fp [get_pins OBUF_6/I] + +puts "\n*inter* pins with invalid filter expression" +puts $fp "\n*inter* pins with invalid filter expression" +puts $fp [get_pins -filter {mr_ff != true} *inter*/I ] + +puts "\nFiltered pins" +puts $fp "\nFiltered pins" +puts $fp [get_pins -filter {dont_touch == true || async_reg == true && mr_ff == true} *OBUF*/I ] + +close $fp diff --git a/design_introspection-plugin/tests/get_pins/get_pins.v b/design_introspection-plugin/tests/get_pins/get_pins.v new file mode 100644 index 000000000..bf081295f --- /dev/null +++ b/design_introspection-plugin/tests/get_pins/get_pins.v @@ -0,0 +1,76 @@ +module top ( + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2( + .I(LD6), + .O(signal_p), + .OB(signal_n), + .T(1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6((* test_attr = "true" *) .I(LD6), .O(led[0])); + (* dont_touch = "true" *) OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7(.I(LD7), .O(inter_wire_2)); + (* dont_touch = "true" *) OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT(.I(LD7), .O(out_a)); + bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); + bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); +endmodule + +(* async_reg = "true", mr_ff = "false", dont_touch = "true" *) +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9(.I(I), .O(O)); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10(.I(I), .O(OB[0])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11(.I(I), .O(OB[1])); +endmodule + From 98487112a48d9953a2ae11ea40f8425b80cd8e84 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 2 Oct 2020 11:32:52 +0200 Subject: [PATCH 199/845] Introspection: Refactor ExecuteSelection to use CommandArgs only Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_cmd.cc | 14 ++++++-------- design_introspection-plugin/get_cmd.h | 3 +-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/design_introspection-plugin/get_cmd.cc b/design_introspection-plugin/get_cmd.cc index 3341b3c53..74f8989f2 100644 --- a/design_introspection-plugin/get_cmd.cc +++ b/design_introspection-plugin/get_cmd.cc @@ -30,11 +30,11 @@ void GetCmd::help() { log("\n"); } -void GetCmd::ExecuteSelection(RTLIL::Design* design, std::vector& raw_args, const CommandArgs& args) { +void GetCmd::ExecuteSelection(RTLIL::Design* design, const CommandArgs& args) { std::vector selection_args; // Add name of top module to selection string - std::transform(raw_args.begin() + args.current_args_idx, raw_args.end(), - std::back_inserter(selection_args), [&](std::string& obj) { + std::transform(args.selection_objects.begin(), args.selection_objects.end(), + std::back_inserter(selection_args), [&](const std::string& obj) { return RTLIL::unescape_id(design->top_module()->name) + "/" + SelectionType() + ":" + obj; }); @@ -59,11 +59,10 @@ void GetCmd::PackSelectionToTcl(RTLIL::Design* design, const CommandArgs& args) } GetCmd::CommandArgs GetCmd::ParseCommand(const std::vector& args) { - CommandArgs parsed_args{.current_args_idx = 0, - .filters = Filters(), + CommandArgs parsed_args{.filters = Filters(), .is_quiet = false, .selection_objects = SelectionObjects()}; - size_t argidx; + size_t argidx(0); for (argidx = 1; argidx < args.size(); argidx++) { std::string arg = args[argidx]; if (arg == "-quiet") { @@ -117,7 +116,6 @@ GetCmd::CommandArgs GetCmd::ParseCommand(const std::vector& args) { break; } std::copy(args.begin() + argidx, args.end(), std::back_inserter(parsed_args.selection_objects)); - parsed_args.current_args_idx = argidx; return parsed_args; } @@ -127,6 +125,6 @@ void GetCmd::execute(std::vector args, RTLIL::Design* design) { } CommandArgs parsed_args(ParseCommand(args)); - ExecuteSelection(design, args, parsed_args); + ExecuteSelection(design, parsed_args); PackSelectionToTcl(design, parsed_args); } diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h index 70aaa5b52..5eb295b68 100644 --- a/design_introspection-plugin/get_cmd.h +++ b/design_introspection-plugin/get_cmd.h @@ -10,7 +10,6 @@ struct GetCmd : public Pass { using Filters = std::vector; using SelectionObjects = std::vector; struct CommandArgs { - size_t current_args_idx; Filters filters; bool is_quiet; SelectionObjects selection_objects; @@ -28,7 +27,7 @@ struct GetCmd : public Pass { CommandArgs ParseCommand(const std::vector& args); virtual void ExtractSelection(Tcl_Obj*, RTLIL::Module*, const CommandArgs& args) {} virtual void ExecuteSelection(RTLIL::Design* design, - std::vector& raw_args, const CommandArgs& args); + const CommandArgs& args); virtual void PackSelectionToTcl(RTLIL::Design* design, const CommandArgs& args); }; From d00c8ce33ba56e0e6cc08f8134283af5542dda58 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 2 Oct 2020 14:28:51 +0200 Subject: [PATCH 200/845] Introspection: Refactor the way selection is extracted Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_cells.cc | 31 ++++++++++--------- design_introspection-plugin/get_cells.h | 2 +- design_introspection-plugin/get_cmd.cc | 38 ++++++++++++++---------- design_introspection-plugin/get_cmd.h | 8 +++-- design_introspection-plugin/get_nets.cc | 32 +++++++++++--------- design_introspection-plugin/get_nets.h | 4 +-- design_introspection-plugin/get_pins.cc | 4 +++ design_introspection-plugin/get_pins.h | 5 ++-- design_introspection-plugin/get_ports.cc | 4 +++ design_introspection-plugin/get_ports.h | 3 ++ 10 files changed, 79 insertions(+), 52 deletions(-) diff --git a/design_introspection-plugin/get_cells.cc b/design_introspection-plugin/get_cells.cc index 6c4f0c984..3cdc0b454 100644 --- a/design_introspection-plugin/get_cells.cc +++ b/design_introspection-plugin/get_cells.cc @@ -6,21 +6,24 @@ std::string GetCells::TypeName() { return "cell"; } std::string GetCells::SelectionType() { return "c"; } -void GetCells::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - const CommandArgs& args) { - for (auto cell : module->selected_cells()) { - if (args.filters.size() > 0) { - Filter filter = args.filters.at(0); - std::string attr_value = cell->get_string_attribute( - RTLIL::IdString(RTLIL::escape_id(filter.first))); - if (attr_value.compare(filter.second)) { - continue; +GetCells::SelectionObjects GetCells::ExtractSelection(RTLIL::Design* design, const CommandArgs& args) { + SelectionObjects selected_objects; + for (auto module : design->selected_modules()) { + for (auto cell : module->selected_cells()) { + if (args.filters.size() > 0) { + Filter filter = args.filters.at(0); + std::string attr_value = cell->get_string_attribute( + RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } } + std::string object_name(RTLIL::unescape_id(cell->name)); + if (!args.is_quiet) { + log("%s ", object_name.c_str()); + } + selected_objects.push_back(object_name); } - if (!args.is_quiet) { - log("%s ", id2cstr(cell->name)); - } - Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(cell->name), -1); - Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); } + return selected_objects; } diff --git a/design_introspection-plugin/get_cells.h b/design_introspection-plugin/get_cells.h index 48f6b3057..3412a72f9 100644 --- a/design_introspection-plugin/get_cells.h +++ b/design_introspection-plugin/get_cells.h @@ -10,7 +10,7 @@ struct GetCells : public GetCmd { std::string TypeName() override; std::string SelectionType() override; - void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, + SelectionObjects ExtractSelection(RTLIL::Design* design, const CommandArgs& args) override; }; diff --git a/design_introspection-plugin/get_cmd.cc b/design_introspection-plugin/get_cmd.cc index 74f8989f2..470788e61 100644 --- a/design_introspection-plugin/get_cmd.cc +++ b/design_introspection-plugin/get_cmd.cc @@ -34,28 +34,33 @@ void GetCmd::ExecuteSelection(RTLIL::Design* design, const CommandArgs& args) { std::vector selection_args; // Add name of top module to selection string std::transform(args.selection_objects.begin(), args.selection_objects.end(), - std::back_inserter(selection_args), [&](const std::string& obj) { - return RTLIL::unescape_id(design->top_module()->name) + "/" + - SelectionType() + ":" + obj; + std::back_inserter(selection_args), + [&](const std::string& obj) { + return RTLIL::unescape_id(design->top_module()->name) + + "/" + SelectionType() + ":" + obj; }); extra_args(selection_args, 0, design); if (design->selected_modules().empty()) { if (!args.is_quiet) { - log_warning("Specified %s not found in design\n", TypeName().c_str()); + log_warning("Specified %s not found in design\n", + TypeName().c_str()); } } } -void GetCmd::PackSelectionToTcl(RTLIL::Design* design, const CommandArgs& args) { - // Pack the selected nets into Tcl List - Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); - for (auto module : design->selected_modules()) { - ExtractSelection(tcl_list, module, args); - } - if (!args.is_quiet) { - log("\n"); +void GetCmd::PackToTcl(const SelectionObjects& objects) { + Tcl_Obj* tcl_result; + if (objects.size() == 1) { + tcl_result = Tcl_NewStringObj(objects.at(0).c_str(), -1); + } else { + tcl_result = Tcl_NewListObj(0, NULL); + for (const auto& object : objects) { + Tcl_Obj* value_obj = Tcl_NewStringObj(object.c_str(), -1); + Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_result, + value_obj); + } } - Tcl_SetObjResult(yosys_get_tcl_interp(), tcl_list); + Tcl_SetObjResult(yosys_get_tcl_interp(), tcl_result); } GetCmd::CommandArgs GetCmd::ParseCommand(const std::vector& args) { @@ -98,7 +103,7 @@ GetCmd::CommandArgs GetCmd::ParseCommand(const std::vector& args) { args[argidx].c_str()); } parsed_args.filters.emplace_back(filter.substr(0, separator), - filter.substr(separator + 2)); + filter.substr(separator + 2)); } if (parsed_args.filters.size() > 1) { log_warning( @@ -115,7 +120,8 @@ GetCmd::CommandArgs GetCmd::ParseCommand(const std::vector& args) { break; } - std::copy(args.begin() + argidx, args.end(), std::back_inserter(parsed_args.selection_objects)); + std::copy(args.begin() + argidx, args.end(), + std::back_inserter(parsed_args.selection_objects)); return parsed_args; } @@ -126,5 +132,5 @@ void GetCmd::execute(std::vector args, RTLIL::Design* design) { CommandArgs parsed_args(ParseCommand(args)); ExecuteSelection(design, parsed_args); - PackSelectionToTcl(design, parsed_args); + PackToTcl(ExtractSelection(design, parsed_args)); } diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h index 5eb295b68..d3d524b9f 100644 --- a/design_introspection-plugin/get_cmd.h +++ b/design_introspection-plugin/get_cmd.h @@ -22,13 +22,15 @@ struct GetCmd : public Pass { void execute(std::vector args, RTLIL::Design* design) override; protected: + CommandArgs ParseCommand(const std::vector& args); + void PackToTcl(const SelectionObjects& objects); + + private: virtual std::string TypeName() = 0; virtual std::string SelectionType() = 0; - CommandArgs ParseCommand(const std::vector& args); - virtual void ExtractSelection(Tcl_Obj*, RTLIL::Module*, const CommandArgs& args) {} + virtual SelectionObjects ExtractSelection(RTLIL::Design* design, const CommandArgs& args) = 0; virtual void ExecuteSelection(RTLIL::Design* design, const CommandArgs& args); - virtual void PackSelectionToTcl(RTLIL::Design* design, const CommandArgs& args); }; #endif // GET_CMD_H_ diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc index 75adf910b..504bb8732 100644 --- a/design_introspection-plugin/get_nets.cc +++ b/design_introspection-plugin/get_nets.cc @@ -6,21 +6,25 @@ std::string GetNets::TypeName() { return "net"; } std::string GetNets::SelectionType() { return "w"; } -void GetNets::ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - const CommandArgs& args) { - for (auto wire : module->selected_wires()) { - if (args.filters.size() > 0) { - Filter filter = args.filters.at(0); - std::string attr_value = wire->get_string_attribute( - RTLIL::IdString(RTLIL::escape_id(filter.first))); - if (attr_value.compare(filter.second)) { - continue; +GetNets::SelectionObjects GetNets::ExtractSelection(RTLIL::Design* design, + const CommandArgs& args) { + SelectionObjects selected_objects; + for (auto module : design->selected_modules()) { + for (auto wire : module->selected_wires()) { + if (args.filters.size() > 0) { + Filter filter = args.filters.at(0); + std::string attr_value = wire->get_string_attribute( + RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } } + std::string object_name(RTLIL::unescape_id(wire->name)); + if (!args.is_quiet) { + log("%s ", object_name.c_str()); + } + selected_objects.push_back(object_name); } - if (!args.is_quiet) { - log("%s ", id2cstr(wire->name)); - } - Tcl_Obj* value_obj = Tcl_NewStringObj(id2cstr(wire->name), -1); - Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); } + return selected_objects; } diff --git a/design_introspection-plugin/get_nets.h b/design_introspection-plugin/get_nets.h index bd0f453d7..ab738a15a 100644 --- a/design_introspection-plugin/get_nets.h +++ b/design_introspection-plugin/get_nets.h @@ -10,8 +10,8 @@ struct GetNets : public GetCmd { std::string TypeName() override; std::string SelectionType() override; - void ExtractSelection(Tcl_Obj* tcl_list, RTLIL::Module* module, - const CommandArgs& args) override; + SelectionObjects ExtractSelection(RTLIL::Design* design, + const CommandArgs& args) override; }; #endif // GET_NETS_H_ diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc index ef6e88796..f57662dba 100644 --- a/design_introspection-plugin/get_pins.cc +++ b/design_introspection-plugin/get_pins.cc @@ -28,6 +28,10 @@ void GetPins::execute(std::vector args, RTLIL::Design* design) { Tcl_SetObjResult(yosys_get_tcl_interp(), tcl_list); } +GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design* design, const CommandArgs& args) { + return SelectionObjects(); +} + void GetPins::ExtractSingleSelection(Tcl_Obj* tcl_list, RTLIL::Design* design, const std::string& port_name, const CommandArgs& args) { diff --git a/design_introspection-plugin/get_pins.h b/design_introspection-plugin/get_pins.h index 0a7e90e7c..ab5bf7549 100644 --- a/design_introspection-plugin/get_pins.h +++ b/design_introspection-plugin/get_pins.h @@ -8,11 +8,12 @@ USING_YOSYS_NAMESPACE struct GetPins : public GetCmd { GetPins() : GetCmd("get_pins", "Print matching pins") {} + private: std::string TypeName() override; std::string SelectionType() override; void execute(std::vector args, RTLIL::Design* design) override; - - private: + SelectionObjects ExtractSelection(RTLIL::Design* design, + const CommandArgs& args) override; void ExtractSingleSelection(Tcl_Obj* tcl_list, RTLIL::Design* design, const std::string& port_name, const CommandArgs& args); diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index 0476ef1d0..8c60712c2 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -6,6 +6,10 @@ std::string GetPorts::TypeName() { return "port"; } std::string GetPorts::SelectionType() { return "x"; } +GetPorts::SelectionObjects GetPorts::ExtractSelection(RTLIL::Design* design, const CommandArgs& args) { + return SelectionObjects(); +} + void GetPorts::execute(std::vector args, RTLIL::Design* design) { if (args.size() < 2) { log_cmd_error("No port specified.\n"); diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index a06bc5330..7a66d6d9b 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -8,9 +8,12 @@ USING_YOSYS_NAMESPACE struct GetPorts : public GetCmd { GetPorts() : GetCmd("get_ports", "Print matching ports") {} + private: std::string TypeName() override; std::string SelectionType() override; void execute(std::vector args, RTLIL::Design* design) override; + SelectionObjects ExtractSelection(RTLIL::Design* design, + const CommandArgs& args) override; }; #endif // GET_PORTS_H_ From 7fedb884c3b3c6cdafc61188f883e84aae2b26a5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 2 Oct 2020 16:28:49 +0200 Subject: [PATCH 201/845] Introspection: Refactor get_ports and get_pins commands Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_pins.cc | 29 ++++++++------------ design_introspection-plugin/get_pins.h | 6 ++-- design_introspection-plugin/get_ports.cc | 35 +++++++++++------------- design_introspection-plugin/get_ports.h | 4 ++- 4 files changed, 34 insertions(+), 40 deletions(-) diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc index f57662dba..aa557e815 100644 --- a/design_introspection-plugin/get_pins.cc +++ b/design_introspection-plugin/get_pins.cc @@ -6,33 +6,28 @@ std::string GetPins::TypeName() { return "pin"; } std::string GetPins::SelectionType() { return "c"; } -void GetPins::execute(std::vector args, RTLIL::Design* design) { - if (design->top_module() == nullptr) { - log_cmd_error("No top module detected\n"); - } +void GetPins::ExecuteSelection([[gnu::unused]] RTLIL::Design* design, + [[gnu::unused]] const CommandArgs& args) { +} - CommandArgs parsed_args(ParseCommand(args)); - Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); - for (auto obj : parsed_args.selection_objects) { +GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design* design, const CommandArgs& args) { + SelectionObjects selection_objects; + for (auto obj : args.selection_objects) { size_t port_separator = obj.find_last_of("/"); std::string cell = obj.substr(0, port_separator); std::string port = obj.substr(port_separator + 1); SelectionObjects selection{RTLIL::unescape_id(design->top_module()->name) + "/" + SelectionType() + ":" + cell}; extra_args(selection, 0, design); - ExtractSingleSelection(tcl_list, design, port, parsed_args); + ExtractSingleSelection(selection_objects, design, port, args); } - if (!parsed_args.is_quiet) { + if (!args.is_quiet) { log("\n"); } - Tcl_SetObjResult(yosys_get_tcl_interp(), tcl_list); -} - -GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design* design, const CommandArgs& args) { - return SelectionObjects(); + return selection_objects; } -void GetPins::ExtractSingleSelection(Tcl_Obj* tcl_list, RTLIL::Design* design, +void GetPins::ExtractSingleSelection(SelectionObjects& objects, RTLIL::Design* design, const std::string& port_name, const CommandArgs& args) { if (design->selected_modules().empty()) { @@ -58,9 +53,7 @@ void GetPins::ExtractSingleSelection(Tcl_Obj* tcl_list, RTLIL::Design* design, if (!args.is_quiet) { log("%s ", pin_name.c_str()); } - Tcl_Obj* value_obj = Tcl_NewStringObj(pin_name.c_str(), -1); - Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, - value_obj); + objects.push_back(pin_name); } } } diff --git a/design_introspection-plugin/get_pins.h b/design_introspection-plugin/get_pins.h index ab5bf7549..57a619d3b 100644 --- a/design_introspection-plugin/get_pins.h +++ b/design_introspection-plugin/get_pins.h @@ -11,10 +11,12 @@ struct GetPins : public GetCmd { private: std::string TypeName() override; std::string SelectionType() override; - void execute(std::vector args, RTLIL::Design* design) override; SelectionObjects ExtractSelection(RTLIL::Design* design, const CommandArgs& args) override; - void ExtractSingleSelection(Tcl_Obj* tcl_list, RTLIL::Design* design, + void ExecuteSelection(RTLIL::Design* design, + const CommandArgs& args) override; + void ExtractSingleSelection(SelectionObjects& objects, + RTLIL::Design* design, const std::string& port_name, const CommandArgs& args); }; diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index 8c60712c2..be9e7f30a 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -6,20 +6,13 @@ std::string GetPorts::TypeName() { return "port"; } std::string GetPorts::SelectionType() { return "x"; } -GetPorts::SelectionObjects GetPorts::ExtractSelection(RTLIL::Design* design, const CommandArgs& args) { - return SelectionObjects(); +void GetPorts::ExecuteSelection([[gnu::unused]] RTLIL::Design* design, + [[gnu::unused]] const CommandArgs& args) { } -void GetPorts::execute(std::vector args, RTLIL::Design* design) { - if (args.size() < 2) { - log_cmd_error("No port specified.\n"); - } - RTLIL::Module* top_module = design->top_module(); - if (top_module == nullptr) { - log_cmd_error("No top module detected\n"); - } - // TODO handle more than one port - std::string port_name = args.at(1); +GetPorts::SelectionObjects GetPorts::ExtractSelection(RTLIL::Design* design, + const CommandArgs& args) { + std::string port_name = args.selection_objects.at(0); std::string port_str(port_name.size(), '\0'); int bit(0); if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { @@ -28,17 +21,21 @@ void GetPorts::execute(std::vector args, RTLIL::Design* design) { port_str.resize(strlen(port_str.c_str())); RTLIL::IdString port_id(RTLIL::escape_id(port_str)); - Tcl_Interp* interp = yosys_get_tcl_interp(); - if (auto wire = top_module->wire(port_id)) { + SelectionObjects objects; + if (auto wire = design->top_module()->wire(port_id)) { if (wire->port_input || wire->port_output) { if (bit >= wire->start_offset && bit < wire->start_offset + wire->width) { - Tcl_Obj* tcl_string = Tcl_NewStringObj(port_name.c_str(), -1); - Tcl_SetObjResult(interp, tcl_string); - log("Found port %s\n", port_name.c_str()); - return; + objects.push_back(port_name); + if (!args.is_quiet) { + log("%s ", port_name.c_str()); + } } } } - log_error("Couldn't find port %s\n", port_name.c_str()); + if (objects.size() == 0 and !args.is_quiet) { + log_error("Couldn't find port %s\n", port_name.c_str()); + } + return objects; } + diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index 7a66d6d9b..4e66b366d 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -11,9 +11,11 @@ struct GetPorts : public GetCmd { private: std::string TypeName() override; std::string SelectionType() override; - void execute(std::vector args, RTLIL::Design* design) override; + /* void execute(std::vector args, RTLIL::Design* design) override; */ SelectionObjects ExtractSelection(RTLIL::Design* design, const CommandArgs& args) override; + void ExecuteSelection(RTLIL::Design* design, + const CommandArgs& args) override; }; #endif // GET_PORTS_H_ From 33f53b017962778e30feb3bea08edf9d162170b4 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 8 Oct 2020 11:15:37 +0200 Subject: [PATCH 202/845] Introspection: Use plugin test Makefile template Signed-off-by: Tomasz Michalak --- design_introspection-plugin/tests/Makefile | 42 +++++----------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index 7f51d0f9c..fcca1e904 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -1,35 +1,11 @@ -TESTS = get_nets get_ports get_cells get_pins -.PHONY: $(TESTS) +TESTS = get_nets \ + get_ports \ + get_cells \ + get_pins -get_nets_verify = $(call compare,get_nets,txt) -get_ports_verify = $(call compare,get_ports,txt) -get_cells_verify = $(call compare,get_cells,txt) -get_pins_verify = $(call compare,get_pins,txt) +include $(shell pwd)/../../Makefile_test.common -all: $(TESTS) -compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) - -define test_tpl = -$(1): $(1)/$(1).sdc - $$($(1)_verify) - RETVAL=$$$$? ; \ - if [ $$$$RETVAL -eq 0 ]; then \ - echo "$(1) PASS"; \ - true; \ - else \ - echo "$(1) FAIL"; \ - false; \ - fi - -$(1)/$(1).sdc: $(1)/$(1).v - cd $(1); \ - INPUT_SDC_FILE=$(1).input.sdc \ - OUTPUT_SDC_FILE=$(1).sdc \ - yosys -p "tcl $(1).tcl" -l yosys.log - -endef - -$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) - -clean: - rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/yosys.log) +get_nets_verify = $(call diff_test,get_nets,txt) +get_ports_verify = $(call diff_test,get_ports,txt) +get_cells_verify = $(call diff_test,get_cells,txt) +get_pins_verify = $(call diff_test,get_pins,txt) From 0143df2eb18d09b587aa286f964b5adb64b46e20 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 13 Oct 2020 09:23:35 +0200 Subject: [PATCH 203/845] Introspection: Update Makefile Signed-off-by: Tomasz Michalak --- design_introspection-plugin/Makefile | 33 +++++++--------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index 296f5cd0f..85a605a90 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -1,26 +1,9 @@ -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -LDFLAGS = $(shell yosys-config --ldflags) -LDLIBS = $(shell yosys-config --ldlibs) -PLUGINS_DIR = $(shell yosys-config --datdir)/plugins - NAME = design_introspection -OBJS = $(NAME).o get_cmd.o get_nets.o get_ports.o get_cells.o get_pins.o - -$(NAME).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) - -install_plugin: $(NAME).so - mkdir -p $(PLUGINS_DIR) - cp $< $(PLUGINS_DIR)/$< - -test: - $(MAKE) -C tests all - -.PHONY: install -install: install_plugin - -clean: - rm -f *.d *.o *.so - $(MAKE) -C tests clean - +SOURCES = design_introspection.cc \ + get_cmd.cc \ + get_nets.cc \ + get_ports.cc \ + get_cells.cc \ + get_pins.cc + +include ../Makefile_plugin.common From 61121943a1183937178e87f9d1b564030f647979 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 13 Oct 2020 11:38:14 +0200 Subject: [PATCH 204/845] Introspection: Don't print warnings with quiet switch Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_cells.cc | 6 +++--- design_introspection-plugin/get_nets.cc | 6 +++--- design_introspection-plugin/get_pins.cc | 13 +++++-------- design_introspection-plugin/get_ports.cc | 5 +---- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/design_introspection-plugin/get_cells.cc b/design_introspection-plugin/get_cells.cc index 3cdc0b454..ba414de69 100644 --- a/design_introspection-plugin/get_cells.cc +++ b/design_introspection-plugin/get_cells.cc @@ -19,11 +19,11 @@ GetCells::SelectionObjects GetCells::ExtractSelection(RTLIL::Design* design, con } } std::string object_name(RTLIL::unescape_id(cell->name)); - if (!args.is_quiet) { - log("%s ", object_name.c_str()); - } selected_objects.push_back(object_name); } } + if (selected_objects.size() == 0 and !args.is_quiet) { + log_warning("Couldn't find matching cell.\n"); + } return selected_objects; } diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc index 504bb8732..15cdb1df1 100644 --- a/design_introspection-plugin/get_nets.cc +++ b/design_introspection-plugin/get_nets.cc @@ -20,11 +20,11 @@ GetNets::SelectionObjects GetNets::ExtractSelection(RTLIL::Design* design, } } std::string object_name(RTLIL::unescape_id(wire->name)); - if (!args.is_quiet) { - log("%s ", object_name.c_str()); - } selected_objects.push_back(object_name); } } + if (selected_objects.size() == 0 and !args.is_quiet) { + log_warning("Couldn't find matching net.\n"); + } return selected_objects; } diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc index aa557e815..3bedf62ed 100644 --- a/design_introspection-plugin/get_pins.cc +++ b/design_introspection-plugin/get_pins.cc @@ -11,7 +11,7 @@ void GetPins::ExecuteSelection([[gnu::unused]] RTLIL::Design* design, } GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design* design, const CommandArgs& args) { - SelectionObjects selection_objects; + SelectionObjects selected_objects; for (auto obj : args.selection_objects) { size_t port_separator = obj.find_last_of("/"); std::string cell = obj.substr(0, port_separator); @@ -19,12 +19,12 @@ GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design* design, const SelectionObjects selection{RTLIL::unescape_id(design->top_module()->name) + "/" + SelectionType() + ":" + cell}; extra_args(selection, 0, design); - ExtractSingleSelection(selection_objects, design, port, args); + ExtractSingleSelection(selected_objects, design, port, args); } - if (!args.is_quiet) { - log("\n"); + if (selected_objects.size() == 0 and !args.is_quiet) { + log_warning("Couldn't find matching pin.\n"); } - return selection_objects; + return selected_objects; } void GetPins::ExtractSingleSelection(SelectionObjects& objects, RTLIL::Design* design, @@ -50,9 +50,6 @@ void GetPins::ExtractSingleSelection(SelectionObjects& objects, RTLIL::Design* d } } std::string pin_name(RTLIL::unescape_id(cell->name) + "/" + port_name); - if (!args.is_quiet) { - log("%s ", pin_name.c_str()); - } objects.push_back(pin_name); } } diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index be9e7f30a..d6f326f78 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -27,14 +27,11 @@ GetPorts::SelectionObjects GetPorts::ExtractSelection(RTLIL::Design* design, if (bit >= wire->start_offset && bit < wire->start_offset + wire->width) { objects.push_back(port_name); - if (!args.is_quiet) { - log("%s ", port_name.c_str()); - } } } } if (objects.size() == 0 and !args.is_quiet) { - log_error("Couldn't find port %s\n", port_name.c_str()); + log_warning("Couldn't find port matching %s\n", port_name.c_str()); } return objects; } From 3c0de498016ea3fd2affe20a597880ceea437c68 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 13 Oct 2020 13:48:15 +0200 Subject: [PATCH 205/845] Introspection: Add some comments and fix formatting Signed-off-by: Tomasz Michalak --- design_introspection-plugin/get_cmd.cc | 2 ++ design_introspection-plugin/get_pins.cc | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/design_introspection-plugin/get_cmd.cc b/design_introspection-plugin/get_cmd.cc index 470788e61..4b54ded6b 100644 --- a/design_introspection-plugin/get_cmd.cc +++ b/design_introspection-plugin/get_cmd.cc @@ -84,6 +84,8 @@ GetCmd::CommandArgs GetCmd::ParseCommand(const std::vector& args) { filter_arg.end()); // Parse filters + // TODO Add support for multiple condition expression + // Currently only a single == is supported std::regex filter_attr_regex("(\\w+\\s?==\\s?\\w+)([(||)(&&)]*)"); std::regex_token_iterator regex_end; std::regex_token_iterator matches( diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc index 3bedf62ed..65c54f85a 100644 --- a/design_introspection-plugin/get_pins.cc +++ b/design_introspection-plugin/get_pins.cc @@ -6,18 +6,21 @@ std::string GetPins::TypeName() { return "pin"; } std::string GetPins::SelectionType() { return "c"; } -void GetPins::ExecuteSelection([[gnu::unused]] RTLIL::Design* design, - [[gnu::unused]] const CommandArgs& args) { +void GetPins::ExecuteSelection(RTLIL::Design* design, const CommandArgs& args) { + (void)design; + (void)args; } -GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design* design, const CommandArgs& args) { +GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design* design, + const CommandArgs& args) { SelectionObjects selected_objects; for (auto obj : args.selection_objects) { size_t port_separator = obj.find_last_of("/"); std::string cell = obj.substr(0, port_separator); std::string port = obj.substr(port_separator + 1); - SelectionObjects selection{RTLIL::unescape_id(design->top_module()->name) + "/" + - SelectionType() + ":" + cell}; + SelectionObjects selection{ + RTLIL::unescape_id(design->top_module()->name) + "/" + + SelectionType() + ":" + cell}; extra_args(selection, 0, design); ExtractSingleSelection(selected_objects, design, port, args); } @@ -27,7 +30,8 @@ GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design* design, const return selected_objects; } -void GetPins::ExtractSingleSelection(SelectionObjects& objects, RTLIL::Design* design, +void GetPins::ExtractSingleSelection(SelectionObjects& objects, + RTLIL::Design* design, const std::string& port_name, const CommandArgs& args) { if (design->selected_modules().empty()) { @@ -49,7 +53,8 @@ void GetPins::ExtractSingleSelection(SelectionObjects& objects, RTLIL::Design* d continue; } } - std::string pin_name(RTLIL::unescape_id(cell->name) + "/" + port_name); + std::string pin_name(RTLIL::unescape_id(cell->name) + "/" + + port_name); objects.push_back(pin_name); } } From 4bc78f22c007b6b7eab9e8bf5ec22273bb33a326 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 13 Oct 2020 14:40:45 +0200 Subject: [PATCH 206/845] Introspection: Add license headers Signed-off-by: Tomasz Michalak --- .../design_introspection.cc | 2 +- design_introspection-plugin/get_cells.cc | 19 +++++++++++++++++++ design_introspection-plugin/get_cells.h | 19 +++++++++++++++++++ design_introspection-plugin/get_cmd.h | 19 +++++++++++++++++++ design_introspection-plugin/get_nets.cc | 19 +++++++++++++++++++ design_introspection-plugin/get_nets.h | 19 +++++++++++++++++++ design_introspection-plugin/get_pins.cc | 19 +++++++++++++++++++ design_introspection-plugin/get_pins.h | 19 +++++++++++++++++++ design_introspection-plugin/get_ports.cc | 19 +++++++++++++++++++ design_introspection-plugin/get_ports.h | 19 +++++++++++++++++++ 10 files changed, 172 insertions(+), 1 deletion(-) diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc index 5982a99c0..64fdbbc76 100644 --- a/design_introspection-plugin/design_introspection.cc +++ b/design_introspection-plugin/design_introspection.cc @@ -2,7 +2,7 @@ * yosys -- Yosys Open SYnthesis Suite * * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2019 The Symbiflow Authors + * Copyright (C) 2020 The Symbiflow Authors * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/design_introspection-plugin/get_cells.cc b/design_introspection-plugin/get_cells.cc index ba414de69..937545d2f 100644 --- a/design_introspection-plugin/get_cells.cc +++ b/design_introspection-plugin/get_cells.cc @@ -1,3 +1,22 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ #include "get_cells.h" USING_YOSYS_NAMESPACE diff --git a/design_introspection-plugin/get_cells.h b/design_introspection-plugin/get_cells.h index 3412a72f9..205d50b36 100644 --- a/design_introspection-plugin/get_cells.h +++ b/design_introspection-plugin/get_cells.h @@ -1,3 +1,22 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ #ifndef _GET_CELLS_H_ #define _GET_CELLS_H_ diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h index d3d524b9f..983a50d23 100644 --- a/design_introspection-plugin/get_cmd.h +++ b/design_introspection-plugin/get_cmd.h @@ -1,3 +1,22 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ #ifndef _GET_CMD_H_ #define _GET_CMD_H_ diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc index 15cdb1df1..db5d3759b 100644 --- a/design_introspection-plugin/get_nets.cc +++ b/design_introspection-plugin/get_nets.cc @@ -1,3 +1,22 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ #include "get_nets.h" USING_YOSYS_NAMESPACE diff --git a/design_introspection-plugin/get_nets.h b/design_introspection-plugin/get_nets.h index ab738a15a..11f7502a5 100644 --- a/design_introspection-plugin/get_nets.h +++ b/design_introspection-plugin/get_nets.h @@ -1,3 +1,22 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ #ifndef _GET_NETS_H_ #define _GET_NETS_H_ diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc index 65c54f85a..d39f6bcfe 100644 --- a/design_introspection-plugin/get_pins.cc +++ b/design_introspection-plugin/get_pins.cc @@ -1,3 +1,22 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ #include "get_pins.h" USING_YOSYS_NAMESPACE diff --git a/design_introspection-plugin/get_pins.h b/design_introspection-plugin/get_pins.h index 57a619d3b..f7ebe14d7 100644 --- a/design_introspection-plugin/get_pins.h +++ b/design_introspection-plugin/get_pins.h @@ -1,3 +1,22 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ #ifndef _GET_PINS_H_ #define _GET_PINS_H_ diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index d6f326f78..ef29b95b8 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -1,3 +1,22 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ #include "get_ports.h" USING_YOSYS_NAMESPACE diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index 4e66b366d..89ba49ad7 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -1,3 +1,22 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ #ifndef _GET_PORTS_H_ #define _GET_PORTS_H_ From 17d5d6d3c6f294065bd68f31eb8f083a13910d34 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 19 Oct 2020 15:29:58 +0200 Subject: [PATCH 207/845] SDC: Add -through switch to set_false_path command Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc_writer.cc | 3 +++ sdc-plugin/sdc_writer.h | 1 + sdc-plugin/set_false_path.cc | 15 ++++++++++++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index e4076f889..4c7ae57ed 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -71,6 +71,9 @@ void SdcWriter::WriteFalsePaths(std::ostream& file) { if (!path.from_pin.empty()) { file << " -from " << path.from_pin; } + if (!path.through_pin.empty()) { + file << " -through " << path.through_pin; + } if (!path.to_pin.empty()) { file << " -to " << path.to_pin; } diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h index 05a8dea2b..9bcbcf100 100644 --- a/sdc-plugin/sdc_writer.h +++ b/sdc-plugin/sdc_writer.h @@ -25,6 +25,7 @@ USING_YOSYS_NAMESPACE struct FalsePath { std::string from_pin; std::string to_pin; + std::string through_pin; }; struct TimingPath { diff --git a/sdc-plugin/set_false_path.cc b/sdc-plugin/set_false_path.cc index 72bb41c6e..18262d0c2 100644 --- a/sdc-plugin/set_false_path.cc +++ b/sdc-plugin/set_false_path.cc @@ -41,6 +41,9 @@ void SetFalsePath::help() { log(" -to\n"); log(" List of end points or clocks.\n"); log("\n"); + log(" -through\n"); + log(" List of through points or clocks.\n"); + log("\n"); } void SetFalsePath::execute(std::vector args, @@ -54,6 +57,7 @@ void SetFalsePath::execute(std::vector args, bool is_quiet = false; std::string from_pin; std::string to_pin; + std::string through_pin; // Parse command arguments for (argidx = 1; argidx < args.size(); argidx++) { @@ -65,13 +69,16 @@ void SetFalsePath::execute(std::vector args, if (arg == "-from" and argidx + 1 < args.size()) { from_pin = args[++argidx]; - log("From: %s\n", from_pin.c_str()); continue; } if (arg == "-to" and argidx + 1 < args.size()) { to_pin = args[++argidx]; - log("To: %s\n", to_pin.c_str()); + continue; + } + + if (arg == "-through" and argidx + 1 < args.size()) { + through_pin = args[++argidx]; continue; } @@ -83,8 +90,10 @@ void SetFalsePath::execute(std::vector args, } if (!is_quiet) { std::string msg = (from_pin.empty()) ? "" : "-from " + from_pin; + msg += (through_pin.empty()) ? "" : " -through " + through_pin; msg += (to_pin.empty()) ? "" : " -to " + to_pin; log("Adding false path %s\n", msg.c_str()); } - sdc_writer_.AddFalsePath(FalsePath{.from_pin = from_pin, .to_pin = to_pin}); + sdc_writer_.AddFalsePath(FalsePath{ + .from_pin = from_pin, .to_pin = to_pin, .through_pin = through_pin}); } From c7e908bdd14b20faa85fe122cbe103d0d4fefcfd Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 19 Oct 2020 15:31:05 +0200 Subject: [PATCH 208/845] SDC: Add -through pin case for set_false_path command test Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/set_false_path/set_false_path.golden.sdc | 1 + sdc-plugin/tests/set_false_path/set_false_path.tcl | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sdc-plugin/tests/set_false_path/set_false_path.golden.sdc b/sdc-plugin/tests/set_false_path/set_false_path.golden.sdc index 4e75de4ba..b90bd9b31 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.golden.sdc +++ b/sdc-plugin/tests/set_false_path/set_false_path.golden.sdc @@ -1,3 +1,4 @@ set_false_path -to inter_wire set_false_path -from clk set_false_path -from clk -to bottom_inst.I +set_false_path -through bottom_inst.I diff --git a/sdc-plugin/tests/set_false_path/set_false_path.tcl b/sdc-plugin/tests/set_false_path/set_false_path.tcl index a4e01f4c3..ae1446974 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.tcl +++ b/sdc-plugin/tests/set_false_path/set_false_path.tcl @@ -16,4 +16,7 @@ set_false_path -quiet -from clk # -from clk to bottom_inst/I set_false_path -from clk -to bottom_inst.I +# -through bottom_inst/I +set_false_path -through bottom_inst.I + write_sdc $::env(DESIGN_TOP).sdc From ac9c3a7ee89fe0cc8e57b58b84369ff5b5f0c17a Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 21 Oct 2020 14:04:01 +0200 Subject: [PATCH 209/845] SDC: Attach CLOCK_SIGNAL and PERIOD attributes to wires Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 104 ++++++++++++++++---------------------- sdc-plugin/clocks.h | 14 ++--- sdc-plugin/propagation.cc | 42 ++++++++------- sdc-plugin/propagation.h | 6 +-- sdc-plugin/sdc.cc | 4 +- sdc-plugin/sdc_writer.cc | 18 ++++++- sdc-plugin/sdc_writer.h | 3 +- 7 files changed, 94 insertions(+), 97 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index c177f6aeb..bbad62cda 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -32,19 +32,8 @@ void Clocks::AddClock(const std::string& name, std::vector wires, void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { - auto clock = - std::find_if(clocks_.begin(), clocks_.end(), - [&](Clock& clock) { return clock.Name() == name; }); - if (clock != clocks_.end()) { - log("Clock %s already exists and will be overwritten\n", name.c_str()); - clock->UpdateClock(wire, period, rising_edge, falling_edge); - } else { - rising_edge = fmod(rising_edge, period); - falling_edge = fmod(falling_edge, period); - clocks_.emplace_back(name, wire, period, rising_edge, falling_edge); - log("Added clock %s with period %f, rising_edge:%f, falling_edge:%f\n", name.c_str(), - period, rising_edge, falling_edge); - } + wire->set_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL"), "yes"); + wire->set_string_attribute(RTLIL::escape_id("PERIOD"), std::to_string(period)); } void Clocks::AddClock(Clock& clock) { @@ -52,6 +41,20 @@ void Clocks::AddClock(Clock& clock) { clock.RisingEdge(), clock.FallingEdge()); } +const std::vector Clocks::GetClocks(RTLIL::Design* design) { + std::vector clock_wires; + RTLIL::Module* top_module = design->top_module(); + for (auto& wire_obj : top_module->wires_) { + auto& wire = wire_obj.second; + if (wire->has_attribute(RTLIL::escape_id("CLOCK_SIGNAL"))) { + if (wire->get_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL")) == "yes") { + clock_wires.push_back(wire); + } + } + } + return clock_wires; +} + std::vector Clocks::GetClockNames() { std::vector res; for (auto clock : clocks_) { @@ -69,61 +72,62 @@ std::vector Clocks::GetClockNames() { return res; } -void Clocks::Propagate(NaturalPropagation* pass) { +void Clocks::Propagate(RTLIL::Design* design, NaturalPropagation* pass) { #ifdef SDC_DEBUG log("Start natural clock propagation\n"); #endif - for (auto clock : clocks_) { + for (auto& clock_wire : Clocks::GetClocks(design)) { #ifdef SDC_DEBUG - log("Processing clock %s\n", clock.Name().c_str()); + log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); #endif - auto clock_wires = clock.GetClockWires(); - for (auto clock_wire : clock_wires) { - auto aliases = pass->FindAliasWires(clock_wire); - AddClock(clock.Name(), aliases, clock.Period(), - clock.RisingEdge(), clock.FallingEdge()); - } + auto aliases = pass->FindAliasWires(clock_wire); + /* AddClock(clock.Name(), aliases, clock.Period(), */ + /* clock.RisingEdge(), clock.FallingEdge()); */ } #ifdef SDC_DEBUG log("Finish natural clock propagation\n\n"); #endif } -void Clocks::Propagate(BufferPropagation* pass) { +void Clocks::Propagate(RTLIL::Design* design, BufferPropagation* pass) { #ifdef SDC_DEBUG log("Start buffer clock propagation\n"); log("IBUF pass\n"); #endif - std::vector clocks(clocks_); - for (auto clock : clocks) { + for (auto& clock_wire : Clocks::GetClocks(design)) { #ifdef SDC_DEBUG - log("Processing clock %s\n", clock.Name().c_str()); + log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); #endif - PropagateThroughBuffer(pass, clock, IBuf()); + auto period = std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); + auto clock = Clock(clock_wire, period, 0, period/2); + PropagateThroughBuffer(pass, design, clock, IBuf()); } #ifdef SDC_DEBUG log("BUFG pass\n"); #endif - clocks = clocks_; - for (auto clock : clocks) { + for (auto& clock_wire : Clocks::GetClocks(design)) { #ifdef SDC_DEBUG - log("Processing clock %s\n", clock.Name().c_str()); + log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); #endif - PropagateThroughBuffer(pass, clock, Bufg()); + auto period = std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); + auto clock = Clock(clock_wire, period, 0, period/2); + PropagateThroughBuffer(pass, design, clock, Bufg()); } #ifdef SDC_DEBUG log("Finish buffer clock propagation\n\n"); #endif } -void Clocks::Propagate(ClockDividerPropagation* pass) { +void Clocks::Propagate(RTLIL::Design* design, ClockDividerPropagation* pass) { #ifdef SDC_DEBUG log("Start clock divider clock propagation\n"); #endif - for (auto clock : clocks_) { + for (auto& clock_wire : Clocks::GetClocks(design)) { #ifdef SDC_DEBUG - log("Processing clock %s\n", clock.Name().c_str()); + log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); #endif + auto period = std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); + auto clock = Clock(clock_wire, period, 0, period/2); auto pll_clocks = pass->FindSinkClocksForCellType(clock, "PLLE2_ADV"); for (auto pll_clock : pll_clocks) { @@ -131,7 +135,7 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { log("PLL clock: %s\n", pll_clock.Name().c_str()); #endif AddClock(pll_clock); - PropagateThroughBuffer(pass, pll_clock, Bufg()); + PropagateThroughBuffer(pass, design, pll_clock, Bufg()); } } #ifdef SDC_DEBUG @@ -139,12 +143,11 @@ void Clocks::Propagate(ClockDividerPropagation* pass) { #endif } -void Clocks::PropagateThroughBuffer(Propagation* pass, Clock& clock, +void Clocks::PropagateThroughBuffer(Propagation* pass, RTLIL::Design* design, Clock& clock, Buffer buffer) { - auto clock_wires = clock.GetClockWires(); - for (auto clock_wire : clock_wires) { + for (auto& clock_wire : Clocks::GetClocks(design)) { #ifdef SDC_DEBUG - log("Clock wire %s\n", RTLIL::unescape_id(clock_wire->name).c_str()); + log("Clock wire %s\n", RTLIL::id2cstr(clock_wire->name)); #endif auto buf_wires = pass->FindSinkWiresForCellType(clock_wire, buffer.name, buffer.output); @@ -152,7 +155,7 @@ void Clocks::PropagateThroughBuffer(Propagation* pass, Clock& clock, for (auto wire : buf_wires) { #ifdef SDC_DEBUG log("%s wire: %s\n", buffer.name.c_str(), - RTLIL::unescape_id(wire->name).c_str()); + RTLIL::id2cstr(wire->name)); #endif path_delay += buffer.delay; AddClock(RTLIL::unescape_id(wire->name), wire, clock.Period(), @@ -162,27 +165,6 @@ void Clocks::PropagateThroughBuffer(Propagation* pass, Clock& clock, } } -void Clocks::WriteSdc(std::ostream& file) { - for (auto& clock : clocks_) { - auto clock_wires = clock.GetClockWires(); - // FIXME: Input port nets are not found in VPR - if (std::all_of(clock_wires.begin(), clock_wires.end(), - [&](RTLIL::Wire* wire) { return wire->port_input; })) { - continue; - } - file << "create_clock -period " << clock.Period(); - file << " -waveform {" << clock.RisingEdge() << " " - << clock.FallingEdge() << "}"; - for (auto clock_wire : clock_wires) { - if (clock_wire->port_input) { - continue; - } - file << " " << Clock::ClockWireName(clock_wire); - } - file << std::endl; - } -} - Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) : name_(name), diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 67ca272cb..114cee3cd 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -42,6 +42,7 @@ class Clock { float Period() { return period_; } float RisingEdge() { return rising_edge_; } float FallingEdge() { return falling_edge_; } + RTLIL::Wire* ClockWire() { return clock_wire_; } void UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); static std::string ClockWireName(RTLIL::Wire* wire); @@ -49,6 +50,7 @@ class Clock { private: std::string name_; std::vector clock_wires_; + RTLIL::Wire* clock_wire_; float period_; float rising_edge_; float falling_edge_; @@ -66,17 +68,17 @@ class Clocks { float rising_edge, float falling_edge); void AddClock(Clock& clock); std::vector GetClockNames(); - void Propagate(NaturalPropagation* pass); - void Propagate(BufferPropagation* pass); - void Propagate(ClockDividerPropagation* pass); - void WriteSdc(std::ostream& file); + void Propagate(RTLIL::Design* design, NaturalPropagation* pass); + void Propagate(RTLIL::Design* design, BufferPropagation* pass); + void Propagate(RTLIL::Design* design, ClockDividerPropagation* pass); const std::vector GetClocks() { - return clocks_; + return std::vector(); } + static const std::vector GetClocks(RTLIL::Design* design); private: std::vector clocks_; - void PropagateThroughBuffer(Propagation* pass, Clock& clock, + void PropagateThroughBuffer(Propagation* pass, RTLIL::Design* design, Clock& clock, Buffer buffer); }; diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index e741e1afa..3ea35addd 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -40,29 +40,27 @@ std::vector NaturalPropagation::FindAliasWires( std::vector ClockDividerPropagation::FindSinkClocksForCellType( Clock driving_clock, const std::string& cell_type) { std::vector clocks; - auto clock_wires = driving_clock.GetClockWires(); - for (auto clock_wire : clock_wires) { - if (cell_type == "PLLE2_ADV") { - RTLIL::Cell* cell = NULL; - for (auto input : Pll::inputs) { - cell = FindSinkCellOnPort(clock_wire, input); - if (cell and RTLIL::unescape_id(cell->type) == cell_type) { - break; - } + auto clock_wire = driving_clock.ClockWire(); + if (cell_type == "PLLE2_ADV") { + RTLIL::Cell* cell = NULL; + for (auto input : Pll::inputs) { + cell = FindSinkCellOnPort(clock_wire, input); + if (cell and RTLIL::unescape_id(cell->type) == cell_type) { + break; } - if (!cell) { - return clocks; - } - Pll pll(cell, driving_clock.Period(), driving_clock.RisingEdge()); - for (auto output : Pll::outputs) { - RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); - if (wire) { - float clkout_period(pll.clkout_period.at(output)); - float clkout_rising_edge(pll.clkout_rising_edge.at(output)); - float clkout_falling_edge(pll.clkout_falling_edge.at(output)); - Clock clock(wire, clkout_period, clkout_rising_edge, clkout_falling_edge); - clocks.push_back(clock); - } + } + if (!cell) { + return clocks; + } + Pll pll(cell, driving_clock.Period(), driving_clock.RisingEdge()); + for (auto output : Pll::outputs) { + RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); + if (wire) { + float clkout_period(pll.clkout_period.at(output)); + float clkout_rising_edge(pll.clkout_rising_edge.at(output)); + float clkout_falling_edge(pll.clkout_falling_edge.at(output)); + Clock clock(wire, clkout_period, clkout_rising_edge, clkout_falling_edge); + clocks.push_back(clock); } } } diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 677406277..0e45211c3 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -48,7 +48,7 @@ class NaturalPropagation : public Propagation { NaturalPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} - void Run(Clocks& clocks) override { clocks.Propagate(this); } + void Run(Clocks& clocks) override { clocks.Propagate(design_, this); } std::vector FindAliasWires(RTLIL::Wire* wire); }; @@ -57,7 +57,7 @@ class BufferPropagation : public Propagation { BufferPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} - void Run(Clocks& clocks) override { clocks.Propagate(this); } + void Run(Clocks& clocks) override { clocks.Propagate(design_, this); } }; class ClockDividerPropagation : public Propagation { @@ -65,7 +65,7 @@ class ClockDividerPropagation : public Propagation { ClockDividerPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} - void Run(Clocks& clocks) override { clocks.Propagate(this); } + void Run(Clocks& clocks) override { clocks.Propagate(design_, this); } std::vector FindSinkClocksForCellType(Clock driver_wire, const std::string& cell_type); }; diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index c138b04f0..00692be90 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -73,13 +73,13 @@ struct WriteSdcCmd : public Backend { } void execute(std::ostream*& f, std::string filename, - std::vector args, RTLIL::Design*) override { + std::vector args, RTLIL::Design* design) override { if (args.size() < 2) { log_cmd_error("Missing output file.\n"); } log("\nWriting out clock constraints file(SDC)\n"); extra_args(f, filename, args, 1); - sdc_writer_.WriteSdc(clocks_, *f); + sdc_writer_.WriteSdc(design, *f); } Clocks& clocks_; diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index 4c7ae57ed..69980974b 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -37,13 +37,27 @@ void SdcWriter::AddClockGroup(ClockGroups::ClockGroup clock_group, ClockGroups:: clock_groups_.Add(clock_group, relation); } -void SdcWriter::WriteSdc(Clocks& clocks, std::ostream& file) { - WriteClocks(clocks, file); +void SdcWriter::WriteSdc(RTLIL::Design* design, std::ostream& file) { + WriteClocks(design, file); WriteFalsePaths(file); WriteMaxDelay(file); WriteClockGroups(file); } +void SdcWriter::WriteClocks(RTLIL::Design* design, std::ostream& file) { + for (auto& clock_wire : Clocks::GetClocks(design)) { + // FIXME: Input port nets are not found in VPR + if (clock_wire->port_input) { + continue; + } + file << "create_clock -period " << clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD")); + /* file << " -waveform {" << clock.RisingEdge() << " " */ + /* << clock.FallingEdge() << "}"; */ + file << " " << RTLIL::unescape_id(clock_wire->name); + file << std::endl; + } +} + void SdcWriter::WriteClocks(Clocks& clocks, std::ostream& file) { for (auto clock : clocks.GetClocks()) { auto clock_wires = clock.GetClockWires(); diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h index 9bcbcf100..c6ea149ab 100644 --- a/sdc-plugin/sdc_writer.h +++ b/sdc-plugin/sdc_writer.h @@ -61,10 +61,11 @@ class SdcWriter { void AddFalsePath(FalsePath false_path); void SetMaxDelay(TimingPath timing_path); void AddClockGroup(ClockGroups::ClockGroup clock_group, ClockGroups::ClockGroupRelation relation); - void WriteSdc(Clocks& clocks, std::ostream& file); + void WriteSdc(RTLIL::Design* design, std::ostream& file); private: void WriteClocks(Clocks& clocks, std::ostream& file); + void WriteClocks(RTLIL::Design* design, std::ostream& file); void WriteFalsePaths(std::ostream& file); void WriteMaxDelay(std::ostream& file); void WriteClockGroups(std::ostream& file); From 35edbd524fe3fa27e629c76278326f1f820cbb4d Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 22 Oct 2020 11:24:30 +0200 Subject: [PATCH 210/845] SDC: Remove Clocks class from get_clocks Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 00692be90..b66a287dc 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -184,8 +184,8 @@ struct CreateClockCmd : public Pass { }; struct GetClocksCmd : public Pass { - GetClocksCmd(Clocks& clocks) - : Pass("get_clocks", "Create clock object"), clocks_(clocks) {} + GetClocksCmd() + : Pass("get_clocks", "Create clock object") {} void help() override { log("\n"); @@ -195,22 +195,24 @@ struct GetClocksCmd : public Pass { log("\n"); } - void execute(__attribute__((unused)) std::vector args, - __attribute__((unused)) RTLIL::Design* design) override { - std::vector clock_names(clocks_.GetClockNames()); - if (clock_names.size() == 0) { + void execute(std::vector args, + RTLIL::Design* design) override { + if (args.size() > 1) { + log_warning("Command doesn't support arguments, so they will be ignored.\n"); + } + std::vector clock_wires(Clocks::GetClocks(design)); + if (clock_wires.size() == 0) { log_warning("No clocks found in design\n"); } Tcl_Interp* interp = yosys_get_tcl_interp(); Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); - for (auto name : clock_names) { - Tcl_Obj* name_obj = Tcl_NewStringObj(name.c_str(), name.size()); + for (auto wire : clock_wires) { + const char* name = RTLIL::id2cstr(wire->name); + Tcl_Obj* name_obj = Tcl_NewStringObj(name, -1); Tcl_ListObjAppendElement(interp, tcl_list, name_obj); } Tcl_SetObjResult(interp, tcl_list); } - - Clocks& clocks_; }; struct PropagateClocksCmd : public Pass { @@ -253,7 +255,6 @@ class SdcPlugin { SdcPlugin() : write_sdc_cmd_(clocks_, sdc_writer_), create_clock_cmd_(clocks_), - get_clocks_cmd_(clocks_), propagate_clocks_cmd_(clocks_), set_false_path_cmd_(sdc_writer_), set_max_delay_cmd_(sdc_writer_), From 927e7ba05de46297b8997eb90041d214d90f8d13 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 22 Oct 2020 11:44:20 +0200 Subject: [PATCH 211/845] SDC: Remove Clocks storage Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 17 ----------------- sdc-plugin/clocks.h | 5 ----- sdc-plugin/sdc_writer.cc | 21 --------------------- sdc-plugin/sdc_writer.h | 1 - 4 files changed, 44 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index bbad62cda..d1804b737 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -55,23 +55,6 @@ const std::vector Clocks::GetClocks(RTLIL::Design* design) { return clock_wires; } -std::vector Clocks::GetClockNames() { - std::vector res; - for (auto clock : clocks_) { - res.push_back(clock.Name()); -#ifdef SDC_DEBUG - std::stringstream ss; - for (auto clock_wire : clock.GetClockWires()) { - ss << RTLIL::unescape_id(clock_wire->name) << " "; - } - log("create_clock -period %f -name %s -waveform {%f %f} %s\n", - clock.Period(), clock.Name().c_str(), clock.RisingEdge(), - clock.FallingEdge(), ss.str().c_str()); -#endif - } - return res; -} - void Clocks::Propagate(RTLIL::Design* design, NaturalPropagation* pass) { #ifdef SDC_DEBUG log("Start natural clock propagation\n"); diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 114cee3cd..c0746493b 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -67,17 +67,12 @@ class Clocks { void AddClock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); void AddClock(Clock& clock); - std::vector GetClockNames(); void Propagate(RTLIL::Design* design, NaturalPropagation* pass); void Propagate(RTLIL::Design* design, BufferPropagation* pass); void Propagate(RTLIL::Design* design, ClockDividerPropagation* pass); - const std::vector GetClocks() { - return std::vector(); - } static const std::vector GetClocks(RTLIL::Design* design); private: - std::vector clocks_; void PropagateThroughBuffer(Propagation* pass, RTLIL::Design* design, Clock& clock, Buffer buffer); }; diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index 69980974b..6826d012c 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -58,27 +58,6 @@ void SdcWriter::WriteClocks(RTLIL::Design* design, std::ostream& file) { } } -void SdcWriter::WriteClocks(Clocks& clocks, std::ostream& file) { - for (auto clock : clocks.GetClocks()) { - auto clock_wires = clock.GetClockWires(); - // FIXME: Input port nets are not found in VPR - if (std::all_of(clock_wires.begin(), clock_wires.end(), - [&](RTLIL::Wire* wire) { return wire->port_input; })) { - continue; - } - file << "create_clock -period " << clock.Period(); - file << " -waveform {" << clock.RisingEdge() << " " - << clock.FallingEdge() << "}"; - for (auto clock_wire : clock_wires) { - if (clock_wire->port_input) { - continue; - } - file << " " << Clock::ClockWireName(clock_wire); - } - file << std::endl; - } -} - void SdcWriter::WriteFalsePaths(std::ostream& file) { for (auto path : false_paths_) { file << "set_false_path"; diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h index c6ea149ab..5cdf8a228 100644 --- a/sdc-plugin/sdc_writer.h +++ b/sdc-plugin/sdc_writer.h @@ -64,7 +64,6 @@ class SdcWriter { void WriteSdc(RTLIL::Design* design, std::ostream& file); private: - void WriteClocks(Clocks& clocks, std::ostream& file); void WriteClocks(RTLIL::Design* design, std::ostream& file); void WriteFalsePaths(std::ostream& file); void WriteMaxDelay(std::ostream& file); From 8aaf3218f6c98001e2f93446fde84d8c716b8612 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 22 Oct 2020 13:45:15 +0200 Subject: [PATCH 212/845] SDC: Write waveform from RTLIL attributes Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 41 +++++++++++++++++++++++++++++++++++++++- sdc-plugin/clocks.h | 4 ++++ sdc-plugin/sdc_writer.cc | 8 ++++---- 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index d1804b737..3727ec692 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -33,7 +33,12 @@ void Clocks::AddClock(const std::string& name, std::vector wires, void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { wire->set_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL"), "yes"); + wire->set_string_attribute(RTLIL::escape_id("CLASS"), "clock"); + wire->set_string_attribute(RTLIL::escape_id("NAME"), name); + wire->set_string_attribute(RTLIL::escape_id("SOURCE_PINS"), Clock::ClockWireName(wire)); wire->set_string_attribute(RTLIL::escape_id("PERIOD"), std::to_string(period)); + std::string waveform(std::to_string(rising_edge) + " " + std::to_string(falling_edge)); + wire->set_string_attribute(RTLIL::escape_id("WAVEFORM"), waveform); } void Clocks::AddClock(Clock& clock) { @@ -169,7 +174,41 @@ Clock::Clock(const std::string& name, std::vector wires, Clock::Clock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) - : Clock(RTLIL::id2cstr(wire->name), wire, period, rising_edge, falling_edge) {} + : Clock(RTLIL::unescape_id(wire->name), wire, period, rising_edge, falling_edge) {} + +float Clock::Period(RTLIL::Wire* clock_wire) { + if (!clock_wire->has_attribute(RTLIL::escape_id("PERIOD"))) { + log_warning("Period has not been specified\n Default value 0 will be used\n"); + return 0; + } + return std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); +} + +std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { + if (!clock_wire->has_attribute(RTLIL::escape_id("WAVEFORM"))) { + float period(Period(clock_wire)); + if (!period) { + log_cmd_error("Neither PERIOD nor WAVEFORM has been specified for wire %s\n", ClockWireName(clock_wire).c_str()); + return std::make_pair(0,0); + } + float falling_edge = period / 2; + log_warning("Waveform has not been specified\n Default value {0 %f} will be used\n", falling_edge); + return std::make_pair(0, falling_edge); + } + float rising_edge(0); + float falling_edge(0); + std::string waveform(clock_wire->get_string_attribute(RTLIL::escape_id("WAVEFORM"))); + std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge); + return std::make_pair(rising_edge, falling_edge); +} + +float Clock::RisingEdge(RTLIL::Wire* clock_wire) { + return Waveform(clock_wire).first; +} + +float Clock::FallingEdge(RTLIL::Wire* clock_wire) { + return Waveform(clock_wire).second; +} void Clock::UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index c0746493b..478b9eaa9 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -40,8 +40,11 @@ class Clock { std::vector GetClockWires() { return clock_wires_; } const std::string& Name() const { return name_; } float Period() { return period_; } + static float Period(RTLIL::Wire* clock_wire); float RisingEdge() { return rising_edge_; } + static float RisingEdge(RTLIL::Wire* clock_wire); float FallingEdge() { return falling_edge_; } + static float FallingEdge(RTLIL::Wire* clock_wire); RTLIL::Wire* ClockWire() { return clock_wire_; } void UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); @@ -55,6 +58,7 @@ class Clock { float rising_edge_; float falling_edge_; + static std::pair Waveform(RTLIL::Wire* clock_wire); void UpdateWires(RTLIL::Wire* wire); void UpdatePeriod(float period); void UpdateWaveform(float rising_edge, float falling_edge); diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index 6826d012c..41ebfa382 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -50,10 +50,10 @@ void SdcWriter::WriteClocks(RTLIL::Design* design, std::ostream& file) { if (clock_wire->port_input) { continue; } - file << "create_clock -period " << clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD")); - /* file << " -waveform {" << clock.RisingEdge() << " " */ - /* << clock.FallingEdge() << "}"; */ - file << " " << RTLIL::unescape_id(clock_wire->name); + file << "create_clock -period " << Clock::Period(clock_wire); + file << " -waveform {" << Clock::RisingEdge(clock_wire) << " " + << Clock::FallingEdge(clock_wire) << "}"; + file << " " << Clock::ClockWireName(clock_wire); file << std::endl; } } From 2a7ead60d14ddb1373672b5f1730e303ad7c2989 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 22 Oct 2020 15:30:45 +0200 Subject: [PATCH 213/845] SDC: Fix all propagation types to use attributes Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 54 ++++++++++++--------------------------- sdc-plugin/clocks.h | 12 ++++----- sdc-plugin/propagation.cc | 16 +++++------- sdc-plugin/propagation.h | 2 +- sdc-plugin/sdc.cc | 4 +-- 5 files changed, 31 insertions(+), 57 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 3727ec692..3a856c36b 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -25,7 +25,7 @@ void Clocks::AddClock(const std::string& name, std::vector wires, float period, float rising_edge, float falling_edge) { - std::for_each(wires.begin(), wires.end(), [&, this](RTLIL::Wire* wire) { + std::for_each(wires.begin(), wires.end(), [&](RTLIL::Wire* wire) { AddClock(name, wire, period, rising_edge, falling_edge); }); } @@ -41,9 +41,9 @@ void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, wire->set_string_attribute(RTLIL::escape_id("WAVEFORM"), waveform); } -void Clocks::AddClock(Clock& clock) { - AddClock(clock.Name(), clock.GetClockWires(), clock.Period(), - clock.RisingEdge(), clock.FallingEdge()); +void Clocks::AddClock(RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge) { + AddClock(Clock::ClockWireName(wire), wire, period, rising_edge, falling_edge); } const std::vector Clocks::GetClocks(RTLIL::Design* design) { @@ -69,8 +69,9 @@ void Clocks::Propagate(RTLIL::Design* design, NaturalPropagation* pass) { log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); #endif auto aliases = pass->FindAliasWires(clock_wire); - /* AddClock(clock.Name(), aliases, clock.Period(), */ - /* clock.RisingEdge(), clock.FallingEdge()); */ + AddClock(Clock::ClockWireName(clock_wire), aliases, + Clock::Period(clock_wire), Clock::RisingEdge(clock_wire), + Clock::FallingEdge(clock_wire)); } #ifdef SDC_DEBUG log("Finish natural clock propagation\n\n"); @@ -82,25 +83,11 @@ void Clocks::Propagate(RTLIL::Design* design, BufferPropagation* pass) { log("Start buffer clock propagation\n"); log("IBUF pass\n"); #endif - for (auto& clock_wire : Clocks::GetClocks(design)) { -#ifdef SDC_DEBUG - log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); -#endif - auto period = std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); - auto clock = Clock(clock_wire, period, 0, period/2); - PropagateThroughBuffer(pass, design, clock, IBuf()); - } + PropagateThroughBuffers(pass, design, IBuf()); #ifdef SDC_DEBUG log("BUFG pass\n"); #endif - for (auto& clock_wire : Clocks::GetClocks(design)) { -#ifdef SDC_DEBUG - log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); -#endif - auto period = std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); - auto clock = Clock(clock_wire, period, 0, period/2); - PropagateThroughBuffer(pass, design, clock, Bufg()); - } + PropagateThroughBuffers(pass, design, Bufg()); #ifdef SDC_DEBUG log("Finish buffer clock propagation\n\n"); #endif @@ -114,28 +101,19 @@ void Clocks::Propagate(RTLIL::Design* design, ClockDividerPropagation* pass) { #ifdef SDC_DEBUG log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); #endif - auto period = std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); - auto clock = Clock(clock_wire, period, 0, period/2); - auto pll_clocks = - pass->FindSinkClocksForCellType(clock, "PLLE2_ADV"); - for (auto pll_clock : pll_clocks) { -#ifdef SDC_DEBUG - log("PLL clock: %s\n", pll_clock.Name().c_str()); -#endif - AddClock(pll_clock); - PropagateThroughBuffer(pass, design, pll_clock, Bufg()); - } + pass->PropagateClocksForCellType(clock_wire, "PLLE2_ADV"); + PropagateThroughBuffers(pass, design, Bufg()); } #ifdef SDC_DEBUG log("Finish clock divider clock propagation\n\n"); #endif } -void Clocks::PropagateThroughBuffer(Propagation* pass, RTLIL::Design* design, Clock& clock, +void Clocks::PropagateThroughBuffers(Propagation* pass, RTLIL::Design* design, Buffer buffer) { for (auto& clock_wire : Clocks::GetClocks(design)) { #ifdef SDC_DEBUG - log("Clock wire %s\n", RTLIL::id2cstr(clock_wire->name)); + log("Clock wire %s\n", Clock::ClockWireName(clock_wire).c_str()); #endif auto buf_wires = pass->FindSinkWiresForCellType(clock_wire, buffer.name, buffer.output); @@ -146,9 +124,9 @@ void Clocks::PropagateThroughBuffer(Propagation* pass, RTLIL::Design* design, Cl RTLIL::id2cstr(wire->name)); #endif path_delay += buffer.delay; - AddClock(RTLIL::unescape_id(wire->name), wire, clock.Period(), - clock.RisingEdge() + path_delay, - clock.FallingEdge() + path_delay); + AddClock(wire, Clock::Period(clock_wire), + Clock::RisingEdge(clock_wire) + path_delay, + Clock::FallingEdge(clock_wire) + path_delay); } } } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 478b9eaa9..9a74b4a00 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -39,7 +39,6 @@ class Clock { float rising_edge, float falling_edge); std::vector GetClockWires() { return clock_wires_; } const std::string& Name() const { return name_; } - float Period() { return period_; } static float Period(RTLIL::Wire* clock_wire); float RisingEdge() { return rising_edge_; } static float RisingEdge(RTLIL::Wire* clock_wire); @@ -66,18 +65,19 @@ class Clock { class Clocks { public: - void AddClock(const std::string& name, std::vector wires, + static void AddClock(const std::string& name, std::vector wires, float period, float rising_edge, float falling_edge); - void AddClock(const std::string& name, RTLIL::Wire* wire, float period, + static void AddClock(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge); - void AddClock(Clock& clock); + static void AddClock(RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge); + static const std::vector GetClocks(RTLIL::Design* design); void Propagate(RTLIL::Design* design, NaturalPropagation* pass); void Propagate(RTLIL::Design* design, BufferPropagation* pass); void Propagate(RTLIL::Design* design, ClockDividerPropagation* pass); - static const std::vector GetClocks(RTLIL::Design* design); private: - void PropagateThroughBuffer(Propagation* pass, RTLIL::Design* design, Clock& clock, + void PropagateThroughBuffers(Propagation* pass, RTLIL::Design* design, Buffer buffer); }; diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 3ea35addd..71ce4670c 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -37,34 +37,30 @@ std::vector NaturalPropagation::FindAliasWires( return alias_wires; } -std::vector ClockDividerPropagation::FindSinkClocksForCellType( - Clock driving_clock, const std::string& cell_type) { - std::vector clocks; - auto clock_wire = driving_clock.ClockWire(); +void ClockDividerPropagation::PropagateClocksForCellType( + RTLIL::Wire* driver_wire, const std::string& cell_type) { if (cell_type == "PLLE2_ADV") { RTLIL::Cell* cell = NULL; for (auto input : Pll::inputs) { - cell = FindSinkCellOnPort(clock_wire, input); + cell = FindSinkCellOnPort(driver_wire, input); if (cell and RTLIL::unescape_id(cell->type) == cell_type) { break; } } if (!cell) { - return clocks; + return; } - Pll pll(cell, driving_clock.Period(), driving_clock.RisingEdge()); + Pll pll(cell, Clock::Period(driver_wire), Clock::RisingEdge(driver_wire)); for (auto output : Pll::outputs) { RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); if (wire) { float clkout_period(pll.clkout_period.at(output)); float clkout_rising_edge(pll.clkout_rising_edge.at(output)); float clkout_falling_edge(pll.clkout_falling_edge.at(output)); - Clock clock(wire, clkout_period, clkout_rising_edge, clkout_falling_edge); - clocks.push_back(clock); + Clocks::AddClock(wire, clkout_period, clkout_rising_edge, clkout_falling_edge); } } } - return clocks; } RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 0e45211c3..f9f06acde 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -66,7 +66,7 @@ class ClockDividerPropagation : public Propagation { : Propagation(design, pass) {} void Run(Clocks& clocks) override { clocks.Propagate(design_, this); } - std::vector FindSinkClocksForCellType(Clock driver_wire, + void PropagateClocksForCellType(RTLIL::Wire* driver_wire, const std::string& cell_type); }; #endif // PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index b66a287dc..9d5590609 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -235,9 +235,9 @@ struct PropagateClocksCmd : public Pass { } std::array, 2> passes{ - std::unique_ptr( + std::unique_ptr( new BufferPropagation(design, this)), - std::unique_ptr( + std::unique_ptr( new ClockDividerPropagation(design, this))}; log("Perform clock propagation\n"); From 25165f9f0ccf99cb80e4bf5adafe22b3f4862ec5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 22 Oct 2020 15:31:57 +0200 Subject: [PATCH 214/845] SDC: Update golden test files Signed-off-by: Tomasz Michalak --- Makefile_test.common | 2 +- sdc-plugin/tests/counter/counter.golden.txt | 2 +- sdc-plugin/tests/counter2/counter2.golden.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile_test.common b/Makefile_test.common index fe8ffce28..5f05cd71e 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -33,7 +33,7 @@ $(1)/ok: $(1)/$(1).v endef -diff_test = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) +diff_test = bash -c "diff <(sort $(1)/$(1).golden.$(2)) <(sort $(1)/$(1).$(2))" all: $(TESTS) .PHONY: all clean $(TESTS) diff --git a/sdc-plugin/tests/counter/counter.golden.txt b/sdc-plugin/tests/counter/counter.golden.txt index 065b11094..78277ed59 100644 --- a/sdc-plugin/tests/counter/counter.golden.txt +++ b/sdc-plugin/tests/counter/counter.golden.txt @@ -1 +1 @@ -clk_int_1 clk ibuf_proxy_out {$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} middle_inst_1.clk_int middle_inst_4.clk +{$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} clk clk2 clk_int_1 ibuf_proxy_out middle_inst_1.clk_int middle_inst_4.clk diff --git a/sdc-plugin/tests/counter2/counter2.golden.txt b/sdc-plugin/tests/counter2/counter2.golden.txt index ca1b18786..78277ed59 100644 --- a/sdc-plugin/tests/counter2/counter2.golden.txt +++ b/sdc-plugin/tests/counter2/counter2.golden.txt @@ -1 +1 @@ -clk_int_1 clk clk2 ibuf_proxy_out {$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} middle_inst_1.clk_int middle_inst_4.clk +{$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} clk clk2 clk_int_1 ibuf_proxy_out middle_inst_1.clk_int middle_inst_4.clk From 2b60d154c6ea12d8d5d9f27b3eb0265ca4d95030 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 23 Oct 2020 13:22:40 +0200 Subject: [PATCH 215/845] SDC: Refactor and remove unused code Signed-off-by: Tomasz Michalak --- sdc-plugin/buffers.cc | 4 +- sdc-plugin/buffers.h | 13 ++-- sdc-plugin/clocks.cc | 147 +++++++++++++++--------------------------- sdc-plugin/clocks.h | 25 +------ 4 files changed, 67 insertions(+), 122 deletions(-) diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index 919de28b4..af28eaf1b 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -25,7 +25,9 @@ const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", const float Pll::delay = 0; const std::string Pll::name = "PLLE2_ADV"; -Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_edge) { +Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_edge) + : ClockDivider({"PLLE2_ADV"}) +{ assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); FetchParams(cell); CheckInputClockPeriod(cell, input_clock_period); diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index 5f5153578..b0ab0491e 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -26,10 +26,10 @@ USING_YOSYS_NAMESPACE struct Buffer { - Buffer(float delay, const std::string& name, const std::string& output) - : delay(delay), name(name), output(output) {} + Buffer(float delay, const std::string& type, const std::string& output) + : delay(delay), type(type), output(output) {} float delay; - std::string name; + std::string type; std::string output; }; @@ -41,7 +41,12 @@ struct Bufg : Buffer { Bufg() : Buffer(0, "BUFG", "O"){}; }; -struct Pll { +struct ClockDivider { + std::string type; +}; + +struct Pll: public ClockDivider { + Pll():ClockDivider({"PLLE2_ADV"}){} Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_edge); // Helper function to fetch a cell parameter or return a default value diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 3a856c36b..2c12ccde3 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -23,6 +23,48 @@ #include "kernel/register.h" #include "propagation.h" +float Clock::Period(RTLIL::Wire* clock_wire) { + if (!clock_wire->has_attribute(RTLIL::escape_id("PERIOD"))) { + log_warning("Period has not been specified\n Default value 0 will be used\n"); + return 0; + } + return std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); +} + +std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { + if (!clock_wire->has_attribute(RTLIL::escape_id("WAVEFORM"))) { + float period(Period(clock_wire)); + if (!period) { + log_cmd_error("Neither PERIOD nor WAVEFORM has been specified for wire %s\n", ClockWireName(clock_wire).c_str()); + return std::make_pair(0,0); + } + float falling_edge = period / 2; + log_warning("Waveform has not been specified\n Default value {0 %f} will be used\n", falling_edge); + return std::make_pair(0, falling_edge); + } + float rising_edge(0); + float falling_edge(0); + std::string waveform(clock_wire->get_string_attribute(RTLIL::escape_id("WAVEFORM"))); + std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge); + return std::make_pair(rising_edge, falling_edge); +} + +float Clock::RisingEdge(RTLIL::Wire* clock_wire) { + return Waveform(clock_wire).first; +} + +float Clock::FallingEdge(RTLIL::Wire* clock_wire) { + return Waveform(clock_wire).second; +} + +std::string Clock::ClockWireName(RTLIL::Wire* wire) { + if (!wire) { + return std::string(); + } + std::string wire_name(RTLIL::unescape_id(wire->name)); + return std::regex_replace(wire_name, std::regex{"\\$"}, "\\$"); +} + void Clocks::AddClock(const std::string& name, std::vector wires, float period, float rising_edge, float falling_edge) { std::for_each(wires.begin(), wires.end(), [&](RTLIL::Wire* wire) { @@ -97,13 +139,8 @@ void Clocks::Propagate(RTLIL::Design* design, ClockDividerPropagation* pass) { #ifdef SDC_DEBUG log("Start clock divider clock propagation\n"); #endif - for (auto& clock_wire : Clocks::GetClocks(design)) { -#ifdef SDC_DEBUG - log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); -#endif - pass->PropagateClocksForCellType(clock_wire, "PLLE2_ADV"); - PropagateThroughBuffers(pass, design, Bufg()); - } + PropagateThroughClockDividers(pass, design, Pll()); + PropagateThroughBuffers(pass, design, Bufg()); #ifdef SDC_DEBUG log("Finish clock divider clock propagation\n\n"); #endif @@ -115,12 +152,12 @@ void Clocks::PropagateThroughBuffers(Propagation* pass, RTLIL::Design* design, #ifdef SDC_DEBUG log("Clock wire %s\n", Clock::ClockWireName(clock_wire).c_str()); #endif - auto buf_wires = pass->FindSinkWiresForCellType(clock_wire, buffer.name, + auto buf_wires = pass->FindSinkWiresForCellType(clock_wire, buffer.type, buffer.output); int path_delay(0); for (auto wire : buf_wires) { #ifdef SDC_DEBUG - log("%s wire: %s\n", buffer.name.c_str(), + log("%s wire: %s\n", buffer.type.c_str(), RTLIL::id2cstr(wire->name)); #endif path_delay += buffer.delay; @@ -131,90 +168,12 @@ void Clocks::PropagateThroughBuffers(Propagation* pass, RTLIL::Design* design, } } -Clock::Clock(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge) - : name_(name), - period_(period), - rising_edge_(rising_edge), - falling_edge_(falling_edge) { - UpdateWires(wire); -} - -Clock::Clock(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge) - : name_(name), - period_(period), - rising_edge_(rising_edge), - falling_edge_(falling_edge) { - std::for_each(wires.begin(), wires.end(), - [&, this](RTLIL::Wire* wire) { UpdateWires(wire); }); -} - -Clock::Clock(RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge) - : Clock(RTLIL::unescape_id(wire->name), wire, period, rising_edge, falling_edge) {} - -float Clock::Period(RTLIL::Wire* clock_wire) { - if (!clock_wire->has_attribute(RTLIL::escape_id("PERIOD"))) { - log_warning("Period has not been specified\n Default value 0 will be used\n"); - return 0; - } - return std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); -} - -std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { - if (!clock_wire->has_attribute(RTLIL::escape_id("WAVEFORM"))) { - float period(Period(clock_wire)); - if (!period) { - log_cmd_error("Neither PERIOD nor WAVEFORM has been specified for wire %s\n", ClockWireName(clock_wire).c_str()); - return std::make_pair(0,0); - } - float falling_edge = period / 2; - log_warning("Waveform has not been specified\n Default value {0 %f} will be used\n", falling_edge); - return std::make_pair(0, falling_edge); - } - float rising_edge(0); - float falling_edge(0); - std::string waveform(clock_wire->get_string_attribute(RTLIL::escape_id("WAVEFORM"))); - std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge); - return std::make_pair(rising_edge, falling_edge); -} - -float Clock::RisingEdge(RTLIL::Wire* clock_wire) { - return Waveform(clock_wire).first; -} - -float Clock::FallingEdge(RTLIL::Wire* clock_wire) { - return Waveform(clock_wire).second; -} - -void Clock::UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, - float falling_edge) { - UpdateWires(wire); - UpdatePeriod(period); - UpdateWaveform(rising_edge, falling_edge); -} - -void Clock::UpdateWires(RTLIL::Wire* wire) { - if (std::find(clock_wires_.begin(), clock_wires_.end(), wire) == - clock_wires_.end()) { - clock_wires_.push_back(wire); - } -} - -void Clock::UpdatePeriod(float period) { - period_ = period; -} - -void Clock::UpdateWaveform(float rising_edge, float falling_edge) { - rising_edge_ = fmod(rising_edge, period_); - falling_edge_ = fmod(falling_edge, period_); -} - -std::string Clock::ClockWireName(RTLIL::Wire* wire) { - if (!wire) { - return std::string(); +void Clocks::PropagateThroughClockDividers(ClockDividerPropagation* pass, RTLIL::Design* design, + ClockDivider divider) { + for (auto& clock_wire : Clocks::GetClocks(design)) { +#ifdef SDC_DEBUG + log("Processing clock %s\n", Clock::ClockWireName(clock_wire).c_str()); +#endif + pass->PropagateClocksForCellType(clock_wire, divider.type); } - std::string wire_name(RTLIL::unescape_id(wire->name)); - return std::regex_replace(wire_name, std::regex{"\\$"}, "\\$"); } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 9a74b4a00..4b8a9e4c0 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -31,36 +31,13 @@ class Propagation; class Clock { public: - Clock(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); - Clock(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge); - Clock(RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); - std::vector GetClockWires() { return clock_wires_; } - const std::string& Name() const { return name_; } static float Period(RTLIL::Wire* clock_wire); - float RisingEdge() { return rising_edge_; } static float RisingEdge(RTLIL::Wire* clock_wire); - float FallingEdge() { return falling_edge_; } static float FallingEdge(RTLIL::Wire* clock_wire); - RTLIL::Wire* ClockWire() { return clock_wire_; } - void UpdateClock(RTLIL::Wire* wire, float period, float rising_edge, - float falling_edge); static std::string ClockWireName(RTLIL::Wire* wire); private: - std::string name_; - std::vector clock_wires_; - RTLIL::Wire* clock_wire_; - float period_; - float rising_edge_; - float falling_edge_; - static std::pair Waveform(RTLIL::Wire* clock_wire); - void UpdateWires(RTLIL::Wire* wire); - void UpdatePeriod(float period); - void UpdateWaveform(float rising_edge, float falling_edge); }; class Clocks { @@ -79,6 +56,8 @@ class Clocks { private: void PropagateThroughBuffers(Propagation* pass, RTLIL::Design* design, Buffer buffer); + void PropagateThroughClockDividers(ClockDividerPropagation* pass, RTLIL::Design* design, + ClockDivider divider); }; #endif // _CLOCKS_H_ From 40f95e5aa82185c1a5b1bd4a2662c8389de6421c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Fri, 23 Oct 2020 15:05:42 +0200 Subject: [PATCH 216/845] SDC: Move the propagation methods to Propagation class Signed-off-by: Tomasz Michalak --- Makefile_plugin.common | 2 +- sdc-plugin/buffers.cc | 37 ++++-- sdc-plugin/buffers.h | 7 +- sdc-plugin/clocks.cc | 152 +++++++--------------- sdc-plugin/clocks.h | 21 +-- sdc-plugin/propagation.cc | 187 +++++++++++++++++++-------- sdc-plugin/propagation.h | 20 +-- sdc-plugin/sdc.cc | 32 ++--- sdc-plugin/tests/counter/counter.tcl | 1 + 9 files changed, 236 insertions(+), 223 deletions(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 6215cbb4b..4289bd66c 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -37,7 +37,7 @@ # |-- example2-plugin # |-- ... CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) +CXXFLAGS = $(shell yosys-config --cxxflags) #-DSDC_DEBUG LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index af28eaf1b..a48a26afc 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -15,9 +15,9 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "buffers.h" #include #include -#include "buffers.h" const std::vector Pll::inputs = {"CLKIN1", "CLKIN2"}; const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", @@ -25,9 +25,9 @@ const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", const float Pll::delay = 0; const std::string Pll::name = "PLLE2_ADV"; -Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_edge) - : ClockDivider({"PLLE2_ADV"}) -{ +Pll::Pll(RTLIL::Cell* cell, float input_clock_period, + float input_clock_rising_edge) + : ClockDivider({"PLLE2_ADV"}) { assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); FetchParams(cell); CheckInputClockPeriod(cell, input_clock_period); @@ -37,7 +37,9 @@ Pll::Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_e void Pll::CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period) { float abs_diff = fabs(ClkinPeriod() - input_clock_period); - bool approx_equal = abs_diff < std::max(ClkinPeriod(), input_clock_period) * 10 * std::numeric_limits::epsilon(); + bool approx_equal = abs_diff < std::max(ClkinPeriod(), input_clock_period) * + 10 * + std::numeric_limits::epsilon(); if (!approx_equal) { log_cmd_error( "CLKIN[1/2]_PERIOD doesn't match the virtual clock constraint " @@ -55,7 +57,8 @@ void Pll::FetchParams(RTLIL::Cell* cell) { divclk_divisor = FetchParam(cell, "DIVCLK_DIVIDE", 1.0); for (auto output : outputs) { // CLKOUT[0-5]_DUTY_CYCLE - clkout_duty_cycle[output] = FetchParam(cell, output + "_DUTY_CYCLE", 0.5); + clkout_duty_cycle[output] = + FetchParam(cell, output + "_DUTY_CYCLE", 0.5); // CLKOUT[0-5]_DIVIDE clkout_divisor[output] = FetchParam(cell, output + "_DIVIDE", 1.0); // CLKOUT[0-5]_PHASE @@ -65,22 +68,30 @@ void Pll::FetchParams(RTLIL::Cell* cell) { void Pll::CalculateOutputClockPeriods() { for (auto output : outputs) { - // CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE * DIVCLK_DIVIDE / - // CLKFBOUT_MULT - clkout_period[output] = ClkinPeriod() * clkout_divisor.at(output) / clk_mult * - divclk_divisor; + // CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE * + // DIVCLK_DIVIDE / CLKFBOUT_MULT + clkout_period[output] = ClkinPeriod() * clkout_divisor.at(output) / + clk_mult * divclk_divisor; } } void Pll::CalculateOutputClockWaveforms(float input_clock_rising_edge) { for (auto output : outputs) { float output_clock_period = clkout_period.at(output); - clkout_rising_edge[output] = fmod(input_clock_rising_edge - (clk_fbout_phase / 360.0) * ClkinPeriod() + output_clock_period * (clkout_phase[output] / 360.0), output_clock_period); - clkout_falling_edge[output] = fmod(clkout_rising_edge[output] + clkout_duty_cycle[output] * output_clock_period, output_clock_period); + clkout_rising_edge[output] = + fmod(input_clock_rising_edge - + (clk_fbout_phase / 360.0) * ClkinPeriod() + + output_clock_period * (clkout_phase[output] / 360.0), + output_clock_period); + clkout_falling_edge[output] = + fmod(clkout_rising_edge[output] + + clkout_duty_cycle[output] * output_clock_period, + output_clock_period); } } -float Pll::FetchParam(RTLIL::Cell* cell, std::string&& param_name, float default_value) { +float Pll::FetchParam(RTLIL::Cell* cell, std::string&& param_name, + float default_value) { RTLIL::IdString param(RTLIL::escape_id(param_name)); if (cell->hasParam(param)) { auto param_obj = cell->parameters.at(param); diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index b0ab0491e..ba3faa446 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -45,9 +45,10 @@ struct ClockDivider { std::string type; }; -struct Pll: public ClockDivider { - Pll():ClockDivider({"PLLE2_ADV"}){} - Pll(RTLIL::Cell* cell, float input_clock_period, float input_clock_rising_edge); +struct Pll : public ClockDivider { + Pll() : ClockDivider({"PLLE2_ADV"}) {} + Pll(RTLIL::Cell* cell, float input_clock_period, + float input_clock_rising_edge); // Helper function to fetch a cell parameter or return a default value static float FetchParam(RTLIL::Cell* cell, std::string&& param_name, diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 2c12ccde3..9f259d5d4 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -19,32 +19,65 @@ #include #include #include -#include "kernel/log.h" #include "kernel/register.h" #include "propagation.h" +void Clock::Add(const std::string& name, RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge) { + wire->set_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL"), "yes"); + wire->set_string_attribute(RTLIL::escape_id("CLASS"), "clock"); + wire->set_string_attribute(RTLIL::escape_id("NAME"), name); + wire->set_string_attribute(RTLIL::escape_id("SOURCE_PINS"), + Clock::ClockWireName(wire)); + wire->set_string_attribute(RTLIL::escape_id("PERIOD"), + std::to_string(period)); + std::string waveform(std::to_string(rising_edge) + " " + + std::to_string(falling_edge)); + wire->set_string_attribute(RTLIL::escape_id("WAVEFORM"), waveform); +} + +void Clock::Add(const std::string& name, std::vector wires, + float period, float rising_edge, float falling_edge) { + std::for_each(wires.begin(), wires.end(), [&](RTLIL::Wire* wire) { + Add(name, wire, period, rising_edge, falling_edge); + }); +} + +void Clock::Add(RTLIL::Wire* wire, float period, float rising_edge, + float falling_edge) { + Add(Clock::ClockWireName(wire), wire, period, rising_edge, falling_edge); +} + float Clock::Period(RTLIL::Wire* clock_wire) { if (!clock_wire->has_attribute(RTLIL::escape_id("PERIOD"))) { - log_warning("Period has not been specified\n Default value 0 will be used\n"); + log_warning( + "Period has not been specified\n Default value 0 will be used\n"); return 0; } - return std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); + return std::stof( + clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); } std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { if (!clock_wire->has_attribute(RTLIL::escape_id("WAVEFORM"))) { float period(Period(clock_wire)); if (!period) { - log_cmd_error("Neither PERIOD nor WAVEFORM has been specified for wire %s\n", ClockWireName(clock_wire).c_str()); - return std::make_pair(0,0); + log_cmd_error( + "Neither PERIOD nor WAVEFORM has been specified for wire %s\n", + ClockWireName(clock_wire).c_str()); + return std::make_pair(0, 0); } float falling_edge = period / 2; - log_warning("Waveform has not been specified\n Default value {0 %f} will be used\n", falling_edge); + log_warning( + "Waveform has not been specified\n Default value {0 %f} will be " + "used\n", + falling_edge); return std::make_pair(0, falling_edge); } float rising_edge(0); float falling_edge(0); - std::string waveform(clock_wire->get_string_attribute(RTLIL::escape_id("WAVEFORM"))); + std::string waveform( + clock_wire->get_string_attribute(RTLIL::escape_id("WAVEFORM"))); std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge); return std::make_pair(rising_edge, falling_edge); } @@ -65,115 +98,18 @@ std::string Clock::ClockWireName(RTLIL::Wire* wire) { return std::regex_replace(wire_name, std::regex{"\\$"}, "\\$"); } -void Clocks::AddClock(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge) { - std::for_each(wires.begin(), wires.end(), [&](RTLIL::Wire* wire) { - AddClock(name, wire, period, rising_edge, falling_edge); - }); -} - -void Clocks::AddClock(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge) { - wire->set_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL"), "yes"); - wire->set_string_attribute(RTLIL::escape_id("CLASS"), "clock"); - wire->set_string_attribute(RTLIL::escape_id("NAME"), name); - wire->set_string_attribute(RTLIL::escape_id("SOURCE_PINS"), Clock::ClockWireName(wire)); - wire->set_string_attribute(RTLIL::escape_id("PERIOD"), std::to_string(period)); - std::string waveform(std::to_string(rising_edge) + " " + std::to_string(falling_edge)); - wire->set_string_attribute(RTLIL::escape_id("WAVEFORM"), waveform); -} - -void Clocks::AddClock(RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge) { - AddClock(Clock::ClockWireName(wire), wire, period, rising_edge, falling_edge); -} - const std::vector Clocks::GetClocks(RTLIL::Design* design) { std::vector clock_wires; RTLIL::Module* top_module = design->top_module(); for (auto& wire_obj : top_module->wires_) { auto& wire = wire_obj.second; if (wire->has_attribute(RTLIL::escape_id("CLOCK_SIGNAL"))) { - if (wire->get_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL")) == "yes") { - clock_wires.push_back(wire); - } + if (wire->get_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL")) == + "yes") { + clock_wires.push_back(wire); + } } } return clock_wires; } -void Clocks::Propagate(RTLIL::Design* design, NaturalPropagation* pass) { -#ifdef SDC_DEBUG - log("Start natural clock propagation\n"); -#endif - for (auto& clock_wire : Clocks::GetClocks(design)) { -#ifdef SDC_DEBUG - log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); -#endif - auto aliases = pass->FindAliasWires(clock_wire); - AddClock(Clock::ClockWireName(clock_wire), aliases, - Clock::Period(clock_wire), Clock::RisingEdge(clock_wire), - Clock::FallingEdge(clock_wire)); - } -#ifdef SDC_DEBUG - log("Finish natural clock propagation\n\n"); -#endif -} - -void Clocks::Propagate(RTLIL::Design* design, BufferPropagation* pass) { -#ifdef SDC_DEBUG - log("Start buffer clock propagation\n"); - log("IBUF pass\n"); -#endif - PropagateThroughBuffers(pass, design, IBuf()); -#ifdef SDC_DEBUG - log("BUFG pass\n"); -#endif - PropagateThroughBuffers(pass, design, Bufg()); -#ifdef SDC_DEBUG - log("Finish buffer clock propagation\n\n"); -#endif -} - -void Clocks::Propagate(RTLIL::Design* design, ClockDividerPropagation* pass) { -#ifdef SDC_DEBUG - log("Start clock divider clock propagation\n"); -#endif - PropagateThroughClockDividers(pass, design, Pll()); - PropagateThroughBuffers(pass, design, Bufg()); -#ifdef SDC_DEBUG - log("Finish clock divider clock propagation\n\n"); -#endif -} - -void Clocks::PropagateThroughBuffers(Propagation* pass, RTLIL::Design* design, - Buffer buffer) { - for (auto& clock_wire : Clocks::GetClocks(design)) { -#ifdef SDC_DEBUG - log("Clock wire %s\n", Clock::ClockWireName(clock_wire).c_str()); -#endif - auto buf_wires = pass->FindSinkWiresForCellType(clock_wire, buffer.type, - buffer.output); - int path_delay(0); - for (auto wire : buf_wires) { -#ifdef SDC_DEBUG - log("%s wire: %s\n", buffer.type.c_str(), - RTLIL::id2cstr(wire->name)); -#endif - path_delay += buffer.delay; - AddClock(wire, Clock::Period(clock_wire), - Clock::RisingEdge(clock_wire) + path_delay, - Clock::FallingEdge(clock_wire) + path_delay); - } - } -} - -void Clocks::PropagateThroughClockDividers(ClockDividerPropagation* pass, RTLIL::Design* design, - ClockDivider divider) { - for (auto& clock_wire : Clocks::GetClocks(design)) { -#ifdef SDC_DEBUG - log("Processing clock %s\n", Clock::ClockWireName(clock_wire).c_str()); -#endif - pass->PropagateClocksForCellType(clock_wire, divider.type); - } -} diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 4b8a9e4c0..6fab3eaa6 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -31,6 +31,12 @@ class Propagation; class Clock { public: + static void Add(const std::string& name, RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge); + static void Add(const std::string& name, std::vector wires, + float period, float rising_edge, float falling_edge); + static void Add(RTLIL::Wire* wire, float period, + float rising_edge, float falling_edge); static float Period(RTLIL::Wire* clock_wire); static float RisingEdge(RTLIL::Wire* clock_wire); static float FallingEdge(RTLIL::Wire* clock_wire); @@ -42,22 +48,7 @@ class Clock { class Clocks { public: - static void AddClock(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge); - static void AddClock(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); - static void AddClock(RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); static const std::vector GetClocks(RTLIL::Design* design); - void Propagate(RTLIL::Design* design, NaturalPropagation* pass); - void Propagate(RTLIL::Design* design, BufferPropagation* pass); - void Propagate(RTLIL::Design* design, ClockDividerPropagation* pass); - - private: - void PropagateThroughBuffers(Propagation* pass, RTLIL::Design* design, - Buffer buffer); - void PropagateThroughClockDividers(ClockDividerPropagation* pass, RTLIL::Design* design, - ClockDivider divider); }; #endif // _CLOCKS_H_ diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 71ce4670c..dc24d00dc 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -20,47 +20,44 @@ USING_YOSYS_NAMESPACE -std::vector NaturalPropagation::FindAliasWires( - RTLIL::Wire* wire) { - RTLIL::Module* top_module = design_->top_module(); - assert(top_module); - std::vector alias_wires; - pass_->extra_args( - std::vector{ - top_module->name.str() + "/w:" + wire->name.str(), "%a"}, - 0, design_); - for (auto module : design_->selected_modules()) { - for (auto wire : module->selected_wires()) { - alias_wires.push_back(wire); +void Propagation::PropagateThroughBuffers(Buffer buffer) { + for (auto& clock_wire : Clocks::GetClocks(design_)) { +#ifdef SDC_DEBUG + log("Clock wire %s\n", Clock::ClockWireName(clock_wire).c_str()); +#endif + auto buf_wires = + FindSinkWiresForCellType(clock_wire, buffer.type, buffer.output); + int path_delay(0); + for (auto wire : buf_wires) { +#ifdef SDC_DEBUG + log("%s wire: %s\n", buffer.type.c_str(), + RTLIL::id2cstr(wire->name)); +#endif + path_delay += buffer.delay; + Clock::Add(wire, Clock::Period(clock_wire), + Clock::RisingEdge(clock_wire) + path_delay, + Clock::FallingEdge(clock_wire) + path_delay); } } - return alias_wires; } -void ClockDividerPropagation::PropagateClocksForCellType( - RTLIL::Wire* driver_wire, const std::string& cell_type) { - if (cell_type == "PLLE2_ADV") { - RTLIL::Cell* cell = NULL; - for (auto input : Pll::inputs) { - cell = FindSinkCellOnPort(driver_wire, input); - if (cell and RTLIL::unescape_id(cell->type) == cell_type) { - break; - } - } - if (!cell) { - return; - } - Pll pll(cell, Clock::Period(driver_wire), Clock::RisingEdge(driver_wire)); - for (auto output : Pll::outputs) { - RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); - if (wire) { - float clkout_period(pll.clkout_period.at(output)); - float clkout_rising_edge(pll.clkout_rising_edge.at(output)); - float clkout_falling_edge(pll.clkout_falling_edge.at(output)); - Clocks::AddClock(wire, clkout_period, clkout_rising_edge, clkout_falling_edge); - } - } +std::vector Propagation::FindSinkWiresForCellType( + RTLIL::Wire* driver_wire, const std::string& cell_type, + const std::string& cell_port) { + std::vector wires; + if (!driver_wire) { + return wires; + } + auto cell = FindSinkCellOfType(driver_wire, cell_type); + RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); + if (wire) { + wires.push_back(wire); + auto further_wires = + FindSinkWiresForCellType(wire, cell_type, cell_port); + std::copy(further_wires.begin(), further_wires.end(), + std::back_inserter(wires)); } + return wires; } RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, @@ -89,25 +86,6 @@ RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, return sink_cell; } -std::vector Propagation::FindSinkWiresForCellType( - RTLIL::Wire* driver_wire, const std::string& cell_type, - const std::string& cell_port) { - std::vector wires; - if (!driver_wire) { - return wires; - } - auto cell = FindSinkCellOfType(driver_wire, cell_type); - RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); - if (wire) { - wires.push_back(wire); - auto further_wires = - FindSinkWiresForCellType(wire, cell_type, cell_port); - std::copy(further_wires.begin(), further_wires.end(), - std::back_inserter(wires)); - } - return wires; -} - RTLIL::Cell* Propagation::FindSinkCellOnPort(RTLIL::Wire* wire, const std::string& port) { RTLIL::Cell* sink_cell = NULL; @@ -161,3 +139,102 @@ RTLIL::Wire* Propagation::FindSinkWireOnPort(RTLIL::Cell* cell, } return sink_wire; } +void NaturalPropagation::Run() { +#ifdef SDC_DEBUG + log("Start natural clock propagation\n"); +#endif + for (auto& clock_wire : Clocks::GetClocks(design_)) { +#ifdef SDC_DEBUG + log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); +#endif + auto aliases = FindAliasWires(clock_wire); + Clock::Add(Clock::ClockWireName(clock_wire), aliases, + Clock::Period(clock_wire), Clock::RisingEdge(clock_wire), + Clock::FallingEdge(clock_wire)); + } +#ifdef SDC_DEBUG + log("Finish natural clock propagation\n\n"); +#endif +} + +std::vector NaturalPropagation::FindAliasWires( + RTLIL::Wire* wire) { + RTLIL::Module* top_module = design_->top_module(); + assert(top_module); + std::vector alias_wires; + pass_->extra_args( + std::vector{ + top_module->name.str() + "/w:" + wire->name.str(), "%a"}, + 0, design_); + for (auto module : design_->selected_modules()) { + for (auto wire : module->selected_wires()) { + alias_wires.push_back(wire); + } + } + return alias_wires; +} + +void BufferPropagation::Run() { +#ifdef SDC_DEBUG + log("Start buffer clock propagation\n"); + log("IBUF pass\n"); +#endif + PropagateThroughBuffers(IBuf()); +#ifdef SDC_DEBUG + log("BUFG pass\n"); +#endif + PropagateThroughBuffers(Bufg()); +#ifdef SDC_DEBUG + log("Finish buffer clock propagation\n\n"); +#endif +} + +void ClockDividerPropagation::Run() { +#ifdef SDC_DEBUG + log("Start clock divider clock propagation\n"); +#endif + PropagateThroughClockDividers(Pll()); + PropagateThroughBuffers(Bufg()); +#ifdef SDC_DEBUG + log("Finish clock divider clock propagation\n\n"); +#endif +} + +void ClockDividerPropagation::PropagateThroughClockDividers( + ClockDivider divider) { + for (auto& clock_wire : Clocks::GetClocks(design_)) { +#ifdef SDC_DEBUG + log("Processing clock %s\n", Clock::ClockWireName(clock_wire).c_str()); +#endif + PropagateClocksForCellType(clock_wire, divider.type); + } +} + +void ClockDividerPropagation::PropagateClocksForCellType( + RTLIL::Wire* driver_wire, const std::string& cell_type) { + if (cell_type == "PLLE2_ADV") { + RTLIL::Cell* cell = NULL; + for (auto input : Pll::inputs) { + cell = FindSinkCellOnPort(driver_wire, input); + if (cell and RTLIL::unescape_id(cell->type) == cell_type) { + break; + } + } + if (!cell) { + return; + } + Pll pll(cell, Clock::Period(driver_wire), + Clock::RisingEdge(driver_wire)); + for (auto output : Pll::outputs) { + RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); + if (wire) { + float clkout_period(pll.clkout_period.at(output)); + float clkout_rising_edge(pll.clkout_rising_edge.at(output)); + float clkout_falling_edge(pll.clkout_falling_edge.at(output)); + Clock::Add(wire, clkout_period, clkout_rising_edge, + clkout_falling_edge); + } + } + } +} + diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index f9f06acde..788b138bc 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -26,17 +26,18 @@ class Propagation { public: Propagation(RTLIL::Design* design, Pass* pass) : design_(design), pass_(pass) {} - virtual ~Propagation(){} + virtual ~Propagation() {} - virtual void Run(Clocks& clocks) = 0; - std::vector FindSinkWiresForCellType( - RTLIL::Wire* driver_wire, const std::string& cell_type, - const std::string& cell_port); + virtual void Run() = 0; protected: RTLIL::Design* design_; Pass* pass_; + void PropagateThroughBuffers(Buffer buffer); + std::vector FindSinkWiresForCellType( + RTLIL::Wire* driver_wire, const std::string& cell_type, + const std::string& cell_port); RTLIL::Cell* FindSinkCellOfType(RTLIL::Wire* wire, const std::string& type); RTLIL::Cell* FindSinkCellOnPort(RTLIL::Wire* wire, const std::string& port); RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, @@ -48,7 +49,7 @@ class NaturalPropagation : public Propagation { NaturalPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} - void Run(Clocks& clocks) override { clocks.Propagate(design_, this); } + void Run() override; std::vector FindAliasWires(RTLIL::Wire* wire); }; @@ -57,7 +58,7 @@ class BufferPropagation : public Propagation { BufferPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} - void Run(Clocks& clocks) override { clocks.Propagate(design_, this); } + void Run() override; }; class ClockDividerPropagation : public Propagation { @@ -65,8 +66,9 @@ class ClockDividerPropagation : public Propagation { ClockDividerPropagation(RTLIL::Design* design, Pass* pass) : Propagation(design, pass) {} - void Run(Clocks& clocks) override { clocks.Propagate(design_, this); } + void Run() override; void PropagateClocksForCellType(RTLIL::Wire* driver_wire, - const std::string& cell_type); + const std::string& cell_type); + void PropagateThroughClockDividers(ClockDivider divider); }; #endif // PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 9d5590609..b9403019b 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -61,8 +61,8 @@ struct ReadSdcCmd : public Frontend { }; struct WriteSdcCmd : public Backend { - WriteSdcCmd(Clocks& clocks, SdcWriter& sdc_writer) - : Backend("sdc", "Write SDC file"), clocks_(clocks), sdc_writer_(sdc_writer) {} + WriteSdcCmd(SdcWriter& sdc_writer) + : Backend("sdc", "Write SDC file"), sdc_writer_(sdc_writer) {} void help() override { log("\n"); @@ -82,13 +82,12 @@ struct WriteSdcCmd : public Backend { sdc_writer_.WriteSdc(design, *f); } - Clocks& clocks_; SdcWriter& sdc_writer_; }; struct CreateClockCmd : public Pass { - CreateClockCmd(Clocks& clocks) - : Pass("create_clock", "Create clock object"), clocks_(clocks) {} + CreateClockCmd() + : Pass("create_clock", "Create clock object") {} void help() override { log("\n"); @@ -170,7 +169,7 @@ struct CreateClockCmd : public Pass { rising_edge = 0; falling_edge = period / 2; } - clocks_.AddClock(name, selected_wires, period, rising_edge, + Clock::Add(name, selected_wires, period, rising_edge, falling_edge); } @@ -179,8 +178,6 @@ struct CreateClockCmd : public Pass { std::transform(selection_begin, args.end(), selection_begin, [](std::string& w) { return "w:" + w; }); } - - Clocks& clocks_; }; struct GetClocksCmd : public Pass { @@ -216,9 +213,8 @@ struct GetClocksCmd : public Pass { }; struct PropagateClocksCmd : public Pass { - PropagateClocksCmd(Clocks& clocks) - : Pass("propagate_clocks", "Propagate clock information"), - clocks_(clocks) {} + PropagateClocksCmd() + : Pass("propagate_clocks", "Propagate clock information") {} void help() override { log("\n"); @@ -228,8 +224,11 @@ struct PropagateClocksCmd : public Pass { log("\n"); } - void execute(__attribute__((unused)) std::vector args, + void execute(std::vector args, RTLIL::Design* design) override { + if (args.size() > 1) { + log_warning("Command accepts no arguments.\nAll will be ignored.\n"); + } if (!design->top_module()) { log_cmd_error("No top module selected\n"); } @@ -243,19 +242,15 @@ struct PropagateClocksCmd : public Pass { log("Perform clock propagation\n"); for (auto& pass : passes) { - pass->Run(clocks_); + pass->Run(); } } - - Clocks& clocks_; }; class SdcPlugin { public: SdcPlugin() - : write_sdc_cmd_(clocks_, sdc_writer_), - create_clock_cmd_(clocks_), - propagate_clocks_cmd_(clocks_), + : write_sdc_cmd_(sdc_writer_), set_false_path_cmd_(sdc_writer_), set_max_delay_cmd_(sdc_writer_), set_clock_groups_cmd_(sdc_writer_) { @@ -272,7 +267,6 @@ class SdcPlugin { SetClockGroups set_clock_groups_cmd_; private: - Clocks clocks_; SdcWriter sdc_writer_; } SdcPlugin; diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index 4fcf9bef7..b045b3c68 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -24,3 +24,4 @@ close $fh # Write out the SDC file after the clock propagation step write_sdc $::env(DESIGN_TOP).sdc +write_json $::env(DESIGN_TOP).json From 4008f3f8fe921ebd75c0b426e9fe78dc5290db15 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 26 Oct 2020 10:57:52 +0100 Subject: [PATCH 217/845] SDC: Add test for SDC written for design restored from json Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 4 +++- .../restore_from_json/restore_from_json.tcl | 16 ++++++++++++++++ .../tests/restore_from_json/restore_from_json.v | 11 +++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/restore_from_json/restore_from_json.tcl create mode 100644 sdc-plugin/tests/restore_from_json/restore_from_json.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 3b45b57ab..c507ee82c 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -11,7 +11,8 @@ TESTS = counter \ pll_approx_equal \ set_false_path \ set_max_delay \ - set_clock_groups + set_clock_groups \ + restore_from_json include $(shell pwd)/../../Makefile_test.common @@ -24,3 +25,4 @@ pll_approx_equal_verify = $(call diff_test,pll_approx_equal,sdc) set_false_path_verify = $(call diff_test,set_false_path,sdc) set_max_delay_verify = $(call diff_test,set_max_delay,sdc) set_clock_groups_verify = $(call diff_test,set_clock_groups,sdc) +restore_from_json_verify = diff restore_from_json/restore_from_json_1.sdc restore_from_json/restore_from_json_2.sdc diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl new file mode 100644 index 000000000..288419b3c --- /dev/null +++ b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl @@ -0,0 +1,16 @@ +yosys -import + +plugin -i sdc + +yosys -import + +read_verilog $::env(DESIGN_TOP).v +synth_xilinx +create_clock -period 10 clk +propagate_clocks +write_sdc $::env(DESIGN_TOP)_1.sdc +write_json $::env(DESIGN_TOP).json + +design -push +read_json $::env(DESIGN_TOP).json +write_sdc $::env(DESIGN_TOP)_2.sdc diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.v b/sdc-plugin/tests/restore_from_json/restore_from_json.v new file mode 100644 index 000000000..0c35ede11 --- /dev/null +++ b/sdc-plugin/tests/restore_from_json/restore_from_json.v @@ -0,0 +1,11 @@ +module top(input clk, input i, output o); + +reg [0:0] outff = 0; + +assign o = outff; + +always @(posedge clk) begin + outff <= i; +end + +endmodule From fccd5f9ee714e107dd0967c0e0fb88bd2824f98f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 26 Oct 2020 10:58:44 +0100 Subject: [PATCH 218/845] SDC: Sort SDC output by wire names Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 21 ++++++++++++++------- sdc-plugin/clocks.h | 14 ++++++++------ sdc-plugin/propagation.cc | 15 +++++++++------ sdc-plugin/sdc.cc | 7 ++++--- sdc-plugin/sdc_writer.cc | 5 +++-- 5 files changed, 38 insertions(+), 24 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 9f259d5d4..5ac281945 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -28,7 +28,7 @@ void Clock::Add(const std::string& name, RTLIL::Wire* wire, float period, wire->set_string_attribute(RTLIL::escape_id("CLASS"), "clock"); wire->set_string_attribute(RTLIL::escape_id("NAME"), name); wire->set_string_attribute(RTLIL::escape_id("SOURCE_PINS"), - Clock::ClockWireName(wire)); + Clock::WireName(wire)); wire->set_string_attribute(RTLIL::escape_id("PERIOD"), std::to_string(period)); std::string waveform(std::to_string(rising_edge) + " " + @@ -45,7 +45,7 @@ void Clock::Add(const std::string& name, std::vector wires, void Clock::Add(RTLIL::Wire* wire, float period, float rising_edge, float falling_edge) { - Add(Clock::ClockWireName(wire), wire, period, rising_edge, falling_edge); + Add(Clock::WireName(wire), wire, period, rising_edge, falling_edge); } float Clock::Period(RTLIL::Wire* clock_wire) { @@ -64,7 +64,7 @@ std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { if (!period) { log_cmd_error( "Neither PERIOD nor WAVEFORM has been specified for wire %s\n", - ClockWireName(clock_wire).c_str()); + WireName(clock_wire).c_str()); return std::make_pair(0, 0); } float falling_edge = period / 2; @@ -90,7 +90,14 @@ float Clock::FallingEdge(RTLIL::Wire* clock_wire) { return Waveform(clock_wire).second; } -std::string Clock::ClockWireName(RTLIL::Wire* wire) { +std::string Clock::Name(RTLIL::Wire* clock_wire) { + if (clock_wire->has_attribute(RTLIL::escape_id("NAME"))) { + return clock_wire->get_string_attribute(RTLIL::escape_id("NAME")); + } + return WireName(clock_wire); +} + +std::string Clock::WireName(RTLIL::Wire* wire) { if (!wire) { return std::string(); } @@ -98,15 +105,15 @@ std::string Clock::ClockWireName(RTLIL::Wire* wire) { return std::regex_replace(wire_name, std::regex{"\\$"}, "\\$"); } -const std::vector Clocks::GetClocks(RTLIL::Design* design) { - std::vector clock_wires; +const std::map Clocks::GetClocks(RTLIL::Design* design) { + std::map clock_wires; RTLIL::Module* top_module = design->top_module(); for (auto& wire_obj : top_module->wires_) { auto& wire = wire_obj.second; if (wire->has_attribute(RTLIL::escape_id("CLOCK_SIGNAL"))) { if (wire->get_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL")) == "yes") { - clock_wires.push_back(wire); + clock_wires.insert(std::make_pair(Clock::WireName(wire), wire)); } } } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 6fab3eaa6..d405c62c4 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -18,6 +18,7 @@ #ifndef _CLOCKS_H_ #define _CLOCKS_H_ +#include #include #include "buffers.h" #include "kernel/rtlil.h" @@ -32,15 +33,16 @@ class Propagation; class Clock { public: static void Add(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); + float rising_edge, float falling_edge); static void Add(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge); - static void Add(RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); + float period, float rising_edge, float falling_edge); + static void Add(RTLIL::Wire* wire, float period, float rising_edge, + float falling_edge); static float Period(RTLIL::Wire* clock_wire); static float RisingEdge(RTLIL::Wire* clock_wire); static float FallingEdge(RTLIL::Wire* clock_wire); - static std::string ClockWireName(RTLIL::Wire* wire); + static std::string Name(RTLIL::Wire* clock_wire); + static std::string WireName(RTLIL::Wire* wire); private: static std::pair Waveform(RTLIL::Wire* clock_wire); @@ -48,7 +50,7 @@ class Clock { class Clocks { public: - static const std::vector GetClocks(RTLIL::Design* design); + static const std::map GetClocks(RTLIL::Design* design); }; #endif // _CLOCKS_H_ diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index dc24d00dc..a2dffe246 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -21,9 +21,10 @@ USING_YOSYS_NAMESPACE void Propagation::PropagateThroughBuffers(Buffer buffer) { - for (auto& clock_wire : Clocks::GetClocks(design_)) { + for (auto& clock : Clocks::GetClocks(design_)) { + auto& clock_wire = clock.second; #ifdef SDC_DEBUG - log("Clock wire %s\n", Clock::ClockWireName(clock_wire).c_str()); + log("Clock wire %s\n", Clock::WireName(clock_wire).c_str()); #endif auto buf_wires = FindSinkWiresForCellType(clock_wire, buffer.type, buffer.output); @@ -143,12 +144,13 @@ void NaturalPropagation::Run() { #ifdef SDC_DEBUG log("Start natural clock propagation\n"); #endif - for (auto& clock_wire : Clocks::GetClocks(design_)) { + for (auto& clock : Clocks::GetClocks(design_)) { + auto& clock_wire = clock.second; #ifdef SDC_DEBUG log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); #endif auto aliases = FindAliasWires(clock_wire); - Clock::Add(Clock::ClockWireName(clock_wire), aliases, + Clock::Add(Clock::WireName(clock_wire), aliases, Clock::Period(clock_wire), Clock::RisingEdge(clock_wire), Clock::FallingEdge(clock_wire)); } @@ -202,9 +204,10 @@ void ClockDividerPropagation::Run() { void ClockDividerPropagation::PropagateThroughClockDividers( ClockDivider divider) { - for (auto& clock_wire : Clocks::GetClocks(design_)) { + for (auto& clock : Clocks::GetClocks(design_)) { + auto& clock_wire = clock.second; #ifdef SDC_DEBUG - log("Processing clock %s\n", Clock::ClockWireName(clock_wire).c_str()); + log("Processing clock %s\n", Clock::WireName(clock_wire).c_str()); #endif PropagateClocksForCellType(clock_wire, divider.type); } diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index b9403019b..880eeb25f 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -197,13 +197,14 @@ struct GetClocksCmd : public Pass { if (args.size() > 1) { log_warning("Command doesn't support arguments, so they will be ignored.\n"); } - std::vector clock_wires(Clocks::GetClocks(design)); - if (clock_wires.size() == 0) { + std::map clocks(Clocks::GetClocks(design)); + if (clocks.size() == 0) { log_warning("No clocks found in design\n"); } Tcl_Interp* interp = yosys_get_tcl_interp(); Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); - for (auto wire : clock_wires) { + for (auto& clock : clocks) { + auto& wire = clock.second; const char* name = RTLIL::id2cstr(wire->name); Tcl_Obj* name_obj = Tcl_NewStringObj(name, -1); Tcl_ListObjAppendElement(interp, tcl_list, name_obj); diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index 41ebfa382..80c8e5e35 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -45,15 +45,16 @@ void SdcWriter::WriteSdc(RTLIL::Design* design, std::ostream& file) { } void SdcWriter::WriteClocks(RTLIL::Design* design, std::ostream& file) { - for (auto& clock_wire : Clocks::GetClocks(design)) { + for (auto& clock : Clocks::GetClocks(design)) { // FIXME: Input port nets are not found in VPR + auto& clock_wire = clock.second; if (clock_wire->port_input) { continue; } file << "create_clock -period " << Clock::Period(clock_wire); file << " -waveform {" << Clock::RisingEdge(clock_wire) << " " << Clock::FallingEdge(clock_wire) << "}"; - file << " " << Clock::ClockWireName(clock_wire); + file << " " << Clock::WireName(clock_wire); file << std::endl; } } From 4f367b500d46422bbb315103bf6f1d2dcfa79728 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 26 Oct 2020 11:07:20 +0100 Subject: [PATCH 219/845] SDC: Fix tests golden references after SDC clock sorting Signed-off-by: Tomasz Michalak --- Makefile_test.common | 2 +- sdc-plugin/tests/counter/counter.golden.sdc | 4 ++-- sdc-plugin/tests/counter2/counter2.golden.sdc | 4 ++-- sdc-plugin/tests/pll/pll.golden.sdc | 6 +++--- .../tests/pll_approx_equal/pll_approx_equal.golden.sdc | 6 +++--- sdc-plugin/tests/pll_div/pll_div.golden.sdc | 6 +++--- sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Makefile_test.common b/Makefile_test.common index 5f05cd71e..fe8ffce28 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -33,7 +33,7 @@ $(1)/ok: $(1)/$(1).v endef -diff_test = bash -c "diff <(sort $(1)/$(1).golden.$(2)) <(sort $(1)/$(1).$(2))" +diff_test = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) all: $(TESTS) .PHONY: all clean $(TESTS) diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/sdc-plugin/tests/counter/counter.golden.sdc index c1a2ea140..5be53e39d 100644 --- a/sdc-plugin/tests/counter/counter.golden.sdc +++ b/sdc-plugin/tests/counter/counter.golden.sdc @@ -1,6 +1,6 @@ -create_clock -period 10 -waveform {0 5} clk_int_1 -create_clock -period 10 -waveform {0 5} ibuf_proxy_out create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1918 create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1920 +create_clock -period 10 -waveform {0 5} clk_int_1 +create_clock -period 10 -waveform {0 5} ibuf_proxy_out create_clock -period 10 -waveform {0 5} middle_inst_1.clk_int create_clock -period 10 -waveform {0 5} middle_inst_4.clk diff --git a/sdc-plugin/tests/counter2/counter2.golden.sdc b/sdc-plugin/tests/counter2/counter2.golden.sdc index 4bf0bf250..33152b3f7 100644 --- a/sdc-plugin/tests/counter2/counter2.golden.sdc +++ b/sdc-plugin/tests/counter2/counter2.golden.sdc @@ -1,6 +1,6 @@ -create_clock -period 10 -waveform {0 5} clk_int_1 -create_clock -period 10 -waveform {0 5} ibuf_proxy_out create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1918 create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1920 +create_clock -period 10 -waveform {0 5} clk_int_1 +create_clock -period 10 -waveform {0 5} ibuf_proxy_out create_clock -period 10 -waveform {0 5} middle_inst_1.clk_int create_clock -period 10 -waveform {1 6} middle_inst_4.clk diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index 7fe2b2a57..da025c528 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,8 +1,8 @@ create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 10 -waveform {2.5 7.5} main_clkout0 create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:247:execute\$1833 -create_clock -period 2.5 -waveform {0 1.25} main_clkout1 create_clock -period 5 -waveform {1.25 3.75} \$auto\$clkbufmap.cc:247:execute\$1835 +create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {2.5 7.5} main_clkout0 +create_clock -period 2.5 -waveform {0 1.25} main_clkout1 create_clock -period 5 -waveform {1.25 3.75} main_clkout2 diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc index add4f6abe..b97da3ef6 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc @@ -1,8 +1,8 @@ create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C create_clock -period 9.99999 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 9.99999 -waveform {0 5} main_clkout_x1 create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:247:execute\$1833 -create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 create_clock -period 2.5 -waveform {-1.875 -0.624999} \$auto\$clkbufmap.cc:247:execute\$1835 +create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 9.99999 -waveform {0 5} main_clkout_x1 +create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 create_clock -period 2.5 -waveform {-1.875 -0.624999} main_clkout_x4 diff --git a/sdc-plugin/tests/pll_div/pll_div.golden.sdc b/sdc-plugin/tests/pll_div/pll_div.golden.sdc index 14ea0bcf1..06031cf27 100644 --- a/sdc-plugin/tests/pll_div/pll_div.golden.sdc +++ b/sdc-plugin/tests/pll_div/pll_div.golden.sdc @@ -1,8 +1,8 @@ create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C create_clock -period 20 -waveform {5 15} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 20 -waveform {5 15} main_clkout0 create_clock -period 5 -waveform {0 2.5} \$auto\$clkbufmap.cc:247:execute\$1833 -create_clock -period 5 -waveform {0 2.5} main_clkout1 create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:247:execute\$1835 +create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 20 -waveform {5 15} main_clkout0 +create_clock -period 5 -waveform {0 2.5} main_clkout1 create_clock -period 10 -waveform {2.5 7.5} main_clkout2 diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc index e3f281c1b..df8301d91 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc @@ -1,8 +1,8 @@ create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 10 -waveform {0 5} main_clkout_x1 create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:247:execute\$1833 -create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 create_clock -period 2.5 -waveform {-1.875 -0.625} \$auto\$clkbufmap.cc:247:execute\$1835 +create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {0 5} main_clkout_x1 +create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 create_clock -period 2.5 -waveform {-1.875 -0.625} main_clkout_x4 From 819c5c9dcd4be568900ddde5567cfdcd2f47bdd2 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 27 Oct 2020 10:26:36 +0100 Subject: [PATCH 220/845] SDC: Add period and waveform format error checks Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 5ac281945..cd2b5f226 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -54,8 +54,13 @@ float Clock::Period(RTLIL::Wire* clock_wire) { "Period has not been specified\n Default value 0 will be used\n"); return 0; } - return std::stof( - clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); + float period(0); + try { + period = std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); + } catch (const std::invalid_argument& e) { + log_cmd_error("Incorrect PERIOD format\n"); + } + return period; } std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { @@ -78,7 +83,9 @@ std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { float falling_edge(0); std::string waveform( clock_wire->get_string_attribute(RTLIL::escape_id("WAVEFORM"))); - std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge); + if (std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge) != 2) { + log_cmd_error("Incorrect WAVEFORM format\n"); + } return std::make_pair(rising_edge, falling_edge); } From f4ac8690001860c4b74fc047945d39ad107a5900 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 27 Oct 2020 12:09:27 +0100 Subject: [PATCH 221/845] Add negative test checks to Makefile_test.common Makefile Signed-off-by: Tomasz Michalak --- Makefile_test.common | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/Makefile_test.common b/Makefile_test.common index fe8ffce28..dda651667 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -14,9 +14,10 @@ # define test_tpl = $(1): $(1)/ok - @$$($(1)_verify); \ - RETVAL=$$$$? ; \ - if [ $$$$RETVAL -eq 0 ]; then \ + @echo "Verifying result of test $(1)" + @set +e; \ + $$($(1)_verify); \ + if [ $$$$? -eq 0 ]; then \ echo "Test $(1) PASSED"; \ touch $$<; \ true; \ @@ -27,9 +28,25 @@ $(1): $(1)/ok $(1)/ok: $(1)/$(1).v @echo "Running test $(1)" - @cd $(1); \ + @set +e; \ + cd $(1); \ DESIGN_TOP=$(1) \ - yosys -c $(1).tcl -q -l $(1).log + yosys -c $(1).tcl -q -l $(1).log; \ + RETVAL=$$$$?; \ + if [ ! -z "$$($(1)_negative)" ] && [ $$($(1)_negative) -eq 1 ]; then \ + if [ $$$$RETVAL -ne 0 ]; then \ + echo "Negative test $(1) PASSED"; \ + true; \ + else \ + echo "Negative test $(1) FAILED"; \ + false; \ + fi \ + else \ + if [ $$$$RETVAL -ne 0 ]; then \ + echo "Unexpected runtime error"; \ + false; \ + fi \ + fi endef From 51c84cd77b46b7be74f21561dbc7c47b8e126976 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 27 Oct 2020 12:10:26 +0100 Subject: [PATCH 222/845] SDC: Add negative tests for waveform and period format Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 8 ++++- .../tests/period_check/period_check.tcl | 17 +++++++++ sdc-plugin/tests/period_check/period_check.v | 36 +++++++++++++++++++ .../tests/waveform_check/waveform_check.tcl | 17 +++++++++ .../tests/waveform_check/waveform_check.v | 36 +++++++++++++++++++ 5 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/period_check/period_check.tcl create mode 100644 sdc-plugin/tests/period_check/period_check.v create mode 100644 sdc-plugin/tests/waveform_check/waveform_check.tcl create mode 100644 sdc-plugin/tests/waveform_check/waveform_check.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index c507ee82c..607b14bd7 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -12,7 +12,9 @@ TESTS = counter \ set_false_path \ set_max_delay \ set_clock_groups \ - restore_from_json + restore_from_json \ + period_check \ + waveform_check include $(shell pwd)/../../Makefile_test.common @@ -26,3 +28,7 @@ set_false_path_verify = $(call diff_test,set_false_path,sdc) set_max_delay_verify = $(call diff_test,set_max_delay,sdc) set_clock_groups_verify = $(call diff_test,set_clock_groups,sdc) restore_from_json_verify = diff restore_from_json/restore_from_json_1.sdc restore_from_json/restore_from_json_2.sdc +period_check_verify = true +period_check_negative = 1 +waveform_check_verify = true +waveform_check_negative = 1 diff --git a/sdc-plugin/tests/period_check/period_check.tcl b/sdc-plugin/tests/period_check/period_check.tcl new file mode 100644 index 000000000..bc613deb6 --- /dev/null +++ b/sdc-plugin/tests/period_check/period_check.tcl @@ -0,0 +1,17 @@ +yosys -import +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog $::env(DESIGN_TOP).v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Propagate the clocks +propagate_clocks + +# Write out the SDC file after the clock propagation step +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/period_check/period_check.v b/sdc-plugin/tests/period_check/period_check.v new file mode 100644 index 000000000..e9fa7341e --- /dev/null +++ b/sdc-plugin/tests/period_check/period_check.v @@ -0,0 +1,36 @@ +module top((* CLOCK_SIGNAL = "yes", PERIOD = "bad_value", WAVEFORM = "0 5" *) input clk, + input clk2, + input [1:0] in, + output [5:0] out ); + +reg [1:0] cnt = 0; +wire clk_int_1, clk_int_2; +IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); +IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); +assign clk_int_1 = ibuf_out; +assign clk_int_2 = clk_int_1; + +always @(posedge clk_int_2) begin + cnt <= cnt + 1; +end + +middle middle_inst_1(.clk(ibuf_out), .out(out[2])); +middle middle_inst_2(.clk(clk_int_1), .out(out[3])); +middle middle_inst_3(.clk(clk_int_2), .out(out[4])); +middle middle_inst_4(.clk(clk2), .out(out[5])); + +assign out[1:0] = {cnt[0], in[0]}; +endmodule + +module middle(input clk, + output out); + +reg [1:0] cnt = 0; +wire clk_int; +assign clk_int = clk; +always @(posedge clk_int) begin + cnt <= cnt + 1; +end + +assign out = cnt[0]; +endmodule diff --git a/sdc-plugin/tests/waveform_check/waveform_check.tcl b/sdc-plugin/tests/waveform_check/waveform_check.tcl new file mode 100644 index 000000000..bc613deb6 --- /dev/null +++ b/sdc-plugin/tests/waveform_check/waveform_check.tcl @@ -0,0 +1,17 @@ +yosys -import +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog $::env(DESIGN_TOP).v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Propagate the clocks +propagate_clocks + +# Write out the SDC file after the clock propagation step +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/waveform_check/waveform_check.v b/sdc-plugin/tests/waveform_check/waveform_check.v new file mode 100644 index 000000000..a7ff22602 --- /dev/null +++ b/sdc-plugin/tests/waveform_check/waveform_check.v @@ -0,0 +1,36 @@ +module top((* CLOCK_SIGNAL = "yes", PERIOD = "10", WAVEFORM = "bad value" *) input clk, + input clk2, + input [1:0] in, + output [5:0] out ); + +reg [1:0] cnt = 0; +wire clk_int_1, clk_int_2; +IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); +IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); +assign clk_int_1 = ibuf_out; +assign clk_int_2 = clk_int_1; + +always @(posedge clk_int_2) begin + cnt <= cnt + 1; +end + +middle middle_inst_1(.clk(ibuf_out), .out(out[2])); +middle middle_inst_2(.clk(clk_int_1), .out(out[3])); +middle middle_inst_3(.clk(clk_int_2), .out(out[4])); +middle middle_inst_4(.clk(clk2), .out(out[5])); + +assign out[1:0] = {cnt[0], in[0]}; +endmodule + +module middle(input clk, + output out); + +reg [1:0] cnt = 0; +wire clk_int; +assign clk_int = clk; +always @(posedge clk_int) begin + cnt <= cnt + 1; +end + +assign out = cnt[0]; +endmodule From 502b1983044960e5c4f0e5ce28e2335bfaea5787 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 28 Oct 2020 12:15:28 +0100 Subject: [PATCH 223/845] SDC: Correct error messages for incorrect waveform and period values Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index cd2b5f226..4f2ab2967 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -55,10 +55,16 @@ float Clock::Period(RTLIL::Wire* clock_wire) { return 0; } float period(0); + std::string period_str; try { - period = std::stof(clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD"))); + period_str = + clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD")); + period = std::stof(period_str); } catch (const std::invalid_argument& e) { - log_cmd_error("Incorrect PERIOD format\n"); + log_cmd_error( + "Incorrect value '%s' specifed on PERIOD attribute for wire " + "'%s'.\nPERIOD needs to be a float value.\n", + period_str.c_str(), WireName(clock_wire).c_str()); } return period; } @@ -83,8 +89,13 @@ std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { float falling_edge(0); std::string waveform( clock_wire->get_string_attribute(RTLIL::escape_id("WAVEFORM"))); - if (std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge) != 2) { - log_cmd_error("Incorrect WAVEFORM format\n"); + if (std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge) != + 2) { + log_cmd_error( + "Incorrect value '%s' specifed on WAVEFORM attribute for wire " + "'%s'.\nWAVEFORM needs to be specified in form of ' " + "' where the edge values are floats.\n", + waveform.c_str(), WireName(clock_wire).c_str()); } return std::make_pair(rising_edge, falling_edge); } From f821f154810571b7f873500e922a2967cd6c7bab Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 28 Oct 2020 16:55:43 +0100 Subject: [PATCH 224/845] Add googletest submodule Signed-off-by: Tomasz Michalak --- .gitmodules | 3 +++ third_party/googletest | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 third_party/googletest diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..8d4f8c9fb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "third_party/googletest"] + path = third_party/googletest + url = https://github.com/google/googletest diff --git a/third_party/googletest b/third_party/googletest new file mode 160000 index 000000000..41b5f149a --- /dev/null +++ b/third_party/googletest @@ -0,0 +1 @@ +Subproject commit 41b5f149ab306e96b5b2faf523505d75acffd98a From aef351bd4907ac5a410f9b6e99f49ac09b233afc Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 28 Oct 2020 17:21:31 +0100 Subject: [PATCH 225/845] SDC: Extract regexp escaping to separate method Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 3 +-- sdc-plugin/clocks.h | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 4f2ab2967..638ba6651 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -119,8 +119,7 @@ std::string Clock::WireName(RTLIL::Wire* wire) { if (!wire) { return std::string(); } - std::string wire_name(RTLIL::unescape_id(wire->name)); - return std::regex_replace(wire_name, std::regex{"\\$"}, "\\$"); + return AddEscaping(RTLIL::unescape_id(wire->name)); } const std::map Clocks::GetClocks(RTLIL::Design* design) { diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index d405c62c4..2bcdf756e 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -43,6 +43,9 @@ class Clock { static float FallingEdge(RTLIL::Wire* clock_wire); static std::string Name(RTLIL::Wire* clock_wire); static std::string WireName(RTLIL::Wire* wire); + static std::string AddEscaping(const std::string& name) { + return std::regex_replace(name, std::regex{"\\$"}, "\\$"); + } private: static std::pair Waveform(RTLIL::Wire* clock_wire); From 4eb28d901f1653872948a3cc193d3bcd9455b5b6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 28 Oct 2020 17:25:10 +0100 Subject: [PATCH 226/845] Makefile_plugin: Add googletest unit test templates Signed-off-by: Tomasz Michalak --- Makefile_test.common | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/Makefile_test.common b/Makefile_test.common index dda651667..a2a350921 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -12,6 +12,12 @@ # test1_verify = $(call diff_test,test1,ext) && test $$(grep "PASS" test1/test1.txt | wc -l) -eq 2 # test2_verify = $(call diff_test,test2,ext) # +GTEST_DIR = ../../third_party/googletest/googletest +CXX = $(shell yosys-config --cxx) +CXXFLAGS = $(shell yosys-config --cxxflags) -I.. -I$(GTEST_DIR)/include +LDLIBS = $(shell yosys-config --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread +LDFLAGS = $(shell yosys-config --ldflags) + define test_tpl = $(1): $(1)/ok @echo "Verifying result of test $(1)" @@ -50,13 +56,34 @@ $(1)/ok: $(1)/$(1).v endef +define unit_test_tpl = +$(1): $(1)/$(1).test + @$$< + +$(1)/$(1).test: $(1)/$(1).test.o $$(GTEST_DIR)/build/lib/libgtest.a + @$(CXX) $(LDFLAGS) -o $$@ $$< $(LDLIBS) + +$(1)/$(1).test.o: $(1)/$(1).test.cc + @$(CXX) $(CXXFLAGS) $(LDFLAGS) -c $$< -o $$@ + +endef + diff_test = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) -all: $(TESTS) -.PHONY: all clean $(TESTS) +all: $(TESTS) $(UNIT_TESTS) + +$(GTEST_DIR)/build/lib/libgtest.a $(GTEST_DIR)/build/lib/libgtest_main.a: + @mkdir -p $(GTEST_DIR)/build + @cd $(GTEST_DIR)/build; \ + cmake ..; \ + make + +.PHONY: all clean $(TESTS) $(UNIT_TESTS) $(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) +$(foreach test,$(UNIT_TESTS),$(eval $(call unit_test_tpl,$(test)))) clean: @rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/$(test).eblif $(test)/$(test).json) + @rm -rf $(foreach test,$(UNIT_TESTS),$(test)/$(test).test.o $(test)/$(test).test.d $(test)/$(test).test) @find . -name "ok" -or -name "*.log" | xargs rm -rf From 33c53230ac49f7590eb5fff26bee57554dcdae21 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 28 Oct 2020 17:26:05 +0100 Subject: [PATCH 227/845] SDC: Add unit test for escaping dollar sign in wire names Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 2 ++ sdc-plugin/tests/escaping/escaping.test.cc | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 sdc-plugin/tests/escaping/escaping.test.cc diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 607b14bd7..b5f7f9643 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -16,6 +16,8 @@ TESTS = counter \ period_check \ waveform_check +UNIT_TESTS = escaping + include $(shell pwd)/../../Makefile_test.common counter_verify = $(call diff_test,counter,sdc) && $(call diff_test,counter,txt) diff --git a/sdc-plugin/tests/escaping/escaping.test.cc b/sdc-plugin/tests/escaping/escaping.test.cc new file mode 100644 index 000000000..e17eef6ed --- /dev/null +++ b/sdc-plugin/tests/escaping/escaping.test.cc @@ -0,0 +1,11 @@ +#include + +#include + +TEST(ClockTest, EscapeDollarSign) { + // convert wire_name to wire_name, i.e. unchanged + EXPECT_EQ(Clock::AddEscaping("wire_name"), "wire_name"); + // convert $wire_name to \$wire_name + EXPECT_EQ(Clock::AddEscaping("$wire_name"), "\\$wire_name"); +} + From a3c96cdfd574ddaf6037145841175d6d3201e04f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 29 Oct 2020 08:43:01 +0100 Subject: [PATCH 228/845] SDC: Add wire names to warning messages Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 638ba6651..f119f92d9 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -51,7 +51,9 @@ void Clock::Add(RTLIL::Wire* wire, float period, float rising_edge, float Clock::Period(RTLIL::Wire* clock_wire) { if (!clock_wire->has_attribute(RTLIL::escape_id("PERIOD"))) { log_warning( - "Period has not been specified\n Default value 0 will be used\n"); + "PERIOD has not been specified on wire '%s'.\nDefault value 0 will " + "be used\n", + WireName(clock_wire).c_str()); return 0; } float period(0); @@ -80,9 +82,9 @@ std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { } float falling_edge = period / 2; log_warning( - "Waveform has not been specified\n Default value {0 %f} will be " - "used\n", - falling_edge); + "Waveform has not been specified on wire '%s'.\nDefault value {0 %f} " + "will be used\n", + WireName(clock_wire).c_str(), falling_edge); return std::make_pair(0, falling_edge); } float rising_edge(0); @@ -122,7 +124,8 @@ std::string Clock::WireName(RTLIL::Wire* wire) { return AddEscaping(RTLIL::unescape_id(wire->name)); } -const std::map Clocks::GetClocks(RTLIL::Design* design) { +const std::map Clocks::GetClocks( + RTLIL::Design* design) { std::map clock_wires; RTLIL::Module* top_module = design->top_module(); for (auto& wire_obj : top_module->wires_) { From 9691ce5cd974a4fc4db183412903957d05894da5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 29 Oct 2020 08:53:53 +0100 Subject: [PATCH 229/845] SDC: Clock propagation should fail if PERIOD attribute is missing on wire Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 7 ++----- sdc-plugin/tests/period_check/period_check.v | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index f119f92d9..95ebaad96 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -50,11 +50,8 @@ void Clock::Add(RTLIL::Wire* wire, float period, float rising_edge, float Clock::Period(RTLIL::Wire* clock_wire) { if (!clock_wire->has_attribute(RTLIL::escape_id("PERIOD"))) { - log_warning( - "PERIOD has not been specified on wire '%s'.\nDefault value 0 will " - "be used\n", - WireName(clock_wire).c_str()); - return 0; + log_cmd_error("PERIOD has not been specified on wire '%s'.\n", + WireName(clock_wire).c_str()); } float period(0); std::string period_str; diff --git a/sdc-plugin/tests/period_check/period_check.v b/sdc-plugin/tests/period_check/period_check.v index e9fa7341e..77c1f9c64 100644 --- a/sdc-plugin/tests/period_check/period_check.v +++ b/sdc-plugin/tests/period_check/period_check.v @@ -1,4 +1,4 @@ -module top((* CLOCK_SIGNAL = "yes", PERIOD = "bad_value", WAVEFORM = "0 5" *) input clk, +module top((* CLOCK_SIGNAL = "yes", WAVEFORM = "0 5" *) input clk, input clk2, input [1:0] in, output [5:0] out ); From 02884087d8ad1b2f0d80d2feafc8ef9d7d1c8180 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 29 Oct 2020 08:54:28 +0100 Subject: [PATCH 230/845] SDC: Add PERIOD format check test Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 9 ++++- .../period_format_check.tcl | 17 +++++++++ .../period_format_check/period_format_check.v | 36 +++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/period_format_check/period_format_check.tcl create mode 100644 sdc-plugin/tests/period_format_check/period_format_check.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index b5f7f9643..3d602b78c 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -2,6 +2,10 @@ # set_false_path - test the set_false_path command # set_max_delay - test the set_max_delay command # set_clock_groups - test the set_clock_groups command +# restore_from_json - test clock propagation when design restored from json instead verilog +# period_check - test if the clock propagation fails if a clock wire is missing the PERIOD attribute +# waveform_check - test if the WAVEFORM attribute value is correct on wire +# period_format_check - test if PERIOD attribute value is correct on wire TESTS = counter \ counter2 \ @@ -14,7 +18,8 @@ TESTS = counter \ set_clock_groups \ restore_from_json \ period_check \ - waveform_check + waveform_check \ + period_format_check UNIT_TESTS = escaping @@ -34,3 +39,5 @@ period_check_verify = true period_check_negative = 1 waveform_check_verify = true waveform_check_negative = 1 +period_format_check_verify = true +period_format_check_negative = 1 diff --git a/sdc-plugin/tests/period_format_check/period_format_check.tcl b/sdc-plugin/tests/period_format_check/period_format_check.tcl new file mode 100644 index 000000000..bc613deb6 --- /dev/null +++ b/sdc-plugin/tests/period_format_check/period_format_check.tcl @@ -0,0 +1,17 @@ +yosys -import +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog $::env(DESIGN_TOP).v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Propagate the clocks +propagate_clocks + +# Write out the SDC file after the clock propagation step +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/period_format_check/period_format_check.v b/sdc-plugin/tests/period_format_check/period_format_check.v new file mode 100644 index 000000000..e6ab2944d --- /dev/null +++ b/sdc-plugin/tests/period_format_check/period_format_check.v @@ -0,0 +1,36 @@ +module top((* CLOCK_SIGNAL = "yes", PERIOD = "bad value", WAVEFORM = "0 5" *) input clk, + input clk2, + input [1:0] in, + output [5:0] out ); + +reg [1:0] cnt = 0; +wire clk_int_1, clk_int_2; +IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); +IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); +assign clk_int_1 = ibuf_out; +assign clk_int_2 = clk_int_1; + +always @(posedge clk_int_2) begin + cnt <= cnt + 1; +end + +middle middle_inst_1(.clk(ibuf_out), .out(out[2])); +middle middle_inst_2(.clk(clk_int_1), .out(out[3])); +middle middle_inst_3(.clk(clk_int_2), .out(out[4])); +middle middle_inst_4(.clk(clk2), .out(out[5])); + +assign out[1:0] = {cnt[0], in[0]}; +endmodule + +module middle(input clk, + output out); + +reg [1:0] cnt = 0; +wire clk_int; +assign clk_int = clk; +always @(posedge clk_int) begin + cnt <= cnt + 1; +end + +assign out = cnt[0]; +endmodule From f39d9f851959c40a3dec2105edc553edf489532f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 26 Oct 2020 14:36:17 +0100 Subject: [PATCH 231/845] SDC: Add -of and -include_generated_clocks switches to get_clocks Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 92 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 77 insertions(+), 15 deletions(-) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 880eeb25f..14478ccda 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -21,10 +21,10 @@ #include "kernel/register.h" #include "kernel/rtlil.h" #include "propagation.h" +#include "sdc_writer.h" +#include "set_clock_groups.h" #include "set_false_path.h" #include "set_max_delay.h" -#include "set_clock_groups.h" -#include "sdc_writer.h" USING_YOSYS_NAMESPACE @@ -73,7 +73,8 @@ struct WriteSdcCmd : public Backend { } void execute(std::ostream*& f, std::string filename, - std::vector args, RTLIL::Design* design) override { + std::vector args, + RTLIL::Design* design) override { if (args.size() < 2) { log_cmd_error("Missing output file.\n"); } @@ -86,8 +87,7 @@ struct WriteSdcCmd : public Backend { }; struct CreateClockCmd : public Pass { - CreateClockCmd() - : Pass("create_clock", "Create clock object") {} + CreateClockCmd() : Pass("create_clock", "Create clock object") {} void help() override { log("\n"); @@ -169,8 +169,7 @@ struct CreateClockCmd : public Pass { rising_edge = 0; falling_edge = period / 2; } - Clock::Add(name, selected_wires, period, rising_edge, - falling_edge); + Clock::Add(name, selected_wires, period, rising_edge, falling_edge); } void AddWirePrefix(std::vector& args, size_t argidx) { @@ -181,29 +180,92 @@ struct CreateClockCmd : public Pass { }; struct GetClocksCmd : public Pass { - GetClocksCmd() - : Pass("get_clocks", "Create clock object") {} + GetClocksCmd() : Pass("get_clocks", "Create clock object") {} void help() override { log("\n"); - log(" get_clocks\n"); + log(" get_clocks [-include_generated_clocks] [-of ] " + "[]\n"); log("\n"); log("Returns all clocks in the design.\n"); log("\n"); + log(" -include_generated_clocks\n"); + log(" Include auto-generated clocks.\n"); + log("\n"); + log(" -of\n"); + log(" Get clocks of these nets.\n"); + log("\n"); + log(" \n"); + log(" Pattern of clock names. Default are all clocks in the " + "design.\n"); + log("\n"); + } + + std::vector extract_list(const std::string& args) { + std::vector port_list; + std::stringstream ss(args); + std::istream_iterator begin(ss); + std::istream_iterator end; + std::copy(begin, end, std::back_inserter(port_list)); + return port_list; + } + + // TODO Check for GENERATED_CLOCK clock wire attribute + // For now don't treat any of the added clocks as auto-generated + bool IsGeneratedClock(RTLIL::Wire* clock_wire) { + (void)clock_wire; + return false; } void execute(std::vector args, RTLIL::Design* design) override { - if (args.size() > 1) { - log_warning("Command doesn't support arguments, so they will be ignored.\n"); + bool generated_clocks(false); + std::vector clocks_nets; + size_t argidx(0); + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-include_generated_clocks") { + generated_clocks = true; + continue; + } + if (arg == "-of" and argidx + 1 < args.size()) { + clocks_nets = extract_list(args[++argidx]); + continue; + } + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } + + break; } + std::vector clocks_list(args.begin() + argidx, args.end()); std::map clocks(Clocks::GetClocks(design)); if (clocks.size() == 0) { log_warning("No clocks found in design\n"); } +#ifdef SDC_DEBUG + for (auto clock_net : clocks_nets) { + log("Clock filter %s\n", clock_net.c_str()); + } +#endif Tcl_Interp* interp = yosys_get_tcl_interp(); Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); for (auto& clock : clocks) { + if (IsGeneratedClock(clock.second) and !generated_clocks) { + continue; + } + // Check if clock name is in the list of design clocks + if (clocks_list.size() > 0 and + std::find(clocks_list.begin(), clocks_list.end(), + clock.first) == clocks_list.end()) { + continue; + } + // Check if clock wire is in the -of list + if (clocks_nets.size() > 0 and + std::find(clocks_nets.begin(), clocks_nets.end(), + Clock::WireName(clock.second)) == clocks_nets.end()) { + continue; + } auto& wire = clock.second; const char* name = RTLIL::id2cstr(wire->name); Tcl_Obj* name_obj = Tcl_NewStringObj(name, -1); @@ -228,15 +290,15 @@ struct PropagateClocksCmd : public Pass { void execute(std::vector args, RTLIL::Design* design) override { if (args.size() > 1) { - log_warning("Command accepts no arguments.\nAll will be ignored.\n"); + log_warning( + "Command accepts no arguments.\nAll will be ignored.\n"); } if (!design->top_module()) { log_cmd_error("No top module selected\n"); } std::array, 2> passes{ - std::unique_ptr( - new BufferPropagation(design, this)), + std::unique_ptr(new BufferPropagation(design, this)), std::unique_ptr( new ClockDividerPropagation(design, this))}; From a2e11a8f33e53cf327193bffefedb22227aae5a6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 2 Nov 2020 10:10:22 +0100 Subject: [PATCH 232/845] SDC: Add test for get_clocks Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 4 ++- .../tests/get_clocks/get_clocks.golden.txt | 6 ++++ .../tests/get_clocks/get_clocks.input.sdc | 2 ++ sdc-plugin/tests/get_clocks/get_clocks.tcl | 35 +++++++++++++++++++ sdc-plugin/tests/get_clocks/get_clocks.v | 35 +++++++++++++++++++ 5 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/get_clocks/get_clocks.golden.txt create mode 100644 sdc-plugin/tests/get_clocks/get_clocks.input.sdc create mode 100644 sdc-plugin/tests/get_clocks/get_clocks.tcl create mode 100644 sdc-plugin/tests/get_clocks/get_clocks.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 3d602b78c..8604f8216 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -19,7 +19,8 @@ TESTS = counter \ restore_from_json \ period_check \ waveform_check \ - period_format_check + period_format_check \ + get_clocks UNIT_TESTS = escaping @@ -41,3 +42,4 @@ waveform_check_verify = true waveform_check_negative = 1 period_format_check_verify = true period_format_check_negative = 1 +get_clocks_verify = $(call diff_test,get_clocks,txt) diff --git a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt new file mode 100644 index 000000000..9c70eedcd --- /dev/null +++ b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt @@ -0,0 +1,6 @@ +{$auto$clkbufmap.cc:247:execute$1913} {$auto$clkbufmap.cc:247:execute$1915} clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk +{$auto$clkbufmap.cc:247:execute$1913} {$auto$clkbufmap.cc:247:execute$1915} clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk +clk2 +clk_int_1 +clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk +clk clk2 clk_int_1 diff --git a/sdc-plugin/tests/get_clocks/get_clocks.input.sdc b/sdc-plugin/tests/get_clocks/get_clocks.input.sdc new file mode 100644 index 000000000..01debad8a --- /dev/null +++ b/sdc-plugin/tests/get_clocks/get_clocks.input.sdc @@ -0,0 +1,2 @@ +create_clock -period 10.0 -waveform {0.000 5.000} clk_int_1 +create_clock -period 10.0 -name clk -waveform {0.000 5.000} clk clk2 diff --git a/sdc-plugin/tests/get_clocks/get_clocks.tcl b/sdc-plugin/tests/get_clocks/get_clocks.tcl new file mode 100644 index 000000000..10758b1da --- /dev/null +++ b/sdc-plugin/tests/get_clocks/get_clocks.tcl @@ -0,0 +1,35 @@ +yosys -import +plugin -i sdc +plugin -i design_introspection +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog $::env(DESIGN_TOP).v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top +# Start flow after library reading +synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Read the design's timing constraints +read_sdc $::env(DESIGN_TOP).input.sdc + +# Propagate the clocks +propagate_clocks + +# Write the clocks to file +set fh [open $::env(DESIGN_TOP).txt w] + +puts $fh [get_clocks] + +puts $fh [get_clocks -include_generated_clocks] + +puts $fh [get_clocks -include_generated_clocks clk2] + +puts $fh [get_clocks -of [get_nets clk_int_1 clk1] -include_generated_clocks clk_int_1] + +puts $fh [get_clocks -of [get_nets]] + +puts $fh [get_clocks -of [concat [get_nets clk2] [get_nets clk_int_1 clk]]] + +close $fh diff --git a/sdc-plugin/tests/get_clocks/get_clocks.v b/sdc-plugin/tests/get_clocks/get_clocks.v new file mode 100644 index 000000000..59531d220 --- /dev/null +++ b/sdc-plugin/tests/get_clocks/get_clocks.v @@ -0,0 +1,35 @@ +module top(input clk, + input clk2, + input [1:0] in, + output [5:0] out ); + +reg [1:0] cnt = 0; +wire clk_int_1, clk_int_2; +IBUF ibuf_inst(.I(clk), .O(ibuf_out)); +assign clk_int_1 = ibuf_out; +assign clk_int_2 = clk_int_1; + +always @(posedge clk_int_2) begin + cnt <= cnt + 1; +end + +middle middle_inst_1(.clk(ibuf_out), .out(out[2])); +middle middle_inst_2(.clk(clk_int_1), .out(out[3])); +middle middle_inst_3(.clk(clk_int_2), .out(out[4])); +middle middle_inst_4(.clk(clk2), .out(out[5])); + +assign out[1:0] = {cnt[0], in[0]}; +endmodule + +module middle(input clk, + output out); + +reg [1:0] cnt = 0; +wire clk_int; +assign clk_int = clk; +always @(posedge clk_int) begin + cnt <= cnt + 1; +end + +assign out = cnt[0]; +endmodule From 4d4a9be06b160f36cff3ee91082c12689956ec0f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 3 Nov 2020 09:24:06 +0100 Subject: [PATCH 233/845] SDC: Add comments to get_clocks command Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 14478ccda..a9b7f6a97 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -211,6 +211,7 @@ struct GetClocksCmd : public Pass { } // TODO Check for GENERATED_CLOCK clock wire attribute + // Issue https://github.com/SymbiFlow/yosys-symbiflow-plugins/issues/53 // For now don't treat any of the added clocks as auto-generated bool IsGeneratedClock(RTLIL::Wire* clock_wire) { (void)clock_wire; @@ -219,9 +220,13 @@ struct GetClocksCmd : public Pass { void execute(std::vector args, RTLIL::Design* design) override { + + // Parse command arguments bool generated_clocks(false); std::vector clocks_nets; size_t argidx(0); + + // Parse command switches for (argidx = 1; argidx < args.size(); argidx++) { std::string arg = args[argidx]; if (arg == "-include_generated_clocks") { @@ -230,6 +235,11 @@ struct GetClocksCmd : public Pass { } if (arg == "-of" and argidx + 1 < args.size()) { clocks_nets = extract_list(args[++argidx]); +#ifdef SDC_DEBUG + for (auto clock_net : clocks_nets) { + log("Clock filter %s\n", clock_net.c_str()); + } +#endif continue; } if (arg.size() > 0 and arg[0] == '-') { @@ -238,19 +248,21 @@ struct GetClocksCmd : public Pass { break; } + + // Parse object patterns std::vector clocks_list(args.begin() + argidx, args.end()); + + // Fetch clocks in the design std::map clocks(Clocks::GetClocks(design)); if (clocks.size() == 0) { log_warning("No clocks found in design\n"); } -#ifdef SDC_DEBUG - for (auto clock_net : clocks_nets) { - log("Clock filter %s\n", clock_net.c_str()); - } -#endif + + // Extract clocks into tcl list Tcl_Interp* interp = yosys_get_tcl_interp(); Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); for (auto& clock : clocks) { + // Skip generated clocks if -include_generated_clocks is not specified if (IsGeneratedClock(clock.second) and !generated_clocks) { continue; } From 30b8ce4c0607e358e49259e15999959ff7483f0f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 3 Nov 2020 17:10:15 +0100 Subject: [PATCH 234/845] SDC: Drop vpr switch in synth_xilinx Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/get_clocks/get_clocks.tcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdc-plugin/tests/get_clocks/get_clocks.tcl b/sdc-plugin/tests/get_clocks/get_clocks.tcl index 10758b1da..6f0eea707 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.tcl +++ b/sdc-plugin/tests/get_clocks/get_clocks.tcl @@ -9,7 +9,8 @@ read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +#synth_xilinx # Read the design's timing constraints read_sdc $::env(DESIGN_TOP).input.sdc From 0d3b0276f498f5e2ccc9b108e851f12654b27d7b Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 26 Nov 2020 11:44:39 +0100 Subject: [PATCH 235/845] ci: migrate from Travis CI to GH actions Signed-off-by: Alessandro Comodi --- .github/workflows/build-and-test.sh | 25 ++++++++++++ .github/workflows/ci.yml | 31 +++++++++++++++ .github/workflows/common.sh | 39 ++++++++++++++++++ .github/workflows/setup.sh | 45 +++++++++++++++++++++ .travis.yml | 49 ----------------------- .travis/build-and-test.sh | 61 ----------------------------- .travis/common.sh | 15 ------- .travis/setup.sh | 47 ---------------------- 8 files changed, 140 insertions(+), 172 deletions(-) create mode 100755 .github/workflows/build-and-test.sh create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/common.sh create mode 100755 .github/workflows/setup.sh delete mode 100644 .travis.yml delete mode 100755 .travis/build-and-test.sh delete mode 100644 .travis/common.sh delete mode 100755 .travis/setup.sh diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh new file mode 100755 index 000000000..8fd95f918 --- /dev/null +++ b/.github/workflows/build-and-test.sh @@ -0,0 +1,25 @@ +#! /bin/bash + +set -e + +source .github/workflows/common.sh + +########################################################################## + +start_section Building +make plugins -j`nproc` +end_section + +########################################################################## + +start_section Installing +make install -j`nproc` +end_section + +########################################################################## + +start_section Testing +make test -j`nproc` +end_section + +########################################################################## diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..42f581042 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI tests + +on: [push, pull_request] + +jobs: + + Run-tests: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + + - name: Install + run: | + sudo apt-get update + sudo apt-get install git g++-9 build-essential bison flex \ + libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot \ + pkg-config libboost-system-dev libboost-python-dev \ + libboost-filesystem-dev zlib1g-dev + + - name: Install Yosys + run: source .github/workflows/setup.sh + env: + OS: ${{ runner.os }} + + - name: Build and test plugins + run: source .github/workflows/build-and-test.sh + env: + OS: ${{ runner.os }} diff --git a/.github/workflows/common.sh b/.github/workflows/common.sh new file mode 100644 index 000000000..53e7033ac --- /dev/null +++ b/.github/workflows/common.sh @@ -0,0 +1,39 @@ +#! /bin/bash + +# Look for location binaries first +export PATH="$HOME/.local-bin/bin:$PATH" + +# OS X specific common setup +if [[ "${OS}" == "macOS" ]]; then + export PATH="/usr/local/opt/ccache/libexec:$PATH" +fi + +# Parallel builds! +MAKEFLAGS="-j 2" + +function action_fold() { + if [ "$1" = "start" ]; then + echo "::group::$2" + SECONDS=0 + else + duration=$SECONDS + echo "::endgroup::" + printf "${GRAY}took $(($duration / 60)) min $(($duration % 60)) sec.${NC}\n" + fi + return 0; +} + +function start_section() { + action_fold start "$1" + echo -e "${PURPLE}SymbiFlow Yosys Plugins${NC}: - $2${NC}" + echo -e "${GRAY}-------------------------------------------------------------------${NC}" +} + +export -f start_section + +function end_section() { + echo -e "${GRAY}-------------------------------------------------------------------${NC}" + action_fold end "$1" +} + +export -f end_section diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh new file mode 100755 index 000000000..e734b2a38 --- /dev/null +++ b/.github/workflows/setup.sh @@ -0,0 +1,45 @@ +#! /bin/bash + +set -e + +source .github/workflows/common.sh + +########################################################################## + +# Output status information. +start_section Status +( + set +e + set -x + git status + git branch -v + git log -n 5 --graph + git log --format=oneline -n 20 --graph +) +end_section + +########################################################################## + +#Install yosys +start_section Install-Yosys +( + if [ ! -e ~/.local-bin/bin/yosys ]; then + echo '==========================' + echo 'Building yosys' + echo '==========================' + mkdir -p ~/.local-src + mkdir -p ~/.local-bin + cd ~/.local-src + git clone https://github.com/SymbiFlow/yosys.git -b master+wip + cd yosys + PREFIX=$HOME/.local-bin make -j$(nproc) + PREFIX=$HOME/.local-bin make install + echo $(which yosys) + echo $(which yosys-config) + echo $(yosys-config --datdir) + fi +) +end_section + +########################################################################## + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 58b379e53..000000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -sudo: false -language: cpp - -#cache: -# ccache: false -# directories: -# - ~/.local-bin - - -env: - global: - - MAKEFLAGS="-j 2" - -include: - # Latest gcc supported on Travis Linux - - os: linux - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-9 - - gperf - - build-essential - - bison - - flex - - libreadline-dev - - gawk - - tcl-dev - - libffi-dev - - git - - graphviz - - xdot - - pkg-config - - python - - python3 - - libboost-system-dev - - libboost-python-dev - - libboost-filesystem-dev - - zlib1g-dev - env: - - MATRIX_EVAL="CONFIG=gcc && CC=gcc-9 && CXX=g++-9" - -before_install: - - ./.travis/setup.sh - -script: - - ./.travis/build-and-test.sh - diff --git a/.travis/build-and-test.sh b/.travis/build-and-test.sh deleted file mode 100755 index e1cd5dfa6..000000000 --- a/.travis/build-and-test.sh +++ /dev/null @@ -1,61 +0,0 @@ -#! /bin/bash - -set -e - -source .travis/common.sh - -########################################################################## - -echo -echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r' -echo - -if [ "$CONFIG" = "gcc" ]; then - echo "Configuring for gcc." - make config-gcc -elif [ "$CONFIG" = "clang" ]; then - echo "Configuring for clang." - make config-clang -fi - -echo -echo -en 'travis_fold:end:script.configure\\r' -echo - -########################################################################## - -echo -echo 'Building plugins..' && echo -en 'travis_fold:start:script.build\\r' -echo - -make plugins -j`nproc` - -echo -echo -en 'travis_fold:end:script.build\\r' -echo - -########################################################################## - -echo -echo 'Installing plugins...' && echo -en 'travis_fold:start:script.build\\r' -echo - -make install -j`nproc` - -echo -echo -en 'travis_fold:end:script.build\\r' -echo - -########################################################################## - -echo -echo 'Testing...' && echo -en 'travis_fold:start:script.test\\r' -echo - -make test -j`nproc` - -echo -echo -en 'travis_fold:end:script.test\\r' -echo - -########################################################################## diff --git a/.travis/common.sh b/.travis/common.sh deleted file mode 100644 index 8eecc4c09..000000000 --- a/.travis/common.sh +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/bash - -# Setup the CC / CXX from the matrix config -eval "${MATRIX_EVAL}" - -# Look for location binaries first -export PATH="$HOME/.local-bin/bin:$PATH" - -# OS X specific common setup -if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - export PATH="/usr/local/opt/ccache/libexec:$PATH" -fi - -# Parallel builds! -MAKEFLAGS="-j 2" diff --git a/.travis/setup.sh b/.travis/setup.sh deleted file mode 100755 index 3416017e2..000000000 --- a/.travis/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/bash - -set -e - -source .travis/common.sh - -########################################################################## - -# Output status information. -( - set +e - set -x - git status - git branch -v - git log -n 5 --graph - git log --format=oneline -n 20 --graph -) -echo -echo -en 'travis_fold:end:before_install.git\\r' -echo - -########################################################################## - -#Install yosys -( - if [ ! -e ~/.local-bin/bin/yosys ]; then - echo - echo 'Building yosys...' && echo -en 'travis_fold:start:before_install.yosys\\r' - echo - mkdir -p ~/.local-src - mkdir -p ~/.local-bin - cd ~/.local-src - git clone https://github.com/SymbiFlow/yosys.git -b master+wip - cd yosys - PREFIX=$HOME/.local-bin make -j$(nproc) - PREFIX=$HOME/.local-bin make install - echo $(which yosys) - echo $(which yosys-config) - echo $(yosys-config --datdir) - echo - echo -en 'travis_fold:end:before_install.yosys\\r' - echo - fi -) - -########################################################################## - From beef97606cb0b9ec20f89f18f01688d5b5d2e60a Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 26 Nov 2020 12:36:04 +0100 Subject: [PATCH 236/845] tests: remove -vpr flag as it was removed in yosys Signed-off-by: Alessandro Comodi --- design_introspection-plugin/tests/get_cells/get_cells.tcl | 2 +- design_introspection-plugin/tests/get_nets/get_nets.tcl | 2 +- design_introspection-plugin/tests/get_pins/get_pins.tcl | 2 +- design_introspection-plugin/tests/get_ports/get_ports.tcl | 2 +- params-plugin/tests/pll/pll.tcl | 2 +- sdc-plugin/tests/counter/counter.tcl | 2 +- sdc-plugin/tests/counter2/counter2.tcl | 2 +- sdc-plugin/tests/period_check/period_check.tcl | 2 +- sdc-plugin/tests/period_format_check/period_format_check.tcl | 2 +- sdc-plugin/tests/pll/pll.tcl | 2 +- sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl | 2 +- sdc-plugin/tests/pll_div/pll_div.tcl | 2 +- sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl | 2 +- sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl | 2 +- sdc-plugin/tests/set_false_path/set_false_path.tcl | 2 +- sdc-plugin/tests/set_max_delay/set_max_delay.tcl | 2 +- sdc-plugin/tests/waveform_check/waveform_check.tcl | 2 +- xdc-plugin/tests/counter/counter.tcl | 2 +- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl | 2 +- xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl | 2 +- xdc-plugin/tests/package_pins/package_pins.tcl | 2 +- xdc-plugin/tests/port_indexes/port_indexes.tcl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/design_introspection-plugin/tests/get_cells/get_cells.tcl b/design_introspection-plugin/tests/get_cells/get_cells.tcl index 861e6a954..85cc89780 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.tcl +++ b/design_introspection-plugin/tests/get_cells/get_cells.tcl @@ -5,7 +5,7 @@ yosys -import read_verilog get_cells.v # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp set fp [open "get_cells.txt" "w"] diff --git a/design_introspection-plugin/tests/get_nets/get_nets.tcl b/design_introspection-plugin/tests/get_nets/get_nets.tcl index c4fe329ea..2d3083afd 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.tcl +++ b/design_introspection-plugin/tests/get_nets/get_nets.tcl @@ -5,7 +5,7 @@ yosys -import read_verilog get_nets.v # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp set fp [open "get_nets.txt" "w"] diff --git a/design_introspection-plugin/tests/get_pins/get_pins.tcl b/design_introspection-plugin/tests/get_pins/get_pins.tcl index 144d453ef..e352df16e 100644 --- a/design_introspection-plugin/tests/get_pins/get_pins.tcl +++ b/design_introspection-plugin/tests/get_pins/get_pins.tcl @@ -5,7 +5,7 @@ yosys -import read_verilog get_pins.v # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp set fp [open "get_pins.txt" "w"] diff --git a/design_introspection-plugin/tests/get_ports/get_ports.tcl b/design_introspection-plugin/tests/get_ports/get_ports.tcl index 1ac5903c0..eca245d05 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.tcl +++ b/design_introspection-plugin/tests/get_ports/get_ports.tcl @@ -5,7 +5,7 @@ yosys -import read_verilog get_ports.v # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp help get_ports set fp [open "get_ports.txt" "w"] diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl index cc6e7b39f..999abad96 100644 --- a/params-plugin/tests/pll/pll.tcl +++ b/params-plugin/tests/pll/pll.tcl @@ -38,7 +38,7 @@ if {$phase == $reference_phase} { close $fp # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -run prepare:check # Map Xilinx tech library to 7-series VPR tech library. read_verilog -lib ./techmaps/cells_sim.v diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index b045b3c68..e68574ba8 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -8,7 +8,7 @@ read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design's timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/counter2/counter2.tcl b/sdc-plugin/tests/counter2/counter2.tcl index 4fcf9bef7..809b2b821 100644 --- a/sdc-plugin/tests/counter2/counter2.tcl +++ b/sdc-plugin/tests/counter2/counter2.tcl @@ -8,7 +8,7 @@ read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design's timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/period_check/period_check.tcl b/sdc-plugin/tests/period_check/period_check.tcl index bc613deb6..cdfdd2584 100644 --- a/sdc-plugin/tests/period_check/period_check.tcl +++ b/sdc-plugin/tests/period_check/period_check.tcl @@ -8,7 +8,7 @@ read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Propagate the clocks propagate_clocks diff --git a/sdc-plugin/tests/period_format_check/period_format_check.tcl b/sdc-plugin/tests/period_format_check/period_format_check.tcl index bc613deb6..cdfdd2584 100644 --- a/sdc-plugin/tests/period_format_check/period_format_check.tcl +++ b/sdc-plugin/tests/period_format_check/period_format_check.tcl @@ -8,7 +8,7 @@ read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Propagate the clocks propagate_clocks diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl index 5a2e3c47e..09973b838 100644 --- a/sdc-plugin/tests/pll/pll.tcl +++ b/sdc-plugin/tests/pll/pll.tcl @@ -9,7 +9,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl index 5a2e3c47e..09973b838 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl @@ -9,7 +9,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/pll_div/pll_div.tcl b/sdc-plugin/tests/pll_div/pll_div.tcl index 5a2e3c47e..09973b838 100644 --- a/sdc-plugin/tests/pll_div/pll_div.tcl +++ b/sdc-plugin/tests/pll_div/pll_div.tcl @@ -9,7 +9,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl index 5a2e3c47e..09973b838 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl @@ -9,7 +9,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl index 5e06b2cf4..223d9ec12 100644 --- a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl @@ -5,7 +5,7 @@ yosys -import read_verilog set_clock_groups.v # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp set_clock_groups -group clk1 clk2 set_clock_groups -asynchronous -group clk3 clk4 diff --git a/sdc-plugin/tests/set_false_path/set_false_path.tcl b/sdc-plugin/tests/set_false_path/set_false_path.tcl index ae1446974..dd510f325 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.tcl +++ b/sdc-plugin/tests/set_false_path/set_false_path.tcl @@ -5,7 +5,7 @@ yosys -import read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp # -to inter_wire net set_false_path -to inter_wire diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl index f2a5b4f66..6b7f23dfd 100644 --- a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl @@ -5,7 +5,7 @@ yosys -import read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp # -to inter_wire net set_max_delay 1 -to inter_wire diff --git a/sdc-plugin/tests/waveform_check/waveform_check.tcl b/sdc-plugin/tests/waveform_check/waveform_check.tcl index bc613deb6..cdfdd2584 100644 --- a/sdc-plugin/tests/waveform_check/waveform_check.tcl +++ b/sdc-plugin/tests/waveform_check/waveform_check.tcl @@ -8,7 +8,7 @@ read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -vpr -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check # Propagate the clocks propagate_clocks diff --git a/xdc-plugin/tests/counter/counter.tcl b/xdc-plugin/tests/counter/counter.tcl index be26ddeaa..b6ef30fdc 100644 --- a/xdc-plugin/tests/counter/counter.tcl +++ b/xdc-plugin/tests/counter/counter.tcl @@ -8,7 +8,7 @@ read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl index be26ddeaa..b6ef30fdc 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -8,7 +8,7 @@ read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl index 34d7947bc..fe1c07c28 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl @@ -8,7 +8,7 @@ read_verilog $::env(DESIGN_TOP).v read_verilog VexRiscv_Lite.v # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/xdc-plugin/tests/package_pins/package_pins.tcl index 2df419a10..2e0352e93 100644 --- a/xdc-plugin/tests/package_pins/package_pins.tcl +++ b/xdc-plugin/tests/package_pins/package_pins.tcl @@ -7,7 +7,7 @@ yosys -import read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc diff --git a/xdc-plugin/tests/port_indexes/port_indexes.tcl b/xdc-plugin/tests/port_indexes/port_indexes.tcl index 283cce592..e7f8e2961 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.tcl +++ b/xdc-plugin/tests/port_indexes/port_indexes.tcl @@ -8,7 +8,7 @@ read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. -synth_xilinx -vpr -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp if {[info procs unknown] != ""} { rename unknown "" From f495ef8538e061d44e4bb5e75afff51cb46c6b2d Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 26 Nov 2020 13:11:17 +0100 Subject: [PATCH 237/845] tests: update tests due to changes in yosys Some net names changed, presumably due to yosys changes Signed-off-by: Alessandro Comodi --- .../tests/get_cells/get_cells.golden.txt | 2 +- .../tests/get_nets/get_nets.golden.txt | 2 +- sdc-plugin/tests/counter/counter.golden.sdc | 4 ++-- sdc-plugin/tests/counter/counter.golden.txt | 2 +- sdc-plugin/tests/counter2/counter2.golden.sdc | 4 ++-- sdc-plugin/tests/counter2/counter2.golden.txt | 2 +- sdc-plugin/tests/get_clocks/get_clocks.golden.txt | 4 ++-- sdc-plugin/tests/pll/pll.golden.sdc | 10 +++++----- .../tests/pll_approx_equal/pll_approx_equal.golden.sdc | 10 +++++----- sdc-plugin/tests/pll_div/pll_div.golden.sdc | 10 +++++----- .../tests/pll_fbout_phase/pll_fbout_phase.golden.sdc | 10 +++++----- 11 files changed, 30 insertions(+), 30 deletions(-) diff --git a/design_introspection-plugin/tests/get_cells/get_cells.golden.txt b/design_introspection-plugin/tests/get_cells/get_cells.golden.txt index d33818de7..b6ff53be0 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.golden.txt +++ b/design_introspection-plugin/tests/get_cells/get_cells.golden.txt @@ -12,4 +12,4 @@ Filtered cells OBUFTDS_2 All cells -{$abc$2135$lut$not$aiger2134$1} {$auto$alumacc.cc:485:replace_alu$1469.slice[0].carry4_1st_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[0].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[1].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[1].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[2].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[2].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[3].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[3].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[4].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[4].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[5].carry4_full} {$auto$alumacc.cc:485:replace_alu$1469.slice[5].plug} {$auto$alumacc.cc:485:replace_alu$1469.slice[6].carry4_part} {$auto$simplemap.cc:420:simplemap_dff$1476} {$auto$simplemap.cc:420:simplemap_dff$1477} {$auto$simplemap.cc:420:simplemap_dff$1478} {$auto$simplemap.cc:420:simplemap_dff$1479} {$auto$simplemap.cc:420:simplemap_dff$1480} {$auto$simplemap.cc:420:simplemap_dff$1481} {$auto$simplemap.cc:420:simplemap_dff$1482} {$auto$simplemap.cc:420:simplemap_dff$1483} {$auto$simplemap.cc:420:simplemap_dff$1484} {$auto$simplemap.cc:420:simplemap_dff$1485} {$auto$simplemap.cc:420:simplemap_dff$1486} {$auto$simplemap.cc:420:simplemap_dff$1487} {$auto$simplemap.cc:420:simplemap_dff$1488} {$auto$simplemap.cc:420:simplemap_dff$1489} {$auto$simplemap.cc:420:simplemap_dff$1490} {$auto$simplemap.cc:420:simplemap_dff$1491} {$auto$simplemap.cc:420:simplemap_dff$1492} {$auto$simplemap.cc:420:simplemap_dff$1493} {$auto$simplemap.cc:420:simplemap_dff$1494} {$auto$simplemap.cc:420:simplemap_dff$1495} {$auto$simplemap.cc:420:simplemap_dff$1496} {$auto$simplemap.cc:420:simplemap_dff$1497} {$auto$simplemap.cc:420:simplemap_dff$1498} {$auto$simplemap.cc:420:simplemap_dff$1499} {$auto$simplemap.cc:420:simplemap_dff$1500} {$auto$simplemap.cc:420:simplemap_dff$1501} {$iopadmap$top.clk} OBUFTDS_2 OBUF_6 OBUF_7 OBUF_OUT bottom_inst.OBUF_10 bottom_inst.OBUF_11 bottom_inst.OBUF_9 bottom_intermediate_inst.OBUF_8 +{$abc$1984$lut$not$aiger1983$1} {$auto$alumacc.cc:485:replace_alu$1385.slice[0].carry4} {$auto$alumacc.cc:485:replace_alu$1385.slice[1].carry4} {$auto$alumacc.cc:485:replace_alu$1385.slice[2].carry4} {$auto$alumacc.cc:485:replace_alu$1385.slice[3].carry4} {$auto$alumacc.cc:485:replace_alu$1385.slice[4].carry4} {$auto$alumacc.cc:485:replace_alu$1385.slice[5].carry4} {$auto$alumacc.cc:485:replace_alu$1385.slice[6].carry4} {$auto$simplemap.cc:420:simplemap_dff$1471} {$auto$simplemap.cc:420:simplemap_dff$1472} {$auto$simplemap.cc:420:simplemap_dff$1473} {$auto$simplemap.cc:420:simplemap_dff$1474} {$auto$simplemap.cc:420:simplemap_dff$1475} {$auto$simplemap.cc:420:simplemap_dff$1476} {$auto$simplemap.cc:420:simplemap_dff$1477} {$auto$simplemap.cc:420:simplemap_dff$1478} {$auto$simplemap.cc:420:simplemap_dff$1479} {$auto$simplemap.cc:420:simplemap_dff$1480} {$auto$simplemap.cc:420:simplemap_dff$1481} {$auto$simplemap.cc:420:simplemap_dff$1482} {$auto$simplemap.cc:420:simplemap_dff$1483} {$auto$simplemap.cc:420:simplemap_dff$1484} {$auto$simplemap.cc:420:simplemap_dff$1485} {$auto$simplemap.cc:420:simplemap_dff$1486} {$auto$simplemap.cc:420:simplemap_dff$1487} {$auto$simplemap.cc:420:simplemap_dff$1488} {$auto$simplemap.cc:420:simplemap_dff$1489} {$auto$simplemap.cc:420:simplemap_dff$1490} {$auto$simplemap.cc:420:simplemap_dff$1491} {$auto$simplemap.cc:420:simplemap_dff$1492} {$auto$simplemap.cc:420:simplemap_dff$1493} {$auto$simplemap.cc:420:simplemap_dff$1494} {$auto$simplemap.cc:420:simplemap_dff$1495} {$auto$simplemap.cc:420:simplemap_dff$1496} {$iopadmap$top.clk} OBUFTDS_2 OBUF_6 OBUF_7 OBUF_OUT bottom_inst.OBUF_10 bottom_inst.OBUF_11 bottom_inst.OBUF_9 bottom_intermediate_inst.OBUF_8 diff --git a/design_introspection-plugin/tests/get_nets/get_nets.golden.txt b/design_introspection-plugin/tests/get_nets/get_nets.golden.txt index 24c2e2f61..34eb615bb 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.golden.txt +++ b/design_introspection-plugin/tests/get_nets/get_nets.golden.txt @@ -7,4 +7,4 @@ bottom_intermediate_inst.I bottom_intermediate_inst.O bottom_intermediate_inst.b Filtered nets clk All nets -{$abc$2135$aiger2134$38} {$abc$2135$aiger2134$42} {$abc$2135$aiger2134$43} {$abc$2135$aiger2134$48} {$abc$2135$aiger2134$49} {$abc$2135$aiger2134$54} {$abc$2135$aiger2134$55} {$abc$2135$aiger2134$60} {$abc$2135$aiger2134$61} {$abc$2135$aiger2134$66} {$abc$2135$aiger2134$67} {$abc$2135$aiger2134$72} {$abc$2135$aiger2134$73} {$abc$2135$aiger2134$76} {$abc$2135$aiger2134$77} {$abc$2135$aiger2134$78} {$abc$2135$iopadmap$clk} {$auto$alumacc.cc:485:replace_alu$1469.O} LD6 LD7 LD8 LD9 bottom_inst.I bottom_inst.O bottom_inst.OB bottom_intermediate_inst.I bottom_intermediate_inst.O bottom_intermediate_inst.bottom_intermediate_wire clk counter inter_wire inter_wire_2 led out_a out_b signal_n signal_p +{$abc$1984$aiger1983$38} {$abc$1984$aiger1983$42} {$abc$1984$aiger1983$43} {$abc$1984$aiger1983$44} {$abc$1984$aiger1983$45} {$abc$1984$aiger1983$50} {$abc$1984$aiger1983$51} {$abc$1984$aiger1983$52} {$abc$1984$aiger1983$53} {$abc$1984$aiger1983$58} {$abc$1984$aiger1983$59} {$abc$1984$aiger1983$60} {$abc$1984$aiger1983$61} {$abc$1984$aiger1983$66} {$abc$1984$aiger1983$67} {$abc$1984$aiger1983$68} {$abc$1984$aiger1983$69} {$abc$1984$aiger1983$74} {$abc$1984$aiger1983$75} {$abc$1984$aiger1983$76} {$abc$1984$aiger1983$77} {$abc$1984$aiger1983$82} {$abc$1984$aiger1983$83} {$abc$1984$aiger1983$84} {$abc$1984$aiger1983$85} {$abc$1984$aiger1983$88} {$abc$1984$aiger1983$89} {$abc$1984$aiger1983$90} {$abc$1984$aiger1983$91} {$abc$1984$aiger1983$92} {$abc$1984$aiger1983$93} {$abc$1984$iopadmap$clk} {$auto$alumacc.cc:485:replace_alu$1385.O} LD6 LD7 LD8 LD9 bottom_inst.I bottom_inst.O bottom_inst.OB bottom_intermediate_inst.I bottom_intermediate_inst.O bottom_intermediate_inst.bottom_intermediate_wire clk counter inter_wire inter_wire_2 led out_a out_b signal_n signal_p diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/sdc-plugin/tests/counter/counter.golden.sdc index 5be53e39d..bf478740b 100644 --- a/sdc-plugin/tests/counter/counter.golden.sdc +++ b/sdc-plugin/tests/counter/counter.golden.sdc @@ -1,5 +1,5 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1918 -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1920 +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1801 +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1803 create_clock -period 10 -waveform {0 5} clk_int_1 create_clock -period 10 -waveform {0 5} ibuf_proxy_out create_clock -period 10 -waveform {0 5} middle_inst_1.clk_int diff --git a/sdc-plugin/tests/counter/counter.golden.txt b/sdc-plugin/tests/counter/counter.golden.txt index 78277ed59..8adab86cf 100644 --- a/sdc-plugin/tests/counter/counter.golden.txt +++ b/sdc-plugin/tests/counter/counter.golden.txt @@ -1 +1 @@ -{$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} clk clk2 clk_int_1 ibuf_proxy_out middle_inst_1.clk_int middle_inst_4.clk +{$auto$clkbufmap.cc:262:execute$1801} {$auto$clkbufmap.cc:262:execute$1803} clk clk2 clk_int_1 ibuf_proxy_out middle_inst_1.clk_int middle_inst_4.clk diff --git a/sdc-plugin/tests/counter2/counter2.golden.sdc b/sdc-plugin/tests/counter2/counter2.golden.sdc index 33152b3f7..17624d7ba 100644 --- a/sdc-plugin/tests/counter2/counter2.golden.sdc +++ b/sdc-plugin/tests/counter2/counter2.golden.sdc @@ -1,5 +1,5 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1918 -create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:247:execute\$1920 +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1801 +create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:262:execute\$1803 create_clock -period 10 -waveform {0 5} clk_int_1 create_clock -period 10 -waveform {0 5} ibuf_proxy_out create_clock -period 10 -waveform {0 5} middle_inst_1.clk_int diff --git a/sdc-plugin/tests/counter2/counter2.golden.txt b/sdc-plugin/tests/counter2/counter2.golden.txt index 78277ed59..8adab86cf 100644 --- a/sdc-plugin/tests/counter2/counter2.golden.txt +++ b/sdc-plugin/tests/counter2/counter2.golden.txt @@ -1 +1 @@ -{$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} clk clk2 clk_int_1 ibuf_proxy_out middle_inst_1.clk_int middle_inst_4.clk +{$auto$clkbufmap.cc:262:execute$1801} {$auto$clkbufmap.cc:262:execute$1803} clk clk2 clk_int_1 ibuf_proxy_out middle_inst_1.clk_int middle_inst_4.clk diff --git a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt index 9c70eedcd..9c94d2d31 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt +++ b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt @@ -1,5 +1,5 @@ -{$auto$clkbufmap.cc:247:execute$1913} {$auto$clkbufmap.cc:247:execute$1915} clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk -{$auto$clkbufmap.cc:247:execute$1913} {$auto$clkbufmap.cc:247:execute$1915} clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk +{$auto$clkbufmap.cc:262:execute$1800} {$auto$clkbufmap.cc:262:execute$1802} clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk +{$auto$clkbufmap.cc:262:execute$1800} {$auto$clkbufmap.cc:262:execute$1802} clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk clk2 clk_int_1 clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index da025c528..5f1fc758d 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,8 +1,8 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:247:execute\$1833 -create_clock -period 5 -waveform {1.25 3.75} \$auto\$clkbufmap.cc:247:execute\$1835 -create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 +create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:262:execute\$1717 +create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:262:execute\$1719 +create_clock -period 5 -waveform {1.25 3.75} \$auto\$clkbufmap.cc:262:execute\$1721 +create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C create_clock -period 10 -waveform {2.5 7.5} main_clkout0 create_clock -period 2.5 -waveform {0 1.25} main_clkout1 create_clock -period 5 -waveform {1.25 3.75} main_clkout2 diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc index b97da3ef6..5e12e7d92 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc @@ -1,8 +1,8 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 9.99999 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:247:execute\$1833 -create_clock -period 2.5 -waveform {-1.875 -0.624999} \$auto\$clkbufmap.cc:247:execute\$1835 -create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 +create_clock -period 9.99999 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1717 +create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:262:execute\$1719 +create_clock -period 2.5 -waveform {-1.875 -0.624999} \$auto\$clkbufmap.cc:262:execute\$1721 +create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C create_clock -period 9.99999 -waveform {0 5} main_clkout_x1 create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 create_clock -period 2.5 -waveform {-1.875 -0.624999} main_clkout_x4 diff --git a/sdc-plugin/tests/pll_div/pll_div.golden.sdc b/sdc-plugin/tests/pll_div/pll_div.golden.sdc index 06031cf27..965601159 100644 --- a/sdc-plugin/tests/pll_div/pll_div.golden.sdc +++ b/sdc-plugin/tests/pll_div/pll_div.golden.sdc @@ -1,8 +1,8 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 20 -waveform {5 15} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 5 -waveform {0 2.5} \$auto\$clkbufmap.cc:247:execute\$1833 -create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:247:execute\$1835 -create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 +create_clock -period 20 -waveform {5 15} \$auto\$clkbufmap.cc:262:execute\$1717 +create_clock -period 5 -waveform {0 2.5} \$auto\$clkbufmap.cc:262:execute\$1719 +create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:262:execute\$1721 +create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C create_clock -period 20 -waveform {5 15} main_clkout0 create_clock -period 5 -waveform {0 2.5} main_clkout1 create_clock -period 10 -waveform {2.5 7.5} main_clkout2 diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc index df8301d91..f944ef59d 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc @@ -1,8 +1,8 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1829 -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:247:execute\$1831 -create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:247:execute\$1833 -create_clock -period 2.5 -waveform {-1.875 -0.625} \$auto\$clkbufmap.cc:247:execute\$1835 -create_clock -period 10 -waveform {0 5} \$techmap1716\FDCE_0.C +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1717 +create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:262:execute\$1719 +create_clock -period 2.5 -waveform {-1.875 -0.625} \$auto\$clkbufmap.cc:262:execute\$1721 +create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C create_clock -period 10 -waveform {0 5} main_clkout_x1 create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 create_clock -period 2.5 -waveform {-1.875 -0.625} main_clkout_x4 From 27938e650074e2632bc8f8d4aeaa17b080f58f4a Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 26 Nov 2020 13:16:53 +0100 Subject: [PATCH 238/845] ci: update submodules during setup Signed-off-by: Alessandro Comodi --- .github/workflows/setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index e734b2a38..abe6e8dd4 100755 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -20,6 +20,15 @@ end_section ########################################################################## +# Update submodules +start_section Submodules +( + git submodule update --init --recursive +) +end_section + +########################################################################## + #Install yosys start_section Install-Yosys ( From ec8cfe7871d73c3202ae5b7bc425c91021889e57 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 25 Nov 2020 22:27:55 +0100 Subject: [PATCH 239/845] SDC: Don't add clocks on dangling wires Signed-off-by: Tomasz Michalak --- sdc-plugin/propagation.cc | 20 +++++++++++++++++++- sdc-plugin/propagation.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index a2dffe246..f7e59d8dc 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -114,6 +114,22 @@ RTLIL::Cell* Propagation::FindSinkCellOnPort(RTLIL::Wire* wire, return sink_cell; } +bool Propagation::WireHasSinkCell(RTLIL::Wire* wire) { + if (!wire) { + return false; + } + RTLIL::Module* top_module = design_->top_module(); + assert(top_module); + std::string base_selection = + top_module->name.str() + "/w:" + wire->name.str(); + pass_->extra_args( + std::vector{base_selection, "%co:*", + base_selection, "%d"}, + 0, design_); + auto selected_cells = top_module->selected_cells(); + return selected_cells.size() > 0; +} + RTLIL::Wire* Propagation::FindSinkWireOnPort(RTLIL::Cell* cell, const std::string& port_name) { RTLIL::Wire* sink_wire = NULL; @@ -140,6 +156,7 @@ RTLIL::Wire* Propagation::FindSinkWireOnPort(RTLIL::Cell* cell, } return sink_wire; } + void NaturalPropagation::Run() { #ifdef SDC_DEBUG log("Start natural clock propagation\n"); @@ -230,7 +247,8 @@ void ClockDividerPropagation::PropagateClocksForCellType( Clock::RisingEdge(driver_wire)); for (auto output : Pll::outputs) { RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); - if (wire) { + // Don't add clocks on dangling wires + if (wire && WireHasSinkCell(wire)) { float clkout_period(pll.clkout_period.at(output)); float clkout_rising_edge(pll.clkout_rising_edge.at(output)); float clkout_falling_edge(pll.clkout_falling_edge.at(output)); diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 788b138bc..29ee07fac 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -42,6 +42,7 @@ class Propagation { RTLIL::Cell* FindSinkCellOnPort(RTLIL::Wire* wire, const std::string& port); RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, const std::string& port_name); + bool WireHasSinkCell(RTLIL::Wire* wire); }; class NaturalPropagation : public Propagation { From f858e49a160a8e36b061bb79926d8a4b5c5fc8ca Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 25 Nov 2020 22:36:58 +0100 Subject: [PATCH 240/845] SDC: Add dangling wires to PLL design Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/pll/pll.v | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index 63542da0c..5c401b8c5 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -46,6 +46,8 @@ PLLE2_ADV #( .CLKOUT0(main_clkout0), .CLKOUT1(main_clkout1), .CLKOUT2(main_clkout2), + .CLKOUT3(main_clkout3), + .CLKOUT4(main_clkout4), .LOCKED(main_locked) ); From 3aa88ede1cab4d4dfde79bd0f285a043d1249bf5 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Mon, 30 Nov 2020 11:07:31 +0100 Subject: [PATCH 241/845] SDC: add explicit pll_dangling wires test Signed-off-by: Alessandro Comodi --- sdc-plugin/tests/Makefile | 2 + sdc-plugin/tests/pll/pll.v | 2 - .../pll_dangling_wires.golden.sdc | 3 ++ .../pll_dangling_wires.input.sdc | 1 + .../pll_dangling_wires/pll_dangling_wires.tcl | 21 ++++++++++ .../pll_dangling_wires/pll_dangling_wires.v | 41 +++++++++++++++++++ 6 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc create mode 100644 sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.input.sdc create mode 100644 sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl create mode 100644 sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 8604f8216..56525df1d 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -13,6 +13,7 @@ TESTS = counter \ pll_div \ pll_fbout_phase \ pll_approx_equal \ + pll_dangling_wires \ set_false_path \ set_max_delay \ set_clock_groups \ @@ -32,6 +33,7 @@ pll_verify = $(call diff_test,pll,sdc) pll_div_verify = $(call diff_test,pll_div,sdc) pll_fbout_phase_verify = $(call diff_test,pll_fbout_phase,sdc) pll_approx_equal_verify = $(call diff_test,pll_approx_equal,sdc) +pll_dangling_wires_verify = $(call diff_test,pll_dangling_wires,sdc) set_false_path_verify = $(call diff_test,set_false_path,sdc) set_max_delay_verify = $(call diff_test,set_max_delay,sdc) set_clock_groups_verify = $(call diff_test,set_clock_groups,sdc) diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index 5c401b8c5..63542da0c 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -46,8 +46,6 @@ PLLE2_ADV #( .CLKOUT0(main_clkout0), .CLKOUT1(main_clkout1), .CLKOUT2(main_clkout2), - .CLKOUT3(main_clkout3), - .CLKOUT4(main_clkout4), .LOCKED(main_locked) ); diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc new file mode 100644 index 000000000..b2269fe6c --- /dev/null +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc @@ -0,0 +1,3 @@ +create_clock -period 10 -waveform {0 5} \$abc\$1699\$iopadmap\$clk +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1704 +create_clock -period 10 -waveform {0 5} main_clkout0 diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.input.sdc b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.input.sdc new file mode 100644 index 000000000..00354d767 --- /dev/null +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.input.sdc @@ -0,0 +1 @@ +create_clock -period 10 -waveform {0 5} clk diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl new file mode 100644 index 000000000..09973b838 --- /dev/null +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl @@ -0,0 +1,21 @@ +yosys -import +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog $::env(DESIGN_TOP).v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top + +# Start flow after library reading +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Read the design timing constraints +read_sdc $::env(DESIGN_TOP).input.sdc + +# Propagate the clocks +propagate_clocks + +# Write out the SDC file after the clock propagation step +write_sdc $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v new file mode 100644 index 000000000..826483f9d --- /dev/null +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v @@ -0,0 +1,41 @@ +module top( + input clk, + input cpu_reset, + input data_in, + output data_out +); + +wire data_out; +wire builder_pll_fb; +wire main_locked; + +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(0.0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .CLKOUT3(main_clkout3), + .CLKOUT4(main_clkout4), + .LOCKED(main_locked) +); + +FDCE FDCE_PLLx1_PH0 ( + .D(data_in), + .C(main_clkout0), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out) +); + +endmodule From 2d8f8b7f705146c66de40d6caebc9cd7b25130c6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 24 Nov 2020 16:19:01 +0100 Subject: [PATCH 242/845] Plugins: Add 'integrateinv' pass that integrates inverters with invertable pins of cells Signed-off-by: Tomasz Michalak --- Makefile | 2 +- integrateinv-plugin/Makefile | 3 + integrateinv-plugin/integrateinv.cc | 343 ++++++++++++++++++ integrateinv-plugin/tests/.gitignore | 1 + integrateinv-plugin/tests/Makefile | 13 + integrateinv-plugin/tests/fanout/fanout.tcl | 10 + integrateinv-plugin/tests/fanout/fanout.v | 34 ++ .../tests/hierarchy/hierarchy.tcl | 16 + .../tests/hierarchy/hierarchy.v | 42 +++ .../tests/multi_bit/multi_bit.tcl | 10 + .../tests/multi_bit/multi_bit.v | 34 ++ .../tests/single_bit/single_bit.tcl | 11 + .../tests/single_bit/single_bit.v | 40 ++ .../tests/toplevel/toplevel.tcl | 9 + integrateinv-plugin/tests/toplevel/toplevel.v | 27 ++ 15 files changed, 594 insertions(+), 1 deletion(-) create mode 100644 integrateinv-plugin/Makefile create mode 100644 integrateinv-plugin/integrateinv.cc create mode 100644 integrateinv-plugin/tests/.gitignore create mode 100644 integrateinv-plugin/tests/Makefile create mode 100644 integrateinv-plugin/tests/fanout/fanout.tcl create mode 100644 integrateinv-plugin/tests/fanout/fanout.v create mode 100644 integrateinv-plugin/tests/hierarchy/hierarchy.tcl create mode 100644 integrateinv-plugin/tests/hierarchy/hierarchy.v create mode 100644 integrateinv-plugin/tests/multi_bit/multi_bit.tcl create mode 100644 integrateinv-plugin/tests/multi_bit/multi_bit.v create mode 100644 integrateinv-plugin/tests/single_bit/single_bit.tcl create mode 100644 integrateinv-plugin/tests/single_bit/single_bit.v create mode 100644 integrateinv-plugin/tests/toplevel/toplevel.tcl create mode 100644 integrateinv-plugin/tests/toplevel/toplevel.v diff --git a/Makefile b/Makefile index c39785903..d142d3169 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params selection sdc get_count ql-iob design_introspection +PLUGIN_LIST := fasm xdc params selection sdc get_count ql-iob design_introspection integrateinv PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/integrateinv-plugin/Makefile b/integrateinv-plugin/Makefile new file mode 100644 index 000000000..b966810ac --- /dev/null +++ b/integrateinv-plugin/Makefile @@ -0,0 +1,3 @@ +NAME = integrateinv +SOURCES = integrateinv.cc +include ../Makefile_plugin.common diff --git a/integrateinv-plugin/integrateinv.cc b/integrateinv-plugin/integrateinv.cc new file mode 100644 index 000000000..7a2b831d1 --- /dev/null +++ b/integrateinv-plugin/integrateinv.cc @@ -0,0 +1,343 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/sigtools.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +/// A structure representing a pin +struct Pin { + RTLIL::Cell *cell; /// Cell pointer + RTLIL::IdString port; /// Cell port name + int bit; /// Port bit index + + Pin(RTLIL::Cell *_cell, const RTLIL::IdString &_port, int _bit = 0) + : cell(_cell), port(_port), bit(_bit) {} + + Pin(const Pin &ref) = default; + + unsigned int hash() const { + if (cell == nullptr) { + return mkhash_add(port.hash(), bit); + } else { + return mkhash_add(mkhash(cell->hash(), port.hash()), bit); + } + }; +}; + +bool operator==(const Pin &lhs, const Pin &rhs) { + return (lhs.cell == rhs.cell) && (lhs.port == rhs.port) && + (lhs.bit == rhs.bit); +} + +struct IntegrateInv : public Pass { + + /// Temporary SigBit to SigBit helper map. + SigMap m_SigMap; + /// Map of SigBit objects to inverter cells. + dict m_InvMap; + /// Map of inverter cells that can potentially be integrated and invertable + /// pins that they are connected to + dict> m_Inverters; + /// Map of invertable pins and names of parameters controlling inversions + dict m_InvParams; + + IntegrateInv() + : Pass("integrateinv", "Integrates inverters ($_NOT_ cells) into ports " + "with 'invertible_pin' attribute set") {} + + void help() override { + log("\n"); + log(" integrateinv [selection]"); + log("\n"); + log("This pass integrates inverters into cells that have ports with the\n"); + log("'invertible_pin' attribute set. The attribute should contain name\n"); + log("of a parameter controlling the inversion. Whenever an inverter\n"); + log("of a parameter controlling the inversion. Whenever an inverter\n"); + log("\n"); + log("This pass is essentially the opposite of the 'extractinv' pass.\n"); + log("\n"); + } + + void execute(std::vector a_Args, + RTLIL::Design *a_Design) override { + log_header(a_Design, + "Executing INTEGRATEINV pass (integrating pin inverters).\n"); + + extra_args(a_Args, 1, a_Design); + + // Process modules + for (auto module : a_Design->selected_modules()) { + + // Setup the SigMap + m_SigMap.clear(); + m_SigMap.set(module); + + m_Inverters.clear(); + m_InvParams.clear(); + + // Setup inverter map + buildInverterMap(module); + + // Identify inverters that can be integrated and assign them with + // lists of cells and ports to integrate with + for (auto cell : module->selected_cells()) { + collectInverters(cell); + } + + // Integrate inverters + integrateInverters(); + } + + // Clear maps + m_SigMap.clear(); + + m_InvMap.clear(); + m_Inverters.clear(); + m_InvParams.clear(); + } + + void buildInverterMap(RTLIL::Module *a_Module) { + m_InvMap.clear(); + + for (auto cell : a_Module->cells()) { + + // Skip non-inverters + if (cell->type != RTLIL::escape_id("$_NOT_")) { + continue; + } + + // Get output connection + auto sigspec = cell->getPort(RTLIL::escape_id("Y")); + auto sigbit = m_SigMap(sigspec.bits().at(0)); + + // Store + log_assert(m_InvMap.count(sigbit) == 0); + m_InvMap[sigbit] = cell; + } + } + + void collectInverters(RTLIL::Cell *a_Cell) { + auto module = a_Cell->module; + auto design = module->design; + + for (auto conn : a_Cell->connections()) { + auto port = conn.first; + auto sigspec = conn.second; + + // Consider only inputs. + if (!a_Cell->input(port)) { + continue; + } + + // Get the cell module + auto cellModule = design->module(a_Cell->type); + if (!cellModule) { + continue; + } + + // Get wire. + auto wire = cellModule->wire(port); + if (!wire) { + continue; + } + + // Check if the pin has an embedded inverter. + auto it = wire->attributes.find(ID::invertible_pin); + if (it == wire->attributes.end()) { + continue; + } + + // Decode the parameter name. + RTLIL::IdString paramName = RTLIL::escape_id(it->second.decode_string()); + + // Look for connected inverters + auto sigbits = sigspec.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + sigbit = m_SigMap(sigbit); + + // Get the inverter if any + if (!m_InvMap.count(sigbit)) { + continue; + } + auto inv = m_InvMap.at(sigbit); + + // Save the inverter pin and the parameter name + auto pin = Pin(a_Cell, port, bit); + + auto &list = m_Inverters[inv]; + list.insert(pin); + + log_assert(m_InvParams.count(pin) == 0); + m_InvParams[pin] = paramName; + } + } + } + + void integrateInverters() { + + for (auto it : m_Inverters) { + auto inv = it.first; + auto pins = it.second; + + // List all sinks of the inverter + auto sinks = getSinksForDriver(Pin(inv, RTLIL::escape_id("Y"))); + + // If the inverter drives only invertable pins then integrate it + if (sinks == pins) { + log("Integrating inverter %s into:\n", log_id(inv->name)); + + // Integrate into each pin + for (auto pin : pins) { + log_assert(pin.cell != nullptr); + log(" %s.%s[%d]\n", log_id(pin.cell->name), log_id(pin.port), + pin.bit); + + // Change the connection + auto sigspec = pin.cell->getPort(pin.port); + auto sigbits = sigspec.bits(); + + log_assert((size_t)pin.bit < sigbits.size()); + sigbits[pin.bit] = + RTLIL::SigBit(inv->getPort(RTLIL::escape_id("A"))[0]); + pin.cell->setPort(pin.port, RTLIL::SigSpec(sigbits)); + + // Get the control parameter + log_assert(m_InvParams.count(pin) != 0); + auto paramName = m_InvParams[pin]; + + RTLIL::Const invMask; + auto param = pin.cell->parameters.find(paramName); + if (param == pin.cell->parameters.end()) { + invMask = RTLIL::Const(0, sigspec.size()); + } else { + invMask = RTLIL::Const(param->second); + } + + // Check width. + if (invMask.size() != sigspec.size()) { + log_error("The inversion parameter needs to be the same width as " + "the port (%s port %s parameter %s)", + log_id(pin.cell->name), log_id(pin.port), + log_id(paramName)); + } + + // Toggle bit in the control parameter bitmask + if (invMask[pin.bit] == RTLIL::State::S0) { + invMask[pin.bit] = RTLIL::State::S1; + } else if (invMask[pin.bit] == RTLIL::State::S1) { + invMask[pin.bit] = RTLIL::State::S0; + } else { + log_error("The inversion parameter must contain only 0s and 1s (%s " + "parameter %s)\n", + log_id(pin.cell->name), log_id(paramName)); + } + + // Set the parameter back + pin.cell->setParam(paramName, invMask); + } + + // Remove the inverter + inv->module->remove(inv); + } + } + } + + pool getSinksForDriver(const Pin &a_Driver) { + auto module = a_Driver.cell->module; + pool sinks; + + // The driver has to be an output pin + if (!a_Driver.cell->output(a_Driver.port)) { + return sinks; + } + + // Get the driver sigbit + auto driverSigspec = a_Driver.cell->getPort(a_Driver.port); + auto driverSigbit = m_SigMap(driverSigspec.bits().at(a_Driver.bit)); + + // Look for connected sinks + for (auto cell : module->cells()) { + for (auto conn : cell->connections()) { + auto port = conn.first; + auto sigspec = conn.second; + + // Consider only sinks (inputs) + if (!cell->input(port)) { + continue; + } + + // Check all sigbits + auto sigbits = sigspec.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + // Got a sink pin of another cell + sigbit = m_SigMap(sigbit); + if (sigbit == driverSigbit) { + sinks.insert(Pin(cell, port, bit)); + } + } + } + } + + // Look for connected top-level output ports + for (auto conn : module->connections()) { + auto dst = conn.first; + auto src = conn.second; + + auto sigbits = dst.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + if (!sigbit.wire->port_output) { + continue; + } + + sigbit = m_SigMap(sigbit); + if (sigbit == driverSigbit) { + sinks.insert(Pin(nullptr, sigbit.wire->name, bit)); + } + } + } + + return sinks; + } + +} IntegrateInv; + +PRIVATE_NAMESPACE_END diff --git a/integrateinv-plugin/tests/.gitignore b/integrateinv-plugin/tests/.gitignore new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/integrateinv-plugin/tests/.gitignore @@ -0,0 +1 @@ +ok diff --git a/integrateinv-plugin/tests/Makefile b/integrateinv-plugin/tests/Makefile new file mode 100644 index 000000000..987017d1e --- /dev/null +++ b/integrateinv-plugin/tests/Makefile @@ -0,0 +1,13 @@ +TESTS = fanout \ + hierarchy \ + multi_bit \ + single_bit \ + toplevel + +include $(shell pwd)/../../Makefile_test.common + +fanout_verify = true +hierarchy_verify = true +multi_bit_verify = true +single_bit_verify = true +toplevel_verify = true diff --git a/integrateinv-plugin/tests/fanout/fanout.tcl b/integrateinv-plugin/tests/fanout/fanout.tcl new file mode 100644 index 000000000..7ded5c4f1 --- /dev/null +++ b/integrateinv-plugin/tests/fanout/fanout.tcl @@ -0,0 +1,10 @@ +yosys -import +plugin -i integrateinv + +read_verilog -icells $::env(DESIGN_TOP).v +hierarchy -check -auto-top + +debug integrateinv + +select t:\$_NOT_ -assert-count 1 +select t:box r:INV_A=1'b1 %i -assert-count 3 diff --git a/integrateinv-plugin/tests/fanout/fanout.v b/integrateinv-plugin/tests/fanout/fanout.v new file mode 100644 index 000000000..a396c7840 --- /dev/null +++ b/integrateinv-plugin/tests/fanout/fanout.v @@ -0,0 +1,34 @@ +(* blackbox *) +module box( + (* invertible_pin="INV_A" *) + input wire A, + input wire B, + + output wire Y +); + + parameter [0:0] INV_A = 1'b0; + +endmodule + + +module top( + input wire [1:0] di, + output wire [5:0] do +); + + wire [1:0] d; + + \$_NOT_ n0 (.A(di[0]), .Y(d[0])); + + box b00 (.A(d[0]), .B( ), .Y(do[0])); + box b01 (.A(d[0]), .B( ), .Y(do[1])); + box b02 (.A( ), .B(d[0]), .Y(do[2])); + + \$_NOT_ n1 (.A(di[1]), .Y(d[1])); + + box b10 (.A(d[1]), .B( ), .Y(do[3])); + box b11 (.A(d[1]), .B( ), .Y(do[4])); + box b12 (.A(d[1]), .B( ), .Y(do[5])); + +endmodule diff --git a/integrateinv-plugin/tests/hierarchy/hierarchy.tcl b/integrateinv-plugin/tests/hierarchy/hierarchy.tcl new file mode 100644 index 000000000..b0ea51c31 --- /dev/null +++ b/integrateinv-plugin/tests/hierarchy/hierarchy.tcl @@ -0,0 +1,16 @@ +yosys -import +plugin -i integrateinv + +read_verilog -icells $::env(DESIGN_TOP).v +hierarchy -check -auto-top + +debug integrateinv + +select -module top +select t:\$_NOT_ -assert-count 1 +select t:box r:INV_A=1'b1 %i -assert-count 1 +select t:child -assert-count 1 + +select -module child +select t:\$_NOT_ -assert-count 0 +select t:box r:INV_A=1'b1 %i -assert-count 1 diff --git a/integrateinv-plugin/tests/hierarchy/hierarchy.v b/integrateinv-plugin/tests/hierarchy/hierarchy.v new file mode 100644 index 000000000..08eccacf4 --- /dev/null +++ b/integrateinv-plugin/tests/hierarchy/hierarchy.v @@ -0,0 +1,42 @@ +(* blackbox *) +module box( + (* invertible_pin="INV_A" *) + input wire A, + output wire Y +); + + parameter [0:0] INV_A = 1'b0; + +endmodule + +(* keep_hierarchy *) +module child ( + input wire I, + output wire [1:0] O +); + + wire d; + + \$_NOT_ n (.A(I), .Y(d)); + + box b0 (.A(I), .Y(O[0])); + box b1 (.A(d), .Y(O[1])); + +endmodule + + +module top( + input wire di, + output wire [4:0] do +); + + wire [1:0] d; + + \$_NOT_ n0 (.A(di), .Y(d[0])); + \$_NOT_ n1 (.A(di), .Y(d[1])); + + box b0 (.A(d[0]), .Y(do[0])); + box b1 (.A(d[1]), .Y(do[1])); + child c (.I(d[1]), .O({do[3], do[2]})); + +endmodule diff --git a/integrateinv-plugin/tests/multi_bit/multi_bit.tcl b/integrateinv-plugin/tests/multi_bit/multi_bit.tcl new file mode 100644 index 000000000..8515ae671 --- /dev/null +++ b/integrateinv-plugin/tests/multi_bit/multi_bit.tcl @@ -0,0 +1,10 @@ +yosys -import +plugin -i integrateinv + +read_verilog -icells $::env(DESIGN_TOP).v +hierarchy -check -auto-top + +debug integrateinv + +select t:\$_NOT_ -assert-count 2 +select t:box r:INV_A=2'b10 %i -assert-count 1 diff --git a/integrateinv-plugin/tests/multi_bit/multi_bit.v b/integrateinv-plugin/tests/multi_bit/multi_bit.v new file mode 100644 index 000000000..f02c7bd5c --- /dev/null +++ b/integrateinv-plugin/tests/multi_bit/multi_bit.v @@ -0,0 +1,34 @@ +(* blackbox *) +module box( + (* invertible_pin="INV_A" *) + input wire [1:0] A, + input wire [1:0] B, + + output wire Y +); + + parameter [1:0] INV_A = 2'b00; + +endmodule + + +module top( + input wire [3:0] di, + output wire do +); + + wire [3:0] d; + + \$_NOT_ n0 (.A(di[0]), .Y(d[0])); + \$_NOT_ n1 (.A(di[1]), .Y(d[1])); + \$_NOT_ n2 (.A(di[2]), .Y(d[2])); + \$_NOT_ n3 (.A(di[3]), .Y(d[3])); + + box #(.INV_A(2'b01)) the_box ( + .A ({d[1], d[0]}), + .B ({d[3], d[2]}), + + .Y (do) + ); + +endmodule diff --git a/integrateinv-plugin/tests/single_bit/single_bit.tcl b/integrateinv-plugin/tests/single_bit/single_bit.tcl new file mode 100644 index 000000000..caf136e6c --- /dev/null +++ b/integrateinv-plugin/tests/single_bit/single_bit.tcl @@ -0,0 +1,11 @@ +yosys -import +plugin -i integrateinv + +read_verilog -icells $::env(DESIGN_TOP).v +hierarchy -check -auto-top + +debug integrateinv + +select t:\$_NOT_ -assert-count 2 +select t:box r:INV_A=1'b0 %i -assert-count 1 +select t:box r:INV_C=1'b1 %i -assert-count 1 diff --git a/integrateinv-plugin/tests/single_bit/single_bit.v b/integrateinv-plugin/tests/single_bit/single_bit.v new file mode 100644 index 000000000..edeab5e0e --- /dev/null +++ b/integrateinv-plugin/tests/single_bit/single_bit.v @@ -0,0 +1,40 @@ +(* blackbox *) +module box( + (* invertible_pin="INV_A" *) + input wire A, + input wire B, + (* invertible_pin="INV_C" *) + input wire C, + input wire D, + + output wire Y +); + + parameter [0:0] INV_A = 1'b0; + parameter [0:0] INV_C = 1'b0; + +endmodule + + +module top( + input wire [3:0] di, + output wire do +); + + wire [3:0] d; + + \$_NOT_ n0 (.A(di[0]), .Y(d[0])); + \$_NOT_ n1 (.A(di[1]), .Y(d[1])); + \$_NOT_ n2 (.A(di[2]), .Y(d[2])); + \$_NOT_ n3 (.A(di[3]), .Y(d[3])); + + box #(.INV_A(1'b1)) the_box ( + .A (d[0]), + .B (d[1]), + .C (d[2]), + .D (d[3]), + + .Y (do) + ); + +endmodule diff --git a/integrateinv-plugin/tests/toplevel/toplevel.tcl b/integrateinv-plugin/tests/toplevel/toplevel.tcl new file mode 100644 index 000000000..ba3e445e0 --- /dev/null +++ b/integrateinv-plugin/tests/toplevel/toplevel.tcl @@ -0,0 +1,9 @@ +yosys -import +plugin -i integrateinv + +read_verilog -icells $::env(DESIGN_TOP).v +hierarchy -check -auto-top + +debug integrateinv + +select t:\$_NOT_ -assert-count 1 diff --git a/integrateinv-plugin/tests/toplevel/toplevel.v b/integrateinv-plugin/tests/toplevel/toplevel.v new file mode 100644 index 000000000..652eff9ba --- /dev/null +++ b/integrateinv-plugin/tests/toplevel/toplevel.v @@ -0,0 +1,27 @@ +(* blackbox *) +module box( + (* invertible_pin="INV_A" *) + input wire A, + output wire Y +); + + parameter [0:0] INV_A = 1'b0; + +endmodule + + +module top( + input wire [1:0] di, + output wire [2:0] do +); + + wire [1:0] d; + + \$_NOT_ n0 (.A(di[0]), .Y(d[0])); + \$_NOT_ n1 (.A(di[1]), .Y(d[1])); + + box b0 (.A(d[0]), .Y(do[0])); + box b1 (.A(d[1]), .Y(do[1])); + assign do[0] = d[0]; + +endmodule From e4ad21689b6f846bef2d4e1aa511047d0358dd1f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 24 Nov 2020 19:21:30 +0100 Subject: [PATCH 243/845] Integrateinv plugin: Fix command help description Signed-off-by: Tomasz Michalak --- integrateinv-plugin/integrateinv.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/integrateinv-plugin/integrateinv.cc b/integrateinv-plugin/integrateinv.cc index 7a2b831d1..4a4f69361 100644 --- a/integrateinv-plugin/integrateinv.cc +++ b/integrateinv-plugin/integrateinv.cc @@ -71,9 +71,8 @@ struct IntegrateInv : public Pass { log(" integrateinv [selection]"); log("\n"); log("This pass integrates inverters into cells that have ports with the\n"); - log("'invertible_pin' attribute set. The attribute should contain name\n"); - log("of a parameter controlling the inversion. Whenever an inverter\n"); - log("of a parameter controlling the inversion. Whenever an inverter\n"); + log("'invertible_pin' attribute set. The attribute should contain the name\n"); + log("of a parameter controlling the inversion.\n"); log("\n"); log("This pass is essentially the opposite of the 'extractinv' pass.\n"); log("\n"); From 8bd2e514898a5f2f3d8f37cf1636ad1fe2906dd6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 17 Nov 2020 16:59:21 +0100 Subject: [PATCH 244/845] SDC: Get clock wire name from SOURCE_PINS Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 13 ++++++++++--- sdc-plugin/clocks.h | 1 + sdc-plugin/sdc_writer.cc | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 95ebaad96..adcb6b1c6 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -114,11 +114,18 @@ std::string Clock::Name(RTLIL::Wire* clock_wire) { return WireName(clock_wire); } -std::string Clock::WireName(RTLIL::Wire* wire) { - if (!wire) { +std::string Clock::WireName(RTLIL::Wire* clock_wire) { + if (!clock_wire) { return std::string(); } - return AddEscaping(RTLIL::unescape_id(wire->name)); + return AddEscaping(RTLIL::unescape_id(clock_wire->name)); +} + +std::string Clock::SourcePinName(RTLIL::Wire* clock_wire) { + if (clock_wire->has_attribute(RTLIL::escape_id("SOURCE_PINS"))) { + return clock_wire->get_string_attribute(RTLIL::escape_id("SOURCE_PINS")); + } + return Name(clock_wire); } const std::map Clocks::GetClocks( diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 2bcdf756e..846a2af2e 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -46,6 +46,7 @@ class Clock { static std::string AddEscaping(const std::string& name) { return std::regex_replace(name, std::regex{"\\$"}, "\\$"); } + static std::string SourcePinName(RTLIL::Wire* clock_wire); private: static std::pair Waveform(RTLIL::Wire* clock_wire); diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index 80c8e5e35..6f7a760c1 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -54,7 +54,7 @@ void SdcWriter::WriteClocks(RTLIL::Design* design, std::ostream& file) { file << "create_clock -period " << Clock::Period(clock_wire); file << " -waveform {" << Clock::RisingEdge(clock_wire) << " " << Clock::FallingEdge(clock_wire) << "}"; - file << " " << Clock::WireName(clock_wire); + file << " " << Clock::SourcePinName(clock_wire); file << std::endl; } } From f2b9eb2e9bc9d20668cb0c8437624307790a2113 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 23 Nov 2020 14:07:52 +0100 Subject: [PATCH 245/845] SDC: Distinguish GENERATED, PROPAGATED and EXPLICIT clocks Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 20 +++++++++++++++----- sdc-plugin/clocks.h | 20 +++++++++++++++++--- sdc-plugin/propagation.cc | 6 +++--- sdc-plugin/propagation.h | 2 ++ sdc-plugin/sdc.cc | 2 +- sdc-plugin/sdc_writer.cc | 6 +++++- 6 files changed, 43 insertions(+), 13 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index adcb6b1c6..414717489 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -23,8 +23,11 @@ #include "propagation.h" void Clock::Add(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge) { + float rising_edge, float falling_edge, ClockType type) { wire->set_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL"), "yes"); + wire->set_bool_attribute(RTLIL::escape_id("IS_GENERATED"), type == GENERATED); + wire->set_bool_attribute(RTLIL::escape_id("IS_EXPLICIT"), type == EXPLICIT); + wire->set_bool_attribute(RTLIL::escape_id("IS_PROPAGATED"), type == PROPAGATED); wire->set_string_attribute(RTLIL::escape_id("CLASS"), "clock"); wire->set_string_attribute(RTLIL::escape_id("NAME"), name); wire->set_string_attribute(RTLIL::escape_id("SOURCE_PINS"), @@ -37,15 +40,15 @@ void Clock::Add(const std::string& name, RTLIL::Wire* wire, float period, } void Clock::Add(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge) { + float period, float rising_edge, float falling_edge, ClockType type) { std::for_each(wires.begin(), wires.end(), [&](RTLIL::Wire* wire) { - Add(name, wire, period, rising_edge, falling_edge); + Add(name, wire, period, rising_edge, falling_edge, type); }); } void Clock::Add(RTLIL::Wire* wire, float period, float rising_edge, - float falling_edge) { - Add(Clock::WireName(wire), wire, period, rising_edge, falling_edge); + float falling_edge, ClockType type) { + Add(Clock::WireName(wire), wire, period, rising_edge, falling_edge, type); } float Clock::Period(RTLIL::Wire* clock_wire) { @@ -128,6 +131,13 @@ std::string Clock::SourcePinName(RTLIL::Wire* clock_wire) { return Name(clock_wire); } +bool Clock::GetClockWireBoolAttribute(RTLIL::Wire* wire, const std::string& attribute_name) { + if (wire->has_attribute(RTLIL::escape_id(attribute_name))) { + return wire->get_bool_attribute(RTLIL::escape_id(attribute_name)); + } + return false; +} + const std::map Clocks::GetClocks( RTLIL::Design* design) { std::map clock_wires; diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 846a2af2e..d9208e0af 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -32,12 +32,13 @@ class Propagation; class Clock { public: + enum ClockType { EXPLICIT, GENERATED, PROPAGATED }; static void Add(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge); + float rising_edge, float falling_edge, ClockType type); static void Add(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge); + float period, float rising_edge, float falling_edge, ClockType type); static void Add(RTLIL::Wire* wire, float period, float rising_edge, - float falling_edge); + float falling_edge, ClockType type); static float Period(RTLIL::Wire* clock_wire); static float RisingEdge(RTLIL::Wire* clock_wire); static float FallingEdge(RTLIL::Wire* clock_wire); @@ -47,9 +48,22 @@ class Clock { return std::regex_replace(name, std::regex{"\\$"}, "\\$"); } static std::string SourcePinName(RTLIL::Wire* clock_wire); + static bool IsPropagated(RTLIL::Wire* wire) { + return GetClockWireBoolAttribute(wire, "IS_PROPAGATED"); + } + + static bool IsGenerated(RTLIL::Wire* wire) { + return GetClockWireBoolAttribute(wire, "IS_GENERATED"); + } + + static bool IsExplicit(RTLIL::Wire* wire) { + return GetClockWireBoolAttribute(wire, "IS_EXPLICIT"); + } private: static std::pair Waveform(RTLIL::Wire* clock_wire); + + static bool GetClockWireBoolAttribute(RTLIL::Wire* wire, const std::string& attribute_name); }; class Clocks { diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index f7e59d8dc..1982aef36 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -37,7 +37,7 @@ void Propagation::PropagateThroughBuffers(Buffer buffer) { path_delay += buffer.delay; Clock::Add(wire, Clock::Period(clock_wire), Clock::RisingEdge(clock_wire) + path_delay, - Clock::FallingEdge(clock_wire) + path_delay); + Clock::FallingEdge(clock_wire) + path_delay, Clock::PROPAGATED); } } } @@ -169,7 +169,7 @@ void NaturalPropagation::Run() { auto aliases = FindAliasWires(clock_wire); Clock::Add(Clock::WireName(clock_wire), aliases, Clock::Period(clock_wire), Clock::RisingEdge(clock_wire), - Clock::FallingEdge(clock_wire)); + Clock::FallingEdge(clock_wire), Clock::PROPAGATED); } #ifdef SDC_DEBUG log("Finish natural clock propagation\n\n"); @@ -253,7 +253,7 @@ void ClockDividerPropagation::PropagateClocksForCellType( float clkout_rising_edge(pll.clkout_rising_edge.at(output)); float clkout_falling_edge(pll.clkout_falling_edge.at(output)); Clock::Add(wire, clkout_period, clkout_rising_edge, - clkout_falling_edge); + clkout_falling_edge, Clock::GENERATED); } } } diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 29ee07fac..3efd98420 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -34,6 +34,8 @@ class Propagation { RTLIL::Design* design_; Pass* pass_; + // This propagation doesn't change the clock so the sink wire is only marked + // as propagated clock signal, but has the properties of the driving clock void PropagateThroughBuffers(Buffer buffer); std::vector FindSinkWiresForCellType( RTLIL::Wire* driver_wire, const std::string& cell_type, diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index a9b7f6a97..83fb61b97 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -169,7 +169,7 @@ struct CreateClockCmd : public Pass { rising_edge = 0; falling_edge = period / 2; } - Clock::Add(name, selected_wires, period, rising_edge, falling_edge); + Clock::Add(name, selected_wires, period, rising_edge, falling_edge, Clock::EXPLICIT); } void AddWirePrefix(std::vector& args, size_t argidx) { diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index 6f7a760c1..4c3e0939f 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -46,11 +46,15 @@ void SdcWriter::WriteSdc(RTLIL::Design* design, std::ostream& file) { void SdcWriter::WriteClocks(RTLIL::Design* design, std::ostream& file) { for (auto& clock : Clocks::GetClocks(design)) { - // FIXME: Input port nets are not found in VPR auto& clock_wire = clock.second; + // FIXME: Input port nets are not found in VPR if (clock_wire->port_input) { continue; } + // Write out only GENERATED and EXPLICIT clocks + if (Clock::IsPropagated(clock_wire)) { + continue; + } file << "create_clock -period " << Clock::Period(clock_wire); file << " -waveform {" << Clock::RisingEdge(clock_wire) << " " << Clock::FallingEdge(clock_wire) << "}"; From 04d31d2b98581f47a653149f16e3f90f9ed5739f Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 23 Nov 2020 14:36:36 +0100 Subject: [PATCH 246/845] SDC: Check if clock is generated or propagated in get_clocks Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 83fb61b97..03f46032c 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -210,19 +210,11 @@ struct GetClocksCmd : public Pass { return port_list; } - // TODO Check for GENERATED_CLOCK clock wire attribute - // Issue https://github.com/SymbiFlow/yosys-symbiflow-plugins/issues/53 - // For now don't treat any of the added clocks as auto-generated - bool IsGeneratedClock(RTLIL::Wire* clock_wire) { - (void)clock_wire; - return false; - } - void execute(std::vector args, RTLIL::Design* design) override { // Parse command arguments - bool generated_clocks(false); + bool include_generated_clocks(false); std::vector clocks_nets; size_t argidx(0); @@ -230,7 +222,7 @@ struct GetClocksCmd : public Pass { for (argidx = 1; argidx < args.size(); argidx++) { std::string arg = args[argidx]; if (arg == "-include_generated_clocks") { - generated_clocks = true; + include_generated_clocks = true; continue; } if (arg == "-of" and argidx + 1 < args.size()) { @@ -262,8 +254,13 @@ struct GetClocksCmd : public Pass { Tcl_Interp* interp = yosys_get_tcl_interp(); Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); for (auto& clock : clocks) { + // Skip propagated clocks (i.e. clock wires with the same parameters + // as the master clocks they originate from + if (Clock::IsPropagated(clock.second)) { + continue; + } // Skip generated clocks if -include_generated_clocks is not specified - if (IsGeneratedClock(clock.second) and !generated_clocks) { + if (Clock::IsGenerated(clock.second) and !include_generated_clocks) { continue; } // Check if clock name is in the list of design clocks From 8636f2dca1d7f61ad62a0fb120ce5f875832f412 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Mon, 23 Nov 2020 14:52:47 +0100 Subject: [PATCH 247/845] SDC: Update counter, pll and get_clocks tests Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/counter/counter.golden.sdc | 5 ----- sdc-plugin/tests/counter/counter.golden.txt | 3 ++- sdc-plugin/tests/counter/counter.tcl | 4 ++-- sdc-plugin/tests/counter2/counter.txt | 1 - sdc-plugin/tests/counter2/counter2.golden.sdc | 5 ----- sdc-plugin/tests/counter2/counter2.golden.txt | 2 +- sdc-plugin/tests/get_clocks/get_clocks.golden.txt | 6 +++--- sdc-plugin/tests/pll/pll.golden.sdc | 5 ----- .../tests/pll_approx_equal/pll_approx_equal.golden.sdc | 5 ----- .../tests/pll_dangling_wires/pll_dangling_wires.golden.sdc | 2 -- sdc-plugin/tests/pll_div/pll_div.golden.sdc | 5 ----- sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc | 5 ----- 12 files changed, 8 insertions(+), 40 deletions(-) delete mode 100644 sdc-plugin/tests/counter2/counter.txt diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/sdc-plugin/tests/counter/counter.golden.sdc index bf478740b..cfa90cba8 100644 --- a/sdc-plugin/tests/counter/counter.golden.sdc +++ b/sdc-plugin/tests/counter/counter.golden.sdc @@ -1,6 +1 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1801 -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1803 create_clock -period 10 -waveform {0 5} clk_int_1 -create_clock -period 10 -waveform {0 5} ibuf_proxy_out -create_clock -period 10 -waveform {0 5} middle_inst_1.clk_int -create_clock -period 10 -waveform {0 5} middle_inst_4.clk diff --git a/sdc-plugin/tests/counter/counter.golden.txt b/sdc-plugin/tests/counter/counter.golden.txt index 8adab86cf..9301c2dd6 100644 --- a/sdc-plugin/tests/counter/counter.golden.txt +++ b/sdc-plugin/tests/counter/counter.golden.txt @@ -1 +1,2 @@ -{$auto$clkbufmap.cc:262:execute$1801} {$auto$clkbufmap.cc:262:execute$1803} clk clk2 clk_int_1 ibuf_proxy_out middle_inst_1.clk_int middle_inst_4.clk +clk clk2 clk_int_1 +clk clk2 clk_int_1 diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index e68574ba8..30cc0e43c 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -18,8 +18,8 @@ propagate_clocks # Write the clocks to file set fh [open $::env(DESIGN_TOP).txt w] -set clocks [get_clocks] -puts $fh $clocks +puts $fh [get_clocks] +puts $fh [get_clocks -include_generated_clocks] close $fh # Write out the SDC file after the clock propagation step diff --git a/sdc-plugin/tests/counter2/counter.txt b/sdc-plugin/tests/counter2/counter.txt deleted file mode 100644 index 065b11094..000000000 --- a/sdc-plugin/tests/counter2/counter.txt +++ /dev/null @@ -1 +0,0 @@ -clk_int_1 clk ibuf_proxy_out {$auto$clkbufmap.cc:247:execute$1918} {$auto$clkbufmap.cc:247:execute$1920} middle_inst_1.clk_int middle_inst_4.clk diff --git a/sdc-plugin/tests/counter2/counter2.golden.sdc b/sdc-plugin/tests/counter2/counter2.golden.sdc index 17624d7ba..cfa90cba8 100644 --- a/sdc-plugin/tests/counter2/counter2.golden.sdc +++ b/sdc-plugin/tests/counter2/counter2.golden.sdc @@ -1,6 +1 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1801 -create_clock -period 10 -waveform {1 6} \$auto\$clkbufmap.cc:262:execute\$1803 create_clock -period 10 -waveform {0 5} clk_int_1 -create_clock -period 10 -waveform {0 5} ibuf_proxy_out -create_clock -period 10 -waveform {0 5} middle_inst_1.clk_int -create_clock -period 10 -waveform {1 6} middle_inst_4.clk diff --git a/sdc-plugin/tests/counter2/counter2.golden.txt b/sdc-plugin/tests/counter2/counter2.golden.txt index 8adab86cf..c7ecd76e8 100644 --- a/sdc-plugin/tests/counter2/counter2.golden.txt +++ b/sdc-plugin/tests/counter2/counter2.golden.txt @@ -1 +1 @@ -{$auto$clkbufmap.cc:262:execute$1801} {$auto$clkbufmap.cc:262:execute$1803} clk clk2 clk_int_1 ibuf_proxy_out middle_inst_1.clk_int middle_inst_4.clk +clk clk2 clk_int_1 diff --git a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt index 9c94d2d31..0cc76acad 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt +++ b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt @@ -1,6 +1,6 @@ -{$auto$clkbufmap.cc:262:execute$1800} {$auto$clkbufmap.cc:262:execute$1802} clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk -{$auto$clkbufmap.cc:262:execute$1800} {$auto$clkbufmap.cc:262:execute$1802} clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk +clk clk2 clk_int_1 +clk clk2 clk_int_1 clk2 clk_int_1 -clk clk2 clk_int_1 middle_inst_1.clk_int middle_inst_4.clk +clk clk2 clk_int_1 clk clk2 clk_int_1 diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index 5f1fc758d..1a17ded1a 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,8 +1,3 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:262:execute\$1717 create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:262:execute\$1719 create_clock -period 5 -waveform {1.25 3.75} \$auto\$clkbufmap.cc:262:execute\$1721 -create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C -create_clock -period 10 -waveform {2.5 7.5} main_clkout0 -create_clock -period 2.5 -waveform {0 1.25} main_clkout1 -create_clock -period 5 -waveform {1.25 3.75} main_clkout2 diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc index 5e12e7d92..61f951a6f 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc @@ -1,8 +1,3 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 create_clock -period 9.99999 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1717 create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:262:execute\$1719 create_clock -period 2.5 -waveform {-1.875 -0.624999} \$auto\$clkbufmap.cc:262:execute\$1721 -create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C -create_clock -period 9.99999 -waveform {0 5} main_clkout_x1 -create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 -create_clock -period 2.5 -waveform {-1.875 -0.624999} main_clkout_x4 diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc index b2269fe6c..1bd59529e 100644 --- a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc @@ -1,3 +1 @@ -create_clock -period 10 -waveform {0 5} \$abc\$1699\$iopadmap\$clk create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1704 -create_clock -period 10 -waveform {0 5} main_clkout0 diff --git a/sdc-plugin/tests/pll_div/pll_div.golden.sdc b/sdc-plugin/tests/pll_div/pll_div.golden.sdc index 965601159..fee281cd1 100644 --- a/sdc-plugin/tests/pll_div/pll_div.golden.sdc +++ b/sdc-plugin/tests/pll_div/pll_div.golden.sdc @@ -1,8 +1,3 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 create_clock -period 20 -waveform {5 15} \$auto\$clkbufmap.cc:262:execute\$1717 create_clock -period 5 -waveform {0 2.5} \$auto\$clkbufmap.cc:262:execute\$1719 create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:262:execute\$1721 -create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C -create_clock -period 20 -waveform {5 15} main_clkout0 -create_clock -period 5 -waveform {0 2.5} main_clkout1 -create_clock -period 10 -waveform {2.5 7.5} main_clkout2 diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc index f944ef59d..0eab91d5f 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc @@ -1,8 +1,3 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1717 create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:262:execute\$1719 create_clock -period 2.5 -waveform {-1.875 -0.625} \$auto\$clkbufmap.cc:262:execute\$1721 -create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C -create_clock -period 10 -waveform {0 5} main_clkout_x1 -create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 -create_clock -period 2.5 -waveform {-1.875 -0.625} main_clkout_x4 From 6893b71ad3f4c3509ee565902b02cb931e9f1749 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 1 Dec 2020 16:55:58 +0100 Subject: [PATCH 248/845] SDC: Rename SourcePinName to SourceWireName Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.cc | 8 ++++---- sdc-plugin/clocks.h | 2 +- sdc-plugin/sdc_writer.cc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 414717489..865dd3715 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -30,7 +30,7 @@ void Clock::Add(const std::string& name, RTLIL::Wire* wire, float period, wire->set_bool_attribute(RTLIL::escape_id("IS_PROPAGATED"), type == PROPAGATED); wire->set_string_attribute(RTLIL::escape_id("CLASS"), "clock"); wire->set_string_attribute(RTLIL::escape_id("NAME"), name); - wire->set_string_attribute(RTLIL::escape_id("SOURCE_PINS"), + wire->set_string_attribute(RTLIL::escape_id("SOURCE_WIRES"), Clock::WireName(wire)); wire->set_string_attribute(RTLIL::escape_id("PERIOD"), std::to_string(period)); @@ -124,9 +124,9 @@ std::string Clock::WireName(RTLIL::Wire* clock_wire) { return AddEscaping(RTLIL::unescape_id(clock_wire->name)); } -std::string Clock::SourcePinName(RTLIL::Wire* clock_wire) { - if (clock_wire->has_attribute(RTLIL::escape_id("SOURCE_PINS"))) { - return clock_wire->get_string_attribute(RTLIL::escape_id("SOURCE_PINS")); +std::string Clock::SourceWireName(RTLIL::Wire* clock_wire) { + if (clock_wire->has_attribute(RTLIL::escape_id("SOURCE_WIRES"))) { + return clock_wire->get_string_attribute(RTLIL::escape_id("SOURCE_WIRES")); } return Name(clock_wire); } diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index d9208e0af..5d3d9af17 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -47,7 +47,7 @@ class Clock { static std::string AddEscaping(const std::string& name) { return std::regex_replace(name, std::regex{"\\$"}, "\\$"); } - static std::string SourcePinName(RTLIL::Wire* clock_wire); + static std::string SourceWireName(RTLIL::Wire* clock_wire); static bool IsPropagated(RTLIL::Wire* wire) { return GetClockWireBoolAttribute(wire, "IS_PROPAGATED"); } diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index 4c3e0939f..b73e24260 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -58,7 +58,7 @@ void SdcWriter::WriteClocks(RTLIL::Design* design, std::ostream& file) { file << "create_clock -period " << Clock::Period(clock_wire); file << " -waveform {" << Clock::RisingEdge(clock_wire) << " " << Clock::FallingEdge(clock_wire) << "}"; - file << " " << Clock::SourcePinName(clock_wire); + file << " " << Clock::SourceWireName(clock_wire); file << std::endl; } } From f7a00baaca518045b6366e0f7db57ba36b5487b6 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 1 Dec 2020 16:56:38 +0100 Subject: [PATCH 249/845] SDC: Add comment about clock types Signed-off-by: Tomasz Michalak --- sdc-plugin/clocks.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 5d3d9af17..f15858b9f 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -32,6 +32,10 @@ class Propagation; class Clock { public: + // We distinguish the following types of clock: + // * EXPLICIT - added with create_clocks command + // * GENERATED - propagated from explicit clocks changing the clock's parameters + // * PROPAGATED - propagated from explicit clocks but with the same parameters as the driver enum ClockType { EXPLICIT, GENERATED, PROPAGATED }; static void Add(const std::string& name, RTLIL::Wire* wire, float period, float rising_edge, float falling_edge, ClockType type); From 352aea3c08409291279e1cef10d5e59f9310a63d Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 1 Dec 2020 17:09:10 +0100 Subject: [PATCH 250/845] SDC: Update get_clocks test Signed-off-by: Tomasz Michalak --- .../tests/get_clocks/get_clocks.golden.txt | 2 +- sdc-plugin/tests/get_clocks/get_clocks.v | 23 ++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt index 0cc76acad..5744ab58d 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt +++ b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt @@ -1,5 +1,5 @@ clk clk2 clk_int_1 -clk clk2 clk_int_1 +{$auto$clkbufmap.cc:262:execute$1845} clk clk2 clk_int_1 clk2 clk_int_1 clk clk2 clk_int_1 diff --git a/sdc-plugin/tests/get_clocks/get_clocks.v b/sdc-plugin/tests/get_clocks/get_clocks.v index 59531d220..c2a766a89 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.v +++ b/sdc-plugin/tests/get_clocks/get_clocks.v @@ -4,21 +4,42 @@ module top(input clk, output [5:0] out ); reg [1:0] cnt = 0; +reg [1:0] cnt2 = 0; wire clk_int_1, clk_int_2; IBUF ibuf_inst(.I(clk), .O(ibuf_out)); assign clk_int_1 = ibuf_out; assign clk_int_2 = clk_int_1; +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), +); + always @(posedge clk_int_2) begin cnt <= cnt + 1; end +always @(posedge main_clkout0) begin + cnt2 <= cnt2 + 1; +end + middle middle_inst_1(.clk(ibuf_out), .out(out[2])); middle middle_inst_2(.clk(clk_int_1), .out(out[3])); middle middle_inst_3(.clk(clk_int_2), .out(out[4])); middle middle_inst_4(.clk(clk2), .out(out[5])); -assign out[1:0] = {cnt[0], in[0]}; +assign out[2:0] = {cnt2[0], cnt[0], in[0]}; endmodule module middle(input clk, From 1c43bbfdf51a61c3173604482be5f62c69c9fe77 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 2 Dec 2020 12:16:52 +0100 Subject: [PATCH 251/845] SDC: Add TODO comment to remove dangling wire check Signed-off-by: Tomasz Michalak --- sdc-plugin/propagation.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 1982aef36..460efbfa3 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -248,6 +248,8 @@ void ClockDividerPropagation::PropagateClocksForCellType( for (auto output : Pll::outputs) { RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); // Don't add clocks on dangling wires + // TODO Remove the workaround with the WireHasSinkCell check once the following issue is fixed: + // https://github.com/SymbiFlow/yosys-symbiflow-plugins/issues/59 if (wire && WireHasSinkCell(wire)) { float clkout_period(pll.clkout_period.at(output)); float clkout_rising_edge(pll.clkout_rising_edge.at(output)); From 6d60a4b52d4898ee26b2874f5d8486e4c6769c21 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Tue, 8 Dec 2020 07:47:51 -0800 Subject: [PATCH 252/845] Fix compilation * add missing include in xdc plug-in * make get_bank_tiles() an inline function to avoid duplicate symbols if all plugins are linked together. Signed-off-by: Henner Zeller --- bank_tiles.h | 2 +- sdc-plugin/sdc.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bank_tiles.h b/bank_tiles.h index 79764ed6c..3197ee004 100644 --- a/bank_tiles.h +++ b/bank_tiles.h @@ -27,7 +27,7 @@ using BankTilesMap = std::unordered_map; // Find the part's JSON file with information including the IO Banks // and extract the bank tiles. -BankTilesMap get_bank_tiles(const std::string json_file_name) { +inline BankTilesMap get_bank_tiles(const std::string json_file_name) { BankTilesMap bank_tiles; std::ifstream json_file(json_file_name); if (!json_file.good()) { diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 03f46032c..6ddaf0136 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -16,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include +#include + #include "clocks.h" #include "kernel/log.h" #include "kernel/register.h" From 27074e9180d2270c54da221bd10040cadfa5869c Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 9 Dec 2020 09:48:43 +0100 Subject: [PATCH 253/845] Fix cleanup target Signed-off-by: Tomasz Michalak --- Makefile_test.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile_test.common b/Makefile_test.common index a2a350921..ae874eb68 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -84,6 +84,6 @@ $(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) $(foreach test,$(UNIT_TESTS),$(eval $(call unit_test_tpl,$(test)))) clean: - @rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/$(test).eblif $(test)/$(test).json) + @rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test)_[0-9].sdc $(test)/$(test).txt $(test)/$(test).eblif $(test)/$(test).json) @rm -rf $(foreach test,$(UNIT_TESTS),$(test)/$(test).test.o $(test)/$(test).test.d $(test)/$(test).test) @find . -name "ok" -or -name "*.log" | xargs rm -rf From 1fa3cf9fec263eb3cc8344540ef3c16b870d7eae Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 7 Jul 2020 11:30:19 +0200 Subject: [PATCH 254/845] Add format target Signed-off-by: Tomasz Michalak --- .clang-format | 12 ++++++++++++ Makefile | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..f9a8b1f29 --- /dev/null +++ b/.clang-format @@ -0,0 +1,12 @@ +# Default Linux style +BasedOnStyle: LLVM +IndentWidth: 4 +UseTab: Never +BreakBeforeBraces: Linux +AllowShortIfStatementsOnASingleLine: false +IndentCaseLabels: false + +# From CodingReadme +TabWidth: 4 +ContinuationIndentWidth: 2 +ColumnLimit: 150 diff --git a/Makefile b/Makefile index d142d3169..1fe1c9e26 100644 --- a/Makefile +++ b/Makefile @@ -29,3 +29,8 @@ install: $(PLUGINS_INSTALL) test: $(PLUGINS_TEST) clean: $(PLUGINS_CLEAN) + +CLANG_FORMAT ?= clang-format-5.0 +format: + find . -name \*.cc -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i + find . -name \*.h -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i From dd2a94cc14c4ff4ed4faf2168f8b9d36b2520792 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 8 Dec 2020 14:32:29 +0100 Subject: [PATCH 255/845] Format: Add format check script and enforce format checking Signed-off-by: Tomasz Michalak --- .github/workflows/build-and-test.sh | 6 ++ .github/workflows/ci.yml | 7 +- .github/workflows/format-check.sh | 14 +++ Makefile | 4 +- sdc-plugin/.clang-format | 151 ---------------------------- 5 files changed, 28 insertions(+), 154 deletions(-) create mode 100755 .github/workflows/format-check.sh delete mode 100644 sdc-plugin/.clang-format diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index 8fd95f918..6a33c39e4 100755 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -23,3 +23,9 @@ make test -j`nproc` end_section ########################################################################## + +start_section Cleanup +make clean -j`nproc` +end_section + +########################################################################## diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42f581042..5fb51b97e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: sudo apt-get install git g++-9 build-essential bison flex \ libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot \ pkg-config libboost-system-dev libboost-python-dev \ - libboost-filesystem-dev zlib1g-dev + libboost-filesystem-dev zlib1g-dev clang-format-5.0 - name: Install Yosys run: source .github/workflows/setup.sh @@ -29,3 +29,8 @@ jobs: run: source .github/workflows/build-and-test.sh env: OS: ${{ runner.os }} + + - name: Format + run: source .github/workflows/format-check.sh + env: + OS: ${{ runner.os }} diff --git a/.github/workflows/format-check.sh b/.github/workflows/format-check.sh new file mode 100755 index 000000000..20814bf02 --- /dev/null +++ b/.github/workflows/format-check.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +set -e + +source .github/workflows/common.sh + +########################################################################## + +start_section Formatting +make format -j`nproc` +test $(git status --porcelain | wc -l) -eq 0 || { git diff; false; } +end_section + +########################################################################## diff --git a/Makefile b/Makefile index 1fe1c9e26..0d54794c9 100644 --- a/Makefile +++ b/Makefile @@ -32,5 +32,5 @@ clean: $(PLUGINS_CLEAN) CLANG_FORMAT ?= clang-format-5.0 format: - find . -name \*.cc -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i - find . -name \*.h -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i + find . -name \*.cc -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i + find . -name \*.h -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i diff --git a/sdc-plugin/.clang-format b/sdc-plugin/.clang-format deleted file mode 100644 index 3b943525e..000000000 --- a/sdc-plugin/.clang-format +++ /dev/null @@ -1,151 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Chromium -AccessModifierOffset: -1 -AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlines: Left -AlignOperands: true -AlignTrailingComments: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: true -AllowShortLoopsOnASingleLine: true -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: true -AlwaysBreakTemplateDeclarations: Yes -BinPackArguments: true -BinPackParameters: true -BraceWrapping: - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - AfterExternBlock: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false - SplitEmptyFunction: true - SplitEmptyRecord: true - SplitEmptyNamespace: true -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Attach -BreakBeforeInheritanceComma: false -BreakInheritanceList: BeforeColon -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false -BreakConstructorInitializers: BeforeColon -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: true -ColumnLimit: 80 -CommentPragmas: '^ IWYU pragma:' -CompactNamespaces: false -ConstructorInitializerAllOnOneLineOrOnePerLine: true -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DerivePointerAlignment: true -DisableFormat: false -ExperimentalAutoDetectBinPacking: false -FixNamespaceComments: true -ForEachMacros: - - foreach - - Q_FOREACH - - BOOST_FOREACH -IncludeBlocks: Preserve -IncludeCategories: - - Regex: '^' - Priority: 2 - - Regex: '^<.*\.h>' - Priority: 1 - - Regex: '^<.*' - Priority: 2 - - Regex: '.*' - Priority: 3 -IncludeIsMainRegex: '([-_](test|unittest))?$' -IndentCaseLabels: true -IndentPPDirectives: None -IndentWidth: 4 -IndentWrappedFunctionNames: false -JavaScriptQuotes: Leave -JavaScriptWrapImports: true -KeepEmptyLinesAtTheStartOfBlocks: false -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBinPackProtocolList: Never -ObjCBlockIndentWidth: 2 -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: true -PenaltyBreakAssignment: 2 -PenaltyBreakBeforeFirstCallParameter: 1 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyBreakTemplateDeclaration: 10 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 200 -PointerAlignment: Left -RawStringFormats: - - Language: Cpp - Delimiters: - - cc - - CC - - cpp - - Cpp - - CPP - - 'c++' - - 'C++' - CanonicalDelimiter: '' - BasedOnStyle: google - - Language: TextProto - Delimiters: - - pb - - PB - - proto - - PROTO - EnclosingFunctions: - - EqualsProto - - EquivToProto - - PARSE_PARTIAL_TEXT_PROTO - - PARSE_TEST_PROTO - - PARSE_TEXT_PROTO - - ParseTextOrDie - - ParseTextProtoOrDie - CanonicalDelimiter: '' - BasedOnStyle: google -ReflowComments: true -SortIncludes: true -SortUsingDeclarations: true -SpaceAfterCStyleCast: false -SpaceAfterTemplateKeyword: true -SpaceBeforeAssignmentOperators: true -SpaceBeforeCpp11BracedList: false -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeParens: ControlStatements -SpaceBeforeRangeBasedForLoopColon: true -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 2 -SpacesInAngles: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Auto -StatementMacros: - - Q_UNUSED - - QT_REQUIRE_VERSION -TabWidth: 8 -UseTab: ForIndentation -... - From 9f0ac238fae1b3a04f4716bb36a01c310153568e Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 8 Dec 2020 18:30:58 +0100 Subject: [PATCH 256/845] Run formatting on all plugins Signed-off-by: Tomasz Michalak --- bank_tiles.h | 46 +- .../design_introspection.cc | 7 +- design_introspection-plugin/get_cells.cc | 28 +- design_introspection-plugin/get_cells.h | 5 +- design_introspection-plugin/get_cmd.cc | 139 ++-- design_introspection-plugin/get_cmd.h | 26 +- design_introspection-plugin/get_nets.cc | 29 +- design_introspection-plugin/get_nets.h | 5 +- design_introspection-plugin/get_pins.cc | 67 +- design_introspection-plugin/get_pins.h | 15 +- design_introspection-plugin/get_ports.cc | 24 +- design_introspection-plugin/get_ports.h | 10 +- fasm-plugin/fasm.cc | 95 +-- get_count-plugin/get_count.cc | 46 +- integrateinv-plugin/integrateinv.cc | 538 ++++++------- params-plugin/params.cc | 90 ++- ql-iob-plugin/pcf_parser.cc | 19 +- ql-iob-plugin/pinmap_parser.cc | 21 +- ql-iob-plugin/ql-iob.cc | 84 +- sdc-plugin/buffers.cc | 88 +-- sdc-plugin/buffers.h | 19 +- sdc-plugin/clocks.cc | 142 ++-- sdc-plugin/clocks.h | 61 +- sdc-plugin/propagation.cc | 236 +++--- sdc-plugin/propagation.h | 58 +- sdc-plugin/sdc.cc | 496 ++++++------ sdc-plugin/sdc_writer.cc | 128 ++- sdc-plugin/sdc_writer.h | 42 +- sdc-plugin/set_clock_groups.cc | 107 ++- sdc-plugin/set_clock_groups.h | 10 +- sdc-plugin/set_false_path.cc | 66 +- sdc-plugin/set_false_path.h | 10 +- sdc-plugin/set_max_delay.cc | 58 +- sdc-plugin/set_max_delay.h | 10 +- sdc-plugin/tests/escaping/escaping.test.cc | 12 +- selection-plugin/selection.cc | 108 +-- xdc-plugin/xdc.cc | 734 +++++++++--------- 37 files changed, 1759 insertions(+), 1920 deletions(-) diff --git a/bank_tiles.h b/bank_tiles.h index 3197ee004..3ff52203d 100644 --- a/bank_tiles.h +++ b/bank_tiles.h @@ -20,36 +20,34 @@ #include "kernel/log.h" #include "libs/json11/json11.hpp" - USING_YOSYS_NAMESPACE // Coordinates of HCLK_IOI tiles associated with a specified bank using BankTilesMap = std::unordered_map; // Find the part's JSON file with information including the IO Banks // and extract the bank tiles. -inline BankTilesMap get_bank_tiles(const std::string json_file_name) { - BankTilesMap bank_tiles; - std::ifstream json_file(json_file_name); - if (!json_file.good()) { - log_cmd_error("Can't open JSON file %s", json_file_name.c_str()); - } - std::string json_str((std::istreambuf_iterator(json_file)), - std::istreambuf_iterator()); - std::string error; - auto json = json11::Json::parse(json_str, error); - if (!error.empty()) { - log_cmd_error("%s\n", error.c_str()); - } - auto json_objects = json.object_items(); - auto iobanks = json_objects.find("iobanks"); - if (iobanks == json_objects.end()) { - log_cmd_error("IO Bank information missing in the part's json: %s\n", json_file_name.c_str()); - } +inline BankTilesMap get_bank_tiles(const std::string json_file_name) +{ + BankTilesMap bank_tiles; + std::ifstream json_file(json_file_name); + if (!json_file.good()) { + log_cmd_error("Can't open JSON file %s", json_file_name.c_str()); + } + std::string json_str((std::istreambuf_iterator(json_file)), std::istreambuf_iterator()); + std::string error; + auto json = json11::Json::parse(json_str, error); + if (!error.empty()) { + log_cmd_error("%s\n", error.c_str()); + } + auto json_objects = json.object_items(); + auto iobanks = json_objects.find("iobanks"); + if (iobanks == json_objects.end()) { + log_cmd_error("IO Bank information missing in the part's json: %s\n", json_file_name.c_str()); + } - for (auto iobank : iobanks->second.object_items()) { - bank_tiles.emplace(std::atoi(iobank.first.c_str()), iobank.second.string_value()); - } + for (auto iobank : iobanks->second.object_items()) { + bank_tiles.emplace(std::atoi(iobank.first.c_str()), iobank.second.string_value()); + } - return bank_tiles; + return bank_tiles; } - diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc index 64fdbbc76..4bd348d37 100644 --- a/design_introspection-plugin/design_introspection.cc +++ b/design_introspection-plugin/design_introspection.cc @@ -18,22 +18,21 @@ * */ -#include "get_nets.h" -#include "get_ports.h" #include "get_cells.h" +#include "get_nets.h" #include "get_pins.h" +#include "get_ports.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN struct DesignIntrospection { - DesignIntrospection(){} + DesignIntrospection() {} GetNets get_nets_cmd; GetPorts get_ports_cmd; GetCells get_cells_cmd; GetPins get_pins_cmd; } DesignIntrospection; - PRIVATE_NAMESPACE_END diff --git a/design_introspection-plugin/get_cells.cc b/design_introspection-plugin/get_cells.cc index 937545d2f..d0e6ce0cc 100644 --- a/design_introspection-plugin/get_cells.cc +++ b/design_introspection-plugin/get_cells.cc @@ -25,24 +25,24 @@ std::string GetCells::TypeName() { return "cell"; } std::string GetCells::SelectionType() { return "c"; } -GetCells::SelectionObjects GetCells::ExtractSelection(RTLIL::Design* design, const CommandArgs& args) { +GetCells::SelectionObjects GetCells::ExtractSelection(RTLIL::Design *design, const CommandArgs &args) +{ SelectionObjects selected_objects; for (auto module : design->selected_modules()) { - for (auto cell : module->selected_cells()) { - if (args.filters.size() > 0) { - Filter filter = args.filters.at(0); - std::string attr_value = cell->get_string_attribute( - RTLIL::IdString(RTLIL::escape_id(filter.first))); - if (attr_value.compare(filter.second)) { - continue; - } - } - std::string object_name(RTLIL::unescape_id(cell->name)); - selected_objects.push_back(object_name); - } + for (auto cell : module->selected_cells()) { + if (args.filters.size() > 0) { + Filter filter = args.filters.at(0); + std::string attr_value = cell->get_string_attribute(RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } + } + std::string object_name(RTLIL::unescape_id(cell->name)); + selected_objects.push_back(object_name); + } } if (selected_objects.size() == 0 and !args.is_quiet) { - log_warning("Couldn't find matching cell.\n"); + log_warning("Couldn't find matching cell.\n"); } return selected_objects; } diff --git a/design_introspection-plugin/get_cells.h b/design_introspection-plugin/get_cells.h index 205d50b36..c9ba62180 100644 --- a/design_introspection-plugin/get_cells.h +++ b/design_introspection-plugin/get_cells.h @@ -29,8 +29,7 @@ struct GetCells : public GetCmd { std::string TypeName() override; std::string SelectionType() override; - SelectionObjects ExtractSelection(RTLIL::Design* design, - const CommandArgs& args) override; + SelectionObjects ExtractSelection(RTLIL::Design *design, const CommandArgs &args) override; }; -#endif // GET_CELLS_H_ +#endif // GET_CELLS_H_ diff --git a/design_introspection-plugin/get_cmd.cc b/design_introspection-plugin/get_cmd.cc index 4b54ded6b..66401a657 100644 --- a/design_introspection-plugin/get_cmd.cc +++ b/design_introspection-plugin/get_cmd.cc @@ -2,7 +2,8 @@ USING_YOSYS_NAMESPACE -void GetCmd::help() { +void GetCmd::help() +{ // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" get_%ss [-quiet] [-filter filter_expression] " @@ -30,106 +31,94 @@ void GetCmd::help() { log("\n"); } -void GetCmd::ExecuteSelection(RTLIL::Design* design, const CommandArgs& args) { +void GetCmd::ExecuteSelection(RTLIL::Design *design, const CommandArgs &args) +{ std::vector selection_args; // Add name of top module to selection string - std::transform(args.selection_objects.begin(), args.selection_objects.end(), - std::back_inserter(selection_args), - [&](const std::string& obj) { - return RTLIL::unescape_id(design->top_module()->name) + - "/" + SelectionType() + ":" + obj; - }); + std::transform(args.selection_objects.begin(), args.selection_objects.end(), std::back_inserter(selection_args), + [&](const std::string &obj) { return RTLIL::unescape_id(design->top_module()->name) + "/" + SelectionType() + ":" + obj; }); extra_args(selection_args, 0, design); if (design->selected_modules().empty()) { - if (!args.is_quiet) { - log_warning("Specified %s not found in design\n", - TypeName().c_str()); - } + if (!args.is_quiet) { + log_warning("Specified %s not found in design\n", TypeName().c_str()); + } } } -void GetCmd::PackToTcl(const SelectionObjects& objects) { - Tcl_Obj* tcl_result; +void GetCmd::PackToTcl(const SelectionObjects &objects) +{ + Tcl_Obj *tcl_result; if (objects.size() == 1) { - tcl_result = Tcl_NewStringObj(objects.at(0).c_str(), -1); + tcl_result = Tcl_NewStringObj(objects.at(0).c_str(), -1); } else { - tcl_result = Tcl_NewListObj(0, NULL); - for (const auto& object : objects) { - Tcl_Obj* value_obj = Tcl_NewStringObj(object.c_str(), -1); - Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_result, - value_obj); - } + tcl_result = Tcl_NewListObj(0, NULL); + for (const auto &object : objects) { + Tcl_Obj *value_obj = Tcl_NewStringObj(object.c_str(), -1); + Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_result, value_obj); + } } Tcl_SetObjResult(yosys_get_tcl_interp(), tcl_result); } -GetCmd::CommandArgs GetCmd::ParseCommand(const std::vector& args) { - CommandArgs parsed_args{.filters = Filters(), - .is_quiet = false, - .selection_objects = SelectionObjects()}; +GetCmd::CommandArgs GetCmd::ParseCommand(const std::vector &args) +{ + CommandArgs parsed_args{.filters = Filters(), .is_quiet = false, .selection_objects = SelectionObjects()}; size_t argidx(0); for (argidx = 1; argidx < args.size(); argidx++) { - std::string arg = args[argidx]; - if (arg == "-quiet") { - parsed_args.is_quiet = true; - continue; - } + std::string arg = args[argidx]; + if (arg == "-quiet") { + parsed_args.is_quiet = true; + continue; + } - if (arg == "-filter" and argidx + 1 < args.size()) { - std::string filter_arg = args[++argidx]; + if (arg == "-filter" and argidx + 1 < args.size()) { + std::string filter_arg = args[++argidx]; - // Remove spaces - filter_arg.erase( - std::remove_if(filter_arg.begin(), filter_arg.end(), isspace), - filter_arg.end()); + // Remove spaces + filter_arg.erase(std::remove_if(filter_arg.begin(), filter_arg.end(), isspace), filter_arg.end()); - // Parse filters - // TODO Add support for multiple condition expression - // Currently only a single == is supported - std::regex filter_attr_regex("(\\w+\\s?==\\s?\\w+)([(||)(&&)]*)"); - std::regex_token_iterator regex_end; - std::regex_token_iterator matches( - filter_arg.begin(), filter_arg.end(), filter_attr_regex, 1); - if (matches == regex_end) { - log_warning( - "Currently -filter switch supports only a single " - "'equal(==)' condition expression, the rest will be " - "ignored\n"); - } + // Parse filters + // TODO Add support for multiple condition expression + // Currently only a single == is supported + std::regex filter_attr_regex("(\\w+\\s?==\\s?\\w+)([(||)(&&)]*)"); + std::regex_token_iterator regex_end; + std::regex_token_iterator matches(filter_arg.begin(), filter_arg.end(), filter_attr_regex, 1); + if (matches == regex_end) { + log_warning("Currently -filter switch supports only a single " + "'equal(==)' condition expression, the rest will be " + "ignored\n"); + } - while (matches != regex_end) { - std::string filter(*matches++); - auto separator = filter.find("=="); - if (separator == std::string::npos) { - log_cmd_error("Incorrect filter expression: %s\n", - args[argidx].c_str()); - } - parsed_args.filters.emplace_back(filter.substr(0, separator), - filter.substr(separator + 2)); - } - if (parsed_args.filters.size() > 1) { - log_warning( - "Currently -filter switch supports only a single " - "'equal(==)' condition expression, the rest will be " - "ignored\n"); - } - continue; - } + while (matches != regex_end) { + std::string filter(*matches++); + auto separator = filter.find("=="); + if (separator == std::string::npos) { + log_cmd_error("Incorrect filter expression: %s\n", args[argidx].c_str()); + } + parsed_args.filters.emplace_back(filter.substr(0, separator), filter.substr(separator + 2)); + } + if (parsed_args.filters.size() > 1) { + log_warning("Currently -filter switch supports only a single " + "'equal(==)' condition expression, the rest will be " + "ignored\n"); + } + continue; + } - if (arg.size() > 0 and arg[0] == '-') { - log_cmd_error("Unknown option %s.\n", arg.c_str()); - } + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } - break; + break; } - std::copy(args.begin() + argidx, args.end(), - std::back_inserter(parsed_args.selection_objects)); + std::copy(args.begin() + argidx, args.end(), std::back_inserter(parsed_args.selection_objects)); return parsed_args; } -void GetCmd::execute(std::vector args, RTLIL::Design* design) { +void GetCmd::execute(std::vector args, RTLIL::Design *design) +{ if (design->top_module() == nullptr) { - log_cmd_error("No top module detected\n"); + log_cmd_error("No top module detected\n"); } CommandArgs parsed_args(ParseCommand(args)); diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h index 983a50d23..5d1a12000 100644 --- a/design_introspection-plugin/get_cmd.h +++ b/design_introspection-plugin/get_cmd.h @@ -29,27 +29,25 @@ struct GetCmd : public Pass { using Filters = std::vector; using SelectionObjects = std::vector; struct CommandArgs { - Filters filters; - bool is_quiet; - SelectionObjects selection_objects; + Filters filters; + bool is_quiet; + SelectionObjects selection_objects; }; - GetCmd(const std::string& name, const std::string& description) - : Pass(name, description) {} + GetCmd(const std::string &name, const std::string &description) : Pass(name, description) {} void help() override; - void execute(std::vector args, RTLIL::Design* design) override; + void execute(std::vector args, RTLIL::Design *design) override; - protected: - CommandArgs ParseCommand(const std::vector& args); - void PackToTcl(const SelectionObjects& objects); + protected: + CommandArgs ParseCommand(const std::vector &args); + void PackToTcl(const SelectionObjects &objects); - private: + private: virtual std::string TypeName() = 0; virtual std::string SelectionType() = 0; - virtual SelectionObjects ExtractSelection(RTLIL::Design* design, const CommandArgs& args) = 0; - virtual void ExecuteSelection(RTLIL::Design* design, - const CommandArgs& args); + virtual SelectionObjects ExtractSelection(RTLIL::Design *design, const CommandArgs &args) = 0; + virtual void ExecuteSelection(RTLIL::Design *design, const CommandArgs &args); }; -#endif // GET_CMD_H_ +#endif // GET_CMD_H_ diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc index db5d3759b..09e5ed417 100644 --- a/design_introspection-plugin/get_nets.cc +++ b/design_introspection-plugin/get_nets.cc @@ -25,25 +25,24 @@ std::string GetNets::TypeName() { return "net"; } std::string GetNets::SelectionType() { return "w"; } -GetNets::SelectionObjects GetNets::ExtractSelection(RTLIL::Design* design, - const CommandArgs& args) { +GetNets::SelectionObjects GetNets::ExtractSelection(RTLIL::Design *design, const CommandArgs &args) +{ SelectionObjects selected_objects; for (auto module : design->selected_modules()) { - for (auto wire : module->selected_wires()) { - if (args.filters.size() > 0) { - Filter filter = args.filters.at(0); - std::string attr_value = wire->get_string_attribute( - RTLIL::IdString(RTLIL::escape_id(filter.first))); - if (attr_value.compare(filter.second)) { - continue; - } - } - std::string object_name(RTLIL::unescape_id(wire->name)); - selected_objects.push_back(object_name); - } + for (auto wire : module->selected_wires()) { + if (args.filters.size() > 0) { + Filter filter = args.filters.at(0); + std::string attr_value = wire->get_string_attribute(RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } + } + std::string object_name(RTLIL::unescape_id(wire->name)); + selected_objects.push_back(object_name); + } } if (selected_objects.size() == 0 and !args.is_quiet) { - log_warning("Couldn't find matching net.\n"); + log_warning("Couldn't find matching net.\n"); } return selected_objects; } diff --git a/design_introspection-plugin/get_nets.h b/design_introspection-plugin/get_nets.h index 11f7502a5..d9f5850ff 100644 --- a/design_introspection-plugin/get_nets.h +++ b/design_introspection-plugin/get_nets.h @@ -29,8 +29,7 @@ struct GetNets : public GetCmd { std::string TypeName() override; std::string SelectionType() override; - SelectionObjects ExtractSelection(RTLIL::Design* design, - const CommandArgs& args) override; + SelectionObjects ExtractSelection(RTLIL::Design *design, const CommandArgs &args) override; }; -#endif // GET_NETS_H_ +#endif // GET_NETS_H_ diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc index d39f6bcfe..e94e3ae9b 100644 --- a/design_introspection-plugin/get_pins.cc +++ b/design_introspection-plugin/get_pins.cc @@ -25,57 +25,50 @@ std::string GetPins::TypeName() { return "pin"; } std::string GetPins::SelectionType() { return "c"; } -void GetPins::ExecuteSelection(RTLIL::Design* design, const CommandArgs& args) { +void GetPins::ExecuteSelection(RTLIL::Design *design, const CommandArgs &args) +{ (void)design; (void)args; } -GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design* design, - const CommandArgs& args) { +GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design *design, const CommandArgs &args) +{ SelectionObjects selected_objects; for (auto obj : args.selection_objects) { - size_t port_separator = obj.find_last_of("/"); - std::string cell = obj.substr(0, port_separator); - std::string port = obj.substr(port_separator + 1); - SelectionObjects selection{ - RTLIL::unescape_id(design->top_module()->name) + "/" + - SelectionType() + ":" + cell}; - extra_args(selection, 0, design); - ExtractSingleSelection(selected_objects, design, port, args); + size_t port_separator = obj.find_last_of("/"); + std::string cell = obj.substr(0, port_separator); + std::string port = obj.substr(port_separator + 1); + SelectionObjects selection{RTLIL::unescape_id(design->top_module()->name) + "/" + SelectionType() + ":" + cell}; + extra_args(selection, 0, design); + ExtractSingleSelection(selected_objects, design, port, args); } if (selected_objects.size() == 0 and !args.is_quiet) { - log_warning("Couldn't find matching pin.\n"); + log_warning("Couldn't find matching pin.\n"); } return selected_objects; } -void GetPins::ExtractSingleSelection(SelectionObjects& objects, - RTLIL::Design* design, - const std::string& port_name, - const CommandArgs& args) { +void GetPins::ExtractSingleSelection(SelectionObjects &objects, RTLIL::Design *design, const std::string &port_name, const CommandArgs &args) +{ if (design->selected_modules().empty()) { - if (!args.is_quiet) { - log_warning("Specified %s not found in design\n", - TypeName().c_str()); - } + if (!args.is_quiet) { + log_warning("Specified %s not found in design\n", TypeName().c_str()); + } } for (auto module : design->selected_modules()) { - for (auto cell : module->selected_cells()) { - if (!cell->hasPort(RTLIL::escape_id(port_name))) { - continue; - } - if (args.filters.size() > 0) { - Filter filter = args.filters.at(0); - std::string attr_value = cell->get_string_attribute( - RTLIL::IdString(RTLIL::escape_id(filter.first))); - if (attr_value.compare(filter.second)) { - continue; - } - } - std::string pin_name(RTLIL::unescape_id(cell->name) + "/" + - port_name); - objects.push_back(pin_name); - } + for (auto cell : module->selected_cells()) { + if (!cell->hasPort(RTLIL::escape_id(port_name))) { + continue; + } + if (args.filters.size() > 0) { + Filter filter = args.filters.at(0); + std::string attr_value = cell->get_string_attribute(RTLIL::IdString(RTLIL::escape_id(filter.first))); + if (attr_value.compare(filter.second)) { + continue; + } + } + std::string pin_name(RTLIL::unescape_id(cell->name) + "/" + port_name); + objects.push_back(pin_name); + } } } - diff --git a/design_introspection-plugin/get_pins.h b/design_introspection-plugin/get_pins.h index f7ebe14d7..5d2cde007 100644 --- a/design_introspection-plugin/get_pins.h +++ b/design_introspection-plugin/get_pins.h @@ -27,17 +27,12 @@ USING_YOSYS_NAMESPACE struct GetPins : public GetCmd { GetPins() : GetCmd("get_pins", "Print matching pins") {} - private: + private: std::string TypeName() override; std::string SelectionType() override; - SelectionObjects ExtractSelection(RTLIL::Design* design, - const CommandArgs& args) override; - void ExecuteSelection(RTLIL::Design* design, - const CommandArgs& args) override; - void ExtractSingleSelection(SelectionObjects& objects, - RTLIL::Design* design, - const std::string& port_name, - const CommandArgs& args); + SelectionObjects ExtractSelection(RTLIL::Design *design, const CommandArgs &args) override; + void ExecuteSelection(RTLIL::Design *design, const CommandArgs &args) override; + void ExtractSingleSelection(SelectionObjects &objects, RTLIL::Design *design, const std::string &port_name, const CommandArgs &args); }; -#endif // GET_PINS_H_ +#endif // GET_PINS_H_ diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index ef29b95b8..042ada754 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -25,33 +25,29 @@ std::string GetPorts::TypeName() { return "port"; } std::string GetPorts::SelectionType() { return "x"; } -void GetPorts::ExecuteSelection([[gnu::unused]] RTLIL::Design* design, - [[gnu::unused]] const CommandArgs& args) { -} +void GetPorts::ExecuteSelection([[gnu::unused]] RTLIL::Design *design, [[gnu::unused]] const CommandArgs &args) {} -GetPorts::SelectionObjects GetPorts::ExtractSelection(RTLIL::Design* design, - const CommandArgs& args) { +GetPorts::SelectionObjects GetPorts::ExtractSelection(RTLIL::Design *design, const CommandArgs &args) +{ std::string port_name = args.selection_objects.at(0); std::string port_str(port_name.size(), '\0'); int bit(0); if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { - log_error("Couldn't find port %s\n", port_name.c_str()); + log_error("Couldn't find port %s\n", port_name.c_str()); } port_str.resize(strlen(port_str.c_str())); RTLIL::IdString port_id(RTLIL::escape_id(port_str)); SelectionObjects objects; if (auto wire = design->top_module()->wire(port_id)) { - if (wire->port_input || wire->port_output) { - if (bit >= wire->start_offset && - bit < wire->start_offset + wire->width) { - objects.push_back(port_name); - } - } + if (wire->port_input || wire->port_output) { + if (bit >= wire->start_offset && bit < wire->start_offset + wire->width) { + objects.push_back(port_name); + } + } } if (objects.size() == 0 and !args.is_quiet) { - log_warning("Couldn't find port matching %s\n", port_name.c_str()); + log_warning("Couldn't find port matching %s\n", port_name.c_str()); } return objects; } - diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index 89ba49ad7..b1ccb0bca 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -27,14 +27,12 @@ USING_YOSYS_NAMESPACE struct GetPorts : public GetCmd { GetPorts() : GetCmd("get_ports", "Print matching ports") {} - private: + private: std::string TypeName() override; std::string SelectionType() override; /* void execute(std::vector args, RTLIL::Design* design) override; */ - SelectionObjects ExtractSelection(RTLIL::Design* design, - const CommandArgs& args) override; - void ExecuteSelection(RTLIL::Design* design, - const CommandArgs& args) override; + SelectionObjects ExtractSelection(RTLIL::Design *design, const CommandArgs &args) override; + void ExecuteSelection(RTLIL::Design *design, const CommandArgs &args) override; }; -#endif // GET_PORTS_H_ +#endif // GET_PORTS_H_ diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index 4ddfdb24d..5ab4c1a90 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -24,62 +24,65 @@ * annotations on the design cells. */ +#include "../bank_tiles.h" +#include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" -#include "kernel/log.h" -#include "../bank_tiles.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN struct WriteFasm : public Backend { - WriteFasm() : Backend("fasm", "Write out FASM features") {} - + WriteFasm() : Backend("fasm", "Write out FASM features") {} - void help() override { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" write_fasm -part_json \n"); - log("\n"); - log("Write out a file with vref FASM features.\n"); - log("\n"); - } + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" write_fasm -part_json \n"); + log("\n"); + log("Write out a file with vref FASM features.\n"); + log("\n"); + } - void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) override { - size_t argidx = 1; - std::string part_json; - if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { - part_json = args[++argidx]; - argidx++; - } - extra_args(f, filename, args, argidx); - extract_fasm_features(f, design, part_json); - } + void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) override + { + size_t argidx = 1; + std::string part_json; + if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { + part_json = args[++argidx]; + argidx++; + } + extra_args(f, filename, args, argidx); + extract_fasm_features(f, design, part_json); + } - void extract_fasm_features(std::ostream *&f, RTLIL::Design* design, const std::string& part_json) { - RTLIL::Module* top_module(design->top_module()); - if (top_module == nullptr) { - log_cmd_error("%s: No top module detected.\n", pass_name.c_str()); - } - auto bank_tiles = get_bank_tiles(part_json); - // Generate a fasm feature associated with the INTERNAL_VREF value per bank - // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 - // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV - for (auto cell : top_module->cells()) { - if (!cell->hasParam(ID(FASM_EXTRA))) continue; - if (cell->getParam(ID(FASM_EXTRA)) == RTLIL::Const("INTERNAL_VREF")) { - if (bank_tiles.size() == 0) { - log_cmd_error("%s: No bank tiles available on the target part.\n", pass_name.c_str()); - } - int bank_number(cell->getParam(ID(NUMBER)).as_int()); - if (bank_tiles.count(bank_number) == 0) { - log_cmd_error("%s: No IO bank number %d on the target part.\n", pass_name.c_str(), bank_number); - } - int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); - *f << "HCLK_IOI3_" << bank_tiles[bank_number] <<".VREF.V_" << bank_vref << "_MV\n"; - } - } - } + void extract_fasm_features(std::ostream *&f, RTLIL::Design *design, const std::string &part_json) + { + RTLIL::Module *top_module(design->top_module()); + if (top_module == nullptr) { + log_cmd_error("%s: No top module detected.\n", pass_name.c_str()); + } + auto bank_tiles = get_bank_tiles(part_json); + // Generate a fasm feature associated with the INTERNAL_VREF value per bank + // e.g. VREF value of 0.675 for bank 34 is associated with tile HCLK_IOI3_X113Y26 + // hence we need to emit the following fasm feature: HCLK_IOI3_X113Y26.VREF.V_675_MV + for (auto cell : top_module->cells()) { + if (!cell->hasParam(ID(FASM_EXTRA))) + continue; + if (cell->getParam(ID(FASM_EXTRA)) == RTLIL::Const("INTERNAL_VREF")) { + if (bank_tiles.size() == 0) { + log_cmd_error("%s: No bank tiles available on the target part.\n", pass_name.c_str()); + } + int bank_number(cell->getParam(ID(NUMBER)).as_int()); + if (bank_tiles.count(bank_number) == 0) { + log_cmd_error("%s: No IO bank number %d on the target part.\n", pass_name.c_str(), bank_number); + } + int bank_vref(cell->getParam(ID(INTERNAL_VREF)).as_int()); + *f << "HCLK_IOI3_" << bank_tiles[bank_number] << ".VREF.V_" << bank_vref << "_MV\n"; + } + } + } } WriteFasm; PRIVATE_NAMESPACE_END diff --git a/get_count-plugin/get_count.cc b/get_count-plugin/get_count.cc index b78f9b82d..5faff1625 100644 --- a/get_count-plugin/get_count.cc +++ b/get_count-plugin/get_count.cc @@ -30,18 +30,12 @@ PRIVATE_NAMESPACE_BEGIN struct GetCount : public Pass { - enum class ObjectType { - NONE, - MODULE, - CELL, - WIRE - }; - - GetCount () : - Pass("get_count", "Returns count of various selected object types to the TCL interpreter") { - } - - void help() YS_OVERRIDE { + enum class ObjectType { NONE, MODULE, CELL, WIRE }; + + GetCount() : Pass("get_count", "Returns count of various selected object types to the TCL interpreter") {} + + void help() YS_OVERRIDE + { log("\n"); log(" get_count [selection]"); log("\n"); @@ -59,8 +53,9 @@ struct GetCount : public Pass { log(" Returns the count of wires in selection\n"); log("\n"); } - - void execute(std::vector a_Args, RTLIL::Design* a_Design) YS_OVERRIDE { + + void execute(std::vector a_Args, RTLIL::Design *a_Design) YS_OVERRIDE + { // Parse args ObjectType type = ObjectType::NONE; @@ -70,29 +65,25 @@ struct GetCount : public Pass { if (a_Args[1] == "-modules") { type = ObjectType::MODULE; - } - else if (a_Args[1] == "-cells") { + } else if (a_Args[1] == "-cells") { type = ObjectType::CELL; - } - else if (a_Args[1] == "-wires") { + } else if (a_Args[1] == "-wires") { type = ObjectType::WIRE; - } - else if (a_Args[1][0] == '-') { + } else if (a_Args[1][0] == '-') { log_error("Invalid argument '%s'!\n", a_Args[1].c_str()); - } - else { + } else { log_error("Object type not specified!\n"); } extra_args(a_Args, 2, a_Design); // Get the TCL interpreter - Tcl_Interp* tclInterp = yosys_get_tcl_interp(); + Tcl_Interp *tclInterp = yosys_get_tcl_interp(); // Count objects size_t moduleCount = 0; - size_t cellCount = 0; - size_t wireCount = 0; + size_t cellCount = 0; + size_t wireCount = 0; moduleCount += a_Design->selected_modules().size(); for (auto module : a_Design->selected_modules()) { @@ -101,8 +92,7 @@ struct GetCount : public Pass { } size_t count = 0; - switch (type) - { + switch (type) { case ObjectType::MODULE: count = moduleCount; break; @@ -119,7 +109,7 @@ struct GetCount : public Pass { // Return the value as string to the TCL interpreter std::string value = std::to_string(count); - Tcl_Obj* tclStr = Tcl_NewStringObj(value.c_str(), value.size()); + Tcl_Obj *tclStr = Tcl_NewStringObj(value.c_str(), value.size()); Tcl_SetObjResult(tclInterp, tclStr); } diff --git a/integrateinv-plugin/integrateinv.cc b/integrateinv-plugin/integrateinv.cc index 4a4f69361..f3d56906c 100644 --- a/integrateinv-plugin/integrateinv.cc +++ b/integrateinv-plugin/integrateinv.cc @@ -27,315 +27,315 @@ PRIVATE_NAMESPACE_BEGIN /// A structure representing a pin struct Pin { - RTLIL::Cell *cell; /// Cell pointer - RTLIL::IdString port; /// Cell port name - int bit; /// Port bit index + RTLIL::Cell *cell; /// Cell pointer + RTLIL::IdString port; /// Cell port name + int bit; /// Port bit index - Pin(RTLIL::Cell *_cell, const RTLIL::IdString &_port, int _bit = 0) - : cell(_cell), port(_port), bit(_bit) {} + Pin(RTLIL::Cell *_cell, const RTLIL::IdString &_port, int _bit = 0) : cell(_cell), port(_port), bit(_bit) {} - Pin(const Pin &ref) = default; + Pin(const Pin &ref) = default; - unsigned int hash() const { - if (cell == nullptr) { - return mkhash_add(port.hash(), bit); - } else { - return mkhash_add(mkhash(cell->hash(), port.hash()), bit); - } - }; + unsigned int hash() const + { + if (cell == nullptr) { + return mkhash_add(port.hash(), bit); + } else { + return mkhash_add(mkhash(cell->hash(), port.hash()), bit); + } + }; }; -bool operator==(const Pin &lhs, const Pin &rhs) { - return (lhs.cell == rhs.cell) && (lhs.port == rhs.port) && - (lhs.bit == rhs.bit); -} +bool operator==(const Pin &lhs, const Pin &rhs) { return (lhs.cell == rhs.cell) && (lhs.port == rhs.port) && (lhs.bit == rhs.bit); } struct IntegrateInv : public Pass { - /// Temporary SigBit to SigBit helper map. - SigMap m_SigMap; - /// Map of SigBit objects to inverter cells. - dict m_InvMap; - /// Map of inverter cells that can potentially be integrated and invertable - /// pins that they are connected to - dict> m_Inverters; - /// Map of invertable pins and names of parameters controlling inversions - dict m_InvParams; - - IntegrateInv() - : Pass("integrateinv", "Integrates inverters ($_NOT_ cells) into ports " - "with 'invertible_pin' attribute set") {} - - void help() override { - log("\n"); - log(" integrateinv [selection]"); - log("\n"); - log("This pass integrates inverters into cells that have ports with the\n"); - log("'invertible_pin' attribute set. The attribute should contain the name\n"); - log("of a parameter controlling the inversion.\n"); - log("\n"); - log("This pass is essentially the opposite of the 'extractinv' pass.\n"); - log("\n"); - } - - void execute(std::vector a_Args, - RTLIL::Design *a_Design) override { - log_header(a_Design, - "Executing INTEGRATEINV pass (integrating pin inverters).\n"); - - extra_args(a_Args, 1, a_Design); - - // Process modules - for (auto module : a_Design->selected_modules()) { - - // Setup the SigMap - m_SigMap.clear(); - m_SigMap.set(module); - - m_Inverters.clear(); - m_InvParams.clear(); - - // Setup inverter map - buildInverterMap(module); - - // Identify inverters that can be integrated and assign them with - // lists of cells and ports to integrate with - for (auto cell : module->selected_cells()) { - collectInverters(cell); - } - - // Integrate inverters - integrateInverters(); + /// Temporary SigBit to SigBit helper map. + SigMap m_SigMap; + /// Map of SigBit objects to inverter cells. + dict m_InvMap; + /// Map of inverter cells that can potentially be integrated and invertable + /// pins that they are connected to + dict> m_Inverters; + /// Map of invertable pins and names of parameters controlling inversions + dict m_InvParams; + + IntegrateInv() + : Pass("integrateinv", "Integrates inverters ($_NOT_ cells) into ports " + "with 'invertible_pin' attribute set") + { } - // Clear maps - m_SigMap.clear(); + void help() override + { + log("\n"); + log(" integrateinv [selection]"); + log("\n"); + log("This pass integrates inverters into cells that have ports with the\n"); + log("'invertible_pin' attribute set. The attribute should contain the name\n"); + log("of a parameter controlling the inversion.\n"); + log("\n"); + log("This pass is essentially the opposite of the 'extractinv' pass.\n"); + log("\n"); + } - m_InvMap.clear(); - m_Inverters.clear(); - m_InvParams.clear(); - } + void execute(std::vector a_Args, RTLIL::Design *a_Design) override + { + log_header(a_Design, "Executing INTEGRATEINV pass (integrating pin inverters).\n"); - void buildInverterMap(RTLIL::Module *a_Module) { - m_InvMap.clear(); + extra_args(a_Args, 1, a_Design); - for (auto cell : a_Module->cells()) { + // Process modules + for (auto module : a_Design->selected_modules()) { - // Skip non-inverters - if (cell->type != RTLIL::escape_id("$_NOT_")) { - continue; - } + // Setup the SigMap + m_SigMap.clear(); + m_SigMap.set(module); - // Get output connection - auto sigspec = cell->getPort(RTLIL::escape_id("Y")); - auto sigbit = m_SigMap(sigspec.bits().at(0)); + m_Inverters.clear(); + m_InvParams.clear(); - // Store - log_assert(m_InvMap.count(sigbit) == 0); - m_InvMap[sigbit] = cell; - } - } - - void collectInverters(RTLIL::Cell *a_Cell) { - auto module = a_Cell->module; - auto design = module->design; - - for (auto conn : a_Cell->connections()) { - auto port = conn.first; - auto sigspec = conn.second; - - // Consider only inputs. - if (!a_Cell->input(port)) { - continue; - } - - // Get the cell module - auto cellModule = design->module(a_Cell->type); - if (!cellModule) { - continue; - } - - // Get wire. - auto wire = cellModule->wire(port); - if (!wire) { - continue; - } - - // Check if the pin has an embedded inverter. - auto it = wire->attributes.find(ID::invertible_pin); - if (it == wire->attributes.end()) { - continue; - } - - // Decode the parameter name. - RTLIL::IdString paramName = RTLIL::escape_id(it->second.decode_string()); - - // Look for connected inverters - auto sigbits = sigspec.bits(); - for (size_t bit = 0; bit < sigbits.size(); ++bit) { - - auto sigbit = sigbits[bit]; - if (!sigbit.wire) { - continue; - } + // Setup inverter map + buildInverterMap(module); - sigbit = m_SigMap(sigbit); + // Identify inverters that can be integrated and assign them with + // lists of cells and ports to integrate with + for (auto cell : module->selected_cells()) { + collectInverters(cell); + } - // Get the inverter if any - if (!m_InvMap.count(sigbit)) { - continue; + // Integrate inverters + integrateInverters(); } - auto inv = m_InvMap.at(sigbit); - - // Save the inverter pin and the parameter name - auto pin = Pin(a_Cell, port, bit); - auto &list = m_Inverters[inv]; - list.insert(pin); + // Clear maps + m_SigMap.clear(); - log_assert(m_InvParams.count(pin) == 0); - m_InvParams[pin] = paramName; - } + m_InvMap.clear(); + m_Inverters.clear(); + m_InvParams.clear(); } - } - - void integrateInverters() { - - for (auto it : m_Inverters) { - auto inv = it.first; - auto pins = it.second; - - // List all sinks of the inverter - auto sinks = getSinksForDriver(Pin(inv, RTLIL::escape_id("Y"))); - - // If the inverter drives only invertable pins then integrate it - if (sinks == pins) { - log("Integrating inverter %s into:\n", log_id(inv->name)); - - // Integrate into each pin - for (auto pin : pins) { - log_assert(pin.cell != nullptr); - log(" %s.%s[%d]\n", log_id(pin.cell->name), log_id(pin.port), - pin.bit); - - // Change the connection - auto sigspec = pin.cell->getPort(pin.port); - auto sigbits = sigspec.bits(); - - log_assert((size_t)pin.bit < sigbits.size()); - sigbits[pin.bit] = - RTLIL::SigBit(inv->getPort(RTLIL::escape_id("A"))[0]); - pin.cell->setPort(pin.port, RTLIL::SigSpec(sigbits)); - - // Get the control parameter - log_assert(m_InvParams.count(pin) != 0); - auto paramName = m_InvParams[pin]; - - RTLIL::Const invMask; - auto param = pin.cell->parameters.find(paramName); - if (param == pin.cell->parameters.end()) { - invMask = RTLIL::Const(0, sigspec.size()); - } else { - invMask = RTLIL::Const(param->second); - } - - // Check width. - if (invMask.size() != sigspec.size()) { - log_error("The inversion parameter needs to be the same width as " - "the port (%s port %s parameter %s)", - log_id(pin.cell->name), log_id(pin.port), - log_id(paramName)); - } - - // Toggle bit in the control parameter bitmask - if (invMask[pin.bit] == RTLIL::State::S0) { - invMask[pin.bit] = RTLIL::State::S1; - } else if (invMask[pin.bit] == RTLIL::State::S1) { - invMask[pin.bit] = RTLIL::State::S0; - } else { - log_error("The inversion parameter must contain only 0s and 1s (%s " - "parameter %s)\n", - log_id(pin.cell->name), log_id(paramName)); - } - - // Set the parameter back - pin.cell->setParam(paramName, invMask); - } - // Remove the inverter - inv->module->remove(inv); - } - } - } + void buildInverterMap(RTLIL::Module *a_Module) + { + m_InvMap.clear(); - pool getSinksForDriver(const Pin &a_Driver) { - auto module = a_Driver.cell->module; - pool sinks; + for (auto cell : a_Module->cells()) { - // The driver has to be an output pin - if (!a_Driver.cell->output(a_Driver.port)) { - return sinks; - } + // Skip non-inverters + if (cell->type != RTLIL::escape_id("$_NOT_")) { + continue; + } - // Get the driver sigbit - auto driverSigspec = a_Driver.cell->getPort(a_Driver.port); - auto driverSigbit = m_SigMap(driverSigspec.bits().at(a_Driver.bit)); + // Get output connection + auto sigspec = cell->getPort(RTLIL::escape_id("Y")); + auto sigbit = m_SigMap(sigspec.bits().at(0)); - // Look for connected sinks - for (auto cell : module->cells()) { - for (auto conn : cell->connections()) { - auto port = conn.first; - auto sigspec = conn.second; - - // Consider only sinks (inputs) - if (!cell->input(port)) { - continue; + // Store + log_assert(m_InvMap.count(sigbit) == 0); + m_InvMap[sigbit] = cell; } + } - // Check all sigbits - auto sigbits = sigspec.bits(); - for (size_t bit = 0; bit < sigbits.size(); ++bit) { - - auto sigbit = sigbits[bit]; - if (!sigbit.wire) { - continue; - } - - // Got a sink pin of another cell - sigbit = m_SigMap(sigbit); - if (sigbit == driverSigbit) { - sinks.insert(Pin(cell, port, bit)); - } + void collectInverters(RTLIL::Cell *a_Cell) + { + auto module = a_Cell->module; + auto design = module->design; + + for (auto conn : a_Cell->connections()) { + auto port = conn.first; + auto sigspec = conn.second; + + // Consider only inputs. + if (!a_Cell->input(port)) { + continue; + } + + // Get the cell module + auto cellModule = design->module(a_Cell->type); + if (!cellModule) { + continue; + } + + // Get wire. + auto wire = cellModule->wire(port); + if (!wire) { + continue; + } + + // Check if the pin has an embedded inverter. + auto it = wire->attributes.find(ID::invertible_pin); + if (it == wire->attributes.end()) { + continue; + } + + // Decode the parameter name. + RTLIL::IdString paramName = RTLIL::escape_id(it->second.decode_string()); + + // Look for connected inverters + auto sigbits = sigspec.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + sigbit = m_SigMap(sigbit); + + // Get the inverter if any + if (!m_InvMap.count(sigbit)) { + continue; + } + auto inv = m_InvMap.at(sigbit); + + // Save the inverter pin and the parameter name + auto pin = Pin(a_Cell, port, bit); + + auto &list = m_Inverters[inv]; + list.insert(pin); + + log_assert(m_InvParams.count(pin) == 0); + m_InvParams[pin] = paramName; + } } - } } - // Look for connected top-level output ports - for (auto conn : module->connections()) { - auto dst = conn.first; - auto src = conn.second; + void integrateInverters() + { + + for (auto it : m_Inverters) { + auto inv = it.first; + auto pins = it.second; + + // List all sinks of the inverter + auto sinks = getSinksForDriver(Pin(inv, RTLIL::escape_id("Y"))); + + // If the inverter drives only invertable pins then integrate it + if (sinks == pins) { + log("Integrating inverter %s into:\n", log_id(inv->name)); + + // Integrate into each pin + for (auto pin : pins) { + log_assert(pin.cell != nullptr); + log(" %s.%s[%d]\n", log_id(pin.cell->name), log_id(pin.port), pin.bit); + + // Change the connection + auto sigspec = pin.cell->getPort(pin.port); + auto sigbits = sigspec.bits(); + + log_assert((size_t)pin.bit < sigbits.size()); + sigbits[pin.bit] = RTLIL::SigBit(inv->getPort(RTLIL::escape_id("A"))[0]); + pin.cell->setPort(pin.port, RTLIL::SigSpec(sigbits)); + + // Get the control parameter + log_assert(m_InvParams.count(pin) != 0); + auto paramName = m_InvParams[pin]; + + RTLIL::Const invMask; + auto param = pin.cell->parameters.find(paramName); + if (param == pin.cell->parameters.end()) { + invMask = RTLIL::Const(0, sigspec.size()); + } else { + invMask = RTLIL::Const(param->second); + } + + // Check width. + if (invMask.size() != sigspec.size()) { + log_error("The inversion parameter needs to be the same width as " + "the port (%s port %s parameter %s)", + log_id(pin.cell->name), log_id(pin.port), log_id(paramName)); + } + + // Toggle bit in the control parameter bitmask + if (invMask[pin.bit] == RTLIL::State::S0) { + invMask[pin.bit] = RTLIL::State::S1; + } else if (invMask[pin.bit] == RTLIL::State::S1) { + invMask[pin.bit] = RTLIL::State::S0; + } else { + log_error("The inversion parameter must contain only 0s and 1s (%s " + "parameter %s)\n", + log_id(pin.cell->name), log_id(paramName)); + } + + // Set the parameter back + pin.cell->setParam(paramName, invMask); + } + + // Remove the inverter + inv->module->remove(inv); + } + } + } - auto sigbits = dst.bits(); - for (size_t bit = 0; bit < sigbits.size(); ++bit) { + pool getSinksForDriver(const Pin &a_Driver) + { + auto module = a_Driver.cell->module; + pool sinks; - auto sigbit = sigbits[bit]; - if (!sigbit.wire) { - continue; + // The driver has to be an output pin + if (!a_Driver.cell->output(a_Driver.port)) { + return sinks; } - if (!sigbit.wire->port_output) { - continue; + // Get the driver sigbit + auto driverSigspec = a_Driver.cell->getPort(a_Driver.port); + auto driverSigbit = m_SigMap(driverSigspec.bits().at(a_Driver.bit)); + + // Look for connected sinks + for (auto cell : module->cells()) { + for (auto conn : cell->connections()) { + auto port = conn.first; + auto sigspec = conn.second; + + // Consider only sinks (inputs) + if (!cell->input(port)) { + continue; + } + + // Check all sigbits + auto sigbits = sigspec.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + // Got a sink pin of another cell + sigbit = m_SigMap(sigbit); + if (sigbit == driverSigbit) { + sinks.insert(Pin(cell, port, bit)); + } + } + } } - sigbit = m_SigMap(sigbit); - if (sigbit == driverSigbit) { - sinks.insert(Pin(nullptr, sigbit.wire->name, bit)); + // Look for connected top-level output ports + for (auto conn : module->connections()) { + auto dst = conn.first; + auto src = conn.second; + + auto sigbits = dst.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + if (!sigbit.wire->port_output) { + continue; + } + + sigbit = m_SigMap(sigbit); + if (sigbit == driverSigbit) { + sinks.insert(Pin(nullptr, sigbit.wire->name, bit)); + } + } } - } - } - return sinks; - } + return sinks; + } } IntegrateInv; diff --git a/params-plugin/params.cc b/params-plugin/params.cc index c4f169b41..cddc73793 100644 --- a/params-plugin/params.cc +++ b/params-plugin/params.cc @@ -16,66 +16,64 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" -#include "kernel/log.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN - -void register_in_tcl_interpreter(const std::string& command) { - Tcl_Interp* interp = yosys_get_tcl_interp(); - std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); - Tcl_Eval(interp, tcl_script.c_str()); +void register_in_tcl_interpreter(const std::string &command) +{ + Tcl_Interp *interp = yosys_get_tcl_interp(); + std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); + Tcl_Eval(interp, tcl_script.c_str()); } struct GetParam : public Pass { - GetParam() : Pass("getparam", "get parameter on object") { - register_in_tcl_interpreter(pass_name); - } + GetParam() : Pass("getparam", "get parameter on object") { register_in_tcl_interpreter(pass_name); } - void help() override - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" getparam name selection\n"); - log("\n"); - log("Get the given parameter on the selected object. \n"); - log("\n"); - } + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" getparam name selection\n"); + log("\n"); + log("Get the given parameter on the selected object. \n"); + log("\n"); + } - void execute(std::vector args, RTLIL::Design* design) override - { - if (args.size() == 1) { - log_error("Incorrect number of arguments"); - } - extra_args(args, 2, design); + void execute(std::vector args, RTLIL::Design *design) override + { + if (args.size() == 1) { + log_error("Incorrect number of arguments"); + } + extra_args(args, 2, design); - auto param = RTLIL::IdString(RTLIL::escape_id(args.at(1))); - Tcl_Interp *interp = yosys_get_tcl_interp(); - Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); + auto param = RTLIL::IdString(RTLIL::escape_id(args.at(1))); + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_Obj *tcl_list = Tcl_NewListObj(0, NULL); - for (auto module : design->selected_modules()) { - for (auto cell : module->selected_cells()) { - auto params = cell->parameters; - auto it = params.find(param); - if (it != params.end()) { - std::string value; - auto param_obj = it->second; - if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { - value = param_obj.decode_string(); - } else { - value = std::to_string(param_obj.as_int()); - } - Tcl_Obj* value_obj = Tcl_NewStringObj(value.c_str(), value.size()); - Tcl_ListObjAppendElement(interp, tcl_list, value_obj); - } - } - } - Tcl_SetObjResult(interp, tcl_list); - } + for (auto module : design->selected_modules()) { + for (auto cell : module->selected_cells()) { + auto params = cell->parameters; + auto it = params.find(param); + if (it != params.end()) { + std::string value; + auto param_obj = it->second; + if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { + value = param_obj.decode_string(); + } else { + value = std::to_string(param_obj.as_int()); + } + Tcl_Obj *value_obj = Tcl_NewStringObj(value.c_str(), value.size()); + Tcl_ListObjAppendElement(interp, tcl_list, value_obj); + } + } + } + Tcl_SetObjResult(interp, tcl_list); + } } GetParam; diff --git a/ql-iob-plugin/pcf_parser.cc b/ql-iob-plugin/pcf_parser.cc index c7a9309b7..f8e1aeb48 100644 --- a/ql-iob-plugin/pcf_parser.cc +++ b/ql-iob-plugin/pcf_parser.cc @@ -23,7 +23,8 @@ // ============================================================================ -bool PcfParser::parse (const std::string& a_FileName) { +bool PcfParser::parse(const std::string &a_FileName) +{ // Open the file std::ifstream file(a_FileName.c_str()); @@ -32,14 +33,12 @@ bool PcfParser::parse (const std::string& a_FileName) { return parse(file); } -const std::vector PcfParser::getConstraints () const { - return m_Constraints; -} - +const std::vector PcfParser::getConstraints() const { return m_Constraints; } // ============================================================================ -bool PcfParser::parse (std::ifstream& a_Stream) { +bool PcfParser::parse(std::ifstream &a_Stream) +{ if (!a_Stream.good()) { return false; @@ -58,13 +57,7 @@ bool PcfParser::parse (std::ifstream& a_Stream) { // Match against regex std::cmatch cm; if (std::regex_match(line.c_str(), cm, re)) { - m_Constraints.push_back( - Constraint( - cm[1].str(), - cm[2].str(), - cm[3].str() - ) - ); + m_Constraints.push_back(Constraint(cm[1].str(), cm[2].str(), cm[3].str())); } } diff --git a/ql-iob-plugin/pinmap_parser.cc b/ql-iob-plugin/pinmap_parser.cc index 77e3662fd..ceaf30a28 100644 --- a/ql-iob-plugin/pinmap_parser.cc +++ b/ql-iob-plugin/pinmap_parser.cc @@ -23,7 +23,8 @@ // ============================================================================ -bool PinmapParser::parse (const std::string& a_FileName) { +bool PinmapParser::parse(const std::string &a_FileName) +{ // Open the file std::ifstream file(a_FileName.c_str()); @@ -32,13 +33,12 @@ bool PinmapParser::parse (const std::string& a_FileName) { return parse(file); } -const std::vector PinmapParser::getEntries() const { - return m_Entries; -} +const std::vector PinmapParser::getEntries() const { return m_Entries; } // ============================================================================ -std::vector PinmapParser::getFields (const std::string& a_String) { +std::vector PinmapParser::getFields(const std::string &a_String) +{ std::vector fields; std::stringstream ss(a_String); @@ -53,7 +53,8 @@ std::vector PinmapParser::getFields (const std::string& a_String) { return fields; } -bool PinmapParser::parseHeader (std::ifstream& a_Stream) { +bool PinmapParser::parseHeader(std::ifstream &a_Stream) +{ // Get the header line std::string header; @@ -68,7 +69,8 @@ bool PinmapParser::parseHeader (std::ifstream& a_Stream) { return true; } -bool PinmapParser::parseData (std::ifstream& a_Stream) { +bool PinmapParser::parseData(std::ifstream &a_Stream) +{ // Parse lines as they come while (a_Stream.good()) { @@ -84,7 +86,7 @@ bool PinmapParser::parseData (std::ifstream& a_Stream) { // Assign data fields to columns Entry entry; - for (size_t i=0; i= m_Fields.size()) { return false; @@ -99,7 +101,8 @@ bool PinmapParser::parseData (std::ifstream& a_Stream) { return true; } -bool PinmapParser::parse (std::ifstream& a_Stream) { +bool PinmapParser::parse(std::ifstream &a_Stream) +{ if (!a_Stream.good()) { return false; diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 6574535a2..d6aeefce8 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -41,18 +41,16 @@ struct QuicklogicIob : public Pass { std::string port; // Name of the port that goes to a pad std::vector preferredTypes; // A list of preferred IO cell types - IoCellType (const std::string& _type, const std::string& _port, const std::vector _preferredTypes = std::vector()) : - type(_type), - port(_port), - preferredTypes(_preferredTypes) - {} + IoCellType(const std::string &_type, const std::string &_port, const std::vector _preferredTypes = std::vector()) + : type(_type), port(_port), preferredTypes(_preferredTypes) + { + } }; - QuicklogicIob () : - Pass("quicklogic_iob", "Map IO buffers to cells that correspond to their assigned locations") { - } + QuicklogicIob() : Pass("quicklogic_iob", "Map IO buffers to cells that correspond to their assigned locations") {} - void help() YS_OVERRIDE { + void help() YS_OVERRIDE + { log("\n"); log(" quicklogic_iob []"); log("\n"); @@ -82,8 +80,9 @@ struct QuicklogicIob : public Pass { log(" types in order of preference.\n"); log("\n"); } - - void execute(std::vector a_Args, RTLIL::Design* a_Design) YS_OVERRIDE { + + void execute(std::vector a_Args, RTLIL::Design *a_Design) YS_OVERRIDE + { if (a_Args.size() < 3) { log_cmd_error(" Usage: quicklogic_iob []"); } @@ -91,7 +90,6 @@ struct QuicklogicIob : public Pass { // A map of IO cell types and their port names that should go to a pad std::unordered_map ioCellTypes; - // Parse io cell specification if (a_Args.size() > 3) { @@ -100,7 +98,7 @@ struct QuicklogicIob : public Pass { std::regex re1("^([\\w$]+):([\\w$]+)$"); std::regex re2("^([\\w$]+):([\\w$]+):([\\w,$]+)$"); - for (size_t i=3; itop_module(); + RTLIL::Module *topModule = a_Design->top_module(); if (topModule == nullptr) { log_cmd_error("No top module detected!\n"); } @@ -153,7 +151,7 @@ struct QuicklogicIob : public Pass { // Build a map of net names to constraints std::unordered_map constraintMap; - for (auto& constraint : pcfParser.getConstraints()) { + for (auto &constraint : pcfParser.getConstraints()) { if (constraintMap.count(constraint.netName) != 0) { log_cmd_error("The net '%s' is constrained twice!", constraint.netName.c_str()); } @@ -169,9 +167,9 @@ struct QuicklogicIob : public Pass { // Build a map of pad names to entries std::unordered_map> pinmapMap; - for (auto& entry : pinmapParser.getEntries()) { + for (auto &entry : pinmapParser.getEntries()) { if (entry.count("name") != 0) { - auto& name = entry.at("name"); + auto &name = entry.at("name"); if (pinmapMap.count(name) == 0) { pinmapMap[name] = std::vector(); @@ -187,7 +185,7 @@ struct QuicklogicIob : public Pass { log(" type | net | pad | loc | type | instance\n"); log(" ------------+------------+------------+----------+----------+-----------\n"); for (auto cell : topModule->cells()) { - auto ysCellType = RTLIL::unescape_id(cell->type); + auto ysCellType = RTLIL::unescape_id(cell->type); // Not an IO cell if (ioCellTypes.count(ysCellType) == 0) { @@ -202,7 +200,7 @@ struct QuicklogicIob : public Pass { std::string cellType; // Get connections to the specified port - const auto& ioCellType = ioCellTypes.at(ysCellType); + const auto &ioCellType = ioCellTypes.at(ysCellType); const std::string port = RTLIL::escape_id(ioCellType.port); if (cell->connections().count(port)) { @@ -220,15 +218,15 @@ struct QuicklogicIob : public Pass { // Check if the wire is constrained. Get pad name. std::string baseName = RTLIL::unescape_id(wire->name); std::string netNames[] = { - baseName, - stringf("%s[%d]", baseName.c_str(), sigbit.offset), - stringf("%s(%d)", baseName.c_str(), sigbit.offset), + baseName, + stringf("%s[%d]", baseName.c_str(), sigbit.offset), + stringf("%s(%d)", baseName.c_str(), sigbit.offset), }; padName = ""; netName = ""; - for (auto& name : netNames) { + for (auto &name : netNames) { if (constraintMap.count(name)) { auto constraint = constraintMap.at(name); padName = constraint.padName; @@ -241,17 +239,11 @@ struct QuicklogicIob : public Pass { if (pinmapMap.count(padName)) { // Choose a correct entry for the cell - auto entry = choosePinmapEntry( - pinmapMap.at(padName), - ioCellType - ); + auto entry = choosePinmapEntry(pinmapMap.at(padName), ioCellType); // Location string if (entry.count("x") && entry.count("y")) { - locName = stringf("X%sY%s", - entry.at("x").c_str(), - entry.at("y").c_str() - ); + locName = stringf("X%sY%s", entry.at("x").c_str(), entry.at("y").c_str()); } // Cell type @@ -264,24 +256,16 @@ struct QuicklogicIob : public Pass { } } - log("| %-10s | %-10s | %-8s | %-8s | %s\n", - netName.c_str(), - padName.c_str(), - locName.c_str(), - cellType.c_str(), - cell->name.c_str() - ); + log("| %-10s | %-10s | %-8s | %-8s | %s\n", netName.c_str(), padName.c_str(), locName.c_str(), cellType.c_str(), cell->name.c_str()); // Annotate the cell by setting its parameters - cell->setParam(RTLIL::escape_id("IO_PAD"), padName); - cell->setParam(RTLIL::escape_id("IO_LOC"), locName); + cell->setParam(RTLIL::escape_id("IO_PAD"), padName); + cell->setParam(RTLIL::escape_id("IO_LOC"), locName); cell->setParam(RTLIL::escape_id("IO_TYPE"), cellType); } } - PinmapParser::Entry choosePinmapEntry( - const std::vector& a_Entries, - const IoCellType& a_IoCellType) + PinmapParser::Entry choosePinmapEntry(const std::vector &a_Entries, const IoCellType &a_IoCellType) { // No preferred types, pick the first one if (a_IoCellType.preferredTypes.empty()) { @@ -289,10 +273,10 @@ struct QuicklogicIob : public Pass { } // Loop over preferred types - for (auto& type : a_IoCellType.preferredTypes) { - + for (auto &type : a_IoCellType.preferredTypes) { + // Find an entry for that type. If found then return it. - for (auto& entry : a_Entries) { + for (auto &entry : a_Entries) { if (type == entry.at("type")) { return entry; } diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index a48a26afc..33aceee20 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -20,14 +20,12 @@ #include const std::vector Pll::inputs = {"CLKIN1", "CLKIN2"}; -const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", - "CLKOUT3", "CLKOUT4", "CLKOUT5"}; +const std::vector Pll::outputs = {"CLKOUT0", "CLKOUT1", "CLKOUT2", "CLKOUT3", "CLKOUT4", "CLKOUT5"}; const float Pll::delay = 0; const std::string Pll::name = "PLLE2_ADV"; -Pll::Pll(RTLIL::Cell* cell, float input_clock_period, - float input_clock_rising_edge) - : ClockDivider({"PLLE2_ADV"}) { +Pll::Pll(RTLIL::Cell *cell, float input_clock_period, float input_clock_rising_edge) : ClockDivider({"PLLE2_ADV"}) +{ assert(RTLIL::unescape_id(cell->type) == "PLLE2_ADV"); FetchParams(cell); CheckInputClockPeriod(cell, input_clock_period); @@ -35,73 +33,67 @@ Pll::Pll(RTLIL::Cell* cell, float input_clock_period, CalculateOutputClockWaveforms(input_clock_rising_edge); } -void Pll::CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period) { +void Pll::CheckInputClockPeriod(RTLIL::Cell *cell, float input_clock_period) +{ float abs_diff = fabs(ClkinPeriod() - input_clock_period); - bool approx_equal = abs_diff < std::max(ClkinPeriod(), input_clock_period) * - 10 * - std::numeric_limits::epsilon(); + bool approx_equal = abs_diff < std::max(ClkinPeriod(), input_clock_period) * 10 * std::numeric_limits::epsilon(); if (!approx_equal) { - log_cmd_error( - "CLKIN[1/2]_PERIOD doesn't match the virtual clock constraint " - "propagated to the CLKIN[1/2] input of the clock divider cell: " - "%s.\nInput clock period: %f, CLKIN[1/2]_PERIOD: %f\n", - RTLIL::id2cstr(cell->name), input_clock_period, ClkinPeriod()); + log_cmd_error("CLKIN[1/2]_PERIOD doesn't match the virtual clock constraint " + "propagated to the CLKIN[1/2] input of the clock divider cell: " + "%s.\nInput clock period: %f, CLKIN[1/2]_PERIOD: %f\n", + RTLIL::id2cstr(cell->name), input_clock_period, ClkinPeriod()); } } -void Pll::FetchParams(RTLIL::Cell* cell) { +void Pll::FetchParams(RTLIL::Cell *cell) +{ clkin1_period = FetchParam(cell, "CLKIN1_PERIOD", 0.0); clkin2_period = FetchParam(cell, "CLKIN2_PERIOD", 0.0); clk_mult = FetchParam(cell, "CLKFBOUT_MULT", 5.0); clk_fbout_phase = FetchParam(cell, "CLKFBOUT_PHASE", 0.0); divclk_divisor = FetchParam(cell, "DIVCLK_DIVIDE", 1.0); for (auto output : outputs) { - // CLKOUT[0-5]_DUTY_CYCLE - clkout_duty_cycle[output] = - FetchParam(cell, output + "_DUTY_CYCLE", 0.5); - // CLKOUT[0-5]_DIVIDE - clkout_divisor[output] = FetchParam(cell, output + "_DIVIDE", 1.0); - // CLKOUT[0-5]_PHASE - clkout_phase[output] = FetchParam(cell, output + "_PHASE", 0.0); + // CLKOUT[0-5]_DUTY_CYCLE + clkout_duty_cycle[output] = FetchParam(cell, output + "_DUTY_CYCLE", 0.5); + // CLKOUT[0-5]_DIVIDE + clkout_divisor[output] = FetchParam(cell, output + "_DIVIDE", 1.0); + // CLKOUT[0-5]_PHASE + clkout_phase[output] = FetchParam(cell, output + "_PHASE", 0.0); } } -void Pll::CalculateOutputClockPeriods() { +void Pll::CalculateOutputClockPeriods() +{ for (auto output : outputs) { - // CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE * - // DIVCLK_DIVIDE / CLKFBOUT_MULT - clkout_period[output] = ClkinPeriod() * clkout_divisor.at(output) / - clk_mult * divclk_divisor; + // CLKOUT[0-5]_PERIOD = CLKIN1_PERIOD * CLKOUT[0-5]_DIVIDE * + // DIVCLK_DIVIDE / CLKFBOUT_MULT + clkout_period[output] = ClkinPeriod() * clkout_divisor.at(output) / clk_mult * divclk_divisor; } } -void Pll::CalculateOutputClockWaveforms(float input_clock_rising_edge) { +void Pll::CalculateOutputClockWaveforms(float input_clock_rising_edge) +{ for (auto output : outputs) { - float output_clock_period = clkout_period.at(output); - clkout_rising_edge[output] = - fmod(input_clock_rising_edge - - (clk_fbout_phase / 360.0) * ClkinPeriod() + - output_clock_period * (clkout_phase[output] / 360.0), - output_clock_period); - clkout_falling_edge[output] = - fmod(clkout_rising_edge[output] + - clkout_duty_cycle[output] * output_clock_period, - output_clock_period); + float output_clock_period = clkout_period.at(output); + clkout_rising_edge[output] = + fmod(input_clock_rising_edge - (clk_fbout_phase / 360.0) * ClkinPeriod() + output_clock_period * (clkout_phase[output] / 360.0), + output_clock_period); + clkout_falling_edge[output] = fmod(clkout_rising_edge[output] + clkout_duty_cycle[output] * output_clock_period, output_clock_period); } } -float Pll::FetchParam(RTLIL::Cell* cell, std::string&& param_name, - float default_value) { +float Pll::FetchParam(RTLIL::Cell *cell, std::string &¶m_name, float default_value) +{ RTLIL::IdString param(RTLIL::escape_id(param_name)); if (cell->hasParam(param)) { - auto param_obj = cell->parameters.at(param); - std::string value; - if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { - value = param_obj.decode_string(); - } else { - value = std::to_string(param_obj.as_int()); - } - return std::stof(value); + auto param_obj = cell->parameters.at(param); + std::string value; + if (param_obj.flags & RTLIL::CONST_FLAG_STRING) { + value = param_obj.decode_string(); + } else { + value = std::to_string(param_obj.as_int()); + } + return std::stof(value); } return default_value; } diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index ba3faa446..bfa5a20f5 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -18,16 +18,15 @@ #ifndef _BUFFERS_H_ #define _BUFFERS_H_ +#include "kernel/rtlil.h" #include #include #include -#include "kernel/rtlil.h" USING_YOSYS_NAMESPACE struct Buffer { - Buffer(float delay, const std::string& type, const std::string& output) - : delay(delay), type(type), output(output) {} + Buffer(float delay, const std::string &type, const std::string &output) : delay(delay), type(type), output(output) {} float delay; std::string type; std::string output; @@ -47,12 +46,10 @@ struct ClockDivider { struct Pll : public ClockDivider { Pll() : ClockDivider({"PLLE2_ADV"}) {} - Pll(RTLIL::Cell* cell, float input_clock_period, - float input_clock_rising_edge); + Pll(RTLIL::Cell *cell, float input_clock_period, float input_clock_rising_edge); // Helper function to fetch a cell parameter or return a default value - static float FetchParam(RTLIL::Cell* cell, std::string&& param_name, - float default_value); + static float FetchParam(RTLIL::Cell *cell, std::string &¶m_name, float default_value); // Get the period of the input clock // TODO Add support for CLKINSEL @@ -65,13 +62,13 @@ struct Pll : public ClockDivider { std::unordered_map clkout_rising_edge; std::unordered_map clkout_falling_edge; - private: + private: // Approximate equality check of the input clock period and specified in // CLKIN[1/2]_PERIOD parameter - void CheckInputClockPeriod(RTLIL::Cell* cell, float input_clock_period); + void CheckInputClockPeriod(RTLIL::Cell *cell, float input_clock_period); // Fetch cell's parameters needed for further calculations - void FetchParams(RTLIL::Cell* cell); + void FetchParams(RTLIL::Cell *cell); // Calculate the period on the output clocks void CalculateOutputClockPeriods(); @@ -90,4 +87,4 @@ struct Pll : public ClockDivider { float clk_fbout_phase; }; -#endif // _BUFFERS_H_ +#endif // _BUFFERS_H_ diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 865dd3715..6dbb9627b 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -16,141 +16,127 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "clocks.h" +#include "kernel/register.h" +#include "propagation.h" #include #include #include -#include "kernel/register.h" -#include "propagation.h" -void Clock::Add(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge, ClockType type) { +void Clock::Add(const std::string &name, RTLIL::Wire *wire, float period, float rising_edge, float falling_edge, ClockType type) +{ wire->set_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL"), "yes"); wire->set_bool_attribute(RTLIL::escape_id("IS_GENERATED"), type == GENERATED); wire->set_bool_attribute(RTLIL::escape_id("IS_EXPLICIT"), type == EXPLICIT); wire->set_bool_attribute(RTLIL::escape_id("IS_PROPAGATED"), type == PROPAGATED); wire->set_string_attribute(RTLIL::escape_id("CLASS"), "clock"); wire->set_string_attribute(RTLIL::escape_id("NAME"), name); - wire->set_string_attribute(RTLIL::escape_id("SOURCE_WIRES"), - Clock::WireName(wire)); - wire->set_string_attribute(RTLIL::escape_id("PERIOD"), - std::to_string(period)); - std::string waveform(std::to_string(rising_edge) + " " + - std::to_string(falling_edge)); + wire->set_string_attribute(RTLIL::escape_id("SOURCE_WIRES"), Clock::WireName(wire)); + wire->set_string_attribute(RTLIL::escape_id("PERIOD"), std::to_string(period)); + std::string waveform(std::to_string(rising_edge) + " " + std::to_string(falling_edge)); wire->set_string_attribute(RTLIL::escape_id("WAVEFORM"), waveform); } -void Clock::Add(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge, ClockType type) { - std::for_each(wires.begin(), wires.end(), [&](RTLIL::Wire* wire) { - Add(name, wire, period, rising_edge, falling_edge, type); - }); +void Clock::Add(const std::string &name, std::vector wires, float period, float rising_edge, float falling_edge, ClockType type) +{ + std::for_each(wires.begin(), wires.end(), [&](RTLIL::Wire *wire) { Add(name, wire, period, rising_edge, falling_edge, type); }); } -void Clock::Add(RTLIL::Wire* wire, float period, float rising_edge, - float falling_edge, ClockType type) { +void Clock::Add(RTLIL::Wire *wire, float period, float rising_edge, float falling_edge, ClockType type) +{ Add(Clock::WireName(wire), wire, period, rising_edge, falling_edge, type); } -float Clock::Period(RTLIL::Wire* clock_wire) { +float Clock::Period(RTLIL::Wire *clock_wire) +{ if (!clock_wire->has_attribute(RTLIL::escape_id("PERIOD"))) { - log_cmd_error("PERIOD has not been specified on wire '%s'.\n", - WireName(clock_wire).c_str()); + log_cmd_error("PERIOD has not been specified on wire '%s'.\n", WireName(clock_wire).c_str()); } float period(0); std::string period_str; try { - period_str = - clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD")); - period = std::stof(period_str); - } catch (const std::invalid_argument& e) { - log_cmd_error( - "Incorrect value '%s' specifed on PERIOD attribute for wire " - "'%s'.\nPERIOD needs to be a float value.\n", - period_str.c_str(), WireName(clock_wire).c_str()); + period_str = clock_wire->get_string_attribute(RTLIL::escape_id("PERIOD")); + period = std::stof(period_str); + } catch (const std::invalid_argument &e) { + log_cmd_error("Incorrect value '%s' specifed on PERIOD attribute for wire " + "'%s'.\nPERIOD needs to be a float value.\n", + period_str.c_str(), WireName(clock_wire).c_str()); } return period; } -std::pair Clock::Waveform(RTLIL::Wire* clock_wire) { +std::pair Clock::Waveform(RTLIL::Wire *clock_wire) +{ if (!clock_wire->has_attribute(RTLIL::escape_id("WAVEFORM"))) { - float period(Period(clock_wire)); - if (!period) { - log_cmd_error( - "Neither PERIOD nor WAVEFORM has been specified for wire %s\n", - WireName(clock_wire).c_str()); - return std::make_pair(0, 0); - } - float falling_edge = period / 2; - log_warning( - "Waveform has not been specified on wire '%s'.\nDefault value {0 %f} " - "will be used\n", - WireName(clock_wire).c_str(), falling_edge); - return std::make_pair(0, falling_edge); + float period(Period(clock_wire)); + if (!period) { + log_cmd_error("Neither PERIOD nor WAVEFORM has been specified for wire %s\n", WireName(clock_wire).c_str()); + return std::make_pair(0, 0); + } + float falling_edge = period / 2; + log_warning("Waveform has not been specified on wire '%s'.\nDefault value {0 %f} " + "will be used\n", + WireName(clock_wire).c_str(), falling_edge); + return std::make_pair(0, falling_edge); } float rising_edge(0); float falling_edge(0); - std::string waveform( - clock_wire->get_string_attribute(RTLIL::escape_id("WAVEFORM"))); - if (std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge) != - 2) { - log_cmd_error( - "Incorrect value '%s' specifed on WAVEFORM attribute for wire " - "'%s'.\nWAVEFORM needs to be specified in form of ' " - "' where the edge values are floats.\n", - waveform.c_str(), WireName(clock_wire).c_str()); + std::string waveform(clock_wire->get_string_attribute(RTLIL::escape_id("WAVEFORM"))); + if (std::sscanf(waveform.c_str(), "%f %f", &rising_edge, &falling_edge) != 2) { + log_cmd_error("Incorrect value '%s' specifed on WAVEFORM attribute for wire " + "'%s'.\nWAVEFORM needs to be specified in form of ' " + "' where the edge values are floats.\n", + waveform.c_str(), WireName(clock_wire).c_str()); } return std::make_pair(rising_edge, falling_edge); } -float Clock::RisingEdge(RTLIL::Wire* clock_wire) { - return Waveform(clock_wire).first; -} +float Clock::RisingEdge(RTLIL::Wire *clock_wire) { return Waveform(clock_wire).first; } -float Clock::FallingEdge(RTLIL::Wire* clock_wire) { - return Waveform(clock_wire).second; -} +float Clock::FallingEdge(RTLIL::Wire *clock_wire) { return Waveform(clock_wire).second; } -std::string Clock::Name(RTLIL::Wire* clock_wire) { +std::string Clock::Name(RTLIL::Wire *clock_wire) +{ if (clock_wire->has_attribute(RTLIL::escape_id("NAME"))) { - return clock_wire->get_string_attribute(RTLIL::escape_id("NAME")); + return clock_wire->get_string_attribute(RTLIL::escape_id("NAME")); } return WireName(clock_wire); } -std::string Clock::WireName(RTLIL::Wire* clock_wire) { +std::string Clock::WireName(RTLIL::Wire *clock_wire) +{ if (!clock_wire) { - return std::string(); + return std::string(); } return AddEscaping(RTLIL::unescape_id(clock_wire->name)); } -std::string Clock::SourceWireName(RTLIL::Wire* clock_wire) { +std::string Clock::SourceWireName(RTLIL::Wire *clock_wire) +{ if (clock_wire->has_attribute(RTLIL::escape_id("SOURCE_WIRES"))) { - return clock_wire->get_string_attribute(RTLIL::escape_id("SOURCE_WIRES")); + return clock_wire->get_string_attribute(RTLIL::escape_id("SOURCE_WIRES")); } return Name(clock_wire); } -bool Clock::GetClockWireBoolAttribute(RTLIL::Wire* wire, const std::string& attribute_name) { +bool Clock::GetClockWireBoolAttribute(RTLIL::Wire *wire, const std::string &attribute_name) +{ if (wire->has_attribute(RTLIL::escape_id(attribute_name))) { - return wire->get_bool_attribute(RTLIL::escape_id(attribute_name)); + return wire->get_bool_attribute(RTLIL::escape_id(attribute_name)); } return false; } -const std::map Clocks::GetClocks( - RTLIL::Design* design) { - std::map clock_wires; - RTLIL::Module* top_module = design->top_module(); - for (auto& wire_obj : top_module->wires_) { - auto& wire = wire_obj.second; - if (wire->has_attribute(RTLIL::escape_id("CLOCK_SIGNAL"))) { - if (wire->get_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL")) == - "yes") { - clock_wires.insert(std::make_pair(Clock::WireName(wire), wire)); - } - } +const std::map Clocks::GetClocks(RTLIL::Design *design) +{ + std::map clock_wires; + RTLIL::Module *top_module = design->top_module(); + for (auto &wire_obj : top_module->wires_) { + auto &wire = wire_obj.second; + if (wire->has_attribute(RTLIL::escape_id("CLOCK_SIGNAL"))) { + if (wire->get_string_attribute(RTLIL::escape_id("CLOCK_SIGNAL")) == "yes") { + clock_wires.insert(std::make_pair(Clock::WireName(wire), wire)); + } + } } return clock_wires; } - diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index f15858b9f..b11d1c09e 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -18,10 +18,10 @@ #ifndef _CLOCKS_H_ #define _CLOCKS_H_ -#include -#include #include "buffers.h" #include "kernel/rtlil.h" +#include +#include USING_YOSYS_NAMESPACE @@ -30,49 +30,40 @@ class BufferPropagation; class ClockDividerPropagation; class Propagation; -class Clock { - public: +class Clock +{ + public: // We distinguish the following types of clock: // * EXPLICIT - added with create_clocks command // * GENERATED - propagated from explicit clocks changing the clock's parameters // * PROPAGATED - propagated from explicit clocks but with the same parameters as the driver enum ClockType { EXPLICIT, GENERATED, PROPAGATED }; - static void Add(const std::string& name, RTLIL::Wire* wire, float period, - float rising_edge, float falling_edge, ClockType type); - static void Add(const std::string& name, std::vector wires, - float period, float rising_edge, float falling_edge, ClockType type); - static void Add(RTLIL::Wire* wire, float period, float rising_edge, - float falling_edge, ClockType type); - static float Period(RTLIL::Wire* clock_wire); - static float RisingEdge(RTLIL::Wire* clock_wire); - static float FallingEdge(RTLIL::Wire* clock_wire); - static std::string Name(RTLIL::Wire* clock_wire); - static std::string WireName(RTLIL::Wire* wire); - static std::string AddEscaping(const std::string& name) { - return std::regex_replace(name, std::regex{"\\$"}, "\\$"); - } - static std::string SourceWireName(RTLIL::Wire* clock_wire); - static bool IsPropagated(RTLIL::Wire* wire) { - return GetClockWireBoolAttribute(wire, "IS_PROPAGATED"); - } + static void Add(const std::string &name, RTLIL::Wire *wire, float period, float rising_edge, float falling_edge, ClockType type); + static void Add(const std::string &name, std::vector wires, float period, float rising_edge, float falling_edge, ClockType type); + static void Add(RTLIL::Wire *wire, float period, float rising_edge, float falling_edge, ClockType type); + static float Period(RTLIL::Wire *clock_wire); + static float RisingEdge(RTLIL::Wire *clock_wire); + static float FallingEdge(RTLIL::Wire *clock_wire); + static std::string Name(RTLIL::Wire *clock_wire); + static std::string WireName(RTLIL::Wire *wire); + static std::string AddEscaping(const std::string &name) { return std::regex_replace(name, std::regex{"\\$"}, "\\$"); } + static std::string SourceWireName(RTLIL::Wire *clock_wire); + static bool IsPropagated(RTLIL::Wire *wire) { return GetClockWireBoolAttribute(wire, "IS_PROPAGATED"); } - static bool IsGenerated(RTLIL::Wire* wire) { - return GetClockWireBoolAttribute(wire, "IS_GENERATED"); - } + static bool IsGenerated(RTLIL::Wire *wire) { return GetClockWireBoolAttribute(wire, "IS_GENERATED"); } - static bool IsExplicit(RTLIL::Wire* wire) { - return GetClockWireBoolAttribute(wire, "IS_EXPLICIT"); - } + static bool IsExplicit(RTLIL::Wire *wire) { return GetClockWireBoolAttribute(wire, "IS_EXPLICIT"); } - private: - static std::pair Waveform(RTLIL::Wire* clock_wire); + private: + static std::pair Waveform(RTLIL::Wire *clock_wire); - static bool GetClockWireBoolAttribute(RTLIL::Wire* wire, const std::string& attribute_name); + static bool GetClockWireBoolAttribute(RTLIL::Wire *wire, const std::string &attribute_name); }; -class Clocks { - public: - static const std::map GetClocks(RTLIL::Design* design); +class Clocks +{ + public: + static const std::map GetClocks(RTLIL::Design *design); }; -#endif // _CLOCKS_H_ +#endif // _CLOCKS_H_ diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 460efbfa3..cfee89ab2 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -20,180 +20,156 @@ USING_YOSYS_NAMESPACE -void Propagation::PropagateThroughBuffers(Buffer buffer) { - for (auto& clock : Clocks::GetClocks(design_)) { - auto& clock_wire = clock.second; +void Propagation::PropagateThroughBuffers(Buffer buffer) +{ + for (auto &clock : Clocks::GetClocks(design_)) { + auto &clock_wire = clock.second; #ifdef SDC_DEBUG - log("Clock wire %s\n", Clock::WireName(clock_wire).c_str()); + log("Clock wire %s\n", Clock::WireName(clock_wire).c_str()); #endif - auto buf_wires = - FindSinkWiresForCellType(clock_wire, buffer.type, buffer.output); - int path_delay(0); - for (auto wire : buf_wires) { + auto buf_wires = FindSinkWiresForCellType(clock_wire, buffer.type, buffer.output); + int path_delay(0); + for (auto wire : buf_wires) { #ifdef SDC_DEBUG - log("%s wire: %s\n", buffer.type.c_str(), - RTLIL::id2cstr(wire->name)); + log("%s wire: %s\n", buffer.type.c_str(), RTLIL::id2cstr(wire->name)); #endif - path_delay += buffer.delay; - Clock::Add(wire, Clock::Period(clock_wire), - Clock::RisingEdge(clock_wire) + path_delay, - Clock::FallingEdge(clock_wire) + path_delay, Clock::PROPAGATED); - } + path_delay += buffer.delay; + Clock::Add(wire, Clock::Period(clock_wire), Clock::RisingEdge(clock_wire) + path_delay, Clock::FallingEdge(clock_wire) + path_delay, + Clock::PROPAGATED); + } } } -std::vector Propagation::FindSinkWiresForCellType( - RTLIL::Wire* driver_wire, const std::string& cell_type, - const std::string& cell_port) { - std::vector wires; +std::vector Propagation::FindSinkWiresForCellType(RTLIL::Wire *driver_wire, const std::string &cell_type, const std::string &cell_port) +{ + std::vector wires; if (!driver_wire) { - return wires; + return wires; } auto cell = FindSinkCellOfType(driver_wire, cell_type); - RTLIL::Wire* wire = FindSinkWireOnPort(cell, cell_port); + RTLIL::Wire *wire = FindSinkWireOnPort(cell, cell_port); if (wire) { - wires.push_back(wire); - auto further_wires = - FindSinkWiresForCellType(wire, cell_type, cell_port); - std::copy(further_wires.begin(), further_wires.end(), - std::back_inserter(wires)); + wires.push_back(wire); + auto further_wires = FindSinkWiresForCellType(wire, cell_type, cell_port); + std::copy(further_wires.begin(), further_wires.end(), std::back_inserter(wires)); } return wires; } -RTLIL::Cell* Propagation::FindSinkCellOfType(RTLIL::Wire* wire, - const std::string& type) { - RTLIL::Cell* sink_cell = NULL; +RTLIL::Cell *Propagation::FindSinkCellOfType(RTLIL::Wire *wire, const std::string &type) +{ + RTLIL::Cell *sink_cell = NULL; if (!wire) { - return sink_cell; + return sink_cell; } - RTLIL::Module* top_module = design_->top_module(); + RTLIL::Module *top_module = design_->top_module(); assert(top_module); - std::string base_selection = - top_module->name.str() + "/w:" + wire->name.str(); - pass_->extra_args(std::vector{base_selection, "%co:+" + type, - base_selection, "%d"}, - 0, design_); + std::string base_selection = top_module->name.str() + "/w:" + wire->name.str(); + pass_->extra_args(std::vector{base_selection, "%co:+" + type, base_selection, "%d"}, 0, design_); auto selected_cells = top_module->selected_cells(); // FIXME Handle more than one sink assert(selected_cells.size() <= 1); if (selected_cells.size() > 0) { - sink_cell = selected_cells.at(0); + sink_cell = selected_cells.at(0); #ifdef SDC_DEBUG - log("Found sink cell: %s\n", - RTLIL::unescape_id(sink_cell->name).c_str()); + log("Found sink cell: %s\n", RTLIL::unescape_id(sink_cell->name).c_str()); #endif } return sink_cell; } -RTLIL::Cell* Propagation::FindSinkCellOnPort(RTLIL::Wire* wire, - const std::string& port) { - RTLIL::Cell* sink_cell = NULL; +RTLIL::Cell *Propagation::FindSinkCellOnPort(RTLIL::Wire *wire, const std::string &port) +{ + RTLIL::Cell *sink_cell = NULL; if (!wire) { - return sink_cell; + return sink_cell; } - RTLIL::Module* top_module = design_->top_module(); + RTLIL::Module *top_module = design_->top_module(); assert(top_module); - std::string base_selection = - top_module->name.str() + "/w:" + wire->name.str(); - pass_->extra_args( - std::vector{base_selection, "%co:+[" + port + "]", - base_selection, "%d"}, - 0, design_); + std::string base_selection = top_module->name.str() + "/w:" + wire->name.str(); + pass_->extra_args(std::vector{base_selection, "%co:+[" + port + "]", base_selection, "%d"}, 0, design_); auto selected_cells = top_module->selected_cells(); // FIXME Handle more than one sink assert(selected_cells.size() <= 1); if (selected_cells.size() > 0) { - sink_cell = selected_cells.at(0); + sink_cell = selected_cells.at(0); #ifdef SDC_DEBUG - log("Found sink cell: %s\n", - RTLIL::unescape_id(sink_cell->name).c_str()); + log("Found sink cell: %s\n", RTLIL::unescape_id(sink_cell->name).c_str()); #endif } return sink_cell; } -bool Propagation::WireHasSinkCell(RTLIL::Wire* wire) { +bool Propagation::WireHasSinkCell(RTLIL::Wire *wire) +{ if (!wire) { - return false; + return false; } - RTLIL::Module* top_module = design_->top_module(); + RTLIL::Module *top_module = design_->top_module(); assert(top_module); - std::string base_selection = - top_module->name.str() + "/w:" + wire->name.str(); - pass_->extra_args( - std::vector{base_selection, "%co:*", - base_selection, "%d"}, - 0, design_); + std::string base_selection = top_module->name.str() + "/w:" + wire->name.str(); + pass_->extra_args(std::vector{base_selection, "%co:*", base_selection, "%d"}, 0, design_); auto selected_cells = top_module->selected_cells(); return selected_cells.size() > 0; } -RTLIL::Wire* Propagation::FindSinkWireOnPort(RTLIL::Cell* cell, - const std::string& port_name) { - RTLIL::Wire* sink_wire = NULL; +RTLIL::Wire *Propagation::FindSinkWireOnPort(RTLIL::Cell *cell, const std::string &port_name) +{ + RTLIL::Wire *sink_wire = NULL; if (!cell) { - return sink_wire; + return sink_wire; } - RTLIL::Module* top_module = design_->top_module(); + RTLIL::Module *top_module = design_->top_module(); assert(top_module); - std::string base_selection = - top_module->name.str() + "/c:" + cell->name.str(); - pass_->extra_args( - std::vector{base_selection, "%co:+[" + port_name + "]", - base_selection, "%d"}, - 0, design_); + std::string base_selection = top_module->name.str() + "/c:" + cell->name.str(); + pass_->extra_args(std::vector{base_selection, "%co:+[" + port_name + "]", base_selection, "%d"}, 0, design_); auto selected_wires = top_module->selected_wires(); // FIXME Handle more than one sink assert(selected_wires.size() <= 1); if (selected_wires.size() > 0) { - sink_wire = selected_wires.at(0); + sink_wire = selected_wires.at(0); #ifdef SDC_DEBUG - log("Found sink wire: %s\n", - RTLIL::unescape_id(sink_wire->name).c_str()); + log("Found sink wire: %s\n", RTLIL::unescape_id(sink_wire->name).c_str()); #endif } return sink_wire; } -void NaturalPropagation::Run() { +void NaturalPropagation::Run() +{ #ifdef SDC_DEBUG log("Start natural clock propagation\n"); #endif - for (auto& clock : Clocks::GetClocks(design_)) { - auto& clock_wire = clock.second; + for (auto &clock : Clocks::GetClocks(design_)) { + auto &clock_wire = clock.second; #ifdef SDC_DEBUG - log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); + log("Processing clock %s\n", RTLIL::id2cstr(clock_wire->name)); #endif - auto aliases = FindAliasWires(clock_wire); - Clock::Add(Clock::WireName(clock_wire), aliases, - Clock::Period(clock_wire), Clock::RisingEdge(clock_wire), - Clock::FallingEdge(clock_wire), Clock::PROPAGATED); + auto aliases = FindAliasWires(clock_wire); + Clock::Add(Clock::WireName(clock_wire), aliases, Clock::Period(clock_wire), Clock::RisingEdge(clock_wire), Clock::FallingEdge(clock_wire), + Clock::PROPAGATED); } #ifdef SDC_DEBUG log("Finish natural clock propagation\n\n"); #endif } -std::vector NaturalPropagation::FindAliasWires( - RTLIL::Wire* wire) { - RTLIL::Module* top_module = design_->top_module(); +std::vector NaturalPropagation::FindAliasWires(RTLIL::Wire *wire) +{ + RTLIL::Module *top_module = design_->top_module(); assert(top_module); - std::vector alias_wires; - pass_->extra_args( - std::vector{ - top_module->name.str() + "/w:" + wire->name.str(), "%a"}, - 0, design_); + std::vector alias_wires; + pass_->extra_args(std::vector{top_module->name.str() + "/w:" + wire->name.str(), "%a"}, 0, design_); for (auto module : design_->selected_modules()) { - for (auto wire : module->selected_wires()) { - alias_wires.push_back(wire); - } + for (auto wire : module->selected_wires()) { + alias_wires.push_back(wire); + } } return alias_wires; } -void BufferPropagation::Run() { +void BufferPropagation::Run() +{ #ifdef SDC_DEBUG log("Start buffer clock propagation\n"); log("IBUF pass\n"); @@ -208,7 +184,8 @@ void BufferPropagation::Run() { #endif } -void ClockDividerPropagation::Run() { +void ClockDividerPropagation::Run() +{ #ifdef SDC_DEBUG log("Start clock divider clock propagation\n"); #endif @@ -219,45 +196,42 @@ void ClockDividerPropagation::Run() { #endif } -void ClockDividerPropagation::PropagateThroughClockDividers( - ClockDivider divider) { - for (auto& clock : Clocks::GetClocks(design_)) { - auto& clock_wire = clock.second; +void ClockDividerPropagation::PropagateThroughClockDividers(ClockDivider divider) +{ + for (auto &clock : Clocks::GetClocks(design_)) { + auto &clock_wire = clock.second; #ifdef SDC_DEBUG - log("Processing clock %s\n", Clock::WireName(clock_wire).c_str()); + log("Processing clock %s\n", Clock::WireName(clock_wire).c_str()); #endif - PropagateClocksForCellType(clock_wire, divider.type); + PropagateClocksForCellType(clock_wire, divider.type); } } -void ClockDividerPropagation::PropagateClocksForCellType( - RTLIL::Wire* driver_wire, const std::string& cell_type) { +void ClockDividerPropagation::PropagateClocksForCellType(RTLIL::Wire *driver_wire, const std::string &cell_type) +{ if (cell_type == "PLLE2_ADV") { - RTLIL::Cell* cell = NULL; - for (auto input : Pll::inputs) { - cell = FindSinkCellOnPort(driver_wire, input); - if (cell and RTLIL::unescape_id(cell->type) == cell_type) { - break; - } - } - if (!cell) { - return; - } - Pll pll(cell, Clock::Period(driver_wire), - Clock::RisingEdge(driver_wire)); - for (auto output : Pll::outputs) { - RTLIL::Wire* wire = FindSinkWireOnPort(cell, output); - // Don't add clocks on dangling wires - // TODO Remove the workaround with the WireHasSinkCell check once the following issue is fixed: - // https://github.com/SymbiFlow/yosys-symbiflow-plugins/issues/59 - if (wire && WireHasSinkCell(wire)) { - float clkout_period(pll.clkout_period.at(output)); - float clkout_rising_edge(pll.clkout_rising_edge.at(output)); - float clkout_falling_edge(pll.clkout_falling_edge.at(output)); - Clock::Add(wire, clkout_period, clkout_rising_edge, - clkout_falling_edge, Clock::GENERATED); - } - } + RTLIL::Cell *cell = NULL; + for (auto input : Pll::inputs) { + cell = FindSinkCellOnPort(driver_wire, input); + if (cell and RTLIL::unescape_id(cell->type) == cell_type) { + break; + } + } + if (!cell) { + return; + } + Pll pll(cell, Clock::Period(driver_wire), Clock::RisingEdge(driver_wire)); + for (auto output : Pll::outputs) { + RTLIL::Wire *wire = FindSinkWireOnPort(cell, output); + // Don't add clocks on dangling wires + // TODO Remove the workaround with the WireHasSinkCell check once the following issue is fixed: + // https://github.com/SymbiFlow/yosys-symbiflow-plugins/issues/59 + if (wire && WireHasSinkCell(wire)) { + float clkout_period(pll.clkout_period.at(output)); + float clkout_rising_edge(pll.clkout_rising_edge.at(output)); + float clkout_falling_edge(pll.clkout_falling_edge.at(output)); + Clock::Add(wire, clkout_period, clkout_rising_edge, clkout_falling_edge, Clock::GENERATED); + } + } } } - diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 3efd98420..6b0f755c3 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -22,56 +22,52 @@ USING_YOSYS_NAMESPACE -class Propagation { - public: - Propagation(RTLIL::Design* design, Pass* pass) - : design_(design), pass_(pass) {} +class Propagation +{ + public: + Propagation(RTLIL::Design *design, Pass *pass) : design_(design), pass_(pass) {} virtual ~Propagation() {} virtual void Run() = 0; - protected: - RTLIL::Design* design_; - Pass* pass_; + protected: + RTLIL::Design *design_; + Pass *pass_; // This propagation doesn't change the clock so the sink wire is only marked // as propagated clock signal, but has the properties of the driving clock void PropagateThroughBuffers(Buffer buffer); - std::vector FindSinkWiresForCellType( - RTLIL::Wire* driver_wire, const std::string& cell_type, - const std::string& cell_port); - RTLIL::Cell* FindSinkCellOfType(RTLIL::Wire* wire, const std::string& type); - RTLIL::Cell* FindSinkCellOnPort(RTLIL::Wire* wire, const std::string& port); - RTLIL::Wire* FindSinkWireOnPort(RTLIL::Cell* cell, - const std::string& port_name); - bool WireHasSinkCell(RTLIL::Wire* wire); + std::vector FindSinkWiresForCellType(RTLIL::Wire *driver_wire, const std::string &cell_type, const std::string &cell_port); + RTLIL::Cell *FindSinkCellOfType(RTLIL::Wire *wire, const std::string &type); + RTLIL::Cell *FindSinkCellOnPort(RTLIL::Wire *wire, const std::string &port); + RTLIL::Wire *FindSinkWireOnPort(RTLIL::Cell *cell, const std::string &port_name); + bool WireHasSinkCell(RTLIL::Wire *wire); }; -class NaturalPropagation : public Propagation { - public: - NaturalPropagation(RTLIL::Design* design, Pass* pass) - : Propagation(design, pass) {} +class NaturalPropagation : public Propagation +{ + public: + NaturalPropagation(RTLIL::Design *design, Pass *pass) : Propagation(design, pass) {} void Run() override; - std::vector FindAliasWires(RTLIL::Wire* wire); + std::vector FindAliasWires(RTLIL::Wire *wire); }; -class BufferPropagation : public Propagation { - public: - BufferPropagation(RTLIL::Design* design, Pass* pass) - : Propagation(design, pass) {} +class BufferPropagation : public Propagation +{ + public: + BufferPropagation(RTLIL::Design *design, Pass *pass) : Propagation(design, pass) {} void Run() override; }; -class ClockDividerPropagation : public Propagation { - public: - ClockDividerPropagation(RTLIL::Design* design, Pass* pass) - : Propagation(design, pass) {} +class ClockDividerPropagation : public Propagation +{ + public: + ClockDividerPropagation(RTLIL::Design *design, Pass *pass) : Propagation(design, pass) {} void Run() override; - void PropagateClocksForCellType(RTLIL::Wire* driver_wire, - const std::string& cell_type); + void PropagateClocksForCellType(RTLIL::Wire *driver_wire, const std::string &cell_type); void PropagateThroughClockDividers(ClockDivider divider); }; -#endif // PROPAGATION_H_ +#endif // PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 6ddaf0136..dd058d9fa 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -35,300 +35,290 @@ PRIVATE_NAMESPACE_BEGIN struct ReadSdcCmd : public Frontend { ReadSdcCmd() : Frontend("sdc", "Read SDC file") {} - void help() override { - log("\n"); - log(" read_sdc \n"); - log("\n"); - log("Read SDC file.\n"); - log("\n"); + void help() override + { + log("\n"); + log(" read_sdc \n"); + log("\n"); + log("Read SDC file.\n"); + log("\n"); } - void execute(std::istream*& f, std::string filename, - std::vector args, RTLIL::Design*) override { - if (args.size() < 2) { - log_cmd_error("Missing script file.\n"); - } - log("\nReading clock constraints file(SDC)\n\n"); - size_t argidx = 1; - extra_args(f, filename, args, argidx); - std::string content{std::istreambuf_iterator(*f), - std::istreambuf_iterator()}; - log("%s\n", content.c_str()); - Tcl_Interp* interp = yosys_get_tcl_interp(); - if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { - log_cmd_error("TCL interpreter returned an error: %s\n", - Tcl_GetStringResult(interp)); - } + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *) override + { + if (args.size() < 2) { + log_cmd_error("Missing script file.\n"); + } + log("\nReading clock constraints file(SDC)\n\n"); + size_t argidx = 1; + extra_args(f, filename, args, argidx); + std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; + log("%s\n", content.c_str()); + Tcl_Interp *interp = yosys_get_tcl_interp(); + if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { + log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); + } } }; struct WriteSdcCmd : public Backend { - WriteSdcCmd(SdcWriter& sdc_writer) - : Backend("sdc", "Write SDC file"), sdc_writer_(sdc_writer) {} - - void help() override { - log("\n"); - log(" write_sdc \n"); - log("\n"); - log("Write SDC file.\n"); - log("\n"); + WriteSdcCmd(SdcWriter &sdc_writer) : Backend("sdc", "Write SDC file"), sdc_writer_(sdc_writer) {} + + void help() override + { + log("\n"); + log(" write_sdc \n"); + log("\n"); + log("Write SDC file.\n"); + log("\n"); } - void execute(std::ostream*& f, std::string filename, - std::vector args, - RTLIL::Design* design) override { - if (args.size() < 2) { - log_cmd_error("Missing output file.\n"); - } - log("\nWriting out clock constraints file(SDC)\n"); - extra_args(f, filename, args, 1); - sdc_writer_.WriteSdc(design, *f); + void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) override + { + if (args.size() < 2) { + log_cmd_error("Missing output file.\n"); + } + log("\nWriting out clock constraints file(SDC)\n"); + extra_args(f, filename, args, 1); + sdc_writer_.WriteSdc(design, *f); } - SdcWriter& sdc_writer_; + SdcWriter &sdc_writer_; }; struct CreateClockCmd : public Pass { CreateClockCmd() : Pass("create_clock", "Create clock object") {} - void help() override { - log("\n"); - log(" create_clock [ -name clock_name ] -period period_value " - "[-waveform ] \n"); - log("Define a clock.\n"); - log("If name is not specified then the name of the first target is " - "selected as the clock's name.\n"); - log("Period is expressed in nanoseconds.\n"); - log("The waveform option specifies the duty cycle (the rising a " - "falling edges) of the clock.\n"); - log("It is specified as a list of two elements/time values: the first " - "rising edge and the next falling edge.\n"); - log("\n"); + void help() override + { + log("\n"); + log(" create_clock [ -name clock_name ] -period period_value " + "[-waveform ] \n"); + log("Define a clock.\n"); + log("If name is not specified then the name of the first target is " + "selected as the clock's name.\n"); + log("Period is expressed in nanoseconds.\n"); + log("The waveform option specifies the duty cycle (the rising a " + "falling edges) of the clock.\n"); + log("It is specified as a list of two elements/time values: the first " + "rising edge and the next falling edge.\n"); + log("\n"); } - void execute(std::vector args, - RTLIL::Design* design) override { - size_t argidx; - std::string name; - bool is_waveform_specified(false); - float rising_edge(0); - float falling_edge(0); - float period(0); - if (args.size() < 4) { - log_cmd_error("Incorrect number of arguments\n"); - } - for (argidx = 1; argidx < args.size(); argidx++) { - std::string arg = args[argidx]; - if (arg == "-name" && argidx + 1 < args.size()) { - name = args[++argidx]; - continue; - } - if (arg == "-period" && argidx + 1 < args.size()) { - period = std::stof(args[++argidx]); - continue; - } - if (arg == "-waveform" && argidx + 1 < args.size()) { - std::string edges(args[++argidx]); - std::copy_if(edges.begin(), edges.end(), edges.begin(), - [](char c) { return c != '{' or c != '}'; }); - std::stringstream ss(edges); - ss >> rising_edge >> falling_edge; - is_waveform_specified = true; - continue; - } - break; - } - if (period <= 0) { - log_cmd_error("Incorrect period value\n"); - } - // Add "w:" prefix to selection arguments to enforce wire object - // selection - AddWirePrefix(args, argidx); - extra_args(args, argidx, design); - // If clock name is not specified then take the name of the first target - std::vector selected_wires; - for (auto module : design->modules()) { - if (!design->selected(module)) { - continue; - } - for (auto wire : module->wires()) { - if (design->selected(module, wire)) { + void execute(std::vector args, RTLIL::Design *design) override + { + size_t argidx; + std::string name; + bool is_waveform_specified(false); + float rising_edge(0); + float falling_edge(0); + float period(0); + if (args.size() < 4) { + log_cmd_error("Incorrect number of arguments\n"); + } + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-name" && argidx + 1 < args.size()) { + name = args[++argidx]; + continue; + } + if (arg == "-period" && argidx + 1 < args.size()) { + period = std::stof(args[++argidx]); + continue; + } + if (arg == "-waveform" && argidx + 1 < args.size()) { + std::string edges(args[++argidx]); + std::copy_if(edges.begin(), edges.end(), edges.begin(), [](char c) { return c != '{' or c != '}'; }); + std::stringstream ss(edges); + ss >> rising_edge >> falling_edge; + is_waveform_specified = true; + continue; + } + break; + } + if (period <= 0) { + log_cmd_error("Incorrect period value\n"); + } + // Add "w:" prefix to selection arguments to enforce wire object + // selection + AddWirePrefix(args, argidx); + extra_args(args, argidx, design); + // If clock name is not specified then take the name of the first target + std::vector selected_wires; + for (auto module : design->modules()) { + if (!design->selected(module)) { + continue; + } + for (auto wire : module->wires()) { + if (design->selected(module, wire)) { #ifdef SDC_DEBUG - log("Selected wire %s\n", - RTLIL::unescape_id(wire->name).c_str()); + log("Selected wire %s\n", RTLIL::unescape_id(wire->name).c_str()); #endif - selected_wires.push_back(wire); - } - } - } - if (selected_wires.size() == 0) { - log_cmd_error("Target selection is empty\n"); - } - if (name.empty()) { - name = RTLIL::unescape_id(selected_wires.at(0)->name); - } - if (!is_waveform_specified) { - rising_edge = 0; - falling_edge = period / 2; - } - Clock::Add(name, selected_wires, period, rising_edge, falling_edge, Clock::EXPLICIT); + selected_wires.push_back(wire); + } + } + } + if (selected_wires.size() == 0) { + log_cmd_error("Target selection is empty\n"); + } + if (name.empty()) { + name = RTLIL::unescape_id(selected_wires.at(0)->name); + } + if (!is_waveform_specified) { + rising_edge = 0; + falling_edge = period / 2; + } + Clock::Add(name, selected_wires, period, rising_edge, falling_edge, Clock::EXPLICIT); } - void AddWirePrefix(std::vector& args, size_t argidx) { - auto selection_begin = args.begin() + argidx; - std::transform(selection_begin, args.end(), selection_begin, - [](std::string& w) { return "w:" + w; }); + void AddWirePrefix(std::vector &args, size_t argidx) + { + auto selection_begin = args.begin() + argidx; + std::transform(selection_begin, args.end(), selection_begin, [](std::string &w) { return "w:" + w; }); } }; struct GetClocksCmd : public Pass { GetClocksCmd() : Pass("get_clocks", "Create clock object") {} - void help() override { - log("\n"); - log(" get_clocks [-include_generated_clocks] [-of ] " - "[]\n"); - log("\n"); - log("Returns all clocks in the design.\n"); - log("\n"); - log(" -include_generated_clocks\n"); - log(" Include auto-generated clocks.\n"); - log("\n"); - log(" -of\n"); - log(" Get clocks of these nets.\n"); - log("\n"); - log(" \n"); - log(" Pattern of clock names. Default are all clocks in the " - "design.\n"); - log("\n"); + void help() override + { + log("\n"); + log(" get_clocks [-include_generated_clocks] [-of ] " + "[]\n"); + log("\n"); + log("Returns all clocks in the design.\n"); + log("\n"); + log(" -include_generated_clocks\n"); + log(" Include auto-generated clocks.\n"); + log("\n"); + log(" -of\n"); + log(" Get clocks of these nets.\n"); + log("\n"); + log(" \n"); + log(" Pattern of clock names. Default are all clocks in the " + "design.\n"); + log("\n"); } - std::vector extract_list(const std::string& args) { - std::vector port_list; - std::stringstream ss(args); - std::istream_iterator begin(ss); - std::istream_iterator end; - std::copy(begin, end, std::back_inserter(port_list)); - return port_list; + std::vector extract_list(const std::string &args) + { + std::vector port_list; + std::stringstream ss(args); + std::istream_iterator begin(ss); + std::istream_iterator end; + std::copy(begin, end, std::back_inserter(port_list)); + return port_list; } - void execute(std::vector args, - RTLIL::Design* design) override { - - // Parse command arguments - bool include_generated_clocks(false); - std::vector clocks_nets; - size_t argidx(0); - - // Parse command switches - for (argidx = 1; argidx < args.size(); argidx++) { - std::string arg = args[argidx]; - if (arg == "-include_generated_clocks") { - include_generated_clocks = true; - continue; - } - if (arg == "-of" and argidx + 1 < args.size()) { - clocks_nets = extract_list(args[++argidx]); + void execute(std::vector args, RTLIL::Design *design) override + { + + // Parse command arguments + bool include_generated_clocks(false); + std::vector clocks_nets; + size_t argidx(0); + + // Parse command switches + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-include_generated_clocks") { + include_generated_clocks = true; + continue; + } + if (arg == "-of" and argidx + 1 < args.size()) { + clocks_nets = extract_list(args[++argidx]); #ifdef SDC_DEBUG - for (auto clock_net : clocks_nets) { - log("Clock filter %s\n", clock_net.c_str()); - } + for (auto clock_net : clocks_nets) { + log("Clock filter %s\n", clock_net.c_str()); + } #endif - continue; - } - if (arg.size() > 0 and arg[0] == '-') { - log_cmd_error("Unknown option %s.\n", arg.c_str()); - } - - break; - } - - // Parse object patterns - std::vector clocks_list(args.begin() + argidx, args.end()); - - // Fetch clocks in the design - std::map clocks(Clocks::GetClocks(design)); - if (clocks.size() == 0) { - log_warning("No clocks found in design\n"); - } - - // Extract clocks into tcl list - Tcl_Interp* interp = yosys_get_tcl_interp(); - Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); - for (auto& clock : clocks) { - // Skip propagated clocks (i.e. clock wires with the same parameters - // as the master clocks they originate from - if (Clock::IsPropagated(clock.second)) { - continue; - } - // Skip generated clocks if -include_generated_clocks is not specified - if (Clock::IsGenerated(clock.second) and !include_generated_clocks) { - continue; - } - // Check if clock name is in the list of design clocks - if (clocks_list.size() > 0 and - std::find(clocks_list.begin(), clocks_list.end(), - clock.first) == clocks_list.end()) { - continue; - } - // Check if clock wire is in the -of list - if (clocks_nets.size() > 0 and - std::find(clocks_nets.begin(), clocks_nets.end(), - Clock::WireName(clock.second)) == clocks_nets.end()) { - continue; - } - auto& wire = clock.second; - const char* name = RTLIL::id2cstr(wire->name); - Tcl_Obj* name_obj = Tcl_NewStringObj(name, -1); - Tcl_ListObjAppendElement(interp, tcl_list, name_obj); - } - Tcl_SetObjResult(interp, tcl_list); + continue; + } + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } + + break; + } + + // Parse object patterns + std::vector clocks_list(args.begin() + argidx, args.end()); + + // Fetch clocks in the design + std::map clocks(Clocks::GetClocks(design)); + if (clocks.size() == 0) { + log_warning("No clocks found in design\n"); + } + + // Extract clocks into tcl list + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_Obj *tcl_list = Tcl_NewListObj(0, NULL); + for (auto &clock : clocks) { + // Skip propagated clocks (i.e. clock wires with the same parameters + // as the master clocks they originate from + if (Clock::IsPropagated(clock.second)) { + continue; + } + // Skip generated clocks if -include_generated_clocks is not specified + if (Clock::IsGenerated(clock.second) and !include_generated_clocks) { + continue; + } + // Check if clock name is in the list of design clocks + if (clocks_list.size() > 0 and std::find(clocks_list.begin(), clocks_list.end(), clock.first) == clocks_list.end()) { + continue; + } + // Check if clock wire is in the -of list + if (clocks_nets.size() > 0 and std::find(clocks_nets.begin(), clocks_nets.end(), Clock::WireName(clock.second)) == clocks_nets.end()) { + continue; + } + auto &wire = clock.second; + const char *name = RTLIL::id2cstr(wire->name); + Tcl_Obj *name_obj = Tcl_NewStringObj(name, -1); + Tcl_ListObjAppendElement(interp, tcl_list, name_obj); + } + Tcl_SetObjResult(interp, tcl_list); } }; struct PropagateClocksCmd : public Pass { - PropagateClocksCmd() - : Pass("propagate_clocks", "Propagate clock information") {} - - void help() override { - log("\n"); - log(" propagate_clocks\n"); - log("\n"); - log("Propagate clock information throughout the design.\n"); - log("\n"); + PropagateClocksCmd() : Pass("propagate_clocks", "Propagate clock information") {} + + void help() override + { + log("\n"); + log(" propagate_clocks\n"); + log("\n"); + log("Propagate clock information throughout the design.\n"); + log("\n"); } - void execute(std::vector args, - RTLIL::Design* design) override { - if (args.size() > 1) { - log_warning( - "Command accepts no arguments.\nAll will be ignored.\n"); - } - if (!design->top_module()) { - log_cmd_error("No top module selected\n"); - } - - std::array, 2> passes{ - std::unique_ptr(new BufferPropagation(design, this)), - std::unique_ptr( - new ClockDividerPropagation(design, this))}; - - log("Perform clock propagation\n"); - - for (auto& pass : passes) { - pass->Run(); - } + void execute(std::vector args, RTLIL::Design *design) override + { + if (args.size() > 1) { + log_warning("Command accepts no arguments.\nAll will be ignored.\n"); + } + if (!design->top_module()) { + log_cmd_error("No top module selected\n"); + } + + std::array, 2> passes{std::unique_ptr(new BufferPropagation(design, this)), + std::unique_ptr(new ClockDividerPropagation(design, this))}; + + log("Perform clock propagation\n"); + + for (auto &pass : passes) { + pass->Run(); + } } }; -class SdcPlugin { - public: - SdcPlugin() - : write_sdc_cmd_(sdc_writer_), - set_false_path_cmd_(sdc_writer_), - set_max_delay_cmd_(sdc_writer_), - set_clock_groups_cmd_(sdc_writer_) { - log("Loaded SDC plugin\n"); +class SdcPlugin +{ + public: + SdcPlugin() : write_sdc_cmd_(sdc_writer_), set_false_path_cmd_(sdc_writer_), set_max_delay_cmd_(sdc_writer_), set_clock_groups_cmd_(sdc_writer_) + { + log("Loaded SDC plugin\n"); } ReadSdcCmd read_sdc_cmd_; @@ -340,7 +330,7 @@ class SdcPlugin { SetMaxDelay set_max_delay_cmd_; SetClockGroups set_clock_groups_cmd_; - private: + private: SdcWriter sdc_writer_; } SdcPlugin; diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index b73e24260..ed283a64a 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -20,94 +20,92 @@ USING_YOSYS_NAMESPACE const std::map ClockGroups::relation_name_map = { - {NONE, ""}, - {ASYNCHRONOUS, "asynchronous"}, - {PHYSICALLY_EXCLUSIVE, "physically_exclusive"}, - {LOGICALLY_EXCLUSIVE, "logically_exclusive"}}; + {NONE, ""}, {ASYNCHRONOUS, "asynchronous"}, {PHYSICALLY_EXCLUSIVE, "physically_exclusive"}, {LOGICALLY_EXCLUSIVE, "logically_exclusive"}}; -void SdcWriter::AddFalsePath(FalsePath false_path) { - false_paths_.push_back(false_path); -} +void SdcWriter::AddFalsePath(FalsePath false_path) { false_paths_.push_back(false_path); } -void SdcWriter::SetMaxDelay(TimingPath timing_path) { - timing_paths_.push_back(timing_path); -} +void SdcWriter::SetMaxDelay(TimingPath timing_path) { timing_paths_.push_back(timing_path); } -void SdcWriter::AddClockGroup(ClockGroups::ClockGroup clock_group, ClockGroups::ClockGroupRelation relation) { +void SdcWriter::AddClockGroup(ClockGroups::ClockGroup clock_group, ClockGroups::ClockGroupRelation relation) +{ clock_groups_.Add(clock_group, relation); } -void SdcWriter::WriteSdc(RTLIL::Design* design, std::ostream& file) { +void SdcWriter::WriteSdc(RTLIL::Design *design, std::ostream &file) +{ WriteClocks(design, file); WriteFalsePaths(file); WriteMaxDelay(file); WriteClockGroups(file); } -void SdcWriter::WriteClocks(RTLIL::Design* design, std::ostream& file) { - for (auto& clock : Clocks::GetClocks(design)) { - auto& clock_wire = clock.second; - // FIXME: Input port nets are not found in VPR - if (clock_wire->port_input) { - continue; - } - // Write out only GENERATED and EXPLICIT clocks - if (Clock::IsPropagated(clock_wire)) { - continue; - } - file << "create_clock -period " << Clock::Period(clock_wire); - file << " -waveform {" << Clock::RisingEdge(clock_wire) << " " - << Clock::FallingEdge(clock_wire) << "}"; - file << " " << Clock::SourceWireName(clock_wire); - file << std::endl; +void SdcWriter::WriteClocks(RTLIL::Design *design, std::ostream &file) +{ + for (auto &clock : Clocks::GetClocks(design)) { + auto &clock_wire = clock.second; + // FIXME: Input port nets are not found in VPR + if (clock_wire->port_input) { + continue; + } + // Write out only GENERATED and EXPLICIT clocks + if (Clock::IsPropagated(clock_wire)) { + continue; + } + file << "create_clock -period " << Clock::Period(clock_wire); + file << " -waveform {" << Clock::RisingEdge(clock_wire) << " " << Clock::FallingEdge(clock_wire) << "}"; + file << " " << Clock::SourceWireName(clock_wire); + file << std::endl; } } -void SdcWriter::WriteFalsePaths(std::ostream& file) { +void SdcWriter::WriteFalsePaths(std::ostream &file) +{ for (auto path : false_paths_) { - file << "set_false_path"; - if (!path.from_pin.empty()) { - file << " -from " << path.from_pin; - } - if (!path.through_pin.empty()) { - file << " -through " << path.through_pin; - } - if (!path.to_pin.empty()) { - file << " -to " << path.to_pin; - } - file << std::endl; + file << "set_false_path"; + if (!path.from_pin.empty()) { + file << " -from " << path.from_pin; + } + if (!path.through_pin.empty()) { + file << " -through " << path.through_pin; + } + if (!path.to_pin.empty()) { + file << " -to " << path.to_pin; + } + file << std::endl; } } -void SdcWriter::WriteMaxDelay(std::ostream& file) { +void SdcWriter::WriteMaxDelay(std::ostream &file) +{ for (auto path : timing_paths_) { - file << "set_max_delay " << path.max_delay; - if (!path.from_pin.empty()) { - file << " -from " << path.from_pin; - } - if (!path.to_pin.empty()) { - file << " -to " << path.to_pin; - } - file << std::endl; + file << "set_max_delay " << path.max_delay; + if (!path.from_pin.empty()) { + file << " -from " << path.from_pin; + } + if (!path.to_pin.empty()) { + file << " -to " << path.to_pin; + } + file << std::endl; } } -void SdcWriter::WriteClockGroups(std::ostream& file) { +void SdcWriter::WriteClockGroups(std::ostream &file) +{ for (size_t relation = 0; relation <= ClockGroups::CLOCK_GROUP_RELATION_SIZE; relation++) { - auto clock_groups = clock_groups_.GetGroups(static_cast(relation)); - if (clock_groups.size() == 0) { - continue; - } - file << "create_clock_groups "; - for (auto group : clock_groups) { - file << "-group "; - for (auto signal : group) { - file << signal << " "; - } - } - if (relation != ClockGroups::ClockGroupRelation::NONE) { - file << "-" + ClockGroups::relation_name_map.at(static_cast(relation)); - } - file << std::endl; + auto clock_groups = clock_groups_.GetGroups(static_cast(relation)); + if (clock_groups.size() == 0) { + continue; + } + file << "create_clock_groups "; + for (auto group : clock_groups) { + file << "-group "; + for (auto signal : group) { + file << signal << " "; + } + } + if (relation != ClockGroups::ClockGroupRelation::NONE) { + file << "-" + ClockGroups::relation_name_map.at(static_cast(relation)); + } + file << std::endl; } } diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h index 5cdf8a228..ec503a73c 100644 --- a/sdc-plugin/sdc_writer.h +++ b/sdc-plugin/sdc_writer.h @@ -39,39 +39,37 @@ struct ClockGroups { using ClockGroup = std::vector; static const std::map relation_name_map; - void Add(ClockGroup& group, ClockGroupRelation relation) { - groups_[relation].push_back(group); - } - std::vector GetGroups(ClockGroupRelation relation) { - if (groups_.count(relation)) { - return groups_.at(relation); - } - return std::vector(); - } - size_t size() { - return groups_.size(); + void Add(ClockGroup &group, ClockGroupRelation relation) { groups_[relation].push_back(group); } + std::vector GetGroups(ClockGroupRelation relation) + { + if (groups_.count(relation)) { + return groups_.at(relation); + } + return std::vector(); } + size_t size() { return groups_.size(); } - private: - std::map> groups_; + private: + std::map> groups_; }; -class SdcWriter { - public: +class SdcWriter +{ + public: void AddFalsePath(FalsePath false_path); void SetMaxDelay(TimingPath timing_path); void AddClockGroup(ClockGroups::ClockGroup clock_group, ClockGroups::ClockGroupRelation relation); - void WriteSdc(RTLIL::Design* design, std::ostream& file); + void WriteSdc(RTLIL::Design *design, std::ostream &file); - private: - void WriteClocks(RTLIL::Design* design, std::ostream& file); - void WriteFalsePaths(std::ostream& file); - void WriteMaxDelay(std::ostream& file); - void WriteClockGroups(std::ostream& file); + private: + void WriteClocks(RTLIL::Design *design, std::ostream &file); + void WriteFalsePaths(std::ostream &file); + void WriteMaxDelay(std::ostream &file); + void WriteClockGroups(std::ostream &file); std::vector false_paths_; std::vector timing_paths_; ClockGroups clock_groups_; }; -#endif // _SDC_WRITER_H_ +#endif // _SDC_WRITER_H_ diff --git a/sdc-plugin/set_clock_groups.cc b/sdc-plugin/set_clock_groups.cc index 301ca9605..e02047b2d 100644 --- a/sdc-plugin/set_clock_groups.cc +++ b/sdc-plugin/set_clock_groups.cc @@ -16,12 +16,13 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "set_clock_groups.h" -#include #include "kernel/log.h" +#include USING_YOSYS_NAMESPACE -void SetClockGroups::help() { +void SetClockGroups::help() +{ // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" set_clock_groups [-quiet] [-group ] [-asynchronous] \n"); @@ -42,11 +43,11 @@ void SetClockGroups::help() { log("\n"); } -void SetClockGroups::execute(std::vector args, - RTLIL::Design* design) { - RTLIL::Module* top_module = design->top_module(); +void SetClockGroups::execute(std::vector args, RTLIL::Design *design) +{ + RTLIL::Module *top_module = design->top_module(); if (top_module == nullptr) { - log_cmd_error("No top module detected\n"); + log_cmd_error("No top module detected\n"); } size_t argidx; @@ -56,61 +57,57 @@ void SetClockGroups::execute(std::vector args, // Parse command arguments for (argidx = 1; argidx < args.size(); argidx++) { - std::string arg = args[argidx]; - if (arg == "-quiet") { - is_quiet = true; - continue; - } + std::string arg = args[argidx]; + if (arg == "-quiet") { + is_quiet = true; + continue; + } - // Parse clock groups relation: asynchronous, logically_exclusive, physically_exclusive - auto is_relation_arg = - [arg](std::pair - relation) { - if (arg.substr(1) == relation.second) { - return true; - } - return false; - }; - auto relation_map_it = - std::find_if(ClockGroups::relation_name_map.begin(), - ClockGroups::relation_name_map.end(), is_relation_arg); - if (relation_map_it != ClockGroups::relation_name_map.end()) { - clock_groups_relation = relation_map_it->first; - continue; - } + // Parse clock groups relation: asynchronous, logically_exclusive, physically_exclusive + auto is_relation_arg = [arg](std::pair relation) { + if (arg.substr(1) == relation.second) { + return true; + } + return false; + }; + auto relation_map_it = std::find_if(ClockGroups::relation_name_map.begin(), ClockGroups::relation_name_map.end(), is_relation_arg); + if (relation_map_it != ClockGroups::relation_name_map.end()) { + clock_groups_relation = relation_map_it->first; + continue; + } - if (arg == "-group" and argidx + 1 < args.size()) { - ClockGroups::ClockGroup clock_group; - while (argidx + 1 < args.size() and args[argidx+1][0] != '-') { - clock_group.push_back(args[++argidx]); - } - clock_groups.push_back(clock_group); - continue; - } + if (arg == "-group" and argidx + 1 < args.size()) { + ClockGroups::ClockGroup clock_group; + while (argidx + 1 < args.size() and args[argidx + 1][0] != '-') { + clock_group.push_back(args[++argidx]); + } + clock_groups.push_back(clock_group); + continue; + } - if (arg.size() > 0 and arg[0] == '-') { - log_cmd_error("Unknown option %s.\n", arg.c_str()); - } + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } - break; + break; } if (clock_groups.size()) { - if (!is_quiet) { - std::string msg = ClockGroups::relation_name_map.at(clock_groups_relation); - msg += (!msg.empty()) ? " " : ""; - log("Adding %sclock group with following clocks:\n", msg.c_str()); - } - size_t count(0); - for (auto& group : clock_groups) { - sdc_writer_.AddClockGroup(group, clock_groups_relation); - if (!is_quiet) { - log("%zu: ", count++); - for (auto clk : group) { - log("%s ", clk.c_str()); - } - log("\n"); - } - } + if (!is_quiet) { + std::string msg = ClockGroups::relation_name_map.at(clock_groups_relation); + msg += (!msg.empty()) ? " " : ""; + log("Adding %sclock group with following clocks:\n", msg.c_str()); + } + size_t count(0); + for (auto &group : clock_groups) { + sdc_writer_.AddClockGroup(group, clock_groups_relation); + if (!is_quiet) { + log("%zu: ", count++); + for (auto clk : group) { + log("%s ", clk.c_str()); + } + log("\n"); + } + } } } diff --git a/sdc-plugin/set_clock_groups.h b/sdc-plugin/set_clock_groups.h index 31145780e..29062face 100644 --- a/sdc-plugin/set_clock_groups.h +++ b/sdc-plugin/set_clock_groups.h @@ -25,15 +25,13 @@ USING_YOSYS_NAMESPACE struct SetClockGroups : public Pass { - SetClockGroups(SdcWriter& sdc_writer) - : Pass("set_clock_groups", "Set exclusive or asynchronous clock groups"), - sdc_writer_(sdc_writer) {} + SetClockGroups(SdcWriter &sdc_writer) : Pass("set_clock_groups", "Set exclusive or asynchronous clock groups"), sdc_writer_(sdc_writer) {} void help() override; - void execute(std::vector args, RTLIL::Design* design) override; + void execute(std::vector args, RTLIL::Design *design) override; - SdcWriter& sdc_writer_; + SdcWriter &sdc_writer_; }; -#endif //_SET_CLOCK_GROUPS_H_ +#endif //_SET_CLOCK_GROUPS_H_ diff --git a/sdc-plugin/set_false_path.cc b/sdc-plugin/set_false_path.cc index 18262d0c2..e5083b4b9 100644 --- a/sdc-plugin/set_false_path.cc +++ b/sdc-plugin/set_false_path.cc @@ -16,13 +16,14 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "set_false_path.h" -#include #include "kernel/log.h" #include "sdc_writer.h" +#include USING_YOSYS_NAMESPACE -void SetFalsePath::help() { +void SetFalsePath::help() +{ // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" set_false_path [-quiet] [-from ] [-to ] \n"); @@ -46,11 +47,11 @@ void SetFalsePath::help() { log("\n"); } -void SetFalsePath::execute(std::vector args, - RTLIL::Design* design) { - RTLIL::Module* top_module = design->top_module(); +void SetFalsePath::execute(std::vector args, RTLIL::Design *design) +{ + RTLIL::Module *top_module = design->top_module(); if (top_module == nullptr) { - log_cmd_error("No top module detected\n"); + log_cmd_error("No top module detected\n"); } size_t argidx; @@ -61,39 +62,38 @@ void SetFalsePath::execute(std::vector args, // Parse command arguments for (argidx = 1; argidx < args.size(); argidx++) { - std::string arg = args[argidx]; - if (arg == "-quiet") { - is_quiet = true; - continue; - } + std::string arg = args[argidx]; + if (arg == "-quiet") { + is_quiet = true; + continue; + } - if (arg == "-from" and argidx + 1 < args.size()) { - from_pin = args[++argidx]; - continue; - } + if (arg == "-from" and argidx + 1 < args.size()) { + from_pin = args[++argidx]; + continue; + } - if (arg == "-to" and argidx + 1 < args.size()) { - to_pin = args[++argidx]; - continue; - } + if (arg == "-to" and argidx + 1 < args.size()) { + to_pin = args[++argidx]; + continue; + } - if (arg == "-through" and argidx + 1 < args.size()) { - through_pin = args[++argidx]; - continue; - } + if (arg == "-through" and argidx + 1 < args.size()) { + through_pin = args[++argidx]; + continue; + } - if (arg.size() > 0 and arg[0] == '-') { - log_cmd_error("Unknown option %s.\n", arg.c_str()); - } + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } - break; + break; } if (!is_quiet) { - std::string msg = (from_pin.empty()) ? "" : "-from " + from_pin; - msg += (through_pin.empty()) ? "" : " -through " + through_pin; - msg += (to_pin.empty()) ? "" : " -to " + to_pin; - log("Adding false path %s\n", msg.c_str()); + std::string msg = (from_pin.empty()) ? "" : "-from " + from_pin; + msg += (through_pin.empty()) ? "" : " -through " + through_pin; + msg += (to_pin.empty()) ? "" : " -to " + to_pin; + log("Adding false path %s\n", msg.c_str()); } - sdc_writer_.AddFalsePath(FalsePath{ - .from_pin = from_pin, .to_pin = to_pin, .through_pin = through_pin}); + sdc_writer_.AddFalsePath(FalsePath{.from_pin = from_pin, .to_pin = to_pin, .through_pin = through_pin}); } diff --git a/sdc-plugin/set_false_path.h b/sdc-plugin/set_false_path.h index 47bf08a72..de36aa4ff 100644 --- a/sdc-plugin/set_false_path.h +++ b/sdc-plugin/set_false_path.h @@ -25,15 +25,13 @@ USING_YOSYS_NAMESPACE struct SetFalsePath : public Pass { - SetFalsePath(SdcWriter& sdc_writer) - : Pass("set_false_path", "Set false path on net"), - sdc_writer_(sdc_writer) {} + SetFalsePath(SdcWriter &sdc_writer) : Pass("set_false_path", "Set false path on net"), sdc_writer_(sdc_writer) {} void help() override; - void execute(std::vector args, RTLIL::Design* design) override; + void execute(std::vector args, RTLIL::Design *design) override; - SdcWriter& sdc_writer_; + SdcWriter &sdc_writer_; }; -#endif //_SET_FALSE_PATH_H_ +#endif //_SET_FALSE_PATH_H_ diff --git a/sdc-plugin/set_max_delay.cc b/sdc-plugin/set_max_delay.cc index 055e3428d..c517dec9a 100644 --- a/sdc-plugin/set_max_delay.cc +++ b/sdc-plugin/set_max_delay.cc @@ -21,7 +21,8 @@ USING_YOSYS_NAMESPACE -void SetMaxDelay::help() { +void SetMaxDelay::help() +{ // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" set_max_delay [-quiet] [-from ] [-to ] \n"); @@ -42,11 +43,11 @@ void SetMaxDelay::help() { log("\n"); } -void SetMaxDelay::execute(std::vector args, - RTLIL::Design* design) { - RTLIL::Module* top_module = design->top_module(); +void SetMaxDelay::execute(std::vector args, RTLIL::Design *design) +{ + RTLIL::Module *top_module = design->top_module(); if (top_module == nullptr) { - log_cmd_error("No top module detected\n"); + log_cmd_error("No top module detected\n"); } size_t argidx; @@ -57,36 +58,35 @@ void SetMaxDelay::execute(std::vector args, // Parse command arguments for (argidx = 1; argidx < args.size(); argidx++) { - std::string arg = args[argidx]; - if (arg == "-quiet") { - is_quiet = true; - continue; - } + std::string arg = args[argidx]; + if (arg == "-quiet") { + is_quiet = true; + continue; + } - if (arg == "-from" and argidx + 1 < args.size()) { - from_pin = args[++argidx]; - log("From: %s\n", from_pin.c_str()); - continue; - } + if (arg == "-from" and argidx + 1 < args.size()) { + from_pin = args[++argidx]; + log("From: %s\n", from_pin.c_str()); + continue; + } - if (arg == "-to" and argidx + 1 < args.size()) { - to_pin = args[++argidx]; - log("To: %s\n", to_pin.c_str()); - continue; - } + if (arg == "-to" and argidx + 1 < args.size()) { + to_pin = args[++argidx]; + log("To: %s\n", to_pin.c_str()); + continue; + } - if (arg.size() > 0 and arg[0] == '-') { - log_cmd_error("Unknown option %s.\n", arg.c_str()); - } + if (arg.size() > 0 and arg[0] == '-') { + log_cmd_error("Unknown option %s.\n", arg.c_str()); + } - max_delay = std::stof(args[argidx]); + max_delay = std::stof(args[argidx]); } if (!is_quiet) { - std::string msg = (from_pin.empty()) ? "" : "-from " + from_pin; - msg += (to_pin.empty()) ? "" : " -to " + to_pin; - log("Adding max path delay of %f on path %s\n", max_delay, msg.c_str()); + std::string msg = (from_pin.empty()) ? "" : "-from " + from_pin; + msg += (to_pin.empty()) ? "" : " -to " + to_pin; + log("Adding max path delay of %f on path %s\n", max_delay, msg.c_str()); } - sdc_writer_.SetMaxDelay(TimingPath{ - .from_pin = from_pin, .to_pin = to_pin, .max_delay = max_delay}); + sdc_writer_.SetMaxDelay(TimingPath{.from_pin = from_pin, .to_pin = to_pin, .max_delay = max_delay}); } diff --git a/sdc-plugin/set_max_delay.h b/sdc-plugin/set_max_delay.h index 7272839e7..260264384 100644 --- a/sdc-plugin/set_max_delay.h +++ b/sdc-plugin/set_max_delay.h @@ -25,15 +25,13 @@ USING_YOSYS_NAMESPACE struct SetMaxDelay : public Pass { - SetMaxDelay(SdcWriter& sdc_writer) - : Pass("set_max_delay", "Specify maximum delay for timing paths"), - sdc_writer_(sdc_writer) {} + SetMaxDelay(SdcWriter &sdc_writer) : Pass("set_max_delay", "Specify maximum delay for timing paths"), sdc_writer_(sdc_writer) {} void help() override; - void execute(std::vector args, RTLIL::Design* design) override; + void execute(std::vector args, RTLIL::Design *design) override; - SdcWriter& sdc_writer_; + SdcWriter &sdc_writer_; }; -#endif //_SET_MAX_DELAY_H_ +#endif //_SET_MAX_DELAY_H_ diff --git a/sdc-plugin/tests/escaping/escaping.test.cc b/sdc-plugin/tests/escaping/escaping.test.cc index e17eef6ed..a26a84970 100644 --- a/sdc-plugin/tests/escaping/escaping.test.cc +++ b/sdc-plugin/tests/escaping/escaping.test.cc @@ -2,10 +2,10 @@ #include -TEST(ClockTest, EscapeDollarSign) { - // convert wire_name to wire_name, i.e. unchanged - EXPECT_EQ(Clock::AddEscaping("wire_name"), "wire_name"); - // convert $wire_name to \$wire_name - EXPECT_EQ(Clock::AddEscaping("$wire_name"), "\\$wire_name"); +TEST(ClockTest, EscapeDollarSign) +{ + // convert wire_name to wire_name, i.e. unchanged + EXPECT_EQ(Clock::AddEscaping("wire_name"), "wire_name"); + // convert $wire_name to \$wire_name + EXPECT_EQ(Clock::AddEscaping("$wire_name"), "\\$wire_name"); } - diff --git a/selection-plugin/selection.cc b/selection-plugin/selection.cc index 6f224ff9e..30a022235 100644 --- a/selection-plugin/selection.cc +++ b/selection-plugin/selection.cc @@ -16,75 +16,75 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" -#include "kernel/log.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN - struct SelectionToTclList : public Pass { - SelectionToTclList() : Pass("selection_to_tcl_list", "Extract selection to TCL list") {} + SelectionToTclList() : Pass("selection_to_tcl_list", "Extract selection to TCL list") {} - void help() override - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" selection_to_tcl_list selection\n"); - log("\n"); - log("Extract the current selection to a Tcl List with selection object names. \n"); - log("\n"); - } + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" selection_to_tcl_list selection\n"); + log("\n"); + log("Extract the current selection to a Tcl List with selection object names. \n"); + log("\n"); + } - void AddObjectNameToTclList(RTLIL::IdString& module, RTLIL::IdString& object, Tcl_Obj* tcl_list) { - std::string name = RTLIL::unescape_id(module) + "/" + RTLIL::unescape_id(object); - Tcl_Obj* value_obj = Tcl_NewStringObj(name.c_str(), name.size()); - Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); - } + void AddObjectNameToTclList(RTLIL::IdString &module, RTLIL::IdString &object, Tcl_Obj *tcl_list) + { + std::string name = RTLIL::unescape_id(module) + "/" + RTLIL::unescape_id(object); + Tcl_Obj *value_obj = Tcl_NewStringObj(name.c_str(), name.size()); + Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); + } - void execute(std::vector args, RTLIL::Design* design) override - { - if (args.size() == 1) { - log_error("Incorrect number of arguments"); - } - extra_args(args, 1, design); + void execute(std::vector args, RTLIL::Design *design) override + { + if (args.size() == 1) { + log_error("Incorrect number of arguments"); + } + extra_args(args, 1, design); - Tcl_Interp *interp = yosys_get_tcl_interp(); - Tcl_Obj* tcl_list = Tcl_NewListObj(0, NULL); + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_Obj *tcl_list = Tcl_NewListObj(0, NULL); - auto& selection = design->selection(); - if (selection.empty()) { - log_warning("Selection is empty\n"); - } + auto &selection = design->selection(); + if (selection.empty()) { + log_warning("Selection is empty\n"); + } - for (auto mod : design->modules()) { - if (selection.selected_module(mod->name)) { - for (auto wire : mod->wires()) { - if (selection.selected_member(mod->name, wire->name)) { - AddObjectNameToTclList(mod->name, wire->name, tcl_list); - } - } - for (auto &it : mod->memories) { - if (selection.selected_member(mod->name, it.first)) { - AddObjectNameToTclList(mod->name, it.first, tcl_list); - } - } - for (auto cell : mod->cells()) { - if (selection.selected_member(mod->name, cell->name)) { - AddObjectNameToTclList(mod->name, cell->name, tcl_list); - } - } - for (auto &it : mod->processes) { - if (selection.selected_member(mod->name, it.first)) { - AddObjectNameToTclList(mod->name, it.first, tcl_list); - } - } - } + for (auto mod : design->modules()) { + if (selection.selected_module(mod->name)) { + for (auto wire : mod->wires()) { + if (selection.selected_member(mod->name, wire->name)) { + AddObjectNameToTclList(mod->name, wire->name, tcl_list); + } + } + for (auto &it : mod->memories) { + if (selection.selected_member(mod->name, it.first)) { + AddObjectNameToTclList(mod->name, it.first, tcl_list); + } + } + for (auto cell : mod->cells()) { + if (selection.selected_member(mod->name, cell->name)) { + AddObjectNameToTclList(mod->name, cell->name, tcl_list); + } + } + for (auto &it : mod->processes) { + if (selection.selected_member(mod->name, it.first)) { + AddObjectNameToTclList(mod->name, it.first, tcl_list); + } } - Tcl_SetObjResult(interp, tcl_list); - } + } + } + Tcl_SetObjResult(interp, tcl_list); + } } SelectionToTclList; diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index a27bdf720..3d792dd9f 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -26,400 +26,392 @@ * Tcl interpreter and processed by the new XDC commands imported to the * Tcl interpreter. */ -#include +#include "../bank_tiles.h" +#include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" -#include "kernel/log.h" #include "libs/json11/json11.hpp" -#include "../bank_tiles.h" +#include USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -static bool isInputPort(RTLIL::Wire* wire) { - return wire->port_input; -} -static bool isOutputPort(RTLIL::Wire* wire) { - return wire->port_output; -} +static bool isInputPort(RTLIL::Wire *wire) { return wire->port_input; } +static bool isOutputPort(RTLIL::Wire *wire) { return wire->port_output; } enum class SetPropertyOptions { INTERNAL_VREF, IOSTANDARD, SLEW, DRIVE, IN_TERM, IO_LOC_PAIRS }; -const std::unordered_map set_property_options_map = { - {"INTERNAL_VREF", SetPropertyOptions::INTERNAL_VREF}, - {"IOSTANDARD", SetPropertyOptions::IOSTANDARD}, - {"SLEW", SetPropertyOptions::SLEW}, - {"DRIVE", SetPropertyOptions::DRIVE}, - {"IN_TERM", SetPropertyOptions::IN_TERM}, - {"LOC", SetPropertyOptions::IO_LOC_PAIRS}, - {"PACKAGE_PIN", SetPropertyOptions::IO_LOC_PAIRS} -}; - -const std::unordered_map> supported_primitive_parameters = { - {"OBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, - {"OBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, - {"OBUFTDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, - {"IBUF", {"IO_LOC_PAIRS", "IOSTANDARD"}}, - {"IOBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, - {"IOBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}} -}; - -void register_in_tcl_interpreter(const std::string& command) { - Tcl_Interp* interp = yosys_get_tcl_interp(); - std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); - Tcl_Eval(interp, tcl_script.c_str()); +const std::unordered_map set_property_options_map = {{"INTERNAL_VREF", SetPropertyOptions::INTERNAL_VREF}, + {"IOSTANDARD", SetPropertyOptions::IOSTANDARD}, + {"SLEW", SetPropertyOptions::SLEW}, + {"DRIVE", SetPropertyOptions::DRIVE}, + {"IN_TERM", SetPropertyOptions::IN_TERM}, + {"LOC", SetPropertyOptions::IO_LOC_PAIRS}, + {"PACKAGE_PIN", SetPropertyOptions::IO_LOC_PAIRS}}; + +const std::unordered_map> supported_primitive_parameters = { + {"OBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, {"OBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, + {"OBUFTDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, {"IBUF", {"IO_LOC_PAIRS", "IOSTANDARD"}}, + {"IOBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, {"IOBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}}; + +void register_in_tcl_interpreter(const std::string &command) +{ + Tcl_Interp *interp = yosys_get_tcl_interp(); + std::string tcl_script = stringf("proc %s args { return [yosys %s {*}$args] }", command.c_str(), command.c_str()); + Tcl_Eval(interp, tcl_script.c_str()); } struct GetIOBanks : public Pass { - GetIOBanks(std::function get_bank_tiles) - : Pass("get_iobanks", "Set IO Bank number") - , get_bank_tiles(get_bank_tiles) { - register_in_tcl_interpreter(pass_name); - } - - void help() override { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" get_iobanks \n"); - log("\n"); - log("Get IO Bank number\n"); - log("\n"); - } - - void execute(std::vector args, RTLIL::Design* ) override { - if (args.size() < 2) { - log_cmd_error("%s: Missing bank number.\n", pass_name.c_str()); - } - auto bank_tiles = get_bank_tiles(); - if (bank_tiles.count(std::atoi(args[1].c_str())) == 0) { - log_cmd_error("%s:Bank number %s is not present in the target device.\n", args[1].c_str(), pass_name.c_str()); - } - - Tcl_Interp *interp = yosys_get_tcl_interp(); - Tcl_SetResult(interp, const_cast(args[1].c_str()), NULL); - log("%s\n", args[1].c_str()); - } - - std::function get_bank_tiles; + GetIOBanks(std::function get_bank_tiles) : Pass("get_iobanks", "Set IO Bank number"), get_bank_tiles(get_bank_tiles) + { + register_in_tcl_interpreter(pass_name); + } + + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" get_iobanks \n"); + log("\n"); + log("Get IO Bank number\n"); + log("\n"); + } + + void execute(std::vector args, RTLIL::Design *) override + { + if (args.size() < 2) { + log_cmd_error("%s: Missing bank number.\n", pass_name.c_str()); + } + auto bank_tiles = get_bank_tiles(); + if (bank_tiles.count(std::atoi(args[1].c_str())) == 0) { + log_cmd_error("%s:Bank number %s is not present in the target device.\n", args[1].c_str(), pass_name.c_str()); + } + + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_SetResult(interp, const_cast(args[1].c_str()), NULL); + log("%s\n", args[1].c_str()); + } + + std::function get_bank_tiles; }; struct SetProperty : public Pass { - SetProperty(std::function get_bank_tiles) - : Pass("set_property", "Set a given property") - , get_bank_tiles(get_bank_tiles) { - register_in_tcl_interpreter(pass_name); - } - - void help() override { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" set_property PROPERTY VALUE OBJECT\n"); - log("\n"); - log("Set the given property to the specified value on an object\n"); - log("\n"); - } - - void execute(std::vector args, RTLIL::Design* design) override { - if (design->top_module() == nullptr) { - log_cmd_error("No top module detected\n"); - } - - std::string option(args[1]); - if (set_property_options_map.count(option) == 0) { - log_warning("set_property: %s option is currently not supported\n", option.c_str()); - return; - } - - switch (set_property_options_map.at(option)) { - case SetPropertyOptions::INTERNAL_VREF: - process_vref(std::vector(args.begin() + 2, args.end()), design); - break; - case SetPropertyOptions::IOSTANDARD: - case SetPropertyOptions::SLEW: - case SetPropertyOptions::DRIVE: - case SetPropertyOptions::IN_TERM: - process_port_parameter(std::vector(args.begin() + 1, args.end()), design); - break; - case SetPropertyOptions::IO_LOC_PAIRS: { - // args "set_property LOC PAD PORT" become "IO_LOC_PAIRS PORT:PAD PORT" - std::vector new_args(args.begin() + 1, args.end()); - new_args.at(0) = "IO_LOC_PAIRS"; - new_args.at(1) = new_args.at(2) + ":" + new_args.at(1); - process_port_parameter(new_args, design); - break; - } - default: - assert(false); - } - } - - void process_vref(std::vector args, RTLIL::Design* design) { - if (args.size() < 2) { - log_error("set_property INTERNAL_VREF: Incorrect number of arguments.\n"); - } - int iobank = std::atoi(args[1].c_str()); - auto bank_tiles = get_bank_tiles(); - if (bank_tiles.count(iobank) == 0) { - log_cmd_error("set_property INTERNAL_VREF: Invalid IO bank.\n"); - } - - int internal_vref = 1000 * std::atof(args[0].c_str()); - if (internal_vref != 600 && - internal_vref != 675 && - internal_vref != 750 && - internal_vref != 900) { - log("set_property INTERNAL_VREF: Incorrect INTERNAL_VREF value\n"); - return; - } - - // Create a new BANK module if it hasn't been created so far - RTLIL::Module* top_module = design->top_module(); - if (!design->has(ID(BANK))) { - std::string fasm_extra_modules_dir(proc_share_dirname() + "/plugins/fasm_extra_modules"); - Pass::call(design, "read_verilog " + fasm_extra_modules_dir + "/BANK.v"); - } - - // Set parameters on a new bank instance or update an existing one - char bank_cell_name[16]; - snprintf(bank_cell_name, 16, "\\bank_cell_%d", iobank); - RTLIL::Cell* bank_cell = top_module->cell(RTLIL::IdString(bank_cell_name)); - if (!bank_cell) { - bank_cell = top_module->addCell(RTLIL::IdString(bank_cell_name), ID(BANK)); - } - bank_cell->setParam(ID(FASM_EXTRA), RTLIL::Const("INTERNAL_VREF")); - bank_cell->setParam(ID(NUMBER), RTLIL::Const(iobank)); - bank_cell->setParam(ID(INTERNAL_VREF), RTLIL::Const(internal_vref)); - } - - void process_port_parameter(std::vector args, RTLIL::Design* design) { - if (args.size() < 1) { - log_error("set_property: Incorrect number of arguments.\n"); - } - - std::string parameter(args.at(0)); - if (args.size() < 3 || args.at(2).size() == 0) { - log_error("set_property %s: Incorrect number of arguments.\n", parameter.c_str()); - } - - std::string port_name(args.at(2)); - std::string value(args.at(1)); - - auto port_signal = extract_signal(port_name); - std::string port(port_signal.first); - int port_bit = port_signal.second; - - RTLIL::Wire* wire = design->top_module()->wire(RTLIL::escape_id(port)); - if (wire == nullptr) { - log_error("Couldn't find port %s\n", port_name.c_str()); - } - - if (!isInputPort(wire) && !isOutputPort(wire)) { - log_error("Port %s is not a top port\n", port_name.c_str()); - } - - if (port_bit < wire->start_offset || port_bit >= wire->start_offset + wire->width) { - log_error("Incorrect top port index %d in port %s\n", port_bit, port_name.c_str()); - } - - // Traverse the port wire - traverse_wire(port_name, design->top_module()); - - RTLIL::IdString parameter_id(RTLIL::escape_id(parameter)); - for (auto cell_obj : design->top_module()->cells_) { - RTLIL::IdString cell_id = cell_obj.first; - RTLIL::Cell* cell = cell_obj.second; - - // Check if the cell is of the type we are looking for - auto cell_type_str = RTLIL::unescape_id(cell->type.str()); - auto primitive_parameters_iter = supported_primitive_parameters.find(cell_type_str); - if (primitive_parameters_iter == supported_primitive_parameters.end()) { - continue; - } - - // Set the parameter on the cell connected to the selected port - for (auto connection : cell->connections_) { - RTLIL::SigSpec cell_signal = connection.second; - if (is_signal_port(cell_signal, port_name)) { - // Check if the attribute is allowed for this module - auto primitive_parameters = primitive_parameters_iter->second; - if (std::find(primitive_parameters.begin(), primitive_parameters.end(), parameter) == primitive_parameters.end()) { - log_error("Cell %s of type %s doesn't support the %s attribute\n", - cell->name.c_str(), cell->type.c_str(), - parameter_id.c_str()); - } - if (parameter_id == ID(IO_LOC_PAIRS) and cell->hasParam(parameter_id)) { - std::string cur_value(cell->getParam(parameter_id).decode_string()); - value = cur_value + "," + value; - } - cell->setParam(parameter_id, RTLIL::Const(value)); - log("Setting parameter %s to value %s on cell %s \n", parameter_id.c_str(), value.c_str(), cell_obj.first.c_str()); - } - } - } - log("\n"); - } - - // Search module's connections for the specified destination port - // and traverse from the specified destination wire to the source wire - void traverse_wire(std::string& port_name, RTLIL::Module* module) { - auto port_signal = extract_signal(port_name); - std::string signal_name(port_signal.first); - auto signal_name_idstr = RTLIL::IdString(RTLIL::escape_id(signal_name)); - int port_bit = port_signal.second; - for (auto connection : module->connections_) { - auto dst_sig = connection.first; - auto src_sig = connection.second; - if (dst_sig.is_chunk()) { - auto chunk = dst_sig.as_chunk(); - if (chunk.wire) { - if (chunk.wire->name != signal_name_idstr) { - continue; - } - if (port_bit < chunk.offset || port_bit >= (chunk.offset + chunk.width)) { - continue; - } - auto src_wires = src_sig.to_sigbit_vector(); - auto src_wire_sigbit = src_wires.at(port_bit - chunk.offset); - if (src_wire_sigbit.wire) { - port_name = src_wires.at(port_bit - chunk.offset).wire->name.str(); - if (src_wire_sigbit.offset > 0) { - port_name += "[" + std::to_string(src_wire_sigbit.offset) + "]"; - } - return; - } - } - } - } - } - - // Extract signal name and port bit information from port name - std::pair extract_signal(const std::string& port_name) { - int port_bit(0); - std::string port_str(port_name.size(), '\0'); - sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &port_bit); - port_str.resize(strlen(port_str.c_str())); - return std::make_pair(port_str, port_bit); - } - - // Check if the specified port name is part of the provided connection signal - bool is_signal_port(RTLIL::SigSpec signal, const std::string& port_name) { - auto port_signal = extract_signal(port_name); - std::string port(port_signal.first); - int port_bit = port_signal.second; - if (signal.is_chunk()) { - auto chunk = signal.as_chunk(); - if (chunk.wire) { - return (chunk.wire->name == RTLIL::IdString(RTLIL::escape_id(port))) && - (port_bit == chunk.offset); - } - } - return false; - } - - std::function get_bank_tiles; + SetProperty(std::function get_bank_tiles) : Pass("set_property", "Set a given property"), get_bank_tiles(get_bank_tiles) + { + register_in_tcl_interpreter(pass_name); + } + + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" set_property PROPERTY VALUE OBJECT\n"); + log("\n"); + log("Set the given property to the specified value on an object\n"); + log("\n"); + } + + void execute(std::vector args, RTLIL::Design *design) override + { + if (design->top_module() == nullptr) { + log_cmd_error("No top module detected\n"); + } + + std::string option(args[1]); + if (set_property_options_map.count(option) == 0) { + log_warning("set_property: %s option is currently not supported\n", option.c_str()); + return; + } + + switch (set_property_options_map.at(option)) { + case SetPropertyOptions::INTERNAL_VREF: + process_vref(std::vector(args.begin() + 2, args.end()), design); + break; + case SetPropertyOptions::IOSTANDARD: + case SetPropertyOptions::SLEW: + case SetPropertyOptions::DRIVE: + case SetPropertyOptions::IN_TERM: + process_port_parameter(std::vector(args.begin() + 1, args.end()), design); + break; + case SetPropertyOptions::IO_LOC_PAIRS: { + // args "set_property LOC PAD PORT" become "IO_LOC_PAIRS PORT:PAD PORT" + std::vector new_args(args.begin() + 1, args.end()); + new_args.at(0) = "IO_LOC_PAIRS"; + new_args.at(1) = new_args.at(2) + ":" + new_args.at(1); + process_port_parameter(new_args, design); + break; + } + default: + assert(false); + } + } + + void process_vref(std::vector args, RTLIL::Design *design) + { + if (args.size() < 2) { + log_error("set_property INTERNAL_VREF: Incorrect number of arguments.\n"); + } + int iobank = std::atoi(args[1].c_str()); + auto bank_tiles = get_bank_tiles(); + if (bank_tiles.count(iobank) == 0) { + log_cmd_error("set_property INTERNAL_VREF: Invalid IO bank.\n"); + } + + int internal_vref = 1000 * std::atof(args[0].c_str()); + if (internal_vref != 600 && internal_vref != 675 && internal_vref != 750 && internal_vref != 900) { + log("set_property INTERNAL_VREF: Incorrect INTERNAL_VREF value\n"); + return; + } + + // Create a new BANK module if it hasn't been created so far + RTLIL::Module *top_module = design->top_module(); + if (!design->has(ID(BANK))) { + std::string fasm_extra_modules_dir(proc_share_dirname() + "/plugins/fasm_extra_modules"); + Pass::call(design, "read_verilog " + fasm_extra_modules_dir + "/BANK.v"); + } + + // Set parameters on a new bank instance or update an existing one + char bank_cell_name[16]; + snprintf(bank_cell_name, 16, "\\bank_cell_%d", iobank); + RTLIL::Cell *bank_cell = top_module->cell(RTLIL::IdString(bank_cell_name)); + if (!bank_cell) { + bank_cell = top_module->addCell(RTLIL::IdString(bank_cell_name), ID(BANK)); + } + bank_cell->setParam(ID(FASM_EXTRA), RTLIL::Const("INTERNAL_VREF")); + bank_cell->setParam(ID(NUMBER), RTLIL::Const(iobank)); + bank_cell->setParam(ID(INTERNAL_VREF), RTLIL::Const(internal_vref)); + } + + void process_port_parameter(std::vector args, RTLIL::Design *design) + { + if (args.size() < 1) { + log_error("set_property: Incorrect number of arguments.\n"); + } + + std::string parameter(args.at(0)); + if (args.size() < 3 || args.at(2).size() == 0) { + log_error("set_property %s: Incorrect number of arguments.\n", parameter.c_str()); + } + + std::string port_name(args.at(2)); + std::string value(args.at(1)); + + auto port_signal = extract_signal(port_name); + std::string port(port_signal.first); + int port_bit = port_signal.second; + + RTLIL::Wire *wire = design->top_module()->wire(RTLIL::escape_id(port)); + if (wire == nullptr) { + log_error("Couldn't find port %s\n", port_name.c_str()); + } + + if (!isInputPort(wire) && !isOutputPort(wire)) { + log_error("Port %s is not a top port\n", port_name.c_str()); + } + + if (port_bit < wire->start_offset || port_bit >= wire->start_offset + wire->width) { + log_error("Incorrect top port index %d in port %s\n", port_bit, port_name.c_str()); + } + + // Traverse the port wire + traverse_wire(port_name, design->top_module()); + + RTLIL::IdString parameter_id(RTLIL::escape_id(parameter)); + for (auto cell_obj : design->top_module()->cells_) { + RTLIL::IdString cell_id = cell_obj.first; + RTLIL::Cell *cell = cell_obj.second; + + // Check if the cell is of the type we are looking for + auto cell_type_str = RTLIL::unescape_id(cell->type.str()); + auto primitive_parameters_iter = supported_primitive_parameters.find(cell_type_str); + if (primitive_parameters_iter == supported_primitive_parameters.end()) { + continue; + } + + // Set the parameter on the cell connected to the selected port + for (auto connection : cell->connections_) { + RTLIL::SigSpec cell_signal = connection.second; + if (is_signal_port(cell_signal, port_name)) { + // Check if the attribute is allowed for this module + auto primitive_parameters = primitive_parameters_iter->second; + if (std::find(primitive_parameters.begin(), primitive_parameters.end(), parameter) == primitive_parameters.end()) { + log_error("Cell %s of type %s doesn't support the %s attribute\n", cell->name.c_str(), cell->type.c_str(), + parameter_id.c_str()); + } + if (parameter_id == ID(IO_LOC_PAIRS) and cell->hasParam(parameter_id)) { + std::string cur_value(cell->getParam(parameter_id).decode_string()); + value = cur_value + "," + value; + } + cell->setParam(parameter_id, RTLIL::Const(value)); + log("Setting parameter %s to value %s on cell %s \n", parameter_id.c_str(), value.c_str(), cell_obj.first.c_str()); + } + } + } + log("\n"); + } + + // Search module's connections for the specified destination port + // and traverse from the specified destination wire to the source wire + void traverse_wire(std::string &port_name, RTLIL::Module *module) + { + auto port_signal = extract_signal(port_name); + std::string signal_name(port_signal.first); + auto signal_name_idstr = RTLIL::IdString(RTLIL::escape_id(signal_name)); + int port_bit = port_signal.second; + for (auto connection : module->connections_) { + auto dst_sig = connection.first; + auto src_sig = connection.second; + if (dst_sig.is_chunk()) { + auto chunk = dst_sig.as_chunk(); + if (chunk.wire) { + if (chunk.wire->name != signal_name_idstr) { + continue; + } + if (port_bit < chunk.offset || port_bit >= (chunk.offset + chunk.width)) { + continue; + } + auto src_wires = src_sig.to_sigbit_vector(); + auto src_wire_sigbit = src_wires.at(port_bit - chunk.offset); + if (src_wire_sigbit.wire) { + port_name = src_wires.at(port_bit - chunk.offset).wire->name.str(); + if (src_wire_sigbit.offset > 0) { + port_name += "[" + std::to_string(src_wire_sigbit.offset) + "]"; + } + return; + } + } + } + } + } + + // Extract signal name and port bit information from port name + std::pair extract_signal(const std::string &port_name) + { + int port_bit(0); + std::string port_str(port_name.size(), '\0'); + sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &port_bit); + port_str.resize(strlen(port_str.c_str())); + return std::make_pair(port_str, port_bit); + } + + // Check if the specified port name is part of the provided connection signal + bool is_signal_port(RTLIL::SigSpec signal, const std::string &port_name) + { + auto port_signal = extract_signal(port_name); + std::string port(port_signal.first); + int port_bit = port_signal.second; + if (signal.is_chunk()) { + auto chunk = signal.as_chunk(); + if (chunk.wire) { + return (chunk.wire->name == RTLIL::IdString(RTLIL::escape_id(port))) && (port_bit == chunk.offset); + } + } + return false; + } + + std::function get_bank_tiles; }; struct ReadXdc : public Frontend { - ReadXdc() - : Frontend("xdc", "Read XDC file") - , GetIOBanks(std::bind(&ReadXdc::get_bank_tiles, this)) - , SetProperty(std::bind(&ReadXdc::get_bank_tiles, this)) {} - - void help() override { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" read_xdc -part_json \n"); - log("\n"); - log("Read XDC file.\n"); - log("\n"); - } - - void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design*) override { - if (args.size() < 2) { - log_cmd_error("Missing script file.\n"); - } - size_t argidx = 1; - bank_tiles.clear(); - if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { - bank_tiles = ::get_bank_tiles(args[++argidx]); - argidx++; - } - extra_args(f, filename, args, argidx); - std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; - log("%s\n", content.c_str()); - - // According to page 6 of UG903 XDC is tcl, hence quoting of bracketed numbers, - // such as bus indexes, is required. For example "signal[5]" would be typically - // expanded to the concatenation of the string "signal" and result of the function call "5" - // with no arguments. Therefore in TCL the signal indices have to be wrapped in curly braces - // e.g "{signal[5]}" in order for the interpreter to not perform any variable substitution - // or function calls on the wrapped content. - // - // Nevertheless, it's quite common for EDA tools to allow for specifying signal indices - // (e.g. "signal[5]") without using non-expanding quotes. - // Possible TCL implementations of such a feature include registering a TCL command - // for each integer which returns itself but surrounded with brackets or using the 'unknown' - // command which is invoked by the Tcl interpreter whenever a script tries to invoke a command - // that does not exist. In the XDC plugin the latter approach is used, however it's limited to - // the 'read_xdc' command, hence the 'unknown' command works solely on the content of the XDC file. - // - // In this implementation the signal "signal[5]" is expanded in TCL to the concatenation of a string - // and function call, however this time the handling of the non-existent command '5' is passed by - // the interpreter to the 'unknown' command which returns a string that consists of the indice - // integer surrounded by square brackets, i.e. "[5]", effectively expanding the signal to "signal[5]" - // string. - // - Tcl_Interp* interp = yosys_get_tcl_interp(); - Tcl_Eval(interp, "rename unknown _original_unknown"); - Tcl_Eval(interp, "proc unknown args { return \\[[lindex $args 0]\\] }"); - if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { - log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); - } - Tcl_Eval(interp, "rename unknown \"\""); - Tcl_Eval(interp, "rename _original_unknown unknown"); - } - const BankTilesMap& get_bank_tiles() { - return bank_tiles; - } - - BankTilesMap bank_tiles; - struct GetIOBanks GetIOBanks; - struct SetProperty SetProperty; + ReadXdc() + : Frontend("xdc", "Read XDC file"), GetIOBanks(std::bind(&ReadXdc::get_bank_tiles, this)), + SetProperty(std::bind(&ReadXdc::get_bank_tiles, this)) + { + } + + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_xdc -part_json \n"); + log("\n"); + log("Read XDC file.\n"); + log("\n"); + } + + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *) override + { + if (args.size() < 2) { + log_cmd_error("Missing script file.\n"); + } + size_t argidx = 1; + bank_tiles.clear(); + if (args[argidx] == "-part_json" && argidx + 1 < args.size()) { + bank_tiles = ::get_bank_tiles(args[++argidx]); + argidx++; + } + extra_args(f, filename, args, argidx); + std::string content{std::istreambuf_iterator(*f), std::istreambuf_iterator()}; + log("%s\n", content.c_str()); + + // According to page 6 of UG903 XDC is tcl, hence quoting of bracketed numbers, + // such as bus indexes, is required. For example "signal[5]" would be typically + // expanded to the concatenation of the string "signal" and result of the function call "5" + // with no arguments. Therefore in TCL the signal indices have to be wrapped in curly braces + // e.g "{signal[5]}" in order for the interpreter to not perform any variable substitution + // or function calls on the wrapped content. + // + // Nevertheless, it's quite common for EDA tools to allow for specifying signal indices + // (e.g. "signal[5]") without using non-expanding quotes. + // Possible TCL implementations of such a feature include registering a TCL command + // for each integer which returns itself but surrounded with brackets or using the 'unknown' + // command which is invoked by the Tcl interpreter whenever a script tries to invoke a command + // that does not exist. In the XDC plugin the latter approach is used, however it's limited to + // the 'read_xdc' command, hence the 'unknown' command works solely on the content of the XDC file. + // + // In this implementation the signal "signal[5]" is expanded in TCL to the concatenation of a string + // and function call, however this time the handling of the non-existent command '5' is passed by + // the interpreter to the 'unknown' command which returns a string that consists of the indice + // integer surrounded by square brackets, i.e. "[5]", effectively expanding the signal to "signal[5]" + // string. + // + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_Eval(interp, "rename unknown _original_unknown"); + Tcl_Eval(interp, "proc unknown args { return \\[[lindex $args 0]\\] }"); + if (Tcl_EvalFile(interp, args[argidx].c_str()) != TCL_OK) { + log_cmd_error("TCL interpreter returned an error: %s\n", Tcl_GetStringResult(interp)); + } + Tcl_Eval(interp, "rename unknown \"\""); + Tcl_Eval(interp, "rename _original_unknown unknown"); + } + const BankTilesMap &get_bank_tiles() { return bank_tiles; } + + BankTilesMap bank_tiles; + struct GetIOBanks GetIOBanks; + struct SetProperty SetProperty; } ReadXdc; struct GetBankTiles : public Pass { - GetBankTiles() - : Pass("get_bank_tiles", "Inspect IO Bank tiles") { - register_in_tcl_interpreter(pass_name); - } - - void help() override - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" get_bank_tiles \n"); - log("\n"); - log("Inspect IO Bank tiles for the specified part based on the provided JSON file.\n"); - log("\n"); - } - - void execute(std::vector args, RTLIL::Design* ) override { - if (args.size() < 2) { - log_cmd_error("Missing JSON file.\n"); - } - // Check if the part has the specified bank - auto bank_tiles = get_bank_tiles(args[1]); - if (bank_tiles.size()) { - log("Available bank tiles:\n"); - for (auto bank : bank_tiles) { - log("Bank: %d, Tile: %s\n", bank.first, bank.second.c_str()); - } - log("\n"); - } else { - log("No bank tiles available.\n"); - } - } + GetBankTiles() : Pass("get_bank_tiles", "Inspect IO Bank tiles") { register_in_tcl_interpreter(pass_name); } + + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" get_bank_tiles \n"); + log("\n"); + log("Inspect IO Bank tiles for the specified part based on the provided JSON file.\n"); + log("\n"); + } + + void execute(std::vector args, RTLIL::Design *) override + { + if (args.size() < 2) { + log_cmd_error("Missing JSON file.\n"); + } + // Check if the part has the specified bank + auto bank_tiles = get_bank_tiles(args[1]); + if (bank_tiles.size()) { + log("Available bank tiles:\n"); + for (auto bank : bank_tiles) { + log("Bank: %d, Tile: %s\n", bank.first, bank.second.c_str()); + } + log("\n"); + } else { + log("No bank tiles available.\n"); + } + } } GetBankTiles; PRIVATE_NAMESPACE_END From 4c81617f134bdb4f2532112f06ea5ae5ce7f470e Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 15 Dec 2020 09:42:53 +0100 Subject: [PATCH 257/845] SDC: Add include_propagated_clocks switch Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 19 ++++++++++++++++--- sdc-plugin/sdc_writer.cc | 8 ++++---- sdc-plugin/sdc_writer.h | 4 ++-- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index dd058d9fa..9f92b483e 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -67,20 +67,33 @@ struct WriteSdcCmd : public Backend { void help() override { log("\n"); - log(" write_sdc \n"); + log(" write_sdc [-include_propagated_clocks] \n"); log("\n"); log("Write SDC file.\n"); log("\n"); + log(" -include_propagated_clocks\n"); + log(" Write out all propagated clocks"); + log("\n"); } void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) override { + size_t argidx; + bool include_propagated = false; if (args.size() < 2) { log_cmd_error("Missing output file.\n"); } + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-include_propagated_clocks" && argidx + 1 < args.size()) { + include_propagated = true; + continue; + } + break; + } log("\nWriting out clock constraints file(SDC)\n"); - extra_args(f, filename, args, 1); - sdc_writer_.WriteSdc(design, *f); + extra_args(f, filename, args, argidx); + sdc_writer_.WriteSdc(design, *f, include_propagated); } SdcWriter &sdc_writer_; diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index ed283a64a..7004f4719 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -31,15 +31,15 @@ void SdcWriter::AddClockGroup(ClockGroups::ClockGroup clock_group, ClockGroups:: clock_groups_.Add(clock_group, relation); } -void SdcWriter::WriteSdc(RTLIL::Design *design, std::ostream &file) +void SdcWriter::WriteSdc(RTLIL::Design *design, std::ostream &file, bool include_propagated) { - WriteClocks(design, file); + WriteClocks(design, file, include_propagated); WriteFalsePaths(file); WriteMaxDelay(file); WriteClockGroups(file); } -void SdcWriter::WriteClocks(RTLIL::Design *design, std::ostream &file) +void SdcWriter::WriteClocks(RTLIL::Design *design, std::ostream &file, bool include_propagated) { for (auto &clock : Clocks::GetClocks(design)) { auto &clock_wire = clock.second; @@ -48,7 +48,7 @@ void SdcWriter::WriteClocks(RTLIL::Design *design, std::ostream &file) continue; } // Write out only GENERATED and EXPLICIT clocks - if (Clock::IsPropagated(clock_wire)) { + if (Clock::IsPropagated(clock_wire) and !include_propagated) { continue; } file << "create_clock -period " << Clock::Period(clock_wire); diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h index ec503a73c..224f18aad 100644 --- a/sdc-plugin/sdc_writer.h +++ b/sdc-plugin/sdc_writer.h @@ -59,10 +59,10 @@ class SdcWriter void AddFalsePath(FalsePath false_path); void SetMaxDelay(TimingPath timing_path); void AddClockGroup(ClockGroups::ClockGroup clock_group, ClockGroups::ClockGroupRelation relation); - void WriteSdc(RTLIL::Design *design, std::ostream &file); + void WriteSdc(RTLIL::Design *design, std::ostream &file, bool include_propagated); private: - void WriteClocks(RTLIL::Design *design, std::ostream &file); + void WriteClocks(RTLIL::Design *design, std::ostream &file, bool include_propagated); void WriteFalsePaths(std::ostream &file); void WriteMaxDelay(std::ostream &file); void WriteClockGroups(std::ostream &file); From 1d1570da0f6bb208b39d0e058612371851a15721 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 15 Dec 2020 09:43:19 +0100 Subject: [PATCH 258/845] SDC: Add test for pll with propagated clocks Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/Makefile | 2 + .../pll_propagated/pll_propagated.golden.sdc | 8 ++ .../pll_propagated/pll_propagated.input.sdc | 1 + .../tests/pll_propagated/pll_propagated.tcl | 21 +++++ .../tests/pll_propagated/pll_propagated.v | 91 +++++++++++++++++++ 5 files changed, 123 insertions(+) create mode 100644 sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc create mode 100644 sdc-plugin/tests/pll_propagated/pll_propagated.input.sdc create mode 100644 sdc-plugin/tests/pll_propagated/pll_propagated.tcl create mode 100644 sdc-plugin/tests/pll_propagated/pll_propagated.v diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 56525df1d..503c5421a 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -14,6 +14,7 @@ TESTS = counter \ pll_fbout_phase \ pll_approx_equal \ pll_dangling_wires \ + pll_propagated \ set_false_path \ set_max_delay \ set_clock_groups \ @@ -34,6 +35,7 @@ pll_div_verify = $(call diff_test,pll_div,sdc) pll_fbout_phase_verify = $(call diff_test,pll_fbout_phase,sdc) pll_approx_equal_verify = $(call diff_test,pll_approx_equal,sdc) pll_dangling_wires_verify = $(call diff_test,pll_dangling_wires,sdc) +pll_propagated_verify = $(call diff_test,pll_propagated,sdc) set_false_path_verify = $(call diff_test,set_false_path,sdc) set_max_delay_verify = $(call diff_test,set_max_delay,sdc) set_clock_groups_verify = $(call diff_test,set_clock_groups,sdc) diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc b/sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc new file mode 100644 index 000000000..5f1fc758d --- /dev/null +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc @@ -0,0 +1,8 @@ +create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 +create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:262:execute\$1717 +create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:262:execute\$1719 +create_clock -period 5 -waveform {1.25 3.75} \$auto\$clkbufmap.cc:262:execute\$1721 +create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C +create_clock -period 10 -waveform {2.5 7.5} main_clkout0 +create_clock -period 2.5 -waveform {0 1.25} main_clkout1 +create_clock -period 5 -waveform {1.25 3.75} main_clkout2 diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.input.sdc b/sdc-plugin/tests/pll_propagated/pll_propagated.input.sdc new file mode 100644 index 000000000..00354d767 --- /dev/null +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.input.sdc @@ -0,0 +1 @@ +create_clock -period 10 -waveform {0 5} clk diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.tcl b/sdc-plugin/tests/pll_propagated/pll_propagated.tcl new file mode 100644 index 000000000..a321aeb97 --- /dev/null +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.tcl @@ -0,0 +1,21 @@ +yosys -import +plugin -i sdc +# Import the commands from the plugins to the tcl interpreter +yosys -import + +read_verilog $::env(DESIGN_TOP).v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top + +# Start flow after library reading +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Read the design timing constraints +read_sdc $::env(DESIGN_TOP).input.sdc + +# Propagate the clocks +propagate_clocks + +# Write out the SDC file after the clock propagation step +write_sdc -include_propagated_clocks $::env(DESIGN_TOP).sdc diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.v b/sdc-plugin/tests/pll_propagated/pll_propagated.v new file mode 100644 index 000000000..63542da0c --- /dev/null +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.v @@ -0,0 +1,91 @@ +module top( + input clk, + input cpu_reset, + input data_in, + output[5:0] data_out +); + +wire [5:0] data_out; +wire builder_pll_fb; +wire fdce_0_out, fdce_1_out; +wire main_locked; + +FDCE FDCE_0 ( + .D(data_in), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(fdce_0_out) +); + +FDCE FDCE_1 ( + .D(fdce_0_out), + .C(clk), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[0]) +); + +PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .CLKOUT1_DIVIDE(2'd3), + .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(3'd6), + .CLKOUT2_PHASE(90.0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") +) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .LOCKED(main_locked) +); + +FDCE FDCE_PLLx1_PH90 ( + .D(data_in), + .C(main_clkout0), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[1]) +); + +FDCE FDCE_PLLx4_PH0_0 ( + .D(data_in), + .C(main_clkout1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[2]) +); + +FDCE FDCE_PLLx4_PH0_1 ( + .D(data_in), + .C(main_clkout1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[3]) +); + +FDCE FDCE_PLLx4_PH0_2 ( + .D(data_in), + .C(main_clkout1), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[4]) +); + +FDCE FDCE_PLLx2_PH90_0 ( + .D(data_in), + .C(main_clkout2), + .CE(1'b1), + .CLR(1'b0), + .Q(data_out[5]) +); +endmodule From 24b1bca9fca5b359c96548d21c41e9ef7fd08e2e Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 17 Dec 2020 14:01:27 +0100 Subject: [PATCH 259/845] Move bank_tiles.h to common directory Signed-off-by: Tomasz Michalak --- bank_tiles.h => common/bank_tiles.h | 0 fasm-plugin/fasm.cc | 2 +- xdc-plugin/xdc.cc | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename bank_tiles.h => common/bank_tiles.h (100%) diff --git a/bank_tiles.h b/common/bank_tiles.h similarity index 100% rename from bank_tiles.h rename to common/bank_tiles.h diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index 5ab4c1a90..245d4bd36 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -24,7 +24,7 @@ * annotations on the design cells. */ -#include "../bank_tiles.h" +#include "../common/bank_tiles.h" #include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 3d792dd9f..1e9703347 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -26,7 +26,7 @@ * Tcl interpreter and processed by the new XDC commands imported to the * Tcl interpreter. */ -#include "../bank_tiles.h" +#include "../common/bank_tiles.h" #include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" From 9fd257ee330acbbee4cafcbae74afc58373570e7 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 15 Dec 2020 11:28:36 +0100 Subject: [PATCH 260/845] Add trim utility functions and add unit test Signed-off-by: Tomasz Michalak --- common/utils.h | 19 ++++++++++++++++ design_introspection-plugin/get_ports.cc | 2 ++ design_introspection-plugin/tests/Makefile | 2 ++ .../tests/get_ports/get_ports.golden.txt | 2 ++ .../tests/get_ports/get_ports.tcl | 12 +++++++--- .../tests/trim_name/trim_name.test.cc | 22 +++++++++++++++++++ 6 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 common/utils.h create mode 100644 design_introspection-plugin/tests/trim_name/trim_name.test.cc diff --git a/common/utils.h b/common/utils.h new file mode 100644 index 000000000..42ad7b158 --- /dev/null +++ b/common/utils.h @@ -0,0 +1,19 @@ +#include +#include +#include + +inline void trim_left(std::string &str) +{ + str.erase(str.begin(), std::find_if(str.begin(), str.end(), [](unsigned char ch) { return !std::isspace(ch); })); +} + +inline void trim_right(std::string &str) +{ + str.erase(std::find_if(str.rbegin(), str.rend(), [](unsigned char ch) { return !std::isspace(ch); }).base(), str.end()); +} + +inline void trim(std::string &str) +{ + trim_left(str); + trim_right(str); +} diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index 042ada754..d6a09164f 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -18,6 +18,7 @@ * */ #include "get_ports.h" +#include "../common/utils.h" USING_YOSYS_NAMESPACE @@ -30,6 +31,7 @@ void GetPorts::ExecuteSelection([[gnu::unused]] RTLIL::Design *design, [[gnu::un GetPorts::SelectionObjects GetPorts::ExtractSelection(RTLIL::Design *design, const CommandArgs &args) { std::string port_name = args.selection_objects.at(0); + trim(port_name); std::string port_str(port_name.size(), '\0'); int bit(0); if (!sscanf(port_name.c_str(), "%[^[][%d]", &port_str[0], &bit)) { diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index fcca1e904..1602a4871 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -3,6 +3,8 @@ TESTS = get_nets \ get_cells \ get_pins +UNIT_TESTS = trim_name + include $(shell pwd)/../../Makefile_test.common get_nets_verify = $(call diff_test,get_nets,txt) diff --git a/design_introspection-plugin/tests/get_ports/get_ports.golden.txt b/design_introspection-plugin/tests/get_ports/get_ports.golden.txt index d87ba55bf..d427ccd62 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.golden.txt +++ b/design_introspection-plugin/tests/get_ports/get_ports.golden.txt @@ -4,3 +4,5 @@ clk port clk led[0] port led[0] +led[1] port +led[1] diff --git a/design_introspection-plugin/tests/get_ports/get_ports.tcl b/design_introspection-plugin/tests/get_ports/get_ports.tcl index eca245d05..f82305a0f 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.tcl +++ b/design_introspection-plugin/tests/get_ports/get_ports.tcl @@ -10,18 +10,24 @@ help get_ports set fp [open "get_ports.txt" "w"] -puts "\nsignal_p port" +puts "\n signal_p port" puts $fp "signal_p port" puts $fp [get_ports signal_p] -puts "\nclk port" +puts "\n clk port" puts $fp "clk port" puts $fp [get_ports clk] -puts {\nled[0] port} +puts "\n" +puts { led[0] port} puts $fp {led[0] port} puts $fp [get_ports {led[0]}] +puts "\n" +puts { led[1] port} +puts $fp {led[1] port} +puts $fp [get_ports { led[1] }] + #puts "\nsignal_* ports quiet" #puts $fp "signal_* ports quiet" #puts $fp [get_ports -quiet signal_*] diff --git a/design_introspection-plugin/tests/trim_name/trim_name.test.cc b/design_introspection-plugin/tests/trim_name/trim_name.test.cc new file mode 100644 index 000000000..5da264194 --- /dev/null +++ b/design_introspection-plugin/tests/trim_name/trim_name.test.cc @@ -0,0 +1,22 @@ +#include "../common/utils.h" + +#include + +TEST(UtilitiesTest, TrimName) +{ + std::string original(" wire_name "); + // trim wire_name from both sides + std::string name(original); + trim(name); + EXPECT_EQ(name, "wire_name"); + + // trim wire_name from left-hand side + name = original; + trim_left(name); + EXPECT_EQ(name, "wire_name "); + + // trim wire_name from right-hand side + name = original; + trim_right(name); + EXPECT_EQ(name, " wire_name"); +} From 8c28ac77f0de9f88d29d47d5edeb63399e8edb88 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 15 Jan 2021 21:14:46 -0800 Subject: [PATCH 261/845] In tests: Use $::env(DESIGN_TOP) where it isn't already. This makes all tests use the same concept for accessing the test verilog file in question. It also makes it possible to run tests from different directories if only DESIGN_TOP is set correctly. In one place, a filename is resolved intended relative to the script, but currently requires the script to be executed in the same directory; make that location independent by reading it relative to [file dirname [info script]] Signed-off-by: Henner Zeller --- design_introspection-plugin/tests/get_cells/get_cells.tcl | 2 +- design_introspection-plugin/tests/get_nets/get_nets.tcl | 2 +- design_introspection-plugin/tests/get_pins/get_pins.tcl | 2 +- design_introspection-plugin/tests/get_ports/get_ports.tcl | 2 +- get_count-plugin/tests/simple/simple.tcl | 2 +- sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl | 2 +- selection-plugin/tests/counter/counter.tcl | 2 +- xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/design_introspection-plugin/tests/get_cells/get_cells.tcl b/design_introspection-plugin/tests/get_cells/get_cells.tcl index 85cc89780..4302b73c5 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.tcl +++ b/design_introspection-plugin/tests/get_cells/get_cells.tcl @@ -3,7 +3,7 @@ plugin -i design_introspection #Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog get_cells.v +read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp diff --git a/design_introspection-plugin/tests/get_nets/get_nets.tcl b/design_introspection-plugin/tests/get_nets/get_nets.tcl index 2d3083afd..93304bf51 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.tcl +++ b/design_introspection-plugin/tests/get_nets/get_nets.tcl @@ -3,7 +3,7 @@ plugin -i design_introspection #Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog get_nets.v +read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp diff --git a/design_introspection-plugin/tests/get_pins/get_pins.tcl b/design_introspection-plugin/tests/get_pins/get_pins.tcl index e352df16e..b2efcdc81 100644 --- a/design_introspection-plugin/tests/get_pins/get_pins.tcl +++ b/design_introspection-plugin/tests/get_pins/get_pins.tcl @@ -3,7 +3,7 @@ plugin -i design_introspection #Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog get_pins.v +read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp diff --git a/design_introspection-plugin/tests/get_ports/get_ports.tcl b/design_introspection-plugin/tests/get_ports/get_ports.tcl index f82305a0f..71df0a0b0 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.tcl +++ b/design_introspection-plugin/tests/get_ports/get_ports.tcl @@ -3,7 +3,7 @@ plugin -i design_introspection #Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog get_ports.v +read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp help get_ports diff --git a/get_count-plugin/tests/simple/simple.tcl b/get_count-plugin/tests/simple/simple.tcl index f933c9443..8e006c8a9 100644 --- a/get_count-plugin/tests/simple/simple.tcl +++ b/get_count-plugin/tests/simple/simple.tcl @@ -1,7 +1,7 @@ yosys plugin -i get_count yosys -import -read_verilog -icells simple.v +read_verilog -icells $::env(DESIGN_TOP).v hierarchy -auto-top set n [get_count -modules my_gate] diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl index 223d9ec12..43445c788 100644 --- a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl @@ -3,7 +3,7 @@ plugin -i sdc #Import the commands from the plugins to the tcl interpreter yosys -import -read_verilog set_clock_groups.v +read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp diff --git a/selection-plugin/tests/counter/counter.tcl b/selection-plugin/tests/counter/counter.tcl index 5475822aa..2411f8f13 100644 --- a/selection-plugin/tests/counter/counter.tcl +++ b/selection-plugin/tests/counter/counter.tcl @@ -27,7 +27,7 @@ proc test_selection { rfh selection } { } } -read_verilog counter.v +read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl index fe1c07c28..e34790923 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl @@ -5,7 +5,7 @@ plugin -i xdc yosys -import read_verilog $::env(DESIGN_TOP).v -read_verilog VexRiscv_Lite.v +read_verilog [file dirname [info script]]/VexRiscv_Lite.v # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp From c613a356f3b5a6e93d2ba64f3568f4e47cef4768 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 15 Jan 2021 22:28:32 -0800 Subject: [PATCH 262/845] Use install instead of cp for install purposes. The install utility will set the proper permissions for the file at hand while cp just sets the permissions at the destination it gets from the original file - which might be totally wrong depending on the users' umask. Signed-off-by: Henner Zeller --- Makefile_plugin.common | 3 +-- xdc-plugin/Makefile | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 4289bd66c..06f2c61fb 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -48,8 +48,7 @@ $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) install_plugin: $(NAME).so - mkdir -p $(PLUGINS_DIR) - cp $< $(PLUGINS_DIR)/$< + install -D $< $(PLUGINS_DIR)/$< test: $(MAKE) -C tests all diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index bd454a1da..0ca7ba354 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -4,7 +4,6 @@ include ../Makefile_plugin.common VERILOG_MODULES = BANK.v install_modules: $(VERILOG_MODULES) - mkdir -p $(PLUGINS_DIR)/fasm_extra_modules/ - cp $< $(PLUGINS_DIR)/fasm_extra_modules/$< + install -D $< $(PLUGINS_DIR)/fasm_extra_modules/$< install: install_modules From d20b3523112cfacb1956c961e4777d881e470887 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Tue, 19 Jan 2021 13:50:27 -0800 Subject: [PATCH 263/845] Load plugins only if the symbol we're interested in is not there yet. In cases the plugins are compiled into yosys already, and no shared objects with the plugins exist, the tests would otherwise fail. This makes it possible to have the tests behave the same whether the plugins are compiled in or not. Signed-off-by: Henner Zeller --- design_introspection-plugin/tests/get_cells/get_cells.tcl | 5 ++--- design_introspection-plugin/tests/get_nets/get_nets.tcl | 5 ++--- design_introspection-plugin/tests/get_pins/get_pins.tcl | 5 ++--- design_introspection-plugin/tests/get_ports/get_ports.tcl | 5 ++--- get_count-plugin/tests/simple/simple.tcl | 3 ++- integrateinv-plugin/tests/fanout/fanout.tcl | 3 ++- integrateinv-plugin/tests/hierarchy/hierarchy.tcl | 3 ++- integrateinv-plugin/tests/multi_bit/multi_bit.tcl | 3 ++- integrateinv-plugin/tests/single_bit/single_bit.tcl | 3 ++- integrateinv-plugin/tests/toplevel/toplevel.tcl | 3 ++- params-plugin/tests/pll/pll.tcl | 6 ++---- sdc-plugin/tests/counter/counter.tcl | 5 ++--- sdc-plugin/tests/counter2/counter2.tcl | 5 ++--- sdc-plugin/tests/get_clocks/get_clocks.tcl | 7 +++---- sdc-plugin/tests/period_check/period_check.tcl | 5 ++--- .../tests/period_format_check/period_format_check.tcl | 5 ++--- sdc-plugin/tests/pll/pll.tcl | 5 ++--- sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl | 5 ++--- sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl | 5 ++--- sdc-plugin/tests/pll_div/pll_div.tcl | 5 ++--- sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl | 5 ++--- sdc-plugin/tests/pll_propagated/pll_propagated.tcl | 5 ++--- sdc-plugin/tests/restore_from_json/restore_from_json.tcl | 6 ++---- sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl | 5 ++--- sdc-plugin/tests/set_false_path/set_false_path.tcl | 5 ++--- sdc-plugin/tests/set_max_delay/set_max_delay.tcl | 5 ++--- sdc-plugin/tests/waveform_check/waveform_check.tcl | 5 ++--- selection-plugin/tests/counter/counter.tcl | 6 ++---- xdc-plugin/tests/counter/counter.tcl | 7 +++---- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl | 7 +++---- xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl | 7 +++---- xdc-plugin/tests/package_pins/package_pins.tcl | 7 +++---- xdc-plugin/tests/port_indexes/port_indexes.tcl | 7 +++---- 33 files changed, 72 insertions(+), 96 deletions(-) diff --git a/design_introspection-plugin/tests/get_cells/get_cells.tcl b/design_introspection-plugin/tests/get_cells/get_cells.tcl index 4302b73c5..c7660a653 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.tcl +++ b/design_introspection-plugin/tests/get_cells/get_cells.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i design_introspection -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs get_cells] == {} } { plugin -i design_introspection } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. diff --git a/design_introspection-plugin/tests/get_nets/get_nets.tcl b/design_introspection-plugin/tests/get_nets/get_nets.tcl index 93304bf51..a3af390d0 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.tcl +++ b/design_introspection-plugin/tests/get_nets/get_nets.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i design_introspection -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs get_nets] == {} } { plugin -i design_introspection } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. diff --git a/design_introspection-plugin/tests/get_pins/get_pins.tcl b/design_introspection-plugin/tests/get_pins/get_pins.tcl index b2efcdc81..515f850e1 100644 --- a/design_introspection-plugin/tests/get_pins/get_pins.tcl +++ b/design_introspection-plugin/tests/get_pins/get_pins.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i design_introspection -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs get_pins] == {} } { plugin -i design_introspection } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. diff --git a/design_introspection-plugin/tests/get_ports/get_ports.tcl b/design_introspection-plugin/tests/get_ports/get_ports.tcl index 71df0a0b0..34e2d1174 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.tcl +++ b/design_introspection-plugin/tests/get_ports/get_ports.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i design_introspection -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs get_ports] == {} } { plugin -i design_introspection } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. diff --git a/get_count-plugin/tests/simple/simple.tcl b/get_count-plugin/tests/simple/simple.tcl index 8e006c8a9..c155de36a 100644 --- a/get_count-plugin/tests/simple/simple.tcl +++ b/get_count-plugin/tests/simple/simple.tcl @@ -1,5 +1,6 @@ -yosys plugin -i get_count yosys -import +if { [info procs get_count] == {} } { plugin -i get_count } +yosys -import # ingest new plugin commands read_verilog -icells $::env(DESIGN_TOP).v hierarchy -auto-top diff --git a/integrateinv-plugin/tests/fanout/fanout.tcl b/integrateinv-plugin/tests/fanout/fanout.tcl index 7ded5c4f1..100e1cc3a 100644 --- a/integrateinv-plugin/tests/fanout/fanout.tcl +++ b/integrateinv-plugin/tests/fanout/fanout.tcl @@ -1,5 +1,6 @@ yosys -import -plugin -i integrateinv +if { [info procs integrateinv] == {} } { plugin -i integrateinv } +yosys -import ;# ingest plugin commands read_verilog -icells $::env(DESIGN_TOP).v hierarchy -check -auto-top diff --git a/integrateinv-plugin/tests/hierarchy/hierarchy.tcl b/integrateinv-plugin/tests/hierarchy/hierarchy.tcl index b0ea51c31..82a59fc4b 100644 --- a/integrateinv-plugin/tests/hierarchy/hierarchy.tcl +++ b/integrateinv-plugin/tests/hierarchy/hierarchy.tcl @@ -1,5 +1,6 @@ yosys -import -plugin -i integrateinv +if { [info procs integrateinv] == {} } { plugin -i integrateinv } +yosys -import ;# ingest plugin commands read_verilog -icells $::env(DESIGN_TOP).v hierarchy -check -auto-top diff --git a/integrateinv-plugin/tests/multi_bit/multi_bit.tcl b/integrateinv-plugin/tests/multi_bit/multi_bit.tcl index 8515ae671..4e6c1ba71 100644 --- a/integrateinv-plugin/tests/multi_bit/multi_bit.tcl +++ b/integrateinv-plugin/tests/multi_bit/multi_bit.tcl @@ -1,5 +1,6 @@ yosys -import -plugin -i integrateinv +if { [info procs integrateinv] == {} } { plugin -i integrateinv } +yosys -import ;# ingest plugin commands read_verilog -icells $::env(DESIGN_TOP).v hierarchy -check -auto-top diff --git a/integrateinv-plugin/tests/single_bit/single_bit.tcl b/integrateinv-plugin/tests/single_bit/single_bit.tcl index caf136e6c..7f1bdbb8a 100644 --- a/integrateinv-plugin/tests/single_bit/single_bit.tcl +++ b/integrateinv-plugin/tests/single_bit/single_bit.tcl @@ -1,5 +1,6 @@ yosys -import -plugin -i integrateinv +if { [info procs integrateinv] == {} } { plugin -i integrateinv } +yosys -import ;# ingest plugin commands read_verilog -icells $::env(DESIGN_TOP).v hierarchy -check -auto-top diff --git a/integrateinv-plugin/tests/toplevel/toplevel.tcl b/integrateinv-plugin/tests/toplevel/toplevel.tcl index ba3e445e0..2595cb41e 100644 --- a/integrateinv-plugin/tests/toplevel/toplevel.tcl +++ b/integrateinv-plugin/tests/toplevel/toplevel.tcl @@ -1,5 +1,6 @@ yosys -import -plugin -i integrateinv +if { [info procs integrateinv] == {} } { plugin -i integrateinv } +yosys -import ;# ingest plugin commands read_verilog -icells $::env(DESIGN_TOP).v hierarchy -check -auto-top diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl index 999abad96..72f37d19e 100644 --- a/params-plugin/tests/pll/pll.tcl +++ b/params-plugin/tests/pll/pll.tcl @@ -1,8 +1,6 @@ yosys -import -plugin -i xdc -plugin -i params -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs getparam] == {} } { plugin -i params } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index 30cc0e43c..d77f6cc7c 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/counter2/counter2.tcl b/sdc-plugin/tests/counter2/counter2.tcl index 809b2b821..8f25f6f88 100644 --- a/sdc-plugin/tests/counter2/counter2.tcl +++ b/sdc-plugin/tests/counter2/counter2.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/get_clocks/get_clocks.tcl b/sdc-plugin/tests/get_clocks/get_clocks.tcl index 6f0eea707..468e1ccc2 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.tcl +++ b/sdc-plugin/tests/get_clocks/get_clocks.tcl @@ -1,8 +1,7 @@ yosys -import -plugin -i sdc -plugin -i design_introspection -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +if { [info procs get_nets] == {} } { plugin -i design_introspection } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/period_check/period_check.tcl b/sdc-plugin/tests/period_check/period_check.tcl index cdfdd2584..74d2b6133 100644 --- a/sdc-plugin/tests/period_check/period_check.tcl +++ b/sdc-plugin/tests/period_check/period_check.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/period_format_check/period_format_check.tcl b/sdc-plugin/tests/period_format_check/period_format_check.tcl index cdfdd2584..74d2b6133 100644 --- a/sdc-plugin/tests/period_format_check/period_format_check.tcl +++ b/sdc-plugin/tests/period_format_check/period_format_check.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl index 09973b838..2a0b1b863 100644 --- a/sdc-plugin/tests/pll/pll.tcl +++ b/sdc-plugin/tests/pll/pll.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl index 09973b838..2a0b1b863 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl index 09973b838..2a0b1b863 100644 --- a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/pll_div/pll_div.tcl b/sdc-plugin/tests/pll_div/pll_div.tcl index 09973b838..2a0b1b863 100644 --- a/sdc-plugin/tests/pll_div/pll_div.tcl +++ b/sdc-plugin/tests/pll_div/pll_div.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl index 09973b838..2a0b1b863 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.tcl b/sdc-plugin/tests/pll_propagated/pll_propagated.tcl index a321aeb97..c21422dc6 100644 --- a/sdc-plugin/tests/pll_propagated/pll_propagated.tcl +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl index 288419b3c..07539010e 100644 --- a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl +++ b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl @@ -1,8 +1,6 @@ yosys -import - -plugin -i sdc - -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v synth_xilinx diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl index 43445c788..b855c2e91 100644 --- a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. diff --git a/sdc-plugin/tests/set_false_path/set_false_path.tcl b/sdc-plugin/tests/set_false_path/set_false_path.tcl index dd510f325..1a45ca5ef 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.tcl +++ b/sdc-plugin/tests/set_false_path/set_false_path.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl index 6b7f23dfd..77bc0a023 100644 --- a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # Some of symbiflow expects eblifs with only one module. diff --git a/sdc-plugin/tests/waveform_check/waveform_check.tcl b/sdc-plugin/tests/waveform_check/waveform_check.tcl index cdfdd2584..74d2b6133 100644 --- a/sdc-plugin/tests/waveform_check/waveform_check.tcl +++ b/sdc-plugin/tests/waveform_check/waveform_check.tcl @@ -1,7 +1,6 @@ yosys -import -plugin -i sdc -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v diff --git a/selection-plugin/tests/counter/counter.tcl b/selection-plugin/tests/counter/counter.tcl index 2411f8f13..f2caee590 100644 --- a/selection-plugin/tests/counter/counter.tcl +++ b/selection-plugin/tests/counter/counter.tcl @@ -1,8 +1,6 @@ yosys -import -plugin -i selection - -# Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs selection_to_tcl_list] == {} } { plugin -i selection } +yosys -import ;# ingest plugin commands proc selection_to_tcl_list_through_file { selection } { set file_name "[pid].txt" diff --git a/xdc-plugin/tests/counter/counter.tcl b/xdc-plugin/tests/counter/counter.tcl index b6ef30fdc..0256fc675 100644 --- a/xdc-plugin/tests/counter/counter.tcl +++ b/xdc-plugin/tests/counter/counter.tcl @@ -1,8 +1,7 @@ yosys -import -plugin -i design_introspection -plugin -i xdc -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs get_ports] == {} } { plugin -i design_introspection } +if { [info procs read_xdc] == {} } { plugin -i xdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl index b6ef30fdc..0256fc675 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -1,8 +1,7 @@ yosys -import -plugin -i design_introspection -plugin -i xdc -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs get_ports] == {} } { plugin -i design_introspection } +if { [info procs read_xdc] == {} } { plugin -i xdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl index e34790923..a0bd85b53 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl @@ -1,8 +1,7 @@ yosys -import -plugin -i design_introspection -plugin -i xdc -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs get_ports] == {} } { plugin -i design_introspection } +if { [info procs read_xdc] == {} } { plugin -i xdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog [file dirname [info script]]/VexRiscv_Lite.v diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/xdc-plugin/tests/package_pins/package_pins.tcl index 2e0352e93..4f5739940 100644 --- a/xdc-plugin/tests/package_pins/package_pins.tcl +++ b/xdc-plugin/tests/package_pins/package_pins.tcl @@ -1,8 +1,7 @@ yosys -import -plugin -i design_introspection -plugin -i xdc -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs get_ports] == {} } { plugin -i design_introspection } +if { [info procs read_xdc] == {} } { plugin -i xdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. diff --git a/xdc-plugin/tests/port_indexes/port_indexes.tcl b/xdc-plugin/tests/port_indexes/port_indexes.tcl index e7f8e2961..44cc45afe 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.tcl +++ b/xdc-plugin/tests/port_indexes/port_indexes.tcl @@ -1,8 +1,7 @@ yosys -import -plugin -i design_introspection -plugin -i xdc -#Import the commands from the plugins to the tcl interpreter -yosys -import +if { [info procs get_ports] == {} } { plugin -i design_introspection } +if { [info procs read_xdc] == {} } { plugin -i xdc } +yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v From 17cbe272a8b09faf9d835eaedb7359b8e4f0a727 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 22 Jan 2021 13:07:19 -0800 Subject: [PATCH 264/845] Make output path for test outputs configurable. In preparation for CI's and other test environments in which the test outputs should be stored out-of-tree. The new file test-utils.tcl provides a function that determines the test output path (currently just by concatenating the filename with a path from the environment). The Makefile_test.common sources this utils file and the corresponding test file. Since this adds a convenient test-utils.tcl file, this might also be useful to put some testing boilerplate functionality there in the future. Signed-off-by: Henner Zeller --- Makefile_test.common | 4 +++- .../tests/get_cells/get_cells.tcl | 2 +- .../tests/get_nets/get_nets.tcl | 2 +- .../tests/get_pins/get_pins.tcl | 2 +- .../tests/get_ports/get_ports.tcl | 2 +- params-plugin/tests/pll/pll.tcl | 10 +++++----- sdc-plugin/tests/counter/counter.tcl | 6 +++--- sdc-plugin/tests/counter2/counter2.tcl | 4 ++-- sdc-plugin/tests/get_clocks/get_clocks.tcl | 2 +- sdc-plugin/tests/period_check/period_check.tcl | 2 +- .../tests/period_format_check/period_format_check.tcl | 2 +- sdc-plugin/tests/pll/pll.tcl | 2 +- sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl | 2 +- .../tests/pll_dangling_wires/pll_dangling_wires.tcl | 2 +- sdc-plugin/tests/pll_div/pll_div.tcl | 2 +- sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl | 2 +- sdc-plugin/tests/pll_propagated/pll_propagated.tcl | 2 +- .../tests/restore_from_json/restore_from_json.tcl | 8 ++++---- sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl | 2 +- sdc-plugin/tests/set_false_path/set_false_path.tcl | 2 +- sdc-plugin/tests/set_max_delay/set_max_delay.tcl | 2 +- sdc-plugin/tests/waveform_check/waveform_check.tcl | 2 +- selection-plugin/tests/counter/counter.tcl | 4 ++-- test-utils/test-utils.tcl | 7 +++++++ xdc-plugin/tests/counter/counter.tcl | 4 ++-- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl | 4 ++-- .../tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl | 4 ++-- xdc-plugin/tests/package_pins/package_pins.tcl | 4 ++-- xdc-plugin/tests/port_indexes/port_indexes.tcl | 6 +++--- 29 files changed, 54 insertions(+), 45 deletions(-) create mode 100644 test-utils/test-utils.tcl diff --git a/Makefile_test.common b/Makefile_test.common index ae874eb68..3c9d0b391 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -17,6 +17,7 @@ CXX = $(shell yosys-config --cxx) CXXFLAGS = $(shell yosys-config --cxxflags) -I.. -I$(GTEST_DIR)/include LDLIBS = $(shell yosys-config --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread LDFLAGS = $(shell yosys-config --ldflags) +TEST_UTILS=../../../test-utils/test-utils.tcl define test_tpl = $(1): $(1)/ok @@ -37,7 +38,8 @@ $(1)/ok: $(1)/$(1).v @set +e; \ cd $(1); \ DESIGN_TOP=$(1) \ - yosys -c $(1).tcl -q -l $(1).log; \ + TEST_OUTPUT_PREFIX=./ \ + yosys -c <(echo -e "source $(TEST_UTILS)\nsource $(1).tcl") -q -l $(1).log; \ RETVAL=$$$$?; \ if [ ! -z "$$($(1)_negative)" ] && [ $$($(1)_negative) -eq 1 ]; then \ if [ $$$$RETVAL -ne 0 ]; then \ diff --git a/design_introspection-plugin/tests/get_cells/get_cells.tcl b/design_introspection-plugin/tests/get_cells/get_cells.tcl index c7660a653..047b15019 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.tcl +++ b/design_introspection-plugin/tests/get_cells/get_cells.tcl @@ -7,7 +7,7 @@ read_verilog $::env(DESIGN_TOP).v synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -set fp [open "get_cells.txt" "w"] +set fp [open [test_output_path "get_cells.txt"] "w"] puts "\n*inter* cells quiet" puts $fp "\n*inter* cells quiet" diff --git a/design_introspection-plugin/tests/get_nets/get_nets.tcl b/design_introspection-plugin/tests/get_nets/get_nets.tcl index a3af390d0..6ef242623 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.tcl +++ b/design_introspection-plugin/tests/get_nets/get_nets.tcl @@ -7,7 +7,7 @@ read_verilog $::env(DESIGN_TOP).v synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -set fp [open "get_nets.txt" "w"] +set fp [open [test_output_path "get_nets.txt"] "w"] puts "\n*inter* nets quiet" puts $fp "*inter* nets quiet" diff --git a/design_introspection-plugin/tests/get_pins/get_pins.tcl b/design_introspection-plugin/tests/get_pins/get_pins.tcl index 515f850e1..d6a64fe31 100644 --- a/design_introspection-plugin/tests/get_pins/get_pins.tcl +++ b/design_introspection-plugin/tests/get_pins/get_pins.tcl @@ -7,7 +7,7 @@ read_verilog $::env(DESIGN_TOP).v synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -set fp [open "get_pins.txt" "w"] +set fp [open [test_output_path "get_pins.txt"] "w"] puts "\n*inter* pins quiet" puts $fp "\n*inter* pins quiet" diff --git a/design_introspection-plugin/tests/get_ports/get_ports.tcl b/design_introspection-plugin/tests/get_ports/get_ports.tcl index 34e2d1174..47d8fced9 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.tcl +++ b/design_introspection-plugin/tests/get_ports/get_ports.tcl @@ -7,7 +7,7 @@ read_verilog $::env(DESIGN_TOP).v synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp help get_ports -set fp [open "get_ports.txt" "w"] +set fp [open [test_output_path "get_ports.txt"] "w"] puts "\n signal_p port" puts $fp "signal_p port" diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl index 72f37d19e..86eb1b111 100644 --- a/params-plugin/tests/pll/pll.tcl +++ b/params-plugin/tests/pll/pll.tcl @@ -13,7 +13,7 @@ set phase [getparam CLKOUT2_PHASE top/PLLE2_ADV_0 top/PLLE2_ADV] if {[llength $phase] != 2} { error "Getparam should return a list with 2 elements" } -set fp [open "pll.txt" "w"] +set fp [open [test_output_path "pll.txt"] "w"] puts -nonewline $fp "Phase before: " if {$phase == $reference_phase} { puts $fp "PASS" @@ -39,8 +39,8 @@ close $fp synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -run prepare:check # Map Xilinx tech library to 7-series VPR tech library. -read_verilog -lib ./techmaps/cells_sim.v -techmap -map ./techmaps/cells_map.v +read_verilog -lib [file dirname $::env(DESIGN_TOP)]/techmaps/cells_sim.v +techmap -map [file dirname $::env(DESIGN_TOP)]/techmaps/cells_map.v # opt_expr -undriven makes sure all nets are driven, if only by the $undef # net. @@ -51,5 +51,5 @@ setundef -zero -params stat # Write the design in JSON format. -write_json $::env(DESIGN_TOP).json -write_blif -attr -param -cname -conn pll.eblif +write_json [test_output_path "pll.json"] +write_blif -attr -param -cname -conn [test_output_path "pll.eblif"] diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index d77f6cc7c..b8cd19dec 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -16,11 +16,11 @@ read_sdc $::env(DESIGN_TOP).input.sdc propagate_clocks # Write the clocks to file -set fh [open $::env(DESIGN_TOP).txt w] +set fh [open [test_output_path "counter.txt"] w] puts $fh [get_clocks] puts $fh [get_clocks -include_generated_clocks] close $fh # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc -write_json $::env(DESIGN_TOP).json +write_sdc [test_output_path "counter.sdc"] +write_json [test_output_path "counter.json"] diff --git a/sdc-plugin/tests/counter2/counter2.tcl b/sdc-plugin/tests/counter2/counter2.tcl index 8f25f6f88..5b01c4164 100644 --- a/sdc-plugin/tests/counter2/counter2.tcl +++ b/sdc-plugin/tests/counter2/counter2.tcl @@ -16,10 +16,10 @@ read_sdc $::env(DESIGN_TOP).input.sdc propagate_clocks # Write the clocks to file -set fh [open $::env(DESIGN_TOP).txt w] +set fh [open [test_output_path "counter2.txt"] w] set clocks [get_clocks] puts $fh $clocks close $fh # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "counter2.sdc"] diff --git a/sdc-plugin/tests/get_clocks/get_clocks.tcl b/sdc-plugin/tests/get_clocks/get_clocks.tcl index 468e1ccc2..3dd8e239f 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.tcl +++ b/sdc-plugin/tests/get_clocks/get_clocks.tcl @@ -18,7 +18,7 @@ read_sdc $::env(DESIGN_TOP).input.sdc propagate_clocks # Write the clocks to file -set fh [open $::env(DESIGN_TOP).txt w] +set fh [open [test_output_path "get_clocks.txt"] w] puts $fh [get_clocks] diff --git a/sdc-plugin/tests/period_check/period_check.tcl b/sdc-plugin/tests/period_check/period_check.tcl index 74d2b6133..01101aed8 100644 --- a/sdc-plugin/tests/period_check/period_check.tcl +++ b/sdc-plugin/tests/period_check/period_check.tcl @@ -13,4 +13,4 @@ synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "period_check.sdc"] diff --git a/sdc-plugin/tests/period_format_check/period_format_check.tcl b/sdc-plugin/tests/period_format_check/period_format_check.tcl index 74d2b6133..ea0ea3146 100644 --- a/sdc-plugin/tests/period_format_check/period_format_check.tcl +++ b/sdc-plugin/tests/period_format_check/period_format_check.tcl @@ -13,4 +13,4 @@ synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "period_format_check.sdc"] diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl index 2a0b1b863..7db8970f4 100644 --- a/sdc-plugin/tests/pll/pll.tcl +++ b/sdc-plugin/tests/pll/pll.tcl @@ -17,4 +17,4 @@ read_sdc $::env(DESIGN_TOP).input.sdc propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "pll.sdc"] diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl index 2a0b1b863..b877a2d7f 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl @@ -17,4 +17,4 @@ read_sdc $::env(DESIGN_TOP).input.sdc propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "pll_approx_equal.sdc"] diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl index 2a0b1b863..aa9d35e42 100644 --- a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl @@ -17,4 +17,4 @@ read_sdc $::env(DESIGN_TOP).input.sdc propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "pll_dangling_wires.sdc"] diff --git a/sdc-plugin/tests/pll_div/pll_div.tcl b/sdc-plugin/tests/pll_div/pll_div.tcl index 2a0b1b863..bdce1f392 100644 --- a/sdc-plugin/tests/pll_div/pll_div.tcl +++ b/sdc-plugin/tests/pll_div/pll_div.tcl @@ -17,4 +17,4 @@ read_sdc $::env(DESIGN_TOP).input.sdc propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "pll_div.sdc"] diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl index 2a0b1b863..ceef986e3 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl @@ -17,4 +17,4 @@ read_sdc $::env(DESIGN_TOP).input.sdc propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "pll_fbout_phase.sdc"] diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.tcl b/sdc-plugin/tests/pll_propagated/pll_propagated.tcl index c21422dc6..46b8f8af8 100644 --- a/sdc-plugin/tests/pll_propagated/pll_propagated.tcl +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.tcl @@ -17,4 +17,4 @@ read_sdc $::env(DESIGN_TOP).input.sdc propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc -include_propagated_clocks $::env(DESIGN_TOP).sdc +write_sdc -include_propagated_clocks [test_output_path "pll_propagated.sdc"] diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl index 07539010e..beb58b348 100644 --- a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl +++ b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl @@ -6,9 +6,9 @@ read_verilog $::env(DESIGN_TOP).v synth_xilinx create_clock -period 10 clk propagate_clocks -write_sdc $::env(DESIGN_TOP)_1.sdc -write_json $::env(DESIGN_TOP).json +write_sdc [test_output_path "restore_from_json_1.sdc"] +write_json [test_output_path "restore_from_json.json"] design -push -read_json $::env(DESIGN_TOP).json -write_sdc $::env(DESIGN_TOP)_2.sdc +read_json [test_output_path "restore_from_json.json"] +write_sdc [test_output_path "restore_from_json_2.sdc"] diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl index b855c2e91..cefcaca27 100644 --- a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl @@ -12,4 +12,4 @@ set_clock_groups -group clk5 clk6 -logically_exclusive set_clock_groups -group clk7 clk8 -physically_exclusive -group clk9 clk10 set_clock_groups -quiet -group clk11 clk12 -asynchronous -group clk13 clk14 -write_sdc set_clock_groups.sdc +write_sdc [test_output_path "set_clock_groups.sdc"] diff --git a/sdc-plugin/tests/set_false_path/set_false_path.tcl b/sdc-plugin/tests/set_false_path/set_false_path.tcl index 1a45ca5ef..29c017817 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.tcl +++ b/sdc-plugin/tests/set_false_path/set_false_path.tcl @@ -18,4 +18,4 @@ set_false_path -from clk -to bottom_inst.I # -through bottom_inst/I set_false_path -through bottom_inst.I -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "set_false_path.sdc"] diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl index 77bc0a023..92d4c55e3 100644 --- a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl @@ -15,4 +15,4 @@ set_max_delay 2 -quiet -from clk # -from clk to bottom_inst/I set_max_delay 3 -from clk -to bottom_inst.I -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "set_max_delay.sdc"] diff --git a/sdc-plugin/tests/waveform_check/waveform_check.tcl b/sdc-plugin/tests/waveform_check/waveform_check.tcl index 74d2b6133..63bbe295f 100644 --- a/sdc-plugin/tests/waveform_check/waveform_check.tcl +++ b/sdc-plugin/tests/waveform_check/waveform_check.tcl @@ -13,4 +13,4 @@ synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check propagate_clocks # Write out the SDC file after the clock propagation step -write_sdc $::env(DESIGN_TOP).sdc +write_sdc [test_output_path "waveform_check.sdc"] diff --git a/selection-plugin/tests/counter/counter.tcl b/selection-plugin/tests/counter/counter.tcl index f2caee590..0361a844a 100644 --- a/selection-plugin/tests/counter/counter.tcl +++ b/selection-plugin/tests/counter/counter.tcl @@ -3,7 +3,7 @@ if { [info procs selection_to_tcl_list] == {} } { plugin -i selection } yosys -import ;# ingest plugin commands proc selection_to_tcl_list_through_file { selection } { - set file_name "[pid].txt" + set file_name [test_output_path "[pid].txt"] select $selection -write $file_name set fh [open $file_name r] set result [list] @@ -31,7 +31,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Test the selection command and write results to file -set rfh [open counter.txt w] +set rfh [open [test_output_path "counter.txt"] w] set selection_tests [list "t:*" "w:*" "*"] foreach test $selection_tests { diff --git a/test-utils/test-utils.tcl b/test-utils/test-utils.tcl new file mode 100644 index 000000000..cc215ae88 --- /dev/null +++ b/test-utils/test-utils.tcl @@ -0,0 +1,7 @@ +# Utility functions to be used in tests. + +# Return path where the test output file "filename" +# is to be written. +proc test_output_path { filename } { + return "$::env(TEST_OUTPUT_PREFIX)${filename}" +} diff --git a/xdc-plugin/tests/counter/counter.tcl b/xdc-plugin/tests/counter/counter.tcl index 0256fc675..1eca3664e 100644 --- a/xdc-plugin/tests/counter/counter.tcl +++ b/xdc-plugin/tests/counter/counter.tcl @@ -10,7 +10,7 @@ read_verilog $::env(DESIGN_TOP).v synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints -read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc # Write the design in JSON format. -write_json $::env(DESIGN_TOP).json +write_json [test_output_path "counter.json"] diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl index 0256fc675..fdbe8968d 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -10,7 +10,7 @@ read_verilog $::env(DESIGN_TOP).v synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints -read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc # Write the design in JSON format. -write_json $::env(DESIGN_TOP).json +write_json [test_output_path "io_loc_pairs.json"] diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl index a0bd85b53..5bdef635c 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl @@ -10,7 +10,7 @@ read_verilog [file dirname [info script]]/VexRiscv_Lite.v synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints -read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc # Write the design in JSON format. -write_json $::env(DESIGN_TOP).json +write_json [test_output_path "minilitex_ddr_arty.json"] diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/xdc-plugin/tests/package_pins/package_pins.tcl index 4f5739940..796b5ede2 100644 --- a/xdc-plugin/tests/package_pins/package_pins.tcl +++ b/xdc-plugin/tests/package_pins/package_pins.tcl @@ -9,7 +9,7 @@ read_verilog $::env(DESIGN_TOP).v synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints -read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc # Write the design in JSON format. -write_json $::env(DESIGN_TOP).json +write_json [test_output_path "package_pins.json"] diff --git a/xdc-plugin/tests/port_indexes/port_indexes.tcl b/xdc-plugin/tests/port_indexes/port_indexes.tcl index 44cc45afe..ba7d15ce4 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.tcl +++ b/xdc-plugin/tests/port_indexes/port_indexes.tcl @@ -13,7 +13,7 @@ if {[info procs unknown] != ""} { rename unknown "" } proc unknown args {return "'unknown' proc command handler"} -set fp [open "port_indexes.txt" "w"] +set fp [open [test_output_path "port_indexes.txt"] "w"] if {[catch {invalid command} result]} { close $fp error "Command should be handled by the 'unknown' proc" @@ -21,7 +21,7 @@ if {[catch {invalid command} result]} { puts $fp $result } #Read the design constraints -read_xdc -part_json ../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc if {[catch {invalid command} result]} { close $fp @@ -32,4 +32,4 @@ if {[catch {invalid command} result]} { close $fp # Write the design in JSON format. -write_json $::env(DESIGN_TOP).json +write_json [test_output_path "port_indexes.json"] From 27b355124309312f0316be74c7ba7d610c7643f4 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 22 Jan 2021 14:14:43 -0800 Subject: [PATCH 265/845] Make makefile work for shells that don't support <() Signed-off-by: Henner Zeller --- Makefile_test.common | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile_test.common b/Makefile_test.common index 3c9d0b391..b3e086fa2 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -37,10 +37,11 @@ $(1)/ok: $(1)/$(1).v @echo "Running test $(1)" @set +e; \ cd $(1); \ - DESIGN_TOP=$(1) \ - TEST_OUTPUT_PREFIX=./ \ - yosys -c <(echo -e "source $(TEST_UTILS)\nsource $(1).tcl") -q -l $(1).log; \ + echo -e "source $(TEST_UTILS)\nsource $(1).tcl" > run-$(1).tcl ;\ + DESIGN_TOP=$(1) TEST_OUTPUT_PREFIX=./ \ + yosys -c "run-$(1).tcl" -q -l $(1).log; \ RETVAL=$$$$?; \ + rm -f run-$(1).tcl; \ if [ ! -z "$$($(1)_negative)" ] && [ $$($(1)_negative) -eq 1 ]; then \ if [ $$$$RETVAL -ne 0 ]; then \ echo "Negative test $(1) PASSED"; \ From 0b442a7d190f9c7fb3dfe7703075b5a14b702ff9 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 22 Jan 2021 14:34:43 -0800 Subject: [PATCH 266/845] Make makefile work with 'echo' implementation that doesn't understand -e Signed-off-by: Henner Zeller --- Makefile_test.common | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile_test.common b/Makefile_test.common index b3e086fa2..2b6fb9e98 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -37,7 +37,8 @@ $(1)/ok: $(1)/$(1).v @echo "Running test $(1)" @set +e; \ cd $(1); \ - echo -e "source $(TEST_UTILS)\nsource $(1).tcl" > run-$(1).tcl ;\ + echo "source $(TEST_UTILS)" > run-$(1).tcl ;\ + echo "source $(1).tcl" >> run-$(1).tcl ;\ DESIGN_TOP=$(1) TEST_OUTPUT_PREFIX=./ \ yosys -c "run-$(1).tcl" -q -l $(1).log; \ RETVAL=$$$$?; \ From 1f6b57b51044c8e522ccdcb1f501e59e01210077 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 2 Feb 2021 13:57:50 +0100 Subject: [PATCH 267/845] Add list of plugins with short description Signed-off-by: Tomasz Michalak --- README.md | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/README.md b/README.md index 6e9650a16..28f631850 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,99 @@ This repository contains plugins for [Yosys](https://github.com/YosysHQ/yosys.git) developed as [part of the SymbiFlow project](https://symbiflow.github.io). +## List of plugins +1. [Design introspection](#design-introspection-plugin) +2. [FASM](#fasm-plugin) +3. [Get count](#get-count-plugin) +4. [Integrate inverters](#integrate-inverters-plugin) +5. [Parameters](#parameters-plugin) +6. [QL IOBs](#quicklogic-iob-plugin) +7. [SDC](#sdc-plugin) +8. [Selection](#selection-plugin) +9. [XDC](#xdc-plugin) +## Summary + +### Design introspection plugin + +Adds several commands that allow for collecting information about cells, nets, pins and ports in the design. + +Following commands are added with the plugin: +* get_cells +* get_nets +* get_pins +* get_ports + +### FASM plugin + +Writes out the design's [fasm features](https://symbiflow.readthedocs.io/en/latest/fasm/docs/specification.html) based on the parameter annotations on a design cell. + +The plugin adds the following command: +* write_fasm + +### Get count plugin + +Returns the count of selected objects to the TCL interpreter. +The objects can be of various types, such as modules, cells or wires. + +The plugin adds the following command: +* get_count + +### Integrate inverters plugin + +Implements a pass that integrates inverters into cells that have ports with the 'invertible_pin' attribute set. + +The plugin adds the following command: +* integrateinv + +### Parameters plugin + +Reads the specified parameter on a selected object. + +The plugin adds the following command: +* getparam + +### QuickLogic IOB plugin + +[QL IOB plugin](./ql-iob-plugin/) annotates IO buffer cells with information from IO placement constraints. + +The plugin adds the following command: +* quicklogic_iob + +### SDC plugin + +Reads Standard Delay Format (SDC) constraints, propagates these constraints across the design and writes out the complete SDC information. + +The plugin adds the following commands: +* read_sdc +* write_sdc +* create_clock +* get_clocks +* propagate_clocks +* set_false_path +* set_max_delay +* set_clock_groups + +### Selection plugin + +Extracts the current selection to TCL list + +The plugin adds the following command: +* selection_to_tcl_list + +### XDC plugin + +Reads Xilinx Design Constraints (XDC) files and annotates the specified cells parameters with properties such as: +* INTERNAL_VREF +* IOSTANDARD +* SLEW +* DRIVE +* IN_TERM +* LOC +* PACKAGE_PIN + +The plugin adds the following commands: +* read_xdc +* get_iobanks +* set_property +* get_bank_tiles From e70dcfb81cdc01c29047dd77c175f6fd5c2a78d6 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 4 Feb 2021 13:07:00 -0800 Subject: [PATCH 268/845] Use more optimal call to find_last_of(). Signed-off-by: Henner Zeller --- design_introspection-plugin/get_pins.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc index e94e3ae9b..97a256f50 100644 --- a/design_introspection-plugin/get_pins.cc +++ b/design_introspection-plugin/get_pins.cc @@ -35,7 +35,7 @@ GetPins::SelectionObjects GetPins::ExtractSelection(RTLIL::Design *design, const { SelectionObjects selected_objects; for (auto obj : args.selection_objects) { - size_t port_separator = obj.find_last_of("/"); + size_t port_separator = obj.find_last_of('/'); std::string cell = obj.substr(0, port_separator); std::string port = obj.substr(port_separator + 1); SelectionObjects selection{RTLIL::unescape_id(design->top_module()->name) + "/" + SelectionType() + ":" + cell}; From edf97b6b4ecb5e70cdeb86cad31ff5498c2d137e Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 4 Feb 2021 13:15:09 -0800 Subject: [PATCH 269/845] Add .editorconfig, to help contributors honor coding style. Setting the indentation for tcl and cc to 4 characters which is mostly what is happening in this repository. There are a few tabs here and there, but they will vanish with changes happening there The .editorconfig file is supported by a vast number of IDEs and editors, so hopefully this will make it simpler for would-be contributors. Signed-off-by: Henner Zeller --- .editorconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..3d5437b5d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# Editor config file, see http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{h,cc,tcl}] +indent_style = space +indent_size = 4 From 5fd261f07dae7cfe8a50a1e2fab6f0fe9c9846d1 Mon Sep 17 00:00:00 2001 From: Dan Ravensloft Date: Mon, 1 Feb 2021 15:58:40 +0000 Subject: [PATCH 270/845] SDC: use fastest clock as ABC9 delay target Signed-off-by: Dan Ravensloft --- sdc-plugin/clocks.cc | 20 ++++++++++++++++++++ sdc-plugin/clocks.h | 1 + sdc-plugin/sdc.cc | 2 ++ sdc-plugin/tests/Makefile | 5 ++++- sdc-plugin/tests/abc9/abc9.sdc | 3 +++ sdc-plugin/tests/abc9/abc9.tcl | 12 ++++++++++++ sdc-plugin/tests/abc9/abc9.v | 15 +++++++++++++++ 7 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/abc9/abc9.sdc create mode 100644 sdc-plugin/tests/abc9/abc9.tcl create mode 100644 sdc-plugin/tests/abc9/abc9.v diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 6dbb9627b..5b6070063 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -140,3 +140,23 @@ const std::map Clocks::GetClocks(RTLIL::Design *desi } return clock_wires; } + +void Clocks::UpdateAbc9DelayTarget(RTLIL::Design *design) +{ + std::map clock_wires = Clocks::GetClocks(design); + + for (auto &clock_wire : clock_wires) { + auto &wire = clock_wire.second; + float period = Clock::Period(wire); + + // Set the ABC9 delay to the shortest clock period in the design. + // + // By convention, delays in Yosys are in picoseconds, but ABC9 has + // no information on interconnect delay, so target half the specified + // clock period to give timing slack; otherwise ABC9 may produce a + // mapping that cannot meet the specified clock. + int abc9_delay = design->scratchpad_get_int("abc9.D", INT32_MAX); + int period_ps = period * 1000.0 / 2.0; + design->scratchpad_set_int("abc9.D", std::min(abc9_delay, period_ps)); + } +} diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index b11d1c09e..f56529917 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -64,6 +64,7 @@ class Clocks { public: static const std::map GetClocks(RTLIL::Design *design); + static void UpdateAbc9DelayTarget(RTLIL::Design *design); }; #endif // _CLOCKS_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 9f92b483e..eafb8949c 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -323,6 +323,8 @@ struct PropagateClocksCmd : public Pass { for (auto &pass : passes) { pass->Run(); } + + Clocks::UpdateAbc9DelayTarget(design); } }; diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 503c5421a..1361f8e2c 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,3 +1,4 @@ +# abc9 - test that abc9.D is correctly set after importing a clock. # counter, counter2, pll - test buffer and clock divider propagation # set_false_path - test the set_false_path command # set_max_delay - test the set_max_delay command @@ -7,7 +8,8 @@ # waveform_check - test if the WAVEFORM attribute value is correct on wire # period_format_check - test if PERIOD attribute value is correct on wire -TESTS = counter \ +TESTS = abc9 \ + counter \ counter2 \ pll \ pll_div \ @@ -28,6 +30,7 @@ UNIT_TESTS = escaping include $(shell pwd)/../../Makefile_test.common +abc9_verify = true counter_verify = $(call diff_test,counter,sdc) && $(call diff_test,counter,txt) counter2_verify = $(call diff_test,counter2,sdc) && $(call diff_test,counter2,txt) pll_verify = $(call diff_test,pll,sdc) diff --git a/sdc-plugin/tests/abc9/abc9.sdc b/sdc-plugin/tests/abc9/abc9.sdc new file mode 100644 index 000000000..0a192c363 --- /dev/null +++ b/sdc-plugin/tests/abc9/abc9.sdc @@ -0,0 +1,3 @@ +create_clock -period 10 clk1 +create_clock -period 20 clk2 +propagate_clocks diff --git a/sdc-plugin/tests/abc9/abc9.tcl b/sdc-plugin/tests/abc9/abc9.tcl new file mode 100644 index 000000000..22766a167 --- /dev/null +++ b/sdc-plugin/tests/abc9/abc9.tcl @@ -0,0 +1,12 @@ +yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands + +# ensure abc9.D is unset +scratchpad -assert-unset abc9.D + +read_verilog abc9.v +read_sdc abc9.sdc + +# check that abc9.D was set to half the fastest clock period in the design +scratchpad -assert abc9.D 5000 diff --git a/sdc-plugin/tests/abc9/abc9.v b/sdc-plugin/tests/abc9/abc9.v new file mode 100644 index 000000000..5b73e5560 --- /dev/null +++ b/sdc-plugin/tests/abc9/abc9.v @@ -0,0 +1,15 @@ +module top(input clk1, clk2, output led1, led2); + +reg [15:0] counter1 = 0; +reg [15:0] counter2 = 0; + +assign led1 = counter1[15]; +assign led2 = counter2[15]; + +always @(posedge clk1) + counter1 <= counter1 + 1; + +always @(posedge clk2) + counter2 <= counter2 + 1; + +endmodule From 48b95dde27c993cbc4f8ece906f19183e1355fd4 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 16 Feb 2021 10:43:07 +0100 Subject: [PATCH 271/845] SDC: abc9: Fix test Signed-off-by: Tomasz Michalak --- sdc-plugin/tests/abc9/{abc9.sdc => abc9.input.sdc} | 0 sdc-plugin/tests/abc9/abc9.tcl | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename sdc-plugin/tests/abc9/{abc9.sdc => abc9.input.sdc} (100%) diff --git a/sdc-plugin/tests/abc9/abc9.sdc b/sdc-plugin/tests/abc9/abc9.input.sdc similarity index 100% rename from sdc-plugin/tests/abc9/abc9.sdc rename to sdc-plugin/tests/abc9/abc9.input.sdc diff --git a/sdc-plugin/tests/abc9/abc9.tcl b/sdc-plugin/tests/abc9/abc9.tcl index 22766a167..ba7133469 100644 --- a/sdc-plugin/tests/abc9/abc9.tcl +++ b/sdc-plugin/tests/abc9/abc9.tcl @@ -5,8 +5,8 @@ yosys -import ;# ingest plugin commands # ensure abc9.D is unset scratchpad -assert-unset abc9.D -read_verilog abc9.v -read_sdc abc9.sdc +read_verilog $::env(DESIGN_TOP).v +read_sdc $::env(DESIGN_TOP).input.sdc # check that abc9.D was set to half the fastest clock period in the design scratchpad -assert abc9.D 5000 From 04f8ca161b87c00ed9e7f6b5035f0fec5d5cf41f Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 24 Feb 2021 11:46:28 -0800 Subject: [PATCH 272/845] Fix non-constant assignemnts to localparams. Signed-off-by: Henner Zeller --- params-plugin/tests/pll/techmaps/cells_map.v | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/params-plugin/tests/pll/techmaps/cells_map.v b/params-plugin/tests/pll/techmaps/cells_map.v index 772f5889c..f868665e5 100644 --- a/params-plugin/tests/pll/techmaps/cells_map.v +++ b/params-plugin/tests/pll/techmaps/cells_map.v @@ -560,36 +560,35 @@ output [15:0] DO localparam CLKOUT5_REGS = pll_clkregs(CLKOUT5_DIVIDE, CLKOUT5_DUTY_CYCLE, CLKOUT5_PHASE); // Handle inputs that should have certain logic levels when left unconnected + localparam INV_CLKINSEL = (_TECHMAP_CONSTMSK_CLKINSEL_ == 1) ? !_TECHMAP_CONSTVAL_CLKINSEL_ : + (_TECHMAP_CONSTVAL_CLKINSEL_ == 0) ? IS_CLKINSEL_INVERTED : + IS_CLKINSEL_INVERTED; generate if (_TECHMAP_CONSTMSK_CLKINSEL_ == 1) begin - localparam INV_CLKINSEL = !_TECHMAP_CONSTVAL_CLKINSEL_; wire clkinsel = 1'b1; end else if (_TECHMAP_CONSTVAL_CLKINSEL_ == 0) begin - localparam INV_CLKINSEL = IS_CLKINSEL_INVERTED; wire clkinsel = 1'b1; end else begin - localparam INV_CLKINSEL = IS_CLKINSEL_INVERTED; wire clkinsel = CLKINSEL; end endgenerate + localparam INV_PWRDWN = (_TECHMAP_CONSTMSK_PWRDWN_ == 1) ? !_TECHMAP_CONSTVAL_PWRDWN_ : + (_TECHMAP_CONSTVAL_PWRDWN_ == 0) ? ~IS_PWRDWN_INVERTED : + IS_PWRDWN_INVERTED; generate if (_TECHMAP_CONSTMSK_PWRDWN_ == 1) begin - localparam INV_PWRDWN = !_TECHMAP_CONSTVAL_PWRDWN_; wire pwrdwn = 1'b1; end else if (_TECHMAP_CONSTVAL_PWRDWN_ == 0) begin - localparam INV_PWRDWN = ~IS_PWRDWN_INVERTED; wire pwrdwn = 1'b1; end else begin - localparam INV_PWRDWN = IS_PWRDWN_INVERTED; wire pwrdwn = PWRDWN; end endgenerate + localparam INV_RST = (_TECHMAP_CONSTMSK_RST_ == 1) ? !_TECHMAP_CONSTVAL_PWRDWN_ : + (_TECHMAP_CONSTVAL_RST_ == 0) ? ~IS_RST_INVERTED : IS_RST_INVERTED; generate if (_TECHMAP_CONSTMSK_RST_ == 1) begin - localparam INV_RST = !_TECHMAP_CONSTVAL_PWRDWN_; wire rst = 1'b1; end else if (_TECHMAP_CONSTVAL_RST_ == 0) begin - localparam INV_RST = ~IS_RST_INVERTED; wire rst = 1'b1; end else begin - localparam INV_RST = IS_RST_INVERTED; wire rst = RST; end endgenerate @@ -600,7 +599,7 @@ output [15:0] DO else wire dclk = DCLK; endgenerate - + generate if (_TECHMAP_CONSTMSK_DEN_ == 1) wire den = _TECHMAP_CONSTVAL_DEN_; else if (_TECHMAP_CONSTVAL_DEN_ == 0) From dfd0a81c46b8555bc887e70a946522a97e1cb9f5 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 25 Feb 2021 14:23:37 +0100 Subject: [PATCH 273/845] design_introspection: Integrate get_count command with design introspection plugin Signed-off-by: Tomasz Michalak --- Makefile | 2 +- README.md | 22 ++-- design_introspection-plugin/Makefile | 3 +- .../design_introspection.cc | 2 + design_introspection-plugin/get_count.cc | 104 +++++++++++++++ design_introspection-plugin/get_count.h | 37 ++++++ design_introspection-plugin/tests/Makefile | 4 +- .../tests/get_count}/Makefile | 0 .../tests/get_count/get_count.tcl | 2 +- .../tests/get_count/get_count.v | 0 get_count-plugin/Makefile | 3 - get_count-plugin/get_count.cc | 118 ------------------ get_count-plugin/tests/Makefile | 5 - 13 files changed, 157 insertions(+), 145 deletions(-) create mode 100644 design_introspection-plugin/get_count.cc create mode 100644 design_introspection-plugin/get_count.h rename {get_count-plugin/tests/simple => design_introspection-plugin/tests/get_count}/Makefile (100%) rename get_count-plugin/tests/simple/simple.tcl => design_introspection-plugin/tests/get_count/get_count.tcl (88%) rename get_count-plugin/tests/simple/simple.v => design_introspection-plugin/tests/get_count/get_count.v (100%) delete mode 100644 get_count-plugin/Makefile delete mode 100644 get_count-plugin/get_count.cc delete mode 100644 get_count-plugin/tests/Makefile diff --git a/Makefile b/Makefile index 0d54794c9..22901983f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params selection sdc get_count ql-iob design_introspection integrateinv +PLUGIN_LIST := fasm xdc params selection sdc ql-iob design_introspection integrateinv PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/README.md b/README.md index 28f631850..ad2ae2f16 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,12 @@ This repository contains plugins for ## List of plugins 1. [Design introspection](#design-introspection-plugin) 2. [FASM](#fasm-plugin) -3. [Get count](#get-count-plugin) -4. [Integrate inverters](#integrate-inverters-plugin) -5. [Parameters](#parameters-plugin) -6. [QL IOBs](#quicklogic-iob-plugin) -7. [SDC](#sdc-plugin) -8. [Selection](#selection-plugin) -9. [XDC](#xdc-plugin) +3. [Integrate inverters](#integrate-inverters-plugin) +4. [Parameters](#parameters-plugin) +5. [QL IOBs](#quicklogic-iob-plugin) +6. [SDC](#sdc-plugin) +7. [Selection](#selection-plugin) +8. [XDC](#xdc-plugin) ## Summary @@ -26,6 +25,7 @@ Following commands are added with the plugin: * get_nets * get_pins * get_ports +* get_count ### FASM plugin @@ -34,14 +34,6 @@ Writes out the design's [fasm features](https://symbiflow.readthedocs.io/en/late The plugin adds the following command: * write_fasm -### Get count plugin - -Returns the count of selected objects to the TCL interpreter. -The objects can be of various types, such as modules, cells or wires. - -The plugin adds the following command: -* get_count - ### Integrate inverters plugin Implements a pass that integrates inverters into cells that have ports with the 'invertible_pin' attribute set. diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index 85a605a90..9feb50296 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -4,6 +4,7 @@ SOURCES = design_introspection.cc \ get_nets.cc \ get_ports.cc \ get_cells.cc \ - get_pins.cc + get_pins.cc \ + get_count.cc include ../Makefile_plugin.common diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc index 4bd348d37..899e215eb 100644 --- a/design_introspection-plugin/design_introspection.cc +++ b/design_introspection-plugin/design_introspection.cc @@ -19,6 +19,7 @@ */ #include "get_cells.h" +#include "get_count.h" #include "get_nets.h" #include "get_pins.h" #include "get_ports.h" @@ -33,6 +34,7 @@ struct DesignIntrospection { GetPorts get_ports_cmd; GetCells get_cells_cmd; GetPins get_pins_cmd; + GetCount get_count_cmd; } DesignIntrospection; PRIVATE_NAMESPACE_END diff --git a/design_introspection-plugin/get_count.cc b/design_introspection-plugin/get_count.cc new file mode 100644 index 000000000..b491d1799 --- /dev/null +++ b/design_introspection-plugin/get_count.cc @@ -0,0 +1,104 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "get_count.h" + +#include "kernel/rtlil.h" + +USING_YOSYS_NAMESPACE + +void GetCount::help() +{ + log("\n"); + log(" get_count [selection]"); + log("\n"); + log("When used from inside the TCL interpreter returns count of selected objects.\n"); + log("The object type to count may be given as an argument. Only one at a time.\n"); + log("If none is given then the total count of all selected objects is returned.\n"); + log("\n"); + log(" -modules\n"); + log(" Returns the count of modules in selection\n"); + log("\n"); + log(" -cells\n"); + log(" Returns the count of cells in selection\n"); + log("\n"); + log(" -wires\n"); + log(" Returns the count of wires in selection\n"); + log("\n"); +} + +void GetCount::execute(std::vector a_Args, RTLIL::Design *a_Design) +{ + + // Parse args + ObjectType type = ObjectType::NONE; + if (a_Args.size() < 2) { + log_error("Invalid argument!\n"); + } + + if (a_Args[1] == "-modules") { + type = ObjectType::MODULE; + } else if (a_Args[1] == "-cells") { + type = ObjectType::CELL; + } else if (a_Args[1] == "-wires") { + type = ObjectType::WIRE; + } else if (a_Args[1][0] == '-') { + log_error("Invalid argument '%s'!\n", a_Args[1].c_str()); + } else { + log_error("Object type not specified!\n"); + } + + extra_args(a_Args, 2, a_Design); + + // Get the TCL interpreter + Tcl_Interp *tclInterp = yosys_get_tcl_interp(); + + // Count objects + size_t moduleCount = 0; + size_t cellCount = 0; + size_t wireCount = 0; + + moduleCount += a_Design->selected_modules().size(); + for (auto module : a_Design->selected_modules()) { + cellCount += module->selected_cells().size(); + wireCount += module->selected_wires().size(); + } + + size_t count = 0; + switch (type) { + case ObjectType::MODULE: + count = moduleCount; + break; + case ObjectType::CELL: + count = cellCount; + break; + case ObjectType::WIRE: + count = wireCount; + break; + default: + log_assert(false); + } + + // Return the value as string to the TCL interpreter + std::string value = std::to_string(count); + + Tcl_Obj *tclStr = Tcl_NewStringObj(value.c_str(), value.size()); + Tcl_SetObjResult(tclInterp, tclStr); +} diff --git a/design_introspection-plugin/get_count.h b/design_introspection-plugin/get_count.h new file mode 100644 index 000000000..880e4f0ad --- /dev/null +++ b/design_introspection-plugin/get_count.h @@ -0,0 +1,37 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +#ifndef _GET_COUNT_H_ +#define _GET_COUNT_H_ + +#include "kernel/register.h" + +USING_YOSYS_NAMESPACE + +struct GetCount : public Pass { + + enum class ObjectType { NONE, MODULE, CELL, WIRE }; + + GetCount() : Pass("get_count", "Returns count of various selected object types to the TCL interpreter") {} + + void help() override; + void execute(std::vector a_Args, RTLIL::Design *a_Design) override; +}; + +#endif // GET_COUNT_H_ diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index 1602a4871..6ef337367 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -1,7 +1,8 @@ TESTS = get_nets \ get_ports \ get_cells \ - get_pins + get_pins \ + get_count UNIT_TESTS = trim_name @@ -11,3 +12,4 @@ get_nets_verify = $(call diff_test,get_nets,txt) get_ports_verify = $(call diff_test,get_ports,txt) get_cells_verify = $(call diff_test,get_cells,txt) get_pins_verify = $(call diff_test,get_pins,txt) +get_count_verify = true diff --git a/get_count-plugin/tests/simple/Makefile b/design_introspection-plugin/tests/get_count/Makefile similarity index 100% rename from get_count-plugin/tests/simple/Makefile rename to design_introspection-plugin/tests/get_count/Makefile diff --git a/get_count-plugin/tests/simple/simple.tcl b/design_introspection-plugin/tests/get_count/get_count.tcl similarity index 88% rename from get_count-plugin/tests/simple/simple.tcl rename to design_introspection-plugin/tests/get_count/get_count.tcl index c155de36a..17689af72 100644 --- a/get_count-plugin/tests/simple/simple.tcl +++ b/design_introspection-plugin/tests/get_count/get_count.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs get_count] == {} } { plugin -i get_count } +if { [info procs get_count] == {} } { plugin -i design_introspection } yosys -import # ingest new plugin commands read_verilog -icells $::env(DESIGN_TOP).v diff --git a/get_count-plugin/tests/simple/simple.v b/design_introspection-plugin/tests/get_count/get_count.v similarity index 100% rename from get_count-plugin/tests/simple/simple.v rename to design_introspection-plugin/tests/get_count/get_count.v diff --git a/get_count-plugin/Makefile b/get_count-plugin/Makefile deleted file mode 100644 index 761d82c30..000000000 --- a/get_count-plugin/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -NAME = get_count -SOURCES = get_count.cc -include ../Makefile_plugin.common diff --git a/get_count-plugin/get_count.cc b/get_count-plugin/get_count.cc deleted file mode 100644 index 5faff1625..000000000 --- a/get_count-plugin/get_count.cc +++ /dev/null @@ -1,118 +0,0 @@ -/* - * yosys -- Yosys Open SYnthesis Suite - * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -#include "kernel/register.h" -#include "kernel/rtlil.h" - -#ifndef YS_OVERRIDE -#define YS_OVERRIDE override -#endif - -USING_YOSYS_NAMESPACE -PRIVATE_NAMESPACE_BEGIN - -struct GetCount : public Pass { - - enum class ObjectType { NONE, MODULE, CELL, WIRE }; - - GetCount() : Pass("get_count", "Returns count of various selected object types to the TCL interpreter") {} - - void help() YS_OVERRIDE - { - log("\n"); - log(" get_count [selection]"); - log("\n"); - log("When used from inside the TCL interpreter returns count of selected objects.\n"); - log("The object type to count may be given as an argument. Only one at a time.\n"); - log("If none is given then the total count of all selected objects is returned.\n"); - log("\n"); - log(" -modules\n"); - log(" Returns the count of modules in selection\n"); - log("\n"); - log(" -cells\n"); - log(" Returns the count of cells in selection\n"); - log("\n"); - log(" -wires\n"); - log(" Returns the count of wires in selection\n"); - log("\n"); - } - - void execute(std::vector a_Args, RTLIL::Design *a_Design) YS_OVERRIDE - { - - // Parse args - ObjectType type = ObjectType::NONE; - if (a_Args.size() < 2) { - log_error("Invalid argument!\n"); - } - - if (a_Args[1] == "-modules") { - type = ObjectType::MODULE; - } else if (a_Args[1] == "-cells") { - type = ObjectType::CELL; - } else if (a_Args[1] == "-wires") { - type = ObjectType::WIRE; - } else if (a_Args[1][0] == '-') { - log_error("Invalid argument '%s'!\n", a_Args[1].c_str()); - } else { - log_error("Object type not specified!\n"); - } - - extra_args(a_Args, 2, a_Design); - - // Get the TCL interpreter - Tcl_Interp *tclInterp = yosys_get_tcl_interp(); - - // Count objects - size_t moduleCount = 0; - size_t cellCount = 0; - size_t wireCount = 0; - - moduleCount += a_Design->selected_modules().size(); - for (auto module : a_Design->selected_modules()) { - cellCount += module->selected_cells().size(); - wireCount += module->selected_wires().size(); - } - - size_t count = 0; - switch (type) { - case ObjectType::MODULE: - count = moduleCount; - break; - case ObjectType::CELL: - count = cellCount; - break; - case ObjectType::WIRE: - count = wireCount; - break; - default: - log_assert(false); - } - - // Return the value as string to the TCL interpreter - std::string value = std::to_string(count); - - Tcl_Obj *tclStr = Tcl_NewStringObj(value.c_str(), value.size()); - Tcl_SetObjResult(tclInterp, tclStr); - } - -} GetCount; - -PRIVATE_NAMESPACE_END diff --git a/get_count-plugin/tests/Makefile b/get_count-plugin/tests/Makefile deleted file mode 100644 index 676689e7d..000000000 --- a/get_count-plugin/tests/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -TESTS = simple - -include $(shell pwd)/../../Makefile_test.common - -simple_verify = true From 50c3dae0d0f74f99a0ac8ee9a4ab7abca8718a84 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 25 Feb 2021 16:39:22 +0100 Subject: [PATCH 274/845] design_introspection: Integrate select_to_tcl_list command with design introspection plugin Signed-off-by: Tomasz Michalak --- Makefile | 2 +- README.md | 14 +-- design_introspection-plugin/Makefile | 3 +- .../design_introspection.cc | 2 + .../selection_to_tcl_list.cc | 83 +++++++++++++++++ .../selection_to_tcl_list.h | 36 ++++++++ design_introspection-plugin/tests/Makefile | 4 +- .../selection_to_tcl_list.golden.txt | 3 + .../selection_to_tcl_list.tcl | 4 +- .../selection_to_tcl_list.v | 0 selection-plugin/Makefile | 3 - selection-plugin/selection.cc | 91 ------------------- selection-plugin/tests/Makefile | 3 - .../tests/counter/counter.golden.txt | 3 - 14 files changed, 136 insertions(+), 115 deletions(-) create mode 100644 design_introspection-plugin/selection_to_tcl_list.cc create mode 100644 design_introspection-plugin/selection_to_tcl_list.h create mode 100644 design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt rename selection-plugin/tests/counter/counter.tcl => design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.tcl (88%) rename selection-plugin/tests/counter/counter.v => design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v (100%) delete mode 100644 selection-plugin/Makefile delete mode 100644 selection-plugin/selection.cc delete mode 100644 selection-plugin/tests/Makefile delete mode 100644 selection-plugin/tests/counter/counter.golden.txt diff --git a/Makefile b/Makefile index 22901983f..bc0edc9ad 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params selection sdc ql-iob design_introspection integrateinv +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/README.md b/README.md index ad2ae2f16..08c211fb2 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ This repository contains plugins for 4. [Parameters](#parameters-plugin) 5. [QL IOBs](#quicklogic-iob-plugin) 6. [SDC](#sdc-plugin) -7. [Selection](#selection-plugin) -8. [XDC](#xdc-plugin) +7. [XDC](#xdc-plugin) ## Summary ### Design introspection plugin -Adds several commands that allow for collecting information about cells, nets, pins and ports in the design. +Adds several commands that allow for collecting information about cells, nets, pins and ports in the design or a selection of objects. +Additionally provides functions to convert selection on TCL lists. Following commands are added with the plugin: * get_cells @@ -26,6 +26,7 @@ Following commands are added with the plugin: * get_pins * get_ports * get_count +* selection_to_tcl_list ### FASM plugin @@ -69,13 +70,6 @@ The plugin adds the following commands: * set_max_delay * set_clock_groups -### Selection plugin - -Extracts the current selection to TCL list - -The plugin adds the following command: -* selection_to_tcl_list - ### XDC plugin Reads Xilinx Design Constraints (XDC) files and annotates the specified cells parameters with properties such as: diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index 9feb50296..2e1ffdecd 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -5,6 +5,7 @@ SOURCES = design_introspection.cc \ get_ports.cc \ get_cells.cc \ get_pins.cc \ - get_count.cc + get_count.cc \ + selection_to_tcl_list.cc include ../Makefile_plugin.common diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc index 899e215eb..26e39ff8a 100644 --- a/design_introspection-plugin/design_introspection.cc +++ b/design_introspection-plugin/design_introspection.cc @@ -23,6 +23,7 @@ #include "get_nets.h" #include "get_pins.h" #include "get_ports.h" +#include "selection_to_tcl_list.h" USING_YOSYS_NAMESPACE @@ -35,6 +36,7 @@ struct DesignIntrospection { GetCells get_cells_cmd; GetPins get_pins_cmd; GetCount get_count_cmd; + SelectionToTclList selection_to_tcl_list_cmd; } DesignIntrospection; PRIVATE_NAMESPACE_END diff --git a/design_introspection-plugin/selection_to_tcl_list.cc b/design_introspection-plugin/selection_to_tcl_list.cc new file mode 100644 index 000000000..45005a36d --- /dev/null +++ b/design_introspection-plugin/selection_to_tcl_list.cc @@ -0,0 +1,83 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "selection_to_tcl_list.h" + +#include "kernel/log.h" +#include "kernel/rtlil.h" + +USING_YOSYS_NAMESPACE + +void SelectionToTclList::help() +{ + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" selection_to_tcl_list selection\n"); + log("\n"); + log("Extract the current selection to a Tcl List with selection object names. \n"); + log("\n"); +} + +void SelectionToTclList::execute(std::vector args, RTLIL::Design *design) +{ + if (args.size() == 1) { + log_error("Incorrect number of arguments"); + } + extra_args(args, 1, design); + + Tcl_Interp *interp = yosys_get_tcl_interp(); + Tcl_Obj *tcl_list = Tcl_NewListObj(0, NULL); + + auto &selection = design->selection(); + if (selection.empty()) { + log_warning("Selection is empty\n"); + } + + for (auto mod : design->modules()) { + if (selection.selected_module(mod->name)) { + for (auto wire : mod->wires()) { + if (selection.selected_member(mod->name, wire->name)) { + AddObjectNameToTclList(mod->name, wire->name, tcl_list); + } + } + for (auto &it : mod->memories) { + if (selection.selected_member(mod->name, it.first)) { + AddObjectNameToTclList(mod->name, it.first, tcl_list); + } + } + for (auto cell : mod->cells()) { + if (selection.selected_member(mod->name, cell->name)) { + AddObjectNameToTclList(mod->name, cell->name, tcl_list); + } + } + for (auto &it : mod->processes) { + if (selection.selected_member(mod->name, it.first)) { + AddObjectNameToTclList(mod->name, it.first, tcl_list); + } + } + } + } + Tcl_SetObjResult(interp, tcl_list); +} + +void SelectionToTclList::AddObjectNameToTclList(RTLIL::IdString &module, RTLIL::IdString &object, Tcl_Obj *tcl_list) +{ + std::string name = RTLIL::unescape_id(module) + "/" + RTLIL::unescape_id(object); + Tcl_Obj *value_obj = Tcl_NewStringObj(name.c_str(), name.size()); + Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); +} diff --git a/design_introspection-plugin/selection_to_tcl_list.h b/design_introspection-plugin/selection_to_tcl_list.h new file mode 100644 index 000000000..7671da648 --- /dev/null +++ b/design_introspection-plugin/selection_to_tcl_list.h @@ -0,0 +1,36 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * Copyright (C) 2020 The Symbiflow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _SELECTION_TO_TCL_LIST_H_ +#define _SELECTION_TO_TCL_LIST_H_ + +#include "kernel/register.h" + +USING_YOSYS_NAMESPACE + +struct SelectionToTclList : public Pass { + SelectionToTclList() : Pass("selection_to_tcl_list", "Extract selection to TCL list") {} + + void help() override; + void execute(std::vector args, RTLIL::Design *design) override; + + private: + void AddObjectNameToTclList(RTLIL::IdString &module, RTLIL::IdString &object, Tcl_Obj *tcl_list); +}; + +#endif // SELECTION_TO_TCL_LIST_H_ diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index 6ef337367..e9f50a3a1 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -2,7 +2,8 @@ TESTS = get_nets \ get_ports \ get_cells \ get_pins \ - get_count + get_count \ + selection_to_tcl_list UNIT_TESTS = trim_name @@ -13,3 +14,4 @@ get_ports_verify = $(call diff_test,get_ports,txt) get_cells_verify = $(call diff_test,get_cells,txt) get_pins_verify = $(call diff_test,get_pins,txt) get_count_verify = true +selection_to_tcl_list_verify = $(call diff_test,selection_to_tcl_list,txt) diff --git a/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt b/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt new file mode 100644 index 000000000..8a6ea0f98 --- /dev/null +++ b/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt @@ -0,0 +1,3 @@ +{middle/$add$selection_to_tcl_list.v:32$5} top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$selection_to_tcl_list.v:14$2} top/ibuf_inst top/ibuf_proxy +{middle/$1\cnt[1:0]} {middle/$add$selection_to_tcl_list.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {top/$1\cnt[1:0]} {top/$add$selection_to_tcl_list.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk +{middle/$1\cnt[1:0]} {middle/$add$selection_to_tcl_list.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {middle/$add$selection_to_tcl_list.v:32$5} {middle/$proc$selection_to_tcl_list.v:28$6} {middle/$proc$selection_to_tcl_list.v:31$4} {top/$1\cnt[1:0]} {top/$add$selection_to_tcl_list.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$selection_to_tcl_list.v:14$2} top/ibuf_inst top/ibuf_proxy {top/$proc$selection_to_tcl_list.v:6$3} {top/$proc$selection_to_tcl_list.v:13$1} diff --git a/selection-plugin/tests/counter/counter.tcl b/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.tcl similarity index 88% rename from selection-plugin/tests/counter/counter.tcl rename to design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.tcl index 0361a844a..b58291723 100644 --- a/selection-plugin/tests/counter/counter.tcl +++ b/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs selection_to_tcl_list] == {} } { plugin -i selection } +if { [info procs selection_to_tcl_list] == {} } { plugin -i design_introspection } yosys -import ;# ingest plugin commands proc selection_to_tcl_list_through_file { selection } { @@ -31,7 +31,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Test the selection command and write results to file -set rfh [open [test_output_path "counter.txt"] w] +set rfh [open [test_output_path "selection_to_tcl_list.txt"] w] set selection_tests [list "t:*" "w:*" "*"] foreach test $selection_tests { diff --git a/selection-plugin/tests/counter/counter.v b/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v similarity index 100% rename from selection-plugin/tests/counter/counter.v rename to design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v diff --git a/selection-plugin/Makefile b/selection-plugin/Makefile deleted file mode 100644 index 5745bbb72..000000000 --- a/selection-plugin/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -NAME = selection -SOURCES = selection.cc -include ../Makefile_plugin.common diff --git a/selection-plugin/selection.cc b/selection-plugin/selection.cc deleted file mode 100644 index 30a022235..000000000 --- a/selection-plugin/selection.cc +++ /dev/null @@ -1,91 +0,0 @@ -/* - * yosys -- Yosys Open SYnthesis Suite - * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -#include "kernel/log.h" -#include "kernel/register.h" -#include "kernel/rtlil.h" - -USING_YOSYS_NAMESPACE - -PRIVATE_NAMESPACE_BEGIN - -struct SelectionToTclList : public Pass { - SelectionToTclList() : Pass("selection_to_tcl_list", "Extract selection to TCL list") {} - - void help() override - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" selection_to_tcl_list selection\n"); - log("\n"); - log("Extract the current selection to a Tcl List with selection object names. \n"); - log("\n"); - } - - void AddObjectNameToTclList(RTLIL::IdString &module, RTLIL::IdString &object, Tcl_Obj *tcl_list) - { - std::string name = RTLIL::unescape_id(module) + "/" + RTLIL::unescape_id(object); - Tcl_Obj *value_obj = Tcl_NewStringObj(name.c_str(), name.size()); - Tcl_ListObjAppendElement(yosys_get_tcl_interp(), tcl_list, value_obj); - } - - void execute(std::vector args, RTLIL::Design *design) override - { - if (args.size() == 1) { - log_error("Incorrect number of arguments"); - } - extra_args(args, 1, design); - - Tcl_Interp *interp = yosys_get_tcl_interp(); - Tcl_Obj *tcl_list = Tcl_NewListObj(0, NULL); - - auto &selection = design->selection(); - if (selection.empty()) { - log_warning("Selection is empty\n"); - } - - for (auto mod : design->modules()) { - if (selection.selected_module(mod->name)) { - for (auto wire : mod->wires()) { - if (selection.selected_member(mod->name, wire->name)) { - AddObjectNameToTclList(mod->name, wire->name, tcl_list); - } - } - for (auto &it : mod->memories) { - if (selection.selected_member(mod->name, it.first)) { - AddObjectNameToTclList(mod->name, it.first, tcl_list); - } - } - for (auto cell : mod->cells()) { - if (selection.selected_member(mod->name, cell->name)) { - AddObjectNameToTclList(mod->name, cell->name, tcl_list); - } - } - for (auto &it : mod->processes) { - if (selection.selected_member(mod->name, it.first)) { - AddObjectNameToTclList(mod->name, it.first, tcl_list); - } - } - } - } - Tcl_SetObjResult(interp, tcl_list); - } - -} SelectionToTclList; - -PRIVATE_NAMESPACE_END diff --git a/selection-plugin/tests/Makefile b/selection-plugin/tests/Makefile deleted file mode 100644 index e20374103..000000000 --- a/selection-plugin/tests/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TESTS = counter -include $(shell pwd)/../../Makefile_test.common -counter_verify = $(call diff_test,counter,txt) diff --git a/selection-plugin/tests/counter/counter.golden.txt b/selection-plugin/tests/counter/counter.golden.txt deleted file mode 100644 index 7122e8b97..000000000 --- a/selection-plugin/tests/counter/counter.golden.txt +++ /dev/null @@ -1,3 +0,0 @@ -{middle/$add$counter.v:32$5} top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$counter.v:14$2} top/ibuf_inst top/ibuf_proxy -{middle/$1\cnt[1:0]} {middle/$add$counter.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {top/$1\cnt[1:0]} {top/$add$counter.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk -{middle/$1\cnt[1:0]} {middle/$add$counter.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {middle/$add$counter.v:32$5} {middle/$proc$counter.v:28$6} {middle/$proc$counter.v:31$4} {top/$1\cnt[1:0]} {top/$add$counter.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$counter.v:14$2} top/ibuf_inst top/ibuf_proxy {top/$proc$counter.v:6$3} {top/$proc$counter.v:13$1} From 1b3211d95369d49b0d3f27a09baddc2b090193fc Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Wed, 3 Mar 2021 09:18:11 +0100 Subject: [PATCH 275/845] xdc: add IBUFDS_GTE2 primitive Signed-off-by: Alessandro Comodi --- xdc-plugin/xdc.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 1e9703347..c248542c1 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -51,9 +51,13 @@ const std::unordered_map set_property_options_m {"PACKAGE_PIN", SetPropertyOptions::IO_LOC_PAIRS}}; const std::unordered_map> supported_primitive_parameters = { - {"OBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, {"OBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, - {"OBUFTDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, {"IBUF", {"IO_LOC_PAIRS", "IOSTANDARD"}}, - {"IOBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, {"IOBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}}; + {"OBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, + {"OBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, + {"OBUFTDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, + {"IBUF", {"IO_LOC_PAIRS", "IOSTANDARD"}}, + {"IOBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, + {"IOBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, + {"IBUFDS_GTE2", {"IO_LOC_PAIRS"}}}; void register_in_tcl_interpreter(const std::string &command) { From 2a56dda5a4fad71434b4602a41c64156639e9793 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Wed, 10 Mar 2021 13:45:28 +0100 Subject: [PATCH 276/845] Add qlf_k4n8 plugin Signed-off-by: Karol Gugala --- Makefile | 2 +- Makefile_plugin.common | 1 + ql-qlf-k4n8-plugin/Makefile | 10 + ql-qlf-k4n8-plugin/cells_sim.v | 24 ++ ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v | 135 ++++++++++ ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v | 70 +++++ ql-qlf-k4n8-plugin/synth_quicklogic.cc | 250 ++++++++++++++++++ ql-qlf-k4n8-plugin/tests/Makefile | 13 + ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl | 29 ++ ql-qlf-k4n8-plugin/tests/dffs/dffs.v | 24 ++ .../tests/iob_no_flatten/iob_no_flatten.tcl | 10 + .../tests/iob_no_flatten/iob_no_flatten.v | 28 ++ .../tests/iob_no_flatten/iob_no_flatten.ys | 6 + ql-qlf-k4n8-plugin/tests/latches/latches.tcl | 20 ++ ql-qlf-k4n8-plugin/tests/latches/latches.v | 22 ++ ql-qlf-k4n8-plugin/tests/logic/logic.tcl | 13 + ql-qlf-k4n8-plugin/tests/logic/logic.v | 16 ++ ql-qlf-k4n8-plugin/tests/logic/logic.ys | 9 + .../tests/ql_qlf_k4n8/run-test.sh | 20 ++ .../tests/soft_adder/soft_adder.tcl | 17 ++ .../tests/soft_adder/soft_adder.v | 21 ++ 21 files changed, 739 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-k4n8-plugin/Makefile create mode 100644 ql-qlf-k4n8-plugin/cells_sim.v create mode 100644 ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v create mode 100644 ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v create mode 100644 ql-qlf-k4n8-plugin/synth_quicklogic.cc create mode 100644 ql-qlf-k4n8-plugin/tests/Makefile create mode 100644 ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl create mode 100644 ql-qlf-k4n8-plugin/tests/dffs/dffs.v create mode 100644 ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl create mode 100644 ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v create mode 100644 ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.ys create mode 100644 ql-qlf-k4n8-plugin/tests/latches/latches.tcl create mode 100644 ql-qlf-k4n8-plugin/tests/latches/latches.v create mode 100644 ql-qlf-k4n8-plugin/tests/logic/logic.tcl create mode 100644 ql-qlf-k4n8-plugin/tests/logic/logic.v create mode 100644 ql-qlf-k4n8-plugin/tests/logic/logic.ys create mode 100755 ql-qlf-k4n8-plugin/tests/ql_qlf_k4n8/run-test.sh create mode 100644 ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl create mode 100644 ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.v diff --git a/Makefile b/Makefile index bc0edc9ad..41d358ae7 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf-k4n8 PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 06f2c61fb..053a79f82 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -41,6 +41,7 @@ CXXFLAGS = $(shell yosys-config --cxxflags) #-DSDC_DEBUG LDFLAGS = $(shell yosys-config --ldflags) LDLIBS = $(shell yosys-config --ldlibs) PLUGINS_DIR = $(shell yosys-config --datdir)/plugins +DATA_DIR = $(shell yosys-config --datdir) OBJS := $(SOURCES:cc=o) diff --git a/ql-qlf-k4n8-plugin/Makefile b/ql-qlf-k4n8-plugin/Makefile new file mode 100644 index 000000000..bf201eb64 --- /dev/null +++ b/ql-qlf-k4n8-plugin/Makefile @@ -0,0 +1,10 @@ +NAME = ql-qlf-k4n8 +SOURCES = synth_quicklogic.cc +include ../Makefile_plugin.common + +VERILOG_MODULES = cells_sim.v qlf_k4n8_arith_map.v qlf_k4n8_cells_sim.v + +install_modules: $(VERILOG_MODULES) + $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);) + +install: install_modules diff --git a/ql-qlf-k4n8-plugin/cells_sim.v b/ql-qlf-k4n8-plugin/cells_sim.v new file mode 100644 index 000000000..4c17762eb --- /dev/null +++ b/ql-qlf-k4n8-plugin/cells_sim.v @@ -0,0 +1,24 @@ + +module inv(output Q, input A); + assign Q = A ? 0 : 1; +endmodule + +module buff(output Q, input A); + assign Q = A; +endmodule + +module logic_0(output a); + assign a = 0; +endmodule + +module logic_1(output a); + assign a = 1; +endmodule + +(* blackbox *) +module gclkbuff (input A, output Z); + +assign Z = A; + +endmodule + diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v b/ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v new file mode 100644 index 000000000..5cbfdc791 --- /dev/null +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v @@ -0,0 +1,135 @@ +(* techmap_celltype = "$alu" *) +module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); + parameter A_SIGNED = 0; + parameter B_SIGNED = 0; + parameter A_WIDTH = 1; + parameter B_WIDTH = 1; + parameter Y_WIDTH = 1; + + parameter _TECHMAP_CONSTMSK_CI_ = 0; + parameter _TECHMAP_CONSTVAL_CI_ = 0; + + (* force_downto *) + input [A_WIDTH-1:0] A; + (* force_downto *) + input [B_WIDTH-1:0] B; + (* force_downto *) + output [Y_WIDTH-1:0] X, Y; + + input CI, BI; + (* force_downto *) + output [Y_WIDTH-1:0] CO; + + wire _TECHMAP_FAIL_ = Y_WIDTH <= 2; + + (* force_downto *) + wire [Y_WIDTH-1:0] A_buf, B_buf; + \$pos #(.A_SIGNED(A_SIGNED), .A_WIDTH(A_WIDTH), .Y_WIDTH(Y_WIDTH)) A_conv (.A(A), .Y(A_buf)); + \$pos #(.A_SIGNED(B_SIGNED), .A_WIDTH(B_WIDTH), .Y_WIDTH(Y_WIDTH)) B_conv (.A(B), .Y(B_buf)); + + (* force_downto *) + wire [Y_WIDTH-1:0] AA = A_buf; + (* force_downto *) + wire [Y_WIDTH-1:0] BB = BI ? ~B_buf : B_buf; + (* force_downto *) + wire [Y_WIDTH-1:0] C; + + assign CO = C[Y_WIDTH-1]; + + genvar i; + generate for (i = 0; i < Y_WIDTH; i = i + 1) begin: slice + + wire ci; + wire co; + + // First in chain + generate if (i == 0) begin + + // CI connected to a constant + if (_TECHMAP_CONSTMSK_CI_ == 1) begin + + localparam INIT = (_TECHMAP_CONSTVAL_CI_ == 0) ? + 16'b0110_0000_0000_0001 : + 16'b1001_0000_0000_0111; + + // LUT4 configured as 1-bit adder with CI=const + adder_lut4 #( + .LUT(INIT), + .IN2_IS_CIN(1'b0) + ) lut_ci_adder ( + .in({AA[i], BB[i], 1'b0, 1'b0}), + .cin(), + .lut4_out(Y[i]), + .cout(ci) + ); + + // CI connected to a non-const driver + end else begin + + // LUT4 configured as passthrough to drive CI of the next stage + adder_lut4 #( + .LUT(16'b1100_0000_0000_0011), + .IN2_IS_CIN(1'b0) + ) lut_ci ( + .in({1'b0,CI,1'b0,1'b0}), + .cin(), + .lut4_out(), + .cout(ci) + ); + end + + // Not first in chain + end else begin + assign ci = C[i-1]; + + end endgenerate + + // .................................................... + + // Single 1-bit adder, mid-chain adder or non-const CI + // adder + generate if ((i == 0 && _TECHMAP_CONSTMSK_CI_ == 0) || (i > 0)) begin + + // LUT4 configured as full 1-bit adder + adder_lut4 #( + .LUT(16'b0110_1001_0110_0001), + .IN2_IS_CIN(1'b1) + ) lut_adder ( + .in({AA[i], BB[i], 1'b0, 1'b0}), + .cin(ci), + .lut4_out(Y[i]), + .cout(co) + ); + end else begin + assign co = ci; + + end endgenerate + + // .................................................... + + // Last in chain + generate if (i == Y_WIDTH-1) begin + + // LUT4 configured for passing its CI input to output. This should + // get pruned if the actual CO port is not connected anywhere. + adder_lut4 #( + .LUT(16'b0000_1111_0000_1111), + .IN2_IS_CIN(1'b1) + ) lut_co ( + .in({1'b0, co, 1'b0, 1'b0}), + .cin(co), + .lut4_out(C[i]), + .cout() + ); + // Not last in chain + end else begin + assign C[i] = co; + + end endgenerate + + end: slice + endgenerate + + /* End implementation */ + assign X = AA ^ BB; +endmodule diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v b/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v new file mode 100644 index 000000000..a66a88d67 --- /dev/null +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v @@ -0,0 +1,70 @@ +(* abc9_box, lib_whitebox *) +module adder_lut4( + output lut4_out, + (* abc9_carry *) + output cout, + input [0:3] in, + (* abc9_carry *) + input cin +); + parameter [0:15] LUT=0; + parameter IN2_IS_CIN = 0; + + wire [0:3] li = (IN2_IS_CIN) ? {in[0], in[1], cin, in[3]} : {in[0], in[1], in[2], in[3]}; + + // Output function + wire [0:7] s1 = li[0] ? + {LUT[1], LUT[3], LUT[5], LUT[7], LUT[9], LUT[11], LUT[13], LUT[15]}: + {LUT[0], LUT[2], LUT[4], LUT[6], LUT[8], LUT[10], LUT[12], LUT[14]}; + + wire [0:3] s2 = li[1] ? {s1[1], s1[3], s1[5], s1[7]} : + {s1[0], s1[2], s1[4], s1[6]}; + + wire [0:1] s3 = li[2] ? {s2[1], s2[3]} : {s2[0], s2[2]}; + + assign lut4_out = li[3] ? s3[1] : s3[0]; + + // Carry out function + assign cout = (s2[2]) ? cin : s2[3]; +endmodule + +(* abc9_lut=1, lib_whitebox *) +module frac_lut4( + input [0:3] in, + output [0:1] lut2_out, + output lut4_out +); + parameter [0:15] LUT = 0; + + // Effective LUT input + wire [0:3] li = in; + + // Output function + wire [0:7] s1 = li[0] ? + {LUT[1], LUT[3], LUT[5], LUT[7], LUT[9], LUT[11], LUT[13], LUT[15]}: + {LUT[0], LUT[2], LUT[4], LUT[6], LUT[8], LUT[10], LUT[12], LUT[14]}; + + wire [0:3] s2 = li[1] ? {s1[1], s1[3], s1[5], s1[7]} : + {s1[0], s1[2], s1[4], s1[6]}; + + wire [0:1] s3 = li[2] ? {s2[1], s2[3]} : {s2[0], s2[2]}; + + assign lut2_out[0] = s2[2]; + assign lut2_out[1] = s2[3]; + + assign lut4_out = li[3] ? s3[1] : s3[0]; + +endmodule + +(* abc9_flop, lib_whitebox *) +module scff( + output reg Q, + input D, + input clk +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge clk) + Q <= D; +endmodule diff --git a/ql-qlf-k4n8-plugin/synth_quicklogic.cc b/ql-qlf-k4n8-plugin/synth_quicklogic.cc new file mode 100644 index 000000000..b7909e409 --- /dev/null +++ b/ql-qlf-k4n8-plugin/synth_quicklogic.cc @@ -0,0 +1,250 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2021 Lalit Sharma + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +#include "kernel/celltypes.h" +#include "kernel/log.h" +#include "kernel/register.h" +#include "kernel/rtlil.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +struct SynthQuickLogicPass : public ScriptPass { + + SynthQuickLogicPass() : ScriptPass("synth_quicklogic", "Synthesis for QuickLogic FPGAs") {} + + void help() override + { + log("\n"); + log(" synth_quicklogic [options]\n"); + log("This command runs synthesis for QuickLogic FPGAs\n"); + log("\n"); + log(" -top \n"); + log(" use the specified module as top module\n"); + log("\n"); + log(" -family \n"); + log(" run synthesis for the specified QuickLogic architecture\n"); + log(" generate the synthesis netlist for the specified family.\n"); + log(" supported values:\n"); + log(" - qlf_k4n8: qlf_k4n8 \n"); + log("\n"); + log(" -no_abc_opt\n"); + log(" By default most of ABC logic optimization features is\n"); + log(" enabled. Specifying this switch turns them off.\n"); + log("\n"); + log(" -edif \n"); + log(" write the design to the specified edif file. writing of an output file\n"); + log(" is omitted if this parameter is not specified.\n"); + log("\n"); + log(" -blif \n"); + log(" write the design to the specified BLIF file. writing of an output file\n"); + log(" is omitted if this parameter is not specified.\n"); + log("\n"); + log(" -verilog \n"); + log(" write the design to the specified verilog file. writing of an output file\n"); + log(" is omitted if this parameter is not specified.\n"); + log("\n"); + log(" -no_adder\n"); + log(" By default use adder cells in output netlist.\n"); + log(" Specifying this switch turns it off.\n"); + log("\n"); + log("\n"); + log("The following commands are executed by this synthesis command:\n"); + help_script(); + log("\n"); + } + + string top_opt, edif_file, blif_file, family, currmodule, verilog_file; + bool inferAdder; + bool abcOpt; + + void clear_flags() override + { + top_opt = "-auto-top"; + edif_file = ""; + blif_file = ""; + verilog_file = ""; + currmodule = ""; + family = "qlf_k4n8"; + inferAdder = true; + abcOpt = true; + } + + void execute(std::vector args, RTLIL::Design *design) override + { + string run_from, run_to; + clear_flags(); + + size_t argidx; + for (argidx = 1; argidx < args.size(); argidx++) { + if (args[argidx] == "-top" && argidx + 1 < args.size()) { + top_opt = "-top " + args[++argidx]; + continue; + } + if (args[argidx] == "-edif" && argidx + 1 < args.size()) { + edif_file = args[++argidx]; + continue; + } + + if (args[argidx] == "-family" && argidx + 1 < args.size()) { + family = args[++argidx]; + continue; + } + if (args[argidx] == "-blif" && argidx + 1 < args.size()) { + blif_file = args[++argidx]; + continue; + } + if (args[argidx] == "-verilog" && argidx + 1 < args.size()) { + verilog_file = args[++argidx]; + continue; + } + if (args[argidx] == "-no_adder") { + inferAdder = false; + continue; + } + if (args[argidx] == "-no_abc_opt") { + abcOpt = false; + continue; + } + + break; + } + extra_args(args, argidx, design); + + if (!design->full_selection()) + log_cmd_error("This command only operates on fully selected designs!\n"); + + log_header(design, "Executing SYNTH_QUICKLOGIC pass.\n"); + log_push(); + + run_script(design, run_from, run_to); + + log_pop(); + } + + void script() override + { + if (check_label("begin")) { + std::string readVelArgs; + readVelArgs = " +/quicklogic/" + family + "_cells_sim.v"; + + run("read_verilog -lib -specify +/quicklogic/cells_sim.v" + readVelArgs); + run(stringf("hierarchy -check %s", help_mode ? "-top " : top_opt.c_str())); + } + + if (check_label("prepare")) { + run("proc"); + run("flatten"); + run("opt_expr"); + run("opt_clean"); + run("deminout"); + run("opt"); + } + + if (check_label("coarse")) { + run("opt_expr"); + run("opt_clean"); + run("check"); + run("opt"); + run("wreduce -keepdc"); + run("peepopt"); + run("pmuxtree"); + run("opt_clean"); + + run("alumacc"); + run("opt"); + run("fsm"); + run("opt -fast"); + run("memory -nomap"); + run("opt_clean"); + } + + if (check_label("map_ffram")) { + run("opt -fast -mux_undef -undriven -fine"); + run("memory_map -iattr -attr !ram_block -attr !rom_block -attr logic_block " + "-attr syn_ramstyle=auto -attr syn_ramstyle=registers " + "-attr syn_romstyle=auto -attr syn_romstyle=logic"); + run("opt -undriven -fine"); + } + + if (check_label("map_gates")) { + if (inferAdder) { + run("techmap -map +/techmap.v -map +/quicklogic/" + family + "_arith_map.v"); + } else { + run("techmap"); + } + run("opt -fast"); + run("opt_expr"); + run("opt_merge"); + run("opt_clean"); + run("opt"); + } + + if (check_label("map_ffs")) { + + run("opt_expr -mux_undef"); + run("simplemap"); + run("opt_expr"); + run("opt_merge"); + run("opt_clean"); + run("opt"); + } + + if (check_label("map_luts")) { + run("abc -lut 4 "); + run("clean"); + run("opt_lut"); + } + + if (check_label("check")) { + run("autoname"); + run("hierarchy -check"); + run("stat"); + run("check -noinit"); + } + + if (check_label("finalize")) { + run("check"); + run("opt_clean -purge"); + } + + if (check_label("edif")) { + if (!edif_file.empty()) + run(stringf("write_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); + } + + if (check_label("blif")) { + if (!blif_file.empty()) { + if (inferAdder) { + run(stringf("write_blif -param %s", help_mode ? "" : blif_file.c_str())); + } else { + run(stringf("write_blif %s", help_mode ? "" : blif_file.c_str())); + } + } + } + + if (check_label("verilog")) { + if (!verilog_file.empty()) { + run("write_verilog -noattr -nohex " + verilog_file); + } + } + } + +} SynthQuicklogicPass; + +PRIVATE_NAMESPACE_END diff --git a/ql-qlf-k4n8-plugin/tests/Makefile b/ql-qlf-k4n8-plugin/tests/Makefile new file mode 100644 index 000000000..b0c98f8ca --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/Makefile @@ -0,0 +1,13 @@ +TESTS = dffs \ + iob_no_flatten \ + latches \ + soft_adder \ + logic + +include $(shell pwd)/../../Makefile_test.common + +dffs_verify = true +iob_no_flatten_verify = true +latches_verify = true +soft_adder_verify = true +logic_verify = true diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl new file mode 100644 index 000000000..ba968b773 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl @@ -0,0 +1,29 @@ +yosys -import +if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +yosys -import ;# ingest plugin commands + +read_verilog dffs.v +design -save read + +# DFF +hierarchy -top my_dff +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -top my_dff +design -load postopt +yosys cd my_dff +stat +select -assert-count 1 t:*_DFF_P_ + +# DFFC +design -load read +synth_quicklogic -top my_dffc +yosys cd my_dffc +stat +select -assert-count 1 t:*DFF_P* + +# DFFP +design -load read +synth_quicklogic -top my_dffp +yosys cd my_dffp +stat +select -assert-count 1 t:*DFF_P* diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v new file mode 100644 index 000000000..32f02b63e --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v @@ -0,0 +1,24 @@ +module my_dff ( input d, clk, output reg q ); + initial q <= 1'b0; + always @( posedge clk ) + q <= d; +endmodule + +module my_dffc ( input d, clk, clr, output reg q ); + initial q <= 1'b0; + always @( posedge clk or posedge clr ) + if ( clr ) + q <= 1'b0; + else + q <= d; +endmodule + +module my_dffp ( input d, clk, pre, output reg q ); + initial q <= 1'b0; + always @( posedge clk or posedge pre ) + if ( pre ) + q <= 1'b1; + else + q <= d; +endmodule + diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl new file mode 100644 index 000000000..d9b0fa039 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl @@ -0,0 +1,10 @@ +yosys -import +if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +yosys -import ;# ingest plugin commands + +read_verilog iob_no_flatten.v + +synth_quicklogic -top my_top +yosys stat +yosys cd my_top +select -assert-count 2 t:\$_DFF_P_ diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v new file mode 100644 index 000000000..ce713a7ce --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v @@ -0,0 +1,28 @@ +module my_dff ( input d, clk, output reg q ); + initial q <= 1'b0; + always @( posedge clk ) + q <= d; +endmodule + +module my_top ( + inout wire pad, + input wire i, + input wire t, + output wire o, + input wire clk +); + + wire i_r; + wire t_r; + wire o_r; + + // IOB + assign pad = (t_r) ? i_r : 1'bz; + assign o_r = pad; + + // DFFs + my_dff dff_i (i, clk, i_r); + my_dff dff_t (t, clk, t_r); + my_dff dff_o (o_r, clk, o); + +endmodule diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.ys b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.ys new file mode 100644 index 000000000..4530a8d72 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.ys @@ -0,0 +1,6 @@ +read_verilog v/iob_no_flatten.v + +synth_quicklogic -top my_top +stat +cd my_top +select -assert-count 2 t:$_DFF_P_ diff --git a/ql-qlf-k4n8-plugin/tests/latches/latches.tcl b/ql-qlf-k4n8-plugin/tests/latches/latches.tcl new file mode 100644 index 000000000..7816461c6 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/latches/latches.tcl @@ -0,0 +1,20 @@ +yosys -import +if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +yosys -import ;# ingest plugin commands + +read_verilog latches.v +design -save read + +# LATCHP +synth_quicklogic -top latchp +yosys cd latchp +stat +select -assert-count 1 t:\$_DLATCH_P_ + +# LATCHN +design -load read +synth_quicklogic -top latchn +yosys cd latchn +stat +select -assert-count 1 t:\$_DLATCH_N_ + diff --git a/ql-qlf-k4n8-plugin/tests/latches/latches.v b/ql-qlf-k4n8-plugin/tests/latches/latches.v new file mode 100644 index 000000000..1485ffb99 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/latches/latches.v @@ -0,0 +1,22 @@ +module latchp ( input d, clk, en, output reg q ); + initial q <= 1'b0; + always @* + if ( en ) + q <= d; +endmodule + +module latchn ( input d, clk, en, output reg q ); + always @* + if ( !en ) + q <= d; +endmodule + +module latchsr ( input d, clk, en, clr, pre, output reg q ); + always @* + if ( clr ) + q <= 1'b0; + else if ( pre ) + q <= 1'b1; + else if ( en ) + q <= d; +endmodule diff --git a/ql-qlf-k4n8-plugin/tests/logic/logic.tcl b/ql-qlf-k4n8-plugin/tests/logic/logic.tcl new file mode 100644 index 000000000..6db75e89f --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/logic/logic.tcl @@ -0,0 +1,13 @@ +yosys -import +if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +yosys -import ;# ingest plugin commands + +read_verilog logic.v +hierarchy -top top +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic +design -load postopt +yosys cd top + +stat +select -assert-count 9 t:\$lut diff --git a/ql-qlf-k4n8-plugin/tests/logic/logic.v b/ql-qlf-k4n8-plugin/tests/logic/logic.v new file mode 100644 index 000000000..c17899fa0 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/logic/logic.v @@ -0,0 +1,16 @@ +module top +( + input [0:7] in, + output B1,B2,B3,B4,B5,B6,B7,B8,B9,B10 +); + assign B1 = in[0] & in[1]; + assign B2 = in[0] | in[1]; + assign B3 = in[0] ~& in[1]; + assign B4 = in[0] ~| in[1]; + assign B5 = in[0] ^ in[1]; + assign B6 = in[0] ~^ in[1]; + assign B7 = ~in[0]; + assign B8 = in[0]; + assign B9 = in[0:1] && in [2:3]; + assign B10 = in[0:1] || in [2:3]; +endmodule diff --git a/ql-qlf-k4n8-plugin/tests/logic/logic.ys b/ql-qlf-k4n8-plugin/tests/logic/logic.ys new file mode 100644 index 000000000..ae40af153 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/logic/logic.ys @@ -0,0 +1,9 @@ +read_verilog ../common/logic.v +hierarchy -top top +proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic +design -load postopt +cd top + +stat +select -assert-count 9 t:$lut diff --git a/ql-qlf-k4n8-plugin/tests/ql_qlf_k4n8/run-test.sh b/ql-qlf-k4n8-plugin/tests/ql_qlf_k4n8/run-test.sh new file mode 100755 index 000000000..bf19b887d --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/ql_qlf_k4n8/run-test.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -e +{ +echo "all::" +for x in *.ys; do + echo "all:: run-$x" + echo "run-$x:" + echo " @echo 'Running $x..'" + echo " @../../../yosys -ql ${x%.ys}.log -w 'Yosys has only limited support for tri-state logic at the moment.' $x" +done +for s in *.sh; do + if [ "$s" != "run-test.sh" ]; then + echo "all:: run-$s" + echo "run-$s:" + echo " @echo 'Running $s..'" + echo " @bash $s" + fi +done +} > run-test.mk +exec ${MAKE:-make} -f run-test.mk diff --git a/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl b/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl new file mode 100644 index 000000000..7f5466546 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl @@ -0,0 +1,17 @@ +yosys -import +if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +yosys -import ;# ingest plugin commands + +# Equivalence check for adder synthesis +read_verilog -icells -DWIDTH=4 soft_adder.v +hierarchy -check -top adder +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 + +design -reset + +# Equivalence check for subtractor synthesis +read_verilog -icells -DWIDTH=4 soft_adder.v +hierarchy -check -top subtractor +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 diff --git a/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.v b/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.v new file mode 100644 index 000000000..124341de4 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.v @@ -0,0 +1,21 @@ +module adder ( + input wire [`WIDTH-1:0] A, + input wire [`WIDTH-1:0] B, + output wire [`WIDTH :0] S, +); + + // Implicit adder + assign S = A + B; + +endmodule + +module subtractor ( + input wire [`WIDTH-1:0] A, + input wire [`WIDTH-1:0] B, + output wire [`WIDTH :0] S, +); + + // Implicit subtractor + assign S = A - B; + +endmodule From dd34e72e6720450a158d7ffc8d75cf81831a749b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 11 Mar 2021 19:33:31 +0100 Subject: [PATCH 277/845] Added a dfflegalize pass to the qlf_k4n8 flow Signed-off-by: Maciej Kurc --- ql-qlf-k4n8-plugin/synth_quicklogic.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ql-qlf-k4n8-plugin/synth_quicklogic.cc b/ql-qlf-k4n8-plugin/synth_quicklogic.cc index b7909e409..01e27f19c 100644 --- a/ql-qlf-k4n8-plugin/synth_quicklogic.cc +++ b/ql-qlf-k4n8-plugin/synth_quicklogic.cc @@ -203,6 +203,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_merge"); run("opt_clean"); run("opt"); + run("dfflegalize -cell $_DFF_P_ 0"); } if (check_label("map_luts")) { From e26a74e20bf3b2af6b6a0b4915a0bd7f7639384a Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 11 Mar 2021 19:33:57 +0100 Subject: [PATCH 278/845] Fixed tests for qlf_k4n8 so that they check features supported by the targetted device Signed-off-by: Maciej Kurc --- ql-qlf-k4n8-plugin/tests/Makefile | 3 ++- ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl | 15 +-------------- ql-qlf-k4n8-plugin/tests/dffs/dffs.v | 18 ------------------ 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/ql-qlf-k4n8-plugin/tests/Makefile b/ql-qlf-k4n8-plugin/tests/Makefile index b0c98f8ca..fbb22434f 100644 --- a/ql-qlf-k4n8-plugin/tests/Makefile +++ b/ql-qlf-k4n8-plugin/tests/Makefile @@ -1,6 +1,7 @@ +# The latch test is disabled as latches are not supported in the qlf_k4n8. + TESTS = dffs \ iob_no_flatten \ - latches \ soft_adder \ logic diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl index ba968b773..78b1abcff 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl @@ -5,7 +5,7 @@ yosys -import ;# ingest plugin commands read_verilog dffs.v design -save read -# DFF +# qlf_k4n8 supports only DFF w/o set and reset hierarchy -top my_dff yosys proc equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -top my_dff @@ -14,16 +14,3 @@ yosys cd my_dff stat select -assert-count 1 t:*_DFF_P_ -# DFFC -design -load read -synth_quicklogic -top my_dffc -yosys cd my_dffc -stat -select -assert-count 1 t:*DFF_P* - -# DFFP -design -load read -synth_quicklogic -top my_dffp -yosys cd my_dffp -stat -select -assert-count 1 t:*DFF_P* diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v index 32f02b63e..33a961760 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v @@ -4,21 +4,3 @@ module my_dff ( input d, clk, output reg q ); q <= d; endmodule -module my_dffc ( input d, clk, clr, output reg q ); - initial q <= 1'b0; - always @( posedge clk or posedge clr ) - if ( clr ) - q <= 1'b0; - else - q <= d; -endmodule - -module my_dffp ( input d, clk, pre, output reg q ); - initial q <= 1'b0; - always @( posedge clk or posedge pre ) - if ( pre ) - q <= 1'b1; - else - q <= d; -endmodule - From 886ddcf507749826f4023b9e1a26bf37ef423569 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 12 Mar 2021 12:45:06 +0100 Subject: [PATCH 279/845] Integrated support for qlf_k4n8 async set/reset flip-flops Signed-off-by: Maciej Kurc --- ql-qlf-k4n8-plugin/Makefile | 2 +- ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v | 64 ++++++++++++++++++++ ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v | 80 +++++++++++++++++++++++++ ql-qlf-k4n8-plugin/synth_quicklogic.cc | 8 ++- 4 files changed, 151 insertions(+), 3 deletions(-) create mode 100644 ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v diff --git a/ql-qlf-k4n8-plugin/Makefile b/ql-qlf-k4n8-plugin/Makefile index bf201eb64..5f1dd8354 100644 --- a/ql-qlf-k4n8-plugin/Makefile +++ b/ql-qlf-k4n8-plugin/Makefile @@ -2,7 +2,7 @@ NAME = ql-qlf-k4n8 SOURCES = synth_quicklogic.cc include ../Makefile_plugin.common -VERILOG_MODULES = cells_sim.v qlf_k4n8_arith_map.v qlf_k4n8_cells_sim.v +VERILOG_MODULES = cells_sim.v qlf_k4n8_arith_map.v qlf_k4n8_cells_sim.v qlf_k4n8_ffs_map.v install_modules: $(VERILOG_MODULES) $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);) diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v b/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v index a66a88d67..4f3e5ba18 100644 --- a/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v @@ -68,3 +68,67 @@ module scff( always @(posedge clk) Q <= D; endmodule + +(* abc9_flop, lib_whitebox *) +module dff( + output reg Q, + input D, + (* clkbuf_sink *) + input C +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge C) + Q <= D; +endmodule + +(* abc9_flop, lib_whitebox *) +module dffr( + output reg Q, + input D, + (* clkbuf_sink *) + input C, + input R +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge C or negedge R) + if (!R) + Q <= 1'b0; + else + Q <= D; +endmodule + +(* abc9_flop, lib_whitebox *) +module sh_dff( + output reg Q, + input D, + (* clkbuf_sink *) + input C +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge C) + Q <= D; +endmodule + +(* abc9_flop, lib_whitebox *) +module dffs( + output reg Q, + input D, + (* clkbuf_sink *) + input C, + input S +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge C or negedge S) + if (!S) + Q <= 1'b1; + else + Q <= D; +endmodule diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v b/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v new file mode 100644 index 000000000..d852f7330 --- /dev/null +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v @@ -0,0 +1,80 @@ +module \$_DFF_P_ (D, Q, C); + input D; + input C; + output Q; + dff _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C)); +endmodule + +module \$_DFF_PN0_ (D, Q, C, R); + input D; + input C; + input R; + output Q; + dffr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R)); +endmodule + +module \$_DFF_PP0_ (D, Q, C, R); + input D; + input C; + input R; + output Q; + dffr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R)); +endmodule + +module \$_DFF_PN1_ (D, Q, C, R); + input D; + input C; + input R; + output Q; + dffs _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(R)); +endmodule + +module \$_DFF_PP1_ (D, Q, C, R); + input D; + input C; + input R; + output Q; + dffs _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(!R)); +endmodule + +module \$__SHREG_DFF_P_ (D, Q, C); + input D; + input C; + output Q; + + parameter DEPTH = 2; + reg [DEPTH-2:0] q; + //wire [DEPTH-1:0] d; + genvar i; + assign d[0] = D; + generate for (i = 0; i < DEPTH; i = i + 1) begin: slice + + + // First in chain + generate if (i == 0) begin + sh_dff #() _TECHMAP_REPLACE_ ( + .Q(q[i]), + .D(D), + .C(C) + ); + end endgenerate + // Middle in chain + generate if (i > 0 && i != DEPTH-1) begin + sh_dff #() _TECHMAP_REPLACE_ ( + .Q(q[i]), + .D(q[i-1]), + .C(C) + ); + end endgenerate + // Last in chain + generate if (i == DEPTH-1) begin + sh_dff #() _TECHMAP_REPLACE_ ( + .Q(Q), + .D(q[i-1]), + .C(C) + ); + end endgenerate + end: slice + endgenerate + +endmodule diff --git a/ql-qlf-k4n8-plugin/synth_quicklogic.cc b/ql-qlf-k4n8-plugin/synth_quicklogic.cc index 01e27f19c..baeb045c7 100644 --- a/ql-qlf-k4n8-plugin/synth_quicklogic.cc +++ b/ql-qlf-k4n8-plugin/synth_quicklogic.cc @@ -196,14 +196,18 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_ffs")) { - + std::string techMapArgs = " -map +/quicklogic/" + family + "_ffs_map.v"; + if (family == "qlf_k4n8") { + run("shregmap -minlen 8 -maxlen 8"); + } + run("techmap " + techMapArgs); run("opt_expr -mux_undef"); run("simplemap"); run("opt_expr"); run("opt_merge"); run("opt_clean"); run("opt"); - run("dfflegalize -cell $_DFF_P_ 0"); + run("dfflegalize -cell $_DFF_P_ x -cell $_DFF_P??_ x"); } if (check_label("map_luts")) { From 4692d971108146be3a1c6ffbd8042cbb982b97c0 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 12 Mar 2021 12:46:32 +0100 Subject: [PATCH 280/845] Updated tests for qlf_k4n8 ff reset features Signed-off-by: Maciej Kurc --- ql-qlf-k4n8-plugin/tests/Makefile | 2 ++ ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl | 33 +++++++++++++++-- ql-qlf-k4n8-plugin/tests/dffs/dffs.v | 36 +++++++++++++++++++ .../tests/iob_no_flatten/iob_no_flatten.tcl | 2 +- ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl | 8 +++++ ql-qlf-k4n8-plugin/tests/shreg/shreg.v | 14 ++++++++ 6 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl create mode 100644 ql-qlf-k4n8-plugin/tests/shreg/shreg.v diff --git a/ql-qlf-k4n8-plugin/tests/Makefile b/ql-qlf-k4n8-plugin/tests/Makefile index fbb22434f..dc2ebad86 100644 --- a/ql-qlf-k4n8-plugin/tests/Makefile +++ b/ql-qlf-k4n8-plugin/tests/Makefile @@ -1,6 +1,7 @@ # The latch test is disabled as latches are not supported in the qlf_k4n8. TESTS = dffs \ + shreg \ iob_no_flatten \ soft_adder \ logic @@ -8,6 +9,7 @@ TESTS = dffs \ include $(shell pwd)/../../Makefile_test.common dffs_verify = true +shreg_verify = true iob_no_flatten_verify = true latches_verify = true soft_adder_verify = true diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl index 78b1abcff..31fd59461 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl @@ -5,12 +5,41 @@ yosys -import ;# ingest plugin commands read_verilog dffs.v design -save read -# qlf_k4n8 supports only DFF w/o set and reset +# DFF hierarchy -top my_dff yosys proc equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -top my_dff design -load postopt yosys cd my_dff stat -select -assert-count 1 t:*_DFF_P_ +select -assert-count 1 t:dff +# DFFR (posedge RST) +design -load read +synth_quicklogic -top my_dffr_p +yosys cd my_dffr_p +stat +select -assert-count 1 t:dffr +select -assert-count 1 t:\$lut + +# DFFR (negedge RST) +design -load read +synth_quicklogic -top my_dffr_n +yosys cd my_dffr_n +stat +select -assert-count 1 t:dffr + +# DFFS (posedge SET) +design -load read +synth_quicklogic -top my_dffs_p +yosys cd my_dffs_p +stat +select -assert-count 1 t:dffs +select -assert-count 1 t:\$lut + +# DFFS (negedge SET) +design -load read +synth_quicklogic -top my_dffs_n +yosys cd my_dffs_n +stat +select -assert-count 1 t:dffs diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v index 33a961760..f711a70fd 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v @@ -4,3 +4,39 @@ module my_dff ( input d, clk, output reg q ); q <= d; endmodule +module my_dffr_p ( input d, clk, clr, output reg q ); + initial q <= 1'b0; + always @( posedge clk or posedge clr ) + if ( clr ) + q <= 1'b0; + else + q <= d; +endmodule + +module my_dffr_n ( input d, clk, clr, output reg q ); + initial q <= 1'b0; + always @( posedge clk or negedge clr ) + if ( !clr ) + q <= 1'b0; + else + q <= d; +endmodule + +module my_dffs_p ( input d, clk, pre, output reg q ); + initial q <= 1'b0; + always @( posedge clk or posedge pre ) + if ( pre ) + q <= 1'b1; + else + q <= d; +endmodule + +module my_dffs_n ( input d, clk, pre, output reg q ); + initial q <= 1'b0; + always @( posedge clk or negedge pre ) + if ( !pre ) + q <= 1'b1; + else + q <= d; +endmodule + diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl index d9b0fa039..9789e8476 100644 --- a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl +++ b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl @@ -7,4 +7,4 @@ read_verilog iob_no_flatten.v synth_quicklogic -top my_top yosys stat yosys cd my_top -select -assert-count 2 t:\$_DFF_P_ +select -assert-count 2 t:dff diff --git a/ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl b/ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl new file mode 100644 index 000000000..0fcbdf453 --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl @@ -0,0 +1,8 @@ +yosys -import +if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +yosys -import ;# ingest plugin commands + +read_verilog shreg.v +synth_quicklogic -top top +stat +select -assert-count 8 t:sh_dff diff --git a/ql-qlf-k4n8-plugin/tests/shreg/shreg.v b/ql-qlf-k4n8-plugin/tests/shreg/shreg.v new file mode 100644 index 000000000..af358ea4c --- /dev/null +++ b/ql-qlf-k4n8-plugin/tests/shreg/shreg.v @@ -0,0 +1,14 @@ +module top ( + input wire I, + input wire C, + output wire O +); + + reg [7:0] shift_register; + + always @(posedge C) + shift_register <= {shift_register[6:0], I}; + + assign O = shift_register[7]; + +endmodule From 7e5557259154c2fcd72c3a29cd2f20f8666106cf Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 17 Mar 2021 15:43:37 -0700 Subject: [PATCH 281/845] Add formatting option for verilog files. Make this a separate format-verilog target for now, as not everyone has verible installed and there are a few files that it can't format (the \$_BUF_ stuff in particular). Simplify double-line format call with single line for c++ formatting. Set editorconfig to the standard indentation according to styleguide. Signed-off-by: Henner Zeller --- .editorconfig | 4 ++++ Makefile | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 3d5437b5d..01caaf812 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,7 @@ trim_trailing_whitespace = true [*.{h,cc,tcl}] indent_style = space indent_size = 4 + +[*.{v,sv}] +indent_style = space +indent_size = 2 diff --git a/Makefile b/Makefile index 41d358ae7..6cd041d54 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,10 @@ test: $(PLUGINS_TEST) clean: $(PLUGINS_CLEAN) CLANG_FORMAT ?= clang-format-5.0 + format: - find . -name \*.cc -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i - find . -name \*.h -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i + find . \( -name "*.h" -o -name "*.cc" \) -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i + +VERIBLE_FORMAT ?=verible-verilog-format +format-verilog: + find */tests \( -name "*.v" -o -name "*.sv" \) -and -not -path './third_party/*' -print0 | xargs -0 $(VERIBLE_FORMAT) --inplace From 2772ee7bc7f939731c314e0a9837597fa8bdcb4f Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 17 Mar 2021 15:49:27 -0700 Subject: [PATCH 282/845] Remove unnecesary added newline. Signed-off-by: Henner Zeller --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 6cd041d54..46a19697a 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,6 @@ test: $(PLUGINS_TEST) clean: $(PLUGINS_CLEAN) CLANG_FORMAT ?= clang-format-5.0 - format: find . \( -name "*.h" -o -name "*.cc" \) -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i From 53d43e2f17daff2777241c0ecfb426c6ca8b69f3 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 17 Mar 2021 15:50:52 -0700 Subject: [PATCH 283/845] Initial run of verilog formatting. Signed-off-by: Henner Zeller --- .../tests/get_cells/get_cells.v | 152 +- .../tests/get_nets/get_nets.v | 148 +- .../tests/get_pins/get_pins.v | 149 +- .../tests/get_ports/get_ports.v | 148 +- .../selection_to_tcl_list.v | 76 +- params-plugin/tests/pll/pll.v | 110 +- params-plugin/tests/pll/techmaps/cells_map.v | 727 +- params-plugin/tests/pll/techmaps/cells_sim.v | 51 +- ql-iob-plugin/tests/ckpad/design.v | 20 +- ql-iob-plugin/tests/common/pp3_cells_map.v | 18 +- ql-iob-plugin/tests/common/pp3_cells_sim.v | 39 +- ql-iob-plugin/tests/sdiomux/design.v | 14 +- ql-qlf-k4n8-plugin/tests/dffs/dffs.v | 79 +- .../tests/iob_no_flatten/iob_no_flatten.v | 43 +- ql-qlf-k4n8-plugin/tests/latches/latches.v | 44 +- ql-qlf-k4n8-plugin/tests/logic/logic.v | 34 +- ql-qlf-k4n8-plugin/tests/shreg/shreg.v | 7 +- sdc-plugin/tests/abc9/abc9.v | 21 +- sdc-plugin/tests/counter/counter.v | 76 +- sdc-plugin/tests/counter2/counter2.v | 76 +- sdc-plugin/tests/get_clocks/get_clocks.v | 111 +- sdc-plugin/tests/period_check/period_check.v | 77 +- .../period_format_check/period_format_check.v | 77 +- sdc-plugin/tests/pll/pll.v | 160 +- .../tests/pll_approx_equal/pll_approx_equal.v | 160 +- .../pll_dangling_wires/pll_dangling_wires.v | 70 +- sdc-plugin/tests/pll_div/pll_div.v | 160 +- .../tests/pll_fbout_phase/pll_fbout_phase.v | 160 +- .../tests/pll_propagated/pll_propagated.v | 160 +- .../restore_from_json/restore_from_json.v | 14 +- .../tests/set_clock_groups/set_clock_groups.v | 148 +- .../tests/set_false_path/set_false_path.v | 148 +- .../tests/set_max_delay/set_max_delay.v | 148 +- .../tests/waveform_check/waveform_check.v | 77 +- xdc-plugin/tests/counter/counter.v | 132 +- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v | 148 +- .../minilitex_ddr_arty/minilitex_ddr_arty.v | 25171 ++++++++-------- xdc-plugin/tests/package_pins/package_pins.v | 148 +- xdc-plugin/tests/port_indexes/port_indexes.v | 132 +- 39 files changed, 15093 insertions(+), 14340 deletions(-) diff --git a/design_introspection-plugin/tests/get_cells/get_cells.v b/design_introspection-plugin/tests/get_cells/get_cells.v index e2af7fc58..3a6f2ebea 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.v +++ b/design_introspection-plugin/tests/get_cells/get_cells.v @@ -1,77 +1,105 @@ module top ( - (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b, - output signal_p, - output signal_n + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) - OBUFTDS OBUFTDS_2( - .I(LD6), - .O(signal_p), - .OB(signal_n), - .T(1'b1) - ); - (* async_reg = "false", mr_ff = "false", dont_touch = "true" *) - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + (* async_reg = "false", mr_ff = "false", dont_touch = "true" *) + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/design_introspection-plugin/tests/get_nets/get_nets.v b/design_introspection-plugin/tests/get_nets/get_nets.v index d40055b17..33c580513 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.v +++ b/design_introspection-plugin/tests/get_nets/get_nets.v @@ -1,75 +1,103 @@ module top ( - (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b, - output signal_p, - output signal_n + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUFTDS OBUFTDS_2( - .I(LD6), - .O(signal_p), - .OB(signal_n), - .T(1'b1) - ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/design_introspection-plugin/tests/get_pins/get_pins.v b/design_introspection-plugin/tests/get_pins/get_pins.v index bf081295f..443e29408 100644 --- a/design_introspection-plugin/tests/get_pins/get_pins.v +++ b/design_introspection-plugin/tests/get_pins/get_pins.v @@ -1,76 +1,105 @@ module top ( - (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b, - output signal_p, - output signal_n + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUFTDS OBUFTDS_2( - .I(LD6), - .O(signal_p), - .OB(signal_n), - .T(1'b1) - ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6((* test_attr = "true" *) .I(LD6), .O(led[0])); - (* dont_touch = "true" *) OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - (* dont_touch = "true" *) OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + (* test_attr = "true" *) + .I(LD6), + .O(led[0]) + ); + (* dont_touch = "true" *) OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + (* dont_touch = "true" *) OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule (* async_reg = "true", mr_ff = "false", dont_touch = "true" *) module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/design_introspection-plugin/tests/get_ports/get_ports.v b/design_introspection-plugin/tests/get_ports/get_ports.v index d40055b17..33c580513 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.v +++ b/design_introspection-plugin/tests/get_ports/get_ports.v @@ -1,75 +1,103 @@ module top ( - (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b, - output signal_p, - output signal_n + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUFTDS OBUFTDS_2( - .I(LD6), - .O(signal_p), - .OB(signal_n), - .T(1'b1) - ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v b/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v index 564fae58f..88e9f9e1f 100644 --- a/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v +++ b/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v @@ -1,36 +1,58 @@ -module top(input clk, - input clk2, - input [1:0] in, - output [5:0] out ); +module top ( + input clk, + input clk2, + input [1:0] in, + output [5:0] out +); -reg [1:0] cnt = 0; -wire clk_int_1, clk_int_2; -IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); -IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); -assign clk_int_1 = ibuf_out; -assign clk_int_2 = clk_int_1; + reg [1:0] cnt = 0; + wire clk_int_1, clk_int_2; + IBUF ibuf_proxy ( + .I(clk), + .O(ibuf_proxy_out) + ); + IBUF ibuf_inst ( + .I(ibuf_proxy_out), + .O(ibuf_out) + ); + assign clk_int_1 = ibuf_out; + assign clk_int_2 = clk_int_1; -always @(posedge clk_int_2) begin - cnt <= cnt + 1; -end + always @(posedge clk_int_2) begin + cnt <= cnt + 1; + end -middle middle_inst_1(.clk(ibuf_out), .out(out[2])); -middle middle_inst_2(.clk(clk_int_1), .out(out[3])); -middle middle_inst_3(.clk(clk_int_2), .out(out[4])); -middle middle_inst_4(.clk(clk2), .out(out[5])); + middle middle_inst_1 ( + .clk(ibuf_out), + .out(out[2]) + ); + middle middle_inst_2 ( + .clk(clk_int_1), + .out(out[3]) + ); + middle middle_inst_3 ( + .clk(clk_int_2), + .out(out[4]) + ); + middle middle_inst_4 ( + .clk(clk2), + .out(out[5]) + ); -assign out[1:0] = {cnt[0], in[0]}; + assign out[1:0] = {cnt[0], in[0]}; endmodule -module middle(input clk, - output out); +module middle ( + input clk, + output out +); -reg [1:0] cnt = 0; -wire clk_int; -assign clk_int = clk; -always @(posedge clk_int) begin - cnt <= cnt + 1; -end + reg [1:0] cnt = 0; + wire clk_int; + assign clk_int = clk; + always @(posedge clk_int) begin + cnt <= cnt + 1; + end -assign out = cnt[0]; + assign out = cnt[0]; endmodule diff --git a/params-plugin/tests/pll/pll.v b/params-plugin/tests/pll/pll.v index b6ddcea53..fdc3ad948 100644 --- a/params-plugin/tests/pll/pll.v +++ b/params-plugin/tests/pll/pll.v @@ -1,61 +1,61 @@ -module top( - (* dont_touch = "true" *) input clk100, - input cpu_reset, - output [2:0] led +module top ( + (* dont_touch = "true" *) input clk100, + input cpu_reset, + output [2:0] led ); -wire [2:0] led; -wire builder_pll_fb; + wire [2:0] led; + wire builder_pll_fb; -assign led[0] = main_locked; -assign led[1] = main_clkout0; -assign led[2] = main_clkout1; + assign led[0] = main_locked; + assign led[1] = main_clkout0; + assign led[2] = main_clkout1; -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(5'd20), - .CLKOUT0_PHASE(1'd0), - .CLKOUT1_DIVIDE(3'd5), - .CLKOUT1_PHASE(1'd0), - .CLKOUT2_DIVIDE(3'd5), - .CLKOUT2_PHASE(7'd70), - .CLKOUT3_DIVIDE(3'd6), - .CLKOUT3_PHASE(1'd0), - .DIVCLK_DIVIDE(1'd1), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV_0 ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(clk100), - .RST(cpu_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout0), - .CLKOUT1(main_clkout1), - .LOCKED(main_locked) -); -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(5'd20), - .CLKOUT0_PHASE(1'd0), - .CLKOUT1_DIVIDE(3'd5), - .CLKOUT1_PHASE(1'd0), - .CLKOUT2_DIVIDE(3'd5), - .CLKOUT2_PHASE(7'd90), - .CLKOUT3_DIVIDE(3'd6), - .CLKOUT3_PHASE(1'd0), - .DIVCLK_DIVIDE(1'd1), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(clk100), - .RST(cpu_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout0), - .CLKOUT1(main_clkout1), - .LOCKED(main_locked) -); + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(5'd20), + .CLKOUT0_PHASE(1'd0), + .CLKOUT1_DIVIDE(3'd5), + .CLKOUT1_PHASE(1'd0), + .CLKOUT2_DIVIDE(3'd5), + .CLKOUT2_PHASE(7'd70), + .CLKOUT3_DIVIDE(3'd6), + .CLKOUT3_PHASE(1'd0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV_0 ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk100), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .LOCKED(main_locked) + ); + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(5'd20), + .CLKOUT0_PHASE(1'd0), + .CLKOUT1_DIVIDE(3'd5), + .CLKOUT1_PHASE(1'd0), + .CLKOUT2_DIVIDE(3'd5), + .CLKOUT2_PHASE(7'd90), + .CLKOUT3_DIVIDE(3'd6), + .CLKOUT3_PHASE(1'd0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk100), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .LOCKED(main_locked) + ); endmodule diff --git a/params-plugin/tests/pll/techmaps/cells_map.v b/params-plugin/tests/pll/techmaps/cells_map.v index f868665e5..baac0a134 100644 --- a/params-plugin/tests/pll/techmaps/cells_map.v +++ b/params-plugin/tests/pll/techmaps/cells_map.v @@ -1,88 +1,77 @@ // ============================================================================ // CMT -`define PLL_FRAC_PRECISION 10 -`define PLL_FIXED_WIDTH 32 +`define PLL_FRAC_PRECISION 10 +`define PLL_FIXED_WIDTH 32 // Rounds a fixed point number to a given precision -function [`PLL_FIXED_WIDTH:1] pll_round_frac -( -input [`PLL_FIXED_WIDTH:1] decimal, -input [`PLL_FIXED_WIDTH:1] precision -); +function [`PLL_FIXED_WIDTH:1] pll_round_frac(input [`PLL_FIXED_WIDTH:1] decimal, + input [`PLL_FIXED_WIDTH:1] precision); - if (decimal[(`PLL_FRAC_PRECISION - precision)] == 1'b1) begin - pll_round_frac = decimal + (1'b1 << (`PLL_FRAC_PRECISION - precision)); - end else begin - pll_round_frac = decimal; - end + if (decimal[(`PLL_FRAC_PRECISION-precision)] == 1'b1) begin + pll_round_frac = decimal + (1'b1 << (`PLL_FRAC_PRECISION - precision)); + end else begin + pll_round_frac = decimal; + end endfunction // Computes content of the PLLs divider registers -function [13:0] pll_divider_regs -( -input [ 7:0] divide, // Max divide is 128 -input [31:0] duty_cycle // Duty cycle is multiplied by 100,000 +function [13:0] pll_divider_regs(input [7:0] divide, // Max divide is 128 + input [31:0] duty_cycle // Duty cycle is multiplied by 100,000 ); reg [`PLL_FIXED_WIDTH:1] duty_cycle_fix; reg [`PLL_FIXED_WIDTH:1] duty_cycle_min; reg [`PLL_FIXED_WIDTH:1] duty_cycle_max; - reg [6:0] high_time; - reg [6:0] low_time; - reg w_edge; - reg no_count; + reg [ 6:0] high_time; + reg [ 6:0] low_time; + reg w_edge; + reg no_count; reg [`PLL_FIXED_WIDTH:1] temp; if (divide >= 64) begin - duty_cycle_min = ((divide - 64) * 100_000) / divide; - duty_cycle_max = (645 / divide) * 100_00; - if (duty_cycle > duty_cycle_max) - duty_cycle = duty_cycle_max; - if (duty_cycle < duty_cycle_min) - duty_cycle = duty_cycle_min; + duty_cycle_min = ((divide - 64) * 100_000) / divide; + duty_cycle_max = (645 / divide) * 100_00; + if (duty_cycle > duty_cycle_max) duty_cycle = duty_cycle_max; + if (duty_cycle < duty_cycle_min) duty_cycle = duty_cycle_min; end duty_cycle_fix = (duty_cycle << `PLL_FRAC_PRECISION) / 100_000; if (divide == 7'h01) begin - high_time = 7'h01; - w_edge = 1'b0; - low_time = 7'h01; - no_count = 1'b1; + high_time = 7'h01; + w_edge = 1'b0; + low_time = 7'h01; + no_count = 1'b1; end else begin - temp = pll_round_frac(duty_cycle_fix*divide, 1); + temp = pll_round_frac(duty_cycle_fix*divide, 1); - high_time = temp[`PLL_FRAC_PRECISION+7:`PLL_FRAC_PRECISION+1]; - w_edge = temp[`PLL_FRAC_PRECISION]; + high_time = temp[`PLL_FRAC_PRECISION+7:`PLL_FRAC_PRECISION+1]; + w_edge = temp[`PLL_FRAC_PRECISION]; - if (high_time == 7'h00) begin - high_time = 7'h01; - w_edge = 1'b0; - end + if (high_time == 7'h00) begin + high_time = 7'h01; + w_edge = 1'b0; + end - if (high_time == divide) begin - high_time = divide - 1; - w_edge = 1'b1; - end + if (high_time == divide) begin + high_time = divide - 1; + w_edge = 1'b1; + end - low_time = divide - high_time; - no_count = 1'b0; + low_time = divide - high_time; + no_count = 1'b0; end pll_divider_regs = {w_edge, no_count, high_time[5:0], low_time[5:0]}; endfunction // Computes the PLLs phase shift registers -function [10:0] pll_phase_regs -( -input [ 7:0] divide, -input signed [31:0] phase -); +function [10:0] pll_phase_regs(input [7:0] divide, input signed [31:0] phase); reg [`PLL_FIXED_WIDTH:1] phase_in_cycles; reg [`PLL_FIXED_WIDTH:1] phase_fixed; @@ -92,51 +81,52 @@ input signed [31:0] phase reg [`PLL_FIXED_WIDTH:1] temp; - if(phase < 0) begin - phase_fixed = ((phase + 360000) << `PLL_FRAC_PRECISION) / 1000; + if (phase < 0) begin + phase_fixed = ((phase + 360000) << `PLL_FRAC_PRECISION) / 1000; end else begin - phase_fixed = (phase << `PLL_FRAC_PRECISION) / 1000; + phase_fixed = (phase << `PLL_FRAC_PRECISION) / 1000; end - phase_in_cycles = (phase_fixed * divide) / 360; - temp = pll_round_frac(phase_in_cycles, 3); + phase_in_cycles = (phase_fixed * divide) / 360; + temp = pll_round_frac(phase_in_cycles, 3); - mx = 2'b00; - phase_mux = temp[`PLL_FRAC_PRECISION:`PLL_FRAC_PRECISION-2]; - delay_time = temp[`PLL_FRAC_PRECISION+6:`PLL_FRAC_PRECISION+1]; + mx = 2'b00; + phase_mux = temp[`PLL_FRAC_PRECISION:`PLL_FRAC_PRECISION-2]; + delay_time = temp[`PLL_FRAC_PRECISION+6:`PLL_FRAC_PRECISION+1]; - pll_phase_regs = {mx, phase_mux, delay_time}; + pll_phase_regs = {mx, phase_mux, delay_time}; endfunction // Given PLL/MMCM divide, duty_cycle and phase calculates content of the // CLKREG1 and CLKREG2. -function [37:0] pll_clkregs -( -input [7:0] divide, // Max divide is 128 -input [31:0] duty_cycle, // Multiplied by 100,000 -input signed [31:0] phase // Phase is given in degrees (-360,000 to 360,000) +function [37:0] pll_clkregs(input [7:0] divide, // Max divide is 128 + input [31:0] duty_cycle, // Multiplied by 100,000 + input signed [31:0] phase // Phase is given in degrees (-360,000 to 360,000) ); - reg [13:0] pll_div; // EDGE, NO_COUNT, HIGH_TIME[5:0], LOW_TIME[5:0] - reg [10:0] pll_phase; // MX, PHASE_MUX[2:0], DELAY_TIME[5:0] + reg [13:0] pll_div; // EDGE, NO_COUNT, HIGH_TIME[5:0], LOW_TIME[5:0] + reg [10:0] pll_phase; // MX, PHASE_MUX[2:0], DELAY_TIME[5:0] pll_div = pll_divider_regs(divide, duty_cycle); pll_phase = pll_phase_regs(divide, phase); pll_clkregs = { // CLKREG2: RESERVED[6:0], MX[1:0], EDGE, NO_COUNT, DELAY_TIME[5:0] - 6'h00, pll_phase[10:9], pll_div[13:12], pll_phase[5:0], + 6'h00, + pll_phase[10:9], + pll_div[13:12], + pll_phase[5:0], // CLKREG1: PHASE_MUX[3:0], RESERVED, HIGH_TIME[5:0], LOW_TIME[5:0] - pll_phase[8:6], 1'b0, pll_div[11:0] + pll_phase[8:6], + 1'b0, + pll_div[11:0] }; endfunction // This function takes the divide value and outputs the necessary lock values -function [39:0] pll_lktable_lookup -( -input [6:0] divide // Max divide is 64 +function [39:0] pll_lktable_lookup(input [6:0] divide // Max divide is 64 ); reg [2559:0] lookup; @@ -208,24 +198,21 @@ input [6:0] divide // Max divide is 64 40'b11111_11111_0011111010_1111101001_0000000001, 40'b11111_11111_0011111010_1111101001_0000000001, 40'b11111_11111_0011111010_1111101001_0000000001 - }; + }; - pll_lktable_lookup = lookup[ ((64-divide)*40) +: 40]; + pll_lktable_lookup = lookup[((64-divide)*40)+:40]; endfunction // This function takes the divide value and the bandwidth setting of the PLL // and outputs the digital filter settings necessary. -function [9:0] pll_table_lookup -( -input [6:0] divide, // Max divide is 64 -input [8*9:0] BANDWIDTH -); +function [9:0] pll_table_lookup(input [6:0] divide, // Max divide is 64 + input [8*9:0] BANDWIDTH); reg [639:0] lookup_low; reg [639:0] lookup_high; reg [639:0] lookup_optimized; - reg [9:0] lookup_entry; + reg [ 9:0] lookup_entry; lookup_low = { // CP_RES_LFHF @@ -432,11 +419,11 @@ input [8*9:0] BANDWIDTH }; if (BANDWIDTH == "LOW") begin - pll_table_lookup = lookup_low[((64-divide)*10) +: 10]; + pll_table_lookup = lookup_low[((64-divide)*10)+:10]; end else if (BANDWIDTH == "HIGH") begin - pll_table_lookup = lookup_high[((64-divide)*10) +: 10]; + pll_table_lookup = lookup_high[((64-divide)*10)+:10]; end else if (BANDWIDTH == "OPTIMIZED") begin - pll_table_lookup = lookup_optimized[((64-divide)*10) +: 10]; + pll_table_lookup = lookup_optimized[((64-divide)*10)+:10]; end endfunction @@ -448,63 +435,62 @@ endfunction // 1000 whereas the PHASE is expressed in degrees times 1000. // PLLE2_ADV -module PLLE2_ADV -( -input CLKFBIN, -input CLKIN1, -input CLKIN2, -input CLKINSEL, - -output CLKFBOUT, -output CLKOUT0, -output CLKOUT1, -output CLKOUT2, -output CLKOUT3, -output CLKOUT4, -output CLKOUT5, - -input PWRDWN, -input RST, -output LOCKED, - -input DCLK, -input DEN, -input DWE, -output DRDY, -input [ 6:0] DADDR, -input [15:0] DI, -output [15:0] DO +module PLLE2_ADV ( + input CLKFBIN, + input CLKIN1, + input CLKIN2, + input CLKINSEL, + + output CLKFBOUT, + output CLKOUT0, + output CLKOUT1, + output CLKOUT2, + output CLKOUT3, + output CLKOUT4, + output CLKOUT5, + + input PWRDWN, + input RST, + output LOCKED, + + input DCLK, + input DEN, + input DWE, + output DRDY, + input [ 6:0] DADDR, + input [15:0] DI, + output [15:0] DO ); parameter _TECHMAP_CONSTMSK_CLKINSEL_ = 0; parameter _TECHMAP_CONSTVAL_CLKINSEL_ = 0; - parameter _TECHMAP_CONSTMSK_RST_ = 0; - parameter _TECHMAP_CONSTVAL_RST_ = 0; - parameter _TECHMAP_CONSTMSK_PWRDWN_ = 0; - parameter _TECHMAP_CONSTVAL_PWRDWN_ = 0; + parameter _TECHMAP_CONSTMSK_RST_ = 0; + parameter _TECHMAP_CONSTVAL_RST_ = 0; + parameter _TECHMAP_CONSTMSK_PWRDWN_ = 0; + parameter _TECHMAP_CONSTVAL_PWRDWN_ = 0; parameter _TECHMAP_CONSTMSK_CLKFBOUT_ = 0; parameter _TECHMAP_CONSTVAL_CLKFBOUT_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT0_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT0_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT1_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT1_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT2_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT2_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT3_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT3_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT4_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT4_ = 0; - parameter _TECHMAP_CONSTMSK_CLKOUT5_ = 0; - parameter _TECHMAP_CONSTVAL_CLKOUT5_ = 0; - - parameter _TECHMAP_CONSTMSK_DCLK_ = 0; - parameter _TECHMAP_CONSTVAL_DCLK_ = 0; - parameter _TECHMAP_CONSTMSK_DEN_ = 0; - parameter _TECHMAP_CONSTVAL_DEN_ = 0; - parameter _TECHMAP_CONSTMSK_DWE_ = 0; - parameter _TECHMAP_CONSTVAL_DWE_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT0_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT0_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT1_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT1_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT2_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT2_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT3_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT3_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT4_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT4_ = 0; + parameter _TECHMAP_CONSTMSK_CLKOUT5_ = 0; + parameter _TECHMAP_CONSTVAL_CLKOUT5_ = 0; + + parameter _TECHMAP_CONSTMSK_DCLK_ = 0; + parameter _TECHMAP_CONSTVAL_DCLK_ = 0; + parameter _TECHMAP_CONSTMSK_DEN_ = 0; + parameter _TECHMAP_CONSTVAL_DEN_ = 0; + parameter _TECHMAP_CONSTMSK_DWE_ = 0; + parameter _TECHMAP_CONSTVAL_DWE_ = 0; parameter IS_CLKINSEL_INVERTED = 1'b0; parameter IS_RST_INVERTED = 1'b0; @@ -550,209 +536,205 @@ output [15:0] DO // Compute PLL's registers content localparam CLKFBOUT_REGS = pll_clkregs(CLKFBOUT_MULT, 50000, CLKFBOUT_PHASE); - localparam DIVCLK_REGS = pll_clkregs(DIVCLK_DIVIDE, 50000, 0); + localparam DIVCLK_REGS = pll_clkregs(DIVCLK_DIVIDE, 50000, 0); - localparam CLKOUT0_REGS = pll_clkregs(CLKOUT0_DIVIDE, CLKOUT0_DUTY_CYCLE, CLKOUT0_PHASE); - localparam CLKOUT1_REGS = pll_clkregs(CLKOUT1_DIVIDE, CLKOUT1_DUTY_CYCLE, CLKOUT1_PHASE); - localparam CLKOUT2_REGS = pll_clkregs(CLKOUT2_DIVIDE, CLKOUT2_DUTY_CYCLE, CLKOUT2_PHASE); - localparam CLKOUT3_REGS = pll_clkregs(CLKOUT3_DIVIDE, CLKOUT3_DUTY_CYCLE, CLKOUT3_PHASE); - localparam CLKOUT4_REGS = pll_clkregs(CLKOUT4_DIVIDE, CLKOUT4_DUTY_CYCLE, CLKOUT4_PHASE); - localparam CLKOUT5_REGS = pll_clkregs(CLKOUT5_DIVIDE, CLKOUT5_DUTY_CYCLE, CLKOUT5_PHASE); + localparam CLKOUT0_REGS = pll_clkregs(CLKOUT0_DIVIDE, CLKOUT0_DUTY_CYCLE, CLKOUT0_PHASE); + localparam CLKOUT1_REGS = pll_clkregs(CLKOUT1_DIVIDE, CLKOUT1_DUTY_CYCLE, CLKOUT1_PHASE); + localparam CLKOUT2_REGS = pll_clkregs(CLKOUT2_DIVIDE, CLKOUT2_DUTY_CYCLE, CLKOUT2_PHASE); + localparam CLKOUT3_REGS = pll_clkregs(CLKOUT3_DIVIDE, CLKOUT3_DUTY_CYCLE, CLKOUT3_PHASE); + localparam CLKOUT4_REGS = pll_clkregs(CLKOUT4_DIVIDE, CLKOUT4_DUTY_CYCLE, CLKOUT4_PHASE); + localparam CLKOUT5_REGS = pll_clkregs(CLKOUT5_DIVIDE, CLKOUT5_DUTY_CYCLE, CLKOUT5_PHASE); // Handle inputs that should have certain logic levels when left unconnected - localparam INV_CLKINSEL = (_TECHMAP_CONSTMSK_CLKINSEL_ == 1) ? !_TECHMAP_CONSTVAL_CLKINSEL_ : + localparam INV_CLKINSEL = (_TECHMAP_CONSTMSK_CLKINSEL_ == 1) ? !_TECHMAP_CONSTVAL_CLKINSEL_ : (_TECHMAP_CONSTVAL_CLKINSEL_ == 0) ? IS_CLKINSEL_INVERTED : IS_CLKINSEL_INVERTED; - generate if (_TECHMAP_CONSTMSK_CLKINSEL_ == 1) begin - wire clkinsel = 1'b1; - end else if (_TECHMAP_CONSTVAL_CLKINSEL_ == 0) begin - wire clkinsel = 1'b1; - end else begin - wire clkinsel = CLKINSEL; - end endgenerate + generate + if (_TECHMAP_CONSTMSK_CLKINSEL_ == 1) begin + wire clkinsel = 1'b1; + end else if (_TECHMAP_CONSTVAL_CLKINSEL_ == 0) begin + wire clkinsel = 1'b1; + end else begin + wire clkinsel = CLKINSEL; + end + endgenerate localparam INV_PWRDWN = (_TECHMAP_CONSTMSK_PWRDWN_ == 1) ? !_TECHMAP_CONSTVAL_PWRDWN_ : (_TECHMAP_CONSTVAL_PWRDWN_ == 0) ? ~IS_PWRDWN_INVERTED : IS_PWRDWN_INVERTED; - generate if (_TECHMAP_CONSTMSK_PWRDWN_ == 1) begin - wire pwrdwn = 1'b1; - end else if (_TECHMAP_CONSTVAL_PWRDWN_ == 0) begin - wire pwrdwn = 1'b1; - end else begin - wire pwrdwn = PWRDWN; - end endgenerate + generate + if (_TECHMAP_CONSTMSK_PWRDWN_ == 1) begin + wire pwrdwn = 1'b1; + end else if (_TECHMAP_CONSTVAL_PWRDWN_ == 0) begin + wire pwrdwn = 1'b1; + end else begin + wire pwrdwn = PWRDWN; + end + endgenerate localparam INV_RST = (_TECHMAP_CONSTMSK_RST_ == 1) ? !_TECHMAP_CONSTVAL_PWRDWN_ : (_TECHMAP_CONSTVAL_RST_ == 0) ? ~IS_RST_INVERTED : IS_RST_INVERTED; - generate if (_TECHMAP_CONSTMSK_RST_ == 1) begin - wire rst = 1'b1; - end else if (_TECHMAP_CONSTVAL_RST_ == 0) begin - wire rst = 1'b1; - end else begin - wire rst = RST; - end endgenerate - - generate if (_TECHMAP_CONSTMSK_DCLK_ == 1) - wire dclk = _TECHMAP_CONSTVAL_DCLK_; - else if (_TECHMAP_CONSTVAL_DCLK_ == 0) - wire dclk = 1'b0; - else - wire dclk = DCLK; + generate + if (_TECHMAP_CONSTMSK_RST_ == 1) begin + wire rst = 1'b1; + end else if (_TECHMAP_CONSTVAL_RST_ == 0) begin + wire rst = 1'b1; + end else begin + wire rst = RST; + end + endgenerate + + generate + if (_TECHMAP_CONSTMSK_DCLK_ == 1) wire dclk = _TECHMAP_CONSTVAL_DCLK_; + else if (_TECHMAP_CONSTVAL_DCLK_ == 0) wire dclk = 1'b0; + else wire dclk = DCLK; endgenerate - generate if (_TECHMAP_CONSTMSK_DEN_ == 1) - wire den = _TECHMAP_CONSTVAL_DEN_; - else if (_TECHMAP_CONSTVAL_DEN_ == 0) - wire den = 1'b0; - else - wire den = DEN; + generate + if (_TECHMAP_CONSTMSK_DEN_ == 1) wire den = _TECHMAP_CONSTVAL_DEN_; + else if (_TECHMAP_CONSTVAL_DEN_ == 0) wire den = 1'b0; + else wire den = DEN; endgenerate - generate if (_TECHMAP_CONSTMSK_DWE_ == 1) - wire dwe = _TECHMAP_CONSTVAL_DWE_; - else if (_TECHMAP_CONSTVAL_DWE_ == 0) - wire dwe = 1'b0; - else - wire dwe = DWE; + generate + if (_TECHMAP_CONSTMSK_DWE_ == 1) wire dwe = _TECHMAP_CONSTVAL_DWE_; + else if (_TECHMAP_CONSTVAL_DWE_ == 0) wire dwe = 1'b0; + else wire dwe = DWE; endgenerate // The substituted cell - PLLE2_ADV_VPR # - ( - // Inverters - .INV_CLKINSEL(INV_CLKINSEL), - .ZINV_PWRDWN (INV_PWRDWN), - .ZINV_RST (INV_RST), - - // Straight mapped parameters - .STARTUP_WAIT(STARTUP_WAIT == "TRUE"), - - // Lookup tables - .LKTABLE(pll_lktable_lookup(CLKFBOUT_MULT)), - .TABLE(pll_table_lookup(CLKFBOUT_MULT, BANDWIDTH)), - - // FIXME: How to compute values the two below ? - .FILTREG1_RESERVED(12'b0000_00001000), - .LOCKREG3_RESERVED(1'b1), - - // Clock feedback settings - .CLKFBOUT_CLKOUT1_HIGH_TIME (CLKFBOUT_REGS[11:6]), - .CLKFBOUT_CLKOUT1_LOW_TIME (CLKFBOUT_REGS[5:0]), - .CLKFBOUT_CLKOUT1_PHASE_MUX (CLKFBOUT_REGS[15:13]), - .CLKFBOUT_CLKOUT2_DELAY_TIME (CLKFBOUT_REGS[21:16]), - .CLKFBOUT_CLKOUT2_EDGE (CLKFBOUT_REGS[23]), - .CLKFBOUT_CLKOUT2_NO_COUNT (CLKFBOUT_REGS[22]), - - // Internal VCO divider settings - .DIVCLK_DIVCLK_HIGH_TIME (DIVCLK_REGS[11:6]), - .DIVCLK_DIVCLK_LOW_TIME (DIVCLK_REGS[5:0]), - .DIVCLK_DIVCLK_NO_COUNT (DIVCLK_REGS[22]), - .DIVCLK_DIVCLK_EDGE (DIVCLK_REGS[23]), - - // CLKOUT0 - .CLKOUT0_CLKOUT1_HIGH_TIME (CLKOUT0_REGS[11:6]), - .CLKOUT0_CLKOUT1_LOW_TIME (CLKOUT0_REGS[5:0]), - .CLKOUT0_CLKOUT1_PHASE_MUX (CLKOUT0_REGS[15:13]), - .CLKOUT0_CLKOUT2_DELAY_TIME (CLKOUT0_REGS[21:16]), - .CLKOUT0_CLKOUT2_EDGE (CLKOUT0_REGS[23]), - .CLKOUT0_CLKOUT2_NO_COUNT (CLKOUT0_REGS[22]), - - // CLKOUT1 - .CLKOUT1_CLKOUT1_HIGH_TIME (CLKOUT1_REGS[11:6]), - .CLKOUT1_CLKOUT1_LOW_TIME (CLKOUT1_REGS[5:0]), - .CLKOUT1_CLKOUT1_PHASE_MUX (CLKOUT1_REGS[15:13]), - .CLKOUT1_CLKOUT2_DELAY_TIME (CLKOUT1_REGS[21:16]), - .CLKOUT1_CLKOUT2_EDGE (CLKOUT1_REGS[23]), - .CLKOUT1_CLKOUT2_NO_COUNT (CLKOUT1_REGS[22]), - - // CLKOUT2 - .CLKOUT2_CLKOUT1_HIGH_TIME (CLKOUT2_REGS[11:6]), - .CLKOUT2_CLKOUT1_LOW_TIME (CLKOUT2_REGS[5:0]), - .CLKOUT2_CLKOUT1_PHASE_MUX (CLKOUT2_REGS[15:13]), - .CLKOUT2_CLKOUT2_DELAY_TIME (CLKOUT2_REGS[21:16]), - .CLKOUT2_CLKOUT2_EDGE (CLKOUT2_REGS[23]), - .CLKOUT2_CLKOUT2_NO_COUNT (CLKOUT2_REGS[22]), - - // CLKOUT3 - .CLKOUT3_CLKOUT1_HIGH_TIME (CLKOUT3_REGS[11:6]), - .CLKOUT3_CLKOUT1_LOW_TIME (CLKOUT3_REGS[5:0]), - .CLKOUT3_CLKOUT1_PHASE_MUX (CLKOUT3_REGS[15:13]), - .CLKOUT3_CLKOUT2_DELAY_TIME (CLKOUT3_REGS[21:16]), - .CLKOUT3_CLKOUT2_EDGE (CLKOUT3_REGS[23]), - .CLKOUT3_CLKOUT2_NO_COUNT (CLKOUT3_REGS[22]), - - // CLKOUT4 - .CLKOUT4_CLKOUT1_HIGH_TIME (CLKOUT4_REGS[11:6]), - .CLKOUT4_CLKOUT1_LOW_TIME (CLKOUT4_REGS[5:0]), - .CLKOUT4_CLKOUT1_PHASE_MUX (CLKOUT4_REGS[15:13]), - .CLKOUT4_CLKOUT2_DELAY_TIME (CLKOUT4_REGS[21:16]), - .CLKOUT4_CLKOUT2_EDGE (CLKOUT4_REGS[23]), - .CLKOUT4_CLKOUT2_NO_COUNT (CLKOUT4_REGS[22]), - - // CLKOUT5 - .CLKOUT5_CLKOUT1_HIGH_TIME (CLKOUT5_REGS[11:6]), - .CLKOUT5_CLKOUT1_LOW_TIME (CLKOUT5_REGS[5:0]), - .CLKOUT5_CLKOUT1_PHASE_MUX (CLKOUT5_REGS[15:13]), - .CLKOUT5_CLKOUT2_DELAY_TIME (CLKOUT5_REGS[21:16]), - .CLKOUT5_CLKOUT2_EDGE (CLKOUT5_REGS[23]), - .CLKOUT5_CLKOUT2_NO_COUNT (CLKOUT5_REGS[22]), - - // Clock output enable controls - .CLKFBOUT_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKFBOUT_ === 1'bX), - - .CLKOUT0_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT0_ === 1'bX), - .CLKOUT1_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT1_ === 1'bX), - .CLKOUT2_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT2_ === 1'bX), - .CLKOUT3_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT3_ === 1'bX), - .CLKOUT4_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT4_ === 1'bX), - .CLKOUT5_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT5_ === 1'bX) - ) - _TECHMAP_REPLACE_ - ( - .CLKFBIN(CLKFBIN), - .CLKIN1(CLKIN1), - .CLKIN2(CLKIN2), - .CLKFBOUT(CLKFBOUT), - .CLKOUT0(CLKOUT0), - .CLKOUT1(CLKOUT1), - .CLKOUT2(CLKOUT2), - .CLKOUT3(CLKOUT3), - .CLKOUT4(CLKOUT4), - .CLKOUT5(CLKOUT5), - - .CLKINSEL (clkinsel), - - .PWRDWN (pwrdwn), - .RST (rst), - .LOCKED (LOCKED), - - .DCLK (dclk), - .DEN (den), - .DWE (dwe), - .DRDY (DRDY), - .DADDR(DADDR), - .DI (DI), - .DO (DO) + PLLE2_ADV_VPR #( + // Inverters + .INV_CLKINSEL(INV_CLKINSEL), + .ZINV_PWRDWN (INV_PWRDWN), + .ZINV_RST (INV_RST), + + // Straight mapped parameters + .STARTUP_WAIT(STARTUP_WAIT == "TRUE"), + + // Lookup tables + .LKTABLE(pll_lktable_lookup(CLKFBOUT_MULT)), + .TABLE (pll_table_lookup(CLKFBOUT_MULT, BANDWIDTH)), + + // FIXME: How to compute values the two below ? + .FILTREG1_RESERVED(12'b0000_00001000), + .LOCKREG3_RESERVED(1'b1), + + // Clock feedback settings + .CLKFBOUT_CLKOUT1_HIGH_TIME (CLKFBOUT_REGS[11:6]), + .CLKFBOUT_CLKOUT1_LOW_TIME (CLKFBOUT_REGS[5:0]), + .CLKFBOUT_CLKOUT1_PHASE_MUX (CLKFBOUT_REGS[15:13]), + .CLKFBOUT_CLKOUT2_DELAY_TIME(CLKFBOUT_REGS[21:16]), + .CLKFBOUT_CLKOUT2_EDGE (CLKFBOUT_REGS[23]), + .CLKFBOUT_CLKOUT2_NO_COUNT (CLKFBOUT_REGS[22]), + + // Internal VCO divider settings + .DIVCLK_DIVCLK_HIGH_TIME(DIVCLK_REGS[11:6]), + .DIVCLK_DIVCLK_LOW_TIME (DIVCLK_REGS[5:0]), + .DIVCLK_DIVCLK_NO_COUNT (DIVCLK_REGS[22]), + .DIVCLK_DIVCLK_EDGE (DIVCLK_REGS[23]), + + // CLKOUT0 + .CLKOUT0_CLKOUT1_HIGH_TIME (CLKOUT0_REGS[11:6]), + .CLKOUT0_CLKOUT1_LOW_TIME (CLKOUT0_REGS[5:0]), + .CLKOUT0_CLKOUT1_PHASE_MUX (CLKOUT0_REGS[15:13]), + .CLKOUT0_CLKOUT2_DELAY_TIME(CLKOUT0_REGS[21:16]), + .CLKOUT0_CLKOUT2_EDGE (CLKOUT0_REGS[23]), + .CLKOUT0_CLKOUT2_NO_COUNT (CLKOUT0_REGS[22]), + + // CLKOUT1 + .CLKOUT1_CLKOUT1_HIGH_TIME (CLKOUT1_REGS[11:6]), + .CLKOUT1_CLKOUT1_LOW_TIME (CLKOUT1_REGS[5:0]), + .CLKOUT1_CLKOUT1_PHASE_MUX (CLKOUT1_REGS[15:13]), + .CLKOUT1_CLKOUT2_DELAY_TIME(CLKOUT1_REGS[21:16]), + .CLKOUT1_CLKOUT2_EDGE (CLKOUT1_REGS[23]), + .CLKOUT1_CLKOUT2_NO_COUNT (CLKOUT1_REGS[22]), + + // CLKOUT2 + .CLKOUT2_CLKOUT1_HIGH_TIME (CLKOUT2_REGS[11:6]), + .CLKOUT2_CLKOUT1_LOW_TIME (CLKOUT2_REGS[5:0]), + .CLKOUT2_CLKOUT1_PHASE_MUX (CLKOUT2_REGS[15:13]), + .CLKOUT2_CLKOUT2_DELAY_TIME(CLKOUT2_REGS[21:16]), + .CLKOUT2_CLKOUT2_EDGE (CLKOUT2_REGS[23]), + .CLKOUT2_CLKOUT2_NO_COUNT (CLKOUT2_REGS[22]), + + // CLKOUT3 + .CLKOUT3_CLKOUT1_HIGH_TIME (CLKOUT3_REGS[11:6]), + .CLKOUT3_CLKOUT1_LOW_TIME (CLKOUT3_REGS[5:0]), + .CLKOUT3_CLKOUT1_PHASE_MUX (CLKOUT3_REGS[15:13]), + .CLKOUT3_CLKOUT2_DELAY_TIME(CLKOUT3_REGS[21:16]), + .CLKOUT3_CLKOUT2_EDGE (CLKOUT3_REGS[23]), + .CLKOUT3_CLKOUT2_NO_COUNT (CLKOUT3_REGS[22]), + + // CLKOUT4 + .CLKOUT4_CLKOUT1_HIGH_TIME (CLKOUT4_REGS[11:6]), + .CLKOUT4_CLKOUT1_LOW_TIME (CLKOUT4_REGS[5:0]), + .CLKOUT4_CLKOUT1_PHASE_MUX (CLKOUT4_REGS[15:13]), + .CLKOUT4_CLKOUT2_DELAY_TIME(CLKOUT4_REGS[21:16]), + .CLKOUT4_CLKOUT2_EDGE (CLKOUT4_REGS[23]), + .CLKOUT4_CLKOUT2_NO_COUNT (CLKOUT4_REGS[22]), + + // CLKOUT5 + .CLKOUT5_CLKOUT1_HIGH_TIME (CLKOUT5_REGS[11:6]), + .CLKOUT5_CLKOUT1_LOW_TIME (CLKOUT5_REGS[5:0]), + .CLKOUT5_CLKOUT1_PHASE_MUX (CLKOUT5_REGS[15:13]), + .CLKOUT5_CLKOUT2_DELAY_TIME(CLKOUT5_REGS[21:16]), + .CLKOUT5_CLKOUT2_EDGE (CLKOUT5_REGS[23]), + .CLKOUT5_CLKOUT2_NO_COUNT (CLKOUT5_REGS[22]), + + // Clock output enable controls + .CLKFBOUT_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKFBOUT_ === 1'bX), + + .CLKOUT0_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT0_ === 1'bX), + .CLKOUT1_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT1_ === 1'bX), + .CLKOUT2_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT2_ === 1'bX), + .CLKOUT3_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT3_ === 1'bX), + .CLKOUT4_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT4_ === 1'bX), + .CLKOUT5_CLKOUT1_OUTPUT_ENABLE(_TECHMAP_CONSTVAL_CLKOUT5_ === 1'bX) + ) _TECHMAP_REPLACE_ ( + .CLKFBIN (CLKFBIN), + .CLKIN1 (CLKIN1), + .CLKIN2 (CLKIN2), + .CLKFBOUT(CLKFBOUT), + .CLKOUT0 (CLKOUT0), + .CLKOUT1 (CLKOUT1), + .CLKOUT2 (CLKOUT2), + .CLKOUT3 (CLKOUT3), + .CLKOUT4 (CLKOUT4), + .CLKOUT5 (CLKOUT5), + + .CLKINSEL(clkinsel), + + .PWRDWN(pwrdwn), + .RST (rst), + .LOCKED(LOCKED), + + .DCLK (dclk), + .DEN (den), + .DWE (dwe), + .DRDY (DRDY), + .DADDR(DADDR), + .DI (DI), + .DO (DO) ); endmodule // PLLE2_BASE -module PLLE2_BASE -( -input CLKFBIN, -input CLKIN, - -output CLKFBOUT, -output CLKOUT0, -output CLKOUT1, -output CLKOUT2, -output CLKOUT3, -output CLKOUT4, -output CLKOUT5, - -input RST, -output LOCKED +module PLLE2_BASE ( + input CLKFBIN, + input CLKIN, + + output CLKFBOUT, + output CLKOUT0, + output CLKOUT1, + output CLKOUT2, + output CLKOUT3, + output CLKOUT4, + output CLKOUT5, + + input RST, + output LOCKED ); parameter IS_CLKINSEL_INVERTED = 1'b0; @@ -794,72 +776,69 @@ output LOCKED parameter signed CLKOUT5_PHASE = 0; // The substituted cell - PLLE2_ADV # - ( - .IS_CLKINSEL_INVERTED(IS_CLKINSEL_INVERTED), - .IS_RST_INVERTED(IS_RST_INVERTED), - .IS_PWRDWN_INVERTED(1'b0), - - .BANDWIDTH(BANDWIDTH), - .STARTUP_WAIT(STARTUP_WAIT), - - .CLKIN1_PERIOD(CLKIN1_PERIOD), - .REF_JITTER1(REF_JITTER1), - - .DIVCLK_DIVIDE(DIVCLK_DIVIDE), - - .CLKFBOUT_MULT(CLKFBOUT_MULT), - .CLKFBOUT_PHASE(CLKFBOUT_PHASE), - - .CLKOUT0_DIVIDE(CLKOUT0_DIVIDE), - .CLKOUT0_DUTY_CYCLE(CLKOUT0_DUTY_CYCLE), - .CLKOUT0_PHASE(CLKOUT0_PHASE), - - .CLKOUT1_DIVIDE(CLKOUT1_DIVIDE), - .CLKOUT1_DUTY_CYCLE(CLKOUT1_DUTY_CYCLE), - .CLKOUT1_PHASE(CLKOUT1_PHASE), - - .CLKOUT2_DIVIDE(CLKOUT2_DIVIDE), - .CLKOUT2_DUTY_CYCLE(CLKOUT2_DUTY_CYCLE), - .CLKOUT2_PHASE(CLKOUT2_PHASE), - - .CLKOUT3_DIVIDE(CLKOUT3_DIVIDE), - .CLKOUT3_DUTY_CYCLE(CLKOUT3_DUTY_CYCLE), - .CLKOUT3_PHASE(CLKOUT3_PHASE), - - .CLKOUT4_DIVIDE(CLKOUT4_DIVIDE), - .CLKOUT4_DUTY_CYCLE(CLKOUT4_DUTY_CYCLE), - .CLKOUT4_PHASE(CLKOUT4_PHASE), - - .CLKOUT5_DIVIDE(CLKOUT5_DIVIDE), - .CLKOUT5_DUTY_CYCLE(CLKOUT5_DUTY_CYCLE), - .CLKOUT5_PHASE(CLKOUT5_PHASE) - ) - _TECHMAP_REPLACE_ - ( - .CLKFBIN(CLKFBIN), - .CLKIN1(CLKIN), - .CLKINSEL(1'b1), - - .CLKFBOUT(CLKFBOUT), - .CLKOUT0(CLKOUT0), - .CLKOUT1(CLKOUT1), - .CLKOUT2(CLKOUT2), - .CLKOUT3(CLKOUT3), - .CLKOUT4(CLKOUT4), - .CLKOUT5(CLKOUT5), - - .PWRDWN(1'b0), - .RST(RST), - .LOCKED(LOCKED), - - .DCLK(1'b0), - .DEN(1'b0), - .DWE(1'b0), - .DRDY(), - .DADDR(7'd0), - .DI(16'd0), - .DO() + PLLE2_ADV #( + .IS_CLKINSEL_INVERTED(IS_CLKINSEL_INVERTED), + .IS_RST_INVERTED(IS_RST_INVERTED), + .IS_PWRDWN_INVERTED(1'b0), + + .BANDWIDTH(BANDWIDTH), + .STARTUP_WAIT(STARTUP_WAIT), + + .CLKIN1_PERIOD(CLKIN1_PERIOD), + .REF_JITTER1 (REF_JITTER1), + + .DIVCLK_DIVIDE(DIVCLK_DIVIDE), + + .CLKFBOUT_MULT (CLKFBOUT_MULT), + .CLKFBOUT_PHASE(CLKFBOUT_PHASE), + + .CLKOUT0_DIVIDE(CLKOUT0_DIVIDE), + .CLKOUT0_DUTY_CYCLE(CLKOUT0_DUTY_CYCLE), + .CLKOUT0_PHASE(CLKOUT0_PHASE), + + .CLKOUT1_DIVIDE(CLKOUT1_DIVIDE), + .CLKOUT1_DUTY_CYCLE(CLKOUT1_DUTY_CYCLE), + .CLKOUT1_PHASE(CLKOUT1_PHASE), + + .CLKOUT2_DIVIDE(CLKOUT2_DIVIDE), + .CLKOUT2_DUTY_CYCLE(CLKOUT2_DUTY_CYCLE), + .CLKOUT2_PHASE(CLKOUT2_PHASE), + + .CLKOUT3_DIVIDE(CLKOUT3_DIVIDE), + .CLKOUT3_DUTY_CYCLE(CLKOUT3_DUTY_CYCLE), + .CLKOUT3_PHASE(CLKOUT3_PHASE), + + .CLKOUT4_DIVIDE(CLKOUT4_DIVIDE), + .CLKOUT4_DUTY_CYCLE(CLKOUT4_DUTY_CYCLE), + .CLKOUT4_PHASE(CLKOUT4_PHASE), + + .CLKOUT5_DIVIDE(CLKOUT5_DIVIDE), + .CLKOUT5_DUTY_CYCLE(CLKOUT5_DUTY_CYCLE), + .CLKOUT5_PHASE(CLKOUT5_PHASE) + ) _TECHMAP_REPLACE_ ( + .CLKFBIN (CLKFBIN), + .CLKIN1 (CLKIN), + .CLKINSEL(1'b1), + + .CLKFBOUT(CLKFBOUT), + .CLKOUT0 (CLKOUT0), + .CLKOUT1 (CLKOUT1), + .CLKOUT2 (CLKOUT2), + .CLKOUT3 (CLKOUT3), + .CLKOUT4 (CLKOUT4), + .CLKOUT5 (CLKOUT5), + + .PWRDWN(1'b0), + .RST(RST), + .LOCKED(LOCKED), + + .DCLK(1'b0), + .DEN(1'b0), + .DWE(1'b0), + .DRDY(), + .DADDR(7'd0), + .DI(16'd0), + .DO() ); endmodule diff --git a/params-plugin/tests/pll/techmaps/cells_sim.v b/params-plugin/tests/pll/techmaps/cells_sim.v index 607f98b80..d3bc29bb7 100644 --- a/params-plugin/tests/pll/techmaps/cells_sim.v +++ b/params-plugin/tests/pll/techmaps/cells_sim.v @@ -3,32 +3,31 @@ // PLLE2_ADV_VPR (* blackbox *) -module PLLE2_ADV_VPR -( -input CLKFBIN, -input CLKIN1, -input CLKIN2, -input CLKINSEL, - -output CLKFBOUT, -output CLKOUT0, -output CLKOUT1, -output CLKOUT2, -output CLKOUT3, -output CLKOUT4, -output CLKOUT5, - -input PWRDWN, -input RST, -output LOCKED, - -input DCLK, -input DEN, -input DWE, -output DRDY, -input [ 6:0] DADDR, -input [15:0] DI, -output [15:0] DO +module PLLE2_ADV_VPR ( + input CLKFBIN, + input CLKIN1, + input CLKIN2, + input CLKINSEL, + + output CLKFBOUT, + output CLKOUT0, + output CLKOUT1, + output CLKOUT2, + output CLKOUT3, + output CLKOUT4, + output CLKOUT5, + + input PWRDWN, + input RST, + output LOCKED, + + input DCLK, + input DEN, + input DWE, + output DRDY, + input [ 6:0] DADDR, + input [15:0] DI, + output [15:0] DO ); parameter [0:0] INV_CLKINSEL = 1'd0; diff --git a/ql-iob-plugin/tests/ckpad/design.v b/ql-iob-plugin/tests/ckpad/design.v index 8ef141870..dda0c919a 100644 --- a/ql-iob-plugin/tests/ckpad/design.v +++ b/ql-iob-plugin/tests/ckpad/design.v @@ -1,22 +1,18 @@ module top ( - input wire clk0, - input wire clk1, + input wire clk0, + input wire clk1, (* clkbuf_inhibit *) - input wire clk2, + input wire clk2, (* clkbuf_inhibit *) - input wire clk3, + input wire clk3, input wire [3:0] d, output reg [3:0] q ); - always @(posedge clk0) - q[0] <= d[0]; - always @(posedge clk1) - q[1] <= d[1]; - always @(posedge clk2) - q[2] <= d[2]; - always @(posedge clk3) - q[3] <= d[3]; + always @(posedge clk0) q[0] <= d[0]; + always @(posedge clk1) q[1] <= d[1]; + always @(posedge clk2) q[2] <= d[2]; + always @(posedge clk3) q[3] <= d[3]; endmodule diff --git a/ql-iob-plugin/tests/common/pp3_cells_map.v b/ql-iob-plugin/tests/common/pp3_cells_map.v index c68042e45..562e8d920 100644 --- a/ql-iob-plugin/tests/common/pp3_cells_map.v +++ b/ql-iob-plugin/tests/common/pp3_cells_map.v @@ -1,7 +1,15 @@ -module \$_DFF_P_ (D, Q, C); - input D; - input C; - output Q; - dff _TECHMAP_REPLACE_ (.Q(Q), .D(D), .CLK(C)); +module \$_DFF_P_ ( + D, + Q, + C +); + input D; + input C; + output Q; + dff _TECHMAP_REPLACE_ ( + .Q (Q), + .D (D), + .CLK(C) + ); endmodule diff --git a/ql-iob-plugin/tests/common/pp3_cells_sim.v b/ql-iob-plugin/tests/common/pp3_cells_sim.v index f77ea11df..4a52f97a5 100644 --- a/ql-iob-plugin/tests/common/pp3_cells_sim.v +++ b/ql-iob-plugin/tests/common/pp3_cells_sim.v @@ -1,48 +1,47 @@ -module inpad( +module inpad ( output Q, (* iopad_external_pin *) - input P + input P ); - assign Q = P; + assign Q = P; endmodule -module outpad( +module outpad ( (* iopad_external_pin *) output P, - input A + input A ); - assign P = A; + assign P = A; endmodule -module ckpad( +module ckpad ( output Q, (* iopad_external_pin *) - input P + input P ); - assign Q = P; + assign Q = P; endmodule -module bipad( - input A, - input EN, +module bipad ( + input A, + input EN, output Q, (* iopad_external_pin *) - inout P + inout P ); - assign Q = P; - assign P = EN ? A : 1'bz; + assign Q = P; + assign P = EN ? A : 1'bz; endmodule -module dff( +module dff ( output reg Q, input D, (* clkbuf_sink *) input CLK ); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; - always @(posedge CLK) - Q <= D; + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + always @(posedge CLK) Q <= D; endmodule diff --git a/ql-iob-plugin/tests/sdiomux/design.v b/ql-iob-plugin/tests/sdiomux/design.v index 1aa05fb25..dde303fb9 100644 --- a/ql-iob-plugin/tests/sdiomux/design.v +++ b/ql-iob-plugin/tests/sdiomux/design.v @@ -1,17 +1,15 @@ -module top -( +module top ( input wire clk, output wire [3:0] led, inout wire io ); - reg [3:0] r; - initial r <= 0; + reg [3:0] r; + initial r <= 0; - always @(posedge clk) - r <= r + io; + always @(posedge clk) r <= r + io; - assign led = {r[0], r[1], r[2], r[3]}; - assign io = r[0] ? 1 : 1'bz; + assign led = {r[0], r[1], r[2], r[3]}; + assign io = r[0] ? 1 : 1'bz; endmodule diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v index f711a70fd..180b9261f 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v @@ -1,42 +1,57 @@ -module my_dff ( input d, clk, output reg q ); - initial q <= 1'b0; - always @( posedge clk ) - q <= d; +module my_dff ( + input d, + clk, + output reg q +); + initial q <= 1'b0; + always @(posedge clk) q <= d; endmodule -module my_dffr_p ( input d, clk, clr, output reg q ); - initial q <= 1'b0; - always @( posedge clk or posedge clr ) - if ( clr ) - q <= 1'b0; - else - q <= d; +module my_dffr_p ( + input d, + clk, + clr, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or posedge clr) + if (clr) q <= 1'b0; + else q <= d; endmodule -module my_dffr_n ( input d, clk, clr, output reg q ); - initial q <= 1'b0; - always @( posedge clk or negedge clr ) - if ( !clr ) - q <= 1'b0; - else - q <= d; +module my_dffr_n ( + input d, + clk, + clr, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or negedge clr) + if (!clr) q <= 1'b0; + else q <= d; endmodule -module my_dffs_p ( input d, clk, pre, output reg q ); - initial q <= 1'b0; - always @( posedge clk or posedge pre ) - if ( pre ) - q <= 1'b1; - else - q <= d; +module my_dffs_p ( + input d, + clk, + pre, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or posedge pre) + if (pre) q <= 1'b1; + else q <= d; endmodule -module my_dffs_n ( input d, clk, pre, output reg q ); - initial q <= 1'b0; - always @( posedge clk or negedge pre ) - if ( !pre ) - q <= 1'b1; - else - q <= d; +module my_dffs_n ( + input d, + clk, + pre, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or negedge pre) + if (!pre) q <= 1'b1; + else q <= d; endmodule diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v index ce713a7ce..497c614fa 100644 --- a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v +++ b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v @@ -1,7 +1,10 @@ -module my_dff ( input d, clk, output reg q ); - initial q <= 1'b0; - always @( posedge clk ) - q <= d; +module my_dff ( + input d, + clk, + output reg q +); + initial q <= 1'b0; + always @(posedge clk) q <= d; endmodule module my_top ( @@ -12,17 +15,29 @@ module my_top ( input wire clk ); - wire i_r; - wire t_r; - wire o_r; + wire i_r; + wire t_r; + wire o_r; - // IOB - assign pad = (t_r) ? i_r : 1'bz; - assign o_r = pad; + // IOB + assign pad = (t_r) ? i_r : 1'bz; + assign o_r = pad; - // DFFs - my_dff dff_i (i, clk, i_r); - my_dff dff_t (t, clk, t_r); - my_dff dff_o (o_r, clk, o); + // DFFs + my_dff dff_i ( + i, + clk, + i_r + ); + my_dff dff_t ( + t, + clk, + t_r + ); + my_dff dff_o ( + o_r, + clk, + o + ); endmodule diff --git a/ql-qlf-k4n8-plugin/tests/latches/latches.v b/ql-qlf-k4n8-plugin/tests/latches/latches.v index 1485ffb99..f498e1ca3 100644 --- a/ql-qlf-k4n8-plugin/tests/latches/latches.v +++ b/ql-qlf-k4n8-plugin/tests/latches/latches.v @@ -1,22 +1,32 @@ -module latchp ( input d, clk, en, output reg q ); - initial q <= 1'b0; - always @* - if ( en ) - q <= d; +module latchp ( + input d, + clk, + en, + output reg q +); + initial q <= 1'b0; + always @* if (en) q <= d; endmodule -module latchn ( input d, clk, en, output reg q ); - always @* - if ( !en ) - q <= d; +module latchn ( + input d, + clk, + en, + output reg q +); + always @* if (!en) q <= d; endmodule -module latchsr ( input d, clk, en, clr, pre, output reg q ); - always @* - if ( clr ) - q <= 1'b0; - else if ( pre ) - q <= 1'b1; - else if ( en ) - q <= d; +module latchsr ( + input d, + clk, + en, + clr, + pre, + output reg q +); + always @* + if (clr) q <= 1'b0; + else if (pre) q <= 1'b1; + else if (en) q <= d; endmodule diff --git a/ql-qlf-k4n8-plugin/tests/logic/logic.v b/ql-qlf-k4n8-plugin/tests/logic/logic.v index c17899fa0..17464af84 100644 --- a/ql-qlf-k4n8-plugin/tests/logic/logic.v +++ b/ql-qlf-k4n8-plugin/tests/logic/logic.v @@ -1,16 +1,24 @@ -module top -( +module top ( input [0:7] in, - output B1,B2,B3,B4,B5,B6,B7,B8,B9,B10 + output B1, + B2, + B3, + B4, + B5, + B6, + B7, + B8, + B9, + B10 ); - assign B1 = in[0] & in[1]; - assign B2 = in[0] | in[1]; - assign B3 = in[0] ~& in[1]; - assign B4 = in[0] ~| in[1]; - assign B5 = in[0] ^ in[1]; - assign B6 = in[0] ~^ in[1]; - assign B7 = ~in[0]; - assign B8 = in[0]; - assign B9 = in[0:1] && in [2:3]; - assign B10 = in[0:1] || in [2:3]; + assign B1 = in[0] & in[1]; + assign B2 = in[0] | in[1]; + assign B3 = in[0]~&in[1]; + assign B4 = in[0]~|in[1]; + assign B5 = in[0] ^ in[1]; + assign B6 = in[0] ~^ in[1]; + assign B7 = ~in[0]; + assign B8 = in[0]; + assign B9 = in[0:1] && in[2:3]; + assign B10 = in[0:1] || in[2:3]; endmodule diff --git a/ql-qlf-k4n8-plugin/tests/shreg/shreg.v b/ql-qlf-k4n8-plugin/tests/shreg/shreg.v index af358ea4c..e3bc955bc 100644 --- a/ql-qlf-k4n8-plugin/tests/shreg/shreg.v +++ b/ql-qlf-k4n8-plugin/tests/shreg/shreg.v @@ -4,11 +4,10 @@ module top ( output wire O ); - reg [7:0] shift_register; + reg [7:0] shift_register; - always @(posedge C) - shift_register <= {shift_register[6:0], I}; + always @(posedge C) shift_register <= {shift_register[6:0], I}; - assign O = shift_register[7]; + assign O = shift_register[7]; endmodule diff --git a/sdc-plugin/tests/abc9/abc9.v b/sdc-plugin/tests/abc9/abc9.v index 5b73e5560..1bb745310 100644 --- a/sdc-plugin/tests/abc9/abc9.v +++ b/sdc-plugin/tests/abc9/abc9.v @@ -1,15 +1,18 @@ -module top(input clk1, clk2, output led1, led2); +module top ( + input clk1, + clk2, + output led1, + led2 +); -reg [15:0] counter1 = 0; -reg [15:0] counter2 = 0; + reg [15:0] counter1 = 0; + reg [15:0] counter2 = 0; -assign led1 = counter1[15]; -assign led2 = counter2[15]; + assign led1 = counter1[15]; + assign led2 = counter2[15]; -always @(posedge clk1) - counter1 <= counter1 + 1; + always @(posedge clk1) counter1 <= counter1 + 1; -always @(posedge clk2) - counter2 <= counter2 + 1; + always @(posedge clk2) counter2 <= counter2 + 1; endmodule diff --git a/sdc-plugin/tests/counter/counter.v b/sdc-plugin/tests/counter/counter.v index 564fae58f..88e9f9e1f 100644 --- a/sdc-plugin/tests/counter/counter.v +++ b/sdc-plugin/tests/counter/counter.v @@ -1,36 +1,58 @@ -module top(input clk, - input clk2, - input [1:0] in, - output [5:0] out ); +module top ( + input clk, + input clk2, + input [1:0] in, + output [5:0] out +); -reg [1:0] cnt = 0; -wire clk_int_1, clk_int_2; -IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); -IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); -assign clk_int_1 = ibuf_out; -assign clk_int_2 = clk_int_1; + reg [1:0] cnt = 0; + wire clk_int_1, clk_int_2; + IBUF ibuf_proxy ( + .I(clk), + .O(ibuf_proxy_out) + ); + IBUF ibuf_inst ( + .I(ibuf_proxy_out), + .O(ibuf_out) + ); + assign clk_int_1 = ibuf_out; + assign clk_int_2 = clk_int_1; -always @(posedge clk_int_2) begin - cnt <= cnt + 1; -end + always @(posedge clk_int_2) begin + cnt <= cnt + 1; + end -middle middle_inst_1(.clk(ibuf_out), .out(out[2])); -middle middle_inst_2(.clk(clk_int_1), .out(out[3])); -middle middle_inst_3(.clk(clk_int_2), .out(out[4])); -middle middle_inst_4(.clk(clk2), .out(out[5])); + middle middle_inst_1 ( + .clk(ibuf_out), + .out(out[2]) + ); + middle middle_inst_2 ( + .clk(clk_int_1), + .out(out[3]) + ); + middle middle_inst_3 ( + .clk(clk_int_2), + .out(out[4]) + ); + middle middle_inst_4 ( + .clk(clk2), + .out(out[5]) + ); -assign out[1:0] = {cnt[0], in[0]}; + assign out[1:0] = {cnt[0], in[0]}; endmodule -module middle(input clk, - output out); +module middle ( + input clk, + output out +); -reg [1:0] cnt = 0; -wire clk_int; -assign clk_int = clk; -always @(posedge clk_int) begin - cnt <= cnt + 1; -end + reg [1:0] cnt = 0; + wire clk_int; + assign clk_int = clk; + always @(posedge clk_int) begin + cnt <= cnt + 1; + end -assign out = cnt[0]; + assign out = cnt[0]; endmodule diff --git a/sdc-plugin/tests/counter2/counter2.v b/sdc-plugin/tests/counter2/counter2.v index 564fae58f..88e9f9e1f 100644 --- a/sdc-plugin/tests/counter2/counter2.v +++ b/sdc-plugin/tests/counter2/counter2.v @@ -1,36 +1,58 @@ -module top(input clk, - input clk2, - input [1:0] in, - output [5:0] out ); +module top ( + input clk, + input clk2, + input [1:0] in, + output [5:0] out +); -reg [1:0] cnt = 0; -wire clk_int_1, clk_int_2; -IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); -IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); -assign clk_int_1 = ibuf_out; -assign clk_int_2 = clk_int_1; + reg [1:0] cnt = 0; + wire clk_int_1, clk_int_2; + IBUF ibuf_proxy ( + .I(clk), + .O(ibuf_proxy_out) + ); + IBUF ibuf_inst ( + .I(ibuf_proxy_out), + .O(ibuf_out) + ); + assign clk_int_1 = ibuf_out; + assign clk_int_2 = clk_int_1; -always @(posedge clk_int_2) begin - cnt <= cnt + 1; -end + always @(posedge clk_int_2) begin + cnt <= cnt + 1; + end -middle middle_inst_1(.clk(ibuf_out), .out(out[2])); -middle middle_inst_2(.clk(clk_int_1), .out(out[3])); -middle middle_inst_3(.clk(clk_int_2), .out(out[4])); -middle middle_inst_4(.clk(clk2), .out(out[5])); + middle middle_inst_1 ( + .clk(ibuf_out), + .out(out[2]) + ); + middle middle_inst_2 ( + .clk(clk_int_1), + .out(out[3]) + ); + middle middle_inst_3 ( + .clk(clk_int_2), + .out(out[4]) + ); + middle middle_inst_4 ( + .clk(clk2), + .out(out[5]) + ); -assign out[1:0] = {cnt[0], in[0]}; + assign out[1:0] = {cnt[0], in[0]}; endmodule -module middle(input clk, - output out); +module middle ( + input clk, + output out +); -reg [1:0] cnt = 0; -wire clk_int; -assign clk_int = clk; -always @(posedge clk_int) begin - cnt <= cnt + 1; -end + reg [1:0] cnt = 0; + wire clk_int; + assign clk_int = clk; + always @(posedge clk_int) begin + cnt <= cnt + 1; + end -assign out = cnt[0]; + assign out = cnt[0]; endmodule diff --git a/sdc-plugin/tests/get_clocks/get_clocks.v b/sdc-plugin/tests/get_clocks/get_clocks.v index c2a766a89..05c1e9a67 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.v +++ b/sdc-plugin/tests/get_clocks/get_clocks.v @@ -1,56 +1,75 @@ -module top(input clk, - input clk2, - input [1:0] in, - output [5:0] out ); - -reg [1:0] cnt = 0; -reg [1:0] cnt2 = 0; -wire clk_int_1, clk_int_2; -IBUF ibuf_inst(.I(clk), .O(ibuf_out)); -assign clk_int_1 = ibuf_out; -assign clk_int_2 = clk_int_1; - -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(4'd12), - .CLKOUT0_PHASE(90.0), - .DIVCLK_DIVIDE(1'd1), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(clk), - .RST(cpu_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout0), +module top ( + input clk, + input clk2, + input [1:0] in, + output [5:0] out ); -always @(posedge clk_int_2) begin - cnt <= cnt + 1; -end + reg [1:0] cnt = 0; + reg [1:0] cnt2 = 0; + wire clk_int_1, clk_int_2; + IBUF ibuf_inst ( + .I(clk), + .O(ibuf_out) + ); + assign clk_int_1 = ibuf_out; + assign clk_int_2 = clk_int_1; -always @(posedge main_clkout0) begin - cnt2 <= cnt2 + 1; -end + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + ); -middle middle_inst_1(.clk(ibuf_out), .out(out[2])); -middle middle_inst_2(.clk(clk_int_1), .out(out[3])); -middle middle_inst_3(.clk(clk_int_2), .out(out[4])); -middle middle_inst_4(.clk(clk2), .out(out[5])); + always @(posedge clk_int_2) begin + cnt <= cnt + 1; + end -assign out[2:0] = {cnt2[0], cnt[0], in[0]}; + always @(posedge main_clkout0) begin + cnt2 <= cnt2 + 1; + end + + middle middle_inst_1 ( + .clk(ibuf_out), + .out(out[2]) + ); + middle middle_inst_2 ( + .clk(clk_int_1), + .out(out[3]) + ); + middle middle_inst_3 ( + .clk(clk_int_2), + .out(out[4]) + ); + middle middle_inst_4 ( + .clk(clk2), + .out(out[5]) + ); + + assign out[2:0] = {cnt2[0], cnt[0], in[0]}; endmodule -module middle(input clk, - output out); +module middle ( + input clk, + output out +); -reg [1:0] cnt = 0; -wire clk_int; -assign clk_int = clk; -always @(posedge clk_int) begin - cnt <= cnt + 1; -end + reg [1:0] cnt = 0; + wire clk_int; + assign clk_int = clk; + always @(posedge clk_int) begin + cnt <= cnt + 1; + end -assign out = cnt[0]; + assign out = cnt[0]; endmodule diff --git a/sdc-plugin/tests/period_check/period_check.v b/sdc-plugin/tests/period_check/period_check.v index 77c1f9c64..45fec91d0 100644 --- a/sdc-plugin/tests/period_check/period_check.v +++ b/sdc-plugin/tests/period_check/period_check.v @@ -1,36 +1,59 @@ -module top((* CLOCK_SIGNAL = "yes", WAVEFORM = "0 5" *) input clk, - input clk2, - input [1:0] in, - output [5:0] out ); +module top ( + (* CLOCK_SIGNAL = "yes", WAVEFORM = "0 5" *) + input clk, + input clk2, + input [1:0] in, + output [5:0] out +); -reg [1:0] cnt = 0; -wire clk_int_1, clk_int_2; -IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); -IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); -assign clk_int_1 = ibuf_out; -assign clk_int_2 = clk_int_1; + reg [1:0] cnt = 0; + wire clk_int_1, clk_int_2; + IBUF ibuf_proxy ( + .I(clk), + .O(ibuf_proxy_out) + ); + IBUF ibuf_inst ( + .I(ibuf_proxy_out), + .O(ibuf_out) + ); + assign clk_int_1 = ibuf_out; + assign clk_int_2 = clk_int_1; -always @(posedge clk_int_2) begin - cnt <= cnt + 1; -end + always @(posedge clk_int_2) begin + cnt <= cnt + 1; + end -middle middle_inst_1(.clk(ibuf_out), .out(out[2])); -middle middle_inst_2(.clk(clk_int_1), .out(out[3])); -middle middle_inst_3(.clk(clk_int_2), .out(out[4])); -middle middle_inst_4(.clk(clk2), .out(out[5])); + middle middle_inst_1 ( + .clk(ibuf_out), + .out(out[2]) + ); + middle middle_inst_2 ( + .clk(clk_int_1), + .out(out[3]) + ); + middle middle_inst_3 ( + .clk(clk_int_2), + .out(out[4]) + ); + middle middle_inst_4 ( + .clk(clk2), + .out(out[5]) + ); -assign out[1:0] = {cnt[0], in[0]}; + assign out[1:0] = {cnt[0], in[0]}; endmodule -module middle(input clk, - output out); +module middle ( + input clk, + output out +); -reg [1:0] cnt = 0; -wire clk_int; -assign clk_int = clk; -always @(posedge clk_int) begin - cnt <= cnt + 1; -end + reg [1:0] cnt = 0; + wire clk_int; + assign clk_int = clk; + always @(posedge clk_int) begin + cnt <= cnt + 1; + end -assign out = cnt[0]; + assign out = cnt[0]; endmodule diff --git a/sdc-plugin/tests/period_format_check/period_format_check.v b/sdc-plugin/tests/period_format_check/period_format_check.v index e6ab2944d..323d3ea2c 100644 --- a/sdc-plugin/tests/period_format_check/period_format_check.v +++ b/sdc-plugin/tests/period_format_check/period_format_check.v @@ -1,36 +1,59 @@ -module top((* CLOCK_SIGNAL = "yes", PERIOD = "bad value", WAVEFORM = "0 5" *) input clk, - input clk2, - input [1:0] in, - output [5:0] out ); +module top ( + (* CLOCK_SIGNAL = "yes", PERIOD = "bad value", WAVEFORM = "0 5" *) + input clk, + input clk2, + input [1:0] in, + output [5:0] out +); -reg [1:0] cnt = 0; -wire clk_int_1, clk_int_2; -IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); -IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); -assign clk_int_1 = ibuf_out; -assign clk_int_2 = clk_int_1; + reg [1:0] cnt = 0; + wire clk_int_1, clk_int_2; + IBUF ibuf_proxy ( + .I(clk), + .O(ibuf_proxy_out) + ); + IBUF ibuf_inst ( + .I(ibuf_proxy_out), + .O(ibuf_out) + ); + assign clk_int_1 = ibuf_out; + assign clk_int_2 = clk_int_1; -always @(posedge clk_int_2) begin - cnt <= cnt + 1; -end + always @(posedge clk_int_2) begin + cnt <= cnt + 1; + end -middle middle_inst_1(.clk(ibuf_out), .out(out[2])); -middle middle_inst_2(.clk(clk_int_1), .out(out[3])); -middle middle_inst_3(.clk(clk_int_2), .out(out[4])); -middle middle_inst_4(.clk(clk2), .out(out[5])); + middle middle_inst_1 ( + .clk(ibuf_out), + .out(out[2]) + ); + middle middle_inst_2 ( + .clk(clk_int_1), + .out(out[3]) + ); + middle middle_inst_3 ( + .clk(clk_int_2), + .out(out[4]) + ); + middle middle_inst_4 ( + .clk(clk2), + .out(out[5]) + ); -assign out[1:0] = {cnt[0], in[0]}; + assign out[1:0] = {cnt[0], in[0]}; endmodule -module middle(input clk, - output out); +module middle ( + input clk, + output out +); -reg [1:0] cnt = 0; -wire clk_int; -assign clk_int = clk; -always @(posedge clk_int) begin - cnt <= cnt + 1; -end + reg [1:0] cnt = 0; + wire clk_int; + assign clk_int = clk; + always @(posedge clk_int) begin + cnt <= cnt + 1; + end -assign out = cnt[0]; + assign out = cnt[0]; endmodule diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index 63542da0c..88fd35ad9 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -1,91 +1,91 @@ -module top( - input clk, - input cpu_reset, - input data_in, - output[5:0] data_out +module top ( + input clk, + input cpu_reset, + input data_in, + output [5:0] data_out ); -wire [5:0] data_out; -wire builder_pll_fb; -wire fdce_0_out, fdce_1_out; -wire main_locked; + wire [5:0] data_out; + wire builder_pll_fb; + wire fdce_0_out, fdce_1_out; + wire main_locked; -FDCE FDCE_0 ( - .D(data_in), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(fdce_0_out) -); + FDCE FDCE_0 ( + .D (data_in), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (fdce_0_out) + ); -FDCE FDCE_1 ( - .D(fdce_0_out), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[0]) -); + FDCE FDCE_1 ( + .D (fdce_0_out), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[0]) + ); -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(4'd12), - .CLKOUT0_PHASE(90.0), - .CLKOUT1_DIVIDE(2'd3), - .CLKOUT1_PHASE(0.0), - .CLKOUT2_DIVIDE(3'd6), - .CLKOUT2_PHASE(90.0), - .DIVCLK_DIVIDE(1'd1), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(clk), - .RST(cpu_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout0), - .CLKOUT1(main_clkout1), - .CLKOUT2(main_clkout2), - .LOCKED(main_locked) -); + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .CLKOUT1_DIVIDE(2'd3), + .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(3'd6), + .CLKOUT2_PHASE(90.0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .LOCKED(main_locked) + ); -FDCE FDCE_PLLx1_PH90 ( - .D(data_in), - .C(main_clkout0), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[1]) -); + FDCE FDCE_PLLx1_PH90 ( + .D (data_in), + .C (main_clkout0), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[1]) + ); -FDCE FDCE_PLLx4_PH0_0 ( - .D(data_in), - .C(main_clkout1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[2]) -); + FDCE FDCE_PLLx4_PH0_0 ( + .D (data_in), + .C (main_clkout1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[2]) + ); -FDCE FDCE_PLLx4_PH0_1 ( - .D(data_in), - .C(main_clkout1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[3]) -); + FDCE FDCE_PLLx4_PH0_1 ( + .D (data_in), + .C (main_clkout1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[3]) + ); -FDCE FDCE_PLLx4_PH0_2 ( - .D(data_in), - .C(main_clkout1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[4]) -); + FDCE FDCE_PLLx4_PH0_2 ( + .D (data_in), + .C (main_clkout1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[4]) + ); -FDCE FDCE_PLLx2_PH90_0 ( - .D(data_in), - .C(main_clkout2), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[5]) -); + FDCE FDCE_PLLx2_PH90_0 ( + .D (data_in), + .C (main_clkout2), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[5]) + ); endmodule diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v index 11913d24b..7cc4460ab 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v @@ -1,91 +1,91 @@ -module top( - input clk, - input cpu_reset, - input data_in, - output[5:0] data_out +module top ( + input clk, + input cpu_reset, + input data_in, + output [5:0] data_out ); -wire [5:0] data_out; -wire builder_pll_fb; -wire fdce_0_out, fdce_1_out; -wire main_locked; + wire [5:0] data_out; + wire builder_pll_fb; + wire fdce_0_out, fdce_1_out; + wire main_locked; -FDCE FDCE_0 ( - .D(data_in), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(fdce_0_out) -); + FDCE FDCE_0 ( + .D (data_in), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (fdce_0_out) + ); -FDCE FDCE_1 ( - .D(fdce_0_out), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[0]) -); + FDCE FDCE_1 ( + .D (fdce_0_out), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[0]) + ); -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKFBOUT_PHASE(90.0), - .CLKIN1_PERIOD(9.99999), - .CLKOUT0_DIVIDE(4'd12), - .CLKOUT0_PHASE(90.0), - .CLKOUT1_DIVIDE(3'd6), - .CLKOUT1_PHASE(0.0), - .CLKOUT2_DIVIDE(2'd3), - .CLKOUT2_PHASE(90.0), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(clk), - .RST(cpu_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout_x1), - .CLKOUT1(main_clkout_x2), - .CLKOUT2(main_clkout_x4), - .LOCKED(main_locked) -); + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKFBOUT_PHASE(90.0), + .CLKIN1_PERIOD(9.99999), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .CLKOUT1_DIVIDE(3'd6), + .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(2'd3), + .CLKOUT2_PHASE(90.0), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout_x1), + .CLKOUT1(main_clkout_x2), + .CLKOUT2(main_clkout_x4), + .LOCKED(main_locked) + ); -FDCE FDCE_PLLx1_PH90 ( - .D(data_in), - .C(main_clkout_x1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[1]) -); + FDCE FDCE_PLLx1_PH90 ( + .D (data_in), + .C (main_clkout_x1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[1]) + ); -FDCE FDCE_PLLx4_PH0_0 ( - .D(data_in), - .C(main_clkout_x2), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[2]) -); + FDCE FDCE_PLLx4_PH0_0 ( + .D (data_in), + .C (main_clkout_x2), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[2]) + ); -FDCE FDCE_PLLx4_PH0_1 ( - .D(data_in), - .C(main_clkout_x2), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[3]) -); + FDCE FDCE_PLLx4_PH0_1 ( + .D (data_in), + .C (main_clkout_x2), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[3]) + ); -FDCE FDCE_PLLx4_PH0_2 ( - .D(data_in), - .C(main_clkout_x2), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[4]) -); + FDCE FDCE_PLLx4_PH0_2 ( + .D (data_in), + .C (main_clkout_x2), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[4]) + ); -FDCE FDCE_PLLx2_PH90_0 ( - .D(data_in), - .C(main_clkout_x4), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[5]) -); + FDCE FDCE_PLLx2_PH90_0 ( + .D (data_in), + .C (main_clkout_x4), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[5]) + ); endmodule diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v index 826483f9d..ab636afea 100644 --- a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v @@ -1,41 +1,41 @@ -module top( - input clk, - input cpu_reset, - input data_in, - output data_out +module top ( + input clk, + input cpu_reset, + input data_in, + output data_out ); -wire data_out; -wire builder_pll_fb; -wire main_locked; + wire data_out; + wire builder_pll_fb; + wire main_locked; -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(4'd12), - .CLKOUT0_PHASE(0.0), - .DIVCLK_DIVIDE(1'd1), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(clk), - .RST(cpu_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout0), - .CLKOUT1(main_clkout1), - .CLKOUT2(main_clkout2), - .CLKOUT3(main_clkout3), - .CLKOUT4(main_clkout4), - .LOCKED(main_locked) -); + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(0.0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .CLKOUT3(main_clkout3), + .CLKOUT4(main_clkout4), + .LOCKED(main_locked) + ); -FDCE FDCE_PLLx1_PH0 ( - .D(data_in), - .C(main_clkout0), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out) -); + FDCE FDCE_PLLx1_PH0 ( + .D (data_in), + .C (main_clkout0), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out) + ); endmodule diff --git a/sdc-plugin/tests/pll_div/pll_div.v b/sdc-plugin/tests/pll_div/pll_div.v index b4055efd2..df7046ebd 100644 --- a/sdc-plugin/tests/pll_div/pll_div.v +++ b/sdc-plugin/tests/pll_div/pll_div.v @@ -1,91 +1,91 @@ -module top( - input clk, - input cpu_reset, - input data_in, - output[5:0] data_out +module top ( + input clk, + input cpu_reset, + input data_in, + output [5:0] data_out ); -wire [5:0] data_out; -wire builder_pll_fb; -wire fdce_0_out, fdce_1_out; -wire main_locked; + wire [5:0] data_out; + wire builder_pll_fb; + wire fdce_0_out, fdce_1_out; + wire main_locked; -FDCE FDCE_0 ( - .D(data_in), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(fdce_0_out) -); + FDCE FDCE_0 ( + .D (data_in), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (fdce_0_out) + ); -FDCE FDCE_1 ( - .D(fdce_0_out), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[0]) -); + FDCE FDCE_1 ( + .D (fdce_0_out), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[0]) + ); -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(4'd12), - .CLKOUT0_PHASE(90.0), - .CLKOUT1_DIVIDE(2'd3), - .CLKOUT1_PHASE(0.0), - .CLKOUT2_DIVIDE(3'd6), - .CLKOUT2_PHASE(90.0), - .DIVCLK_DIVIDE(2'd2), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(clk), - .RST(cpu_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout0), - .CLKOUT1(main_clkout1), - .CLKOUT2(main_clkout2), - .LOCKED(main_locked) -); + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .CLKOUT1_DIVIDE(2'd3), + .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(3'd6), + .CLKOUT2_PHASE(90.0), + .DIVCLK_DIVIDE(2'd2), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .LOCKED(main_locked) + ); -FDCE FDCE_PLLx1_PH90 ( - .D(data_in), - .C(main_clkout0), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[1]) -); + FDCE FDCE_PLLx1_PH90 ( + .D (data_in), + .C (main_clkout0), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[1]) + ); -FDCE FDCE_PLLx4_PH0_0 ( - .D(data_in), - .C(main_clkout1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[2]) -); + FDCE FDCE_PLLx4_PH0_0 ( + .D (data_in), + .C (main_clkout1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[2]) + ); -FDCE FDCE_PLLx4_PH0_1 ( - .D(data_in), - .C(main_clkout1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[3]) -); + FDCE FDCE_PLLx4_PH0_1 ( + .D (data_in), + .C (main_clkout1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[3]) + ); -FDCE FDCE_PLLx4_PH0_2 ( - .D(data_in), - .C(main_clkout1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[4]) -); + FDCE FDCE_PLLx4_PH0_2 ( + .D (data_in), + .C (main_clkout1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[4]) + ); -FDCE FDCE_PLLx2_PH90_0 ( - .D(data_in), - .C(main_clkout2), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[5]) -); + FDCE FDCE_PLLx2_PH90_0 ( + .D (data_in), + .C (main_clkout2), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[5]) + ); endmodule diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v index 2dc6c00e3..a2d81047d 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v @@ -1,91 +1,91 @@ -module top( - input clk, - input cpu_reset, - input data_in, - output[5:0] data_out +module top ( + input clk, + input cpu_reset, + input data_in, + output [5:0] data_out ); -wire [5:0] data_out; -wire builder_pll_fb; -wire fdce_0_out, fdce_1_out; -wire main_locked; + wire [5:0] data_out; + wire builder_pll_fb; + wire fdce_0_out, fdce_1_out; + wire main_locked; -FDCE FDCE_0 ( - .D(data_in), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(fdce_0_out) -); + FDCE FDCE_0 ( + .D (data_in), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (fdce_0_out) + ); -FDCE FDCE_1 ( - .D(fdce_0_out), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[0]) -); + FDCE FDCE_1 ( + .D (fdce_0_out), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[0]) + ); -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKFBOUT_PHASE(90.0), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(4'd12), - .CLKOUT0_PHASE(90.0), - .CLKOUT1_DIVIDE(3'd6), - .CLKOUT1_PHASE(0.0), - .CLKOUT2_DIVIDE(2'd3), - .CLKOUT2_PHASE(90.0), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(clk), - .RST(cpu_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout_x1), - .CLKOUT1(main_clkout_x2), - .CLKOUT2(main_clkout_x4), - .LOCKED(main_locked) -); + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKFBOUT_PHASE(90.0), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .CLKOUT1_DIVIDE(3'd6), + .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(2'd3), + .CLKOUT2_PHASE(90.0), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout_x1), + .CLKOUT1(main_clkout_x2), + .CLKOUT2(main_clkout_x4), + .LOCKED(main_locked) + ); -FDCE FDCE_PLLx1_PH90 ( - .D(data_in), - .C(main_clkout_x1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[1]) -); + FDCE FDCE_PLLx1_PH90 ( + .D (data_in), + .C (main_clkout_x1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[1]) + ); -FDCE FDCE_PLLx4_PH0_0 ( - .D(data_in), - .C(main_clkout_x2), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[2]) -); + FDCE FDCE_PLLx4_PH0_0 ( + .D (data_in), + .C (main_clkout_x2), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[2]) + ); -FDCE FDCE_PLLx4_PH0_1 ( - .D(data_in), - .C(main_clkout_x2), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[3]) -); + FDCE FDCE_PLLx4_PH0_1 ( + .D (data_in), + .C (main_clkout_x2), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[3]) + ); -FDCE FDCE_PLLx4_PH0_2 ( - .D(data_in), - .C(main_clkout_x2), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[4]) -); + FDCE FDCE_PLLx4_PH0_2 ( + .D (data_in), + .C (main_clkout_x2), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[4]) + ); -FDCE FDCE_PLLx2_PH90_0 ( - .D(data_in), - .C(main_clkout_x4), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[5]) -); + FDCE FDCE_PLLx2_PH90_0 ( + .D (data_in), + .C (main_clkout_x4), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[5]) + ); endmodule diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.v b/sdc-plugin/tests/pll_propagated/pll_propagated.v index 63542da0c..88fd35ad9 100644 --- a/sdc-plugin/tests/pll_propagated/pll_propagated.v +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.v @@ -1,91 +1,91 @@ -module top( - input clk, - input cpu_reset, - input data_in, - output[5:0] data_out +module top ( + input clk, + input cpu_reset, + input data_in, + output [5:0] data_out ); -wire [5:0] data_out; -wire builder_pll_fb; -wire fdce_0_out, fdce_1_out; -wire main_locked; + wire [5:0] data_out; + wire builder_pll_fb; + wire fdce_0_out, fdce_1_out; + wire main_locked; -FDCE FDCE_0 ( - .D(data_in), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(fdce_0_out) -); + FDCE FDCE_0 ( + .D (data_in), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (fdce_0_out) + ); -FDCE FDCE_1 ( - .D(fdce_0_out), - .C(clk), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[0]) -); + FDCE FDCE_1 ( + .D (fdce_0_out), + .C (clk), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[0]) + ); -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(4'd12), - .CLKOUT0_PHASE(90.0), - .CLKOUT1_DIVIDE(2'd3), - .CLKOUT1_PHASE(0.0), - .CLKOUT2_DIVIDE(3'd6), - .CLKOUT2_PHASE(90.0), - .DIVCLK_DIVIDE(1'd1), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(clk), - .RST(cpu_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout0), - .CLKOUT1(main_clkout1), - .CLKOUT2(main_clkout2), - .LOCKED(main_locked) -); + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(4'd12), + .CLKOUT0_PHASE(90.0), + .CLKOUT1_DIVIDE(2'd3), + .CLKOUT1_PHASE(0.0), + .CLKOUT2_DIVIDE(3'd6), + .CLKOUT2_PHASE(90.0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(clk), + .RST(cpu_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .LOCKED(main_locked) + ); -FDCE FDCE_PLLx1_PH90 ( - .D(data_in), - .C(main_clkout0), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[1]) -); + FDCE FDCE_PLLx1_PH90 ( + .D (data_in), + .C (main_clkout0), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[1]) + ); -FDCE FDCE_PLLx4_PH0_0 ( - .D(data_in), - .C(main_clkout1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[2]) -); + FDCE FDCE_PLLx4_PH0_0 ( + .D (data_in), + .C (main_clkout1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[2]) + ); -FDCE FDCE_PLLx4_PH0_1 ( - .D(data_in), - .C(main_clkout1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[3]) -); + FDCE FDCE_PLLx4_PH0_1 ( + .D (data_in), + .C (main_clkout1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[3]) + ); -FDCE FDCE_PLLx4_PH0_2 ( - .D(data_in), - .C(main_clkout1), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[4]) -); + FDCE FDCE_PLLx4_PH0_2 ( + .D (data_in), + .C (main_clkout1), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[4]) + ); -FDCE FDCE_PLLx2_PH90_0 ( - .D(data_in), - .C(main_clkout2), - .CE(1'b1), - .CLR(1'b0), - .Q(data_out[5]) -); + FDCE FDCE_PLLx2_PH90_0 ( + .D (data_in), + .C (main_clkout2), + .CE (1'b1), + .CLR(1'b0), + .Q (data_out[5]) + ); endmodule diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.v b/sdc-plugin/tests/restore_from_json/restore_from_json.v index 0c35ede11..3c7997a50 100644 --- a/sdc-plugin/tests/restore_from_json/restore_from_json.v +++ b/sdc-plugin/tests/restore_from_json/restore_from_json.v @@ -1,11 +1,15 @@ -module top(input clk, input i, output o); +module top ( + input clk, + input i, + output o +); -reg [0:0] outff = 0; + reg [0:0] outff = 0; -assign o = outff; + assign o = outff; -always @(posedge clk) begin + always @(posedge clk) begin outff <= i; -end + end endmodule diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v index d40055b17..33c580513 100644 --- a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v @@ -1,75 +1,103 @@ module top ( - (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b, - output signal_p, - output signal_n + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUFTDS OBUFTDS_2( - .I(LD6), - .O(signal_p), - .OB(signal_n), - .T(1'b1) - ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/sdc-plugin/tests/set_false_path/set_false_path.v b/sdc-plugin/tests/set_false_path/set_false_path.v index d40055b17..33c580513 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.v +++ b/sdc-plugin/tests/set_false_path/set_false_path.v @@ -1,75 +1,103 @@ module top ( - (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b, - output signal_p, - output signal_n + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUFTDS OBUFTDS_2( - .I(LD6), - .O(signal_p), - .OB(signal_n), - .T(1'b1) - ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.v b/sdc-plugin/tests/set_max_delay/set_max_delay.v index d40055b17..33c580513 100644 --- a/sdc-plugin/tests/set_max_delay/set_max_delay.v +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.v @@ -1,75 +1,103 @@ module top ( - (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b, - output signal_p, - output signal_n + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUFTDS OBUFTDS_2( - .I(LD6), - .O(signal_p), - .OB(signal_n), - .T(1'b1) - ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/sdc-plugin/tests/waveform_check/waveform_check.v b/sdc-plugin/tests/waveform_check/waveform_check.v index a7ff22602..b1723fa4c 100644 --- a/sdc-plugin/tests/waveform_check/waveform_check.v +++ b/sdc-plugin/tests/waveform_check/waveform_check.v @@ -1,36 +1,59 @@ -module top((* CLOCK_SIGNAL = "yes", PERIOD = "10", WAVEFORM = "bad value" *) input clk, - input clk2, - input [1:0] in, - output [5:0] out ); +module top ( + (* CLOCK_SIGNAL = "yes", PERIOD = "10", WAVEFORM = "bad value" *) + input clk, + input clk2, + input [1:0] in, + output [5:0] out +); -reg [1:0] cnt = 0; -wire clk_int_1, clk_int_2; -IBUF ibuf_proxy(.I(clk), .O(ibuf_proxy_out)); -IBUF ibuf_inst(.I(ibuf_proxy_out), .O(ibuf_out)); -assign clk_int_1 = ibuf_out; -assign clk_int_2 = clk_int_1; + reg [1:0] cnt = 0; + wire clk_int_1, clk_int_2; + IBUF ibuf_proxy ( + .I(clk), + .O(ibuf_proxy_out) + ); + IBUF ibuf_inst ( + .I(ibuf_proxy_out), + .O(ibuf_out) + ); + assign clk_int_1 = ibuf_out; + assign clk_int_2 = clk_int_1; -always @(posedge clk_int_2) begin - cnt <= cnt + 1; -end + always @(posedge clk_int_2) begin + cnt <= cnt + 1; + end -middle middle_inst_1(.clk(ibuf_out), .out(out[2])); -middle middle_inst_2(.clk(clk_int_1), .out(out[3])); -middle middle_inst_3(.clk(clk_int_2), .out(out[4])); -middle middle_inst_4(.clk(clk2), .out(out[5])); + middle middle_inst_1 ( + .clk(ibuf_out), + .out(out[2]) + ); + middle middle_inst_2 ( + .clk(clk_int_1), + .out(out[3]) + ); + middle middle_inst_3 ( + .clk(clk_int_2), + .out(out[4]) + ); + middle middle_inst_4 ( + .clk(clk2), + .out(out[5]) + ); -assign out[1:0] = {cnt[0], in[0]}; + assign out[1:0] = {cnt[0], in[0]}; endmodule -module middle(input clk, - output out); +module middle ( + input clk, + output out +); -reg [1:0] cnt = 0; -wire clk_int; -assign clk_int = clk; -always @(posedge clk_int) begin - cnt <= cnt + 1; -end + reg [1:0] cnt = 0; + wire clk_int; + assign clk_int = clk; + always @(posedge clk_int) begin + cnt <= cnt + 1; + end -assign out = cnt[0]; + assign out = cnt[0]; endmodule diff --git a/xdc-plugin/tests/counter/counter.v b/xdc-plugin/tests/counter/counter.v index 2ca86e229..2ec231bb2 100644 --- a/xdc-plugin/tests/counter/counter.v +++ b/xdc-plugin/tests/counter/counter.v @@ -1,67 +1,95 @@ module top ( - input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b + input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v index c145e5ae7..e5d2896fe 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v @@ -1,75 +1,103 @@ module top ( - input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b, - output signal_p, - output signal_n + input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUFTDS OBUFTDS_2( - .I(LD6), - .O(signal_p), - .OB(signal_n), - .T(1'b1) - ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v index cffdfb4eb..a207088c5 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v @@ -1,12464 +1,12721 @@ //-------------------------------------------------------------------------------- // Auto-generated by Migen (--------) & LiteX (9b11e919) on 2020-02-25 16:47:33 //-------------------------------------------------------------------------------- -module top( - output reg serial_tx, - input serial_rx, - (* dont_touch = "true" *) input clk100, - input cpu_reset, - output [13:0] ddram_a, - output [2:0] ddram_ba, - output ddram_ras_n, - output ddram_cas_n, - output ddram_we_n, - output ddram_cs_n, - output [1:0] ddram_dm, - inout [15:0] ddram_dq, - output [1:0] ddram_dqs_p, - output [1:0] ddram_dqs_n, - output ddram_clk_p, - output ddram_clk_n, - output ddram_cke, - output ddram_odt, - output ddram_reset_n, - output [3:0] led +module top ( + output reg serial_tx, + input serial_rx, + (* dont_touch = "true" *) input clk100, + input cpu_reset, + output [13:0] ddram_a, + output [2:0] ddram_ba, + output ddram_ras_n, + output ddram_cas_n, + output ddram_we_n, + output ddram_cs_n, + output [1:0] ddram_dm, + inout [15:0] ddram_dq, + output [1:0] ddram_dqs_p, + output [1:0] ddram_dqs_n, + output ddram_clk_p, + output ddram_clk_n, + output ddram_cke, + output ddram_odt, + output ddram_reset_n, + output [3:0] led ); -wire [3:0] led; - -assign led[0] = main_locked; -assign led[1] = idelayctl_rdy; -assign led[2] = 0; -assign led[3] = 0; - -// Manually inserted OBUFs -wire [13:0] ddram_a_iob; -wire [ 2:0] ddram_ba_iob; -wire ddram_ras_n_iob; -wire ddram_cas_n_iob; -wire ddram_we_n_iob; -wire ddram_cs_n_iob; -wire [ 1:0] ddram_dm_iob; -wire ddram_cke_iob; -wire ddram_odt_iob; -wire ddram_reset_n_iob; - -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a0 (.I(ddram_a_iob[ 0]), .O(ddram_a[ 0])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a1 (.I(ddram_a_iob[ 1]), .O(ddram_a[ 1])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a2 (.I(ddram_a_iob[ 2]), .O(ddram_a[ 2])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a3 (.I(ddram_a_iob[ 3]), .O(ddram_a[ 3])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a4 (.I(ddram_a_iob[ 4]), .O(ddram_a[ 4])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a5 (.I(ddram_a_iob[ 5]), .O(ddram_a[ 5])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a6 (.I(ddram_a_iob[ 6]), .O(ddram_a[ 6])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a7 (.I(ddram_a_iob[ 7]), .O(ddram_a[ 7])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a8 (.I(ddram_a_iob[ 8]), .O(ddram_a[ 8])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a9 (.I(ddram_a_iob[ 9]), .O(ddram_a[ 9])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a10 (.I(ddram_a_iob[10]), .O(ddram_a[10])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a11 (.I(ddram_a_iob[11]), .O(ddram_a[11])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a12 (.I(ddram_a_iob[12]), .O(ddram_a[12])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_a13 (.I(ddram_a_iob[13]), .O(ddram_a[13])); - -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_ba0 (.I(ddram_ba_iob[0]), .O(ddram_ba[0])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_ba1 (.I(ddram_ba_iob[1]), .O(ddram_ba[1])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_ba2 (.I(ddram_ba_iob[2]), .O(ddram_ba[2])); - -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_dm0 (.I(ddram_dm_iob[0]), .O(ddram_dm[0])); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_dm1 (.I(ddram_dm_iob[1]), .O(ddram_dm[1])); - -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_ras (.I(ddram_ras_n_iob), .O(ddram_ras_n)); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_cas (.I(ddram_cas_n_iob), .O(ddram_cas_n)); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_we (.I(ddram_we_n_iob), .O(ddram_we_n)); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_cs (.I(ddram_cs_n_iob), .O(ddram_cs_n)); - -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_cke (.I(ddram_cke_iob), .O(ddram_cke)); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_odt (.I(ddram_odt_iob), .O(ddram_odt)); -OBUF #(.IOSTANDARD("SSTL135"), .SLEW("FAST")) obuf_rst (.I(ddram_reset_n_iob),.O(ddram_reset_n)); - -// End manually inserted OBUFs - -wire idelayctl_rdy; -reg main_minsoc_ctrl_reset_storage = 1'd0; -reg main_minsoc_ctrl_reset_re = 1'd0; -reg [31:0] main_minsoc_ctrl_scratch_storage = 32'd305419896; -reg main_minsoc_ctrl_scratch_re = 1'd0; -wire [31:0] main_minsoc_ctrl_bus_errors_status; -wire main_minsoc_ctrl_bus_errors_we; -wire main_minsoc_ctrl_reset; -wire main_minsoc_ctrl_bus_error; -reg [31:0] main_minsoc_ctrl_bus_errors = 32'd0; -wire main_minsoc_cpu_reset; -wire [29:0] main_minsoc_cpu_ibus_adr; -wire [31:0] main_minsoc_cpu_ibus_dat_w; -wire [31:0] main_minsoc_cpu_ibus_dat_r; -wire [3:0] main_minsoc_cpu_ibus_sel; -wire main_minsoc_cpu_ibus_cyc; -wire main_minsoc_cpu_ibus_stb; -wire main_minsoc_cpu_ibus_ack; -wire main_minsoc_cpu_ibus_we; -wire [2:0] main_minsoc_cpu_ibus_cti; -wire [1:0] main_minsoc_cpu_ibus_bte; -wire main_minsoc_cpu_ibus_err; -wire [29:0] main_minsoc_cpu_dbus_adr; -wire [31:0] main_minsoc_cpu_dbus_dat_w; -wire [31:0] main_minsoc_cpu_dbus_dat_r; -wire [3:0] main_minsoc_cpu_dbus_sel; -wire main_minsoc_cpu_dbus_cyc; -wire main_minsoc_cpu_dbus_stb; -wire main_minsoc_cpu_dbus_ack; -wire main_minsoc_cpu_dbus_we; -wire [2:0] main_minsoc_cpu_dbus_cti; -wire [1:0] main_minsoc_cpu_dbus_bte; -wire main_minsoc_cpu_dbus_err; -reg [31:0] main_minsoc_cpu_interrupt = 32'd0; -reg [31:0] main_minsoc_vexriscv = 32'd0; -wire [29:0] main_minsoc_interface0_soc_bus_adr; -wire [31:0] main_minsoc_interface0_soc_bus_dat_w; -wire [31:0] main_minsoc_interface0_soc_bus_dat_r; -wire [3:0] main_minsoc_interface0_soc_bus_sel; -wire main_minsoc_interface0_soc_bus_cyc; -wire main_minsoc_interface0_soc_bus_stb; -wire main_minsoc_interface0_soc_bus_ack; -wire main_minsoc_interface0_soc_bus_we; -wire [2:0] main_minsoc_interface0_soc_bus_cti; -wire [1:0] main_minsoc_interface0_soc_bus_bte; -wire main_minsoc_interface0_soc_bus_err; -wire [29:0] main_minsoc_interface1_soc_bus_adr; -wire [31:0] main_minsoc_interface1_soc_bus_dat_w; -wire [31:0] main_minsoc_interface1_soc_bus_dat_r; -wire [3:0] main_minsoc_interface1_soc_bus_sel; -wire main_minsoc_interface1_soc_bus_cyc; -wire main_minsoc_interface1_soc_bus_stb; -wire main_minsoc_interface1_soc_bus_ack; -wire main_minsoc_interface1_soc_bus_we; -wire [2:0] main_minsoc_interface1_soc_bus_cti; -wire [1:0] main_minsoc_interface1_soc_bus_bte; -wire main_minsoc_interface1_soc_bus_err; -wire [29:0] main_minsoc_rom_bus_adr; -wire [31:0] main_minsoc_rom_bus_dat_w; -wire [31:0] main_minsoc_rom_bus_dat_r; -wire [3:0] main_minsoc_rom_bus_sel; -wire main_minsoc_rom_bus_cyc; -wire main_minsoc_rom_bus_stb; -reg main_minsoc_rom_bus_ack = 1'd0; -wire main_minsoc_rom_bus_we; -wire [2:0] main_minsoc_rom_bus_cti; -wire [1:0] main_minsoc_rom_bus_bte; -reg main_minsoc_rom_bus_err = 1'd0; -wire [12:0] main_minsoc_rom_adr; -wire [31:0] main_minsoc_rom_dat_r; -wire [29:0] main_minsoc_sram_bus_adr; -wire [31:0] main_minsoc_sram_bus_dat_w; -wire [31:0] main_minsoc_sram_bus_dat_r; -wire [3:0] main_minsoc_sram_bus_sel; -wire main_minsoc_sram_bus_cyc; -wire main_minsoc_sram_bus_stb; -reg main_minsoc_sram_bus_ack = 1'd0; -wire main_minsoc_sram_bus_we; -wire [2:0] main_minsoc_sram_bus_cti; -wire [1:0] main_minsoc_sram_bus_bte; -reg main_minsoc_sram_bus_err = 1'd0; -wire [9:0] main_minsoc_sram_adr; -wire [31:0] main_minsoc_sram_dat_r; -reg [3:0] main_minsoc_sram_we = 4'd0; -wire [31:0] main_minsoc_sram_dat_w; -reg [31:0] main_minsoc_storage = 32'd8246337; -reg main_minsoc_re = 1'd0; -wire main_minsoc_sink_valid; -reg main_minsoc_sink_ready = 1'd0; -wire main_minsoc_sink_first; -wire main_minsoc_sink_last; -wire [7:0] main_minsoc_sink_payload_data; -reg main_minsoc_uart_clk_txen = 1'd0; -reg [31:0] main_minsoc_phase_accumulator_tx = 32'd0; -reg [7:0] main_minsoc_tx_reg = 8'd0; -reg [3:0] main_minsoc_tx_bitcount = 4'd0; -reg main_minsoc_tx_busy = 1'd0; -reg main_minsoc_source_valid = 1'd0; -wire main_minsoc_source_ready; -reg main_minsoc_source_first = 1'd0; -reg main_minsoc_source_last = 1'd0; -reg [7:0] main_minsoc_source_payload_data = 8'd0; -reg main_minsoc_uart_clk_rxen = 1'd0; -reg [31:0] main_minsoc_phase_accumulator_rx = 32'd0; -wire main_minsoc_rx; -reg main_minsoc_rx_r = 1'd0; -reg [7:0] main_minsoc_rx_reg = 8'd0; -reg [3:0] main_minsoc_rx_bitcount = 4'd0; -reg main_minsoc_rx_busy = 1'd0; -wire main_minsoc_uart_rxtx_re; -wire [7:0] main_minsoc_uart_rxtx_r; -wire main_minsoc_uart_rxtx_we; -wire [7:0] main_minsoc_uart_rxtx_w; -wire main_minsoc_uart_txfull_status; -wire main_minsoc_uart_txfull_we; -wire main_minsoc_uart_rxempty_status; -wire main_minsoc_uart_rxempty_we; -wire main_minsoc_uart_irq; -wire main_minsoc_uart_tx_status; -reg main_minsoc_uart_tx_pending = 1'd0; -wire main_minsoc_uart_tx_trigger; -reg main_minsoc_uart_tx_clear = 1'd0; -reg main_minsoc_uart_tx_old_trigger = 1'd0; -wire main_minsoc_uart_rx_status; -reg main_minsoc_uart_rx_pending = 1'd0; -wire main_minsoc_uart_rx_trigger; -reg main_minsoc_uart_rx_clear = 1'd0; -reg main_minsoc_uart_rx_old_trigger = 1'd0; -wire main_minsoc_uart_eventmanager_status_re; -wire [1:0] main_minsoc_uart_eventmanager_status_r; -wire main_minsoc_uart_eventmanager_status_we; -reg [1:0] main_minsoc_uart_eventmanager_status_w = 2'd0; -wire main_minsoc_uart_eventmanager_pending_re; -wire [1:0] main_minsoc_uart_eventmanager_pending_r; -wire main_minsoc_uart_eventmanager_pending_we; -reg [1:0] main_minsoc_uart_eventmanager_pending_w = 2'd0; -reg [1:0] main_minsoc_uart_eventmanager_storage = 2'd0; -reg main_minsoc_uart_eventmanager_re = 1'd0; -wire main_minsoc_uart_uart_sink_valid; -wire main_minsoc_uart_uart_sink_ready; -wire main_minsoc_uart_uart_sink_first; -wire main_minsoc_uart_uart_sink_last; -wire [7:0] main_minsoc_uart_uart_sink_payload_data; -wire main_minsoc_uart_uart_source_valid; -wire main_minsoc_uart_uart_source_ready; -wire main_minsoc_uart_uart_source_first; -wire main_minsoc_uart_uart_source_last; -wire [7:0] main_minsoc_uart_uart_source_payload_data; -wire main_minsoc_uart_tx_fifo_sink_valid; -wire main_minsoc_uart_tx_fifo_sink_ready; -reg main_minsoc_uart_tx_fifo_sink_first = 1'd0; -reg main_minsoc_uart_tx_fifo_sink_last = 1'd0; -wire [7:0] main_minsoc_uart_tx_fifo_sink_payload_data; -wire main_minsoc_uart_tx_fifo_source_valid; -wire main_minsoc_uart_tx_fifo_source_ready; -wire main_minsoc_uart_tx_fifo_source_first; -wire main_minsoc_uart_tx_fifo_source_last; -wire [7:0] main_minsoc_uart_tx_fifo_source_payload_data; -wire main_minsoc_uart_tx_fifo_re; -reg main_minsoc_uart_tx_fifo_readable = 1'd0; -wire main_minsoc_uart_tx_fifo_syncfifo_we; -wire main_minsoc_uart_tx_fifo_syncfifo_writable; -wire main_minsoc_uart_tx_fifo_syncfifo_re; -wire main_minsoc_uart_tx_fifo_syncfifo_readable; -wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_din; -wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_dout; -reg [4:0] main_minsoc_uart_tx_fifo_level0 = 5'd0; -reg main_minsoc_uart_tx_fifo_replace = 1'd0; -reg [3:0] main_minsoc_uart_tx_fifo_produce = 4'd0; -reg [3:0] main_minsoc_uart_tx_fifo_consume = 4'd0; -reg [3:0] main_minsoc_uart_tx_fifo_wrport_adr = 4'd0; -wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_r; -wire main_minsoc_uart_tx_fifo_wrport_we; -wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_w; -wire main_minsoc_uart_tx_fifo_do_read; -wire [3:0] main_minsoc_uart_tx_fifo_rdport_adr; -wire [9:0] main_minsoc_uart_tx_fifo_rdport_dat_r; -wire main_minsoc_uart_tx_fifo_rdport_re; -wire [4:0] main_minsoc_uart_tx_fifo_level1; -wire [7:0] main_minsoc_uart_tx_fifo_fifo_in_payload_data; -wire main_minsoc_uart_tx_fifo_fifo_in_first; -wire main_minsoc_uart_tx_fifo_fifo_in_last; -wire [7:0] main_minsoc_uart_tx_fifo_fifo_out_payload_data; -wire main_minsoc_uart_tx_fifo_fifo_out_first; -wire main_minsoc_uart_tx_fifo_fifo_out_last; -wire main_minsoc_uart_rx_fifo_sink_valid; -wire main_minsoc_uart_rx_fifo_sink_ready; -wire main_minsoc_uart_rx_fifo_sink_first; -wire main_minsoc_uart_rx_fifo_sink_last; -wire [7:0] main_minsoc_uart_rx_fifo_sink_payload_data; -wire main_minsoc_uart_rx_fifo_source_valid; -wire main_minsoc_uart_rx_fifo_source_ready; -wire main_minsoc_uart_rx_fifo_source_first; -wire main_minsoc_uart_rx_fifo_source_last; -wire [7:0] main_minsoc_uart_rx_fifo_source_payload_data; -wire main_minsoc_uart_rx_fifo_re; -reg main_minsoc_uart_rx_fifo_readable = 1'd0; -wire main_minsoc_uart_rx_fifo_syncfifo_we; -wire main_minsoc_uart_rx_fifo_syncfifo_writable; -wire main_minsoc_uart_rx_fifo_syncfifo_re; -wire main_minsoc_uart_rx_fifo_syncfifo_readable; -wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_din; -wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_dout; -reg [4:0] main_minsoc_uart_rx_fifo_level0 = 5'd0; -reg main_minsoc_uart_rx_fifo_replace = 1'd0; -reg [3:0] main_minsoc_uart_rx_fifo_produce = 4'd0; -reg [3:0] main_minsoc_uart_rx_fifo_consume = 4'd0; -reg [3:0] main_minsoc_uart_rx_fifo_wrport_adr = 4'd0; -wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_r; -wire main_minsoc_uart_rx_fifo_wrport_we; -wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_w; -wire main_minsoc_uart_rx_fifo_do_read; -wire [3:0] main_minsoc_uart_rx_fifo_rdport_adr; -wire [9:0] main_minsoc_uart_rx_fifo_rdport_dat_r; -wire main_minsoc_uart_rx_fifo_rdport_re; -wire [4:0] main_minsoc_uart_rx_fifo_level1; -wire [7:0] main_minsoc_uart_rx_fifo_fifo_in_payload_data; -wire main_minsoc_uart_rx_fifo_fifo_in_first; -wire main_minsoc_uart_rx_fifo_fifo_in_last; -wire [7:0] main_minsoc_uart_rx_fifo_fifo_out_payload_data; -wire main_minsoc_uart_rx_fifo_fifo_out_first; -wire main_minsoc_uart_rx_fifo_fifo_out_last; -reg main_minsoc_uart_reset = 1'd0; -reg [31:0] main_minsoc_timer0_load_storage = 32'd0; -reg main_minsoc_timer0_load_re = 1'd0; -reg [31:0] main_minsoc_timer0_reload_storage = 32'd0; -reg main_minsoc_timer0_reload_re = 1'd0; -reg main_minsoc_timer0_en_storage = 1'd0; -reg main_minsoc_timer0_en_re = 1'd0; -reg main_minsoc_timer0_update_value_storage = 1'd0; -reg main_minsoc_timer0_update_value_re = 1'd0; -reg [31:0] main_minsoc_timer0_value_status = 32'd0; -wire main_minsoc_timer0_value_we; -wire main_minsoc_timer0_irq; -wire main_minsoc_timer0_zero_status; -reg main_minsoc_timer0_zero_pending = 1'd0; -wire main_minsoc_timer0_zero_trigger; -reg main_minsoc_timer0_zero_clear = 1'd0; -reg main_minsoc_timer0_zero_old_trigger = 1'd0; -wire main_minsoc_timer0_eventmanager_status_re; -wire main_minsoc_timer0_eventmanager_status_r; -wire main_minsoc_timer0_eventmanager_status_we; -wire main_minsoc_timer0_eventmanager_status_w; -wire main_minsoc_timer0_eventmanager_pending_re; -wire main_minsoc_timer0_eventmanager_pending_r; -wire main_minsoc_timer0_eventmanager_pending_we; -wire main_minsoc_timer0_eventmanager_pending_w; -reg main_minsoc_timer0_eventmanager_storage = 1'd0; -reg main_minsoc_timer0_eventmanager_re = 1'd0; -reg [31:0] main_minsoc_timer0_value = 32'd0; -reg [13:0] main_minsoc_interface_adr = 14'd0; -reg main_minsoc_interface_we = 1'd0; -wire [7:0] main_minsoc_interface_dat_w; -wire [7:0] main_minsoc_interface_dat_r; -wire [29:0] main_minsoc_bus_wishbone_adr; -wire [31:0] main_minsoc_bus_wishbone_dat_w; -wire [31:0] main_minsoc_bus_wishbone_dat_r; -wire [3:0] main_minsoc_bus_wishbone_sel; -wire main_minsoc_bus_wishbone_cyc; -wire main_minsoc_bus_wishbone_stb; -reg main_minsoc_bus_wishbone_ack = 1'd0; -wire main_minsoc_bus_wishbone_we; -wire [2:0] main_minsoc_bus_wishbone_cti; -wire [1:0] main_minsoc_bus_wishbone_bte; -reg main_minsoc_bus_wishbone_err = 1'd0; -wire [29:0] main_interface0_wb_sdram_adr; -wire [31:0] main_interface0_wb_sdram_dat_w; -reg [31:0] main_interface0_wb_sdram_dat_r = 32'd0; -wire [3:0] main_interface0_wb_sdram_sel; -wire main_interface0_wb_sdram_cyc; -wire main_interface0_wb_sdram_stb; -reg main_interface0_wb_sdram_ack = 1'd0; -wire main_interface0_wb_sdram_we; -wire [2:0] main_interface0_wb_sdram_cti; -wire [1:0] main_interface0_wb_sdram_bte; -reg main_interface0_wb_sdram_err = 1'd0; -wire sys_clk; -wire sys_rst; -wire sys4x_clk; -wire sys4x_dqs_clk; -wire clk200_clk; -wire clk200_rst; -wire main_pll_clkin; -wire main_reset; -wire main_locked; -wire main_clkout0; -wire main_clkout1; -wire main_clkout2; -wire main_clkout3; -reg [3:0] main_reset_counter = 4'd15; -reg main_ic_reset = 1'd1; -reg [4:0] main_a7ddrphy_half_sys8x_taps_storage = 5'd13; -reg main_a7ddrphy_half_sys8x_taps_re = 1'd0; -wire main_a7ddrphy_cdly_rst_re; -wire main_a7ddrphy_cdly_rst_r; -wire main_a7ddrphy_cdly_rst_we; -reg main_a7ddrphy_cdly_rst_w = 1'd0; -wire main_a7ddrphy_cdly_inc_re; -wire main_a7ddrphy_cdly_inc_r; -wire main_a7ddrphy_cdly_inc_we; -reg main_a7ddrphy_cdly_inc_w = 1'd0; -reg [1:0] main_a7ddrphy_dly_sel_storage = 2'd0; -reg main_a7ddrphy_dly_sel_re = 1'd0; -wire main_a7ddrphy_rdly_dq_rst_re; -wire main_a7ddrphy_rdly_dq_rst_r; -wire main_a7ddrphy_rdly_dq_rst_we; -reg main_a7ddrphy_rdly_dq_rst_w = 1'd0; -wire main_a7ddrphy_rdly_dq_inc_re; -wire main_a7ddrphy_rdly_dq_inc_r; -wire main_a7ddrphy_rdly_dq_inc_we; -reg main_a7ddrphy_rdly_dq_inc_w = 1'd0; -wire main_a7ddrphy_rdly_dq_bitslip_rst_re; -wire main_a7ddrphy_rdly_dq_bitslip_rst_r; -wire main_a7ddrphy_rdly_dq_bitslip_rst_we; -reg main_a7ddrphy_rdly_dq_bitslip_rst_w = 1'd0; -wire main_a7ddrphy_rdly_dq_bitslip_re; -wire main_a7ddrphy_rdly_dq_bitslip_r; -wire main_a7ddrphy_rdly_dq_bitslip_we; -reg main_a7ddrphy_rdly_dq_bitslip_w = 1'd0; -wire [13:0] main_a7ddrphy_dfi_p0_address; -wire [2:0] main_a7ddrphy_dfi_p0_bank; -wire main_a7ddrphy_dfi_p0_cas_n; -wire main_a7ddrphy_dfi_p0_cs_n; -wire main_a7ddrphy_dfi_p0_ras_n; -wire main_a7ddrphy_dfi_p0_we_n; -wire main_a7ddrphy_dfi_p0_cke; -wire main_a7ddrphy_dfi_p0_odt; -wire main_a7ddrphy_dfi_p0_reset_n; -wire main_a7ddrphy_dfi_p0_act_n; -wire [31:0] main_a7ddrphy_dfi_p0_wrdata; -wire main_a7ddrphy_dfi_p0_wrdata_en; -wire [3:0] main_a7ddrphy_dfi_p0_wrdata_mask; -wire main_a7ddrphy_dfi_p0_rddata_en; -reg [31:0] main_a7ddrphy_dfi_p0_rddata = 32'd0; -reg main_a7ddrphy_dfi_p0_rddata_valid = 1'd0; -wire [13:0] main_a7ddrphy_dfi_p1_address; -wire [2:0] main_a7ddrphy_dfi_p1_bank; -wire main_a7ddrphy_dfi_p1_cas_n; -wire main_a7ddrphy_dfi_p1_cs_n; -wire main_a7ddrphy_dfi_p1_ras_n; -wire main_a7ddrphy_dfi_p1_we_n; -wire main_a7ddrphy_dfi_p1_cke; -wire main_a7ddrphy_dfi_p1_odt; -wire main_a7ddrphy_dfi_p1_reset_n; -wire main_a7ddrphy_dfi_p1_act_n; -wire [31:0] main_a7ddrphy_dfi_p1_wrdata; -wire main_a7ddrphy_dfi_p1_wrdata_en; -wire [3:0] main_a7ddrphy_dfi_p1_wrdata_mask; -wire main_a7ddrphy_dfi_p1_rddata_en; -reg [31:0] main_a7ddrphy_dfi_p1_rddata = 32'd0; -reg main_a7ddrphy_dfi_p1_rddata_valid = 1'd0; -wire [13:0] main_a7ddrphy_dfi_p2_address; -wire [2:0] main_a7ddrphy_dfi_p2_bank; -wire main_a7ddrphy_dfi_p2_cas_n; -wire main_a7ddrphy_dfi_p2_cs_n; -wire main_a7ddrphy_dfi_p2_ras_n; -wire main_a7ddrphy_dfi_p2_we_n; -wire main_a7ddrphy_dfi_p2_cke; -wire main_a7ddrphy_dfi_p2_odt; -wire main_a7ddrphy_dfi_p2_reset_n; -wire main_a7ddrphy_dfi_p2_act_n; -wire [31:0] main_a7ddrphy_dfi_p2_wrdata; -wire main_a7ddrphy_dfi_p2_wrdata_en; -wire [3:0] main_a7ddrphy_dfi_p2_wrdata_mask; -wire main_a7ddrphy_dfi_p2_rddata_en; -reg [31:0] main_a7ddrphy_dfi_p2_rddata = 32'd0; -reg main_a7ddrphy_dfi_p2_rddata_valid = 1'd0; -wire [13:0] main_a7ddrphy_dfi_p3_address; -wire [2:0] main_a7ddrphy_dfi_p3_bank; -wire main_a7ddrphy_dfi_p3_cas_n; -wire main_a7ddrphy_dfi_p3_cs_n; -wire main_a7ddrphy_dfi_p3_ras_n; -wire main_a7ddrphy_dfi_p3_we_n; -wire main_a7ddrphy_dfi_p3_cke; -wire main_a7ddrphy_dfi_p3_odt; -wire main_a7ddrphy_dfi_p3_reset_n; -wire main_a7ddrphy_dfi_p3_act_n; -wire [31:0] main_a7ddrphy_dfi_p3_wrdata; -wire main_a7ddrphy_dfi_p3_wrdata_en; -wire [3:0] main_a7ddrphy_dfi_p3_wrdata_mask; -wire main_a7ddrphy_dfi_p3_rddata_en; -reg [31:0] main_a7ddrphy_dfi_p3_rddata = 32'd0; -reg main_a7ddrphy_dfi_p3_rddata_valid = 1'd0; -wire main_a7ddrphy_sd_clk_se_nodelay; -reg main_a7ddrphy_oe_dqs = 1'd0; -wire main_a7ddrphy_dqs_preamble; -wire main_a7ddrphy_dqs_postamble; -reg [7:0] main_a7ddrphy_dqs_serdes_pattern = 8'd85; -wire main_a7ddrphy_dqs_nodelay0; -wire main_a7ddrphy_dqs_t0; -wire main_a7ddrphy0; -wire main_a7ddrphy_dqs_nodelay1; -wire main_a7ddrphy_dqs_t1; -wire main_a7ddrphy1; -reg main_a7ddrphy_oe_dq = 1'd0; -wire main_a7ddrphy_dq_o_nodelay0; -wire main_a7ddrphy_dq_i_nodelay0; -wire main_a7ddrphy_dq_i_delayed0; -wire main_a7ddrphy_dq_t0; -wire [7:0] main_a7ddrphy_dq_i_data0; -wire [7:0] main_a7ddrphy_bitslip0_i; -reg [7:0] main_a7ddrphy_bitslip0_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip0_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip0_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay1; -wire main_a7ddrphy_dq_i_nodelay1; -wire main_a7ddrphy_dq_i_delayed1; -wire main_a7ddrphy_dq_t1; -wire [7:0] main_a7ddrphy_dq_i_data1; -wire [7:0] main_a7ddrphy_bitslip1_i; -reg [7:0] main_a7ddrphy_bitslip1_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip1_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip1_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay2; -wire main_a7ddrphy_dq_i_nodelay2; -wire main_a7ddrphy_dq_i_delayed2; -wire main_a7ddrphy_dq_t2; -wire [7:0] main_a7ddrphy_dq_i_data2; -wire [7:0] main_a7ddrphy_bitslip2_i; -reg [7:0] main_a7ddrphy_bitslip2_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip2_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip2_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay3; -wire main_a7ddrphy_dq_i_nodelay3; -wire main_a7ddrphy_dq_i_delayed3; -wire main_a7ddrphy_dq_t3; -wire [7:0] main_a7ddrphy_dq_i_data3; -wire [7:0] main_a7ddrphy_bitslip3_i; -reg [7:0] main_a7ddrphy_bitslip3_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip3_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip3_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay4; -wire main_a7ddrphy_dq_i_nodelay4; -wire main_a7ddrphy_dq_i_delayed4; -wire main_a7ddrphy_dq_t4; -wire [7:0] main_a7ddrphy_dq_i_data4; -wire [7:0] main_a7ddrphy_bitslip4_i; -reg [7:0] main_a7ddrphy_bitslip4_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip4_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip4_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay5; -wire main_a7ddrphy_dq_i_nodelay5; -wire main_a7ddrphy_dq_i_delayed5; -wire main_a7ddrphy_dq_t5; -wire [7:0] main_a7ddrphy_dq_i_data5; -wire [7:0] main_a7ddrphy_bitslip5_i; -reg [7:0] main_a7ddrphy_bitslip5_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip5_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip5_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay6; -wire main_a7ddrphy_dq_i_nodelay6; -wire main_a7ddrphy_dq_i_delayed6; -wire main_a7ddrphy_dq_t6; -wire [7:0] main_a7ddrphy_dq_i_data6; -wire [7:0] main_a7ddrphy_bitslip6_i; -reg [7:0] main_a7ddrphy_bitslip6_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip6_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip6_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay7; -wire main_a7ddrphy_dq_i_nodelay7; -wire main_a7ddrphy_dq_i_delayed7; -wire main_a7ddrphy_dq_t7; -wire [7:0] main_a7ddrphy_dq_i_data7; -wire [7:0] main_a7ddrphy_bitslip7_i; -reg [7:0] main_a7ddrphy_bitslip7_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip7_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip7_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay8; -wire main_a7ddrphy_dq_i_nodelay8; -wire main_a7ddrphy_dq_i_delayed8; -wire main_a7ddrphy_dq_t8; -wire [7:0] main_a7ddrphy_dq_i_data8; -wire [7:0] main_a7ddrphy_bitslip8_i; -reg [7:0] main_a7ddrphy_bitslip8_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip8_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip8_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay9; -wire main_a7ddrphy_dq_i_nodelay9; -wire main_a7ddrphy_dq_i_delayed9; -wire main_a7ddrphy_dq_t9; -wire [7:0] main_a7ddrphy_dq_i_data9; -wire [7:0] main_a7ddrphy_bitslip9_i; -reg [7:0] main_a7ddrphy_bitslip9_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip9_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip9_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay10; -wire main_a7ddrphy_dq_i_nodelay10; -wire main_a7ddrphy_dq_i_delayed10; -wire main_a7ddrphy_dq_t10; -wire [7:0] main_a7ddrphy_dq_i_data10; -wire [7:0] main_a7ddrphy_bitslip10_i; -reg [7:0] main_a7ddrphy_bitslip10_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip10_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip10_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay11; -wire main_a7ddrphy_dq_i_nodelay11; -wire main_a7ddrphy_dq_i_delayed11; -wire main_a7ddrphy_dq_t11; -wire [7:0] main_a7ddrphy_dq_i_data11; -wire [7:0] main_a7ddrphy_bitslip11_i; -reg [7:0] main_a7ddrphy_bitslip11_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip11_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip11_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay12; -wire main_a7ddrphy_dq_i_nodelay12; -wire main_a7ddrphy_dq_i_delayed12; -wire main_a7ddrphy_dq_t12; -wire [7:0] main_a7ddrphy_dq_i_data12; -wire [7:0] main_a7ddrphy_bitslip12_i; -reg [7:0] main_a7ddrphy_bitslip12_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip12_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip12_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay13; -wire main_a7ddrphy_dq_i_nodelay13; -wire main_a7ddrphy_dq_i_delayed13; -wire main_a7ddrphy_dq_t13; -wire [7:0] main_a7ddrphy_dq_i_data13; -wire [7:0] main_a7ddrphy_bitslip13_i; -reg [7:0] main_a7ddrphy_bitslip13_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip13_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip13_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay14; -wire main_a7ddrphy_dq_i_nodelay14; -wire main_a7ddrphy_dq_i_delayed14; -wire main_a7ddrphy_dq_t14; -wire [7:0] main_a7ddrphy_dq_i_data14; -wire [7:0] main_a7ddrphy_bitslip14_i; -reg [7:0] main_a7ddrphy_bitslip14_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip14_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip14_r = 16'd0; -wire main_a7ddrphy_dq_o_nodelay15; -wire main_a7ddrphy_dq_i_nodelay15; -wire main_a7ddrphy_dq_i_delayed15; -wire main_a7ddrphy_dq_t15; -wire [7:0] main_a7ddrphy_dq_i_data15; -wire [7:0] main_a7ddrphy_bitslip15_i; -reg [7:0] main_a7ddrphy_bitslip15_o = 8'd0; -reg [2:0] main_a7ddrphy_bitslip15_value = 3'd0; -reg [15:0] main_a7ddrphy_bitslip15_r = 16'd0; -reg main_a7ddrphy_n_rddata_en0 = 1'd0; -reg main_a7ddrphy_n_rddata_en1 = 1'd0; -reg main_a7ddrphy_n_rddata_en2 = 1'd0; -reg main_a7ddrphy_n_rddata_en3 = 1'd0; -reg main_a7ddrphy_n_rddata_en4 = 1'd0; -reg main_a7ddrphy_n_rddata_en5 = 1'd0; -reg main_a7ddrphy_n_rddata_en6 = 1'd0; -reg main_a7ddrphy_n_rddata_en7 = 1'd0; -wire main_a7ddrphy_oe; -reg [3:0] main_a7ddrphy_last_wrdata_en = 4'd0; -wire [13:0] main_sdram_inti_p0_address; -wire [2:0] main_sdram_inti_p0_bank; -reg main_sdram_inti_p0_cas_n = 1'd1; -reg main_sdram_inti_p0_cs_n = 1'd1; -reg main_sdram_inti_p0_ras_n = 1'd1; -reg main_sdram_inti_p0_we_n = 1'd1; -wire main_sdram_inti_p0_cke; -wire main_sdram_inti_p0_odt; -wire main_sdram_inti_p0_reset_n; -reg main_sdram_inti_p0_act_n = 1'd1; -wire [31:0] main_sdram_inti_p0_wrdata; -wire main_sdram_inti_p0_wrdata_en; -wire [3:0] main_sdram_inti_p0_wrdata_mask; -wire main_sdram_inti_p0_rddata_en; -reg [31:0] main_sdram_inti_p0_rddata = 32'd0; -reg main_sdram_inti_p0_rddata_valid = 1'd0; -wire [13:0] main_sdram_inti_p1_address; -wire [2:0] main_sdram_inti_p1_bank; -reg main_sdram_inti_p1_cas_n = 1'd1; -reg main_sdram_inti_p1_cs_n = 1'd1; -reg main_sdram_inti_p1_ras_n = 1'd1; -reg main_sdram_inti_p1_we_n = 1'd1; -wire main_sdram_inti_p1_cke; -wire main_sdram_inti_p1_odt; -wire main_sdram_inti_p1_reset_n; -reg main_sdram_inti_p1_act_n = 1'd1; -wire [31:0] main_sdram_inti_p1_wrdata; -wire main_sdram_inti_p1_wrdata_en; -wire [3:0] main_sdram_inti_p1_wrdata_mask; -wire main_sdram_inti_p1_rddata_en; -reg [31:0] main_sdram_inti_p1_rddata = 32'd0; -reg main_sdram_inti_p1_rddata_valid = 1'd0; -wire [13:0] main_sdram_inti_p2_address; -wire [2:0] main_sdram_inti_p2_bank; -reg main_sdram_inti_p2_cas_n = 1'd1; -reg main_sdram_inti_p2_cs_n = 1'd1; -reg main_sdram_inti_p2_ras_n = 1'd1; -reg main_sdram_inti_p2_we_n = 1'd1; -wire main_sdram_inti_p2_cke; -wire main_sdram_inti_p2_odt; -wire main_sdram_inti_p2_reset_n; -reg main_sdram_inti_p2_act_n = 1'd1; -wire [31:0] main_sdram_inti_p2_wrdata; -wire main_sdram_inti_p2_wrdata_en; -wire [3:0] main_sdram_inti_p2_wrdata_mask; -wire main_sdram_inti_p2_rddata_en; -reg [31:0] main_sdram_inti_p2_rddata = 32'd0; -reg main_sdram_inti_p2_rddata_valid = 1'd0; -wire [13:0] main_sdram_inti_p3_address; -wire [2:0] main_sdram_inti_p3_bank; -reg main_sdram_inti_p3_cas_n = 1'd1; -reg main_sdram_inti_p3_cs_n = 1'd1; -reg main_sdram_inti_p3_ras_n = 1'd1; -reg main_sdram_inti_p3_we_n = 1'd1; -wire main_sdram_inti_p3_cke; -wire main_sdram_inti_p3_odt; -wire main_sdram_inti_p3_reset_n; -reg main_sdram_inti_p3_act_n = 1'd1; -wire [31:0] main_sdram_inti_p3_wrdata; -wire main_sdram_inti_p3_wrdata_en; -wire [3:0] main_sdram_inti_p3_wrdata_mask; -wire main_sdram_inti_p3_rddata_en; -reg [31:0] main_sdram_inti_p3_rddata = 32'd0; -reg main_sdram_inti_p3_rddata_valid = 1'd0; -wire [13:0] main_sdram_slave_p0_address; -wire [2:0] main_sdram_slave_p0_bank; -wire main_sdram_slave_p0_cas_n; -wire main_sdram_slave_p0_cs_n; -wire main_sdram_slave_p0_ras_n; -wire main_sdram_slave_p0_we_n; -wire main_sdram_slave_p0_cke; -wire main_sdram_slave_p0_odt; -wire main_sdram_slave_p0_reset_n; -wire main_sdram_slave_p0_act_n; -wire [31:0] main_sdram_slave_p0_wrdata; -wire main_sdram_slave_p0_wrdata_en; -wire [3:0] main_sdram_slave_p0_wrdata_mask; -wire main_sdram_slave_p0_rddata_en; -reg [31:0] main_sdram_slave_p0_rddata = 32'd0; -reg main_sdram_slave_p0_rddata_valid = 1'd0; -wire [13:0] main_sdram_slave_p1_address; -wire [2:0] main_sdram_slave_p1_bank; -wire main_sdram_slave_p1_cas_n; -wire main_sdram_slave_p1_cs_n; -wire main_sdram_slave_p1_ras_n; -wire main_sdram_slave_p1_we_n; -wire main_sdram_slave_p1_cke; -wire main_sdram_slave_p1_odt; -wire main_sdram_slave_p1_reset_n; -wire main_sdram_slave_p1_act_n; -wire [31:0] main_sdram_slave_p1_wrdata; -wire main_sdram_slave_p1_wrdata_en; -wire [3:0] main_sdram_slave_p1_wrdata_mask; -wire main_sdram_slave_p1_rddata_en; -reg [31:0] main_sdram_slave_p1_rddata = 32'd0; -reg main_sdram_slave_p1_rddata_valid = 1'd0; -wire [13:0] main_sdram_slave_p2_address; -wire [2:0] main_sdram_slave_p2_bank; -wire main_sdram_slave_p2_cas_n; -wire main_sdram_slave_p2_cs_n; -wire main_sdram_slave_p2_ras_n; -wire main_sdram_slave_p2_we_n; -wire main_sdram_slave_p2_cke; -wire main_sdram_slave_p2_odt; -wire main_sdram_slave_p2_reset_n; -wire main_sdram_slave_p2_act_n; -wire [31:0] main_sdram_slave_p2_wrdata; -wire main_sdram_slave_p2_wrdata_en; -wire [3:0] main_sdram_slave_p2_wrdata_mask; -wire main_sdram_slave_p2_rddata_en; -reg [31:0] main_sdram_slave_p2_rddata = 32'd0; -reg main_sdram_slave_p2_rddata_valid = 1'd0; -wire [13:0] main_sdram_slave_p3_address; -wire [2:0] main_sdram_slave_p3_bank; -wire main_sdram_slave_p3_cas_n; -wire main_sdram_slave_p3_cs_n; -wire main_sdram_slave_p3_ras_n; -wire main_sdram_slave_p3_we_n; -wire main_sdram_slave_p3_cke; -wire main_sdram_slave_p3_odt; -wire main_sdram_slave_p3_reset_n; -wire main_sdram_slave_p3_act_n; -wire [31:0] main_sdram_slave_p3_wrdata; -wire main_sdram_slave_p3_wrdata_en; -wire [3:0] main_sdram_slave_p3_wrdata_mask; -wire main_sdram_slave_p3_rddata_en; -reg [31:0] main_sdram_slave_p3_rddata = 32'd0; -reg main_sdram_slave_p3_rddata_valid = 1'd0; -reg [13:0] main_sdram_master_p0_address = 14'd0; -reg [2:0] main_sdram_master_p0_bank = 3'd0; -reg main_sdram_master_p0_cas_n = 1'd1; -reg main_sdram_master_p0_cs_n = 1'd1; -reg main_sdram_master_p0_ras_n = 1'd1; -reg main_sdram_master_p0_we_n = 1'd1; -reg main_sdram_master_p0_cke = 1'd0; -reg main_sdram_master_p0_odt = 1'd0; -reg main_sdram_master_p0_reset_n = 1'd0; -reg main_sdram_master_p0_act_n = 1'd1; -reg [31:0] main_sdram_master_p0_wrdata = 32'd0; -reg main_sdram_master_p0_wrdata_en = 1'd0; -reg [3:0] main_sdram_master_p0_wrdata_mask = 4'd0; -reg main_sdram_master_p0_rddata_en = 1'd0; -wire [31:0] main_sdram_master_p0_rddata; -wire main_sdram_master_p0_rddata_valid; -reg [13:0] main_sdram_master_p1_address = 14'd0; -reg [2:0] main_sdram_master_p1_bank = 3'd0; -reg main_sdram_master_p1_cas_n = 1'd1; -reg main_sdram_master_p1_cs_n = 1'd1; -reg main_sdram_master_p1_ras_n = 1'd1; -reg main_sdram_master_p1_we_n = 1'd1; -reg main_sdram_master_p1_cke = 1'd0; -reg main_sdram_master_p1_odt = 1'd0; -reg main_sdram_master_p1_reset_n = 1'd0; -reg main_sdram_master_p1_act_n = 1'd1; -reg [31:0] main_sdram_master_p1_wrdata = 32'd0; -reg main_sdram_master_p1_wrdata_en = 1'd0; -reg [3:0] main_sdram_master_p1_wrdata_mask = 4'd0; -reg main_sdram_master_p1_rddata_en = 1'd0; -wire [31:0] main_sdram_master_p1_rddata; -wire main_sdram_master_p1_rddata_valid; -reg [13:0] main_sdram_master_p2_address = 14'd0; -reg [2:0] main_sdram_master_p2_bank = 3'd0; -reg main_sdram_master_p2_cas_n = 1'd1; -reg main_sdram_master_p2_cs_n = 1'd1; -reg main_sdram_master_p2_ras_n = 1'd1; -reg main_sdram_master_p2_we_n = 1'd1; -reg main_sdram_master_p2_cke = 1'd0; -reg main_sdram_master_p2_odt = 1'd0; -reg main_sdram_master_p2_reset_n = 1'd0; -reg main_sdram_master_p2_act_n = 1'd1; -reg [31:0] main_sdram_master_p2_wrdata = 32'd0; -reg main_sdram_master_p2_wrdata_en = 1'd0; -reg [3:0] main_sdram_master_p2_wrdata_mask = 4'd0; -reg main_sdram_master_p2_rddata_en = 1'd0; -wire [31:0] main_sdram_master_p2_rddata; -wire main_sdram_master_p2_rddata_valid; -reg [13:0] main_sdram_master_p3_address = 14'd0; -reg [2:0] main_sdram_master_p3_bank = 3'd0; -reg main_sdram_master_p3_cas_n = 1'd1; -reg main_sdram_master_p3_cs_n = 1'd1; -reg main_sdram_master_p3_ras_n = 1'd1; -reg main_sdram_master_p3_we_n = 1'd1; -reg main_sdram_master_p3_cke = 1'd0; -reg main_sdram_master_p3_odt = 1'd0; -reg main_sdram_master_p3_reset_n = 1'd0; -reg main_sdram_master_p3_act_n = 1'd1; -reg [31:0] main_sdram_master_p3_wrdata = 32'd0; -reg main_sdram_master_p3_wrdata_en = 1'd0; -reg [3:0] main_sdram_master_p3_wrdata_mask = 4'd0; -reg main_sdram_master_p3_rddata_en = 1'd0; -wire [31:0] main_sdram_master_p3_rddata; -wire main_sdram_master_p3_rddata_valid; -reg [3:0] main_sdram_storage = 4'd0; -reg main_sdram_re = 1'd0; -reg [5:0] main_sdram_phaseinjector0_command_storage = 6'd0; -reg main_sdram_phaseinjector0_command_re = 1'd0; -wire main_sdram_phaseinjector0_command_issue_re; -wire main_sdram_phaseinjector0_command_issue_r; -wire main_sdram_phaseinjector0_command_issue_we; -reg main_sdram_phaseinjector0_command_issue_w = 1'd0; -reg [13:0] main_sdram_phaseinjector0_address_storage = 14'd0; -reg main_sdram_phaseinjector0_address_re = 1'd0; -reg [2:0] main_sdram_phaseinjector0_baddress_storage = 3'd0; -reg main_sdram_phaseinjector0_baddress_re = 1'd0; -reg [31:0] main_sdram_phaseinjector0_wrdata_storage = 32'd0; -reg main_sdram_phaseinjector0_wrdata_re = 1'd0; -reg [31:0] main_sdram_phaseinjector0_status = 32'd0; -wire main_sdram_phaseinjector0_we; -reg [5:0] main_sdram_phaseinjector1_command_storage = 6'd0; -reg main_sdram_phaseinjector1_command_re = 1'd0; -wire main_sdram_phaseinjector1_command_issue_re; -wire main_sdram_phaseinjector1_command_issue_r; -wire main_sdram_phaseinjector1_command_issue_we; -reg main_sdram_phaseinjector1_command_issue_w = 1'd0; -reg [13:0] main_sdram_phaseinjector1_address_storage = 14'd0; -reg main_sdram_phaseinjector1_address_re = 1'd0; -reg [2:0] main_sdram_phaseinjector1_baddress_storage = 3'd0; -reg main_sdram_phaseinjector1_baddress_re = 1'd0; -reg [31:0] main_sdram_phaseinjector1_wrdata_storage = 32'd0; -reg main_sdram_phaseinjector1_wrdata_re = 1'd0; -reg [31:0] main_sdram_phaseinjector1_status = 32'd0; -wire main_sdram_phaseinjector1_we; -reg [5:0] main_sdram_phaseinjector2_command_storage = 6'd0; -reg main_sdram_phaseinjector2_command_re = 1'd0; -wire main_sdram_phaseinjector2_command_issue_re; -wire main_sdram_phaseinjector2_command_issue_r; -wire main_sdram_phaseinjector2_command_issue_we; -reg main_sdram_phaseinjector2_command_issue_w = 1'd0; -reg [13:0] main_sdram_phaseinjector2_address_storage = 14'd0; -reg main_sdram_phaseinjector2_address_re = 1'd0; -reg [2:0] main_sdram_phaseinjector2_baddress_storage = 3'd0; -reg main_sdram_phaseinjector2_baddress_re = 1'd0; -reg [31:0] main_sdram_phaseinjector2_wrdata_storage = 32'd0; -reg main_sdram_phaseinjector2_wrdata_re = 1'd0; -reg [31:0] main_sdram_phaseinjector2_status = 32'd0; -wire main_sdram_phaseinjector2_we; -reg [5:0] main_sdram_phaseinjector3_command_storage = 6'd0; -reg main_sdram_phaseinjector3_command_re = 1'd0; -wire main_sdram_phaseinjector3_command_issue_re; -wire main_sdram_phaseinjector3_command_issue_r; -wire main_sdram_phaseinjector3_command_issue_we; -reg main_sdram_phaseinjector3_command_issue_w = 1'd0; -reg [13:0] main_sdram_phaseinjector3_address_storage = 14'd0; -reg main_sdram_phaseinjector3_address_re = 1'd0; -reg [2:0] main_sdram_phaseinjector3_baddress_storage = 3'd0; -reg main_sdram_phaseinjector3_baddress_re = 1'd0; -reg [31:0] main_sdram_phaseinjector3_wrdata_storage = 32'd0; -reg main_sdram_phaseinjector3_wrdata_re = 1'd0; -reg [31:0] main_sdram_phaseinjector3_status = 32'd0; -wire main_sdram_phaseinjector3_we; -wire main_sdram_interface_bank0_valid; -wire main_sdram_interface_bank0_ready; -wire main_sdram_interface_bank0_we; -wire [20:0] main_sdram_interface_bank0_addr; -wire main_sdram_interface_bank0_lock; -wire main_sdram_interface_bank0_wdata_ready; -wire main_sdram_interface_bank0_rdata_valid; -wire main_sdram_interface_bank1_valid; -wire main_sdram_interface_bank1_ready; -wire main_sdram_interface_bank1_we; -wire [20:0] main_sdram_interface_bank1_addr; -wire main_sdram_interface_bank1_lock; -wire main_sdram_interface_bank1_wdata_ready; -wire main_sdram_interface_bank1_rdata_valid; -wire main_sdram_interface_bank2_valid; -wire main_sdram_interface_bank2_ready; -wire main_sdram_interface_bank2_we; -wire [20:0] main_sdram_interface_bank2_addr; -wire main_sdram_interface_bank2_lock; -wire main_sdram_interface_bank2_wdata_ready; -wire main_sdram_interface_bank2_rdata_valid; -wire main_sdram_interface_bank3_valid; -wire main_sdram_interface_bank3_ready; -wire main_sdram_interface_bank3_we; -wire [20:0] main_sdram_interface_bank3_addr; -wire main_sdram_interface_bank3_lock; -wire main_sdram_interface_bank3_wdata_ready; -wire main_sdram_interface_bank3_rdata_valid; -wire main_sdram_interface_bank4_valid; -wire main_sdram_interface_bank4_ready; -wire main_sdram_interface_bank4_we; -wire [20:0] main_sdram_interface_bank4_addr; -wire main_sdram_interface_bank4_lock; -wire main_sdram_interface_bank4_wdata_ready; -wire main_sdram_interface_bank4_rdata_valid; -wire main_sdram_interface_bank5_valid; -wire main_sdram_interface_bank5_ready; -wire main_sdram_interface_bank5_we; -wire [20:0] main_sdram_interface_bank5_addr; -wire main_sdram_interface_bank5_lock; -wire main_sdram_interface_bank5_wdata_ready; -wire main_sdram_interface_bank5_rdata_valid; -wire main_sdram_interface_bank6_valid; -wire main_sdram_interface_bank6_ready; -wire main_sdram_interface_bank6_we; -wire [20:0] main_sdram_interface_bank6_addr; -wire main_sdram_interface_bank6_lock; -wire main_sdram_interface_bank6_wdata_ready; -wire main_sdram_interface_bank6_rdata_valid; -wire main_sdram_interface_bank7_valid; -wire main_sdram_interface_bank7_ready; -wire main_sdram_interface_bank7_we; -wire [20:0] main_sdram_interface_bank7_addr; -wire main_sdram_interface_bank7_lock; -wire main_sdram_interface_bank7_wdata_ready; -wire main_sdram_interface_bank7_rdata_valid; -reg [127:0] main_sdram_interface_wdata = 128'd0; -reg [15:0] main_sdram_interface_wdata_we = 16'd0; -wire [127:0] main_sdram_interface_rdata; -reg [13:0] main_sdram_dfi_p0_address = 14'd0; -reg [2:0] main_sdram_dfi_p0_bank = 3'd0; -reg main_sdram_dfi_p0_cas_n = 1'd1; -reg main_sdram_dfi_p0_cs_n = 1'd1; -reg main_sdram_dfi_p0_ras_n = 1'd1; -reg main_sdram_dfi_p0_we_n = 1'd1; -wire main_sdram_dfi_p0_cke; -wire main_sdram_dfi_p0_odt; -wire main_sdram_dfi_p0_reset_n; -reg main_sdram_dfi_p0_act_n = 1'd1; -wire [31:0] main_sdram_dfi_p0_wrdata; -reg main_sdram_dfi_p0_wrdata_en = 1'd0; -wire [3:0] main_sdram_dfi_p0_wrdata_mask; -reg main_sdram_dfi_p0_rddata_en = 1'd0; -wire [31:0] main_sdram_dfi_p0_rddata; -wire main_sdram_dfi_p0_rddata_valid; -reg [13:0] main_sdram_dfi_p1_address = 14'd0; -reg [2:0] main_sdram_dfi_p1_bank = 3'd0; -reg main_sdram_dfi_p1_cas_n = 1'd1; -reg main_sdram_dfi_p1_cs_n = 1'd1; -reg main_sdram_dfi_p1_ras_n = 1'd1; -reg main_sdram_dfi_p1_we_n = 1'd1; -wire main_sdram_dfi_p1_cke; -wire main_sdram_dfi_p1_odt; -wire main_sdram_dfi_p1_reset_n; -reg main_sdram_dfi_p1_act_n = 1'd1; -wire [31:0] main_sdram_dfi_p1_wrdata; -reg main_sdram_dfi_p1_wrdata_en = 1'd0; -wire [3:0] main_sdram_dfi_p1_wrdata_mask; -reg main_sdram_dfi_p1_rddata_en = 1'd0; -wire [31:0] main_sdram_dfi_p1_rddata; -wire main_sdram_dfi_p1_rddata_valid; -reg [13:0] main_sdram_dfi_p2_address = 14'd0; -reg [2:0] main_sdram_dfi_p2_bank = 3'd0; -reg main_sdram_dfi_p2_cas_n = 1'd1; -reg main_sdram_dfi_p2_cs_n = 1'd1; -reg main_sdram_dfi_p2_ras_n = 1'd1; -reg main_sdram_dfi_p2_we_n = 1'd1; -wire main_sdram_dfi_p2_cke; -wire main_sdram_dfi_p2_odt; -wire main_sdram_dfi_p2_reset_n; -reg main_sdram_dfi_p2_act_n = 1'd1; -wire [31:0] main_sdram_dfi_p2_wrdata; -reg main_sdram_dfi_p2_wrdata_en = 1'd0; -wire [3:0] main_sdram_dfi_p2_wrdata_mask; -reg main_sdram_dfi_p2_rddata_en = 1'd0; -wire [31:0] main_sdram_dfi_p2_rddata; -wire main_sdram_dfi_p2_rddata_valid; -reg [13:0] main_sdram_dfi_p3_address = 14'd0; -reg [2:0] main_sdram_dfi_p3_bank = 3'd0; -reg main_sdram_dfi_p3_cas_n = 1'd1; -reg main_sdram_dfi_p3_cs_n = 1'd1; -reg main_sdram_dfi_p3_ras_n = 1'd1; -reg main_sdram_dfi_p3_we_n = 1'd1; -wire main_sdram_dfi_p3_cke; -wire main_sdram_dfi_p3_odt; -wire main_sdram_dfi_p3_reset_n; -reg main_sdram_dfi_p3_act_n = 1'd1; -wire [31:0] main_sdram_dfi_p3_wrdata; -reg main_sdram_dfi_p3_wrdata_en = 1'd0; -wire [3:0] main_sdram_dfi_p3_wrdata_mask; -reg main_sdram_dfi_p3_rddata_en = 1'd0; -wire [31:0] main_sdram_dfi_p3_rddata; -wire main_sdram_dfi_p3_rddata_valid; -reg main_sdram_cmd_valid = 1'd0; -reg main_sdram_cmd_ready = 1'd0; -reg main_sdram_cmd_last = 1'd0; -reg [13:0] main_sdram_cmd_payload_a = 14'd0; -reg [2:0] main_sdram_cmd_payload_ba = 3'd0; -reg main_sdram_cmd_payload_cas = 1'd0; -reg main_sdram_cmd_payload_ras = 1'd0; -reg main_sdram_cmd_payload_we = 1'd0; -reg main_sdram_cmd_payload_is_read = 1'd0; -reg main_sdram_cmd_payload_is_write = 1'd0; -wire main_sdram_wants_refresh; -wire main_sdram_wants_zqcs; -wire main_sdram_timer_wait; -wire main_sdram_timer_done0; -wire [8:0] main_sdram_timer_count0; -wire main_sdram_timer_done1; -reg [8:0] main_sdram_timer_count1 = 9'd468; -wire main_sdram_postponer_req_i; -reg main_sdram_postponer_req_o = 1'd0; -reg main_sdram_postponer_count = 1'd0; -reg main_sdram_sequencer_start0 = 1'd0; -wire main_sdram_sequencer_done0; -wire main_sdram_sequencer_start1; -reg main_sdram_sequencer_done1 = 1'd0; -reg [5:0] main_sdram_sequencer_counter = 6'd0; -reg main_sdram_sequencer_count = 1'd0; -wire main_sdram_zqcs_timer_wait; -wire main_sdram_zqcs_timer_done0; -wire [25:0] main_sdram_zqcs_timer_count0; -wire main_sdram_zqcs_timer_done1; -reg [25:0] main_sdram_zqcs_timer_count1 = 26'd59999999; -reg main_sdram_zqcs_executer_start = 1'd0; -reg main_sdram_zqcs_executer_done = 1'd0; -reg [4:0] main_sdram_zqcs_executer_counter = 5'd0; -wire main_sdram_bankmachine0_req_valid; -wire main_sdram_bankmachine0_req_ready; -wire main_sdram_bankmachine0_req_we; -wire [20:0] main_sdram_bankmachine0_req_addr; -wire main_sdram_bankmachine0_req_lock; -reg main_sdram_bankmachine0_req_wdata_ready = 1'd0; -reg main_sdram_bankmachine0_req_rdata_valid = 1'd0; -wire main_sdram_bankmachine0_refresh_req; -reg main_sdram_bankmachine0_refresh_gnt = 1'd0; -reg main_sdram_bankmachine0_cmd_valid = 1'd0; -reg main_sdram_bankmachine0_cmd_ready = 1'd0; -reg [13:0] main_sdram_bankmachine0_cmd_payload_a = 14'd0; -wire [2:0] main_sdram_bankmachine0_cmd_payload_ba; -reg main_sdram_bankmachine0_cmd_payload_cas = 1'd0; -reg main_sdram_bankmachine0_cmd_payload_ras = 1'd0; -reg main_sdram_bankmachine0_cmd_payload_we = 1'd0; -reg main_sdram_bankmachine0_cmd_payload_is_cmd = 1'd0; -reg main_sdram_bankmachine0_cmd_payload_is_read = 1'd0; -reg main_sdram_bankmachine0_cmd_payload_is_write = 1'd0; -reg main_sdram_bankmachine0_auto_precharge = 1'd0; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; -reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first = 1'd0; -reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last = 1'd0; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; -wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; -wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; -wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; -reg [3:0] main_sdram_bankmachine0_cmd_buffer_lookahead_level = 4'd0; -reg main_sdram_bankmachine0_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we; -wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_do_read; -wire [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr; -wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; -wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; -wire main_sdram_bankmachine0_cmd_buffer_sink_valid; -wire main_sdram_bankmachine0_cmd_buffer_sink_ready; -wire main_sdram_bankmachine0_cmd_buffer_sink_first; -wire main_sdram_bankmachine0_cmd_buffer_sink_last; -wire main_sdram_bankmachine0_cmd_buffer_sink_payload_we; -wire [20:0] main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; -reg main_sdram_bankmachine0_cmd_buffer_source_valid = 1'd0; -wire main_sdram_bankmachine0_cmd_buffer_source_ready; -reg main_sdram_bankmachine0_cmd_buffer_source_first = 1'd0; -reg main_sdram_bankmachine0_cmd_buffer_source_last = 1'd0; -reg main_sdram_bankmachine0_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] main_sdram_bankmachine0_cmd_buffer_source_payload_addr = 21'd0; -reg [13:0] main_sdram_bankmachine0_row = 14'd0; -reg main_sdram_bankmachine0_row_opened = 1'd0; -wire main_sdram_bankmachine0_row_hit; -reg main_sdram_bankmachine0_row_open = 1'd0; -reg main_sdram_bankmachine0_row_close = 1'd0; -reg main_sdram_bankmachine0_row_col_n_addr_sel = 1'd0; -wire main_sdram_bankmachine0_twtpcon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine0_twtpcon_ready = 1'd1; -reg [2:0] main_sdram_bankmachine0_twtpcon_count = 3'd0; -wire main_sdram_bankmachine0_trccon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine0_trccon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine0_trccon_count = 2'd0; -wire main_sdram_bankmachine0_trascon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine0_trascon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine0_trascon_count = 2'd0; -wire main_sdram_bankmachine1_req_valid; -wire main_sdram_bankmachine1_req_ready; -wire main_sdram_bankmachine1_req_we; -wire [20:0] main_sdram_bankmachine1_req_addr; -wire main_sdram_bankmachine1_req_lock; -reg main_sdram_bankmachine1_req_wdata_ready = 1'd0; -reg main_sdram_bankmachine1_req_rdata_valid = 1'd0; -wire main_sdram_bankmachine1_refresh_req; -reg main_sdram_bankmachine1_refresh_gnt = 1'd0; -reg main_sdram_bankmachine1_cmd_valid = 1'd0; -reg main_sdram_bankmachine1_cmd_ready = 1'd0; -reg [13:0] main_sdram_bankmachine1_cmd_payload_a = 14'd0; -wire [2:0] main_sdram_bankmachine1_cmd_payload_ba; -reg main_sdram_bankmachine1_cmd_payload_cas = 1'd0; -reg main_sdram_bankmachine1_cmd_payload_ras = 1'd0; -reg main_sdram_bankmachine1_cmd_payload_we = 1'd0; -reg main_sdram_bankmachine1_cmd_payload_is_cmd = 1'd0; -reg main_sdram_bankmachine1_cmd_payload_is_read = 1'd0; -reg main_sdram_bankmachine1_cmd_payload_is_write = 1'd0; -reg main_sdram_bankmachine1_auto_precharge = 1'd0; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; -reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first = 1'd0; -reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last = 1'd0; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; -wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; -wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; -wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; -reg [3:0] main_sdram_bankmachine1_cmd_buffer_lookahead_level = 4'd0; -reg main_sdram_bankmachine1_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we; -wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_do_read; -wire [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr; -wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; -wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; -wire main_sdram_bankmachine1_cmd_buffer_sink_valid; -wire main_sdram_bankmachine1_cmd_buffer_sink_ready; -wire main_sdram_bankmachine1_cmd_buffer_sink_first; -wire main_sdram_bankmachine1_cmd_buffer_sink_last; -wire main_sdram_bankmachine1_cmd_buffer_sink_payload_we; -wire [20:0] main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; -reg main_sdram_bankmachine1_cmd_buffer_source_valid = 1'd0; -wire main_sdram_bankmachine1_cmd_buffer_source_ready; -reg main_sdram_bankmachine1_cmd_buffer_source_first = 1'd0; -reg main_sdram_bankmachine1_cmd_buffer_source_last = 1'd0; -reg main_sdram_bankmachine1_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] main_sdram_bankmachine1_cmd_buffer_source_payload_addr = 21'd0; -reg [13:0] main_sdram_bankmachine1_row = 14'd0; -reg main_sdram_bankmachine1_row_opened = 1'd0; -wire main_sdram_bankmachine1_row_hit; -reg main_sdram_bankmachine1_row_open = 1'd0; -reg main_sdram_bankmachine1_row_close = 1'd0; -reg main_sdram_bankmachine1_row_col_n_addr_sel = 1'd0; -wire main_sdram_bankmachine1_twtpcon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine1_twtpcon_ready = 1'd1; -reg [2:0] main_sdram_bankmachine1_twtpcon_count = 3'd0; -wire main_sdram_bankmachine1_trccon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine1_trccon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine1_trccon_count = 2'd0; -wire main_sdram_bankmachine1_trascon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine1_trascon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine1_trascon_count = 2'd0; -wire main_sdram_bankmachine2_req_valid; -wire main_sdram_bankmachine2_req_ready; -wire main_sdram_bankmachine2_req_we; -wire [20:0] main_sdram_bankmachine2_req_addr; -wire main_sdram_bankmachine2_req_lock; -reg main_sdram_bankmachine2_req_wdata_ready = 1'd0; -reg main_sdram_bankmachine2_req_rdata_valid = 1'd0; -wire main_sdram_bankmachine2_refresh_req; -reg main_sdram_bankmachine2_refresh_gnt = 1'd0; -reg main_sdram_bankmachine2_cmd_valid = 1'd0; -reg main_sdram_bankmachine2_cmd_ready = 1'd0; -reg [13:0] main_sdram_bankmachine2_cmd_payload_a = 14'd0; -wire [2:0] main_sdram_bankmachine2_cmd_payload_ba; -reg main_sdram_bankmachine2_cmd_payload_cas = 1'd0; -reg main_sdram_bankmachine2_cmd_payload_ras = 1'd0; -reg main_sdram_bankmachine2_cmd_payload_we = 1'd0; -reg main_sdram_bankmachine2_cmd_payload_is_cmd = 1'd0; -reg main_sdram_bankmachine2_cmd_payload_is_read = 1'd0; -reg main_sdram_bankmachine2_cmd_payload_is_write = 1'd0; -reg main_sdram_bankmachine2_auto_precharge = 1'd0; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; -reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first = 1'd0; -reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last = 1'd0; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; -wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; -wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; -wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; -reg [3:0] main_sdram_bankmachine2_cmd_buffer_lookahead_level = 4'd0; -reg main_sdram_bankmachine2_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we; -wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_do_read; -wire [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr; -wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; -wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; -wire main_sdram_bankmachine2_cmd_buffer_sink_valid; -wire main_sdram_bankmachine2_cmd_buffer_sink_ready; -wire main_sdram_bankmachine2_cmd_buffer_sink_first; -wire main_sdram_bankmachine2_cmd_buffer_sink_last; -wire main_sdram_bankmachine2_cmd_buffer_sink_payload_we; -wire [20:0] main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; -reg main_sdram_bankmachine2_cmd_buffer_source_valid = 1'd0; -wire main_sdram_bankmachine2_cmd_buffer_source_ready; -reg main_sdram_bankmachine2_cmd_buffer_source_first = 1'd0; -reg main_sdram_bankmachine2_cmd_buffer_source_last = 1'd0; -reg main_sdram_bankmachine2_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] main_sdram_bankmachine2_cmd_buffer_source_payload_addr = 21'd0; -reg [13:0] main_sdram_bankmachine2_row = 14'd0; -reg main_sdram_bankmachine2_row_opened = 1'd0; -wire main_sdram_bankmachine2_row_hit; -reg main_sdram_bankmachine2_row_open = 1'd0; -reg main_sdram_bankmachine2_row_close = 1'd0; -reg main_sdram_bankmachine2_row_col_n_addr_sel = 1'd0; -wire main_sdram_bankmachine2_twtpcon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine2_twtpcon_ready = 1'd1; -reg [2:0] main_sdram_bankmachine2_twtpcon_count = 3'd0; -wire main_sdram_bankmachine2_trccon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine2_trccon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine2_trccon_count = 2'd0; -wire main_sdram_bankmachine2_trascon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine2_trascon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine2_trascon_count = 2'd0; -wire main_sdram_bankmachine3_req_valid; -wire main_sdram_bankmachine3_req_ready; -wire main_sdram_bankmachine3_req_we; -wire [20:0] main_sdram_bankmachine3_req_addr; -wire main_sdram_bankmachine3_req_lock; -reg main_sdram_bankmachine3_req_wdata_ready = 1'd0; -reg main_sdram_bankmachine3_req_rdata_valid = 1'd0; -wire main_sdram_bankmachine3_refresh_req; -reg main_sdram_bankmachine3_refresh_gnt = 1'd0; -reg main_sdram_bankmachine3_cmd_valid = 1'd0; -reg main_sdram_bankmachine3_cmd_ready = 1'd0; -reg [13:0] main_sdram_bankmachine3_cmd_payload_a = 14'd0; -wire [2:0] main_sdram_bankmachine3_cmd_payload_ba; -reg main_sdram_bankmachine3_cmd_payload_cas = 1'd0; -reg main_sdram_bankmachine3_cmd_payload_ras = 1'd0; -reg main_sdram_bankmachine3_cmd_payload_we = 1'd0; -reg main_sdram_bankmachine3_cmd_payload_is_cmd = 1'd0; -reg main_sdram_bankmachine3_cmd_payload_is_read = 1'd0; -reg main_sdram_bankmachine3_cmd_payload_is_write = 1'd0; -reg main_sdram_bankmachine3_auto_precharge = 1'd0; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; -reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first = 1'd0; -reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last = 1'd0; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; -wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; -wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; -wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; -reg [3:0] main_sdram_bankmachine3_cmd_buffer_lookahead_level = 4'd0; -reg main_sdram_bankmachine3_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we; -wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_do_read; -wire [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr; -wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; -wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; -wire main_sdram_bankmachine3_cmd_buffer_sink_valid; -wire main_sdram_bankmachine3_cmd_buffer_sink_ready; -wire main_sdram_bankmachine3_cmd_buffer_sink_first; -wire main_sdram_bankmachine3_cmd_buffer_sink_last; -wire main_sdram_bankmachine3_cmd_buffer_sink_payload_we; -wire [20:0] main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; -reg main_sdram_bankmachine3_cmd_buffer_source_valid = 1'd0; -wire main_sdram_bankmachine3_cmd_buffer_source_ready; -reg main_sdram_bankmachine3_cmd_buffer_source_first = 1'd0; -reg main_sdram_bankmachine3_cmd_buffer_source_last = 1'd0; -reg main_sdram_bankmachine3_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] main_sdram_bankmachine3_cmd_buffer_source_payload_addr = 21'd0; -reg [13:0] main_sdram_bankmachine3_row = 14'd0; -reg main_sdram_bankmachine3_row_opened = 1'd0; -wire main_sdram_bankmachine3_row_hit; -reg main_sdram_bankmachine3_row_open = 1'd0; -reg main_sdram_bankmachine3_row_close = 1'd0; -reg main_sdram_bankmachine3_row_col_n_addr_sel = 1'd0; -wire main_sdram_bankmachine3_twtpcon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine3_twtpcon_ready = 1'd1; -reg [2:0] main_sdram_bankmachine3_twtpcon_count = 3'd0; -wire main_sdram_bankmachine3_trccon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine3_trccon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine3_trccon_count = 2'd0; -wire main_sdram_bankmachine3_trascon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine3_trascon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine3_trascon_count = 2'd0; -wire main_sdram_bankmachine4_req_valid; -wire main_sdram_bankmachine4_req_ready; -wire main_sdram_bankmachine4_req_we; -wire [20:0] main_sdram_bankmachine4_req_addr; -wire main_sdram_bankmachine4_req_lock; -reg main_sdram_bankmachine4_req_wdata_ready = 1'd0; -reg main_sdram_bankmachine4_req_rdata_valid = 1'd0; -wire main_sdram_bankmachine4_refresh_req; -reg main_sdram_bankmachine4_refresh_gnt = 1'd0; -reg main_sdram_bankmachine4_cmd_valid = 1'd0; -reg main_sdram_bankmachine4_cmd_ready = 1'd0; -reg [13:0] main_sdram_bankmachine4_cmd_payload_a = 14'd0; -wire [2:0] main_sdram_bankmachine4_cmd_payload_ba; -reg main_sdram_bankmachine4_cmd_payload_cas = 1'd0; -reg main_sdram_bankmachine4_cmd_payload_ras = 1'd0; -reg main_sdram_bankmachine4_cmd_payload_we = 1'd0; -reg main_sdram_bankmachine4_cmd_payload_is_cmd = 1'd0; -reg main_sdram_bankmachine4_cmd_payload_is_read = 1'd0; -reg main_sdram_bankmachine4_cmd_payload_is_write = 1'd0; -reg main_sdram_bankmachine4_auto_precharge = 1'd0; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; -reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first = 1'd0; -reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last = 1'd0; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; -wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; -wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; -wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; -reg [3:0] main_sdram_bankmachine4_cmd_buffer_lookahead_level = 4'd0; -reg main_sdram_bankmachine4_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we; -wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_do_read; -wire [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr; -wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; -wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; -wire main_sdram_bankmachine4_cmd_buffer_sink_valid; -wire main_sdram_bankmachine4_cmd_buffer_sink_ready; -wire main_sdram_bankmachine4_cmd_buffer_sink_first; -wire main_sdram_bankmachine4_cmd_buffer_sink_last; -wire main_sdram_bankmachine4_cmd_buffer_sink_payload_we; -wire [20:0] main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; -reg main_sdram_bankmachine4_cmd_buffer_source_valid = 1'd0; -wire main_sdram_bankmachine4_cmd_buffer_source_ready; -reg main_sdram_bankmachine4_cmd_buffer_source_first = 1'd0; -reg main_sdram_bankmachine4_cmd_buffer_source_last = 1'd0; -reg main_sdram_bankmachine4_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] main_sdram_bankmachine4_cmd_buffer_source_payload_addr = 21'd0; -reg [13:0] main_sdram_bankmachine4_row = 14'd0; -reg main_sdram_bankmachine4_row_opened = 1'd0; -wire main_sdram_bankmachine4_row_hit; -reg main_sdram_bankmachine4_row_open = 1'd0; -reg main_sdram_bankmachine4_row_close = 1'd0; -reg main_sdram_bankmachine4_row_col_n_addr_sel = 1'd0; -wire main_sdram_bankmachine4_twtpcon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine4_twtpcon_ready = 1'd1; -reg [2:0] main_sdram_bankmachine4_twtpcon_count = 3'd0; -wire main_sdram_bankmachine4_trccon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine4_trccon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine4_trccon_count = 2'd0; -wire main_sdram_bankmachine4_trascon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine4_trascon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine4_trascon_count = 2'd0; -wire main_sdram_bankmachine5_req_valid; -wire main_sdram_bankmachine5_req_ready; -wire main_sdram_bankmachine5_req_we; -wire [20:0] main_sdram_bankmachine5_req_addr; -wire main_sdram_bankmachine5_req_lock; -reg main_sdram_bankmachine5_req_wdata_ready = 1'd0; -reg main_sdram_bankmachine5_req_rdata_valid = 1'd0; -wire main_sdram_bankmachine5_refresh_req; -reg main_sdram_bankmachine5_refresh_gnt = 1'd0; -reg main_sdram_bankmachine5_cmd_valid = 1'd0; -reg main_sdram_bankmachine5_cmd_ready = 1'd0; -reg [13:0] main_sdram_bankmachine5_cmd_payload_a = 14'd0; -wire [2:0] main_sdram_bankmachine5_cmd_payload_ba; -reg main_sdram_bankmachine5_cmd_payload_cas = 1'd0; -reg main_sdram_bankmachine5_cmd_payload_ras = 1'd0; -reg main_sdram_bankmachine5_cmd_payload_we = 1'd0; -reg main_sdram_bankmachine5_cmd_payload_is_cmd = 1'd0; -reg main_sdram_bankmachine5_cmd_payload_is_read = 1'd0; -reg main_sdram_bankmachine5_cmd_payload_is_write = 1'd0; -reg main_sdram_bankmachine5_auto_precharge = 1'd0; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; -reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first = 1'd0; -reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last = 1'd0; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; -wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; -wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; -wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; -reg [3:0] main_sdram_bankmachine5_cmd_buffer_lookahead_level = 4'd0; -reg main_sdram_bankmachine5_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we; -wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_do_read; -wire [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr; -wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; -wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; -wire main_sdram_bankmachine5_cmd_buffer_sink_valid; -wire main_sdram_bankmachine5_cmd_buffer_sink_ready; -wire main_sdram_bankmachine5_cmd_buffer_sink_first; -wire main_sdram_bankmachine5_cmd_buffer_sink_last; -wire main_sdram_bankmachine5_cmd_buffer_sink_payload_we; -wire [20:0] main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; -reg main_sdram_bankmachine5_cmd_buffer_source_valid = 1'd0; -wire main_sdram_bankmachine5_cmd_buffer_source_ready; -reg main_sdram_bankmachine5_cmd_buffer_source_first = 1'd0; -reg main_sdram_bankmachine5_cmd_buffer_source_last = 1'd0; -reg main_sdram_bankmachine5_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] main_sdram_bankmachine5_cmd_buffer_source_payload_addr = 21'd0; -reg [13:0] main_sdram_bankmachine5_row = 14'd0; -reg main_sdram_bankmachine5_row_opened = 1'd0; -wire main_sdram_bankmachine5_row_hit; -reg main_sdram_bankmachine5_row_open = 1'd0; -reg main_sdram_bankmachine5_row_close = 1'd0; -reg main_sdram_bankmachine5_row_col_n_addr_sel = 1'd0; -wire main_sdram_bankmachine5_twtpcon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine5_twtpcon_ready = 1'd1; -reg [2:0] main_sdram_bankmachine5_twtpcon_count = 3'd0; -wire main_sdram_bankmachine5_trccon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine5_trccon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine5_trccon_count = 2'd0; -wire main_sdram_bankmachine5_trascon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine5_trascon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine5_trascon_count = 2'd0; -wire main_sdram_bankmachine6_req_valid; -wire main_sdram_bankmachine6_req_ready; -wire main_sdram_bankmachine6_req_we; -wire [20:0] main_sdram_bankmachine6_req_addr; -wire main_sdram_bankmachine6_req_lock; -reg main_sdram_bankmachine6_req_wdata_ready = 1'd0; -reg main_sdram_bankmachine6_req_rdata_valid = 1'd0; -wire main_sdram_bankmachine6_refresh_req; -reg main_sdram_bankmachine6_refresh_gnt = 1'd0; -reg main_sdram_bankmachine6_cmd_valid = 1'd0; -reg main_sdram_bankmachine6_cmd_ready = 1'd0; -reg [13:0] main_sdram_bankmachine6_cmd_payload_a = 14'd0; -wire [2:0] main_sdram_bankmachine6_cmd_payload_ba; -reg main_sdram_bankmachine6_cmd_payload_cas = 1'd0; -reg main_sdram_bankmachine6_cmd_payload_ras = 1'd0; -reg main_sdram_bankmachine6_cmd_payload_we = 1'd0; -reg main_sdram_bankmachine6_cmd_payload_is_cmd = 1'd0; -reg main_sdram_bankmachine6_cmd_payload_is_read = 1'd0; -reg main_sdram_bankmachine6_cmd_payload_is_write = 1'd0; -reg main_sdram_bankmachine6_auto_precharge = 1'd0; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; -reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first = 1'd0; -reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last = 1'd0; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; -wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; -wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; -wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; -reg [3:0] main_sdram_bankmachine6_cmd_buffer_lookahead_level = 4'd0; -reg main_sdram_bankmachine6_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we; -wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_do_read; -wire [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr; -wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; -wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; -wire main_sdram_bankmachine6_cmd_buffer_sink_valid; -wire main_sdram_bankmachine6_cmd_buffer_sink_ready; -wire main_sdram_bankmachine6_cmd_buffer_sink_first; -wire main_sdram_bankmachine6_cmd_buffer_sink_last; -wire main_sdram_bankmachine6_cmd_buffer_sink_payload_we; -wire [20:0] main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; -reg main_sdram_bankmachine6_cmd_buffer_source_valid = 1'd0; -wire main_sdram_bankmachine6_cmd_buffer_source_ready; -reg main_sdram_bankmachine6_cmd_buffer_source_first = 1'd0; -reg main_sdram_bankmachine6_cmd_buffer_source_last = 1'd0; -reg main_sdram_bankmachine6_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] main_sdram_bankmachine6_cmd_buffer_source_payload_addr = 21'd0; -reg [13:0] main_sdram_bankmachine6_row = 14'd0; -reg main_sdram_bankmachine6_row_opened = 1'd0; -wire main_sdram_bankmachine6_row_hit; -reg main_sdram_bankmachine6_row_open = 1'd0; -reg main_sdram_bankmachine6_row_close = 1'd0; -reg main_sdram_bankmachine6_row_col_n_addr_sel = 1'd0; -wire main_sdram_bankmachine6_twtpcon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine6_twtpcon_ready = 1'd1; -reg [2:0] main_sdram_bankmachine6_twtpcon_count = 3'd0; -wire main_sdram_bankmachine6_trccon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine6_trccon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine6_trccon_count = 2'd0; -wire main_sdram_bankmachine6_trascon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine6_trascon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine6_trascon_count = 2'd0; -wire main_sdram_bankmachine7_req_valid; -wire main_sdram_bankmachine7_req_ready; -wire main_sdram_bankmachine7_req_we; -wire [20:0] main_sdram_bankmachine7_req_addr; -wire main_sdram_bankmachine7_req_lock; -reg main_sdram_bankmachine7_req_wdata_ready = 1'd0; -reg main_sdram_bankmachine7_req_rdata_valid = 1'd0; -wire main_sdram_bankmachine7_refresh_req; -reg main_sdram_bankmachine7_refresh_gnt = 1'd0; -reg main_sdram_bankmachine7_cmd_valid = 1'd0; -reg main_sdram_bankmachine7_cmd_ready = 1'd0; -reg [13:0] main_sdram_bankmachine7_cmd_payload_a = 14'd0; -wire [2:0] main_sdram_bankmachine7_cmd_payload_ba; -reg main_sdram_bankmachine7_cmd_payload_cas = 1'd0; -reg main_sdram_bankmachine7_cmd_payload_ras = 1'd0; -reg main_sdram_bankmachine7_cmd_payload_we = 1'd0; -reg main_sdram_bankmachine7_cmd_payload_is_cmd = 1'd0; -reg main_sdram_bankmachine7_cmd_payload_is_read = 1'd0; -reg main_sdram_bankmachine7_cmd_payload_is_write = 1'd0; -reg main_sdram_bankmachine7_auto_precharge = 1'd0; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; -reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first = 1'd0; -reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last = 1'd0; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; -wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; -wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; -wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; -wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; -reg [3:0] main_sdram_bankmachine7_cmd_buffer_lookahead_level = 4'd0; -reg main_sdram_bankmachine7_cmd_buffer_lookahead_replace = 1'd0; -reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_produce = 3'd0; -reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_consume = 3'd0; -reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr = 3'd0; -wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we; -wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_do_read; -wire [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr; -wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we; -wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; -wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; -wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; -wire main_sdram_bankmachine7_cmd_buffer_sink_valid; -wire main_sdram_bankmachine7_cmd_buffer_sink_ready; -wire main_sdram_bankmachine7_cmd_buffer_sink_first; -wire main_sdram_bankmachine7_cmd_buffer_sink_last; -wire main_sdram_bankmachine7_cmd_buffer_sink_payload_we; -wire [20:0] main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; -reg main_sdram_bankmachine7_cmd_buffer_source_valid = 1'd0; -wire main_sdram_bankmachine7_cmd_buffer_source_ready; -reg main_sdram_bankmachine7_cmd_buffer_source_first = 1'd0; -reg main_sdram_bankmachine7_cmd_buffer_source_last = 1'd0; -reg main_sdram_bankmachine7_cmd_buffer_source_payload_we = 1'd0; -reg [20:0] main_sdram_bankmachine7_cmd_buffer_source_payload_addr = 21'd0; -reg [13:0] main_sdram_bankmachine7_row = 14'd0; -reg main_sdram_bankmachine7_row_opened = 1'd0; -wire main_sdram_bankmachine7_row_hit; -reg main_sdram_bankmachine7_row_open = 1'd0; -reg main_sdram_bankmachine7_row_close = 1'd0; -reg main_sdram_bankmachine7_row_col_n_addr_sel = 1'd0; -wire main_sdram_bankmachine7_twtpcon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine7_twtpcon_ready = 1'd1; -reg [2:0] main_sdram_bankmachine7_twtpcon_count = 3'd0; -wire main_sdram_bankmachine7_trccon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine7_trccon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine7_trccon_count = 2'd0; -wire main_sdram_bankmachine7_trascon_valid; -(* dont_touch = "true" *) reg main_sdram_bankmachine7_trascon_ready = 1'd1; -reg [1:0] main_sdram_bankmachine7_trascon_count = 2'd0; -wire main_sdram_ras_allowed; -wire main_sdram_cas_allowed; -reg main_sdram_choose_cmd_want_reads = 1'd0; -reg main_sdram_choose_cmd_want_writes = 1'd0; -reg main_sdram_choose_cmd_want_cmds = 1'd0; -reg main_sdram_choose_cmd_want_activates = 1'd0; -wire main_sdram_choose_cmd_cmd_valid; -reg main_sdram_choose_cmd_cmd_ready = 1'd0; -wire [13:0] main_sdram_choose_cmd_cmd_payload_a; -wire [2:0] main_sdram_choose_cmd_cmd_payload_ba; -reg main_sdram_choose_cmd_cmd_payload_cas = 1'd0; -reg main_sdram_choose_cmd_cmd_payload_ras = 1'd0; -reg main_sdram_choose_cmd_cmd_payload_we = 1'd0; -wire main_sdram_choose_cmd_cmd_payload_is_cmd; -wire main_sdram_choose_cmd_cmd_payload_is_read; -wire main_sdram_choose_cmd_cmd_payload_is_write; -reg [7:0] main_sdram_choose_cmd_valids = 8'd0; -wire [7:0] main_sdram_choose_cmd_request; -reg [2:0] main_sdram_choose_cmd_grant = 3'd0; -wire main_sdram_choose_cmd_ce; -reg main_sdram_choose_req_want_reads = 1'd0; -reg main_sdram_choose_req_want_writes = 1'd0; -reg main_sdram_choose_req_want_cmds = 1'd0; -reg main_sdram_choose_req_want_activates = 1'd0; -wire main_sdram_choose_req_cmd_valid; -reg main_sdram_choose_req_cmd_ready = 1'd0; -wire [13:0] main_sdram_choose_req_cmd_payload_a; -wire [2:0] main_sdram_choose_req_cmd_payload_ba; -reg main_sdram_choose_req_cmd_payload_cas = 1'd0; -reg main_sdram_choose_req_cmd_payload_ras = 1'd0; -reg main_sdram_choose_req_cmd_payload_we = 1'd0; -wire main_sdram_choose_req_cmd_payload_is_cmd; -wire main_sdram_choose_req_cmd_payload_is_read; -wire main_sdram_choose_req_cmd_payload_is_write; -reg [7:0] main_sdram_choose_req_valids = 8'd0; -wire [7:0] main_sdram_choose_req_request; -reg [2:0] main_sdram_choose_req_grant = 3'd0; -wire main_sdram_choose_req_ce; -reg [13:0] main_sdram_nop_a = 14'd0; -reg [2:0] main_sdram_nop_ba = 3'd0; -reg [1:0] main_sdram_steerer_sel0 = 2'd0; -reg [1:0] main_sdram_steerer_sel1 = 2'd0; -reg [1:0] main_sdram_steerer_sel2 = 2'd0; -reg [1:0] main_sdram_steerer_sel3 = 2'd0; -reg main_sdram_steerer0 = 1'd1; -reg main_sdram_steerer1 = 1'd1; -reg main_sdram_steerer2 = 1'd1; -reg main_sdram_steerer3 = 1'd1; -reg main_sdram_steerer4 = 1'd1; -reg main_sdram_steerer5 = 1'd1; -reg main_sdram_steerer6 = 1'd1; -reg main_sdram_steerer7 = 1'd1; -wire main_sdram_trrdcon_valid; -(* dont_touch = "true" *) reg main_sdram_trrdcon_ready = 1'd1; -reg main_sdram_trrdcon_count = 1'd0; -wire main_sdram_tfawcon_valid; -(* dont_touch = "true" *) reg main_sdram_tfawcon_ready = 1'd1; -wire [1:0] main_sdram_tfawcon_count; -reg [3:0] main_sdram_tfawcon_window = 4'd0; -wire main_sdram_tccdcon_valid; -(* dont_touch = "true" *) reg main_sdram_tccdcon_ready = 1'd1; -reg main_sdram_tccdcon_count = 1'd0; -wire main_sdram_twtrcon_valid; -(* dont_touch = "true" *) reg main_sdram_twtrcon_ready = 1'd1; -reg [2:0] main_sdram_twtrcon_count = 3'd0; -wire main_sdram_read_available; -wire main_sdram_write_available; -reg main_sdram_en0 = 1'd0; -wire main_sdram_max_time0; -reg [4:0] main_sdram_time0 = 5'd0; -reg main_sdram_en1 = 1'd0; -wire main_sdram_max_time1; -reg [3:0] main_sdram_time1 = 4'd0; -wire main_sdram_go_to_refresh; -reg main_port_cmd_valid = 1'd0; -wire main_port_cmd_ready; -reg main_port_cmd_payload_we = 1'd0; -reg [23:0] main_port_cmd_payload_addr = 24'd0; -wire main_port_wdata_valid; -wire main_port_wdata_ready; -wire main_port_wdata_first; -wire main_port_wdata_last; -wire [127:0] main_port_wdata_payload_data; -wire [15:0] main_port_wdata_payload_we; -wire main_port_rdata_valid; -wire main_port_rdata_ready; -reg main_port_rdata_first = 1'd0; -reg main_port_rdata_last = 1'd0; -wire [127:0] main_port_rdata_payload_data; -wire [29:0] main_interface1_wb_sdram_adr; -wire [31:0] main_interface1_wb_sdram_dat_w; -wire [31:0] main_interface1_wb_sdram_dat_r; -wire [3:0] main_interface1_wb_sdram_sel; -wire main_interface1_wb_sdram_cyc; -wire main_interface1_wb_sdram_stb; -wire main_interface1_wb_sdram_ack; -wire main_interface1_wb_sdram_we; -wire [2:0] main_interface1_wb_sdram_cti; -wire [1:0] main_interface1_wb_sdram_bte; -wire main_interface1_wb_sdram_err; -wire [29:0] main_adr; -wire [127:0] main_dat_w; -wire [127:0] main_dat_r; -wire [15:0] main_sel; -reg main_cyc = 1'd0; -reg main_stb = 1'd0; -reg main_ack = 1'd0; -reg main_we = 1'd0; -wire [8:0] main_data_port_adr; -wire [127:0] main_data_port_dat_r; -reg [15:0] main_data_port_we = 16'd0; -reg [127:0] main_data_port_dat_w = 128'd0; -reg main_write_from_slave = 1'd0; -reg [1:0] main_adr_offset_r = 2'd0; -wire [8:0] main_tag_port_adr; -wire [23:0] main_tag_port_dat_r; -reg main_tag_port_we = 1'd0; -wire [23:0] main_tag_port_dat_w; -wire [22:0] main_tag_do_tag; -wire main_tag_do_dirty; -wire [22:0] main_tag_di_tag; -reg main_tag_di_dirty = 1'd0; -reg main_word_clr = 1'd0; -reg main_word_inc = 1'd0; -wire main_wdata_converter_sink_valid; -wire main_wdata_converter_sink_ready; -reg main_wdata_converter_sink_first = 1'd0; -reg main_wdata_converter_sink_last = 1'd0; -wire [127:0] main_wdata_converter_sink_payload_data; -wire [15:0] main_wdata_converter_sink_payload_we; -wire main_wdata_converter_source_valid; -wire main_wdata_converter_source_ready; -wire main_wdata_converter_source_first; -wire main_wdata_converter_source_last; -wire [127:0] main_wdata_converter_source_payload_data; -wire [15:0] main_wdata_converter_source_payload_we; -wire main_wdata_converter_converter_sink_valid; -wire main_wdata_converter_converter_sink_ready; -wire main_wdata_converter_converter_sink_first; -wire main_wdata_converter_converter_sink_last; -wire [143:0] main_wdata_converter_converter_sink_payload_data; -wire main_wdata_converter_converter_source_valid; -wire main_wdata_converter_converter_source_ready; -wire main_wdata_converter_converter_source_first; -wire main_wdata_converter_converter_source_last; -wire [143:0] main_wdata_converter_converter_source_payload_data; -wire main_wdata_converter_converter_source_payload_valid_token_count; -wire main_wdata_converter_source_source_valid; -wire main_wdata_converter_source_source_ready; -wire main_wdata_converter_source_source_first; -wire main_wdata_converter_source_source_last; -wire [143:0] main_wdata_converter_source_source_payload_data; -wire main_rdata_converter_sink_valid; -wire main_rdata_converter_sink_ready; -wire main_rdata_converter_sink_first; -wire main_rdata_converter_sink_last; -wire [127:0] main_rdata_converter_sink_payload_data; -wire main_rdata_converter_source_valid; -wire main_rdata_converter_source_ready; -wire main_rdata_converter_source_first; -wire main_rdata_converter_source_last; -wire [127:0] main_rdata_converter_source_payload_data; -wire main_rdata_converter_converter_sink_valid; -wire main_rdata_converter_converter_sink_ready; -wire main_rdata_converter_converter_sink_first; -wire main_rdata_converter_converter_sink_last; -wire [127:0] main_rdata_converter_converter_sink_payload_data; -wire main_rdata_converter_converter_source_valid; -wire main_rdata_converter_converter_source_ready; -wire main_rdata_converter_converter_source_first; -wire main_rdata_converter_converter_source_last; -wire [127:0] main_rdata_converter_converter_source_payload_data; -wire main_rdata_converter_converter_source_payload_valid_token_count; -wire main_rdata_converter_source_source_valid; -wire main_rdata_converter_source_source_ready; -wire main_rdata_converter_source_source_first; -wire main_rdata_converter_source_source_last; -wire [127:0] main_rdata_converter_source_source_payload_data; -reg main_count = 1'd0; -reg builder_wb2csr_state = 1'd0; -reg builder_wb2csr_next_state = 1'd0; -wire builder_pll_fb; -reg [1:0] builder_refresher_state = 2'd0; -reg [1:0] builder_refresher_next_state = 2'd0; -reg [2:0] builder_bankmachine0_state = 3'd0; -reg [2:0] builder_bankmachine0_next_state = 3'd0; -reg [2:0] builder_bankmachine1_state = 3'd0; -reg [2:0] builder_bankmachine1_next_state = 3'd0; -reg [2:0] builder_bankmachine2_state = 3'd0; -reg [2:0] builder_bankmachine2_next_state = 3'd0; -reg [2:0] builder_bankmachine3_state = 3'd0; -reg [2:0] builder_bankmachine3_next_state = 3'd0; -reg [2:0] builder_bankmachine4_state = 3'd0; -reg [2:0] builder_bankmachine4_next_state = 3'd0; -reg [2:0] builder_bankmachine5_state = 3'd0; -reg [2:0] builder_bankmachine5_next_state = 3'd0; -reg [2:0] builder_bankmachine6_state = 3'd0; -reg [2:0] builder_bankmachine6_next_state = 3'd0; -reg [2:0] builder_bankmachine7_state = 3'd0; -reg [2:0] builder_bankmachine7_next_state = 3'd0; -reg [3:0] builder_multiplexer_state = 4'd0; -reg [3:0] builder_multiplexer_next_state = 4'd0; -wire builder_roundrobin0_request; -wire builder_roundrobin0_grant; -wire builder_roundrobin0_ce; -wire builder_roundrobin1_request; -wire builder_roundrobin1_grant; -wire builder_roundrobin1_ce; -wire builder_roundrobin2_request; -wire builder_roundrobin2_grant; -wire builder_roundrobin2_ce; -wire builder_roundrobin3_request; -wire builder_roundrobin3_grant; -wire builder_roundrobin3_ce; -wire builder_roundrobin4_request; -wire builder_roundrobin4_grant; -wire builder_roundrobin4_ce; -wire builder_roundrobin5_request; -wire builder_roundrobin5_grant; -wire builder_roundrobin5_ce; -wire builder_roundrobin6_request; -wire builder_roundrobin6_grant; -wire builder_roundrobin6_ce; -wire builder_roundrobin7_request; -wire builder_roundrobin7_grant; -wire builder_roundrobin7_ce; -reg [2:0] builder_rbank = 3'd0; -reg [2:0] builder_wbank = 3'd0; -reg builder_locked0 = 1'd0; -reg builder_locked1 = 1'd0; -reg builder_locked2 = 1'd0; -reg builder_locked3 = 1'd0; -reg builder_locked4 = 1'd0; -reg builder_locked5 = 1'd0; -reg builder_locked6 = 1'd0; -reg builder_locked7 = 1'd0; -reg builder_new_master_wdata_ready0 = 1'd0; -reg builder_new_master_wdata_ready1 = 1'd0; -reg builder_new_master_wdata_ready2 = 1'd0; -reg builder_new_master_rdata_valid0 = 1'd0; -reg builder_new_master_rdata_valid1 = 1'd0; -reg builder_new_master_rdata_valid2 = 1'd0; -reg builder_new_master_rdata_valid3 = 1'd0; -reg builder_new_master_rdata_valid4 = 1'd0; -reg builder_new_master_rdata_valid5 = 1'd0; -reg builder_new_master_rdata_valid6 = 1'd0; -reg builder_new_master_rdata_valid7 = 1'd0; -reg builder_new_master_rdata_valid8 = 1'd0; -reg builder_new_master_rdata_valid9 = 1'd0; -reg [1:0] builder_fullmemorywe_state = 2'd0; -reg [1:0] builder_fullmemorywe_next_state = 2'd0; -reg [1:0] builder_litedramwishbone2native_state = 2'd0; -reg [1:0] builder_litedramwishbone2native_next_state = 2'd0; -reg main_count_next_value = 1'd0; -reg main_count_next_value_ce = 1'd0; -wire builder_wb_sdram_con_request; -wire builder_wb_sdram_con_grant; -wire [29:0] builder_minsoc_shared_adr; -wire [31:0] builder_minsoc_shared_dat_w; -reg [31:0] builder_minsoc_shared_dat_r = 32'd0; -wire [3:0] builder_minsoc_shared_sel; -wire builder_minsoc_shared_cyc; -wire builder_minsoc_shared_stb; -reg builder_minsoc_shared_ack = 1'd0; -wire builder_minsoc_shared_we; -wire [2:0] builder_minsoc_shared_cti; -wire [1:0] builder_minsoc_shared_bte; -wire builder_minsoc_shared_err; -wire [1:0] builder_minsoc_request; -reg builder_minsoc_grant = 1'd0; -reg [3:0] builder_minsoc_slave_sel = 4'd0; -reg [3:0] builder_minsoc_slave_sel_r = 4'd0; -reg builder_minsoc_error = 1'd0; -wire builder_minsoc_wait; -wire builder_minsoc_done; -reg [19:0] builder_minsoc_count = 20'd1000000; -wire [13:0] builder_minsoc_interface0_bank_bus_adr; -wire builder_minsoc_interface0_bank_bus_we; -wire [7:0] builder_minsoc_interface0_bank_bus_dat_w; -reg [7:0] builder_minsoc_interface0_bank_bus_dat_r = 8'd0; -wire builder_minsoc_csrbank0_reset0_re; -wire builder_minsoc_csrbank0_reset0_r; -wire builder_minsoc_csrbank0_reset0_we; -wire builder_minsoc_csrbank0_reset0_w; -wire builder_minsoc_csrbank0_scratch3_re; -wire [7:0] builder_minsoc_csrbank0_scratch3_r; -wire builder_minsoc_csrbank0_scratch3_we; -wire [7:0] builder_minsoc_csrbank0_scratch3_w; -wire builder_minsoc_csrbank0_scratch2_re; -wire [7:0] builder_minsoc_csrbank0_scratch2_r; -wire builder_minsoc_csrbank0_scratch2_we; -wire [7:0] builder_minsoc_csrbank0_scratch2_w; -wire builder_minsoc_csrbank0_scratch1_re; -wire [7:0] builder_minsoc_csrbank0_scratch1_r; -wire builder_minsoc_csrbank0_scratch1_we; -wire [7:0] builder_minsoc_csrbank0_scratch1_w; -wire builder_minsoc_csrbank0_scratch0_re; -wire [7:0] builder_minsoc_csrbank0_scratch0_r; -wire builder_minsoc_csrbank0_scratch0_we; -wire [7:0] builder_minsoc_csrbank0_scratch0_w; -wire builder_minsoc_csrbank0_bus_errors3_re; -wire [7:0] builder_minsoc_csrbank0_bus_errors3_r; -wire builder_minsoc_csrbank0_bus_errors3_we; -wire [7:0] builder_minsoc_csrbank0_bus_errors3_w; -wire builder_minsoc_csrbank0_bus_errors2_re; -wire [7:0] builder_minsoc_csrbank0_bus_errors2_r; -wire builder_minsoc_csrbank0_bus_errors2_we; -wire [7:0] builder_minsoc_csrbank0_bus_errors2_w; -wire builder_minsoc_csrbank0_bus_errors1_re; -wire [7:0] builder_minsoc_csrbank0_bus_errors1_r; -wire builder_minsoc_csrbank0_bus_errors1_we; -wire [7:0] builder_minsoc_csrbank0_bus_errors1_w; -wire builder_minsoc_csrbank0_bus_errors0_re; -wire [7:0] builder_minsoc_csrbank0_bus_errors0_r; -wire builder_minsoc_csrbank0_bus_errors0_we; -wire [7:0] builder_minsoc_csrbank0_bus_errors0_w; -wire builder_minsoc_csrbank0_sel; -wire [13:0] builder_minsoc_interface1_bank_bus_adr; -wire builder_minsoc_interface1_bank_bus_we; -wire [7:0] builder_minsoc_interface1_bank_bus_dat_w; -reg [7:0] builder_minsoc_interface1_bank_bus_dat_r = 8'd0; -wire builder_minsoc_csrbank1_half_sys8x_taps0_re; -wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_r; -wire builder_minsoc_csrbank1_half_sys8x_taps0_we; -wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_w; -wire builder_minsoc_csrbank1_dly_sel0_re; -wire [1:0] builder_minsoc_csrbank1_dly_sel0_r; -wire builder_minsoc_csrbank1_dly_sel0_we; -wire [1:0] builder_minsoc_csrbank1_dly_sel0_w; -wire builder_minsoc_csrbank1_sel; -wire [13:0] builder_minsoc_interface2_bank_bus_adr; -wire builder_minsoc_interface2_bank_bus_we; -wire [7:0] builder_minsoc_interface2_bank_bus_dat_w; -reg [7:0] builder_minsoc_interface2_bank_bus_dat_r = 8'd0; -wire builder_minsoc_csrbank2_dfii_control0_re; -wire [3:0] builder_minsoc_csrbank2_dfii_control0_r; -wire builder_minsoc_csrbank2_dfii_control0_we; -wire [3:0] builder_minsoc_csrbank2_dfii_control0_w; -wire builder_minsoc_csrbank2_dfii_pi0_command0_re; -wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_r; -wire builder_minsoc_csrbank2_dfii_pi0_command0_we; -wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_w; -wire builder_minsoc_csrbank2_dfii_pi0_address1_re; -wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_r; -wire builder_minsoc_csrbank2_dfii_pi0_address1_we; -wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_w; -wire builder_minsoc_csrbank2_dfii_pi0_address0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_r; -wire builder_minsoc_csrbank2_dfii_pi0_address0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_w; -wire builder_minsoc_csrbank2_dfii_pi0_baddress0_re; -wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_r; -wire builder_minsoc_csrbank2_dfii_pi0_baddress0_we; -wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_w; -wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; -wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; -wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; -wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; -wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; -wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; -wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; -wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; -wire builder_minsoc_csrbank2_dfii_pi0_rddata3_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_r; -wire builder_minsoc_csrbank2_dfii_pi0_rddata3_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_w; -wire builder_minsoc_csrbank2_dfii_pi0_rddata2_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_r; -wire builder_minsoc_csrbank2_dfii_pi0_rddata2_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_w; -wire builder_minsoc_csrbank2_dfii_pi0_rddata1_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_r; -wire builder_minsoc_csrbank2_dfii_pi0_rddata1_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_w; -wire builder_minsoc_csrbank2_dfii_pi0_rddata0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_r; -wire builder_minsoc_csrbank2_dfii_pi0_rddata0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_w; -wire builder_minsoc_csrbank2_dfii_pi1_command0_re; -wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_r; -wire builder_minsoc_csrbank2_dfii_pi1_command0_we; -wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_w; -wire builder_minsoc_csrbank2_dfii_pi1_address1_re; -wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_r; -wire builder_minsoc_csrbank2_dfii_pi1_address1_we; -wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_w; -wire builder_minsoc_csrbank2_dfii_pi1_address0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_r; -wire builder_minsoc_csrbank2_dfii_pi1_address0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_w; -wire builder_minsoc_csrbank2_dfii_pi1_baddress0_re; -wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_r; -wire builder_minsoc_csrbank2_dfii_pi1_baddress0_we; -wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_w; -wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; -wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; -wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; -wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; -wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; -wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; -wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; -wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; -wire builder_minsoc_csrbank2_dfii_pi1_rddata3_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_r; -wire builder_minsoc_csrbank2_dfii_pi1_rddata3_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_w; -wire builder_minsoc_csrbank2_dfii_pi1_rddata2_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_r; -wire builder_minsoc_csrbank2_dfii_pi1_rddata2_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_w; -wire builder_minsoc_csrbank2_dfii_pi1_rddata1_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_r; -wire builder_minsoc_csrbank2_dfii_pi1_rddata1_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_w; -wire builder_minsoc_csrbank2_dfii_pi1_rddata0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_r; -wire builder_minsoc_csrbank2_dfii_pi1_rddata0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_w; -wire builder_minsoc_csrbank2_dfii_pi2_command0_re; -wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_r; -wire builder_minsoc_csrbank2_dfii_pi2_command0_we; -wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_w; -wire builder_minsoc_csrbank2_dfii_pi2_address1_re; -wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_r; -wire builder_minsoc_csrbank2_dfii_pi2_address1_we; -wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_w; -wire builder_minsoc_csrbank2_dfii_pi2_address0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_r; -wire builder_minsoc_csrbank2_dfii_pi2_address0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_w; -wire builder_minsoc_csrbank2_dfii_pi2_baddress0_re; -wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_r; -wire builder_minsoc_csrbank2_dfii_pi2_baddress0_we; -wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_w; -wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; -wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; -wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; -wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; -wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; -wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; -wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; -wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; -wire builder_minsoc_csrbank2_dfii_pi2_rddata3_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_r; -wire builder_minsoc_csrbank2_dfii_pi2_rddata3_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_w; -wire builder_minsoc_csrbank2_dfii_pi2_rddata2_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_r; -wire builder_minsoc_csrbank2_dfii_pi2_rddata2_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_w; -wire builder_minsoc_csrbank2_dfii_pi2_rddata1_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_r; -wire builder_minsoc_csrbank2_dfii_pi2_rddata1_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_w; -wire builder_minsoc_csrbank2_dfii_pi2_rddata0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_r; -wire builder_minsoc_csrbank2_dfii_pi2_rddata0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_w; -wire builder_minsoc_csrbank2_dfii_pi3_command0_re; -wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_r; -wire builder_minsoc_csrbank2_dfii_pi3_command0_we; -wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_w; -wire builder_minsoc_csrbank2_dfii_pi3_address1_re; -wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_r; -wire builder_minsoc_csrbank2_dfii_pi3_address1_we; -wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_w; -wire builder_minsoc_csrbank2_dfii_pi3_address0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_r; -wire builder_minsoc_csrbank2_dfii_pi3_address0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_w; -wire builder_minsoc_csrbank2_dfii_pi3_baddress0_re; -wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_r; -wire builder_minsoc_csrbank2_dfii_pi3_baddress0_we; -wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_w; -wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; -wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; -wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; -wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; -wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; -wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; -wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; -wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; -wire builder_minsoc_csrbank2_dfii_pi3_rddata3_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_r; -wire builder_minsoc_csrbank2_dfii_pi3_rddata3_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_w; -wire builder_minsoc_csrbank2_dfii_pi3_rddata2_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_r; -wire builder_minsoc_csrbank2_dfii_pi3_rddata2_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_w; -wire builder_minsoc_csrbank2_dfii_pi3_rddata1_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_r; -wire builder_minsoc_csrbank2_dfii_pi3_rddata1_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_w; -wire builder_minsoc_csrbank2_dfii_pi3_rddata0_re; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_r; -wire builder_minsoc_csrbank2_dfii_pi3_rddata0_we; -wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_w; -wire builder_minsoc_csrbank2_sel; -wire [13:0] builder_minsoc_interface3_bank_bus_adr; -wire builder_minsoc_interface3_bank_bus_we; -wire [7:0] builder_minsoc_interface3_bank_bus_dat_w; -reg [7:0] builder_minsoc_interface3_bank_bus_dat_r = 8'd0; -wire builder_minsoc_csrbank3_load3_re; -wire [7:0] builder_minsoc_csrbank3_load3_r; -wire builder_minsoc_csrbank3_load3_we; -wire [7:0] builder_minsoc_csrbank3_load3_w; -wire builder_minsoc_csrbank3_load2_re; -wire [7:0] builder_minsoc_csrbank3_load2_r; -wire builder_minsoc_csrbank3_load2_we; -wire [7:0] builder_minsoc_csrbank3_load2_w; -wire builder_minsoc_csrbank3_load1_re; -wire [7:0] builder_minsoc_csrbank3_load1_r; -wire builder_minsoc_csrbank3_load1_we; -wire [7:0] builder_minsoc_csrbank3_load1_w; -wire builder_minsoc_csrbank3_load0_re; -wire [7:0] builder_minsoc_csrbank3_load0_r; -wire builder_minsoc_csrbank3_load0_we; -wire [7:0] builder_minsoc_csrbank3_load0_w; -wire builder_minsoc_csrbank3_reload3_re; -wire [7:0] builder_minsoc_csrbank3_reload3_r; -wire builder_minsoc_csrbank3_reload3_we; -wire [7:0] builder_minsoc_csrbank3_reload3_w; -wire builder_minsoc_csrbank3_reload2_re; -wire [7:0] builder_minsoc_csrbank3_reload2_r; -wire builder_minsoc_csrbank3_reload2_we; -wire [7:0] builder_minsoc_csrbank3_reload2_w; -wire builder_minsoc_csrbank3_reload1_re; -wire [7:0] builder_minsoc_csrbank3_reload1_r; -wire builder_minsoc_csrbank3_reload1_we; -wire [7:0] builder_minsoc_csrbank3_reload1_w; -wire builder_minsoc_csrbank3_reload0_re; -wire [7:0] builder_minsoc_csrbank3_reload0_r; -wire builder_minsoc_csrbank3_reload0_we; -wire [7:0] builder_minsoc_csrbank3_reload0_w; -wire builder_minsoc_csrbank3_en0_re; -wire builder_minsoc_csrbank3_en0_r; -wire builder_minsoc_csrbank3_en0_we; -wire builder_minsoc_csrbank3_en0_w; -wire builder_minsoc_csrbank3_update_value0_re; -wire builder_minsoc_csrbank3_update_value0_r; -wire builder_minsoc_csrbank3_update_value0_we; -wire builder_minsoc_csrbank3_update_value0_w; -wire builder_minsoc_csrbank3_value3_re; -wire [7:0] builder_minsoc_csrbank3_value3_r; -wire builder_minsoc_csrbank3_value3_we; -wire [7:0] builder_minsoc_csrbank3_value3_w; -wire builder_minsoc_csrbank3_value2_re; -wire [7:0] builder_minsoc_csrbank3_value2_r; -wire builder_minsoc_csrbank3_value2_we; -wire [7:0] builder_minsoc_csrbank3_value2_w; -wire builder_minsoc_csrbank3_value1_re; -wire [7:0] builder_minsoc_csrbank3_value1_r; -wire builder_minsoc_csrbank3_value1_we; -wire [7:0] builder_minsoc_csrbank3_value1_w; -wire builder_minsoc_csrbank3_value0_re; -wire [7:0] builder_minsoc_csrbank3_value0_r; -wire builder_minsoc_csrbank3_value0_we; -wire [7:0] builder_minsoc_csrbank3_value0_w; -wire builder_minsoc_csrbank3_ev_enable0_re; -wire builder_minsoc_csrbank3_ev_enable0_r; -wire builder_minsoc_csrbank3_ev_enable0_we; -wire builder_minsoc_csrbank3_ev_enable0_w; -wire builder_minsoc_csrbank3_sel; -wire [13:0] builder_minsoc_interface4_bank_bus_adr; -wire builder_minsoc_interface4_bank_bus_we; -wire [7:0] builder_minsoc_interface4_bank_bus_dat_w; -reg [7:0] builder_minsoc_interface4_bank_bus_dat_r = 8'd0; -wire builder_minsoc_csrbank4_txfull_re; -wire builder_minsoc_csrbank4_txfull_r; -wire builder_minsoc_csrbank4_txfull_we; -wire builder_minsoc_csrbank4_txfull_w; -wire builder_minsoc_csrbank4_rxempty_re; -wire builder_minsoc_csrbank4_rxempty_r; -wire builder_minsoc_csrbank4_rxempty_we; -wire builder_minsoc_csrbank4_rxempty_w; -wire builder_minsoc_csrbank4_ev_enable0_re; -wire [1:0] builder_minsoc_csrbank4_ev_enable0_r; -wire builder_minsoc_csrbank4_ev_enable0_we; -wire [1:0] builder_minsoc_csrbank4_ev_enable0_w; -wire builder_minsoc_csrbank4_sel; -wire [13:0] builder_minsoc_interface5_bank_bus_adr; -wire builder_minsoc_interface5_bank_bus_we; -wire [7:0] builder_minsoc_interface5_bank_bus_dat_w; -reg [7:0] builder_minsoc_interface5_bank_bus_dat_r = 8'd0; -wire builder_minsoc_csrbank5_tuning_word3_re; -wire [7:0] builder_minsoc_csrbank5_tuning_word3_r; -wire builder_minsoc_csrbank5_tuning_word3_we; -wire [7:0] builder_minsoc_csrbank5_tuning_word3_w; -wire builder_minsoc_csrbank5_tuning_word2_re; -wire [7:0] builder_minsoc_csrbank5_tuning_word2_r; -wire builder_minsoc_csrbank5_tuning_word2_we; -wire [7:0] builder_minsoc_csrbank5_tuning_word2_w; -wire builder_minsoc_csrbank5_tuning_word1_re; -wire [7:0] builder_minsoc_csrbank5_tuning_word1_r; -wire builder_minsoc_csrbank5_tuning_word1_we; -wire [7:0] builder_minsoc_csrbank5_tuning_word1_w; -wire builder_minsoc_csrbank5_tuning_word0_re; -wire [7:0] builder_minsoc_csrbank5_tuning_word0_r; -wire builder_minsoc_csrbank5_tuning_word0_we; -wire [7:0] builder_minsoc_csrbank5_tuning_word0_w; -wire builder_minsoc_csrbank5_sel; -wire [13:0] builder_minsoc_adr; -wire builder_minsoc_we; -wire [7:0] builder_minsoc_dat_w; -wire [7:0] builder_minsoc_dat_r; -reg builder_rhs_array_muxed0 = 1'd0; -reg [13:0] builder_rhs_array_muxed1 = 14'd0; -reg [2:0] builder_rhs_array_muxed2 = 3'd0; -reg builder_rhs_array_muxed3 = 1'd0; -reg builder_rhs_array_muxed4 = 1'd0; -reg builder_rhs_array_muxed5 = 1'd0; -reg builder_t_array_muxed0 = 1'd0; -reg builder_t_array_muxed1 = 1'd0; -reg builder_t_array_muxed2 = 1'd0; -reg builder_rhs_array_muxed6 = 1'd0; -reg [13:0] builder_rhs_array_muxed7 = 14'd0; -reg [2:0] builder_rhs_array_muxed8 = 3'd0; -reg builder_rhs_array_muxed9 = 1'd0; -reg builder_rhs_array_muxed10 = 1'd0; -reg builder_rhs_array_muxed11 = 1'd0; -reg builder_t_array_muxed3 = 1'd0; -reg builder_t_array_muxed4 = 1'd0; -reg builder_t_array_muxed5 = 1'd0; -reg [20:0] builder_rhs_array_muxed12 = 21'd0; -reg builder_rhs_array_muxed13 = 1'd0; -reg builder_rhs_array_muxed14 = 1'd0; -reg [20:0] builder_rhs_array_muxed15 = 21'd0; -reg builder_rhs_array_muxed16 = 1'd0; -reg builder_rhs_array_muxed17 = 1'd0; -reg [20:0] builder_rhs_array_muxed18 = 21'd0; -reg builder_rhs_array_muxed19 = 1'd0; -reg builder_rhs_array_muxed20 = 1'd0; -reg [20:0] builder_rhs_array_muxed21 = 21'd0; -reg builder_rhs_array_muxed22 = 1'd0; -reg builder_rhs_array_muxed23 = 1'd0; -reg [20:0] builder_rhs_array_muxed24 = 21'd0; -reg builder_rhs_array_muxed25 = 1'd0; -reg builder_rhs_array_muxed26 = 1'd0; -reg [20:0] builder_rhs_array_muxed27 = 21'd0; -reg builder_rhs_array_muxed28 = 1'd0; -reg builder_rhs_array_muxed29 = 1'd0; -reg [20:0] builder_rhs_array_muxed30 = 21'd0; -reg builder_rhs_array_muxed31 = 1'd0; -reg builder_rhs_array_muxed32 = 1'd0; -reg [20:0] builder_rhs_array_muxed33 = 21'd0; -reg builder_rhs_array_muxed34 = 1'd0; -reg builder_rhs_array_muxed35 = 1'd0; -reg [29:0] builder_rhs_array_muxed36 = 30'd0; -reg [31:0] builder_rhs_array_muxed37 = 32'd0; -reg [3:0] builder_rhs_array_muxed38 = 4'd0; -reg builder_rhs_array_muxed39 = 1'd0; -reg builder_rhs_array_muxed40 = 1'd0; -reg builder_rhs_array_muxed41 = 1'd0; -reg [2:0] builder_rhs_array_muxed42 = 3'd0; -reg [1:0] builder_rhs_array_muxed43 = 2'd0; -reg [29:0] builder_rhs_array_muxed44 = 30'd0; -reg [31:0] builder_rhs_array_muxed45 = 32'd0; -reg [3:0] builder_rhs_array_muxed46 = 4'd0; -reg builder_rhs_array_muxed47 = 1'd0; -reg builder_rhs_array_muxed48 = 1'd0; -reg builder_rhs_array_muxed49 = 1'd0; -reg [2:0] builder_rhs_array_muxed50 = 3'd0; -reg [1:0] builder_rhs_array_muxed51 = 2'd0; -reg [2:0] builder_array_muxed0 = 3'd0; -reg [13:0] builder_array_muxed1 = 14'd0; -reg builder_array_muxed2 = 1'd0; -reg builder_array_muxed3 = 1'd0; -reg builder_array_muxed4 = 1'd0; -reg builder_array_muxed5 = 1'd0; -reg builder_array_muxed6 = 1'd0; -reg [2:0] builder_array_muxed7 = 3'd0; -reg [13:0] builder_array_muxed8 = 14'd0; -reg builder_array_muxed9 = 1'd0; -reg builder_array_muxed10 = 1'd0; -reg builder_array_muxed11 = 1'd0; -reg builder_array_muxed12 = 1'd0; -reg builder_array_muxed13 = 1'd0; -reg [2:0] builder_array_muxed14 = 3'd0; -reg [13:0] builder_array_muxed15 = 14'd0; -reg builder_array_muxed16 = 1'd0; -reg builder_array_muxed17 = 1'd0; -reg builder_array_muxed18 = 1'd0; -reg builder_array_muxed19 = 1'd0; -reg builder_array_muxed20 = 1'd0; -reg [2:0] builder_array_muxed21 = 3'd0; -reg [13:0] builder_array_muxed22 = 14'd0; -reg builder_array_muxed23 = 1'd0; -reg builder_array_muxed24 = 1'd0; -reg builder_array_muxed25 = 1'd0; -reg builder_array_muxed26 = 1'd0; -reg builder_array_muxed27 = 1'd0; -(* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg builder_regs0 = 1'd0; -(* async_reg = "true", dont_touch = "true" *) reg builder_regs1 = 1'd0; -wire builder_xilinxasyncresetsynchronizerimpl0; -wire builder_xilinxasyncresetsynchronizerimpl0_rst_meta; -wire builder_xilinxasyncresetsynchronizerimpl1; -wire builder_xilinxasyncresetsynchronizerimpl1_rst_meta; -wire builder_xilinxasyncresetsynchronizerimpl1_expr; -wire builder_xilinxasyncresetsynchronizerimpl2; -wire builder_xilinxasyncresetsynchronizerimpl2_rst_meta; -wire builder_xilinxasyncresetsynchronizerimpl2_expr; -wire builder_xilinxasyncresetsynchronizerimpl3; -wire builder_xilinxasyncresetsynchronizerimpl3_rst_meta; - -assign main_minsoc_cpu_reset = main_minsoc_ctrl_reset; -assign main_minsoc_ctrl_bus_error = builder_minsoc_error; -always @(*) begin - main_minsoc_cpu_interrupt <= 32'd0; - main_minsoc_cpu_interrupt[1] <= main_minsoc_timer0_irq; - main_minsoc_cpu_interrupt[0] <= main_minsoc_uart_irq; -end -assign main_minsoc_ctrl_reset = main_minsoc_ctrl_reset_re; -assign main_minsoc_ctrl_bus_errors_status = main_minsoc_ctrl_bus_errors; -assign main_minsoc_interface0_soc_bus_adr = main_minsoc_cpu_ibus_adr; -assign main_minsoc_interface0_soc_bus_dat_w = main_minsoc_cpu_ibus_dat_w; -assign main_minsoc_cpu_ibus_dat_r = main_minsoc_interface0_soc_bus_dat_r; -assign main_minsoc_interface0_soc_bus_sel = main_minsoc_cpu_ibus_sel; -assign main_minsoc_interface0_soc_bus_cyc = main_minsoc_cpu_ibus_cyc; -assign main_minsoc_interface0_soc_bus_stb = main_minsoc_cpu_ibus_stb; -assign main_minsoc_cpu_ibus_ack = main_minsoc_interface0_soc_bus_ack; -assign main_minsoc_interface0_soc_bus_we = main_minsoc_cpu_ibus_we; -assign main_minsoc_interface0_soc_bus_cti = main_minsoc_cpu_ibus_cti; -assign main_minsoc_interface0_soc_bus_bte = main_minsoc_cpu_ibus_bte; -assign main_minsoc_cpu_ibus_err = main_minsoc_interface0_soc_bus_err; -assign main_minsoc_interface1_soc_bus_adr = main_minsoc_cpu_dbus_adr; -assign main_minsoc_interface1_soc_bus_dat_w = main_minsoc_cpu_dbus_dat_w; -assign main_minsoc_cpu_dbus_dat_r = main_minsoc_interface1_soc_bus_dat_r; -assign main_minsoc_interface1_soc_bus_sel = main_minsoc_cpu_dbus_sel; -assign main_minsoc_interface1_soc_bus_cyc = main_minsoc_cpu_dbus_cyc; -assign main_minsoc_interface1_soc_bus_stb = main_minsoc_cpu_dbus_stb; -assign main_minsoc_cpu_dbus_ack = main_minsoc_interface1_soc_bus_ack; -assign main_minsoc_interface1_soc_bus_we = main_minsoc_cpu_dbus_we; -assign main_minsoc_interface1_soc_bus_cti = main_minsoc_cpu_dbus_cti; -assign main_minsoc_interface1_soc_bus_bte = main_minsoc_cpu_dbus_bte; -assign main_minsoc_cpu_dbus_err = main_minsoc_interface1_soc_bus_err; -assign main_minsoc_rom_adr = main_minsoc_rom_bus_adr[12:0]; -assign main_minsoc_rom_bus_dat_r = main_minsoc_rom_dat_r; -always @(*) begin - main_minsoc_sram_we <= 4'd0; - main_minsoc_sram_we[0] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[0]); - main_minsoc_sram_we[1] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[1]); - main_minsoc_sram_we[2] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[2]); - main_minsoc_sram_we[3] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[3]); -end -assign main_minsoc_sram_adr = main_minsoc_sram_bus_adr[9:0]; -assign main_minsoc_sram_bus_dat_r = main_minsoc_sram_dat_r; -assign main_minsoc_sram_dat_w = main_minsoc_sram_bus_dat_w; -assign main_minsoc_uart_uart_sink_valid = main_minsoc_source_valid; -assign main_minsoc_source_ready = main_minsoc_uart_uart_sink_ready; -assign main_minsoc_uart_uart_sink_first = main_minsoc_source_first; -assign main_minsoc_uart_uart_sink_last = main_minsoc_source_last; -assign main_minsoc_uart_uart_sink_payload_data = main_minsoc_source_payload_data; -assign main_minsoc_sink_valid = main_minsoc_uart_uart_source_valid; -assign main_minsoc_uart_uart_source_ready = main_minsoc_sink_ready; -assign main_minsoc_sink_first = main_minsoc_uart_uart_source_first; -assign main_minsoc_sink_last = main_minsoc_uart_uart_source_last; -assign main_minsoc_sink_payload_data = main_minsoc_uart_uart_source_payload_data; -assign main_minsoc_uart_tx_fifo_sink_valid = main_minsoc_uart_rxtx_re; -assign main_minsoc_uart_tx_fifo_sink_payload_data = main_minsoc_uart_rxtx_r; -assign main_minsoc_uart_txfull_status = (~main_minsoc_uart_tx_fifo_sink_ready); -assign main_minsoc_uart_uart_source_valid = main_minsoc_uart_tx_fifo_source_valid; -assign main_minsoc_uart_tx_fifo_source_ready = main_minsoc_uart_uart_source_ready; -assign main_minsoc_uart_uart_source_first = main_minsoc_uart_tx_fifo_source_first; -assign main_minsoc_uart_uart_source_last = main_minsoc_uart_tx_fifo_source_last; -assign main_minsoc_uart_uart_source_payload_data = main_minsoc_uart_tx_fifo_source_payload_data; -assign main_minsoc_uart_tx_trigger = (~main_minsoc_uart_tx_fifo_sink_ready); -assign main_minsoc_uart_rx_fifo_sink_valid = main_minsoc_uart_uart_sink_valid; -assign main_minsoc_uart_uart_sink_ready = main_minsoc_uart_rx_fifo_sink_ready; -assign main_minsoc_uart_rx_fifo_sink_first = main_minsoc_uart_uart_sink_first; -assign main_minsoc_uart_rx_fifo_sink_last = main_minsoc_uart_uart_sink_last; -assign main_minsoc_uart_rx_fifo_sink_payload_data = main_minsoc_uart_uart_sink_payload_data; -assign main_minsoc_uart_rxempty_status = (~main_minsoc_uart_rx_fifo_source_valid); -assign main_minsoc_uart_rxtx_w = main_minsoc_uart_rx_fifo_source_payload_data; -assign main_minsoc_uart_rx_fifo_source_ready = (main_minsoc_uart_rx_clear | (1'd0 & main_minsoc_uart_rxtx_we)); -assign main_minsoc_uart_rx_trigger = (~main_minsoc_uart_rx_fifo_source_valid); -always @(*) begin - main_minsoc_uart_tx_clear <= 1'd0; - if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[0])) begin - main_minsoc_uart_tx_clear <= 1'd1; - end -end -always @(*) begin - main_minsoc_uart_eventmanager_status_w <= 2'd0; - main_minsoc_uart_eventmanager_status_w[0] <= main_minsoc_uart_tx_status; - main_minsoc_uart_eventmanager_status_w[1] <= main_minsoc_uart_rx_status; -end -always @(*) begin - main_minsoc_uart_rx_clear <= 1'd0; - if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[1])) begin - main_minsoc_uart_rx_clear <= 1'd1; - end -end -always @(*) begin - main_minsoc_uart_eventmanager_pending_w <= 2'd0; - main_minsoc_uart_eventmanager_pending_w[0] <= main_minsoc_uart_tx_pending; - main_minsoc_uart_eventmanager_pending_w[1] <= main_minsoc_uart_rx_pending; -end -assign main_minsoc_uart_irq = ((main_minsoc_uart_eventmanager_pending_w[0] & main_minsoc_uart_eventmanager_storage[0]) | (main_minsoc_uart_eventmanager_pending_w[1] & main_minsoc_uart_eventmanager_storage[1])); -assign main_minsoc_uart_tx_status = main_minsoc_uart_tx_trigger; -assign main_minsoc_uart_rx_status = main_minsoc_uart_rx_trigger; -assign main_minsoc_uart_tx_fifo_syncfifo_din = {main_minsoc_uart_tx_fifo_fifo_in_last, main_minsoc_uart_tx_fifo_fifo_in_first, main_minsoc_uart_tx_fifo_fifo_in_payload_data}; -assign {main_minsoc_uart_tx_fifo_fifo_out_last, main_minsoc_uart_tx_fifo_fifo_out_first, main_minsoc_uart_tx_fifo_fifo_out_payload_data} = main_minsoc_uart_tx_fifo_syncfifo_dout; -assign main_minsoc_uart_tx_fifo_sink_ready = main_minsoc_uart_tx_fifo_syncfifo_writable; -assign main_minsoc_uart_tx_fifo_syncfifo_we = main_minsoc_uart_tx_fifo_sink_valid; -assign main_minsoc_uart_tx_fifo_fifo_in_first = main_minsoc_uart_tx_fifo_sink_first; -assign main_minsoc_uart_tx_fifo_fifo_in_last = main_minsoc_uart_tx_fifo_sink_last; -assign main_minsoc_uart_tx_fifo_fifo_in_payload_data = main_minsoc_uart_tx_fifo_sink_payload_data; -assign main_minsoc_uart_tx_fifo_source_valid = main_minsoc_uart_tx_fifo_readable; -assign main_minsoc_uart_tx_fifo_source_first = main_minsoc_uart_tx_fifo_fifo_out_first; -assign main_minsoc_uart_tx_fifo_source_last = main_minsoc_uart_tx_fifo_fifo_out_last; -assign main_minsoc_uart_tx_fifo_source_payload_data = main_minsoc_uart_tx_fifo_fifo_out_payload_data; -assign main_minsoc_uart_tx_fifo_re = main_minsoc_uart_tx_fifo_source_ready; -assign main_minsoc_uart_tx_fifo_syncfifo_re = (main_minsoc_uart_tx_fifo_syncfifo_readable & ((~main_minsoc_uart_tx_fifo_readable) | main_minsoc_uart_tx_fifo_re)); -assign main_minsoc_uart_tx_fifo_level1 = (main_minsoc_uart_tx_fifo_level0 + main_minsoc_uart_tx_fifo_readable); -always @(*) begin - main_minsoc_uart_tx_fifo_wrport_adr <= 4'd0; - if (main_minsoc_uart_tx_fifo_replace) begin - main_minsoc_uart_tx_fifo_wrport_adr <= (main_minsoc_uart_tx_fifo_produce - 1'd1); - end else begin - main_minsoc_uart_tx_fifo_wrport_adr <= main_minsoc_uart_tx_fifo_produce; - end -end -assign main_minsoc_uart_tx_fifo_wrport_dat_w = main_minsoc_uart_tx_fifo_syncfifo_din; -assign main_minsoc_uart_tx_fifo_wrport_we = (main_minsoc_uart_tx_fifo_syncfifo_we & (main_minsoc_uart_tx_fifo_syncfifo_writable | main_minsoc_uart_tx_fifo_replace)); -assign main_minsoc_uart_tx_fifo_do_read = (main_minsoc_uart_tx_fifo_syncfifo_readable & main_minsoc_uart_tx_fifo_syncfifo_re); -assign main_minsoc_uart_tx_fifo_rdport_adr = main_minsoc_uart_tx_fifo_consume; -assign main_minsoc_uart_tx_fifo_syncfifo_dout = main_minsoc_uart_tx_fifo_rdport_dat_r; -assign main_minsoc_uart_tx_fifo_rdport_re = main_minsoc_uart_tx_fifo_do_read; -assign main_minsoc_uart_tx_fifo_syncfifo_writable = (main_minsoc_uart_tx_fifo_level0 != 5'd16); -assign main_minsoc_uart_tx_fifo_syncfifo_readable = (main_minsoc_uart_tx_fifo_level0 != 1'd0); -assign main_minsoc_uart_rx_fifo_syncfifo_din = {main_minsoc_uart_rx_fifo_fifo_in_last, main_minsoc_uart_rx_fifo_fifo_in_first, main_minsoc_uart_rx_fifo_fifo_in_payload_data}; -assign {main_minsoc_uart_rx_fifo_fifo_out_last, main_minsoc_uart_rx_fifo_fifo_out_first, main_minsoc_uart_rx_fifo_fifo_out_payload_data} = main_minsoc_uart_rx_fifo_syncfifo_dout; -assign main_minsoc_uart_rx_fifo_sink_ready = main_minsoc_uart_rx_fifo_syncfifo_writable; -assign main_minsoc_uart_rx_fifo_syncfifo_we = main_minsoc_uart_rx_fifo_sink_valid; -assign main_minsoc_uart_rx_fifo_fifo_in_first = main_minsoc_uart_rx_fifo_sink_first; -assign main_minsoc_uart_rx_fifo_fifo_in_last = main_minsoc_uart_rx_fifo_sink_last; -assign main_minsoc_uart_rx_fifo_fifo_in_payload_data = main_minsoc_uart_rx_fifo_sink_payload_data; -assign main_minsoc_uart_rx_fifo_source_valid = main_minsoc_uart_rx_fifo_readable; -assign main_minsoc_uart_rx_fifo_source_first = main_minsoc_uart_rx_fifo_fifo_out_first; -assign main_minsoc_uart_rx_fifo_source_last = main_minsoc_uart_rx_fifo_fifo_out_last; -assign main_minsoc_uart_rx_fifo_source_payload_data = main_minsoc_uart_rx_fifo_fifo_out_payload_data; -assign main_minsoc_uart_rx_fifo_re = main_minsoc_uart_rx_fifo_source_ready; -assign main_minsoc_uart_rx_fifo_syncfifo_re = (main_minsoc_uart_rx_fifo_syncfifo_readable & ((~main_minsoc_uart_rx_fifo_readable) | main_minsoc_uart_rx_fifo_re)); -assign main_minsoc_uart_rx_fifo_level1 = (main_minsoc_uart_rx_fifo_level0 + main_minsoc_uart_rx_fifo_readable); -always @(*) begin - main_minsoc_uart_rx_fifo_wrport_adr <= 4'd0; - if (main_minsoc_uart_rx_fifo_replace) begin - main_minsoc_uart_rx_fifo_wrport_adr <= (main_minsoc_uart_rx_fifo_produce - 1'd1); - end else begin - main_minsoc_uart_rx_fifo_wrport_adr <= main_minsoc_uart_rx_fifo_produce; - end -end -assign main_minsoc_uart_rx_fifo_wrport_dat_w = main_minsoc_uart_rx_fifo_syncfifo_din; -assign main_minsoc_uart_rx_fifo_wrport_we = (main_minsoc_uart_rx_fifo_syncfifo_we & (main_minsoc_uart_rx_fifo_syncfifo_writable | main_minsoc_uart_rx_fifo_replace)); -assign main_minsoc_uart_rx_fifo_do_read = (main_minsoc_uart_rx_fifo_syncfifo_readable & main_minsoc_uart_rx_fifo_syncfifo_re); -assign main_minsoc_uart_rx_fifo_rdport_adr = main_minsoc_uart_rx_fifo_consume; -assign main_minsoc_uart_rx_fifo_syncfifo_dout = main_minsoc_uart_rx_fifo_rdport_dat_r; -assign main_minsoc_uart_rx_fifo_rdport_re = main_minsoc_uart_rx_fifo_do_read; -assign main_minsoc_uart_rx_fifo_syncfifo_writable = (main_minsoc_uart_rx_fifo_level0 != 5'd16); -assign main_minsoc_uart_rx_fifo_syncfifo_readable = (main_minsoc_uart_rx_fifo_level0 != 1'd0); -assign main_minsoc_timer0_zero_trigger = (main_minsoc_timer0_value != 1'd0); -assign main_minsoc_timer0_eventmanager_status_w = main_minsoc_timer0_zero_status; -always @(*) begin - main_minsoc_timer0_zero_clear <= 1'd0; - if ((main_minsoc_timer0_eventmanager_pending_re & main_minsoc_timer0_eventmanager_pending_r)) begin - main_minsoc_timer0_zero_clear <= 1'd1; - end -end -assign main_minsoc_timer0_eventmanager_pending_w = main_minsoc_timer0_zero_pending; -assign main_minsoc_timer0_irq = (main_minsoc_timer0_eventmanager_pending_w & main_minsoc_timer0_eventmanager_storage); -assign main_minsoc_timer0_zero_status = main_minsoc_timer0_zero_trigger; -assign main_minsoc_interface_dat_w = main_minsoc_bus_wishbone_dat_w; -assign main_minsoc_bus_wishbone_dat_r = main_minsoc_interface_dat_r; -always @(*) begin - main_minsoc_interface_adr <= 14'd0; - main_minsoc_interface_we <= 1'd0; - builder_wb2csr_next_state <= 1'd0; - main_minsoc_bus_wishbone_ack <= 1'd0; - builder_wb2csr_next_state <= builder_wb2csr_state; - case (builder_wb2csr_state) - 1'd1: begin - main_minsoc_bus_wishbone_ack <= 1'd1; - builder_wb2csr_next_state <= 1'd0; - end - default: begin - if ((main_minsoc_bus_wishbone_cyc & main_minsoc_bus_wishbone_stb)) begin - main_minsoc_interface_adr <= main_minsoc_bus_wishbone_adr; - main_minsoc_interface_we <= main_minsoc_bus_wishbone_we; - builder_wb2csr_next_state <= 1'd1; - end - end - endcase -end -assign main_reset = (~cpu_reset); -always @(*) begin - main_a7ddrphy_dqs_serdes_pattern <= 8'd85; - main_a7ddrphy_dqs_serdes_pattern <= 7'd85; - if ((main_a7ddrphy_dqs_preamble | main_a7ddrphy_dqs_postamble)) begin - main_a7ddrphy_dqs_serdes_pattern <= 1'd0; - end -end -assign main_a7ddrphy_bitslip0_i = main_a7ddrphy_dq_i_data0; -assign main_a7ddrphy_bitslip1_i = main_a7ddrphy_dq_i_data1; -assign main_a7ddrphy_bitslip2_i = main_a7ddrphy_dq_i_data2; -assign main_a7ddrphy_bitslip3_i = main_a7ddrphy_dq_i_data3; -assign main_a7ddrphy_bitslip4_i = main_a7ddrphy_dq_i_data4; -assign main_a7ddrphy_bitslip5_i = main_a7ddrphy_dq_i_data5; -assign main_a7ddrphy_bitslip6_i = main_a7ddrphy_dq_i_data6; -assign main_a7ddrphy_bitslip7_i = main_a7ddrphy_dq_i_data7; -assign main_a7ddrphy_bitslip8_i = main_a7ddrphy_dq_i_data8; -assign main_a7ddrphy_bitslip9_i = main_a7ddrphy_dq_i_data9; -assign main_a7ddrphy_bitslip10_i = main_a7ddrphy_dq_i_data10; -assign main_a7ddrphy_bitslip11_i = main_a7ddrphy_dq_i_data11; -assign main_a7ddrphy_bitslip12_i = main_a7ddrphy_dq_i_data12; -assign main_a7ddrphy_bitslip13_i = main_a7ddrphy_dq_i_data13; -assign main_a7ddrphy_bitslip14_i = main_a7ddrphy_dq_i_data14; -assign main_a7ddrphy_bitslip15_i = main_a7ddrphy_dq_i_data15; -always @(*) begin - main_a7ddrphy_dfi_p0_rddata <= 32'd0; - main_a7ddrphy_dfi_p0_rddata[0] <= main_a7ddrphy_bitslip0_o[0]; - main_a7ddrphy_dfi_p0_rddata[16] <= main_a7ddrphy_bitslip0_o[1]; - main_a7ddrphy_dfi_p0_rddata[1] <= main_a7ddrphy_bitslip1_o[0]; - main_a7ddrphy_dfi_p0_rddata[17] <= main_a7ddrphy_bitslip1_o[1]; - main_a7ddrphy_dfi_p0_rddata[2] <= main_a7ddrphy_bitslip2_o[0]; - main_a7ddrphy_dfi_p0_rddata[18] <= main_a7ddrphy_bitslip2_o[1]; - main_a7ddrphy_dfi_p0_rddata[3] <= main_a7ddrphy_bitslip3_o[0]; - main_a7ddrphy_dfi_p0_rddata[19] <= main_a7ddrphy_bitslip3_o[1]; - main_a7ddrphy_dfi_p0_rddata[4] <= main_a7ddrphy_bitslip4_o[0]; - main_a7ddrphy_dfi_p0_rddata[20] <= main_a7ddrphy_bitslip4_o[1]; - main_a7ddrphy_dfi_p0_rddata[5] <= main_a7ddrphy_bitslip5_o[0]; - main_a7ddrphy_dfi_p0_rddata[21] <= main_a7ddrphy_bitslip5_o[1]; - main_a7ddrphy_dfi_p0_rddata[6] <= main_a7ddrphy_bitslip6_o[0]; - main_a7ddrphy_dfi_p0_rddata[22] <= main_a7ddrphy_bitslip6_o[1]; - main_a7ddrphy_dfi_p0_rddata[7] <= main_a7ddrphy_bitslip7_o[0]; - main_a7ddrphy_dfi_p0_rddata[23] <= main_a7ddrphy_bitslip7_o[1]; - main_a7ddrphy_dfi_p0_rddata[8] <= main_a7ddrphy_bitslip8_o[0]; - main_a7ddrphy_dfi_p0_rddata[24] <= main_a7ddrphy_bitslip8_o[1]; - main_a7ddrphy_dfi_p0_rddata[9] <= main_a7ddrphy_bitslip9_o[0]; - main_a7ddrphy_dfi_p0_rddata[25] <= main_a7ddrphy_bitslip9_o[1]; - main_a7ddrphy_dfi_p0_rddata[10] <= main_a7ddrphy_bitslip10_o[0]; - main_a7ddrphy_dfi_p0_rddata[26] <= main_a7ddrphy_bitslip10_o[1]; - main_a7ddrphy_dfi_p0_rddata[11] <= main_a7ddrphy_bitslip11_o[0]; - main_a7ddrphy_dfi_p0_rddata[27] <= main_a7ddrphy_bitslip11_o[1]; - main_a7ddrphy_dfi_p0_rddata[12] <= main_a7ddrphy_bitslip12_o[0]; - main_a7ddrphy_dfi_p0_rddata[28] <= main_a7ddrphy_bitslip12_o[1]; - main_a7ddrphy_dfi_p0_rddata[13] <= main_a7ddrphy_bitslip13_o[0]; - main_a7ddrphy_dfi_p0_rddata[29] <= main_a7ddrphy_bitslip13_o[1]; - main_a7ddrphy_dfi_p0_rddata[14] <= main_a7ddrphy_bitslip14_o[0]; - main_a7ddrphy_dfi_p0_rddata[30] <= main_a7ddrphy_bitslip14_o[1]; - main_a7ddrphy_dfi_p0_rddata[15] <= main_a7ddrphy_bitslip15_o[0]; - main_a7ddrphy_dfi_p0_rddata[31] <= main_a7ddrphy_bitslip15_o[1]; -end -always @(*) begin - main_a7ddrphy_dfi_p1_rddata <= 32'd0; - main_a7ddrphy_dfi_p1_rddata[0] <= main_a7ddrphy_bitslip0_o[2]; - main_a7ddrphy_dfi_p1_rddata[16] <= main_a7ddrphy_bitslip0_o[3]; - main_a7ddrphy_dfi_p1_rddata[1] <= main_a7ddrphy_bitslip1_o[2]; - main_a7ddrphy_dfi_p1_rddata[17] <= main_a7ddrphy_bitslip1_o[3]; - main_a7ddrphy_dfi_p1_rddata[2] <= main_a7ddrphy_bitslip2_o[2]; - main_a7ddrphy_dfi_p1_rddata[18] <= main_a7ddrphy_bitslip2_o[3]; - main_a7ddrphy_dfi_p1_rddata[3] <= main_a7ddrphy_bitslip3_o[2]; - main_a7ddrphy_dfi_p1_rddata[19] <= main_a7ddrphy_bitslip3_o[3]; - main_a7ddrphy_dfi_p1_rddata[4] <= main_a7ddrphy_bitslip4_o[2]; - main_a7ddrphy_dfi_p1_rddata[20] <= main_a7ddrphy_bitslip4_o[3]; - main_a7ddrphy_dfi_p1_rddata[5] <= main_a7ddrphy_bitslip5_o[2]; - main_a7ddrphy_dfi_p1_rddata[21] <= main_a7ddrphy_bitslip5_o[3]; - main_a7ddrphy_dfi_p1_rddata[6] <= main_a7ddrphy_bitslip6_o[2]; - main_a7ddrphy_dfi_p1_rddata[22] <= main_a7ddrphy_bitslip6_o[3]; - main_a7ddrphy_dfi_p1_rddata[7] <= main_a7ddrphy_bitslip7_o[2]; - main_a7ddrphy_dfi_p1_rddata[23] <= main_a7ddrphy_bitslip7_o[3]; - main_a7ddrphy_dfi_p1_rddata[8] <= main_a7ddrphy_bitslip8_o[2]; - main_a7ddrphy_dfi_p1_rddata[24] <= main_a7ddrphy_bitslip8_o[3]; - main_a7ddrphy_dfi_p1_rddata[9] <= main_a7ddrphy_bitslip9_o[2]; - main_a7ddrphy_dfi_p1_rddata[25] <= main_a7ddrphy_bitslip9_o[3]; - main_a7ddrphy_dfi_p1_rddata[10] <= main_a7ddrphy_bitslip10_o[2]; - main_a7ddrphy_dfi_p1_rddata[26] <= main_a7ddrphy_bitslip10_o[3]; - main_a7ddrphy_dfi_p1_rddata[11] <= main_a7ddrphy_bitslip11_o[2]; - main_a7ddrphy_dfi_p1_rddata[27] <= main_a7ddrphy_bitslip11_o[3]; - main_a7ddrphy_dfi_p1_rddata[12] <= main_a7ddrphy_bitslip12_o[2]; - main_a7ddrphy_dfi_p1_rddata[28] <= main_a7ddrphy_bitslip12_o[3]; - main_a7ddrphy_dfi_p1_rddata[13] <= main_a7ddrphy_bitslip13_o[2]; - main_a7ddrphy_dfi_p1_rddata[29] <= main_a7ddrphy_bitslip13_o[3]; - main_a7ddrphy_dfi_p1_rddata[14] <= main_a7ddrphy_bitslip14_o[2]; - main_a7ddrphy_dfi_p1_rddata[30] <= main_a7ddrphy_bitslip14_o[3]; - main_a7ddrphy_dfi_p1_rddata[15] <= main_a7ddrphy_bitslip15_o[2]; - main_a7ddrphy_dfi_p1_rddata[31] <= main_a7ddrphy_bitslip15_o[3]; -end -always @(*) begin - main_a7ddrphy_dfi_p2_rddata <= 32'd0; - main_a7ddrphy_dfi_p2_rddata[0] <= main_a7ddrphy_bitslip0_o[4]; - main_a7ddrphy_dfi_p2_rddata[16] <= main_a7ddrphy_bitslip0_o[5]; - main_a7ddrphy_dfi_p2_rddata[1] <= main_a7ddrphy_bitslip1_o[4]; - main_a7ddrphy_dfi_p2_rddata[17] <= main_a7ddrphy_bitslip1_o[5]; - main_a7ddrphy_dfi_p2_rddata[2] <= main_a7ddrphy_bitslip2_o[4]; - main_a7ddrphy_dfi_p2_rddata[18] <= main_a7ddrphy_bitslip2_o[5]; - main_a7ddrphy_dfi_p2_rddata[3] <= main_a7ddrphy_bitslip3_o[4]; - main_a7ddrphy_dfi_p2_rddata[19] <= main_a7ddrphy_bitslip3_o[5]; - main_a7ddrphy_dfi_p2_rddata[4] <= main_a7ddrphy_bitslip4_o[4]; - main_a7ddrphy_dfi_p2_rddata[20] <= main_a7ddrphy_bitslip4_o[5]; - main_a7ddrphy_dfi_p2_rddata[5] <= main_a7ddrphy_bitslip5_o[4]; - main_a7ddrphy_dfi_p2_rddata[21] <= main_a7ddrphy_bitslip5_o[5]; - main_a7ddrphy_dfi_p2_rddata[6] <= main_a7ddrphy_bitslip6_o[4]; - main_a7ddrphy_dfi_p2_rddata[22] <= main_a7ddrphy_bitslip6_o[5]; - main_a7ddrphy_dfi_p2_rddata[7] <= main_a7ddrphy_bitslip7_o[4]; - main_a7ddrphy_dfi_p2_rddata[23] <= main_a7ddrphy_bitslip7_o[5]; - main_a7ddrphy_dfi_p2_rddata[8] <= main_a7ddrphy_bitslip8_o[4]; - main_a7ddrphy_dfi_p2_rddata[24] <= main_a7ddrphy_bitslip8_o[5]; - main_a7ddrphy_dfi_p2_rddata[9] <= main_a7ddrphy_bitslip9_o[4]; - main_a7ddrphy_dfi_p2_rddata[25] <= main_a7ddrphy_bitslip9_o[5]; - main_a7ddrphy_dfi_p2_rddata[10] <= main_a7ddrphy_bitslip10_o[4]; - main_a7ddrphy_dfi_p2_rddata[26] <= main_a7ddrphy_bitslip10_o[5]; - main_a7ddrphy_dfi_p2_rddata[11] <= main_a7ddrphy_bitslip11_o[4]; - main_a7ddrphy_dfi_p2_rddata[27] <= main_a7ddrphy_bitslip11_o[5]; - main_a7ddrphy_dfi_p2_rddata[12] <= main_a7ddrphy_bitslip12_o[4]; - main_a7ddrphy_dfi_p2_rddata[28] <= main_a7ddrphy_bitslip12_o[5]; - main_a7ddrphy_dfi_p2_rddata[13] <= main_a7ddrphy_bitslip13_o[4]; - main_a7ddrphy_dfi_p2_rddata[29] <= main_a7ddrphy_bitslip13_o[5]; - main_a7ddrphy_dfi_p2_rddata[14] <= main_a7ddrphy_bitslip14_o[4]; - main_a7ddrphy_dfi_p2_rddata[30] <= main_a7ddrphy_bitslip14_o[5]; - main_a7ddrphy_dfi_p2_rddata[15] <= main_a7ddrphy_bitslip15_o[4]; - main_a7ddrphy_dfi_p2_rddata[31] <= main_a7ddrphy_bitslip15_o[5]; -end -always @(*) begin - main_a7ddrphy_dfi_p3_rddata <= 32'd0; - main_a7ddrphy_dfi_p3_rddata[0] <= main_a7ddrphy_bitslip0_o[6]; - main_a7ddrphy_dfi_p3_rddata[16] <= main_a7ddrphy_bitslip0_o[7]; - main_a7ddrphy_dfi_p3_rddata[1] <= main_a7ddrphy_bitslip1_o[6]; - main_a7ddrphy_dfi_p3_rddata[17] <= main_a7ddrphy_bitslip1_o[7]; - main_a7ddrphy_dfi_p3_rddata[2] <= main_a7ddrphy_bitslip2_o[6]; - main_a7ddrphy_dfi_p3_rddata[18] <= main_a7ddrphy_bitslip2_o[7]; - main_a7ddrphy_dfi_p3_rddata[3] <= main_a7ddrphy_bitslip3_o[6]; - main_a7ddrphy_dfi_p3_rddata[19] <= main_a7ddrphy_bitslip3_o[7]; - main_a7ddrphy_dfi_p3_rddata[4] <= main_a7ddrphy_bitslip4_o[6]; - main_a7ddrphy_dfi_p3_rddata[20] <= main_a7ddrphy_bitslip4_o[7]; - main_a7ddrphy_dfi_p3_rddata[5] <= main_a7ddrphy_bitslip5_o[6]; - main_a7ddrphy_dfi_p3_rddata[21] <= main_a7ddrphy_bitslip5_o[7]; - main_a7ddrphy_dfi_p3_rddata[6] <= main_a7ddrphy_bitslip6_o[6]; - main_a7ddrphy_dfi_p3_rddata[22] <= main_a7ddrphy_bitslip6_o[7]; - main_a7ddrphy_dfi_p3_rddata[7] <= main_a7ddrphy_bitslip7_o[6]; - main_a7ddrphy_dfi_p3_rddata[23] <= main_a7ddrphy_bitslip7_o[7]; - main_a7ddrphy_dfi_p3_rddata[8] <= main_a7ddrphy_bitslip8_o[6]; - main_a7ddrphy_dfi_p3_rddata[24] <= main_a7ddrphy_bitslip8_o[7]; - main_a7ddrphy_dfi_p3_rddata[9] <= main_a7ddrphy_bitslip9_o[6]; - main_a7ddrphy_dfi_p3_rddata[25] <= main_a7ddrphy_bitslip9_o[7]; - main_a7ddrphy_dfi_p3_rddata[10] <= main_a7ddrphy_bitslip10_o[6]; - main_a7ddrphy_dfi_p3_rddata[26] <= main_a7ddrphy_bitslip10_o[7]; - main_a7ddrphy_dfi_p3_rddata[11] <= main_a7ddrphy_bitslip11_o[6]; - main_a7ddrphy_dfi_p3_rddata[27] <= main_a7ddrphy_bitslip11_o[7]; - main_a7ddrphy_dfi_p3_rddata[12] <= main_a7ddrphy_bitslip12_o[6]; - main_a7ddrphy_dfi_p3_rddata[28] <= main_a7ddrphy_bitslip12_o[7]; - main_a7ddrphy_dfi_p3_rddata[13] <= main_a7ddrphy_bitslip13_o[6]; - main_a7ddrphy_dfi_p3_rddata[29] <= main_a7ddrphy_bitslip13_o[7]; - main_a7ddrphy_dfi_p3_rddata[14] <= main_a7ddrphy_bitslip14_o[6]; - main_a7ddrphy_dfi_p3_rddata[30] <= main_a7ddrphy_bitslip14_o[7]; - main_a7ddrphy_dfi_p3_rddata[15] <= main_a7ddrphy_bitslip15_o[6]; - main_a7ddrphy_dfi_p3_rddata[31] <= main_a7ddrphy_bitslip15_o[7]; -end -assign main_a7ddrphy_oe = ((main_a7ddrphy_last_wrdata_en[1] | main_a7ddrphy_last_wrdata_en[2]) | main_a7ddrphy_last_wrdata_en[3]); -assign main_a7ddrphy_dqs_preamble = (main_a7ddrphy_last_wrdata_en[1] & (~main_a7ddrphy_last_wrdata_en[2])); -assign main_a7ddrphy_dqs_postamble = (main_a7ddrphy_last_wrdata_en[3] & (~main_a7ddrphy_last_wrdata_en[2])); -assign main_a7ddrphy_dfi_p0_address = main_sdram_master_p0_address; -assign main_a7ddrphy_dfi_p0_bank = main_sdram_master_p0_bank; -assign main_a7ddrphy_dfi_p0_cas_n = main_sdram_master_p0_cas_n; -assign main_a7ddrphy_dfi_p0_cs_n = main_sdram_master_p0_cs_n; -assign main_a7ddrphy_dfi_p0_ras_n = main_sdram_master_p0_ras_n; -assign main_a7ddrphy_dfi_p0_we_n = main_sdram_master_p0_we_n; -assign main_a7ddrphy_dfi_p0_cke = main_sdram_master_p0_cke; -assign main_a7ddrphy_dfi_p0_odt = main_sdram_master_p0_odt; -assign main_a7ddrphy_dfi_p0_reset_n = main_sdram_master_p0_reset_n; -assign main_a7ddrphy_dfi_p0_act_n = main_sdram_master_p0_act_n; -assign main_a7ddrphy_dfi_p0_wrdata = main_sdram_master_p0_wrdata; -assign main_a7ddrphy_dfi_p0_wrdata_en = main_sdram_master_p0_wrdata_en; -assign main_a7ddrphy_dfi_p0_wrdata_mask = main_sdram_master_p0_wrdata_mask; -assign main_a7ddrphy_dfi_p0_rddata_en = main_sdram_master_p0_rddata_en; -assign main_sdram_master_p0_rddata = main_a7ddrphy_dfi_p0_rddata; -assign main_sdram_master_p0_rddata_valid = main_a7ddrphy_dfi_p0_rddata_valid; -assign main_a7ddrphy_dfi_p1_address = main_sdram_master_p1_address; -assign main_a7ddrphy_dfi_p1_bank = main_sdram_master_p1_bank; -assign main_a7ddrphy_dfi_p1_cas_n = main_sdram_master_p1_cas_n; -assign main_a7ddrphy_dfi_p1_cs_n = main_sdram_master_p1_cs_n; -assign main_a7ddrphy_dfi_p1_ras_n = main_sdram_master_p1_ras_n; -assign main_a7ddrphy_dfi_p1_we_n = main_sdram_master_p1_we_n; -assign main_a7ddrphy_dfi_p1_cke = main_sdram_master_p1_cke; -assign main_a7ddrphy_dfi_p1_odt = main_sdram_master_p1_odt; -assign main_a7ddrphy_dfi_p1_reset_n = main_sdram_master_p1_reset_n; -assign main_a7ddrphy_dfi_p1_act_n = main_sdram_master_p1_act_n; -assign main_a7ddrphy_dfi_p1_wrdata = main_sdram_master_p1_wrdata; -assign main_a7ddrphy_dfi_p1_wrdata_en = main_sdram_master_p1_wrdata_en; -assign main_a7ddrphy_dfi_p1_wrdata_mask = main_sdram_master_p1_wrdata_mask; -assign main_a7ddrphy_dfi_p1_rddata_en = main_sdram_master_p1_rddata_en; -assign main_sdram_master_p1_rddata = main_a7ddrphy_dfi_p1_rddata; -assign main_sdram_master_p1_rddata_valid = main_a7ddrphy_dfi_p1_rddata_valid; -assign main_a7ddrphy_dfi_p2_address = main_sdram_master_p2_address; -assign main_a7ddrphy_dfi_p2_bank = main_sdram_master_p2_bank; -assign main_a7ddrphy_dfi_p2_cas_n = main_sdram_master_p2_cas_n; -assign main_a7ddrphy_dfi_p2_cs_n = main_sdram_master_p2_cs_n; -assign main_a7ddrphy_dfi_p2_ras_n = main_sdram_master_p2_ras_n; -assign main_a7ddrphy_dfi_p2_we_n = main_sdram_master_p2_we_n; -assign main_a7ddrphy_dfi_p2_cke = main_sdram_master_p2_cke; -assign main_a7ddrphy_dfi_p2_odt = main_sdram_master_p2_odt; -assign main_a7ddrphy_dfi_p2_reset_n = main_sdram_master_p2_reset_n; -assign main_a7ddrphy_dfi_p2_act_n = main_sdram_master_p2_act_n; -assign main_a7ddrphy_dfi_p2_wrdata = main_sdram_master_p2_wrdata; -assign main_a7ddrphy_dfi_p2_wrdata_en = main_sdram_master_p2_wrdata_en; -assign main_a7ddrphy_dfi_p2_wrdata_mask = main_sdram_master_p2_wrdata_mask; -assign main_a7ddrphy_dfi_p2_rddata_en = main_sdram_master_p2_rddata_en; -assign main_sdram_master_p2_rddata = main_a7ddrphy_dfi_p2_rddata; -assign main_sdram_master_p2_rddata_valid = main_a7ddrphy_dfi_p2_rddata_valid; -assign main_a7ddrphy_dfi_p3_address = main_sdram_master_p3_address; -assign main_a7ddrphy_dfi_p3_bank = main_sdram_master_p3_bank; -assign main_a7ddrphy_dfi_p3_cas_n = main_sdram_master_p3_cas_n; -assign main_a7ddrphy_dfi_p3_cs_n = main_sdram_master_p3_cs_n; -assign main_a7ddrphy_dfi_p3_ras_n = main_sdram_master_p3_ras_n; -assign main_a7ddrphy_dfi_p3_we_n = main_sdram_master_p3_we_n; -assign main_a7ddrphy_dfi_p3_cke = main_sdram_master_p3_cke; -assign main_a7ddrphy_dfi_p3_odt = main_sdram_master_p3_odt; -assign main_a7ddrphy_dfi_p3_reset_n = main_sdram_master_p3_reset_n; -assign main_a7ddrphy_dfi_p3_act_n = main_sdram_master_p3_act_n; -assign main_a7ddrphy_dfi_p3_wrdata = main_sdram_master_p3_wrdata; -assign main_a7ddrphy_dfi_p3_wrdata_en = main_sdram_master_p3_wrdata_en; -assign main_a7ddrphy_dfi_p3_wrdata_mask = main_sdram_master_p3_wrdata_mask; -assign main_a7ddrphy_dfi_p3_rddata_en = main_sdram_master_p3_rddata_en; -assign main_sdram_master_p3_rddata = main_a7ddrphy_dfi_p3_rddata; -assign main_sdram_master_p3_rddata_valid = main_a7ddrphy_dfi_p3_rddata_valid; -assign main_sdram_slave_p0_address = main_sdram_dfi_p0_address; -assign main_sdram_slave_p0_bank = main_sdram_dfi_p0_bank; -assign main_sdram_slave_p0_cas_n = main_sdram_dfi_p0_cas_n; -assign main_sdram_slave_p0_cs_n = main_sdram_dfi_p0_cs_n; -assign main_sdram_slave_p0_ras_n = main_sdram_dfi_p0_ras_n; -assign main_sdram_slave_p0_we_n = main_sdram_dfi_p0_we_n; -assign main_sdram_slave_p0_cke = main_sdram_dfi_p0_cke; -assign main_sdram_slave_p0_odt = main_sdram_dfi_p0_odt; -assign main_sdram_slave_p0_reset_n = main_sdram_dfi_p0_reset_n; -assign main_sdram_slave_p0_act_n = main_sdram_dfi_p0_act_n; -assign main_sdram_slave_p0_wrdata = main_sdram_dfi_p0_wrdata; -assign main_sdram_slave_p0_wrdata_en = main_sdram_dfi_p0_wrdata_en; -assign main_sdram_slave_p0_wrdata_mask = main_sdram_dfi_p0_wrdata_mask; -assign main_sdram_slave_p0_rddata_en = main_sdram_dfi_p0_rddata_en; -assign main_sdram_dfi_p0_rddata = main_sdram_slave_p0_rddata; -assign main_sdram_dfi_p0_rddata_valid = main_sdram_slave_p0_rddata_valid; -assign main_sdram_slave_p1_address = main_sdram_dfi_p1_address; -assign main_sdram_slave_p1_bank = main_sdram_dfi_p1_bank; -assign main_sdram_slave_p1_cas_n = main_sdram_dfi_p1_cas_n; -assign main_sdram_slave_p1_cs_n = main_sdram_dfi_p1_cs_n; -assign main_sdram_slave_p1_ras_n = main_sdram_dfi_p1_ras_n; -assign main_sdram_slave_p1_we_n = main_sdram_dfi_p1_we_n; -assign main_sdram_slave_p1_cke = main_sdram_dfi_p1_cke; -assign main_sdram_slave_p1_odt = main_sdram_dfi_p1_odt; -assign main_sdram_slave_p1_reset_n = main_sdram_dfi_p1_reset_n; -assign main_sdram_slave_p1_act_n = main_sdram_dfi_p1_act_n; -assign main_sdram_slave_p1_wrdata = main_sdram_dfi_p1_wrdata; -assign main_sdram_slave_p1_wrdata_en = main_sdram_dfi_p1_wrdata_en; -assign main_sdram_slave_p1_wrdata_mask = main_sdram_dfi_p1_wrdata_mask; -assign main_sdram_slave_p1_rddata_en = main_sdram_dfi_p1_rddata_en; -assign main_sdram_dfi_p1_rddata = main_sdram_slave_p1_rddata; -assign main_sdram_dfi_p1_rddata_valid = main_sdram_slave_p1_rddata_valid; -assign main_sdram_slave_p2_address = main_sdram_dfi_p2_address; -assign main_sdram_slave_p2_bank = main_sdram_dfi_p2_bank; -assign main_sdram_slave_p2_cas_n = main_sdram_dfi_p2_cas_n; -assign main_sdram_slave_p2_cs_n = main_sdram_dfi_p2_cs_n; -assign main_sdram_slave_p2_ras_n = main_sdram_dfi_p2_ras_n; -assign main_sdram_slave_p2_we_n = main_sdram_dfi_p2_we_n; -assign main_sdram_slave_p2_cke = main_sdram_dfi_p2_cke; -assign main_sdram_slave_p2_odt = main_sdram_dfi_p2_odt; -assign main_sdram_slave_p2_reset_n = main_sdram_dfi_p2_reset_n; -assign main_sdram_slave_p2_act_n = main_sdram_dfi_p2_act_n; -assign main_sdram_slave_p2_wrdata = main_sdram_dfi_p2_wrdata; -assign main_sdram_slave_p2_wrdata_en = main_sdram_dfi_p2_wrdata_en; -assign main_sdram_slave_p2_wrdata_mask = main_sdram_dfi_p2_wrdata_mask; -assign main_sdram_slave_p2_rddata_en = main_sdram_dfi_p2_rddata_en; -assign main_sdram_dfi_p2_rddata = main_sdram_slave_p2_rddata; -assign main_sdram_dfi_p2_rddata_valid = main_sdram_slave_p2_rddata_valid; -assign main_sdram_slave_p3_address = main_sdram_dfi_p3_address; -assign main_sdram_slave_p3_bank = main_sdram_dfi_p3_bank; -assign main_sdram_slave_p3_cas_n = main_sdram_dfi_p3_cas_n; -assign main_sdram_slave_p3_cs_n = main_sdram_dfi_p3_cs_n; -assign main_sdram_slave_p3_ras_n = main_sdram_dfi_p3_ras_n; -assign main_sdram_slave_p3_we_n = main_sdram_dfi_p3_we_n; -assign main_sdram_slave_p3_cke = main_sdram_dfi_p3_cke; -assign main_sdram_slave_p3_odt = main_sdram_dfi_p3_odt; -assign main_sdram_slave_p3_reset_n = main_sdram_dfi_p3_reset_n; -assign main_sdram_slave_p3_act_n = main_sdram_dfi_p3_act_n; -assign main_sdram_slave_p3_wrdata = main_sdram_dfi_p3_wrdata; -assign main_sdram_slave_p3_wrdata_en = main_sdram_dfi_p3_wrdata_en; -assign main_sdram_slave_p3_wrdata_mask = main_sdram_dfi_p3_wrdata_mask; -assign main_sdram_slave_p3_rddata_en = main_sdram_dfi_p3_rddata_en; -assign main_sdram_dfi_p3_rddata = main_sdram_slave_p3_rddata; -assign main_sdram_dfi_p3_rddata_valid = main_sdram_slave_p3_rddata_valid; -always @(*) begin - main_sdram_slave_p1_rddata <= 32'd0; - main_sdram_slave_p1_rddata_valid <= 1'd0; - main_sdram_slave_p2_rddata <= 32'd0; - main_sdram_slave_p2_rddata_valid <= 1'd0; - main_sdram_slave_p3_rddata <= 32'd0; - main_sdram_slave_p3_rddata_valid <= 1'd0; - main_sdram_inti_p0_rddata <= 32'd0; - main_sdram_inti_p0_rddata_valid <= 1'd0; - main_sdram_master_p0_address <= 14'd0; - main_sdram_master_p0_bank <= 3'd0; - main_sdram_master_p0_cas_n <= 1'd1; - main_sdram_master_p0_cs_n <= 1'd1; - main_sdram_master_p0_ras_n <= 1'd1; - main_sdram_master_p0_we_n <= 1'd1; - main_sdram_master_p0_cke <= 1'd0; - main_sdram_master_p0_odt <= 1'd0; - main_sdram_master_p0_reset_n <= 1'd0; - main_sdram_master_p0_act_n <= 1'd1; - main_sdram_inti_p1_rddata <= 32'd0; - main_sdram_master_p0_wrdata <= 32'd0; - main_sdram_inti_p1_rddata_valid <= 1'd0; - main_sdram_master_p0_wrdata_en <= 1'd0; - main_sdram_master_p0_wrdata_mask <= 4'd0; - main_sdram_master_p0_rddata_en <= 1'd0; - main_sdram_master_p1_address <= 14'd0; - main_sdram_master_p1_bank <= 3'd0; - main_sdram_master_p1_cas_n <= 1'd1; - main_sdram_master_p1_cs_n <= 1'd1; - main_sdram_master_p1_ras_n <= 1'd1; - main_sdram_master_p1_we_n <= 1'd1; - main_sdram_master_p1_cke <= 1'd0; - main_sdram_master_p1_odt <= 1'd0; - main_sdram_master_p1_reset_n <= 1'd0; - main_sdram_master_p1_act_n <= 1'd1; - main_sdram_master_p1_wrdata <= 32'd0; - main_sdram_inti_p2_rddata <= 32'd0; - main_sdram_master_p1_wrdata_en <= 1'd0; - main_sdram_inti_p2_rddata_valid <= 1'd0; - main_sdram_master_p1_wrdata_mask <= 4'd0; - main_sdram_master_p1_rddata_en <= 1'd0; - main_sdram_master_p2_address <= 14'd0; - main_sdram_master_p2_bank <= 3'd0; - main_sdram_master_p2_cas_n <= 1'd1; - main_sdram_master_p2_cs_n <= 1'd1; - main_sdram_master_p2_ras_n <= 1'd1; - main_sdram_master_p2_we_n <= 1'd1; - main_sdram_master_p2_cke <= 1'd0; - main_sdram_master_p2_odt <= 1'd0; - main_sdram_master_p2_reset_n <= 1'd0; - main_sdram_master_p2_act_n <= 1'd1; - main_sdram_master_p2_wrdata <= 32'd0; - main_sdram_inti_p3_rddata <= 32'd0; - main_sdram_master_p2_wrdata_en <= 1'd0; - main_sdram_inti_p3_rddata_valid <= 1'd0; - main_sdram_master_p2_wrdata_mask <= 4'd0; - main_sdram_master_p2_rddata_en <= 1'd0; - main_sdram_master_p3_address <= 14'd0; - main_sdram_master_p3_bank <= 3'd0; - main_sdram_master_p3_cas_n <= 1'd1; - main_sdram_master_p3_cs_n <= 1'd1; - main_sdram_master_p3_ras_n <= 1'd1; - main_sdram_master_p3_we_n <= 1'd1; - main_sdram_master_p3_cke <= 1'd0; - main_sdram_master_p3_odt <= 1'd0; - main_sdram_master_p3_reset_n <= 1'd0; - main_sdram_master_p3_act_n <= 1'd1; - main_sdram_master_p3_wrdata <= 32'd0; - main_sdram_master_p3_wrdata_en <= 1'd0; - main_sdram_master_p3_wrdata_mask <= 4'd0; - main_sdram_master_p3_rddata_en <= 1'd0; - main_sdram_slave_p0_rddata <= 32'd0; - main_sdram_slave_p0_rddata_valid <= 1'd0; - if (main_sdram_storage[0]) begin - main_sdram_master_p0_address <= main_sdram_slave_p0_address; - main_sdram_master_p0_bank <= main_sdram_slave_p0_bank; - main_sdram_master_p0_cas_n <= main_sdram_slave_p0_cas_n; - main_sdram_master_p0_cs_n <= main_sdram_slave_p0_cs_n; - main_sdram_master_p0_ras_n <= main_sdram_slave_p0_ras_n; - main_sdram_master_p0_we_n <= main_sdram_slave_p0_we_n; - main_sdram_master_p0_cke <= main_sdram_slave_p0_cke; - main_sdram_master_p0_odt <= main_sdram_slave_p0_odt; - main_sdram_master_p0_reset_n <= main_sdram_slave_p0_reset_n; - main_sdram_master_p0_act_n <= main_sdram_slave_p0_act_n; - main_sdram_master_p0_wrdata <= main_sdram_slave_p0_wrdata; - main_sdram_master_p0_wrdata_en <= main_sdram_slave_p0_wrdata_en; - main_sdram_master_p0_wrdata_mask <= main_sdram_slave_p0_wrdata_mask; - main_sdram_master_p0_rddata_en <= main_sdram_slave_p0_rddata_en; - main_sdram_slave_p0_rddata <= main_sdram_master_p0_rddata; - main_sdram_slave_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; - main_sdram_master_p1_address <= main_sdram_slave_p1_address; - main_sdram_master_p1_bank <= main_sdram_slave_p1_bank; - main_sdram_master_p1_cas_n <= main_sdram_slave_p1_cas_n; - main_sdram_master_p1_cs_n <= main_sdram_slave_p1_cs_n; - main_sdram_master_p1_ras_n <= main_sdram_slave_p1_ras_n; - main_sdram_master_p1_we_n <= main_sdram_slave_p1_we_n; - main_sdram_master_p1_cke <= main_sdram_slave_p1_cke; - main_sdram_master_p1_odt <= main_sdram_slave_p1_odt; - main_sdram_master_p1_reset_n <= main_sdram_slave_p1_reset_n; - main_sdram_master_p1_act_n <= main_sdram_slave_p1_act_n; - main_sdram_master_p1_wrdata <= main_sdram_slave_p1_wrdata; - main_sdram_master_p1_wrdata_en <= main_sdram_slave_p1_wrdata_en; - main_sdram_master_p1_wrdata_mask <= main_sdram_slave_p1_wrdata_mask; - main_sdram_master_p1_rddata_en <= main_sdram_slave_p1_rddata_en; - main_sdram_slave_p1_rddata <= main_sdram_master_p1_rddata; - main_sdram_slave_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; - main_sdram_master_p2_address <= main_sdram_slave_p2_address; - main_sdram_master_p2_bank <= main_sdram_slave_p2_bank; - main_sdram_master_p2_cas_n <= main_sdram_slave_p2_cas_n; - main_sdram_master_p2_cs_n <= main_sdram_slave_p2_cs_n; - main_sdram_master_p2_ras_n <= main_sdram_slave_p2_ras_n; - main_sdram_master_p2_we_n <= main_sdram_slave_p2_we_n; - main_sdram_master_p2_cke <= main_sdram_slave_p2_cke; - main_sdram_master_p2_odt <= main_sdram_slave_p2_odt; - main_sdram_master_p2_reset_n <= main_sdram_slave_p2_reset_n; - main_sdram_master_p2_act_n <= main_sdram_slave_p2_act_n; - main_sdram_master_p2_wrdata <= main_sdram_slave_p2_wrdata; - main_sdram_master_p2_wrdata_en <= main_sdram_slave_p2_wrdata_en; - main_sdram_master_p2_wrdata_mask <= main_sdram_slave_p2_wrdata_mask; - main_sdram_master_p2_rddata_en <= main_sdram_slave_p2_rddata_en; - main_sdram_slave_p2_rddata <= main_sdram_master_p2_rddata; - main_sdram_slave_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; - main_sdram_master_p3_address <= main_sdram_slave_p3_address; - main_sdram_master_p3_bank <= main_sdram_slave_p3_bank; - main_sdram_master_p3_cas_n <= main_sdram_slave_p3_cas_n; - main_sdram_master_p3_cs_n <= main_sdram_slave_p3_cs_n; - main_sdram_master_p3_ras_n <= main_sdram_slave_p3_ras_n; - main_sdram_master_p3_we_n <= main_sdram_slave_p3_we_n; - main_sdram_master_p3_cke <= main_sdram_slave_p3_cke; - main_sdram_master_p3_odt <= main_sdram_slave_p3_odt; - main_sdram_master_p3_reset_n <= main_sdram_slave_p3_reset_n; - main_sdram_master_p3_act_n <= main_sdram_slave_p3_act_n; - main_sdram_master_p3_wrdata <= main_sdram_slave_p3_wrdata; - main_sdram_master_p3_wrdata_en <= main_sdram_slave_p3_wrdata_en; - main_sdram_master_p3_wrdata_mask <= main_sdram_slave_p3_wrdata_mask; - main_sdram_master_p3_rddata_en <= main_sdram_slave_p3_rddata_en; - main_sdram_slave_p3_rddata <= main_sdram_master_p3_rddata; - main_sdram_slave_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; - end else begin - main_sdram_master_p0_address <= main_sdram_inti_p0_address; - main_sdram_master_p0_bank <= main_sdram_inti_p0_bank; - main_sdram_master_p0_cas_n <= main_sdram_inti_p0_cas_n; - main_sdram_master_p0_cs_n <= main_sdram_inti_p0_cs_n; - main_sdram_master_p0_ras_n <= main_sdram_inti_p0_ras_n; - main_sdram_master_p0_we_n <= main_sdram_inti_p0_we_n; - main_sdram_master_p0_cke <= main_sdram_inti_p0_cke; - main_sdram_master_p0_odt <= main_sdram_inti_p0_odt; - main_sdram_master_p0_reset_n <= main_sdram_inti_p0_reset_n; - main_sdram_master_p0_act_n <= main_sdram_inti_p0_act_n; - main_sdram_master_p0_wrdata <= main_sdram_inti_p0_wrdata; - main_sdram_master_p0_wrdata_en <= main_sdram_inti_p0_wrdata_en; - main_sdram_master_p0_wrdata_mask <= main_sdram_inti_p0_wrdata_mask; - main_sdram_master_p0_rddata_en <= main_sdram_inti_p0_rddata_en; - main_sdram_inti_p0_rddata <= main_sdram_master_p0_rddata; - main_sdram_inti_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; - main_sdram_master_p1_address <= main_sdram_inti_p1_address; - main_sdram_master_p1_bank <= main_sdram_inti_p1_bank; - main_sdram_master_p1_cas_n <= main_sdram_inti_p1_cas_n; - main_sdram_master_p1_cs_n <= main_sdram_inti_p1_cs_n; - main_sdram_master_p1_ras_n <= main_sdram_inti_p1_ras_n; - main_sdram_master_p1_we_n <= main_sdram_inti_p1_we_n; - main_sdram_master_p1_cke <= main_sdram_inti_p1_cke; - main_sdram_master_p1_odt <= main_sdram_inti_p1_odt; - main_sdram_master_p1_reset_n <= main_sdram_inti_p1_reset_n; - main_sdram_master_p1_act_n <= main_sdram_inti_p1_act_n; - main_sdram_master_p1_wrdata <= main_sdram_inti_p1_wrdata; - main_sdram_master_p1_wrdata_en <= main_sdram_inti_p1_wrdata_en; - main_sdram_master_p1_wrdata_mask <= main_sdram_inti_p1_wrdata_mask; - main_sdram_master_p1_rddata_en <= main_sdram_inti_p1_rddata_en; - main_sdram_inti_p1_rddata <= main_sdram_master_p1_rddata; - main_sdram_inti_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; - main_sdram_master_p2_address <= main_sdram_inti_p2_address; - main_sdram_master_p2_bank <= main_sdram_inti_p2_bank; - main_sdram_master_p2_cas_n <= main_sdram_inti_p2_cas_n; - main_sdram_master_p2_cs_n <= main_sdram_inti_p2_cs_n; - main_sdram_master_p2_ras_n <= main_sdram_inti_p2_ras_n; - main_sdram_master_p2_we_n <= main_sdram_inti_p2_we_n; - main_sdram_master_p2_cke <= main_sdram_inti_p2_cke; - main_sdram_master_p2_odt <= main_sdram_inti_p2_odt; - main_sdram_master_p2_reset_n <= main_sdram_inti_p2_reset_n; - main_sdram_master_p2_act_n <= main_sdram_inti_p2_act_n; - main_sdram_master_p2_wrdata <= main_sdram_inti_p2_wrdata; - main_sdram_master_p2_wrdata_en <= main_sdram_inti_p2_wrdata_en; - main_sdram_master_p2_wrdata_mask <= main_sdram_inti_p2_wrdata_mask; - main_sdram_master_p2_rddata_en <= main_sdram_inti_p2_rddata_en; - main_sdram_inti_p2_rddata <= main_sdram_master_p2_rddata; - main_sdram_inti_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; - main_sdram_master_p3_address <= main_sdram_inti_p3_address; - main_sdram_master_p3_bank <= main_sdram_inti_p3_bank; - main_sdram_master_p3_cas_n <= main_sdram_inti_p3_cas_n; - main_sdram_master_p3_cs_n <= main_sdram_inti_p3_cs_n; - main_sdram_master_p3_ras_n <= main_sdram_inti_p3_ras_n; - main_sdram_master_p3_we_n <= main_sdram_inti_p3_we_n; - main_sdram_master_p3_cke <= main_sdram_inti_p3_cke; - main_sdram_master_p3_odt <= main_sdram_inti_p3_odt; - main_sdram_master_p3_reset_n <= main_sdram_inti_p3_reset_n; - main_sdram_master_p3_act_n <= main_sdram_inti_p3_act_n; - main_sdram_master_p3_wrdata <= main_sdram_inti_p3_wrdata; - main_sdram_master_p3_wrdata_en <= main_sdram_inti_p3_wrdata_en; - main_sdram_master_p3_wrdata_mask <= main_sdram_inti_p3_wrdata_mask; - main_sdram_master_p3_rddata_en <= main_sdram_inti_p3_rddata_en; - main_sdram_inti_p3_rddata <= main_sdram_master_p3_rddata; - main_sdram_inti_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; - end -end -assign main_sdram_inti_p0_cke = main_sdram_storage[1]; -assign main_sdram_inti_p1_cke = main_sdram_storage[1]; -assign main_sdram_inti_p2_cke = main_sdram_storage[1]; -assign main_sdram_inti_p3_cke = main_sdram_storage[1]; -assign main_sdram_inti_p0_odt = main_sdram_storage[2]; -assign main_sdram_inti_p1_odt = main_sdram_storage[2]; -assign main_sdram_inti_p2_odt = main_sdram_storage[2]; -assign main_sdram_inti_p3_odt = main_sdram_storage[2]; -assign main_sdram_inti_p0_reset_n = main_sdram_storage[3]; -assign main_sdram_inti_p1_reset_n = main_sdram_storage[3]; -assign main_sdram_inti_p2_reset_n = main_sdram_storage[3]; -assign main_sdram_inti_p3_reset_n = main_sdram_storage[3]; -always @(*) begin - main_sdram_inti_p0_we_n <= 1'd1; - main_sdram_inti_p0_cas_n <= 1'd1; - main_sdram_inti_p0_cs_n <= 1'd1; - main_sdram_inti_p0_ras_n <= 1'd1; - if (main_sdram_phaseinjector0_command_issue_re) begin - main_sdram_inti_p0_cs_n <= {1{(~main_sdram_phaseinjector0_command_storage[0])}}; - main_sdram_inti_p0_we_n <= (~main_sdram_phaseinjector0_command_storage[1]); - main_sdram_inti_p0_cas_n <= (~main_sdram_phaseinjector0_command_storage[2]); - main_sdram_inti_p0_ras_n <= (~main_sdram_phaseinjector0_command_storage[3]); - end else begin - main_sdram_inti_p0_cs_n <= {1{1'd1}}; - main_sdram_inti_p0_we_n <= 1'd1; - main_sdram_inti_p0_cas_n <= 1'd1; - main_sdram_inti_p0_ras_n <= 1'd1; - end -end -assign main_sdram_inti_p0_address = main_sdram_phaseinjector0_address_storage; -assign main_sdram_inti_p0_bank = main_sdram_phaseinjector0_baddress_storage; -assign main_sdram_inti_p0_wrdata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[4]); -assign main_sdram_inti_p0_rddata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[5]); -assign main_sdram_inti_p0_wrdata = main_sdram_phaseinjector0_wrdata_storage; -assign main_sdram_inti_p0_wrdata_mask = 1'd0; -always @(*) begin - main_sdram_inti_p1_we_n <= 1'd1; - main_sdram_inti_p1_cas_n <= 1'd1; - main_sdram_inti_p1_cs_n <= 1'd1; - main_sdram_inti_p1_ras_n <= 1'd1; - if (main_sdram_phaseinjector1_command_issue_re) begin - main_sdram_inti_p1_cs_n <= {1{(~main_sdram_phaseinjector1_command_storage[0])}}; - main_sdram_inti_p1_we_n <= (~main_sdram_phaseinjector1_command_storage[1]); - main_sdram_inti_p1_cas_n <= (~main_sdram_phaseinjector1_command_storage[2]); - main_sdram_inti_p1_ras_n <= (~main_sdram_phaseinjector1_command_storage[3]); - end else begin - main_sdram_inti_p1_cs_n <= {1{1'd1}}; - main_sdram_inti_p1_we_n <= 1'd1; - main_sdram_inti_p1_cas_n <= 1'd1; - main_sdram_inti_p1_ras_n <= 1'd1; - end -end -assign main_sdram_inti_p1_address = main_sdram_phaseinjector1_address_storage; -assign main_sdram_inti_p1_bank = main_sdram_phaseinjector1_baddress_storage; -assign main_sdram_inti_p1_wrdata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[4]); -assign main_sdram_inti_p1_rddata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[5]); -assign main_sdram_inti_p1_wrdata = main_sdram_phaseinjector1_wrdata_storage; -assign main_sdram_inti_p1_wrdata_mask = 1'd0; -always @(*) begin - main_sdram_inti_p2_we_n <= 1'd1; - main_sdram_inti_p2_cas_n <= 1'd1; - main_sdram_inti_p2_cs_n <= 1'd1; - main_sdram_inti_p2_ras_n <= 1'd1; - if (main_sdram_phaseinjector2_command_issue_re) begin - main_sdram_inti_p2_cs_n <= {1{(~main_sdram_phaseinjector2_command_storage[0])}}; - main_sdram_inti_p2_we_n <= (~main_sdram_phaseinjector2_command_storage[1]); - main_sdram_inti_p2_cas_n <= (~main_sdram_phaseinjector2_command_storage[2]); - main_sdram_inti_p2_ras_n <= (~main_sdram_phaseinjector2_command_storage[3]); - end else begin - main_sdram_inti_p2_cs_n <= {1{1'd1}}; - main_sdram_inti_p2_we_n <= 1'd1; - main_sdram_inti_p2_cas_n <= 1'd1; - main_sdram_inti_p2_ras_n <= 1'd1; - end -end -assign main_sdram_inti_p2_address = main_sdram_phaseinjector2_address_storage; -assign main_sdram_inti_p2_bank = main_sdram_phaseinjector2_baddress_storage; -assign main_sdram_inti_p2_wrdata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[4]); -assign main_sdram_inti_p2_rddata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[5]); -assign main_sdram_inti_p2_wrdata = main_sdram_phaseinjector2_wrdata_storage; -assign main_sdram_inti_p2_wrdata_mask = 1'd0; -always @(*) begin - main_sdram_inti_p3_we_n <= 1'd1; - main_sdram_inti_p3_cas_n <= 1'd1; - main_sdram_inti_p3_cs_n <= 1'd1; - main_sdram_inti_p3_ras_n <= 1'd1; - if (main_sdram_phaseinjector3_command_issue_re) begin - main_sdram_inti_p3_cs_n <= {1{(~main_sdram_phaseinjector3_command_storage[0])}}; - main_sdram_inti_p3_we_n <= (~main_sdram_phaseinjector3_command_storage[1]); - main_sdram_inti_p3_cas_n <= (~main_sdram_phaseinjector3_command_storage[2]); - main_sdram_inti_p3_ras_n <= (~main_sdram_phaseinjector3_command_storage[3]); - end else begin - main_sdram_inti_p3_cs_n <= {1{1'd1}}; - main_sdram_inti_p3_we_n <= 1'd1; - main_sdram_inti_p3_cas_n <= 1'd1; - main_sdram_inti_p3_ras_n <= 1'd1; - end -end -assign main_sdram_inti_p3_address = main_sdram_phaseinjector3_address_storage; -assign main_sdram_inti_p3_bank = main_sdram_phaseinjector3_baddress_storage; -assign main_sdram_inti_p3_wrdata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[4]); -assign main_sdram_inti_p3_rddata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[5]); -assign main_sdram_inti_p3_wrdata = main_sdram_phaseinjector3_wrdata_storage; -assign main_sdram_inti_p3_wrdata_mask = 1'd0; -assign main_sdram_bankmachine0_req_valid = main_sdram_interface_bank0_valid; -assign main_sdram_interface_bank0_ready = main_sdram_bankmachine0_req_ready; -assign main_sdram_bankmachine0_req_we = main_sdram_interface_bank0_we; -assign main_sdram_bankmachine0_req_addr = main_sdram_interface_bank0_addr; -assign main_sdram_interface_bank0_lock = main_sdram_bankmachine0_req_lock; -assign main_sdram_interface_bank0_wdata_ready = main_sdram_bankmachine0_req_wdata_ready; -assign main_sdram_interface_bank0_rdata_valid = main_sdram_bankmachine0_req_rdata_valid; -assign main_sdram_bankmachine1_req_valid = main_sdram_interface_bank1_valid; -assign main_sdram_interface_bank1_ready = main_sdram_bankmachine1_req_ready; -assign main_sdram_bankmachine1_req_we = main_sdram_interface_bank1_we; -assign main_sdram_bankmachine1_req_addr = main_sdram_interface_bank1_addr; -assign main_sdram_interface_bank1_lock = main_sdram_bankmachine1_req_lock; -assign main_sdram_interface_bank1_wdata_ready = main_sdram_bankmachine1_req_wdata_ready; -assign main_sdram_interface_bank1_rdata_valid = main_sdram_bankmachine1_req_rdata_valid; -assign main_sdram_bankmachine2_req_valid = main_sdram_interface_bank2_valid; -assign main_sdram_interface_bank2_ready = main_sdram_bankmachine2_req_ready; -assign main_sdram_bankmachine2_req_we = main_sdram_interface_bank2_we; -assign main_sdram_bankmachine2_req_addr = main_sdram_interface_bank2_addr; -assign main_sdram_interface_bank2_lock = main_sdram_bankmachine2_req_lock; -assign main_sdram_interface_bank2_wdata_ready = main_sdram_bankmachine2_req_wdata_ready; -assign main_sdram_interface_bank2_rdata_valid = main_sdram_bankmachine2_req_rdata_valid; -assign main_sdram_bankmachine3_req_valid = main_sdram_interface_bank3_valid; -assign main_sdram_interface_bank3_ready = main_sdram_bankmachine3_req_ready; -assign main_sdram_bankmachine3_req_we = main_sdram_interface_bank3_we; -assign main_sdram_bankmachine3_req_addr = main_sdram_interface_bank3_addr; -assign main_sdram_interface_bank3_lock = main_sdram_bankmachine3_req_lock; -assign main_sdram_interface_bank3_wdata_ready = main_sdram_bankmachine3_req_wdata_ready; -assign main_sdram_interface_bank3_rdata_valid = main_sdram_bankmachine3_req_rdata_valid; -assign main_sdram_bankmachine4_req_valid = main_sdram_interface_bank4_valid; -assign main_sdram_interface_bank4_ready = main_sdram_bankmachine4_req_ready; -assign main_sdram_bankmachine4_req_we = main_sdram_interface_bank4_we; -assign main_sdram_bankmachine4_req_addr = main_sdram_interface_bank4_addr; -assign main_sdram_interface_bank4_lock = main_sdram_bankmachine4_req_lock; -assign main_sdram_interface_bank4_wdata_ready = main_sdram_bankmachine4_req_wdata_ready; -assign main_sdram_interface_bank4_rdata_valid = main_sdram_bankmachine4_req_rdata_valid; -assign main_sdram_bankmachine5_req_valid = main_sdram_interface_bank5_valid; -assign main_sdram_interface_bank5_ready = main_sdram_bankmachine5_req_ready; -assign main_sdram_bankmachine5_req_we = main_sdram_interface_bank5_we; -assign main_sdram_bankmachine5_req_addr = main_sdram_interface_bank5_addr; -assign main_sdram_interface_bank5_lock = main_sdram_bankmachine5_req_lock; -assign main_sdram_interface_bank5_wdata_ready = main_sdram_bankmachine5_req_wdata_ready; -assign main_sdram_interface_bank5_rdata_valid = main_sdram_bankmachine5_req_rdata_valid; -assign main_sdram_bankmachine6_req_valid = main_sdram_interface_bank6_valid; -assign main_sdram_interface_bank6_ready = main_sdram_bankmachine6_req_ready; -assign main_sdram_bankmachine6_req_we = main_sdram_interface_bank6_we; -assign main_sdram_bankmachine6_req_addr = main_sdram_interface_bank6_addr; -assign main_sdram_interface_bank6_lock = main_sdram_bankmachine6_req_lock; -assign main_sdram_interface_bank6_wdata_ready = main_sdram_bankmachine6_req_wdata_ready; -assign main_sdram_interface_bank6_rdata_valid = main_sdram_bankmachine6_req_rdata_valid; -assign main_sdram_bankmachine7_req_valid = main_sdram_interface_bank7_valid; -assign main_sdram_interface_bank7_ready = main_sdram_bankmachine7_req_ready; -assign main_sdram_bankmachine7_req_we = main_sdram_interface_bank7_we; -assign main_sdram_bankmachine7_req_addr = main_sdram_interface_bank7_addr; -assign main_sdram_interface_bank7_lock = main_sdram_bankmachine7_req_lock; -assign main_sdram_interface_bank7_wdata_ready = main_sdram_bankmachine7_req_wdata_ready; -assign main_sdram_interface_bank7_rdata_valid = main_sdram_bankmachine7_req_rdata_valid; -assign main_sdram_timer_wait = (~main_sdram_timer_done0); -assign main_sdram_postponer_req_i = main_sdram_timer_done0; -assign main_sdram_wants_refresh = main_sdram_postponer_req_o; -assign main_sdram_wants_zqcs = main_sdram_zqcs_timer_done0; -assign main_sdram_zqcs_timer_wait = (~main_sdram_zqcs_executer_done); -assign main_sdram_timer_done1 = (main_sdram_timer_count1 == 1'd0); -assign main_sdram_timer_done0 = main_sdram_timer_done1; -assign main_sdram_timer_count0 = main_sdram_timer_count1; -assign main_sdram_sequencer_start1 = (main_sdram_sequencer_start0 | (main_sdram_sequencer_count != 1'd0)); -assign main_sdram_sequencer_done0 = (main_sdram_sequencer_done1 & (main_sdram_sequencer_count == 1'd0)); -assign main_sdram_zqcs_timer_done1 = (main_sdram_zqcs_timer_count1 == 1'd0); -assign main_sdram_zqcs_timer_done0 = main_sdram_zqcs_timer_done1; -assign main_sdram_zqcs_timer_count0 = main_sdram_zqcs_timer_count1; -always @(*) begin - main_sdram_cmd_valid <= 1'd0; - builder_refresher_next_state <= 2'd0; - main_sdram_zqcs_executer_start <= 1'd0; - main_sdram_cmd_last <= 1'd0; - main_sdram_sequencer_start0 <= 1'd0; - builder_refresher_next_state <= builder_refresher_state; - case (builder_refresher_state) - 1'd1: begin - main_sdram_cmd_valid <= 1'd1; - if (main_sdram_cmd_ready) begin - main_sdram_sequencer_start0 <= 1'd1; - builder_refresher_next_state <= 2'd2; - end - end - 2'd2: begin - main_sdram_cmd_valid <= 1'd1; - if (main_sdram_sequencer_done0) begin - if (main_sdram_wants_zqcs) begin - main_sdram_zqcs_executer_start <= 1'd1; - builder_refresher_next_state <= 2'd3; - end else begin - main_sdram_cmd_valid <= 1'd0; - main_sdram_cmd_last <= 1'd1; - builder_refresher_next_state <= 1'd0; - end - end - end - 2'd3: begin - main_sdram_cmd_valid <= 1'd1; - if (main_sdram_zqcs_executer_done) begin - main_sdram_cmd_valid <= 1'd0; - main_sdram_cmd_last <= 1'd1; - builder_refresher_next_state <= 1'd0; - end - end - default: begin - if (1'd1) begin - if (main_sdram_wants_refresh) begin - builder_refresher_next_state <= 1'd1; - end - end - end - endcase -end -assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine0_req_valid; -assign main_sdram_bankmachine0_req_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine0_req_we; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine0_req_addr; -assign main_sdram_bankmachine0_cmd_buffer_sink_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine0_cmd_buffer_sink_ready; -assign main_sdram_bankmachine0_cmd_buffer_sink_first = main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; -assign main_sdram_bankmachine0_cmd_buffer_sink_last = main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; -assign main_sdram_bankmachine0_cmd_buffer_sink_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; -assign main_sdram_bankmachine0_cmd_buffer_sink_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; -assign main_sdram_bankmachine0_cmd_buffer_source_ready = (main_sdram_bankmachine0_req_wdata_ready | main_sdram_bankmachine0_req_rdata_valid); -assign main_sdram_bankmachine0_req_lock = (main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine0_cmd_buffer_source_valid); -assign main_sdram_bankmachine0_row_hit = (main_sdram_bankmachine0_row == main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]); -assign main_sdram_bankmachine0_cmd_payload_ba = 1'd0; -always @(*) begin - main_sdram_bankmachine0_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine0_row_col_n_addr_sel) begin - main_sdram_bankmachine0_cmd_payload_a <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine0_cmd_payload_a <= ((main_sdram_bankmachine0_auto_precharge <<< 4'd10) | {main_sdram_bankmachine0_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign main_sdram_bankmachine0_twtpcon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_cmd_payload_is_write); -assign main_sdram_bankmachine0_trccon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); -assign main_sdram_bankmachine0_trascon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); -always @(*) begin - main_sdram_bankmachine0_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine0_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine0_auto_precharge <= (main_sdram_bankmachine0_row_close == 1'd0); - end - end -end -assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din = {main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_first = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_last = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re = main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; -always @(*) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine0_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine0_cmd_buffer_lookahead_produce; - end -end -assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable | main_sdram_bankmachine0_cmd_buffer_lookahead_replace)); -assign main_sdram_bankmachine0_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re); -assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine0_cmd_buffer_lookahead_consume; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout = main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 4'd8); -assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 1'd0); -assign main_sdram_bankmachine0_cmd_buffer_sink_ready = ((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready); -always @(*) begin - main_sdram_bankmachine0_row_open <= 1'd0; - main_sdram_bankmachine0_row_close <= 1'd0; - main_sdram_bankmachine0_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine0_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine0_cmd_payload_we <= 1'd0; - main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine0_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine0_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine0_req_wdata_ready <= 1'd0; - builder_bankmachine0_next_state <= 3'd0; - main_sdram_bankmachine0_req_rdata_valid <= 1'd0; - main_sdram_bankmachine0_refresh_gnt <= 1'd0; - main_sdram_bankmachine0_cmd_valid <= 1'd0; - builder_bankmachine0_next_state <= builder_bankmachine0_state; - case (builder_bankmachine0_state) - 1'd1: begin - if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin - main_sdram_bankmachine0_cmd_valid <= 1'd1; - if (main_sdram_bankmachine0_cmd_ready) begin - builder_bankmachine0_next_state <= 3'd5; - end - main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine0_cmd_payload_we <= 1'd1; - main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine0_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin - builder_bankmachine0_next_state <= 3'd5; - end - main_sdram_bankmachine0_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine0_trccon_ready) begin - main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine0_row_open <= 1'd1; - main_sdram_bankmachine0_cmd_valid <= 1'd1; - main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine0_cmd_ready) begin - builder_bankmachine0_next_state <= 3'd6; - end - main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine0_twtpcon_ready) begin - main_sdram_bankmachine0_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine0_row_close <= 1'd1; - main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine0_refresh_req)) begin - builder_bankmachine0_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine0_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine0_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine0_refresh_req) begin - builder_bankmachine0_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine0_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine0_row_opened) begin - if (main_sdram_bankmachine0_row_hit) begin - main_sdram_bankmachine0_cmd_valid <= 1'd1; - if (main_sdram_bankmachine0_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine0_req_wdata_ready <= main_sdram_bankmachine0_cmd_ready; - main_sdram_bankmachine0_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine0_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine0_req_rdata_valid <= main_sdram_bankmachine0_cmd_ready; - main_sdram_bankmachine0_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine0_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine0_cmd_ready & main_sdram_bankmachine0_auto_precharge)) begin - builder_bankmachine0_next_state <= 2'd2; - end - end else begin - builder_bankmachine0_next_state <= 1'd1; - end - end else begin - builder_bankmachine0_next_state <= 2'd3; - end - end - end - end - endcase -end -assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine1_req_valid; -assign main_sdram_bankmachine1_req_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine1_req_we; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine1_req_addr; -assign main_sdram_bankmachine1_cmd_buffer_sink_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine1_cmd_buffer_sink_ready; -assign main_sdram_bankmachine1_cmd_buffer_sink_first = main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; -assign main_sdram_bankmachine1_cmd_buffer_sink_last = main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; -assign main_sdram_bankmachine1_cmd_buffer_sink_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; -assign main_sdram_bankmachine1_cmd_buffer_sink_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; -assign main_sdram_bankmachine1_cmd_buffer_source_ready = (main_sdram_bankmachine1_req_wdata_ready | main_sdram_bankmachine1_req_rdata_valid); -assign main_sdram_bankmachine1_req_lock = (main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine1_cmd_buffer_source_valid); -assign main_sdram_bankmachine1_row_hit = (main_sdram_bankmachine1_row == main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]); -assign main_sdram_bankmachine1_cmd_payload_ba = 1'd1; -always @(*) begin - main_sdram_bankmachine1_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine1_row_col_n_addr_sel) begin - main_sdram_bankmachine1_cmd_payload_a <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine1_cmd_payload_a <= ((main_sdram_bankmachine1_auto_precharge <<< 4'd10) | {main_sdram_bankmachine1_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign main_sdram_bankmachine1_twtpcon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_cmd_payload_is_write); -assign main_sdram_bankmachine1_trccon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); -assign main_sdram_bankmachine1_trascon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); -always @(*) begin - main_sdram_bankmachine1_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine1_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine1_auto_precharge <= (main_sdram_bankmachine1_row_close == 1'd0); - end - end -end -assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din = {main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_first = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_last = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re = main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; -always @(*) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine1_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine1_cmd_buffer_lookahead_produce; - end -end -assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable | main_sdram_bankmachine1_cmd_buffer_lookahead_replace)); -assign main_sdram_bankmachine1_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re); -assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine1_cmd_buffer_lookahead_consume; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout = main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 4'd8); -assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 1'd0); -assign main_sdram_bankmachine1_cmd_buffer_sink_ready = ((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready); -always @(*) begin - main_sdram_bankmachine1_row_open <= 1'd0; - main_sdram_bankmachine1_row_close <= 1'd0; - main_sdram_bankmachine1_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine1_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine1_cmd_payload_we <= 1'd0; - main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine1_cmd_payload_is_read <= 1'd0; - builder_bankmachine1_next_state <= 3'd0; - main_sdram_bankmachine1_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine1_req_wdata_ready <= 1'd0; - main_sdram_bankmachine1_req_rdata_valid <= 1'd0; - main_sdram_bankmachine1_refresh_gnt <= 1'd0; - main_sdram_bankmachine1_cmd_valid <= 1'd0; - builder_bankmachine1_next_state <= builder_bankmachine1_state; - case (builder_bankmachine1_state) - 1'd1: begin - if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin - main_sdram_bankmachine1_cmd_valid <= 1'd1; - if (main_sdram_bankmachine1_cmd_ready) begin - builder_bankmachine1_next_state <= 3'd5; - end - main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine1_cmd_payload_we <= 1'd1; - main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine1_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin - builder_bankmachine1_next_state <= 3'd5; - end - main_sdram_bankmachine1_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine1_trccon_ready) begin - main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine1_row_open <= 1'd1; - main_sdram_bankmachine1_cmd_valid <= 1'd1; - main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine1_cmd_ready) begin - builder_bankmachine1_next_state <= 3'd6; - end - main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine1_twtpcon_ready) begin - main_sdram_bankmachine1_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine1_row_close <= 1'd1; - main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine1_refresh_req)) begin - builder_bankmachine1_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine1_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine1_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine1_refresh_req) begin - builder_bankmachine1_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine1_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine1_row_opened) begin - if (main_sdram_bankmachine1_row_hit) begin - main_sdram_bankmachine1_cmd_valid <= 1'd1; - if (main_sdram_bankmachine1_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine1_req_wdata_ready <= main_sdram_bankmachine1_cmd_ready; - main_sdram_bankmachine1_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine1_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine1_req_rdata_valid <= main_sdram_bankmachine1_cmd_ready; - main_sdram_bankmachine1_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine1_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine1_cmd_ready & main_sdram_bankmachine1_auto_precharge)) begin - builder_bankmachine1_next_state <= 2'd2; - end - end else begin - builder_bankmachine1_next_state <= 1'd1; - end - end else begin - builder_bankmachine1_next_state <= 2'd3; - end - end - end - end - endcase -end -assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine2_req_valid; -assign main_sdram_bankmachine2_req_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine2_req_we; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine2_req_addr; -assign main_sdram_bankmachine2_cmd_buffer_sink_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine2_cmd_buffer_sink_ready; -assign main_sdram_bankmachine2_cmd_buffer_sink_first = main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; -assign main_sdram_bankmachine2_cmd_buffer_sink_last = main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; -assign main_sdram_bankmachine2_cmd_buffer_sink_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; -assign main_sdram_bankmachine2_cmd_buffer_sink_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; -assign main_sdram_bankmachine2_cmd_buffer_source_ready = (main_sdram_bankmachine2_req_wdata_ready | main_sdram_bankmachine2_req_rdata_valid); -assign main_sdram_bankmachine2_req_lock = (main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine2_cmd_buffer_source_valid); -assign main_sdram_bankmachine2_row_hit = (main_sdram_bankmachine2_row == main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]); -assign main_sdram_bankmachine2_cmd_payload_ba = 2'd2; -always @(*) begin - main_sdram_bankmachine2_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine2_row_col_n_addr_sel) begin - main_sdram_bankmachine2_cmd_payload_a <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine2_cmd_payload_a <= ((main_sdram_bankmachine2_auto_precharge <<< 4'd10) | {main_sdram_bankmachine2_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign main_sdram_bankmachine2_twtpcon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_cmd_payload_is_write); -assign main_sdram_bankmachine2_trccon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); -assign main_sdram_bankmachine2_trascon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); -always @(*) begin - main_sdram_bankmachine2_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine2_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine2_auto_precharge <= (main_sdram_bankmachine2_row_close == 1'd0); - end - end -end -assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din = {main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_first = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_last = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re = main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; -always @(*) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine2_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine2_cmd_buffer_lookahead_produce; - end -end -assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable | main_sdram_bankmachine2_cmd_buffer_lookahead_replace)); -assign main_sdram_bankmachine2_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re); -assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine2_cmd_buffer_lookahead_consume; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout = main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 4'd8); -assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 1'd0); -assign main_sdram_bankmachine2_cmd_buffer_sink_ready = ((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready); -always @(*) begin - main_sdram_bankmachine2_row_open <= 1'd0; - main_sdram_bankmachine2_row_close <= 1'd0; - main_sdram_bankmachine2_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine2_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine2_cmd_payload_we <= 1'd0; - main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd0; - builder_bankmachine2_next_state <= 3'd0; - main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine2_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine2_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine2_req_wdata_ready <= 1'd0; - main_sdram_bankmachine2_req_rdata_valid <= 1'd0; - main_sdram_bankmachine2_refresh_gnt <= 1'd0; - main_sdram_bankmachine2_cmd_valid <= 1'd0; - builder_bankmachine2_next_state <= builder_bankmachine2_state; - case (builder_bankmachine2_state) - 1'd1: begin - if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin - main_sdram_bankmachine2_cmd_valid <= 1'd1; - if (main_sdram_bankmachine2_cmd_ready) begin - builder_bankmachine2_next_state <= 3'd5; - end - main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine2_cmd_payload_we <= 1'd1; - main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine2_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin - builder_bankmachine2_next_state <= 3'd5; - end - main_sdram_bankmachine2_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine2_trccon_ready) begin - main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine2_row_open <= 1'd1; - main_sdram_bankmachine2_cmd_valid <= 1'd1; - main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine2_cmd_ready) begin - builder_bankmachine2_next_state <= 3'd6; - end - main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine2_twtpcon_ready) begin - main_sdram_bankmachine2_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine2_row_close <= 1'd1; - main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine2_refresh_req)) begin - builder_bankmachine2_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine2_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine2_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine2_refresh_req) begin - builder_bankmachine2_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine2_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine2_row_opened) begin - if (main_sdram_bankmachine2_row_hit) begin - main_sdram_bankmachine2_cmd_valid <= 1'd1; - if (main_sdram_bankmachine2_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine2_req_wdata_ready <= main_sdram_bankmachine2_cmd_ready; - main_sdram_bankmachine2_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine2_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine2_req_rdata_valid <= main_sdram_bankmachine2_cmd_ready; - main_sdram_bankmachine2_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine2_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine2_cmd_ready & main_sdram_bankmachine2_auto_precharge)) begin - builder_bankmachine2_next_state <= 2'd2; - end - end else begin - builder_bankmachine2_next_state <= 1'd1; - end - end else begin - builder_bankmachine2_next_state <= 2'd3; - end - end - end - end - endcase -end -assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine3_req_valid; -assign main_sdram_bankmachine3_req_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine3_req_we; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine3_req_addr; -assign main_sdram_bankmachine3_cmd_buffer_sink_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine3_cmd_buffer_sink_ready; -assign main_sdram_bankmachine3_cmd_buffer_sink_first = main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; -assign main_sdram_bankmachine3_cmd_buffer_sink_last = main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; -assign main_sdram_bankmachine3_cmd_buffer_sink_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; -assign main_sdram_bankmachine3_cmd_buffer_sink_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; -assign main_sdram_bankmachine3_cmd_buffer_source_ready = (main_sdram_bankmachine3_req_wdata_ready | main_sdram_bankmachine3_req_rdata_valid); -assign main_sdram_bankmachine3_req_lock = (main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine3_cmd_buffer_source_valid); -assign main_sdram_bankmachine3_row_hit = (main_sdram_bankmachine3_row == main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]); -assign main_sdram_bankmachine3_cmd_payload_ba = 2'd3; -always @(*) begin - main_sdram_bankmachine3_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine3_row_col_n_addr_sel) begin - main_sdram_bankmachine3_cmd_payload_a <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine3_cmd_payload_a <= ((main_sdram_bankmachine3_auto_precharge <<< 4'd10) | {main_sdram_bankmachine3_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign main_sdram_bankmachine3_twtpcon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_cmd_payload_is_write); -assign main_sdram_bankmachine3_trccon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); -assign main_sdram_bankmachine3_trascon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); -always @(*) begin - main_sdram_bankmachine3_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine3_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine3_auto_precharge <= (main_sdram_bankmachine3_row_close == 1'd0); - end - end -end -assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din = {main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_first = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_last = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re = main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; -always @(*) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine3_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine3_cmd_buffer_lookahead_produce; - end -end -assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable | main_sdram_bankmachine3_cmd_buffer_lookahead_replace)); -assign main_sdram_bankmachine3_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re); -assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine3_cmd_buffer_lookahead_consume; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout = main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 4'd8); -assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 1'd0); -assign main_sdram_bankmachine3_cmd_buffer_sink_ready = ((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready); -always @(*) begin - main_sdram_bankmachine3_row_open <= 1'd0; - main_sdram_bankmachine3_row_close <= 1'd0; - main_sdram_bankmachine3_cmd_payload_cas <= 1'd0; - builder_bankmachine3_next_state <= 3'd0; - main_sdram_bankmachine3_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine3_cmd_payload_we <= 1'd0; - main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine3_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine3_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine3_req_wdata_ready <= 1'd0; - main_sdram_bankmachine3_req_rdata_valid <= 1'd0; - main_sdram_bankmachine3_refresh_gnt <= 1'd0; - main_sdram_bankmachine3_cmd_valid <= 1'd0; - builder_bankmachine3_next_state <= builder_bankmachine3_state; - case (builder_bankmachine3_state) - 1'd1: begin - if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin - main_sdram_bankmachine3_cmd_valid <= 1'd1; - if (main_sdram_bankmachine3_cmd_ready) begin - builder_bankmachine3_next_state <= 3'd5; - end - main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine3_cmd_payload_we <= 1'd1; - main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine3_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin - builder_bankmachine3_next_state <= 3'd5; - end - main_sdram_bankmachine3_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine3_trccon_ready) begin - main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine3_row_open <= 1'd1; - main_sdram_bankmachine3_cmd_valid <= 1'd1; - main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine3_cmd_ready) begin - builder_bankmachine3_next_state <= 3'd6; - end - main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine3_twtpcon_ready) begin - main_sdram_bankmachine3_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine3_row_close <= 1'd1; - main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine3_refresh_req)) begin - builder_bankmachine3_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine3_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine3_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine3_refresh_req) begin - builder_bankmachine3_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine3_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine3_row_opened) begin - if (main_sdram_bankmachine3_row_hit) begin - main_sdram_bankmachine3_cmd_valid <= 1'd1; - if (main_sdram_bankmachine3_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine3_req_wdata_ready <= main_sdram_bankmachine3_cmd_ready; - main_sdram_bankmachine3_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine3_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine3_req_rdata_valid <= main_sdram_bankmachine3_cmd_ready; - main_sdram_bankmachine3_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine3_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine3_cmd_ready & main_sdram_bankmachine3_auto_precharge)) begin - builder_bankmachine3_next_state <= 2'd2; - end - end else begin - builder_bankmachine3_next_state <= 1'd1; - end - end else begin - builder_bankmachine3_next_state <= 2'd3; - end - end - end - end - endcase -end -assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine4_req_valid; -assign main_sdram_bankmachine4_req_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine4_req_we; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine4_req_addr; -assign main_sdram_bankmachine4_cmd_buffer_sink_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine4_cmd_buffer_sink_ready; -assign main_sdram_bankmachine4_cmd_buffer_sink_first = main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; -assign main_sdram_bankmachine4_cmd_buffer_sink_last = main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; -assign main_sdram_bankmachine4_cmd_buffer_sink_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; -assign main_sdram_bankmachine4_cmd_buffer_sink_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; -assign main_sdram_bankmachine4_cmd_buffer_source_ready = (main_sdram_bankmachine4_req_wdata_ready | main_sdram_bankmachine4_req_rdata_valid); -assign main_sdram_bankmachine4_req_lock = (main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine4_cmd_buffer_source_valid); -assign main_sdram_bankmachine4_row_hit = (main_sdram_bankmachine4_row == main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]); -assign main_sdram_bankmachine4_cmd_payload_ba = 3'd4; -always @(*) begin - main_sdram_bankmachine4_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine4_row_col_n_addr_sel) begin - main_sdram_bankmachine4_cmd_payload_a <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine4_cmd_payload_a <= ((main_sdram_bankmachine4_auto_precharge <<< 4'd10) | {main_sdram_bankmachine4_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign main_sdram_bankmachine4_twtpcon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_cmd_payload_is_write); -assign main_sdram_bankmachine4_trccon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); -assign main_sdram_bankmachine4_trascon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); -always @(*) begin - main_sdram_bankmachine4_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine4_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine4_auto_precharge <= (main_sdram_bankmachine4_row_close == 1'd0); - end - end -end -assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din = {main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_first = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_last = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re = main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; -always @(*) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine4_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine4_cmd_buffer_lookahead_produce; - end -end -assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable | main_sdram_bankmachine4_cmd_buffer_lookahead_replace)); -assign main_sdram_bankmachine4_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re); -assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine4_cmd_buffer_lookahead_consume; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout = main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 4'd8); -assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 1'd0); -assign main_sdram_bankmachine4_cmd_buffer_sink_ready = ((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready); -always @(*) begin - main_sdram_bankmachine4_row_open <= 1'd0; - main_sdram_bankmachine4_row_close <= 1'd0; - builder_bankmachine4_next_state <= 3'd0; - main_sdram_bankmachine4_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine4_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine4_cmd_payload_we <= 1'd0; - main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine4_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine4_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine4_req_wdata_ready <= 1'd0; - main_sdram_bankmachine4_req_rdata_valid <= 1'd0; - main_sdram_bankmachine4_refresh_gnt <= 1'd0; - main_sdram_bankmachine4_cmd_valid <= 1'd0; - builder_bankmachine4_next_state <= builder_bankmachine4_state; - case (builder_bankmachine4_state) - 1'd1: begin - if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin - main_sdram_bankmachine4_cmd_valid <= 1'd1; - if (main_sdram_bankmachine4_cmd_ready) begin - builder_bankmachine4_next_state <= 3'd5; - end - main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine4_cmd_payload_we <= 1'd1; - main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine4_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin - builder_bankmachine4_next_state <= 3'd5; - end - main_sdram_bankmachine4_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine4_trccon_ready) begin - main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine4_row_open <= 1'd1; - main_sdram_bankmachine4_cmd_valid <= 1'd1; - main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine4_cmd_ready) begin - builder_bankmachine4_next_state <= 3'd6; - end - main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine4_twtpcon_ready) begin - main_sdram_bankmachine4_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine4_row_close <= 1'd1; - main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine4_refresh_req)) begin - builder_bankmachine4_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine4_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine4_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine4_refresh_req) begin - builder_bankmachine4_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine4_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine4_row_opened) begin - if (main_sdram_bankmachine4_row_hit) begin - main_sdram_bankmachine4_cmd_valid <= 1'd1; - if (main_sdram_bankmachine4_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine4_req_wdata_ready <= main_sdram_bankmachine4_cmd_ready; - main_sdram_bankmachine4_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine4_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine4_req_rdata_valid <= main_sdram_bankmachine4_cmd_ready; - main_sdram_bankmachine4_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine4_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine4_cmd_ready & main_sdram_bankmachine4_auto_precharge)) begin - builder_bankmachine4_next_state <= 2'd2; - end - end else begin - builder_bankmachine4_next_state <= 1'd1; - end - end else begin - builder_bankmachine4_next_state <= 2'd3; - end - end - end - end - endcase -end -assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine5_req_valid; -assign main_sdram_bankmachine5_req_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine5_req_we; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine5_req_addr; -assign main_sdram_bankmachine5_cmd_buffer_sink_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine5_cmd_buffer_sink_ready; -assign main_sdram_bankmachine5_cmd_buffer_sink_first = main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; -assign main_sdram_bankmachine5_cmd_buffer_sink_last = main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; -assign main_sdram_bankmachine5_cmd_buffer_sink_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; -assign main_sdram_bankmachine5_cmd_buffer_sink_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; -assign main_sdram_bankmachine5_cmd_buffer_source_ready = (main_sdram_bankmachine5_req_wdata_ready | main_sdram_bankmachine5_req_rdata_valid); -assign main_sdram_bankmachine5_req_lock = (main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine5_cmd_buffer_source_valid); -assign main_sdram_bankmachine5_row_hit = (main_sdram_bankmachine5_row == main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]); -assign main_sdram_bankmachine5_cmd_payload_ba = 3'd5; -always @(*) begin - main_sdram_bankmachine5_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine5_row_col_n_addr_sel) begin - main_sdram_bankmachine5_cmd_payload_a <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine5_cmd_payload_a <= ((main_sdram_bankmachine5_auto_precharge <<< 4'd10) | {main_sdram_bankmachine5_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign main_sdram_bankmachine5_twtpcon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_cmd_payload_is_write); -assign main_sdram_bankmachine5_trccon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); -assign main_sdram_bankmachine5_trascon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); -always @(*) begin - main_sdram_bankmachine5_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine5_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine5_auto_precharge <= (main_sdram_bankmachine5_row_close == 1'd0); - end - end -end -assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din = {main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_first = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_last = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re = main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; -always @(*) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine5_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine5_cmd_buffer_lookahead_produce; - end -end -assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable | main_sdram_bankmachine5_cmd_buffer_lookahead_replace)); -assign main_sdram_bankmachine5_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re); -assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine5_cmd_buffer_lookahead_consume; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout = main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 4'd8); -assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 1'd0); -assign main_sdram_bankmachine5_cmd_buffer_sink_ready = ((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready); -always @(*) begin - builder_bankmachine5_next_state <= 3'd0; - main_sdram_bankmachine5_row_open <= 1'd0; - main_sdram_bankmachine5_row_close <= 1'd0; - main_sdram_bankmachine5_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine5_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine5_cmd_payload_we <= 1'd0; - main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine5_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine5_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine5_req_wdata_ready <= 1'd0; - main_sdram_bankmachine5_req_rdata_valid <= 1'd0; - main_sdram_bankmachine5_refresh_gnt <= 1'd0; - main_sdram_bankmachine5_cmd_valid <= 1'd0; - builder_bankmachine5_next_state <= builder_bankmachine5_state; - case (builder_bankmachine5_state) - 1'd1: begin - if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin - main_sdram_bankmachine5_cmd_valid <= 1'd1; - if (main_sdram_bankmachine5_cmd_ready) begin - builder_bankmachine5_next_state <= 3'd5; - end - main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine5_cmd_payload_we <= 1'd1; - main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine5_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin - builder_bankmachine5_next_state <= 3'd5; - end - main_sdram_bankmachine5_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine5_trccon_ready) begin - main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine5_row_open <= 1'd1; - main_sdram_bankmachine5_cmd_valid <= 1'd1; - main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine5_cmd_ready) begin - builder_bankmachine5_next_state <= 3'd6; - end - main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine5_twtpcon_ready) begin - main_sdram_bankmachine5_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine5_row_close <= 1'd1; - main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine5_refresh_req)) begin - builder_bankmachine5_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine5_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine5_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine5_refresh_req) begin - builder_bankmachine5_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine5_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine5_row_opened) begin - if (main_sdram_bankmachine5_row_hit) begin - main_sdram_bankmachine5_cmd_valid <= 1'd1; - if (main_sdram_bankmachine5_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine5_req_wdata_ready <= main_sdram_bankmachine5_cmd_ready; - main_sdram_bankmachine5_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine5_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine5_req_rdata_valid <= main_sdram_bankmachine5_cmd_ready; - main_sdram_bankmachine5_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine5_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine5_cmd_ready & main_sdram_bankmachine5_auto_precharge)) begin - builder_bankmachine5_next_state <= 2'd2; - end - end else begin - builder_bankmachine5_next_state <= 1'd1; - end - end else begin - builder_bankmachine5_next_state <= 2'd3; - end - end - end - end - endcase -end -assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine6_req_valid; -assign main_sdram_bankmachine6_req_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine6_req_we; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine6_req_addr; -assign main_sdram_bankmachine6_cmd_buffer_sink_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine6_cmd_buffer_sink_ready; -assign main_sdram_bankmachine6_cmd_buffer_sink_first = main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; -assign main_sdram_bankmachine6_cmd_buffer_sink_last = main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; -assign main_sdram_bankmachine6_cmd_buffer_sink_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; -assign main_sdram_bankmachine6_cmd_buffer_sink_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; -assign main_sdram_bankmachine6_cmd_buffer_source_ready = (main_sdram_bankmachine6_req_wdata_ready | main_sdram_bankmachine6_req_rdata_valid); -assign main_sdram_bankmachine6_req_lock = (main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine6_cmd_buffer_source_valid); -assign main_sdram_bankmachine6_row_hit = (main_sdram_bankmachine6_row == main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]); -assign main_sdram_bankmachine6_cmd_payload_ba = 3'd6; -always @(*) begin - main_sdram_bankmachine6_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine6_row_col_n_addr_sel) begin - main_sdram_bankmachine6_cmd_payload_a <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine6_cmd_payload_a <= ((main_sdram_bankmachine6_auto_precharge <<< 4'd10) | {main_sdram_bankmachine6_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign main_sdram_bankmachine6_twtpcon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_cmd_payload_is_write); -assign main_sdram_bankmachine6_trccon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); -assign main_sdram_bankmachine6_trascon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); -always @(*) begin - main_sdram_bankmachine6_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine6_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine6_auto_precharge <= (main_sdram_bankmachine6_row_close == 1'd0); - end - end -end -assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din = {main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_first = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_last = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re = main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; -always @(*) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine6_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine6_cmd_buffer_lookahead_produce; - end -end -assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable | main_sdram_bankmachine6_cmd_buffer_lookahead_replace)); -assign main_sdram_bankmachine6_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re); -assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine6_cmd_buffer_lookahead_consume; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout = main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 4'd8); -assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 1'd0); -assign main_sdram_bankmachine6_cmd_buffer_sink_ready = ((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready); -always @(*) begin - main_sdram_bankmachine6_row_open <= 1'd0; - main_sdram_bankmachine6_row_close <= 1'd0; - main_sdram_bankmachine6_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine6_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine6_cmd_payload_we <= 1'd0; - main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine6_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine6_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine6_req_wdata_ready <= 1'd0; - main_sdram_bankmachine6_req_rdata_valid <= 1'd0; - main_sdram_bankmachine6_refresh_gnt <= 1'd0; - main_sdram_bankmachine6_cmd_valid <= 1'd0; - builder_bankmachine6_next_state <= 3'd0; - builder_bankmachine6_next_state <= builder_bankmachine6_state; - case (builder_bankmachine6_state) - 1'd1: begin - if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin - main_sdram_bankmachine6_cmd_valid <= 1'd1; - if (main_sdram_bankmachine6_cmd_ready) begin - builder_bankmachine6_next_state <= 3'd5; - end - main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine6_cmd_payload_we <= 1'd1; - main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine6_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin - builder_bankmachine6_next_state <= 3'd5; - end - main_sdram_bankmachine6_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine6_trccon_ready) begin - main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine6_row_open <= 1'd1; - main_sdram_bankmachine6_cmd_valid <= 1'd1; - main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine6_cmd_ready) begin - builder_bankmachine6_next_state <= 3'd6; - end - main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine6_twtpcon_ready) begin - main_sdram_bankmachine6_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine6_row_close <= 1'd1; - main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine6_refresh_req)) begin - builder_bankmachine6_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine6_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine6_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine6_refresh_req) begin - builder_bankmachine6_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine6_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine6_row_opened) begin - if (main_sdram_bankmachine6_row_hit) begin - main_sdram_bankmachine6_cmd_valid <= 1'd1; - if (main_sdram_bankmachine6_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine6_req_wdata_ready <= main_sdram_bankmachine6_cmd_ready; - main_sdram_bankmachine6_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine6_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine6_req_rdata_valid <= main_sdram_bankmachine6_cmd_ready; - main_sdram_bankmachine6_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine6_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine6_cmd_ready & main_sdram_bankmachine6_auto_precharge)) begin - builder_bankmachine6_next_state <= 2'd2; - end - end else begin - builder_bankmachine6_next_state <= 1'd1; - end - end else begin - builder_bankmachine6_next_state <= 2'd3; - end - end - end - end - endcase -end -assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine7_req_valid; -assign main_sdram_bankmachine7_req_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine7_req_we; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine7_req_addr; -assign main_sdram_bankmachine7_cmd_buffer_sink_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine7_cmd_buffer_sink_ready; -assign main_sdram_bankmachine7_cmd_buffer_sink_first = main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; -assign main_sdram_bankmachine7_cmd_buffer_sink_last = main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; -assign main_sdram_bankmachine7_cmd_buffer_sink_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; -assign main_sdram_bankmachine7_cmd_buffer_sink_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; -assign main_sdram_bankmachine7_cmd_buffer_source_ready = (main_sdram_bankmachine7_req_wdata_ready | main_sdram_bankmachine7_req_rdata_valid); -assign main_sdram_bankmachine7_req_lock = (main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine7_cmd_buffer_source_valid); -assign main_sdram_bankmachine7_row_hit = (main_sdram_bankmachine7_row == main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]); -assign main_sdram_bankmachine7_cmd_payload_ba = 3'd7; -always @(*) begin - main_sdram_bankmachine7_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine7_row_col_n_addr_sel) begin - main_sdram_bankmachine7_cmd_payload_a <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine7_cmd_payload_a <= ((main_sdram_bankmachine7_auto_precharge <<< 4'd10) | {main_sdram_bankmachine7_cmd_buffer_source_payload_addr[6:0], {3{1'd0}}}); - end -end -assign main_sdram_bankmachine7_twtpcon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_cmd_payload_is_write); -assign main_sdram_bankmachine7_trccon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); -assign main_sdram_bankmachine7_trascon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); -always @(*) begin - main_sdram_bankmachine7_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine7_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine7_auto_precharge <= (main_sdram_bankmachine7_row_close == 1'd0); - end - end -end -assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din = {main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we}; -assign {main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_first = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_last = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re = main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; -always @(*) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine7_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine7_cmd_buffer_lookahead_produce; - end -end -assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable | main_sdram_bankmachine7_cmd_buffer_lookahead_replace)); -assign main_sdram_bankmachine7_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re); -assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine7_cmd_buffer_lookahead_consume; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout = main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 4'd8); -assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 1'd0); -assign main_sdram_bankmachine7_cmd_buffer_sink_ready = ((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready); -always @(*) begin - main_sdram_bankmachine7_row_open <= 1'd0; - main_sdram_bankmachine7_row_close <= 1'd0; - main_sdram_bankmachine7_refresh_gnt <= 1'd0; - main_sdram_bankmachine7_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine7_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine7_cmd_payload_we <= 1'd0; - main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine7_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine7_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine7_req_wdata_ready <= 1'd0; - main_sdram_bankmachine7_req_rdata_valid <= 1'd0; - builder_bankmachine7_next_state <= 3'd0; - main_sdram_bankmachine7_cmd_valid <= 1'd0; - builder_bankmachine7_next_state <= builder_bankmachine7_state; - case (builder_bankmachine7_state) - 1'd1: begin - if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin - main_sdram_bankmachine7_cmd_valid <= 1'd1; - if (main_sdram_bankmachine7_cmd_ready) begin - builder_bankmachine7_next_state <= 3'd5; - end - main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine7_cmd_payload_we <= 1'd1; - main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine7_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin - builder_bankmachine7_next_state <= 3'd5; - end - main_sdram_bankmachine7_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine7_trccon_ready) begin - main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine7_row_open <= 1'd1; - main_sdram_bankmachine7_cmd_valid <= 1'd1; - main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine7_cmd_ready) begin - builder_bankmachine7_next_state <= 3'd6; - end - main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine7_twtpcon_ready) begin - main_sdram_bankmachine7_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine7_row_close <= 1'd1; - main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine7_refresh_req)) begin - builder_bankmachine7_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine7_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine7_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine7_refresh_req) begin - builder_bankmachine7_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine7_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine7_row_opened) begin - if (main_sdram_bankmachine7_row_hit) begin - main_sdram_bankmachine7_cmd_valid <= 1'd1; - if (main_sdram_bankmachine7_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine7_req_wdata_ready <= main_sdram_bankmachine7_cmd_ready; - main_sdram_bankmachine7_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine7_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine7_req_rdata_valid <= main_sdram_bankmachine7_cmd_ready; - main_sdram_bankmachine7_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine7_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine7_cmd_ready & main_sdram_bankmachine7_auto_precharge)) begin - builder_bankmachine7_next_state <= 2'd2; - end - end else begin - builder_bankmachine7_next_state <= 1'd1; - end - end else begin - builder_bankmachine7_next_state <= 2'd3; - end - end - end - end - endcase -end -assign main_sdram_trrdcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); -assign main_sdram_tfawcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); -assign main_sdram_ras_allowed = (main_sdram_trrdcon_ready & main_sdram_tfawcon_ready); -assign main_sdram_tccdcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_cmd_payload_is_write | main_sdram_choose_req_cmd_payload_is_read)); -assign main_sdram_cas_allowed = main_sdram_tccdcon_ready; -assign main_sdram_twtrcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); -assign main_sdram_read_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_read) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_read)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_read)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_read)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_read)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_read)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_read)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_read)); -assign main_sdram_write_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_write) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_write)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_write)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_write)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_write)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_write)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_write)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_write)); -assign main_sdram_max_time0 = (main_sdram_time0 == 1'd0); -assign main_sdram_max_time1 = (main_sdram_time1 == 1'd0); -assign main_sdram_bankmachine0_refresh_req = main_sdram_cmd_valid; -assign main_sdram_bankmachine1_refresh_req = main_sdram_cmd_valid; -assign main_sdram_bankmachine2_refresh_req = main_sdram_cmd_valid; -assign main_sdram_bankmachine3_refresh_req = main_sdram_cmd_valid; -assign main_sdram_bankmachine4_refresh_req = main_sdram_cmd_valid; -assign main_sdram_bankmachine5_refresh_req = main_sdram_cmd_valid; -assign main_sdram_bankmachine6_refresh_req = main_sdram_cmd_valid; -assign main_sdram_bankmachine7_refresh_req = main_sdram_cmd_valid; -assign main_sdram_go_to_refresh = (((((((main_sdram_bankmachine0_refresh_gnt & main_sdram_bankmachine1_refresh_gnt) & main_sdram_bankmachine2_refresh_gnt) & main_sdram_bankmachine3_refresh_gnt) & main_sdram_bankmachine4_refresh_gnt) & main_sdram_bankmachine5_refresh_gnt) & main_sdram_bankmachine6_refresh_gnt) & main_sdram_bankmachine7_refresh_gnt); -assign main_sdram_interface_rdata = {main_sdram_dfi_p3_rddata, main_sdram_dfi_p2_rddata, main_sdram_dfi_p1_rddata, main_sdram_dfi_p0_rddata}; -assign {main_sdram_dfi_p3_wrdata, main_sdram_dfi_p2_wrdata, main_sdram_dfi_p1_wrdata, main_sdram_dfi_p0_wrdata} = main_sdram_interface_wdata; -assign {main_sdram_dfi_p3_wrdata_mask, main_sdram_dfi_p2_wrdata_mask, main_sdram_dfi_p1_wrdata_mask, main_sdram_dfi_p0_wrdata_mask} = (~main_sdram_interface_wdata_we); -always @(*) begin - main_sdram_choose_cmd_valids <= 8'd0; - main_sdram_choose_cmd_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); -end -assign main_sdram_choose_cmd_request = main_sdram_choose_cmd_valids; -assign main_sdram_choose_cmd_cmd_valid = builder_rhs_array_muxed0; -assign main_sdram_choose_cmd_cmd_payload_a = builder_rhs_array_muxed1; -assign main_sdram_choose_cmd_cmd_payload_ba = builder_rhs_array_muxed2; -assign main_sdram_choose_cmd_cmd_payload_is_read = builder_rhs_array_muxed3; -assign main_sdram_choose_cmd_cmd_payload_is_write = builder_rhs_array_muxed4; -assign main_sdram_choose_cmd_cmd_payload_is_cmd = builder_rhs_array_muxed5; -always @(*) begin - main_sdram_choose_cmd_cmd_payload_cas <= 1'd0; - if (main_sdram_choose_cmd_cmd_valid) begin - main_sdram_choose_cmd_cmd_payload_cas <= builder_t_array_muxed0; - end -end -always @(*) begin - main_sdram_choose_cmd_cmd_payload_ras <= 1'd0; - if (main_sdram_choose_cmd_cmd_valid) begin - main_sdram_choose_cmd_cmd_payload_ras <= builder_t_array_muxed1; - end -end -always @(*) begin - main_sdram_choose_cmd_cmd_payload_we <= 1'd0; - if (main_sdram_choose_cmd_cmd_valid) begin - main_sdram_choose_cmd_cmd_payload_we <= builder_t_array_muxed2; - end -end -assign main_sdram_choose_cmd_ce = (main_sdram_choose_cmd_cmd_ready | (~main_sdram_choose_cmd_cmd_valid)); -always @(*) begin - main_sdram_choose_req_valids <= 8'd0; - main_sdram_choose_req_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); -end -assign main_sdram_choose_req_request = main_sdram_choose_req_valids; -assign main_sdram_choose_req_cmd_valid = builder_rhs_array_muxed6; -assign main_sdram_choose_req_cmd_payload_a = builder_rhs_array_muxed7; -assign main_sdram_choose_req_cmd_payload_ba = builder_rhs_array_muxed8; -assign main_sdram_choose_req_cmd_payload_is_read = builder_rhs_array_muxed9; -assign main_sdram_choose_req_cmd_payload_is_write = builder_rhs_array_muxed10; -assign main_sdram_choose_req_cmd_payload_is_cmd = builder_rhs_array_muxed11; -always @(*) begin - main_sdram_choose_req_cmd_payload_cas <= 1'd0; - if (main_sdram_choose_req_cmd_valid) begin - main_sdram_choose_req_cmd_payload_cas <= builder_t_array_muxed3; - end -end -always @(*) begin - main_sdram_choose_req_cmd_payload_ras <= 1'd0; - if (main_sdram_choose_req_cmd_valid) begin - main_sdram_choose_req_cmd_payload_ras <= builder_t_array_muxed4; - end -end -always @(*) begin - main_sdram_choose_req_cmd_payload_we <= 1'd0; - if (main_sdram_choose_req_cmd_valid) begin - main_sdram_choose_req_cmd_payload_we <= builder_t_array_muxed5; - end -end -always @(*) begin - main_sdram_bankmachine0_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd0))) begin - main_sdram_bankmachine0_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd0))) begin - main_sdram_bankmachine0_cmd_ready <= 1'd1; - end -end -always @(*) begin - main_sdram_bankmachine1_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd1))) begin - main_sdram_bankmachine1_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd1))) begin - main_sdram_bankmachine1_cmd_ready <= 1'd1; - end -end -always @(*) begin - main_sdram_bankmachine2_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd2))) begin - main_sdram_bankmachine2_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd2))) begin - main_sdram_bankmachine2_cmd_ready <= 1'd1; - end -end -always @(*) begin - main_sdram_bankmachine3_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd3))) begin - main_sdram_bankmachine3_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd3))) begin - main_sdram_bankmachine3_cmd_ready <= 1'd1; - end -end -always @(*) begin - main_sdram_bankmachine4_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd4))) begin - main_sdram_bankmachine4_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd4))) begin - main_sdram_bankmachine4_cmd_ready <= 1'd1; - end -end -always @(*) begin - main_sdram_bankmachine5_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd5))) begin - main_sdram_bankmachine5_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd5))) begin - main_sdram_bankmachine5_cmd_ready <= 1'd1; - end -end -always @(*) begin - main_sdram_bankmachine6_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd6))) begin - main_sdram_bankmachine6_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd6))) begin - main_sdram_bankmachine6_cmd_ready <= 1'd1; - end -end -always @(*) begin - main_sdram_bankmachine7_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd7))) begin - main_sdram_bankmachine7_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd7))) begin - main_sdram_bankmachine7_cmd_ready <= 1'd1; - end -end -assign main_sdram_choose_req_ce = (main_sdram_choose_req_cmd_ready | (~main_sdram_choose_req_cmd_valid)); -assign main_sdram_dfi_p0_reset_n = 1'd1; -assign main_sdram_dfi_p0_cke = {1{main_sdram_steerer0}}; -assign main_sdram_dfi_p0_odt = {1{main_sdram_steerer1}}; -assign main_sdram_dfi_p1_reset_n = 1'd1; -assign main_sdram_dfi_p1_cke = {1{main_sdram_steerer2}}; -assign main_sdram_dfi_p1_odt = {1{main_sdram_steerer3}}; -assign main_sdram_dfi_p2_reset_n = 1'd1; -assign main_sdram_dfi_p2_cke = {1{main_sdram_steerer4}}; -assign main_sdram_dfi_p2_odt = {1{main_sdram_steerer5}}; -assign main_sdram_dfi_p3_reset_n = 1'd1; -assign main_sdram_dfi_p3_cke = {1{main_sdram_steerer6}}; -assign main_sdram_dfi_p3_odt = {1{main_sdram_steerer7}}; -assign main_sdram_tfawcon_count = (((main_sdram_tfawcon_window[0] + main_sdram_tfawcon_window[1]) + main_sdram_tfawcon_window[2]) + main_sdram_tfawcon_window[3]); -always @(*) begin - main_sdram_choose_req_cmd_ready <= 1'd0; - main_sdram_steerer_sel0 <= 2'd0; - main_sdram_steerer_sel1 <= 2'd0; - main_sdram_steerer_sel2 <= 2'd0; - main_sdram_choose_cmd_want_activates <= 1'd0; - main_sdram_en0 <= 1'd0; - main_sdram_steerer_sel3 <= 2'd0; - builder_multiplexer_next_state <= 4'd0; - main_sdram_choose_cmd_cmd_ready <= 1'd0; - main_sdram_choose_req_want_reads <= 1'd0; - main_sdram_cmd_ready <= 1'd0; - main_sdram_choose_req_want_writes <= 1'd0; - main_sdram_en1 <= 1'd0; - builder_multiplexer_next_state <= builder_multiplexer_state; - case (builder_multiplexer_state) - 1'd1: begin - main_sdram_en1 <= 1'd1; - main_sdram_choose_req_want_writes <= 1'd1; - if (1'd0) begin - main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); - end else begin - main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; - main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); - main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; - end - main_sdram_steerer_sel0 <= 1'd0; - main_sdram_steerer_sel1 <= 1'd0; - main_sdram_steerer_sel2 <= 1'd1; - main_sdram_steerer_sel3 <= 2'd2; - if (main_sdram_read_available) begin - if (((~main_sdram_write_available) | main_sdram_max_time1)) begin - builder_multiplexer_next_state <= 2'd3; - end - end - if (main_sdram_go_to_refresh) begin - builder_multiplexer_next_state <= 2'd2; - end - end - 2'd2: begin - main_sdram_steerer_sel0 <= 2'd3; - main_sdram_cmd_ready <= 1'd1; - if (main_sdram_cmd_last) begin - builder_multiplexer_next_state <= 1'd0; - end - end - 2'd3: begin - if (main_sdram_twtrcon_ready) begin - builder_multiplexer_next_state <= 1'd0; - end - end - 3'd4: begin - builder_multiplexer_next_state <= 3'd5; - end - 3'd5: begin - builder_multiplexer_next_state <= 3'd6; - end - 3'd6: begin - builder_multiplexer_next_state <= 3'd7; - end - 3'd7: begin - builder_multiplexer_next_state <= 4'd8; - end - 4'd8: begin - builder_multiplexer_next_state <= 4'd9; - end - 4'd9: begin - builder_multiplexer_next_state <= 4'd10; - end - 4'd10: begin - builder_multiplexer_next_state <= 4'd11; - end - 4'd11: begin - builder_multiplexer_next_state <= 1'd1; - end - default: begin - main_sdram_en0 <= 1'd1; - main_sdram_choose_req_want_reads <= 1'd1; - if (1'd0) begin - main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); - end else begin - main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; - main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); - main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; - end - main_sdram_steerer_sel0 <= 1'd0; - main_sdram_steerer_sel1 <= 1'd1; - main_sdram_steerer_sel2 <= 2'd2; - main_sdram_steerer_sel3 <= 1'd0; - if (main_sdram_write_available) begin - if (((~main_sdram_read_available) | main_sdram_max_time0)) begin - builder_multiplexer_next_state <= 3'd4; - end - end - if (main_sdram_go_to_refresh) begin - builder_multiplexer_next_state <= 2'd2; - end - end - endcase -end -assign builder_roundrobin0_request = {(((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; -assign builder_roundrobin0_ce = ((~main_sdram_interface_bank0_valid) & (~main_sdram_interface_bank0_lock)); -assign main_sdram_interface_bank0_addr = builder_rhs_array_muxed12; -assign main_sdram_interface_bank0_we = builder_rhs_array_muxed13; -assign main_sdram_interface_bank0_valid = builder_rhs_array_muxed14; -assign builder_roundrobin1_request = {(((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; -assign builder_roundrobin1_ce = ((~main_sdram_interface_bank1_valid) & (~main_sdram_interface_bank1_lock)); -assign main_sdram_interface_bank1_addr = builder_rhs_array_muxed15; -assign main_sdram_interface_bank1_we = builder_rhs_array_muxed16; -assign main_sdram_interface_bank1_valid = builder_rhs_array_muxed17; -assign builder_roundrobin2_request = {(((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; -assign builder_roundrobin2_ce = ((~main_sdram_interface_bank2_valid) & (~main_sdram_interface_bank2_lock)); -assign main_sdram_interface_bank2_addr = builder_rhs_array_muxed18; -assign main_sdram_interface_bank2_we = builder_rhs_array_muxed19; -assign main_sdram_interface_bank2_valid = builder_rhs_array_muxed20; -assign builder_roundrobin3_request = {(((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; -assign builder_roundrobin3_ce = ((~main_sdram_interface_bank3_valid) & (~main_sdram_interface_bank3_lock)); -assign main_sdram_interface_bank3_addr = builder_rhs_array_muxed21; -assign main_sdram_interface_bank3_we = builder_rhs_array_muxed22; -assign main_sdram_interface_bank3_valid = builder_rhs_array_muxed23; -assign builder_roundrobin4_request = {(((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; -assign builder_roundrobin4_ce = ((~main_sdram_interface_bank4_valid) & (~main_sdram_interface_bank4_lock)); -assign main_sdram_interface_bank4_addr = builder_rhs_array_muxed24; -assign main_sdram_interface_bank4_we = builder_rhs_array_muxed25; -assign main_sdram_interface_bank4_valid = builder_rhs_array_muxed26; -assign builder_roundrobin5_request = {(((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; -assign builder_roundrobin5_ce = ((~main_sdram_interface_bank5_valid) & (~main_sdram_interface_bank5_lock)); -assign main_sdram_interface_bank5_addr = builder_rhs_array_muxed27; -assign main_sdram_interface_bank5_we = builder_rhs_array_muxed28; -assign main_sdram_interface_bank5_valid = builder_rhs_array_muxed29; -assign builder_roundrobin6_request = {(((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid)}; -assign builder_roundrobin6_ce = ((~main_sdram_interface_bank6_valid) & (~main_sdram_interface_bank6_lock)); -assign main_sdram_interface_bank6_addr = builder_rhs_array_muxed30; -assign main_sdram_interface_bank6_we = builder_rhs_array_muxed31; -assign main_sdram_interface_bank6_valid = builder_rhs_array_muxed32; -assign builder_roundrobin7_request = {(((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid)}; -assign builder_roundrobin7_ce = ((~main_sdram_interface_bank7_valid) & (~main_sdram_interface_bank7_lock)); -assign main_sdram_interface_bank7_addr = builder_rhs_array_muxed33; -assign main_sdram_interface_bank7_we = builder_rhs_array_muxed34; -assign main_sdram_interface_bank7_valid = builder_rhs_array_muxed35; -assign main_port_cmd_ready = ((((((((1'd0 | (((builder_roundrobin0_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank0_ready)) | (((builder_roundrobin1_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank1_ready)) | (((builder_roundrobin2_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank2_ready)) | (((builder_roundrobin3_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank3_ready)) | (((builder_roundrobin4_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank4_ready)) | (((builder_roundrobin5_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank5_ready)) | (((builder_roundrobin6_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank6_ready)) | (((builder_roundrobin7_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0)))))) & main_sdram_interface_bank7_ready)); -assign main_port_wdata_ready = builder_new_master_wdata_ready2; -assign main_port_rdata_valid = builder_new_master_rdata_valid9; -always @(*) begin - main_sdram_interface_wdata <= 128'd0; - main_sdram_interface_wdata_we <= 16'd0; - case ({builder_new_master_wdata_ready2}) - 1'd1: begin - main_sdram_interface_wdata <= main_port_wdata_payload_data; - main_sdram_interface_wdata_we <= main_port_wdata_payload_we; - end - default: begin - main_sdram_interface_wdata <= 1'd0; - main_sdram_interface_wdata_we <= 1'd0; - end - endcase -end -assign main_port_rdata_payload_data = main_sdram_interface_rdata; -assign builder_roundrobin0_grant = 1'd0; -assign builder_roundrobin1_grant = 1'd0; -assign builder_roundrobin2_grant = 1'd0; -assign builder_roundrobin3_grant = 1'd0; -assign builder_roundrobin4_grant = 1'd0; -assign builder_roundrobin5_grant = 1'd0; -assign builder_roundrobin6_grant = 1'd0; -assign builder_roundrobin7_grant = 1'd0; -assign main_data_port_adr = main_interface0_wb_sdram_adr[10:2]; -always @(*) begin - main_data_port_we <= 16'd0; - main_data_port_dat_w <= 128'd0; - if (main_write_from_slave) begin - main_data_port_dat_w <= main_dat_r; - main_data_port_we <= {16{1'd1}}; - end else begin - main_data_port_dat_w <= {4{main_interface0_wb_sdram_dat_w}}; - if ((((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb) & main_interface0_wb_sdram_we) & main_interface0_wb_sdram_ack)) begin - main_data_port_we <= {({4{(main_interface0_wb_sdram_adr[1:0] == 1'd0)}} & main_interface0_wb_sdram_sel), ({4{(main_interface0_wb_sdram_adr[1:0] == 1'd1)}} & main_interface0_wb_sdram_sel), ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd2)}} & main_interface0_wb_sdram_sel), ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd3)}} & main_interface0_wb_sdram_sel)}; - end - end -end -assign main_dat_w = main_data_port_dat_r; -assign main_sel = 16'd65535; -always @(*) begin - main_interface0_wb_sdram_dat_r <= 32'd0; - case (main_adr_offset_r) - 1'd0: begin - main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[127:96]; - end - 1'd1: begin - main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[95:64]; - end - 2'd2: begin - main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[63:32]; - end - default: begin - main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[31:0]; - end - endcase -end -assign {main_tag_do_dirty, main_tag_do_tag} = main_tag_port_dat_r; -assign main_tag_port_dat_w = {main_tag_di_dirty, main_tag_di_tag}; -assign main_tag_port_adr = main_interface0_wb_sdram_adr[10:2]; -assign main_tag_di_tag = main_interface0_wb_sdram_adr[29:11]; -assign main_adr = {main_tag_do_tag, main_interface0_wb_sdram_adr[10:2]}; -always @(*) begin - main_tag_di_dirty <= 1'd0; - main_interface0_wb_sdram_ack <= 1'd0; - main_word_clr <= 1'd0; - main_word_inc <= 1'd0; - main_write_from_slave <= 1'd0; - main_cyc <= 1'd0; - main_stb <= 1'd0; - main_tag_port_we <= 1'd0; - main_we <= 1'd0; - builder_fullmemorywe_next_state <= 2'd0; - builder_fullmemorywe_next_state <= builder_fullmemorywe_state; - case (builder_fullmemorywe_state) - 1'd1: begin - main_word_clr <= 1'd1; - if ((main_tag_do_tag == main_interface0_wb_sdram_adr[29:11])) begin - main_interface0_wb_sdram_ack <= 1'd1; - if (main_interface0_wb_sdram_we) begin - main_tag_di_dirty <= 1'd1; - main_tag_port_we <= 1'd1; - end - builder_fullmemorywe_next_state <= 1'd0; - end else begin - if (main_tag_do_dirty) begin - builder_fullmemorywe_next_state <= 2'd2; - end else begin - main_tag_port_we <= 1'd1; - main_word_clr <= 1'd1; - builder_fullmemorywe_next_state <= 2'd3; - end - end - end - 2'd2: begin - main_stb <= 1'd1; - main_cyc <= 1'd1; - main_we <= 1'd1; - if (main_ack) begin - main_word_inc <= 1'd1; - if (1'd1) begin - main_tag_port_we <= 1'd1; - main_word_clr <= 1'd1; - builder_fullmemorywe_next_state <= 2'd3; - end - end - end - 2'd3: begin - main_stb <= 1'd1; - main_cyc <= 1'd1; - main_we <= 1'd0; - if (main_ack) begin - main_write_from_slave <= 1'd1; - main_word_inc <= 1'd1; - if (1'd1) begin - builder_fullmemorywe_next_state <= 1'd1; - end else begin - builder_fullmemorywe_next_state <= 2'd3; - end - end - end - default: begin - if ((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb)) begin - builder_fullmemorywe_next_state <= 1'd1; - end - end - endcase -end -assign main_wdata_converter_sink_valid = ((main_cyc & main_stb) & main_we); -assign main_wdata_converter_sink_payload_data = main_dat_w; -assign main_wdata_converter_sink_payload_we = main_sel; -assign main_port_wdata_valid = main_wdata_converter_source_valid; -assign main_wdata_converter_source_ready = main_port_wdata_ready; -assign main_port_wdata_first = main_wdata_converter_source_first; -assign main_port_wdata_last = main_wdata_converter_source_last; -assign main_port_wdata_payload_data = main_wdata_converter_source_payload_data; -assign main_port_wdata_payload_we = main_wdata_converter_source_payload_we; -assign main_rdata_converter_sink_valid = main_port_rdata_valid; -assign main_port_rdata_ready = main_rdata_converter_sink_ready; -assign main_rdata_converter_sink_first = main_port_rdata_first; -assign main_rdata_converter_sink_last = main_port_rdata_last; -assign main_rdata_converter_sink_payload_data = main_port_rdata_payload_data; -assign main_rdata_converter_source_ready = 1'd1; -assign main_dat_r = main_rdata_converter_source_payload_data; -assign main_wdata_converter_converter_sink_valid = main_wdata_converter_sink_valid; -assign main_wdata_converter_converter_sink_first = main_wdata_converter_sink_first; -assign main_wdata_converter_converter_sink_last = main_wdata_converter_sink_last; -assign main_wdata_converter_sink_ready = main_wdata_converter_converter_sink_ready; -assign main_wdata_converter_converter_sink_payload_data = {main_wdata_converter_sink_payload_we, main_wdata_converter_sink_payload_data}; -assign main_wdata_converter_source_valid = main_wdata_converter_source_source_valid; -assign main_wdata_converter_source_first = main_wdata_converter_source_source_first; -assign main_wdata_converter_source_last = main_wdata_converter_source_source_last; -assign main_wdata_converter_source_source_ready = main_wdata_converter_source_ready; -assign {main_wdata_converter_source_payload_we, main_wdata_converter_source_payload_data} = main_wdata_converter_source_source_payload_data; -assign main_wdata_converter_source_source_valid = main_wdata_converter_converter_source_valid; -assign main_wdata_converter_converter_source_ready = main_wdata_converter_source_source_ready; -assign main_wdata_converter_source_source_first = main_wdata_converter_converter_source_first; -assign main_wdata_converter_source_source_last = main_wdata_converter_converter_source_last; -assign main_wdata_converter_source_source_payload_data = main_wdata_converter_converter_source_payload_data; -assign main_wdata_converter_converter_source_valid = main_wdata_converter_converter_sink_valid; -assign main_wdata_converter_converter_sink_ready = main_wdata_converter_converter_source_ready; -assign main_wdata_converter_converter_source_first = main_wdata_converter_converter_sink_first; -assign main_wdata_converter_converter_source_last = main_wdata_converter_converter_sink_last; -assign main_wdata_converter_converter_source_payload_data = main_wdata_converter_converter_sink_payload_data; -assign main_wdata_converter_converter_source_payload_valid_token_count = 1'd1; -assign main_rdata_converter_converter_sink_valid = main_rdata_converter_sink_valid; -assign main_rdata_converter_converter_sink_first = main_rdata_converter_sink_first; -assign main_rdata_converter_converter_sink_last = main_rdata_converter_sink_last; -assign main_rdata_converter_sink_ready = main_rdata_converter_converter_sink_ready; -assign main_rdata_converter_converter_sink_payload_data = {main_rdata_converter_sink_payload_data}; -assign main_rdata_converter_source_valid = main_rdata_converter_source_source_valid; -assign main_rdata_converter_source_first = main_rdata_converter_source_source_first; -assign main_rdata_converter_source_last = main_rdata_converter_source_source_last; -assign main_rdata_converter_source_source_ready = main_rdata_converter_source_ready; -assign {main_rdata_converter_source_payload_data} = main_rdata_converter_source_source_payload_data; -assign main_rdata_converter_source_source_valid = main_rdata_converter_converter_source_valid; -assign main_rdata_converter_converter_source_ready = main_rdata_converter_source_source_ready; -assign main_rdata_converter_source_source_first = main_rdata_converter_converter_source_first; -assign main_rdata_converter_source_source_last = main_rdata_converter_converter_source_last; -assign main_rdata_converter_source_source_payload_data = main_rdata_converter_converter_source_payload_data; -assign main_rdata_converter_converter_source_valid = main_rdata_converter_converter_sink_valid; -assign main_rdata_converter_converter_sink_ready = main_rdata_converter_converter_source_ready; -assign main_rdata_converter_converter_source_first = main_rdata_converter_converter_sink_first; -assign main_rdata_converter_converter_source_last = main_rdata_converter_converter_sink_last; -assign main_rdata_converter_converter_source_payload_data = main_rdata_converter_converter_sink_payload_data; -assign main_rdata_converter_converter_source_payload_valid_token_count = 1'd1; -always @(*) begin - builder_litedramwishbone2native_next_state <= 2'd0; - main_ack <= 1'd0; - main_port_cmd_payload_we <= 1'd0; - main_port_cmd_payload_addr <= 24'd0; - main_count_next_value <= 1'd0; - main_count_next_value_ce <= 1'd0; - main_port_cmd_valid <= 1'd0; - builder_litedramwishbone2native_next_state <= builder_litedramwishbone2native_state; - case (builder_litedramwishbone2native_state) - 1'd1: begin - if (main_wdata_converter_sink_ready) begin - main_ack <= 1'd1; - builder_litedramwishbone2native_next_state <= 1'd0; - end - end - 2'd2: begin - if (main_rdata_converter_source_valid) begin - main_ack <= 1'd1; - builder_litedramwishbone2native_next_state <= 1'd0; - end - end - default: begin - main_port_cmd_valid <= (main_cyc & main_stb); - main_port_cmd_payload_we <= main_we; - main_port_cmd_payload_addr <= (((main_adr * 1'd1) + main_count) - 1'd0); - if ((main_port_cmd_valid & main_port_cmd_ready)) begin - main_count_next_value <= (main_count + 1'd1); - main_count_next_value_ce <= 1'd1; - if ((main_count == 1'd0)) begin - main_count_next_value <= 1'd0; - main_count_next_value_ce <= 1'd1; - if (main_we) begin - builder_litedramwishbone2native_next_state <= 1'd1; - end else begin - builder_litedramwishbone2native_next_state <= 2'd2; - end - end - end - end - endcase -end -assign main_interface0_wb_sdram_adr = builder_rhs_array_muxed36; -assign main_interface0_wb_sdram_dat_w = builder_rhs_array_muxed37; -assign main_interface0_wb_sdram_sel = builder_rhs_array_muxed38; -assign main_interface0_wb_sdram_cyc = builder_rhs_array_muxed39; -assign main_interface0_wb_sdram_stb = builder_rhs_array_muxed40; -assign main_interface0_wb_sdram_we = builder_rhs_array_muxed41; -assign main_interface0_wb_sdram_cti = builder_rhs_array_muxed42; -assign main_interface0_wb_sdram_bte = builder_rhs_array_muxed43; -assign main_interface1_wb_sdram_dat_r = main_interface0_wb_sdram_dat_r; -assign main_interface1_wb_sdram_ack = (main_interface0_wb_sdram_ack & (builder_wb_sdram_con_grant == 1'd0)); -assign main_interface1_wb_sdram_err = (main_interface0_wb_sdram_err & (builder_wb_sdram_con_grant == 1'd0)); -assign builder_wb_sdram_con_request = {main_interface1_wb_sdram_cyc}; -assign builder_wb_sdram_con_grant = 1'd0; -assign builder_minsoc_shared_adr = builder_rhs_array_muxed44; -assign builder_minsoc_shared_dat_w = builder_rhs_array_muxed45; -assign builder_minsoc_shared_sel = builder_rhs_array_muxed46; -assign builder_minsoc_shared_cyc = builder_rhs_array_muxed47; -assign builder_minsoc_shared_stb = builder_rhs_array_muxed48; -assign builder_minsoc_shared_we = builder_rhs_array_muxed49; -assign builder_minsoc_shared_cti = builder_rhs_array_muxed50; -assign builder_minsoc_shared_bte = builder_rhs_array_muxed51; -assign main_minsoc_interface0_soc_bus_dat_r = builder_minsoc_shared_dat_r; -assign main_minsoc_interface1_soc_bus_dat_r = builder_minsoc_shared_dat_r; -assign main_minsoc_interface0_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd0)); -assign main_minsoc_interface1_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd1)); -assign main_minsoc_interface0_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd0)); -assign main_minsoc_interface1_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd1)); -assign builder_minsoc_request = {main_minsoc_interface1_soc_bus_cyc, main_minsoc_interface0_soc_bus_cyc}; -always @(*) begin - builder_minsoc_slave_sel <= 4'd0; - builder_minsoc_slave_sel[0] <= (builder_minsoc_shared_adr[28:13] == 1'd0); - builder_minsoc_slave_sel[1] <= (builder_minsoc_shared_adr[28:10] == 13'd4096); - builder_minsoc_slave_sel[2] <= (builder_minsoc_shared_adr[28:14] == 10'd512); - builder_minsoc_slave_sel[3] <= (builder_minsoc_shared_adr[28:26] == 3'd4); -end -assign main_minsoc_rom_bus_adr = builder_minsoc_shared_adr; -assign main_minsoc_rom_bus_dat_w = builder_minsoc_shared_dat_w; -assign main_minsoc_rom_bus_sel = builder_minsoc_shared_sel; -assign main_minsoc_rom_bus_stb = builder_minsoc_shared_stb; -assign main_minsoc_rom_bus_we = builder_minsoc_shared_we; -assign main_minsoc_rom_bus_cti = builder_minsoc_shared_cti; -assign main_minsoc_rom_bus_bte = builder_minsoc_shared_bte; -assign main_minsoc_sram_bus_adr = builder_minsoc_shared_adr; -assign main_minsoc_sram_bus_dat_w = builder_minsoc_shared_dat_w; -assign main_minsoc_sram_bus_sel = builder_minsoc_shared_sel; -assign main_minsoc_sram_bus_stb = builder_minsoc_shared_stb; -assign main_minsoc_sram_bus_we = builder_minsoc_shared_we; -assign main_minsoc_sram_bus_cti = builder_minsoc_shared_cti; -assign main_minsoc_sram_bus_bte = builder_minsoc_shared_bte; -assign main_minsoc_bus_wishbone_adr = builder_minsoc_shared_adr; -assign main_minsoc_bus_wishbone_dat_w = builder_minsoc_shared_dat_w; -assign main_minsoc_bus_wishbone_sel = builder_minsoc_shared_sel; -assign main_minsoc_bus_wishbone_stb = builder_minsoc_shared_stb; -assign main_minsoc_bus_wishbone_we = builder_minsoc_shared_we; -assign main_minsoc_bus_wishbone_cti = builder_minsoc_shared_cti; -assign main_minsoc_bus_wishbone_bte = builder_minsoc_shared_bte; -assign main_interface1_wb_sdram_adr = builder_minsoc_shared_adr; -assign main_interface1_wb_sdram_dat_w = builder_minsoc_shared_dat_w; -assign main_interface1_wb_sdram_sel = builder_minsoc_shared_sel; -assign main_interface1_wb_sdram_stb = builder_minsoc_shared_stb; -assign main_interface1_wb_sdram_we = builder_minsoc_shared_we; -assign main_interface1_wb_sdram_cti = builder_minsoc_shared_cti; -assign main_interface1_wb_sdram_bte = builder_minsoc_shared_bte; -assign main_minsoc_rom_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[0]); -assign main_minsoc_sram_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[1]); -assign main_minsoc_bus_wishbone_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[2]); -assign main_interface1_wb_sdram_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[3]); -assign builder_minsoc_shared_err = (((main_minsoc_rom_bus_err | main_minsoc_sram_bus_err) | main_minsoc_bus_wishbone_err) | main_interface1_wb_sdram_err); -assign builder_minsoc_wait = ((builder_minsoc_shared_stb & builder_minsoc_shared_cyc) & (~builder_minsoc_shared_ack)); -always @(*) begin - builder_minsoc_shared_ack <= 1'd0; - builder_minsoc_error <= 1'd0; - builder_minsoc_shared_dat_r <= 32'd0; - builder_minsoc_shared_ack <= (((main_minsoc_rom_bus_ack | main_minsoc_sram_bus_ack) | main_minsoc_bus_wishbone_ack) | main_interface1_wb_sdram_ack); - builder_minsoc_shared_dat_r <= (((({32{builder_minsoc_slave_sel_r[0]}} & main_minsoc_rom_bus_dat_r) | ({32{builder_minsoc_slave_sel_r[1]}} & main_minsoc_sram_bus_dat_r)) | ({32{builder_minsoc_slave_sel_r[2]}} & main_minsoc_bus_wishbone_dat_r)) | ({32{builder_minsoc_slave_sel_r[3]}} & main_interface1_wb_sdram_dat_r)); - if (builder_minsoc_done) begin - builder_minsoc_shared_dat_r <= 32'd4294967295; - builder_minsoc_shared_ack <= 1'd1; - builder_minsoc_error <= 1'd1; - end -end -assign builder_minsoc_done = (builder_minsoc_count == 1'd0); -assign builder_minsoc_csrbank0_sel = (builder_minsoc_interface0_bank_bus_adr[13:9] == 1'd0); -assign builder_minsoc_csrbank0_reset0_r = builder_minsoc_interface0_bank_bus_dat_w[0]; -assign builder_minsoc_csrbank0_reset0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); -assign builder_minsoc_csrbank0_reset0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); -assign builder_minsoc_csrbank0_scratch3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank0_scratch3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); -assign builder_minsoc_csrbank0_scratch3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); -assign builder_minsoc_csrbank0_scratch2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank0_scratch2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); -assign builder_minsoc_csrbank0_scratch2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); -assign builder_minsoc_csrbank0_scratch1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank0_scratch1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); -assign builder_minsoc_csrbank0_scratch1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); -assign builder_minsoc_csrbank0_scratch0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank0_scratch0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); -assign builder_minsoc_csrbank0_scratch0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); -assign builder_minsoc_csrbank0_bus_errors3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank0_bus_errors3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); -assign builder_minsoc_csrbank0_bus_errors3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); -assign builder_minsoc_csrbank0_bus_errors2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank0_bus_errors2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); -assign builder_minsoc_csrbank0_bus_errors2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); -assign builder_minsoc_csrbank0_bus_errors1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank0_bus_errors1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); -assign builder_minsoc_csrbank0_bus_errors1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); -assign builder_minsoc_csrbank0_bus_errors0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank0_bus_errors0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); -assign builder_minsoc_csrbank0_bus_errors0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); -assign builder_minsoc_csrbank0_reset0_w = main_minsoc_ctrl_reset_storage; -assign builder_minsoc_csrbank0_scratch3_w = main_minsoc_ctrl_scratch_storage[31:24]; -assign builder_minsoc_csrbank0_scratch2_w = main_minsoc_ctrl_scratch_storage[23:16]; -assign builder_minsoc_csrbank0_scratch1_w = main_minsoc_ctrl_scratch_storage[15:8]; -assign builder_minsoc_csrbank0_scratch0_w = main_minsoc_ctrl_scratch_storage[7:0]; -assign builder_minsoc_csrbank0_bus_errors3_w = main_minsoc_ctrl_bus_errors_status[31:24]; -assign builder_minsoc_csrbank0_bus_errors2_w = main_minsoc_ctrl_bus_errors_status[23:16]; -assign builder_minsoc_csrbank0_bus_errors1_w = main_minsoc_ctrl_bus_errors_status[15:8]; -assign builder_minsoc_csrbank0_bus_errors0_w = main_minsoc_ctrl_bus_errors_status[7:0]; -assign main_minsoc_ctrl_bus_errors_we = builder_minsoc_csrbank0_bus_errors0_we; -assign builder_minsoc_csrbank1_sel = (builder_minsoc_interface1_bank_bus_adr[13:9] == 3'd5); -assign builder_minsoc_csrbank1_half_sys8x_taps0_r = builder_minsoc_interface1_bank_bus_dat_w[4:0]; -assign builder_minsoc_csrbank1_half_sys8x_taps0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); -assign builder_minsoc_csrbank1_half_sys8x_taps0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); -assign main_a7ddrphy_cdly_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; -assign main_a7ddrphy_cdly_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); -assign main_a7ddrphy_cdly_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); -assign main_a7ddrphy_cdly_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; -assign main_a7ddrphy_cdly_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); -assign main_a7ddrphy_cdly_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); -assign builder_minsoc_csrbank1_dly_sel0_r = builder_minsoc_interface1_bank_bus_dat_w[1:0]; -assign builder_minsoc_csrbank1_dly_sel0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); -assign builder_minsoc_csrbank1_dly_sel0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); -assign main_a7ddrphy_rdly_dq_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; -assign main_a7ddrphy_rdly_dq_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); -assign main_a7ddrphy_rdly_dq_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); -assign main_a7ddrphy_rdly_dq_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; -assign main_a7ddrphy_rdly_dq_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); -assign main_a7ddrphy_rdly_dq_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); -assign main_a7ddrphy_rdly_dq_bitslip_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; -assign main_a7ddrphy_rdly_dq_bitslip_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); -assign main_a7ddrphy_rdly_dq_bitslip_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); -assign main_a7ddrphy_rdly_dq_bitslip_r = builder_minsoc_interface1_bank_bus_dat_w[0]; -assign main_a7ddrphy_rdly_dq_bitslip_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); -assign main_a7ddrphy_rdly_dq_bitslip_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); -assign builder_minsoc_csrbank1_half_sys8x_taps0_w = main_a7ddrphy_half_sys8x_taps_storage[4:0]; -assign builder_minsoc_csrbank1_dly_sel0_w = main_a7ddrphy_dly_sel_storage[1:0]; -assign builder_minsoc_csrbank2_sel = (builder_minsoc_interface2_bank_bus_adr[13:9] == 4'd8); -assign builder_minsoc_csrbank2_dfii_control0_r = builder_minsoc_interface2_bank_bus_dat_w[3:0]; -assign builder_minsoc_csrbank2_dfii_control0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); -assign builder_minsoc_csrbank2_dfii_control0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); -assign builder_minsoc_csrbank2_dfii_pi0_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; -assign builder_minsoc_csrbank2_dfii_pi0_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); -assign builder_minsoc_csrbank2_dfii_pi0_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); -assign main_sdram_phaseinjector0_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; -assign main_sdram_phaseinjector0_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); -assign main_sdram_phaseinjector0_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); -assign builder_minsoc_csrbank2_dfii_pi0_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; -assign builder_minsoc_csrbank2_dfii_pi0_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); -assign builder_minsoc_csrbank2_dfii_pi0_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); -assign builder_minsoc_csrbank2_dfii_pi0_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); -assign builder_minsoc_csrbank2_dfii_pi0_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); -assign builder_minsoc_csrbank2_dfii_pi0_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; -assign builder_minsoc_csrbank2_dfii_pi0_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); -assign builder_minsoc_csrbank2_dfii_pi0_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); -assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); -assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); -assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); -assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); -assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); -assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); -assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); -assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); -assign builder_minsoc_csrbank2_dfii_pi0_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); -assign builder_minsoc_csrbank2_dfii_pi0_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); -assign builder_minsoc_csrbank2_dfii_pi0_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); -assign builder_minsoc_csrbank2_dfii_pi0_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); -assign builder_minsoc_csrbank2_dfii_pi0_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); -assign builder_minsoc_csrbank2_dfii_pi0_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); -assign builder_minsoc_csrbank2_dfii_pi0_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); -assign builder_minsoc_csrbank2_dfii_pi0_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); -assign builder_minsoc_csrbank2_dfii_pi1_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; -assign builder_minsoc_csrbank2_dfii_pi1_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); -assign builder_minsoc_csrbank2_dfii_pi1_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); -assign main_sdram_phaseinjector1_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; -assign main_sdram_phaseinjector1_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); -assign main_sdram_phaseinjector1_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); -assign builder_minsoc_csrbank2_dfii_pi1_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; -assign builder_minsoc_csrbank2_dfii_pi1_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); -assign builder_minsoc_csrbank2_dfii_pi1_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); -assign builder_minsoc_csrbank2_dfii_pi1_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); -assign builder_minsoc_csrbank2_dfii_pi1_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); -assign builder_minsoc_csrbank2_dfii_pi1_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; -assign builder_minsoc_csrbank2_dfii_pi1_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); -assign builder_minsoc_csrbank2_dfii_pi1_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); -assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); -assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); -assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); -assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); -assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); -assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); -assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); -assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); -assign builder_minsoc_csrbank2_dfii_pi1_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); -assign builder_minsoc_csrbank2_dfii_pi1_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); -assign builder_minsoc_csrbank2_dfii_pi1_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); -assign builder_minsoc_csrbank2_dfii_pi1_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); -assign builder_minsoc_csrbank2_dfii_pi1_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); -assign builder_minsoc_csrbank2_dfii_pi1_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); -assign builder_minsoc_csrbank2_dfii_pi1_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); -assign builder_minsoc_csrbank2_dfii_pi1_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); -assign builder_minsoc_csrbank2_dfii_pi2_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; -assign builder_minsoc_csrbank2_dfii_pi2_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); -assign builder_minsoc_csrbank2_dfii_pi2_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); -assign main_sdram_phaseinjector2_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; -assign main_sdram_phaseinjector2_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); -assign main_sdram_phaseinjector2_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); -assign builder_minsoc_csrbank2_dfii_pi2_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; -assign builder_minsoc_csrbank2_dfii_pi2_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); -assign builder_minsoc_csrbank2_dfii_pi2_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); -assign builder_minsoc_csrbank2_dfii_pi2_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); -assign builder_minsoc_csrbank2_dfii_pi2_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); -assign builder_minsoc_csrbank2_dfii_pi2_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; -assign builder_minsoc_csrbank2_dfii_pi2_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); -assign builder_minsoc_csrbank2_dfii_pi2_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); -assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); -assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); -assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); -assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); -assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); -assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); -assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); -assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); -assign builder_minsoc_csrbank2_dfii_pi2_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); -assign builder_minsoc_csrbank2_dfii_pi2_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); -assign builder_minsoc_csrbank2_dfii_pi2_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); -assign builder_minsoc_csrbank2_dfii_pi2_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); -assign builder_minsoc_csrbank2_dfii_pi2_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); -assign builder_minsoc_csrbank2_dfii_pi2_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); -assign builder_minsoc_csrbank2_dfii_pi2_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); -assign builder_minsoc_csrbank2_dfii_pi2_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); -assign builder_minsoc_csrbank2_dfii_pi3_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; -assign builder_minsoc_csrbank2_dfii_pi3_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); -assign builder_minsoc_csrbank2_dfii_pi3_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); -assign main_sdram_phaseinjector3_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; -assign main_sdram_phaseinjector3_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); -assign main_sdram_phaseinjector3_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); -assign builder_minsoc_csrbank2_dfii_pi3_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; -assign builder_minsoc_csrbank2_dfii_pi3_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); -assign builder_minsoc_csrbank2_dfii_pi3_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); -assign builder_minsoc_csrbank2_dfii_pi3_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); -assign builder_minsoc_csrbank2_dfii_pi3_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); -assign builder_minsoc_csrbank2_dfii_pi3_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; -assign builder_minsoc_csrbank2_dfii_pi3_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); -assign builder_minsoc_csrbank2_dfii_pi3_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); -assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); -assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); -assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); -assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); -assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); -assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); -assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); -assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); -assign builder_minsoc_csrbank2_dfii_pi3_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); -assign builder_minsoc_csrbank2_dfii_pi3_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); -assign builder_minsoc_csrbank2_dfii_pi3_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); -assign builder_minsoc_csrbank2_dfii_pi3_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); -assign builder_minsoc_csrbank2_dfii_pi3_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); -assign builder_minsoc_csrbank2_dfii_pi3_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); -assign builder_minsoc_csrbank2_dfii_pi3_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); -assign builder_minsoc_csrbank2_dfii_pi3_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); -assign builder_minsoc_csrbank2_dfii_control0_w = main_sdram_storage[3:0]; -assign builder_minsoc_csrbank2_dfii_pi0_command0_w = main_sdram_phaseinjector0_command_storage[5:0]; -assign builder_minsoc_csrbank2_dfii_pi0_address1_w = main_sdram_phaseinjector0_address_storage[13:8]; -assign builder_minsoc_csrbank2_dfii_pi0_address0_w = main_sdram_phaseinjector0_address_storage[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_baddress0_w = main_sdram_phaseinjector0_baddress_storage[2:0]; -assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_w = main_sdram_phaseinjector0_wrdata_storage[31:24]; -assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_w = main_sdram_phaseinjector0_wrdata_storage[23:16]; -assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_w = main_sdram_phaseinjector0_wrdata_storage[15:8]; -assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_w = main_sdram_phaseinjector0_wrdata_storage[7:0]; -assign builder_minsoc_csrbank2_dfii_pi0_rddata3_w = main_sdram_phaseinjector0_status[31:24]; -assign builder_minsoc_csrbank2_dfii_pi0_rddata2_w = main_sdram_phaseinjector0_status[23:16]; -assign builder_minsoc_csrbank2_dfii_pi0_rddata1_w = main_sdram_phaseinjector0_status[15:8]; -assign builder_minsoc_csrbank2_dfii_pi0_rddata0_w = main_sdram_phaseinjector0_status[7:0]; -assign main_sdram_phaseinjector0_we = builder_minsoc_csrbank2_dfii_pi0_rddata0_we; -assign builder_minsoc_csrbank2_dfii_pi1_command0_w = main_sdram_phaseinjector1_command_storage[5:0]; -assign builder_minsoc_csrbank2_dfii_pi1_address1_w = main_sdram_phaseinjector1_address_storage[13:8]; -assign builder_minsoc_csrbank2_dfii_pi1_address0_w = main_sdram_phaseinjector1_address_storage[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_baddress0_w = main_sdram_phaseinjector1_baddress_storage[2:0]; -assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_w = main_sdram_phaseinjector1_wrdata_storage[31:24]; -assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_w = main_sdram_phaseinjector1_wrdata_storage[23:16]; -assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_w = main_sdram_phaseinjector1_wrdata_storage[15:8]; -assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_w = main_sdram_phaseinjector1_wrdata_storage[7:0]; -assign builder_minsoc_csrbank2_dfii_pi1_rddata3_w = main_sdram_phaseinjector1_status[31:24]; -assign builder_minsoc_csrbank2_dfii_pi1_rddata2_w = main_sdram_phaseinjector1_status[23:16]; -assign builder_minsoc_csrbank2_dfii_pi1_rddata1_w = main_sdram_phaseinjector1_status[15:8]; -assign builder_minsoc_csrbank2_dfii_pi1_rddata0_w = main_sdram_phaseinjector1_status[7:0]; -assign main_sdram_phaseinjector1_we = builder_minsoc_csrbank2_dfii_pi1_rddata0_we; -assign builder_minsoc_csrbank2_dfii_pi2_command0_w = main_sdram_phaseinjector2_command_storage[5:0]; -assign builder_minsoc_csrbank2_dfii_pi2_address1_w = main_sdram_phaseinjector2_address_storage[13:8]; -assign builder_minsoc_csrbank2_dfii_pi2_address0_w = main_sdram_phaseinjector2_address_storage[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_baddress0_w = main_sdram_phaseinjector2_baddress_storage[2:0]; -assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_w = main_sdram_phaseinjector2_wrdata_storage[31:24]; -assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_w = main_sdram_phaseinjector2_wrdata_storage[23:16]; -assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_w = main_sdram_phaseinjector2_wrdata_storage[15:8]; -assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_w = main_sdram_phaseinjector2_wrdata_storage[7:0]; -assign builder_minsoc_csrbank2_dfii_pi2_rddata3_w = main_sdram_phaseinjector2_status[31:24]; -assign builder_minsoc_csrbank2_dfii_pi2_rddata2_w = main_sdram_phaseinjector2_status[23:16]; -assign builder_minsoc_csrbank2_dfii_pi2_rddata1_w = main_sdram_phaseinjector2_status[15:8]; -assign builder_minsoc_csrbank2_dfii_pi2_rddata0_w = main_sdram_phaseinjector2_status[7:0]; -assign main_sdram_phaseinjector2_we = builder_minsoc_csrbank2_dfii_pi2_rddata0_we; -assign builder_minsoc_csrbank2_dfii_pi3_command0_w = main_sdram_phaseinjector3_command_storage[5:0]; -assign builder_minsoc_csrbank2_dfii_pi3_address1_w = main_sdram_phaseinjector3_address_storage[13:8]; -assign builder_minsoc_csrbank2_dfii_pi3_address0_w = main_sdram_phaseinjector3_address_storage[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_baddress0_w = main_sdram_phaseinjector3_baddress_storage[2:0]; -assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_w = main_sdram_phaseinjector3_wrdata_storage[31:24]; -assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_w = main_sdram_phaseinjector3_wrdata_storage[23:16]; -assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_w = main_sdram_phaseinjector3_wrdata_storage[15:8]; -assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_w = main_sdram_phaseinjector3_wrdata_storage[7:0]; -assign builder_minsoc_csrbank2_dfii_pi3_rddata3_w = main_sdram_phaseinjector3_status[31:24]; -assign builder_minsoc_csrbank2_dfii_pi3_rddata2_w = main_sdram_phaseinjector3_status[23:16]; -assign builder_minsoc_csrbank2_dfii_pi3_rddata1_w = main_sdram_phaseinjector3_status[15:8]; -assign builder_minsoc_csrbank2_dfii_pi3_rddata0_w = main_sdram_phaseinjector3_status[7:0]; -assign main_sdram_phaseinjector3_we = builder_minsoc_csrbank2_dfii_pi3_rddata0_we; -assign builder_minsoc_csrbank3_sel = (builder_minsoc_interface3_bank_bus_adr[13:9] == 3'd4); -assign builder_minsoc_csrbank3_load3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_load3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); -assign builder_minsoc_csrbank3_load3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); -assign builder_minsoc_csrbank3_load2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_load2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); -assign builder_minsoc_csrbank3_load2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); -assign builder_minsoc_csrbank3_load1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_load1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); -assign builder_minsoc_csrbank3_load1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); -assign builder_minsoc_csrbank3_load0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_load0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); -assign builder_minsoc_csrbank3_load0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); -assign builder_minsoc_csrbank3_reload3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_reload3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); -assign builder_minsoc_csrbank3_reload3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); -assign builder_minsoc_csrbank3_reload2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_reload2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); -assign builder_minsoc_csrbank3_reload2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); -assign builder_minsoc_csrbank3_reload1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_reload1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); -assign builder_minsoc_csrbank3_reload1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); -assign builder_minsoc_csrbank3_reload0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_reload0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); -assign builder_minsoc_csrbank3_reload0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); -assign builder_minsoc_csrbank3_en0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; -assign builder_minsoc_csrbank3_en0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); -assign builder_minsoc_csrbank3_en0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); -assign builder_minsoc_csrbank3_update_value0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; -assign builder_minsoc_csrbank3_update_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); -assign builder_minsoc_csrbank3_update_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); -assign builder_minsoc_csrbank3_value3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_value3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); -assign builder_minsoc_csrbank3_value3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); -assign builder_minsoc_csrbank3_value2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_value2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); -assign builder_minsoc_csrbank3_value2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); -assign builder_minsoc_csrbank3_value1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_value1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); -assign builder_minsoc_csrbank3_value1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); -assign builder_minsoc_csrbank3_value0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank3_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); -assign builder_minsoc_csrbank3_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); -assign main_minsoc_timer0_eventmanager_status_r = builder_minsoc_interface3_bank_bus_dat_w[0]; -assign main_minsoc_timer0_eventmanager_status_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); -assign main_minsoc_timer0_eventmanager_status_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); -assign main_minsoc_timer0_eventmanager_pending_r = builder_minsoc_interface3_bank_bus_dat_w[0]; -assign main_minsoc_timer0_eventmanager_pending_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); -assign main_minsoc_timer0_eventmanager_pending_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); -assign builder_minsoc_csrbank3_ev_enable0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; -assign builder_minsoc_csrbank3_ev_enable0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); -assign builder_minsoc_csrbank3_ev_enable0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); -assign builder_minsoc_csrbank3_load3_w = main_minsoc_timer0_load_storage[31:24]; -assign builder_minsoc_csrbank3_load2_w = main_minsoc_timer0_load_storage[23:16]; -assign builder_minsoc_csrbank3_load1_w = main_minsoc_timer0_load_storage[15:8]; -assign builder_minsoc_csrbank3_load0_w = main_minsoc_timer0_load_storage[7:0]; -assign builder_minsoc_csrbank3_reload3_w = main_minsoc_timer0_reload_storage[31:24]; -assign builder_minsoc_csrbank3_reload2_w = main_minsoc_timer0_reload_storage[23:16]; -assign builder_minsoc_csrbank3_reload1_w = main_minsoc_timer0_reload_storage[15:8]; -assign builder_minsoc_csrbank3_reload0_w = main_minsoc_timer0_reload_storage[7:0]; -assign builder_minsoc_csrbank3_en0_w = main_minsoc_timer0_en_storage; -assign builder_minsoc_csrbank3_update_value0_w = main_minsoc_timer0_update_value_storage; -assign builder_minsoc_csrbank3_value3_w = main_minsoc_timer0_value_status[31:24]; -assign builder_minsoc_csrbank3_value2_w = main_minsoc_timer0_value_status[23:16]; -assign builder_minsoc_csrbank3_value1_w = main_minsoc_timer0_value_status[15:8]; -assign builder_minsoc_csrbank3_value0_w = main_minsoc_timer0_value_status[7:0]; -assign main_minsoc_timer0_value_we = builder_minsoc_csrbank3_value0_we; -assign builder_minsoc_csrbank3_ev_enable0_w = main_minsoc_timer0_eventmanager_storage; -assign builder_minsoc_csrbank4_sel = (builder_minsoc_interface4_bank_bus_adr[13:9] == 2'd3); -assign main_minsoc_uart_rxtx_r = builder_minsoc_interface4_bank_bus_dat_w[7:0]; -assign main_minsoc_uart_rxtx_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); -assign main_minsoc_uart_rxtx_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); -assign builder_minsoc_csrbank4_txfull_r = builder_minsoc_interface4_bank_bus_dat_w[0]; -assign builder_minsoc_csrbank4_txfull_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); -assign builder_minsoc_csrbank4_txfull_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); -assign builder_minsoc_csrbank4_rxempty_r = builder_minsoc_interface4_bank_bus_dat_w[0]; -assign builder_minsoc_csrbank4_rxempty_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); -assign builder_minsoc_csrbank4_rxempty_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); -assign main_minsoc_uart_eventmanager_status_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; -assign main_minsoc_uart_eventmanager_status_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); -assign main_minsoc_uart_eventmanager_status_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); -assign main_minsoc_uart_eventmanager_pending_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; -assign main_minsoc_uart_eventmanager_pending_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); -assign main_minsoc_uart_eventmanager_pending_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); -assign builder_minsoc_csrbank4_ev_enable0_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; -assign builder_minsoc_csrbank4_ev_enable0_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); -assign builder_minsoc_csrbank4_ev_enable0_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); -assign builder_minsoc_csrbank4_txfull_w = main_minsoc_uart_txfull_status; -assign main_minsoc_uart_txfull_we = builder_minsoc_csrbank4_txfull_we; -assign builder_minsoc_csrbank4_rxempty_w = main_minsoc_uart_rxempty_status; -assign main_minsoc_uart_rxempty_we = builder_minsoc_csrbank4_rxempty_we; -assign builder_minsoc_csrbank4_ev_enable0_w = main_minsoc_uart_eventmanager_storage[1:0]; -assign builder_minsoc_csrbank5_sel = (builder_minsoc_interface5_bank_bus_adr[13:9] == 2'd2); -assign builder_minsoc_csrbank5_tuning_word3_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank5_tuning_word3_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); -assign builder_minsoc_csrbank5_tuning_word3_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); -assign builder_minsoc_csrbank5_tuning_word2_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank5_tuning_word2_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); -assign builder_minsoc_csrbank5_tuning_word2_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); -assign builder_minsoc_csrbank5_tuning_word1_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank5_tuning_word1_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); -assign builder_minsoc_csrbank5_tuning_word1_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); -assign builder_minsoc_csrbank5_tuning_word0_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; -assign builder_minsoc_csrbank5_tuning_word0_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); -assign builder_minsoc_csrbank5_tuning_word0_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); -assign builder_minsoc_csrbank5_tuning_word3_w = main_minsoc_storage[31:24]; -assign builder_minsoc_csrbank5_tuning_word2_w = main_minsoc_storage[23:16]; -assign builder_minsoc_csrbank5_tuning_word1_w = main_minsoc_storage[15:8]; -assign builder_minsoc_csrbank5_tuning_word0_w = main_minsoc_storage[7:0]; -assign builder_minsoc_adr = main_minsoc_interface_adr; -assign builder_minsoc_we = main_minsoc_interface_we; -assign builder_minsoc_dat_w = main_minsoc_interface_dat_w; -assign main_minsoc_interface_dat_r = builder_minsoc_dat_r; -assign builder_minsoc_interface0_bank_bus_adr = builder_minsoc_adr; -assign builder_minsoc_interface1_bank_bus_adr = builder_minsoc_adr; -assign builder_minsoc_interface2_bank_bus_adr = builder_minsoc_adr; -assign builder_minsoc_interface3_bank_bus_adr = builder_minsoc_adr; -assign builder_minsoc_interface4_bank_bus_adr = builder_minsoc_adr; -assign builder_minsoc_interface5_bank_bus_adr = builder_minsoc_adr; -assign builder_minsoc_interface0_bank_bus_we = builder_minsoc_we; -assign builder_minsoc_interface1_bank_bus_we = builder_minsoc_we; -assign builder_minsoc_interface2_bank_bus_we = builder_minsoc_we; -assign builder_minsoc_interface3_bank_bus_we = builder_minsoc_we; -assign builder_minsoc_interface4_bank_bus_we = builder_minsoc_we; -assign builder_minsoc_interface5_bank_bus_we = builder_minsoc_we; -assign builder_minsoc_interface0_bank_bus_dat_w = builder_minsoc_dat_w; -assign builder_minsoc_interface1_bank_bus_dat_w = builder_minsoc_dat_w; -assign builder_minsoc_interface2_bank_bus_dat_w = builder_minsoc_dat_w; -assign builder_minsoc_interface3_bank_bus_dat_w = builder_minsoc_dat_w; -assign builder_minsoc_interface4_bank_bus_dat_w = builder_minsoc_dat_w; -assign builder_minsoc_interface5_bank_bus_dat_w = builder_minsoc_dat_w; -assign builder_minsoc_dat_r = (((((builder_minsoc_interface0_bank_bus_dat_r | builder_minsoc_interface1_bank_bus_dat_r) | builder_minsoc_interface2_bank_bus_dat_r) | builder_minsoc_interface3_bank_bus_dat_r) | builder_minsoc_interface4_bank_bus_dat_r) | builder_minsoc_interface5_bank_bus_dat_r); -always @(*) begin - builder_rhs_array_muxed0 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[0]; - end - 1'd1: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[1]; - end - 2'd2: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[2]; - end - 2'd3: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[3]; - end - 3'd4: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[4]; - end - 3'd5: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[5]; - end - 3'd6: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[6]; - end - default: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[7]; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed1 <= 14'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_a; - end - 1'd1: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_a; - end - 2'd2: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_a; - end - 2'd3: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_a; - end - 3'd4: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_a; - end - 3'd5: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_a; - end - 3'd6: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_a; - end - default: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_a; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed2 <= 3'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_ba; - end - 1'd1: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_ba; - end - 2'd2: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_ba; - end - 2'd3: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_ba; - end - 3'd4: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_ba; - end - 3'd5: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_ba; - end - 3'd6: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_ba; - end - default: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_ba; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed3 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_is_read; - end - 1'd1: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_is_read; - end - 2'd2: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_is_read; - end - 2'd3: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_is_read; - end - 3'd4: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_is_read; - end - 3'd5: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_is_read; - end - 3'd6: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_is_read; - end - default: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_is_read; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed4 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_is_write; - end - 1'd1: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_is_write; - end - 2'd2: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_is_write; - end - 2'd3: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_is_write; - end - 3'd4: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_is_write; - end - 3'd5: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_is_write; - end - 3'd6: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_is_write; - end - default: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_is_write; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed5 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_is_cmd; - end - 1'd1: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_is_cmd; - end - 2'd2: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_is_cmd; - end - 2'd3: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_is_cmd; - end - 3'd4: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_is_cmd; - end - 3'd5: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_is_cmd; - end - 3'd6: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_is_cmd; - end - default: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_is_cmd; - end - endcase -end -always @(*) begin - builder_t_array_muxed0 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_t_array_muxed0 <= main_sdram_bankmachine0_cmd_payload_cas; - end - 1'd1: begin - builder_t_array_muxed0 <= main_sdram_bankmachine1_cmd_payload_cas; - end - 2'd2: begin - builder_t_array_muxed0 <= main_sdram_bankmachine2_cmd_payload_cas; - end - 2'd3: begin - builder_t_array_muxed0 <= main_sdram_bankmachine3_cmd_payload_cas; - end - 3'd4: begin - builder_t_array_muxed0 <= main_sdram_bankmachine4_cmd_payload_cas; - end - 3'd5: begin - builder_t_array_muxed0 <= main_sdram_bankmachine5_cmd_payload_cas; - end - 3'd6: begin - builder_t_array_muxed0 <= main_sdram_bankmachine6_cmd_payload_cas; - end - default: begin - builder_t_array_muxed0 <= main_sdram_bankmachine7_cmd_payload_cas; - end - endcase -end -always @(*) begin - builder_t_array_muxed1 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_t_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_ras; - end - 1'd1: begin - builder_t_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_ras; - end - 2'd2: begin - builder_t_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_ras; - end - 2'd3: begin - builder_t_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_ras; - end - 3'd4: begin - builder_t_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_ras; - end - 3'd5: begin - builder_t_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_ras; - end - 3'd6: begin - builder_t_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_ras; - end - default: begin - builder_t_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_ras; - end - endcase -end -always @(*) begin - builder_t_array_muxed2 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_t_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_we; - end - 1'd1: begin - builder_t_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_we; - end - 2'd2: begin - builder_t_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_we; - end - 2'd3: begin - builder_t_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_we; - end - 3'd4: begin - builder_t_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_we; - end - 3'd5: begin - builder_t_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_we; - end - 3'd6: begin - builder_t_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_we; - end - default: begin - builder_t_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed6 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[0]; - end - 1'd1: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[1]; - end - 2'd2: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[2]; - end - 2'd3: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[3]; - end - 3'd4: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[4]; - end - 3'd5: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[5]; - end - 3'd6: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[6]; - end - default: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[7]; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed7 <= 14'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine0_cmd_payload_a; - end - 1'd1: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine1_cmd_payload_a; - end - 2'd2: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine2_cmd_payload_a; - end - 2'd3: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine3_cmd_payload_a; - end - 3'd4: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine4_cmd_payload_a; - end - 3'd5: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine5_cmd_payload_a; - end - 3'd6: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine6_cmd_payload_a; - end - default: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine7_cmd_payload_a; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed8 <= 3'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine0_cmd_payload_ba; - end - 1'd1: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine1_cmd_payload_ba; - end - 2'd2: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine2_cmd_payload_ba; - end - 2'd3: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine3_cmd_payload_ba; - end - 3'd4: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine4_cmd_payload_ba; - end - 3'd5: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine5_cmd_payload_ba; - end - 3'd6: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine6_cmd_payload_ba; - end - default: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine7_cmd_payload_ba; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed9 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine0_cmd_payload_is_read; - end - 1'd1: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine1_cmd_payload_is_read; - end - 2'd2: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine2_cmd_payload_is_read; - end - 2'd3: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine3_cmd_payload_is_read; - end - 3'd4: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine4_cmd_payload_is_read; - end - 3'd5: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine5_cmd_payload_is_read; - end - 3'd6: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine6_cmd_payload_is_read; - end - default: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine7_cmd_payload_is_read; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed10 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine0_cmd_payload_is_write; - end - 1'd1: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine1_cmd_payload_is_write; - end - 2'd2: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine2_cmd_payload_is_write; - end - 2'd3: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine3_cmd_payload_is_write; - end - 3'd4: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine4_cmd_payload_is_write; - end - 3'd5: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine5_cmd_payload_is_write; - end - 3'd6: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine6_cmd_payload_is_write; - end - default: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine7_cmd_payload_is_write; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed11 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine0_cmd_payload_is_cmd; - end - 1'd1: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine1_cmd_payload_is_cmd; - end - 2'd2: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine2_cmd_payload_is_cmd; - end - 2'd3: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine3_cmd_payload_is_cmd; - end - 3'd4: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine4_cmd_payload_is_cmd; - end - 3'd5: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine5_cmd_payload_is_cmd; - end - 3'd6: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine6_cmd_payload_is_cmd; - end - default: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine7_cmd_payload_is_cmd; - end - endcase -end -always @(*) begin - builder_t_array_muxed3 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_t_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_cas; - end - 1'd1: begin - builder_t_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_cas; - end - 2'd2: begin - builder_t_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_cas; - end - 2'd3: begin - builder_t_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_cas; - end - 3'd4: begin - builder_t_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_cas; - end - 3'd5: begin - builder_t_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_cas; - end - 3'd6: begin - builder_t_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_cas; - end - default: begin - builder_t_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_cas; - end - endcase -end -always @(*) begin - builder_t_array_muxed4 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_t_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_ras; - end - 1'd1: begin - builder_t_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_ras; - end - 2'd2: begin - builder_t_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_ras; - end - 2'd3: begin - builder_t_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_ras; - end - 3'd4: begin - builder_t_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_ras; - end - 3'd5: begin - builder_t_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_ras; - end - 3'd6: begin - builder_t_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_ras; - end - default: begin - builder_t_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_ras; - end - endcase -end -always @(*) begin - builder_t_array_muxed5 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_t_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_we; - end - 1'd1: begin - builder_t_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_we; - end - 2'd2: begin - builder_t_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_we; - end - 2'd3: begin - builder_t_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_we; - end - 3'd4: begin - builder_t_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_we; - end - 3'd5: begin - builder_t_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_we; - end - 3'd6: begin - builder_t_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_we; - end - default: begin - builder_t_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed12 <= 21'd0; - case (builder_roundrobin0_grant) - default: begin - builder_rhs_array_muxed12 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed13 <= 1'd0; - case (builder_roundrobin0_grant) - default: begin - builder_rhs_array_muxed13 <= main_port_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed14 <= 1'd0; - case (builder_roundrobin0_grant) - default: begin - builder_rhs_array_muxed14 <= (((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase -end -always @(*) begin - builder_rhs_array_muxed15 <= 21'd0; - case (builder_roundrobin1_grant) - default: begin - builder_rhs_array_muxed15 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed16 <= 1'd0; - case (builder_roundrobin1_grant) - default: begin - builder_rhs_array_muxed16 <= main_port_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed17 <= 1'd0; - case (builder_roundrobin1_grant) - default: begin - builder_rhs_array_muxed17 <= (((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase -end -always @(*) begin - builder_rhs_array_muxed18 <= 21'd0; - case (builder_roundrobin2_grant) - default: begin - builder_rhs_array_muxed18 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed19 <= 1'd0; - case (builder_roundrobin2_grant) - default: begin - builder_rhs_array_muxed19 <= main_port_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed20 <= 1'd0; - case (builder_roundrobin2_grant) - default: begin - builder_rhs_array_muxed20 <= (((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase -end -always @(*) begin - builder_rhs_array_muxed21 <= 21'd0; - case (builder_roundrobin3_grant) - default: begin - builder_rhs_array_muxed21 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed22 <= 1'd0; - case (builder_roundrobin3_grant) - default: begin - builder_rhs_array_muxed22 <= main_port_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed23 <= 1'd0; - case (builder_roundrobin3_grant) - default: begin - builder_rhs_array_muxed23 <= (((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase -end -always @(*) begin - builder_rhs_array_muxed24 <= 21'd0; - case (builder_roundrobin4_grant) - default: begin - builder_rhs_array_muxed24 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed25 <= 1'd0; - case (builder_roundrobin4_grant) - default: begin - builder_rhs_array_muxed25 <= main_port_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed26 <= 1'd0; - case (builder_roundrobin4_grant) - default: begin - builder_rhs_array_muxed26 <= (((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase -end -always @(*) begin - builder_rhs_array_muxed27 <= 21'd0; - case (builder_roundrobin5_grant) - default: begin - builder_rhs_array_muxed27 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed28 <= 1'd0; - case (builder_roundrobin5_grant) - default: begin - builder_rhs_array_muxed28 <= main_port_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed29 <= 1'd0; - case (builder_roundrobin5_grant) - default: begin - builder_rhs_array_muxed29 <= (((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase -end -always @(*) begin - builder_rhs_array_muxed30 <= 21'd0; - case (builder_roundrobin6_grant) - default: begin - builder_rhs_array_muxed30 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed31 <= 1'd0; - case (builder_roundrobin6_grant) - default: begin - builder_rhs_array_muxed31 <= main_port_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed32 <= 1'd0; - case (builder_roundrobin6_grant) - default: begin - builder_rhs_array_muxed32 <= (((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase -end -always @(*) begin - builder_rhs_array_muxed33 <= 21'd0; - case (builder_roundrobin7_grant) - default: begin - builder_rhs_array_muxed33 <= {main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0]}; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed34 <= 1'd0; - case (builder_roundrobin7_grant) - default: begin - builder_rhs_array_muxed34 <= main_port_cmd_payload_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed35 <= 1'd0; - case (builder_roundrobin7_grant) - default: begin - builder_rhs_array_muxed35 <= (((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase -end -always @(*) begin - builder_rhs_array_muxed36 <= 30'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed36 <= main_interface1_wb_sdram_adr; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed37 <= 32'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed37 <= main_interface1_wb_sdram_dat_w; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed38 <= 4'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed38 <= main_interface1_wb_sdram_sel; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed39 <= 1'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed39 <= main_interface1_wb_sdram_cyc; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed40 <= 1'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed40 <= main_interface1_wb_sdram_stb; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed41 <= 1'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed41 <= main_interface1_wb_sdram_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed42 <= 3'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed42 <= main_interface1_wb_sdram_cti; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed43 <= 2'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed43 <= main_interface1_wb_sdram_bte; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed44 <= 30'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed44 <= main_minsoc_interface0_soc_bus_adr; - end - default: begin - builder_rhs_array_muxed44 <= main_minsoc_interface1_soc_bus_adr; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed45 <= 32'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed45 <= main_minsoc_interface0_soc_bus_dat_w; - end - default: begin - builder_rhs_array_muxed45 <= main_minsoc_interface1_soc_bus_dat_w; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed46 <= 4'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed46 <= main_minsoc_interface0_soc_bus_sel; - end - default: begin - builder_rhs_array_muxed46 <= main_minsoc_interface1_soc_bus_sel; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed47 <= 1'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed47 <= main_minsoc_interface0_soc_bus_cyc; - end - default: begin - builder_rhs_array_muxed47 <= main_minsoc_interface1_soc_bus_cyc; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed48 <= 1'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed48 <= main_minsoc_interface0_soc_bus_stb; - end - default: begin - builder_rhs_array_muxed48 <= main_minsoc_interface1_soc_bus_stb; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed49 <= 1'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed49 <= main_minsoc_interface0_soc_bus_we; - end - default: begin - builder_rhs_array_muxed49 <= main_minsoc_interface1_soc_bus_we; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed50 <= 3'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed50 <= main_minsoc_interface0_soc_bus_cti; - end - default: begin - builder_rhs_array_muxed50 <= main_minsoc_interface1_soc_bus_cti; - end - endcase -end -always @(*) begin - builder_rhs_array_muxed51 <= 2'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed51 <= main_minsoc_interface0_soc_bus_bte; - end - default: begin - builder_rhs_array_muxed51 <= main_minsoc_interface1_soc_bus_bte; - end - endcase -end -always @(*) begin - builder_array_muxed0 <= 3'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed0 <= main_sdram_nop_ba[2:0]; - end - 1'd1: begin - builder_array_muxed0 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - builder_array_muxed0 <= main_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - builder_array_muxed0 <= main_sdram_cmd_payload_ba[2:0]; - end - endcase -end -always @(*) begin - builder_array_muxed1 <= 14'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed1 <= main_sdram_nop_a; - end - 1'd1: begin - builder_array_muxed1 <= main_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - builder_array_muxed1 <= main_sdram_choose_req_cmd_payload_a; - end - default: begin - builder_array_muxed1 <= main_sdram_cmd_payload_a; - end - endcase -end -always @(*) begin - builder_array_muxed2 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed2 <= 1'd0; - end - 1'd1: begin - builder_array_muxed2 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - builder_array_muxed2 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); - end - default: begin - builder_array_muxed2 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); - end - endcase -end -always @(*) begin - builder_array_muxed3 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed3 <= 1'd0; - end - 1'd1: begin - builder_array_muxed3 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - builder_array_muxed3 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); - end - default: begin - builder_array_muxed3 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); - end - endcase -end -always @(*) begin - builder_array_muxed4 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed4 <= 1'd0; - end - 1'd1: begin - builder_array_muxed4 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - builder_array_muxed4 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); - end - default: begin - builder_array_muxed4 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); - end - endcase -end -always @(*) begin - builder_array_muxed5 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed5 <= 1'd0; - end - 1'd1: begin - builder_array_muxed5 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - builder_array_muxed5 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); - end - default: begin - builder_array_muxed5 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); - end - endcase -end -always @(*) begin - builder_array_muxed6 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed6 <= 1'd0; - end - 1'd1: begin - builder_array_muxed6 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - builder_array_muxed6 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); - end - default: begin - builder_array_muxed6 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); - end - endcase -end -always @(*) begin - builder_array_muxed7 <= 3'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed7 <= main_sdram_nop_ba[2:0]; - end - 1'd1: begin - builder_array_muxed7 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - builder_array_muxed7 <= main_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - builder_array_muxed7 <= main_sdram_cmd_payload_ba[2:0]; - end - endcase -end -always @(*) begin - builder_array_muxed8 <= 14'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed8 <= main_sdram_nop_a; - end - 1'd1: begin - builder_array_muxed8 <= main_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - builder_array_muxed8 <= main_sdram_choose_req_cmd_payload_a; - end - default: begin - builder_array_muxed8 <= main_sdram_cmd_payload_a; - end - endcase -end -always @(*) begin - builder_array_muxed9 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed9 <= 1'd0; - end - 1'd1: begin - builder_array_muxed9 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - builder_array_muxed9 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); - end - default: begin - builder_array_muxed9 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); - end - endcase -end -always @(*) begin - builder_array_muxed10 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed10 <= 1'd0; - end - 1'd1: begin - builder_array_muxed10 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - builder_array_muxed10 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); - end - default: begin - builder_array_muxed10 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); - end - endcase -end -always @(*) begin - builder_array_muxed11 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed11 <= 1'd0; - end - 1'd1: begin - builder_array_muxed11 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - builder_array_muxed11 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); - end - default: begin - builder_array_muxed11 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); - end - endcase -end -always @(*) begin - builder_array_muxed12 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed12 <= 1'd0; - end - 1'd1: begin - builder_array_muxed12 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - builder_array_muxed12 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); - end - default: begin - builder_array_muxed12 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); - end - endcase -end -always @(*) begin - builder_array_muxed13 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed13 <= 1'd0; - end - 1'd1: begin - builder_array_muxed13 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - builder_array_muxed13 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); - end - default: begin - builder_array_muxed13 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); - end - endcase -end -always @(*) begin - builder_array_muxed14 <= 3'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed14 <= main_sdram_nop_ba[2:0]; - end - 1'd1: begin - builder_array_muxed14 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - builder_array_muxed14 <= main_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - builder_array_muxed14 <= main_sdram_cmd_payload_ba[2:0]; - end - endcase -end -always @(*) begin - builder_array_muxed15 <= 14'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed15 <= main_sdram_nop_a; - end - 1'd1: begin - builder_array_muxed15 <= main_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - builder_array_muxed15 <= main_sdram_choose_req_cmd_payload_a; - end - default: begin - builder_array_muxed15 <= main_sdram_cmd_payload_a; - end - endcase -end -always @(*) begin - builder_array_muxed16 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed16 <= 1'd0; - end - 1'd1: begin - builder_array_muxed16 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - builder_array_muxed16 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); - end - default: begin - builder_array_muxed16 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); - end - endcase -end -always @(*) begin - builder_array_muxed17 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed17 <= 1'd0; - end - 1'd1: begin - builder_array_muxed17 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - builder_array_muxed17 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); - end - default: begin - builder_array_muxed17 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); - end - endcase -end -always @(*) begin - builder_array_muxed18 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed18 <= 1'd0; - end - 1'd1: begin - builder_array_muxed18 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - builder_array_muxed18 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); - end - default: begin - builder_array_muxed18 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); - end - endcase -end -always @(*) begin - builder_array_muxed19 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed19 <= 1'd0; - end - 1'd1: begin - builder_array_muxed19 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - builder_array_muxed19 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); - end - default: begin - builder_array_muxed19 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); - end - endcase -end -always @(*) begin - builder_array_muxed20 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed20 <= 1'd0; - end - 1'd1: begin - builder_array_muxed20 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - builder_array_muxed20 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); - end - default: begin - builder_array_muxed20 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); - end - endcase -end -always @(*) begin - builder_array_muxed21 <= 3'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed21 <= main_sdram_nop_ba[2:0]; - end - 1'd1: begin - builder_array_muxed21 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - builder_array_muxed21 <= main_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - builder_array_muxed21 <= main_sdram_cmd_payload_ba[2:0]; - end - endcase -end -always @(*) begin - builder_array_muxed22 <= 14'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed22 <= main_sdram_nop_a; - end - 1'd1: begin - builder_array_muxed22 <= main_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - builder_array_muxed22 <= main_sdram_choose_req_cmd_payload_a; - end - default: begin - builder_array_muxed22 <= main_sdram_cmd_payload_a; - end - endcase -end -always @(*) begin - builder_array_muxed23 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed23 <= 1'd0; - end - 1'd1: begin - builder_array_muxed23 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - builder_array_muxed23 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); - end - default: begin - builder_array_muxed23 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); - end - endcase -end -always @(*) begin - builder_array_muxed24 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed24 <= 1'd0; - end - 1'd1: begin - builder_array_muxed24 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - builder_array_muxed24 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); - end - default: begin - builder_array_muxed24 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); - end - endcase -end -always @(*) begin - builder_array_muxed25 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed25 <= 1'd0; - end - 1'd1: begin - builder_array_muxed25 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - builder_array_muxed25 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); - end - default: begin - builder_array_muxed25 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); - end - endcase -end -always @(*) begin - builder_array_muxed26 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed26 <= 1'd0; - end - 1'd1: begin - builder_array_muxed26 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - builder_array_muxed26 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); - end - default: begin - builder_array_muxed26 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); - end - endcase -end -always @(*) begin - builder_array_muxed27 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed27 <= 1'd0; - end - 1'd1: begin - builder_array_muxed27 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - builder_array_muxed27 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); - end - default: begin - builder_array_muxed27 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); - end - endcase -end -assign main_minsoc_rx = builder_regs1; -assign builder_xilinxasyncresetsynchronizerimpl0 = ((~main_locked) | main_reset); -assign builder_xilinxasyncresetsynchronizerimpl1 = ((~main_locked) | main_reset); -assign builder_xilinxasyncresetsynchronizerimpl2 = ((~main_locked) | main_reset); -assign builder_xilinxasyncresetsynchronizerimpl3 = ((~main_locked) | main_reset); - -always @(posedge clk200_clk) begin - if ((main_reset_counter != 1'd0)) begin - main_reset_counter <= (main_reset_counter - 1'd1); - end else begin - main_ic_reset <= 1'd0; - end - if (clk200_rst) begin - main_reset_counter <= 4'd15; - main_ic_reset <= 1'd1; - end -end - -always @(posedge sys_clk) begin - if ((main_minsoc_ctrl_bus_errors != 32'd4294967295)) begin - if (main_minsoc_ctrl_bus_error) begin - main_minsoc_ctrl_bus_errors <= (main_minsoc_ctrl_bus_errors + 1'd1); - end - end - main_minsoc_rom_bus_ack <= 1'd0; - if (((main_minsoc_rom_bus_cyc & main_minsoc_rom_bus_stb) & (~main_minsoc_rom_bus_ack))) begin - main_minsoc_rom_bus_ack <= 1'd1; - end - main_minsoc_sram_bus_ack <= 1'd0; - if (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & (~main_minsoc_sram_bus_ack))) begin - main_minsoc_sram_bus_ack <= 1'd1; - end - main_minsoc_sink_ready <= 1'd0; - if (((main_minsoc_sink_valid & (~main_minsoc_tx_busy)) & (~main_minsoc_sink_ready))) begin - main_minsoc_tx_reg <= main_minsoc_sink_payload_data; - main_minsoc_tx_bitcount <= 1'd0; - main_minsoc_tx_busy <= 1'd1; - serial_tx <= 1'd0; - end else begin - if ((main_minsoc_uart_clk_txen & main_minsoc_tx_busy)) begin - main_minsoc_tx_bitcount <= (main_minsoc_tx_bitcount + 1'd1); - if ((main_minsoc_tx_bitcount == 4'd8)) begin - serial_tx <= 1'd1; - end else begin - if ((main_minsoc_tx_bitcount == 4'd9)) begin - serial_tx <= 1'd1; - main_minsoc_tx_busy <= 1'd0; - main_minsoc_sink_ready <= 1'd1; - end else begin - serial_tx <= main_minsoc_tx_reg[0]; - main_minsoc_tx_reg <= {1'd0, main_minsoc_tx_reg[7:1]}; - end - end - end - end - if (main_minsoc_tx_busy) begin - {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= (main_minsoc_phase_accumulator_tx + main_minsoc_storage); - end else begin - {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= 1'd0; - end - main_minsoc_source_valid <= 1'd0; - main_minsoc_rx_r <= main_minsoc_rx; - if ((~main_minsoc_rx_busy)) begin - if (((~main_minsoc_rx) & main_minsoc_rx_r)) begin - main_minsoc_rx_busy <= 1'd1; - main_minsoc_rx_bitcount <= 1'd0; - end - end else begin - if (main_minsoc_uart_clk_rxen) begin - main_minsoc_rx_bitcount <= (main_minsoc_rx_bitcount + 1'd1); - if ((main_minsoc_rx_bitcount == 1'd0)) begin - if (main_minsoc_rx) begin - main_minsoc_rx_busy <= 1'd0; - end - end else begin - if ((main_minsoc_rx_bitcount == 4'd9)) begin - main_minsoc_rx_busy <= 1'd0; - if (main_minsoc_rx) begin - main_minsoc_source_payload_data <= main_minsoc_rx_reg; - main_minsoc_source_valid <= 1'd1; - end - end else begin - main_minsoc_rx_reg <= {main_minsoc_rx, main_minsoc_rx_reg[7:1]}; - end - end - end - end - if (main_minsoc_rx_busy) begin - {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= (main_minsoc_phase_accumulator_rx + main_minsoc_storage); - end else begin - {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= 32'd2147483648; - end - if (main_minsoc_uart_tx_clear) begin - main_minsoc_uart_tx_pending <= 1'd0; - end - main_minsoc_uart_tx_old_trigger <= main_minsoc_uart_tx_trigger; - if (((~main_minsoc_uart_tx_trigger) & main_minsoc_uart_tx_old_trigger)) begin - main_minsoc_uart_tx_pending <= 1'd1; - end - if (main_minsoc_uart_rx_clear) begin - main_minsoc_uart_rx_pending <= 1'd0; - end - main_minsoc_uart_rx_old_trigger <= main_minsoc_uart_rx_trigger; - if (((~main_minsoc_uart_rx_trigger) & main_minsoc_uart_rx_old_trigger)) begin - main_minsoc_uart_rx_pending <= 1'd1; - end - if (main_minsoc_uart_tx_fifo_syncfifo_re) begin - main_minsoc_uart_tx_fifo_readable <= 1'd1; - end else begin - if (main_minsoc_uart_tx_fifo_re) begin - main_minsoc_uart_tx_fifo_readable <= 1'd0; - end - end - if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin - main_minsoc_uart_tx_fifo_produce <= (main_minsoc_uart_tx_fifo_produce + 1'd1); - end - if (main_minsoc_uart_tx_fifo_do_read) begin - main_minsoc_uart_tx_fifo_consume <= (main_minsoc_uart_tx_fifo_consume + 1'd1); - end - if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin - if ((~main_minsoc_uart_tx_fifo_do_read)) begin - main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 + 1'd1); - end - end else begin - if (main_minsoc_uart_tx_fifo_do_read) begin - main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 - 1'd1); - end - end - if (main_minsoc_uart_rx_fifo_syncfifo_re) begin - main_minsoc_uart_rx_fifo_readable <= 1'd1; - end else begin - if (main_minsoc_uart_rx_fifo_re) begin - main_minsoc_uart_rx_fifo_readable <= 1'd0; - end - end - if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin - main_minsoc_uart_rx_fifo_produce <= (main_minsoc_uart_rx_fifo_produce + 1'd1); - end - if (main_minsoc_uart_rx_fifo_do_read) begin - main_minsoc_uart_rx_fifo_consume <= (main_minsoc_uart_rx_fifo_consume + 1'd1); - end - if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin - if ((~main_minsoc_uart_rx_fifo_do_read)) begin - main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 + 1'd1); - end - end else begin - if (main_minsoc_uart_rx_fifo_do_read) begin - main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 - 1'd1); - end - end - if (main_minsoc_uart_reset) begin - main_minsoc_uart_tx_pending <= 1'd0; - main_minsoc_uart_tx_old_trigger <= 1'd0; - main_minsoc_uart_rx_pending <= 1'd0; - main_minsoc_uart_rx_old_trigger <= 1'd0; - main_minsoc_uart_tx_fifo_readable <= 1'd0; - main_minsoc_uart_tx_fifo_level0 <= 5'd0; - main_minsoc_uart_tx_fifo_produce <= 4'd0; - main_minsoc_uart_tx_fifo_consume <= 4'd0; - main_minsoc_uart_rx_fifo_readable <= 1'd0; - main_minsoc_uart_rx_fifo_level0 <= 5'd0; - main_minsoc_uart_rx_fifo_produce <= 4'd0; - main_minsoc_uart_rx_fifo_consume <= 4'd0; - end - if (main_minsoc_timer0_en_storage) begin - if ((main_minsoc_timer0_value == 1'd0)) begin - main_minsoc_timer0_value <= main_minsoc_timer0_reload_storage; - end else begin - main_minsoc_timer0_value <= (main_minsoc_timer0_value - 1'd1); - end - end else begin - main_minsoc_timer0_value <= main_minsoc_timer0_load_storage; - end - if (main_minsoc_timer0_update_value_re) begin - main_minsoc_timer0_value_status <= main_minsoc_timer0_value; - end - if (main_minsoc_timer0_zero_clear) begin - main_minsoc_timer0_zero_pending <= 1'd0; - end - main_minsoc_timer0_zero_old_trigger <= main_minsoc_timer0_zero_trigger; - if (((~main_minsoc_timer0_zero_trigger) & main_minsoc_timer0_zero_old_trigger)) begin - main_minsoc_timer0_zero_pending <= 1'd1; - end - builder_wb2csr_state <= builder_wb2csr_next_state; - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip0_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip0_value <= (main_a7ddrphy_bitslip0_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip1_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip1_value <= (main_a7ddrphy_bitslip1_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip2_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip2_value <= (main_a7ddrphy_bitslip2_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip3_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip3_value <= (main_a7ddrphy_bitslip3_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip4_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip4_value <= (main_a7ddrphy_bitslip4_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip5_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip5_value <= (main_a7ddrphy_bitslip5_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip6_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip6_value <= (main_a7ddrphy_bitslip6_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip7_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip7_value <= (main_a7ddrphy_bitslip7_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip8_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip8_value <= (main_a7ddrphy_bitslip8_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip9_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip9_value <= (main_a7ddrphy_bitslip9_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip10_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip10_value <= (main_a7ddrphy_bitslip10_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip11_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip11_value <= (main_a7ddrphy_bitslip11_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip12_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip12_value <= (main_a7ddrphy_bitslip12_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip13_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip13_value <= (main_a7ddrphy_bitslip13_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip14_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip14_value <= (main_a7ddrphy_bitslip14_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip15_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip15_value <= (main_a7ddrphy_bitslip15_value + 1'd1); - end - end - end - main_a7ddrphy_n_rddata_en0 <= main_a7ddrphy_dfi_p2_rddata_en; - main_a7ddrphy_n_rddata_en1 <= main_a7ddrphy_n_rddata_en0; - main_a7ddrphy_n_rddata_en2 <= main_a7ddrphy_n_rddata_en1; - main_a7ddrphy_n_rddata_en3 <= main_a7ddrphy_n_rddata_en2; - main_a7ddrphy_n_rddata_en4 <= main_a7ddrphy_n_rddata_en3; - main_a7ddrphy_n_rddata_en5 <= main_a7ddrphy_n_rddata_en4; - main_a7ddrphy_n_rddata_en6 <= main_a7ddrphy_n_rddata_en5; - main_a7ddrphy_n_rddata_en7 <= main_a7ddrphy_n_rddata_en6; - main_a7ddrphy_dfi_p0_rddata_valid <= main_a7ddrphy_n_rddata_en7; - main_a7ddrphy_dfi_p1_rddata_valid <= main_a7ddrphy_n_rddata_en7; - main_a7ddrphy_dfi_p2_rddata_valid <= main_a7ddrphy_n_rddata_en7; - main_a7ddrphy_dfi_p3_rddata_valid <= main_a7ddrphy_n_rddata_en7; - main_a7ddrphy_last_wrdata_en <= {main_a7ddrphy_last_wrdata_en[2:0], main_a7ddrphy_dfi_p3_wrdata_en}; - main_a7ddrphy_oe_dqs <= main_a7ddrphy_oe; - main_a7ddrphy_oe_dq <= main_a7ddrphy_oe; - main_a7ddrphy_bitslip0_r <= {main_a7ddrphy_bitslip0_i, main_a7ddrphy_bitslip0_r[15:8]}; - case (main_a7ddrphy_bitslip0_value) - 1'd0: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[14:7]; - end - endcase - main_a7ddrphy_bitslip1_r <= {main_a7ddrphy_bitslip1_i, main_a7ddrphy_bitslip1_r[15:8]}; - case (main_a7ddrphy_bitslip1_value) - 1'd0: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[14:7]; - end - endcase - main_a7ddrphy_bitslip2_r <= {main_a7ddrphy_bitslip2_i, main_a7ddrphy_bitslip2_r[15:8]}; - case (main_a7ddrphy_bitslip2_value) - 1'd0: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[14:7]; - end - endcase - main_a7ddrphy_bitslip3_r <= {main_a7ddrphy_bitslip3_i, main_a7ddrphy_bitslip3_r[15:8]}; - case (main_a7ddrphy_bitslip3_value) - 1'd0: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[14:7]; - end - endcase - main_a7ddrphy_bitslip4_r <= {main_a7ddrphy_bitslip4_i, main_a7ddrphy_bitslip4_r[15:8]}; - case (main_a7ddrphy_bitslip4_value) - 1'd0: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[14:7]; - end - endcase - main_a7ddrphy_bitslip5_r <= {main_a7ddrphy_bitslip5_i, main_a7ddrphy_bitslip5_r[15:8]}; - case (main_a7ddrphy_bitslip5_value) - 1'd0: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[14:7]; - end - endcase - main_a7ddrphy_bitslip6_r <= {main_a7ddrphy_bitslip6_i, main_a7ddrphy_bitslip6_r[15:8]}; - case (main_a7ddrphy_bitslip6_value) - 1'd0: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[14:7]; - end - endcase - main_a7ddrphy_bitslip7_r <= {main_a7ddrphy_bitslip7_i, main_a7ddrphy_bitslip7_r[15:8]}; - case (main_a7ddrphy_bitslip7_value) - 1'd0: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[14:7]; - end - endcase - main_a7ddrphy_bitslip8_r <= {main_a7ddrphy_bitslip8_i, main_a7ddrphy_bitslip8_r[15:8]}; - case (main_a7ddrphy_bitslip8_value) - 1'd0: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[14:7]; - end - endcase - main_a7ddrphy_bitslip9_r <= {main_a7ddrphy_bitslip9_i, main_a7ddrphy_bitslip9_r[15:8]}; - case (main_a7ddrphy_bitslip9_value) - 1'd0: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[14:7]; - end - endcase - main_a7ddrphy_bitslip10_r <= {main_a7ddrphy_bitslip10_i, main_a7ddrphy_bitslip10_r[15:8]}; - case (main_a7ddrphy_bitslip10_value) - 1'd0: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[14:7]; - end - endcase - main_a7ddrphy_bitslip11_r <= {main_a7ddrphy_bitslip11_i, main_a7ddrphy_bitslip11_r[15:8]}; - case (main_a7ddrphy_bitslip11_value) - 1'd0: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[14:7]; - end - endcase - main_a7ddrphy_bitslip12_r <= {main_a7ddrphy_bitslip12_i, main_a7ddrphy_bitslip12_r[15:8]}; - case (main_a7ddrphy_bitslip12_value) - 1'd0: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[14:7]; - end - endcase - main_a7ddrphy_bitslip13_r <= {main_a7ddrphy_bitslip13_i, main_a7ddrphy_bitslip13_r[15:8]}; - case (main_a7ddrphy_bitslip13_value) - 1'd0: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[14:7]; - end - endcase - main_a7ddrphy_bitslip14_r <= {main_a7ddrphy_bitslip14_i, main_a7ddrphy_bitslip14_r[15:8]}; - case (main_a7ddrphy_bitslip14_value) - 1'd0: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[14:7]; - end - endcase - main_a7ddrphy_bitslip15_r <= {main_a7ddrphy_bitslip15_i, main_a7ddrphy_bitslip15_r[15:8]}; - case (main_a7ddrphy_bitslip15_value) - 1'd0: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[14:7]; - end - endcase - if (main_sdram_inti_p0_rddata_valid) begin - main_sdram_phaseinjector0_status <= main_sdram_inti_p0_rddata; - end - if (main_sdram_inti_p1_rddata_valid) begin - main_sdram_phaseinjector1_status <= main_sdram_inti_p1_rddata; - end - if (main_sdram_inti_p2_rddata_valid) begin - main_sdram_phaseinjector2_status <= main_sdram_inti_p2_rddata; - end - if (main_sdram_inti_p3_rddata_valid) begin - main_sdram_phaseinjector3_status <= main_sdram_inti_p3_rddata; - end - if ((main_sdram_timer_wait & (~main_sdram_timer_done0))) begin - main_sdram_timer_count1 <= (main_sdram_timer_count1 - 1'd1); - end else begin - main_sdram_timer_count1 <= 9'd468; - end - main_sdram_postponer_req_o <= 1'd0; - if (main_sdram_postponer_req_i) begin - main_sdram_postponer_count <= (main_sdram_postponer_count - 1'd1); - if ((main_sdram_postponer_count == 1'd0)) begin - main_sdram_postponer_count <= 1'd0; - main_sdram_postponer_req_o <= 1'd1; - end - end - if (main_sdram_sequencer_start0) begin - main_sdram_sequencer_count <= 1'd0; - end else begin - if (main_sdram_sequencer_done1) begin - if ((main_sdram_sequencer_count != 1'd0)) begin - main_sdram_sequencer_count <= (main_sdram_sequencer_count - 1'd1); - end - end - end - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd0; - main_sdram_sequencer_done1 <= 1'd0; - if ((main_sdram_sequencer_start1 & (main_sdram_sequencer_counter == 1'd0))) begin - main_sdram_cmd_payload_a <= 11'd1024; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd1; - main_sdram_cmd_payload_we <= 1'd1; - end - if ((main_sdram_sequencer_counter == 2'd2)) begin - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd1; - main_sdram_cmd_payload_ras <= 1'd1; - main_sdram_cmd_payload_we <= 1'd0; - end - if ((main_sdram_sequencer_counter == 6'd34)) begin - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd0; - main_sdram_sequencer_done1 <= 1'd1; - end - if ((main_sdram_sequencer_counter == 6'd34)) begin - main_sdram_sequencer_counter <= 1'd0; - end else begin - if ((main_sdram_sequencer_counter != 1'd0)) begin - main_sdram_sequencer_counter <= (main_sdram_sequencer_counter + 1'd1); - end else begin - if (main_sdram_sequencer_start1) begin - main_sdram_sequencer_counter <= 1'd1; - end - end - end - if ((main_sdram_zqcs_timer_wait & (~main_sdram_zqcs_timer_done0))) begin - main_sdram_zqcs_timer_count1 <= (main_sdram_zqcs_timer_count1 - 1'd1); - end else begin - main_sdram_zqcs_timer_count1 <= 26'd59999999; - end - main_sdram_zqcs_executer_done <= 1'd0; - if ((main_sdram_zqcs_executer_start & (main_sdram_zqcs_executer_counter == 1'd0))) begin - main_sdram_cmd_payload_a <= 11'd1024; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd1; - main_sdram_cmd_payload_we <= 1'd1; - end - if ((main_sdram_zqcs_executer_counter == 2'd2)) begin - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd1; - end - if ((main_sdram_zqcs_executer_counter == 5'd18)) begin - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd0; - main_sdram_zqcs_executer_done <= 1'd1; - end - if ((main_sdram_zqcs_executer_counter == 5'd18)) begin - main_sdram_zqcs_executer_counter <= 1'd0; - end else begin - if ((main_sdram_zqcs_executer_counter != 1'd0)) begin - main_sdram_zqcs_executer_counter <= (main_sdram_zqcs_executer_counter + 1'd1); - end else begin - if (main_sdram_zqcs_executer_start) begin - main_sdram_zqcs_executer_counter <= 1'd1; - end - end - end - builder_refresher_state <= builder_refresher_next_state; - if (main_sdram_bankmachine0_row_close) begin - main_sdram_bankmachine0_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine0_row_open) begin - main_sdram_bankmachine0_row_opened <= 1'd1; - main_sdram_bankmachine0_row <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine0_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine0_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready)) begin - main_sdram_bankmachine0_cmd_buffer_source_valid <= main_sdram_bankmachine0_cmd_buffer_sink_valid; - main_sdram_bankmachine0_cmd_buffer_source_first <= main_sdram_bankmachine0_cmd_buffer_sink_first; - main_sdram_bankmachine0_cmd_buffer_source_last <= main_sdram_bankmachine0_cmd_buffer_sink_last; - main_sdram_bankmachine0_cmd_buffer_source_payload_we <= main_sdram_bankmachine0_cmd_buffer_sink_payload_we; - main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine0_twtpcon_valid) begin - main_sdram_bankmachine0_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine0_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine0_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine0_twtpcon_ready)) begin - main_sdram_bankmachine0_twtpcon_count <= (main_sdram_bankmachine0_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine0_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine0_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine0_trccon_valid) begin - main_sdram_bankmachine0_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine0_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine0_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine0_trccon_ready)) begin - main_sdram_bankmachine0_trccon_count <= (main_sdram_bankmachine0_trccon_count - 1'd1); - if ((main_sdram_bankmachine0_trccon_count == 1'd1)) begin - main_sdram_bankmachine0_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine0_trascon_valid) begin - main_sdram_bankmachine0_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine0_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine0_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine0_trascon_ready)) begin - main_sdram_bankmachine0_trascon_count <= (main_sdram_bankmachine0_trascon_count - 1'd1); - if ((main_sdram_bankmachine0_trascon_count == 1'd1)) begin - main_sdram_bankmachine0_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine0_state <= builder_bankmachine0_next_state; - if (main_sdram_bankmachine1_row_close) begin - main_sdram_bankmachine1_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine1_row_open) begin - main_sdram_bankmachine1_row_opened <= 1'd1; - main_sdram_bankmachine1_row <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine1_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine1_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready)) begin - main_sdram_bankmachine1_cmd_buffer_source_valid <= main_sdram_bankmachine1_cmd_buffer_sink_valid; - main_sdram_bankmachine1_cmd_buffer_source_first <= main_sdram_bankmachine1_cmd_buffer_sink_first; - main_sdram_bankmachine1_cmd_buffer_source_last <= main_sdram_bankmachine1_cmd_buffer_sink_last; - main_sdram_bankmachine1_cmd_buffer_source_payload_we <= main_sdram_bankmachine1_cmd_buffer_sink_payload_we; - main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine1_twtpcon_valid) begin - main_sdram_bankmachine1_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine1_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine1_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine1_twtpcon_ready)) begin - main_sdram_bankmachine1_twtpcon_count <= (main_sdram_bankmachine1_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine1_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine1_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine1_trccon_valid) begin - main_sdram_bankmachine1_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine1_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine1_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine1_trccon_ready)) begin - main_sdram_bankmachine1_trccon_count <= (main_sdram_bankmachine1_trccon_count - 1'd1); - if ((main_sdram_bankmachine1_trccon_count == 1'd1)) begin - main_sdram_bankmachine1_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine1_trascon_valid) begin - main_sdram_bankmachine1_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine1_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine1_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine1_trascon_ready)) begin - main_sdram_bankmachine1_trascon_count <= (main_sdram_bankmachine1_trascon_count - 1'd1); - if ((main_sdram_bankmachine1_trascon_count == 1'd1)) begin - main_sdram_bankmachine1_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine1_state <= builder_bankmachine1_next_state; - if (main_sdram_bankmachine2_row_close) begin - main_sdram_bankmachine2_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine2_row_open) begin - main_sdram_bankmachine2_row_opened <= 1'd1; - main_sdram_bankmachine2_row <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine2_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine2_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready)) begin - main_sdram_bankmachine2_cmd_buffer_source_valid <= main_sdram_bankmachine2_cmd_buffer_sink_valid; - main_sdram_bankmachine2_cmd_buffer_source_first <= main_sdram_bankmachine2_cmd_buffer_sink_first; - main_sdram_bankmachine2_cmd_buffer_source_last <= main_sdram_bankmachine2_cmd_buffer_sink_last; - main_sdram_bankmachine2_cmd_buffer_source_payload_we <= main_sdram_bankmachine2_cmd_buffer_sink_payload_we; - main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine2_twtpcon_valid) begin - main_sdram_bankmachine2_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine2_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine2_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine2_twtpcon_ready)) begin - main_sdram_bankmachine2_twtpcon_count <= (main_sdram_bankmachine2_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine2_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine2_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine2_trccon_valid) begin - main_sdram_bankmachine2_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine2_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine2_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine2_trccon_ready)) begin - main_sdram_bankmachine2_trccon_count <= (main_sdram_bankmachine2_trccon_count - 1'd1); - if ((main_sdram_bankmachine2_trccon_count == 1'd1)) begin - main_sdram_bankmachine2_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine2_trascon_valid) begin - main_sdram_bankmachine2_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine2_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine2_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine2_trascon_ready)) begin - main_sdram_bankmachine2_trascon_count <= (main_sdram_bankmachine2_trascon_count - 1'd1); - if ((main_sdram_bankmachine2_trascon_count == 1'd1)) begin - main_sdram_bankmachine2_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine2_state <= builder_bankmachine2_next_state; - if (main_sdram_bankmachine3_row_close) begin - main_sdram_bankmachine3_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine3_row_open) begin - main_sdram_bankmachine3_row_opened <= 1'd1; - main_sdram_bankmachine3_row <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine3_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine3_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready)) begin - main_sdram_bankmachine3_cmd_buffer_source_valid <= main_sdram_bankmachine3_cmd_buffer_sink_valid; - main_sdram_bankmachine3_cmd_buffer_source_first <= main_sdram_bankmachine3_cmd_buffer_sink_first; - main_sdram_bankmachine3_cmd_buffer_source_last <= main_sdram_bankmachine3_cmd_buffer_sink_last; - main_sdram_bankmachine3_cmd_buffer_source_payload_we <= main_sdram_bankmachine3_cmd_buffer_sink_payload_we; - main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine3_twtpcon_valid) begin - main_sdram_bankmachine3_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine3_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine3_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine3_twtpcon_ready)) begin - main_sdram_bankmachine3_twtpcon_count <= (main_sdram_bankmachine3_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine3_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine3_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine3_trccon_valid) begin - main_sdram_bankmachine3_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine3_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine3_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine3_trccon_ready)) begin - main_sdram_bankmachine3_trccon_count <= (main_sdram_bankmachine3_trccon_count - 1'd1); - if ((main_sdram_bankmachine3_trccon_count == 1'd1)) begin - main_sdram_bankmachine3_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine3_trascon_valid) begin - main_sdram_bankmachine3_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine3_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine3_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine3_trascon_ready)) begin - main_sdram_bankmachine3_trascon_count <= (main_sdram_bankmachine3_trascon_count - 1'd1); - if ((main_sdram_bankmachine3_trascon_count == 1'd1)) begin - main_sdram_bankmachine3_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine3_state <= builder_bankmachine3_next_state; - if (main_sdram_bankmachine4_row_close) begin - main_sdram_bankmachine4_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine4_row_open) begin - main_sdram_bankmachine4_row_opened <= 1'd1; - main_sdram_bankmachine4_row <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine4_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine4_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready)) begin - main_sdram_bankmachine4_cmd_buffer_source_valid <= main_sdram_bankmachine4_cmd_buffer_sink_valid; - main_sdram_bankmachine4_cmd_buffer_source_first <= main_sdram_bankmachine4_cmd_buffer_sink_first; - main_sdram_bankmachine4_cmd_buffer_source_last <= main_sdram_bankmachine4_cmd_buffer_sink_last; - main_sdram_bankmachine4_cmd_buffer_source_payload_we <= main_sdram_bankmachine4_cmd_buffer_sink_payload_we; - main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine4_twtpcon_valid) begin - main_sdram_bankmachine4_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine4_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine4_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine4_twtpcon_ready)) begin - main_sdram_bankmachine4_twtpcon_count <= (main_sdram_bankmachine4_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine4_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine4_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine4_trccon_valid) begin - main_sdram_bankmachine4_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine4_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine4_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine4_trccon_ready)) begin - main_sdram_bankmachine4_trccon_count <= (main_sdram_bankmachine4_trccon_count - 1'd1); - if ((main_sdram_bankmachine4_trccon_count == 1'd1)) begin - main_sdram_bankmachine4_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine4_trascon_valid) begin - main_sdram_bankmachine4_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine4_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine4_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine4_trascon_ready)) begin - main_sdram_bankmachine4_trascon_count <= (main_sdram_bankmachine4_trascon_count - 1'd1); - if ((main_sdram_bankmachine4_trascon_count == 1'd1)) begin - main_sdram_bankmachine4_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine4_state <= builder_bankmachine4_next_state; - if (main_sdram_bankmachine5_row_close) begin - main_sdram_bankmachine5_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine5_row_open) begin - main_sdram_bankmachine5_row_opened <= 1'd1; - main_sdram_bankmachine5_row <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine5_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine5_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready)) begin - main_sdram_bankmachine5_cmd_buffer_source_valid <= main_sdram_bankmachine5_cmd_buffer_sink_valid; - main_sdram_bankmachine5_cmd_buffer_source_first <= main_sdram_bankmachine5_cmd_buffer_sink_first; - main_sdram_bankmachine5_cmd_buffer_source_last <= main_sdram_bankmachine5_cmd_buffer_sink_last; - main_sdram_bankmachine5_cmd_buffer_source_payload_we <= main_sdram_bankmachine5_cmd_buffer_sink_payload_we; - main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine5_twtpcon_valid) begin - main_sdram_bankmachine5_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine5_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine5_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine5_twtpcon_ready)) begin - main_sdram_bankmachine5_twtpcon_count <= (main_sdram_bankmachine5_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine5_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine5_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine5_trccon_valid) begin - main_sdram_bankmachine5_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine5_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine5_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine5_trccon_ready)) begin - main_sdram_bankmachine5_trccon_count <= (main_sdram_bankmachine5_trccon_count - 1'd1); - if ((main_sdram_bankmachine5_trccon_count == 1'd1)) begin - main_sdram_bankmachine5_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine5_trascon_valid) begin - main_sdram_bankmachine5_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine5_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine5_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine5_trascon_ready)) begin - main_sdram_bankmachine5_trascon_count <= (main_sdram_bankmachine5_trascon_count - 1'd1); - if ((main_sdram_bankmachine5_trascon_count == 1'd1)) begin - main_sdram_bankmachine5_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine5_state <= builder_bankmachine5_next_state; - if (main_sdram_bankmachine6_row_close) begin - main_sdram_bankmachine6_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine6_row_open) begin - main_sdram_bankmachine6_row_opened <= 1'd1; - main_sdram_bankmachine6_row <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine6_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine6_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready)) begin - main_sdram_bankmachine6_cmd_buffer_source_valid <= main_sdram_bankmachine6_cmd_buffer_sink_valid; - main_sdram_bankmachine6_cmd_buffer_source_first <= main_sdram_bankmachine6_cmd_buffer_sink_first; - main_sdram_bankmachine6_cmd_buffer_source_last <= main_sdram_bankmachine6_cmd_buffer_sink_last; - main_sdram_bankmachine6_cmd_buffer_source_payload_we <= main_sdram_bankmachine6_cmd_buffer_sink_payload_we; - main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine6_twtpcon_valid) begin - main_sdram_bankmachine6_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine6_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine6_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine6_twtpcon_ready)) begin - main_sdram_bankmachine6_twtpcon_count <= (main_sdram_bankmachine6_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine6_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine6_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine6_trccon_valid) begin - main_sdram_bankmachine6_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine6_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine6_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine6_trccon_ready)) begin - main_sdram_bankmachine6_trccon_count <= (main_sdram_bankmachine6_trccon_count - 1'd1); - if ((main_sdram_bankmachine6_trccon_count == 1'd1)) begin - main_sdram_bankmachine6_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine6_trascon_valid) begin - main_sdram_bankmachine6_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine6_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine6_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine6_trascon_ready)) begin - main_sdram_bankmachine6_trascon_count <= (main_sdram_bankmachine6_trascon_count - 1'd1); - if ((main_sdram_bankmachine6_trascon_count == 1'd1)) begin - main_sdram_bankmachine6_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine6_state <= builder_bankmachine6_next_state; - if (main_sdram_bankmachine7_row_close) begin - main_sdram_bankmachine7_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine7_row_open) begin - main_sdram_bankmachine7_row_opened <= 1'd1; - main_sdram_bankmachine7_row <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine7_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine7_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready)) begin - main_sdram_bankmachine7_cmd_buffer_source_valid <= main_sdram_bankmachine7_cmd_buffer_sink_valid; - main_sdram_bankmachine7_cmd_buffer_source_first <= main_sdram_bankmachine7_cmd_buffer_sink_first; - main_sdram_bankmachine7_cmd_buffer_source_last <= main_sdram_bankmachine7_cmd_buffer_sink_last; - main_sdram_bankmachine7_cmd_buffer_source_payload_we <= main_sdram_bankmachine7_cmd_buffer_sink_payload_we; - main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine7_twtpcon_valid) begin - main_sdram_bankmachine7_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine7_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine7_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine7_twtpcon_ready)) begin - main_sdram_bankmachine7_twtpcon_count <= (main_sdram_bankmachine7_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine7_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine7_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine7_trccon_valid) begin - main_sdram_bankmachine7_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine7_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine7_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine7_trccon_ready)) begin - main_sdram_bankmachine7_trccon_count <= (main_sdram_bankmachine7_trccon_count - 1'd1); - if ((main_sdram_bankmachine7_trccon_count == 1'd1)) begin - main_sdram_bankmachine7_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine7_trascon_valid) begin - main_sdram_bankmachine7_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine7_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine7_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine7_trascon_ready)) begin - main_sdram_bankmachine7_trascon_count <= (main_sdram_bankmachine7_trascon_count - 1'd1); - if ((main_sdram_bankmachine7_trascon_count == 1'd1)) begin - main_sdram_bankmachine7_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine7_state <= builder_bankmachine7_next_state; - if ((~main_sdram_en0)) begin - main_sdram_time0 <= 5'd31; - end else begin - if ((~main_sdram_max_time0)) begin - main_sdram_time0 <= (main_sdram_time0 - 1'd1); - end - end - if ((~main_sdram_en1)) begin - main_sdram_time1 <= 4'd15; - end else begin - if ((~main_sdram_max_time1)) begin - main_sdram_time1 <= (main_sdram_time1 - 1'd1); - end - end - if (main_sdram_choose_cmd_ce) begin - case (main_sdram_choose_cmd_grant) - 1'd0: begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end - end - end - end - end - end - end - end - 1'd1: begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end - end - end - end - end - end - end - end - 2'd2: begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end - end - end - end - end - end - end - end - 2'd3: begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end - end - end - end - end - end - end - end - 3'd4: begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end - end - end - end - end - end - end - end - 3'd5: begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end - end - end - end - end - end - end - end - 3'd6: begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end - end - end - end - end - end - end - end - 3'd7: begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end - end - end - end - end - end - end - end - endcase - end - if (main_sdram_choose_req_ce) begin - case (main_sdram_choose_req_grant) - 1'd0: begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end - end - end - end - end - end - end - end - 1'd1: begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end - end - end - end - end - end - end - end - 2'd2: begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end - end - end - end - end - end - end - end - 2'd3: begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end - end - end - end - end - end - end - end - 3'd4: begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end - end - end - end - end - end - end - end - 3'd5: begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end - end - end - end - end - end - end - end - 3'd6: begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end - end - end - end - end - end - end - end - 3'd7: begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end - end - end - end - end - end - end - end - endcase - end - main_sdram_dfi_p0_cs_n <= 1'd0; - main_sdram_dfi_p0_bank <= builder_array_muxed0; - main_sdram_dfi_p0_address <= builder_array_muxed1; - main_sdram_dfi_p0_cas_n <= (~builder_array_muxed2); - main_sdram_dfi_p0_ras_n <= (~builder_array_muxed3); - main_sdram_dfi_p0_we_n <= (~builder_array_muxed4); - main_sdram_dfi_p0_rddata_en <= builder_array_muxed5; - main_sdram_dfi_p0_wrdata_en <= builder_array_muxed6; - main_sdram_dfi_p1_cs_n <= 1'd0; - main_sdram_dfi_p1_bank <= builder_array_muxed7; - main_sdram_dfi_p1_address <= builder_array_muxed8; - main_sdram_dfi_p1_cas_n <= (~builder_array_muxed9); - main_sdram_dfi_p1_ras_n <= (~builder_array_muxed10); - main_sdram_dfi_p1_we_n <= (~builder_array_muxed11); - main_sdram_dfi_p1_rddata_en <= builder_array_muxed12; - main_sdram_dfi_p1_wrdata_en <= builder_array_muxed13; - main_sdram_dfi_p2_cs_n <= 1'd0; - main_sdram_dfi_p2_bank <= builder_array_muxed14; - main_sdram_dfi_p2_address <= builder_array_muxed15; - main_sdram_dfi_p2_cas_n <= (~builder_array_muxed16); - main_sdram_dfi_p2_ras_n <= (~builder_array_muxed17); - main_sdram_dfi_p2_we_n <= (~builder_array_muxed18); - main_sdram_dfi_p2_rddata_en <= builder_array_muxed19; - main_sdram_dfi_p2_wrdata_en <= builder_array_muxed20; - main_sdram_dfi_p3_cs_n <= 1'd0; - main_sdram_dfi_p3_bank <= builder_array_muxed21; - main_sdram_dfi_p3_address <= builder_array_muxed22; - main_sdram_dfi_p3_cas_n <= (~builder_array_muxed23); - main_sdram_dfi_p3_ras_n <= (~builder_array_muxed24); - main_sdram_dfi_p3_we_n <= (~builder_array_muxed25); - main_sdram_dfi_p3_rddata_en <= builder_array_muxed26; - main_sdram_dfi_p3_wrdata_en <= builder_array_muxed27; - if (main_sdram_trrdcon_valid) begin - main_sdram_trrdcon_count <= 1'd1; - if (1'd0) begin - main_sdram_trrdcon_ready <= 1'd1; - end else begin - main_sdram_trrdcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_trrdcon_ready)) begin - main_sdram_trrdcon_count <= (main_sdram_trrdcon_count - 1'd1); - if ((main_sdram_trrdcon_count == 1'd1)) begin - main_sdram_trrdcon_ready <= 1'd1; - end - end - end - main_sdram_tfawcon_window <= {main_sdram_tfawcon_window, main_sdram_tfawcon_valid}; - if ((main_sdram_tfawcon_count < 3'd4)) begin - if ((main_sdram_tfawcon_count == 2'd3)) begin - main_sdram_tfawcon_ready <= (~main_sdram_tfawcon_valid); - end else begin - main_sdram_tfawcon_ready <= 1'd1; - end - end - if (main_sdram_tccdcon_valid) begin - main_sdram_tccdcon_count <= 1'd0; - if (1'd1) begin - main_sdram_tccdcon_ready <= 1'd1; - end else begin - main_sdram_tccdcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_tccdcon_ready)) begin - main_sdram_tccdcon_count <= (main_sdram_tccdcon_count - 1'd1); - if ((main_sdram_tccdcon_count == 1'd1)) begin - main_sdram_tccdcon_ready <= 1'd1; - end - end - end - if (main_sdram_twtrcon_valid) begin - main_sdram_twtrcon_count <= 3'd4; - if (1'd0) begin - main_sdram_twtrcon_ready <= 1'd1; - end else begin - main_sdram_twtrcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_twtrcon_ready)) begin - main_sdram_twtrcon_count <= (main_sdram_twtrcon_count - 1'd1); - if ((main_sdram_twtrcon_count == 1'd1)) begin - main_sdram_twtrcon_ready <= 1'd1; - end - end - end - builder_multiplexer_state <= builder_multiplexer_next_state; - if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) begin - builder_rbank <= 1'd0; - end - if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) begin - builder_wbank <= 1'd0; - end - if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) begin - builder_rbank <= 1'd1; - end - if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) begin - builder_wbank <= 1'd1; - end - if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) begin - builder_rbank <= 2'd2; - end - if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) begin - builder_wbank <= 2'd2; - end - if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) begin - builder_rbank <= 2'd3; - end - if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) begin - builder_wbank <= 2'd3; - end - if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) begin - builder_rbank <= 3'd4; - end - if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) begin - builder_wbank <= 3'd4; - end - if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) begin - builder_rbank <= 3'd5; - end - if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) begin - builder_wbank <= 3'd5; - end - if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) begin - builder_rbank <= 3'd6; - end - if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) begin - builder_wbank <= 3'd6; - end - if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)) begin - builder_rbank <= 3'd7; - end - if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)) begin - builder_wbank <= 3'd7; - end - builder_new_master_wdata_ready0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)); - builder_new_master_wdata_ready1 <= builder_new_master_wdata_ready0; - builder_new_master_wdata_ready2 <= builder_new_master_wdata_ready1; - builder_new_master_rdata_valid0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)); - builder_new_master_rdata_valid1 <= builder_new_master_rdata_valid0; - builder_new_master_rdata_valid2 <= builder_new_master_rdata_valid1; - builder_new_master_rdata_valid3 <= builder_new_master_rdata_valid2; - builder_new_master_rdata_valid4 <= builder_new_master_rdata_valid3; - builder_new_master_rdata_valid5 <= builder_new_master_rdata_valid4; - builder_new_master_rdata_valid6 <= builder_new_master_rdata_valid5; - builder_new_master_rdata_valid7 <= builder_new_master_rdata_valid6; - builder_new_master_rdata_valid8 <= builder_new_master_rdata_valid7; - builder_new_master_rdata_valid9 <= builder_new_master_rdata_valid8; - main_adr_offset_r <= main_interface0_wb_sdram_adr[1:0]; - builder_fullmemorywe_state <= builder_fullmemorywe_next_state; - builder_litedramwishbone2native_state <= builder_litedramwishbone2native_next_state; - if (main_count_next_value_ce) begin - main_count <= main_count_next_value; - end - case (builder_minsoc_grant) - 1'd0: begin - if ((~builder_minsoc_request[0])) begin - if (builder_minsoc_request[1]) begin - builder_minsoc_grant <= 1'd1; - end - end - end - 1'd1: begin - if ((~builder_minsoc_request[1])) begin - if (builder_minsoc_request[0]) begin - builder_minsoc_grant <= 1'd0; - end - end - end - endcase - builder_minsoc_slave_sel_r <= builder_minsoc_slave_sel; - if (builder_minsoc_wait) begin - if ((~builder_minsoc_done)) begin - builder_minsoc_count <= (builder_minsoc_count - 1'd1); - end - end else begin - builder_minsoc_count <= 20'd1000000; - end - builder_minsoc_interface0_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank0_sel) begin - case (builder_minsoc_interface0_bank_bus_adr[3:0]) - 1'd0: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_reset0_w; - end - 1'd1: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch3_w; - end - 2'd2: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch2_w; - end - 2'd3: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch1_w; - end - 3'd4: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch0_w; - end - 3'd5: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors3_w; - end - 3'd6: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors2_w; - end - 3'd7: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors1_w; - end - 4'd8: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors0_w; - end - endcase - end - if (builder_minsoc_csrbank0_reset0_re) begin - main_minsoc_ctrl_reset_storage <= builder_minsoc_csrbank0_reset0_r; - end - main_minsoc_ctrl_reset_re <= builder_minsoc_csrbank0_reset0_re; - if (builder_minsoc_csrbank0_scratch3_re) begin - main_minsoc_ctrl_scratch_storage[31:24] <= builder_minsoc_csrbank0_scratch3_r; - end - if (builder_minsoc_csrbank0_scratch2_re) begin - main_minsoc_ctrl_scratch_storage[23:16] <= builder_minsoc_csrbank0_scratch2_r; - end - if (builder_minsoc_csrbank0_scratch1_re) begin - main_minsoc_ctrl_scratch_storage[15:8] <= builder_minsoc_csrbank0_scratch1_r; - end - if (builder_minsoc_csrbank0_scratch0_re) begin - main_minsoc_ctrl_scratch_storage[7:0] <= builder_minsoc_csrbank0_scratch0_r; - end - main_minsoc_ctrl_scratch_re <= builder_minsoc_csrbank0_scratch0_re; - builder_minsoc_interface1_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank1_sel) begin - case (builder_minsoc_interface1_bank_bus_adr[2:0]) - 1'd0: begin - builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_half_sys8x_taps0_w; - end - 1'd1: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_rst_w; - end - 2'd2: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_inc_w; - end - 2'd3: begin - builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_dly_sel0_w; - end - 3'd4: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_rst_w; - end - 3'd5: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_inc_w; - end - 3'd6: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_rst_w; - end - 3'd7: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_w; - end - endcase - end - if (builder_minsoc_csrbank1_half_sys8x_taps0_re) begin - main_a7ddrphy_half_sys8x_taps_storage[4:0] <= builder_minsoc_csrbank1_half_sys8x_taps0_r; - end - main_a7ddrphy_half_sys8x_taps_re <= builder_minsoc_csrbank1_half_sys8x_taps0_re; - if (builder_minsoc_csrbank1_dly_sel0_re) begin - main_a7ddrphy_dly_sel_storage[1:0] <= builder_minsoc_csrbank1_dly_sel0_r; - end - main_a7ddrphy_dly_sel_re <= builder_minsoc_csrbank1_dly_sel0_re; - builder_minsoc_interface2_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank2_sel) begin - case (builder_minsoc_interface2_bank_bus_adr[5:0]) - 1'd0: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_control0_w; - end - 1'd1: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_command0_w; - end - 2'd2: begin - builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector0_command_issue_w; - end - 2'd3: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address1_w; - end - 3'd4: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address0_w; - end - 3'd5: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_baddress0_w; - end - 3'd6: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; - end - 3'd7: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; - end - 4'd8: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; - end - 4'd9: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; - end - 4'd10: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata3_w; - end - 4'd11: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata2_w; - end - 4'd12: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata1_w; - end - 4'd13: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata0_w; - end - 4'd14: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_command0_w; - end - 4'd15: begin - builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector1_command_issue_w; - end - 5'd16: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address1_w; - end - 5'd17: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address0_w; - end - 5'd18: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_baddress0_w; - end - 5'd19: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; - end - 5'd20: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; - end - 5'd21: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; - end - 5'd22: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; - end - 5'd23: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata3_w; - end - 5'd24: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata2_w; - end - 5'd25: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata1_w; - end - 5'd26: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata0_w; - end - 5'd27: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_command0_w; - end - 5'd28: begin - builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector2_command_issue_w; - end - 5'd29: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address1_w; - end - 5'd30: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address0_w; - end - 5'd31: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_baddress0_w; - end - 6'd32: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; - end - 6'd33: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; - end - 6'd34: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; - end - 6'd35: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; - end - 6'd36: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata3_w; - end - 6'd37: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata2_w; - end - 6'd38: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata1_w; - end - 6'd39: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata0_w; - end - 6'd40: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_command0_w; - end - 6'd41: begin - builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector3_command_issue_w; - end - 6'd42: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address1_w; - end - 6'd43: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address0_w; - end - 6'd44: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_baddress0_w; - end - 6'd45: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; - end - 6'd46: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; - end - 6'd47: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; - end - 6'd48: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; - end - 6'd49: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata3_w; - end - 6'd50: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata2_w; - end - 6'd51: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata1_w; - end - 6'd52: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata0_w; - end - endcase - end - if (builder_minsoc_csrbank2_dfii_control0_re) begin - main_sdram_storage[3:0] <= builder_minsoc_csrbank2_dfii_control0_r; - end - main_sdram_re <= builder_minsoc_csrbank2_dfii_control0_re; - if (builder_minsoc_csrbank2_dfii_pi0_command0_re) begin - main_sdram_phaseinjector0_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi0_command0_r; - end - main_sdram_phaseinjector0_command_re <= builder_minsoc_csrbank2_dfii_pi0_command0_re; - if (builder_minsoc_csrbank2_dfii_pi0_address1_re) begin - main_sdram_phaseinjector0_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi0_address1_r; - end - if (builder_minsoc_csrbank2_dfii_pi0_address0_re) begin - main_sdram_phaseinjector0_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_address0_r; - end - main_sdram_phaseinjector0_address_re <= builder_minsoc_csrbank2_dfii_pi0_address0_re; - if (builder_minsoc_csrbank2_dfii_pi0_baddress0_re) begin - main_sdram_phaseinjector0_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi0_baddress0_r; - end - main_sdram_phaseinjector0_baddress_re <= builder_minsoc_csrbank2_dfii_pi0_baddress0_re; - if (builder_minsoc_csrbank2_dfii_pi0_wrdata3_re) begin - main_sdram_phaseinjector0_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; - end - if (builder_minsoc_csrbank2_dfii_pi0_wrdata2_re) begin - main_sdram_phaseinjector0_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; - end - if (builder_minsoc_csrbank2_dfii_pi0_wrdata1_re) begin - main_sdram_phaseinjector0_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; - end - if (builder_minsoc_csrbank2_dfii_pi0_wrdata0_re) begin - main_sdram_phaseinjector0_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; - end - main_sdram_phaseinjector0_wrdata_re <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; - if (builder_minsoc_csrbank2_dfii_pi1_command0_re) begin - main_sdram_phaseinjector1_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi1_command0_r; - end - main_sdram_phaseinjector1_command_re <= builder_minsoc_csrbank2_dfii_pi1_command0_re; - if (builder_minsoc_csrbank2_dfii_pi1_address1_re) begin - main_sdram_phaseinjector1_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi1_address1_r; - end - if (builder_minsoc_csrbank2_dfii_pi1_address0_re) begin - main_sdram_phaseinjector1_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_address0_r; - end - main_sdram_phaseinjector1_address_re <= builder_minsoc_csrbank2_dfii_pi1_address0_re; - if (builder_minsoc_csrbank2_dfii_pi1_baddress0_re) begin - main_sdram_phaseinjector1_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi1_baddress0_r; - end - main_sdram_phaseinjector1_baddress_re <= builder_minsoc_csrbank2_dfii_pi1_baddress0_re; - if (builder_minsoc_csrbank2_dfii_pi1_wrdata3_re) begin - main_sdram_phaseinjector1_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; - end - if (builder_minsoc_csrbank2_dfii_pi1_wrdata2_re) begin - main_sdram_phaseinjector1_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; - end - if (builder_minsoc_csrbank2_dfii_pi1_wrdata1_re) begin - main_sdram_phaseinjector1_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; - end - if (builder_minsoc_csrbank2_dfii_pi1_wrdata0_re) begin - main_sdram_phaseinjector1_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; - end - main_sdram_phaseinjector1_wrdata_re <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; - if (builder_minsoc_csrbank2_dfii_pi2_command0_re) begin - main_sdram_phaseinjector2_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi2_command0_r; - end - main_sdram_phaseinjector2_command_re <= builder_minsoc_csrbank2_dfii_pi2_command0_re; - if (builder_minsoc_csrbank2_dfii_pi2_address1_re) begin - main_sdram_phaseinjector2_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi2_address1_r; - end - if (builder_minsoc_csrbank2_dfii_pi2_address0_re) begin - main_sdram_phaseinjector2_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_address0_r; - end - main_sdram_phaseinjector2_address_re <= builder_minsoc_csrbank2_dfii_pi2_address0_re; - if (builder_minsoc_csrbank2_dfii_pi2_baddress0_re) begin - main_sdram_phaseinjector2_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi2_baddress0_r; - end - main_sdram_phaseinjector2_baddress_re <= builder_minsoc_csrbank2_dfii_pi2_baddress0_re; - if (builder_minsoc_csrbank2_dfii_pi2_wrdata3_re) begin - main_sdram_phaseinjector2_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; - end - if (builder_minsoc_csrbank2_dfii_pi2_wrdata2_re) begin - main_sdram_phaseinjector2_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; - end - if (builder_minsoc_csrbank2_dfii_pi2_wrdata1_re) begin - main_sdram_phaseinjector2_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; - end - if (builder_minsoc_csrbank2_dfii_pi2_wrdata0_re) begin - main_sdram_phaseinjector2_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; - end - main_sdram_phaseinjector2_wrdata_re <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; - if (builder_minsoc_csrbank2_dfii_pi3_command0_re) begin - main_sdram_phaseinjector3_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi3_command0_r; - end - main_sdram_phaseinjector3_command_re <= builder_minsoc_csrbank2_dfii_pi3_command0_re; - if (builder_minsoc_csrbank2_dfii_pi3_address1_re) begin - main_sdram_phaseinjector3_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi3_address1_r; - end - if (builder_minsoc_csrbank2_dfii_pi3_address0_re) begin - main_sdram_phaseinjector3_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_address0_r; - end - main_sdram_phaseinjector3_address_re <= builder_minsoc_csrbank2_dfii_pi3_address0_re; - if (builder_minsoc_csrbank2_dfii_pi3_baddress0_re) begin - main_sdram_phaseinjector3_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi3_baddress0_r; - end - main_sdram_phaseinjector3_baddress_re <= builder_minsoc_csrbank2_dfii_pi3_baddress0_re; - if (builder_minsoc_csrbank2_dfii_pi3_wrdata3_re) begin - main_sdram_phaseinjector3_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; - end - if (builder_minsoc_csrbank2_dfii_pi3_wrdata2_re) begin - main_sdram_phaseinjector3_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; - end - if (builder_minsoc_csrbank2_dfii_pi3_wrdata1_re) begin - main_sdram_phaseinjector3_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; - end - if (builder_minsoc_csrbank2_dfii_pi3_wrdata0_re) begin - main_sdram_phaseinjector3_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; - end - main_sdram_phaseinjector3_wrdata_re <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; - builder_minsoc_interface3_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank3_sel) begin - case (builder_minsoc_interface3_bank_bus_adr[4:0]) - 1'd0: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load3_w; - end - 1'd1: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load2_w; - end - 2'd2: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load1_w; - end - 2'd3: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load0_w; - end - 3'd4: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload3_w; - end - 3'd5: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload2_w; - end - 3'd6: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload1_w; - end - 3'd7: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload0_w; - end - 4'd8: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_en0_w; - end - 4'd9: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_update_value0_w; - end - 4'd10: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value3_w; - end - 4'd11: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value2_w; - end - 4'd12: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value1_w; - end - 4'd13: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value0_w; - end - 4'd14: begin - builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_status_w; - end - 4'd15: begin - builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_pending_w; - end - 5'd16: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_ev_enable0_w; - end - endcase - end - if (builder_minsoc_csrbank3_load3_re) begin - main_minsoc_timer0_load_storage[31:24] <= builder_minsoc_csrbank3_load3_r; - end - if (builder_minsoc_csrbank3_load2_re) begin - main_minsoc_timer0_load_storage[23:16] <= builder_minsoc_csrbank3_load2_r; - end - if (builder_minsoc_csrbank3_load1_re) begin - main_minsoc_timer0_load_storage[15:8] <= builder_minsoc_csrbank3_load1_r; - end - if (builder_minsoc_csrbank3_load0_re) begin - main_minsoc_timer0_load_storage[7:0] <= builder_minsoc_csrbank3_load0_r; - end - main_minsoc_timer0_load_re <= builder_minsoc_csrbank3_load0_re; - if (builder_minsoc_csrbank3_reload3_re) begin - main_minsoc_timer0_reload_storage[31:24] <= builder_minsoc_csrbank3_reload3_r; - end - if (builder_minsoc_csrbank3_reload2_re) begin - main_minsoc_timer0_reload_storage[23:16] <= builder_minsoc_csrbank3_reload2_r; - end - if (builder_minsoc_csrbank3_reload1_re) begin - main_minsoc_timer0_reload_storage[15:8] <= builder_minsoc_csrbank3_reload1_r; - end - if (builder_minsoc_csrbank3_reload0_re) begin - main_minsoc_timer0_reload_storage[7:0] <= builder_minsoc_csrbank3_reload0_r; - end - main_minsoc_timer0_reload_re <= builder_minsoc_csrbank3_reload0_re; - if (builder_minsoc_csrbank3_en0_re) begin - main_minsoc_timer0_en_storage <= builder_minsoc_csrbank3_en0_r; - end - main_minsoc_timer0_en_re <= builder_minsoc_csrbank3_en0_re; - if (builder_minsoc_csrbank3_update_value0_re) begin - main_minsoc_timer0_update_value_storage <= builder_minsoc_csrbank3_update_value0_r; - end - main_minsoc_timer0_update_value_re <= builder_minsoc_csrbank3_update_value0_re; - if (builder_minsoc_csrbank3_ev_enable0_re) begin - main_minsoc_timer0_eventmanager_storage <= builder_minsoc_csrbank3_ev_enable0_r; - end - main_minsoc_timer0_eventmanager_re <= builder_minsoc_csrbank3_ev_enable0_re; - builder_minsoc_interface4_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank4_sel) begin - case (builder_minsoc_interface4_bank_bus_adr[2:0]) - 1'd0: begin - builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_rxtx_w; - end - 1'd1: begin - builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_txfull_w; - end - 2'd2: begin - builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_rxempty_w; - end - 2'd3: begin - builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_status_w; - end - 3'd4: begin - builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_pending_w; - end - 3'd5: begin - builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_ev_enable0_w; - end - endcase - end - if (builder_minsoc_csrbank4_ev_enable0_re) begin - main_minsoc_uart_eventmanager_storage[1:0] <= builder_minsoc_csrbank4_ev_enable0_r; - end - main_minsoc_uart_eventmanager_re <= builder_minsoc_csrbank4_ev_enable0_re; - builder_minsoc_interface5_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank5_sel) begin - case (builder_minsoc_interface5_bank_bus_adr[1:0]) - 1'd0: begin - builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word3_w; - end - 1'd1: begin - builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word2_w; - end - 2'd2: begin - builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word1_w; - end - 2'd3: begin - builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word0_w; - end - endcase - end - if (builder_minsoc_csrbank5_tuning_word3_re) begin - main_minsoc_storage[31:24] <= builder_minsoc_csrbank5_tuning_word3_r; - end - if (builder_minsoc_csrbank5_tuning_word2_re) begin - main_minsoc_storage[23:16] <= builder_minsoc_csrbank5_tuning_word2_r; - end - if (builder_minsoc_csrbank5_tuning_word1_re) begin - main_minsoc_storage[15:8] <= builder_minsoc_csrbank5_tuning_word1_r; - end - if (builder_minsoc_csrbank5_tuning_word0_re) begin - main_minsoc_storage[7:0] <= builder_minsoc_csrbank5_tuning_word0_r; - end - main_minsoc_re <= builder_minsoc_csrbank5_tuning_word0_re; - if (sys_rst) begin - main_minsoc_ctrl_reset_storage <= 1'd0; - main_minsoc_ctrl_reset_re <= 1'd0; - main_minsoc_ctrl_scratch_storage <= 32'd305419896; - main_minsoc_ctrl_scratch_re <= 1'd0; - main_minsoc_ctrl_bus_errors <= 32'd0; - main_minsoc_rom_bus_ack <= 1'd0; - main_minsoc_sram_bus_ack <= 1'd0; - serial_tx <= 1'd1; - main_minsoc_storage <= 32'd8246337; - main_minsoc_re <= 1'd0; - main_minsoc_sink_ready <= 1'd0; - main_minsoc_uart_clk_txen <= 1'd0; - main_minsoc_phase_accumulator_tx <= 32'd0; - main_minsoc_tx_reg <= 8'd0; - main_minsoc_tx_bitcount <= 4'd0; - main_minsoc_tx_busy <= 1'd0; - main_minsoc_source_valid <= 1'd0; - main_minsoc_source_payload_data <= 8'd0; - main_minsoc_uart_clk_rxen <= 1'd0; - main_minsoc_phase_accumulator_rx <= 32'd0; - main_minsoc_rx_r <= 1'd0; - main_minsoc_rx_reg <= 8'd0; - main_minsoc_rx_bitcount <= 4'd0; - main_minsoc_rx_busy <= 1'd0; - main_minsoc_uart_tx_pending <= 1'd0; - main_minsoc_uart_tx_old_trigger <= 1'd0; - main_minsoc_uart_rx_pending <= 1'd0; - main_minsoc_uart_rx_old_trigger <= 1'd0; - main_minsoc_uart_eventmanager_storage <= 2'd0; - main_minsoc_uart_eventmanager_re <= 1'd0; - main_minsoc_uart_tx_fifo_readable <= 1'd0; - main_minsoc_uart_tx_fifo_level0 <= 5'd0; - main_minsoc_uart_tx_fifo_produce <= 4'd0; - main_minsoc_uart_tx_fifo_consume <= 4'd0; - main_minsoc_uart_rx_fifo_readable <= 1'd0; - main_minsoc_uart_rx_fifo_level0 <= 5'd0; - main_minsoc_uart_rx_fifo_produce <= 4'd0; - main_minsoc_uart_rx_fifo_consume <= 4'd0; - main_minsoc_timer0_load_storage <= 32'd0; - main_minsoc_timer0_load_re <= 1'd0; - main_minsoc_timer0_reload_storage <= 32'd0; - main_minsoc_timer0_reload_re <= 1'd0; - main_minsoc_timer0_en_storage <= 1'd0; - main_minsoc_timer0_en_re <= 1'd0; - main_minsoc_timer0_update_value_storage <= 1'd0; - main_minsoc_timer0_update_value_re <= 1'd0; - main_minsoc_timer0_value_status <= 32'd0; - main_minsoc_timer0_zero_pending <= 1'd0; - main_minsoc_timer0_zero_old_trigger <= 1'd0; - main_minsoc_timer0_eventmanager_storage <= 1'd0; - main_minsoc_timer0_eventmanager_re <= 1'd0; - main_minsoc_timer0_value <= 32'd0; - main_a7ddrphy_half_sys8x_taps_storage <= 5'd13; - main_a7ddrphy_half_sys8x_taps_re <= 1'd0; - main_a7ddrphy_dly_sel_storage <= 2'd0; - main_a7ddrphy_dly_sel_re <= 1'd0; - main_a7ddrphy_dfi_p0_rddata_valid <= 1'd0; - main_a7ddrphy_dfi_p1_rddata_valid <= 1'd0; - main_a7ddrphy_dfi_p2_rddata_valid <= 1'd0; - main_a7ddrphy_dfi_p3_rddata_valid <= 1'd0; - main_a7ddrphy_oe_dqs <= 1'd0; - main_a7ddrphy_oe_dq <= 1'd0; - main_a7ddrphy_bitslip0_o <= 8'd0; - main_a7ddrphy_bitslip0_value <= 3'd0; - main_a7ddrphy_bitslip0_r <= 16'd0; - main_a7ddrphy_bitslip1_o <= 8'd0; - main_a7ddrphy_bitslip1_value <= 3'd0; - main_a7ddrphy_bitslip1_r <= 16'd0; - main_a7ddrphy_bitslip2_o <= 8'd0; - main_a7ddrphy_bitslip2_value <= 3'd0; - main_a7ddrphy_bitslip2_r <= 16'd0; - main_a7ddrphy_bitslip3_o <= 8'd0; - main_a7ddrphy_bitslip3_value <= 3'd0; - main_a7ddrphy_bitslip3_r <= 16'd0; - main_a7ddrphy_bitslip4_o <= 8'd0; - main_a7ddrphy_bitslip4_value <= 3'd0; - main_a7ddrphy_bitslip4_r <= 16'd0; - main_a7ddrphy_bitslip5_o <= 8'd0; - main_a7ddrphy_bitslip5_value <= 3'd0; - main_a7ddrphy_bitslip5_r <= 16'd0; - main_a7ddrphy_bitslip6_o <= 8'd0; - main_a7ddrphy_bitslip6_value <= 3'd0; - main_a7ddrphy_bitslip6_r <= 16'd0; - main_a7ddrphy_bitslip7_o <= 8'd0; - main_a7ddrphy_bitslip7_value <= 3'd0; - main_a7ddrphy_bitslip7_r <= 16'd0; - main_a7ddrphy_bitslip8_o <= 8'd0; - main_a7ddrphy_bitslip8_value <= 3'd0; - main_a7ddrphy_bitslip8_r <= 16'd0; - main_a7ddrphy_bitslip9_o <= 8'd0; - main_a7ddrphy_bitslip9_value <= 3'd0; - main_a7ddrphy_bitslip9_r <= 16'd0; - main_a7ddrphy_bitslip10_o <= 8'd0; - main_a7ddrphy_bitslip10_value <= 3'd0; - main_a7ddrphy_bitslip10_r <= 16'd0; - main_a7ddrphy_bitslip11_o <= 8'd0; - main_a7ddrphy_bitslip11_value <= 3'd0; - main_a7ddrphy_bitslip11_r <= 16'd0; - main_a7ddrphy_bitslip12_o <= 8'd0; - main_a7ddrphy_bitslip12_value <= 3'd0; - main_a7ddrphy_bitslip12_r <= 16'd0; - main_a7ddrphy_bitslip13_o <= 8'd0; - main_a7ddrphy_bitslip13_value <= 3'd0; - main_a7ddrphy_bitslip13_r <= 16'd0; - main_a7ddrphy_bitslip14_o <= 8'd0; - main_a7ddrphy_bitslip14_value <= 3'd0; - main_a7ddrphy_bitslip14_r <= 16'd0; - main_a7ddrphy_bitslip15_o <= 8'd0; - main_a7ddrphy_bitslip15_value <= 3'd0; - main_a7ddrphy_bitslip15_r <= 16'd0; - main_a7ddrphy_n_rddata_en0 <= 1'd0; - main_a7ddrphy_n_rddata_en1 <= 1'd0; - main_a7ddrphy_n_rddata_en2 <= 1'd0; - main_a7ddrphy_n_rddata_en3 <= 1'd0; - main_a7ddrphy_n_rddata_en4 <= 1'd0; - main_a7ddrphy_n_rddata_en5 <= 1'd0; - main_a7ddrphy_n_rddata_en6 <= 1'd0; - main_a7ddrphy_n_rddata_en7 <= 1'd0; - main_a7ddrphy_last_wrdata_en <= 4'd0; - main_sdram_storage <= 4'd0; - main_sdram_re <= 1'd0; - main_sdram_phaseinjector0_command_storage <= 6'd0; - main_sdram_phaseinjector0_command_re <= 1'd0; - main_sdram_phaseinjector0_address_storage <= 14'd0; - main_sdram_phaseinjector0_address_re <= 1'd0; - main_sdram_phaseinjector0_baddress_storage <= 3'd0; - main_sdram_phaseinjector0_baddress_re <= 1'd0; - main_sdram_phaseinjector0_wrdata_storage <= 32'd0; - main_sdram_phaseinjector0_wrdata_re <= 1'd0; - main_sdram_phaseinjector0_status <= 32'd0; - main_sdram_phaseinjector1_command_storage <= 6'd0; - main_sdram_phaseinjector1_command_re <= 1'd0; - main_sdram_phaseinjector1_address_storage <= 14'd0; - main_sdram_phaseinjector1_address_re <= 1'd0; - main_sdram_phaseinjector1_baddress_storage <= 3'd0; - main_sdram_phaseinjector1_baddress_re <= 1'd0; - main_sdram_phaseinjector1_wrdata_storage <= 32'd0; - main_sdram_phaseinjector1_wrdata_re <= 1'd0; - main_sdram_phaseinjector1_status <= 32'd0; - main_sdram_phaseinjector2_command_storage <= 6'd0; - main_sdram_phaseinjector2_command_re <= 1'd0; - main_sdram_phaseinjector2_address_storage <= 14'd0; - main_sdram_phaseinjector2_address_re <= 1'd0; - main_sdram_phaseinjector2_baddress_storage <= 3'd0; - main_sdram_phaseinjector2_baddress_re <= 1'd0; - main_sdram_phaseinjector2_wrdata_storage <= 32'd0; - main_sdram_phaseinjector2_wrdata_re <= 1'd0; - main_sdram_phaseinjector2_status <= 32'd0; - main_sdram_phaseinjector3_command_storage <= 6'd0; - main_sdram_phaseinjector3_command_re <= 1'd0; - main_sdram_phaseinjector3_address_storage <= 14'd0; - main_sdram_phaseinjector3_address_re <= 1'd0; - main_sdram_phaseinjector3_baddress_storage <= 3'd0; - main_sdram_phaseinjector3_baddress_re <= 1'd0; - main_sdram_phaseinjector3_wrdata_storage <= 32'd0; - main_sdram_phaseinjector3_wrdata_re <= 1'd0; - main_sdram_phaseinjector3_status <= 32'd0; - main_sdram_dfi_p0_address <= 14'd0; - main_sdram_dfi_p0_bank <= 3'd0; - main_sdram_dfi_p0_cas_n <= 1'd1; - main_sdram_dfi_p0_cs_n <= 1'd1; - main_sdram_dfi_p0_ras_n <= 1'd1; - main_sdram_dfi_p0_we_n <= 1'd1; - main_sdram_dfi_p0_wrdata_en <= 1'd0; - main_sdram_dfi_p0_rddata_en <= 1'd0; - main_sdram_dfi_p1_address <= 14'd0; - main_sdram_dfi_p1_bank <= 3'd0; - main_sdram_dfi_p1_cas_n <= 1'd1; - main_sdram_dfi_p1_cs_n <= 1'd1; - main_sdram_dfi_p1_ras_n <= 1'd1; - main_sdram_dfi_p1_we_n <= 1'd1; - main_sdram_dfi_p1_wrdata_en <= 1'd0; - main_sdram_dfi_p1_rddata_en <= 1'd0; - main_sdram_dfi_p2_address <= 14'd0; - main_sdram_dfi_p2_bank <= 3'd0; - main_sdram_dfi_p2_cas_n <= 1'd1; - main_sdram_dfi_p2_cs_n <= 1'd1; - main_sdram_dfi_p2_ras_n <= 1'd1; - main_sdram_dfi_p2_we_n <= 1'd1; - main_sdram_dfi_p2_wrdata_en <= 1'd0; - main_sdram_dfi_p2_rddata_en <= 1'd0; - main_sdram_dfi_p3_address <= 14'd0; - main_sdram_dfi_p3_bank <= 3'd0; - main_sdram_dfi_p3_cas_n <= 1'd1; - main_sdram_dfi_p3_cs_n <= 1'd1; - main_sdram_dfi_p3_ras_n <= 1'd1; - main_sdram_dfi_p3_we_n <= 1'd1; - main_sdram_dfi_p3_wrdata_en <= 1'd0; - main_sdram_dfi_p3_rddata_en <= 1'd0; - main_sdram_cmd_payload_a <= 14'd0; - main_sdram_cmd_payload_ba <= 3'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd0; - main_sdram_timer_count1 <= 9'd468; - main_sdram_postponer_req_o <= 1'd0; - main_sdram_postponer_count <= 1'd0; - main_sdram_sequencer_done1 <= 1'd0; - main_sdram_sequencer_counter <= 6'd0; - main_sdram_sequencer_count <= 1'd0; - main_sdram_zqcs_timer_count1 <= 26'd59999999; - main_sdram_zqcs_executer_done <= 1'd0; - main_sdram_zqcs_executer_counter <= 5'd0; - main_sdram_bankmachine0_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine0_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine0_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine0_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine0_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine0_row <= 14'd0; - main_sdram_bankmachine0_row_opened <= 1'd0; - main_sdram_bankmachine0_twtpcon_ready <= 1'd1; - main_sdram_bankmachine0_twtpcon_count <= 3'd0; - main_sdram_bankmachine0_trccon_ready <= 1'd1; - main_sdram_bankmachine0_trccon_count <= 2'd0; - main_sdram_bankmachine0_trascon_ready <= 1'd1; - main_sdram_bankmachine0_trascon_count <= 2'd0; - main_sdram_bankmachine1_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine1_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine1_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine1_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine1_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine1_row <= 14'd0; - main_sdram_bankmachine1_row_opened <= 1'd0; - main_sdram_bankmachine1_twtpcon_ready <= 1'd1; - main_sdram_bankmachine1_twtpcon_count <= 3'd0; - main_sdram_bankmachine1_trccon_ready <= 1'd1; - main_sdram_bankmachine1_trccon_count <= 2'd0; - main_sdram_bankmachine1_trascon_ready <= 1'd1; - main_sdram_bankmachine1_trascon_count <= 2'd0; - main_sdram_bankmachine2_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine2_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine2_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine2_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine2_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine2_row <= 14'd0; - main_sdram_bankmachine2_row_opened <= 1'd0; - main_sdram_bankmachine2_twtpcon_ready <= 1'd1; - main_sdram_bankmachine2_twtpcon_count <= 3'd0; - main_sdram_bankmachine2_trccon_ready <= 1'd1; - main_sdram_bankmachine2_trccon_count <= 2'd0; - main_sdram_bankmachine2_trascon_ready <= 1'd1; - main_sdram_bankmachine2_trascon_count <= 2'd0; - main_sdram_bankmachine3_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine3_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine3_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine3_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine3_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine3_row <= 14'd0; - main_sdram_bankmachine3_row_opened <= 1'd0; - main_sdram_bankmachine3_twtpcon_ready <= 1'd1; - main_sdram_bankmachine3_twtpcon_count <= 3'd0; - main_sdram_bankmachine3_trccon_ready <= 1'd1; - main_sdram_bankmachine3_trccon_count <= 2'd0; - main_sdram_bankmachine3_trascon_ready <= 1'd1; - main_sdram_bankmachine3_trascon_count <= 2'd0; - main_sdram_bankmachine4_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine4_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine4_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine4_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine4_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine4_row <= 14'd0; - main_sdram_bankmachine4_row_opened <= 1'd0; - main_sdram_bankmachine4_twtpcon_ready <= 1'd1; - main_sdram_bankmachine4_twtpcon_count <= 3'd0; - main_sdram_bankmachine4_trccon_ready <= 1'd1; - main_sdram_bankmachine4_trccon_count <= 2'd0; - main_sdram_bankmachine4_trascon_ready <= 1'd1; - main_sdram_bankmachine4_trascon_count <= 2'd0; - main_sdram_bankmachine5_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine5_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine5_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine5_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine5_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine5_row <= 14'd0; - main_sdram_bankmachine5_row_opened <= 1'd0; - main_sdram_bankmachine5_twtpcon_ready <= 1'd1; - main_sdram_bankmachine5_twtpcon_count <= 3'd0; - main_sdram_bankmachine5_trccon_ready <= 1'd1; - main_sdram_bankmachine5_trccon_count <= 2'd0; - main_sdram_bankmachine5_trascon_ready <= 1'd1; - main_sdram_bankmachine5_trascon_count <= 2'd0; - main_sdram_bankmachine6_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine6_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine6_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine6_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine6_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine6_row <= 14'd0; - main_sdram_bankmachine6_row_opened <= 1'd0; - main_sdram_bankmachine6_twtpcon_ready <= 1'd1; - main_sdram_bankmachine6_twtpcon_count <= 3'd0; - main_sdram_bankmachine6_trccon_ready <= 1'd1; - main_sdram_bankmachine6_trccon_count <= 2'd0; - main_sdram_bankmachine6_trascon_ready <= 1'd1; - main_sdram_bankmachine6_trascon_count <= 2'd0; - main_sdram_bankmachine7_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine7_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine7_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine7_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine7_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine7_row <= 14'd0; - main_sdram_bankmachine7_row_opened <= 1'd0; - main_sdram_bankmachine7_twtpcon_ready <= 1'd1; - main_sdram_bankmachine7_twtpcon_count <= 3'd0; - main_sdram_bankmachine7_trccon_ready <= 1'd1; - main_sdram_bankmachine7_trccon_count <= 2'd0; - main_sdram_bankmachine7_trascon_ready <= 1'd1; - main_sdram_bankmachine7_trascon_count <= 2'd0; - main_sdram_choose_cmd_grant <= 3'd0; - main_sdram_choose_req_grant <= 3'd0; - main_sdram_trrdcon_ready <= 1'd1; - main_sdram_trrdcon_count <= 1'd0; - main_sdram_tfawcon_ready <= 1'd1; - main_sdram_tfawcon_window <= 4'd0; - main_sdram_tccdcon_ready <= 1'd1; - main_sdram_tccdcon_count <= 1'd0; - main_sdram_twtrcon_ready <= 1'd1; - main_sdram_twtrcon_count <= 3'd0; - main_sdram_time0 <= 5'd0; - main_sdram_time1 <= 4'd0; - main_adr_offset_r <= 2'd0; - main_count <= 1'd0; - builder_wb2csr_state <= 1'd0; - builder_refresher_state <= 2'd0; - builder_bankmachine0_state <= 3'd0; - builder_bankmachine1_state <= 3'd0; - builder_bankmachine2_state <= 3'd0; - builder_bankmachine3_state <= 3'd0; - builder_bankmachine4_state <= 3'd0; - builder_bankmachine5_state <= 3'd0; - builder_bankmachine6_state <= 3'd0; - builder_bankmachine7_state <= 3'd0; - builder_multiplexer_state <= 4'd0; - builder_rbank <= 3'd0; - builder_wbank <= 3'd0; - builder_new_master_wdata_ready0 <= 1'd0; - builder_new_master_wdata_ready1 <= 1'd0; - builder_new_master_wdata_ready2 <= 1'd0; - builder_new_master_rdata_valid0 <= 1'd0; - builder_new_master_rdata_valid1 <= 1'd0; - builder_new_master_rdata_valid2 <= 1'd0; - builder_new_master_rdata_valid3 <= 1'd0; - builder_new_master_rdata_valid4 <= 1'd0; - builder_new_master_rdata_valid5 <= 1'd0; - builder_new_master_rdata_valid6 <= 1'd0; - builder_new_master_rdata_valid7 <= 1'd0; - builder_new_master_rdata_valid8 <= 1'd0; - builder_new_master_rdata_valid9 <= 1'd0; - builder_fullmemorywe_state <= 2'd0; - builder_litedramwishbone2native_state <= 2'd0; - builder_minsoc_grant <= 1'd0; - builder_minsoc_slave_sel_r <= 4'd0; - builder_minsoc_count <= 20'd1000000; - builder_minsoc_interface0_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface1_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface2_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface3_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface4_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface5_bank_bus_dat_r <= 8'd0; - end - builder_regs0 <= serial_rx; - builder_regs1 <= builder_regs0; -end - -reg [31:0] mem[0:8191]; -reg [31:0] memdat; -always @(posedge sys_clk) begin - memdat <= mem[main_minsoc_rom_adr]; -end - -assign main_minsoc_rom_dat_r = memdat; - -initial begin - $readmemh("mem.init", mem); -end - -reg [31:0] mem_1[0:1023]; -reg [9:0] memadr; -always @(posedge sys_clk) begin - if (main_minsoc_sram_we[0]) - mem_1[main_minsoc_sram_adr][7:0] <= main_minsoc_sram_dat_w[7:0]; - if (main_minsoc_sram_we[1]) - mem_1[main_minsoc_sram_adr][15:8] <= main_minsoc_sram_dat_w[15:8]; - if (main_minsoc_sram_we[2]) - mem_1[main_minsoc_sram_adr][23:16] <= main_minsoc_sram_dat_w[23:16]; - if (main_minsoc_sram_we[3]) - mem_1[main_minsoc_sram_adr][31:24] <= main_minsoc_sram_dat_w[31:24]; - memadr <= main_minsoc_sram_adr; -end - -assign main_minsoc_sram_dat_r = mem_1[memadr]; - -initial begin - $readmemh("mem_1.init", mem_1); -end - -reg [9:0] storage[0:15]; -reg [9:0] memdat_1; -reg [9:0] memdat_2; -always @(posedge sys_clk) begin - if (main_minsoc_uart_tx_fifo_wrport_we) - storage[main_minsoc_uart_tx_fifo_wrport_adr] <= main_minsoc_uart_tx_fifo_wrport_dat_w; - memdat_1 <= storage[main_minsoc_uart_tx_fifo_wrport_adr]; -end - -always @(posedge sys_clk) begin - if (main_minsoc_uart_tx_fifo_rdport_re) - memdat_2 <= storage[main_minsoc_uart_tx_fifo_rdport_adr]; -end - -assign main_minsoc_uart_tx_fifo_wrport_dat_r = memdat_1; -assign main_minsoc_uart_tx_fifo_rdport_dat_r = memdat_2; - -reg [9:0] storage_1[0:15]; -reg [9:0] memdat_3; -reg [9:0] memdat_4; -always @(posedge sys_clk) begin - if (main_minsoc_uart_rx_fifo_wrport_we) - storage_1[main_minsoc_uart_rx_fifo_wrport_adr] <= main_minsoc_uart_rx_fifo_wrport_dat_w; - memdat_3 <= storage_1[main_minsoc_uart_rx_fifo_wrport_adr]; -end - -always @(posedge sys_clk) begin - if (main_minsoc_uart_rx_fifo_rdport_re) - memdat_4 <= storage_1[main_minsoc_uart_rx_fifo_rdport_adr]; -end - -assign main_minsoc_uart_rx_fifo_wrport_dat_r = memdat_3; -assign main_minsoc_uart_rx_fifo_rdport_dat_r = memdat_4; - -wire clk100_ibuf; -IBUF clkbuf(.I(clk100), .O(clk100_ibuf)); - -BUFG BUFG( - .I(clk100_ibuf), - .O(main_pll_clkin) -); - -BUFG BUFG_1( - .I(main_clkout0), - .O(sys_clk) -); - -BUFG BUFG_2( - .I(main_clkout1), - .O(sys4x_clk) -); - -BUFG BUFG_3( - .I(main_clkout2), - .O(sys4x_dqs_clk) -); - -BUFG BUFG_4( - .I(main_clkout3), - .O(clk200_clk) -); - -(* LOC="IDELAYCTRL_X1Y0" *) -IDELAYCTRL IDELAYCTRL( - .REFCLK(clk200_clk), - .RST(main_ic_reset), - .RDY(idelayctl_rdy) -); - -wire tq; - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(1'd0), - .D2(1'd1), - .D3(1'd0), - .D4(1'd1), - .D5(1'd0), - .D6(1'd1), - .D7(1'd0), - .D8(1'd1), - .OCE(1'd1), - .RST(sys_rst), - .OQ(main_a7ddrphy_sd_clk_se_nodelay), - .TQ(tq), - .TCE(1'b1), - .T1(1'b0) -); - -OBUFTDS OBUFTDS_2( - .I(main_a7ddrphy_sd_clk_se_nodelay), - .O(ddram_clk_p), - .OB(ddram_clk_n), - .T(tq) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_1 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[0]), - .D2(main_a7ddrphy_dfi_p0_address[0]), - .D3(main_a7ddrphy_dfi_p1_address[0]), - .D4(main_a7ddrphy_dfi_p1_address[0]), - .D5(main_a7ddrphy_dfi_p2_address[0]), - .D6(main_a7ddrphy_dfi_p2_address[0]), - .D7(main_a7ddrphy_dfi_p3_address[0]), - .D8(main_a7ddrphy_dfi_p3_address[0]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[0]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_2 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[1]), - .D2(main_a7ddrphy_dfi_p0_address[1]), - .D3(main_a7ddrphy_dfi_p1_address[1]), - .D4(main_a7ddrphy_dfi_p1_address[1]), - .D5(main_a7ddrphy_dfi_p2_address[1]), - .D6(main_a7ddrphy_dfi_p2_address[1]), - .D7(main_a7ddrphy_dfi_p3_address[1]), - .D8(main_a7ddrphy_dfi_p3_address[1]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[1]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_3 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[2]), - .D2(main_a7ddrphy_dfi_p0_address[2]), - .D3(main_a7ddrphy_dfi_p1_address[2]), - .D4(main_a7ddrphy_dfi_p1_address[2]), - .D5(main_a7ddrphy_dfi_p2_address[2]), - .D6(main_a7ddrphy_dfi_p2_address[2]), - .D7(main_a7ddrphy_dfi_p3_address[2]), - .D8(main_a7ddrphy_dfi_p3_address[2]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[2]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_4 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[3]), - .D2(main_a7ddrphy_dfi_p0_address[3]), - .D3(main_a7ddrphy_dfi_p1_address[3]), - .D4(main_a7ddrphy_dfi_p1_address[3]), - .D5(main_a7ddrphy_dfi_p2_address[3]), - .D6(main_a7ddrphy_dfi_p2_address[3]), - .D7(main_a7ddrphy_dfi_p3_address[3]), - .D8(main_a7ddrphy_dfi_p3_address[3]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[3]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_5 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[4]), - .D2(main_a7ddrphy_dfi_p0_address[4]), - .D3(main_a7ddrphy_dfi_p1_address[4]), - .D4(main_a7ddrphy_dfi_p1_address[4]), - .D5(main_a7ddrphy_dfi_p2_address[4]), - .D6(main_a7ddrphy_dfi_p2_address[4]), - .D7(main_a7ddrphy_dfi_p3_address[4]), - .D8(main_a7ddrphy_dfi_p3_address[4]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[4]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_6 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[5]), - .D2(main_a7ddrphy_dfi_p0_address[5]), - .D3(main_a7ddrphy_dfi_p1_address[5]), - .D4(main_a7ddrphy_dfi_p1_address[5]), - .D5(main_a7ddrphy_dfi_p2_address[5]), - .D6(main_a7ddrphy_dfi_p2_address[5]), - .D7(main_a7ddrphy_dfi_p3_address[5]), - .D8(main_a7ddrphy_dfi_p3_address[5]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[5]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_7 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[6]), - .D2(main_a7ddrphy_dfi_p0_address[6]), - .D3(main_a7ddrphy_dfi_p1_address[6]), - .D4(main_a7ddrphy_dfi_p1_address[6]), - .D5(main_a7ddrphy_dfi_p2_address[6]), - .D6(main_a7ddrphy_dfi_p2_address[6]), - .D7(main_a7ddrphy_dfi_p3_address[6]), - .D8(main_a7ddrphy_dfi_p3_address[6]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[6]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_8 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[7]), - .D2(main_a7ddrphy_dfi_p0_address[7]), - .D3(main_a7ddrphy_dfi_p1_address[7]), - .D4(main_a7ddrphy_dfi_p1_address[7]), - .D5(main_a7ddrphy_dfi_p2_address[7]), - .D6(main_a7ddrphy_dfi_p2_address[7]), - .D7(main_a7ddrphy_dfi_p3_address[7]), - .D8(main_a7ddrphy_dfi_p3_address[7]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[7]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_9 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[8]), - .D2(main_a7ddrphy_dfi_p0_address[8]), - .D3(main_a7ddrphy_dfi_p1_address[8]), - .D4(main_a7ddrphy_dfi_p1_address[8]), - .D5(main_a7ddrphy_dfi_p2_address[8]), - .D6(main_a7ddrphy_dfi_p2_address[8]), - .D7(main_a7ddrphy_dfi_p3_address[8]), - .D8(main_a7ddrphy_dfi_p3_address[8]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[8]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_10 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[9]), - .D2(main_a7ddrphy_dfi_p0_address[9]), - .D3(main_a7ddrphy_dfi_p1_address[9]), - .D4(main_a7ddrphy_dfi_p1_address[9]), - .D5(main_a7ddrphy_dfi_p2_address[9]), - .D6(main_a7ddrphy_dfi_p2_address[9]), - .D7(main_a7ddrphy_dfi_p3_address[9]), - .D8(main_a7ddrphy_dfi_p3_address[9]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[9]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_11 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[10]), - .D2(main_a7ddrphy_dfi_p0_address[10]), - .D3(main_a7ddrphy_dfi_p1_address[10]), - .D4(main_a7ddrphy_dfi_p1_address[10]), - .D5(main_a7ddrphy_dfi_p2_address[10]), - .D6(main_a7ddrphy_dfi_p2_address[10]), - .D7(main_a7ddrphy_dfi_p3_address[10]), - .D8(main_a7ddrphy_dfi_p3_address[10]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[10]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_12 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[11]), - .D2(main_a7ddrphy_dfi_p0_address[11]), - .D3(main_a7ddrphy_dfi_p1_address[11]), - .D4(main_a7ddrphy_dfi_p1_address[11]), - .D5(main_a7ddrphy_dfi_p2_address[11]), - .D6(main_a7ddrphy_dfi_p2_address[11]), - .D7(main_a7ddrphy_dfi_p3_address[11]), - .D8(main_a7ddrphy_dfi_p3_address[11]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[11]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_13 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[12]), - .D2(main_a7ddrphy_dfi_p0_address[12]), - .D3(main_a7ddrphy_dfi_p1_address[12]), - .D4(main_a7ddrphy_dfi_p1_address[12]), - .D5(main_a7ddrphy_dfi_p2_address[12]), - .D6(main_a7ddrphy_dfi_p2_address[12]), - .D7(main_a7ddrphy_dfi_p3_address[12]), - .D8(main_a7ddrphy_dfi_p3_address[12]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[12]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_14 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[13]), - .D2(main_a7ddrphy_dfi_p0_address[13]), - .D3(main_a7ddrphy_dfi_p1_address[13]), - .D4(main_a7ddrphy_dfi_p1_address[13]), - .D5(main_a7ddrphy_dfi_p2_address[13]), - .D6(main_a7ddrphy_dfi_p2_address[13]), - .D7(main_a7ddrphy_dfi_p3_address[13]), - .D8(main_a7ddrphy_dfi_p3_address[13]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[13]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_15 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_bank[0]), - .D2(main_a7ddrphy_dfi_p0_bank[0]), - .D3(main_a7ddrphy_dfi_p1_bank[0]), - .D4(main_a7ddrphy_dfi_p1_bank[0]), - .D5(main_a7ddrphy_dfi_p2_bank[0]), - .D6(main_a7ddrphy_dfi_p2_bank[0]), - .D7(main_a7ddrphy_dfi_p3_bank[0]), - .D8(main_a7ddrphy_dfi_p3_bank[0]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ba_iob[0]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_16 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_bank[1]), - .D2(main_a7ddrphy_dfi_p0_bank[1]), - .D3(main_a7ddrphy_dfi_p1_bank[1]), - .D4(main_a7ddrphy_dfi_p1_bank[1]), - .D5(main_a7ddrphy_dfi_p2_bank[1]), - .D6(main_a7ddrphy_dfi_p2_bank[1]), - .D7(main_a7ddrphy_dfi_p3_bank[1]), - .D8(main_a7ddrphy_dfi_p3_bank[1]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ba_iob[1]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_17 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_bank[2]), - .D2(main_a7ddrphy_dfi_p0_bank[2]), - .D3(main_a7ddrphy_dfi_p1_bank[2]), - .D4(main_a7ddrphy_dfi_p1_bank[2]), - .D5(main_a7ddrphy_dfi_p2_bank[2]), - .D6(main_a7ddrphy_dfi_p2_bank[2]), - .D7(main_a7ddrphy_dfi_p3_bank[2]), - .D8(main_a7ddrphy_dfi_p3_bank[2]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ba_iob[2]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_18 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_ras_n), - .D2(main_a7ddrphy_dfi_p0_ras_n), - .D3(main_a7ddrphy_dfi_p1_ras_n), - .D4(main_a7ddrphy_dfi_p1_ras_n), - .D5(main_a7ddrphy_dfi_p2_ras_n), - .D6(main_a7ddrphy_dfi_p2_ras_n), - .D7(main_a7ddrphy_dfi_p3_ras_n), - .D8(main_a7ddrphy_dfi_p3_ras_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ras_n_iob) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_19 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_cas_n), - .D2(main_a7ddrphy_dfi_p0_cas_n), - .D3(main_a7ddrphy_dfi_p1_cas_n), - .D4(main_a7ddrphy_dfi_p1_cas_n), - .D5(main_a7ddrphy_dfi_p2_cas_n), - .D6(main_a7ddrphy_dfi_p2_cas_n), - .D7(main_a7ddrphy_dfi_p3_cas_n), - .D8(main_a7ddrphy_dfi_p3_cas_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_cas_n_iob) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_20 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_we_n), - .D2(main_a7ddrphy_dfi_p0_we_n), - .D3(main_a7ddrphy_dfi_p1_we_n), - .D4(main_a7ddrphy_dfi_p1_we_n), - .D5(main_a7ddrphy_dfi_p2_we_n), - .D6(main_a7ddrphy_dfi_p2_we_n), - .D7(main_a7ddrphy_dfi_p3_we_n), - .D8(main_a7ddrphy_dfi_p3_we_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_we_n_iob) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_21 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_cke), - .D2(main_a7ddrphy_dfi_p0_cke), - .D3(main_a7ddrphy_dfi_p1_cke), - .D4(main_a7ddrphy_dfi_p1_cke), - .D5(main_a7ddrphy_dfi_p2_cke), - .D6(main_a7ddrphy_dfi_p2_cke), - .D7(main_a7ddrphy_dfi_p3_cke), - .D8(main_a7ddrphy_dfi_p3_cke), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_cke_iob) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_22 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_odt), - .D2(main_a7ddrphy_dfi_p0_odt), - .D3(main_a7ddrphy_dfi_p1_odt), - .D4(main_a7ddrphy_dfi_p1_odt), - .D5(main_a7ddrphy_dfi_p2_odt), - .D6(main_a7ddrphy_dfi_p2_odt), - .D7(main_a7ddrphy_dfi_p3_odt), - .D8(main_a7ddrphy_dfi_p3_odt), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_odt_iob) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_23 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_reset_n), - .D2(main_a7ddrphy_dfi_p0_reset_n), - .D3(main_a7ddrphy_dfi_p1_reset_n), - .D4(main_a7ddrphy_dfi_p1_reset_n), - .D5(main_a7ddrphy_dfi_p2_reset_n), - .D6(main_a7ddrphy_dfi_p2_reset_n), - .D7(main_a7ddrphy_dfi_p3_reset_n), - .D8(main_a7ddrphy_dfi_p3_reset_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_reset_n_iob) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_24 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_cs_n), - .D2(main_a7ddrphy_dfi_p0_cs_n), - .D3(main_a7ddrphy_dfi_p1_cs_n), - .D4(main_a7ddrphy_dfi_p1_cs_n), - .D5(main_a7ddrphy_dfi_p2_cs_n), - .D6(main_a7ddrphy_dfi_p2_cs_n), - .D7(main_a7ddrphy_dfi_p3_cs_n), - .D8(main_a7ddrphy_dfi_p3_cs_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_cs_n_iob) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_25 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata_mask[0]), - .D2(main_a7ddrphy_dfi_p0_wrdata_mask[2]), - .D3(main_a7ddrphy_dfi_p1_wrdata_mask[0]), - .D4(main_a7ddrphy_dfi_p1_wrdata_mask[2]), - .D5(main_a7ddrphy_dfi_p2_wrdata_mask[0]), - .D6(main_a7ddrphy_dfi_p2_wrdata_mask[2]), - .D7(main_a7ddrphy_dfi_p3_wrdata_mask[0]), - .D8(main_a7ddrphy_dfi_p3_wrdata_mask[2]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_dm_iob[0]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_26 ( - .CLK(sys4x_dqs_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dqs_serdes_pattern[0]), - .D2(main_a7ddrphy_dqs_serdes_pattern[1]), - .D3(main_a7ddrphy_dqs_serdes_pattern[2]), - .D4(main_a7ddrphy_dqs_serdes_pattern[3]), - .D5(main_a7ddrphy_dqs_serdes_pattern[4]), - .D6(main_a7ddrphy_dqs_serdes_pattern[5]), - .D7(main_a7ddrphy_dqs_serdes_pattern[6]), - .D8(main_a7ddrphy_dqs_serdes_pattern[7]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dqs)), - .TCE(1'd1), - .OFB(main_a7ddrphy0), - .OQ(main_a7ddrphy_dqs_nodelay0), - .TQ(main_a7ddrphy_dqs_t0) -); - -OBUFTDS OBUFTDS( - .I(main_a7ddrphy_dqs_nodelay0), - .T(main_a7ddrphy_dqs_t0), - .O(ddram_dqs_p[0]), - .OB(ddram_dqs_n[0]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_27 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata_mask[1]), - .D2(main_a7ddrphy_dfi_p0_wrdata_mask[3]), - .D3(main_a7ddrphy_dfi_p1_wrdata_mask[1]), - .D4(main_a7ddrphy_dfi_p1_wrdata_mask[3]), - .D5(main_a7ddrphy_dfi_p2_wrdata_mask[1]), - .D6(main_a7ddrphy_dfi_p2_wrdata_mask[3]), - .D7(main_a7ddrphy_dfi_p3_wrdata_mask[1]), - .D8(main_a7ddrphy_dfi_p3_wrdata_mask[3]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_dm_iob[1]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_28 ( - .CLK(sys4x_dqs_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dqs_serdes_pattern[0]), - .D2(main_a7ddrphy_dqs_serdes_pattern[1]), - .D3(main_a7ddrphy_dqs_serdes_pattern[2]), - .D4(main_a7ddrphy_dqs_serdes_pattern[3]), - .D5(main_a7ddrphy_dqs_serdes_pattern[4]), - .D6(main_a7ddrphy_dqs_serdes_pattern[5]), - .D7(main_a7ddrphy_dqs_serdes_pattern[6]), - .D8(main_a7ddrphy_dqs_serdes_pattern[7]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dqs)), - .TCE(1'd1), - .OFB(main_a7ddrphy1), - .OQ(main_a7ddrphy_dqs_nodelay1), - .TQ(main_a7ddrphy_dqs_t1) -); - -OBUFTDS OBUFTDS_1( - .I(main_a7ddrphy_dqs_nodelay1), - .T(main_a7ddrphy_dqs_t1), - .O(ddram_dqs_p[1]), - .OB(ddram_dqs_n[1]) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_29 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[0]), - .D2(main_a7ddrphy_dfi_p0_wrdata[16]), - .D3(main_a7ddrphy_dfi_p1_wrdata[0]), - .D4(main_a7ddrphy_dfi_p1_wrdata[16]), - .D5(main_a7ddrphy_dfi_p2_wrdata[0]), - .D6(main_a7ddrphy_dfi_p2_wrdata[16]), - .D7(main_a7ddrphy_dfi_p3_wrdata[0]), - .D8(main_a7ddrphy_dfi_p3_wrdata[16]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay0), - .TQ(main_a7ddrphy_dq_t0) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed0), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data0[7]), - .Q2(main_a7ddrphy_dq_i_data0[6]), - .Q3(main_a7ddrphy_dq_i_data0[5]), - .Q4(main_a7ddrphy_dq_i_data0[4]), - .Q5(main_a7ddrphy_dq_i_data0[3]), - .Q6(main_a7ddrphy_dq_i_data0[2]), - .Q7(main_a7ddrphy_dq_i_data0[1]), - .Q8(main_a7ddrphy_dq_i_data0[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay0), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed0) -); - -IOBUF IOBUF( - .I(main_a7ddrphy_dq_o_nodelay0), - .T(main_a7ddrphy_dq_t0), - .IO(ddram_dq[0]), - .O(main_a7ddrphy_dq_i_nodelay0) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_30 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[1]), - .D2(main_a7ddrphy_dfi_p0_wrdata[17]), - .D3(main_a7ddrphy_dfi_p1_wrdata[1]), - .D4(main_a7ddrphy_dfi_p1_wrdata[17]), - .D5(main_a7ddrphy_dfi_p2_wrdata[1]), - .D6(main_a7ddrphy_dfi_p2_wrdata[17]), - .D7(main_a7ddrphy_dfi_p3_wrdata[1]), - .D8(main_a7ddrphy_dfi_p3_wrdata[17]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay1), - .TQ(main_a7ddrphy_dq_t1) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_1 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed1), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data1[7]), - .Q2(main_a7ddrphy_dq_i_data1[6]), - .Q3(main_a7ddrphy_dq_i_data1[5]), - .Q4(main_a7ddrphy_dq_i_data1[4]), - .Q5(main_a7ddrphy_dq_i_data1[3]), - .Q6(main_a7ddrphy_dq_i_data1[2]), - .Q7(main_a7ddrphy_dq_i_data1[1]), - .Q8(main_a7ddrphy_dq_i_data1[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_1 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay1), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed1) -); - -IOBUF IOBUF_1( - .I(main_a7ddrphy_dq_o_nodelay1), - .T(main_a7ddrphy_dq_t1), - .IO(ddram_dq[1]), - .O(main_a7ddrphy_dq_i_nodelay1) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_31 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[2]), - .D2(main_a7ddrphy_dfi_p0_wrdata[18]), - .D3(main_a7ddrphy_dfi_p1_wrdata[2]), - .D4(main_a7ddrphy_dfi_p1_wrdata[18]), - .D5(main_a7ddrphy_dfi_p2_wrdata[2]), - .D6(main_a7ddrphy_dfi_p2_wrdata[18]), - .D7(main_a7ddrphy_dfi_p3_wrdata[2]), - .D8(main_a7ddrphy_dfi_p3_wrdata[18]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay2), - .TQ(main_a7ddrphy_dq_t2) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_2 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed2), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data2[7]), - .Q2(main_a7ddrphy_dq_i_data2[6]), - .Q3(main_a7ddrphy_dq_i_data2[5]), - .Q4(main_a7ddrphy_dq_i_data2[4]), - .Q5(main_a7ddrphy_dq_i_data2[3]), - .Q6(main_a7ddrphy_dq_i_data2[2]), - .Q7(main_a7ddrphy_dq_i_data2[1]), - .Q8(main_a7ddrphy_dq_i_data2[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_2 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay2), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed2) -); - -IOBUF IOBUF_2( - .I(main_a7ddrphy_dq_o_nodelay2), - .T(main_a7ddrphy_dq_t2), - .IO(ddram_dq[2]), - .O(main_a7ddrphy_dq_i_nodelay2) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_32 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[3]), - .D2(main_a7ddrphy_dfi_p0_wrdata[19]), - .D3(main_a7ddrphy_dfi_p1_wrdata[3]), - .D4(main_a7ddrphy_dfi_p1_wrdata[19]), - .D5(main_a7ddrphy_dfi_p2_wrdata[3]), - .D6(main_a7ddrphy_dfi_p2_wrdata[19]), - .D7(main_a7ddrphy_dfi_p3_wrdata[3]), - .D8(main_a7ddrphy_dfi_p3_wrdata[19]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay3), - .TQ(main_a7ddrphy_dq_t3) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_3 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed3), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data3[7]), - .Q2(main_a7ddrphy_dq_i_data3[6]), - .Q3(main_a7ddrphy_dq_i_data3[5]), - .Q4(main_a7ddrphy_dq_i_data3[4]), - .Q5(main_a7ddrphy_dq_i_data3[3]), - .Q6(main_a7ddrphy_dq_i_data3[2]), - .Q7(main_a7ddrphy_dq_i_data3[1]), - .Q8(main_a7ddrphy_dq_i_data3[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_3 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay3), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed3) -); - -IOBUF IOBUF_3( - .I(main_a7ddrphy_dq_o_nodelay3), - .T(main_a7ddrphy_dq_t3), - .IO(ddram_dq[3]), - .O(main_a7ddrphy_dq_i_nodelay3) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_33 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[4]), - .D2(main_a7ddrphy_dfi_p0_wrdata[20]), - .D3(main_a7ddrphy_dfi_p1_wrdata[4]), - .D4(main_a7ddrphy_dfi_p1_wrdata[20]), - .D5(main_a7ddrphy_dfi_p2_wrdata[4]), - .D6(main_a7ddrphy_dfi_p2_wrdata[20]), - .D7(main_a7ddrphy_dfi_p3_wrdata[4]), - .D8(main_a7ddrphy_dfi_p3_wrdata[20]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay4), - .TQ(main_a7ddrphy_dq_t4) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_4 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed4), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data4[7]), - .Q2(main_a7ddrphy_dq_i_data4[6]), - .Q3(main_a7ddrphy_dq_i_data4[5]), - .Q4(main_a7ddrphy_dq_i_data4[4]), - .Q5(main_a7ddrphy_dq_i_data4[3]), - .Q6(main_a7ddrphy_dq_i_data4[2]), - .Q7(main_a7ddrphy_dq_i_data4[1]), - .Q8(main_a7ddrphy_dq_i_data4[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_4 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay4), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed4) -); - -IOBUF IOBUF_4( - .I(main_a7ddrphy_dq_o_nodelay4), - .T(main_a7ddrphy_dq_t4), - .IO(ddram_dq[4]), - .O(main_a7ddrphy_dq_i_nodelay4) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_34 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[5]), - .D2(main_a7ddrphy_dfi_p0_wrdata[21]), - .D3(main_a7ddrphy_dfi_p1_wrdata[5]), - .D4(main_a7ddrphy_dfi_p1_wrdata[21]), - .D5(main_a7ddrphy_dfi_p2_wrdata[5]), - .D6(main_a7ddrphy_dfi_p2_wrdata[21]), - .D7(main_a7ddrphy_dfi_p3_wrdata[5]), - .D8(main_a7ddrphy_dfi_p3_wrdata[21]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay5), - .TQ(main_a7ddrphy_dq_t5) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_5 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed5), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data5[7]), - .Q2(main_a7ddrphy_dq_i_data5[6]), - .Q3(main_a7ddrphy_dq_i_data5[5]), - .Q4(main_a7ddrphy_dq_i_data5[4]), - .Q5(main_a7ddrphy_dq_i_data5[3]), - .Q6(main_a7ddrphy_dq_i_data5[2]), - .Q7(main_a7ddrphy_dq_i_data5[1]), - .Q8(main_a7ddrphy_dq_i_data5[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_5 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay5), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed5) -); - -IOBUF IOBUF_5( - .I(main_a7ddrphy_dq_o_nodelay5), - .T(main_a7ddrphy_dq_t5), - .IO(ddram_dq[5]), - .O(main_a7ddrphy_dq_i_nodelay5) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_35 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[6]), - .D2(main_a7ddrphy_dfi_p0_wrdata[22]), - .D3(main_a7ddrphy_dfi_p1_wrdata[6]), - .D4(main_a7ddrphy_dfi_p1_wrdata[22]), - .D5(main_a7ddrphy_dfi_p2_wrdata[6]), - .D6(main_a7ddrphy_dfi_p2_wrdata[22]), - .D7(main_a7ddrphy_dfi_p3_wrdata[6]), - .D8(main_a7ddrphy_dfi_p3_wrdata[22]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay6), - .TQ(main_a7ddrphy_dq_t6) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_6 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed6), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data6[7]), - .Q2(main_a7ddrphy_dq_i_data6[6]), - .Q3(main_a7ddrphy_dq_i_data6[5]), - .Q4(main_a7ddrphy_dq_i_data6[4]), - .Q5(main_a7ddrphy_dq_i_data6[3]), - .Q6(main_a7ddrphy_dq_i_data6[2]), - .Q7(main_a7ddrphy_dq_i_data6[1]), - .Q8(main_a7ddrphy_dq_i_data6[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_6 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay6), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed6) -); - -IOBUF IOBUF_6( - .I(main_a7ddrphy_dq_o_nodelay6), - .T(main_a7ddrphy_dq_t6), - .IO(ddram_dq[6]), - .O(main_a7ddrphy_dq_i_nodelay6) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_36 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[7]), - .D2(main_a7ddrphy_dfi_p0_wrdata[23]), - .D3(main_a7ddrphy_dfi_p1_wrdata[7]), - .D4(main_a7ddrphy_dfi_p1_wrdata[23]), - .D5(main_a7ddrphy_dfi_p2_wrdata[7]), - .D6(main_a7ddrphy_dfi_p2_wrdata[23]), - .D7(main_a7ddrphy_dfi_p3_wrdata[7]), - .D8(main_a7ddrphy_dfi_p3_wrdata[23]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay7), - .TQ(main_a7ddrphy_dq_t7) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_7 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed7), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data7[7]), - .Q2(main_a7ddrphy_dq_i_data7[6]), - .Q3(main_a7ddrphy_dq_i_data7[5]), - .Q4(main_a7ddrphy_dq_i_data7[4]), - .Q5(main_a7ddrphy_dq_i_data7[3]), - .Q6(main_a7ddrphy_dq_i_data7[2]), - .Q7(main_a7ddrphy_dq_i_data7[1]), - .Q8(main_a7ddrphy_dq_i_data7[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_7 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay7), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed7) -); - -IOBUF IOBUF_7( - .I(main_a7ddrphy_dq_o_nodelay7), - .T(main_a7ddrphy_dq_t7), - .IO(ddram_dq[7]), - .O(main_a7ddrphy_dq_i_nodelay7) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_37 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[8]), - .D2(main_a7ddrphy_dfi_p0_wrdata[24]), - .D3(main_a7ddrphy_dfi_p1_wrdata[8]), - .D4(main_a7ddrphy_dfi_p1_wrdata[24]), - .D5(main_a7ddrphy_dfi_p2_wrdata[8]), - .D6(main_a7ddrphy_dfi_p2_wrdata[24]), - .D7(main_a7ddrphy_dfi_p3_wrdata[8]), - .D8(main_a7ddrphy_dfi_p3_wrdata[24]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay8), - .TQ(main_a7ddrphy_dq_t8) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_8 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed8), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data8[7]), - .Q2(main_a7ddrphy_dq_i_data8[6]), - .Q3(main_a7ddrphy_dq_i_data8[5]), - .Q4(main_a7ddrphy_dq_i_data8[4]), - .Q5(main_a7ddrphy_dq_i_data8[3]), - .Q6(main_a7ddrphy_dq_i_data8[2]), - .Q7(main_a7ddrphy_dq_i_data8[1]), - .Q8(main_a7ddrphy_dq_i_data8[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_8 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay8), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed8) -); - -IOBUF IOBUF_8( - .I(main_a7ddrphy_dq_o_nodelay8), - .T(main_a7ddrphy_dq_t8), - .IO(ddram_dq[8]), - .O(main_a7ddrphy_dq_i_nodelay8) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_38 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[9]), - .D2(main_a7ddrphy_dfi_p0_wrdata[25]), - .D3(main_a7ddrphy_dfi_p1_wrdata[9]), - .D4(main_a7ddrphy_dfi_p1_wrdata[25]), - .D5(main_a7ddrphy_dfi_p2_wrdata[9]), - .D6(main_a7ddrphy_dfi_p2_wrdata[25]), - .D7(main_a7ddrphy_dfi_p3_wrdata[9]), - .D8(main_a7ddrphy_dfi_p3_wrdata[25]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay9), - .TQ(main_a7ddrphy_dq_t9) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_9 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed9), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data9[7]), - .Q2(main_a7ddrphy_dq_i_data9[6]), - .Q3(main_a7ddrphy_dq_i_data9[5]), - .Q4(main_a7ddrphy_dq_i_data9[4]), - .Q5(main_a7ddrphy_dq_i_data9[3]), - .Q6(main_a7ddrphy_dq_i_data9[2]), - .Q7(main_a7ddrphy_dq_i_data9[1]), - .Q8(main_a7ddrphy_dq_i_data9[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_9 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay9), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed9) -); - -IOBUF IOBUF_9( - .I(main_a7ddrphy_dq_o_nodelay9), - .T(main_a7ddrphy_dq_t9), - .IO(ddram_dq[9]), - .O(main_a7ddrphy_dq_i_nodelay9) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_39 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[10]), - .D2(main_a7ddrphy_dfi_p0_wrdata[26]), - .D3(main_a7ddrphy_dfi_p1_wrdata[10]), - .D4(main_a7ddrphy_dfi_p1_wrdata[26]), - .D5(main_a7ddrphy_dfi_p2_wrdata[10]), - .D6(main_a7ddrphy_dfi_p2_wrdata[26]), - .D7(main_a7ddrphy_dfi_p3_wrdata[10]), - .D8(main_a7ddrphy_dfi_p3_wrdata[26]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay10), - .TQ(main_a7ddrphy_dq_t10) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_10 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed10), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data10[7]), - .Q2(main_a7ddrphy_dq_i_data10[6]), - .Q3(main_a7ddrphy_dq_i_data10[5]), - .Q4(main_a7ddrphy_dq_i_data10[4]), - .Q5(main_a7ddrphy_dq_i_data10[3]), - .Q6(main_a7ddrphy_dq_i_data10[2]), - .Q7(main_a7ddrphy_dq_i_data10[1]), - .Q8(main_a7ddrphy_dq_i_data10[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_10 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay10), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed10) -); - -IOBUF IOBUF_10( - .I(main_a7ddrphy_dq_o_nodelay10), - .T(main_a7ddrphy_dq_t10), - .IO(ddram_dq[10]), - .O(main_a7ddrphy_dq_i_nodelay10) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_40 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[11]), - .D2(main_a7ddrphy_dfi_p0_wrdata[27]), - .D3(main_a7ddrphy_dfi_p1_wrdata[11]), - .D4(main_a7ddrphy_dfi_p1_wrdata[27]), - .D5(main_a7ddrphy_dfi_p2_wrdata[11]), - .D6(main_a7ddrphy_dfi_p2_wrdata[27]), - .D7(main_a7ddrphy_dfi_p3_wrdata[11]), - .D8(main_a7ddrphy_dfi_p3_wrdata[27]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay11), - .TQ(main_a7ddrphy_dq_t11) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_11 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed11), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data11[7]), - .Q2(main_a7ddrphy_dq_i_data11[6]), - .Q3(main_a7ddrphy_dq_i_data11[5]), - .Q4(main_a7ddrphy_dq_i_data11[4]), - .Q5(main_a7ddrphy_dq_i_data11[3]), - .Q6(main_a7ddrphy_dq_i_data11[2]), - .Q7(main_a7ddrphy_dq_i_data11[1]), - .Q8(main_a7ddrphy_dq_i_data11[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_11 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay11), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed11) -); - -IOBUF IOBUF_11( - .I(main_a7ddrphy_dq_o_nodelay11), - .T(main_a7ddrphy_dq_t11), - .IO(ddram_dq[11]), - .O(main_a7ddrphy_dq_i_nodelay11) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_41 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[12]), - .D2(main_a7ddrphy_dfi_p0_wrdata[28]), - .D3(main_a7ddrphy_dfi_p1_wrdata[12]), - .D4(main_a7ddrphy_dfi_p1_wrdata[28]), - .D5(main_a7ddrphy_dfi_p2_wrdata[12]), - .D6(main_a7ddrphy_dfi_p2_wrdata[28]), - .D7(main_a7ddrphy_dfi_p3_wrdata[12]), - .D8(main_a7ddrphy_dfi_p3_wrdata[28]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay12), - .TQ(main_a7ddrphy_dq_t12) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_12 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed12), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data12[7]), - .Q2(main_a7ddrphy_dq_i_data12[6]), - .Q3(main_a7ddrphy_dq_i_data12[5]), - .Q4(main_a7ddrphy_dq_i_data12[4]), - .Q5(main_a7ddrphy_dq_i_data12[3]), - .Q6(main_a7ddrphy_dq_i_data12[2]), - .Q7(main_a7ddrphy_dq_i_data12[1]), - .Q8(main_a7ddrphy_dq_i_data12[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_12 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay12), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed12) -); - -IOBUF IOBUF_12( - .I(main_a7ddrphy_dq_o_nodelay12), - .T(main_a7ddrphy_dq_t12), - .IO(ddram_dq[12]), - .O(main_a7ddrphy_dq_i_nodelay12) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_42 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[13]), - .D2(main_a7ddrphy_dfi_p0_wrdata[29]), - .D3(main_a7ddrphy_dfi_p1_wrdata[13]), - .D4(main_a7ddrphy_dfi_p1_wrdata[29]), - .D5(main_a7ddrphy_dfi_p2_wrdata[13]), - .D6(main_a7ddrphy_dfi_p2_wrdata[29]), - .D7(main_a7ddrphy_dfi_p3_wrdata[13]), - .D8(main_a7ddrphy_dfi_p3_wrdata[29]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay13), - .TQ(main_a7ddrphy_dq_t13) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_13 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed13), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data13[7]), - .Q2(main_a7ddrphy_dq_i_data13[6]), - .Q3(main_a7ddrphy_dq_i_data13[5]), - .Q4(main_a7ddrphy_dq_i_data13[4]), - .Q5(main_a7ddrphy_dq_i_data13[3]), - .Q6(main_a7ddrphy_dq_i_data13[2]), - .Q7(main_a7ddrphy_dq_i_data13[1]), - .Q8(main_a7ddrphy_dq_i_data13[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_13 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay13), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed13) -); - -IOBUF IOBUF_13( - .I(main_a7ddrphy_dq_o_nodelay13), - .T(main_a7ddrphy_dq_t13), - .IO(ddram_dq[13]), - .O(main_a7ddrphy_dq_i_nodelay13) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_43 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[14]), - .D2(main_a7ddrphy_dfi_p0_wrdata[30]), - .D3(main_a7ddrphy_dfi_p1_wrdata[14]), - .D4(main_a7ddrphy_dfi_p1_wrdata[30]), - .D5(main_a7ddrphy_dfi_p2_wrdata[14]), - .D6(main_a7ddrphy_dfi_p2_wrdata[30]), - .D7(main_a7ddrphy_dfi_p3_wrdata[14]), - .D8(main_a7ddrphy_dfi_p3_wrdata[30]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay14), - .TQ(main_a7ddrphy_dq_t14) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_14 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed14), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data14[7]), - .Q2(main_a7ddrphy_dq_i_data14[6]), - .Q3(main_a7ddrphy_dq_i_data14[5]), - .Q4(main_a7ddrphy_dq_i_data14[4]), - .Q5(main_a7ddrphy_dq_i_data14[3]), - .Q6(main_a7ddrphy_dq_i_data14[2]), - .Q7(main_a7ddrphy_dq_i_data14[1]), - .Q8(main_a7ddrphy_dq_i_data14[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_14 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay14), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed14) -); - -IOBUF IOBUF_14( - .I(main_a7ddrphy_dq_o_nodelay14), - .T(main_a7ddrphy_dq_t14), - .IO(ddram_dq[14]), - .O(main_a7ddrphy_dq_i_nodelay14) -); - -OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) -) OSERDESE2_44 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[15]), - .D2(main_a7ddrphy_dfi_p0_wrdata[31]), - .D3(main_a7ddrphy_dfi_p1_wrdata[15]), - .D4(main_a7ddrphy_dfi_p1_wrdata[31]), - .D5(main_a7ddrphy_dfi_p2_wrdata[15]), - .D6(main_a7ddrphy_dfi_p2_wrdata[31]), - .D7(main_a7ddrphy_dfi_p3_wrdata[15]), - .D8(main_a7ddrphy_dfi_p3_wrdata[31]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay15), - .TQ(main_a7ddrphy_dq_t15) -); - -ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") -) ISERDESE2_15 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed15), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data15[7]), - .Q2(main_a7ddrphy_dq_i_data15[6]), - .Q3(main_a7ddrphy_dq_i_data15[5]), - .Q4(main_a7ddrphy_dq_i_data15[4]), - .Q5(main_a7ddrphy_dq_i_data15[3]), - .Q6(main_a7ddrphy_dq_i_data15[2]), - .Q7(main_a7ddrphy_dq_i_data15[1]), - .Q8(main_a7ddrphy_dq_i_data15[0]) -); - -IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") -) IDELAYE2_15 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay15), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed15) -); - -IOBUF IOBUF_15( - .I(main_a7ddrphy_dq_o_nodelay15), - .T(main_a7ddrphy_dq_t15), - .IO(ddram_dq[15]), - .O(main_a7ddrphy_dq_i_nodelay15) -); - -reg [23:0] storage_2[0:7]; -reg [23:0] memdat_5; -always @(posedge sys_clk) begin - if (main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we) - storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; - memdat_5 <= storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r = memdat_5; -assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r = storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_3[0:7]; -reg [23:0] memdat_6; -always @(posedge sys_clk) begin - if (main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we) - storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; - memdat_6 <= storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r = memdat_6; -assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r = storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_4[0:7]; -reg [23:0] memdat_7; -always @(posedge sys_clk) begin - if (main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we) - storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; - memdat_7 <= storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r = memdat_7; -assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r = storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_5[0:7]; -reg [23:0] memdat_8; -always @(posedge sys_clk) begin - if (main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we) - storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; - memdat_8 <= storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r = memdat_8; -assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r = storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_6[0:7]; -reg [23:0] memdat_9; -always @(posedge sys_clk) begin - if (main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we) - storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; - memdat_9 <= storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r = memdat_9; -assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r = storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_7[0:7]; -reg [23:0] memdat_10; -always @(posedge sys_clk) begin - if (main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we) - storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; - memdat_10 <= storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r = memdat_10; -assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r = storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_8[0:7]; -reg [23:0] memdat_11; -always @(posedge sys_clk) begin - if (main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we) - storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; - memdat_11 <= storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r = memdat_11; -assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r = storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] storage_9[0:7]; -reg [23:0] memdat_12; -always @(posedge sys_clk) begin - if (main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we) - storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; - memdat_12 <= storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr]; -end - -always @(posedge sys_clk) begin -end - -assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r = memdat_12; -assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r = storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr]; - -reg [23:0] tag_mem[0:511]; -reg [8:0] memadr_1; -always @(posedge sys_clk) begin - if (main_tag_port_we) - tag_mem[main_tag_port_adr] <= main_tag_port_dat_w; - memadr_1 <= main_tag_port_adr; -end - -assign main_tag_port_dat_r = tag_mem[memadr_1]; - -VexRiscv VexRiscv( - .clk(sys_clk), - .dBusWishbone_ACK(main_minsoc_cpu_dbus_ack), - .dBusWishbone_DAT_MISO(main_minsoc_cpu_dbus_dat_r), - .dBusWishbone_ERR(main_minsoc_cpu_dbus_err), - .externalInterruptArray(main_minsoc_cpu_interrupt), - .externalResetVector(main_minsoc_vexriscv), - .iBusWishbone_ACK(main_minsoc_cpu_ibus_ack), - .iBusWishbone_DAT_MISO(main_minsoc_cpu_ibus_dat_r), - .iBusWishbone_ERR(main_minsoc_cpu_ibus_err), - .reset((sys_rst | main_minsoc_cpu_reset)), - .softwareInterrupt(1'd0), - .timerInterrupt(1'd0), - .dBusWishbone_ADR(main_minsoc_cpu_dbus_adr), - .dBusWishbone_BTE(main_minsoc_cpu_dbus_bte), - .dBusWishbone_CTI(main_minsoc_cpu_dbus_cti), - .dBusWishbone_CYC(main_minsoc_cpu_dbus_cyc), - .dBusWishbone_DAT_MOSI(main_minsoc_cpu_dbus_dat_w), - .dBusWishbone_SEL(main_minsoc_cpu_dbus_sel), - .dBusWishbone_STB(main_minsoc_cpu_dbus_stb), - .dBusWishbone_WE(main_minsoc_cpu_dbus_we), - .iBusWishbone_ADR(main_minsoc_cpu_ibus_adr), - .iBusWishbone_BTE(main_minsoc_cpu_ibus_bte), - .iBusWishbone_CTI(main_minsoc_cpu_ibus_cti), - .iBusWishbone_CYC(main_minsoc_cpu_ibus_cyc), - .iBusWishbone_DAT_MOSI(main_minsoc_cpu_ibus_dat_w), - .iBusWishbone_SEL(main_minsoc_cpu_ibus_sel), - .iBusWishbone_STB(main_minsoc_cpu_ibus_stb), - .iBusWishbone_WE(main_minsoc_cpu_ibus_we) -); - -PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(5'd20), - .CLKOUT0_PHASE(1'd0), - .CLKOUT1_DIVIDE(3'd5), - .CLKOUT1_PHASE(1'd0), - .CLKOUT2_DIVIDE(3'd5), - .CLKOUT2_PHASE(90000), - .CLKOUT3_DIVIDE(3'd6), - .CLKOUT3_PHASE(1'd0), - .DIVCLK_DIVIDE(1'd1), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") -) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(main_pll_clkin), - .RST(main_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout0), - .CLKOUT1(main_clkout1), - .CLKOUT2(main_clkout2), - .CLKOUT3(main_clkout3), - .LOCKED(main_locked) -); - -reg [7:0] data_mem_grain0[0:511]; -reg [8:0] memadr_2; -always @(posedge sys_clk) begin - if (main_data_port_we[0]) - data_mem_grain0[main_data_port_adr] <= main_data_port_dat_w[7:0]; - memadr_2 <= main_data_port_adr; -end - -assign main_data_port_dat_r[7:0] = data_mem_grain0[memadr_2]; - -reg [7:0] data_mem_grain1[0:511]; -reg [8:0] memadr_3; -always @(posedge sys_clk) begin - if (main_data_port_we[1]) - data_mem_grain1[main_data_port_adr] <= main_data_port_dat_w[15:8]; - memadr_3 <= main_data_port_adr; -end - -assign main_data_port_dat_r[15:8] = data_mem_grain1[memadr_3]; - -reg [7:0] data_mem_grain2[0:511]; -reg [8:0] memadr_4; -always @(posedge sys_clk) begin - if (main_data_port_we[2]) - data_mem_grain2[main_data_port_adr] <= main_data_port_dat_w[23:16]; - memadr_4 <= main_data_port_adr; -end - -assign main_data_port_dat_r[23:16] = data_mem_grain2[memadr_4]; - -reg [7:0] data_mem_grain3[0:511]; -reg [8:0] memadr_5; -always @(posedge sys_clk) begin - if (main_data_port_we[3]) - data_mem_grain3[main_data_port_adr] <= main_data_port_dat_w[31:24]; - memadr_5 <= main_data_port_adr; -end - -assign main_data_port_dat_r[31:24] = data_mem_grain3[memadr_5]; - -reg [7:0] data_mem_grain4[0:511]; -reg [8:0] memadr_6; -always @(posedge sys_clk) begin - if (main_data_port_we[4]) - data_mem_grain4[main_data_port_adr] <= main_data_port_dat_w[39:32]; - memadr_6 <= main_data_port_adr; -end - -assign main_data_port_dat_r[39:32] = data_mem_grain4[memadr_6]; - -reg [7:0] data_mem_grain5[0:511]; -reg [8:0] memadr_7; -always @(posedge sys_clk) begin - if (main_data_port_we[5]) - data_mem_grain5[main_data_port_adr] <= main_data_port_dat_w[47:40]; - memadr_7 <= main_data_port_adr; -end - -assign main_data_port_dat_r[47:40] = data_mem_grain5[memadr_7]; - -reg [7:0] data_mem_grain6[0:511]; -reg [8:0] memadr_8; -always @(posedge sys_clk) begin - if (main_data_port_we[6]) - data_mem_grain6[main_data_port_adr] <= main_data_port_dat_w[55:48]; - memadr_8 <= main_data_port_adr; -end - -assign main_data_port_dat_r[55:48] = data_mem_grain6[memadr_8]; - -reg [7:0] data_mem_grain7[0:511]; -reg [8:0] memadr_9; -always @(posedge sys_clk) begin - if (main_data_port_we[7]) - data_mem_grain7[main_data_port_adr] <= main_data_port_dat_w[63:56]; - memadr_9 <= main_data_port_adr; -end - -assign main_data_port_dat_r[63:56] = data_mem_grain7[memadr_9]; - -reg [7:0] data_mem_grain8[0:511]; -reg [8:0] memadr_10; -always @(posedge sys_clk) begin - if (main_data_port_we[8]) - data_mem_grain8[main_data_port_adr] <= main_data_port_dat_w[71:64]; - memadr_10 <= main_data_port_adr; -end - -assign main_data_port_dat_r[71:64] = data_mem_grain8[memadr_10]; - -reg [7:0] data_mem_grain9[0:511]; -reg [8:0] memadr_11; -always @(posedge sys_clk) begin - if (main_data_port_we[9]) - data_mem_grain9[main_data_port_adr] <= main_data_port_dat_w[79:72]; - memadr_11 <= main_data_port_adr; -end - -assign main_data_port_dat_r[79:72] = data_mem_grain9[memadr_11]; - -reg [7:0] data_mem_grain10[0:511]; -reg [8:0] memadr_12; -always @(posedge sys_clk) begin - if (main_data_port_we[10]) - data_mem_grain10[main_data_port_adr] <= main_data_port_dat_w[87:80]; - memadr_12 <= main_data_port_adr; -end - -assign main_data_port_dat_r[87:80] = data_mem_grain10[memadr_12]; - -reg [7:0] data_mem_grain11[0:511]; -reg [8:0] memadr_13; -always @(posedge sys_clk) begin - if (main_data_port_we[11]) - data_mem_grain11[main_data_port_adr] <= main_data_port_dat_w[95:88]; - memadr_13 <= main_data_port_adr; -end - -assign main_data_port_dat_r[95:88] = data_mem_grain11[memadr_13]; - -reg [7:0] data_mem_grain12[0:511]; -reg [8:0] memadr_14; -always @(posedge sys_clk) begin - if (main_data_port_we[12]) - data_mem_grain12[main_data_port_adr] <= main_data_port_dat_w[103:96]; - memadr_14 <= main_data_port_adr; -end - -assign main_data_port_dat_r[103:96] = data_mem_grain12[memadr_14]; - -reg [7:0] data_mem_grain13[0:511]; -reg [8:0] memadr_15; -always @(posedge sys_clk) begin - if (main_data_port_we[13]) - data_mem_grain13[main_data_port_adr] <= main_data_port_dat_w[111:104]; - memadr_15 <= main_data_port_adr; -end - -assign main_data_port_dat_r[111:104] = data_mem_grain13[memadr_15]; - -reg [7:0] data_mem_grain14[0:511]; -reg [8:0] memadr_16; -always @(posedge sys_clk) begin - if (main_data_port_we[14]) - data_mem_grain14[main_data_port_adr] <= main_data_port_dat_w[119:112]; - memadr_16 <= main_data_port_adr; -end - -assign main_data_port_dat_r[119:112] = data_mem_grain14[memadr_16]; - -reg [7:0] data_mem_grain15[0:511]; -reg [8:0] memadr_17; -always @(posedge sys_clk) begin - if (main_data_port_we[15]) - data_mem_grain15[main_data_port_adr] <= main_data_port_dat_w[127:120]; - memadr_17 <= main_data_port_adr; -end - -assign main_data_port_dat_r[127:120] = data_mem_grain15[memadr_17]; - -(* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE ( - .C(sys_clk), - .CE(1'd1), - .D(1'd0), - .PRE(builder_xilinxasyncresetsynchronizerimpl0), - .Q(builder_xilinxasyncresetsynchronizerimpl0_rst_meta) -); - -(* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_1 ( - .C(sys_clk), - .CE(1'd1), - .D(builder_xilinxasyncresetsynchronizerimpl0_rst_meta), - .PRE(builder_xilinxasyncresetsynchronizerimpl0), - .Q(sys_rst) -); - -(* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_2 ( - .C(sys4x_clk), - .CE(1'd1), - .D(1'd0), - .PRE(builder_xilinxasyncresetsynchronizerimpl1), - .Q(builder_xilinxasyncresetsynchronizerimpl1_rst_meta) -); - -(* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_3 ( - .C(sys4x_clk), - .CE(1'd1), - .D(builder_xilinxasyncresetsynchronizerimpl1_rst_meta), - .PRE(builder_xilinxasyncresetsynchronizerimpl1), - .Q(builder_xilinxasyncresetsynchronizerimpl1_expr) -); - -(* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_4 ( - .C(sys4x_dqs_clk), - .CE(1'd1), - .D(1'd0), - .PRE(builder_xilinxasyncresetsynchronizerimpl2), - .Q(builder_xilinxasyncresetsynchronizerimpl2_rst_meta) -); - -(* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_5 ( - .C(sys4x_dqs_clk), - .CE(1'd1), - .D(builder_xilinxasyncresetsynchronizerimpl2_rst_meta), - .PRE(builder_xilinxasyncresetsynchronizerimpl2), - .Q(builder_xilinxasyncresetsynchronizerimpl2_expr) -); - -(* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_6 ( - .C(clk200_clk), - .CE(1'd1), - .D(1'd0), - .PRE(builder_xilinxasyncresetsynchronizerimpl3), - .Q(builder_xilinxasyncresetsynchronizerimpl3_rst_meta) -); - -(* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) -) FDPE_7 ( - .C(clk200_clk), - .CE(1'd1), - .D(builder_xilinxasyncresetsynchronizerimpl3_rst_meta), - .PRE(builder_xilinxasyncresetsynchronizerimpl3), - .Q(clk200_rst) -); + wire [3:0] led; + + assign led[0] = main_locked; + assign led[1] = idelayctl_rdy; + assign led[2] = 0; + assign led[3] = 0; + + // Manually inserted OBUFs + wire [13:0] ddram_a_iob; + wire [ 2:0] ddram_ba_iob; + wire ddram_ras_n_iob; + wire ddram_cas_n_iob; + wire ddram_we_n_iob; + wire ddram_cs_n_iob; + wire [ 1:0] ddram_dm_iob; + wire ddram_cke_iob; + wire ddram_odt_iob; + wire ddram_reset_n_iob; + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a0 ( + .I(ddram_a_iob[0]), + .O(ddram_a[0]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a1 ( + .I(ddram_a_iob[1]), + .O(ddram_a[1]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a2 ( + .I(ddram_a_iob[2]), + .O(ddram_a[2]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a3 ( + .I(ddram_a_iob[3]), + .O(ddram_a[3]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a4 ( + .I(ddram_a_iob[4]), + .O(ddram_a[4]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a5 ( + .I(ddram_a_iob[5]), + .O(ddram_a[5]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a6 ( + .I(ddram_a_iob[6]), + .O(ddram_a[6]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a7 ( + .I(ddram_a_iob[7]), + .O(ddram_a[7]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a8 ( + .I(ddram_a_iob[8]), + .O(ddram_a[8]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a9 ( + .I(ddram_a_iob[9]), + .O(ddram_a[9]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a10 ( + .I(ddram_a_iob[10]), + .O(ddram_a[10]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a11 ( + .I(ddram_a_iob[11]), + .O(ddram_a[11]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a12 ( + .I(ddram_a_iob[12]), + .O(ddram_a[12]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a13 ( + .I(ddram_a_iob[13]), + .O(ddram_a[13]) + ); + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_ba0 ( + .I(ddram_ba_iob[0]), + .O(ddram_ba[0]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_ba1 ( + .I(ddram_ba_iob[1]), + .O(ddram_ba[1]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_ba2 ( + .I(ddram_ba_iob[2]), + .O(ddram_ba[2]) + ); + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_dm0 ( + .I(ddram_dm_iob[0]), + .O(ddram_dm[0]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_dm1 ( + .I(ddram_dm_iob[1]), + .O(ddram_dm[1]) + ); + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_ras ( + .I(ddram_ras_n_iob), + .O(ddram_ras_n) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_cas ( + .I(ddram_cas_n_iob), + .O(ddram_cas_n) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_we ( + .I(ddram_we_n_iob), + .O(ddram_we_n) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_cs ( + .I(ddram_cs_n_iob), + .O(ddram_cs_n) + ); + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_cke ( + .I(ddram_cke_iob), + .O(ddram_cke) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_odt ( + .I(ddram_odt_iob), + .O(ddram_odt) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_rst ( + .I(ddram_reset_n_iob), + .O(ddram_reset_n) + ); + + // End manually inserted OBUFs + + wire idelayctl_rdy; + reg main_minsoc_ctrl_reset_storage = 1'd0; + reg main_minsoc_ctrl_reset_re = 1'd0; + reg [31:0] main_minsoc_ctrl_scratch_storage = 32'd305419896; + reg main_minsoc_ctrl_scratch_re = 1'd0; + wire [31:0] main_minsoc_ctrl_bus_errors_status; + wire main_minsoc_ctrl_bus_errors_we; + wire main_minsoc_ctrl_reset; + wire main_minsoc_ctrl_bus_error; + reg [31:0] main_minsoc_ctrl_bus_errors = 32'd0; + wire main_minsoc_cpu_reset; + wire [29:0] main_minsoc_cpu_ibus_adr; + wire [31:0] main_minsoc_cpu_ibus_dat_w; + wire [31:0] main_minsoc_cpu_ibus_dat_r; + wire [3:0] main_minsoc_cpu_ibus_sel; + wire main_minsoc_cpu_ibus_cyc; + wire main_minsoc_cpu_ibus_stb; + wire main_minsoc_cpu_ibus_ack; + wire main_minsoc_cpu_ibus_we; + wire [2:0] main_minsoc_cpu_ibus_cti; + wire [1:0] main_minsoc_cpu_ibus_bte; + wire main_minsoc_cpu_ibus_err; + wire [29:0] main_minsoc_cpu_dbus_adr; + wire [31:0] main_minsoc_cpu_dbus_dat_w; + wire [31:0] main_minsoc_cpu_dbus_dat_r; + wire [3:0] main_minsoc_cpu_dbus_sel; + wire main_minsoc_cpu_dbus_cyc; + wire main_minsoc_cpu_dbus_stb; + wire main_minsoc_cpu_dbus_ack; + wire main_minsoc_cpu_dbus_we; + wire [2:0] main_minsoc_cpu_dbus_cti; + wire [1:0] main_minsoc_cpu_dbus_bte; + wire main_minsoc_cpu_dbus_err; + reg [31:0] main_minsoc_cpu_interrupt = 32'd0; + reg [31:0] main_minsoc_vexriscv = 32'd0; + wire [29:0] main_minsoc_interface0_soc_bus_adr; + wire [31:0] main_minsoc_interface0_soc_bus_dat_w; + wire [31:0] main_minsoc_interface0_soc_bus_dat_r; + wire [3:0] main_minsoc_interface0_soc_bus_sel; + wire main_minsoc_interface0_soc_bus_cyc; + wire main_minsoc_interface0_soc_bus_stb; + wire main_minsoc_interface0_soc_bus_ack; + wire main_minsoc_interface0_soc_bus_we; + wire [2:0] main_minsoc_interface0_soc_bus_cti; + wire [1:0] main_minsoc_interface0_soc_bus_bte; + wire main_minsoc_interface0_soc_bus_err; + wire [29:0] main_minsoc_interface1_soc_bus_adr; + wire [31:0] main_minsoc_interface1_soc_bus_dat_w; + wire [31:0] main_minsoc_interface1_soc_bus_dat_r; + wire [3:0] main_minsoc_interface1_soc_bus_sel; + wire main_minsoc_interface1_soc_bus_cyc; + wire main_minsoc_interface1_soc_bus_stb; + wire main_minsoc_interface1_soc_bus_ack; + wire main_minsoc_interface1_soc_bus_we; + wire [2:0] main_minsoc_interface1_soc_bus_cti; + wire [1:0] main_minsoc_interface1_soc_bus_bte; + wire main_minsoc_interface1_soc_bus_err; + wire [29:0] main_minsoc_rom_bus_adr; + wire [31:0] main_minsoc_rom_bus_dat_w; + wire [31:0] main_minsoc_rom_bus_dat_r; + wire [3:0] main_minsoc_rom_bus_sel; + wire main_minsoc_rom_bus_cyc; + wire main_minsoc_rom_bus_stb; + reg main_minsoc_rom_bus_ack = 1'd0; + wire main_minsoc_rom_bus_we; + wire [2:0] main_minsoc_rom_bus_cti; + wire [1:0] main_minsoc_rom_bus_bte; + reg main_minsoc_rom_bus_err = 1'd0; + wire [12:0] main_minsoc_rom_adr; + wire [31:0] main_minsoc_rom_dat_r; + wire [29:0] main_minsoc_sram_bus_adr; + wire [31:0] main_minsoc_sram_bus_dat_w; + wire [31:0] main_minsoc_sram_bus_dat_r; + wire [3:0] main_minsoc_sram_bus_sel; + wire main_minsoc_sram_bus_cyc; + wire main_minsoc_sram_bus_stb; + reg main_minsoc_sram_bus_ack = 1'd0; + wire main_minsoc_sram_bus_we; + wire [2:0] main_minsoc_sram_bus_cti; + wire [1:0] main_minsoc_sram_bus_bte; + reg main_minsoc_sram_bus_err = 1'd0; + wire [9:0] main_minsoc_sram_adr; + wire [31:0] main_minsoc_sram_dat_r; + reg [3:0] main_minsoc_sram_we = 4'd0; + wire [31:0] main_minsoc_sram_dat_w; + reg [31:0] main_minsoc_storage = 32'd8246337; + reg main_minsoc_re = 1'd0; + wire main_minsoc_sink_valid; + reg main_minsoc_sink_ready = 1'd0; + wire main_minsoc_sink_first; + wire main_minsoc_sink_last; + wire [7:0] main_minsoc_sink_payload_data; + reg main_minsoc_uart_clk_txen = 1'd0; + reg [31:0] main_minsoc_phase_accumulator_tx = 32'd0; + reg [7:0] main_minsoc_tx_reg = 8'd0; + reg [3:0] main_minsoc_tx_bitcount = 4'd0; + reg main_minsoc_tx_busy = 1'd0; + reg main_minsoc_source_valid = 1'd0; + wire main_minsoc_source_ready; + reg main_minsoc_source_first = 1'd0; + reg main_minsoc_source_last = 1'd0; + reg [7:0] main_minsoc_source_payload_data = 8'd0; + reg main_minsoc_uart_clk_rxen = 1'd0; + reg [31:0] main_minsoc_phase_accumulator_rx = 32'd0; + wire main_minsoc_rx; + reg main_minsoc_rx_r = 1'd0; + reg [7:0] main_minsoc_rx_reg = 8'd0; + reg [3:0] main_minsoc_rx_bitcount = 4'd0; + reg main_minsoc_rx_busy = 1'd0; + wire main_minsoc_uart_rxtx_re; + wire [7:0] main_minsoc_uart_rxtx_r; + wire main_minsoc_uart_rxtx_we; + wire [7:0] main_minsoc_uart_rxtx_w; + wire main_minsoc_uart_txfull_status; + wire main_minsoc_uart_txfull_we; + wire main_minsoc_uart_rxempty_status; + wire main_minsoc_uart_rxempty_we; + wire main_minsoc_uart_irq; + wire main_minsoc_uart_tx_status; + reg main_minsoc_uart_tx_pending = 1'd0; + wire main_minsoc_uart_tx_trigger; + reg main_minsoc_uart_tx_clear = 1'd0; + reg main_minsoc_uart_tx_old_trigger = 1'd0; + wire main_minsoc_uart_rx_status; + reg main_minsoc_uart_rx_pending = 1'd0; + wire main_minsoc_uart_rx_trigger; + reg main_minsoc_uart_rx_clear = 1'd0; + reg main_minsoc_uart_rx_old_trigger = 1'd0; + wire main_minsoc_uart_eventmanager_status_re; + wire [1:0] main_minsoc_uart_eventmanager_status_r; + wire main_minsoc_uart_eventmanager_status_we; + reg [1:0] main_minsoc_uart_eventmanager_status_w = 2'd0; + wire main_minsoc_uart_eventmanager_pending_re; + wire [1:0] main_minsoc_uart_eventmanager_pending_r; + wire main_minsoc_uart_eventmanager_pending_we; + reg [1:0] main_minsoc_uart_eventmanager_pending_w = 2'd0; + reg [1:0] main_minsoc_uart_eventmanager_storage = 2'd0; + reg main_minsoc_uart_eventmanager_re = 1'd0; + wire main_minsoc_uart_uart_sink_valid; + wire main_minsoc_uart_uart_sink_ready; + wire main_minsoc_uart_uart_sink_first; + wire main_minsoc_uart_uart_sink_last; + wire [7:0] main_minsoc_uart_uart_sink_payload_data; + wire main_minsoc_uart_uart_source_valid; + wire main_minsoc_uart_uart_source_ready; + wire main_minsoc_uart_uart_source_first; + wire main_minsoc_uart_uart_source_last; + wire [7:0] main_minsoc_uart_uart_source_payload_data; + wire main_minsoc_uart_tx_fifo_sink_valid; + wire main_minsoc_uart_tx_fifo_sink_ready; + reg main_minsoc_uart_tx_fifo_sink_first = 1'd0; + reg main_minsoc_uart_tx_fifo_sink_last = 1'd0; + wire [7:0] main_minsoc_uart_tx_fifo_sink_payload_data; + wire main_minsoc_uart_tx_fifo_source_valid; + wire main_minsoc_uart_tx_fifo_source_ready; + wire main_minsoc_uart_tx_fifo_source_first; + wire main_minsoc_uart_tx_fifo_source_last; + wire [7:0] main_minsoc_uart_tx_fifo_source_payload_data; + wire main_minsoc_uart_tx_fifo_re; + reg main_minsoc_uart_tx_fifo_readable = 1'd0; + wire main_minsoc_uart_tx_fifo_syncfifo_we; + wire main_minsoc_uart_tx_fifo_syncfifo_writable; + wire main_minsoc_uart_tx_fifo_syncfifo_re; + wire main_minsoc_uart_tx_fifo_syncfifo_readable; + wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_din; + wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_dout; + reg [4:0] main_minsoc_uart_tx_fifo_level0 = 5'd0; + reg main_minsoc_uart_tx_fifo_replace = 1'd0; + reg [3:0] main_minsoc_uart_tx_fifo_produce = 4'd0; + reg [3:0] main_minsoc_uart_tx_fifo_consume = 4'd0; + reg [3:0] main_minsoc_uart_tx_fifo_wrport_adr = 4'd0; + wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_r; + wire main_minsoc_uart_tx_fifo_wrport_we; + wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_w; + wire main_minsoc_uart_tx_fifo_do_read; + wire [3:0] main_minsoc_uart_tx_fifo_rdport_adr; + wire [9:0] main_minsoc_uart_tx_fifo_rdport_dat_r; + wire main_minsoc_uart_tx_fifo_rdport_re; + wire [4:0] main_minsoc_uart_tx_fifo_level1; + wire [7:0] main_minsoc_uart_tx_fifo_fifo_in_payload_data; + wire main_minsoc_uart_tx_fifo_fifo_in_first; + wire main_minsoc_uart_tx_fifo_fifo_in_last; + wire [7:0] main_minsoc_uart_tx_fifo_fifo_out_payload_data; + wire main_minsoc_uart_tx_fifo_fifo_out_first; + wire main_minsoc_uart_tx_fifo_fifo_out_last; + wire main_minsoc_uart_rx_fifo_sink_valid; + wire main_minsoc_uart_rx_fifo_sink_ready; + wire main_minsoc_uart_rx_fifo_sink_first; + wire main_minsoc_uart_rx_fifo_sink_last; + wire [7:0] main_minsoc_uart_rx_fifo_sink_payload_data; + wire main_minsoc_uart_rx_fifo_source_valid; + wire main_minsoc_uart_rx_fifo_source_ready; + wire main_minsoc_uart_rx_fifo_source_first; + wire main_minsoc_uart_rx_fifo_source_last; + wire [7:0] main_minsoc_uart_rx_fifo_source_payload_data; + wire main_minsoc_uart_rx_fifo_re; + reg main_minsoc_uart_rx_fifo_readable = 1'd0; + wire main_minsoc_uart_rx_fifo_syncfifo_we; + wire main_minsoc_uart_rx_fifo_syncfifo_writable; + wire main_minsoc_uart_rx_fifo_syncfifo_re; + wire main_minsoc_uart_rx_fifo_syncfifo_readable; + wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_din; + wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_dout; + reg [4:0] main_minsoc_uart_rx_fifo_level0 = 5'd0; + reg main_minsoc_uart_rx_fifo_replace = 1'd0; + reg [3:0] main_minsoc_uart_rx_fifo_produce = 4'd0; + reg [3:0] main_minsoc_uart_rx_fifo_consume = 4'd0; + reg [3:0] main_minsoc_uart_rx_fifo_wrport_adr = 4'd0; + wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_r; + wire main_minsoc_uart_rx_fifo_wrport_we; + wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_w; + wire main_minsoc_uart_rx_fifo_do_read; + wire [3:0] main_minsoc_uart_rx_fifo_rdport_adr; + wire [9:0] main_minsoc_uart_rx_fifo_rdport_dat_r; + wire main_minsoc_uart_rx_fifo_rdport_re; + wire [4:0] main_minsoc_uart_rx_fifo_level1; + wire [7:0] main_minsoc_uart_rx_fifo_fifo_in_payload_data; + wire main_minsoc_uart_rx_fifo_fifo_in_first; + wire main_minsoc_uart_rx_fifo_fifo_in_last; + wire [7:0] main_minsoc_uart_rx_fifo_fifo_out_payload_data; + wire main_minsoc_uart_rx_fifo_fifo_out_first; + wire main_minsoc_uart_rx_fifo_fifo_out_last; + reg main_minsoc_uart_reset = 1'd0; + reg [31:0] main_minsoc_timer0_load_storage = 32'd0; + reg main_minsoc_timer0_load_re = 1'd0; + reg [31:0] main_minsoc_timer0_reload_storage = 32'd0; + reg main_minsoc_timer0_reload_re = 1'd0; + reg main_minsoc_timer0_en_storage = 1'd0; + reg main_minsoc_timer0_en_re = 1'd0; + reg main_minsoc_timer0_update_value_storage = 1'd0; + reg main_minsoc_timer0_update_value_re = 1'd0; + reg [31:0] main_minsoc_timer0_value_status = 32'd0; + wire main_minsoc_timer0_value_we; + wire main_minsoc_timer0_irq; + wire main_minsoc_timer0_zero_status; + reg main_minsoc_timer0_zero_pending = 1'd0; + wire main_minsoc_timer0_zero_trigger; + reg main_minsoc_timer0_zero_clear = 1'd0; + reg main_minsoc_timer0_zero_old_trigger = 1'd0; + wire main_minsoc_timer0_eventmanager_status_re; + wire main_minsoc_timer0_eventmanager_status_r; + wire main_minsoc_timer0_eventmanager_status_we; + wire main_minsoc_timer0_eventmanager_status_w; + wire main_minsoc_timer0_eventmanager_pending_re; + wire main_minsoc_timer0_eventmanager_pending_r; + wire main_minsoc_timer0_eventmanager_pending_we; + wire main_minsoc_timer0_eventmanager_pending_w; + reg main_minsoc_timer0_eventmanager_storage = 1'd0; + reg main_minsoc_timer0_eventmanager_re = 1'd0; + reg [31:0] main_minsoc_timer0_value = 32'd0; + reg [13:0] main_minsoc_interface_adr = 14'd0; + reg main_minsoc_interface_we = 1'd0; + wire [7:0] main_minsoc_interface_dat_w; + wire [7:0] main_minsoc_interface_dat_r; + wire [29:0] main_minsoc_bus_wishbone_adr; + wire [31:0] main_minsoc_bus_wishbone_dat_w; + wire [31:0] main_minsoc_bus_wishbone_dat_r; + wire [3:0] main_minsoc_bus_wishbone_sel; + wire main_minsoc_bus_wishbone_cyc; + wire main_minsoc_bus_wishbone_stb; + reg main_minsoc_bus_wishbone_ack = 1'd0; + wire main_minsoc_bus_wishbone_we; + wire [2:0] main_minsoc_bus_wishbone_cti; + wire [1:0] main_minsoc_bus_wishbone_bte; + reg main_minsoc_bus_wishbone_err = 1'd0; + wire [29:0] main_interface0_wb_sdram_adr; + wire [31:0] main_interface0_wb_sdram_dat_w; + reg [31:0] main_interface0_wb_sdram_dat_r = 32'd0; + wire [3:0] main_interface0_wb_sdram_sel; + wire main_interface0_wb_sdram_cyc; + wire main_interface0_wb_sdram_stb; + reg main_interface0_wb_sdram_ack = 1'd0; + wire main_interface0_wb_sdram_we; + wire [2:0] main_interface0_wb_sdram_cti; + wire [1:0] main_interface0_wb_sdram_bte; + reg main_interface0_wb_sdram_err = 1'd0; + wire sys_clk; + wire sys_rst; + wire sys4x_clk; + wire sys4x_dqs_clk; + wire clk200_clk; + wire clk200_rst; + wire main_pll_clkin; + wire main_reset; + wire main_locked; + wire main_clkout0; + wire main_clkout1; + wire main_clkout2; + wire main_clkout3; + reg [3:0] main_reset_counter = 4'd15; + reg main_ic_reset = 1'd1; + reg [4:0] main_a7ddrphy_half_sys8x_taps_storage = 5'd13; + reg main_a7ddrphy_half_sys8x_taps_re = 1'd0; + wire main_a7ddrphy_cdly_rst_re; + wire main_a7ddrphy_cdly_rst_r; + wire main_a7ddrphy_cdly_rst_we; + reg main_a7ddrphy_cdly_rst_w = 1'd0; + wire main_a7ddrphy_cdly_inc_re; + wire main_a7ddrphy_cdly_inc_r; + wire main_a7ddrphy_cdly_inc_we; + reg main_a7ddrphy_cdly_inc_w = 1'd0; + reg [1:0] main_a7ddrphy_dly_sel_storage = 2'd0; + reg main_a7ddrphy_dly_sel_re = 1'd0; + wire main_a7ddrphy_rdly_dq_rst_re; + wire main_a7ddrphy_rdly_dq_rst_r; + wire main_a7ddrphy_rdly_dq_rst_we; + reg main_a7ddrphy_rdly_dq_rst_w = 1'd0; + wire main_a7ddrphy_rdly_dq_inc_re; + wire main_a7ddrphy_rdly_dq_inc_r; + wire main_a7ddrphy_rdly_dq_inc_we; + reg main_a7ddrphy_rdly_dq_inc_w = 1'd0; + wire main_a7ddrphy_rdly_dq_bitslip_rst_re; + wire main_a7ddrphy_rdly_dq_bitslip_rst_r; + wire main_a7ddrphy_rdly_dq_bitslip_rst_we; + reg main_a7ddrphy_rdly_dq_bitslip_rst_w = 1'd0; + wire main_a7ddrphy_rdly_dq_bitslip_re; + wire main_a7ddrphy_rdly_dq_bitslip_r; + wire main_a7ddrphy_rdly_dq_bitslip_we; + reg main_a7ddrphy_rdly_dq_bitslip_w = 1'd0; + wire [13:0] main_a7ddrphy_dfi_p0_address; + wire [2:0] main_a7ddrphy_dfi_p0_bank; + wire main_a7ddrphy_dfi_p0_cas_n; + wire main_a7ddrphy_dfi_p0_cs_n; + wire main_a7ddrphy_dfi_p0_ras_n; + wire main_a7ddrphy_dfi_p0_we_n; + wire main_a7ddrphy_dfi_p0_cke; + wire main_a7ddrphy_dfi_p0_odt; + wire main_a7ddrphy_dfi_p0_reset_n; + wire main_a7ddrphy_dfi_p0_act_n; + wire [31:0] main_a7ddrphy_dfi_p0_wrdata; + wire main_a7ddrphy_dfi_p0_wrdata_en; + wire [3:0] main_a7ddrphy_dfi_p0_wrdata_mask; + wire main_a7ddrphy_dfi_p0_rddata_en; + reg [31:0] main_a7ddrphy_dfi_p0_rddata = 32'd0; + reg main_a7ddrphy_dfi_p0_rddata_valid = 1'd0; + wire [13:0] main_a7ddrphy_dfi_p1_address; + wire [2:0] main_a7ddrphy_dfi_p1_bank; + wire main_a7ddrphy_dfi_p1_cas_n; + wire main_a7ddrphy_dfi_p1_cs_n; + wire main_a7ddrphy_dfi_p1_ras_n; + wire main_a7ddrphy_dfi_p1_we_n; + wire main_a7ddrphy_dfi_p1_cke; + wire main_a7ddrphy_dfi_p1_odt; + wire main_a7ddrphy_dfi_p1_reset_n; + wire main_a7ddrphy_dfi_p1_act_n; + wire [31:0] main_a7ddrphy_dfi_p1_wrdata; + wire main_a7ddrphy_dfi_p1_wrdata_en; + wire [3:0] main_a7ddrphy_dfi_p1_wrdata_mask; + wire main_a7ddrphy_dfi_p1_rddata_en; + reg [31:0] main_a7ddrphy_dfi_p1_rddata = 32'd0; + reg main_a7ddrphy_dfi_p1_rddata_valid = 1'd0; + wire [13:0] main_a7ddrphy_dfi_p2_address; + wire [2:0] main_a7ddrphy_dfi_p2_bank; + wire main_a7ddrphy_dfi_p2_cas_n; + wire main_a7ddrphy_dfi_p2_cs_n; + wire main_a7ddrphy_dfi_p2_ras_n; + wire main_a7ddrphy_dfi_p2_we_n; + wire main_a7ddrphy_dfi_p2_cke; + wire main_a7ddrphy_dfi_p2_odt; + wire main_a7ddrphy_dfi_p2_reset_n; + wire main_a7ddrphy_dfi_p2_act_n; + wire [31:0] main_a7ddrphy_dfi_p2_wrdata; + wire main_a7ddrphy_dfi_p2_wrdata_en; + wire [3:0] main_a7ddrphy_dfi_p2_wrdata_mask; + wire main_a7ddrphy_dfi_p2_rddata_en; + reg [31:0] main_a7ddrphy_dfi_p2_rddata = 32'd0; + reg main_a7ddrphy_dfi_p2_rddata_valid = 1'd0; + wire [13:0] main_a7ddrphy_dfi_p3_address; + wire [2:0] main_a7ddrphy_dfi_p3_bank; + wire main_a7ddrphy_dfi_p3_cas_n; + wire main_a7ddrphy_dfi_p3_cs_n; + wire main_a7ddrphy_dfi_p3_ras_n; + wire main_a7ddrphy_dfi_p3_we_n; + wire main_a7ddrphy_dfi_p3_cke; + wire main_a7ddrphy_dfi_p3_odt; + wire main_a7ddrphy_dfi_p3_reset_n; + wire main_a7ddrphy_dfi_p3_act_n; + wire [31:0] main_a7ddrphy_dfi_p3_wrdata; + wire main_a7ddrphy_dfi_p3_wrdata_en; + wire [3:0] main_a7ddrphy_dfi_p3_wrdata_mask; + wire main_a7ddrphy_dfi_p3_rddata_en; + reg [31:0] main_a7ddrphy_dfi_p3_rddata = 32'd0; + reg main_a7ddrphy_dfi_p3_rddata_valid = 1'd0; + wire main_a7ddrphy_sd_clk_se_nodelay; + reg main_a7ddrphy_oe_dqs = 1'd0; + wire main_a7ddrphy_dqs_preamble; + wire main_a7ddrphy_dqs_postamble; + reg [7:0] main_a7ddrphy_dqs_serdes_pattern = 8'd85; + wire main_a7ddrphy_dqs_nodelay0; + wire main_a7ddrphy_dqs_t0; + wire main_a7ddrphy0; + wire main_a7ddrphy_dqs_nodelay1; + wire main_a7ddrphy_dqs_t1; + wire main_a7ddrphy1; + reg main_a7ddrphy_oe_dq = 1'd0; + wire main_a7ddrphy_dq_o_nodelay0; + wire main_a7ddrphy_dq_i_nodelay0; + wire main_a7ddrphy_dq_i_delayed0; + wire main_a7ddrphy_dq_t0; + wire [7:0] main_a7ddrphy_dq_i_data0; + wire [7:0] main_a7ddrphy_bitslip0_i; + reg [7:0] main_a7ddrphy_bitslip0_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip0_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip0_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay1; + wire main_a7ddrphy_dq_i_nodelay1; + wire main_a7ddrphy_dq_i_delayed1; + wire main_a7ddrphy_dq_t1; + wire [7:0] main_a7ddrphy_dq_i_data1; + wire [7:0] main_a7ddrphy_bitslip1_i; + reg [7:0] main_a7ddrphy_bitslip1_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip1_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip1_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay2; + wire main_a7ddrphy_dq_i_nodelay2; + wire main_a7ddrphy_dq_i_delayed2; + wire main_a7ddrphy_dq_t2; + wire [7:0] main_a7ddrphy_dq_i_data2; + wire [7:0] main_a7ddrphy_bitslip2_i; + reg [7:0] main_a7ddrphy_bitslip2_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip2_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip2_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay3; + wire main_a7ddrphy_dq_i_nodelay3; + wire main_a7ddrphy_dq_i_delayed3; + wire main_a7ddrphy_dq_t3; + wire [7:0] main_a7ddrphy_dq_i_data3; + wire [7:0] main_a7ddrphy_bitslip3_i; + reg [7:0] main_a7ddrphy_bitslip3_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip3_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip3_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay4; + wire main_a7ddrphy_dq_i_nodelay4; + wire main_a7ddrphy_dq_i_delayed4; + wire main_a7ddrphy_dq_t4; + wire [7:0] main_a7ddrphy_dq_i_data4; + wire [7:0] main_a7ddrphy_bitslip4_i; + reg [7:0] main_a7ddrphy_bitslip4_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip4_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip4_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay5; + wire main_a7ddrphy_dq_i_nodelay5; + wire main_a7ddrphy_dq_i_delayed5; + wire main_a7ddrphy_dq_t5; + wire [7:0] main_a7ddrphy_dq_i_data5; + wire [7:0] main_a7ddrphy_bitslip5_i; + reg [7:0] main_a7ddrphy_bitslip5_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip5_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip5_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay6; + wire main_a7ddrphy_dq_i_nodelay6; + wire main_a7ddrphy_dq_i_delayed6; + wire main_a7ddrphy_dq_t6; + wire [7:0] main_a7ddrphy_dq_i_data6; + wire [7:0] main_a7ddrphy_bitslip6_i; + reg [7:0] main_a7ddrphy_bitslip6_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip6_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip6_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay7; + wire main_a7ddrphy_dq_i_nodelay7; + wire main_a7ddrphy_dq_i_delayed7; + wire main_a7ddrphy_dq_t7; + wire [7:0] main_a7ddrphy_dq_i_data7; + wire [7:0] main_a7ddrphy_bitslip7_i; + reg [7:0] main_a7ddrphy_bitslip7_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip7_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip7_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay8; + wire main_a7ddrphy_dq_i_nodelay8; + wire main_a7ddrphy_dq_i_delayed8; + wire main_a7ddrphy_dq_t8; + wire [7:0] main_a7ddrphy_dq_i_data8; + wire [7:0] main_a7ddrphy_bitslip8_i; + reg [7:0] main_a7ddrphy_bitslip8_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip8_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip8_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay9; + wire main_a7ddrphy_dq_i_nodelay9; + wire main_a7ddrphy_dq_i_delayed9; + wire main_a7ddrphy_dq_t9; + wire [7:0] main_a7ddrphy_dq_i_data9; + wire [7:0] main_a7ddrphy_bitslip9_i; + reg [7:0] main_a7ddrphy_bitslip9_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip9_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip9_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay10; + wire main_a7ddrphy_dq_i_nodelay10; + wire main_a7ddrphy_dq_i_delayed10; + wire main_a7ddrphy_dq_t10; + wire [7:0] main_a7ddrphy_dq_i_data10; + wire [7:0] main_a7ddrphy_bitslip10_i; + reg [7:0] main_a7ddrphy_bitslip10_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip10_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip10_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay11; + wire main_a7ddrphy_dq_i_nodelay11; + wire main_a7ddrphy_dq_i_delayed11; + wire main_a7ddrphy_dq_t11; + wire [7:0] main_a7ddrphy_dq_i_data11; + wire [7:0] main_a7ddrphy_bitslip11_i; + reg [7:0] main_a7ddrphy_bitslip11_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip11_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip11_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay12; + wire main_a7ddrphy_dq_i_nodelay12; + wire main_a7ddrphy_dq_i_delayed12; + wire main_a7ddrphy_dq_t12; + wire [7:0] main_a7ddrphy_dq_i_data12; + wire [7:0] main_a7ddrphy_bitslip12_i; + reg [7:0] main_a7ddrphy_bitslip12_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip12_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip12_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay13; + wire main_a7ddrphy_dq_i_nodelay13; + wire main_a7ddrphy_dq_i_delayed13; + wire main_a7ddrphy_dq_t13; + wire [7:0] main_a7ddrphy_dq_i_data13; + wire [7:0] main_a7ddrphy_bitslip13_i; + reg [7:0] main_a7ddrphy_bitslip13_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip13_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip13_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay14; + wire main_a7ddrphy_dq_i_nodelay14; + wire main_a7ddrphy_dq_i_delayed14; + wire main_a7ddrphy_dq_t14; + wire [7:0] main_a7ddrphy_dq_i_data14; + wire [7:0] main_a7ddrphy_bitslip14_i; + reg [7:0] main_a7ddrphy_bitslip14_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip14_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip14_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay15; + wire main_a7ddrphy_dq_i_nodelay15; + wire main_a7ddrphy_dq_i_delayed15; + wire main_a7ddrphy_dq_t15; + wire [7:0] main_a7ddrphy_dq_i_data15; + wire [7:0] main_a7ddrphy_bitslip15_i; + reg [7:0] main_a7ddrphy_bitslip15_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip15_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip15_r = 16'd0; + reg main_a7ddrphy_n_rddata_en0 = 1'd0; + reg main_a7ddrphy_n_rddata_en1 = 1'd0; + reg main_a7ddrphy_n_rddata_en2 = 1'd0; + reg main_a7ddrphy_n_rddata_en3 = 1'd0; + reg main_a7ddrphy_n_rddata_en4 = 1'd0; + reg main_a7ddrphy_n_rddata_en5 = 1'd0; + reg main_a7ddrphy_n_rddata_en6 = 1'd0; + reg main_a7ddrphy_n_rddata_en7 = 1'd0; + wire main_a7ddrphy_oe; + reg [3:0] main_a7ddrphy_last_wrdata_en = 4'd0; + wire [13:0] main_sdram_inti_p0_address; + wire [2:0] main_sdram_inti_p0_bank; + reg main_sdram_inti_p0_cas_n = 1'd1; + reg main_sdram_inti_p0_cs_n = 1'd1; + reg main_sdram_inti_p0_ras_n = 1'd1; + reg main_sdram_inti_p0_we_n = 1'd1; + wire main_sdram_inti_p0_cke; + wire main_sdram_inti_p0_odt; + wire main_sdram_inti_p0_reset_n; + reg main_sdram_inti_p0_act_n = 1'd1; + wire [31:0] main_sdram_inti_p0_wrdata; + wire main_sdram_inti_p0_wrdata_en; + wire [3:0] main_sdram_inti_p0_wrdata_mask; + wire main_sdram_inti_p0_rddata_en; + reg [31:0] main_sdram_inti_p0_rddata = 32'd0; + reg main_sdram_inti_p0_rddata_valid = 1'd0; + wire [13:0] main_sdram_inti_p1_address; + wire [2:0] main_sdram_inti_p1_bank; + reg main_sdram_inti_p1_cas_n = 1'd1; + reg main_sdram_inti_p1_cs_n = 1'd1; + reg main_sdram_inti_p1_ras_n = 1'd1; + reg main_sdram_inti_p1_we_n = 1'd1; + wire main_sdram_inti_p1_cke; + wire main_sdram_inti_p1_odt; + wire main_sdram_inti_p1_reset_n; + reg main_sdram_inti_p1_act_n = 1'd1; + wire [31:0] main_sdram_inti_p1_wrdata; + wire main_sdram_inti_p1_wrdata_en; + wire [3:0] main_sdram_inti_p1_wrdata_mask; + wire main_sdram_inti_p1_rddata_en; + reg [31:0] main_sdram_inti_p1_rddata = 32'd0; + reg main_sdram_inti_p1_rddata_valid = 1'd0; + wire [13:0] main_sdram_inti_p2_address; + wire [2:0] main_sdram_inti_p2_bank; + reg main_sdram_inti_p2_cas_n = 1'd1; + reg main_sdram_inti_p2_cs_n = 1'd1; + reg main_sdram_inti_p2_ras_n = 1'd1; + reg main_sdram_inti_p2_we_n = 1'd1; + wire main_sdram_inti_p2_cke; + wire main_sdram_inti_p2_odt; + wire main_sdram_inti_p2_reset_n; + reg main_sdram_inti_p2_act_n = 1'd1; + wire [31:0] main_sdram_inti_p2_wrdata; + wire main_sdram_inti_p2_wrdata_en; + wire [3:0] main_sdram_inti_p2_wrdata_mask; + wire main_sdram_inti_p2_rddata_en; + reg [31:0] main_sdram_inti_p2_rddata = 32'd0; + reg main_sdram_inti_p2_rddata_valid = 1'd0; + wire [13:0] main_sdram_inti_p3_address; + wire [2:0] main_sdram_inti_p3_bank; + reg main_sdram_inti_p3_cas_n = 1'd1; + reg main_sdram_inti_p3_cs_n = 1'd1; + reg main_sdram_inti_p3_ras_n = 1'd1; + reg main_sdram_inti_p3_we_n = 1'd1; + wire main_sdram_inti_p3_cke; + wire main_sdram_inti_p3_odt; + wire main_sdram_inti_p3_reset_n; + reg main_sdram_inti_p3_act_n = 1'd1; + wire [31:0] main_sdram_inti_p3_wrdata; + wire main_sdram_inti_p3_wrdata_en; + wire [3:0] main_sdram_inti_p3_wrdata_mask; + wire main_sdram_inti_p3_rddata_en; + reg [31:0] main_sdram_inti_p3_rddata = 32'd0; + reg main_sdram_inti_p3_rddata_valid = 1'd0; + wire [13:0] main_sdram_slave_p0_address; + wire [2:0] main_sdram_slave_p0_bank; + wire main_sdram_slave_p0_cas_n; + wire main_sdram_slave_p0_cs_n; + wire main_sdram_slave_p0_ras_n; + wire main_sdram_slave_p0_we_n; + wire main_sdram_slave_p0_cke; + wire main_sdram_slave_p0_odt; + wire main_sdram_slave_p0_reset_n; + wire main_sdram_slave_p0_act_n; + wire [31:0] main_sdram_slave_p0_wrdata; + wire main_sdram_slave_p0_wrdata_en; + wire [3:0] main_sdram_slave_p0_wrdata_mask; + wire main_sdram_slave_p0_rddata_en; + reg [31:0] main_sdram_slave_p0_rddata = 32'd0; + reg main_sdram_slave_p0_rddata_valid = 1'd0; + wire [13:0] main_sdram_slave_p1_address; + wire [2:0] main_sdram_slave_p1_bank; + wire main_sdram_slave_p1_cas_n; + wire main_sdram_slave_p1_cs_n; + wire main_sdram_slave_p1_ras_n; + wire main_sdram_slave_p1_we_n; + wire main_sdram_slave_p1_cke; + wire main_sdram_slave_p1_odt; + wire main_sdram_slave_p1_reset_n; + wire main_sdram_slave_p1_act_n; + wire [31:0] main_sdram_slave_p1_wrdata; + wire main_sdram_slave_p1_wrdata_en; + wire [3:0] main_sdram_slave_p1_wrdata_mask; + wire main_sdram_slave_p1_rddata_en; + reg [31:0] main_sdram_slave_p1_rddata = 32'd0; + reg main_sdram_slave_p1_rddata_valid = 1'd0; + wire [13:0] main_sdram_slave_p2_address; + wire [2:0] main_sdram_slave_p2_bank; + wire main_sdram_slave_p2_cas_n; + wire main_sdram_slave_p2_cs_n; + wire main_sdram_slave_p2_ras_n; + wire main_sdram_slave_p2_we_n; + wire main_sdram_slave_p2_cke; + wire main_sdram_slave_p2_odt; + wire main_sdram_slave_p2_reset_n; + wire main_sdram_slave_p2_act_n; + wire [31:0] main_sdram_slave_p2_wrdata; + wire main_sdram_slave_p2_wrdata_en; + wire [3:0] main_sdram_slave_p2_wrdata_mask; + wire main_sdram_slave_p2_rddata_en; + reg [31:0] main_sdram_slave_p2_rddata = 32'd0; + reg main_sdram_slave_p2_rddata_valid = 1'd0; + wire [13:0] main_sdram_slave_p3_address; + wire [2:0] main_sdram_slave_p3_bank; + wire main_sdram_slave_p3_cas_n; + wire main_sdram_slave_p3_cs_n; + wire main_sdram_slave_p3_ras_n; + wire main_sdram_slave_p3_we_n; + wire main_sdram_slave_p3_cke; + wire main_sdram_slave_p3_odt; + wire main_sdram_slave_p3_reset_n; + wire main_sdram_slave_p3_act_n; + wire [31:0] main_sdram_slave_p3_wrdata; + wire main_sdram_slave_p3_wrdata_en; + wire [3:0] main_sdram_slave_p3_wrdata_mask; + wire main_sdram_slave_p3_rddata_en; + reg [31:0] main_sdram_slave_p3_rddata = 32'd0; + reg main_sdram_slave_p3_rddata_valid = 1'd0; + reg [13:0] main_sdram_master_p0_address = 14'd0; + reg [2:0] main_sdram_master_p0_bank = 3'd0; + reg main_sdram_master_p0_cas_n = 1'd1; + reg main_sdram_master_p0_cs_n = 1'd1; + reg main_sdram_master_p0_ras_n = 1'd1; + reg main_sdram_master_p0_we_n = 1'd1; + reg main_sdram_master_p0_cke = 1'd0; + reg main_sdram_master_p0_odt = 1'd0; + reg main_sdram_master_p0_reset_n = 1'd0; + reg main_sdram_master_p0_act_n = 1'd1; + reg [31:0] main_sdram_master_p0_wrdata = 32'd0; + reg main_sdram_master_p0_wrdata_en = 1'd0; + reg [3:0] main_sdram_master_p0_wrdata_mask = 4'd0; + reg main_sdram_master_p0_rddata_en = 1'd0; + wire [31:0] main_sdram_master_p0_rddata; + wire main_sdram_master_p0_rddata_valid; + reg [13:0] main_sdram_master_p1_address = 14'd0; + reg [2:0] main_sdram_master_p1_bank = 3'd0; + reg main_sdram_master_p1_cas_n = 1'd1; + reg main_sdram_master_p1_cs_n = 1'd1; + reg main_sdram_master_p1_ras_n = 1'd1; + reg main_sdram_master_p1_we_n = 1'd1; + reg main_sdram_master_p1_cke = 1'd0; + reg main_sdram_master_p1_odt = 1'd0; + reg main_sdram_master_p1_reset_n = 1'd0; + reg main_sdram_master_p1_act_n = 1'd1; + reg [31:0] main_sdram_master_p1_wrdata = 32'd0; + reg main_sdram_master_p1_wrdata_en = 1'd0; + reg [3:0] main_sdram_master_p1_wrdata_mask = 4'd0; + reg main_sdram_master_p1_rddata_en = 1'd0; + wire [31:0] main_sdram_master_p1_rddata; + wire main_sdram_master_p1_rddata_valid; + reg [13:0] main_sdram_master_p2_address = 14'd0; + reg [2:0] main_sdram_master_p2_bank = 3'd0; + reg main_sdram_master_p2_cas_n = 1'd1; + reg main_sdram_master_p2_cs_n = 1'd1; + reg main_sdram_master_p2_ras_n = 1'd1; + reg main_sdram_master_p2_we_n = 1'd1; + reg main_sdram_master_p2_cke = 1'd0; + reg main_sdram_master_p2_odt = 1'd0; + reg main_sdram_master_p2_reset_n = 1'd0; + reg main_sdram_master_p2_act_n = 1'd1; + reg [31:0] main_sdram_master_p2_wrdata = 32'd0; + reg main_sdram_master_p2_wrdata_en = 1'd0; + reg [3:0] main_sdram_master_p2_wrdata_mask = 4'd0; + reg main_sdram_master_p2_rddata_en = 1'd0; + wire [31:0] main_sdram_master_p2_rddata; + wire main_sdram_master_p2_rddata_valid; + reg [13:0] main_sdram_master_p3_address = 14'd0; + reg [2:0] main_sdram_master_p3_bank = 3'd0; + reg main_sdram_master_p3_cas_n = 1'd1; + reg main_sdram_master_p3_cs_n = 1'd1; + reg main_sdram_master_p3_ras_n = 1'd1; + reg main_sdram_master_p3_we_n = 1'd1; + reg main_sdram_master_p3_cke = 1'd0; + reg main_sdram_master_p3_odt = 1'd0; + reg main_sdram_master_p3_reset_n = 1'd0; + reg main_sdram_master_p3_act_n = 1'd1; + reg [31:0] main_sdram_master_p3_wrdata = 32'd0; + reg main_sdram_master_p3_wrdata_en = 1'd0; + reg [3:0] main_sdram_master_p3_wrdata_mask = 4'd0; + reg main_sdram_master_p3_rddata_en = 1'd0; + wire [31:0] main_sdram_master_p3_rddata; + wire main_sdram_master_p3_rddata_valid; + reg [3:0] main_sdram_storage = 4'd0; + reg main_sdram_re = 1'd0; + reg [5:0] main_sdram_phaseinjector0_command_storage = 6'd0; + reg main_sdram_phaseinjector0_command_re = 1'd0; + wire main_sdram_phaseinjector0_command_issue_re; + wire main_sdram_phaseinjector0_command_issue_r; + wire main_sdram_phaseinjector0_command_issue_we; + reg main_sdram_phaseinjector0_command_issue_w = 1'd0; + reg [13:0] main_sdram_phaseinjector0_address_storage = 14'd0; + reg main_sdram_phaseinjector0_address_re = 1'd0; + reg [2:0] main_sdram_phaseinjector0_baddress_storage = 3'd0; + reg main_sdram_phaseinjector0_baddress_re = 1'd0; + reg [31:0] main_sdram_phaseinjector0_wrdata_storage = 32'd0; + reg main_sdram_phaseinjector0_wrdata_re = 1'd0; + reg [31:0] main_sdram_phaseinjector0_status = 32'd0; + wire main_sdram_phaseinjector0_we; + reg [5:0] main_sdram_phaseinjector1_command_storage = 6'd0; + reg main_sdram_phaseinjector1_command_re = 1'd0; + wire main_sdram_phaseinjector1_command_issue_re; + wire main_sdram_phaseinjector1_command_issue_r; + wire main_sdram_phaseinjector1_command_issue_we; + reg main_sdram_phaseinjector1_command_issue_w = 1'd0; + reg [13:0] main_sdram_phaseinjector1_address_storage = 14'd0; + reg main_sdram_phaseinjector1_address_re = 1'd0; + reg [2:0] main_sdram_phaseinjector1_baddress_storage = 3'd0; + reg main_sdram_phaseinjector1_baddress_re = 1'd0; + reg [31:0] main_sdram_phaseinjector1_wrdata_storage = 32'd0; + reg main_sdram_phaseinjector1_wrdata_re = 1'd0; + reg [31:0] main_sdram_phaseinjector1_status = 32'd0; + wire main_sdram_phaseinjector1_we; + reg [5:0] main_sdram_phaseinjector2_command_storage = 6'd0; + reg main_sdram_phaseinjector2_command_re = 1'd0; + wire main_sdram_phaseinjector2_command_issue_re; + wire main_sdram_phaseinjector2_command_issue_r; + wire main_sdram_phaseinjector2_command_issue_we; + reg main_sdram_phaseinjector2_command_issue_w = 1'd0; + reg [13:0] main_sdram_phaseinjector2_address_storage = 14'd0; + reg main_sdram_phaseinjector2_address_re = 1'd0; + reg [2:0] main_sdram_phaseinjector2_baddress_storage = 3'd0; + reg main_sdram_phaseinjector2_baddress_re = 1'd0; + reg [31:0] main_sdram_phaseinjector2_wrdata_storage = 32'd0; + reg main_sdram_phaseinjector2_wrdata_re = 1'd0; + reg [31:0] main_sdram_phaseinjector2_status = 32'd0; + wire main_sdram_phaseinjector2_we; + reg [5:0] main_sdram_phaseinjector3_command_storage = 6'd0; + reg main_sdram_phaseinjector3_command_re = 1'd0; + wire main_sdram_phaseinjector3_command_issue_re; + wire main_sdram_phaseinjector3_command_issue_r; + wire main_sdram_phaseinjector3_command_issue_we; + reg main_sdram_phaseinjector3_command_issue_w = 1'd0; + reg [13:0] main_sdram_phaseinjector3_address_storage = 14'd0; + reg main_sdram_phaseinjector3_address_re = 1'd0; + reg [2:0] main_sdram_phaseinjector3_baddress_storage = 3'd0; + reg main_sdram_phaseinjector3_baddress_re = 1'd0; + reg [31:0] main_sdram_phaseinjector3_wrdata_storage = 32'd0; + reg main_sdram_phaseinjector3_wrdata_re = 1'd0; + reg [31:0] main_sdram_phaseinjector3_status = 32'd0; + wire main_sdram_phaseinjector3_we; + wire main_sdram_interface_bank0_valid; + wire main_sdram_interface_bank0_ready; + wire main_sdram_interface_bank0_we; + wire [20:0] main_sdram_interface_bank0_addr; + wire main_sdram_interface_bank0_lock; + wire main_sdram_interface_bank0_wdata_ready; + wire main_sdram_interface_bank0_rdata_valid; + wire main_sdram_interface_bank1_valid; + wire main_sdram_interface_bank1_ready; + wire main_sdram_interface_bank1_we; + wire [20:0] main_sdram_interface_bank1_addr; + wire main_sdram_interface_bank1_lock; + wire main_sdram_interface_bank1_wdata_ready; + wire main_sdram_interface_bank1_rdata_valid; + wire main_sdram_interface_bank2_valid; + wire main_sdram_interface_bank2_ready; + wire main_sdram_interface_bank2_we; + wire [20:0] main_sdram_interface_bank2_addr; + wire main_sdram_interface_bank2_lock; + wire main_sdram_interface_bank2_wdata_ready; + wire main_sdram_interface_bank2_rdata_valid; + wire main_sdram_interface_bank3_valid; + wire main_sdram_interface_bank3_ready; + wire main_sdram_interface_bank3_we; + wire [20:0] main_sdram_interface_bank3_addr; + wire main_sdram_interface_bank3_lock; + wire main_sdram_interface_bank3_wdata_ready; + wire main_sdram_interface_bank3_rdata_valid; + wire main_sdram_interface_bank4_valid; + wire main_sdram_interface_bank4_ready; + wire main_sdram_interface_bank4_we; + wire [20:0] main_sdram_interface_bank4_addr; + wire main_sdram_interface_bank4_lock; + wire main_sdram_interface_bank4_wdata_ready; + wire main_sdram_interface_bank4_rdata_valid; + wire main_sdram_interface_bank5_valid; + wire main_sdram_interface_bank5_ready; + wire main_sdram_interface_bank5_we; + wire [20:0] main_sdram_interface_bank5_addr; + wire main_sdram_interface_bank5_lock; + wire main_sdram_interface_bank5_wdata_ready; + wire main_sdram_interface_bank5_rdata_valid; + wire main_sdram_interface_bank6_valid; + wire main_sdram_interface_bank6_ready; + wire main_sdram_interface_bank6_we; + wire [20:0] main_sdram_interface_bank6_addr; + wire main_sdram_interface_bank6_lock; + wire main_sdram_interface_bank6_wdata_ready; + wire main_sdram_interface_bank6_rdata_valid; + wire main_sdram_interface_bank7_valid; + wire main_sdram_interface_bank7_ready; + wire main_sdram_interface_bank7_we; + wire [20:0] main_sdram_interface_bank7_addr; + wire main_sdram_interface_bank7_lock; + wire main_sdram_interface_bank7_wdata_ready; + wire main_sdram_interface_bank7_rdata_valid; + reg [127:0] main_sdram_interface_wdata = 128'd0; + reg [15:0] main_sdram_interface_wdata_we = 16'd0; + wire [127:0] main_sdram_interface_rdata; + reg [13:0] main_sdram_dfi_p0_address = 14'd0; + reg [2:0] main_sdram_dfi_p0_bank = 3'd0; + reg main_sdram_dfi_p0_cas_n = 1'd1; + reg main_sdram_dfi_p0_cs_n = 1'd1; + reg main_sdram_dfi_p0_ras_n = 1'd1; + reg main_sdram_dfi_p0_we_n = 1'd1; + wire main_sdram_dfi_p0_cke; + wire main_sdram_dfi_p0_odt; + wire main_sdram_dfi_p0_reset_n; + reg main_sdram_dfi_p0_act_n = 1'd1; + wire [31:0] main_sdram_dfi_p0_wrdata; + reg main_sdram_dfi_p0_wrdata_en = 1'd0; + wire [3:0] main_sdram_dfi_p0_wrdata_mask; + reg main_sdram_dfi_p0_rddata_en = 1'd0; + wire [31:0] main_sdram_dfi_p0_rddata; + wire main_sdram_dfi_p0_rddata_valid; + reg [13:0] main_sdram_dfi_p1_address = 14'd0; + reg [2:0] main_sdram_dfi_p1_bank = 3'd0; + reg main_sdram_dfi_p1_cas_n = 1'd1; + reg main_sdram_dfi_p1_cs_n = 1'd1; + reg main_sdram_dfi_p1_ras_n = 1'd1; + reg main_sdram_dfi_p1_we_n = 1'd1; + wire main_sdram_dfi_p1_cke; + wire main_sdram_dfi_p1_odt; + wire main_sdram_dfi_p1_reset_n; + reg main_sdram_dfi_p1_act_n = 1'd1; + wire [31:0] main_sdram_dfi_p1_wrdata; + reg main_sdram_dfi_p1_wrdata_en = 1'd0; + wire [3:0] main_sdram_dfi_p1_wrdata_mask; + reg main_sdram_dfi_p1_rddata_en = 1'd0; + wire [31:0] main_sdram_dfi_p1_rddata; + wire main_sdram_dfi_p1_rddata_valid; + reg [13:0] main_sdram_dfi_p2_address = 14'd0; + reg [2:0] main_sdram_dfi_p2_bank = 3'd0; + reg main_sdram_dfi_p2_cas_n = 1'd1; + reg main_sdram_dfi_p2_cs_n = 1'd1; + reg main_sdram_dfi_p2_ras_n = 1'd1; + reg main_sdram_dfi_p2_we_n = 1'd1; + wire main_sdram_dfi_p2_cke; + wire main_sdram_dfi_p2_odt; + wire main_sdram_dfi_p2_reset_n; + reg main_sdram_dfi_p2_act_n = 1'd1; + wire [31:0] main_sdram_dfi_p2_wrdata; + reg main_sdram_dfi_p2_wrdata_en = 1'd0; + wire [3:0] main_sdram_dfi_p2_wrdata_mask; + reg main_sdram_dfi_p2_rddata_en = 1'd0; + wire [31:0] main_sdram_dfi_p2_rddata; + wire main_sdram_dfi_p2_rddata_valid; + reg [13:0] main_sdram_dfi_p3_address = 14'd0; + reg [2:0] main_sdram_dfi_p3_bank = 3'd0; + reg main_sdram_dfi_p3_cas_n = 1'd1; + reg main_sdram_dfi_p3_cs_n = 1'd1; + reg main_sdram_dfi_p3_ras_n = 1'd1; + reg main_sdram_dfi_p3_we_n = 1'd1; + wire main_sdram_dfi_p3_cke; + wire main_sdram_dfi_p3_odt; + wire main_sdram_dfi_p3_reset_n; + reg main_sdram_dfi_p3_act_n = 1'd1; + wire [31:0] main_sdram_dfi_p3_wrdata; + reg main_sdram_dfi_p3_wrdata_en = 1'd0; + wire [3:0] main_sdram_dfi_p3_wrdata_mask; + reg main_sdram_dfi_p3_rddata_en = 1'd0; + wire [31:0] main_sdram_dfi_p3_rddata; + wire main_sdram_dfi_p3_rddata_valid; + reg main_sdram_cmd_valid = 1'd0; + reg main_sdram_cmd_ready = 1'd0; + reg main_sdram_cmd_last = 1'd0; + reg [13:0] main_sdram_cmd_payload_a = 14'd0; + reg [2:0] main_sdram_cmd_payload_ba = 3'd0; + reg main_sdram_cmd_payload_cas = 1'd0; + reg main_sdram_cmd_payload_ras = 1'd0; + reg main_sdram_cmd_payload_we = 1'd0; + reg main_sdram_cmd_payload_is_read = 1'd0; + reg main_sdram_cmd_payload_is_write = 1'd0; + wire main_sdram_wants_refresh; + wire main_sdram_wants_zqcs; + wire main_sdram_timer_wait; + wire main_sdram_timer_done0; + wire [8:0] main_sdram_timer_count0; + wire main_sdram_timer_done1; + reg [8:0] main_sdram_timer_count1 = 9'd468; + wire main_sdram_postponer_req_i; + reg main_sdram_postponer_req_o = 1'd0; + reg main_sdram_postponer_count = 1'd0; + reg main_sdram_sequencer_start0 = 1'd0; + wire main_sdram_sequencer_done0; + wire main_sdram_sequencer_start1; + reg main_sdram_sequencer_done1 = 1'd0; + reg [5:0] main_sdram_sequencer_counter = 6'd0; + reg main_sdram_sequencer_count = 1'd0; + wire main_sdram_zqcs_timer_wait; + wire main_sdram_zqcs_timer_done0; + wire [25:0] main_sdram_zqcs_timer_count0; + wire main_sdram_zqcs_timer_done1; + reg [25:0] main_sdram_zqcs_timer_count1 = 26'd59999999; + reg main_sdram_zqcs_executer_start = 1'd0; + reg main_sdram_zqcs_executer_done = 1'd0; + reg [4:0] main_sdram_zqcs_executer_counter = 5'd0; + wire main_sdram_bankmachine0_req_valid; + wire main_sdram_bankmachine0_req_ready; + wire main_sdram_bankmachine0_req_we; + wire [20:0] main_sdram_bankmachine0_req_addr; + wire main_sdram_bankmachine0_req_lock; + reg main_sdram_bankmachine0_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine0_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine0_refresh_req; + reg main_sdram_bankmachine0_refresh_gnt = 1'd0; + reg main_sdram_bankmachine0_cmd_valid = 1'd0; + reg main_sdram_bankmachine0_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine0_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine0_cmd_payload_ba; + reg main_sdram_bankmachine0_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine0_auto_precharge = 1'd0; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; + reg [3:0] main_sdram_bankmachine0_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine0_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine0_cmd_buffer_sink_valid; + wire main_sdram_bankmachine0_cmd_buffer_sink_ready; + wire main_sdram_bankmachine0_cmd_buffer_sink_first; + wire main_sdram_bankmachine0_cmd_buffer_sink_last; + wire main_sdram_bankmachine0_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine0_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine0_cmd_buffer_source_ready; + reg main_sdram_bankmachine0_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine0_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine0_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine0_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine0_row = 14'd0; + reg main_sdram_bankmachine0_row_opened = 1'd0; + wire main_sdram_bankmachine0_row_hit; + reg main_sdram_bankmachine0_row_open = 1'd0; + reg main_sdram_bankmachine0_row_close = 1'd0; + reg main_sdram_bankmachine0_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine0_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine0_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine0_twtpcon_count = 3'd0; + wire main_sdram_bankmachine0_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine0_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine0_trccon_count = 2'd0; + wire main_sdram_bankmachine0_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine0_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine0_trascon_count = 2'd0; + wire main_sdram_bankmachine1_req_valid; + wire main_sdram_bankmachine1_req_ready; + wire main_sdram_bankmachine1_req_we; + wire [20:0] main_sdram_bankmachine1_req_addr; + wire main_sdram_bankmachine1_req_lock; + reg main_sdram_bankmachine1_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine1_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine1_refresh_req; + reg main_sdram_bankmachine1_refresh_gnt = 1'd0; + reg main_sdram_bankmachine1_cmd_valid = 1'd0; + reg main_sdram_bankmachine1_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine1_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine1_cmd_payload_ba; + reg main_sdram_bankmachine1_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine1_auto_precharge = 1'd0; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; + reg [3:0] main_sdram_bankmachine1_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine1_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine1_cmd_buffer_sink_valid; + wire main_sdram_bankmachine1_cmd_buffer_sink_ready; + wire main_sdram_bankmachine1_cmd_buffer_sink_first; + wire main_sdram_bankmachine1_cmd_buffer_sink_last; + wire main_sdram_bankmachine1_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine1_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine1_cmd_buffer_source_ready; + reg main_sdram_bankmachine1_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine1_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine1_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine1_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine1_row = 14'd0; + reg main_sdram_bankmachine1_row_opened = 1'd0; + wire main_sdram_bankmachine1_row_hit; + reg main_sdram_bankmachine1_row_open = 1'd0; + reg main_sdram_bankmachine1_row_close = 1'd0; + reg main_sdram_bankmachine1_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine1_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine1_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine1_twtpcon_count = 3'd0; + wire main_sdram_bankmachine1_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine1_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine1_trccon_count = 2'd0; + wire main_sdram_bankmachine1_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine1_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine1_trascon_count = 2'd0; + wire main_sdram_bankmachine2_req_valid; + wire main_sdram_bankmachine2_req_ready; + wire main_sdram_bankmachine2_req_we; + wire [20:0] main_sdram_bankmachine2_req_addr; + wire main_sdram_bankmachine2_req_lock; + reg main_sdram_bankmachine2_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine2_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine2_refresh_req; + reg main_sdram_bankmachine2_refresh_gnt = 1'd0; + reg main_sdram_bankmachine2_cmd_valid = 1'd0; + reg main_sdram_bankmachine2_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine2_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine2_cmd_payload_ba; + reg main_sdram_bankmachine2_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine2_auto_precharge = 1'd0; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; + reg [3:0] main_sdram_bankmachine2_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine2_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine2_cmd_buffer_sink_valid; + wire main_sdram_bankmachine2_cmd_buffer_sink_ready; + wire main_sdram_bankmachine2_cmd_buffer_sink_first; + wire main_sdram_bankmachine2_cmd_buffer_sink_last; + wire main_sdram_bankmachine2_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine2_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine2_cmd_buffer_source_ready; + reg main_sdram_bankmachine2_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine2_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine2_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine2_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine2_row = 14'd0; + reg main_sdram_bankmachine2_row_opened = 1'd0; + wire main_sdram_bankmachine2_row_hit; + reg main_sdram_bankmachine2_row_open = 1'd0; + reg main_sdram_bankmachine2_row_close = 1'd0; + reg main_sdram_bankmachine2_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine2_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine2_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine2_twtpcon_count = 3'd0; + wire main_sdram_bankmachine2_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine2_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine2_trccon_count = 2'd0; + wire main_sdram_bankmachine2_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine2_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine2_trascon_count = 2'd0; + wire main_sdram_bankmachine3_req_valid; + wire main_sdram_bankmachine3_req_ready; + wire main_sdram_bankmachine3_req_we; + wire [20:0] main_sdram_bankmachine3_req_addr; + wire main_sdram_bankmachine3_req_lock; + reg main_sdram_bankmachine3_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine3_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine3_refresh_req; + reg main_sdram_bankmachine3_refresh_gnt = 1'd0; + reg main_sdram_bankmachine3_cmd_valid = 1'd0; + reg main_sdram_bankmachine3_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine3_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine3_cmd_payload_ba; + reg main_sdram_bankmachine3_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine3_auto_precharge = 1'd0; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; + reg [3:0] main_sdram_bankmachine3_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine3_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine3_cmd_buffer_sink_valid; + wire main_sdram_bankmachine3_cmd_buffer_sink_ready; + wire main_sdram_bankmachine3_cmd_buffer_sink_first; + wire main_sdram_bankmachine3_cmd_buffer_sink_last; + wire main_sdram_bankmachine3_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine3_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine3_cmd_buffer_source_ready; + reg main_sdram_bankmachine3_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine3_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine3_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine3_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine3_row = 14'd0; + reg main_sdram_bankmachine3_row_opened = 1'd0; + wire main_sdram_bankmachine3_row_hit; + reg main_sdram_bankmachine3_row_open = 1'd0; + reg main_sdram_bankmachine3_row_close = 1'd0; + reg main_sdram_bankmachine3_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine3_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine3_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine3_twtpcon_count = 3'd0; + wire main_sdram_bankmachine3_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine3_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine3_trccon_count = 2'd0; + wire main_sdram_bankmachine3_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine3_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine3_trascon_count = 2'd0; + wire main_sdram_bankmachine4_req_valid; + wire main_sdram_bankmachine4_req_ready; + wire main_sdram_bankmachine4_req_we; + wire [20:0] main_sdram_bankmachine4_req_addr; + wire main_sdram_bankmachine4_req_lock; + reg main_sdram_bankmachine4_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine4_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine4_refresh_req; + reg main_sdram_bankmachine4_refresh_gnt = 1'd0; + reg main_sdram_bankmachine4_cmd_valid = 1'd0; + reg main_sdram_bankmachine4_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine4_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine4_cmd_payload_ba; + reg main_sdram_bankmachine4_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine4_auto_precharge = 1'd0; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; + reg [3:0] main_sdram_bankmachine4_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine4_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine4_cmd_buffer_sink_valid; + wire main_sdram_bankmachine4_cmd_buffer_sink_ready; + wire main_sdram_bankmachine4_cmd_buffer_sink_first; + wire main_sdram_bankmachine4_cmd_buffer_sink_last; + wire main_sdram_bankmachine4_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine4_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine4_cmd_buffer_source_ready; + reg main_sdram_bankmachine4_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine4_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine4_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine4_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine4_row = 14'd0; + reg main_sdram_bankmachine4_row_opened = 1'd0; + wire main_sdram_bankmachine4_row_hit; + reg main_sdram_bankmachine4_row_open = 1'd0; + reg main_sdram_bankmachine4_row_close = 1'd0; + reg main_sdram_bankmachine4_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine4_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine4_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine4_twtpcon_count = 3'd0; + wire main_sdram_bankmachine4_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine4_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine4_trccon_count = 2'd0; + wire main_sdram_bankmachine4_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine4_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine4_trascon_count = 2'd0; + wire main_sdram_bankmachine5_req_valid; + wire main_sdram_bankmachine5_req_ready; + wire main_sdram_bankmachine5_req_we; + wire [20:0] main_sdram_bankmachine5_req_addr; + wire main_sdram_bankmachine5_req_lock; + reg main_sdram_bankmachine5_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine5_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine5_refresh_req; + reg main_sdram_bankmachine5_refresh_gnt = 1'd0; + reg main_sdram_bankmachine5_cmd_valid = 1'd0; + reg main_sdram_bankmachine5_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine5_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine5_cmd_payload_ba; + reg main_sdram_bankmachine5_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine5_auto_precharge = 1'd0; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; + reg [3:0] main_sdram_bankmachine5_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine5_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine5_cmd_buffer_sink_valid; + wire main_sdram_bankmachine5_cmd_buffer_sink_ready; + wire main_sdram_bankmachine5_cmd_buffer_sink_first; + wire main_sdram_bankmachine5_cmd_buffer_sink_last; + wire main_sdram_bankmachine5_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine5_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine5_cmd_buffer_source_ready; + reg main_sdram_bankmachine5_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine5_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine5_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine5_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine5_row = 14'd0; + reg main_sdram_bankmachine5_row_opened = 1'd0; + wire main_sdram_bankmachine5_row_hit; + reg main_sdram_bankmachine5_row_open = 1'd0; + reg main_sdram_bankmachine5_row_close = 1'd0; + reg main_sdram_bankmachine5_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine5_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine5_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine5_twtpcon_count = 3'd0; + wire main_sdram_bankmachine5_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine5_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine5_trccon_count = 2'd0; + wire main_sdram_bankmachine5_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine5_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine5_trascon_count = 2'd0; + wire main_sdram_bankmachine6_req_valid; + wire main_sdram_bankmachine6_req_ready; + wire main_sdram_bankmachine6_req_we; + wire [20:0] main_sdram_bankmachine6_req_addr; + wire main_sdram_bankmachine6_req_lock; + reg main_sdram_bankmachine6_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine6_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine6_refresh_req; + reg main_sdram_bankmachine6_refresh_gnt = 1'd0; + reg main_sdram_bankmachine6_cmd_valid = 1'd0; + reg main_sdram_bankmachine6_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine6_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine6_cmd_payload_ba; + reg main_sdram_bankmachine6_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine6_auto_precharge = 1'd0; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; + reg [3:0] main_sdram_bankmachine6_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine6_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine6_cmd_buffer_sink_valid; + wire main_sdram_bankmachine6_cmd_buffer_sink_ready; + wire main_sdram_bankmachine6_cmd_buffer_sink_first; + wire main_sdram_bankmachine6_cmd_buffer_sink_last; + wire main_sdram_bankmachine6_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine6_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine6_cmd_buffer_source_ready; + reg main_sdram_bankmachine6_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine6_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine6_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine6_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine6_row = 14'd0; + reg main_sdram_bankmachine6_row_opened = 1'd0; + wire main_sdram_bankmachine6_row_hit; + reg main_sdram_bankmachine6_row_open = 1'd0; + reg main_sdram_bankmachine6_row_close = 1'd0; + reg main_sdram_bankmachine6_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine6_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine6_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine6_twtpcon_count = 3'd0; + wire main_sdram_bankmachine6_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine6_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine6_trccon_count = 2'd0; + wire main_sdram_bankmachine6_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine6_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine6_trascon_count = 2'd0; + wire main_sdram_bankmachine7_req_valid; + wire main_sdram_bankmachine7_req_ready; + wire main_sdram_bankmachine7_req_we; + wire [20:0] main_sdram_bankmachine7_req_addr; + wire main_sdram_bankmachine7_req_lock; + reg main_sdram_bankmachine7_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine7_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine7_refresh_req; + reg main_sdram_bankmachine7_refresh_gnt = 1'd0; + reg main_sdram_bankmachine7_cmd_valid = 1'd0; + reg main_sdram_bankmachine7_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine7_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine7_cmd_payload_ba; + reg main_sdram_bankmachine7_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine7_auto_precharge = 1'd0; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; + reg [3:0] main_sdram_bankmachine7_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine7_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine7_cmd_buffer_sink_valid; + wire main_sdram_bankmachine7_cmd_buffer_sink_ready; + wire main_sdram_bankmachine7_cmd_buffer_sink_first; + wire main_sdram_bankmachine7_cmd_buffer_sink_last; + wire main_sdram_bankmachine7_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine7_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine7_cmd_buffer_source_ready; + reg main_sdram_bankmachine7_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine7_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine7_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine7_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine7_row = 14'd0; + reg main_sdram_bankmachine7_row_opened = 1'd0; + wire main_sdram_bankmachine7_row_hit; + reg main_sdram_bankmachine7_row_open = 1'd0; + reg main_sdram_bankmachine7_row_close = 1'd0; + reg main_sdram_bankmachine7_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine7_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine7_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine7_twtpcon_count = 3'd0; + wire main_sdram_bankmachine7_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine7_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine7_trccon_count = 2'd0; + wire main_sdram_bankmachine7_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine7_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine7_trascon_count = 2'd0; + wire main_sdram_ras_allowed; + wire main_sdram_cas_allowed; + reg main_sdram_choose_cmd_want_reads = 1'd0; + reg main_sdram_choose_cmd_want_writes = 1'd0; + reg main_sdram_choose_cmd_want_cmds = 1'd0; + reg main_sdram_choose_cmd_want_activates = 1'd0; + wire main_sdram_choose_cmd_cmd_valid; + reg main_sdram_choose_cmd_cmd_ready = 1'd0; + wire [13:0] main_sdram_choose_cmd_cmd_payload_a; + wire [2:0] main_sdram_choose_cmd_cmd_payload_ba; + reg main_sdram_choose_cmd_cmd_payload_cas = 1'd0; + reg main_sdram_choose_cmd_cmd_payload_ras = 1'd0; + reg main_sdram_choose_cmd_cmd_payload_we = 1'd0; + wire main_sdram_choose_cmd_cmd_payload_is_cmd; + wire main_sdram_choose_cmd_cmd_payload_is_read; + wire main_sdram_choose_cmd_cmd_payload_is_write; + reg [7:0] main_sdram_choose_cmd_valids = 8'd0; + wire [7:0] main_sdram_choose_cmd_request; + reg [2:0] main_sdram_choose_cmd_grant = 3'd0; + wire main_sdram_choose_cmd_ce; + reg main_sdram_choose_req_want_reads = 1'd0; + reg main_sdram_choose_req_want_writes = 1'd0; + reg main_sdram_choose_req_want_cmds = 1'd0; + reg main_sdram_choose_req_want_activates = 1'd0; + wire main_sdram_choose_req_cmd_valid; + reg main_sdram_choose_req_cmd_ready = 1'd0; + wire [13:0] main_sdram_choose_req_cmd_payload_a; + wire [2:0] main_sdram_choose_req_cmd_payload_ba; + reg main_sdram_choose_req_cmd_payload_cas = 1'd0; + reg main_sdram_choose_req_cmd_payload_ras = 1'd0; + reg main_sdram_choose_req_cmd_payload_we = 1'd0; + wire main_sdram_choose_req_cmd_payload_is_cmd; + wire main_sdram_choose_req_cmd_payload_is_read; + wire main_sdram_choose_req_cmd_payload_is_write; + reg [7:0] main_sdram_choose_req_valids = 8'd0; + wire [7:0] main_sdram_choose_req_request; + reg [2:0] main_sdram_choose_req_grant = 3'd0; + wire main_sdram_choose_req_ce; + reg [13:0] main_sdram_nop_a = 14'd0; + reg [2:0] main_sdram_nop_ba = 3'd0; + reg [1:0] main_sdram_steerer_sel0 = 2'd0; + reg [1:0] main_sdram_steerer_sel1 = 2'd0; + reg [1:0] main_sdram_steerer_sel2 = 2'd0; + reg [1:0] main_sdram_steerer_sel3 = 2'd0; + reg main_sdram_steerer0 = 1'd1; + reg main_sdram_steerer1 = 1'd1; + reg main_sdram_steerer2 = 1'd1; + reg main_sdram_steerer3 = 1'd1; + reg main_sdram_steerer4 = 1'd1; + reg main_sdram_steerer5 = 1'd1; + reg main_sdram_steerer6 = 1'd1; + reg main_sdram_steerer7 = 1'd1; + wire main_sdram_trrdcon_valid; + (* dont_touch = "true" *) reg main_sdram_trrdcon_ready = 1'd1; + reg main_sdram_trrdcon_count = 1'd0; + wire main_sdram_tfawcon_valid; + (* dont_touch = "true" *) reg main_sdram_tfawcon_ready = 1'd1; + wire [1:0] main_sdram_tfawcon_count; + reg [3:0] main_sdram_tfawcon_window = 4'd0; + wire main_sdram_tccdcon_valid; + (* dont_touch = "true" *) reg main_sdram_tccdcon_ready = 1'd1; + reg main_sdram_tccdcon_count = 1'd0; + wire main_sdram_twtrcon_valid; + (* dont_touch = "true" *) reg main_sdram_twtrcon_ready = 1'd1; + reg [2:0] main_sdram_twtrcon_count = 3'd0; + wire main_sdram_read_available; + wire main_sdram_write_available; + reg main_sdram_en0 = 1'd0; + wire main_sdram_max_time0; + reg [4:0] main_sdram_time0 = 5'd0; + reg main_sdram_en1 = 1'd0; + wire main_sdram_max_time1; + reg [3:0] main_sdram_time1 = 4'd0; + wire main_sdram_go_to_refresh; + reg main_port_cmd_valid = 1'd0; + wire main_port_cmd_ready; + reg main_port_cmd_payload_we = 1'd0; + reg [23:0] main_port_cmd_payload_addr = 24'd0; + wire main_port_wdata_valid; + wire main_port_wdata_ready; + wire main_port_wdata_first; + wire main_port_wdata_last; + wire [127:0] main_port_wdata_payload_data; + wire [15:0] main_port_wdata_payload_we; + wire main_port_rdata_valid; + wire main_port_rdata_ready; + reg main_port_rdata_first = 1'd0; + reg main_port_rdata_last = 1'd0; + wire [127:0] main_port_rdata_payload_data; + wire [29:0] main_interface1_wb_sdram_adr; + wire [31:0] main_interface1_wb_sdram_dat_w; + wire [31:0] main_interface1_wb_sdram_dat_r; + wire [3:0] main_interface1_wb_sdram_sel; + wire main_interface1_wb_sdram_cyc; + wire main_interface1_wb_sdram_stb; + wire main_interface1_wb_sdram_ack; + wire main_interface1_wb_sdram_we; + wire [2:0] main_interface1_wb_sdram_cti; + wire [1:0] main_interface1_wb_sdram_bte; + wire main_interface1_wb_sdram_err; + wire [29:0] main_adr; + wire [127:0] main_dat_w; + wire [127:0] main_dat_r; + wire [15:0] main_sel; + reg main_cyc = 1'd0; + reg main_stb = 1'd0; + reg main_ack = 1'd0; + reg main_we = 1'd0; + wire [8:0] main_data_port_adr; + wire [127:0] main_data_port_dat_r; + reg [15:0] main_data_port_we = 16'd0; + reg [127:0] main_data_port_dat_w = 128'd0; + reg main_write_from_slave = 1'd0; + reg [1:0] main_adr_offset_r = 2'd0; + wire [8:0] main_tag_port_adr; + wire [23:0] main_tag_port_dat_r; + reg main_tag_port_we = 1'd0; + wire [23:0] main_tag_port_dat_w; + wire [22:0] main_tag_do_tag; + wire main_tag_do_dirty; + wire [22:0] main_tag_di_tag; + reg main_tag_di_dirty = 1'd0; + reg main_word_clr = 1'd0; + reg main_word_inc = 1'd0; + wire main_wdata_converter_sink_valid; + wire main_wdata_converter_sink_ready; + reg main_wdata_converter_sink_first = 1'd0; + reg main_wdata_converter_sink_last = 1'd0; + wire [127:0] main_wdata_converter_sink_payload_data; + wire [15:0] main_wdata_converter_sink_payload_we; + wire main_wdata_converter_source_valid; + wire main_wdata_converter_source_ready; + wire main_wdata_converter_source_first; + wire main_wdata_converter_source_last; + wire [127:0] main_wdata_converter_source_payload_data; + wire [15:0] main_wdata_converter_source_payload_we; + wire main_wdata_converter_converter_sink_valid; + wire main_wdata_converter_converter_sink_ready; + wire main_wdata_converter_converter_sink_first; + wire main_wdata_converter_converter_sink_last; + wire [143:0] main_wdata_converter_converter_sink_payload_data; + wire main_wdata_converter_converter_source_valid; + wire main_wdata_converter_converter_source_ready; + wire main_wdata_converter_converter_source_first; + wire main_wdata_converter_converter_source_last; + wire [143:0] main_wdata_converter_converter_source_payload_data; + wire main_wdata_converter_converter_source_payload_valid_token_count; + wire main_wdata_converter_source_source_valid; + wire main_wdata_converter_source_source_ready; + wire main_wdata_converter_source_source_first; + wire main_wdata_converter_source_source_last; + wire [143:0] main_wdata_converter_source_source_payload_data; + wire main_rdata_converter_sink_valid; + wire main_rdata_converter_sink_ready; + wire main_rdata_converter_sink_first; + wire main_rdata_converter_sink_last; + wire [127:0] main_rdata_converter_sink_payload_data; + wire main_rdata_converter_source_valid; + wire main_rdata_converter_source_ready; + wire main_rdata_converter_source_first; + wire main_rdata_converter_source_last; + wire [127:0] main_rdata_converter_source_payload_data; + wire main_rdata_converter_converter_sink_valid; + wire main_rdata_converter_converter_sink_ready; + wire main_rdata_converter_converter_sink_first; + wire main_rdata_converter_converter_sink_last; + wire [127:0] main_rdata_converter_converter_sink_payload_data; + wire main_rdata_converter_converter_source_valid; + wire main_rdata_converter_converter_source_ready; + wire main_rdata_converter_converter_source_first; + wire main_rdata_converter_converter_source_last; + wire [127:0] main_rdata_converter_converter_source_payload_data; + wire main_rdata_converter_converter_source_payload_valid_token_count; + wire main_rdata_converter_source_source_valid; + wire main_rdata_converter_source_source_ready; + wire main_rdata_converter_source_source_first; + wire main_rdata_converter_source_source_last; + wire [127:0] main_rdata_converter_source_source_payload_data; + reg main_count = 1'd0; + reg builder_wb2csr_state = 1'd0; + reg builder_wb2csr_next_state = 1'd0; + wire builder_pll_fb; + reg [1:0] builder_refresher_state = 2'd0; + reg [1:0] builder_refresher_next_state = 2'd0; + reg [2:0] builder_bankmachine0_state = 3'd0; + reg [2:0] builder_bankmachine0_next_state = 3'd0; + reg [2:0] builder_bankmachine1_state = 3'd0; + reg [2:0] builder_bankmachine1_next_state = 3'd0; + reg [2:0] builder_bankmachine2_state = 3'd0; + reg [2:0] builder_bankmachine2_next_state = 3'd0; + reg [2:0] builder_bankmachine3_state = 3'd0; + reg [2:0] builder_bankmachine3_next_state = 3'd0; + reg [2:0] builder_bankmachine4_state = 3'd0; + reg [2:0] builder_bankmachine4_next_state = 3'd0; + reg [2:0] builder_bankmachine5_state = 3'd0; + reg [2:0] builder_bankmachine5_next_state = 3'd0; + reg [2:0] builder_bankmachine6_state = 3'd0; + reg [2:0] builder_bankmachine6_next_state = 3'd0; + reg [2:0] builder_bankmachine7_state = 3'd0; + reg [2:0] builder_bankmachine7_next_state = 3'd0; + reg [3:0] builder_multiplexer_state = 4'd0; + reg [3:0] builder_multiplexer_next_state = 4'd0; + wire builder_roundrobin0_request; + wire builder_roundrobin0_grant; + wire builder_roundrobin0_ce; + wire builder_roundrobin1_request; + wire builder_roundrobin1_grant; + wire builder_roundrobin1_ce; + wire builder_roundrobin2_request; + wire builder_roundrobin2_grant; + wire builder_roundrobin2_ce; + wire builder_roundrobin3_request; + wire builder_roundrobin3_grant; + wire builder_roundrobin3_ce; + wire builder_roundrobin4_request; + wire builder_roundrobin4_grant; + wire builder_roundrobin4_ce; + wire builder_roundrobin5_request; + wire builder_roundrobin5_grant; + wire builder_roundrobin5_ce; + wire builder_roundrobin6_request; + wire builder_roundrobin6_grant; + wire builder_roundrobin6_ce; + wire builder_roundrobin7_request; + wire builder_roundrobin7_grant; + wire builder_roundrobin7_ce; + reg [2:0] builder_rbank = 3'd0; + reg [2:0] builder_wbank = 3'd0; + reg builder_locked0 = 1'd0; + reg builder_locked1 = 1'd0; + reg builder_locked2 = 1'd0; + reg builder_locked3 = 1'd0; + reg builder_locked4 = 1'd0; + reg builder_locked5 = 1'd0; + reg builder_locked6 = 1'd0; + reg builder_locked7 = 1'd0; + reg builder_new_master_wdata_ready0 = 1'd0; + reg builder_new_master_wdata_ready1 = 1'd0; + reg builder_new_master_wdata_ready2 = 1'd0; + reg builder_new_master_rdata_valid0 = 1'd0; + reg builder_new_master_rdata_valid1 = 1'd0; + reg builder_new_master_rdata_valid2 = 1'd0; + reg builder_new_master_rdata_valid3 = 1'd0; + reg builder_new_master_rdata_valid4 = 1'd0; + reg builder_new_master_rdata_valid5 = 1'd0; + reg builder_new_master_rdata_valid6 = 1'd0; + reg builder_new_master_rdata_valid7 = 1'd0; + reg builder_new_master_rdata_valid8 = 1'd0; + reg builder_new_master_rdata_valid9 = 1'd0; + reg [1:0] builder_fullmemorywe_state = 2'd0; + reg [1:0] builder_fullmemorywe_next_state = 2'd0; + reg [1:0] builder_litedramwishbone2native_state = 2'd0; + reg [1:0] builder_litedramwishbone2native_next_state = 2'd0; + reg main_count_next_value = 1'd0; + reg main_count_next_value_ce = 1'd0; + wire builder_wb_sdram_con_request; + wire builder_wb_sdram_con_grant; + wire [29:0] builder_minsoc_shared_adr; + wire [31:0] builder_minsoc_shared_dat_w; + reg [31:0] builder_minsoc_shared_dat_r = 32'd0; + wire [3:0] builder_minsoc_shared_sel; + wire builder_minsoc_shared_cyc; + wire builder_minsoc_shared_stb; + reg builder_minsoc_shared_ack = 1'd0; + wire builder_minsoc_shared_we; + wire [2:0] builder_minsoc_shared_cti; + wire [1:0] builder_minsoc_shared_bte; + wire builder_minsoc_shared_err; + wire [1:0] builder_minsoc_request; + reg builder_minsoc_grant = 1'd0; + reg [3:0] builder_minsoc_slave_sel = 4'd0; + reg [3:0] builder_minsoc_slave_sel_r = 4'd0; + reg builder_minsoc_error = 1'd0; + wire builder_minsoc_wait; + wire builder_minsoc_done; + reg [19:0] builder_minsoc_count = 20'd1000000; + wire [13:0] builder_minsoc_interface0_bank_bus_adr; + wire builder_minsoc_interface0_bank_bus_we; + wire [7:0] builder_minsoc_interface0_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface0_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank0_reset0_re; + wire builder_minsoc_csrbank0_reset0_r; + wire builder_minsoc_csrbank0_reset0_we; + wire builder_minsoc_csrbank0_reset0_w; + wire builder_minsoc_csrbank0_scratch3_re; + wire [7:0] builder_minsoc_csrbank0_scratch3_r; + wire builder_minsoc_csrbank0_scratch3_we; + wire [7:0] builder_minsoc_csrbank0_scratch3_w; + wire builder_minsoc_csrbank0_scratch2_re; + wire [7:0] builder_minsoc_csrbank0_scratch2_r; + wire builder_minsoc_csrbank0_scratch2_we; + wire [7:0] builder_minsoc_csrbank0_scratch2_w; + wire builder_minsoc_csrbank0_scratch1_re; + wire [7:0] builder_minsoc_csrbank0_scratch1_r; + wire builder_minsoc_csrbank0_scratch1_we; + wire [7:0] builder_minsoc_csrbank0_scratch1_w; + wire builder_minsoc_csrbank0_scratch0_re; + wire [7:0] builder_minsoc_csrbank0_scratch0_r; + wire builder_minsoc_csrbank0_scratch0_we; + wire [7:0] builder_minsoc_csrbank0_scratch0_w; + wire builder_minsoc_csrbank0_bus_errors3_re; + wire [7:0] builder_minsoc_csrbank0_bus_errors3_r; + wire builder_minsoc_csrbank0_bus_errors3_we; + wire [7:0] builder_minsoc_csrbank0_bus_errors3_w; + wire builder_minsoc_csrbank0_bus_errors2_re; + wire [7:0] builder_minsoc_csrbank0_bus_errors2_r; + wire builder_minsoc_csrbank0_bus_errors2_we; + wire [7:0] builder_minsoc_csrbank0_bus_errors2_w; + wire builder_minsoc_csrbank0_bus_errors1_re; + wire [7:0] builder_minsoc_csrbank0_bus_errors1_r; + wire builder_minsoc_csrbank0_bus_errors1_we; + wire [7:0] builder_minsoc_csrbank0_bus_errors1_w; + wire builder_minsoc_csrbank0_bus_errors0_re; + wire [7:0] builder_minsoc_csrbank0_bus_errors0_r; + wire builder_minsoc_csrbank0_bus_errors0_we; + wire [7:0] builder_minsoc_csrbank0_bus_errors0_w; + wire builder_minsoc_csrbank0_sel; + wire [13:0] builder_minsoc_interface1_bank_bus_adr; + wire builder_minsoc_interface1_bank_bus_we; + wire [7:0] builder_minsoc_interface1_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface1_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank1_half_sys8x_taps0_re; + wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_r; + wire builder_minsoc_csrbank1_half_sys8x_taps0_we; + wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_w; + wire builder_minsoc_csrbank1_dly_sel0_re; + wire [1:0] builder_minsoc_csrbank1_dly_sel0_r; + wire builder_minsoc_csrbank1_dly_sel0_we; + wire [1:0] builder_minsoc_csrbank1_dly_sel0_w; + wire builder_minsoc_csrbank1_sel; + wire [13:0] builder_minsoc_interface2_bank_bus_adr; + wire builder_minsoc_interface2_bank_bus_we; + wire [7:0] builder_minsoc_interface2_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface2_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank2_dfii_control0_re; + wire [3:0] builder_minsoc_csrbank2_dfii_control0_r; + wire builder_minsoc_csrbank2_dfii_control0_we; + wire [3:0] builder_minsoc_csrbank2_dfii_control0_w; + wire builder_minsoc_csrbank2_dfii_pi0_command0_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_r; + wire builder_minsoc_csrbank2_dfii_pi0_command0_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_w; + wire builder_minsoc_csrbank2_dfii_pi0_address1_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_r; + wire builder_minsoc_csrbank2_dfii_pi0_address1_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_w; + wire builder_minsoc_csrbank2_dfii_pi0_address0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_r; + wire builder_minsoc_csrbank2_dfii_pi0_address0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_w; + wire builder_minsoc_csrbank2_dfii_pi0_baddress0_re; + wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_r; + wire builder_minsoc_csrbank2_dfii_pi0_baddress0_we; + wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_w; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; + wire builder_minsoc_csrbank2_dfii_pi0_rddata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_r; + wire builder_minsoc_csrbank2_dfii_pi0_rddata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_w; + wire builder_minsoc_csrbank2_dfii_pi0_rddata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_r; + wire builder_minsoc_csrbank2_dfii_pi0_rddata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_w; + wire builder_minsoc_csrbank2_dfii_pi0_rddata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_r; + wire builder_minsoc_csrbank2_dfii_pi0_rddata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_w; + wire builder_minsoc_csrbank2_dfii_pi0_rddata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_r; + wire builder_minsoc_csrbank2_dfii_pi0_rddata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_w; + wire builder_minsoc_csrbank2_dfii_pi1_command0_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_r; + wire builder_minsoc_csrbank2_dfii_pi1_command0_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_w; + wire builder_minsoc_csrbank2_dfii_pi1_address1_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_r; + wire builder_minsoc_csrbank2_dfii_pi1_address1_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_w; + wire builder_minsoc_csrbank2_dfii_pi1_address0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_r; + wire builder_minsoc_csrbank2_dfii_pi1_address0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_w; + wire builder_minsoc_csrbank2_dfii_pi1_baddress0_re; + wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_r; + wire builder_minsoc_csrbank2_dfii_pi1_baddress0_we; + wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_w; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; + wire builder_minsoc_csrbank2_dfii_pi1_rddata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_r; + wire builder_minsoc_csrbank2_dfii_pi1_rddata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_w; + wire builder_minsoc_csrbank2_dfii_pi1_rddata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_r; + wire builder_minsoc_csrbank2_dfii_pi1_rddata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_w; + wire builder_minsoc_csrbank2_dfii_pi1_rddata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_r; + wire builder_minsoc_csrbank2_dfii_pi1_rddata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_w; + wire builder_minsoc_csrbank2_dfii_pi1_rddata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_r; + wire builder_minsoc_csrbank2_dfii_pi1_rddata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_w; + wire builder_minsoc_csrbank2_dfii_pi2_command0_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_r; + wire builder_minsoc_csrbank2_dfii_pi2_command0_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_w; + wire builder_minsoc_csrbank2_dfii_pi2_address1_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_r; + wire builder_minsoc_csrbank2_dfii_pi2_address1_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_w; + wire builder_minsoc_csrbank2_dfii_pi2_address0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_r; + wire builder_minsoc_csrbank2_dfii_pi2_address0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_w; + wire builder_minsoc_csrbank2_dfii_pi2_baddress0_re; + wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_r; + wire builder_minsoc_csrbank2_dfii_pi2_baddress0_we; + wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_w; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; + wire builder_minsoc_csrbank2_dfii_pi2_rddata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_r; + wire builder_minsoc_csrbank2_dfii_pi2_rddata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_w; + wire builder_minsoc_csrbank2_dfii_pi2_rddata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_r; + wire builder_minsoc_csrbank2_dfii_pi2_rddata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_w; + wire builder_minsoc_csrbank2_dfii_pi2_rddata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_r; + wire builder_minsoc_csrbank2_dfii_pi2_rddata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_w; + wire builder_minsoc_csrbank2_dfii_pi2_rddata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_r; + wire builder_minsoc_csrbank2_dfii_pi2_rddata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_w; + wire builder_minsoc_csrbank2_dfii_pi3_command0_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_r; + wire builder_minsoc_csrbank2_dfii_pi3_command0_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_w; + wire builder_minsoc_csrbank2_dfii_pi3_address1_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_r; + wire builder_minsoc_csrbank2_dfii_pi3_address1_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_w; + wire builder_minsoc_csrbank2_dfii_pi3_address0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_r; + wire builder_minsoc_csrbank2_dfii_pi3_address0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_w; + wire builder_minsoc_csrbank2_dfii_pi3_baddress0_re; + wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_r; + wire builder_minsoc_csrbank2_dfii_pi3_baddress0_we; + wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_w; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; + wire builder_minsoc_csrbank2_dfii_pi3_rddata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_r; + wire builder_minsoc_csrbank2_dfii_pi3_rddata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_w; + wire builder_minsoc_csrbank2_dfii_pi3_rddata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_r; + wire builder_minsoc_csrbank2_dfii_pi3_rddata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_w; + wire builder_minsoc_csrbank2_dfii_pi3_rddata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_r; + wire builder_minsoc_csrbank2_dfii_pi3_rddata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_w; + wire builder_minsoc_csrbank2_dfii_pi3_rddata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_r; + wire builder_minsoc_csrbank2_dfii_pi3_rddata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_w; + wire builder_minsoc_csrbank2_sel; + wire [13:0] builder_minsoc_interface3_bank_bus_adr; + wire builder_minsoc_interface3_bank_bus_we; + wire [7:0] builder_minsoc_interface3_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface3_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank3_load3_re; + wire [7:0] builder_minsoc_csrbank3_load3_r; + wire builder_minsoc_csrbank3_load3_we; + wire [7:0] builder_minsoc_csrbank3_load3_w; + wire builder_minsoc_csrbank3_load2_re; + wire [7:0] builder_minsoc_csrbank3_load2_r; + wire builder_minsoc_csrbank3_load2_we; + wire [7:0] builder_minsoc_csrbank3_load2_w; + wire builder_minsoc_csrbank3_load1_re; + wire [7:0] builder_minsoc_csrbank3_load1_r; + wire builder_minsoc_csrbank3_load1_we; + wire [7:0] builder_minsoc_csrbank3_load1_w; + wire builder_minsoc_csrbank3_load0_re; + wire [7:0] builder_minsoc_csrbank3_load0_r; + wire builder_minsoc_csrbank3_load0_we; + wire [7:0] builder_minsoc_csrbank3_load0_w; + wire builder_minsoc_csrbank3_reload3_re; + wire [7:0] builder_minsoc_csrbank3_reload3_r; + wire builder_minsoc_csrbank3_reload3_we; + wire [7:0] builder_minsoc_csrbank3_reload3_w; + wire builder_minsoc_csrbank3_reload2_re; + wire [7:0] builder_minsoc_csrbank3_reload2_r; + wire builder_minsoc_csrbank3_reload2_we; + wire [7:0] builder_minsoc_csrbank3_reload2_w; + wire builder_minsoc_csrbank3_reload1_re; + wire [7:0] builder_minsoc_csrbank3_reload1_r; + wire builder_minsoc_csrbank3_reload1_we; + wire [7:0] builder_minsoc_csrbank3_reload1_w; + wire builder_minsoc_csrbank3_reload0_re; + wire [7:0] builder_minsoc_csrbank3_reload0_r; + wire builder_minsoc_csrbank3_reload0_we; + wire [7:0] builder_minsoc_csrbank3_reload0_w; + wire builder_minsoc_csrbank3_en0_re; + wire builder_minsoc_csrbank3_en0_r; + wire builder_minsoc_csrbank3_en0_we; + wire builder_minsoc_csrbank3_en0_w; + wire builder_minsoc_csrbank3_update_value0_re; + wire builder_minsoc_csrbank3_update_value0_r; + wire builder_minsoc_csrbank3_update_value0_we; + wire builder_minsoc_csrbank3_update_value0_w; + wire builder_minsoc_csrbank3_value3_re; + wire [7:0] builder_minsoc_csrbank3_value3_r; + wire builder_minsoc_csrbank3_value3_we; + wire [7:0] builder_minsoc_csrbank3_value3_w; + wire builder_minsoc_csrbank3_value2_re; + wire [7:0] builder_minsoc_csrbank3_value2_r; + wire builder_minsoc_csrbank3_value2_we; + wire [7:0] builder_minsoc_csrbank3_value2_w; + wire builder_minsoc_csrbank3_value1_re; + wire [7:0] builder_minsoc_csrbank3_value1_r; + wire builder_minsoc_csrbank3_value1_we; + wire [7:0] builder_minsoc_csrbank3_value1_w; + wire builder_minsoc_csrbank3_value0_re; + wire [7:0] builder_minsoc_csrbank3_value0_r; + wire builder_minsoc_csrbank3_value0_we; + wire [7:0] builder_minsoc_csrbank3_value0_w; + wire builder_minsoc_csrbank3_ev_enable0_re; + wire builder_minsoc_csrbank3_ev_enable0_r; + wire builder_minsoc_csrbank3_ev_enable0_we; + wire builder_minsoc_csrbank3_ev_enable0_w; + wire builder_minsoc_csrbank3_sel; + wire [13:0] builder_minsoc_interface4_bank_bus_adr; + wire builder_minsoc_interface4_bank_bus_we; + wire [7:0] builder_minsoc_interface4_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface4_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank4_txfull_re; + wire builder_minsoc_csrbank4_txfull_r; + wire builder_minsoc_csrbank4_txfull_we; + wire builder_minsoc_csrbank4_txfull_w; + wire builder_minsoc_csrbank4_rxempty_re; + wire builder_minsoc_csrbank4_rxempty_r; + wire builder_minsoc_csrbank4_rxempty_we; + wire builder_minsoc_csrbank4_rxempty_w; + wire builder_minsoc_csrbank4_ev_enable0_re; + wire [1:0] builder_minsoc_csrbank4_ev_enable0_r; + wire builder_minsoc_csrbank4_ev_enable0_we; + wire [1:0] builder_minsoc_csrbank4_ev_enable0_w; + wire builder_minsoc_csrbank4_sel; + wire [13:0] builder_minsoc_interface5_bank_bus_adr; + wire builder_minsoc_interface5_bank_bus_we; + wire [7:0] builder_minsoc_interface5_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface5_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank5_tuning_word3_re; + wire [7:0] builder_minsoc_csrbank5_tuning_word3_r; + wire builder_minsoc_csrbank5_tuning_word3_we; + wire [7:0] builder_minsoc_csrbank5_tuning_word3_w; + wire builder_minsoc_csrbank5_tuning_word2_re; + wire [7:0] builder_minsoc_csrbank5_tuning_word2_r; + wire builder_minsoc_csrbank5_tuning_word2_we; + wire [7:0] builder_minsoc_csrbank5_tuning_word2_w; + wire builder_minsoc_csrbank5_tuning_word1_re; + wire [7:0] builder_minsoc_csrbank5_tuning_word1_r; + wire builder_minsoc_csrbank5_tuning_word1_we; + wire [7:0] builder_minsoc_csrbank5_tuning_word1_w; + wire builder_minsoc_csrbank5_tuning_word0_re; + wire [7:0] builder_minsoc_csrbank5_tuning_word0_r; + wire builder_minsoc_csrbank5_tuning_word0_we; + wire [7:0] builder_minsoc_csrbank5_tuning_word0_w; + wire builder_minsoc_csrbank5_sel; + wire [13:0] builder_minsoc_adr; + wire builder_minsoc_we; + wire [7:0] builder_minsoc_dat_w; + wire [7:0] builder_minsoc_dat_r; + reg builder_rhs_array_muxed0 = 1'd0; + reg [13:0] builder_rhs_array_muxed1 = 14'd0; + reg [2:0] builder_rhs_array_muxed2 = 3'd0; + reg builder_rhs_array_muxed3 = 1'd0; + reg builder_rhs_array_muxed4 = 1'd0; + reg builder_rhs_array_muxed5 = 1'd0; + reg builder_t_array_muxed0 = 1'd0; + reg builder_t_array_muxed1 = 1'd0; + reg builder_t_array_muxed2 = 1'd0; + reg builder_rhs_array_muxed6 = 1'd0; + reg [13:0] builder_rhs_array_muxed7 = 14'd0; + reg [2:0] builder_rhs_array_muxed8 = 3'd0; + reg builder_rhs_array_muxed9 = 1'd0; + reg builder_rhs_array_muxed10 = 1'd0; + reg builder_rhs_array_muxed11 = 1'd0; + reg builder_t_array_muxed3 = 1'd0; + reg builder_t_array_muxed4 = 1'd0; + reg builder_t_array_muxed5 = 1'd0; + reg [20:0] builder_rhs_array_muxed12 = 21'd0; + reg builder_rhs_array_muxed13 = 1'd0; + reg builder_rhs_array_muxed14 = 1'd0; + reg [20:0] builder_rhs_array_muxed15 = 21'd0; + reg builder_rhs_array_muxed16 = 1'd0; + reg builder_rhs_array_muxed17 = 1'd0; + reg [20:0] builder_rhs_array_muxed18 = 21'd0; + reg builder_rhs_array_muxed19 = 1'd0; + reg builder_rhs_array_muxed20 = 1'd0; + reg [20:0] builder_rhs_array_muxed21 = 21'd0; + reg builder_rhs_array_muxed22 = 1'd0; + reg builder_rhs_array_muxed23 = 1'd0; + reg [20:0] builder_rhs_array_muxed24 = 21'd0; + reg builder_rhs_array_muxed25 = 1'd0; + reg builder_rhs_array_muxed26 = 1'd0; + reg [20:0] builder_rhs_array_muxed27 = 21'd0; + reg builder_rhs_array_muxed28 = 1'd0; + reg builder_rhs_array_muxed29 = 1'd0; + reg [20:0] builder_rhs_array_muxed30 = 21'd0; + reg builder_rhs_array_muxed31 = 1'd0; + reg builder_rhs_array_muxed32 = 1'd0; + reg [20:0] builder_rhs_array_muxed33 = 21'd0; + reg builder_rhs_array_muxed34 = 1'd0; + reg builder_rhs_array_muxed35 = 1'd0; + reg [29:0] builder_rhs_array_muxed36 = 30'd0; + reg [31:0] builder_rhs_array_muxed37 = 32'd0; + reg [3:0] builder_rhs_array_muxed38 = 4'd0; + reg builder_rhs_array_muxed39 = 1'd0; + reg builder_rhs_array_muxed40 = 1'd0; + reg builder_rhs_array_muxed41 = 1'd0; + reg [2:0] builder_rhs_array_muxed42 = 3'd0; + reg [1:0] builder_rhs_array_muxed43 = 2'd0; + reg [29:0] builder_rhs_array_muxed44 = 30'd0; + reg [31:0] builder_rhs_array_muxed45 = 32'd0; + reg [3:0] builder_rhs_array_muxed46 = 4'd0; + reg builder_rhs_array_muxed47 = 1'd0; + reg builder_rhs_array_muxed48 = 1'd0; + reg builder_rhs_array_muxed49 = 1'd0; + reg [2:0] builder_rhs_array_muxed50 = 3'd0; + reg [1:0] builder_rhs_array_muxed51 = 2'd0; + reg [2:0] builder_array_muxed0 = 3'd0; + reg [13:0] builder_array_muxed1 = 14'd0; + reg builder_array_muxed2 = 1'd0; + reg builder_array_muxed3 = 1'd0; + reg builder_array_muxed4 = 1'd0; + reg builder_array_muxed5 = 1'd0; + reg builder_array_muxed6 = 1'd0; + reg [2:0] builder_array_muxed7 = 3'd0; + reg [13:0] builder_array_muxed8 = 14'd0; + reg builder_array_muxed9 = 1'd0; + reg builder_array_muxed10 = 1'd0; + reg builder_array_muxed11 = 1'd0; + reg builder_array_muxed12 = 1'd0; + reg builder_array_muxed13 = 1'd0; + reg [2:0] builder_array_muxed14 = 3'd0; + reg [13:0] builder_array_muxed15 = 14'd0; + reg builder_array_muxed16 = 1'd0; + reg builder_array_muxed17 = 1'd0; + reg builder_array_muxed18 = 1'd0; + reg builder_array_muxed19 = 1'd0; + reg builder_array_muxed20 = 1'd0; + reg [2:0] builder_array_muxed21 = 3'd0; + reg [13:0] builder_array_muxed22 = 14'd0; + reg builder_array_muxed23 = 1'd0; + reg builder_array_muxed24 = 1'd0; + reg builder_array_muxed25 = 1'd0; + reg builder_array_muxed26 = 1'd0; + reg builder_array_muxed27 = 1'd0; + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg builder_regs0 = 1'd0; + (* async_reg = "true", dont_touch = "true" *) reg builder_regs1 = 1'd0; + wire builder_xilinxasyncresetsynchronizerimpl0; + wire builder_xilinxasyncresetsynchronizerimpl0_rst_meta; + wire builder_xilinxasyncresetsynchronizerimpl1; + wire builder_xilinxasyncresetsynchronizerimpl1_rst_meta; + wire builder_xilinxasyncresetsynchronizerimpl1_expr; + wire builder_xilinxasyncresetsynchronizerimpl2; + wire builder_xilinxasyncresetsynchronizerimpl2_rst_meta; + wire builder_xilinxasyncresetsynchronizerimpl2_expr; + wire builder_xilinxasyncresetsynchronizerimpl3; + wire builder_xilinxasyncresetsynchronizerimpl3_rst_meta; + + assign main_minsoc_cpu_reset = main_minsoc_ctrl_reset; + assign main_minsoc_ctrl_bus_error = builder_minsoc_error; + always @(*) begin + main_minsoc_cpu_interrupt <= 32'd0; + main_minsoc_cpu_interrupt[1] <= main_minsoc_timer0_irq; + main_minsoc_cpu_interrupt[0] <= main_minsoc_uart_irq; + end + assign main_minsoc_ctrl_reset = main_minsoc_ctrl_reset_re; + assign main_minsoc_ctrl_bus_errors_status = main_minsoc_ctrl_bus_errors; + assign main_minsoc_interface0_soc_bus_adr = main_minsoc_cpu_ibus_adr; + assign main_minsoc_interface0_soc_bus_dat_w = main_minsoc_cpu_ibus_dat_w; + assign main_minsoc_cpu_ibus_dat_r = main_minsoc_interface0_soc_bus_dat_r; + assign main_minsoc_interface0_soc_bus_sel = main_minsoc_cpu_ibus_sel; + assign main_minsoc_interface0_soc_bus_cyc = main_minsoc_cpu_ibus_cyc; + assign main_minsoc_interface0_soc_bus_stb = main_minsoc_cpu_ibus_stb; + assign main_minsoc_cpu_ibus_ack = main_minsoc_interface0_soc_bus_ack; + assign main_minsoc_interface0_soc_bus_we = main_minsoc_cpu_ibus_we; + assign main_minsoc_interface0_soc_bus_cti = main_minsoc_cpu_ibus_cti; + assign main_minsoc_interface0_soc_bus_bte = main_minsoc_cpu_ibus_bte; + assign main_minsoc_cpu_ibus_err = main_minsoc_interface0_soc_bus_err; + assign main_minsoc_interface1_soc_bus_adr = main_minsoc_cpu_dbus_adr; + assign main_minsoc_interface1_soc_bus_dat_w = main_minsoc_cpu_dbus_dat_w; + assign main_minsoc_cpu_dbus_dat_r = main_minsoc_interface1_soc_bus_dat_r; + assign main_minsoc_interface1_soc_bus_sel = main_minsoc_cpu_dbus_sel; + assign main_minsoc_interface1_soc_bus_cyc = main_minsoc_cpu_dbus_cyc; + assign main_minsoc_interface1_soc_bus_stb = main_minsoc_cpu_dbus_stb; + assign main_minsoc_cpu_dbus_ack = main_minsoc_interface1_soc_bus_ack; + assign main_minsoc_interface1_soc_bus_we = main_minsoc_cpu_dbus_we; + assign main_minsoc_interface1_soc_bus_cti = main_minsoc_cpu_dbus_cti; + assign main_minsoc_interface1_soc_bus_bte = main_minsoc_cpu_dbus_bte; + assign main_minsoc_cpu_dbus_err = main_minsoc_interface1_soc_bus_err; + assign main_minsoc_rom_adr = main_minsoc_rom_bus_adr[12:0]; + assign main_minsoc_rom_bus_dat_r = main_minsoc_rom_dat_r; + always @(*) begin + main_minsoc_sram_we <= 4'd0; + main_minsoc_sram_we[0] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[0]); + main_minsoc_sram_we[1] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[1]); + main_minsoc_sram_we[2] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[2]); + main_minsoc_sram_we[3] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[3]); + end + assign main_minsoc_sram_adr = main_minsoc_sram_bus_adr[9:0]; + assign main_minsoc_sram_bus_dat_r = main_minsoc_sram_dat_r; + assign main_minsoc_sram_dat_w = main_minsoc_sram_bus_dat_w; + assign main_minsoc_uart_uart_sink_valid = main_minsoc_source_valid; + assign main_minsoc_source_ready = main_minsoc_uart_uart_sink_ready; + assign main_minsoc_uart_uart_sink_first = main_minsoc_source_first; + assign main_minsoc_uart_uart_sink_last = main_minsoc_source_last; + assign main_minsoc_uart_uart_sink_payload_data = main_minsoc_source_payload_data; + assign main_minsoc_sink_valid = main_minsoc_uart_uart_source_valid; + assign main_minsoc_uart_uart_source_ready = main_minsoc_sink_ready; + assign main_minsoc_sink_first = main_minsoc_uart_uart_source_first; + assign main_minsoc_sink_last = main_minsoc_uart_uart_source_last; + assign main_minsoc_sink_payload_data = main_minsoc_uart_uart_source_payload_data; + assign main_minsoc_uart_tx_fifo_sink_valid = main_minsoc_uart_rxtx_re; + assign main_minsoc_uart_tx_fifo_sink_payload_data = main_minsoc_uart_rxtx_r; + assign main_minsoc_uart_txfull_status = (~main_minsoc_uart_tx_fifo_sink_ready); + assign main_minsoc_uart_uart_source_valid = main_minsoc_uart_tx_fifo_source_valid; + assign main_minsoc_uart_tx_fifo_source_ready = main_minsoc_uart_uart_source_ready; + assign main_minsoc_uart_uart_source_first = main_minsoc_uart_tx_fifo_source_first; + assign main_minsoc_uart_uart_source_last = main_minsoc_uart_tx_fifo_source_last; + assign main_minsoc_uart_uart_source_payload_data = main_minsoc_uart_tx_fifo_source_payload_data; + assign main_minsoc_uart_tx_trigger = (~main_minsoc_uart_tx_fifo_sink_ready); + assign main_minsoc_uart_rx_fifo_sink_valid = main_minsoc_uart_uart_sink_valid; + assign main_minsoc_uart_uart_sink_ready = main_minsoc_uart_rx_fifo_sink_ready; + assign main_minsoc_uart_rx_fifo_sink_first = main_minsoc_uart_uart_sink_first; + assign main_minsoc_uart_rx_fifo_sink_last = main_minsoc_uart_uart_sink_last; + assign main_minsoc_uart_rx_fifo_sink_payload_data = main_minsoc_uart_uart_sink_payload_data; + assign main_minsoc_uart_rxempty_status = (~main_minsoc_uart_rx_fifo_source_valid); + assign main_minsoc_uart_rxtx_w = main_minsoc_uart_rx_fifo_source_payload_data; + assign main_minsoc_uart_rx_fifo_source_ready = (main_minsoc_uart_rx_clear | (1'd0 & main_minsoc_uart_rxtx_we)); + assign main_minsoc_uart_rx_trigger = (~main_minsoc_uart_rx_fifo_source_valid); + always @(*) begin + main_minsoc_uart_tx_clear <= 1'd0; + if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[0])) begin + main_minsoc_uart_tx_clear <= 1'd1; + end + end + always @(*) begin + main_minsoc_uart_eventmanager_status_w <= 2'd0; + main_minsoc_uart_eventmanager_status_w[0] <= main_minsoc_uart_tx_status; + main_minsoc_uart_eventmanager_status_w[1] <= main_minsoc_uart_rx_status; + end + always @(*) begin + main_minsoc_uart_rx_clear <= 1'd0; + if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[1])) begin + main_minsoc_uart_rx_clear <= 1'd1; + end + end + always @(*) begin + main_minsoc_uart_eventmanager_pending_w <= 2'd0; + main_minsoc_uart_eventmanager_pending_w[0] <= main_minsoc_uart_tx_pending; + main_minsoc_uart_eventmanager_pending_w[1] <= main_minsoc_uart_rx_pending; + end + assign main_minsoc_uart_irq = ((main_minsoc_uart_eventmanager_pending_w[0] & main_minsoc_uart_eventmanager_storage[0]) | (main_minsoc_uart_eventmanager_pending_w[1] & main_minsoc_uart_eventmanager_storage[1])); + assign main_minsoc_uart_tx_status = main_minsoc_uart_tx_trigger; + assign main_minsoc_uart_rx_status = main_minsoc_uart_rx_trigger; + assign main_minsoc_uart_tx_fifo_syncfifo_din = { + main_minsoc_uart_tx_fifo_fifo_in_last, + main_minsoc_uart_tx_fifo_fifo_in_first, + main_minsoc_uart_tx_fifo_fifo_in_payload_data + }; + assign {main_minsoc_uart_tx_fifo_fifo_out_last, main_minsoc_uart_tx_fifo_fifo_out_first, main_minsoc_uart_tx_fifo_fifo_out_payload_data} = main_minsoc_uart_tx_fifo_syncfifo_dout; + assign main_minsoc_uart_tx_fifo_sink_ready = main_minsoc_uart_tx_fifo_syncfifo_writable; + assign main_minsoc_uart_tx_fifo_syncfifo_we = main_minsoc_uart_tx_fifo_sink_valid; + assign main_minsoc_uart_tx_fifo_fifo_in_first = main_minsoc_uart_tx_fifo_sink_first; + assign main_minsoc_uart_tx_fifo_fifo_in_last = main_minsoc_uart_tx_fifo_sink_last; + assign main_minsoc_uart_tx_fifo_fifo_in_payload_data = main_minsoc_uart_tx_fifo_sink_payload_data; + assign main_minsoc_uart_tx_fifo_source_valid = main_minsoc_uart_tx_fifo_readable; + assign main_minsoc_uart_tx_fifo_source_first = main_minsoc_uart_tx_fifo_fifo_out_first; + assign main_minsoc_uart_tx_fifo_source_last = main_minsoc_uart_tx_fifo_fifo_out_last; + assign main_minsoc_uart_tx_fifo_source_payload_data = main_minsoc_uart_tx_fifo_fifo_out_payload_data; + assign main_minsoc_uart_tx_fifo_re = main_minsoc_uart_tx_fifo_source_ready; + assign main_minsoc_uart_tx_fifo_syncfifo_re = (main_minsoc_uart_tx_fifo_syncfifo_readable & ((~main_minsoc_uart_tx_fifo_readable) | main_minsoc_uart_tx_fifo_re)); + assign main_minsoc_uart_tx_fifo_level1 = (main_minsoc_uart_tx_fifo_level0 + main_minsoc_uart_tx_fifo_readable); + always @(*) begin + main_minsoc_uart_tx_fifo_wrport_adr <= 4'd0; + if (main_minsoc_uart_tx_fifo_replace) begin + main_minsoc_uart_tx_fifo_wrport_adr <= (main_minsoc_uart_tx_fifo_produce - 1'd1); + end else begin + main_minsoc_uart_tx_fifo_wrport_adr <= main_minsoc_uart_tx_fifo_produce; + end + end + assign main_minsoc_uart_tx_fifo_wrport_dat_w = main_minsoc_uart_tx_fifo_syncfifo_din; + assign main_minsoc_uart_tx_fifo_wrport_we = (main_minsoc_uart_tx_fifo_syncfifo_we & (main_minsoc_uart_tx_fifo_syncfifo_writable | main_minsoc_uart_tx_fifo_replace)); + assign main_minsoc_uart_tx_fifo_do_read = (main_minsoc_uart_tx_fifo_syncfifo_readable & main_minsoc_uart_tx_fifo_syncfifo_re); + assign main_minsoc_uart_tx_fifo_rdport_adr = main_minsoc_uart_tx_fifo_consume; + assign main_minsoc_uart_tx_fifo_syncfifo_dout = main_minsoc_uart_tx_fifo_rdport_dat_r; + assign main_minsoc_uart_tx_fifo_rdport_re = main_minsoc_uart_tx_fifo_do_read; + assign main_minsoc_uart_tx_fifo_syncfifo_writable = (main_minsoc_uart_tx_fifo_level0 != 5'd16); + assign main_minsoc_uart_tx_fifo_syncfifo_readable = (main_minsoc_uart_tx_fifo_level0 != 1'd0); + assign main_minsoc_uart_rx_fifo_syncfifo_din = { + main_minsoc_uart_rx_fifo_fifo_in_last, + main_minsoc_uart_rx_fifo_fifo_in_first, + main_minsoc_uart_rx_fifo_fifo_in_payload_data + }; + assign {main_minsoc_uart_rx_fifo_fifo_out_last, main_minsoc_uart_rx_fifo_fifo_out_first, main_minsoc_uart_rx_fifo_fifo_out_payload_data} = main_minsoc_uart_rx_fifo_syncfifo_dout; + assign main_minsoc_uart_rx_fifo_sink_ready = main_minsoc_uart_rx_fifo_syncfifo_writable; + assign main_minsoc_uart_rx_fifo_syncfifo_we = main_minsoc_uart_rx_fifo_sink_valid; + assign main_minsoc_uart_rx_fifo_fifo_in_first = main_minsoc_uart_rx_fifo_sink_first; + assign main_minsoc_uart_rx_fifo_fifo_in_last = main_minsoc_uart_rx_fifo_sink_last; + assign main_minsoc_uart_rx_fifo_fifo_in_payload_data = main_minsoc_uart_rx_fifo_sink_payload_data; + assign main_minsoc_uart_rx_fifo_source_valid = main_minsoc_uart_rx_fifo_readable; + assign main_minsoc_uart_rx_fifo_source_first = main_minsoc_uart_rx_fifo_fifo_out_first; + assign main_minsoc_uart_rx_fifo_source_last = main_minsoc_uart_rx_fifo_fifo_out_last; + assign main_minsoc_uart_rx_fifo_source_payload_data = main_minsoc_uart_rx_fifo_fifo_out_payload_data; + assign main_minsoc_uart_rx_fifo_re = main_minsoc_uart_rx_fifo_source_ready; + assign main_minsoc_uart_rx_fifo_syncfifo_re = (main_minsoc_uart_rx_fifo_syncfifo_readable & ((~main_minsoc_uart_rx_fifo_readable) | main_minsoc_uart_rx_fifo_re)); + assign main_minsoc_uart_rx_fifo_level1 = (main_minsoc_uart_rx_fifo_level0 + main_minsoc_uart_rx_fifo_readable); + always @(*) begin + main_minsoc_uart_rx_fifo_wrport_adr <= 4'd0; + if (main_minsoc_uart_rx_fifo_replace) begin + main_minsoc_uart_rx_fifo_wrport_adr <= (main_minsoc_uart_rx_fifo_produce - 1'd1); + end else begin + main_minsoc_uart_rx_fifo_wrport_adr <= main_minsoc_uart_rx_fifo_produce; + end + end + assign main_minsoc_uart_rx_fifo_wrport_dat_w = main_minsoc_uart_rx_fifo_syncfifo_din; + assign main_minsoc_uart_rx_fifo_wrport_we = (main_minsoc_uart_rx_fifo_syncfifo_we & (main_minsoc_uart_rx_fifo_syncfifo_writable | main_minsoc_uart_rx_fifo_replace)); + assign main_minsoc_uart_rx_fifo_do_read = (main_minsoc_uart_rx_fifo_syncfifo_readable & main_minsoc_uart_rx_fifo_syncfifo_re); + assign main_minsoc_uart_rx_fifo_rdport_adr = main_minsoc_uart_rx_fifo_consume; + assign main_minsoc_uart_rx_fifo_syncfifo_dout = main_minsoc_uart_rx_fifo_rdport_dat_r; + assign main_minsoc_uart_rx_fifo_rdport_re = main_minsoc_uart_rx_fifo_do_read; + assign main_minsoc_uart_rx_fifo_syncfifo_writable = (main_minsoc_uart_rx_fifo_level0 != 5'd16); + assign main_minsoc_uart_rx_fifo_syncfifo_readable = (main_minsoc_uart_rx_fifo_level0 != 1'd0); + assign main_minsoc_timer0_zero_trigger = (main_minsoc_timer0_value != 1'd0); + assign main_minsoc_timer0_eventmanager_status_w = main_minsoc_timer0_zero_status; + always @(*) begin + main_minsoc_timer0_zero_clear <= 1'd0; + if ((main_minsoc_timer0_eventmanager_pending_re & main_minsoc_timer0_eventmanager_pending_r)) begin + main_minsoc_timer0_zero_clear <= 1'd1; + end + end + assign main_minsoc_timer0_eventmanager_pending_w = main_minsoc_timer0_zero_pending; + assign main_minsoc_timer0_irq = (main_minsoc_timer0_eventmanager_pending_w & main_minsoc_timer0_eventmanager_storage); + assign main_minsoc_timer0_zero_status = main_minsoc_timer0_zero_trigger; + assign main_minsoc_interface_dat_w = main_minsoc_bus_wishbone_dat_w; + assign main_minsoc_bus_wishbone_dat_r = main_minsoc_interface_dat_r; + always @(*) begin + main_minsoc_interface_adr <= 14'd0; + main_minsoc_interface_we <= 1'd0; + builder_wb2csr_next_state <= 1'd0; + main_minsoc_bus_wishbone_ack <= 1'd0; + builder_wb2csr_next_state <= builder_wb2csr_state; + case (builder_wb2csr_state) + 1'd1: begin + main_minsoc_bus_wishbone_ack <= 1'd1; + builder_wb2csr_next_state <= 1'd0; + end + default: begin + if ((main_minsoc_bus_wishbone_cyc & main_minsoc_bus_wishbone_stb)) begin + main_minsoc_interface_adr <= main_minsoc_bus_wishbone_adr; + main_minsoc_interface_we <= main_minsoc_bus_wishbone_we; + builder_wb2csr_next_state <= 1'd1; + end + end + endcase + end + assign main_reset = (~cpu_reset); + always @(*) begin + main_a7ddrphy_dqs_serdes_pattern <= 8'd85; + main_a7ddrphy_dqs_serdes_pattern <= 7'd85; + if ((main_a7ddrphy_dqs_preamble | main_a7ddrphy_dqs_postamble)) begin + main_a7ddrphy_dqs_serdes_pattern <= 1'd0; + end + end + assign main_a7ddrphy_bitslip0_i = main_a7ddrphy_dq_i_data0; + assign main_a7ddrphy_bitslip1_i = main_a7ddrphy_dq_i_data1; + assign main_a7ddrphy_bitslip2_i = main_a7ddrphy_dq_i_data2; + assign main_a7ddrphy_bitslip3_i = main_a7ddrphy_dq_i_data3; + assign main_a7ddrphy_bitslip4_i = main_a7ddrphy_dq_i_data4; + assign main_a7ddrphy_bitslip5_i = main_a7ddrphy_dq_i_data5; + assign main_a7ddrphy_bitslip6_i = main_a7ddrphy_dq_i_data6; + assign main_a7ddrphy_bitslip7_i = main_a7ddrphy_dq_i_data7; + assign main_a7ddrphy_bitslip8_i = main_a7ddrphy_dq_i_data8; + assign main_a7ddrphy_bitslip9_i = main_a7ddrphy_dq_i_data9; + assign main_a7ddrphy_bitslip10_i = main_a7ddrphy_dq_i_data10; + assign main_a7ddrphy_bitslip11_i = main_a7ddrphy_dq_i_data11; + assign main_a7ddrphy_bitslip12_i = main_a7ddrphy_dq_i_data12; + assign main_a7ddrphy_bitslip13_i = main_a7ddrphy_dq_i_data13; + assign main_a7ddrphy_bitslip14_i = main_a7ddrphy_dq_i_data14; + assign main_a7ddrphy_bitslip15_i = main_a7ddrphy_dq_i_data15; + always @(*) begin + main_a7ddrphy_dfi_p0_rddata <= 32'd0; + main_a7ddrphy_dfi_p0_rddata[0] <= main_a7ddrphy_bitslip0_o[0]; + main_a7ddrphy_dfi_p0_rddata[16] <= main_a7ddrphy_bitslip0_o[1]; + main_a7ddrphy_dfi_p0_rddata[1] <= main_a7ddrphy_bitslip1_o[0]; + main_a7ddrphy_dfi_p0_rddata[17] <= main_a7ddrphy_bitslip1_o[1]; + main_a7ddrphy_dfi_p0_rddata[2] <= main_a7ddrphy_bitslip2_o[0]; + main_a7ddrphy_dfi_p0_rddata[18] <= main_a7ddrphy_bitslip2_o[1]; + main_a7ddrphy_dfi_p0_rddata[3] <= main_a7ddrphy_bitslip3_o[0]; + main_a7ddrphy_dfi_p0_rddata[19] <= main_a7ddrphy_bitslip3_o[1]; + main_a7ddrphy_dfi_p0_rddata[4] <= main_a7ddrphy_bitslip4_o[0]; + main_a7ddrphy_dfi_p0_rddata[20] <= main_a7ddrphy_bitslip4_o[1]; + main_a7ddrphy_dfi_p0_rddata[5] <= main_a7ddrphy_bitslip5_o[0]; + main_a7ddrphy_dfi_p0_rddata[21] <= main_a7ddrphy_bitslip5_o[1]; + main_a7ddrphy_dfi_p0_rddata[6] <= main_a7ddrphy_bitslip6_o[0]; + main_a7ddrphy_dfi_p0_rddata[22] <= main_a7ddrphy_bitslip6_o[1]; + main_a7ddrphy_dfi_p0_rddata[7] <= main_a7ddrphy_bitslip7_o[0]; + main_a7ddrphy_dfi_p0_rddata[23] <= main_a7ddrphy_bitslip7_o[1]; + main_a7ddrphy_dfi_p0_rddata[8] <= main_a7ddrphy_bitslip8_o[0]; + main_a7ddrphy_dfi_p0_rddata[24] <= main_a7ddrphy_bitslip8_o[1]; + main_a7ddrphy_dfi_p0_rddata[9] <= main_a7ddrphy_bitslip9_o[0]; + main_a7ddrphy_dfi_p0_rddata[25] <= main_a7ddrphy_bitslip9_o[1]; + main_a7ddrphy_dfi_p0_rddata[10] <= main_a7ddrphy_bitslip10_o[0]; + main_a7ddrphy_dfi_p0_rddata[26] <= main_a7ddrphy_bitslip10_o[1]; + main_a7ddrphy_dfi_p0_rddata[11] <= main_a7ddrphy_bitslip11_o[0]; + main_a7ddrphy_dfi_p0_rddata[27] <= main_a7ddrphy_bitslip11_o[1]; + main_a7ddrphy_dfi_p0_rddata[12] <= main_a7ddrphy_bitslip12_o[0]; + main_a7ddrphy_dfi_p0_rddata[28] <= main_a7ddrphy_bitslip12_o[1]; + main_a7ddrphy_dfi_p0_rddata[13] <= main_a7ddrphy_bitslip13_o[0]; + main_a7ddrphy_dfi_p0_rddata[29] <= main_a7ddrphy_bitslip13_o[1]; + main_a7ddrphy_dfi_p0_rddata[14] <= main_a7ddrphy_bitslip14_o[0]; + main_a7ddrphy_dfi_p0_rddata[30] <= main_a7ddrphy_bitslip14_o[1]; + main_a7ddrphy_dfi_p0_rddata[15] <= main_a7ddrphy_bitslip15_o[0]; + main_a7ddrphy_dfi_p0_rddata[31] <= main_a7ddrphy_bitslip15_o[1]; + end + always @(*) begin + main_a7ddrphy_dfi_p1_rddata <= 32'd0; + main_a7ddrphy_dfi_p1_rddata[0] <= main_a7ddrphy_bitslip0_o[2]; + main_a7ddrphy_dfi_p1_rddata[16] <= main_a7ddrphy_bitslip0_o[3]; + main_a7ddrphy_dfi_p1_rddata[1] <= main_a7ddrphy_bitslip1_o[2]; + main_a7ddrphy_dfi_p1_rddata[17] <= main_a7ddrphy_bitslip1_o[3]; + main_a7ddrphy_dfi_p1_rddata[2] <= main_a7ddrphy_bitslip2_o[2]; + main_a7ddrphy_dfi_p1_rddata[18] <= main_a7ddrphy_bitslip2_o[3]; + main_a7ddrphy_dfi_p1_rddata[3] <= main_a7ddrphy_bitslip3_o[2]; + main_a7ddrphy_dfi_p1_rddata[19] <= main_a7ddrphy_bitslip3_o[3]; + main_a7ddrphy_dfi_p1_rddata[4] <= main_a7ddrphy_bitslip4_o[2]; + main_a7ddrphy_dfi_p1_rddata[20] <= main_a7ddrphy_bitslip4_o[3]; + main_a7ddrphy_dfi_p1_rddata[5] <= main_a7ddrphy_bitslip5_o[2]; + main_a7ddrphy_dfi_p1_rddata[21] <= main_a7ddrphy_bitslip5_o[3]; + main_a7ddrphy_dfi_p1_rddata[6] <= main_a7ddrphy_bitslip6_o[2]; + main_a7ddrphy_dfi_p1_rddata[22] <= main_a7ddrphy_bitslip6_o[3]; + main_a7ddrphy_dfi_p1_rddata[7] <= main_a7ddrphy_bitslip7_o[2]; + main_a7ddrphy_dfi_p1_rddata[23] <= main_a7ddrphy_bitslip7_o[3]; + main_a7ddrphy_dfi_p1_rddata[8] <= main_a7ddrphy_bitslip8_o[2]; + main_a7ddrphy_dfi_p1_rddata[24] <= main_a7ddrphy_bitslip8_o[3]; + main_a7ddrphy_dfi_p1_rddata[9] <= main_a7ddrphy_bitslip9_o[2]; + main_a7ddrphy_dfi_p1_rddata[25] <= main_a7ddrphy_bitslip9_o[3]; + main_a7ddrphy_dfi_p1_rddata[10] <= main_a7ddrphy_bitslip10_o[2]; + main_a7ddrphy_dfi_p1_rddata[26] <= main_a7ddrphy_bitslip10_o[3]; + main_a7ddrphy_dfi_p1_rddata[11] <= main_a7ddrphy_bitslip11_o[2]; + main_a7ddrphy_dfi_p1_rddata[27] <= main_a7ddrphy_bitslip11_o[3]; + main_a7ddrphy_dfi_p1_rddata[12] <= main_a7ddrphy_bitslip12_o[2]; + main_a7ddrphy_dfi_p1_rddata[28] <= main_a7ddrphy_bitslip12_o[3]; + main_a7ddrphy_dfi_p1_rddata[13] <= main_a7ddrphy_bitslip13_o[2]; + main_a7ddrphy_dfi_p1_rddata[29] <= main_a7ddrphy_bitslip13_o[3]; + main_a7ddrphy_dfi_p1_rddata[14] <= main_a7ddrphy_bitslip14_o[2]; + main_a7ddrphy_dfi_p1_rddata[30] <= main_a7ddrphy_bitslip14_o[3]; + main_a7ddrphy_dfi_p1_rddata[15] <= main_a7ddrphy_bitslip15_o[2]; + main_a7ddrphy_dfi_p1_rddata[31] <= main_a7ddrphy_bitslip15_o[3]; + end + always @(*) begin + main_a7ddrphy_dfi_p2_rddata <= 32'd0; + main_a7ddrphy_dfi_p2_rddata[0] <= main_a7ddrphy_bitslip0_o[4]; + main_a7ddrphy_dfi_p2_rddata[16] <= main_a7ddrphy_bitslip0_o[5]; + main_a7ddrphy_dfi_p2_rddata[1] <= main_a7ddrphy_bitslip1_o[4]; + main_a7ddrphy_dfi_p2_rddata[17] <= main_a7ddrphy_bitslip1_o[5]; + main_a7ddrphy_dfi_p2_rddata[2] <= main_a7ddrphy_bitslip2_o[4]; + main_a7ddrphy_dfi_p2_rddata[18] <= main_a7ddrphy_bitslip2_o[5]; + main_a7ddrphy_dfi_p2_rddata[3] <= main_a7ddrphy_bitslip3_o[4]; + main_a7ddrphy_dfi_p2_rddata[19] <= main_a7ddrphy_bitslip3_o[5]; + main_a7ddrphy_dfi_p2_rddata[4] <= main_a7ddrphy_bitslip4_o[4]; + main_a7ddrphy_dfi_p2_rddata[20] <= main_a7ddrphy_bitslip4_o[5]; + main_a7ddrphy_dfi_p2_rddata[5] <= main_a7ddrphy_bitslip5_o[4]; + main_a7ddrphy_dfi_p2_rddata[21] <= main_a7ddrphy_bitslip5_o[5]; + main_a7ddrphy_dfi_p2_rddata[6] <= main_a7ddrphy_bitslip6_o[4]; + main_a7ddrphy_dfi_p2_rddata[22] <= main_a7ddrphy_bitslip6_o[5]; + main_a7ddrphy_dfi_p2_rddata[7] <= main_a7ddrphy_bitslip7_o[4]; + main_a7ddrphy_dfi_p2_rddata[23] <= main_a7ddrphy_bitslip7_o[5]; + main_a7ddrphy_dfi_p2_rddata[8] <= main_a7ddrphy_bitslip8_o[4]; + main_a7ddrphy_dfi_p2_rddata[24] <= main_a7ddrphy_bitslip8_o[5]; + main_a7ddrphy_dfi_p2_rddata[9] <= main_a7ddrphy_bitslip9_o[4]; + main_a7ddrphy_dfi_p2_rddata[25] <= main_a7ddrphy_bitslip9_o[5]; + main_a7ddrphy_dfi_p2_rddata[10] <= main_a7ddrphy_bitslip10_o[4]; + main_a7ddrphy_dfi_p2_rddata[26] <= main_a7ddrphy_bitslip10_o[5]; + main_a7ddrphy_dfi_p2_rddata[11] <= main_a7ddrphy_bitslip11_o[4]; + main_a7ddrphy_dfi_p2_rddata[27] <= main_a7ddrphy_bitslip11_o[5]; + main_a7ddrphy_dfi_p2_rddata[12] <= main_a7ddrphy_bitslip12_o[4]; + main_a7ddrphy_dfi_p2_rddata[28] <= main_a7ddrphy_bitslip12_o[5]; + main_a7ddrphy_dfi_p2_rddata[13] <= main_a7ddrphy_bitslip13_o[4]; + main_a7ddrphy_dfi_p2_rddata[29] <= main_a7ddrphy_bitslip13_o[5]; + main_a7ddrphy_dfi_p2_rddata[14] <= main_a7ddrphy_bitslip14_o[4]; + main_a7ddrphy_dfi_p2_rddata[30] <= main_a7ddrphy_bitslip14_o[5]; + main_a7ddrphy_dfi_p2_rddata[15] <= main_a7ddrphy_bitslip15_o[4]; + main_a7ddrphy_dfi_p2_rddata[31] <= main_a7ddrphy_bitslip15_o[5]; + end + always @(*) begin + main_a7ddrphy_dfi_p3_rddata <= 32'd0; + main_a7ddrphy_dfi_p3_rddata[0] <= main_a7ddrphy_bitslip0_o[6]; + main_a7ddrphy_dfi_p3_rddata[16] <= main_a7ddrphy_bitslip0_o[7]; + main_a7ddrphy_dfi_p3_rddata[1] <= main_a7ddrphy_bitslip1_o[6]; + main_a7ddrphy_dfi_p3_rddata[17] <= main_a7ddrphy_bitslip1_o[7]; + main_a7ddrphy_dfi_p3_rddata[2] <= main_a7ddrphy_bitslip2_o[6]; + main_a7ddrphy_dfi_p3_rddata[18] <= main_a7ddrphy_bitslip2_o[7]; + main_a7ddrphy_dfi_p3_rddata[3] <= main_a7ddrphy_bitslip3_o[6]; + main_a7ddrphy_dfi_p3_rddata[19] <= main_a7ddrphy_bitslip3_o[7]; + main_a7ddrphy_dfi_p3_rddata[4] <= main_a7ddrphy_bitslip4_o[6]; + main_a7ddrphy_dfi_p3_rddata[20] <= main_a7ddrphy_bitslip4_o[7]; + main_a7ddrphy_dfi_p3_rddata[5] <= main_a7ddrphy_bitslip5_o[6]; + main_a7ddrphy_dfi_p3_rddata[21] <= main_a7ddrphy_bitslip5_o[7]; + main_a7ddrphy_dfi_p3_rddata[6] <= main_a7ddrphy_bitslip6_o[6]; + main_a7ddrphy_dfi_p3_rddata[22] <= main_a7ddrphy_bitslip6_o[7]; + main_a7ddrphy_dfi_p3_rddata[7] <= main_a7ddrphy_bitslip7_o[6]; + main_a7ddrphy_dfi_p3_rddata[23] <= main_a7ddrphy_bitslip7_o[7]; + main_a7ddrphy_dfi_p3_rddata[8] <= main_a7ddrphy_bitslip8_o[6]; + main_a7ddrphy_dfi_p3_rddata[24] <= main_a7ddrphy_bitslip8_o[7]; + main_a7ddrphy_dfi_p3_rddata[9] <= main_a7ddrphy_bitslip9_o[6]; + main_a7ddrphy_dfi_p3_rddata[25] <= main_a7ddrphy_bitslip9_o[7]; + main_a7ddrphy_dfi_p3_rddata[10] <= main_a7ddrphy_bitslip10_o[6]; + main_a7ddrphy_dfi_p3_rddata[26] <= main_a7ddrphy_bitslip10_o[7]; + main_a7ddrphy_dfi_p3_rddata[11] <= main_a7ddrphy_bitslip11_o[6]; + main_a7ddrphy_dfi_p3_rddata[27] <= main_a7ddrphy_bitslip11_o[7]; + main_a7ddrphy_dfi_p3_rddata[12] <= main_a7ddrphy_bitslip12_o[6]; + main_a7ddrphy_dfi_p3_rddata[28] <= main_a7ddrphy_bitslip12_o[7]; + main_a7ddrphy_dfi_p3_rddata[13] <= main_a7ddrphy_bitslip13_o[6]; + main_a7ddrphy_dfi_p3_rddata[29] <= main_a7ddrphy_bitslip13_o[7]; + main_a7ddrphy_dfi_p3_rddata[14] <= main_a7ddrphy_bitslip14_o[6]; + main_a7ddrphy_dfi_p3_rddata[30] <= main_a7ddrphy_bitslip14_o[7]; + main_a7ddrphy_dfi_p3_rddata[15] <= main_a7ddrphy_bitslip15_o[6]; + main_a7ddrphy_dfi_p3_rddata[31] <= main_a7ddrphy_bitslip15_o[7]; + end + assign main_a7ddrphy_oe = ((main_a7ddrphy_last_wrdata_en[1] | main_a7ddrphy_last_wrdata_en[2]) | main_a7ddrphy_last_wrdata_en[3]); + assign main_a7ddrphy_dqs_preamble = (main_a7ddrphy_last_wrdata_en[1] & (~main_a7ddrphy_last_wrdata_en[2])); + assign main_a7ddrphy_dqs_postamble = (main_a7ddrphy_last_wrdata_en[3] & (~main_a7ddrphy_last_wrdata_en[2])); + assign main_a7ddrphy_dfi_p0_address = main_sdram_master_p0_address; + assign main_a7ddrphy_dfi_p0_bank = main_sdram_master_p0_bank; + assign main_a7ddrphy_dfi_p0_cas_n = main_sdram_master_p0_cas_n; + assign main_a7ddrphy_dfi_p0_cs_n = main_sdram_master_p0_cs_n; + assign main_a7ddrphy_dfi_p0_ras_n = main_sdram_master_p0_ras_n; + assign main_a7ddrphy_dfi_p0_we_n = main_sdram_master_p0_we_n; + assign main_a7ddrphy_dfi_p0_cke = main_sdram_master_p0_cke; + assign main_a7ddrphy_dfi_p0_odt = main_sdram_master_p0_odt; + assign main_a7ddrphy_dfi_p0_reset_n = main_sdram_master_p0_reset_n; + assign main_a7ddrphy_dfi_p0_act_n = main_sdram_master_p0_act_n; + assign main_a7ddrphy_dfi_p0_wrdata = main_sdram_master_p0_wrdata; + assign main_a7ddrphy_dfi_p0_wrdata_en = main_sdram_master_p0_wrdata_en; + assign main_a7ddrphy_dfi_p0_wrdata_mask = main_sdram_master_p0_wrdata_mask; + assign main_a7ddrphy_dfi_p0_rddata_en = main_sdram_master_p0_rddata_en; + assign main_sdram_master_p0_rddata = main_a7ddrphy_dfi_p0_rddata; + assign main_sdram_master_p0_rddata_valid = main_a7ddrphy_dfi_p0_rddata_valid; + assign main_a7ddrphy_dfi_p1_address = main_sdram_master_p1_address; + assign main_a7ddrphy_dfi_p1_bank = main_sdram_master_p1_bank; + assign main_a7ddrphy_dfi_p1_cas_n = main_sdram_master_p1_cas_n; + assign main_a7ddrphy_dfi_p1_cs_n = main_sdram_master_p1_cs_n; + assign main_a7ddrphy_dfi_p1_ras_n = main_sdram_master_p1_ras_n; + assign main_a7ddrphy_dfi_p1_we_n = main_sdram_master_p1_we_n; + assign main_a7ddrphy_dfi_p1_cke = main_sdram_master_p1_cke; + assign main_a7ddrphy_dfi_p1_odt = main_sdram_master_p1_odt; + assign main_a7ddrphy_dfi_p1_reset_n = main_sdram_master_p1_reset_n; + assign main_a7ddrphy_dfi_p1_act_n = main_sdram_master_p1_act_n; + assign main_a7ddrphy_dfi_p1_wrdata = main_sdram_master_p1_wrdata; + assign main_a7ddrphy_dfi_p1_wrdata_en = main_sdram_master_p1_wrdata_en; + assign main_a7ddrphy_dfi_p1_wrdata_mask = main_sdram_master_p1_wrdata_mask; + assign main_a7ddrphy_dfi_p1_rddata_en = main_sdram_master_p1_rddata_en; + assign main_sdram_master_p1_rddata = main_a7ddrphy_dfi_p1_rddata; + assign main_sdram_master_p1_rddata_valid = main_a7ddrphy_dfi_p1_rddata_valid; + assign main_a7ddrphy_dfi_p2_address = main_sdram_master_p2_address; + assign main_a7ddrphy_dfi_p2_bank = main_sdram_master_p2_bank; + assign main_a7ddrphy_dfi_p2_cas_n = main_sdram_master_p2_cas_n; + assign main_a7ddrphy_dfi_p2_cs_n = main_sdram_master_p2_cs_n; + assign main_a7ddrphy_dfi_p2_ras_n = main_sdram_master_p2_ras_n; + assign main_a7ddrphy_dfi_p2_we_n = main_sdram_master_p2_we_n; + assign main_a7ddrphy_dfi_p2_cke = main_sdram_master_p2_cke; + assign main_a7ddrphy_dfi_p2_odt = main_sdram_master_p2_odt; + assign main_a7ddrphy_dfi_p2_reset_n = main_sdram_master_p2_reset_n; + assign main_a7ddrphy_dfi_p2_act_n = main_sdram_master_p2_act_n; + assign main_a7ddrphy_dfi_p2_wrdata = main_sdram_master_p2_wrdata; + assign main_a7ddrphy_dfi_p2_wrdata_en = main_sdram_master_p2_wrdata_en; + assign main_a7ddrphy_dfi_p2_wrdata_mask = main_sdram_master_p2_wrdata_mask; + assign main_a7ddrphy_dfi_p2_rddata_en = main_sdram_master_p2_rddata_en; + assign main_sdram_master_p2_rddata = main_a7ddrphy_dfi_p2_rddata; + assign main_sdram_master_p2_rddata_valid = main_a7ddrphy_dfi_p2_rddata_valid; + assign main_a7ddrphy_dfi_p3_address = main_sdram_master_p3_address; + assign main_a7ddrphy_dfi_p3_bank = main_sdram_master_p3_bank; + assign main_a7ddrphy_dfi_p3_cas_n = main_sdram_master_p3_cas_n; + assign main_a7ddrphy_dfi_p3_cs_n = main_sdram_master_p3_cs_n; + assign main_a7ddrphy_dfi_p3_ras_n = main_sdram_master_p3_ras_n; + assign main_a7ddrphy_dfi_p3_we_n = main_sdram_master_p3_we_n; + assign main_a7ddrphy_dfi_p3_cke = main_sdram_master_p3_cke; + assign main_a7ddrphy_dfi_p3_odt = main_sdram_master_p3_odt; + assign main_a7ddrphy_dfi_p3_reset_n = main_sdram_master_p3_reset_n; + assign main_a7ddrphy_dfi_p3_act_n = main_sdram_master_p3_act_n; + assign main_a7ddrphy_dfi_p3_wrdata = main_sdram_master_p3_wrdata; + assign main_a7ddrphy_dfi_p3_wrdata_en = main_sdram_master_p3_wrdata_en; + assign main_a7ddrphy_dfi_p3_wrdata_mask = main_sdram_master_p3_wrdata_mask; + assign main_a7ddrphy_dfi_p3_rddata_en = main_sdram_master_p3_rddata_en; + assign main_sdram_master_p3_rddata = main_a7ddrphy_dfi_p3_rddata; + assign main_sdram_master_p3_rddata_valid = main_a7ddrphy_dfi_p3_rddata_valid; + assign main_sdram_slave_p0_address = main_sdram_dfi_p0_address; + assign main_sdram_slave_p0_bank = main_sdram_dfi_p0_bank; + assign main_sdram_slave_p0_cas_n = main_sdram_dfi_p0_cas_n; + assign main_sdram_slave_p0_cs_n = main_sdram_dfi_p0_cs_n; + assign main_sdram_slave_p0_ras_n = main_sdram_dfi_p0_ras_n; + assign main_sdram_slave_p0_we_n = main_sdram_dfi_p0_we_n; + assign main_sdram_slave_p0_cke = main_sdram_dfi_p0_cke; + assign main_sdram_slave_p0_odt = main_sdram_dfi_p0_odt; + assign main_sdram_slave_p0_reset_n = main_sdram_dfi_p0_reset_n; + assign main_sdram_slave_p0_act_n = main_sdram_dfi_p0_act_n; + assign main_sdram_slave_p0_wrdata = main_sdram_dfi_p0_wrdata; + assign main_sdram_slave_p0_wrdata_en = main_sdram_dfi_p0_wrdata_en; + assign main_sdram_slave_p0_wrdata_mask = main_sdram_dfi_p0_wrdata_mask; + assign main_sdram_slave_p0_rddata_en = main_sdram_dfi_p0_rddata_en; + assign main_sdram_dfi_p0_rddata = main_sdram_slave_p0_rddata; + assign main_sdram_dfi_p0_rddata_valid = main_sdram_slave_p0_rddata_valid; + assign main_sdram_slave_p1_address = main_sdram_dfi_p1_address; + assign main_sdram_slave_p1_bank = main_sdram_dfi_p1_bank; + assign main_sdram_slave_p1_cas_n = main_sdram_dfi_p1_cas_n; + assign main_sdram_slave_p1_cs_n = main_sdram_dfi_p1_cs_n; + assign main_sdram_slave_p1_ras_n = main_sdram_dfi_p1_ras_n; + assign main_sdram_slave_p1_we_n = main_sdram_dfi_p1_we_n; + assign main_sdram_slave_p1_cke = main_sdram_dfi_p1_cke; + assign main_sdram_slave_p1_odt = main_sdram_dfi_p1_odt; + assign main_sdram_slave_p1_reset_n = main_sdram_dfi_p1_reset_n; + assign main_sdram_slave_p1_act_n = main_sdram_dfi_p1_act_n; + assign main_sdram_slave_p1_wrdata = main_sdram_dfi_p1_wrdata; + assign main_sdram_slave_p1_wrdata_en = main_sdram_dfi_p1_wrdata_en; + assign main_sdram_slave_p1_wrdata_mask = main_sdram_dfi_p1_wrdata_mask; + assign main_sdram_slave_p1_rddata_en = main_sdram_dfi_p1_rddata_en; + assign main_sdram_dfi_p1_rddata = main_sdram_slave_p1_rddata; + assign main_sdram_dfi_p1_rddata_valid = main_sdram_slave_p1_rddata_valid; + assign main_sdram_slave_p2_address = main_sdram_dfi_p2_address; + assign main_sdram_slave_p2_bank = main_sdram_dfi_p2_bank; + assign main_sdram_slave_p2_cas_n = main_sdram_dfi_p2_cas_n; + assign main_sdram_slave_p2_cs_n = main_sdram_dfi_p2_cs_n; + assign main_sdram_slave_p2_ras_n = main_sdram_dfi_p2_ras_n; + assign main_sdram_slave_p2_we_n = main_sdram_dfi_p2_we_n; + assign main_sdram_slave_p2_cke = main_sdram_dfi_p2_cke; + assign main_sdram_slave_p2_odt = main_sdram_dfi_p2_odt; + assign main_sdram_slave_p2_reset_n = main_sdram_dfi_p2_reset_n; + assign main_sdram_slave_p2_act_n = main_sdram_dfi_p2_act_n; + assign main_sdram_slave_p2_wrdata = main_sdram_dfi_p2_wrdata; + assign main_sdram_slave_p2_wrdata_en = main_sdram_dfi_p2_wrdata_en; + assign main_sdram_slave_p2_wrdata_mask = main_sdram_dfi_p2_wrdata_mask; + assign main_sdram_slave_p2_rddata_en = main_sdram_dfi_p2_rddata_en; + assign main_sdram_dfi_p2_rddata = main_sdram_slave_p2_rddata; + assign main_sdram_dfi_p2_rddata_valid = main_sdram_slave_p2_rddata_valid; + assign main_sdram_slave_p3_address = main_sdram_dfi_p3_address; + assign main_sdram_slave_p3_bank = main_sdram_dfi_p3_bank; + assign main_sdram_slave_p3_cas_n = main_sdram_dfi_p3_cas_n; + assign main_sdram_slave_p3_cs_n = main_sdram_dfi_p3_cs_n; + assign main_sdram_slave_p3_ras_n = main_sdram_dfi_p3_ras_n; + assign main_sdram_slave_p3_we_n = main_sdram_dfi_p3_we_n; + assign main_sdram_slave_p3_cke = main_sdram_dfi_p3_cke; + assign main_sdram_slave_p3_odt = main_sdram_dfi_p3_odt; + assign main_sdram_slave_p3_reset_n = main_sdram_dfi_p3_reset_n; + assign main_sdram_slave_p3_act_n = main_sdram_dfi_p3_act_n; + assign main_sdram_slave_p3_wrdata = main_sdram_dfi_p3_wrdata; + assign main_sdram_slave_p3_wrdata_en = main_sdram_dfi_p3_wrdata_en; + assign main_sdram_slave_p3_wrdata_mask = main_sdram_dfi_p3_wrdata_mask; + assign main_sdram_slave_p3_rddata_en = main_sdram_dfi_p3_rddata_en; + assign main_sdram_dfi_p3_rddata = main_sdram_slave_p3_rddata; + assign main_sdram_dfi_p3_rddata_valid = main_sdram_slave_p3_rddata_valid; + always @(*) begin + main_sdram_slave_p1_rddata <= 32'd0; + main_sdram_slave_p1_rddata_valid <= 1'd0; + main_sdram_slave_p2_rddata <= 32'd0; + main_sdram_slave_p2_rddata_valid <= 1'd0; + main_sdram_slave_p3_rddata <= 32'd0; + main_sdram_slave_p3_rddata_valid <= 1'd0; + main_sdram_inti_p0_rddata <= 32'd0; + main_sdram_inti_p0_rddata_valid <= 1'd0; + main_sdram_master_p0_address <= 14'd0; + main_sdram_master_p0_bank <= 3'd0; + main_sdram_master_p0_cas_n <= 1'd1; + main_sdram_master_p0_cs_n <= 1'd1; + main_sdram_master_p0_ras_n <= 1'd1; + main_sdram_master_p0_we_n <= 1'd1; + main_sdram_master_p0_cke <= 1'd0; + main_sdram_master_p0_odt <= 1'd0; + main_sdram_master_p0_reset_n <= 1'd0; + main_sdram_master_p0_act_n <= 1'd1; + main_sdram_inti_p1_rddata <= 32'd0; + main_sdram_master_p0_wrdata <= 32'd0; + main_sdram_inti_p1_rddata_valid <= 1'd0; + main_sdram_master_p0_wrdata_en <= 1'd0; + main_sdram_master_p0_wrdata_mask <= 4'd0; + main_sdram_master_p0_rddata_en <= 1'd0; + main_sdram_master_p1_address <= 14'd0; + main_sdram_master_p1_bank <= 3'd0; + main_sdram_master_p1_cas_n <= 1'd1; + main_sdram_master_p1_cs_n <= 1'd1; + main_sdram_master_p1_ras_n <= 1'd1; + main_sdram_master_p1_we_n <= 1'd1; + main_sdram_master_p1_cke <= 1'd0; + main_sdram_master_p1_odt <= 1'd0; + main_sdram_master_p1_reset_n <= 1'd0; + main_sdram_master_p1_act_n <= 1'd1; + main_sdram_master_p1_wrdata <= 32'd0; + main_sdram_inti_p2_rddata <= 32'd0; + main_sdram_master_p1_wrdata_en <= 1'd0; + main_sdram_inti_p2_rddata_valid <= 1'd0; + main_sdram_master_p1_wrdata_mask <= 4'd0; + main_sdram_master_p1_rddata_en <= 1'd0; + main_sdram_master_p2_address <= 14'd0; + main_sdram_master_p2_bank <= 3'd0; + main_sdram_master_p2_cas_n <= 1'd1; + main_sdram_master_p2_cs_n <= 1'd1; + main_sdram_master_p2_ras_n <= 1'd1; + main_sdram_master_p2_we_n <= 1'd1; + main_sdram_master_p2_cke <= 1'd0; + main_sdram_master_p2_odt <= 1'd0; + main_sdram_master_p2_reset_n <= 1'd0; + main_sdram_master_p2_act_n <= 1'd1; + main_sdram_master_p2_wrdata <= 32'd0; + main_sdram_inti_p3_rddata <= 32'd0; + main_sdram_master_p2_wrdata_en <= 1'd0; + main_sdram_inti_p3_rddata_valid <= 1'd0; + main_sdram_master_p2_wrdata_mask <= 4'd0; + main_sdram_master_p2_rddata_en <= 1'd0; + main_sdram_master_p3_address <= 14'd0; + main_sdram_master_p3_bank <= 3'd0; + main_sdram_master_p3_cas_n <= 1'd1; + main_sdram_master_p3_cs_n <= 1'd1; + main_sdram_master_p3_ras_n <= 1'd1; + main_sdram_master_p3_we_n <= 1'd1; + main_sdram_master_p3_cke <= 1'd0; + main_sdram_master_p3_odt <= 1'd0; + main_sdram_master_p3_reset_n <= 1'd0; + main_sdram_master_p3_act_n <= 1'd1; + main_sdram_master_p3_wrdata <= 32'd0; + main_sdram_master_p3_wrdata_en <= 1'd0; + main_sdram_master_p3_wrdata_mask <= 4'd0; + main_sdram_master_p3_rddata_en <= 1'd0; + main_sdram_slave_p0_rddata <= 32'd0; + main_sdram_slave_p0_rddata_valid <= 1'd0; + if (main_sdram_storage[0]) begin + main_sdram_master_p0_address <= main_sdram_slave_p0_address; + main_sdram_master_p0_bank <= main_sdram_slave_p0_bank; + main_sdram_master_p0_cas_n <= main_sdram_slave_p0_cas_n; + main_sdram_master_p0_cs_n <= main_sdram_slave_p0_cs_n; + main_sdram_master_p0_ras_n <= main_sdram_slave_p0_ras_n; + main_sdram_master_p0_we_n <= main_sdram_slave_p0_we_n; + main_sdram_master_p0_cke <= main_sdram_slave_p0_cke; + main_sdram_master_p0_odt <= main_sdram_slave_p0_odt; + main_sdram_master_p0_reset_n <= main_sdram_slave_p0_reset_n; + main_sdram_master_p0_act_n <= main_sdram_slave_p0_act_n; + main_sdram_master_p0_wrdata <= main_sdram_slave_p0_wrdata; + main_sdram_master_p0_wrdata_en <= main_sdram_slave_p0_wrdata_en; + main_sdram_master_p0_wrdata_mask <= main_sdram_slave_p0_wrdata_mask; + main_sdram_master_p0_rddata_en <= main_sdram_slave_p0_rddata_en; + main_sdram_slave_p0_rddata <= main_sdram_master_p0_rddata; + main_sdram_slave_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; + main_sdram_master_p1_address <= main_sdram_slave_p1_address; + main_sdram_master_p1_bank <= main_sdram_slave_p1_bank; + main_sdram_master_p1_cas_n <= main_sdram_slave_p1_cas_n; + main_sdram_master_p1_cs_n <= main_sdram_slave_p1_cs_n; + main_sdram_master_p1_ras_n <= main_sdram_slave_p1_ras_n; + main_sdram_master_p1_we_n <= main_sdram_slave_p1_we_n; + main_sdram_master_p1_cke <= main_sdram_slave_p1_cke; + main_sdram_master_p1_odt <= main_sdram_slave_p1_odt; + main_sdram_master_p1_reset_n <= main_sdram_slave_p1_reset_n; + main_sdram_master_p1_act_n <= main_sdram_slave_p1_act_n; + main_sdram_master_p1_wrdata <= main_sdram_slave_p1_wrdata; + main_sdram_master_p1_wrdata_en <= main_sdram_slave_p1_wrdata_en; + main_sdram_master_p1_wrdata_mask <= main_sdram_slave_p1_wrdata_mask; + main_sdram_master_p1_rddata_en <= main_sdram_slave_p1_rddata_en; + main_sdram_slave_p1_rddata <= main_sdram_master_p1_rddata; + main_sdram_slave_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; + main_sdram_master_p2_address <= main_sdram_slave_p2_address; + main_sdram_master_p2_bank <= main_sdram_slave_p2_bank; + main_sdram_master_p2_cas_n <= main_sdram_slave_p2_cas_n; + main_sdram_master_p2_cs_n <= main_sdram_slave_p2_cs_n; + main_sdram_master_p2_ras_n <= main_sdram_slave_p2_ras_n; + main_sdram_master_p2_we_n <= main_sdram_slave_p2_we_n; + main_sdram_master_p2_cke <= main_sdram_slave_p2_cke; + main_sdram_master_p2_odt <= main_sdram_slave_p2_odt; + main_sdram_master_p2_reset_n <= main_sdram_slave_p2_reset_n; + main_sdram_master_p2_act_n <= main_sdram_slave_p2_act_n; + main_sdram_master_p2_wrdata <= main_sdram_slave_p2_wrdata; + main_sdram_master_p2_wrdata_en <= main_sdram_slave_p2_wrdata_en; + main_sdram_master_p2_wrdata_mask <= main_sdram_slave_p2_wrdata_mask; + main_sdram_master_p2_rddata_en <= main_sdram_slave_p2_rddata_en; + main_sdram_slave_p2_rddata <= main_sdram_master_p2_rddata; + main_sdram_slave_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; + main_sdram_master_p3_address <= main_sdram_slave_p3_address; + main_sdram_master_p3_bank <= main_sdram_slave_p3_bank; + main_sdram_master_p3_cas_n <= main_sdram_slave_p3_cas_n; + main_sdram_master_p3_cs_n <= main_sdram_slave_p3_cs_n; + main_sdram_master_p3_ras_n <= main_sdram_slave_p3_ras_n; + main_sdram_master_p3_we_n <= main_sdram_slave_p3_we_n; + main_sdram_master_p3_cke <= main_sdram_slave_p3_cke; + main_sdram_master_p3_odt <= main_sdram_slave_p3_odt; + main_sdram_master_p3_reset_n <= main_sdram_slave_p3_reset_n; + main_sdram_master_p3_act_n <= main_sdram_slave_p3_act_n; + main_sdram_master_p3_wrdata <= main_sdram_slave_p3_wrdata; + main_sdram_master_p3_wrdata_en <= main_sdram_slave_p3_wrdata_en; + main_sdram_master_p3_wrdata_mask <= main_sdram_slave_p3_wrdata_mask; + main_sdram_master_p3_rddata_en <= main_sdram_slave_p3_rddata_en; + main_sdram_slave_p3_rddata <= main_sdram_master_p3_rddata; + main_sdram_slave_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; + end else begin + main_sdram_master_p0_address <= main_sdram_inti_p0_address; + main_sdram_master_p0_bank <= main_sdram_inti_p0_bank; + main_sdram_master_p0_cas_n <= main_sdram_inti_p0_cas_n; + main_sdram_master_p0_cs_n <= main_sdram_inti_p0_cs_n; + main_sdram_master_p0_ras_n <= main_sdram_inti_p0_ras_n; + main_sdram_master_p0_we_n <= main_sdram_inti_p0_we_n; + main_sdram_master_p0_cke <= main_sdram_inti_p0_cke; + main_sdram_master_p0_odt <= main_sdram_inti_p0_odt; + main_sdram_master_p0_reset_n <= main_sdram_inti_p0_reset_n; + main_sdram_master_p0_act_n <= main_sdram_inti_p0_act_n; + main_sdram_master_p0_wrdata <= main_sdram_inti_p0_wrdata; + main_sdram_master_p0_wrdata_en <= main_sdram_inti_p0_wrdata_en; + main_sdram_master_p0_wrdata_mask <= main_sdram_inti_p0_wrdata_mask; + main_sdram_master_p0_rddata_en <= main_sdram_inti_p0_rddata_en; + main_sdram_inti_p0_rddata <= main_sdram_master_p0_rddata; + main_sdram_inti_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; + main_sdram_master_p1_address <= main_sdram_inti_p1_address; + main_sdram_master_p1_bank <= main_sdram_inti_p1_bank; + main_sdram_master_p1_cas_n <= main_sdram_inti_p1_cas_n; + main_sdram_master_p1_cs_n <= main_sdram_inti_p1_cs_n; + main_sdram_master_p1_ras_n <= main_sdram_inti_p1_ras_n; + main_sdram_master_p1_we_n <= main_sdram_inti_p1_we_n; + main_sdram_master_p1_cke <= main_sdram_inti_p1_cke; + main_sdram_master_p1_odt <= main_sdram_inti_p1_odt; + main_sdram_master_p1_reset_n <= main_sdram_inti_p1_reset_n; + main_sdram_master_p1_act_n <= main_sdram_inti_p1_act_n; + main_sdram_master_p1_wrdata <= main_sdram_inti_p1_wrdata; + main_sdram_master_p1_wrdata_en <= main_sdram_inti_p1_wrdata_en; + main_sdram_master_p1_wrdata_mask <= main_sdram_inti_p1_wrdata_mask; + main_sdram_master_p1_rddata_en <= main_sdram_inti_p1_rddata_en; + main_sdram_inti_p1_rddata <= main_sdram_master_p1_rddata; + main_sdram_inti_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; + main_sdram_master_p2_address <= main_sdram_inti_p2_address; + main_sdram_master_p2_bank <= main_sdram_inti_p2_bank; + main_sdram_master_p2_cas_n <= main_sdram_inti_p2_cas_n; + main_sdram_master_p2_cs_n <= main_sdram_inti_p2_cs_n; + main_sdram_master_p2_ras_n <= main_sdram_inti_p2_ras_n; + main_sdram_master_p2_we_n <= main_sdram_inti_p2_we_n; + main_sdram_master_p2_cke <= main_sdram_inti_p2_cke; + main_sdram_master_p2_odt <= main_sdram_inti_p2_odt; + main_sdram_master_p2_reset_n <= main_sdram_inti_p2_reset_n; + main_sdram_master_p2_act_n <= main_sdram_inti_p2_act_n; + main_sdram_master_p2_wrdata <= main_sdram_inti_p2_wrdata; + main_sdram_master_p2_wrdata_en <= main_sdram_inti_p2_wrdata_en; + main_sdram_master_p2_wrdata_mask <= main_sdram_inti_p2_wrdata_mask; + main_sdram_master_p2_rddata_en <= main_sdram_inti_p2_rddata_en; + main_sdram_inti_p2_rddata <= main_sdram_master_p2_rddata; + main_sdram_inti_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; + main_sdram_master_p3_address <= main_sdram_inti_p3_address; + main_sdram_master_p3_bank <= main_sdram_inti_p3_bank; + main_sdram_master_p3_cas_n <= main_sdram_inti_p3_cas_n; + main_sdram_master_p3_cs_n <= main_sdram_inti_p3_cs_n; + main_sdram_master_p3_ras_n <= main_sdram_inti_p3_ras_n; + main_sdram_master_p3_we_n <= main_sdram_inti_p3_we_n; + main_sdram_master_p3_cke <= main_sdram_inti_p3_cke; + main_sdram_master_p3_odt <= main_sdram_inti_p3_odt; + main_sdram_master_p3_reset_n <= main_sdram_inti_p3_reset_n; + main_sdram_master_p3_act_n <= main_sdram_inti_p3_act_n; + main_sdram_master_p3_wrdata <= main_sdram_inti_p3_wrdata; + main_sdram_master_p3_wrdata_en <= main_sdram_inti_p3_wrdata_en; + main_sdram_master_p3_wrdata_mask <= main_sdram_inti_p3_wrdata_mask; + main_sdram_master_p3_rddata_en <= main_sdram_inti_p3_rddata_en; + main_sdram_inti_p3_rddata <= main_sdram_master_p3_rddata; + main_sdram_inti_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; + end + end + assign main_sdram_inti_p0_cke = main_sdram_storage[1]; + assign main_sdram_inti_p1_cke = main_sdram_storage[1]; + assign main_sdram_inti_p2_cke = main_sdram_storage[1]; + assign main_sdram_inti_p3_cke = main_sdram_storage[1]; + assign main_sdram_inti_p0_odt = main_sdram_storage[2]; + assign main_sdram_inti_p1_odt = main_sdram_storage[2]; + assign main_sdram_inti_p2_odt = main_sdram_storage[2]; + assign main_sdram_inti_p3_odt = main_sdram_storage[2]; + assign main_sdram_inti_p0_reset_n = main_sdram_storage[3]; + assign main_sdram_inti_p1_reset_n = main_sdram_storage[3]; + assign main_sdram_inti_p2_reset_n = main_sdram_storage[3]; + assign main_sdram_inti_p3_reset_n = main_sdram_storage[3]; + always @(*) begin + main_sdram_inti_p0_we_n <= 1'd1; + main_sdram_inti_p0_cas_n <= 1'd1; + main_sdram_inti_p0_cs_n <= 1'd1; + main_sdram_inti_p0_ras_n <= 1'd1; + if (main_sdram_phaseinjector0_command_issue_re) begin + main_sdram_inti_p0_cs_n <= {1{(~main_sdram_phaseinjector0_command_storage[0])}}; + main_sdram_inti_p0_we_n <= (~main_sdram_phaseinjector0_command_storage[1]); + main_sdram_inti_p0_cas_n <= (~main_sdram_phaseinjector0_command_storage[2]); + main_sdram_inti_p0_ras_n <= (~main_sdram_phaseinjector0_command_storage[3]); + end else begin + main_sdram_inti_p0_cs_n <= {1{1'd1}}; + main_sdram_inti_p0_we_n <= 1'd1; + main_sdram_inti_p0_cas_n <= 1'd1; + main_sdram_inti_p0_ras_n <= 1'd1; + end + end + assign main_sdram_inti_p0_address = main_sdram_phaseinjector0_address_storage; + assign main_sdram_inti_p0_bank = main_sdram_phaseinjector0_baddress_storage; + assign main_sdram_inti_p0_wrdata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[4]); + assign main_sdram_inti_p0_rddata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[5]); + assign main_sdram_inti_p0_wrdata = main_sdram_phaseinjector0_wrdata_storage; + assign main_sdram_inti_p0_wrdata_mask = 1'd0; + always @(*) begin + main_sdram_inti_p1_we_n <= 1'd1; + main_sdram_inti_p1_cas_n <= 1'd1; + main_sdram_inti_p1_cs_n <= 1'd1; + main_sdram_inti_p1_ras_n <= 1'd1; + if (main_sdram_phaseinjector1_command_issue_re) begin + main_sdram_inti_p1_cs_n <= {1{(~main_sdram_phaseinjector1_command_storage[0])}}; + main_sdram_inti_p1_we_n <= (~main_sdram_phaseinjector1_command_storage[1]); + main_sdram_inti_p1_cas_n <= (~main_sdram_phaseinjector1_command_storage[2]); + main_sdram_inti_p1_ras_n <= (~main_sdram_phaseinjector1_command_storage[3]); + end else begin + main_sdram_inti_p1_cs_n <= {1{1'd1}}; + main_sdram_inti_p1_we_n <= 1'd1; + main_sdram_inti_p1_cas_n <= 1'd1; + main_sdram_inti_p1_ras_n <= 1'd1; + end + end + assign main_sdram_inti_p1_address = main_sdram_phaseinjector1_address_storage; + assign main_sdram_inti_p1_bank = main_sdram_phaseinjector1_baddress_storage; + assign main_sdram_inti_p1_wrdata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[4]); + assign main_sdram_inti_p1_rddata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[5]); + assign main_sdram_inti_p1_wrdata = main_sdram_phaseinjector1_wrdata_storage; + assign main_sdram_inti_p1_wrdata_mask = 1'd0; + always @(*) begin + main_sdram_inti_p2_we_n <= 1'd1; + main_sdram_inti_p2_cas_n <= 1'd1; + main_sdram_inti_p2_cs_n <= 1'd1; + main_sdram_inti_p2_ras_n <= 1'd1; + if (main_sdram_phaseinjector2_command_issue_re) begin + main_sdram_inti_p2_cs_n <= {1{(~main_sdram_phaseinjector2_command_storage[0])}}; + main_sdram_inti_p2_we_n <= (~main_sdram_phaseinjector2_command_storage[1]); + main_sdram_inti_p2_cas_n <= (~main_sdram_phaseinjector2_command_storage[2]); + main_sdram_inti_p2_ras_n <= (~main_sdram_phaseinjector2_command_storage[3]); + end else begin + main_sdram_inti_p2_cs_n <= {1{1'd1}}; + main_sdram_inti_p2_we_n <= 1'd1; + main_sdram_inti_p2_cas_n <= 1'd1; + main_sdram_inti_p2_ras_n <= 1'd1; + end + end + assign main_sdram_inti_p2_address = main_sdram_phaseinjector2_address_storage; + assign main_sdram_inti_p2_bank = main_sdram_phaseinjector2_baddress_storage; + assign main_sdram_inti_p2_wrdata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[4]); + assign main_sdram_inti_p2_rddata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[5]); + assign main_sdram_inti_p2_wrdata = main_sdram_phaseinjector2_wrdata_storage; + assign main_sdram_inti_p2_wrdata_mask = 1'd0; + always @(*) begin + main_sdram_inti_p3_we_n <= 1'd1; + main_sdram_inti_p3_cas_n <= 1'd1; + main_sdram_inti_p3_cs_n <= 1'd1; + main_sdram_inti_p3_ras_n <= 1'd1; + if (main_sdram_phaseinjector3_command_issue_re) begin + main_sdram_inti_p3_cs_n <= {1{(~main_sdram_phaseinjector3_command_storage[0])}}; + main_sdram_inti_p3_we_n <= (~main_sdram_phaseinjector3_command_storage[1]); + main_sdram_inti_p3_cas_n <= (~main_sdram_phaseinjector3_command_storage[2]); + main_sdram_inti_p3_ras_n <= (~main_sdram_phaseinjector3_command_storage[3]); + end else begin + main_sdram_inti_p3_cs_n <= {1{1'd1}}; + main_sdram_inti_p3_we_n <= 1'd1; + main_sdram_inti_p3_cas_n <= 1'd1; + main_sdram_inti_p3_ras_n <= 1'd1; + end + end + assign main_sdram_inti_p3_address = main_sdram_phaseinjector3_address_storage; + assign main_sdram_inti_p3_bank = main_sdram_phaseinjector3_baddress_storage; + assign main_sdram_inti_p3_wrdata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[4]); + assign main_sdram_inti_p3_rddata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[5]); + assign main_sdram_inti_p3_wrdata = main_sdram_phaseinjector3_wrdata_storage; + assign main_sdram_inti_p3_wrdata_mask = 1'd0; + assign main_sdram_bankmachine0_req_valid = main_sdram_interface_bank0_valid; + assign main_sdram_interface_bank0_ready = main_sdram_bankmachine0_req_ready; + assign main_sdram_bankmachine0_req_we = main_sdram_interface_bank0_we; + assign main_sdram_bankmachine0_req_addr = main_sdram_interface_bank0_addr; + assign main_sdram_interface_bank0_lock = main_sdram_bankmachine0_req_lock; + assign main_sdram_interface_bank0_wdata_ready = main_sdram_bankmachine0_req_wdata_ready; + assign main_sdram_interface_bank0_rdata_valid = main_sdram_bankmachine0_req_rdata_valid; + assign main_sdram_bankmachine1_req_valid = main_sdram_interface_bank1_valid; + assign main_sdram_interface_bank1_ready = main_sdram_bankmachine1_req_ready; + assign main_sdram_bankmachine1_req_we = main_sdram_interface_bank1_we; + assign main_sdram_bankmachine1_req_addr = main_sdram_interface_bank1_addr; + assign main_sdram_interface_bank1_lock = main_sdram_bankmachine1_req_lock; + assign main_sdram_interface_bank1_wdata_ready = main_sdram_bankmachine1_req_wdata_ready; + assign main_sdram_interface_bank1_rdata_valid = main_sdram_bankmachine1_req_rdata_valid; + assign main_sdram_bankmachine2_req_valid = main_sdram_interface_bank2_valid; + assign main_sdram_interface_bank2_ready = main_sdram_bankmachine2_req_ready; + assign main_sdram_bankmachine2_req_we = main_sdram_interface_bank2_we; + assign main_sdram_bankmachine2_req_addr = main_sdram_interface_bank2_addr; + assign main_sdram_interface_bank2_lock = main_sdram_bankmachine2_req_lock; + assign main_sdram_interface_bank2_wdata_ready = main_sdram_bankmachine2_req_wdata_ready; + assign main_sdram_interface_bank2_rdata_valid = main_sdram_bankmachine2_req_rdata_valid; + assign main_sdram_bankmachine3_req_valid = main_sdram_interface_bank3_valid; + assign main_sdram_interface_bank3_ready = main_sdram_bankmachine3_req_ready; + assign main_sdram_bankmachine3_req_we = main_sdram_interface_bank3_we; + assign main_sdram_bankmachine3_req_addr = main_sdram_interface_bank3_addr; + assign main_sdram_interface_bank3_lock = main_sdram_bankmachine3_req_lock; + assign main_sdram_interface_bank3_wdata_ready = main_sdram_bankmachine3_req_wdata_ready; + assign main_sdram_interface_bank3_rdata_valid = main_sdram_bankmachine3_req_rdata_valid; + assign main_sdram_bankmachine4_req_valid = main_sdram_interface_bank4_valid; + assign main_sdram_interface_bank4_ready = main_sdram_bankmachine4_req_ready; + assign main_sdram_bankmachine4_req_we = main_sdram_interface_bank4_we; + assign main_sdram_bankmachine4_req_addr = main_sdram_interface_bank4_addr; + assign main_sdram_interface_bank4_lock = main_sdram_bankmachine4_req_lock; + assign main_sdram_interface_bank4_wdata_ready = main_sdram_bankmachine4_req_wdata_ready; + assign main_sdram_interface_bank4_rdata_valid = main_sdram_bankmachine4_req_rdata_valid; + assign main_sdram_bankmachine5_req_valid = main_sdram_interface_bank5_valid; + assign main_sdram_interface_bank5_ready = main_sdram_bankmachine5_req_ready; + assign main_sdram_bankmachine5_req_we = main_sdram_interface_bank5_we; + assign main_sdram_bankmachine5_req_addr = main_sdram_interface_bank5_addr; + assign main_sdram_interface_bank5_lock = main_sdram_bankmachine5_req_lock; + assign main_sdram_interface_bank5_wdata_ready = main_sdram_bankmachine5_req_wdata_ready; + assign main_sdram_interface_bank5_rdata_valid = main_sdram_bankmachine5_req_rdata_valid; + assign main_sdram_bankmachine6_req_valid = main_sdram_interface_bank6_valid; + assign main_sdram_interface_bank6_ready = main_sdram_bankmachine6_req_ready; + assign main_sdram_bankmachine6_req_we = main_sdram_interface_bank6_we; + assign main_sdram_bankmachine6_req_addr = main_sdram_interface_bank6_addr; + assign main_sdram_interface_bank6_lock = main_sdram_bankmachine6_req_lock; + assign main_sdram_interface_bank6_wdata_ready = main_sdram_bankmachine6_req_wdata_ready; + assign main_sdram_interface_bank6_rdata_valid = main_sdram_bankmachine6_req_rdata_valid; + assign main_sdram_bankmachine7_req_valid = main_sdram_interface_bank7_valid; + assign main_sdram_interface_bank7_ready = main_sdram_bankmachine7_req_ready; + assign main_sdram_bankmachine7_req_we = main_sdram_interface_bank7_we; + assign main_sdram_bankmachine7_req_addr = main_sdram_interface_bank7_addr; + assign main_sdram_interface_bank7_lock = main_sdram_bankmachine7_req_lock; + assign main_sdram_interface_bank7_wdata_ready = main_sdram_bankmachine7_req_wdata_ready; + assign main_sdram_interface_bank7_rdata_valid = main_sdram_bankmachine7_req_rdata_valid; + assign main_sdram_timer_wait = (~main_sdram_timer_done0); + assign main_sdram_postponer_req_i = main_sdram_timer_done0; + assign main_sdram_wants_refresh = main_sdram_postponer_req_o; + assign main_sdram_wants_zqcs = main_sdram_zqcs_timer_done0; + assign main_sdram_zqcs_timer_wait = (~main_sdram_zqcs_executer_done); + assign main_sdram_timer_done1 = (main_sdram_timer_count1 == 1'd0); + assign main_sdram_timer_done0 = main_sdram_timer_done1; + assign main_sdram_timer_count0 = main_sdram_timer_count1; + assign main_sdram_sequencer_start1 = (main_sdram_sequencer_start0 | (main_sdram_sequencer_count != 1'd0)); + assign main_sdram_sequencer_done0 = (main_sdram_sequencer_done1 & (main_sdram_sequencer_count == 1'd0)); + assign main_sdram_zqcs_timer_done1 = (main_sdram_zqcs_timer_count1 == 1'd0); + assign main_sdram_zqcs_timer_done0 = main_sdram_zqcs_timer_done1; + assign main_sdram_zqcs_timer_count0 = main_sdram_zqcs_timer_count1; + always @(*) begin + main_sdram_cmd_valid <= 1'd0; + builder_refresher_next_state <= 2'd0; + main_sdram_zqcs_executer_start <= 1'd0; + main_sdram_cmd_last <= 1'd0; + main_sdram_sequencer_start0 <= 1'd0; + builder_refresher_next_state <= builder_refresher_state; + case (builder_refresher_state) + 1'd1: begin + main_sdram_cmd_valid <= 1'd1; + if (main_sdram_cmd_ready) begin + main_sdram_sequencer_start0 <= 1'd1; + builder_refresher_next_state <= 2'd2; + end + end + 2'd2: begin + main_sdram_cmd_valid <= 1'd1; + if (main_sdram_sequencer_done0) begin + if (main_sdram_wants_zqcs) begin + main_sdram_zqcs_executer_start <= 1'd1; + builder_refresher_next_state <= 2'd3; + end else begin + main_sdram_cmd_valid <= 1'd0; + main_sdram_cmd_last <= 1'd1; + builder_refresher_next_state <= 1'd0; + end + end + end + 2'd3: begin + main_sdram_cmd_valid <= 1'd1; + if (main_sdram_zqcs_executer_done) begin + main_sdram_cmd_valid <= 1'd0; + main_sdram_cmd_last <= 1'd1; + builder_refresher_next_state <= 1'd0; + end + end + default: begin + if (1'd1) begin + if (main_sdram_wants_refresh) begin + builder_refresher_next_state <= 1'd1; + end + end + end + endcase + end + assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine0_req_valid; + assign main_sdram_bankmachine0_req_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine0_req_we; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine0_req_addr; + assign main_sdram_bankmachine0_cmd_buffer_sink_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine0_cmd_buffer_sink_ready; + assign main_sdram_bankmachine0_cmd_buffer_sink_first = main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine0_cmd_buffer_sink_last = main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine0_cmd_buffer_sink_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine0_cmd_buffer_sink_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine0_cmd_buffer_source_ready = (main_sdram_bankmachine0_req_wdata_ready | main_sdram_bankmachine0_req_rdata_valid); + assign main_sdram_bankmachine0_req_lock = (main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine0_cmd_buffer_source_valid); + assign main_sdram_bankmachine0_row_hit = (main_sdram_bankmachine0_row == main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine0_cmd_payload_ba = 1'd0; + always @(*) begin + main_sdram_bankmachine0_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine0_row_col_n_addr_sel) begin + main_sdram_bankmachine0_cmd_payload_a <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine0_cmd_payload_a <= ((main_sdram_bankmachine0_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine0_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine0_twtpcon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_cmd_payload_is_write); + assign main_sdram_bankmachine0_trccon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); + assign main_sdram_bankmachine0_trascon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); + always @(*) begin + main_sdram_bankmachine0_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine0_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine0_auto_precharge <= (main_sdram_bankmachine0_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din = { + main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_first = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_last = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re = main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine0_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine0_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable | main_sdram_bankmachine0_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine0_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re); + assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine0_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout = main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine0_cmd_buffer_sink_ready = ((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine0_row_open <= 1'd0; + main_sdram_bankmachine0_row_close <= 1'd0; + main_sdram_bankmachine0_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine0_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine0_cmd_payload_we <= 1'd0; + main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine0_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine0_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine0_req_wdata_ready <= 1'd0; + builder_bankmachine0_next_state <= 3'd0; + main_sdram_bankmachine0_req_rdata_valid <= 1'd0; + main_sdram_bankmachine0_refresh_gnt <= 1'd0; + main_sdram_bankmachine0_cmd_valid <= 1'd0; + builder_bankmachine0_next_state <= builder_bankmachine0_state; + case (builder_bankmachine0_state) + 1'd1: begin + if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin + main_sdram_bankmachine0_cmd_valid <= 1'd1; + if (main_sdram_bankmachine0_cmd_ready) begin + builder_bankmachine0_next_state <= 3'd5; + end + main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine0_cmd_payload_we <= 1'd1; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine0_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin + builder_bankmachine0_next_state <= 3'd5; + end + main_sdram_bankmachine0_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine0_trccon_ready) begin + main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine0_row_open <= 1'd1; + main_sdram_bankmachine0_cmd_valid <= 1'd1; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine0_cmd_ready) begin + builder_bankmachine0_next_state <= 3'd6; + end + main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine0_twtpcon_ready) begin + main_sdram_bankmachine0_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine0_row_close <= 1'd1; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine0_refresh_req)) begin + builder_bankmachine0_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine0_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine0_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine0_refresh_req) begin + builder_bankmachine0_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine0_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine0_row_opened) begin + if (main_sdram_bankmachine0_row_hit) begin + main_sdram_bankmachine0_cmd_valid <= 1'd1; + if (main_sdram_bankmachine0_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine0_req_wdata_ready <= main_sdram_bankmachine0_cmd_ready; + main_sdram_bankmachine0_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine0_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine0_req_rdata_valid <= main_sdram_bankmachine0_cmd_ready; + main_sdram_bankmachine0_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine0_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine0_cmd_ready & main_sdram_bankmachine0_auto_precharge)) begin + builder_bankmachine0_next_state <= 2'd2; + end + end else begin + builder_bankmachine0_next_state <= 1'd1; + end + end else begin + builder_bankmachine0_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine1_req_valid; + assign main_sdram_bankmachine1_req_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine1_req_we; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine1_req_addr; + assign main_sdram_bankmachine1_cmd_buffer_sink_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine1_cmd_buffer_sink_ready; + assign main_sdram_bankmachine1_cmd_buffer_sink_first = main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine1_cmd_buffer_sink_last = main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine1_cmd_buffer_sink_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine1_cmd_buffer_sink_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine1_cmd_buffer_source_ready = (main_sdram_bankmachine1_req_wdata_ready | main_sdram_bankmachine1_req_rdata_valid); + assign main_sdram_bankmachine1_req_lock = (main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine1_cmd_buffer_source_valid); + assign main_sdram_bankmachine1_row_hit = (main_sdram_bankmachine1_row == main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine1_cmd_payload_ba = 1'd1; + always @(*) begin + main_sdram_bankmachine1_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine1_row_col_n_addr_sel) begin + main_sdram_bankmachine1_cmd_payload_a <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine1_cmd_payload_a <= ((main_sdram_bankmachine1_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine1_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine1_twtpcon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_cmd_payload_is_write); + assign main_sdram_bankmachine1_trccon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); + assign main_sdram_bankmachine1_trascon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); + always @(*) begin + main_sdram_bankmachine1_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine1_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine1_auto_precharge <= (main_sdram_bankmachine1_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din = { + main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_first = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_last = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re = main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine1_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine1_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable | main_sdram_bankmachine1_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine1_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re); + assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine1_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout = main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine1_cmd_buffer_sink_ready = ((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine1_row_open <= 1'd0; + main_sdram_bankmachine1_row_close <= 1'd0; + main_sdram_bankmachine1_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine1_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine1_cmd_payload_we <= 1'd0; + main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine1_cmd_payload_is_read <= 1'd0; + builder_bankmachine1_next_state <= 3'd0; + main_sdram_bankmachine1_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine1_req_wdata_ready <= 1'd0; + main_sdram_bankmachine1_req_rdata_valid <= 1'd0; + main_sdram_bankmachine1_refresh_gnt <= 1'd0; + main_sdram_bankmachine1_cmd_valid <= 1'd0; + builder_bankmachine1_next_state <= builder_bankmachine1_state; + case (builder_bankmachine1_state) + 1'd1: begin + if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin + main_sdram_bankmachine1_cmd_valid <= 1'd1; + if (main_sdram_bankmachine1_cmd_ready) begin + builder_bankmachine1_next_state <= 3'd5; + end + main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine1_cmd_payload_we <= 1'd1; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine1_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin + builder_bankmachine1_next_state <= 3'd5; + end + main_sdram_bankmachine1_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine1_trccon_ready) begin + main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine1_row_open <= 1'd1; + main_sdram_bankmachine1_cmd_valid <= 1'd1; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine1_cmd_ready) begin + builder_bankmachine1_next_state <= 3'd6; + end + main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine1_twtpcon_ready) begin + main_sdram_bankmachine1_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine1_row_close <= 1'd1; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine1_refresh_req)) begin + builder_bankmachine1_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine1_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine1_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine1_refresh_req) begin + builder_bankmachine1_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine1_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine1_row_opened) begin + if (main_sdram_bankmachine1_row_hit) begin + main_sdram_bankmachine1_cmd_valid <= 1'd1; + if (main_sdram_bankmachine1_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine1_req_wdata_ready <= main_sdram_bankmachine1_cmd_ready; + main_sdram_bankmachine1_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine1_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine1_req_rdata_valid <= main_sdram_bankmachine1_cmd_ready; + main_sdram_bankmachine1_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine1_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine1_cmd_ready & main_sdram_bankmachine1_auto_precharge)) begin + builder_bankmachine1_next_state <= 2'd2; + end + end else begin + builder_bankmachine1_next_state <= 1'd1; + end + end else begin + builder_bankmachine1_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine2_req_valid; + assign main_sdram_bankmachine2_req_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine2_req_we; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine2_req_addr; + assign main_sdram_bankmachine2_cmd_buffer_sink_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine2_cmd_buffer_sink_ready; + assign main_sdram_bankmachine2_cmd_buffer_sink_first = main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine2_cmd_buffer_sink_last = main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine2_cmd_buffer_sink_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine2_cmd_buffer_sink_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine2_cmd_buffer_source_ready = (main_sdram_bankmachine2_req_wdata_ready | main_sdram_bankmachine2_req_rdata_valid); + assign main_sdram_bankmachine2_req_lock = (main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine2_cmd_buffer_source_valid); + assign main_sdram_bankmachine2_row_hit = (main_sdram_bankmachine2_row == main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine2_cmd_payload_ba = 2'd2; + always @(*) begin + main_sdram_bankmachine2_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine2_row_col_n_addr_sel) begin + main_sdram_bankmachine2_cmd_payload_a <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine2_cmd_payload_a <= ((main_sdram_bankmachine2_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine2_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine2_twtpcon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_cmd_payload_is_write); + assign main_sdram_bankmachine2_trccon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); + assign main_sdram_bankmachine2_trascon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); + always @(*) begin + main_sdram_bankmachine2_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine2_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine2_auto_precharge <= (main_sdram_bankmachine2_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din = { + main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_first = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_last = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re = main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine2_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine2_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable | main_sdram_bankmachine2_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine2_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re); + assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine2_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout = main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine2_cmd_buffer_sink_ready = ((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine2_row_open <= 1'd0; + main_sdram_bankmachine2_row_close <= 1'd0; + main_sdram_bankmachine2_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine2_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine2_cmd_payload_we <= 1'd0; + main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd0; + builder_bankmachine2_next_state <= 3'd0; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine2_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine2_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine2_req_wdata_ready <= 1'd0; + main_sdram_bankmachine2_req_rdata_valid <= 1'd0; + main_sdram_bankmachine2_refresh_gnt <= 1'd0; + main_sdram_bankmachine2_cmd_valid <= 1'd0; + builder_bankmachine2_next_state <= builder_bankmachine2_state; + case (builder_bankmachine2_state) + 1'd1: begin + if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin + main_sdram_bankmachine2_cmd_valid <= 1'd1; + if (main_sdram_bankmachine2_cmd_ready) begin + builder_bankmachine2_next_state <= 3'd5; + end + main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine2_cmd_payload_we <= 1'd1; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine2_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin + builder_bankmachine2_next_state <= 3'd5; + end + main_sdram_bankmachine2_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine2_trccon_ready) begin + main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine2_row_open <= 1'd1; + main_sdram_bankmachine2_cmd_valid <= 1'd1; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine2_cmd_ready) begin + builder_bankmachine2_next_state <= 3'd6; + end + main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine2_twtpcon_ready) begin + main_sdram_bankmachine2_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine2_row_close <= 1'd1; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine2_refresh_req)) begin + builder_bankmachine2_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine2_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine2_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine2_refresh_req) begin + builder_bankmachine2_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine2_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine2_row_opened) begin + if (main_sdram_bankmachine2_row_hit) begin + main_sdram_bankmachine2_cmd_valid <= 1'd1; + if (main_sdram_bankmachine2_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine2_req_wdata_ready <= main_sdram_bankmachine2_cmd_ready; + main_sdram_bankmachine2_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine2_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine2_req_rdata_valid <= main_sdram_bankmachine2_cmd_ready; + main_sdram_bankmachine2_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine2_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine2_cmd_ready & main_sdram_bankmachine2_auto_precharge)) begin + builder_bankmachine2_next_state <= 2'd2; + end + end else begin + builder_bankmachine2_next_state <= 1'd1; + end + end else begin + builder_bankmachine2_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine3_req_valid; + assign main_sdram_bankmachine3_req_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine3_req_we; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine3_req_addr; + assign main_sdram_bankmachine3_cmd_buffer_sink_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine3_cmd_buffer_sink_ready; + assign main_sdram_bankmachine3_cmd_buffer_sink_first = main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine3_cmd_buffer_sink_last = main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine3_cmd_buffer_sink_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine3_cmd_buffer_sink_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine3_cmd_buffer_source_ready = (main_sdram_bankmachine3_req_wdata_ready | main_sdram_bankmachine3_req_rdata_valid); + assign main_sdram_bankmachine3_req_lock = (main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine3_cmd_buffer_source_valid); + assign main_sdram_bankmachine3_row_hit = (main_sdram_bankmachine3_row == main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine3_cmd_payload_ba = 2'd3; + always @(*) begin + main_sdram_bankmachine3_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine3_row_col_n_addr_sel) begin + main_sdram_bankmachine3_cmd_payload_a <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine3_cmd_payload_a <= ((main_sdram_bankmachine3_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine3_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine3_twtpcon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_cmd_payload_is_write); + assign main_sdram_bankmachine3_trccon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); + assign main_sdram_bankmachine3_trascon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); + always @(*) begin + main_sdram_bankmachine3_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine3_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine3_auto_precharge <= (main_sdram_bankmachine3_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din = { + main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_first = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_last = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re = main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine3_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine3_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable | main_sdram_bankmachine3_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine3_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re); + assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine3_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout = main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine3_cmd_buffer_sink_ready = ((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine3_row_open <= 1'd0; + main_sdram_bankmachine3_row_close <= 1'd0; + main_sdram_bankmachine3_cmd_payload_cas <= 1'd0; + builder_bankmachine3_next_state <= 3'd0; + main_sdram_bankmachine3_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine3_cmd_payload_we <= 1'd0; + main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine3_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine3_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine3_req_wdata_ready <= 1'd0; + main_sdram_bankmachine3_req_rdata_valid <= 1'd0; + main_sdram_bankmachine3_refresh_gnt <= 1'd0; + main_sdram_bankmachine3_cmd_valid <= 1'd0; + builder_bankmachine3_next_state <= builder_bankmachine3_state; + case (builder_bankmachine3_state) + 1'd1: begin + if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin + main_sdram_bankmachine3_cmd_valid <= 1'd1; + if (main_sdram_bankmachine3_cmd_ready) begin + builder_bankmachine3_next_state <= 3'd5; + end + main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine3_cmd_payload_we <= 1'd1; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine3_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin + builder_bankmachine3_next_state <= 3'd5; + end + main_sdram_bankmachine3_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine3_trccon_ready) begin + main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine3_row_open <= 1'd1; + main_sdram_bankmachine3_cmd_valid <= 1'd1; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine3_cmd_ready) begin + builder_bankmachine3_next_state <= 3'd6; + end + main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine3_twtpcon_ready) begin + main_sdram_bankmachine3_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine3_row_close <= 1'd1; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine3_refresh_req)) begin + builder_bankmachine3_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine3_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine3_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine3_refresh_req) begin + builder_bankmachine3_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine3_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine3_row_opened) begin + if (main_sdram_bankmachine3_row_hit) begin + main_sdram_bankmachine3_cmd_valid <= 1'd1; + if (main_sdram_bankmachine3_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine3_req_wdata_ready <= main_sdram_bankmachine3_cmd_ready; + main_sdram_bankmachine3_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine3_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine3_req_rdata_valid <= main_sdram_bankmachine3_cmd_ready; + main_sdram_bankmachine3_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine3_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine3_cmd_ready & main_sdram_bankmachine3_auto_precharge)) begin + builder_bankmachine3_next_state <= 2'd2; + end + end else begin + builder_bankmachine3_next_state <= 1'd1; + end + end else begin + builder_bankmachine3_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine4_req_valid; + assign main_sdram_bankmachine4_req_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine4_req_we; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine4_req_addr; + assign main_sdram_bankmachine4_cmd_buffer_sink_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine4_cmd_buffer_sink_ready; + assign main_sdram_bankmachine4_cmd_buffer_sink_first = main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine4_cmd_buffer_sink_last = main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine4_cmd_buffer_sink_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine4_cmd_buffer_sink_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine4_cmd_buffer_source_ready = (main_sdram_bankmachine4_req_wdata_ready | main_sdram_bankmachine4_req_rdata_valid); + assign main_sdram_bankmachine4_req_lock = (main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine4_cmd_buffer_source_valid); + assign main_sdram_bankmachine4_row_hit = (main_sdram_bankmachine4_row == main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine4_cmd_payload_ba = 3'd4; + always @(*) begin + main_sdram_bankmachine4_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine4_row_col_n_addr_sel) begin + main_sdram_bankmachine4_cmd_payload_a <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine4_cmd_payload_a <= ((main_sdram_bankmachine4_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine4_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine4_twtpcon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_cmd_payload_is_write); + assign main_sdram_bankmachine4_trccon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); + assign main_sdram_bankmachine4_trascon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); + always @(*) begin + main_sdram_bankmachine4_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine4_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine4_auto_precharge <= (main_sdram_bankmachine4_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din = { + main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_first = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_last = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re = main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine4_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine4_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable | main_sdram_bankmachine4_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine4_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re); + assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine4_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout = main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine4_cmd_buffer_sink_ready = ((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine4_row_open <= 1'd0; + main_sdram_bankmachine4_row_close <= 1'd0; + builder_bankmachine4_next_state <= 3'd0; + main_sdram_bankmachine4_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine4_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine4_cmd_payload_we <= 1'd0; + main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine4_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine4_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine4_req_wdata_ready <= 1'd0; + main_sdram_bankmachine4_req_rdata_valid <= 1'd0; + main_sdram_bankmachine4_refresh_gnt <= 1'd0; + main_sdram_bankmachine4_cmd_valid <= 1'd0; + builder_bankmachine4_next_state <= builder_bankmachine4_state; + case (builder_bankmachine4_state) + 1'd1: begin + if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin + main_sdram_bankmachine4_cmd_valid <= 1'd1; + if (main_sdram_bankmachine4_cmd_ready) begin + builder_bankmachine4_next_state <= 3'd5; + end + main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine4_cmd_payload_we <= 1'd1; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine4_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin + builder_bankmachine4_next_state <= 3'd5; + end + main_sdram_bankmachine4_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine4_trccon_ready) begin + main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine4_row_open <= 1'd1; + main_sdram_bankmachine4_cmd_valid <= 1'd1; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine4_cmd_ready) begin + builder_bankmachine4_next_state <= 3'd6; + end + main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine4_twtpcon_ready) begin + main_sdram_bankmachine4_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine4_row_close <= 1'd1; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine4_refresh_req)) begin + builder_bankmachine4_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine4_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine4_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine4_refresh_req) begin + builder_bankmachine4_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine4_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine4_row_opened) begin + if (main_sdram_bankmachine4_row_hit) begin + main_sdram_bankmachine4_cmd_valid <= 1'd1; + if (main_sdram_bankmachine4_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine4_req_wdata_ready <= main_sdram_bankmachine4_cmd_ready; + main_sdram_bankmachine4_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine4_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine4_req_rdata_valid <= main_sdram_bankmachine4_cmd_ready; + main_sdram_bankmachine4_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine4_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine4_cmd_ready & main_sdram_bankmachine4_auto_precharge)) begin + builder_bankmachine4_next_state <= 2'd2; + end + end else begin + builder_bankmachine4_next_state <= 1'd1; + end + end else begin + builder_bankmachine4_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine5_req_valid; + assign main_sdram_bankmachine5_req_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine5_req_we; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine5_req_addr; + assign main_sdram_bankmachine5_cmd_buffer_sink_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine5_cmd_buffer_sink_ready; + assign main_sdram_bankmachine5_cmd_buffer_sink_first = main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine5_cmd_buffer_sink_last = main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine5_cmd_buffer_sink_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine5_cmd_buffer_sink_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine5_cmd_buffer_source_ready = (main_sdram_bankmachine5_req_wdata_ready | main_sdram_bankmachine5_req_rdata_valid); + assign main_sdram_bankmachine5_req_lock = (main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine5_cmd_buffer_source_valid); + assign main_sdram_bankmachine5_row_hit = (main_sdram_bankmachine5_row == main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine5_cmd_payload_ba = 3'd5; + always @(*) begin + main_sdram_bankmachine5_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine5_row_col_n_addr_sel) begin + main_sdram_bankmachine5_cmd_payload_a <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine5_cmd_payload_a <= ((main_sdram_bankmachine5_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine5_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine5_twtpcon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_cmd_payload_is_write); + assign main_sdram_bankmachine5_trccon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); + assign main_sdram_bankmachine5_trascon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); + always @(*) begin + main_sdram_bankmachine5_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine5_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine5_auto_precharge <= (main_sdram_bankmachine5_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din = { + main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_first = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_last = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re = main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine5_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine5_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable | main_sdram_bankmachine5_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine5_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re); + assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine5_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout = main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine5_cmd_buffer_sink_ready = ((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready); + always @(*) begin + builder_bankmachine5_next_state <= 3'd0; + main_sdram_bankmachine5_row_open <= 1'd0; + main_sdram_bankmachine5_row_close <= 1'd0; + main_sdram_bankmachine5_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine5_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine5_cmd_payload_we <= 1'd0; + main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine5_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine5_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine5_req_wdata_ready <= 1'd0; + main_sdram_bankmachine5_req_rdata_valid <= 1'd0; + main_sdram_bankmachine5_refresh_gnt <= 1'd0; + main_sdram_bankmachine5_cmd_valid <= 1'd0; + builder_bankmachine5_next_state <= builder_bankmachine5_state; + case (builder_bankmachine5_state) + 1'd1: begin + if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin + main_sdram_bankmachine5_cmd_valid <= 1'd1; + if (main_sdram_bankmachine5_cmd_ready) begin + builder_bankmachine5_next_state <= 3'd5; + end + main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine5_cmd_payload_we <= 1'd1; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine5_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin + builder_bankmachine5_next_state <= 3'd5; + end + main_sdram_bankmachine5_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine5_trccon_ready) begin + main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine5_row_open <= 1'd1; + main_sdram_bankmachine5_cmd_valid <= 1'd1; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine5_cmd_ready) begin + builder_bankmachine5_next_state <= 3'd6; + end + main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine5_twtpcon_ready) begin + main_sdram_bankmachine5_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine5_row_close <= 1'd1; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine5_refresh_req)) begin + builder_bankmachine5_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine5_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine5_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine5_refresh_req) begin + builder_bankmachine5_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine5_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine5_row_opened) begin + if (main_sdram_bankmachine5_row_hit) begin + main_sdram_bankmachine5_cmd_valid <= 1'd1; + if (main_sdram_bankmachine5_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine5_req_wdata_ready <= main_sdram_bankmachine5_cmd_ready; + main_sdram_bankmachine5_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine5_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine5_req_rdata_valid <= main_sdram_bankmachine5_cmd_ready; + main_sdram_bankmachine5_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine5_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine5_cmd_ready & main_sdram_bankmachine5_auto_precharge)) begin + builder_bankmachine5_next_state <= 2'd2; + end + end else begin + builder_bankmachine5_next_state <= 1'd1; + end + end else begin + builder_bankmachine5_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine6_req_valid; + assign main_sdram_bankmachine6_req_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine6_req_we; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine6_req_addr; + assign main_sdram_bankmachine6_cmd_buffer_sink_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine6_cmd_buffer_sink_ready; + assign main_sdram_bankmachine6_cmd_buffer_sink_first = main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine6_cmd_buffer_sink_last = main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine6_cmd_buffer_sink_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine6_cmd_buffer_sink_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine6_cmd_buffer_source_ready = (main_sdram_bankmachine6_req_wdata_ready | main_sdram_bankmachine6_req_rdata_valid); + assign main_sdram_bankmachine6_req_lock = (main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine6_cmd_buffer_source_valid); + assign main_sdram_bankmachine6_row_hit = (main_sdram_bankmachine6_row == main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine6_cmd_payload_ba = 3'd6; + always @(*) begin + main_sdram_bankmachine6_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine6_row_col_n_addr_sel) begin + main_sdram_bankmachine6_cmd_payload_a <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine6_cmd_payload_a <= ((main_sdram_bankmachine6_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine6_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine6_twtpcon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_cmd_payload_is_write); + assign main_sdram_bankmachine6_trccon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); + assign main_sdram_bankmachine6_trascon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); + always @(*) begin + main_sdram_bankmachine6_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine6_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine6_auto_precharge <= (main_sdram_bankmachine6_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din = { + main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_first = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_last = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re = main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine6_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine6_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable | main_sdram_bankmachine6_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine6_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re); + assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine6_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout = main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine6_cmd_buffer_sink_ready = ((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine6_row_open <= 1'd0; + main_sdram_bankmachine6_row_close <= 1'd0; + main_sdram_bankmachine6_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine6_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine6_cmd_payload_we <= 1'd0; + main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine6_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine6_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine6_req_wdata_ready <= 1'd0; + main_sdram_bankmachine6_req_rdata_valid <= 1'd0; + main_sdram_bankmachine6_refresh_gnt <= 1'd0; + main_sdram_bankmachine6_cmd_valid <= 1'd0; + builder_bankmachine6_next_state <= 3'd0; + builder_bankmachine6_next_state <= builder_bankmachine6_state; + case (builder_bankmachine6_state) + 1'd1: begin + if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin + main_sdram_bankmachine6_cmd_valid <= 1'd1; + if (main_sdram_bankmachine6_cmd_ready) begin + builder_bankmachine6_next_state <= 3'd5; + end + main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine6_cmd_payload_we <= 1'd1; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine6_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin + builder_bankmachine6_next_state <= 3'd5; + end + main_sdram_bankmachine6_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine6_trccon_ready) begin + main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine6_row_open <= 1'd1; + main_sdram_bankmachine6_cmd_valid <= 1'd1; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine6_cmd_ready) begin + builder_bankmachine6_next_state <= 3'd6; + end + main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine6_twtpcon_ready) begin + main_sdram_bankmachine6_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine6_row_close <= 1'd1; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine6_refresh_req)) begin + builder_bankmachine6_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine6_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine6_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine6_refresh_req) begin + builder_bankmachine6_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine6_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine6_row_opened) begin + if (main_sdram_bankmachine6_row_hit) begin + main_sdram_bankmachine6_cmd_valid <= 1'd1; + if (main_sdram_bankmachine6_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine6_req_wdata_ready <= main_sdram_bankmachine6_cmd_ready; + main_sdram_bankmachine6_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine6_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine6_req_rdata_valid <= main_sdram_bankmachine6_cmd_ready; + main_sdram_bankmachine6_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine6_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine6_cmd_ready & main_sdram_bankmachine6_auto_precharge)) begin + builder_bankmachine6_next_state <= 2'd2; + end + end else begin + builder_bankmachine6_next_state <= 1'd1; + end + end else begin + builder_bankmachine6_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine7_req_valid; + assign main_sdram_bankmachine7_req_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine7_req_we; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine7_req_addr; + assign main_sdram_bankmachine7_cmd_buffer_sink_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine7_cmd_buffer_sink_ready; + assign main_sdram_bankmachine7_cmd_buffer_sink_first = main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine7_cmd_buffer_sink_last = main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine7_cmd_buffer_sink_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine7_cmd_buffer_sink_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine7_cmd_buffer_source_ready = (main_sdram_bankmachine7_req_wdata_ready | main_sdram_bankmachine7_req_rdata_valid); + assign main_sdram_bankmachine7_req_lock = (main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine7_cmd_buffer_source_valid); + assign main_sdram_bankmachine7_row_hit = (main_sdram_bankmachine7_row == main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine7_cmd_payload_ba = 3'd7; + always @(*) begin + main_sdram_bankmachine7_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine7_row_col_n_addr_sel) begin + main_sdram_bankmachine7_cmd_payload_a <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine7_cmd_payload_a <= ((main_sdram_bankmachine7_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine7_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine7_twtpcon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_cmd_payload_is_write); + assign main_sdram_bankmachine7_trccon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); + assign main_sdram_bankmachine7_trascon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); + always @(*) begin + main_sdram_bankmachine7_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine7_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine7_auto_precharge <= (main_sdram_bankmachine7_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din = { + main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_first = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_last = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re = main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine7_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine7_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable | main_sdram_bankmachine7_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine7_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re); + assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine7_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout = main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine7_cmd_buffer_sink_ready = ((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine7_row_open <= 1'd0; + main_sdram_bankmachine7_row_close <= 1'd0; + main_sdram_bankmachine7_refresh_gnt <= 1'd0; + main_sdram_bankmachine7_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine7_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine7_cmd_payload_we <= 1'd0; + main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine7_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine7_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine7_req_wdata_ready <= 1'd0; + main_sdram_bankmachine7_req_rdata_valid <= 1'd0; + builder_bankmachine7_next_state <= 3'd0; + main_sdram_bankmachine7_cmd_valid <= 1'd0; + builder_bankmachine7_next_state <= builder_bankmachine7_state; + case (builder_bankmachine7_state) + 1'd1: begin + if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin + main_sdram_bankmachine7_cmd_valid <= 1'd1; + if (main_sdram_bankmachine7_cmd_ready) begin + builder_bankmachine7_next_state <= 3'd5; + end + main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine7_cmd_payload_we <= 1'd1; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine7_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin + builder_bankmachine7_next_state <= 3'd5; + end + main_sdram_bankmachine7_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine7_trccon_ready) begin + main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine7_row_open <= 1'd1; + main_sdram_bankmachine7_cmd_valid <= 1'd1; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine7_cmd_ready) begin + builder_bankmachine7_next_state <= 3'd6; + end + main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine7_twtpcon_ready) begin + main_sdram_bankmachine7_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine7_row_close <= 1'd1; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine7_refresh_req)) begin + builder_bankmachine7_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine7_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine7_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine7_refresh_req) begin + builder_bankmachine7_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine7_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine7_row_opened) begin + if (main_sdram_bankmachine7_row_hit) begin + main_sdram_bankmachine7_cmd_valid <= 1'd1; + if (main_sdram_bankmachine7_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine7_req_wdata_ready <= main_sdram_bankmachine7_cmd_ready; + main_sdram_bankmachine7_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine7_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine7_req_rdata_valid <= main_sdram_bankmachine7_cmd_ready; + main_sdram_bankmachine7_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine7_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine7_cmd_ready & main_sdram_bankmachine7_auto_precharge)) begin + builder_bankmachine7_next_state <= 2'd2; + end + end else begin + builder_bankmachine7_next_state <= 1'd1; + end + end else begin + builder_bankmachine7_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_trrdcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); + assign main_sdram_tfawcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); + assign main_sdram_ras_allowed = (main_sdram_trrdcon_ready & main_sdram_tfawcon_ready); + assign main_sdram_tccdcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_cmd_payload_is_write | main_sdram_choose_req_cmd_payload_is_read)); + assign main_sdram_cas_allowed = main_sdram_tccdcon_ready; + assign main_sdram_twtrcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + assign main_sdram_read_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_read) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_read)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_read)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_read)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_read)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_read)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_read)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_read)); + assign main_sdram_write_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_write) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_write)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_write)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_write)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_write)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_write)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_write)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_write)); + assign main_sdram_max_time0 = (main_sdram_time0 == 1'd0); + assign main_sdram_max_time1 = (main_sdram_time1 == 1'd0); + assign main_sdram_bankmachine0_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine1_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine2_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine3_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine4_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine5_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine6_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine7_refresh_req = main_sdram_cmd_valid; + assign main_sdram_go_to_refresh = (((((((main_sdram_bankmachine0_refresh_gnt & main_sdram_bankmachine1_refresh_gnt) & main_sdram_bankmachine2_refresh_gnt) & main_sdram_bankmachine3_refresh_gnt) & main_sdram_bankmachine4_refresh_gnt) & main_sdram_bankmachine5_refresh_gnt) & main_sdram_bankmachine6_refresh_gnt) & main_sdram_bankmachine7_refresh_gnt); + assign main_sdram_interface_rdata = { + main_sdram_dfi_p3_rddata, + main_sdram_dfi_p2_rddata, + main_sdram_dfi_p1_rddata, + main_sdram_dfi_p0_rddata + }; + assign {main_sdram_dfi_p3_wrdata, main_sdram_dfi_p2_wrdata, main_sdram_dfi_p1_wrdata, main_sdram_dfi_p0_wrdata} = main_sdram_interface_wdata; + assign {main_sdram_dfi_p3_wrdata_mask, main_sdram_dfi_p2_wrdata_mask, main_sdram_dfi_p1_wrdata_mask, main_sdram_dfi_p0_wrdata_mask} = (~main_sdram_interface_wdata_we); + always @(*) begin + main_sdram_choose_cmd_valids <= 8'd0; + main_sdram_choose_cmd_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + end + assign main_sdram_choose_cmd_request = main_sdram_choose_cmd_valids; + assign main_sdram_choose_cmd_cmd_valid = builder_rhs_array_muxed0; + assign main_sdram_choose_cmd_cmd_payload_a = builder_rhs_array_muxed1; + assign main_sdram_choose_cmd_cmd_payload_ba = builder_rhs_array_muxed2; + assign main_sdram_choose_cmd_cmd_payload_is_read = builder_rhs_array_muxed3; + assign main_sdram_choose_cmd_cmd_payload_is_write = builder_rhs_array_muxed4; + assign main_sdram_choose_cmd_cmd_payload_is_cmd = builder_rhs_array_muxed5; + always @(*) begin + main_sdram_choose_cmd_cmd_payload_cas <= 1'd0; + if (main_sdram_choose_cmd_cmd_valid) begin + main_sdram_choose_cmd_cmd_payload_cas <= builder_t_array_muxed0; + end + end + always @(*) begin + main_sdram_choose_cmd_cmd_payload_ras <= 1'd0; + if (main_sdram_choose_cmd_cmd_valid) begin + main_sdram_choose_cmd_cmd_payload_ras <= builder_t_array_muxed1; + end + end + always @(*) begin + main_sdram_choose_cmd_cmd_payload_we <= 1'd0; + if (main_sdram_choose_cmd_cmd_valid) begin + main_sdram_choose_cmd_cmd_payload_we <= builder_t_array_muxed2; + end + end + assign main_sdram_choose_cmd_ce = (main_sdram_choose_cmd_cmd_ready | (~main_sdram_choose_cmd_cmd_valid)); + always @(*) begin + main_sdram_choose_req_valids <= 8'd0; + main_sdram_choose_req_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + end + assign main_sdram_choose_req_request = main_sdram_choose_req_valids; + assign main_sdram_choose_req_cmd_valid = builder_rhs_array_muxed6; + assign main_sdram_choose_req_cmd_payload_a = builder_rhs_array_muxed7; + assign main_sdram_choose_req_cmd_payload_ba = builder_rhs_array_muxed8; + assign main_sdram_choose_req_cmd_payload_is_read = builder_rhs_array_muxed9; + assign main_sdram_choose_req_cmd_payload_is_write = builder_rhs_array_muxed10; + assign main_sdram_choose_req_cmd_payload_is_cmd = builder_rhs_array_muxed11; + always @(*) begin + main_sdram_choose_req_cmd_payload_cas <= 1'd0; + if (main_sdram_choose_req_cmd_valid) begin + main_sdram_choose_req_cmd_payload_cas <= builder_t_array_muxed3; + end + end + always @(*) begin + main_sdram_choose_req_cmd_payload_ras <= 1'd0; + if (main_sdram_choose_req_cmd_valid) begin + main_sdram_choose_req_cmd_payload_ras <= builder_t_array_muxed4; + end + end + always @(*) begin + main_sdram_choose_req_cmd_payload_we <= 1'd0; + if (main_sdram_choose_req_cmd_valid) begin + main_sdram_choose_req_cmd_payload_we <= builder_t_array_muxed5; + end + end + always @(*) begin + main_sdram_bankmachine0_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd0))) begin + main_sdram_bankmachine0_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd0))) begin + main_sdram_bankmachine0_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine1_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd1))) begin + main_sdram_bankmachine1_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd1))) begin + main_sdram_bankmachine1_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine2_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd2))) begin + main_sdram_bankmachine2_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd2))) begin + main_sdram_bankmachine2_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine3_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd3))) begin + main_sdram_bankmachine3_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd3))) begin + main_sdram_bankmachine3_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine4_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd4))) begin + main_sdram_bankmachine4_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd4))) begin + main_sdram_bankmachine4_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine5_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd5))) begin + main_sdram_bankmachine5_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd5))) begin + main_sdram_bankmachine5_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine6_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd6))) begin + main_sdram_bankmachine6_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd6))) begin + main_sdram_bankmachine6_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine7_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd7))) begin + main_sdram_bankmachine7_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd7))) begin + main_sdram_bankmachine7_cmd_ready <= 1'd1; + end + end + assign main_sdram_choose_req_ce = (main_sdram_choose_req_cmd_ready | (~main_sdram_choose_req_cmd_valid)); + assign main_sdram_dfi_p0_reset_n = 1'd1; + assign main_sdram_dfi_p0_cke = {1{main_sdram_steerer0}}; + assign main_sdram_dfi_p0_odt = {1{main_sdram_steerer1}}; + assign main_sdram_dfi_p1_reset_n = 1'd1; + assign main_sdram_dfi_p1_cke = {1{main_sdram_steerer2}}; + assign main_sdram_dfi_p1_odt = {1{main_sdram_steerer3}}; + assign main_sdram_dfi_p2_reset_n = 1'd1; + assign main_sdram_dfi_p2_cke = {1{main_sdram_steerer4}}; + assign main_sdram_dfi_p2_odt = {1{main_sdram_steerer5}}; + assign main_sdram_dfi_p3_reset_n = 1'd1; + assign main_sdram_dfi_p3_cke = {1{main_sdram_steerer6}}; + assign main_sdram_dfi_p3_odt = {1{main_sdram_steerer7}}; + assign main_sdram_tfawcon_count = (((main_sdram_tfawcon_window[0] + main_sdram_tfawcon_window[1]) + main_sdram_tfawcon_window[2]) + main_sdram_tfawcon_window[3]); + always @(*) begin + main_sdram_choose_req_cmd_ready <= 1'd0; + main_sdram_steerer_sel0 <= 2'd0; + main_sdram_steerer_sel1 <= 2'd0; + main_sdram_steerer_sel2 <= 2'd0; + main_sdram_choose_cmd_want_activates <= 1'd0; + main_sdram_en0 <= 1'd0; + main_sdram_steerer_sel3 <= 2'd0; + builder_multiplexer_next_state <= 4'd0; + main_sdram_choose_cmd_cmd_ready <= 1'd0; + main_sdram_choose_req_want_reads <= 1'd0; + main_sdram_cmd_ready <= 1'd0; + main_sdram_choose_req_want_writes <= 1'd0; + main_sdram_en1 <= 1'd0; + builder_multiplexer_next_state <= builder_multiplexer_state; + case (builder_multiplexer_state) + 1'd1: begin + main_sdram_en1 <= 1'd1; + main_sdram_choose_req_want_writes <= 1'd1; + if (1'd0) begin + main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); + end else begin + main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; + main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); + main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; + end + main_sdram_steerer_sel0 <= 1'd0; + main_sdram_steerer_sel1 <= 1'd0; + main_sdram_steerer_sel2 <= 1'd1; + main_sdram_steerer_sel3 <= 2'd2; + if (main_sdram_read_available) begin + if (((~main_sdram_write_available) | main_sdram_max_time1)) begin + builder_multiplexer_next_state <= 2'd3; + end + end + if (main_sdram_go_to_refresh) begin + builder_multiplexer_next_state <= 2'd2; + end + end + 2'd2: begin + main_sdram_steerer_sel0 <= 2'd3; + main_sdram_cmd_ready <= 1'd1; + if (main_sdram_cmd_last) begin + builder_multiplexer_next_state <= 1'd0; + end + end + 2'd3: begin + if (main_sdram_twtrcon_ready) begin + builder_multiplexer_next_state <= 1'd0; + end + end + 3'd4: begin + builder_multiplexer_next_state <= 3'd5; + end + 3'd5: begin + builder_multiplexer_next_state <= 3'd6; + end + 3'd6: begin + builder_multiplexer_next_state <= 3'd7; + end + 3'd7: begin + builder_multiplexer_next_state <= 4'd8; + end + 4'd8: begin + builder_multiplexer_next_state <= 4'd9; + end + 4'd9: begin + builder_multiplexer_next_state <= 4'd10; + end + 4'd10: begin + builder_multiplexer_next_state <= 4'd11; + end + 4'd11: begin + builder_multiplexer_next_state <= 1'd1; + end + default: begin + main_sdram_en0 <= 1'd1; + main_sdram_choose_req_want_reads <= 1'd1; + if (1'd0) begin + main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); + end else begin + main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; + main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); + main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; + end + main_sdram_steerer_sel0 <= 1'd0; + main_sdram_steerer_sel1 <= 1'd1; + main_sdram_steerer_sel2 <= 2'd2; + main_sdram_steerer_sel3 <= 1'd0; + if (main_sdram_write_available) begin + if (((~main_sdram_read_available) | main_sdram_max_time0)) begin + builder_multiplexer_next_state <= 3'd4; + end + end + if (main_sdram_go_to_refresh) begin + builder_multiplexer_next_state <= 2'd2; + end + end + endcase + end + assign builder_roundrobin0_request = { + (((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin0_ce = ((~main_sdram_interface_bank0_valid) & (~main_sdram_interface_bank0_lock)); + assign main_sdram_interface_bank0_addr = builder_rhs_array_muxed12; + assign main_sdram_interface_bank0_we = builder_rhs_array_muxed13; + assign main_sdram_interface_bank0_valid = builder_rhs_array_muxed14; + assign builder_roundrobin1_request = { + (((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin1_ce = ((~main_sdram_interface_bank1_valid) & (~main_sdram_interface_bank1_lock)); + assign main_sdram_interface_bank1_addr = builder_rhs_array_muxed15; + assign main_sdram_interface_bank1_we = builder_rhs_array_muxed16; + assign main_sdram_interface_bank1_valid = builder_rhs_array_muxed17; + assign builder_roundrobin2_request = { + (((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin2_ce = ((~main_sdram_interface_bank2_valid) & (~main_sdram_interface_bank2_lock)); + assign main_sdram_interface_bank2_addr = builder_rhs_array_muxed18; + assign main_sdram_interface_bank2_we = builder_rhs_array_muxed19; + assign main_sdram_interface_bank2_valid = builder_rhs_array_muxed20; + assign builder_roundrobin3_request = { + (((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin3_ce = ((~main_sdram_interface_bank3_valid) & (~main_sdram_interface_bank3_lock)); + assign main_sdram_interface_bank3_addr = builder_rhs_array_muxed21; + assign main_sdram_interface_bank3_we = builder_rhs_array_muxed22; + assign main_sdram_interface_bank3_valid = builder_rhs_array_muxed23; + assign builder_roundrobin4_request = { + (((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin4_ce = ((~main_sdram_interface_bank4_valid) & (~main_sdram_interface_bank4_lock)); + assign main_sdram_interface_bank4_addr = builder_rhs_array_muxed24; + assign main_sdram_interface_bank4_we = builder_rhs_array_muxed25; + assign main_sdram_interface_bank4_valid = builder_rhs_array_muxed26; + assign builder_roundrobin5_request = { + (((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin5_ce = ((~main_sdram_interface_bank5_valid) & (~main_sdram_interface_bank5_lock)); + assign main_sdram_interface_bank5_addr = builder_rhs_array_muxed27; + assign main_sdram_interface_bank5_we = builder_rhs_array_muxed28; + assign main_sdram_interface_bank5_valid = builder_rhs_array_muxed29; + assign builder_roundrobin6_request = { + (((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin6_ce = ((~main_sdram_interface_bank6_valid) & (~main_sdram_interface_bank6_lock)); + assign main_sdram_interface_bank6_addr = builder_rhs_array_muxed30; + assign main_sdram_interface_bank6_we = builder_rhs_array_muxed31; + assign main_sdram_interface_bank6_valid = builder_rhs_array_muxed32; + assign builder_roundrobin7_request = { + (((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin7_ce = ((~main_sdram_interface_bank7_valid) & (~main_sdram_interface_bank7_lock)); + assign main_sdram_interface_bank7_addr = builder_rhs_array_muxed33; + assign main_sdram_interface_bank7_we = builder_rhs_array_muxed34; + assign main_sdram_interface_bank7_valid = builder_rhs_array_muxed35; + assign main_port_cmd_ready = ((((((((1'd0 | (((builder_roundrobin0_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank0_ready)) | (((builder_roundrobin1_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank1_ready)) | (((builder_roundrobin2_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank2_ready)) | (((builder_roundrobin3_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank3_ready)) | (((builder_roundrobin4_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank4_ready)) | (((builder_roundrobin5_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank5_ready)) | (((builder_roundrobin6_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank6_ready)) | (((builder_roundrobin7_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0)))))) & main_sdram_interface_bank7_ready)); + assign main_port_wdata_ready = builder_new_master_wdata_ready2; + assign main_port_rdata_valid = builder_new_master_rdata_valid9; + always @(*) begin + main_sdram_interface_wdata <= 128'd0; + main_sdram_interface_wdata_we <= 16'd0; + case ({ + builder_new_master_wdata_ready2 + }) + 1'd1: begin + main_sdram_interface_wdata <= main_port_wdata_payload_data; + main_sdram_interface_wdata_we <= main_port_wdata_payload_we; + end + default: begin + main_sdram_interface_wdata <= 1'd0; + main_sdram_interface_wdata_we <= 1'd0; + end + endcase + end + assign main_port_rdata_payload_data = main_sdram_interface_rdata; + assign builder_roundrobin0_grant = 1'd0; + assign builder_roundrobin1_grant = 1'd0; + assign builder_roundrobin2_grant = 1'd0; + assign builder_roundrobin3_grant = 1'd0; + assign builder_roundrobin4_grant = 1'd0; + assign builder_roundrobin5_grant = 1'd0; + assign builder_roundrobin6_grant = 1'd0; + assign builder_roundrobin7_grant = 1'd0; + assign main_data_port_adr = main_interface0_wb_sdram_adr[10:2]; + always @(*) begin + main_data_port_we <= 16'd0; + main_data_port_dat_w <= 128'd0; + if (main_write_from_slave) begin + main_data_port_dat_w <= main_dat_r; + main_data_port_we <= {16{1'd1}}; + end else begin + main_data_port_dat_w <= {4{main_interface0_wb_sdram_dat_w}}; + if ((((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb) & main_interface0_wb_sdram_we) & main_interface0_wb_sdram_ack)) begin + main_data_port_we <= { + ({4{(main_interface0_wb_sdram_adr[1:0] == 1'd0)}} & main_interface0_wb_sdram_sel), + ({4{(main_interface0_wb_sdram_adr[1:0] == 1'd1)}} & main_interface0_wb_sdram_sel), + ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd2)}} & main_interface0_wb_sdram_sel), + ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd3)}} & main_interface0_wb_sdram_sel) + }; + end + end + end + assign main_dat_w = main_data_port_dat_r; + assign main_sel = 16'd65535; + always @(*) begin + main_interface0_wb_sdram_dat_r <= 32'd0; + case (main_adr_offset_r) + 1'd0: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[127:96]; + end + 1'd1: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[95:64]; + end + 2'd2: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[63:32]; + end + default: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[31:0]; + end + endcase + end + assign {main_tag_do_dirty, main_tag_do_tag} = main_tag_port_dat_r; + assign main_tag_port_dat_w = {main_tag_di_dirty, main_tag_di_tag}; + assign main_tag_port_adr = main_interface0_wb_sdram_adr[10:2]; + assign main_tag_di_tag = main_interface0_wb_sdram_adr[29:11]; + assign main_adr = {main_tag_do_tag, main_interface0_wb_sdram_adr[10:2]}; + always @(*) begin + main_tag_di_dirty <= 1'd0; + main_interface0_wb_sdram_ack <= 1'd0; + main_word_clr <= 1'd0; + main_word_inc <= 1'd0; + main_write_from_slave <= 1'd0; + main_cyc <= 1'd0; + main_stb <= 1'd0; + main_tag_port_we <= 1'd0; + main_we <= 1'd0; + builder_fullmemorywe_next_state <= 2'd0; + builder_fullmemorywe_next_state <= builder_fullmemorywe_state; + case (builder_fullmemorywe_state) + 1'd1: begin + main_word_clr <= 1'd1; + if ((main_tag_do_tag == main_interface0_wb_sdram_adr[29:11])) begin + main_interface0_wb_sdram_ack <= 1'd1; + if (main_interface0_wb_sdram_we) begin + main_tag_di_dirty <= 1'd1; + main_tag_port_we <= 1'd1; + end + builder_fullmemorywe_next_state <= 1'd0; + end else begin + if (main_tag_do_dirty) begin + builder_fullmemorywe_next_state <= 2'd2; + end else begin + main_tag_port_we <= 1'd1; + main_word_clr <= 1'd1; + builder_fullmemorywe_next_state <= 2'd3; + end + end + end + 2'd2: begin + main_stb <= 1'd1; + main_cyc <= 1'd1; + main_we <= 1'd1; + if (main_ack) begin + main_word_inc <= 1'd1; + if (1'd1) begin + main_tag_port_we <= 1'd1; + main_word_clr <= 1'd1; + builder_fullmemorywe_next_state <= 2'd3; + end + end + end + 2'd3: begin + main_stb <= 1'd1; + main_cyc <= 1'd1; + main_we <= 1'd0; + if (main_ack) begin + main_write_from_slave <= 1'd1; + main_word_inc <= 1'd1; + if (1'd1) begin + builder_fullmemorywe_next_state <= 1'd1; + end else begin + builder_fullmemorywe_next_state <= 2'd3; + end + end + end + default: begin + if ((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb)) begin + builder_fullmemorywe_next_state <= 1'd1; + end + end + endcase + end + assign main_wdata_converter_sink_valid = ((main_cyc & main_stb) & main_we); + assign main_wdata_converter_sink_payload_data = main_dat_w; + assign main_wdata_converter_sink_payload_we = main_sel; + assign main_port_wdata_valid = main_wdata_converter_source_valid; + assign main_wdata_converter_source_ready = main_port_wdata_ready; + assign main_port_wdata_first = main_wdata_converter_source_first; + assign main_port_wdata_last = main_wdata_converter_source_last; + assign main_port_wdata_payload_data = main_wdata_converter_source_payload_data; + assign main_port_wdata_payload_we = main_wdata_converter_source_payload_we; + assign main_rdata_converter_sink_valid = main_port_rdata_valid; + assign main_port_rdata_ready = main_rdata_converter_sink_ready; + assign main_rdata_converter_sink_first = main_port_rdata_first; + assign main_rdata_converter_sink_last = main_port_rdata_last; + assign main_rdata_converter_sink_payload_data = main_port_rdata_payload_data; + assign main_rdata_converter_source_ready = 1'd1; + assign main_dat_r = main_rdata_converter_source_payload_data; + assign main_wdata_converter_converter_sink_valid = main_wdata_converter_sink_valid; + assign main_wdata_converter_converter_sink_first = main_wdata_converter_sink_first; + assign main_wdata_converter_converter_sink_last = main_wdata_converter_sink_last; + assign main_wdata_converter_sink_ready = main_wdata_converter_converter_sink_ready; + assign main_wdata_converter_converter_sink_payload_data = { + main_wdata_converter_sink_payload_we, main_wdata_converter_sink_payload_data + }; + assign main_wdata_converter_source_valid = main_wdata_converter_source_source_valid; + assign main_wdata_converter_source_first = main_wdata_converter_source_source_first; + assign main_wdata_converter_source_last = main_wdata_converter_source_source_last; + assign main_wdata_converter_source_source_ready = main_wdata_converter_source_ready; + assign {main_wdata_converter_source_payload_we, main_wdata_converter_source_payload_data} = main_wdata_converter_source_source_payload_data; + assign main_wdata_converter_source_source_valid = main_wdata_converter_converter_source_valid; + assign main_wdata_converter_converter_source_ready = main_wdata_converter_source_source_ready; + assign main_wdata_converter_source_source_first = main_wdata_converter_converter_source_first; + assign main_wdata_converter_source_source_last = main_wdata_converter_converter_source_last; + assign main_wdata_converter_source_source_payload_data = main_wdata_converter_converter_source_payload_data; + assign main_wdata_converter_converter_source_valid = main_wdata_converter_converter_sink_valid; + assign main_wdata_converter_converter_sink_ready = main_wdata_converter_converter_source_ready; + assign main_wdata_converter_converter_source_first = main_wdata_converter_converter_sink_first; + assign main_wdata_converter_converter_source_last = main_wdata_converter_converter_sink_last; + assign main_wdata_converter_converter_source_payload_data = main_wdata_converter_converter_sink_payload_data; + assign main_wdata_converter_converter_source_payload_valid_token_count = 1'd1; + assign main_rdata_converter_converter_sink_valid = main_rdata_converter_sink_valid; + assign main_rdata_converter_converter_sink_first = main_rdata_converter_sink_first; + assign main_rdata_converter_converter_sink_last = main_rdata_converter_sink_last; + assign main_rdata_converter_sink_ready = main_rdata_converter_converter_sink_ready; + assign main_rdata_converter_converter_sink_payload_data = { + main_rdata_converter_sink_payload_data + }; + assign main_rdata_converter_source_valid = main_rdata_converter_source_source_valid; + assign main_rdata_converter_source_first = main_rdata_converter_source_source_first; + assign main_rdata_converter_source_last = main_rdata_converter_source_source_last; + assign main_rdata_converter_source_source_ready = main_rdata_converter_source_ready; + assign {main_rdata_converter_source_payload_data} = main_rdata_converter_source_source_payload_data; + assign main_rdata_converter_source_source_valid = main_rdata_converter_converter_source_valid; + assign main_rdata_converter_converter_source_ready = main_rdata_converter_source_source_ready; + assign main_rdata_converter_source_source_first = main_rdata_converter_converter_source_first; + assign main_rdata_converter_source_source_last = main_rdata_converter_converter_source_last; + assign main_rdata_converter_source_source_payload_data = main_rdata_converter_converter_source_payload_data; + assign main_rdata_converter_converter_source_valid = main_rdata_converter_converter_sink_valid; + assign main_rdata_converter_converter_sink_ready = main_rdata_converter_converter_source_ready; + assign main_rdata_converter_converter_source_first = main_rdata_converter_converter_sink_first; + assign main_rdata_converter_converter_source_last = main_rdata_converter_converter_sink_last; + assign main_rdata_converter_converter_source_payload_data = main_rdata_converter_converter_sink_payload_data; + assign main_rdata_converter_converter_source_payload_valid_token_count = 1'd1; + always @(*) begin + builder_litedramwishbone2native_next_state <= 2'd0; + main_ack <= 1'd0; + main_port_cmd_payload_we <= 1'd0; + main_port_cmd_payload_addr <= 24'd0; + main_count_next_value <= 1'd0; + main_count_next_value_ce <= 1'd0; + main_port_cmd_valid <= 1'd0; + builder_litedramwishbone2native_next_state <= builder_litedramwishbone2native_state; + case (builder_litedramwishbone2native_state) + 1'd1: begin + if (main_wdata_converter_sink_ready) begin + main_ack <= 1'd1; + builder_litedramwishbone2native_next_state <= 1'd0; + end + end + 2'd2: begin + if (main_rdata_converter_source_valid) begin + main_ack <= 1'd1; + builder_litedramwishbone2native_next_state <= 1'd0; + end + end + default: begin + main_port_cmd_valid <= (main_cyc & main_stb); + main_port_cmd_payload_we <= main_we; + main_port_cmd_payload_addr <= (((main_adr * 1'd1) + main_count) - 1'd0); + if ((main_port_cmd_valid & main_port_cmd_ready)) begin + main_count_next_value <= (main_count + 1'd1); + main_count_next_value_ce <= 1'd1; + if ((main_count == 1'd0)) begin + main_count_next_value <= 1'd0; + main_count_next_value_ce <= 1'd1; + if (main_we) begin + builder_litedramwishbone2native_next_state <= 1'd1; + end else begin + builder_litedramwishbone2native_next_state <= 2'd2; + end + end + end + end + endcase + end + assign main_interface0_wb_sdram_adr = builder_rhs_array_muxed36; + assign main_interface0_wb_sdram_dat_w = builder_rhs_array_muxed37; + assign main_interface0_wb_sdram_sel = builder_rhs_array_muxed38; + assign main_interface0_wb_sdram_cyc = builder_rhs_array_muxed39; + assign main_interface0_wb_sdram_stb = builder_rhs_array_muxed40; + assign main_interface0_wb_sdram_we = builder_rhs_array_muxed41; + assign main_interface0_wb_sdram_cti = builder_rhs_array_muxed42; + assign main_interface0_wb_sdram_bte = builder_rhs_array_muxed43; + assign main_interface1_wb_sdram_dat_r = main_interface0_wb_sdram_dat_r; + assign main_interface1_wb_sdram_ack = (main_interface0_wb_sdram_ack & (builder_wb_sdram_con_grant == 1'd0)); + assign main_interface1_wb_sdram_err = (main_interface0_wb_sdram_err & (builder_wb_sdram_con_grant == 1'd0)); + assign builder_wb_sdram_con_request = {main_interface1_wb_sdram_cyc}; + assign builder_wb_sdram_con_grant = 1'd0; + assign builder_minsoc_shared_adr = builder_rhs_array_muxed44; + assign builder_minsoc_shared_dat_w = builder_rhs_array_muxed45; + assign builder_minsoc_shared_sel = builder_rhs_array_muxed46; + assign builder_minsoc_shared_cyc = builder_rhs_array_muxed47; + assign builder_minsoc_shared_stb = builder_rhs_array_muxed48; + assign builder_minsoc_shared_we = builder_rhs_array_muxed49; + assign builder_minsoc_shared_cti = builder_rhs_array_muxed50; + assign builder_minsoc_shared_bte = builder_rhs_array_muxed51; + assign main_minsoc_interface0_soc_bus_dat_r = builder_minsoc_shared_dat_r; + assign main_minsoc_interface1_soc_bus_dat_r = builder_minsoc_shared_dat_r; + assign main_minsoc_interface0_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd0)); + assign main_minsoc_interface1_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd1)); + assign main_minsoc_interface0_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd0)); + assign main_minsoc_interface1_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd1)); + assign builder_minsoc_request = { + main_minsoc_interface1_soc_bus_cyc, main_minsoc_interface0_soc_bus_cyc + }; + always @(*) begin + builder_minsoc_slave_sel <= 4'd0; + builder_minsoc_slave_sel[0] <= (builder_minsoc_shared_adr[28:13] == 1'd0); + builder_minsoc_slave_sel[1] <= (builder_minsoc_shared_adr[28:10] == 13'd4096); + builder_minsoc_slave_sel[2] <= (builder_minsoc_shared_adr[28:14] == 10'd512); + builder_minsoc_slave_sel[3] <= (builder_minsoc_shared_adr[28:26] == 3'd4); + end + assign main_minsoc_rom_bus_adr = builder_minsoc_shared_adr; + assign main_minsoc_rom_bus_dat_w = builder_minsoc_shared_dat_w; + assign main_minsoc_rom_bus_sel = builder_minsoc_shared_sel; + assign main_minsoc_rom_bus_stb = builder_minsoc_shared_stb; + assign main_minsoc_rom_bus_we = builder_minsoc_shared_we; + assign main_minsoc_rom_bus_cti = builder_minsoc_shared_cti; + assign main_minsoc_rom_bus_bte = builder_minsoc_shared_bte; + assign main_minsoc_sram_bus_adr = builder_minsoc_shared_adr; + assign main_minsoc_sram_bus_dat_w = builder_minsoc_shared_dat_w; + assign main_minsoc_sram_bus_sel = builder_minsoc_shared_sel; + assign main_minsoc_sram_bus_stb = builder_minsoc_shared_stb; + assign main_minsoc_sram_bus_we = builder_minsoc_shared_we; + assign main_minsoc_sram_bus_cti = builder_minsoc_shared_cti; + assign main_minsoc_sram_bus_bte = builder_minsoc_shared_bte; + assign main_minsoc_bus_wishbone_adr = builder_minsoc_shared_adr; + assign main_minsoc_bus_wishbone_dat_w = builder_minsoc_shared_dat_w; + assign main_minsoc_bus_wishbone_sel = builder_minsoc_shared_sel; + assign main_minsoc_bus_wishbone_stb = builder_minsoc_shared_stb; + assign main_minsoc_bus_wishbone_we = builder_minsoc_shared_we; + assign main_minsoc_bus_wishbone_cti = builder_minsoc_shared_cti; + assign main_minsoc_bus_wishbone_bte = builder_minsoc_shared_bte; + assign main_interface1_wb_sdram_adr = builder_minsoc_shared_adr; + assign main_interface1_wb_sdram_dat_w = builder_minsoc_shared_dat_w; + assign main_interface1_wb_sdram_sel = builder_minsoc_shared_sel; + assign main_interface1_wb_sdram_stb = builder_minsoc_shared_stb; + assign main_interface1_wb_sdram_we = builder_minsoc_shared_we; + assign main_interface1_wb_sdram_cti = builder_minsoc_shared_cti; + assign main_interface1_wb_sdram_bte = builder_minsoc_shared_bte; + assign main_minsoc_rom_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[0]); + assign main_minsoc_sram_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[1]); + assign main_minsoc_bus_wishbone_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[2]); + assign main_interface1_wb_sdram_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[3]); + assign builder_minsoc_shared_err = (((main_minsoc_rom_bus_err | main_minsoc_sram_bus_err) | main_minsoc_bus_wishbone_err) | main_interface1_wb_sdram_err); + assign builder_minsoc_wait = ((builder_minsoc_shared_stb & builder_minsoc_shared_cyc) & (~builder_minsoc_shared_ack)); + always @(*) begin + builder_minsoc_shared_ack <= 1'd0; + builder_minsoc_error <= 1'd0; + builder_minsoc_shared_dat_r <= 32'd0; + builder_minsoc_shared_ack <= (((main_minsoc_rom_bus_ack | main_minsoc_sram_bus_ack) | main_minsoc_bus_wishbone_ack) | main_interface1_wb_sdram_ack); + builder_minsoc_shared_dat_r <= (((({32{builder_minsoc_slave_sel_r[0]}} & main_minsoc_rom_bus_dat_r) | ({32{builder_minsoc_slave_sel_r[1]}} & main_minsoc_sram_bus_dat_r)) | ({32{builder_minsoc_slave_sel_r[2]}} & main_minsoc_bus_wishbone_dat_r)) | ({32{builder_minsoc_slave_sel_r[3]}} & main_interface1_wb_sdram_dat_r)); + if (builder_minsoc_done) begin + builder_minsoc_shared_dat_r <= 32'd4294967295; + builder_minsoc_shared_ack <= 1'd1; + builder_minsoc_error <= 1'd1; + end + end + assign builder_minsoc_done = (builder_minsoc_count == 1'd0); + assign builder_minsoc_csrbank0_sel = (builder_minsoc_interface0_bank_bus_adr[13:9] == 1'd0); + assign builder_minsoc_csrbank0_reset0_r = builder_minsoc_interface0_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank0_reset0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); + assign builder_minsoc_csrbank0_reset0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); + assign builder_minsoc_csrbank0_scratch3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_scratch3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); + assign builder_minsoc_csrbank0_scratch3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); + assign builder_minsoc_csrbank0_scratch2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_scratch2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); + assign builder_minsoc_csrbank0_scratch2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); + assign builder_minsoc_csrbank0_scratch1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_scratch1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); + assign builder_minsoc_csrbank0_scratch1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); + assign builder_minsoc_csrbank0_scratch0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_scratch0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); + assign builder_minsoc_csrbank0_scratch0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); + assign builder_minsoc_csrbank0_bus_errors3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_bus_errors3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); + assign builder_minsoc_csrbank0_bus_errors3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); + assign builder_minsoc_csrbank0_bus_errors2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_bus_errors2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); + assign builder_minsoc_csrbank0_bus_errors2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); + assign builder_minsoc_csrbank0_bus_errors1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_bus_errors1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); + assign builder_minsoc_csrbank0_bus_errors1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); + assign builder_minsoc_csrbank0_bus_errors0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_bus_errors0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); + assign builder_minsoc_csrbank0_bus_errors0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); + assign builder_minsoc_csrbank0_reset0_w = main_minsoc_ctrl_reset_storage; + assign builder_minsoc_csrbank0_scratch3_w = main_minsoc_ctrl_scratch_storage[31:24]; + assign builder_minsoc_csrbank0_scratch2_w = main_minsoc_ctrl_scratch_storage[23:16]; + assign builder_minsoc_csrbank0_scratch1_w = main_minsoc_ctrl_scratch_storage[15:8]; + assign builder_minsoc_csrbank0_scratch0_w = main_minsoc_ctrl_scratch_storage[7:0]; + assign builder_minsoc_csrbank0_bus_errors3_w = main_minsoc_ctrl_bus_errors_status[31:24]; + assign builder_minsoc_csrbank0_bus_errors2_w = main_minsoc_ctrl_bus_errors_status[23:16]; + assign builder_minsoc_csrbank0_bus_errors1_w = main_minsoc_ctrl_bus_errors_status[15:8]; + assign builder_minsoc_csrbank0_bus_errors0_w = main_minsoc_ctrl_bus_errors_status[7:0]; + assign main_minsoc_ctrl_bus_errors_we = builder_minsoc_csrbank0_bus_errors0_we; + assign builder_minsoc_csrbank1_sel = (builder_minsoc_interface1_bank_bus_adr[13:9] == 3'd5); + assign builder_minsoc_csrbank1_half_sys8x_taps0_r = builder_minsoc_interface1_bank_bus_dat_w[4:0]; + assign builder_minsoc_csrbank1_half_sys8x_taps0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); + assign builder_minsoc_csrbank1_half_sys8x_taps0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); + assign main_a7ddrphy_cdly_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_cdly_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); + assign main_a7ddrphy_cdly_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); + assign main_a7ddrphy_cdly_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_cdly_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); + assign main_a7ddrphy_cdly_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); + assign builder_minsoc_csrbank1_dly_sel0_r = builder_minsoc_interface1_bank_bus_dat_w[1:0]; + assign builder_minsoc_csrbank1_dly_sel0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); + assign builder_minsoc_csrbank1_dly_sel0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); + assign main_a7ddrphy_rdly_dq_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_rdly_dq_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); + assign main_a7ddrphy_rdly_dq_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); + assign main_a7ddrphy_rdly_dq_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_rdly_dq_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); + assign main_a7ddrphy_rdly_dq_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); + assign main_a7ddrphy_rdly_dq_bitslip_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_rdly_dq_bitslip_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); + assign main_a7ddrphy_rdly_dq_bitslip_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); + assign main_a7ddrphy_rdly_dq_bitslip_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_rdly_dq_bitslip_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); + assign main_a7ddrphy_rdly_dq_bitslip_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); + assign builder_minsoc_csrbank1_half_sys8x_taps0_w = main_a7ddrphy_half_sys8x_taps_storage[4:0]; + assign builder_minsoc_csrbank1_dly_sel0_w = main_a7ddrphy_dly_sel_storage[1:0]; + assign builder_minsoc_csrbank2_sel = (builder_minsoc_interface2_bank_bus_adr[13:9] == 4'd8); + assign builder_minsoc_csrbank2_dfii_control0_r = builder_minsoc_interface2_bank_bus_dat_w[3:0]; + assign builder_minsoc_csrbank2_dfii_control0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); + assign builder_minsoc_csrbank2_dfii_control0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); + assign builder_minsoc_csrbank2_dfii_pi0_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi0_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); + assign builder_minsoc_csrbank2_dfii_pi0_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); + assign main_sdram_phaseinjector0_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; + assign main_sdram_phaseinjector0_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); + assign main_sdram_phaseinjector0_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); + assign builder_minsoc_csrbank2_dfii_pi0_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi0_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); + assign builder_minsoc_csrbank2_dfii_pi0_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); + assign builder_minsoc_csrbank2_dfii_pi0_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); + assign builder_minsoc_csrbank2_dfii_pi0_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); + assign builder_minsoc_csrbank2_dfii_pi0_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; + assign builder_minsoc_csrbank2_dfii_pi0_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); + assign builder_minsoc_csrbank2_dfii_pi0_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); + assign builder_minsoc_csrbank2_dfii_pi1_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi1_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); + assign builder_minsoc_csrbank2_dfii_pi1_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); + assign main_sdram_phaseinjector1_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; + assign main_sdram_phaseinjector1_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); + assign main_sdram_phaseinjector1_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); + assign builder_minsoc_csrbank2_dfii_pi1_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi1_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); + assign builder_minsoc_csrbank2_dfii_pi1_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); + assign builder_minsoc_csrbank2_dfii_pi1_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); + assign builder_minsoc_csrbank2_dfii_pi1_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); + assign builder_minsoc_csrbank2_dfii_pi1_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; + assign builder_minsoc_csrbank2_dfii_pi1_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); + assign builder_minsoc_csrbank2_dfii_pi1_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); + assign builder_minsoc_csrbank2_dfii_pi2_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi2_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); + assign builder_minsoc_csrbank2_dfii_pi2_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); + assign main_sdram_phaseinjector2_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; + assign main_sdram_phaseinjector2_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); + assign main_sdram_phaseinjector2_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); + assign builder_minsoc_csrbank2_dfii_pi2_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi2_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); + assign builder_minsoc_csrbank2_dfii_pi2_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); + assign builder_minsoc_csrbank2_dfii_pi2_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); + assign builder_minsoc_csrbank2_dfii_pi2_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); + assign builder_minsoc_csrbank2_dfii_pi2_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; + assign builder_minsoc_csrbank2_dfii_pi2_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); + assign builder_minsoc_csrbank2_dfii_pi2_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); + assign builder_minsoc_csrbank2_dfii_pi3_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi3_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); + assign builder_minsoc_csrbank2_dfii_pi3_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); + assign main_sdram_phaseinjector3_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; + assign main_sdram_phaseinjector3_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); + assign main_sdram_phaseinjector3_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); + assign builder_minsoc_csrbank2_dfii_pi3_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi3_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); + assign builder_minsoc_csrbank2_dfii_pi3_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); + assign builder_minsoc_csrbank2_dfii_pi3_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); + assign builder_minsoc_csrbank2_dfii_pi3_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); + assign builder_minsoc_csrbank2_dfii_pi3_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; + assign builder_minsoc_csrbank2_dfii_pi3_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); + assign builder_minsoc_csrbank2_dfii_pi3_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); + assign builder_minsoc_csrbank2_dfii_control0_w = main_sdram_storage[3:0]; + assign builder_minsoc_csrbank2_dfii_pi0_command0_w = main_sdram_phaseinjector0_command_storage[5:0]; + assign builder_minsoc_csrbank2_dfii_pi0_address1_w = main_sdram_phaseinjector0_address_storage[13:8]; + assign builder_minsoc_csrbank2_dfii_pi0_address0_w = main_sdram_phaseinjector0_address_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_baddress0_w = main_sdram_phaseinjector0_baddress_storage[2:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_w = main_sdram_phaseinjector0_wrdata_storage[31:24]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_w = main_sdram_phaseinjector0_wrdata_storage[23:16]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_w = main_sdram_phaseinjector0_wrdata_storage[15:8]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_w = main_sdram_phaseinjector0_wrdata_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata3_w = main_sdram_phaseinjector0_status[31:24]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata2_w = main_sdram_phaseinjector0_status[23:16]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata1_w = main_sdram_phaseinjector0_status[15:8]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata0_w = main_sdram_phaseinjector0_status[7:0]; + assign main_sdram_phaseinjector0_we = builder_minsoc_csrbank2_dfii_pi0_rddata0_we; + assign builder_minsoc_csrbank2_dfii_pi1_command0_w = main_sdram_phaseinjector1_command_storage[5:0]; + assign builder_minsoc_csrbank2_dfii_pi1_address1_w = main_sdram_phaseinjector1_address_storage[13:8]; + assign builder_minsoc_csrbank2_dfii_pi1_address0_w = main_sdram_phaseinjector1_address_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_baddress0_w = main_sdram_phaseinjector1_baddress_storage[2:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_w = main_sdram_phaseinjector1_wrdata_storage[31:24]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_w = main_sdram_phaseinjector1_wrdata_storage[23:16]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_w = main_sdram_phaseinjector1_wrdata_storage[15:8]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_w = main_sdram_phaseinjector1_wrdata_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata3_w = main_sdram_phaseinjector1_status[31:24]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata2_w = main_sdram_phaseinjector1_status[23:16]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata1_w = main_sdram_phaseinjector1_status[15:8]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata0_w = main_sdram_phaseinjector1_status[7:0]; + assign main_sdram_phaseinjector1_we = builder_minsoc_csrbank2_dfii_pi1_rddata0_we; + assign builder_minsoc_csrbank2_dfii_pi2_command0_w = main_sdram_phaseinjector2_command_storage[5:0]; + assign builder_minsoc_csrbank2_dfii_pi2_address1_w = main_sdram_phaseinjector2_address_storage[13:8]; + assign builder_minsoc_csrbank2_dfii_pi2_address0_w = main_sdram_phaseinjector2_address_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_baddress0_w = main_sdram_phaseinjector2_baddress_storage[2:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_w = main_sdram_phaseinjector2_wrdata_storage[31:24]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_w = main_sdram_phaseinjector2_wrdata_storage[23:16]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_w = main_sdram_phaseinjector2_wrdata_storage[15:8]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_w = main_sdram_phaseinjector2_wrdata_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata3_w = main_sdram_phaseinjector2_status[31:24]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata2_w = main_sdram_phaseinjector2_status[23:16]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata1_w = main_sdram_phaseinjector2_status[15:8]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata0_w = main_sdram_phaseinjector2_status[7:0]; + assign main_sdram_phaseinjector2_we = builder_minsoc_csrbank2_dfii_pi2_rddata0_we; + assign builder_minsoc_csrbank2_dfii_pi3_command0_w = main_sdram_phaseinjector3_command_storage[5:0]; + assign builder_minsoc_csrbank2_dfii_pi3_address1_w = main_sdram_phaseinjector3_address_storage[13:8]; + assign builder_minsoc_csrbank2_dfii_pi3_address0_w = main_sdram_phaseinjector3_address_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_baddress0_w = main_sdram_phaseinjector3_baddress_storage[2:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_w = main_sdram_phaseinjector3_wrdata_storage[31:24]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_w = main_sdram_phaseinjector3_wrdata_storage[23:16]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_w = main_sdram_phaseinjector3_wrdata_storage[15:8]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_w = main_sdram_phaseinjector3_wrdata_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata3_w = main_sdram_phaseinjector3_status[31:24]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata2_w = main_sdram_phaseinjector3_status[23:16]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata1_w = main_sdram_phaseinjector3_status[15:8]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata0_w = main_sdram_phaseinjector3_status[7:0]; + assign main_sdram_phaseinjector3_we = builder_minsoc_csrbank2_dfii_pi3_rddata0_we; + assign builder_minsoc_csrbank3_sel = (builder_minsoc_interface3_bank_bus_adr[13:9] == 3'd4); + assign builder_minsoc_csrbank3_load3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_load3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); + assign builder_minsoc_csrbank3_load3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); + assign builder_minsoc_csrbank3_load2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_load2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); + assign builder_minsoc_csrbank3_load2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); + assign builder_minsoc_csrbank3_load1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_load1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); + assign builder_minsoc_csrbank3_load1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); + assign builder_minsoc_csrbank3_load0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_load0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); + assign builder_minsoc_csrbank3_load0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); + assign builder_minsoc_csrbank3_reload3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_reload3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); + assign builder_minsoc_csrbank3_reload3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); + assign builder_minsoc_csrbank3_reload2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_reload2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); + assign builder_minsoc_csrbank3_reload2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); + assign builder_minsoc_csrbank3_reload1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_reload1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); + assign builder_minsoc_csrbank3_reload1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); + assign builder_minsoc_csrbank3_reload0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_reload0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); + assign builder_minsoc_csrbank3_reload0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); + assign builder_minsoc_csrbank3_en0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank3_en0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); + assign builder_minsoc_csrbank3_en0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); + assign builder_minsoc_csrbank3_update_value0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank3_update_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); + assign builder_minsoc_csrbank3_update_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); + assign builder_minsoc_csrbank3_value3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_value3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); + assign builder_minsoc_csrbank3_value3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); + assign builder_minsoc_csrbank3_value2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_value2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); + assign builder_minsoc_csrbank3_value2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); + assign builder_minsoc_csrbank3_value1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_value1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); + assign builder_minsoc_csrbank3_value1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); + assign builder_minsoc_csrbank3_value0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); + assign builder_minsoc_csrbank3_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); + assign main_minsoc_timer0_eventmanager_status_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign main_minsoc_timer0_eventmanager_status_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); + assign main_minsoc_timer0_eventmanager_status_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); + assign main_minsoc_timer0_eventmanager_pending_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign main_minsoc_timer0_eventmanager_pending_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); + assign main_minsoc_timer0_eventmanager_pending_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); + assign builder_minsoc_csrbank3_ev_enable0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank3_ev_enable0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); + assign builder_minsoc_csrbank3_ev_enable0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); + assign builder_minsoc_csrbank3_load3_w = main_minsoc_timer0_load_storage[31:24]; + assign builder_minsoc_csrbank3_load2_w = main_minsoc_timer0_load_storage[23:16]; + assign builder_minsoc_csrbank3_load1_w = main_minsoc_timer0_load_storage[15:8]; + assign builder_minsoc_csrbank3_load0_w = main_minsoc_timer0_load_storage[7:0]; + assign builder_minsoc_csrbank3_reload3_w = main_minsoc_timer0_reload_storage[31:24]; + assign builder_minsoc_csrbank3_reload2_w = main_minsoc_timer0_reload_storage[23:16]; + assign builder_minsoc_csrbank3_reload1_w = main_minsoc_timer0_reload_storage[15:8]; + assign builder_minsoc_csrbank3_reload0_w = main_minsoc_timer0_reload_storage[7:0]; + assign builder_minsoc_csrbank3_en0_w = main_minsoc_timer0_en_storage; + assign builder_minsoc_csrbank3_update_value0_w = main_minsoc_timer0_update_value_storage; + assign builder_minsoc_csrbank3_value3_w = main_minsoc_timer0_value_status[31:24]; + assign builder_minsoc_csrbank3_value2_w = main_minsoc_timer0_value_status[23:16]; + assign builder_minsoc_csrbank3_value1_w = main_minsoc_timer0_value_status[15:8]; + assign builder_minsoc_csrbank3_value0_w = main_minsoc_timer0_value_status[7:0]; + assign main_minsoc_timer0_value_we = builder_minsoc_csrbank3_value0_we; + assign builder_minsoc_csrbank3_ev_enable0_w = main_minsoc_timer0_eventmanager_storage; + assign builder_minsoc_csrbank4_sel = (builder_minsoc_interface4_bank_bus_adr[13:9] == 2'd3); + assign main_minsoc_uart_rxtx_r = builder_minsoc_interface4_bank_bus_dat_w[7:0]; + assign main_minsoc_uart_rxtx_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); + assign main_minsoc_uart_rxtx_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); + assign builder_minsoc_csrbank4_txfull_r = builder_minsoc_interface4_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank4_txfull_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); + assign builder_minsoc_csrbank4_txfull_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); + assign builder_minsoc_csrbank4_rxempty_r = builder_minsoc_interface4_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank4_rxempty_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); + assign builder_minsoc_csrbank4_rxempty_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); + assign main_minsoc_uart_eventmanager_status_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; + assign main_minsoc_uart_eventmanager_status_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); + assign main_minsoc_uart_eventmanager_status_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); + assign main_minsoc_uart_eventmanager_pending_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; + assign main_minsoc_uart_eventmanager_pending_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); + assign main_minsoc_uart_eventmanager_pending_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); + assign builder_minsoc_csrbank4_ev_enable0_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; + assign builder_minsoc_csrbank4_ev_enable0_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); + assign builder_minsoc_csrbank4_ev_enable0_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); + assign builder_minsoc_csrbank4_txfull_w = main_minsoc_uart_txfull_status; + assign main_minsoc_uart_txfull_we = builder_minsoc_csrbank4_txfull_we; + assign builder_minsoc_csrbank4_rxempty_w = main_minsoc_uart_rxempty_status; + assign main_minsoc_uart_rxempty_we = builder_minsoc_csrbank4_rxempty_we; + assign builder_minsoc_csrbank4_ev_enable0_w = main_minsoc_uart_eventmanager_storage[1:0]; + assign builder_minsoc_csrbank5_sel = (builder_minsoc_interface5_bank_bus_adr[13:9] == 2'd2); + assign builder_minsoc_csrbank5_tuning_word3_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank5_tuning_word3_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); + assign builder_minsoc_csrbank5_tuning_word3_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); + assign builder_minsoc_csrbank5_tuning_word2_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank5_tuning_word2_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); + assign builder_minsoc_csrbank5_tuning_word2_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); + assign builder_minsoc_csrbank5_tuning_word1_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank5_tuning_word1_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); + assign builder_minsoc_csrbank5_tuning_word1_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); + assign builder_minsoc_csrbank5_tuning_word0_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank5_tuning_word0_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); + assign builder_minsoc_csrbank5_tuning_word0_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); + assign builder_minsoc_csrbank5_tuning_word3_w = main_minsoc_storage[31:24]; + assign builder_minsoc_csrbank5_tuning_word2_w = main_minsoc_storage[23:16]; + assign builder_minsoc_csrbank5_tuning_word1_w = main_minsoc_storage[15:8]; + assign builder_minsoc_csrbank5_tuning_word0_w = main_minsoc_storage[7:0]; + assign builder_minsoc_adr = main_minsoc_interface_adr; + assign builder_minsoc_we = main_minsoc_interface_we; + assign builder_minsoc_dat_w = main_minsoc_interface_dat_w; + assign main_minsoc_interface_dat_r = builder_minsoc_dat_r; + assign builder_minsoc_interface0_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface1_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface2_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface3_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface4_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface5_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface0_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface1_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface2_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface3_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface4_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface5_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface0_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface1_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface2_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface3_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface4_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface5_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_dat_r = (((((builder_minsoc_interface0_bank_bus_dat_r | builder_minsoc_interface1_bank_bus_dat_r) | builder_minsoc_interface2_bank_bus_dat_r) | builder_minsoc_interface3_bank_bus_dat_r) | builder_minsoc_interface4_bank_bus_dat_r) | builder_minsoc_interface5_bank_bus_dat_r); + always @(*) begin + builder_rhs_array_muxed0 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[0]; + end + 1'd1: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[1]; + end + 2'd2: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[2]; + end + 2'd3: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[3]; + end + 3'd4: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[4]; + end + 3'd5: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[5]; + end + 3'd6: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[6]; + end + default: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[7]; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed1 <= 14'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_a; + end + 1'd1: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_a; + end + 2'd2: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_a; + end + 2'd3: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_a; + end + 3'd4: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_a; + end + 3'd5: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_a; + end + 3'd6: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_a; + end + default: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed2 <= 3'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_ba; + end + 1'd1: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_ba; + end + 2'd2: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_ba; + end + 2'd3: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_ba; + end + 3'd4: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_ba; + end + 3'd5: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_ba; + end + 3'd6: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_ba; + end + default: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_ba; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed3 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_is_read; + end + 1'd1: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_is_read; + end + 2'd2: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_is_read; + end + 2'd3: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_is_read; + end + 3'd4: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_is_read; + end + 3'd5: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_is_read; + end + 3'd6: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_is_read; + end + default: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_is_read; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed4 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_is_write; + end + 1'd1: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_is_write; + end + 2'd2: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_is_write; + end + 2'd3: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_is_write; + end + 3'd4: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_is_write; + end + 3'd5: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_is_write; + end + 3'd6: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_is_write; + end + default: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_is_write; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed5 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_is_cmd; + end + 1'd1: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_is_cmd; + end + 2'd2: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_is_cmd; + end + 2'd3: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_is_cmd; + end + 3'd4: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_is_cmd; + end + 3'd5: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_is_cmd; + end + 3'd6: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_is_cmd; + end + default: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_is_cmd; + end + endcase + end + always @(*) begin + builder_t_array_muxed0 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_t_array_muxed0 <= main_sdram_bankmachine0_cmd_payload_cas; + end + 1'd1: begin + builder_t_array_muxed0 <= main_sdram_bankmachine1_cmd_payload_cas; + end + 2'd2: begin + builder_t_array_muxed0 <= main_sdram_bankmachine2_cmd_payload_cas; + end + 2'd3: begin + builder_t_array_muxed0 <= main_sdram_bankmachine3_cmd_payload_cas; + end + 3'd4: begin + builder_t_array_muxed0 <= main_sdram_bankmachine4_cmd_payload_cas; + end + 3'd5: begin + builder_t_array_muxed0 <= main_sdram_bankmachine5_cmd_payload_cas; + end + 3'd6: begin + builder_t_array_muxed0 <= main_sdram_bankmachine6_cmd_payload_cas; + end + default: begin + builder_t_array_muxed0 <= main_sdram_bankmachine7_cmd_payload_cas; + end + endcase + end + always @(*) begin + builder_t_array_muxed1 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_t_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_ras; + end + 1'd1: begin + builder_t_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_ras; + end + 2'd2: begin + builder_t_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_ras; + end + 2'd3: begin + builder_t_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_ras; + end + 3'd4: begin + builder_t_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_ras; + end + 3'd5: begin + builder_t_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_ras; + end + 3'd6: begin + builder_t_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_ras; + end + default: begin + builder_t_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_ras; + end + endcase + end + always @(*) begin + builder_t_array_muxed2 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_t_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_we; + end + 1'd1: begin + builder_t_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_we; + end + 2'd2: begin + builder_t_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_we; + end + 2'd3: begin + builder_t_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_we; + end + 3'd4: begin + builder_t_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_we; + end + 3'd5: begin + builder_t_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_we; + end + 3'd6: begin + builder_t_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_we; + end + default: begin + builder_t_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed6 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[0]; + end + 1'd1: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[1]; + end + 2'd2: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[2]; + end + 2'd3: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[3]; + end + 3'd4: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[4]; + end + 3'd5: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[5]; + end + 3'd6: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[6]; + end + default: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[7]; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed7 <= 14'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine0_cmd_payload_a; + end + 1'd1: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine1_cmd_payload_a; + end + 2'd2: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine2_cmd_payload_a; + end + 2'd3: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine3_cmd_payload_a; + end + 3'd4: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine4_cmd_payload_a; + end + 3'd5: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine5_cmd_payload_a; + end + 3'd6: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine6_cmd_payload_a; + end + default: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine7_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed8 <= 3'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine0_cmd_payload_ba; + end + 1'd1: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine1_cmd_payload_ba; + end + 2'd2: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine2_cmd_payload_ba; + end + 2'd3: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine3_cmd_payload_ba; + end + 3'd4: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine4_cmd_payload_ba; + end + 3'd5: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine5_cmd_payload_ba; + end + 3'd6: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine6_cmd_payload_ba; + end + default: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine7_cmd_payload_ba; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed9 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine0_cmd_payload_is_read; + end + 1'd1: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine1_cmd_payload_is_read; + end + 2'd2: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine2_cmd_payload_is_read; + end + 2'd3: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine3_cmd_payload_is_read; + end + 3'd4: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine4_cmd_payload_is_read; + end + 3'd5: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine5_cmd_payload_is_read; + end + 3'd6: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine6_cmd_payload_is_read; + end + default: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine7_cmd_payload_is_read; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed10 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine0_cmd_payload_is_write; + end + 1'd1: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine1_cmd_payload_is_write; + end + 2'd2: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine2_cmd_payload_is_write; + end + 2'd3: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine3_cmd_payload_is_write; + end + 3'd4: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine4_cmd_payload_is_write; + end + 3'd5: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine5_cmd_payload_is_write; + end + 3'd6: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine6_cmd_payload_is_write; + end + default: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine7_cmd_payload_is_write; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed11 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine0_cmd_payload_is_cmd; + end + 1'd1: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine1_cmd_payload_is_cmd; + end + 2'd2: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine2_cmd_payload_is_cmd; + end + 2'd3: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine3_cmd_payload_is_cmd; + end + 3'd4: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine4_cmd_payload_is_cmd; + end + 3'd5: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine5_cmd_payload_is_cmd; + end + 3'd6: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine6_cmd_payload_is_cmd; + end + default: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine7_cmd_payload_is_cmd; + end + endcase + end + always @(*) begin + builder_t_array_muxed3 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_t_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_cas; + end + 1'd1: begin + builder_t_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_cas; + end + 2'd2: begin + builder_t_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_cas; + end + 2'd3: begin + builder_t_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_cas; + end + 3'd4: begin + builder_t_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_cas; + end + 3'd5: begin + builder_t_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_cas; + end + 3'd6: begin + builder_t_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_cas; + end + default: begin + builder_t_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_cas; + end + endcase + end + always @(*) begin + builder_t_array_muxed4 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_t_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_ras; + end + 1'd1: begin + builder_t_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_ras; + end + 2'd2: begin + builder_t_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_ras; + end + 2'd3: begin + builder_t_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_ras; + end + 3'd4: begin + builder_t_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_ras; + end + 3'd5: begin + builder_t_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_ras; + end + 3'd6: begin + builder_t_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_ras; + end + default: begin + builder_t_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_ras; + end + endcase + end + always @(*) begin + builder_t_array_muxed5 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_t_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_we; + end + 1'd1: begin + builder_t_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_we; + end + 2'd2: begin + builder_t_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_we; + end + 2'd3: begin + builder_t_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_we; + end + 3'd4: begin + builder_t_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_we; + end + 3'd5: begin + builder_t_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_we; + end + 3'd6: begin + builder_t_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_we; + end + default: begin + builder_t_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed12 <= 21'd0; + case (builder_roundrobin0_grant) + default: begin + builder_rhs_array_muxed12 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed13 <= 1'd0; + case (builder_roundrobin0_grant) + default: begin + builder_rhs_array_muxed13 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed14 <= 1'd0; + case (builder_roundrobin0_grant) + default: begin + builder_rhs_array_muxed14 <= (((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed15 <= 21'd0; + case (builder_roundrobin1_grant) + default: begin + builder_rhs_array_muxed15 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed16 <= 1'd0; + case (builder_roundrobin1_grant) + default: begin + builder_rhs_array_muxed16 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed17 <= 1'd0; + case (builder_roundrobin1_grant) + default: begin + builder_rhs_array_muxed17 <= (((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed18 <= 21'd0; + case (builder_roundrobin2_grant) + default: begin + builder_rhs_array_muxed18 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed19 <= 1'd0; + case (builder_roundrobin2_grant) + default: begin + builder_rhs_array_muxed19 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed20 <= 1'd0; + case (builder_roundrobin2_grant) + default: begin + builder_rhs_array_muxed20 <= (((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed21 <= 21'd0; + case (builder_roundrobin3_grant) + default: begin + builder_rhs_array_muxed21 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed22 <= 1'd0; + case (builder_roundrobin3_grant) + default: begin + builder_rhs_array_muxed22 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed23 <= 1'd0; + case (builder_roundrobin3_grant) + default: begin + builder_rhs_array_muxed23 <= (((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed24 <= 21'd0; + case (builder_roundrobin4_grant) + default: begin + builder_rhs_array_muxed24 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed25 <= 1'd0; + case (builder_roundrobin4_grant) + default: begin + builder_rhs_array_muxed25 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed26 <= 1'd0; + case (builder_roundrobin4_grant) + default: begin + builder_rhs_array_muxed26 <= (((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed27 <= 21'd0; + case (builder_roundrobin5_grant) + default: begin + builder_rhs_array_muxed27 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed28 <= 1'd0; + case (builder_roundrobin5_grant) + default: begin + builder_rhs_array_muxed28 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed29 <= 1'd0; + case (builder_roundrobin5_grant) + default: begin + builder_rhs_array_muxed29 <= (((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed30 <= 21'd0; + case (builder_roundrobin6_grant) + default: begin + builder_rhs_array_muxed30 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed31 <= 1'd0; + case (builder_roundrobin6_grant) + default: begin + builder_rhs_array_muxed31 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed32 <= 1'd0; + case (builder_roundrobin6_grant) + default: begin + builder_rhs_array_muxed32 <= (((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed33 <= 21'd0; + case (builder_roundrobin7_grant) + default: begin + builder_rhs_array_muxed33 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed34 <= 1'd0; + case (builder_roundrobin7_grant) + default: begin + builder_rhs_array_muxed34 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed35 <= 1'd0; + case (builder_roundrobin7_grant) + default: begin + builder_rhs_array_muxed35 <= (((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed36 <= 30'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed36 <= main_interface1_wb_sdram_adr; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed37 <= 32'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed37 <= main_interface1_wb_sdram_dat_w; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed38 <= 4'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed38 <= main_interface1_wb_sdram_sel; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed39 <= 1'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed39 <= main_interface1_wb_sdram_cyc; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed40 <= 1'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed40 <= main_interface1_wb_sdram_stb; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed41 <= 1'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed41 <= main_interface1_wb_sdram_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed42 <= 3'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed42 <= main_interface1_wb_sdram_cti; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed43 <= 2'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed43 <= main_interface1_wb_sdram_bte; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed44 <= 30'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed44 <= main_minsoc_interface0_soc_bus_adr; + end + default: begin + builder_rhs_array_muxed44 <= main_minsoc_interface1_soc_bus_adr; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed45 <= 32'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed45 <= main_minsoc_interface0_soc_bus_dat_w; + end + default: begin + builder_rhs_array_muxed45 <= main_minsoc_interface1_soc_bus_dat_w; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed46 <= 4'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed46 <= main_minsoc_interface0_soc_bus_sel; + end + default: begin + builder_rhs_array_muxed46 <= main_minsoc_interface1_soc_bus_sel; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed47 <= 1'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed47 <= main_minsoc_interface0_soc_bus_cyc; + end + default: begin + builder_rhs_array_muxed47 <= main_minsoc_interface1_soc_bus_cyc; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed48 <= 1'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed48 <= main_minsoc_interface0_soc_bus_stb; + end + default: begin + builder_rhs_array_muxed48 <= main_minsoc_interface1_soc_bus_stb; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed49 <= 1'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed49 <= main_minsoc_interface0_soc_bus_we; + end + default: begin + builder_rhs_array_muxed49 <= main_minsoc_interface1_soc_bus_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed50 <= 3'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed50 <= main_minsoc_interface0_soc_bus_cti; + end + default: begin + builder_rhs_array_muxed50 <= main_minsoc_interface1_soc_bus_cti; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed51 <= 2'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed51 <= main_minsoc_interface0_soc_bus_bte; + end + default: begin + builder_rhs_array_muxed51 <= main_minsoc_interface1_soc_bus_bte; + end + endcase + end + always @(*) begin + builder_array_muxed0 <= 3'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed0 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed0 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed0 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed0 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase + end + always @(*) begin + builder_array_muxed1 <= 14'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed1 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed1 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed1 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed1 <= main_sdram_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_array_muxed2 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed2 <= 1'd0; + end + 1'd1: begin + builder_array_muxed2 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed2 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed2 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase + end + always @(*) begin + builder_array_muxed3 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed3 <= 1'd0; + end + 1'd1: begin + builder_array_muxed3 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed3 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed3 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase + end + always @(*) begin + builder_array_muxed4 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed4 <= 1'd0; + end + 1'd1: begin + builder_array_muxed4 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed4 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed4 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase + end + always @(*) begin + builder_array_muxed5 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed5 <= 1'd0; + end + 1'd1: begin + builder_array_muxed5 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed5 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed5 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase + end + always @(*) begin + builder_array_muxed6 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed6 <= 1'd0; + end + 1'd1: begin + builder_array_muxed6 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed6 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed6 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase + end + always @(*) begin + builder_array_muxed7 <= 3'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed7 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed7 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed7 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed7 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase + end + always @(*) begin + builder_array_muxed8 <= 14'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed8 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed8 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed8 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed8 <= main_sdram_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_array_muxed9 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed9 <= 1'd0; + end + 1'd1: begin + builder_array_muxed9 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed9 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed9 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase + end + always @(*) begin + builder_array_muxed10 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed10 <= 1'd0; + end + 1'd1: begin + builder_array_muxed10 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed10 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed10 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase + end + always @(*) begin + builder_array_muxed11 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed11 <= 1'd0; + end + 1'd1: begin + builder_array_muxed11 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed11 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed11 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase + end + always @(*) begin + builder_array_muxed12 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed12 <= 1'd0; + end + 1'd1: begin + builder_array_muxed12 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed12 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed12 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase + end + always @(*) begin + builder_array_muxed13 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed13 <= 1'd0; + end + 1'd1: begin + builder_array_muxed13 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed13 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed13 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase + end + always @(*) begin + builder_array_muxed14 <= 3'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed14 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed14 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed14 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed14 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase + end + always @(*) begin + builder_array_muxed15 <= 14'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed15 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed15 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed15 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed15 <= main_sdram_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_array_muxed16 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed16 <= 1'd0; + end + 1'd1: begin + builder_array_muxed16 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed16 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed16 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase + end + always @(*) begin + builder_array_muxed17 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed17 <= 1'd0; + end + 1'd1: begin + builder_array_muxed17 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed17 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed17 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase + end + always @(*) begin + builder_array_muxed18 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed18 <= 1'd0; + end + 1'd1: begin + builder_array_muxed18 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed18 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed18 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase + end + always @(*) begin + builder_array_muxed19 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed19 <= 1'd0; + end + 1'd1: begin + builder_array_muxed19 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed19 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed19 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase + end + always @(*) begin + builder_array_muxed20 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed20 <= 1'd0; + end + 1'd1: begin + builder_array_muxed20 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed20 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed20 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase + end + always @(*) begin + builder_array_muxed21 <= 3'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed21 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed21 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed21 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed21 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase + end + always @(*) begin + builder_array_muxed22 <= 14'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed22 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed22 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed22 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed22 <= main_sdram_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_array_muxed23 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed23 <= 1'd0; + end + 1'd1: begin + builder_array_muxed23 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed23 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed23 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase + end + always @(*) begin + builder_array_muxed24 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed24 <= 1'd0; + end + 1'd1: begin + builder_array_muxed24 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed24 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed24 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase + end + always @(*) begin + builder_array_muxed25 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed25 <= 1'd0; + end + 1'd1: begin + builder_array_muxed25 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed25 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed25 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase + end + always @(*) begin + builder_array_muxed26 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed26 <= 1'd0; + end + 1'd1: begin + builder_array_muxed26 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed26 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed26 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase + end + always @(*) begin + builder_array_muxed27 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed27 <= 1'd0; + end + 1'd1: begin + builder_array_muxed27 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed27 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed27 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase + end + assign main_minsoc_rx = builder_regs1; + assign builder_xilinxasyncresetsynchronizerimpl0 = ((~main_locked) | main_reset); + assign builder_xilinxasyncresetsynchronizerimpl1 = ((~main_locked) | main_reset); + assign builder_xilinxasyncresetsynchronizerimpl2 = ((~main_locked) | main_reset); + assign builder_xilinxasyncresetsynchronizerimpl3 = ((~main_locked) | main_reset); + + always @(posedge clk200_clk) begin + if ((main_reset_counter != 1'd0)) begin + main_reset_counter <= (main_reset_counter - 1'd1); + end else begin + main_ic_reset <= 1'd0; + end + if (clk200_rst) begin + main_reset_counter <= 4'd15; + main_ic_reset <= 1'd1; + end + end + + always @(posedge sys_clk) begin + if ((main_minsoc_ctrl_bus_errors != 32'd4294967295)) begin + if (main_minsoc_ctrl_bus_error) begin + main_minsoc_ctrl_bus_errors <= (main_minsoc_ctrl_bus_errors + 1'd1); + end + end + main_minsoc_rom_bus_ack <= 1'd0; + if (((main_minsoc_rom_bus_cyc & main_minsoc_rom_bus_stb) & (~main_minsoc_rom_bus_ack))) begin + main_minsoc_rom_bus_ack <= 1'd1; + end + main_minsoc_sram_bus_ack <= 1'd0; + if (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & (~main_minsoc_sram_bus_ack))) begin + main_minsoc_sram_bus_ack <= 1'd1; + end + main_minsoc_sink_ready <= 1'd0; + if (((main_minsoc_sink_valid & (~main_minsoc_tx_busy)) & (~main_minsoc_sink_ready))) begin + main_minsoc_tx_reg <= main_minsoc_sink_payload_data; + main_minsoc_tx_bitcount <= 1'd0; + main_minsoc_tx_busy <= 1'd1; + serial_tx <= 1'd0; + end else begin + if ((main_minsoc_uart_clk_txen & main_minsoc_tx_busy)) begin + main_minsoc_tx_bitcount <= (main_minsoc_tx_bitcount + 1'd1); + if ((main_minsoc_tx_bitcount == 4'd8)) begin + serial_tx <= 1'd1; + end else begin + if ((main_minsoc_tx_bitcount == 4'd9)) begin + serial_tx <= 1'd1; + main_minsoc_tx_busy <= 1'd0; + main_minsoc_sink_ready <= 1'd1; + end else begin + serial_tx <= main_minsoc_tx_reg[0]; + main_minsoc_tx_reg <= {1'd0, main_minsoc_tx_reg[7:1]}; + end + end + end + end + if (main_minsoc_tx_busy) begin + {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= (main_minsoc_phase_accumulator_tx + main_minsoc_storage); + end else begin + {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= 1'd0; + end + main_minsoc_source_valid <= 1'd0; + main_minsoc_rx_r <= main_minsoc_rx; + if ((~main_minsoc_rx_busy)) begin + if (((~main_minsoc_rx) & main_minsoc_rx_r)) begin + main_minsoc_rx_busy <= 1'd1; + main_minsoc_rx_bitcount <= 1'd0; + end + end else begin + if (main_minsoc_uart_clk_rxen) begin + main_minsoc_rx_bitcount <= (main_minsoc_rx_bitcount + 1'd1); + if ((main_minsoc_rx_bitcount == 1'd0)) begin + if (main_minsoc_rx) begin + main_minsoc_rx_busy <= 1'd0; + end + end else begin + if ((main_minsoc_rx_bitcount == 4'd9)) begin + main_minsoc_rx_busy <= 1'd0; + if (main_minsoc_rx) begin + main_minsoc_source_payload_data <= main_minsoc_rx_reg; + main_minsoc_source_valid <= 1'd1; + end + end else begin + main_minsoc_rx_reg <= {main_minsoc_rx, main_minsoc_rx_reg[7:1]}; + end + end + end + end + if (main_minsoc_rx_busy) begin + {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= (main_minsoc_phase_accumulator_rx + main_minsoc_storage); + end else begin + {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= 32'd2147483648; + end + if (main_minsoc_uart_tx_clear) begin + main_minsoc_uart_tx_pending <= 1'd0; + end + main_minsoc_uart_tx_old_trigger <= main_minsoc_uart_tx_trigger; + if (((~main_minsoc_uart_tx_trigger) & main_minsoc_uart_tx_old_trigger)) begin + main_minsoc_uart_tx_pending <= 1'd1; + end + if (main_minsoc_uart_rx_clear) begin + main_minsoc_uart_rx_pending <= 1'd0; + end + main_minsoc_uart_rx_old_trigger <= main_minsoc_uart_rx_trigger; + if (((~main_minsoc_uart_rx_trigger) & main_minsoc_uart_rx_old_trigger)) begin + main_minsoc_uart_rx_pending <= 1'd1; + end + if (main_minsoc_uart_tx_fifo_syncfifo_re) begin + main_minsoc_uart_tx_fifo_readable <= 1'd1; + end else begin + if (main_minsoc_uart_tx_fifo_re) begin + main_minsoc_uart_tx_fifo_readable <= 1'd0; + end + end + if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin + main_minsoc_uart_tx_fifo_produce <= (main_minsoc_uart_tx_fifo_produce + 1'd1); + end + if (main_minsoc_uart_tx_fifo_do_read) begin + main_minsoc_uart_tx_fifo_consume <= (main_minsoc_uart_tx_fifo_consume + 1'd1); + end + if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin + if ((~main_minsoc_uart_tx_fifo_do_read)) begin + main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 + 1'd1); + end + end else begin + if (main_minsoc_uart_tx_fifo_do_read) begin + main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 - 1'd1); + end + end + if (main_minsoc_uart_rx_fifo_syncfifo_re) begin + main_minsoc_uart_rx_fifo_readable <= 1'd1; + end else begin + if (main_minsoc_uart_rx_fifo_re) begin + main_minsoc_uart_rx_fifo_readable <= 1'd0; + end + end + if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin + main_minsoc_uart_rx_fifo_produce <= (main_minsoc_uart_rx_fifo_produce + 1'd1); + end + if (main_minsoc_uart_rx_fifo_do_read) begin + main_minsoc_uart_rx_fifo_consume <= (main_minsoc_uart_rx_fifo_consume + 1'd1); + end + if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin + if ((~main_minsoc_uart_rx_fifo_do_read)) begin + main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 + 1'd1); + end + end else begin + if (main_minsoc_uart_rx_fifo_do_read) begin + main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 - 1'd1); + end + end + if (main_minsoc_uart_reset) begin + main_minsoc_uart_tx_pending <= 1'd0; + main_minsoc_uart_tx_old_trigger <= 1'd0; + main_minsoc_uart_rx_pending <= 1'd0; + main_minsoc_uart_rx_old_trigger <= 1'd0; + main_minsoc_uart_tx_fifo_readable <= 1'd0; + main_minsoc_uart_tx_fifo_level0 <= 5'd0; + main_minsoc_uart_tx_fifo_produce <= 4'd0; + main_minsoc_uart_tx_fifo_consume <= 4'd0; + main_minsoc_uart_rx_fifo_readable <= 1'd0; + main_minsoc_uart_rx_fifo_level0 <= 5'd0; + main_minsoc_uart_rx_fifo_produce <= 4'd0; + main_minsoc_uart_rx_fifo_consume <= 4'd0; + end + if (main_minsoc_timer0_en_storage) begin + if ((main_minsoc_timer0_value == 1'd0)) begin + main_minsoc_timer0_value <= main_minsoc_timer0_reload_storage; + end else begin + main_minsoc_timer0_value <= (main_minsoc_timer0_value - 1'd1); + end + end else begin + main_minsoc_timer0_value <= main_minsoc_timer0_load_storage; + end + if (main_minsoc_timer0_update_value_re) begin + main_minsoc_timer0_value_status <= main_minsoc_timer0_value; + end + if (main_minsoc_timer0_zero_clear) begin + main_minsoc_timer0_zero_pending <= 1'd0; + end + main_minsoc_timer0_zero_old_trigger <= main_minsoc_timer0_zero_trigger; + if (((~main_minsoc_timer0_zero_trigger) & main_minsoc_timer0_zero_old_trigger)) begin + main_minsoc_timer0_zero_pending <= 1'd1; + end + builder_wb2csr_state <= builder_wb2csr_next_state; + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip0_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip0_value <= (main_a7ddrphy_bitslip0_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip1_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip1_value <= (main_a7ddrphy_bitslip1_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip2_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip2_value <= (main_a7ddrphy_bitslip2_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip3_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip3_value <= (main_a7ddrphy_bitslip3_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip4_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip4_value <= (main_a7ddrphy_bitslip4_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip5_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip5_value <= (main_a7ddrphy_bitslip5_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip6_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip6_value <= (main_a7ddrphy_bitslip6_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip7_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip7_value <= (main_a7ddrphy_bitslip7_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip8_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip8_value <= (main_a7ddrphy_bitslip8_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip9_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip9_value <= (main_a7ddrphy_bitslip9_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip10_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip10_value <= (main_a7ddrphy_bitslip10_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip11_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip11_value <= (main_a7ddrphy_bitslip11_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip12_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip12_value <= (main_a7ddrphy_bitslip12_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip13_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip13_value <= (main_a7ddrphy_bitslip13_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip14_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip14_value <= (main_a7ddrphy_bitslip14_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip15_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip15_value <= (main_a7ddrphy_bitslip15_value + 1'd1); + end + end + end + main_a7ddrphy_n_rddata_en0 <= main_a7ddrphy_dfi_p2_rddata_en; + main_a7ddrphy_n_rddata_en1 <= main_a7ddrphy_n_rddata_en0; + main_a7ddrphy_n_rddata_en2 <= main_a7ddrphy_n_rddata_en1; + main_a7ddrphy_n_rddata_en3 <= main_a7ddrphy_n_rddata_en2; + main_a7ddrphy_n_rddata_en4 <= main_a7ddrphy_n_rddata_en3; + main_a7ddrphy_n_rddata_en5 <= main_a7ddrphy_n_rddata_en4; + main_a7ddrphy_n_rddata_en6 <= main_a7ddrphy_n_rddata_en5; + main_a7ddrphy_n_rddata_en7 <= main_a7ddrphy_n_rddata_en6; + main_a7ddrphy_dfi_p0_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_dfi_p1_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_dfi_p2_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_dfi_p3_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_last_wrdata_en <= { + main_a7ddrphy_last_wrdata_en[2:0], main_a7ddrphy_dfi_p3_wrdata_en + }; + main_a7ddrphy_oe_dqs <= main_a7ddrphy_oe; + main_a7ddrphy_oe_dq <= main_a7ddrphy_oe; + main_a7ddrphy_bitslip0_r <= {main_a7ddrphy_bitslip0_i, main_a7ddrphy_bitslip0_r[15:8]}; + case (main_a7ddrphy_bitslip0_value) + 1'd0: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[14:7]; + end + endcase + main_a7ddrphy_bitslip1_r <= {main_a7ddrphy_bitslip1_i, main_a7ddrphy_bitslip1_r[15:8]}; + case (main_a7ddrphy_bitslip1_value) + 1'd0: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[14:7]; + end + endcase + main_a7ddrphy_bitslip2_r <= {main_a7ddrphy_bitslip2_i, main_a7ddrphy_bitslip2_r[15:8]}; + case (main_a7ddrphy_bitslip2_value) + 1'd0: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[14:7]; + end + endcase + main_a7ddrphy_bitslip3_r <= {main_a7ddrphy_bitslip3_i, main_a7ddrphy_bitslip3_r[15:8]}; + case (main_a7ddrphy_bitslip3_value) + 1'd0: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[14:7]; + end + endcase + main_a7ddrphy_bitslip4_r <= {main_a7ddrphy_bitslip4_i, main_a7ddrphy_bitslip4_r[15:8]}; + case (main_a7ddrphy_bitslip4_value) + 1'd0: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[14:7]; + end + endcase + main_a7ddrphy_bitslip5_r <= {main_a7ddrphy_bitslip5_i, main_a7ddrphy_bitslip5_r[15:8]}; + case (main_a7ddrphy_bitslip5_value) + 1'd0: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[14:7]; + end + endcase + main_a7ddrphy_bitslip6_r <= {main_a7ddrphy_bitslip6_i, main_a7ddrphy_bitslip6_r[15:8]}; + case (main_a7ddrphy_bitslip6_value) + 1'd0: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[14:7]; + end + endcase + main_a7ddrphy_bitslip7_r <= {main_a7ddrphy_bitslip7_i, main_a7ddrphy_bitslip7_r[15:8]}; + case (main_a7ddrphy_bitslip7_value) + 1'd0: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[14:7]; + end + endcase + main_a7ddrphy_bitslip8_r <= {main_a7ddrphy_bitslip8_i, main_a7ddrphy_bitslip8_r[15:8]}; + case (main_a7ddrphy_bitslip8_value) + 1'd0: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[14:7]; + end + endcase + main_a7ddrphy_bitslip9_r <= {main_a7ddrphy_bitslip9_i, main_a7ddrphy_bitslip9_r[15:8]}; + case (main_a7ddrphy_bitslip9_value) + 1'd0: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[14:7]; + end + endcase + main_a7ddrphy_bitslip10_r <= {main_a7ddrphy_bitslip10_i, main_a7ddrphy_bitslip10_r[15:8]}; + case (main_a7ddrphy_bitslip10_value) + 1'd0: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[14:7]; + end + endcase + main_a7ddrphy_bitslip11_r <= {main_a7ddrphy_bitslip11_i, main_a7ddrphy_bitslip11_r[15:8]}; + case (main_a7ddrphy_bitslip11_value) + 1'd0: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[14:7]; + end + endcase + main_a7ddrphy_bitslip12_r <= {main_a7ddrphy_bitslip12_i, main_a7ddrphy_bitslip12_r[15:8]}; + case (main_a7ddrphy_bitslip12_value) + 1'd0: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[14:7]; + end + endcase + main_a7ddrphy_bitslip13_r <= {main_a7ddrphy_bitslip13_i, main_a7ddrphy_bitslip13_r[15:8]}; + case (main_a7ddrphy_bitslip13_value) + 1'd0: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[14:7]; + end + endcase + main_a7ddrphy_bitslip14_r <= {main_a7ddrphy_bitslip14_i, main_a7ddrphy_bitslip14_r[15:8]}; + case (main_a7ddrphy_bitslip14_value) + 1'd0: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[14:7]; + end + endcase + main_a7ddrphy_bitslip15_r <= {main_a7ddrphy_bitslip15_i, main_a7ddrphy_bitslip15_r[15:8]}; + case (main_a7ddrphy_bitslip15_value) + 1'd0: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[14:7]; + end + endcase + if (main_sdram_inti_p0_rddata_valid) begin + main_sdram_phaseinjector0_status <= main_sdram_inti_p0_rddata; + end + if (main_sdram_inti_p1_rddata_valid) begin + main_sdram_phaseinjector1_status <= main_sdram_inti_p1_rddata; + end + if (main_sdram_inti_p2_rddata_valid) begin + main_sdram_phaseinjector2_status <= main_sdram_inti_p2_rddata; + end + if (main_sdram_inti_p3_rddata_valid) begin + main_sdram_phaseinjector3_status <= main_sdram_inti_p3_rddata; + end + if ((main_sdram_timer_wait & (~main_sdram_timer_done0))) begin + main_sdram_timer_count1 <= (main_sdram_timer_count1 - 1'd1); + end else begin + main_sdram_timer_count1 <= 9'd468; + end + main_sdram_postponer_req_o <= 1'd0; + if (main_sdram_postponer_req_i) begin + main_sdram_postponer_count <= (main_sdram_postponer_count - 1'd1); + if ((main_sdram_postponer_count == 1'd0)) begin + main_sdram_postponer_count <= 1'd0; + main_sdram_postponer_req_o <= 1'd1; + end + end + if (main_sdram_sequencer_start0) begin + main_sdram_sequencer_count <= 1'd0; + end else begin + if (main_sdram_sequencer_done1) begin + if ((main_sdram_sequencer_count != 1'd0)) begin + main_sdram_sequencer_count <= (main_sdram_sequencer_count - 1'd1); + end + end + end + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_sequencer_done1 <= 1'd0; + if ((main_sdram_sequencer_start1 & (main_sdram_sequencer_counter == 1'd0))) begin + main_sdram_cmd_payload_a <= 11'd1024; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd1; + main_sdram_cmd_payload_we <= 1'd1; + end + if ((main_sdram_sequencer_counter == 2'd2)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd1; + main_sdram_cmd_payload_ras <= 1'd1; + main_sdram_cmd_payload_we <= 1'd0; + end + if ((main_sdram_sequencer_counter == 6'd34)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_sequencer_done1 <= 1'd1; + end + if ((main_sdram_sequencer_counter == 6'd34)) begin + main_sdram_sequencer_counter <= 1'd0; + end else begin + if ((main_sdram_sequencer_counter != 1'd0)) begin + main_sdram_sequencer_counter <= (main_sdram_sequencer_counter + 1'd1); + end else begin + if (main_sdram_sequencer_start1) begin + main_sdram_sequencer_counter <= 1'd1; + end + end + end + if ((main_sdram_zqcs_timer_wait & (~main_sdram_zqcs_timer_done0))) begin + main_sdram_zqcs_timer_count1 <= (main_sdram_zqcs_timer_count1 - 1'd1); + end else begin + main_sdram_zqcs_timer_count1 <= 26'd59999999; + end + main_sdram_zqcs_executer_done <= 1'd0; + if ((main_sdram_zqcs_executer_start & (main_sdram_zqcs_executer_counter == 1'd0))) begin + main_sdram_cmd_payload_a <= 11'd1024; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd1; + main_sdram_cmd_payload_we <= 1'd1; + end + if ((main_sdram_zqcs_executer_counter == 2'd2)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd1; + end + if ((main_sdram_zqcs_executer_counter == 5'd18)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_zqcs_executer_done <= 1'd1; + end + if ((main_sdram_zqcs_executer_counter == 5'd18)) begin + main_sdram_zqcs_executer_counter <= 1'd0; + end else begin + if ((main_sdram_zqcs_executer_counter != 1'd0)) begin + main_sdram_zqcs_executer_counter <= (main_sdram_zqcs_executer_counter + 1'd1); + end else begin + if (main_sdram_zqcs_executer_start) begin + main_sdram_zqcs_executer_counter <= 1'd1; + end + end + end + builder_refresher_state <= builder_refresher_next_state; + if (main_sdram_bankmachine0_row_close) begin + main_sdram_bankmachine0_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine0_row_open) begin + main_sdram_bankmachine0_row_opened <= 1'd1; + main_sdram_bankmachine0_row <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine0_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine0_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready)) begin + main_sdram_bankmachine0_cmd_buffer_source_valid <= main_sdram_bankmachine0_cmd_buffer_sink_valid; + main_sdram_bankmachine0_cmd_buffer_source_first <= main_sdram_bankmachine0_cmd_buffer_sink_first; + main_sdram_bankmachine0_cmd_buffer_source_last <= main_sdram_bankmachine0_cmd_buffer_sink_last; + main_sdram_bankmachine0_cmd_buffer_source_payload_we <= main_sdram_bankmachine0_cmd_buffer_sink_payload_we; + main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine0_twtpcon_valid) begin + main_sdram_bankmachine0_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine0_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine0_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine0_twtpcon_ready)) begin + main_sdram_bankmachine0_twtpcon_count <= (main_sdram_bankmachine0_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine0_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine0_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine0_trccon_valid) begin + main_sdram_bankmachine0_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine0_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine0_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine0_trccon_ready)) begin + main_sdram_bankmachine0_trccon_count <= (main_sdram_bankmachine0_trccon_count - 1'd1); + if ((main_sdram_bankmachine0_trccon_count == 1'd1)) begin + main_sdram_bankmachine0_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine0_trascon_valid) begin + main_sdram_bankmachine0_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine0_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine0_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine0_trascon_ready)) begin + main_sdram_bankmachine0_trascon_count <= (main_sdram_bankmachine0_trascon_count - 1'd1); + if ((main_sdram_bankmachine0_trascon_count == 1'd1)) begin + main_sdram_bankmachine0_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine0_state <= builder_bankmachine0_next_state; + if (main_sdram_bankmachine1_row_close) begin + main_sdram_bankmachine1_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine1_row_open) begin + main_sdram_bankmachine1_row_opened <= 1'd1; + main_sdram_bankmachine1_row <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine1_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine1_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready)) begin + main_sdram_bankmachine1_cmd_buffer_source_valid <= main_sdram_bankmachine1_cmd_buffer_sink_valid; + main_sdram_bankmachine1_cmd_buffer_source_first <= main_sdram_bankmachine1_cmd_buffer_sink_first; + main_sdram_bankmachine1_cmd_buffer_source_last <= main_sdram_bankmachine1_cmd_buffer_sink_last; + main_sdram_bankmachine1_cmd_buffer_source_payload_we <= main_sdram_bankmachine1_cmd_buffer_sink_payload_we; + main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine1_twtpcon_valid) begin + main_sdram_bankmachine1_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine1_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine1_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine1_twtpcon_ready)) begin + main_sdram_bankmachine1_twtpcon_count <= (main_sdram_bankmachine1_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine1_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine1_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine1_trccon_valid) begin + main_sdram_bankmachine1_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine1_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine1_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine1_trccon_ready)) begin + main_sdram_bankmachine1_trccon_count <= (main_sdram_bankmachine1_trccon_count - 1'd1); + if ((main_sdram_bankmachine1_trccon_count == 1'd1)) begin + main_sdram_bankmachine1_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine1_trascon_valid) begin + main_sdram_bankmachine1_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine1_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine1_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine1_trascon_ready)) begin + main_sdram_bankmachine1_trascon_count <= (main_sdram_bankmachine1_trascon_count - 1'd1); + if ((main_sdram_bankmachine1_trascon_count == 1'd1)) begin + main_sdram_bankmachine1_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine1_state <= builder_bankmachine1_next_state; + if (main_sdram_bankmachine2_row_close) begin + main_sdram_bankmachine2_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine2_row_open) begin + main_sdram_bankmachine2_row_opened <= 1'd1; + main_sdram_bankmachine2_row <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine2_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine2_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready)) begin + main_sdram_bankmachine2_cmd_buffer_source_valid <= main_sdram_bankmachine2_cmd_buffer_sink_valid; + main_sdram_bankmachine2_cmd_buffer_source_first <= main_sdram_bankmachine2_cmd_buffer_sink_first; + main_sdram_bankmachine2_cmd_buffer_source_last <= main_sdram_bankmachine2_cmd_buffer_sink_last; + main_sdram_bankmachine2_cmd_buffer_source_payload_we <= main_sdram_bankmachine2_cmd_buffer_sink_payload_we; + main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine2_twtpcon_valid) begin + main_sdram_bankmachine2_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine2_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine2_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine2_twtpcon_ready)) begin + main_sdram_bankmachine2_twtpcon_count <= (main_sdram_bankmachine2_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine2_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine2_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine2_trccon_valid) begin + main_sdram_bankmachine2_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine2_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine2_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine2_trccon_ready)) begin + main_sdram_bankmachine2_trccon_count <= (main_sdram_bankmachine2_trccon_count - 1'd1); + if ((main_sdram_bankmachine2_trccon_count == 1'd1)) begin + main_sdram_bankmachine2_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine2_trascon_valid) begin + main_sdram_bankmachine2_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine2_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine2_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine2_trascon_ready)) begin + main_sdram_bankmachine2_trascon_count <= (main_sdram_bankmachine2_trascon_count - 1'd1); + if ((main_sdram_bankmachine2_trascon_count == 1'd1)) begin + main_sdram_bankmachine2_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine2_state <= builder_bankmachine2_next_state; + if (main_sdram_bankmachine3_row_close) begin + main_sdram_bankmachine3_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine3_row_open) begin + main_sdram_bankmachine3_row_opened <= 1'd1; + main_sdram_bankmachine3_row <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine3_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine3_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready)) begin + main_sdram_bankmachine3_cmd_buffer_source_valid <= main_sdram_bankmachine3_cmd_buffer_sink_valid; + main_sdram_bankmachine3_cmd_buffer_source_first <= main_sdram_bankmachine3_cmd_buffer_sink_first; + main_sdram_bankmachine3_cmd_buffer_source_last <= main_sdram_bankmachine3_cmd_buffer_sink_last; + main_sdram_bankmachine3_cmd_buffer_source_payload_we <= main_sdram_bankmachine3_cmd_buffer_sink_payload_we; + main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine3_twtpcon_valid) begin + main_sdram_bankmachine3_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine3_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine3_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine3_twtpcon_ready)) begin + main_sdram_bankmachine3_twtpcon_count <= (main_sdram_bankmachine3_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine3_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine3_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine3_trccon_valid) begin + main_sdram_bankmachine3_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine3_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine3_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine3_trccon_ready)) begin + main_sdram_bankmachine3_trccon_count <= (main_sdram_bankmachine3_trccon_count - 1'd1); + if ((main_sdram_bankmachine3_trccon_count == 1'd1)) begin + main_sdram_bankmachine3_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine3_trascon_valid) begin + main_sdram_bankmachine3_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine3_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine3_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine3_trascon_ready)) begin + main_sdram_bankmachine3_trascon_count <= (main_sdram_bankmachine3_trascon_count - 1'd1); + if ((main_sdram_bankmachine3_trascon_count == 1'd1)) begin + main_sdram_bankmachine3_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine3_state <= builder_bankmachine3_next_state; + if (main_sdram_bankmachine4_row_close) begin + main_sdram_bankmachine4_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine4_row_open) begin + main_sdram_bankmachine4_row_opened <= 1'd1; + main_sdram_bankmachine4_row <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine4_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine4_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready)) begin + main_sdram_bankmachine4_cmd_buffer_source_valid <= main_sdram_bankmachine4_cmd_buffer_sink_valid; + main_sdram_bankmachine4_cmd_buffer_source_first <= main_sdram_bankmachine4_cmd_buffer_sink_first; + main_sdram_bankmachine4_cmd_buffer_source_last <= main_sdram_bankmachine4_cmd_buffer_sink_last; + main_sdram_bankmachine4_cmd_buffer_source_payload_we <= main_sdram_bankmachine4_cmd_buffer_sink_payload_we; + main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine4_twtpcon_valid) begin + main_sdram_bankmachine4_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine4_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine4_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine4_twtpcon_ready)) begin + main_sdram_bankmachine4_twtpcon_count <= (main_sdram_bankmachine4_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine4_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine4_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine4_trccon_valid) begin + main_sdram_bankmachine4_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine4_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine4_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine4_trccon_ready)) begin + main_sdram_bankmachine4_trccon_count <= (main_sdram_bankmachine4_trccon_count - 1'd1); + if ((main_sdram_bankmachine4_trccon_count == 1'd1)) begin + main_sdram_bankmachine4_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine4_trascon_valid) begin + main_sdram_bankmachine4_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine4_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine4_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine4_trascon_ready)) begin + main_sdram_bankmachine4_trascon_count <= (main_sdram_bankmachine4_trascon_count - 1'd1); + if ((main_sdram_bankmachine4_trascon_count == 1'd1)) begin + main_sdram_bankmachine4_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine4_state <= builder_bankmachine4_next_state; + if (main_sdram_bankmachine5_row_close) begin + main_sdram_bankmachine5_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine5_row_open) begin + main_sdram_bankmachine5_row_opened <= 1'd1; + main_sdram_bankmachine5_row <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine5_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine5_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready)) begin + main_sdram_bankmachine5_cmd_buffer_source_valid <= main_sdram_bankmachine5_cmd_buffer_sink_valid; + main_sdram_bankmachine5_cmd_buffer_source_first <= main_sdram_bankmachine5_cmd_buffer_sink_first; + main_sdram_bankmachine5_cmd_buffer_source_last <= main_sdram_bankmachine5_cmd_buffer_sink_last; + main_sdram_bankmachine5_cmd_buffer_source_payload_we <= main_sdram_bankmachine5_cmd_buffer_sink_payload_we; + main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine5_twtpcon_valid) begin + main_sdram_bankmachine5_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine5_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine5_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine5_twtpcon_ready)) begin + main_sdram_bankmachine5_twtpcon_count <= (main_sdram_bankmachine5_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine5_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine5_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine5_trccon_valid) begin + main_sdram_bankmachine5_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine5_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine5_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine5_trccon_ready)) begin + main_sdram_bankmachine5_trccon_count <= (main_sdram_bankmachine5_trccon_count - 1'd1); + if ((main_sdram_bankmachine5_trccon_count == 1'd1)) begin + main_sdram_bankmachine5_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine5_trascon_valid) begin + main_sdram_bankmachine5_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine5_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine5_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine5_trascon_ready)) begin + main_sdram_bankmachine5_trascon_count <= (main_sdram_bankmachine5_trascon_count - 1'd1); + if ((main_sdram_bankmachine5_trascon_count == 1'd1)) begin + main_sdram_bankmachine5_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine5_state <= builder_bankmachine5_next_state; + if (main_sdram_bankmachine6_row_close) begin + main_sdram_bankmachine6_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine6_row_open) begin + main_sdram_bankmachine6_row_opened <= 1'd1; + main_sdram_bankmachine6_row <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine6_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine6_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready)) begin + main_sdram_bankmachine6_cmd_buffer_source_valid <= main_sdram_bankmachine6_cmd_buffer_sink_valid; + main_sdram_bankmachine6_cmd_buffer_source_first <= main_sdram_bankmachine6_cmd_buffer_sink_first; + main_sdram_bankmachine6_cmd_buffer_source_last <= main_sdram_bankmachine6_cmd_buffer_sink_last; + main_sdram_bankmachine6_cmd_buffer_source_payload_we <= main_sdram_bankmachine6_cmd_buffer_sink_payload_we; + main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine6_twtpcon_valid) begin + main_sdram_bankmachine6_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine6_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine6_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine6_twtpcon_ready)) begin + main_sdram_bankmachine6_twtpcon_count <= (main_sdram_bankmachine6_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine6_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine6_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine6_trccon_valid) begin + main_sdram_bankmachine6_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine6_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine6_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine6_trccon_ready)) begin + main_sdram_bankmachine6_trccon_count <= (main_sdram_bankmachine6_trccon_count - 1'd1); + if ((main_sdram_bankmachine6_trccon_count == 1'd1)) begin + main_sdram_bankmachine6_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine6_trascon_valid) begin + main_sdram_bankmachine6_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine6_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine6_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine6_trascon_ready)) begin + main_sdram_bankmachine6_trascon_count <= (main_sdram_bankmachine6_trascon_count - 1'd1); + if ((main_sdram_bankmachine6_trascon_count == 1'd1)) begin + main_sdram_bankmachine6_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine6_state <= builder_bankmachine6_next_state; + if (main_sdram_bankmachine7_row_close) begin + main_sdram_bankmachine7_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine7_row_open) begin + main_sdram_bankmachine7_row_opened <= 1'd1; + main_sdram_bankmachine7_row <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine7_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine7_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready)) begin + main_sdram_bankmachine7_cmd_buffer_source_valid <= main_sdram_bankmachine7_cmd_buffer_sink_valid; + main_sdram_bankmachine7_cmd_buffer_source_first <= main_sdram_bankmachine7_cmd_buffer_sink_first; + main_sdram_bankmachine7_cmd_buffer_source_last <= main_sdram_bankmachine7_cmd_buffer_sink_last; + main_sdram_bankmachine7_cmd_buffer_source_payload_we <= main_sdram_bankmachine7_cmd_buffer_sink_payload_we; + main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine7_twtpcon_valid) begin + main_sdram_bankmachine7_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine7_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine7_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine7_twtpcon_ready)) begin + main_sdram_bankmachine7_twtpcon_count <= (main_sdram_bankmachine7_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine7_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine7_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine7_trccon_valid) begin + main_sdram_bankmachine7_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine7_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine7_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine7_trccon_ready)) begin + main_sdram_bankmachine7_trccon_count <= (main_sdram_bankmachine7_trccon_count - 1'd1); + if ((main_sdram_bankmachine7_trccon_count == 1'd1)) begin + main_sdram_bankmachine7_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine7_trascon_valid) begin + main_sdram_bankmachine7_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine7_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine7_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine7_trascon_ready)) begin + main_sdram_bankmachine7_trascon_count <= (main_sdram_bankmachine7_trascon_count - 1'd1); + if ((main_sdram_bankmachine7_trascon_count == 1'd1)) begin + main_sdram_bankmachine7_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine7_state <= builder_bankmachine7_next_state; + if ((~main_sdram_en0)) begin + main_sdram_time0 <= 5'd31; + end else begin + if ((~main_sdram_max_time0)) begin + main_sdram_time0 <= (main_sdram_time0 - 1'd1); + end + end + if ((~main_sdram_en1)) begin + main_sdram_time1 <= 4'd15; + end else begin + if ((~main_sdram_max_time1)) begin + main_sdram_time1 <= (main_sdram_time1 - 1'd1); + end + end + if (main_sdram_choose_cmd_ce) begin + case (main_sdram_choose_cmd_grant) + 1'd0: begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end + end + end + end + end + end + end + end + 1'd1: begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end + end + end + end + end + end + end + end + 2'd2: begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end + end + end + end + end + end + end + end + 2'd3: begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end + end + end + end + end + end + end + end + 3'd4: begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end + end + end + end + end + end + end + end + 3'd5: begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end + end + end + end + end + end + end + end + 3'd6: begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end + end + end + end + end + end + end + end + 3'd7: begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end + end + end + end + end + end + end + end + endcase + end + if (main_sdram_choose_req_ce) begin + case (main_sdram_choose_req_grant) + 1'd0: begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end + end + end + end + end + end + end + end + 1'd1: begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end + end + end + end + end + end + end + end + 2'd2: begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end + end + end + end + end + end + end + end + 2'd3: begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end + end + end + end + end + end + end + end + 3'd4: begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end + end + end + end + end + end + end + end + 3'd5: begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end + end + end + end + end + end + end + end + 3'd6: begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end + end + end + end + end + end + end + end + 3'd7: begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end + end + end + end + end + end + end + end + endcase + end + main_sdram_dfi_p0_cs_n <= 1'd0; + main_sdram_dfi_p0_bank <= builder_array_muxed0; + main_sdram_dfi_p0_address <= builder_array_muxed1; + main_sdram_dfi_p0_cas_n <= (~builder_array_muxed2); + main_sdram_dfi_p0_ras_n <= (~builder_array_muxed3); + main_sdram_dfi_p0_we_n <= (~builder_array_muxed4); + main_sdram_dfi_p0_rddata_en <= builder_array_muxed5; + main_sdram_dfi_p0_wrdata_en <= builder_array_muxed6; + main_sdram_dfi_p1_cs_n <= 1'd0; + main_sdram_dfi_p1_bank <= builder_array_muxed7; + main_sdram_dfi_p1_address <= builder_array_muxed8; + main_sdram_dfi_p1_cas_n <= (~builder_array_muxed9); + main_sdram_dfi_p1_ras_n <= (~builder_array_muxed10); + main_sdram_dfi_p1_we_n <= (~builder_array_muxed11); + main_sdram_dfi_p1_rddata_en <= builder_array_muxed12; + main_sdram_dfi_p1_wrdata_en <= builder_array_muxed13; + main_sdram_dfi_p2_cs_n <= 1'd0; + main_sdram_dfi_p2_bank <= builder_array_muxed14; + main_sdram_dfi_p2_address <= builder_array_muxed15; + main_sdram_dfi_p2_cas_n <= (~builder_array_muxed16); + main_sdram_dfi_p2_ras_n <= (~builder_array_muxed17); + main_sdram_dfi_p2_we_n <= (~builder_array_muxed18); + main_sdram_dfi_p2_rddata_en <= builder_array_muxed19; + main_sdram_dfi_p2_wrdata_en <= builder_array_muxed20; + main_sdram_dfi_p3_cs_n <= 1'd0; + main_sdram_dfi_p3_bank <= builder_array_muxed21; + main_sdram_dfi_p3_address <= builder_array_muxed22; + main_sdram_dfi_p3_cas_n <= (~builder_array_muxed23); + main_sdram_dfi_p3_ras_n <= (~builder_array_muxed24); + main_sdram_dfi_p3_we_n <= (~builder_array_muxed25); + main_sdram_dfi_p3_rddata_en <= builder_array_muxed26; + main_sdram_dfi_p3_wrdata_en <= builder_array_muxed27; + if (main_sdram_trrdcon_valid) begin + main_sdram_trrdcon_count <= 1'd1; + if (1'd0) begin + main_sdram_trrdcon_ready <= 1'd1; + end else begin + main_sdram_trrdcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_trrdcon_ready)) begin + main_sdram_trrdcon_count <= (main_sdram_trrdcon_count - 1'd1); + if ((main_sdram_trrdcon_count == 1'd1)) begin + main_sdram_trrdcon_ready <= 1'd1; + end + end + end + main_sdram_tfawcon_window <= {main_sdram_tfawcon_window, main_sdram_tfawcon_valid}; + if ((main_sdram_tfawcon_count < 3'd4)) begin + if ((main_sdram_tfawcon_count == 2'd3)) begin + main_sdram_tfawcon_ready <= (~main_sdram_tfawcon_valid); + end else begin + main_sdram_tfawcon_ready <= 1'd1; + end + end + if (main_sdram_tccdcon_valid) begin + main_sdram_tccdcon_count <= 1'd0; + if (1'd1) begin + main_sdram_tccdcon_ready <= 1'd1; + end else begin + main_sdram_tccdcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_tccdcon_ready)) begin + main_sdram_tccdcon_count <= (main_sdram_tccdcon_count - 1'd1); + if ((main_sdram_tccdcon_count == 1'd1)) begin + main_sdram_tccdcon_ready <= 1'd1; + end + end + end + if (main_sdram_twtrcon_valid) begin + main_sdram_twtrcon_count <= 3'd4; + if (1'd0) begin + main_sdram_twtrcon_ready <= 1'd1; + end else begin + main_sdram_twtrcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_twtrcon_ready)) begin + main_sdram_twtrcon_count <= (main_sdram_twtrcon_count - 1'd1); + if ((main_sdram_twtrcon_count == 1'd1)) begin + main_sdram_twtrcon_ready <= 1'd1; + end + end + end + builder_multiplexer_state <= builder_multiplexer_next_state; + if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) begin + builder_rbank <= 1'd0; + end + if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) begin + builder_wbank <= 1'd0; + end + if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) begin + builder_rbank <= 1'd1; + end + if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) begin + builder_wbank <= 1'd1; + end + if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) begin + builder_rbank <= 2'd2; + end + if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) begin + builder_wbank <= 2'd2; + end + if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) begin + builder_rbank <= 2'd3; + end + if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) begin + builder_wbank <= 2'd3; + end + if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) begin + builder_rbank <= 3'd4; + end + if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) begin + builder_wbank <= 3'd4; + end + if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) begin + builder_rbank <= 3'd5; + end + if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) begin + builder_wbank <= 3'd5; + end + if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) begin + builder_rbank <= 3'd6; + end + if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) begin + builder_wbank <= 3'd6; + end + if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)) begin + builder_rbank <= 3'd7; + end + if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)) begin + builder_wbank <= 3'd7; + end + builder_new_master_wdata_ready0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)); + builder_new_master_wdata_ready1 <= builder_new_master_wdata_ready0; + builder_new_master_wdata_ready2 <= builder_new_master_wdata_ready1; + builder_new_master_rdata_valid0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)); + builder_new_master_rdata_valid1 <= builder_new_master_rdata_valid0; + builder_new_master_rdata_valid2 <= builder_new_master_rdata_valid1; + builder_new_master_rdata_valid3 <= builder_new_master_rdata_valid2; + builder_new_master_rdata_valid4 <= builder_new_master_rdata_valid3; + builder_new_master_rdata_valid5 <= builder_new_master_rdata_valid4; + builder_new_master_rdata_valid6 <= builder_new_master_rdata_valid5; + builder_new_master_rdata_valid7 <= builder_new_master_rdata_valid6; + builder_new_master_rdata_valid8 <= builder_new_master_rdata_valid7; + builder_new_master_rdata_valid9 <= builder_new_master_rdata_valid8; + main_adr_offset_r <= main_interface0_wb_sdram_adr[1:0]; + builder_fullmemorywe_state <= builder_fullmemorywe_next_state; + builder_litedramwishbone2native_state <= builder_litedramwishbone2native_next_state; + if (main_count_next_value_ce) begin + main_count <= main_count_next_value; + end + case (builder_minsoc_grant) + 1'd0: begin + if ((~builder_minsoc_request[0])) begin + if (builder_minsoc_request[1]) begin + builder_minsoc_grant <= 1'd1; + end + end + end + 1'd1: begin + if ((~builder_minsoc_request[1])) begin + if (builder_minsoc_request[0]) begin + builder_minsoc_grant <= 1'd0; + end + end + end + endcase + builder_minsoc_slave_sel_r <= builder_minsoc_slave_sel; + if (builder_minsoc_wait) begin + if ((~builder_minsoc_done)) begin + builder_minsoc_count <= (builder_minsoc_count - 1'd1); + end + end else begin + builder_minsoc_count <= 20'd1000000; + end + builder_minsoc_interface0_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank0_sel) begin + case (builder_minsoc_interface0_bank_bus_adr[3:0]) + 1'd0: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_reset0_w; + end + 1'd1: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch3_w; + end + 2'd2: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch2_w; + end + 2'd3: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch1_w; + end + 3'd4: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch0_w; + end + 3'd5: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors3_w; + end + 3'd6: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors2_w; + end + 3'd7: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors1_w; + end + 4'd8: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors0_w; + end + endcase + end + if (builder_minsoc_csrbank0_reset0_re) begin + main_minsoc_ctrl_reset_storage <= builder_minsoc_csrbank0_reset0_r; + end + main_minsoc_ctrl_reset_re <= builder_minsoc_csrbank0_reset0_re; + if (builder_minsoc_csrbank0_scratch3_re) begin + main_minsoc_ctrl_scratch_storage[31:24] <= builder_minsoc_csrbank0_scratch3_r; + end + if (builder_minsoc_csrbank0_scratch2_re) begin + main_minsoc_ctrl_scratch_storage[23:16] <= builder_minsoc_csrbank0_scratch2_r; + end + if (builder_minsoc_csrbank0_scratch1_re) begin + main_minsoc_ctrl_scratch_storage[15:8] <= builder_minsoc_csrbank0_scratch1_r; + end + if (builder_minsoc_csrbank0_scratch0_re) begin + main_minsoc_ctrl_scratch_storage[7:0] <= builder_minsoc_csrbank0_scratch0_r; + end + main_minsoc_ctrl_scratch_re <= builder_minsoc_csrbank0_scratch0_re; + builder_minsoc_interface1_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank1_sel) begin + case (builder_minsoc_interface1_bank_bus_adr[2:0]) + 1'd0: begin + builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_half_sys8x_taps0_w; + end + 1'd1: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_rst_w; + end + 2'd2: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_inc_w; + end + 2'd3: begin + builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_dly_sel0_w; + end + 3'd4: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_rst_w; + end + 3'd5: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_inc_w; + end + 3'd6: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_rst_w; + end + 3'd7: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_w; + end + endcase + end + if (builder_minsoc_csrbank1_half_sys8x_taps0_re) begin + main_a7ddrphy_half_sys8x_taps_storage[4:0] <= builder_minsoc_csrbank1_half_sys8x_taps0_r; + end + main_a7ddrphy_half_sys8x_taps_re <= builder_minsoc_csrbank1_half_sys8x_taps0_re; + if (builder_minsoc_csrbank1_dly_sel0_re) begin + main_a7ddrphy_dly_sel_storage[1:0] <= builder_minsoc_csrbank1_dly_sel0_r; + end + main_a7ddrphy_dly_sel_re <= builder_minsoc_csrbank1_dly_sel0_re; + builder_minsoc_interface2_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank2_sel) begin + case (builder_minsoc_interface2_bank_bus_adr[5:0]) + 1'd0: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_control0_w; + end + 1'd1: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_command0_w; + end + 2'd2: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector0_command_issue_w; + end + 2'd3: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address1_w; + end + 3'd4: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address0_w; + end + 3'd5: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_baddress0_w; + end + 3'd6: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; + end + 3'd7: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; + end + 4'd8: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; + end + 4'd9: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; + end + 4'd10: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata3_w; + end + 4'd11: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata2_w; + end + 4'd12: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata1_w; + end + 4'd13: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata0_w; + end + 4'd14: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_command0_w; + end + 4'd15: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector1_command_issue_w; + end + 5'd16: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address1_w; + end + 5'd17: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address0_w; + end + 5'd18: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_baddress0_w; + end + 5'd19: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; + end + 5'd20: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; + end + 5'd21: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; + end + 5'd22: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; + end + 5'd23: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata3_w; + end + 5'd24: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata2_w; + end + 5'd25: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata1_w; + end + 5'd26: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata0_w; + end + 5'd27: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_command0_w; + end + 5'd28: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector2_command_issue_w; + end + 5'd29: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address1_w; + end + 5'd30: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address0_w; + end + 5'd31: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_baddress0_w; + end + 6'd32: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; + end + 6'd33: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; + end + 6'd34: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; + end + 6'd35: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; + end + 6'd36: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata3_w; + end + 6'd37: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata2_w; + end + 6'd38: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata1_w; + end + 6'd39: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata0_w; + end + 6'd40: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_command0_w; + end + 6'd41: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector3_command_issue_w; + end + 6'd42: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address1_w; + end + 6'd43: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address0_w; + end + 6'd44: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_baddress0_w; + end + 6'd45: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; + end + 6'd46: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; + end + 6'd47: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; + end + 6'd48: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; + end + 6'd49: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata3_w; + end + 6'd50: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata2_w; + end + 6'd51: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata1_w; + end + 6'd52: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata0_w; + end + endcase + end + if (builder_minsoc_csrbank2_dfii_control0_re) begin + main_sdram_storage[3:0] <= builder_minsoc_csrbank2_dfii_control0_r; + end + main_sdram_re <= builder_minsoc_csrbank2_dfii_control0_re; + if (builder_minsoc_csrbank2_dfii_pi0_command0_re) begin + main_sdram_phaseinjector0_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi0_command0_r; + end + main_sdram_phaseinjector0_command_re <= builder_minsoc_csrbank2_dfii_pi0_command0_re; + if (builder_minsoc_csrbank2_dfii_pi0_address1_re) begin + main_sdram_phaseinjector0_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi0_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_address0_re) begin + main_sdram_phaseinjector0_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_address0_r; + end + main_sdram_phaseinjector0_address_re <= builder_minsoc_csrbank2_dfii_pi0_address0_re; + if (builder_minsoc_csrbank2_dfii_pi0_baddress0_re) begin + main_sdram_phaseinjector0_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi0_baddress0_r; + end + main_sdram_phaseinjector0_baddress_re <= builder_minsoc_csrbank2_dfii_pi0_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi0_wrdata3_re) begin + main_sdram_phaseinjector0_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_wrdata2_re) begin + main_sdram_phaseinjector0_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_wrdata1_re) begin + main_sdram_phaseinjector0_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_wrdata0_re) begin + main_sdram_phaseinjector0_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; + end + main_sdram_phaseinjector0_wrdata_re <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; + if (builder_minsoc_csrbank2_dfii_pi1_command0_re) begin + main_sdram_phaseinjector1_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi1_command0_r; + end + main_sdram_phaseinjector1_command_re <= builder_minsoc_csrbank2_dfii_pi1_command0_re; + if (builder_minsoc_csrbank2_dfii_pi1_address1_re) begin + main_sdram_phaseinjector1_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi1_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_address0_re) begin + main_sdram_phaseinjector1_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_address0_r; + end + main_sdram_phaseinjector1_address_re <= builder_minsoc_csrbank2_dfii_pi1_address0_re; + if (builder_minsoc_csrbank2_dfii_pi1_baddress0_re) begin + main_sdram_phaseinjector1_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi1_baddress0_r; + end + main_sdram_phaseinjector1_baddress_re <= builder_minsoc_csrbank2_dfii_pi1_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi1_wrdata3_re) begin + main_sdram_phaseinjector1_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_wrdata2_re) begin + main_sdram_phaseinjector1_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_wrdata1_re) begin + main_sdram_phaseinjector1_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_wrdata0_re) begin + main_sdram_phaseinjector1_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; + end + main_sdram_phaseinjector1_wrdata_re <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; + if (builder_minsoc_csrbank2_dfii_pi2_command0_re) begin + main_sdram_phaseinjector2_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi2_command0_r; + end + main_sdram_phaseinjector2_command_re <= builder_minsoc_csrbank2_dfii_pi2_command0_re; + if (builder_minsoc_csrbank2_dfii_pi2_address1_re) begin + main_sdram_phaseinjector2_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi2_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_address0_re) begin + main_sdram_phaseinjector2_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_address0_r; + end + main_sdram_phaseinjector2_address_re <= builder_minsoc_csrbank2_dfii_pi2_address0_re; + if (builder_minsoc_csrbank2_dfii_pi2_baddress0_re) begin + main_sdram_phaseinjector2_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi2_baddress0_r; + end + main_sdram_phaseinjector2_baddress_re <= builder_minsoc_csrbank2_dfii_pi2_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi2_wrdata3_re) begin + main_sdram_phaseinjector2_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_wrdata2_re) begin + main_sdram_phaseinjector2_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_wrdata1_re) begin + main_sdram_phaseinjector2_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_wrdata0_re) begin + main_sdram_phaseinjector2_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; + end + main_sdram_phaseinjector2_wrdata_re <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; + if (builder_minsoc_csrbank2_dfii_pi3_command0_re) begin + main_sdram_phaseinjector3_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi3_command0_r; + end + main_sdram_phaseinjector3_command_re <= builder_minsoc_csrbank2_dfii_pi3_command0_re; + if (builder_minsoc_csrbank2_dfii_pi3_address1_re) begin + main_sdram_phaseinjector3_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi3_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_address0_re) begin + main_sdram_phaseinjector3_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_address0_r; + end + main_sdram_phaseinjector3_address_re <= builder_minsoc_csrbank2_dfii_pi3_address0_re; + if (builder_minsoc_csrbank2_dfii_pi3_baddress0_re) begin + main_sdram_phaseinjector3_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi3_baddress0_r; + end + main_sdram_phaseinjector3_baddress_re <= builder_minsoc_csrbank2_dfii_pi3_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi3_wrdata3_re) begin + main_sdram_phaseinjector3_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_wrdata2_re) begin + main_sdram_phaseinjector3_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_wrdata1_re) begin + main_sdram_phaseinjector3_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_wrdata0_re) begin + main_sdram_phaseinjector3_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; + end + main_sdram_phaseinjector3_wrdata_re <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; + builder_minsoc_interface3_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank3_sel) begin + case (builder_minsoc_interface3_bank_bus_adr[4:0]) + 1'd0: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load3_w; + end + 1'd1: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load2_w; + end + 2'd2: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load1_w; + end + 2'd3: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load0_w; + end + 3'd4: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload3_w; + end + 3'd5: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload2_w; + end + 3'd6: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload1_w; + end + 3'd7: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload0_w; + end + 4'd8: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_en0_w; + end + 4'd9: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_update_value0_w; + end + 4'd10: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value3_w; + end + 4'd11: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value2_w; + end + 4'd12: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value1_w; + end + 4'd13: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value0_w; + end + 4'd14: begin + builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_status_w; + end + 4'd15: begin + builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_pending_w; + end + 5'd16: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_ev_enable0_w; + end + endcase + end + if (builder_minsoc_csrbank3_load3_re) begin + main_minsoc_timer0_load_storage[31:24] <= builder_minsoc_csrbank3_load3_r; + end + if (builder_minsoc_csrbank3_load2_re) begin + main_minsoc_timer0_load_storage[23:16] <= builder_minsoc_csrbank3_load2_r; + end + if (builder_minsoc_csrbank3_load1_re) begin + main_minsoc_timer0_load_storage[15:8] <= builder_minsoc_csrbank3_load1_r; + end + if (builder_minsoc_csrbank3_load0_re) begin + main_minsoc_timer0_load_storage[7:0] <= builder_minsoc_csrbank3_load0_r; + end + main_minsoc_timer0_load_re <= builder_minsoc_csrbank3_load0_re; + if (builder_minsoc_csrbank3_reload3_re) begin + main_minsoc_timer0_reload_storage[31:24] <= builder_minsoc_csrbank3_reload3_r; + end + if (builder_minsoc_csrbank3_reload2_re) begin + main_minsoc_timer0_reload_storage[23:16] <= builder_minsoc_csrbank3_reload2_r; + end + if (builder_minsoc_csrbank3_reload1_re) begin + main_minsoc_timer0_reload_storage[15:8] <= builder_minsoc_csrbank3_reload1_r; + end + if (builder_minsoc_csrbank3_reload0_re) begin + main_minsoc_timer0_reload_storage[7:0] <= builder_minsoc_csrbank3_reload0_r; + end + main_minsoc_timer0_reload_re <= builder_minsoc_csrbank3_reload0_re; + if (builder_minsoc_csrbank3_en0_re) begin + main_minsoc_timer0_en_storage <= builder_minsoc_csrbank3_en0_r; + end + main_minsoc_timer0_en_re <= builder_minsoc_csrbank3_en0_re; + if (builder_minsoc_csrbank3_update_value0_re) begin + main_minsoc_timer0_update_value_storage <= builder_minsoc_csrbank3_update_value0_r; + end + main_minsoc_timer0_update_value_re <= builder_minsoc_csrbank3_update_value0_re; + if (builder_minsoc_csrbank3_ev_enable0_re) begin + main_minsoc_timer0_eventmanager_storage <= builder_minsoc_csrbank3_ev_enable0_r; + end + main_minsoc_timer0_eventmanager_re <= builder_minsoc_csrbank3_ev_enable0_re; + builder_minsoc_interface4_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank4_sel) begin + case (builder_minsoc_interface4_bank_bus_adr[2:0]) + 1'd0: begin + builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_rxtx_w; + end + 1'd1: begin + builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_txfull_w; + end + 2'd2: begin + builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_rxempty_w; + end + 2'd3: begin + builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_status_w; + end + 3'd4: begin + builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_pending_w; + end + 3'd5: begin + builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_ev_enable0_w; + end + endcase + end + if (builder_minsoc_csrbank4_ev_enable0_re) begin + main_minsoc_uart_eventmanager_storage[1:0] <= builder_minsoc_csrbank4_ev_enable0_r; + end + main_minsoc_uart_eventmanager_re <= builder_minsoc_csrbank4_ev_enable0_re; + builder_minsoc_interface5_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank5_sel) begin + case (builder_minsoc_interface5_bank_bus_adr[1:0]) + 1'd0: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word3_w; + end + 1'd1: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word2_w; + end + 2'd2: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word1_w; + end + 2'd3: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word0_w; + end + endcase + end + if (builder_minsoc_csrbank5_tuning_word3_re) begin + main_minsoc_storage[31:24] <= builder_minsoc_csrbank5_tuning_word3_r; + end + if (builder_minsoc_csrbank5_tuning_word2_re) begin + main_minsoc_storage[23:16] <= builder_minsoc_csrbank5_tuning_word2_r; + end + if (builder_minsoc_csrbank5_tuning_word1_re) begin + main_minsoc_storage[15:8] <= builder_minsoc_csrbank5_tuning_word1_r; + end + if (builder_minsoc_csrbank5_tuning_word0_re) begin + main_minsoc_storage[7:0] <= builder_minsoc_csrbank5_tuning_word0_r; + end + main_minsoc_re <= builder_minsoc_csrbank5_tuning_word0_re; + if (sys_rst) begin + main_minsoc_ctrl_reset_storage <= 1'd0; + main_minsoc_ctrl_reset_re <= 1'd0; + main_minsoc_ctrl_scratch_storage <= 32'd305419896; + main_minsoc_ctrl_scratch_re <= 1'd0; + main_minsoc_ctrl_bus_errors <= 32'd0; + main_minsoc_rom_bus_ack <= 1'd0; + main_minsoc_sram_bus_ack <= 1'd0; + serial_tx <= 1'd1; + main_minsoc_storage <= 32'd8246337; + main_minsoc_re <= 1'd0; + main_minsoc_sink_ready <= 1'd0; + main_minsoc_uart_clk_txen <= 1'd0; + main_minsoc_phase_accumulator_tx <= 32'd0; + main_minsoc_tx_reg <= 8'd0; + main_minsoc_tx_bitcount <= 4'd0; + main_minsoc_tx_busy <= 1'd0; + main_minsoc_source_valid <= 1'd0; + main_minsoc_source_payload_data <= 8'd0; + main_minsoc_uart_clk_rxen <= 1'd0; + main_minsoc_phase_accumulator_rx <= 32'd0; + main_minsoc_rx_r <= 1'd0; + main_minsoc_rx_reg <= 8'd0; + main_minsoc_rx_bitcount <= 4'd0; + main_minsoc_rx_busy <= 1'd0; + main_minsoc_uart_tx_pending <= 1'd0; + main_minsoc_uart_tx_old_trigger <= 1'd0; + main_minsoc_uart_rx_pending <= 1'd0; + main_minsoc_uart_rx_old_trigger <= 1'd0; + main_minsoc_uart_eventmanager_storage <= 2'd0; + main_minsoc_uart_eventmanager_re <= 1'd0; + main_minsoc_uart_tx_fifo_readable <= 1'd0; + main_minsoc_uart_tx_fifo_level0 <= 5'd0; + main_minsoc_uart_tx_fifo_produce <= 4'd0; + main_minsoc_uart_tx_fifo_consume <= 4'd0; + main_minsoc_uart_rx_fifo_readable <= 1'd0; + main_minsoc_uart_rx_fifo_level0 <= 5'd0; + main_minsoc_uart_rx_fifo_produce <= 4'd0; + main_minsoc_uart_rx_fifo_consume <= 4'd0; + main_minsoc_timer0_load_storage <= 32'd0; + main_minsoc_timer0_load_re <= 1'd0; + main_minsoc_timer0_reload_storage <= 32'd0; + main_minsoc_timer0_reload_re <= 1'd0; + main_minsoc_timer0_en_storage <= 1'd0; + main_minsoc_timer0_en_re <= 1'd0; + main_minsoc_timer0_update_value_storage <= 1'd0; + main_minsoc_timer0_update_value_re <= 1'd0; + main_minsoc_timer0_value_status <= 32'd0; + main_minsoc_timer0_zero_pending <= 1'd0; + main_minsoc_timer0_zero_old_trigger <= 1'd0; + main_minsoc_timer0_eventmanager_storage <= 1'd0; + main_minsoc_timer0_eventmanager_re <= 1'd0; + main_minsoc_timer0_value <= 32'd0; + main_a7ddrphy_half_sys8x_taps_storage <= 5'd13; + main_a7ddrphy_half_sys8x_taps_re <= 1'd0; + main_a7ddrphy_dly_sel_storage <= 2'd0; + main_a7ddrphy_dly_sel_re <= 1'd0; + main_a7ddrphy_dfi_p0_rddata_valid <= 1'd0; + main_a7ddrphy_dfi_p1_rddata_valid <= 1'd0; + main_a7ddrphy_dfi_p2_rddata_valid <= 1'd0; + main_a7ddrphy_dfi_p3_rddata_valid <= 1'd0; + main_a7ddrphy_oe_dqs <= 1'd0; + main_a7ddrphy_oe_dq <= 1'd0; + main_a7ddrphy_bitslip0_o <= 8'd0; + main_a7ddrphy_bitslip0_value <= 3'd0; + main_a7ddrphy_bitslip0_r <= 16'd0; + main_a7ddrphy_bitslip1_o <= 8'd0; + main_a7ddrphy_bitslip1_value <= 3'd0; + main_a7ddrphy_bitslip1_r <= 16'd0; + main_a7ddrphy_bitslip2_o <= 8'd0; + main_a7ddrphy_bitslip2_value <= 3'd0; + main_a7ddrphy_bitslip2_r <= 16'd0; + main_a7ddrphy_bitslip3_o <= 8'd0; + main_a7ddrphy_bitslip3_value <= 3'd0; + main_a7ddrphy_bitslip3_r <= 16'd0; + main_a7ddrphy_bitslip4_o <= 8'd0; + main_a7ddrphy_bitslip4_value <= 3'd0; + main_a7ddrphy_bitslip4_r <= 16'd0; + main_a7ddrphy_bitslip5_o <= 8'd0; + main_a7ddrphy_bitslip5_value <= 3'd0; + main_a7ddrphy_bitslip5_r <= 16'd0; + main_a7ddrphy_bitslip6_o <= 8'd0; + main_a7ddrphy_bitslip6_value <= 3'd0; + main_a7ddrphy_bitslip6_r <= 16'd0; + main_a7ddrphy_bitslip7_o <= 8'd0; + main_a7ddrphy_bitslip7_value <= 3'd0; + main_a7ddrphy_bitslip7_r <= 16'd0; + main_a7ddrphy_bitslip8_o <= 8'd0; + main_a7ddrphy_bitslip8_value <= 3'd0; + main_a7ddrphy_bitslip8_r <= 16'd0; + main_a7ddrphy_bitslip9_o <= 8'd0; + main_a7ddrphy_bitslip9_value <= 3'd0; + main_a7ddrphy_bitslip9_r <= 16'd0; + main_a7ddrphy_bitslip10_o <= 8'd0; + main_a7ddrphy_bitslip10_value <= 3'd0; + main_a7ddrphy_bitslip10_r <= 16'd0; + main_a7ddrphy_bitslip11_o <= 8'd0; + main_a7ddrphy_bitslip11_value <= 3'd0; + main_a7ddrphy_bitslip11_r <= 16'd0; + main_a7ddrphy_bitslip12_o <= 8'd0; + main_a7ddrphy_bitslip12_value <= 3'd0; + main_a7ddrphy_bitslip12_r <= 16'd0; + main_a7ddrphy_bitslip13_o <= 8'd0; + main_a7ddrphy_bitslip13_value <= 3'd0; + main_a7ddrphy_bitslip13_r <= 16'd0; + main_a7ddrphy_bitslip14_o <= 8'd0; + main_a7ddrphy_bitslip14_value <= 3'd0; + main_a7ddrphy_bitslip14_r <= 16'd0; + main_a7ddrphy_bitslip15_o <= 8'd0; + main_a7ddrphy_bitslip15_value <= 3'd0; + main_a7ddrphy_bitslip15_r <= 16'd0; + main_a7ddrphy_n_rddata_en0 <= 1'd0; + main_a7ddrphy_n_rddata_en1 <= 1'd0; + main_a7ddrphy_n_rddata_en2 <= 1'd0; + main_a7ddrphy_n_rddata_en3 <= 1'd0; + main_a7ddrphy_n_rddata_en4 <= 1'd0; + main_a7ddrphy_n_rddata_en5 <= 1'd0; + main_a7ddrphy_n_rddata_en6 <= 1'd0; + main_a7ddrphy_n_rddata_en7 <= 1'd0; + main_a7ddrphy_last_wrdata_en <= 4'd0; + main_sdram_storage <= 4'd0; + main_sdram_re <= 1'd0; + main_sdram_phaseinjector0_command_storage <= 6'd0; + main_sdram_phaseinjector0_command_re <= 1'd0; + main_sdram_phaseinjector0_address_storage <= 14'd0; + main_sdram_phaseinjector0_address_re <= 1'd0; + main_sdram_phaseinjector0_baddress_storage <= 3'd0; + main_sdram_phaseinjector0_baddress_re <= 1'd0; + main_sdram_phaseinjector0_wrdata_storage <= 32'd0; + main_sdram_phaseinjector0_wrdata_re <= 1'd0; + main_sdram_phaseinjector0_status <= 32'd0; + main_sdram_phaseinjector1_command_storage <= 6'd0; + main_sdram_phaseinjector1_command_re <= 1'd0; + main_sdram_phaseinjector1_address_storage <= 14'd0; + main_sdram_phaseinjector1_address_re <= 1'd0; + main_sdram_phaseinjector1_baddress_storage <= 3'd0; + main_sdram_phaseinjector1_baddress_re <= 1'd0; + main_sdram_phaseinjector1_wrdata_storage <= 32'd0; + main_sdram_phaseinjector1_wrdata_re <= 1'd0; + main_sdram_phaseinjector1_status <= 32'd0; + main_sdram_phaseinjector2_command_storage <= 6'd0; + main_sdram_phaseinjector2_command_re <= 1'd0; + main_sdram_phaseinjector2_address_storage <= 14'd0; + main_sdram_phaseinjector2_address_re <= 1'd0; + main_sdram_phaseinjector2_baddress_storage <= 3'd0; + main_sdram_phaseinjector2_baddress_re <= 1'd0; + main_sdram_phaseinjector2_wrdata_storage <= 32'd0; + main_sdram_phaseinjector2_wrdata_re <= 1'd0; + main_sdram_phaseinjector2_status <= 32'd0; + main_sdram_phaseinjector3_command_storage <= 6'd0; + main_sdram_phaseinjector3_command_re <= 1'd0; + main_sdram_phaseinjector3_address_storage <= 14'd0; + main_sdram_phaseinjector3_address_re <= 1'd0; + main_sdram_phaseinjector3_baddress_storage <= 3'd0; + main_sdram_phaseinjector3_baddress_re <= 1'd0; + main_sdram_phaseinjector3_wrdata_storage <= 32'd0; + main_sdram_phaseinjector3_wrdata_re <= 1'd0; + main_sdram_phaseinjector3_status <= 32'd0; + main_sdram_dfi_p0_address <= 14'd0; + main_sdram_dfi_p0_bank <= 3'd0; + main_sdram_dfi_p0_cas_n <= 1'd1; + main_sdram_dfi_p0_cs_n <= 1'd1; + main_sdram_dfi_p0_ras_n <= 1'd1; + main_sdram_dfi_p0_we_n <= 1'd1; + main_sdram_dfi_p0_wrdata_en <= 1'd0; + main_sdram_dfi_p0_rddata_en <= 1'd0; + main_sdram_dfi_p1_address <= 14'd0; + main_sdram_dfi_p1_bank <= 3'd0; + main_sdram_dfi_p1_cas_n <= 1'd1; + main_sdram_dfi_p1_cs_n <= 1'd1; + main_sdram_dfi_p1_ras_n <= 1'd1; + main_sdram_dfi_p1_we_n <= 1'd1; + main_sdram_dfi_p1_wrdata_en <= 1'd0; + main_sdram_dfi_p1_rddata_en <= 1'd0; + main_sdram_dfi_p2_address <= 14'd0; + main_sdram_dfi_p2_bank <= 3'd0; + main_sdram_dfi_p2_cas_n <= 1'd1; + main_sdram_dfi_p2_cs_n <= 1'd1; + main_sdram_dfi_p2_ras_n <= 1'd1; + main_sdram_dfi_p2_we_n <= 1'd1; + main_sdram_dfi_p2_wrdata_en <= 1'd0; + main_sdram_dfi_p2_rddata_en <= 1'd0; + main_sdram_dfi_p3_address <= 14'd0; + main_sdram_dfi_p3_bank <= 3'd0; + main_sdram_dfi_p3_cas_n <= 1'd1; + main_sdram_dfi_p3_cs_n <= 1'd1; + main_sdram_dfi_p3_ras_n <= 1'd1; + main_sdram_dfi_p3_we_n <= 1'd1; + main_sdram_dfi_p3_wrdata_en <= 1'd0; + main_sdram_dfi_p3_rddata_en <= 1'd0; + main_sdram_cmd_payload_a <= 14'd0; + main_sdram_cmd_payload_ba <= 3'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_timer_count1 <= 9'd468; + main_sdram_postponer_req_o <= 1'd0; + main_sdram_postponer_count <= 1'd0; + main_sdram_sequencer_done1 <= 1'd0; + main_sdram_sequencer_counter <= 6'd0; + main_sdram_sequencer_count <= 1'd0; + main_sdram_zqcs_timer_count1 <= 26'd59999999; + main_sdram_zqcs_executer_done <= 1'd0; + main_sdram_zqcs_executer_counter <= 5'd0; + main_sdram_bankmachine0_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine0_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine0_row <= 14'd0; + main_sdram_bankmachine0_row_opened <= 1'd0; + main_sdram_bankmachine0_twtpcon_ready <= 1'd1; + main_sdram_bankmachine0_twtpcon_count <= 3'd0; + main_sdram_bankmachine0_trccon_ready <= 1'd1; + main_sdram_bankmachine0_trccon_count <= 2'd0; + main_sdram_bankmachine0_trascon_ready <= 1'd1; + main_sdram_bankmachine0_trascon_count <= 2'd0; + main_sdram_bankmachine1_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine1_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine1_row <= 14'd0; + main_sdram_bankmachine1_row_opened <= 1'd0; + main_sdram_bankmachine1_twtpcon_ready <= 1'd1; + main_sdram_bankmachine1_twtpcon_count <= 3'd0; + main_sdram_bankmachine1_trccon_ready <= 1'd1; + main_sdram_bankmachine1_trccon_count <= 2'd0; + main_sdram_bankmachine1_trascon_ready <= 1'd1; + main_sdram_bankmachine1_trascon_count <= 2'd0; + main_sdram_bankmachine2_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine2_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine2_row <= 14'd0; + main_sdram_bankmachine2_row_opened <= 1'd0; + main_sdram_bankmachine2_twtpcon_ready <= 1'd1; + main_sdram_bankmachine2_twtpcon_count <= 3'd0; + main_sdram_bankmachine2_trccon_ready <= 1'd1; + main_sdram_bankmachine2_trccon_count <= 2'd0; + main_sdram_bankmachine2_trascon_ready <= 1'd1; + main_sdram_bankmachine2_trascon_count <= 2'd0; + main_sdram_bankmachine3_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine3_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine3_row <= 14'd0; + main_sdram_bankmachine3_row_opened <= 1'd0; + main_sdram_bankmachine3_twtpcon_ready <= 1'd1; + main_sdram_bankmachine3_twtpcon_count <= 3'd0; + main_sdram_bankmachine3_trccon_ready <= 1'd1; + main_sdram_bankmachine3_trccon_count <= 2'd0; + main_sdram_bankmachine3_trascon_ready <= 1'd1; + main_sdram_bankmachine3_trascon_count <= 2'd0; + main_sdram_bankmachine4_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine4_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine4_row <= 14'd0; + main_sdram_bankmachine4_row_opened <= 1'd0; + main_sdram_bankmachine4_twtpcon_ready <= 1'd1; + main_sdram_bankmachine4_twtpcon_count <= 3'd0; + main_sdram_bankmachine4_trccon_ready <= 1'd1; + main_sdram_bankmachine4_trccon_count <= 2'd0; + main_sdram_bankmachine4_trascon_ready <= 1'd1; + main_sdram_bankmachine4_trascon_count <= 2'd0; + main_sdram_bankmachine5_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine5_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine5_row <= 14'd0; + main_sdram_bankmachine5_row_opened <= 1'd0; + main_sdram_bankmachine5_twtpcon_ready <= 1'd1; + main_sdram_bankmachine5_twtpcon_count <= 3'd0; + main_sdram_bankmachine5_trccon_ready <= 1'd1; + main_sdram_bankmachine5_trccon_count <= 2'd0; + main_sdram_bankmachine5_trascon_ready <= 1'd1; + main_sdram_bankmachine5_trascon_count <= 2'd0; + main_sdram_bankmachine6_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine6_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine6_row <= 14'd0; + main_sdram_bankmachine6_row_opened <= 1'd0; + main_sdram_bankmachine6_twtpcon_ready <= 1'd1; + main_sdram_bankmachine6_twtpcon_count <= 3'd0; + main_sdram_bankmachine6_trccon_ready <= 1'd1; + main_sdram_bankmachine6_trccon_count <= 2'd0; + main_sdram_bankmachine6_trascon_ready <= 1'd1; + main_sdram_bankmachine6_trascon_count <= 2'd0; + main_sdram_bankmachine7_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine7_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine7_row <= 14'd0; + main_sdram_bankmachine7_row_opened <= 1'd0; + main_sdram_bankmachine7_twtpcon_ready <= 1'd1; + main_sdram_bankmachine7_twtpcon_count <= 3'd0; + main_sdram_bankmachine7_trccon_ready <= 1'd1; + main_sdram_bankmachine7_trccon_count <= 2'd0; + main_sdram_bankmachine7_trascon_ready <= 1'd1; + main_sdram_bankmachine7_trascon_count <= 2'd0; + main_sdram_choose_cmd_grant <= 3'd0; + main_sdram_choose_req_grant <= 3'd0; + main_sdram_trrdcon_ready <= 1'd1; + main_sdram_trrdcon_count <= 1'd0; + main_sdram_tfawcon_ready <= 1'd1; + main_sdram_tfawcon_window <= 4'd0; + main_sdram_tccdcon_ready <= 1'd1; + main_sdram_tccdcon_count <= 1'd0; + main_sdram_twtrcon_ready <= 1'd1; + main_sdram_twtrcon_count <= 3'd0; + main_sdram_time0 <= 5'd0; + main_sdram_time1 <= 4'd0; + main_adr_offset_r <= 2'd0; + main_count <= 1'd0; + builder_wb2csr_state <= 1'd0; + builder_refresher_state <= 2'd0; + builder_bankmachine0_state <= 3'd0; + builder_bankmachine1_state <= 3'd0; + builder_bankmachine2_state <= 3'd0; + builder_bankmachine3_state <= 3'd0; + builder_bankmachine4_state <= 3'd0; + builder_bankmachine5_state <= 3'd0; + builder_bankmachine6_state <= 3'd0; + builder_bankmachine7_state <= 3'd0; + builder_multiplexer_state <= 4'd0; + builder_rbank <= 3'd0; + builder_wbank <= 3'd0; + builder_new_master_wdata_ready0 <= 1'd0; + builder_new_master_wdata_ready1 <= 1'd0; + builder_new_master_wdata_ready2 <= 1'd0; + builder_new_master_rdata_valid0 <= 1'd0; + builder_new_master_rdata_valid1 <= 1'd0; + builder_new_master_rdata_valid2 <= 1'd0; + builder_new_master_rdata_valid3 <= 1'd0; + builder_new_master_rdata_valid4 <= 1'd0; + builder_new_master_rdata_valid5 <= 1'd0; + builder_new_master_rdata_valid6 <= 1'd0; + builder_new_master_rdata_valid7 <= 1'd0; + builder_new_master_rdata_valid8 <= 1'd0; + builder_new_master_rdata_valid9 <= 1'd0; + builder_fullmemorywe_state <= 2'd0; + builder_litedramwishbone2native_state <= 2'd0; + builder_minsoc_grant <= 1'd0; + builder_minsoc_slave_sel_r <= 4'd0; + builder_minsoc_count <= 20'd1000000; + builder_minsoc_interface0_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface1_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface2_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface3_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface4_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface5_bank_bus_dat_r <= 8'd0; + end + builder_regs0 <= serial_rx; + builder_regs1 <= builder_regs0; + end + + reg [31:0] mem[0:8191]; + reg [31:0] memdat; + always @(posedge sys_clk) begin + memdat <= mem[main_minsoc_rom_adr]; + end + + assign main_minsoc_rom_dat_r = memdat; + + initial begin + $readmemh("mem.init", mem); + end + + reg [31:0] mem_1 [0:1023]; + reg [ 9:0] memadr; + always @(posedge sys_clk) begin + if (main_minsoc_sram_we[0]) mem_1[main_minsoc_sram_adr][7:0] <= main_minsoc_sram_dat_w[7:0]; + if (main_minsoc_sram_we[1]) mem_1[main_minsoc_sram_adr][15:8] <= main_minsoc_sram_dat_w[15:8]; + if (main_minsoc_sram_we[2]) mem_1[main_minsoc_sram_adr][23:16] <= main_minsoc_sram_dat_w[23:16]; + if (main_minsoc_sram_we[3]) mem_1[main_minsoc_sram_adr][31:24] <= main_minsoc_sram_dat_w[31:24]; + memadr <= main_minsoc_sram_adr; + end + + assign main_minsoc_sram_dat_r = mem_1[memadr]; + + initial begin + $readmemh("mem_1.init", mem_1); + end + + reg [9:0] storage [0:15]; + reg [9:0] memdat_1; + reg [9:0] memdat_2; + always @(posedge sys_clk) begin + if (main_minsoc_uart_tx_fifo_wrport_we) + storage[main_minsoc_uart_tx_fifo_wrport_adr] <= main_minsoc_uart_tx_fifo_wrport_dat_w; + memdat_1 <= storage[main_minsoc_uart_tx_fifo_wrport_adr]; + end + + always @(posedge sys_clk) begin + if (main_minsoc_uart_tx_fifo_rdport_re) + memdat_2 <= storage[main_minsoc_uart_tx_fifo_rdport_adr]; + end + + assign main_minsoc_uart_tx_fifo_wrport_dat_r = memdat_1; + assign main_minsoc_uart_tx_fifo_rdport_dat_r = memdat_2; + + reg [9:0] storage_1[0:15]; + reg [9:0] memdat_3; + reg [9:0] memdat_4; + always @(posedge sys_clk) begin + if (main_minsoc_uart_rx_fifo_wrport_we) + storage_1[main_minsoc_uart_rx_fifo_wrport_adr] <= main_minsoc_uart_rx_fifo_wrport_dat_w; + memdat_3 <= storage_1[main_minsoc_uart_rx_fifo_wrport_adr]; + end + + always @(posedge sys_clk) begin + if (main_minsoc_uart_rx_fifo_rdport_re) + memdat_4 <= storage_1[main_minsoc_uart_rx_fifo_rdport_adr]; + end + + assign main_minsoc_uart_rx_fifo_wrport_dat_r = memdat_3; + assign main_minsoc_uart_rx_fifo_rdport_dat_r = memdat_4; + + wire clk100_ibuf; + IBUF clkbuf ( + .I(clk100), + .O(clk100_ibuf) + ); + + BUFG BUFG ( + .I(clk100_ibuf), + .O(main_pll_clkin) + ); + + BUFG BUFG_1 ( + .I(main_clkout0), + .O(sys_clk) + ); + + BUFG BUFG_2 ( + .I(main_clkout1), + .O(sys4x_clk) + ); + + BUFG BUFG_3 ( + .I(main_clkout2), + .O(sys4x_dqs_clk) + ); + + BUFG BUFG_4 ( + .I(main_clkout3), + .O(clk200_clk) + ); + + (* LOC="IDELAYCTRL_X1Y0" *) + IDELAYCTRL IDELAYCTRL ( + .REFCLK(clk200_clk), + .RST(main_ic_reset), + .RDY(idelayctl_rdy) + ); + + wire tq; + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(1'd0), + .D2(1'd1), + .D3(1'd0), + .D4(1'd1), + .D5(1'd0), + .D6(1'd1), + .D7(1'd0), + .D8(1'd1), + .OCE(1'd1), + .RST(sys_rst), + .OQ(main_a7ddrphy_sd_clk_se_nodelay), + .TQ(tq), + .TCE(1'b1), + .T1(1'b0) + ); + + OBUFTDS OBUFTDS_2 ( + .I (main_a7ddrphy_sd_clk_se_nodelay), + .O (ddram_clk_p), + .OB(ddram_clk_n), + .T (tq) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_1 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[0]), + .D2(main_a7ddrphy_dfi_p0_address[0]), + .D3(main_a7ddrphy_dfi_p1_address[0]), + .D4(main_a7ddrphy_dfi_p1_address[0]), + .D5(main_a7ddrphy_dfi_p2_address[0]), + .D6(main_a7ddrphy_dfi_p2_address[0]), + .D7(main_a7ddrphy_dfi_p3_address[0]), + .D8(main_a7ddrphy_dfi_p3_address[0]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[0]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_2 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[1]), + .D2(main_a7ddrphy_dfi_p0_address[1]), + .D3(main_a7ddrphy_dfi_p1_address[1]), + .D4(main_a7ddrphy_dfi_p1_address[1]), + .D5(main_a7ddrphy_dfi_p2_address[1]), + .D6(main_a7ddrphy_dfi_p2_address[1]), + .D7(main_a7ddrphy_dfi_p3_address[1]), + .D8(main_a7ddrphy_dfi_p3_address[1]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[1]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_3 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[2]), + .D2(main_a7ddrphy_dfi_p0_address[2]), + .D3(main_a7ddrphy_dfi_p1_address[2]), + .D4(main_a7ddrphy_dfi_p1_address[2]), + .D5(main_a7ddrphy_dfi_p2_address[2]), + .D6(main_a7ddrphy_dfi_p2_address[2]), + .D7(main_a7ddrphy_dfi_p3_address[2]), + .D8(main_a7ddrphy_dfi_p3_address[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[2]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_4 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[3]), + .D2(main_a7ddrphy_dfi_p0_address[3]), + .D3(main_a7ddrphy_dfi_p1_address[3]), + .D4(main_a7ddrphy_dfi_p1_address[3]), + .D5(main_a7ddrphy_dfi_p2_address[3]), + .D6(main_a7ddrphy_dfi_p2_address[3]), + .D7(main_a7ddrphy_dfi_p3_address[3]), + .D8(main_a7ddrphy_dfi_p3_address[3]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[3]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_5 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[4]), + .D2(main_a7ddrphy_dfi_p0_address[4]), + .D3(main_a7ddrphy_dfi_p1_address[4]), + .D4(main_a7ddrphy_dfi_p1_address[4]), + .D5(main_a7ddrphy_dfi_p2_address[4]), + .D6(main_a7ddrphy_dfi_p2_address[4]), + .D7(main_a7ddrphy_dfi_p3_address[4]), + .D8(main_a7ddrphy_dfi_p3_address[4]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[4]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_6 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[5]), + .D2(main_a7ddrphy_dfi_p0_address[5]), + .D3(main_a7ddrphy_dfi_p1_address[5]), + .D4(main_a7ddrphy_dfi_p1_address[5]), + .D5(main_a7ddrphy_dfi_p2_address[5]), + .D6(main_a7ddrphy_dfi_p2_address[5]), + .D7(main_a7ddrphy_dfi_p3_address[5]), + .D8(main_a7ddrphy_dfi_p3_address[5]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[5]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_7 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[6]), + .D2(main_a7ddrphy_dfi_p0_address[6]), + .D3(main_a7ddrphy_dfi_p1_address[6]), + .D4(main_a7ddrphy_dfi_p1_address[6]), + .D5(main_a7ddrphy_dfi_p2_address[6]), + .D6(main_a7ddrphy_dfi_p2_address[6]), + .D7(main_a7ddrphy_dfi_p3_address[6]), + .D8(main_a7ddrphy_dfi_p3_address[6]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[6]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_8 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[7]), + .D2(main_a7ddrphy_dfi_p0_address[7]), + .D3(main_a7ddrphy_dfi_p1_address[7]), + .D4(main_a7ddrphy_dfi_p1_address[7]), + .D5(main_a7ddrphy_dfi_p2_address[7]), + .D6(main_a7ddrphy_dfi_p2_address[7]), + .D7(main_a7ddrphy_dfi_p3_address[7]), + .D8(main_a7ddrphy_dfi_p3_address[7]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[7]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_9 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[8]), + .D2(main_a7ddrphy_dfi_p0_address[8]), + .D3(main_a7ddrphy_dfi_p1_address[8]), + .D4(main_a7ddrphy_dfi_p1_address[8]), + .D5(main_a7ddrphy_dfi_p2_address[8]), + .D6(main_a7ddrphy_dfi_p2_address[8]), + .D7(main_a7ddrphy_dfi_p3_address[8]), + .D8(main_a7ddrphy_dfi_p3_address[8]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[8]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_10 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[9]), + .D2(main_a7ddrphy_dfi_p0_address[9]), + .D3(main_a7ddrphy_dfi_p1_address[9]), + .D4(main_a7ddrphy_dfi_p1_address[9]), + .D5(main_a7ddrphy_dfi_p2_address[9]), + .D6(main_a7ddrphy_dfi_p2_address[9]), + .D7(main_a7ddrphy_dfi_p3_address[9]), + .D8(main_a7ddrphy_dfi_p3_address[9]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[9]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_11 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[10]), + .D2(main_a7ddrphy_dfi_p0_address[10]), + .D3(main_a7ddrphy_dfi_p1_address[10]), + .D4(main_a7ddrphy_dfi_p1_address[10]), + .D5(main_a7ddrphy_dfi_p2_address[10]), + .D6(main_a7ddrphy_dfi_p2_address[10]), + .D7(main_a7ddrphy_dfi_p3_address[10]), + .D8(main_a7ddrphy_dfi_p3_address[10]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[10]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_12 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[11]), + .D2(main_a7ddrphy_dfi_p0_address[11]), + .D3(main_a7ddrphy_dfi_p1_address[11]), + .D4(main_a7ddrphy_dfi_p1_address[11]), + .D5(main_a7ddrphy_dfi_p2_address[11]), + .D6(main_a7ddrphy_dfi_p2_address[11]), + .D7(main_a7ddrphy_dfi_p3_address[11]), + .D8(main_a7ddrphy_dfi_p3_address[11]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[11]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_13 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[12]), + .D2(main_a7ddrphy_dfi_p0_address[12]), + .D3(main_a7ddrphy_dfi_p1_address[12]), + .D4(main_a7ddrphy_dfi_p1_address[12]), + .D5(main_a7ddrphy_dfi_p2_address[12]), + .D6(main_a7ddrphy_dfi_p2_address[12]), + .D7(main_a7ddrphy_dfi_p3_address[12]), + .D8(main_a7ddrphy_dfi_p3_address[12]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[12]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_14 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[13]), + .D2(main_a7ddrphy_dfi_p0_address[13]), + .D3(main_a7ddrphy_dfi_p1_address[13]), + .D4(main_a7ddrphy_dfi_p1_address[13]), + .D5(main_a7ddrphy_dfi_p2_address[13]), + .D6(main_a7ddrphy_dfi_p2_address[13]), + .D7(main_a7ddrphy_dfi_p3_address[13]), + .D8(main_a7ddrphy_dfi_p3_address[13]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[13]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_15 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_bank[0]), + .D2(main_a7ddrphy_dfi_p0_bank[0]), + .D3(main_a7ddrphy_dfi_p1_bank[0]), + .D4(main_a7ddrphy_dfi_p1_bank[0]), + .D5(main_a7ddrphy_dfi_p2_bank[0]), + .D6(main_a7ddrphy_dfi_p2_bank[0]), + .D7(main_a7ddrphy_dfi_p3_bank[0]), + .D8(main_a7ddrphy_dfi_p3_bank[0]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba_iob[0]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_16 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_bank[1]), + .D2(main_a7ddrphy_dfi_p0_bank[1]), + .D3(main_a7ddrphy_dfi_p1_bank[1]), + .D4(main_a7ddrphy_dfi_p1_bank[1]), + .D5(main_a7ddrphy_dfi_p2_bank[1]), + .D6(main_a7ddrphy_dfi_p2_bank[1]), + .D7(main_a7ddrphy_dfi_p3_bank[1]), + .D8(main_a7ddrphy_dfi_p3_bank[1]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba_iob[1]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_17 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_bank[2]), + .D2(main_a7ddrphy_dfi_p0_bank[2]), + .D3(main_a7ddrphy_dfi_p1_bank[2]), + .D4(main_a7ddrphy_dfi_p1_bank[2]), + .D5(main_a7ddrphy_dfi_p2_bank[2]), + .D6(main_a7ddrphy_dfi_p2_bank[2]), + .D7(main_a7ddrphy_dfi_p3_bank[2]), + .D8(main_a7ddrphy_dfi_p3_bank[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba_iob[2]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_18 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_ras_n), + .D2(main_a7ddrphy_dfi_p0_ras_n), + .D3(main_a7ddrphy_dfi_p1_ras_n), + .D4(main_a7ddrphy_dfi_p1_ras_n), + .D5(main_a7ddrphy_dfi_p2_ras_n), + .D6(main_a7ddrphy_dfi_p2_ras_n), + .D7(main_a7ddrphy_dfi_p3_ras_n), + .D8(main_a7ddrphy_dfi_p3_ras_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ras_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_19 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_cas_n), + .D2(main_a7ddrphy_dfi_p0_cas_n), + .D3(main_a7ddrphy_dfi_p1_cas_n), + .D4(main_a7ddrphy_dfi_p1_cas_n), + .D5(main_a7ddrphy_dfi_p2_cas_n), + .D6(main_a7ddrphy_dfi_p2_cas_n), + .D7(main_a7ddrphy_dfi_p3_cas_n), + .D8(main_a7ddrphy_dfi_p3_cas_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cas_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_20 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_we_n), + .D2(main_a7ddrphy_dfi_p0_we_n), + .D3(main_a7ddrphy_dfi_p1_we_n), + .D4(main_a7ddrphy_dfi_p1_we_n), + .D5(main_a7ddrphy_dfi_p2_we_n), + .D6(main_a7ddrphy_dfi_p2_we_n), + .D7(main_a7ddrphy_dfi_p3_we_n), + .D8(main_a7ddrphy_dfi_p3_we_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_we_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_21 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_cke), + .D2(main_a7ddrphy_dfi_p0_cke), + .D3(main_a7ddrphy_dfi_p1_cke), + .D4(main_a7ddrphy_dfi_p1_cke), + .D5(main_a7ddrphy_dfi_p2_cke), + .D6(main_a7ddrphy_dfi_p2_cke), + .D7(main_a7ddrphy_dfi_p3_cke), + .D8(main_a7ddrphy_dfi_p3_cke), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cke_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_22 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_odt), + .D2(main_a7ddrphy_dfi_p0_odt), + .D3(main_a7ddrphy_dfi_p1_odt), + .D4(main_a7ddrphy_dfi_p1_odt), + .D5(main_a7ddrphy_dfi_p2_odt), + .D6(main_a7ddrphy_dfi_p2_odt), + .D7(main_a7ddrphy_dfi_p3_odt), + .D8(main_a7ddrphy_dfi_p3_odt), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_odt_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_23 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_reset_n), + .D2(main_a7ddrphy_dfi_p0_reset_n), + .D3(main_a7ddrphy_dfi_p1_reset_n), + .D4(main_a7ddrphy_dfi_p1_reset_n), + .D5(main_a7ddrphy_dfi_p2_reset_n), + .D6(main_a7ddrphy_dfi_p2_reset_n), + .D7(main_a7ddrphy_dfi_p3_reset_n), + .D8(main_a7ddrphy_dfi_p3_reset_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_reset_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_24 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_cs_n), + .D2(main_a7ddrphy_dfi_p0_cs_n), + .D3(main_a7ddrphy_dfi_p1_cs_n), + .D4(main_a7ddrphy_dfi_p1_cs_n), + .D5(main_a7ddrphy_dfi_p2_cs_n), + .D6(main_a7ddrphy_dfi_p2_cs_n), + .D7(main_a7ddrphy_dfi_p3_cs_n), + .D8(main_a7ddrphy_dfi_p3_cs_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cs_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_25 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata_mask[0]), + .D2(main_a7ddrphy_dfi_p0_wrdata_mask[2]), + .D3(main_a7ddrphy_dfi_p1_wrdata_mask[0]), + .D4(main_a7ddrphy_dfi_p1_wrdata_mask[2]), + .D5(main_a7ddrphy_dfi_p2_wrdata_mask[0]), + .D6(main_a7ddrphy_dfi_p2_wrdata_mask[2]), + .D7(main_a7ddrphy_dfi_p3_wrdata_mask[0]), + .D8(main_a7ddrphy_dfi_p3_wrdata_mask[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_dm_iob[0]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_26 ( + .CLK(sys4x_dqs_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dqs_serdes_pattern[0]), + .D2(main_a7ddrphy_dqs_serdes_pattern[1]), + .D3(main_a7ddrphy_dqs_serdes_pattern[2]), + .D4(main_a7ddrphy_dqs_serdes_pattern[3]), + .D5(main_a7ddrphy_dqs_serdes_pattern[4]), + .D6(main_a7ddrphy_dqs_serdes_pattern[5]), + .D7(main_a7ddrphy_dqs_serdes_pattern[6]), + .D8(main_a7ddrphy_dqs_serdes_pattern[7]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dqs)), + .TCE(1'd1), + .OFB(main_a7ddrphy0), + .OQ(main_a7ddrphy_dqs_nodelay0), + .TQ(main_a7ddrphy_dqs_t0) + ); + + OBUFTDS OBUFTDS ( + .I (main_a7ddrphy_dqs_nodelay0), + .T (main_a7ddrphy_dqs_t0), + .O (ddram_dqs_p[0]), + .OB(ddram_dqs_n[0]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_27 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata_mask[1]), + .D2(main_a7ddrphy_dfi_p0_wrdata_mask[3]), + .D3(main_a7ddrphy_dfi_p1_wrdata_mask[1]), + .D4(main_a7ddrphy_dfi_p1_wrdata_mask[3]), + .D5(main_a7ddrphy_dfi_p2_wrdata_mask[1]), + .D6(main_a7ddrphy_dfi_p2_wrdata_mask[3]), + .D7(main_a7ddrphy_dfi_p3_wrdata_mask[1]), + .D8(main_a7ddrphy_dfi_p3_wrdata_mask[3]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_dm_iob[1]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_28 ( + .CLK(sys4x_dqs_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dqs_serdes_pattern[0]), + .D2(main_a7ddrphy_dqs_serdes_pattern[1]), + .D3(main_a7ddrphy_dqs_serdes_pattern[2]), + .D4(main_a7ddrphy_dqs_serdes_pattern[3]), + .D5(main_a7ddrphy_dqs_serdes_pattern[4]), + .D6(main_a7ddrphy_dqs_serdes_pattern[5]), + .D7(main_a7ddrphy_dqs_serdes_pattern[6]), + .D8(main_a7ddrphy_dqs_serdes_pattern[7]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dqs)), + .TCE(1'd1), + .OFB(main_a7ddrphy1), + .OQ(main_a7ddrphy_dqs_nodelay1), + .TQ(main_a7ddrphy_dqs_t1) + ); + + OBUFTDS OBUFTDS_1 ( + .I (main_a7ddrphy_dqs_nodelay1), + .T (main_a7ddrphy_dqs_t1), + .O (ddram_dqs_p[1]), + .OB(ddram_dqs_n[1]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_29 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[0]), + .D2(main_a7ddrphy_dfi_p0_wrdata[16]), + .D3(main_a7ddrphy_dfi_p1_wrdata[0]), + .D4(main_a7ddrphy_dfi_p1_wrdata[16]), + .D5(main_a7ddrphy_dfi_p2_wrdata[0]), + .D6(main_a7ddrphy_dfi_p2_wrdata[16]), + .D7(main_a7ddrphy_dfi_p3_wrdata[0]), + .D8(main_a7ddrphy_dfi_p3_wrdata[16]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay0), + .TQ(main_a7ddrphy_dq_t0) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed0), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data0[7]), + .Q2(main_a7ddrphy_dq_i_data0[6]), + .Q3(main_a7ddrphy_dq_i_data0[5]), + .Q4(main_a7ddrphy_dq_i_data0[4]), + .Q5(main_a7ddrphy_dq_i_data0[3]), + .Q6(main_a7ddrphy_dq_i_data0[2]), + .Q7(main_a7ddrphy_dq_i_data0[1]), + .Q8(main_a7ddrphy_dq_i_data0[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay0), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed0) + ); + + IOBUF IOBUF ( + .I (main_a7ddrphy_dq_o_nodelay0), + .T (main_a7ddrphy_dq_t0), + .IO(ddram_dq[0]), + .O (main_a7ddrphy_dq_i_nodelay0) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_30 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[1]), + .D2(main_a7ddrphy_dfi_p0_wrdata[17]), + .D3(main_a7ddrphy_dfi_p1_wrdata[1]), + .D4(main_a7ddrphy_dfi_p1_wrdata[17]), + .D5(main_a7ddrphy_dfi_p2_wrdata[1]), + .D6(main_a7ddrphy_dfi_p2_wrdata[17]), + .D7(main_a7ddrphy_dfi_p3_wrdata[1]), + .D8(main_a7ddrphy_dfi_p3_wrdata[17]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay1), + .TQ(main_a7ddrphy_dq_t1) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_1 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed1), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data1[7]), + .Q2(main_a7ddrphy_dq_i_data1[6]), + .Q3(main_a7ddrphy_dq_i_data1[5]), + .Q4(main_a7ddrphy_dq_i_data1[4]), + .Q5(main_a7ddrphy_dq_i_data1[3]), + .Q6(main_a7ddrphy_dq_i_data1[2]), + .Q7(main_a7ddrphy_dq_i_data1[1]), + .Q8(main_a7ddrphy_dq_i_data1[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_1 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay1), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed1) + ); + + IOBUF IOBUF_1 ( + .I (main_a7ddrphy_dq_o_nodelay1), + .T (main_a7ddrphy_dq_t1), + .IO(ddram_dq[1]), + .O (main_a7ddrphy_dq_i_nodelay1) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_31 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[2]), + .D2(main_a7ddrphy_dfi_p0_wrdata[18]), + .D3(main_a7ddrphy_dfi_p1_wrdata[2]), + .D4(main_a7ddrphy_dfi_p1_wrdata[18]), + .D5(main_a7ddrphy_dfi_p2_wrdata[2]), + .D6(main_a7ddrphy_dfi_p2_wrdata[18]), + .D7(main_a7ddrphy_dfi_p3_wrdata[2]), + .D8(main_a7ddrphy_dfi_p3_wrdata[18]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay2), + .TQ(main_a7ddrphy_dq_t2) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_2 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed2), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data2[7]), + .Q2(main_a7ddrphy_dq_i_data2[6]), + .Q3(main_a7ddrphy_dq_i_data2[5]), + .Q4(main_a7ddrphy_dq_i_data2[4]), + .Q5(main_a7ddrphy_dq_i_data2[3]), + .Q6(main_a7ddrphy_dq_i_data2[2]), + .Q7(main_a7ddrphy_dq_i_data2[1]), + .Q8(main_a7ddrphy_dq_i_data2[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_2 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay2), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed2) + ); + + IOBUF IOBUF_2 ( + .I (main_a7ddrphy_dq_o_nodelay2), + .T (main_a7ddrphy_dq_t2), + .IO(ddram_dq[2]), + .O (main_a7ddrphy_dq_i_nodelay2) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_32 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[3]), + .D2(main_a7ddrphy_dfi_p0_wrdata[19]), + .D3(main_a7ddrphy_dfi_p1_wrdata[3]), + .D4(main_a7ddrphy_dfi_p1_wrdata[19]), + .D5(main_a7ddrphy_dfi_p2_wrdata[3]), + .D6(main_a7ddrphy_dfi_p2_wrdata[19]), + .D7(main_a7ddrphy_dfi_p3_wrdata[3]), + .D8(main_a7ddrphy_dfi_p3_wrdata[19]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay3), + .TQ(main_a7ddrphy_dq_t3) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_3 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed3), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data3[7]), + .Q2(main_a7ddrphy_dq_i_data3[6]), + .Q3(main_a7ddrphy_dq_i_data3[5]), + .Q4(main_a7ddrphy_dq_i_data3[4]), + .Q5(main_a7ddrphy_dq_i_data3[3]), + .Q6(main_a7ddrphy_dq_i_data3[2]), + .Q7(main_a7ddrphy_dq_i_data3[1]), + .Q8(main_a7ddrphy_dq_i_data3[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_3 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay3), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed3) + ); + + IOBUF IOBUF_3 ( + .I (main_a7ddrphy_dq_o_nodelay3), + .T (main_a7ddrphy_dq_t3), + .IO(ddram_dq[3]), + .O (main_a7ddrphy_dq_i_nodelay3) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_33 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[4]), + .D2(main_a7ddrphy_dfi_p0_wrdata[20]), + .D3(main_a7ddrphy_dfi_p1_wrdata[4]), + .D4(main_a7ddrphy_dfi_p1_wrdata[20]), + .D5(main_a7ddrphy_dfi_p2_wrdata[4]), + .D6(main_a7ddrphy_dfi_p2_wrdata[20]), + .D7(main_a7ddrphy_dfi_p3_wrdata[4]), + .D8(main_a7ddrphy_dfi_p3_wrdata[20]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay4), + .TQ(main_a7ddrphy_dq_t4) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_4 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed4), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data4[7]), + .Q2(main_a7ddrphy_dq_i_data4[6]), + .Q3(main_a7ddrphy_dq_i_data4[5]), + .Q4(main_a7ddrphy_dq_i_data4[4]), + .Q5(main_a7ddrphy_dq_i_data4[3]), + .Q6(main_a7ddrphy_dq_i_data4[2]), + .Q7(main_a7ddrphy_dq_i_data4[1]), + .Q8(main_a7ddrphy_dq_i_data4[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_4 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay4), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed4) + ); + + IOBUF IOBUF_4 ( + .I (main_a7ddrphy_dq_o_nodelay4), + .T (main_a7ddrphy_dq_t4), + .IO(ddram_dq[4]), + .O (main_a7ddrphy_dq_i_nodelay4) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_34 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[5]), + .D2(main_a7ddrphy_dfi_p0_wrdata[21]), + .D3(main_a7ddrphy_dfi_p1_wrdata[5]), + .D4(main_a7ddrphy_dfi_p1_wrdata[21]), + .D5(main_a7ddrphy_dfi_p2_wrdata[5]), + .D6(main_a7ddrphy_dfi_p2_wrdata[21]), + .D7(main_a7ddrphy_dfi_p3_wrdata[5]), + .D8(main_a7ddrphy_dfi_p3_wrdata[21]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay5), + .TQ(main_a7ddrphy_dq_t5) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_5 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed5), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data5[7]), + .Q2(main_a7ddrphy_dq_i_data5[6]), + .Q3(main_a7ddrphy_dq_i_data5[5]), + .Q4(main_a7ddrphy_dq_i_data5[4]), + .Q5(main_a7ddrphy_dq_i_data5[3]), + .Q6(main_a7ddrphy_dq_i_data5[2]), + .Q7(main_a7ddrphy_dq_i_data5[1]), + .Q8(main_a7ddrphy_dq_i_data5[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_5 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay5), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed5) + ); + + IOBUF IOBUF_5 ( + .I (main_a7ddrphy_dq_o_nodelay5), + .T (main_a7ddrphy_dq_t5), + .IO(ddram_dq[5]), + .O (main_a7ddrphy_dq_i_nodelay5) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_35 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[6]), + .D2(main_a7ddrphy_dfi_p0_wrdata[22]), + .D3(main_a7ddrphy_dfi_p1_wrdata[6]), + .D4(main_a7ddrphy_dfi_p1_wrdata[22]), + .D5(main_a7ddrphy_dfi_p2_wrdata[6]), + .D6(main_a7ddrphy_dfi_p2_wrdata[22]), + .D7(main_a7ddrphy_dfi_p3_wrdata[6]), + .D8(main_a7ddrphy_dfi_p3_wrdata[22]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay6), + .TQ(main_a7ddrphy_dq_t6) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_6 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed6), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data6[7]), + .Q2(main_a7ddrphy_dq_i_data6[6]), + .Q3(main_a7ddrphy_dq_i_data6[5]), + .Q4(main_a7ddrphy_dq_i_data6[4]), + .Q5(main_a7ddrphy_dq_i_data6[3]), + .Q6(main_a7ddrphy_dq_i_data6[2]), + .Q7(main_a7ddrphy_dq_i_data6[1]), + .Q8(main_a7ddrphy_dq_i_data6[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_6 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay6), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed6) + ); + + IOBUF IOBUF_6 ( + .I (main_a7ddrphy_dq_o_nodelay6), + .T (main_a7ddrphy_dq_t6), + .IO(ddram_dq[6]), + .O (main_a7ddrphy_dq_i_nodelay6) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_36 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[7]), + .D2(main_a7ddrphy_dfi_p0_wrdata[23]), + .D3(main_a7ddrphy_dfi_p1_wrdata[7]), + .D4(main_a7ddrphy_dfi_p1_wrdata[23]), + .D5(main_a7ddrphy_dfi_p2_wrdata[7]), + .D6(main_a7ddrphy_dfi_p2_wrdata[23]), + .D7(main_a7ddrphy_dfi_p3_wrdata[7]), + .D8(main_a7ddrphy_dfi_p3_wrdata[23]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay7), + .TQ(main_a7ddrphy_dq_t7) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_7 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed7), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data7[7]), + .Q2(main_a7ddrphy_dq_i_data7[6]), + .Q3(main_a7ddrphy_dq_i_data7[5]), + .Q4(main_a7ddrphy_dq_i_data7[4]), + .Q5(main_a7ddrphy_dq_i_data7[3]), + .Q6(main_a7ddrphy_dq_i_data7[2]), + .Q7(main_a7ddrphy_dq_i_data7[1]), + .Q8(main_a7ddrphy_dq_i_data7[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_7 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay7), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed7) + ); + + IOBUF IOBUF_7 ( + .I (main_a7ddrphy_dq_o_nodelay7), + .T (main_a7ddrphy_dq_t7), + .IO(ddram_dq[7]), + .O (main_a7ddrphy_dq_i_nodelay7) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_37 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[8]), + .D2(main_a7ddrphy_dfi_p0_wrdata[24]), + .D3(main_a7ddrphy_dfi_p1_wrdata[8]), + .D4(main_a7ddrphy_dfi_p1_wrdata[24]), + .D5(main_a7ddrphy_dfi_p2_wrdata[8]), + .D6(main_a7ddrphy_dfi_p2_wrdata[24]), + .D7(main_a7ddrphy_dfi_p3_wrdata[8]), + .D8(main_a7ddrphy_dfi_p3_wrdata[24]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay8), + .TQ(main_a7ddrphy_dq_t8) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_8 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed8), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data8[7]), + .Q2(main_a7ddrphy_dq_i_data8[6]), + .Q3(main_a7ddrphy_dq_i_data8[5]), + .Q4(main_a7ddrphy_dq_i_data8[4]), + .Q5(main_a7ddrphy_dq_i_data8[3]), + .Q6(main_a7ddrphy_dq_i_data8[2]), + .Q7(main_a7ddrphy_dq_i_data8[1]), + .Q8(main_a7ddrphy_dq_i_data8[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_8 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay8), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed8) + ); + + IOBUF IOBUF_8 ( + .I (main_a7ddrphy_dq_o_nodelay8), + .T (main_a7ddrphy_dq_t8), + .IO(ddram_dq[8]), + .O (main_a7ddrphy_dq_i_nodelay8) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_38 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[9]), + .D2(main_a7ddrphy_dfi_p0_wrdata[25]), + .D3(main_a7ddrphy_dfi_p1_wrdata[9]), + .D4(main_a7ddrphy_dfi_p1_wrdata[25]), + .D5(main_a7ddrphy_dfi_p2_wrdata[9]), + .D6(main_a7ddrphy_dfi_p2_wrdata[25]), + .D7(main_a7ddrphy_dfi_p3_wrdata[9]), + .D8(main_a7ddrphy_dfi_p3_wrdata[25]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay9), + .TQ(main_a7ddrphy_dq_t9) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_9 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed9), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data9[7]), + .Q2(main_a7ddrphy_dq_i_data9[6]), + .Q3(main_a7ddrphy_dq_i_data9[5]), + .Q4(main_a7ddrphy_dq_i_data9[4]), + .Q5(main_a7ddrphy_dq_i_data9[3]), + .Q6(main_a7ddrphy_dq_i_data9[2]), + .Q7(main_a7ddrphy_dq_i_data9[1]), + .Q8(main_a7ddrphy_dq_i_data9[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_9 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay9), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed9) + ); + + IOBUF IOBUF_9 ( + .I (main_a7ddrphy_dq_o_nodelay9), + .T (main_a7ddrphy_dq_t9), + .IO(ddram_dq[9]), + .O (main_a7ddrphy_dq_i_nodelay9) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_39 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[10]), + .D2(main_a7ddrphy_dfi_p0_wrdata[26]), + .D3(main_a7ddrphy_dfi_p1_wrdata[10]), + .D4(main_a7ddrphy_dfi_p1_wrdata[26]), + .D5(main_a7ddrphy_dfi_p2_wrdata[10]), + .D6(main_a7ddrphy_dfi_p2_wrdata[26]), + .D7(main_a7ddrphy_dfi_p3_wrdata[10]), + .D8(main_a7ddrphy_dfi_p3_wrdata[26]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay10), + .TQ(main_a7ddrphy_dq_t10) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_10 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed10), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data10[7]), + .Q2(main_a7ddrphy_dq_i_data10[6]), + .Q3(main_a7ddrphy_dq_i_data10[5]), + .Q4(main_a7ddrphy_dq_i_data10[4]), + .Q5(main_a7ddrphy_dq_i_data10[3]), + .Q6(main_a7ddrphy_dq_i_data10[2]), + .Q7(main_a7ddrphy_dq_i_data10[1]), + .Q8(main_a7ddrphy_dq_i_data10[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_10 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay10), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed10) + ); + + IOBUF IOBUF_10 ( + .I (main_a7ddrphy_dq_o_nodelay10), + .T (main_a7ddrphy_dq_t10), + .IO(ddram_dq[10]), + .O (main_a7ddrphy_dq_i_nodelay10) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_40 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[11]), + .D2(main_a7ddrphy_dfi_p0_wrdata[27]), + .D3(main_a7ddrphy_dfi_p1_wrdata[11]), + .D4(main_a7ddrphy_dfi_p1_wrdata[27]), + .D5(main_a7ddrphy_dfi_p2_wrdata[11]), + .D6(main_a7ddrphy_dfi_p2_wrdata[27]), + .D7(main_a7ddrphy_dfi_p3_wrdata[11]), + .D8(main_a7ddrphy_dfi_p3_wrdata[27]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay11), + .TQ(main_a7ddrphy_dq_t11) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_11 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed11), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data11[7]), + .Q2(main_a7ddrphy_dq_i_data11[6]), + .Q3(main_a7ddrphy_dq_i_data11[5]), + .Q4(main_a7ddrphy_dq_i_data11[4]), + .Q5(main_a7ddrphy_dq_i_data11[3]), + .Q6(main_a7ddrphy_dq_i_data11[2]), + .Q7(main_a7ddrphy_dq_i_data11[1]), + .Q8(main_a7ddrphy_dq_i_data11[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_11 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay11), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed11) + ); + + IOBUF IOBUF_11 ( + .I (main_a7ddrphy_dq_o_nodelay11), + .T (main_a7ddrphy_dq_t11), + .IO(ddram_dq[11]), + .O (main_a7ddrphy_dq_i_nodelay11) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_41 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[12]), + .D2(main_a7ddrphy_dfi_p0_wrdata[28]), + .D3(main_a7ddrphy_dfi_p1_wrdata[12]), + .D4(main_a7ddrphy_dfi_p1_wrdata[28]), + .D5(main_a7ddrphy_dfi_p2_wrdata[12]), + .D6(main_a7ddrphy_dfi_p2_wrdata[28]), + .D7(main_a7ddrphy_dfi_p3_wrdata[12]), + .D8(main_a7ddrphy_dfi_p3_wrdata[28]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay12), + .TQ(main_a7ddrphy_dq_t12) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_12 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed12), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data12[7]), + .Q2(main_a7ddrphy_dq_i_data12[6]), + .Q3(main_a7ddrphy_dq_i_data12[5]), + .Q4(main_a7ddrphy_dq_i_data12[4]), + .Q5(main_a7ddrphy_dq_i_data12[3]), + .Q6(main_a7ddrphy_dq_i_data12[2]), + .Q7(main_a7ddrphy_dq_i_data12[1]), + .Q8(main_a7ddrphy_dq_i_data12[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_12 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay12), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed12) + ); + + IOBUF IOBUF_12 ( + .I (main_a7ddrphy_dq_o_nodelay12), + .T (main_a7ddrphy_dq_t12), + .IO(ddram_dq[12]), + .O (main_a7ddrphy_dq_i_nodelay12) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_42 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[13]), + .D2(main_a7ddrphy_dfi_p0_wrdata[29]), + .D3(main_a7ddrphy_dfi_p1_wrdata[13]), + .D4(main_a7ddrphy_dfi_p1_wrdata[29]), + .D5(main_a7ddrphy_dfi_p2_wrdata[13]), + .D6(main_a7ddrphy_dfi_p2_wrdata[29]), + .D7(main_a7ddrphy_dfi_p3_wrdata[13]), + .D8(main_a7ddrphy_dfi_p3_wrdata[29]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay13), + .TQ(main_a7ddrphy_dq_t13) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_13 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed13), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data13[7]), + .Q2(main_a7ddrphy_dq_i_data13[6]), + .Q3(main_a7ddrphy_dq_i_data13[5]), + .Q4(main_a7ddrphy_dq_i_data13[4]), + .Q5(main_a7ddrphy_dq_i_data13[3]), + .Q6(main_a7ddrphy_dq_i_data13[2]), + .Q7(main_a7ddrphy_dq_i_data13[1]), + .Q8(main_a7ddrphy_dq_i_data13[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_13 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay13), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed13) + ); + + IOBUF IOBUF_13 ( + .I (main_a7ddrphy_dq_o_nodelay13), + .T (main_a7ddrphy_dq_t13), + .IO(ddram_dq[13]), + .O (main_a7ddrphy_dq_i_nodelay13) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_43 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[14]), + .D2(main_a7ddrphy_dfi_p0_wrdata[30]), + .D3(main_a7ddrphy_dfi_p1_wrdata[14]), + .D4(main_a7ddrphy_dfi_p1_wrdata[30]), + .D5(main_a7ddrphy_dfi_p2_wrdata[14]), + .D6(main_a7ddrphy_dfi_p2_wrdata[30]), + .D7(main_a7ddrphy_dfi_p3_wrdata[14]), + .D8(main_a7ddrphy_dfi_p3_wrdata[30]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay14), + .TQ(main_a7ddrphy_dq_t14) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_14 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed14), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data14[7]), + .Q2(main_a7ddrphy_dq_i_data14[6]), + .Q3(main_a7ddrphy_dq_i_data14[5]), + .Q4(main_a7ddrphy_dq_i_data14[4]), + .Q5(main_a7ddrphy_dq_i_data14[3]), + .Q6(main_a7ddrphy_dq_i_data14[2]), + .Q7(main_a7ddrphy_dq_i_data14[1]), + .Q8(main_a7ddrphy_dq_i_data14[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_14 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay14), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed14) + ); + + IOBUF IOBUF_14 ( + .I (main_a7ddrphy_dq_o_nodelay14), + .T (main_a7ddrphy_dq_t14), + .IO(ddram_dq[14]), + .O (main_a7ddrphy_dq_i_nodelay14) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_44 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[15]), + .D2(main_a7ddrphy_dfi_p0_wrdata[31]), + .D3(main_a7ddrphy_dfi_p1_wrdata[15]), + .D4(main_a7ddrphy_dfi_p1_wrdata[31]), + .D5(main_a7ddrphy_dfi_p2_wrdata[15]), + .D6(main_a7ddrphy_dfi_p2_wrdata[31]), + .D7(main_a7ddrphy_dfi_p3_wrdata[15]), + .D8(main_a7ddrphy_dfi_p3_wrdata[31]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay15), + .TQ(main_a7ddrphy_dq_t15) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_15 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed15), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data15[7]), + .Q2(main_a7ddrphy_dq_i_data15[6]), + .Q3(main_a7ddrphy_dq_i_data15[5]), + .Q4(main_a7ddrphy_dq_i_data15[4]), + .Q5(main_a7ddrphy_dq_i_data15[3]), + .Q6(main_a7ddrphy_dq_i_data15[2]), + .Q7(main_a7ddrphy_dq_i_data15[1]), + .Q8(main_a7ddrphy_dq_i_data15[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_15 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay15), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed15) + ); + + IOBUF IOBUF_15 ( + .I (main_a7ddrphy_dq_o_nodelay15), + .T (main_a7ddrphy_dq_t15), + .IO(ddram_dq[15]), + .O (main_a7ddrphy_dq_i_nodelay15) + ); + + reg [23:0] storage_2[0:7]; + reg [23:0] memdat_5; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we) + storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; + memdat_5 <= storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r = memdat_5; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r = storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_3[0:7]; + reg [23:0] memdat_6; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we) + storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; + memdat_6 <= storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r = memdat_6; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r = storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_4[0:7]; + reg [23:0] memdat_7; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we) + storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; + memdat_7 <= storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r = memdat_7; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r = storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_5[0:7]; + reg [23:0] memdat_8; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we) + storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; + memdat_8 <= storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r = memdat_8; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r = storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_6[0:7]; + reg [23:0] memdat_9; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we) + storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; + memdat_9 <= storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r = memdat_9; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r = storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_7 [0:7]; + reg [23:0] memdat_10; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we) + storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; + memdat_10 <= storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r = memdat_10; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r = storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_8 [0:7]; + reg [23:0] memdat_11; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we) + storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; + memdat_11 <= storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r = memdat_11; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r = storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_9 [0:7]; + reg [23:0] memdat_12; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we) + storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; + memdat_12 <= storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r = memdat_12; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r = storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] tag_mem [0:511]; + reg [ 8:0] memadr_1; + always @(posedge sys_clk) begin + if (main_tag_port_we) tag_mem[main_tag_port_adr] <= main_tag_port_dat_w; + memadr_1 <= main_tag_port_adr; + end + + assign main_tag_port_dat_r = tag_mem[memadr_1]; + + VexRiscv VexRiscv ( + .clk(sys_clk), + .dBusWishbone_ACK(main_minsoc_cpu_dbus_ack), + .dBusWishbone_DAT_MISO(main_minsoc_cpu_dbus_dat_r), + .dBusWishbone_ERR(main_minsoc_cpu_dbus_err), + .externalInterruptArray(main_minsoc_cpu_interrupt), + .externalResetVector(main_minsoc_vexriscv), + .iBusWishbone_ACK(main_minsoc_cpu_ibus_ack), + .iBusWishbone_DAT_MISO(main_minsoc_cpu_ibus_dat_r), + .iBusWishbone_ERR(main_minsoc_cpu_ibus_err), + .reset((sys_rst | main_minsoc_cpu_reset)), + .softwareInterrupt(1'd0), + .timerInterrupt(1'd0), + .dBusWishbone_ADR(main_minsoc_cpu_dbus_adr), + .dBusWishbone_BTE(main_minsoc_cpu_dbus_bte), + .dBusWishbone_CTI(main_minsoc_cpu_dbus_cti), + .dBusWishbone_CYC(main_minsoc_cpu_dbus_cyc), + .dBusWishbone_DAT_MOSI(main_minsoc_cpu_dbus_dat_w), + .dBusWishbone_SEL(main_minsoc_cpu_dbus_sel), + .dBusWishbone_STB(main_minsoc_cpu_dbus_stb), + .dBusWishbone_WE(main_minsoc_cpu_dbus_we), + .iBusWishbone_ADR(main_minsoc_cpu_ibus_adr), + .iBusWishbone_BTE(main_minsoc_cpu_ibus_bte), + .iBusWishbone_CTI(main_minsoc_cpu_ibus_cti), + .iBusWishbone_CYC(main_minsoc_cpu_ibus_cyc), + .iBusWishbone_DAT_MOSI(main_minsoc_cpu_ibus_dat_w), + .iBusWishbone_SEL(main_minsoc_cpu_ibus_sel), + .iBusWishbone_STB(main_minsoc_cpu_ibus_stb), + .iBusWishbone_WE(main_minsoc_cpu_ibus_we) + ); + + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(5'd20), + .CLKOUT0_PHASE(1'd0), + .CLKOUT1_DIVIDE(3'd5), + .CLKOUT1_PHASE(1'd0), + .CLKOUT2_DIVIDE(3'd5), + .CLKOUT2_PHASE(90000), + .CLKOUT3_DIVIDE(3'd6), + .CLKOUT3_PHASE(1'd0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(main_pll_clkin), + .RST(main_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .CLKOUT3(main_clkout3), + .LOCKED(main_locked) + ); + + reg [7:0] data_mem_grain0[0:511]; + reg [8:0] memadr_2; + always @(posedge sys_clk) begin + if (main_data_port_we[0]) data_mem_grain0[main_data_port_adr] <= main_data_port_dat_w[7:0]; + memadr_2 <= main_data_port_adr; + end + + assign main_data_port_dat_r[7:0] = data_mem_grain0[memadr_2]; + + reg [7:0] data_mem_grain1[0:511]; + reg [8:0] memadr_3; + always @(posedge sys_clk) begin + if (main_data_port_we[1]) data_mem_grain1[main_data_port_adr] <= main_data_port_dat_w[15:8]; + memadr_3 <= main_data_port_adr; + end + + assign main_data_port_dat_r[15:8] = data_mem_grain1[memadr_3]; + + reg [7:0] data_mem_grain2[0:511]; + reg [8:0] memadr_4; + always @(posedge sys_clk) begin + if (main_data_port_we[2]) data_mem_grain2[main_data_port_adr] <= main_data_port_dat_w[23:16]; + memadr_4 <= main_data_port_adr; + end + + assign main_data_port_dat_r[23:16] = data_mem_grain2[memadr_4]; + + reg [7:0] data_mem_grain3[0:511]; + reg [8:0] memadr_5; + always @(posedge sys_clk) begin + if (main_data_port_we[3]) data_mem_grain3[main_data_port_adr] <= main_data_port_dat_w[31:24]; + memadr_5 <= main_data_port_adr; + end + + assign main_data_port_dat_r[31:24] = data_mem_grain3[memadr_5]; + + reg [7:0] data_mem_grain4[0:511]; + reg [8:0] memadr_6; + always @(posedge sys_clk) begin + if (main_data_port_we[4]) data_mem_grain4[main_data_port_adr] <= main_data_port_dat_w[39:32]; + memadr_6 <= main_data_port_adr; + end + + assign main_data_port_dat_r[39:32] = data_mem_grain4[memadr_6]; + + reg [7:0] data_mem_grain5[0:511]; + reg [8:0] memadr_7; + always @(posedge sys_clk) begin + if (main_data_port_we[5]) data_mem_grain5[main_data_port_adr] <= main_data_port_dat_w[47:40]; + memadr_7 <= main_data_port_adr; + end + + assign main_data_port_dat_r[47:40] = data_mem_grain5[memadr_7]; + + reg [7:0] data_mem_grain6[0:511]; + reg [8:0] memadr_8; + always @(posedge sys_clk) begin + if (main_data_port_we[6]) data_mem_grain6[main_data_port_adr] <= main_data_port_dat_w[55:48]; + memadr_8 <= main_data_port_adr; + end + + assign main_data_port_dat_r[55:48] = data_mem_grain6[memadr_8]; + + reg [7:0] data_mem_grain7[0:511]; + reg [8:0] memadr_9; + always @(posedge sys_clk) begin + if (main_data_port_we[7]) data_mem_grain7[main_data_port_adr] <= main_data_port_dat_w[63:56]; + memadr_9 <= main_data_port_adr; + end + + assign main_data_port_dat_r[63:56] = data_mem_grain7[memadr_9]; + + reg [7:0] data_mem_grain8[0:511]; + reg [8:0] memadr_10; + always @(posedge sys_clk) begin + if (main_data_port_we[8]) data_mem_grain8[main_data_port_adr] <= main_data_port_dat_w[71:64]; + memadr_10 <= main_data_port_adr; + end + + assign main_data_port_dat_r[71:64] = data_mem_grain8[memadr_10]; + + reg [7:0] data_mem_grain9[0:511]; + reg [8:0] memadr_11; + always @(posedge sys_clk) begin + if (main_data_port_we[9]) data_mem_grain9[main_data_port_adr] <= main_data_port_dat_w[79:72]; + memadr_11 <= main_data_port_adr; + end + + assign main_data_port_dat_r[79:72] = data_mem_grain9[memadr_11]; + + reg [7:0] data_mem_grain10[0:511]; + reg [8:0] memadr_12; + always @(posedge sys_clk) begin + if (main_data_port_we[10]) data_mem_grain10[main_data_port_adr] <= main_data_port_dat_w[87:80]; + memadr_12 <= main_data_port_adr; + end + + assign main_data_port_dat_r[87:80] = data_mem_grain10[memadr_12]; + + reg [7:0] data_mem_grain11[0:511]; + reg [8:0] memadr_13; + always @(posedge sys_clk) begin + if (main_data_port_we[11]) data_mem_grain11[main_data_port_adr] <= main_data_port_dat_w[95:88]; + memadr_13 <= main_data_port_adr; + end + + assign main_data_port_dat_r[95:88] = data_mem_grain11[memadr_13]; + + reg [7:0] data_mem_grain12[0:511]; + reg [8:0] memadr_14; + always @(posedge sys_clk) begin + if (main_data_port_we[12]) data_mem_grain12[main_data_port_adr] <= main_data_port_dat_w[103:96]; + memadr_14 <= main_data_port_adr; + end + + assign main_data_port_dat_r[103:96] = data_mem_grain12[memadr_14]; + + reg [7:0] data_mem_grain13[0:511]; + reg [8:0] memadr_15; + always @(posedge sys_clk) begin + if (main_data_port_we[13]) + data_mem_grain13[main_data_port_adr] <= main_data_port_dat_w[111:104]; + memadr_15 <= main_data_port_adr; + end + + assign main_data_port_dat_r[111:104] = data_mem_grain13[memadr_15]; + + reg [7:0] data_mem_grain14[0:511]; + reg [8:0] memadr_16; + always @(posedge sys_clk) begin + if (main_data_port_we[14]) + data_mem_grain14[main_data_port_adr] <= main_data_port_dat_w[119:112]; + memadr_16 <= main_data_port_adr; + end + + assign main_data_port_dat_r[119:112] = data_mem_grain14[memadr_16]; + + reg [7:0] data_mem_grain15[0:511]; + reg [8:0] memadr_17; + always @(posedge sys_clk) begin + if (main_data_port_we[15]) + data_mem_grain15[main_data_port_adr] <= main_data_port_dat_w[127:120]; + memadr_17 <= main_data_port_adr; + end + + assign main_data_port_dat_r[127:120] = data_mem_grain15[memadr_17]; + + (* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE ( + .C (sys_clk), + .CE (1'd1), + .D (1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl0), + .Q (builder_xilinxasyncresetsynchronizerimpl0_rst_meta) + ); + + (* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_1 ( + .C (sys_clk), + .CE (1'd1), + .D (builder_xilinxasyncresetsynchronizerimpl0_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl0), + .Q (sys_rst) + ); + + (* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_2 ( + .C (sys4x_clk), + .CE (1'd1), + .D (1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl1), + .Q (builder_xilinxasyncresetsynchronizerimpl1_rst_meta) + ); + + (* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_3 ( + .C (sys4x_clk), + .CE (1'd1), + .D (builder_xilinxasyncresetsynchronizerimpl1_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl1), + .Q (builder_xilinxasyncresetsynchronizerimpl1_expr) + ); + + (* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_4 ( + .C (sys4x_dqs_clk), + .CE (1'd1), + .D (1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl2), + .Q (builder_xilinxasyncresetsynchronizerimpl2_rst_meta) + ); + + (* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_5 ( + .C (sys4x_dqs_clk), + .CE (1'd1), + .D (builder_xilinxasyncresetsynchronizerimpl2_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl2), + .Q (builder_xilinxasyncresetsynchronizerimpl2_expr) + ); + + (* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_6 ( + .C (clk200_clk), + .CE (1'd1), + .D (1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl3), + .Q (builder_xilinxasyncresetsynchronizerimpl3_rst_meta) + ); + + (* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_7 ( + .C (clk200_clk), + .CE (1'd1), + .D (builder_xilinxasyncresetsynchronizerimpl3_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl3), + .Q (clk200_rst) + ); endmodule diff --git a/xdc-plugin/tests/package_pins/package_pins.v b/xdc-plugin/tests/package_pins/package_pins.v index c145e5ae7..e5d2896fe 100644 --- a/xdc-plugin/tests/package_pins/package_pins.v +++ b/xdc-plugin/tests/package_pins/package_pins.v @@ -1,75 +1,103 @@ module top ( - input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b, - output signal_p, - output signal_n + input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUFTDS OBUFTDS_2( - .I(LD6), - .O(signal_p), - .OB(signal_n), - .T(1'b1) - ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule diff --git a/xdc-plugin/tests/port_indexes/port_indexes.v b/xdc-plugin/tests/port_indexes/port_indexes.v index 2ca86e229..2ec231bb2 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.v +++ b/xdc-plugin/tests/port_indexes/port_indexes.v @@ -1,67 +1,95 @@ module top ( - input clk, - output [3:0] led, - inout out_a, - output [1:0] out_b + input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b ); - wire LD6, LD7, LD8, LD9; - wire inter_wire, inter_wire_2; - localparam BITS = 1; - localparam LOG2DELAY = 25; + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; - reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS+LOG2DELAY-1:0] counter = 0; - always @(posedge clk) begin - counter <= counter + 1; - end - assign led[1] = inter_wire; - assign inter_wire = inter_wire_2; - assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_6(.I(LD6), .O(led[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_7(.I(LD7), .O(inter_wire_2)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_OUT(.I(LD7), .O(out_a)); - bottom bottom_inst(.I(LD8), .O(led[2]), .OB(out_b)); - bottom_intermediate bottom_intermediate_inst(.I(LD9), .O(led[3])); + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); endmodule module bottom_intermediate ( - input I, - output O + input I, + output O ); - wire bottom_intermediate_wire; - assign O = bottom_intermediate_wire; - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_8(.I(I), .O(bottom_intermediate_wire)); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); endmodule module bottom ( - input I, - output [1:0] OB, - output O + input I, + output [1:0] OB, + output O ); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_9(.I(I), .O(O)); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_10(.I(I), .O(OB[0])); - OBUF #( - .IOSTANDARD("LVCMOS33"), - .SLEW("SLOW") - ) OBUF_11(.I(I), .O(OB[1])); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); endmodule From 3a45aee16ddd7770f1e3793683274f0875a01f87 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 17 Mar 2021 15:57:30 -0700 Subject: [PATCH 284/845] Use just clang-format in ci. clang-format does not exist anymore in ubuntu-latest. Signed-off-by: Henner Zeller --- .github/workflows/ci.yml | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fb51b97e..dc4172d75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: sudo apt-get install git g++-9 build-essential bison flex \ libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot \ pkg-config libboost-system-dev libboost-python-dev \ - libboost-filesystem-dev zlib1g-dev clang-format-5.0 + libboost-filesystem-dev zlib1g-dev clang-format - name: Install Yosys run: source .github/workflows/setup.sh diff --git a/Makefile b/Makefile index 46a19697a..66524140b 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,10 @@ test: $(PLUGINS_TEST) clean: $(PLUGINS_CLEAN) -CLANG_FORMAT ?= clang-format-5.0 +CLANG_FORMAT ?= clang-format format: find . \( -name "*.h" -o -name "*.cc" \) -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i -VERIBLE_FORMAT ?=verible-verilog-format +VERIBLE_FORMAT ?= verible-verilog-format format-verilog: find */tests \( -name "*.v" -o -name "*.sv" \) -and -not -path './third_party/*' -print0 | xargs -0 $(VERIBLE_FORMAT) --inplace From 3fd52132b680c995dab5476d7b60301d637ba589 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 17 Mar 2021 16:15:16 -0700 Subject: [PATCH 285/845] Pin to clang-format-11 Signed-off-by: Henner Zeller --- .github/workflows/ci.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc4172d75..00f04d2ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: sudo apt-get install git g++-9 build-essential bison flex \ libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot \ pkg-config libboost-system-dev libboost-python-dev \ - libboost-filesystem-dev zlib1g-dev clang-format + libboost-filesystem-dev zlib1g-dev clang-format-11 - name: Install Yosys run: source .github/workflows/setup.sh diff --git a/Makefile b/Makefile index 66524140b..0b3cc7fd3 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ test: $(PLUGINS_TEST) clean: $(PLUGINS_CLEAN) -CLANG_FORMAT ?= clang-format +CLANG_FORMAT ?= clang-format-11 format: find . \( -name "*.h" -o -name "*.cc" \) -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i From 1b13d755ed65cc3e7d5009a0247a66defc427b64 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 17 Mar 2021 17:20:57 -0700 Subject: [PATCH 286/845] Add missing cmake in CI. Also add emacs indicator in Makefile_test.common, that this is a Makefile. Signed-off-by: Henner Zeller --- .github/workflows/ci.yml | 2 +- Makefile_test.common | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00f04d2ae..c32118ad7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: sudo apt-get install git g++-9 build-essential bison flex \ libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot \ pkg-config libboost-system-dev libboost-python-dev \ - libboost-filesystem-dev zlib1g-dev clang-format-11 + libboost-filesystem-dev zlib1g-dev clang-format-11 cmake - name: Install Yosys run: source .github/workflows/setup.sh diff --git a/Makefile_test.common b/Makefile_test.common index 2b6fb9e98..0d63166c4 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -1,3 +1,4 @@ +# -*- Makefile -*- # Each plugin shall have a directory named 'test' that contains test cases # directories and a Makefile which includes this Makefile template. # The test Makefile specifies which tests to execute and how to verify them. From 0c62e62d9800bcdd1219b685f220495cf0395e0a Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 17 Mar 2021 17:24:53 -0700 Subject: [PATCH 287/845] Use a slightly older clang-format version that exists in more distributions. Signed-off-by: Henner Zeller --- .github/workflows/ci.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c32118ad7..e11a5fdaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: sudo apt-get install git g++-9 build-essential bison flex \ libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot \ pkg-config libboost-system-dev libboost-python-dev \ - libboost-filesystem-dev zlib1g-dev clang-format-11 cmake + libboost-filesystem-dev zlib1g-dev clang-format-8 cmake - name: Install Yosys run: source .github/workflows/setup.sh diff --git a/Makefile b/Makefile index 0b3cc7fd3..f9f3f9fe0 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ test: $(PLUGINS_TEST) clean: $(PLUGINS_CLEAN) -CLANG_FORMAT ?= clang-format-11 +CLANG_FORMAT ?= clang-format-8 format: find . \( -name "*.h" -o -name "*.cc" \) -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i From 0976ee9bae2fd0ea5a05c0ec33813c43af86ba09 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 17 Mar 2021 18:25:39 -0700 Subject: [PATCH 288/845] Update golden file to match changed line numbers in formatted file. Signed-off-by: Henner Zeller --- .../selection_to_tcl_list/selection_to_tcl_list.golden.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt b/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt index 8a6ea0f98..e071e398a 100644 --- a/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt +++ b/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt @@ -1,3 +1,3 @@ -{middle/$add$selection_to_tcl_list.v:32$5} top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$selection_to_tcl_list.v:14$2} top/ibuf_inst top/ibuf_proxy -{middle/$1\cnt[1:0]} {middle/$add$selection_to_tcl_list.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {top/$1\cnt[1:0]} {top/$add$selection_to_tcl_list.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk -{middle/$1\cnt[1:0]} {middle/$add$selection_to_tcl_list.v:32$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {middle/$add$selection_to_tcl_list.v:32$5} {middle/$proc$selection_to_tcl_list.v:28$6} {middle/$proc$selection_to_tcl_list.v:31$4} {top/$1\cnt[1:0]} {top/$add$selection_to_tcl_list.v:14$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$selection_to_tcl_list.v:14$2} top/ibuf_inst top/ibuf_proxy {top/$proc$selection_to_tcl_list.v:6$3} {top/$proc$selection_to_tcl_list.v:13$1} +{middle/$add$selection_to_tcl_list.v:54$5} top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$selection_to_tcl_list.v:22$2} top/ibuf_inst top/ibuf_proxy +{middle/$1\cnt[1:0]} {middle/$add$selection_to_tcl_list.v:54$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {top/$1\cnt[1:0]} {top/$add$selection_to_tcl_list.v:22$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk +{middle/$1\cnt[1:0]} {middle/$add$selection_to_tcl_list.v:54$5_Y} {middle/$0\cnt[1:0]} middle/clk_int middle/cnt middle/out middle/clk {middle/$add$selection_to_tcl_list.v:54$5} {middle/$proc$selection_to_tcl_list.v:50$6} {middle/$proc$selection_to_tcl_list.v:53$4} {top/$1\cnt[1:0]} {top/$add$selection_to_tcl_list.v:22$2_Y} {top/$0\cnt[1:0]} top/ibuf_out top/ibuf_proxy_out top/clk_int_2 top/clk_int_1 top/cnt top/out top/in top/clk2 top/clk top/middle_inst_4 top/middle_inst_3 top/middle_inst_2 top/middle_inst_1 {top/$add$selection_to_tcl_list.v:22$2} top/ibuf_inst top/ibuf_proxy {top/$proc$selection_to_tcl_list.v:8$3} {top/$proc$selection_to_tcl_list.v:21$1} From d6b41b12d1ba00ca5b67a8a3619bac151b075db6 Mon Sep 17 00:00:00 2001 From: Lalit Sharma Date: Wed, 17 Mar 2021 09:46:35 -0700 Subject: [PATCH 289/845] Updating adder_lut4 INIT param as there is a change in qlf_k4n8 device adder_lut4 representation Signed-off-by: Lalit Sharma --- ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v | 16 ++++++++-------- ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v | 25 +++++++++++++------------ ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v | 2 -- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v b/ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v index 5cbfdc791..5feb614e6 100644 --- a/ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v @@ -49,15 +49,15 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); if (_TECHMAP_CONSTMSK_CI_ == 1) begin localparam INIT = (_TECHMAP_CONSTVAL_CI_ == 0) ? - 16'b0110_0000_0000_0001 : - 16'b1001_0000_0000_0111; + 16'b0110_0110_0000_1000: + 16'b1001_1001_0000_1110; // LUT4 configured as 1-bit adder with CI=const adder_lut4 #( .LUT(INIT), .IN2_IS_CIN(1'b0) ) lut_ci_adder ( - .in({AA[i], BB[i], 1'b0, 1'b0}), + .in({AA[i], BB[i], 1'b1, 1'b1}), .cin(), .lut4_out(Y[i]), .cout(ci) @@ -68,10 +68,10 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); // LUT4 configured as passthrough to drive CI of the next stage adder_lut4 #( - .LUT(16'b1100_0000_0000_0011), + .LUT(16'b0000_0000_0000_1100), .IN2_IS_CIN(1'b0) ) lut_ci ( - .in({1'b0,CI,1'b0,1'b0}), + .in({1'b1, CI, 1'b1, 1'b1}), .cin(), .lut4_out(), .cout(ci) @@ -92,10 +92,10 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); // LUT4 configured as full 1-bit adder adder_lut4 #( - .LUT(16'b0110_1001_0110_0001), + .LUT(16'b1001_0110_0110_1000), .IN2_IS_CIN(1'b1) ) lut_adder ( - .in({AA[i], BB[i], 1'b0, 1'b0}), + .in({AA[i], BB[i], 1'b1, 1'b1}), .cin(ci), .lut4_out(Y[i]), .cout(co) @@ -116,7 +116,7 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); .LUT(16'b0000_1111_0000_1111), .IN2_IS_CIN(1'b1) ) lut_co ( - .in({1'b0, co, 1'b0, 1'b0}), + .in({1'b1, co, 1'b1, 1'b1}), .cin(co), .lut4_out(C[i]), .cout() diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v b/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v index 4f3e5ba18..b62ad50c3 100644 --- a/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v @@ -14,15 +14,15 @@ module adder_lut4( // Output function wire [0:7] s1 = li[0] ? - {LUT[1], LUT[3], LUT[5], LUT[7], LUT[9], LUT[11], LUT[13], LUT[15]}: - {LUT[0], LUT[2], LUT[4], LUT[6], LUT[8], LUT[10], LUT[12], LUT[14]}; + {LUT[0], LUT[2], LUT[4], LUT[6], LUT[8], LUT[10], LUT[12], LUT[14]}: + {LUT[1], LUT[3], LUT[5], LUT[7], LUT[9], LUT[11], LUT[13], LUT[15]}; - wire [0:3] s2 = li[1] ? {s1[1], s1[3], s1[5], s1[7]} : - {s1[0], s1[2], s1[4], s1[6]}; + wire [0:3] s2 = li[1] ? {s1[0], s1[2], s1[4], s1[6]} : + {s1[1], s1[3], s1[5], s1[7]}; - wire [0:1] s3 = li[2] ? {s2[1], s2[3]} : {s2[0], s2[2]}; + wire [0:1] s3 = li[2] ? {s2[0], s2[2]} : {s2[1], s2[3]}; - assign lut4_out = li[3] ? s3[1] : s3[0]; + assign lut4_out = li[3] ? s3[0] : s3[1]; // Carry out function assign cout = (s2[2]) ? cin : s2[3]; @@ -41,18 +41,18 @@ module frac_lut4( // Output function wire [0:7] s1 = li[0] ? - {LUT[1], LUT[3], LUT[5], LUT[7], LUT[9], LUT[11], LUT[13], LUT[15]}: - {LUT[0], LUT[2], LUT[4], LUT[6], LUT[8], LUT[10], LUT[12], LUT[14]}; + {LUT[0], LUT[2], LUT[4], LUT[6], LUT[8], LUT[10], LUT[12], LUT[14]}: + {LUT[1], LUT[3], LUT[5], LUT[7], LUT[9], LUT[11], LUT[13], LUT[15]}; - wire [0:3] s2 = li[1] ? {s1[1], s1[3], s1[5], s1[7]} : - {s1[0], s1[2], s1[4], s1[6]}; + wire [0:3] s2 = li[1] ? {s1[0], s1[2], s1[4], s1[6]} : + {s1[1], s1[3], s1[5], s1[7]}; - wire [0:1] s3 = li[2] ? {s2[1], s2[3]} : {s2[0], s2[2]}; + wire [0:1] s3 = li[2] ? {s2[0], s2[2]} : {s2[1], s2[3]}; assign lut2_out[0] = s2[2]; assign lut2_out[1] = s2[3]; - assign lut4_out = li[3] ? s3[1] : s3[0]; + assign lut4_out = li[3] ? s3[0] : s3[1]; endmodule @@ -132,3 +132,4 @@ module dffs( else Q <= D; endmodule + diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v b/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v index d852f7330..f5f160fde 100644 --- a/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v @@ -44,9 +44,7 @@ module \$__SHREG_DFF_P_ (D, Q, C); parameter DEPTH = 2; reg [DEPTH-2:0] q; - //wire [DEPTH-1:0] d; genvar i; - assign d[0] = D; generate for (i = 0; i < DEPTH; i = i + 1) begin: slice From ee078ee0d3a25595c11e6660b38290811178adb1 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 18 Mar 2021 12:11:00 -0700 Subject: [PATCH 290/845] Reduce visual noise when running tests. Don't clutter the output with entering/leaving directory messages or spurious warnings from tools. Warnings and other yosys logs end up in the test-specific logfile. The test outputs are clearly marked and highlighted as passing/failing. Signed-off-by: Henner Zeller --- Makefile | 2 +- Makefile_plugin.common | 3 ++- Makefile_test.common | 12 +++++------- ql-iob-plugin/tests/ckpad/Makefile | 5 +++-- ql-iob-plugin/tests/sdiomux/Makefile | 5 +++-- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index f9f3f9fe0..c9f31beb2 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ clean_$(1): $$(MAKE) -C $(1)-plugin clean test_$(1): - $$(MAKE) -C $(1)-plugin test + @$$(MAKE) --no-print-directory -C $(1)-plugin test endef $(foreach plugin,$(PLUGIN_LIST),$(eval $(call install_plugin,$(plugin)))) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 053a79f82..7240233cb 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -1,3 +1,4 @@ +# -*- Makefile -*- # This Makefile template is supposed to be included in each plugin's Makefile. # Plugin Makefiles need to specify the plugin's name and source files. # The plugin name is how the final shared object will be named. @@ -52,7 +53,7 @@ install_plugin: $(NAME).so install -D $< $(PLUGINS_DIR)/$< test: - $(MAKE) -C tests all + @$(MAKE) -C tests all .PHONY: install install: install_plugin diff --git a/Makefile_test.common b/Makefile_test.common index 0d63166c4..ce9b809ef 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -22,34 +22,32 @@ TEST_UTILS=../../../test-utils/test-utils.tcl define test_tpl = $(1): $(1)/ok - @echo "Verifying result of test $(1)" @set +e; \ $$($(1)_verify); \ if [ $$$$? -eq 0 ]; then \ - echo "Test $(1) PASSED"; \ + printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ touch $$<; \ true; \ else \ - echo "Test $(1) FAILED"; \ + printf "Test %-18s \e[30;1mFAILED\e[0m @ %s\n" $(1) $(CURIDR); \ false; \ fi $(1)/ok: $(1)/$(1).v - @echo "Running test $(1)" @set +e; \ cd $(1); \ echo "source $(TEST_UTILS)" > run-$(1).tcl ;\ echo "source $(1).tcl" >> run-$(1).tcl ;\ DESIGN_TOP=$(1) TEST_OUTPUT_PREFIX=./ \ - yosys -c "run-$(1).tcl" -q -l $(1).log; \ + yosys -c "run-$(1).tcl" -q -q -l $(1).log; \ RETVAL=$$$$?; \ rm -f run-$(1).tcl; \ if [ ! -z "$$($(1)_negative)" ] && [ $$($(1)_negative) -eq 1 ]; then \ if [ $$$$RETVAL -ne 0 ]; then \ - echo "Negative test $(1) PASSED"; \ + printf "Negative test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ true; \ else \ - echo "Negative test $(1) FAILED"; \ + printf "Negative test %-18s \e[30;1mFAILED\e[0m @ %s\n" $(1) $(CURIDR); \ false; \ fi \ else \ diff --git a/ql-iob-plugin/tests/ckpad/Makefile b/ql-iob-plugin/tests/ckpad/Makefile index ac7b66425..b43bd4880 100644 --- a/ql-iob-plugin/tests/ckpad/Makefile +++ b/ql-iob-plugin/tests/ckpad/Makefile @@ -1,4 +1,5 @@ +# TODO: Integrate this in the Makefile_test.command environment ? test: - yosys -s script.ys - @echo $@ PASS + yosys -s script.ys -q -q -l $@.log + @printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $@ $(CURDIR); @touch ok diff --git a/ql-iob-plugin/tests/sdiomux/Makefile b/ql-iob-plugin/tests/sdiomux/Makefile index ac7b66425..b43bd4880 100644 --- a/ql-iob-plugin/tests/sdiomux/Makefile +++ b/ql-iob-plugin/tests/sdiomux/Makefile @@ -1,4 +1,5 @@ +# TODO: Integrate this in the Makefile_test.command environment ? test: - yosys -s script.ys - @echo $@ PASS + yosys -s script.ys -q -q -l $@.log + @printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $@ $(CURDIR); @touch ok From f460ee819f497c8bf6b408c1a224606c8248a79f Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 18 Mar 2021 12:17:42 -0700 Subject: [PATCH 291/845] Fix typo. Signed-off-by: Henner Zeller --- Makefile_test.common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile_test.common b/Makefile_test.common index ce9b809ef..75fcb364a 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -29,7 +29,7 @@ $(1): $(1)/ok touch $$<; \ true; \ else \ - printf "Test %-18s \e[30;1mFAILED\e[0m @ %s\n" $(1) $(CURIDR); \ + printf "Test %-18s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ false; \ fi @@ -47,7 +47,7 @@ $(1)/ok: $(1)/$(1).v printf "Negative test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ true; \ else \ - printf "Negative test %-18s \e[30;1mFAILED\e[0m @ %s\n" $(1) $(CURIDR); \ + printf "Negative test %-18s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ false; \ fi \ else \ From 01ea883694d768bcf5285884f4dc14ef618141f4 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 18 Mar 2021 12:39:23 -0700 Subject: [PATCH 292/845] Reduce noise in running ckpad and sdiomux. Signed-off-by: Henner Zeller --- ql-iob-plugin/tests/Makefile | 4 ++-- ql-iob-plugin/tests/ckpad/Makefile | 2 +- ql-iob-plugin/tests/sdiomux/Makefile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile index ed853e1dd..7575db9bd 100644 --- a/ql-iob-plugin/tests/Makefile +++ b/ql-iob-plugin/tests/Makefile @@ -6,8 +6,8 @@ clean: @find . -name "ok" | xargs rm -rf sdiomux/ok: - cd sdiomux && $(MAKE) test + @$(MAKE) -C sdiomux test ckpad/ok: - cd ckpad && $(MAKE) test + @$(MAKE) -C ckpad test .PHONY: all clean diff --git a/ql-iob-plugin/tests/ckpad/Makefile b/ql-iob-plugin/tests/ckpad/Makefile index b43bd4880..912d6f472 100644 --- a/ql-iob-plugin/tests/ckpad/Makefile +++ b/ql-iob-plugin/tests/ckpad/Makefile @@ -1,5 +1,5 @@ # TODO: Integrate this in the Makefile_test.command environment ? test: - yosys -s script.ys -q -q -l $@.log + @yosys -s script.ys -q -q -l $@.log @printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $@ $(CURDIR); @touch ok diff --git a/ql-iob-plugin/tests/sdiomux/Makefile b/ql-iob-plugin/tests/sdiomux/Makefile index b43bd4880..912d6f472 100644 --- a/ql-iob-plugin/tests/sdiomux/Makefile +++ b/ql-iob-plugin/tests/sdiomux/Makefile @@ -1,5 +1,5 @@ # TODO: Integrate this in the Makefile_test.command environment ? test: - yosys -s script.ys -q -q -l $@.log + @yosys -s script.ys -q -q -l $@.log @printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $@ $(CURDIR); @touch ok From 3c62a8e9164d0d0716c9f23b243585d98513662d Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 18 Mar 2021 13:48:29 +0100 Subject: [PATCH 293/845] xdc: allow GTPE2_CHANNEL to have IO_LOC_PAIRS The GTPE2_CHANNEL does not have intermediate buffers to the IOPADs. Therefore, it is necessary to allow it to have IO_LOC_PAIRS attributes to generate correct placement constraints based on the IO signals locations. Signed-off-by: Alessandro Comodi --- xdc-plugin/xdc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index c248542c1..a5af89153 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -57,7 +57,8 @@ const std::unordered_map> supported_primit {"IBUF", {"IO_LOC_PAIRS", "IOSTANDARD"}}, {"IOBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, {"IOBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, - {"IBUFDS_GTE2", {"IO_LOC_PAIRS"}}}; + {"IBUFDS_GTE2", {"IO_LOC_PAIRS"}}, + {"GTPE2_CHANNEL", {"IO_LOC_PAIRS"}}}; void register_in_tcl_interpreter(const std::string &command) { From 7a30da637443204cd892ba010f9d2b074e36d0de Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 18 Mar 2021 20:19:17 +0100 Subject: [PATCH 294/845] xdc: add test for IO_LOC_PAIRS in IBUFDS_GTE2 and GTPE2_CHANNEL Signed-off-by: Alessandro Comodi --- xdc-plugin/tests/compare_output_json.py | 2 +- .../io_loc_pairs/io_loc_pairs.golden.json | 98 ++++++++++--------- .../tests/io_loc_pairs/io_loc_pairs.tcl | 9 +- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v | 35 ++++++- .../tests/io_loc_pairs/io_loc_pairs.xdc | 32 ++++-- 5 files changed, 117 insertions(+), 59 deletions(-) diff --git a/xdc-plugin/tests/compare_output_json.py b/xdc-plugin/tests/compare_output_json.py index fc1e1133d..f48d966b9 100644 --- a/xdc-plugin/tests/compare_output_json.py +++ b/xdc-plugin/tests/compare_output_json.py @@ -10,7 +10,7 @@ import json import argparse -parameters = ["IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"] +parameters = ["IOSTANDARD", "DRIVE", "SLEW", "IN_TERM", "IO_LOC_PAIRS"] def read_cells(json_file): with open(json_file) as f: diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.golden.json b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.golden.json index 2e9102dda..10d3909c7 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.golden.json +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.golden.json @@ -1,47 +1,53 @@ { - "OBUFTDS_2": { - "IOSTANDARD": "DIFF_SSTL135", - "IO_LOC_PAIRS": "signal_p:N2,signal_n:N1", - "SLEW": "FAST" - }, - "OBUF_6": { - "DRIVE": "12", - "IOSTANDARD": "LVCMOS33", - "IO_LOC_PAIRS": "led[0]:D10", - "SLEW": "SLOW" - }, - "OBUF_7": { - "IN_TERM": "UNTUNED_SPLIT_40", - "IOSTANDARD": "SSTL135", - "IO_LOC_PAIRS": "led[1]:A9", - "SLEW": "FAST" - }, - "OBUF_OUT": { - "IN_TERM": "UNTUNED_SPLIT_50", - "IOSTANDARD": "LVCMOS33", - "IO_LOC_PAIRS": "out_a:E3", - "SLEW": "FAST" - }, - "bottom_inst.OBUF_10": { - "IOSTANDARD": "LVCMOS18", - "IO_LOC_PAIRS": "out_b[0]:C2", - "SLEW": "SLOW" - }, - "bottom_inst.OBUF_11": { - "DRIVE": "4", - "IOSTANDARD": "LVCMOS25", - "IO_LOC_PAIRS": "out_b[1]:R2", - "SLEW": "FAST" - }, - "bottom_inst.OBUF_9": { - "IOSTANDARD": "DIFF_SSTL135", - "IO_LOC_PAIRS": "led[2]:M6", - "SLEW": "FAST" - }, - "bottom_intermediate_inst.OBUF_8": { - "DRIVE": "16", - "IOSTANDARD": "SSTL135", - "IO_LOC_PAIRS": "led[3]:N4", - "SLEW": "SLOW" - } -} \ No newline at end of file + "GTPE2_CHANNEL": { + "IO_LOC_PAIRS": "rx_p:G1,rx_n:G2,tx_p:G3,tx_n:G4" + }, + "IBUFDS_GTE2": { + "IO_LOC_PAIRS": "ibufds_gte2_i:G5,ibufds_gte2_ib:G6" + }, + "OBUFTDS_2": { + "IOSTANDARD": "DIFF_SSTL135", + "IO_LOC_PAIRS": "signal_p:N2,signal_n:N1", + "SLEW": "FAST" + }, + "OBUF_6": { + "DRIVE": "12", + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "led[0]:D10", + "SLEW": "SLOW" + }, + "OBUF_7": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "IO_LOC_PAIRS": "led[1]:A9", + "SLEW": "FAST" + }, + "OBUF_OUT": { + "IN_TERM": "UNTUNED_SPLIT_50", + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "out_a:E3", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_10": { + "IOSTANDARD": "LVCMOS18", + "IO_LOC_PAIRS": "out_b[0]:C2", + "SLEW": "SLOW" + }, + "bottom_inst.OBUF_11": { + "DRIVE": "4", + "IOSTANDARD": "LVCMOS25", + "IO_LOC_PAIRS": "out_b[1]:R2", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_9": { + "IOSTANDARD": "DIFF_SSTL135", + "IO_LOC_PAIRS": "led[2]:M6", + "SLEW": "FAST" + }, + "bottom_intermediate_inst.OBUF_8": { + "DRIVE": "16", + "IOSTANDARD": "SSTL135", + "IO_LOC_PAIRS": "led[3]:N4", + "SLEW": "SLOW" + } +} diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl index fdbe8968d..d74a142d6 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -5,12 +5,19 @@ yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v +read_verilog -lib -specify +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +read_verilog -lib cells_xtra.v + +hierarchy -check -top top + # -flatten is used to ensure that the output eblif has only one module. # Some of symbiflow expects eblifs with only one module. -synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -run prepare:check #Read the design constraints read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc # Write the design in JSON format. write_json [test_output_path "io_loc_pairs.json"] +write_blif -param [test_output_path "io_loc_pairs.eblif"] diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v index e5d2896fe..42047db9c 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v @@ -4,7 +4,13 @@ module top ( inout out_a, output [1:0] out_b, output signal_p, - output signal_n + output signal_n, + input rx_n, + input rx_p, + output tx_n, + output tx_p, + input ibufds_gte2_i, + input ibufds_gte2_ib ); wire LD6, LD7, LD8, LD9; @@ -20,12 +26,14 @@ module top ( assign led[1] = inter_wire; assign inter_wire = inter_wire_2; assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( .I (LD6), .O (signal_p), .OB(signal_n), .T (1'b1) ); + OBUF #( .IOSTANDARD("LVCMOS33"), .SLEW("SLOW") @@ -33,6 +41,7 @@ module top ( .I(LD6), .O(led[0]) ); + OBUF #( .IOSTANDARD("LVCMOS33"), .SLEW("SLOW") @@ -40,6 +49,7 @@ module top ( .I(LD7), .O(inter_wire_2) ); + OBUF #( .IOSTANDARD("LVCMOS33"), .SLEW("SLOW") @@ -47,23 +57,40 @@ module top ( .I(LD7), .O(out_a) ); + bottom bottom_inst ( .I (LD8), .O (led[2]), .OB(out_b) ); + bottom_intermediate bottom_intermediate_inst ( .I(LD9), .O(led[3]) ); + + GTPE2_CHANNEL GTPE2_CHANNEL( + .GTPRXP(rx_p), + .GTPRXN(rx_n), + .GTPTXP(tx_p), + .GTPTXN(tx_n) + ); + + (* keep *) + IBUFDS_GTE2 IBUFDS_GTE2( + .I(ibufds_gte2_i), + .IB(ibufds_gte2_ib) + ); endmodule module bottom_intermediate ( input I, output O ); - wire bottom_intermediate_wire; + +wire bottom_intermediate_wire; assign O = bottom_intermediate_wire; + OBUF #( .IOSTANDARD("LVCMOS33"), .SLEW("SLOW") @@ -78,6 +105,7 @@ module bottom ( output [1:0] OB, output O ); + OBUF #( .IOSTANDARD("LVCMOS33"), .SLEW("SLOW") @@ -85,6 +113,7 @@ module bottom ( .I(I), .O(O) ); + OBUF #( .IOSTANDARD("LVCMOS33"), .SLEW("SLOW") @@ -92,6 +121,7 @@ module bottom ( .I(I), .O(OB[0]) ); + OBUF #( .IOSTANDARD("LVCMOS33"), .SLEW("SLOW") @@ -100,4 +130,3 @@ module bottom ( .O(OB[1]) ); endmodule - diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc index 0957374f4..9263df9cf 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc @@ -1,36 +1,52 @@ -#OBUF_6 +# OBUF_6 set_property LOC D10 [get_ports {led[0]}] set_property DRIVE 12 [get_ports {led[0]}] -#OBUF_7 + +# OBUF_7 set_property LOC A9 [get_ports {led[1]}] set_property IN_TERM UNTUNED_SPLIT_40 [get_ports led[1]] set_property SLEW FAST [get_ports led[1]] set_property IOSTANDARD SSTL135 [get_ports led[1]] -#OBUF_OUT + +# OBUF_OUT set_property LOC E3 [get_ports out_a] set_property IN_TERM UNTUNED_SPLIT_50 [get_ports out_a] set_property SLEW FAST [get_ports out_a] set_property IOSTANDARD LVCMOS33 [get_ports out_a] -#bottom_inst.OBUF_10 + +# bottom_inst.OBUF_10 set_property LOC C2 [get_ports {out_b[0]}] set_property SLEW SLOW [get_ports {out_b[0]}] set_property IOSTANDARD LVCMOS18 [get_ports {out_b[0]}] -#bottom_inst.OBUF_11 + +# bottom_inst.OBUF_11 set_property LOC R2 [get_ports {out_b[1]}] set_property DRIVE 4 [get_ports {out_b[1]}] set_property SLEW FAST [get_ports {out_b[1]}] set_property IOSTANDARD LVCMOS25 [get_ports {out_b[1]}] -#bottom_inst.OBUF_9 + +# bottom_inst.OBUF_9 set_property LOC M6 [get_ports {led[2]}] set_property SLEW FAST [get_ports {led[2]}] set_property IOSTANDARD DIFF_SSTL135 [get_ports {led[2]}] -#bottom_intermediate_inst.OBUF_8 + +# bottom_intermediate_inst.OBUF_8 set_property LOC N4 [get_ports {led[3]}] set_property DRIVE 16 [get_ports {led[3]}] set_property IOSTANDARD SSTL135 [get_ports {led[3]}] -#OBUFTDS_2 + +# OBUFTDS_2 set_property LOC N2 [get_ports signal_p] set_property LOC N1 [get_ports signal_n] set_property SLEW FAST [get_ports signal_p] set_property IOSTANDARD DIFF_SSTL135 [get_ports signal_p] +# GTPE2_CHANNEL +set_property LOC G1 [get_ports {rx_p}] +set_property LOC G2 [get_ports {rx_n}] +set_property LOC G3 [get_ports {tx_p}] +set_property LOC G4 [get_ports {tx_n}] + +# IBUFDS_GTE2 +set_property LOC G5 [get_ports {ibufds_gte2_i}] +set_property LOC G6 [get_ports {ibufds_gte2_ib}] From f908ea9df294a096f0cd5324a4fadc4e53dec655 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 18 Mar 2021 20:19:44 +0100 Subject: [PATCH 295/845] xdc: add comment on GTPE2_CHANNEL IO_LOC_PAIR param Signed-off-by: Alessandro Comodi --- xdc-plugin/tests/io_loc_pairs/cells_xtra.v | 12 ++++++++++++ xdc-plugin/xdc.cc | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 xdc-plugin/tests/io_loc_pairs/cells_xtra.v diff --git a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v new file mode 100644 index 000000000..a4a775e0c --- /dev/null +++ b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v @@ -0,0 +1,12 @@ +module GTPE2_CHANNEL ( + (* iopad_external_pin *) + output GTPTXN, + (* iopad_external_pin *) + output GTPTXP, + (* iopad_external_pin *) + input GTPRXN, + (* iopad_external_pin *) + input GTPRXP +); + +endmodule diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index a5af89153..4729ed079 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -50,6 +50,10 @@ const std::unordered_map set_property_options_m {"LOC", SetPropertyOptions::IO_LOC_PAIRS}, {"PACKAGE_PIN", SetPropertyOptions::IO_LOC_PAIRS}}; +// Apart from the common I/OBUFs there is also the GTPE2_CHANNEL primitive which has a total +// of four IOPADs (2 IPADs and 2 OPADs) which are directly connected to the GTP[RT]X[PN] ports +// of the BEL. The GTPE2_CHANNEL holds all the placement constraints information of the +// corresponding PADs const std::unordered_map> supported_primitive_parameters = { {"OBUF", {"IO_LOC_PAIRS", "IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"}}, {"OBUFDS", {"IO_LOC_PAIRS", "IOSTANDARD", "SLEW", "IN_TERM"}}, From 9544b097ef8b0b2d2d76f63b87b1934a12bfff2d Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 18 Mar 2021 16:07:35 -0700 Subject: [PATCH 296/845] Fix loading of ql-qlf-k4n8 plugin in tests; use canonical test.v name The line that is loading the plug-in is meant to skip attempting loading a plugin with a particular name if the symbol we're interested in is already there. So in the ql-qlf-k4n8 case, we have to test for synth_quicklogic: -if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } (reasaon for all that: this allows to statically link the plugins and have these scripts work idempotently). For loading the test-related *.v files: use `$::env(DESIGN_TOP).v` instead of the direct name. That allows it to run independently from where the tests are invoked, as the test-driver can set the environment variable to the fully qualified path. Signed-off-by: Henner Zeller --- ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl | 4 ++-- ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl | 4 ++-- ql-qlf-k4n8-plugin/tests/latches/latches.tcl | 5 ++--- ql-qlf-k4n8-plugin/tests/logic/logic.tcl | 4 ++-- ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl | 4 ++-- ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl | 6 +++--- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl index 31fd59461..457e375ea 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl @@ -1,8 +1,8 @@ yosys -import -if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } yosys -import ;# ingest plugin commands -read_verilog dffs.v +read_verilog $::env(DESIGN_TOP).v design -save read # DFF diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl index 9789e8476..f367b82a7 100644 --- a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl +++ b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl @@ -1,8 +1,8 @@ yosys -import -if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } yosys -import ;# ingest plugin commands -read_verilog iob_no_flatten.v +read_verilog $::env(DESIGN_TOP).v synth_quicklogic -top my_top yosys stat diff --git a/ql-qlf-k4n8-plugin/tests/latches/latches.tcl b/ql-qlf-k4n8-plugin/tests/latches/latches.tcl index 7816461c6..f586568a4 100644 --- a/ql-qlf-k4n8-plugin/tests/latches/latches.tcl +++ b/ql-qlf-k4n8-plugin/tests/latches/latches.tcl @@ -1,8 +1,8 @@ yosys -import -if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } yosys -import ;# ingest plugin commands -read_verilog latches.v +read_verilog $::env(DESIGN_TOP).v design -save read # LATCHP @@ -17,4 +17,3 @@ synth_quicklogic -top latchn yosys cd latchn stat select -assert-count 1 t:\$_DLATCH_N_ - diff --git a/ql-qlf-k4n8-plugin/tests/logic/logic.tcl b/ql-qlf-k4n8-plugin/tests/logic/logic.tcl index 6db75e89f..80500ff29 100644 --- a/ql-qlf-k4n8-plugin/tests/logic/logic.tcl +++ b/ql-qlf-k4n8-plugin/tests/logic/logic.tcl @@ -1,8 +1,8 @@ yosys -import -if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } yosys -import ;# ingest plugin commands -read_verilog logic.v +read_verilog $::env(DESIGN_TOP).v hierarchy -top top yosys proc equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic diff --git a/ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl b/ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl index 0fcbdf453..95c9c608e 100644 --- a/ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl +++ b/ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl @@ -1,8 +1,8 @@ yosys -import -if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } yosys -import ;# ingest plugin commands -read_verilog shreg.v +read_verilog $::env(DESIGN_TOP).v synth_quicklogic -top top stat select -assert-count 8 t:sh_dff diff --git a/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl b/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl index 7f5466546..92f91b57c 100644 --- a/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl +++ b/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl @@ -1,9 +1,9 @@ yosys -import -if { [info procs ql-qlf-k4n8] == {} } { plugin -i ql-qlf-k4n8 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } yosys -import ;# ingest plugin commands # Equivalence check for adder synthesis -read_verilog -icells -DWIDTH=4 soft_adder.v +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top adder yosys proc equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 @@ -11,7 +11,7 @@ equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -famil design -reset # Equivalence check for subtractor synthesis -read_verilog -icells -DWIDTH=4 soft_adder.v +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top subtractor yosys proc equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 From 83a5b078b70b021468286b2c403696ccb8fab570 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 18 Mar 2021 16:16:10 -0700 Subject: [PATCH 297/845] Fix formatting of recent verilog file changes. Signed-off-by: Henner Zeller --- xdc-plugin/tests/io_loc_pairs/cells_xtra.v | 4 ++-- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v index a4a775e0c..68a6f8770 100644 --- a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v +++ b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v @@ -4,9 +4,9 @@ module GTPE2_CHANNEL ( (* iopad_external_pin *) output GTPTXP, (* iopad_external_pin *) - input GTPRXN, + input GTPRXN, (* iopad_external_pin *) - input GTPRXP + input GTPRXP ); endmodule diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v index 42047db9c..9ece605c0 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v @@ -69,17 +69,17 @@ module top ( .O(led[3]) ); - GTPE2_CHANNEL GTPE2_CHANNEL( - .GTPRXP(rx_p), - .GTPRXN(rx_n), - .GTPTXP(tx_p), - .GTPTXN(tx_n) + GTPE2_CHANNEL GTPE2_CHANNEL ( + .GTPRXP(rx_p), + .GTPRXN(rx_n), + .GTPTXP(tx_p), + .GTPTXN(tx_n) ); (* keep *) - IBUFDS_GTE2 IBUFDS_GTE2( - .I(ibufds_gte2_i), - .IB(ibufds_gte2_ib) + IBUFDS_GTE2 IBUFDS_GTE2 ( + .I (ibufds_gte2_i), + .IB(ibufds_gte2_ib) ); endmodule @@ -88,7 +88,7 @@ module bottom_intermediate ( output O ); -wire bottom_intermediate_wire; + wire bottom_intermediate_wire; assign O = bottom_intermediate_wire; OBUF #( From 14d6d00b83f044d3217c43731c5e7a095c587219 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Fri, 19 Mar 2021 07:11:45 -0700 Subject: [PATCH 298/845] add support for negative edge trigfer for ffs and option to turn off ff tech map Signed-off-by: Tarachand Pagarani --- ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v | 49 ++++++++++++++++++++++ ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v | 39 +++++++++++++++++ ql-qlf-k4n8-plugin/synth_quicklogic.cc | 13 +++++- ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl | 37 ++++++++++++++++ ql-qlf-k4n8-plugin/tests/dffs/dffs.v | 56 +++++++++++++++++++++++++ 5 files changed, 193 insertions(+), 1 deletion(-) diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v b/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v index b62ad50c3..91a7e87de 100644 --- a/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v @@ -133,3 +133,52 @@ module dffs( Q <= D; endmodule +(* abc9_flop, lib_whitebox *) +module dffn( + output reg Q, + input D, + (* clkbuf_sink *) + input C +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(negedge C) + Q <= D; +endmodule + +(* abc9_flop, lib_whitebox *) +module dffnr( + output reg Q, + input D, + (* clkbuf_sink *) + input C, + input R +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(negedge C or negedge R) + if (!R) + Q <= 1'b0; + else + Q <= D; +endmodule + +(* abc9_flop, lib_whitebox *) +module dffns( + output reg Q, + input D, + (* clkbuf_sink *) + input C, + input S +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(negedge C or negedge S) + if (!S) + Q <= 1'b1; + else + Q <= D; +endmodule diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v b/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v index f5f160fde..e8b5bc205 100644 --- a/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v @@ -37,6 +37,45 @@ module \$_DFF_PP1_ (D, Q, C, R); dffs _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(!R)); endmodule +module \$_DFF_N_ (D, Q, C); + input D; + input C; + output Q; + dffn _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C)); +endmodule + +module \$_DFF_NN0_ (D, Q, C, R); + input D; + input C; + input R; + output Q; + dffnr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R)); +endmodule + +module \$_DFF_NP0_ (D, Q, C, R); + input D; + input C; + input R; + output Q; + dffnr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R)); +endmodule + +module \$_DFF_NN1_ (D, Q, C, R); + input D; + input C; + input R; + output Q; + dffns _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(R)); +endmodule + +module \$_DFF_NP1_ (D, Q, C, R); + input D; + input C; + input R; + output Q; + dffns _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(!R)); +endmodule + module \$__SHREG_DFF_P_ (D, Q, C); input D; input C; diff --git a/ql-qlf-k4n8-plugin/synth_quicklogic.cc b/ql-qlf-k4n8-plugin/synth_quicklogic.cc index baeb045c7..626c7b10d 100644 --- a/ql-qlf-k4n8-plugin/synth_quicklogic.cc +++ b/ql-qlf-k4n8-plugin/synth_quicklogic.cc @@ -63,6 +63,9 @@ struct SynthQuickLogicPass : public ScriptPass { log(" By default use adder cells in output netlist.\n"); log(" Specifying this switch turns it off.\n"); log("\n"); + log(" -no_ff_map\n"); + log(" By default ff techmap is turned on. Specifying this switch turns it off.\n"); + log("\n"); log("\n"); log("The following commands are executed by this synthesis command:\n"); help_script(); @@ -72,6 +75,7 @@ struct SynthQuickLogicPass : public ScriptPass { string top_opt, edif_file, blif_file, family, currmodule, verilog_file; bool inferAdder; bool abcOpt; + bool noffmap; void clear_flags() override { @@ -83,6 +87,7 @@ struct SynthQuickLogicPass : public ScriptPass { family = "qlf_k4n8"; inferAdder = true; abcOpt = true; + noffmap = false; } void execute(std::vector args, RTLIL::Design *design) override @@ -121,6 +126,10 @@ struct SynthQuickLogicPass : public ScriptPass { abcOpt = false; continue; } + if (args[argidx] == "-no_ff_map") { + noffmap = true; + continue; + } break; } @@ -200,7 +209,9 @@ struct SynthQuickLogicPass : public ScriptPass { if (family == "qlf_k4n8") { run("shregmap -minlen 8 -maxlen 8"); } - run("techmap " + techMapArgs); + if (!noffmap) { + run("techmap " + techMapArgs); + } run("opt_expr -mux_undef"); run("simplemap"); run("opt_expr"); diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl index 457e375ea..6682a101f 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl @@ -43,3 +43,40 @@ synth_quicklogic -top my_dffs_n yosys cd my_dffs_n stat select -assert-count 1 t:dffs + +# DFFN +design -load read +synth_quicklogic -top my_dffn +yosys cd my_dffn +stat +select -assert-count 1 t:dffn + +# DFFNR (negedge CLK posedge RST) +design -load read +synth_quicklogic -top my_dffnr_p +yosys cd my_dffnr_p +stat +select -assert-count 1 t:dffnr +select -assert-count 1 t:\$lut + +# DFFNR (negedge CLK negedge RST) +design -load read +synth_quicklogic -top my_dffnr_n +yosys cd my_dffnr_n +stat +select -assert-count 1 t:dffnr + +# DFFNS (negedge CLK posedge SET) +design -load read +synth_quicklogic -top my_dffns_p +yosys cd my_dffns_p +stat +select -assert-count 1 t:dffns +select -assert-count 1 t:\$lut + +# DFFS (negedge CLK negedge SET) +design -load read +synth_quicklogic -top my_dffns_n +yosys cd my_dffns_n +stat +select -assert-count 1 t:dffns diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v index 180b9261f..59c100295 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v @@ -55,3 +55,59 @@ module my_dffs_n ( else q <= d; endmodule +module my_dffn ( + input d, + clk, + output reg q +); + initial q <= 1'b0; + always @(negedge clk) q <= d; +endmodule + +module my_dffnr_p ( + input d, + clk, + clr, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or posedge clr) + if (clr) q <= 1'b0; + else q <= d; +endmodule + +module my_dffnr_n ( + input d, + clk, + clr, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or negedge clr) + if (!clr) q <= 1'b0; + else q <= d; +endmodule + +module my_dffns_p ( + input d, + clk, + pre, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or posedge pre) + if (pre) q <= 1'b1; + else q <= d; +endmodule + +module my_dffns_n ( + input d, + clk, + pre, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or negedge pre) + if (!pre) q <= 1'b1; + else q <= d; +endmodule From 4b23cb5bf4188c16ee6c474b456b90af92066675 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 19 Mar 2021 13:27:45 -0700 Subject: [PATCH 299/845] Refer to file location in script independent from where it runs. Signed-off-by: Henner Zeller --- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl index d74a142d6..65a07abeb 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -7,7 +7,7 @@ read_verilog $::env(DESIGN_TOP).v read_verilog -lib -specify +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v -read_verilog -lib cells_xtra.v +read_verilog -lib [file dirname $::env(DESIGN_TOP)]/cells_xtra.v hierarchy -check -top top From 2406df8abb077cb50e757409cfabdc86dc56afc6 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Mon, 22 Mar 2021 01:19:58 -0700 Subject: [PATCH 300/845] update dfflegalize to target negative edge triggered flops Signed-off-by: Tarachand Pagarani --- ql-qlf-k4n8-plugin/synth_quicklogic.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-k4n8-plugin/synth_quicklogic.cc b/ql-qlf-k4n8-plugin/synth_quicklogic.cc index 626c7b10d..aca4a8858 100644 --- a/ql-qlf-k4n8-plugin/synth_quicklogic.cc +++ b/ql-qlf-k4n8-plugin/synth_quicklogic.cc @@ -218,7 +218,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_merge"); run("opt_clean"); run("opt"); - run("dfflegalize -cell $_DFF_P_ x -cell $_DFF_P??_ x"); + run("dfflegalize -cell $_DFF_P_ x -cell $_DFF_P??_ x -cell $_DFF_N_ x -cell _DFF_N??_"); } if (check_label("map_luts")) { From 144870ba0f4b2ccdbc98dd29938e3a5b52db507b Mon Sep 17 00:00:00 2001 From: tpagarani <33743249+tpagarani@users.noreply.github.com> Date: Mon, 22 Mar 2021 15:11:58 +0530 Subject: [PATCH 301/845] Update ql-qlf-k4n8-plugin/synth_quicklogic.cc Co-authored-by: Karol Gugala Signed-off-by: Tarachand Pagarani --- ql-qlf-k4n8-plugin/synth_quicklogic.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-k4n8-plugin/synth_quicklogic.cc b/ql-qlf-k4n8-plugin/synth_quicklogic.cc index aca4a8858..ea8ad80ad 100644 --- a/ql-qlf-k4n8-plugin/synth_quicklogic.cc +++ b/ql-qlf-k4n8-plugin/synth_quicklogic.cc @@ -218,7 +218,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_merge"); run("opt_clean"); run("opt"); - run("dfflegalize -cell $_DFF_P_ x -cell $_DFF_P??_ x -cell $_DFF_N_ x -cell _DFF_N??_"); + run("dfflegalize -cell $_DFF_P_ x -cell $_DFF_P??_ x -cell $_DFF_N_ x -cell _DFF_N??_ x"); } if (check_label("map_luts")) { From 0179cf46327ec167e4cd2c01bf0a3fa75665b20d Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Mon, 22 Mar 2021 04:01:15 -0700 Subject: [PATCH 302/845] fix type on DFF_N naming Signed-off-by: Tarachand Pagarani --- ql-qlf-k4n8-plugin/synth_quicklogic.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-k4n8-plugin/synth_quicklogic.cc b/ql-qlf-k4n8-plugin/synth_quicklogic.cc index ea8ad80ad..1d5878da9 100644 --- a/ql-qlf-k4n8-plugin/synth_quicklogic.cc +++ b/ql-qlf-k4n8-plugin/synth_quicklogic.cc @@ -218,7 +218,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_merge"); run("opt_clean"); run("opt"); - run("dfflegalize -cell $_DFF_P_ x -cell $_DFF_P??_ x -cell $_DFF_N_ x -cell _DFF_N??_ x"); + run("dfflegalize -cell $_DFF_P_ x -cell $_DFF_P??_ x -cell $_DFF_N_ x -cell $_DFF_N??_ x"); } if (check_label("map_luts")) { From c3a44ddd237f2307b88811afd598a4c4a2118fc4 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 19 Mar 2021 11:42:14 +0100 Subject: [PATCH 303/845] Fixed the synthesis flow for qlf_k4n8 so that flip-flops are mapped correctly. Signed-off-by: Maciej Kurc --- ql-qlf-k4n8-plugin/synth_quicklogic.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ql-qlf-k4n8-plugin/synth_quicklogic.cc b/ql-qlf-k4n8-plugin/synth_quicklogic.cc index 1d5878da9..31690b7d9 100644 --- a/ql-qlf-k4n8-plugin/synth_quicklogic.cc +++ b/ql-qlf-k4n8-plugin/synth_quicklogic.cc @@ -205,20 +205,20 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_ffs")) { - std::string techMapArgs = " -map +/quicklogic/" + family + "_ffs_map.v"; if (family == "qlf_k4n8") { run("shregmap -minlen 8 -maxlen 8"); } - if (!noffmap) { - run("techmap " + techMapArgs); - } run("opt_expr -mux_undef"); - run("simplemap"); - run("opt_expr"); run("opt_merge"); run("opt_clean"); run("opt"); - run("dfflegalize -cell $_DFF_P_ x -cell $_DFF_P??_ x -cell $_DFF_N_ x -cell $_DFF_N??_ x"); + run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0"); + + std::string techMapArgs = " -map +/techmap.v"; + if (!noffmap) { + techMapArgs += " -map +/quicklogic/" + family + "_ffs_map.v"; + } + run("techmap " + techMapArgs); } if (check_label("map_luts")) { From 2c936b5318e3d5829162f2ffd3992da7f789628b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 19 Mar 2021 11:43:17 +0100 Subject: [PATCH 304/845] Fixed the techmap for qlf_k4n8 shift registers Signed-off-by: Maciej Kurc --- ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v b/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v index e8b5bc205..08f0807a6 100644 --- a/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v +++ b/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v @@ -89,7 +89,7 @@ module \$__SHREG_DFF_P_ (D, Q, C); // First in chain generate if (i == 0) begin - sh_dff #() _TECHMAP_REPLACE_ ( + sh_dff #() shreg_beg ( .Q(q[i]), .D(D), .C(C) @@ -97,7 +97,7 @@ module \$__SHREG_DFF_P_ (D, Q, C); end endgenerate // Middle in chain generate if (i > 0 && i != DEPTH-1) begin - sh_dff #() _TECHMAP_REPLACE_ ( + sh_dff #() shreg_mid ( .Q(q[i]), .D(q[i-1]), .C(C) @@ -105,7 +105,7 @@ module \$__SHREG_DFF_P_ (D, Q, C); end endgenerate // Last in chain generate if (i == DEPTH-1) begin - sh_dff #() _TECHMAP_REPLACE_ ( + sh_dff #() shreg_end ( .Q(Q), .D(q[i-1]), .C(C) From 85a266babc65575da46923d03421563d1376003a Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 19 Mar 2021 11:43:43 +0100 Subject: [PATCH 305/845] Updated tests Signed-off-by: Maciej Kurc --- ql-qlf-k4n8-plugin/tests/dffs/dffs.v | 5 ----- ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v | 1 - 2 files changed, 6 deletions(-) diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v index 59c100295..7a4d5f9a0 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v +++ b/ql-qlf-k4n8-plugin/tests/dffs/dffs.v @@ -3,7 +3,6 @@ module my_dff ( clk, output reg q ); - initial q <= 1'b0; always @(posedge clk) q <= d; endmodule @@ -13,7 +12,6 @@ module my_dffr_p ( clr, output reg q ); - initial q <= 1'b0; always @(posedge clk or posedge clr) if (clr) q <= 1'b0; else q <= d; @@ -25,7 +23,6 @@ module my_dffr_n ( clr, output reg q ); - initial q <= 1'b0; always @(posedge clk or negedge clr) if (!clr) q <= 1'b0; else q <= d; @@ -37,7 +34,6 @@ module my_dffs_p ( pre, output reg q ); - initial q <= 1'b0; always @(posedge clk or posedge pre) if (pre) q <= 1'b1; else q <= d; @@ -49,7 +45,6 @@ module my_dffs_n ( pre, output reg q ); - initial q <= 1'b0; always @(posedge clk or negedge pre) if (!pre) q <= 1'b1; else q <= d; diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v index 497c614fa..8dea6f005 100644 --- a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v +++ b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v @@ -3,7 +3,6 @@ module my_dff ( clk, output reg q ); - initial q <= 1'b0; always @(posedge clk) q <= d; endmodule From f02851af094f09d641972b7b3572014848e96615 Mon Sep 17 00:00:00 2001 From: Lalit Sharma Date: Wed, 24 Mar 2021 04:39:42 -0700 Subject: [PATCH 306/845] Replacing assignment with considitional assignment so that these variables can be assigned through command Signed-off-by: Lalit Sharma --- Makefile_plugin.common | 12 ++++++------ Makefile_test.common | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 7240233cb..5e0a244f2 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -37,12 +37,12 @@ # | | |-- ... # |-- example2-plugin # |-- ... -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) #-DSDC_DEBUG -LDFLAGS = $(shell yosys-config --ldflags) -LDLIBS = $(shell yosys-config --ldlibs) -PLUGINS_DIR = $(shell yosys-config --datdir)/plugins -DATA_DIR = $(shell yosys-config --datdir) +CXX ?= $(shell yosys-config --cxx) +CXXFLAGS ?= $(shell yosys-config --cxxflags) #-DSDC_DEBUG +LDFLAGS ?= $(shell yosys-config --ldflags) +LDLIBS ?= $(shell yosys-config --ldlibs) +PLUGINS_DIR ?= $(shell yosys-config --datdir)/plugins +DATA_DIR ?= $(shell yosys-config --datdir) OBJS := $(SOURCES:cc=o) diff --git a/Makefile_test.common b/Makefile_test.common index 75fcb364a..d1c8789ea 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -13,12 +13,12 @@ # test1_verify = $(call diff_test,test1,ext) && test $$(grep "PASS" test1/test1.txt | wc -l) -eq 2 # test2_verify = $(call diff_test,test2,ext) # -GTEST_DIR = ../../third_party/googletest/googletest -CXX = $(shell yosys-config --cxx) -CXXFLAGS = $(shell yosys-config --cxxflags) -I.. -I$(GTEST_DIR)/include -LDLIBS = $(shell yosys-config --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread -LDFLAGS = $(shell yosys-config --ldflags) -TEST_UTILS=../../../test-utils/test-utils.tcl +GTEST_DIR ?= ../../third_party/googletest/googletest +CXX ?= $(shell yosys-config --cxx) +CXXFLAGS ?= $(shell yosys-config --cxxflags) -I.. -I$(GTEST_DIR)/include +LDLIBS ?= $(shell yosys-config --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread +LDFLAGS ?= $(shell yosys-config --ldflags) +TEST_UTILS ?= ../../../test-utils/test-utils.tcl define test_tpl = $(1): $(1)/ok From 868c5b8be87ebb1810e52bc36fb34a10d861911f Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 24 Mar 2021 15:44:41 +0100 Subject: [PATCH 307/845] Add qlf_k6n10 plugin Signed-off-by: samycharas --- ql-qlf-k6n10-plugin/Makefile | 9 + ql-qlf-k6n10-plugin/cells_sim.v | 24 ++ ql-qlf-k6n10-plugin/qlf_k6n10_arith_map.v | 60 ++++ ql-qlf-k6n10-plugin/qlf_k6n10_brams.txt | 139 +++++++++ ql-qlf-k6n10-plugin/qlf_k6n10_brams_map.v | 199 +++++++++++++ ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v | 196 ++++++++++++ ql-qlf-k6n10-plugin/qlf_k6n10_ffs_map.v | 6 + ql-qlf-k6n10-plugin/qlf_k6n10_lut_map.v | 23 ++ ql-qlf-k6n10-plugin/synth_quicklogic.cc | 280 ++++++++++++++++++ ql-qlf-k6n10-plugin/tests/Makefile | 17 ++ ql-qlf-k6n10-plugin/tests/bram/bram.tcl | 27 ++ ql-qlf-k6n10-plugin/tests/bram/bram.v | 171 +++++++++++ ql-qlf-k6n10-plugin/tests/bram/bram.ys | 46 +++ ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl | 15 + ql-qlf-k6n10-plugin/tests/dffs/dffs.v | 6 + .../tests/hard_adder/hard_adder.tcl | 18 ++ .../tests/hard_adder/hard_adder.v | 22 ++ .../tests/iob_no_flatten/iob_no_flatten.tcl | 10 + .../tests/iob_no_flatten/iob_no_flatten.v | 43 +++ .../tests/iob_no_flatten/iob_no_flatten.ys | 6 + ql-qlf-k6n10-plugin/tests/latches/latches.tcl | 15 + ql-qlf-k6n10-plugin/tests/latches/latches.v | 9 + ql-qlf-k6n10-plugin/tests/logic/logic.tcl | 13 + ql-qlf-k6n10-plugin/tests/logic/logic.v | 24 ++ ql-qlf-k6n10-plugin/tests/logic/logic.ys | 9 + .../tests/ql_qlf_k6n10/run-test.sh | 20 ++ 26 files changed, 1407 insertions(+) create mode 100644 ql-qlf-k6n10-plugin/Makefile create mode 100644 ql-qlf-k6n10-plugin/cells_sim.v create mode 100644 ql-qlf-k6n10-plugin/qlf_k6n10_arith_map.v create mode 100644 ql-qlf-k6n10-plugin/qlf_k6n10_brams.txt create mode 100644 ql-qlf-k6n10-plugin/qlf_k6n10_brams_map.v create mode 100644 ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v create mode 100644 ql-qlf-k6n10-plugin/qlf_k6n10_ffs_map.v create mode 100644 ql-qlf-k6n10-plugin/qlf_k6n10_lut_map.v create mode 100644 ql-qlf-k6n10-plugin/synth_quicklogic.cc create mode 100644 ql-qlf-k6n10-plugin/tests/Makefile create mode 100644 ql-qlf-k6n10-plugin/tests/bram/bram.tcl create mode 100644 ql-qlf-k6n10-plugin/tests/bram/bram.v create mode 100644 ql-qlf-k6n10-plugin/tests/bram/bram.ys create mode 100644 ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl create mode 100644 ql-qlf-k6n10-plugin/tests/dffs/dffs.v create mode 100644 ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.tcl create mode 100644 ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.v create mode 100644 ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.tcl create mode 100644 ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.v create mode 100644 ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.ys create mode 100644 ql-qlf-k6n10-plugin/tests/latches/latches.tcl create mode 100644 ql-qlf-k6n10-plugin/tests/latches/latches.v create mode 100644 ql-qlf-k6n10-plugin/tests/logic/logic.tcl create mode 100644 ql-qlf-k6n10-plugin/tests/logic/logic.v create mode 100644 ql-qlf-k6n10-plugin/tests/logic/logic.ys create mode 100755 ql-qlf-k6n10-plugin/tests/ql_qlf_k6n10/run-test.sh diff --git a/ql-qlf-k6n10-plugin/Makefile b/ql-qlf-k6n10-plugin/Makefile new file mode 100644 index 000000000..cb725347c --- /dev/null +++ b/ql-qlf-k6n10-plugin/Makefile @@ -0,0 +1,9 @@ +NAME = ql-qlf-k6n10 +SOURCES = synth_quicklogic.cc +include ../Makefile_plugin.common + +VERILOG_MODULES = cells_sim.v qlf_k6n10_arith_map.v qlf_k6n10_brams_map.v qlf_k6n10_brams.txt qlf_k6n10_cells_sim.v qlf_k6n10_ffs_map.v qlf_k6n10_lut_map.v + +install_modules: $(VERILOG_MODULES) + $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);) +install: install_modules diff --git a/ql-qlf-k6n10-plugin/cells_sim.v b/ql-qlf-k6n10-plugin/cells_sim.v new file mode 100644 index 000000000..4c17762eb --- /dev/null +++ b/ql-qlf-k6n10-plugin/cells_sim.v @@ -0,0 +1,24 @@ + +module inv(output Q, input A); + assign Q = A ? 0 : 1; +endmodule + +module buff(output Q, input A); + assign Q = A; +endmodule + +module logic_0(output a); + assign a = 0; +endmodule + +module logic_1(output a); + assign a = 1; +endmodule + +(* blackbox *) +module gclkbuff (input A, output Z); + +assign Z = A; + +endmodule + diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_arith_map.v b/ql-qlf-k6n10-plugin/qlf_k6n10_arith_map.v new file mode 100644 index 000000000..b054ffef9 --- /dev/null +++ b/ql-qlf-k6n10-plugin/qlf_k6n10_arith_map.v @@ -0,0 +1,60 @@ +////////////////////////// +// arithmetic // +////////////////////////// + +(* techmap_celltype = "$alu" *) +module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); + + parameter A_SIGNED = 0; + parameter B_SIGNED = 0; + parameter A_WIDTH = 1; + parameter B_WIDTH = 1; + parameter Y_WIDTH = 1; + + input [A_WIDTH-1:0] A; + input [B_WIDTH-1:0] B; + output [Y_WIDTH:0] X, Y; + + input CI, BI; + output [Y_WIDTH:0] CO; + + wire [Y_WIDTH-1:0] AA, BB; + wire [1024:0] _TECHMAP_DO_ = "splitnets CARRY; clean"; + + generate + if (A_SIGNED && B_SIGNED) begin:BLOCK1 + assign AA = $signed(A), BB = BI ? ~$signed(B) : $signed(B); + end else begin:BLOCK2 + assign AA = $unsigned(A), BB = BI ? ~$unsigned(B) : $unsigned(B); + end + endgenerate + + wire [Y_WIDTH: 0 ] CARRY; + assign CARRY[0] = CI; + + genvar i; + generate for (i = 0; i < Y_WIDTH - 1; i = i+1) begin:gen3 + adder my_adder ( + .cin (CARRY[i]), + .cout (CARRY[i+1]), + .a (AA[i]), + .b (BB[i]), + .sumout (Y[i]) + ); + end endgenerate + + generate if ((Y_WIDTH -1) % 20 == 0) begin:gen4 + assign Y[Y_WIDTH-1] = CARRY[Y_WIDTH-1]; + end else begin:gen5 + adder my_adder ( + .cin (CARRY[Y_WIDTH - 1]), + .cout (CARRY[Y_WIDTH]), + .a (1'b0), + .b (1'b0), + .sumout (Y[Y_WIDTH -1]) + ); + end + endgenerate + assign X = AA ^ BB; +endmodule + diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_brams.txt b/ql-qlf-k6n10-plugin/qlf_k6n10_brams.txt new file mode 100644 index 000000000..93d78d59b --- /dev/null +++ b/ql-qlf-k6n10-plugin/qlf_k6n10_brams.txt @@ -0,0 +1,139 @@ +bram $__QLF_RAM16K_M0 + init 1 + abits 8 + dbits 32 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 1 + transp 0 0 + clocks 1 1 + clkpol 1 1 +endbram + +bram $__QLF_RAM16K_M1 + init 1 + abits 9 + dbits 32 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 1 + transp 0 0 + clocks 1 1 + clkpol 1 1 +endbram + +bram $__QLF_RAM16K_M2 + init 1 + abits 10 + dbits 32 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 1 + transp 0 0 + clocks 1 1 + clkpol 1 1 +endbram + +bram $__QLF_RAM16K_M3 + init 1 + abits 11 + dbits 32 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 1 + transp 0 0 + clocks 1 1 + clkpol 1 1 +endbram + + +# The syn_* attributes are described in: +# https://www.latticesemi.com/-/media/LatticeSemi/Documents/Tutorials/AK/LatticeDiamondTutorial311.ashx +attr_icase 1 + +match $__QLF_RAM16K_M0 + # implicitly requested RAM or ROM + attribute !syn_ramstyle syn_ramstyle=auto + attribute !syn_romstyle syn_romstyle=auto + attribute !ram_block + attribute !rom_block + attribute !logic_block + min dbits 17 + make_transp +endmatch + + +match $__QLF_RAM16K_M1 + # implicitly requested RAM or ROM + attribute !syn_ramstyle syn_ramstyle=auto + attribute !syn_romstyle syn_romstyle=auto + attribute !ram_block + attribute !rom_block + attribute !logic_block + min dbits 9 + make_transp + or_next_if_better +endmatch + +match $__QLF_RAM16K_M1 + # implicitly requested RAM or ROM + attribute !syn_ramstyle syn_ramstyle=auto + attribute !syn_romstyle syn_romstyle=auto + attribute !ram_block + attribute !rom_block + attribute !logic_block + min efficiency 2 + make_transp +endmatch + + +match $__QLF_RAM16K_M2 + # implicitly requested RAM or ROM + attribute !syn_ramstyle syn_ramstyle=auto + attribute !syn_romstyle syn_romstyle=auto + attribute !ram_block + attribute !rom_block + attribute !logic_block + min dbits 5 + make_transp + or_next_if_better +endmatch + +match $__QLF_RAM16K_M2 + # implicitly requested RAM or ROM + attribute !syn_ramstyle syn_ramstyle=auto + attribute !syn_romstyle syn_romstyle=auto + attribute !ram_block + attribute !rom_block + attribute !logic_block + min efficiency 2 + make_transp +endmatch + +match $__QLF_RAM16K_M3 + # implicitly requested RAM or ROM + attribute !syn_ramstyle syn_ramstyle=auto + attribute !syn_romstyle syn_romstyle=auto + attribute !ram_block + attribute !rom_block + attribute !logic_block + max dbits 4 + make_transp + or_next_if_better +endmatch + +match $__QLF_RAM16K_M3 + # implicitly requested RAM or ROM + attribute !syn_ramstyle syn_ramstyle=auto + attribute !syn_romstyle syn_romstyle=auto + attribute !ram_block + attribute !rom_block + attribute !logic_block + min efficiency 2 + make_transp +endmatch + diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_brams_map.v b/ql-qlf-k6n10-plugin/qlf_k6n10_brams_map.v new file mode 100644 index 000000000..3aaf67fda --- /dev/null +++ b/ql-qlf-k6n10-plugin/qlf_k6n10_brams_map.v @@ -0,0 +1,199 @@ + +module \$__QLF_RAM16K ( + output [31:0] RDATA, + input RCLK, RE, + input [8:0] RADDR, + input WCLK, WE, + input [8:0] WADDR, + input [31:0] WENB, + input [31:0] WDATA +); + + generate + DP_RAM16K #() + _TECHMAP_REPLACE_ ( + .d_out(RDATA), + .rclk (RCLK ), + .wclk (WCLK ), + .ren (RE ), + .raddr(RADDR), + .wen (WE ), + .waddr(WADDR), + .wenb (WENB ), + .d_in (WDATA) + ); + endgenerate + +endmodule + + +module \$__QLF_RAM16K_M0 (CLK1, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + + + parameter [4095:0] INIT = 4096'bx; + + input CLK1; + + input [8:0] A1ADDR; + output [31:0] A1DATA; + input A1EN; + + input [8:0] B1ADDR; + input [31:0] B1DATA; + input B1EN; + + wire [31:0] WENB; + assign WENB = 32'hFFFFFFFF; + + \$__QLF_RAM16K #() + _TECHMAP_REPLACE_ ( + .RDATA(A1DATA), + .RADDR(A1ADDR), + .RCLK(CLK1), + .RE(A1EN), + .WDATA(B1DATA), + .WADDR(B1ADDR), + .WCLK(CLK1), + .WE(B1EN), + .WENB(WENB) + ); +endmodule + + +module \$__QLF_RAM16K_M1 (CLK1, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + + + parameter [4095:0] INIT = 4096'bx; + + input CLK1; + + input [9:0] A1ADDR; + output [31:0] A1DATA; + input A1EN; + + input [9:0] B1ADDR; + input [31:0] B1DATA; + input B1EN; + + wire [31:0] WENB; + wire [31:0] WDATA; + + generate + wire A1BAR; + assign A1BAR = ~A1ADDR[0]; + assign WDATA = { {2{B1DATA[15:0]}}}; + endgenerate + + assign WENB = { {16{A1ADDR[0]}} , {16{A1BAR}}}; + + + \$__QLF_RAM16K #() + _TECHMAP_REPLACE_ ( + .RDATA(A1DATA), + .RADDR(A1ADDR), + .RCLK(CLK1), + .RE(A1EN), + .WDATA(WDATA), + .WADDR(B1ADDR[9:1]), + .WCLK(CLK1), + .WENB(WENB), + .WE(B1EN) + ); + +endmodule + +module \$__QLF_RAM16K_M2 (CLK1, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + + + parameter [4095:0] INIT = 4096'bx; + + input CLK1; + + input [10:0] A1ADDR; + output [31:0] A1DATA; + input A1EN; + + input [10:0] B1ADDR; + input [7:0] B1DATA; + input B1EN; + + wire [31:0] WENB; + wire [31:0] WDATA; + + generate + wire A1BAR0, A1BAR1; + assign A1BAR0 = ~A1ADDR[0]; + assign A1BAR1 = ~A1ADDR[1]; + assign WDATA = { {4{B1DATA[7:0]}}}; + endgenerate + + assign WENB = { {8{A1ADDR[1]& A1ADDR[0]}}, + {8{A1ADDR[1]& A1BAR0}} , + {8{A1BAR1 & A1ADDR[0]}}, + {8{A1BAR1 & A1BAR0}}} ; + + + \$__QLF_RAM16K #() + _TECHMAP_REPLACE_ ( + .RDATA(A1DATA), + .RADDR(A1ADDR), + .RCLK(CLK1), + .RE(A1EN), + .WDATA(B1DATA), + .WADDR(B1ADDR[10:2]), + .WCLK(CLK1), + .WENB(WENB), + .WE(B1EN) + ); + +endmodule + +module \$__QLF_RAM16K_M3 (CLK1, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + + parameter [4095:0] INIT = 4096'bx; + + input CLK1; + + input [11:0] A1ADDR; + output [31:0] A1DATA; + input A1EN; + + input [11:0] B1ADDR; + input [3:0] B1DATA; + input B1EN; + + wire [31:0] WENB; + wire [31:0] WDATA; + + generate + assign WDATA = { {8{B1DATA[3:0]}}}; + wire A1BAR0, A1BAR1, A1BAR2; + assign A1BAR0 = ~A1ADDR[0]; + assign A1BAR1 = ~A1ADDR[1]; + assign A1BAR2 = ~A1ADDR[2]; + endgenerate + + assign WENB = { {4{A1ADDR[2] &A1ADDR[1] & A1ADDR[0]}}, + {4{A1ADDR[2] &A1ADDR[1] & A1BAR0}} , + {4{A1ADDR[2] &A1BAR1 & A1ADDR[0]}}, + {4{A1ADDR[2] &A1BAR1 & A1BAR0}} , + {4{A1BAR2 &A1ADDR[1] & A1ADDR[0]}}, + {4{A1BAR2 &A1ADDR[1] & A1BAR0}} , + {4{A1BAR2 &A1BAR1 & A1ADDR[0]}}, + {4{A1BAR2 &A1BAR1 & A1BAR0}}} ; + + \$__QLF_RAM16K #() + _TECHMAP_REPLACE_ ( + .RDATA(A1DATA), + .RADDR(A1ADDR), + .RCLK(CLK1), + .RE(A1EN), + .WDATA(B1DATA), + .WADDR(B1ADDR[11:3]), + .WCLK(CLK1), + .WENB(WENB), + .WE(B1EN) + ); + +endmodule + diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v b/ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v new file mode 100644 index 000000000..c8d5ba235 --- /dev/null +++ b/ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v @@ -0,0 +1,196 @@ +(* abc9_box, lib_whitebox *) +module adder( + output sumout, + output cout, + input a, + input b, + input cin +); + assign sumout = a ^ b ^ cin; + assign cout = (a & b) | ((a | b) & cin); + +endmodule + + + +(* abc9_lut=1, lib_whitebox *) +module frac_lut6( + input [0:5] in, + output [0:3] lut4_out, + output [0:1] lut5_out, + output lut6_out +); + parameter [0:63] LUT = 0; + // Effective LUT input + wire [0:5] li = in; + + // Output function + wire [0:31] s1 = li[0] ? + {LUT[0], LUT[2], LUT[4], LUT[6], LUT[8], LUT[10], LUT[12], LUT[14], + LUT[16], LUT[18], LUT[20], LUT[22], LUT[24], LUT[26], LUT[28], LUT[30], + LUT[32], LUT[34], LUT[36], LUT[38], LUT[40], LUT[42], LUT[44], LUT[46], + LUT[48], LUT[50], LUT[52], LUT[54], LUT[56], LUT[58], LUT[60], LUT[62]}: + {LUT[1], LUT[3], LUT[5], LUT[7], LUT[9], LUT[11], LUT[13], LUT[15], + LUT[17], LUT[19], LUT[21], LUT[23], LUT[25], LUT[27], LUT[29], LUT[31], + LUT[33], LUT[35], LUT[37], LUT[39], LUT[41], LUT[43], LUT[45], LUT[47], + LUT[49], LUT[51], LUT[53], LUT[55], LUT[57], LUT[59], LUT[61], LUT[63]}; + + wire [0:15] s2 = li[1] ? + {s1[0], s1[2], s1[4], s1[6], s1[8], s1[10], s1[12], s1[14], + s1[16], s1[18], s1[20], s1[22], s1[24], s1[26], s1[28], s1[30]}: + {s1[1], s1[3], s1[5], s1[7], s1[9], s1[11], s1[13], s1[15], + s1[17], s1[19], s1[21], s1[23], s1[25], s1[27], s1[29], s1[31]}; + + wire [0:7] s3 = li[2] ? + {s2[0], s2[2], s2[4], s2[6], s2[8], s2[10], s2[12], s2[14]}: + {s2[1], s2[3], s2[5], s2[7], s2[9], s2[11], s2[13], s2[15]}; + + wire [0:3] s4 = li[3] ? {s3[0], s3[2], s3[4], s3[6]}: + {s3[1], s3[3], s3[5], s3[7]}; + + wire [0:1] s5 = li[4] ? {s4[0], s4[2]} : {s4[1], s4[3]}; + + assign lut4_out[0] = s4[0]; + assign lut4_out[1] = s4[1]; + assign lut4_out[2] = s4[2]; + assign lut4_out[3] = s4[3]; + + assign lut5_out[0] = s0[0]; + assign lut5_out[1] = s5[1]; + + assign lut6_out = li[5] ? s5[0] : s5[1]; + +endmodule + +(* abc9_flop, lib_whitebox *) +module dff( + output reg Q, + input D, + (* clkbuf_sink *) + input C +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge C) + Q <= D; +endmodule + + +(* abc9_flop, lib_whitebox *) +module scff( + output reg Q, + input D, + input clk +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge clk) + Q <= D; +endmodule + + +module DP_RAM16K ( + input rclk, + input wclk, + input wen, + input ren, + input[8:0] waddr, + input[8:0] raddr, + input[31:0] d_in, + input[31:0] wenb, + output[31:0] d_out ); + + _dual_port_sram memory_0 ( + .wclk (wclk), + .wen (wen), + .waddr (waddr), + .data_in (d_in), + .rclk (rclk), + .ren (ren), + .raddr (raddr), + .wenb (wenb), + .d_out (d_out) ); + +endmodule + +module _dual_port_sram ( + input wclk, + input wen, + input[8:0] waddr, + input[31:0] data_in, + input rclk, + input ren, + input[8:0] raddr, + input[31:0] wenb, + output[31:0] d_out ); + + // MODE 0: 512 x 32 + // MODE 1: 1024 x 16 + // MODE 2: 1024 x 8 + // MODE 3: 2048 x 4 + + integer i; + reg[31:0] ram[512:0]; + reg[31:0] internal; + // The memory is self initialised + + initial begin + for (i=0;i<=512;i=i+1) + begin + ram[i] = 0; + end + internal = 31'b0; + end + + + wire [31:0] WMASK; + + assign d_out = internal; + assign WMASK = wenb; + + always @(posedge wclk) begin + if(!wen) begin + if (WMASK[ 0]) ram[waddr][ 0] <= data_in[ 0]; + if (WMASK[ 1]) ram[waddr][ 1] <= data_in[ 1]; + if (WMASK[ 2]) ram[waddr][ 2] <= data_in[ 2]; + if (WMASK[ 3]) ram[waddr][ 3] <= data_in[ 3]; + if (WMASK[ 4]) ram[waddr][ 4] <= data_in[ 4]; + if (WMASK[ 5]) ram[waddr][ 5] <= data_in[ 5]; + if (WMASK[ 6]) ram[waddr][ 6] <= data_in[ 6]; + if (WMASK[ 7]) ram[waddr][ 7] <= data_in[ 7]; + if (WMASK[ 8]) ram[waddr][ 8] <= data_in[ 8]; + if (WMASK[ 9]) ram[waddr][ 9] <= data_in[ 9]; + if (WMASK[10]) ram[waddr][10] <= data_in[10]; + if (WMASK[11]) ram[waddr][11] <= data_in[11]; + if (WMASK[12]) ram[waddr][12] <= data_in[12]; + if (WMASK[13]) ram[waddr][13] <= data_in[13]; + if (WMASK[14]) ram[waddr][14] <= data_in[14]; + if (WMASK[15]) ram[waddr][15] <= data_in[15]; + if (WMASK[16]) ram[waddr][16] <= data_in[16]; + if (WMASK[17]) ram[waddr][17] <= data_in[17]; + if (WMASK[18]) ram[waddr][18] <= data_in[18]; + if (WMASK[19]) ram[waddr][19] <= data_in[19]; + if (WMASK[20]) ram[waddr][20] <= data_in[20]; + if (WMASK[21]) ram[waddr][21] <= data_in[21]; + if (WMASK[22]) ram[waddr][22] <= data_in[22]; + if (WMASK[23]) ram[waddr][23] <= data_in[23]; + if (WMASK[24]) ram[waddr][24] <= data_in[24]; + if (WMASK[25]) ram[waddr][25] <= data_in[25]; + if (WMASK[26]) ram[waddr][26] <= data_in[26]; + if (WMASK[27]) ram[waddr][27] <= data_in[27]; + if (WMASK[28]) ram[waddr][28] <= data_in[28]; + if (WMASK[29]) ram[waddr][29] <= data_in[29]; + if (WMASK[30]) ram[waddr][30] <= data_in[30]; + if (WMASK[31]) ram[waddr][31] <= data_in[31]; + end + end + + always @(posedge rclk) begin + if(!ren) begin + internal <= ram[raddr]; + end + end + +endmodule diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_ffs_map.v b/ql-qlf-k6n10-plugin/qlf_k6n10_ffs_map.v new file mode 100644 index 000000000..add046298 --- /dev/null +++ b/ql-qlf-k6n10-plugin/qlf_k6n10_ffs_map.v @@ -0,0 +1,6 @@ +module \$_DFF_P_ (D, Q, C); + input D; + input C; + output Q; + dff _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C)); +endmodule diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_lut_map.v b/ql-qlf-k6n10-plugin/qlf_k6n10_lut_map.v new file mode 100644 index 000000000..0a384d72f --- /dev/null +++ b/ql-qlf-k6n10-plugin/qlf_k6n10_lut_map.v @@ -0,0 +1,23 @@ +`ifndef NO_LUT +module \$lut (A, Y); + parameter WIDTH = 0; + parameter LUT = 0; + + (* force_downto *) + input [WIDTH-1:0] A; + output Y; + + generate + if (WIDTH == 6) begin + frac_lut6 #(.LUT(LUT)) _TECHMAP_REPLACE_ (.lut6_out(Y),.in(A)); + + end else begin + wire _TECHMAP_FAIL_ = 1; + end + endgenerate + +endmodule +`endif + + + diff --git a/ql-qlf-k6n10-plugin/synth_quicklogic.cc b/ql-qlf-k6n10-plugin/synth_quicklogic.cc new file mode 100644 index 000000000..0bacd9c79 --- /dev/null +++ b/ql-qlf-k6n10-plugin/synth_quicklogic.cc @@ -0,0 +1,280 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2021 Lalit Sharma + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +#include "kernel/register.h" +#include "kernel/celltypes.h" +#include "kernel/rtlil.h" +#include "kernel/log.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +struct SynthQuickLogicPass : public ScriptPass { + + SynthQuickLogicPass() : ScriptPass("synth_quicklogic", "Synthesis for QuickLogic FPGAs") {} + + void help() override + { + log("\n"); + log(" synth_quicklogic [options]\n"); + log("This command runs synthesis for QuickLogic FPGAs\n"); + log("\n"); + log(" -top \n"); + log(" use the specified module as top module\n"); + log("\n"); + log(" -family \n"); + log(" run synthesis for the specified QuickLogic architecture\n"); + log(" generate the synthesis netlist for the specified family.\n"); + log(" supported values:\n"); + log(" - qlf_k6n10: qlf_k6n10 \n"); + log("\n"); + log(" -no_abc_opt\n"); + log(" By default most of ABC logic optimization features is\n"); + log(" enabled. Specifying this switch turns them off.\n"); + log("\n"); + log(" -edif \n"); + log(" write the design to the specified edif file. writing of an output file\n"); + log(" is omitted if this parameter is not specified.\n"); + log("\n"); + log(" -blif \n"); + log(" write the design to the specified BLIF file. writing of an output file\n"); + log(" is omitted if this parameter is not specified.\n"); + log("\n"); + log(" -verilog \n"); + log(" write the design to the specified verilog file. writing of an output file\n"); + log(" is omitted if this parameter is not specified.\n"); + log("\n"); + log(" -no_adder\n"); + log(" By default use adder cells in output netlist.\n"); + log(" Specifying this switch turns it off.\n"); + log("\n"); + log(" -no_bram\n"); + log(" By default use Block RAM in output netlist.\n"); + log(" Specifying this switch turns it off.\n"); + log("\n"); + log("\n"); + log("The following commands are executed by this synthesis command:\n"); + help_script(); + log("\n"); + } + + string top_opt, edif_file, blif_file, family, currmodule, verilog_file; + bool inferAdder; + bool inferBram; + bool abcOpt; + + void clear_flags() override + { + top_opt = "-auto-top"; + edif_file = ""; + blif_file = ""; + verilog_file = ""; + currmodule = ""; + family = "qlf_k6n10"; + inferAdder = true; + inferBram = true; + abcOpt = true; + } + + void execute(std::vector args, RTLIL::Design *design) override + { + string run_from, run_to; + clear_flags(); + + size_t argidx; + for (argidx = 1; argidx < args.size(); argidx++) + { + if (args[argidx] == "-top" && argidx+1 < args.size()) { + top_opt = "-top " + args[++argidx]; + continue; + } + if (args[argidx] == "-edif" && argidx+1 < args.size()) { + edif_file = args[++argidx]; + continue; + } + + if (args[argidx] == "-family" && argidx+1 < args.size()) { + family = args[++argidx]; + continue; + } + if (args[argidx] == "-blif" && argidx+1 < args.size()) { + blif_file = args[++argidx]; + continue; + } + if (args[argidx] == "-verilog" && argidx+1 < args.size()) { + verilog_file = args[++argidx]; + continue; + } + if (args[argidx] == "-no_adder") { + inferAdder = false; + continue; + } + if (args[argidx] == "-no_bram") { + inferBram = false; + continue; + } + if (args[argidx] == "-no_abc_opt") { + abcOpt = false; + continue; + } + + break; + } + extra_args(args, argidx, design); + + if (!design->full_selection()) + log_cmd_error("This command only operates on fully selected designs!\n"); + + log_header(design, "Executing SYNTH_QUICKLOGIC pass.\n"); + log_push(); + + run_script(design, run_from, run_to); + + log_pop(); + } + + void script() override + { + if (check_label("begin")) { + std::string readVelArgs; + readVelArgs = " +/quicklogic/" + family + "_cells_sim.v"; + + run("read_verilog -lib -specify +/quicklogic/cells_sim.v" + readVelArgs); + run(stringf("hierarchy -check %s", help_mode ? "-top " : top_opt.c_str())); + } + + if (check_label("prepare")) { + run("proc"); + run("flatten"); + run("opt_expr"); + run("opt_clean"); + run("deminout"); + run("opt"); + } + + if (check_label("coarse")) { + run("opt_expr"); + run("opt_clean"); + run("check"); + run("opt"); + run("wreduce -keepdc"); + run("peepopt"); + run("pmuxtree"); + run("opt_clean"); + + run("alumacc"); + run("opt"); + run("fsm"); + run("opt -fast"); + run("memory -nomap"); + run("opt_clean"); + } + + if (check_label("map_bram", "(skip if -nobram)") && family == "qlf_k6n10" && inferBram) { + run("memory_bram -rules +/quicklogic/" + family + "_brams.txt"); + run("techmap -map +/quicklogic/" + family + "_brams_map.v"); + } + + if (check_label("map_ffram")) { + run("opt -fast -mux_undef -undriven -fine"); + run("memory_map -iattr -attr !ram_block -attr !rom_block -attr logic_block " + "-attr syn_ramstyle=auto -attr syn_ramstyle=registers " + "-attr syn_romstyle=auto -attr syn_romstyle=logic"); + run("opt -undriven -fine"); + } + + if (check_label("map_gates")) { + if (inferAdder) { + run("techmap -map +/techmap.v -map +/quicklogic/" + family + "_arith_map.v"); + } else { + run("techmap"); + } + run("opt -fast"); + run("opt_expr"); + run("opt_merge"); + run("opt_clean"); + run("opt"); + } + + if (check_label("map_ffs")) { + + std::string techMapArgs = " -map +/quicklogic/" + family + "_ffs_map.v"; + + if (family == "qlf_k6n10") { + run("dfflegalize -cell $_DFF_P_ 0 -cell $_DLATCH_P_ x"); + } + run("techmap " + techMapArgs); + run("opt_expr -mux_undef"); + run("simplemap"); + run("opt_expr"); + run("opt_merge"); + run("opt_clean"); + run("opt"); + } + + if (check_label("map_luts")) { + + run("abc -lut 6 "); + run("clean"); + run("opt_lut"); + } + + if (check_label("map_cells")){ + std::string techMapArgs; + techMapArgs = "-map +/quicklogic/" + family + "_lut_map.v"; + run("techmap " + techMapArgs); + run("clean"); + } + + if (check_label("check")) { + run("autoname"); + run("hierarchy -check"); + run("stat"); + run("check -noinit"); + } + + if (check_label("finalize")) { + run("check"); + run("opt_clean -purge"); + } + + if (check_label("edif")) { + if (!edif_file.empty()) + run(stringf("write_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); + } + + if (check_label("blif")) { + if (!blif_file.empty()) { + if (inferAdder) { + run(stringf("write_blif -param %s", help_mode ? "" : blif_file.c_str())); + } else { + run(stringf("write_blif %s", help_mode ? "" : blif_file.c_str())); + } + } + } + + if (check_label("verilog")) { + if (!verilog_file.empty()) { + run("write_verilog -noattr -nohex " + verilog_file); + } + } + } + +} SynthQuicklogicPass; + +PRIVATE_NAMESPACE_END diff --git a/ql-qlf-k6n10-plugin/tests/Makefile b/ql-qlf-k6n10-plugin/tests/Makefile new file mode 100644 index 000000000..4b83e663b --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/Makefile @@ -0,0 +1,17 @@ +# The latch test is disabled as latches are not supported in the qlf_k6n10. + +TESTS = dffs \ + iob_no_flatten \ + latches \ + hard_adder \ + bram \ + logic + +include $(shell pwd)/../../Makefile_test.common + +dffs_verify = true +iob_no_flatten_verify = true +latches_verify = true +hard_adder_verify = true +bram_verify = false +logic_verify = true diff --git a/ql-qlf-k6n10-plugin/tests/bram/bram.tcl b/ql-qlf-k6n10-plugin/tests/bram/bram.tcl new file mode 100644 index 000000000..314fa5869 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/bram/bram.tcl @@ -0,0 +1,27 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +hierarchy -top BRAM_32x512 +yosys proc +yosys memory +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_32x512 + +design -load read +synth_quicklogic -top BRAM_16x1024 +yosys cd BRAM_16x1024 +stat +select -assert-count 1 t:DP_RAM16K + +design -load read +synth_quicklogic -top BRAM_8x2048 +yosys cd BRAM_16x1024 +stat +select -assert-count 1 t:DP_RAM16K + +design -load read +synth_quicklogic -top BRAM_4x4096 +yosys cd BRAM_16x1024 +stat +select -assert-count 1 t:DP_RAM16K diff --git a/ql-qlf-k6n10-plugin/tests/bram/bram.v b/ql-qlf-k6n10-plugin/tests/bram/bram.v new file mode 100644 index 000000000..e99693a7d --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/bram/bram.v @@ -0,0 +1,171 @@ +module BRAM #(parameter AWIDTH = 9, +parameter DWIDTH = 32)( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); +//parameter AWIDTH = 9; +//parameter DWIDTH = 32; + + input clk; + + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + + reg [DWIDTH-1:0] memory[0:AWIDTH-1]; + + always @(posedge clk) begin + if (rce) + rq <= memory[ra]; + + if (wce) + memory[wa] <= wd; + end + + integer i; + initial + begin + for(i = 0; i < AWIDTH-1; i = i + 1) + memory[i] = 0; + end + +endmodule + +module BRAM_32x512( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + +parameter AWIDTH = 9; +parameter DWIDTH = 32; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + +BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_32x512 (.clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + +endmodule + +module BRAM_16x1024( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + +parameter AWIDTH = 10; +parameter DWIDTH = 16; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + +BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_16x1024 (.clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + + +endmodule + +module BRAM_8x2048( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + +parameter AWIDTH = 11; +parameter DWIDTH = 8; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + +BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_8x2048 (.clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + + +endmodule + +module BRAM_4x4096( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + +parameter AWIDTH = 12; +parameter DWIDTH = 4; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + +BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_4x4096 (.clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + +endmodule diff --git a/ql-qlf-k6n10-plugin/tests/bram/bram.ys b/ql-qlf-k6n10-plugin/tests/bram/bram.ys new file mode 100644 index 000000000..c2d3dce50 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/bram/bram.ys @@ -0,0 +1,46 @@ +read_verilog v/bram.v +design -save read + +#BRAM 32x512 + +hierarchy -top BRAM_32x512 +proc +memory +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_32x512 +design -load postopt +cd BRAM_32x512 +stat +select -assert-count 1 t:DP_RAM16K + +#BRAM 16x1024 + +hierarchy -top BRAM_32x512 +proc +memory +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_16x1024 +design -load postopt +cd BRAM_16x1024 +stat +select -assert-count 1 t:DP_RAM16K + +#BRAM 8x2048 + +hierarchy -top BRAM_8x2048 +proc +memory +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_8x2048 +design -load postopt +cd BRAM_8x2048 +stat +select -assert-count 1 t:DP_RAM16K + +#BRAM 4x4096 + +hierarchy -top BRAM_4x4096 +proc +memory +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_4x4096 +design -load postopt +cd BRAM_4x4096 +stat +select -assert-count 1 t:DP_RAM16K diff --git a/ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl b/ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl new file mode 100644 index 000000000..d2cba4f57 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl @@ -0,0 +1,15 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +# DFF +hierarchy -top my_dff +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top my_dff +design -load postopt +yosys cd my_dff +stat +select -assert-count 1 t:dff diff --git a/ql-qlf-k6n10-plugin/tests/dffs/dffs.v b/ql-qlf-k6n10-plugin/tests/dffs/dffs.v new file mode 100644 index 000000000..33a961760 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/dffs/dffs.v @@ -0,0 +1,6 @@ +module my_dff ( input d, clk, output reg q ); + initial q <= 1'b0; + always @( posedge clk ) + q <= d; +endmodule + diff --git a/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.tcl b/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.tcl new file mode 100644 index 000000000..e051b9495 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.tcl @@ -0,0 +1,18 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } +yosys -import ;# ingest plugin commands + +# Equivalence check for adder synthesis +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top hard_adder +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 + +design -reset + +#TODO: Fix equivalence +# Equivalence check for subtractor synthesis +#read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +#hierarchy -check -top subtractor +#yosys proc +#equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 diff --git a/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.v b/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.v new file mode 100644 index 000000000..6ba8245cb --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.v @@ -0,0 +1,22 @@ +module hard_adder ( + input wire [`WIDTH-1:0] A, + input wire [`WIDTH-1:0] B, + output wire [`WIDTH :0] S, +); + + // Implicit adder + assign S = A + B; + +endmodule + +module subtractor ( + input wire [`WIDTH-1:0] A, + input wire [`WIDTH-1:0] B, + output wire [`WIDTH :0] S, +); + + // Implicit subtractor + assign S = A - B; + +endmodule + diff --git a/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.tcl new file mode 100644 index 000000000..aecacda56 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.tcl @@ -0,0 +1,10 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v + +synth_quicklogic -top my_top +yosys stat +yosys cd my_top +select -assert-count 2 t:dff diff --git a/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.v b/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.v new file mode 100644 index 000000000..497c614fa --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.v @@ -0,0 +1,43 @@ +module my_dff ( + input d, + clk, + output reg q +); + initial q <= 1'b0; + always @(posedge clk) q <= d; +endmodule + +module my_top ( + inout wire pad, + input wire i, + input wire t, + output wire o, + input wire clk +); + + wire i_r; + wire t_r; + wire o_r; + + // IOB + assign pad = (t_r) ? i_r : 1'bz; + assign o_r = pad; + + // DFFs + my_dff dff_i ( + i, + clk, + i_r + ); + my_dff dff_t ( + t, + clk, + t_r + ); + my_dff dff_o ( + o_r, + clk, + o + ); + +endmodule diff --git a/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.ys b/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.ys new file mode 100644 index 000000000..b73ab6c4d --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.ys @@ -0,0 +1,6 @@ +read_verilog v/iob_no_flatten.v + +synth_quicklogic -top my_top +stat +cd my_top +select -assert-count 2 t:dff diff --git a/ql-qlf-k6n10-plugin/tests/latches/latches.tcl b/ql-qlf-k6n10-plugin/tests/latches/latches.tcl new file mode 100644 index 000000000..46c4b46a7 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/latches/latches.tcl @@ -0,0 +1,15 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v + +design -save read + +# LATCHP +synth_quicklogic -top latchp +yosys cd latchp +stat +select -assert-count 1 t:\$_DLATCH_P_ + + diff --git a/ql-qlf-k6n10-plugin/tests/latches/latches.v b/ql-qlf-k6n10-plugin/tests/latches/latches.v new file mode 100644 index 000000000..f336c73c7 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/latches/latches.v @@ -0,0 +1,9 @@ +module latchp ( + input d, + clk, + en, + output reg q +); + always @* if (en) q <= d; +endmodule + diff --git a/ql-qlf-k6n10-plugin/tests/logic/logic.tcl b/ql-qlf-k6n10-plugin/tests/logic/logic.tcl new file mode 100644 index 000000000..a8d64c090 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/logic/logic.tcl @@ -0,0 +1,13 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +hierarchy -top top +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic +design -load postopt +yosys cd top + +stat +select -assert-count 9 t:\$lut diff --git a/ql-qlf-k6n10-plugin/tests/logic/logic.v b/ql-qlf-k6n10-plugin/tests/logic/logic.v new file mode 100644 index 000000000..17464af84 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/logic/logic.v @@ -0,0 +1,24 @@ +module top ( + input [0:7] in, + output B1, + B2, + B3, + B4, + B5, + B6, + B7, + B8, + B9, + B10 +); + assign B1 = in[0] & in[1]; + assign B2 = in[0] | in[1]; + assign B3 = in[0]~&in[1]; + assign B4 = in[0]~|in[1]; + assign B5 = in[0] ^ in[1]; + assign B6 = in[0] ~^ in[1]; + assign B7 = ~in[0]; + assign B8 = in[0]; + assign B9 = in[0:1] && in[2:3]; + assign B10 = in[0:1] || in[2:3]; +endmodule diff --git a/ql-qlf-k6n10-plugin/tests/logic/logic.ys b/ql-qlf-k6n10-plugin/tests/logic/logic.ys new file mode 100644 index 000000000..e9c851821 --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/logic/logic.ys @@ -0,0 +1,9 @@ +read_verilog ../common/logic.v +hierarchy -top top +proc +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic +design -load postopt +cd top + +stat +select -assert-count 9 t:$lut diff --git a/ql-qlf-k6n10-plugin/tests/ql_qlf_k6n10/run-test.sh b/ql-qlf-k6n10-plugin/tests/ql_qlf_k6n10/run-test.sh new file mode 100755 index 000000000..bf19b887d --- /dev/null +++ b/ql-qlf-k6n10-plugin/tests/ql_qlf_k6n10/run-test.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -e +{ +echo "all::" +for x in *.ys; do + echo "all:: run-$x" + echo "run-$x:" + echo " @echo 'Running $x..'" + echo " @../../../yosys -ql ${x%.ys}.log -w 'Yosys has only limited support for tri-state logic at the moment.' $x" +done +for s in *.sh; do + if [ "$s" != "run-test.sh" ]; then + echo "all:: run-$s" + echo "run-$s:" + echo " @echo 'Running $s..'" + echo " @bash $s" + fi +done +} > run-test.mk +exec ${MAKE:-make} -f run-test.mk From 74dafe8b3a3d3ec91cc8b72651bbf1b41ea02de0 Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 24 Mar 2021 20:50:25 +0100 Subject: [PATCH 308/845] Merge qlf_k4n8 & qlf_k6n10 into one plugin Signed-off-by: samycharas --- Makefile | 2 +- ql-qlf-k4n8-plugin/Makefile | 10 - .../tests/iob_no_flatten/iob_no_flatten.tcl | 10 - .../tests/iob_no_flatten/iob_no_flatten.ys | 6 - ql-qlf-k4n8-plugin/tests/latches/latches.tcl | 19 -- ql-qlf-k4n8-plugin/tests/logic/logic.tcl | 13 - .../tests/ql_qlf_k4n8/run-test.sh | 20 -- .../tests/soft_adder/soft_adder.tcl | 17 -- ql-qlf-k6n10-plugin/Makefile | 9 - ql-qlf-k6n10-plugin/cells_sim.v | 24 -- ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v | 196 ------------ ql-qlf-k6n10-plugin/synth_quicklogic.cc | 280 ------------------ ql-qlf-k6n10-plugin/tests/Makefile | 17 -- ql-qlf-k6n10-plugin/tests/bram/bram.v | 171 ----------- ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl | 15 - ql-qlf-k6n10-plugin/tests/dffs/dffs.v | 6 - .../tests/hard_adder/hard_adder.tcl | 18 -- .../tests/hard_adder/hard_adder.v | 22 -- .../tests/iob_no_flatten/iob_no_flatten.tcl | 10 - .../tests/iob_no_flatten/iob_no_flatten.v | 43 --- .../tests/iob_no_flatten/iob_no_flatten.ys | 6 - ql-qlf-k6n10-plugin/tests/latches/latches.tcl | 15 - ql-qlf-k6n10-plugin/tests/latches/latches.v | 9 - ql-qlf-k6n10-plugin/tests/logic/logic.tcl | 13 - ql-qlf-k6n10-plugin/tests/logic/logic.v | 24 -- ql-qlf-k6n10-plugin/tests/logic/logic.ys | 9 - .../tests/ql_qlf_k6n10/run-test.sh | 20 -- ql-qlf-plugin/Makefile | 22 ++ .../common}/cells_sim.v | 0 .../ql-qlf-k4n8}/qlf_k4n8_arith_map.v | 0 .../ql-qlf-k4n8}/qlf_k4n8_cells_sim.v | 0 .../ql-qlf-k4n8}/qlf_k4n8_ffs_map.v | 0 .../ql-qlf-k6n10}/qlf_k6n10_arith_map.v | 0 .../ql-qlf-k6n10}/qlf_k6n10_brams.txt | 0 .../ql-qlf-k6n10}/qlf_k6n10_brams_map.v | 0 .../ql-qlf-k6n10/qlf_k6n10_cells_sim.v | 195 ++++++++++++ .../ql-qlf-k6n10}/qlf_k6n10_ffs_map.v | 0 .../ql-qlf-k6n10}/qlf_k6n10_lut_map.v | 4 +- .../synth_quicklogic.cc | 44 ++- .../tests/Makefile | 7 +- .../tests/bram/bram.tcl | 10 +- ql-qlf-plugin/tests/bram/bram.v | 168 +++++++++++ .../tests/bram/bram.ys | 12 +- .../tests/dffs/dffs.tcl | 36 ++- .../tests/dffs/dffs.v | 8 + ql-qlf-plugin/tests/full_adder/full_adder.tcl | 34 +++ .../tests/full_adder/full_adder.v | 2 +- .../tests/iob_no_flatten/iob_no_flatten.tcl | 19 ++ .../tests/iob_no_flatten/iob_no_flatten.v | 0 .../tests/iob_no_flatten/iob_no_flatten.ys | 7 + ql-qlf-plugin/tests/latches/latches.tcl | 28 ++ .../tests/latches/latches.v | 9 + ql-qlf-plugin/tests/logic/logic.tcl | 27 ++ .../tests/logic/logic.v | 0 .../tests/logic/logic.ys | 5 +- .../tests/shreg/shreg.tcl | 4 +- .../tests/shreg/shreg.v | 0 57 files changed, 604 insertions(+), 1041 deletions(-) delete mode 100644 ql-qlf-k4n8-plugin/Makefile delete mode 100644 ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl delete mode 100644 ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.ys delete mode 100644 ql-qlf-k4n8-plugin/tests/latches/latches.tcl delete mode 100644 ql-qlf-k4n8-plugin/tests/logic/logic.tcl delete mode 100755 ql-qlf-k4n8-plugin/tests/ql_qlf_k4n8/run-test.sh delete mode 100644 ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl delete mode 100644 ql-qlf-k6n10-plugin/Makefile delete mode 100644 ql-qlf-k6n10-plugin/cells_sim.v delete mode 100644 ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v delete mode 100644 ql-qlf-k6n10-plugin/synth_quicklogic.cc delete mode 100644 ql-qlf-k6n10-plugin/tests/Makefile delete mode 100644 ql-qlf-k6n10-plugin/tests/bram/bram.v delete mode 100644 ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl delete mode 100644 ql-qlf-k6n10-plugin/tests/dffs/dffs.v delete mode 100644 ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.tcl delete mode 100644 ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.v delete mode 100644 ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.tcl delete mode 100644 ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.v delete mode 100644 ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.ys delete mode 100644 ql-qlf-k6n10-plugin/tests/latches/latches.tcl delete mode 100644 ql-qlf-k6n10-plugin/tests/latches/latches.v delete mode 100644 ql-qlf-k6n10-plugin/tests/logic/logic.tcl delete mode 100644 ql-qlf-k6n10-plugin/tests/logic/logic.v delete mode 100644 ql-qlf-k6n10-plugin/tests/logic/logic.ys delete mode 100755 ql-qlf-k6n10-plugin/tests/ql_qlf_k6n10/run-test.sh create mode 100644 ql-qlf-plugin/Makefile rename {ql-qlf-k4n8-plugin => ql-qlf-plugin/common}/cells_sim.v (100%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin/ql-qlf-k4n8}/qlf_k4n8_arith_map.v (100%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin/ql-qlf-k4n8}/qlf_k4n8_cells_sim.v (100%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin/ql-qlf-k4n8}/qlf_k4n8_ffs_map.v (100%) rename {ql-qlf-k6n10-plugin => ql-qlf-plugin/ql-qlf-k6n10}/qlf_k6n10_arith_map.v (100%) rename {ql-qlf-k6n10-plugin => ql-qlf-plugin/ql-qlf-k6n10}/qlf_k6n10_brams.txt (100%) rename {ql-qlf-k6n10-plugin => ql-qlf-plugin/ql-qlf-k6n10}/qlf_k6n10_brams_map.v (100%) create mode 100644 ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v rename {ql-qlf-k6n10-plugin => ql-qlf-plugin/ql-qlf-k6n10}/qlf_k6n10_ffs_map.v (100%) rename {ql-qlf-k6n10-plugin => ql-qlf-plugin/ql-qlf-k6n10}/qlf_k6n10_lut_map.v (70%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/synth_quicklogic.cc (86%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/tests/Makefile (67%) rename {ql-qlf-k6n10-plugin => ql-qlf-plugin}/tests/bram/bram.tcl (62%) create mode 100644 ql-qlf-plugin/tests/bram/bram.v rename {ql-qlf-k6n10-plugin => ql-qlf-plugin}/tests/bram/bram.ys (77%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/tests/dffs/dffs.tcl (60%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/tests/dffs/dffs.v (93%) create mode 100644 ql-qlf-plugin/tests/full_adder/full_adder.tcl rename ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.v => ql-qlf-plugin/tests/full_adder/full_adder.v (94%) create mode 100644 ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/tests/iob_no_flatten/iob_no_flatten.v (100%) create mode 100644 ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.ys create mode 100644 ql-qlf-plugin/tests/latches/latches.tcl rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/tests/latches/latches.v (78%) create mode 100644 ql-qlf-plugin/tests/logic/logic.tcl rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/tests/logic/logic.v (100%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/tests/logic/logic.ys (69%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/tests/shreg/shreg.tcl (54%) rename {ql-qlf-k4n8-plugin => ql-qlf-plugin}/tests/shreg/shreg.v (100%) diff --git a/Makefile b/Makefile index c9f31beb2..180acdb02 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf-k4n8 +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/ql-qlf-k4n8-plugin/Makefile b/ql-qlf-k4n8-plugin/Makefile deleted file mode 100644 index 5f1dd8354..000000000 --- a/ql-qlf-k4n8-plugin/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -NAME = ql-qlf-k4n8 -SOURCES = synth_quicklogic.cc -include ../Makefile_plugin.common - -VERILOG_MODULES = cells_sim.v qlf_k4n8_arith_map.v qlf_k4n8_cells_sim.v qlf_k4n8_ffs_map.v - -install_modules: $(VERILOG_MODULES) - $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);) - -install: install_modules diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl deleted file mode 100644 index f367b82a7..000000000 --- a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.tcl +++ /dev/null @@ -1,10 +0,0 @@ -yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } -yosys -import ;# ingest plugin commands - -read_verilog $::env(DESIGN_TOP).v - -synth_quicklogic -top my_top -yosys stat -yosys cd my_top -select -assert-count 2 t:dff diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.ys b/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.ys deleted file mode 100644 index 4530a8d72..000000000 --- a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.ys +++ /dev/null @@ -1,6 +0,0 @@ -read_verilog v/iob_no_flatten.v - -synth_quicklogic -top my_top -stat -cd my_top -select -assert-count 2 t:$_DFF_P_ diff --git a/ql-qlf-k4n8-plugin/tests/latches/latches.tcl b/ql-qlf-k4n8-plugin/tests/latches/latches.tcl deleted file mode 100644 index f586568a4..000000000 --- a/ql-qlf-k4n8-plugin/tests/latches/latches.tcl +++ /dev/null @@ -1,19 +0,0 @@ -yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } -yosys -import ;# ingest plugin commands - -read_verilog $::env(DESIGN_TOP).v -design -save read - -# LATCHP -synth_quicklogic -top latchp -yosys cd latchp -stat -select -assert-count 1 t:\$_DLATCH_P_ - -# LATCHN -design -load read -synth_quicklogic -top latchn -yosys cd latchn -stat -select -assert-count 1 t:\$_DLATCH_N_ diff --git a/ql-qlf-k4n8-plugin/tests/logic/logic.tcl b/ql-qlf-k4n8-plugin/tests/logic/logic.tcl deleted file mode 100644 index 80500ff29..000000000 --- a/ql-qlf-k4n8-plugin/tests/logic/logic.tcl +++ /dev/null @@ -1,13 +0,0 @@ -yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } -yosys -import ;# ingest plugin commands - -read_verilog $::env(DESIGN_TOP).v -hierarchy -top top -yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -design -load postopt -yosys cd top - -stat -select -assert-count 9 t:\$lut diff --git a/ql-qlf-k4n8-plugin/tests/ql_qlf_k4n8/run-test.sh b/ql-qlf-k4n8-plugin/tests/ql_qlf_k4n8/run-test.sh deleted file mode 100755 index bf19b887d..000000000 --- a/ql-qlf-k4n8-plugin/tests/ql_qlf_k4n8/run-test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -set -e -{ -echo "all::" -for x in *.ys; do - echo "all:: run-$x" - echo "run-$x:" - echo " @echo 'Running $x..'" - echo " @../../../yosys -ql ${x%.ys}.log -w 'Yosys has only limited support for tri-state logic at the moment.' $x" -done -for s in *.sh; do - if [ "$s" != "run-test.sh" ]; then - echo "all:: run-$s" - echo "run-$s:" - echo " @echo 'Running $s..'" - echo " @bash $s" - fi -done -} > run-test.mk -exec ${MAKE:-make} -f run-test.mk diff --git a/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl b/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl deleted file mode 100644 index 92f91b57c..000000000 --- a/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.tcl +++ /dev/null @@ -1,17 +0,0 @@ -yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } -yosys -import ;# ingest plugin commands - -# Equivalence check for adder synthesis -read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v -hierarchy -check -top adder -yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 - -design -reset - -# Equivalence check for subtractor synthesis -read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v -hierarchy -check -top subtractor -yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 diff --git a/ql-qlf-k6n10-plugin/Makefile b/ql-qlf-k6n10-plugin/Makefile deleted file mode 100644 index cb725347c..000000000 --- a/ql-qlf-k6n10-plugin/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -NAME = ql-qlf-k6n10 -SOURCES = synth_quicklogic.cc -include ../Makefile_plugin.common - -VERILOG_MODULES = cells_sim.v qlf_k6n10_arith_map.v qlf_k6n10_brams_map.v qlf_k6n10_brams.txt qlf_k6n10_cells_sim.v qlf_k6n10_ffs_map.v qlf_k6n10_lut_map.v - -install_modules: $(VERILOG_MODULES) - $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);) -install: install_modules diff --git a/ql-qlf-k6n10-plugin/cells_sim.v b/ql-qlf-k6n10-plugin/cells_sim.v deleted file mode 100644 index 4c17762eb..000000000 --- a/ql-qlf-k6n10-plugin/cells_sim.v +++ /dev/null @@ -1,24 +0,0 @@ - -module inv(output Q, input A); - assign Q = A ? 0 : 1; -endmodule - -module buff(output Q, input A); - assign Q = A; -endmodule - -module logic_0(output a); - assign a = 0; -endmodule - -module logic_1(output a); - assign a = 1; -endmodule - -(* blackbox *) -module gclkbuff (input A, output Z); - -assign Z = A; - -endmodule - diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v b/ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v deleted file mode 100644 index c8d5ba235..000000000 --- a/ql-qlf-k6n10-plugin/qlf_k6n10_cells_sim.v +++ /dev/null @@ -1,196 +0,0 @@ -(* abc9_box, lib_whitebox *) -module adder( - output sumout, - output cout, - input a, - input b, - input cin -); - assign sumout = a ^ b ^ cin; - assign cout = (a & b) | ((a | b) & cin); - -endmodule - - - -(* abc9_lut=1, lib_whitebox *) -module frac_lut6( - input [0:5] in, - output [0:3] lut4_out, - output [0:1] lut5_out, - output lut6_out -); - parameter [0:63] LUT = 0; - // Effective LUT input - wire [0:5] li = in; - - // Output function - wire [0:31] s1 = li[0] ? - {LUT[0], LUT[2], LUT[4], LUT[6], LUT[8], LUT[10], LUT[12], LUT[14], - LUT[16], LUT[18], LUT[20], LUT[22], LUT[24], LUT[26], LUT[28], LUT[30], - LUT[32], LUT[34], LUT[36], LUT[38], LUT[40], LUT[42], LUT[44], LUT[46], - LUT[48], LUT[50], LUT[52], LUT[54], LUT[56], LUT[58], LUT[60], LUT[62]}: - {LUT[1], LUT[3], LUT[5], LUT[7], LUT[9], LUT[11], LUT[13], LUT[15], - LUT[17], LUT[19], LUT[21], LUT[23], LUT[25], LUT[27], LUT[29], LUT[31], - LUT[33], LUT[35], LUT[37], LUT[39], LUT[41], LUT[43], LUT[45], LUT[47], - LUT[49], LUT[51], LUT[53], LUT[55], LUT[57], LUT[59], LUT[61], LUT[63]}; - - wire [0:15] s2 = li[1] ? - {s1[0], s1[2], s1[4], s1[6], s1[8], s1[10], s1[12], s1[14], - s1[16], s1[18], s1[20], s1[22], s1[24], s1[26], s1[28], s1[30]}: - {s1[1], s1[3], s1[5], s1[7], s1[9], s1[11], s1[13], s1[15], - s1[17], s1[19], s1[21], s1[23], s1[25], s1[27], s1[29], s1[31]}; - - wire [0:7] s3 = li[2] ? - {s2[0], s2[2], s2[4], s2[6], s2[8], s2[10], s2[12], s2[14]}: - {s2[1], s2[3], s2[5], s2[7], s2[9], s2[11], s2[13], s2[15]}; - - wire [0:3] s4 = li[3] ? {s3[0], s3[2], s3[4], s3[6]}: - {s3[1], s3[3], s3[5], s3[7]}; - - wire [0:1] s5 = li[4] ? {s4[0], s4[2]} : {s4[1], s4[3]}; - - assign lut4_out[0] = s4[0]; - assign lut4_out[1] = s4[1]; - assign lut4_out[2] = s4[2]; - assign lut4_out[3] = s4[3]; - - assign lut5_out[0] = s0[0]; - assign lut5_out[1] = s5[1]; - - assign lut6_out = li[5] ? s5[0] : s5[1]; - -endmodule - -(* abc9_flop, lib_whitebox *) -module dff( - output reg Q, - input D, - (* clkbuf_sink *) - input C -); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; - - always @(posedge C) - Q <= D; -endmodule - - -(* abc9_flop, lib_whitebox *) -module scff( - output reg Q, - input D, - input clk -); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; - - always @(posedge clk) - Q <= D; -endmodule - - -module DP_RAM16K ( - input rclk, - input wclk, - input wen, - input ren, - input[8:0] waddr, - input[8:0] raddr, - input[31:0] d_in, - input[31:0] wenb, - output[31:0] d_out ); - - _dual_port_sram memory_0 ( - .wclk (wclk), - .wen (wen), - .waddr (waddr), - .data_in (d_in), - .rclk (rclk), - .ren (ren), - .raddr (raddr), - .wenb (wenb), - .d_out (d_out) ); - -endmodule - -module _dual_port_sram ( - input wclk, - input wen, - input[8:0] waddr, - input[31:0] data_in, - input rclk, - input ren, - input[8:0] raddr, - input[31:0] wenb, - output[31:0] d_out ); - - // MODE 0: 512 x 32 - // MODE 1: 1024 x 16 - // MODE 2: 1024 x 8 - // MODE 3: 2048 x 4 - - integer i; - reg[31:0] ram[512:0]; - reg[31:0] internal; - // The memory is self initialised - - initial begin - for (i=0;i<=512;i=i+1) - begin - ram[i] = 0; - end - internal = 31'b0; - end - - - wire [31:0] WMASK; - - assign d_out = internal; - assign WMASK = wenb; - - always @(posedge wclk) begin - if(!wen) begin - if (WMASK[ 0]) ram[waddr][ 0] <= data_in[ 0]; - if (WMASK[ 1]) ram[waddr][ 1] <= data_in[ 1]; - if (WMASK[ 2]) ram[waddr][ 2] <= data_in[ 2]; - if (WMASK[ 3]) ram[waddr][ 3] <= data_in[ 3]; - if (WMASK[ 4]) ram[waddr][ 4] <= data_in[ 4]; - if (WMASK[ 5]) ram[waddr][ 5] <= data_in[ 5]; - if (WMASK[ 6]) ram[waddr][ 6] <= data_in[ 6]; - if (WMASK[ 7]) ram[waddr][ 7] <= data_in[ 7]; - if (WMASK[ 8]) ram[waddr][ 8] <= data_in[ 8]; - if (WMASK[ 9]) ram[waddr][ 9] <= data_in[ 9]; - if (WMASK[10]) ram[waddr][10] <= data_in[10]; - if (WMASK[11]) ram[waddr][11] <= data_in[11]; - if (WMASK[12]) ram[waddr][12] <= data_in[12]; - if (WMASK[13]) ram[waddr][13] <= data_in[13]; - if (WMASK[14]) ram[waddr][14] <= data_in[14]; - if (WMASK[15]) ram[waddr][15] <= data_in[15]; - if (WMASK[16]) ram[waddr][16] <= data_in[16]; - if (WMASK[17]) ram[waddr][17] <= data_in[17]; - if (WMASK[18]) ram[waddr][18] <= data_in[18]; - if (WMASK[19]) ram[waddr][19] <= data_in[19]; - if (WMASK[20]) ram[waddr][20] <= data_in[20]; - if (WMASK[21]) ram[waddr][21] <= data_in[21]; - if (WMASK[22]) ram[waddr][22] <= data_in[22]; - if (WMASK[23]) ram[waddr][23] <= data_in[23]; - if (WMASK[24]) ram[waddr][24] <= data_in[24]; - if (WMASK[25]) ram[waddr][25] <= data_in[25]; - if (WMASK[26]) ram[waddr][26] <= data_in[26]; - if (WMASK[27]) ram[waddr][27] <= data_in[27]; - if (WMASK[28]) ram[waddr][28] <= data_in[28]; - if (WMASK[29]) ram[waddr][29] <= data_in[29]; - if (WMASK[30]) ram[waddr][30] <= data_in[30]; - if (WMASK[31]) ram[waddr][31] <= data_in[31]; - end - end - - always @(posedge rclk) begin - if(!ren) begin - internal <= ram[raddr]; - end - end - -endmodule diff --git a/ql-qlf-k6n10-plugin/synth_quicklogic.cc b/ql-qlf-k6n10-plugin/synth_quicklogic.cc deleted file mode 100644 index 0bacd9c79..000000000 --- a/ql-qlf-k6n10-plugin/synth_quicklogic.cc +++ /dev/null @@ -1,280 +0,0 @@ -/* - * yosys -- Yosys Open SYnthesis Suite - * - * Copyright (C) 2021 Lalit Sharma - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ -#include "kernel/register.h" -#include "kernel/celltypes.h" -#include "kernel/rtlil.h" -#include "kernel/log.h" - -USING_YOSYS_NAMESPACE -PRIVATE_NAMESPACE_BEGIN - -struct SynthQuickLogicPass : public ScriptPass { - - SynthQuickLogicPass() : ScriptPass("synth_quicklogic", "Synthesis for QuickLogic FPGAs") {} - - void help() override - { - log("\n"); - log(" synth_quicklogic [options]\n"); - log("This command runs synthesis for QuickLogic FPGAs\n"); - log("\n"); - log(" -top \n"); - log(" use the specified module as top module\n"); - log("\n"); - log(" -family \n"); - log(" run synthesis for the specified QuickLogic architecture\n"); - log(" generate the synthesis netlist for the specified family.\n"); - log(" supported values:\n"); - log(" - qlf_k6n10: qlf_k6n10 \n"); - log("\n"); - log(" -no_abc_opt\n"); - log(" By default most of ABC logic optimization features is\n"); - log(" enabled. Specifying this switch turns them off.\n"); - log("\n"); - log(" -edif \n"); - log(" write the design to the specified edif file. writing of an output file\n"); - log(" is omitted if this parameter is not specified.\n"); - log("\n"); - log(" -blif \n"); - log(" write the design to the specified BLIF file. writing of an output file\n"); - log(" is omitted if this parameter is not specified.\n"); - log("\n"); - log(" -verilog \n"); - log(" write the design to the specified verilog file. writing of an output file\n"); - log(" is omitted if this parameter is not specified.\n"); - log("\n"); - log(" -no_adder\n"); - log(" By default use adder cells in output netlist.\n"); - log(" Specifying this switch turns it off.\n"); - log("\n"); - log(" -no_bram\n"); - log(" By default use Block RAM in output netlist.\n"); - log(" Specifying this switch turns it off.\n"); - log("\n"); - log("\n"); - log("The following commands are executed by this synthesis command:\n"); - help_script(); - log("\n"); - } - - string top_opt, edif_file, blif_file, family, currmodule, verilog_file; - bool inferAdder; - bool inferBram; - bool abcOpt; - - void clear_flags() override - { - top_opt = "-auto-top"; - edif_file = ""; - blif_file = ""; - verilog_file = ""; - currmodule = ""; - family = "qlf_k6n10"; - inferAdder = true; - inferBram = true; - abcOpt = true; - } - - void execute(std::vector args, RTLIL::Design *design) override - { - string run_from, run_to; - clear_flags(); - - size_t argidx; - for (argidx = 1; argidx < args.size(); argidx++) - { - if (args[argidx] == "-top" && argidx+1 < args.size()) { - top_opt = "-top " + args[++argidx]; - continue; - } - if (args[argidx] == "-edif" && argidx+1 < args.size()) { - edif_file = args[++argidx]; - continue; - } - - if (args[argidx] == "-family" && argidx+1 < args.size()) { - family = args[++argidx]; - continue; - } - if (args[argidx] == "-blif" && argidx+1 < args.size()) { - blif_file = args[++argidx]; - continue; - } - if (args[argidx] == "-verilog" && argidx+1 < args.size()) { - verilog_file = args[++argidx]; - continue; - } - if (args[argidx] == "-no_adder") { - inferAdder = false; - continue; - } - if (args[argidx] == "-no_bram") { - inferBram = false; - continue; - } - if (args[argidx] == "-no_abc_opt") { - abcOpt = false; - continue; - } - - break; - } - extra_args(args, argidx, design); - - if (!design->full_selection()) - log_cmd_error("This command only operates on fully selected designs!\n"); - - log_header(design, "Executing SYNTH_QUICKLOGIC pass.\n"); - log_push(); - - run_script(design, run_from, run_to); - - log_pop(); - } - - void script() override - { - if (check_label("begin")) { - std::string readVelArgs; - readVelArgs = " +/quicklogic/" + family + "_cells_sim.v"; - - run("read_verilog -lib -specify +/quicklogic/cells_sim.v" + readVelArgs); - run(stringf("hierarchy -check %s", help_mode ? "-top " : top_opt.c_str())); - } - - if (check_label("prepare")) { - run("proc"); - run("flatten"); - run("opt_expr"); - run("opt_clean"); - run("deminout"); - run("opt"); - } - - if (check_label("coarse")) { - run("opt_expr"); - run("opt_clean"); - run("check"); - run("opt"); - run("wreduce -keepdc"); - run("peepopt"); - run("pmuxtree"); - run("opt_clean"); - - run("alumacc"); - run("opt"); - run("fsm"); - run("opt -fast"); - run("memory -nomap"); - run("opt_clean"); - } - - if (check_label("map_bram", "(skip if -nobram)") && family == "qlf_k6n10" && inferBram) { - run("memory_bram -rules +/quicklogic/" + family + "_brams.txt"); - run("techmap -map +/quicklogic/" + family + "_brams_map.v"); - } - - if (check_label("map_ffram")) { - run("opt -fast -mux_undef -undriven -fine"); - run("memory_map -iattr -attr !ram_block -attr !rom_block -attr logic_block " - "-attr syn_ramstyle=auto -attr syn_ramstyle=registers " - "-attr syn_romstyle=auto -attr syn_romstyle=logic"); - run("opt -undriven -fine"); - } - - if (check_label("map_gates")) { - if (inferAdder) { - run("techmap -map +/techmap.v -map +/quicklogic/" + family + "_arith_map.v"); - } else { - run("techmap"); - } - run("opt -fast"); - run("opt_expr"); - run("opt_merge"); - run("opt_clean"); - run("opt"); - } - - if (check_label("map_ffs")) { - - std::string techMapArgs = " -map +/quicklogic/" + family + "_ffs_map.v"; - - if (family == "qlf_k6n10") { - run("dfflegalize -cell $_DFF_P_ 0 -cell $_DLATCH_P_ x"); - } - run("techmap " + techMapArgs); - run("opt_expr -mux_undef"); - run("simplemap"); - run("opt_expr"); - run("opt_merge"); - run("opt_clean"); - run("opt"); - } - - if (check_label("map_luts")) { - - run("abc -lut 6 "); - run("clean"); - run("opt_lut"); - } - - if (check_label("map_cells")){ - std::string techMapArgs; - techMapArgs = "-map +/quicklogic/" + family + "_lut_map.v"; - run("techmap " + techMapArgs); - run("clean"); - } - - if (check_label("check")) { - run("autoname"); - run("hierarchy -check"); - run("stat"); - run("check -noinit"); - } - - if (check_label("finalize")) { - run("check"); - run("opt_clean -purge"); - } - - if (check_label("edif")) { - if (!edif_file.empty()) - run(stringf("write_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); - } - - if (check_label("blif")) { - if (!blif_file.empty()) { - if (inferAdder) { - run(stringf("write_blif -param %s", help_mode ? "" : blif_file.c_str())); - } else { - run(stringf("write_blif %s", help_mode ? "" : blif_file.c_str())); - } - } - } - - if (check_label("verilog")) { - if (!verilog_file.empty()) { - run("write_verilog -noattr -nohex " + verilog_file); - } - } - } - -} SynthQuicklogicPass; - -PRIVATE_NAMESPACE_END diff --git a/ql-qlf-k6n10-plugin/tests/Makefile b/ql-qlf-k6n10-plugin/tests/Makefile deleted file mode 100644 index 4b83e663b..000000000 --- a/ql-qlf-k6n10-plugin/tests/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# The latch test is disabled as latches are not supported in the qlf_k6n10. - -TESTS = dffs \ - iob_no_flatten \ - latches \ - hard_adder \ - bram \ - logic - -include $(shell pwd)/../../Makefile_test.common - -dffs_verify = true -iob_no_flatten_verify = true -latches_verify = true -hard_adder_verify = true -bram_verify = false -logic_verify = true diff --git a/ql-qlf-k6n10-plugin/tests/bram/bram.v b/ql-qlf-k6n10-plugin/tests/bram/bram.v deleted file mode 100644 index e99693a7d..000000000 --- a/ql-qlf-k6n10-plugin/tests/bram/bram.v +++ /dev/null @@ -1,171 +0,0 @@ -module BRAM #(parameter AWIDTH = 9, -parameter DWIDTH = 32)( - clk, - rce, - ra, - rq, - wce, - wa, - wd -); -//parameter AWIDTH = 9; -//parameter DWIDTH = 32; - - input clk; - - input rce; - input [AWIDTH-1:0] ra; - output reg [DWIDTH-1:0] rq; - - input wce; - input [AWIDTH-1:0] wa; - input [DWIDTH-1:0] wd; - - reg [DWIDTH-1:0] memory[0:AWIDTH-1]; - - always @(posedge clk) begin - if (rce) - rq <= memory[ra]; - - if (wce) - memory[wa] <= wd; - end - - integer i; - initial - begin - for(i = 0; i < AWIDTH-1; i = i + 1) - memory[i] = 0; - end - -endmodule - -module BRAM_32x512( - clk, - rce, - ra, - rq, - wce, - wa, - wd -); - -parameter AWIDTH = 9; -parameter DWIDTH = 32; - - input clk; - input rce; - input [AWIDTH-1:0] ra; - output reg [DWIDTH-1:0] rq; - input wce; - input [AWIDTH-1:0] wa; - input [DWIDTH-1:0] wd; - -BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_32x512 (.clk(clk), - .rce(rce), - .ra(ra), - .rq(rq), - .wce(wce), - .wa(wa), - .wd(wd)); - -endmodule - -module BRAM_16x1024( - clk, - rce, - ra, - rq, - wce, - wa, - wd -); - -parameter AWIDTH = 10; -parameter DWIDTH = 16; - - input clk; - input rce; - input [AWIDTH-1:0] ra; - output reg [DWIDTH-1:0] rq; - input wce; - input [AWIDTH-1:0] wa; - input [DWIDTH-1:0] wd; - -BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_16x1024 (.clk(clk), - .rce(rce), - .ra(ra), - .rq(rq), - .wce(wce), - .wa(wa), - .wd(wd)); - - -endmodule - -module BRAM_8x2048( - clk, - rce, - ra, - rq, - wce, - wa, - wd -); - -parameter AWIDTH = 11; -parameter DWIDTH = 8; - - input clk; - input rce; - input [AWIDTH-1:0] ra; - output reg [DWIDTH-1:0] rq; - input wce; - input [AWIDTH-1:0] wa; - input [DWIDTH-1:0] wd; - -BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_8x2048 (.clk(clk), - .rce(rce), - .ra(ra), - .rq(rq), - .wce(wce), - .wa(wa), - .wd(wd)); - - -endmodule - -module BRAM_4x4096( - clk, - rce, - ra, - rq, - wce, - wa, - wd -); - -parameter AWIDTH = 12; -parameter DWIDTH = 4; - - input clk; - input rce; - input [AWIDTH-1:0] ra; - output reg [DWIDTH-1:0] rq; - input wce; - input [AWIDTH-1:0] wa; - input [DWIDTH-1:0] wd; - -BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_4x4096 (.clk(clk), - .rce(rce), - .ra(ra), - .rq(rq), - .wce(wce), - .wa(wa), - .wd(wd)); - -endmodule diff --git a/ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl b/ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl deleted file mode 100644 index d2cba4f57..000000000 --- a/ql-qlf-k6n10-plugin/tests/dffs/dffs.tcl +++ /dev/null @@ -1,15 +0,0 @@ -yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } -yosys -import ;# ingest plugin commands - -read_verilog $::env(DESIGN_TOP).v -design -save read - -# DFF -hierarchy -top my_dff -yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top my_dff -design -load postopt -yosys cd my_dff -stat -select -assert-count 1 t:dff diff --git a/ql-qlf-k6n10-plugin/tests/dffs/dffs.v b/ql-qlf-k6n10-plugin/tests/dffs/dffs.v deleted file mode 100644 index 33a961760..000000000 --- a/ql-qlf-k6n10-plugin/tests/dffs/dffs.v +++ /dev/null @@ -1,6 +0,0 @@ -module my_dff ( input d, clk, output reg q ); - initial q <= 1'b0; - always @( posedge clk ) - q <= d; -endmodule - diff --git a/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.tcl b/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.tcl deleted file mode 100644 index e051b9495..000000000 --- a/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.tcl +++ /dev/null @@ -1,18 +0,0 @@ -yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } -yosys -import ;# ingest plugin commands - -# Equivalence check for adder synthesis -read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v -hierarchy -check -top hard_adder -yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 - -design -reset - -#TODO: Fix equivalence -# Equivalence check for subtractor synthesis -#read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v -#hierarchy -check -top subtractor -#yosys proc -#equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 diff --git a/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.v b/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.v deleted file mode 100644 index 6ba8245cb..000000000 --- a/ql-qlf-k6n10-plugin/tests/hard_adder/hard_adder.v +++ /dev/null @@ -1,22 +0,0 @@ -module hard_adder ( - input wire [`WIDTH-1:0] A, - input wire [`WIDTH-1:0] B, - output wire [`WIDTH :0] S, -); - - // Implicit adder - assign S = A + B; - -endmodule - -module subtractor ( - input wire [`WIDTH-1:0] A, - input wire [`WIDTH-1:0] B, - output wire [`WIDTH :0] S, -); - - // Implicit subtractor - assign S = A - B; - -endmodule - diff --git a/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.tcl deleted file mode 100644 index aecacda56..000000000 --- a/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.tcl +++ /dev/null @@ -1,10 +0,0 @@ -yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } -yosys -import ;# ingest plugin commands - -read_verilog $::env(DESIGN_TOP).v - -synth_quicklogic -top my_top -yosys stat -yosys cd my_top -select -assert-count 2 t:dff diff --git a/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.v b/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.v deleted file mode 100644 index 497c614fa..000000000 --- a/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.v +++ /dev/null @@ -1,43 +0,0 @@ -module my_dff ( - input d, - clk, - output reg q -); - initial q <= 1'b0; - always @(posedge clk) q <= d; -endmodule - -module my_top ( - inout wire pad, - input wire i, - input wire t, - output wire o, - input wire clk -); - - wire i_r; - wire t_r; - wire o_r; - - // IOB - assign pad = (t_r) ? i_r : 1'bz; - assign o_r = pad; - - // DFFs - my_dff dff_i ( - i, - clk, - i_r - ); - my_dff dff_t ( - t, - clk, - t_r - ); - my_dff dff_o ( - o_r, - clk, - o - ); - -endmodule diff --git a/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.ys b/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.ys deleted file mode 100644 index b73ab6c4d..000000000 --- a/ql-qlf-k6n10-plugin/tests/iob_no_flatten/iob_no_flatten.ys +++ /dev/null @@ -1,6 +0,0 @@ -read_verilog v/iob_no_flatten.v - -synth_quicklogic -top my_top -stat -cd my_top -select -assert-count 2 t:dff diff --git a/ql-qlf-k6n10-plugin/tests/latches/latches.tcl b/ql-qlf-k6n10-plugin/tests/latches/latches.tcl deleted file mode 100644 index 46c4b46a7..000000000 --- a/ql-qlf-k6n10-plugin/tests/latches/latches.tcl +++ /dev/null @@ -1,15 +0,0 @@ -yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } -yosys -import ;# ingest plugin commands - -read_verilog $::env(DESIGN_TOP).v - -design -save read - -# LATCHP -synth_quicklogic -top latchp -yosys cd latchp -stat -select -assert-count 1 t:\$_DLATCH_P_ - - diff --git a/ql-qlf-k6n10-plugin/tests/latches/latches.v b/ql-qlf-k6n10-plugin/tests/latches/latches.v deleted file mode 100644 index f336c73c7..000000000 --- a/ql-qlf-k6n10-plugin/tests/latches/latches.v +++ /dev/null @@ -1,9 +0,0 @@ -module latchp ( - input d, - clk, - en, - output reg q -); - always @* if (en) q <= d; -endmodule - diff --git a/ql-qlf-k6n10-plugin/tests/logic/logic.tcl b/ql-qlf-k6n10-plugin/tests/logic/logic.tcl deleted file mode 100644 index a8d64c090..000000000 --- a/ql-qlf-k6n10-plugin/tests/logic/logic.tcl +++ /dev/null @@ -1,13 +0,0 @@ -yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } -yosys -import ;# ingest plugin commands - -read_verilog $::env(DESIGN_TOP).v -hierarchy -top top -yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -design -load postopt -yosys cd top - -stat -select -assert-count 9 t:\$lut diff --git a/ql-qlf-k6n10-plugin/tests/logic/logic.v b/ql-qlf-k6n10-plugin/tests/logic/logic.v deleted file mode 100644 index 17464af84..000000000 --- a/ql-qlf-k6n10-plugin/tests/logic/logic.v +++ /dev/null @@ -1,24 +0,0 @@ -module top ( - input [0:7] in, - output B1, - B2, - B3, - B4, - B5, - B6, - B7, - B8, - B9, - B10 -); - assign B1 = in[0] & in[1]; - assign B2 = in[0] | in[1]; - assign B3 = in[0]~&in[1]; - assign B4 = in[0]~|in[1]; - assign B5 = in[0] ^ in[1]; - assign B6 = in[0] ~^ in[1]; - assign B7 = ~in[0]; - assign B8 = in[0]; - assign B9 = in[0:1] && in[2:3]; - assign B10 = in[0:1] || in[2:3]; -endmodule diff --git a/ql-qlf-k6n10-plugin/tests/logic/logic.ys b/ql-qlf-k6n10-plugin/tests/logic/logic.ys deleted file mode 100644 index e9c851821..000000000 --- a/ql-qlf-k6n10-plugin/tests/logic/logic.ys +++ /dev/null @@ -1,9 +0,0 @@ -read_verilog ../common/logic.v -hierarchy -top top -proc -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -design -load postopt -cd top - -stat -select -assert-count 9 t:$lut diff --git a/ql-qlf-k6n10-plugin/tests/ql_qlf_k6n10/run-test.sh b/ql-qlf-k6n10-plugin/tests/ql_qlf_k6n10/run-test.sh deleted file mode 100755 index bf19b887d..000000000 --- a/ql-qlf-k6n10-plugin/tests/ql_qlf_k6n10/run-test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -set -e -{ -echo "all::" -for x in *.ys; do - echo "all:: run-$x" - echo "run-$x:" - echo " @echo 'Running $x..'" - echo " @../../../yosys -ql ${x%.ys}.log -w 'Yosys has only limited support for tri-state logic at the moment.' $x" -done -for s in *.sh; do - if [ "$s" != "run-test.sh" ]; then - echo "all:: run-$s" - echo "run-$s:" - echo " @echo 'Running $s..'" - echo " @bash $s" - fi -done -} > run-test.mk -exec ${MAKE:-make} -f run-test.mk diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile new file mode 100644 index 000000000..402606a4f --- /dev/null +++ b/ql-qlf-plugin/Makefile @@ -0,0 +1,22 @@ +NAME = ql-qlf +SOURCES = synth_quicklogic.cc +include ../Makefile_plugin.common + +COMMON = common +QLF_K4N8_DIR = ql-qlf-k4n8 +QLF_K6N10_DIR = ql-qlf-k6n10 +VERILOG_MODULES = $(COMMON)/cells_sim.v \ + $(QLF_K4N8_DIR)/qlf_k4n8_arith_map.v \ + $(QLF_K4N8_DIR)/qlf_k4n8_cells_sim.v \ + $(QLF_K4N8_DIR)/qlf_k4n8_ffs_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_arith_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_brams_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_brams.txt \ + $(QLF_K6N10_DIR)/qlf_k6n10_cells_sim.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_ffs_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v + +install_modules: $(VERILOG_MODULES) + $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(notdir $(f));) + +install: install_modules diff --git a/ql-qlf-k4n8-plugin/cells_sim.v b/ql-qlf-plugin/common/cells_sim.v similarity index 100% rename from ql-qlf-k4n8-plugin/cells_sim.v rename to ql-qlf-plugin/common/cells_sim.v diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_arith_map.v similarity index 100% rename from ql-qlf-k4n8-plugin/qlf_k4n8_arith_map.v rename to ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_arith_map.v diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v similarity index 100% rename from ql-qlf-k4n8-plugin/qlf_k4n8_cells_sim.v rename to ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v diff --git a/ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v similarity index 100% rename from ql-qlf-k4n8-plugin/qlf_k4n8_ffs_map.v rename to ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_arith_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v similarity index 100% rename from ql-qlf-k6n10-plugin/qlf_k6n10_arith_map.v rename to ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_brams.txt b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams.txt similarity index 100% rename from ql-qlf-k6n10-plugin/qlf_k6n10_brams.txt rename to ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams.txt diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_brams_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v similarity index 100% rename from ql-qlf-k6n10-plugin/qlf_k6n10_brams_map.v rename to ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v new file mode 100644 index 000000000..23c5129c4 --- /dev/null +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v @@ -0,0 +1,195 @@ +(* abc9_box, lib_whitebox *) +module adder( + output sumout, + output cout, + input a, + input b, + input cin +); + assign sumout = a ^ b ^ cin; + assign cout = (a & b) | ((a | b) & cin); + +endmodule + + + +(* abc9_lut=1, lib_whitebox *) +module frac_lut6( + input [0:5] in, + output [0:3] lut4_out, + output [0:1] lut5_out, + output lut6_out +); + parameter [0:63] LUT = 0; + // Effective LUT input + wire [0:5] li = in; + + // Output function + wire [0:31] s1 = li[0] ? + {LUT[0] , LUT[2] , LUT[4] , LUT[6] , LUT[8] , LUT[10], LUT[12], LUT[14], + LUT[16], LUT[18], LUT[20], LUT[22], LUT[24], LUT[26], LUT[28], LUT[30], + LUT[32], LUT[34], LUT[36], LUT[38], LUT[40], LUT[42], LUT[44], LUT[46], + LUT[48], LUT[50], LUT[52], LUT[54], LUT[56], LUT[58], LUT[60], LUT[62]}: + {LUT[1] , LUT[3] , LUT[5] , LUT[7] , LUT[9] , LUT[11], LUT[13], LUT[15], + LUT[17], LUT[19], LUT[21], LUT[23], LUT[25], LUT[27], LUT[29], LUT[31], + LUT[33], LUT[35], LUT[37], LUT[39], LUT[41], LUT[43], LUT[45], LUT[47], + LUT[49], LUT[51], LUT[53], LUT[55], LUT[57], LUT[59], LUT[61], LUT[63]}; + + wire [0:15] s2 = li[1] ? + {s1[0] , s1[2] , s1[4] , s1[6] , s1[8] , s1[10], s1[12], s1[14], + s1[16], s1[18], s1[20], s1[22], s1[24], s1[26], s1[28], s1[30]}: + {s1[1] , s1[3] , s1[5] , s1[7] , s1[9] , s1[11], s1[13], s1[15], + s1[17], s1[19], s1[21], s1[23], s1[25], s1[27], s1[29], s1[31]}; + + wire [0:7] s3 = li[2] ? + {s2[0], s2[2], s2[4], s2[6], s2[8], s2[10], s2[12], s2[14]}: + {s2[1], s2[3], s2[5], s2[7], s2[9], s2[11], s2[13], s2[15]}; + + wire [0:3] s4 = li[3] ? {s3[0], s3[2], s3[4], s3[6]}: + {s3[1], s3[3], s3[5], s3[7]}; + + wire [0:1] s5 = li[4] ? {s4[0], s4[2]} : {s4[1], s4[3]}; + + assign lut4_out[0] = s4[0]; + assign lut4_out[1] = s4[1]; + assign lut4_out[2] = s4[2]; + assign lut4_out[3] = s4[3]; + + assign lut5_out[0] = s0[0]; + assign lut5_out[1] = s5[1]; + + assign lut6_out = li[5] ? s5[0] : s5[1]; + +endmodule + +(* abc9_flop, lib_whitebox *) +module dff( + output reg Q, + input D, + (* clkbuf_sink *) + input C +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge C) + Q <= D; +endmodule + +(* abc9_flop, lib_whitebox *) +module scff( + output reg Q, + input D, + input clk +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge clk) + Q <= D; +endmodule + + +module DP_RAM16K ( + input rclk, + input wclk, + input wen, + input ren, + input[8:0] waddr, + input[8:0] raddr, + input[31:0] d_in, + input[31:0] wenb, + output[31:0] d_out ); + + _dual_port_sram memory_0 ( + .wclk (wclk), + .wen (wen), + .waddr (waddr), + .data_in (d_in), + .rclk (rclk), + .ren (ren), + .raddr (raddr), + .wenb (wenb), + .d_out (d_out) ); + +endmodule + +module _dual_port_sram ( + input wclk, + input wen, + input[8:0] waddr, + input[31:0] data_in, + input rclk, + input ren, + input[8:0] raddr, + input[31:0] wenb, + output[31:0] d_out ); + + // MODE 0: 512 x 32 + // MODE 1: 1024 x 16 + // MODE 2: 1024 x 8 + // MODE 3: 2048 x 4 + + integer i; + reg[31:0] ram[512:0]; + reg[31:0] internal; + // The memory is self initialised + + initial begin + for (i=0;i<=512;i=i+1) + begin + ram[i] = 0; + end + internal = 31'b0; + end + + + wire [31:0] WMASK; + + assign d_out = internal; + assign WMASK = wenb; + + always @(posedge wclk) begin + if(!wen) begin + if (WMASK[ 0]) ram[waddr][ 0] <= data_in[ 0]; + if (WMASK[ 1]) ram[waddr][ 1] <= data_in[ 1]; + if (WMASK[ 2]) ram[waddr][ 2] <= data_in[ 2]; + if (WMASK[ 3]) ram[waddr][ 3] <= data_in[ 3]; + if (WMASK[ 4]) ram[waddr][ 4] <= data_in[ 4]; + if (WMASK[ 5]) ram[waddr][ 5] <= data_in[ 5]; + if (WMASK[ 6]) ram[waddr][ 6] <= data_in[ 6]; + if (WMASK[ 7]) ram[waddr][ 7] <= data_in[ 7]; + if (WMASK[ 8]) ram[waddr][ 8] <= data_in[ 8]; + if (WMASK[ 9]) ram[waddr][ 9] <= data_in[ 9]; + if (WMASK[10]) ram[waddr][10] <= data_in[10]; + if (WMASK[11]) ram[waddr][11] <= data_in[11]; + if (WMASK[12]) ram[waddr][12] <= data_in[12]; + if (WMASK[13]) ram[waddr][13] <= data_in[13]; + if (WMASK[14]) ram[waddr][14] <= data_in[14]; + if (WMASK[15]) ram[waddr][15] <= data_in[15]; + if (WMASK[16]) ram[waddr][16] <= data_in[16]; + if (WMASK[17]) ram[waddr][17] <= data_in[17]; + if (WMASK[18]) ram[waddr][18] <= data_in[18]; + if (WMASK[19]) ram[waddr][19] <= data_in[19]; + if (WMASK[20]) ram[waddr][20] <= data_in[20]; + if (WMASK[21]) ram[waddr][21] <= data_in[21]; + if (WMASK[22]) ram[waddr][22] <= data_in[22]; + if (WMASK[23]) ram[waddr][23] <= data_in[23]; + if (WMASK[24]) ram[waddr][24] <= data_in[24]; + if (WMASK[25]) ram[waddr][25] <= data_in[25]; + if (WMASK[26]) ram[waddr][26] <= data_in[26]; + if (WMASK[27]) ram[waddr][27] <= data_in[27]; + if (WMASK[28]) ram[waddr][28] <= data_in[28]; + if (WMASK[29]) ram[waddr][29] <= data_in[29]; + if (WMASK[30]) ram[waddr][30] <= data_in[30]; + if (WMASK[31]) ram[waddr][31] <= data_in[31]; + end + end + + always @(posedge rclk) begin + if(!ren) begin + internal <= ram[raddr]; + end + end + +endmodule diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_ffs_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v similarity index 100% rename from ql-qlf-k6n10-plugin/qlf_k6n10_ffs_map.v rename to ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v diff --git a/ql-qlf-k6n10-plugin/qlf_k6n10_lut_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_lut_map.v similarity index 70% rename from ql-qlf-k6n10-plugin/qlf_k6n10_lut_map.v rename to ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_lut_map.v index 0a384d72f..f03788d49 100644 --- a/ql-qlf-k6n10-plugin/qlf_k6n10_lut_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_lut_map.v @@ -9,10 +9,10 @@ module \$lut (A, Y); generate if (WIDTH == 6) begin - frac_lut6 #(.LUT(LUT)) _TECHMAP_REPLACE_ (.lut6_out(Y),.in(A)); + frac_lut6 #(.LUT(LUT)) _TECHMAP_REPLACE_ (.lut6_out(Y),.in(A)); end else begin - wire _TECHMAP_FAIL_ = 1; + wire _TECHMAP_FAIL_ = 1; end endgenerate diff --git a/ql-qlf-k4n8-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc similarity index 86% rename from ql-qlf-k4n8-plugin/synth_quicklogic.cc rename to ql-qlf-plugin/synth_quicklogic.cc index 31690b7d9..f4cab5960 100644 --- a/ql-qlf-k4n8-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -63,6 +63,10 @@ struct SynthQuickLogicPass : public ScriptPass { log(" By default use adder cells in output netlist.\n"); log(" Specifying this switch turns it off.\n"); log("\n"); + log(" -no_bram\n"); + log(" By default use Block RAM in output netlist.\n"); + log(" Specifying this switch turns it off.\n"); + log("\n"); log(" -no_ff_map\n"); log(" By default ff techmap is turned on. Specifying this switch turns it off.\n"); log("\n"); @@ -74,6 +78,7 @@ struct SynthQuickLogicPass : public ScriptPass { string top_opt, edif_file, blif_file, family, currmodule, verilog_file; bool inferAdder; + bool inferBram; bool abcOpt; bool noffmap; @@ -86,6 +91,7 @@ struct SynthQuickLogicPass : public ScriptPass { currmodule = ""; family = "qlf_k4n8"; inferAdder = true; + inferBram = true; abcOpt = true; noffmap = false; } @@ -122,6 +128,10 @@ struct SynthQuickLogicPass : public ScriptPass { inferAdder = false; continue; } + if (args[argidx] == "-no_bram") { + inferBram = false; + continue; + } if (args[argidx] == "-no_abc_opt") { abcOpt = false; continue; @@ -183,6 +193,11 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_clean"); } + if (check_label("map_bram", "(skip if -no_bram)") && family == "qlf_k6n10" && inferBram) { + run("memory_bram -rules +/quicklogic/" + family + "_brams.txt"); + run("techmap -map +/quicklogic/" + family + "_brams_map.v"); + } + if (check_label("map_ffram")) { run("opt -fast -mux_undef -undriven -fine"); run("memory_map -iattr -attr !ram_block -attr !rom_block -attr logic_block " @@ -205,28 +220,43 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_ffs")) { + std::string techMapArgs = " -map +/quicklogic/" + family + "_ffs_map.v"; if (family == "qlf_k4n8") { run("shregmap -minlen 8 -maxlen 8"); } + if (!noffmap) { + run("techmap " + techMapArgs); + } run("opt_expr -mux_undef"); + run("simplemap"); + run("opt_expr"); run("opt_merge"); run("opt_clean"); run("opt"); - run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0"); - - std::string techMapArgs = " -map +/techmap.v"; - if (!noffmap) { - techMapArgs += " -map +/quicklogic/" + family + "_ffs_map.v"; + if (family == "qlf_k6n10") { + run("dfflegalize -cell $_DFF_P_ 0"); + } else { + run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0"); } - run("techmap " + techMapArgs); } if (check_label("map_luts")) { - run("abc -lut 4 "); + if (family == "qlf_k6n10") { + run("abc -lut 6 "); + } else { + run("abc -lut 4 "); + } run("clean"); run("opt_lut"); } + if (check_label("map_cells") && family == "qlf_k6n10") { + std::string techMapArgs; + techMapArgs = "-map +/quicklogic/" + family + "_lut_map.v"; + run("techmap " + techMapArgs); + run("clean"); + } + if (check_label("check")) { run("autoname"); run("hierarchy -check"); diff --git a/ql-qlf-k4n8-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile similarity index 67% rename from ql-qlf-k4n8-plugin/tests/Makefile rename to ql-qlf-plugin/tests/Makefile index dc2ebad86..5c554d670 100644 --- a/ql-qlf-k4n8-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -1,9 +1,10 @@ -# The latch test is disabled as latches are not supported in the qlf_k4n8. +# The latch test is disabled as latches are not supported in the qlf_k4n8/qlf_k6n10. +# The bram test will be enable in a future PR after it's been fixed. TESTS = dffs \ shreg \ iob_no_flatten \ - soft_adder \ + full_adder \ logic include $(shell pwd)/../../Makefile_test.common @@ -12,5 +13,5 @@ dffs_verify = true shreg_verify = true iob_no_flatten_verify = true latches_verify = true -soft_adder_verify = true +full_adder_verify = true logic_verify = true diff --git a/ql-qlf-k6n10-plugin/tests/bram/bram.tcl b/ql-qlf-plugin/tests/bram/bram.tcl similarity index 62% rename from ql-qlf-k6n10-plugin/tests/bram/bram.tcl rename to ql-qlf-plugin/tests/bram/bram.tcl index 314fa5869..989b2d57b 100644 --- a/ql-qlf-k6n10-plugin/tests/bram/bram.tcl +++ b/ql-qlf-plugin/tests/bram/bram.tcl @@ -1,27 +1,27 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k6n10 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v hierarchy -top BRAM_32x512 yosys proc yosys memory -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_32x512 +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_32x512 design -load read -synth_quicklogic -top BRAM_16x1024 +synth_quicklogic -family qlf_k6n10 -top BRAM_16x1024 yosys cd BRAM_16x1024 stat select -assert-count 1 t:DP_RAM16K design -load read -synth_quicklogic -top BRAM_8x2048 +synth_quicklogic -family qlf_k6n10 -top BRAM_8x2048 yosys cd BRAM_16x1024 stat select -assert-count 1 t:DP_RAM16K design -load read -synth_quicklogic -top BRAM_4x4096 +synth_quicklogic -family qlf_k6n10 -top BRAM_4x4096 yosys cd BRAM_16x1024 stat select -assert-count 1 t:DP_RAM16K diff --git a/ql-qlf-plugin/tests/bram/bram.v b/ql-qlf-plugin/tests/bram/bram.v new file mode 100644 index 000000000..3c251b716 --- /dev/null +++ b/ql-qlf-plugin/tests/bram/bram.v @@ -0,0 +1,168 @@ +module BRAM #(parameter AWIDTH = 9, + parameter DWIDTH = 32) + (clk, + rce, + ra, + rq, + wce, + wa, + wd); + + input clk; + + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + + reg [DWIDTH-1:0] memory[0:AWIDTH-1]; + + always @(posedge clk) begin + if (rce) + rq <= memory[ra]; + + if (wce) + memory[wa] <= wd; + end + + integer i; + initial + begin + for(i = 0; i < AWIDTH-1; i = i + 1) + memory[i] = 0; + end + +endmodule + +module BRAM_32x512( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + + parameter AWIDTH = 9; + parameter DWIDTH = 32; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + + BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_32x512 ( .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + +endmodule + +module BRAM_16x1024( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + + parameter AWIDTH = 10; + parameter DWIDTH = 16; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + + BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_16x1024 ( .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + + +endmodule + +module BRAM_8x2048( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + + parameter AWIDTH = 11; + parameter DWIDTH = 8; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + + BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_8x2048 ( .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + + +endmodule + +module BRAM_4x4096( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + + parameter AWIDTH = 12; + parameter DWIDTH = 4; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + + BRAM #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_4x4096 ( .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + +endmodule diff --git a/ql-qlf-k6n10-plugin/tests/bram/bram.ys b/ql-qlf-plugin/tests/bram/bram.ys similarity index 77% rename from ql-qlf-k6n10-plugin/tests/bram/bram.ys rename to ql-qlf-plugin/tests/bram/bram.ys index c2d3dce50..55390040a 100644 --- a/ql-qlf-k6n10-plugin/tests/bram/bram.ys +++ b/ql-qlf-plugin/tests/bram/bram.ys @@ -1,4 +1,6 @@ -read_verilog v/bram.v +plugin -i ql-qlf + +read_verilog ./bram.v design -save read #BRAM 32x512 @@ -6,7 +8,7 @@ design -save read hierarchy -top BRAM_32x512 proc memory -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_32x512 +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_32x512 design -load postopt cd BRAM_32x512 stat @@ -17,7 +19,7 @@ select -assert-count 1 t:DP_RAM16K hierarchy -top BRAM_32x512 proc memory -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_16x1024 +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_16x1024 design -load postopt cd BRAM_16x1024 stat @@ -28,7 +30,7 @@ select -assert-count 1 t:DP_RAM16K hierarchy -top BRAM_8x2048 proc memory -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_8x2048 +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_8x2048 design -load postopt cd BRAM_8x2048 stat @@ -39,7 +41,7 @@ select -assert-count 1 t:DP_RAM16K hierarchy -top BRAM_4x4096 proc memory -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -top BRAM_4x4096 +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_4x4096 design -load postopt cd BRAM_4x4096 stat diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl similarity index 60% rename from ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl rename to ql-qlf-plugin/tests/dffs/dffs.tcl index 6682a101f..05c7ec1f0 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v @@ -8,7 +8,7 @@ design -save read # DFF hierarchy -top my_dff yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -top my_dff +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 -top my_dff design -load postopt yosys cd my_dff stat @@ -16,7 +16,7 @@ select -assert-count 1 t:dff # DFFR (posedge RST) design -load read -synth_quicklogic -top my_dffr_p +synth_quicklogic -family qlf_k4n8 -top my_dffr_p yosys cd my_dffr_p stat select -assert-count 1 t:dffr @@ -24,14 +24,14 @@ select -assert-count 1 t:\$lut # DFFR (negedge RST) design -load read -synth_quicklogic -top my_dffr_n +synth_quicklogic -family qlf_k4n8 -top my_dffr_n yosys cd my_dffr_n stat select -assert-count 1 t:dffr # DFFS (posedge SET) design -load read -synth_quicklogic -top my_dffs_p +synth_quicklogic -family qlf_k4n8 -top my_dffs_p yosys cd my_dffs_p stat select -assert-count 1 t:dffs @@ -39,21 +39,22 @@ select -assert-count 1 t:\$lut # DFFS (negedge SET) design -load read -synth_quicklogic -top my_dffs_n +synth_quicklogic -family qlf_k4n8 -top my_dffs_n yosys cd my_dffs_n stat select -assert-count 1 t:dffs # DFFN design -load read -synth_quicklogic -top my_dffn +synth_quicklogic -family qlf_k4n8 -top my_dffn yosys cd my_dffn stat select -assert-count 1 t:dffn + # DFFNR (negedge CLK posedge RST) design -load read -synth_quicklogic -top my_dffnr_p +synth_quicklogic -family qlf_k4n8 -top my_dffnr_p yosys cd my_dffnr_p stat select -assert-count 1 t:dffnr @@ -61,14 +62,14 @@ select -assert-count 1 t:\$lut # DFFNR (negedge CLK negedge RST) design -load read -synth_quicklogic -top my_dffnr_n +synth_quicklogic -family qlf_k4n8 -top my_dffnr_n yosys cd my_dffnr_n stat select -assert-count 1 t:dffnr # DFFNS (negedge CLK posedge SET) design -load read -synth_quicklogic -top my_dffns_p +synth_quicklogic -family qlf_k4n8 -top my_dffns_p yosys cd my_dffns_p stat select -assert-count 1 t:dffns @@ -76,7 +77,20 @@ select -assert-count 1 t:\$lut # DFFS (negedge CLK negedge SET) design -load read -synth_quicklogic -top my_dffns_n +synth_quicklogic -family qlf_k4n8 -top my_dffns_n yosys cd my_dffns_n stat select -assert-count 1 t:dffns + +design -reset + +# DFF on qlf_k6n10 device +read_verilog $::env(DESIGN_TOP).v +# DFF +hierarchy -top my_dff +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k6n10 -top my_dff +design -load postopt +yosys cd my_dff +stat +select -assert-count 1 t:dff diff --git a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v similarity index 93% rename from ql-qlf-k4n8-plugin/tests/dffs/dffs.v rename to ql-qlf-plugin/tests/dffs/dffs.v index 7a4d5f9a0..5636bfe23 100644 --- a/ql-qlf-k4n8-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -6,6 +6,14 @@ module my_dff ( always @(posedge clk) q <= d; endmodule +module my_dff_noinit ( + input d, + clk, + output reg q +); + always @(posedge clk) q <= d; +endmodule + module my_dffr_p ( input d, clk, diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl new file mode 100644 index 000000000..fbcd3ca9c --- /dev/null +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -0,0 +1,34 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +yosys -import ;# ingest plugin commands + +# Equivalence check for adder synthesis for qlf-k4n8 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top full_adder +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 + +design -reset + +# Equivalence check for subtractor synthesis +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top subtractor +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 + +design -reset +# Equivalence check for adder synthesis for qlf-k6n10 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top full_adder +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 + +design -reset + +#TODO: Fix equivalence check for substractor design with qlf_k6n10 device + +## Equivalence check for subtractor synthesis +#read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +#hierarchy -check -top subtractor +#yosys proc +#equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 diff --git a/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.v b/ql-qlf-plugin/tests/full_adder/full_adder.v similarity index 94% rename from ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.v rename to ql-qlf-plugin/tests/full_adder/full_adder.v index 124341de4..4c542cff1 100644 --- a/ql-qlf-k4n8-plugin/tests/soft_adder/soft_adder.v +++ b/ql-qlf-plugin/tests/full_adder/full_adder.v @@ -1,4 +1,4 @@ -module adder ( +module full_adder ( input wire [`WIDTH-1:0] A, input wire [`WIDTH-1:0] B, output wire [`WIDTH :0] S, diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl new file mode 100644 index 000000000..9ab802aac --- /dev/null +++ b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl @@ -0,0 +1,19 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf} +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v + +synth_quicklogic -family qlf_k4n8 -top my_top +yosys stat +yosys cd my_top +select -assert-count 2 t:dff + +design -reset + +read_verilog $::env(DESIGN_TOP).v + +synth_quicklogic -family qlf_k6n10 -top my_top +yosys stat +yosys cd my_top +select -assert-count 2 t:dff diff --git a/ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v similarity index 100% rename from ql-qlf-k4n8-plugin/tests/iob_no_flatten/iob_no_flatten.v rename to ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.ys b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.ys new file mode 100644 index 000000000..1dfc87c27 --- /dev/null +++ b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.ys @@ -0,0 +1,7 @@ +plugin -i ql-qlf +read_verilog ./iob_no_flatten.v + +synth_quicklogic -family qlf_k4n8 -top my_top +stat +cd my_top +select -assert-count 2 t:$_DFF_P_ diff --git a/ql-qlf-plugin/tests/latches/latches.tcl b/ql-qlf-plugin/tests/latches/latches.tcl new file mode 100644 index 000000000..6b9f1f4b6 --- /dev/null +++ b/ql-qlf-plugin/tests/latches/latches.tcl @@ -0,0 +1,28 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +yosys -import ;# ingest plugin commands + +#read_verilog $::env(DESIGN_TOP).v +read_verilog latches.v +design -save read + +# LATCHP +synth_quicklogic -family qlf_k4n8 -top latchp +yosys cd latchp +stat +select -assert-count 1 t:\$_DLATCH_P_ + +# LATCHN +design -load read +synth_quicklogic -family qlf_k6n10 -top latchn +yosys cd latchn +stat +select -assert-count 1 t:\$_DLATCH_N_ + +# LATCHP test for qlf_k6n10 family +design -load read +synth_quicklogic -family qlf_k4n8 -top latchp_noinit +yosys cd latchp_noinit +stat +select -assert-count 1 t:\$_DLATCH_P_ + diff --git a/ql-qlf-k4n8-plugin/tests/latches/latches.v b/ql-qlf-plugin/tests/latches/latches.v similarity index 78% rename from ql-qlf-k4n8-plugin/tests/latches/latches.v rename to ql-qlf-plugin/tests/latches/latches.v index f498e1ca3..8b35992c4 100644 --- a/ql-qlf-k4n8-plugin/tests/latches/latches.v +++ b/ql-qlf-plugin/tests/latches/latches.v @@ -30,3 +30,12 @@ module latchsr ( else if (pre) q <= 1'b1; else if (en) q <= d; endmodule + +module latchp_noinit ( + input d, + clk, + en, + output reg q +); + always @* if (en) q <= d; +endmodule diff --git a/ql-qlf-plugin/tests/logic/logic.tcl b/ql-qlf-plugin/tests/logic/logic.tcl new file mode 100644 index 000000000..8017272f4 --- /dev/null +++ b/ql-qlf-plugin/tests/logic/logic.tcl @@ -0,0 +1,27 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +yosys -import ;# ingest plugin commands + +#Logic test for qlf_k4n8 device +read_verilog $::env(DESIGN_TOP).v +hierarchy -top top +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 +design -load postopt +yosys cd top + +stat +select -assert-count 9 t:\$lut + +design -reset + +#Logic test for qlf_k6n10 device +read_verilog $::env(DESIGN_TOP).v +hierarchy -top top +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 +design -load postopt +yosys cd top + +stat +select -assert-count 9 t:\$lut diff --git a/ql-qlf-k4n8-plugin/tests/logic/logic.v b/ql-qlf-plugin/tests/logic/logic.v similarity index 100% rename from ql-qlf-k4n8-plugin/tests/logic/logic.v rename to ql-qlf-plugin/tests/logic/logic.v diff --git a/ql-qlf-k4n8-plugin/tests/logic/logic.ys b/ql-qlf-plugin/tests/logic/logic.ys similarity index 69% rename from ql-qlf-k4n8-plugin/tests/logic/logic.ys rename to ql-qlf-plugin/tests/logic/logic.ys index ae40af153..c7f0cd50d 100644 --- a/ql-qlf-k4n8-plugin/tests/logic/logic.ys +++ b/ql-qlf-plugin/tests/logic/logic.ys @@ -1,7 +1,8 @@ -read_verilog ../common/logic.v +plugin -i ql-qlf +read_verilog ./logic.v hierarchy -top top proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic +equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 design -load postopt cd top diff --git a/ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl b/ql-qlf-plugin/tests/shreg/shreg.tcl similarity index 54% rename from ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl rename to ql-qlf-plugin/tests/shreg/shreg.tcl index 95c9c608e..9be1ca33e 100644 --- a/ql-qlf-k4n8-plugin/tests/shreg/shreg.tcl +++ b/ql-qlf-plugin/tests/shreg/shreg.tcl @@ -1,8 +1,8 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf-k4n8 } +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v -synth_quicklogic -top top +synth_quicklogic -family qlf_k4n8 -top top stat select -assert-count 8 t:sh_dff diff --git a/ql-qlf-k4n8-plugin/tests/shreg/shreg.v b/ql-qlf-plugin/tests/shreg/shreg.v similarity index 100% rename from ql-qlf-k4n8-plugin/tests/shreg/shreg.v rename to ql-qlf-plugin/tests/shreg/shreg.v From f977e290b378b4d52dba81a086f76f8567e98657 Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 31 Mar 2021 11:38:59 +0200 Subject: [PATCH 309/845] Formatting Signed-off-by: samycharas --- .../ql-qlf-k6n10/qlf_k6n10_arith_map.v | 38 ++++----- .../ql-qlf-k6n10/qlf_k6n10_brams_map.v | 82 +++++++++---------- .../ql-qlf-k6n10/qlf_k6n10_cells_sim.v | 20 ++--- ql-qlf-plugin/tests/dffs/dffs.v | 8 -- 4 files changed, 70 insertions(+), 78 deletions(-) diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v index b054ffef9..6800b228d 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v @@ -29,32 +29,32 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); end endgenerate - wire [Y_WIDTH: 0 ] CARRY; - assign CARRY[0] = CI; + wire [Y_WIDTH: 0 ] CARRY; + assign CARRY[0] = CI; - genvar i; - generate for (i = 0; i < Y_WIDTH - 1; i = i+1) begin:gen3 + genvar i; + generate for (i = 0; i < Y_WIDTH - 1; i = i+1) begin:gen3 adder my_adder ( - .cin (CARRY[i]), - .cout (CARRY[i+1]), - .a (AA[i]), - .b (BB[i]), - .sumout (Y[i]) + .cin (CARRY[i] ), + .cout (CARRY[i+1]), + .a (AA[i] ), + .b (BB[i] ), + .sumout (Y[i] ) ); - end endgenerate + end endgenerate - generate if ((Y_WIDTH -1) % 20 == 0) begin:gen4 + generate if ((Y_WIDTH -1) % 20 == 0) begin:gen4 assign Y[Y_WIDTH-1] = CARRY[Y_WIDTH-1]; - end else begin:gen5 + end else begin:gen5 adder my_adder ( - .cin (CARRY[Y_WIDTH - 1]), - .cout (CARRY[Y_WIDTH]), - .a (1'b0), - .b (1'b0), - .sumout (Y[Y_WIDTH -1]) + .cin (CARRY[Y_WIDTH - 1]), + .cout (CARRY[Y_WIDTH] ), + .a (1'b0 ), + .b (1'b0 ), + .sumout (Y[Y_WIDTH -1] ) ); - end - endgenerate + end + endgenerate assign X = AA ^ BB; endmodule diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v index 3aaf67fda..7f25a9083 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v @@ -10,18 +10,18 @@ module \$__QLF_RAM16K ( ); generate - DP_RAM16K #() - _TECHMAP_REPLACE_ ( - .d_out(RDATA), - .rclk (RCLK ), - .wclk (WCLK ), - .ren (RE ), - .raddr(RADDR), - .wen (WE ), - .waddr(WADDR), - .wenb (WENB ), - .d_in (WDATA) - ); + DP_RAM16K #() + _TECHMAP_REPLACE_ ( + .d_out(RDATA), + .rclk (RCLK ), + .wclk (WCLK ), + .ren (RE ), + .raddr(RADDR), + .wen (WE ), + .waddr(WADDR), + .wenb (WENB ), + .d_in (WDATA) + ); endgenerate endmodule @@ -49,13 +49,13 @@ module \$__QLF_RAM16K_M0 (CLK1, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); _TECHMAP_REPLACE_ ( .RDATA(A1DATA), .RADDR(A1ADDR), - .RCLK(CLK1), - .RE(A1EN), + .RCLK (CLK1 ), + .RE (A1EN ), .WDATA(B1DATA), .WADDR(B1ADDR), - .WCLK(CLK1), - .WE(B1EN), - .WENB(WENB) + .WCLK (CLK1 ), + .WE (B1EN ), + .WENB (WENB ) ); endmodule @@ -89,15 +89,15 @@ module \$__QLF_RAM16K_M1 (CLK1, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); \$__QLF_RAM16K #() _TECHMAP_REPLACE_ ( - .RDATA(A1DATA), - .RADDR(A1ADDR), - .RCLK(CLK1), - .RE(A1EN), - .WDATA(WDATA), + .RDATA(A1DATA ), + .RADDR(A1ADDR ), + .RCLK (CLK1 ), + .RE (A1EN ), + .WDATA(WDATA ), .WADDR(B1ADDR[9:1]), - .WCLK(CLK1), - .WENB(WENB), - .WE(B1EN) + .WCLK (CLK1 ), + .WENB (WENB ), + .WE (B1EN ) ); endmodule @@ -135,15 +135,15 @@ module \$__QLF_RAM16K_M2 (CLK1, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); \$__QLF_RAM16K #() _TECHMAP_REPLACE_ ( - .RDATA(A1DATA), - .RADDR(A1ADDR), - .RCLK(CLK1), - .RE(A1EN), - .WDATA(B1DATA), + .RDATA(A1DATA ), + .RADDR(A1ADDR ), + .RCLK (CLK1 ), + .RE (A1EN ), + .WDATA(B1DATA ), .WADDR(B1ADDR[10:2]), - .WCLK(CLK1), - .WENB(WENB), - .WE(B1EN) + .WCLK (CLK1 ), + .WENB (WENB ), + .WE (B1EN ) ); endmodule @@ -184,15 +184,15 @@ module \$__QLF_RAM16K_M3 (CLK1, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); \$__QLF_RAM16K #() _TECHMAP_REPLACE_ ( - .RDATA(A1DATA), - .RADDR(A1ADDR), - .RCLK(CLK1), - .RE(A1EN), - .WDATA(B1DATA), + .RDATA(A1DATA ), + .RADDR(A1ADDR ), + .RCLK (CLK1 ), + .RE (A1EN ), + .WDATA(B1DATA ), .WADDR(B1ADDR[11:3]), - .WCLK(CLK1), - .WENB(WENB), - .WE(B1EN) + .WCLK (CLK1 ), + .WENB (WENB ), + .WE (B1EN ) ); endmodule diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v index 23c5129c4..cbce0fb6e 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v @@ -101,16 +101,16 @@ module DP_RAM16K ( input[31:0] wenb, output[31:0] d_out ); - _dual_port_sram memory_0 ( - .wclk (wclk), - .wen (wen), - .waddr (waddr), - .data_in (d_in), - .rclk (rclk), - .ren (ren), - .raddr (raddr), - .wenb (wenb), - .d_out (d_out) ); + _dual_port_sram memory_0 ( + .wclk (wclk), + .wen (wen), + .waddr (waddr), + .data_in (d_in), + .rclk (rclk), + .ren (ren), + .raddr (raddr), + .wenb (wenb), + .d_out (d_out) ); endmodule diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index 5636bfe23..7a4d5f9a0 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -6,14 +6,6 @@ module my_dff ( always @(posedge clk) q <= d; endmodule -module my_dff_noinit ( - input d, - clk, - output reg q -); - always @(posedge clk) q <= d; -endmodule - module my_dffr_p ( input d, clk, From ab86ae80944055149e047170149c8f450f8de787 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Wed, 14 Apr 2021 00:31:03 -0700 Subject: [PATCH 310/845] move the ff techmap step after dfflegalize Signed-off-by: Tarachand Pagarani --- ql-qlf-plugin/synth_quicklogic.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index f4cab5960..1db4bf0e2 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -220,13 +220,9 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_ffs")) { - std::string techMapArgs = " -map +/quicklogic/" + family + "_ffs_map.v"; if (family == "qlf_k4n8") { run("shregmap -minlen 8 -maxlen 8"); } - if (!noffmap) { - run("techmap " + techMapArgs); - } run("opt_expr -mux_undef"); run("simplemap"); run("opt_expr"); @@ -238,6 +234,10 @@ struct SynthQuickLogicPass : public ScriptPass { } else { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0"); } + std::string techMapArgs = " -map +/techmap.v -map +/quicklogic/" + family + "_ffs_map.v"; + if (!noffmap) { + run("techmap " + techMapArgs); + } } if (check_label("map_luts")) { From 1006d37b0938dc0601b76d31e12b26886197af4b Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Fri, 16 Apr 2021 03:21:29 -0700 Subject: [PATCH 311/845] move optimization steps after ff techmap and remove redundant opt steps Signed-off-by: Tarachand Pagarani --- ql-qlf-plugin/synth_quicklogic.cc | 9 +++------ ql-qlf-plugin/tests/dffs/dffs.tcl | 8 ++++++++ ql-qlf-plugin/tests/dffs/dffs.v | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 1db4bf0e2..d487e7c72 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -223,12 +223,6 @@ struct SynthQuickLogicPass : public ScriptPass { if (family == "qlf_k4n8") { run("shregmap -minlen 8 -maxlen 8"); } - run("opt_expr -mux_undef"); - run("simplemap"); - run("opt_expr"); - run("opt_merge"); - run("opt_clean"); - run("opt"); if (family == "qlf_k6n10") { run("dfflegalize -cell $_DFF_P_ 0"); } else { @@ -238,6 +232,9 @@ struct SynthQuickLogicPass : public ScriptPass { if (!noffmap) { run("techmap " + techMapArgs); } + run("opt_merge"); + run("opt_clean"); + run("opt"); } if (check_label("map_luts")) { diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index 05c7ec1f0..27bc6a560 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -22,6 +22,14 @@ stat select -assert-count 1 t:dffr select -assert-count 1 t:\$lut +# DFFR (posedge RST) +design -load read +synth_quicklogic -family qlf_k4n8 -top my_dffr_p_2 +yosys cd my_dffr_p_2 +stat +select -assert-count 2 t:dffr +select -assert-count 1 t:\$lut + # DFFR (negedge RST) design -load read synth_quicklogic -family qlf_k4n8 -top my_dffr_n diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index 7a4d5f9a0..8d8757679 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -17,6 +17,24 @@ module my_dffr_p ( else q <= d; endmodule +module my_dffr_p_2 ( + input d1, + input d2, + clk, + clr, + output reg q1, + output reg q2 +); + always @(posedge clk or posedge clr) + if (clr) begin + q1 <= 1'b0; + q2 <= 1'b0; + end else begin + q1 <= d1; + q2 <= d2; + end +endmodule + module my_dffr_n ( input d, clk, From 63bfeb9a919c6d3cdaa6c5659418385928d6ea17 Mon Sep 17 00:00:00 2001 From: Carlos de Paula Date: Sat, 24 Apr 2021 09:32:03 -0300 Subject: [PATCH 312/845] XDC: Support loading properties from dictionaries This change adds support to load pin properties from single-line dictionaries. Fixes #32 Signed-off-by: Carlos de Paula --- xdc-plugin/tests/Makefile | 3 + .../counter-dict/counter-dict.golden.json | 35 +++++++ .../tests/counter-dict/counter-dict.tcl | 16 ++++ xdc-plugin/tests/counter-dict/counter-dict.v | 95 +++++++++++++++++++ .../tests/counter-dict/counter-dict.xdc | 20 ++++ xdc-plugin/xdc.cc | 28 ++++++ 6 files changed, 197 insertions(+) create mode 100644 xdc-plugin/tests/counter-dict/counter-dict.golden.json create mode 100644 xdc-plugin/tests/counter-dict/counter-dict.tcl create mode 100644 xdc-plugin/tests/counter-dict/counter-dict.v create mode 100644 xdc-plugin/tests/counter-dict/counter-dict.xdc diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index 76d224149..0f86e2f8a 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -1,9 +1,11 @@ # counter - basic test for IOSTANDARD, SLEW, DRIVE, IN_TERM properties +# counter-dict - basic test using XDC -dict for IOSTANDARD, SLEW, DRIVE, IN_TERM properties # port_indexes - like counter but bus port indices are passes without curly braces # io_loc_pairs - test for LOC property being set on IOBUFs as the IO_LOC_PAIRS parameter # minilitex_ddr_arty - litex design with more types of IOBUFS including differential # package_pins - test for PACKAGE_PIN property being set on IOBUFs as the IO_LOC_PAIRS parameter TESTS = counter \ + counter-dict \ port_indexes \ io_loc_pairs \ minilitex_ddr_arty \ @@ -19,6 +21,7 @@ $(1)_update_json: endef counter_verify = $(call json_test,counter) +counter-dict_verify = $(call json_test,counter-dict) port_indexes_verify = $(call json_test,port_indexes) && test $$(grep "'unknown' proc command handler" port_indexes/port_indexes.txt | wc -l) -eq 2 io_loc_pairs_verify = $(call json_test,io_loc_pairs) minilitex_ddr_arty_verify = $(call json_test,minilitex_ddr_arty) diff --git a/xdc-plugin/tests/counter-dict/counter-dict.golden.json b/xdc-plugin/tests/counter-dict/counter-dict.golden.json new file mode 100644 index 000000000..25e123427 --- /dev/null +++ b/xdc-plugin/tests/counter-dict/counter-dict.golden.json @@ -0,0 +1,35 @@ +{ + "OBUF_6": { + "DRIVE": "12", + "IOSTANDARD": "LVCMOS33", + "SLEW": "SLOW" + }, + "OBUF_7": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "SLEW": "FAST" + }, + "OBUF_OUT": { + "IN_TERM": "UNTUNED_SPLIT_50", + "IOSTANDARD": "LVCMOS33", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_10": { + "IOSTANDARD": "LVCMOS18", + "SLEW": "SLOW" + }, + "bottom_inst.OBUF_11": { + "DRIVE": "4", + "IOSTANDARD": "LVCMOS25", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_9": { + "IOSTANDARD": "DIFF_SSTL135", + "SLEW": "FAST" + }, + "bottom_intermediate_inst.OBUF_8": { + "DRIVE": "16", + "IOSTANDARD": "SSTL135", + "SLEW": "SLOW" + } +} \ No newline at end of file diff --git a/xdc-plugin/tests/counter-dict/counter-dict.tcl b/xdc-plugin/tests/counter-dict/counter-dict.tcl new file mode 100644 index 000000000..9b5809f86 --- /dev/null +++ b/xdc-plugin/tests/counter-dict/counter-dict.tcl @@ -0,0 +1,16 @@ +yosys -import +if { [info procs get_ports] == {} } { plugin -i design_introspection } +if { [info procs read_xdc] == {} } { plugin -i xdc } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v + +# -flatten is used to ensure that the output eblif has only one module. +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp + +#Read the design constraints +read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc + +# Write the design in JSON format. +write_json [test_output_path "counter-dict.json"] diff --git a/xdc-plugin/tests/counter-dict/counter-dict.v b/xdc-plugin/tests/counter-dict/counter-dict.v new file mode 100644 index 000000000..2ec231bb2 --- /dev/null +++ b/xdc-plugin/tests/counter-dict/counter-dict.v @@ -0,0 +1,95 @@ +module top ( + input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); +endmodule + diff --git a/xdc-plugin/tests/counter-dict/counter-dict.xdc b/xdc-plugin/tests/counter-dict/counter-dict.xdc new file mode 100644 index 000000000..a72cf8905 --- /dev/null +++ b/xdc-plugin/tests/counter-dict/counter-dict.xdc @@ -0,0 +1,20 @@ +#set_property LOC R2 [get_ports led] +#OBUF_6 +set_property DRIVE 12 [get_ports {led[0]}] +#OBUF_7 +set_property -dict { IN_TERM UNTUNED_SPLIT_40 SLEW FAST IOSTANDARD SSTL135 } [get_ports {led[1]}] +#OBUF_OUT +set_property -dict {IN_TERM UNTUNED_SPLIT_50 SLEW FAST IOSTANDARD LVCMOS33} [get_ports {out_a}] +#bottom_inst.OBUF_10 +set_property -dict { SLEW SLOW IOSTANDARD LVCMOS18 } [get_ports {out_b[0]}] +#bottom_inst.OBUF_11 +set_property -dict { DRIVE 4 SLEW FAST IOSTANDARD LVCMOS25 } [get_ports {out_b[1]}] +#bottom_inst.OBUF_9 +set_property -dict { SLEW FAST IOSTANDARD DIFF_SSTL135 } [get_ports {led[2]}] +#bottom_intermediate_inst.OBUF_8 +set_property -dict { DRIVE 16 IOSTANDARD SSTL135 } [get_ports {led[3]}] +#set_property INTERNAL_VREF 0.600 [get_iobanks 14] +#set_property INTERNAL_VREF 0.675 [get_iobanks 15] +#set_property INTERNAL_VREF 0.750 [get_iobanks 16] +#set_property INTERNAL_VREF 0.900 [get_iobanks 34] +#set_property INTERNAL_VREF 0.900 [get_iobanks 35] diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 4729ed079..3d27e0bb9 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -27,10 +27,12 @@ * Tcl interpreter. */ #include "../common/bank_tiles.h" +#include "../common/utils.h" #include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" #include "libs/json11/json11.hpp" +#include #include USING_YOSYS_NAMESPACE @@ -116,6 +118,8 @@ struct SetProperty : public Pass { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" set_property PROPERTY VALUE OBJECT\n"); + log("or\n"); + log(" set_property -dict { PROPERTY VALUE PROPERTY2 VALUE2 } OBJECT\n"); log("\n"); log("Set the given property to the specified value on an object\n"); log("\n"); @@ -126,7 +130,31 @@ struct SetProperty : public Pass { if (design->top_module() == nullptr) { log_cmd_error("No top module detected\n"); } + if (args.at(1) == "-dict") { + std::string dict_args = args.at(2); + trim(dict_args); + std::stringstream args_stream(dict_args); + std::vector tokens; + std::string intermediate; + while (getline(args_stream, intermediate, ' ')) { + tokens.push_back(intermediate); + } + if (tokens.size() % 2 != 0) { + log_cmd_error("Invalid number of dict parameters: %lu.\n", tokens.size()); + } + for (long unsigned int i = 0; i < tokens.size(); i += 2) { + std::vector new_args(args); + new_args.at(1) = tokens[i]; + new_args.at(2) = tokens[i + 1]; + read_property(new_args, design); + } + } else { + read_property(args, design); + } + } + void read_property(std::vector args, RTLIL::Design *design) + { std::string option(args[1]); if (set_property_options_map.count(option) == 0) { log_warning("set_property: %s option is currently not supported\n", option.c_str()); From 5428d6de2611cc1b547507c4cb8aae8454b13728 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 17 May 2021 11:55:51 +0200 Subject: [PATCH 313/845] Fix CI by building Yosys using GCC Signed-off-by: Maciej Kurc --- .github/workflows/setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index abe6e8dd4..ead84e799 100755 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -41,6 +41,7 @@ start_section Install-Yosys cd ~/.local-src git clone https://github.com/SymbiFlow/yosys.git -b master+wip cd yosys + make config-gcc # Build Yosys using GCC PREFIX=$HOME/.local-bin make -j$(nproc) PREFIX=$HOME/.local-bin make install echo $(which yosys) From 30771766da92da663a6f81a9f720d005765f42ca Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Fri, 14 May 2021 00:11:46 -0700 Subject: [PATCH 314/845] add dffsr support Signed-off-by: Tarachand Pagarani --- .../ql-qlf-k4n8/qlf_k4n8_cells_sim.v | 42 +++++++ ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v | 72 +++++++++++ ql-qlf-plugin/synth_quicklogic.cc | 2 +- ql-qlf-plugin/tests/dffs/dffs.tcl | 64 ++++++++++ ql-qlf-plugin/tests/dffs/dffs.v | 113 ++++++++++++++++++ 5 files changed, 292 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v index 91a7e87de..120001813 100644 --- a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v +++ b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v @@ -182,3 +182,45 @@ module dffns( else Q <= D; endmodule + +(* abc9_flop, lib_whitebox *) +module dffsr( + output reg Q, + input D, + (* clkbuf_sink *) + input C, + input R, + input S +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge C or negedge S or negedge R) + if (!S) + Q <= 1'b1; + else if (!R) + Q <= 1'b0; + else + Q <= D; +endmodule + +(* abc9_flop, lib_whitebox *) +module dffnsr( + output reg Q, + input D, + (* clkbuf_sink *) + input C, + input R, + input S +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(negedge C or negedge S or negedge R) + if (!S) + Q <= 1'b1; + else if (!R) + Q <= 1'b0; + else + Q <= D; +endmodule diff --git a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v index 08f0807a6..4a0adf47d 100644 --- a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v +++ b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v @@ -76,6 +76,78 @@ module \$_DFF_NP1_ (D, Q, C, R); dffns _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(!R)); endmodule +module \$_DFFSR_PPP_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R), .S(!S)); +endmodule + +module \$_DFFSR_PNP_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R), .S(S)); +endmodule + +module \$_DFFSR_PNN_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R), .S(S)); +endmodule + +module \$_DFFSR_PPN_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R), .S(!S)); +endmodule + +module \$_DFFSR_NPP_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffnsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R), .S(!S)); +endmodule + +module \$_DFFSR_NNP_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffnsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R), .S(S)); +endmodule + +module \$_DFFSR_NNN_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffnsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R), .S(S)); +endmodule + +module \$_DFFSR_NPN_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffnsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R), .S(!S)); +endmodule + module \$__SHREG_DFF_P_ (D, Q, C); input D; input C; diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index d487e7c72..9fb067ec8 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -226,7 +226,7 @@ struct SynthQuickLogicPass : public ScriptPass { if (family == "qlf_k6n10") { run("dfflegalize -cell $_DFF_P_ 0"); } else { - run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0"); + run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); } std::string techMapArgs = " -map +/techmap.v -map +/quicklogic/" + family + "_ffs_map.v"; if (!noffmap) { diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index 27bc6a560..b1f76cc13 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -90,6 +90,70 @@ yosys cd my_dffns_n stat select -assert-count 1 t:dffns +# DFFSR (posedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k4n8 -top my_dffsr_ppp +yosys cd my_dffsr_ppp +stat +select -assert-count 1 t:dffsr +select -assert-count 2 t:\$lut + +# DFFSR (posedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k4n8 -top my_dffsr_pnp +yosys cd my_dffsr_pnp +stat +select -assert-count 1 t:dffsr +select -assert-count 2 t:\$lut + +# DFFSR (posedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k4n8 -top my_dffsr_ppn +yosys cd my_dffsr_ppn +stat +select -assert-count 1 t:dffsr +select -assert-count 1 t:\$lut + +# DFFSR (posedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k4n8 -top my_dffsr_pnn +yosys cd my_dffsr_pnn +stat +select -assert-count 1 t:dffsr +select -assert-count 1 t:\$lut + +# DFFSR (negedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k4n8 -top my_dffsr_npp +yosys cd my_dffsr_npp +stat +select -assert-count 1 t:dffnsr +select -assert-count 2 t:\$lut + +# DFFSR (negedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k4n8 -top my_dffsr_nnp +yosys cd my_dffsr_nnp +stat +select -assert-count 1 t:dffnsr +select -assert-count 2 t:\$lut + +# DFFSR (negedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k4n8 -top my_dffsr_npn +yosys cd my_dffsr_npn +stat +select -assert-count 1 t:dffnsr +select -assert-count 1 t:\$lut + +# DFFSR (negedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k4n8 -top my_dffsr_nnn +yosys cd my_dffsr_nnn +stat +select -assert-count 1 t:dffnsr +select -assert-count 1 t:\$lut + design -reset # DFF on qlf_k6n10 device diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index 8d8757679..537699094 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -101,6 +101,7 @@ module my_dffnr_n ( else q <= d; endmodule + module my_dffns_p ( input d, clk, @@ -124,3 +125,115 @@ module my_dffns_n ( if (!pre) q <= 1'b1; else q <= d; endmodule + +module my_dffsr_ppp ( + input d, + clk, + pre, + clr, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or posedge pre or posedge clr) + if (pre) q <= 1'b1; + else if (clr) q <= 1'b0; + else q <= d; +endmodule + +module my_dffsr_pnp ( + input d, + clk, + pre, + clr, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or negedge pre or posedge clr) + if (!pre) q <= 1'b1; + else if (clr) q <= 1'b0; + else q <= d; +endmodule + +module my_dffsr_ppn ( + input d, + clk, + pre, + clr, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or posedge pre or negedge clr) + if (pre) q <= 1'b1; + else if (!clr) q <= 1'b0; + else q <= d; +endmodule + +module my_dffsr_pnn ( + input d, + clk, + pre, + clr, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or negedge pre or negedge clr) + if (!pre) q <= 1'b1; + else if (!clr) q <= 1'b0; + else q <= d; +endmodule + +module my_dffsr_npp ( + input d, + clk, + pre, + clr, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or posedge pre or posedge clr) + if (pre) q <= 1'b1; + else if (clr) q <= 1'b0; + else q <= d; +endmodule + +module my_dffsr_nnp ( + input d, + clk, + pre, + clr, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or negedge pre or posedge clr) + if (!pre) q <= 1'b1; + else if (clr) q <= 1'b0; + else q <= d; +endmodule + +module my_dffsr_npn ( + input d, + clk, + pre, + clr, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or posedge pre or negedge clr) + if (pre) q <= 1'b1; + else if (!clr) q <= 1'b0; + else q <= d; +endmodule + +module my_dffsr_nnn ( + input d, + clk, + pre, + clr, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or negedge pre or negedge clr) + if (!pre) q <= 1'b1; + else if (!clr) q <= 1'b0; + else q <= d; +endmodule From b4f569826d3986fab32127b56b9b0eb19162d29b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 28 May 2021 10:14:02 +0200 Subject: [PATCH 315/845] Adding information about QLF FPGA plugin to README.md Signed-off-by: Maciej Kurc --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 08c211fb2..472130084 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,10 @@ This repository contains plugins for 2. [FASM](#fasm-plugin) 3. [Integrate inverters](#integrate-inverters-plugin) 4. [Parameters](#parameters-plugin) -5. [QL IOBs](#quicklogic-iob-plugin) -6. [SDC](#sdc-plugin) -7. [XDC](#xdc-plugin) +5. [QuickLogic IOBs](#quicklogic-iob-plugin) +6. [QuickLogic QLF FPGAs](#quicklogic-qlf-plugin) +7. [SDC](#sdc-plugin) +8. [XDC](#xdc-plugin) ## Summary @@ -51,11 +52,20 @@ The plugin adds the following command: ### QuickLogic IOB plugin -[QL IOB plugin](./ql-iob-plugin/) annotates IO buffer cells with information from IO placement constraints. +[QuickLogic IOB plugin](./ql-iob-plugin/) annotates IO buffer cells with information from IO placement constraints. Used during synthesis for QuickLogic EOS-S3 architecture. The plugin adds the following command: * quicklogic_iob +### QuickLogic QLF FPGAs plugin + +[QuickLogic QLF plugin](./ql-qlf-plugin) extends Yosys with synthesis support for `qlf_k4n8` and `qlf_k6n10` architectures. + +The plugin adds the following command: +* synth_quicklogic + +Detailed help on the supported command(s) can be obtained by running `help ` in Yosys. + ### SDC plugin Reads Standard Delay Format (SDC) constraints, propagates these constraints across the design and writes out the complete SDC information. From 6895a39b418114725787a760d7e9f22f4d55ae8f Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 28 May 2021 10:18:23 +0200 Subject: [PATCH 316/845] Added mention of qlf_k6n10 to synth_quicklogic command help Signed-off-by: Maciej Kurc --- ql-qlf-plugin/synth_quicklogic.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 9fb067ec8..9d7bb77e1 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -41,7 +41,8 @@ struct SynthQuickLogicPass : public ScriptPass { log(" run synthesis for the specified QuickLogic architecture\n"); log(" generate the synthesis netlist for the specified family.\n"); log(" supported values:\n"); - log(" - qlf_k4n8: qlf_k4n8 \n"); + log(" - qlf_k4n8 : qlf_k4n8 \n"); + log(" - qlf_k6n10: qlf_k6n10 \n"); log("\n"); log(" -no_abc_opt\n"); log(" By default most of ABC logic optimization features is\n"); From 74049e44f0545d68367f4a69a4732090b8814aa8 Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 2 Jun 2021 14:10:34 +0200 Subject: [PATCH 317/845] Add dff support to qlf_k6n10 device Signed-off-by: samycharas --- .../ql-qlf-k6n10/qlf_k6n10_cells_sim.v | 210 +++++++++++++++- .../ql-qlf-k6n10/qlf_k6n10_ffs_map.v | 145 ++++++++++- ql-qlf-plugin/synth_quicklogic.cc | 4 +- ql-qlf-plugin/tests/dffs/dffs.tcl | 238 +++++++++++++++++- ql-qlf-plugin/tests/dffs/dffs.v | 168 +++++++++++++ 5 files changed, 755 insertions(+), 10 deletions(-) diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v index cbce0fb6e..996912b56 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v @@ -64,16 +64,212 @@ endmodule (* abc9_flop, lib_whitebox *) module dff( - output reg Q, - input D, - (* clkbuf_sink *) - input C + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C ); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C) + Q <= D; + 1'b1: + always @(negedge C) + Q <= D; + endcase +endmodule - always @(posedge C) +(* abc9_flop, lib_whitebox *) +module dffr( + output reg Q, + input D, + input R, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or posedge R) + if (R) + Q <= 1'b0; + else + Q <= D; + 1'b1: + always @(negedge C or posedge R) + if (R) + Q <= 1'b0; + else + Q <= D; + endcase +endmodule + +(* abc9_flop, lib_whitebox *) +module dffre( + output reg Q, + input D, + input R, + input E, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or posedge R) + if (R) + Q <= 1'b0; + else if(E) + Q <= D; + 1'b1: + always @(negedge C or posedge R) + if (R) + Q <= 1'b0; + else if(E) + Q <= D; + endcase +endmodule + +module dffs( + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C, + input S +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or negedge S) + if (S) + Q <= 1'b1; + else + Q <= D; + 1'b1: + always @(negedge C or negedge S) + if (S) + Q <= 1'b1; + else Q <= D; + endcase +endmodule + +module dffse( + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C, + input S, + input E, +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or negedge S) + if (S) + Q <= 1'b1; + else if(E) + Q <= D; + 1'b1: + always @(negedge C or negedge S) + if (S) + Q <= 1'b1; + else if(E) + Q <= D; + endcase +endmodule + +module dffsr( + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C, + input R, + input S +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or negedge S or negedge R) + if (S) + Q <= 1'b1; + else if (R) + Q <= 1'b0; + else + Q <= D; + 1'b1: + always @(negedge C or negedge S or negedge R) + if (S) + Q <= 1'b1; + else if (R) + Q <= 1'b0; + else + Q <= D; + endcase +endmodule + +module dffsre( + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C, + input E, + input R, + input S +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or posedge S or posedge R) + if (S) + Q <= 1'b1; + else if (R) + Q <= 1'b0; + else if (E) + Q <= D; + endcase +endmodule + +(* abc9_flop, lib_whitebox *) +module latchre ( + output reg Q, + input S, + input R, + input D, + input G, + input E +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + always @* + begin + if (R) Q <= 1'b0; + if (S) Q <= 1'b1; + else if (E && G) Q <= D; + end endmodule (* abc9_flop, lib_whitebox *) diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v index add046298..81f81de4c 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v @@ -1,6 +1,149 @@ -module \$_DFF_P_ (D, Q, C); +// Basic DFF + +module \$_DFF_P_ (D, C, Q); input D; input C; output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; dff _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C)); endmodule + +// Async reset +module \$_DFF_PP0_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R)); +endmodule + +// Async set +module \$_DFF_PP1_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + dffs _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(R)); +endmodule + +// Async reset, enable + +module \$_DFFE_PP0P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .C(C), .E(E), .R(R)); +endmodule + +// Async set, enable + +module \$_DFFE_PP1P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffse _TECHMAP_REPLACE_ (.D(D), .Q(Q), .C(C), .E(E), .S(S)); +endmodule + +// Async set & reset + +module \$_DFFSR_PPP_ (D, C, R, S, Q); + input D; + input C; + input R; + input S; + output Q; + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R), .S(S)); +endmodule + +// Async set, reset & enable + +module \$_DFFSRE_PPPP_ (D, Q, C, E, R, S); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S)); +endmodule + +// Latch with Async reset, enable +module \$_DLATCH_PP0_ (input E, R, D, output Q); + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + latchre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(R)); +endmodule + +// The following techmap operation are not performed right now +// as Negative edge FF are not legalized in synth_quicklogic for qlf_k6n10 +// but in case we implement clock inversion in the future, the support is ready for it. + +module \$_DFF_N_ (D, C, Q); + input D; + input C; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dff #(.IS_C_INVERTED(1'b1)) _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C)); +endmodule + +module \$_DFF_NP0_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffr #(.IS_C_INVERTED(1'b1)) _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R)); +endmodule + +module \$_DFF_NP1_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + dffs #(.IS_C_INVERTED(1'b1)) _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(R)); +endmodule + +module \$_DFFE_NP0P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffre #(.IS_C_INVERTED(1'b1)) _TECHMAP_REPLACE_ (.D(D), .Q(Q), .C(C), .E(E), .R(R)); +endmodule + +module \$_DFFE_NP1P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffse #(.IS_C_INVERTED(1'b1)) _TECHMAP_REPLACE_ (.D(D), .Q(Q), .C(C), .E(E), .S(S)); +endmodule + +module \$_DFFSR_NPP_ (D, C, R, S, Q); + input D; + input C; + input R; + input S; + output Q; + dffsr #(.IS_C_INVERTED(1'b1)) _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R), .S(S)); +endmodule + +module \$_DFFSRE_PPPP_ (D, C, E, R, S, Q); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre #(.IS_C_INVERTED(1'b1)) _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S)); +endmodule diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 9d7bb77e1..46de90185 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -225,7 +225,9 @@ struct SynthQuickLogicPass : public ScriptPass { run("shregmap -minlen 8 -maxlen 8"); } if (family == "qlf_k6n10") { - run("dfflegalize -cell $_DFF_P_ 0"); + run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_PP?_ 0 -cell $_DFFE_PP?P_ 0 -cell $_DFFSR_PPP_ 0 -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_PP0_ 0"); + // In case we add clock inversion in the future. + // run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_DFFSR_?PP_ 0 -cell $_DFFSRE_?PPP_ 0 -cell $_DLATCH_PP0_ 0"); } else { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); } diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index b1f76cc13..737acc1e8 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -158,11 +158,247 @@ design -reset # DFF on qlf_k6n10 device read_verilog $::env(DESIGN_TOP).v +design -save read + # DFF hierarchy -top my_dff yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k6n10 -top my_dff +equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top my_dff design -load postopt yosys cd my_dff stat select -assert-count 1 t:dff + +# DFFR (posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffr_p +yosys cd my_dffr_p +stat +select -assert-count 1 t:dffr + +# DFFR (posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffr_p_2 +yosys cd my_dffr_p_2 +stat +select -assert-count 2 t:dffr + +# DFFR (negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffr_n +yosys cd my_dffr_n +stat +select -assert-count 1 t:dffr +select -assert-count 1 t:\$lut + +#DFFRE (posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffre_p +yosys cd my_dffre_p +stat +select -assert-count 1 t:dffre + +#DFFRE (negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffre_n +yosys cd my_dffre_n +stat +select -assert-count 1 t:dffre +select -assert-count 1 t:\$lut + +# DFFS (posedge SET) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffs_p +yosys cd my_dffs_p +stat +select -assert-count 1 t:dffs + +# DFFS (negedge SET) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffs_n +yosys cd my_dffs_n +stat +select -assert-count 1 t:dffs +select -assert-count 1 t:\$lut + +# DFFSE (posedge SET) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffse_p +yosys cd my_dffse_p +stat +select -assert-count 1 t:dffse + +# DFFSE (negedge SET) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffse_n +yosys cd my_dffse_n +stat +select -assert-count 1 t:dffse + +# DFFN +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffn +yosys cd my_dffn +stat +select -assert-count 1 t:dff +select -assert-count 1 t:\$lut + +# DFFNR (negedge CLK posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffnr_p +yosys cd my_dffnr_p +stat +select -assert-count 1 t:dffr +select -assert-count 1 t:\$lut + +# DFFNR (negedge CLK negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffnr_n +yosys cd my_dffnr_n +stat +select -assert-count 1 t:dffr +select -assert-count 2 t:\$lut + +# DFFNS (negedge CLK posedge SET) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffns_p +yosys cd my_dffns_p +stat +select -assert-count 1 t:dffs +select -assert-count 1 t:\$lut + +# DFFS (negedge CLK negedge SET) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffns_n +yosys cd my_dffns_n +stat +select -assert-count 1 t:dffs +select -assert-count 2 t:\$lut + +# DFFSR (posedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsr_ppp +yosys cd my_dffsr_ppp +stat +select -assert-count 1 t:dffsr +select -assert-count 1 t:\$lut + +# DFFSR (posedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsr_pnp +yosys cd my_dffsr_pnp +stat +select -assert-count 1 t:dffsr +select -assert-count 1 t:\$lut + +# DFFSR (posedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsr_ppn +yosys cd my_dffsr_ppn +stat +select -assert-count 1 t:dffsr +select -assert-count 2 t:\$lut + +# DFFSR (posedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsr_pnn +yosys cd my_dffsr_pnn +stat +select -assert-count 1 t:dffsr +select -assert-count 2 t:\$lut + +# DFFSR (negedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsr_npp +yosys cd my_dffsr_npp +stat +select -assert-count 1 t:dffsr +select -assert-count 2 t:\$lut + +# DFFSR (negedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsr_nnp +yosys cd my_dffsr_nnp +stat +select -assert-count 1 t:dffsr +select -assert-count 2 t:\$lut + +# DFFSR (negedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsr_npn +yosys cd my_dffsr_npn +stat +select -assert-count 1 t:dffsr +select -assert-count 3 t:\$lut + +# DFFSR (negedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsr_nnn +yosys cd my_dffsr_nnn +stat +select -assert-count 1 t:dffsr +select -assert-count 3 t:\$lut + +# DFFSRE (posedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsre_ppp +yosys cd my_dffsre_ppp +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + +# DFFSRE (posedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsre_pnp +yosys cd my_dffsre_pnp +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + +# DFFSRE (posedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsre_ppn +yosys cd my_dffsre_ppn +stat +select -assert-count 1 t:dffsre +select -assert-count 2 t:\$lut + +# DFFSRE (posedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsre_pnn +yosys cd my_dffsre_pnn +stat +select -assert-count 1 t:dffsre +select -assert-count 2 t:\$lut + +# DFFSRE (negedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsre_npp +yosys cd my_dffsre_npp +stat +select -assert-count 1 t:dffsre +select -assert-count 2 t:\$lut + +# DFFSRE (negedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsre_nnp +yosys cd my_dffsre_nnp +stat +select -assert-count 1 t:dffsre +select -assert-count 2 t:\$lut + +# DFFSRE (negedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsre_npn +yosys cd my_dffsre_npn +stat +select -assert-count 1 t:dffsre +select -assert-count 3 t:\$lut + +# DFFSRE (negedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10 -top my_dffsre_nnn +yosys cd my_dffsre_nnn +stat +select -assert-count 1 t:dffsre +select -assert-count 3 t:\$lut diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index 537699094..293b1afbd 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -46,6 +46,30 @@ module my_dffr_n ( else q <= d; endmodule +module my_dffre_p ( + input d, + clk, + clr, + en, + output reg q +); + always @(posedge clk or posedge clr) + if (clr) q <= 1'b0; + else if (en) q <= d; +endmodule + +module my_dffre_n ( + input d, + clk, + clr, + en, + output reg q +); + always @(posedge clk or negedge clr) + if (!clr) q <= 1'b0; + else if (en) q <= d; +endmodule + module my_dffs_p ( input d, clk, @@ -68,6 +92,30 @@ module my_dffs_n ( else q <= d; endmodule +module my_dffse_p ( + input d, + clk, + pre, + en, + output reg q +); + always @(posedge clk or posedge pre) + if (pre) q <= 1'b1; + else if(en) q <= d; +endmodule + +module my_dffse_n ( + input d, + clk, + pre, + en, + output reg q +); + always @(posedge clk or negedge pre) + if (!pre) q <= 1'b1; + else if(en) q <= d; +endmodule + module my_dffn ( input d, clk, @@ -237,3 +285,123 @@ module my_dffsr_nnn ( else if (!clr) q <= 1'b0; else q <= d; endmodule + +module my_dffsre_ppp ( + input d, + clk, + pre, + clr, + en, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or posedge pre or posedge clr) + if (pre) q <= 1'b1; + else if (clr) q <= 1'b0; + else if (en) q <= d; +endmodule + +module my_dffsre_pnp ( + input d, + clk, + pre, + clr, + en, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or negedge pre or posedge clr) + if (!pre) q <= 1'b1; + else if (clr) q <= 1'b0; + else if (en) q <= d; +endmodule + +module my_dffsre_ppn ( + input d, + clk, + pre, + clr, + en, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or posedge pre or negedge clr) + if (pre) q <= 1'b1; + else if (!clr) q <= 1'b0; + else if (en) q <= d; +endmodule + +module my_dffsre_pnn ( + input d, + clk, + pre, + clr, + en, + output reg q +); + initial q <= 1'b0; + always @(posedge clk or negedge pre or negedge clr) + if (!pre) q <= 1'b1; + else if (!clr) q <= 1'b0; + else if (en) q <= d; +endmodule + +module my_dffsre_npp ( + input d, + clk, + pre, + clr, + en, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or posedge pre or posedge clr) + if (pre) q <= 1'b1; + else if (clr) q <= 1'b0; + else if (en) q <= d; +endmodule + +module my_dffsre_nnp ( + input d, + clk, + pre, + clr, + en, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or negedge pre or posedge clr) + if (!pre) q <= 1'b1; + else if (clr) q <= 1'b0; + else if (en) q <= d; +endmodule + +module my_dffsre_npn ( + input d, + clk, + pre, + clr, + en, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or posedge pre or negedge clr) + if (pre) q <= 1'b1; + else if (!clr) q <= 1'b0; + else if (en) q <= d; +endmodule + +module my_dffsre_nnn ( + input d, + clk, + pre, + clr, + en, + output reg q +); + initial q <= 1'b0; + always @(negedge clk or negedge pre or negedge clr) + if (!pre) q <= 1'b1; + else if (!clr) q <= 1'b0; + else if (en) q <= d; +endmodule From 3a9d8bcd43008c5b8c5888f117115dc9a65c016e Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 2 Jun 2021 14:33:55 +0200 Subject: [PATCH 318/845] Add latch with async set&reset Signed-off-by: samycharas --- .../ql-qlf-k6n10/qlf_k6n10_cells_sim.v | 2 +- .../ql-qlf-k6n10/qlf_k6n10_ffs_map.v | 6 +-- ql-qlf-plugin/synth_quicklogic.cc | 4 +- ql-qlf-plugin/tests/Makefile | 2 +- ql-qlf-plugin/tests/latches/latches.tcl | 37 ++++++++++++++----- ql-qlf-plugin/tests/latches/latches.v | 2 +- 6 files changed, 36 insertions(+), 17 deletions(-) diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v index 996912b56..6239edc18 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v @@ -253,7 +253,7 @@ module dffsre( endmodule (* abc9_flop, lib_whitebox *) -module latchre ( +module latchsre ( output reg Q, input S, input R, diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v index 81f81de4c..73472153f 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v @@ -74,10 +74,10 @@ module \$_DFFSRE_PPPP_ (D, Q, C, E, R, S); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S)); endmodule -// Latch with Async reset, enable -module \$_DLATCH_PP0_ (input E, R, D, output Q); +// Latch with async set and reset +module \$_DLATCHSR_PPP_ (input E, S, R, D, output Q); parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - latchre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(R)); + latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(R), .S(S)); endmodule // The following techmap operation are not performed right now diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 46de90185..73de4beed 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -225,9 +225,9 @@ struct SynthQuickLogicPass : public ScriptPass { run("shregmap -minlen 8 -maxlen 8"); } if (family == "qlf_k6n10") { - run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_PP?_ 0 -cell $_DFFE_PP?P_ 0 -cell $_DFFSR_PPP_ 0 -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_PP0_ 0"); + run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_PP?_ 0 -cell $_DFFE_PP?P_ 0 -cell $_DFFSR_PPP_ 0 -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCHSR_PPP_ 0"); // In case we add clock inversion in the future. - // run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_DFFSR_?PP_ 0 -cell $_DFFSRE_?PPP_ 0 -cell $_DLATCH_PP0_ 0"); + // run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_DFFSR_?PP_ 0 -cell $_DFFSRE_?PPP_ 0 -cell $_DLATCH_PPP_ 0"); } else { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); } diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 5c554d670..b64701e37 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -1,7 +1,7 @@ -# The latch test is disabled as latches are not supported in the qlf_k4n8/qlf_k6n10. # The bram test will be enable in a future PR after it's been fixed. TESTS = dffs \ + latches \ shreg \ iob_no_flatten \ full_adder \ diff --git a/ql-qlf-plugin/tests/latches/latches.tcl b/ql-qlf-plugin/tests/latches/latches.tcl index 6b9f1f4b6..d5821a628 100644 --- a/ql-qlf-plugin/tests/latches/latches.tcl +++ b/ql-qlf-plugin/tests/latches/latches.tcl @@ -2,27 +2,46 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands -#read_verilog $::env(DESIGN_TOP).v -read_verilog latches.v +read_verilog $::env(DESIGN_TOP).v design -save read +# Tests for qlf_k6n10 family # LATCHP -synth_quicklogic -family qlf_k4n8 -top latchp +design -load read +synth_quicklogic -family qlf_k6n10 -top latchp yosys cd latchp stat -select -assert-count 1 t:\$_DLATCH_P_ +select -assert-count 1 t:latchsre # LATCHN design -load read synth_quicklogic -family qlf_k6n10 -top latchn yosys cd latchn stat -select -assert-count 1 t:\$_DLATCH_N_ +select -assert-count 1 t:\$lut +select -assert-count 1 t:latchsre -# LATCHP test for qlf_k6n10 family +# LATCHSRE design -load read -synth_quicklogic -family qlf_k4n8 -top latchp_noinit -yosys cd latchp_noinit +synth_quicklogic -family qlf_k6n10 -top my_latchsre +yosys cd my_latchsre stat -select -assert-count 1 t:\$_DLATCH_P_ +select -assert-count 2 t:\$lut +select -assert-count 1 t:latchsre + +## Tests for qlf_k4n8 family +## Currently disabled cause latch aren't supported +## in synth_quicklogic for that family +## LATCHP +#synth_quicklogic -family qlf_k4n8 -top latchp +#yosys cd latchp +#stat +#select -assert-count 1 t:\$_DLATCH_P_ +# +## LATCHP no init +#design -load read +#synth_quicklogic -family qlf_k4n8 -top latchp_noinit +#yosys cd latchp_noinit +#stat +#select -assert-count 1 t:\$_DLATCH_P_ diff --git a/ql-qlf-plugin/tests/latches/latches.v b/ql-qlf-plugin/tests/latches/latches.v index 8b35992c4..4cc26b027 100644 --- a/ql-qlf-plugin/tests/latches/latches.v +++ b/ql-qlf-plugin/tests/latches/latches.v @@ -17,7 +17,7 @@ module latchn ( always @* if (!en) q <= d; endmodule -module latchsr ( +module my_latchsre ( input d, clk, en, From 3778dc59e8ad6d31069b81432b6dd5f1063bfb32 Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 2 Jun 2021 14:42:32 +0200 Subject: [PATCH 319/845] Formatting Signed-off-by: samycharas --- .../ql-qlf-k6n10/qlf_k6n10_cells_sim.v | 284 +++++++++--------- ql-qlf-plugin/synth_quicklogic.cc | 6 +- 2 files changed, 145 insertions(+), 145 deletions(-) diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v index 6239edc18..2d415b65f 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v @@ -1,13 +1,13 @@ (* abc9_box, lib_whitebox *) module adder( - output sumout, - output cout, - input a, - input b, - input cin + output sumout, + output cout, + input a, + input b, + input cin ); - assign sumout = a ^ b ^ cin; - assign cout = (a & b) | ((a | b) & cin); + assign sumout = a ^ b ^ cin; + assign cout = (a & b) | ((a | b) & cin); endmodule @@ -15,50 +15,50 @@ endmodule (* abc9_lut=1, lib_whitebox *) module frac_lut6( - input [0:5] in, - output [0:3] lut4_out, - output [0:1] lut5_out, - output lut6_out + input [0:5] in, + output [0:3] lut4_out, + output [0:1] lut5_out, + output lut6_out ); - parameter [0:63] LUT = 0; - // Effective LUT input - wire [0:5] li = in; - - // Output function - wire [0:31] s1 = li[0] ? - {LUT[0] , LUT[2] , LUT[4] , LUT[6] , LUT[8] , LUT[10], LUT[12], LUT[14], - LUT[16], LUT[18], LUT[20], LUT[22], LUT[24], LUT[26], LUT[28], LUT[30], - LUT[32], LUT[34], LUT[36], LUT[38], LUT[40], LUT[42], LUT[44], LUT[46], - LUT[48], LUT[50], LUT[52], LUT[54], LUT[56], LUT[58], LUT[60], LUT[62]}: - {LUT[1] , LUT[3] , LUT[5] , LUT[7] , LUT[9] , LUT[11], LUT[13], LUT[15], - LUT[17], LUT[19], LUT[21], LUT[23], LUT[25], LUT[27], LUT[29], LUT[31], - LUT[33], LUT[35], LUT[37], LUT[39], LUT[41], LUT[43], LUT[45], LUT[47], - LUT[49], LUT[51], LUT[53], LUT[55], LUT[57], LUT[59], LUT[61], LUT[63]}; - - wire [0:15] s2 = li[1] ? - {s1[0] , s1[2] , s1[4] , s1[6] , s1[8] , s1[10], s1[12], s1[14], - s1[16], s1[18], s1[20], s1[22], s1[24], s1[26], s1[28], s1[30]}: - {s1[1] , s1[3] , s1[5] , s1[7] , s1[9] , s1[11], s1[13], s1[15], - s1[17], s1[19], s1[21], s1[23], s1[25], s1[27], s1[29], s1[31]}; - - wire [0:7] s3 = li[2] ? - {s2[0], s2[2], s2[4], s2[6], s2[8], s2[10], s2[12], s2[14]}: - {s2[1], s2[3], s2[5], s2[7], s2[9], s2[11], s2[13], s2[15]}; - - wire [0:3] s4 = li[3] ? {s3[0], s3[2], s3[4], s3[6]}: - {s3[1], s3[3], s3[5], s3[7]}; - - wire [0:1] s5 = li[4] ? {s4[0], s4[2]} : {s4[1], s4[3]}; - - assign lut4_out[0] = s4[0]; - assign lut4_out[1] = s4[1]; - assign lut4_out[2] = s4[2]; - assign lut4_out[3] = s4[3]; - - assign lut5_out[0] = s0[0]; - assign lut5_out[1] = s5[1]; - - assign lut6_out = li[5] ? s5[0] : s5[1]; + parameter [0:63] LUT = 0; + // Effective LUT input + wire [0:5] li = in; + + // Output function + wire [0:31] s1 = li[0] ? + {LUT[0] , LUT[2] , LUT[4] , LUT[6] , LUT[8] , LUT[10], LUT[12], LUT[14], + LUT[16], LUT[18], LUT[20], LUT[22], LUT[24], LUT[26], LUT[28], LUT[30], + LUT[32], LUT[34], LUT[36], LUT[38], LUT[40], LUT[42], LUT[44], LUT[46], + LUT[48], LUT[50], LUT[52], LUT[54], LUT[56], LUT[58], LUT[60], LUT[62]}: + {LUT[1] , LUT[3] , LUT[5] , LUT[7] , LUT[9] , LUT[11], LUT[13], LUT[15], + LUT[17], LUT[19], LUT[21], LUT[23], LUT[25], LUT[27], LUT[29], LUT[31], + LUT[33], LUT[35], LUT[37], LUT[39], LUT[41], LUT[43], LUT[45], LUT[47], + LUT[49], LUT[51], LUT[53], LUT[55], LUT[57], LUT[59], LUT[61], LUT[63]}; + + wire [0:15] s2 = li[1] ? + {s1[0] , s1[2] , s1[4] , s1[6] , s1[8] , s1[10], s1[12], s1[14], + s1[16], s1[18], s1[20], s1[22], s1[24], s1[26], s1[28], s1[30]}: + {s1[1] , s1[3] , s1[5] , s1[7] , s1[9] , s1[11], s1[13], s1[15], + s1[17], s1[19], s1[21], s1[23], s1[25], s1[27], s1[29], s1[31]}; + + wire [0:7] s3 = li[2] ? + {s2[0], s2[2], s2[4], s2[6], s2[8], s2[10], s2[12], s2[14]}: + {s2[1], s2[3], s2[5], s2[7], s2[9], s2[11], s2[13], s2[15]}; + + wire [0:3] s4 = li[3] ? {s3[0], s3[2], s3[4], s3[6]}: + {s3[1], s3[3], s3[5], s3[7]}; + + wire [0:1] s5 = li[4] ? {s4[0], s4[2]} : {s4[1], s4[3]}; + + assign lut4_out[0] = s4[0]; + assign lut4_out[1] = s4[1]; + assign lut4_out[2] = s4[2]; + assign lut4_out[3] = s4[3]; + + assign lut5_out[0] = s0[0]; + assign lut5_out[1] = s5[1]; + + assign lut6_out = li[5] ? s5[0] : s5[1]; endmodule @@ -274,30 +274,29 @@ endmodule (* abc9_flop, lib_whitebox *) module scff( - output reg Q, - input D, - input clk + output reg Q, + input D, + input clk ); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; + parameter [0:0] INIT = 1'b0; + initial Q = INIT; - always @(posedge clk) - Q <= D; + always @(posedge clk) + Q <= D; endmodule - module DP_RAM16K ( - input rclk, - input wclk, - input wen, - input ren, - input[8:0] waddr, - input[8:0] raddr, - input[31:0] d_in, - input[31:0] wenb, - output[31:0] d_out ); - - _dual_port_sram memory_0 ( + input rclk, + input wclk, + input wen, + input ren, + input[8:0] waddr, + input[8:0] raddr, + input[31:0] d_in, + input[31:0] wenb, + output[31:0] d_out ); + + _dual_port_sram memory_0 ( .wclk (wclk), .wen (wen), .waddr (waddr), @@ -311,81 +310,80 @@ module DP_RAM16K ( endmodule module _dual_port_sram ( - input wclk, - input wen, - input[8:0] waddr, - input[31:0] data_in, - input rclk, - input ren, - input[8:0] raddr, - input[31:0] wenb, - output[31:0] d_out ); - - // MODE 0: 512 x 32 - // MODE 1: 1024 x 16 - // MODE 2: 1024 x 8 - // MODE 3: 2048 x 4 - - integer i; - reg[31:0] ram[512:0]; - reg[31:0] internal; - // The memory is self initialised + input wclk, + input wen, + input[8:0] waddr, + input[31:0] data_in, + input rclk, + input ren, + input[8:0] raddr, + input[31:0] wenb, + output[31:0] d_out ); + + // MODE 0: 512 x 32 + // MODE 1: 1024 x 16 + // MODE 2: 1024 x 8 + // MODE 3: 2048 x 4 - initial begin - for (i=0;i<=512;i=i+1) - begin - ram[i] = 0; - end - internal = 31'b0; - end + integer i; + reg[31:0] ram[512:0]; + reg[31:0] internal; + // The memory is self initialised - - wire [31:0] WMASK; - - assign d_out = internal; - assign WMASK = wenb; - - always @(posedge wclk) begin - if(!wen) begin - if (WMASK[ 0]) ram[waddr][ 0] <= data_in[ 0]; - if (WMASK[ 1]) ram[waddr][ 1] <= data_in[ 1]; - if (WMASK[ 2]) ram[waddr][ 2] <= data_in[ 2]; - if (WMASK[ 3]) ram[waddr][ 3] <= data_in[ 3]; - if (WMASK[ 4]) ram[waddr][ 4] <= data_in[ 4]; - if (WMASK[ 5]) ram[waddr][ 5] <= data_in[ 5]; - if (WMASK[ 6]) ram[waddr][ 6] <= data_in[ 6]; - if (WMASK[ 7]) ram[waddr][ 7] <= data_in[ 7]; - if (WMASK[ 8]) ram[waddr][ 8] <= data_in[ 8]; - if (WMASK[ 9]) ram[waddr][ 9] <= data_in[ 9]; - if (WMASK[10]) ram[waddr][10] <= data_in[10]; - if (WMASK[11]) ram[waddr][11] <= data_in[11]; - if (WMASK[12]) ram[waddr][12] <= data_in[12]; - if (WMASK[13]) ram[waddr][13] <= data_in[13]; - if (WMASK[14]) ram[waddr][14] <= data_in[14]; - if (WMASK[15]) ram[waddr][15] <= data_in[15]; - if (WMASK[16]) ram[waddr][16] <= data_in[16]; - if (WMASK[17]) ram[waddr][17] <= data_in[17]; - if (WMASK[18]) ram[waddr][18] <= data_in[18]; - if (WMASK[19]) ram[waddr][19] <= data_in[19]; - if (WMASK[20]) ram[waddr][20] <= data_in[20]; - if (WMASK[21]) ram[waddr][21] <= data_in[21]; - if (WMASK[22]) ram[waddr][22] <= data_in[22]; - if (WMASK[23]) ram[waddr][23] <= data_in[23]; - if (WMASK[24]) ram[waddr][24] <= data_in[24]; - if (WMASK[25]) ram[waddr][25] <= data_in[25]; - if (WMASK[26]) ram[waddr][26] <= data_in[26]; - if (WMASK[27]) ram[waddr][27] <= data_in[27]; - if (WMASK[28]) ram[waddr][28] <= data_in[28]; - if (WMASK[29]) ram[waddr][29] <= data_in[29]; - if (WMASK[30]) ram[waddr][30] <= data_in[30]; - if (WMASK[31]) ram[waddr][31] <= data_in[31]; - end - end - - always @(posedge rclk) begin - if(!ren) begin - internal <= ram[raddr]; - end - end + initial begin + for (i=0;i<=512;i=i+1) + begin + ram[i] = 0; + end + internal = 31'b0; + end + + wire [31:0] WMASK; + + assign d_out = internal; + assign WMASK = wenb; + + always @(posedge wclk) begin + if(!wen) begin + if (WMASK[ 0]) ram[waddr][ 0] <= data_in[ 0]; + if (WMASK[ 1]) ram[waddr][ 1] <= data_in[ 1]; + if (WMASK[ 2]) ram[waddr][ 2] <= data_in[ 2]; + if (WMASK[ 3]) ram[waddr][ 3] <= data_in[ 3]; + if (WMASK[ 4]) ram[waddr][ 4] <= data_in[ 4]; + if (WMASK[ 5]) ram[waddr][ 5] <= data_in[ 5]; + if (WMASK[ 6]) ram[waddr][ 6] <= data_in[ 6]; + if (WMASK[ 7]) ram[waddr][ 7] <= data_in[ 7]; + if (WMASK[ 8]) ram[waddr][ 8] <= data_in[ 8]; + if (WMASK[ 9]) ram[waddr][ 9] <= data_in[ 9]; + if (WMASK[10]) ram[waddr][10] <= data_in[10]; + if (WMASK[11]) ram[waddr][11] <= data_in[11]; + if (WMASK[12]) ram[waddr][12] <= data_in[12]; + if (WMASK[13]) ram[waddr][13] <= data_in[13]; + if (WMASK[14]) ram[waddr][14] <= data_in[14]; + if (WMASK[15]) ram[waddr][15] <= data_in[15]; + if (WMASK[16]) ram[waddr][16] <= data_in[16]; + if (WMASK[17]) ram[waddr][17] <= data_in[17]; + if (WMASK[18]) ram[waddr][18] <= data_in[18]; + if (WMASK[19]) ram[waddr][19] <= data_in[19]; + if (WMASK[20]) ram[waddr][20] <= data_in[20]; + if (WMASK[21]) ram[waddr][21] <= data_in[21]; + if (WMASK[22]) ram[waddr][22] <= data_in[22]; + if (WMASK[23]) ram[waddr][23] <= data_in[23]; + if (WMASK[24]) ram[waddr][24] <= data_in[24]; + if (WMASK[25]) ram[waddr][25] <= data_in[25]; + if (WMASK[26]) ram[waddr][26] <= data_in[26]; + if (WMASK[27]) ram[waddr][27] <= data_in[27]; + if (WMASK[28]) ram[waddr][28] <= data_in[28]; + if (WMASK[29]) ram[waddr][29] <= data_in[29]; + if (WMASK[30]) ram[waddr][30] <= data_in[30]; + if (WMASK[31]) ram[waddr][31] <= data_in[31]; + end + end + always @(posedge rclk) begin + if(!ren) begin + internal <= ram[raddr]; + end + end endmodule + diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 73de4beed..ff6632074 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -225,9 +225,11 @@ struct SynthQuickLogicPass : public ScriptPass { run("shregmap -minlen 8 -maxlen 8"); } if (family == "qlf_k6n10") { - run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_PP?_ 0 -cell $_DFFE_PP?P_ 0 -cell $_DFFSR_PPP_ 0 -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCHSR_PPP_ 0"); + run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_PP?_ 0 -cell $_DFFE_PP?P_ 0 -cell $_DFFSR_PPP_ 0 -cell $_DFFSRE_PPPP_ 0 -cell " + "$_DLATCHSR_PPP_ 0"); // In case we add clock inversion in the future. - // run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_DFFSR_?PP_ 0 -cell $_DFFSRE_?PPP_ 0 -cell $_DLATCH_PPP_ 0"); + // run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_DFFSR_?PP_ 0 -cell $_DFFSRE_?PPP_ 0 -cell + // $_DLATCH_PPP_ 0"); } else { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); } From 2f3440efb679ec0a90e9ed4655a8d54b26775ae2 Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Wed, 2 Jun 2021 10:05:47 +0530 Subject: [PATCH 320/845] For k6n10 device, adding async2sync pass as device does not have async reset support. Also adding a condition to do ABC optimization which is done by default but can be disabled by a command-line option Signed-off-by: Lalit Narain Sharma Rebasing with master --- ql-qlf-plugin/synth_quicklogic.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index ff6632074..fc86fef46 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -243,10 +243,12 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_luts")) { - if (family == "qlf_k6n10") { - run("abc -lut 6 "); - } else { - run("abc -lut 4 "); + if(abcOpt) { + if (family == "qlf_k6n10") { + run("abc -lut 6 "); + } else { + run("abc -lut 4 "); + } } run("clean"); run("opt_lut"); From df9e618e2c1ee3af26e89c5e5f000e329fd18a0d Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Wed, 2 Jun 2021 10:23:17 +0530 Subject: [PATCH 321/845] Updating formatting for newly added statement Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/synth_quicklogic.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index fc86fef46..7bb2210c9 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -243,7 +243,7 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_luts")) { - if(abcOpt) { + if (abcOpt) { if (family == "qlf_k6n10") { run("abc -lut 6 "); } else { From 5d099f1e367fc0e00fdb107a244e6d1366ff8fca Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 2 Jun 2021 15:40:48 +0200 Subject: [PATCH 322/845] Add QL_DSP plugin Signed-off-by: samycharas --- Makefile | 2 +- ql-dsp-plugin/Makefile | 3 + ql-dsp-plugin/ql-dsp-pm.h | 1871 +++++++++++++++++ ql-dsp-plugin/ql-dsp.cc | 164 ++ ql-dsp-plugin/tests/Makefile | 1 + ql-dsp-plugin/tests/README.md | 10 + ql-qlf-plugin/Makefile | 1 + .../ql-qlf-k6n10/qlf_k6n10_cells_sim.v | 56 + .../ql-qlf-k6n10/qlf_k6n10_dsp_map.v | 19 + ql-qlf-plugin/synth_quicklogic.cc | 27 +- 10 files changed, 2152 insertions(+), 2 deletions(-) create mode 100644 ql-dsp-plugin/Makefile create mode 100644 ql-dsp-plugin/ql-dsp-pm.h create mode 100644 ql-dsp-plugin/ql-dsp.cc create mode 100644 ql-dsp-plugin/tests/Makefile create mode 100644 ql-dsp-plugin/tests/README.md create mode 100644 ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v diff --git a/Makefile b/Makefile index 180acdb02..fe0219c30 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf ql-dsp PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/ql-dsp-plugin/Makefile b/ql-dsp-plugin/Makefile new file mode 100644 index 000000000..29c87d39c --- /dev/null +++ b/ql-dsp-plugin/Makefile @@ -0,0 +1,3 @@ +NAME = ql-dsp +SOURCES = ql-dsp.cc +include ../Makefile_plugin.common diff --git a/ql-dsp-plugin/ql-dsp-pm.h b/ql-dsp-plugin/ql-dsp-pm.h new file mode 100644 index 000000000..6a68e1c7c --- /dev/null +++ b/ql-dsp-plugin/ql-dsp-pm.h @@ -0,0 +1,1871 @@ +struct ql_dsp_pm { + Module *module; + SigMap sigmap; + std::function on_accept; + bool setup_done; + bool generate_mode; + int accept_cnt; + + uint32_t rngseed; + int rng(unsigned int n) + { + rngseed ^= rngseed << 13; + rngseed ^= rngseed >> 17; + rngseed ^= rngseed << 5; + return rngseed % n; + } + + typedef std::tuple<> index_0_key_type; + typedef std::tuple index_0_value_type; + dict> index_0; + typedef std::tuple index_6_key_type; + typedef std::tuple index_6_value_type; + dict> index_6; + typedef std::tuple index_8_key_type; + typedef std::tuple index_8_value_type; + dict> index_8; + typedef std::tuple index_16_key_type; + typedef std::tuple index_16_value_type; + dict> index_16; + typedef std::tuple index_20_key_type; + typedef std::tuple index_20_value_type; + dict> index_20; + dict> sigusers; + pool blacklist_cells; + pool autoremove_cells; + dict rollback_cache; + int rollback; + + struct state_ql_dsp_t { + Cell *add; + IdString addAB; + SigSpec argD; + SigSpec argQ; + bool argSdff; + bool cd_signed; + SigBit clock; + bool clock_pol; + Cell *ff; + Cell *ffA; + Cell *ffB; + Cell *ffCD; + Cell *ffFJKG; + Cell *ffH; + Cell *ffO; + Cell *mul; + Cell *mux; + IdString muxAB; + bool o_lo; + SigSpec sigA; + SigSpec sigB; + SigSpec sigCD; + SigSpec sigH; + SigSpec sigO; + } st_ql_dsp; + + struct udata_ql_dsp_t { + Cell *dff; + SigSpec dffD; + SigSpec dffQ; + SigBit dffclock; + bool dffclock_pol; + } ud_ql_dsp; + + IdString id_b_A{"\\A"}; + IdString id_b_ARST{"\\ARST"}; + IdString id_b_ARST_POLARITY{"\\ARST_POLARITY"}; + IdString id_b_A_REG{"\\A_REG"}; + IdString id_b_A_SIGNED{"\\A_SIGNED"}; + IdString id_b_B{"\\B"}; + IdString id_b_B_REG{"\\B_REG"}; + IdString id_b_B_SIGNED{"\\B_SIGNED"}; + IdString id_b_CLK{"\\CLK"}; + IdString id_b_CLK_POLARITY{"\\CLK_POLARITY"}; + IdString id_b_C_REG{"\\C_REG"}; + IdString id_b_D{"\\D"}; + IdString id_b_D_REG{"\\D_REG"}; + IdString id_b_EN{"\\EN"}; + IdString id_b_O{"\\O"}; + IdString id_b_Q{"\\Q"}; + IdString id_b_QL_DSP{"\\QL_DSP"}; + IdString id_b_SRST{"\\SRST"}; + IdString id_b_SRST_VALUE{"\\SRST_VALUE"}; + IdString id_b_ENABLE_DSP{"\\ENABLE_DSP"}; + IdString id_b_Y{"\\Y"}; + IdString id_b_init{"\\init"}; + IdString id_b_keep{"\\keep"}; + IdString id_d_add{"$add"}; + IdString id_d_dff{"$dff"}; + IdString id_d_dffe{"$dffe"}; + IdString id_d_mul{"$mul"}; + IdString id_d_mux{"$mux"}; + IdString id_d_sdff{"$sdff"}; + IdString id_d_sdffce{"$sdffce"}; + + void add_siguser(const SigSpec &sig, Cell *cell) + { + for (auto bit : sigmap(sig)) { + if (bit.wire == nullptr) + continue; + sigusers[bit].insert(cell); + } + } + + void blacklist(Cell *cell) + { + if (cell != nullptr && blacklist_cells.insert(cell).second) { + auto ptr = rollback_cache.find(cell); + if (ptr == rollback_cache.end()) + return; + int rb = ptr->second; + if (rollback == 0 || rollback > rb) + rollback = rb; + } + } + + void autoremove(Cell *cell) + { + if (cell != nullptr) { + autoremove_cells.insert(cell); + blacklist(cell); + } + } + + SigSpec port(Cell *cell, IdString portname) { return sigmap(cell->getPort(portname)); } + + SigSpec port(Cell *cell, IdString portname, const SigSpec &defval) { return sigmap(cell->connections_.at(portname, defval)); } + + Const param(Cell *cell, IdString paramname) { return cell->getParam(paramname); } + + Const param(Cell *cell, IdString paramname, const Const &defval) { return cell->parameters.at(paramname, defval); } + + int nusers(const SigSpec &sig) + { + pool users; + for (auto bit : sigmap(sig)) + for (auto user : sigusers[bit]) + users.insert(user); + return GetSize(users); + } + + ql_dsp_pm(Module *module, const vector &cells) + : module(module), sigmap(module), setup_done(false), generate_mode(false), rngseed(12345678) + { + setup(cells); + } + + ql_dsp_pm(Module *module) : module(module), sigmap(module), setup_done(false), generate_mode(false), rngseed(12345678) {} + + void setup(const vector &cells) + { + ud_ql_dsp.dff = nullptr; + ud_ql_dsp.dffD = SigSpec(); + ud_ql_dsp.dffQ = SigSpec(); + ud_ql_dsp.dffclock = SigBit(); + ud_ql_dsp.dffclock_pol = bool(); + log_assert(!setup_done); + setup_done = true; + for (auto port : module->ports) + add_siguser(module->wire(port), nullptr); + for (auto cell : module->cells()) + for (auto &conn : cell->connections()) + add_siguser(conn.second, cell); + for (auto cell : cells) { + do { + Cell *mul = cell; + index_0_value_type value; + std::get<0>(value) = cell; + if (!(mul->type.in(id_d_mul, id_b_QL_DSP))) + continue; + if (!(GetSize(mul->getPort(id_b_A)) + GetSize(mul->getPort(id_b_B)) > 10)) + continue; + index_0_key_type key; + index_0[key].push_back(value); + } while (0); + do { + Cell *add = cell; + index_6_value_type value; + std::get<0>(value) = cell; + if (!(add->type.in(id_d_add))) + continue; + vector _pmg_choices_AB = {id_b_A, id_b_B}; + for (const IdString &AB : _pmg_choices_AB) { + std::get<1>(value) = AB; + if (!(nusers(port(add, AB)) == 2)) + continue; + index_6_key_type key; + std::get<0>(key) = port(add, AB)[0]; + index_6[key].push_back(value); + } + } while (0); + do { + Cell *mux = cell; + index_8_value_type value; + std::get<0>(value) = cell; + if (!(mux->type == id_d_mux)) + continue; + vector _pmg_choices_AB = {id_b_A, id_b_B}; + for (const IdString &AB : _pmg_choices_AB) { + std::get<1>(value) = AB; + if (!(nusers(port(mux, AB)) == 2)) + continue; + index_8_key_type key; + std::get<0>(key) = port(mux, AB); + index_8[key].push_back(value); + } + } while (0); + do { + Cell *ff = cell; + index_16_value_type value; + std::get<0>(value) = cell; + if (!(ff->type.in(id_d_dff, id_d_dffe))) + continue; + if (!(param(ff, id_b_CLK_POLARITY).as_bool())) + continue; + int &offset = std::get<1>(value); + for (offset = 0; offset < GetSize(port(ff, id_b_D)); offset++) { + index_16_key_type key; + std::get<0>(key) = port(ff, id_b_Q)[offset]; + index_16[key].push_back(value); + } + } while (0); + do { + Cell *ff = cell; + index_20_value_type value; + std::get<0>(value) = cell; + if (!(ff->type.in(id_d_dff, id_d_dffe, id_d_sdff, id_d_sdffce))) + continue; + if (!(param(ff, id_b_CLK_POLARITY).as_bool())) + continue; + int &offset = std::get<1>(value); + for (offset = 0; offset < GetSize(port(ff, id_b_D)); offset++) { + index_20_key_type key; + std::get<0>(key) = port(ff, id_b_D)[offset]; + index_20[key].push_back(value); + } + } while (0); + } + } + + ~ql_dsp_pm() + { + for (auto cell : autoremove_cells) + module->remove(cell); + } + + int run_ql_dsp(std::function on_accept_f) + { + log_assert(setup_done); + accept_cnt = 0; + on_accept = on_accept_f; + rollback = 0; + st_ql_dsp.add = nullptr; + st_ql_dsp.addAB = IdString(); + st_ql_dsp.argD = SigSpec(); + st_ql_dsp.argQ = SigSpec(); + st_ql_dsp.argSdff = bool(); + st_ql_dsp.cd_signed = bool(); + st_ql_dsp.clock = SigBit(); + st_ql_dsp.clock_pol = bool(); + st_ql_dsp.ff = nullptr; + st_ql_dsp.ffA = nullptr; + st_ql_dsp.ffB = nullptr; + st_ql_dsp.ffCD = nullptr; + st_ql_dsp.ffFJKG = nullptr; + st_ql_dsp.ffH = nullptr; + st_ql_dsp.ffO = nullptr; + st_ql_dsp.mul = nullptr; + st_ql_dsp.mux = nullptr; + st_ql_dsp.muxAB = IdString(); + st_ql_dsp.o_lo = bool(); + st_ql_dsp.sigA = SigSpec(); + st_ql_dsp.sigB = SigSpec(); + st_ql_dsp.sigCD = SigSpec(); + st_ql_dsp.sigH = SigSpec(); + st_ql_dsp.sigO = SigSpec(); + block_0(1); + log_assert(rollback_cache.empty()); + return accept_cnt; + } + + int run_ql_dsp(std::function on_accept_f) + { + return run_ql_dsp([&]() { on_accept_f(*this); }); + } + + int run_ql_dsp() + { + return run_ql_dsp([]() {}); + } + + void block_subpattern_ql_dsp_(int recursion) { block_0(recursion); } + void block_subpattern_ql_dsp_in_dffe(int recursion) { block_15(recursion); } + void block_subpattern_ql_dsp_out_dffe(int recursion) { block_19(recursion); } + + // passes/pmgen/ql_dsp.pmg:20 + void block_0(int recursion YS_MAYBE_UNUSED) + { + Cell *&mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + Cell *_pmg_backup_mul = mul; + + index_0_key_type key; + auto cells_ptr = index_0.find(key); + + if (cells_ptr != index_0.end()) { + const vector &cells = cells_ptr->second; + for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { + mul = std::get<0>(cells[_pmg_idx]); + if (blacklist_cells.count(mul)) + continue; + auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); + block_1(recursion + 1); + if (rollback_ptr.second) + rollback_cache.erase(rollback_ptr.first); + if (rollback) { + if (rollback != recursion) { + mul = _pmg_backup_mul; + return; + } + rollback = 0; + } + } + } + + mul = nullptr; + mul = _pmg_backup_mul; + } + + // passes/pmgen/ql_dsp.pmg:25 + void block_1(int recursion YS_MAYBE_UNUSED) + { + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_2(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + auto unextend = [](const SigSpec &sig) { + int i; + for (i = GetSize(sig) - 1; i > 0; i--) + if (sig[i] != sig[i - 1]) + break; + // Do not remove non-const sign bit + if (sig[i].wire) + ++i; + return sig.extract(0, i); + }; + sigA = unextend(port(mul, id_b_A)); + sigB = unextend(port(mul, id_b_B)); + SigSpec O; + if (mul->type == id_d_mul) + O = mul->getPort(id_b_Y); + else if (mul->type == id_b_QL_DSP) + O = mul->getPort(id_b_O); + else + log_abort(); + if (GetSize(O) <= 10) + reject; + // Only care about those bits that are used + int i; + for (i = 0; i < GetSize(O); i++) { + if (nusers(O[i]) <= 1) + break; + sigH.append(O[i]); + } + // This sigM could have no users if downstream sinks (e.g. id_d_add) is + // narrower than id_d_mul result, for example + if (i == 0) + reject; + log_assert(nusers(O.extract_end(i)) <= 1); + + block_2(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + sigA = SigSpec(); + sigB = SigSpec(); + sigH = SigSpec(); + } + + // passes/pmgen/ql_dsp.pmg:63 + void block_2(int recursion YS_MAYBE_UNUSED) + { + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_sigA = sigA; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_3(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + if (mul->type != id_b_QL_DSP || !param(mul, id_b_A_REG).as_bool()) { + argQ = sigA; + subpattern(in_dffe); + if (dff) { + ffA = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigA = dffD; + } + } + + block_3(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + sigA = _pmg_backup_sigA; + argQ = SigSpec(); + clock = SigBit(); + clock_pol = bool(); + ffA = nullptr; + } + + // passes/pmgen/ql_dsp.pmg:76 + void block_3(int recursion YS_MAYBE_UNUSED) + { + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_argQ = argQ; + SigBit _pmg_backup_clock = clock; + bool _pmg_backup_clock_pol = clock_pol; + SigSpec _pmg_backup_sigB = sigB; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_4(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + if (mul->type != id_b_QL_DSP || !param(mul, id_b_B_REG).as_bool()) { + argQ = sigB; + subpattern(in_dffe); + if (dff) { + ffB = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigB = dffD; + } + } + + block_4(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + argQ = _pmg_backup_argQ; + clock = _pmg_backup_clock; + clock_pol = _pmg_backup_clock_pol; + sigB = _pmg_backup_sigB; + ffB = nullptr; + } + + // passes/pmgen/ql_dsp.pmg:89 + void block_4(int recursion YS_MAYBE_UNUSED) + { + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigBit _pmg_backup_clock = clock; + bool _pmg_backup_clock_pol = clock_pol; + SigSpec _pmg_backup_sigH = sigH; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_5(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + if (nusers(sigH) == 2 && (mul->type != id_b_QL_DSP)) { + argD = sigH; + argSdff = false; + subpattern(out_dffe); + if (dff) { + // F/J/K/G do not have a CE-like (hold) input + if (dff->hasPort(id_b_EN)) + goto reject_ffFJKG; + // Reset signal of F/J (IRSTTOP) and K/G (IRSTBOT) + // shared with A and B + if (ffA) { + if (ffA->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) + goto reject_ffFJKG; + if (ffA->hasPort(id_b_ARST)) { + if (port(ffA, id_b_ARST) != port(dff, id_b_ARST)) + goto reject_ffFJKG; + if (param(ffA, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) + goto reject_ffFJKG; + } + } + if (ffB) { + if (ffB->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) + goto reject_ffFJKG; + if (ffB->hasPort(id_b_ARST)) { + if (port(ffB, id_b_ARST) != port(dff, id_b_ARST)) + goto reject_ffFJKG; + if (param(ffB, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) + goto reject_ffFJKG; + } + } + ffFJKG = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigH = dffQ; + reject_ffFJKG:; + } + } + + block_5(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + clock = _pmg_backup_clock; + clock_pol = _pmg_backup_clock_pol; + sigH = _pmg_backup_sigH; + argD = SigSpec(); + argSdff = bool(); + ffFJKG = nullptr; + } + + // passes/pmgen/ql_dsp.pmg:134 + void block_5(int recursion YS_MAYBE_UNUSED) + { + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; + SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_argD = argD; + bool _pmg_backup_argSdff = argSdff; + SigBit _pmg_backup_clock = clock; + bool _pmg_backup_clock_pol = clock_pol; + SigSpec _pmg_backup_sigH = sigH; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_6(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + if (ffFJKG && nusers(sigH) == 2 && (mul->type != id_b_QL_DSP)) { + argD = sigH; + argSdff = false; + subpattern(out_dffe); + if (dff) { + // H does not have a CE-like (hold) input + if (dff->hasPort(id_b_EN)) + goto reject_ffH; + // Reset signal of H (IRSTBOT) shared with B + if (ffB->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) + goto reject_ffH; + if (ffB->hasPort(id_b_ARST)) { + if (port(ffB, id_b_ARST) != port(dff, id_b_ARST)) + goto reject_ffH; + if (param(ffB, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) + goto reject_ffH; + } + ffH = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigH = dffQ; + reject_ffH:; + } + } + sigO = sigH; + + block_6(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + argD = _pmg_backup_argD; + argSdff = _pmg_backup_argSdff; + clock = _pmg_backup_clock; + clock_pol = _pmg_backup_clock_pol; + sigH = _pmg_backup_sigH; + ffH = nullptr; + sigO = SigSpec(); + } + + // passes/pmgen/ql_dsp.pmg:167 + void block_6(int recursion YS_MAYBE_UNUSED) + { + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; + Cell *&add YS_MAYBE_UNUSED = st_ql_dsp.add; + IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + Cell *_pmg_backup_add = add; + + if (!(mul->type != id_b_QL_DSP || (param(mul, id_b_ENABLE_DSP).as_int() == 1))) { + add = nullptr; + block_7(recursion + 1); + add = _pmg_backup_add; + return; + } + + index_6_key_type key; + std::get<0>(key) = sigH[0]; + auto cells_ptr = index_6.find(key); + + if (cells_ptr != index_6.end()) { + const vector &cells = cells_ptr->second; + for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { + add = std::get<0>(cells[_pmg_idx]); + const IdString &AB YS_MAYBE_UNUSED = std::get<1>(cells[_pmg_idx]); + if (blacklist_cells.count(add)) + continue; + if (!(GetSize(port(add, AB)) <= GetSize(sigH))) + continue; + if (!(port(add, AB) == sigH.extract(0, GetSize(port(add, AB))))) + continue; + if (!(nusers(sigH.extract_end(GetSize(port(add, AB)))) <= 1)) + continue; + auto _pmg_backup_addAB = addAB; + addAB = AB; + auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); + block_7(recursion + 1); + addAB = _pmg_backup_addAB; + if (rollback_ptr.second) + rollback_cache.erase(rollback_ptr.first); + if (rollback) { + if (rollback != recursion) { + add = _pmg_backup_add; + return; + } + rollback = 0; + } + } + } + + add = nullptr; + block_7(recursion + 1); + add = _pmg_backup_add; + } + + // passes/pmgen/ql_dsp.pmg:182 + void block_7(int recursion YS_MAYBE_UNUSED) + { + Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; + const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; + SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; + SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_sigO = sigO; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_8(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + if (add) { + sigCD = port(add, addAB == id_b_A ? id_b_B : id_b_A); + cd_signed = param(add, addAB == id_b_A ? id_b_B_SIGNED : id_b_A_SIGNED).as_bool(); + int natural_mul_width = GetSize(sigA) + GetSize(sigB); + int actual_mul_width = GetSize(sigH); + int actual_acc_width = GetSize(sigCD); + if ((actual_acc_width > actual_mul_width) && (natural_mul_width > actual_mul_width)) + reject; + // If accumulator, check adder width and signedness + if (sigCD == sigH && (actual_acc_width != actual_mul_width) && + (param(mul, id_b_A_SIGNED).as_bool() != param(add, id_b_A_SIGNED).as_bool())) + reject; + sigO = port(add, id_b_Y); + } + + block_8(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + sigO = _pmg_backup_sigO; + cd_signed = bool(); + sigCD = SigSpec(); + } + + // passes/pmgen/ql_dsp.pmg:201 + void block_8(int recursion YS_MAYBE_UNUSED) + { + Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; + const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + const SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; + Cell *&mux YS_MAYBE_UNUSED = st_ql_dsp.mux; + IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + Cell *_pmg_backup_mux = mux; + + index_8_key_type key; + std::get<0>(key) = sigO; + auto cells_ptr = index_8.find(key); + + if (cells_ptr != index_8.end()) { + const vector &cells = cells_ptr->second; + for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { + mux = std::get<0>(cells[_pmg_idx]); + const IdString &AB YS_MAYBE_UNUSED = std::get<1>(cells[_pmg_idx]); + if (blacklist_cells.count(mux)) + continue; + auto _pmg_backup_muxAB = muxAB; + muxAB = AB; + auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); + block_9(recursion + 1); + muxAB = _pmg_backup_muxAB; + if (rollback_ptr.second) + rollback_cache.erase(rollback_ptr.first); + if (rollback) { + if (rollback != recursion) { + mux = _pmg_backup_mux; + return; + } + rollback = 0; + } + } + } + + mux = nullptr; + block_9(recursion + 1); + mux = _pmg_backup_mux; + } + + // passes/pmgen/ql_dsp.pmg:210 + void block_9(int recursion YS_MAYBE_UNUSED) + { + Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; + const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; + const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + const SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_sigO = sigO; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_10(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + if (mux) + sigO = port(mux, id_b_Y); + + block_10(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + sigO = _pmg_backup_sigO; + } + + // passes/pmgen/ql_dsp.pmg:215 + void block_10(int recursion YS_MAYBE_UNUSED) + { + Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; + const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; + const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; + SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&ffO YS_MAYBE_UNUSED = st_ql_dsp.ffO; + bool &o_lo YS_MAYBE_UNUSED = st_ql_dsp.o_lo; + SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; + SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_argD = argD; + bool _pmg_backup_argSdff = argSdff; + bool _pmg_backup_cd_signed = cd_signed; + SigBit _pmg_backup_clock = clock; + bool _pmg_backup_clock_pol = clock_pol; + SigSpec _pmg_backup_sigCD = sigCD; + SigSpec _pmg_backup_sigO = sigO; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_11(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + if (mul->type != id_b_QL_DSP || (param(mul, id_b_ENABLE_DSP).as_int() != 0)) { + dff = nullptr; + // First try entire sigO + if (nusers(sigO) == 2) { + argD = sigO; + argSdff = !mux; + subpattern(out_dffe); + } + // Otherwise try just its least significant 16 bits + if (!dff && GetSize(sigO) > 16) { + argD = sigO.extract(0, 16); + if (nusers(argD) == 2) { + argSdff = !mux; + subpattern(out_dffe); + o_lo = dff; + } + } + if (dff) { + ffO = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigO.replace(sigO.extract(0, GetSize(dffQ)), dffQ); + } + // Loading value into output register is not + // supported unless using accumulator + if (mux) { + if (sigCD != sigO) + reject; + sigCD = port(mux, muxAB == id_b_B ? id_b_A : id_b_B); + cd_signed = add && param(add, id_b_A_SIGNED).as_bool() && param(add, id_b_B_SIGNED).as_bool(); + } else if (dff && dff->hasPort(id_b_SRST)) { + if (sigCD != sigO) + reject; + sigCD = param(dff, id_b_SRST_VALUE); + cd_signed = add && param(add, id_b_A_SIGNED).as_bool() && param(add, id_b_B_SIGNED).as_bool(); + } + } + + block_11(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + argD = _pmg_backup_argD; + argSdff = _pmg_backup_argSdff; + cd_signed = _pmg_backup_cd_signed; + clock = _pmg_backup_clock; + clock_pol = _pmg_backup_clock_pol; + sigCD = _pmg_backup_sigCD; + sigO = _pmg_backup_sigO; + ffO = nullptr; + o_lo = bool(); + } + + // passes/pmgen/ql_dsp.pmg:267 + void block_11(int recursion YS_MAYBE_UNUSED) + { + Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; + const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; + Cell *const &ffO YS_MAYBE_UNUSED = st_ql_dsp.ffO; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; + const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; + const bool &o_lo YS_MAYBE_UNUSED = st_ql_dsp.o_lo; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; + SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&ffCD YS_MAYBE_UNUSED = st_ql_dsp.ffCD; + SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_argQ = argQ; + SigBit _pmg_backup_clock = clock; + bool _pmg_backup_clock_pol = clock_pol; + SigSpec _pmg_backup_sigCD = sigCD; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_12(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + if (!sigCD.empty() && sigCD != sigO && + (mul->type != id_b_QL_DSP || (!param(mul, id_b_C_REG).as_bool() && !param(mul, id_b_D_REG).as_bool()))) { + argQ = sigCD; + subpattern(in_dffe); + if (dff) { + // Reset signal of C (IRSTTOP) and D (IRSTBOT) + // shared with A and B + if (ffA) { + if (ffA->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) + goto reject_ffCD; + if (ffA->hasPort(id_b_ARST)) { + if (port(ffA, id_b_ARST) != port(dff, id_b_ARST)) + goto reject_ffCD; + if (param(ffA, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) + goto reject_ffCD; + } + } + if (ffB) { + if (ffB->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) + goto reject_ffCD; + if (ffB->hasPort(id_b_ARST)) { + if (port(ffB, id_b_ARST) != port(dff, id_b_ARST)) + goto reject_ffCD; + if (param(ffB, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) + goto reject_ffCD; + } + } + ffCD = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigCD = dffD; + reject_ffCD:; + } + } + + block_12(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + argQ = _pmg_backup_argQ; + clock = _pmg_backup_clock; + clock_pol = _pmg_backup_clock_pol; + sigCD = _pmg_backup_sigCD; + ffCD = nullptr; + } + + // passes/pmgen/ql_dsp.pmg:306 + void block_12(int recursion YS_MAYBE_UNUSED) + { + Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; + const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &ffCD YS_MAYBE_UNUSED = st_ql_dsp.ffCD; + Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; + Cell *const &ffO YS_MAYBE_UNUSED = st_ql_dsp.ffO; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; + const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; + const bool &o_lo YS_MAYBE_UNUSED = st_ql_dsp.o_lo; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; + SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_sigCD = sigCD; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_13(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + sigCD.extend_u0(32, cd_signed); + + block_13(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + sigCD = _pmg_backup_sigCD; + } + + // passes/pmgen/ql_dsp.pmg:310 + void block_13(int recursion YS_MAYBE_UNUSED) + { + Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; + const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; + Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; + Cell *const &ffCD YS_MAYBE_UNUSED = st_ql_dsp.ffCD; + Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; + Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; + Cell *const &ffO YS_MAYBE_UNUSED = st_ql_dsp.ffO; + Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; + Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; + const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; + const bool &o_lo YS_MAYBE_UNUSED = st_ql_dsp.o_lo; + const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; + const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; + const SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; + const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; + const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_14(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + accept; + + block_14(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + } + + void block_14(int recursion YS_MAYBE_UNUSED) {} + + // passes/pmgen/ql_dsp.pmg:319 + void block_15(int recursion YS_MAYBE_UNUSED) + { + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_16(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + dff = nullptr; + if (argQ.empty()) + reject; + for (auto c : argQ.chunks()) { + if (!c.wire) + reject; + if (c.wire->get_bool_attribute(id_b_keep)) + reject; + Const init = c.wire->attributes.at(id_b_init, State::Sx); + if (!init.is_fully_undef() && !init.is_fully_zero()) + reject; + } + + block_16(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + } + + // passes/pmgen/ql_dsp.pmg:334 + void block_16(int recursion YS_MAYBE_UNUSED) + { + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&ff YS_MAYBE_UNUSED = st_ql_dsp.ff; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + Cell *_pmg_backup_ff = ff; + + index_16_key_type key; + std::get<0>(key) = argQ[0]; + auto cells_ptr = index_16.find(key); + + if (cells_ptr != index_16.end()) { + const vector &cells = cells_ptr->second; + for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { + ff = std::get<0>(cells[_pmg_idx]); + const int &offset YS_MAYBE_UNUSED = std::get<1>(cells[_pmg_idx]); + if (blacklist_cells.count(ff)) + continue; + if (!(GetSize(port(ff, id_b_Q)) >= offset + GetSize(argQ))) + continue; + if (!(port(ff, id_b_Q).extract(offset, GetSize(argQ)) == argQ)) + continue; + auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); + block_17(recursion + 1); + if (rollback_ptr.second) + rollback_cache.erase(rollback_ptr.first); + if (rollback) { + if (rollback != recursion) { + ff = _pmg_backup_ff; + return; + } + rollback = 0; + } + } + } + + ff = nullptr; + ff = _pmg_backup_ff; + } + + // passes/pmgen/ql_dsp.pmg:347 + void block_17(int recursion YS_MAYBE_UNUSED) + { + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *const &ff YS_MAYBE_UNUSED = st_ql_dsp.ff; + SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_argD = argD; + SigSpec _pmg_backup_argQ = argQ; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_18(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + { + if (clock != SigBit()) { + if (port(ff, id_b_CLK) != clock) + reject; + if (param(ff, id_b_CLK_POLARITY).as_bool() != clock_pol) + reject; + } + SigSpec Q = port(ff, id_b_Q); + dff = ff; + dffclock = port(ff, id_b_CLK); + dffclock_pol = param(ff, id_b_CLK_POLARITY).as_bool(); + dffD = argQ; + argD = port(ff, id_b_D); + argQ = Q; + dffD.replace(argQ, argD); + } + + block_18(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + argD = _pmg_backup_argD; + argQ = _pmg_backup_argQ; + } + + void block_18(int recursion YS_MAYBE_UNUSED) {} + + // passes/pmgen/ql_dsp.pmg:372 + void block_19(int recursion YS_MAYBE_UNUSED) + { + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_20(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + dff = nullptr; + for (auto c : argD.chunks()) + if (c.wire->get_bool_attribute(id_b_keep)) + reject; + + block_20(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + } + + // passes/pmgen/ql_dsp.pmg:379 + void block_20(int recursion YS_MAYBE_UNUSED) + { + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *&ff YS_MAYBE_UNUSED = st_ql_dsp.ff; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + Cell *_pmg_backup_ff = ff; + + index_20_key_type key; + std::get<0>(key) = argD[0]; + auto cells_ptr = index_20.find(key); + + if (cells_ptr != index_20.end()) { + const vector &cells = cells_ptr->second; + for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { + ff = std::get<0>(cells[_pmg_idx]); + const int &offset YS_MAYBE_UNUSED = std::get<1>(cells[_pmg_idx]); + if (blacklist_cells.count(ff)) + continue; + if (!(argSdff || ff->type.in(id_d_dff, id_d_dffe))) + continue; + if (!(GetSize(port(ff, id_b_D)) >= offset + GetSize(argD))) + continue; + if (!(port(ff, id_b_D).extract(offset, GetSize(argD)) == argD)) + continue; + auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); + block_21(recursion + 1); + if (rollback_ptr.second) + rollback_cache.erase(rollback_ptr.first); + if (rollback) { + if (rollback != recursion) { + ff = _pmg_backup_ff; + return; + } + rollback = 0; + } + } + } + + ff = nullptr; + ff = _pmg_backup_ff; + } + + // passes/pmgen/ql_dsp.pmg:394 + void block_21(int recursion YS_MAYBE_UNUSED) + { + const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; + const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; + const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; + const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; + Cell *const &ff YS_MAYBE_UNUSED = st_ql_dsp.ff; + SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; + Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; + SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; + SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; + SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; + bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; + + SigSpec _pmg_backup_argQ = argQ; + +#define reject \ + do { \ + goto rollback_label; \ + } while (0) +#define accept \ + do { \ + accept_cnt++; \ + on_accept(); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define finish \ + do { \ + rollback = -1; \ + goto rollback_label; \ + } while (0) +#define branch \ + do { \ + block_22(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) +#define subpattern(pattern_name) \ + do { \ + block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ + if (rollback) \ + goto rollback_label; \ + } while (0) + if (ff) { + if (clock != SigBit()) { + if (port(ff, id_b_CLK) != clock) + reject; + if (param(ff, id_b_CLK_POLARITY).as_bool() != clock_pol) + reject; + } + SigSpec D = port(ff, id_b_D); + SigSpec Q = port(ff, id_b_Q); + argQ = argD; + argQ.replace(D, Q); + for (auto c : argQ.chunks()) { + Const init = c.wire->attributes.at(id_b_init, State::Sx); + if (!init.is_fully_undef() && !init.is_fully_zero()) + reject; + } + dff = ff; + dffQ = argQ; + dffclock = port(ff, id_b_CLK); + dffclock_pol = param(ff, id_b_CLK_POLARITY).as_bool(); + } + + block_22(recursion + 1); +#undef reject +#undef accept +#undef finish +#undef branch +#undef subpattern + + rollback_label: + YS_MAYBE_UNUSED; + + argQ = _pmg_backup_argQ; + } + + void block_22(int recursion YS_MAYBE_UNUSED) {} +}; diff --git a/ql-dsp-plugin/ql-dsp.cc b/ql-dsp-plugin/ql-dsp.cc new file mode 100644 index 000000000..db6cd334e --- /dev/null +++ b/ql-dsp-plugin/ql-dsp.cc @@ -0,0 +1,164 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2021 QuickLogic Corp. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "kernel/sigtools.h" +#include "kernel/yosys.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +#include "ql-dsp-pm.h" + +void create_ql_dsp(ql_dsp_pm &pm) +{ + auto &st = pm.st_ql_dsp; + + log("Checking %s.%s for QL DSP inference.\n", log_id(pm.module), log_id(st.mul)); + + log_debug("ffA: %s\n", log_id(st.ffA, "--")); + log_debug("ffB: %s\n", log_id(st.ffB, "--")); + log_debug("ffCD: %s\n", log_id(st.ffCD, "--")); + log_debug("mul: %s\n", log_id(st.mul, "--")); + log_debug("ffFJKG: %s\n", log_id(st.ffFJKG, "--")); + log_debug("ffH: %s\n", log_id(st.ffH, "--")); + log_debug("add: %s\n", log_id(st.add, "--")); + log_debug("mux: %s\n", log_id(st.mux, "--")); + log_debug("ffO: %s\n", log_id(st.ffO, "--")); + log_debug("\n"); + + if (GetSize(st.sigA) > 16) { + log(" input A (%s) is too large (%d > 16).\n", log_signal(st.sigA), GetSize(st.sigA)); + return; + } + + if (GetSize(st.sigB) > 16) { + log(" input B (%s) is too large (%d > 16).\n", log_signal(st.sigB), GetSize(st.sigB)); + return; + } + + if (GetSize(st.sigO) > 33) { + log(" adder/accumulator (%s) is too large (%d > 33).\n", log_signal(st.sigO), GetSize(st.sigO)); + return; + } + + if (GetSize(st.sigH) > 32) { + log(" output (%s) is too large (%d > 32).\n", log_signal(st.sigH), GetSize(st.sigH)); + return; + } + + Cell *cell = st.mul; + if (cell->type == ID($mul)) { + log(" replacing %s with QL_DSP cell.\n", log_id(st.mul->type)); + + cell = pm.module->addCell(NEW_ID, ID(QL_DSP)); + pm.module->swap_names(cell, st.mul); + } else + log_assert(cell->type == ID(QL_DSP)); + + // QL_DSP Input Interface + SigSpec A = st.sigA; + A.extend_u0(16, st.mul->getParam(ID::A_SIGNED).as_bool()); + log_assert(GetSize(A) == 16); + + SigSpec B = st.sigB; + B.extend_u0(16, st.mul->getParam(ID::B_SIGNED).as_bool()); + log_assert(GetSize(B) == 16); + + SigSpec CD = st.sigCD; + if (CD.empty()) + CD = RTLIL::Const(0, 32); + else + log_assert(GetSize(CD) == 32); + + cell->setPort(ID::A, A); + cell->setPort(ID::B, B); + cell->setPort(ID::C, CD.extract(16, 16)); + cell->setPort(ID::D, CD.extract(0, 16)); + + cell->setParam(ID(A_REG), st.ffA ? State::S1 : State::S0); + cell->setParam(ID(B_REG), st.ffB ? State::S1 : State::S0); + cell->setParam(ID(C_REG), st.ffCD ? State::S1 : State::S0); + cell->setParam(ID(D_REG), st.ffCD ? State::S1 : State::S0); + + // QL_DSP Output Interface + + SigSpec O = st.sigO; + int O_width = GetSize(O); + if (O_width == 33) { + log_assert(st.add); + // If we have a signed multiply-add, then perform sign extension + if (st.add->getParam(ID::A_SIGNED).as_bool() && st.add->getParam(ID::B_SIGNED).as_bool()) + pm.module->connect(O[32], O[31]); + else + cell->setPort(ID::CO, O[32]); + O.remove(O_width - 1); + } else + cell->setPort(ID::CO, pm.module->addWire(NEW_ID)); + log_assert(GetSize(O) <= 32); + if (GetSize(O) < 32) + O.append(pm.module->addWire(NEW_ID, 32 - GetSize(O))); + + cell->setPort(ID::O, O); + + cell->setParam(ID::A_SIGNED, st.mul->getParam(ID::A_SIGNED).as_bool()); + cell->setParam(ID::B_SIGNED, st.mul->getParam(ID::B_SIGNED).as_bool()); + + if (cell != st.mul) + pm.autoremove(st.mul); + else + pm.blacklist(st.mul); + pm.autoremove(st.ffFJKG); + pm.autoremove(st.add); +} + +struct QlDspPass : public Pass { + QlDspPass() : Pass("ql_dsp", "ql: map multipliers") {} + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" ql_dsp [options] [selection]\n"); + log("\n"); + log("Map multipliers ($mul/QL_DSP) and multiply-accumulate ($mul/QL_DSP + $add)\n"); + log("cells into ql DSP resources.\n"); + log("Pack input registers (A, B, {C,D}), pipeline registers\n"); + log("({F,J,K,G}, H), output registers (O -- full 32-bits or lower 16-bits only); \n"); + log("and post-adder into into the QL_DSP resource.\n"); + log("\n"); + log("Multiply-accumulate operations using the post-adder with feedback on the {C,D}\n"); + log("input will be folded into the DSP. In this scenario only, resetting the\n"); + log("the accumulator to an arbitrary value can be inferred to use the {C,D} input.\n"); + log("\n"); + } + void execute(std::vector args, RTLIL::Design *design) override + { + log_header(design, "Executing ql_DSP pass (map multipliers).\n"); + + size_t argidx; + for (argidx = 1; argidx < args.size(); argidx++) { + break; + } + extra_args(args, argidx, design); + + for (auto module : design->selected_modules()) + ql_dsp_pm(module, module->selected_cells()).run_ql_dsp(create_ql_dsp); + } +} QlDspPass; + +PRIVATE_NAMESPACE_END diff --git a/ql-dsp-plugin/tests/Makefile b/ql-dsp-plugin/tests/Makefile new file mode 100644 index 000000000..320dfcfcb --- /dev/null +++ b/ql-dsp-plugin/tests/Makefile @@ -0,0 +1 @@ +include $(shell pwd)/../../Makefile_test.common diff --git a/ql-dsp-plugin/tests/README.md b/ql-dsp-plugin/tests/README.md new file mode 100644 index 000000000..7617440e0 --- /dev/null +++ b/ql-dsp-plugin/tests/README.md @@ -0,0 +1,10 @@ +# Test folder for QL_DSP Plugin + +The ql-dsp-plugin integration directly impacts ql-qlf-plugin testcases +and testing for ql-dsp function should involve calling synth_quicklogic. +Therefore this test folder is currently empty and tests will be placed +under the ql-qlf plugin test folder. + +Currently, we're testing the ql_dsp function with : +* the mac_unit test +* the multiplier test diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 402606a4f..647925973 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -14,6 +14,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10_DIR)/qlf_k6n10_brams.txt \ $(QLF_K6N10_DIR)/qlf_k6n10_cells_sim.v \ $(QLF_K6N10_DIR)/qlf_k6n10_ffs_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_dsp_map.v \ $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v install_modules: $(VERILOG_MODULES) diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v index 2d415b65f..b3f8357a1 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v @@ -387,3 +387,59 @@ module _dual_port_sram ( end endmodule +module QL_DSP ( + input CLK, + input [15:0] A, B, C, D, + output [31:0] O, + output CO // Currently unused, left in case we want to support signed operations in the future. +); + parameter [0:0] A_REG = 0; + parameter [0:0] B_REG = 0; + parameter [0:0] C_REG = 0; + parameter [0:0] D_REG = 0; + parameter [0:0] ENABLE_DSP = 0; + parameter [0:0] A_SIGNED = 0; + parameter [0:0] B_SIGNED = 0; + + wire [15:0] iA, iB, iC, iD; + wire [15:0] iF, iJ, iK, iG; + + // Regs C and A, currently unused + reg [15:0] rC, rA; + + assign iC = C_REG ? rC : C; + assign iA = A_REG ? rA : A; + + // Regs B and D, currently unused + reg [15:0] rB, rD; + + assign iB = B_REG ? rB : B; + assign iD = D_REG ? rD : D; + + // Multiplier Stage + wire [15:0] p_Ah_Bh, p_Al_Bh, p_Ah_Bl, p_Al_Bl; + wire [15:0] Ah, Al, Bh, Bl; + assign Ah = {A_SIGNED ? {8{iA[15]}} : 8'b0, iA[15: 8]}; + assign Al = {8'b0, iA[ 7: 0]}; + assign Bh = {B_SIGNED ? {8{iB[15]}} : 8'b0, iB[15: 8]}; + assign Bl = {8'b0, iB[ 7: 0]}; + assign p_Ah_Bh = Ah * Bh; // F + assign p_Al_Bh = {8'b0, Al[7:0]} * Bh; // J + assign p_Ah_Bl = Ah * {8'b0, Bl[7:0]}; // K + assign p_Al_Bl = Al * Bl; // G + + assign iF = p_Ah_Bh; + assign iJ = p_Al_Bh; + + assign iK = p_Ah_Bl; + assign iG = p_Al_Bl; + + // Adder Stage + wire [23:0] iK_e = {A_SIGNED ? {8{iK[15]}} : 8'b0, iK}; + wire [23:0] iJ_e = {B_SIGNED ? {8{iJ[15]}} : 8'b0, iJ}; + assign iL = iG + (iK_e << 8) + (iJ_e << 8) + (iF << 16); + + // Output Stage + assign O = iL; + +endmodule diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v new file mode 100644 index 000000000..bab24e537 --- /dev/null +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v @@ -0,0 +1,19 @@ +module \$__MUL16X16 (input [15:0] A, input [15:0] B, output [31:0] Y); + parameter A_SIGNED = 0; + parameter B_SIGNED = 0; + parameter A_WIDTH = 0; + parameter B_WIDTH = 0; + parameter Y_WIDTH = 0; + + QL_DSP #( + .A_REG(1'b0), + .B_REG(1'b0), + .C_REG(1'b0), + .D_REG(1'b0), + .ENABLE_DSP(1'b1), + ) _TECHMAP_REPLACE_ ( + .A(A), + .B(B), + .O(Y), + ); +endmodule diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 7bb2210c9..d4719f023 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -60,6 +60,10 @@ struct SynthQuickLogicPass : public ScriptPass { log(" write the design to the specified verilog file. writing of an output file\n"); log(" is omitted if this parameter is not specified.\n"); log("\n"); + log(" -no_dsp\n"); + log(" By default use DSP blocks in output netlist.\n"); + log(" do not use DSP blocks to implement multipliers and associated logic\n"); + log("\n"); log(" -no_adder\n"); log(" By default use adder cells in output netlist.\n"); log(" Specifying this switch turns it off.\n"); @@ -78,6 +82,7 @@ struct SynthQuickLogicPass : public ScriptPass { } string top_opt, edif_file, blif_file, family, currmodule, verilog_file; + bool nodsp; bool inferAdder; bool inferBram; bool abcOpt; @@ -95,6 +100,7 @@ struct SynthQuickLogicPass : public ScriptPass { inferBram = true; abcOpt = true; noffmap = false; + nodsp = false; } void execute(std::vector args, RTLIL::Design *design) override @@ -125,6 +131,10 @@ struct SynthQuickLogicPass : public ScriptPass { verilog_file = args[++argidx]; continue; } + if (args[argidx] == "-no_dsp") { + nodsp = true; + continue; + } if (args[argidx] == "-no_adder") { inferAdder = false; continue; @@ -185,7 +195,22 @@ struct SynthQuickLogicPass : public ScriptPass { run("peepopt"); run("pmuxtree"); run("opt_clean"); - + if (help_mode || (-!nodsp && family == "qlf_k6n10")) { + run("memory_dff"); + run("wreduce t:$mul"); + run("techmap -map +/mul2dsp.v -map +/quicklogic/" + family + + "_dsp_map.v -D DSP_A_MAXWIDTH=16 -D DSP_B_MAXWIDTH=16 " + "-D DSP_A_MINWIDTH=2 -D DSP_B_MINWIDTH=2 -D DSP_Y_MINWIDTH=11 " + "-D DSP_NAME=$__MUL16X16", + "(if -!nodsp)"); + run("select a:mul2dsp", " (if -!nodsp)"); + run("setattr -unset mul2dsp", " (if -!nodsp)"); + run("opt_expr -fine", " (if -!nodsp)"); + run("wreduce", " (if -!nodsp)"); + run("select -clear", " (if -!nodsp)"); + run("ql_dsp", " (if -!nodsp)"); + run("chtype -set $mul t:$__soft_mul", "(if -!nodsp)"); + } run("alumacc"); run("opt"); run("fsm"); From f1f7156708afa0bfab66c31e3fb7283db11e5b4b Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 2 Jun 2021 15:41:24 +0200 Subject: [PATCH 323/845] Add ql_dsp tests Signed-off-by: samycharas --- ql-qlf-plugin/tests/Makefile | 4 ++++ ql-qlf-plugin/tests/mac_unit/mac_unit.tcl | 14 ++++++++++++++ ql-qlf-plugin/tests/mac_unit/mac_unit.v | 8 ++++++++ ql-qlf-plugin/tests/multiplier/multiplier.tcl | 14 ++++++++++++++ ql-qlf-plugin/tests/multiplier/multiplier.v | 7 +++++++ 5 files changed, 47 insertions(+) create mode 100644 ql-qlf-plugin/tests/mac_unit/mac_unit.tcl create mode 100644 ql-qlf-plugin/tests/mac_unit/mac_unit.v create mode 100644 ql-qlf-plugin/tests/multiplier/multiplier.tcl create mode 100644 ql-qlf-plugin/tests/multiplier/multiplier.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index b64701e37..46587e703 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -5,6 +5,8 @@ TESTS = dffs \ shreg \ iob_no_flatten \ full_adder \ + mac_unit \ + multiplier \ logic include $(shell pwd)/../../Makefile_test.common @@ -14,4 +16,6 @@ shreg_verify = true iob_no_flatten_verify = true latches_verify = true full_adder_verify = true +mac_unit_verify = true +multiplier_verify = true logic_verify = true diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl b/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl new file mode 100644 index 000000000..dbf95ecbf --- /dev/null +++ b/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl @@ -0,0 +1,14 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +plugin -i ql-dsp +yosys -import ;# ingest plugin commands + +set TOP "mac_unit" +read_verilog $::env(DESIGN_TOP).v +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10 -top $TOP +yosys cd $TOP +stat +select -assert-count 1 t:QL_DSP + + diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.v b/ql-qlf-plugin/tests/mac_unit/mac_unit.v new file mode 100644 index 000000000..bcec4506c --- /dev/null +++ b/ql-qlf-plugin/tests/mac_unit/mac_unit.v @@ -0,0 +1,8 @@ +module mac_unit(a, b, out); + parameter DATA_WIDTH = 16; + input [DATA_WIDTH - 1 : 0] a, b; + output [2*DATA_WIDTH - 1 : 0] out; + + assign out = a * b + out; +endmodule + diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.tcl b/ql-qlf-plugin/tests/multiplier/multiplier.tcl new file mode 100644 index 000000000..571f9dfea --- /dev/null +++ b/ql-qlf-plugin/tests/multiplier/multiplier.tcl @@ -0,0 +1,14 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +plugin -i ql-dsp +yosys -import ;# ingest plugin commands + +set TOP "mult16x16" +read_verilog $::env(DESIGN_TOP).v +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10 -top $TOP +yosys cd $TOP +stat +select -assert-count 1 t:QL_DSP + + diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.v b/ql-qlf-plugin/tests/multiplier/multiplier.v new file mode 100644 index 000000000..70f9a23c1 --- /dev/null +++ b/ql-qlf-plugin/tests/multiplier/multiplier.v @@ -0,0 +1,7 @@ +module mult16x16(a, b, out); + parameter DATA_WIDTH = 16; + input [DATA_WIDTH - 1 : 0] a, b; + output [2*DATA_WIDTH - 1 : 0] out; + + assign out = a * b; +endmodule From 42e880de36011e37416085145d03b7b162940b55 Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 2 Jun 2021 15:42:04 +0200 Subject: [PATCH 324/845] Update other ql-qlf tests to ingest ql_dsp function Signed-off-by: samycharas --- ql-qlf-plugin/tests/bram/bram.tcl | 1 + ql-qlf-plugin/tests/dffs/dffs.tcl | 1 + ql-qlf-plugin/tests/full_adder/full_adder.tcl | 1 + ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl | 1 + ql-qlf-plugin/tests/latches/latches.tcl | 1 + ql-qlf-plugin/tests/logic/logic.tcl | 1 + ql-qlf-plugin/tests/shreg/shreg.tcl | 1 + 7 files changed, 7 insertions(+) diff --git a/ql-qlf-plugin/tests/bram/bram.tcl b/ql-qlf-plugin/tests/bram/bram.tcl index 989b2d57b..cac2f40af 100644 --- a/ql-qlf-plugin/tests/bram/bram.tcl +++ b/ql-qlf-plugin/tests/bram/bram.tcl @@ -1,5 +1,6 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index 737acc1e8..2344c87c7 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -1,5 +1,6 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index fbcd3ca9c..0093aab10 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -1,5 +1,6 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +plugin -i ql-dsp yosys -import ;# ingest plugin commands # Equivalence check for adder synthesis for qlf-k4n8 diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl index 9ab802aac..cf7aebb45 100644 --- a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl +++ b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl @@ -1,5 +1,6 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf} +plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/latches/latches.tcl b/ql-qlf-plugin/tests/latches/latches.tcl index d5821a628..f8256f74a 100644 --- a/ql-qlf-plugin/tests/latches/latches.tcl +++ b/ql-qlf-plugin/tests/latches/latches.tcl @@ -1,5 +1,6 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/logic/logic.tcl b/ql-qlf-plugin/tests/logic/logic.tcl index 8017272f4..fb19363ce 100644 --- a/ql-qlf-plugin/tests/logic/logic.tcl +++ b/ql-qlf-plugin/tests/logic/logic.tcl @@ -1,5 +1,6 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +plugin -i ql-dsp yosys -import ;# ingest plugin commands #Logic test for qlf_k4n8 device diff --git a/ql-qlf-plugin/tests/shreg/shreg.tcl b/ql-qlf-plugin/tests/shreg/shreg.tcl index 9be1ca33e..7c7b5c334 100644 --- a/ql-qlf-plugin/tests/shreg/shreg.tcl +++ b/ql-qlf-plugin/tests/shreg/shreg.tcl @@ -1,5 +1,6 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v From 6fc107a73ea278b104b17654e061b12f4ff2d023 Mon Sep 17 00:00:00 2001 From: samycharas Date: Mon, 7 Jun 2021 12:25:04 +0200 Subject: [PATCH 325/845] Add testcase to ensure no_dsp flag works Signed-off-by: samycharas --- ql-qlf-plugin/tests/mac_unit/mac_unit.tcl | 11 ++++++++++- ql-qlf-plugin/tests/multiplier/multiplier.tcl | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl b/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl index dbf95ecbf..15eaa2717 100644 --- a/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl +++ b/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl @@ -5,10 +5,19 @@ yosys -import ;# ingest plugin commands set TOP "mac_unit" read_verilog $::env(DESIGN_TOP).v +design -save read + +#Infer QL_DSP hierarchy -top $TOP synth_quicklogic -family qlf_k6n10 -top $TOP yosys cd $TOP stat select -assert-count 1 t:QL_DSP - +#Test no_dsp arg +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10 -top $TOP -no_dsp +yosys cd $TOP +stat +select -assert-count 0 t:QL_DSP diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.tcl b/ql-qlf-plugin/tests/multiplier/multiplier.tcl index 571f9dfea..88185d9c4 100644 --- a/ql-qlf-plugin/tests/multiplier/multiplier.tcl +++ b/ql-qlf-plugin/tests/multiplier/multiplier.tcl @@ -5,10 +5,19 @@ yosys -import ;# ingest plugin commands set TOP "mult16x16" read_verilog $::env(DESIGN_TOP).v +design -save read + +#Infer QL_DSP hierarchy -top $TOP synth_quicklogic -family qlf_k6n10 -top $TOP yosys cd $TOP stat select -assert-count 1 t:QL_DSP - +#Test no_dsp arg +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10 -top $TOP -no_dsp +yosys cd $TOP +stat +select -assert-count 0 t:QL_DSP From f3e64bd322699e61fd030feb78f62e66b1446748 Mon Sep 17 00:00:00 2001 From: samycharas Date: Mon, 7 Jun 2021 12:27:30 +0200 Subject: [PATCH 326/845] Typo in commented dfflegalize Signed-off-by: samycharas --- ql-qlf-plugin/synth_quicklogic.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index d4719f023..7e43a04df 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -254,7 +254,7 @@ struct SynthQuickLogicPass : public ScriptPass { "$_DLATCHSR_PPP_ 0"); // In case we add clock inversion in the future. // run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_DFFSR_?PP_ 0 -cell $_DFFSRE_?PPP_ 0 -cell - // $_DLATCH_PPP_ 0"); + // $_DLATCH_SRPPP_ 0"); } else { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); } From cde9e29516ded9ae19fb4db6f815f19b57975576 Mon Sep 17 00:00:00 2001 From: samycharas Date: Tue, 8 Jun 2021 20:35:01 +0200 Subject: [PATCH 327/845] Correct no_dsp flag help statement Signed-off-by: samycharas --- ql-qlf-plugin/synth_quicklogic.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 7e43a04df..d851d3833 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -195,21 +195,21 @@ struct SynthQuickLogicPass : public ScriptPass { run("peepopt"); run("pmuxtree"); run("opt_clean"); - if (help_mode || (-!nodsp && family == "qlf_k6n10")) { + if (help_mode || (!nodsp && family == "qlf_k6n10")) { run("memory_dff"); run("wreduce t:$mul"); run("techmap -map +/mul2dsp.v -map +/quicklogic/" + family + "_dsp_map.v -D DSP_A_MAXWIDTH=16 -D DSP_B_MAXWIDTH=16 " "-D DSP_A_MINWIDTH=2 -D DSP_B_MINWIDTH=2 -D DSP_Y_MINWIDTH=11 " "-D DSP_NAME=$__MUL16X16", - "(if -!nodsp)"); - run("select a:mul2dsp", " (if -!nodsp)"); - run("setattr -unset mul2dsp", " (if -!nodsp)"); - run("opt_expr -fine", " (if -!nodsp)"); - run("wreduce", " (if -!nodsp)"); - run("select -clear", " (if -!nodsp)"); - run("ql_dsp", " (if -!nodsp)"); - run("chtype -set $mul t:$__soft_mul", "(if -!nodsp)"); + "(if -no_dsp)"); + run("select a:mul2dsp", " (if -no_dsp)"); + run("setattr -unset mul2dsp", " (if -no_dsp)"); + run("opt_expr -fine", " (if -no_dsp)"); + run("wreduce", " (if -no_dsp)"); + run("select -clear", " (if -no_dsp)"); + run("ql_dsp", " (if -no_dsp)"); + run("chtype -set $mul t:$__soft_mul", "(if -no_dsp)"); } run("alumacc"); run("opt"); From d0d35e6241e1efc456fa076f2d3584e065e3d805 Mon Sep 17 00:00:00 2001 From: samycharas Date: Tue, 8 Jun 2021 22:30:27 +0200 Subject: [PATCH 328/845] Generate pattern matcher file during plugin build Signed-off-by: samycharas --- ql-dsp-plugin/Makefile | 6 + ql-dsp-plugin/pmgen/pmgen.py | 797 ++++++++++++++ ql-dsp-plugin/pmgen/ql_dsp.pmg | 415 +++++++ ql-dsp-plugin/ql-dsp-pm.h | 1871 -------------------------------- 4 files changed, 1218 insertions(+), 1871 deletions(-) create mode 100644 ql-dsp-plugin/pmgen/pmgen.py create mode 100644 ql-dsp-plugin/pmgen/ql_dsp.pmg delete mode 100644 ql-dsp-plugin/ql-dsp-pm.h diff --git a/ql-dsp-plugin/Makefile b/ql-dsp-plugin/Makefile index 29c87d39c..a47e8fb01 100644 --- a/ql-dsp-plugin/Makefile +++ b/ql-dsp-plugin/Makefile @@ -1,3 +1,9 @@ NAME = ql-dsp SOURCES = ql-dsp.cc include ../Makefile_plugin.common + +pre-build:=$(shell python3 pmgen/pmgen.py -o ql-dsp-pm.h -p ql_dsp pmgen/ql_dsp.pmg) + +clean: + $(MAKE) -f ../Makefile_plugin.common $@ + rm -f *pm.h diff --git a/ql-dsp-plugin/pmgen/pmgen.py b/ql-dsp-plugin/pmgen/pmgen.py new file mode 100644 index 000000000..592a26fa6 --- /dev/null +++ b/ql-dsp-plugin/pmgen/pmgen.py @@ -0,0 +1,797 @@ +#!/usr/bin/env python3 + +import re +import sys +import pprint +import getopt + +pp = pprint.PrettyPrinter(indent=4) + +prefix = None +pmgfiles = list() +outfile = None +debug = False +genhdr = False + +opts, args = getopt.getopt(sys.argv[1:], "p:o:dg") + +for o, a in opts: + if o == "-p": + prefix = a + elif o == "-o": + outfile = a + elif o == "-d": + debug = True + elif o == "-g": + genhdr = True + +if outfile is None: + outfile = "/dev/stdout" + +for a in args: + assert a.endswith(".pmg") + if prefix is None and len(args) == 1: + prefix = a[0:-4] + prefix = prefix.split('/')[-1] + pmgfiles.append(a) + +assert prefix is not None + +current_pattern = None +current_subpattern = None +patterns = dict() +subpatterns = dict() +subpattern_args = dict() +state_types = dict() +udata_types = dict() +blocks = list() +ids = dict() + +def rewrite_cpp(s): + t = list() + i = 0 + while i < len(s): + if s[i] in ("'", '"') and i + 1 < len(s): + j = i + 1 + while j + 1 < len(s) and s[j] != s[i]: + if s[j] == '\\' and j + 1 < len(s): + j += 1 + j += 1 + t.append(s[i:j+1]) + i = j + 1 + continue + + if s[i] in ('$', '\\') and i + 1 < len(s): + j = i + 1 + while True: + if j == len(s): + j -= 1 + break + if ord('a') <= ord(s[j]) <= ord('z'): + j += 1 + continue + if ord('A') <= ord(s[j]) <= ord('Z'): + j += 1 + continue + if ord('0') <= ord(s[j]) <= ord('9'): + j += 1 + continue + if s[j] == '_': + j += 1 + continue + j -= 1 + break + + n = s[i:j+1] + i = j + 1 + + if n[0] == '$': + v = "id_d_" + n[1:] + else: + v = "id_b_" + n[1:] + + if v not in ids: + ids[v] = n + else: + assert ids[v] == n + + t.append(v) + continue + + if s[i] == "\t": + t.append(" ") + else: + t.append(s[i]) + + i += 1 + + return "".join(t) + +def process_pmgfile(f, filename): + linenr = 0 + global current_pattern + global current_subpattern + while True: + linenr += 1 + line = f.readline() + if line == "": break + line = line.strip() + + cmd = line.split() + if len(cmd) == 0 or cmd[0].startswith("//"): continue + cmd = cmd[0] + + if cmd == "pattern": + if current_pattern is not None: + block = dict() + block["type"] = "final" + block["pattern"] = (current_pattern, current_subpattern) + blocks.append(block) + line = line.split() + assert len(line) == 2 + assert line[1] not in patterns + current_pattern = line[1] + current_subpattern = "" + patterns[current_pattern] = len(blocks) + subpatterns[(current_pattern, current_subpattern)] = len(blocks) + subpattern_args[(current_pattern, current_subpattern)] = list() + state_types[current_pattern] = dict() + udata_types[current_pattern] = dict() + continue + + assert current_pattern is not None + + if cmd == "fallthrough": + block = dict() + block["type"] = "fallthrough" + blocks.append(block) + line = line.split() + assert len(line) == 1 + continue + + if cmd == "subpattern": + if len(blocks) == 0 or blocks[-1]["type"] != "fallthrough": + block = dict() + block["type"] = "final" + block["pattern"] = (current_pattern, current_subpattern) + blocks.append(block) + elif len(blocks) and blocks[-1]["type"] == "fallthrough": + del blocks[-1] + line = line.split() + assert len(line) == 2 + current_subpattern = line[1] + subpattern_args[(current_pattern, current_subpattern)] = list() + assert (current_pattern, current_subpattern) not in subpatterns + subpatterns[(current_pattern, current_subpattern)] = len(blocks) + continue + + if cmd == "arg": + line = line.split() + assert len(line) > 1 + subpattern_args[(current_pattern, current_subpattern)] += line[1:] + continue + + if cmd == "state": + m = re.match(r"^state\s+<(.*?)>\s+(([A-Za-z_][A-Za-z_0-9]*\s+)*[A-Za-z_][A-Za-z_0-9]*)\s*$", line) + assert m + type_str = m.group(1) + states_str = m.group(2) + for s in re.split(r"\s+", states_str): + assert s not in state_types[current_pattern] + state_types[current_pattern][s] = type_str + continue + + if cmd == "udata": + m = re.match(r"^udata\s+<(.*?)>\s+(([A-Za-z_][A-Za-z_0-9]*\s+)*[A-Za-z_][A-Za-z_0-9]*)\s*$", line) + assert m + type_str = m.group(1) + udatas_str = m.group(2) + for s in re.split(r"\s+", udatas_str): + assert s not in udata_types[current_pattern] + udata_types[current_pattern][s] = type_str + continue + + if cmd == "match": + block = dict() + block["type"] = "match" + block["src"] = "%s:%d" % (filename, linenr) + block["pattern"] = (current_pattern, current_subpattern) + + block["genargs"] = None + block["gencode"] = None + + line = line.split() + assert len(line) == 2 + assert (line[1] not in state_types[current_pattern]) or (state_types[current_pattern][line[1]] == "Cell*") + block["cell"] = line[1] + state_types[current_pattern][line[1]] = "Cell*"; + + block["if"] = list() + block["setup"] = list() + block["index"] = list() + block["filter"] = list() + block["sets"] = list() + block["optional"] = False + block["semioptional"] = False + + while True: + linenr += 1 + l = f.readline() + assert l != "" + a = l.split() + if len(a) == 0 or a[0].startswith("//"): continue + if a[0] == "endmatch": break + + if a[0] == "if": + b = l.lstrip()[2:] + block["if"].append(rewrite_cpp(b.strip())) + continue + + if a[0] == "select": + b = l.lstrip()[6:] + block["setup"].append(("select", rewrite_cpp(b.strip()))) + continue + + if a[0] == "slice": + m = re.match(r"^\s*slice\s+(\S+)\s+(.*?)\s*$", l) + block["setup"].append(("slice", m.group(1), rewrite_cpp(m.group(2)))) + continue + + if a[0] == "choice": + m = re.match(r"^\s*choice\s+<(.*?)>\s+(\S+)\s+(.*?)\s*$", l) + block["setup"].append(("choice", m.group(1), m.group(2), rewrite_cpp(m.group(3)))) + continue + + if a[0] == "define": + m = re.match(r"^\s*define\s+<(.*?)>\s+(\S+)\s+(.*?)\s*$", l) + block["setup"].append(("define", m.group(1), m.group(2), rewrite_cpp(m.group(3)))) + continue + + if a[0] == "index": + m = re.match(r"^\s*index\s+<(.*?)>\s+(.*?)\s*===\s*(.*?)\s*$", l) + assert m + block["index"].append((m.group(1), rewrite_cpp(m.group(2)), rewrite_cpp(m.group(3)))) + continue + + if a[0] == "filter": + b = l.lstrip()[6:] + block["filter"].append(rewrite_cpp(b.strip())) + continue + + if a[0] == "set": + m = re.match(r"^\s*set\s+(\S+)\s+(.*?)\s*$", l) + block["sets"].append((m.group(1), rewrite_cpp(m.group(2)))) + continue + + if a[0] == "optional": + block["optional"] = True + continue + + if a[0] == "semioptional": + block["semioptional"] = True + continue + + if a[0] == "generate": + block["genargs"] = list([int(s) for s in a[1:]]) + if len(block["genargs"]) == 0: block["genargs"].append(100) + if len(block["genargs"]) == 1: block["genargs"].append(0) + assert len(block["genargs"]) == 2 + block["gencode"] = list() + while True: + linenr += 1 + l = f.readline() + assert l != "" + a = l.split() + if len(a) == 1 and a[0] == "endmatch": break + block["gencode"].append(rewrite_cpp(l.rstrip())) + break + + raise RuntimeError("'%s' statement not recognised on line %d" % (a[0], linenr)) + + if block["optional"]: + assert not block["semioptional"] + + blocks.append(block) + continue + + if cmd == "code": + block = dict() + block["type"] = "code" + block["src"] = "%s:%d" % (filename, linenr) + block["pattern"] = (current_pattern, current_subpattern) + + block["code"] = list() + block["fcode"] = list() + block["states"] = set() + + for s in line.split()[1:]: + if s not in state_types[current_pattern]: + raise RuntimeError("'%s' not in state_types" % s) + block["states"].add(s) + + codetype = "code" + + while True: + linenr += 1 + l = f.readline() + assert l != "" + a = l.split() + if len(a) == 0: continue + if a[0] == "endcode": break + + if a[0] == "finally": + codetype = "fcode" + continue + + block[codetype].append(rewrite_cpp(l.rstrip())) + + blocks.append(block) + continue + + raise RuntimeError("'%s' command not recognised" % cmd) + +for fn in pmgfiles: + with open(fn, "r") as f: + process_pmgfile(f, fn) + +if current_pattern is not None: + block = dict() + block["type"] = "final" + block["pattern"] = (current_pattern, current_subpattern) + blocks.append(block) + +current_pattern = None +current_subpattern = None + +if debug: + pp.pprint(blocks) + +with open(outfile, "w") as f: + for fn in pmgfiles: + print("// Generated by pmgen.py from {}".format(fn), file=f) + print("", file=f) + + if genhdr: + print("#include \"kernel/yosys.h\"", file=f) + print("#include \"kernel/sigtools.h\"", file=f) + print("", file=f) + print("YOSYS_NAMESPACE_BEGIN", file=f) + print("", file=f) + + print("struct {}_pm {{".format(prefix), file=f) + print(" Module *module;", file=f) + print(" SigMap sigmap;", file=f) + print(" std::function on_accept;", file=f) + print(" bool setup_done;", file=f) + print(" bool generate_mode;", file=f) + print(" int accept_cnt;", file=f) + print("", file=f) + + print(" uint32_t rngseed;", file=f) + print(" int rng(unsigned int n) {", file=f) + print(" rngseed ^= rngseed << 13;", file=f) + print(" rngseed ^= rngseed >> 17;", file=f) + print(" rngseed ^= rngseed << 5;", file=f) + print(" return rngseed % n;", file=f) + print(" }", file=f) + print("", file=f) + + for index in range(len(blocks)): + block = blocks[index] + if block["type"] == "match": + index_types = list() + for entry in block["index"]: + index_types.append(entry[0]) + value_types = ["Cell*"] + for entry in block["setup"]: + if entry[0] == "slice": + value_types.append("int") + if entry[0] == "choice": + value_types.append(entry[1]) + if entry[0] == "define": + value_types.append(entry[1]) + print(" typedef std::tuple<{}> index_{}_key_type;".format(", ".join(index_types), index), file=f) + print(" typedef std::tuple<{}> index_{}_value_type;".format(", ".join(value_types), index), file=f) + print(" dict> index_{};".format(index, index, index), file=f) + print(" dict> sigusers;", file=f) + print(" pool blacklist_cells;", file=f) + print(" pool autoremove_cells;", file=f) + print(" dict rollback_cache;", file=f) + print(" int rollback;", file=f) + print("", file=f) + + for current_pattern in sorted(patterns.keys()): + print(" struct state_{}_t {{".format(current_pattern), file=f) + for s, t in sorted(state_types[current_pattern].items()): + print(" {} {};".format(t, s), file=f) + print(" }} st_{};".format(current_pattern), file=f) + print("", file=f) + + print(" struct udata_{}_t {{".format(current_pattern), file=f) + for s, t in sorted(udata_types[current_pattern].items()): + print(" {} {};".format(t, s), file=f) + print(" }} ud_{};".format(current_pattern), file=f) + print("", file=f) + current_pattern = None + + for v, n in sorted(ids.items()): + if n[0] == "\\": + print(" IdString {}{{\"\\{}\"}};".format(v, n), file=f) + else: + print(" IdString {}{{\"{}\"}};".format(v, n), file=f) + print("", file=f) + + print(" void add_siguser(const SigSpec &sig, Cell *cell) {", file=f) + print(" for (auto bit : sigmap(sig)) {", file=f) + print(" if (bit.wire == nullptr) continue;", file=f) + print(" sigusers[bit].insert(cell);", file=f) + print(" }", file=f) + print(" }", file=f) + print("", file=f) + + print(" void blacklist(Cell *cell) {", file=f) + print(" if (cell != nullptr && blacklist_cells.insert(cell).second) {", file=f) + print(" auto ptr = rollback_cache.find(cell);", file=f) + print(" if (ptr == rollback_cache.end()) return;", file=f) + print(" int rb = ptr->second;", file=f) + print(" if (rollback == 0 || rollback > rb)", file=f) + print(" rollback = rb;", file=f) + print(" }", file=f) + print(" }", file=f) + print("", file=f) + + print(" void autoremove(Cell *cell) {", file=f) + print(" if (cell != nullptr) {", file=f) + print(" autoremove_cells.insert(cell);", file=f) + print(" blacklist(cell);", file=f) + print(" }", file=f) + print(" }", file=f) + print("", file=f) + + current_pattern = None + + print(" SigSpec port(Cell *cell, IdString portname) {", file=f) + print(" return sigmap(cell->getPort(portname));", file=f) + print(" }", file=f) + print("", file=f) + print(" SigSpec port(Cell *cell, IdString portname, const SigSpec& defval) {", file=f) + print(" return sigmap(cell->connections_.at(portname, defval));", file=f) + print(" }", file=f) + print("", file=f) + + print(" Const param(Cell *cell, IdString paramname) {", file=f) + print(" return cell->getParam(paramname);", file=f) + print(" }", file=f) + print("", file=f) + print(" Const param(Cell *cell, IdString paramname, const Const& defval) {", file=f) + print(" return cell->parameters.at(paramname, defval);", file=f) + print(" }", file=f) + print("", file=f) + + print(" int nusers(const SigSpec &sig) {", file=f) + print(" pool users;", file=f) + print(" for (auto bit : sigmap(sig))", file=f) + print(" for (auto user : sigusers[bit])", file=f) + print(" users.insert(user);", file=f) + print(" return GetSize(users);", file=f) + print(" }", file=f) + print("", file=f) + + print(" {}_pm(Module *module, const vector &cells) :".format(prefix), file=f) + print(" module(module), sigmap(module), setup_done(false), generate_mode(false), rngseed(12345678) {", file=f) + print(" setup(cells);", file=f) + print(" }", file=f) + print("", file=f) + + print(" {}_pm(Module *module) :".format(prefix), file=f) + print(" module(module), sigmap(module), setup_done(false), generate_mode(false), rngseed(12345678) {", file=f) + print(" }", file=f) + print("", file=f) + + print(" void setup(const vector &cells) {", file=f) + for current_pattern in sorted(patterns.keys()): + for s, t in sorted(udata_types[current_pattern].items()): + if t.endswith("*"): + print(" ud_{}.{} = nullptr;".format(current_pattern,s), file=f) + else: + print(" ud_{}.{} = {}();".format(current_pattern, s, t), file=f) + current_pattern = None + print(" log_assert(!setup_done);", file=f) + print(" setup_done = true;", file=f) + print(" for (auto port : module->ports)", file=f) + print(" add_siguser(module->wire(port), nullptr);", file=f) + print(" for (auto cell : module->cells())", file=f) + print(" for (auto &conn : cell->connections())", file=f) + print(" add_siguser(conn.second, cell);", file=f) + print(" for (auto cell : cells) {", file=f) + + for index in range(len(blocks)): + block = blocks[index] + if block["type"] == "match": + print(" do {", file=f) + print(" Cell *{} = cell;".format(block["cell"]), file=f) + print(" index_{}_value_type value;".format(index), file=f) + print(" std::get<0>(value) = cell;", file=f) + loopcnt = 0 + valueidx = 1 + for item in block["setup"]: + if item[0] == "select": + print(" if (!({})) continue;".format(item[1]), file=f) + if item[0] == "slice": + print(" int &{} = std::get<{}>(value);".format(item[1], valueidx), file=f) + print(" for ({} = 0; {} < {}; {}++) {{".format(item[1], item[1], item[2], item[1]), file=f) + valueidx += 1 + loopcnt += 1 + if item[0] == "choice": + print(" vector<{}> _pmg_choices_{} = {};".format(item[1], item[2], item[3]), file=f) + print(" for (const {} &{} : _pmg_choices_{}) {{".format(item[1], item[2], item[2]), file=f) + print(" std::get<{}>(value) = {};".format(valueidx, item[2]), file=f) + valueidx += 1 + loopcnt += 1 + if item[0] == "define": + print(" {} &{} = std::get<{}>(value);".format(item[1], item[2], valueidx), file=f) + print(" {} = {};".format(item[2], item[3]), file=f) + valueidx += 1 + print(" index_{}_key_type key;".format(index), file=f) + for field, entry in enumerate(block["index"]): + print(" std::get<{}>(key) = {};".format(field, entry[1]), file=f) + print(" index_{}[key].push_back(value);".format(index), file=f) + for i in range(loopcnt): + print(" }", file=f) + print(" } while (0);", file=f) + + print(" }", file=f) + print(" }", file=f) + print("", file=f) + + print(" ~{}_pm() {{".format(prefix), file=f) + print(" for (auto cell : autoremove_cells)", file=f) + print(" module->remove(cell);", file=f) + print(" }", file=f) + print("", file=f) + + for current_pattern in sorted(patterns.keys()): + print(" int run_{}(std::function on_accept_f) {{".format(current_pattern), file=f) + print(" log_assert(setup_done);", file=f) + print(" accept_cnt = 0;", file=f) + print(" on_accept = on_accept_f;", file=f) + print(" rollback = 0;", file=f) + for s, t in sorted(state_types[current_pattern].items()): + if t.endswith("*"): + print(" st_{}.{} = nullptr;".format(current_pattern, s), file=f) + else: + print(" st_{}.{} = {}();".format(current_pattern, s, t), file=f) + print(" block_{}(1);".format(patterns[current_pattern]), file=f) + print(" log_assert(rollback_cache.empty());", file=f) + print(" return accept_cnt;", file=f) + print(" }", file=f) + print("", file=f) + print(" int run_{}(std::function on_accept_f) {{".format(current_pattern, prefix), file=f) + print(" return run_{}([&](){{on_accept_f(*this);}});".format(current_pattern), file=f) + print(" }", file=f) + print("", file=f) + print(" int run_{}() {{".format(current_pattern), file=f) + print(" return run_{}([](){{}});".format(current_pattern, current_pattern), file=f) + print(" }", file=f) + print("", file=f) + + if len(subpatterns): + for p, s in sorted(subpatterns.keys()): + print(" void block_subpattern_{}_{}(int recursion) {{ block_{}(recursion); }}".format(p, s, subpatterns[(p, s)]), file=f) + print("", file=f) + + current_pattern = None + current_subpattern = None + + for index in range(len(blocks)): + block = blocks[index] + + if block["type"] in ("match", "code"): + print(" // {}".format(block["src"]), file=f) + + print(" void block_{}(int recursion YS_MAYBE_UNUSED) {{".format(index), file=f) + current_pattern, current_subpattern = block["pattern"] + + if block["type"] == "final": + print(" }", file=f) + if index+1 != len(blocks): + print("", file=f) + continue + + const_st = set() + nonconst_st = set() + restore_st = set() + + for s in subpattern_args[(current_pattern, current_subpattern)]: + const_st.add(s) + + for i in range(subpatterns[(current_pattern, current_subpattern)], index): + if blocks[i]["type"] == "code": + for s in blocks[i]["states"]: + const_st.add(s) + elif blocks[i]["type"] == "match": + const_st.add(blocks[i]["cell"]) + for item in blocks[i]["sets"]: + const_st.add(item[0]) + else: + assert False + + if block["type"] == "code": + for s in block["states"]: + if s in const_st: + const_st.remove(s) + restore_st.add(s) + nonconst_st.add(s) + elif block["type"] == "match": + s = block["cell"] + assert s not in const_st + nonconst_st.add(s) + for item in block["sets"]: + if item[0] in const_st: + const_st.remove(item[0]) + nonconst_st.add(item[0]) + else: + assert False + + for s in sorted(const_st): + t = state_types[current_pattern][s] + if t.endswith("*"): + print(" {} const &{} YS_MAYBE_UNUSED = st_{}.{};".format(t, s, current_pattern, s), file=f) + else: + print(" const {} &{} YS_MAYBE_UNUSED = st_{}.{};".format(t, s, current_pattern, s), file=f) + + for s in sorted(nonconst_st): + t = state_types[current_pattern][s] + print(" {} &{} YS_MAYBE_UNUSED = st_{}.{};".format(t, s, current_pattern, s), file=f) + + for u in sorted(udata_types[current_pattern].keys()): + t = udata_types[current_pattern][u] + print(" {} &{} YS_MAYBE_UNUSED = ud_{}.{};".format(t, u, current_pattern, u), file=f) + + if len(restore_st): + print("", file=f) + for s in sorted(restore_st): + t = state_types[current_pattern][s] + print(" {} _pmg_backup_{} = {};".format(t, s, s), file=f) + + if block["type"] == "code": + print("", file=f) + print("#define reject do { goto rollback_label; } while(0)", file=f) + print("#define accept do { accept_cnt++; on_accept(); if (rollback) goto rollback_label; } while(0)", file=f) + print("#define finish do { rollback = -1; goto rollback_label; } while(0)", file=f) + print("#define branch do {{ block_{}(recursion+1); if (rollback) goto rollback_label; }} while(0)".format(index+1), file=f) + print("#define subpattern(pattern_name) do {{ block_subpattern_{}_ ## pattern_name (recursion+1); if (rollback) goto rollback_label; }} while(0)".format(current_pattern), file=f) + + for line in block["code"]: + print(" " + line, file=f) + + print("", file=f) + print(" block_{}(recursion+1);".format(index+1), file=f) + + print("#undef reject", file=f) + print("#undef accept", file=f) + print("#undef finish", file=f) + print("#undef branch", file=f) + print("#undef subpattern", file=f) + + print("", file=f) + print("rollback_label:", file=f) + print(" YS_MAYBE_UNUSED;", file=f) + + if len(block["fcode"]): + print("#define accept do { accept_cnt++; on_accept(); } while(0)", file=f) + print("#define finish do { rollback = -1; goto finish_label; } while(0)", file=f) + for line in block["fcode"]: + print(" " + line, file=f) + print("finish_label:", file=f) + print(" YS_MAYBE_UNUSED;", file=f) + print("#undef accept", file=f) + print("#undef finish", file=f) + + if len(restore_st) or len(nonconst_st): + print("", file=f) + for s in sorted(restore_st): + t = state_types[current_pattern][s] + print(" {} = _pmg_backup_{};".format(s, s), file=f) + for s in sorted(nonconst_st): + if s not in restore_st: + t = state_types[current_pattern][s] + if t.endswith("*"): + print(" {} = nullptr;".format(s), file=f) + else: + print(" {} = {}();".format(s, t), file=f) + + elif block["type"] == "match": + assert len(restore_st) == 0 + + print(" Cell* _pmg_backup_{} = {};".format(block["cell"], block["cell"]), file=f) + + if len(block["if"]): + for expr in block["if"]: + print("", file=f) + print(" if (!({})) {{".format(expr), file=f) + print(" {} = nullptr;".format(block["cell"]), file=f) + print(" block_{}(recursion+1);".format(index+1), file=f) + print(" {} = _pmg_backup_{};".format(block["cell"], block["cell"]), file=f) + print(" return;", file=f) + print(" }", file=f) + + print("", file=f) + print(" index_{}_key_type key;".format(index), file=f) + for field, entry in enumerate(block["index"]): + print(" std::get<{}>(key) = {};".format(field, entry[2]), file=f) + print(" auto cells_ptr = index_{}.find(key);".format(index), file=f) + + if block["semioptional"] or block["genargs"] is not None: + print(" bool found_any_match = false;", file=f) + + print("", file=f) + print(" if (cells_ptr != index_{}.end()) {{".format(index), file=f) + print(" const vector &cells = cells_ptr->second;".format(index), file=f) + print(" for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) {", file=f) + print(" {} = std::get<0>(cells[_pmg_idx]);".format(block["cell"]), file=f) + valueidx = 1 + for item in block["setup"]: + if item[0] == "slice": + print(" const int &{} YS_MAYBE_UNUSED = std::get<{}>(cells[_pmg_idx]);".format(item[1], valueidx), file=f) + valueidx += 1 + if item[0] == "choice": + print(" const {} &{} YS_MAYBE_UNUSED = std::get<{}>(cells[_pmg_idx]);".format(item[1], item[2], valueidx), file=f) + valueidx += 1 + if item[0] == "define": + print(" const {} &{} YS_MAYBE_UNUSED = std::get<{}>(cells[_pmg_idx]);".format(item[1], item[2], valueidx), file=f) + valueidx += 1 + print(" if (blacklist_cells.count({})) continue;".format(block["cell"]), file=f) + for expr in block["filter"]: + print(" if (!({})) continue;".format(expr), file=f) + if block["semioptional"] or block["genargs"] is not None: + print(" found_any_match = true;", file=f) + for item in block["sets"]: + print(" auto _pmg_backup_{} = {};".format(item[0], item[0]), file=f) + print(" {} = {};".format(item[0], item[1]), file=f) + print(" auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion));", file=f) + print(" block_{}(recursion+1);".format(index+1), file=f) + for item in block["sets"]: + print(" {} = _pmg_backup_{};".format(item[0], item[0]), file=f) + print(" if (rollback_ptr.second)", file=f) + print(" rollback_cache.erase(rollback_ptr.first);", file=f) + print(" if (rollback) {", file=f) + print(" if (rollback != recursion) {{".format(index+1), file=f) + print(" {} = _pmg_backup_{};".format(block["cell"], block["cell"]), file=f) + print(" return;", file=f) + print(" }", file=f) + print(" rollback = 0;", file=f) + print(" }", file=f) + print(" }", file=f) + print(" }", file=f) + + print("", file=f) + print(" {} = nullptr;".format(block["cell"]), file=f) + + if block["optional"]: + print(" block_{}(recursion+1);".format(index+1), file=f) + + if block["semioptional"]: + print(" if (!found_any_match) block_{}(recursion+1);".format(index+1), file=f) + + print(" {} = _pmg_backup_{};".format(block["cell"], block["cell"]), file=f) + + if block["genargs"] is not None: + print("#define finish do { rollback = -1; return; } while(0)", file=f) + print(" if (generate_mode && rng(100) < (found_any_match ? {} : {})) {{".format(block["genargs"][1], block["genargs"][0]), file=f) + for line in block["gencode"]: + print(" " + line, file=f) + print(" }", file=f) + print("#undef finish", file=f) + else: + assert False + + current_pattern = None + print(" }", file=f) + print("", file=f) + + print("};", file=f) + + if genhdr: + print("", file=f) + print("YOSYS_NAMESPACE_END", file=f) diff --git a/ql-dsp-plugin/pmgen/ql_dsp.pmg b/ql-dsp-plugin/pmgen/ql_dsp.pmg new file mode 100644 index 000000000..e607e6679 --- /dev/null +++ b/ql-dsp-plugin/pmgen/ql_dsp.pmg @@ -0,0 +1,415 @@ +pattern ql_dsp + +state clock +state clock_pol cd_signed o_lo +state sigA sigB sigCD sigH sigO +state add mux +state addAB muxAB + +state ffA ffB ffCD +state ffFJKG ffH ffO +// +// subpattern +state argSdff +state argQ argD +udata dffD dffQ +udata dffclock +udata dff +udata dffclock_pol + +match mul + select mul->type.in($mul, \QL_DSP) + select GetSize(mul->getPort(\A)) + GetSize(mul->getPort(\B)) > 10 +endmatch + +code sigA sigB sigH + auto unextend = [](const SigSpec &sig) { + int i; + for (i = GetSize(sig)-1; i > 0; i--) + if (sig[i] != sig[i-1]) + break; + // Do not remove non-const sign bit + if (sig[i].wire) + ++i; + return sig.extract(0, i); + }; + sigA = unextend(port(mul, \A)); + sigB = unextend(port(mul, \B)); + + SigSpec O; + if (mul->type == $mul) + O = mul->getPort(\Y); + else if (mul->type == \QL_DSP) + O = mul->getPort(\O); + else log_abort(); + if (GetSize(O) <= 10) + reject; + + // Only care about those bits that are used + int i; + for (i = 0; i < GetSize(O); i++) { + if (nusers(O[i]) <= 1) + break; + sigH.append(O[i]); + } + // This sigM could have no users if downstream sinks (e.g. $add) is + // narrower than $mul result, for example + if (i == 0) + reject; + + log_assert(nusers(O.extract_end(i)) <= 1); +endcode + +code argQ ffA sigA clock clock_pol + if (mul->type != \QL_DSP || !param(mul, \A_REG).as_bool()) { + argQ = sigA; + subpattern(in_dffe); + if (dff) { + ffA = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigA = dffD; + } + } +endcode + +code argQ ffB sigB clock clock_pol + if (mul->type != \QL_DSP || !param(mul, \B_REG).as_bool()) { + argQ = sigB; + subpattern(in_dffe); + if (dff) { + ffB = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigB = dffD; + } + } +endcode + +code argD argSdff ffFJKG sigH clock clock_pol + if (nusers(sigH) == 2 && + (mul->type != \QL_DSP)) { + argD = sigH; + argSdff = false; + subpattern(out_dffe); + if (dff) { + // F/J/K/G do not have a CE-like (hold) input + if (dff->hasPort(\EN)) + goto reject_ffFJKG; + + // Reset signal of F/J (IRSTTOP) and K/G (IRSTBOT) + // shared with A and B + if (ffA) { + if (ffA->hasPort(\ARST) != dff->hasPort(\ARST)) + goto reject_ffFJKG; + if (ffA->hasPort(\ARST)) { + if (port(ffA, \ARST) != port(dff, \ARST)) + goto reject_ffFJKG; + if (param(ffA, \ARST_POLARITY) != param(dff, \ARST_POLARITY)) + goto reject_ffFJKG; + } + } + if (ffB) { + if (ffB->hasPort(\ARST) != dff->hasPort(\ARST)) + goto reject_ffFJKG; + if (ffB->hasPort(\ARST)) { + if (port(ffB, \ARST) != port(dff, \ARST)) + goto reject_ffFJKG; + if (param(ffB, \ARST_POLARITY) != param(dff, \ARST_POLARITY)) + goto reject_ffFJKG; + } + } + + ffFJKG = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigH = dffQ; + +reject_ffFJKG: ; + } + } +endcode + +code argD argSdff ffH sigH sigO clock clock_pol + if (ffFJKG && nusers(sigH) == 2 && + (mul->type != \QL_DSP)) { + argD = sigH; + argSdff = false; + subpattern(out_dffe); + if (dff) { + // H does not have a CE-like (hold) input + if (dff->hasPort(\EN)) + goto reject_ffH; + + // Reset signal of H (IRSTBOT) shared with B + if (ffB->hasPort(\ARST) != dff->hasPort(\ARST)) + goto reject_ffH; + if (ffB->hasPort(\ARST)) { + if (port(ffB, \ARST) != port(dff, \ARST)) + goto reject_ffH; + if (param(ffB, \ARST_POLARITY) != param(dff, \ARST_POLARITY)) + goto reject_ffH; + } + + ffH = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigH = dffQ; + +reject_ffH: ; + } + } + + sigO = sigH; +endcode + +match add + if mul->type != \QL_DSP || (param(mul, \ENABLE_DSP).as_int() == 1) + + select add->type.in($add) + choice AB {\A, \B} + select nusers(port(add, AB)) == 2 + + index port(add, AB)[0] === sigH[0] + filter GetSize(port(add, AB)) <= GetSize(sigH) + filter port(add, AB) == sigH.extract(0, GetSize(port(add, AB))) + filter nusers(sigH.extract_end(GetSize(port(add, AB)))) <= 1 + set addAB AB + optional +endmatch + +code sigCD sigO cd_signed + if (add) { + sigCD = port(add, addAB == \A ? \B : \A); + cd_signed = param(add, addAB == \A ? \B_SIGNED : \A_SIGNED).as_bool(); + + int natural_mul_width = GetSize(sigA) + GetSize(sigB); + int actual_mul_width = GetSize(sigH); + int actual_acc_width = GetSize(sigCD); + + if ((actual_acc_width > actual_mul_width) && (natural_mul_width > actual_mul_width)) + reject; + // If accumulator, check adder width and signedness + if (sigCD == sigH && (actual_acc_width != actual_mul_width) && (param(mul, \A_SIGNED).as_bool() != param(add, \A_SIGNED).as_bool())) + reject; + + sigO = port(add, \Y); + } +endcode + +match mux + select mux->type == $mux + choice AB {\A, \B} + select nusers(port(mux, AB)) == 2 + index port(mux, AB) === sigO + set muxAB AB + optional +endmatch + +code sigO + if (mux) + sigO = port(mux, \Y); +endcode + +code argD argSdff ffO sigO sigCD clock clock_pol cd_signed o_lo + if (mul->type != \QL_DSP || + // Ensure that register is not already used + ((param(mul, \ENABLE_DSP).as_int() == 1))) { + + dff = nullptr; + + // First try entire sigO + if (nusers(sigO) == 2) { + argD = sigO; + argSdff = !mux; + subpattern(out_dffe); + } + + // Otherwise try just its least significant 16 bits + if (!dff && GetSize(sigO) > 16) { + argD = sigO.extract(0, 16); + if (nusers(argD) == 2) { + argSdff = !mux; + subpattern(out_dffe); + o_lo = dff; + } + } + + if (dff) { + ffO = dff; + clock = dffclock; + clock_pol = dffclock_pol; + + sigO.replace(sigO.extract(0, GetSize(dffQ)), dffQ); + } + + // Loading value into output register is not + // supported unless using accumulator + if (mux) { + if (sigCD != sigO) + reject; + sigCD = port(mux, muxAB == \B ? \A : \B); + + cd_signed = add && param(add, \A_SIGNED).as_bool() && param(add, \B_SIGNED).as_bool(); + } else if (dff && dff->hasPort(\SRST)) { + if (sigCD != sigO) + reject; + sigCD = param(dff, \SRST_VALUE); + + cd_signed = add && param(add, \A_SIGNED).as_bool() && param(add, \B_SIGNED).as_bool(); + } + } +endcode + +code argQ ffCD sigCD clock clock_pol + if (!sigCD.empty() && sigCD != sigO && + (mul->type != \QL_DSP || (!param(mul, \C_REG).as_bool() && !param(mul, \D_REG).as_bool()))) { + argQ = sigCD; + subpattern(in_dffe); + if (dff) { + // Reset signal of C (IRSTTOP) and D (IRSTBOT) + // shared with A and B + if (ffA) { + if (ffA->hasPort(\ARST) != dff->hasPort(\ARST)) + goto reject_ffCD; + if (ffA->hasPort(\ARST)) { + if (port(ffA, \ARST) != port(dff, \ARST)) + goto reject_ffCD; + if (param(ffA, \ARST_POLARITY) != param(dff, \ARST_POLARITY)) + goto reject_ffCD; + } + } + if (ffB) { + if (ffB->hasPort(\ARST) != dff->hasPort(\ARST)) + goto reject_ffCD; + if (ffB->hasPort(\ARST)) { + if (port(ffB, \ARST) != port(dff, \ARST)) + goto reject_ffCD; + if (param(ffB, \ARST_POLARITY) != param(dff, \ARST_POLARITY)) + goto reject_ffCD; + } + } + + ffCD = dff; + clock = dffclock; + clock_pol = dffclock_pol; + sigCD = dffD; + +reject_ffCD: ; + } + } +endcode + +code sigCD + sigCD.extend_u0(32, cd_signed); +endcode + +code + accept; +endcode + +// ####################### + +subpattern in_dffe +arg argD argQ clock clock_pol + +code + dff = nullptr; + if (argQ.empty()) + reject; + for (auto c : argQ.chunks()) { + if (!c.wire) + reject; + if (c.wire->get_bool_attribute(\keep)) + reject; + Const init = c.wire->attributes.at(\init, State::Sx); + if (!init.is_fully_undef() && !init.is_fully_zero()) + reject; + } +endcode + +match ff + select ff->type.in($dff, $dffe) + // DSP48E1 does not support clock inversion + select param(ff, \CLK_POLARITY).as_bool() + + slice offset GetSize(port(ff, \D)) + index port(ff, \Q)[offset] === argQ[0] + + // Check that the rest of argQ is present + filter GetSize(port(ff, \Q)) >= offset + GetSize(argQ) + filter port(ff, \Q).extract(offset, GetSize(argQ)) == argQ +endmatch + +code argQ argD +{ + if (clock != SigBit()) { + if (port(ff, \CLK) != clock) + reject; + if (param(ff, \CLK_POLARITY).as_bool() != clock_pol) + reject; + } + + SigSpec Q = port(ff, \Q); + dff = ff; + dffclock = port(ff, \CLK); + dffclock_pol = param(ff, \CLK_POLARITY).as_bool(); + dffD = argQ; + argD = port(ff, \D); + argQ = Q; + dffD.replace(argQ, argD); +} +endcode + +// ####################### + +subpattern out_dffe +arg argD argSdff argQ clock clock_pol + +code + dff = nullptr; + for (auto c : argD.chunks()) + if (c.wire->get_bool_attribute(\keep)) + reject; +endcode + +match ff + select ff->type.in($dff, $dffe, $sdff, $sdffce) + // QL_DSP does not support clock inversion + select param(ff, \CLK_POLARITY).as_bool() + + slice offset GetSize(port(ff, \D)) + index port(ff, \D)[offset] === argD[0] + + // Only allow sync reset if requested. + filter argSdff || ff->type.in($dff, $dffe) + // Check that the rest of argD is present + filter GetSize(port(ff, \D)) >= offset + GetSize(argD) + filter port(ff, \D).extract(offset, GetSize(argD)) == argD +endmatch + +code argQ + if (ff) { + if (clock != SigBit()) { + if (port(ff, \CLK) != clock) + reject; + if (param(ff, \CLK_POLARITY).as_bool() != clock_pol) + reject; + } + SigSpec D = port(ff, \D); + SigSpec Q = port(ff, \Q); + argQ = argD; + argQ.replace(D, Q); + + for (auto c : argQ.chunks()) { + Const init = c.wire->attributes.at(\init, State::Sx); + if (!init.is_fully_undef() && !init.is_fully_zero()) + reject; + } + + dff = ff; + dffQ = argQ; + dffclock = port(ff, \CLK); + dffclock_pol = param(ff, \CLK_POLARITY).as_bool(); + } +endcode diff --git a/ql-dsp-plugin/ql-dsp-pm.h b/ql-dsp-plugin/ql-dsp-pm.h deleted file mode 100644 index 6a68e1c7c..000000000 --- a/ql-dsp-plugin/ql-dsp-pm.h +++ /dev/null @@ -1,1871 +0,0 @@ -struct ql_dsp_pm { - Module *module; - SigMap sigmap; - std::function on_accept; - bool setup_done; - bool generate_mode; - int accept_cnt; - - uint32_t rngseed; - int rng(unsigned int n) - { - rngseed ^= rngseed << 13; - rngseed ^= rngseed >> 17; - rngseed ^= rngseed << 5; - return rngseed % n; - } - - typedef std::tuple<> index_0_key_type; - typedef std::tuple index_0_value_type; - dict> index_0; - typedef std::tuple index_6_key_type; - typedef std::tuple index_6_value_type; - dict> index_6; - typedef std::tuple index_8_key_type; - typedef std::tuple index_8_value_type; - dict> index_8; - typedef std::tuple index_16_key_type; - typedef std::tuple index_16_value_type; - dict> index_16; - typedef std::tuple index_20_key_type; - typedef std::tuple index_20_value_type; - dict> index_20; - dict> sigusers; - pool blacklist_cells; - pool autoremove_cells; - dict rollback_cache; - int rollback; - - struct state_ql_dsp_t { - Cell *add; - IdString addAB; - SigSpec argD; - SigSpec argQ; - bool argSdff; - bool cd_signed; - SigBit clock; - bool clock_pol; - Cell *ff; - Cell *ffA; - Cell *ffB; - Cell *ffCD; - Cell *ffFJKG; - Cell *ffH; - Cell *ffO; - Cell *mul; - Cell *mux; - IdString muxAB; - bool o_lo; - SigSpec sigA; - SigSpec sigB; - SigSpec sigCD; - SigSpec sigH; - SigSpec sigO; - } st_ql_dsp; - - struct udata_ql_dsp_t { - Cell *dff; - SigSpec dffD; - SigSpec dffQ; - SigBit dffclock; - bool dffclock_pol; - } ud_ql_dsp; - - IdString id_b_A{"\\A"}; - IdString id_b_ARST{"\\ARST"}; - IdString id_b_ARST_POLARITY{"\\ARST_POLARITY"}; - IdString id_b_A_REG{"\\A_REG"}; - IdString id_b_A_SIGNED{"\\A_SIGNED"}; - IdString id_b_B{"\\B"}; - IdString id_b_B_REG{"\\B_REG"}; - IdString id_b_B_SIGNED{"\\B_SIGNED"}; - IdString id_b_CLK{"\\CLK"}; - IdString id_b_CLK_POLARITY{"\\CLK_POLARITY"}; - IdString id_b_C_REG{"\\C_REG"}; - IdString id_b_D{"\\D"}; - IdString id_b_D_REG{"\\D_REG"}; - IdString id_b_EN{"\\EN"}; - IdString id_b_O{"\\O"}; - IdString id_b_Q{"\\Q"}; - IdString id_b_QL_DSP{"\\QL_DSP"}; - IdString id_b_SRST{"\\SRST"}; - IdString id_b_SRST_VALUE{"\\SRST_VALUE"}; - IdString id_b_ENABLE_DSP{"\\ENABLE_DSP"}; - IdString id_b_Y{"\\Y"}; - IdString id_b_init{"\\init"}; - IdString id_b_keep{"\\keep"}; - IdString id_d_add{"$add"}; - IdString id_d_dff{"$dff"}; - IdString id_d_dffe{"$dffe"}; - IdString id_d_mul{"$mul"}; - IdString id_d_mux{"$mux"}; - IdString id_d_sdff{"$sdff"}; - IdString id_d_sdffce{"$sdffce"}; - - void add_siguser(const SigSpec &sig, Cell *cell) - { - for (auto bit : sigmap(sig)) { - if (bit.wire == nullptr) - continue; - sigusers[bit].insert(cell); - } - } - - void blacklist(Cell *cell) - { - if (cell != nullptr && blacklist_cells.insert(cell).second) { - auto ptr = rollback_cache.find(cell); - if (ptr == rollback_cache.end()) - return; - int rb = ptr->second; - if (rollback == 0 || rollback > rb) - rollback = rb; - } - } - - void autoremove(Cell *cell) - { - if (cell != nullptr) { - autoremove_cells.insert(cell); - blacklist(cell); - } - } - - SigSpec port(Cell *cell, IdString portname) { return sigmap(cell->getPort(portname)); } - - SigSpec port(Cell *cell, IdString portname, const SigSpec &defval) { return sigmap(cell->connections_.at(portname, defval)); } - - Const param(Cell *cell, IdString paramname) { return cell->getParam(paramname); } - - Const param(Cell *cell, IdString paramname, const Const &defval) { return cell->parameters.at(paramname, defval); } - - int nusers(const SigSpec &sig) - { - pool users; - for (auto bit : sigmap(sig)) - for (auto user : sigusers[bit]) - users.insert(user); - return GetSize(users); - } - - ql_dsp_pm(Module *module, const vector &cells) - : module(module), sigmap(module), setup_done(false), generate_mode(false), rngseed(12345678) - { - setup(cells); - } - - ql_dsp_pm(Module *module) : module(module), sigmap(module), setup_done(false), generate_mode(false), rngseed(12345678) {} - - void setup(const vector &cells) - { - ud_ql_dsp.dff = nullptr; - ud_ql_dsp.dffD = SigSpec(); - ud_ql_dsp.dffQ = SigSpec(); - ud_ql_dsp.dffclock = SigBit(); - ud_ql_dsp.dffclock_pol = bool(); - log_assert(!setup_done); - setup_done = true; - for (auto port : module->ports) - add_siguser(module->wire(port), nullptr); - for (auto cell : module->cells()) - for (auto &conn : cell->connections()) - add_siguser(conn.second, cell); - for (auto cell : cells) { - do { - Cell *mul = cell; - index_0_value_type value; - std::get<0>(value) = cell; - if (!(mul->type.in(id_d_mul, id_b_QL_DSP))) - continue; - if (!(GetSize(mul->getPort(id_b_A)) + GetSize(mul->getPort(id_b_B)) > 10)) - continue; - index_0_key_type key; - index_0[key].push_back(value); - } while (0); - do { - Cell *add = cell; - index_6_value_type value; - std::get<0>(value) = cell; - if (!(add->type.in(id_d_add))) - continue; - vector _pmg_choices_AB = {id_b_A, id_b_B}; - for (const IdString &AB : _pmg_choices_AB) { - std::get<1>(value) = AB; - if (!(nusers(port(add, AB)) == 2)) - continue; - index_6_key_type key; - std::get<0>(key) = port(add, AB)[0]; - index_6[key].push_back(value); - } - } while (0); - do { - Cell *mux = cell; - index_8_value_type value; - std::get<0>(value) = cell; - if (!(mux->type == id_d_mux)) - continue; - vector _pmg_choices_AB = {id_b_A, id_b_B}; - for (const IdString &AB : _pmg_choices_AB) { - std::get<1>(value) = AB; - if (!(nusers(port(mux, AB)) == 2)) - continue; - index_8_key_type key; - std::get<0>(key) = port(mux, AB); - index_8[key].push_back(value); - } - } while (0); - do { - Cell *ff = cell; - index_16_value_type value; - std::get<0>(value) = cell; - if (!(ff->type.in(id_d_dff, id_d_dffe))) - continue; - if (!(param(ff, id_b_CLK_POLARITY).as_bool())) - continue; - int &offset = std::get<1>(value); - for (offset = 0; offset < GetSize(port(ff, id_b_D)); offset++) { - index_16_key_type key; - std::get<0>(key) = port(ff, id_b_Q)[offset]; - index_16[key].push_back(value); - } - } while (0); - do { - Cell *ff = cell; - index_20_value_type value; - std::get<0>(value) = cell; - if (!(ff->type.in(id_d_dff, id_d_dffe, id_d_sdff, id_d_sdffce))) - continue; - if (!(param(ff, id_b_CLK_POLARITY).as_bool())) - continue; - int &offset = std::get<1>(value); - for (offset = 0; offset < GetSize(port(ff, id_b_D)); offset++) { - index_20_key_type key; - std::get<0>(key) = port(ff, id_b_D)[offset]; - index_20[key].push_back(value); - } - } while (0); - } - } - - ~ql_dsp_pm() - { - for (auto cell : autoremove_cells) - module->remove(cell); - } - - int run_ql_dsp(std::function on_accept_f) - { - log_assert(setup_done); - accept_cnt = 0; - on_accept = on_accept_f; - rollback = 0; - st_ql_dsp.add = nullptr; - st_ql_dsp.addAB = IdString(); - st_ql_dsp.argD = SigSpec(); - st_ql_dsp.argQ = SigSpec(); - st_ql_dsp.argSdff = bool(); - st_ql_dsp.cd_signed = bool(); - st_ql_dsp.clock = SigBit(); - st_ql_dsp.clock_pol = bool(); - st_ql_dsp.ff = nullptr; - st_ql_dsp.ffA = nullptr; - st_ql_dsp.ffB = nullptr; - st_ql_dsp.ffCD = nullptr; - st_ql_dsp.ffFJKG = nullptr; - st_ql_dsp.ffH = nullptr; - st_ql_dsp.ffO = nullptr; - st_ql_dsp.mul = nullptr; - st_ql_dsp.mux = nullptr; - st_ql_dsp.muxAB = IdString(); - st_ql_dsp.o_lo = bool(); - st_ql_dsp.sigA = SigSpec(); - st_ql_dsp.sigB = SigSpec(); - st_ql_dsp.sigCD = SigSpec(); - st_ql_dsp.sigH = SigSpec(); - st_ql_dsp.sigO = SigSpec(); - block_0(1); - log_assert(rollback_cache.empty()); - return accept_cnt; - } - - int run_ql_dsp(std::function on_accept_f) - { - return run_ql_dsp([&]() { on_accept_f(*this); }); - } - - int run_ql_dsp() - { - return run_ql_dsp([]() {}); - } - - void block_subpattern_ql_dsp_(int recursion) { block_0(recursion); } - void block_subpattern_ql_dsp_in_dffe(int recursion) { block_15(recursion); } - void block_subpattern_ql_dsp_out_dffe(int recursion) { block_19(recursion); } - - // passes/pmgen/ql_dsp.pmg:20 - void block_0(int recursion YS_MAYBE_UNUSED) - { - Cell *&mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - Cell *_pmg_backup_mul = mul; - - index_0_key_type key; - auto cells_ptr = index_0.find(key); - - if (cells_ptr != index_0.end()) { - const vector &cells = cells_ptr->second; - for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { - mul = std::get<0>(cells[_pmg_idx]); - if (blacklist_cells.count(mul)) - continue; - auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); - block_1(recursion + 1); - if (rollback_ptr.second) - rollback_cache.erase(rollback_ptr.first); - if (rollback) { - if (rollback != recursion) { - mul = _pmg_backup_mul; - return; - } - rollback = 0; - } - } - } - - mul = nullptr; - mul = _pmg_backup_mul; - } - - // passes/pmgen/ql_dsp.pmg:25 - void block_1(int recursion YS_MAYBE_UNUSED) - { - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_2(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - auto unextend = [](const SigSpec &sig) { - int i; - for (i = GetSize(sig) - 1; i > 0; i--) - if (sig[i] != sig[i - 1]) - break; - // Do not remove non-const sign bit - if (sig[i].wire) - ++i; - return sig.extract(0, i); - }; - sigA = unextend(port(mul, id_b_A)); - sigB = unextend(port(mul, id_b_B)); - SigSpec O; - if (mul->type == id_d_mul) - O = mul->getPort(id_b_Y); - else if (mul->type == id_b_QL_DSP) - O = mul->getPort(id_b_O); - else - log_abort(); - if (GetSize(O) <= 10) - reject; - // Only care about those bits that are used - int i; - for (i = 0; i < GetSize(O); i++) { - if (nusers(O[i]) <= 1) - break; - sigH.append(O[i]); - } - // This sigM could have no users if downstream sinks (e.g. id_d_add) is - // narrower than id_d_mul result, for example - if (i == 0) - reject; - log_assert(nusers(O.extract_end(i)) <= 1); - - block_2(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - sigA = SigSpec(); - sigB = SigSpec(); - sigH = SigSpec(); - } - - // passes/pmgen/ql_dsp.pmg:63 - void block_2(int recursion YS_MAYBE_UNUSED) - { - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_sigA = sigA; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_3(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - if (mul->type != id_b_QL_DSP || !param(mul, id_b_A_REG).as_bool()) { - argQ = sigA; - subpattern(in_dffe); - if (dff) { - ffA = dff; - clock = dffclock; - clock_pol = dffclock_pol; - sigA = dffD; - } - } - - block_3(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - sigA = _pmg_backup_sigA; - argQ = SigSpec(); - clock = SigBit(); - clock_pol = bool(); - ffA = nullptr; - } - - // passes/pmgen/ql_dsp.pmg:76 - void block_3(int recursion YS_MAYBE_UNUSED) - { - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_argQ = argQ; - SigBit _pmg_backup_clock = clock; - bool _pmg_backup_clock_pol = clock_pol; - SigSpec _pmg_backup_sigB = sigB; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_4(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - if (mul->type != id_b_QL_DSP || !param(mul, id_b_B_REG).as_bool()) { - argQ = sigB; - subpattern(in_dffe); - if (dff) { - ffB = dff; - clock = dffclock; - clock_pol = dffclock_pol; - sigB = dffD; - } - } - - block_4(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - argQ = _pmg_backup_argQ; - clock = _pmg_backup_clock; - clock_pol = _pmg_backup_clock_pol; - sigB = _pmg_backup_sigB; - ffB = nullptr; - } - - // passes/pmgen/ql_dsp.pmg:89 - void block_4(int recursion YS_MAYBE_UNUSED) - { - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigBit _pmg_backup_clock = clock; - bool _pmg_backup_clock_pol = clock_pol; - SigSpec _pmg_backup_sigH = sigH; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_5(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - if (nusers(sigH) == 2 && (mul->type != id_b_QL_DSP)) { - argD = sigH; - argSdff = false; - subpattern(out_dffe); - if (dff) { - // F/J/K/G do not have a CE-like (hold) input - if (dff->hasPort(id_b_EN)) - goto reject_ffFJKG; - // Reset signal of F/J (IRSTTOP) and K/G (IRSTBOT) - // shared with A and B - if (ffA) { - if (ffA->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) - goto reject_ffFJKG; - if (ffA->hasPort(id_b_ARST)) { - if (port(ffA, id_b_ARST) != port(dff, id_b_ARST)) - goto reject_ffFJKG; - if (param(ffA, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) - goto reject_ffFJKG; - } - } - if (ffB) { - if (ffB->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) - goto reject_ffFJKG; - if (ffB->hasPort(id_b_ARST)) { - if (port(ffB, id_b_ARST) != port(dff, id_b_ARST)) - goto reject_ffFJKG; - if (param(ffB, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) - goto reject_ffFJKG; - } - } - ffFJKG = dff; - clock = dffclock; - clock_pol = dffclock_pol; - sigH = dffQ; - reject_ffFJKG:; - } - } - - block_5(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - clock = _pmg_backup_clock; - clock_pol = _pmg_backup_clock_pol; - sigH = _pmg_backup_sigH; - argD = SigSpec(); - argSdff = bool(); - ffFJKG = nullptr; - } - - // passes/pmgen/ql_dsp.pmg:134 - void block_5(int recursion YS_MAYBE_UNUSED) - { - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; - SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_argD = argD; - bool _pmg_backup_argSdff = argSdff; - SigBit _pmg_backup_clock = clock; - bool _pmg_backup_clock_pol = clock_pol; - SigSpec _pmg_backup_sigH = sigH; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_6(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - if (ffFJKG && nusers(sigH) == 2 && (mul->type != id_b_QL_DSP)) { - argD = sigH; - argSdff = false; - subpattern(out_dffe); - if (dff) { - // H does not have a CE-like (hold) input - if (dff->hasPort(id_b_EN)) - goto reject_ffH; - // Reset signal of H (IRSTBOT) shared with B - if (ffB->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) - goto reject_ffH; - if (ffB->hasPort(id_b_ARST)) { - if (port(ffB, id_b_ARST) != port(dff, id_b_ARST)) - goto reject_ffH; - if (param(ffB, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) - goto reject_ffH; - } - ffH = dff; - clock = dffclock; - clock_pol = dffclock_pol; - sigH = dffQ; - reject_ffH:; - } - } - sigO = sigH; - - block_6(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - argD = _pmg_backup_argD; - argSdff = _pmg_backup_argSdff; - clock = _pmg_backup_clock; - clock_pol = _pmg_backup_clock_pol; - sigH = _pmg_backup_sigH; - ffH = nullptr; - sigO = SigSpec(); - } - - // passes/pmgen/ql_dsp.pmg:167 - void block_6(int recursion YS_MAYBE_UNUSED) - { - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; - Cell *&add YS_MAYBE_UNUSED = st_ql_dsp.add; - IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - Cell *_pmg_backup_add = add; - - if (!(mul->type != id_b_QL_DSP || (param(mul, id_b_ENABLE_DSP).as_int() == 1))) { - add = nullptr; - block_7(recursion + 1); - add = _pmg_backup_add; - return; - } - - index_6_key_type key; - std::get<0>(key) = sigH[0]; - auto cells_ptr = index_6.find(key); - - if (cells_ptr != index_6.end()) { - const vector &cells = cells_ptr->second; - for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { - add = std::get<0>(cells[_pmg_idx]); - const IdString &AB YS_MAYBE_UNUSED = std::get<1>(cells[_pmg_idx]); - if (blacklist_cells.count(add)) - continue; - if (!(GetSize(port(add, AB)) <= GetSize(sigH))) - continue; - if (!(port(add, AB) == sigH.extract(0, GetSize(port(add, AB))))) - continue; - if (!(nusers(sigH.extract_end(GetSize(port(add, AB)))) <= 1)) - continue; - auto _pmg_backup_addAB = addAB; - addAB = AB; - auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); - block_7(recursion + 1); - addAB = _pmg_backup_addAB; - if (rollback_ptr.second) - rollback_cache.erase(rollback_ptr.first); - if (rollback) { - if (rollback != recursion) { - add = _pmg_backup_add; - return; - } - rollback = 0; - } - } - } - - add = nullptr; - block_7(recursion + 1); - add = _pmg_backup_add; - } - - // passes/pmgen/ql_dsp.pmg:182 - void block_7(int recursion YS_MAYBE_UNUSED) - { - Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; - const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; - SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; - SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_sigO = sigO; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_8(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - if (add) { - sigCD = port(add, addAB == id_b_A ? id_b_B : id_b_A); - cd_signed = param(add, addAB == id_b_A ? id_b_B_SIGNED : id_b_A_SIGNED).as_bool(); - int natural_mul_width = GetSize(sigA) + GetSize(sigB); - int actual_mul_width = GetSize(sigH); - int actual_acc_width = GetSize(sigCD); - if ((actual_acc_width > actual_mul_width) && (natural_mul_width > actual_mul_width)) - reject; - // If accumulator, check adder width and signedness - if (sigCD == sigH && (actual_acc_width != actual_mul_width) && - (param(mul, id_b_A_SIGNED).as_bool() != param(add, id_b_A_SIGNED).as_bool())) - reject; - sigO = port(add, id_b_Y); - } - - block_8(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - sigO = _pmg_backup_sigO; - cd_signed = bool(); - sigCD = SigSpec(); - } - - // passes/pmgen/ql_dsp.pmg:201 - void block_8(int recursion YS_MAYBE_UNUSED) - { - Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; - const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - const SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; - Cell *&mux YS_MAYBE_UNUSED = st_ql_dsp.mux; - IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - Cell *_pmg_backup_mux = mux; - - index_8_key_type key; - std::get<0>(key) = sigO; - auto cells_ptr = index_8.find(key); - - if (cells_ptr != index_8.end()) { - const vector &cells = cells_ptr->second; - for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { - mux = std::get<0>(cells[_pmg_idx]); - const IdString &AB YS_MAYBE_UNUSED = std::get<1>(cells[_pmg_idx]); - if (blacklist_cells.count(mux)) - continue; - auto _pmg_backup_muxAB = muxAB; - muxAB = AB; - auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); - block_9(recursion + 1); - muxAB = _pmg_backup_muxAB; - if (rollback_ptr.second) - rollback_cache.erase(rollback_ptr.first); - if (rollback) { - if (rollback != recursion) { - mux = _pmg_backup_mux; - return; - } - rollback = 0; - } - } - } - - mux = nullptr; - block_9(recursion + 1); - mux = _pmg_backup_mux; - } - - // passes/pmgen/ql_dsp.pmg:210 - void block_9(int recursion YS_MAYBE_UNUSED) - { - Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; - const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; - const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - const SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_sigO = sigO; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_10(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - if (mux) - sigO = port(mux, id_b_Y); - - block_10(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - sigO = _pmg_backup_sigO; - } - - // passes/pmgen/ql_dsp.pmg:215 - void block_10(int recursion YS_MAYBE_UNUSED) - { - Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; - const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; - const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; - SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&ffO YS_MAYBE_UNUSED = st_ql_dsp.ffO; - bool &o_lo YS_MAYBE_UNUSED = st_ql_dsp.o_lo; - SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; - SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_argD = argD; - bool _pmg_backup_argSdff = argSdff; - bool _pmg_backup_cd_signed = cd_signed; - SigBit _pmg_backup_clock = clock; - bool _pmg_backup_clock_pol = clock_pol; - SigSpec _pmg_backup_sigCD = sigCD; - SigSpec _pmg_backup_sigO = sigO; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_11(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - if (mul->type != id_b_QL_DSP || (param(mul, id_b_ENABLE_DSP).as_int() != 0)) { - dff = nullptr; - // First try entire sigO - if (nusers(sigO) == 2) { - argD = sigO; - argSdff = !mux; - subpattern(out_dffe); - } - // Otherwise try just its least significant 16 bits - if (!dff && GetSize(sigO) > 16) { - argD = sigO.extract(0, 16); - if (nusers(argD) == 2) { - argSdff = !mux; - subpattern(out_dffe); - o_lo = dff; - } - } - if (dff) { - ffO = dff; - clock = dffclock; - clock_pol = dffclock_pol; - sigO.replace(sigO.extract(0, GetSize(dffQ)), dffQ); - } - // Loading value into output register is not - // supported unless using accumulator - if (mux) { - if (sigCD != sigO) - reject; - sigCD = port(mux, muxAB == id_b_B ? id_b_A : id_b_B); - cd_signed = add && param(add, id_b_A_SIGNED).as_bool() && param(add, id_b_B_SIGNED).as_bool(); - } else if (dff && dff->hasPort(id_b_SRST)) { - if (sigCD != sigO) - reject; - sigCD = param(dff, id_b_SRST_VALUE); - cd_signed = add && param(add, id_b_A_SIGNED).as_bool() && param(add, id_b_B_SIGNED).as_bool(); - } - } - - block_11(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - argD = _pmg_backup_argD; - argSdff = _pmg_backup_argSdff; - cd_signed = _pmg_backup_cd_signed; - clock = _pmg_backup_clock; - clock_pol = _pmg_backup_clock_pol; - sigCD = _pmg_backup_sigCD; - sigO = _pmg_backup_sigO; - ffO = nullptr; - o_lo = bool(); - } - - // passes/pmgen/ql_dsp.pmg:267 - void block_11(int recursion YS_MAYBE_UNUSED) - { - Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; - const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; - Cell *const &ffO YS_MAYBE_UNUSED = st_ql_dsp.ffO; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; - const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; - const bool &o_lo YS_MAYBE_UNUSED = st_ql_dsp.o_lo; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; - SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&ffCD YS_MAYBE_UNUSED = st_ql_dsp.ffCD; - SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_argQ = argQ; - SigBit _pmg_backup_clock = clock; - bool _pmg_backup_clock_pol = clock_pol; - SigSpec _pmg_backup_sigCD = sigCD; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_12(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - if (!sigCD.empty() && sigCD != sigO && - (mul->type != id_b_QL_DSP || (!param(mul, id_b_C_REG).as_bool() && !param(mul, id_b_D_REG).as_bool()))) { - argQ = sigCD; - subpattern(in_dffe); - if (dff) { - // Reset signal of C (IRSTTOP) and D (IRSTBOT) - // shared with A and B - if (ffA) { - if (ffA->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) - goto reject_ffCD; - if (ffA->hasPort(id_b_ARST)) { - if (port(ffA, id_b_ARST) != port(dff, id_b_ARST)) - goto reject_ffCD; - if (param(ffA, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) - goto reject_ffCD; - } - } - if (ffB) { - if (ffB->hasPort(id_b_ARST) != dff->hasPort(id_b_ARST)) - goto reject_ffCD; - if (ffB->hasPort(id_b_ARST)) { - if (port(ffB, id_b_ARST) != port(dff, id_b_ARST)) - goto reject_ffCD; - if (param(ffB, id_b_ARST_POLARITY) != param(dff, id_b_ARST_POLARITY)) - goto reject_ffCD; - } - } - ffCD = dff; - clock = dffclock; - clock_pol = dffclock_pol; - sigCD = dffD; - reject_ffCD:; - } - } - - block_12(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - argQ = _pmg_backup_argQ; - clock = _pmg_backup_clock; - clock_pol = _pmg_backup_clock_pol; - sigCD = _pmg_backup_sigCD; - ffCD = nullptr; - } - - // passes/pmgen/ql_dsp.pmg:306 - void block_12(int recursion YS_MAYBE_UNUSED) - { - Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; - const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &ffCD YS_MAYBE_UNUSED = st_ql_dsp.ffCD; - Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; - Cell *const &ffO YS_MAYBE_UNUSED = st_ql_dsp.ffO; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; - const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; - const bool &o_lo YS_MAYBE_UNUSED = st_ql_dsp.o_lo; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; - SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_sigCD = sigCD; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_13(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - sigCD.extend_u0(32, cd_signed); - - block_13(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - sigCD = _pmg_backup_sigCD; - } - - // passes/pmgen/ql_dsp.pmg:310 - void block_13(int recursion YS_MAYBE_UNUSED) - { - Cell *const &add YS_MAYBE_UNUSED = st_ql_dsp.add; - const IdString &addAB YS_MAYBE_UNUSED = st_ql_dsp.addAB; - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const bool &cd_signed YS_MAYBE_UNUSED = st_ql_dsp.cd_signed; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *const &ffA YS_MAYBE_UNUSED = st_ql_dsp.ffA; - Cell *const &ffB YS_MAYBE_UNUSED = st_ql_dsp.ffB; - Cell *const &ffCD YS_MAYBE_UNUSED = st_ql_dsp.ffCD; - Cell *const &ffFJKG YS_MAYBE_UNUSED = st_ql_dsp.ffFJKG; - Cell *const &ffH YS_MAYBE_UNUSED = st_ql_dsp.ffH; - Cell *const &ffO YS_MAYBE_UNUSED = st_ql_dsp.ffO; - Cell *const &mul YS_MAYBE_UNUSED = st_ql_dsp.mul; - Cell *const &mux YS_MAYBE_UNUSED = st_ql_dsp.mux; - const IdString &muxAB YS_MAYBE_UNUSED = st_ql_dsp.muxAB; - const bool &o_lo YS_MAYBE_UNUSED = st_ql_dsp.o_lo; - const SigSpec &sigA YS_MAYBE_UNUSED = st_ql_dsp.sigA; - const SigSpec &sigB YS_MAYBE_UNUSED = st_ql_dsp.sigB; - const SigSpec &sigCD YS_MAYBE_UNUSED = st_ql_dsp.sigCD; - const SigSpec &sigH YS_MAYBE_UNUSED = st_ql_dsp.sigH; - const SigSpec &sigO YS_MAYBE_UNUSED = st_ql_dsp.sigO; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_14(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - accept; - - block_14(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - } - - void block_14(int recursion YS_MAYBE_UNUSED) {} - - // passes/pmgen/ql_dsp.pmg:319 - void block_15(int recursion YS_MAYBE_UNUSED) - { - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_16(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - dff = nullptr; - if (argQ.empty()) - reject; - for (auto c : argQ.chunks()) { - if (!c.wire) - reject; - if (c.wire->get_bool_attribute(id_b_keep)) - reject; - Const init = c.wire->attributes.at(id_b_init, State::Sx); - if (!init.is_fully_undef() && !init.is_fully_zero()) - reject; - } - - block_16(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - } - - // passes/pmgen/ql_dsp.pmg:334 - void block_16(int recursion YS_MAYBE_UNUSED) - { - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&ff YS_MAYBE_UNUSED = st_ql_dsp.ff; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - Cell *_pmg_backup_ff = ff; - - index_16_key_type key; - std::get<0>(key) = argQ[0]; - auto cells_ptr = index_16.find(key); - - if (cells_ptr != index_16.end()) { - const vector &cells = cells_ptr->second; - for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { - ff = std::get<0>(cells[_pmg_idx]); - const int &offset YS_MAYBE_UNUSED = std::get<1>(cells[_pmg_idx]); - if (blacklist_cells.count(ff)) - continue; - if (!(GetSize(port(ff, id_b_Q)) >= offset + GetSize(argQ))) - continue; - if (!(port(ff, id_b_Q).extract(offset, GetSize(argQ)) == argQ)) - continue; - auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); - block_17(recursion + 1); - if (rollback_ptr.second) - rollback_cache.erase(rollback_ptr.first); - if (rollback) { - if (rollback != recursion) { - ff = _pmg_backup_ff; - return; - } - rollback = 0; - } - } - } - - ff = nullptr; - ff = _pmg_backup_ff; - } - - // passes/pmgen/ql_dsp.pmg:347 - void block_17(int recursion YS_MAYBE_UNUSED) - { - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *const &ff YS_MAYBE_UNUSED = st_ql_dsp.ff; - SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_argD = argD; - SigSpec _pmg_backup_argQ = argQ; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_18(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - { - if (clock != SigBit()) { - if (port(ff, id_b_CLK) != clock) - reject; - if (param(ff, id_b_CLK_POLARITY).as_bool() != clock_pol) - reject; - } - SigSpec Q = port(ff, id_b_Q); - dff = ff; - dffclock = port(ff, id_b_CLK); - dffclock_pol = param(ff, id_b_CLK_POLARITY).as_bool(); - dffD = argQ; - argD = port(ff, id_b_D); - argQ = Q; - dffD.replace(argQ, argD); - } - - block_18(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - argD = _pmg_backup_argD; - argQ = _pmg_backup_argQ; - } - - void block_18(int recursion YS_MAYBE_UNUSED) {} - - // passes/pmgen/ql_dsp.pmg:372 - void block_19(int recursion YS_MAYBE_UNUSED) - { - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_20(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - dff = nullptr; - for (auto c : argD.chunks()) - if (c.wire->get_bool_attribute(id_b_keep)) - reject; - - block_20(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - } - - // passes/pmgen/ql_dsp.pmg:379 - void block_20(int recursion YS_MAYBE_UNUSED) - { - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *&ff YS_MAYBE_UNUSED = st_ql_dsp.ff; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - Cell *_pmg_backup_ff = ff; - - index_20_key_type key; - std::get<0>(key) = argD[0]; - auto cells_ptr = index_20.find(key); - - if (cells_ptr != index_20.end()) { - const vector &cells = cells_ptr->second; - for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) { - ff = std::get<0>(cells[_pmg_idx]); - const int &offset YS_MAYBE_UNUSED = std::get<1>(cells[_pmg_idx]); - if (blacklist_cells.count(ff)) - continue; - if (!(argSdff || ff->type.in(id_d_dff, id_d_dffe))) - continue; - if (!(GetSize(port(ff, id_b_D)) >= offset + GetSize(argD))) - continue; - if (!(port(ff, id_b_D).extract(offset, GetSize(argD)) == argD)) - continue; - auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion)); - block_21(recursion + 1); - if (rollback_ptr.second) - rollback_cache.erase(rollback_ptr.first); - if (rollback) { - if (rollback != recursion) { - ff = _pmg_backup_ff; - return; - } - rollback = 0; - } - } - } - - ff = nullptr; - ff = _pmg_backup_ff; - } - - // passes/pmgen/ql_dsp.pmg:394 - void block_21(int recursion YS_MAYBE_UNUSED) - { - const SigSpec &argD YS_MAYBE_UNUSED = st_ql_dsp.argD; - const bool &argSdff YS_MAYBE_UNUSED = st_ql_dsp.argSdff; - const SigBit &clock YS_MAYBE_UNUSED = st_ql_dsp.clock; - const bool &clock_pol YS_MAYBE_UNUSED = st_ql_dsp.clock_pol; - Cell *const &ff YS_MAYBE_UNUSED = st_ql_dsp.ff; - SigSpec &argQ YS_MAYBE_UNUSED = st_ql_dsp.argQ; - Cell *&dff YS_MAYBE_UNUSED = ud_ql_dsp.dff; - SigSpec &dffD YS_MAYBE_UNUSED = ud_ql_dsp.dffD; - SigSpec &dffQ YS_MAYBE_UNUSED = ud_ql_dsp.dffQ; - SigBit &dffclock YS_MAYBE_UNUSED = ud_ql_dsp.dffclock; - bool &dffclock_pol YS_MAYBE_UNUSED = ud_ql_dsp.dffclock_pol; - - SigSpec _pmg_backup_argQ = argQ; - -#define reject \ - do { \ - goto rollback_label; \ - } while (0) -#define accept \ - do { \ - accept_cnt++; \ - on_accept(); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define finish \ - do { \ - rollback = -1; \ - goto rollback_label; \ - } while (0) -#define branch \ - do { \ - block_22(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) -#define subpattern(pattern_name) \ - do { \ - block_subpattern_ql_dsp_##pattern_name(recursion + 1); \ - if (rollback) \ - goto rollback_label; \ - } while (0) - if (ff) { - if (clock != SigBit()) { - if (port(ff, id_b_CLK) != clock) - reject; - if (param(ff, id_b_CLK_POLARITY).as_bool() != clock_pol) - reject; - } - SigSpec D = port(ff, id_b_D); - SigSpec Q = port(ff, id_b_Q); - argQ = argD; - argQ.replace(D, Q); - for (auto c : argQ.chunks()) { - Const init = c.wire->attributes.at(id_b_init, State::Sx); - if (!init.is_fully_undef() && !init.is_fully_zero()) - reject; - } - dff = ff; - dffQ = argQ; - dffclock = port(ff, id_b_CLK); - dffclock_pol = param(ff, id_b_CLK_POLARITY).as_bool(); - } - - block_22(recursion + 1); -#undef reject -#undef accept -#undef finish -#undef branch -#undef subpattern - - rollback_label: - YS_MAYBE_UNUSED; - - argQ = _pmg_backup_argQ; - } - - void block_22(int recursion YS_MAYBE_UNUSED) {} -}; From 2c6ef5f5b3f8ea2855ef07e909b069b84ef0ad29 Mon Sep 17 00:00:00 2001 From: samycharas Date: Tue, 8 Jun 2021 22:47:29 +0200 Subject: [PATCH 329/845] Integrate ql-dsp into ql-qlf plugin Signed-off-by: samycharas --- Makefile | 2 +- ql-dsp-plugin/Makefile | 9 --------- ql-dsp-plugin/tests/Makefile | 1 - ql-dsp-plugin/tests/README.md | 10 ---------- ql-qlf-plugin/Makefile | 9 ++++++++- {ql-dsp-plugin => ql-qlf-plugin}/pmgen/pmgen.py | 0 {ql-dsp-plugin => ql-qlf-plugin}/pmgen/ql_dsp.pmg | 0 {ql-dsp-plugin => ql-qlf-plugin}/ql-dsp.cc | 0 ql-qlf-plugin/tests/bram/bram.tcl | 1 - ql-qlf-plugin/tests/dffs/dffs.tcl | 1 - ql-qlf-plugin/tests/full_adder/full_adder.tcl | 1 - ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl | 1 - ql-qlf-plugin/tests/latches/latches.tcl | 1 - ql-qlf-plugin/tests/logic/logic.tcl | 1 - ql-qlf-plugin/tests/mac_unit/mac_unit.tcl | 3 +-- ql-qlf-plugin/tests/multiplier/multiplier.tcl | 3 +-- ql-qlf-plugin/tests/shreg/shreg.tcl | 1 - 17 files changed, 11 insertions(+), 33 deletions(-) delete mode 100644 ql-dsp-plugin/Makefile delete mode 100644 ql-dsp-plugin/tests/Makefile delete mode 100644 ql-dsp-plugin/tests/README.md rename {ql-dsp-plugin => ql-qlf-plugin}/pmgen/pmgen.py (100%) rename {ql-dsp-plugin => ql-qlf-plugin}/pmgen/ql_dsp.pmg (100%) rename {ql-dsp-plugin => ql-qlf-plugin}/ql-dsp.cc (100%) diff --git a/Makefile b/Makefile index fe0219c30..180acdb02 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf ql-dsp +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/ql-dsp-plugin/Makefile b/ql-dsp-plugin/Makefile deleted file mode 100644 index a47e8fb01..000000000 --- a/ql-dsp-plugin/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -NAME = ql-dsp -SOURCES = ql-dsp.cc -include ../Makefile_plugin.common - -pre-build:=$(shell python3 pmgen/pmgen.py -o ql-dsp-pm.h -p ql_dsp pmgen/ql_dsp.pmg) - -clean: - $(MAKE) -f ../Makefile_plugin.common $@ - rm -f *pm.h diff --git a/ql-dsp-plugin/tests/Makefile b/ql-dsp-plugin/tests/Makefile deleted file mode 100644 index 320dfcfcb..000000000 --- a/ql-dsp-plugin/tests/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell pwd)/../../Makefile_test.common diff --git a/ql-dsp-plugin/tests/README.md b/ql-dsp-plugin/tests/README.md deleted file mode 100644 index 7617440e0..000000000 --- a/ql-dsp-plugin/tests/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Test folder for QL_DSP Plugin - -The ql-dsp-plugin integration directly impacts ql-qlf-plugin testcases -and testing for ql-dsp function should involve calling synth_quicklogic. -Therefore this test folder is currently empty and tests will be placed -under the ql-qlf plugin test folder. - -Currently, we're testing the ql_dsp function with : -* the mac_unit test -* the multiplier test diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 647925973..542d5d4c6 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -1,5 +1,6 @@ NAME = ql-qlf -SOURCES = synth_quicklogic.cc +SOURCES = synth_quicklogic.cc \ + ql-dsp.cc include ../Makefile_plugin.common COMMON = common @@ -17,7 +18,13 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10_DIR)/qlf_k6n10_dsp_map.v \ $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v +pre-build:=$(shell python3 pmgen/pmgen.py -o ql-dsp-pm.h -p ql_dsp pmgen/ql_dsp.pmg) + install_modules: $(VERILOG_MODULES) $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(notdir $(f));) install: install_modules + +clean: + $(MAKE) -f ../Makefile_plugin.common $@ + rm -f *pm.h diff --git a/ql-dsp-plugin/pmgen/pmgen.py b/ql-qlf-plugin/pmgen/pmgen.py similarity index 100% rename from ql-dsp-plugin/pmgen/pmgen.py rename to ql-qlf-plugin/pmgen/pmgen.py diff --git a/ql-dsp-plugin/pmgen/ql_dsp.pmg b/ql-qlf-plugin/pmgen/ql_dsp.pmg similarity index 100% rename from ql-dsp-plugin/pmgen/ql_dsp.pmg rename to ql-qlf-plugin/pmgen/ql_dsp.pmg diff --git a/ql-dsp-plugin/ql-dsp.cc b/ql-qlf-plugin/ql-dsp.cc similarity index 100% rename from ql-dsp-plugin/ql-dsp.cc rename to ql-qlf-plugin/ql-dsp.cc diff --git a/ql-qlf-plugin/tests/bram/bram.tcl b/ql-qlf-plugin/tests/bram/bram.tcl index cac2f40af..989b2d57b 100644 --- a/ql-qlf-plugin/tests/bram/bram.tcl +++ b/ql-qlf-plugin/tests/bram/bram.tcl @@ -1,6 +1,5 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } -plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index 2344c87c7..737acc1e8 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -1,6 +1,5 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } -plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index 0093aab10..fbcd3ca9c 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -1,6 +1,5 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } -plugin -i ql-dsp yosys -import ;# ingest plugin commands # Equivalence check for adder synthesis for qlf-k4n8 diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl index cf7aebb45..9ab802aac 100644 --- a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl +++ b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl @@ -1,6 +1,5 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf} -plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/latches/latches.tcl b/ql-qlf-plugin/tests/latches/latches.tcl index f8256f74a..d5821a628 100644 --- a/ql-qlf-plugin/tests/latches/latches.tcl +++ b/ql-qlf-plugin/tests/latches/latches.tcl @@ -1,6 +1,5 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } -plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/logic/logic.tcl b/ql-qlf-plugin/tests/logic/logic.tcl index fb19363ce..8017272f4 100644 --- a/ql-qlf-plugin/tests/logic/logic.tcl +++ b/ql-qlf-plugin/tests/logic/logic.tcl @@ -1,6 +1,5 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } -plugin -i ql-dsp yosys -import ;# ingest plugin commands #Logic test for qlf_k4n8 device diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl b/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl index 15eaa2717..5028d4153 100644 --- a/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl +++ b/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl @@ -1,6 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } -plugin -i ql-dsp +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands set TOP "mac_unit" diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.tcl b/ql-qlf-plugin/tests/multiplier/multiplier.tcl index 88185d9c4..762bac6ba 100644 --- a/ql-qlf-plugin/tests/multiplier/multiplier.tcl +++ b/ql-qlf-plugin/tests/multiplier/multiplier.tcl @@ -1,6 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } -plugin -i ql-dsp +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands set TOP "mult16x16" diff --git a/ql-qlf-plugin/tests/shreg/shreg.tcl b/ql-qlf-plugin/tests/shreg/shreg.tcl index 7c7b5c334..9be1ca33e 100644 --- a/ql-qlf-plugin/tests/shreg/shreg.tcl +++ b/ql-qlf-plugin/tests/shreg/shreg.tcl @@ -1,6 +1,5 @@ yosys -import if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } -plugin -i ql-dsp yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v From db7c1d52a2e3a3762652429b3ee38f9fc99a705c Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 9 Jun 2021 16:36:50 +0200 Subject: [PATCH 330/845] Remove pmgen.py, retrieve while building instead Signed-off-by: samycharas --- ql-qlf-plugin/Makefile | 2 + ql-qlf-plugin/pmgen/pmgen.py | 797 ----------------------------------- 2 files changed, 2 insertions(+), 797 deletions(-) delete mode 100644 ql-qlf-plugin/pmgen/pmgen.py diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 542d5d4c6..f0991b1d6 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -18,6 +18,8 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10_DIR)/qlf_k6n10_dsp_map.v \ $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v +retrieve-pmgen:=$(shell wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) + pre-build:=$(shell python3 pmgen/pmgen.py -o ql-dsp-pm.h -p ql_dsp pmgen/ql_dsp.pmg) install_modules: $(VERILOG_MODULES) diff --git a/ql-qlf-plugin/pmgen/pmgen.py b/ql-qlf-plugin/pmgen/pmgen.py deleted file mode 100644 index 592a26fa6..000000000 --- a/ql-qlf-plugin/pmgen/pmgen.py +++ /dev/null @@ -1,797 +0,0 @@ -#!/usr/bin/env python3 - -import re -import sys -import pprint -import getopt - -pp = pprint.PrettyPrinter(indent=4) - -prefix = None -pmgfiles = list() -outfile = None -debug = False -genhdr = False - -opts, args = getopt.getopt(sys.argv[1:], "p:o:dg") - -for o, a in opts: - if o == "-p": - prefix = a - elif o == "-o": - outfile = a - elif o == "-d": - debug = True - elif o == "-g": - genhdr = True - -if outfile is None: - outfile = "/dev/stdout" - -for a in args: - assert a.endswith(".pmg") - if prefix is None and len(args) == 1: - prefix = a[0:-4] - prefix = prefix.split('/')[-1] - pmgfiles.append(a) - -assert prefix is not None - -current_pattern = None -current_subpattern = None -patterns = dict() -subpatterns = dict() -subpattern_args = dict() -state_types = dict() -udata_types = dict() -blocks = list() -ids = dict() - -def rewrite_cpp(s): - t = list() - i = 0 - while i < len(s): - if s[i] in ("'", '"') and i + 1 < len(s): - j = i + 1 - while j + 1 < len(s) and s[j] != s[i]: - if s[j] == '\\' and j + 1 < len(s): - j += 1 - j += 1 - t.append(s[i:j+1]) - i = j + 1 - continue - - if s[i] in ('$', '\\') and i + 1 < len(s): - j = i + 1 - while True: - if j == len(s): - j -= 1 - break - if ord('a') <= ord(s[j]) <= ord('z'): - j += 1 - continue - if ord('A') <= ord(s[j]) <= ord('Z'): - j += 1 - continue - if ord('0') <= ord(s[j]) <= ord('9'): - j += 1 - continue - if s[j] == '_': - j += 1 - continue - j -= 1 - break - - n = s[i:j+1] - i = j + 1 - - if n[0] == '$': - v = "id_d_" + n[1:] - else: - v = "id_b_" + n[1:] - - if v not in ids: - ids[v] = n - else: - assert ids[v] == n - - t.append(v) - continue - - if s[i] == "\t": - t.append(" ") - else: - t.append(s[i]) - - i += 1 - - return "".join(t) - -def process_pmgfile(f, filename): - linenr = 0 - global current_pattern - global current_subpattern - while True: - linenr += 1 - line = f.readline() - if line == "": break - line = line.strip() - - cmd = line.split() - if len(cmd) == 0 or cmd[0].startswith("//"): continue - cmd = cmd[0] - - if cmd == "pattern": - if current_pattern is not None: - block = dict() - block["type"] = "final" - block["pattern"] = (current_pattern, current_subpattern) - blocks.append(block) - line = line.split() - assert len(line) == 2 - assert line[1] not in patterns - current_pattern = line[1] - current_subpattern = "" - patterns[current_pattern] = len(blocks) - subpatterns[(current_pattern, current_subpattern)] = len(blocks) - subpattern_args[(current_pattern, current_subpattern)] = list() - state_types[current_pattern] = dict() - udata_types[current_pattern] = dict() - continue - - assert current_pattern is not None - - if cmd == "fallthrough": - block = dict() - block["type"] = "fallthrough" - blocks.append(block) - line = line.split() - assert len(line) == 1 - continue - - if cmd == "subpattern": - if len(blocks) == 0 or blocks[-1]["type"] != "fallthrough": - block = dict() - block["type"] = "final" - block["pattern"] = (current_pattern, current_subpattern) - blocks.append(block) - elif len(blocks) and blocks[-1]["type"] == "fallthrough": - del blocks[-1] - line = line.split() - assert len(line) == 2 - current_subpattern = line[1] - subpattern_args[(current_pattern, current_subpattern)] = list() - assert (current_pattern, current_subpattern) not in subpatterns - subpatterns[(current_pattern, current_subpattern)] = len(blocks) - continue - - if cmd == "arg": - line = line.split() - assert len(line) > 1 - subpattern_args[(current_pattern, current_subpattern)] += line[1:] - continue - - if cmd == "state": - m = re.match(r"^state\s+<(.*?)>\s+(([A-Za-z_][A-Za-z_0-9]*\s+)*[A-Za-z_][A-Za-z_0-9]*)\s*$", line) - assert m - type_str = m.group(1) - states_str = m.group(2) - for s in re.split(r"\s+", states_str): - assert s not in state_types[current_pattern] - state_types[current_pattern][s] = type_str - continue - - if cmd == "udata": - m = re.match(r"^udata\s+<(.*?)>\s+(([A-Za-z_][A-Za-z_0-9]*\s+)*[A-Za-z_][A-Za-z_0-9]*)\s*$", line) - assert m - type_str = m.group(1) - udatas_str = m.group(2) - for s in re.split(r"\s+", udatas_str): - assert s not in udata_types[current_pattern] - udata_types[current_pattern][s] = type_str - continue - - if cmd == "match": - block = dict() - block["type"] = "match" - block["src"] = "%s:%d" % (filename, linenr) - block["pattern"] = (current_pattern, current_subpattern) - - block["genargs"] = None - block["gencode"] = None - - line = line.split() - assert len(line) == 2 - assert (line[1] not in state_types[current_pattern]) or (state_types[current_pattern][line[1]] == "Cell*") - block["cell"] = line[1] - state_types[current_pattern][line[1]] = "Cell*"; - - block["if"] = list() - block["setup"] = list() - block["index"] = list() - block["filter"] = list() - block["sets"] = list() - block["optional"] = False - block["semioptional"] = False - - while True: - linenr += 1 - l = f.readline() - assert l != "" - a = l.split() - if len(a) == 0 or a[0].startswith("//"): continue - if a[0] == "endmatch": break - - if a[0] == "if": - b = l.lstrip()[2:] - block["if"].append(rewrite_cpp(b.strip())) - continue - - if a[0] == "select": - b = l.lstrip()[6:] - block["setup"].append(("select", rewrite_cpp(b.strip()))) - continue - - if a[0] == "slice": - m = re.match(r"^\s*slice\s+(\S+)\s+(.*?)\s*$", l) - block["setup"].append(("slice", m.group(1), rewrite_cpp(m.group(2)))) - continue - - if a[0] == "choice": - m = re.match(r"^\s*choice\s+<(.*?)>\s+(\S+)\s+(.*?)\s*$", l) - block["setup"].append(("choice", m.group(1), m.group(2), rewrite_cpp(m.group(3)))) - continue - - if a[0] == "define": - m = re.match(r"^\s*define\s+<(.*?)>\s+(\S+)\s+(.*?)\s*$", l) - block["setup"].append(("define", m.group(1), m.group(2), rewrite_cpp(m.group(3)))) - continue - - if a[0] == "index": - m = re.match(r"^\s*index\s+<(.*?)>\s+(.*?)\s*===\s*(.*?)\s*$", l) - assert m - block["index"].append((m.group(1), rewrite_cpp(m.group(2)), rewrite_cpp(m.group(3)))) - continue - - if a[0] == "filter": - b = l.lstrip()[6:] - block["filter"].append(rewrite_cpp(b.strip())) - continue - - if a[0] == "set": - m = re.match(r"^\s*set\s+(\S+)\s+(.*?)\s*$", l) - block["sets"].append((m.group(1), rewrite_cpp(m.group(2)))) - continue - - if a[0] == "optional": - block["optional"] = True - continue - - if a[0] == "semioptional": - block["semioptional"] = True - continue - - if a[0] == "generate": - block["genargs"] = list([int(s) for s in a[1:]]) - if len(block["genargs"]) == 0: block["genargs"].append(100) - if len(block["genargs"]) == 1: block["genargs"].append(0) - assert len(block["genargs"]) == 2 - block["gencode"] = list() - while True: - linenr += 1 - l = f.readline() - assert l != "" - a = l.split() - if len(a) == 1 and a[0] == "endmatch": break - block["gencode"].append(rewrite_cpp(l.rstrip())) - break - - raise RuntimeError("'%s' statement not recognised on line %d" % (a[0], linenr)) - - if block["optional"]: - assert not block["semioptional"] - - blocks.append(block) - continue - - if cmd == "code": - block = dict() - block["type"] = "code" - block["src"] = "%s:%d" % (filename, linenr) - block["pattern"] = (current_pattern, current_subpattern) - - block["code"] = list() - block["fcode"] = list() - block["states"] = set() - - for s in line.split()[1:]: - if s not in state_types[current_pattern]: - raise RuntimeError("'%s' not in state_types" % s) - block["states"].add(s) - - codetype = "code" - - while True: - linenr += 1 - l = f.readline() - assert l != "" - a = l.split() - if len(a) == 0: continue - if a[0] == "endcode": break - - if a[0] == "finally": - codetype = "fcode" - continue - - block[codetype].append(rewrite_cpp(l.rstrip())) - - blocks.append(block) - continue - - raise RuntimeError("'%s' command not recognised" % cmd) - -for fn in pmgfiles: - with open(fn, "r") as f: - process_pmgfile(f, fn) - -if current_pattern is not None: - block = dict() - block["type"] = "final" - block["pattern"] = (current_pattern, current_subpattern) - blocks.append(block) - -current_pattern = None -current_subpattern = None - -if debug: - pp.pprint(blocks) - -with open(outfile, "w") as f: - for fn in pmgfiles: - print("// Generated by pmgen.py from {}".format(fn), file=f) - print("", file=f) - - if genhdr: - print("#include \"kernel/yosys.h\"", file=f) - print("#include \"kernel/sigtools.h\"", file=f) - print("", file=f) - print("YOSYS_NAMESPACE_BEGIN", file=f) - print("", file=f) - - print("struct {}_pm {{".format(prefix), file=f) - print(" Module *module;", file=f) - print(" SigMap sigmap;", file=f) - print(" std::function on_accept;", file=f) - print(" bool setup_done;", file=f) - print(" bool generate_mode;", file=f) - print(" int accept_cnt;", file=f) - print("", file=f) - - print(" uint32_t rngseed;", file=f) - print(" int rng(unsigned int n) {", file=f) - print(" rngseed ^= rngseed << 13;", file=f) - print(" rngseed ^= rngseed >> 17;", file=f) - print(" rngseed ^= rngseed << 5;", file=f) - print(" return rngseed % n;", file=f) - print(" }", file=f) - print("", file=f) - - for index in range(len(blocks)): - block = blocks[index] - if block["type"] == "match": - index_types = list() - for entry in block["index"]: - index_types.append(entry[0]) - value_types = ["Cell*"] - for entry in block["setup"]: - if entry[0] == "slice": - value_types.append("int") - if entry[0] == "choice": - value_types.append(entry[1]) - if entry[0] == "define": - value_types.append(entry[1]) - print(" typedef std::tuple<{}> index_{}_key_type;".format(", ".join(index_types), index), file=f) - print(" typedef std::tuple<{}> index_{}_value_type;".format(", ".join(value_types), index), file=f) - print(" dict> index_{};".format(index, index, index), file=f) - print(" dict> sigusers;", file=f) - print(" pool blacklist_cells;", file=f) - print(" pool autoremove_cells;", file=f) - print(" dict rollback_cache;", file=f) - print(" int rollback;", file=f) - print("", file=f) - - for current_pattern in sorted(patterns.keys()): - print(" struct state_{}_t {{".format(current_pattern), file=f) - for s, t in sorted(state_types[current_pattern].items()): - print(" {} {};".format(t, s), file=f) - print(" }} st_{};".format(current_pattern), file=f) - print("", file=f) - - print(" struct udata_{}_t {{".format(current_pattern), file=f) - for s, t in sorted(udata_types[current_pattern].items()): - print(" {} {};".format(t, s), file=f) - print(" }} ud_{};".format(current_pattern), file=f) - print("", file=f) - current_pattern = None - - for v, n in sorted(ids.items()): - if n[0] == "\\": - print(" IdString {}{{\"\\{}\"}};".format(v, n), file=f) - else: - print(" IdString {}{{\"{}\"}};".format(v, n), file=f) - print("", file=f) - - print(" void add_siguser(const SigSpec &sig, Cell *cell) {", file=f) - print(" for (auto bit : sigmap(sig)) {", file=f) - print(" if (bit.wire == nullptr) continue;", file=f) - print(" sigusers[bit].insert(cell);", file=f) - print(" }", file=f) - print(" }", file=f) - print("", file=f) - - print(" void blacklist(Cell *cell) {", file=f) - print(" if (cell != nullptr && blacklist_cells.insert(cell).second) {", file=f) - print(" auto ptr = rollback_cache.find(cell);", file=f) - print(" if (ptr == rollback_cache.end()) return;", file=f) - print(" int rb = ptr->second;", file=f) - print(" if (rollback == 0 || rollback > rb)", file=f) - print(" rollback = rb;", file=f) - print(" }", file=f) - print(" }", file=f) - print("", file=f) - - print(" void autoremove(Cell *cell) {", file=f) - print(" if (cell != nullptr) {", file=f) - print(" autoremove_cells.insert(cell);", file=f) - print(" blacklist(cell);", file=f) - print(" }", file=f) - print(" }", file=f) - print("", file=f) - - current_pattern = None - - print(" SigSpec port(Cell *cell, IdString portname) {", file=f) - print(" return sigmap(cell->getPort(portname));", file=f) - print(" }", file=f) - print("", file=f) - print(" SigSpec port(Cell *cell, IdString portname, const SigSpec& defval) {", file=f) - print(" return sigmap(cell->connections_.at(portname, defval));", file=f) - print(" }", file=f) - print("", file=f) - - print(" Const param(Cell *cell, IdString paramname) {", file=f) - print(" return cell->getParam(paramname);", file=f) - print(" }", file=f) - print("", file=f) - print(" Const param(Cell *cell, IdString paramname, const Const& defval) {", file=f) - print(" return cell->parameters.at(paramname, defval);", file=f) - print(" }", file=f) - print("", file=f) - - print(" int nusers(const SigSpec &sig) {", file=f) - print(" pool users;", file=f) - print(" for (auto bit : sigmap(sig))", file=f) - print(" for (auto user : sigusers[bit])", file=f) - print(" users.insert(user);", file=f) - print(" return GetSize(users);", file=f) - print(" }", file=f) - print("", file=f) - - print(" {}_pm(Module *module, const vector &cells) :".format(prefix), file=f) - print(" module(module), sigmap(module), setup_done(false), generate_mode(false), rngseed(12345678) {", file=f) - print(" setup(cells);", file=f) - print(" }", file=f) - print("", file=f) - - print(" {}_pm(Module *module) :".format(prefix), file=f) - print(" module(module), sigmap(module), setup_done(false), generate_mode(false), rngseed(12345678) {", file=f) - print(" }", file=f) - print("", file=f) - - print(" void setup(const vector &cells) {", file=f) - for current_pattern in sorted(patterns.keys()): - for s, t in sorted(udata_types[current_pattern].items()): - if t.endswith("*"): - print(" ud_{}.{} = nullptr;".format(current_pattern,s), file=f) - else: - print(" ud_{}.{} = {}();".format(current_pattern, s, t), file=f) - current_pattern = None - print(" log_assert(!setup_done);", file=f) - print(" setup_done = true;", file=f) - print(" for (auto port : module->ports)", file=f) - print(" add_siguser(module->wire(port), nullptr);", file=f) - print(" for (auto cell : module->cells())", file=f) - print(" for (auto &conn : cell->connections())", file=f) - print(" add_siguser(conn.second, cell);", file=f) - print(" for (auto cell : cells) {", file=f) - - for index in range(len(blocks)): - block = blocks[index] - if block["type"] == "match": - print(" do {", file=f) - print(" Cell *{} = cell;".format(block["cell"]), file=f) - print(" index_{}_value_type value;".format(index), file=f) - print(" std::get<0>(value) = cell;", file=f) - loopcnt = 0 - valueidx = 1 - for item in block["setup"]: - if item[0] == "select": - print(" if (!({})) continue;".format(item[1]), file=f) - if item[0] == "slice": - print(" int &{} = std::get<{}>(value);".format(item[1], valueidx), file=f) - print(" for ({} = 0; {} < {}; {}++) {{".format(item[1], item[1], item[2], item[1]), file=f) - valueidx += 1 - loopcnt += 1 - if item[0] == "choice": - print(" vector<{}> _pmg_choices_{} = {};".format(item[1], item[2], item[3]), file=f) - print(" for (const {} &{} : _pmg_choices_{}) {{".format(item[1], item[2], item[2]), file=f) - print(" std::get<{}>(value) = {};".format(valueidx, item[2]), file=f) - valueidx += 1 - loopcnt += 1 - if item[0] == "define": - print(" {} &{} = std::get<{}>(value);".format(item[1], item[2], valueidx), file=f) - print(" {} = {};".format(item[2], item[3]), file=f) - valueidx += 1 - print(" index_{}_key_type key;".format(index), file=f) - for field, entry in enumerate(block["index"]): - print(" std::get<{}>(key) = {};".format(field, entry[1]), file=f) - print(" index_{}[key].push_back(value);".format(index), file=f) - for i in range(loopcnt): - print(" }", file=f) - print(" } while (0);", file=f) - - print(" }", file=f) - print(" }", file=f) - print("", file=f) - - print(" ~{}_pm() {{".format(prefix), file=f) - print(" for (auto cell : autoremove_cells)", file=f) - print(" module->remove(cell);", file=f) - print(" }", file=f) - print("", file=f) - - for current_pattern in sorted(patterns.keys()): - print(" int run_{}(std::function on_accept_f) {{".format(current_pattern), file=f) - print(" log_assert(setup_done);", file=f) - print(" accept_cnt = 0;", file=f) - print(" on_accept = on_accept_f;", file=f) - print(" rollback = 0;", file=f) - for s, t in sorted(state_types[current_pattern].items()): - if t.endswith("*"): - print(" st_{}.{} = nullptr;".format(current_pattern, s), file=f) - else: - print(" st_{}.{} = {}();".format(current_pattern, s, t), file=f) - print(" block_{}(1);".format(patterns[current_pattern]), file=f) - print(" log_assert(rollback_cache.empty());", file=f) - print(" return accept_cnt;", file=f) - print(" }", file=f) - print("", file=f) - print(" int run_{}(std::function on_accept_f) {{".format(current_pattern, prefix), file=f) - print(" return run_{}([&](){{on_accept_f(*this);}});".format(current_pattern), file=f) - print(" }", file=f) - print("", file=f) - print(" int run_{}() {{".format(current_pattern), file=f) - print(" return run_{}([](){{}});".format(current_pattern, current_pattern), file=f) - print(" }", file=f) - print("", file=f) - - if len(subpatterns): - for p, s in sorted(subpatterns.keys()): - print(" void block_subpattern_{}_{}(int recursion) {{ block_{}(recursion); }}".format(p, s, subpatterns[(p, s)]), file=f) - print("", file=f) - - current_pattern = None - current_subpattern = None - - for index in range(len(blocks)): - block = blocks[index] - - if block["type"] in ("match", "code"): - print(" // {}".format(block["src"]), file=f) - - print(" void block_{}(int recursion YS_MAYBE_UNUSED) {{".format(index), file=f) - current_pattern, current_subpattern = block["pattern"] - - if block["type"] == "final": - print(" }", file=f) - if index+1 != len(blocks): - print("", file=f) - continue - - const_st = set() - nonconst_st = set() - restore_st = set() - - for s in subpattern_args[(current_pattern, current_subpattern)]: - const_st.add(s) - - for i in range(subpatterns[(current_pattern, current_subpattern)], index): - if blocks[i]["type"] == "code": - for s in blocks[i]["states"]: - const_st.add(s) - elif blocks[i]["type"] == "match": - const_st.add(blocks[i]["cell"]) - for item in blocks[i]["sets"]: - const_st.add(item[0]) - else: - assert False - - if block["type"] == "code": - for s in block["states"]: - if s in const_st: - const_st.remove(s) - restore_st.add(s) - nonconst_st.add(s) - elif block["type"] == "match": - s = block["cell"] - assert s not in const_st - nonconst_st.add(s) - for item in block["sets"]: - if item[0] in const_st: - const_st.remove(item[0]) - nonconst_st.add(item[0]) - else: - assert False - - for s in sorted(const_st): - t = state_types[current_pattern][s] - if t.endswith("*"): - print(" {} const &{} YS_MAYBE_UNUSED = st_{}.{};".format(t, s, current_pattern, s), file=f) - else: - print(" const {} &{} YS_MAYBE_UNUSED = st_{}.{};".format(t, s, current_pattern, s), file=f) - - for s in sorted(nonconst_st): - t = state_types[current_pattern][s] - print(" {} &{} YS_MAYBE_UNUSED = st_{}.{};".format(t, s, current_pattern, s), file=f) - - for u in sorted(udata_types[current_pattern].keys()): - t = udata_types[current_pattern][u] - print(" {} &{} YS_MAYBE_UNUSED = ud_{}.{};".format(t, u, current_pattern, u), file=f) - - if len(restore_st): - print("", file=f) - for s in sorted(restore_st): - t = state_types[current_pattern][s] - print(" {} _pmg_backup_{} = {};".format(t, s, s), file=f) - - if block["type"] == "code": - print("", file=f) - print("#define reject do { goto rollback_label; } while(0)", file=f) - print("#define accept do { accept_cnt++; on_accept(); if (rollback) goto rollback_label; } while(0)", file=f) - print("#define finish do { rollback = -1; goto rollback_label; } while(0)", file=f) - print("#define branch do {{ block_{}(recursion+1); if (rollback) goto rollback_label; }} while(0)".format(index+1), file=f) - print("#define subpattern(pattern_name) do {{ block_subpattern_{}_ ## pattern_name (recursion+1); if (rollback) goto rollback_label; }} while(0)".format(current_pattern), file=f) - - for line in block["code"]: - print(" " + line, file=f) - - print("", file=f) - print(" block_{}(recursion+1);".format(index+1), file=f) - - print("#undef reject", file=f) - print("#undef accept", file=f) - print("#undef finish", file=f) - print("#undef branch", file=f) - print("#undef subpattern", file=f) - - print("", file=f) - print("rollback_label:", file=f) - print(" YS_MAYBE_UNUSED;", file=f) - - if len(block["fcode"]): - print("#define accept do { accept_cnt++; on_accept(); } while(0)", file=f) - print("#define finish do { rollback = -1; goto finish_label; } while(0)", file=f) - for line in block["fcode"]: - print(" " + line, file=f) - print("finish_label:", file=f) - print(" YS_MAYBE_UNUSED;", file=f) - print("#undef accept", file=f) - print("#undef finish", file=f) - - if len(restore_st) or len(nonconst_st): - print("", file=f) - for s in sorted(restore_st): - t = state_types[current_pattern][s] - print(" {} = _pmg_backup_{};".format(s, s), file=f) - for s in sorted(nonconst_st): - if s not in restore_st: - t = state_types[current_pattern][s] - if t.endswith("*"): - print(" {} = nullptr;".format(s), file=f) - else: - print(" {} = {}();".format(s, t), file=f) - - elif block["type"] == "match": - assert len(restore_st) == 0 - - print(" Cell* _pmg_backup_{} = {};".format(block["cell"], block["cell"]), file=f) - - if len(block["if"]): - for expr in block["if"]: - print("", file=f) - print(" if (!({})) {{".format(expr), file=f) - print(" {} = nullptr;".format(block["cell"]), file=f) - print(" block_{}(recursion+1);".format(index+1), file=f) - print(" {} = _pmg_backup_{};".format(block["cell"], block["cell"]), file=f) - print(" return;", file=f) - print(" }", file=f) - - print("", file=f) - print(" index_{}_key_type key;".format(index), file=f) - for field, entry in enumerate(block["index"]): - print(" std::get<{}>(key) = {};".format(field, entry[2]), file=f) - print(" auto cells_ptr = index_{}.find(key);".format(index), file=f) - - if block["semioptional"] or block["genargs"] is not None: - print(" bool found_any_match = false;", file=f) - - print("", file=f) - print(" if (cells_ptr != index_{}.end()) {{".format(index), file=f) - print(" const vector &cells = cells_ptr->second;".format(index), file=f) - print(" for (int _pmg_idx = 0; _pmg_idx < GetSize(cells); _pmg_idx++) {", file=f) - print(" {} = std::get<0>(cells[_pmg_idx]);".format(block["cell"]), file=f) - valueidx = 1 - for item in block["setup"]: - if item[0] == "slice": - print(" const int &{} YS_MAYBE_UNUSED = std::get<{}>(cells[_pmg_idx]);".format(item[1], valueidx), file=f) - valueidx += 1 - if item[0] == "choice": - print(" const {} &{} YS_MAYBE_UNUSED = std::get<{}>(cells[_pmg_idx]);".format(item[1], item[2], valueidx), file=f) - valueidx += 1 - if item[0] == "define": - print(" const {} &{} YS_MAYBE_UNUSED = std::get<{}>(cells[_pmg_idx]);".format(item[1], item[2], valueidx), file=f) - valueidx += 1 - print(" if (blacklist_cells.count({})) continue;".format(block["cell"]), file=f) - for expr in block["filter"]: - print(" if (!({})) continue;".format(expr), file=f) - if block["semioptional"] or block["genargs"] is not None: - print(" found_any_match = true;", file=f) - for item in block["sets"]: - print(" auto _pmg_backup_{} = {};".format(item[0], item[0]), file=f) - print(" {} = {};".format(item[0], item[1]), file=f) - print(" auto rollback_ptr = rollback_cache.insert(make_pair(std::get<0>(cells[_pmg_idx]), recursion));", file=f) - print(" block_{}(recursion+1);".format(index+1), file=f) - for item in block["sets"]: - print(" {} = _pmg_backup_{};".format(item[0], item[0]), file=f) - print(" if (rollback_ptr.second)", file=f) - print(" rollback_cache.erase(rollback_ptr.first);", file=f) - print(" if (rollback) {", file=f) - print(" if (rollback != recursion) {{".format(index+1), file=f) - print(" {} = _pmg_backup_{};".format(block["cell"], block["cell"]), file=f) - print(" return;", file=f) - print(" }", file=f) - print(" rollback = 0;", file=f) - print(" }", file=f) - print(" }", file=f) - print(" }", file=f) - - print("", file=f) - print(" {} = nullptr;".format(block["cell"]), file=f) - - if block["optional"]: - print(" block_{}(recursion+1);".format(index+1), file=f) - - if block["semioptional"]: - print(" if (!found_any_match) block_{}(recursion+1);".format(index+1), file=f) - - print(" {} = _pmg_backup_{};".format(block["cell"], block["cell"]), file=f) - - if block["genargs"] is not None: - print("#define finish do { rollback = -1; return; } while(0)", file=f) - print(" if (generate_mode && rng(100) < (found_any_match ? {} : {})) {{".format(block["genargs"][1], block["genargs"][0]), file=f) - for line in block["gencode"]: - print(" " + line, file=f) - print(" }", file=f) - print("#undef finish", file=f) - else: - assert False - - current_pattern = None - print(" }", file=f) - print("", file=f) - - print("};", file=f) - - if genhdr: - print("", file=f) - print("YOSYS_NAMESPACE_END", file=f) From c81bf4f23d6b850a01c89354349e9b64b52604d3 Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 9 Jun 2021 17:07:48 +0200 Subject: [PATCH 331/845] Do not perform git diff on generated file from ql-qlf plugin Signed-off-by: samycharas --- Makefile | 2 +- ql-qlf-plugin/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 180acdb02..eaf2e92ac 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ clean: $(PLUGINS_CLEAN) CLANG_FORMAT ?= clang-format-8 format: - find . \( -name "*.h" -o -name "*.cc" \) -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i + find . \( -name "*.h" -o -name "*.cc" \) -and -not -path './third_party/*' -and -not -path './ql-qlf-plugin/pmgen/*'. -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i VERIBLE_FORMAT ?= verible-verilog-format format-verilog: diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index f0991b1d6..4d63666b3 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -20,7 +20,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ retrieve-pmgen:=$(shell wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) -pre-build:=$(shell python3 pmgen/pmgen.py -o ql-dsp-pm.h -p ql_dsp pmgen/ql_dsp.pmg) +pre-build:=$(shell python3 pmgen/pmgen.py -o ql-dsp-pm.h -p ql_dsp pmgen/ql_dsp.pmg && clang-format-8 -style=file -i ql-dsp-pm.h) install_modules: $(VERILOG_MODULES) $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(notdir $(f));) From f59aa13543b0b9f210cd65e07bf805774b9e3279 Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 9 Jun 2021 17:48:11 +0200 Subject: [PATCH 332/845] Move generated file to pmgen folder Signed-off-by: samycharas --- ql-qlf-plugin/Makefile | 2 +- ql-qlf-plugin/ql-dsp.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 4d63666b3..896027112 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -20,7 +20,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ retrieve-pmgen:=$(shell wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) -pre-build:=$(shell python3 pmgen/pmgen.py -o ql-dsp-pm.h -p ql_dsp pmgen/ql_dsp.pmg && clang-format-8 -style=file -i ql-dsp-pm.h) +pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp pmgen/ql_dsp.pmg) install_modules: $(VERILOG_MODULES) $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(notdir $(f));) diff --git a/ql-qlf-plugin/ql-dsp.cc b/ql-qlf-plugin/ql-dsp.cc index db6cd334e..1b033697a 100644 --- a/ql-qlf-plugin/ql-dsp.cc +++ b/ql-qlf-plugin/ql-dsp.cc @@ -23,7 +23,7 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -#include "ql-dsp-pm.h" +#include "pmgen/ql-dsp-pm.h" void create_ql_dsp(ql_dsp_pm &pm) { From 2b68f6b29e68d679ce5bde616af6818b375e3cc8 Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 9 Jun 2021 18:27:07 +0200 Subject: [PATCH 333/845] Regroup generated file, add them to gitignore Signed-off-by: samycharas --- .gitignore | 1 + ql-qlf-plugin/Makefile | 2 +- ql-qlf-plugin/{pmgen => }/ql_dsp.pmg | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename ql-qlf-plugin/{pmgen => }/ql_dsp.pmg (100%) diff --git a/.gitignore b/.gitignore index 4c85aa2d1..56d348405 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.so *.swp *.log +ql-qlf-plugin/pmgen/* diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 896027112..2840de7a8 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -20,7 +20,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ retrieve-pmgen:=$(shell wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) -pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp pmgen/ql_dsp.pmg) +pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg) install_modules: $(VERILOG_MODULES) $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(notdir $(f));) diff --git a/ql-qlf-plugin/pmgen/ql_dsp.pmg b/ql-qlf-plugin/ql_dsp.pmg similarity index 100% rename from ql-qlf-plugin/pmgen/ql_dsp.pmg rename to ql-qlf-plugin/ql_dsp.pmg From 33f35d32051959aca97977111a79f6040df520aa Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 9 Jun 2021 18:51:24 +0200 Subject: [PATCH 334/845] Revert "Do not perform git diff on generated file from ql-qlf plugin" This reverts commit c81bf4f23d6b850a01c89354349e9b64b52604d3. Signed-off-by: samycharas --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eaf2e92ac..180acdb02 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ clean: $(PLUGINS_CLEAN) CLANG_FORMAT ?= clang-format-8 format: - find . \( -name "*.h" -o -name "*.cc" \) -and -not -path './third_party/*' -and -not -path './ql-qlf-plugin/pmgen/*'. -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i + find . \( -name "*.h" -o -name "*.cc" \) -and -not -path './third_party/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i VERIBLE_FORMAT ?= verible-verilog-format format-verilog: From 995fbbafe797a7c135ae358c38862b91dbbf5591 Mon Sep 17 00:00:00 2001 From: samycharas Date: Wed, 9 Jun 2021 18:58:05 +0200 Subject: [PATCH 335/845] Create pmgen directory during build Signed-off-by: samycharas --- ql-qlf-plugin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 2840de7a8..08078817c 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -18,7 +18,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10_DIR)/qlf_k6n10_dsp_map.v \ $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v -retrieve-pmgen:=$(shell wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) +retrieve-pmgen:=$(shell mkdir pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg) From eaf3d86a530e6b0814a48fe02c41c0b57453bdde Mon Sep 17 00:00:00 2001 From: Wojciech Tatarski Date: Wed, 2 Jun 2021 12:05:40 +0200 Subject: [PATCH 336/845] Add license check action Signed-off-by: Wojciech Tatarski --- .github/workflows/ci.yml | 8 ++++++++ .github/workflows/licensing.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/licensing.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e11a5fdaa..e9422ad3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + name: CI tests on: [push, pull_request] diff --git a/.github/workflows/licensing.yml b/.github/workflows/licensing.yml new file mode 100644 index 000000000..4a88869dc --- /dev/null +++ b/.github/workflows/licensing.yml @@ -0,0 +1,27 @@ +# Copyright (C) 2017-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier: ISC + +name: Licensing + +on: + push: + pull_request: + + +jobs: + Checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: SymbiFlow/actions/checks@main + with: + exclude_license: | + ./design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v + third_party: | + ./third_party/googletest/ From 83e0b4fb36eac613e720c47b30357d0ec46dfe6c Mon Sep 17 00:00:00 2001 From: Wojciech Tatarski Date: Wed, 2 Jun 2021 13:10:05 +0200 Subject: [PATCH 337/845] Add missing license headers Signed-off-by: Wojciech Tatarski --- .github/workflows/build-and-test.sh | 7 + .github/workflows/common.sh | 7 + .github/workflows/format-check.sh | 7 + .github/workflows/licensing.yml | 2 + .github/workflows/setup.sh | 7 + Makefile | 8 + design_introspection-plugin/Makefile | 8 + design_introspection-plugin/tests/Makefile | 8 + .../tests/get_cells/get_cells.v | 8 + .../tests/get_count/Makefile | 8 + .../tests/get_count/get_count.v | 8 + .../tests/get_nets/get_nets.v | 8 + .../tests/get_pins/get_pins.v | 8 + .../tests/get_ports/get_ports.v | 8 + fasm-plugin/Makefile | 8 + fasm-plugin/tests/Makefile | 8 + integrateinv-plugin/Makefile | 8 + integrateinv-plugin/tests/Makefile | 8 + integrateinv-plugin/tests/fanout/fanout.v | 8 + .../tests/hierarchy/hierarchy.v | 8 + .../tests/multi_bit/multi_bit.v | 8 + .../tests/single_bit/single_bit.v | 8 + integrateinv-plugin/tests/toplevel/toplevel.v | 8 + params-plugin/Makefile | 8 + params-plugin/tests/Makefile | 8 + params-plugin/tests/compare_output_json.py | 9 + params-plugin/tests/pll/pll.v | 8 + params-plugin/tests/pll/techmaps/cells_map.v | 8 + params-plugin/tests/pll/techmaps/cells_sim.v | 8 + ql-iob-plugin/Makefile | 8 + ql-iob-plugin/tests/Makefile | 8 + ql-iob-plugin/tests/ckpad/Makefile | 8 + ql-iob-plugin/tests/ckpad/design.v | 8 + ql-iob-plugin/tests/common/pp3_cells_map.v | 8 + ql-iob-plugin/tests/common/pp3_cells_sim.v | 8 + ql-iob-plugin/tests/sdiomux/Makefile | 8 + ql-iob-plugin/tests/sdiomux/design.v | 8 + ql-qlf-plugin/Makefile | 8 + ql-qlf-plugin/common/cells_sim.v | 8 + .../ql-qlf-k4n8/qlf_k4n8_arith_map.v | 8 + .../ql-qlf-k4n8/qlf_k4n8_cells_sim.v | 8 + ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v | 8 + .../ql-qlf-k6n10/qlf_k6n10_arith_map.v | 8 + .../ql-qlf-k6n10/qlf_k6n10_brams_map.v | 8 + .../ql-qlf-k6n10/qlf_k6n10_cells_sim.v | 8 + .../ql-qlf-k6n10/qlf_k6n10_dsp_map.v | 8 + .../ql-qlf-k6n10/qlf_k6n10_ffs_map.v | 8 + .../ql-qlf-k6n10/qlf_k6n10_lut_map.v | 8 + ql-qlf-plugin/tests/Makefile | 8 + ql-qlf-plugin/tests/bram/bram.v | 8 + ql-qlf-plugin/tests/dffs/dffs.v | 8 + ql-qlf-plugin/tests/full_adder/full_adder.v | 8 + .../tests/iob_no_flatten/iob_no_flatten.v | 8 + ql-qlf-plugin/tests/latches/latches.v | 8 + ql-qlf-plugin/tests/logic/logic.v | 8 + ql-qlf-plugin/tests/mac_unit/mac_unit.v | 8 + ql-qlf-plugin/tests/multiplier/multiplier.v | 8 + ql-qlf-plugin/tests/shreg/shreg.v | 8 + sdc-plugin/Makefile | 8 + sdc-plugin/tests/Makefile | 8 + sdc-plugin/tests/abc9/abc9.v | 8 + sdc-plugin/tests/counter/counter.v | 8 + sdc-plugin/tests/counter2/counter2.v | 8 + sdc-plugin/tests/get_clocks/get_clocks.v | 8 + sdc-plugin/tests/period_check/period_check.v | 8 + .../period_format_check/period_format_check.v | 8 + sdc-plugin/tests/pll/pll.v | 8 + .../tests/pll_approx_equal/pll_approx_equal.v | 8 + .../pll_dangling_wires/pll_dangling_wires.v | 8 + sdc-plugin/tests/pll_div/pll_div.v | 8 + .../tests/pll_fbout_phase/pll_fbout_phase.v | 8 + .../tests/pll_propagated/pll_propagated.v | 8 + .../restore_from_json/restore_from_json.v | 8 + .../tests/set_clock_groups/set_clock_groups.v | 8 + .../tests/set_false_path/set_false_path.v | 8 + .../tests/set_max_delay/set_max_delay.v | 8 + .../tests/waveform_check/waveform_check.v | 8 + third_party/VexRiscv_Lite/LICENSE | 21 + .../README.yosys-symbiflow-plugins | 9 + third_party/VexRiscv_Lite/VexRiscv_Lite.v | 4819 ++++++ third_party/minilitex_ddr_arty/LICENSE | 34 + .../README.yosys-symbiflow-plugins | 12 + .../minilitex_ddr_arty/minilitex_ddr_arty.v | 12721 +++++++++++++++ xdc-plugin/BANK.v | 8 + xdc-plugin/Makefile | 8 + xdc-plugin/tests/Makefile | 8 + xdc-plugin/tests/compare_output_json.py | 10 + xdc-plugin/tests/counter-dict/counter-dict.v | 8 + xdc-plugin/tests/counter/counter.v | 8 + xdc-plugin/tests/io_loc_pairs/cells_xtra.v | 8 + xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v | 8 + .../tests/minilitex_ddr_arty/VexRiscv_Lite.v | 4820 +----- .../minilitex_ddr_arty/minilitex_ddr_arty.v | 12722 +--------------- xdc-plugin/tests/package_pins/package_pins.v | 8 + xdc-plugin/tests/port_indexes/port_indexes.v | 8 + 95 files changed, 18307 insertions(+), 17540 deletions(-) mode change 100755 => 100644 .github/workflows/build-and-test.sh mode change 100755 => 100644 .github/workflows/format-check.sh mode change 100755 => 100644 .github/workflows/setup.sh create mode 100644 third_party/VexRiscv_Lite/LICENSE create mode 100644 third_party/VexRiscv_Lite/README.yosys-symbiflow-plugins create mode 100644 third_party/VexRiscv_Lite/VexRiscv_Lite.v create mode 100644 third_party/minilitex_ddr_arty/LICENSE create mode 100644 third_party/minilitex_ddr_arty/README.yosys-symbiflow-plugins create mode 100644 third_party/minilitex_ddr_arty/minilitex_ddr_arty.v mode change 100644 => 120000 xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v mode change 100644 => 120000 xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh old mode 100755 new mode 100644 index 6a33c39e4..c395f027d --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -1,4 +1,11 @@ #! /bin/bash +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC set -e diff --git a/.github/workflows/common.sh b/.github/workflows/common.sh index 53e7033ac..d7329a833 100644 --- a/.github/workflows/common.sh +++ b/.github/workflows/common.sh @@ -1,4 +1,11 @@ #! /bin/bash +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC # Look for location binaries first export PATH="$HOME/.local-bin/bin:$PATH" diff --git a/.github/workflows/format-check.sh b/.github/workflows/format-check.sh old mode 100755 new mode 100644 index 20814bf02..69cf9a604 --- a/.github/workflows/format-check.sh +++ b/.github/workflows/format-check.sh @@ -1,4 +1,11 @@ #! /bin/bash +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC set -e diff --git a/.github/workflows/licensing.yml b/.github/workflows/licensing.yml index 4a88869dc..bf6356a14 100644 --- a/.github/workflows/licensing.yml +++ b/.github/workflows/licensing.yml @@ -23,5 +23,7 @@ jobs: with: exclude_license: | ./design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v + ./third_party/minilitex_ddr_arty/minilitex_ddr_arty.v + ./third_party/VexRiscv_Lite/VexRiscv_Lite.v third_party: | ./third_party/googletest/ diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh old mode 100755 new mode 100644 index ead84e799..9e5b3f749 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -1,4 +1,11 @@ #! /bin/bash +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC set -e diff --git a/Makefile b/Makefile index 180acdb02..a2ec069c1 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index 2e1ffdecd..970624e3c 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + NAME = design_introspection SOURCES = design_introspection.cc \ get_cmd.cc \ diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index e9f50a3a1..18172c916 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + TESTS = get_nets \ get_ports \ get_cells \ diff --git a/design_introspection-plugin/tests/get_cells/get_cells.v b/design_introspection-plugin/tests/get_cells/get_cells.v index 3a6f2ebea..792182e61 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.v +++ b/design_introspection-plugin/tests/get_cells/get_cells.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, output [3:0] led, diff --git a/design_introspection-plugin/tests/get_count/Makefile b/design_introspection-plugin/tests/get_count/Makefile index 163215137..aea11d342 100644 --- a/design_introspection-plugin/tests/get_count/Makefile +++ b/design_introspection-plugin/tests/get_count/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + test: yosys -p "tcl script.tcl" touch ok diff --git a/design_introspection-plugin/tests/get_count/get_count.v b/design_introspection-plugin/tests/get_count/get_count.v index 935a0c1aa..3bb4d559f 100644 --- a/design_introspection-plugin/tests/get_count/get_count.v +++ b/design_introspection-plugin/tests/get_count/get_count.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module my_gate ( input wire A, output wire Y diff --git a/design_introspection-plugin/tests/get_nets/get_nets.v b/design_introspection-plugin/tests/get_nets/get_nets.v index 33c580513..3d7e0f163 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.v +++ b/design_introspection-plugin/tests/get_nets/get_nets.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, output [3:0] led, diff --git a/design_introspection-plugin/tests/get_pins/get_pins.v b/design_introspection-plugin/tests/get_pins/get_pins.v index 443e29408..846e86150 100644 --- a/design_introspection-plugin/tests/get_pins/get_pins.v +++ b/design_introspection-plugin/tests/get_pins/get_pins.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, output [3:0] led, diff --git a/design_introspection-plugin/tests/get_ports/get_ports.v b/design_introspection-plugin/tests/get_ports/get_ports.v index 33c580513..3d7e0f163 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.v +++ b/design_introspection-plugin/tests/get_ports/get_ports.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, output [3:0] led, diff --git a/fasm-plugin/Makefile b/fasm-plugin/Makefile index 71188e0f5..5d40bb996 100644 --- a/fasm-plugin/Makefile +++ b/fasm-plugin/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + NAME = fasm SOURCES = fasm.cc include ../Makefile_plugin.common diff --git a/fasm-plugin/tests/Makefile b/fasm-plugin/tests/Makefile index 320dfcfcb..66d5a63ba 100644 --- a/fasm-plugin/tests/Makefile +++ b/fasm-plugin/tests/Makefile @@ -1 +1,9 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + include $(shell pwd)/../../Makefile_test.common diff --git a/integrateinv-plugin/Makefile b/integrateinv-plugin/Makefile index b966810ac..de1f3ce3e 100644 --- a/integrateinv-plugin/Makefile +++ b/integrateinv-plugin/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + NAME = integrateinv SOURCES = integrateinv.cc include ../Makefile_plugin.common diff --git a/integrateinv-plugin/tests/Makefile b/integrateinv-plugin/tests/Makefile index 987017d1e..a3ed66869 100644 --- a/integrateinv-plugin/tests/Makefile +++ b/integrateinv-plugin/tests/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + TESTS = fanout \ hierarchy \ multi_bit \ diff --git a/integrateinv-plugin/tests/fanout/fanout.v b/integrateinv-plugin/tests/fanout/fanout.v index a396c7840..2ec8447c6 100644 --- a/integrateinv-plugin/tests/fanout/fanout.v +++ b/integrateinv-plugin/tests/fanout/fanout.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* blackbox *) module box( (* invertible_pin="INV_A" *) diff --git a/integrateinv-plugin/tests/hierarchy/hierarchy.v b/integrateinv-plugin/tests/hierarchy/hierarchy.v index 08eccacf4..e0fdf2f96 100644 --- a/integrateinv-plugin/tests/hierarchy/hierarchy.v +++ b/integrateinv-plugin/tests/hierarchy/hierarchy.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* blackbox *) module box( (* invertible_pin="INV_A" *) diff --git a/integrateinv-plugin/tests/multi_bit/multi_bit.v b/integrateinv-plugin/tests/multi_bit/multi_bit.v index f02c7bd5c..2261f9903 100644 --- a/integrateinv-plugin/tests/multi_bit/multi_bit.v +++ b/integrateinv-plugin/tests/multi_bit/multi_bit.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* blackbox *) module box( (* invertible_pin="INV_A" *) diff --git a/integrateinv-plugin/tests/single_bit/single_bit.v b/integrateinv-plugin/tests/single_bit/single_bit.v index edeab5e0e..812543555 100644 --- a/integrateinv-plugin/tests/single_bit/single_bit.v +++ b/integrateinv-plugin/tests/single_bit/single_bit.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* blackbox *) module box( (* invertible_pin="INV_A" *) diff --git a/integrateinv-plugin/tests/toplevel/toplevel.v b/integrateinv-plugin/tests/toplevel/toplevel.v index 652eff9ba..69480c1b2 100644 --- a/integrateinv-plugin/tests/toplevel/toplevel.v +++ b/integrateinv-plugin/tests/toplevel/toplevel.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* blackbox *) module box( (* invertible_pin="INV_A" *) diff --git a/params-plugin/Makefile b/params-plugin/Makefile index ec98ed124..d3db121a9 100644 --- a/params-plugin/Makefile +++ b/params-plugin/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + NAME = params SOURCES = params.cc include ../Makefile_plugin.common diff --git a/params-plugin/tests/Makefile b/params-plugin/tests/Makefile index eceb128fe..df5a7d517 100644 --- a/params-plugin/tests/Makefile +++ b/params-plugin/tests/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + TESTS = pll include $(shell pwd)/../../Makefile_test.common diff --git a/params-plugin/tests/compare_output_json.py b/params-plugin/tests/compare_output_json.py index 3b437e8c3..a576068e4 100644 --- a/params-plugin/tests/compare_output_json.py +++ b/params-plugin/tests/compare_output_json.py @@ -1,4 +1,13 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC """ This script extracts the top module cells and their corresponding parameters diff --git a/params-plugin/tests/pll/pll.v b/params-plugin/tests/pll/pll.v index fdc3ad948..e5bb122aa 100644 --- a/params-plugin/tests/pll/pll.v +++ b/params-plugin/tests/pll/pll.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* dont_touch = "true" *) input clk100, input cpu_reset, diff --git a/params-plugin/tests/pll/techmaps/cells_map.v b/params-plugin/tests/pll/techmaps/cells_map.v index baac0a134..57355a8ff 100644 --- a/params-plugin/tests/pll/techmaps/cells_map.v +++ b/params-plugin/tests/pll/techmaps/cells_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + // ============================================================================ // CMT diff --git a/params-plugin/tests/pll/techmaps/cells_sim.v b/params-plugin/tests/pll/techmaps/cells_sim.v index d3bc29bb7..244f4843d 100644 --- a/params-plugin/tests/pll/techmaps/cells_sim.v +++ b/params-plugin/tests/pll/techmaps/cells_sim.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + // ============================================================================ // CMT diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile index 741d031e2..2dc1fd0b7 100644 --- a/ql-iob-plugin/Makefile +++ b/ql-iob-plugin/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + NAME = ql-iob SOURCES = ql-iob.cc pcf_parser.cc pinmap_parser.cc include ../Makefile_plugin.common diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile index 7575db9bd..004013be1 100644 --- a/ql-iob-plugin/tests/Makefile +++ b/ql-iob-plugin/tests/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + TESTS = sdiomux ckpad all: clean $(addsuffix /ok,$(TESTS)) diff --git a/ql-iob-plugin/tests/ckpad/Makefile b/ql-iob-plugin/tests/ckpad/Makefile index 912d6f472..3bef98695 100644 --- a/ql-iob-plugin/tests/ckpad/Makefile +++ b/ql-iob-plugin/tests/ckpad/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + # TODO: Integrate this in the Makefile_test.command environment ? test: @yosys -s script.ys -q -q -l $@.log diff --git a/ql-iob-plugin/tests/ckpad/design.v b/ql-iob-plugin/tests/ckpad/design.v index dda0c919a..2828f3c1a 100644 --- a/ql-iob-plugin/tests/ckpad/design.v +++ b/ql-iob-plugin/tests/ckpad/design.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input wire clk0, input wire clk1, diff --git a/ql-iob-plugin/tests/common/pp3_cells_map.v b/ql-iob-plugin/tests/common/pp3_cells_map.v index 562e8d920..c8e0f2396 100644 --- a/ql-iob-plugin/tests/common/pp3_cells_map.v +++ b/ql-iob-plugin/tests/common/pp3_cells_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module \$_DFF_P_ ( D, Q, diff --git a/ql-iob-plugin/tests/common/pp3_cells_sim.v b/ql-iob-plugin/tests/common/pp3_cells_sim.v index 4a52f97a5..7bb0dafd3 100644 --- a/ql-iob-plugin/tests/common/pp3_cells_sim.v +++ b/ql-iob-plugin/tests/common/pp3_cells_sim.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module inpad ( output Q, (* iopad_external_pin *) diff --git a/ql-iob-plugin/tests/sdiomux/Makefile b/ql-iob-plugin/tests/sdiomux/Makefile index 912d6f472..3bef98695 100644 --- a/ql-iob-plugin/tests/sdiomux/Makefile +++ b/ql-iob-plugin/tests/sdiomux/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + # TODO: Integrate this in the Makefile_test.command environment ? test: @yosys -s script.ys -q -q -l $@.log diff --git a/ql-iob-plugin/tests/sdiomux/design.v b/ql-iob-plugin/tests/sdiomux/design.v index dde303fb9..831bd51df 100644 --- a/ql-iob-plugin/tests/sdiomux/design.v +++ b/ql-iob-plugin/tests/sdiomux/design.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input wire clk, output wire [3:0] led, diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 08078817c..c17cc0635 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + NAME = ql-qlf SOURCES = synth_quicklogic.cc \ ql-dsp.cc diff --git a/ql-qlf-plugin/common/cells_sim.v b/ql-qlf-plugin/common/cells_sim.v index 4c17762eb..3eb48fb45 100644 --- a/ql-qlf-plugin/common/cells_sim.v +++ b/ql-qlf-plugin/common/cells_sim.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module inv(output Q, input A); assign Q = A ? 0 : 1; diff --git a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_arith_map.v b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_arith_map.v index 5feb614e6..99c81f042 100644 --- a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_arith_map.v +++ b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_arith_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* techmap_celltype = "$alu" *) module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); parameter A_SIGNED = 0; diff --git a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v index 120001813..c0cd36934 100644 --- a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v +++ b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* abc9_box, lib_whitebox *) module adder_lut4( output lut4_out, diff --git a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v index 4a0adf47d..aea53004f 100644 --- a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v +++ b/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module \$_DFF_P_ (D, Q, C); input D; input C; diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v index 6800b228d..2d8dee5c5 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + ////////////////////////// // arithmetic // ////////////////////////// diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v index 7f25a9083..190f48af9 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module \$__QLF_RAM16K ( output [31:0] RDATA, diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v index b3f8357a1..36872ce77 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* abc9_box, lib_whitebox *) module adder( output sumout, diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v index bab24e537..4b8ae644a 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module \$__MUL16X16 (input [15:0] A, input [15:0] B, output [31:0] Y); parameter A_SIGNED = 0; parameter B_SIGNED = 0; diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v index 73472153f..b2234300d 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + // Basic DFF module \$_DFF_P_ (D, C, Q); diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_lut_map.v b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_lut_map.v index f03788d49..e8b2a64a1 100644 --- a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_lut_map.v +++ b/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_lut_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + `ifndef NO_LUT module \$lut (A, Y); parameter WIDTH = 0; diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 46587e703..3377ef765 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + # The bram test will be enable in a future PR after it's been fixed. TESTS = dffs \ diff --git a/ql-qlf-plugin/tests/bram/bram.v b/ql-qlf-plugin/tests/bram/bram.v index 3c251b716..ab531a0de 100644 --- a/ql-qlf-plugin/tests/bram/bram.v +++ b/ql-qlf-plugin/tests/bram/bram.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module BRAM #(parameter AWIDTH = 9, parameter DWIDTH = 32) (clk, diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index 293b1afbd..702c38535 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module my_dff ( input d, clk, diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.v b/ql-qlf-plugin/tests/full_adder/full_adder.v index 4c542cff1..0af21c459 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.v +++ b/ql-qlf-plugin/tests/full_adder/full_adder.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module full_adder ( input wire [`WIDTH-1:0] A, input wire [`WIDTH-1:0] B, diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v index 8dea6f005..753eaa632 100644 --- a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v +++ b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module my_dff ( input d, clk, diff --git a/ql-qlf-plugin/tests/latches/latches.v b/ql-qlf-plugin/tests/latches/latches.v index 4cc26b027..fd7f3124d 100644 --- a/ql-qlf-plugin/tests/latches/latches.v +++ b/ql-qlf-plugin/tests/latches/latches.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module latchp ( input d, clk, diff --git a/ql-qlf-plugin/tests/logic/logic.v b/ql-qlf-plugin/tests/logic/logic.v index 17464af84..efc53c7a7 100644 --- a/ql-qlf-plugin/tests/logic/logic.v +++ b/ql-qlf-plugin/tests/logic/logic.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input [0:7] in, output B1, diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.v b/ql-qlf-plugin/tests/mac_unit/mac_unit.v index bcec4506c..8b5c1c41b 100644 --- a/ql-qlf-plugin/tests/mac_unit/mac_unit.v +++ b/ql-qlf-plugin/tests/mac_unit/mac_unit.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module mac_unit(a, b, out); parameter DATA_WIDTH = 16; input [DATA_WIDTH - 1 : 0] a, b; diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.v b/ql-qlf-plugin/tests/multiplier/multiplier.v index 70f9a23c1..e3a4d7fef 100644 --- a/ql-qlf-plugin/tests/multiplier/multiplier.v +++ b/ql-qlf-plugin/tests/multiplier/multiplier.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module mult16x16(a, b, out); parameter DATA_WIDTH = 16; input [DATA_WIDTH - 1 : 0] a, b; diff --git a/ql-qlf-plugin/tests/shreg/shreg.v b/ql-qlf-plugin/tests/shreg/shreg.v index e3bc955bc..d0569c902 100644 --- a/ql-qlf-plugin/tests/shreg/shreg.v +++ b/ql-qlf-plugin/tests/shreg/shreg.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input wire I, input wire C, diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index f45efdce3..7fe61e467 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + NAME = sdc SOURCES = buffers.cc \ clocks.cc \ diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 1361f8e2c..cfcbd8d7e 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + # abc9 - test that abc9.D is correctly set after importing a clock. # counter, counter2, pll - test buffer and clock divider propagation # set_false_path - test the set_false_path command diff --git a/sdc-plugin/tests/abc9/abc9.v b/sdc-plugin/tests/abc9/abc9.v index 1bb745310..b87d2bf11 100644 --- a/sdc-plugin/tests/abc9/abc9.v +++ b/sdc-plugin/tests/abc9/abc9.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk1, clk2, diff --git a/sdc-plugin/tests/counter/counter.v b/sdc-plugin/tests/counter/counter.v index 88e9f9e1f..6478a4c36 100644 --- a/sdc-plugin/tests/counter/counter.v +++ b/sdc-plugin/tests/counter/counter.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input clk2, diff --git a/sdc-plugin/tests/counter2/counter2.v b/sdc-plugin/tests/counter2/counter2.v index 88e9f9e1f..6478a4c36 100644 --- a/sdc-plugin/tests/counter2/counter2.v +++ b/sdc-plugin/tests/counter2/counter2.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input clk2, diff --git a/sdc-plugin/tests/get_clocks/get_clocks.v b/sdc-plugin/tests/get_clocks/get_clocks.v index 05c1e9a67..4218db536 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.v +++ b/sdc-plugin/tests/get_clocks/get_clocks.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input clk2, diff --git a/sdc-plugin/tests/period_check/period_check.v b/sdc-plugin/tests/period_check/period_check.v index 45fec91d0..653f5f13b 100644 --- a/sdc-plugin/tests/period_check/period_check.v +++ b/sdc-plugin/tests/period_check/period_check.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* CLOCK_SIGNAL = "yes", WAVEFORM = "0 5" *) input clk, diff --git a/sdc-plugin/tests/period_format_check/period_format_check.v b/sdc-plugin/tests/period_format_check/period_format_check.v index 323d3ea2c..befb6cbf7 100644 --- a/sdc-plugin/tests/period_format_check/period_format_check.v +++ b/sdc-plugin/tests/period_format_check/period_format_check.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* CLOCK_SIGNAL = "yes", PERIOD = "bad value", WAVEFORM = "0 5" *) input clk, diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index 88fd35ad9..7c0045cd5 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input cpu_reset, diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v index 7cc4460ab..a3509bdc0 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input cpu_reset, diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v index ab636afea..a76a39ed9 100644 --- a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input cpu_reset, diff --git a/sdc-plugin/tests/pll_div/pll_div.v b/sdc-plugin/tests/pll_div/pll_div.v index df7046ebd..e07391836 100644 --- a/sdc-plugin/tests/pll_div/pll_div.v +++ b/sdc-plugin/tests/pll_div/pll_div.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input cpu_reset, diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v index a2d81047d..f7ff414d7 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input cpu_reset, diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.v b/sdc-plugin/tests/pll_propagated/pll_propagated.v index 88fd35ad9..7c0045cd5 100644 --- a/sdc-plugin/tests/pll_propagated/pll_propagated.v +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input cpu_reset, diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.v b/sdc-plugin/tests/restore_from_json/restore_from_json.v index 3c7997a50..cc39884d0 100644 --- a/sdc-plugin/tests/restore_from_json/restore_from_json.v +++ b/sdc-plugin/tests/restore_from_json/restore_from_json.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, input i, diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v index 33c580513..3d7e0f163 100644 --- a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, output [3:0] led, diff --git a/sdc-plugin/tests/set_false_path/set_false_path.v b/sdc-plugin/tests/set_false_path/set_false_path.v index 33c580513..3d7e0f163 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.v +++ b/sdc-plugin/tests/set_false_path/set_false_path.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, output [3:0] led, diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.v b/sdc-plugin/tests/set_max_delay/set_max_delay.v index 33c580513..3d7e0f163 100644 --- a/sdc-plugin/tests/set_max_delay/set_max_delay.v +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, output [3:0] led, diff --git a/sdc-plugin/tests/waveform_check/waveform_check.v b/sdc-plugin/tests/waveform_check/waveform_check.v index b1723fa4c..4115c7e00 100644 --- a/sdc-plugin/tests/waveform_check/waveform_check.v +++ b/sdc-plugin/tests/waveform_check/waveform_check.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( (* CLOCK_SIGNAL = "yes", PERIOD = "10", WAVEFORM = "bad value" *) input clk, diff --git a/third_party/VexRiscv_Lite/LICENSE b/third_party/VexRiscv_Lite/LICENSE new file mode 100644 index 000000000..0675e4424 --- /dev/null +++ b/third_party/VexRiscv_Lite/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Spinal HDL contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/third_party/VexRiscv_Lite/README.yosys-symbiflow-plugins b/third_party/VexRiscv_Lite/README.yosys-symbiflow-plugins new file mode 100644 index 000000000..534dcfa66 --- /dev/null +++ b/third_party/VexRiscv_Lite/README.yosys-symbiflow-plugins @@ -0,0 +1,9 @@ +Name: This repository hosts a RISC-V implementation written in SpinalHDL. +Short Name: VexRiscv +URL: https://github.com/SpinalHDL/VexRiscv +Version: 0 +Date: 16/06/2019 +License: MIT License + +Description: +This package is used as stimuli in some test cases that verify that the Yosys plugins produce expected results. diff --git a/third_party/VexRiscv_Lite/VexRiscv_Lite.v b/third_party/VexRiscv_Lite/VexRiscv_Lite.v new file mode 100644 index 000000000..2dc7b989c --- /dev/null +++ b/third_party/VexRiscv_Lite/VexRiscv_Lite.v @@ -0,0 +1,4819 @@ +// Generator : SpinalHDL v1.3.6 git head : 9bf01e7f360e003fac1dd5ca8b8f4bffec0e52b8 +// Date : 16/06/2019, 23:18:37 +// Component : VexRiscv + + +`define AluCtrlEnum_defaultEncoding_type [1:0] +`define AluCtrlEnum_defaultEncoding_ADD_SUB 2'b00 +`define AluCtrlEnum_defaultEncoding_SLT_SLTU 2'b01 +`define AluCtrlEnum_defaultEncoding_BITWISE 2'b10 + +`define AluBitwiseCtrlEnum_defaultEncoding_type [1:0] +`define AluBitwiseCtrlEnum_defaultEncoding_XOR_1 2'b00 +`define AluBitwiseCtrlEnum_defaultEncoding_OR_1 2'b01 +`define AluBitwiseCtrlEnum_defaultEncoding_AND_1 2'b10 + +`define Src2CtrlEnum_defaultEncoding_type [1:0] +`define Src2CtrlEnum_defaultEncoding_RS 2'b00 +`define Src2CtrlEnum_defaultEncoding_IMI 2'b01 +`define Src2CtrlEnum_defaultEncoding_IMS 2'b10 +`define Src2CtrlEnum_defaultEncoding_PC 2'b11 + +`define BranchCtrlEnum_defaultEncoding_type [1:0] +`define BranchCtrlEnum_defaultEncoding_INC 2'b00 +`define BranchCtrlEnum_defaultEncoding_B 2'b01 +`define BranchCtrlEnum_defaultEncoding_JAL 2'b10 +`define BranchCtrlEnum_defaultEncoding_JALR 2'b11 + +`define Src1CtrlEnum_defaultEncoding_type [1:0] +`define Src1CtrlEnum_defaultEncoding_RS 2'b00 +`define Src1CtrlEnum_defaultEncoding_IMU 2'b01 +`define Src1CtrlEnum_defaultEncoding_PC_INCREMENT 2'b10 +`define Src1CtrlEnum_defaultEncoding_URS1 2'b11 + +`define EnvCtrlEnum_defaultEncoding_type [0:0] +`define EnvCtrlEnum_defaultEncoding_NONE 1'b0 +`define EnvCtrlEnum_defaultEncoding_XRET 1'b1 + +`define ShiftCtrlEnum_defaultEncoding_type [1:0] +`define ShiftCtrlEnum_defaultEncoding_DISABLE_1 2'b00 +`define ShiftCtrlEnum_defaultEncoding_SLL_1 2'b01 +`define ShiftCtrlEnum_defaultEncoding_SRL_1 2'b10 +`define ShiftCtrlEnum_defaultEncoding_SRA_1 2'b11 + +module InstructionCache ( + input io_flush, + input io_cpu_prefetch_isValid, + output reg io_cpu_prefetch_haltIt, + input [31:0] io_cpu_prefetch_pc, + input io_cpu_fetch_isValid, + input io_cpu_fetch_isStuck, + input io_cpu_fetch_isRemoved, + input [31:0] io_cpu_fetch_pc, + output [31:0] io_cpu_fetch_data, + input io_cpu_fetch_dataBypassValid, + input [31:0] io_cpu_fetch_dataBypass, + output io_cpu_fetch_mmuBus_cmd_isValid, + output [31:0] io_cpu_fetch_mmuBus_cmd_virtualAddress, + output io_cpu_fetch_mmuBus_cmd_bypassTranslation, + input [31:0] io_cpu_fetch_mmuBus_rsp_physicalAddress, + input io_cpu_fetch_mmuBus_rsp_isIoAccess, + input io_cpu_fetch_mmuBus_rsp_allowRead, + input io_cpu_fetch_mmuBus_rsp_allowWrite, + input io_cpu_fetch_mmuBus_rsp_allowExecute, + input io_cpu_fetch_mmuBus_rsp_exception, + input io_cpu_fetch_mmuBus_rsp_refilling, + output io_cpu_fetch_mmuBus_end, + input io_cpu_fetch_mmuBus_busy, + output [31:0] io_cpu_fetch_physicalAddress, + output io_cpu_fetch_haltIt, + input io_cpu_decode_isValid, + input io_cpu_decode_isStuck, + input [31:0] io_cpu_decode_pc, + output [31:0] io_cpu_decode_physicalAddress, + output [31:0] io_cpu_decode_data, + output io_cpu_decode_cacheMiss, + output io_cpu_decode_error, + output io_cpu_decode_mmuRefilling, + output io_cpu_decode_mmuException, + input io_cpu_decode_isUser, + input io_cpu_fill_valid, + input [31:0] io_cpu_fill_payload, + output io_mem_cmd_valid, + input io_mem_cmd_ready, + output [31:0] io_mem_cmd_payload_address, + output [2:0] io_mem_cmd_payload_size, + input io_mem_rsp_valid, + input [31:0] io_mem_rsp_payload_data, + input io_mem_rsp_payload_error, + input clk, + input reset); + reg [22:0] _zz_10_; + reg [31:0] _zz_11_; + wire _zz_12_; + wire _zz_13_; + wire [0:0] _zz_14_; + wire [0:0] _zz_15_; + wire [22:0] _zz_16_; + reg _zz_1_; + reg _zz_2_; + reg lineLoader_fire; + reg lineLoader_valid; + reg [31:0] lineLoader_address; + reg lineLoader_hadError; + reg lineLoader_flushPending; + reg [6:0] lineLoader_flushCounter; + reg _zz_3_; + reg lineLoader_cmdSent; + reg lineLoader_wayToAllocate_willIncrement; + wire lineLoader_wayToAllocate_willClear; + wire lineLoader_wayToAllocate_willOverflowIfInc; + wire lineLoader_wayToAllocate_willOverflow; + reg [2:0] lineLoader_wordIndex; + wire lineLoader_write_tag_0_valid; + wire [5:0] lineLoader_write_tag_0_payload_address; + wire lineLoader_write_tag_0_payload_data_valid; + wire lineLoader_write_tag_0_payload_data_error; + wire [20:0] lineLoader_write_tag_0_payload_data_address; + wire lineLoader_write_data_0_valid; + wire [8:0] lineLoader_write_data_0_payload_address; + wire [31:0] lineLoader_write_data_0_payload_data; + wire _zz_4_; + wire [5:0] _zz_5_; + wire _zz_6_; + wire fetchStage_read_waysValues_0_tag_valid; + wire fetchStage_read_waysValues_0_tag_error; + wire [20:0] fetchStage_read_waysValues_0_tag_address; + wire [22:0] _zz_7_; + wire [8:0] _zz_8_; + wire _zz_9_; + wire [31:0] fetchStage_read_waysValues_0_data; + wire fetchStage_hit_hits_0; + wire fetchStage_hit_valid; + wire fetchStage_hit_error; + wire [31:0] fetchStage_hit_data; + wire [31:0] fetchStage_hit_word; + reg [31:0] io_cpu_fetch_data_regNextWhen; + reg [31:0] decodeStage_mmuRsp_physicalAddress; + reg decodeStage_mmuRsp_isIoAccess; + reg decodeStage_mmuRsp_allowRead; + reg decodeStage_mmuRsp_allowWrite; + reg decodeStage_mmuRsp_allowExecute; + reg decodeStage_mmuRsp_exception; + reg decodeStage_mmuRsp_refilling; + reg decodeStage_hit_valid; + reg decodeStage_hit_error; + (* ram_style = "block" *) reg [22:0] ways_0_tags [0:63]; + (* ram_style = "block" *) reg [31:0] ways_0_datas [0:511]; + assign _zz_12_ = (! lineLoader_flushCounter[6]); + assign _zz_13_ = (lineLoader_flushPending && (! (lineLoader_valid || io_cpu_fetch_isValid))); + assign _zz_14_ = _zz_7_[0 : 0]; + assign _zz_15_ = _zz_7_[1 : 1]; + assign _zz_16_ = {lineLoader_write_tag_0_payload_data_address,{lineLoader_write_tag_0_payload_data_error,lineLoader_write_tag_0_payload_data_valid}}; + always @ (posedge clk) begin + if(_zz_2_) begin + ways_0_tags[lineLoader_write_tag_0_payload_address] <= _zz_16_; + end + end + + always @ (posedge clk) begin + if(_zz_6_) begin + _zz_10_ <= ways_0_tags[_zz_5_]; + end + end + + always @ (posedge clk) begin + if(_zz_1_) begin + ways_0_datas[lineLoader_write_data_0_payload_address] <= lineLoader_write_data_0_payload_data; + end + end + + always @ (posedge clk) begin + if(_zz_9_) begin + _zz_11_ <= ways_0_datas[_zz_8_]; + end + end + + always @ (*) begin + _zz_1_ = 1'b0; + if(lineLoader_write_data_0_valid)begin + _zz_1_ = 1'b1; + end + end + + always @ (*) begin + _zz_2_ = 1'b0; + if(lineLoader_write_tag_0_valid)begin + _zz_2_ = 1'b1; + end + end + + assign io_cpu_fetch_haltIt = io_cpu_fetch_mmuBus_busy; + always @ (*) begin + lineLoader_fire = 1'b0; + if(io_mem_rsp_valid)begin + if((lineLoader_wordIndex == (3'b111)))begin + lineLoader_fire = 1'b1; + end + end + end + + always @ (*) begin + io_cpu_prefetch_haltIt = (lineLoader_valid || lineLoader_flushPending); + if(_zz_12_)begin + io_cpu_prefetch_haltIt = 1'b1; + end + if((! _zz_3_))begin + io_cpu_prefetch_haltIt = 1'b1; + end + if(io_flush)begin + io_cpu_prefetch_haltIt = 1'b1; + end + end + + assign io_mem_cmd_valid = (lineLoader_valid && (! lineLoader_cmdSent)); + assign io_mem_cmd_payload_address = {lineLoader_address[31 : 5],(5'b00000)}; + assign io_mem_cmd_payload_size = (3'b101); + always @ (*) begin + lineLoader_wayToAllocate_willIncrement = 1'b0; + if((! lineLoader_valid))begin + lineLoader_wayToAllocate_willIncrement = 1'b1; + end + end + + assign lineLoader_wayToAllocate_willClear = 1'b0; + assign lineLoader_wayToAllocate_willOverflowIfInc = 1'b1; + assign lineLoader_wayToAllocate_willOverflow = (lineLoader_wayToAllocate_willOverflowIfInc && lineLoader_wayToAllocate_willIncrement); + assign _zz_4_ = 1'b1; + assign lineLoader_write_tag_0_valid = ((_zz_4_ && lineLoader_fire) || (! lineLoader_flushCounter[6])); + assign lineLoader_write_tag_0_payload_address = (lineLoader_flushCounter[6] ? lineLoader_address[10 : 5] : lineLoader_flushCounter[5 : 0]); + assign lineLoader_write_tag_0_payload_data_valid = lineLoader_flushCounter[6]; + assign lineLoader_write_tag_0_payload_data_error = (lineLoader_hadError || io_mem_rsp_payload_error); + assign lineLoader_write_tag_0_payload_data_address = lineLoader_address[31 : 11]; + assign lineLoader_write_data_0_valid = (io_mem_rsp_valid && _zz_4_); + assign lineLoader_write_data_0_payload_address = {lineLoader_address[10 : 5],lineLoader_wordIndex}; + assign lineLoader_write_data_0_payload_data = io_mem_rsp_payload_data; + assign _zz_5_ = io_cpu_prefetch_pc[10 : 5]; + assign _zz_6_ = (! io_cpu_fetch_isStuck); + assign _zz_7_ = _zz_10_; + assign fetchStage_read_waysValues_0_tag_valid = _zz_14_[0]; + assign fetchStage_read_waysValues_0_tag_error = _zz_15_[0]; + assign fetchStage_read_waysValues_0_tag_address = _zz_7_[22 : 2]; + assign _zz_8_ = io_cpu_prefetch_pc[10 : 2]; + assign _zz_9_ = (! io_cpu_fetch_isStuck); + assign fetchStage_read_waysValues_0_data = _zz_11_; + assign fetchStage_hit_hits_0 = (fetchStage_read_waysValues_0_tag_valid && (fetchStage_read_waysValues_0_tag_address == io_cpu_fetch_mmuBus_rsp_physicalAddress[31 : 11])); + assign fetchStage_hit_valid = (fetchStage_hit_hits_0 != (1'b0)); + assign fetchStage_hit_error = fetchStage_read_waysValues_0_tag_error; + assign fetchStage_hit_data = fetchStage_read_waysValues_0_data; + assign fetchStage_hit_word = fetchStage_hit_data[31 : 0]; + assign io_cpu_fetch_data = (io_cpu_fetch_dataBypassValid ? io_cpu_fetch_dataBypass : fetchStage_hit_word); + assign io_cpu_decode_data = io_cpu_fetch_data_regNextWhen; + assign io_cpu_fetch_mmuBus_cmd_isValid = io_cpu_fetch_isValid; + assign io_cpu_fetch_mmuBus_cmd_virtualAddress = io_cpu_fetch_pc; + assign io_cpu_fetch_mmuBus_cmd_bypassTranslation = 1'b0; + assign io_cpu_fetch_mmuBus_end = ((! io_cpu_fetch_isStuck) || io_cpu_fetch_isRemoved); + assign io_cpu_fetch_physicalAddress = io_cpu_fetch_mmuBus_rsp_physicalAddress; + assign io_cpu_decode_cacheMiss = (! decodeStage_hit_valid); + assign io_cpu_decode_error = decodeStage_hit_error; + assign io_cpu_decode_mmuRefilling = decodeStage_mmuRsp_refilling; + assign io_cpu_decode_mmuException = ((! decodeStage_mmuRsp_refilling) && (decodeStage_mmuRsp_exception || (! decodeStage_mmuRsp_allowExecute))); + assign io_cpu_decode_physicalAddress = decodeStage_mmuRsp_physicalAddress; + always @ (posedge clk) begin + if(reset) begin + lineLoader_valid <= 1'b0; + lineLoader_hadError <= 1'b0; + lineLoader_flushPending <= 1'b1; + lineLoader_cmdSent <= 1'b0; + lineLoader_wordIndex <= (3'b000); + end else begin + if(lineLoader_fire)begin + lineLoader_valid <= 1'b0; + end + if(lineLoader_fire)begin + lineLoader_hadError <= 1'b0; + end + if(io_cpu_fill_valid)begin + lineLoader_valid <= 1'b1; + end + if(io_flush)begin + lineLoader_flushPending <= 1'b1; + end + if(_zz_13_)begin + lineLoader_flushPending <= 1'b0; + end + if((io_mem_cmd_valid && io_mem_cmd_ready))begin + lineLoader_cmdSent <= 1'b1; + end + if(lineLoader_fire)begin + lineLoader_cmdSent <= 1'b0; + end + if(io_mem_rsp_valid)begin + lineLoader_wordIndex <= (lineLoader_wordIndex + (3'b001)); + if(io_mem_rsp_payload_error)begin + lineLoader_hadError <= 1'b1; + end + end + end + end + + always @ (posedge clk) begin + if(io_cpu_fill_valid)begin + lineLoader_address <= io_cpu_fill_payload; + end + if(_zz_12_)begin + lineLoader_flushCounter <= (lineLoader_flushCounter + (7'b0000001)); + end + _zz_3_ <= lineLoader_flushCounter[6]; + if(_zz_13_)begin + lineLoader_flushCounter <= (7'b0000000); + end + if((! io_cpu_decode_isStuck))begin + io_cpu_fetch_data_regNextWhen <= io_cpu_fetch_data; + end + if((! io_cpu_decode_isStuck))begin + decodeStage_mmuRsp_physicalAddress <= io_cpu_fetch_mmuBus_rsp_physicalAddress; + decodeStage_mmuRsp_isIoAccess <= io_cpu_fetch_mmuBus_rsp_isIoAccess; + decodeStage_mmuRsp_allowRead <= io_cpu_fetch_mmuBus_rsp_allowRead; + decodeStage_mmuRsp_allowWrite <= io_cpu_fetch_mmuBus_rsp_allowWrite; + decodeStage_mmuRsp_allowExecute <= io_cpu_fetch_mmuBus_rsp_allowExecute; + decodeStage_mmuRsp_exception <= io_cpu_fetch_mmuBus_rsp_exception; + decodeStage_mmuRsp_refilling <= io_cpu_fetch_mmuBus_rsp_refilling; + end + if((! io_cpu_decode_isStuck))begin + decodeStage_hit_valid <= fetchStage_hit_valid; + end + if((! io_cpu_decode_isStuck))begin + decodeStage_hit_error <= fetchStage_hit_error; + end + end + +endmodule + +module VexRiscv ( + input [31:0] externalResetVector, + input timerInterrupt, + input softwareInterrupt, + input [31:0] externalInterruptArray, + output reg iBusWishbone_CYC, + output reg iBusWishbone_STB, + input iBusWishbone_ACK, + output iBusWishbone_WE, + output [29:0] iBusWishbone_ADR, + input [31:0] iBusWishbone_DAT_MISO, + output [31:0] iBusWishbone_DAT_MOSI, + output [3:0] iBusWishbone_SEL, + input iBusWishbone_ERR, + output [1:0] iBusWishbone_BTE, + output [2:0] iBusWishbone_CTI, + output dBusWishbone_CYC, + output dBusWishbone_STB, + input dBusWishbone_ACK, + output dBusWishbone_WE, + output [29:0] dBusWishbone_ADR, + input [31:0] dBusWishbone_DAT_MISO, + output [31:0] dBusWishbone_DAT_MOSI, + output reg [3:0] dBusWishbone_SEL, + input dBusWishbone_ERR, + output [1:0] dBusWishbone_BTE, + output [2:0] dBusWishbone_CTI, + input clk, + input reset); + wire _zz_205_; + wire _zz_206_; + wire _zz_207_; + wire _zz_208_; + wire [31:0] _zz_209_; + wire _zz_210_; + wire _zz_211_; + wire _zz_212_; + reg _zz_213_; + reg [31:0] _zz_214_; + reg [31:0] _zz_215_; + reg [31:0] _zz_216_; + wire IBusCachedPlugin_cache_io_cpu_prefetch_haltIt; + wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_data; + wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress; + wire IBusCachedPlugin_cache_io_cpu_fetch_haltIt; + wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; + wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; + wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; + wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; + wire IBusCachedPlugin_cache_io_cpu_decode_error; + wire IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling; + wire IBusCachedPlugin_cache_io_cpu_decode_mmuException; + wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_data; + wire IBusCachedPlugin_cache_io_cpu_decode_cacheMiss; + wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_physicalAddress; + wire IBusCachedPlugin_cache_io_mem_cmd_valid; + wire [31:0] IBusCachedPlugin_cache_io_mem_cmd_payload_address; + wire [2:0] IBusCachedPlugin_cache_io_mem_cmd_payload_size; + wire _zz_217_; + wire _zz_218_; + wire _zz_219_; + wire _zz_220_; + wire _zz_221_; + wire _zz_222_; + wire _zz_223_; + wire _zz_224_; + wire _zz_225_; + wire _zz_226_; + wire _zz_227_; + wire _zz_228_; + wire _zz_229_; + wire _zz_230_; + wire _zz_231_; + wire _zz_232_; + wire _zz_233_; + wire _zz_234_; + wire _zz_235_; + wire [1:0] _zz_236_; + wire _zz_237_; + wire _zz_238_; + wire _zz_239_; + wire _zz_240_; + wire _zz_241_; + wire _zz_242_; + wire _zz_243_; + wire _zz_244_; + wire _zz_245_; + wire _zz_246_; + wire _zz_247_; + wire _zz_248_; + wire _zz_249_; + wire _zz_250_; + wire _zz_251_; + wire _zz_252_; + wire [1:0] _zz_253_; + wire _zz_254_; + wire [4:0] _zz_255_; + wire [2:0] _zz_256_; + wire [31:0] _zz_257_; + wire [11:0] _zz_258_; + wire [31:0] _zz_259_; + wire [19:0] _zz_260_; + wire [11:0] _zz_261_; + wire [31:0] _zz_262_; + wire [31:0] _zz_263_; + wire [19:0] _zz_264_; + wire [11:0] _zz_265_; + wire [2:0] _zz_266_; + wire [0:0] _zz_267_; + wire [0:0] _zz_268_; + wire [0:0] _zz_269_; + wire [0:0] _zz_270_; + wire [0:0] _zz_271_; + wire [0:0] _zz_272_; + wire [0:0] _zz_273_; + wire [0:0] _zz_274_; + wire [0:0] _zz_275_; + wire [0:0] _zz_276_; + wire [0:0] _zz_277_; + wire [0:0] _zz_278_; + wire [0:0] _zz_279_; + wire [0:0] _zz_280_; + wire [0:0] _zz_281_; + wire [0:0] _zz_282_; + wire [0:0] _zz_283_; + wire [2:0] _zz_284_; + wire [4:0] _zz_285_; + wire [11:0] _zz_286_; + wire [11:0] _zz_287_; + wire [31:0] _zz_288_; + wire [31:0] _zz_289_; + wire [31:0] _zz_290_; + wire [31:0] _zz_291_; + wire [31:0] _zz_292_; + wire [31:0] _zz_293_; + wire [31:0] _zz_294_; + wire [31:0] _zz_295_; + wire [32:0] _zz_296_; + wire [11:0] _zz_297_; + wire [19:0] _zz_298_; + wire [11:0] _zz_299_; + wire [31:0] _zz_300_; + wire [31:0] _zz_301_; + wire [31:0] _zz_302_; + wire [11:0] _zz_303_; + wire [19:0] _zz_304_; + wire [11:0] _zz_305_; + wire [2:0] _zz_306_; + wire [1:0] _zz_307_; + wire [1:0] _zz_308_; + wire [1:0] _zz_309_; + wire [1:0] _zz_310_; + wire [0:0] _zz_311_; + wire [5:0] _zz_312_; + wire [33:0] _zz_313_; + wire [32:0] _zz_314_; + wire [33:0] _zz_315_; + wire [32:0] _zz_316_; + wire [33:0] _zz_317_; + wire [32:0] _zz_318_; + wire [0:0] _zz_319_; + wire [5:0] _zz_320_; + wire [32:0] _zz_321_; + wire [32:0] _zz_322_; + wire [31:0] _zz_323_; + wire [31:0] _zz_324_; + wire [32:0] _zz_325_; + wire [32:0] _zz_326_; + wire [32:0] _zz_327_; + wire [0:0] _zz_328_; + wire [32:0] _zz_329_; + wire [0:0] _zz_330_; + wire [32:0] _zz_331_; + wire [0:0] _zz_332_; + wire [31:0] _zz_333_; + wire [0:0] _zz_334_; + wire [0:0] _zz_335_; + wire [0:0] _zz_336_; + wire [0:0] _zz_337_; + wire [0:0] _zz_338_; + wire [0:0] _zz_339_; + wire [26:0] _zz_340_; + wire [6:0] _zz_341_; + wire _zz_342_; + wire _zz_343_; + wire [2:0] _zz_344_; + wire _zz_345_; + wire _zz_346_; + wire _zz_347_; + wire _zz_348_; + wire [0:0] _zz_349_; + wire [0:0] _zz_350_; + wire [0:0] _zz_351_; + wire [0:0] _zz_352_; + wire _zz_353_; + wire [0:0] _zz_354_; + wire [23:0] _zz_355_; + wire [31:0] _zz_356_; + wire [31:0] _zz_357_; + wire _zz_358_; + wire [0:0] _zz_359_; + wire [0:0] _zz_360_; + wire [0:0] _zz_361_; + wire [0:0] _zz_362_; + wire [1:0] _zz_363_; + wire [1:0] _zz_364_; + wire _zz_365_; + wire [0:0] _zz_366_; + wire [20:0] _zz_367_; + wire [31:0] _zz_368_; + wire [31:0] _zz_369_; + wire [31:0] _zz_370_; + wire [31:0] _zz_371_; + wire _zz_372_; + wire [0:0] _zz_373_; + wire [1:0] _zz_374_; + wire [0:0] _zz_375_; + wire [0:0] _zz_376_; + wire _zz_377_; + wire [0:0] _zz_378_; + wire [17:0] _zz_379_; + wire [31:0] _zz_380_; + wire [31:0] _zz_381_; + wire [31:0] _zz_382_; + wire [31:0] _zz_383_; + wire [31:0] _zz_384_; + wire [31:0] _zz_385_; + wire [31:0] _zz_386_; + wire [31:0] _zz_387_; + wire [0:0] _zz_388_; + wire [0:0] _zz_389_; + wire [5:0] _zz_390_; + wire [5:0] _zz_391_; + wire _zz_392_; + wire [0:0] _zz_393_; + wire [14:0] _zz_394_; + wire [31:0] _zz_395_; + wire [31:0] _zz_396_; + wire _zz_397_; + wire [0:0] _zz_398_; + wire [2:0] _zz_399_; + wire _zz_400_; + wire _zz_401_; + wire [0:0] _zz_402_; + wire [2:0] _zz_403_; + wire [0:0] _zz_404_; + wire [0:0] _zz_405_; + wire _zz_406_; + wire [0:0] _zz_407_; + wire [11:0] _zz_408_; + wire [31:0] _zz_409_; + wire [31:0] _zz_410_; + wire [31:0] _zz_411_; + wire _zz_412_; + wire [0:0] _zz_413_; + wire [0:0] _zz_414_; + wire [31:0] _zz_415_; + wire [31:0] _zz_416_; + wire [31:0] _zz_417_; + wire [31:0] _zz_418_; + wire _zz_419_; + wire [0:0] _zz_420_; + wire [0:0] _zz_421_; + wire [31:0] _zz_422_; + wire [31:0] _zz_423_; + wire [0:0] _zz_424_; + wire [0:0] _zz_425_; + wire [0:0] _zz_426_; + wire [0:0] _zz_427_; + wire _zz_428_; + wire [0:0] _zz_429_; + wire [9:0] _zz_430_; + wire [31:0] _zz_431_; + wire [31:0] _zz_432_; + wire [31:0] _zz_433_; + wire [31:0] _zz_434_; + wire [31:0] _zz_435_; + wire [31:0] _zz_436_; + wire [31:0] _zz_437_; + wire [31:0] _zz_438_; + wire [31:0] _zz_439_; + wire [31:0] _zz_440_; + wire [31:0] _zz_441_; + wire [31:0] _zz_442_; + wire [31:0] _zz_443_; + wire [31:0] _zz_444_; + wire _zz_445_; + wire [0:0] _zz_446_; + wire [0:0] _zz_447_; + wire _zz_448_; + wire [0:0] _zz_449_; + wire [7:0] _zz_450_; + wire _zz_451_; + wire [0:0] _zz_452_; + wire [0:0] _zz_453_; + wire [0:0] _zz_454_; + wire [0:0] _zz_455_; + wire [0:0] _zz_456_; + wire [0:0] _zz_457_; + wire _zz_458_; + wire [0:0] _zz_459_; + wire [3:0] _zz_460_; + wire [31:0] _zz_461_; + wire [31:0] _zz_462_; + wire [31:0] _zz_463_; + wire [31:0] _zz_464_; + wire [31:0] _zz_465_; + wire _zz_466_; + wire _zz_467_; + wire [0:0] _zz_468_; + wire [1:0] _zz_469_; + wire [2:0] _zz_470_; + wire [2:0] _zz_471_; + wire _zz_472_; + wire [0:0] _zz_473_; + wire [0:0] _zz_474_; + wire [31:0] _zz_475_; + wire [31:0] _zz_476_; + wire [31:0] _zz_477_; + wire [31:0] _zz_478_; + wire [31:0] _zz_479_; + wire _zz_480_; + wire _zz_481_; + wire [31:0] _zz_482_; + wire [31:0] _zz_483_; + wire [0:0] _zz_484_; + wire [0:0] _zz_485_; + wire _zz_486_; + wire [31:0] _zz_487_; + wire [31:0] _zz_488_; + wire [31:0] _zz_489_; + wire _zz_490_; + wire [0:0] _zz_491_; + wire [10:0] _zz_492_; + wire [31:0] _zz_493_; + wire [31:0] _zz_494_; + wire [31:0] _zz_495_; + wire _zz_496_; + wire [0:0] _zz_497_; + wire [4:0] _zz_498_; + wire [31:0] _zz_499_; + wire [31:0] _zz_500_; + wire [31:0] _zz_501_; + wire [31:0] _zz_502_; + wire [31:0] _zz_503_; + wire _zz_504_; + wire _zz_505_; + wire _zz_506_; + wire `AluCtrlEnum_defaultEncoding_type decode_ALU_CTRL; + wire `AluCtrlEnum_defaultEncoding_type _zz_1_; + wire `AluCtrlEnum_defaultEncoding_type _zz_2_; + wire `AluCtrlEnum_defaultEncoding_type _zz_3_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type decode_ALU_BITWISE_CTRL; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_4_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_5_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_6_; + wire `Src2CtrlEnum_defaultEncoding_type decode_SRC2_CTRL; + wire `Src2CtrlEnum_defaultEncoding_type _zz_7_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_8_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_9_; + wire decode_IS_RS2_SIGNED; + wire decode_BYPASSABLE_EXECUTE_STAGE; + wire decode_IS_RS1_SIGNED; + wire decode_CSR_READ_OPCODE; + wire decode_IS_DIV; + wire [1:0] memory_MEMORY_ADDRESS_LOW; + wire [1:0] execute_MEMORY_ADDRESS_LOW; + wire decode_IS_MUL; + wire [31:0] execute_BRANCH_CALC; + wire `BranchCtrlEnum_defaultEncoding_type _zz_10_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_11_; + wire `Src1CtrlEnum_defaultEncoding_type decode_SRC1_CTRL; + wire `Src1CtrlEnum_defaultEncoding_type _zz_12_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_13_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_14_; + wire execute_BYPASSABLE_MEMORY_STAGE; + wire decode_BYPASSABLE_MEMORY_STAGE; + wire decode_SRC2_FORCE_ZERO; + wire decode_CSR_WRITE_OPCODE; + wire [31:0] writeBack_REGFILE_WRITE_DATA; + wire [31:0] execute_REGFILE_WRITE_DATA; + wire execute_BRANCH_DO; + wire decode_SRC_LESS_UNSIGNED; + wire `EnvCtrlEnum_defaultEncoding_type _zz_15_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_16_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_17_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_18_; + wire `EnvCtrlEnum_defaultEncoding_type decode_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_19_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_20_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_21_; + wire [31:0] writeBack_FORMAL_PC_NEXT; + wire [31:0] memory_FORMAL_PC_NEXT; + wire [31:0] execute_FORMAL_PC_NEXT; + wire [31:0] decode_FORMAL_PC_NEXT; + wire decode_MEMORY_STORE; + wire decode_PREDICTION_HAD_BRANCHED2; + wire decode_IS_CSR; + wire `ShiftCtrlEnum_defaultEncoding_type decode_SHIFT_CTRL; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_22_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_23_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_24_; + wire [31:0] memory_MEMORY_READ_DATA; + wire execute_IS_RS1_SIGNED; + wire execute_IS_DIV; + wire execute_IS_MUL; + wire execute_IS_RS2_SIGNED; + wire memory_IS_DIV; + wire memory_IS_MUL; + wire execute_CSR_READ_OPCODE; + wire execute_CSR_WRITE_OPCODE; + wire execute_IS_CSR; + wire `EnvCtrlEnum_defaultEncoding_type memory_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_25_; + wire `EnvCtrlEnum_defaultEncoding_type execute_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_26_; + wire _zz_27_; + wire _zz_28_; + wire `EnvCtrlEnum_defaultEncoding_type writeBack_ENV_CTRL; + wire `EnvCtrlEnum_defaultEncoding_type _zz_29_; + wire [31:0] memory_BRANCH_CALC; + wire memory_BRANCH_DO; + wire [31:0] _zz_30_; + wire [31:0] execute_PC; + wire execute_PREDICTION_HAD_BRANCHED2; + wire _zz_31_; + wire [31:0] execute_RS1; + wire execute_BRANCH_COND_RESULT; + wire `BranchCtrlEnum_defaultEncoding_type execute_BRANCH_CTRL; + wire `BranchCtrlEnum_defaultEncoding_type _zz_32_; + wire _zz_33_; + wire _zz_34_; + wire decode_RS2_USE; + wire decode_RS1_USE; + wire execute_REGFILE_WRITE_VALID; + wire execute_BYPASSABLE_EXECUTE_STAGE; + reg [31:0] _zz_35_; + wire memory_REGFILE_WRITE_VALID; + wire [31:0] memory_INSTRUCTION; + wire memory_BYPASSABLE_MEMORY_STAGE; + wire writeBack_REGFILE_WRITE_VALID; + reg [31:0] decode_RS2; + reg [31:0] decode_RS1; + reg [31:0] _zz_36_; + wire `ShiftCtrlEnum_defaultEncoding_type execute_SHIFT_CTRL; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_37_; + wire _zz_38_; + wire [31:0] _zz_39_; + wire [31:0] _zz_40_; + wire execute_SRC_LESS_UNSIGNED; + wire execute_SRC2_FORCE_ZERO; + wire execute_SRC_USE_SUB_LESS; + wire [31:0] _zz_41_; + wire `Src2CtrlEnum_defaultEncoding_type execute_SRC2_CTRL; + wire `Src2CtrlEnum_defaultEncoding_type _zz_42_; + wire [31:0] _zz_43_; + wire `Src1CtrlEnum_defaultEncoding_type execute_SRC1_CTRL; + wire `Src1CtrlEnum_defaultEncoding_type _zz_44_; + wire [31:0] _zz_45_; + wire decode_SRC_USE_SUB_LESS; + wire decode_SRC_ADD_ZERO; + wire _zz_46_; + wire [31:0] execute_SRC_ADD_SUB; + wire execute_SRC_LESS; + wire `AluCtrlEnum_defaultEncoding_type execute_ALU_CTRL; + wire `AluCtrlEnum_defaultEncoding_type _zz_47_; + wire [31:0] _zz_48_; + wire [31:0] execute_SRC2; + wire [31:0] execute_SRC1; + wire `AluBitwiseCtrlEnum_defaultEncoding_type execute_ALU_BITWISE_CTRL; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_49_; + wire [31:0] _zz_50_; + wire _zz_51_; + reg _zz_52_; + wire [31:0] _zz_53_; + wire [31:0] _zz_54_; + wire [31:0] decode_INSTRUCTION_ANTICIPATED; + reg decode_REGFILE_WRITE_VALID; + wire decode_LEGAL_INSTRUCTION; + wire decode_INSTRUCTION_READY; + wire _zz_55_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_56_; + wire _zz_57_; + wire _zz_58_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_59_; + wire _zz_60_; + wire _zz_61_; + wire _zz_62_; + wire _zz_63_; + wire _zz_64_; + wire _zz_65_; + wire _zz_66_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_67_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_68_; + wire _zz_69_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_70_; + wire _zz_71_; + wire `AluCtrlEnum_defaultEncoding_type _zz_72_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_73_; + wire _zz_74_; + wire _zz_75_; + wire _zz_76_; + wire _zz_77_; + wire _zz_78_; + wire writeBack_MEMORY_STORE; + reg [31:0] _zz_79_; + wire writeBack_MEMORY_ENABLE; + wire [1:0] writeBack_MEMORY_ADDRESS_LOW; + wire [31:0] writeBack_MEMORY_READ_DATA; + wire memory_MMU_FAULT; + wire [31:0] memory_MMU_RSP_physicalAddress; + wire memory_MMU_RSP_isIoAccess; + wire memory_MMU_RSP_allowRead; + wire memory_MMU_RSP_allowWrite; + wire memory_MMU_RSP_allowExecute; + wire memory_MMU_RSP_exception; + wire memory_MMU_RSP_refilling; + wire [31:0] memory_PC; + wire memory_ALIGNEMENT_FAULT; + wire [31:0] memory_REGFILE_WRITE_DATA; + wire memory_MEMORY_STORE; + wire memory_MEMORY_ENABLE; + wire [31:0] _zz_80_; + wire [31:0] _zz_81_; + wire _zz_82_; + wire _zz_83_; + wire _zz_84_; + wire _zz_85_; + wire _zz_86_; + wire _zz_87_; + wire execute_MMU_FAULT; + wire [31:0] execute_MMU_RSP_physicalAddress; + wire execute_MMU_RSP_isIoAccess; + wire execute_MMU_RSP_allowRead; + wire execute_MMU_RSP_allowWrite; + wire execute_MMU_RSP_allowExecute; + wire execute_MMU_RSP_exception; + wire execute_MMU_RSP_refilling; + wire _zz_88_; + wire [31:0] execute_SRC_ADD; + wire [1:0] _zz_89_; + wire [31:0] execute_RS2; + wire [31:0] execute_INSTRUCTION; + wire execute_MEMORY_STORE; + wire execute_MEMORY_ENABLE; + wire execute_ALIGNEMENT_FAULT; + wire _zz_90_; + wire decode_MEMORY_ENABLE; + wire decode_FLUSH_ALL; + reg IBusCachedPlugin_rsp_issueDetected; + reg _zz_91_; + reg _zz_92_; + reg _zz_93_; + wire [31:0] _zz_94_; + wire `BranchCtrlEnum_defaultEncoding_type decode_BRANCH_CTRL; + wire `BranchCtrlEnum_defaultEncoding_type _zz_95_; + wire [31:0] decode_INSTRUCTION; + reg [31:0] _zz_96_; + reg [31:0] _zz_97_; + wire [31:0] decode_PC; + wire [31:0] _zz_98_; + wire [31:0] _zz_99_; + wire [31:0] _zz_100_; + wire [31:0] writeBack_PC; + wire [31:0] writeBack_INSTRUCTION; + reg decode_arbitration_haltItself; + reg decode_arbitration_haltByOther; + reg decode_arbitration_removeIt; + wire decode_arbitration_flushIt; + reg decode_arbitration_flushNext; + wire decode_arbitration_isValid; + wire decode_arbitration_isStuck; + wire decode_arbitration_isStuckByOthers; + wire decode_arbitration_isFlushed; + wire decode_arbitration_isMoving; + wire decode_arbitration_isFiring; + reg execute_arbitration_haltItself; + wire execute_arbitration_haltByOther; + reg execute_arbitration_removeIt; + wire execute_arbitration_flushIt; + wire execute_arbitration_flushNext; + reg execute_arbitration_isValid; + wire execute_arbitration_isStuck; + wire execute_arbitration_isStuckByOthers; + wire execute_arbitration_isFlushed; + wire execute_arbitration_isMoving; + wire execute_arbitration_isFiring; + reg memory_arbitration_haltItself; + wire memory_arbitration_haltByOther; + reg memory_arbitration_removeIt; + reg memory_arbitration_flushIt; + reg memory_arbitration_flushNext; + reg memory_arbitration_isValid; + wire memory_arbitration_isStuck; + wire memory_arbitration_isStuckByOthers; + wire memory_arbitration_isFlushed; + wire memory_arbitration_isMoving; + wire memory_arbitration_isFiring; + wire writeBack_arbitration_haltItself; + wire writeBack_arbitration_haltByOther; + reg writeBack_arbitration_removeIt; + wire writeBack_arbitration_flushIt; + reg writeBack_arbitration_flushNext; + reg writeBack_arbitration_isValid; + wire writeBack_arbitration_isStuck; + wire writeBack_arbitration_isStuckByOthers; + wire writeBack_arbitration_isFlushed; + wire writeBack_arbitration_isMoving; + wire writeBack_arbitration_isFiring; + wire [31:0] lastStageInstruction /* verilator public */ ; + wire [31:0] lastStagePc /* verilator public */ ; + wire lastStageIsValid /* verilator public */ ; + wire lastStageIsFiring /* verilator public */ ; + reg IBusCachedPlugin_fetcherHalt; + reg IBusCachedPlugin_fetcherflushIt; + reg IBusCachedPlugin_incomingInstruction; + wire IBusCachedPlugin_predictionJumpInterface_valid; + (* syn_keep , keep *) wire [31:0] IBusCachedPlugin_predictionJumpInterface_payload /* synthesis syn_keep = 1 */ ; + reg IBusCachedPlugin_decodePrediction_cmd_hadBranch; + wire IBusCachedPlugin_decodePrediction_rsp_wasWrong; + wire IBusCachedPlugin_pcValids_0; + wire IBusCachedPlugin_pcValids_1; + wire IBusCachedPlugin_pcValids_2; + wire IBusCachedPlugin_pcValids_3; + wire IBusCachedPlugin_redoBranch_valid; + wire [31:0] IBusCachedPlugin_redoBranch_payload; + reg IBusCachedPlugin_decodeExceptionPort_valid; + reg [3:0] IBusCachedPlugin_decodeExceptionPort_payload_code; + wire [31:0] IBusCachedPlugin_decodeExceptionPort_payload_badAddr; + wire IBusCachedPlugin_mmuBus_cmd_isValid; + wire [31:0] IBusCachedPlugin_mmuBus_cmd_virtualAddress; + wire IBusCachedPlugin_mmuBus_cmd_bypassTranslation; + wire [31:0] IBusCachedPlugin_mmuBus_rsp_physicalAddress; + wire IBusCachedPlugin_mmuBus_rsp_isIoAccess; + wire IBusCachedPlugin_mmuBus_rsp_allowRead; + wire IBusCachedPlugin_mmuBus_rsp_allowWrite; + wire IBusCachedPlugin_mmuBus_rsp_allowExecute; + wire IBusCachedPlugin_mmuBus_rsp_exception; + wire IBusCachedPlugin_mmuBus_rsp_refilling; + wire IBusCachedPlugin_mmuBus_end; + wire IBusCachedPlugin_mmuBus_busy; + reg DBusSimplePlugin_memoryExceptionPort_valid; + reg [3:0] DBusSimplePlugin_memoryExceptionPort_payload_code; + wire [31:0] DBusSimplePlugin_memoryExceptionPort_payload_badAddr; + wire DBusSimplePlugin_mmuBus_cmd_isValid; + wire [31:0] DBusSimplePlugin_mmuBus_cmd_virtualAddress; + wire DBusSimplePlugin_mmuBus_cmd_bypassTranslation; + wire [31:0] DBusSimplePlugin_mmuBus_rsp_physicalAddress; + wire DBusSimplePlugin_mmuBus_rsp_isIoAccess; + wire DBusSimplePlugin_mmuBus_rsp_allowRead; + wire DBusSimplePlugin_mmuBus_rsp_allowWrite; + wire DBusSimplePlugin_mmuBus_rsp_allowExecute; + wire DBusSimplePlugin_mmuBus_rsp_exception; + wire DBusSimplePlugin_mmuBus_rsp_refilling; + wire DBusSimplePlugin_mmuBus_end; + wire DBusSimplePlugin_mmuBus_busy; + reg DBusSimplePlugin_redoBranch_valid; + wire [31:0] DBusSimplePlugin_redoBranch_payload; + wire decodeExceptionPort_valid; + wire [3:0] decodeExceptionPort_payload_code; + wire [31:0] decodeExceptionPort_payload_badAddr; + wire BranchPlugin_jumpInterface_valid; + wire [31:0] BranchPlugin_jumpInterface_payload; + wire BranchPlugin_branchExceptionPort_valid; + wire [3:0] BranchPlugin_branchExceptionPort_payload_code; + wire [31:0] BranchPlugin_branchExceptionPort_payload_badAddr; + reg CsrPlugin_jumpInterface_valid; + reg [31:0] CsrPlugin_jumpInterface_payload; + wire CsrPlugin_exceptionPendings_0; + wire CsrPlugin_exceptionPendings_1; + wire CsrPlugin_exceptionPendings_2; + wire CsrPlugin_exceptionPendings_3; + wire externalInterrupt; + wire contextSwitching; + reg [1:0] CsrPlugin_privilege; + wire CsrPlugin_forceMachineWire; + wire CsrPlugin_allowInterrupts; + wire CsrPlugin_allowException; + wire IBusCachedPlugin_jump_pcLoad_valid; + wire [31:0] IBusCachedPlugin_jump_pcLoad_payload; + wire [4:0] _zz_101_; + wire [4:0] _zz_102_; + wire _zz_103_; + wire _zz_104_; + wire _zz_105_; + wire _zz_106_; + wire IBusCachedPlugin_fetchPc_output_valid; + wire IBusCachedPlugin_fetchPc_output_ready; + wire [31:0] IBusCachedPlugin_fetchPc_output_payload; + reg [31:0] IBusCachedPlugin_fetchPc_pcReg /* verilator public */ ; + reg IBusCachedPlugin_fetchPc_corrected; + reg IBusCachedPlugin_fetchPc_pcRegPropagate; + reg IBusCachedPlugin_fetchPc_booted; + reg IBusCachedPlugin_fetchPc_inc; + reg [31:0] IBusCachedPlugin_fetchPc_pc; + wire IBusCachedPlugin_iBusRsp_stages_0_input_valid; + wire IBusCachedPlugin_iBusRsp_stages_0_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_input_payload; + wire IBusCachedPlugin_iBusRsp_stages_0_output_valid; + wire IBusCachedPlugin_iBusRsp_stages_0_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_output_payload; + reg IBusCachedPlugin_iBusRsp_stages_0_halt; + wire IBusCachedPlugin_iBusRsp_stages_0_inputSample; + wire IBusCachedPlugin_iBusRsp_stages_1_input_valid; + wire IBusCachedPlugin_iBusRsp_stages_1_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_input_payload; + wire IBusCachedPlugin_iBusRsp_stages_1_output_valid; + wire IBusCachedPlugin_iBusRsp_stages_1_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_output_payload; + reg IBusCachedPlugin_iBusRsp_stages_1_halt; + wire IBusCachedPlugin_iBusRsp_stages_1_inputSample; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; + reg IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt; + wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_inputSample; + wire _zz_107_; + wire _zz_108_; + wire _zz_109_; + wire _zz_110_; + wire _zz_111_; + reg _zz_112_; + wire _zz_113_; + reg _zz_114_; + reg [31:0] _zz_115_; + reg IBusCachedPlugin_iBusRsp_readyForError; + wire IBusCachedPlugin_iBusRsp_decodeInput_valid; + wire IBusCachedPlugin_iBusRsp_decodeInput_ready; + wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; + wire IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_error; + wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; + wire IBusCachedPlugin_iBusRsp_decodeInput_payload_isRvc; + reg IBusCachedPlugin_injector_nextPcCalc_valids_0; + reg IBusCachedPlugin_injector_nextPcCalc_valids_1; + reg IBusCachedPlugin_injector_nextPcCalc_valids_2; + reg IBusCachedPlugin_injector_nextPcCalc_valids_3; + reg IBusCachedPlugin_injector_nextPcCalc_valids_4; + reg IBusCachedPlugin_injector_decodeRemoved; + wire _zz_116_; + reg [18:0] _zz_117_; + wire _zz_118_; + reg [10:0] _zz_119_; + wire _zz_120_; + reg [18:0] _zz_121_; + reg _zz_122_; + wire _zz_123_; + reg [10:0] _zz_124_; + wire _zz_125_; + reg [18:0] _zz_126_; + wire iBus_cmd_valid; + wire iBus_cmd_ready; + reg [31:0] iBus_cmd_payload_address; + wire [2:0] iBus_cmd_payload_size; + wire iBus_rsp_valid; + wire [31:0] iBus_rsp_payload_data; + wire iBus_rsp_payload_error; + wire [31:0] _zz_127_; + reg [31:0] IBusCachedPlugin_rspCounter; + wire IBusCachedPlugin_s0_tightlyCoupledHit; + reg IBusCachedPlugin_s1_tightlyCoupledHit; + reg IBusCachedPlugin_s2_tightlyCoupledHit; + wire IBusCachedPlugin_rsp_iBusRspOutputHalt; + reg IBusCachedPlugin_rsp_redoFetch; + wire dBus_cmd_valid; + wire dBus_cmd_ready; + wire dBus_cmd_payload_wr; + wire [31:0] dBus_cmd_payload_address; + wire [31:0] dBus_cmd_payload_data; + wire [1:0] dBus_cmd_payload_size; + wire dBus_rsp_ready; + wire dBus_rsp_error; + wire [31:0] dBus_rsp_data; + wire _zz_128_; + reg execute_DBusSimplePlugin_skipCmd; + reg [31:0] _zz_129_; + reg [3:0] _zz_130_; + wire [3:0] execute_DBusSimplePlugin_formalMask; + reg [31:0] writeBack_DBusSimplePlugin_rspShifted; + wire _zz_131_; + reg [31:0] _zz_132_; + wire _zz_133_; + reg [31:0] _zz_134_; + reg [31:0] writeBack_DBusSimplePlugin_rspFormated; + wire [29:0] _zz_135_; + wire _zz_136_; + wire _zz_137_; + wire _zz_138_; + wire _zz_139_; + wire _zz_140_; + wire _zz_141_; + wire `ShiftCtrlEnum_defaultEncoding_type _zz_142_; + wire `AluCtrlEnum_defaultEncoding_type _zz_143_; + wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_144_; + wire `BranchCtrlEnum_defaultEncoding_type _zz_145_; + wire `EnvCtrlEnum_defaultEncoding_type _zz_146_; + wire `Src2CtrlEnum_defaultEncoding_type _zz_147_; + wire `Src1CtrlEnum_defaultEncoding_type _zz_148_; + wire [4:0] decode_RegFilePlugin_regFileReadAddress1; + wire [4:0] decode_RegFilePlugin_regFileReadAddress2; + wire [31:0] decode_RegFilePlugin_rs1Data; + wire [31:0] decode_RegFilePlugin_rs2Data; + reg lastStageRegFileWrite_valid /* verilator public */ ; + wire [4:0] lastStageRegFileWrite_payload_address /* verilator public */ ; + wire [31:0] lastStageRegFileWrite_payload_data /* verilator public */ ; + reg _zz_149_; + reg [31:0] execute_IntAluPlugin_bitwise; + reg [31:0] _zz_150_; + reg [31:0] _zz_151_; + wire _zz_152_; + reg [19:0] _zz_153_; + wire _zz_154_; + reg [19:0] _zz_155_; + reg [31:0] _zz_156_; + reg [31:0] execute_SrcPlugin_addSub; + wire execute_SrcPlugin_less; + reg execute_LightShifterPlugin_isActive; + wire execute_LightShifterPlugin_isShift; + reg [4:0] execute_LightShifterPlugin_amplitudeReg; + wire [4:0] execute_LightShifterPlugin_amplitude; + wire [31:0] execute_LightShifterPlugin_shiftInput; + wire execute_LightShifterPlugin_done; + reg [31:0] _zz_157_; + reg _zz_158_; + reg _zz_159_; + wire _zz_160_; + reg _zz_161_; + reg [4:0] _zz_162_; + reg [31:0] _zz_163_; + wire _zz_164_; + wire _zz_165_; + wire _zz_166_; + wire _zz_167_; + wire _zz_168_; + wire _zz_169_; + wire execute_BranchPlugin_eq; + wire [2:0] _zz_170_; + reg _zz_171_; + reg _zz_172_; + wire _zz_173_; + reg [19:0] _zz_174_; + wire _zz_175_; + reg [10:0] _zz_176_; + wire _zz_177_; + reg [18:0] _zz_178_; + reg _zz_179_; + wire execute_BranchPlugin_missAlignedTarget; + reg [31:0] execute_BranchPlugin_branch_src1; + reg [31:0] execute_BranchPlugin_branch_src2; + wire _zz_180_; + reg [19:0] _zz_181_; + wire _zz_182_; + reg [10:0] _zz_183_; + wire _zz_184_; + reg [18:0] _zz_185_; + wire [31:0] execute_BranchPlugin_branchAdder; + wire [1:0] CsrPlugin_misa_base; + wire [25:0] CsrPlugin_misa_extensions; + reg [1:0] CsrPlugin_mtvec_mode; + reg [29:0] CsrPlugin_mtvec_base; + reg [31:0] CsrPlugin_mepc; + reg CsrPlugin_mstatus_MIE; + reg CsrPlugin_mstatus_MPIE; + reg [1:0] CsrPlugin_mstatus_MPP; + reg CsrPlugin_mip_MEIP; + reg CsrPlugin_mip_MTIP; + reg CsrPlugin_mip_MSIP; + reg CsrPlugin_mie_MEIE; + reg CsrPlugin_mie_MTIE; + reg CsrPlugin_mie_MSIE; + reg CsrPlugin_mcause_interrupt; + reg [3:0] CsrPlugin_mcause_exceptionCode; + reg [31:0] CsrPlugin_mtval; + reg [63:0] CsrPlugin_mcycle = 64'b0000000000000000000000000000000000000000000000000000000000000000; + reg [63:0] CsrPlugin_minstret = 64'b0000000000000000000000000000000000000000000000000000000000000000; + wire _zz_186_; + wire _zz_187_; + wire _zz_188_; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_decode; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_execute; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_memory; + reg CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; + reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; + reg [3:0] CsrPlugin_exceptionPortCtrl_exceptionContext_code; + reg [31:0] CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; + wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped; + wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; + wire [1:0] _zz_189_; + wire _zz_190_; + wire [1:0] _zz_191_; + wire _zz_192_; + reg CsrPlugin_interrupt_valid; + reg [3:0] CsrPlugin_interrupt_code /* verilator public */ ; + reg [1:0] CsrPlugin_interrupt_targetPrivilege; + wire CsrPlugin_exception; + wire CsrPlugin_lastStageWasWfi; + reg CsrPlugin_pipelineLiberator_done; + wire CsrPlugin_interruptJump /* verilator public */ ; + reg CsrPlugin_hadException; + reg [1:0] CsrPlugin_targetPrivilege; + reg [3:0] CsrPlugin_trapCause; + reg [1:0] CsrPlugin_xtvec_mode; + reg [29:0] CsrPlugin_xtvec_base; + wire execute_CsrPlugin_inWfi /* verilator public */ ; + reg execute_CsrPlugin_wfiWake; + wire execute_CsrPlugin_blockedBySideEffects; + reg execute_CsrPlugin_illegalAccess; + reg execute_CsrPlugin_illegalInstruction; + reg [31:0] execute_CsrPlugin_readData; + wire execute_CsrPlugin_writeInstruction; + wire execute_CsrPlugin_readInstruction; + wire execute_CsrPlugin_writeEnable; + wire execute_CsrPlugin_readEnable; + wire [31:0] execute_CsrPlugin_readToWriteData; + reg [31:0] execute_CsrPlugin_writeData; + wire [11:0] execute_CsrPlugin_csrAddress; + reg [32:0] memory_MulDivIterativePlugin_rs1; + reg [31:0] memory_MulDivIterativePlugin_rs2; + reg [64:0] memory_MulDivIterativePlugin_accumulator; + reg memory_MulDivIterativePlugin_mul_counter_willIncrement; + reg memory_MulDivIterativePlugin_mul_counter_willClear; + reg [5:0] memory_MulDivIterativePlugin_mul_counter_valueNext; + reg [5:0] memory_MulDivIterativePlugin_mul_counter_value; + wire memory_MulDivIterativePlugin_mul_willOverflowIfInc; + wire memory_MulDivIterativePlugin_mul_counter_willOverflow; + reg memory_MulDivIterativePlugin_div_needRevert; + reg memory_MulDivIterativePlugin_div_counter_willIncrement; + reg memory_MulDivIterativePlugin_div_counter_willClear; + reg [5:0] memory_MulDivIterativePlugin_div_counter_valueNext; + reg [5:0] memory_MulDivIterativePlugin_div_counter_value; + wire memory_MulDivIterativePlugin_div_counter_willOverflowIfInc; + wire memory_MulDivIterativePlugin_div_counter_willOverflow; + reg memory_MulDivIterativePlugin_div_done; + reg [31:0] memory_MulDivIterativePlugin_div_result; + wire [31:0] _zz_193_; + wire [32:0] _zz_194_; + wire [32:0] _zz_195_; + wire [31:0] _zz_196_; + wire _zz_197_; + wire _zz_198_; + reg [32:0] _zz_199_; + reg [31:0] externalInterruptArray_regNext; + reg [31:0] _zz_200_; + wire [31:0] _zz_201_; + reg [31:0] decode_to_execute_INSTRUCTION; + reg [31:0] execute_to_memory_INSTRUCTION; + reg [31:0] memory_to_writeBack_INSTRUCTION; + reg execute_to_memory_ALIGNEMENT_FAULT; + reg [31:0] memory_to_writeBack_MEMORY_READ_DATA; + reg `ShiftCtrlEnum_defaultEncoding_type decode_to_execute_SHIFT_CTRL; + reg decode_to_execute_IS_CSR; + reg [31:0] decode_to_execute_PC; + reg [31:0] execute_to_memory_PC; + reg [31:0] memory_to_writeBack_PC; + reg decode_to_execute_PREDICTION_HAD_BRANCHED2; + reg decode_to_execute_MEMORY_STORE; + reg execute_to_memory_MEMORY_STORE; + reg memory_to_writeBack_MEMORY_STORE; + reg [31:0] decode_to_execute_FORMAL_PC_NEXT; + reg [31:0] execute_to_memory_FORMAL_PC_NEXT; + reg [31:0] memory_to_writeBack_FORMAL_PC_NEXT; + reg `EnvCtrlEnum_defaultEncoding_type decode_to_execute_ENV_CTRL; + reg `EnvCtrlEnum_defaultEncoding_type execute_to_memory_ENV_CTRL; + reg `EnvCtrlEnum_defaultEncoding_type memory_to_writeBack_ENV_CTRL; + reg decode_to_execute_REGFILE_WRITE_VALID; + reg execute_to_memory_REGFILE_WRITE_VALID; + reg memory_to_writeBack_REGFILE_WRITE_VALID; + reg decode_to_execute_SRC_LESS_UNSIGNED; + reg execute_to_memory_BRANCH_DO; + reg [31:0] execute_to_memory_REGFILE_WRITE_DATA; + reg [31:0] memory_to_writeBack_REGFILE_WRITE_DATA; + reg decode_to_execute_CSR_WRITE_OPCODE; + reg [31:0] decode_to_execute_RS1; + reg decode_to_execute_SRC2_FORCE_ZERO; + reg decode_to_execute_BYPASSABLE_MEMORY_STAGE; + reg execute_to_memory_BYPASSABLE_MEMORY_STAGE; + reg `Src1CtrlEnum_defaultEncoding_type decode_to_execute_SRC1_CTRL; + reg `BranchCtrlEnum_defaultEncoding_type decode_to_execute_BRANCH_CTRL; + reg decode_to_execute_MEMORY_ENABLE; + reg execute_to_memory_MEMORY_ENABLE; + reg memory_to_writeBack_MEMORY_ENABLE; + reg decode_to_execute_SRC_USE_SUB_LESS; + reg execute_to_memory_MMU_FAULT; + reg [31:0] execute_to_memory_BRANCH_CALC; + reg [31:0] decode_to_execute_RS2; + reg decode_to_execute_IS_MUL; + reg execute_to_memory_IS_MUL; + reg [1:0] execute_to_memory_MEMORY_ADDRESS_LOW; + reg [1:0] memory_to_writeBack_MEMORY_ADDRESS_LOW; + reg decode_to_execute_IS_DIV; + reg execute_to_memory_IS_DIV; + reg decode_to_execute_CSR_READ_OPCODE; + reg decode_to_execute_IS_RS1_SIGNED; + reg decode_to_execute_BYPASSABLE_EXECUTE_STAGE; + reg [31:0] execute_to_memory_MMU_RSP_physicalAddress; + reg execute_to_memory_MMU_RSP_isIoAccess; + reg execute_to_memory_MMU_RSP_allowRead; + reg execute_to_memory_MMU_RSP_allowWrite; + reg execute_to_memory_MMU_RSP_allowExecute; + reg execute_to_memory_MMU_RSP_exception; + reg execute_to_memory_MMU_RSP_refilling; + reg decode_to_execute_IS_RS2_SIGNED; + reg `Src2CtrlEnum_defaultEncoding_type decode_to_execute_SRC2_CTRL; + reg `AluBitwiseCtrlEnum_defaultEncoding_type decode_to_execute_ALU_BITWISE_CTRL; + reg `AluCtrlEnum_defaultEncoding_type decode_to_execute_ALU_CTRL; + reg [2:0] _zz_202_; + reg _zz_203_; + reg [31:0] iBusWishbone_DAT_MISO_regNext; + wire dBus_cmd_halfPipe_valid; + wire dBus_cmd_halfPipe_ready; + wire dBus_cmd_halfPipe_payload_wr; + wire [31:0] dBus_cmd_halfPipe_payload_address; + wire [31:0] dBus_cmd_halfPipe_payload_data; + wire [1:0] dBus_cmd_halfPipe_payload_size; + reg dBus_cmd_halfPipe_regs_valid; + reg dBus_cmd_halfPipe_regs_ready; + reg dBus_cmd_halfPipe_regs_payload_wr; + reg [31:0] dBus_cmd_halfPipe_regs_payload_address; + reg [31:0] dBus_cmd_halfPipe_regs_payload_data; + reg [1:0] dBus_cmd_halfPipe_regs_payload_size; + reg [3:0] _zz_204_; + `ifndef SYNTHESIS + reg [63:0] decode_ALU_CTRL_string; + reg [63:0] _zz_1__string; + reg [63:0] _zz_2__string; + reg [63:0] _zz_3__string; + reg [39:0] decode_ALU_BITWISE_CTRL_string; + reg [39:0] _zz_4__string; + reg [39:0] _zz_5__string; + reg [39:0] _zz_6__string; + reg [23:0] decode_SRC2_CTRL_string; + reg [23:0] _zz_7__string; + reg [23:0] _zz_8__string; + reg [23:0] _zz_9__string; + reg [31:0] _zz_10__string; + reg [31:0] _zz_11__string; + reg [95:0] decode_SRC1_CTRL_string; + reg [95:0] _zz_12__string; + reg [95:0] _zz_13__string; + reg [95:0] _zz_14__string; + reg [31:0] _zz_15__string; + reg [31:0] _zz_16__string; + reg [31:0] _zz_17__string; + reg [31:0] _zz_18__string; + reg [31:0] decode_ENV_CTRL_string; + reg [31:0] _zz_19__string; + reg [31:0] _zz_20__string; + reg [31:0] _zz_21__string; + reg [71:0] decode_SHIFT_CTRL_string; + reg [71:0] _zz_22__string; + reg [71:0] _zz_23__string; + reg [71:0] _zz_24__string; + reg [31:0] memory_ENV_CTRL_string; + reg [31:0] _zz_25__string; + reg [31:0] execute_ENV_CTRL_string; + reg [31:0] _zz_26__string; + reg [31:0] writeBack_ENV_CTRL_string; + reg [31:0] _zz_29__string; + reg [31:0] execute_BRANCH_CTRL_string; + reg [31:0] _zz_32__string; + reg [71:0] execute_SHIFT_CTRL_string; + reg [71:0] _zz_37__string; + reg [23:0] execute_SRC2_CTRL_string; + reg [23:0] _zz_42__string; + reg [95:0] execute_SRC1_CTRL_string; + reg [95:0] _zz_44__string; + reg [63:0] execute_ALU_CTRL_string; + reg [63:0] _zz_47__string; + reg [39:0] execute_ALU_BITWISE_CTRL_string; + reg [39:0] _zz_49__string; + reg [95:0] _zz_56__string; + reg [23:0] _zz_59__string; + reg [31:0] _zz_67__string; + reg [31:0] _zz_68__string; + reg [39:0] _zz_70__string; + reg [63:0] _zz_72__string; + reg [71:0] _zz_73__string; + reg [31:0] decode_BRANCH_CTRL_string; + reg [31:0] _zz_95__string; + reg [71:0] _zz_142__string; + reg [63:0] _zz_143__string; + reg [39:0] _zz_144__string; + reg [31:0] _zz_145__string; + reg [31:0] _zz_146__string; + reg [23:0] _zz_147__string; + reg [95:0] _zz_148__string; + reg [71:0] decode_to_execute_SHIFT_CTRL_string; + reg [31:0] decode_to_execute_ENV_CTRL_string; + reg [31:0] execute_to_memory_ENV_CTRL_string; + reg [31:0] memory_to_writeBack_ENV_CTRL_string; + reg [95:0] decode_to_execute_SRC1_CTRL_string; + reg [31:0] decode_to_execute_BRANCH_CTRL_string; + reg [23:0] decode_to_execute_SRC2_CTRL_string; + reg [39:0] decode_to_execute_ALU_BITWISE_CTRL_string; + reg [63:0] decode_to_execute_ALU_CTRL_string; + `endif + + (* ram_style = "block" *) reg [31:0] RegFilePlugin_regFile [0:31] /* verilator public */ ; + assign _zz_217_ = (memory_arbitration_isValid && memory_IS_MUL); + assign _zz_218_ = (memory_arbitration_isValid && memory_IS_DIV); + assign _zz_219_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); + assign _zz_220_ = 1'b1; + assign _zz_221_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); + assign _zz_222_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); + assign _zz_223_ = ((execute_arbitration_isValid && execute_LightShifterPlugin_isShift) && (execute_SRC2[4 : 0] != (5'b00000))); + assign _zz_224_ = (execute_arbitration_isValid && execute_IS_CSR); + assign _zz_225_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_error) && (! _zz_91_)); + assign _zz_226_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_cacheMiss) && (! _zz_92_)); + assign _zz_227_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_mmuException) && (! _zz_93_)); + assign _zz_228_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling) && (! 1'b0)); + assign _zz_229_ = ({decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid} != (2'b00)); + assign _zz_230_ = (! execute_arbitration_isStuckByOthers); + assign _zz_231_ = (! memory_MulDivIterativePlugin_mul_willOverflowIfInc); + assign _zz_232_ = (! memory_MulDivIterativePlugin_div_done); + assign _zz_233_ = ({BranchPlugin_branchExceptionPort_valid,DBusSimplePlugin_memoryExceptionPort_valid} != (2'b00)); + assign _zz_234_ = (CsrPlugin_hadException || CsrPlugin_interruptJump); + assign _zz_235_ = (writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)); + assign _zz_236_ = writeBack_INSTRUCTION[29 : 28]; + assign _zz_237_ = (! IBusCachedPlugin_iBusRsp_readyForError); + assign _zz_238_ = ((dBus_rsp_ready && dBus_rsp_error) && (! memory_MEMORY_STORE)); + assign _zz_239_ = (! ((memory_arbitration_isValid && memory_MEMORY_ENABLE) && (1'b1 || (! memory_arbitration_isStuckByOthers)))); + assign _zz_240_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); + assign _zz_241_ = (1'b0 || (! 1'b1)); + assign _zz_242_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); + assign _zz_243_ = (1'b0 || (! memory_BYPASSABLE_MEMORY_STAGE)); + assign _zz_244_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); + assign _zz_245_ = (1'b0 || (! execute_BYPASSABLE_EXECUTE_STAGE)); + assign _zz_246_ = (! memory_arbitration_isStuck); + assign _zz_247_ = (iBus_cmd_valid || (_zz_202_ != (3'b000))); + assign _zz_248_ = (CsrPlugin_mstatus_MIE || (CsrPlugin_privilege < (2'b11))); + assign _zz_249_ = ((_zz_186_ && 1'b1) && (! 1'b0)); + assign _zz_250_ = ((_zz_187_ && 1'b1) && (! 1'b0)); + assign _zz_251_ = ((_zz_188_ && 1'b1) && (! 1'b0)); + assign _zz_252_ = (! dBus_cmd_halfPipe_regs_valid); + assign _zz_253_ = writeBack_INSTRUCTION[13 : 12]; + assign _zz_254_ = execute_INSTRUCTION[13]; + assign _zz_255_ = (_zz_101_ - (5'b00001)); + assign _zz_256_ = {IBusCachedPlugin_fetchPc_inc,(2'b00)}; + assign _zz_257_ = {29'd0, _zz_256_}; + assign _zz_258_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}; + assign _zz_259_ = {{_zz_117_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0}; + assign _zz_260_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}; + assign _zz_261_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}; + assign _zz_262_ = {{_zz_119_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}},1'b0}; + assign _zz_263_ = {{_zz_121_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0}; + assign _zz_264_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}; + assign _zz_265_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}; + assign _zz_266_ = (memory_MEMORY_STORE ? (3'b110) : (3'b100)); + assign _zz_267_ = _zz_135_[0 : 0]; + assign _zz_268_ = _zz_135_[1 : 1]; + assign _zz_269_ = _zz_135_[2 : 2]; + assign _zz_270_ = _zz_135_[3 : 3]; + assign _zz_271_ = _zz_135_[8 : 8]; + assign _zz_272_ = _zz_135_[11 : 11]; + assign _zz_273_ = _zz_135_[15 : 15]; + assign _zz_274_ = _zz_135_[16 : 16]; + assign _zz_275_ = _zz_135_[17 : 17]; + assign _zz_276_ = _zz_135_[18 : 18]; + assign _zz_277_ = _zz_135_[19 : 19]; + assign _zz_278_ = _zz_135_[20 : 20]; + assign _zz_279_ = _zz_135_[21 : 21]; + assign _zz_280_ = _zz_135_[24 : 24]; + assign _zz_281_ = _zz_135_[26 : 26]; + assign _zz_282_ = _zz_135_[29 : 29]; + assign _zz_283_ = execute_SRC_LESS; + assign _zz_284_ = (3'b100); + assign _zz_285_ = execute_INSTRUCTION[19 : 15]; + assign _zz_286_ = execute_INSTRUCTION[31 : 20]; + assign _zz_287_ = {execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}; + assign _zz_288_ = ($signed(_zz_289_) + $signed(_zz_292_)); + assign _zz_289_ = ($signed(_zz_290_) + $signed(_zz_291_)); + assign _zz_290_ = execute_SRC1; + assign _zz_291_ = (execute_SRC_USE_SUB_LESS ? (~ execute_SRC2) : execute_SRC2); + assign _zz_292_ = (execute_SRC_USE_SUB_LESS ? _zz_293_ : _zz_294_); + assign _zz_293_ = (32'b00000000000000000000000000000001); + assign _zz_294_ = (32'b00000000000000000000000000000000); + assign _zz_295_ = (_zz_296_ >>> 1); + assign _zz_296_ = {((execute_SHIFT_CTRL == `ShiftCtrlEnum_defaultEncoding_SRA_1) && execute_LightShifterPlugin_shiftInput[31]),execute_LightShifterPlugin_shiftInput}; + assign _zz_297_ = execute_INSTRUCTION[31 : 20]; + assign _zz_298_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}; + assign _zz_299_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}; + assign _zz_300_ = {_zz_174_,execute_INSTRUCTION[31 : 20]}; + assign _zz_301_ = {{_zz_176_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0}; + assign _zz_302_ = {{_zz_178_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0}; + assign _zz_303_ = execute_INSTRUCTION[31 : 20]; + assign _zz_304_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}; + assign _zz_305_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}; + assign _zz_306_ = (3'b100); + assign _zz_307_ = (_zz_189_ & (~ _zz_308_)); + assign _zz_308_ = (_zz_189_ - (2'b01)); + assign _zz_309_ = (_zz_191_ & (~ _zz_310_)); + assign _zz_310_ = (_zz_191_ - (2'b01)); + assign _zz_311_ = memory_MulDivIterativePlugin_mul_counter_willIncrement; + assign _zz_312_ = {5'd0, _zz_311_}; + assign _zz_313_ = (_zz_315_ + _zz_317_); + assign _zz_314_ = (memory_MulDivIterativePlugin_rs2[0] ? memory_MulDivIterativePlugin_rs1 : (33'b000000000000000000000000000000000)); + assign _zz_315_ = {{1{_zz_314_[32]}}, _zz_314_}; + assign _zz_316_ = _zz_318_; + assign _zz_317_ = {{1{_zz_316_[32]}}, _zz_316_}; + assign _zz_318_ = (memory_MulDivIterativePlugin_accumulator >>> 32); + assign _zz_319_ = memory_MulDivIterativePlugin_div_counter_willIncrement; + assign _zz_320_ = {5'd0, _zz_319_}; + assign _zz_321_ = {1'd0, memory_MulDivIterativePlugin_rs2}; + assign _zz_322_ = {_zz_193_,(! _zz_195_[32])}; + assign _zz_323_ = _zz_195_[31:0]; + assign _zz_324_ = _zz_194_[31:0]; + assign _zz_325_ = _zz_326_; + assign _zz_326_ = _zz_327_; + assign _zz_327_ = ({1'b0,(memory_MulDivIterativePlugin_div_needRevert ? (~ _zz_196_) : _zz_196_)} + _zz_329_); + assign _zz_328_ = memory_MulDivIterativePlugin_div_needRevert; + assign _zz_329_ = {32'd0, _zz_328_}; + assign _zz_330_ = _zz_198_; + assign _zz_331_ = {32'd0, _zz_330_}; + assign _zz_332_ = _zz_197_; + assign _zz_333_ = {31'd0, _zz_332_}; + assign _zz_334_ = execute_CsrPlugin_writeData[7 : 7]; + assign _zz_335_ = execute_CsrPlugin_writeData[3 : 3]; + assign _zz_336_ = execute_CsrPlugin_writeData[3 : 3]; + assign _zz_337_ = execute_CsrPlugin_writeData[11 : 11]; + assign _zz_338_ = execute_CsrPlugin_writeData[7 : 7]; + assign _zz_339_ = execute_CsrPlugin_writeData[3 : 3]; + assign _zz_340_ = (iBus_cmd_payload_address >>> 5); + assign _zz_341_ = ({3'd0,_zz_204_} <<< dBus_cmd_halfPipe_payload_address[1 : 0]); + assign _zz_342_ = 1'b1; + assign _zz_343_ = 1'b1; + assign _zz_344_ = {_zz_104_,{_zz_106_,_zz_105_}}; + assign _zz_345_ = decode_INSTRUCTION[31]; + assign _zz_346_ = decode_INSTRUCTION[31]; + assign _zz_347_ = decode_INSTRUCTION[7]; + assign _zz_348_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000010100)) == (32'b00000000000000000000000000000100)); + assign _zz_349_ = ((decode_INSTRUCTION & _zz_356_) == (32'b00000000000000000000000000000100)); + assign _zz_350_ = _zz_141_; + assign _zz_351_ = ((decode_INSTRUCTION & _zz_357_) == (32'b00000010000000000100000000100000)); + assign _zz_352_ = (1'b0); + assign _zz_353_ = ({_zz_358_,{_zz_359_,_zz_360_}} != (3'b000)); + assign _zz_354_ = ({_zz_361_,_zz_362_} != (2'b00)); + assign _zz_355_ = {(_zz_363_ != _zz_364_),{_zz_365_,{_zz_366_,_zz_367_}}}; + assign _zz_356_ = (32'b00000000000000000000000001000100); + assign _zz_357_ = (32'b00000010000000000100000001100100); + assign _zz_358_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001010000)) == (32'b00000000000000000000000001000000)); + assign _zz_359_ = ((decode_INSTRUCTION & _zz_368_) == (32'b00000000000000000000000001000000)); + assign _zz_360_ = ((decode_INSTRUCTION & _zz_369_) == (32'b00000000000000000000000000000000)); + assign _zz_361_ = _zz_140_; + assign _zz_362_ = _zz_139_; + assign _zz_363_ = {_zz_136_,(_zz_370_ == _zz_371_)}; + assign _zz_364_ = (2'b00); + assign _zz_365_ = ({_zz_136_,_zz_372_} != (2'b00)); + assign _zz_366_ = ({_zz_373_,_zz_374_} != (3'b000)); + assign _zz_367_ = {(_zz_375_ != _zz_376_),{_zz_377_,{_zz_378_,_zz_379_}}}; + assign _zz_368_ = (32'b00000000000000000011000001000000); + assign _zz_369_ = (32'b00000000000000000000000000111000); + assign _zz_370_ = (decode_INSTRUCTION & (32'b00000000000000000000000001110000)); + assign _zz_371_ = (32'b00000000000000000000000000100000); + assign _zz_372_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000100000)) == (32'b00000000000000000000000000000000)); + assign _zz_373_ = ((decode_INSTRUCTION & _zz_380_) == (32'b00000000000000000000000001000000)); + assign _zz_374_ = {(_zz_381_ == _zz_382_),(_zz_383_ == _zz_384_)}; + assign _zz_375_ = ((decode_INSTRUCTION & _zz_385_) == (32'b00000000000000000000000000100000)); + assign _zz_376_ = (1'b0); + assign _zz_377_ = ((_zz_386_ == _zz_387_) != (1'b0)); + assign _zz_378_ = ({_zz_388_,_zz_389_} != (2'b00)); + assign _zz_379_ = {(_zz_390_ != _zz_391_),{_zz_392_,{_zz_393_,_zz_394_}}}; + assign _zz_380_ = (32'b00000000000000000000000001000100); + assign _zz_381_ = (decode_INSTRUCTION & (32'b00000000000000000010000000010100)); + assign _zz_382_ = (32'b00000000000000000010000000010000); + assign _zz_383_ = (decode_INSTRUCTION & (32'b01000000000000000100000000110100)); + assign _zz_384_ = (32'b01000000000000000000000000110000); + assign _zz_385_ = (32'b00000000000000000000000000100000); + assign _zz_386_ = (decode_INSTRUCTION & (32'b00000000000000000001000001001000)); + assign _zz_387_ = (32'b00000000000000000001000000001000); + assign _zz_388_ = ((decode_INSTRUCTION & _zz_395_) == (32'b00000000000000000000000000100000)); + assign _zz_389_ = ((decode_INSTRUCTION & _zz_396_) == (32'b00000000000000000000000000100000)); + assign _zz_390_ = {_zz_138_,{_zz_397_,{_zz_398_,_zz_399_}}}; + assign _zz_391_ = (6'b000000); + assign _zz_392_ = ({_zz_400_,_zz_401_} != (2'b00)); + assign _zz_393_ = ({_zz_402_,_zz_403_} != (4'b0000)); + assign _zz_394_ = {(_zz_404_ != _zz_405_),{_zz_406_,{_zz_407_,_zz_408_}}}; + assign _zz_395_ = (32'b00000000000000000000000000110100); + assign _zz_396_ = (32'b00000000000000000000000001100100); + assign _zz_397_ = ((decode_INSTRUCTION & _zz_409_) == (32'b00000000000000000001000000010000)); + assign _zz_398_ = (_zz_410_ == _zz_411_); + assign _zz_399_ = {_zz_412_,{_zz_413_,_zz_414_}}; + assign _zz_400_ = ((decode_INSTRUCTION & _zz_415_) == (32'b00000000000000000010000000000000)); + assign _zz_401_ = ((decode_INSTRUCTION & _zz_416_) == (32'b00000000000000000001000000000000)); + assign _zz_402_ = (_zz_417_ == _zz_418_); + assign _zz_403_ = {_zz_419_,{_zz_420_,_zz_421_}}; + assign _zz_404_ = (_zz_422_ == _zz_423_); + assign _zz_405_ = (1'b0); + assign _zz_406_ = ({_zz_424_,_zz_425_} != (2'b00)); + assign _zz_407_ = (_zz_426_ != _zz_427_); + assign _zz_408_ = {_zz_428_,{_zz_429_,_zz_430_}}; + assign _zz_409_ = (32'b00000000000000000001000000010000); + assign _zz_410_ = (decode_INSTRUCTION & (32'b00000000000000000010000000010000)); + assign _zz_411_ = (32'b00000000000000000010000000010000); + assign _zz_412_ = ((decode_INSTRUCTION & _zz_431_) == (32'b00000000000000000000000000010000)); + assign _zz_413_ = (_zz_432_ == _zz_433_); + assign _zz_414_ = (_zz_434_ == _zz_435_); + assign _zz_415_ = (32'b00000000000000000010000000010000); + assign _zz_416_ = (32'b00000000000000000101000000000000); + assign _zz_417_ = (decode_INSTRUCTION & (32'b00000000000000000000000001000100)); + assign _zz_418_ = (32'b00000000000000000000000000000000); + assign _zz_419_ = ((decode_INSTRUCTION & _zz_436_) == (32'b00000000000000000000000000000000)); + assign _zz_420_ = (_zz_437_ == _zz_438_); + assign _zz_421_ = (_zz_439_ == _zz_440_); + assign _zz_422_ = (decode_INSTRUCTION & (32'b00000000000000000011000001010000)); + assign _zz_423_ = (32'b00000000000000000000000001010000); + assign _zz_424_ = _zz_138_; + assign _zz_425_ = (_zz_441_ == _zz_442_); + assign _zz_426_ = (_zz_443_ == _zz_444_); + assign _zz_427_ = (1'b0); + assign _zz_428_ = (_zz_445_ != (1'b0)); + assign _zz_429_ = (_zz_446_ != _zz_447_); + assign _zz_430_ = {_zz_448_,{_zz_449_,_zz_450_}}; + assign _zz_431_ = (32'b00000000000000000000000001010000); + assign _zz_432_ = (decode_INSTRUCTION & (32'b00000000000000000000000000001100)); + assign _zz_433_ = (32'b00000000000000000000000000000100); + assign _zz_434_ = (decode_INSTRUCTION & (32'b00000000000000000000000000101000)); + assign _zz_435_ = (32'b00000000000000000000000000000000); + assign _zz_436_ = (32'b00000000000000000000000000011000); + assign _zz_437_ = (decode_INSTRUCTION & (32'b00000000000000000110000000000100)); + assign _zz_438_ = (32'b00000000000000000010000000000000); + assign _zz_439_ = (decode_INSTRUCTION & (32'b00000000000000000101000000000100)); + assign _zz_440_ = (32'b00000000000000000001000000000000); + assign _zz_441_ = (decode_INSTRUCTION & (32'b00000000000000000000000000011100)); + assign _zz_442_ = (32'b00000000000000000000000000000100); + assign _zz_443_ = (decode_INSTRUCTION & (32'b00000000000000000000000001011000)); + assign _zz_444_ = (32'b00000000000000000000000001000000); + assign _zz_445_ = ((decode_INSTRUCTION & (32'b00000010000000000100000001110100)) == (32'b00000010000000000000000000110000)); + assign _zz_446_ = ((decode_INSTRUCTION & (32'b00000000000000000001000000000000)) == (32'b00000000000000000001000000000000)); + assign _zz_447_ = (1'b0); + assign _zz_448_ = (_zz_137_ != (1'b0)); + assign _zz_449_ = ({_zz_451_,{_zz_452_,_zz_453_}} != (3'b000)); + assign _zz_450_ = {({_zz_454_,_zz_455_} != (2'b00)),{(_zz_456_ != _zz_457_),{_zz_458_,{_zz_459_,_zz_460_}}}}; + assign _zz_451_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001100100)) == (32'b00000000000000000000000000100100)); + assign _zz_452_ = ((decode_INSTRUCTION & _zz_461_) == (32'b00000000000000000001000000010000)); + assign _zz_453_ = ((decode_INSTRUCTION & _zz_462_) == (32'b00000000000000000001000000010000)); + assign _zz_454_ = ((decode_INSTRUCTION & _zz_463_) == (32'b00000000000000000110000000010000)); + assign _zz_455_ = ((decode_INSTRUCTION & _zz_464_) == (32'b00000000000000000100000000010000)); + assign _zz_456_ = ((decode_INSTRUCTION & _zz_465_) == (32'b00000000000000000010000000010000)); + assign _zz_457_ = (1'b0); + assign _zz_458_ = ({_zz_466_,_zz_467_} != (2'b00)); + assign _zz_459_ = ({_zz_468_,_zz_469_} != (3'b000)); + assign _zz_460_ = {(_zz_470_ != _zz_471_),{_zz_472_,{_zz_473_,_zz_474_}}}; + assign _zz_461_ = (32'b00000000000000000011000000110100); + assign _zz_462_ = (32'b00000010000000000011000001010100); + assign _zz_463_ = (32'b00000000000000000110000000010100); + assign _zz_464_ = (32'b00000000000000000101000000010100); + assign _zz_465_ = (32'b00000000000000000110000000010100); + assign _zz_466_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000110100)) == (32'b00000000000000000101000000010000)); + assign _zz_467_ = ((decode_INSTRUCTION & (32'b00000010000000000111000001100100)) == (32'b00000000000000000101000000100000)); + assign _zz_468_ = ((decode_INSTRUCTION & _zz_475_) == (32'b01000000000000000001000000010000)); + assign _zz_469_ = {(_zz_476_ == _zz_477_),(_zz_478_ == _zz_479_)}; + assign _zz_470_ = {_zz_136_,{_zz_480_,_zz_481_}}; + assign _zz_471_ = (3'b000); + assign _zz_472_ = ((_zz_482_ == _zz_483_) != (1'b0)); + assign _zz_473_ = ({_zz_484_,_zz_485_} != (2'b00)); + assign _zz_474_ = (_zz_486_ != (1'b0)); + assign _zz_475_ = (32'b01000000000000000011000001010100); + assign _zz_476_ = (decode_INSTRUCTION & (32'b00000000000000000111000000110100)); + assign _zz_477_ = (32'b00000000000000000001000000010000); + assign _zz_478_ = (decode_INSTRUCTION & (32'b00000010000000000111000001010100)); + assign _zz_479_ = (32'b00000000000000000001000000010000); + assign _zz_480_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000110000)) == (32'b00000000000000000000000000010000)); + assign _zz_481_ = ((decode_INSTRUCTION & (32'b00000010000000000000000001100000)) == (32'b00000000000000000000000000100000)); + assign _zz_482_ = (decode_INSTRUCTION & (32'b00000000000000000000000001011000)); + assign _zz_483_ = (32'b00000000000000000000000000000000); + assign _zz_484_ = ((decode_INSTRUCTION & (32'b00000000000000000001000001010000)) == (32'b00000000000000000001000001010000)); + assign _zz_485_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001010000)) == (32'b00000000000000000010000001010000)); + assign _zz_486_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000010000)) == (32'b00000000000000000000000000010000)); + assign _zz_487_ = (32'b00000000000000000001000001111111); + assign _zz_488_ = (decode_INSTRUCTION & (32'b00000000000000000010000001111111)); + assign _zz_489_ = (32'b00000000000000000010000001110011); + assign _zz_490_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001111111)) == (32'b00000000000000000100000001100011)); + assign _zz_491_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000010000000010011)); + assign _zz_492_ = {((decode_INSTRUCTION & (32'b00000000000000000110000000111111)) == (32'b00000000000000000000000000100011)),{((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_493_) == (32'b00000000000000000000000000000011)),{(_zz_494_ == _zz_495_),{_zz_496_,{_zz_497_,_zz_498_}}}}}}; + assign _zz_493_ = (32'b00000000000000000101000001011111); + assign _zz_494_ = (decode_INSTRUCTION & (32'b00000000000000000111000001111011)); + assign _zz_495_ = (32'b00000000000000000000000001100011); + assign _zz_496_ = ((decode_INSTRUCTION & (32'b00000000000000000110000001111111)) == (32'b00000000000000000000000000001111)); + assign _zz_497_ = ((decode_INSTRUCTION & (32'b11111100000000000000000001111111)) == (32'b00000000000000000000000000110011)); + assign _zz_498_ = {((decode_INSTRUCTION & (32'b11111100000000000011000001011111)) == (32'b00000000000000000001000000010011)),{((decode_INSTRUCTION & (32'b10111100000000000111000001111111)) == (32'b00000000000000000101000000010011)),{((decode_INSTRUCTION & _zz_499_) == (32'b00000000000000000101000000110011)),{(_zz_500_ == _zz_501_),(_zz_502_ == _zz_503_)}}}}; + assign _zz_499_ = (32'b10111110000000000111000001111111); + assign _zz_500_ = (decode_INSTRUCTION & (32'b10111110000000000111000001111111)); + assign _zz_501_ = (32'b00000000000000000000000000110011); + assign _zz_502_ = (decode_INSTRUCTION & (32'b11011111111111111111111111111111)); + assign _zz_503_ = (32'b00010000001000000000000001110011); + assign _zz_504_ = execute_INSTRUCTION[31]; + assign _zz_505_ = execute_INSTRUCTION[31]; + assign _zz_506_ = execute_INSTRUCTION[7]; + always @ (posedge clk) begin + if(_zz_52_) begin + RegFilePlugin_regFile[lastStageRegFileWrite_payload_address] <= lastStageRegFileWrite_payload_data; + end + end + + always @ (posedge clk) begin + if(_zz_342_) begin + _zz_214_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress1]; + end + end + + always @ (posedge clk) begin + if(_zz_343_) begin + _zz_215_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress2]; + end + end + + InstructionCache IBusCachedPlugin_cache ( + .io_flush(_zz_205_), + .io_cpu_prefetch_isValid(_zz_206_), + .io_cpu_prefetch_haltIt(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt), + .io_cpu_prefetch_pc(IBusCachedPlugin_iBusRsp_stages_0_input_payload), + .io_cpu_fetch_isValid(_zz_207_), + .io_cpu_fetch_isStuck(_zz_208_), + .io_cpu_fetch_isRemoved(IBusCachedPlugin_fetcherflushIt), + .io_cpu_fetch_pc(IBusCachedPlugin_iBusRsp_stages_1_input_payload), + .io_cpu_fetch_data(IBusCachedPlugin_cache_io_cpu_fetch_data), + .io_cpu_fetch_dataBypassValid(IBusCachedPlugin_s1_tightlyCoupledHit), + .io_cpu_fetch_dataBypass(_zz_209_), + .io_cpu_fetch_mmuBus_cmd_isValid(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid), + .io_cpu_fetch_mmuBus_cmd_virtualAddress(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress), + .io_cpu_fetch_mmuBus_cmd_bypassTranslation(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation), + .io_cpu_fetch_mmuBus_rsp_physicalAddress(IBusCachedPlugin_mmuBus_rsp_physicalAddress), + .io_cpu_fetch_mmuBus_rsp_isIoAccess(IBusCachedPlugin_mmuBus_rsp_isIoAccess), + .io_cpu_fetch_mmuBus_rsp_allowRead(IBusCachedPlugin_mmuBus_rsp_allowRead), + .io_cpu_fetch_mmuBus_rsp_allowWrite(IBusCachedPlugin_mmuBus_rsp_allowWrite), + .io_cpu_fetch_mmuBus_rsp_allowExecute(IBusCachedPlugin_mmuBus_rsp_allowExecute), + .io_cpu_fetch_mmuBus_rsp_exception(IBusCachedPlugin_mmuBus_rsp_exception), + .io_cpu_fetch_mmuBus_rsp_refilling(IBusCachedPlugin_mmuBus_rsp_refilling), + .io_cpu_fetch_mmuBus_end(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end), + .io_cpu_fetch_mmuBus_busy(IBusCachedPlugin_mmuBus_busy), + .io_cpu_fetch_physicalAddress(IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress), + .io_cpu_fetch_haltIt(IBusCachedPlugin_cache_io_cpu_fetch_haltIt), + .io_cpu_decode_isValid(_zz_210_), + .io_cpu_decode_isStuck(_zz_211_), + .io_cpu_decode_pc(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload), + .io_cpu_decode_physicalAddress(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), + .io_cpu_decode_data(IBusCachedPlugin_cache_io_cpu_decode_data), + .io_cpu_decode_cacheMiss(IBusCachedPlugin_cache_io_cpu_decode_cacheMiss), + .io_cpu_decode_error(IBusCachedPlugin_cache_io_cpu_decode_error), + .io_cpu_decode_mmuRefilling(IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling), + .io_cpu_decode_mmuException(IBusCachedPlugin_cache_io_cpu_decode_mmuException), + .io_cpu_decode_isUser(_zz_212_), + .io_cpu_fill_valid(_zz_213_), + .io_cpu_fill_payload(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), + .io_mem_cmd_valid(IBusCachedPlugin_cache_io_mem_cmd_valid), + .io_mem_cmd_ready(iBus_cmd_ready), + .io_mem_cmd_payload_address(IBusCachedPlugin_cache_io_mem_cmd_payload_address), + .io_mem_cmd_payload_size(IBusCachedPlugin_cache_io_mem_cmd_payload_size), + .io_mem_rsp_valid(iBus_rsp_valid), + .io_mem_rsp_payload_data(iBus_rsp_payload_data), + .io_mem_rsp_payload_error(iBus_rsp_payload_error), + .clk(clk), + .reset(reset) + ); + always @(*) begin + case(_zz_344_) + 3'b000 : begin + _zz_216_ = CsrPlugin_jumpInterface_payload; + end + 3'b001 : begin + _zz_216_ = DBusSimplePlugin_redoBranch_payload; + end + 3'b010 : begin + _zz_216_ = BranchPlugin_jumpInterface_payload; + end + 3'b011 : begin + _zz_216_ = IBusCachedPlugin_redoBranch_payload; + end + default : begin + _zz_216_ = IBusCachedPlugin_predictionJumpInterface_payload; + end + endcase + end + + `ifndef SYNTHESIS + always @(*) begin + case(decode_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_ALU_CTRL_string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_ALU_CTRL_string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : decode_ALU_CTRL_string = "BITWISE "; + default : decode_ALU_CTRL_string = "????????"; + endcase + end + always @(*) begin + case(_zz_1_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_1__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_1__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_1__string = "BITWISE "; + default : _zz_1__string = "????????"; + endcase + end + always @(*) begin + case(_zz_2_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_2__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_2__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_2__string = "BITWISE "; + default : _zz_2__string = "????????"; + endcase + end + always @(*) begin + case(_zz_3_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_3__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_3__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_3__string = "BITWISE "; + default : _zz_3__string = "????????"; + endcase + end + always @(*) begin + case(decode_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_ALU_BITWISE_CTRL_string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_ALU_BITWISE_CTRL_string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_ALU_BITWISE_CTRL_string = "AND_1"; + default : decode_ALU_BITWISE_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_4_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_4__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_4__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_4__string = "AND_1"; + default : _zz_4__string = "?????"; + endcase + end + always @(*) begin + case(_zz_5_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_5__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_5__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_5__string = "AND_1"; + default : _zz_5__string = "?????"; + endcase + end + always @(*) begin + case(_zz_6_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_6__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_6__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_6__string = "AND_1"; + default : _zz_6__string = "?????"; + endcase + end + always @(*) begin + case(decode_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : decode_SRC2_CTRL_string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : decode_SRC2_CTRL_string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : decode_SRC2_CTRL_string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : decode_SRC2_CTRL_string = "PC "; + default : decode_SRC2_CTRL_string = "???"; + endcase + end + always @(*) begin + case(_zz_7_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_7__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_7__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_7__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_7__string = "PC "; + default : _zz_7__string = "???"; + endcase + end + always @(*) begin + case(_zz_8_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_8__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_8__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_8__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_8__string = "PC "; + default : _zz_8__string = "???"; + endcase + end + always @(*) begin + case(_zz_9_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_9__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_9__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_9__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_9__string = "PC "; + default : _zz_9__string = "???"; + endcase + end + always @(*) begin + case(_zz_10_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_10__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_10__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_10__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_10__string = "JALR"; + default : _zz_10__string = "????"; + endcase + end + always @(*) begin + case(_zz_11_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_11__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_11__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_11__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_11__string = "JALR"; + default : _zz_11__string = "????"; + endcase + end + always @(*) begin + case(decode_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : decode_SRC1_CTRL_string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : decode_SRC1_CTRL_string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_SRC1_CTRL_string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : decode_SRC1_CTRL_string = "URS1 "; + default : decode_SRC1_CTRL_string = "????????????"; + endcase + end + always @(*) begin + case(_zz_12_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_12__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_12__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_12__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_12__string = "URS1 "; + default : _zz_12__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_13_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_13__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_13__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_13__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_13__string = "URS1 "; + default : _zz_13__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_14_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_14__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_14__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_14__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_14__string = "URS1 "; + default : _zz_14__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_15_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_15__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_15__string = "XRET"; + default : _zz_15__string = "????"; + endcase + end + always @(*) begin + case(_zz_16_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_16__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_16__string = "XRET"; + default : _zz_16__string = "????"; + endcase + end + always @(*) begin + case(_zz_17_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_17__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_17__string = "XRET"; + default : _zz_17__string = "????"; + endcase + end + always @(*) begin + case(_zz_18_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_18__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_18__string = "XRET"; + default : _zz_18__string = "????"; + endcase + end + always @(*) begin + case(decode_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : decode_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : decode_ENV_CTRL_string = "XRET"; + default : decode_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_19_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_19__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_19__string = "XRET"; + default : _zz_19__string = "????"; + endcase + end + always @(*) begin + case(_zz_20_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_20__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_20__string = "XRET"; + default : _zz_20__string = "????"; + endcase + end + always @(*) begin + case(_zz_21_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_21__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_21__string = "XRET"; + default : _zz_21__string = "????"; + endcase + end + always @(*) begin + case(decode_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_SHIFT_CTRL_string = "SRA_1 "; + default : decode_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(_zz_22_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_22__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_22__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_22__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_22__string = "SRA_1 "; + default : _zz_22__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_23_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_23__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_23__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_23__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_23__string = "SRA_1 "; + default : _zz_23__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_24_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_24__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_24__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_24__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_24__string = "SRA_1 "; + default : _zz_24__string = "?????????"; + endcase + end + always @(*) begin + case(memory_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : memory_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : memory_ENV_CTRL_string = "XRET"; + default : memory_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_25_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_25__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_25__string = "XRET"; + default : _zz_25__string = "????"; + endcase + end + always @(*) begin + case(execute_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : execute_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : execute_ENV_CTRL_string = "XRET"; + default : execute_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_26_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_26__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_26__string = "XRET"; + default : _zz_26__string = "????"; + endcase + end + always @(*) begin + case(writeBack_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : writeBack_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : writeBack_ENV_CTRL_string = "XRET"; + default : writeBack_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_29_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_29__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_29__string = "XRET"; + default : _zz_29__string = "????"; + endcase + end + always @(*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : execute_BRANCH_CTRL_string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : execute_BRANCH_CTRL_string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : execute_BRANCH_CTRL_string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : execute_BRANCH_CTRL_string = "JALR"; + default : execute_BRANCH_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_32_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_32__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_32__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_32__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_32__string = "JALR"; + default : _zz_32__string = "????"; + endcase + end + always @(*) begin + case(execute_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : execute_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : execute_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : execute_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : execute_SHIFT_CTRL_string = "SRA_1 "; + default : execute_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(_zz_37_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_37__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_37__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_37__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_37__string = "SRA_1 "; + default : _zz_37__string = "?????????"; + endcase + end + always @(*) begin + case(execute_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : execute_SRC2_CTRL_string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : execute_SRC2_CTRL_string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : execute_SRC2_CTRL_string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : execute_SRC2_CTRL_string = "PC "; + default : execute_SRC2_CTRL_string = "???"; + endcase + end + always @(*) begin + case(_zz_42_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_42__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_42__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_42__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_42__string = "PC "; + default : _zz_42__string = "???"; + endcase + end + always @(*) begin + case(execute_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : execute_SRC1_CTRL_string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : execute_SRC1_CTRL_string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : execute_SRC1_CTRL_string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : execute_SRC1_CTRL_string = "URS1 "; + default : execute_SRC1_CTRL_string = "????????????"; + endcase + end + always @(*) begin + case(_zz_44_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_44__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_44__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_44__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_44__string = "URS1 "; + default : _zz_44__string = "????????????"; + endcase + end + always @(*) begin + case(execute_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_ADD_SUB : execute_ALU_CTRL_string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : execute_ALU_CTRL_string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : execute_ALU_CTRL_string = "BITWISE "; + default : execute_ALU_CTRL_string = "????????"; + endcase + end + always @(*) begin + case(_zz_47_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_47__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_47__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_47__string = "BITWISE "; + default : _zz_47__string = "????????"; + endcase + end + always @(*) begin + case(execute_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : execute_ALU_BITWISE_CTRL_string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : execute_ALU_BITWISE_CTRL_string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : execute_ALU_BITWISE_CTRL_string = "AND_1"; + default : execute_ALU_BITWISE_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(_zz_49_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_49__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_49__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_49__string = "AND_1"; + default : _zz_49__string = "?????"; + endcase + end + always @(*) begin + case(_zz_56_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_56__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_56__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_56__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_56__string = "URS1 "; + default : _zz_56__string = "????????????"; + endcase + end + always @(*) begin + case(_zz_59_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_59__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_59__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_59__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_59__string = "PC "; + default : _zz_59__string = "???"; + endcase + end + always @(*) begin + case(_zz_67_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_67__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_67__string = "XRET"; + default : _zz_67__string = "????"; + endcase + end + always @(*) begin + case(_zz_68_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_68__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_68__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_68__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_68__string = "JALR"; + default : _zz_68__string = "????"; + endcase + end + always @(*) begin + case(_zz_70_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_70__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_70__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_70__string = "AND_1"; + default : _zz_70__string = "?????"; + endcase + end + always @(*) begin + case(_zz_72_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_72__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_72__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_72__string = "BITWISE "; + default : _zz_72__string = "????????"; + endcase + end + always @(*) begin + case(_zz_73_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_73__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_73__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_73__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_73__string = "SRA_1 "; + default : _zz_73__string = "?????????"; + endcase + end + always @(*) begin + case(decode_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : decode_BRANCH_CTRL_string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : decode_BRANCH_CTRL_string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : decode_BRANCH_CTRL_string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : decode_BRANCH_CTRL_string = "JALR"; + default : decode_BRANCH_CTRL_string = "????"; + endcase + end + always @(*) begin + case(_zz_95_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_95__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_95__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_95__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_95__string = "JALR"; + default : _zz_95__string = "????"; + endcase + end + always @(*) begin + case(_zz_142_) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_142__string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_142__string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_142__string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_142__string = "SRA_1 "; + default : _zz_142__string = "?????????"; + endcase + end + always @(*) begin + case(_zz_143_) + `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_143__string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_143__string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : _zz_143__string = "BITWISE "; + default : _zz_143__string = "????????"; + endcase + end + always @(*) begin + case(_zz_144_) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_144__string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_144__string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_144__string = "AND_1"; + default : _zz_144__string = "?????"; + endcase + end + always @(*) begin + case(_zz_145_) + `BranchCtrlEnum_defaultEncoding_INC : _zz_145__string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : _zz_145__string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : _zz_145__string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : _zz_145__string = "JALR"; + default : _zz_145__string = "????"; + endcase + end + always @(*) begin + case(_zz_146_) + `EnvCtrlEnum_defaultEncoding_NONE : _zz_146__string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : _zz_146__string = "XRET"; + default : _zz_146__string = "????"; + endcase + end + always @(*) begin + case(_zz_147_) + `Src2CtrlEnum_defaultEncoding_RS : _zz_147__string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : _zz_147__string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : _zz_147__string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : _zz_147__string = "PC "; + default : _zz_147__string = "???"; + endcase + end + always @(*) begin + case(_zz_148_) + `Src1CtrlEnum_defaultEncoding_RS : _zz_148__string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : _zz_148__string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_148__string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : _zz_148__string = "URS1 "; + default : _zz_148__string = "????????????"; + endcase + end + always @(*) begin + case(decode_to_execute_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_to_execute_SHIFT_CTRL_string = "DISABLE_1"; + `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_to_execute_SHIFT_CTRL_string = "SLL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_to_execute_SHIFT_CTRL_string = "SRL_1 "; + `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_to_execute_SHIFT_CTRL_string = "SRA_1 "; + default : decode_to_execute_SHIFT_CTRL_string = "?????????"; + endcase + end + always @(*) begin + case(decode_to_execute_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : decode_to_execute_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : decode_to_execute_ENV_CTRL_string = "XRET"; + default : decode_to_execute_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(execute_to_memory_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : execute_to_memory_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : execute_to_memory_ENV_CTRL_string = "XRET"; + default : execute_to_memory_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(memory_to_writeBack_ENV_CTRL) + `EnvCtrlEnum_defaultEncoding_NONE : memory_to_writeBack_ENV_CTRL_string = "NONE"; + `EnvCtrlEnum_defaultEncoding_XRET : memory_to_writeBack_ENV_CTRL_string = "XRET"; + default : memory_to_writeBack_ENV_CTRL_string = "????"; + endcase + end + always @(*) begin + case(decode_to_execute_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC1_CTRL_string = "RS "; + `Src1CtrlEnum_defaultEncoding_IMU : decode_to_execute_SRC1_CTRL_string = "IMU "; + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_to_execute_SRC1_CTRL_string = "PC_INCREMENT"; + `Src1CtrlEnum_defaultEncoding_URS1 : decode_to_execute_SRC1_CTRL_string = "URS1 "; + default : decode_to_execute_SRC1_CTRL_string = "????????????"; + endcase + end + always @(*) begin + case(decode_to_execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : decode_to_execute_BRANCH_CTRL_string = "INC "; + `BranchCtrlEnum_defaultEncoding_B : decode_to_execute_BRANCH_CTRL_string = "B "; + `BranchCtrlEnum_defaultEncoding_JAL : decode_to_execute_BRANCH_CTRL_string = "JAL "; + `BranchCtrlEnum_defaultEncoding_JALR : decode_to_execute_BRANCH_CTRL_string = "JALR"; + default : decode_to_execute_BRANCH_CTRL_string = "????"; + endcase + end + always @(*) begin + case(decode_to_execute_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC2_CTRL_string = "RS "; + `Src2CtrlEnum_defaultEncoding_IMI : decode_to_execute_SRC2_CTRL_string = "IMI"; + `Src2CtrlEnum_defaultEncoding_IMS : decode_to_execute_SRC2_CTRL_string = "IMS"; + `Src2CtrlEnum_defaultEncoding_PC : decode_to_execute_SRC2_CTRL_string = "PC "; + default : decode_to_execute_SRC2_CTRL_string = "???"; + endcase + end + always @(*) begin + case(decode_to_execute_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "XOR_1"; + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "OR_1 "; + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "AND_1"; + default : decode_to_execute_ALU_BITWISE_CTRL_string = "?????"; + endcase + end + always @(*) begin + case(decode_to_execute_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_to_execute_ALU_CTRL_string = "ADD_SUB "; + `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_to_execute_ALU_CTRL_string = "SLT_SLTU"; + `AluCtrlEnum_defaultEncoding_BITWISE : decode_to_execute_ALU_CTRL_string = "BITWISE "; + default : decode_to_execute_ALU_CTRL_string = "????????"; + endcase + end + `endif + + assign decode_ALU_CTRL = _zz_1_; + assign _zz_2_ = _zz_3_; + assign decode_ALU_BITWISE_CTRL = _zz_4_; + assign _zz_5_ = _zz_6_; + assign decode_SRC2_CTRL = _zz_7_; + assign _zz_8_ = _zz_9_; + assign decode_IS_RS2_SIGNED = _zz_58_; + assign decode_BYPASSABLE_EXECUTE_STAGE = _zz_74_; + assign decode_IS_RS1_SIGNED = _zz_55_; + assign decode_CSR_READ_OPCODE = _zz_27_; + assign decode_IS_DIV = _zz_57_; + assign memory_MEMORY_ADDRESS_LOW = execute_to_memory_MEMORY_ADDRESS_LOW; + assign execute_MEMORY_ADDRESS_LOW = _zz_89_; + assign decode_IS_MUL = _zz_69_; + assign execute_BRANCH_CALC = _zz_30_; + assign _zz_10_ = _zz_11_; + assign decode_SRC1_CTRL = _zz_12_; + assign _zz_13_ = _zz_14_; + assign execute_BYPASSABLE_MEMORY_STAGE = decode_to_execute_BYPASSABLE_MEMORY_STAGE; + assign decode_BYPASSABLE_MEMORY_STAGE = _zz_77_; + assign decode_SRC2_FORCE_ZERO = _zz_46_; + assign decode_CSR_WRITE_OPCODE = _zz_28_; + assign writeBack_REGFILE_WRITE_DATA = memory_to_writeBack_REGFILE_WRITE_DATA; + assign execute_REGFILE_WRITE_DATA = _zz_48_; + assign execute_BRANCH_DO = _zz_31_; + assign decode_SRC_LESS_UNSIGNED = _zz_65_; + assign _zz_15_ = _zz_16_; + assign _zz_17_ = _zz_18_; + assign decode_ENV_CTRL = _zz_19_; + assign _zz_20_ = _zz_21_; + assign writeBack_FORMAL_PC_NEXT = memory_to_writeBack_FORMAL_PC_NEXT; + assign memory_FORMAL_PC_NEXT = execute_to_memory_FORMAL_PC_NEXT; + assign execute_FORMAL_PC_NEXT = decode_to_execute_FORMAL_PC_NEXT; + assign decode_FORMAL_PC_NEXT = _zz_98_; + assign decode_MEMORY_STORE = _zz_61_; + assign decode_PREDICTION_HAD_BRANCHED2 = _zz_34_; + assign decode_IS_CSR = _zz_76_; + assign decode_SHIFT_CTRL = _zz_22_; + assign _zz_23_ = _zz_24_; + assign memory_MEMORY_READ_DATA = _zz_80_; + assign execute_IS_RS1_SIGNED = decode_to_execute_IS_RS1_SIGNED; + assign execute_IS_DIV = decode_to_execute_IS_DIV; + assign execute_IS_MUL = decode_to_execute_IS_MUL; + assign execute_IS_RS2_SIGNED = decode_to_execute_IS_RS2_SIGNED; + assign memory_IS_DIV = execute_to_memory_IS_DIV; + assign memory_IS_MUL = execute_to_memory_IS_MUL; + assign execute_CSR_READ_OPCODE = decode_to_execute_CSR_READ_OPCODE; + assign execute_CSR_WRITE_OPCODE = decode_to_execute_CSR_WRITE_OPCODE; + assign execute_IS_CSR = decode_to_execute_IS_CSR; + assign memory_ENV_CTRL = _zz_25_; + assign execute_ENV_CTRL = _zz_26_; + assign writeBack_ENV_CTRL = _zz_29_; + assign memory_BRANCH_CALC = execute_to_memory_BRANCH_CALC; + assign memory_BRANCH_DO = execute_to_memory_BRANCH_DO; + assign execute_PC = decode_to_execute_PC; + assign execute_PREDICTION_HAD_BRANCHED2 = decode_to_execute_PREDICTION_HAD_BRANCHED2; + assign execute_RS1 = decode_to_execute_RS1; + assign execute_BRANCH_COND_RESULT = _zz_33_; + assign execute_BRANCH_CTRL = _zz_32_; + assign decode_RS2_USE = _zz_63_; + assign decode_RS1_USE = _zz_66_; + assign execute_REGFILE_WRITE_VALID = decode_to_execute_REGFILE_WRITE_VALID; + assign execute_BYPASSABLE_EXECUTE_STAGE = decode_to_execute_BYPASSABLE_EXECUTE_STAGE; + always @ (*) begin + _zz_35_ = memory_REGFILE_WRITE_DATA; + if(_zz_217_)begin + _zz_35_ = ((memory_INSTRUCTION[13 : 12] == (2'b00)) ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_accumulator[63 : 32]); + end + if(_zz_218_)begin + _zz_35_ = memory_MulDivIterativePlugin_div_result; + end + end + + assign memory_REGFILE_WRITE_VALID = execute_to_memory_REGFILE_WRITE_VALID; + assign memory_INSTRUCTION = execute_to_memory_INSTRUCTION; + assign memory_BYPASSABLE_MEMORY_STAGE = execute_to_memory_BYPASSABLE_MEMORY_STAGE; + assign writeBack_REGFILE_WRITE_VALID = memory_to_writeBack_REGFILE_WRITE_VALID; + always @ (*) begin + decode_RS2 = _zz_53_; + if(_zz_161_)begin + if((_zz_162_ == decode_INSTRUCTION[24 : 20]))begin + decode_RS2 = _zz_163_; + end + end + if(_zz_219_)begin + if(_zz_220_)begin + if(_zz_165_)begin + decode_RS2 = _zz_79_; + end + end + end + if(_zz_221_)begin + if(memory_BYPASSABLE_MEMORY_STAGE)begin + if(_zz_167_)begin + decode_RS2 = _zz_35_; + end + end + end + if(_zz_222_)begin + if(execute_BYPASSABLE_EXECUTE_STAGE)begin + if(_zz_169_)begin + decode_RS2 = _zz_36_; + end + end + end + end + + always @ (*) begin + decode_RS1 = _zz_54_; + if(_zz_161_)begin + if((_zz_162_ == decode_INSTRUCTION[19 : 15]))begin + decode_RS1 = _zz_163_; + end + end + if(_zz_219_)begin + if(_zz_220_)begin + if(_zz_164_)begin + decode_RS1 = _zz_79_; + end + end + end + if(_zz_221_)begin + if(memory_BYPASSABLE_MEMORY_STAGE)begin + if(_zz_166_)begin + decode_RS1 = _zz_35_; + end + end + end + if(_zz_222_)begin + if(execute_BYPASSABLE_EXECUTE_STAGE)begin + if(_zz_168_)begin + decode_RS1 = _zz_36_; + end + end + end + end + + always @ (*) begin + _zz_36_ = execute_REGFILE_WRITE_DATA; + if(_zz_223_)begin + _zz_36_ = _zz_157_; + end + if(_zz_224_)begin + _zz_36_ = execute_CsrPlugin_readData; + end + end + + assign execute_SHIFT_CTRL = _zz_37_; + assign execute_SRC_LESS_UNSIGNED = decode_to_execute_SRC_LESS_UNSIGNED; + assign execute_SRC2_FORCE_ZERO = decode_to_execute_SRC2_FORCE_ZERO; + assign execute_SRC_USE_SUB_LESS = decode_to_execute_SRC_USE_SUB_LESS; + assign _zz_41_ = execute_PC; + assign execute_SRC2_CTRL = _zz_42_; + assign execute_SRC1_CTRL = _zz_44_; + assign decode_SRC_USE_SUB_LESS = _zz_60_; + assign decode_SRC_ADD_ZERO = _zz_71_; + assign execute_SRC_ADD_SUB = _zz_40_; + assign execute_SRC_LESS = _zz_38_; + assign execute_ALU_CTRL = _zz_47_; + assign execute_SRC2 = _zz_43_; + assign execute_SRC1 = _zz_45_; + assign execute_ALU_BITWISE_CTRL = _zz_49_; + assign _zz_50_ = writeBack_INSTRUCTION; + assign _zz_51_ = writeBack_REGFILE_WRITE_VALID; + always @ (*) begin + _zz_52_ = 1'b0; + if(lastStageRegFileWrite_valid)begin + _zz_52_ = 1'b1; + end + end + + assign decode_INSTRUCTION_ANTICIPATED = _zz_94_; + always @ (*) begin + decode_REGFILE_WRITE_VALID = _zz_64_; + if((decode_INSTRUCTION[11 : 7] == (5'b00000)))begin + decode_REGFILE_WRITE_VALID = 1'b0; + end + end + + assign decode_LEGAL_INSTRUCTION = _zz_78_; + assign decode_INSTRUCTION_READY = 1'b1; + assign writeBack_MEMORY_STORE = memory_to_writeBack_MEMORY_STORE; + always @ (*) begin + _zz_79_ = writeBack_REGFILE_WRITE_DATA; + if((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE))begin + _zz_79_ = writeBack_DBusSimplePlugin_rspFormated; + end + end + + assign writeBack_MEMORY_ENABLE = memory_to_writeBack_MEMORY_ENABLE; + assign writeBack_MEMORY_ADDRESS_LOW = memory_to_writeBack_MEMORY_ADDRESS_LOW; + assign writeBack_MEMORY_READ_DATA = memory_to_writeBack_MEMORY_READ_DATA; + assign memory_MMU_FAULT = execute_to_memory_MMU_FAULT; + assign memory_MMU_RSP_physicalAddress = execute_to_memory_MMU_RSP_physicalAddress; + assign memory_MMU_RSP_isIoAccess = execute_to_memory_MMU_RSP_isIoAccess; + assign memory_MMU_RSP_allowRead = execute_to_memory_MMU_RSP_allowRead; + assign memory_MMU_RSP_allowWrite = execute_to_memory_MMU_RSP_allowWrite; + assign memory_MMU_RSP_allowExecute = execute_to_memory_MMU_RSP_allowExecute; + assign memory_MMU_RSP_exception = execute_to_memory_MMU_RSP_exception; + assign memory_MMU_RSP_refilling = execute_to_memory_MMU_RSP_refilling; + assign memory_PC = execute_to_memory_PC; + assign memory_ALIGNEMENT_FAULT = execute_to_memory_ALIGNEMENT_FAULT; + assign memory_REGFILE_WRITE_DATA = execute_to_memory_REGFILE_WRITE_DATA; + assign memory_MEMORY_STORE = execute_to_memory_MEMORY_STORE; + assign memory_MEMORY_ENABLE = execute_to_memory_MEMORY_ENABLE; + assign execute_MMU_FAULT = _zz_88_; + assign execute_MMU_RSP_physicalAddress = _zz_81_; + assign execute_MMU_RSP_isIoAccess = _zz_82_; + assign execute_MMU_RSP_allowRead = _zz_83_; + assign execute_MMU_RSP_allowWrite = _zz_84_; + assign execute_MMU_RSP_allowExecute = _zz_85_; + assign execute_MMU_RSP_exception = _zz_86_; + assign execute_MMU_RSP_refilling = _zz_87_; + assign execute_SRC_ADD = _zz_39_; + assign execute_RS2 = decode_to_execute_RS2; + assign execute_INSTRUCTION = decode_to_execute_INSTRUCTION; + assign execute_MEMORY_STORE = decode_to_execute_MEMORY_STORE; + assign execute_MEMORY_ENABLE = decode_to_execute_MEMORY_ENABLE; + assign execute_ALIGNEMENT_FAULT = _zz_90_; + assign decode_MEMORY_ENABLE = _zz_75_; + assign decode_FLUSH_ALL = _zz_62_; + always @ (*) begin + IBusCachedPlugin_rsp_issueDetected = _zz_91_; + if(_zz_225_)begin + IBusCachedPlugin_rsp_issueDetected = 1'b1; + end + end + + always @ (*) begin + _zz_91_ = _zz_92_; + if(_zz_226_)begin + _zz_91_ = 1'b1; + end + end + + always @ (*) begin + _zz_92_ = _zz_93_; + if(_zz_227_)begin + _zz_92_ = 1'b1; + end + end + + always @ (*) begin + _zz_93_ = 1'b0; + if(_zz_228_)begin + _zz_93_ = 1'b1; + end + end + + assign decode_BRANCH_CTRL = _zz_95_; + assign decode_INSTRUCTION = _zz_99_; + always @ (*) begin + _zz_96_ = memory_FORMAL_PC_NEXT; + if(DBusSimplePlugin_redoBranch_valid)begin + _zz_96_ = DBusSimplePlugin_redoBranch_payload; + end + if(BranchPlugin_jumpInterface_valid)begin + _zz_96_ = BranchPlugin_jumpInterface_payload; + end + end + + always @ (*) begin + _zz_97_ = decode_FORMAL_PC_NEXT; + if(IBusCachedPlugin_predictionJumpInterface_valid)begin + _zz_97_ = IBusCachedPlugin_predictionJumpInterface_payload; + end + if(IBusCachedPlugin_redoBranch_valid)begin + _zz_97_ = IBusCachedPlugin_redoBranch_payload; + end + end + + assign decode_PC = _zz_100_; + assign writeBack_PC = memory_to_writeBack_PC; + assign writeBack_INSTRUCTION = memory_to_writeBack_INSTRUCTION; + always @ (*) begin + decode_arbitration_haltItself = 1'b0; + if(((DBusSimplePlugin_mmuBus_busy && decode_arbitration_isValid) && decode_MEMORY_ENABLE))begin + decode_arbitration_haltItself = 1'b1; + end + end + + always @ (*) begin + decode_arbitration_haltByOther = 1'b0; + if((decode_arbitration_isValid && (_zz_158_ || _zz_159_)))begin + decode_arbitration_haltByOther = 1'b1; + end + if((CsrPlugin_interrupt_valid && CsrPlugin_allowInterrupts))begin + decode_arbitration_haltByOther = decode_arbitration_isValid; + end + if(({(writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),{(memory_arbitration_isValid && (memory_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),(execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET))}} != (3'b000)))begin + decode_arbitration_haltByOther = 1'b1; + end + end + + always @ (*) begin + decode_arbitration_removeIt = 1'b0; + if(_zz_229_)begin + decode_arbitration_removeIt = 1'b1; + end + if(decode_arbitration_isFlushed)begin + decode_arbitration_removeIt = 1'b1; + end + end + + assign decode_arbitration_flushIt = 1'b0; + always @ (*) begin + decode_arbitration_flushNext = 1'b0; + if(IBusCachedPlugin_redoBranch_valid)begin + decode_arbitration_flushNext = 1'b1; + end + if(_zz_229_)begin + decode_arbitration_flushNext = 1'b1; + end + end + + always @ (*) begin + execute_arbitration_haltItself = 1'b0; + if(((((execute_arbitration_isValid && execute_MEMORY_ENABLE) && (! dBus_cmd_ready)) && (! execute_DBusSimplePlugin_skipCmd)) && (! _zz_128_)))begin + execute_arbitration_haltItself = 1'b1; + end + if(_zz_223_)begin + if(_zz_230_)begin + if(! execute_LightShifterPlugin_done) begin + execute_arbitration_haltItself = 1'b1; + end + end + end + if(_zz_224_)begin + if(execute_CsrPlugin_blockedBySideEffects)begin + execute_arbitration_haltItself = 1'b1; + end + end + end + + assign execute_arbitration_haltByOther = 1'b0; + always @ (*) begin + execute_arbitration_removeIt = 1'b0; + if(execute_arbitration_isFlushed)begin + execute_arbitration_removeIt = 1'b1; + end + end + + assign execute_arbitration_flushIt = 1'b0; + assign execute_arbitration_flushNext = 1'b0; + always @ (*) begin + memory_arbitration_haltItself = 1'b0; + if((((memory_arbitration_isValid && memory_MEMORY_ENABLE) && (! memory_MEMORY_STORE)) && ((! dBus_rsp_ready) || 1'b0)))begin + memory_arbitration_haltItself = 1'b1; + end + if(_zz_217_)begin + if(_zz_231_)begin + memory_arbitration_haltItself = 1'b1; + end + end + if(_zz_218_)begin + if(_zz_232_)begin + memory_arbitration_haltItself = 1'b1; + end + end + end + + assign memory_arbitration_haltByOther = 1'b0; + always @ (*) begin + memory_arbitration_removeIt = 1'b0; + if(_zz_233_)begin + memory_arbitration_removeIt = 1'b1; + end + if(memory_arbitration_isFlushed)begin + memory_arbitration_removeIt = 1'b1; + end + end + + always @ (*) begin + memory_arbitration_flushIt = 1'b0; + if(DBusSimplePlugin_redoBranch_valid)begin + memory_arbitration_flushIt = 1'b1; + end + end + + always @ (*) begin + memory_arbitration_flushNext = 1'b0; + if(DBusSimplePlugin_redoBranch_valid)begin + memory_arbitration_flushNext = 1'b1; + end + if(BranchPlugin_jumpInterface_valid)begin + memory_arbitration_flushNext = 1'b1; + end + if(_zz_233_)begin + memory_arbitration_flushNext = 1'b1; + end + end + + assign writeBack_arbitration_haltItself = 1'b0; + assign writeBack_arbitration_haltByOther = 1'b0; + always @ (*) begin + writeBack_arbitration_removeIt = 1'b0; + if(writeBack_arbitration_isFlushed)begin + writeBack_arbitration_removeIt = 1'b1; + end + end + + assign writeBack_arbitration_flushIt = 1'b0; + always @ (*) begin + writeBack_arbitration_flushNext = 1'b0; + if(_zz_234_)begin + writeBack_arbitration_flushNext = 1'b1; + end + if(_zz_235_)begin + writeBack_arbitration_flushNext = 1'b1; + end + end + + assign lastStageInstruction = writeBack_INSTRUCTION; + assign lastStagePc = writeBack_PC; + assign lastStageIsValid = writeBack_arbitration_isValid; + assign lastStageIsFiring = writeBack_arbitration_isFiring; + always @ (*) begin + IBusCachedPlugin_fetcherHalt = 1'b0; + if(({CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValids_memory,{CsrPlugin_exceptionPortCtrl_exceptionValids_execute,CsrPlugin_exceptionPortCtrl_exceptionValids_decode}}} != (4'b0000)))begin + IBusCachedPlugin_fetcherHalt = 1'b1; + end + if(_zz_234_)begin + IBusCachedPlugin_fetcherHalt = 1'b1; + end + if(_zz_235_)begin + IBusCachedPlugin_fetcherHalt = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_fetcherflushIt = 1'b0; + if(({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,{execute_arbitration_flushNext,decode_arbitration_flushNext}}} != (4'b0000)))begin + IBusCachedPlugin_fetcherflushIt = 1'b1; + end + if((IBusCachedPlugin_predictionJumpInterface_valid && decode_arbitration_isFiring))begin + IBusCachedPlugin_fetcherflushIt = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_incomingInstruction = 1'b0; + if((IBusCachedPlugin_iBusRsp_stages_1_input_valid || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid))begin + IBusCachedPlugin_incomingInstruction = 1'b1; + end + end + + always @ (*) begin + CsrPlugin_jumpInterface_valid = 1'b0; + if(_zz_234_)begin + CsrPlugin_jumpInterface_valid = 1'b1; + end + if(_zz_235_)begin + CsrPlugin_jumpInterface_valid = 1'b1; + end + end + + always @ (*) begin + CsrPlugin_jumpInterface_payload = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + if(_zz_234_)begin + CsrPlugin_jumpInterface_payload = {CsrPlugin_xtvec_base,(2'b00)}; + end + if(_zz_235_)begin + case(_zz_236_) + 2'b11 : begin + CsrPlugin_jumpInterface_payload = CsrPlugin_mepc; + end + default : begin + end + endcase + end + end + + assign CsrPlugin_forceMachineWire = 1'b0; + assign CsrPlugin_allowInterrupts = 1'b1; + assign CsrPlugin_allowException = 1'b1; + assign IBusCachedPlugin_jump_pcLoad_valid = ({CsrPlugin_jumpInterface_valid,{BranchPlugin_jumpInterface_valid,{DBusSimplePlugin_redoBranch_valid,{IBusCachedPlugin_redoBranch_valid,IBusCachedPlugin_predictionJumpInterface_valid}}}} != (5'b00000)); + assign _zz_101_ = {IBusCachedPlugin_predictionJumpInterface_valid,{IBusCachedPlugin_redoBranch_valid,{BranchPlugin_jumpInterface_valid,{DBusSimplePlugin_redoBranch_valid,CsrPlugin_jumpInterface_valid}}}}; + assign _zz_102_ = (_zz_101_ & (~ _zz_255_)); + assign _zz_103_ = _zz_102_[3]; + assign _zz_104_ = _zz_102_[4]; + assign _zz_105_ = (_zz_102_[1] || _zz_103_); + assign _zz_106_ = (_zz_102_[2] || _zz_103_); + assign IBusCachedPlugin_jump_pcLoad_payload = _zz_216_; + always @ (*) begin + IBusCachedPlugin_fetchPc_corrected = 1'b0; + if(IBusCachedPlugin_jump_pcLoad_valid)begin + IBusCachedPlugin_fetchPc_corrected = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b0; + if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin + IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b1; + end + end + + always @ (*) begin + IBusCachedPlugin_fetchPc_pc = (IBusCachedPlugin_fetchPc_pcReg + _zz_257_); + if(IBusCachedPlugin_jump_pcLoad_valid)begin + IBusCachedPlugin_fetchPc_pc = IBusCachedPlugin_jump_pcLoad_payload; + end + IBusCachedPlugin_fetchPc_pc[0] = 1'b0; + IBusCachedPlugin_fetchPc_pc[1] = 1'b0; + end + + assign IBusCachedPlugin_fetchPc_output_valid = ((! IBusCachedPlugin_fetcherHalt) && IBusCachedPlugin_fetchPc_booted); + assign IBusCachedPlugin_fetchPc_output_payload = IBusCachedPlugin_fetchPc_pc; + assign IBusCachedPlugin_iBusRsp_stages_0_input_valid = IBusCachedPlugin_fetchPc_output_valid; + assign IBusCachedPlugin_fetchPc_output_ready = IBusCachedPlugin_iBusRsp_stages_0_input_ready; + assign IBusCachedPlugin_iBusRsp_stages_0_input_payload = IBusCachedPlugin_fetchPc_output_payload; + assign IBusCachedPlugin_iBusRsp_stages_0_inputSample = 1'b1; + always @ (*) begin + IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b0; + if(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt)begin + IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b1; + end + end + + assign _zz_107_ = (! IBusCachedPlugin_iBusRsp_stages_0_halt); + assign IBusCachedPlugin_iBusRsp_stages_0_input_ready = (IBusCachedPlugin_iBusRsp_stages_0_output_ready && _zz_107_); + assign IBusCachedPlugin_iBusRsp_stages_0_output_valid = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && _zz_107_); + assign IBusCachedPlugin_iBusRsp_stages_0_output_payload = IBusCachedPlugin_iBusRsp_stages_0_input_payload; + always @ (*) begin + IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b0; + if(IBusCachedPlugin_cache_io_cpu_fetch_haltIt)begin + IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b1; + end + end + + assign _zz_108_ = (! IBusCachedPlugin_iBusRsp_stages_1_halt); + assign IBusCachedPlugin_iBusRsp_stages_1_input_ready = (IBusCachedPlugin_iBusRsp_stages_1_output_ready && _zz_108_); + assign IBusCachedPlugin_iBusRsp_stages_1_output_valid = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && _zz_108_); + assign IBusCachedPlugin_iBusRsp_stages_1_output_payload = IBusCachedPlugin_iBusRsp_stages_1_input_payload; + always @ (*) begin + IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b0; + if((IBusCachedPlugin_rsp_issueDetected || IBusCachedPlugin_rsp_iBusRspOutputHalt))begin + IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b1; + end + end + + assign _zz_109_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt); + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready && _zz_109_); + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && _zz_109_); + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; + assign IBusCachedPlugin_iBusRsp_stages_0_output_ready = _zz_110_; + assign _zz_110_ = ((1'b0 && (! _zz_111_)) || IBusCachedPlugin_iBusRsp_stages_1_input_ready); + assign _zz_111_ = _zz_112_; + assign IBusCachedPlugin_iBusRsp_stages_1_input_valid = _zz_111_; + assign IBusCachedPlugin_iBusRsp_stages_1_input_payload = IBusCachedPlugin_fetchPc_pcReg; + assign IBusCachedPlugin_iBusRsp_stages_1_output_ready = ((1'b0 && (! _zz_113_)) || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); + assign _zz_113_ = _zz_114_; + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid = _zz_113_; + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload = _zz_115_; + always @ (*) begin + IBusCachedPlugin_iBusRsp_readyForError = 1'b1; + if((! IBusCachedPlugin_pcValids_0))begin + IBusCachedPlugin_iBusRsp_readyForError = 1'b0; + end + end + + assign IBusCachedPlugin_pcValids_0 = IBusCachedPlugin_injector_nextPcCalc_valids_1; + assign IBusCachedPlugin_pcValids_1 = IBusCachedPlugin_injector_nextPcCalc_valids_2; + assign IBusCachedPlugin_pcValids_2 = IBusCachedPlugin_injector_nextPcCalc_valids_3; + assign IBusCachedPlugin_pcValids_3 = IBusCachedPlugin_injector_nextPcCalc_valids_4; + assign IBusCachedPlugin_iBusRsp_decodeInput_ready = (! decode_arbitration_isStuck); + assign decode_arbitration_isValid = (IBusCachedPlugin_iBusRsp_decodeInput_valid && (! IBusCachedPlugin_injector_decodeRemoved)); + assign _zz_100_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; + assign _zz_99_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; + assign _zz_98_ = (decode_PC + (32'b00000000000000000000000000000100)); + assign _zz_116_ = _zz_258_[11]; + always @ (*) begin + _zz_117_[18] = _zz_116_; + _zz_117_[17] = _zz_116_; + _zz_117_[16] = _zz_116_; + _zz_117_[15] = _zz_116_; + _zz_117_[14] = _zz_116_; + _zz_117_[13] = _zz_116_; + _zz_117_[12] = _zz_116_; + _zz_117_[11] = _zz_116_; + _zz_117_[10] = _zz_116_; + _zz_117_[9] = _zz_116_; + _zz_117_[8] = _zz_116_; + _zz_117_[7] = _zz_116_; + _zz_117_[6] = _zz_116_; + _zz_117_[5] = _zz_116_; + _zz_117_[4] = _zz_116_; + _zz_117_[3] = _zz_116_; + _zz_117_[2] = _zz_116_; + _zz_117_[1] = _zz_116_; + _zz_117_[0] = _zz_116_; + end + + always @ (*) begin + IBusCachedPlugin_decodePrediction_cmd_hadBranch = ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) || ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_B) && _zz_259_[31])); + if(_zz_122_)begin + IBusCachedPlugin_decodePrediction_cmd_hadBranch = 1'b0; + end + end + + assign _zz_118_ = _zz_260_[19]; + always @ (*) begin + _zz_119_[10] = _zz_118_; + _zz_119_[9] = _zz_118_; + _zz_119_[8] = _zz_118_; + _zz_119_[7] = _zz_118_; + _zz_119_[6] = _zz_118_; + _zz_119_[5] = _zz_118_; + _zz_119_[4] = _zz_118_; + _zz_119_[3] = _zz_118_; + _zz_119_[2] = _zz_118_; + _zz_119_[1] = _zz_118_; + _zz_119_[0] = _zz_118_; + end + + assign _zz_120_ = _zz_261_[11]; + always @ (*) begin + _zz_121_[18] = _zz_120_; + _zz_121_[17] = _zz_120_; + _zz_121_[16] = _zz_120_; + _zz_121_[15] = _zz_120_; + _zz_121_[14] = _zz_120_; + _zz_121_[13] = _zz_120_; + _zz_121_[12] = _zz_120_; + _zz_121_[11] = _zz_120_; + _zz_121_[10] = _zz_120_; + _zz_121_[9] = _zz_120_; + _zz_121_[8] = _zz_120_; + _zz_121_[7] = _zz_120_; + _zz_121_[6] = _zz_120_; + _zz_121_[5] = _zz_120_; + _zz_121_[4] = _zz_120_; + _zz_121_[3] = _zz_120_; + _zz_121_[2] = _zz_120_; + _zz_121_[1] = _zz_120_; + _zz_121_[0] = _zz_120_; + end + + always @ (*) begin + case(decode_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_JAL : begin + _zz_122_ = _zz_262_[1]; + end + default : begin + _zz_122_ = _zz_263_[1]; + end + endcase + end + + assign IBusCachedPlugin_predictionJumpInterface_valid = (decode_arbitration_isValid && IBusCachedPlugin_decodePrediction_cmd_hadBranch); + assign _zz_123_ = _zz_264_[19]; + always @ (*) begin + _zz_124_[10] = _zz_123_; + _zz_124_[9] = _zz_123_; + _zz_124_[8] = _zz_123_; + _zz_124_[7] = _zz_123_; + _zz_124_[6] = _zz_123_; + _zz_124_[5] = _zz_123_; + _zz_124_[4] = _zz_123_; + _zz_124_[3] = _zz_123_; + _zz_124_[2] = _zz_123_; + _zz_124_[1] = _zz_123_; + _zz_124_[0] = _zz_123_; + end + + assign _zz_125_ = _zz_265_[11]; + always @ (*) begin + _zz_126_[18] = _zz_125_; + _zz_126_[17] = _zz_125_; + _zz_126_[16] = _zz_125_; + _zz_126_[15] = _zz_125_; + _zz_126_[14] = _zz_125_; + _zz_126_[13] = _zz_125_; + _zz_126_[12] = _zz_125_; + _zz_126_[11] = _zz_125_; + _zz_126_[10] = _zz_125_; + _zz_126_[9] = _zz_125_; + _zz_126_[8] = _zz_125_; + _zz_126_[7] = _zz_125_; + _zz_126_[6] = _zz_125_; + _zz_126_[5] = _zz_125_; + _zz_126_[4] = _zz_125_; + _zz_126_[3] = _zz_125_; + _zz_126_[2] = _zz_125_; + _zz_126_[1] = _zz_125_; + _zz_126_[0] = _zz_125_; + end + + assign IBusCachedPlugin_predictionJumpInterface_payload = (decode_PC + ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) ? {{_zz_124_,{{{_zz_345_,decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}},1'b0} : {{_zz_126_,{{{_zz_346_,_zz_347_},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0})); + assign iBus_cmd_valid = IBusCachedPlugin_cache_io_mem_cmd_valid; + always @ (*) begin + iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; + iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; + end + + assign iBus_cmd_payload_size = IBusCachedPlugin_cache_io_mem_cmd_payload_size; + assign IBusCachedPlugin_s0_tightlyCoupledHit = 1'b0; + assign _zz_206_ = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && (! IBusCachedPlugin_s0_tightlyCoupledHit)); + assign _zz_209_ = (32'b00000000000000000000000000000000); + assign _zz_207_ = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && (! IBusCachedPlugin_s1_tightlyCoupledHit)); + assign _zz_208_ = (! IBusCachedPlugin_iBusRsp_stages_1_input_ready); + assign _zz_210_ = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && (! IBusCachedPlugin_s2_tightlyCoupledHit)); + assign _zz_211_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); + assign _zz_212_ = (CsrPlugin_privilege == (2'b00)); + assign _zz_94_ = (decode_arbitration_isStuck ? decode_INSTRUCTION : IBusCachedPlugin_cache_io_cpu_fetch_data); + assign IBusCachedPlugin_rsp_iBusRspOutputHalt = 1'b0; + always @ (*) begin + IBusCachedPlugin_rsp_redoFetch = 1'b0; + if(_zz_228_)begin + IBusCachedPlugin_rsp_redoFetch = 1'b1; + end + if(_zz_226_)begin + IBusCachedPlugin_rsp_redoFetch = 1'b1; + end + if(_zz_237_)begin + IBusCachedPlugin_rsp_redoFetch = 1'b0; + end + end + + always @ (*) begin + _zz_213_ = (IBusCachedPlugin_rsp_redoFetch && (! IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling)); + if(_zz_226_)begin + _zz_213_ = 1'b1; + end + if(_zz_237_)begin + _zz_213_ = 1'b0; + end + end + + always @ (*) begin + IBusCachedPlugin_decodeExceptionPort_valid = 1'b0; + if(_zz_227_)begin + IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; + end + if(_zz_225_)begin + IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; + end + end + + always @ (*) begin + IBusCachedPlugin_decodeExceptionPort_payload_code = (4'bxxxx); + if(_zz_227_)begin + IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b1100); + end + if(_zz_225_)begin + IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b0001); + end + end + + assign IBusCachedPlugin_decodeExceptionPort_payload_badAddr = {IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload[31 : 2],(2'b00)}; + assign IBusCachedPlugin_redoBranch_valid = IBusCachedPlugin_rsp_redoFetch; + assign IBusCachedPlugin_redoBranch_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; + assign IBusCachedPlugin_iBusRsp_decodeInput_valid = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; + assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready = IBusCachedPlugin_iBusRsp_decodeInput_ready; + assign IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst = IBusCachedPlugin_cache_io_cpu_decode_data; + assign IBusCachedPlugin_iBusRsp_decodeInput_payload_pc = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; + assign IBusCachedPlugin_mmuBus_cmd_isValid = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; + assign IBusCachedPlugin_mmuBus_cmd_virtualAddress = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; + assign IBusCachedPlugin_mmuBus_cmd_bypassTranslation = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; + assign IBusCachedPlugin_mmuBus_end = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; + assign _zz_205_ = (decode_arbitration_isValid && decode_FLUSH_ALL); + assign _zz_128_ = 1'b0; + assign _zz_90_ = (((dBus_cmd_payload_size == (2'b10)) && (dBus_cmd_payload_address[1 : 0] != (2'b00))) || ((dBus_cmd_payload_size == (2'b01)) && (dBus_cmd_payload_address[0 : 0] != (1'b0)))); + always @ (*) begin + execute_DBusSimplePlugin_skipCmd = 1'b0; + if(execute_ALIGNEMENT_FAULT)begin + execute_DBusSimplePlugin_skipCmd = 1'b1; + end + if((execute_MMU_FAULT || execute_MMU_RSP_refilling))begin + execute_DBusSimplePlugin_skipCmd = 1'b1; + end + end + + assign dBus_cmd_valid = (((((execute_arbitration_isValid && execute_MEMORY_ENABLE) && (! execute_arbitration_isStuckByOthers)) && (! execute_arbitration_isFlushed)) && (! execute_DBusSimplePlugin_skipCmd)) && (! _zz_128_)); + assign dBus_cmd_payload_wr = execute_MEMORY_STORE; + assign dBus_cmd_payload_size = execute_INSTRUCTION[13 : 12]; + always @ (*) begin + case(dBus_cmd_payload_size) + 2'b00 : begin + _zz_129_ = {{{execute_RS2[7 : 0],execute_RS2[7 : 0]},execute_RS2[7 : 0]},execute_RS2[7 : 0]}; + end + 2'b01 : begin + _zz_129_ = {execute_RS2[15 : 0],execute_RS2[15 : 0]}; + end + default : begin + _zz_129_ = execute_RS2[31 : 0]; + end + endcase + end + + assign dBus_cmd_payload_data = _zz_129_; + assign _zz_89_ = dBus_cmd_payload_address[1 : 0]; + always @ (*) begin + case(dBus_cmd_payload_size) + 2'b00 : begin + _zz_130_ = (4'b0001); + end + 2'b01 : begin + _zz_130_ = (4'b0011); + end + default : begin + _zz_130_ = (4'b1111); + end + endcase + end + + assign execute_DBusSimplePlugin_formalMask = (_zz_130_ <<< dBus_cmd_payload_address[1 : 0]); + assign DBusSimplePlugin_mmuBus_cmd_isValid = (execute_arbitration_isValid && execute_MEMORY_ENABLE); + assign DBusSimplePlugin_mmuBus_cmd_virtualAddress = execute_SRC_ADD; + assign DBusSimplePlugin_mmuBus_cmd_bypassTranslation = 1'b0; + assign DBusSimplePlugin_mmuBus_end = ((! execute_arbitration_isStuck) || execute_arbitration_removeIt); + assign dBus_cmd_payload_address = DBusSimplePlugin_mmuBus_rsp_physicalAddress; + assign _zz_88_ = ((execute_MMU_RSP_exception || ((! execute_MMU_RSP_allowWrite) && execute_MEMORY_STORE)) || ((! execute_MMU_RSP_allowRead) && (! execute_MEMORY_STORE))); + assign _zz_81_ = DBusSimplePlugin_mmuBus_rsp_physicalAddress; + assign _zz_82_ = DBusSimplePlugin_mmuBus_rsp_isIoAccess; + assign _zz_83_ = DBusSimplePlugin_mmuBus_rsp_allowRead; + assign _zz_84_ = DBusSimplePlugin_mmuBus_rsp_allowWrite; + assign _zz_85_ = DBusSimplePlugin_mmuBus_rsp_allowExecute; + assign _zz_86_ = DBusSimplePlugin_mmuBus_rsp_exception; + assign _zz_87_ = DBusSimplePlugin_mmuBus_rsp_refilling; + assign _zz_80_ = dBus_rsp_data; + always @ (*) begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b0; + if(_zz_238_)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b1; + end + if(memory_ALIGNEMENT_FAULT)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b1; + end + if(memory_MMU_RSP_refilling)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b0; + end else begin + if(memory_MMU_FAULT)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b1; + end + end + if(_zz_239_)begin + DBusSimplePlugin_memoryExceptionPort_valid = 1'b0; + end + end + + always @ (*) begin + DBusSimplePlugin_memoryExceptionPort_payload_code = (4'bxxxx); + if(_zz_238_)begin + DBusSimplePlugin_memoryExceptionPort_payload_code = (4'b0101); + end + if(memory_ALIGNEMENT_FAULT)begin + DBusSimplePlugin_memoryExceptionPort_payload_code = {1'd0, _zz_266_}; + end + if(! memory_MMU_RSP_refilling) begin + if(memory_MMU_FAULT)begin + DBusSimplePlugin_memoryExceptionPort_payload_code = (memory_MEMORY_STORE ? (4'b1111) : (4'b1101)); + end + end + end + + assign DBusSimplePlugin_memoryExceptionPort_payload_badAddr = memory_REGFILE_WRITE_DATA; + always @ (*) begin + DBusSimplePlugin_redoBranch_valid = 1'b0; + if(memory_MMU_RSP_refilling)begin + DBusSimplePlugin_redoBranch_valid = 1'b1; + end + if(_zz_239_)begin + DBusSimplePlugin_redoBranch_valid = 1'b0; + end + end + + assign DBusSimplePlugin_redoBranch_payload = memory_PC; + always @ (*) begin + writeBack_DBusSimplePlugin_rspShifted = writeBack_MEMORY_READ_DATA; + case(writeBack_MEMORY_ADDRESS_LOW) + 2'b01 : begin + writeBack_DBusSimplePlugin_rspShifted[7 : 0] = writeBack_MEMORY_READ_DATA[15 : 8]; + end + 2'b10 : begin + writeBack_DBusSimplePlugin_rspShifted[15 : 0] = writeBack_MEMORY_READ_DATA[31 : 16]; + end + 2'b11 : begin + writeBack_DBusSimplePlugin_rspShifted[7 : 0] = writeBack_MEMORY_READ_DATA[31 : 24]; + end + default : begin + end + endcase + end + + assign _zz_131_ = (writeBack_DBusSimplePlugin_rspShifted[7] && (! writeBack_INSTRUCTION[14])); + always @ (*) begin + _zz_132_[31] = _zz_131_; + _zz_132_[30] = _zz_131_; + _zz_132_[29] = _zz_131_; + _zz_132_[28] = _zz_131_; + _zz_132_[27] = _zz_131_; + _zz_132_[26] = _zz_131_; + _zz_132_[25] = _zz_131_; + _zz_132_[24] = _zz_131_; + _zz_132_[23] = _zz_131_; + _zz_132_[22] = _zz_131_; + _zz_132_[21] = _zz_131_; + _zz_132_[20] = _zz_131_; + _zz_132_[19] = _zz_131_; + _zz_132_[18] = _zz_131_; + _zz_132_[17] = _zz_131_; + _zz_132_[16] = _zz_131_; + _zz_132_[15] = _zz_131_; + _zz_132_[14] = _zz_131_; + _zz_132_[13] = _zz_131_; + _zz_132_[12] = _zz_131_; + _zz_132_[11] = _zz_131_; + _zz_132_[10] = _zz_131_; + _zz_132_[9] = _zz_131_; + _zz_132_[8] = _zz_131_; + _zz_132_[7 : 0] = writeBack_DBusSimplePlugin_rspShifted[7 : 0]; + end + + assign _zz_133_ = (writeBack_DBusSimplePlugin_rspShifted[15] && (! writeBack_INSTRUCTION[14])); + always @ (*) begin + _zz_134_[31] = _zz_133_; + _zz_134_[30] = _zz_133_; + _zz_134_[29] = _zz_133_; + _zz_134_[28] = _zz_133_; + _zz_134_[27] = _zz_133_; + _zz_134_[26] = _zz_133_; + _zz_134_[25] = _zz_133_; + _zz_134_[24] = _zz_133_; + _zz_134_[23] = _zz_133_; + _zz_134_[22] = _zz_133_; + _zz_134_[21] = _zz_133_; + _zz_134_[20] = _zz_133_; + _zz_134_[19] = _zz_133_; + _zz_134_[18] = _zz_133_; + _zz_134_[17] = _zz_133_; + _zz_134_[16] = _zz_133_; + _zz_134_[15 : 0] = writeBack_DBusSimplePlugin_rspShifted[15 : 0]; + end + + always @ (*) begin + case(_zz_253_) + 2'b00 : begin + writeBack_DBusSimplePlugin_rspFormated = _zz_132_; + end + 2'b01 : begin + writeBack_DBusSimplePlugin_rspFormated = _zz_134_; + end + default : begin + writeBack_DBusSimplePlugin_rspFormated = writeBack_DBusSimplePlugin_rspShifted; + end + endcase + end + + assign IBusCachedPlugin_mmuBus_rsp_physicalAddress = IBusCachedPlugin_mmuBus_cmd_virtualAddress; + assign IBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1; + assign IBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1; + assign IBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1; + assign IBusCachedPlugin_mmuBus_rsp_isIoAccess = IBusCachedPlugin_mmuBus_rsp_physicalAddress[31]; + assign IBusCachedPlugin_mmuBus_rsp_exception = 1'b0; + assign IBusCachedPlugin_mmuBus_rsp_refilling = 1'b0; + assign IBusCachedPlugin_mmuBus_busy = 1'b0; + assign DBusSimplePlugin_mmuBus_rsp_physicalAddress = DBusSimplePlugin_mmuBus_cmd_virtualAddress; + assign DBusSimplePlugin_mmuBus_rsp_allowRead = 1'b1; + assign DBusSimplePlugin_mmuBus_rsp_allowWrite = 1'b1; + assign DBusSimplePlugin_mmuBus_rsp_allowExecute = 1'b1; + assign DBusSimplePlugin_mmuBus_rsp_isIoAccess = DBusSimplePlugin_mmuBus_rsp_physicalAddress[31]; + assign DBusSimplePlugin_mmuBus_rsp_exception = 1'b0; + assign DBusSimplePlugin_mmuBus_rsp_refilling = 1'b0; + assign DBusSimplePlugin_mmuBus_busy = 1'b0; + assign _zz_136_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000000100)) == (32'b00000000000000000000000000000100)); + assign _zz_137_ = ((decode_INSTRUCTION & (32'b00000000000000000011000000000000)) == (32'b00000000000000000010000000000000)); + assign _zz_138_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001001000)) == (32'b00000000000000000000000001001000)); + assign _zz_139_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000000000)) == (32'b00000000000000000001000000000000)); + assign _zz_140_ = ((decode_INSTRUCTION & (32'b00000000000000000101000000000000)) == (32'b00000000000000000100000000000000)); + assign _zz_141_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001010000)) == (32'b00000000000000000100000001010000)); + assign _zz_135_ = {({_zz_140_,{_zz_137_,_zz_139_}} != (3'b000)),{({_zz_348_,_zz_141_} != (2'b00)),{({_zz_349_,_zz_350_} != (2'b00)),{(_zz_351_ != _zz_352_),{_zz_353_,{_zz_354_,_zz_355_}}}}}}; + assign _zz_78_ = ({((decode_INSTRUCTION & (32'b00000000000000000000000001011111)) == (32'b00000000000000000000000000010111)),{((decode_INSTRUCTION & (32'b00000000000000000000000001111111)) == (32'b00000000000000000000000001101111)),{((decode_INSTRUCTION & (32'b00000000000000000001000001101111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_487_) == (32'b00000000000000000001000001110011)),{(_zz_488_ == _zz_489_),{_zz_490_,{_zz_491_,_zz_492_}}}}}}} != (18'b000000000000000000)); + assign _zz_77_ = _zz_267_[0]; + assign _zz_76_ = _zz_268_[0]; + assign _zz_75_ = _zz_269_[0]; + assign _zz_74_ = _zz_270_[0]; + assign _zz_142_ = _zz_135_[5 : 4]; + assign _zz_73_ = _zz_142_; + assign _zz_143_ = _zz_135_[7 : 6]; + assign _zz_72_ = _zz_143_; + assign _zz_71_ = _zz_271_[0]; + assign _zz_144_ = _zz_135_[10 : 9]; + assign _zz_70_ = _zz_144_; + assign _zz_69_ = _zz_272_[0]; + assign _zz_145_ = _zz_135_[13 : 12]; + assign _zz_68_ = _zz_145_; + assign _zz_146_ = _zz_135_[14 : 14]; + assign _zz_67_ = _zz_146_; + assign _zz_66_ = _zz_273_[0]; + assign _zz_65_ = _zz_274_[0]; + assign _zz_64_ = _zz_275_[0]; + assign _zz_63_ = _zz_276_[0]; + assign _zz_62_ = _zz_277_[0]; + assign _zz_61_ = _zz_278_[0]; + assign _zz_60_ = _zz_279_[0]; + assign _zz_147_ = _zz_135_[23 : 22]; + assign _zz_59_ = _zz_147_; + assign _zz_58_ = _zz_280_[0]; + assign _zz_57_ = _zz_281_[0]; + assign _zz_148_ = _zz_135_[28 : 27]; + assign _zz_56_ = _zz_148_; + assign _zz_55_ = _zz_282_[0]; + assign decodeExceptionPort_valid = ((decode_arbitration_isValid && decode_INSTRUCTION_READY) && (! decode_LEGAL_INSTRUCTION)); + assign decodeExceptionPort_payload_code = (4'b0010); + assign decodeExceptionPort_payload_badAddr = decode_INSTRUCTION; + assign decode_RegFilePlugin_regFileReadAddress1 = decode_INSTRUCTION_ANTICIPATED[19 : 15]; + assign decode_RegFilePlugin_regFileReadAddress2 = decode_INSTRUCTION_ANTICIPATED[24 : 20]; + assign decode_RegFilePlugin_rs1Data = _zz_214_; + assign decode_RegFilePlugin_rs2Data = _zz_215_; + assign _zz_54_ = decode_RegFilePlugin_rs1Data; + assign _zz_53_ = decode_RegFilePlugin_rs2Data; + always @ (*) begin + lastStageRegFileWrite_valid = (_zz_51_ && writeBack_arbitration_isFiring); + if(_zz_149_)begin + lastStageRegFileWrite_valid = 1'b1; + end + end + + assign lastStageRegFileWrite_payload_address = _zz_50_[11 : 7]; + assign lastStageRegFileWrite_payload_data = _zz_79_; + always @ (*) begin + case(execute_ALU_BITWISE_CTRL) + `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : begin + execute_IntAluPlugin_bitwise = (execute_SRC1 & execute_SRC2); + end + `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : begin + execute_IntAluPlugin_bitwise = (execute_SRC1 | execute_SRC2); + end + default : begin + execute_IntAluPlugin_bitwise = (execute_SRC1 ^ execute_SRC2); + end + endcase + end + + always @ (*) begin + case(execute_ALU_CTRL) + `AluCtrlEnum_defaultEncoding_BITWISE : begin + _zz_150_ = execute_IntAluPlugin_bitwise; + end + `AluCtrlEnum_defaultEncoding_SLT_SLTU : begin + _zz_150_ = {31'd0, _zz_283_}; + end + default : begin + _zz_150_ = execute_SRC_ADD_SUB; + end + endcase + end + + assign _zz_48_ = _zz_150_; + assign _zz_46_ = (decode_SRC_ADD_ZERO && (! decode_SRC_USE_SUB_LESS)); + always @ (*) begin + case(execute_SRC1_CTRL) + `Src1CtrlEnum_defaultEncoding_RS : begin + _zz_151_ = execute_RS1; + end + `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : begin + _zz_151_ = {29'd0, _zz_284_}; + end + `Src1CtrlEnum_defaultEncoding_IMU : begin + _zz_151_ = {execute_INSTRUCTION[31 : 12],(12'b000000000000)}; + end + default : begin + _zz_151_ = {27'd0, _zz_285_}; + end + endcase + end + + assign _zz_45_ = _zz_151_; + assign _zz_152_ = _zz_286_[11]; + always @ (*) begin + _zz_153_[19] = _zz_152_; + _zz_153_[18] = _zz_152_; + _zz_153_[17] = _zz_152_; + _zz_153_[16] = _zz_152_; + _zz_153_[15] = _zz_152_; + _zz_153_[14] = _zz_152_; + _zz_153_[13] = _zz_152_; + _zz_153_[12] = _zz_152_; + _zz_153_[11] = _zz_152_; + _zz_153_[10] = _zz_152_; + _zz_153_[9] = _zz_152_; + _zz_153_[8] = _zz_152_; + _zz_153_[7] = _zz_152_; + _zz_153_[6] = _zz_152_; + _zz_153_[5] = _zz_152_; + _zz_153_[4] = _zz_152_; + _zz_153_[3] = _zz_152_; + _zz_153_[2] = _zz_152_; + _zz_153_[1] = _zz_152_; + _zz_153_[0] = _zz_152_; + end + + assign _zz_154_ = _zz_287_[11]; + always @ (*) begin + _zz_155_[19] = _zz_154_; + _zz_155_[18] = _zz_154_; + _zz_155_[17] = _zz_154_; + _zz_155_[16] = _zz_154_; + _zz_155_[15] = _zz_154_; + _zz_155_[14] = _zz_154_; + _zz_155_[13] = _zz_154_; + _zz_155_[12] = _zz_154_; + _zz_155_[11] = _zz_154_; + _zz_155_[10] = _zz_154_; + _zz_155_[9] = _zz_154_; + _zz_155_[8] = _zz_154_; + _zz_155_[7] = _zz_154_; + _zz_155_[6] = _zz_154_; + _zz_155_[5] = _zz_154_; + _zz_155_[4] = _zz_154_; + _zz_155_[3] = _zz_154_; + _zz_155_[2] = _zz_154_; + _zz_155_[1] = _zz_154_; + _zz_155_[0] = _zz_154_; + end + + always @ (*) begin + case(execute_SRC2_CTRL) + `Src2CtrlEnum_defaultEncoding_RS : begin + _zz_156_ = execute_RS2; + end + `Src2CtrlEnum_defaultEncoding_IMI : begin + _zz_156_ = {_zz_153_,execute_INSTRUCTION[31 : 20]}; + end + `Src2CtrlEnum_defaultEncoding_IMS : begin + _zz_156_ = {_zz_155_,{execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}}; + end + default : begin + _zz_156_ = _zz_41_; + end + endcase + end + + assign _zz_43_ = _zz_156_; + always @ (*) begin + execute_SrcPlugin_addSub = _zz_288_; + if(execute_SRC2_FORCE_ZERO)begin + execute_SrcPlugin_addSub = execute_SRC1; + end + end + + assign execute_SrcPlugin_less = ((execute_SRC1[31] == execute_SRC2[31]) ? execute_SrcPlugin_addSub[31] : (execute_SRC_LESS_UNSIGNED ? execute_SRC2[31] : execute_SRC1[31])); + assign _zz_40_ = execute_SrcPlugin_addSub; + assign _zz_39_ = execute_SrcPlugin_addSub; + assign _zz_38_ = execute_SrcPlugin_less; + assign execute_LightShifterPlugin_isShift = (execute_SHIFT_CTRL != `ShiftCtrlEnum_defaultEncoding_DISABLE_1); + assign execute_LightShifterPlugin_amplitude = (execute_LightShifterPlugin_isActive ? execute_LightShifterPlugin_amplitudeReg : execute_SRC2[4 : 0]); + assign execute_LightShifterPlugin_shiftInput = (execute_LightShifterPlugin_isActive ? memory_REGFILE_WRITE_DATA : execute_SRC1); + assign execute_LightShifterPlugin_done = (execute_LightShifterPlugin_amplitude[4 : 1] == (4'b0000)); + always @ (*) begin + case(execute_SHIFT_CTRL) + `ShiftCtrlEnum_defaultEncoding_SLL_1 : begin + _zz_157_ = (execute_LightShifterPlugin_shiftInput <<< 1); + end + default : begin + _zz_157_ = _zz_295_; + end + endcase + end + + always @ (*) begin + _zz_158_ = 1'b0; + if(_zz_240_)begin + if(_zz_241_)begin + if(_zz_164_)begin + _zz_158_ = 1'b1; + end + end + end + if(_zz_242_)begin + if(_zz_243_)begin + if(_zz_166_)begin + _zz_158_ = 1'b1; + end + end + end + if(_zz_244_)begin + if(_zz_245_)begin + if(_zz_168_)begin + _zz_158_ = 1'b1; + end + end + end + if((! decode_RS1_USE))begin + _zz_158_ = 1'b0; + end + end + + always @ (*) begin + _zz_159_ = 1'b0; + if(_zz_240_)begin + if(_zz_241_)begin + if(_zz_165_)begin + _zz_159_ = 1'b1; + end + end + end + if(_zz_242_)begin + if(_zz_243_)begin + if(_zz_167_)begin + _zz_159_ = 1'b1; + end + end + end + if(_zz_244_)begin + if(_zz_245_)begin + if(_zz_169_)begin + _zz_159_ = 1'b1; + end + end + end + if((! decode_RS2_USE))begin + _zz_159_ = 1'b0; + end + end + + assign _zz_160_ = (_zz_51_ && writeBack_arbitration_isFiring); + assign _zz_164_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); + assign _zz_165_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); + assign _zz_166_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); + assign _zz_167_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); + assign _zz_168_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); + assign _zz_169_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); + assign _zz_34_ = IBusCachedPlugin_decodePrediction_cmd_hadBranch; + assign execute_BranchPlugin_eq = (execute_SRC1 == execute_SRC2); + assign _zz_170_ = execute_INSTRUCTION[14 : 12]; + always @ (*) begin + if((_zz_170_ == (3'b000))) begin + _zz_171_ = execute_BranchPlugin_eq; + end else if((_zz_170_ == (3'b001))) begin + _zz_171_ = (! execute_BranchPlugin_eq); + end else if((((_zz_170_ & (3'b101)) == (3'b101)))) begin + _zz_171_ = (! execute_SRC_LESS); + end else begin + _zz_171_ = execute_SRC_LESS; + end + end + + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_INC : begin + _zz_172_ = 1'b0; + end + `BranchCtrlEnum_defaultEncoding_JAL : begin + _zz_172_ = 1'b1; + end + `BranchCtrlEnum_defaultEncoding_JALR : begin + _zz_172_ = 1'b1; + end + default : begin + _zz_172_ = _zz_171_; + end + endcase + end + + assign _zz_33_ = _zz_172_; + assign _zz_173_ = _zz_297_[11]; + always @ (*) begin + _zz_174_[19] = _zz_173_; + _zz_174_[18] = _zz_173_; + _zz_174_[17] = _zz_173_; + _zz_174_[16] = _zz_173_; + _zz_174_[15] = _zz_173_; + _zz_174_[14] = _zz_173_; + _zz_174_[13] = _zz_173_; + _zz_174_[12] = _zz_173_; + _zz_174_[11] = _zz_173_; + _zz_174_[10] = _zz_173_; + _zz_174_[9] = _zz_173_; + _zz_174_[8] = _zz_173_; + _zz_174_[7] = _zz_173_; + _zz_174_[6] = _zz_173_; + _zz_174_[5] = _zz_173_; + _zz_174_[4] = _zz_173_; + _zz_174_[3] = _zz_173_; + _zz_174_[2] = _zz_173_; + _zz_174_[1] = _zz_173_; + _zz_174_[0] = _zz_173_; + end + + assign _zz_175_ = _zz_298_[19]; + always @ (*) begin + _zz_176_[10] = _zz_175_; + _zz_176_[9] = _zz_175_; + _zz_176_[8] = _zz_175_; + _zz_176_[7] = _zz_175_; + _zz_176_[6] = _zz_175_; + _zz_176_[5] = _zz_175_; + _zz_176_[4] = _zz_175_; + _zz_176_[3] = _zz_175_; + _zz_176_[2] = _zz_175_; + _zz_176_[1] = _zz_175_; + _zz_176_[0] = _zz_175_; + end + + assign _zz_177_ = _zz_299_[11]; + always @ (*) begin + _zz_178_[18] = _zz_177_; + _zz_178_[17] = _zz_177_; + _zz_178_[16] = _zz_177_; + _zz_178_[15] = _zz_177_; + _zz_178_[14] = _zz_177_; + _zz_178_[13] = _zz_177_; + _zz_178_[12] = _zz_177_; + _zz_178_[11] = _zz_177_; + _zz_178_[10] = _zz_177_; + _zz_178_[9] = _zz_177_; + _zz_178_[8] = _zz_177_; + _zz_178_[7] = _zz_177_; + _zz_178_[6] = _zz_177_; + _zz_178_[5] = _zz_177_; + _zz_178_[4] = _zz_177_; + _zz_178_[3] = _zz_177_; + _zz_178_[2] = _zz_177_; + _zz_178_[1] = _zz_177_; + _zz_178_[0] = _zz_177_; + end + + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_JALR : begin + _zz_179_ = (_zz_300_[1] ^ execute_RS1[1]); + end + `BranchCtrlEnum_defaultEncoding_JAL : begin + _zz_179_ = _zz_301_[1]; + end + default : begin + _zz_179_ = _zz_302_[1]; + end + endcase + end + + assign execute_BranchPlugin_missAlignedTarget = (execute_BRANCH_COND_RESULT && _zz_179_); + assign _zz_31_ = ((execute_PREDICTION_HAD_BRANCHED2 != execute_BRANCH_COND_RESULT) || execute_BranchPlugin_missAlignedTarget); + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_JALR : begin + execute_BranchPlugin_branch_src1 = execute_RS1; + end + default : begin + execute_BranchPlugin_branch_src1 = execute_PC; + end + endcase + end + + assign _zz_180_ = _zz_303_[11]; + always @ (*) begin + _zz_181_[19] = _zz_180_; + _zz_181_[18] = _zz_180_; + _zz_181_[17] = _zz_180_; + _zz_181_[16] = _zz_180_; + _zz_181_[15] = _zz_180_; + _zz_181_[14] = _zz_180_; + _zz_181_[13] = _zz_180_; + _zz_181_[12] = _zz_180_; + _zz_181_[11] = _zz_180_; + _zz_181_[10] = _zz_180_; + _zz_181_[9] = _zz_180_; + _zz_181_[8] = _zz_180_; + _zz_181_[7] = _zz_180_; + _zz_181_[6] = _zz_180_; + _zz_181_[5] = _zz_180_; + _zz_181_[4] = _zz_180_; + _zz_181_[3] = _zz_180_; + _zz_181_[2] = _zz_180_; + _zz_181_[1] = _zz_180_; + _zz_181_[0] = _zz_180_; + end + + always @ (*) begin + case(execute_BRANCH_CTRL) + `BranchCtrlEnum_defaultEncoding_JALR : begin + execute_BranchPlugin_branch_src2 = {_zz_181_,execute_INSTRUCTION[31 : 20]}; + end + default : begin + execute_BranchPlugin_branch_src2 = ((execute_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) ? {{_zz_183_,{{{_zz_504_,execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0} : {{_zz_185_,{{{_zz_505_,_zz_506_},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0}); + if(execute_PREDICTION_HAD_BRANCHED2)begin + execute_BranchPlugin_branch_src2 = {29'd0, _zz_306_}; + end + end + endcase + end + + assign _zz_182_ = _zz_304_[19]; + always @ (*) begin + _zz_183_[10] = _zz_182_; + _zz_183_[9] = _zz_182_; + _zz_183_[8] = _zz_182_; + _zz_183_[7] = _zz_182_; + _zz_183_[6] = _zz_182_; + _zz_183_[5] = _zz_182_; + _zz_183_[4] = _zz_182_; + _zz_183_[3] = _zz_182_; + _zz_183_[2] = _zz_182_; + _zz_183_[1] = _zz_182_; + _zz_183_[0] = _zz_182_; + end + + assign _zz_184_ = _zz_305_[11]; + always @ (*) begin + _zz_185_[18] = _zz_184_; + _zz_185_[17] = _zz_184_; + _zz_185_[16] = _zz_184_; + _zz_185_[15] = _zz_184_; + _zz_185_[14] = _zz_184_; + _zz_185_[13] = _zz_184_; + _zz_185_[12] = _zz_184_; + _zz_185_[11] = _zz_184_; + _zz_185_[10] = _zz_184_; + _zz_185_[9] = _zz_184_; + _zz_185_[8] = _zz_184_; + _zz_185_[7] = _zz_184_; + _zz_185_[6] = _zz_184_; + _zz_185_[5] = _zz_184_; + _zz_185_[4] = _zz_184_; + _zz_185_[3] = _zz_184_; + _zz_185_[2] = _zz_184_; + _zz_185_[1] = _zz_184_; + _zz_185_[0] = _zz_184_; + end + + assign execute_BranchPlugin_branchAdder = (execute_BranchPlugin_branch_src1 + execute_BranchPlugin_branch_src2); + assign _zz_30_ = {execute_BranchPlugin_branchAdder[31 : 1],(1'b0)}; + assign BranchPlugin_jumpInterface_valid = ((memory_arbitration_isValid && memory_BRANCH_DO) && (! 1'b0)); + assign BranchPlugin_jumpInterface_payload = memory_BRANCH_CALC; + assign BranchPlugin_branchExceptionPort_valid = (memory_arbitration_isValid && (memory_BRANCH_DO && memory_BRANCH_CALC[1])); + assign BranchPlugin_branchExceptionPort_payload_code = (4'b0000); + assign BranchPlugin_branchExceptionPort_payload_badAddr = memory_BRANCH_CALC; + assign IBusCachedPlugin_decodePrediction_rsp_wasWrong = BranchPlugin_jumpInterface_valid; + always @ (*) begin + CsrPlugin_privilege = (2'b11); + if(CsrPlugin_forceMachineWire)begin + CsrPlugin_privilege = (2'b11); + end + end + + assign CsrPlugin_misa_base = (2'b01); + assign CsrPlugin_misa_extensions = (26'b00000000000000000001000010); + assign _zz_186_ = (CsrPlugin_mip_MTIP && CsrPlugin_mie_MTIE); + assign _zz_187_ = (CsrPlugin_mip_MSIP && CsrPlugin_mie_MSIE); + assign _zz_188_ = (CsrPlugin_mip_MEIP && CsrPlugin_mie_MEIE); + assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b11); + assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege = ((CsrPlugin_privilege < CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped) ? CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped : CsrPlugin_privilege); + assign _zz_189_ = {decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid}; + assign _zz_190_ = _zz_307_[0]; + assign _zz_191_ = {BranchPlugin_branchExceptionPort_valid,DBusSimplePlugin_memoryExceptionPort_valid}; + assign _zz_192_ = _zz_309_[0]; + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_decode = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; + if(_zz_229_)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b1; + end + if(decode_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b0; + end + end + + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_execute = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; + if(execute_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_execute = 1'b0; + end + end + + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_memory = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; + if(_zz_233_)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b1; + end + if(memory_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b0; + end + end + + always @ (*) begin + CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; + if(writeBack_arbitration_isFlushed)begin + CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = 1'b0; + end + end + + assign CsrPlugin_exceptionPendings_0 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; + assign CsrPlugin_exceptionPendings_1 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; + assign CsrPlugin_exceptionPendings_2 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; + assign CsrPlugin_exceptionPendings_3 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; + assign CsrPlugin_exception = (CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack && CsrPlugin_allowException); + assign CsrPlugin_lastStageWasWfi = 1'b0; + always @ (*) begin + CsrPlugin_pipelineLiberator_done = ((! ({writeBack_arbitration_isValid,{memory_arbitration_isValid,execute_arbitration_isValid}} != (3'b000))) && IBusCachedPlugin_pcValids_3); + if(({CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory,CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute}} != (3'b000)))begin + CsrPlugin_pipelineLiberator_done = 1'b0; + end + if(CsrPlugin_hadException)begin + CsrPlugin_pipelineLiberator_done = 1'b0; + end + end + + assign CsrPlugin_interruptJump = ((CsrPlugin_interrupt_valid && CsrPlugin_pipelineLiberator_done) && CsrPlugin_allowInterrupts); + always @ (*) begin + CsrPlugin_targetPrivilege = CsrPlugin_interrupt_targetPrivilege; + if(CsrPlugin_hadException)begin + CsrPlugin_targetPrivilege = CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; + end + end + + always @ (*) begin + CsrPlugin_trapCause = CsrPlugin_interrupt_code; + if(CsrPlugin_hadException)begin + CsrPlugin_trapCause = CsrPlugin_exceptionPortCtrl_exceptionContext_code; + end + end + + always @ (*) begin + CsrPlugin_xtvec_mode = (2'bxx); + case(CsrPlugin_targetPrivilege) + 2'b11 : begin + CsrPlugin_xtvec_mode = CsrPlugin_mtvec_mode; + end + default : begin + end + endcase + end + + always @ (*) begin + CsrPlugin_xtvec_base = (30'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + case(CsrPlugin_targetPrivilege) + 2'b11 : begin + CsrPlugin_xtvec_base = CsrPlugin_mtvec_base; + end + default : begin + end + endcase + end + + assign contextSwitching = CsrPlugin_jumpInterface_valid; + assign _zz_28_ = (! (((decode_INSTRUCTION[14 : 13] == (2'b01)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))) || ((decode_INSTRUCTION[14 : 13] == (2'b11)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))))); + assign _zz_27_ = (decode_INSTRUCTION[13 : 7] != (7'b0100000)); + assign execute_CsrPlugin_inWfi = 1'b0; + assign execute_CsrPlugin_blockedBySideEffects = ({writeBack_arbitration_isValid,memory_arbitration_isValid} != (2'b00)); + always @ (*) begin + execute_CsrPlugin_illegalAccess = 1'b1; + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001100000000 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001101000001 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001100000101 : begin + if(execute_CSR_WRITE_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b001101000100 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001101000011 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b111111000000 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + 12'b001100000100 : begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + 12'b001101000010 : begin + if(execute_CSR_READ_OPCODE)begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + default : begin + end + endcase + if((CsrPlugin_privilege < execute_CsrPlugin_csrAddress[9 : 8]))begin + execute_CsrPlugin_illegalAccess = 1'b1; + end + if(((! execute_arbitration_isValid) || (! execute_IS_CSR)))begin + execute_CsrPlugin_illegalAccess = 1'b0; + end + end + + always @ (*) begin + execute_CsrPlugin_illegalInstruction = 1'b0; + if((execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)))begin + if((CsrPlugin_privilege < execute_INSTRUCTION[29 : 28]))begin + execute_CsrPlugin_illegalInstruction = 1'b1; + end + end + end + + always @ (*) begin + execute_CsrPlugin_readData = (32'b00000000000000000000000000000000); + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + execute_CsrPlugin_readData[31 : 0] = _zz_200_; + end + 12'b001100000000 : begin + execute_CsrPlugin_readData[12 : 11] = CsrPlugin_mstatus_MPP; + execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mstatus_MPIE; + execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mstatus_MIE; + end + 12'b001101000001 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mepc; + end + 12'b001100000101 : begin + end + 12'b001101000100 : begin + execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mip_MEIP; + execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mip_MTIP; + execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mip_MSIP; + end + 12'b001101000011 : begin + execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mtval; + end + 12'b111111000000 : begin + execute_CsrPlugin_readData[31 : 0] = _zz_201_; + end + 12'b001100000100 : begin + execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mie_MEIE; + execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mie_MTIE; + execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mie_MSIE; + end + 12'b001101000010 : begin + execute_CsrPlugin_readData[31 : 31] = CsrPlugin_mcause_interrupt; + execute_CsrPlugin_readData[3 : 0] = CsrPlugin_mcause_exceptionCode; + end + default : begin + end + endcase + end + + assign execute_CsrPlugin_writeInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_WRITE_OPCODE); + assign execute_CsrPlugin_readInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_READ_OPCODE); + assign execute_CsrPlugin_writeEnable = ((execute_CsrPlugin_writeInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); + assign execute_CsrPlugin_readEnable = ((execute_CsrPlugin_readInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); + assign execute_CsrPlugin_readToWriteData = execute_CsrPlugin_readData; + always @ (*) begin + case(_zz_254_) + 1'b0 : begin + execute_CsrPlugin_writeData = execute_SRC1; + end + default : begin + execute_CsrPlugin_writeData = (execute_INSTRUCTION[12] ? (execute_CsrPlugin_readToWriteData & (~ execute_SRC1)) : (execute_CsrPlugin_readToWriteData | execute_SRC1)); + end + endcase + end + + assign execute_CsrPlugin_csrAddress = execute_INSTRUCTION[31 : 20]; + always @ (*) begin + memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b0; + if(_zz_217_)begin + if(_zz_231_)begin + memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b1; + end + end + end + + always @ (*) begin + memory_MulDivIterativePlugin_mul_counter_willClear = 1'b0; + if((! memory_arbitration_isStuck))begin + memory_MulDivIterativePlugin_mul_counter_willClear = 1'b1; + end + end + + assign memory_MulDivIterativePlugin_mul_willOverflowIfInc = (memory_MulDivIterativePlugin_mul_counter_value == (6'b100000)); + assign memory_MulDivIterativePlugin_mul_counter_willOverflow = (memory_MulDivIterativePlugin_mul_willOverflowIfInc && memory_MulDivIterativePlugin_mul_counter_willIncrement); + always @ (*) begin + if(memory_MulDivIterativePlugin_mul_counter_willOverflow)begin + memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); + end else begin + memory_MulDivIterativePlugin_mul_counter_valueNext = (memory_MulDivIterativePlugin_mul_counter_value + _zz_312_); + end + if(memory_MulDivIterativePlugin_mul_counter_willClear)begin + memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); + end + end + + always @ (*) begin + memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b0; + if(_zz_218_)begin + if(_zz_232_)begin + memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b1; + end + end + end + + always @ (*) begin + memory_MulDivIterativePlugin_div_counter_willClear = 1'b0; + if(_zz_246_)begin + memory_MulDivIterativePlugin_div_counter_willClear = 1'b1; + end + end + + assign memory_MulDivIterativePlugin_div_counter_willOverflowIfInc = (memory_MulDivIterativePlugin_div_counter_value == (6'b100001)); + assign memory_MulDivIterativePlugin_div_counter_willOverflow = (memory_MulDivIterativePlugin_div_counter_willOverflowIfInc && memory_MulDivIterativePlugin_div_counter_willIncrement); + always @ (*) begin + if(memory_MulDivIterativePlugin_div_counter_willOverflow)begin + memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); + end else begin + memory_MulDivIterativePlugin_div_counter_valueNext = (memory_MulDivIterativePlugin_div_counter_value + _zz_320_); + end + if(memory_MulDivIterativePlugin_div_counter_willClear)begin + memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); + end + end + + assign _zz_193_ = memory_MulDivIterativePlugin_rs1[31 : 0]; + assign _zz_194_ = {memory_MulDivIterativePlugin_accumulator[31 : 0],_zz_193_[31]}; + assign _zz_195_ = (_zz_194_ - _zz_321_); + assign _zz_196_ = (memory_INSTRUCTION[13] ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_rs1[31 : 0]); + assign _zz_197_ = (execute_RS2[31] && execute_IS_RS2_SIGNED); + assign _zz_198_ = ((execute_IS_MUL && _zz_197_) || ((execute_IS_DIV && execute_RS1[31]) && execute_IS_RS1_SIGNED)); + always @ (*) begin + _zz_199_[32] = (execute_IS_RS1_SIGNED && execute_RS1[31]); + _zz_199_[31 : 0] = execute_RS1; + end + + assign _zz_201_ = (_zz_200_ & externalInterruptArray_regNext); + assign externalInterrupt = (_zz_201_ != (32'b00000000000000000000000000000000)); + assign _zz_24_ = decode_SHIFT_CTRL; + assign _zz_22_ = _zz_73_; + assign _zz_37_ = decode_to_execute_SHIFT_CTRL; + assign _zz_21_ = decode_ENV_CTRL; + assign _zz_18_ = execute_ENV_CTRL; + assign _zz_16_ = memory_ENV_CTRL; + assign _zz_19_ = _zz_67_; + assign _zz_26_ = decode_to_execute_ENV_CTRL; + assign _zz_25_ = execute_to_memory_ENV_CTRL; + assign _zz_29_ = memory_to_writeBack_ENV_CTRL; + assign _zz_14_ = decode_SRC1_CTRL; + assign _zz_12_ = _zz_56_; + assign _zz_44_ = decode_to_execute_SRC1_CTRL; + assign _zz_11_ = decode_BRANCH_CTRL; + assign _zz_95_ = _zz_68_; + assign _zz_32_ = decode_to_execute_BRANCH_CTRL; + assign _zz_9_ = decode_SRC2_CTRL; + assign _zz_7_ = _zz_59_; + assign _zz_42_ = decode_to_execute_SRC2_CTRL; + assign _zz_6_ = decode_ALU_BITWISE_CTRL; + assign _zz_4_ = _zz_70_; + assign _zz_49_ = decode_to_execute_ALU_BITWISE_CTRL; + assign _zz_3_ = decode_ALU_CTRL; + assign _zz_1_ = _zz_72_; + assign _zz_47_ = decode_to_execute_ALU_CTRL; + assign decode_arbitration_isFlushed = (({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,execute_arbitration_flushNext}} != (3'b000)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,{execute_arbitration_flushIt,decode_arbitration_flushIt}}} != (4'b0000))); + assign execute_arbitration_isFlushed = (({writeBack_arbitration_flushNext,memory_arbitration_flushNext} != (2'b00)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,execute_arbitration_flushIt}} != (3'b000))); + assign memory_arbitration_isFlushed = ((writeBack_arbitration_flushNext != (1'b0)) || ({writeBack_arbitration_flushIt,memory_arbitration_flushIt} != (2'b00))); + assign writeBack_arbitration_isFlushed = (1'b0 || (writeBack_arbitration_flushIt != (1'b0))); + assign decode_arbitration_isStuckByOthers = (decode_arbitration_haltByOther || (((1'b0 || execute_arbitration_isStuck) || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); + assign decode_arbitration_isStuck = (decode_arbitration_haltItself || decode_arbitration_isStuckByOthers); + assign decode_arbitration_isMoving = ((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)); + assign decode_arbitration_isFiring = ((decode_arbitration_isValid && (! decode_arbitration_isStuck)) && (! decode_arbitration_removeIt)); + assign execute_arbitration_isStuckByOthers = (execute_arbitration_haltByOther || ((1'b0 || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); + assign execute_arbitration_isStuck = (execute_arbitration_haltItself || execute_arbitration_isStuckByOthers); + assign execute_arbitration_isMoving = ((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)); + assign execute_arbitration_isFiring = ((execute_arbitration_isValid && (! execute_arbitration_isStuck)) && (! execute_arbitration_removeIt)); + assign memory_arbitration_isStuckByOthers = (memory_arbitration_haltByOther || (1'b0 || writeBack_arbitration_isStuck)); + assign memory_arbitration_isStuck = (memory_arbitration_haltItself || memory_arbitration_isStuckByOthers); + assign memory_arbitration_isMoving = ((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)); + assign memory_arbitration_isFiring = ((memory_arbitration_isValid && (! memory_arbitration_isStuck)) && (! memory_arbitration_removeIt)); + assign writeBack_arbitration_isStuckByOthers = (writeBack_arbitration_haltByOther || 1'b0); + assign writeBack_arbitration_isStuck = (writeBack_arbitration_haltItself || writeBack_arbitration_isStuckByOthers); + assign writeBack_arbitration_isMoving = ((! writeBack_arbitration_isStuck) && (! writeBack_arbitration_removeIt)); + assign writeBack_arbitration_isFiring = ((writeBack_arbitration_isValid && (! writeBack_arbitration_isStuck)) && (! writeBack_arbitration_removeIt)); + assign iBusWishbone_ADR = {_zz_340_,_zz_202_}; + assign iBusWishbone_CTI = ((_zz_202_ == (3'b111)) ? (3'b111) : (3'b010)); + assign iBusWishbone_BTE = (2'b00); + assign iBusWishbone_SEL = (4'b1111); + assign iBusWishbone_WE = 1'b0; + assign iBusWishbone_DAT_MOSI = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); + always @ (*) begin + iBusWishbone_CYC = 1'b0; + if(_zz_247_)begin + iBusWishbone_CYC = 1'b1; + end + end + + always @ (*) begin + iBusWishbone_STB = 1'b0; + if(_zz_247_)begin + iBusWishbone_STB = 1'b1; + end + end + + assign iBus_cmd_ready = (iBus_cmd_valid && iBusWishbone_ACK); + assign iBus_rsp_valid = _zz_203_; + assign iBus_rsp_payload_data = iBusWishbone_DAT_MISO_regNext; + assign iBus_rsp_payload_error = 1'b0; + assign dBus_cmd_halfPipe_valid = dBus_cmd_halfPipe_regs_valid; + assign dBus_cmd_halfPipe_payload_wr = dBus_cmd_halfPipe_regs_payload_wr; + assign dBus_cmd_halfPipe_payload_address = dBus_cmd_halfPipe_regs_payload_address; + assign dBus_cmd_halfPipe_payload_data = dBus_cmd_halfPipe_regs_payload_data; + assign dBus_cmd_halfPipe_payload_size = dBus_cmd_halfPipe_regs_payload_size; + assign dBus_cmd_ready = dBus_cmd_halfPipe_regs_ready; + assign dBusWishbone_ADR = (dBus_cmd_halfPipe_payload_address >>> 2); + assign dBusWishbone_CTI = (3'b000); + assign dBusWishbone_BTE = (2'b00); + always @ (*) begin + case(dBus_cmd_halfPipe_payload_size) + 2'b00 : begin + _zz_204_ = (4'b0001); + end + 2'b01 : begin + _zz_204_ = (4'b0011); + end + default : begin + _zz_204_ = (4'b1111); + end + endcase + end + + always @ (*) begin + dBusWishbone_SEL = _zz_341_[3:0]; + if((! dBus_cmd_halfPipe_payload_wr))begin + dBusWishbone_SEL = (4'b1111); + end + end + + assign dBusWishbone_WE = dBus_cmd_halfPipe_payload_wr; + assign dBusWishbone_DAT_MOSI = dBus_cmd_halfPipe_payload_data; + assign dBus_cmd_halfPipe_ready = (dBus_cmd_halfPipe_valid && dBusWishbone_ACK); + assign dBusWishbone_CYC = dBus_cmd_halfPipe_valid; + assign dBusWishbone_STB = dBus_cmd_halfPipe_valid; + assign dBus_rsp_ready = ((dBus_cmd_halfPipe_valid && (! dBusWishbone_WE)) && dBusWishbone_ACK); + assign dBus_rsp_data = dBusWishbone_DAT_MISO; + assign dBus_rsp_error = 1'b0; + always @ (posedge clk) begin + if(reset) begin + IBusCachedPlugin_fetchPc_pcReg <= externalResetVector; + IBusCachedPlugin_fetchPc_booted <= 1'b0; + IBusCachedPlugin_fetchPc_inc <= 1'b0; + _zz_112_ <= 1'b0; + _zz_114_ <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; + IBusCachedPlugin_injector_decodeRemoved <= 1'b0; + IBusCachedPlugin_rspCounter <= _zz_127_; + IBusCachedPlugin_rspCounter <= (32'b00000000000000000000000000000000); + _zz_149_ <= 1'b1; + execute_LightShifterPlugin_isActive <= 1'b0; + _zz_161_ <= 1'b0; + CsrPlugin_mstatus_MIE <= 1'b0; + CsrPlugin_mstatus_MPIE <= 1'b0; + CsrPlugin_mstatus_MPP <= (2'b11); + CsrPlugin_mie_MEIE <= 1'b0; + CsrPlugin_mie_MTIE <= 1'b0; + CsrPlugin_mie_MSIE <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= 1'b0; + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; + CsrPlugin_interrupt_valid <= 1'b0; + CsrPlugin_hadException <= 1'b0; + execute_CsrPlugin_wfiWake <= 1'b0; + memory_MulDivIterativePlugin_mul_counter_value <= (6'b000000); + memory_MulDivIterativePlugin_div_counter_value <= (6'b000000); + _zz_200_ <= (32'b00000000000000000000000000000000); + execute_arbitration_isValid <= 1'b0; + memory_arbitration_isValid <= 1'b0; + writeBack_arbitration_isValid <= 1'b0; + memory_to_writeBack_REGFILE_WRITE_DATA <= (32'b00000000000000000000000000000000); + memory_to_writeBack_INSTRUCTION <= (32'b00000000000000000000000000000000); + _zz_202_ <= (3'b000); + _zz_203_ <= 1'b0; + dBus_cmd_halfPipe_regs_valid <= 1'b0; + dBus_cmd_halfPipe_regs_ready <= 1'b1; + end else begin + IBusCachedPlugin_fetchPc_booted <= 1'b1; + if((IBusCachedPlugin_fetchPc_corrected || IBusCachedPlugin_fetchPc_pcRegPropagate))begin + IBusCachedPlugin_fetchPc_inc <= 1'b0; + end + if((IBusCachedPlugin_fetchPc_output_valid && IBusCachedPlugin_fetchPc_output_ready))begin + IBusCachedPlugin_fetchPc_inc <= 1'b1; + end + if(((! IBusCachedPlugin_fetchPc_output_valid) && IBusCachedPlugin_fetchPc_output_ready))begin + IBusCachedPlugin_fetchPc_inc <= 1'b0; + end + if((IBusCachedPlugin_fetchPc_booted && ((IBusCachedPlugin_fetchPc_output_ready || IBusCachedPlugin_fetcherflushIt) || IBusCachedPlugin_fetchPc_pcRegPropagate)))begin + IBusCachedPlugin_fetchPc_pcReg <= IBusCachedPlugin_fetchPc_pc; + end + if(IBusCachedPlugin_fetcherflushIt)begin + _zz_112_ <= 1'b0; + end + if(_zz_110_)begin + _zz_112_ <= IBusCachedPlugin_iBusRsp_stages_0_output_valid; + end + if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin + _zz_114_ <= IBusCachedPlugin_iBusRsp_stages_1_output_valid; + end + if(IBusCachedPlugin_fetcherflushIt)begin + _zz_114_ <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; + end + if((! (! IBusCachedPlugin_iBusRsp_stages_1_input_ready)))begin + IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b1; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; + end + if((! (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)))begin + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= IBusCachedPlugin_injector_nextPcCalc_valids_0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; + end + if((! execute_arbitration_isStuck))begin + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= IBusCachedPlugin_injector_nextPcCalc_valids_1; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; + end + if((! memory_arbitration_isStuck))begin + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= IBusCachedPlugin_injector_nextPcCalc_valids_2; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; + end + if((! writeBack_arbitration_isStuck))begin + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= IBusCachedPlugin_injector_nextPcCalc_valids_3; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; + end + if(decode_arbitration_removeIt)begin + IBusCachedPlugin_injector_decodeRemoved <= 1'b1; + end + if(IBusCachedPlugin_fetcherflushIt)begin + IBusCachedPlugin_injector_decodeRemoved <= 1'b0; + end + if(iBus_rsp_valid)begin + IBusCachedPlugin_rspCounter <= (IBusCachedPlugin_rspCounter + (32'b00000000000000000000000000000001)); + end + _zz_149_ <= 1'b0; + if(_zz_223_)begin + if(_zz_230_)begin + execute_LightShifterPlugin_isActive <= 1'b1; + if(execute_LightShifterPlugin_done)begin + execute_LightShifterPlugin_isActive <= 1'b0; + end + end + end + if(execute_arbitration_removeIt)begin + execute_LightShifterPlugin_isActive <= 1'b0; + end + _zz_161_ <= _zz_160_; + if((! decode_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= CsrPlugin_exceptionPortCtrl_exceptionValids_decode; + end + if((! execute_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= (CsrPlugin_exceptionPortCtrl_exceptionValids_decode && (! decode_arbitration_isStuck)); + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= CsrPlugin_exceptionPortCtrl_exceptionValids_execute; + end + if((! memory_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= (CsrPlugin_exceptionPortCtrl_exceptionValids_execute && (! execute_arbitration_isStuck)); + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= CsrPlugin_exceptionPortCtrl_exceptionValids_memory; + end + if((! writeBack_arbitration_isStuck))begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= (CsrPlugin_exceptionPortCtrl_exceptionValids_memory && (! memory_arbitration_isStuck)); + end else begin + CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; + end + CsrPlugin_interrupt_valid <= 1'b0; + if(_zz_248_)begin + if(_zz_249_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_250_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + if(_zz_251_)begin + CsrPlugin_interrupt_valid <= 1'b1; + end + end + CsrPlugin_hadException <= CsrPlugin_exception; + if(_zz_234_)begin + case(CsrPlugin_targetPrivilege) + 2'b11 : begin + CsrPlugin_mstatus_MIE <= 1'b0; + CsrPlugin_mstatus_MPIE <= CsrPlugin_mstatus_MIE; + CsrPlugin_mstatus_MPP <= CsrPlugin_privilege; + end + default : begin + end + endcase + end + if(_zz_235_)begin + case(_zz_236_) + 2'b11 : begin + CsrPlugin_mstatus_MPP <= (2'b00); + CsrPlugin_mstatus_MIE <= CsrPlugin_mstatus_MPIE; + CsrPlugin_mstatus_MPIE <= 1'b1; + end + default : begin + end + endcase + end + execute_CsrPlugin_wfiWake <= ({_zz_188_,{_zz_187_,_zz_186_}} != (3'b000)); + memory_MulDivIterativePlugin_mul_counter_value <= memory_MulDivIterativePlugin_mul_counter_valueNext; + memory_MulDivIterativePlugin_div_counter_value <= memory_MulDivIterativePlugin_div_counter_valueNext; + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_INSTRUCTION <= memory_INSTRUCTION; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_REGFILE_WRITE_DATA <= _zz_35_; + end + if(((! execute_arbitration_isStuck) || execute_arbitration_removeIt))begin + execute_arbitration_isValid <= 1'b0; + end + if(((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)))begin + execute_arbitration_isValid <= decode_arbitration_isValid; + end + if(((! memory_arbitration_isStuck) || memory_arbitration_removeIt))begin + memory_arbitration_isValid <= 1'b0; + end + if(((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)))begin + memory_arbitration_isValid <= execute_arbitration_isValid; + end + if(((! writeBack_arbitration_isStuck) || writeBack_arbitration_removeIt))begin + writeBack_arbitration_isValid <= 1'b0; + end + if(((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)))begin + writeBack_arbitration_isValid <= memory_arbitration_isValid; + end + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + if(execute_CsrPlugin_writeEnable)begin + _zz_200_ <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b001100000000 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mstatus_MPP <= execute_CsrPlugin_writeData[12 : 11]; + CsrPlugin_mstatus_MPIE <= _zz_334_[0]; + CsrPlugin_mstatus_MIE <= _zz_335_[0]; + end + end + 12'b001101000001 : begin + end + 12'b001100000101 : begin + end + 12'b001101000100 : begin + end + 12'b001101000011 : begin + end + 12'b111111000000 : begin + end + 12'b001100000100 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mie_MEIE <= _zz_337_[0]; + CsrPlugin_mie_MTIE <= _zz_338_[0]; + CsrPlugin_mie_MSIE <= _zz_339_[0]; + end + end + 12'b001101000010 : begin + end + default : begin + end + endcase + if(_zz_247_)begin + if(iBusWishbone_ACK)begin + _zz_202_ <= (_zz_202_ + (3'b001)); + end + end + _zz_203_ <= (iBusWishbone_CYC && iBusWishbone_ACK); + if(_zz_252_)begin + dBus_cmd_halfPipe_regs_valid <= dBus_cmd_valid; + dBus_cmd_halfPipe_regs_ready <= (! dBus_cmd_valid); + end else begin + dBus_cmd_halfPipe_regs_valid <= (! dBus_cmd_halfPipe_ready); + dBus_cmd_halfPipe_regs_ready <= dBus_cmd_halfPipe_ready; + end + end + end + + always @ (posedge clk) begin + if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin + _zz_115_ <= IBusCachedPlugin_iBusRsp_stages_1_output_payload; + end + if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin + IBusCachedPlugin_s1_tightlyCoupledHit <= IBusCachedPlugin_s0_tightlyCoupledHit; + end + if(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)begin + IBusCachedPlugin_s2_tightlyCoupledHit <= IBusCachedPlugin_s1_tightlyCoupledHit; + end + if(!(! (((dBus_rsp_ready && memory_MEMORY_ENABLE) && memory_arbitration_isValid) && memory_arbitration_isStuck))) begin + $display("ERROR DBusSimplePlugin doesn't allow memory stage stall when read happend"); + end + if(!(! (((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE) && (! writeBack_MEMORY_STORE)) && writeBack_arbitration_isStuck))) begin + $display("ERROR DBusSimplePlugin doesn't allow writeback stage stall when read happend"); + end + if(_zz_223_)begin + if(_zz_230_)begin + execute_LightShifterPlugin_amplitudeReg <= (execute_LightShifterPlugin_amplitude - (5'b00001)); + end + end + if(_zz_160_)begin + _zz_162_ <= _zz_50_[11 : 7]; + _zz_163_ <= _zz_79_; + end + CsrPlugin_mip_MEIP <= externalInterrupt; + CsrPlugin_mip_MTIP <= timerInterrupt; + CsrPlugin_mip_MSIP <= softwareInterrupt; + CsrPlugin_mcycle <= (CsrPlugin_mcycle + (64'b0000000000000000000000000000000000000000000000000000000000000001)); + if(writeBack_arbitration_isFiring)begin + CsrPlugin_minstret <= (CsrPlugin_minstret + (64'b0000000000000000000000000000000000000000000000000000000000000001)); + end + if(_zz_229_)begin + CsrPlugin_exceptionPortCtrl_exceptionContext_code <= (_zz_190_ ? IBusCachedPlugin_decodeExceptionPort_payload_code : decodeExceptionPort_payload_code); + CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= (_zz_190_ ? IBusCachedPlugin_decodeExceptionPort_payload_badAddr : decodeExceptionPort_payload_badAddr); + end + if(_zz_233_)begin + CsrPlugin_exceptionPortCtrl_exceptionContext_code <= (_zz_192_ ? DBusSimplePlugin_memoryExceptionPort_payload_code : BranchPlugin_branchExceptionPort_payload_code); + CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= (_zz_192_ ? DBusSimplePlugin_memoryExceptionPort_payload_badAddr : BranchPlugin_branchExceptionPort_payload_badAddr); + end + if(_zz_248_)begin + if(_zz_249_)begin + CsrPlugin_interrupt_code <= (4'b0111); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + if(_zz_250_)begin + CsrPlugin_interrupt_code <= (4'b0011); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + if(_zz_251_)begin + CsrPlugin_interrupt_code <= (4'b1011); + CsrPlugin_interrupt_targetPrivilege <= (2'b11); + end + end + if(_zz_234_)begin + case(CsrPlugin_targetPrivilege) + 2'b11 : begin + CsrPlugin_mcause_interrupt <= (! CsrPlugin_hadException); + CsrPlugin_mcause_exceptionCode <= CsrPlugin_trapCause; + CsrPlugin_mepc <= writeBack_PC; + if(CsrPlugin_hadException)begin + CsrPlugin_mtval <= CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; + end + end + default : begin + end + endcase + end + if(_zz_217_)begin + if(_zz_231_)begin + memory_MulDivIterativePlugin_rs2 <= (memory_MulDivIterativePlugin_rs2 >>> 1); + memory_MulDivIterativePlugin_accumulator <= ({_zz_313_,memory_MulDivIterativePlugin_accumulator[31 : 0]} >>> 1); + end + end + if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin + memory_MulDivIterativePlugin_div_done <= 1'b1; + end + if((! memory_arbitration_isStuck))begin + memory_MulDivIterativePlugin_div_done <= 1'b0; + end + if(_zz_218_)begin + if(_zz_232_)begin + memory_MulDivIterativePlugin_rs1[31 : 0] <= _zz_322_[31:0]; + memory_MulDivIterativePlugin_accumulator[31 : 0] <= ((! _zz_195_[32]) ? _zz_323_ : _zz_324_); + if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin + memory_MulDivIterativePlugin_div_result <= _zz_325_[31:0]; + end + end + end + if(_zz_246_)begin + memory_MulDivIterativePlugin_accumulator <= (65'b00000000000000000000000000000000000000000000000000000000000000000); + memory_MulDivIterativePlugin_rs1 <= ((_zz_198_ ? (~ _zz_199_) : _zz_199_) + _zz_331_); + memory_MulDivIterativePlugin_rs2 <= ((_zz_197_ ? (~ execute_RS2) : execute_RS2) + _zz_333_); + memory_MulDivIterativePlugin_div_needRevert <= ((_zz_198_ ^ (_zz_197_ && (! execute_INSTRUCTION[13]))) && (! (((execute_RS2 == (32'b00000000000000000000000000000000)) && execute_IS_RS2_SIGNED) && (! execute_INSTRUCTION[13])))); + end + externalInterruptArray_regNext <= externalInterruptArray; + if((! execute_arbitration_isStuck))begin + decode_to_execute_INSTRUCTION <= decode_INSTRUCTION; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_INSTRUCTION <= execute_INSTRUCTION; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_ALIGNEMENT_FAULT <= execute_ALIGNEMENT_FAULT; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_READ_DATA <= memory_MEMORY_READ_DATA; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SHIFT_CTRL <= _zz_23_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_CSR <= decode_IS_CSR; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_PC <= decode_PC; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_PC <= _zz_41_; + end + if(((! writeBack_arbitration_isStuck) && (! CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack)))begin + memory_to_writeBack_PC <= memory_PC; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_PREDICTION_HAD_BRANCHED2 <= decode_PREDICTION_HAD_BRANCHED2; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_MEMORY_STORE <= decode_MEMORY_STORE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MEMORY_STORE <= execute_MEMORY_STORE; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_STORE <= memory_MEMORY_STORE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_FORMAL_PC_NEXT <= _zz_97_; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_FORMAL_PC_NEXT <= execute_FORMAL_PC_NEXT; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_FORMAL_PC_NEXT <= _zz_96_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_ENV_CTRL <= _zz_20_; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_ENV_CTRL <= _zz_17_; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_ENV_CTRL <= _zz_15_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_REGFILE_WRITE_VALID <= decode_REGFILE_WRITE_VALID; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_REGFILE_WRITE_VALID <= execute_REGFILE_WRITE_VALID; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_REGFILE_WRITE_VALID <= memory_REGFILE_WRITE_VALID; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC_LESS_UNSIGNED <= decode_SRC_LESS_UNSIGNED; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_BRANCH_DO <= execute_BRANCH_DO; + end + if(((! memory_arbitration_isStuck) && (! execute_arbitration_isStuckByOthers)))begin + execute_to_memory_REGFILE_WRITE_DATA <= _zz_36_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_CSR_WRITE_OPCODE <= decode_CSR_WRITE_OPCODE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_RS1 <= decode_RS1; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC2_FORCE_ZERO <= decode_SRC2_FORCE_ZERO; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_BYPASSABLE_MEMORY_STAGE <= decode_BYPASSABLE_MEMORY_STAGE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_BYPASSABLE_MEMORY_STAGE <= execute_BYPASSABLE_MEMORY_STAGE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC1_CTRL <= _zz_13_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_BRANCH_CTRL <= _zz_10_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_MEMORY_ENABLE <= decode_MEMORY_ENABLE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MEMORY_ENABLE <= execute_MEMORY_ENABLE; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_ENABLE <= memory_MEMORY_ENABLE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC_USE_SUB_LESS <= decode_SRC_USE_SUB_LESS; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MMU_FAULT <= execute_MMU_FAULT; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_BRANCH_CALC <= execute_BRANCH_CALC; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_RS2 <= decode_RS2; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_MUL <= decode_IS_MUL; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_IS_MUL <= execute_IS_MUL; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MEMORY_ADDRESS_LOW <= execute_MEMORY_ADDRESS_LOW; + end + if((! writeBack_arbitration_isStuck))begin + memory_to_writeBack_MEMORY_ADDRESS_LOW <= memory_MEMORY_ADDRESS_LOW; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_DIV <= decode_IS_DIV; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_IS_DIV <= execute_IS_DIV; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_CSR_READ_OPCODE <= decode_CSR_READ_OPCODE; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_RS1_SIGNED <= decode_IS_RS1_SIGNED; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_BYPASSABLE_EXECUTE_STAGE <= decode_BYPASSABLE_EXECUTE_STAGE; + end + if((! memory_arbitration_isStuck))begin + execute_to_memory_MMU_RSP_physicalAddress <= execute_MMU_RSP_physicalAddress; + execute_to_memory_MMU_RSP_isIoAccess <= execute_MMU_RSP_isIoAccess; + execute_to_memory_MMU_RSP_allowRead <= execute_MMU_RSP_allowRead; + execute_to_memory_MMU_RSP_allowWrite <= execute_MMU_RSP_allowWrite; + execute_to_memory_MMU_RSP_allowExecute <= execute_MMU_RSP_allowExecute; + execute_to_memory_MMU_RSP_exception <= execute_MMU_RSP_exception; + execute_to_memory_MMU_RSP_refilling <= execute_MMU_RSP_refilling; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_IS_RS2_SIGNED <= decode_IS_RS2_SIGNED; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_SRC2_CTRL <= _zz_8_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_ALU_BITWISE_CTRL <= _zz_5_; + end + if((! execute_arbitration_isStuck))begin + decode_to_execute_ALU_CTRL <= _zz_2_; + end + case(execute_CsrPlugin_csrAddress) + 12'b101111000000 : begin + end + 12'b001100000000 : begin + end + 12'b001101000001 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mepc <= execute_CsrPlugin_writeData[31 : 0]; + end + end + 12'b001100000101 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mtvec_base <= execute_CsrPlugin_writeData[31 : 2]; + CsrPlugin_mtvec_mode <= execute_CsrPlugin_writeData[1 : 0]; + end + end + 12'b001101000100 : begin + if(execute_CsrPlugin_writeEnable)begin + CsrPlugin_mip_MSIP <= _zz_336_[0]; + end + end + 12'b001101000011 : begin + end + 12'b111111000000 : begin + end + 12'b001100000100 : begin + end + 12'b001101000010 : begin + end + default : begin + end + endcase + iBusWishbone_DAT_MISO_regNext <= iBusWishbone_DAT_MISO; + if(_zz_252_)begin + dBus_cmd_halfPipe_regs_payload_wr <= dBus_cmd_payload_wr; + dBus_cmd_halfPipe_regs_payload_address <= dBus_cmd_payload_address; + dBus_cmd_halfPipe_regs_payload_data <= dBus_cmd_payload_data; + dBus_cmd_halfPipe_regs_payload_size <= dBus_cmd_payload_size; + end + end + +endmodule + diff --git a/third_party/minilitex_ddr_arty/LICENSE b/third_party/minilitex_ddr_arty/LICENSE new file mode 100644 index 000000000..46276032e --- /dev/null +++ b/third_party/minilitex_ddr_arty/LICENSE @@ -0,0 +1,34 @@ +LiteX is a Migen/MiSoC based Core/SoC builder that provides the infrastructure to +easily create Cores/SoCs. + +Unless otherwise noted, LiteX is copyright (C) 2012-2020 Enjoy-Digital. +Unless otherwise noted, MiSoC is copyright (C) 2012-2015 Enjoy-Digital. +Unless otherwise noted, MiSoC is copyright (C) 2007-2015 M-Labs Ltd. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Other authors retain ownership of their contributions. If a submission can +reasonably be considered independently copyrightable, it's yours and we +encourage you to claim it with appropriate copyright notices. This submission +then falls under the "otherwise noted" category. All submissions are strongly +encouraged to use the two-clause BSD license reproduced above. diff --git a/third_party/minilitex_ddr_arty/README.yosys-symbiflow-plugins b/third_party/minilitex_ddr_arty/README.yosys-symbiflow-plugins new file mode 100644 index 000000000..0bc2bf14e --- /dev/null +++ b/third_party/minilitex_ddr_arty/README.yosys-symbiflow-plugins @@ -0,0 +1,12 @@ +Name: LiteX is a Migen/MiSoC based Core/SoC builder that provides the infrastructure to easily create Cores/SoCs (with or without CPU). +Short Name: litex +URL: https://github.com/enjoy-digital/litex +Version: 0 +Revision: 9b11e919 +License: BSD-2-Clause + +Description: +This package is used as stimuli in some test cases that verify that the Yosys plugins produce expected results. + +Local Modifications: +Adjustments for testing purposes to the generated netlist. diff --git a/third_party/minilitex_ddr_arty/minilitex_ddr_arty.v b/third_party/minilitex_ddr_arty/minilitex_ddr_arty.v new file mode 100644 index 000000000..a207088c5 --- /dev/null +++ b/third_party/minilitex_ddr_arty/minilitex_ddr_arty.v @@ -0,0 +1,12721 @@ +//-------------------------------------------------------------------------------- +// Auto-generated by Migen (--------) & LiteX (9b11e919) on 2020-02-25 16:47:33 +//-------------------------------------------------------------------------------- +module top ( + output reg serial_tx, + input serial_rx, + (* dont_touch = "true" *) input clk100, + input cpu_reset, + output [13:0] ddram_a, + output [2:0] ddram_ba, + output ddram_ras_n, + output ddram_cas_n, + output ddram_we_n, + output ddram_cs_n, + output [1:0] ddram_dm, + inout [15:0] ddram_dq, + output [1:0] ddram_dqs_p, + output [1:0] ddram_dqs_n, + output ddram_clk_p, + output ddram_clk_n, + output ddram_cke, + output ddram_odt, + output ddram_reset_n, + output [3:0] led +); + + wire [3:0] led; + + assign led[0] = main_locked; + assign led[1] = idelayctl_rdy; + assign led[2] = 0; + assign led[3] = 0; + + // Manually inserted OBUFs + wire [13:0] ddram_a_iob; + wire [ 2:0] ddram_ba_iob; + wire ddram_ras_n_iob; + wire ddram_cas_n_iob; + wire ddram_we_n_iob; + wire ddram_cs_n_iob; + wire [ 1:0] ddram_dm_iob; + wire ddram_cke_iob; + wire ddram_odt_iob; + wire ddram_reset_n_iob; + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a0 ( + .I(ddram_a_iob[0]), + .O(ddram_a[0]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a1 ( + .I(ddram_a_iob[1]), + .O(ddram_a[1]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a2 ( + .I(ddram_a_iob[2]), + .O(ddram_a[2]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a3 ( + .I(ddram_a_iob[3]), + .O(ddram_a[3]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a4 ( + .I(ddram_a_iob[4]), + .O(ddram_a[4]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a5 ( + .I(ddram_a_iob[5]), + .O(ddram_a[5]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a6 ( + .I(ddram_a_iob[6]), + .O(ddram_a[6]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a7 ( + .I(ddram_a_iob[7]), + .O(ddram_a[7]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a8 ( + .I(ddram_a_iob[8]), + .O(ddram_a[8]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a9 ( + .I(ddram_a_iob[9]), + .O(ddram_a[9]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a10 ( + .I(ddram_a_iob[10]), + .O(ddram_a[10]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a11 ( + .I(ddram_a_iob[11]), + .O(ddram_a[11]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a12 ( + .I(ddram_a_iob[12]), + .O(ddram_a[12]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_a13 ( + .I(ddram_a_iob[13]), + .O(ddram_a[13]) + ); + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_ba0 ( + .I(ddram_ba_iob[0]), + .O(ddram_ba[0]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_ba1 ( + .I(ddram_ba_iob[1]), + .O(ddram_ba[1]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_ba2 ( + .I(ddram_ba_iob[2]), + .O(ddram_ba[2]) + ); + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_dm0 ( + .I(ddram_dm_iob[0]), + .O(ddram_dm[0]) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_dm1 ( + .I(ddram_dm_iob[1]), + .O(ddram_dm[1]) + ); + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_ras ( + .I(ddram_ras_n_iob), + .O(ddram_ras_n) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_cas ( + .I(ddram_cas_n_iob), + .O(ddram_cas_n) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_we ( + .I(ddram_we_n_iob), + .O(ddram_we_n) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_cs ( + .I(ddram_cs_n_iob), + .O(ddram_cs_n) + ); + + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_cke ( + .I(ddram_cke_iob), + .O(ddram_cke) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_odt ( + .I(ddram_odt_iob), + .O(ddram_odt) + ); + OBUF #( + .IOSTANDARD("SSTL135"), + .SLEW("FAST") + ) obuf_rst ( + .I(ddram_reset_n_iob), + .O(ddram_reset_n) + ); + + // End manually inserted OBUFs + + wire idelayctl_rdy; + reg main_minsoc_ctrl_reset_storage = 1'd0; + reg main_minsoc_ctrl_reset_re = 1'd0; + reg [31:0] main_minsoc_ctrl_scratch_storage = 32'd305419896; + reg main_minsoc_ctrl_scratch_re = 1'd0; + wire [31:0] main_minsoc_ctrl_bus_errors_status; + wire main_minsoc_ctrl_bus_errors_we; + wire main_minsoc_ctrl_reset; + wire main_minsoc_ctrl_bus_error; + reg [31:0] main_minsoc_ctrl_bus_errors = 32'd0; + wire main_minsoc_cpu_reset; + wire [29:0] main_minsoc_cpu_ibus_adr; + wire [31:0] main_minsoc_cpu_ibus_dat_w; + wire [31:0] main_minsoc_cpu_ibus_dat_r; + wire [3:0] main_minsoc_cpu_ibus_sel; + wire main_minsoc_cpu_ibus_cyc; + wire main_minsoc_cpu_ibus_stb; + wire main_minsoc_cpu_ibus_ack; + wire main_minsoc_cpu_ibus_we; + wire [2:0] main_minsoc_cpu_ibus_cti; + wire [1:0] main_minsoc_cpu_ibus_bte; + wire main_minsoc_cpu_ibus_err; + wire [29:0] main_minsoc_cpu_dbus_adr; + wire [31:0] main_minsoc_cpu_dbus_dat_w; + wire [31:0] main_minsoc_cpu_dbus_dat_r; + wire [3:0] main_minsoc_cpu_dbus_sel; + wire main_minsoc_cpu_dbus_cyc; + wire main_minsoc_cpu_dbus_stb; + wire main_minsoc_cpu_dbus_ack; + wire main_minsoc_cpu_dbus_we; + wire [2:0] main_minsoc_cpu_dbus_cti; + wire [1:0] main_minsoc_cpu_dbus_bte; + wire main_minsoc_cpu_dbus_err; + reg [31:0] main_minsoc_cpu_interrupt = 32'd0; + reg [31:0] main_minsoc_vexriscv = 32'd0; + wire [29:0] main_minsoc_interface0_soc_bus_adr; + wire [31:0] main_minsoc_interface0_soc_bus_dat_w; + wire [31:0] main_minsoc_interface0_soc_bus_dat_r; + wire [3:0] main_minsoc_interface0_soc_bus_sel; + wire main_minsoc_interface0_soc_bus_cyc; + wire main_minsoc_interface0_soc_bus_stb; + wire main_minsoc_interface0_soc_bus_ack; + wire main_minsoc_interface0_soc_bus_we; + wire [2:0] main_minsoc_interface0_soc_bus_cti; + wire [1:0] main_minsoc_interface0_soc_bus_bte; + wire main_minsoc_interface0_soc_bus_err; + wire [29:0] main_minsoc_interface1_soc_bus_adr; + wire [31:0] main_minsoc_interface1_soc_bus_dat_w; + wire [31:0] main_minsoc_interface1_soc_bus_dat_r; + wire [3:0] main_minsoc_interface1_soc_bus_sel; + wire main_minsoc_interface1_soc_bus_cyc; + wire main_minsoc_interface1_soc_bus_stb; + wire main_minsoc_interface1_soc_bus_ack; + wire main_minsoc_interface1_soc_bus_we; + wire [2:0] main_minsoc_interface1_soc_bus_cti; + wire [1:0] main_minsoc_interface1_soc_bus_bte; + wire main_minsoc_interface1_soc_bus_err; + wire [29:0] main_minsoc_rom_bus_adr; + wire [31:0] main_minsoc_rom_bus_dat_w; + wire [31:0] main_minsoc_rom_bus_dat_r; + wire [3:0] main_minsoc_rom_bus_sel; + wire main_minsoc_rom_bus_cyc; + wire main_minsoc_rom_bus_stb; + reg main_minsoc_rom_bus_ack = 1'd0; + wire main_minsoc_rom_bus_we; + wire [2:0] main_minsoc_rom_bus_cti; + wire [1:0] main_minsoc_rom_bus_bte; + reg main_minsoc_rom_bus_err = 1'd0; + wire [12:0] main_minsoc_rom_adr; + wire [31:0] main_minsoc_rom_dat_r; + wire [29:0] main_minsoc_sram_bus_adr; + wire [31:0] main_minsoc_sram_bus_dat_w; + wire [31:0] main_minsoc_sram_bus_dat_r; + wire [3:0] main_minsoc_sram_bus_sel; + wire main_minsoc_sram_bus_cyc; + wire main_minsoc_sram_bus_stb; + reg main_minsoc_sram_bus_ack = 1'd0; + wire main_minsoc_sram_bus_we; + wire [2:0] main_minsoc_sram_bus_cti; + wire [1:0] main_minsoc_sram_bus_bte; + reg main_minsoc_sram_bus_err = 1'd0; + wire [9:0] main_minsoc_sram_adr; + wire [31:0] main_minsoc_sram_dat_r; + reg [3:0] main_minsoc_sram_we = 4'd0; + wire [31:0] main_minsoc_sram_dat_w; + reg [31:0] main_minsoc_storage = 32'd8246337; + reg main_minsoc_re = 1'd0; + wire main_minsoc_sink_valid; + reg main_minsoc_sink_ready = 1'd0; + wire main_minsoc_sink_first; + wire main_minsoc_sink_last; + wire [7:0] main_minsoc_sink_payload_data; + reg main_minsoc_uart_clk_txen = 1'd0; + reg [31:0] main_minsoc_phase_accumulator_tx = 32'd0; + reg [7:0] main_minsoc_tx_reg = 8'd0; + reg [3:0] main_minsoc_tx_bitcount = 4'd0; + reg main_minsoc_tx_busy = 1'd0; + reg main_minsoc_source_valid = 1'd0; + wire main_minsoc_source_ready; + reg main_minsoc_source_first = 1'd0; + reg main_minsoc_source_last = 1'd0; + reg [7:0] main_minsoc_source_payload_data = 8'd0; + reg main_minsoc_uart_clk_rxen = 1'd0; + reg [31:0] main_minsoc_phase_accumulator_rx = 32'd0; + wire main_minsoc_rx; + reg main_minsoc_rx_r = 1'd0; + reg [7:0] main_minsoc_rx_reg = 8'd0; + reg [3:0] main_minsoc_rx_bitcount = 4'd0; + reg main_minsoc_rx_busy = 1'd0; + wire main_minsoc_uart_rxtx_re; + wire [7:0] main_minsoc_uart_rxtx_r; + wire main_minsoc_uart_rxtx_we; + wire [7:0] main_minsoc_uart_rxtx_w; + wire main_minsoc_uart_txfull_status; + wire main_minsoc_uart_txfull_we; + wire main_minsoc_uart_rxempty_status; + wire main_minsoc_uart_rxempty_we; + wire main_minsoc_uart_irq; + wire main_minsoc_uart_tx_status; + reg main_minsoc_uart_tx_pending = 1'd0; + wire main_minsoc_uart_tx_trigger; + reg main_minsoc_uart_tx_clear = 1'd0; + reg main_minsoc_uart_tx_old_trigger = 1'd0; + wire main_minsoc_uart_rx_status; + reg main_minsoc_uart_rx_pending = 1'd0; + wire main_minsoc_uart_rx_trigger; + reg main_minsoc_uart_rx_clear = 1'd0; + reg main_minsoc_uart_rx_old_trigger = 1'd0; + wire main_minsoc_uart_eventmanager_status_re; + wire [1:0] main_minsoc_uart_eventmanager_status_r; + wire main_minsoc_uart_eventmanager_status_we; + reg [1:0] main_minsoc_uart_eventmanager_status_w = 2'd0; + wire main_minsoc_uart_eventmanager_pending_re; + wire [1:0] main_minsoc_uart_eventmanager_pending_r; + wire main_minsoc_uart_eventmanager_pending_we; + reg [1:0] main_minsoc_uart_eventmanager_pending_w = 2'd0; + reg [1:0] main_minsoc_uart_eventmanager_storage = 2'd0; + reg main_minsoc_uart_eventmanager_re = 1'd0; + wire main_minsoc_uart_uart_sink_valid; + wire main_minsoc_uart_uart_sink_ready; + wire main_minsoc_uart_uart_sink_first; + wire main_minsoc_uart_uart_sink_last; + wire [7:0] main_minsoc_uart_uart_sink_payload_data; + wire main_minsoc_uart_uart_source_valid; + wire main_minsoc_uart_uart_source_ready; + wire main_minsoc_uart_uart_source_first; + wire main_minsoc_uart_uart_source_last; + wire [7:0] main_minsoc_uart_uart_source_payload_data; + wire main_minsoc_uart_tx_fifo_sink_valid; + wire main_minsoc_uart_tx_fifo_sink_ready; + reg main_minsoc_uart_tx_fifo_sink_first = 1'd0; + reg main_minsoc_uart_tx_fifo_sink_last = 1'd0; + wire [7:0] main_minsoc_uart_tx_fifo_sink_payload_data; + wire main_minsoc_uart_tx_fifo_source_valid; + wire main_minsoc_uart_tx_fifo_source_ready; + wire main_minsoc_uart_tx_fifo_source_first; + wire main_minsoc_uart_tx_fifo_source_last; + wire [7:0] main_minsoc_uart_tx_fifo_source_payload_data; + wire main_minsoc_uart_tx_fifo_re; + reg main_minsoc_uart_tx_fifo_readable = 1'd0; + wire main_minsoc_uart_tx_fifo_syncfifo_we; + wire main_minsoc_uart_tx_fifo_syncfifo_writable; + wire main_minsoc_uart_tx_fifo_syncfifo_re; + wire main_minsoc_uart_tx_fifo_syncfifo_readable; + wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_din; + wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_dout; + reg [4:0] main_minsoc_uart_tx_fifo_level0 = 5'd0; + reg main_minsoc_uart_tx_fifo_replace = 1'd0; + reg [3:0] main_minsoc_uart_tx_fifo_produce = 4'd0; + reg [3:0] main_minsoc_uart_tx_fifo_consume = 4'd0; + reg [3:0] main_minsoc_uart_tx_fifo_wrport_adr = 4'd0; + wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_r; + wire main_minsoc_uart_tx_fifo_wrport_we; + wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_w; + wire main_minsoc_uart_tx_fifo_do_read; + wire [3:0] main_minsoc_uart_tx_fifo_rdport_adr; + wire [9:0] main_minsoc_uart_tx_fifo_rdport_dat_r; + wire main_minsoc_uart_tx_fifo_rdport_re; + wire [4:0] main_minsoc_uart_tx_fifo_level1; + wire [7:0] main_minsoc_uart_tx_fifo_fifo_in_payload_data; + wire main_minsoc_uart_tx_fifo_fifo_in_first; + wire main_minsoc_uart_tx_fifo_fifo_in_last; + wire [7:0] main_minsoc_uart_tx_fifo_fifo_out_payload_data; + wire main_minsoc_uart_tx_fifo_fifo_out_first; + wire main_minsoc_uart_tx_fifo_fifo_out_last; + wire main_minsoc_uart_rx_fifo_sink_valid; + wire main_minsoc_uart_rx_fifo_sink_ready; + wire main_minsoc_uart_rx_fifo_sink_first; + wire main_minsoc_uart_rx_fifo_sink_last; + wire [7:0] main_minsoc_uart_rx_fifo_sink_payload_data; + wire main_minsoc_uart_rx_fifo_source_valid; + wire main_minsoc_uart_rx_fifo_source_ready; + wire main_minsoc_uart_rx_fifo_source_first; + wire main_minsoc_uart_rx_fifo_source_last; + wire [7:0] main_minsoc_uart_rx_fifo_source_payload_data; + wire main_minsoc_uart_rx_fifo_re; + reg main_minsoc_uart_rx_fifo_readable = 1'd0; + wire main_minsoc_uart_rx_fifo_syncfifo_we; + wire main_minsoc_uart_rx_fifo_syncfifo_writable; + wire main_minsoc_uart_rx_fifo_syncfifo_re; + wire main_minsoc_uart_rx_fifo_syncfifo_readable; + wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_din; + wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_dout; + reg [4:0] main_minsoc_uart_rx_fifo_level0 = 5'd0; + reg main_minsoc_uart_rx_fifo_replace = 1'd0; + reg [3:0] main_minsoc_uart_rx_fifo_produce = 4'd0; + reg [3:0] main_minsoc_uart_rx_fifo_consume = 4'd0; + reg [3:0] main_minsoc_uart_rx_fifo_wrport_adr = 4'd0; + wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_r; + wire main_minsoc_uart_rx_fifo_wrport_we; + wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_w; + wire main_minsoc_uart_rx_fifo_do_read; + wire [3:0] main_minsoc_uart_rx_fifo_rdport_adr; + wire [9:0] main_minsoc_uart_rx_fifo_rdport_dat_r; + wire main_minsoc_uart_rx_fifo_rdport_re; + wire [4:0] main_minsoc_uart_rx_fifo_level1; + wire [7:0] main_minsoc_uart_rx_fifo_fifo_in_payload_data; + wire main_minsoc_uart_rx_fifo_fifo_in_first; + wire main_minsoc_uart_rx_fifo_fifo_in_last; + wire [7:0] main_minsoc_uart_rx_fifo_fifo_out_payload_data; + wire main_minsoc_uart_rx_fifo_fifo_out_first; + wire main_minsoc_uart_rx_fifo_fifo_out_last; + reg main_minsoc_uart_reset = 1'd0; + reg [31:0] main_minsoc_timer0_load_storage = 32'd0; + reg main_minsoc_timer0_load_re = 1'd0; + reg [31:0] main_minsoc_timer0_reload_storage = 32'd0; + reg main_minsoc_timer0_reload_re = 1'd0; + reg main_minsoc_timer0_en_storage = 1'd0; + reg main_minsoc_timer0_en_re = 1'd0; + reg main_minsoc_timer0_update_value_storage = 1'd0; + reg main_minsoc_timer0_update_value_re = 1'd0; + reg [31:0] main_minsoc_timer0_value_status = 32'd0; + wire main_minsoc_timer0_value_we; + wire main_minsoc_timer0_irq; + wire main_minsoc_timer0_zero_status; + reg main_minsoc_timer0_zero_pending = 1'd0; + wire main_minsoc_timer0_zero_trigger; + reg main_minsoc_timer0_zero_clear = 1'd0; + reg main_minsoc_timer0_zero_old_trigger = 1'd0; + wire main_minsoc_timer0_eventmanager_status_re; + wire main_minsoc_timer0_eventmanager_status_r; + wire main_minsoc_timer0_eventmanager_status_we; + wire main_minsoc_timer0_eventmanager_status_w; + wire main_minsoc_timer0_eventmanager_pending_re; + wire main_minsoc_timer0_eventmanager_pending_r; + wire main_minsoc_timer0_eventmanager_pending_we; + wire main_minsoc_timer0_eventmanager_pending_w; + reg main_minsoc_timer0_eventmanager_storage = 1'd0; + reg main_minsoc_timer0_eventmanager_re = 1'd0; + reg [31:0] main_minsoc_timer0_value = 32'd0; + reg [13:0] main_minsoc_interface_adr = 14'd0; + reg main_minsoc_interface_we = 1'd0; + wire [7:0] main_minsoc_interface_dat_w; + wire [7:0] main_minsoc_interface_dat_r; + wire [29:0] main_minsoc_bus_wishbone_adr; + wire [31:0] main_minsoc_bus_wishbone_dat_w; + wire [31:0] main_minsoc_bus_wishbone_dat_r; + wire [3:0] main_minsoc_bus_wishbone_sel; + wire main_minsoc_bus_wishbone_cyc; + wire main_minsoc_bus_wishbone_stb; + reg main_minsoc_bus_wishbone_ack = 1'd0; + wire main_minsoc_bus_wishbone_we; + wire [2:0] main_minsoc_bus_wishbone_cti; + wire [1:0] main_minsoc_bus_wishbone_bte; + reg main_minsoc_bus_wishbone_err = 1'd0; + wire [29:0] main_interface0_wb_sdram_adr; + wire [31:0] main_interface0_wb_sdram_dat_w; + reg [31:0] main_interface0_wb_sdram_dat_r = 32'd0; + wire [3:0] main_interface0_wb_sdram_sel; + wire main_interface0_wb_sdram_cyc; + wire main_interface0_wb_sdram_stb; + reg main_interface0_wb_sdram_ack = 1'd0; + wire main_interface0_wb_sdram_we; + wire [2:0] main_interface0_wb_sdram_cti; + wire [1:0] main_interface0_wb_sdram_bte; + reg main_interface0_wb_sdram_err = 1'd0; + wire sys_clk; + wire sys_rst; + wire sys4x_clk; + wire sys4x_dqs_clk; + wire clk200_clk; + wire clk200_rst; + wire main_pll_clkin; + wire main_reset; + wire main_locked; + wire main_clkout0; + wire main_clkout1; + wire main_clkout2; + wire main_clkout3; + reg [3:0] main_reset_counter = 4'd15; + reg main_ic_reset = 1'd1; + reg [4:0] main_a7ddrphy_half_sys8x_taps_storage = 5'd13; + reg main_a7ddrphy_half_sys8x_taps_re = 1'd0; + wire main_a7ddrphy_cdly_rst_re; + wire main_a7ddrphy_cdly_rst_r; + wire main_a7ddrphy_cdly_rst_we; + reg main_a7ddrphy_cdly_rst_w = 1'd0; + wire main_a7ddrphy_cdly_inc_re; + wire main_a7ddrphy_cdly_inc_r; + wire main_a7ddrphy_cdly_inc_we; + reg main_a7ddrphy_cdly_inc_w = 1'd0; + reg [1:0] main_a7ddrphy_dly_sel_storage = 2'd0; + reg main_a7ddrphy_dly_sel_re = 1'd0; + wire main_a7ddrphy_rdly_dq_rst_re; + wire main_a7ddrphy_rdly_dq_rst_r; + wire main_a7ddrphy_rdly_dq_rst_we; + reg main_a7ddrphy_rdly_dq_rst_w = 1'd0; + wire main_a7ddrphy_rdly_dq_inc_re; + wire main_a7ddrphy_rdly_dq_inc_r; + wire main_a7ddrphy_rdly_dq_inc_we; + reg main_a7ddrphy_rdly_dq_inc_w = 1'd0; + wire main_a7ddrphy_rdly_dq_bitslip_rst_re; + wire main_a7ddrphy_rdly_dq_bitslip_rst_r; + wire main_a7ddrphy_rdly_dq_bitslip_rst_we; + reg main_a7ddrphy_rdly_dq_bitslip_rst_w = 1'd0; + wire main_a7ddrphy_rdly_dq_bitslip_re; + wire main_a7ddrphy_rdly_dq_bitslip_r; + wire main_a7ddrphy_rdly_dq_bitslip_we; + reg main_a7ddrphy_rdly_dq_bitslip_w = 1'd0; + wire [13:0] main_a7ddrphy_dfi_p0_address; + wire [2:0] main_a7ddrphy_dfi_p0_bank; + wire main_a7ddrphy_dfi_p0_cas_n; + wire main_a7ddrphy_dfi_p0_cs_n; + wire main_a7ddrphy_dfi_p0_ras_n; + wire main_a7ddrphy_dfi_p0_we_n; + wire main_a7ddrphy_dfi_p0_cke; + wire main_a7ddrphy_dfi_p0_odt; + wire main_a7ddrphy_dfi_p0_reset_n; + wire main_a7ddrphy_dfi_p0_act_n; + wire [31:0] main_a7ddrphy_dfi_p0_wrdata; + wire main_a7ddrphy_dfi_p0_wrdata_en; + wire [3:0] main_a7ddrphy_dfi_p0_wrdata_mask; + wire main_a7ddrphy_dfi_p0_rddata_en; + reg [31:0] main_a7ddrphy_dfi_p0_rddata = 32'd0; + reg main_a7ddrphy_dfi_p0_rddata_valid = 1'd0; + wire [13:0] main_a7ddrphy_dfi_p1_address; + wire [2:0] main_a7ddrphy_dfi_p1_bank; + wire main_a7ddrphy_dfi_p1_cas_n; + wire main_a7ddrphy_dfi_p1_cs_n; + wire main_a7ddrphy_dfi_p1_ras_n; + wire main_a7ddrphy_dfi_p1_we_n; + wire main_a7ddrphy_dfi_p1_cke; + wire main_a7ddrphy_dfi_p1_odt; + wire main_a7ddrphy_dfi_p1_reset_n; + wire main_a7ddrphy_dfi_p1_act_n; + wire [31:0] main_a7ddrphy_dfi_p1_wrdata; + wire main_a7ddrphy_dfi_p1_wrdata_en; + wire [3:0] main_a7ddrphy_dfi_p1_wrdata_mask; + wire main_a7ddrphy_dfi_p1_rddata_en; + reg [31:0] main_a7ddrphy_dfi_p1_rddata = 32'd0; + reg main_a7ddrphy_dfi_p1_rddata_valid = 1'd0; + wire [13:0] main_a7ddrphy_dfi_p2_address; + wire [2:0] main_a7ddrphy_dfi_p2_bank; + wire main_a7ddrphy_dfi_p2_cas_n; + wire main_a7ddrphy_dfi_p2_cs_n; + wire main_a7ddrphy_dfi_p2_ras_n; + wire main_a7ddrphy_dfi_p2_we_n; + wire main_a7ddrphy_dfi_p2_cke; + wire main_a7ddrphy_dfi_p2_odt; + wire main_a7ddrphy_dfi_p2_reset_n; + wire main_a7ddrphy_dfi_p2_act_n; + wire [31:0] main_a7ddrphy_dfi_p2_wrdata; + wire main_a7ddrphy_dfi_p2_wrdata_en; + wire [3:0] main_a7ddrphy_dfi_p2_wrdata_mask; + wire main_a7ddrphy_dfi_p2_rddata_en; + reg [31:0] main_a7ddrphy_dfi_p2_rddata = 32'd0; + reg main_a7ddrphy_dfi_p2_rddata_valid = 1'd0; + wire [13:0] main_a7ddrphy_dfi_p3_address; + wire [2:0] main_a7ddrphy_dfi_p3_bank; + wire main_a7ddrphy_dfi_p3_cas_n; + wire main_a7ddrphy_dfi_p3_cs_n; + wire main_a7ddrphy_dfi_p3_ras_n; + wire main_a7ddrphy_dfi_p3_we_n; + wire main_a7ddrphy_dfi_p3_cke; + wire main_a7ddrphy_dfi_p3_odt; + wire main_a7ddrphy_dfi_p3_reset_n; + wire main_a7ddrphy_dfi_p3_act_n; + wire [31:0] main_a7ddrphy_dfi_p3_wrdata; + wire main_a7ddrphy_dfi_p3_wrdata_en; + wire [3:0] main_a7ddrphy_dfi_p3_wrdata_mask; + wire main_a7ddrphy_dfi_p3_rddata_en; + reg [31:0] main_a7ddrphy_dfi_p3_rddata = 32'd0; + reg main_a7ddrphy_dfi_p3_rddata_valid = 1'd0; + wire main_a7ddrphy_sd_clk_se_nodelay; + reg main_a7ddrphy_oe_dqs = 1'd0; + wire main_a7ddrphy_dqs_preamble; + wire main_a7ddrphy_dqs_postamble; + reg [7:0] main_a7ddrphy_dqs_serdes_pattern = 8'd85; + wire main_a7ddrphy_dqs_nodelay0; + wire main_a7ddrphy_dqs_t0; + wire main_a7ddrphy0; + wire main_a7ddrphy_dqs_nodelay1; + wire main_a7ddrphy_dqs_t1; + wire main_a7ddrphy1; + reg main_a7ddrphy_oe_dq = 1'd0; + wire main_a7ddrphy_dq_o_nodelay0; + wire main_a7ddrphy_dq_i_nodelay0; + wire main_a7ddrphy_dq_i_delayed0; + wire main_a7ddrphy_dq_t0; + wire [7:0] main_a7ddrphy_dq_i_data0; + wire [7:0] main_a7ddrphy_bitslip0_i; + reg [7:0] main_a7ddrphy_bitslip0_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip0_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip0_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay1; + wire main_a7ddrphy_dq_i_nodelay1; + wire main_a7ddrphy_dq_i_delayed1; + wire main_a7ddrphy_dq_t1; + wire [7:0] main_a7ddrphy_dq_i_data1; + wire [7:0] main_a7ddrphy_bitslip1_i; + reg [7:0] main_a7ddrphy_bitslip1_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip1_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip1_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay2; + wire main_a7ddrphy_dq_i_nodelay2; + wire main_a7ddrphy_dq_i_delayed2; + wire main_a7ddrphy_dq_t2; + wire [7:0] main_a7ddrphy_dq_i_data2; + wire [7:0] main_a7ddrphy_bitslip2_i; + reg [7:0] main_a7ddrphy_bitslip2_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip2_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip2_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay3; + wire main_a7ddrphy_dq_i_nodelay3; + wire main_a7ddrphy_dq_i_delayed3; + wire main_a7ddrphy_dq_t3; + wire [7:0] main_a7ddrphy_dq_i_data3; + wire [7:0] main_a7ddrphy_bitslip3_i; + reg [7:0] main_a7ddrphy_bitslip3_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip3_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip3_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay4; + wire main_a7ddrphy_dq_i_nodelay4; + wire main_a7ddrphy_dq_i_delayed4; + wire main_a7ddrphy_dq_t4; + wire [7:0] main_a7ddrphy_dq_i_data4; + wire [7:0] main_a7ddrphy_bitslip4_i; + reg [7:0] main_a7ddrphy_bitslip4_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip4_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip4_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay5; + wire main_a7ddrphy_dq_i_nodelay5; + wire main_a7ddrphy_dq_i_delayed5; + wire main_a7ddrphy_dq_t5; + wire [7:0] main_a7ddrphy_dq_i_data5; + wire [7:0] main_a7ddrphy_bitslip5_i; + reg [7:0] main_a7ddrphy_bitslip5_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip5_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip5_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay6; + wire main_a7ddrphy_dq_i_nodelay6; + wire main_a7ddrphy_dq_i_delayed6; + wire main_a7ddrphy_dq_t6; + wire [7:0] main_a7ddrphy_dq_i_data6; + wire [7:0] main_a7ddrphy_bitslip6_i; + reg [7:0] main_a7ddrphy_bitslip6_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip6_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip6_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay7; + wire main_a7ddrphy_dq_i_nodelay7; + wire main_a7ddrphy_dq_i_delayed7; + wire main_a7ddrphy_dq_t7; + wire [7:0] main_a7ddrphy_dq_i_data7; + wire [7:0] main_a7ddrphy_bitslip7_i; + reg [7:0] main_a7ddrphy_bitslip7_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip7_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip7_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay8; + wire main_a7ddrphy_dq_i_nodelay8; + wire main_a7ddrphy_dq_i_delayed8; + wire main_a7ddrphy_dq_t8; + wire [7:0] main_a7ddrphy_dq_i_data8; + wire [7:0] main_a7ddrphy_bitslip8_i; + reg [7:0] main_a7ddrphy_bitslip8_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip8_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip8_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay9; + wire main_a7ddrphy_dq_i_nodelay9; + wire main_a7ddrphy_dq_i_delayed9; + wire main_a7ddrphy_dq_t9; + wire [7:0] main_a7ddrphy_dq_i_data9; + wire [7:0] main_a7ddrphy_bitslip9_i; + reg [7:0] main_a7ddrphy_bitslip9_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip9_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip9_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay10; + wire main_a7ddrphy_dq_i_nodelay10; + wire main_a7ddrphy_dq_i_delayed10; + wire main_a7ddrphy_dq_t10; + wire [7:0] main_a7ddrphy_dq_i_data10; + wire [7:0] main_a7ddrphy_bitslip10_i; + reg [7:0] main_a7ddrphy_bitslip10_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip10_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip10_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay11; + wire main_a7ddrphy_dq_i_nodelay11; + wire main_a7ddrphy_dq_i_delayed11; + wire main_a7ddrphy_dq_t11; + wire [7:0] main_a7ddrphy_dq_i_data11; + wire [7:0] main_a7ddrphy_bitslip11_i; + reg [7:0] main_a7ddrphy_bitslip11_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip11_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip11_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay12; + wire main_a7ddrphy_dq_i_nodelay12; + wire main_a7ddrphy_dq_i_delayed12; + wire main_a7ddrphy_dq_t12; + wire [7:0] main_a7ddrphy_dq_i_data12; + wire [7:0] main_a7ddrphy_bitslip12_i; + reg [7:0] main_a7ddrphy_bitslip12_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip12_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip12_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay13; + wire main_a7ddrphy_dq_i_nodelay13; + wire main_a7ddrphy_dq_i_delayed13; + wire main_a7ddrphy_dq_t13; + wire [7:0] main_a7ddrphy_dq_i_data13; + wire [7:0] main_a7ddrphy_bitslip13_i; + reg [7:0] main_a7ddrphy_bitslip13_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip13_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip13_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay14; + wire main_a7ddrphy_dq_i_nodelay14; + wire main_a7ddrphy_dq_i_delayed14; + wire main_a7ddrphy_dq_t14; + wire [7:0] main_a7ddrphy_dq_i_data14; + wire [7:0] main_a7ddrphy_bitslip14_i; + reg [7:0] main_a7ddrphy_bitslip14_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip14_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip14_r = 16'd0; + wire main_a7ddrphy_dq_o_nodelay15; + wire main_a7ddrphy_dq_i_nodelay15; + wire main_a7ddrphy_dq_i_delayed15; + wire main_a7ddrphy_dq_t15; + wire [7:0] main_a7ddrphy_dq_i_data15; + wire [7:0] main_a7ddrphy_bitslip15_i; + reg [7:0] main_a7ddrphy_bitslip15_o = 8'd0; + reg [2:0] main_a7ddrphy_bitslip15_value = 3'd0; + reg [15:0] main_a7ddrphy_bitslip15_r = 16'd0; + reg main_a7ddrphy_n_rddata_en0 = 1'd0; + reg main_a7ddrphy_n_rddata_en1 = 1'd0; + reg main_a7ddrphy_n_rddata_en2 = 1'd0; + reg main_a7ddrphy_n_rddata_en3 = 1'd0; + reg main_a7ddrphy_n_rddata_en4 = 1'd0; + reg main_a7ddrphy_n_rddata_en5 = 1'd0; + reg main_a7ddrphy_n_rddata_en6 = 1'd0; + reg main_a7ddrphy_n_rddata_en7 = 1'd0; + wire main_a7ddrphy_oe; + reg [3:0] main_a7ddrphy_last_wrdata_en = 4'd0; + wire [13:0] main_sdram_inti_p0_address; + wire [2:0] main_sdram_inti_p0_bank; + reg main_sdram_inti_p0_cas_n = 1'd1; + reg main_sdram_inti_p0_cs_n = 1'd1; + reg main_sdram_inti_p0_ras_n = 1'd1; + reg main_sdram_inti_p0_we_n = 1'd1; + wire main_sdram_inti_p0_cke; + wire main_sdram_inti_p0_odt; + wire main_sdram_inti_p0_reset_n; + reg main_sdram_inti_p0_act_n = 1'd1; + wire [31:0] main_sdram_inti_p0_wrdata; + wire main_sdram_inti_p0_wrdata_en; + wire [3:0] main_sdram_inti_p0_wrdata_mask; + wire main_sdram_inti_p0_rddata_en; + reg [31:0] main_sdram_inti_p0_rddata = 32'd0; + reg main_sdram_inti_p0_rddata_valid = 1'd0; + wire [13:0] main_sdram_inti_p1_address; + wire [2:0] main_sdram_inti_p1_bank; + reg main_sdram_inti_p1_cas_n = 1'd1; + reg main_sdram_inti_p1_cs_n = 1'd1; + reg main_sdram_inti_p1_ras_n = 1'd1; + reg main_sdram_inti_p1_we_n = 1'd1; + wire main_sdram_inti_p1_cke; + wire main_sdram_inti_p1_odt; + wire main_sdram_inti_p1_reset_n; + reg main_sdram_inti_p1_act_n = 1'd1; + wire [31:0] main_sdram_inti_p1_wrdata; + wire main_sdram_inti_p1_wrdata_en; + wire [3:0] main_sdram_inti_p1_wrdata_mask; + wire main_sdram_inti_p1_rddata_en; + reg [31:0] main_sdram_inti_p1_rddata = 32'd0; + reg main_sdram_inti_p1_rddata_valid = 1'd0; + wire [13:0] main_sdram_inti_p2_address; + wire [2:0] main_sdram_inti_p2_bank; + reg main_sdram_inti_p2_cas_n = 1'd1; + reg main_sdram_inti_p2_cs_n = 1'd1; + reg main_sdram_inti_p2_ras_n = 1'd1; + reg main_sdram_inti_p2_we_n = 1'd1; + wire main_sdram_inti_p2_cke; + wire main_sdram_inti_p2_odt; + wire main_sdram_inti_p2_reset_n; + reg main_sdram_inti_p2_act_n = 1'd1; + wire [31:0] main_sdram_inti_p2_wrdata; + wire main_sdram_inti_p2_wrdata_en; + wire [3:0] main_sdram_inti_p2_wrdata_mask; + wire main_sdram_inti_p2_rddata_en; + reg [31:0] main_sdram_inti_p2_rddata = 32'd0; + reg main_sdram_inti_p2_rddata_valid = 1'd0; + wire [13:0] main_sdram_inti_p3_address; + wire [2:0] main_sdram_inti_p3_bank; + reg main_sdram_inti_p3_cas_n = 1'd1; + reg main_sdram_inti_p3_cs_n = 1'd1; + reg main_sdram_inti_p3_ras_n = 1'd1; + reg main_sdram_inti_p3_we_n = 1'd1; + wire main_sdram_inti_p3_cke; + wire main_sdram_inti_p3_odt; + wire main_sdram_inti_p3_reset_n; + reg main_sdram_inti_p3_act_n = 1'd1; + wire [31:0] main_sdram_inti_p3_wrdata; + wire main_sdram_inti_p3_wrdata_en; + wire [3:0] main_sdram_inti_p3_wrdata_mask; + wire main_sdram_inti_p3_rddata_en; + reg [31:0] main_sdram_inti_p3_rddata = 32'd0; + reg main_sdram_inti_p3_rddata_valid = 1'd0; + wire [13:0] main_sdram_slave_p0_address; + wire [2:0] main_sdram_slave_p0_bank; + wire main_sdram_slave_p0_cas_n; + wire main_sdram_slave_p0_cs_n; + wire main_sdram_slave_p0_ras_n; + wire main_sdram_slave_p0_we_n; + wire main_sdram_slave_p0_cke; + wire main_sdram_slave_p0_odt; + wire main_sdram_slave_p0_reset_n; + wire main_sdram_slave_p0_act_n; + wire [31:0] main_sdram_slave_p0_wrdata; + wire main_sdram_slave_p0_wrdata_en; + wire [3:0] main_sdram_slave_p0_wrdata_mask; + wire main_sdram_slave_p0_rddata_en; + reg [31:0] main_sdram_slave_p0_rddata = 32'd0; + reg main_sdram_slave_p0_rddata_valid = 1'd0; + wire [13:0] main_sdram_slave_p1_address; + wire [2:0] main_sdram_slave_p1_bank; + wire main_sdram_slave_p1_cas_n; + wire main_sdram_slave_p1_cs_n; + wire main_sdram_slave_p1_ras_n; + wire main_sdram_slave_p1_we_n; + wire main_sdram_slave_p1_cke; + wire main_sdram_slave_p1_odt; + wire main_sdram_slave_p1_reset_n; + wire main_sdram_slave_p1_act_n; + wire [31:0] main_sdram_slave_p1_wrdata; + wire main_sdram_slave_p1_wrdata_en; + wire [3:0] main_sdram_slave_p1_wrdata_mask; + wire main_sdram_slave_p1_rddata_en; + reg [31:0] main_sdram_slave_p1_rddata = 32'd0; + reg main_sdram_slave_p1_rddata_valid = 1'd0; + wire [13:0] main_sdram_slave_p2_address; + wire [2:0] main_sdram_slave_p2_bank; + wire main_sdram_slave_p2_cas_n; + wire main_sdram_slave_p2_cs_n; + wire main_sdram_slave_p2_ras_n; + wire main_sdram_slave_p2_we_n; + wire main_sdram_slave_p2_cke; + wire main_sdram_slave_p2_odt; + wire main_sdram_slave_p2_reset_n; + wire main_sdram_slave_p2_act_n; + wire [31:0] main_sdram_slave_p2_wrdata; + wire main_sdram_slave_p2_wrdata_en; + wire [3:0] main_sdram_slave_p2_wrdata_mask; + wire main_sdram_slave_p2_rddata_en; + reg [31:0] main_sdram_slave_p2_rddata = 32'd0; + reg main_sdram_slave_p2_rddata_valid = 1'd0; + wire [13:0] main_sdram_slave_p3_address; + wire [2:0] main_sdram_slave_p3_bank; + wire main_sdram_slave_p3_cas_n; + wire main_sdram_slave_p3_cs_n; + wire main_sdram_slave_p3_ras_n; + wire main_sdram_slave_p3_we_n; + wire main_sdram_slave_p3_cke; + wire main_sdram_slave_p3_odt; + wire main_sdram_slave_p3_reset_n; + wire main_sdram_slave_p3_act_n; + wire [31:0] main_sdram_slave_p3_wrdata; + wire main_sdram_slave_p3_wrdata_en; + wire [3:0] main_sdram_slave_p3_wrdata_mask; + wire main_sdram_slave_p3_rddata_en; + reg [31:0] main_sdram_slave_p3_rddata = 32'd0; + reg main_sdram_slave_p3_rddata_valid = 1'd0; + reg [13:0] main_sdram_master_p0_address = 14'd0; + reg [2:0] main_sdram_master_p0_bank = 3'd0; + reg main_sdram_master_p0_cas_n = 1'd1; + reg main_sdram_master_p0_cs_n = 1'd1; + reg main_sdram_master_p0_ras_n = 1'd1; + reg main_sdram_master_p0_we_n = 1'd1; + reg main_sdram_master_p0_cke = 1'd0; + reg main_sdram_master_p0_odt = 1'd0; + reg main_sdram_master_p0_reset_n = 1'd0; + reg main_sdram_master_p0_act_n = 1'd1; + reg [31:0] main_sdram_master_p0_wrdata = 32'd0; + reg main_sdram_master_p0_wrdata_en = 1'd0; + reg [3:0] main_sdram_master_p0_wrdata_mask = 4'd0; + reg main_sdram_master_p0_rddata_en = 1'd0; + wire [31:0] main_sdram_master_p0_rddata; + wire main_sdram_master_p0_rddata_valid; + reg [13:0] main_sdram_master_p1_address = 14'd0; + reg [2:0] main_sdram_master_p1_bank = 3'd0; + reg main_sdram_master_p1_cas_n = 1'd1; + reg main_sdram_master_p1_cs_n = 1'd1; + reg main_sdram_master_p1_ras_n = 1'd1; + reg main_sdram_master_p1_we_n = 1'd1; + reg main_sdram_master_p1_cke = 1'd0; + reg main_sdram_master_p1_odt = 1'd0; + reg main_sdram_master_p1_reset_n = 1'd0; + reg main_sdram_master_p1_act_n = 1'd1; + reg [31:0] main_sdram_master_p1_wrdata = 32'd0; + reg main_sdram_master_p1_wrdata_en = 1'd0; + reg [3:0] main_sdram_master_p1_wrdata_mask = 4'd0; + reg main_sdram_master_p1_rddata_en = 1'd0; + wire [31:0] main_sdram_master_p1_rddata; + wire main_sdram_master_p1_rddata_valid; + reg [13:0] main_sdram_master_p2_address = 14'd0; + reg [2:0] main_sdram_master_p2_bank = 3'd0; + reg main_sdram_master_p2_cas_n = 1'd1; + reg main_sdram_master_p2_cs_n = 1'd1; + reg main_sdram_master_p2_ras_n = 1'd1; + reg main_sdram_master_p2_we_n = 1'd1; + reg main_sdram_master_p2_cke = 1'd0; + reg main_sdram_master_p2_odt = 1'd0; + reg main_sdram_master_p2_reset_n = 1'd0; + reg main_sdram_master_p2_act_n = 1'd1; + reg [31:0] main_sdram_master_p2_wrdata = 32'd0; + reg main_sdram_master_p2_wrdata_en = 1'd0; + reg [3:0] main_sdram_master_p2_wrdata_mask = 4'd0; + reg main_sdram_master_p2_rddata_en = 1'd0; + wire [31:0] main_sdram_master_p2_rddata; + wire main_sdram_master_p2_rddata_valid; + reg [13:0] main_sdram_master_p3_address = 14'd0; + reg [2:0] main_sdram_master_p3_bank = 3'd0; + reg main_sdram_master_p3_cas_n = 1'd1; + reg main_sdram_master_p3_cs_n = 1'd1; + reg main_sdram_master_p3_ras_n = 1'd1; + reg main_sdram_master_p3_we_n = 1'd1; + reg main_sdram_master_p3_cke = 1'd0; + reg main_sdram_master_p3_odt = 1'd0; + reg main_sdram_master_p3_reset_n = 1'd0; + reg main_sdram_master_p3_act_n = 1'd1; + reg [31:0] main_sdram_master_p3_wrdata = 32'd0; + reg main_sdram_master_p3_wrdata_en = 1'd0; + reg [3:0] main_sdram_master_p3_wrdata_mask = 4'd0; + reg main_sdram_master_p3_rddata_en = 1'd0; + wire [31:0] main_sdram_master_p3_rddata; + wire main_sdram_master_p3_rddata_valid; + reg [3:0] main_sdram_storage = 4'd0; + reg main_sdram_re = 1'd0; + reg [5:0] main_sdram_phaseinjector0_command_storage = 6'd0; + reg main_sdram_phaseinjector0_command_re = 1'd0; + wire main_sdram_phaseinjector0_command_issue_re; + wire main_sdram_phaseinjector0_command_issue_r; + wire main_sdram_phaseinjector0_command_issue_we; + reg main_sdram_phaseinjector0_command_issue_w = 1'd0; + reg [13:0] main_sdram_phaseinjector0_address_storage = 14'd0; + reg main_sdram_phaseinjector0_address_re = 1'd0; + reg [2:0] main_sdram_phaseinjector0_baddress_storage = 3'd0; + reg main_sdram_phaseinjector0_baddress_re = 1'd0; + reg [31:0] main_sdram_phaseinjector0_wrdata_storage = 32'd0; + reg main_sdram_phaseinjector0_wrdata_re = 1'd0; + reg [31:0] main_sdram_phaseinjector0_status = 32'd0; + wire main_sdram_phaseinjector0_we; + reg [5:0] main_sdram_phaseinjector1_command_storage = 6'd0; + reg main_sdram_phaseinjector1_command_re = 1'd0; + wire main_sdram_phaseinjector1_command_issue_re; + wire main_sdram_phaseinjector1_command_issue_r; + wire main_sdram_phaseinjector1_command_issue_we; + reg main_sdram_phaseinjector1_command_issue_w = 1'd0; + reg [13:0] main_sdram_phaseinjector1_address_storage = 14'd0; + reg main_sdram_phaseinjector1_address_re = 1'd0; + reg [2:0] main_sdram_phaseinjector1_baddress_storage = 3'd0; + reg main_sdram_phaseinjector1_baddress_re = 1'd0; + reg [31:0] main_sdram_phaseinjector1_wrdata_storage = 32'd0; + reg main_sdram_phaseinjector1_wrdata_re = 1'd0; + reg [31:0] main_sdram_phaseinjector1_status = 32'd0; + wire main_sdram_phaseinjector1_we; + reg [5:0] main_sdram_phaseinjector2_command_storage = 6'd0; + reg main_sdram_phaseinjector2_command_re = 1'd0; + wire main_sdram_phaseinjector2_command_issue_re; + wire main_sdram_phaseinjector2_command_issue_r; + wire main_sdram_phaseinjector2_command_issue_we; + reg main_sdram_phaseinjector2_command_issue_w = 1'd0; + reg [13:0] main_sdram_phaseinjector2_address_storage = 14'd0; + reg main_sdram_phaseinjector2_address_re = 1'd0; + reg [2:0] main_sdram_phaseinjector2_baddress_storage = 3'd0; + reg main_sdram_phaseinjector2_baddress_re = 1'd0; + reg [31:0] main_sdram_phaseinjector2_wrdata_storage = 32'd0; + reg main_sdram_phaseinjector2_wrdata_re = 1'd0; + reg [31:0] main_sdram_phaseinjector2_status = 32'd0; + wire main_sdram_phaseinjector2_we; + reg [5:0] main_sdram_phaseinjector3_command_storage = 6'd0; + reg main_sdram_phaseinjector3_command_re = 1'd0; + wire main_sdram_phaseinjector3_command_issue_re; + wire main_sdram_phaseinjector3_command_issue_r; + wire main_sdram_phaseinjector3_command_issue_we; + reg main_sdram_phaseinjector3_command_issue_w = 1'd0; + reg [13:0] main_sdram_phaseinjector3_address_storage = 14'd0; + reg main_sdram_phaseinjector3_address_re = 1'd0; + reg [2:0] main_sdram_phaseinjector3_baddress_storage = 3'd0; + reg main_sdram_phaseinjector3_baddress_re = 1'd0; + reg [31:0] main_sdram_phaseinjector3_wrdata_storage = 32'd0; + reg main_sdram_phaseinjector3_wrdata_re = 1'd0; + reg [31:0] main_sdram_phaseinjector3_status = 32'd0; + wire main_sdram_phaseinjector3_we; + wire main_sdram_interface_bank0_valid; + wire main_sdram_interface_bank0_ready; + wire main_sdram_interface_bank0_we; + wire [20:0] main_sdram_interface_bank0_addr; + wire main_sdram_interface_bank0_lock; + wire main_sdram_interface_bank0_wdata_ready; + wire main_sdram_interface_bank0_rdata_valid; + wire main_sdram_interface_bank1_valid; + wire main_sdram_interface_bank1_ready; + wire main_sdram_interface_bank1_we; + wire [20:0] main_sdram_interface_bank1_addr; + wire main_sdram_interface_bank1_lock; + wire main_sdram_interface_bank1_wdata_ready; + wire main_sdram_interface_bank1_rdata_valid; + wire main_sdram_interface_bank2_valid; + wire main_sdram_interface_bank2_ready; + wire main_sdram_interface_bank2_we; + wire [20:0] main_sdram_interface_bank2_addr; + wire main_sdram_interface_bank2_lock; + wire main_sdram_interface_bank2_wdata_ready; + wire main_sdram_interface_bank2_rdata_valid; + wire main_sdram_interface_bank3_valid; + wire main_sdram_interface_bank3_ready; + wire main_sdram_interface_bank3_we; + wire [20:0] main_sdram_interface_bank3_addr; + wire main_sdram_interface_bank3_lock; + wire main_sdram_interface_bank3_wdata_ready; + wire main_sdram_interface_bank3_rdata_valid; + wire main_sdram_interface_bank4_valid; + wire main_sdram_interface_bank4_ready; + wire main_sdram_interface_bank4_we; + wire [20:0] main_sdram_interface_bank4_addr; + wire main_sdram_interface_bank4_lock; + wire main_sdram_interface_bank4_wdata_ready; + wire main_sdram_interface_bank4_rdata_valid; + wire main_sdram_interface_bank5_valid; + wire main_sdram_interface_bank5_ready; + wire main_sdram_interface_bank5_we; + wire [20:0] main_sdram_interface_bank5_addr; + wire main_sdram_interface_bank5_lock; + wire main_sdram_interface_bank5_wdata_ready; + wire main_sdram_interface_bank5_rdata_valid; + wire main_sdram_interface_bank6_valid; + wire main_sdram_interface_bank6_ready; + wire main_sdram_interface_bank6_we; + wire [20:0] main_sdram_interface_bank6_addr; + wire main_sdram_interface_bank6_lock; + wire main_sdram_interface_bank6_wdata_ready; + wire main_sdram_interface_bank6_rdata_valid; + wire main_sdram_interface_bank7_valid; + wire main_sdram_interface_bank7_ready; + wire main_sdram_interface_bank7_we; + wire [20:0] main_sdram_interface_bank7_addr; + wire main_sdram_interface_bank7_lock; + wire main_sdram_interface_bank7_wdata_ready; + wire main_sdram_interface_bank7_rdata_valid; + reg [127:0] main_sdram_interface_wdata = 128'd0; + reg [15:0] main_sdram_interface_wdata_we = 16'd0; + wire [127:0] main_sdram_interface_rdata; + reg [13:0] main_sdram_dfi_p0_address = 14'd0; + reg [2:0] main_sdram_dfi_p0_bank = 3'd0; + reg main_sdram_dfi_p0_cas_n = 1'd1; + reg main_sdram_dfi_p0_cs_n = 1'd1; + reg main_sdram_dfi_p0_ras_n = 1'd1; + reg main_sdram_dfi_p0_we_n = 1'd1; + wire main_sdram_dfi_p0_cke; + wire main_sdram_dfi_p0_odt; + wire main_sdram_dfi_p0_reset_n; + reg main_sdram_dfi_p0_act_n = 1'd1; + wire [31:0] main_sdram_dfi_p0_wrdata; + reg main_sdram_dfi_p0_wrdata_en = 1'd0; + wire [3:0] main_sdram_dfi_p0_wrdata_mask; + reg main_sdram_dfi_p0_rddata_en = 1'd0; + wire [31:0] main_sdram_dfi_p0_rddata; + wire main_sdram_dfi_p0_rddata_valid; + reg [13:0] main_sdram_dfi_p1_address = 14'd0; + reg [2:0] main_sdram_dfi_p1_bank = 3'd0; + reg main_sdram_dfi_p1_cas_n = 1'd1; + reg main_sdram_dfi_p1_cs_n = 1'd1; + reg main_sdram_dfi_p1_ras_n = 1'd1; + reg main_sdram_dfi_p1_we_n = 1'd1; + wire main_sdram_dfi_p1_cke; + wire main_sdram_dfi_p1_odt; + wire main_sdram_dfi_p1_reset_n; + reg main_sdram_dfi_p1_act_n = 1'd1; + wire [31:0] main_sdram_dfi_p1_wrdata; + reg main_sdram_dfi_p1_wrdata_en = 1'd0; + wire [3:0] main_sdram_dfi_p1_wrdata_mask; + reg main_sdram_dfi_p1_rddata_en = 1'd0; + wire [31:0] main_sdram_dfi_p1_rddata; + wire main_sdram_dfi_p1_rddata_valid; + reg [13:0] main_sdram_dfi_p2_address = 14'd0; + reg [2:0] main_sdram_dfi_p2_bank = 3'd0; + reg main_sdram_dfi_p2_cas_n = 1'd1; + reg main_sdram_dfi_p2_cs_n = 1'd1; + reg main_sdram_dfi_p2_ras_n = 1'd1; + reg main_sdram_dfi_p2_we_n = 1'd1; + wire main_sdram_dfi_p2_cke; + wire main_sdram_dfi_p2_odt; + wire main_sdram_dfi_p2_reset_n; + reg main_sdram_dfi_p2_act_n = 1'd1; + wire [31:0] main_sdram_dfi_p2_wrdata; + reg main_sdram_dfi_p2_wrdata_en = 1'd0; + wire [3:0] main_sdram_dfi_p2_wrdata_mask; + reg main_sdram_dfi_p2_rddata_en = 1'd0; + wire [31:0] main_sdram_dfi_p2_rddata; + wire main_sdram_dfi_p2_rddata_valid; + reg [13:0] main_sdram_dfi_p3_address = 14'd0; + reg [2:0] main_sdram_dfi_p3_bank = 3'd0; + reg main_sdram_dfi_p3_cas_n = 1'd1; + reg main_sdram_dfi_p3_cs_n = 1'd1; + reg main_sdram_dfi_p3_ras_n = 1'd1; + reg main_sdram_dfi_p3_we_n = 1'd1; + wire main_sdram_dfi_p3_cke; + wire main_sdram_dfi_p3_odt; + wire main_sdram_dfi_p3_reset_n; + reg main_sdram_dfi_p3_act_n = 1'd1; + wire [31:0] main_sdram_dfi_p3_wrdata; + reg main_sdram_dfi_p3_wrdata_en = 1'd0; + wire [3:0] main_sdram_dfi_p3_wrdata_mask; + reg main_sdram_dfi_p3_rddata_en = 1'd0; + wire [31:0] main_sdram_dfi_p3_rddata; + wire main_sdram_dfi_p3_rddata_valid; + reg main_sdram_cmd_valid = 1'd0; + reg main_sdram_cmd_ready = 1'd0; + reg main_sdram_cmd_last = 1'd0; + reg [13:0] main_sdram_cmd_payload_a = 14'd0; + reg [2:0] main_sdram_cmd_payload_ba = 3'd0; + reg main_sdram_cmd_payload_cas = 1'd0; + reg main_sdram_cmd_payload_ras = 1'd0; + reg main_sdram_cmd_payload_we = 1'd0; + reg main_sdram_cmd_payload_is_read = 1'd0; + reg main_sdram_cmd_payload_is_write = 1'd0; + wire main_sdram_wants_refresh; + wire main_sdram_wants_zqcs; + wire main_sdram_timer_wait; + wire main_sdram_timer_done0; + wire [8:0] main_sdram_timer_count0; + wire main_sdram_timer_done1; + reg [8:0] main_sdram_timer_count1 = 9'd468; + wire main_sdram_postponer_req_i; + reg main_sdram_postponer_req_o = 1'd0; + reg main_sdram_postponer_count = 1'd0; + reg main_sdram_sequencer_start0 = 1'd0; + wire main_sdram_sequencer_done0; + wire main_sdram_sequencer_start1; + reg main_sdram_sequencer_done1 = 1'd0; + reg [5:0] main_sdram_sequencer_counter = 6'd0; + reg main_sdram_sequencer_count = 1'd0; + wire main_sdram_zqcs_timer_wait; + wire main_sdram_zqcs_timer_done0; + wire [25:0] main_sdram_zqcs_timer_count0; + wire main_sdram_zqcs_timer_done1; + reg [25:0] main_sdram_zqcs_timer_count1 = 26'd59999999; + reg main_sdram_zqcs_executer_start = 1'd0; + reg main_sdram_zqcs_executer_done = 1'd0; + reg [4:0] main_sdram_zqcs_executer_counter = 5'd0; + wire main_sdram_bankmachine0_req_valid; + wire main_sdram_bankmachine0_req_ready; + wire main_sdram_bankmachine0_req_we; + wire [20:0] main_sdram_bankmachine0_req_addr; + wire main_sdram_bankmachine0_req_lock; + reg main_sdram_bankmachine0_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine0_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine0_refresh_req; + reg main_sdram_bankmachine0_refresh_gnt = 1'd0; + reg main_sdram_bankmachine0_cmd_valid = 1'd0; + reg main_sdram_bankmachine0_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine0_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine0_cmd_payload_ba; + reg main_sdram_bankmachine0_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine0_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine0_auto_precharge = 1'd0; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; + reg [3:0] main_sdram_bankmachine0_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine0_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine0_cmd_buffer_sink_valid; + wire main_sdram_bankmachine0_cmd_buffer_sink_ready; + wire main_sdram_bankmachine0_cmd_buffer_sink_first; + wire main_sdram_bankmachine0_cmd_buffer_sink_last; + wire main_sdram_bankmachine0_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine0_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine0_cmd_buffer_source_ready; + reg main_sdram_bankmachine0_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine0_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine0_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine0_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine0_row = 14'd0; + reg main_sdram_bankmachine0_row_opened = 1'd0; + wire main_sdram_bankmachine0_row_hit; + reg main_sdram_bankmachine0_row_open = 1'd0; + reg main_sdram_bankmachine0_row_close = 1'd0; + reg main_sdram_bankmachine0_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine0_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine0_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine0_twtpcon_count = 3'd0; + wire main_sdram_bankmachine0_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine0_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine0_trccon_count = 2'd0; + wire main_sdram_bankmachine0_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine0_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine0_trascon_count = 2'd0; + wire main_sdram_bankmachine1_req_valid; + wire main_sdram_bankmachine1_req_ready; + wire main_sdram_bankmachine1_req_we; + wire [20:0] main_sdram_bankmachine1_req_addr; + wire main_sdram_bankmachine1_req_lock; + reg main_sdram_bankmachine1_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine1_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine1_refresh_req; + reg main_sdram_bankmachine1_refresh_gnt = 1'd0; + reg main_sdram_bankmachine1_cmd_valid = 1'd0; + reg main_sdram_bankmachine1_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine1_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine1_cmd_payload_ba; + reg main_sdram_bankmachine1_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine1_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine1_auto_precharge = 1'd0; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; + reg [3:0] main_sdram_bankmachine1_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine1_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine1_cmd_buffer_sink_valid; + wire main_sdram_bankmachine1_cmd_buffer_sink_ready; + wire main_sdram_bankmachine1_cmd_buffer_sink_first; + wire main_sdram_bankmachine1_cmd_buffer_sink_last; + wire main_sdram_bankmachine1_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine1_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine1_cmd_buffer_source_ready; + reg main_sdram_bankmachine1_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine1_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine1_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine1_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine1_row = 14'd0; + reg main_sdram_bankmachine1_row_opened = 1'd0; + wire main_sdram_bankmachine1_row_hit; + reg main_sdram_bankmachine1_row_open = 1'd0; + reg main_sdram_bankmachine1_row_close = 1'd0; + reg main_sdram_bankmachine1_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine1_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine1_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine1_twtpcon_count = 3'd0; + wire main_sdram_bankmachine1_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine1_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine1_trccon_count = 2'd0; + wire main_sdram_bankmachine1_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine1_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine1_trascon_count = 2'd0; + wire main_sdram_bankmachine2_req_valid; + wire main_sdram_bankmachine2_req_ready; + wire main_sdram_bankmachine2_req_we; + wire [20:0] main_sdram_bankmachine2_req_addr; + wire main_sdram_bankmachine2_req_lock; + reg main_sdram_bankmachine2_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine2_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine2_refresh_req; + reg main_sdram_bankmachine2_refresh_gnt = 1'd0; + reg main_sdram_bankmachine2_cmd_valid = 1'd0; + reg main_sdram_bankmachine2_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine2_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine2_cmd_payload_ba; + reg main_sdram_bankmachine2_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine2_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine2_auto_precharge = 1'd0; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; + reg [3:0] main_sdram_bankmachine2_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine2_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine2_cmd_buffer_sink_valid; + wire main_sdram_bankmachine2_cmd_buffer_sink_ready; + wire main_sdram_bankmachine2_cmd_buffer_sink_first; + wire main_sdram_bankmachine2_cmd_buffer_sink_last; + wire main_sdram_bankmachine2_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine2_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine2_cmd_buffer_source_ready; + reg main_sdram_bankmachine2_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine2_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine2_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine2_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine2_row = 14'd0; + reg main_sdram_bankmachine2_row_opened = 1'd0; + wire main_sdram_bankmachine2_row_hit; + reg main_sdram_bankmachine2_row_open = 1'd0; + reg main_sdram_bankmachine2_row_close = 1'd0; + reg main_sdram_bankmachine2_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine2_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine2_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine2_twtpcon_count = 3'd0; + wire main_sdram_bankmachine2_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine2_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine2_trccon_count = 2'd0; + wire main_sdram_bankmachine2_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine2_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine2_trascon_count = 2'd0; + wire main_sdram_bankmachine3_req_valid; + wire main_sdram_bankmachine3_req_ready; + wire main_sdram_bankmachine3_req_we; + wire [20:0] main_sdram_bankmachine3_req_addr; + wire main_sdram_bankmachine3_req_lock; + reg main_sdram_bankmachine3_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine3_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine3_refresh_req; + reg main_sdram_bankmachine3_refresh_gnt = 1'd0; + reg main_sdram_bankmachine3_cmd_valid = 1'd0; + reg main_sdram_bankmachine3_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine3_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine3_cmd_payload_ba; + reg main_sdram_bankmachine3_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine3_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine3_auto_precharge = 1'd0; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; + reg [3:0] main_sdram_bankmachine3_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine3_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine3_cmd_buffer_sink_valid; + wire main_sdram_bankmachine3_cmd_buffer_sink_ready; + wire main_sdram_bankmachine3_cmd_buffer_sink_first; + wire main_sdram_bankmachine3_cmd_buffer_sink_last; + wire main_sdram_bankmachine3_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine3_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine3_cmd_buffer_source_ready; + reg main_sdram_bankmachine3_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine3_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine3_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine3_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine3_row = 14'd0; + reg main_sdram_bankmachine3_row_opened = 1'd0; + wire main_sdram_bankmachine3_row_hit; + reg main_sdram_bankmachine3_row_open = 1'd0; + reg main_sdram_bankmachine3_row_close = 1'd0; + reg main_sdram_bankmachine3_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine3_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine3_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine3_twtpcon_count = 3'd0; + wire main_sdram_bankmachine3_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine3_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine3_trccon_count = 2'd0; + wire main_sdram_bankmachine3_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine3_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine3_trascon_count = 2'd0; + wire main_sdram_bankmachine4_req_valid; + wire main_sdram_bankmachine4_req_ready; + wire main_sdram_bankmachine4_req_we; + wire [20:0] main_sdram_bankmachine4_req_addr; + wire main_sdram_bankmachine4_req_lock; + reg main_sdram_bankmachine4_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine4_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine4_refresh_req; + reg main_sdram_bankmachine4_refresh_gnt = 1'd0; + reg main_sdram_bankmachine4_cmd_valid = 1'd0; + reg main_sdram_bankmachine4_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine4_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine4_cmd_payload_ba; + reg main_sdram_bankmachine4_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine4_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine4_auto_precharge = 1'd0; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; + reg [3:0] main_sdram_bankmachine4_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine4_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine4_cmd_buffer_sink_valid; + wire main_sdram_bankmachine4_cmd_buffer_sink_ready; + wire main_sdram_bankmachine4_cmd_buffer_sink_first; + wire main_sdram_bankmachine4_cmd_buffer_sink_last; + wire main_sdram_bankmachine4_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine4_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine4_cmd_buffer_source_ready; + reg main_sdram_bankmachine4_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine4_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine4_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine4_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine4_row = 14'd0; + reg main_sdram_bankmachine4_row_opened = 1'd0; + wire main_sdram_bankmachine4_row_hit; + reg main_sdram_bankmachine4_row_open = 1'd0; + reg main_sdram_bankmachine4_row_close = 1'd0; + reg main_sdram_bankmachine4_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine4_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine4_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine4_twtpcon_count = 3'd0; + wire main_sdram_bankmachine4_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine4_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine4_trccon_count = 2'd0; + wire main_sdram_bankmachine4_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine4_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine4_trascon_count = 2'd0; + wire main_sdram_bankmachine5_req_valid; + wire main_sdram_bankmachine5_req_ready; + wire main_sdram_bankmachine5_req_we; + wire [20:0] main_sdram_bankmachine5_req_addr; + wire main_sdram_bankmachine5_req_lock; + reg main_sdram_bankmachine5_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine5_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine5_refresh_req; + reg main_sdram_bankmachine5_refresh_gnt = 1'd0; + reg main_sdram_bankmachine5_cmd_valid = 1'd0; + reg main_sdram_bankmachine5_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine5_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine5_cmd_payload_ba; + reg main_sdram_bankmachine5_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine5_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine5_auto_precharge = 1'd0; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; + reg [3:0] main_sdram_bankmachine5_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine5_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine5_cmd_buffer_sink_valid; + wire main_sdram_bankmachine5_cmd_buffer_sink_ready; + wire main_sdram_bankmachine5_cmd_buffer_sink_first; + wire main_sdram_bankmachine5_cmd_buffer_sink_last; + wire main_sdram_bankmachine5_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine5_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine5_cmd_buffer_source_ready; + reg main_sdram_bankmachine5_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine5_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine5_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine5_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine5_row = 14'd0; + reg main_sdram_bankmachine5_row_opened = 1'd0; + wire main_sdram_bankmachine5_row_hit; + reg main_sdram_bankmachine5_row_open = 1'd0; + reg main_sdram_bankmachine5_row_close = 1'd0; + reg main_sdram_bankmachine5_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine5_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine5_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine5_twtpcon_count = 3'd0; + wire main_sdram_bankmachine5_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine5_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine5_trccon_count = 2'd0; + wire main_sdram_bankmachine5_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine5_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine5_trascon_count = 2'd0; + wire main_sdram_bankmachine6_req_valid; + wire main_sdram_bankmachine6_req_ready; + wire main_sdram_bankmachine6_req_we; + wire [20:0] main_sdram_bankmachine6_req_addr; + wire main_sdram_bankmachine6_req_lock; + reg main_sdram_bankmachine6_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine6_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine6_refresh_req; + reg main_sdram_bankmachine6_refresh_gnt = 1'd0; + reg main_sdram_bankmachine6_cmd_valid = 1'd0; + reg main_sdram_bankmachine6_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine6_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine6_cmd_payload_ba; + reg main_sdram_bankmachine6_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine6_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine6_auto_precharge = 1'd0; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; + reg [3:0] main_sdram_bankmachine6_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine6_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine6_cmd_buffer_sink_valid; + wire main_sdram_bankmachine6_cmd_buffer_sink_ready; + wire main_sdram_bankmachine6_cmd_buffer_sink_first; + wire main_sdram_bankmachine6_cmd_buffer_sink_last; + wire main_sdram_bankmachine6_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine6_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine6_cmd_buffer_source_ready; + reg main_sdram_bankmachine6_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine6_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine6_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine6_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine6_row = 14'd0; + reg main_sdram_bankmachine6_row_opened = 1'd0; + wire main_sdram_bankmachine6_row_hit; + reg main_sdram_bankmachine6_row_open = 1'd0; + reg main_sdram_bankmachine6_row_close = 1'd0; + reg main_sdram_bankmachine6_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine6_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine6_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine6_twtpcon_count = 3'd0; + wire main_sdram_bankmachine6_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine6_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine6_trccon_count = 2'd0; + wire main_sdram_bankmachine6_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine6_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine6_trascon_count = 2'd0; + wire main_sdram_bankmachine7_req_valid; + wire main_sdram_bankmachine7_req_ready; + wire main_sdram_bankmachine7_req_we; + wire [20:0] main_sdram_bankmachine7_req_addr; + wire main_sdram_bankmachine7_req_lock; + reg main_sdram_bankmachine7_req_wdata_ready = 1'd0; + reg main_sdram_bankmachine7_req_rdata_valid = 1'd0; + wire main_sdram_bankmachine7_refresh_req; + reg main_sdram_bankmachine7_refresh_gnt = 1'd0; + reg main_sdram_bankmachine7_cmd_valid = 1'd0; + reg main_sdram_bankmachine7_cmd_ready = 1'd0; + reg [13:0] main_sdram_bankmachine7_cmd_payload_a = 14'd0; + wire [2:0] main_sdram_bankmachine7_cmd_payload_ba; + reg main_sdram_bankmachine7_cmd_payload_cas = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_ras = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_we = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_is_cmd = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_is_read = 1'd0; + reg main_sdram_bankmachine7_cmd_payload_is_write = 1'd0; + reg main_sdram_bankmachine7_auto_precharge = 1'd0; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; + reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first = 1'd0; + reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last = 1'd0; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; + reg [3:0] main_sdram_bankmachine7_cmd_buffer_lookahead_level = 4'd0; + reg main_sdram_bankmachine7_cmd_buffer_lookahead_replace = 1'd0; + reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_produce = 3'd0; + reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_consume = 3'd0; + reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr = 3'd0; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_do_read; + wire [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr; + wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; + wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; + wire main_sdram_bankmachine7_cmd_buffer_sink_valid; + wire main_sdram_bankmachine7_cmd_buffer_sink_ready; + wire main_sdram_bankmachine7_cmd_buffer_sink_first; + wire main_sdram_bankmachine7_cmd_buffer_sink_last; + wire main_sdram_bankmachine7_cmd_buffer_sink_payload_we; + wire [20:0] main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; + reg main_sdram_bankmachine7_cmd_buffer_source_valid = 1'd0; + wire main_sdram_bankmachine7_cmd_buffer_source_ready; + reg main_sdram_bankmachine7_cmd_buffer_source_first = 1'd0; + reg main_sdram_bankmachine7_cmd_buffer_source_last = 1'd0; + reg main_sdram_bankmachine7_cmd_buffer_source_payload_we = 1'd0; + reg [20:0] main_sdram_bankmachine7_cmd_buffer_source_payload_addr = 21'd0; + reg [13:0] main_sdram_bankmachine7_row = 14'd0; + reg main_sdram_bankmachine7_row_opened = 1'd0; + wire main_sdram_bankmachine7_row_hit; + reg main_sdram_bankmachine7_row_open = 1'd0; + reg main_sdram_bankmachine7_row_close = 1'd0; + reg main_sdram_bankmachine7_row_col_n_addr_sel = 1'd0; + wire main_sdram_bankmachine7_twtpcon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine7_twtpcon_ready = 1'd1; + reg [2:0] main_sdram_bankmachine7_twtpcon_count = 3'd0; + wire main_sdram_bankmachine7_trccon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine7_trccon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine7_trccon_count = 2'd0; + wire main_sdram_bankmachine7_trascon_valid; + (* dont_touch = "true" *) reg main_sdram_bankmachine7_trascon_ready = 1'd1; + reg [1:0] main_sdram_bankmachine7_trascon_count = 2'd0; + wire main_sdram_ras_allowed; + wire main_sdram_cas_allowed; + reg main_sdram_choose_cmd_want_reads = 1'd0; + reg main_sdram_choose_cmd_want_writes = 1'd0; + reg main_sdram_choose_cmd_want_cmds = 1'd0; + reg main_sdram_choose_cmd_want_activates = 1'd0; + wire main_sdram_choose_cmd_cmd_valid; + reg main_sdram_choose_cmd_cmd_ready = 1'd0; + wire [13:0] main_sdram_choose_cmd_cmd_payload_a; + wire [2:0] main_sdram_choose_cmd_cmd_payload_ba; + reg main_sdram_choose_cmd_cmd_payload_cas = 1'd0; + reg main_sdram_choose_cmd_cmd_payload_ras = 1'd0; + reg main_sdram_choose_cmd_cmd_payload_we = 1'd0; + wire main_sdram_choose_cmd_cmd_payload_is_cmd; + wire main_sdram_choose_cmd_cmd_payload_is_read; + wire main_sdram_choose_cmd_cmd_payload_is_write; + reg [7:0] main_sdram_choose_cmd_valids = 8'd0; + wire [7:0] main_sdram_choose_cmd_request; + reg [2:0] main_sdram_choose_cmd_grant = 3'd0; + wire main_sdram_choose_cmd_ce; + reg main_sdram_choose_req_want_reads = 1'd0; + reg main_sdram_choose_req_want_writes = 1'd0; + reg main_sdram_choose_req_want_cmds = 1'd0; + reg main_sdram_choose_req_want_activates = 1'd0; + wire main_sdram_choose_req_cmd_valid; + reg main_sdram_choose_req_cmd_ready = 1'd0; + wire [13:0] main_sdram_choose_req_cmd_payload_a; + wire [2:0] main_sdram_choose_req_cmd_payload_ba; + reg main_sdram_choose_req_cmd_payload_cas = 1'd0; + reg main_sdram_choose_req_cmd_payload_ras = 1'd0; + reg main_sdram_choose_req_cmd_payload_we = 1'd0; + wire main_sdram_choose_req_cmd_payload_is_cmd; + wire main_sdram_choose_req_cmd_payload_is_read; + wire main_sdram_choose_req_cmd_payload_is_write; + reg [7:0] main_sdram_choose_req_valids = 8'd0; + wire [7:0] main_sdram_choose_req_request; + reg [2:0] main_sdram_choose_req_grant = 3'd0; + wire main_sdram_choose_req_ce; + reg [13:0] main_sdram_nop_a = 14'd0; + reg [2:0] main_sdram_nop_ba = 3'd0; + reg [1:0] main_sdram_steerer_sel0 = 2'd0; + reg [1:0] main_sdram_steerer_sel1 = 2'd0; + reg [1:0] main_sdram_steerer_sel2 = 2'd0; + reg [1:0] main_sdram_steerer_sel3 = 2'd0; + reg main_sdram_steerer0 = 1'd1; + reg main_sdram_steerer1 = 1'd1; + reg main_sdram_steerer2 = 1'd1; + reg main_sdram_steerer3 = 1'd1; + reg main_sdram_steerer4 = 1'd1; + reg main_sdram_steerer5 = 1'd1; + reg main_sdram_steerer6 = 1'd1; + reg main_sdram_steerer7 = 1'd1; + wire main_sdram_trrdcon_valid; + (* dont_touch = "true" *) reg main_sdram_trrdcon_ready = 1'd1; + reg main_sdram_trrdcon_count = 1'd0; + wire main_sdram_tfawcon_valid; + (* dont_touch = "true" *) reg main_sdram_tfawcon_ready = 1'd1; + wire [1:0] main_sdram_tfawcon_count; + reg [3:0] main_sdram_tfawcon_window = 4'd0; + wire main_sdram_tccdcon_valid; + (* dont_touch = "true" *) reg main_sdram_tccdcon_ready = 1'd1; + reg main_sdram_tccdcon_count = 1'd0; + wire main_sdram_twtrcon_valid; + (* dont_touch = "true" *) reg main_sdram_twtrcon_ready = 1'd1; + reg [2:0] main_sdram_twtrcon_count = 3'd0; + wire main_sdram_read_available; + wire main_sdram_write_available; + reg main_sdram_en0 = 1'd0; + wire main_sdram_max_time0; + reg [4:0] main_sdram_time0 = 5'd0; + reg main_sdram_en1 = 1'd0; + wire main_sdram_max_time1; + reg [3:0] main_sdram_time1 = 4'd0; + wire main_sdram_go_to_refresh; + reg main_port_cmd_valid = 1'd0; + wire main_port_cmd_ready; + reg main_port_cmd_payload_we = 1'd0; + reg [23:0] main_port_cmd_payload_addr = 24'd0; + wire main_port_wdata_valid; + wire main_port_wdata_ready; + wire main_port_wdata_first; + wire main_port_wdata_last; + wire [127:0] main_port_wdata_payload_data; + wire [15:0] main_port_wdata_payload_we; + wire main_port_rdata_valid; + wire main_port_rdata_ready; + reg main_port_rdata_first = 1'd0; + reg main_port_rdata_last = 1'd0; + wire [127:0] main_port_rdata_payload_data; + wire [29:0] main_interface1_wb_sdram_adr; + wire [31:0] main_interface1_wb_sdram_dat_w; + wire [31:0] main_interface1_wb_sdram_dat_r; + wire [3:0] main_interface1_wb_sdram_sel; + wire main_interface1_wb_sdram_cyc; + wire main_interface1_wb_sdram_stb; + wire main_interface1_wb_sdram_ack; + wire main_interface1_wb_sdram_we; + wire [2:0] main_interface1_wb_sdram_cti; + wire [1:0] main_interface1_wb_sdram_bte; + wire main_interface1_wb_sdram_err; + wire [29:0] main_adr; + wire [127:0] main_dat_w; + wire [127:0] main_dat_r; + wire [15:0] main_sel; + reg main_cyc = 1'd0; + reg main_stb = 1'd0; + reg main_ack = 1'd0; + reg main_we = 1'd0; + wire [8:0] main_data_port_adr; + wire [127:0] main_data_port_dat_r; + reg [15:0] main_data_port_we = 16'd0; + reg [127:0] main_data_port_dat_w = 128'd0; + reg main_write_from_slave = 1'd0; + reg [1:0] main_adr_offset_r = 2'd0; + wire [8:0] main_tag_port_adr; + wire [23:0] main_tag_port_dat_r; + reg main_tag_port_we = 1'd0; + wire [23:0] main_tag_port_dat_w; + wire [22:0] main_tag_do_tag; + wire main_tag_do_dirty; + wire [22:0] main_tag_di_tag; + reg main_tag_di_dirty = 1'd0; + reg main_word_clr = 1'd0; + reg main_word_inc = 1'd0; + wire main_wdata_converter_sink_valid; + wire main_wdata_converter_sink_ready; + reg main_wdata_converter_sink_first = 1'd0; + reg main_wdata_converter_sink_last = 1'd0; + wire [127:0] main_wdata_converter_sink_payload_data; + wire [15:0] main_wdata_converter_sink_payload_we; + wire main_wdata_converter_source_valid; + wire main_wdata_converter_source_ready; + wire main_wdata_converter_source_first; + wire main_wdata_converter_source_last; + wire [127:0] main_wdata_converter_source_payload_data; + wire [15:0] main_wdata_converter_source_payload_we; + wire main_wdata_converter_converter_sink_valid; + wire main_wdata_converter_converter_sink_ready; + wire main_wdata_converter_converter_sink_first; + wire main_wdata_converter_converter_sink_last; + wire [143:0] main_wdata_converter_converter_sink_payload_data; + wire main_wdata_converter_converter_source_valid; + wire main_wdata_converter_converter_source_ready; + wire main_wdata_converter_converter_source_first; + wire main_wdata_converter_converter_source_last; + wire [143:0] main_wdata_converter_converter_source_payload_data; + wire main_wdata_converter_converter_source_payload_valid_token_count; + wire main_wdata_converter_source_source_valid; + wire main_wdata_converter_source_source_ready; + wire main_wdata_converter_source_source_first; + wire main_wdata_converter_source_source_last; + wire [143:0] main_wdata_converter_source_source_payload_data; + wire main_rdata_converter_sink_valid; + wire main_rdata_converter_sink_ready; + wire main_rdata_converter_sink_first; + wire main_rdata_converter_sink_last; + wire [127:0] main_rdata_converter_sink_payload_data; + wire main_rdata_converter_source_valid; + wire main_rdata_converter_source_ready; + wire main_rdata_converter_source_first; + wire main_rdata_converter_source_last; + wire [127:0] main_rdata_converter_source_payload_data; + wire main_rdata_converter_converter_sink_valid; + wire main_rdata_converter_converter_sink_ready; + wire main_rdata_converter_converter_sink_first; + wire main_rdata_converter_converter_sink_last; + wire [127:0] main_rdata_converter_converter_sink_payload_data; + wire main_rdata_converter_converter_source_valid; + wire main_rdata_converter_converter_source_ready; + wire main_rdata_converter_converter_source_first; + wire main_rdata_converter_converter_source_last; + wire [127:0] main_rdata_converter_converter_source_payload_data; + wire main_rdata_converter_converter_source_payload_valid_token_count; + wire main_rdata_converter_source_source_valid; + wire main_rdata_converter_source_source_ready; + wire main_rdata_converter_source_source_first; + wire main_rdata_converter_source_source_last; + wire [127:0] main_rdata_converter_source_source_payload_data; + reg main_count = 1'd0; + reg builder_wb2csr_state = 1'd0; + reg builder_wb2csr_next_state = 1'd0; + wire builder_pll_fb; + reg [1:0] builder_refresher_state = 2'd0; + reg [1:0] builder_refresher_next_state = 2'd0; + reg [2:0] builder_bankmachine0_state = 3'd0; + reg [2:0] builder_bankmachine0_next_state = 3'd0; + reg [2:0] builder_bankmachine1_state = 3'd0; + reg [2:0] builder_bankmachine1_next_state = 3'd0; + reg [2:0] builder_bankmachine2_state = 3'd0; + reg [2:0] builder_bankmachine2_next_state = 3'd0; + reg [2:0] builder_bankmachine3_state = 3'd0; + reg [2:0] builder_bankmachine3_next_state = 3'd0; + reg [2:0] builder_bankmachine4_state = 3'd0; + reg [2:0] builder_bankmachine4_next_state = 3'd0; + reg [2:0] builder_bankmachine5_state = 3'd0; + reg [2:0] builder_bankmachine5_next_state = 3'd0; + reg [2:0] builder_bankmachine6_state = 3'd0; + reg [2:0] builder_bankmachine6_next_state = 3'd0; + reg [2:0] builder_bankmachine7_state = 3'd0; + reg [2:0] builder_bankmachine7_next_state = 3'd0; + reg [3:0] builder_multiplexer_state = 4'd0; + reg [3:0] builder_multiplexer_next_state = 4'd0; + wire builder_roundrobin0_request; + wire builder_roundrobin0_grant; + wire builder_roundrobin0_ce; + wire builder_roundrobin1_request; + wire builder_roundrobin1_grant; + wire builder_roundrobin1_ce; + wire builder_roundrobin2_request; + wire builder_roundrobin2_grant; + wire builder_roundrobin2_ce; + wire builder_roundrobin3_request; + wire builder_roundrobin3_grant; + wire builder_roundrobin3_ce; + wire builder_roundrobin4_request; + wire builder_roundrobin4_grant; + wire builder_roundrobin4_ce; + wire builder_roundrobin5_request; + wire builder_roundrobin5_grant; + wire builder_roundrobin5_ce; + wire builder_roundrobin6_request; + wire builder_roundrobin6_grant; + wire builder_roundrobin6_ce; + wire builder_roundrobin7_request; + wire builder_roundrobin7_grant; + wire builder_roundrobin7_ce; + reg [2:0] builder_rbank = 3'd0; + reg [2:0] builder_wbank = 3'd0; + reg builder_locked0 = 1'd0; + reg builder_locked1 = 1'd0; + reg builder_locked2 = 1'd0; + reg builder_locked3 = 1'd0; + reg builder_locked4 = 1'd0; + reg builder_locked5 = 1'd0; + reg builder_locked6 = 1'd0; + reg builder_locked7 = 1'd0; + reg builder_new_master_wdata_ready0 = 1'd0; + reg builder_new_master_wdata_ready1 = 1'd0; + reg builder_new_master_wdata_ready2 = 1'd0; + reg builder_new_master_rdata_valid0 = 1'd0; + reg builder_new_master_rdata_valid1 = 1'd0; + reg builder_new_master_rdata_valid2 = 1'd0; + reg builder_new_master_rdata_valid3 = 1'd0; + reg builder_new_master_rdata_valid4 = 1'd0; + reg builder_new_master_rdata_valid5 = 1'd0; + reg builder_new_master_rdata_valid6 = 1'd0; + reg builder_new_master_rdata_valid7 = 1'd0; + reg builder_new_master_rdata_valid8 = 1'd0; + reg builder_new_master_rdata_valid9 = 1'd0; + reg [1:0] builder_fullmemorywe_state = 2'd0; + reg [1:0] builder_fullmemorywe_next_state = 2'd0; + reg [1:0] builder_litedramwishbone2native_state = 2'd0; + reg [1:0] builder_litedramwishbone2native_next_state = 2'd0; + reg main_count_next_value = 1'd0; + reg main_count_next_value_ce = 1'd0; + wire builder_wb_sdram_con_request; + wire builder_wb_sdram_con_grant; + wire [29:0] builder_minsoc_shared_adr; + wire [31:0] builder_minsoc_shared_dat_w; + reg [31:0] builder_minsoc_shared_dat_r = 32'd0; + wire [3:0] builder_minsoc_shared_sel; + wire builder_minsoc_shared_cyc; + wire builder_minsoc_shared_stb; + reg builder_minsoc_shared_ack = 1'd0; + wire builder_minsoc_shared_we; + wire [2:0] builder_minsoc_shared_cti; + wire [1:0] builder_minsoc_shared_bte; + wire builder_minsoc_shared_err; + wire [1:0] builder_minsoc_request; + reg builder_minsoc_grant = 1'd0; + reg [3:0] builder_minsoc_slave_sel = 4'd0; + reg [3:0] builder_minsoc_slave_sel_r = 4'd0; + reg builder_minsoc_error = 1'd0; + wire builder_minsoc_wait; + wire builder_minsoc_done; + reg [19:0] builder_minsoc_count = 20'd1000000; + wire [13:0] builder_minsoc_interface0_bank_bus_adr; + wire builder_minsoc_interface0_bank_bus_we; + wire [7:0] builder_minsoc_interface0_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface0_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank0_reset0_re; + wire builder_minsoc_csrbank0_reset0_r; + wire builder_minsoc_csrbank0_reset0_we; + wire builder_minsoc_csrbank0_reset0_w; + wire builder_minsoc_csrbank0_scratch3_re; + wire [7:0] builder_minsoc_csrbank0_scratch3_r; + wire builder_minsoc_csrbank0_scratch3_we; + wire [7:0] builder_minsoc_csrbank0_scratch3_w; + wire builder_minsoc_csrbank0_scratch2_re; + wire [7:0] builder_minsoc_csrbank0_scratch2_r; + wire builder_minsoc_csrbank0_scratch2_we; + wire [7:0] builder_minsoc_csrbank0_scratch2_w; + wire builder_minsoc_csrbank0_scratch1_re; + wire [7:0] builder_minsoc_csrbank0_scratch1_r; + wire builder_minsoc_csrbank0_scratch1_we; + wire [7:0] builder_minsoc_csrbank0_scratch1_w; + wire builder_minsoc_csrbank0_scratch0_re; + wire [7:0] builder_minsoc_csrbank0_scratch0_r; + wire builder_minsoc_csrbank0_scratch0_we; + wire [7:0] builder_minsoc_csrbank0_scratch0_w; + wire builder_minsoc_csrbank0_bus_errors3_re; + wire [7:0] builder_minsoc_csrbank0_bus_errors3_r; + wire builder_minsoc_csrbank0_bus_errors3_we; + wire [7:0] builder_minsoc_csrbank0_bus_errors3_w; + wire builder_minsoc_csrbank0_bus_errors2_re; + wire [7:0] builder_minsoc_csrbank0_bus_errors2_r; + wire builder_minsoc_csrbank0_bus_errors2_we; + wire [7:0] builder_minsoc_csrbank0_bus_errors2_w; + wire builder_minsoc_csrbank0_bus_errors1_re; + wire [7:0] builder_minsoc_csrbank0_bus_errors1_r; + wire builder_minsoc_csrbank0_bus_errors1_we; + wire [7:0] builder_minsoc_csrbank0_bus_errors1_w; + wire builder_minsoc_csrbank0_bus_errors0_re; + wire [7:0] builder_minsoc_csrbank0_bus_errors0_r; + wire builder_minsoc_csrbank0_bus_errors0_we; + wire [7:0] builder_minsoc_csrbank0_bus_errors0_w; + wire builder_minsoc_csrbank0_sel; + wire [13:0] builder_minsoc_interface1_bank_bus_adr; + wire builder_minsoc_interface1_bank_bus_we; + wire [7:0] builder_minsoc_interface1_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface1_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank1_half_sys8x_taps0_re; + wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_r; + wire builder_minsoc_csrbank1_half_sys8x_taps0_we; + wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_w; + wire builder_minsoc_csrbank1_dly_sel0_re; + wire [1:0] builder_minsoc_csrbank1_dly_sel0_r; + wire builder_minsoc_csrbank1_dly_sel0_we; + wire [1:0] builder_minsoc_csrbank1_dly_sel0_w; + wire builder_minsoc_csrbank1_sel; + wire [13:0] builder_minsoc_interface2_bank_bus_adr; + wire builder_minsoc_interface2_bank_bus_we; + wire [7:0] builder_minsoc_interface2_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface2_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank2_dfii_control0_re; + wire [3:0] builder_minsoc_csrbank2_dfii_control0_r; + wire builder_minsoc_csrbank2_dfii_control0_we; + wire [3:0] builder_minsoc_csrbank2_dfii_control0_w; + wire builder_minsoc_csrbank2_dfii_pi0_command0_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_r; + wire builder_minsoc_csrbank2_dfii_pi0_command0_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_w; + wire builder_minsoc_csrbank2_dfii_pi0_address1_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_r; + wire builder_minsoc_csrbank2_dfii_pi0_address1_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_w; + wire builder_minsoc_csrbank2_dfii_pi0_address0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_r; + wire builder_minsoc_csrbank2_dfii_pi0_address0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_w; + wire builder_minsoc_csrbank2_dfii_pi0_baddress0_re; + wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_r; + wire builder_minsoc_csrbank2_dfii_pi0_baddress0_we; + wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_w; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; + wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; + wire builder_minsoc_csrbank2_dfii_pi0_rddata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_r; + wire builder_minsoc_csrbank2_dfii_pi0_rddata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_w; + wire builder_minsoc_csrbank2_dfii_pi0_rddata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_r; + wire builder_minsoc_csrbank2_dfii_pi0_rddata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_w; + wire builder_minsoc_csrbank2_dfii_pi0_rddata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_r; + wire builder_minsoc_csrbank2_dfii_pi0_rddata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_w; + wire builder_minsoc_csrbank2_dfii_pi0_rddata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_r; + wire builder_minsoc_csrbank2_dfii_pi0_rddata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_w; + wire builder_minsoc_csrbank2_dfii_pi1_command0_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_r; + wire builder_minsoc_csrbank2_dfii_pi1_command0_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_w; + wire builder_minsoc_csrbank2_dfii_pi1_address1_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_r; + wire builder_minsoc_csrbank2_dfii_pi1_address1_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_w; + wire builder_minsoc_csrbank2_dfii_pi1_address0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_r; + wire builder_minsoc_csrbank2_dfii_pi1_address0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_w; + wire builder_minsoc_csrbank2_dfii_pi1_baddress0_re; + wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_r; + wire builder_minsoc_csrbank2_dfii_pi1_baddress0_we; + wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_w; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; + wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; + wire builder_minsoc_csrbank2_dfii_pi1_rddata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_r; + wire builder_minsoc_csrbank2_dfii_pi1_rddata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_w; + wire builder_minsoc_csrbank2_dfii_pi1_rddata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_r; + wire builder_minsoc_csrbank2_dfii_pi1_rddata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_w; + wire builder_minsoc_csrbank2_dfii_pi1_rddata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_r; + wire builder_minsoc_csrbank2_dfii_pi1_rddata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_w; + wire builder_minsoc_csrbank2_dfii_pi1_rddata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_r; + wire builder_minsoc_csrbank2_dfii_pi1_rddata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_w; + wire builder_minsoc_csrbank2_dfii_pi2_command0_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_r; + wire builder_minsoc_csrbank2_dfii_pi2_command0_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_w; + wire builder_minsoc_csrbank2_dfii_pi2_address1_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_r; + wire builder_minsoc_csrbank2_dfii_pi2_address1_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_w; + wire builder_minsoc_csrbank2_dfii_pi2_address0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_r; + wire builder_minsoc_csrbank2_dfii_pi2_address0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_w; + wire builder_minsoc_csrbank2_dfii_pi2_baddress0_re; + wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_r; + wire builder_minsoc_csrbank2_dfii_pi2_baddress0_we; + wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_w; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; + wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; + wire builder_minsoc_csrbank2_dfii_pi2_rddata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_r; + wire builder_minsoc_csrbank2_dfii_pi2_rddata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_w; + wire builder_minsoc_csrbank2_dfii_pi2_rddata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_r; + wire builder_minsoc_csrbank2_dfii_pi2_rddata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_w; + wire builder_minsoc_csrbank2_dfii_pi2_rddata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_r; + wire builder_minsoc_csrbank2_dfii_pi2_rddata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_w; + wire builder_minsoc_csrbank2_dfii_pi2_rddata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_r; + wire builder_minsoc_csrbank2_dfii_pi2_rddata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_w; + wire builder_minsoc_csrbank2_dfii_pi3_command0_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_r; + wire builder_minsoc_csrbank2_dfii_pi3_command0_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_w; + wire builder_minsoc_csrbank2_dfii_pi3_address1_re; + wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_r; + wire builder_minsoc_csrbank2_dfii_pi3_address1_we; + wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_w; + wire builder_minsoc_csrbank2_dfii_pi3_address0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_r; + wire builder_minsoc_csrbank2_dfii_pi3_address0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_w; + wire builder_minsoc_csrbank2_dfii_pi3_baddress0_re; + wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_r; + wire builder_minsoc_csrbank2_dfii_pi3_baddress0_we; + wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_w; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; + wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; + wire builder_minsoc_csrbank2_dfii_pi3_rddata3_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_r; + wire builder_minsoc_csrbank2_dfii_pi3_rddata3_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_w; + wire builder_minsoc_csrbank2_dfii_pi3_rddata2_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_r; + wire builder_minsoc_csrbank2_dfii_pi3_rddata2_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_w; + wire builder_minsoc_csrbank2_dfii_pi3_rddata1_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_r; + wire builder_minsoc_csrbank2_dfii_pi3_rddata1_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_w; + wire builder_minsoc_csrbank2_dfii_pi3_rddata0_re; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_r; + wire builder_minsoc_csrbank2_dfii_pi3_rddata0_we; + wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_w; + wire builder_minsoc_csrbank2_sel; + wire [13:0] builder_minsoc_interface3_bank_bus_adr; + wire builder_minsoc_interface3_bank_bus_we; + wire [7:0] builder_minsoc_interface3_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface3_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank3_load3_re; + wire [7:0] builder_minsoc_csrbank3_load3_r; + wire builder_minsoc_csrbank3_load3_we; + wire [7:0] builder_minsoc_csrbank3_load3_w; + wire builder_minsoc_csrbank3_load2_re; + wire [7:0] builder_minsoc_csrbank3_load2_r; + wire builder_minsoc_csrbank3_load2_we; + wire [7:0] builder_minsoc_csrbank3_load2_w; + wire builder_minsoc_csrbank3_load1_re; + wire [7:0] builder_minsoc_csrbank3_load1_r; + wire builder_minsoc_csrbank3_load1_we; + wire [7:0] builder_minsoc_csrbank3_load1_w; + wire builder_minsoc_csrbank3_load0_re; + wire [7:0] builder_minsoc_csrbank3_load0_r; + wire builder_minsoc_csrbank3_load0_we; + wire [7:0] builder_minsoc_csrbank3_load0_w; + wire builder_minsoc_csrbank3_reload3_re; + wire [7:0] builder_minsoc_csrbank3_reload3_r; + wire builder_minsoc_csrbank3_reload3_we; + wire [7:0] builder_minsoc_csrbank3_reload3_w; + wire builder_minsoc_csrbank3_reload2_re; + wire [7:0] builder_minsoc_csrbank3_reload2_r; + wire builder_minsoc_csrbank3_reload2_we; + wire [7:0] builder_minsoc_csrbank3_reload2_w; + wire builder_minsoc_csrbank3_reload1_re; + wire [7:0] builder_minsoc_csrbank3_reload1_r; + wire builder_minsoc_csrbank3_reload1_we; + wire [7:0] builder_minsoc_csrbank3_reload1_w; + wire builder_minsoc_csrbank3_reload0_re; + wire [7:0] builder_minsoc_csrbank3_reload0_r; + wire builder_minsoc_csrbank3_reload0_we; + wire [7:0] builder_minsoc_csrbank3_reload0_w; + wire builder_minsoc_csrbank3_en0_re; + wire builder_minsoc_csrbank3_en0_r; + wire builder_minsoc_csrbank3_en0_we; + wire builder_minsoc_csrbank3_en0_w; + wire builder_minsoc_csrbank3_update_value0_re; + wire builder_minsoc_csrbank3_update_value0_r; + wire builder_minsoc_csrbank3_update_value0_we; + wire builder_minsoc_csrbank3_update_value0_w; + wire builder_minsoc_csrbank3_value3_re; + wire [7:0] builder_minsoc_csrbank3_value3_r; + wire builder_minsoc_csrbank3_value3_we; + wire [7:0] builder_minsoc_csrbank3_value3_w; + wire builder_minsoc_csrbank3_value2_re; + wire [7:0] builder_minsoc_csrbank3_value2_r; + wire builder_minsoc_csrbank3_value2_we; + wire [7:0] builder_minsoc_csrbank3_value2_w; + wire builder_minsoc_csrbank3_value1_re; + wire [7:0] builder_minsoc_csrbank3_value1_r; + wire builder_minsoc_csrbank3_value1_we; + wire [7:0] builder_minsoc_csrbank3_value1_w; + wire builder_minsoc_csrbank3_value0_re; + wire [7:0] builder_minsoc_csrbank3_value0_r; + wire builder_minsoc_csrbank3_value0_we; + wire [7:0] builder_minsoc_csrbank3_value0_w; + wire builder_minsoc_csrbank3_ev_enable0_re; + wire builder_minsoc_csrbank3_ev_enable0_r; + wire builder_minsoc_csrbank3_ev_enable0_we; + wire builder_minsoc_csrbank3_ev_enable0_w; + wire builder_minsoc_csrbank3_sel; + wire [13:0] builder_minsoc_interface4_bank_bus_adr; + wire builder_minsoc_interface4_bank_bus_we; + wire [7:0] builder_minsoc_interface4_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface4_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank4_txfull_re; + wire builder_minsoc_csrbank4_txfull_r; + wire builder_minsoc_csrbank4_txfull_we; + wire builder_minsoc_csrbank4_txfull_w; + wire builder_minsoc_csrbank4_rxempty_re; + wire builder_minsoc_csrbank4_rxempty_r; + wire builder_minsoc_csrbank4_rxempty_we; + wire builder_minsoc_csrbank4_rxempty_w; + wire builder_minsoc_csrbank4_ev_enable0_re; + wire [1:0] builder_minsoc_csrbank4_ev_enable0_r; + wire builder_minsoc_csrbank4_ev_enable0_we; + wire [1:0] builder_minsoc_csrbank4_ev_enable0_w; + wire builder_minsoc_csrbank4_sel; + wire [13:0] builder_minsoc_interface5_bank_bus_adr; + wire builder_minsoc_interface5_bank_bus_we; + wire [7:0] builder_minsoc_interface5_bank_bus_dat_w; + reg [7:0] builder_minsoc_interface5_bank_bus_dat_r = 8'd0; + wire builder_minsoc_csrbank5_tuning_word3_re; + wire [7:0] builder_minsoc_csrbank5_tuning_word3_r; + wire builder_minsoc_csrbank5_tuning_word3_we; + wire [7:0] builder_minsoc_csrbank5_tuning_word3_w; + wire builder_minsoc_csrbank5_tuning_word2_re; + wire [7:0] builder_minsoc_csrbank5_tuning_word2_r; + wire builder_minsoc_csrbank5_tuning_word2_we; + wire [7:0] builder_minsoc_csrbank5_tuning_word2_w; + wire builder_minsoc_csrbank5_tuning_word1_re; + wire [7:0] builder_minsoc_csrbank5_tuning_word1_r; + wire builder_minsoc_csrbank5_tuning_word1_we; + wire [7:0] builder_minsoc_csrbank5_tuning_word1_w; + wire builder_minsoc_csrbank5_tuning_word0_re; + wire [7:0] builder_minsoc_csrbank5_tuning_word0_r; + wire builder_minsoc_csrbank5_tuning_word0_we; + wire [7:0] builder_minsoc_csrbank5_tuning_word0_w; + wire builder_minsoc_csrbank5_sel; + wire [13:0] builder_minsoc_adr; + wire builder_minsoc_we; + wire [7:0] builder_minsoc_dat_w; + wire [7:0] builder_minsoc_dat_r; + reg builder_rhs_array_muxed0 = 1'd0; + reg [13:0] builder_rhs_array_muxed1 = 14'd0; + reg [2:0] builder_rhs_array_muxed2 = 3'd0; + reg builder_rhs_array_muxed3 = 1'd0; + reg builder_rhs_array_muxed4 = 1'd0; + reg builder_rhs_array_muxed5 = 1'd0; + reg builder_t_array_muxed0 = 1'd0; + reg builder_t_array_muxed1 = 1'd0; + reg builder_t_array_muxed2 = 1'd0; + reg builder_rhs_array_muxed6 = 1'd0; + reg [13:0] builder_rhs_array_muxed7 = 14'd0; + reg [2:0] builder_rhs_array_muxed8 = 3'd0; + reg builder_rhs_array_muxed9 = 1'd0; + reg builder_rhs_array_muxed10 = 1'd0; + reg builder_rhs_array_muxed11 = 1'd0; + reg builder_t_array_muxed3 = 1'd0; + reg builder_t_array_muxed4 = 1'd0; + reg builder_t_array_muxed5 = 1'd0; + reg [20:0] builder_rhs_array_muxed12 = 21'd0; + reg builder_rhs_array_muxed13 = 1'd0; + reg builder_rhs_array_muxed14 = 1'd0; + reg [20:0] builder_rhs_array_muxed15 = 21'd0; + reg builder_rhs_array_muxed16 = 1'd0; + reg builder_rhs_array_muxed17 = 1'd0; + reg [20:0] builder_rhs_array_muxed18 = 21'd0; + reg builder_rhs_array_muxed19 = 1'd0; + reg builder_rhs_array_muxed20 = 1'd0; + reg [20:0] builder_rhs_array_muxed21 = 21'd0; + reg builder_rhs_array_muxed22 = 1'd0; + reg builder_rhs_array_muxed23 = 1'd0; + reg [20:0] builder_rhs_array_muxed24 = 21'd0; + reg builder_rhs_array_muxed25 = 1'd0; + reg builder_rhs_array_muxed26 = 1'd0; + reg [20:0] builder_rhs_array_muxed27 = 21'd0; + reg builder_rhs_array_muxed28 = 1'd0; + reg builder_rhs_array_muxed29 = 1'd0; + reg [20:0] builder_rhs_array_muxed30 = 21'd0; + reg builder_rhs_array_muxed31 = 1'd0; + reg builder_rhs_array_muxed32 = 1'd0; + reg [20:0] builder_rhs_array_muxed33 = 21'd0; + reg builder_rhs_array_muxed34 = 1'd0; + reg builder_rhs_array_muxed35 = 1'd0; + reg [29:0] builder_rhs_array_muxed36 = 30'd0; + reg [31:0] builder_rhs_array_muxed37 = 32'd0; + reg [3:0] builder_rhs_array_muxed38 = 4'd0; + reg builder_rhs_array_muxed39 = 1'd0; + reg builder_rhs_array_muxed40 = 1'd0; + reg builder_rhs_array_muxed41 = 1'd0; + reg [2:0] builder_rhs_array_muxed42 = 3'd0; + reg [1:0] builder_rhs_array_muxed43 = 2'd0; + reg [29:0] builder_rhs_array_muxed44 = 30'd0; + reg [31:0] builder_rhs_array_muxed45 = 32'd0; + reg [3:0] builder_rhs_array_muxed46 = 4'd0; + reg builder_rhs_array_muxed47 = 1'd0; + reg builder_rhs_array_muxed48 = 1'd0; + reg builder_rhs_array_muxed49 = 1'd0; + reg [2:0] builder_rhs_array_muxed50 = 3'd0; + reg [1:0] builder_rhs_array_muxed51 = 2'd0; + reg [2:0] builder_array_muxed0 = 3'd0; + reg [13:0] builder_array_muxed1 = 14'd0; + reg builder_array_muxed2 = 1'd0; + reg builder_array_muxed3 = 1'd0; + reg builder_array_muxed4 = 1'd0; + reg builder_array_muxed5 = 1'd0; + reg builder_array_muxed6 = 1'd0; + reg [2:0] builder_array_muxed7 = 3'd0; + reg [13:0] builder_array_muxed8 = 14'd0; + reg builder_array_muxed9 = 1'd0; + reg builder_array_muxed10 = 1'd0; + reg builder_array_muxed11 = 1'd0; + reg builder_array_muxed12 = 1'd0; + reg builder_array_muxed13 = 1'd0; + reg [2:0] builder_array_muxed14 = 3'd0; + reg [13:0] builder_array_muxed15 = 14'd0; + reg builder_array_muxed16 = 1'd0; + reg builder_array_muxed17 = 1'd0; + reg builder_array_muxed18 = 1'd0; + reg builder_array_muxed19 = 1'd0; + reg builder_array_muxed20 = 1'd0; + reg [2:0] builder_array_muxed21 = 3'd0; + reg [13:0] builder_array_muxed22 = 14'd0; + reg builder_array_muxed23 = 1'd0; + reg builder_array_muxed24 = 1'd0; + reg builder_array_muxed25 = 1'd0; + reg builder_array_muxed26 = 1'd0; + reg builder_array_muxed27 = 1'd0; + (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg builder_regs0 = 1'd0; + (* async_reg = "true", dont_touch = "true" *) reg builder_regs1 = 1'd0; + wire builder_xilinxasyncresetsynchronizerimpl0; + wire builder_xilinxasyncresetsynchronizerimpl0_rst_meta; + wire builder_xilinxasyncresetsynchronizerimpl1; + wire builder_xilinxasyncresetsynchronizerimpl1_rst_meta; + wire builder_xilinxasyncresetsynchronizerimpl1_expr; + wire builder_xilinxasyncresetsynchronizerimpl2; + wire builder_xilinxasyncresetsynchronizerimpl2_rst_meta; + wire builder_xilinxasyncresetsynchronizerimpl2_expr; + wire builder_xilinxasyncresetsynchronizerimpl3; + wire builder_xilinxasyncresetsynchronizerimpl3_rst_meta; + + assign main_minsoc_cpu_reset = main_minsoc_ctrl_reset; + assign main_minsoc_ctrl_bus_error = builder_minsoc_error; + always @(*) begin + main_minsoc_cpu_interrupt <= 32'd0; + main_minsoc_cpu_interrupt[1] <= main_minsoc_timer0_irq; + main_minsoc_cpu_interrupt[0] <= main_minsoc_uart_irq; + end + assign main_minsoc_ctrl_reset = main_minsoc_ctrl_reset_re; + assign main_minsoc_ctrl_bus_errors_status = main_minsoc_ctrl_bus_errors; + assign main_minsoc_interface0_soc_bus_adr = main_minsoc_cpu_ibus_adr; + assign main_minsoc_interface0_soc_bus_dat_w = main_minsoc_cpu_ibus_dat_w; + assign main_minsoc_cpu_ibus_dat_r = main_minsoc_interface0_soc_bus_dat_r; + assign main_minsoc_interface0_soc_bus_sel = main_minsoc_cpu_ibus_sel; + assign main_minsoc_interface0_soc_bus_cyc = main_minsoc_cpu_ibus_cyc; + assign main_minsoc_interface0_soc_bus_stb = main_minsoc_cpu_ibus_stb; + assign main_minsoc_cpu_ibus_ack = main_minsoc_interface0_soc_bus_ack; + assign main_minsoc_interface0_soc_bus_we = main_minsoc_cpu_ibus_we; + assign main_minsoc_interface0_soc_bus_cti = main_minsoc_cpu_ibus_cti; + assign main_minsoc_interface0_soc_bus_bte = main_minsoc_cpu_ibus_bte; + assign main_minsoc_cpu_ibus_err = main_minsoc_interface0_soc_bus_err; + assign main_minsoc_interface1_soc_bus_adr = main_minsoc_cpu_dbus_adr; + assign main_minsoc_interface1_soc_bus_dat_w = main_minsoc_cpu_dbus_dat_w; + assign main_minsoc_cpu_dbus_dat_r = main_minsoc_interface1_soc_bus_dat_r; + assign main_minsoc_interface1_soc_bus_sel = main_minsoc_cpu_dbus_sel; + assign main_minsoc_interface1_soc_bus_cyc = main_minsoc_cpu_dbus_cyc; + assign main_minsoc_interface1_soc_bus_stb = main_minsoc_cpu_dbus_stb; + assign main_minsoc_cpu_dbus_ack = main_minsoc_interface1_soc_bus_ack; + assign main_minsoc_interface1_soc_bus_we = main_minsoc_cpu_dbus_we; + assign main_minsoc_interface1_soc_bus_cti = main_minsoc_cpu_dbus_cti; + assign main_minsoc_interface1_soc_bus_bte = main_minsoc_cpu_dbus_bte; + assign main_minsoc_cpu_dbus_err = main_minsoc_interface1_soc_bus_err; + assign main_minsoc_rom_adr = main_minsoc_rom_bus_adr[12:0]; + assign main_minsoc_rom_bus_dat_r = main_minsoc_rom_dat_r; + always @(*) begin + main_minsoc_sram_we <= 4'd0; + main_minsoc_sram_we[0] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[0]); + main_minsoc_sram_we[1] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[1]); + main_minsoc_sram_we[2] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[2]); + main_minsoc_sram_we[3] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[3]); + end + assign main_minsoc_sram_adr = main_minsoc_sram_bus_adr[9:0]; + assign main_minsoc_sram_bus_dat_r = main_minsoc_sram_dat_r; + assign main_minsoc_sram_dat_w = main_minsoc_sram_bus_dat_w; + assign main_minsoc_uart_uart_sink_valid = main_minsoc_source_valid; + assign main_minsoc_source_ready = main_minsoc_uart_uart_sink_ready; + assign main_minsoc_uart_uart_sink_first = main_minsoc_source_first; + assign main_minsoc_uart_uart_sink_last = main_minsoc_source_last; + assign main_minsoc_uart_uart_sink_payload_data = main_minsoc_source_payload_data; + assign main_minsoc_sink_valid = main_minsoc_uart_uart_source_valid; + assign main_minsoc_uart_uart_source_ready = main_minsoc_sink_ready; + assign main_minsoc_sink_first = main_minsoc_uart_uart_source_first; + assign main_minsoc_sink_last = main_minsoc_uart_uart_source_last; + assign main_minsoc_sink_payload_data = main_minsoc_uart_uart_source_payload_data; + assign main_minsoc_uart_tx_fifo_sink_valid = main_minsoc_uart_rxtx_re; + assign main_minsoc_uart_tx_fifo_sink_payload_data = main_minsoc_uart_rxtx_r; + assign main_minsoc_uart_txfull_status = (~main_minsoc_uart_tx_fifo_sink_ready); + assign main_minsoc_uart_uart_source_valid = main_minsoc_uart_tx_fifo_source_valid; + assign main_minsoc_uart_tx_fifo_source_ready = main_minsoc_uart_uart_source_ready; + assign main_minsoc_uart_uart_source_first = main_minsoc_uart_tx_fifo_source_first; + assign main_minsoc_uart_uart_source_last = main_minsoc_uart_tx_fifo_source_last; + assign main_minsoc_uart_uart_source_payload_data = main_minsoc_uart_tx_fifo_source_payload_data; + assign main_minsoc_uart_tx_trigger = (~main_minsoc_uart_tx_fifo_sink_ready); + assign main_minsoc_uart_rx_fifo_sink_valid = main_minsoc_uart_uart_sink_valid; + assign main_minsoc_uart_uart_sink_ready = main_minsoc_uart_rx_fifo_sink_ready; + assign main_minsoc_uart_rx_fifo_sink_first = main_minsoc_uart_uart_sink_first; + assign main_minsoc_uart_rx_fifo_sink_last = main_minsoc_uart_uart_sink_last; + assign main_minsoc_uart_rx_fifo_sink_payload_data = main_minsoc_uart_uart_sink_payload_data; + assign main_minsoc_uart_rxempty_status = (~main_minsoc_uart_rx_fifo_source_valid); + assign main_minsoc_uart_rxtx_w = main_minsoc_uart_rx_fifo_source_payload_data; + assign main_minsoc_uart_rx_fifo_source_ready = (main_minsoc_uart_rx_clear | (1'd0 & main_minsoc_uart_rxtx_we)); + assign main_minsoc_uart_rx_trigger = (~main_minsoc_uart_rx_fifo_source_valid); + always @(*) begin + main_minsoc_uart_tx_clear <= 1'd0; + if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[0])) begin + main_minsoc_uart_tx_clear <= 1'd1; + end + end + always @(*) begin + main_minsoc_uart_eventmanager_status_w <= 2'd0; + main_minsoc_uart_eventmanager_status_w[0] <= main_minsoc_uart_tx_status; + main_minsoc_uart_eventmanager_status_w[1] <= main_minsoc_uart_rx_status; + end + always @(*) begin + main_minsoc_uart_rx_clear <= 1'd0; + if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[1])) begin + main_minsoc_uart_rx_clear <= 1'd1; + end + end + always @(*) begin + main_minsoc_uart_eventmanager_pending_w <= 2'd0; + main_minsoc_uart_eventmanager_pending_w[0] <= main_minsoc_uart_tx_pending; + main_minsoc_uart_eventmanager_pending_w[1] <= main_minsoc_uart_rx_pending; + end + assign main_minsoc_uart_irq = ((main_minsoc_uart_eventmanager_pending_w[0] & main_minsoc_uart_eventmanager_storage[0]) | (main_minsoc_uart_eventmanager_pending_w[1] & main_minsoc_uart_eventmanager_storage[1])); + assign main_minsoc_uart_tx_status = main_minsoc_uart_tx_trigger; + assign main_minsoc_uart_rx_status = main_minsoc_uart_rx_trigger; + assign main_minsoc_uart_tx_fifo_syncfifo_din = { + main_minsoc_uart_tx_fifo_fifo_in_last, + main_minsoc_uart_tx_fifo_fifo_in_first, + main_minsoc_uart_tx_fifo_fifo_in_payload_data + }; + assign {main_minsoc_uart_tx_fifo_fifo_out_last, main_minsoc_uart_tx_fifo_fifo_out_first, main_minsoc_uart_tx_fifo_fifo_out_payload_data} = main_minsoc_uart_tx_fifo_syncfifo_dout; + assign main_minsoc_uart_tx_fifo_sink_ready = main_minsoc_uart_tx_fifo_syncfifo_writable; + assign main_minsoc_uart_tx_fifo_syncfifo_we = main_minsoc_uart_tx_fifo_sink_valid; + assign main_minsoc_uart_tx_fifo_fifo_in_first = main_minsoc_uart_tx_fifo_sink_first; + assign main_minsoc_uart_tx_fifo_fifo_in_last = main_minsoc_uart_tx_fifo_sink_last; + assign main_minsoc_uart_tx_fifo_fifo_in_payload_data = main_minsoc_uart_tx_fifo_sink_payload_data; + assign main_minsoc_uart_tx_fifo_source_valid = main_minsoc_uart_tx_fifo_readable; + assign main_minsoc_uart_tx_fifo_source_first = main_minsoc_uart_tx_fifo_fifo_out_first; + assign main_minsoc_uart_tx_fifo_source_last = main_minsoc_uart_tx_fifo_fifo_out_last; + assign main_minsoc_uart_tx_fifo_source_payload_data = main_minsoc_uart_tx_fifo_fifo_out_payload_data; + assign main_minsoc_uart_tx_fifo_re = main_minsoc_uart_tx_fifo_source_ready; + assign main_minsoc_uart_tx_fifo_syncfifo_re = (main_minsoc_uart_tx_fifo_syncfifo_readable & ((~main_minsoc_uart_tx_fifo_readable) | main_minsoc_uart_tx_fifo_re)); + assign main_minsoc_uart_tx_fifo_level1 = (main_minsoc_uart_tx_fifo_level0 + main_minsoc_uart_tx_fifo_readable); + always @(*) begin + main_minsoc_uart_tx_fifo_wrport_adr <= 4'd0; + if (main_minsoc_uart_tx_fifo_replace) begin + main_minsoc_uart_tx_fifo_wrport_adr <= (main_minsoc_uart_tx_fifo_produce - 1'd1); + end else begin + main_minsoc_uart_tx_fifo_wrport_adr <= main_minsoc_uart_tx_fifo_produce; + end + end + assign main_minsoc_uart_tx_fifo_wrport_dat_w = main_minsoc_uart_tx_fifo_syncfifo_din; + assign main_minsoc_uart_tx_fifo_wrport_we = (main_minsoc_uart_tx_fifo_syncfifo_we & (main_minsoc_uart_tx_fifo_syncfifo_writable | main_minsoc_uart_tx_fifo_replace)); + assign main_minsoc_uart_tx_fifo_do_read = (main_minsoc_uart_tx_fifo_syncfifo_readable & main_minsoc_uart_tx_fifo_syncfifo_re); + assign main_minsoc_uart_tx_fifo_rdport_adr = main_minsoc_uart_tx_fifo_consume; + assign main_minsoc_uart_tx_fifo_syncfifo_dout = main_minsoc_uart_tx_fifo_rdport_dat_r; + assign main_minsoc_uart_tx_fifo_rdport_re = main_minsoc_uart_tx_fifo_do_read; + assign main_minsoc_uart_tx_fifo_syncfifo_writable = (main_minsoc_uart_tx_fifo_level0 != 5'd16); + assign main_minsoc_uart_tx_fifo_syncfifo_readable = (main_minsoc_uart_tx_fifo_level0 != 1'd0); + assign main_minsoc_uart_rx_fifo_syncfifo_din = { + main_minsoc_uart_rx_fifo_fifo_in_last, + main_minsoc_uart_rx_fifo_fifo_in_first, + main_minsoc_uart_rx_fifo_fifo_in_payload_data + }; + assign {main_minsoc_uart_rx_fifo_fifo_out_last, main_minsoc_uart_rx_fifo_fifo_out_first, main_minsoc_uart_rx_fifo_fifo_out_payload_data} = main_minsoc_uart_rx_fifo_syncfifo_dout; + assign main_minsoc_uart_rx_fifo_sink_ready = main_minsoc_uart_rx_fifo_syncfifo_writable; + assign main_minsoc_uart_rx_fifo_syncfifo_we = main_minsoc_uart_rx_fifo_sink_valid; + assign main_minsoc_uart_rx_fifo_fifo_in_first = main_minsoc_uart_rx_fifo_sink_first; + assign main_minsoc_uart_rx_fifo_fifo_in_last = main_minsoc_uart_rx_fifo_sink_last; + assign main_minsoc_uart_rx_fifo_fifo_in_payload_data = main_minsoc_uart_rx_fifo_sink_payload_data; + assign main_minsoc_uart_rx_fifo_source_valid = main_minsoc_uart_rx_fifo_readable; + assign main_minsoc_uart_rx_fifo_source_first = main_minsoc_uart_rx_fifo_fifo_out_first; + assign main_minsoc_uart_rx_fifo_source_last = main_minsoc_uart_rx_fifo_fifo_out_last; + assign main_minsoc_uart_rx_fifo_source_payload_data = main_minsoc_uart_rx_fifo_fifo_out_payload_data; + assign main_minsoc_uart_rx_fifo_re = main_minsoc_uart_rx_fifo_source_ready; + assign main_minsoc_uart_rx_fifo_syncfifo_re = (main_minsoc_uart_rx_fifo_syncfifo_readable & ((~main_minsoc_uart_rx_fifo_readable) | main_minsoc_uart_rx_fifo_re)); + assign main_minsoc_uart_rx_fifo_level1 = (main_minsoc_uart_rx_fifo_level0 + main_minsoc_uart_rx_fifo_readable); + always @(*) begin + main_minsoc_uart_rx_fifo_wrport_adr <= 4'd0; + if (main_minsoc_uart_rx_fifo_replace) begin + main_minsoc_uart_rx_fifo_wrport_adr <= (main_minsoc_uart_rx_fifo_produce - 1'd1); + end else begin + main_minsoc_uart_rx_fifo_wrport_adr <= main_minsoc_uart_rx_fifo_produce; + end + end + assign main_minsoc_uart_rx_fifo_wrport_dat_w = main_minsoc_uart_rx_fifo_syncfifo_din; + assign main_minsoc_uart_rx_fifo_wrport_we = (main_minsoc_uart_rx_fifo_syncfifo_we & (main_minsoc_uart_rx_fifo_syncfifo_writable | main_minsoc_uart_rx_fifo_replace)); + assign main_minsoc_uart_rx_fifo_do_read = (main_minsoc_uart_rx_fifo_syncfifo_readable & main_minsoc_uart_rx_fifo_syncfifo_re); + assign main_minsoc_uart_rx_fifo_rdport_adr = main_minsoc_uart_rx_fifo_consume; + assign main_minsoc_uart_rx_fifo_syncfifo_dout = main_minsoc_uart_rx_fifo_rdport_dat_r; + assign main_minsoc_uart_rx_fifo_rdport_re = main_minsoc_uart_rx_fifo_do_read; + assign main_minsoc_uart_rx_fifo_syncfifo_writable = (main_minsoc_uart_rx_fifo_level0 != 5'd16); + assign main_minsoc_uart_rx_fifo_syncfifo_readable = (main_minsoc_uart_rx_fifo_level0 != 1'd0); + assign main_minsoc_timer0_zero_trigger = (main_minsoc_timer0_value != 1'd0); + assign main_minsoc_timer0_eventmanager_status_w = main_minsoc_timer0_zero_status; + always @(*) begin + main_minsoc_timer0_zero_clear <= 1'd0; + if ((main_minsoc_timer0_eventmanager_pending_re & main_minsoc_timer0_eventmanager_pending_r)) begin + main_minsoc_timer0_zero_clear <= 1'd1; + end + end + assign main_minsoc_timer0_eventmanager_pending_w = main_minsoc_timer0_zero_pending; + assign main_minsoc_timer0_irq = (main_minsoc_timer0_eventmanager_pending_w & main_minsoc_timer0_eventmanager_storage); + assign main_minsoc_timer0_zero_status = main_minsoc_timer0_zero_trigger; + assign main_minsoc_interface_dat_w = main_minsoc_bus_wishbone_dat_w; + assign main_minsoc_bus_wishbone_dat_r = main_minsoc_interface_dat_r; + always @(*) begin + main_minsoc_interface_adr <= 14'd0; + main_minsoc_interface_we <= 1'd0; + builder_wb2csr_next_state <= 1'd0; + main_minsoc_bus_wishbone_ack <= 1'd0; + builder_wb2csr_next_state <= builder_wb2csr_state; + case (builder_wb2csr_state) + 1'd1: begin + main_minsoc_bus_wishbone_ack <= 1'd1; + builder_wb2csr_next_state <= 1'd0; + end + default: begin + if ((main_minsoc_bus_wishbone_cyc & main_minsoc_bus_wishbone_stb)) begin + main_minsoc_interface_adr <= main_minsoc_bus_wishbone_adr; + main_minsoc_interface_we <= main_minsoc_bus_wishbone_we; + builder_wb2csr_next_state <= 1'd1; + end + end + endcase + end + assign main_reset = (~cpu_reset); + always @(*) begin + main_a7ddrphy_dqs_serdes_pattern <= 8'd85; + main_a7ddrphy_dqs_serdes_pattern <= 7'd85; + if ((main_a7ddrphy_dqs_preamble | main_a7ddrphy_dqs_postamble)) begin + main_a7ddrphy_dqs_serdes_pattern <= 1'd0; + end + end + assign main_a7ddrphy_bitslip0_i = main_a7ddrphy_dq_i_data0; + assign main_a7ddrphy_bitslip1_i = main_a7ddrphy_dq_i_data1; + assign main_a7ddrphy_bitslip2_i = main_a7ddrphy_dq_i_data2; + assign main_a7ddrphy_bitslip3_i = main_a7ddrphy_dq_i_data3; + assign main_a7ddrphy_bitslip4_i = main_a7ddrphy_dq_i_data4; + assign main_a7ddrphy_bitslip5_i = main_a7ddrphy_dq_i_data5; + assign main_a7ddrphy_bitslip6_i = main_a7ddrphy_dq_i_data6; + assign main_a7ddrphy_bitslip7_i = main_a7ddrphy_dq_i_data7; + assign main_a7ddrphy_bitslip8_i = main_a7ddrphy_dq_i_data8; + assign main_a7ddrphy_bitslip9_i = main_a7ddrphy_dq_i_data9; + assign main_a7ddrphy_bitslip10_i = main_a7ddrphy_dq_i_data10; + assign main_a7ddrphy_bitslip11_i = main_a7ddrphy_dq_i_data11; + assign main_a7ddrphy_bitslip12_i = main_a7ddrphy_dq_i_data12; + assign main_a7ddrphy_bitslip13_i = main_a7ddrphy_dq_i_data13; + assign main_a7ddrphy_bitslip14_i = main_a7ddrphy_dq_i_data14; + assign main_a7ddrphy_bitslip15_i = main_a7ddrphy_dq_i_data15; + always @(*) begin + main_a7ddrphy_dfi_p0_rddata <= 32'd0; + main_a7ddrphy_dfi_p0_rddata[0] <= main_a7ddrphy_bitslip0_o[0]; + main_a7ddrphy_dfi_p0_rddata[16] <= main_a7ddrphy_bitslip0_o[1]; + main_a7ddrphy_dfi_p0_rddata[1] <= main_a7ddrphy_bitslip1_o[0]; + main_a7ddrphy_dfi_p0_rddata[17] <= main_a7ddrphy_bitslip1_o[1]; + main_a7ddrphy_dfi_p0_rddata[2] <= main_a7ddrphy_bitslip2_o[0]; + main_a7ddrphy_dfi_p0_rddata[18] <= main_a7ddrphy_bitslip2_o[1]; + main_a7ddrphy_dfi_p0_rddata[3] <= main_a7ddrphy_bitslip3_o[0]; + main_a7ddrphy_dfi_p0_rddata[19] <= main_a7ddrphy_bitslip3_o[1]; + main_a7ddrphy_dfi_p0_rddata[4] <= main_a7ddrphy_bitslip4_o[0]; + main_a7ddrphy_dfi_p0_rddata[20] <= main_a7ddrphy_bitslip4_o[1]; + main_a7ddrphy_dfi_p0_rddata[5] <= main_a7ddrphy_bitslip5_o[0]; + main_a7ddrphy_dfi_p0_rddata[21] <= main_a7ddrphy_bitslip5_o[1]; + main_a7ddrphy_dfi_p0_rddata[6] <= main_a7ddrphy_bitslip6_o[0]; + main_a7ddrphy_dfi_p0_rddata[22] <= main_a7ddrphy_bitslip6_o[1]; + main_a7ddrphy_dfi_p0_rddata[7] <= main_a7ddrphy_bitslip7_o[0]; + main_a7ddrphy_dfi_p0_rddata[23] <= main_a7ddrphy_bitslip7_o[1]; + main_a7ddrphy_dfi_p0_rddata[8] <= main_a7ddrphy_bitslip8_o[0]; + main_a7ddrphy_dfi_p0_rddata[24] <= main_a7ddrphy_bitslip8_o[1]; + main_a7ddrphy_dfi_p0_rddata[9] <= main_a7ddrphy_bitslip9_o[0]; + main_a7ddrphy_dfi_p0_rddata[25] <= main_a7ddrphy_bitslip9_o[1]; + main_a7ddrphy_dfi_p0_rddata[10] <= main_a7ddrphy_bitslip10_o[0]; + main_a7ddrphy_dfi_p0_rddata[26] <= main_a7ddrphy_bitslip10_o[1]; + main_a7ddrphy_dfi_p0_rddata[11] <= main_a7ddrphy_bitslip11_o[0]; + main_a7ddrphy_dfi_p0_rddata[27] <= main_a7ddrphy_bitslip11_o[1]; + main_a7ddrphy_dfi_p0_rddata[12] <= main_a7ddrphy_bitslip12_o[0]; + main_a7ddrphy_dfi_p0_rddata[28] <= main_a7ddrphy_bitslip12_o[1]; + main_a7ddrphy_dfi_p0_rddata[13] <= main_a7ddrphy_bitslip13_o[0]; + main_a7ddrphy_dfi_p0_rddata[29] <= main_a7ddrphy_bitslip13_o[1]; + main_a7ddrphy_dfi_p0_rddata[14] <= main_a7ddrphy_bitslip14_o[0]; + main_a7ddrphy_dfi_p0_rddata[30] <= main_a7ddrphy_bitslip14_o[1]; + main_a7ddrphy_dfi_p0_rddata[15] <= main_a7ddrphy_bitslip15_o[0]; + main_a7ddrphy_dfi_p0_rddata[31] <= main_a7ddrphy_bitslip15_o[1]; + end + always @(*) begin + main_a7ddrphy_dfi_p1_rddata <= 32'd0; + main_a7ddrphy_dfi_p1_rddata[0] <= main_a7ddrphy_bitslip0_o[2]; + main_a7ddrphy_dfi_p1_rddata[16] <= main_a7ddrphy_bitslip0_o[3]; + main_a7ddrphy_dfi_p1_rddata[1] <= main_a7ddrphy_bitslip1_o[2]; + main_a7ddrphy_dfi_p1_rddata[17] <= main_a7ddrphy_bitslip1_o[3]; + main_a7ddrphy_dfi_p1_rddata[2] <= main_a7ddrphy_bitslip2_o[2]; + main_a7ddrphy_dfi_p1_rddata[18] <= main_a7ddrphy_bitslip2_o[3]; + main_a7ddrphy_dfi_p1_rddata[3] <= main_a7ddrphy_bitslip3_o[2]; + main_a7ddrphy_dfi_p1_rddata[19] <= main_a7ddrphy_bitslip3_o[3]; + main_a7ddrphy_dfi_p1_rddata[4] <= main_a7ddrphy_bitslip4_o[2]; + main_a7ddrphy_dfi_p1_rddata[20] <= main_a7ddrphy_bitslip4_o[3]; + main_a7ddrphy_dfi_p1_rddata[5] <= main_a7ddrphy_bitslip5_o[2]; + main_a7ddrphy_dfi_p1_rddata[21] <= main_a7ddrphy_bitslip5_o[3]; + main_a7ddrphy_dfi_p1_rddata[6] <= main_a7ddrphy_bitslip6_o[2]; + main_a7ddrphy_dfi_p1_rddata[22] <= main_a7ddrphy_bitslip6_o[3]; + main_a7ddrphy_dfi_p1_rddata[7] <= main_a7ddrphy_bitslip7_o[2]; + main_a7ddrphy_dfi_p1_rddata[23] <= main_a7ddrphy_bitslip7_o[3]; + main_a7ddrphy_dfi_p1_rddata[8] <= main_a7ddrphy_bitslip8_o[2]; + main_a7ddrphy_dfi_p1_rddata[24] <= main_a7ddrphy_bitslip8_o[3]; + main_a7ddrphy_dfi_p1_rddata[9] <= main_a7ddrphy_bitslip9_o[2]; + main_a7ddrphy_dfi_p1_rddata[25] <= main_a7ddrphy_bitslip9_o[3]; + main_a7ddrphy_dfi_p1_rddata[10] <= main_a7ddrphy_bitslip10_o[2]; + main_a7ddrphy_dfi_p1_rddata[26] <= main_a7ddrphy_bitslip10_o[3]; + main_a7ddrphy_dfi_p1_rddata[11] <= main_a7ddrphy_bitslip11_o[2]; + main_a7ddrphy_dfi_p1_rddata[27] <= main_a7ddrphy_bitslip11_o[3]; + main_a7ddrphy_dfi_p1_rddata[12] <= main_a7ddrphy_bitslip12_o[2]; + main_a7ddrphy_dfi_p1_rddata[28] <= main_a7ddrphy_bitslip12_o[3]; + main_a7ddrphy_dfi_p1_rddata[13] <= main_a7ddrphy_bitslip13_o[2]; + main_a7ddrphy_dfi_p1_rddata[29] <= main_a7ddrphy_bitslip13_o[3]; + main_a7ddrphy_dfi_p1_rddata[14] <= main_a7ddrphy_bitslip14_o[2]; + main_a7ddrphy_dfi_p1_rddata[30] <= main_a7ddrphy_bitslip14_o[3]; + main_a7ddrphy_dfi_p1_rddata[15] <= main_a7ddrphy_bitslip15_o[2]; + main_a7ddrphy_dfi_p1_rddata[31] <= main_a7ddrphy_bitslip15_o[3]; + end + always @(*) begin + main_a7ddrphy_dfi_p2_rddata <= 32'd0; + main_a7ddrphy_dfi_p2_rddata[0] <= main_a7ddrphy_bitslip0_o[4]; + main_a7ddrphy_dfi_p2_rddata[16] <= main_a7ddrphy_bitslip0_o[5]; + main_a7ddrphy_dfi_p2_rddata[1] <= main_a7ddrphy_bitslip1_o[4]; + main_a7ddrphy_dfi_p2_rddata[17] <= main_a7ddrphy_bitslip1_o[5]; + main_a7ddrphy_dfi_p2_rddata[2] <= main_a7ddrphy_bitslip2_o[4]; + main_a7ddrphy_dfi_p2_rddata[18] <= main_a7ddrphy_bitslip2_o[5]; + main_a7ddrphy_dfi_p2_rddata[3] <= main_a7ddrphy_bitslip3_o[4]; + main_a7ddrphy_dfi_p2_rddata[19] <= main_a7ddrphy_bitslip3_o[5]; + main_a7ddrphy_dfi_p2_rddata[4] <= main_a7ddrphy_bitslip4_o[4]; + main_a7ddrphy_dfi_p2_rddata[20] <= main_a7ddrphy_bitslip4_o[5]; + main_a7ddrphy_dfi_p2_rddata[5] <= main_a7ddrphy_bitslip5_o[4]; + main_a7ddrphy_dfi_p2_rddata[21] <= main_a7ddrphy_bitslip5_o[5]; + main_a7ddrphy_dfi_p2_rddata[6] <= main_a7ddrphy_bitslip6_o[4]; + main_a7ddrphy_dfi_p2_rddata[22] <= main_a7ddrphy_bitslip6_o[5]; + main_a7ddrphy_dfi_p2_rddata[7] <= main_a7ddrphy_bitslip7_o[4]; + main_a7ddrphy_dfi_p2_rddata[23] <= main_a7ddrphy_bitslip7_o[5]; + main_a7ddrphy_dfi_p2_rddata[8] <= main_a7ddrphy_bitslip8_o[4]; + main_a7ddrphy_dfi_p2_rddata[24] <= main_a7ddrphy_bitslip8_o[5]; + main_a7ddrphy_dfi_p2_rddata[9] <= main_a7ddrphy_bitslip9_o[4]; + main_a7ddrphy_dfi_p2_rddata[25] <= main_a7ddrphy_bitslip9_o[5]; + main_a7ddrphy_dfi_p2_rddata[10] <= main_a7ddrphy_bitslip10_o[4]; + main_a7ddrphy_dfi_p2_rddata[26] <= main_a7ddrphy_bitslip10_o[5]; + main_a7ddrphy_dfi_p2_rddata[11] <= main_a7ddrphy_bitslip11_o[4]; + main_a7ddrphy_dfi_p2_rddata[27] <= main_a7ddrphy_bitslip11_o[5]; + main_a7ddrphy_dfi_p2_rddata[12] <= main_a7ddrphy_bitslip12_o[4]; + main_a7ddrphy_dfi_p2_rddata[28] <= main_a7ddrphy_bitslip12_o[5]; + main_a7ddrphy_dfi_p2_rddata[13] <= main_a7ddrphy_bitslip13_o[4]; + main_a7ddrphy_dfi_p2_rddata[29] <= main_a7ddrphy_bitslip13_o[5]; + main_a7ddrphy_dfi_p2_rddata[14] <= main_a7ddrphy_bitslip14_o[4]; + main_a7ddrphy_dfi_p2_rddata[30] <= main_a7ddrphy_bitslip14_o[5]; + main_a7ddrphy_dfi_p2_rddata[15] <= main_a7ddrphy_bitslip15_o[4]; + main_a7ddrphy_dfi_p2_rddata[31] <= main_a7ddrphy_bitslip15_o[5]; + end + always @(*) begin + main_a7ddrphy_dfi_p3_rddata <= 32'd0; + main_a7ddrphy_dfi_p3_rddata[0] <= main_a7ddrphy_bitslip0_o[6]; + main_a7ddrphy_dfi_p3_rddata[16] <= main_a7ddrphy_bitslip0_o[7]; + main_a7ddrphy_dfi_p3_rddata[1] <= main_a7ddrphy_bitslip1_o[6]; + main_a7ddrphy_dfi_p3_rddata[17] <= main_a7ddrphy_bitslip1_o[7]; + main_a7ddrphy_dfi_p3_rddata[2] <= main_a7ddrphy_bitslip2_o[6]; + main_a7ddrphy_dfi_p3_rddata[18] <= main_a7ddrphy_bitslip2_o[7]; + main_a7ddrphy_dfi_p3_rddata[3] <= main_a7ddrphy_bitslip3_o[6]; + main_a7ddrphy_dfi_p3_rddata[19] <= main_a7ddrphy_bitslip3_o[7]; + main_a7ddrphy_dfi_p3_rddata[4] <= main_a7ddrphy_bitslip4_o[6]; + main_a7ddrphy_dfi_p3_rddata[20] <= main_a7ddrphy_bitslip4_o[7]; + main_a7ddrphy_dfi_p3_rddata[5] <= main_a7ddrphy_bitslip5_o[6]; + main_a7ddrphy_dfi_p3_rddata[21] <= main_a7ddrphy_bitslip5_o[7]; + main_a7ddrphy_dfi_p3_rddata[6] <= main_a7ddrphy_bitslip6_o[6]; + main_a7ddrphy_dfi_p3_rddata[22] <= main_a7ddrphy_bitslip6_o[7]; + main_a7ddrphy_dfi_p3_rddata[7] <= main_a7ddrphy_bitslip7_o[6]; + main_a7ddrphy_dfi_p3_rddata[23] <= main_a7ddrphy_bitslip7_o[7]; + main_a7ddrphy_dfi_p3_rddata[8] <= main_a7ddrphy_bitslip8_o[6]; + main_a7ddrphy_dfi_p3_rddata[24] <= main_a7ddrphy_bitslip8_o[7]; + main_a7ddrphy_dfi_p3_rddata[9] <= main_a7ddrphy_bitslip9_o[6]; + main_a7ddrphy_dfi_p3_rddata[25] <= main_a7ddrphy_bitslip9_o[7]; + main_a7ddrphy_dfi_p3_rddata[10] <= main_a7ddrphy_bitslip10_o[6]; + main_a7ddrphy_dfi_p3_rddata[26] <= main_a7ddrphy_bitslip10_o[7]; + main_a7ddrphy_dfi_p3_rddata[11] <= main_a7ddrphy_bitslip11_o[6]; + main_a7ddrphy_dfi_p3_rddata[27] <= main_a7ddrphy_bitslip11_o[7]; + main_a7ddrphy_dfi_p3_rddata[12] <= main_a7ddrphy_bitslip12_o[6]; + main_a7ddrphy_dfi_p3_rddata[28] <= main_a7ddrphy_bitslip12_o[7]; + main_a7ddrphy_dfi_p3_rddata[13] <= main_a7ddrphy_bitslip13_o[6]; + main_a7ddrphy_dfi_p3_rddata[29] <= main_a7ddrphy_bitslip13_o[7]; + main_a7ddrphy_dfi_p3_rddata[14] <= main_a7ddrphy_bitslip14_o[6]; + main_a7ddrphy_dfi_p3_rddata[30] <= main_a7ddrphy_bitslip14_o[7]; + main_a7ddrphy_dfi_p3_rddata[15] <= main_a7ddrphy_bitslip15_o[6]; + main_a7ddrphy_dfi_p3_rddata[31] <= main_a7ddrphy_bitslip15_o[7]; + end + assign main_a7ddrphy_oe = ((main_a7ddrphy_last_wrdata_en[1] | main_a7ddrphy_last_wrdata_en[2]) | main_a7ddrphy_last_wrdata_en[3]); + assign main_a7ddrphy_dqs_preamble = (main_a7ddrphy_last_wrdata_en[1] & (~main_a7ddrphy_last_wrdata_en[2])); + assign main_a7ddrphy_dqs_postamble = (main_a7ddrphy_last_wrdata_en[3] & (~main_a7ddrphy_last_wrdata_en[2])); + assign main_a7ddrphy_dfi_p0_address = main_sdram_master_p0_address; + assign main_a7ddrphy_dfi_p0_bank = main_sdram_master_p0_bank; + assign main_a7ddrphy_dfi_p0_cas_n = main_sdram_master_p0_cas_n; + assign main_a7ddrphy_dfi_p0_cs_n = main_sdram_master_p0_cs_n; + assign main_a7ddrphy_dfi_p0_ras_n = main_sdram_master_p0_ras_n; + assign main_a7ddrphy_dfi_p0_we_n = main_sdram_master_p0_we_n; + assign main_a7ddrphy_dfi_p0_cke = main_sdram_master_p0_cke; + assign main_a7ddrphy_dfi_p0_odt = main_sdram_master_p0_odt; + assign main_a7ddrphy_dfi_p0_reset_n = main_sdram_master_p0_reset_n; + assign main_a7ddrphy_dfi_p0_act_n = main_sdram_master_p0_act_n; + assign main_a7ddrphy_dfi_p0_wrdata = main_sdram_master_p0_wrdata; + assign main_a7ddrphy_dfi_p0_wrdata_en = main_sdram_master_p0_wrdata_en; + assign main_a7ddrphy_dfi_p0_wrdata_mask = main_sdram_master_p0_wrdata_mask; + assign main_a7ddrphy_dfi_p0_rddata_en = main_sdram_master_p0_rddata_en; + assign main_sdram_master_p0_rddata = main_a7ddrphy_dfi_p0_rddata; + assign main_sdram_master_p0_rddata_valid = main_a7ddrphy_dfi_p0_rddata_valid; + assign main_a7ddrphy_dfi_p1_address = main_sdram_master_p1_address; + assign main_a7ddrphy_dfi_p1_bank = main_sdram_master_p1_bank; + assign main_a7ddrphy_dfi_p1_cas_n = main_sdram_master_p1_cas_n; + assign main_a7ddrphy_dfi_p1_cs_n = main_sdram_master_p1_cs_n; + assign main_a7ddrphy_dfi_p1_ras_n = main_sdram_master_p1_ras_n; + assign main_a7ddrphy_dfi_p1_we_n = main_sdram_master_p1_we_n; + assign main_a7ddrphy_dfi_p1_cke = main_sdram_master_p1_cke; + assign main_a7ddrphy_dfi_p1_odt = main_sdram_master_p1_odt; + assign main_a7ddrphy_dfi_p1_reset_n = main_sdram_master_p1_reset_n; + assign main_a7ddrphy_dfi_p1_act_n = main_sdram_master_p1_act_n; + assign main_a7ddrphy_dfi_p1_wrdata = main_sdram_master_p1_wrdata; + assign main_a7ddrphy_dfi_p1_wrdata_en = main_sdram_master_p1_wrdata_en; + assign main_a7ddrphy_dfi_p1_wrdata_mask = main_sdram_master_p1_wrdata_mask; + assign main_a7ddrphy_dfi_p1_rddata_en = main_sdram_master_p1_rddata_en; + assign main_sdram_master_p1_rddata = main_a7ddrphy_dfi_p1_rddata; + assign main_sdram_master_p1_rddata_valid = main_a7ddrphy_dfi_p1_rddata_valid; + assign main_a7ddrphy_dfi_p2_address = main_sdram_master_p2_address; + assign main_a7ddrphy_dfi_p2_bank = main_sdram_master_p2_bank; + assign main_a7ddrphy_dfi_p2_cas_n = main_sdram_master_p2_cas_n; + assign main_a7ddrphy_dfi_p2_cs_n = main_sdram_master_p2_cs_n; + assign main_a7ddrphy_dfi_p2_ras_n = main_sdram_master_p2_ras_n; + assign main_a7ddrphy_dfi_p2_we_n = main_sdram_master_p2_we_n; + assign main_a7ddrphy_dfi_p2_cke = main_sdram_master_p2_cke; + assign main_a7ddrphy_dfi_p2_odt = main_sdram_master_p2_odt; + assign main_a7ddrphy_dfi_p2_reset_n = main_sdram_master_p2_reset_n; + assign main_a7ddrphy_dfi_p2_act_n = main_sdram_master_p2_act_n; + assign main_a7ddrphy_dfi_p2_wrdata = main_sdram_master_p2_wrdata; + assign main_a7ddrphy_dfi_p2_wrdata_en = main_sdram_master_p2_wrdata_en; + assign main_a7ddrphy_dfi_p2_wrdata_mask = main_sdram_master_p2_wrdata_mask; + assign main_a7ddrphy_dfi_p2_rddata_en = main_sdram_master_p2_rddata_en; + assign main_sdram_master_p2_rddata = main_a7ddrphy_dfi_p2_rddata; + assign main_sdram_master_p2_rddata_valid = main_a7ddrphy_dfi_p2_rddata_valid; + assign main_a7ddrphy_dfi_p3_address = main_sdram_master_p3_address; + assign main_a7ddrphy_dfi_p3_bank = main_sdram_master_p3_bank; + assign main_a7ddrphy_dfi_p3_cas_n = main_sdram_master_p3_cas_n; + assign main_a7ddrphy_dfi_p3_cs_n = main_sdram_master_p3_cs_n; + assign main_a7ddrphy_dfi_p3_ras_n = main_sdram_master_p3_ras_n; + assign main_a7ddrphy_dfi_p3_we_n = main_sdram_master_p3_we_n; + assign main_a7ddrphy_dfi_p3_cke = main_sdram_master_p3_cke; + assign main_a7ddrphy_dfi_p3_odt = main_sdram_master_p3_odt; + assign main_a7ddrphy_dfi_p3_reset_n = main_sdram_master_p3_reset_n; + assign main_a7ddrphy_dfi_p3_act_n = main_sdram_master_p3_act_n; + assign main_a7ddrphy_dfi_p3_wrdata = main_sdram_master_p3_wrdata; + assign main_a7ddrphy_dfi_p3_wrdata_en = main_sdram_master_p3_wrdata_en; + assign main_a7ddrphy_dfi_p3_wrdata_mask = main_sdram_master_p3_wrdata_mask; + assign main_a7ddrphy_dfi_p3_rddata_en = main_sdram_master_p3_rddata_en; + assign main_sdram_master_p3_rddata = main_a7ddrphy_dfi_p3_rddata; + assign main_sdram_master_p3_rddata_valid = main_a7ddrphy_dfi_p3_rddata_valid; + assign main_sdram_slave_p0_address = main_sdram_dfi_p0_address; + assign main_sdram_slave_p0_bank = main_sdram_dfi_p0_bank; + assign main_sdram_slave_p0_cas_n = main_sdram_dfi_p0_cas_n; + assign main_sdram_slave_p0_cs_n = main_sdram_dfi_p0_cs_n; + assign main_sdram_slave_p0_ras_n = main_sdram_dfi_p0_ras_n; + assign main_sdram_slave_p0_we_n = main_sdram_dfi_p0_we_n; + assign main_sdram_slave_p0_cke = main_sdram_dfi_p0_cke; + assign main_sdram_slave_p0_odt = main_sdram_dfi_p0_odt; + assign main_sdram_slave_p0_reset_n = main_sdram_dfi_p0_reset_n; + assign main_sdram_slave_p0_act_n = main_sdram_dfi_p0_act_n; + assign main_sdram_slave_p0_wrdata = main_sdram_dfi_p0_wrdata; + assign main_sdram_slave_p0_wrdata_en = main_sdram_dfi_p0_wrdata_en; + assign main_sdram_slave_p0_wrdata_mask = main_sdram_dfi_p0_wrdata_mask; + assign main_sdram_slave_p0_rddata_en = main_sdram_dfi_p0_rddata_en; + assign main_sdram_dfi_p0_rddata = main_sdram_slave_p0_rddata; + assign main_sdram_dfi_p0_rddata_valid = main_sdram_slave_p0_rddata_valid; + assign main_sdram_slave_p1_address = main_sdram_dfi_p1_address; + assign main_sdram_slave_p1_bank = main_sdram_dfi_p1_bank; + assign main_sdram_slave_p1_cas_n = main_sdram_dfi_p1_cas_n; + assign main_sdram_slave_p1_cs_n = main_sdram_dfi_p1_cs_n; + assign main_sdram_slave_p1_ras_n = main_sdram_dfi_p1_ras_n; + assign main_sdram_slave_p1_we_n = main_sdram_dfi_p1_we_n; + assign main_sdram_slave_p1_cke = main_sdram_dfi_p1_cke; + assign main_sdram_slave_p1_odt = main_sdram_dfi_p1_odt; + assign main_sdram_slave_p1_reset_n = main_sdram_dfi_p1_reset_n; + assign main_sdram_slave_p1_act_n = main_sdram_dfi_p1_act_n; + assign main_sdram_slave_p1_wrdata = main_sdram_dfi_p1_wrdata; + assign main_sdram_slave_p1_wrdata_en = main_sdram_dfi_p1_wrdata_en; + assign main_sdram_slave_p1_wrdata_mask = main_sdram_dfi_p1_wrdata_mask; + assign main_sdram_slave_p1_rddata_en = main_sdram_dfi_p1_rddata_en; + assign main_sdram_dfi_p1_rddata = main_sdram_slave_p1_rddata; + assign main_sdram_dfi_p1_rddata_valid = main_sdram_slave_p1_rddata_valid; + assign main_sdram_slave_p2_address = main_sdram_dfi_p2_address; + assign main_sdram_slave_p2_bank = main_sdram_dfi_p2_bank; + assign main_sdram_slave_p2_cas_n = main_sdram_dfi_p2_cas_n; + assign main_sdram_slave_p2_cs_n = main_sdram_dfi_p2_cs_n; + assign main_sdram_slave_p2_ras_n = main_sdram_dfi_p2_ras_n; + assign main_sdram_slave_p2_we_n = main_sdram_dfi_p2_we_n; + assign main_sdram_slave_p2_cke = main_sdram_dfi_p2_cke; + assign main_sdram_slave_p2_odt = main_sdram_dfi_p2_odt; + assign main_sdram_slave_p2_reset_n = main_sdram_dfi_p2_reset_n; + assign main_sdram_slave_p2_act_n = main_sdram_dfi_p2_act_n; + assign main_sdram_slave_p2_wrdata = main_sdram_dfi_p2_wrdata; + assign main_sdram_slave_p2_wrdata_en = main_sdram_dfi_p2_wrdata_en; + assign main_sdram_slave_p2_wrdata_mask = main_sdram_dfi_p2_wrdata_mask; + assign main_sdram_slave_p2_rddata_en = main_sdram_dfi_p2_rddata_en; + assign main_sdram_dfi_p2_rddata = main_sdram_slave_p2_rddata; + assign main_sdram_dfi_p2_rddata_valid = main_sdram_slave_p2_rddata_valid; + assign main_sdram_slave_p3_address = main_sdram_dfi_p3_address; + assign main_sdram_slave_p3_bank = main_sdram_dfi_p3_bank; + assign main_sdram_slave_p3_cas_n = main_sdram_dfi_p3_cas_n; + assign main_sdram_slave_p3_cs_n = main_sdram_dfi_p3_cs_n; + assign main_sdram_slave_p3_ras_n = main_sdram_dfi_p3_ras_n; + assign main_sdram_slave_p3_we_n = main_sdram_dfi_p3_we_n; + assign main_sdram_slave_p3_cke = main_sdram_dfi_p3_cke; + assign main_sdram_slave_p3_odt = main_sdram_dfi_p3_odt; + assign main_sdram_slave_p3_reset_n = main_sdram_dfi_p3_reset_n; + assign main_sdram_slave_p3_act_n = main_sdram_dfi_p3_act_n; + assign main_sdram_slave_p3_wrdata = main_sdram_dfi_p3_wrdata; + assign main_sdram_slave_p3_wrdata_en = main_sdram_dfi_p3_wrdata_en; + assign main_sdram_slave_p3_wrdata_mask = main_sdram_dfi_p3_wrdata_mask; + assign main_sdram_slave_p3_rddata_en = main_sdram_dfi_p3_rddata_en; + assign main_sdram_dfi_p3_rddata = main_sdram_slave_p3_rddata; + assign main_sdram_dfi_p3_rddata_valid = main_sdram_slave_p3_rddata_valid; + always @(*) begin + main_sdram_slave_p1_rddata <= 32'd0; + main_sdram_slave_p1_rddata_valid <= 1'd0; + main_sdram_slave_p2_rddata <= 32'd0; + main_sdram_slave_p2_rddata_valid <= 1'd0; + main_sdram_slave_p3_rddata <= 32'd0; + main_sdram_slave_p3_rddata_valid <= 1'd0; + main_sdram_inti_p0_rddata <= 32'd0; + main_sdram_inti_p0_rddata_valid <= 1'd0; + main_sdram_master_p0_address <= 14'd0; + main_sdram_master_p0_bank <= 3'd0; + main_sdram_master_p0_cas_n <= 1'd1; + main_sdram_master_p0_cs_n <= 1'd1; + main_sdram_master_p0_ras_n <= 1'd1; + main_sdram_master_p0_we_n <= 1'd1; + main_sdram_master_p0_cke <= 1'd0; + main_sdram_master_p0_odt <= 1'd0; + main_sdram_master_p0_reset_n <= 1'd0; + main_sdram_master_p0_act_n <= 1'd1; + main_sdram_inti_p1_rddata <= 32'd0; + main_sdram_master_p0_wrdata <= 32'd0; + main_sdram_inti_p1_rddata_valid <= 1'd0; + main_sdram_master_p0_wrdata_en <= 1'd0; + main_sdram_master_p0_wrdata_mask <= 4'd0; + main_sdram_master_p0_rddata_en <= 1'd0; + main_sdram_master_p1_address <= 14'd0; + main_sdram_master_p1_bank <= 3'd0; + main_sdram_master_p1_cas_n <= 1'd1; + main_sdram_master_p1_cs_n <= 1'd1; + main_sdram_master_p1_ras_n <= 1'd1; + main_sdram_master_p1_we_n <= 1'd1; + main_sdram_master_p1_cke <= 1'd0; + main_sdram_master_p1_odt <= 1'd0; + main_sdram_master_p1_reset_n <= 1'd0; + main_sdram_master_p1_act_n <= 1'd1; + main_sdram_master_p1_wrdata <= 32'd0; + main_sdram_inti_p2_rddata <= 32'd0; + main_sdram_master_p1_wrdata_en <= 1'd0; + main_sdram_inti_p2_rddata_valid <= 1'd0; + main_sdram_master_p1_wrdata_mask <= 4'd0; + main_sdram_master_p1_rddata_en <= 1'd0; + main_sdram_master_p2_address <= 14'd0; + main_sdram_master_p2_bank <= 3'd0; + main_sdram_master_p2_cas_n <= 1'd1; + main_sdram_master_p2_cs_n <= 1'd1; + main_sdram_master_p2_ras_n <= 1'd1; + main_sdram_master_p2_we_n <= 1'd1; + main_sdram_master_p2_cke <= 1'd0; + main_sdram_master_p2_odt <= 1'd0; + main_sdram_master_p2_reset_n <= 1'd0; + main_sdram_master_p2_act_n <= 1'd1; + main_sdram_master_p2_wrdata <= 32'd0; + main_sdram_inti_p3_rddata <= 32'd0; + main_sdram_master_p2_wrdata_en <= 1'd0; + main_sdram_inti_p3_rddata_valid <= 1'd0; + main_sdram_master_p2_wrdata_mask <= 4'd0; + main_sdram_master_p2_rddata_en <= 1'd0; + main_sdram_master_p3_address <= 14'd0; + main_sdram_master_p3_bank <= 3'd0; + main_sdram_master_p3_cas_n <= 1'd1; + main_sdram_master_p3_cs_n <= 1'd1; + main_sdram_master_p3_ras_n <= 1'd1; + main_sdram_master_p3_we_n <= 1'd1; + main_sdram_master_p3_cke <= 1'd0; + main_sdram_master_p3_odt <= 1'd0; + main_sdram_master_p3_reset_n <= 1'd0; + main_sdram_master_p3_act_n <= 1'd1; + main_sdram_master_p3_wrdata <= 32'd0; + main_sdram_master_p3_wrdata_en <= 1'd0; + main_sdram_master_p3_wrdata_mask <= 4'd0; + main_sdram_master_p3_rddata_en <= 1'd0; + main_sdram_slave_p0_rddata <= 32'd0; + main_sdram_slave_p0_rddata_valid <= 1'd0; + if (main_sdram_storage[0]) begin + main_sdram_master_p0_address <= main_sdram_slave_p0_address; + main_sdram_master_p0_bank <= main_sdram_slave_p0_bank; + main_sdram_master_p0_cas_n <= main_sdram_slave_p0_cas_n; + main_sdram_master_p0_cs_n <= main_sdram_slave_p0_cs_n; + main_sdram_master_p0_ras_n <= main_sdram_slave_p0_ras_n; + main_sdram_master_p0_we_n <= main_sdram_slave_p0_we_n; + main_sdram_master_p0_cke <= main_sdram_slave_p0_cke; + main_sdram_master_p0_odt <= main_sdram_slave_p0_odt; + main_sdram_master_p0_reset_n <= main_sdram_slave_p0_reset_n; + main_sdram_master_p0_act_n <= main_sdram_slave_p0_act_n; + main_sdram_master_p0_wrdata <= main_sdram_slave_p0_wrdata; + main_sdram_master_p0_wrdata_en <= main_sdram_slave_p0_wrdata_en; + main_sdram_master_p0_wrdata_mask <= main_sdram_slave_p0_wrdata_mask; + main_sdram_master_p0_rddata_en <= main_sdram_slave_p0_rddata_en; + main_sdram_slave_p0_rddata <= main_sdram_master_p0_rddata; + main_sdram_slave_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; + main_sdram_master_p1_address <= main_sdram_slave_p1_address; + main_sdram_master_p1_bank <= main_sdram_slave_p1_bank; + main_sdram_master_p1_cas_n <= main_sdram_slave_p1_cas_n; + main_sdram_master_p1_cs_n <= main_sdram_slave_p1_cs_n; + main_sdram_master_p1_ras_n <= main_sdram_slave_p1_ras_n; + main_sdram_master_p1_we_n <= main_sdram_slave_p1_we_n; + main_sdram_master_p1_cke <= main_sdram_slave_p1_cke; + main_sdram_master_p1_odt <= main_sdram_slave_p1_odt; + main_sdram_master_p1_reset_n <= main_sdram_slave_p1_reset_n; + main_sdram_master_p1_act_n <= main_sdram_slave_p1_act_n; + main_sdram_master_p1_wrdata <= main_sdram_slave_p1_wrdata; + main_sdram_master_p1_wrdata_en <= main_sdram_slave_p1_wrdata_en; + main_sdram_master_p1_wrdata_mask <= main_sdram_slave_p1_wrdata_mask; + main_sdram_master_p1_rddata_en <= main_sdram_slave_p1_rddata_en; + main_sdram_slave_p1_rddata <= main_sdram_master_p1_rddata; + main_sdram_slave_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; + main_sdram_master_p2_address <= main_sdram_slave_p2_address; + main_sdram_master_p2_bank <= main_sdram_slave_p2_bank; + main_sdram_master_p2_cas_n <= main_sdram_slave_p2_cas_n; + main_sdram_master_p2_cs_n <= main_sdram_slave_p2_cs_n; + main_sdram_master_p2_ras_n <= main_sdram_slave_p2_ras_n; + main_sdram_master_p2_we_n <= main_sdram_slave_p2_we_n; + main_sdram_master_p2_cke <= main_sdram_slave_p2_cke; + main_sdram_master_p2_odt <= main_sdram_slave_p2_odt; + main_sdram_master_p2_reset_n <= main_sdram_slave_p2_reset_n; + main_sdram_master_p2_act_n <= main_sdram_slave_p2_act_n; + main_sdram_master_p2_wrdata <= main_sdram_slave_p2_wrdata; + main_sdram_master_p2_wrdata_en <= main_sdram_slave_p2_wrdata_en; + main_sdram_master_p2_wrdata_mask <= main_sdram_slave_p2_wrdata_mask; + main_sdram_master_p2_rddata_en <= main_sdram_slave_p2_rddata_en; + main_sdram_slave_p2_rddata <= main_sdram_master_p2_rddata; + main_sdram_slave_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; + main_sdram_master_p3_address <= main_sdram_slave_p3_address; + main_sdram_master_p3_bank <= main_sdram_slave_p3_bank; + main_sdram_master_p3_cas_n <= main_sdram_slave_p3_cas_n; + main_sdram_master_p3_cs_n <= main_sdram_slave_p3_cs_n; + main_sdram_master_p3_ras_n <= main_sdram_slave_p3_ras_n; + main_sdram_master_p3_we_n <= main_sdram_slave_p3_we_n; + main_sdram_master_p3_cke <= main_sdram_slave_p3_cke; + main_sdram_master_p3_odt <= main_sdram_slave_p3_odt; + main_sdram_master_p3_reset_n <= main_sdram_slave_p3_reset_n; + main_sdram_master_p3_act_n <= main_sdram_slave_p3_act_n; + main_sdram_master_p3_wrdata <= main_sdram_slave_p3_wrdata; + main_sdram_master_p3_wrdata_en <= main_sdram_slave_p3_wrdata_en; + main_sdram_master_p3_wrdata_mask <= main_sdram_slave_p3_wrdata_mask; + main_sdram_master_p3_rddata_en <= main_sdram_slave_p3_rddata_en; + main_sdram_slave_p3_rddata <= main_sdram_master_p3_rddata; + main_sdram_slave_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; + end else begin + main_sdram_master_p0_address <= main_sdram_inti_p0_address; + main_sdram_master_p0_bank <= main_sdram_inti_p0_bank; + main_sdram_master_p0_cas_n <= main_sdram_inti_p0_cas_n; + main_sdram_master_p0_cs_n <= main_sdram_inti_p0_cs_n; + main_sdram_master_p0_ras_n <= main_sdram_inti_p0_ras_n; + main_sdram_master_p0_we_n <= main_sdram_inti_p0_we_n; + main_sdram_master_p0_cke <= main_sdram_inti_p0_cke; + main_sdram_master_p0_odt <= main_sdram_inti_p0_odt; + main_sdram_master_p0_reset_n <= main_sdram_inti_p0_reset_n; + main_sdram_master_p0_act_n <= main_sdram_inti_p0_act_n; + main_sdram_master_p0_wrdata <= main_sdram_inti_p0_wrdata; + main_sdram_master_p0_wrdata_en <= main_sdram_inti_p0_wrdata_en; + main_sdram_master_p0_wrdata_mask <= main_sdram_inti_p0_wrdata_mask; + main_sdram_master_p0_rddata_en <= main_sdram_inti_p0_rddata_en; + main_sdram_inti_p0_rddata <= main_sdram_master_p0_rddata; + main_sdram_inti_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; + main_sdram_master_p1_address <= main_sdram_inti_p1_address; + main_sdram_master_p1_bank <= main_sdram_inti_p1_bank; + main_sdram_master_p1_cas_n <= main_sdram_inti_p1_cas_n; + main_sdram_master_p1_cs_n <= main_sdram_inti_p1_cs_n; + main_sdram_master_p1_ras_n <= main_sdram_inti_p1_ras_n; + main_sdram_master_p1_we_n <= main_sdram_inti_p1_we_n; + main_sdram_master_p1_cke <= main_sdram_inti_p1_cke; + main_sdram_master_p1_odt <= main_sdram_inti_p1_odt; + main_sdram_master_p1_reset_n <= main_sdram_inti_p1_reset_n; + main_sdram_master_p1_act_n <= main_sdram_inti_p1_act_n; + main_sdram_master_p1_wrdata <= main_sdram_inti_p1_wrdata; + main_sdram_master_p1_wrdata_en <= main_sdram_inti_p1_wrdata_en; + main_sdram_master_p1_wrdata_mask <= main_sdram_inti_p1_wrdata_mask; + main_sdram_master_p1_rddata_en <= main_sdram_inti_p1_rddata_en; + main_sdram_inti_p1_rddata <= main_sdram_master_p1_rddata; + main_sdram_inti_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; + main_sdram_master_p2_address <= main_sdram_inti_p2_address; + main_sdram_master_p2_bank <= main_sdram_inti_p2_bank; + main_sdram_master_p2_cas_n <= main_sdram_inti_p2_cas_n; + main_sdram_master_p2_cs_n <= main_sdram_inti_p2_cs_n; + main_sdram_master_p2_ras_n <= main_sdram_inti_p2_ras_n; + main_sdram_master_p2_we_n <= main_sdram_inti_p2_we_n; + main_sdram_master_p2_cke <= main_sdram_inti_p2_cke; + main_sdram_master_p2_odt <= main_sdram_inti_p2_odt; + main_sdram_master_p2_reset_n <= main_sdram_inti_p2_reset_n; + main_sdram_master_p2_act_n <= main_sdram_inti_p2_act_n; + main_sdram_master_p2_wrdata <= main_sdram_inti_p2_wrdata; + main_sdram_master_p2_wrdata_en <= main_sdram_inti_p2_wrdata_en; + main_sdram_master_p2_wrdata_mask <= main_sdram_inti_p2_wrdata_mask; + main_sdram_master_p2_rddata_en <= main_sdram_inti_p2_rddata_en; + main_sdram_inti_p2_rddata <= main_sdram_master_p2_rddata; + main_sdram_inti_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; + main_sdram_master_p3_address <= main_sdram_inti_p3_address; + main_sdram_master_p3_bank <= main_sdram_inti_p3_bank; + main_sdram_master_p3_cas_n <= main_sdram_inti_p3_cas_n; + main_sdram_master_p3_cs_n <= main_sdram_inti_p3_cs_n; + main_sdram_master_p3_ras_n <= main_sdram_inti_p3_ras_n; + main_sdram_master_p3_we_n <= main_sdram_inti_p3_we_n; + main_sdram_master_p3_cke <= main_sdram_inti_p3_cke; + main_sdram_master_p3_odt <= main_sdram_inti_p3_odt; + main_sdram_master_p3_reset_n <= main_sdram_inti_p3_reset_n; + main_sdram_master_p3_act_n <= main_sdram_inti_p3_act_n; + main_sdram_master_p3_wrdata <= main_sdram_inti_p3_wrdata; + main_sdram_master_p3_wrdata_en <= main_sdram_inti_p3_wrdata_en; + main_sdram_master_p3_wrdata_mask <= main_sdram_inti_p3_wrdata_mask; + main_sdram_master_p3_rddata_en <= main_sdram_inti_p3_rddata_en; + main_sdram_inti_p3_rddata <= main_sdram_master_p3_rddata; + main_sdram_inti_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; + end + end + assign main_sdram_inti_p0_cke = main_sdram_storage[1]; + assign main_sdram_inti_p1_cke = main_sdram_storage[1]; + assign main_sdram_inti_p2_cke = main_sdram_storage[1]; + assign main_sdram_inti_p3_cke = main_sdram_storage[1]; + assign main_sdram_inti_p0_odt = main_sdram_storage[2]; + assign main_sdram_inti_p1_odt = main_sdram_storage[2]; + assign main_sdram_inti_p2_odt = main_sdram_storage[2]; + assign main_sdram_inti_p3_odt = main_sdram_storage[2]; + assign main_sdram_inti_p0_reset_n = main_sdram_storage[3]; + assign main_sdram_inti_p1_reset_n = main_sdram_storage[3]; + assign main_sdram_inti_p2_reset_n = main_sdram_storage[3]; + assign main_sdram_inti_p3_reset_n = main_sdram_storage[3]; + always @(*) begin + main_sdram_inti_p0_we_n <= 1'd1; + main_sdram_inti_p0_cas_n <= 1'd1; + main_sdram_inti_p0_cs_n <= 1'd1; + main_sdram_inti_p0_ras_n <= 1'd1; + if (main_sdram_phaseinjector0_command_issue_re) begin + main_sdram_inti_p0_cs_n <= {1{(~main_sdram_phaseinjector0_command_storage[0])}}; + main_sdram_inti_p0_we_n <= (~main_sdram_phaseinjector0_command_storage[1]); + main_sdram_inti_p0_cas_n <= (~main_sdram_phaseinjector0_command_storage[2]); + main_sdram_inti_p0_ras_n <= (~main_sdram_phaseinjector0_command_storage[3]); + end else begin + main_sdram_inti_p0_cs_n <= {1{1'd1}}; + main_sdram_inti_p0_we_n <= 1'd1; + main_sdram_inti_p0_cas_n <= 1'd1; + main_sdram_inti_p0_ras_n <= 1'd1; + end + end + assign main_sdram_inti_p0_address = main_sdram_phaseinjector0_address_storage; + assign main_sdram_inti_p0_bank = main_sdram_phaseinjector0_baddress_storage; + assign main_sdram_inti_p0_wrdata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[4]); + assign main_sdram_inti_p0_rddata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[5]); + assign main_sdram_inti_p0_wrdata = main_sdram_phaseinjector0_wrdata_storage; + assign main_sdram_inti_p0_wrdata_mask = 1'd0; + always @(*) begin + main_sdram_inti_p1_we_n <= 1'd1; + main_sdram_inti_p1_cas_n <= 1'd1; + main_sdram_inti_p1_cs_n <= 1'd1; + main_sdram_inti_p1_ras_n <= 1'd1; + if (main_sdram_phaseinjector1_command_issue_re) begin + main_sdram_inti_p1_cs_n <= {1{(~main_sdram_phaseinjector1_command_storage[0])}}; + main_sdram_inti_p1_we_n <= (~main_sdram_phaseinjector1_command_storage[1]); + main_sdram_inti_p1_cas_n <= (~main_sdram_phaseinjector1_command_storage[2]); + main_sdram_inti_p1_ras_n <= (~main_sdram_phaseinjector1_command_storage[3]); + end else begin + main_sdram_inti_p1_cs_n <= {1{1'd1}}; + main_sdram_inti_p1_we_n <= 1'd1; + main_sdram_inti_p1_cas_n <= 1'd1; + main_sdram_inti_p1_ras_n <= 1'd1; + end + end + assign main_sdram_inti_p1_address = main_sdram_phaseinjector1_address_storage; + assign main_sdram_inti_p1_bank = main_sdram_phaseinjector1_baddress_storage; + assign main_sdram_inti_p1_wrdata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[4]); + assign main_sdram_inti_p1_rddata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[5]); + assign main_sdram_inti_p1_wrdata = main_sdram_phaseinjector1_wrdata_storage; + assign main_sdram_inti_p1_wrdata_mask = 1'd0; + always @(*) begin + main_sdram_inti_p2_we_n <= 1'd1; + main_sdram_inti_p2_cas_n <= 1'd1; + main_sdram_inti_p2_cs_n <= 1'd1; + main_sdram_inti_p2_ras_n <= 1'd1; + if (main_sdram_phaseinjector2_command_issue_re) begin + main_sdram_inti_p2_cs_n <= {1{(~main_sdram_phaseinjector2_command_storage[0])}}; + main_sdram_inti_p2_we_n <= (~main_sdram_phaseinjector2_command_storage[1]); + main_sdram_inti_p2_cas_n <= (~main_sdram_phaseinjector2_command_storage[2]); + main_sdram_inti_p2_ras_n <= (~main_sdram_phaseinjector2_command_storage[3]); + end else begin + main_sdram_inti_p2_cs_n <= {1{1'd1}}; + main_sdram_inti_p2_we_n <= 1'd1; + main_sdram_inti_p2_cas_n <= 1'd1; + main_sdram_inti_p2_ras_n <= 1'd1; + end + end + assign main_sdram_inti_p2_address = main_sdram_phaseinjector2_address_storage; + assign main_sdram_inti_p2_bank = main_sdram_phaseinjector2_baddress_storage; + assign main_sdram_inti_p2_wrdata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[4]); + assign main_sdram_inti_p2_rddata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[5]); + assign main_sdram_inti_p2_wrdata = main_sdram_phaseinjector2_wrdata_storage; + assign main_sdram_inti_p2_wrdata_mask = 1'd0; + always @(*) begin + main_sdram_inti_p3_we_n <= 1'd1; + main_sdram_inti_p3_cas_n <= 1'd1; + main_sdram_inti_p3_cs_n <= 1'd1; + main_sdram_inti_p3_ras_n <= 1'd1; + if (main_sdram_phaseinjector3_command_issue_re) begin + main_sdram_inti_p3_cs_n <= {1{(~main_sdram_phaseinjector3_command_storage[0])}}; + main_sdram_inti_p3_we_n <= (~main_sdram_phaseinjector3_command_storage[1]); + main_sdram_inti_p3_cas_n <= (~main_sdram_phaseinjector3_command_storage[2]); + main_sdram_inti_p3_ras_n <= (~main_sdram_phaseinjector3_command_storage[3]); + end else begin + main_sdram_inti_p3_cs_n <= {1{1'd1}}; + main_sdram_inti_p3_we_n <= 1'd1; + main_sdram_inti_p3_cas_n <= 1'd1; + main_sdram_inti_p3_ras_n <= 1'd1; + end + end + assign main_sdram_inti_p3_address = main_sdram_phaseinjector3_address_storage; + assign main_sdram_inti_p3_bank = main_sdram_phaseinjector3_baddress_storage; + assign main_sdram_inti_p3_wrdata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[4]); + assign main_sdram_inti_p3_rddata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[5]); + assign main_sdram_inti_p3_wrdata = main_sdram_phaseinjector3_wrdata_storage; + assign main_sdram_inti_p3_wrdata_mask = 1'd0; + assign main_sdram_bankmachine0_req_valid = main_sdram_interface_bank0_valid; + assign main_sdram_interface_bank0_ready = main_sdram_bankmachine0_req_ready; + assign main_sdram_bankmachine0_req_we = main_sdram_interface_bank0_we; + assign main_sdram_bankmachine0_req_addr = main_sdram_interface_bank0_addr; + assign main_sdram_interface_bank0_lock = main_sdram_bankmachine0_req_lock; + assign main_sdram_interface_bank0_wdata_ready = main_sdram_bankmachine0_req_wdata_ready; + assign main_sdram_interface_bank0_rdata_valid = main_sdram_bankmachine0_req_rdata_valid; + assign main_sdram_bankmachine1_req_valid = main_sdram_interface_bank1_valid; + assign main_sdram_interface_bank1_ready = main_sdram_bankmachine1_req_ready; + assign main_sdram_bankmachine1_req_we = main_sdram_interface_bank1_we; + assign main_sdram_bankmachine1_req_addr = main_sdram_interface_bank1_addr; + assign main_sdram_interface_bank1_lock = main_sdram_bankmachine1_req_lock; + assign main_sdram_interface_bank1_wdata_ready = main_sdram_bankmachine1_req_wdata_ready; + assign main_sdram_interface_bank1_rdata_valid = main_sdram_bankmachine1_req_rdata_valid; + assign main_sdram_bankmachine2_req_valid = main_sdram_interface_bank2_valid; + assign main_sdram_interface_bank2_ready = main_sdram_bankmachine2_req_ready; + assign main_sdram_bankmachine2_req_we = main_sdram_interface_bank2_we; + assign main_sdram_bankmachine2_req_addr = main_sdram_interface_bank2_addr; + assign main_sdram_interface_bank2_lock = main_sdram_bankmachine2_req_lock; + assign main_sdram_interface_bank2_wdata_ready = main_sdram_bankmachine2_req_wdata_ready; + assign main_sdram_interface_bank2_rdata_valid = main_sdram_bankmachine2_req_rdata_valid; + assign main_sdram_bankmachine3_req_valid = main_sdram_interface_bank3_valid; + assign main_sdram_interface_bank3_ready = main_sdram_bankmachine3_req_ready; + assign main_sdram_bankmachine3_req_we = main_sdram_interface_bank3_we; + assign main_sdram_bankmachine3_req_addr = main_sdram_interface_bank3_addr; + assign main_sdram_interface_bank3_lock = main_sdram_bankmachine3_req_lock; + assign main_sdram_interface_bank3_wdata_ready = main_sdram_bankmachine3_req_wdata_ready; + assign main_sdram_interface_bank3_rdata_valid = main_sdram_bankmachine3_req_rdata_valid; + assign main_sdram_bankmachine4_req_valid = main_sdram_interface_bank4_valid; + assign main_sdram_interface_bank4_ready = main_sdram_bankmachine4_req_ready; + assign main_sdram_bankmachine4_req_we = main_sdram_interface_bank4_we; + assign main_sdram_bankmachine4_req_addr = main_sdram_interface_bank4_addr; + assign main_sdram_interface_bank4_lock = main_sdram_bankmachine4_req_lock; + assign main_sdram_interface_bank4_wdata_ready = main_sdram_bankmachine4_req_wdata_ready; + assign main_sdram_interface_bank4_rdata_valid = main_sdram_bankmachine4_req_rdata_valid; + assign main_sdram_bankmachine5_req_valid = main_sdram_interface_bank5_valid; + assign main_sdram_interface_bank5_ready = main_sdram_bankmachine5_req_ready; + assign main_sdram_bankmachine5_req_we = main_sdram_interface_bank5_we; + assign main_sdram_bankmachine5_req_addr = main_sdram_interface_bank5_addr; + assign main_sdram_interface_bank5_lock = main_sdram_bankmachine5_req_lock; + assign main_sdram_interface_bank5_wdata_ready = main_sdram_bankmachine5_req_wdata_ready; + assign main_sdram_interface_bank5_rdata_valid = main_sdram_bankmachine5_req_rdata_valid; + assign main_sdram_bankmachine6_req_valid = main_sdram_interface_bank6_valid; + assign main_sdram_interface_bank6_ready = main_sdram_bankmachine6_req_ready; + assign main_sdram_bankmachine6_req_we = main_sdram_interface_bank6_we; + assign main_sdram_bankmachine6_req_addr = main_sdram_interface_bank6_addr; + assign main_sdram_interface_bank6_lock = main_sdram_bankmachine6_req_lock; + assign main_sdram_interface_bank6_wdata_ready = main_sdram_bankmachine6_req_wdata_ready; + assign main_sdram_interface_bank6_rdata_valid = main_sdram_bankmachine6_req_rdata_valid; + assign main_sdram_bankmachine7_req_valid = main_sdram_interface_bank7_valid; + assign main_sdram_interface_bank7_ready = main_sdram_bankmachine7_req_ready; + assign main_sdram_bankmachine7_req_we = main_sdram_interface_bank7_we; + assign main_sdram_bankmachine7_req_addr = main_sdram_interface_bank7_addr; + assign main_sdram_interface_bank7_lock = main_sdram_bankmachine7_req_lock; + assign main_sdram_interface_bank7_wdata_ready = main_sdram_bankmachine7_req_wdata_ready; + assign main_sdram_interface_bank7_rdata_valid = main_sdram_bankmachine7_req_rdata_valid; + assign main_sdram_timer_wait = (~main_sdram_timer_done0); + assign main_sdram_postponer_req_i = main_sdram_timer_done0; + assign main_sdram_wants_refresh = main_sdram_postponer_req_o; + assign main_sdram_wants_zqcs = main_sdram_zqcs_timer_done0; + assign main_sdram_zqcs_timer_wait = (~main_sdram_zqcs_executer_done); + assign main_sdram_timer_done1 = (main_sdram_timer_count1 == 1'd0); + assign main_sdram_timer_done0 = main_sdram_timer_done1; + assign main_sdram_timer_count0 = main_sdram_timer_count1; + assign main_sdram_sequencer_start1 = (main_sdram_sequencer_start0 | (main_sdram_sequencer_count != 1'd0)); + assign main_sdram_sequencer_done0 = (main_sdram_sequencer_done1 & (main_sdram_sequencer_count == 1'd0)); + assign main_sdram_zqcs_timer_done1 = (main_sdram_zqcs_timer_count1 == 1'd0); + assign main_sdram_zqcs_timer_done0 = main_sdram_zqcs_timer_done1; + assign main_sdram_zqcs_timer_count0 = main_sdram_zqcs_timer_count1; + always @(*) begin + main_sdram_cmd_valid <= 1'd0; + builder_refresher_next_state <= 2'd0; + main_sdram_zqcs_executer_start <= 1'd0; + main_sdram_cmd_last <= 1'd0; + main_sdram_sequencer_start0 <= 1'd0; + builder_refresher_next_state <= builder_refresher_state; + case (builder_refresher_state) + 1'd1: begin + main_sdram_cmd_valid <= 1'd1; + if (main_sdram_cmd_ready) begin + main_sdram_sequencer_start0 <= 1'd1; + builder_refresher_next_state <= 2'd2; + end + end + 2'd2: begin + main_sdram_cmd_valid <= 1'd1; + if (main_sdram_sequencer_done0) begin + if (main_sdram_wants_zqcs) begin + main_sdram_zqcs_executer_start <= 1'd1; + builder_refresher_next_state <= 2'd3; + end else begin + main_sdram_cmd_valid <= 1'd0; + main_sdram_cmd_last <= 1'd1; + builder_refresher_next_state <= 1'd0; + end + end + end + 2'd3: begin + main_sdram_cmd_valid <= 1'd1; + if (main_sdram_zqcs_executer_done) begin + main_sdram_cmd_valid <= 1'd0; + main_sdram_cmd_last <= 1'd1; + builder_refresher_next_state <= 1'd0; + end + end + default: begin + if (1'd1) begin + if (main_sdram_wants_refresh) begin + builder_refresher_next_state <= 1'd1; + end + end + end + endcase + end + assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine0_req_valid; + assign main_sdram_bankmachine0_req_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine0_req_we; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine0_req_addr; + assign main_sdram_bankmachine0_cmd_buffer_sink_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine0_cmd_buffer_sink_ready; + assign main_sdram_bankmachine0_cmd_buffer_sink_first = main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine0_cmd_buffer_sink_last = main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine0_cmd_buffer_sink_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine0_cmd_buffer_sink_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine0_cmd_buffer_source_ready = (main_sdram_bankmachine0_req_wdata_ready | main_sdram_bankmachine0_req_rdata_valid); + assign main_sdram_bankmachine0_req_lock = (main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine0_cmd_buffer_source_valid); + assign main_sdram_bankmachine0_row_hit = (main_sdram_bankmachine0_row == main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine0_cmd_payload_ba = 1'd0; + always @(*) begin + main_sdram_bankmachine0_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine0_row_col_n_addr_sel) begin + main_sdram_bankmachine0_cmd_payload_a <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine0_cmd_payload_a <= ((main_sdram_bankmachine0_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine0_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine0_twtpcon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_cmd_payload_is_write); + assign main_sdram_bankmachine0_trccon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); + assign main_sdram_bankmachine0_trascon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); + always @(*) begin + main_sdram_bankmachine0_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine0_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine0_auto_precharge <= (main_sdram_bankmachine0_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din = { + main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_first = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_last = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re = main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine0_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine0_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable | main_sdram_bankmachine0_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine0_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re); + assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine0_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout = main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine0_cmd_buffer_sink_ready = ((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine0_row_open <= 1'd0; + main_sdram_bankmachine0_row_close <= 1'd0; + main_sdram_bankmachine0_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine0_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine0_cmd_payload_we <= 1'd0; + main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine0_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine0_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine0_req_wdata_ready <= 1'd0; + builder_bankmachine0_next_state <= 3'd0; + main_sdram_bankmachine0_req_rdata_valid <= 1'd0; + main_sdram_bankmachine0_refresh_gnt <= 1'd0; + main_sdram_bankmachine0_cmd_valid <= 1'd0; + builder_bankmachine0_next_state <= builder_bankmachine0_state; + case (builder_bankmachine0_state) + 1'd1: begin + if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin + main_sdram_bankmachine0_cmd_valid <= 1'd1; + if (main_sdram_bankmachine0_cmd_ready) begin + builder_bankmachine0_next_state <= 3'd5; + end + main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine0_cmd_payload_we <= 1'd1; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine0_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin + builder_bankmachine0_next_state <= 3'd5; + end + main_sdram_bankmachine0_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine0_trccon_ready) begin + main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine0_row_open <= 1'd1; + main_sdram_bankmachine0_cmd_valid <= 1'd1; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine0_cmd_ready) begin + builder_bankmachine0_next_state <= 3'd6; + end + main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine0_twtpcon_ready) begin + main_sdram_bankmachine0_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine0_row_close <= 1'd1; + main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine0_refresh_req)) begin + builder_bankmachine0_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine0_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine0_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine0_refresh_req) begin + builder_bankmachine0_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine0_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine0_row_opened) begin + if (main_sdram_bankmachine0_row_hit) begin + main_sdram_bankmachine0_cmd_valid <= 1'd1; + if (main_sdram_bankmachine0_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine0_req_wdata_ready <= main_sdram_bankmachine0_cmd_ready; + main_sdram_bankmachine0_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine0_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine0_req_rdata_valid <= main_sdram_bankmachine0_cmd_ready; + main_sdram_bankmachine0_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine0_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine0_cmd_ready & main_sdram_bankmachine0_auto_precharge)) begin + builder_bankmachine0_next_state <= 2'd2; + end + end else begin + builder_bankmachine0_next_state <= 1'd1; + end + end else begin + builder_bankmachine0_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine1_req_valid; + assign main_sdram_bankmachine1_req_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine1_req_we; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine1_req_addr; + assign main_sdram_bankmachine1_cmd_buffer_sink_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine1_cmd_buffer_sink_ready; + assign main_sdram_bankmachine1_cmd_buffer_sink_first = main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine1_cmd_buffer_sink_last = main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine1_cmd_buffer_sink_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine1_cmd_buffer_sink_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine1_cmd_buffer_source_ready = (main_sdram_bankmachine1_req_wdata_ready | main_sdram_bankmachine1_req_rdata_valid); + assign main_sdram_bankmachine1_req_lock = (main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine1_cmd_buffer_source_valid); + assign main_sdram_bankmachine1_row_hit = (main_sdram_bankmachine1_row == main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine1_cmd_payload_ba = 1'd1; + always @(*) begin + main_sdram_bankmachine1_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine1_row_col_n_addr_sel) begin + main_sdram_bankmachine1_cmd_payload_a <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine1_cmd_payload_a <= ((main_sdram_bankmachine1_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine1_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine1_twtpcon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_cmd_payload_is_write); + assign main_sdram_bankmachine1_trccon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); + assign main_sdram_bankmachine1_trascon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); + always @(*) begin + main_sdram_bankmachine1_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine1_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine1_auto_precharge <= (main_sdram_bankmachine1_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din = { + main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_first = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_last = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re = main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine1_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine1_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable | main_sdram_bankmachine1_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine1_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re); + assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine1_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout = main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine1_cmd_buffer_sink_ready = ((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine1_row_open <= 1'd0; + main_sdram_bankmachine1_row_close <= 1'd0; + main_sdram_bankmachine1_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine1_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine1_cmd_payload_we <= 1'd0; + main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine1_cmd_payload_is_read <= 1'd0; + builder_bankmachine1_next_state <= 3'd0; + main_sdram_bankmachine1_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine1_req_wdata_ready <= 1'd0; + main_sdram_bankmachine1_req_rdata_valid <= 1'd0; + main_sdram_bankmachine1_refresh_gnt <= 1'd0; + main_sdram_bankmachine1_cmd_valid <= 1'd0; + builder_bankmachine1_next_state <= builder_bankmachine1_state; + case (builder_bankmachine1_state) + 1'd1: begin + if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin + main_sdram_bankmachine1_cmd_valid <= 1'd1; + if (main_sdram_bankmachine1_cmd_ready) begin + builder_bankmachine1_next_state <= 3'd5; + end + main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine1_cmd_payload_we <= 1'd1; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine1_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin + builder_bankmachine1_next_state <= 3'd5; + end + main_sdram_bankmachine1_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine1_trccon_ready) begin + main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine1_row_open <= 1'd1; + main_sdram_bankmachine1_cmd_valid <= 1'd1; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine1_cmd_ready) begin + builder_bankmachine1_next_state <= 3'd6; + end + main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine1_twtpcon_ready) begin + main_sdram_bankmachine1_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine1_row_close <= 1'd1; + main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine1_refresh_req)) begin + builder_bankmachine1_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine1_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine1_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine1_refresh_req) begin + builder_bankmachine1_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine1_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine1_row_opened) begin + if (main_sdram_bankmachine1_row_hit) begin + main_sdram_bankmachine1_cmd_valid <= 1'd1; + if (main_sdram_bankmachine1_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine1_req_wdata_ready <= main_sdram_bankmachine1_cmd_ready; + main_sdram_bankmachine1_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine1_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine1_req_rdata_valid <= main_sdram_bankmachine1_cmd_ready; + main_sdram_bankmachine1_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine1_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine1_cmd_ready & main_sdram_bankmachine1_auto_precharge)) begin + builder_bankmachine1_next_state <= 2'd2; + end + end else begin + builder_bankmachine1_next_state <= 1'd1; + end + end else begin + builder_bankmachine1_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine2_req_valid; + assign main_sdram_bankmachine2_req_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine2_req_we; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine2_req_addr; + assign main_sdram_bankmachine2_cmd_buffer_sink_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine2_cmd_buffer_sink_ready; + assign main_sdram_bankmachine2_cmd_buffer_sink_first = main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine2_cmd_buffer_sink_last = main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine2_cmd_buffer_sink_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine2_cmd_buffer_sink_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine2_cmd_buffer_source_ready = (main_sdram_bankmachine2_req_wdata_ready | main_sdram_bankmachine2_req_rdata_valid); + assign main_sdram_bankmachine2_req_lock = (main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine2_cmd_buffer_source_valid); + assign main_sdram_bankmachine2_row_hit = (main_sdram_bankmachine2_row == main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine2_cmd_payload_ba = 2'd2; + always @(*) begin + main_sdram_bankmachine2_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine2_row_col_n_addr_sel) begin + main_sdram_bankmachine2_cmd_payload_a <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine2_cmd_payload_a <= ((main_sdram_bankmachine2_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine2_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine2_twtpcon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_cmd_payload_is_write); + assign main_sdram_bankmachine2_trccon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); + assign main_sdram_bankmachine2_trascon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); + always @(*) begin + main_sdram_bankmachine2_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine2_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine2_auto_precharge <= (main_sdram_bankmachine2_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din = { + main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_first = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_last = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re = main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine2_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine2_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable | main_sdram_bankmachine2_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine2_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re); + assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine2_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout = main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine2_cmd_buffer_sink_ready = ((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine2_row_open <= 1'd0; + main_sdram_bankmachine2_row_close <= 1'd0; + main_sdram_bankmachine2_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine2_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine2_cmd_payload_we <= 1'd0; + main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd0; + builder_bankmachine2_next_state <= 3'd0; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine2_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine2_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine2_req_wdata_ready <= 1'd0; + main_sdram_bankmachine2_req_rdata_valid <= 1'd0; + main_sdram_bankmachine2_refresh_gnt <= 1'd0; + main_sdram_bankmachine2_cmd_valid <= 1'd0; + builder_bankmachine2_next_state <= builder_bankmachine2_state; + case (builder_bankmachine2_state) + 1'd1: begin + if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin + main_sdram_bankmachine2_cmd_valid <= 1'd1; + if (main_sdram_bankmachine2_cmd_ready) begin + builder_bankmachine2_next_state <= 3'd5; + end + main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine2_cmd_payload_we <= 1'd1; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine2_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin + builder_bankmachine2_next_state <= 3'd5; + end + main_sdram_bankmachine2_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine2_trccon_ready) begin + main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine2_row_open <= 1'd1; + main_sdram_bankmachine2_cmd_valid <= 1'd1; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine2_cmd_ready) begin + builder_bankmachine2_next_state <= 3'd6; + end + main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine2_twtpcon_ready) begin + main_sdram_bankmachine2_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine2_row_close <= 1'd1; + main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine2_refresh_req)) begin + builder_bankmachine2_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine2_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine2_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine2_refresh_req) begin + builder_bankmachine2_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine2_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine2_row_opened) begin + if (main_sdram_bankmachine2_row_hit) begin + main_sdram_bankmachine2_cmd_valid <= 1'd1; + if (main_sdram_bankmachine2_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine2_req_wdata_ready <= main_sdram_bankmachine2_cmd_ready; + main_sdram_bankmachine2_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine2_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine2_req_rdata_valid <= main_sdram_bankmachine2_cmd_ready; + main_sdram_bankmachine2_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine2_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine2_cmd_ready & main_sdram_bankmachine2_auto_precharge)) begin + builder_bankmachine2_next_state <= 2'd2; + end + end else begin + builder_bankmachine2_next_state <= 1'd1; + end + end else begin + builder_bankmachine2_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine3_req_valid; + assign main_sdram_bankmachine3_req_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine3_req_we; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine3_req_addr; + assign main_sdram_bankmachine3_cmd_buffer_sink_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine3_cmd_buffer_sink_ready; + assign main_sdram_bankmachine3_cmd_buffer_sink_first = main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine3_cmd_buffer_sink_last = main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine3_cmd_buffer_sink_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine3_cmd_buffer_sink_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine3_cmd_buffer_source_ready = (main_sdram_bankmachine3_req_wdata_ready | main_sdram_bankmachine3_req_rdata_valid); + assign main_sdram_bankmachine3_req_lock = (main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine3_cmd_buffer_source_valid); + assign main_sdram_bankmachine3_row_hit = (main_sdram_bankmachine3_row == main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine3_cmd_payload_ba = 2'd3; + always @(*) begin + main_sdram_bankmachine3_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine3_row_col_n_addr_sel) begin + main_sdram_bankmachine3_cmd_payload_a <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine3_cmd_payload_a <= ((main_sdram_bankmachine3_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine3_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine3_twtpcon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_cmd_payload_is_write); + assign main_sdram_bankmachine3_trccon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); + assign main_sdram_bankmachine3_trascon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); + always @(*) begin + main_sdram_bankmachine3_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine3_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine3_auto_precharge <= (main_sdram_bankmachine3_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din = { + main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_first = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_last = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re = main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine3_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine3_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable | main_sdram_bankmachine3_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine3_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re); + assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine3_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout = main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine3_cmd_buffer_sink_ready = ((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine3_row_open <= 1'd0; + main_sdram_bankmachine3_row_close <= 1'd0; + main_sdram_bankmachine3_cmd_payload_cas <= 1'd0; + builder_bankmachine3_next_state <= 3'd0; + main_sdram_bankmachine3_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine3_cmd_payload_we <= 1'd0; + main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine3_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine3_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine3_req_wdata_ready <= 1'd0; + main_sdram_bankmachine3_req_rdata_valid <= 1'd0; + main_sdram_bankmachine3_refresh_gnt <= 1'd0; + main_sdram_bankmachine3_cmd_valid <= 1'd0; + builder_bankmachine3_next_state <= builder_bankmachine3_state; + case (builder_bankmachine3_state) + 1'd1: begin + if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin + main_sdram_bankmachine3_cmd_valid <= 1'd1; + if (main_sdram_bankmachine3_cmd_ready) begin + builder_bankmachine3_next_state <= 3'd5; + end + main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine3_cmd_payload_we <= 1'd1; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine3_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin + builder_bankmachine3_next_state <= 3'd5; + end + main_sdram_bankmachine3_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine3_trccon_ready) begin + main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine3_row_open <= 1'd1; + main_sdram_bankmachine3_cmd_valid <= 1'd1; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine3_cmd_ready) begin + builder_bankmachine3_next_state <= 3'd6; + end + main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine3_twtpcon_ready) begin + main_sdram_bankmachine3_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine3_row_close <= 1'd1; + main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine3_refresh_req)) begin + builder_bankmachine3_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine3_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine3_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine3_refresh_req) begin + builder_bankmachine3_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine3_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine3_row_opened) begin + if (main_sdram_bankmachine3_row_hit) begin + main_sdram_bankmachine3_cmd_valid <= 1'd1; + if (main_sdram_bankmachine3_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine3_req_wdata_ready <= main_sdram_bankmachine3_cmd_ready; + main_sdram_bankmachine3_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine3_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine3_req_rdata_valid <= main_sdram_bankmachine3_cmd_ready; + main_sdram_bankmachine3_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine3_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine3_cmd_ready & main_sdram_bankmachine3_auto_precharge)) begin + builder_bankmachine3_next_state <= 2'd2; + end + end else begin + builder_bankmachine3_next_state <= 1'd1; + end + end else begin + builder_bankmachine3_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine4_req_valid; + assign main_sdram_bankmachine4_req_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine4_req_we; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine4_req_addr; + assign main_sdram_bankmachine4_cmd_buffer_sink_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine4_cmd_buffer_sink_ready; + assign main_sdram_bankmachine4_cmd_buffer_sink_first = main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine4_cmd_buffer_sink_last = main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine4_cmd_buffer_sink_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine4_cmd_buffer_sink_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine4_cmd_buffer_source_ready = (main_sdram_bankmachine4_req_wdata_ready | main_sdram_bankmachine4_req_rdata_valid); + assign main_sdram_bankmachine4_req_lock = (main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine4_cmd_buffer_source_valid); + assign main_sdram_bankmachine4_row_hit = (main_sdram_bankmachine4_row == main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine4_cmd_payload_ba = 3'd4; + always @(*) begin + main_sdram_bankmachine4_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine4_row_col_n_addr_sel) begin + main_sdram_bankmachine4_cmd_payload_a <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine4_cmd_payload_a <= ((main_sdram_bankmachine4_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine4_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine4_twtpcon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_cmd_payload_is_write); + assign main_sdram_bankmachine4_trccon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); + assign main_sdram_bankmachine4_trascon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); + always @(*) begin + main_sdram_bankmachine4_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine4_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine4_auto_precharge <= (main_sdram_bankmachine4_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din = { + main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_first = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_last = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re = main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine4_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine4_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable | main_sdram_bankmachine4_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine4_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re); + assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine4_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout = main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine4_cmd_buffer_sink_ready = ((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine4_row_open <= 1'd0; + main_sdram_bankmachine4_row_close <= 1'd0; + builder_bankmachine4_next_state <= 3'd0; + main_sdram_bankmachine4_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine4_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine4_cmd_payload_we <= 1'd0; + main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine4_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine4_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine4_req_wdata_ready <= 1'd0; + main_sdram_bankmachine4_req_rdata_valid <= 1'd0; + main_sdram_bankmachine4_refresh_gnt <= 1'd0; + main_sdram_bankmachine4_cmd_valid <= 1'd0; + builder_bankmachine4_next_state <= builder_bankmachine4_state; + case (builder_bankmachine4_state) + 1'd1: begin + if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin + main_sdram_bankmachine4_cmd_valid <= 1'd1; + if (main_sdram_bankmachine4_cmd_ready) begin + builder_bankmachine4_next_state <= 3'd5; + end + main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine4_cmd_payload_we <= 1'd1; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine4_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin + builder_bankmachine4_next_state <= 3'd5; + end + main_sdram_bankmachine4_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine4_trccon_ready) begin + main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine4_row_open <= 1'd1; + main_sdram_bankmachine4_cmd_valid <= 1'd1; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine4_cmd_ready) begin + builder_bankmachine4_next_state <= 3'd6; + end + main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine4_twtpcon_ready) begin + main_sdram_bankmachine4_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine4_row_close <= 1'd1; + main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine4_refresh_req)) begin + builder_bankmachine4_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine4_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine4_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine4_refresh_req) begin + builder_bankmachine4_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine4_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine4_row_opened) begin + if (main_sdram_bankmachine4_row_hit) begin + main_sdram_bankmachine4_cmd_valid <= 1'd1; + if (main_sdram_bankmachine4_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine4_req_wdata_ready <= main_sdram_bankmachine4_cmd_ready; + main_sdram_bankmachine4_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine4_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine4_req_rdata_valid <= main_sdram_bankmachine4_cmd_ready; + main_sdram_bankmachine4_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine4_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine4_cmd_ready & main_sdram_bankmachine4_auto_precharge)) begin + builder_bankmachine4_next_state <= 2'd2; + end + end else begin + builder_bankmachine4_next_state <= 1'd1; + end + end else begin + builder_bankmachine4_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine5_req_valid; + assign main_sdram_bankmachine5_req_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine5_req_we; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine5_req_addr; + assign main_sdram_bankmachine5_cmd_buffer_sink_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine5_cmd_buffer_sink_ready; + assign main_sdram_bankmachine5_cmd_buffer_sink_first = main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine5_cmd_buffer_sink_last = main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine5_cmd_buffer_sink_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine5_cmd_buffer_sink_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine5_cmd_buffer_source_ready = (main_sdram_bankmachine5_req_wdata_ready | main_sdram_bankmachine5_req_rdata_valid); + assign main_sdram_bankmachine5_req_lock = (main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine5_cmd_buffer_source_valid); + assign main_sdram_bankmachine5_row_hit = (main_sdram_bankmachine5_row == main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine5_cmd_payload_ba = 3'd5; + always @(*) begin + main_sdram_bankmachine5_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine5_row_col_n_addr_sel) begin + main_sdram_bankmachine5_cmd_payload_a <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine5_cmd_payload_a <= ((main_sdram_bankmachine5_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine5_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine5_twtpcon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_cmd_payload_is_write); + assign main_sdram_bankmachine5_trccon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); + assign main_sdram_bankmachine5_trascon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); + always @(*) begin + main_sdram_bankmachine5_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine5_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine5_auto_precharge <= (main_sdram_bankmachine5_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din = { + main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_first = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_last = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re = main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine5_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine5_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable | main_sdram_bankmachine5_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine5_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re); + assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine5_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout = main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine5_cmd_buffer_sink_ready = ((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready); + always @(*) begin + builder_bankmachine5_next_state <= 3'd0; + main_sdram_bankmachine5_row_open <= 1'd0; + main_sdram_bankmachine5_row_close <= 1'd0; + main_sdram_bankmachine5_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine5_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine5_cmd_payload_we <= 1'd0; + main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine5_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine5_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine5_req_wdata_ready <= 1'd0; + main_sdram_bankmachine5_req_rdata_valid <= 1'd0; + main_sdram_bankmachine5_refresh_gnt <= 1'd0; + main_sdram_bankmachine5_cmd_valid <= 1'd0; + builder_bankmachine5_next_state <= builder_bankmachine5_state; + case (builder_bankmachine5_state) + 1'd1: begin + if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin + main_sdram_bankmachine5_cmd_valid <= 1'd1; + if (main_sdram_bankmachine5_cmd_ready) begin + builder_bankmachine5_next_state <= 3'd5; + end + main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine5_cmd_payload_we <= 1'd1; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine5_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin + builder_bankmachine5_next_state <= 3'd5; + end + main_sdram_bankmachine5_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine5_trccon_ready) begin + main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine5_row_open <= 1'd1; + main_sdram_bankmachine5_cmd_valid <= 1'd1; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine5_cmd_ready) begin + builder_bankmachine5_next_state <= 3'd6; + end + main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine5_twtpcon_ready) begin + main_sdram_bankmachine5_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine5_row_close <= 1'd1; + main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine5_refresh_req)) begin + builder_bankmachine5_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine5_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine5_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine5_refresh_req) begin + builder_bankmachine5_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine5_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine5_row_opened) begin + if (main_sdram_bankmachine5_row_hit) begin + main_sdram_bankmachine5_cmd_valid <= 1'd1; + if (main_sdram_bankmachine5_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine5_req_wdata_ready <= main_sdram_bankmachine5_cmd_ready; + main_sdram_bankmachine5_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine5_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine5_req_rdata_valid <= main_sdram_bankmachine5_cmd_ready; + main_sdram_bankmachine5_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine5_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine5_cmd_ready & main_sdram_bankmachine5_auto_precharge)) begin + builder_bankmachine5_next_state <= 2'd2; + end + end else begin + builder_bankmachine5_next_state <= 1'd1; + end + end else begin + builder_bankmachine5_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine6_req_valid; + assign main_sdram_bankmachine6_req_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine6_req_we; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine6_req_addr; + assign main_sdram_bankmachine6_cmd_buffer_sink_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine6_cmd_buffer_sink_ready; + assign main_sdram_bankmachine6_cmd_buffer_sink_first = main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine6_cmd_buffer_sink_last = main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine6_cmd_buffer_sink_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine6_cmd_buffer_sink_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine6_cmd_buffer_source_ready = (main_sdram_bankmachine6_req_wdata_ready | main_sdram_bankmachine6_req_rdata_valid); + assign main_sdram_bankmachine6_req_lock = (main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine6_cmd_buffer_source_valid); + assign main_sdram_bankmachine6_row_hit = (main_sdram_bankmachine6_row == main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine6_cmd_payload_ba = 3'd6; + always @(*) begin + main_sdram_bankmachine6_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine6_row_col_n_addr_sel) begin + main_sdram_bankmachine6_cmd_payload_a <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine6_cmd_payload_a <= ((main_sdram_bankmachine6_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine6_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine6_twtpcon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_cmd_payload_is_write); + assign main_sdram_bankmachine6_trccon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); + assign main_sdram_bankmachine6_trascon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); + always @(*) begin + main_sdram_bankmachine6_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine6_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine6_auto_precharge <= (main_sdram_bankmachine6_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din = { + main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_first = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_last = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re = main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine6_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine6_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable | main_sdram_bankmachine6_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine6_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re); + assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine6_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout = main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine6_cmd_buffer_sink_ready = ((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine6_row_open <= 1'd0; + main_sdram_bankmachine6_row_close <= 1'd0; + main_sdram_bankmachine6_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine6_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine6_cmd_payload_we <= 1'd0; + main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine6_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine6_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine6_req_wdata_ready <= 1'd0; + main_sdram_bankmachine6_req_rdata_valid <= 1'd0; + main_sdram_bankmachine6_refresh_gnt <= 1'd0; + main_sdram_bankmachine6_cmd_valid <= 1'd0; + builder_bankmachine6_next_state <= 3'd0; + builder_bankmachine6_next_state <= builder_bankmachine6_state; + case (builder_bankmachine6_state) + 1'd1: begin + if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin + main_sdram_bankmachine6_cmd_valid <= 1'd1; + if (main_sdram_bankmachine6_cmd_ready) begin + builder_bankmachine6_next_state <= 3'd5; + end + main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine6_cmd_payload_we <= 1'd1; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine6_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin + builder_bankmachine6_next_state <= 3'd5; + end + main_sdram_bankmachine6_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine6_trccon_ready) begin + main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine6_row_open <= 1'd1; + main_sdram_bankmachine6_cmd_valid <= 1'd1; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine6_cmd_ready) begin + builder_bankmachine6_next_state <= 3'd6; + end + main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine6_twtpcon_ready) begin + main_sdram_bankmachine6_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine6_row_close <= 1'd1; + main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine6_refresh_req)) begin + builder_bankmachine6_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine6_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine6_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine6_refresh_req) begin + builder_bankmachine6_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine6_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine6_row_opened) begin + if (main_sdram_bankmachine6_row_hit) begin + main_sdram_bankmachine6_cmd_valid <= 1'd1; + if (main_sdram_bankmachine6_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine6_req_wdata_ready <= main_sdram_bankmachine6_cmd_ready; + main_sdram_bankmachine6_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine6_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine6_req_rdata_valid <= main_sdram_bankmachine6_cmd_ready; + main_sdram_bankmachine6_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine6_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine6_cmd_ready & main_sdram_bankmachine6_auto_precharge)) begin + builder_bankmachine6_next_state <= 2'd2; + end + end else begin + builder_bankmachine6_next_state <= 1'd1; + end + end else begin + builder_bankmachine6_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine7_req_valid; + assign main_sdram_bankmachine7_req_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine7_req_we; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine7_req_addr; + assign main_sdram_bankmachine7_cmd_buffer_sink_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine7_cmd_buffer_sink_ready; + assign main_sdram_bankmachine7_cmd_buffer_sink_first = main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; + assign main_sdram_bankmachine7_cmd_buffer_sink_last = main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; + assign main_sdram_bankmachine7_cmd_buffer_sink_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; + assign main_sdram_bankmachine7_cmd_buffer_sink_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; + assign main_sdram_bankmachine7_cmd_buffer_source_ready = (main_sdram_bankmachine7_req_wdata_ready | main_sdram_bankmachine7_req_rdata_valid); + assign main_sdram_bankmachine7_req_lock = (main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine7_cmd_buffer_source_valid); + assign main_sdram_bankmachine7_row_hit = (main_sdram_bankmachine7_row == main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]); + assign main_sdram_bankmachine7_cmd_payload_ba = 3'd7; + always @(*) begin + main_sdram_bankmachine7_cmd_payload_a <= 14'd0; + if (main_sdram_bankmachine7_row_col_n_addr_sel) begin + main_sdram_bankmachine7_cmd_payload_a <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; + end else begin + main_sdram_bankmachine7_cmd_payload_a <= ((main_sdram_bankmachine7_auto_precharge <<< 4'd10) | { + main_sdram_bankmachine7_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} + }); + end + end + assign main_sdram_bankmachine7_twtpcon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_cmd_payload_is_write); + assign main_sdram_bankmachine7_trccon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); + assign main_sdram_bankmachine7_trascon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); + always @(*) begin + main_sdram_bankmachine7_auto_precharge <= 1'd0; + if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine7_cmd_buffer_source_valid)) begin + if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7])) begin + main_sdram_bankmachine7_auto_precharge <= (main_sdram_bankmachine7_row_close == 1'd0); + end + end + end + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din = { + main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last, + main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first, + main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr, + main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we + }; + assign {main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_first = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_last = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re = main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; + always @(*) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= 3'd0; + if (main_sdram_bankmachine7_cmd_buffer_lookahead_replace) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce - 1'd1); + end else begin + main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine7_cmd_buffer_lookahead_produce; + end + end + assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable | main_sdram_bankmachine7_cmd_buffer_lookahead_replace)); + assign main_sdram_bankmachine7_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re); + assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine7_cmd_buffer_lookahead_consume; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout = main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 4'd8); + assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 1'd0); + assign main_sdram_bankmachine7_cmd_buffer_sink_ready = ((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready); + always @(*) begin + main_sdram_bankmachine7_row_open <= 1'd0; + main_sdram_bankmachine7_row_close <= 1'd0; + main_sdram_bankmachine7_refresh_gnt <= 1'd0; + main_sdram_bankmachine7_cmd_payload_cas <= 1'd0; + main_sdram_bankmachine7_cmd_payload_ras <= 1'd0; + main_sdram_bankmachine7_cmd_payload_we <= 1'd0; + main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd0; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd0; + main_sdram_bankmachine7_cmd_payload_is_read <= 1'd0; + main_sdram_bankmachine7_cmd_payload_is_write <= 1'd0; + main_sdram_bankmachine7_req_wdata_ready <= 1'd0; + main_sdram_bankmachine7_req_rdata_valid <= 1'd0; + builder_bankmachine7_next_state <= 3'd0; + main_sdram_bankmachine7_cmd_valid <= 1'd0; + builder_bankmachine7_next_state <= builder_bankmachine7_state; + case (builder_bankmachine7_state) + 1'd1: begin + if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin + main_sdram_bankmachine7_cmd_valid <= 1'd1; + if (main_sdram_bankmachine7_cmd_ready) begin + builder_bankmachine7_next_state <= 3'd5; + end + main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; + main_sdram_bankmachine7_cmd_payload_we <= 1'd1; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + end + main_sdram_bankmachine7_row_close <= 1'd1; + end + 2'd2: begin + if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin + builder_bankmachine7_next_state <= 3'd5; + end + main_sdram_bankmachine7_row_close <= 1'd1; + end + 2'd3: begin + if (main_sdram_bankmachine7_trccon_ready) begin + main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd1; + main_sdram_bankmachine7_row_open <= 1'd1; + main_sdram_bankmachine7_cmd_valid <= 1'd1; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + if (main_sdram_bankmachine7_cmd_ready) begin + builder_bankmachine7_next_state <= 3'd6; + end + main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; + end + end + 3'd4: begin + if (main_sdram_bankmachine7_twtpcon_ready) begin + main_sdram_bankmachine7_refresh_gnt <= 1'd1; + end + main_sdram_bankmachine7_row_close <= 1'd1; + main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; + if ((~main_sdram_bankmachine7_refresh_req)) begin + builder_bankmachine7_next_state <= 1'd0; + end + end + 3'd5: begin + builder_bankmachine7_next_state <= 2'd3; + end + 3'd6: begin + builder_bankmachine7_next_state <= 1'd0; + end + default: begin + if (main_sdram_bankmachine7_refresh_req) begin + builder_bankmachine7_next_state <= 3'd4; + end else begin + if (main_sdram_bankmachine7_cmd_buffer_source_valid) begin + if (main_sdram_bankmachine7_row_opened) begin + if (main_sdram_bankmachine7_row_hit) begin + main_sdram_bankmachine7_cmd_valid <= 1'd1; + if (main_sdram_bankmachine7_cmd_buffer_source_payload_we) begin + main_sdram_bankmachine7_req_wdata_ready <= main_sdram_bankmachine7_cmd_ready; + main_sdram_bankmachine7_cmd_payload_is_write <= 1'd1; + main_sdram_bankmachine7_cmd_payload_we <= 1'd1; + end else begin + main_sdram_bankmachine7_req_rdata_valid <= main_sdram_bankmachine7_cmd_ready; + main_sdram_bankmachine7_cmd_payload_is_read <= 1'd1; + end + main_sdram_bankmachine7_cmd_payload_cas <= 1'd1; + if ((main_sdram_bankmachine7_cmd_ready & main_sdram_bankmachine7_auto_precharge)) begin + builder_bankmachine7_next_state <= 2'd2; + end + end else begin + builder_bankmachine7_next_state <= 1'd1; + end + end else begin + builder_bankmachine7_next_state <= 2'd3; + end + end + end + end + endcase + end + assign main_sdram_trrdcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); + assign main_sdram_tfawcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); + assign main_sdram_ras_allowed = (main_sdram_trrdcon_ready & main_sdram_tfawcon_ready); + assign main_sdram_tccdcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_cmd_payload_is_write | main_sdram_choose_req_cmd_payload_is_read)); + assign main_sdram_cas_allowed = main_sdram_tccdcon_ready; + assign main_sdram_twtrcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + assign main_sdram_read_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_read) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_read)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_read)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_read)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_read)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_read)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_read)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_read)); + assign main_sdram_write_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_write) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_write)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_write)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_write)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_write)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_write)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_write)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_write)); + assign main_sdram_max_time0 = (main_sdram_time0 == 1'd0); + assign main_sdram_max_time1 = (main_sdram_time1 == 1'd0); + assign main_sdram_bankmachine0_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine1_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine2_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine3_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine4_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine5_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine6_refresh_req = main_sdram_cmd_valid; + assign main_sdram_bankmachine7_refresh_req = main_sdram_cmd_valid; + assign main_sdram_go_to_refresh = (((((((main_sdram_bankmachine0_refresh_gnt & main_sdram_bankmachine1_refresh_gnt) & main_sdram_bankmachine2_refresh_gnt) & main_sdram_bankmachine3_refresh_gnt) & main_sdram_bankmachine4_refresh_gnt) & main_sdram_bankmachine5_refresh_gnt) & main_sdram_bankmachine6_refresh_gnt) & main_sdram_bankmachine7_refresh_gnt); + assign main_sdram_interface_rdata = { + main_sdram_dfi_p3_rddata, + main_sdram_dfi_p2_rddata, + main_sdram_dfi_p1_rddata, + main_sdram_dfi_p0_rddata + }; + assign {main_sdram_dfi_p3_wrdata, main_sdram_dfi_p2_wrdata, main_sdram_dfi_p1_wrdata, main_sdram_dfi_p0_wrdata} = main_sdram_interface_wdata; + assign {main_sdram_dfi_p3_wrdata_mask, main_sdram_dfi_p2_wrdata_mask, main_sdram_dfi_p1_wrdata_mask, main_sdram_dfi_p0_wrdata_mask} = (~main_sdram_interface_wdata_we); + always @(*) begin + main_sdram_choose_cmd_valids <= 8'd0; + main_sdram_choose_cmd_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + main_sdram_choose_cmd_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); + end + assign main_sdram_choose_cmd_request = main_sdram_choose_cmd_valids; + assign main_sdram_choose_cmd_cmd_valid = builder_rhs_array_muxed0; + assign main_sdram_choose_cmd_cmd_payload_a = builder_rhs_array_muxed1; + assign main_sdram_choose_cmd_cmd_payload_ba = builder_rhs_array_muxed2; + assign main_sdram_choose_cmd_cmd_payload_is_read = builder_rhs_array_muxed3; + assign main_sdram_choose_cmd_cmd_payload_is_write = builder_rhs_array_muxed4; + assign main_sdram_choose_cmd_cmd_payload_is_cmd = builder_rhs_array_muxed5; + always @(*) begin + main_sdram_choose_cmd_cmd_payload_cas <= 1'd0; + if (main_sdram_choose_cmd_cmd_valid) begin + main_sdram_choose_cmd_cmd_payload_cas <= builder_t_array_muxed0; + end + end + always @(*) begin + main_sdram_choose_cmd_cmd_payload_ras <= 1'd0; + if (main_sdram_choose_cmd_cmd_valid) begin + main_sdram_choose_cmd_cmd_payload_ras <= builder_t_array_muxed1; + end + end + always @(*) begin + main_sdram_choose_cmd_cmd_payload_we <= 1'd0; + if (main_sdram_choose_cmd_cmd_valid) begin + main_sdram_choose_cmd_cmd_payload_we <= builder_t_array_muxed2; + end + end + assign main_sdram_choose_cmd_ce = (main_sdram_choose_cmd_cmd_ready | (~main_sdram_choose_cmd_cmd_valid)); + always @(*) begin + main_sdram_choose_req_valids <= 8'd0; + main_sdram_choose_req_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + main_sdram_choose_req_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); + end + assign main_sdram_choose_req_request = main_sdram_choose_req_valids; + assign main_sdram_choose_req_cmd_valid = builder_rhs_array_muxed6; + assign main_sdram_choose_req_cmd_payload_a = builder_rhs_array_muxed7; + assign main_sdram_choose_req_cmd_payload_ba = builder_rhs_array_muxed8; + assign main_sdram_choose_req_cmd_payload_is_read = builder_rhs_array_muxed9; + assign main_sdram_choose_req_cmd_payload_is_write = builder_rhs_array_muxed10; + assign main_sdram_choose_req_cmd_payload_is_cmd = builder_rhs_array_muxed11; + always @(*) begin + main_sdram_choose_req_cmd_payload_cas <= 1'd0; + if (main_sdram_choose_req_cmd_valid) begin + main_sdram_choose_req_cmd_payload_cas <= builder_t_array_muxed3; + end + end + always @(*) begin + main_sdram_choose_req_cmd_payload_ras <= 1'd0; + if (main_sdram_choose_req_cmd_valid) begin + main_sdram_choose_req_cmd_payload_ras <= builder_t_array_muxed4; + end + end + always @(*) begin + main_sdram_choose_req_cmd_payload_we <= 1'd0; + if (main_sdram_choose_req_cmd_valid) begin + main_sdram_choose_req_cmd_payload_we <= builder_t_array_muxed5; + end + end + always @(*) begin + main_sdram_bankmachine0_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd0))) begin + main_sdram_bankmachine0_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd0))) begin + main_sdram_bankmachine0_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine1_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd1))) begin + main_sdram_bankmachine1_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd1))) begin + main_sdram_bankmachine1_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine2_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd2))) begin + main_sdram_bankmachine2_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd2))) begin + main_sdram_bankmachine2_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine3_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd3))) begin + main_sdram_bankmachine3_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd3))) begin + main_sdram_bankmachine3_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine4_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd4))) begin + main_sdram_bankmachine4_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd4))) begin + main_sdram_bankmachine4_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine5_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd5))) begin + main_sdram_bankmachine5_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd5))) begin + main_sdram_bankmachine5_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine6_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd6))) begin + main_sdram_bankmachine6_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd6))) begin + main_sdram_bankmachine6_cmd_ready <= 1'd1; + end + end + always @(*) begin + main_sdram_bankmachine7_cmd_ready <= 1'd0; + if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd7))) begin + main_sdram_bankmachine7_cmd_ready <= 1'd1; + end + if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd7))) begin + main_sdram_bankmachine7_cmd_ready <= 1'd1; + end + end + assign main_sdram_choose_req_ce = (main_sdram_choose_req_cmd_ready | (~main_sdram_choose_req_cmd_valid)); + assign main_sdram_dfi_p0_reset_n = 1'd1; + assign main_sdram_dfi_p0_cke = {1{main_sdram_steerer0}}; + assign main_sdram_dfi_p0_odt = {1{main_sdram_steerer1}}; + assign main_sdram_dfi_p1_reset_n = 1'd1; + assign main_sdram_dfi_p1_cke = {1{main_sdram_steerer2}}; + assign main_sdram_dfi_p1_odt = {1{main_sdram_steerer3}}; + assign main_sdram_dfi_p2_reset_n = 1'd1; + assign main_sdram_dfi_p2_cke = {1{main_sdram_steerer4}}; + assign main_sdram_dfi_p2_odt = {1{main_sdram_steerer5}}; + assign main_sdram_dfi_p3_reset_n = 1'd1; + assign main_sdram_dfi_p3_cke = {1{main_sdram_steerer6}}; + assign main_sdram_dfi_p3_odt = {1{main_sdram_steerer7}}; + assign main_sdram_tfawcon_count = (((main_sdram_tfawcon_window[0] + main_sdram_tfawcon_window[1]) + main_sdram_tfawcon_window[2]) + main_sdram_tfawcon_window[3]); + always @(*) begin + main_sdram_choose_req_cmd_ready <= 1'd0; + main_sdram_steerer_sel0 <= 2'd0; + main_sdram_steerer_sel1 <= 2'd0; + main_sdram_steerer_sel2 <= 2'd0; + main_sdram_choose_cmd_want_activates <= 1'd0; + main_sdram_en0 <= 1'd0; + main_sdram_steerer_sel3 <= 2'd0; + builder_multiplexer_next_state <= 4'd0; + main_sdram_choose_cmd_cmd_ready <= 1'd0; + main_sdram_choose_req_want_reads <= 1'd0; + main_sdram_cmd_ready <= 1'd0; + main_sdram_choose_req_want_writes <= 1'd0; + main_sdram_en1 <= 1'd0; + builder_multiplexer_next_state <= builder_multiplexer_state; + case (builder_multiplexer_state) + 1'd1: begin + main_sdram_en1 <= 1'd1; + main_sdram_choose_req_want_writes <= 1'd1; + if (1'd0) begin + main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); + end else begin + main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; + main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); + main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; + end + main_sdram_steerer_sel0 <= 1'd0; + main_sdram_steerer_sel1 <= 1'd0; + main_sdram_steerer_sel2 <= 1'd1; + main_sdram_steerer_sel3 <= 2'd2; + if (main_sdram_read_available) begin + if (((~main_sdram_write_available) | main_sdram_max_time1)) begin + builder_multiplexer_next_state <= 2'd3; + end + end + if (main_sdram_go_to_refresh) begin + builder_multiplexer_next_state <= 2'd2; + end + end + 2'd2: begin + main_sdram_steerer_sel0 <= 2'd3; + main_sdram_cmd_ready <= 1'd1; + if (main_sdram_cmd_last) begin + builder_multiplexer_next_state <= 1'd0; + end + end + 2'd3: begin + if (main_sdram_twtrcon_ready) begin + builder_multiplexer_next_state <= 1'd0; + end + end + 3'd4: begin + builder_multiplexer_next_state <= 3'd5; + end + 3'd5: begin + builder_multiplexer_next_state <= 3'd6; + end + 3'd6: begin + builder_multiplexer_next_state <= 3'd7; + end + 3'd7: begin + builder_multiplexer_next_state <= 4'd8; + end + 4'd8: begin + builder_multiplexer_next_state <= 4'd9; + end + 4'd9: begin + builder_multiplexer_next_state <= 4'd10; + end + 4'd10: begin + builder_multiplexer_next_state <= 4'd11; + end + 4'd11: begin + builder_multiplexer_next_state <= 1'd1; + end + default: begin + main_sdram_en0 <= 1'd1; + main_sdram_choose_req_want_reads <= 1'd1; + if (1'd0) begin + main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); + end else begin + main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; + main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); + main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; + end + main_sdram_steerer_sel0 <= 1'd0; + main_sdram_steerer_sel1 <= 1'd1; + main_sdram_steerer_sel2 <= 2'd2; + main_sdram_steerer_sel3 <= 1'd0; + if (main_sdram_write_available) begin + if (((~main_sdram_read_available) | main_sdram_max_time0)) begin + builder_multiplexer_next_state <= 3'd4; + end + end + if (main_sdram_go_to_refresh) begin + builder_multiplexer_next_state <= 2'd2; + end + end + endcase + end + assign builder_roundrobin0_request = { + (((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin0_ce = ((~main_sdram_interface_bank0_valid) & (~main_sdram_interface_bank0_lock)); + assign main_sdram_interface_bank0_addr = builder_rhs_array_muxed12; + assign main_sdram_interface_bank0_we = builder_rhs_array_muxed13; + assign main_sdram_interface_bank0_valid = builder_rhs_array_muxed14; + assign builder_roundrobin1_request = { + (((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin1_ce = ((~main_sdram_interface_bank1_valid) & (~main_sdram_interface_bank1_lock)); + assign main_sdram_interface_bank1_addr = builder_rhs_array_muxed15; + assign main_sdram_interface_bank1_we = builder_rhs_array_muxed16; + assign main_sdram_interface_bank1_valid = builder_rhs_array_muxed17; + assign builder_roundrobin2_request = { + (((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin2_ce = ((~main_sdram_interface_bank2_valid) & (~main_sdram_interface_bank2_lock)); + assign main_sdram_interface_bank2_addr = builder_rhs_array_muxed18; + assign main_sdram_interface_bank2_we = builder_rhs_array_muxed19; + assign main_sdram_interface_bank2_valid = builder_rhs_array_muxed20; + assign builder_roundrobin3_request = { + (((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin3_ce = ((~main_sdram_interface_bank3_valid) & (~main_sdram_interface_bank3_lock)); + assign main_sdram_interface_bank3_addr = builder_rhs_array_muxed21; + assign main_sdram_interface_bank3_we = builder_rhs_array_muxed22; + assign main_sdram_interface_bank3_valid = builder_rhs_array_muxed23; + assign builder_roundrobin4_request = { + (((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin4_ce = ((~main_sdram_interface_bank4_valid) & (~main_sdram_interface_bank4_lock)); + assign main_sdram_interface_bank4_addr = builder_rhs_array_muxed24; + assign main_sdram_interface_bank4_we = builder_rhs_array_muxed25; + assign main_sdram_interface_bank4_valid = builder_rhs_array_muxed26; + assign builder_roundrobin5_request = { + (((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin5_ce = ((~main_sdram_interface_bank5_valid) & (~main_sdram_interface_bank5_lock)); + assign main_sdram_interface_bank5_addr = builder_rhs_array_muxed27; + assign main_sdram_interface_bank5_we = builder_rhs_array_muxed28; + assign main_sdram_interface_bank5_valid = builder_rhs_array_muxed29; + assign builder_roundrobin6_request = { + (((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin6_ce = ((~main_sdram_interface_bank6_valid) & (~main_sdram_interface_bank6_lock)); + assign main_sdram_interface_bank6_addr = builder_rhs_array_muxed30; + assign main_sdram_interface_bank6_we = builder_rhs_array_muxed31; + assign main_sdram_interface_bank6_valid = builder_rhs_array_muxed32; + assign builder_roundrobin7_request = { + (((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid) + }; + assign builder_roundrobin7_ce = ((~main_sdram_interface_bank7_valid) & (~main_sdram_interface_bank7_lock)); + assign main_sdram_interface_bank7_addr = builder_rhs_array_muxed33; + assign main_sdram_interface_bank7_we = builder_rhs_array_muxed34; + assign main_sdram_interface_bank7_valid = builder_rhs_array_muxed35; + assign main_port_cmd_ready = ((((((((1'd0 | (((builder_roundrobin0_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank0_ready)) | (((builder_roundrobin1_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank1_ready)) | (((builder_roundrobin2_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank2_ready)) | (((builder_roundrobin3_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank3_ready)) | (((builder_roundrobin4_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank4_ready)) | (((builder_roundrobin5_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank5_ready)) | (((builder_roundrobin6_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank6_ready)) | (((builder_roundrobin7_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0)))))) & main_sdram_interface_bank7_ready)); + assign main_port_wdata_ready = builder_new_master_wdata_ready2; + assign main_port_rdata_valid = builder_new_master_rdata_valid9; + always @(*) begin + main_sdram_interface_wdata <= 128'd0; + main_sdram_interface_wdata_we <= 16'd0; + case ({ + builder_new_master_wdata_ready2 + }) + 1'd1: begin + main_sdram_interface_wdata <= main_port_wdata_payload_data; + main_sdram_interface_wdata_we <= main_port_wdata_payload_we; + end + default: begin + main_sdram_interface_wdata <= 1'd0; + main_sdram_interface_wdata_we <= 1'd0; + end + endcase + end + assign main_port_rdata_payload_data = main_sdram_interface_rdata; + assign builder_roundrobin0_grant = 1'd0; + assign builder_roundrobin1_grant = 1'd0; + assign builder_roundrobin2_grant = 1'd0; + assign builder_roundrobin3_grant = 1'd0; + assign builder_roundrobin4_grant = 1'd0; + assign builder_roundrobin5_grant = 1'd0; + assign builder_roundrobin6_grant = 1'd0; + assign builder_roundrobin7_grant = 1'd0; + assign main_data_port_adr = main_interface0_wb_sdram_adr[10:2]; + always @(*) begin + main_data_port_we <= 16'd0; + main_data_port_dat_w <= 128'd0; + if (main_write_from_slave) begin + main_data_port_dat_w <= main_dat_r; + main_data_port_we <= {16{1'd1}}; + end else begin + main_data_port_dat_w <= {4{main_interface0_wb_sdram_dat_w}}; + if ((((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb) & main_interface0_wb_sdram_we) & main_interface0_wb_sdram_ack)) begin + main_data_port_we <= { + ({4{(main_interface0_wb_sdram_adr[1:0] == 1'd0)}} & main_interface0_wb_sdram_sel), + ({4{(main_interface0_wb_sdram_adr[1:0] == 1'd1)}} & main_interface0_wb_sdram_sel), + ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd2)}} & main_interface0_wb_sdram_sel), + ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd3)}} & main_interface0_wb_sdram_sel) + }; + end + end + end + assign main_dat_w = main_data_port_dat_r; + assign main_sel = 16'd65535; + always @(*) begin + main_interface0_wb_sdram_dat_r <= 32'd0; + case (main_adr_offset_r) + 1'd0: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[127:96]; + end + 1'd1: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[95:64]; + end + 2'd2: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[63:32]; + end + default: begin + main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[31:0]; + end + endcase + end + assign {main_tag_do_dirty, main_tag_do_tag} = main_tag_port_dat_r; + assign main_tag_port_dat_w = {main_tag_di_dirty, main_tag_di_tag}; + assign main_tag_port_adr = main_interface0_wb_sdram_adr[10:2]; + assign main_tag_di_tag = main_interface0_wb_sdram_adr[29:11]; + assign main_adr = {main_tag_do_tag, main_interface0_wb_sdram_adr[10:2]}; + always @(*) begin + main_tag_di_dirty <= 1'd0; + main_interface0_wb_sdram_ack <= 1'd0; + main_word_clr <= 1'd0; + main_word_inc <= 1'd0; + main_write_from_slave <= 1'd0; + main_cyc <= 1'd0; + main_stb <= 1'd0; + main_tag_port_we <= 1'd0; + main_we <= 1'd0; + builder_fullmemorywe_next_state <= 2'd0; + builder_fullmemorywe_next_state <= builder_fullmemorywe_state; + case (builder_fullmemorywe_state) + 1'd1: begin + main_word_clr <= 1'd1; + if ((main_tag_do_tag == main_interface0_wb_sdram_adr[29:11])) begin + main_interface0_wb_sdram_ack <= 1'd1; + if (main_interface0_wb_sdram_we) begin + main_tag_di_dirty <= 1'd1; + main_tag_port_we <= 1'd1; + end + builder_fullmemorywe_next_state <= 1'd0; + end else begin + if (main_tag_do_dirty) begin + builder_fullmemorywe_next_state <= 2'd2; + end else begin + main_tag_port_we <= 1'd1; + main_word_clr <= 1'd1; + builder_fullmemorywe_next_state <= 2'd3; + end + end + end + 2'd2: begin + main_stb <= 1'd1; + main_cyc <= 1'd1; + main_we <= 1'd1; + if (main_ack) begin + main_word_inc <= 1'd1; + if (1'd1) begin + main_tag_port_we <= 1'd1; + main_word_clr <= 1'd1; + builder_fullmemorywe_next_state <= 2'd3; + end + end + end + 2'd3: begin + main_stb <= 1'd1; + main_cyc <= 1'd1; + main_we <= 1'd0; + if (main_ack) begin + main_write_from_slave <= 1'd1; + main_word_inc <= 1'd1; + if (1'd1) begin + builder_fullmemorywe_next_state <= 1'd1; + end else begin + builder_fullmemorywe_next_state <= 2'd3; + end + end + end + default: begin + if ((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb)) begin + builder_fullmemorywe_next_state <= 1'd1; + end + end + endcase + end + assign main_wdata_converter_sink_valid = ((main_cyc & main_stb) & main_we); + assign main_wdata_converter_sink_payload_data = main_dat_w; + assign main_wdata_converter_sink_payload_we = main_sel; + assign main_port_wdata_valid = main_wdata_converter_source_valid; + assign main_wdata_converter_source_ready = main_port_wdata_ready; + assign main_port_wdata_first = main_wdata_converter_source_first; + assign main_port_wdata_last = main_wdata_converter_source_last; + assign main_port_wdata_payload_data = main_wdata_converter_source_payload_data; + assign main_port_wdata_payload_we = main_wdata_converter_source_payload_we; + assign main_rdata_converter_sink_valid = main_port_rdata_valid; + assign main_port_rdata_ready = main_rdata_converter_sink_ready; + assign main_rdata_converter_sink_first = main_port_rdata_first; + assign main_rdata_converter_sink_last = main_port_rdata_last; + assign main_rdata_converter_sink_payload_data = main_port_rdata_payload_data; + assign main_rdata_converter_source_ready = 1'd1; + assign main_dat_r = main_rdata_converter_source_payload_data; + assign main_wdata_converter_converter_sink_valid = main_wdata_converter_sink_valid; + assign main_wdata_converter_converter_sink_first = main_wdata_converter_sink_first; + assign main_wdata_converter_converter_sink_last = main_wdata_converter_sink_last; + assign main_wdata_converter_sink_ready = main_wdata_converter_converter_sink_ready; + assign main_wdata_converter_converter_sink_payload_data = { + main_wdata_converter_sink_payload_we, main_wdata_converter_sink_payload_data + }; + assign main_wdata_converter_source_valid = main_wdata_converter_source_source_valid; + assign main_wdata_converter_source_first = main_wdata_converter_source_source_first; + assign main_wdata_converter_source_last = main_wdata_converter_source_source_last; + assign main_wdata_converter_source_source_ready = main_wdata_converter_source_ready; + assign {main_wdata_converter_source_payload_we, main_wdata_converter_source_payload_data} = main_wdata_converter_source_source_payload_data; + assign main_wdata_converter_source_source_valid = main_wdata_converter_converter_source_valid; + assign main_wdata_converter_converter_source_ready = main_wdata_converter_source_source_ready; + assign main_wdata_converter_source_source_first = main_wdata_converter_converter_source_first; + assign main_wdata_converter_source_source_last = main_wdata_converter_converter_source_last; + assign main_wdata_converter_source_source_payload_data = main_wdata_converter_converter_source_payload_data; + assign main_wdata_converter_converter_source_valid = main_wdata_converter_converter_sink_valid; + assign main_wdata_converter_converter_sink_ready = main_wdata_converter_converter_source_ready; + assign main_wdata_converter_converter_source_first = main_wdata_converter_converter_sink_first; + assign main_wdata_converter_converter_source_last = main_wdata_converter_converter_sink_last; + assign main_wdata_converter_converter_source_payload_data = main_wdata_converter_converter_sink_payload_data; + assign main_wdata_converter_converter_source_payload_valid_token_count = 1'd1; + assign main_rdata_converter_converter_sink_valid = main_rdata_converter_sink_valid; + assign main_rdata_converter_converter_sink_first = main_rdata_converter_sink_first; + assign main_rdata_converter_converter_sink_last = main_rdata_converter_sink_last; + assign main_rdata_converter_sink_ready = main_rdata_converter_converter_sink_ready; + assign main_rdata_converter_converter_sink_payload_data = { + main_rdata_converter_sink_payload_data + }; + assign main_rdata_converter_source_valid = main_rdata_converter_source_source_valid; + assign main_rdata_converter_source_first = main_rdata_converter_source_source_first; + assign main_rdata_converter_source_last = main_rdata_converter_source_source_last; + assign main_rdata_converter_source_source_ready = main_rdata_converter_source_ready; + assign {main_rdata_converter_source_payload_data} = main_rdata_converter_source_source_payload_data; + assign main_rdata_converter_source_source_valid = main_rdata_converter_converter_source_valid; + assign main_rdata_converter_converter_source_ready = main_rdata_converter_source_source_ready; + assign main_rdata_converter_source_source_first = main_rdata_converter_converter_source_first; + assign main_rdata_converter_source_source_last = main_rdata_converter_converter_source_last; + assign main_rdata_converter_source_source_payload_data = main_rdata_converter_converter_source_payload_data; + assign main_rdata_converter_converter_source_valid = main_rdata_converter_converter_sink_valid; + assign main_rdata_converter_converter_sink_ready = main_rdata_converter_converter_source_ready; + assign main_rdata_converter_converter_source_first = main_rdata_converter_converter_sink_first; + assign main_rdata_converter_converter_source_last = main_rdata_converter_converter_sink_last; + assign main_rdata_converter_converter_source_payload_data = main_rdata_converter_converter_sink_payload_data; + assign main_rdata_converter_converter_source_payload_valid_token_count = 1'd1; + always @(*) begin + builder_litedramwishbone2native_next_state <= 2'd0; + main_ack <= 1'd0; + main_port_cmd_payload_we <= 1'd0; + main_port_cmd_payload_addr <= 24'd0; + main_count_next_value <= 1'd0; + main_count_next_value_ce <= 1'd0; + main_port_cmd_valid <= 1'd0; + builder_litedramwishbone2native_next_state <= builder_litedramwishbone2native_state; + case (builder_litedramwishbone2native_state) + 1'd1: begin + if (main_wdata_converter_sink_ready) begin + main_ack <= 1'd1; + builder_litedramwishbone2native_next_state <= 1'd0; + end + end + 2'd2: begin + if (main_rdata_converter_source_valid) begin + main_ack <= 1'd1; + builder_litedramwishbone2native_next_state <= 1'd0; + end + end + default: begin + main_port_cmd_valid <= (main_cyc & main_stb); + main_port_cmd_payload_we <= main_we; + main_port_cmd_payload_addr <= (((main_adr * 1'd1) + main_count) - 1'd0); + if ((main_port_cmd_valid & main_port_cmd_ready)) begin + main_count_next_value <= (main_count + 1'd1); + main_count_next_value_ce <= 1'd1; + if ((main_count == 1'd0)) begin + main_count_next_value <= 1'd0; + main_count_next_value_ce <= 1'd1; + if (main_we) begin + builder_litedramwishbone2native_next_state <= 1'd1; + end else begin + builder_litedramwishbone2native_next_state <= 2'd2; + end + end + end + end + endcase + end + assign main_interface0_wb_sdram_adr = builder_rhs_array_muxed36; + assign main_interface0_wb_sdram_dat_w = builder_rhs_array_muxed37; + assign main_interface0_wb_sdram_sel = builder_rhs_array_muxed38; + assign main_interface0_wb_sdram_cyc = builder_rhs_array_muxed39; + assign main_interface0_wb_sdram_stb = builder_rhs_array_muxed40; + assign main_interface0_wb_sdram_we = builder_rhs_array_muxed41; + assign main_interface0_wb_sdram_cti = builder_rhs_array_muxed42; + assign main_interface0_wb_sdram_bte = builder_rhs_array_muxed43; + assign main_interface1_wb_sdram_dat_r = main_interface0_wb_sdram_dat_r; + assign main_interface1_wb_sdram_ack = (main_interface0_wb_sdram_ack & (builder_wb_sdram_con_grant == 1'd0)); + assign main_interface1_wb_sdram_err = (main_interface0_wb_sdram_err & (builder_wb_sdram_con_grant == 1'd0)); + assign builder_wb_sdram_con_request = {main_interface1_wb_sdram_cyc}; + assign builder_wb_sdram_con_grant = 1'd0; + assign builder_minsoc_shared_adr = builder_rhs_array_muxed44; + assign builder_minsoc_shared_dat_w = builder_rhs_array_muxed45; + assign builder_minsoc_shared_sel = builder_rhs_array_muxed46; + assign builder_minsoc_shared_cyc = builder_rhs_array_muxed47; + assign builder_minsoc_shared_stb = builder_rhs_array_muxed48; + assign builder_minsoc_shared_we = builder_rhs_array_muxed49; + assign builder_minsoc_shared_cti = builder_rhs_array_muxed50; + assign builder_minsoc_shared_bte = builder_rhs_array_muxed51; + assign main_minsoc_interface0_soc_bus_dat_r = builder_minsoc_shared_dat_r; + assign main_minsoc_interface1_soc_bus_dat_r = builder_minsoc_shared_dat_r; + assign main_minsoc_interface0_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd0)); + assign main_minsoc_interface1_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd1)); + assign main_minsoc_interface0_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd0)); + assign main_minsoc_interface1_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd1)); + assign builder_minsoc_request = { + main_minsoc_interface1_soc_bus_cyc, main_minsoc_interface0_soc_bus_cyc + }; + always @(*) begin + builder_minsoc_slave_sel <= 4'd0; + builder_minsoc_slave_sel[0] <= (builder_minsoc_shared_adr[28:13] == 1'd0); + builder_minsoc_slave_sel[1] <= (builder_minsoc_shared_adr[28:10] == 13'd4096); + builder_minsoc_slave_sel[2] <= (builder_minsoc_shared_adr[28:14] == 10'd512); + builder_minsoc_slave_sel[3] <= (builder_minsoc_shared_adr[28:26] == 3'd4); + end + assign main_minsoc_rom_bus_adr = builder_minsoc_shared_adr; + assign main_minsoc_rom_bus_dat_w = builder_minsoc_shared_dat_w; + assign main_minsoc_rom_bus_sel = builder_minsoc_shared_sel; + assign main_minsoc_rom_bus_stb = builder_minsoc_shared_stb; + assign main_minsoc_rom_bus_we = builder_minsoc_shared_we; + assign main_minsoc_rom_bus_cti = builder_minsoc_shared_cti; + assign main_minsoc_rom_bus_bte = builder_minsoc_shared_bte; + assign main_minsoc_sram_bus_adr = builder_minsoc_shared_adr; + assign main_minsoc_sram_bus_dat_w = builder_minsoc_shared_dat_w; + assign main_minsoc_sram_bus_sel = builder_minsoc_shared_sel; + assign main_minsoc_sram_bus_stb = builder_minsoc_shared_stb; + assign main_minsoc_sram_bus_we = builder_minsoc_shared_we; + assign main_minsoc_sram_bus_cti = builder_minsoc_shared_cti; + assign main_minsoc_sram_bus_bte = builder_minsoc_shared_bte; + assign main_minsoc_bus_wishbone_adr = builder_minsoc_shared_adr; + assign main_minsoc_bus_wishbone_dat_w = builder_minsoc_shared_dat_w; + assign main_minsoc_bus_wishbone_sel = builder_minsoc_shared_sel; + assign main_minsoc_bus_wishbone_stb = builder_minsoc_shared_stb; + assign main_minsoc_bus_wishbone_we = builder_minsoc_shared_we; + assign main_minsoc_bus_wishbone_cti = builder_minsoc_shared_cti; + assign main_minsoc_bus_wishbone_bte = builder_minsoc_shared_bte; + assign main_interface1_wb_sdram_adr = builder_minsoc_shared_adr; + assign main_interface1_wb_sdram_dat_w = builder_minsoc_shared_dat_w; + assign main_interface1_wb_sdram_sel = builder_minsoc_shared_sel; + assign main_interface1_wb_sdram_stb = builder_minsoc_shared_stb; + assign main_interface1_wb_sdram_we = builder_minsoc_shared_we; + assign main_interface1_wb_sdram_cti = builder_minsoc_shared_cti; + assign main_interface1_wb_sdram_bte = builder_minsoc_shared_bte; + assign main_minsoc_rom_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[0]); + assign main_minsoc_sram_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[1]); + assign main_minsoc_bus_wishbone_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[2]); + assign main_interface1_wb_sdram_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[3]); + assign builder_minsoc_shared_err = (((main_minsoc_rom_bus_err | main_minsoc_sram_bus_err) | main_minsoc_bus_wishbone_err) | main_interface1_wb_sdram_err); + assign builder_minsoc_wait = ((builder_minsoc_shared_stb & builder_minsoc_shared_cyc) & (~builder_minsoc_shared_ack)); + always @(*) begin + builder_minsoc_shared_ack <= 1'd0; + builder_minsoc_error <= 1'd0; + builder_minsoc_shared_dat_r <= 32'd0; + builder_minsoc_shared_ack <= (((main_minsoc_rom_bus_ack | main_minsoc_sram_bus_ack) | main_minsoc_bus_wishbone_ack) | main_interface1_wb_sdram_ack); + builder_minsoc_shared_dat_r <= (((({32{builder_minsoc_slave_sel_r[0]}} & main_minsoc_rom_bus_dat_r) | ({32{builder_minsoc_slave_sel_r[1]}} & main_minsoc_sram_bus_dat_r)) | ({32{builder_minsoc_slave_sel_r[2]}} & main_minsoc_bus_wishbone_dat_r)) | ({32{builder_minsoc_slave_sel_r[3]}} & main_interface1_wb_sdram_dat_r)); + if (builder_minsoc_done) begin + builder_minsoc_shared_dat_r <= 32'd4294967295; + builder_minsoc_shared_ack <= 1'd1; + builder_minsoc_error <= 1'd1; + end + end + assign builder_minsoc_done = (builder_minsoc_count == 1'd0); + assign builder_minsoc_csrbank0_sel = (builder_minsoc_interface0_bank_bus_adr[13:9] == 1'd0); + assign builder_minsoc_csrbank0_reset0_r = builder_minsoc_interface0_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank0_reset0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); + assign builder_minsoc_csrbank0_reset0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); + assign builder_minsoc_csrbank0_scratch3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_scratch3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); + assign builder_minsoc_csrbank0_scratch3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); + assign builder_minsoc_csrbank0_scratch2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_scratch2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); + assign builder_minsoc_csrbank0_scratch2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); + assign builder_minsoc_csrbank0_scratch1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_scratch1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); + assign builder_minsoc_csrbank0_scratch1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); + assign builder_minsoc_csrbank0_scratch0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_scratch0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); + assign builder_minsoc_csrbank0_scratch0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); + assign builder_minsoc_csrbank0_bus_errors3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_bus_errors3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); + assign builder_minsoc_csrbank0_bus_errors3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); + assign builder_minsoc_csrbank0_bus_errors2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_bus_errors2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); + assign builder_minsoc_csrbank0_bus_errors2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); + assign builder_minsoc_csrbank0_bus_errors1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_bus_errors1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); + assign builder_minsoc_csrbank0_bus_errors1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); + assign builder_minsoc_csrbank0_bus_errors0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank0_bus_errors0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); + assign builder_minsoc_csrbank0_bus_errors0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); + assign builder_minsoc_csrbank0_reset0_w = main_minsoc_ctrl_reset_storage; + assign builder_minsoc_csrbank0_scratch3_w = main_minsoc_ctrl_scratch_storage[31:24]; + assign builder_minsoc_csrbank0_scratch2_w = main_minsoc_ctrl_scratch_storage[23:16]; + assign builder_minsoc_csrbank0_scratch1_w = main_minsoc_ctrl_scratch_storage[15:8]; + assign builder_minsoc_csrbank0_scratch0_w = main_minsoc_ctrl_scratch_storage[7:0]; + assign builder_minsoc_csrbank0_bus_errors3_w = main_minsoc_ctrl_bus_errors_status[31:24]; + assign builder_minsoc_csrbank0_bus_errors2_w = main_minsoc_ctrl_bus_errors_status[23:16]; + assign builder_minsoc_csrbank0_bus_errors1_w = main_minsoc_ctrl_bus_errors_status[15:8]; + assign builder_minsoc_csrbank0_bus_errors0_w = main_minsoc_ctrl_bus_errors_status[7:0]; + assign main_minsoc_ctrl_bus_errors_we = builder_minsoc_csrbank0_bus_errors0_we; + assign builder_minsoc_csrbank1_sel = (builder_minsoc_interface1_bank_bus_adr[13:9] == 3'd5); + assign builder_minsoc_csrbank1_half_sys8x_taps0_r = builder_minsoc_interface1_bank_bus_dat_w[4:0]; + assign builder_minsoc_csrbank1_half_sys8x_taps0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); + assign builder_minsoc_csrbank1_half_sys8x_taps0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); + assign main_a7ddrphy_cdly_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_cdly_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); + assign main_a7ddrphy_cdly_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); + assign main_a7ddrphy_cdly_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_cdly_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); + assign main_a7ddrphy_cdly_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); + assign builder_minsoc_csrbank1_dly_sel0_r = builder_minsoc_interface1_bank_bus_dat_w[1:0]; + assign builder_minsoc_csrbank1_dly_sel0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); + assign builder_minsoc_csrbank1_dly_sel0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); + assign main_a7ddrphy_rdly_dq_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_rdly_dq_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); + assign main_a7ddrphy_rdly_dq_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); + assign main_a7ddrphy_rdly_dq_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_rdly_dq_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); + assign main_a7ddrphy_rdly_dq_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); + assign main_a7ddrphy_rdly_dq_bitslip_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_rdly_dq_bitslip_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); + assign main_a7ddrphy_rdly_dq_bitslip_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); + assign main_a7ddrphy_rdly_dq_bitslip_r = builder_minsoc_interface1_bank_bus_dat_w[0]; + assign main_a7ddrphy_rdly_dq_bitslip_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); + assign main_a7ddrphy_rdly_dq_bitslip_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); + assign builder_minsoc_csrbank1_half_sys8x_taps0_w = main_a7ddrphy_half_sys8x_taps_storage[4:0]; + assign builder_minsoc_csrbank1_dly_sel0_w = main_a7ddrphy_dly_sel_storage[1:0]; + assign builder_minsoc_csrbank2_sel = (builder_minsoc_interface2_bank_bus_adr[13:9] == 4'd8); + assign builder_minsoc_csrbank2_dfii_control0_r = builder_minsoc_interface2_bank_bus_dat_w[3:0]; + assign builder_minsoc_csrbank2_dfii_control0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); + assign builder_minsoc_csrbank2_dfii_control0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); + assign builder_minsoc_csrbank2_dfii_pi0_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi0_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); + assign builder_minsoc_csrbank2_dfii_pi0_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); + assign main_sdram_phaseinjector0_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; + assign main_sdram_phaseinjector0_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); + assign main_sdram_phaseinjector0_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); + assign builder_minsoc_csrbank2_dfii_pi0_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi0_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); + assign builder_minsoc_csrbank2_dfii_pi0_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); + assign builder_minsoc_csrbank2_dfii_pi0_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); + assign builder_minsoc_csrbank2_dfii_pi0_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); + assign builder_minsoc_csrbank2_dfii_pi0_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; + assign builder_minsoc_csrbank2_dfii_pi0_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); + assign builder_minsoc_csrbank2_dfii_pi0_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); + assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); + assign builder_minsoc_csrbank2_dfii_pi0_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); + assign builder_minsoc_csrbank2_dfii_pi1_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi1_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); + assign builder_minsoc_csrbank2_dfii_pi1_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); + assign main_sdram_phaseinjector1_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; + assign main_sdram_phaseinjector1_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); + assign main_sdram_phaseinjector1_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); + assign builder_minsoc_csrbank2_dfii_pi1_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi1_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); + assign builder_minsoc_csrbank2_dfii_pi1_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); + assign builder_minsoc_csrbank2_dfii_pi1_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); + assign builder_minsoc_csrbank2_dfii_pi1_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); + assign builder_minsoc_csrbank2_dfii_pi1_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; + assign builder_minsoc_csrbank2_dfii_pi1_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); + assign builder_minsoc_csrbank2_dfii_pi1_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); + assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); + assign builder_minsoc_csrbank2_dfii_pi1_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); + assign builder_minsoc_csrbank2_dfii_pi2_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi2_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); + assign builder_minsoc_csrbank2_dfii_pi2_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); + assign main_sdram_phaseinjector2_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; + assign main_sdram_phaseinjector2_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); + assign main_sdram_phaseinjector2_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); + assign builder_minsoc_csrbank2_dfii_pi2_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi2_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); + assign builder_minsoc_csrbank2_dfii_pi2_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); + assign builder_minsoc_csrbank2_dfii_pi2_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); + assign builder_minsoc_csrbank2_dfii_pi2_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); + assign builder_minsoc_csrbank2_dfii_pi2_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; + assign builder_minsoc_csrbank2_dfii_pi2_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); + assign builder_minsoc_csrbank2_dfii_pi2_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); + assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); + assign builder_minsoc_csrbank2_dfii_pi2_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); + assign builder_minsoc_csrbank2_dfii_pi3_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi3_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); + assign builder_minsoc_csrbank2_dfii_pi3_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); + assign main_sdram_phaseinjector3_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; + assign main_sdram_phaseinjector3_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); + assign main_sdram_phaseinjector3_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); + assign builder_minsoc_csrbank2_dfii_pi3_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; + assign builder_minsoc_csrbank2_dfii_pi3_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); + assign builder_minsoc_csrbank2_dfii_pi3_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); + assign builder_minsoc_csrbank2_dfii_pi3_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); + assign builder_minsoc_csrbank2_dfii_pi3_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); + assign builder_minsoc_csrbank2_dfii_pi3_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; + assign builder_minsoc_csrbank2_dfii_pi3_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); + assign builder_minsoc_csrbank2_dfii_pi3_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); + assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); + assign builder_minsoc_csrbank2_dfii_pi3_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); + assign builder_minsoc_csrbank2_dfii_control0_w = main_sdram_storage[3:0]; + assign builder_minsoc_csrbank2_dfii_pi0_command0_w = main_sdram_phaseinjector0_command_storage[5:0]; + assign builder_minsoc_csrbank2_dfii_pi0_address1_w = main_sdram_phaseinjector0_address_storage[13:8]; + assign builder_minsoc_csrbank2_dfii_pi0_address0_w = main_sdram_phaseinjector0_address_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_baddress0_w = main_sdram_phaseinjector0_baddress_storage[2:0]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_w = main_sdram_phaseinjector0_wrdata_storage[31:24]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_w = main_sdram_phaseinjector0_wrdata_storage[23:16]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_w = main_sdram_phaseinjector0_wrdata_storage[15:8]; + assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_w = main_sdram_phaseinjector0_wrdata_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata3_w = main_sdram_phaseinjector0_status[31:24]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata2_w = main_sdram_phaseinjector0_status[23:16]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata1_w = main_sdram_phaseinjector0_status[15:8]; + assign builder_minsoc_csrbank2_dfii_pi0_rddata0_w = main_sdram_phaseinjector0_status[7:0]; + assign main_sdram_phaseinjector0_we = builder_minsoc_csrbank2_dfii_pi0_rddata0_we; + assign builder_minsoc_csrbank2_dfii_pi1_command0_w = main_sdram_phaseinjector1_command_storage[5:0]; + assign builder_minsoc_csrbank2_dfii_pi1_address1_w = main_sdram_phaseinjector1_address_storage[13:8]; + assign builder_minsoc_csrbank2_dfii_pi1_address0_w = main_sdram_phaseinjector1_address_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_baddress0_w = main_sdram_phaseinjector1_baddress_storage[2:0]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_w = main_sdram_phaseinjector1_wrdata_storage[31:24]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_w = main_sdram_phaseinjector1_wrdata_storage[23:16]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_w = main_sdram_phaseinjector1_wrdata_storage[15:8]; + assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_w = main_sdram_phaseinjector1_wrdata_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata3_w = main_sdram_phaseinjector1_status[31:24]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata2_w = main_sdram_phaseinjector1_status[23:16]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata1_w = main_sdram_phaseinjector1_status[15:8]; + assign builder_minsoc_csrbank2_dfii_pi1_rddata0_w = main_sdram_phaseinjector1_status[7:0]; + assign main_sdram_phaseinjector1_we = builder_minsoc_csrbank2_dfii_pi1_rddata0_we; + assign builder_minsoc_csrbank2_dfii_pi2_command0_w = main_sdram_phaseinjector2_command_storage[5:0]; + assign builder_minsoc_csrbank2_dfii_pi2_address1_w = main_sdram_phaseinjector2_address_storage[13:8]; + assign builder_minsoc_csrbank2_dfii_pi2_address0_w = main_sdram_phaseinjector2_address_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_baddress0_w = main_sdram_phaseinjector2_baddress_storage[2:0]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_w = main_sdram_phaseinjector2_wrdata_storage[31:24]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_w = main_sdram_phaseinjector2_wrdata_storage[23:16]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_w = main_sdram_phaseinjector2_wrdata_storage[15:8]; + assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_w = main_sdram_phaseinjector2_wrdata_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata3_w = main_sdram_phaseinjector2_status[31:24]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata2_w = main_sdram_phaseinjector2_status[23:16]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata1_w = main_sdram_phaseinjector2_status[15:8]; + assign builder_minsoc_csrbank2_dfii_pi2_rddata0_w = main_sdram_phaseinjector2_status[7:0]; + assign main_sdram_phaseinjector2_we = builder_minsoc_csrbank2_dfii_pi2_rddata0_we; + assign builder_minsoc_csrbank2_dfii_pi3_command0_w = main_sdram_phaseinjector3_command_storage[5:0]; + assign builder_minsoc_csrbank2_dfii_pi3_address1_w = main_sdram_phaseinjector3_address_storage[13:8]; + assign builder_minsoc_csrbank2_dfii_pi3_address0_w = main_sdram_phaseinjector3_address_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_baddress0_w = main_sdram_phaseinjector3_baddress_storage[2:0]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_w = main_sdram_phaseinjector3_wrdata_storage[31:24]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_w = main_sdram_phaseinjector3_wrdata_storage[23:16]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_w = main_sdram_phaseinjector3_wrdata_storage[15:8]; + assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_w = main_sdram_phaseinjector3_wrdata_storage[7:0]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata3_w = main_sdram_phaseinjector3_status[31:24]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata2_w = main_sdram_phaseinjector3_status[23:16]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata1_w = main_sdram_phaseinjector3_status[15:8]; + assign builder_minsoc_csrbank2_dfii_pi3_rddata0_w = main_sdram_phaseinjector3_status[7:0]; + assign main_sdram_phaseinjector3_we = builder_minsoc_csrbank2_dfii_pi3_rddata0_we; + assign builder_minsoc_csrbank3_sel = (builder_minsoc_interface3_bank_bus_adr[13:9] == 3'd4); + assign builder_minsoc_csrbank3_load3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_load3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); + assign builder_minsoc_csrbank3_load3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); + assign builder_minsoc_csrbank3_load2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_load2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); + assign builder_minsoc_csrbank3_load2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); + assign builder_minsoc_csrbank3_load1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_load1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); + assign builder_minsoc_csrbank3_load1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); + assign builder_minsoc_csrbank3_load0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_load0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); + assign builder_minsoc_csrbank3_load0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); + assign builder_minsoc_csrbank3_reload3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_reload3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); + assign builder_minsoc_csrbank3_reload3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); + assign builder_minsoc_csrbank3_reload2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_reload2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); + assign builder_minsoc_csrbank3_reload2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); + assign builder_minsoc_csrbank3_reload1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_reload1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); + assign builder_minsoc_csrbank3_reload1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); + assign builder_minsoc_csrbank3_reload0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_reload0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); + assign builder_minsoc_csrbank3_reload0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); + assign builder_minsoc_csrbank3_en0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank3_en0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); + assign builder_minsoc_csrbank3_en0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); + assign builder_minsoc_csrbank3_update_value0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank3_update_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); + assign builder_minsoc_csrbank3_update_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); + assign builder_minsoc_csrbank3_value3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_value3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); + assign builder_minsoc_csrbank3_value3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); + assign builder_minsoc_csrbank3_value2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_value2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); + assign builder_minsoc_csrbank3_value2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); + assign builder_minsoc_csrbank3_value1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_value1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); + assign builder_minsoc_csrbank3_value1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); + assign builder_minsoc_csrbank3_value0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank3_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); + assign builder_minsoc_csrbank3_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); + assign main_minsoc_timer0_eventmanager_status_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign main_minsoc_timer0_eventmanager_status_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); + assign main_minsoc_timer0_eventmanager_status_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); + assign main_minsoc_timer0_eventmanager_pending_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign main_minsoc_timer0_eventmanager_pending_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); + assign main_minsoc_timer0_eventmanager_pending_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); + assign builder_minsoc_csrbank3_ev_enable0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank3_ev_enable0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); + assign builder_minsoc_csrbank3_ev_enable0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); + assign builder_minsoc_csrbank3_load3_w = main_minsoc_timer0_load_storage[31:24]; + assign builder_minsoc_csrbank3_load2_w = main_minsoc_timer0_load_storage[23:16]; + assign builder_minsoc_csrbank3_load1_w = main_minsoc_timer0_load_storage[15:8]; + assign builder_minsoc_csrbank3_load0_w = main_minsoc_timer0_load_storage[7:0]; + assign builder_minsoc_csrbank3_reload3_w = main_minsoc_timer0_reload_storage[31:24]; + assign builder_minsoc_csrbank3_reload2_w = main_minsoc_timer0_reload_storage[23:16]; + assign builder_minsoc_csrbank3_reload1_w = main_minsoc_timer0_reload_storage[15:8]; + assign builder_minsoc_csrbank3_reload0_w = main_minsoc_timer0_reload_storage[7:0]; + assign builder_minsoc_csrbank3_en0_w = main_minsoc_timer0_en_storage; + assign builder_minsoc_csrbank3_update_value0_w = main_minsoc_timer0_update_value_storage; + assign builder_minsoc_csrbank3_value3_w = main_minsoc_timer0_value_status[31:24]; + assign builder_minsoc_csrbank3_value2_w = main_minsoc_timer0_value_status[23:16]; + assign builder_minsoc_csrbank3_value1_w = main_minsoc_timer0_value_status[15:8]; + assign builder_minsoc_csrbank3_value0_w = main_minsoc_timer0_value_status[7:0]; + assign main_minsoc_timer0_value_we = builder_minsoc_csrbank3_value0_we; + assign builder_minsoc_csrbank3_ev_enable0_w = main_minsoc_timer0_eventmanager_storage; + assign builder_minsoc_csrbank4_sel = (builder_minsoc_interface4_bank_bus_adr[13:9] == 2'd3); + assign main_minsoc_uart_rxtx_r = builder_minsoc_interface4_bank_bus_dat_w[7:0]; + assign main_minsoc_uart_rxtx_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); + assign main_minsoc_uart_rxtx_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); + assign builder_minsoc_csrbank4_txfull_r = builder_minsoc_interface4_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank4_txfull_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); + assign builder_minsoc_csrbank4_txfull_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); + assign builder_minsoc_csrbank4_rxempty_r = builder_minsoc_interface4_bank_bus_dat_w[0]; + assign builder_minsoc_csrbank4_rxempty_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); + assign builder_minsoc_csrbank4_rxempty_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); + assign main_minsoc_uart_eventmanager_status_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; + assign main_minsoc_uart_eventmanager_status_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); + assign main_minsoc_uart_eventmanager_status_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); + assign main_minsoc_uart_eventmanager_pending_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; + assign main_minsoc_uart_eventmanager_pending_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); + assign main_minsoc_uart_eventmanager_pending_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); + assign builder_minsoc_csrbank4_ev_enable0_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; + assign builder_minsoc_csrbank4_ev_enable0_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); + assign builder_minsoc_csrbank4_ev_enable0_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); + assign builder_minsoc_csrbank4_txfull_w = main_minsoc_uart_txfull_status; + assign main_minsoc_uart_txfull_we = builder_minsoc_csrbank4_txfull_we; + assign builder_minsoc_csrbank4_rxempty_w = main_minsoc_uart_rxempty_status; + assign main_minsoc_uart_rxempty_we = builder_minsoc_csrbank4_rxempty_we; + assign builder_minsoc_csrbank4_ev_enable0_w = main_minsoc_uart_eventmanager_storage[1:0]; + assign builder_minsoc_csrbank5_sel = (builder_minsoc_interface5_bank_bus_adr[13:9] == 2'd2); + assign builder_minsoc_csrbank5_tuning_word3_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank5_tuning_word3_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); + assign builder_minsoc_csrbank5_tuning_word3_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); + assign builder_minsoc_csrbank5_tuning_word2_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank5_tuning_word2_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); + assign builder_minsoc_csrbank5_tuning_word2_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); + assign builder_minsoc_csrbank5_tuning_word1_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank5_tuning_word1_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); + assign builder_minsoc_csrbank5_tuning_word1_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); + assign builder_minsoc_csrbank5_tuning_word0_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; + assign builder_minsoc_csrbank5_tuning_word0_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); + assign builder_minsoc_csrbank5_tuning_word0_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); + assign builder_minsoc_csrbank5_tuning_word3_w = main_minsoc_storage[31:24]; + assign builder_minsoc_csrbank5_tuning_word2_w = main_minsoc_storage[23:16]; + assign builder_minsoc_csrbank5_tuning_word1_w = main_minsoc_storage[15:8]; + assign builder_minsoc_csrbank5_tuning_word0_w = main_minsoc_storage[7:0]; + assign builder_minsoc_adr = main_minsoc_interface_adr; + assign builder_minsoc_we = main_minsoc_interface_we; + assign builder_minsoc_dat_w = main_minsoc_interface_dat_w; + assign main_minsoc_interface_dat_r = builder_minsoc_dat_r; + assign builder_minsoc_interface0_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface1_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface2_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface3_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface4_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface5_bank_bus_adr = builder_minsoc_adr; + assign builder_minsoc_interface0_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface1_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface2_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface3_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface4_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface5_bank_bus_we = builder_minsoc_we; + assign builder_minsoc_interface0_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface1_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface2_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface3_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface4_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_interface5_bank_bus_dat_w = builder_minsoc_dat_w; + assign builder_minsoc_dat_r = (((((builder_minsoc_interface0_bank_bus_dat_r | builder_minsoc_interface1_bank_bus_dat_r) | builder_minsoc_interface2_bank_bus_dat_r) | builder_minsoc_interface3_bank_bus_dat_r) | builder_minsoc_interface4_bank_bus_dat_r) | builder_minsoc_interface5_bank_bus_dat_r); + always @(*) begin + builder_rhs_array_muxed0 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[0]; + end + 1'd1: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[1]; + end + 2'd2: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[2]; + end + 2'd3: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[3]; + end + 3'd4: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[4]; + end + 3'd5: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[5]; + end + 3'd6: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[6]; + end + default: begin + builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[7]; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed1 <= 14'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_a; + end + 1'd1: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_a; + end + 2'd2: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_a; + end + 2'd3: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_a; + end + 3'd4: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_a; + end + 3'd5: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_a; + end + 3'd6: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_a; + end + default: begin + builder_rhs_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed2 <= 3'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_ba; + end + 1'd1: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_ba; + end + 2'd2: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_ba; + end + 2'd3: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_ba; + end + 3'd4: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_ba; + end + 3'd5: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_ba; + end + 3'd6: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_ba; + end + default: begin + builder_rhs_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_ba; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed3 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_is_read; + end + 1'd1: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_is_read; + end + 2'd2: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_is_read; + end + 2'd3: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_is_read; + end + 3'd4: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_is_read; + end + 3'd5: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_is_read; + end + 3'd6: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_is_read; + end + default: begin + builder_rhs_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_is_read; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed4 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_is_write; + end + 1'd1: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_is_write; + end + 2'd2: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_is_write; + end + 2'd3: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_is_write; + end + 3'd4: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_is_write; + end + 3'd5: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_is_write; + end + 3'd6: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_is_write; + end + default: begin + builder_rhs_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_is_write; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed5 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_is_cmd; + end + 1'd1: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_is_cmd; + end + 2'd2: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_is_cmd; + end + 2'd3: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_is_cmd; + end + 3'd4: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_is_cmd; + end + 3'd5: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_is_cmd; + end + 3'd6: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_is_cmd; + end + default: begin + builder_rhs_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_is_cmd; + end + endcase + end + always @(*) begin + builder_t_array_muxed0 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_t_array_muxed0 <= main_sdram_bankmachine0_cmd_payload_cas; + end + 1'd1: begin + builder_t_array_muxed0 <= main_sdram_bankmachine1_cmd_payload_cas; + end + 2'd2: begin + builder_t_array_muxed0 <= main_sdram_bankmachine2_cmd_payload_cas; + end + 2'd3: begin + builder_t_array_muxed0 <= main_sdram_bankmachine3_cmd_payload_cas; + end + 3'd4: begin + builder_t_array_muxed0 <= main_sdram_bankmachine4_cmd_payload_cas; + end + 3'd5: begin + builder_t_array_muxed0 <= main_sdram_bankmachine5_cmd_payload_cas; + end + 3'd6: begin + builder_t_array_muxed0 <= main_sdram_bankmachine6_cmd_payload_cas; + end + default: begin + builder_t_array_muxed0 <= main_sdram_bankmachine7_cmd_payload_cas; + end + endcase + end + always @(*) begin + builder_t_array_muxed1 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_t_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_ras; + end + 1'd1: begin + builder_t_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_ras; + end + 2'd2: begin + builder_t_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_ras; + end + 2'd3: begin + builder_t_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_ras; + end + 3'd4: begin + builder_t_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_ras; + end + 3'd5: begin + builder_t_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_ras; + end + 3'd6: begin + builder_t_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_ras; + end + default: begin + builder_t_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_ras; + end + endcase + end + always @(*) begin + builder_t_array_muxed2 <= 1'd0; + case (main_sdram_choose_cmd_grant) + 1'd0: begin + builder_t_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_we; + end + 1'd1: begin + builder_t_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_we; + end + 2'd2: begin + builder_t_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_we; + end + 2'd3: begin + builder_t_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_we; + end + 3'd4: begin + builder_t_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_we; + end + 3'd5: begin + builder_t_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_we; + end + 3'd6: begin + builder_t_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_we; + end + default: begin + builder_t_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed6 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[0]; + end + 1'd1: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[1]; + end + 2'd2: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[2]; + end + 2'd3: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[3]; + end + 3'd4: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[4]; + end + 3'd5: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[5]; + end + 3'd6: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[6]; + end + default: begin + builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[7]; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed7 <= 14'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine0_cmd_payload_a; + end + 1'd1: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine1_cmd_payload_a; + end + 2'd2: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine2_cmd_payload_a; + end + 2'd3: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine3_cmd_payload_a; + end + 3'd4: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine4_cmd_payload_a; + end + 3'd5: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine5_cmd_payload_a; + end + 3'd6: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine6_cmd_payload_a; + end + default: begin + builder_rhs_array_muxed7 <= main_sdram_bankmachine7_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed8 <= 3'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine0_cmd_payload_ba; + end + 1'd1: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine1_cmd_payload_ba; + end + 2'd2: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine2_cmd_payload_ba; + end + 2'd3: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine3_cmd_payload_ba; + end + 3'd4: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine4_cmd_payload_ba; + end + 3'd5: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine5_cmd_payload_ba; + end + 3'd6: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine6_cmd_payload_ba; + end + default: begin + builder_rhs_array_muxed8 <= main_sdram_bankmachine7_cmd_payload_ba; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed9 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine0_cmd_payload_is_read; + end + 1'd1: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine1_cmd_payload_is_read; + end + 2'd2: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine2_cmd_payload_is_read; + end + 2'd3: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine3_cmd_payload_is_read; + end + 3'd4: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine4_cmd_payload_is_read; + end + 3'd5: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine5_cmd_payload_is_read; + end + 3'd6: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine6_cmd_payload_is_read; + end + default: begin + builder_rhs_array_muxed9 <= main_sdram_bankmachine7_cmd_payload_is_read; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed10 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine0_cmd_payload_is_write; + end + 1'd1: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine1_cmd_payload_is_write; + end + 2'd2: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine2_cmd_payload_is_write; + end + 2'd3: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine3_cmd_payload_is_write; + end + 3'd4: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine4_cmd_payload_is_write; + end + 3'd5: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine5_cmd_payload_is_write; + end + 3'd6: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine6_cmd_payload_is_write; + end + default: begin + builder_rhs_array_muxed10 <= main_sdram_bankmachine7_cmd_payload_is_write; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed11 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine0_cmd_payload_is_cmd; + end + 1'd1: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine1_cmd_payload_is_cmd; + end + 2'd2: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine2_cmd_payload_is_cmd; + end + 2'd3: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine3_cmd_payload_is_cmd; + end + 3'd4: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine4_cmd_payload_is_cmd; + end + 3'd5: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine5_cmd_payload_is_cmd; + end + 3'd6: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine6_cmd_payload_is_cmd; + end + default: begin + builder_rhs_array_muxed11 <= main_sdram_bankmachine7_cmd_payload_is_cmd; + end + endcase + end + always @(*) begin + builder_t_array_muxed3 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_t_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_cas; + end + 1'd1: begin + builder_t_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_cas; + end + 2'd2: begin + builder_t_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_cas; + end + 2'd3: begin + builder_t_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_cas; + end + 3'd4: begin + builder_t_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_cas; + end + 3'd5: begin + builder_t_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_cas; + end + 3'd6: begin + builder_t_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_cas; + end + default: begin + builder_t_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_cas; + end + endcase + end + always @(*) begin + builder_t_array_muxed4 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_t_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_ras; + end + 1'd1: begin + builder_t_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_ras; + end + 2'd2: begin + builder_t_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_ras; + end + 2'd3: begin + builder_t_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_ras; + end + 3'd4: begin + builder_t_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_ras; + end + 3'd5: begin + builder_t_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_ras; + end + 3'd6: begin + builder_t_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_ras; + end + default: begin + builder_t_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_ras; + end + endcase + end + always @(*) begin + builder_t_array_muxed5 <= 1'd0; + case (main_sdram_choose_req_grant) + 1'd0: begin + builder_t_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_we; + end + 1'd1: begin + builder_t_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_we; + end + 2'd2: begin + builder_t_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_we; + end + 2'd3: begin + builder_t_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_we; + end + 3'd4: begin + builder_t_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_we; + end + 3'd5: begin + builder_t_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_we; + end + 3'd6: begin + builder_t_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_we; + end + default: begin + builder_t_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed12 <= 21'd0; + case (builder_roundrobin0_grant) + default: begin + builder_rhs_array_muxed12 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed13 <= 1'd0; + case (builder_roundrobin0_grant) + default: begin + builder_rhs_array_muxed13 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed14 <= 1'd0; + case (builder_roundrobin0_grant) + default: begin + builder_rhs_array_muxed14 <= (((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed15 <= 21'd0; + case (builder_roundrobin1_grant) + default: begin + builder_rhs_array_muxed15 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed16 <= 1'd0; + case (builder_roundrobin1_grant) + default: begin + builder_rhs_array_muxed16 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed17 <= 1'd0; + case (builder_roundrobin1_grant) + default: begin + builder_rhs_array_muxed17 <= (((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed18 <= 21'd0; + case (builder_roundrobin2_grant) + default: begin + builder_rhs_array_muxed18 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed19 <= 1'd0; + case (builder_roundrobin2_grant) + default: begin + builder_rhs_array_muxed19 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed20 <= 1'd0; + case (builder_roundrobin2_grant) + default: begin + builder_rhs_array_muxed20 <= (((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed21 <= 21'd0; + case (builder_roundrobin3_grant) + default: begin + builder_rhs_array_muxed21 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed22 <= 1'd0; + case (builder_roundrobin3_grant) + default: begin + builder_rhs_array_muxed22 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed23 <= 1'd0; + case (builder_roundrobin3_grant) + default: begin + builder_rhs_array_muxed23 <= (((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed24 <= 21'd0; + case (builder_roundrobin4_grant) + default: begin + builder_rhs_array_muxed24 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed25 <= 1'd0; + case (builder_roundrobin4_grant) + default: begin + builder_rhs_array_muxed25 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed26 <= 1'd0; + case (builder_roundrobin4_grant) + default: begin + builder_rhs_array_muxed26 <= (((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed27 <= 21'd0; + case (builder_roundrobin5_grant) + default: begin + builder_rhs_array_muxed27 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed28 <= 1'd0; + case (builder_roundrobin5_grant) + default: begin + builder_rhs_array_muxed28 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed29 <= 1'd0; + case (builder_roundrobin5_grant) + default: begin + builder_rhs_array_muxed29 <= (((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed30 <= 21'd0; + case (builder_roundrobin6_grant) + default: begin + builder_rhs_array_muxed30 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed31 <= 1'd0; + case (builder_roundrobin6_grant) + default: begin + builder_rhs_array_muxed31 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed32 <= 1'd0; + case (builder_roundrobin6_grant) + default: begin + builder_rhs_array_muxed32 <= (((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed33 <= 21'd0; + case (builder_roundrobin7_grant) + default: begin + builder_rhs_array_muxed33 <= { + main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] + }; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed34 <= 1'd0; + case (builder_roundrobin7_grant) + default: begin + builder_rhs_array_muxed34 <= main_port_cmd_payload_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed35 <= 1'd0; + case (builder_roundrobin7_grant) + default: begin + builder_rhs_array_muxed35 <= (((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid); + end + endcase + end + always @(*) begin + builder_rhs_array_muxed36 <= 30'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed36 <= main_interface1_wb_sdram_adr; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed37 <= 32'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed37 <= main_interface1_wb_sdram_dat_w; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed38 <= 4'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed38 <= main_interface1_wb_sdram_sel; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed39 <= 1'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed39 <= main_interface1_wb_sdram_cyc; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed40 <= 1'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed40 <= main_interface1_wb_sdram_stb; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed41 <= 1'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed41 <= main_interface1_wb_sdram_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed42 <= 3'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed42 <= main_interface1_wb_sdram_cti; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed43 <= 2'd0; + case (builder_wb_sdram_con_grant) + default: begin + builder_rhs_array_muxed43 <= main_interface1_wb_sdram_bte; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed44 <= 30'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed44 <= main_minsoc_interface0_soc_bus_adr; + end + default: begin + builder_rhs_array_muxed44 <= main_minsoc_interface1_soc_bus_adr; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed45 <= 32'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed45 <= main_minsoc_interface0_soc_bus_dat_w; + end + default: begin + builder_rhs_array_muxed45 <= main_minsoc_interface1_soc_bus_dat_w; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed46 <= 4'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed46 <= main_minsoc_interface0_soc_bus_sel; + end + default: begin + builder_rhs_array_muxed46 <= main_minsoc_interface1_soc_bus_sel; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed47 <= 1'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed47 <= main_minsoc_interface0_soc_bus_cyc; + end + default: begin + builder_rhs_array_muxed47 <= main_minsoc_interface1_soc_bus_cyc; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed48 <= 1'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed48 <= main_minsoc_interface0_soc_bus_stb; + end + default: begin + builder_rhs_array_muxed48 <= main_minsoc_interface1_soc_bus_stb; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed49 <= 1'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed49 <= main_minsoc_interface0_soc_bus_we; + end + default: begin + builder_rhs_array_muxed49 <= main_minsoc_interface1_soc_bus_we; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed50 <= 3'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed50 <= main_minsoc_interface0_soc_bus_cti; + end + default: begin + builder_rhs_array_muxed50 <= main_minsoc_interface1_soc_bus_cti; + end + endcase + end + always @(*) begin + builder_rhs_array_muxed51 <= 2'd0; + case (builder_minsoc_grant) + 1'd0: begin + builder_rhs_array_muxed51 <= main_minsoc_interface0_soc_bus_bte; + end + default: begin + builder_rhs_array_muxed51 <= main_minsoc_interface1_soc_bus_bte; + end + endcase + end + always @(*) begin + builder_array_muxed0 <= 3'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed0 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed0 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed0 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed0 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase + end + always @(*) begin + builder_array_muxed1 <= 14'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed1 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed1 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed1 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed1 <= main_sdram_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_array_muxed2 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed2 <= 1'd0; + end + 1'd1: begin + builder_array_muxed2 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed2 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed2 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase + end + always @(*) begin + builder_array_muxed3 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed3 <= 1'd0; + end + 1'd1: begin + builder_array_muxed3 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed3 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed3 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase + end + always @(*) begin + builder_array_muxed4 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed4 <= 1'd0; + end + 1'd1: begin + builder_array_muxed4 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed4 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed4 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase + end + always @(*) begin + builder_array_muxed5 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed5 <= 1'd0; + end + 1'd1: begin + builder_array_muxed5 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed5 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed5 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase + end + always @(*) begin + builder_array_muxed6 <= 1'd0; + case (main_sdram_steerer_sel0) + 1'd0: begin + builder_array_muxed6 <= 1'd0; + end + 1'd1: begin + builder_array_muxed6 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed6 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed6 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase + end + always @(*) begin + builder_array_muxed7 <= 3'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed7 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed7 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed7 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed7 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase + end + always @(*) begin + builder_array_muxed8 <= 14'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed8 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed8 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed8 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed8 <= main_sdram_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_array_muxed9 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed9 <= 1'd0; + end + 1'd1: begin + builder_array_muxed9 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed9 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed9 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase + end + always @(*) begin + builder_array_muxed10 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed10 <= 1'd0; + end + 1'd1: begin + builder_array_muxed10 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed10 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed10 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase + end + always @(*) begin + builder_array_muxed11 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed11 <= 1'd0; + end + 1'd1: begin + builder_array_muxed11 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed11 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed11 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase + end + always @(*) begin + builder_array_muxed12 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed12 <= 1'd0; + end + 1'd1: begin + builder_array_muxed12 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed12 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed12 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase + end + always @(*) begin + builder_array_muxed13 <= 1'd0; + case (main_sdram_steerer_sel1) + 1'd0: begin + builder_array_muxed13 <= 1'd0; + end + 1'd1: begin + builder_array_muxed13 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed13 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed13 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase + end + always @(*) begin + builder_array_muxed14 <= 3'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed14 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed14 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed14 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed14 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase + end + always @(*) begin + builder_array_muxed15 <= 14'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed15 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed15 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed15 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed15 <= main_sdram_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_array_muxed16 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed16 <= 1'd0; + end + 1'd1: begin + builder_array_muxed16 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed16 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed16 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase + end + always @(*) begin + builder_array_muxed17 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed17 <= 1'd0; + end + 1'd1: begin + builder_array_muxed17 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed17 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed17 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase + end + always @(*) begin + builder_array_muxed18 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed18 <= 1'd0; + end + 1'd1: begin + builder_array_muxed18 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed18 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed18 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase + end + always @(*) begin + builder_array_muxed19 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed19 <= 1'd0; + end + 1'd1: begin + builder_array_muxed19 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed19 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed19 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase + end + always @(*) begin + builder_array_muxed20 <= 1'd0; + case (main_sdram_steerer_sel2) + 1'd0: begin + builder_array_muxed20 <= 1'd0; + end + 1'd1: begin + builder_array_muxed20 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed20 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed20 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase + end + always @(*) begin + builder_array_muxed21 <= 3'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed21 <= main_sdram_nop_ba[2:0]; + end + 1'd1: begin + builder_array_muxed21 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; + end + 2'd2: begin + builder_array_muxed21 <= main_sdram_choose_req_cmd_payload_ba[2:0]; + end + default: begin + builder_array_muxed21 <= main_sdram_cmd_payload_ba[2:0]; + end + endcase + end + always @(*) begin + builder_array_muxed22 <= 14'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed22 <= main_sdram_nop_a; + end + 1'd1: begin + builder_array_muxed22 <= main_sdram_choose_cmd_cmd_payload_a; + end + 2'd2: begin + builder_array_muxed22 <= main_sdram_choose_req_cmd_payload_a; + end + default: begin + builder_array_muxed22 <= main_sdram_cmd_payload_a; + end + endcase + end + always @(*) begin + builder_array_muxed23 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed23 <= 1'd0; + end + 1'd1: begin + builder_array_muxed23 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); + end + 2'd2: begin + builder_array_muxed23 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); + end + default: begin + builder_array_muxed23 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); + end + endcase + end + always @(*) begin + builder_array_muxed24 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed24 <= 1'd0; + end + 1'd1: begin + builder_array_muxed24 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); + end + 2'd2: begin + builder_array_muxed24 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); + end + default: begin + builder_array_muxed24 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); + end + endcase + end + always @(*) begin + builder_array_muxed25 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed25 <= 1'd0; + end + 1'd1: begin + builder_array_muxed25 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); + end + 2'd2: begin + builder_array_muxed25 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); + end + default: begin + builder_array_muxed25 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); + end + endcase + end + always @(*) begin + builder_array_muxed26 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed26 <= 1'd0; + end + 1'd1: begin + builder_array_muxed26 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); + end + 2'd2: begin + builder_array_muxed26 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); + end + default: begin + builder_array_muxed26 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); + end + endcase + end + always @(*) begin + builder_array_muxed27 <= 1'd0; + case (main_sdram_steerer_sel3) + 1'd0: begin + builder_array_muxed27 <= 1'd0; + end + 1'd1: begin + builder_array_muxed27 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); + end + 2'd2: begin + builder_array_muxed27 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); + end + default: begin + builder_array_muxed27 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); + end + endcase + end + assign main_minsoc_rx = builder_regs1; + assign builder_xilinxasyncresetsynchronizerimpl0 = ((~main_locked) | main_reset); + assign builder_xilinxasyncresetsynchronizerimpl1 = ((~main_locked) | main_reset); + assign builder_xilinxasyncresetsynchronizerimpl2 = ((~main_locked) | main_reset); + assign builder_xilinxasyncresetsynchronizerimpl3 = ((~main_locked) | main_reset); + + always @(posedge clk200_clk) begin + if ((main_reset_counter != 1'd0)) begin + main_reset_counter <= (main_reset_counter - 1'd1); + end else begin + main_ic_reset <= 1'd0; + end + if (clk200_rst) begin + main_reset_counter <= 4'd15; + main_ic_reset <= 1'd1; + end + end + + always @(posedge sys_clk) begin + if ((main_minsoc_ctrl_bus_errors != 32'd4294967295)) begin + if (main_minsoc_ctrl_bus_error) begin + main_minsoc_ctrl_bus_errors <= (main_minsoc_ctrl_bus_errors + 1'd1); + end + end + main_minsoc_rom_bus_ack <= 1'd0; + if (((main_minsoc_rom_bus_cyc & main_minsoc_rom_bus_stb) & (~main_minsoc_rom_bus_ack))) begin + main_minsoc_rom_bus_ack <= 1'd1; + end + main_minsoc_sram_bus_ack <= 1'd0; + if (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & (~main_minsoc_sram_bus_ack))) begin + main_minsoc_sram_bus_ack <= 1'd1; + end + main_minsoc_sink_ready <= 1'd0; + if (((main_minsoc_sink_valid & (~main_minsoc_tx_busy)) & (~main_minsoc_sink_ready))) begin + main_minsoc_tx_reg <= main_minsoc_sink_payload_data; + main_minsoc_tx_bitcount <= 1'd0; + main_minsoc_tx_busy <= 1'd1; + serial_tx <= 1'd0; + end else begin + if ((main_minsoc_uart_clk_txen & main_minsoc_tx_busy)) begin + main_minsoc_tx_bitcount <= (main_minsoc_tx_bitcount + 1'd1); + if ((main_minsoc_tx_bitcount == 4'd8)) begin + serial_tx <= 1'd1; + end else begin + if ((main_minsoc_tx_bitcount == 4'd9)) begin + serial_tx <= 1'd1; + main_minsoc_tx_busy <= 1'd0; + main_minsoc_sink_ready <= 1'd1; + end else begin + serial_tx <= main_minsoc_tx_reg[0]; + main_minsoc_tx_reg <= {1'd0, main_minsoc_tx_reg[7:1]}; + end + end + end + end + if (main_minsoc_tx_busy) begin + {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= (main_minsoc_phase_accumulator_tx + main_minsoc_storage); + end else begin + {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= 1'd0; + end + main_minsoc_source_valid <= 1'd0; + main_minsoc_rx_r <= main_minsoc_rx; + if ((~main_minsoc_rx_busy)) begin + if (((~main_minsoc_rx) & main_minsoc_rx_r)) begin + main_minsoc_rx_busy <= 1'd1; + main_minsoc_rx_bitcount <= 1'd0; + end + end else begin + if (main_minsoc_uart_clk_rxen) begin + main_minsoc_rx_bitcount <= (main_minsoc_rx_bitcount + 1'd1); + if ((main_minsoc_rx_bitcount == 1'd0)) begin + if (main_minsoc_rx) begin + main_minsoc_rx_busy <= 1'd0; + end + end else begin + if ((main_minsoc_rx_bitcount == 4'd9)) begin + main_minsoc_rx_busy <= 1'd0; + if (main_minsoc_rx) begin + main_minsoc_source_payload_data <= main_minsoc_rx_reg; + main_minsoc_source_valid <= 1'd1; + end + end else begin + main_minsoc_rx_reg <= {main_minsoc_rx, main_minsoc_rx_reg[7:1]}; + end + end + end + end + if (main_minsoc_rx_busy) begin + {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= (main_minsoc_phase_accumulator_rx + main_minsoc_storage); + end else begin + {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= 32'd2147483648; + end + if (main_minsoc_uart_tx_clear) begin + main_minsoc_uart_tx_pending <= 1'd0; + end + main_minsoc_uart_tx_old_trigger <= main_minsoc_uart_tx_trigger; + if (((~main_minsoc_uart_tx_trigger) & main_minsoc_uart_tx_old_trigger)) begin + main_minsoc_uart_tx_pending <= 1'd1; + end + if (main_minsoc_uart_rx_clear) begin + main_minsoc_uart_rx_pending <= 1'd0; + end + main_minsoc_uart_rx_old_trigger <= main_minsoc_uart_rx_trigger; + if (((~main_minsoc_uart_rx_trigger) & main_minsoc_uart_rx_old_trigger)) begin + main_minsoc_uart_rx_pending <= 1'd1; + end + if (main_minsoc_uart_tx_fifo_syncfifo_re) begin + main_minsoc_uart_tx_fifo_readable <= 1'd1; + end else begin + if (main_minsoc_uart_tx_fifo_re) begin + main_minsoc_uart_tx_fifo_readable <= 1'd0; + end + end + if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin + main_minsoc_uart_tx_fifo_produce <= (main_minsoc_uart_tx_fifo_produce + 1'd1); + end + if (main_minsoc_uart_tx_fifo_do_read) begin + main_minsoc_uart_tx_fifo_consume <= (main_minsoc_uart_tx_fifo_consume + 1'd1); + end + if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin + if ((~main_minsoc_uart_tx_fifo_do_read)) begin + main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 + 1'd1); + end + end else begin + if (main_minsoc_uart_tx_fifo_do_read) begin + main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 - 1'd1); + end + end + if (main_minsoc_uart_rx_fifo_syncfifo_re) begin + main_minsoc_uart_rx_fifo_readable <= 1'd1; + end else begin + if (main_minsoc_uart_rx_fifo_re) begin + main_minsoc_uart_rx_fifo_readable <= 1'd0; + end + end + if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin + main_minsoc_uart_rx_fifo_produce <= (main_minsoc_uart_rx_fifo_produce + 1'd1); + end + if (main_minsoc_uart_rx_fifo_do_read) begin + main_minsoc_uart_rx_fifo_consume <= (main_minsoc_uart_rx_fifo_consume + 1'd1); + end + if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin + if ((~main_minsoc_uart_rx_fifo_do_read)) begin + main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 + 1'd1); + end + end else begin + if (main_minsoc_uart_rx_fifo_do_read) begin + main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 - 1'd1); + end + end + if (main_minsoc_uart_reset) begin + main_minsoc_uart_tx_pending <= 1'd0; + main_minsoc_uart_tx_old_trigger <= 1'd0; + main_minsoc_uart_rx_pending <= 1'd0; + main_minsoc_uart_rx_old_trigger <= 1'd0; + main_minsoc_uart_tx_fifo_readable <= 1'd0; + main_minsoc_uart_tx_fifo_level0 <= 5'd0; + main_minsoc_uart_tx_fifo_produce <= 4'd0; + main_minsoc_uart_tx_fifo_consume <= 4'd0; + main_minsoc_uart_rx_fifo_readable <= 1'd0; + main_minsoc_uart_rx_fifo_level0 <= 5'd0; + main_minsoc_uart_rx_fifo_produce <= 4'd0; + main_minsoc_uart_rx_fifo_consume <= 4'd0; + end + if (main_minsoc_timer0_en_storage) begin + if ((main_minsoc_timer0_value == 1'd0)) begin + main_minsoc_timer0_value <= main_minsoc_timer0_reload_storage; + end else begin + main_minsoc_timer0_value <= (main_minsoc_timer0_value - 1'd1); + end + end else begin + main_minsoc_timer0_value <= main_minsoc_timer0_load_storage; + end + if (main_minsoc_timer0_update_value_re) begin + main_minsoc_timer0_value_status <= main_minsoc_timer0_value; + end + if (main_minsoc_timer0_zero_clear) begin + main_minsoc_timer0_zero_pending <= 1'd0; + end + main_minsoc_timer0_zero_old_trigger <= main_minsoc_timer0_zero_trigger; + if (((~main_minsoc_timer0_zero_trigger) & main_minsoc_timer0_zero_old_trigger)) begin + main_minsoc_timer0_zero_pending <= 1'd1; + end + builder_wb2csr_state <= builder_wb2csr_next_state; + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip0_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip0_value <= (main_a7ddrphy_bitslip0_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip1_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip1_value <= (main_a7ddrphy_bitslip1_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip2_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip2_value <= (main_a7ddrphy_bitslip2_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip3_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip3_value <= (main_a7ddrphy_bitslip3_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip4_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip4_value <= (main_a7ddrphy_bitslip4_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip5_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip5_value <= (main_a7ddrphy_bitslip5_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip6_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip6_value <= (main_a7ddrphy_bitslip6_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[0]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip7_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip7_value <= (main_a7ddrphy_bitslip7_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip8_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip8_value <= (main_a7ddrphy_bitslip8_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip9_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip9_value <= (main_a7ddrphy_bitslip9_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip10_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip10_value <= (main_a7ddrphy_bitslip10_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip11_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip11_value <= (main_a7ddrphy_bitslip11_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip12_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip12_value <= (main_a7ddrphy_bitslip12_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip13_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip13_value <= (main_a7ddrphy_bitslip13_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip14_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip14_value <= (main_a7ddrphy_bitslip14_value + 1'd1); + end + end + end + if (main_a7ddrphy_dly_sel_storage[1]) begin + if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin + main_a7ddrphy_bitslip15_value <= 1'd0; + end else begin + if (main_a7ddrphy_rdly_dq_bitslip_re) begin + main_a7ddrphy_bitslip15_value <= (main_a7ddrphy_bitslip15_value + 1'd1); + end + end + end + main_a7ddrphy_n_rddata_en0 <= main_a7ddrphy_dfi_p2_rddata_en; + main_a7ddrphy_n_rddata_en1 <= main_a7ddrphy_n_rddata_en0; + main_a7ddrphy_n_rddata_en2 <= main_a7ddrphy_n_rddata_en1; + main_a7ddrphy_n_rddata_en3 <= main_a7ddrphy_n_rddata_en2; + main_a7ddrphy_n_rddata_en4 <= main_a7ddrphy_n_rddata_en3; + main_a7ddrphy_n_rddata_en5 <= main_a7ddrphy_n_rddata_en4; + main_a7ddrphy_n_rddata_en6 <= main_a7ddrphy_n_rddata_en5; + main_a7ddrphy_n_rddata_en7 <= main_a7ddrphy_n_rddata_en6; + main_a7ddrphy_dfi_p0_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_dfi_p1_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_dfi_p2_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_dfi_p3_rddata_valid <= main_a7ddrphy_n_rddata_en7; + main_a7ddrphy_last_wrdata_en <= { + main_a7ddrphy_last_wrdata_en[2:0], main_a7ddrphy_dfi_p3_wrdata_en + }; + main_a7ddrphy_oe_dqs <= main_a7ddrphy_oe; + main_a7ddrphy_oe_dq <= main_a7ddrphy_oe; + main_a7ddrphy_bitslip0_r <= {main_a7ddrphy_bitslip0_i, main_a7ddrphy_bitslip0_r[15:8]}; + case (main_a7ddrphy_bitslip0_value) + 1'd0: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[14:7]; + end + endcase + main_a7ddrphy_bitslip1_r <= {main_a7ddrphy_bitslip1_i, main_a7ddrphy_bitslip1_r[15:8]}; + case (main_a7ddrphy_bitslip1_value) + 1'd0: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[14:7]; + end + endcase + main_a7ddrphy_bitslip2_r <= {main_a7ddrphy_bitslip2_i, main_a7ddrphy_bitslip2_r[15:8]}; + case (main_a7ddrphy_bitslip2_value) + 1'd0: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[14:7]; + end + endcase + main_a7ddrphy_bitslip3_r <= {main_a7ddrphy_bitslip3_i, main_a7ddrphy_bitslip3_r[15:8]}; + case (main_a7ddrphy_bitslip3_value) + 1'd0: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[14:7]; + end + endcase + main_a7ddrphy_bitslip4_r <= {main_a7ddrphy_bitslip4_i, main_a7ddrphy_bitslip4_r[15:8]}; + case (main_a7ddrphy_bitslip4_value) + 1'd0: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[14:7]; + end + endcase + main_a7ddrphy_bitslip5_r <= {main_a7ddrphy_bitslip5_i, main_a7ddrphy_bitslip5_r[15:8]}; + case (main_a7ddrphy_bitslip5_value) + 1'd0: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[14:7]; + end + endcase + main_a7ddrphy_bitslip6_r <= {main_a7ddrphy_bitslip6_i, main_a7ddrphy_bitslip6_r[15:8]}; + case (main_a7ddrphy_bitslip6_value) + 1'd0: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[14:7]; + end + endcase + main_a7ddrphy_bitslip7_r <= {main_a7ddrphy_bitslip7_i, main_a7ddrphy_bitslip7_r[15:8]}; + case (main_a7ddrphy_bitslip7_value) + 1'd0: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[14:7]; + end + endcase + main_a7ddrphy_bitslip8_r <= {main_a7ddrphy_bitslip8_i, main_a7ddrphy_bitslip8_r[15:8]}; + case (main_a7ddrphy_bitslip8_value) + 1'd0: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[14:7]; + end + endcase + main_a7ddrphy_bitslip9_r <= {main_a7ddrphy_bitslip9_i, main_a7ddrphy_bitslip9_r[15:8]}; + case (main_a7ddrphy_bitslip9_value) + 1'd0: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[14:7]; + end + endcase + main_a7ddrphy_bitslip10_r <= {main_a7ddrphy_bitslip10_i, main_a7ddrphy_bitslip10_r[15:8]}; + case (main_a7ddrphy_bitslip10_value) + 1'd0: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[14:7]; + end + endcase + main_a7ddrphy_bitslip11_r <= {main_a7ddrphy_bitslip11_i, main_a7ddrphy_bitslip11_r[15:8]}; + case (main_a7ddrphy_bitslip11_value) + 1'd0: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[14:7]; + end + endcase + main_a7ddrphy_bitslip12_r <= {main_a7ddrphy_bitslip12_i, main_a7ddrphy_bitslip12_r[15:8]}; + case (main_a7ddrphy_bitslip12_value) + 1'd0: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[14:7]; + end + endcase + main_a7ddrphy_bitslip13_r <= {main_a7ddrphy_bitslip13_i, main_a7ddrphy_bitslip13_r[15:8]}; + case (main_a7ddrphy_bitslip13_value) + 1'd0: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[14:7]; + end + endcase + main_a7ddrphy_bitslip14_r <= {main_a7ddrphy_bitslip14_i, main_a7ddrphy_bitslip14_r[15:8]}; + case (main_a7ddrphy_bitslip14_value) + 1'd0: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[14:7]; + end + endcase + main_a7ddrphy_bitslip15_r <= {main_a7ddrphy_bitslip15_i, main_a7ddrphy_bitslip15_r[15:8]}; + case (main_a7ddrphy_bitslip15_value) + 1'd0: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[7:0]; + end + 1'd1: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[8:1]; + end + 2'd2: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[9:2]; + end + 2'd3: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[10:3]; + end + 3'd4: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[11:4]; + end + 3'd5: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[12:5]; + end + 3'd6: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[13:6]; + end + 3'd7: begin + main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[14:7]; + end + endcase + if (main_sdram_inti_p0_rddata_valid) begin + main_sdram_phaseinjector0_status <= main_sdram_inti_p0_rddata; + end + if (main_sdram_inti_p1_rddata_valid) begin + main_sdram_phaseinjector1_status <= main_sdram_inti_p1_rddata; + end + if (main_sdram_inti_p2_rddata_valid) begin + main_sdram_phaseinjector2_status <= main_sdram_inti_p2_rddata; + end + if (main_sdram_inti_p3_rddata_valid) begin + main_sdram_phaseinjector3_status <= main_sdram_inti_p3_rddata; + end + if ((main_sdram_timer_wait & (~main_sdram_timer_done0))) begin + main_sdram_timer_count1 <= (main_sdram_timer_count1 - 1'd1); + end else begin + main_sdram_timer_count1 <= 9'd468; + end + main_sdram_postponer_req_o <= 1'd0; + if (main_sdram_postponer_req_i) begin + main_sdram_postponer_count <= (main_sdram_postponer_count - 1'd1); + if ((main_sdram_postponer_count == 1'd0)) begin + main_sdram_postponer_count <= 1'd0; + main_sdram_postponer_req_o <= 1'd1; + end + end + if (main_sdram_sequencer_start0) begin + main_sdram_sequencer_count <= 1'd0; + end else begin + if (main_sdram_sequencer_done1) begin + if ((main_sdram_sequencer_count != 1'd0)) begin + main_sdram_sequencer_count <= (main_sdram_sequencer_count - 1'd1); + end + end + end + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_sequencer_done1 <= 1'd0; + if ((main_sdram_sequencer_start1 & (main_sdram_sequencer_counter == 1'd0))) begin + main_sdram_cmd_payload_a <= 11'd1024; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd1; + main_sdram_cmd_payload_we <= 1'd1; + end + if ((main_sdram_sequencer_counter == 2'd2)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd1; + main_sdram_cmd_payload_ras <= 1'd1; + main_sdram_cmd_payload_we <= 1'd0; + end + if ((main_sdram_sequencer_counter == 6'd34)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_sequencer_done1 <= 1'd1; + end + if ((main_sdram_sequencer_counter == 6'd34)) begin + main_sdram_sequencer_counter <= 1'd0; + end else begin + if ((main_sdram_sequencer_counter != 1'd0)) begin + main_sdram_sequencer_counter <= (main_sdram_sequencer_counter + 1'd1); + end else begin + if (main_sdram_sequencer_start1) begin + main_sdram_sequencer_counter <= 1'd1; + end + end + end + if ((main_sdram_zqcs_timer_wait & (~main_sdram_zqcs_timer_done0))) begin + main_sdram_zqcs_timer_count1 <= (main_sdram_zqcs_timer_count1 - 1'd1); + end else begin + main_sdram_zqcs_timer_count1 <= 26'd59999999; + end + main_sdram_zqcs_executer_done <= 1'd0; + if ((main_sdram_zqcs_executer_start & (main_sdram_zqcs_executer_counter == 1'd0))) begin + main_sdram_cmd_payload_a <= 11'd1024; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd1; + main_sdram_cmd_payload_we <= 1'd1; + end + if ((main_sdram_zqcs_executer_counter == 2'd2)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd1; + end + if ((main_sdram_zqcs_executer_counter == 5'd18)) begin + main_sdram_cmd_payload_a <= 1'd0; + main_sdram_cmd_payload_ba <= 1'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_zqcs_executer_done <= 1'd1; + end + if ((main_sdram_zqcs_executer_counter == 5'd18)) begin + main_sdram_zqcs_executer_counter <= 1'd0; + end else begin + if ((main_sdram_zqcs_executer_counter != 1'd0)) begin + main_sdram_zqcs_executer_counter <= (main_sdram_zqcs_executer_counter + 1'd1); + end else begin + if (main_sdram_zqcs_executer_start) begin + main_sdram_zqcs_executer_counter <= 1'd1; + end + end + end + builder_refresher_state <= builder_refresher_next_state; + if (main_sdram_bankmachine0_row_close) begin + main_sdram_bankmachine0_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine0_row_open) begin + main_sdram_bankmachine0_row_opened <= 1'd1; + main_sdram_bankmachine0_row <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine0_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine0_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready)) begin + main_sdram_bankmachine0_cmd_buffer_source_valid <= main_sdram_bankmachine0_cmd_buffer_sink_valid; + main_sdram_bankmachine0_cmd_buffer_source_first <= main_sdram_bankmachine0_cmd_buffer_sink_first; + main_sdram_bankmachine0_cmd_buffer_source_last <= main_sdram_bankmachine0_cmd_buffer_sink_last; + main_sdram_bankmachine0_cmd_buffer_source_payload_we <= main_sdram_bankmachine0_cmd_buffer_sink_payload_we; + main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine0_twtpcon_valid) begin + main_sdram_bankmachine0_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine0_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine0_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine0_twtpcon_ready)) begin + main_sdram_bankmachine0_twtpcon_count <= (main_sdram_bankmachine0_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine0_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine0_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine0_trccon_valid) begin + main_sdram_bankmachine0_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine0_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine0_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine0_trccon_ready)) begin + main_sdram_bankmachine0_trccon_count <= (main_sdram_bankmachine0_trccon_count - 1'd1); + if ((main_sdram_bankmachine0_trccon_count == 1'd1)) begin + main_sdram_bankmachine0_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine0_trascon_valid) begin + main_sdram_bankmachine0_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine0_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine0_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine0_trascon_ready)) begin + main_sdram_bankmachine0_trascon_count <= (main_sdram_bankmachine0_trascon_count - 1'd1); + if ((main_sdram_bankmachine0_trascon_count == 1'd1)) begin + main_sdram_bankmachine0_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine0_state <= builder_bankmachine0_next_state; + if (main_sdram_bankmachine1_row_close) begin + main_sdram_bankmachine1_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine1_row_open) begin + main_sdram_bankmachine1_row_opened <= 1'd1; + main_sdram_bankmachine1_row <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine1_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine1_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready)) begin + main_sdram_bankmachine1_cmd_buffer_source_valid <= main_sdram_bankmachine1_cmd_buffer_sink_valid; + main_sdram_bankmachine1_cmd_buffer_source_first <= main_sdram_bankmachine1_cmd_buffer_sink_first; + main_sdram_bankmachine1_cmd_buffer_source_last <= main_sdram_bankmachine1_cmd_buffer_sink_last; + main_sdram_bankmachine1_cmd_buffer_source_payload_we <= main_sdram_bankmachine1_cmd_buffer_sink_payload_we; + main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine1_twtpcon_valid) begin + main_sdram_bankmachine1_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine1_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine1_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine1_twtpcon_ready)) begin + main_sdram_bankmachine1_twtpcon_count <= (main_sdram_bankmachine1_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine1_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine1_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine1_trccon_valid) begin + main_sdram_bankmachine1_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine1_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine1_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine1_trccon_ready)) begin + main_sdram_bankmachine1_trccon_count <= (main_sdram_bankmachine1_trccon_count - 1'd1); + if ((main_sdram_bankmachine1_trccon_count == 1'd1)) begin + main_sdram_bankmachine1_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine1_trascon_valid) begin + main_sdram_bankmachine1_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine1_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine1_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine1_trascon_ready)) begin + main_sdram_bankmachine1_trascon_count <= (main_sdram_bankmachine1_trascon_count - 1'd1); + if ((main_sdram_bankmachine1_trascon_count == 1'd1)) begin + main_sdram_bankmachine1_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine1_state <= builder_bankmachine1_next_state; + if (main_sdram_bankmachine2_row_close) begin + main_sdram_bankmachine2_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine2_row_open) begin + main_sdram_bankmachine2_row_opened <= 1'd1; + main_sdram_bankmachine2_row <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine2_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine2_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready)) begin + main_sdram_bankmachine2_cmd_buffer_source_valid <= main_sdram_bankmachine2_cmd_buffer_sink_valid; + main_sdram_bankmachine2_cmd_buffer_source_first <= main_sdram_bankmachine2_cmd_buffer_sink_first; + main_sdram_bankmachine2_cmd_buffer_source_last <= main_sdram_bankmachine2_cmd_buffer_sink_last; + main_sdram_bankmachine2_cmd_buffer_source_payload_we <= main_sdram_bankmachine2_cmd_buffer_sink_payload_we; + main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine2_twtpcon_valid) begin + main_sdram_bankmachine2_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine2_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine2_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine2_twtpcon_ready)) begin + main_sdram_bankmachine2_twtpcon_count <= (main_sdram_bankmachine2_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine2_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine2_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine2_trccon_valid) begin + main_sdram_bankmachine2_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine2_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine2_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine2_trccon_ready)) begin + main_sdram_bankmachine2_trccon_count <= (main_sdram_bankmachine2_trccon_count - 1'd1); + if ((main_sdram_bankmachine2_trccon_count == 1'd1)) begin + main_sdram_bankmachine2_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine2_trascon_valid) begin + main_sdram_bankmachine2_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine2_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine2_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine2_trascon_ready)) begin + main_sdram_bankmachine2_trascon_count <= (main_sdram_bankmachine2_trascon_count - 1'd1); + if ((main_sdram_bankmachine2_trascon_count == 1'd1)) begin + main_sdram_bankmachine2_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine2_state <= builder_bankmachine2_next_state; + if (main_sdram_bankmachine3_row_close) begin + main_sdram_bankmachine3_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine3_row_open) begin + main_sdram_bankmachine3_row_opened <= 1'd1; + main_sdram_bankmachine3_row <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine3_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine3_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready)) begin + main_sdram_bankmachine3_cmd_buffer_source_valid <= main_sdram_bankmachine3_cmd_buffer_sink_valid; + main_sdram_bankmachine3_cmd_buffer_source_first <= main_sdram_bankmachine3_cmd_buffer_sink_first; + main_sdram_bankmachine3_cmd_buffer_source_last <= main_sdram_bankmachine3_cmd_buffer_sink_last; + main_sdram_bankmachine3_cmd_buffer_source_payload_we <= main_sdram_bankmachine3_cmd_buffer_sink_payload_we; + main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine3_twtpcon_valid) begin + main_sdram_bankmachine3_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine3_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine3_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine3_twtpcon_ready)) begin + main_sdram_bankmachine3_twtpcon_count <= (main_sdram_bankmachine3_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine3_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine3_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine3_trccon_valid) begin + main_sdram_bankmachine3_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine3_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine3_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine3_trccon_ready)) begin + main_sdram_bankmachine3_trccon_count <= (main_sdram_bankmachine3_trccon_count - 1'd1); + if ((main_sdram_bankmachine3_trccon_count == 1'd1)) begin + main_sdram_bankmachine3_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine3_trascon_valid) begin + main_sdram_bankmachine3_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine3_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine3_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine3_trascon_ready)) begin + main_sdram_bankmachine3_trascon_count <= (main_sdram_bankmachine3_trascon_count - 1'd1); + if ((main_sdram_bankmachine3_trascon_count == 1'd1)) begin + main_sdram_bankmachine3_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine3_state <= builder_bankmachine3_next_state; + if (main_sdram_bankmachine4_row_close) begin + main_sdram_bankmachine4_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine4_row_open) begin + main_sdram_bankmachine4_row_opened <= 1'd1; + main_sdram_bankmachine4_row <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine4_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine4_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready)) begin + main_sdram_bankmachine4_cmd_buffer_source_valid <= main_sdram_bankmachine4_cmd_buffer_sink_valid; + main_sdram_bankmachine4_cmd_buffer_source_first <= main_sdram_bankmachine4_cmd_buffer_sink_first; + main_sdram_bankmachine4_cmd_buffer_source_last <= main_sdram_bankmachine4_cmd_buffer_sink_last; + main_sdram_bankmachine4_cmd_buffer_source_payload_we <= main_sdram_bankmachine4_cmd_buffer_sink_payload_we; + main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine4_twtpcon_valid) begin + main_sdram_bankmachine4_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine4_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine4_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine4_twtpcon_ready)) begin + main_sdram_bankmachine4_twtpcon_count <= (main_sdram_bankmachine4_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine4_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine4_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine4_trccon_valid) begin + main_sdram_bankmachine4_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine4_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine4_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine4_trccon_ready)) begin + main_sdram_bankmachine4_trccon_count <= (main_sdram_bankmachine4_trccon_count - 1'd1); + if ((main_sdram_bankmachine4_trccon_count == 1'd1)) begin + main_sdram_bankmachine4_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine4_trascon_valid) begin + main_sdram_bankmachine4_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine4_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine4_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine4_trascon_ready)) begin + main_sdram_bankmachine4_trascon_count <= (main_sdram_bankmachine4_trascon_count - 1'd1); + if ((main_sdram_bankmachine4_trascon_count == 1'd1)) begin + main_sdram_bankmachine4_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine4_state <= builder_bankmachine4_next_state; + if (main_sdram_bankmachine5_row_close) begin + main_sdram_bankmachine5_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine5_row_open) begin + main_sdram_bankmachine5_row_opened <= 1'd1; + main_sdram_bankmachine5_row <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine5_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine5_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready)) begin + main_sdram_bankmachine5_cmd_buffer_source_valid <= main_sdram_bankmachine5_cmd_buffer_sink_valid; + main_sdram_bankmachine5_cmd_buffer_source_first <= main_sdram_bankmachine5_cmd_buffer_sink_first; + main_sdram_bankmachine5_cmd_buffer_source_last <= main_sdram_bankmachine5_cmd_buffer_sink_last; + main_sdram_bankmachine5_cmd_buffer_source_payload_we <= main_sdram_bankmachine5_cmd_buffer_sink_payload_we; + main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine5_twtpcon_valid) begin + main_sdram_bankmachine5_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine5_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine5_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine5_twtpcon_ready)) begin + main_sdram_bankmachine5_twtpcon_count <= (main_sdram_bankmachine5_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine5_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine5_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine5_trccon_valid) begin + main_sdram_bankmachine5_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine5_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine5_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine5_trccon_ready)) begin + main_sdram_bankmachine5_trccon_count <= (main_sdram_bankmachine5_trccon_count - 1'd1); + if ((main_sdram_bankmachine5_trccon_count == 1'd1)) begin + main_sdram_bankmachine5_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine5_trascon_valid) begin + main_sdram_bankmachine5_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine5_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine5_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine5_trascon_ready)) begin + main_sdram_bankmachine5_trascon_count <= (main_sdram_bankmachine5_trascon_count - 1'd1); + if ((main_sdram_bankmachine5_trascon_count == 1'd1)) begin + main_sdram_bankmachine5_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine5_state <= builder_bankmachine5_next_state; + if (main_sdram_bankmachine6_row_close) begin + main_sdram_bankmachine6_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine6_row_open) begin + main_sdram_bankmachine6_row_opened <= 1'd1; + main_sdram_bankmachine6_row <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine6_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine6_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready)) begin + main_sdram_bankmachine6_cmd_buffer_source_valid <= main_sdram_bankmachine6_cmd_buffer_sink_valid; + main_sdram_bankmachine6_cmd_buffer_source_first <= main_sdram_bankmachine6_cmd_buffer_sink_first; + main_sdram_bankmachine6_cmd_buffer_source_last <= main_sdram_bankmachine6_cmd_buffer_sink_last; + main_sdram_bankmachine6_cmd_buffer_source_payload_we <= main_sdram_bankmachine6_cmd_buffer_sink_payload_we; + main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine6_twtpcon_valid) begin + main_sdram_bankmachine6_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine6_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine6_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine6_twtpcon_ready)) begin + main_sdram_bankmachine6_twtpcon_count <= (main_sdram_bankmachine6_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine6_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine6_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine6_trccon_valid) begin + main_sdram_bankmachine6_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine6_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine6_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine6_trccon_ready)) begin + main_sdram_bankmachine6_trccon_count <= (main_sdram_bankmachine6_trccon_count - 1'd1); + if ((main_sdram_bankmachine6_trccon_count == 1'd1)) begin + main_sdram_bankmachine6_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine6_trascon_valid) begin + main_sdram_bankmachine6_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine6_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine6_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine6_trascon_ready)) begin + main_sdram_bankmachine6_trascon_count <= (main_sdram_bankmachine6_trascon_count - 1'd1); + if ((main_sdram_bankmachine6_trascon_count == 1'd1)) begin + main_sdram_bankmachine6_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine6_state <= builder_bankmachine6_next_state; + if (main_sdram_bankmachine7_row_close) begin + main_sdram_bankmachine7_row_opened <= 1'd0; + end else begin + if (main_sdram_bankmachine7_row_open) begin + main_sdram_bankmachine7_row_opened <= 1'd1; + main_sdram_bankmachine7_row <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; + end + end + if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce + 1'd1); + end + if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine7_cmd_buffer_lookahead_consume + 1'd1); + end + if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin + if ((~main_sdram_bankmachine7_cmd_buffer_lookahead_do_read)) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level + 1'd1); + end + end else begin + if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin + main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level - 1'd1); + end + end + if (((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready)) begin + main_sdram_bankmachine7_cmd_buffer_source_valid <= main_sdram_bankmachine7_cmd_buffer_sink_valid; + main_sdram_bankmachine7_cmd_buffer_source_first <= main_sdram_bankmachine7_cmd_buffer_sink_first; + main_sdram_bankmachine7_cmd_buffer_source_last <= main_sdram_bankmachine7_cmd_buffer_sink_last; + main_sdram_bankmachine7_cmd_buffer_source_payload_we <= main_sdram_bankmachine7_cmd_buffer_sink_payload_we; + main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; + end + if (main_sdram_bankmachine7_twtpcon_valid) begin + main_sdram_bankmachine7_twtpcon_count <= 3'd4; + if (1'd0) begin + main_sdram_bankmachine7_twtpcon_ready <= 1'd1; + end else begin + main_sdram_bankmachine7_twtpcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine7_twtpcon_ready)) begin + main_sdram_bankmachine7_twtpcon_count <= (main_sdram_bankmachine7_twtpcon_count - 1'd1); + if ((main_sdram_bankmachine7_twtpcon_count == 1'd1)) begin + main_sdram_bankmachine7_twtpcon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine7_trccon_valid) begin + main_sdram_bankmachine7_trccon_count <= 2'd3; + if (1'd0) begin + main_sdram_bankmachine7_trccon_ready <= 1'd1; + end else begin + main_sdram_bankmachine7_trccon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine7_trccon_ready)) begin + main_sdram_bankmachine7_trccon_count <= (main_sdram_bankmachine7_trccon_count - 1'd1); + if ((main_sdram_bankmachine7_trccon_count == 1'd1)) begin + main_sdram_bankmachine7_trccon_ready <= 1'd1; + end + end + end + if (main_sdram_bankmachine7_trascon_valid) begin + main_sdram_bankmachine7_trascon_count <= 2'd2; + if (1'd0) begin + main_sdram_bankmachine7_trascon_ready <= 1'd1; + end else begin + main_sdram_bankmachine7_trascon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_bankmachine7_trascon_ready)) begin + main_sdram_bankmachine7_trascon_count <= (main_sdram_bankmachine7_trascon_count - 1'd1); + if ((main_sdram_bankmachine7_trascon_count == 1'd1)) begin + main_sdram_bankmachine7_trascon_ready <= 1'd1; + end + end + end + builder_bankmachine7_state <= builder_bankmachine7_next_state; + if ((~main_sdram_en0)) begin + main_sdram_time0 <= 5'd31; + end else begin + if ((~main_sdram_max_time0)) begin + main_sdram_time0 <= (main_sdram_time0 - 1'd1); + end + end + if ((~main_sdram_en1)) begin + main_sdram_time1 <= 4'd15; + end else begin + if ((~main_sdram_max_time1)) begin + main_sdram_time1 <= (main_sdram_time1 - 1'd1); + end + end + if (main_sdram_choose_cmd_ce) begin + case (main_sdram_choose_cmd_grant) + 1'd0: begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end + end + end + end + end + end + end + end + 1'd1: begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end + end + end + end + end + end + end + end + 2'd2: begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end + end + end + end + end + end + end + end + 2'd3: begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end + end + end + end + end + end + end + end + 3'd4: begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end + end + end + end + end + end + end + end + 3'd5: begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end else begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end + end + end + end + end + end + end + end + 3'd6: begin + if (main_sdram_choose_cmd_request[7]) begin + main_sdram_choose_cmd_grant <= 3'd7; + end else begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end + end + end + end + end + end + end + end + 3'd7: begin + if (main_sdram_choose_cmd_request[0]) begin + main_sdram_choose_cmd_grant <= 1'd0; + end else begin + if (main_sdram_choose_cmd_request[1]) begin + main_sdram_choose_cmd_grant <= 1'd1; + end else begin + if (main_sdram_choose_cmd_request[2]) begin + main_sdram_choose_cmd_grant <= 2'd2; + end else begin + if (main_sdram_choose_cmd_request[3]) begin + main_sdram_choose_cmd_grant <= 2'd3; + end else begin + if (main_sdram_choose_cmd_request[4]) begin + main_sdram_choose_cmd_grant <= 3'd4; + end else begin + if (main_sdram_choose_cmd_request[5]) begin + main_sdram_choose_cmd_grant <= 3'd5; + end else begin + if (main_sdram_choose_cmd_request[6]) begin + main_sdram_choose_cmd_grant <= 3'd6; + end + end + end + end + end + end + end + end + endcase + end + if (main_sdram_choose_req_ce) begin + case (main_sdram_choose_req_grant) + 1'd0: begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end + end + end + end + end + end + end + end + 1'd1: begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end + end + end + end + end + end + end + end + 2'd2: begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end + end + end + end + end + end + end + end + 2'd3: begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end + end + end + end + end + end + end + end + 3'd4: begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end + end + end + end + end + end + end + end + 3'd5: begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end else begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end + end + end + end + end + end + end + end + 3'd6: begin + if (main_sdram_choose_req_request[7]) begin + main_sdram_choose_req_grant <= 3'd7; + end else begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end + end + end + end + end + end + end + end + 3'd7: begin + if (main_sdram_choose_req_request[0]) begin + main_sdram_choose_req_grant <= 1'd0; + end else begin + if (main_sdram_choose_req_request[1]) begin + main_sdram_choose_req_grant <= 1'd1; + end else begin + if (main_sdram_choose_req_request[2]) begin + main_sdram_choose_req_grant <= 2'd2; + end else begin + if (main_sdram_choose_req_request[3]) begin + main_sdram_choose_req_grant <= 2'd3; + end else begin + if (main_sdram_choose_req_request[4]) begin + main_sdram_choose_req_grant <= 3'd4; + end else begin + if (main_sdram_choose_req_request[5]) begin + main_sdram_choose_req_grant <= 3'd5; + end else begin + if (main_sdram_choose_req_request[6]) begin + main_sdram_choose_req_grant <= 3'd6; + end + end + end + end + end + end + end + end + endcase + end + main_sdram_dfi_p0_cs_n <= 1'd0; + main_sdram_dfi_p0_bank <= builder_array_muxed0; + main_sdram_dfi_p0_address <= builder_array_muxed1; + main_sdram_dfi_p0_cas_n <= (~builder_array_muxed2); + main_sdram_dfi_p0_ras_n <= (~builder_array_muxed3); + main_sdram_dfi_p0_we_n <= (~builder_array_muxed4); + main_sdram_dfi_p0_rddata_en <= builder_array_muxed5; + main_sdram_dfi_p0_wrdata_en <= builder_array_muxed6; + main_sdram_dfi_p1_cs_n <= 1'd0; + main_sdram_dfi_p1_bank <= builder_array_muxed7; + main_sdram_dfi_p1_address <= builder_array_muxed8; + main_sdram_dfi_p1_cas_n <= (~builder_array_muxed9); + main_sdram_dfi_p1_ras_n <= (~builder_array_muxed10); + main_sdram_dfi_p1_we_n <= (~builder_array_muxed11); + main_sdram_dfi_p1_rddata_en <= builder_array_muxed12; + main_sdram_dfi_p1_wrdata_en <= builder_array_muxed13; + main_sdram_dfi_p2_cs_n <= 1'd0; + main_sdram_dfi_p2_bank <= builder_array_muxed14; + main_sdram_dfi_p2_address <= builder_array_muxed15; + main_sdram_dfi_p2_cas_n <= (~builder_array_muxed16); + main_sdram_dfi_p2_ras_n <= (~builder_array_muxed17); + main_sdram_dfi_p2_we_n <= (~builder_array_muxed18); + main_sdram_dfi_p2_rddata_en <= builder_array_muxed19; + main_sdram_dfi_p2_wrdata_en <= builder_array_muxed20; + main_sdram_dfi_p3_cs_n <= 1'd0; + main_sdram_dfi_p3_bank <= builder_array_muxed21; + main_sdram_dfi_p3_address <= builder_array_muxed22; + main_sdram_dfi_p3_cas_n <= (~builder_array_muxed23); + main_sdram_dfi_p3_ras_n <= (~builder_array_muxed24); + main_sdram_dfi_p3_we_n <= (~builder_array_muxed25); + main_sdram_dfi_p3_rddata_en <= builder_array_muxed26; + main_sdram_dfi_p3_wrdata_en <= builder_array_muxed27; + if (main_sdram_trrdcon_valid) begin + main_sdram_trrdcon_count <= 1'd1; + if (1'd0) begin + main_sdram_trrdcon_ready <= 1'd1; + end else begin + main_sdram_trrdcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_trrdcon_ready)) begin + main_sdram_trrdcon_count <= (main_sdram_trrdcon_count - 1'd1); + if ((main_sdram_trrdcon_count == 1'd1)) begin + main_sdram_trrdcon_ready <= 1'd1; + end + end + end + main_sdram_tfawcon_window <= {main_sdram_tfawcon_window, main_sdram_tfawcon_valid}; + if ((main_sdram_tfawcon_count < 3'd4)) begin + if ((main_sdram_tfawcon_count == 2'd3)) begin + main_sdram_tfawcon_ready <= (~main_sdram_tfawcon_valid); + end else begin + main_sdram_tfawcon_ready <= 1'd1; + end + end + if (main_sdram_tccdcon_valid) begin + main_sdram_tccdcon_count <= 1'd0; + if (1'd1) begin + main_sdram_tccdcon_ready <= 1'd1; + end else begin + main_sdram_tccdcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_tccdcon_ready)) begin + main_sdram_tccdcon_count <= (main_sdram_tccdcon_count - 1'd1); + if ((main_sdram_tccdcon_count == 1'd1)) begin + main_sdram_tccdcon_ready <= 1'd1; + end + end + end + if (main_sdram_twtrcon_valid) begin + main_sdram_twtrcon_count <= 3'd4; + if (1'd0) begin + main_sdram_twtrcon_ready <= 1'd1; + end else begin + main_sdram_twtrcon_ready <= 1'd0; + end + end else begin + if ((~main_sdram_twtrcon_ready)) begin + main_sdram_twtrcon_count <= (main_sdram_twtrcon_count - 1'd1); + if ((main_sdram_twtrcon_count == 1'd1)) begin + main_sdram_twtrcon_ready <= 1'd1; + end + end + end + builder_multiplexer_state <= builder_multiplexer_next_state; + if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) begin + builder_rbank <= 1'd0; + end + if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) begin + builder_wbank <= 1'd0; + end + if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) begin + builder_rbank <= 1'd1; + end + if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) begin + builder_wbank <= 1'd1; + end + if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) begin + builder_rbank <= 2'd2; + end + if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) begin + builder_wbank <= 2'd2; + end + if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) begin + builder_rbank <= 2'd3; + end + if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) begin + builder_wbank <= 2'd3; + end + if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) begin + builder_rbank <= 3'd4; + end + if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) begin + builder_wbank <= 3'd4; + end + if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) begin + builder_rbank <= 3'd5; + end + if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) begin + builder_wbank <= 3'd5; + end + if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) begin + builder_rbank <= 3'd6; + end + if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) begin + builder_wbank <= 3'd6; + end + if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)) begin + builder_rbank <= 3'd7; + end + if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)) begin + builder_wbank <= 3'd7; + end + builder_new_master_wdata_ready0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)); + builder_new_master_wdata_ready1 <= builder_new_master_wdata_ready0; + builder_new_master_wdata_ready2 <= builder_new_master_wdata_ready1; + builder_new_master_rdata_valid0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)); + builder_new_master_rdata_valid1 <= builder_new_master_rdata_valid0; + builder_new_master_rdata_valid2 <= builder_new_master_rdata_valid1; + builder_new_master_rdata_valid3 <= builder_new_master_rdata_valid2; + builder_new_master_rdata_valid4 <= builder_new_master_rdata_valid3; + builder_new_master_rdata_valid5 <= builder_new_master_rdata_valid4; + builder_new_master_rdata_valid6 <= builder_new_master_rdata_valid5; + builder_new_master_rdata_valid7 <= builder_new_master_rdata_valid6; + builder_new_master_rdata_valid8 <= builder_new_master_rdata_valid7; + builder_new_master_rdata_valid9 <= builder_new_master_rdata_valid8; + main_adr_offset_r <= main_interface0_wb_sdram_adr[1:0]; + builder_fullmemorywe_state <= builder_fullmemorywe_next_state; + builder_litedramwishbone2native_state <= builder_litedramwishbone2native_next_state; + if (main_count_next_value_ce) begin + main_count <= main_count_next_value; + end + case (builder_minsoc_grant) + 1'd0: begin + if ((~builder_minsoc_request[0])) begin + if (builder_minsoc_request[1]) begin + builder_minsoc_grant <= 1'd1; + end + end + end + 1'd1: begin + if ((~builder_minsoc_request[1])) begin + if (builder_minsoc_request[0]) begin + builder_minsoc_grant <= 1'd0; + end + end + end + endcase + builder_minsoc_slave_sel_r <= builder_minsoc_slave_sel; + if (builder_minsoc_wait) begin + if ((~builder_minsoc_done)) begin + builder_minsoc_count <= (builder_minsoc_count - 1'd1); + end + end else begin + builder_minsoc_count <= 20'd1000000; + end + builder_minsoc_interface0_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank0_sel) begin + case (builder_minsoc_interface0_bank_bus_adr[3:0]) + 1'd0: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_reset0_w; + end + 1'd1: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch3_w; + end + 2'd2: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch2_w; + end + 2'd3: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch1_w; + end + 3'd4: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch0_w; + end + 3'd5: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors3_w; + end + 3'd6: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors2_w; + end + 3'd7: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors1_w; + end + 4'd8: begin + builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors0_w; + end + endcase + end + if (builder_minsoc_csrbank0_reset0_re) begin + main_minsoc_ctrl_reset_storage <= builder_minsoc_csrbank0_reset0_r; + end + main_minsoc_ctrl_reset_re <= builder_minsoc_csrbank0_reset0_re; + if (builder_minsoc_csrbank0_scratch3_re) begin + main_minsoc_ctrl_scratch_storage[31:24] <= builder_minsoc_csrbank0_scratch3_r; + end + if (builder_minsoc_csrbank0_scratch2_re) begin + main_minsoc_ctrl_scratch_storage[23:16] <= builder_minsoc_csrbank0_scratch2_r; + end + if (builder_minsoc_csrbank0_scratch1_re) begin + main_minsoc_ctrl_scratch_storage[15:8] <= builder_minsoc_csrbank0_scratch1_r; + end + if (builder_minsoc_csrbank0_scratch0_re) begin + main_minsoc_ctrl_scratch_storage[7:0] <= builder_minsoc_csrbank0_scratch0_r; + end + main_minsoc_ctrl_scratch_re <= builder_minsoc_csrbank0_scratch0_re; + builder_minsoc_interface1_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank1_sel) begin + case (builder_minsoc_interface1_bank_bus_adr[2:0]) + 1'd0: begin + builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_half_sys8x_taps0_w; + end + 1'd1: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_rst_w; + end + 2'd2: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_inc_w; + end + 2'd3: begin + builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_dly_sel0_w; + end + 3'd4: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_rst_w; + end + 3'd5: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_inc_w; + end + 3'd6: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_rst_w; + end + 3'd7: begin + builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_w; + end + endcase + end + if (builder_minsoc_csrbank1_half_sys8x_taps0_re) begin + main_a7ddrphy_half_sys8x_taps_storage[4:0] <= builder_minsoc_csrbank1_half_sys8x_taps0_r; + end + main_a7ddrphy_half_sys8x_taps_re <= builder_minsoc_csrbank1_half_sys8x_taps0_re; + if (builder_minsoc_csrbank1_dly_sel0_re) begin + main_a7ddrphy_dly_sel_storage[1:0] <= builder_minsoc_csrbank1_dly_sel0_r; + end + main_a7ddrphy_dly_sel_re <= builder_minsoc_csrbank1_dly_sel0_re; + builder_minsoc_interface2_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank2_sel) begin + case (builder_minsoc_interface2_bank_bus_adr[5:0]) + 1'd0: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_control0_w; + end + 1'd1: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_command0_w; + end + 2'd2: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector0_command_issue_w; + end + 2'd3: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address1_w; + end + 3'd4: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address0_w; + end + 3'd5: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_baddress0_w; + end + 3'd6: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; + end + 3'd7: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; + end + 4'd8: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; + end + 4'd9: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; + end + 4'd10: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata3_w; + end + 4'd11: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata2_w; + end + 4'd12: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata1_w; + end + 4'd13: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata0_w; + end + 4'd14: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_command0_w; + end + 4'd15: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector1_command_issue_w; + end + 5'd16: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address1_w; + end + 5'd17: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address0_w; + end + 5'd18: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_baddress0_w; + end + 5'd19: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; + end + 5'd20: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; + end + 5'd21: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; + end + 5'd22: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; + end + 5'd23: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata3_w; + end + 5'd24: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata2_w; + end + 5'd25: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata1_w; + end + 5'd26: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata0_w; + end + 5'd27: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_command0_w; + end + 5'd28: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector2_command_issue_w; + end + 5'd29: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address1_w; + end + 5'd30: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address0_w; + end + 5'd31: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_baddress0_w; + end + 6'd32: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; + end + 6'd33: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; + end + 6'd34: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; + end + 6'd35: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; + end + 6'd36: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata3_w; + end + 6'd37: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata2_w; + end + 6'd38: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata1_w; + end + 6'd39: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata0_w; + end + 6'd40: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_command0_w; + end + 6'd41: begin + builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector3_command_issue_w; + end + 6'd42: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address1_w; + end + 6'd43: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address0_w; + end + 6'd44: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_baddress0_w; + end + 6'd45: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; + end + 6'd46: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; + end + 6'd47: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; + end + 6'd48: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; + end + 6'd49: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata3_w; + end + 6'd50: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata2_w; + end + 6'd51: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata1_w; + end + 6'd52: begin + builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata0_w; + end + endcase + end + if (builder_minsoc_csrbank2_dfii_control0_re) begin + main_sdram_storage[3:0] <= builder_minsoc_csrbank2_dfii_control0_r; + end + main_sdram_re <= builder_minsoc_csrbank2_dfii_control0_re; + if (builder_minsoc_csrbank2_dfii_pi0_command0_re) begin + main_sdram_phaseinjector0_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi0_command0_r; + end + main_sdram_phaseinjector0_command_re <= builder_minsoc_csrbank2_dfii_pi0_command0_re; + if (builder_minsoc_csrbank2_dfii_pi0_address1_re) begin + main_sdram_phaseinjector0_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi0_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_address0_re) begin + main_sdram_phaseinjector0_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_address0_r; + end + main_sdram_phaseinjector0_address_re <= builder_minsoc_csrbank2_dfii_pi0_address0_re; + if (builder_minsoc_csrbank2_dfii_pi0_baddress0_re) begin + main_sdram_phaseinjector0_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi0_baddress0_r; + end + main_sdram_phaseinjector0_baddress_re <= builder_minsoc_csrbank2_dfii_pi0_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi0_wrdata3_re) begin + main_sdram_phaseinjector0_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_wrdata2_re) begin + main_sdram_phaseinjector0_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_wrdata1_re) begin + main_sdram_phaseinjector0_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi0_wrdata0_re) begin + main_sdram_phaseinjector0_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; + end + main_sdram_phaseinjector0_wrdata_re <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; + if (builder_minsoc_csrbank2_dfii_pi1_command0_re) begin + main_sdram_phaseinjector1_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi1_command0_r; + end + main_sdram_phaseinjector1_command_re <= builder_minsoc_csrbank2_dfii_pi1_command0_re; + if (builder_minsoc_csrbank2_dfii_pi1_address1_re) begin + main_sdram_phaseinjector1_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi1_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_address0_re) begin + main_sdram_phaseinjector1_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_address0_r; + end + main_sdram_phaseinjector1_address_re <= builder_minsoc_csrbank2_dfii_pi1_address0_re; + if (builder_minsoc_csrbank2_dfii_pi1_baddress0_re) begin + main_sdram_phaseinjector1_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi1_baddress0_r; + end + main_sdram_phaseinjector1_baddress_re <= builder_minsoc_csrbank2_dfii_pi1_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi1_wrdata3_re) begin + main_sdram_phaseinjector1_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_wrdata2_re) begin + main_sdram_phaseinjector1_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_wrdata1_re) begin + main_sdram_phaseinjector1_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi1_wrdata0_re) begin + main_sdram_phaseinjector1_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; + end + main_sdram_phaseinjector1_wrdata_re <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; + if (builder_minsoc_csrbank2_dfii_pi2_command0_re) begin + main_sdram_phaseinjector2_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi2_command0_r; + end + main_sdram_phaseinjector2_command_re <= builder_minsoc_csrbank2_dfii_pi2_command0_re; + if (builder_minsoc_csrbank2_dfii_pi2_address1_re) begin + main_sdram_phaseinjector2_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi2_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_address0_re) begin + main_sdram_phaseinjector2_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_address0_r; + end + main_sdram_phaseinjector2_address_re <= builder_minsoc_csrbank2_dfii_pi2_address0_re; + if (builder_minsoc_csrbank2_dfii_pi2_baddress0_re) begin + main_sdram_phaseinjector2_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi2_baddress0_r; + end + main_sdram_phaseinjector2_baddress_re <= builder_minsoc_csrbank2_dfii_pi2_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi2_wrdata3_re) begin + main_sdram_phaseinjector2_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_wrdata2_re) begin + main_sdram_phaseinjector2_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_wrdata1_re) begin + main_sdram_phaseinjector2_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi2_wrdata0_re) begin + main_sdram_phaseinjector2_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; + end + main_sdram_phaseinjector2_wrdata_re <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; + if (builder_minsoc_csrbank2_dfii_pi3_command0_re) begin + main_sdram_phaseinjector3_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi3_command0_r; + end + main_sdram_phaseinjector3_command_re <= builder_minsoc_csrbank2_dfii_pi3_command0_re; + if (builder_minsoc_csrbank2_dfii_pi3_address1_re) begin + main_sdram_phaseinjector3_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi3_address1_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_address0_re) begin + main_sdram_phaseinjector3_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_address0_r; + end + main_sdram_phaseinjector3_address_re <= builder_minsoc_csrbank2_dfii_pi3_address0_re; + if (builder_minsoc_csrbank2_dfii_pi3_baddress0_re) begin + main_sdram_phaseinjector3_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi3_baddress0_r; + end + main_sdram_phaseinjector3_baddress_re <= builder_minsoc_csrbank2_dfii_pi3_baddress0_re; + if (builder_minsoc_csrbank2_dfii_pi3_wrdata3_re) begin + main_sdram_phaseinjector3_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_wrdata2_re) begin + main_sdram_phaseinjector3_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_wrdata1_re) begin + main_sdram_phaseinjector3_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; + end + if (builder_minsoc_csrbank2_dfii_pi3_wrdata0_re) begin + main_sdram_phaseinjector3_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; + end + main_sdram_phaseinjector3_wrdata_re <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; + builder_minsoc_interface3_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank3_sel) begin + case (builder_minsoc_interface3_bank_bus_adr[4:0]) + 1'd0: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load3_w; + end + 1'd1: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load2_w; + end + 2'd2: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load1_w; + end + 2'd3: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load0_w; + end + 3'd4: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload3_w; + end + 3'd5: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload2_w; + end + 3'd6: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload1_w; + end + 3'd7: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload0_w; + end + 4'd8: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_en0_w; + end + 4'd9: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_update_value0_w; + end + 4'd10: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value3_w; + end + 4'd11: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value2_w; + end + 4'd12: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value1_w; + end + 4'd13: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value0_w; + end + 4'd14: begin + builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_status_w; + end + 4'd15: begin + builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_pending_w; + end + 5'd16: begin + builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_ev_enable0_w; + end + endcase + end + if (builder_minsoc_csrbank3_load3_re) begin + main_minsoc_timer0_load_storage[31:24] <= builder_minsoc_csrbank3_load3_r; + end + if (builder_minsoc_csrbank3_load2_re) begin + main_minsoc_timer0_load_storage[23:16] <= builder_minsoc_csrbank3_load2_r; + end + if (builder_minsoc_csrbank3_load1_re) begin + main_minsoc_timer0_load_storage[15:8] <= builder_minsoc_csrbank3_load1_r; + end + if (builder_minsoc_csrbank3_load0_re) begin + main_minsoc_timer0_load_storage[7:0] <= builder_minsoc_csrbank3_load0_r; + end + main_minsoc_timer0_load_re <= builder_minsoc_csrbank3_load0_re; + if (builder_minsoc_csrbank3_reload3_re) begin + main_minsoc_timer0_reload_storage[31:24] <= builder_minsoc_csrbank3_reload3_r; + end + if (builder_minsoc_csrbank3_reload2_re) begin + main_minsoc_timer0_reload_storage[23:16] <= builder_minsoc_csrbank3_reload2_r; + end + if (builder_minsoc_csrbank3_reload1_re) begin + main_minsoc_timer0_reload_storage[15:8] <= builder_minsoc_csrbank3_reload1_r; + end + if (builder_minsoc_csrbank3_reload0_re) begin + main_minsoc_timer0_reload_storage[7:0] <= builder_minsoc_csrbank3_reload0_r; + end + main_minsoc_timer0_reload_re <= builder_minsoc_csrbank3_reload0_re; + if (builder_minsoc_csrbank3_en0_re) begin + main_minsoc_timer0_en_storage <= builder_minsoc_csrbank3_en0_r; + end + main_minsoc_timer0_en_re <= builder_minsoc_csrbank3_en0_re; + if (builder_minsoc_csrbank3_update_value0_re) begin + main_minsoc_timer0_update_value_storage <= builder_minsoc_csrbank3_update_value0_r; + end + main_minsoc_timer0_update_value_re <= builder_minsoc_csrbank3_update_value0_re; + if (builder_minsoc_csrbank3_ev_enable0_re) begin + main_minsoc_timer0_eventmanager_storage <= builder_minsoc_csrbank3_ev_enable0_r; + end + main_minsoc_timer0_eventmanager_re <= builder_minsoc_csrbank3_ev_enable0_re; + builder_minsoc_interface4_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank4_sel) begin + case (builder_minsoc_interface4_bank_bus_adr[2:0]) + 1'd0: begin + builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_rxtx_w; + end + 1'd1: begin + builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_txfull_w; + end + 2'd2: begin + builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_rxempty_w; + end + 2'd3: begin + builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_status_w; + end + 3'd4: begin + builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_pending_w; + end + 3'd5: begin + builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_ev_enable0_w; + end + endcase + end + if (builder_minsoc_csrbank4_ev_enable0_re) begin + main_minsoc_uart_eventmanager_storage[1:0] <= builder_minsoc_csrbank4_ev_enable0_r; + end + main_minsoc_uart_eventmanager_re <= builder_minsoc_csrbank4_ev_enable0_re; + builder_minsoc_interface5_bank_bus_dat_r <= 1'd0; + if (builder_minsoc_csrbank5_sel) begin + case (builder_minsoc_interface5_bank_bus_adr[1:0]) + 1'd0: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word3_w; + end + 1'd1: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word2_w; + end + 2'd2: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word1_w; + end + 2'd3: begin + builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word0_w; + end + endcase + end + if (builder_minsoc_csrbank5_tuning_word3_re) begin + main_minsoc_storage[31:24] <= builder_minsoc_csrbank5_tuning_word3_r; + end + if (builder_minsoc_csrbank5_tuning_word2_re) begin + main_minsoc_storage[23:16] <= builder_minsoc_csrbank5_tuning_word2_r; + end + if (builder_minsoc_csrbank5_tuning_word1_re) begin + main_minsoc_storage[15:8] <= builder_minsoc_csrbank5_tuning_word1_r; + end + if (builder_minsoc_csrbank5_tuning_word0_re) begin + main_minsoc_storage[7:0] <= builder_minsoc_csrbank5_tuning_word0_r; + end + main_minsoc_re <= builder_minsoc_csrbank5_tuning_word0_re; + if (sys_rst) begin + main_minsoc_ctrl_reset_storage <= 1'd0; + main_minsoc_ctrl_reset_re <= 1'd0; + main_minsoc_ctrl_scratch_storage <= 32'd305419896; + main_minsoc_ctrl_scratch_re <= 1'd0; + main_minsoc_ctrl_bus_errors <= 32'd0; + main_minsoc_rom_bus_ack <= 1'd0; + main_minsoc_sram_bus_ack <= 1'd0; + serial_tx <= 1'd1; + main_minsoc_storage <= 32'd8246337; + main_minsoc_re <= 1'd0; + main_minsoc_sink_ready <= 1'd0; + main_minsoc_uart_clk_txen <= 1'd0; + main_minsoc_phase_accumulator_tx <= 32'd0; + main_minsoc_tx_reg <= 8'd0; + main_minsoc_tx_bitcount <= 4'd0; + main_minsoc_tx_busy <= 1'd0; + main_minsoc_source_valid <= 1'd0; + main_minsoc_source_payload_data <= 8'd0; + main_minsoc_uart_clk_rxen <= 1'd0; + main_minsoc_phase_accumulator_rx <= 32'd0; + main_minsoc_rx_r <= 1'd0; + main_minsoc_rx_reg <= 8'd0; + main_minsoc_rx_bitcount <= 4'd0; + main_minsoc_rx_busy <= 1'd0; + main_minsoc_uart_tx_pending <= 1'd0; + main_minsoc_uart_tx_old_trigger <= 1'd0; + main_minsoc_uart_rx_pending <= 1'd0; + main_minsoc_uart_rx_old_trigger <= 1'd0; + main_minsoc_uart_eventmanager_storage <= 2'd0; + main_minsoc_uart_eventmanager_re <= 1'd0; + main_minsoc_uart_tx_fifo_readable <= 1'd0; + main_minsoc_uart_tx_fifo_level0 <= 5'd0; + main_minsoc_uart_tx_fifo_produce <= 4'd0; + main_minsoc_uart_tx_fifo_consume <= 4'd0; + main_minsoc_uart_rx_fifo_readable <= 1'd0; + main_minsoc_uart_rx_fifo_level0 <= 5'd0; + main_minsoc_uart_rx_fifo_produce <= 4'd0; + main_minsoc_uart_rx_fifo_consume <= 4'd0; + main_minsoc_timer0_load_storage <= 32'd0; + main_minsoc_timer0_load_re <= 1'd0; + main_minsoc_timer0_reload_storage <= 32'd0; + main_minsoc_timer0_reload_re <= 1'd0; + main_minsoc_timer0_en_storage <= 1'd0; + main_minsoc_timer0_en_re <= 1'd0; + main_minsoc_timer0_update_value_storage <= 1'd0; + main_minsoc_timer0_update_value_re <= 1'd0; + main_minsoc_timer0_value_status <= 32'd0; + main_minsoc_timer0_zero_pending <= 1'd0; + main_minsoc_timer0_zero_old_trigger <= 1'd0; + main_minsoc_timer0_eventmanager_storage <= 1'd0; + main_minsoc_timer0_eventmanager_re <= 1'd0; + main_minsoc_timer0_value <= 32'd0; + main_a7ddrphy_half_sys8x_taps_storage <= 5'd13; + main_a7ddrphy_half_sys8x_taps_re <= 1'd0; + main_a7ddrphy_dly_sel_storage <= 2'd0; + main_a7ddrphy_dly_sel_re <= 1'd0; + main_a7ddrphy_dfi_p0_rddata_valid <= 1'd0; + main_a7ddrphy_dfi_p1_rddata_valid <= 1'd0; + main_a7ddrphy_dfi_p2_rddata_valid <= 1'd0; + main_a7ddrphy_dfi_p3_rddata_valid <= 1'd0; + main_a7ddrphy_oe_dqs <= 1'd0; + main_a7ddrphy_oe_dq <= 1'd0; + main_a7ddrphy_bitslip0_o <= 8'd0; + main_a7ddrphy_bitslip0_value <= 3'd0; + main_a7ddrphy_bitslip0_r <= 16'd0; + main_a7ddrphy_bitslip1_o <= 8'd0; + main_a7ddrphy_bitslip1_value <= 3'd0; + main_a7ddrphy_bitslip1_r <= 16'd0; + main_a7ddrphy_bitslip2_o <= 8'd0; + main_a7ddrphy_bitslip2_value <= 3'd0; + main_a7ddrphy_bitslip2_r <= 16'd0; + main_a7ddrphy_bitslip3_o <= 8'd0; + main_a7ddrphy_bitslip3_value <= 3'd0; + main_a7ddrphy_bitslip3_r <= 16'd0; + main_a7ddrphy_bitslip4_o <= 8'd0; + main_a7ddrphy_bitslip4_value <= 3'd0; + main_a7ddrphy_bitslip4_r <= 16'd0; + main_a7ddrphy_bitslip5_o <= 8'd0; + main_a7ddrphy_bitslip5_value <= 3'd0; + main_a7ddrphy_bitslip5_r <= 16'd0; + main_a7ddrphy_bitslip6_o <= 8'd0; + main_a7ddrphy_bitslip6_value <= 3'd0; + main_a7ddrphy_bitslip6_r <= 16'd0; + main_a7ddrphy_bitslip7_o <= 8'd0; + main_a7ddrphy_bitslip7_value <= 3'd0; + main_a7ddrphy_bitslip7_r <= 16'd0; + main_a7ddrphy_bitslip8_o <= 8'd0; + main_a7ddrphy_bitslip8_value <= 3'd0; + main_a7ddrphy_bitslip8_r <= 16'd0; + main_a7ddrphy_bitslip9_o <= 8'd0; + main_a7ddrphy_bitslip9_value <= 3'd0; + main_a7ddrphy_bitslip9_r <= 16'd0; + main_a7ddrphy_bitslip10_o <= 8'd0; + main_a7ddrphy_bitslip10_value <= 3'd0; + main_a7ddrphy_bitslip10_r <= 16'd0; + main_a7ddrphy_bitslip11_o <= 8'd0; + main_a7ddrphy_bitslip11_value <= 3'd0; + main_a7ddrphy_bitslip11_r <= 16'd0; + main_a7ddrphy_bitslip12_o <= 8'd0; + main_a7ddrphy_bitslip12_value <= 3'd0; + main_a7ddrphy_bitslip12_r <= 16'd0; + main_a7ddrphy_bitslip13_o <= 8'd0; + main_a7ddrphy_bitslip13_value <= 3'd0; + main_a7ddrphy_bitslip13_r <= 16'd0; + main_a7ddrphy_bitslip14_o <= 8'd0; + main_a7ddrphy_bitslip14_value <= 3'd0; + main_a7ddrphy_bitslip14_r <= 16'd0; + main_a7ddrphy_bitslip15_o <= 8'd0; + main_a7ddrphy_bitslip15_value <= 3'd0; + main_a7ddrphy_bitslip15_r <= 16'd0; + main_a7ddrphy_n_rddata_en0 <= 1'd0; + main_a7ddrphy_n_rddata_en1 <= 1'd0; + main_a7ddrphy_n_rddata_en2 <= 1'd0; + main_a7ddrphy_n_rddata_en3 <= 1'd0; + main_a7ddrphy_n_rddata_en4 <= 1'd0; + main_a7ddrphy_n_rddata_en5 <= 1'd0; + main_a7ddrphy_n_rddata_en6 <= 1'd0; + main_a7ddrphy_n_rddata_en7 <= 1'd0; + main_a7ddrphy_last_wrdata_en <= 4'd0; + main_sdram_storage <= 4'd0; + main_sdram_re <= 1'd0; + main_sdram_phaseinjector0_command_storage <= 6'd0; + main_sdram_phaseinjector0_command_re <= 1'd0; + main_sdram_phaseinjector0_address_storage <= 14'd0; + main_sdram_phaseinjector0_address_re <= 1'd0; + main_sdram_phaseinjector0_baddress_storage <= 3'd0; + main_sdram_phaseinjector0_baddress_re <= 1'd0; + main_sdram_phaseinjector0_wrdata_storage <= 32'd0; + main_sdram_phaseinjector0_wrdata_re <= 1'd0; + main_sdram_phaseinjector0_status <= 32'd0; + main_sdram_phaseinjector1_command_storage <= 6'd0; + main_sdram_phaseinjector1_command_re <= 1'd0; + main_sdram_phaseinjector1_address_storage <= 14'd0; + main_sdram_phaseinjector1_address_re <= 1'd0; + main_sdram_phaseinjector1_baddress_storage <= 3'd0; + main_sdram_phaseinjector1_baddress_re <= 1'd0; + main_sdram_phaseinjector1_wrdata_storage <= 32'd0; + main_sdram_phaseinjector1_wrdata_re <= 1'd0; + main_sdram_phaseinjector1_status <= 32'd0; + main_sdram_phaseinjector2_command_storage <= 6'd0; + main_sdram_phaseinjector2_command_re <= 1'd0; + main_sdram_phaseinjector2_address_storage <= 14'd0; + main_sdram_phaseinjector2_address_re <= 1'd0; + main_sdram_phaseinjector2_baddress_storage <= 3'd0; + main_sdram_phaseinjector2_baddress_re <= 1'd0; + main_sdram_phaseinjector2_wrdata_storage <= 32'd0; + main_sdram_phaseinjector2_wrdata_re <= 1'd0; + main_sdram_phaseinjector2_status <= 32'd0; + main_sdram_phaseinjector3_command_storage <= 6'd0; + main_sdram_phaseinjector3_command_re <= 1'd0; + main_sdram_phaseinjector3_address_storage <= 14'd0; + main_sdram_phaseinjector3_address_re <= 1'd0; + main_sdram_phaseinjector3_baddress_storage <= 3'd0; + main_sdram_phaseinjector3_baddress_re <= 1'd0; + main_sdram_phaseinjector3_wrdata_storage <= 32'd0; + main_sdram_phaseinjector3_wrdata_re <= 1'd0; + main_sdram_phaseinjector3_status <= 32'd0; + main_sdram_dfi_p0_address <= 14'd0; + main_sdram_dfi_p0_bank <= 3'd0; + main_sdram_dfi_p0_cas_n <= 1'd1; + main_sdram_dfi_p0_cs_n <= 1'd1; + main_sdram_dfi_p0_ras_n <= 1'd1; + main_sdram_dfi_p0_we_n <= 1'd1; + main_sdram_dfi_p0_wrdata_en <= 1'd0; + main_sdram_dfi_p0_rddata_en <= 1'd0; + main_sdram_dfi_p1_address <= 14'd0; + main_sdram_dfi_p1_bank <= 3'd0; + main_sdram_dfi_p1_cas_n <= 1'd1; + main_sdram_dfi_p1_cs_n <= 1'd1; + main_sdram_dfi_p1_ras_n <= 1'd1; + main_sdram_dfi_p1_we_n <= 1'd1; + main_sdram_dfi_p1_wrdata_en <= 1'd0; + main_sdram_dfi_p1_rddata_en <= 1'd0; + main_sdram_dfi_p2_address <= 14'd0; + main_sdram_dfi_p2_bank <= 3'd0; + main_sdram_dfi_p2_cas_n <= 1'd1; + main_sdram_dfi_p2_cs_n <= 1'd1; + main_sdram_dfi_p2_ras_n <= 1'd1; + main_sdram_dfi_p2_we_n <= 1'd1; + main_sdram_dfi_p2_wrdata_en <= 1'd0; + main_sdram_dfi_p2_rddata_en <= 1'd0; + main_sdram_dfi_p3_address <= 14'd0; + main_sdram_dfi_p3_bank <= 3'd0; + main_sdram_dfi_p3_cas_n <= 1'd1; + main_sdram_dfi_p3_cs_n <= 1'd1; + main_sdram_dfi_p3_ras_n <= 1'd1; + main_sdram_dfi_p3_we_n <= 1'd1; + main_sdram_dfi_p3_wrdata_en <= 1'd0; + main_sdram_dfi_p3_rddata_en <= 1'd0; + main_sdram_cmd_payload_a <= 14'd0; + main_sdram_cmd_payload_ba <= 3'd0; + main_sdram_cmd_payload_cas <= 1'd0; + main_sdram_cmd_payload_ras <= 1'd0; + main_sdram_cmd_payload_we <= 1'd0; + main_sdram_timer_count1 <= 9'd468; + main_sdram_postponer_req_o <= 1'd0; + main_sdram_postponer_count <= 1'd0; + main_sdram_sequencer_done1 <= 1'd0; + main_sdram_sequencer_counter <= 6'd0; + main_sdram_sequencer_count <= 1'd0; + main_sdram_zqcs_timer_count1 <= 26'd59999999; + main_sdram_zqcs_executer_done <= 1'd0; + main_sdram_zqcs_executer_counter <= 5'd0; + main_sdram_bankmachine0_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine0_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine0_row <= 14'd0; + main_sdram_bankmachine0_row_opened <= 1'd0; + main_sdram_bankmachine0_twtpcon_ready <= 1'd1; + main_sdram_bankmachine0_twtpcon_count <= 3'd0; + main_sdram_bankmachine0_trccon_ready <= 1'd1; + main_sdram_bankmachine0_trccon_count <= 2'd0; + main_sdram_bankmachine0_trascon_ready <= 1'd1; + main_sdram_bankmachine0_trascon_count <= 2'd0; + main_sdram_bankmachine1_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine1_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine1_row <= 14'd0; + main_sdram_bankmachine1_row_opened <= 1'd0; + main_sdram_bankmachine1_twtpcon_ready <= 1'd1; + main_sdram_bankmachine1_twtpcon_count <= 3'd0; + main_sdram_bankmachine1_trccon_ready <= 1'd1; + main_sdram_bankmachine1_trccon_count <= 2'd0; + main_sdram_bankmachine1_trascon_ready <= 1'd1; + main_sdram_bankmachine1_trascon_count <= 2'd0; + main_sdram_bankmachine2_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine2_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine2_row <= 14'd0; + main_sdram_bankmachine2_row_opened <= 1'd0; + main_sdram_bankmachine2_twtpcon_ready <= 1'd1; + main_sdram_bankmachine2_twtpcon_count <= 3'd0; + main_sdram_bankmachine2_trccon_ready <= 1'd1; + main_sdram_bankmachine2_trccon_count <= 2'd0; + main_sdram_bankmachine2_trascon_ready <= 1'd1; + main_sdram_bankmachine2_trascon_count <= 2'd0; + main_sdram_bankmachine3_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine3_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine3_row <= 14'd0; + main_sdram_bankmachine3_row_opened <= 1'd0; + main_sdram_bankmachine3_twtpcon_ready <= 1'd1; + main_sdram_bankmachine3_twtpcon_count <= 3'd0; + main_sdram_bankmachine3_trccon_ready <= 1'd1; + main_sdram_bankmachine3_trccon_count <= 2'd0; + main_sdram_bankmachine3_trascon_ready <= 1'd1; + main_sdram_bankmachine3_trascon_count <= 2'd0; + main_sdram_bankmachine4_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine4_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine4_row <= 14'd0; + main_sdram_bankmachine4_row_opened <= 1'd0; + main_sdram_bankmachine4_twtpcon_ready <= 1'd1; + main_sdram_bankmachine4_twtpcon_count <= 3'd0; + main_sdram_bankmachine4_trccon_ready <= 1'd1; + main_sdram_bankmachine4_trccon_count <= 2'd0; + main_sdram_bankmachine4_trascon_ready <= 1'd1; + main_sdram_bankmachine4_trascon_count <= 2'd0; + main_sdram_bankmachine5_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine5_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine5_row <= 14'd0; + main_sdram_bankmachine5_row_opened <= 1'd0; + main_sdram_bankmachine5_twtpcon_ready <= 1'd1; + main_sdram_bankmachine5_twtpcon_count <= 3'd0; + main_sdram_bankmachine5_trccon_ready <= 1'd1; + main_sdram_bankmachine5_trccon_count <= 2'd0; + main_sdram_bankmachine5_trascon_ready <= 1'd1; + main_sdram_bankmachine5_trascon_count <= 2'd0; + main_sdram_bankmachine6_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine6_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine6_row <= 14'd0; + main_sdram_bankmachine6_row_opened <= 1'd0; + main_sdram_bankmachine6_twtpcon_ready <= 1'd1; + main_sdram_bankmachine6_twtpcon_count <= 3'd0; + main_sdram_bankmachine6_trccon_ready <= 1'd1; + main_sdram_bankmachine6_trccon_count <= 2'd0; + main_sdram_bankmachine6_trascon_ready <= 1'd1; + main_sdram_bankmachine6_trascon_count <= 2'd0; + main_sdram_bankmachine7_cmd_buffer_lookahead_level <= 4'd0; + main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= 3'd0; + main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= 3'd0; + main_sdram_bankmachine7_cmd_buffer_source_valid <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_first <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_last <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_payload_we <= 1'd0; + main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= 21'd0; + main_sdram_bankmachine7_row <= 14'd0; + main_sdram_bankmachine7_row_opened <= 1'd0; + main_sdram_bankmachine7_twtpcon_ready <= 1'd1; + main_sdram_bankmachine7_twtpcon_count <= 3'd0; + main_sdram_bankmachine7_trccon_ready <= 1'd1; + main_sdram_bankmachine7_trccon_count <= 2'd0; + main_sdram_bankmachine7_trascon_ready <= 1'd1; + main_sdram_bankmachine7_trascon_count <= 2'd0; + main_sdram_choose_cmd_grant <= 3'd0; + main_sdram_choose_req_grant <= 3'd0; + main_sdram_trrdcon_ready <= 1'd1; + main_sdram_trrdcon_count <= 1'd0; + main_sdram_tfawcon_ready <= 1'd1; + main_sdram_tfawcon_window <= 4'd0; + main_sdram_tccdcon_ready <= 1'd1; + main_sdram_tccdcon_count <= 1'd0; + main_sdram_twtrcon_ready <= 1'd1; + main_sdram_twtrcon_count <= 3'd0; + main_sdram_time0 <= 5'd0; + main_sdram_time1 <= 4'd0; + main_adr_offset_r <= 2'd0; + main_count <= 1'd0; + builder_wb2csr_state <= 1'd0; + builder_refresher_state <= 2'd0; + builder_bankmachine0_state <= 3'd0; + builder_bankmachine1_state <= 3'd0; + builder_bankmachine2_state <= 3'd0; + builder_bankmachine3_state <= 3'd0; + builder_bankmachine4_state <= 3'd0; + builder_bankmachine5_state <= 3'd0; + builder_bankmachine6_state <= 3'd0; + builder_bankmachine7_state <= 3'd0; + builder_multiplexer_state <= 4'd0; + builder_rbank <= 3'd0; + builder_wbank <= 3'd0; + builder_new_master_wdata_ready0 <= 1'd0; + builder_new_master_wdata_ready1 <= 1'd0; + builder_new_master_wdata_ready2 <= 1'd0; + builder_new_master_rdata_valid0 <= 1'd0; + builder_new_master_rdata_valid1 <= 1'd0; + builder_new_master_rdata_valid2 <= 1'd0; + builder_new_master_rdata_valid3 <= 1'd0; + builder_new_master_rdata_valid4 <= 1'd0; + builder_new_master_rdata_valid5 <= 1'd0; + builder_new_master_rdata_valid6 <= 1'd0; + builder_new_master_rdata_valid7 <= 1'd0; + builder_new_master_rdata_valid8 <= 1'd0; + builder_new_master_rdata_valid9 <= 1'd0; + builder_fullmemorywe_state <= 2'd0; + builder_litedramwishbone2native_state <= 2'd0; + builder_minsoc_grant <= 1'd0; + builder_minsoc_slave_sel_r <= 4'd0; + builder_minsoc_count <= 20'd1000000; + builder_minsoc_interface0_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface1_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface2_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface3_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface4_bank_bus_dat_r <= 8'd0; + builder_minsoc_interface5_bank_bus_dat_r <= 8'd0; + end + builder_regs0 <= serial_rx; + builder_regs1 <= builder_regs0; + end + + reg [31:0] mem[0:8191]; + reg [31:0] memdat; + always @(posedge sys_clk) begin + memdat <= mem[main_minsoc_rom_adr]; + end + + assign main_minsoc_rom_dat_r = memdat; + + initial begin + $readmemh("mem.init", mem); + end + + reg [31:0] mem_1 [0:1023]; + reg [ 9:0] memadr; + always @(posedge sys_clk) begin + if (main_minsoc_sram_we[0]) mem_1[main_minsoc_sram_adr][7:0] <= main_minsoc_sram_dat_w[7:0]; + if (main_minsoc_sram_we[1]) mem_1[main_minsoc_sram_adr][15:8] <= main_minsoc_sram_dat_w[15:8]; + if (main_minsoc_sram_we[2]) mem_1[main_minsoc_sram_adr][23:16] <= main_minsoc_sram_dat_w[23:16]; + if (main_minsoc_sram_we[3]) mem_1[main_minsoc_sram_adr][31:24] <= main_minsoc_sram_dat_w[31:24]; + memadr <= main_minsoc_sram_adr; + end + + assign main_minsoc_sram_dat_r = mem_1[memadr]; + + initial begin + $readmemh("mem_1.init", mem_1); + end + + reg [9:0] storage [0:15]; + reg [9:0] memdat_1; + reg [9:0] memdat_2; + always @(posedge sys_clk) begin + if (main_minsoc_uart_tx_fifo_wrport_we) + storage[main_minsoc_uart_tx_fifo_wrport_adr] <= main_minsoc_uart_tx_fifo_wrport_dat_w; + memdat_1 <= storage[main_minsoc_uart_tx_fifo_wrport_adr]; + end + + always @(posedge sys_clk) begin + if (main_minsoc_uart_tx_fifo_rdport_re) + memdat_2 <= storage[main_minsoc_uart_tx_fifo_rdport_adr]; + end + + assign main_minsoc_uart_tx_fifo_wrport_dat_r = memdat_1; + assign main_minsoc_uart_tx_fifo_rdport_dat_r = memdat_2; + + reg [9:0] storage_1[0:15]; + reg [9:0] memdat_3; + reg [9:0] memdat_4; + always @(posedge sys_clk) begin + if (main_minsoc_uart_rx_fifo_wrport_we) + storage_1[main_minsoc_uart_rx_fifo_wrport_adr] <= main_minsoc_uart_rx_fifo_wrport_dat_w; + memdat_3 <= storage_1[main_minsoc_uart_rx_fifo_wrport_adr]; + end + + always @(posedge sys_clk) begin + if (main_minsoc_uart_rx_fifo_rdport_re) + memdat_4 <= storage_1[main_minsoc_uart_rx_fifo_rdport_adr]; + end + + assign main_minsoc_uart_rx_fifo_wrport_dat_r = memdat_3; + assign main_minsoc_uart_rx_fifo_rdport_dat_r = memdat_4; + + wire clk100_ibuf; + IBUF clkbuf ( + .I(clk100), + .O(clk100_ibuf) + ); + + BUFG BUFG ( + .I(clk100_ibuf), + .O(main_pll_clkin) + ); + + BUFG BUFG_1 ( + .I(main_clkout0), + .O(sys_clk) + ); + + BUFG BUFG_2 ( + .I(main_clkout1), + .O(sys4x_clk) + ); + + BUFG BUFG_3 ( + .I(main_clkout2), + .O(sys4x_dqs_clk) + ); + + BUFG BUFG_4 ( + .I(main_clkout3), + .O(clk200_clk) + ); + + (* LOC="IDELAYCTRL_X1Y0" *) + IDELAYCTRL IDELAYCTRL ( + .REFCLK(clk200_clk), + .RST(main_ic_reset), + .RDY(idelayctl_rdy) + ); + + wire tq; + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(1'd0), + .D2(1'd1), + .D3(1'd0), + .D4(1'd1), + .D5(1'd0), + .D6(1'd1), + .D7(1'd0), + .D8(1'd1), + .OCE(1'd1), + .RST(sys_rst), + .OQ(main_a7ddrphy_sd_clk_se_nodelay), + .TQ(tq), + .TCE(1'b1), + .T1(1'b0) + ); + + OBUFTDS OBUFTDS_2 ( + .I (main_a7ddrphy_sd_clk_se_nodelay), + .O (ddram_clk_p), + .OB(ddram_clk_n), + .T (tq) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_1 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[0]), + .D2(main_a7ddrphy_dfi_p0_address[0]), + .D3(main_a7ddrphy_dfi_p1_address[0]), + .D4(main_a7ddrphy_dfi_p1_address[0]), + .D5(main_a7ddrphy_dfi_p2_address[0]), + .D6(main_a7ddrphy_dfi_p2_address[0]), + .D7(main_a7ddrphy_dfi_p3_address[0]), + .D8(main_a7ddrphy_dfi_p3_address[0]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[0]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_2 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[1]), + .D2(main_a7ddrphy_dfi_p0_address[1]), + .D3(main_a7ddrphy_dfi_p1_address[1]), + .D4(main_a7ddrphy_dfi_p1_address[1]), + .D5(main_a7ddrphy_dfi_p2_address[1]), + .D6(main_a7ddrphy_dfi_p2_address[1]), + .D7(main_a7ddrphy_dfi_p3_address[1]), + .D8(main_a7ddrphy_dfi_p3_address[1]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[1]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_3 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[2]), + .D2(main_a7ddrphy_dfi_p0_address[2]), + .D3(main_a7ddrphy_dfi_p1_address[2]), + .D4(main_a7ddrphy_dfi_p1_address[2]), + .D5(main_a7ddrphy_dfi_p2_address[2]), + .D6(main_a7ddrphy_dfi_p2_address[2]), + .D7(main_a7ddrphy_dfi_p3_address[2]), + .D8(main_a7ddrphy_dfi_p3_address[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[2]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_4 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[3]), + .D2(main_a7ddrphy_dfi_p0_address[3]), + .D3(main_a7ddrphy_dfi_p1_address[3]), + .D4(main_a7ddrphy_dfi_p1_address[3]), + .D5(main_a7ddrphy_dfi_p2_address[3]), + .D6(main_a7ddrphy_dfi_p2_address[3]), + .D7(main_a7ddrphy_dfi_p3_address[3]), + .D8(main_a7ddrphy_dfi_p3_address[3]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[3]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_5 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[4]), + .D2(main_a7ddrphy_dfi_p0_address[4]), + .D3(main_a7ddrphy_dfi_p1_address[4]), + .D4(main_a7ddrphy_dfi_p1_address[4]), + .D5(main_a7ddrphy_dfi_p2_address[4]), + .D6(main_a7ddrphy_dfi_p2_address[4]), + .D7(main_a7ddrphy_dfi_p3_address[4]), + .D8(main_a7ddrphy_dfi_p3_address[4]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[4]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_6 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[5]), + .D2(main_a7ddrphy_dfi_p0_address[5]), + .D3(main_a7ddrphy_dfi_p1_address[5]), + .D4(main_a7ddrphy_dfi_p1_address[5]), + .D5(main_a7ddrphy_dfi_p2_address[5]), + .D6(main_a7ddrphy_dfi_p2_address[5]), + .D7(main_a7ddrphy_dfi_p3_address[5]), + .D8(main_a7ddrphy_dfi_p3_address[5]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[5]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_7 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[6]), + .D2(main_a7ddrphy_dfi_p0_address[6]), + .D3(main_a7ddrphy_dfi_p1_address[6]), + .D4(main_a7ddrphy_dfi_p1_address[6]), + .D5(main_a7ddrphy_dfi_p2_address[6]), + .D6(main_a7ddrphy_dfi_p2_address[6]), + .D7(main_a7ddrphy_dfi_p3_address[6]), + .D8(main_a7ddrphy_dfi_p3_address[6]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[6]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_8 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[7]), + .D2(main_a7ddrphy_dfi_p0_address[7]), + .D3(main_a7ddrphy_dfi_p1_address[7]), + .D4(main_a7ddrphy_dfi_p1_address[7]), + .D5(main_a7ddrphy_dfi_p2_address[7]), + .D6(main_a7ddrphy_dfi_p2_address[7]), + .D7(main_a7ddrphy_dfi_p3_address[7]), + .D8(main_a7ddrphy_dfi_p3_address[7]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[7]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_9 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[8]), + .D2(main_a7ddrphy_dfi_p0_address[8]), + .D3(main_a7ddrphy_dfi_p1_address[8]), + .D4(main_a7ddrphy_dfi_p1_address[8]), + .D5(main_a7ddrphy_dfi_p2_address[8]), + .D6(main_a7ddrphy_dfi_p2_address[8]), + .D7(main_a7ddrphy_dfi_p3_address[8]), + .D8(main_a7ddrphy_dfi_p3_address[8]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[8]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_10 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[9]), + .D2(main_a7ddrphy_dfi_p0_address[9]), + .D3(main_a7ddrphy_dfi_p1_address[9]), + .D4(main_a7ddrphy_dfi_p1_address[9]), + .D5(main_a7ddrphy_dfi_p2_address[9]), + .D6(main_a7ddrphy_dfi_p2_address[9]), + .D7(main_a7ddrphy_dfi_p3_address[9]), + .D8(main_a7ddrphy_dfi_p3_address[9]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[9]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_11 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[10]), + .D2(main_a7ddrphy_dfi_p0_address[10]), + .D3(main_a7ddrphy_dfi_p1_address[10]), + .D4(main_a7ddrphy_dfi_p1_address[10]), + .D5(main_a7ddrphy_dfi_p2_address[10]), + .D6(main_a7ddrphy_dfi_p2_address[10]), + .D7(main_a7ddrphy_dfi_p3_address[10]), + .D8(main_a7ddrphy_dfi_p3_address[10]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[10]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_12 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[11]), + .D2(main_a7ddrphy_dfi_p0_address[11]), + .D3(main_a7ddrphy_dfi_p1_address[11]), + .D4(main_a7ddrphy_dfi_p1_address[11]), + .D5(main_a7ddrphy_dfi_p2_address[11]), + .D6(main_a7ddrphy_dfi_p2_address[11]), + .D7(main_a7ddrphy_dfi_p3_address[11]), + .D8(main_a7ddrphy_dfi_p3_address[11]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[11]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_13 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[12]), + .D2(main_a7ddrphy_dfi_p0_address[12]), + .D3(main_a7ddrphy_dfi_p1_address[12]), + .D4(main_a7ddrphy_dfi_p1_address[12]), + .D5(main_a7ddrphy_dfi_p2_address[12]), + .D6(main_a7ddrphy_dfi_p2_address[12]), + .D7(main_a7ddrphy_dfi_p3_address[12]), + .D8(main_a7ddrphy_dfi_p3_address[12]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[12]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_14 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_address[13]), + .D2(main_a7ddrphy_dfi_p0_address[13]), + .D3(main_a7ddrphy_dfi_p1_address[13]), + .D4(main_a7ddrphy_dfi_p1_address[13]), + .D5(main_a7ddrphy_dfi_p2_address[13]), + .D6(main_a7ddrphy_dfi_p2_address[13]), + .D7(main_a7ddrphy_dfi_p3_address[13]), + .D8(main_a7ddrphy_dfi_p3_address[13]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_a_iob[13]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_15 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_bank[0]), + .D2(main_a7ddrphy_dfi_p0_bank[0]), + .D3(main_a7ddrphy_dfi_p1_bank[0]), + .D4(main_a7ddrphy_dfi_p1_bank[0]), + .D5(main_a7ddrphy_dfi_p2_bank[0]), + .D6(main_a7ddrphy_dfi_p2_bank[0]), + .D7(main_a7ddrphy_dfi_p3_bank[0]), + .D8(main_a7ddrphy_dfi_p3_bank[0]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba_iob[0]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_16 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_bank[1]), + .D2(main_a7ddrphy_dfi_p0_bank[1]), + .D3(main_a7ddrphy_dfi_p1_bank[1]), + .D4(main_a7ddrphy_dfi_p1_bank[1]), + .D5(main_a7ddrphy_dfi_p2_bank[1]), + .D6(main_a7ddrphy_dfi_p2_bank[1]), + .D7(main_a7ddrphy_dfi_p3_bank[1]), + .D8(main_a7ddrphy_dfi_p3_bank[1]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba_iob[1]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_17 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_bank[2]), + .D2(main_a7ddrphy_dfi_p0_bank[2]), + .D3(main_a7ddrphy_dfi_p1_bank[2]), + .D4(main_a7ddrphy_dfi_p1_bank[2]), + .D5(main_a7ddrphy_dfi_p2_bank[2]), + .D6(main_a7ddrphy_dfi_p2_bank[2]), + .D7(main_a7ddrphy_dfi_p3_bank[2]), + .D8(main_a7ddrphy_dfi_p3_bank[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ba_iob[2]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_18 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_ras_n), + .D2(main_a7ddrphy_dfi_p0_ras_n), + .D3(main_a7ddrphy_dfi_p1_ras_n), + .D4(main_a7ddrphy_dfi_p1_ras_n), + .D5(main_a7ddrphy_dfi_p2_ras_n), + .D6(main_a7ddrphy_dfi_p2_ras_n), + .D7(main_a7ddrphy_dfi_p3_ras_n), + .D8(main_a7ddrphy_dfi_p3_ras_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_ras_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_19 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_cas_n), + .D2(main_a7ddrphy_dfi_p0_cas_n), + .D3(main_a7ddrphy_dfi_p1_cas_n), + .D4(main_a7ddrphy_dfi_p1_cas_n), + .D5(main_a7ddrphy_dfi_p2_cas_n), + .D6(main_a7ddrphy_dfi_p2_cas_n), + .D7(main_a7ddrphy_dfi_p3_cas_n), + .D8(main_a7ddrphy_dfi_p3_cas_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cas_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_20 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_we_n), + .D2(main_a7ddrphy_dfi_p0_we_n), + .D3(main_a7ddrphy_dfi_p1_we_n), + .D4(main_a7ddrphy_dfi_p1_we_n), + .D5(main_a7ddrphy_dfi_p2_we_n), + .D6(main_a7ddrphy_dfi_p2_we_n), + .D7(main_a7ddrphy_dfi_p3_we_n), + .D8(main_a7ddrphy_dfi_p3_we_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_we_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_21 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_cke), + .D2(main_a7ddrphy_dfi_p0_cke), + .D3(main_a7ddrphy_dfi_p1_cke), + .D4(main_a7ddrphy_dfi_p1_cke), + .D5(main_a7ddrphy_dfi_p2_cke), + .D6(main_a7ddrphy_dfi_p2_cke), + .D7(main_a7ddrphy_dfi_p3_cke), + .D8(main_a7ddrphy_dfi_p3_cke), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cke_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_22 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_odt), + .D2(main_a7ddrphy_dfi_p0_odt), + .D3(main_a7ddrphy_dfi_p1_odt), + .D4(main_a7ddrphy_dfi_p1_odt), + .D5(main_a7ddrphy_dfi_p2_odt), + .D6(main_a7ddrphy_dfi_p2_odt), + .D7(main_a7ddrphy_dfi_p3_odt), + .D8(main_a7ddrphy_dfi_p3_odt), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_odt_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_23 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_reset_n), + .D2(main_a7ddrphy_dfi_p0_reset_n), + .D3(main_a7ddrphy_dfi_p1_reset_n), + .D4(main_a7ddrphy_dfi_p1_reset_n), + .D5(main_a7ddrphy_dfi_p2_reset_n), + .D6(main_a7ddrphy_dfi_p2_reset_n), + .D7(main_a7ddrphy_dfi_p3_reset_n), + .D8(main_a7ddrphy_dfi_p3_reset_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_reset_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_24 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_cs_n), + .D2(main_a7ddrphy_dfi_p0_cs_n), + .D3(main_a7ddrphy_dfi_p1_cs_n), + .D4(main_a7ddrphy_dfi_p1_cs_n), + .D5(main_a7ddrphy_dfi_p2_cs_n), + .D6(main_a7ddrphy_dfi_p2_cs_n), + .D7(main_a7ddrphy_dfi_p3_cs_n), + .D8(main_a7ddrphy_dfi_p3_cs_n), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_cs_n_iob) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_25 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata_mask[0]), + .D2(main_a7ddrphy_dfi_p0_wrdata_mask[2]), + .D3(main_a7ddrphy_dfi_p1_wrdata_mask[0]), + .D4(main_a7ddrphy_dfi_p1_wrdata_mask[2]), + .D5(main_a7ddrphy_dfi_p2_wrdata_mask[0]), + .D6(main_a7ddrphy_dfi_p2_wrdata_mask[2]), + .D7(main_a7ddrphy_dfi_p3_wrdata_mask[0]), + .D8(main_a7ddrphy_dfi_p3_wrdata_mask[2]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_dm_iob[0]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_26 ( + .CLK(sys4x_dqs_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dqs_serdes_pattern[0]), + .D2(main_a7ddrphy_dqs_serdes_pattern[1]), + .D3(main_a7ddrphy_dqs_serdes_pattern[2]), + .D4(main_a7ddrphy_dqs_serdes_pattern[3]), + .D5(main_a7ddrphy_dqs_serdes_pattern[4]), + .D6(main_a7ddrphy_dqs_serdes_pattern[5]), + .D7(main_a7ddrphy_dqs_serdes_pattern[6]), + .D8(main_a7ddrphy_dqs_serdes_pattern[7]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dqs)), + .TCE(1'd1), + .OFB(main_a7ddrphy0), + .OQ(main_a7ddrphy_dqs_nodelay0), + .TQ(main_a7ddrphy_dqs_t0) + ); + + OBUFTDS OBUFTDS ( + .I (main_a7ddrphy_dqs_nodelay0), + .T (main_a7ddrphy_dqs_t0), + .O (ddram_dqs_p[0]), + .OB(ddram_dqs_n[0]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_27 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata_mask[1]), + .D2(main_a7ddrphy_dfi_p0_wrdata_mask[3]), + .D3(main_a7ddrphy_dfi_p1_wrdata_mask[1]), + .D4(main_a7ddrphy_dfi_p1_wrdata_mask[3]), + .D5(main_a7ddrphy_dfi_p2_wrdata_mask[1]), + .D6(main_a7ddrphy_dfi_p2_wrdata_mask[3]), + .D7(main_a7ddrphy_dfi_p3_wrdata_mask[1]), + .D8(main_a7ddrphy_dfi_p3_wrdata_mask[3]), + .OCE(1'd1), + .RST(sys_rst), + .OQ(ddram_dm_iob[1]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_28 ( + .CLK(sys4x_dqs_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dqs_serdes_pattern[0]), + .D2(main_a7ddrphy_dqs_serdes_pattern[1]), + .D3(main_a7ddrphy_dqs_serdes_pattern[2]), + .D4(main_a7ddrphy_dqs_serdes_pattern[3]), + .D5(main_a7ddrphy_dqs_serdes_pattern[4]), + .D6(main_a7ddrphy_dqs_serdes_pattern[5]), + .D7(main_a7ddrphy_dqs_serdes_pattern[6]), + .D8(main_a7ddrphy_dqs_serdes_pattern[7]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dqs)), + .TCE(1'd1), + .OFB(main_a7ddrphy1), + .OQ(main_a7ddrphy_dqs_nodelay1), + .TQ(main_a7ddrphy_dqs_t1) + ); + + OBUFTDS OBUFTDS_1 ( + .I (main_a7ddrphy_dqs_nodelay1), + .T (main_a7ddrphy_dqs_t1), + .O (ddram_dqs_p[1]), + .OB(ddram_dqs_n[1]) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_29 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[0]), + .D2(main_a7ddrphy_dfi_p0_wrdata[16]), + .D3(main_a7ddrphy_dfi_p1_wrdata[0]), + .D4(main_a7ddrphy_dfi_p1_wrdata[16]), + .D5(main_a7ddrphy_dfi_p2_wrdata[0]), + .D6(main_a7ddrphy_dfi_p2_wrdata[16]), + .D7(main_a7ddrphy_dfi_p3_wrdata[0]), + .D8(main_a7ddrphy_dfi_p3_wrdata[16]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay0), + .TQ(main_a7ddrphy_dq_t0) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed0), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data0[7]), + .Q2(main_a7ddrphy_dq_i_data0[6]), + .Q3(main_a7ddrphy_dq_i_data0[5]), + .Q4(main_a7ddrphy_dq_i_data0[4]), + .Q5(main_a7ddrphy_dq_i_data0[3]), + .Q6(main_a7ddrphy_dq_i_data0[2]), + .Q7(main_a7ddrphy_dq_i_data0[1]), + .Q8(main_a7ddrphy_dq_i_data0[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay0), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed0) + ); + + IOBUF IOBUF ( + .I (main_a7ddrphy_dq_o_nodelay0), + .T (main_a7ddrphy_dq_t0), + .IO(ddram_dq[0]), + .O (main_a7ddrphy_dq_i_nodelay0) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_30 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[1]), + .D2(main_a7ddrphy_dfi_p0_wrdata[17]), + .D3(main_a7ddrphy_dfi_p1_wrdata[1]), + .D4(main_a7ddrphy_dfi_p1_wrdata[17]), + .D5(main_a7ddrphy_dfi_p2_wrdata[1]), + .D6(main_a7ddrphy_dfi_p2_wrdata[17]), + .D7(main_a7ddrphy_dfi_p3_wrdata[1]), + .D8(main_a7ddrphy_dfi_p3_wrdata[17]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay1), + .TQ(main_a7ddrphy_dq_t1) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_1 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed1), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data1[7]), + .Q2(main_a7ddrphy_dq_i_data1[6]), + .Q3(main_a7ddrphy_dq_i_data1[5]), + .Q4(main_a7ddrphy_dq_i_data1[4]), + .Q5(main_a7ddrphy_dq_i_data1[3]), + .Q6(main_a7ddrphy_dq_i_data1[2]), + .Q7(main_a7ddrphy_dq_i_data1[1]), + .Q8(main_a7ddrphy_dq_i_data1[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_1 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay1), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed1) + ); + + IOBUF IOBUF_1 ( + .I (main_a7ddrphy_dq_o_nodelay1), + .T (main_a7ddrphy_dq_t1), + .IO(ddram_dq[1]), + .O (main_a7ddrphy_dq_i_nodelay1) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_31 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[2]), + .D2(main_a7ddrphy_dfi_p0_wrdata[18]), + .D3(main_a7ddrphy_dfi_p1_wrdata[2]), + .D4(main_a7ddrphy_dfi_p1_wrdata[18]), + .D5(main_a7ddrphy_dfi_p2_wrdata[2]), + .D6(main_a7ddrphy_dfi_p2_wrdata[18]), + .D7(main_a7ddrphy_dfi_p3_wrdata[2]), + .D8(main_a7ddrphy_dfi_p3_wrdata[18]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay2), + .TQ(main_a7ddrphy_dq_t2) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_2 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed2), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data2[7]), + .Q2(main_a7ddrphy_dq_i_data2[6]), + .Q3(main_a7ddrphy_dq_i_data2[5]), + .Q4(main_a7ddrphy_dq_i_data2[4]), + .Q5(main_a7ddrphy_dq_i_data2[3]), + .Q6(main_a7ddrphy_dq_i_data2[2]), + .Q7(main_a7ddrphy_dq_i_data2[1]), + .Q8(main_a7ddrphy_dq_i_data2[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_2 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay2), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed2) + ); + + IOBUF IOBUF_2 ( + .I (main_a7ddrphy_dq_o_nodelay2), + .T (main_a7ddrphy_dq_t2), + .IO(ddram_dq[2]), + .O (main_a7ddrphy_dq_i_nodelay2) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_32 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[3]), + .D2(main_a7ddrphy_dfi_p0_wrdata[19]), + .D3(main_a7ddrphy_dfi_p1_wrdata[3]), + .D4(main_a7ddrphy_dfi_p1_wrdata[19]), + .D5(main_a7ddrphy_dfi_p2_wrdata[3]), + .D6(main_a7ddrphy_dfi_p2_wrdata[19]), + .D7(main_a7ddrphy_dfi_p3_wrdata[3]), + .D8(main_a7ddrphy_dfi_p3_wrdata[19]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay3), + .TQ(main_a7ddrphy_dq_t3) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_3 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed3), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data3[7]), + .Q2(main_a7ddrphy_dq_i_data3[6]), + .Q3(main_a7ddrphy_dq_i_data3[5]), + .Q4(main_a7ddrphy_dq_i_data3[4]), + .Q5(main_a7ddrphy_dq_i_data3[3]), + .Q6(main_a7ddrphy_dq_i_data3[2]), + .Q7(main_a7ddrphy_dq_i_data3[1]), + .Q8(main_a7ddrphy_dq_i_data3[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_3 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay3), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed3) + ); + + IOBUF IOBUF_3 ( + .I (main_a7ddrphy_dq_o_nodelay3), + .T (main_a7ddrphy_dq_t3), + .IO(ddram_dq[3]), + .O (main_a7ddrphy_dq_i_nodelay3) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_33 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[4]), + .D2(main_a7ddrphy_dfi_p0_wrdata[20]), + .D3(main_a7ddrphy_dfi_p1_wrdata[4]), + .D4(main_a7ddrphy_dfi_p1_wrdata[20]), + .D5(main_a7ddrphy_dfi_p2_wrdata[4]), + .D6(main_a7ddrphy_dfi_p2_wrdata[20]), + .D7(main_a7ddrphy_dfi_p3_wrdata[4]), + .D8(main_a7ddrphy_dfi_p3_wrdata[20]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay4), + .TQ(main_a7ddrphy_dq_t4) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_4 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed4), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data4[7]), + .Q2(main_a7ddrphy_dq_i_data4[6]), + .Q3(main_a7ddrphy_dq_i_data4[5]), + .Q4(main_a7ddrphy_dq_i_data4[4]), + .Q5(main_a7ddrphy_dq_i_data4[3]), + .Q6(main_a7ddrphy_dq_i_data4[2]), + .Q7(main_a7ddrphy_dq_i_data4[1]), + .Q8(main_a7ddrphy_dq_i_data4[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_4 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay4), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed4) + ); + + IOBUF IOBUF_4 ( + .I (main_a7ddrphy_dq_o_nodelay4), + .T (main_a7ddrphy_dq_t4), + .IO(ddram_dq[4]), + .O (main_a7ddrphy_dq_i_nodelay4) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_34 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[5]), + .D2(main_a7ddrphy_dfi_p0_wrdata[21]), + .D3(main_a7ddrphy_dfi_p1_wrdata[5]), + .D4(main_a7ddrphy_dfi_p1_wrdata[21]), + .D5(main_a7ddrphy_dfi_p2_wrdata[5]), + .D6(main_a7ddrphy_dfi_p2_wrdata[21]), + .D7(main_a7ddrphy_dfi_p3_wrdata[5]), + .D8(main_a7ddrphy_dfi_p3_wrdata[21]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay5), + .TQ(main_a7ddrphy_dq_t5) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_5 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed5), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data5[7]), + .Q2(main_a7ddrphy_dq_i_data5[6]), + .Q3(main_a7ddrphy_dq_i_data5[5]), + .Q4(main_a7ddrphy_dq_i_data5[4]), + .Q5(main_a7ddrphy_dq_i_data5[3]), + .Q6(main_a7ddrphy_dq_i_data5[2]), + .Q7(main_a7ddrphy_dq_i_data5[1]), + .Q8(main_a7ddrphy_dq_i_data5[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_5 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay5), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed5) + ); + + IOBUF IOBUF_5 ( + .I (main_a7ddrphy_dq_o_nodelay5), + .T (main_a7ddrphy_dq_t5), + .IO(ddram_dq[5]), + .O (main_a7ddrphy_dq_i_nodelay5) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_35 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[6]), + .D2(main_a7ddrphy_dfi_p0_wrdata[22]), + .D3(main_a7ddrphy_dfi_p1_wrdata[6]), + .D4(main_a7ddrphy_dfi_p1_wrdata[22]), + .D5(main_a7ddrphy_dfi_p2_wrdata[6]), + .D6(main_a7ddrphy_dfi_p2_wrdata[22]), + .D7(main_a7ddrphy_dfi_p3_wrdata[6]), + .D8(main_a7ddrphy_dfi_p3_wrdata[22]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay6), + .TQ(main_a7ddrphy_dq_t6) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_6 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed6), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data6[7]), + .Q2(main_a7ddrphy_dq_i_data6[6]), + .Q3(main_a7ddrphy_dq_i_data6[5]), + .Q4(main_a7ddrphy_dq_i_data6[4]), + .Q5(main_a7ddrphy_dq_i_data6[3]), + .Q6(main_a7ddrphy_dq_i_data6[2]), + .Q7(main_a7ddrphy_dq_i_data6[1]), + .Q8(main_a7ddrphy_dq_i_data6[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_6 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay6), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed6) + ); + + IOBUF IOBUF_6 ( + .I (main_a7ddrphy_dq_o_nodelay6), + .T (main_a7ddrphy_dq_t6), + .IO(ddram_dq[6]), + .O (main_a7ddrphy_dq_i_nodelay6) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_36 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[7]), + .D2(main_a7ddrphy_dfi_p0_wrdata[23]), + .D3(main_a7ddrphy_dfi_p1_wrdata[7]), + .D4(main_a7ddrphy_dfi_p1_wrdata[23]), + .D5(main_a7ddrphy_dfi_p2_wrdata[7]), + .D6(main_a7ddrphy_dfi_p2_wrdata[23]), + .D7(main_a7ddrphy_dfi_p3_wrdata[7]), + .D8(main_a7ddrphy_dfi_p3_wrdata[23]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay7), + .TQ(main_a7ddrphy_dq_t7) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_7 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed7), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data7[7]), + .Q2(main_a7ddrphy_dq_i_data7[6]), + .Q3(main_a7ddrphy_dq_i_data7[5]), + .Q4(main_a7ddrphy_dq_i_data7[4]), + .Q5(main_a7ddrphy_dq_i_data7[3]), + .Q6(main_a7ddrphy_dq_i_data7[2]), + .Q7(main_a7ddrphy_dq_i_data7[1]), + .Q8(main_a7ddrphy_dq_i_data7[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_7 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay7), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed7) + ); + + IOBUF IOBUF_7 ( + .I (main_a7ddrphy_dq_o_nodelay7), + .T (main_a7ddrphy_dq_t7), + .IO(ddram_dq[7]), + .O (main_a7ddrphy_dq_i_nodelay7) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_37 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[8]), + .D2(main_a7ddrphy_dfi_p0_wrdata[24]), + .D3(main_a7ddrphy_dfi_p1_wrdata[8]), + .D4(main_a7ddrphy_dfi_p1_wrdata[24]), + .D5(main_a7ddrphy_dfi_p2_wrdata[8]), + .D6(main_a7ddrphy_dfi_p2_wrdata[24]), + .D7(main_a7ddrphy_dfi_p3_wrdata[8]), + .D8(main_a7ddrphy_dfi_p3_wrdata[24]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay8), + .TQ(main_a7ddrphy_dq_t8) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_8 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed8), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data8[7]), + .Q2(main_a7ddrphy_dq_i_data8[6]), + .Q3(main_a7ddrphy_dq_i_data8[5]), + .Q4(main_a7ddrphy_dq_i_data8[4]), + .Q5(main_a7ddrphy_dq_i_data8[3]), + .Q6(main_a7ddrphy_dq_i_data8[2]), + .Q7(main_a7ddrphy_dq_i_data8[1]), + .Q8(main_a7ddrphy_dq_i_data8[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_8 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay8), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed8) + ); + + IOBUF IOBUF_8 ( + .I (main_a7ddrphy_dq_o_nodelay8), + .T (main_a7ddrphy_dq_t8), + .IO(ddram_dq[8]), + .O (main_a7ddrphy_dq_i_nodelay8) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_38 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[9]), + .D2(main_a7ddrphy_dfi_p0_wrdata[25]), + .D3(main_a7ddrphy_dfi_p1_wrdata[9]), + .D4(main_a7ddrphy_dfi_p1_wrdata[25]), + .D5(main_a7ddrphy_dfi_p2_wrdata[9]), + .D6(main_a7ddrphy_dfi_p2_wrdata[25]), + .D7(main_a7ddrphy_dfi_p3_wrdata[9]), + .D8(main_a7ddrphy_dfi_p3_wrdata[25]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay9), + .TQ(main_a7ddrphy_dq_t9) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_9 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed9), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data9[7]), + .Q2(main_a7ddrphy_dq_i_data9[6]), + .Q3(main_a7ddrphy_dq_i_data9[5]), + .Q4(main_a7ddrphy_dq_i_data9[4]), + .Q5(main_a7ddrphy_dq_i_data9[3]), + .Q6(main_a7ddrphy_dq_i_data9[2]), + .Q7(main_a7ddrphy_dq_i_data9[1]), + .Q8(main_a7ddrphy_dq_i_data9[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_9 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay9), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed9) + ); + + IOBUF IOBUF_9 ( + .I (main_a7ddrphy_dq_o_nodelay9), + .T (main_a7ddrphy_dq_t9), + .IO(ddram_dq[9]), + .O (main_a7ddrphy_dq_i_nodelay9) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_39 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[10]), + .D2(main_a7ddrphy_dfi_p0_wrdata[26]), + .D3(main_a7ddrphy_dfi_p1_wrdata[10]), + .D4(main_a7ddrphy_dfi_p1_wrdata[26]), + .D5(main_a7ddrphy_dfi_p2_wrdata[10]), + .D6(main_a7ddrphy_dfi_p2_wrdata[26]), + .D7(main_a7ddrphy_dfi_p3_wrdata[10]), + .D8(main_a7ddrphy_dfi_p3_wrdata[26]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay10), + .TQ(main_a7ddrphy_dq_t10) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_10 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed10), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data10[7]), + .Q2(main_a7ddrphy_dq_i_data10[6]), + .Q3(main_a7ddrphy_dq_i_data10[5]), + .Q4(main_a7ddrphy_dq_i_data10[4]), + .Q5(main_a7ddrphy_dq_i_data10[3]), + .Q6(main_a7ddrphy_dq_i_data10[2]), + .Q7(main_a7ddrphy_dq_i_data10[1]), + .Q8(main_a7ddrphy_dq_i_data10[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_10 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay10), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed10) + ); + + IOBUF IOBUF_10 ( + .I (main_a7ddrphy_dq_o_nodelay10), + .T (main_a7ddrphy_dq_t10), + .IO(ddram_dq[10]), + .O (main_a7ddrphy_dq_i_nodelay10) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_40 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[11]), + .D2(main_a7ddrphy_dfi_p0_wrdata[27]), + .D3(main_a7ddrphy_dfi_p1_wrdata[11]), + .D4(main_a7ddrphy_dfi_p1_wrdata[27]), + .D5(main_a7ddrphy_dfi_p2_wrdata[11]), + .D6(main_a7ddrphy_dfi_p2_wrdata[27]), + .D7(main_a7ddrphy_dfi_p3_wrdata[11]), + .D8(main_a7ddrphy_dfi_p3_wrdata[27]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay11), + .TQ(main_a7ddrphy_dq_t11) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_11 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed11), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data11[7]), + .Q2(main_a7ddrphy_dq_i_data11[6]), + .Q3(main_a7ddrphy_dq_i_data11[5]), + .Q4(main_a7ddrphy_dq_i_data11[4]), + .Q5(main_a7ddrphy_dq_i_data11[3]), + .Q6(main_a7ddrphy_dq_i_data11[2]), + .Q7(main_a7ddrphy_dq_i_data11[1]), + .Q8(main_a7ddrphy_dq_i_data11[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_11 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay11), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed11) + ); + + IOBUF IOBUF_11 ( + .I (main_a7ddrphy_dq_o_nodelay11), + .T (main_a7ddrphy_dq_t11), + .IO(ddram_dq[11]), + .O (main_a7ddrphy_dq_i_nodelay11) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_41 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[12]), + .D2(main_a7ddrphy_dfi_p0_wrdata[28]), + .D3(main_a7ddrphy_dfi_p1_wrdata[12]), + .D4(main_a7ddrphy_dfi_p1_wrdata[28]), + .D5(main_a7ddrphy_dfi_p2_wrdata[12]), + .D6(main_a7ddrphy_dfi_p2_wrdata[28]), + .D7(main_a7ddrphy_dfi_p3_wrdata[12]), + .D8(main_a7ddrphy_dfi_p3_wrdata[28]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay12), + .TQ(main_a7ddrphy_dq_t12) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_12 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed12), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data12[7]), + .Q2(main_a7ddrphy_dq_i_data12[6]), + .Q3(main_a7ddrphy_dq_i_data12[5]), + .Q4(main_a7ddrphy_dq_i_data12[4]), + .Q5(main_a7ddrphy_dq_i_data12[3]), + .Q6(main_a7ddrphy_dq_i_data12[2]), + .Q7(main_a7ddrphy_dq_i_data12[1]), + .Q8(main_a7ddrphy_dq_i_data12[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_12 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay12), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed12) + ); + + IOBUF IOBUF_12 ( + .I (main_a7ddrphy_dq_o_nodelay12), + .T (main_a7ddrphy_dq_t12), + .IO(ddram_dq[12]), + .O (main_a7ddrphy_dq_i_nodelay12) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_42 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[13]), + .D2(main_a7ddrphy_dfi_p0_wrdata[29]), + .D3(main_a7ddrphy_dfi_p1_wrdata[13]), + .D4(main_a7ddrphy_dfi_p1_wrdata[29]), + .D5(main_a7ddrphy_dfi_p2_wrdata[13]), + .D6(main_a7ddrphy_dfi_p2_wrdata[29]), + .D7(main_a7ddrphy_dfi_p3_wrdata[13]), + .D8(main_a7ddrphy_dfi_p3_wrdata[29]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay13), + .TQ(main_a7ddrphy_dq_t13) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_13 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed13), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data13[7]), + .Q2(main_a7ddrphy_dq_i_data13[6]), + .Q3(main_a7ddrphy_dq_i_data13[5]), + .Q4(main_a7ddrphy_dq_i_data13[4]), + .Q5(main_a7ddrphy_dq_i_data13[3]), + .Q6(main_a7ddrphy_dq_i_data13[2]), + .Q7(main_a7ddrphy_dq_i_data13[1]), + .Q8(main_a7ddrphy_dq_i_data13[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_13 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay13), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed13) + ); + + IOBUF IOBUF_13 ( + .I (main_a7ddrphy_dq_o_nodelay13), + .T (main_a7ddrphy_dq_t13), + .IO(ddram_dq[13]), + .O (main_a7ddrphy_dq_i_nodelay13) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_43 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[14]), + .D2(main_a7ddrphy_dfi_p0_wrdata[30]), + .D3(main_a7ddrphy_dfi_p1_wrdata[14]), + .D4(main_a7ddrphy_dfi_p1_wrdata[30]), + .D5(main_a7ddrphy_dfi_p2_wrdata[14]), + .D6(main_a7ddrphy_dfi_p2_wrdata[30]), + .D7(main_a7ddrphy_dfi_p3_wrdata[14]), + .D8(main_a7ddrphy_dfi_p3_wrdata[30]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay14), + .TQ(main_a7ddrphy_dq_t14) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_14 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed14), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data14[7]), + .Q2(main_a7ddrphy_dq_i_data14[6]), + .Q3(main_a7ddrphy_dq_i_data14[5]), + .Q4(main_a7ddrphy_dq_i_data14[4]), + .Q5(main_a7ddrphy_dq_i_data14[3]), + .Q6(main_a7ddrphy_dq_i_data14[2]), + .Q7(main_a7ddrphy_dq_i_data14[1]), + .Q8(main_a7ddrphy_dq_i_data14[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_14 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay14), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed14) + ); + + IOBUF IOBUF_14 ( + .I (main_a7ddrphy_dq_o_nodelay14), + .T (main_a7ddrphy_dq_t14), + .IO(ddram_dq[14]), + .O (main_a7ddrphy_dq_i_nodelay14) + ); + + OSERDESE2 #( + .DATA_RATE_OQ("DDR"), + .DATA_RATE_TQ("BUF"), + .DATA_WIDTH(4'd8), + .SERDES_MODE("MASTER"), + .TRISTATE_WIDTH(1'd1) + ) OSERDESE2_44 ( + .CLK(sys4x_clk), + .CLKDIV(sys_clk), + .D1(main_a7ddrphy_dfi_p0_wrdata[15]), + .D2(main_a7ddrphy_dfi_p0_wrdata[31]), + .D3(main_a7ddrphy_dfi_p1_wrdata[15]), + .D4(main_a7ddrphy_dfi_p1_wrdata[31]), + .D5(main_a7ddrphy_dfi_p2_wrdata[15]), + .D6(main_a7ddrphy_dfi_p2_wrdata[31]), + .D7(main_a7ddrphy_dfi_p3_wrdata[15]), + .D8(main_a7ddrphy_dfi_p3_wrdata[31]), + .OCE(1'd1), + .RST(sys_rst), + .T1((~main_a7ddrphy_oe_dq)), + .TCE(1'd1), + .OQ(main_a7ddrphy_dq_o_nodelay15), + .TQ(main_a7ddrphy_dq_t15) + ); + + ISERDESE2 #( + .DATA_RATE("DDR"), + .DATA_WIDTH(4'd8), + .INTERFACE_TYPE("NETWORKING"), + .IOBDELAY("IFD"), + .NUM_CE(1'd1), + .SERDES_MODE("MASTER") + ) ISERDESE2_15 ( + .BITSLIP(1'd0), + .CE1(1'd1), + .CLK(sys4x_clk), + .CLKB(sys4x_clk), + .CLKDIV(sys_clk), + .DDLY(main_a7ddrphy_dq_i_delayed15), + .RST(sys_rst), + .Q1(main_a7ddrphy_dq_i_data15[7]), + .Q2(main_a7ddrphy_dq_i_data15[6]), + .Q3(main_a7ddrphy_dq_i_data15[5]), + .Q4(main_a7ddrphy_dq_i_data15[4]), + .Q5(main_a7ddrphy_dq_i_data15[3]), + .Q6(main_a7ddrphy_dq_i_data15[2]), + .Q7(main_a7ddrphy_dq_i_data15[1]), + .Q8(main_a7ddrphy_dq_i_data15[0]) + ); + + IDELAYE2 #( + .CINVCTRL_SEL("FALSE"), + .DELAY_SRC("IDATAIN"), + .HIGH_PERFORMANCE_MODE("TRUE"), + .IDELAY_TYPE("VARIABLE"), + .IDELAY_VALUE(1'd0), + .PIPE_SEL("FALSE"), + .REFCLK_FREQUENCY(200.0), + .SIGNAL_PATTERN("DATA") + ) IDELAYE2_15 ( + .C(sys_clk), + .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), + .IDATAIN(main_a7ddrphy_dq_i_nodelay15), + .INC(1'd1), + .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), + .LDPIPEEN(1'd0), + .DATAOUT(main_a7ddrphy_dq_i_delayed15) + ); + + IOBUF IOBUF_15 ( + .I (main_a7ddrphy_dq_o_nodelay15), + .T (main_a7ddrphy_dq_t15), + .IO(ddram_dq[15]), + .O (main_a7ddrphy_dq_i_nodelay15) + ); + + reg [23:0] storage_2[0:7]; + reg [23:0] memdat_5; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we) + storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; + memdat_5 <= storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r = memdat_5; + assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r = storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_3[0:7]; + reg [23:0] memdat_6; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we) + storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; + memdat_6 <= storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r = memdat_6; + assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r = storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_4[0:7]; + reg [23:0] memdat_7; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we) + storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; + memdat_7 <= storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r = memdat_7; + assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r = storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_5[0:7]; + reg [23:0] memdat_8; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we) + storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; + memdat_8 <= storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r = memdat_8; + assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r = storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_6[0:7]; + reg [23:0] memdat_9; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we) + storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; + memdat_9 <= storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r = memdat_9; + assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r = storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_7 [0:7]; + reg [23:0] memdat_10; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we) + storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; + memdat_10 <= storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r = memdat_10; + assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r = storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_8 [0:7]; + reg [23:0] memdat_11; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we) + storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; + memdat_11 <= storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r = memdat_11; + assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r = storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] storage_9 [0:7]; + reg [23:0] memdat_12; + always @(posedge sys_clk) begin + if (main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we) + storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; + memdat_12 <= storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr]; + end + + always @(posedge sys_clk) begin + end + + assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r = memdat_12; + assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r = storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr]; + + reg [23:0] tag_mem [0:511]; + reg [ 8:0] memadr_1; + always @(posedge sys_clk) begin + if (main_tag_port_we) tag_mem[main_tag_port_adr] <= main_tag_port_dat_w; + memadr_1 <= main_tag_port_adr; + end + + assign main_tag_port_dat_r = tag_mem[memadr_1]; + + VexRiscv VexRiscv ( + .clk(sys_clk), + .dBusWishbone_ACK(main_minsoc_cpu_dbus_ack), + .dBusWishbone_DAT_MISO(main_minsoc_cpu_dbus_dat_r), + .dBusWishbone_ERR(main_minsoc_cpu_dbus_err), + .externalInterruptArray(main_minsoc_cpu_interrupt), + .externalResetVector(main_minsoc_vexriscv), + .iBusWishbone_ACK(main_minsoc_cpu_ibus_ack), + .iBusWishbone_DAT_MISO(main_minsoc_cpu_ibus_dat_r), + .iBusWishbone_ERR(main_minsoc_cpu_ibus_err), + .reset((sys_rst | main_minsoc_cpu_reset)), + .softwareInterrupt(1'd0), + .timerInterrupt(1'd0), + .dBusWishbone_ADR(main_minsoc_cpu_dbus_adr), + .dBusWishbone_BTE(main_minsoc_cpu_dbus_bte), + .dBusWishbone_CTI(main_minsoc_cpu_dbus_cti), + .dBusWishbone_CYC(main_minsoc_cpu_dbus_cyc), + .dBusWishbone_DAT_MOSI(main_minsoc_cpu_dbus_dat_w), + .dBusWishbone_SEL(main_minsoc_cpu_dbus_sel), + .dBusWishbone_STB(main_minsoc_cpu_dbus_stb), + .dBusWishbone_WE(main_minsoc_cpu_dbus_we), + .iBusWishbone_ADR(main_minsoc_cpu_ibus_adr), + .iBusWishbone_BTE(main_minsoc_cpu_ibus_bte), + .iBusWishbone_CTI(main_minsoc_cpu_ibus_cti), + .iBusWishbone_CYC(main_minsoc_cpu_ibus_cyc), + .iBusWishbone_DAT_MOSI(main_minsoc_cpu_ibus_dat_w), + .iBusWishbone_SEL(main_minsoc_cpu_ibus_sel), + .iBusWishbone_STB(main_minsoc_cpu_ibus_stb), + .iBusWishbone_WE(main_minsoc_cpu_ibus_we) + ); + + PLLE2_ADV #( + .CLKFBOUT_MULT(4'd12), + .CLKIN1_PERIOD(10.0), + .CLKOUT0_DIVIDE(5'd20), + .CLKOUT0_PHASE(1'd0), + .CLKOUT1_DIVIDE(3'd5), + .CLKOUT1_PHASE(1'd0), + .CLKOUT2_DIVIDE(3'd5), + .CLKOUT2_PHASE(90000), + .CLKOUT3_DIVIDE(3'd6), + .CLKOUT3_PHASE(1'd0), + .DIVCLK_DIVIDE(1'd1), + .REF_JITTER1(0.01), + .STARTUP_WAIT("FALSE") + ) PLLE2_ADV ( + .CLKFBIN(builder_pll_fb), + .CLKIN1(main_pll_clkin), + .RST(main_reset), + .CLKFBOUT(builder_pll_fb), + .CLKOUT0(main_clkout0), + .CLKOUT1(main_clkout1), + .CLKOUT2(main_clkout2), + .CLKOUT3(main_clkout3), + .LOCKED(main_locked) + ); + + reg [7:0] data_mem_grain0[0:511]; + reg [8:0] memadr_2; + always @(posedge sys_clk) begin + if (main_data_port_we[0]) data_mem_grain0[main_data_port_adr] <= main_data_port_dat_w[7:0]; + memadr_2 <= main_data_port_adr; + end + + assign main_data_port_dat_r[7:0] = data_mem_grain0[memadr_2]; + + reg [7:0] data_mem_grain1[0:511]; + reg [8:0] memadr_3; + always @(posedge sys_clk) begin + if (main_data_port_we[1]) data_mem_grain1[main_data_port_adr] <= main_data_port_dat_w[15:8]; + memadr_3 <= main_data_port_adr; + end + + assign main_data_port_dat_r[15:8] = data_mem_grain1[memadr_3]; + + reg [7:0] data_mem_grain2[0:511]; + reg [8:0] memadr_4; + always @(posedge sys_clk) begin + if (main_data_port_we[2]) data_mem_grain2[main_data_port_adr] <= main_data_port_dat_w[23:16]; + memadr_4 <= main_data_port_adr; + end + + assign main_data_port_dat_r[23:16] = data_mem_grain2[memadr_4]; + + reg [7:0] data_mem_grain3[0:511]; + reg [8:0] memadr_5; + always @(posedge sys_clk) begin + if (main_data_port_we[3]) data_mem_grain3[main_data_port_adr] <= main_data_port_dat_w[31:24]; + memadr_5 <= main_data_port_adr; + end + + assign main_data_port_dat_r[31:24] = data_mem_grain3[memadr_5]; + + reg [7:0] data_mem_grain4[0:511]; + reg [8:0] memadr_6; + always @(posedge sys_clk) begin + if (main_data_port_we[4]) data_mem_grain4[main_data_port_adr] <= main_data_port_dat_w[39:32]; + memadr_6 <= main_data_port_adr; + end + + assign main_data_port_dat_r[39:32] = data_mem_grain4[memadr_6]; + + reg [7:0] data_mem_grain5[0:511]; + reg [8:0] memadr_7; + always @(posedge sys_clk) begin + if (main_data_port_we[5]) data_mem_grain5[main_data_port_adr] <= main_data_port_dat_w[47:40]; + memadr_7 <= main_data_port_adr; + end + + assign main_data_port_dat_r[47:40] = data_mem_grain5[memadr_7]; + + reg [7:0] data_mem_grain6[0:511]; + reg [8:0] memadr_8; + always @(posedge sys_clk) begin + if (main_data_port_we[6]) data_mem_grain6[main_data_port_adr] <= main_data_port_dat_w[55:48]; + memadr_8 <= main_data_port_adr; + end + + assign main_data_port_dat_r[55:48] = data_mem_grain6[memadr_8]; + + reg [7:0] data_mem_grain7[0:511]; + reg [8:0] memadr_9; + always @(posedge sys_clk) begin + if (main_data_port_we[7]) data_mem_grain7[main_data_port_adr] <= main_data_port_dat_w[63:56]; + memadr_9 <= main_data_port_adr; + end + + assign main_data_port_dat_r[63:56] = data_mem_grain7[memadr_9]; + + reg [7:0] data_mem_grain8[0:511]; + reg [8:0] memadr_10; + always @(posedge sys_clk) begin + if (main_data_port_we[8]) data_mem_grain8[main_data_port_adr] <= main_data_port_dat_w[71:64]; + memadr_10 <= main_data_port_adr; + end + + assign main_data_port_dat_r[71:64] = data_mem_grain8[memadr_10]; + + reg [7:0] data_mem_grain9[0:511]; + reg [8:0] memadr_11; + always @(posedge sys_clk) begin + if (main_data_port_we[9]) data_mem_grain9[main_data_port_adr] <= main_data_port_dat_w[79:72]; + memadr_11 <= main_data_port_adr; + end + + assign main_data_port_dat_r[79:72] = data_mem_grain9[memadr_11]; + + reg [7:0] data_mem_grain10[0:511]; + reg [8:0] memadr_12; + always @(posedge sys_clk) begin + if (main_data_port_we[10]) data_mem_grain10[main_data_port_adr] <= main_data_port_dat_w[87:80]; + memadr_12 <= main_data_port_adr; + end + + assign main_data_port_dat_r[87:80] = data_mem_grain10[memadr_12]; + + reg [7:0] data_mem_grain11[0:511]; + reg [8:0] memadr_13; + always @(posedge sys_clk) begin + if (main_data_port_we[11]) data_mem_grain11[main_data_port_adr] <= main_data_port_dat_w[95:88]; + memadr_13 <= main_data_port_adr; + end + + assign main_data_port_dat_r[95:88] = data_mem_grain11[memadr_13]; + + reg [7:0] data_mem_grain12[0:511]; + reg [8:0] memadr_14; + always @(posedge sys_clk) begin + if (main_data_port_we[12]) data_mem_grain12[main_data_port_adr] <= main_data_port_dat_w[103:96]; + memadr_14 <= main_data_port_adr; + end + + assign main_data_port_dat_r[103:96] = data_mem_grain12[memadr_14]; + + reg [7:0] data_mem_grain13[0:511]; + reg [8:0] memadr_15; + always @(posedge sys_clk) begin + if (main_data_port_we[13]) + data_mem_grain13[main_data_port_adr] <= main_data_port_dat_w[111:104]; + memadr_15 <= main_data_port_adr; + end + + assign main_data_port_dat_r[111:104] = data_mem_grain13[memadr_15]; + + reg [7:0] data_mem_grain14[0:511]; + reg [8:0] memadr_16; + always @(posedge sys_clk) begin + if (main_data_port_we[14]) + data_mem_grain14[main_data_port_adr] <= main_data_port_dat_w[119:112]; + memadr_16 <= main_data_port_adr; + end + + assign main_data_port_dat_r[119:112] = data_mem_grain14[memadr_16]; + + reg [7:0] data_mem_grain15[0:511]; + reg [8:0] memadr_17; + always @(posedge sys_clk) begin + if (main_data_port_we[15]) + data_mem_grain15[main_data_port_adr] <= main_data_port_dat_w[127:120]; + memadr_17 <= main_data_port_adr; + end + + assign main_data_port_dat_r[127:120] = data_mem_grain15[memadr_17]; + + (* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE ( + .C (sys_clk), + .CE (1'd1), + .D (1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl0), + .Q (builder_xilinxasyncresetsynchronizerimpl0_rst_meta) + ); + + (* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_1 ( + .C (sys_clk), + .CE (1'd1), + .D (builder_xilinxasyncresetsynchronizerimpl0_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl0), + .Q (sys_rst) + ); + + (* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_2 ( + .C (sys4x_clk), + .CE (1'd1), + .D (1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl1), + .Q (builder_xilinxasyncresetsynchronizerimpl1_rst_meta) + ); + + (* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_3 ( + .C (sys4x_clk), + .CE (1'd1), + .D (builder_xilinxasyncresetsynchronizerimpl1_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl1), + .Q (builder_xilinxasyncresetsynchronizerimpl1_expr) + ); + + (* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_4 ( + .C (sys4x_dqs_clk), + .CE (1'd1), + .D (1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl2), + .Q (builder_xilinxasyncresetsynchronizerimpl2_rst_meta) + ); + + (* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_5 ( + .C (sys4x_dqs_clk), + .CE (1'd1), + .D (builder_xilinxasyncresetsynchronizerimpl2_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl2), + .Q (builder_xilinxasyncresetsynchronizerimpl2_expr) + ); + + (* ars_ff1 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_6 ( + .C (clk200_clk), + .CE (1'd1), + .D (1'd0), + .PRE(builder_xilinxasyncresetsynchronizerimpl3), + .Q (builder_xilinxasyncresetsynchronizerimpl3_rst_meta) + ); + + (* ars_ff2 = "true", async_reg = "true" *) FDPE #( + .INIT(1'd1) + ) FDPE_7 ( + .C (clk200_clk), + .CE (1'd1), + .D (builder_xilinxasyncresetsynchronizerimpl3_rst_meta), + .PRE(builder_xilinxasyncresetsynchronizerimpl3), + .Q (clk200_rst) + ); + +endmodule diff --git a/xdc-plugin/BANK.v b/xdc-plugin/BANK.v index 6a6f27d99..c3a617f2e 100644 --- a/xdc-plugin/BANK.v +++ b/xdc-plugin/BANK.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module BANK(); parameter FASM_EXTRA = "INTERNAL_VREF"; parameter NUMBER = 0; diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index 0ca7ba354..9ed545264 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + NAME = xdc SOURCES = xdc.cc include ../Makefile_plugin.common diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index 0f86e2f8a..363cbfe77 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + # counter - basic test for IOSTANDARD, SLEW, DRIVE, IN_TERM properties # counter-dict - basic test using XDC -dict for IOSTANDARD, SLEW, DRIVE, IN_TERM properties # port_indexes - like counter but bus port indices are passes without curly braces diff --git a/xdc-plugin/tests/compare_output_json.py b/xdc-plugin/tests/compare_output_json.py index f48d966b9..12ff11194 100644 --- a/xdc-plugin/tests/compare_output_json.py +++ b/xdc-plugin/tests/compare_output_json.py @@ -1,4 +1,14 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + """ This script extracts the top module cells and their corresponding parameters diff --git a/xdc-plugin/tests/counter-dict/counter-dict.v b/xdc-plugin/tests/counter-dict/counter-dict.v index 2ec231bb2..1b1565f6b 100644 --- a/xdc-plugin/tests/counter-dict/counter-dict.v +++ b/xdc-plugin/tests/counter-dict/counter-dict.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, output [3:0] led, diff --git a/xdc-plugin/tests/counter/counter.v b/xdc-plugin/tests/counter/counter.v index 2ec231bb2..1b1565f6b 100644 --- a/xdc-plugin/tests/counter/counter.v +++ b/xdc-plugin/tests/counter/counter.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, output [3:0] led, diff --git a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v index 68a6f8770..503ed072b 100644 --- a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v +++ b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module GTPE2_CHANNEL ( (* iopad_external_pin *) output GTPTXN, diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v index 9ece605c0..62fc7a942 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, output [3:0] led, diff --git a/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v b/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v deleted file mode 100644 index 2dc7b989c..000000000 --- a/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v +++ /dev/null @@ -1,4819 +0,0 @@ -// Generator : SpinalHDL v1.3.6 git head : 9bf01e7f360e003fac1dd5ca8b8f4bffec0e52b8 -// Date : 16/06/2019, 23:18:37 -// Component : VexRiscv - - -`define AluCtrlEnum_defaultEncoding_type [1:0] -`define AluCtrlEnum_defaultEncoding_ADD_SUB 2'b00 -`define AluCtrlEnum_defaultEncoding_SLT_SLTU 2'b01 -`define AluCtrlEnum_defaultEncoding_BITWISE 2'b10 - -`define AluBitwiseCtrlEnum_defaultEncoding_type [1:0] -`define AluBitwiseCtrlEnum_defaultEncoding_XOR_1 2'b00 -`define AluBitwiseCtrlEnum_defaultEncoding_OR_1 2'b01 -`define AluBitwiseCtrlEnum_defaultEncoding_AND_1 2'b10 - -`define Src2CtrlEnum_defaultEncoding_type [1:0] -`define Src2CtrlEnum_defaultEncoding_RS 2'b00 -`define Src2CtrlEnum_defaultEncoding_IMI 2'b01 -`define Src2CtrlEnum_defaultEncoding_IMS 2'b10 -`define Src2CtrlEnum_defaultEncoding_PC 2'b11 - -`define BranchCtrlEnum_defaultEncoding_type [1:0] -`define BranchCtrlEnum_defaultEncoding_INC 2'b00 -`define BranchCtrlEnum_defaultEncoding_B 2'b01 -`define BranchCtrlEnum_defaultEncoding_JAL 2'b10 -`define BranchCtrlEnum_defaultEncoding_JALR 2'b11 - -`define Src1CtrlEnum_defaultEncoding_type [1:0] -`define Src1CtrlEnum_defaultEncoding_RS 2'b00 -`define Src1CtrlEnum_defaultEncoding_IMU 2'b01 -`define Src1CtrlEnum_defaultEncoding_PC_INCREMENT 2'b10 -`define Src1CtrlEnum_defaultEncoding_URS1 2'b11 - -`define EnvCtrlEnum_defaultEncoding_type [0:0] -`define EnvCtrlEnum_defaultEncoding_NONE 1'b0 -`define EnvCtrlEnum_defaultEncoding_XRET 1'b1 - -`define ShiftCtrlEnum_defaultEncoding_type [1:0] -`define ShiftCtrlEnum_defaultEncoding_DISABLE_1 2'b00 -`define ShiftCtrlEnum_defaultEncoding_SLL_1 2'b01 -`define ShiftCtrlEnum_defaultEncoding_SRL_1 2'b10 -`define ShiftCtrlEnum_defaultEncoding_SRA_1 2'b11 - -module InstructionCache ( - input io_flush, - input io_cpu_prefetch_isValid, - output reg io_cpu_prefetch_haltIt, - input [31:0] io_cpu_prefetch_pc, - input io_cpu_fetch_isValid, - input io_cpu_fetch_isStuck, - input io_cpu_fetch_isRemoved, - input [31:0] io_cpu_fetch_pc, - output [31:0] io_cpu_fetch_data, - input io_cpu_fetch_dataBypassValid, - input [31:0] io_cpu_fetch_dataBypass, - output io_cpu_fetch_mmuBus_cmd_isValid, - output [31:0] io_cpu_fetch_mmuBus_cmd_virtualAddress, - output io_cpu_fetch_mmuBus_cmd_bypassTranslation, - input [31:0] io_cpu_fetch_mmuBus_rsp_physicalAddress, - input io_cpu_fetch_mmuBus_rsp_isIoAccess, - input io_cpu_fetch_mmuBus_rsp_allowRead, - input io_cpu_fetch_mmuBus_rsp_allowWrite, - input io_cpu_fetch_mmuBus_rsp_allowExecute, - input io_cpu_fetch_mmuBus_rsp_exception, - input io_cpu_fetch_mmuBus_rsp_refilling, - output io_cpu_fetch_mmuBus_end, - input io_cpu_fetch_mmuBus_busy, - output [31:0] io_cpu_fetch_physicalAddress, - output io_cpu_fetch_haltIt, - input io_cpu_decode_isValid, - input io_cpu_decode_isStuck, - input [31:0] io_cpu_decode_pc, - output [31:0] io_cpu_decode_physicalAddress, - output [31:0] io_cpu_decode_data, - output io_cpu_decode_cacheMiss, - output io_cpu_decode_error, - output io_cpu_decode_mmuRefilling, - output io_cpu_decode_mmuException, - input io_cpu_decode_isUser, - input io_cpu_fill_valid, - input [31:0] io_cpu_fill_payload, - output io_mem_cmd_valid, - input io_mem_cmd_ready, - output [31:0] io_mem_cmd_payload_address, - output [2:0] io_mem_cmd_payload_size, - input io_mem_rsp_valid, - input [31:0] io_mem_rsp_payload_data, - input io_mem_rsp_payload_error, - input clk, - input reset); - reg [22:0] _zz_10_; - reg [31:0] _zz_11_; - wire _zz_12_; - wire _zz_13_; - wire [0:0] _zz_14_; - wire [0:0] _zz_15_; - wire [22:0] _zz_16_; - reg _zz_1_; - reg _zz_2_; - reg lineLoader_fire; - reg lineLoader_valid; - reg [31:0] lineLoader_address; - reg lineLoader_hadError; - reg lineLoader_flushPending; - reg [6:0] lineLoader_flushCounter; - reg _zz_3_; - reg lineLoader_cmdSent; - reg lineLoader_wayToAllocate_willIncrement; - wire lineLoader_wayToAllocate_willClear; - wire lineLoader_wayToAllocate_willOverflowIfInc; - wire lineLoader_wayToAllocate_willOverflow; - reg [2:0] lineLoader_wordIndex; - wire lineLoader_write_tag_0_valid; - wire [5:0] lineLoader_write_tag_0_payload_address; - wire lineLoader_write_tag_0_payload_data_valid; - wire lineLoader_write_tag_0_payload_data_error; - wire [20:0] lineLoader_write_tag_0_payload_data_address; - wire lineLoader_write_data_0_valid; - wire [8:0] lineLoader_write_data_0_payload_address; - wire [31:0] lineLoader_write_data_0_payload_data; - wire _zz_4_; - wire [5:0] _zz_5_; - wire _zz_6_; - wire fetchStage_read_waysValues_0_tag_valid; - wire fetchStage_read_waysValues_0_tag_error; - wire [20:0] fetchStage_read_waysValues_0_tag_address; - wire [22:0] _zz_7_; - wire [8:0] _zz_8_; - wire _zz_9_; - wire [31:0] fetchStage_read_waysValues_0_data; - wire fetchStage_hit_hits_0; - wire fetchStage_hit_valid; - wire fetchStage_hit_error; - wire [31:0] fetchStage_hit_data; - wire [31:0] fetchStage_hit_word; - reg [31:0] io_cpu_fetch_data_regNextWhen; - reg [31:0] decodeStage_mmuRsp_physicalAddress; - reg decodeStage_mmuRsp_isIoAccess; - reg decodeStage_mmuRsp_allowRead; - reg decodeStage_mmuRsp_allowWrite; - reg decodeStage_mmuRsp_allowExecute; - reg decodeStage_mmuRsp_exception; - reg decodeStage_mmuRsp_refilling; - reg decodeStage_hit_valid; - reg decodeStage_hit_error; - (* ram_style = "block" *) reg [22:0] ways_0_tags [0:63]; - (* ram_style = "block" *) reg [31:0] ways_0_datas [0:511]; - assign _zz_12_ = (! lineLoader_flushCounter[6]); - assign _zz_13_ = (lineLoader_flushPending && (! (lineLoader_valid || io_cpu_fetch_isValid))); - assign _zz_14_ = _zz_7_[0 : 0]; - assign _zz_15_ = _zz_7_[1 : 1]; - assign _zz_16_ = {lineLoader_write_tag_0_payload_data_address,{lineLoader_write_tag_0_payload_data_error,lineLoader_write_tag_0_payload_data_valid}}; - always @ (posedge clk) begin - if(_zz_2_) begin - ways_0_tags[lineLoader_write_tag_0_payload_address] <= _zz_16_; - end - end - - always @ (posedge clk) begin - if(_zz_6_) begin - _zz_10_ <= ways_0_tags[_zz_5_]; - end - end - - always @ (posedge clk) begin - if(_zz_1_) begin - ways_0_datas[lineLoader_write_data_0_payload_address] <= lineLoader_write_data_0_payload_data; - end - end - - always @ (posedge clk) begin - if(_zz_9_) begin - _zz_11_ <= ways_0_datas[_zz_8_]; - end - end - - always @ (*) begin - _zz_1_ = 1'b0; - if(lineLoader_write_data_0_valid)begin - _zz_1_ = 1'b1; - end - end - - always @ (*) begin - _zz_2_ = 1'b0; - if(lineLoader_write_tag_0_valid)begin - _zz_2_ = 1'b1; - end - end - - assign io_cpu_fetch_haltIt = io_cpu_fetch_mmuBus_busy; - always @ (*) begin - lineLoader_fire = 1'b0; - if(io_mem_rsp_valid)begin - if((lineLoader_wordIndex == (3'b111)))begin - lineLoader_fire = 1'b1; - end - end - end - - always @ (*) begin - io_cpu_prefetch_haltIt = (lineLoader_valid || lineLoader_flushPending); - if(_zz_12_)begin - io_cpu_prefetch_haltIt = 1'b1; - end - if((! _zz_3_))begin - io_cpu_prefetch_haltIt = 1'b1; - end - if(io_flush)begin - io_cpu_prefetch_haltIt = 1'b1; - end - end - - assign io_mem_cmd_valid = (lineLoader_valid && (! lineLoader_cmdSent)); - assign io_mem_cmd_payload_address = {lineLoader_address[31 : 5],(5'b00000)}; - assign io_mem_cmd_payload_size = (3'b101); - always @ (*) begin - lineLoader_wayToAllocate_willIncrement = 1'b0; - if((! lineLoader_valid))begin - lineLoader_wayToAllocate_willIncrement = 1'b1; - end - end - - assign lineLoader_wayToAllocate_willClear = 1'b0; - assign lineLoader_wayToAllocate_willOverflowIfInc = 1'b1; - assign lineLoader_wayToAllocate_willOverflow = (lineLoader_wayToAllocate_willOverflowIfInc && lineLoader_wayToAllocate_willIncrement); - assign _zz_4_ = 1'b1; - assign lineLoader_write_tag_0_valid = ((_zz_4_ && lineLoader_fire) || (! lineLoader_flushCounter[6])); - assign lineLoader_write_tag_0_payload_address = (lineLoader_flushCounter[6] ? lineLoader_address[10 : 5] : lineLoader_flushCounter[5 : 0]); - assign lineLoader_write_tag_0_payload_data_valid = lineLoader_flushCounter[6]; - assign lineLoader_write_tag_0_payload_data_error = (lineLoader_hadError || io_mem_rsp_payload_error); - assign lineLoader_write_tag_0_payload_data_address = lineLoader_address[31 : 11]; - assign lineLoader_write_data_0_valid = (io_mem_rsp_valid && _zz_4_); - assign lineLoader_write_data_0_payload_address = {lineLoader_address[10 : 5],lineLoader_wordIndex}; - assign lineLoader_write_data_0_payload_data = io_mem_rsp_payload_data; - assign _zz_5_ = io_cpu_prefetch_pc[10 : 5]; - assign _zz_6_ = (! io_cpu_fetch_isStuck); - assign _zz_7_ = _zz_10_; - assign fetchStage_read_waysValues_0_tag_valid = _zz_14_[0]; - assign fetchStage_read_waysValues_0_tag_error = _zz_15_[0]; - assign fetchStage_read_waysValues_0_tag_address = _zz_7_[22 : 2]; - assign _zz_8_ = io_cpu_prefetch_pc[10 : 2]; - assign _zz_9_ = (! io_cpu_fetch_isStuck); - assign fetchStage_read_waysValues_0_data = _zz_11_; - assign fetchStage_hit_hits_0 = (fetchStage_read_waysValues_0_tag_valid && (fetchStage_read_waysValues_0_tag_address == io_cpu_fetch_mmuBus_rsp_physicalAddress[31 : 11])); - assign fetchStage_hit_valid = (fetchStage_hit_hits_0 != (1'b0)); - assign fetchStage_hit_error = fetchStage_read_waysValues_0_tag_error; - assign fetchStage_hit_data = fetchStage_read_waysValues_0_data; - assign fetchStage_hit_word = fetchStage_hit_data[31 : 0]; - assign io_cpu_fetch_data = (io_cpu_fetch_dataBypassValid ? io_cpu_fetch_dataBypass : fetchStage_hit_word); - assign io_cpu_decode_data = io_cpu_fetch_data_regNextWhen; - assign io_cpu_fetch_mmuBus_cmd_isValid = io_cpu_fetch_isValid; - assign io_cpu_fetch_mmuBus_cmd_virtualAddress = io_cpu_fetch_pc; - assign io_cpu_fetch_mmuBus_cmd_bypassTranslation = 1'b0; - assign io_cpu_fetch_mmuBus_end = ((! io_cpu_fetch_isStuck) || io_cpu_fetch_isRemoved); - assign io_cpu_fetch_physicalAddress = io_cpu_fetch_mmuBus_rsp_physicalAddress; - assign io_cpu_decode_cacheMiss = (! decodeStage_hit_valid); - assign io_cpu_decode_error = decodeStage_hit_error; - assign io_cpu_decode_mmuRefilling = decodeStage_mmuRsp_refilling; - assign io_cpu_decode_mmuException = ((! decodeStage_mmuRsp_refilling) && (decodeStage_mmuRsp_exception || (! decodeStage_mmuRsp_allowExecute))); - assign io_cpu_decode_physicalAddress = decodeStage_mmuRsp_physicalAddress; - always @ (posedge clk) begin - if(reset) begin - lineLoader_valid <= 1'b0; - lineLoader_hadError <= 1'b0; - lineLoader_flushPending <= 1'b1; - lineLoader_cmdSent <= 1'b0; - lineLoader_wordIndex <= (3'b000); - end else begin - if(lineLoader_fire)begin - lineLoader_valid <= 1'b0; - end - if(lineLoader_fire)begin - lineLoader_hadError <= 1'b0; - end - if(io_cpu_fill_valid)begin - lineLoader_valid <= 1'b1; - end - if(io_flush)begin - lineLoader_flushPending <= 1'b1; - end - if(_zz_13_)begin - lineLoader_flushPending <= 1'b0; - end - if((io_mem_cmd_valid && io_mem_cmd_ready))begin - lineLoader_cmdSent <= 1'b1; - end - if(lineLoader_fire)begin - lineLoader_cmdSent <= 1'b0; - end - if(io_mem_rsp_valid)begin - lineLoader_wordIndex <= (lineLoader_wordIndex + (3'b001)); - if(io_mem_rsp_payload_error)begin - lineLoader_hadError <= 1'b1; - end - end - end - end - - always @ (posedge clk) begin - if(io_cpu_fill_valid)begin - lineLoader_address <= io_cpu_fill_payload; - end - if(_zz_12_)begin - lineLoader_flushCounter <= (lineLoader_flushCounter + (7'b0000001)); - end - _zz_3_ <= lineLoader_flushCounter[6]; - if(_zz_13_)begin - lineLoader_flushCounter <= (7'b0000000); - end - if((! io_cpu_decode_isStuck))begin - io_cpu_fetch_data_regNextWhen <= io_cpu_fetch_data; - end - if((! io_cpu_decode_isStuck))begin - decodeStage_mmuRsp_physicalAddress <= io_cpu_fetch_mmuBus_rsp_physicalAddress; - decodeStage_mmuRsp_isIoAccess <= io_cpu_fetch_mmuBus_rsp_isIoAccess; - decodeStage_mmuRsp_allowRead <= io_cpu_fetch_mmuBus_rsp_allowRead; - decodeStage_mmuRsp_allowWrite <= io_cpu_fetch_mmuBus_rsp_allowWrite; - decodeStage_mmuRsp_allowExecute <= io_cpu_fetch_mmuBus_rsp_allowExecute; - decodeStage_mmuRsp_exception <= io_cpu_fetch_mmuBus_rsp_exception; - decodeStage_mmuRsp_refilling <= io_cpu_fetch_mmuBus_rsp_refilling; - end - if((! io_cpu_decode_isStuck))begin - decodeStage_hit_valid <= fetchStage_hit_valid; - end - if((! io_cpu_decode_isStuck))begin - decodeStage_hit_error <= fetchStage_hit_error; - end - end - -endmodule - -module VexRiscv ( - input [31:0] externalResetVector, - input timerInterrupt, - input softwareInterrupt, - input [31:0] externalInterruptArray, - output reg iBusWishbone_CYC, - output reg iBusWishbone_STB, - input iBusWishbone_ACK, - output iBusWishbone_WE, - output [29:0] iBusWishbone_ADR, - input [31:0] iBusWishbone_DAT_MISO, - output [31:0] iBusWishbone_DAT_MOSI, - output [3:0] iBusWishbone_SEL, - input iBusWishbone_ERR, - output [1:0] iBusWishbone_BTE, - output [2:0] iBusWishbone_CTI, - output dBusWishbone_CYC, - output dBusWishbone_STB, - input dBusWishbone_ACK, - output dBusWishbone_WE, - output [29:0] dBusWishbone_ADR, - input [31:0] dBusWishbone_DAT_MISO, - output [31:0] dBusWishbone_DAT_MOSI, - output reg [3:0] dBusWishbone_SEL, - input dBusWishbone_ERR, - output [1:0] dBusWishbone_BTE, - output [2:0] dBusWishbone_CTI, - input clk, - input reset); - wire _zz_205_; - wire _zz_206_; - wire _zz_207_; - wire _zz_208_; - wire [31:0] _zz_209_; - wire _zz_210_; - wire _zz_211_; - wire _zz_212_; - reg _zz_213_; - reg [31:0] _zz_214_; - reg [31:0] _zz_215_; - reg [31:0] _zz_216_; - wire IBusCachedPlugin_cache_io_cpu_prefetch_haltIt; - wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_data; - wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress; - wire IBusCachedPlugin_cache_io_cpu_fetch_haltIt; - wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; - wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; - wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; - wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; - wire IBusCachedPlugin_cache_io_cpu_decode_error; - wire IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling; - wire IBusCachedPlugin_cache_io_cpu_decode_mmuException; - wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_data; - wire IBusCachedPlugin_cache_io_cpu_decode_cacheMiss; - wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_physicalAddress; - wire IBusCachedPlugin_cache_io_mem_cmd_valid; - wire [31:0] IBusCachedPlugin_cache_io_mem_cmd_payload_address; - wire [2:0] IBusCachedPlugin_cache_io_mem_cmd_payload_size; - wire _zz_217_; - wire _zz_218_; - wire _zz_219_; - wire _zz_220_; - wire _zz_221_; - wire _zz_222_; - wire _zz_223_; - wire _zz_224_; - wire _zz_225_; - wire _zz_226_; - wire _zz_227_; - wire _zz_228_; - wire _zz_229_; - wire _zz_230_; - wire _zz_231_; - wire _zz_232_; - wire _zz_233_; - wire _zz_234_; - wire _zz_235_; - wire [1:0] _zz_236_; - wire _zz_237_; - wire _zz_238_; - wire _zz_239_; - wire _zz_240_; - wire _zz_241_; - wire _zz_242_; - wire _zz_243_; - wire _zz_244_; - wire _zz_245_; - wire _zz_246_; - wire _zz_247_; - wire _zz_248_; - wire _zz_249_; - wire _zz_250_; - wire _zz_251_; - wire _zz_252_; - wire [1:0] _zz_253_; - wire _zz_254_; - wire [4:0] _zz_255_; - wire [2:0] _zz_256_; - wire [31:0] _zz_257_; - wire [11:0] _zz_258_; - wire [31:0] _zz_259_; - wire [19:0] _zz_260_; - wire [11:0] _zz_261_; - wire [31:0] _zz_262_; - wire [31:0] _zz_263_; - wire [19:0] _zz_264_; - wire [11:0] _zz_265_; - wire [2:0] _zz_266_; - wire [0:0] _zz_267_; - wire [0:0] _zz_268_; - wire [0:0] _zz_269_; - wire [0:0] _zz_270_; - wire [0:0] _zz_271_; - wire [0:0] _zz_272_; - wire [0:0] _zz_273_; - wire [0:0] _zz_274_; - wire [0:0] _zz_275_; - wire [0:0] _zz_276_; - wire [0:0] _zz_277_; - wire [0:0] _zz_278_; - wire [0:0] _zz_279_; - wire [0:0] _zz_280_; - wire [0:0] _zz_281_; - wire [0:0] _zz_282_; - wire [0:0] _zz_283_; - wire [2:0] _zz_284_; - wire [4:0] _zz_285_; - wire [11:0] _zz_286_; - wire [11:0] _zz_287_; - wire [31:0] _zz_288_; - wire [31:0] _zz_289_; - wire [31:0] _zz_290_; - wire [31:0] _zz_291_; - wire [31:0] _zz_292_; - wire [31:0] _zz_293_; - wire [31:0] _zz_294_; - wire [31:0] _zz_295_; - wire [32:0] _zz_296_; - wire [11:0] _zz_297_; - wire [19:0] _zz_298_; - wire [11:0] _zz_299_; - wire [31:0] _zz_300_; - wire [31:0] _zz_301_; - wire [31:0] _zz_302_; - wire [11:0] _zz_303_; - wire [19:0] _zz_304_; - wire [11:0] _zz_305_; - wire [2:0] _zz_306_; - wire [1:0] _zz_307_; - wire [1:0] _zz_308_; - wire [1:0] _zz_309_; - wire [1:0] _zz_310_; - wire [0:0] _zz_311_; - wire [5:0] _zz_312_; - wire [33:0] _zz_313_; - wire [32:0] _zz_314_; - wire [33:0] _zz_315_; - wire [32:0] _zz_316_; - wire [33:0] _zz_317_; - wire [32:0] _zz_318_; - wire [0:0] _zz_319_; - wire [5:0] _zz_320_; - wire [32:0] _zz_321_; - wire [32:0] _zz_322_; - wire [31:0] _zz_323_; - wire [31:0] _zz_324_; - wire [32:0] _zz_325_; - wire [32:0] _zz_326_; - wire [32:0] _zz_327_; - wire [0:0] _zz_328_; - wire [32:0] _zz_329_; - wire [0:0] _zz_330_; - wire [32:0] _zz_331_; - wire [0:0] _zz_332_; - wire [31:0] _zz_333_; - wire [0:0] _zz_334_; - wire [0:0] _zz_335_; - wire [0:0] _zz_336_; - wire [0:0] _zz_337_; - wire [0:0] _zz_338_; - wire [0:0] _zz_339_; - wire [26:0] _zz_340_; - wire [6:0] _zz_341_; - wire _zz_342_; - wire _zz_343_; - wire [2:0] _zz_344_; - wire _zz_345_; - wire _zz_346_; - wire _zz_347_; - wire _zz_348_; - wire [0:0] _zz_349_; - wire [0:0] _zz_350_; - wire [0:0] _zz_351_; - wire [0:0] _zz_352_; - wire _zz_353_; - wire [0:0] _zz_354_; - wire [23:0] _zz_355_; - wire [31:0] _zz_356_; - wire [31:0] _zz_357_; - wire _zz_358_; - wire [0:0] _zz_359_; - wire [0:0] _zz_360_; - wire [0:0] _zz_361_; - wire [0:0] _zz_362_; - wire [1:0] _zz_363_; - wire [1:0] _zz_364_; - wire _zz_365_; - wire [0:0] _zz_366_; - wire [20:0] _zz_367_; - wire [31:0] _zz_368_; - wire [31:0] _zz_369_; - wire [31:0] _zz_370_; - wire [31:0] _zz_371_; - wire _zz_372_; - wire [0:0] _zz_373_; - wire [1:0] _zz_374_; - wire [0:0] _zz_375_; - wire [0:0] _zz_376_; - wire _zz_377_; - wire [0:0] _zz_378_; - wire [17:0] _zz_379_; - wire [31:0] _zz_380_; - wire [31:0] _zz_381_; - wire [31:0] _zz_382_; - wire [31:0] _zz_383_; - wire [31:0] _zz_384_; - wire [31:0] _zz_385_; - wire [31:0] _zz_386_; - wire [31:0] _zz_387_; - wire [0:0] _zz_388_; - wire [0:0] _zz_389_; - wire [5:0] _zz_390_; - wire [5:0] _zz_391_; - wire _zz_392_; - wire [0:0] _zz_393_; - wire [14:0] _zz_394_; - wire [31:0] _zz_395_; - wire [31:0] _zz_396_; - wire _zz_397_; - wire [0:0] _zz_398_; - wire [2:0] _zz_399_; - wire _zz_400_; - wire _zz_401_; - wire [0:0] _zz_402_; - wire [2:0] _zz_403_; - wire [0:0] _zz_404_; - wire [0:0] _zz_405_; - wire _zz_406_; - wire [0:0] _zz_407_; - wire [11:0] _zz_408_; - wire [31:0] _zz_409_; - wire [31:0] _zz_410_; - wire [31:0] _zz_411_; - wire _zz_412_; - wire [0:0] _zz_413_; - wire [0:0] _zz_414_; - wire [31:0] _zz_415_; - wire [31:0] _zz_416_; - wire [31:0] _zz_417_; - wire [31:0] _zz_418_; - wire _zz_419_; - wire [0:0] _zz_420_; - wire [0:0] _zz_421_; - wire [31:0] _zz_422_; - wire [31:0] _zz_423_; - wire [0:0] _zz_424_; - wire [0:0] _zz_425_; - wire [0:0] _zz_426_; - wire [0:0] _zz_427_; - wire _zz_428_; - wire [0:0] _zz_429_; - wire [9:0] _zz_430_; - wire [31:0] _zz_431_; - wire [31:0] _zz_432_; - wire [31:0] _zz_433_; - wire [31:0] _zz_434_; - wire [31:0] _zz_435_; - wire [31:0] _zz_436_; - wire [31:0] _zz_437_; - wire [31:0] _zz_438_; - wire [31:0] _zz_439_; - wire [31:0] _zz_440_; - wire [31:0] _zz_441_; - wire [31:0] _zz_442_; - wire [31:0] _zz_443_; - wire [31:0] _zz_444_; - wire _zz_445_; - wire [0:0] _zz_446_; - wire [0:0] _zz_447_; - wire _zz_448_; - wire [0:0] _zz_449_; - wire [7:0] _zz_450_; - wire _zz_451_; - wire [0:0] _zz_452_; - wire [0:0] _zz_453_; - wire [0:0] _zz_454_; - wire [0:0] _zz_455_; - wire [0:0] _zz_456_; - wire [0:0] _zz_457_; - wire _zz_458_; - wire [0:0] _zz_459_; - wire [3:0] _zz_460_; - wire [31:0] _zz_461_; - wire [31:0] _zz_462_; - wire [31:0] _zz_463_; - wire [31:0] _zz_464_; - wire [31:0] _zz_465_; - wire _zz_466_; - wire _zz_467_; - wire [0:0] _zz_468_; - wire [1:0] _zz_469_; - wire [2:0] _zz_470_; - wire [2:0] _zz_471_; - wire _zz_472_; - wire [0:0] _zz_473_; - wire [0:0] _zz_474_; - wire [31:0] _zz_475_; - wire [31:0] _zz_476_; - wire [31:0] _zz_477_; - wire [31:0] _zz_478_; - wire [31:0] _zz_479_; - wire _zz_480_; - wire _zz_481_; - wire [31:0] _zz_482_; - wire [31:0] _zz_483_; - wire [0:0] _zz_484_; - wire [0:0] _zz_485_; - wire _zz_486_; - wire [31:0] _zz_487_; - wire [31:0] _zz_488_; - wire [31:0] _zz_489_; - wire _zz_490_; - wire [0:0] _zz_491_; - wire [10:0] _zz_492_; - wire [31:0] _zz_493_; - wire [31:0] _zz_494_; - wire [31:0] _zz_495_; - wire _zz_496_; - wire [0:0] _zz_497_; - wire [4:0] _zz_498_; - wire [31:0] _zz_499_; - wire [31:0] _zz_500_; - wire [31:0] _zz_501_; - wire [31:0] _zz_502_; - wire [31:0] _zz_503_; - wire _zz_504_; - wire _zz_505_; - wire _zz_506_; - wire `AluCtrlEnum_defaultEncoding_type decode_ALU_CTRL; - wire `AluCtrlEnum_defaultEncoding_type _zz_1_; - wire `AluCtrlEnum_defaultEncoding_type _zz_2_; - wire `AluCtrlEnum_defaultEncoding_type _zz_3_; - wire `AluBitwiseCtrlEnum_defaultEncoding_type decode_ALU_BITWISE_CTRL; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_4_; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_5_; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_6_; - wire `Src2CtrlEnum_defaultEncoding_type decode_SRC2_CTRL; - wire `Src2CtrlEnum_defaultEncoding_type _zz_7_; - wire `Src2CtrlEnum_defaultEncoding_type _zz_8_; - wire `Src2CtrlEnum_defaultEncoding_type _zz_9_; - wire decode_IS_RS2_SIGNED; - wire decode_BYPASSABLE_EXECUTE_STAGE; - wire decode_IS_RS1_SIGNED; - wire decode_CSR_READ_OPCODE; - wire decode_IS_DIV; - wire [1:0] memory_MEMORY_ADDRESS_LOW; - wire [1:0] execute_MEMORY_ADDRESS_LOW; - wire decode_IS_MUL; - wire [31:0] execute_BRANCH_CALC; - wire `BranchCtrlEnum_defaultEncoding_type _zz_10_; - wire `BranchCtrlEnum_defaultEncoding_type _zz_11_; - wire `Src1CtrlEnum_defaultEncoding_type decode_SRC1_CTRL; - wire `Src1CtrlEnum_defaultEncoding_type _zz_12_; - wire `Src1CtrlEnum_defaultEncoding_type _zz_13_; - wire `Src1CtrlEnum_defaultEncoding_type _zz_14_; - wire execute_BYPASSABLE_MEMORY_STAGE; - wire decode_BYPASSABLE_MEMORY_STAGE; - wire decode_SRC2_FORCE_ZERO; - wire decode_CSR_WRITE_OPCODE; - wire [31:0] writeBack_REGFILE_WRITE_DATA; - wire [31:0] execute_REGFILE_WRITE_DATA; - wire execute_BRANCH_DO; - wire decode_SRC_LESS_UNSIGNED; - wire `EnvCtrlEnum_defaultEncoding_type _zz_15_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_16_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_17_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_18_; - wire `EnvCtrlEnum_defaultEncoding_type decode_ENV_CTRL; - wire `EnvCtrlEnum_defaultEncoding_type _zz_19_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_20_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_21_; - wire [31:0] writeBack_FORMAL_PC_NEXT; - wire [31:0] memory_FORMAL_PC_NEXT; - wire [31:0] execute_FORMAL_PC_NEXT; - wire [31:0] decode_FORMAL_PC_NEXT; - wire decode_MEMORY_STORE; - wire decode_PREDICTION_HAD_BRANCHED2; - wire decode_IS_CSR; - wire `ShiftCtrlEnum_defaultEncoding_type decode_SHIFT_CTRL; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_22_; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_23_; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_24_; - wire [31:0] memory_MEMORY_READ_DATA; - wire execute_IS_RS1_SIGNED; - wire execute_IS_DIV; - wire execute_IS_MUL; - wire execute_IS_RS2_SIGNED; - wire memory_IS_DIV; - wire memory_IS_MUL; - wire execute_CSR_READ_OPCODE; - wire execute_CSR_WRITE_OPCODE; - wire execute_IS_CSR; - wire `EnvCtrlEnum_defaultEncoding_type memory_ENV_CTRL; - wire `EnvCtrlEnum_defaultEncoding_type _zz_25_; - wire `EnvCtrlEnum_defaultEncoding_type execute_ENV_CTRL; - wire `EnvCtrlEnum_defaultEncoding_type _zz_26_; - wire _zz_27_; - wire _zz_28_; - wire `EnvCtrlEnum_defaultEncoding_type writeBack_ENV_CTRL; - wire `EnvCtrlEnum_defaultEncoding_type _zz_29_; - wire [31:0] memory_BRANCH_CALC; - wire memory_BRANCH_DO; - wire [31:0] _zz_30_; - wire [31:0] execute_PC; - wire execute_PREDICTION_HAD_BRANCHED2; - wire _zz_31_; - wire [31:0] execute_RS1; - wire execute_BRANCH_COND_RESULT; - wire `BranchCtrlEnum_defaultEncoding_type execute_BRANCH_CTRL; - wire `BranchCtrlEnum_defaultEncoding_type _zz_32_; - wire _zz_33_; - wire _zz_34_; - wire decode_RS2_USE; - wire decode_RS1_USE; - wire execute_REGFILE_WRITE_VALID; - wire execute_BYPASSABLE_EXECUTE_STAGE; - reg [31:0] _zz_35_; - wire memory_REGFILE_WRITE_VALID; - wire [31:0] memory_INSTRUCTION; - wire memory_BYPASSABLE_MEMORY_STAGE; - wire writeBack_REGFILE_WRITE_VALID; - reg [31:0] decode_RS2; - reg [31:0] decode_RS1; - reg [31:0] _zz_36_; - wire `ShiftCtrlEnum_defaultEncoding_type execute_SHIFT_CTRL; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_37_; - wire _zz_38_; - wire [31:0] _zz_39_; - wire [31:0] _zz_40_; - wire execute_SRC_LESS_UNSIGNED; - wire execute_SRC2_FORCE_ZERO; - wire execute_SRC_USE_SUB_LESS; - wire [31:0] _zz_41_; - wire `Src2CtrlEnum_defaultEncoding_type execute_SRC2_CTRL; - wire `Src2CtrlEnum_defaultEncoding_type _zz_42_; - wire [31:0] _zz_43_; - wire `Src1CtrlEnum_defaultEncoding_type execute_SRC1_CTRL; - wire `Src1CtrlEnum_defaultEncoding_type _zz_44_; - wire [31:0] _zz_45_; - wire decode_SRC_USE_SUB_LESS; - wire decode_SRC_ADD_ZERO; - wire _zz_46_; - wire [31:0] execute_SRC_ADD_SUB; - wire execute_SRC_LESS; - wire `AluCtrlEnum_defaultEncoding_type execute_ALU_CTRL; - wire `AluCtrlEnum_defaultEncoding_type _zz_47_; - wire [31:0] _zz_48_; - wire [31:0] execute_SRC2; - wire [31:0] execute_SRC1; - wire `AluBitwiseCtrlEnum_defaultEncoding_type execute_ALU_BITWISE_CTRL; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_49_; - wire [31:0] _zz_50_; - wire _zz_51_; - reg _zz_52_; - wire [31:0] _zz_53_; - wire [31:0] _zz_54_; - wire [31:0] decode_INSTRUCTION_ANTICIPATED; - reg decode_REGFILE_WRITE_VALID; - wire decode_LEGAL_INSTRUCTION; - wire decode_INSTRUCTION_READY; - wire _zz_55_; - wire `Src1CtrlEnum_defaultEncoding_type _zz_56_; - wire _zz_57_; - wire _zz_58_; - wire `Src2CtrlEnum_defaultEncoding_type _zz_59_; - wire _zz_60_; - wire _zz_61_; - wire _zz_62_; - wire _zz_63_; - wire _zz_64_; - wire _zz_65_; - wire _zz_66_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_67_; - wire `BranchCtrlEnum_defaultEncoding_type _zz_68_; - wire _zz_69_; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_70_; - wire _zz_71_; - wire `AluCtrlEnum_defaultEncoding_type _zz_72_; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_73_; - wire _zz_74_; - wire _zz_75_; - wire _zz_76_; - wire _zz_77_; - wire _zz_78_; - wire writeBack_MEMORY_STORE; - reg [31:0] _zz_79_; - wire writeBack_MEMORY_ENABLE; - wire [1:0] writeBack_MEMORY_ADDRESS_LOW; - wire [31:0] writeBack_MEMORY_READ_DATA; - wire memory_MMU_FAULT; - wire [31:0] memory_MMU_RSP_physicalAddress; - wire memory_MMU_RSP_isIoAccess; - wire memory_MMU_RSP_allowRead; - wire memory_MMU_RSP_allowWrite; - wire memory_MMU_RSP_allowExecute; - wire memory_MMU_RSP_exception; - wire memory_MMU_RSP_refilling; - wire [31:0] memory_PC; - wire memory_ALIGNEMENT_FAULT; - wire [31:0] memory_REGFILE_WRITE_DATA; - wire memory_MEMORY_STORE; - wire memory_MEMORY_ENABLE; - wire [31:0] _zz_80_; - wire [31:0] _zz_81_; - wire _zz_82_; - wire _zz_83_; - wire _zz_84_; - wire _zz_85_; - wire _zz_86_; - wire _zz_87_; - wire execute_MMU_FAULT; - wire [31:0] execute_MMU_RSP_physicalAddress; - wire execute_MMU_RSP_isIoAccess; - wire execute_MMU_RSP_allowRead; - wire execute_MMU_RSP_allowWrite; - wire execute_MMU_RSP_allowExecute; - wire execute_MMU_RSP_exception; - wire execute_MMU_RSP_refilling; - wire _zz_88_; - wire [31:0] execute_SRC_ADD; - wire [1:0] _zz_89_; - wire [31:0] execute_RS2; - wire [31:0] execute_INSTRUCTION; - wire execute_MEMORY_STORE; - wire execute_MEMORY_ENABLE; - wire execute_ALIGNEMENT_FAULT; - wire _zz_90_; - wire decode_MEMORY_ENABLE; - wire decode_FLUSH_ALL; - reg IBusCachedPlugin_rsp_issueDetected; - reg _zz_91_; - reg _zz_92_; - reg _zz_93_; - wire [31:0] _zz_94_; - wire `BranchCtrlEnum_defaultEncoding_type decode_BRANCH_CTRL; - wire `BranchCtrlEnum_defaultEncoding_type _zz_95_; - wire [31:0] decode_INSTRUCTION; - reg [31:0] _zz_96_; - reg [31:0] _zz_97_; - wire [31:0] decode_PC; - wire [31:0] _zz_98_; - wire [31:0] _zz_99_; - wire [31:0] _zz_100_; - wire [31:0] writeBack_PC; - wire [31:0] writeBack_INSTRUCTION; - reg decode_arbitration_haltItself; - reg decode_arbitration_haltByOther; - reg decode_arbitration_removeIt; - wire decode_arbitration_flushIt; - reg decode_arbitration_flushNext; - wire decode_arbitration_isValid; - wire decode_arbitration_isStuck; - wire decode_arbitration_isStuckByOthers; - wire decode_arbitration_isFlushed; - wire decode_arbitration_isMoving; - wire decode_arbitration_isFiring; - reg execute_arbitration_haltItself; - wire execute_arbitration_haltByOther; - reg execute_arbitration_removeIt; - wire execute_arbitration_flushIt; - wire execute_arbitration_flushNext; - reg execute_arbitration_isValid; - wire execute_arbitration_isStuck; - wire execute_arbitration_isStuckByOthers; - wire execute_arbitration_isFlushed; - wire execute_arbitration_isMoving; - wire execute_arbitration_isFiring; - reg memory_arbitration_haltItself; - wire memory_arbitration_haltByOther; - reg memory_arbitration_removeIt; - reg memory_arbitration_flushIt; - reg memory_arbitration_flushNext; - reg memory_arbitration_isValid; - wire memory_arbitration_isStuck; - wire memory_arbitration_isStuckByOthers; - wire memory_arbitration_isFlushed; - wire memory_arbitration_isMoving; - wire memory_arbitration_isFiring; - wire writeBack_arbitration_haltItself; - wire writeBack_arbitration_haltByOther; - reg writeBack_arbitration_removeIt; - wire writeBack_arbitration_flushIt; - reg writeBack_arbitration_flushNext; - reg writeBack_arbitration_isValid; - wire writeBack_arbitration_isStuck; - wire writeBack_arbitration_isStuckByOthers; - wire writeBack_arbitration_isFlushed; - wire writeBack_arbitration_isMoving; - wire writeBack_arbitration_isFiring; - wire [31:0] lastStageInstruction /* verilator public */ ; - wire [31:0] lastStagePc /* verilator public */ ; - wire lastStageIsValid /* verilator public */ ; - wire lastStageIsFiring /* verilator public */ ; - reg IBusCachedPlugin_fetcherHalt; - reg IBusCachedPlugin_fetcherflushIt; - reg IBusCachedPlugin_incomingInstruction; - wire IBusCachedPlugin_predictionJumpInterface_valid; - (* syn_keep , keep *) wire [31:0] IBusCachedPlugin_predictionJumpInterface_payload /* synthesis syn_keep = 1 */ ; - reg IBusCachedPlugin_decodePrediction_cmd_hadBranch; - wire IBusCachedPlugin_decodePrediction_rsp_wasWrong; - wire IBusCachedPlugin_pcValids_0; - wire IBusCachedPlugin_pcValids_1; - wire IBusCachedPlugin_pcValids_2; - wire IBusCachedPlugin_pcValids_3; - wire IBusCachedPlugin_redoBranch_valid; - wire [31:0] IBusCachedPlugin_redoBranch_payload; - reg IBusCachedPlugin_decodeExceptionPort_valid; - reg [3:0] IBusCachedPlugin_decodeExceptionPort_payload_code; - wire [31:0] IBusCachedPlugin_decodeExceptionPort_payload_badAddr; - wire IBusCachedPlugin_mmuBus_cmd_isValid; - wire [31:0] IBusCachedPlugin_mmuBus_cmd_virtualAddress; - wire IBusCachedPlugin_mmuBus_cmd_bypassTranslation; - wire [31:0] IBusCachedPlugin_mmuBus_rsp_physicalAddress; - wire IBusCachedPlugin_mmuBus_rsp_isIoAccess; - wire IBusCachedPlugin_mmuBus_rsp_allowRead; - wire IBusCachedPlugin_mmuBus_rsp_allowWrite; - wire IBusCachedPlugin_mmuBus_rsp_allowExecute; - wire IBusCachedPlugin_mmuBus_rsp_exception; - wire IBusCachedPlugin_mmuBus_rsp_refilling; - wire IBusCachedPlugin_mmuBus_end; - wire IBusCachedPlugin_mmuBus_busy; - reg DBusSimplePlugin_memoryExceptionPort_valid; - reg [3:0] DBusSimplePlugin_memoryExceptionPort_payload_code; - wire [31:0] DBusSimplePlugin_memoryExceptionPort_payload_badAddr; - wire DBusSimplePlugin_mmuBus_cmd_isValid; - wire [31:0] DBusSimplePlugin_mmuBus_cmd_virtualAddress; - wire DBusSimplePlugin_mmuBus_cmd_bypassTranslation; - wire [31:0] DBusSimplePlugin_mmuBus_rsp_physicalAddress; - wire DBusSimplePlugin_mmuBus_rsp_isIoAccess; - wire DBusSimplePlugin_mmuBus_rsp_allowRead; - wire DBusSimplePlugin_mmuBus_rsp_allowWrite; - wire DBusSimplePlugin_mmuBus_rsp_allowExecute; - wire DBusSimplePlugin_mmuBus_rsp_exception; - wire DBusSimplePlugin_mmuBus_rsp_refilling; - wire DBusSimplePlugin_mmuBus_end; - wire DBusSimplePlugin_mmuBus_busy; - reg DBusSimplePlugin_redoBranch_valid; - wire [31:0] DBusSimplePlugin_redoBranch_payload; - wire decodeExceptionPort_valid; - wire [3:0] decodeExceptionPort_payload_code; - wire [31:0] decodeExceptionPort_payload_badAddr; - wire BranchPlugin_jumpInterface_valid; - wire [31:0] BranchPlugin_jumpInterface_payload; - wire BranchPlugin_branchExceptionPort_valid; - wire [3:0] BranchPlugin_branchExceptionPort_payload_code; - wire [31:0] BranchPlugin_branchExceptionPort_payload_badAddr; - reg CsrPlugin_jumpInterface_valid; - reg [31:0] CsrPlugin_jumpInterface_payload; - wire CsrPlugin_exceptionPendings_0; - wire CsrPlugin_exceptionPendings_1; - wire CsrPlugin_exceptionPendings_2; - wire CsrPlugin_exceptionPendings_3; - wire externalInterrupt; - wire contextSwitching; - reg [1:0] CsrPlugin_privilege; - wire CsrPlugin_forceMachineWire; - wire CsrPlugin_allowInterrupts; - wire CsrPlugin_allowException; - wire IBusCachedPlugin_jump_pcLoad_valid; - wire [31:0] IBusCachedPlugin_jump_pcLoad_payload; - wire [4:0] _zz_101_; - wire [4:0] _zz_102_; - wire _zz_103_; - wire _zz_104_; - wire _zz_105_; - wire _zz_106_; - wire IBusCachedPlugin_fetchPc_output_valid; - wire IBusCachedPlugin_fetchPc_output_ready; - wire [31:0] IBusCachedPlugin_fetchPc_output_payload; - reg [31:0] IBusCachedPlugin_fetchPc_pcReg /* verilator public */ ; - reg IBusCachedPlugin_fetchPc_corrected; - reg IBusCachedPlugin_fetchPc_pcRegPropagate; - reg IBusCachedPlugin_fetchPc_booted; - reg IBusCachedPlugin_fetchPc_inc; - reg [31:0] IBusCachedPlugin_fetchPc_pc; - wire IBusCachedPlugin_iBusRsp_stages_0_input_valid; - wire IBusCachedPlugin_iBusRsp_stages_0_input_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_input_payload; - wire IBusCachedPlugin_iBusRsp_stages_0_output_valid; - wire IBusCachedPlugin_iBusRsp_stages_0_output_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_output_payload; - reg IBusCachedPlugin_iBusRsp_stages_0_halt; - wire IBusCachedPlugin_iBusRsp_stages_0_inputSample; - wire IBusCachedPlugin_iBusRsp_stages_1_input_valid; - wire IBusCachedPlugin_iBusRsp_stages_1_input_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_input_payload; - wire IBusCachedPlugin_iBusRsp_stages_1_output_valid; - wire IBusCachedPlugin_iBusRsp_stages_1_output_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_output_payload; - reg IBusCachedPlugin_iBusRsp_stages_1_halt; - wire IBusCachedPlugin_iBusRsp_stages_1_inputSample; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; - reg IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt; - wire IBusCachedPlugin_iBusRsp_cacheRspArbitration_inputSample; - wire _zz_107_; - wire _zz_108_; - wire _zz_109_; - wire _zz_110_; - wire _zz_111_; - reg _zz_112_; - wire _zz_113_; - reg _zz_114_; - reg [31:0] _zz_115_; - reg IBusCachedPlugin_iBusRsp_readyForError; - wire IBusCachedPlugin_iBusRsp_decodeInput_valid; - wire IBusCachedPlugin_iBusRsp_decodeInput_ready; - wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; - wire IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_error; - wire [31:0] IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; - wire IBusCachedPlugin_iBusRsp_decodeInput_payload_isRvc; - reg IBusCachedPlugin_injector_nextPcCalc_valids_0; - reg IBusCachedPlugin_injector_nextPcCalc_valids_1; - reg IBusCachedPlugin_injector_nextPcCalc_valids_2; - reg IBusCachedPlugin_injector_nextPcCalc_valids_3; - reg IBusCachedPlugin_injector_nextPcCalc_valids_4; - reg IBusCachedPlugin_injector_decodeRemoved; - wire _zz_116_; - reg [18:0] _zz_117_; - wire _zz_118_; - reg [10:0] _zz_119_; - wire _zz_120_; - reg [18:0] _zz_121_; - reg _zz_122_; - wire _zz_123_; - reg [10:0] _zz_124_; - wire _zz_125_; - reg [18:0] _zz_126_; - wire iBus_cmd_valid; - wire iBus_cmd_ready; - reg [31:0] iBus_cmd_payload_address; - wire [2:0] iBus_cmd_payload_size; - wire iBus_rsp_valid; - wire [31:0] iBus_rsp_payload_data; - wire iBus_rsp_payload_error; - wire [31:0] _zz_127_; - reg [31:0] IBusCachedPlugin_rspCounter; - wire IBusCachedPlugin_s0_tightlyCoupledHit; - reg IBusCachedPlugin_s1_tightlyCoupledHit; - reg IBusCachedPlugin_s2_tightlyCoupledHit; - wire IBusCachedPlugin_rsp_iBusRspOutputHalt; - reg IBusCachedPlugin_rsp_redoFetch; - wire dBus_cmd_valid; - wire dBus_cmd_ready; - wire dBus_cmd_payload_wr; - wire [31:0] dBus_cmd_payload_address; - wire [31:0] dBus_cmd_payload_data; - wire [1:0] dBus_cmd_payload_size; - wire dBus_rsp_ready; - wire dBus_rsp_error; - wire [31:0] dBus_rsp_data; - wire _zz_128_; - reg execute_DBusSimplePlugin_skipCmd; - reg [31:0] _zz_129_; - reg [3:0] _zz_130_; - wire [3:0] execute_DBusSimplePlugin_formalMask; - reg [31:0] writeBack_DBusSimplePlugin_rspShifted; - wire _zz_131_; - reg [31:0] _zz_132_; - wire _zz_133_; - reg [31:0] _zz_134_; - reg [31:0] writeBack_DBusSimplePlugin_rspFormated; - wire [29:0] _zz_135_; - wire _zz_136_; - wire _zz_137_; - wire _zz_138_; - wire _zz_139_; - wire _zz_140_; - wire _zz_141_; - wire `ShiftCtrlEnum_defaultEncoding_type _zz_142_; - wire `AluCtrlEnum_defaultEncoding_type _zz_143_; - wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_144_; - wire `BranchCtrlEnum_defaultEncoding_type _zz_145_; - wire `EnvCtrlEnum_defaultEncoding_type _zz_146_; - wire `Src2CtrlEnum_defaultEncoding_type _zz_147_; - wire `Src1CtrlEnum_defaultEncoding_type _zz_148_; - wire [4:0] decode_RegFilePlugin_regFileReadAddress1; - wire [4:0] decode_RegFilePlugin_regFileReadAddress2; - wire [31:0] decode_RegFilePlugin_rs1Data; - wire [31:0] decode_RegFilePlugin_rs2Data; - reg lastStageRegFileWrite_valid /* verilator public */ ; - wire [4:0] lastStageRegFileWrite_payload_address /* verilator public */ ; - wire [31:0] lastStageRegFileWrite_payload_data /* verilator public */ ; - reg _zz_149_; - reg [31:0] execute_IntAluPlugin_bitwise; - reg [31:0] _zz_150_; - reg [31:0] _zz_151_; - wire _zz_152_; - reg [19:0] _zz_153_; - wire _zz_154_; - reg [19:0] _zz_155_; - reg [31:0] _zz_156_; - reg [31:0] execute_SrcPlugin_addSub; - wire execute_SrcPlugin_less; - reg execute_LightShifterPlugin_isActive; - wire execute_LightShifterPlugin_isShift; - reg [4:0] execute_LightShifterPlugin_amplitudeReg; - wire [4:0] execute_LightShifterPlugin_amplitude; - wire [31:0] execute_LightShifterPlugin_shiftInput; - wire execute_LightShifterPlugin_done; - reg [31:0] _zz_157_; - reg _zz_158_; - reg _zz_159_; - wire _zz_160_; - reg _zz_161_; - reg [4:0] _zz_162_; - reg [31:0] _zz_163_; - wire _zz_164_; - wire _zz_165_; - wire _zz_166_; - wire _zz_167_; - wire _zz_168_; - wire _zz_169_; - wire execute_BranchPlugin_eq; - wire [2:0] _zz_170_; - reg _zz_171_; - reg _zz_172_; - wire _zz_173_; - reg [19:0] _zz_174_; - wire _zz_175_; - reg [10:0] _zz_176_; - wire _zz_177_; - reg [18:0] _zz_178_; - reg _zz_179_; - wire execute_BranchPlugin_missAlignedTarget; - reg [31:0] execute_BranchPlugin_branch_src1; - reg [31:0] execute_BranchPlugin_branch_src2; - wire _zz_180_; - reg [19:0] _zz_181_; - wire _zz_182_; - reg [10:0] _zz_183_; - wire _zz_184_; - reg [18:0] _zz_185_; - wire [31:0] execute_BranchPlugin_branchAdder; - wire [1:0] CsrPlugin_misa_base; - wire [25:0] CsrPlugin_misa_extensions; - reg [1:0] CsrPlugin_mtvec_mode; - reg [29:0] CsrPlugin_mtvec_base; - reg [31:0] CsrPlugin_mepc; - reg CsrPlugin_mstatus_MIE; - reg CsrPlugin_mstatus_MPIE; - reg [1:0] CsrPlugin_mstatus_MPP; - reg CsrPlugin_mip_MEIP; - reg CsrPlugin_mip_MTIP; - reg CsrPlugin_mip_MSIP; - reg CsrPlugin_mie_MEIE; - reg CsrPlugin_mie_MTIE; - reg CsrPlugin_mie_MSIE; - reg CsrPlugin_mcause_interrupt; - reg [3:0] CsrPlugin_mcause_exceptionCode; - reg [31:0] CsrPlugin_mtval; - reg [63:0] CsrPlugin_mcycle = 64'b0000000000000000000000000000000000000000000000000000000000000000; - reg [63:0] CsrPlugin_minstret = 64'b0000000000000000000000000000000000000000000000000000000000000000; - wire _zz_186_; - wire _zz_187_; - wire _zz_188_; - reg CsrPlugin_exceptionPortCtrl_exceptionValids_decode; - reg CsrPlugin_exceptionPortCtrl_exceptionValids_execute; - reg CsrPlugin_exceptionPortCtrl_exceptionValids_memory; - reg CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack; - reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; - reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; - reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; - reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; - reg [3:0] CsrPlugin_exceptionPortCtrl_exceptionContext_code; - reg [31:0] CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; - wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped; - wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; - wire [1:0] _zz_189_; - wire _zz_190_; - wire [1:0] _zz_191_; - wire _zz_192_; - reg CsrPlugin_interrupt_valid; - reg [3:0] CsrPlugin_interrupt_code /* verilator public */ ; - reg [1:0] CsrPlugin_interrupt_targetPrivilege; - wire CsrPlugin_exception; - wire CsrPlugin_lastStageWasWfi; - reg CsrPlugin_pipelineLiberator_done; - wire CsrPlugin_interruptJump /* verilator public */ ; - reg CsrPlugin_hadException; - reg [1:0] CsrPlugin_targetPrivilege; - reg [3:0] CsrPlugin_trapCause; - reg [1:0] CsrPlugin_xtvec_mode; - reg [29:0] CsrPlugin_xtvec_base; - wire execute_CsrPlugin_inWfi /* verilator public */ ; - reg execute_CsrPlugin_wfiWake; - wire execute_CsrPlugin_blockedBySideEffects; - reg execute_CsrPlugin_illegalAccess; - reg execute_CsrPlugin_illegalInstruction; - reg [31:0] execute_CsrPlugin_readData; - wire execute_CsrPlugin_writeInstruction; - wire execute_CsrPlugin_readInstruction; - wire execute_CsrPlugin_writeEnable; - wire execute_CsrPlugin_readEnable; - wire [31:0] execute_CsrPlugin_readToWriteData; - reg [31:0] execute_CsrPlugin_writeData; - wire [11:0] execute_CsrPlugin_csrAddress; - reg [32:0] memory_MulDivIterativePlugin_rs1; - reg [31:0] memory_MulDivIterativePlugin_rs2; - reg [64:0] memory_MulDivIterativePlugin_accumulator; - reg memory_MulDivIterativePlugin_mul_counter_willIncrement; - reg memory_MulDivIterativePlugin_mul_counter_willClear; - reg [5:0] memory_MulDivIterativePlugin_mul_counter_valueNext; - reg [5:0] memory_MulDivIterativePlugin_mul_counter_value; - wire memory_MulDivIterativePlugin_mul_willOverflowIfInc; - wire memory_MulDivIterativePlugin_mul_counter_willOverflow; - reg memory_MulDivIterativePlugin_div_needRevert; - reg memory_MulDivIterativePlugin_div_counter_willIncrement; - reg memory_MulDivIterativePlugin_div_counter_willClear; - reg [5:0] memory_MulDivIterativePlugin_div_counter_valueNext; - reg [5:0] memory_MulDivIterativePlugin_div_counter_value; - wire memory_MulDivIterativePlugin_div_counter_willOverflowIfInc; - wire memory_MulDivIterativePlugin_div_counter_willOverflow; - reg memory_MulDivIterativePlugin_div_done; - reg [31:0] memory_MulDivIterativePlugin_div_result; - wire [31:0] _zz_193_; - wire [32:0] _zz_194_; - wire [32:0] _zz_195_; - wire [31:0] _zz_196_; - wire _zz_197_; - wire _zz_198_; - reg [32:0] _zz_199_; - reg [31:0] externalInterruptArray_regNext; - reg [31:0] _zz_200_; - wire [31:0] _zz_201_; - reg [31:0] decode_to_execute_INSTRUCTION; - reg [31:0] execute_to_memory_INSTRUCTION; - reg [31:0] memory_to_writeBack_INSTRUCTION; - reg execute_to_memory_ALIGNEMENT_FAULT; - reg [31:0] memory_to_writeBack_MEMORY_READ_DATA; - reg `ShiftCtrlEnum_defaultEncoding_type decode_to_execute_SHIFT_CTRL; - reg decode_to_execute_IS_CSR; - reg [31:0] decode_to_execute_PC; - reg [31:0] execute_to_memory_PC; - reg [31:0] memory_to_writeBack_PC; - reg decode_to_execute_PREDICTION_HAD_BRANCHED2; - reg decode_to_execute_MEMORY_STORE; - reg execute_to_memory_MEMORY_STORE; - reg memory_to_writeBack_MEMORY_STORE; - reg [31:0] decode_to_execute_FORMAL_PC_NEXT; - reg [31:0] execute_to_memory_FORMAL_PC_NEXT; - reg [31:0] memory_to_writeBack_FORMAL_PC_NEXT; - reg `EnvCtrlEnum_defaultEncoding_type decode_to_execute_ENV_CTRL; - reg `EnvCtrlEnum_defaultEncoding_type execute_to_memory_ENV_CTRL; - reg `EnvCtrlEnum_defaultEncoding_type memory_to_writeBack_ENV_CTRL; - reg decode_to_execute_REGFILE_WRITE_VALID; - reg execute_to_memory_REGFILE_WRITE_VALID; - reg memory_to_writeBack_REGFILE_WRITE_VALID; - reg decode_to_execute_SRC_LESS_UNSIGNED; - reg execute_to_memory_BRANCH_DO; - reg [31:0] execute_to_memory_REGFILE_WRITE_DATA; - reg [31:0] memory_to_writeBack_REGFILE_WRITE_DATA; - reg decode_to_execute_CSR_WRITE_OPCODE; - reg [31:0] decode_to_execute_RS1; - reg decode_to_execute_SRC2_FORCE_ZERO; - reg decode_to_execute_BYPASSABLE_MEMORY_STAGE; - reg execute_to_memory_BYPASSABLE_MEMORY_STAGE; - reg `Src1CtrlEnum_defaultEncoding_type decode_to_execute_SRC1_CTRL; - reg `BranchCtrlEnum_defaultEncoding_type decode_to_execute_BRANCH_CTRL; - reg decode_to_execute_MEMORY_ENABLE; - reg execute_to_memory_MEMORY_ENABLE; - reg memory_to_writeBack_MEMORY_ENABLE; - reg decode_to_execute_SRC_USE_SUB_LESS; - reg execute_to_memory_MMU_FAULT; - reg [31:0] execute_to_memory_BRANCH_CALC; - reg [31:0] decode_to_execute_RS2; - reg decode_to_execute_IS_MUL; - reg execute_to_memory_IS_MUL; - reg [1:0] execute_to_memory_MEMORY_ADDRESS_LOW; - reg [1:0] memory_to_writeBack_MEMORY_ADDRESS_LOW; - reg decode_to_execute_IS_DIV; - reg execute_to_memory_IS_DIV; - reg decode_to_execute_CSR_READ_OPCODE; - reg decode_to_execute_IS_RS1_SIGNED; - reg decode_to_execute_BYPASSABLE_EXECUTE_STAGE; - reg [31:0] execute_to_memory_MMU_RSP_physicalAddress; - reg execute_to_memory_MMU_RSP_isIoAccess; - reg execute_to_memory_MMU_RSP_allowRead; - reg execute_to_memory_MMU_RSP_allowWrite; - reg execute_to_memory_MMU_RSP_allowExecute; - reg execute_to_memory_MMU_RSP_exception; - reg execute_to_memory_MMU_RSP_refilling; - reg decode_to_execute_IS_RS2_SIGNED; - reg `Src2CtrlEnum_defaultEncoding_type decode_to_execute_SRC2_CTRL; - reg `AluBitwiseCtrlEnum_defaultEncoding_type decode_to_execute_ALU_BITWISE_CTRL; - reg `AluCtrlEnum_defaultEncoding_type decode_to_execute_ALU_CTRL; - reg [2:0] _zz_202_; - reg _zz_203_; - reg [31:0] iBusWishbone_DAT_MISO_regNext; - wire dBus_cmd_halfPipe_valid; - wire dBus_cmd_halfPipe_ready; - wire dBus_cmd_halfPipe_payload_wr; - wire [31:0] dBus_cmd_halfPipe_payload_address; - wire [31:0] dBus_cmd_halfPipe_payload_data; - wire [1:0] dBus_cmd_halfPipe_payload_size; - reg dBus_cmd_halfPipe_regs_valid; - reg dBus_cmd_halfPipe_regs_ready; - reg dBus_cmd_halfPipe_regs_payload_wr; - reg [31:0] dBus_cmd_halfPipe_regs_payload_address; - reg [31:0] dBus_cmd_halfPipe_regs_payload_data; - reg [1:0] dBus_cmd_halfPipe_regs_payload_size; - reg [3:0] _zz_204_; - `ifndef SYNTHESIS - reg [63:0] decode_ALU_CTRL_string; - reg [63:0] _zz_1__string; - reg [63:0] _zz_2__string; - reg [63:0] _zz_3__string; - reg [39:0] decode_ALU_BITWISE_CTRL_string; - reg [39:0] _zz_4__string; - reg [39:0] _zz_5__string; - reg [39:0] _zz_6__string; - reg [23:0] decode_SRC2_CTRL_string; - reg [23:0] _zz_7__string; - reg [23:0] _zz_8__string; - reg [23:0] _zz_9__string; - reg [31:0] _zz_10__string; - reg [31:0] _zz_11__string; - reg [95:0] decode_SRC1_CTRL_string; - reg [95:0] _zz_12__string; - reg [95:0] _zz_13__string; - reg [95:0] _zz_14__string; - reg [31:0] _zz_15__string; - reg [31:0] _zz_16__string; - reg [31:0] _zz_17__string; - reg [31:0] _zz_18__string; - reg [31:0] decode_ENV_CTRL_string; - reg [31:0] _zz_19__string; - reg [31:0] _zz_20__string; - reg [31:0] _zz_21__string; - reg [71:0] decode_SHIFT_CTRL_string; - reg [71:0] _zz_22__string; - reg [71:0] _zz_23__string; - reg [71:0] _zz_24__string; - reg [31:0] memory_ENV_CTRL_string; - reg [31:0] _zz_25__string; - reg [31:0] execute_ENV_CTRL_string; - reg [31:0] _zz_26__string; - reg [31:0] writeBack_ENV_CTRL_string; - reg [31:0] _zz_29__string; - reg [31:0] execute_BRANCH_CTRL_string; - reg [31:0] _zz_32__string; - reg [71:0] execute_SHIFT_CTRL_string; - reg [71:0] _zz_37__string; - reg [23:0] execute_SRC2_CTRL_string; - reg [23:0] _zz_42__string; - reg [95:0] execute_SRC1_CTRL_string; - reg [95:0] _zz_44__string; - reg [63:0] execute_ALU_CTRL_string; - reg [63:0] _zz_47__string; - reg [39:0] execute_ALU_BITWISE_CTRL_string; - reg [39:0] _zz_49__string; - reg [95:0] _zz_56__string; - reg [23:0] _zz_59__string; - reg [31:0] _zz_67__string; - reg [31:0] _zz_68__string; - reg [39:0] _zz_70__string; - reg [63:0] _zz_72__string; - reg [71:0] _zz_73__string; - reg [31:0] decode_BRANCH_CTRL_string; - reg [31:0] _zz_95__string; - reg [71:0] _zz_142__string; - reg [63:0] _zz_143__string; - reg [39:0] _zz_144__string; - reg [31:0] _zz_145__string; - reg [31:0] _zz_146__string; - reg [23:0] _zz_147__string; - reg [95:0] _zz_148__string; - reg [71:0] decode_to_execute_SHIFT_CTRL_string; - reg [31:0] decode_to_execute_ENV_CTRL_string; - reg [31:0] execute_to_memory_ENV_CTRL_string; - reg [31:0] memory_to_writeBack_ENV_CTRL_string; - reg [95:0] decode_to_execute_SRC1_CTRL_string; - reg [31:0] decode_to_execute_BRANCH_CTRL_string; - reg [23:0] decode_to_execute_SRC2_CTRL_string; - reg [39:0] decode_to_execute_ALU_BITWISE_CTRL_string; - reg [63:0] decode_to_execute_ALU_CTRL_string; - `endif - - (* ram_style = "block" *) reg [31:0] RegFilePlugin_regFile [0:31] /* verilator public */ ; - assign _zz_217_ = (memory_arbitration_isValid && memory_IS_MUL); - assign _zz_218_ = (memory_arbitration_isValid && memory_IS_DIV); - assign _zz_219_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); - assign _zz_220_ = 1'b1; - assign _zz_221_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); - assign _zz_222_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); - assign _zz_223_ = ((execute_arbitration_isValid && execute_LightShifterPlugin_isShift) && (execute_SRC2[4 : 0] != (5'b00000))); - assign _zz_224_ = (execute_arbitration_isValid && execute_IS_CSR); - assign _zz_225_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_error) && (! _zz_91_)); - assign _zz_226_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_cacheMiss) && (! _zz_92_)); - assign _zz_227_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_mmuException) && (! _zz_93_)); - assign _zz_228_ = ((_zz_210_ && IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling) && (! 1'b0)); - assign _zz_229_ = ({decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid} != (2'b00)); - assign _zz_230_ = (! execute_arbitration_isStuckByOthers); - assign _zz_231_ = (! memory_MulDivIterativePlugin_mul_willOverflowIfInc); - assign _zz_232_ = (! memory_MulDivIterativePlugin_div_done); - assign _zz_233_ = ({BranchPlugin_branchExceptionPort_valid,DBusSimplePlugin_memoryExceptionPort_valid} != (2'b00)); - assign _zz_234_ = (CsrPlugin_hadException || CsrPlugin_interruptJump); - assign _zz_235_ = (writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)); - assign _zz_236_ = writeBack_INSTRUCTION[29 : 28]; - assign _zz_237_ = (! IBusCachedPlugin_iBusRsp_readyForError); - assign _zz_238_ = ((dBus_rsp_ready && dBus_rsp_error) && (! memory_MEMORY_STORE)); - assign _zz_239_ = (! ((memory_arbitration_isValid && memory_MEMORY_ENABLE) && (1'b1 || (! memory_arbitration_isStuckByOthers)))); - assign _zz_240_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID); - assign _zz_241_ = (1'b0 || (! 1'b1)); - assign _zz_242_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID); - assign _zz_243_ = (1'b0 || (! memory_BYPASSABLE_MEMORY_STAGE)); - assign _zz_244_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID); - assign _zz_245_ = (1'b0 || (! execute_BYPASSABLE_EXECUTE_STAGE)); - assign _zz_246_ = (! memory_arbitration_isStuck); - assign _zz_247_ = (iBus_cmd_valid || (_zz_202_ != (3'b000))); - assign _zz_248_ = (CsrPlugin_mstatus_MIE || (CsrPlugin_privilege < (2'b11))); - assign _zz_249_ = ((_zz_186_ && 1'b1) && (! 1'b0)); - assign _zz_250_ = ((_zz_187_ && 1'b1) && (! 1'b0)); - assign _zz_251_ = ((_zz_188_ && 1'b1) && (! 1'b0)); - assign _zz_252_ = (! dBus_cmd_halfPipe_regs_valid); - assign _zz_253_ = writeBack_INSTRUCTION[13 : 12]; - assign _zz_254_ = execute_INSTRUCTION[13]; - assign _zz_255_ = (_zz_101_ - (5'b00001)); - assign _zz_256_ = {IBusCachedPlugin_fetchPc_inc,(2'b00)}; - assign _zz_257_ = {29'd0, _zz_256_}; - assign _zz_258_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}; - assign _zz_259_ = {{_zz_117_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0}; - assign _zz_260_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}; - assign _zz_261_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}; - assign _zz_262_ = {{_zz_119_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}},1'b0}; - assign _zz_263_ = {{_zz_121_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0}; - assign _zz_264_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}; - assign _zz_265_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}; - assign _zz_266_ = (memory_MEMORY_STORE ? (3'b110) : (3'b100)); - assign _zz_267_ = _zz_135_[0 : 0]; - assign _zz_268_ = _zz_135_[1 : 1]; - assign _zz_269_ = _zz_135_[2 : 2]; - assign _zz_270_ = _zz_135_[3 : 3]; - assign _zz_271_ = _zz_135_[8 : 8]; - assign _zz_272_ = _zz_135_[11 : 11]; - assign _zz_273_ = _zz_135_[15 : 15]; - assign _zz_274_ = _zz_135_[16 : 16]; - assign _zz_275_ = _zz_135_[17 : 17]; - assign _zz_276_ = _zz_135_[18 : 18]; - assign _zz_277_ = _zz_135_[19 : 19]; - assign _zz_278_ = _zz_135_[20 : 20]; - assign _zz_279_ = _zz_135_[21 : 21]; - assign _zz_280_ = _zz_135_[24 : 24]; - assign _zz_281_ = _zz_135_[26 : 26]; - assign _zz_282_ = _zz_135_[29 : 29]; - assign _zz_283_ = execute_SRC_LESS; - assign _zz_284_ = (3'b100); - assign _zz_285_ = execute_INSTRUCTION[19 : 15]; - assign _zz_286_ = execute_INSTRUCTION[31 : 20]; - assign _zz_287_ = {execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}; - assign _zz_288_ = ($signed(_zz_289_) + $signed(_zz_292_)); - assign _zz_289_ = ($signed(_zz_290_) + $signed(_zz_291_)); - assign _zz_290_ = execute_SRC1; - assign _zz_291_ = (execute_SRC_USE_SUB_LESS ? (~ execute_SRC2) : execute_SRC2); - assign _zz_292_ = (execute_SRC_USE_SUB_LESS ? _zz_293_ : _zz_294_); - assign _zz_293_ = (32'b00000000000000000000000000000001); - assign _zz_294_ = (32'b00000000000000000000000000000000); - assign _zz_295_ = (_zz_296_ >>> 1); - assign _zz_296_ = {((execute_SHIFT_CTRL == `ShiftCtrlEnum_defaultEncoding_SRA_1) && execute_LightShifterPlugin_shiftInput[31]),execute_LightShifterPlugin_shiftInput}; - assign _zz_297_ = execute_INSTRUCTION[31 : 20]; - assign _zz_298_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}; - assign _zz_299_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}; - assign _zz_300_ = {_zz_174_,execute_INSTRUCTION[31 : 20]}; - assign _zz_301_ = {{_zz_176_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0}; - assign _zz_302_ = {{_zz_178_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0}; - assign _zz_303_ = execute_INSTRUCTION[31 : 20]; - assign _zz_304_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}; - assign _zz_305_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}; - assign _zz_306_ = (3'b100); - assign _zz_307_ = (_zz_189_ & (~ _zz_308_)); - assign _zz_308_ = (_zz_189_ - (2'b01)); - assign _zz_309_ = (_zz_191_ & (~ _zz_310_)); - assign _zz_310_ = (_zz_191_ - (2'b01)); - assign _zz_311_ = memory_MulDivIterativePlugin_mul_counter_willIncrement; - assign _zz_312_ = {5'd0, _zz_311_}; - assign _zz_313_ = (_zz_315_ + _zz_317_); - assign _zz_314_ = (memory_MulDivIterativePlugin_rs2[0] ? memory_MulDivIterativePlugin_rs1 : (33'b000000000000000000000000000000000)); - assign _zz_315_ = {{1{_zz_314_[32]}}, _zz_314_}; - assign _zz_316_ = _zz_318_; - assign _zz_317_ = {{1{_zz_316_[32]}}, _zz_316_}; - assign _zz_318_ = (memory_MulDivIterativePlugin_accumulator >>> 32); - assign _zz_319_ = memory_MulDivIterativePlugin_div_counter_willIncrement; - assign _zz_320_ = {5'd0, _zz_319_}; - assign _zz_321_ = {1'd0, memory_MulDivIterativePlugin_rs2}; - assign _zz_322_ = {_zz_193_,(! _zz_195_[32])}; - assign _zz_323_ = _zz_195_[31:0]; - assign _zz_324_ = _zz_194_[31:0]; - assign _zz_325_ = _zz_326_; - assign _zz_326_ = _zz_327_; - assign _zz_327_ = ({1'b0,(memory_MulDivIterativePlugin_div_needRevert ? (~ _zz_196_) : _zz_196_)} + _zz_329_); - assign _zz_328_ = memory_MulDivIterativePlugin_div_needRevert; - assign _zz_329_ = {32'd0, _zz_328_}; - assign _zz_330_ = _zz_198_; - assign _zz_331_ = {32'd0, _zz_330_}; - assign _zz_332_ = _zz_197_; - assign _zz_333_ = {31'd0, _zz_332_}; - assign _zz_334_ = execute_CsrPlugin_writeData[7 : 7]; - assign _zz_335_ = execute_CsrPlugin_writeData[3 : 3]; - assign _zz_336_ = execute_CsrPlugin_writeData[3 : 3]; - assign _zz_337_ = execute_CsrPlugin_writeData[11 : 11]; - assign _zz_338_ = execute_CsrPlugin_writeData[7 : 7]; - assign _zz_339_ = execute_CsrPlugin_writeData[3 : 3]; - assign _zz_340_ = (iBus_cmd_payload_address >>> 5); - assign _zz_341_ = ({3'd0,_zz_204_} <<< dBus_cmd_halfPipe_payload_address[1 : 0]); - assign _zz_342_ = 1'b1; - assign _zz_343_ = 1'b1; - assign _zz_344_ = {_zz_104_,{_zz_106_,_zz_105_}}; - assign _zz_345_ = decode_INSTRUCTION[31]; - assign _zz_346_ = decode_INSTRUCTION[31]; - assign _zz_347_ = decode_INSTRUCTION[7]; - assign _zz_348_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000010100)) == (32'b00000000000000000000000000000100)); - assign _zz_349_ = ((decode_INSTRUCTION & _zz_356_) == (32'b00000000000000000000000000000100)); - assign _zz_350_ = _zz_141_; - assign _zz_351_ = ((decode_INSTRUCTION & _zz_357_) == (32'b00000010000000000100000000100000)); - assign _zz_352_ = (1'b0); - assign _zz_353_ = ({_zz_358_,{_zz_359_,_zz_360_}} != (3'b000)); - assign _zz_354_ = ({_zz_361_,_zz_362_} != (2'b00)); - assign _zz_355_ = {(_zz_363_ != _zz_364_),{_zz_365_,{_zz_366_,_zz_367_}}}; - assign _zz_356_ = (32'b00000000000000000000000001000100); - assign _zz_357_ = (32'b00000010000000000100000001100100); - assign _zz_358_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001010000)) == (32'b00000000000000000000000001000000)); - assign _zz_359_ = ((decode_INSTRUCTION & _zz_368_) == (32'b00000000000000000000000001000000)); - assign _zz_360_ = ((decode_INSTRUCTION & _zz_369_) == (32'b00000000000000000000000000000000)); - assign _zz_361_ = _zz_140_; - assign _zz_362_ = _zz_139_; - assign _zz_363_ = {_zz_136_,(_zz_370_ == _zz_371_)}; - assign _zz_364_ = (2'b00); - assign _zz_365_ = ({_zz_136_,_zz_372_} != (2'b00)); - assign _zz_366_ = ({_zz_373_,_zz_374_} != (3'b000)); - assign _zz_367_ = {(_zz_375_ != _zz_376_),{_zz_377_,{_zz_378_,_zz_379_}}}; - assign _zz_368_ = (32'b00000000000000000011000001000000); - assign _zz_369_ = (32'b00000000000000000000000000111000); - assign _zz_370_ = (decode_INSTRUCTION & (32'b00000000000000000000000001110000)); - assign _zz_371_ = (32'b00000000000000000000000000100000); - assign _zz_372_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000100000)) == (32'b00000000000000000000000000000000)); - assign _zz_373_ = ((decode_INSTRUCTION & _zz_380_) == (32'b00000000000000000000000001000000)); - assign _zz_374_ = {(_zz_381_ == _zz_382_),(_zz_383_ == _zz_384_)}; - assign _zz_375_ = ((decode_INSTRUCTION & _zz_385_) == (32'b00000000000000000000000000100000)); - assign _zz_376_ = (1'b0); - assign _zz_377_ = ((_zz_386_ == _zz_387_) != (1'b0)); - assign _zz_378_ = ({_zz_388_,_zz_389_} != (2'b00)); - assign _zz_379_ = {(_zz_390_ != _zz_391_),{_zz_392_,{_zz_393_,_zz_394_}}}; - assign _zz_380_ = (32'b00000000000000000000000001000100); - assign _zz_381_ = (decode_INSTRUCTION & (32'b00000000000000000010000000010100)); - assign _zz_382_ = (32'b00000000000000000010000000010000); - assign _zz_383_ = (decode_INSTRUCTION & (32'b01000000000000000100000000110100)); - assign _zz_384_ = (32'b01000000000000000000000000110000); - assign _zz_385_ = (32'b00000000000000000000000000100000); - assign _zz_386_ = (decode_INSTRUCTION & (32'b00000000000000000001000001001000)); - assign _zz_387_ = (32'b00000000000000000001000000001000); - assign _zz_388_ = ((decode_INSTRUCTION & _zz_395_) == (32'b00000000000000000000000000100000)); - assign _zz_389_ = ((decode_INSTRUCTION & _zz_396_) == (32'b00000000000000000000000000100000)); - assign _zz_390_ = {_zz_138_,{_zz_397_,{_zz_398_,_zz_399_}}}; - assign _zz_391_ = (6'b000000); - assign _zz_392_ = ({_zz_400_,_zz_401_} != (2'b00)); - assign _zz_393_ = ({_zz_402_,_zz_403_} != (4'b0000)); - assign _zz_394_ = {(_zz_404_ != _zz_405_),{_zz_406_,{_zz_407_,_zz_408_}}}; - assign _zz_395_ = (32'b00000000000000000000000000110100); - assign _zz_396_ = (32'b00000000000000000000000001100100); - assign _zz_397_ = ((decode_INSTRUCTION & _zz_409_) == (32'b00000000000000000001000000010000)); - assign _zz_398_ = (_zz_410_ == _zz_411_); - assign _zz_399_ = {_zz_412_,{_zz_413_,_zz_414_}}; - assign _zz_400_ = ((decode_INSTRUCTION & _zz_415_) == (32'b00000000000000000010000000000000)); - assign _zz_401_ = ((decode_INSTRUCTION & _zz_416_) == (32'b00000000000000000001000000000000)); - assign _zz_402_ = (_zz_417_ == _zz_418_); - assign _zz_403_ = {_zz_419_,{_zz_420_,_zz_421_}}; - assign _zz_404_ = (_zz_422_ == _zz_423_); - assign _zz_405_ = (1'b0); - assign _zz_406_ = ({_zz_424_,_zz_425_} != (2'b00)); - assign _zz_407_ = (_zz_426_ != _zz_427_); - assign _zz_408_ = {_zz_428_,{_zz_429_,_zz_430_}}; - assign _zz_409_ = (32'b00000000000000000001000000010000); - assign _zz_410_ = (decode_INSTRUCTION & (32'b00000000000000000010000000010000)); - assign _zz_411_ = (32'b00000000000000000010000000010000); - assign _zz_412_ = ((decode_INSTRUCTION & _zz_431_) == (32'b00000000000000000000000000010000)); - assign _zz_413_ = (_zz_432_ == _zz_433_); - assign _zz_414_ = (_zz_434_ == _zz_435_); - assign _zz_415_ = (32'b00000000000000000010000000010000); - assign _zz_416_ = (32'b00000000000000000101000000000000); - assign _zz_417_ = (decode_INSTRUCTION & (32'b00000000000000000000000001000100)); - assign _zz_418_ = (32'b00000000000000000000000000000000); - assign _zz_419_ = ((decode_INSTRUCTION & _zz_436_) == (32'b00000000000000000000000000000000)); - assign _zz_420_ = (_zz_437_ == _zz_438_); - assign _zz_421_ = (_zz_439_ == _zz_440_); - assign _zz_422_ = (decode_INSTRUCTION & (32'b00000000000000000011000001010000)); - assign _zz_423_ = (32'b00000000000000000000000001010000); - assign _zz_424_ = _zz_138_; - assign _zz_425_ = (_zz_441_ == _zz_442_); - assign _zz_426_ = (_zz_443_ == _zz_444_); - assign _zz_427_ = (1'b0); - assign _zz_428_ = (_zz_445_ != (1'b0)); - assign _zz_429_ = (_zz_446_ != _zz_447_); - assign _zz_430_ = {_zz_448_,{_zz_449_,_zz_450_}}; - assign _zz_431_ = (32'b00000000000000000000000001010000); - assign _zz_432_ = (decode_INSTRUCTION & (32'b00000000000000000000000000001100)); - assign _zz_433_ = (32'b00000000000000000000000000000100); - assign _zz_434_ = (decode_INSTRUCTION & (32'b00000000000000000000000000101000)); - assign _zz_435_ = (32'b00000000000000000000000000000000); - assign _zz_436_ = (32'b00000000000000000000000000011000); - assign _zz_437_ = (decode_INSTRUCTION & (32'b00000000000000000110000000000100)); - assign _zz_438_ = (32'b00000000000000000010000000000000); - assign _zz_439_ = (decode_INSTRUCTION & (32'b00000000000000000101000000000100)); - assign _zz_440_ = (32'b00000000000000000001000000000000); - assign _zz_441_ = (decode_INSTRUCTION & (32'b00000000000000000000000000011100)); - assign _zz_442_ = (32'b00000000000000000000000000000100); - assign _zz_443_ = (decode_INSTRUCTION & (32'b00000000000000000000000001011000)); - assign _zz_444_ = (32'b00000000000000000000000001000000); - assign _zz_445_ = ((decode_INSTRUCTION & (32'b00000010000000000100000001110100)) == (32'b00000010000000000000000000110000)); - assign _zz_446_ = ((decode_INSTRUCTION & (32'b00000000000000000001000000000000)) == (32'b00000000000000000001000000000000)); - assign _zz_447_ = (1'b0); - assign _zz_448_ = (_zz_137_ != (1'b0)); - assign _zz_449_ = ({_zz_451_,{_zz_452_,_zz_453_}} != (3'b000)); - assign _zz_450_ = {({_zz_454_,_zz_455_} != (2'b00)),{(_zz_456_ != _zz_457_),{_zz_458_,{_zz_459_,_zz_460_}}}}; - assign _zz_451_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001100100)) == (32'b00000000000000000000000000100100)); - assign _zz_452_ = ((decode_INSTRUCTION & _zz_461_) == (32'b00000000000000000001000000010000)); - assign _zz_453_ = ((decode_INSTRUCTION & _zz_462_) == (32'b00000000000000000001000000010000)); - assign _zz_454_ = ((decode_INSTRUCTION & _zz_463_) == (32'b00000000000000000110000000010000)); - assign _zz_455_ = ((decode_INSTRUCTION & _zz_464_) == (32'b00000000000000000100000000010000)); - assign _zz_456_ = ((decode_INSTRUCTION & _zz_465_) == (32'b00000000000000000010000000010000)); - assign _zz_457_ = (1'b0); - assign _zz_458_ = ({_zz_466_,_zz_467_} != (2'b00)); - assign _zz_459_ = ({_zz_468_,_zz_469_} != (3'b000)); - assign _zz_460_ = {(_zz_470_ != _zz_471_),{_zz_472_,{_zz_473_,_zz_474_}}}; - assign _zz_461_ = (32'b00000000000000000011000000110100); - assign _zz_462_ = (32'b00000010000000000011000001010100); - assign _zz_463_ = (32'b00000000000000000110000000010100); - assign _zz_464_ = (32'b00000000000000000101000000010100); - assign _zz_465_ = (32'b00000000000000000110000000010100); - assign _zz_466_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000110100)) == (32'b00000000000000000101000000010000)); - assign _zz_467_ = ((decode_INSTRUCTION & (32'b00000010000000000111000001100100)) == (32'b00000000000000000101000000100000)); - assign _zz_468_ = ((decode_INSTRUCTION & _zz_475_) == (32'b01000000000000000001000000010000)); - assign _zz_469_ = {(_zz_476_ == _zz_477_),(_zz_478_ == _zz_479_)}; - assign _zz_470_ = {_zz_136_,{_zz_480_,_zz_481_}}; - assign _zz_471_ = (3'b000); - assign _zz_472_ = ((_zz_482_ == _zz_483_) != (1'b0)); - assign _zz_473_ = ({_zz_484_,_zz_485_} != (2'b00)); - assign _zz_474_ = (_zz_486_ != (1'b0)); - assign _zz_475_ = (32'b01000000000000000011000001010100); - assign _zz_476_ = (decode_INSTRUCTION & (32'b00000000000000000111000000110100)); - assign _zz_477_ = (32'b00000000000000000001000000010000); - assign _zz_478_ = (decode_INSTRUCTION & (32'b00000010000000000111000001010100)); - assign _zz_479_ = (32'b00000000000000000001000000010000); - assign _zz_480_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000110000)) == (32'b00000000000000000000000000010000)); - assign _zz_481_ = ((decode_INSTRUCTION & (32'b00000010000000000000000001100000)) == (32'b00000000000000000000000000100000)); - assign _zz_482_ = (decode_INSTRUCTION & (32'b00000000000000000000000001011000)); - assign _zz_483_ = (32'b00000000000000000000000000000000); - assign _zz_484_ = ((decode_INSTRUCTION & (32'b00000000000000000001000001010000)) == (32'b00000000000000000001000001010000)); - assign _zz_485_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001010000)) == (32'b00000000000000000010000001010000)); - assign _zz_486_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000010000)) == (32'b00000000000000000000000000010000)); - assign _zz_487_ = (32'b00000000000000000001000001111111); - assign _zz_488_ = (decode_INSTRUCTION & (32'b00000000000000000010000001111111)); - assign _zz_489_ = (32'b00000000000000000010000001110011); - assign _zz_490_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001111111)) == (32'b00000000000000000100000001100011)); - assign _zz_491_ = ((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000010000000010011)); - assign _zz_492_ = {((decode_INSTRUCTION & (32'b00000000000000000110000000111111)) == (32'b00000000000000000000000000100011)),{((decode_INSTRUCTION & (32'b00000000000000000010000001111111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_493_) == (32'b00000000000000000000000000000011)),{(_zz_494_ == _zz_495_),{_zz_496_,{_zz_497_,_zz_498_}}}}}}; - assign _zz_493_ = (32'b00000000000000000101000001011111); - assign _zz_494_ = (decode_INSTRUCTION & (32'b00000000000000000111000001111011)); - assign _zz_495_ = (32'b00000000000000000000000001100011); - assign _zz_496_ = ((decode_INSTRUCTION & (32'b00000000000000000110000001111111)) == (32'b00000000000000000000000000001111)); - assign _zz_497_ = ((decode_INSTRUCTION & (32'b11111100000000000000000001111111)) == (32'b00000000000000000000000000110011)); - assign _zz_498_ = {((decode_INSTRUCTION & (32'b11111100000000000011000001011111)) == (32'b00000000000000000001000000010011)),{((decode_INSTRUCTION & (32'b10111100000000000111000001111111)) == (32'b00000000000000000101000000010011)),{((decode_INSTRUCTION & _zz_499_) == (32'b00000000000000000101000000110011)),{(_zz_500_ == _zz_501_),(_zz_502_ == _zz_503_)}}}}; - assign _zz_499_ = (32'b10111110000000000111000001111111); - assign _zz_500_ = (decode_INSTRUCTION & (32'b10111110000000000111000001111111)); - assign _zz_501_ = (32'b00000000000000000000000000110011); - assign _zz_502_ = (decode_INSTRUCTION & (32'b11011111111111111111111111111111)); - assign _zz_503_ = (32'b00010000001000000000000001110011); - assign _zz_504_ = execute_INSTRUCTION[31]; - assign _zz_505_ = execute_INSTRUCTION[31]; - assign _zz_506_ = execute_INSTRUCTION[7]; - always @ (posedge clk) begin - if(_zz_52_) begin - RegFilePlugin_regFile[lastStageRegFileWrite_payload_address] <= lastStageRegFileWrite_payload_data; - end - end - - always @ (posedge clk) begin - if(_zz_342_) begin - _zz_214_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress1]; - end - end - - always @ (posedge clk) begin - if(_zz_343_) begin - _zz_215_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress2]; - end - end - - InstructionCache IBusCachedPlugin_cache ( - .io_flush(_zz_205_), - .io_cpu_prefetch_isValid(_zz_206_), - .io_cpu_prefetch_haltIt(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt), - .io_cpu_prefetch_pc(IBusCachedPlugin_iBusRsp_stages_0_input_payload), - .io_cpu_fetch_isValid(_zz_207_), - .io_cpu_fetch_isStuck(_zz_208_), - .io_cpu_fetch_isRemoved(IBusCachedPlugin_fetcherflushIt), - .io_cpu_fetch_pc(IBusCachedPlugin_iBusRsp_stages_1_input_payload), - .io_cpu_fetch_data(IBusCachedPlugin_cache_io_cpu_fetch_data), - .io_cpu_fetch_dataBypassValid(IBusCachedPlugin_s1_tightlyCoupledHit), - .io_cpu_fetch_dataBypass(_zz_209_), - .io_cpu_fetch_mmuBus_cmd_isValid(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid), - .io_cpu_fetch_mmuBus_cmd_virtualAddress(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress), - .io_cpu_fetch_mmuBus_cmd_bypassTranslation(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation), - .io_cpu_fetch_mmuBus_rsp_physicalAddress(IBusCachedPlugin_mmuBus_rsp_physicalAddress), - .io_cpu_fetch_mmuBus_rsp_isIoAccess(IBusCachedPlugin_mmuBus_rsp_isIoAccess), - .io_cpu_fetch_mmuBus_rsp_allowRead(IBusCachedPlugin_mmuBus_rsp_allowRead), - .io_cpu_fetch_mmuBus_rsp_allowWrite(IBusCachedPlugin_mmuBus_rsp_allowWrite), - .io_cpu_fetch_mmuBus_rsp_allowExecute(IBusCachedPlugin_mmuBus_rsp_allowExecute), - .io_cpu_fetch_mmuBus_rsp_exception(IBusCachedPlugin_mmuBus_rsp_exception), - .io_cpu_fetch_mmuBus_rsp_refilling(IBusCachedPlugin_mmuBus_rsp_refilling), - .io_cpu_fetch_mmuBus_end(IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end), - .io_cpu_fetch_mmuBus_busy(IBusCachedPlugin_mmuBus_busy), - .io_cpu_fetch_physicalAddress(IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress), - .io_cpu_fetch_haltIt(IBusCachedPlugin_cache_io_cpu_fetch_haltIt), - .io_cpu_decode_isValid(_zz_210_), - .io_cpu_decode_isStuck(_zz_211_), - .io_cpu_decode_pc(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload), - .io_cpu_decode_physicalAddress(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), - .io_cpu_decode_data(IBusCachedPlugin_cache_io_cpu_decode_data), - .io_cpu_decode_cacheMiss(IBusCachedPlugin_cache_io_cpu_decode_cacheMiss), - .io_cpu_decode_error(IBusCachedPlugin_cache_io_cpu_decode_error), - .io_cpu_decode_mmuRefilling(IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling), - .io_cpu_decode_mmuException(IBusCachedPlugin_cache_io_cpu_decode_mmuException), - .io_cpu_decode_isUser(_zz_212_), - .io_cpu_fill_valid(_zz_213_), - .io_cpu_fill_payload(IBusCachedPlugin_cache_io_cpu_decode_physicalAddress), - .io_mem_cmd_valid(IBusCachedPlugin_cache_io_mem_cmd_valid), - .io_mem_cmd_ready(iBus_cmd_ready), - .io_mem_cmd_payload_address(IBusCachedPlugin_cache_io_mem_cmd_payload_address), - .io_mem_cmd_payload_size(IBusCachedPlugin_cache_io_mem_cmd_payload_size), - .io_mem_rsp_valid(iBus_rsp_valid), - .io_mem_rsp_payload_data(iBus_rsp_payload_data), - .io_mem_rsp_payload_error(iBus_rsp_payload_error), - .clk(clk), - .reset(reset) - ); - always @(*) begin - case(_zz_344_) - 3'b000 : begin - _zz_216_ = CsrPlugin_jumpInterface_payload; - end - 3'b001 : begin - _zz_216_ = DBusSimplePlugin_redoBranch_payload; - end - 3'b010 : begin - _zz_216_ = BranchPlugin_jumpInterface_payload; - end - 3'b011 : begin - _zz_216_ = IBusCachedPlugin_redoBranch_payload; - end - default : begin - _zz_216_ = IBusCachedPlugin_predictionJumpInterface_payload; - end - endcase - end - - `ifndef SYNTHESIS - always @(*) begin - case(decode_ALU_CTRL) - `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_ALU_CTRL_string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_ALU_CTRL_string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : decode_ALU_CTRL_string = "BITWISE "; - default : decode_ALU_CTRL_string = "????????"; - endcase - end - always @(*) begin - case(_zz_1_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_1__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_1__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_1__string = "BITWISE "; - default : _zz_1__string = "????????"; - endcase - end - always @(*) begin - case(_zz_2_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_2__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_2__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_2__string = "BITWISE "; - default : _zz_2__string = "????????"; - endcase - end - always @(*) begin - case(_zz_3_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_3__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_3__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_3__string = "BITWISE "; - default : _zz_3__string = "????????"; - endcase - end - always @(*) begin - case(decode_ALU_BITWISE_CTRL) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_ALU_BITWISE_CTRL_string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_ALU_BITWISE_CTRL_string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_ALU_BITWISE_CTRL_string = "AND_1"; - default : decode_ALU_BITWISE_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(_zz_4_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_4__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_4__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_4__string = "AND_1"; - default : _zz_4__string = "?????"; - endcase - end - always @(*) begin - case(_zz_5_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_5__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_5__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_5__string = "AND_1"; - default : _zz_5__string = "?????"; - endcase - end - always @(*) begin - case(_zz_6_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_6__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_6__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_6__string = "AND_1"; - default : _zz_6__string = "?????"; - endcase - end - always @(*) begin - case(decode_SRC2_CTRL) - `Src2CtrlEnum_defaultEncoding_RS : decode_SRC2_CTRL_string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : decode_SRC2_CTRL_string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : decode_SRC2_CTRL_string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : decode_SRC2_CTRL_string = "PC "; - default : decode_SRC2_CTRL_string = "???"; - endcase - end - always @(*) begin - case(_zz_7_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_7__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_7__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_7__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_7__string = "PC "; - default : _zz_7__string = "???"; - endcase - end - always @(*) begin - case(_zz_8_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_8__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_8__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_8__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_8__string = "PC "; - default : _zz_8__string = "???"; - endcase - end - always @(*) begin - case(_zz_9_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_9__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_9__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_9__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_9__string = "PC "; - default : _zz_9__string = "???"; - endcase - end - always @(*) begin - case(_zz_10_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_10__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_10__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_10__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_10__string = "JALR"; - default : _zz_10__string = "????"; - endcase - end - always @(*) begin - case(_zz_11_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_11__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_11__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_11__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_11__string = "JALR"; - default : _zz_11__string = "????"; - endcase - end - always @(*) begin - case(decode_SRC1_CTRL) - `Src1CtrlEnum_defaultEncoding_RS : decode_SRC1_CTRL_string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : decode_SRC1_CTRL_string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_SRC1_CTRL_string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : decode_SRC1_CTRL_string = "URS1 "; - default : decode_SRC1_CTRL_string = "????????????"; - endcase - end - always @(*) begin - case(_zz_12_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_12__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_12__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_12__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_12__string = "URS1 "; - default : _zz_12__string = "????????????"; - endcase - end - always @(*) begin - case(_zz_13_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_13__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_13__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_13__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_13__string = "URS1 "; - default : _zz_13__string = "????????????"; - endcase - end - always @(*) begin - case(_zz_14_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_14__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_14__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_14__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_14__string = "URS1 "; - default : _zz_14__string = "????????????"; - endcase - end - always @(*) begin - case(_zz_15_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_15__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_15__string = "XRET"; - default : _zz_15__string = "????"; - endcase - end - always @(*) begin - case(_zz_16_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_16__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_16__string = "XRET"; - default : _zz_16__string = "????"; - endcase - end - always @(*) begin - case(_zz_17_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_17__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_17__string = "XRET"; - default : _zz_17__string = "????"; - endcase - end - always @(*) begin - case(_zz_18_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_18__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_18__string = "XRET"; - default : _zz_18__string = "????"; - endcase - end - always @(*) begin - case(decode_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : decode_ENV_CTRL_string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : decode_ENV_CTRL_string = "XRET"; - default : decode_ENV_CTRL_string = "????"; - endcase - end - always @(*) begin - case(_zz_19_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_19__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_19__string = "XRET"; - default : _zz_19__string = "????"; - endcase - end - always @(*) begin - case(_zz_20_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_20__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_20__string = "XRET"; - default : _zz_20__string = "????"; - endcase - end - always @(*) begin - case(_zz_21_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_21__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_21__string = "XRET"; - default : _zz_21__string = "????"; - endcase - end - always @(*) begin - case(decode_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_SHIFT_CTRL_string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_SHIFT_CTRL_string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_SHIFT_CTRL_string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_SHIFT_CTRL_string = "SRA_1 "; - default : decode_SHIFT_CTRL_string = "?????????"; - endcase - end - always @(*) begin - case(_zz_22_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_22__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_22__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_22__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_22__string = "SRA_1 "; - default : _zz_22__string = "?????????"; - endcase - end - always @(*) begin - case(_zz_23_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_23__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_23__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_23__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_23__string = "SRA_1 "; - default : _zz_23__string = "?????????"; - endcase - end - always @(*) begin - case(_zz_24_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_24__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_24__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_24__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_24__string = "SRA_1 "; - default : _zz_24__string = "?????????"; - endcase - end - always @(*) begin - case(memory_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : memory_ENV_CTRL_string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : memory_ENV_CTRL_string = "XRET"; - default : memory_ENV_CTRL_string = "????"; - endcase - end - always @(*) begin - case(_zz_25_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_25__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_25__string = "XRET"; - default : _zz_25__string = "????"; - endcase - end - always @(*) begin - case(execute_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : execute_ENV_CTRL_string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : execute_ENV_CTRL_string = "XRET"; - default : execute_ENV_CTRL_string = "????"; - endcase - end - always @(*) begin - case(_zz_26_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_26__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_26__string = "XRET"; - default : _zz_26__string = "????"; - endcase - end - always @(*) begin - case(writeBack_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : writeBack_ENV_CTRL_string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : writeBack_ENV_CTRL_string = "XRET"; - default : writeBack_ENV_CTRL_string = "????"; - endcase - end - always @(*) begin - case(_zz_29_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_29__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_29__string = "XRET"; - default : _zz_29__string = "????"; - endcase - end - always @(*) begin - case(execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_INC : execute_BRANCH_CTRL_string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : execute_BRANCH_CTRL_string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : execute_BRANCH_CTRL_string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : execute_BRANCH_CTRL_string = "JALR"; - default : execute_BRANCH_CTRL_string = "????"; - endcase - end - always @(*) begin - case(_zz_32_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_32__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_32__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_32__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_32__string = "JALR"; - default : _zz_32__string = "????"; - endcase - end - always @(*) begin - case(execute_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : execute_SHIFT_CTRL_string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : execute_SHIFT_CTRL_string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : execute_SHIFT_CTRL_string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : execute_SHIFT_CTRL_string = "SRA_1 "; - default : execute_SHIFT_CTRL_string = "?????????"; - endcase - end - always @(*) begin - case(_zz_37_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_37__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_37__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_37__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_37__string = "SRA_1 "; - default : _zz_37__string = "?????????"; - endcase - end - always @(*) begin - case(execute_SRC2_CTRL) - `Src2CtrlEnum_defaultEncoding_RS : execute_SRC2_CTRL_string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : execute_SRC2_CTRL_string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : execute_SRC2_CTRL_string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : execute_SRC2_CTRL_string = "PC "; - default : execute_SRC2_CTRL_string = "???"; - endcase - end - always @(*) begin - case(_zz_42_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_42__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_42__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_42__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_42__string = "PC "; - default : _zz_42__string = "???"; - endcase - end - always @(*) begin - case(execute_SRC1_CTRL) - `Src1CtrlEnum_defaultEncoding_RS : execute_SRC1_CTRL_string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : execute_SRC1_CTRL_string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : execute_SRC1_CTRL_string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : execute_SRC1_CTRL_string = "URS1 "; - default : execute_SRC1_CTRL_string = "????????????"; - endcase - end - always @(*) begin - case(_zz_44_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_44__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_44__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_44__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_44__string = "URS1 "; - default : _zz_44__string = "????????????"; - endcase - end - always @(*) begin - case(execute_ALU_CTRL) - `AluCtrlEnum_defaultEncoding_ADD_SUB : execute_ALU_CTRL_string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : execute_ALU_CTRL_string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : execute_ALU_CTRL_string = "BITWISE "; - default : execute_ALU_CTRL_string = "????????"; - endcase - end - always @(*) begin - case(_zz_47_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_47__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_47__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_47__string = "BITWISE "; - default : _zz_47__string = "????????"; - endcase - end - always @(*) begin - case(execute_ALU_BITWISE_CTRL) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : execute_ALU_BITWISE_CTRL_string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : execute_ALU_BITWISE_CTRL_string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : execute_ALU_BITWISE_CTRL_string = "AND_1"; - default : execute_ALU_BITWISE_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(_zz_49_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_49__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_49__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_49__string = "AND_1"; - default : _zz_49__string = "?????"; - endcase - end - always @(*) begin - case(_zz_56_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_56__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_56__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_56__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_56__string = "URS1 "; - default : _zz_56__string = "????????????"; - endcase - end - always @(*) begin - case(_zz_59_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_59__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_59__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_59__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_59__string = "PC "; - default : _zz_59__string = "???"; - endcase - end - always @(*) begin - case(_zz_67_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_67__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_67__string = "XRET"; - default : _zz_67__string = "????"; - endcase - end - always @(*) begin - case(_zz_68_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_68__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_68__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_68__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_68__string = "JALR"; - default : _zz_68__string = "????"; - endcase - end - always @(*) begin - case(_zz_70_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_70__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_70__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_70__string = "AND_1"; - default : _zz_70__string = "?????"; - endcase - end - always @(*) begin - case(_zz_72_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_72__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_72__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_72__string = "BITWISE "; - default : _zz_72__string = "????????"; - endcase - end - always @(*) begin - case(_zz_73_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_73__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_73__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_73__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_73__string = "SRA_1 "; - default : _zz_73__string = "?????????"; - endcase - end - always @(*) begin - case(decode_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_INC : decode_BRANCH_CTRL_string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : decode_BRANCH_CTRL_string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : decode_BRANCH_CTRL_string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : decode_BRANCH_CTRL_string = "JALR"; - default : decode_BRANCH_CTRL_string = "????"; - endcase - end - always @(*) begin - case(_zz_95_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_95__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_95__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_95__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_95__string = "JALR"; - default : _zz_95__string = "????"; - endcase - end - always @(*) begin - case(_zz_142_) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_142__string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_142__string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_142__string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_142__string = "SRA_1 "; - default : _zz_142__string = "?????????"; - endcase - end - always @(*) begin - case(_zz_143_) - `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_143__string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_143__string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : _zz_143__string = "BITWISE "; - default : _zz_143__string = "????????"; - endcase - end - always @(*) begin - case(_zz_144_) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_144__string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_144__string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_144__string = "AND_1"; - default : _zz_144__string = "?????"; - endcase - end - always @(*) begin - case(_zz_145_) - `BranchCtrlEnum_defaultEncoding_INC : _zz_145__string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : _zz_145__string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : _zz_145__string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : _zz_145__string = "JALR"; - default : _zz_145__string = "????"; - endcase - end - always @(*) begin - case(_zz_146_) - `EnvCtrlEnum_defaultEncoding_NONE : _zz_146__string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : _zz_146__string = "XRET"; - default : _zz_146__string = "????"; - endcase - end - always @(*) begin - case(_zz_147_) - `Src2CtrlEnum_defaultEncoding_RS : _zz_147__string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : _zz_147__string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : _zz_147__string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : _zz_147__string = "PC "; - default : _zz_147__string = "???"; - endcase - end - always @(*) begin - case(_zz_148_) - `Src1CtrlEnum_defaultEncoding_RS : _zz_148__string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : _zz_148__string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_148__string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : _zz_148__string = "URS1 "; - default : _zz_148__string = "????????????"; - endcase - end - always @(*) begin - case(decode_to_execute_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_to_execute_SHIFT_CTRL_string = "DISABLE_1"; - `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_to_execute_SHIFT_CTRL_string = "SLL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_to_execute_SHIFT_CTRL_string = "SRL_1 "; - `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_to_execute_SHIFT_CTRL_string = "SRA_1 "; - default : decode_to_execute_SHIFT_CTRL_string = "?????????"; - endcase - end - always @(*) begin - case(decode_to_execute_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : decode_to_execute_ENV_CTRL_string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : decode_to_execute_ENV_CTRL_string = "XRET"; - default : decode_to_execute_ENV_CTRL_string = "????"; - endcase - end - always @(*) begin - case(execute_to_memory_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : execute_to_memory_ENV_CTRL_string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : execute_to_memory_ENV_CTRL_string = "XRET"; - default : execute_to_memory_ENV_CTRL_string = "????"; - endcase - end - always @(*) begin - case(memory_to_writeBack_ENV_CTRL) - `EnvCtrlEnum_defaultEncoding_NONE : memory_to_writeBack_ENV_CTRL_string = "NONE"; - `EnvCtrlEnum_defaultEncoding_XRET : memory_to_writeBack_ENV_CTRL_string = "XRET"; - default : memory_to_writeBack_ENV_CTRL_string = "????"; - endcase - end - always @(*) begin - case(decode_to_execute_SRC1_CTRL) - `Src1CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC1_CTRL_string = "RS "; - `Src1CtrlEnum_defaultEncoding_IMU : decode_to_execute_SRC1_CTRL_string = "IMU "; - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_to_execute_SRC1_CTRL_string = "PC_INCREMENT"; - `Src1CtrlEnum_defaultEncoding_URS1 : decode_to_execute_SRC1_CTRL_string = "URS1 "; - default : decode_to_execute_SRC1_CTRL_string = "????????????"; - endcase - end - always @(*) begin - case(decode_to_execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_INC : decode_to_execute_BRANCH_CTRL_string = "INC "; - `BranchCtrlEnum_defaultEncoding_B : decode_to_execute_BRANCH_CTRL_string = "B "; - `BranchCtrlEnum_defaultEncoding_JAL : decode_to_execute_BRANCH_CTRL_string = "JAL "; - `BranchCtrlEnum_defaultEncoding_JALR : decode_to_execute_BRANCH_CTRL_string = "JALR"; - default : decode_to_execute_BRANCH_CTRL_string = "????"; - endcase - end - always @(*) begin - case(decode_to_execute_SRC2_CTRL) - `Src2CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC2_CTRL_string = "RS "; - `Src2CtrlEnum_defaultEncoding_IMI : decode_to_execute_SRC2_CTRL_string = "IMI"; - `Src2CtrlEnum_defaultEncoding_IMS : decode_to_execute_SRC2_CTRL_string = "IMS"; - `Src2CtrlEnum_defaultEncoding_PC : decode_to_execute_SRC2_CTRL_string = "PC "; - default : decode_to_execute_SRC2_CTRL_string = "???"; - endcase - end - always @(*) begin - case(decode_to_execute_ALU_BITWISE_CTRL) - `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "XOR_1"; - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "OR_1 "; - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "AND_1"; - default : decode_to_execute_ALU_BITWISE_CTRL_string = "?????"; - endcase - end - always @(*) begin - case(decode_to_execute_ALU_CTRL) - `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_to_execute_ALU_CTRL_string = "ADD_SUB "; - `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_to_execute_ALU_CTRL_string = "SLT_SLTU"; - `AluCtrlEnum_defaultEncoding_BITWISE : decode_to_execute_ALU_CTRL_string = "BITWISE "; - default : decode_to_execute_ALU_CTRL_string = "????????"; - endcase - end - `endif - - assign decode_ALU_CTRL = _zz_1_; - assign _zz_2_ = _zz_3_; - assign decode_ALU_BITWISE_CTRL = _zz_4_; - assign _zz_5_ = _zz_6_; - assign decode_SRC2_CTRL = _zz_7_; - assign _zz_8_ = _zz_9_; - assign decode_IS_RS2_SIGNED = _zz_58_; - assign decode_BYPASSABLE_EXECUTE_STAGE = _zz_74_; - assign decode_IS_RS1_SIGNED = _zz_55_; - assign decode_CSR_READ_OPCODE = _zz_27_; - assign decode_IS_DIV = _zz_57_; - assign memory_MEMORY_ADDRESS_LOW = execute_to_memory_MEMORY_ADDRESS_LOW; - assign execute_MEMORY_ADDRESS_LOW = _zz_89_; - assign decode_IS_MUL = _zz_69_; - assign execute_BRANCH_CALC = _zz_30_; - assign _zz_10_ = _zz_11_; - assign decode_SRC1_CTRL = _zz_12_; - assign _zz_13_ = _zz_14_; - assign execute_BYPASSABLE_MEMORY_STAGE = decode_to_execute_BYPASSABLE_MEMORY_STAGE; - assign decode_BYPASSABLE_MEMORY_STAGE = _zz_77_; - assign decode_SRC2_FORCE_ZERO = _zz_46_; - assign decode_CSR_WRITE_OPCODE = _zz_28_; - assign writeBack_REGFILE_WRITE_DATA = memory_to_writeBack_REGFILE_WRITE_DATA; - assign execute_REGFILE_WRITE_DATA = _zz_48_; - assign execute_BRANCH_DO = _zz_31_; - assign decode_SRC_LESS_UNSIGNED = _zz_65_; - assign _zz_15_ = _zz_16_; - assign _zz_17_ = _zz_18_; - assign decode_ENV_CTRL = _zz_19_; - assign _zz_20_ = _zz_21_; - assign writeBack_FORMAL_PC_NEXT = memory_to_writeBack_FORMAL_PC_NEXT; - assign memory_FORMAL_PC_NEXT = execute_to_memory_FORMAL_PC_NEXT; - assign execute_FORMAL_PC_NEXT = decode_to_execute_FORMAL_PC_NEXT; - assign decode_FORMAL_PC_NEXT = _zz_98_; - assign decode_MEMORY_STORE = _zz_61_; - assign decode_PREDICTION_HAD_BRANCHED2 = _zz_34_; - assign decode_IS_CSR = _zz_76_; - assign decode_SHIFT_CTRL = _zz_22_; - assign _zz_23_ = _zz_24_; - assign memory_MEMORY_READ_DATA = _zz_80_; - assign execute_IS_RS1_SIGNED = decode_to_execute_IS_RS1_SIGNED; - assign execute_IS_DIV = decode_to_execute_IS_DIV; - assign execute_IS_MUL = decode_to_execute_IS_MUL; - assign execute_IS_RS2_SIGNED = decode_to_execute_IS_RS2_SIGNED; - assign memory_IS_DIV = execute_to_memory_IS_DIV; - assign memory_IS_MUL = execute_to_memory_IS_MUL; - assign execute_CSR_READ_OPCODE = decode_to_execute_CSR_READ_OPCODE; - assign execute_CSR_WRITE_OPCODE = decode_to_execute_CSR_WRITE_OPCODE; - assign execute_IS_CSR = decode_to_execute_IS_CSR; - assign memory_ENV_CTRL = _zz_25_; - assign execute_ENV_CTRL = _zz_26_; - assign writeBack_ENV_CTRL = _zz_29_; - assign memory_BRANCH_CALC = execute_to_memory_BRANCH_CALC; - assign memory_BRANCH_DO = execute_to_memory_BRANCH_DO; - assign execute_PC = decode_to_execute_PC; - assign execute_PREDICTION_HAD_BRANCHED2 = decode_to_execute_PREDICTION_HAD_BRANCHED2; - assign execute_RS1 = decode_to_execute_RS1; - assign execute_BRANCH_COND_RESULT = _zz_33_; - assign execute_BRANCH_CTRL = _zz_32_; - assign decode_RS2_USE = _zz_63_; - assign decode_RS1_USE = _zz_66_; - assign execute_REGFILE_WRITE_VALID = decode_to_execute_REGFILE_WRITE_VALID; - assign execute_BYPASSABLE_EXECUTE_STAGE = decode_to_execute_BYPASSABLE_EXECUTE_STAGE; - always @ (*) begin - _zz_35_ = memory_REGFILE_WRITE_DATA; - if(_zz_217_)begin - _zz_35_ = ((memory_INSTRUCTION[13 : 12] == (2'b00)) ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_accumulator[63 : 32]); - end - if(_zz_218_)begin - _zz_35_ = memory_MulDivIterativePlugin_div_result; - end - end - - assign memory_REGFILE_WRITE_VALID = execute_to_memory_REGFILE_WRITE_VALID; - assign memory_INSTRUCTION = execute_to_memory_INSTRUCTION; - assign memory_BYPASSABLE_MEMORY_STAGE = execute_to_memory_BYPASSABLE_MEMORY_STAGE; - assign writeBack_REGFILE_WRITE_VALID = memory_to_writeBack_REGFILE_WRITE_VALID; - always @ (*) begin - decode_RS2 = _zz_53_; - if(_zz_161_)begin - if((_zz_162_ == decode_INSTRUCTION[24 : 20]))begin - decode_RS2 = _zz_163_; - end - end - if(_zz_219_)begin - if(_zz_220_)begin - if(_zz_165_)begin - decode_RS2 = _zz_79_; - end - end - end - if(_zz_221_)begin - if(memory_BYPASSABLE_MEMORY_STAGE)begin - if(_zz_167_)begin - decode_RS2 = _zz_35_; - end - end - end - if(_zz_222_)begin - if(execute_BYPASSABLE_EXECUTE_STAGE)begin - if(_zz_169_)begin - decode_RS2 = _zz_36_; - end - end - end - end - - always @ (*) begin - decode_RS1 = _zz_54_; - if(_zz_161_)begin - if((_zz_162_ == decode_INSTRUCTION[19 : 15]))begin - decode_RS1 = _zz_163_; - end - end - if(_zz_219_)begin - if(_zz_220_)begin - if(_zz_164_)begin - decode_RS1 = _zz_79_; - end - end - end - if(_zz_221_)begin - if(memory_BYPASSABLE_MEMORY_STAGE)begin - if(_zz_166_)begin - decode_RS1 = _zz_35_; - end - end - end - if(_zz_222_)begin - if(execute_BYPASSABLE_EXECUTE_STAGE)begin - if(_zz_168_)begin - decode_RS1 = _zz_36_; - end - end - end - end - - always @ (*) begin - _zz_36_ = execute_REGFILE_WRITE_DATA; - if(_zz_223_)begin - _zz_36_ = _zz_157_; - end - if(_zz_224_)begin - _zz_36_ = execute_CsrPlugin_readData; - end - end - - assign execute_SHIFT_CTRL = _zz_37_; - assign execute_SRC_LESS_UNSIGNED = decode_to_execute_SRC_LESS_UNSIGNED; - assign execute_SRC2_FORCE_ZERO = decode_to_execute_SRC2_FORCE_ZERO; - assign execute_SRC_USE_SUB_LESS = decode_to_execute_SRC_USE_SUB_LESS; - assign _zz_41_ = execute_PC; - assign execute_SRC2_CTRL = _zz_42_; - assign execute_SRC1_CTRL = _zz_44_; - assign decode_SRC_USE_SUB_LESS = _zz_60_; - assign decode_SRC_ADD_ZERO = _zz_71_; - assign execute_SRC_ADD_SUB = _zz_40_; - assign execute_SRC_LESS = _zz_38_; - assign execute_ALU_CTRL = _zz_47_; - assign execute_SRC2 = _zz_43_; - assign execute_SRC1 = _zz_45_; - assign execute_ALU_BITWISE_CTRL = _zz_49_; - assign _zz_50_ = writeBack_INSTRUCTION; - assign _zz_51_ = writeBack_REGFILE_WRITE_VALID; - always @ (*) begin - _zz_52_ = 1'b0; - if(lastStageRegFileWrite_valid)begin - _zz_52_ = 1'b1; - end - end - - assign decode_INSTRUCTION_ANTICIPATED = _zz_94_; - always @ (*) begin - decode_REGFILE_WRITE_VALID = _zz_64_; - if((decode_INSTRUCTION[11 : 7] == (5'b00000)))begin - decode_REGFILE_WRITE_VALID = 1'b0; - end - end - - assign decode_LEGAL_INSTRUCTION = _zz_78_; - assign decode_INSTRUCTION_READY = 1'b1; - assign writeBack_MEMORY_STORE = memory_to_writeBack_MEMORY_STORE; - always @ (*) begin - _zz_79_ = writeBack_REGFILE_WRITE_DATA; - if((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE))begin - _zz_79_ = writeBack_DBusSimplePlugin_rspFormated; - end - end - - assign writeBack_MEMORY_ENABLE = memory_to_writeBack_MEMORY_ENABLE; - assign writeBack_MEMORY_ADDRESS_LOW = memory_to_writeBack_MEMORY_ADDRESS_LOW; - assign writeBack_MEMORY_READ_DATA = memory_to_writeBack_MEMORY_READ_DATA; - assign memory_MMU_FAULT = execute_to_memory_MMU_FAULT; - assign memory_MMU_RSP_physicalAddress = execute_to_memory_MMU_RSP_physicalAddress; - assign memory_MMU_RSP_isIoAccess = execute_to_memory_MMU_RSP_isIoAccess; - assign memory_MMU_RSP_allowRead = execute_to_memory_MMU_RSP_allowRead; - assign memory_MMU_RSP_allowWrite = execute_to_memory_MMU_RSP_allowWrite; - assign memory_MMU_RSP_allowExecute = execute_to_memory_MMU_RSP_allowExecute; - assign memory_MMU_RSP_exception = execute_to_memory_MMU_RSP_exception; - assign memory_MMU_RSP_refilling = execute_to_memory_MMU_RSP_refilling; - assign memory_PC = execute_to_memory_PC; - assign memory_ALIGNEMENT_FAULT = execute_to_memory_ALIGNEMENT_FAULT; - assign memory_REGFILE_WRITE_DATA = execute_to_memory_REGFILE_WRITE_DATA; - assign memory_MEMORY_STORE = execute_to_memory_MEMORY_STORE; - assign memory_MEMORY_ENABLE = execute_to_memory_MEMORY_ENABLE; - assign execute_MMU_FAULT = _zz_88_; - assign execute_MMU_RSP_physicalAddress = _zz_81_; - assign execute_MMU_RSP_isIoAccess = _zz_82_; - assign execute_MMU_RSP_allowRead = _zz_83_; - assign execute_MMU_RSP_allowWrite = _zz_84_; - assign execute_MMU_RSP_allowExecute = _zz_85_; - assign execute_MMU_RSP_exception = _zz_86_; - assign execute_MMU_RSP_refilling = _zz_87_; - assign execute_SRC_ADD = _zz_39_; - assign execute_RS2 = decode_to_execute_RS2; - assign execute_INSTRUCTION = decode_to_execute_INSTRUCTION; - assign execute_MEMORY_STORE = decode_to_execute_MEMORY_STORE; - assign execute_MEMORY_ENABLE = decode_to_execute_MEMORY_ENABLE; - assign execute_ALIGNEMENT_FAULT = _zz_90_; - assign decode_MEMORY_ENABLE = _zz_75_; - assign decode_FLUSH_ALL = _zz_62_; - always @ (*) begin - IBusCachedPlugin_rsp_issueDetected = _zz_91_; - if(_zz_225_)begin - IBusCachedPlugin_rsp_issueDetected = 1'b1; - end - end - - always @ (*) begin - _zz_91_ = _zz_92_; - if(_zz_226_)begin - _zz_91_ = 1'b1; - end - end - - always @ (*) begin - _zz_92_ = _zz_93_; - if(_zz_227_)begin - _zz_92_ = 1'b1; - end - end - - always @ (*) begin - _zz_93_ = 1'b0; - if(_zz_228_)begin - _zz_93_ = 1'b1; - end - end - - assign decode_BRANCH_CTRL = _zz_95_; - assign decode_INSTRUCTION = _zz_99_; - always @ (*) begin - _zz_96_ = memory_FORMAL_PC_NEXT; - if(DBusSimplePlugin_redoBranch_valid)begin - _zz_96_ = DBusSimplePlugin_redoBranch_payload; - end - if(BranchPlugin_jumpInterface_valid)begin - _zz_96_ = BranchPlugin_jumpInterface_payload; - end - end - - always @ (*) begin - _zz_97_ = decode_FORMAL_PC_NEXT; - if(IBusCachedPlugin_predictionJumpInterface_valid)begin - _zz_97_ = IBusCachedPlugin_predictionJumpInterface_payload; - end - if(IBusCachedPlugin_redoBranch_valid)begin - _zz_97_ = IBusCachedPlugin_redoBranch_payload; - end - end - - assign decode_PC = _zz_100_; - assign writeBack_PC = memory_to_writeBack_PC; - assign writeBack_INSTRUCTION = memory_to_writeBack_INSTRUCTION; - always @ (*) begin - decode_arbitration_haltItself = 1'b0; - if(((DBusSimplePlugin_mmuBus_busy && decode_arbitration_isValid) && decode_MEMORY_ENABLE))begin - decode_arbitration_haltItself = 1'b1; - end - end - - always @ (*) begin - decode_arbitration_haltByOther = 1'b0; - if((decode_arbitration_isValid && (_zz_158_ || _zz_159_)))begin - decode_arbitration_haltByOther = 1'b1; - end - if((CsrPlugin_interrupt_valid && CsrPlugin_allowInterrupts))begin - decode_arbitration_haltByOther = decode_arbitration_isValid; - end - if(({(writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),{(memory_arbitration_isValid && (memory_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),(execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET))}} != (3'b000)))begin - decode_arbitration_haltByOther = 1'b1; - end - end - - always @ (*) begin - decode_arbitration_removeIt = 1'b0; - if(_zz_229_)begin - decode_arbitration_removeIt = 1'b1; - end - if(decode_arbitration_isFlushed)begin - decode_arbitration_removeIt = 1'b1; - end - end - - assign decode_arbitration_flushIt = 1'b0; - always @ (*) begin - decode_arbitration_flushNext = 1'b0; - if(IBusCachedPlugin_redoBranch_valid)begin - decode_arbitration_flushNext = 1'b1; - end - if(_zz_229_)begin - decode_arbitration_flushNext = 1'b1; - end - end - - always @ (*) begin - execute_arbitration_haltItself = 1'b0; - if(((((execute_arbitration_isValid && execute_MEMORY_ENABLE) && (! dBus_cmd_ready)) && (! execute_DBusSimplePlugin_skipCmd)) && (! _zz_128_)))begin - execute_arbitration_haltItself = 1'b1; - end - if(_zz_223_)begin - if(_zz_230_)begin - if(! execute_LightShifterPlugin_done) begin - execute_arbitration_haltItself = 1'b1; - end - end - end - if(_zz_224_)begin - if(execute_CsrPlugin_blockedBySideEffects)begin - execute_arbitration_haltItself = 1'b1; - end - end - end - - assign execute_arbitration_haltByOther = 1'b0; - always @ (*) begin - execute_arbitration_removeIt = 1'b0; - if(execute_arbitration_isFlushed)begin - execute_arbitration_removeIt = 1'b1; - end - end - - assign execute_arbitration_flushIt = 1'b0; - assign execute_arbitration_flushNext = 1'b0; - always @ (*) begin - memory_arbitration_haltItself = 1'b0; - if((((memory_arbitration_isValid && memory_MEMORY_ENABLE) && (! memory_MEMORY_STORE)) && ((! dBus_rsp_ready) || 1'b0)))begin - memory_arbitration_haltItself = 1'b1; - end - if(_zz_217_)begin - if(_zz_231_)begin - memory_arbitration_haltItself = 1'b1; - end - end - if(_zz_218_)begin - if(_zz_232_)begin - memory_arbitration_haltItself = 1'b1; - end - end - end - - assign memory_arbitration_haltByOther = 1'b0; - always @ (*) begin - memory_arbitration_removeIt = 1'b0; - if(_zz_233_)begin - memory_arbitration_removeIt = 1'b1; - end - if(memory_arbitration_isFlushed)begin - memory_arbitration_removeIt = 1'b1; - end - end - - always @ (*) begin - memory_arbitration_flushIt = 1'b0; - if(DBusSimplePlugin_redoBranch_valid)begin - memory_arbitration_flushIt = 1'b1; - end - end - - always @ (*) begin - memory_arbitration_flushNext = 1'b0; - if(DBusSimplePlugin_redoBranch_valid)begin - memory_arbitration_flushNext = 1'b1; - end - if(BranchPlugin_jumpInterface_valid)begin - memory_arbitration_flushNext = 1'b1; - end - if(_zz_233_)begin - memory_arbitration_flushNext = 1'b1; - end - end - - assign writeBack_arbitration_haltItself = 1'b0; - assign writeBack_arbitration_haltByOther = 1'b0; - always @ (*) begin - writeBack_arbitration_removeIt = 1'b0; - if(writeBack_arbitration_isFlushed)begin - writeBack_arbitration_removeIt = 1'b1; - end - end - - assign writeBack_arbitration_flushIt = 1'b0; - always @ (*) begin - writeBack_arbitration_flushNext = 1'b0; - if(_zz_234_)begin - writeBack_arbitration_flushNext = 1'b1; - end - if(_zz_235_)begin - writeBack_arbitration_flushNext = 1'b1; - end - end - - assign lastStageInstruction = writeBack_INSTRUCTION; - assign lastStagePc = writeBack_PC; - assign lastStageIsValid = writeBack_arbitration_isValid; - assign lastStageIsFiring = writeBack_arbitration_isFiring; - always @ (*) begin - IBusCachedPlugin_fetcherHalt = 1'b0; - if(({CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValids_memory,{CsrPlugin_exceptionPortCtrl_exceptionValids_execute,CsrPlugin_exceptionPortCtrl_exceptionValids_decode}}} != (4'b0000)))begin - IBusCachedPlugin_fetcherHalt = 1'b1; - end - if(_zz_234_)begin - IBusCachedPlugin_fetcherHalt = 1'b1; - end - if(_zz_235_)begin - IBusCachedPlugin_fetcherHalt = 1'b1; - end - end - - always @ (*) begin - IBusCachedPlugin_fetcherflushIt = 1'b0; - if(({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,{execute_arbitration_flushNext,decode_arbitration_flushNext}}} != (4'b0000)))begin - IBusCachedPlugin_fetcherflushIt = 1'b1; - end - if((IBusCachedPlugin_predictionJumpInterface_valid && decode_arbitration_isFiring))begin - IBusCachedPlugin_fetcherflushIt = 1'b1; - end - end - - always @ (*) begin - IBusCachedPlugin_incomingInstruction = 1'b0; - if((IBusCachedPlugin_iBusRsp_stages_1_input_valid || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid))begin - IBusCachedPlugin_incomingInstruction = 1'b1; - end - end - - always @ (*) begin - CsrPlugin_jumpInterface_valid = 1'b0; - if(_zz_234_)begin - CsrPlugin_jumpInterface_valid = 1'b1; - end - if(_zz_235_)begin - CsrPlugin_jumpInterface_valid = 1'b1; - end - end - - always @ (*) begin - CsrPlugin_jumpInterface_payload = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - if(_zz_234_)begin - CsrPlugin_jumpInterface_payload = {CsrPlugin_xtvec_base,(2'b00)}; - end - if(_zz_235_)begin - case(_zz_236_) - 2'b11 : begin - CsrPlugin_jumpInterface_payload = CsrPlugin_mepc; - end - default : begin - end - endcase - end - end - - assign CsrPlugin_forceMachineWire = 1'b0; - assign CsrPlugin_allowInterrupts = 1'b1; - assign CsrPlugin_allowException = 1'b1; - assign IBusCachedPlugin_jump_pcLoad_valid = ({CsrPlugin_jumpInterface_valid,{BranchPlugin_jumpInterface_valid,{DBusSimplePlugin_redoBranch_valid,{IBusCachedPlugin_redoBranch_valid,IBusCachedPlugin_predictionJumpInterface_valid}}}} != (5'b00000)); - assign _zz_101_ = {IBusCachedPlugin_predictionJumpInterface_valid,{IBusCachedPlugin_redoBranch_valid,{BranchPlugin_jumpInterface_valid,{DBusSimplePlugin_redoBranch_valid,CsrPlugin_jumpInterface_valid}}}}; - assign _zz_102_ = (_zz_101_ & (~ _zz_255_)); - assign _zz_103_ = _zz_102_[3]; - assign _zz_104_ = _zz_102_[4]; - assign _zz_105_ = (_zz_102_[1] || _zz_103_); - assign _zz_106_ = (_zz_102_[2] || _zz_103_); - assign IBusCachedPlugin_jump_pcLoad_payload = _zz_216_; - always @ (*) begin - IBusCachedPlugin_fetchPc_corrected = 1'b0; - if(IBusCachedPlugin_jump_pcLoad_valid)begin - IBusCachedPlugin_fetchPc_corrected = 1'b1; - end - end - - always @ (*) begin - IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b0; - if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin - IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b1; - end - end - - always @ (*) begin - IBusCachedPlugin_fetchPc_pc = (IBusCachedPlugin_fetchPc_pcReg + _zz_257_); - if(IBusCachedPlugin_jump_pcLoad_valid)begin - IBusCachedPlugin_fetchPc_pc = IBusCachedPlugin_jump_pcLoad_payload; - end - IBusCachedPlugin_fetchPc_pc[0] = 1'b0; - IBusCachedPlugin_fetchPc_pc[1] = 1'b0; - end - - assign IBusCachedPlugin_fetchPc_output_valid = ((! IBusCachedPlugin_fetcherHalt) && IBusCachedPlugin_fetchPc_booted); - assign IBusCachedPlugin_fetchPc_output_payload = IBusCachedPlugin_fetchPc_pc; - assign IBusCachedPlugin_iBusRsp_stages_0_input_valid = IBusCachedPlugin_fetchPc_output_valid; - assign IBusCachedPlugin_fetchPc_output_ready = IBusCachedPlugin_iBusRsp_stages_0_input_ready; - assign IBusCachedPlugin_iBusRsp_stages_0_input_payload = IBusCachedPlugin_fetchPc_output_payload; - assign IBusCachedPlugin_iBusRsp_stages_0_inputSample = 1'b1; - always @ (*) begin - IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b0; - if(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt)begin - IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b1; - end - end - - assign _zz_107_ = (! IBusCachedPlugin_iBusRsp_stages_0_halt); - assign IBusCachedPlugin_iBusRsp_stages_0_input_ready = (IBusCachedPlugin_iBusRsp_stages_0_output_ready && _zz_107_); - assign IBusCachedPlugin_iBusRsp_stages_0_output_valid = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && _zz_107_); - assign IBusCachedPlugin_iBusRsp_stages_0_output_payload = IBusCachedPlugin_iBusRsp_stages_0_input_payload; - always @ (*) begin - IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b0; - if(IBusCachedPlugin_cache_io_cpu_fetch_haltIt)begin - IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b1; - end - end - - assign _zz_108_ = (! IBusCachedPlugin_iBusRsp_stages_1_halt); - assign IBusCachedPlugin_iBusRsp_stages_1_input_ready = (IBusCachedPlugin_iBusRsp_stages_1_output_ready && _zz_108_); - assign IBusCachedPlugin_iBusRsp_stages_1_output_valid = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && _zz_108_); - assign IBusCachedPlugin_iBusRsp_stages_1_output_payload = IBusCachedPlugin_iBusRsp_stages_1_input_payload; - always @ (*) begin - IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b0; - if((IBusCachedPlugin_rsp_issueDetected || IBusCachedPlugin_rsp_iBusRspOutputHalt))begin - IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt = 1'b1; - end - end - - assign _zz_109_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_halt); - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready && _zz_109_); - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && _zz_109_); - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; - assign IBusCachedPlugin_iBusRsp_stages_0_output_ready = _zz_110_; - assign _zz_110_ = ((1'b0 && (! _zz_111_)) || IBusCachedPlugin_iBusRsp_stages_1_input_ready); - assign _zz_111_ = _zz_112_; - assign IBusCachedPlugin_iBusRsp_stages_1_input_valid = _zz_111_; - assign IBusCachedPlugin_iBusRsp_stages_1_input_payload = IBusCachedPlugin_fetchPc_pcReg; - assign IBusCachedPlugin_iBusRsp_stages_1_output_ready = ((1'b0 && (! _zz_113_)) || IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); - assign _zz_113_ = _zz_114_; - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid = _zz_113_; - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload = _zz_115_; - always @ (*) begin - IBusCachedPlugin_iBusRsp_readyForError = 1'b1; - if((! IBusCachedPlugin_pcValids_0))begin - IBusCachedPlugin_iBusRsp_readyForError = 1'b0; - end - end - - assign IBusCachedPlugin_pcValids_0 = IBusCachedPlugin_injector_nextPcCalc_valids_1; - assign IBusCachedPlugin_pcValids_1 = IBusCachedPlugin_injector_nextPcCalc_valids_2; - assign IBusCachedPlugin_pcValids_2 = IBusCachedPlugin_injector_nextPcCalc_valids_3; - assign IBusCachedPlugin_pcValids_3 = IBusCachedPlugin_injector_nextPcCalc_valids_4; - assign IBusCachedPlugin_iBusRsp_decodeInput_ready = (! decode_arbitration_isStuck); - assign decode_arbitration_isValid = (IBusCachedPlugin_iBusRsp_decodeInput_valid && (! IBusCachedPlugin_injector_decodeRemoved)); - assign _zz_100_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_pc; - assign _zz_99_ = IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst; - assign _zz_98_ = (decode_PC + (32'b00000000000000000000000000000100)); - assign _zz_116_ = _zz_258_[11]; - always @ (*) begin - _zz_117_[18] = _zz_116_; - _zz_117_[17] = _zz_116_; - _zz_117_[16] = _zz_116_; - _zz_117_[15] = _zz_116_; - _zz_117_[14] = _zz_116_; - _zz_117_[13] = _zz_116_; - _zz_117_[12] = _zz_116_; - _zz_117_[11] = _zz_116_; - _zz_117_[10] = _zz_116_; - _zz_117_[9] = _zz_116_; - _zz_117_[8] = _zz_116_; - _zz_117_[7] = _zz_116_; - _zz_117_[6] = _zz_116_; - _zz_117_[5] = _zz_116_; - _zz_117_[4] = _zz_116_; - _zz_117_[3] = _zz_116_; - _zz_117_[2] = _zz_116_; - _zz_117_[1] = _zz_116_; - _zz_117_[0] = _zz_116_; - end - - always @ (*) begin - IBusCachedPlugin_decodePrediction_cmd_hadBranch = ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) || ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_B) && _zz_259_[31])); - if(_zz_122_)begin - IBusCachedPlugin_decodePrediction_cmd_hadBranch = 1'b0; - end - end - - assign _zz_118_ = _zz_260_[19]; - always @ (*) begin - _zz_119_[10] = _zz_118_; - _zz_119_[9] = _zz_118_; - _zz_119_[8] = _zz_118_; - _zz_119_[7] = _zz_118_; - _zz_119_[6] = _zz_118_; - _zz_119_[5] = _zz_118_; - _zz_119_[4] = _zz_118_; - _zz_119_[3] = _zz_118_; - _zz_119_[2] = _zz_118_; - _zz_119_[1] = _zz_118_; - _zz_119_[0] = _zz_118_; - end - - assign _zz_120_ = _zz_261_[11]; - always @ (*) begin - _zz_121_[18] = _zz_120_; - _zz_121_[17] = _zz_120_; - _zz_121_[16] = _zz_120_; - _zz_121_[15] = _zz_120_; - _zz_121_[14] = _zz_120_; - _zz_121_[13] = _zz_120_; - _zz_121_[12] = _zz_120_; - _zz_121_[11] = _zz_120_; - _zz_121_[10] = _zz_120_; - _zz_121_[9] = _zz_120_; - _zz_121_[8] = _zz_120_; - _zz_121_[7] = _zz_120_; - _zz_121_[6] = _zz_120_; - _zz_121_[5] = _zz_120_; - _zz_121_[4] = _zz_120_; - _zz_121_[3] = _zz_120_; - _zz_121_[2] = _zz_120_; - _zz_121_[1] = _zz_120_; - _zz_121_[0] = _zz_120_; - end - - always @ (*) begin - case(decode_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_JAL : begin - _zz_122_ = _zz_262_[1]; - end - default : begin - _zz_122_ = _zz_263_[1]; - end - endcase - end - - assign IBusCachedPlugin_predictionJumpInterface_valid = (decode_arbitration_isValid && IBusCachedPlugin_decodePrediction_cmd_hadBranch); - assign _zz_123_ = _zz_264_[19]; - always @ (*) begin - _zz_124_[10] = _zz_123_; - _zz_124_[9] = _zz_123_; - _zz_124_[8] = _zz_123_; - _zz_124_[7] = _zz_123_; - _zz_124_[6] = _zz_123_; - _zz_124_[5] = _zz_123_; - _zz_124_[4] = _zz_123_; - _zz_124_[3] = _zz_123_; - _zz_124_[2] = _zz_123_; - _zz_124_[1] = _zz_123_; - _zz_124_[0] = _zz_123_; - end - - assign _zz_125_ = _zz_265_[11]; - always @ (*) begin - _zz_126_[18] = _zz_125_; - _zz_126_[17] = _zz_125_; - _zz_126_[16] = _zz_125_; - _zz_126_[15] = _zz_125_; - _zz_126_[14] = _zz_125_; - _zz_126_[13] = _zz_125_; - _zz_126_[12] = _zz_125_; - _zz_126_[11] = _zz_125_; - _zz_126_[10] = _zz_125_; - _zz_126_[9] = _zz_125_; - _zz_126_[8] = _zz_125_; - _zz_126_[7] = _zz_125_; - _zz_126_[6] = _zz_125_; - _zz_126_[5] = _zz_125_; - _zz_126_[4] = _zz_125_; - _zz_126_[3] = _zz_125_; - _zz_126_[2] = _zz_125_; - _zz_126_[1] = _zz_125_; - _zz_126_[0] = _zz_125_; - end - - assign IBusCachedPlugin_predictionJumpInterface_payload = (decode_PC + ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) ? {{_zz_124_,{{{_zz_345_,decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}},1'b0} : {{_zz_126_,{{{_zz_346_,_zz_347_},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0})); - assign iBus_cmd_valid = IBusCachedPlugin_cache_io_mem_cmd_valid; - always @ (*) begin - iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; - iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address; - end - - assign iBus_cmd_payload_size = IBusCachedPlugin_cache_io_mem_cmd_payload_size; - assign IBusCachedPlugin_s0_tightlyCoupledHit = 1'b0; - assign _zz_206_ = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && (! IBusCachedPlugin_s0_tightlyCoupledHit)); - assign _zz_209_ = (32'b00000000000000000000000000000000); - assign _zz_207_ = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && (! IBusCachedPlugin_s1_tightlyCoupledHit)); - assign _zz_208_ = (! IBusCachedPlugin_iBusRsp_stages_1_input_ready); - assign _zz_210_ = (IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_valid && (! IBusCachedPlugin_s2_tightlyCoupledHit)); - assign _zz_211_ = (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready); - assign _zz_212_ = (CsrPlugin_privilege == (2'b00)); - assign _zz_94_ = (decode_arbitration_isStuck ? decode_INSTRUCTION : IBusCachedPlugin_cache_io_cpu_fetch_data); - assign IBusCachedPlugin_rsp_iBusRspOutputHalt = 1'b0; - always @ (*) begin - IBusCachedPlugin_rsp_redoFetch = 1'b0; - if(_zz_228_)begin - IBusCachedPlugin_rsp_redoFetch = 1'b1; - end - if(_zz_226_)begin - IBusCachedPlugin_rsp_redoFetch = 1'b1; - end - if(_zz_237_)begin - IBusCachedPlugin_rsp_redoFetch = 1'b0; - end - end - - always @ (*) begin - _zz_213_ = (IBusCachedPlugin_rsp_redoFetch && (! IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling)); - if(_zz_226_)begin - _zz_213_ = 1'b1; - end - if(_zz_237_)begin - _zz_213_ = 1'b0; - end - end - - always @ (*) begin - IBusCachedPlugin_decodeExceptionPort_valid = 1'b0; - if(_zz_227_)begin - IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; - end - if(_zz_225_)begin - IBusCachedPlugin_decodeExceptionPort_valid = IBusCachedPlugin_iBusRsp_readyForError; - end - end - - always @ (*) begin - IBusCachedPlugin_decodeExceptionPort_payload_code = (4'bxxxx); - if(_zz_227_)begin - IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b1100); - end - if(_zz_225_)begin - IBusCachedPlugin_decodeExceptionPort_payload_code = (4'b0001); - end - end - - assign IBusCachedPlugin_decodeExceptionPort_payload_badAddr = {IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload[31 : 2],(2'b00)}; - assign IBusCachedPlugin_redoBranch_valid = IBusCachedPlugin_rsp_redoFetch; - assign IBusCachedPlugin_redoBranch_payload = IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_payload; - assign IBusCachedPlugin_iBusRsp_decodeInput_valid = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_valid; - assign IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_ready = IBusCachedPlugin_iBusRsp_decodeInput_ready; - assign IBusCachedPlugin_iBusRsp_decodeInput_payload_rsp_inst = IBusCachedPlugin_cache_io_cpu_decode_data; - assign IBusCachedPlugin_iBusRsp_decodeInput_payload_pc = IBusCachedPlugin_iBusRsp_cacheRspArbitration_output_payload; - assign IBusCachedPlugin_mmuBus_cmd_isValid = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid; - assign IBusCachedPlugin_mmuBus_cmd_virtualAddress = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress; - assign IBusCachedPlugin_mmuBus_cmd_bypassTranslation = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation; - assign IBusCachedPlugin_mmuBus_end = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end; - assign _zz_205_ = (decode_arbitration_isValid && decode_FLUSH_ALL); - assign _zz_128_ = 1'b0; - assign _zz_90_ = (((dBus_cmd_payload_size == (2'b10)) && (dBus_cmd_payload_address[1 : 0] != (2'b00))) || ((dBus_cmd_payload_size == (2'b01)) && (dBus_cmd_payload_address[0 : 0] != (1'b0)))); - always @ (*) begin - execute_DBusSimplePlugin_skipCmd = 1'b0; - if(execute_ALIGNEMENT_FAULT)begin - execute_DBusSimplePlugin_skipCmd = 1'b1; - end - if((execute_MMU_FAULT || execute_MMU_RSP_refilling))begin - execute_DBusSimplePlugin_skipCmd = 1'b1; - end - end - - assign dBus_cmd_valid = (((((execute_arbitration_isValid && execute_MEMORY_ENABLE) && (! execute_arbitration_isStuckByOthers)) && (! execute_arbitration_isFlushed)) && (! execute_DBusSimplePlugin_skipCmd)) && (! _zz_128_)); - assign dBus_cmd_payload_wr = execute_MEMORY_STORE; - assign dBus_cmd_payload_size = execute_INSTRUCTION[13 : 12]; - always @ (*) begin - case(dBus_cmd_payload_size) - 2'b00 : begin - _zz_129_ = {{{execute_RS2[7 : 0],execute_RS2[7 : 0]},execute_RS2[7 : 0]},execute_RS2[7 : 0]}; - end - 2'b01 : begin - _zz_129_ = {execute_RS2[15 : 0],execute_RS2[15 : 0]}; - end - default : begin - _zz_129_ = execute_RS2[31 : 0]; - end - endcase - end - - assign dBus_cmd_payload_data = _zz_129_; - assign _zz_89_ = dBus_cmd_payload_address[1 : 0]; - always @ (*) begin - case(dBus_cmd_payload_size) - 2'b00 : begin - _zz_130_ = (4'b0001); - end - 2'b01 : begin - _zz_130_ = (4'b0011); - end - default : begin - _zz_130_ = (4'b1111); - end - endcase - end - - assign execute_DBusSimplePlugin_formalMask = (_zz_130_ <<< dBus_cmd_payload_address[1 : 0]); - assign DBusSimplePlugin_mmuBus_cmd_isValid = (execute_arbitration_isValid && execute_MEMORY_ENABLE); - assign DBusSimplePlugin_mmuBus_cmd_virtualAddress = execute_SRC_ADD; - assign DBusSimplePlugin_mmuBus_cmd_bypassTranslation = 1'b0; - assign DBusSimplePlugin_mmuBus_end = ((! execute_arbitration_isStuck) || execute_arbitration_removeIt); - assign dBus_cmd_payload_address = DBusSimplePlugin_mmuBus_rsp_physicalAddress; - assign _zz_88_ = ((execute_MMU_RSP_exception || ((! execute_MMU_RSP_allowWrite) && execute_MEMORY_STORE)) || ((! execute_MMU_RSP_allowRead) && (! execute_MEMORY_STORE))); - assign _zz_81_ = DBusSimplePlugin_mmuBus_rsp_physicalAddress; - assign _zz_82_ = DBusSimplePlugin_mmuBus_rsp_isIoAccess; - assign _zz_83_ = DBusSimplePlugin_mmuBus_rsp_allowRead; - assign _zz_84_ = DBusSimplePlugin_mmuBus_rsp_allowWrite; - assign _zz_85_ = DBusSimplePlugin_mmuBus_rsp_allowExecute; - assign _zz_86_ = DBusSimplePlugin_mmuBus_rsp_exception; - assign _zz_87_ = DBusSimplePlugin_mmuBus_rsp_refilling; - assign _zz_80_ = dBus_rsp_data; - always @ (*) begin - DBusSimplePlugin_memoryExceptionPort_valid = 1'b0; - if(_zz_238_)begin - DBusSimplePlugin_memoryExceptionPort_valid = 1'b1; - end - if(memory_ALIGNEMENT_FAULT)begin - DBusSimplePlugin_memoryExceptionPort_valid = 1'b1; - end - if(memory_MMU_RSP_refilling)begin - DBusSimplePlugin_memoryExceptionPort_valid = 1'b0; - end else begin - if(memory_MMU_FAULT)begin - DBusSimplePlugin_memoryExceptionPort_valid = 1'b1; - end - end - if(_zz_239_)begin - DBusSimplePlugin_memoryExceptionPort_valid = 1'b0; - end - end - - always @ (*) begin - DBusSimplePlugin_memoryExceptionPort_payload_code = (4'bxxxx); - if(_zz_238_)begin - DBusSimplePlugin_memoryExceptionPort_payload_code = (4'b0101); - end - if(memory_ALIGNEMENT_FAULT)begin - DBusSimplePlugin_memoryExceptionPort_payload_code = {1'd0, _zz_266_}; - end - if(! memory_MMU_RSP_refilling) begin - if(memory_MMU_FAULT)begin - DBusSimplePlugin_memoryExceptionPort_payload_code = (memory_MEMORY_STORE ? (4'b1111) : (4'b1101)); - end - end - end - - assign DBusSimplePlugin_memoryExceptionPort_payload_badAddr = memory_REGFILE_WRITE_DATA; - always @ (*) begin - DBusSimplePlugin_redoBranch_valid = 1'b0; - if(memory_MMU_RSP_refilling)begin - DBusSimplePlugin_redoBranch_valid = 1'b1; - end - if(_zz_239_)begin - DBusSimplePlugin_redoBranch_valid = 1'b0; - end - end - - assign DBusSimplePlugin_redoBranch_payload = memory_PC; - always @ (*) begin - writeBack_DBusSimplePlugin_rspShifted = writeBack_MEMORY_READ_DATA; - case(writeBack_MEMORY_ADDRESS_LOW) - 2'b01 : begin - writeBack_DBusSimplePlugin_rspShifted[7 : 0] = writeBack_MEMORY_READ_DATA[15 : 8]; - end - 2'b10 : begin - writeBack_DBusSimplePlugin_rspShifted[15 : 0] = writeBack_MEMORY_READ_DATA[31 : 16]; - end - 2'b11 : begin - writeBack_DBusSimplePlugin_rspShifted[7 : 0] = writeBack_MEMORY_READ_DATA[31 : 24]; - end - default : begin - end - endcase - end - - assign _zz_131_ = (writeBack_DBusSimplePlugin_rspShifted[7] && (! writeBack_INSTRUCTION[14])); - always @ (*) begin - _zz_132_[31] = _zz_131_; - _zz_132_[30] = _zz_131_; - _zz_132_[29] = _zz_131_; - _zz_132_[28] = _zz_131_; - _zz_132_[27] = _zz_131_; - _zz_132_[26] = _zz_131_; - _zz_132_[25] = _zz_131_; - _zz_132_[24] = _zz_131_; - _zz_132_[23] = _zz_131_; - _zz_132_[22] = _zz_131_; - _zz_132_[21] = _zz_131_; - _zz_132_[20] = _zz_131_; - _zz_132_[19] = _zz_131_; - _zz_132_[18] = _zz_131_; - _zz_132_[17] = _zz_131_; - _zz_132_[16] = _zz_131_; - _zz_132_[15] = _zz_131_; - _zz_132_[14] = _zz_131_; - _zz_132_[13] = _zz_131_; - _zz_132_[12] = _zz_131_; - _zz_132_[11] = _zz_131_; - _zz_132_[10] = _zz_131_; - _zz_132_[9] = _zz_131_; - _zz_132_[8] = _zz_131_; - _zz_132_[7 : 0] = writeBack_DBusSimplePlugin_rspShifted[7 : 0]; - end - - assign _zz_133_ = (writeBack_DBusSimplePlugin_rspShifted[15] && (! writeBack_INSTRUCTION[14])); - always @ (*) begin - _zz_134_[31] = _zz_133_; - _zz_134_[30] = _zz_133_; - _zz_134_[29] = _zz_133_; - _zz_134_[28] = _zz_133_; - _zz_134_[27] = _zz_133_; - _zz_134_[26] = _zz_133_; - _zz_134_[25] = _zz_133_; - _zz_134_[24] = _zz_133_; - _zz_134_[23] = _zz_133_; - _zz_134_[22] = _zz_133_; - _zz_134_[21] = _zz_133_; - _zz_134_[20] = _zz_133_; - _zz_134_[19] = _zz_133_; - _zz_134_[18] = _zz_133_; - _zz_134_[17] = _zz_133_; - _zz_134_[16] = _zz_133_; - _zz_134_[15 : 0] = writeBack_DBusSimplePlugin_rspShifted[15 : 0]; - end - - always @ (*) begin - case(_zz_253_) - 2'b00 : begin - writeBack_DBusSimplePlugin_rspFormated = _zz_132_; - end - 2'b01 : begin - writeBack_DBusSimplePlugin_rspFormated = _zz_134_; - end - default : begin - writeBack_DBusSimplePlugin_rspFormated = writeBack_DBusSimplePlugin_rspShifted; - end - endcase - end - - assign IBusCachedPlugin_mmuBus_rsp_physicalAddress = IBusCachedPlugin_mmuBus_cmd_virtualAddress; - assign IBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1; - assign IBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1; - assign IBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1; - assign IBusCachedPlugin_mmuBus_rsp_isIoAccess = IBusCachedPlugin_mmuBus_rsp_physicalAddress[31]; - assign IBusCachedPlugin_mmuBus_rsp_exception = 1'b0; - assign IBusCachedPlugin_mmuBus_rsp_refilling = 1'b0; - assign IBusCachedPlugin_mmuBus_busy = 1'b0; - assign DBusSimplePlugin_mmuBus_rsp_physicalAddress = DBusSimplePlugin_mmuBus_cmd_virtualAddress; - assign DBusSimplePlugin_mmuBus_rsp_allowRead = 1'b1; - assign DBusSimplePlugin_mmuBus_rsp_allowWrite = 1'b1; - assign DBusSimplePlugin_mmuBus_rsp_allowExecute = 1'b1; - assign DBusSimplePlugin_mmuBus_rsp_isIoAccess = DBusSimplePlugin_mmuBus_rsp_physicalAddress[31]; - assign DBusSimplePlugin_mmuBus_rsp_exception = 1'b0; - assign DBusSimplePlugin_mmuBus_rsp_refilling = 1'b0; - assign DBusSimplePlugin_mmuBus_busy = 1'b0; - assign _zz_136_ = ((decode_INSTRUCTION & (32'b00000000000000000000000000000100)) == (32'b00000000000000000000000000000100)); - assign _zz_137_ = ((decode_INSTRUCTION & (32'b00000000000000000011000000000000)) == (32'b00000000000000000010000000000000)); - assign _zz_138_ = ((decode_INSTRUCTION & (32'b00000000000000000000000001001000)) == (32'b00000000000000000000000001001000)); - assign _zz_139_ = ((decode_INSTRUCTION & (32'b00000000000000000111000000000000)) == (32'b00000000000000000001000000000000)); - assign _zz_140_ = ((decode_INSTRUCTION & (32'b00000000000000000101000000000000)) == (32'b00000000000000000100000000000000)); - assign _zz_141_ = ((decode_INSTRUCTION & (32'b00000000000000000100000001010000)) == (32'b00000000000000000100000001010000)); - assign _zz_135_ = {({_zz_140_,{_zz_137_,_zz_139_}} != (3'b000)),{({_zz_348_,_zz_141_} != (2'b00)),{({_zz_349_,_zz_350_} != (2'b00)),{(_zz_351_ != _zz_352_),{_zz_353_,{_zz_354_,_zz_355_}}}}}}; - assign _zz_78_ = ({((decode_INSTRUCTION & (32'b00000000000000000000000001011111)) == (32'b00000000000000000000000000010111)),{((decode_INSTRUCTION & (32'b00000000000000000000000001111111)) == (32'b00000000000000000000000001101111)),{((decode_INSTRUCTION & (32'b00000000000000000001000001101111)) == (32'b00000000000000000000000000000011)),{((decode_INSTRUCTION & _zz_487_) == (32'b00000000000000000001000001110011)),{(_zz_488_ == _zz_489_),{_zz_490_,{_zz_491_,_zz_492_}}}}}}} != (18'b000000000000000000)); - assign _zz_77_ = _zz_267_[0]; - assign _zz_76_ = _zz_268_[0]; - assign _zz_75_ = _zz_269_[0]; - assign _zz_74_ = _zz_270_[0]; - assign _zz_142_ = _zz_135_[5 : 4]; - assign _zz_73_ = _zz_142_; - assign _zz_143_ = _zz_135_[7 : 6]; - assign _zz_72_ = _zz_143_; - assign _zz_71_ = _zz_271_[0]; - assign _zz_144_ = _zz_135_[10 : 9]; - assign _zz_70_ = _zz_144_; - assign _zz_69_ = _zz_272_[0]; - assign _zz_145_ = _zz_135_[13 : 12]; - assign _zz_68_ = _zz_145_; - assign _zz_146_ = _zz_135_[14 : 14]; - assign _zz_67_ = _zz_146_; - assign _zz_66_ = _zz_273_[0]; - assign _zz_65_ = _zz_274_[0]; - assign _zz_64_ = _zz_275_[0]; - assign _zz_63_ = _zz_276_[0]; - assign _zz_62_ = _zz_277_[0]; - assign _zz_61_ = _zz_278_[0]; - assign _zz_60_ = _zz_279_[0]; - assign _zz_147_ = _zz_135_[23 : 22]; - assign _zz_59_ = _zz_147_; - assign _zz_58_ = _zz_280_[0]; - assign _zz_57_ = _zz_281_[0]; - assign _zz_148_ = _zz_135_[28 : 27]; - assign _zz_56_ = _zz_148_; - assign _zz_55_ = _zz_282_[0]; - assign decodeExceptionPort_valid = ((decode_arbitration_isValid && decode_INSTRUCTION_READY) && (! decode_LEGAL_INSTRUCTION)); - assign decodeExceptionPort_payload_code = (4'b0010); - assign decodeExceptionPort_payload_badAddr = decode_INSTRUCTION; - assign decode_RegFilePlugin_regFileReadAddress1 = decode_INSTRUCTION_ANTICIPATED[19 : 15]; - assign decode_RegFilePlugin_regFileReadAddress2 = decode_INSTRUCTION_ANTICIPATED[24 : 20]; - assign decode_RegFilePlugin_rs1Data = _zz_214_; - assign decode_RegFilePlugin_rs2Data = _zz_215_; - assign _zz_54_ = decode_RegFilePlugin_rs1Data; - assign _zz_53_ = decode_RegFilePlugin_rs2Data; - always @ (*) begin - lastStageRegFileWrite_valid = (_zz_51_ && writeBack_arbitration_isFiring); - if(_zz_149_)begin - lastStageRegFileWrite_valid = 1'b1; - end - end - - assign lastStageRegFileWrite_payload_address = _zz_50_[11 : 7]; - assign lastStageRegFileWrite_payload_data = _zz_79_; - always @ (*) begin - case(execute_ALU_BITWISE_CTRL) - `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : begin - execute_IntAluPlugin_bitwise = (execute_SRC1 & execute_SRC2); - end - `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : begin - execute_IntAluPlugin_bitwise = (execute_SRC1 | execute_SRC2); - end - default : begin - execute_IntAluPlugin_bitwise = (execute_SRC1 ^ execute_SRC2); - end - endcase - end - - always @ (*) begin - case(execute_ALU_CTRL) - `AluCtrlEnum_defaultEncoding_BITWISE : begin - _zz_150_ = execute_IntAluPlugin_bitwise; - end - `AluCtrlEnum_defaultEncoding_SLT_SLTU : begin - _zz_150_ = {31'd0, _zz_283_}; - end - default : begin - _zz_150_ = execute_SRC_ADD_SUB; - end - endcase - end - - assign _zz_48_ = _zz_150_; - assign _zz_46_ = (decode_SRC_ADD_ZERO && (! decode_SRC_USE_SUB_LESS)); - always @ (*) begin - case(execute_SRC1_CTRL) - `Src1CtrlEnum_defaultEncoding_RS : begin - _zz_151_ = execute_RS1; - end - `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : begin - _zz_151_ = {29'd0, _zz_284_}; - end - `Src1CtrlEnum_defaultEncoding_IMU : begin - _zz_151_ = {execute_INSTRUCTION[31 : 12],(12'b000000000000)}; - end - default : begin - _zz_151_ = {27'd0, _zz_285_}; - end - endcase - end - - assign _zz_45_ = _zz_151_; - assign _zz_152_ = _zz_286_[11]; - always @ (*) begin - _zz_153_[19] = _zz_152_; - _zz_153_[18] = _zz_152_; - _zz_153_[17] = _zz_152_; - _zz_153_[16] = _zz_152_; - _zz_153_[15] = _zz_152_; - _zz_153_[14] = _zz_152_; - _zz_153_[13] = _zz_152_; - _zz_153_[12] = _zz_152_; - _zz_153_[11] = _zz_152_; - _zz_153_[10] = _zz_152_; - _zz_153_[9] = _zz_152_; - _zz_153_[8] = _zz_152_; - _zz_153_[7] = _zz_152_; - _zz_153_[6] = _zz_152_; - _zz_153_[5] = _zz_152_; - _zz_153_[4] = _zz_152_; - _zz_153_[3] = _zz_152_; - _zz_153_[2] = _zz_152_; - _zz_153_[1] = _zz_152_; - _zz_153_[0] = _zz_152_; - end - - assign _zz_154_ = _zz_287_[11]; - always @ (*) begin - _zz_155_[19] = _zz_154_; - _zz_155_[18] = _zz_154_; - _zz_155_[17] = _zz_154_; - _zz_155_[16] = _zz_154_; - _zz_155_[15] = _zz_154_; - _zz_155_[14] = _zz_154_; - _zz_155_[13] = _zz_154_; - _zz_155_[12] = _zz_154_; - _zz_155_[11] = _zz_154_; - _zz_155_[10] = _zz_154_; - _zz_155_[9] = _zz_154_; - _zz_155_[8] = _zz_154_; - _zz_155_[7] = _zz_154_; - _zz_155_[6] = _zz_154_; - _zz_155_[5] = _zz_154_; - _zz_155_[4] = _zz_154_; - _zz_155_[3] = _zz_154_; - _zz_155_[2] = _zz_154_; - _zz_155_[1] = _zz_154_; - _zz_155_[0] = _zz_154_; - end - - always @ (*) begin - case(execute_SRC2_CTRL) - `Src2CtrlEnum_defaultEncoding_RS : begin - _zz_156_ = execute_RS2; - end - `Src2CtrlEnum_defaultEncoding_IMI : begin - _zz_156_ = {_zz_153_,execute_INSTRUCTION[31 : 20]}; - end - `Src2CtrlEnum_defaultEncoding_IMS : begin - _zz_156_ = {_zz_155_,{execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}}; - end - default : begin - _zz_156_ = _zz_41_; - end - endcase - end - - assign _zz_43_ = _zz_156_; - always @ (*) begin - execute_SrcPlugin_addSub = _zz_288_; - if(execute_SRC2_FORCE_ZERO)begin - execute_SrcPlugin_addSub = execute_SRC1; - end - end - - assign execute_SrcPlugin_less = ((execute_SRC1[31] == execute_SRC2[31]) ? execute_SrcPlugin_addSub[31] : (execute_SRC_LESS_UNSIGNED ? execute_SRC2[31] : execute_SRC1[31])); - assign _zz_40_ = execute_SrcPlugin_addSub; - assign _zz_39_ = execute_SrcPlugin_addSub; - assign _zz_38_ = execute_SrcPlugin_less; - assign execute_LightShifterPlugin_isShift = (execute_SHIFT_CTRL != `ShiftCtrlEnum_defaultEncoding_DISABLE_1); - assign execute_LightShifterPlugin_amplitude = (execute_LightShifterPlugin_isActive ? execute_LightShifterPlugin_amplitudeReg : execute_SRC2[4 : 0]); - assign execute_LightShifterPlugin_shiftInput = (execute_LightShifterPlugin_isActive ? memory_REGFILE_WRITE_DATA : execute_SRC1); - assign execute_LightShifterPlugin_done = (execute_LightShifterPlugin_amplitude[4 : 1] == (4'b0000)); - always @ (*) begin - case(execute_SHIFT_CTRL) - `ShiftCtrlEnum_defaultEncoding_SLL_1 : begin - _zz_157_ = (execute_LightShifterPlugin_shiftInput <<< 1); - end - default : begin - _zz_157_ = _zz_295_; - end - endcase - end - - always @ (*) begin - _zz_158_ = 1'b0; - if(_zz_240_)begin - if(_zz_241_)begin - if(_zz_164_)begin - _zz_158_ = 1'b1; - end - end - end - if(_zz_242_)begin - if(_zz_243_)begin - if(_zz_166_)begin - _zz_158_ = 1'b1; - end - end - end - if(_zz_244_)begin - if(_zz_245_)begin - if(_zz_168_)begin - _zz_158_ = 1'b1; - end - end - end - if((! decode_RS1_USE))begin - _zz_158_ = 1'b0; - end - end - - always @ (*) begin - _zz_159_ = 1'b0; - if(_zz_240_)begin - if(_zz_241_)begin - if(_zz_165_)begin - _zz_159_ = 1'b1; - end - end - end - if(_zz_242_)begin - if(_zz_243_)begin - if(_zz_167_)begin - _zz_159_ = 1'b1; - end - end - end - if(_zz_244_)begin - if(_zz_245_)begin - if(_zz_169_)begin - _zz_159_ = 1'b1; - end - end - end - if((! decode_RS2_USE))begin - _zz_159_ = 1'b0; - end - end - - assign _zz_160_ = (_zz_51_ && writeBack_arbitration_isFiring); - assign _zz_164_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); - assign _zz_165_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); - assign _zz_166_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); - assign _zz_167_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); - assign _zz_168_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]); - assign _zz_169_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]); - assign _zz_34_ = IBusCachedPlugin_decodePrediction_cmd_hadBranch; - assign execute_BranchPlugin_eq = (execute_SRC1 == execute_SRC2); - assign _zz_170_ = execute_INSTRUCTION[14 : 12]; - always @ (*) begin - if((_zz_170_ == (3'b000))) begin - _zz_171_ = execute_BranchPlugin_eq; - end else if((_zz_170_ == (3'b001))) begin - _zz_171_ = (! execute_BranchPlugin_eq); - end else if((((_zz_170_ & (3'b101)) == (3'b101)))) begin - _zz_171_ = (! execute_SRC_LESS); - end else begin - _zz_171_ = execute_SRC_LESS; - end - end - - always @ (*) begin - case(execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_INC : begin - _zz_172_ = 1'b0; - end - `BranchCtrlEnum_defaultEncoding_JAL : begin - _zz_172_ = 1'b1; - end - `BranchCtrlEnum_defaultEncoding_JALR : begin - _zz_172_ = 1'b1; - end - default : begin - _zz_172_ = _zz_171_; - end - endcase - end - - assign _zz_33_ = _zz_172_; - assign _zz_173_ = _zz_297_[11]; - always @ (*) begin - _zz_174_[19] = _zz_173_; - _zz_174_[18] = _zz_173_; - _zz_174_[17] = _zz_173_; - _zz_174_[16] = _zz_173_; - _zz_174_[15] = _zz_173_; - _zz_174_[14] = _zz_173_; - _zz_174_[13] = _zz_173_; - _zz_174_[12] = _zz_173_; - _zz_174_[11] = _zz_173_; - _zz_174_[10] = _zz_173_; - _zz_174_[9] = _zz_173_; - _zz_174_[8] = _zz_173_; - _zz_174_[7] = _zz_173_; - _zz_174_[6] = _zz_173_; - _zz_174_[5] = _zz_173_; - _zz_174_[4] = _zz_173_; - _zz_174_[3] = _zz_173_; - _zz_174_[2] = _zz_173_; - _zz_174_[1] = _zz_173_; - _zz_174_[0] = _zz_173_; - end - - assign _zz_175_ = _zz_298_[19]; - always @ (*) begin - _zz_176_[10] = _zz_175_; - _zz_176_[9] = _zz_175_; - _zz_176_[8] = _zz_175_; - _zz_176_[7] = _zz_175_; - _zz_176_[6] = _zz_175_; - _zz_176_[5] = _zz_175_; - _zz_176_[4] = _zz_175_; - _zz_176_[3] = _zz_175_; - _zz_176_[2] = _zz_175_; - _zz_176_[1] = _zz_175_; - _zz_176_[0] = _zz_175_; - end - - assign _zz_177_ = _zz_299_[11]; - always @ (*) begin - _zz_178_[18] = _zz_177_; - _zz_178_[17] = _zz_177_; - _zz_178_[16] = _zz_177_; - _zz_178_[15] = _zz_177_; - _zz_178_[14] = _zz_177_; - _zz_178_[13] = _zz_177_; - _zz_178_[12] = _zz_177_; - _zz_178_[11] = _zz_177_; - _zz_178_[10] = _zz_177_; - _zz_178_[9] = _zz_177_; - _zz_178_[8] = _zz_177_; - _zz_178_[7] = _zz_177_; - _zz_178_[6] = _zz_177_; - _zz_178_[5] = _zz_177_; - _zz_178_[4] = _zz_177_; - _zz_178_[3] = _zz_177_; - _zz_178_[2] = _zz_177_; - _zz_178_[1] = _zz_177_; - _zz_178_[0] = _zz_177_; - end - - always @ (*) begin - case(execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_JALR : begin - _zz_179_ = (_zz_300_[1] ^ execute_RS1[1]); - end - `BranchCtrlEnum_defaultEncoding_JAL : begin - _zz_179_ = _zz_301_[1]; - end - default : begin - _zz_179_ = _zz_302_[1]; - end - endcase - end - - assign execute_BranchPlugin_missAlignedTarget = (execute_BRANCH_COND_RESULT && _zz_179_); - assign _zz_31_ = ((execute_PREDICTION_HAD_BRANCHED2 != execute_BRANCH_COND_RESULT) || execute_BranchPlugin_missAlignedTarget); - always @ (*) begin - case(execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_JALR : begin - execute_BranchPlugin_branch_src1 = execute_RS1; - end - default : begin - execute_BranchPlugin_branch_src1 = execute_PC; - end - endcase - end - - assign _zz_180_ = _zz_303_[11]; - always @ (*) begin - _zz_181_[19] = _zz_180_; - _zz_181_[18] = _zz_180_; - _zz_181_[17] = _zz_180_; - _zz_181_[16] = _zz_180_; - _zz_181_[15] = _zz_180_; - _zz_181_[14] = _zz_180_; - _zz_181_[13] = _zz_180_; - _zz_181_[12] = _zz_180_; - _zz_181_[11] = _zz_180_; - _zz_181_[10] = _zz_180_; - _zz_181_[9] = _zz_180_; - _zz_181_[8] = _zz_180_; - _zz_181_[7] = _zz_180_; - _zz_181_[6] = _zz_180_; - _zz_181_[5] = _zz_180_; - _zz_181_[4] = _zz_180_; - _zz_181_[3] = _zz_180_; - _zz_181_[2] = _zz_180_; - _zz_181_[1] = _zz_180_; - _zz_181_[0] = _zz_180_; - end - - always @ (*) begin - case(execute_BRANCH_CTRL) - `BranchCtrlEnum_defaultEncoding_JALR : begin - execute_BranchPlugin_branch_src2 = {_zz_181_,execute_INSTRUCTION[31 : 20]}; - end - default : begin - execute_BranchPlugin_branch_src2 = ((execute_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) ? {{_zz_183_,{{{_zz_504_,execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0} : {{_zz_185_,{{{_zz_505_,_zz_506_},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0}); - if(execute_PREDICTION_HAD_BRANCHED2)begin - execute_BranchPlugin_branch_src2 = {29'd0, _zz_306_}; - end - end - endcase - end - - assign _zz_182_ = _zz_304_[19]; - always @ (*) begin - _zz_183_[10] = _zz_182_; - _zz_183_[9] = _zz_182_; - _zz_183_[8] = _zz_182_; - _zz_183_[7] = _zz_182_; - _zz_183_[6] = _zz_182_; - _zz_183_[5] = _zz_182_; - _zz_183_[4] = _zz_182_; - _zz_183_[3] = _zz_182_; - _zz_183_[2] = _zz_182_; - _zz_183_[1] = _zz_182_; - _zz_183_[0] = _zz_182_; - end - - assign _zz_184_ = _zz_305_[11]; - always @ (*) begin - _zz_185_[18] = _zz_184_; - _zz_185_[17] = _zz_184_; - _zz_185_[16] = _zz_184_; - _zz_185_[15] = _zz_184_; - _zz_185_[14] = _zz_184_; - _zz_185_[13] = _zz_184_; - _zz_185_[12] = _zz_184_; - _zz_185_[11] = _zz_184_; - _zz_185_[10] = _zz_184_; - _zz_185_[9] = _zz_184_; - _zz_185_[8] = _zz_184_; - _zz_185_[7] = _zz_184_; - _zz_185_[6] = _zz_184_; - _zz_185_[5] = _zz_184_; - _zz_185_[4] = _zz_184_; - _zz_185_[3] = _zz_184_; - _zz_185_[2] = _zz_184_; - _zz_185_[1] = _zz_184_; - _zz_185_[0] = _zz_184_; - end - - assign execute_BranchPlugin_branchAdder = (execute_BranchPlugin_branch_src1 + execute_BranchPlugin_branch_src2); - assign _zz_30_ = {execute_BranchPlugin_branchAdder[31 : 1],(1'b0)}; - assign BranchPlugin_jumpInterface_valid = ((memory_arbitration_isValid && memory_BRANCH_DO) && (! 1'b0)); - assign BranchPlugin_jumpInterface_payload = memory_BRANCH_CALC; - assign BranchPlugin_branchExceptionPort_valid = (memory_arbitration_isValid && (memory_BRANCH_DO && memory_BRANCH_CALC[1])); - assign BranchPlugin_branchExceptionPort_payload_code = (4'b0000); - assign BranchPlugin_branchExceptionPort_payload_badAddr = memory_BRANCH_CALC; - assign IBusCachedPlugin_decodePrediction_rsp_wasWrong = BranchPlugin_jumpInterface_valid; - always @ (*) begin - CsrPlugin_privilege = (2'b11); - if(CsrPlugin_forceMachineWire)begin - CsrPlugin_privilege = (2'b11); - end - end - - assign CsrPlugin_misa_base = (2'b01); - assign CsrPlugin_misa_extensions = (26'b00000000000000000001000010); - assign _zz_186_ = (CsrPlugin_mip_MTIP && CsrPlugin_mie_MTIE); - assign _zz_187_ = (CsrPlugin_mip_MSIP && CsrPlugin_mie_MSIE); - assign _zz_188_ = (CsrPlugin_mip_MEIP && CsrPlugin_mie_MEIE); - assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b11); - assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege = ((CsrPlugin_privilege < CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped) ? CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped : CsrPlugin_privilege); - assign _zz_189_ = {decodeExceptionPort_valid,IBusCachedPlugin_decodeExceptionPort_valid}; - assign _zz_190_ = _zz_307_[0]; - assign _zz_191_ = {BranchPlugin_branchExceptionPort_valid,DBusSimplePlugin_memoryExceptionPort_valid}; - assign _zz_192_ = _zz_309_[0]; - always @ (*) begin - CsrPlugin_exceptionPortCtrl_exceptionValids_decode = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; - if(_zz_229_)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b1; - end - if(decode_arbitration_isFlushed)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_decode = 1'b0; - end - end - - always @ (*) begin - CsrPlugin_exceptionPortCtrl_exceptionValids_execute = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; - if(execute_arbitration_isFlushed)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_execute = 1'b0; - end - end - - always @ (*) begin - CsrPlugin_exceptionPortCtrl_exceptionValids_memory = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; - if(_zz_233_)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b1; - end - if(memory_arbitration_isFlushed)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b0; - end - end - - always @ (*) begin - CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; - if(writeBack_arbitration_isFlushed)begin - CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = 1'b0; - end - end - - assign CsrPlugin_exceptionPendings_0 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode; - assign CsrPlugin_exceptionPendings_1 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute; - assign CsrPlugin_exceptionPendings_2 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory; - assign CsrPlugin_exceptionPendings_3 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack; - assign CsrPlugin_exception = (CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack && CsrPlugin_allowException); - assign CsrPlugin_lastStageWasWfi = 1'b0; - always @ (*) begin - CsrPlugin_pipelineLiberator_done = ((! ({writeBack_arbitration_isValid,{memory_arbitration_isValid,execute_arbitration_isValid}} != (3'b000))) && IBusCachedPlugin_pcValids_3); - if(({CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory,CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute}} != (3'b000)))begin - CsrPlugin_pipelineLiberator_done = 1'b0; - end - if(CsrPlugin_hadException)begin - CsrPlugin_pipelineLiberator_done = 1'b0; - end - end - - assign CsrPlugin_interruptJump = ((CsrPlugin_interrupt_valid && CsrPlugin_pipelineLiberator_done) && CsrPlugin_allowInterrupts); - always @ (*) begin - CsrPlugin_targetPrivilege = CsrPlugin_interrupt_targetPrivilege; - if(CsrPlugin_hadException)begin - CsrPlugin_targetPrivilege = CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege; - end - end - - always @ (*) begin - CsrPlugin_trapCause = CsrPlugin_interrupt_code; - if(CsrPlugin_hadException)begin - CsrPlugin_trapCause = CsrPlugin_exceptionPortCtrl_exceptionContext_code; - end - end - - always @ (*) begin - CsrPlugin_xtvec_mode = (2'bxx); - case(CsrPlugin_targetPrivilege) - 2'b11 : begin - CsrPlugin_xtvec_mode = CsrPlugin_mtvec_mode; - end - default : begin - end - endcase - end - - always @ (*) begin - CsrPlugin_xtvec_base = (30'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - case(CsrPlugin_targetPrivilege) - 2'b11 : begin - CsrPlugin_xtvec_base = CsrPlugin_mtvec_base; - end - default : begin - end - endcase - end - - assign contextSwitching = CsrPlugin_jumpInterface_valid; - assign _zz_28_ = (! (((decode_INSTRUCTION[14 : 13] == (2'b01)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))) || ((decode_INSTRUCTION[14 : 13] == (2'b11)) && (decode_INSTRUCTION[19 : 15] == (5'b00000))))); - assign _zz_27_ = (decode_INSTRUCTION[13 : 7] != (7'b0100000)); - assign execute_CsrPlugin_inWfi = 1'b0; - assign execute_CsrPlugin_blockedBySideEffects = ({writeBack_arbitration_isValid,memory_arbitration_isValid} != (2'b00)); - always @ (*) begin - execute_CsrPlugin_illegalAccess = 1'b1; - case(execute_CsrPlugin_csrAddress) - 12'b101111000000 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001100000000 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001101000001 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001100000101 : begin - if(execute_CSR_WRITE_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b001101000100 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001101000011 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b111111000000 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - 12'b001100000100 : begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - 12'b001101000010 : begin - if(execute_CSR_READ_OPCODE)begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - default : begin - end - endcase - if((CsrPlugin_privilege < execute_CsrPlugin_csrAddress[9 : 8]))begin - execute_CsrPlugin_illegalAccess = 1'b1; - end - if(((! execute_arbitration_isValid) || (! execute_IS_CSR)))begin - execute_CsrPlugin_illegalAccess = 1'b0; - end - end - - always @ (*) begin - execute_CsrPlugin_illegalInstruction = 1'b0; - if((execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)))begin - if((CsrPlugin_privilege < execute_INSTRUCTION[29 : 28]))begin - execute_CsrPlugin_illegalInstruction = 1'b1; - end - end - end - - always @ (*) begin - execute_CsrPlugin_readData = (32'b00000000000000000000000000000000); - case(execute_CsrPlugin_csrAddress) - 12'b101111000000 : begin - execute_CsrPlugin_readData[31 : 0] = _zz_200_; - end - 12'b001100000000 : begin - execute_CsrPlugin_readData[12 : 11] = CsrPlugin_mstatus_MPP; - execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mstatus_MPIE; - execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mstatus_MIE; - end - 12'b001101000001 : begin - execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mepc; - end - 12'b001100000101 : begin - end - 12'b001101000100 : begin - execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mip_MEIP; - execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mip_MTIP; - execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mip_MSIP; - end - 12'b001101000011 : begin - execute_CsrPlugin_readData[31 : 0] = CsrPlugin_mtval; - end - 12'b111111000000 : begin - execute_CsrPlugin_readData[31 : 0] = _zz_201_; - end - 12'b001100000100 : begin - execute_CsrPlugin_readData[11 : 11] = CsrPlugin_mie_MEIE; - execute_CsrPlugin_readData[7 : 7] = CsrPlugin_mie_MTIE; - execute_CsrPlugin_readData[3 : 3] = CsrPlugin_mie_MSIE; - end - 12'b001101000010 : begin - execute_CsrPlugin_readData[31 : 31] = CsrPlugin_mcause_interrupt; - execute_CsrPlugin_readData[3 : 0] = CsrPlugin_mcause_exceptionCode; - end - default : begin - end - endcase - end - - assign execute_CsrPlugin_writeInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_WRITE_OPCODE); - assign execute_CsrPlugin_readInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_READ_OPCODE); - assign execute_CsrPlugin_writeEnable = ((execute_CsrPlugin_writeInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); - assign execute_CsrPlugin_readEnable = ((execute_CsrPlugin_readInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers)); - assign execute_CsrPlugin_readToWriteData = execute_CsrPlugin_readData; - always @ (*) begin - case(_zz_254_) - 1'b0 : begin - execute_CsrPlugin_writeData = execute_SRC1; - end - default : begin - execute_CsrPlugin_writeData = (execute_INSTRUCTION[12] ? (execute_CsrPlugin_readToWriteData & (~ execute_SRC1)) : (execute_CsrPlugin_readToWriteData | execute_SRC1)); - end - endcase - end - - assign execute_CsrPlugin_csrAddress = execute_INSTRUCTION[31 : 20]; - always @ (*) begin - memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b0; - if(_zz_217_)begin - if(_zz_231_)begin - memory_MulDivIterativePlugin_mul_counter_willIncrement = 1'b1; - end - end - end - - always @ (*) begin - memory_MulDivIterativePlugin_mul_counter_willClear = 1'b0; - if((! memory_arbitration_isStuck))begin - memory_MulDivIterativePlugin_mul_counter_willClear = 1'b1; - end - end - - assign memory_MulDivIterativePlugin_mul_willOverflowIfInc = (memory_MulDivIterativePlugin_mul_counter_value == (6'b100000)); - assign memory_MulDivIterativePlugin_mul_counter_willOverflow = (memory_MulDivIterativePlugin_mul_willOverflowIfInc && memory_MulDivIterativePlugin_mul_counter_willIncrement); - always @ (*) begin - if(memory_MulDivIterativePlugin_mul_counter_willOverflow)begin - memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); - end else begin - memory_MulDivIterativePlugin_mul_counter_valueNext = (memory_MulDivIterativePlugin_mul_counter_value + _zz_312_); - end - if(memory_MulDivIterativePlugin_mul_counter_willClear)begin - memory_MulDivIterativePlugin_mul_counter_valueNext = (6'b000000); - end - end - - always @ (*) begin - memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b0; - if(_zz_218_)begin - if(_zz_232_)begin - memory_MulDivIterativePlugin_div_counter_willIncrement = 1'b1; - end - end - end - - always @ (*) begin - memory_MulDivIterativePlugin_div_counter_willClear = 1'b0; - if(_zz_246_)begin - memory_MulDivIterativePlugin_div_counter_willClear = 1'b1; - end - end - - assign memory_MulDivIterativePlugin_div_counter_willOverflowIfInc = (memory_MulDivIterativePlugin_div_counter_value == (6'b100001)); - assign memory_MulDivIterativePlugin_div_counter_willOverflow = (memory_MulDivIterativePlugin_div_counter_willOverflowIfInc && memory_MulDivIterativePlugin_div_counter_willIncrement); - always @ (*) begin - if(memory_MulDivIterativePlugin_div_counter_willOverflow)begin - memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); - end else begin - memory_MulDivIterativePlugin_div_counter_valueNext = (memory_MulDivIterativePlugin_div_counter_value + _zz_320_); - end - if(memory_MulDivIterativePlugin_div_counter_willClear)begin - memory_MulDivIterativePlugin_div_counter_valueNext = (6'b000000); - end - end - - assign _zz_193_ = memory_MulDivIterativePlugin_rs1[31 : 0]; - assign _zz_194_ = {memory_MulDivIterativePlugin_accumulator[31 : 0],_zz_193_[31]}; - assign _zz_195_ = (_zz_194_ - _zz_321_); - assign _zz_196_ = (memory_INSTRUCTION[13] ? memory_MulDivIterativePlugin_accumulator[31 : 0] : memory_MulDivIterativePlugin_rs1[31 : 0]); - assign _zz_197_ = (execute_RS2[31] && execute_IS_RS2_SIGNED); - assign _zz_198_ = ((execute_IS_MUL && _zz_197_) || ((execute_IS_DIV && execute_RS1[31]) && execute_IS_RS1_SIGNED)); - always @ (*) begin - _zz_199_[32] = (execute_IS_RS1_SIGNED && execute_RS1[31]); - _zz_199_[31 : 0] = execute_RS1; - end - - assign _zz_201_ = (_zz_200_ & externalInterruptArray_regNext); - assign externalInterrupt = (_zz_201_ != (32'b00000000000000000000000000000000)); - assign _zz_24_ = decode_SHIFT_CTRL; - assign _zz_22_ = _zz_73_; - assign _zz_37_ = decode_to_execute_SHIFT_CTRL; - assign _zz_21_ = decode_ENV_CTRL; - assign _zz_18_ = execute_ENV_CTRL; - assign _zz_16_ = memory_ENV_CTRL; - assign _zz_19_ = _zz_67_; - assign _zz_26_ = decode_to_execute_ENV_CTRL; - assign _zz_25_ = execute_to_memory_ENV_CTRL; - assign _zz_29_ = memory_to_writeBack_ENV_CTRL; - assign _zz_14_ = decode_SRC1_CTRL; - assign _zz_12_ = _zz_56_; - assign _zz_44_ = decode_to_execute_SRC1_CTRL; - assign _zz_11_ = decode_BRANCH_CTRL; - assign _zz_95_ = _zz_68_; - assign _zz_32_ = decode_to_execute_BRANCH_CTRL; - assign _zz_9_ = decode_SRC2_CTRL; - assign _zz_7_ = _zz_59_; - assign _zz_42_ = decode_to_execute_SRC2_CTRL; - assign _zz_6_ = decode_ALU_BITWISE_CTRL; - assign _zz_4_ = _zz_70_; - assign _zz_49_ = decode_to_execute_ALU_BITWISE_CTRL; - assign _zz_3_ = decode_ALU_CTRL; - assign _zz_1_ = _zz_72_; - assign _zz_47_ = decode_to_execute_ALU_CTRL; - assign decode_arbitration_isFlushed = (({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,execute_arbitration_flushNext}} != (3'b000)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,{execute_arbitration_flushIt,decode_arbitration_flushIt}}} != (4'b0000))); - assign execute_arbitration_isFlushed = (({writeBack_arbitration_flushNext,memory_arbitration_flushNext} != (2'b00)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,execute_arbitration_flushIt}} != (3'b000))); - assign memory_arbitration_isFlushed = ((writeBack_arbitration_flushNext != (1'b0)) || ({writeBack_arbitration_flushIt,memory_arbitration_flushIt} != (2'b00))); - assign writeBack_arbitration_isFlushed = (1'b0 || (writeBack_arbitration_flushIt != (1'b0))); - assign decode_arbitration_isStuckByOthers = (decode_arbitration_haltByOther || (((1'b0 || execute_arbitration_isStuck) || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); - assign decode_arbitration_isStuck = (decode_arbitration_haltItself || decode_arbitration_isStuckByOthers); - assign decode_arbitration_isMoving = ((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)); - assign decode_arbitration_isFiring = ((decode_arbitration_isValid && (! decode_arbitration_isStuck)) && (! decode_arbitration_removeIt)); - assign execute_arbitration_isStuckByOthers = (execute_arbitration_haltByOther || ((1'b0 || memory_arbitration_isStuck) || writeBack_arbitration_isStuck)); - assign execute_arbitration_isStuck = (execute_arbitration_haltItself || execute_arbitration_isStuckByOthers); - assign execute_arbitration_isMoving = ((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)); - assign execute_arbitration_isFiring = ((execute_arbitration_isValid && (! execute_arbitration_isStuck)) && (! execute_arbitration_removeIt)); - assign memory_arbitration_isStuckByOthers = (memory_arbitration_haltByOther || (1'b0 || writeBack_arbitration_isStuck)); - assign memory_arbitration_isStuck = (memory_arbitration_haltItself || memory_arbitration_isStuckByOthers); - assign memory_arbitration_isMoving = ((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)); - assign memory_arbitration_isFiring = ((memory_arbitration_isValid && (! memory_arbitration_isStuck)) && (! memory_arbitration_removeIt)); - assign writeBack_arbitration_isStuckByOthers = (writeBack_arbitration_haltByOther || 1'b0); - assign writeBack_arbitration_isStuck = (writeBack_arbitration_haltItself || writeBack_arbitration_isStuckByOthers); - assign writeBack_arbitration_isMoving = ((! writeBack_arbitration_isStuck) && (! writeBack_arbitration_removeIt)); - assign writeBack_arbitration_isFiring = ((writeBack_arbitration_isValid && (! writeBack_arbitration_isStuck)) && (! writeBack_arbitration_removeIt)); - assign iBusWishbone_ADR = {_zz_340_,_zz_202_}; - assign iBusWishbone_CTI = ((_zz_202_ == (3'b111)) ? (3'b111) : (3'b010)); - assign iBusWishbone_BTE = (2'b00); - assign iBusWishbone_SEL = (4'b1111); - assign iBusWishbone_WE = 1'b0; - assign iBusWishbone_DAT_MOSI = (32'bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); - always @ (*) begin - iBusWishbone_CYC = 1'b0; - if(_zz_247_)begin - iBusWishbone_CYC = 1'b1; - end - end - - always @ (*) begin - iBusWishbone_STB = 1'b0; - if(_zz_247_)begin - iBusWishbone_STB = 1'b1; - end - end - - assign iBus_cmd_ready = (iBus_cmd_valid && iBusWishbone_ACK); - assign iBus_rsp_valid = _zz_203_; - assign iBus_rsp_payload_data = iBusWishbone_DAT_MISO_regNext; - assign iBus_rsp_payload_error = 1'b0; - assign dBus_cmd_halfPipe_valid = dBus_cmd_halfPipe_regs_valid; - assign dBus_cmd_halfPipe_payload_wr = dBus_cmd_halfPipe_regs_payload_wr; - assign dBus_cmd_halfPipe_payload_address = dBus_cmd_halfPipe_regs_payload_address; - assign dBus_cmd_halfPipe_payload_data = dBus_cmd_halfPipe_regs_payload_data; - assign dBus_cmd_halfPipe_payload_size = dBus_cmd_halfPipe_regs_payload_size; - assign dBus_cmd_ready = dBus_cmd_halfPipe_regs_ready; - assign dBusWishbone_ADR = (dBus_cmd_halfPipe_payload_address >>> 2); - assign dBusWishbone_CTI = (3'b000); - assign dBusWishbone_BTE = (2'b00); - always @ (*) begin - case(dBus_cmd_halfPipe_payload_size) - 2'b00 : begin - _zz_204_ = (4'b0001); - end - 2'b01 : begin - _zz_204_ = (4'b0011); - end - default : begin - _zz_204_ = (4'b1111); - end - endcase - end - - always @ (*) begin - dBusWishbone_SEL = _zz_341_[3:0]; - if((! dBus_cmd_halfPipe_payload_wr))begin - dBusWishbone_SEL = (4'b1111); - end - end - - assign dBusWishbone_WE = dBus_cmd_halfPipe_payload_wr; - assign dBusWishbone_DAT_MOSI = dBus_cmd_halfPipe_payload_data; - assign dBus_cmd_halfPipe_ready = (dBus_cmd_halfPipe_valid && dBusWishbone_ACK); - assign dBusWishbone_CYC = dBus_cmd_halfPipe_valid; - assign dBusWishbone_STB = dBus_cmd_halfPipe_valid; - assign dBus_rsp_ready = ((dBus_cmd_halfPipe_valid && (! dBusWishbone_WE)) && dBusWishbone_ACK); - assign dBus_rsp_data = dBusWishbone_DAT_MISO; - assign dBus_rsp_error = 1'b0; - always @ (posedge clk) begin - if(reset) begin - IBusCachedPlugin_fetchPc_pcReg <= externalResetVector; - IBusCachedPlugin_fetchPc_booted <= 1'b0; - IBusCachedPlugin_fetchPc_inc <= 1'b0; - _zz_112_ <= 1'b0; - _zz_114_ <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; - IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; - IBusCachedPlugin_injector_decodeRemoved <= 1'b0; - IBusCachedPlugin_rspCounter <= _zz_127_; - IBusCachedPlugin_rspCounter <= (32'b00000000000000000000000000000000); - _zz_149_ <= 1'b1; - execute_LightShifterPlugin_isActive <= 1'b0; - _zz_161_ <= 1'b0; - CsrPlugin_mstatus_MIE <= 1'b0; - CsrPlugin_mstatus_MPIE <= 1'b0; - CsrPlugin_mstatus_MPP <= (2'b11); - CsrPlugin_mie_MEIE <= 1'b0; - CsrPlugin_mie_MTIE <= 1'b0; - CsrPlugin_mie_MSIE <= 1'b0; - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= 1'b0; - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= 1'b0; - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; - CsrPlugin_interrupt_valid <= 1'b0; - CsrPlugin_hadException <= 1'b0; - execute_CsrPlugin_wfiWake <= 1'b0; - memory_MulDivIterativePlugin_mul_counter_value <= (6'b000000); - memory_MulDivIterativePlugin_div_counter_value <= (6'b000000); - _zz_200_ <= (32'b00000000000000000000000000000000); - execute_arbitration_isValid <= 1'b0; - memory_arbitration_isValid <= 1'b0; - writeBack_arbitration_isValid <= 1'b0; - memory_to_writeBack_REGFILE_WRITE_DATA <= (32'b00000000000000000000000000000000); - memory_to_writeBack_INSTRUCTION <= (32'b00000000000000000000000000000000); - _zz_202_ <= (3'b000); - _zz_203_ <= 1'b0; - dBus_cmd_halfPipe_regs_valid <= 1'b0; - dBus_cmd_halfPipe_regs_ready <= 1'b1; - end else begin - IBusCachedPlugin_fetchPc_booted <= 1'b1; - if((IBusCachedPlugin_fetchPc_corrected || IBusCachedPlugin_fetchPc_pcRegPropagate))begin - IBusCachedPlugin_fetchPc_inc <= 1'b0; - end - if((IBusCachedPlugin_fetchPc_output_valid && IBusCachedPlugin_fetchPc_output_ready))begin - IBusCachedPlugin_fetchPc_inc <= 1'b1; - end - if(((! IBusCachedPlugin_fetchPc_output_valid) && IBusCachedPlugin_fetchPc_output_ready))begin - IBusCachedPlugin_fetchPc_inc <= 1'b0; - end - if((IBusCachedPlugin_fetchPc_booted && ((IBusCachedPlugin_fetchPc_output_ready || IBusCachedPlugin_fetcherflushIt) || IBusCachedPlugin_fetchPc_pcRegPropagate)))begin - IBusCachedPlugin_fetchPc_pcReg <= IBusCachedPlugin_fetchPc_pc; - end - if(IBusCachedPlugin_fetcherflushIt)begin - _zz_112_ <= 1'b0; - end - if(_zz_110_)begin - _zz_112_ <= IBusCachedPlugin_iBusRsp_stages_0_output_valid; - end - if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin - _zz_114_ <= IBusCachedPlugin_iBusRsp_stages_1_output_valid; - end - if(IBusCachedPlugin_fetcherflushIt)begin - _zz_114_ <= 1'b0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0; - end - if((! (! IBusCachedPlugin_iBusRsp_stages_1_input_ready)))begin - IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b1; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; - end - if((! (! IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)))begin - IBusCachedPlugin_injector_nextPcCalc_valids_1 <= IBusCachedPlugin_injector_nextPcCalc_valids_0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; - end - if((! execute_arbitration_isStuck))begin - IBusCachedPlugin_injector_nextPcCalc_valids_2 <= IBusCachedPlugin_injector_nextPcCalc_valids_1; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; - end - if((! memory_arbitration_isStuck))begin - IBusCachedPlugin_injector_nextPcCalc_valids_3 <= IBusCachedPlugin_injector_nextPcCalc_valids_2; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; - end - if((! writeBack_arbitration_isStuck))begin - IBusCachedPlugin_injector_nextPcCalc_valids_4 <= IBusCachedPlugin_injector_nextPcCalc_valids_3; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0; - end - if(decode_arbitration_removeIt)begin - IBusCachedPlugin_injector_decodeRemoved <= 1'b1; - end - if(IBusCachedPlugin_fetcherflushIt)begin - IBusCachedPlugin_injector_decodeRemoved <= 1'b0; - end - if(iBus_rsp_valid)begin - IBusCachedPlugin_rspCounter <= (IBusCachedPlugin_rspCounter + (32'b00000000000000000000000000000001)); - end - _zz_149_ <= 1'b0; - if(_zz_223_)begin - if(_zz_230_)begin - execute_LightShifterPlugin_isActive <= 1'b1; - if(execute_LightShifterPlugin_done)begin - execute_LightShifterPlugin_isActive <= 1'b0; - end - end - end - if(execute_arbitration_removeIt)begin - execute_LightShifterPlugin_isActive <= 1'b0; - end - _zz_161_ <= _zz_160_; - if((! decode_arbitration_isStuck))begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= 1'b0; - end else begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode <= CsrPlugin_exceptionPortCtrl_exceptionValids_decode; - end - if((! execute_arbitration_isStuck))begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= (CsrPlugin_exceptionPortCtrl_exceptionValids_decode && (! decode_arbitration_isStuck)); - end else begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= CsrPlugin_exceptionPortCtrl_exceptionValids_execute; - end - if((! memory_arbitration_isStuck))begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= (CsrPlugin_exceptionPortCtrl_exceptionValids_execute && (! execute_arbitration_isStuck)); - end else begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= CsrPlugin_exceptionPortCtrl_exceptionValids_memory; - end - if((! writeBack_arbitration_isStuck))begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= (CsrPlugin_exceptionPortCtrl_exceptionValids_memory && (! memory_arbitration_isStuck)); - end else begin - CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0; - end - CsrPlugin_interrupt_valid <= 1'b0; - if(_zz_248_)begin - if(_zz_249_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - if(_zz_250_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - if(_zz_251_)begin - CsrPlugin_interrupt_valid <= 1'b1; - end - end - CsrPlugin_hadException <= CsrPlugin_exception; - if(_zz_234_)begin - case(CsrPlugin_targetPrivilege) - 2'b11 : begin - CsrPlugin_mstatus_MIE <= 1'b0; - CsrPlugin_mstatus_MPIE <= CsrPlugin_mstatus_MIE; - CsrPlugin_mstatus_MPP <= CsrPlugin_privilege; - end - default : begin - end - endcase - end - if(_zz_235_)begin - case(_zz_236_) - 2'b11 : begin - CsrPlugin_mstatus_MPP <= (2'b00); - CsrPlugin_mstatus_MIE <= CsrPlugin_mstatus_MPIE; - CsrPlugin_mstatus_MPIE <= 1'b1; - end - default : begin - end - endcase - end - execute_CsrPlugin_wfiWake <= ({_zz_188_,{_zz_187_,_zz_186_}} != (3'b000)); - memory_MulDivIterativePlugin_mul_counter_value <= memory_MulDivIterativePlugin_mul_counter_valueNext; - memory_MulDivIterativePlugin_div_counter_value <= memory_MulDivIterativePlugin_div_counter_valueNext; - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_INSTRUCTION <= memory_INSTRUCTION; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_REGFILE_WRITE_DATA <= _zz_35_; - end - if(((! execute_arbitration_isStuck) || execute_arbitration_removeIt))begin - execute_arbitration_isValid <= 1'b0; - end - if(((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)))begin - execute_arbitration_isValid <= decode_arbitration_isValid; - end - if(((! memory_arbitration_isStuck) || memory_arbitration_removeIt))begin - memory_arbitration_isValid <= 1'b0; - end - if(((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)))begin - memory_arbitration_isValid <= execute_arbitration_isValid; - end - if(((! writeBack_arbitration_isStuck) || writeBack_arbitration_removeIt))begin - writeBack_arbitration_isValid <= 1'b0; - end - if(((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)))begin - writeBack_arbitration_isValid <= memory_arbitration_isValid; - end - case(execute_CsrPlugin_csrAddress) - 12'b101111000000 : begin - if(execute_CsrPlugin_writeEnable)begin - _zz_200_ <= execute_CsrPlugin_writeData[31 : 0]; - end - end - 12'b001100000000 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mstatus_MPP <= execute_CsrPlugin_writeData[12 : 11]; - CsrPlugin_mstatus_MPIE <= _zz_334_[0]; - CsrPlugin_mstatus_MIE <= _zz_335_[0]; - end - end - 12'b001101000001 : begin - end - 12'b001100000101 : begin - end - 12'b001101000100 : begin - end - 12'b001101000011 : begin - end - 12'b111111000000 : begin - end - 12'b001100000100 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mie_MEIE <= _zz_337_[0]; - CsrPlugin_mie_MTIE <= _zz_338_[0]; - CsrPlugin_mie_MSIE <= _zz_339_[0]; - end - end - 12'b001101000010 : begin - end - default : begin - end - endcase - if(_zz_247_)begin - if(iBusWishbone_ACK)begin - _zz_202_ <= (_zz_202_ + (3'b001)); - end - end - _zz_203_ <= (iBusWishbone_CYC && iBusWishbone_ACK); - if(_zz_252_)begin - dBus_cmd_halfPipe_regs_valid <= dBus_cmd_valid; - dBus_cmd_halfPipe_regs_ready <= (! dBus_cmd_valid); - end else begin - dBus_cmd_halfPipe_regs_valid <= (! dBus_cmd_halfPipe_ready); - dBus_cmd_halfPipe_regs_ready <= dBus_cmd_halfPipe_ready; - end - end - end - - always @ (posedge clk) begin - if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin - _zz_115_ <= IBusCachedPlugin_iBusRsp_stages_1_output_payload; - end - if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin - IBusCachedPlugin_s1_tightlyCoupledHit <= IBusCachedPlugin_s0_tightlyCoupledHit; - end - if(IBusCachedPlugin_iBusRsp_cacheRspArbitration_input_ready)begin - IBusCachedPlugin_s2_tightlyCoupledHit <= IBusCachedPlugin_s1_tightlyCoupledHit; - end - if(!(! (((dBus_rsp_ready && memory_MEMORY_ENABLE) && memory_arbitration_isValid) && memory_arbitration_isStuck))) begin - $display("ERROR DBusSimplePlugin doesn't allow memory stage stall when read happend"); - end - if(!(! (((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE) && (! writeBack_MEMORY_STORE)) && writeBack_arbitration_isStuck))) begin - $display("ERROR DBusSimplePlugin doesn't allow writeback stage stall when read happend"); - end - if(_zz_223_)begin - if(_zz_230_)begin - execute_LightShifterPlugin_amplitudeReg <= (execute_LightShifterPlugin_amplitude - (5'b00001)); - end - end - if(_zz_160_)begin - _zz_162_ <= _zz_50_[11 : 7]; - _zz_163_ <= _zz_79_; - end - CsrPlugin_mip_MEIP <= externalInterrupt; - CsrPlugin_mip_MTIP <= timerInterrupt; - CsrPlugin_mip_MSIP <= softwareInterrupt; - CsrPlugin_mcycle <= (CsrPlugin_mcycle + (64'b0000000000000000000000000000000000000000000000000000000000000001)); - if(writeBack_arbitration_isFiring)begin - CsrPlugin_minstret <= (CsrPlugin_minstret + (64'b0000000000000000000000000000000000000000000000000000000000000001)); - end - if(_zz_229_)begin - CsrPlugin_exceptionPortCtrl_exceptionContext_code <= (_zz_190_ ? IBusCachedPlugin_decodeExceptionPort_payload_code : decodeExceptionPort_payload_code); - CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= (_zz_190_ ? IBusCachedPlugin_decodeExceptionPort_payload_badAddr : decodeExceptionPort_payload_badAddr); - end - if(_zz_233_)begin - CsrPlugin_exceptionPortCtrl_exceptionContext_code <= (_zz_192_ ? DBusSimplePlugin_memoryExceptionPort_payload_code : BranchPlugin_branchExceptionPort_payload_code); - CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= (_zz_192_ ? DBusSimplePlugin_memoryExceptionPort_payload_badAddr : BranchPlugin_branchExceptionPort_payload_badAddr); - end - if(_zz_248_)begin - if(_zz_249_)begin - CsrPlugin_interrupt_code <= (4'b0111); - CsrPlugin_interrupt_targetPrivilege <= (2'b11); - end - if(_zz_250_)begin - CsrPlugin_interrupt_code <= (4'b0011); - CsrPlugin_interrupt_targetPrivilege <= (2'b11); - end - if(_zz_251_)begin - CsrPlugin_interrupt_code <= (4'b1011); - CsrPlugin_interrupt_targetPrivilege <= (2'b11); - end - end - if(_zz_234_)begin - case(CsrPlugin_targetPrivilege) - 2'b11 : begin - CsrPlugin_mcause_interrupt <= (! CsrPlugin_hadException); - CsrPlugin_mcause_exceptionCode <= CsrPlugin_trapCause; - CsrPlugin_mepc <= writeBack_PC; - if(CsrPlugin_hadException)begin - CsrPlugin_mtval <= CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr; - end - end - default : begin - end - endcase - end - if(_zz_217_)begin - if(_zz_231_)begin - memory_MulDivIterativePlugin_rs2 <= (memory_MulDivIterativePlugin_rs2 >>> 1); - memory_MulDivIterativePlugin_accumulator <= ({_zz_313_,memory_MulDivIterativePlugin_accumulator[31 : 0]} >>> 1); - end - end - if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin - memory_MulDivIterativePlugin_div_done <= 1'b1; - end - if((! memory_arbitration_isStuck))begin - memory_MulDivIterativePlugin_div_done <= 1'b0; - end - if(_zz_218_)begin - if(_zz_232_)begin - memory_MulDivIterativePlugin_rs1[31 : 0] <= _zz_322_[31:0]; - memory_MulDivIterativePlugin_accumulator[31 : 0] <= ((! _zz_195_[32]) ? _zz_323_ : _zz_324_); - if((memory_MulDivIterativePlugin_div_counter_value == (6'b100000)))begin - memory_MulDivIterativePlugin_div_result <= _zz_325_[31:0]; - end - end - end - if(_zz_246_)begin - memory_MulDivIterativePlugin_accumulator <= (65'b00000000000000000000000000000000000000000000000000000000000000000); - memory_MulDivIterativePlugin_rs1 <= ((_zz_198_ ? (~ _zz_199_) : _zz_199_) + _zz_331_); - memory_MulDivIterativePlugin_rs2 <= ((_zz_197_ ? (~ execute_RS2) : execute_RS2) + _zz_333_); - memory_MulDivIterativePlugin_div_needRevert <= ((_zz_198_ ^ (_zz_197_ && (! execute_INSTRUCTION[13]))) && (! (((execute_RS2 == (32'b00000000000000000000000000000000)) && execute_IS_RS2_SIGNED) && (! execute_INSTRUCTION[13])))); - end - externalInterruptArray_regNext <= externalInterruptArray; - if((! execute_arbitration_isStuck))begin - decode_to_execute_INSTRUCTION <= decode_INSTRUCTION; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_INSTRUCTION <= execute_INSTRUCTION; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_ALIGNEMENT_FAULT <= execute_ALIGNEMENT_FAULT; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_MEMORY_READ_DATA <= memory_MEMORY_READ_DATA; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SHIFT_CTRL <= _zz_23_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_CSR <= decode_IS_CSR; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_PC <= decode_PC; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_PC <= _zz_41_; - end - if(((! writeBack_arbitration_isStuck) && (! CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack)))begin - memory_to_writeBack_PC <= memory_PC; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_PREDICTION_HAD_BRANCHED2 <= decode_PREDICTION_HAD_BRANCHED2; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_MEMORY_STORE <= decode_MEMORY_STORE; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_MEMORY_STORE <= execute_MEMORY_STORE; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_MEMORY_STORE <= memory_MEMORY_STORE; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_FORMAL_PC_NEXT <= _zz_97_; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_FORMAL_PC_NEXT <= execute_FORMAL_PC_NEXT; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_FORMAL_PC_NEXT <= _zz_96_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_ENV_CTRL <= _zz_20_; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_ENV_CTRL <= _zz_17_; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_ENV_CTRL <= _zz_15_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_REGFILE_WRITE_VALID <= decode_REGFILE_WRITE_VALID; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_REGFILE_WRITE_VALID <= execute_REGFILE_WRITE_VALID; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_REGFILE_WRITE_VALID <= memory_REGFILE_WRITE_VALID; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC_LESS_UNSIGNED <= decode_SRC_LESS_UNSIGNED; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_BRANCH_DO <= execute_BRANCH_DO; - end - if(((! memory_arbitration_isStuck) && (! execute_arbitration_isStuckByOthers)))begin - execute_to_memory_REGFILE_WRITE_DATA <= _zz_36_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_CSR_WRITE_OPCODE <= decode_CSR_WRITE_OPCODE; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_RS1 <= decode_RS1; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC2_FORCE_ZERO <= decode_SRC2_FORCE_ZERO; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_BYPASSABLE_MEMORY_STAGE <= decode_BYPASSABLE_MEMORY_STAGE; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_BYPASSABLE_MEMORY_STAGE <= execute_BYPASSABLE_MEMORY_STAGE; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC1_CTRL <= _zz_13_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_BRANCH_CTRL <= _zz_10_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_MEMORY_ENABLE <= decode_MEMORY_ENABLE; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_MEMORY_ENABLE <= execute_MEMORY_ENABLE; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_MEMORY_ENABLE <= memory_MEMORY_ENABLE; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC_USE_SUB_LESS <= decode_SRC_USE_SUB_LESS; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_MMU_FAULT <= execute_MMU_FAULT; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_BRANCH_CALC <= execute_BRANCH_CALC; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_RS2 <= decode_RS2; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_MUL <= decode_IS_MUL; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_IS_MUL <= execute_IS_MUL; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_MEMORY_ADDRESS_LOW <= execute_MEMORY_ADDRESS_LOW; - end - if((! writeBack_arbitration_isStuck))begin - memory_to_writeBack_MEMORY_ADDRESS_LOW <= memory_MEMORY_ADDRESS_LOW; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_DIV <= decode_IS_DIV; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_IS_DIV <= execute_IS_DIV; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_CSR_READ_OPCODE <= decode_CSR_READ_OPCODE; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_RS1_SIGNED <= decode_IS_RS1_SIGNED; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_BYPASSABLE_EXECUTE_STAGE <= decode_BYPASSABLE_EXECUTE_STAGE; - end - if((! memory_arbitration_isStuck))begin - execute_to_memory_MMU_RSP_physicalAddress <= execute_MMU_RSP_physicalAddress; - execute_to_memory_MMU_RSP_isIoAccess <= execute_MMU_RSP_isIoAccess; - execute_to_memory_MMU_RSP_allowRead <= execute_MMU_RSP_allowRead; - execute_to_memory_MMU_RSP_allowWrite <= execute_MMU_RSP_allowWrite; - execute_to_memory_MMU_RSP_allowExecute <= execute_MMU_RSP_allowExecute; - execute_to_memory_MMU_RSP_exception <= execute_MMU_RSP_exception; - execute_to_memory_MMU_RSP_refilling <= execute_MMU_RSP_refilling; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_IS_RS2_SIGNED <= decode_IS_RS2_SIGNED; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_SRC2_CTRL <= _zz_8_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_ALU_BITWISE_CTRL <= _zz_5_; - end - if((! execute_arbitration_isStuck))begin - decode_to_execute_ALU_CTRL <= _zz_2_; - end - case(execute_CsrPlugin_csrAddress) - 12'b101111000000 : begin - end - 12'b001100000000 : begin - end - 12'b001101000001 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mepc <= execute_CsrPlugin_writeData[31 : 0]; - end - end - 12'b001100000101 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mtvec_base <= execute_CsrPlugin_writeData[31 : 2]; - CsrPlugin_mtvec_mode <= execute_CsrPlugin_writeData[1 : 0]; - end - end - 12'b001101000100 : begin - if(execute_CsrPlugin_writeEnable)begin - CsrPlugin_mip_MSIP <= _zz_336_[0]; - end - end - 12'b001101000011 : begin - end - 12'b111111000000 : begin - end - 12'b001100000100 : begin - end - 12'b001101000010 : begin - end - default : begin - end - endcase - iBusWishbone_DAT_MISO_regNext <= iBusWishbone_DAT_MISO; - if(_zz_252_)begin - dBus_cmd_halfPipe_regs_payload_wr <= dBus_cmd_payload_wr; - dBus_cmd_halfPipe_regs_payload_address <= dBus_cmd_payload_address; - dBus_cmd_halfPipe_regs_payload_data <= dBus_cmd_payload_data; - dBus_cmd_halfPipe_regs_payload_size <= dBus_cmd_payload_size; - end - end - -endmodule - diff --git a/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v b/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v new file mode 120000 index 000000000..ede3e75e3 --- /dev/null +++ b/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v @@ -0,0 +1 @@ +../../../third_party/VexRiscv_Lite/VexRiscv_Lite.v \ No newline at end of file diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v deleted file mode 100644 index a207088c5..000000000 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v +++ /dev/null @@ -1,12721 +0,0 @@ -//-------------------------------------------------------------------------------- -// Auto-generated by Migen (--------) & LiteX (9b11e919) on 2020-02-25 16:47:33 -//-------------------------------------------------------------------------------- -module top ( - output reg serial_tx, - input serial_rx, - (* dont_touch = "true" *) input clk100, - input cpu_reset, - output [13:0] ddram_a, - output [2:0] ddram_ba, - output ddram_ras_n, - output ddram_cas_n, - output ddram_we_n, - output ddram_cs_n, - output [1:0] ddram_dm, - inout [15:0] ddram_dq, - output [1:0] ddram_dqs_p, - output [1:0] ddram_dqs_n, - output ddram_clk_p, - output ddram_clk_n, - output ddram_cke, - output ddram_odt, - output ddram_reset_n, - output [3:0] led -); - - wire [3:0] led; - - assign led[0] = main_locked; - assign led[1] = idelayctl_rdy; - assign led[2] = 0; - assign led[3] = 0; - - // Manually inserted OBUFs - wire [13:0] ddram_a_iob; - wire [ 2:0] ddram_ba_iob; - wire ddram_ras_n_iob; - wire ddram_cas_n_iob; - wire ddram_we_n_iob; - wire ddram_cs_n_iob; - wire [ 1:0] ddram_dm_iob; - wire ddram_cke_iob; - wire ddram_odt_iob; - wire ddram_reset_n_iob; - - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a0 ( - .I(ddram_a_iob[0]), - .O(ddram_a[0]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a1 ( - .I(ddram_a_iob[1]), - .O(ddram_a[1]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a2 ( - .I(ddram_a_iob[2]), - .O(ddram_a[2]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a3 ( - .I(ddram_a_iob[3]), - .O(ddram_a[3]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a4 ( - .I(ddram_a_iob[4]), - .O(ddram_a[4]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a5 ( - .I(ddram_a_iob[5]), - .O(ddram_a[5]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a6 ( - .I(ddram_a_iob[6]), - .O(ddram_a[6]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a7 ( - .I(ddram_a_iob[7]), - .O(ddram_a[7]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a8 ( - .I(ddram_a_iob[8]), - .O(ddram_a[8]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a9 ( - .I(ddram_a_iob[9]), - .O(ddram_a[9]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a10 ( - .I(ddram_a_iob[10]), - .O(ddram_a[10]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a11 ( - .I(ddram_a_iob[11]), - .O(ddram_a[11]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a12 ( - .I(ddram_a_iob[12]), - .O(ddram_a[12]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_a13 ( - .I(ddram_a_iob[13]), - .O(ddram_a[13]) - ); - - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_ba0 ( - .I(ddram_ba_iob[0]), - .O(ddram_ba[0]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_ba1 ( - .I(ddram_ba_iob[1]), - .O(ddram_ba[1]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_ba2 ( - .I(ddram_ba_iob[2]), - .O(ddram_ba[2]) - ); - - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_dm0 ( - .I(ddram_dm_iob[0]), - .O(ddram_dm[0]) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_dm1 ( - .I(ddram_dm_iob[1]), - .O(ddram_dm[1]) - ); - - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_ras ( - .I(ddram_ras_n_iob), - .O(ddram_ras_n) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_cas ( - .I(ddram_cas_n_iob), - .O(ddram_cas_n) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_we ( - .I(ddram_we_n_iob), - .O(ddram_we_n) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_cs ( - .I(ddram_cs_n_iob), - .O(ddram_cs_n) - ); - - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_cke ( - .I(ddram_cke_iob), - .O(ddram_cke) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_odt ( - .I(ddram_odt_iob), - .O(ddram_odt) - ); - OBUF #( - .IOSTANDARD("SSTL135"), - .SLEW("FAST") - ) obuf_rst ( - .I(ddram_reset_n_iob), - .O(ddram_reset_n) - ); - - // End manually inserted OBUFs - - wire idelayctl_rdy; - reg main_minsoc_ctrl_reset_storage = 1'd0; - reg main_minsoc_ctrl_reset_re = 1'd0; - reg [31:0] main_minsoc_ctrl_scratch_storage = 32'd305419896; - reg main_minsoc_ctrl_scratch_re = 1'd0; - wire [31:0] main_minsoc_ctrl_bus_errors_status; - wire main_minsoc_ctrl_bus_errors_we; - wire main_minsoc_ctrl_reset; - wire main_minsoc_ctrl_bus_error; - reg [31:0] main_minsoc_ctrl_bus_errors = 32'd0; - wire main_minsoc_cpu_reset; - wire [29:0] main_minsoc_cpu_ibus_adr; - wire [31:0] main_minsoc_cpu_ibus_dat_w; - wire [31:0] main_minsoc_cpu_ibus_dat_r; - wire [3:0] main_minsoc_cpu_ibus_sel; - wire main_minsoc_cpu_ibus_cyc; - wire main_minsoc_cpu_ibus_stb; - wire main_minsoc_cpu_ibus_ack; - wire main_minsoc_cpu_ibus_we; - wire [2:0] main_minsoc_cpu_ibus_cti; - wire [1:0] main_minsoc_cpu_ibus_bte; - wire main_minsoc_cpu_ibus_err; - wire [29:0] main_minsoc_cpu_dbus_adr; - wire [31:0] main_minsoc_cpu_dbus_dat_w; - wire [31:0] main_minsoc_cpu_dbus_dat_r; - wire [3:0] main_minsoc_cpu_dbus_sel; - wire main_minsoc_cpu_dbus_cyc; - wire main_minsoc_cpu_dbus_stb; - wire main_minsoc_cpu_dbus_ack; - wire main_minsoc_cpu_dbus_we; - wire [2:0] main_minsoc_cpu_dbus_cti; - wire [1:0] main_minsoc_cpu_dbus_bte; - wire main_minsoc_cpu_dbus_err; - reg [31:0] main_minsoc_cpu_interrupt = 32'd0; - reg [31:0] main_minsoc_vexriscv = 32'd0; - wire [29:0] main_minsoc_interface0_soc_bus_adr; - wire [31:0] main_minsoc_interface0_soc_bus_dat_w; - wire [31:0] main_minsoc_interface0_soc_bus_dat_r; - wire [3:0] main_minsoc_interface0_soc_bus_sel; - wire main_minsoc_interface0_soc_bus_cyc; - wire main_minsoc_interface0_soc_bus_stb; - wire main_minsoc_interface0_soc_bus_ack; - wire main_minsoc_interface0_soc_bus_we; - wire [2:0] main_minsoc_interface0_soc_bus_cti; - wire [1:0] main_minsoc_interface0_soc_bus_bte; - wire main_minsoc_interface0_soc_bus_err; - wire [29:0] main_minsoc_interface1_soc_bus_adr; - wire [31:0] main_minsoc_interface1_soc_bus_dat_w; - wire [31:0] main_minsoc_interface1_soc_bus_dat_r; - wire [3:0] main_minsoc_interface1_soc_bus_sel; - wire main_minsoc_interface1_soc_bus_cyc; - wire main_minsoc_interface1_soc_bus_stb; - wire main_minsoc_interface1_soc_bus_ack; - wire main_minsoc_interface1_soc_bus_we; - wire [2:0] main_minsoc_interface1_soc_bus_cti; - wire [1:0] main_minsoc_interface1_soc_bus_bte; - wire main_minsoc_interface1_soc_bus_err; - wire [29:0] main_minsoc_rom_bus_adr; - wire [31:0] main_minsoc_rom_bus_dat_w; - wire [31:0] main_minsoc_rom_bus_dat_r; - wire [3:0] main_minsoc_rom_bus_sel; - wire main_minsoc_rom_bus_cyc; - wire main_minsoc_rom_bus_stb; - reg main_minsoc_rom_bus_ack = 1'd0; - wire main_minsoc_rom_bus_we; - wire [2:0] main_minsoc_rom_bus_cti; - wire [1:0] main_minsoc_rom_bus_bte; - reg main_minsoc_rom_bus_err = 1'd0; - wire [12:0] main_minsoc_rom_adr; - wire [31:0] main_minsoc_rom_dat_r; - wire [29:0] main_minsoc_sram_bus_adr; - wire [31:0] main_minsoc_sram_bus_dat_w; - wire [31:0] main_minsoc_sram_bus_dat_r; - wire [3:0] main_minsoc_sram_bus_sel; - wire main_minsoc_sram_bus_cyc; - wire main_minsoc_sram_bus_stb; - reg main_minsoc_sram_bus_ack = 1'd0; - wire main_minsoc_sram_bus_we; - wire [2:0] main_minsoc_sram_bus_cti; - wire [1:0] main_minsoc_sram_bus_bte; - reg main_minsoc_sram_bus_err = 1'd0; - wire [9:0] main_minsoc_sram_adr; - wire [31:0] main_minsoc_sram_dat_r; - reg [3:0] main_minsoc_sram_we = 4'd0; - wire [31:0] main_minsoc_sram_dat_w; - reg [31:0] main_minsoc_storage = 32'd8246337; - reg main_minsoc_re = 1'd0; - wire main_minsoc_sink_valid; - reg main_minsoc_sink_ready = 1'd0; - wire main_minsoc_sink_first; - wire main_minsoc_sink_last; - wire [7:0] main_minsoc_sink_payload_data; - reg main_minsoc_uart_clk_txen = 1'd0; - reg [31:0] main_minsoc_phase_accumulator_tx = 32'd0; - reg [7:0] main_minsoc_tx_reg = 8'd0; - reg [3:0] main_minsoc_tx_bitcount = 4'd0; - reg main_minsoc_tx_busy = 1'd0; - reg main_minsoc_source_valid = 1'd0; - wire main_minsoc_source_ready; - reg main_minsoc_source_first = 1'd0; - reg main_minsoc_source_last = 1'd0; - reg [7:0] main_minsoc_source_payload_data = 8'd0; - reg main_minsoc_uart_clk_rxen = 1'd0; - reg [31:0] main_minsoc_phase_accumulator_rx = 32'd0; - wire main_minsoc_rx; - reg main_minsoc_rx_r = 1'd0; - reg [7:0] main_minsoc_rx_reg = 8'd0; - reg [3:0] main_minsoc_rx_bitcount = 4'd0; - reg main_minsoc_rx_busy = 1'd0; - wire main_minsoc_uart_rxtx_re; - wire [7:0] main_minsoc_uart_rxtx_r; - wire main_minsoc_uart_rxtx_we; - wire [7:0] main_minsoc_uart_rxtx_w; - wire main_minsoc_uart_txfull_status; - wire main_minsoc_uart_txfull_we; - wire main_minsoc_uart_rxempty_status; - wire main_minsoc_uart_rxempty_we; - wire main_minsoc_uart_irq; - wire main_minsoc_uart_tx_status; - reg main_minsoc_uart_tx_pending = 1'd0; - wire main_minsoc_uart_tx_trigger; - reg main_minsoc_uart_tx_clear = 1'd0; - reg main_minsoc_uart_tx_old_trigger = 1'd0; - wire main_minsoc_uart_rx_status; - reg main_minsoc_uart_rx_pending = 1'd0; - wire main_minsoc_uart_rx_trigger; - reg main_minsoc_uart_rx_clear = 1'd0; - reg main_minsoc_uart_rx_old_trigger = 1'd0; - wire main_minsoc_uart_eventmanager_status_re; - wire [1:0] main_minsoc_uart_eventmanager_status_r; - wire main_minsoc_uart_eventmanager_status_we; - reg [1:0] main_minsoc_uart_eventmanager_status_w = 2'd0; - wire main_minsoc_uart_eventmanager_pending_re; - wire [1:0] main_minsoc_uart_eventmanager_pending_r; - wire main_minsoc_uart_eventmanager_pending_we; - reg [1:0] main_minsoc_uart_eventmanager_pending_w = 2'd0; - reg [1:0] main_minsoc_uart_eventmanager_storage = 2'd0; - reg main_minsoc_uart_eventmanager_re = 1'd0; - wire main_minsoc_uart_uart_sink_valid; - wire main_minsoc_uart_uart_sink_ready; - wire main_minsoc_uart_uart_sink_first; - wire main_minsoc_uart_uart_sink_last; - wire [7:0] main_minsoc_uart_uart_sink_payload_data; - wire main_minsoc_uart_uart_source_valid; - wire main_minsoc_uart_uart_source_ready; - wire main_minsoc_uart_uart_source_first; - wire main_minsoc_uart_uart_source_last; - wire [7:0] main_minsoc_uart_uart_source_payload_data; - wire main_minsoc_uart_tx_fifo_sink_valid; - wire main_minsoc_uart_tx_fifo_sink_ready; - reg main_minsoc_uart_tx_fifo_sink_first = 1'd0; - reg main_minsoc_uart_tx_fifo_sink_last = 1'd0; - wire [7:0] main_minsoc_uart_tx_fifo_sink_payload_data; - wire main_minsoc_uart_tx_fifo_source_valid; - wire main_minsoc_uart_tx_fifo_source_ready; - wire main_minsoc_uart_tx_fifo_source_first; - wire main_minsoc_uart_tx_fifo_source_last; - wire [7:0] main_minsoc_uart_tx_fifo_source_payload_data; - wire main_minsoc_uart_tx_fifo_re; - reg main_minsoc_uart_tx_fifo_readable = 1'd0; - wire main_minsoc_uart_tx_fifo_syncfifo_we; - wire main_minsoc_uart_tx_fifo_syncfifo_writable; - wire main_minsoc_uart_tx_fifo_syncfifo_re; - wire main_minsoc_uart_tx_fifo_syncfifo_readable; - wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_din; - wire [9:0] main_minsoc_uart_tx_fifo_syncfifo_dout; - reg [4:0] main_minsoc_uart_tx_fifo_level0 = 5'd0; - reg main_minsoc_uart_tx_fifo_replace = 1'd0; - reg [3:0] main_minsoc_uart_tx_fifo_produce = 4'd0; - reg [3:0] main_minsoc_uart_tx_fifo_consume = 4'd0; - reg [3:0] main_minsoc_uart_tx_fifo_wrport_adr = 4'd0; - wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_r; - wire main_minsoc_uart_tx_fifo_wrport_we; - wire [9:0] main_minsoc_uart_tx_fifo_wrport_dat_w; - wire main_minsoc_uart_tx_fifo_do_read; - wire [3:0] main_minsoc_uart_tx_fifo_rdport_adr; - wire [9:0] main_minsoc_uart_tx_fifo_rdport_dat_r; - wire main_minsoc_uart_tx_fifo_rdport_re; - wire [4:0] main_minsoc_uart_tx_fifo_level1; - wire [7:0] main_minsoc_uart_tx_fifo_fifo_in_payload_data; - wire main_minsoc_uart_tx_fifo_fifo_in_first; - wire main_minsoc_uart_tx_fifo_fifo_in_last; - wire [7:0] main_minsoc_uart_tx_fifo_fifo_out_payload_data; - wire main_minsoc_uart_tx_fifo_fifo_out_first; - wire main_minsoc_uart_tx_fifo_fifo_out_last; - wire main_minsoc_uart_rx_fifo_sink_valid; - wire main_minsoc_uart_rx_fifo_sink_ready; - wire main_minsoc_uart_rx_fifo_sink_first; - wire main_minsoc_uart_rx_fifo_sink_last; - wire [7:0] main_minsoc_uart_rx_fifo_sink_payload_data; - wire main_minsoc_uart_rx_fifo_source_valid; - wire main_minsoc_uart_rx_fifo_source_ready; - wire main_minsoc_uart_rx_fifo_source_first; - wire main_minsoc_uart_rx_fifo_source_last; - wire [7:0] main_minsoc_uart_rx_fifo_source_payload_data; - wire main_minsoc_uart_rx_fifo_re; - reg main_minsoc_uart_rx_fifo_readable = 1'd0; - wire main_minsoc_uart_rx_fifo_syncfifo_we; - wire main_minsoc_uart_rx_fifo_syncfifo_writable; - wire main_minsoc_uart_rx_fifo_syncfifo_re; - wire main_minsoc_uart_rx_fifo_syncfifo_readable; - wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_din; - wire [9:0] main_minsoc_uart_rx_fifo_syncfifo_dout; - reg [4:0] main_minsoc_uart_rx_fifo_level0 = 5'd0; - reg main_minsoc_uart_rx_fifo_replace = 1'd0; - reg [3:0] main_minsoc_uart_rx_fifo_produce = 4'd0; - reg [3:0] main_minsoc_uart_rx_fifo_consume = 4'd0; - reg [3:0] main_minsoc_uart_rx_fifo_wrport_adr = 4'd0; - wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_r; - wire main_minsoc_uart_rx_fifo_wrport_we; - wire [9:0] main_minsoc_uart_rx_fifo_wrport_dat_w; - wire main_minsoc_uart_rx_fifo_do_read; - wire [3:0] main_minsoc_uart_rx_fifo_rdport_adr; - wire [9:0] main_minsoc_uart_rx_fifo_rdport_dat_r; - wire main_minsoc_uart_rx_fifo_rdport_re; - wire [4:0] main_minsoc_uart_rx_fifo_level1; - wire [7:0] main_minsoc_uart_rx_fifo_fifo_in_payload_data; - wire main_minsoc_uart_rx_fifo_fifo_in_first; - wire main_minsoc_uart_rx_fifo_fifo_in_last; - wire [7:0] main_minsoc_uart_rx_fifo_fifo_out_payload_data; - wire main_minsoc_uart_rx_fifo_fifo_out_first; - wire main_minsoc_uart_rx_fifo_fifo_out_last; - reg main_minsoc_uart_reset = 1'd0; - reg [31:0] main_minsoc_timer0_load_storage = 32'd0; - reg main_minsoc_timer0_load_re = 1'd0; - reg [31:0] main_minsoc_timer0_reload_storage = 32'd0; - reg main_minsoc_timer0_reload_re = 1'd0; - reg main_minsoc_timer0_en_storage = 1'd0; - reg main_minsoc_timer0_en_re = 1'd0; - reg main_minsoc_timer0_update_value_storage = 1'd0; - reg main_minsoc_timer0_update_value_re = 1'd0; - reg [31:0] main_minsoc_timer0_value_status = 32'd0; - wire main_minsoc_timer0_value_we; - wire main_minsoc_timer0_irq; - wire main_minsoc_timer0_zero_status; - reg main_minsoc_timer0_zero_pending = 1'd0; - wire main_minsoc_timer0_zero_trigger; - reg main_minsoc_timer0_zero_clear = 1'd0; - reg main_minsoc_timer0_zero_old_trigger = 1'd0; - wire main_minsoc_timer0_eventmanager_status_re; - wire main_minsoc_timer0_eventmanager_status_r; - wire main_minsoc_timer0_eventmanager_status_we; - wire main_minsoc_timer0_eventmanager_status_w; - wire main_minsoc_timer0_eventmanager_pending_re; - wire main_minsoc_timer0_eventmanager_pending_r; - wire main_minsoc_timer0_eventmanager_pending_we; - wire main_minsoc_timer0_eventmanager_pending_w; - reg main_minsoc_timer0_eventmanager_storage = 1'd0; - reg main_minsoc_timer0_eventmanager_re = 1'd0; - reg [31:0] main_minsoc_timer0_value = 32'd0; - reg [13:0] main_minsoc_interface_adr = 14'd0; - reg main_minsoc_interface_we = 1'd0; - wire [7:0] main_minsoc_interface_dat_w; - wire [7:0] main_minsoc_interface_dat_r; - wire [29:0] main_minsoc_bus_wishbone_adr; - wire [31:0] main_minsoc_bus_wishbone_dat_w; - wire [31:0] main_minsoc_bus_wishbone_dat_r; - wire [3:0] main_minsoc_bus_wishbone_sel; - wire main_minsoc_bus_wishbone_cyc; - wire main_minsoc_bus_wishbone_stb; - reg main_minsoc_bus_wishbone_ack = 1'd0; - wire main_minsoc_bus_wishbone_we; - wire [2:0] main_minsoc_bus_wishbone_cti; - wire [1:0] main_minsoc_bus_wishbone_bte; - reg main_minsoc_bus_wishbone_err = 1'd0; - wire [29:0] main_interface0_wb_sdram_adr; - wire [31:0] main_interface0_wb_sdram_dat_w; - reg [31:0] main_interface0_wb_sdram_dat_r = 32'd0; - wire [3:0] main_interface0_wb_sdram_sel; - wire main_interface0_wb_sdram_cyc; - wire main_interface0_wb_sdram_stb; - reg main_interface0_wb_sdram_ack = 1'd0; - wire main_interface0_wb_sdram_we; - wire [2:0] main_interface0_wb_sdram_cti; - wire [1:0] main_interface0_wb_sdram_bte; - reg main_interface0_wb_sdram_err = 1'd0; - wire sys_clk; - wire sys_rst; - wire sys4x_clk; - wire sys4x_dqs_clk; - wire clk200_clk; - wire clk200_rst; - wire main_pll_clkin; - wire main_reset; - wire main_locked; - wire main_clkout0; - wire main_clkout1; - wire main_clkout2; - wire main_clkout3; - reg [3:0] main_reset_counter = 4'd15; - reg main_ic_reset = 1'd1; - reg [4:0] main_a7ddrphy_half_sys8x_taps_storage = 5'd13; - reg main_a7ddrphy_half_sys8x_taps_re = 1'd0; - wire main_a7ddrphy_cdly_rst_re; - wire main_a7ddrphy_cdly_rst_r; - wire main_a7ddrphy_cdly_rst_we; - reg main_a7ddrphy_cdly_rst_w = 1'd0; - wire main_a7ddrphy_cdly_inc_re; - wire main_a7ddrphy_cdly_inc_r; - wire main_a7ddrphy_cdly_inc_we; - reg main_a7ddrphy_cdly_inc_w = 1'd0; - reg [1:0] main_a7ddrphy_dly_sel_storage = 2'd0; - reg main_a7ddrphy_dly_sel_re = 1'd0; - wire main_a7ddrphy_rdly_dq_rst_re; - wire main_a7ddrphy_rdly_dq_rst_r; - wire main_a7ddrphy_rdly_dq_rst_we; - reg main_a7ddrphy_rdly_dq_rst_w = 1'd0; - wire main_a7ddrphy_rdly_dq_inc_re; - wire main_a7ddrphy_rdly_dq_inc_r; - wire main_a7ddrphy_rdly_dq_inc_we; - reg main_a7ddrphy_rdly_dq_inc_w = 1'd0; - wire main_a7ddrphy_rdly_dq_bitslip_rst_re; - wire main_a7ddrphy_rdly_dq_bitslip_rst_r; - wire main_a7ddrphy_rdly_dq_bitslip_rst_we; - reg main_a7ddrphy_rdly_dq_bitslip_rst_w = 1'd0; - wire main_a7ddrphy_rdly_dq_bitslip_re; - wire main_a7ddrphy_rdly_dq_bitslip_r; - wire main_a7ddrphy_rdly_dq_bitslip_we; - reg main_a7ddrphy_rdly_dq_bitslip_w = 1'd0; - wire [13:0] main_a7ddrphy_dfi_p0_address; - wire [2:0] main_a7ddrphy_dfi_p0_bank; - wire main_a7ddrphy_dfi_p0_cas_n; - wire main_a7ddrphy_dfi_p0_cs_n; - wire main_a7ddrphy_dfi_p0_ras_n; - wire main_a7ddrphy_dfi_p0_we_n; - wire main_a7ddrphy_dfi_p0_cke; - wire main_a7ddrphy_dfi_p0_odt; - wire main_a7ddrphy_dfi_p0_reset_n; - wire main_a7ddrphy_dfi_p0_act_n; - wire [31:0] main_a7ddrphy_dfi_p0_wrdata; - wire main_a7ddrphy_dfi_p0_wrdata_en; - wire [3:0] main_a7ddrphy_dfi_p0_wrdata_mask; - wire main_a7ddrphy_dfi_p0_rddata_en; - reg [31:0] main_a7ddrphy_dfi_p0_rddata = 32'd0; - reg main_a7ddrphy_dfi_p0_rddata_valid = 1'd0; - wire [13:0] main_a7ddrphy_dfi_p1_address; - wire [2:0] main_a7ddrphy_dfi_p1_bank; - wire main_a7ddrphy_dfi_p1_cas_n; - wire main_a7ddrphy_dfi_p1_cs_n; - wire main_a7ddrphy_dfi_p1_ras_n; - wire main_a7ddrphy_dfi_p1_we_n; - wire main_a7ddrphy_dfi_p1_cke; - wire main_a7ddrphy_dfi_p1_odt; - wire main_a7ddrphy_dfi_p1_reset_n; - wire main_a7ddrphy_dfi_p1_act_n; - wire [31:0] main_a7ddrphy_dfi_p1_wrdata; - wire main_a7ddrphy_dfi_p1_wrdata_en; - wire [3:0] main_a7ddrphy_dfi_p1_wrdata_mask; - wire main_a7ddrphy_dfi_p1_rddata_en; - reg [31:0] main_a7ddrphy_dfi_p1_rddata = 32'd0; - reg main_a7ddrphy_dfi_p1_rddata_valid = 1'd0; - wire [13:0] main_a7ddrphy_dfi_p2_address; - wire [2:0] main_a7ddrphy_dfi_p2_bank; - wire main_a7ddrphy_dfi_p2_cas_n; - wire main_a7ddrphy_dfi_p2_cs_n; - wire main_a7ddrphy_dfi_p2_ras_n; - wire main_a7ddrphy_dfi_p2_we_n; - wire main_a7ddrphy_dfi_p2_cke; - wire main_a7ddrphy_dfi_p2_odt; - wire main_a7ddrphy_dfi_p2_reset_n; - wire main_a7ddrphy_dfi_p2_act_n; - wire [31:0] main_a7ddrphy_dfi_p2_wrdata; - wire main_a7ddrphy_dfi_p2_wrdata_en; - wire [3:0] main_a7ddrphy_dfi_p2_wrdata_mask; - wire main_a7ddrphy_dfi_p2_rddata_en; - reg [31:0] main_a7ddrphy_dfi_p2_rddata = 32'd0; - reg main_a7ddrphy_dfi_p2_rddata_valid = 1'd0; - wire [13:0] main_a7ddrphy_dfi_p3_address; - wire [2:0] main_a7ddrphy_dfi_p3_bank; - wire main_a7ddrphy_dfi_p3_cas_n; - wire main_a7ddrphy_dfi_p3_cs_n; - wire main_a7ddrphy_dfi_p3_ras_n; - wire main_a7ddrphy_dfi_p3_we_n; - wire main_a7ddrphy_dfi_p3_cke; - wire main_a7ddrphy_dfi_p3_odt; - wire main_a7ddrphy_dfi_p3_reset_n; - wire main_a7ddrphy_dfi_p3_act_n; - wire [31:0] main_a7ddrphy_dfi_p3_wrdata; - wire main_a7ddrphy_dfi_p3_wrdata_en; - wire [3:0] main_a7ddrphy_dfi_p3_wrdata_mask; - wire main_a7ddrphy_dfi_p3_rddata_en; - reg [31:0] main_a7ddrphy_dfi_p3_rddata = 32'd0; - reg main_a7ddrphy_dfi_p3_rddata_valid = 1'd0; - wire main_a7ddrphy_sd_clk_se_nodelay; - reg main_a7ddrphy_oe_dqs = 1'd0; - wire main_a7ddrphy_dqs_preamble; - wire main_a7ddrphy_dqs_postamble; - reg [7:0] main_a7ddrphy_dqs_serdes_pattern = 8'd85; - wire main_a7ddrphy_dqs_nodelay0; - wire main_a7ddrphy_dqs_t0; - wire main_a7ddrphy0; - wire main_a7ddrphy_dqs_nodelay1; - wire main_a7ddrphy_dqs_t1; - wire main_a7ddrphy1; - reg main_a7ddrphy_oe_dq = 1'd0; - wire main_a7ddrphy_dq_o_nodelay0; - wire main_a7ddrphy_dq_i_nodelay0; - wire main_a7ddrphy_dq_i_delayed0; - wire main_a7ddrphy_dq_t0; - wire [7:0] main_a7ddrphy_dq_i_data0; - wire [7:0] main_a7ddrphy_bitslip0_i; - reg [7:0] main_a7ddrphy_bitslip0_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip0_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip0_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay1; - wire main_a7ddrphy_dq_i_nodelay1; - wire main_a7ddrphy_dq_i_delayed1; - wire main_a7ddrphy_dq_t1; - wire [7:0] main_a7ddrphy_dq_i_data1; - wire [7:0] main_a7ddrphy_bitslip1_i; - reg [7:0] main_a7ddrphy_bitslip1_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip1_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip1_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay2; - wire main_a7ddrphy_dq_i_nodelay2; - wire main_a7ddrphy_dq_i_delayed2; - wire main_a7ddrphy_dq_t2; - wire [7:0] main_a7ddrphy_dq_i_data2; - wire [7:0] main_a7ddrphy_bitslip2_i; - reg [7:0] main_a7ddrphy_bitslip2_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip2_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip2_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay3; - wire main_a7ddrphy_dq_i_nodelay3; - wire main_a7ddrphy_dq_i_delayed3; - wire main_a7ddrphy_dq_t3; - wire [7:0] main_a7ddrphy_dq_i_data3; - wire [7:0] main_a7ddrphy_bitslip3_i; - reg [7:0] main_a7ddrphy_bitslip3_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip3_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip3_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay4; - wire main_a7ddrphy_dq_i_nodelay4; - wire main_a7ddrphy_dq_i_delayed4; - wire main_a7ddrphy_dq_t4; - wire [7:0] main_a7ddrphy_dq_i_data4; - wire [7:0] main_a7ddrphy_bitslip4_i; - reg [7:0] main_a7ddrphy_bitslip4_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip4_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip4_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay5; - wire main_a7ddrphy_dq_i_nodelay5; - wire main_a7ddrphy_dq_i_delayed5; - wire main_a7ddrphy_dq_t5; - wire [7:0] main_a7ddrphy_dq_i_data5; - wire [7:0] main_a7ddrphy_bitslip5_i; - reg [7:0] main_a7ddrphy_bitslip5_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip5_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip5_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay6; - wire main_a7ddrphy_dq_i_nodelay6; - wire main_a7ddrphy_dq_i_delayed6; - wire main_a7ddrphy_dq_t6; - wire [7:0] main_a7ddrphy_dq_i_data6; - wire [7:0] main_a7ddrphy_bitslip6_i; - reg [7:0] main_a7ddrphy_bitslip6_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip6_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip6_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay7; - wire main_a7ddrphy_dq_i_nodelay7; - wire main_a7ddrphy_dq_i_delayed7; - wire main_a7ddrphy_dq_t7; - wire [7:0] main_a7ddrphy_dq_i_data7; - wire [7:0] main_a7ddrphy_bitslip7_i; - reg [7:0] main_a7ddrphy_bitslip7_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip7_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip7_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay8; - wire main_a7ddrphy_dq_i_nodelay8; - wire main_a7ddrphy_dq_i_delayed8; - wire main_a7ddrphy_dq_t8; - wire [7:0] main_a7ddrphy_dq_i_data8; - wire [7:0] main_a7ddrphy_bitslip8_i; - reg [7:0] main_a7ddrphy_bitslip8_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip8_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip8_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay9; - wire main_a7ddrphy_dq_i_nodelay9; - wire main_a7ddrphy_dq_i_delayed9; - wire main_a7ddrphy_dq_t9; - wire [7:0] main_a7ddrphy_dq_i_data9; - wire [7:0] main_a7ddrphy_bitslip9_i; - reg [7:0] main_a7ddrphy_bitslip9_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip9_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip9_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay10; - wire main_a7ddrphy_dq_i_nodelay10; - wire main_a7ddrphy_dq_i_delayed10; - wire main_a7ddrphy_dq_t10; - wire [7:0] main_a7ddrphy_dq_i_data10; - wire [7:0] main_a7ddrphy_bitslip10_i; - reg [7:0] main_a7ddrphy_bitslip10_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip10_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip10_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay11; - wire main_a7ddrphy_dq_i_nodelay11; - wire main_a7ddrphy_dq_i_delayed11; - wire main_a7ddrphy_dq_t11; - wire [7:0] main_a7ddrphy_dq_i_data11; - wire [7:0] main_a7ddrphy_bitslip11_i; - reg [7:0] main_a7ddrphy_bitslip11_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip11_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip11_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay12; - wire main_a7ddrphy_dq_i_nodelay12; - wire main_a7ddrphy_dq_i_delayed12; - wire main_a7ddrphy_dq_t12; - wire [7:0] main_a7ddrphy_dq_i_data12; - wire [7:0] main_a7ddrphy_bitslip12_i; - reg [7:0] main_a7ddrphy_bitslip12_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip12_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip12_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay13; - wire main_a7ddrphy_dq_i_nodelay13; - wire main_a7ddrphy_dq_i_delayed13; - wire main_a7ddrphy_dq_t13; - wire [7:0] main_a7ddrphy_dq_i_data13; - wire [7:0] main_a7ddrphy_bitslip13_i; - reg [7:0] main_a7ddrphy_bitslip13_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip13_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip13_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay14; - wire main_a7ddrphy_dq_i_nodelay14; - wire main_a7ddrphy_dq_i_delayed14; - wire main_a7ddrphy_dq_t14; - wire [7:0] main_a7ddrphy_dq_i_data14; - wire [7:0] main_a7ddrphy_bitslip14_i; - reg [7:0] main_a7ddrphy_bitslip14_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip14_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip14_r = 16'd0; - wire main_a7ddrphy_dq_o_nodelay15; - wire main_a7ddrphy_dq_i_nodelay15; - wire main_a7ddrphy_dq_i_delayed15; - wire main_a7ddrphy_dq_t15; - wire [7:0] main_a7ddrphy_dq_i_data15; - wire [7:0] main_a7ddrphy_bitslip15_i; - reg [7:0] main_a7ddrphy_bitslip15_o = 8'd0; - reg [2:0] main_a7ddrphy_bitslip15_value = 3'd0; - reg [15:0] main_a7ddrphy_bitslip15_r = 16'd0; - reg main_a7ddrphy_n_rddata_en0 = 1'd0; - reg main_a7ddrphy_n_rddata_en1 = 1'd0; - reg main_a7ddrphy_n_rddata_en2 = 1'd0; - reg main_a7ddrphy_n_rddata_en3 = 1'd0; - reg main_a7ddrphy_n_rddata_en4 = 1'd0; - reg main_a7ddrphy_n_rddata_en5 = 1'd0; - reg main_a7ddrphy_n_rddata_en6 = 1'd0; - reg main_a7ddrphy_n_rddata_en7 = 1'd0; - wire main_a7ddrphy_oe; - reg [3:0] main_a7ddrphy_last_wrdata_en = 4'd0; - wire [13:0] main_sdram_inti_p0_address; - wire [2:0] main_sdram_inti_p0_bank; - reg main_sdram_inti_p0_cas_n = 1'd1; - reg main_sdram_inti_p0_cs_n = 1'd1; - reg main_sdram_inti_p0_ras_n = 1'd1; - reg main_sdram_inti_p0_we_n = 1'd1; - wire main_sdram_inti_p0_cke; - wire main_sdram_inti_p0_odt; - wire main_sdram_inti_p0_reset_n; - reg main_sdram_inti_p0_act_n = 1'd1; - wire [31:0] main_sdram_inti_p0_wrdata; - wire main_sdram_inti_p0_wrdata_en; - wire [3:0] main_sdram_inti_p0_wrdata_mask; - wire main_sdram_inti_p0_rddata_en; - reg [31:0] main_sdram_inti_p0_rddata = 32'd0; - reg main_sdram_inti_p0_rddata_valid = 1'd0; - wire [13:0] main_sdram_inti_p1_address; - wire [2:0] main_sdram_inti_p1_bank; - reg main_sdram_inti_p1_cas_n = 1'd1; - reg main_sdram_inti_p1_cs_n = 1'd1; - reg main_sdram_inti_p1_ras_n = 1'd1; - reg main_sdram_inti_p1_we_n = 1'd1; - wire main_sdram_inti_p1_cke; - wire main_sdram_inti_p1_odt; - wire main_sdram_inti_p1_reset_n; - reg main_sdram_inti_p1_act_n = 1'd1; - wire [31:0] main_sdram_inti_p1_wrdata; - wire main_sdram_inti_p1_wrdata_en; - wire [3:0] main_sdram_inti_p1_wrdata_mask; - wire main_sdram_inti_p1_rddata_en; - reg [31:0] main_sdram_inti_p1_rddata = 32'd0; - reg main_sdram_inti_p1_rddata_valid = 1'd0; - wire [13:0] main_sdram_inti_p2_address; - wire [2:0] main_sdram_inti_p2_bank; - reg main_sdram_inti_p2_cas_n = 1'd1; - reg main_sdram_inti_p2_cs_n = 1'd1; - reg main_sdram_inti_p2_ras_n = 1'd1; - reg main_sdram_inti_p2_we_n = 1'd1; - wire main_sdram_inti_p2_cke; - wire main_sdram_inti_p2_odt; - wire main_sdram_inti_p2_reset_n; - reg main_sdram_inti_p2_act_n = 1'd1; - wire [31:0] main_sdram_inti_p2_wrdata; - wire main_sdram_inti_p2_wrdata_en; - wire [3:0] main_sdram_inti_p2_wrdata_mask; - wire main_sdram_inti_p2_rddata_en; - reg [31:0] main_sdram_inti_p2_rddata = 32'd0; - reg main_sdram_inti_p2_rddata_valid = 1'd0; - wire [13:0] main_sdram_inti_p3_address; - wire [2:0] main_sdram_inti_p3_bank; - reg main_sdram_inti_p3_cas_n = 1'd1; - reg main_sdram_inti_p3_cs_n = 1'd1; - reg main_sdram_inti_p3_ras_n = 1'd1; - reg main_sdram_inti_p3_we_n = 1'd1; - wire main_sdram_inti_p3_cke; - wire main_sdram_inti_p3_odt; - wire main_sdram_inti_p3_reset_n; - reg main_sdram_inti_p3_act_n = 1'd1; - wire [31:0] main_sdram_inti_p3_wrdata; - wire main_sdram_inti_p3_wrdata_en; - wire [3:0] main_sdram_inti_p3_wrdata_mask; - wire main_sdram_inti_p3_rddata_en; - reg [31:0] main_sdram_inti_p3_rddata = 32'd0; - reg main_sdram_inti_p3_rddata_valid = 1'd0; - wire [13:0] main_sdram_slave_p0_address; - wire [2:0] main_sdram_slave_p0_bank; - wire main_sdram_slave_p0_cas_n; - wire main_sdram_slave_p0_cs_n; - wire main_sdram_slave_p0_ras_n; - wire main_sdram_slave_p0_we_n; - wire main_sdram_slave_p0_cke; - wire main_sdram_slave_p0_odt; - wire main_sdram_slave_p0_reset_n; - wire main_sdram_slave_p0_act_n; - wire [31:0] main_sdram_slave_p0_wrdata; - wire main_sdram_slave_p0_wrdata_en; - wire [3:0] main_sdram_slave_p0_wrdata_mask; - wire main_sdram_slave_p0_rddata_en; - reg [31:0] main_sdram_slave_p0_rddata = 32'd0; - reg main_sdram_slave_p0_rddata_valid = 1'd0; - wire [13:0] main_sdram_slave_p1_address; - wire [2:0] main_sdram_slave_p1_bank; - wire main_sdram_slave_p1_cas_n; - wire main_sdram_slave_p1_cs_n; - wire main_sdram_slave_p1_ras_n; - wire main_sdram_slave_p1_we_n; - wire main_sdram_slave_p1_cke; - wire main_sdram_slave_p1_odt; - wire main_sdram_slave_p1_reset_n; - wire main_sdram_slave_p1_act_n; - wire [31:0] main_sdram_slave_p1_wrdata; - wire main_sdram_slave_p1_wrdata_en; - wire [3:0] main_sdram_slave_p1_wrdata_mask; - wire main_sdram_slave_p1_rddata_en; - reg [31:0] main_sdram_slave_p1_rddata = 32'd0; - reg main_sdram_slave_p1_rddata_valid = 1'd0; - wire [13:0] main_sdram_slave_p2_address; - wire [2:0] main_sdram_slave_p2_bank; - wire main_sdram_slave_p2_cas_n; - wire main_sdram_slave_p2_cs_n; - wire main_sdram_slave_p2_ras_n; - wire main_sdram_slave_p2_we_n; - wire main_sdram_slave_p2_cke; - wire main_sdram_slave_p2_odt; - wire main_sdram_slave_p2_reset_n; - wire main_sdram_slave_p2_act_n; - wire [31:0] main_sdram_slave_p2_wrdata; - wire main_sdram_slave_p2_wrdata_en; - wire [3:0] main_sdram_slave_p2_wrdata_mask; - wire main_sdram_slave_p2_rddata_en; - reg [31:0] main_sdram_slave_p2_rddata = 32'd0; - reg main_sdram_slave_p2_rddata_valid = 1'd0; - wire [13:0] main_sdram_slave_p3_address; - wire [2:0] main_sdram_slave_p3_bank; - wire main_sdram_slave_p3_cas_n; - wire main_sdram_slave_p3_cs_n; - wire main_sdram_slave_p3_ras_n; - wire main_sdram_slave_p3_we_n; - wire main_sdram_slave_p3_cke; - wire main_sdram_slave_p3_odt; - wire main_sdram_slave_p3_reset_n; - wire main_sdram_slave_p3_act_n; - wire [31:0] main_sdram_slave_p3_wrdata; - wire main_sdram_slave_p3_wrdata_en; - wire [3:0] main_sdram_slave_p3_wrdata_mask; - wire main_sdram_slave_p3_rddata_en; - reg [31:0] main_sdram_slave_p3_rddata = 32'd0; - reg main_sdram_slave_p3_rddata_valid = 1'd0; - reg [13:0] main_sdram_master_p0_address = 14'd0; - reg [2:0] main_sdram_master_p0_bank = 3'd0; - reg main_sdram_master_p0_cas_n = 1'd1; - reg main_sdram_master_p0_cs_n = 1'd1; - reg main_sdram_master_p0_ras_n = 1'd1; - reg main_sdram_master_p0_we_n = 1'd1; - reg main_sdram_master_p0_cke = 1'd0; - reg main_sdram_master_p0_odt = 1'd0; - reg main_sdram_master_p0_reset_n = 1'd0; - reg main_sdram_master_p0_act_n = 1'd1; - reg [31:0] main_sdram_master_p0_wrdata = 32'd0; - reg main_sdram_master_p0_wrdata_en = 1'd0; - reg [3:0] main_sdram_master_p0_wrdata_mask = 4'd0; - reg main_sdram_master_p0_rddata_en = 1'd0; - wire [31:0] main_sdram_master_p0_rddata; - wire main_sdram_master_p0_rddata_valid; - reg [13:0] main_sdram_master_p1_address = 14'd0; - reg [2:0] main_sdram_master_p1_bank = 3'd0; - reg main_sdram_master_p1_cas_n = 1'd1; - reg main_sdram_master_p1_cs_n = 1'd1; - reg main_sdram_master_p1_ras_n = 1'd1; - reg main_sdram_master_p1_we_n = 1'd1; - reg main_sdram_master_p1_cke = 1'd0; - reg main_sdram_master_p1_odt = 1'd0; - reg main_sdram_master_p1_reset_n = 1'd0; - reg main_sdram_master_p1_act_n = 1'd1; - reg [31:0] main_sdram_master_p1_wrdata = 32'd0; - reg main_sdram_master_p1_wrdata_en = 1'd0; - reg [3:0] main_sdram_master_p1_wrdata_mask = 4'd0; - reg main_sdram_master_p1_rddata_en = 1'd0; - wire [31:0] main_sdram_master_p1_rddata; - wire main_sdram_master_p1_rddata_valid; - reg [13:0] main_sdram_master_p2_address = 14'd0; - reg [2:0] main_sdram_master_p2_bank = 3'd0; - reg main_sdram_master_p2_cas_n = 1'd1; - reg main_sdram_master_p2_cs_n = 1'd1; - reg main_sdram_master_p2_ras_n = 1'd1; - reg main_sdram_master_p2_we_n = 1'd1; - reg main_sdram_master_p2_cke = 1'd0; - reg main_sdram_master_p2_odt = 1'd0; - reg main_sdram_master_p2_reset_n = 1'd0; - reg main_sdram_master_p2_act_n = 1'd1; - reg [31:0] main_sdram_master_p2_wrdata = 32'd0; - reg main_sdram_master_p2_wrdata_en = 1'd0; - reg [3:0] main_sdram_master_p2_wrdata_mask = 4'd0; - reg main_sdram_master_p2_rddata_en = 1'd0; - wire [31:0] main_sdram_master_p2_rddata; - wire main_sdram_master_p2_rddata_valid; - reg [13:0] main_sdram_master_p3_address = 14'd0; - reg [2:0] main_sdram_master_p3_bank = 3'd0; - reg main_sdram_master_p3_cas_n = 1'd1; - reg main_sdram_master_p3_cs_n = 1'd1; - reg main_sdram_master_p3_ras_n = 1'd1; - reg main_sdram_master_p3_we_n = 1'd1; - reg main_sdram_master_p3_cke = 1'd0; - reg main_sdram_master_p3_odt = 1'd0; - reg main_sdram_master_p3_reset_n = 1'd0; - reg main_sdram_master_p3_act_n = 1'd1; - reg [31:0] main_sdram_master_p3_wrdata = 32'd0; - reg main_sdram_master_p3_wrdata_en = 1'd0; - reg [3:0] main_sdram_master_p3_wrdata_mask = 4'd0; - reg main_sdram_master_p3_rddata_en = 1'd0; - wire [31:0] main_sdram_master_p3_rddata; - wire main_sdram_master_p3_rddata_valid; - reg [3:0] main_sdram_storage = 4'd0; - reg main_sdram_re = 1'd0; - reg [5:0] main_sdram_phaseinjector0_command_storage = 6'd0; - reg main_sdram_phaseinjector0_command_re = 1'd0; - wire main_sdram_phaseinjector0_command_issue_re; - wire main_sdram_phaseinjector0_command_issue_r; - wire main_sdram_phaseinjector0_command_issue_we; - reg main_sdram_phaseinjector0_command_issue_w = 1'd0; - reg [13:0] main_sdram_phaseinjector0_address_storage = 14'd0; - reg main_sdram_phaseinjector0_address_re = 1'd0; - reg [2:0] main_sdram_phaseinjector0_baddress_storage = 3'd0; - reg main_sdram_phaseinjector0_baddress_re = 1'd0; - reg [31:0] main_sdram_phaseinjector0_wrdata_storage = 32'd0; - reg main_sdram_phaseinjector0_wrdata_re = 1'd0; - reg [31:0] main_sdram_phaseinjector0_status = 32'd0; - wire main_sdram_phaseinjector0_we; - reg [5:0] main_sdram_phaseinjector1_command_storage = 6'd0; - reg main_sdram_phaseinjector1_command_re = 1'd0; - wire main_sdram_phaseinjector1_command_issue_re; - wire main_sdram_phaseinjector1_command_issue_r; - wire main_sdram_phaseinjector1_command_issue_we; - reg main_sdram_phaseinjector1_command_issue_w = 1'd0; - reg [13:0] main_sdram_phaseinjector1_address_storage = 14'd0; - reg main_sdram_phaseinjector1_address_re = 1'd0; - reg [2:0] main_sdram_phaseinjector1_baddress_storage = 3'd0; - reg main_sdram_phaseinjector1_baddress_re = 1'd0; - reg [31:0] main_sdram_phaseinjector1_wrdata_storage = 32'd0; - reg main_sdram_phaseinjector1_wrdata_re = 1'd0; - reg [31:0] main_sdram_phaseinjector1_status = 32'd0; - wire main_sdram_phaseinjector1_we; - reg [5:0] main_sdram_phaseinjector2_command_storage = 6'd0; - reg main_sdram_phaseinjector2_command_re = 1'd0; - wire main_sdram_phaseinjector2_command_issue_re; - wire main_sdram_phaseinjector2_command_issue_r; - wire main_sdram_phaseinjector2_command_issue_we; - reg main_sdram_phaseinjector2_command_issue_w = 1'd0; - reg [13:0] main_sdram_phaseinjector2_address_storage = 14'd0; - reg main_sdram_phaseinjector2_address_re = 1'd0; - reg [2:0] main_sdram_phaseinjector2_baddress_storage = 3'd0; - reg main_sdram_phaseinjector2_baddress_re = 1'd0; - reg [31:0] main_sdram_phaseinjector2_wrdata_storage = 32'd0; - reg main_sdram_phaseinjector2_wrdata_re = 1'd0; - reg [31:0] main_sdram_phaseinjector2_status = 32'd0; - wire main_sdram_phaseinjector2_we; - reg [5:0] main_sdram_phaseinjector3_command_storage = 6'd0; - reg main_sdram_phaseinjector3_command_re = 1'd0; - wire main_sdram_phaseinjector3_command_issue_re; - wire main_sdram_phaseinjector3_command_issue_r; - wire main_sdram_phaseinjector3_command_issue_we; - reg main_sdram_phaseinjector3_command_issue_w = 1'd0; - reg [13:0] main_sdram_phaseinjector3_address_storage = 14'd0; - reg main_sdram_phaseinjector3_address_re = 1'd0; - reg [2:0] main_sdram_phaseinjector3_baddress_storage = 3'd0; - reg main_sdram_phaseinjector3_baddress_re = 1'd0; - reg [31:0] main_sdram_phaseinjector3_wrdata_storage = 32'd0; - reg main_sdram_phaseinjector3_wrdata_re = 1'd0; - reg [31:0] main_sdram_phaseinjector3_status = 32'd0; - wire main_sdram_phaseinjector3_we; - wire main_sdram_interface_bank0_valid; - wire main_sdram_interface_bank0_ready; - wire main_sdram_interface_bank0_we; - wire [20:0] main_sdram_interface_bank0_addr; - wire main_sdram_interface_bank0_lock; - wire main_sdram_interface_bank0_wdata_ready; - wire main_sdram_interface_bank0_rdata_valid; - wire main_sdram_interface_bank1_valid; - wire main_sdram_interface_bank1_ready; - wire main_sdram_interface_bank1_we; - wire [20:0] main_sdram_interface_bank1_addr; - wire main_sdram_interface_bank1_lock; - wire main_sdram_interface_bank1_wdata_ready; - wire main_sdram_interface_bank1_rdata_valid; - wire main_sdram_interface_bank2_valid; - wire main_sdram_interface_bank2_ready; - wire main_sdram_interface_bank2_we; - wire [20:0] main_sdram_interface_bank2_addr; - wire main_sdram_interface_bank2_lock; - wire main_sdram_interface_bank2_wdata_ready; - wire main_sdram_interface_bank2_rdata_valid; - wire main_sdram_interface_bank3_valid; - wire main_sdram_interface_bank3_ready; - wire main_sdram_interface_bank3_we; - wire [20:0] main_sdram_interface_bank3_addr; - wire main_sdram_interface_bank3_lock; - wire main_sdram_interface_bank3_wdata_ready; - wire main_sdram_interface_bank3_rdata_valid; - wire main_sdram_interface_bank4_valid; - wire main_sdram_interface_bank4_ready; - wire main_sdram_interface_bank4_we; - wire [20:0] main_sdram_interface_bank4_addr; - wire main_sdram_interface_bank4_lock; - wire main_sdram_interface_bank4_wdata_ready; - wire main_sdram_interface_bank4_rdata_valid; - wire main_sdram_interface_bank5_valid; - wire main_sdram_interface_bank5_ready; - wire main_sdram_interface_bank5_we; - wire [20:0] main_sdram_interface_bank5_addr; - wire main_sdram_interface_bank5_lock; - wire main_sdram_interface_bank5_wdata_ready; - wire main_sdram_interface_bank5_rdata_valid; - wire main_sdram_interface_bank6_valid; - wire main_sdram_interface_bank6_ready; - wire main_sdram_interface_bank6_we; - wire [20:0] main_sdram_interface_bank6_addr; - wire main_sdram_interface_bank6_lock; - wire main_sdram_interface_bank6_wdata_ready; - wire main_sdram_interface_bank6_rdata_valid; - wire main_sdram_interface_bank7_valid; - wire main_sdram_interface_bank7_ready; - wire main_sdram_interface_bank7_we; - wire [20:0] main_sdram_interface_bank7_addr; - wire main_sdram_interface_bank7_lock; - wire main_sdram_interface_bank7_wdata_ready; - wire main_sdram_interface_bank7_rdata_valid; - reg [127:0] main_sdram_interface_wdata = 128'd0; - reg [15:0] main_sdram_interface_wdata_we = 16'd0; - wire [127:0] main_sdram_interface_rdata; - reg [13:0] main_sdram_dfi_p0_address = 14'd0; - reg [2:0] main_sdram_dfi_p0_bank = 3'd0; - reg main_sdram_dfi_p0_cas_n = 1'd1; - reg main_sdram_dfi_p0_cs_n = 1'd1; - reg main_sdram_dfi_p0_ras_n = 1'd1; - reg main_sdram_dfi_p0_we_n = 1'd1; - wire main_sdram_dfi_p0_cke; - wire main_sdram_dfi_p0_odt; - wire main_sdram_dfi_p0_reset_n; - reg main_sdram_dfi_p0_act_n = 1'd1; - wire [31:0] main_sdram_dfi_p0_wrdata; - reg main_sdram_dfi_p0_wrdata_en = 1'd0; - wire [3:0] main_sdram_dfi_p0_wrdata_mask; - reg main_sdram_dfi_p0_rddata_en = 1'd0; - wire [31:0] main_sdram_dfi_p0_rddata; - wire main_sdram_dfi_p0_rddata_valid; - reg [13:0] main_sdram_dfi_p1_address = 14'd0; - reg [2:0] main_sdram_dfi_p1_bank = 3'd0; - reg main_sdram_dfi_p1_cas_n = 1'd1; - reg main_sdram_dfi_p1_cs_n = 1'd1; - reg main_sdram_dfi_p1_ras_n = 1'd1; - reg main_sdram_dfi_p1_we_n = 1'd1; - wire main_sdram_dfi_p1_cke; - wire main_sdram_dfi_p1_odt; - wire main_sdram_dfi_p1_reset_n; - reg main_sdram_dfi_p1_act_n = 1'd1; - wire [31:0] main_sdram_dfi_p1_wrdata; - reg main_sdram_dfi_p1_wrdata_en = 1'd0; - wire [3:0] main_sdram_dfi_p1_wrdata_mask; - reg main_sdram_dfi_p1_rddata_en = 1'd0; - wire [31:0] main_sdram_dfi_p1_rddata; - wire main_sdram_dfi_p1_rddata_valid; - reg [13:0] main_sdram_dfi_p2_address = 14'd0; - reg [2:0] main_sdram_dfi_p2_bank = 3'd0; - reg main_sdram_dfi_p2_cas_n = 1'd1; - reg main_sdram_dfi_p2_cs_n = 1'd1; - reg main_sdram_dfi_p2_ras_n = 1'd1; - reg main_sdram_dfi_p2_we_n = 1'd1; - wire main_sdram_dfi_p2_cke; - wire main_sdram_dfi_p2_odt; - wire main_sdram_dfi_p2_reset_n; - reg main_sdram_dfi_p2_act_n = 1'd1; - wire [31:0] main_sdram_dfi_p2_wrdata; - reg main_sdram_dfi_p2_wrdata_en = 1'd0; - wire [3:0] main_sdram_dfi_p2_wrdata_mask; - reg main_sdram_dfi_p2_rddata_en = 1'd0; - wire [31:0] main_sdram_dfi_p2_rddata; - wire main_sdram_dfi_p2_rddata_valid; - reg [13:0] main_sdram_dfi_p3_address = 14'd0; - reg [2:0] main_sdram_dfi_p3_bank = 3'd0; - reg main_sdram_dfi_p3_cas_n = 1'd1; - reg main_sdram_dfi_p3_cs_n = 1'd1; - reg main_sdram_dfi_p3_ras_n = 1'd1; - reg main_sdram_dfi_p3_we_n = 1'd1; - wire main_sdram_dfi_p3_cke; - wire main_sdram_dfi_p3_odt; - wire main_sdram_dfi_p3_reset_n; - reg main_sdram_dfi_p3_act_n = 1'd1; - wire [31:0] main_sdram_dfi_p3_wrdata; - reg main_sdram_dfi_p3_wrdata_en = 1'd0; - wire [3:0] main_sdram_dfi_p3_wrdata_mask; - reg main_sdram_dfi_p3_rddata_en = 1'd0; - wire [31:0] main_sdram_dfi_p3_rddata; - wire main_sdram_dfi_p3_rddata_valid; - reg main_sdram_cmd_valid = 1'd0; - reg main_sdram_cmd_ready = 1'd0; - reg main_sdram_cmd_last = 1'd0; - reg [13:0] main_sdram_cmd_payload_a = 14'd0; - reg [2:0] main_sdram_cmd_payload_ba = 3'd0; - reg main_sdram_cmd_payload_cas = 1'd0; - reg main_sdram_cmd_payload_ras = 1'd0; - reg main_sdram_cmd_payload_we = 1'd0; - reg main_sdram_cmd_payload_is_read = 1'd0; - reg main_sdram_cmd_payload_is_write = 1'd0; - wire main_sdram_wants_refresh; - wire main_sdram_wants_zqcs; - wire main_sdram_timer_wait; - wire main_sdram_timer_done0; - wire [8:0] main_sdram_timer_count0; - wire main_sdram_timer_done1; - reg [8:0] main_sdram_timer_count1 = 9'd468; - wire main_sdram_postponer_req_i; - reg main_sdram_postponer_req_o = 1'd0; - reg main_sdram_postponer_count = 1'd0; - reg main_sdram_sequencer_start0 = 1'd0; - wire main_sdram_sequencer_done0; - wire main_sdram_sequencer_start1; - reg main_sdram_sequencer_done1 = 1'd0; - reg [5:0] main_sdram_sequencer_counter = 6'd0; - reg main_sdram_sequencer_count = 1'd0; - wire main_sdram_zqcs_timer_wait; - wire main_sdram_zqcs_timer_done0; - wire [25:0] main_sdram_zqcs_timer_count0; - wire main_sdram_zqcs_timer_done1; - reg [25:0] main_sdram_zqcs_timer_count1 = 26'd59999999; - reg main_sdram_zqcs_executer_start = 1'd0; - reg main_sdram_zqcs_executer_done = 1'd0; - reg [4:0] main_sdram_zqcs_executer_counter = 5'd0; - wire main_sdram_bankmachine0_req_valid; - wire main_sdram_bankmachine0_req_ready; - wire main_sdram_bankmachine0_req_we; - wire [20:0] main_sdram_bankmachine0_req_addr; - wire main_sdram_bankmachine0_req_lock; - reg main_sdram_bankmachine0_req_wdata_ready = 1'd0; - reg main_sdram_bankmachine0_req_rdata_valid = 1'd0; - wire main_sdram_bankmachine0_refresh_req; - reg main_sdram_bankmachine0_refresh_gnt = 1'd0; - reg main_sdram_bankmachine0_cmd_valid = 1'd0; - reg main_sdram_bankmachine0_cmd_ready = 1'd0; - reg [13:0] main_sdram_bankmachine0_cmd_payload_a = 14'd0; - wire [2:0] main_sdram_bankmachine0_cmd_payload_ba; - reg main_sdram_bankmachine0_cmd_payload_cas = 1'd0; - reg main_sdram_bankmachine0_cmd_payload_ras = 1'd0; - reg main_sdram_bankmachine0_cmd_payload_we = 1'd0; - reg main_sdram_bankmachine0_cmd_payload_is_cmd = 1'd0; - reg main_sdram_bankmachine0_cmd_payload_is_read = 1'd0; - reg main_sdram_bankmachine0_cmd_payload_is_write = 1'd0; - reg main_sdram_bankmachine0_auto_precharge = 1'd0; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; - reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first = 1'd0; - reg main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last = 1'd0; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; - wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; - wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; - wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; - wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; - reg [3:0] main_sdram_bankmachine0_cmd_buffer_lookahead_level = 4'd0; - reg main_sdram_bankmachine0_cmd_buffer_lookahead_replace = 1'd0; - reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_produce = 3'd0; - reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_consume = 3'd0; - reg [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr = 3'd0; - wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we; - wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_do_read; - wire [2:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr; - wire [23:0] main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we; - wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; - wire [20:0] main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; - wire main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; - wire main_sdram_bankmachine0_cmd_buffer_sink_valid; - wire main_sdram_bankmachine0_cmd_buffer_sink_ready; - wire main_sdram_bankmachine0_cmd_buffer_sink_first; - wire main_sdram_bankmachine0_cmd_buffer_sink_last; - wire main_sdram_bankmachine0_cmd_buffer_sink_payload_we; - wire [20:0] main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; - reg main_sdram_bankmachine0_cmd_buffer_source_valid = 1'd0; - wire main_sdram_bankmachine0_cmd_buffer_source_ready; - reg main_sdram_bankmachine0_cmd_buffer_source_first = 1'd0; - reg main_sdram_bankmachine0_cmd_buffer_source_last = 1'd0; - reg main_sdram_bankmachine0_cmd_buffer_source_payload_we = 1'd0; - reg [20:0] main_sdram_bankmachine0_cmd_buffer_source_payload_addr = 21'd0; - reg [13:0] main_sdram_bankmachine0_row = 14'd0; - reg main_sdram_bankmachine0_row_opened = 1'd0; - wire main_sdram_bankmachine0_row_hit; - reg main_sdram_bankmachine0_row_open = 1'd0; - reg main_sdram_bankmachine0_row_close = 1'd0; - reg main_sdram_bankmachine0_row_col_n_addr_sel = 1'd0; - wire main_sdram_bankmachine0_twtpcon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine0_twtpcon_ready = 1'd1; - reg [2:0] main_sdram_bankmachine0_twtpcon_count = 3'd0; - wire main_sdram_bankmachine0_trccon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine0_trccon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine0_trccon_count = 2'd0; - wire main_sdram_bankmachine0_trascon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine0_trascon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine0_trascon_count = 2'd0; - wire main_sdram_bankmachine1_req_valid; - wire main_sdram_bankmachine1_req_ready; - wire main_sdram_bankmachine1_req_we; - wire [20:0] main_sdram_bankmachine1_req_addr; - wire main_sdram_bankmachine1_req_lock; - reg main_sdram_bankmachine1_req_wdata_ready = 1'd0; - reg main_sdram_bankmachine1_req_rdata_valid = 1'd0; - wire main_sdram_bankmachine1_refresh_req; - reg main_sdram_bankmachine1_refresh_gnt = 1'd0; - reg main_sdram_bankmachine1_cmd_valid = 1'd0; - reg main_sdram_bankmachine1_cmd_ready = 1'd0; - reg [13:0] main_sdram_bankmachine1_cmd_payload_a = 14'd0; - wire [2:0] main_sdram_bankmachine1_cmd_payload_ba; - reg main_sdram_bankmachine1_cmd_payload_cas = 1'd0; - reg main_sdram_bankmachine1_cmd_payload_ras = 1'd0; - reg main_sdram_bankmachine1_cmd_payload_we = 1'd0; - reg main_sdram_bankmachine1_cmd_payload_is_cmd = 1'd0; - reg main_sdram_bankmachine1_cmd_payload_is_read = 1'd0; - reg main_sdram_bankmachine1_cmd_payload_is_write = 1'd0; - reg main_sdram_bankmachine1_auto_precharge = 1'd0; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; - reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first = 1'd0; - reg main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last = 1'd0; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; - wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; - wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; - wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; - wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; - reg [3:0] main_sdram_bankmachine1_cmd_buffer_lookahead_level = 4'd0; - reg main_sdram_bankmachine1_cmd_buffer_lookahead_replace = 1'd0; - reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_produce = 3'd0; - reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_consume = 3'd0; - reg [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr = 3'd0; - wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we; - wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_do_read; - wire [2:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr; - wire [23:0] main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we; - wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; - wire [20:0] main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; - wire main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; - wire main_sdram_bankmachine1_cmd_buffer_sink_valid; - wire main_sdram_bankmachine1_cmd_buffer_sink_ready; - wire main_sdram_bankmachine1_cmd_buffer_sink_first; - wire main_sdram_bankmachine1_cmd_buffer_sink_last; - wire main_sdram_bankmachine1_cmd_buffer_sink_payload_we; - wire [20:0] main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; - reg main_sdram_bankmachine1_cmd_buffer_source_valid = 1'd0; - wire main_sdram_bankmachine1_cmd_buffer_source_ready; - reg main_sdram_bankmachine1_cmd_buffer_source_first = 1'd0; - reg main_sdram_bankmachine1_cmd_buffer_source_last = 1'd0; - reg main_sdram_bankmachine1_cmd_buffer_source_payload_we = 1'd0; - reg [20:0] main_sdram_bankmachine1_cmd_buffer_source_payload_addr = 21'd0; - reg [13:0] main_sdram_bankmachine1_row = 14'd0; - reg main_sdram_bankmachine1_row_opened = 1'd0; - wire main_sdram_bankmachine1_row_hit; - reg main_sdram_bankmachine1_row_open = 1'd0; - reg main_sdram_bankmachine1_row_close = 1'd0; - reg main_sdram_bankmachine1_row_col_n_addr_sel = 1'd0; - wire main_sdram_bankmachine1_twtpcon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine1_twtpcon_ready = 1'd1; - reg [2:0] main_sdram_bankmachine1_twtpcon_count = 3'd0; - wire main_sdram_bankmachine1_trccon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine1_trccon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine1_trccon_count = 2'd0; - wire main_sdram_bankmachine1_trascon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine1_trascon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine1_trascon_count = 2'd0; - wire main_sdram_bankmachine2_req_valid; - wire main_sdram_bankmachine2_req_ready; - wire main_sdram_bankmachine2_req_we; - wire [20:0] main_sdram_bankmachine2_req_addr; - wire main_sdram_bankmachine2_req_lock; - reg main_sdram_bankmachine2_req_wdata_ready = 1'd0; - reg main_sdram_bankmachine2_req_rdata_valid = 1'd0; - wire main_sdram_bankmachine2_refresh_req; - reg main_sdram_bankmachine2_refresh_gnt = 1'd0; - reg main_sdram_bankmachine2_cmd_valid = 1'd0; - reg main_sdram_bankmachine2_cmd_ready = 1'd0; - reg [13:0] main_sdram_bankmachine2_cmd_payload_a = 14'd0; - wire [2:0] main_sdram_bankmachine2_cmd_payload_ba; - reg main_sdram_bankmachine2_cmd_payload_cas = 1'd0; - reg main_sdram_bankmachine2_cmd_payload_ras = 1'd0; - reg main_sdram_bankmachine2_cmd_payload_we = 1'd0; - reg main_sdram_bankmachine2_cmd_payload_is_cmd = 1'd0; - reg main_sdram_bankmachine2_cmd_payload_is_read = 1'd0; - reg main_sdram_bankmachine2_cmd_payload_is_write = 1'd0; - reg main_sdram_bankmachine2_auto_precharge = 1'd0; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; - reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first = 1'd0; - reg main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last = 1'd0; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; - wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; - wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; - wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; - wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; - reg [3:0] main_sdram_bankmachine2_cmd_buffer_lookahead_level = 4'd0; - reg main_sdram_bankmachine2_cmd_buffer_lookahead_replace = 1'd0; - reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_produce = 3'd0; - reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_consume = 3'd0; - reg [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr = 3'd0; - wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we; - wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_do_read; - wire [2:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr; - wire [23:0] main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we; - wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; - wire [20:0] main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; - wire main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; - wire main_sdram_bankmachine2_cmd_buffer_sink_valid; - wire main_sdram_bankmachine2_cmd_buffer_sink_ready; - wire main_sdram_bankmachine2_cmd_buffer_sink_first; - wire main_sdram_bankmachine2_cmd_buffer_sink_last; - wire main_sdram_bankmachine2_cmd_buffer_sink_payload_we; - wire [20:0] main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; - reg main_sdram_bankmachine2_cmd_buffer_source_valid = 1'd0; - wire main_sdram_bankmachine2_cmd_buffer_source_ready; - reg main_sdram_bankmachine2_cmd_buffer_source_first = 1'd0; - reg main_sdram_bankmachine2_cmd_buffer_source_last = 1'd0; - reg main_sdram_bankmachine2_cmd_buffer_source_payload_we = 1'd0; - reg [20:0] main_sdram_bankmachine2_cmd_buffer_source_payload_addr = 21'd0; - reg [13:0] main_sdram_bankmachine2_row = 14'd0; - reg main_sdram_bankmachine2_row_opened = 1'd0; - wire main_sdram_bankmachine2_row_hit; - reg main_sdram_bankmachine2_row_open = 1'd0; - reg main_sdram_bankmachine2_row_close = 1'd0; - reg main_sdram_bankmachine2_row_col_n_addr_sel = 1'd0; - wire main_sdram_bankmachine2_twtpcon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine2_twtpcon_ready = 1'd1; - reg [2:0] main_sdram_bankmachine2_twtpcon_count = 3'd0; - wire main_sdram_bankmachine2_trccon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine2_trccon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine2_trccon_count = 2'd0; - wire main_sdram_bankmachine2_trascon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine2_trascon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine2_trascon_count = 2'd0; - wire main_sdram_bankmachine3_req_valid; - wire main_sdram_bankmachine3_req_ready; - wire main_sdram_bankmachine3_req_we; - wire [20:0] main_sdram_bankmachine3_req_addr; - wire main_sdram_bankmachine3_req_lock; - reg main_sdram_bankmachine3_req_wdata_ready = 1'd0; - reg main_sdram_bankmachine3_req_rdata_valid = 1'd0; - wire main_sdram_bankmachine3_refresh_req; - reg main_sdram_bankmachine3_refresh_gnt = 1'd0; - reg main_sdram_bankmachine3_cmd_valid = 1'd0; - reg main_sdram_bankmachine3_cmd_ready = 1'd0; - reg [13:0] main_sdram_bankmachine3_cmd_payload_a = 14'd0; - wire [2:0] main_sdram_bankmachine3_cmd_payload_ba; - reg main_sdram_bankmachine3_cmd_payload_cas = 1'd0; - reg main_sdram_bankmachine3_cmd_payload_ras = 1'd0; - reg main_sdram_bankmachine3_cmd_payload_we = 1'd0; - reg main_sdram_bankmachine3_cmd_payload_is_cmd = 1'd0; - reg main_sdram_bankmachine3_cmd_payload_is_read = 1'd0; - reg main_sdram_bankmachine3_cmd_payload_is_write = 1'd0; - reg main_sdram_bankmachine3_auto_precharge = 1'd0; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; - reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first = 1'd0; - reg main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last = 1'd0; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; - wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; - wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; - wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; - wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; - reg [3:0] main_sdram_bankmachine3_cmd_buffer_lookahead_level = 4'd0; - reg main_sdram_bankmachine3_cmd_buffer_lookahead_replace = 1'd0; - reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_produce = 3'd0; - reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_consume = 3'd0; - reg [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr = 3'd0; - wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we; - wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_do_read; - wire [2:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr; - wire [23:0] main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we; - wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; - wire [20:0] main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; - wire main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; - wire main_sdram_bankmachine3_cmd_buffer_sink_valid; - wire main_sdram_bankmachine3_cmd_buffer_sink_ready; - wire main_sdram_bankmachine3_cmd_buffer_sink_first; - wire main_sdram_bankmachine3_cmd_buffer_sink_last; - wire main_sdram_bankmachine3_cmd_buffer_sink_payload_we; - wire [20:0] main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; - reg main_sdram_bankmachine3_cmd_buffer_source_valid = 1'd0; - wire main_sdram_bankmachine3_cmd_buffer_source_ready; - reg main_sdram_bankmachine3_cmd_buffer_source_first = 1'd0; - reg main_sdram_bankmachine3_cmd_buffer_source_last = 1'd0; - reg main_sdram_bankmachine3_cmd_buffer_source_payload_we = 1'd0; - reg [20:0] main_sdram_bankmachine3_cmd_buffer_source_payload_addr = 21'd0; - reg [13:0] main_sdram_bankmachine3_row = 14'd0; - reg main_sdram_bankmachine3_row_opened = 1'd0; - wire main_sdram_bankmachine3_row_hit; - reg main_sdram_bankmachine3_row_open = 1'd0; - reg main_sdram_bankmachine3_row_close = 1'd0; - reg main_sdram_bankmachine3_row_col_n_addr_sel = 1'd0; - wire main_sdram_bankmachine3_twtpcon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine3_twtpcon_ready = 1'd1; - reg [2:0] main_sdram_bankmachine3_twtpcon_count = 3'd0; - wire main_sdram_bankmachine3_trccon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine3_trccon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine3_trccon_count = 2'd0; - wire main_sdram_bankmachine3_trascon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine3_trascon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine3_trascon_count = 2'd0; - wire main_sdram_bankmachine4_req_valid; - wire main_sdram_bankmachine4_req_ready; - wire main_sdram_bankmachine4_req_we; - wire [20:0] main_sdram_bankmachine4_req_addr; - wire main_sdram_bankmachine4_req_lock; - reg main_sdram_bankmachine4_req_wdata_ready = 1'd0; - reg main_sdram_bankmachine4_req_rdata_valid = 1'd0; - wire main_sdram_bankmachine4_refresh_req; - reg main_sdram_bankmachine4_refresh_gnt = 1'd0; - reg main_sdram_bankmachine4_cmd_valid = 1'd0; - reg main_sdram_bankmachine4_cmd_ready = 1'd0; - reg [13:0] main_sdram_bankmachine4_cmd_payload_a = 14'd0; - wire [2:0] main_sdram_bankmachine4_cmd_payload_ba; - reg main_sdram_bankmachine4_cmd_payload_cas = 1'd0; - reg main_sdram_bankmachine4_cmd_payload_ras = 1'd0; - reg main_sdram_bankmachine4_cmd_payload_we = 1'd0; - reg main_sdram_bankmachine4_cmd_payload_is_cmd = 1'd0; - reg main_sdram_bankmachine4_cmd_payload_is_read = 1'd0; - reg main_sdram_bankmachine4_cmd_payload_is_write = 1'd0; - reg main_sdram_bankmachine4_auto_precharge = 1'd0; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; - reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first = 1'd0; - reg main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last = 1'd0; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; - wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; - wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; - wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; - wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; - reg [3:0] main_sdram_bankmachine4_cmd_buffer_lookahead_level = 4'd0; - reg main_sdram_bankmachine4_cmd_buffer_lookahead_replace = 1'd0; - reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_produce = 3'd0; - reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_consume = 3'd0; - reg [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr = 3'd0; - wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we; - wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_do_read; - wire [2:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr; - wire [23:0] main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we; - wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; - wire [20:0] main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; - wire main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; - wire main_sdram_bankmachine4_cmd_buffer_sink_valid; - wire main_sdram_bankmachine4_cmd_buffer_sink_ready; - wire main_sdram_bankmachine4_cmd_buffer_sink_first; - wire main_sdram_bankmachine4_cmd_buffer_sink_last; - wire main_sdram_bankmachine4_cmd_buffer_sink_payload_we; - wire [20:0] main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; - reg main_sdram_bankmachine4_cmd_buffer_source_valid = 1'd0; - wire main_sdram_bankmachine4_cmd_buffer_source_ready; - reg main_sdram_bankmachine4_cmd_buffer_source_first = 1'd0; - reg main_sdram_bankmachine4_cmd_buffer_source_last = 1'd0; - reg main_sdram_bankmachine4_cmd_buffer_source_payload_we = 1'd0; - reg [20:0] main_sdram_bankmachine4_cmd_buffer_source_payload_addr = 21'd0; - reg [13:0] main_sdram_bankmachine4_row = 14'd0; - reg main_sdram_bankmachine4_row_opened = 1'd0; - wire main_sdram_bankmachine4_row_hit; - reg main_sdram_bankmachine4_row_open = 1'd0; - reg main_sdram_bankmachine4_row_close = 1'd0; - reg main_sdram_bankmachine4_row_col_n_addr_sel = 1'd0; - wire main_sdram_bankmachine4_twtpcon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine4_twtpcon_ready = 1'd1; - reg [2:0] main_sdram_bankmachine4_twtpcon_count = 3'd0; - wire main_sdram_bankmachine4_trccon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine4_trccon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine4_trccon_count = 2'd0; - wire main_sdram_bankmachine4_trascon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine4_trascon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine4_trascon_count = 2'd0; - wire main_sdram_bankmachine5_req_valid; - wire main_sdram_bankmachine5_req_ready; - wire main_sdram_bankmachine5_req_we; - wire [20:0] main_sdram_bankmachine5_req_addr; - wire main_sdram_bankmachine5_req_lock; - reg main_sdram_bankmachine5_req_wdata_ready = 1'd0; - reg main_sdram_bankmachine5_req_rdata_valid = 1'd0; - wire main_sdram_bankmachine5_refresh_req; - reg main_sdram_bankmachine5_refresh_gnt = 1'd0; - reg main_sdram_bankmachine5_cmd_valid = 1'd0; - reg main_sdram_bankmachine5_cmd_ready = 1'd0; - reg [13:0] main_sdram_bankmachine5_cmd_payload_a = 14'd0; - wire [2:0] main_sdram_bankmachine5_cmd_payload_ba; - reg main_sdram_bankmachine5_cmd_payload_cas = 1'd0; - reg main_sdram_bankmachine5_cmd_payload_ras = 1'd0; - reg main_sdram_bankmachine5_cmd_payload_we = 1'd0; - reg main_sdram_bankmachine5_cmd_payload_is_cmd = 1'd0; - reg main_sdram_bankmachine5_cmd_payload_is_read = 1'd0; - reg main_sdram_bankmachine5_cmd_payload_is_write = 1'd0; - reg main_sdram_bankmachine5_auto_precharge = 1'd0; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; - reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first = 1'd0; - reg main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last = 1'd0; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; - wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; - wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; - wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; - wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; - reg [3:0] main_sdram_bankmachine5_cmd_buffer_lookahead_level = 4'd0; - reg main_sdram_bankmachine5_cmd_buffer_lookahead_replace = 1'd0; - reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_produce = 3'd0; - reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_consume = 3'd0; - reg [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr = 3'd0; - wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we; - wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_do_read; - wire [2:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr; - wire [23:0] main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we; - wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; - wire [20:0] main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; - wire main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; - wire main_sdram_bankmachine5_cmd_buffer_sink_valid; - wire main_sdram_bankmachine5_cmd_buffer_sink_ready; - wire main_sdram_bankmachine5_cmd_buffer_sink_first; - wire main_sdram_bankmachine5_cmd_buffer_sink_last; - wire main_sdram_bankmachine5_cmd_buffer_sink_payload_we; - wire [20:0] main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; - reg main_sdram_bankmachine5_cmd_buffer_source_valid = 1'd0; - wire main_sdram_bankmachine5_cmd_buffer_source_ready; - reg main_sdram_bankmachine5_cmd_buffer_source_first = 1'd0; - reg main_sdram_bankmachine5_cmd_buffer_source_last = 1'd0; - reg main_sdram_bankmachine5_cmd_buffer_source_payload_we = 1'd0; - reg [20:0] main_sdram_bankmachine5_cmd_buffer_source_payload_addr = 21'd0; - reg [13:0] main_sdram_bankmachine5_row = 14'd0; - reg main_sdram_bankmachine5_row_opened = 1'd0; - wire main_sdram_bankmachine5_row_hit; - reg main_sdram_bankmachine5_row_open = 1'd0; - reg main_sdram_bankmachine5_row_close = 1'd0; - reg main_sdram_bankmachine5_row_col_n_addr_sel = 1'd0; - wire main_sdram_bankmachine5_twtpcon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine5_twtpcon_ready = 1'd1; - reg [2:0] main_sdram_bankmachine5_twtpcon_count = 3'd0; - wire main_sdram_bankmachine5_trccon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine5_trccon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine5_trccon_count = 2'd0; - wire main_sdram_bankmachine5_trascon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine5_trascon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine5_trascon_count = 2'd0; - wire main_sdram_bankmachine6_req_valid; - wire main_sdram_bankmachine6_req_ready; - wire main_sdram_bankmachine6_req_we; - wire [20:0] main_sdram_bankmachine6_req_addr; - wire main_sdram_bankmachine6_req_lock; - reg main_sdram_bankmachine6_req_wdata_ready = 1'd0; - reg main_sdram_bankmachine6_req_rdata_valid = 1'd0; - wire main_sdram_bankmachine6_refresh_req; - reg main_sdram_bankmachine6_refresh_gnt = 1'd0; - reg main_sdram_bankmachine6_cmd_valid = 1'd0; - reg main_sdram_bankmachine6_cmd_ready = 1'd0; - reg [13:0] main_sdram_bankmachine6_cmd_payload_a = 14'd0; - wire [2:0] main_sdram_bankmachine6_cmd_payload_ba; - reg main_sdram_bankmachine6_cmd_payload_cas = 1'd0; - reg main_sdram_bankmachine6_cmd_payload_ras = 1'd0; - reg main_sdram_bankmachine6_cmd_payload_we = 1'd0; - reg main_sdram_bankmachine6_cmd_payload_is_cmd = 1'd0; - reg main_sdram_bankmachine6_cmd_payload_is_read = 1'd0; - reg main_sdram_bankmachine6_cmd_payload_is_write = 1'd0; - reg main_sdram_bankmachine6_auto_precharge = 1'd0; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; - reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first = 1'd0; - reg main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last = 1'd0; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; - wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; - wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; - wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; - wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; - reg [3:0] main_sdram_bankmachine6_cmd_buffer_lookahead_level = 4'd0; - reg main_sdram_bankmachine6_cmd_buffer_lookahead_replace = 1'd0; - reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_produce = 3'd0; - reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_consume = 3'd0; - reg [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr = 3'd0; - wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we; - wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_do_read; - wire [2:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr; - wire [23:0] main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we; - wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; - wire [20:0] main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; - wire main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; - wire main_sdram_bankmachine6_cmd_buffer_sink_valid; - wire main_sdram_bankmachine6_cmd_buffer_sink_ready; - wire main_sdram_bankmachine6_cmd_buffer_sink_first; - wire main_sdram_bankmachine6_cmd_buffer_sink_last; - wire main_sdram_bankmachine6_cmd_buffer_sink_payload_we; - wire [20:0] main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; - reg main_sdram_bankmachine6_cmd_buffer_source_valid = 1'd0; - wire main_sdram_bankmachine6_cmd_buffer_source_ready; - reg main_sdram_bankmachine6_cmd_buffer_source_first = 1'd0; - reg main_sdram_bankmachine6_cmd_buffer_source_last = 1'd0; - reg main_sdram_bankmachine6_cmd_buffer_source_payload_we = 1'd0; - reg [20:0] main_sdram_bankmachine6_cmd_buffer_source_payload_addr = 21'd0; - reg [13:0] main_sdram_bankmachine6_row = 14'd0; - reg main_sdram_bankmachine6_row_opened = 1'd0; - wire main_sdram_bankmachine6_row_hit; - reg main_sdram_bankmachine6_row_open = 1'd0; - reg main_sdram_bankmachine6_row_close = 1'd0; - reg main_sdram_bankmachine6_row_col_n_addr_sel = 1'd0; - wire main_sdram_bankmachine6_twtpcon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine6_twtpcon_ready = 1'd1; - reg [2:0] main_sdram_bankmachine6_twtpcon_count = 3'd0; - wire main_sdram_bankmachine6_trccon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine6_trccon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine6_trccon_count = 2'd0; - wire main_sdram_bankmachine6_trascon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine6_trascon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine6_trascon_count = 2'd0; - wire main_sdram_bankmachine7_req_valid; - wire main_sdram_bankmachine7_req_ready; - wire main_sdram_bankmachine7_req_we; - wire [20:0] main_sdram_bankmachine7_req_addr; - wire main_sdram_bankmachine7_req_lock; - reg main_sdram_bankmachine7_req_wdata_ready = 1'd0; - reg main_sdram_bankmachine7_req_rdata_valid = 1'd0; - wire main_sdram_bankmachine7_refresh_req; - reg main_sdram_bankmachine7_refresh_gnt = 1'd0; - reg main_sdram_bankmachine7_cmd_valid = 1'd0; - reg main_sdram_bankmachine7_cmd_ready = 1'd0; - reg [13:0] main_sdram_bankmachine7_cmd_payload_a = 14'd0; - wire [2:0] main_sdram_bankmachine7_cmd_payload_ba; - reg main_sdram_bankmachine7_cmd_payload_cas = 1'd0; - reg main_sdram_bankmachine7_cmd_payload_ras = 1'd0; - reg main_sdram_bankmachine7_cmd_payload_we = 1'd0; - reg main_sdram_bankmachine7_cmd_payload_is_cmd = 1'd0; - reg main_sdram_bankmachine7_cmd_payload_is_read = 1'd0; - reg main_sdram_bankmachine7_cmd_payload_is_write = 1'd0; - reg main_sdram_bankmachine7_auto_precharge = 1'd0; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; - reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first = 1'd0; - reg main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last = 1'd0; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; - wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; - wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; - wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; - wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; - reg [3:0] main_sdram_bankmachine7_cmd_buffer_lookahead_level = 4'd0; - reg main_sdram_bankmachine7_cmd_buffer_lookahead_replace = 1'd0; - reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_produce = 3'd0; - reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_consume = 3'd0; - reg [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr = 3'd0; - wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we; - wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_do_read; - wire [2:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr; - wire [23:0] main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we; - wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; - wire [20:0] main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; - wire main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; - wire main_sdram_bankmachine7_cmd_buffer_sink_valid; - wire main_sdram_bankmachine7_cmd_buffer_sink_ready; - wire main_sdram_bankmachine7_cmd_buffer_sink_first; - wire main_sdram_bankmachine7_cmd_buffer_sink_last; - wire main_sdram_bankmachine7_cmd_buffer_sink_payload_we; - wire [20:0] main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; - reg main_sdram_bankmachine7_cmd_buffer_source_valid = 1'd0; - wire main_sdram_bankmachine7_cmd_buffer_source_ready; - reg main_sdram_bankmachine7_cmd_buffer_source_first = 1'd0; - reg main_sdram_bankmachine7_cmd_buffer_source_last = 1'd0; - reg main_sdram_bankmachine7_cmd_buffer_source_payload_we = 1'd0; - reg [20:0] main_sdram_bankmachine7_cmd_buffer_source_payload_addr = 21'd0; - reg [13:0] main_sdram_bankmachine7_row = 14'd0; - reg main_sdram_bankmachine7_row_opened = 1'd0; - wire main_sdram_bankmachine7_row_hit; - reg main_sdram_bankmachine7_row_open = 1'd0; - reg main_sdram_bankmachine7_row_close = 1'd0; - reg main_sdram_bankmachine7_row_col_n_addr_sel = 1'd0; - wire main_sdram_bankmachine7_twtpcon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine7_twtpcon_ready = 1'd1; - reg [2:0] main_sdram_bankmachine7_twtpcon_count = 3'd0; - wire main_sdram_bankmachine7_trccon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine7_trccon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine7_trccon_count = 2'd0; - wire main_sdram_bankmachine7_trascon_valid; - (* dont_touch = "true" *) reg main_sdram_bankmachine7_trascon_ready = 1'd1; - reg [1:0] main_sdram_bankmachine7_trascon_count = 2'd0; - wire main_sdram_ras_allowed; - wire main_sdram_cas_allowed; - reg main_sdram_choose_cmd_want_reads = 1'd0; - reg main_sdram_choose_cmd_want_writes = 1'd0; - reg main_sdram_choose_cmd_want_cmds = 1'd0; - reg main_sdram_choose_cmd_want_activates = 1'd0; - wire main_sdram_choose_cmd_cmd_valid; - reg main_sdram_choose_cmd_cmd_ready = 1'd0; - wire [13:0] main_sdram_choose_cmd_cmd_payload_a; - wire [2:0] main_sdram_choose_cmd_cmd_payload_ba; - reg main_sdram_choose_cmd_cmd_payload_cas = 1'd0; - reg main_sdram_choose_cmd_cmd_payload_ras = 1'd0; - reg main_sdram_choose_cmd_cmd_payload_we = 1'd0; - wire main_sdram_choose_cmd_cmd_payload_is_cmd; - wire main_sdram_choose_cmd_cmd_payload_is_read; - wire main_sdram_choose_cmd_cmd_payload_is_write; - reg [7:0] main_sdram_choose_cmd_valids = 8'd0; - wire [7:0] main_sdram_choose_cmd_request; - reg [2:0] main_sdram_choose_cmd_grant = 3'd0; - wire main_sdram_choose_cmd_ce; - reg main_sdram_choose_req_want_reads = 1'd0; - reg main_sdram_choose_req_want_writes = 1'd0; - reg main_sdram_choose_req_want_cmds = 1'd0; - reg main_sdram_choose_req_want_activates = 1'd0; - wire main_sdram_choose_req_cmd_valid; - reg main_sdram_choose_req_cmd_ready = 1'd0; - wire [13:0] main_sdram_choose_req_cmd_payload_a; - wire [2:0] main_sdram_choose_req_cmd_payload_ba; - reg main_sdram_choose_req_cmd_payload_cas = 1'd0; - reg main_sdram_choose_req_cmd_payload_ras = 1'd0; - reg main_sdram_choose_req_cmd_payload_we = 1'd0; - wire main_sdram_choose_req_cmd_payload_is_cmd; - wire main_sdram_choose_req_cmd_payload_is_read; - wire main_sdram_choose_req_cmd_payload_is_write; - reg [7:0] main_sdram_choose_req_valids = 8'd0; - wire [7:0] main_sdram_choose_req_request; - reg [2:0] main_sdram_choose_req_grant = 3'd0; - wire main_sdram_choose_req_ce; - reg [13:0] main_sdram_nop_a = 14'd0; - reg [2:0] main_sdram_nop_ba = 3'd0; - reg [1:0] main_sdram_steerer_sel0 = 2'd0; - reg [1:0] main_sdram_steerer_sel1 = 2'd0; - reg [1:0] main_sdram_steerer_sel2 = 2'd0; - reg [1:0] main_sdram_steerer_sel3 = 2'd0; - reg main_sdram_steerer0 = 1'd1; - reg main_sdram_steerer1 = 1'd1; - reg main_sdram_steerer2 = 1'd1; - reg main_sdram_steerer3 = 1'd1; - reg main_sdram_steerer4 = 1'd1; - reg main_sdram_steerer5 = 1'd1; - reg main_sdram_steerer6 = 1'd1; - reg main_sdram_steerer7 = 1'd1; - wire main_sdram_trrdcon_valid; - (* dont_touch = "true" *) reg main_sdram_trrdcon_ready = 1'd1; - reg main_sdram_trrdcon_count = 1'd0; - wire main_sdram_tfawcon_valid; - (* dont_touch = "true" *) reg main_sdram_tfawcon_ready = 1'd1; - wire [1:0] main_sdram_tfawcon_count; - reg [3:0] main_sdram_tfawcon_window = 4'd0; - wire main_sdram_tccdcon_valid; - (* dont_touch = "true" *) reg main_sdram_tccdcon_ready = 1'd1; - reg main_sdram_tccdcon_count = 1'd0; - wire main_sdram_twtrcon_valid; - (* dont_touch = "true" *) reg main_sdram_twtrcon_ready = 1'd1; - reg [2:0] main_sdram_twtrcon_count = 3'd0; - wire main_sdram_read_available; - wire main_sdram_write_available; - reg main_sdram_en0 = 1'd0; - wire main_sdram_max_time0; - reg [4:0] main_sdram_time0 = 5'd0; - reg main_sdram_en1 = 1'd0; - wire main_sdram_max_time1; - reg [3:0] main_sdram_time1 = 4'd0; - wire main_sdram_go_to_refresh; - reg main_port_cmd_valid = 1'd0; - wire main_port_cmd_ready; - reg main_port_cmd_payload_we = 1'd0; - reg [23:0] main_port_cmd_payload_addr = 24'd0; - wire main_port_wdata_valid; - wire main_port_wdata_ready; - wire main_port_wdata_first; - wire main_port_wdata_last; - wire [127:0] main_port_wdata_payload_data; - wire [15:0] main_port_wdata_payload_we; - wire main_port_rdata_valid; - wire main_port_rdata_ready; - reg main_port_rdata_first = 1'd0; - reg main_port_rdata_last = 1'd0; - wire [127:0] main_port_rdata_payload_data; - wire [29:0] main_interface1_wb_sdram_adr; - wire [31:0] main_interface1_wb_sdram_dat_w; - wire [31:0] main_interface1_wb_sdram_dat_r; - wire [3:0] main_interface1_wb_sdram_sel; - wire main_interface1_wb_sdram_cyc; - wire main_interface1_wb_sdram_stb; - wire main_interface1_wb_sdram_ack; - wire main_interface1_wb_sdram_we; - wire [2:0] main_interface1_wb_sdram_cti; - wire [1:0] main_interface1_wb_sdram_bte; - wire main_interface1_wb_sdram_err; - wire [29:0] main_adr; - wire [127:0] main_dat_w; - wire [127:0] main_dat_r; - wire [15:0] main_sel; - reg main_cyc = 1'd0; - reg main_stb = 1'd0; - reg main_ack = 1'd0; - reg main_we = 1'd0; - wire [8:0] main_data_port_adr; - wire [127:0] main_data_port_dat_r; - reg [15:0] main_data_port_we = 16'd0; - reg [127:0] main_data_port_dat_w = 128'd0; - reg main_write_from_slave = 1'd0; - reg [1:0] main_adr_offset_r = 2'd0; - wire [8:0] main_tag_port_adr; - wire [23:0] main_tag_port_dat_r; - reg main_tag_port_we = 1'd0; - wire [23:0] main_tag_port_dat_w; - wire [22:0] main_tag_do_tag; - wire main_tag_do_dirty; - wire [22:0] main_tag_di_tag; - reg main_tag_di_dirty = 1'd0; - reg main_word_clr = 1'd0; - reg main_word_inc = 1'd0; - wire main_wdata_converter_sink_valid; - wire main_wdata_converter_sink_ready; - reg main_wdata_converter_sink_first = 1'd0; - reg main_wdata_converter_sink_last = 1'd0; - wire [127:0] main_wdata_converter_sink_payload_data; - wire [15:0] main_wdata_converter_sink_payload_we; - wire main_wdata_converter_source_valid; - wire main_wdata_converter_source_ready; - wire main_wdata_converter_source_first; - wire main_wdata_converter_source_last; - wire [127:0] main_wdata_converter_source_payload_data; - wire [15:0] main_wdata_converter_source_payload_we; - wire main_wdata_converter_converter_sink_valid; - wire main_wdata_converter_converter_sink_ready; - wire main_wdata_converter_converter_sink_first; - wire main_wdata_converter_converter_sink_last; - wire [143:0] main_wdata_converter_converter_sink_payload_data; - wire main_wdata_converter_converter_source_valid; - wire main_wdata_converter_converter_source_ready; - wire main_wdata_converter_converter_source_first; - wire main_wdata_converter_converter_source_last; - wire [143:0] main_wdata_converter_converter_source_payload_data; - wire main_wdata_converter_converter_source_payload_valid_token_count; - wire main_wdata_converter_source_source_valid; - wire main_wdata_converter_source_source_ready; - wire main_wdata_converter_source_source_first; - wire main_wdata_converter_source_source_last; - wire [143:0] main_wdata_converter_source_source_payload_data; - wire main_rdata_converter_sink_valid; - wire main_rdata_converter_sink_ready; - wire main_rdata_converter_sink_first; - wire main_rdata_converter_sink_last; - wire [127:0] main_rdata_converter_sink_payload_data; - wire main_rdata_converter_source_valid; - wire main_rdata_converter_source_ready; - wire main_rdata_converter_source_first; - wire main_rdata_converter_source_last; - wire [127:0] main_rdata_converter_source_payload_data; - wire main_rdata_converter_converter_sink_valid; - wire main_rdata_converter_converter_sink_ready; - wire main_rdata_converter_converter_sink_first; - wire main_rdata_converter_converter_sink_last; - wire [127:0] main_rdata_converter_converter_sink_payload_data; - wire main_rdata_converter_converter_source_valid; - wire main_rdata_converter_converter_source_ready; - wire main_rdata_converter_converter_source_first; - wire main_rdata_converter_converter_source_last; - wire [127:0] main_rdata_converter_converter_source_payload_data; - wire main_rdata_converter_converter_source_payload_valid_token_count; - wire main_rdata_converter_source_source_valid; - wire main_rdata_converter_source_source_ready; - wire main_rdata_converter_source_source_first; - wire main_rdata_converter_source_source_last; - wire [127:0] main_rdata_converter_source_source_payload_data; - reg main_count = 1'd0; - reg builder_wb2csr_state = 1'd0; - reg builder_wb2csr_next_state = 1'd0; - wire builder_pll_fb; - reg [1:0] builder_refresher_state = 2'd0; - reg [1:0] builder_refresher_next_state = 2'd0; - reg [2:0] builder_bankmachine0_state = 3'd0; - reg [2:0] builder_bankmachine0_next_state = 3'd0; - reg [2:0] builder_bankmachine1_state = 3'd0; - reg [2:0] builder_bankmachine1_next_state = 3'd0; - reg [2:0] builder_bankmachine2_state = 3'd0; - reg [2:0] builder_bankmachine2_next_state = 3'd0; - reg [2:0] builder_bankmachine3_state = 3'd0; - reg [2:0] builder_bankmachine3_next_state = 3'd0; - reg [2:0] builder_bankmachine4_state = 3'd0; - reg [2:0] builder_bankmachine4_next_state = 3'd0; - reg [2:0] builder_bankmachine5_state = 3'd0; - reg [2:0] builder_bankmachine5_next_state = 3'd0; - reg [2:0] builder_bankmachine6_state = 3'd0; - reg [2:0] builder_bankmachine6_next_state = 3'd0; - reg [2:0] builder_bankmachine7_state = 3'd0; - reg [2:0] builder_bankmachine7_next_state = 3'd0; - reg [3:0] builder_multiplexer_state = 4'd0; - reg [3:0] builder_multiplexer_next_state = 4'd0; - wire builder_roundrobin0_request; - wire builder_roundrobin0_grant; - wire builder_roundrobin0_ce; - wire builder_roundrobin1_request; - wire builder_roundrobin1_grant; - wire builder_roundrobin1_ce; - wire builder_roundrobin2_request; - wire builder_roundrobin2_grant; - wire builder_roundrobin2_ce; - wire builder_roundrobin3_request; - wire builder_roundrobin3_grant; - wire builder_roundrobin3_ce; - wire builder_roundrobin4_request; - wire builder_roundrobin4_grant; - wire builder_roundrobin4_ce; - wire builder_roundrobin5_request; - wire builder_roundrobin5_grant; - wire builder_roundrobin5_ce; - wire builder_roundrobin6_request; - wire builder_roundrobin6_grant; - wire builder_roundrobin6_ce; - wire builder_roundrobin7_request; - wire builder_roundrobin7_grant; - wire builder_roundrobin7_ce; - reg [2:0] builder_rbank = 3'd0; - reg [2:0] builder_wbank = 3'd0; - reg builder_locked0 = 1'd0; - reg builder_locked1 = 1'd0; - reg builder_locked2 = 1'd0; - reg builder_locked3 = 1'd0; - reg builder_locked4 = 1'd0; - reg builder_locked5 = 1'd0; - reg builder_locked6 = 1'd0; - reg builder_locked7 = 1'd0; - reg builder_new_master_wdata_ready0 = 1'd0; - reg builder_new_master_wdata_ready1 = 1'd0; - reg builder_new_master_wdata_ready2 = 1'd0; - reg builder_new_master_rdata_valid0 = 1'd0; - reg builder_new_master_rdata_valid1 = 1'd0; - reg builder_new_master_rdata_valid2 = 1'd0; - reg builder_new_master_rdata_valid3 = 1'd0; - reg builder_new_master_rdata_valid4 = 1'd0; - reg builder_new_master_rdata_valid5 = 1'd0; - reg builder_new_master_rdata_valid6 = 1'd0; - reg builder_new_master_rdata_valid7 = 1'd0; - reg builder_new_master_rdata_valid8 = 1'd0; - reg builder_new_master_rdata_valid9 = 1'd0; - reg [1:0] builder_fullmemorywe_state = 2'd0; - reg [1:0] builder_fullmemorywe_next_state = 2'd0; - reg [1:0] builder_litedramwishbone2native_state = 2'd0; - reg [1:0] builder_litedramwishbone2native_next_state = 2'd0; - reg main_count_next_value = 1'd0; - reg main_count_next_value_ce = 1'd0; - wire builder_wb_sdram_con_request; - wire builder_wb_sdram_con_grant; - wire [29:0] builder_minsoc_shared_adr; - wire [31:0] builder_minsoc_shared_dat_w; - reg [31:0] builder_minsoc_shared_dat_r = 32'd0; - wire [3:0] builder_minsoc_shared_sel; - wire builder_minsoc_shared_cyc; - wire builder_minsoc_shared_stb; - reg builder_minsoc_shared_ack = 1'd0; - wire builder_minsoc_shared_we; - wire [2:0] builder_minsoc_shared_cti; - wire [1:0] builder_minsoc_shared_bte; - wire builder_minsoc_shared_err; - wire [1:0] builder_minsoc_request; - reg builder_minsoc_grant = 1'd0; - reg [3:0] builder_minsoc_slave_sel = 4'd0; - reg [3:0] builder_minsoc_slave_sel_r = 4'd0; - reg builder_minsoc_error = 1'd0; - wire builder_minsoc_wait; - wire builder_minsoc_done; - reg [19:0] builder_minsoc_count = 20'd1000000; - wire [13:0] builder_minsoc_interface0_bank_bus_adr; - wire builder_minsoc_interface0_bank_bus_we; - wire [7:0] builder_minsoc_interface0_bank_bus_dat_w; - reg [7:0] builder_minsoc_interface0_bank_bus_dat_r = 8'd0; - wire builder_minsoc_csrbank0_reset0_re; - wire builder_minsoc_csrbank0_reset0_r; - wire builder_minsoc_csrbank0_reset0_we; - wire builder_minsoc_csrbank0_reset0_w; - wire builder_minsoc_csrbank0_scratch3_re; - wire [7:0] builder_minsoc_csrbank0_scratch3_r; - wire builder_minsoc_csrbank0_scratch3_we; - wire [7:0] builder_minsoc_csrbank0_scratch3_w; - wire builder_minsoc_csrbank0_scratch2_re; - wire [7:0] builder_minsoc_csrbank0_scratch2_r; - wire builder_minsoc_csrbank0_scratch2_we; - wire [7:0] builder_minsoc_csrbank0_scratch2_w; - wire builder_minsoc_csrbank0_scratch1_re; - wire [7:0] builder_minsoc_csrbank0_scratch1_r; - wire builder_minsoc_csrbank0_scratch1_we; - wire [7:0] builder_minsoc_csrbank0_scratch1_w; - wire builder_minsoc_csrbank0_scratch0_re; - wire [7:0] builder_minsoc_csrbank0_scratch0_r; - wire builder_minsoc_csrbank0_scratch0_we; - wire [7:0] builder_minsoc_csrbank0_scratch0_w; - wire builder_minsoc_csrbank0_bus_errors3_re; - wire [7:0] builder_minsoc_csrbank0_bus_errors3_r; - wire builder_minsoc_csrbank0_bus_errors3_we; - wire [7:0] builder_minsoc_csrbank0_bus_errors3_w; - wire builder_minsoc_csrbank0_bus_errors2_re; - wire [7:0] builder_minsoc_csrbank0_bus_errors2_r; - wire builder_minsoc_csrbank0_bus_errors2_we; - wire [7:0] builder_minsoc_csrbank0_bus_errors2_w; - wire builder_minsoc_csrbank0_bus_errors1_re; - wire [7:0] builder_minsoc_csrbank0_bus_errors1_r; - wire builder_minsoc_csrbank0_bus_errors1_we; - wire [7:0] builder_minsoc_csrbank0_bus_errors1_w; - wire builder_minsoc_csrbank0_bus_errors0_re; - wire [7:0] builder_minsoc_csrbank0_bus_errors0_r; - wire builder_minsoc_csrbank0_bus_errors0_we; - wire [7:0] builder_minsoc_csrbank0_bus_errors0_w; - wire builder_minsoc_csrbank0_sel; - wire [13:0] builder_minsoc_interface1_bank_bus_adr; - wire builder_minsoc_interface1_bank_bus_we; - wire [7:0] builder_minsoc_interface1_bank_bus_dat_w; - reg [7:0] builder_minsoc_interface1_bank_bus_dat_r = 8'd0; - wire builder_minsoc_csrbank1_half_sys8x_taps0_re; - wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_r; - wire builder_minsoc_csrbank1_half_sys8x_taps0_we; - wire [4:0] builder_minsoc_csrbank1_half_sys8x_taps0_w; - wire builder_minsoc_csrbank1_dly_sel0_re; - wire [1:0] builder_minsoc_csrbank1_dly_sel0_r; - wire builder_minsoc_csrbank1_dly_sel0_we; - wire [1:0] builder_minsoc_csrbank1_dly_sel0_w; - wire builder_minsoc_csrbank1_sel; - wire [13:0] builder_minsoc_interface2_bank_bus_adr; - wire builder_minsoc_interface2_bank_bus_we; - wire [7:0] builder_minsoc_interface2_bank_bus_dat_w; - reg [7:0] builder_minsoc_interface2_bank_bus_dat_r = 8'd0; - wire builder_minsoc_csrbank2_dfii_control0_re; - wire [3:0] builder_minsoc_csrbank2_dfii_control0_r; - wire builder_minsoc_csrbank2_dfii_control0_we; - wire [3:0] builder_minsoc_csrbank2_dfii_control0_w; - wire builder_minsoc_csrbank2_dfii_pi0_command0_re; - wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_r; - wire builder_minsoc_csrbank2_dfii_pi0_command0_we; - wire [5:0] builder_minsoc_csrbank2_dfii_pi0_command0_w; - wire builder_minsoc_csrbank2_dfii_pi0_address1_re; - wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_r; - wire builder_minsoc_csrbank2_dfii_pi0_address1_we; - wire [5:0] builder_minsoc_csrbank2_dfii_pi0_address1_w; - wire builder_minsoc_csrbank2_dfii_pi0_address0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_r; - wire builder_minsoc_csrbank2_dfii_pi0_address0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_address0_w; - wire builder_minsoc_csrbank2_dfii_pi0_baddress0_re; - wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_r; - wire builder_minsoc_csrbank2_dfii_pi0_baddress0_we; - wire [2:0] builder_minsoc_csrbank2_dfii_pi0_baddress0_w; - wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; - wire builder_minsoc_csrbank2_dfii_pi0_wrdata3_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; - wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; - wire builder_minsoc_csrbank2_dfii_pi0_wrdata2_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; - wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; - wire builder_minsoc_csrbank2_dfii_pi0_wrdata1_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; - wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; - wire builder_minsoc_csrbank2_dfii_pi0_wrdata0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; - wire builder_minsoc_csrbank2_dfii_pi0_rddata3_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_r; - wire builder_minsoc_csrbank2_dfii_pi0_rddata3_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata3_w; - wire builder_minsoc_csrbank2_dfii_pi0_rddata2_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_r; - wire builder_minsoc_csrbank2_dfii_pi0_rddata2_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata2_w; - wire builder_minsoc_csrbank2_dfii_pi0_rddata1_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_r; - wire builder_minsoc_csrbank2_dfii_pi0_rddata1_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata1_w; - wire builder_minsoc_csrbank2_dfii_pi0_rddata0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_r; - wire builder_minsoc_csrbank2_dfii_pi0_rddata0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi0_rddata0_w; - wire builder_minsoc_csrbank2_dfii_pi1_command0_re; - wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_r; - wire builder_minsoc_csrbank2_dfii_pi1_command0_we; - wire [5:0] builder_minsoc_csrbank2_dfii_pi1_command0_w; - wire builder_minsoc_csrbank2_dfii_pi1_address1_re; - wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_r; - wire builder_minsoc_csrbank2_dfii_pi1_address1_we; - wire [5:0] builder_minsoc_csrbank2_dfii_pi1_address1_w; - wire builder_minsoc_csrbank2_dfii_pi1_address0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_r; - wire builder_minsoc_csrbank2_dfii_pi1_address0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_address0_w; - wire builder_minsoc_csrbank2_dfii_pi1_baddress0_re; - wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_r; - wire builder_minsoc_csrbank2_dfii_pi1_baddress0_we; - wire [2:0] builder_minsoc_csrbank2_dfii_pi1_baddress0_w; - wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; - wire builder_minsoc_csrbank2_dfii_pi1_wrdata3_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; - wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; - wire builder_minsoc_csrbank2_dfii_pi1_wrdata2_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; - wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; - wire builder_minsoc_csrbank2_dfii_pi1_wrdata1_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; - wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; - wire builder_minsoc_csrbank2_dfii_pi1_wrdata0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; - wire builder_minsoc_csrbank2_dfii_pi1_rddata3_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_r; - wire builder_minsoc_csrbank2_dfii_pi1_rddata3_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata3_w; - wire builder_minsoc_csrbank2_dfii_pi1_rddata2_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_r; - wire builder_minsoc_csrbank2_dfii_pi1_rddata2_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata2_w; - wire builder_minsoc_csrbank2_dfii_pi1_rddata1_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_r; - wire builder_minsoc_csrbank2_dfii_pi1_rddata1_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata1_w; - wire builder_minsoc_csrbank2_dfii_pi1_rddata0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_r; - wire builder_minsoc_csrbank2_dfii_pi1_rddata0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi1_rddata0_w; - wire builder_minsoc_csrbank2_dfii_pi2_command0_re; - wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_r; - wire builder_minsoc_csrbank2_dfii_pi2_command0_we; - wire [5:0] builder_minsoc_csrbank2_dfii_pi2_command0_w; - wire builder_minsoc_csrbank2_dfii_pi2_address1_re; - wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_r; - wire builder_minsoc_csrbank2_dfii_pi2_address1_we; - wire [5:0] builder_minsoc_csrbank2_dfii_pi2_address1_w; - wire builder_minsoc_csrbank2_dfii_pi2_address0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_r; - wire builder_minsoc_csrbank2_dfii_pi2_address0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_address0_w; - wire builder_minsoc_csrbank2_dfii_pi2_baddress0_re; - wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_r; - wire builder_minsoc_csrbank2_dfii_pi2_baddress0_we; - wire [2:0] builder_minsoc_csrbank2_dfii_pi2_baddress0_w; - wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; - wire builder_minsoc_csrbank2_dfii_pi2_wrdata3_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; - wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; - wire builder_minsoc_csrbank2_dfii_pi2_wrdata2_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; - wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; - wire builder_minsoc_csrbank2_dfii_pi2_wrdata1_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; - wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; - wire builder_minsoc_csrbank2_dfii_pi2_wrdata0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; - wire builder_minsoc_csrbank2_dfii_pi2_rddata3_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_r; - wire builder_minsoc_csrbank2_dfii_pi2_rddata3_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata3_w; - wire builder_minsoc_csrbank2_dfii_pi2_rddata2_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_r; - wire builder_minsoc_csrbank2_dfii_pi2_rddata2_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata2_w; - wire builder_minsoc_csrbank2_dfii_pi2_rddata1_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_r; - wire builder_minsoc_csrbank2_dfii_pi2_rddata1_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata1_w; - wire builder_minsoc_csrbank2_dfii_pi2_rddata0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_r; - wire builder_minsoc_csrbank2_dfii_pi2_rddata0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi2_rddata0_w; - wire builder_minsoc_csrbank2_dfii_pi3_command0_re; - wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_r; - wire builder_minsoc_csrbank2_dfii_pi3_command0_we; - wire [5:0] builder_minsoc_csrbank2_dfii_pi3_command0_w; - wire builder_minsoc_csrbank2_dfii_pi3_address1_re; - wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_r; - wire builder_minsoc_csrbank2_dfii_pi3_address1_we; - wire [5:0] builder_minsoc_csrbank2_dfii_pi3_address1_w; - wire builder_minsoc_csrbank2_dfii_pi3_address0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_r; - wire builder_minsoc_csrbank2_dfii_pi3_address0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_address0_w; - wire builder_minsoc_csrbank2_dfii_pi3_baddress0_re; - wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_r; - wire builder_minsoc_csrbank2_dfii_pi3_baddress0_we; - wire [2:0] builder_minsoc_csrbank2_dfii_pi3_baddress0_w; - wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; - wire builder_minsoc_csrbank2_dfii_pi3_wrdata3_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; - wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; - wire builder_minsoc_csrbank2_dfii_pi3_wrdata2_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; - wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; - wire builder_minsoc_csrbank2_dfii_pi3_wrdata1_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; - wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; - wire builder_minsoc_csrbank2_dfii_pi3_wrdata0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; - wire builder_minsoc_csrbank2_dfii_pi3_rddata3_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_r; - wire builder_minsoc_csrbank2_dfii_pi3_rddata3_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata3_w; - wire builder_minsoc_csrbank2_dfii_pi3_rddata2_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_r; - wire builder_minsoc_csrbank2_dfii_pi3_rddata2_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata2_w; - wire builder_minsoc_csrbank2_dfii_pi3_rddata1_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_r; - wire builder_minsoc_csrbank2_dfii_pi3_rddata1_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata1_w; - wire builder_minsoc_csrbank2_dfii_pi3_rddata0_re; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_r; - wire builder_minsoc_csrbank2_dfii_pi3_rddata0_we; - wire [7:0] builder_minsoc_csrbank2_dfii_pi3_rddata0_w; - wire builder_minsoc_csrbank2_sel; - wire [13:0] builder_minsoc_interface3_bank_bus_adr; - wire builder_minsoc_interface3_bank_bus_we; - wire [7:0] builder_minsoc_interface3_bank_bus_dat_w; - reg [7:0] builder_minsoc_interface3_bank_bus_dat_r = 8'd0; - wire builder_minsoc_csrbank3_load3_re; - wire [7:0] builder_minsoc_csrbank3_load3_r; - wire builder_minsoc_csrbank3_load3_we; - wire [7:0] builder_minsoc_csrbank3_load3_w; - wire builder_minsoc_csrbank3_load2_re; - wire [7:0] builder_minsoc_csrbank3_load2_r; - wire builder_minsoc_csrbank3_load2_we; - wire [7:0] builder_minsoc_csrbank3_load2_w; - wire builder_minsoc_csrbank3_load1_re; - wire [7:0] builder_minsoc_csrbank3_load1_r; - wire builder_minsoc_csrbank3_load1_we; - wire [7:0] builder_minsoc_csrbank3_load1_w; - wire builder_minsoc_csrbank3_load0_re; - wire [7:0] builder_minsoc_csrbank3_load0_r; - wire builder_minsoc_csrbank3_load0_we; - wire [7:0] builder_minsoc_csrbank3_load0_w; - wire builder_minsoc_csrbank3_reload3_re; - wire [7:0] builder_minsoc_csrbank3_reload3_r; - wire builder_minsoc_csrbank3_reload3_we; - wire [7:0] builder_minsoc_csrbank3_reload3_w; - wire builder_minsoc_csrbank3_reload2_re; - wire [7:0] builder_minsoc_csrbank3_reload2_r; - wire builder_minsoc_csrbank3_reload2_we; - wire [7:0] builder_minsoc_csrbank3_reload2_w; - wire builder_minsoc_csrbank3_reload1_re; - wire [7:0] builder_minsoc_csrbank3_reload1_r; - wire builder_minsoc_csrbank3_reload1_we; - wire [7:0] builder_minsoc_csrbank3_reload1_w; - wire builder_minsoc_csrbank3_reload0_re; - wire [7:0] builder_minsoc_csrbank3_reload0_r; - wire builder_minsoc_csrbank3_reload0_we; - wire [7:0] builder_minsoc_csrbank3_reload0_w; - wire builder_minsoc_csrbank3_en0_re; - wire builder_minsoc_csrbank3_en0_r; - wire builder_minsoc_csrbank3_en0_we; - wire builder_minsoc_csrbank3_en0_w; - wire builder_minsoc_csrbank3_update_value0_re; - wire builder_minsoc_csrbank3_update_value0_r; - wire builder_minsoc_csrbank3_update_value0_we; - wire builder_minsoc_csrbank3_update_value0_w; - wire builder_minsoc_csrbank3_value3_re; - wire [7:0] builder_minsoc_csrbank3_value3_r; - wire builder_minsoc_csrbank3_value3_we; - wire [7:0] builder_minsoc_csrbank3_value3_w; - wire builder_minsoc_csrbank3_value2_re; - wire [7:0] builder_minsoc_csrbank3_value2_r; - wire builder_minsoc_csrbank3_value2_we; - wire [7:0] builder_minsoc_csrbank3_value2_w; - wire builder_minsoc_csrbank3_value1_re; - wire [7:0] builder_minsoc_csrbank3_value1_r; - wire builder_minsoc_csrbank3_value1_we; - wire [7:0] builder_minsoc_csrbank3_value1_w; - wire builder_minsoc_csrbank3_value0_re; - wire [7:0] builder_minsoc_csrbank3_value0_r; - wire builder_minsoc_csrbank3_value0_we; - wire [7:0] builder_minsoc_csrbank3_value0_w; - wire builder_minsoc_csrbank3_ev_enable0_re; - wire builder_minsoc_csrbank3_ev_enable0_r; - wire builder_minsoc_csrbank3_ev_enable0_we; - wire builder_minsoc_csrbank3_ev_enable0_w; - wire builder_minsoc_csrbank3_sel; - wire [13:0] builder_minsoc_interface4_bank_bus_adr; - wire builder_minsoc_interface4_bank_bus_we; - wire [7:0] builder_minsoc_interface4_bank_bus_dat_w; - reg [7:0] builder_minsoc_interface4_bank_bus_dat_r = 8'd0; - wire builder_minsoc_csrbank4_txfull_re; - wire builder_minsoc_csrbank4_txfull_r; - wire builder_minsoc_csrbank4_txfull_we; - wire builder_minsoc_csrbank4_txfull_w; - wire builder_minsoc_csrbank4_rxempty_re; - wire builder_minsoc_csrbank4_rxempty_r; - wire builder_minsoc_csrbank4_rxempty_we; - wire builder_minsoc_csrbank4_rxempty_w; - wire builder_minsoc_csrbank4_ev_enable0_re; - wire [1:0] builder_minsoc_csrbank4_ev_enable0_r; - wire builder_minsoc_csrbank4_ev_enable0_we; - wire [1:0] builder_minsoc_csrbank4_ev_enable0_w; - wire builder_minsoc_csrbank4_sel; - wire [13:0] builder_minsoc_interface5_bank_bus_adr; - wire builder_minsoc_interface5_bank_bus_we; - wire [7:0] builder_minsoc_interface5_bank_bus_dat_w; - reg [7:0] builder_minsoc_interface5_bank_bus_dat_r = 8'd0; - wire builder_minsoc_csrbank5_tuning_word3_re; - wire [7:0] builder_minsoc_csrbank5_tuning_word3_r; - wire builder_minsoc_csrbank5_tuning_word3_we; - wire [7:0] builder_minsoc_csrbank5_tuning_word3_w; - wire builder_minsoc_csrbank5_tuning_word2_re; - wire [7:0] builder_minsoc_csrbank5_tuning_word2_r; - wire builder_minsoc_csrbank5_tuning_word2_we; - wire [7:0] builder_minsoc_csrbank5_tuning_word2_w; - wire builder_minsoc_csrbank5_tuning_word1_re; - wire [7:0] builder_minsoc_csrbank5_tuning_word1_r; - wire builder_minsoc_csrbank5_tuning_word1_we; - wire [7:0] builder_minsoc_csrbank5_tuning_word1_w; - wire builder_minsoc_csrbank5_tuning_word0_re; - wire [7:0] builder_minsoc_csrbank5_tuning_word0_r; - wire builder_minsoc_csrbank5_tuning_word0_we; - wire [7:0] builder_minsoc_csrbank5_tuning_word0_w; - wire builder_minsoc_csrbank5_sel; - wire [13:0] builder_minsoc_adr; - wire builder_minsoc_we; - wire [7:0] builder_minsoc_dat_w; - wire [7:0] builder_minsoc_dat_r; - reg builder_rhs_array_muxed0 = 1'd0; - reg [13:0] builder_rhs_array_muxed1 = 14'd0; - reg [2:0] builder_rhs_array_muxed2 = 3'd0; - reg builder_rhs_array_muxed3 = 1'd0; - reg builder_rhs_array_muxed4 = 1'd0; - reg builder_rhs_array_muxed5 = 1'd0; - reg builder_t_array_muxed0 = 1'd0; - reg builder_t_array_muxed1 = 1'd0; - reg builder_t_array_muxed2 = 1'd0; - reg builder_rhs_array_muxed6 = 1'd0; - reg [13:0] builder_rhs_array_muxed7 = 14'd0; - reg [2:0] builder_rhs_array_muxed8 = 3'd0; - reg builder_rhs_array_muxed9 = 1'd0; - reg builder_rhs_array_muxed10 = 1'd0; - reg builder_rhs_array_muxed11 = 1'd0; - reg builder_t_array_muxed3 = 1'd0; - reg builder_t_array_muxed4 = 1'd0; - reg builder_t_array_muxed5 = 1'd0; - reg [20:0] builder_rhs_array_muxed12 = 21'd0; - reg builder_rhs_array_muxed13 = 1'd0; - reg builder_rhs_array_muxed14 = 1'd0; - reg [20:0] builder_rhs_array_muxed15 = 21'd0; - reg builder_rhs_array_muxed16 = 1'd0; - reg builder_rhs_array_muxed17 = 1'd0; - reg [20:0] builder_rhs_array_muxed18 = 21'd0; - reg builder_rhs_array_muxed19 = 1'd0; - reg builder_rhs_array_muxed20 = 1'd0; - reg [20:0] builder_rhs_array_muxed21 = 21'd0; - reg builder_rhs_array_muxed22 = 1'd0; - reg builder_rhs_array_muxed23 = 1'd0; - reg [20:0] builder_rhs_array_muxed24 = 21'd0; - reg builder_rhs_array_muxed25 = 1'd0; - reg builder_rhs_array_muxed26 = 1'd0; - reg [20:0] builder_rhs_array_muxed27 = 21'd0; - reg builder_rhs_array_muxed28 = 1'd0; - reg builder_rhs_array_muxed29 = 1'd0; - reg [20:0] builder_rhs_array_muxed30 = 21'd0; - reg builder_rhs_array_muxed31 = 1'd0; - reg builder_rhs_array_muxed32 = 1'd0; - reg [20:0] builder_rhs_array_muxed33 = 21'd0; - reg builder_rhs_array_muxed34 = 1'd0; - reg builder_rhs_array_muxed35 = 1'd0; - reg [29:0] builder_rhs_array_muxed36 = 30'd0; - reg [31:0] builder_rhs_array_muxed37 = 32'd0; - reg [3:0] builder_rhs_array_muxed38 = 4'd0; - reg builder_rhs_array_muxed39 = 1'd0; - reg builder_rhs_array_muxed40 = 1'd0; - reg builder_rhs_array_muxed41 = 1'd0; - reg [2:0] builder_rhs_array_muxed42 = 3'd0; - reg [1:0] builder_rhs_array_muxed43 = 2'd0; - reg [29:0] builder_rhs_array_muxed44 = 30'd0; - reg [31:0] builder_rhs_array_muxed45 = 32'd0; - reg [3:0] builder_rhs_array_muxed46 = 4'd0; - reg builder_rhs_array_muxed47 = 1'd0; - reg builder_rhs_array_muxed48 = 1'd0; - reg builder_rhs_array_muxed49 = 1'd0; - reg [2:0] builder_rhs_array_muxed50 = 3'd0; - reg [1:0] builder_rhs_array_muxed51 = 2'd0; - reg [2:0] builder_array_muxed0 = 3'd0; - reg [13:0] builder_array_muxed1 = 14'd0; - reg builder_array_muxed2 = 1'd0; - reg builder_array_muxed3 = 1'd0; - reg builder_array_muxed4 = 1'd0; - reg builder_array_muxed5 = 1'd0; - reg builder_array_muxed6 = 1'd0; - reg [2:0] builder_array_muxed7 = 3'd0; - reg [13:0] builder_array_muxed8 = 14'd0; - reg builder_array_muxed9 = 1'd0; - reg builder_array_muxed10 = 1'd0; - reg builder_array_muxed11 = 1'd0; - reg builder_array_muxed12 = 1'd0; - reg builder_array_muxed13 = 1'd0; - reg [2:0] builder_array_muxed14 = 3'd0; - reg [13:0] builder_array_muxed15 = 14'd0; - reg builder_array_muxed16 = 1'd0; - reg builder_array_muxed17 = 1'd0; - reg builder_array_muxed18 = 1'd0; - reg builder_array_muxed19 = 1'd0; - reg builder_array_muxed20 = 1'd0; - reg [2:0] builder_array_muxed21 = 3'd0; - reg [13:0] builder_array_muxed22 = 14'd0; - reg builder_array_muxed23 = 1'd0; - reg builder_array_muxed24 = 1'd0; - reg builder_array_muxed25 = 1'd0; - reg builder_array_muxed26 = 1'd0; - reg builder_array_muxed27 = 1'd0; - (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) reg builder_regs0 = 1'd0; - (* async_reg = "true", dont_touch = "true" *) reg builder_regs1 = 1'd0; - wire builder_xilinxasyncresetsynchronizerimpl0; - wire builder_xilinxasyncresetsynchronizerimpl0_rst_meta; - wire builder_xilinxasyncresetsynchronizerimpl1; - wire builder_xilinxasyncresetsynchronizerimpl1_rst_meta; - wire builder_xilinxasyncresetsynchronizerimpl1_expr; - wire builder_xilinxasyncresetsynchronizerimpl2; - wire builder_xilinxasyncresetsynchronizerimpl2_rst_meta; - wire builder_xilinxasyncresetsynchronizerimpl2_expr; - wire builder_xilinxasyncresetsynchronizerimpl3; - wire builder_xilinxasyncresetsynchronizerimpl3_rst_meta; - - assign main_minsoc_cpu_reset = main_minsoc_ctrl_reset; - assign main_minsoc_ctrl_bus_error = builder_minsoc_error; - always @(*) begin - main_minsoc_cpu_interrupt <= 32'd0; - main_minsoc_cpu_interrupt[1] <= main_minsoc_timer0_irq; - main_minsoc_cpu_interrupt[0] <= main_minsoc_uart_irq; - end - assign main_minsoc_ctrl_reset = main_minsoc_ctrl_reset_re; - assign main_minsoc_ctrl_bus_errors_status = main_minsoc_ctrl_bus_errors; - assign main_minsoc_interface0_soc_bus_adr = main_minsoc_cpu_ibus_adr; - assign main_minsoc_interface0_soc_bus_dat_w = main_minsoc_cpu_ibus_dat_w; - assign main_minsoc_cpu_ibus_dat_r = main_minsoc_interface0_soc_bus_dat_r; - assign main_minsoc_interface0_soc_bus_sel = main_minsoc_cpu_ibus_sel; - assign main_minsoc_interface0_soc_bus_cyc = main_minsoc_cpu_ibus_cyc; - assign main_minsoc_interface0_soc_bus_stb = main_minsoc_cpu_ibus_stb; - assign main_minsoc_cpu_ibus_ack = main_minsoc_interface0_soc_bus_ack; - assign main_minsoc_interface0_soc_bus_we = main_minsoc_cpu_ibus_we; - assign main_minsoc_interface0_soc_bus_cti = main_minsoc_cpu_ibus_cti; - assign main_minsoc_interface0_soc_bus_bte = main_minsoc_cpu_ibus_bte; - assign main_minsoc_cpu_ibus_err = main_minsoc_interface0_soc_bus_err; - assign main_minsoc_interface1_soc_bus_adr = main_minsoc_cpu_dbus_adr; - assign main_minsoc_interface1_soc_bus_dat_w = main_minsoc_cpu_dbus_dat_w; - assign main_minsoc_cpu_dbus_dat_r = main_minsoc_interface1_soc_bus_dat_r; - assign main_minsoc_interface1_soc_bus_sel = main_minsoc_cpu_dbus_sel; - assign main_minsoc_interface1_soc_bus_cyc = main_minsoc_cpu_dbus_cyc; - assign main_minsoc_interface1_soc_bus_stb = main_minsoc_cpu_dbus_stb; - assign main_minsoc_cpu_dbus_ack = main_minsoc_interface1_soc_bus_ack; - assign main_minsoc_interface1_soc_bus_we = main_minsoc_cpu_dbus_we; - assign main_minsoc_interface1_soc_bus_cti = main_minsoc_cpu_dbus_cti; - assign main_minsoc_interface1_soc_bus_bte = main_minsoc_cpu_dbus_bte; - assign main_minsoc_cpu_dbus_err = main_minsoc_interface1_soc_bus_err; - assign main_minsoc_rom_adr = main_minsoc_rom_bus_adr[12:0]; - assign main_minsoc_rom_bus_dat_r = main_minsoc_rom_dat_r; - always @(*) begin - main_minsoc_sram_we <= 4'd0; - main_minsoc_sram_we[0] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[0]); - main_minsoc_sram_we[1] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[1]); - main_minsoc_sram_we[2] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[2]); - main_minsoc_sram_we[3] <= (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & main_minsoc_sram_bus_we) & main_minsoc_sram_bus_sel[3]); - end - assign main_minsoc_sram_adr = main_minsoc_sram_bus_adr[9:0]; - assign main_minsoc_sram_bus_dat_r = main_minsoc_sram_dat_r; - assign main_minsoc_sram_dat_w = main_minsoc_sram_bus_dat_w; - assign main_minsoc_uart_uart_sink_valid = main_minsoc_source_valid; - assign main_minsoc_source_ready = main_minsoc_uart_uart_sink_ready; - assign main_minsoc_uart_uart_sink_first = main_minsoc_source_first; - assign main_minsoc_uart_uart_sink_last = main_minsoc_source_last; - assign main_minsoc_uart_uart_sink_payload_data = main_minsoc_source_payload_data; - assign main_minsoc_sink_valid = main_minsoc_uart_uart_source_valid; - assign main_minsoc_uart_uart_source_ready = main_minsoc_sink_ready; - assign main_minsoc_sink_first = main_minsoc_uart_uart_source_first; - assign main_minsoc_sink_last = main_minsoc_uart_uart_source_last; - assign main_minsoc_sink_payload_data = main_minsoc_uart_uart_source_payload_data; - assign main_minsoc_uart_tx_fifo_sink_valid = main_minsoc_uart_rxtx_re; - assign main_minsoc_uart_tx_fifo_sink_payload_data = main_minsoc_uart_rxtx_r; - assign main_minsoc_uart_txfull_status = (~main_minsoc_uart_tx_fifo_sink_ready); - assign main_minsoc_uart_uart_source_valid = main_minsoc_uart_tx_fifo_source_valid; - assign main_minsoc_uart_tx_fifo_source_ready = main_minsoc_uart_uart_source_ready; - assign main_minsoc_uart_uart_source_first = main_minsoc_uart_tx_fifo_source_first; - assign main_minsoc_uart_uart_source_last = main_minsoc_uart_tx_fifo_source_last; - assign main_minsoc_uart_uart_source_payload_data = main_minsoc_uart_tx_fifo_source_payload_data; - assign main_minsoc_uart_tx_trigger = (~main_minsoc_uart_tx_fifo_sink_ready); - assign main_minsoc_uart_rx_fifo_sink_valid = main_minsoc_uart_uart_sink_valid; - assign main_minsoc_uart_uart_sink_ready = main_minsoc_uart_rx_fifo_sink_ready; - assign main_minsoc_uart_rx_fifo_sink_first = main_minsoc_uart_uart_sink_first; - assign main_minsoc_uart_rx_fifo_sink_last = main_minsoc_uart_uart_sink_last; - assign main_minsoc_uart_rx_fifo_sink_payload_data = main_minsoc_uart_uart_sink_payload_data; - assign main_minsoc_uart_rxempty_status = (~main_minsoc_uart_rx_fifo_source_valid); - assign main_minsoc_uart_rxtx_w = main_minsoc_uart_rx_fifo_source_payload_data; - assign main_minsoc_uart_rx_fifo_source_ready = (main_minsoc_uart_rx_clear | (1'd0 & main_minsoc_uart_rxtx_we)); - assign main_minsoc_uart_rx_trigger = (~main_minsoc_uart_rx_fifo_source_valid); - always @(*) begin - main_minsoc_uart_tx_clear <= 1'd0; - if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[0])) begin - main_minsoc_uart_tx_clear <= 1'd1; - end - end - always @(*) begin - main_minsoc_uart_eventmanager_status_w <= 2'd0; - main_minsoc_uart_eventmanager_status_w[0] <= main_minsoc_uart_tx_status; - main_minsoc_uart_eventmanager_status_w[1] <= main_minsoc_uart_rx_status; - end - always @(*) begin - main_minsoc_uart_rx_clear <= 1'd0; - if ((main_minsoc_uart_eventmanager_pending_re & main_minsoc_uart_eventmanager_pending_r[1])) begin - main_minsoc_uart_rx_clear <= 1'd1; - end - end - always @(*) begin - main_minsoc_uart_eventmanager_pending_w <= 2'd0; - main_minsoc_uart_eventmanager_pending_w[0] <= main_minsoc_uart_tx_pending; - main_minsoc_uart_eventmanager_pending_w[1] <= main_minsoc_uart_rx_pending; - end - assign main_minsoc_uart_irq = ((main_minsoc_uart_eventmanager_pending_w[0] & main_minsoc_uart_eventmanager_storage[0]) | (main_minsoc_uart_eventmanager_pending_w[1] & main_minsoc_uart_eventmanager_storage[1])); - assign main_minsoc_uart_tx_status = main_minsoc_uart_tx_trigger; - assign main_minsoc_uart_rx_status = main_minsoc_uart_rx_trigger; - assign main_minsoc_uart_tx_fifo_syncfifo_din = { - main_minsoc_uart_tx_fifo_fifo_in_last, - main_minsoc_uart_tx_fifo_fifo_in_first, - main_minsoc_uart_tx_fifo_fifo_in_payload_data - }; - assign {main_minsoc_uart_tx_fifo_fifo_out_last, main_minsoc_uart_tx_fifo_fifo_out_first, main_minsoc_uart_tx_fifo_fifo_out_payload_data} = main_minsoc_uart_tx_fifo_syncfifo_dout; - assign main_minsoc_uart_tx_fifo_sink_ready = main_minsoc_uart_tx_fifo_syncfifo_writable; - assign main_minsoc_uart_tx_fifo_syncfifo_we = main_minsoc_uart_tx_fifo_sink_valid; - assign main_minsoc_uart_tx_fifo_fifo_in_first = main_minsoc_uart_tx_fifo_sink_first; - assign main_minsoc_uart_tx_fifo_fifo_in_last = main_minsoc_uart_tx_fifo_sink_last; - assign main_minsoc_uart_tx_fifo_fifo_in_payload_data = main_minsoc_uart_tx_fifo_sink_payload_data; - assign main_minsoc_uart_tx_fifo_source_valid = main_minsoc_uart_tx_fifo_readable; - assign main_minsoc_uart_tx_fifo_source_first = main_minsoc_uart_tx_fifo_fifo_out_first; - assign main_minsoc_uart_tx_fifo_source_last = main_minsoc_uart_tx_fifo_fifo_out_last; - assign main_minsoc_uart_tx_fifo_source_payload_data = main_minsoc_uart_tx_fifo_fifo_out_payload_data; - assign main_minsoc_uart_tx_fifo_re = main_minsoc_uart_tx_fifo_source_ready; - assign main_minsoc_uart_tx_fifo_syncfifo_re = (main_minsoc_uart_tx_fifo_syncfifo_readable & ((~main_minsoc_uart_tx_fifo_readable) | main_minsoc_uart_tx_fifo_re)); - assign main_minsoc_uart_tx_fifo_level1 = (main_minsoc_uart_tx_fifo_level0 + main_minsoc_uart_tx_fifo_readable); - always @(*) begin - main_minsoc_uart_tx_fifo_wrport_adr <= 4'd0; - if (main_minsoc_uart_tx_fifo_replace) begin - main_minsoc_uart_tx_fifo_wrport_adr <= (main_minsoc_uart_tx_fifo_produce - 1'd1); - end else begin - main_minsoc_uart_tx_fifo_wrport_adr <= main_minsoc_uart_tx_fifo_produce; - end - end - assign main_minsoc_uart_tx_fifo_wrport_dat_w = main_minsoc_uart_tx_fifo_syncfifo_din; - assign main_minsoc_uart_tx_fifo_wrport_we = (main_minsoc_uart_tx_fifo_syncfifo_we & (main_minsoc_uart_tx_fifo_syncfifo_writable | main_minsoc_uart_tx_fifo_replace)); - assign main_minsoc_uart_tx_fifo_do_read = (main_minsoc_uart_tx_fifo_syncfifo_readable & main_minsoc_uart_tx_fifo_syncfifo_re); - assign main_minsoc_uart_tx_fifo_rdport_adr = main_minsoc_uart_tx_fifo_consume; - assign main_minsoc_uart_tx_fifo_syncfifo_dout = main_minsoc_uart_tx_fifo_rdport_dat_r; - assign main_minsoc_uart_tx_fifo_rdport_re = main_minsoc_uart_tx_fifo_do_read; - assign main_minsoc_uart_tx_fifo_syncfifo_writable = (main_minsoc_uart_tx_fifo_level0 != 5'd16); - assign main_minsoc_uart_tx_fifo_syncfifo_readable = (main_minsoc_uart_tx_fifo_level0 != 1'd0); - assign main_minsoc_uart_rx_fifo_syncfifo_din = { - main_minsoc_uart_rx_fifo_fifo_in_last, - main_minsoc_uart_rx_fifo_fifo_in_first, - main_minsoc_uart_rx_fifo_fifo_in_payload_data - }; - assign {main_minsoc_uart_rx_fifo_fifo_out_last, main_minsoc_uart_rx_fifo_fifo_out_first, main_minsoc_uart_rx_fifo_fifo_out_payload_data} = main_minsoc_uart_rx_fifo_syncfifo_dout; - assign main_minsoc_uart_rx_fifo_sink_ready = main_minsoc_uart_rx_fifo_syncfifo_writable; - assign main_minsoc_uart_rx_fifo_syncfifo_we = main_minsoc_uart_rx_fifo_sink_valid; - assign main_minsoc_uart_rx_fifo_fifo_in_first = main_minsoc_uart_rx_fifo_sink_first; - assign main_minsoc_uart_rx_fifo_fifo_in_last = main_minsoc_uart_rx_fifo_sink_last; - assign main_minsoc_uart_rx_fifo_fifo_in_payload_data = main_minsoc_uart_rx_fifo_sink_payload_data; - assign main_minsoc_uart_rx_fifo_source_valid = main_minsoc_uart_rx_fifo_readable; - assign main_minsoc_uart_rx_fifo_source_first = main_minsoc_uart_rx_fifo_fifo_out_first; - assign main_minsoc_uart_rx_fifo_source_last = main_minsoc_uart_rx_fifo_fifo_out_last; - assign main_minsoc_uart_rx_fifo_source_payload_data = main_minsoc_uart_rx_fifo_fifo_out_payload_data; - assign main_minsoc_uart_rx_fifo_re = main_minsoc_uart_rx_fifo_source_ready; - assign main_minsoc_uart_rx_fifo_syncfifo_re = (main_minsoc_uart_rx_fifo_syncfifo_readable & ((~main_minsoc_uart_rx_fifo_readable) | main_minsoc_uart_rx_fifo_re)); - assign main_minsoc_uart_rx_fifo_level1 = (main_minsoc_uart_rx_fifo_level0 + main_minsoc_uart_rx_fifo_readable); - always @(*) begin - main_minsoc_uart_rx_fifo_wrport_adr <= 4'd0; - if (main_minsoc_uart_rx_fifo_replace) begin - main_minsoc_uart_rx_fifo_wrport_adr <= (main_minsoc_uart_rx_fifo_produce - 1'd1); - end else begin - main_minsoc_uart_rx_fifo_wrport_adr <= main_minsoc_uart_rx_fifo_produce; - end - end - assign main_minsoc_uart_rx_fifo_wrport_dat_w = main_minsoc_uart_rx_fifo_syncfifo_din; - assign main_minsoc_uart_rx_fifo_wrport_we = (main_minsoc_uart_rx_fifo_syncfifo_we & (main_minsoc_uart_rx_fifo_syncfifo_writable | main_minsoc_uart_rx_fifo_replace)); - assign main_minsoc_uart_rx_fifo_do_read = (main_minsoc_uart_rx_fifo_syncfifo_readable & main_minsoc_uart_rx_fifo_syncfifo_re); - assign main_minsoc_uart_rx_fifo_rdport_adr = main_minsoc_uart_rx_fifo_consume; - assign main_minsoc_uart_rx_fifo_syncfifo_dout = main_minsoc_uart_rx_fifo_rdport_dat_r; - assign main_minsoc_uart_rx_fifo_rdport_re = main_minsoc_uart_rx_fifo_do_read; - assign main_minsoc_uart_rx_fifo_syncfifo_writable = (main_minsoc_uart_rx_fifo_level0 != 5'd16); - assign main_minsoc_uart_rx_fifo_syncfifo_readable = (main_minsoc_uart_rx_fifo_level0 != 1'd0); - assign main_minsoc_timer0_zero_trigger = (main_minsoc_timer0_value != 1'd0); - assign main_minsoc_timer0_eventmanager_status_w = main_minsoc_timer0_zero_status; - always @(*) begin - main_minsoc_timer0_zero_clear <= 1'd0; - if ((main_minsoc_timer0_eventmanager_pending_re & main_minsoc_timer0_eventmanager_pending_r)) begin - main_minsoc_timer0_zero_clear <= 1'd1; - end - end - assign main_minsoc_timer0_eventmanager_pending_w = main_minsoc_timer0_zero_pending; - assign main_minsoc_timer0_irq = (main_minsoc_timer0_eventmanager_pending_w & main_minsoc_timer0_eventmanager_storage); - assign main_minsoc_timer0_zero_status = main_minsoc_timer0_zero_trigger; - assign main_minsoc_interface_dat_w = main_minsoc_bus_wishbone_dat_w; - assign main_minsoc_bus_wishbone_dat_r = main_minsoc_interface_dat_r; - always @(*) begin - main_minsoc_interface_adr <= 14'd0; - main_minsoc_interface_we <= 1'd0; - builder_wb2csr_next_state <= 1'd0; - main_minsoc_bus_wishbone_ack <= 1'd0; - builder_wb2csr_next_state <= builder_wb2csr_state; - case (builder_wb2csr_state) - 1'd1: begin - main_minsoc_bus_wishbone_ack <= 1'd1; - builder_wb2csr_next_state <= 1'd0; - end - default: begin - if ((main_minsoc_bus_wishbone_cyc & main_minsoc_bus_wishbone_stb)) begin - main_minsoc_interface_adr <= main_minsoc_bus_wishbone_adr; - main_minsoc_interface_we <= main_minsoc_bus_wishbone_we; - builder_wb2csr_next_state <= 1'd1; - end - end - endcase - end - assign main_reset = (~cpu_reset); - always @(*) begin - main_a7ddrphy_dqs_serdes_pattern <= 8'd85; - main_a7ddrphy_dqs_serdes_pattern <= 7'd85; - if ((main_a7ddrphy_dqs_preamble | main_a7ddrphy_dqs_postamble)) begin - main_a7ddrphy_dqs_serdes_pattern <= 1'd0; - end - end - assign main_a7ddrphy_bitslip0_i = main_a7ddrphy_dq_i_data0; - assign main_a7ddrphy_bitslip1_i = main_a7ddrphy_dq_i_data1; - assign main_a7ddrphy_bitslip2_i = main_a7ddrphy_dq_i_data2; - assign main_a7ddrphy_bitslip3_i = main_a7ddrphy_dq_i_data3; - assign main_a7ddrphy_bitslip4_i = main_a7ddrphy_dq_i_data4; - assign main_a7ddrphy_bitslip5_i = main_a7ddrphy_dq_i_data5; - assign main_a7ddrphy_bitslip6_i = main_a7ddrphy_dq_i_data6; - assign main_a7ddrphy_bitslip7_i = main_a7ddrphy_dq_i_data7; - assign main_a7ddrphy_bitslip8_i = main_a7ddrphy_dq_i_data8; - assign main_a7ddrphy_bitslip9_i = main_a7ddrphy_dq_i_data9; - assign main_a7ddrphy_bitslip10_i = main_a7ddrphy_dq_i_data10; - assign main_a7ddrphy_bitslip11_i = main_a7ddrphy_dq_i_data11; - assign main_a7ddrphy_bitslip12_i = main_a7ddrphy_dq_i_data12; - assign main_a7ddrphy_bitslip13_i = main_a7ddrphy_dq_i_data13; - assign main_a7ddrphy_bitslip14_i = main_a7ddrphy_dq_i_data14; - assign main_a7ddrphy_bitslip15_i = main_a7ddrphy_dq_i_data15; - always @(*) begin - main_a7ddrphy_dfi_p0_rddata <= 32'd0; - main_a7ddrphy_dfi_p0_rddata[0] <= main_a7ddrphy_bitslip0_o[0]; - main_a7ddrphy_dfi_p0_rddata[16] <= main_a7ddrphy_bitslip0_o[1]; - main_a7ddrphy_dfi_p0_rddata[1] <= main_a7ddrphy_bitslip1_o[0]; - main_a7ddrphy_dfi_p0_rddata[17] <= main_a7ddrphy_bitslip1_o[1]; - main_a7ddrphy_dfi_p0_rddata[2] <= main_a7ddrphy_bitslip2_o[0]; - main_a7ddrphy_dfi_p0_rddata[18] <= main_a7ddrphy_bitslip2_o[1]; - main_a7ddrphy_dfi_p0_rddata[3] <= main_a7ddrphy_bitslip3_o[0]; - main_a7ddrphy_dfi_p0_rddata[19] <= main_a7ddrphy_bitslip3_o[1]; - main_a7ddrphy_dfi_p0_rddata[4] <= main_a7ddrphy_bitslip4_o[0]; - main_a7ddrphy_dfi_p0_rddata[20] <= main_a7ddrphy_bitslip4_o[1]; - main_a7ddrphy_dfi_p0_rddata[5] <= main_a7ddrphy_bitslip5_o[0]; - main_a7ddrphy_dfi_p0_rddata[21] <= main_a7ddrphy_bitslip5_o[1]; - main_a7ddrphy_dfi_p0_rddata[6] <= main_a7ddrphy_bitslip6_o[0]; - main_a7ddrphy_dfi_p0_rddata[22] <= main_a7ddrphy_bitslip6_o[1]; - main_a7ddrphy_dfi_p0_rddata[7] <= main_a7ddrphy_bitslip7_o[0]; - main_a7ddrphy_dfi_p0_rddata[23] <= main_a7ddrphy_bitslip7_o[1]; - main_a7ddrphy_dfi_p0_rddata[8] <= main_a7ddrphy_bitslip8_o[0]; - main_a7ddrphy_dfi_p0_rddata[24] <= main_a7ddrphy_bitslip8_o[1]; - main_a7ddrphy_dfi_p0_rddata[9] <= main_a7ddrphy_bitslip9_o[0]; - main_a7ddrphy_dfi_p0_rddata[25] <= main_a7ddrphy_bitslip9_o[1]; - main_a7ddrphy_dfi_p0_rddata[10] <= main_a7ddrphy_bitslip10_o[0]; - main_a7ddrphy_dfi_p0_rddata[26] <= main_a7ddrphy_bitslip10_o[1]; - main_a7ddrphy_dfi_p0_rddata[11] <= main_a7ddrphy_bitslip11_o[0]; - main_a7ddrphy_dfi_p0_rddata[27] <= main_a7ddrphy_bitslip11_o[1]; - main_a7ddrphy_dfi_p0_rddata[12] <= main_a7ddrphy_bitslip12_o[0]; - main_a7ddrphy_dfi_p0_rddata[28] <= main_a7ddrphy_bitslip12_o[1]; - main_a7ddrphy_dfi_p0_rddata[13] <= main_a7ddrphy_bitslip13_o[0]; - main_a7ddrphy_dfi_p0_rddata[29] <= main_a7ddrphy_bitslip13_o[1]; - main_a7ddrphy_dfi_p0_rddata[14] <= main_a7ddrphy_bitslip14_o[0]; - main_a7ddrphy_dfi_p0_rddata[30] <= main_a7ddrphy_bitslip14_o[1]; - main_a7ddrphy_dfi_p0_rddata[15] <= main_a7ddrphy_bitslip15_o[0]; - main_a7ddrphy_dfi_p0_rddata[31] <= main_a7ddrphy_bitslip15_o[1]; - end - always @(*) begin - main_a7ddrphy_dfi_p1_rddata <= 32'd0; - main_a7ddrphy_dfi_p1_rddata[0] <= main_a7ddrphy_bitslip0_o[2]; - main_a7ddrphy_dfi_p1_rddata[16] <= main_a7ddrphy_bitslip0_o[3]; - main_a7ddrphy_dfi_p1_rddata[1] <= main_a7ddrphy_bitslip1_o[2]; - main_a7ddrphy_dfi_p1_rddata[17] <= main_a7ddrphy_bitslip1_o[3]; - main_a7ddrphy_dfi_p1_rddata[2] <= main_a7ddrphy_bitslip2_o[2]; - main_a7ddrphy_dfi_p1_rddata[18] <= main_a7ddrphy_bitslip2_o[3]; - main_a7ddrphy_dfi_p1_rddata[3] <= main_a7ddrphy_bitslip3_o[2]; - main_a7ddrphy_dfi_p1_rddata[19] <= main_a7ddrphy_bitslip3_o[3]; - main_a7ddrphy_dfi_p1_rddata[4] <= main_a7ddrphy_bitslip4_o[2]; - main_a7ddrphy_dfi_p1_rddata[20] <= main_a7ddrphy_bitslip4_o[3]; - main_a7ddrphy_dfi_p1_rddata[5] <= main_a7ddrphy_bitslip5_o[2]; - main_a7ddrphy_dfi_p1_rddata[21] <= main_a7ddrphy_bitslip5_o[3]; - main_a7ddrphy_dfi_p1_rddata[6] <= main_a7ddrphy_bitslip6_o[2]; - main_a7ddrphy_dfi_p1_rddata[22] <= main_a7ddrphy_bitslip6_o[3]; - main_a7ddrphy_dfi_p1_rddata[7] <= main_a7ddrphy_bitslip7_o[2]; - main_a7ddrphy_dfi_p1_rddata[23] <= main_a7ddrphy_bitslip7_o[3]; - main_a7ddrphy_dfi_p1_rddata[8] <= main_a7ddrphy_bitslip8_o[2]; - main_a7ddrphy_dfi_p1_rddata[24] <= main_a7ddrphy_bitslip8_o[3]; - main_a7ddrphy_dfi_p1_rddata[9] <= main_a7ddrphy_bitslip9_o[2]; - main_a7ddrphy_dfi_p1_rddata[25] <= main_a7ddrphy_bitslip9_o[3]; - main_a7ddrphy_dfi_p1_rddata[10] <= main_a7ddrphy_bitslip10_o[2]; - main_a7ddrphy_dfi_p1_rddata[26] <= main_a7ddrphy_bitslip10_o[3]; - main_a7ddrphy_dfi_p1_rddata[11] <= main_a7ddrphy_bitslip11_o[2]; - main_a7ddrphy_dfi_p1_rddata[27] <= main_a7ddrphy_bitslip11_o[3]; - main_a7ddrphy_dfi_p1_rddata[12] <= main_a7ddrphy_bitslip12_o[2]; - main_a7ddrphy_dfi_p1_rddata[28] <= main_a7ddrphy_bitslip12_o[3]; - main_a7ddrphy_dfi_p1_rddata[13] <= main_a7ddrphy_bitslip13_o[2]; - main_a7ddrphy_dfi_p1_rddata[29] <= main_a7ddrphy_bitslip13_o[3]; - main_a7ddrphy_dfi_p1_rddata[14] <= main_a7ddrphy_bitslip14_o[2]; - main_a7ddrphy_dfi_p1_rddata[30] <= main_a7ddrphy_bitslip14_o[3]; - main_a7ddrphy_dfi_p1_rddata[15] <= main_a7ddrphy_bitslip15_o[2]; - main_a7ddrphy_dfi_p1_rddata[31] <= main_a7ddrphy_bitslip15_o[3]; - end - always @(*) begin - main_a7ddrphy_dfi_p2_rddata <= 32'd0; - main_a7ddrphy_dfi_p2_rddata[0] <= main_a7ddrphy_bitslip0_o[4]; - main_a7ddrphy_dfi_p2_rddata[16] <= main_a7ddrphy_bitslip0_o[5]; - main_a7ddrphy_dfi_p2_rddata[1] <= main_a7ddrphy_bitslip1_o[4]; - main_a7ddrphy_dfi_p2_rddata[17] <= main_a7ddrphy_bitslip1_o[5]; - main_a7ddrphy_dfi_p2_rddata[2] <= main_a7ddrphy_bitslip2_o[4]; - main_a7ddrphy_dfi_p2_rddata[18] <= main_a7ddrphy_bitslip2_o[5]; - main_a7ddrphy_dfi_p2_rddata[3] <= main_a7ddrphy_bitslip3_o[4]; - main_a7ddrphy_dfi_p2_rddata[19] <= main_a7ddrphy_bitslip3_o[5]; - main_a7ddrphy_dfi_p2_rddata[4] <= main_a7ddrphy_bitslip4_o[4]; - main_a7ddrphy_dfi_p2_rddata[20] <= main_a7ddrphy_bitslip4_o[5]; - main_a7ddrphy_dfi_p2_rddata[5] <= main_a7ddrphy_bitslip5_o[4]; - main_a7ddrphy_dfi_p2_rddata[21] <= main_a7ddrphy_bitslip5_o[5]; - main_a7ddrphy_dfi_p2_rddata[6] <= main_a7ddrphy_bitslip6_o[4]; - main_a7ddrphy_dfi_p2_rddata[22] <= main_a7ddrphy_bitslip6_o[5]; - main_a7ddrphy_dfi_p2_rddata[7] <= main_a7ddrphy_bitslip7_o[4]; - main_a7ddrphy_dfi_p2_rddata[23] <= main_a7ddrphy_bitslip7_o[5]; - main_a7ddrphy_dfi_p2_rddata[8] <= main_a7ddrphy_bitslip8_o[4]; - main_a7ddrphy_dfi_p2_rddata[24] <= main_a7ddrphy_bitslip8_o[5]; - main_a7ddrphy_dfi_p2_rddata[9] <= main_a7ddrphy_bitslip9_o[4]; - main_a7ddrphy_dfi_p2_rddata[25] <= main_a7ddrphy_bitslip9_o[5]; - main_a7ddrphy_dfi_p2_rddata[10] <= main_a7ddrphy_bitslip10_o[4]; - main_a7ddrphy_dfi_p2_rddata[26] <= main_a7ddrphy_bitslip10_o[5]; - main_a7ddrphy_dfi_p2_rddata[11] <= main_a7ddrphy_bitslip11_o[4]; - main_a7ddrphy_dfi_p2_rddata[27] <= main_a7ddrphy_bitslip11_o[5]; - main_a7ddrphy_dfi_p2_rddata[12] <= main_a7ddrphy_bitslip12_o[4]; - main_a7ddrphy_dfi_p2_rddata[28] <= main_a7ddrphy_bitslip12_o[5]; - main_a7ddrphy_dfi_p2_rddata[13] <= main_a7ddrphy_bitslip13_o[4]; - main_a7ddrphy_dfi_p2_rddata[29] <= main_a7ddrphy_bitslip13_o[5]; - main_a7ddrphy_dfi_p2_rddata[14] <= main_a7ddrphy_bitslip14_o[4]; - main_a7ddrphy_dfi_p2_rddata[30] <= main_a7ddrphy_bitslip14_o[5]; - main_a7ddrphy_dfi_p2_rddata[15] <= main_a7ddrphy_bitslip15_o[4]; - main_a7ddrphy_dfi_p2_rddata[31] <= main_a7ddrphy_bitslip15_o[5]; - end - always @(*) begin - main_a7ddrphy_dfi_p3_rddata <= 32'd0; - main_a7ddrphy_dfi_p3_rddata[0] <= main_a7ddrphy_bitslip0_o[6]; - main_a7ddrphy_dfi_p3_rddata[16] <= main_a7ddrphy_bitslip0_o[7]; - main_a7ddrphy_dfi_p3_rddata[1] <= main_a7ddrphy_bitslip1_o[6]; - main_a7ddrphy_dfi_p3_rddata[17] <= main_a7ddrphy_bitslip1_o[7]; - main_a7ddrphy_dfi_p3_rddata[2] <= main_a7ddrphy_bitslip2_o[6]; - main_a7ddrphy_dfi_p3_rddata[18] <= main_a7ddrphy_bitslip2_o[7]; - main_a7ddrphy_dfi_p3_rddata[3] <= main_a7ddrphy_bitslip3_o[6]; - main_a7ddrphy_dfi_p3_rddata[19] <= main_a7ddrphy_bitslip3_o[7]; - main_a7ddrphy_dfi_p3_rddata[4] <= main_a7ddrphy_bitslip4_o[6]; - main_a7ddrphy_dfi_p3_rddata[20] <= main_a7ddrphy_bitslip4_o[7]; - main_a7ddrphy_dfi_p3_rddata[5] <= main_a7ddrphy_bitslip5_o[6]; - main_a7ddrphy_dfi_p3_rddata[21] <= main_a7ddrphy_bitslip5_o[7]; - main_a7ddrphy_dfi_p3_rddata[6] <= main_a7ddrphy_bitslip6_o[6]; - main_a7ddrphy_dfi_p3_rddata[22] <= main_a7ddrphy_bitslip6_o[7]; - main_a7ddrphy_dfi_p3_rddata[7] <= main_a7ddrphy_bitslip7_o[6]; - main_a7ddrphy_dfi_p3_rddata[23] <= main_a7ddrphy_bitslip7_o[7]; - main_a7ddrphy_dfi_p3_rddata[8] <= main_a7ddrphy_bitslip8_o[6]; - main_a7ddrphy_dfi_p3_rddata[24] <= main_a7ddrphy_bitslip8_o[7]; - main_a7ddrphy_dfi_p3_rddata[9] <= main_a7ddrphy_bitslip9_o[6]; - main_a7ddrphy_dfi_p3_rddata[25] <= main_a7ddrphy_bitslip9_o[7]; - main_a7ddrphy_dfi_p3_rddata[10] <= main_a7ddrphy_bitslip10_o[6]; - main_a7ddrphy_dfi_p3_rddata[26] <= main_a7ddrphy_bitslip10_o[7]; - main_a7ddrphy_dfi_p3_rddata[11] <= main_a7ddrphy_bitslip11_o[6]; - main_a7ddrphy_dfi_p3_rddata[27] <= main_a7ddrphy_bitslip11_o[7]; - main_a7ddrphy_dfi_p3_rddata[12] <= main_a7ddrphy_bitslip12_o[6]; - main_a7ddrphy_dfi_p3_rddata[28] <= main_a7ddrphy_bitslip12_o[7]; - main_a7ddrphy_dfi_p3_rddata[13] <= main_a7ddrphy_bitslip13_o[6]; - main_a7ddrphy_dfi_p3_rddata[29] <= main_a7ddrphy_bitslip13_o[7]; - main_a7ddrphy_dfi_p3_rddata[14] <= main_a7ddrphy_bitslip14_o[6]; - main_a7ddrphy_dfi_p3_rddata[30] <= main_a7ddrphy_bitslip14_o[7]; - main_a7ddrphy_dfi_p3_rddata[15] <= main_a7ddrphy_bitslip15_o[6]; - main_a7ddrphy_dfi_p3_rddata[31] <= main_a7ddrphy_bitslip15_o[7]; - end - assign main_a7ddrphy_oe = ((main_a7ddrphy_last_wrdata_en[1] | main_a7ddrphy_last_wrdata_en[2]) | main_a7ddrphy_last_wrdata_en[3]); - assign main_a7ddrphy_dqs_preamble = (main_a7ddrphy_last_wrdata_en[1] & (~main_a7ddrphy_last_wrdata_en[2])); - assign main_a7ddrphy_dqs_postamble = (main_a7ddrphy_last_wrdata_en[3] & (~main_a7ddrphy_last_wrdata_en[2])); - assign main_a7ddrphy_dfi_p0_address = main_sdram_master_p0_address; - assign main_a7ddrphy_dfi_p0_bank = main_sdram_master_p0_bank; - assign main_a7ddrphy_dfi_p0_cas_n = main_sdram_master_p0_cas_n; - assign main_a7ddrphy_dfi_p0_cs_n = main_sdram_master_p0_cs_n; - assign main_a7ddrphy_dfi_p0_ras_n = main_sdram_master_p0_ras_n; - assign main_a7ddrphy_dfi_p0_we_n = main_sdram_master_p0_we_n; - assign main_a7ddrphy_dfi_p0_cke = main_sdram_master_p0_cke; - assign main_a7ddrphy_dfi_p0_odt = main_sdram_master_p0_odt; - assign main_a7ddrphy_dfi_p0_reset_n = main_sdram_master_p0_reset_n; - assign main_a7ddrphy_dfi_p0_act_n = main_sdram_master_p0_act_n; - assign main_a7ddrphy_dfi_p0_wrdata = main_sdram_master_p0_wrdata; - assign main_a7ddrphy_dfi_p0_wrdata_en = main_sdram_master_p0_wrdata_en; - assign main_a7ddrphy_dfi_p0_wrdata_mask = main_sdram_master_p0_wrdata_mask; - assign main_a7ddrphy_dfi_p0_rddata_en = main_sdram_master_p0_rddata_en; - assign main_sdram_master_p0_rddata = main_a7ddrphy_dfi_p0_rddata; - assign main_sdram_master_p0_rddata_valid = main_a7ddrphy_dfi_p0_rddata_valid; - assign main_a7ddrphy_dfi_p1_address = main_sdram_master_p1_address; - assign main_a7ddrphy_dfi_p1_bank = main_sdram_master_p1_bank; - assign main_a7ddrphy_dfi_p1_cas_n = main_sdram_master_p1_cas_n; - assign main_a7ddrphy_dfi_p1_cs_n = main_sdram_master_p1_cs_n; - assign main_a7ddrphy_dfi_p1_ras_n = main_sdram_master_p1_ras_n; - assign main_a7ddrphy_dfi_p1_we_n = main_sdram_master_p1_we_n; - assign main_a7ddrphy_dfi_p1_cke = main_sdram_master_p1_cke; - assign main_a7ddrphy_dfi_p1_odt = main_sdram_master_p1_odt; - assign main_a7ddrphy_dfi_p1_reset_n = main_sdram_master_p1_reset_n; - assign main_a7ddrphy_dfi_p1_act_n = main_sdram_master_p1_act_n; - assign main_a7ddrphy_dfi_p1_wrdata = main_sdram_master_p1_wrdata; - assign main_a7ddrphy_dfi_p1_wrdata_en = main_sdram_master_p1_wrdata_en; - assign main_a7ddrphy_dfi_p1_wrdata_mask = main_sdram_master_p1_wrdata_mask; - assign main_a7ddrphy_dfi_p1_rddata_en = main_sdram_master_p1_rddata_en; - assign main_sdram_master_p1_rddata = main_a7ddrphy_dfi_p1_rddata; - assign main_sdram_master_p1_rddata_valid = main_a7ddrphy_dfi_p1_rddata_valid; - assign main_a7ddrphy_dfi_p2_address = main_sdram_master_p2_address; - assign main_a7ddrphy_dfi_p2_bank = main_sdram_master_p2_bank; - assign main_a7ddrphy_dfi_p2_cas_n = main_sdram_master_p2_cas_n; - assign main_a7ddrphy_dfi_p2_cs_n = main_sdram_master_p2_cs_n; - assign main_a7ddrphy_dfi_p2_ras_n = main_sdram_master_p2_ras_n; - assign main_a7ddrphy_dfi_p2_we_n = main_sdram_master_p2_we_n; - assign main_a7ddrphy_dfi_p2_cke = main_sdram_master_p2_cke; - assign main_a7ddrphy_dfi_p2_odt = main_sdram_master_p2_odt; - assign main_a7ddrphy_dfi_p2_reset_n = main_sdram_master_p2_reset_n; - assign main_a7ddrphy_dfi_p2_act_n = main_sdram_master_p2_act_n; - assign main_a7ddrphy_dfi_p2_wrdata = main_sdram_master_p2_wrdata; - assign main_a7ddrphy_dfi_p2_wrdata_en = main_sdram_master_p2_wrdata_en; - assign main_a7ddrphy_dfi_p2_wrdata_mask = main_sdram_master_p2_wrdata_mask; - assign main_a7ddrphy_dfi_p2_rddata_en = main_sdram_master_p2_rddata_en; - assign main_sdram_master_p2_rddata = main_a7ddrphy_dfi_p2_rddata; - assign main_sdram_master_p2_rddata_valid = main_a7ddrphy_dfi_p2_rddata_valid; - assign main_a7ddrphy_dfi_p3_address = main_sdram_master_p3_address; - assign main_a7ddrphy_dfi_p3_bank = main_sdram_master_p3_bank; - assign main_a7ddrphy_dfi_p3_cas_n = main_sdram_master_p3_cas_n; - assign main_a7ddrphy_dfi_p3_cs_n = main_sdram_master_p3_cs_n; - assign main_a7ddrphy_dfi_p3_ras_n = main_sdram_master_p3_ras_n; - assign main_a7ddrphy_dfi_p3_we_n = main_sdram_master_p3_we_n; - assign main_a7ddrphy_dfi_p3_cke = main_sdram_master_p3_cke; - assign main_a7ddrphy_dfi_p3_odt = main_sdram_master_p3_odt; - assign main_a7ddrphy_dfi_p3_reset_n = main_sdram_master_p3_reset_n; - assign main_a7ddrphy_dfi_p3_act_n = main_sdram_master_p3_act_n; - assign main_a7ddrphy_dfi_p3_wrdata = main_sdram_master_p3_wrdata; - assign main_a7ddrphy_dfi_p3_wrdata_en = main_sdram_master_p3_wrdata_en; - assign main_a7ddrphy_dfi_p3_wrdata_mask = main_sdram_master_p3_wrdata_mask; - assign main_a7ddrphy_dfi_p3_rddata_en = main_sdram_master_p3_rddata_en; - assign main_sdram_master_p3_rddata = main_a7ddrphy_dfi_p3_rddata; - assign main_sdram_master_p3_rddata_valid = main_a7ddrphy_dfi_p3_rddata_valid; - assign main_sdram_slave_p0_address = main_sdram_dfi_p0_address; - assign main_sdram_slave_p0_bank = main_sdram_dfi_p0_bank; - assign main_sdram_slave_p0_cas_n = main_sdram_dfi_p0_cas_n; - assign main_sdram_slave_p0_cs_n = main_sdram_dfi_p0_cs_n; - assign main_sdram_slave_p0_ras_n = main_sdram_dfi_p0_ras_n; - assign main_sdram_slave_p0_we_n = main_sdram_dfi_p0_we_n; - assign main_sdram_slave_p0_cke = main_sdram_dfi_p0_cke; - assign main_sdram_slave_p0_odt = main_sdram_dfi_p0_odt; - assign main_sdram_slave_p0_reset_n = main_sdram_dfi_p0_reset_n; - assign main_sdram_slave_p0_act_n = main_sdram_dfi_p0_act_n; - assign main_sdram_slave_p0_wrdata = main_sdram_dfi_p0_wrdata; - assign main_sdram_slave_p0_wrdata_en = main_sdram_dfi_p0_wrdata_en; - assign main_sdram_slave_p0_wrdata_mask = main_sdram_dfi_p0_wrdata_mask; - assign main_sdram_slave_p0_rddata_en = main_sdram_dfi_p0_rddata_en; - assign main_sdram_dfi_p0_rddata = main_sdram_slave_p0_rddata; - assign main_sdram_dfi_p0_rddata_valid = main_sdram_slave_p0_rddata_valid; - assign main_sdram_slave_p1_address = main_sdram_dfi_p1_address; - assign main_sdram_slave_p1_bank = main_sdram_dfi_p1_bank; - assign main_sdram_slave_p1_cas_n = main_sdram_dfi_p1_cas_n; - assign main_sdram_slave_p1_cs_n = main_sdram_dfi_p1_cs_n; - assign main_sdram_slave_p1_ras_n = main_sdram_dfi_p1_ras_n; - assign main_sdram_slave_p1_we_n = main_sdram_dfi_p1_we_n; - assign main_sdram_slave_p1_cke = main_sdram_dfi_p1_cke; - assign main_sdram_slave_p1_odt = main_sdram_dfi_p1_odt; - assign main_sdram_slave_p1_reset_n = main_sdram_dfi_p1_reset_n; - assign main_sdram_slave_p1_act_n = main_sdram_dfi_p1_act_n; - assign main_sdram_slave_p1_wrdata = main_sdram_dfi_p1_wrdata; - assign main_sdram_slave_p1_wrdata_en = main_sdram_dfi_p1_wrdata_en; - assign main_sdram_slave_p1_wrdata_mask = main_sdram_dfi_p1_wrdata_mask; - assign main_sdram_slave_p1_rddata_en = main_sdram_dfi_p1_rddata_en; - assign main_sdram_dfi_p1_rddata = main_sdram_slave_p1_rddata; - assign main_sdram_dfi_p1_rddata_valid = main_sdram_slave_p1_rddata_valid; - assign main_sdram_slave_p2_address = main_sdram_dfi_p2_address; - assign main_sdram_slave_p2_bank = main_sdram_dfi_p2_bank; - assign main_sdram_slave_p2_cas_n = main_sdram_dfi_p2_cas_n; - assign main_sdram_slave_p2_cs_n = main_sdram_dfi_p2_cs_n; - assign main_sdram_slave_p2_ras_n = main_sdram_dfi_p2_ras_n; - assign main_sdram_slave_p2_we_n = main_sdram_dfi_p2_we_n; - assign main_sdram_slave_p2_cke = main_sdram_dfi_p2_cke; - assign main_sdram_slave_p2_odt = main_sdram_dfi_p2_odt; - assign main_sdram_slave_p2_reset_n = main_sdram_dfi_p2_reset_n; - assign main_sdram_slave_p2_act_n = main_sdram_dfi_p2_act_n; - assign main_sdram_slave_p2_wrdata = main_sdram_dfi_p2_wrdata; - assign main_sdram_slave_p2_wrdata_en = main_sdram_dfi_p2_wrdata_en; - assign main_sdram_slave_p2_wrdata_mask = main_sdram_dfi_p2_wrdata_mask; - assign main_sdram_slave_p2_rddata_en = main_sdram_dfi_p2_rddata_en; - assign main_sdram_dfi_p2_rddata = main_sdram_slave_p2_rddata; - assign main_sdram_dfi_p2_rddata_valid = main_sdram_slave_p2_rddata_valid; - assign main_sdram_slave_p3_address = main_sdram_dfi_p3_address; - assign main_sdram_slave_p3_bank = main_sdram_dfi_p3_bank; - assign main_sdram_slave_p3_cas_n = main_sdram_dfi_p3_cas_n; - assign main_sdram_slave_p3_cs_n = main_sdram_dfi_p3_cs_n; - assign main_sdram_slave_p3_ras_n = main_sdram_dfi_p3_ras_n; - assign main_sdram_slave_p3_we_n = main_sdram_dfi_p3_we_n; - assign main_sdram_slave_p3_cke = main_sdram_dfi_p3_cke; - assign main_sdram_slave_p3_odt = main_sdram_dfi_p3_odt; - assign main_sdram_slave_p3_reset_n = main_sdram_dfi_p3_reset_n; - assign main_sdram_slave_p3_act_n = main_sdram_dfi_p3_act_n; - assign main_sdram_slave_p3_wrdata = main_sdram_dfi_p3_wrdata; - assign main_sdram_slave_p3_wrdata_en = main_sdram_dfi_p3_wrdata_en; - assign main_sdram_slave_p3_wrdata_mask = main_sdram_dfi_p3_wrdata_mask; - assign main_sdram_slave_p3_rddata_en = main_sdram_dfi_p3_rddata_en; - assign main_sdram_dfi_p3_rddata = main_sdram_slave_p3_rddata; - assign main_sdram_dfi_p3_rddata_valid = main_sdram_slave_p3_rddata_valid; - always @(*) begin - main_sdram_slave_p1_rddata <= 32'd0; - main_sdram_slave_p1_rddata_valid <= 1'd0; - main_sdram_slave_p2_rddata <= 32'd0; - main_sdram_slave_p2_rddata_valid <= 1'd0; - main_sdram_slave_p3_rddata <= 32'd0; - main_sdram_slave_p3_rddata_valid <= 1'd0; - main_sdram_inti_p0_rddata <= 32'd0; - main_sdram_inti_p0_rddata_valid <= 1'd0; - main_sdram_master_p0_address <= 14'd0; - main_sdram_master_p0_bank <= 3'd0; - main_sdram_master_p0_cas_n <= 1'd1; - main_sdram_master_p0_cs_n <= 1'd1; - main_sdram_master_p0_ras_n <= 1'd1; - main_sdram_master_p0_we_n <= 1'd1; - main_sdram_master_p0_cke <= 1'd0; - main_sdram_master_p0_odt <= 1'd0; - main_sdram_master_p0_reset_n <= 1'd0; - main_sdram_master_p0_act_n <= 1'd1; - main_sdram_inti_p1_rddata <= 32'd0; - main_sdram_master_p0_wrdata <= 32'd0; - main_sdram_inti_p1_rddata_valid <= 1'd0; - main_sdram_master_p0_wrdata_en <= 1'd0; - main_sdram_master_p0_wrdata_mask <= 4'd0; - main_sdram_master_p0_rddata_en <= 1'd0; - main_sdram_master_p1_address <= 14'd0; - main_sdram_master_p1_bank <= 3'd0; - main_sdram_master_p1_cas_n <= 1'd1; - main_sdram_master_p1_cs_n <= 1'd1; - main_sdram_master_p1_ras_n <= 1'd1; - main_sdram_master_p1_we_n <= 1'd1; - main_sdram_master_p1_cke <= 1'd0; - main_sdram_master_p1_odt <= 1'd0; - main_sdram_master_p1_reset_n <= 1'd0; - main_sdram_master_p1_act_n <= 1'd1; - main_sdram_master_p1_wrdata <= 32'd0; - main_sdram_inti_p2_rddata <= 32'd0; - main_sdram_master_p1_wrdata_en <= 1'd0; - main_sdram_inti_p2_rddata_valid <= 1'd0; - main_sdram_master_p1_wrdata_mask <= 4'd0; - main_sdram_master_p1_rddata_en <= 1'd0; - main_sdram_master_p2_address <= 14'd0; - main_sdram_master_p2_bank <= 3'd0; - main_sdram_master_p2_cas_n <= 1'd1; - main_sdram_master_p2_cs_n <= 1'd1; - main_sdram_master_p2_ras_n <= 1'd1; - main_sdram_master_p2_we_n <= 1'd1; - main_sdram_master_p2_cke <= 1'd0; - main_sdram_master_p2_odt <= 1'd0; - main_sdram_master_p2_reset_n <= 1'd0; - main_sdram_master_p2_act_n <= 1'd1; - main_sdram_master_p2_wrdata <= 32'd0; - main_sdram_inti_p3_rddata <= 32'd0; - main_sdram_master_p2_wrdata_en <= 1'd0; - main_sdram_inti_p3_rddata_valid <= 1'd0; - main_sdram_master_p2_wrdata_mask <= 4'd0; - main_sdram_master_p2_rddata_en <= 1'd0; - main_sdram_master_p3_address <= 14'd0; - main_sdram_master_p3_bank <= 3'd0; - main_sdram_master_p3_cas_n <= 1'd1; - main_sdram_master_p3_cs_n <= 1'd1; - main_sdram_master_p3_ras_n <= 1'd1; - main_sdram_master_p3_we_n <= 1'd1; - main_sdram_master_p3_cke <= 1'd0; - main_sdram_master_p3_odt <= 1'd0; - main_sdram_master_p3_reset_n <= 1'd0; - main_sdram_master_p3_act_n <= 1'd1; - main_sdram_master_p3_wrdata <= 32'd0; - main_sdram_master_p3_wrdata_en <= 1'd0; - main_sdram_master_p3_wrdata_mask <= 4'd0; - main_sdram_master_p3_rddata_en <= 1'd0; - main_sdram_slave_p0_rddata <= 32'd0; - main_sdram_slave_p0_rddata_valid <= 1'd0; - if (main_sdram_storage[0]) begin - main_sdram_master_p0_address <= main_sdram_slave_p0_address; - main_sdram_master_p0_bank <= main_sdram_slave_p0_bank; - main_sdram_master_p0_cas_n <= main_sdram_slave_p0_cas_n; - main_sdram_master_p0_cs_n <= main_sdram_slave_p0_cs_n; - main_sdram_master_p0_ras_n <= main_sdram_slave_p0_ras_n; - main_sdram_master_p0_we_n <= main_sdram_slave_p0_we_n; - main_sdram_master_p0_cke <= main_sdram_slave_p0_cke; - main_sdram_master_p0_odt <= main_sdram_slave_p0_odt; - main_sdram_master_p0_reset_n <= main_sdram_slave_p0_reset_n; - main_sdram_master_p0_act_n <= main_sdram_slave_p0_act_n; - main_sdram_master_p0_wrdata <= main_sdram_slave_p0_wrdata; - main_sdram_master_p0_wrdata_en <= main_sdram_slave_p0_wrdata_en; - main_sdram_master_p0_wrdata_mask <= main_sdram_slave_p0_wrdata_mask; - main_sdram_master_p0_rddata_en <= main_sdram_slave_p0_rddata_en; - main_sdram_slave_p0_rddata <= main_sdram_master_p0_rddata; - main_sdram_slave_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; - main_sdram_master_p1_address <= main_sdram_slave_p1_address; - main_sdram_master_p1_bank <= main_sdram_slave_p1_bank; - main_sdram_master_p1_cas_n <= main_sdram_slave_p1_cas_n; - main_sdram_master_p1_cs_n <= main_sdram_slave_p1_cs_n; - main_sdram_master_p1_ras_n <= main_sdram_slave_p1_ras_n; - main_sdram_master_p1_we_n <= main_sdram_slave_p1_we_n; - main_sdram_master_p1_cke <= main_sdram_slave_p1_cke; - main_sdram_master_p1_odt <= main_sdram_slave_p1_odt; - main_sdram_master_p1_reset_n <= main_sdram_slave_p1_reset_n; - main_sdram_master_p1_act_n <= main_sdram_slave_p1_act_n; - main_sdram_master_p1_wrdata <= main_sdram_slave_p1_wrdata; - main_sdram_master_p1_wrdata_en <= main_sdram_slave_p1_wrdata_en; - main_sdram_master_p1_wrdata_mask <= main_sdram_slave_p1_wrdata_mask; - main_sdram_master_p1_rddata_en <= main_sdram_slave_p1_rddata_en; - main_sdram_slave_p1_rddata <= main_sdram_master_p1_rddata; - main_sdram_slave_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; - main_sdram_master_p2_address <= main_sdram_slave_p2_address; - main_sdram_master_p2_bank <= main_sdram_slave_p2_bank; - main_sdram_master_p2_cas_n <= main_sdram_slave_p2_cas_n; - main_sdram_master_p2_cs_n <= main_sdram_slave_p2_cs_n; - main_sdram_master_p2_ras_n <= main_sdram_slave_p2_ras_n; - main_sdram_master_p2_we_n <= main_sdram_slave_p2_we_n; - main_sdram_master_p2_cke <= main_sdram_slave_p2_cke; - main_sdram_master_p2_odt <= main_sdram_slave_p2_odt; - main_sdram_master_p2_reset_n <= main_sdram_slave_p2_reset_n; - main_sdram_master_p2_act_n <= main_sdram_slave_p2_act_n; - main_sdram_master_p2_wrdata <= main_sdram_slave_p2_wrdata; - main_sdram_master_p2_wrdata_en <= main_sdram_slave_p2_wrdata_en; - main_sdram_master_p2_wrdata_mask <= main_sdram_slave_p2_wrdata_mask; - main_sdram_master_p2_rddata_en <= main_sdram_slave_p2_rddata_en; - main_sdram_slave_p2_rddata <= main_sdram_master_p2_rddata; - main_sdram_slave_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; - main_sdram_master_p3_address <= main_sdram_slave_p3_address; - main_sdram_master_p3_bank <= main_sdram_slave_p3_bank; - main_sdram_master_p3_cas_n <= main_sdram_slave_p3_cas_n; - main_sdram_master_p3_cs_n <= main_sdram_slave_p3_cs_n; - main_sdram_master_p3_ras_n <= main_sdram_slave_p3_ras_n; - main_sdram_master_p3_we_n <= main_sdram_slave_p3_we_n; - main_sdram_master_p3_cke <= main_sdram_slave_p3_cke; - main_sdram_master_p3_odt <= main_sdram_slave_p3_odt; - main_sdram_master_p3_reset_n <= main_sdram_slave_p3_reset_n; - main_sdram_master_p3_act_n <= main_sdram_slave_p3_act_n; - main_sdram_master_p3_wrdata <= main_sdram_slave_p3_wrdata; - main_sdram_master_p3_wrdata_en <= main_sdram_slave_p3_wrdata_en; - main_sdram_master_p3_wrdata_mask <= main_sdram_slave_p3_wrdata_mask; - main_sdram_master_p3_rddata_en <= main_sdram_slave_p3_rddata_en; - main_sdram_slave_p3_rddata <= main_sdram_master_p3_rddata; - main_sdram_slave_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; - end else begin - main_sdram_master_p0_address <= main_sdram_inti_p0_address; - main_sdram_master_p0_bank <= main_sdram_inti_p0_bank; - main_sdram_master_p0_cas_n <= main_sdram_inti_p0_cas_n; - main_sdram_master_p0_cs_n <= main_sdram_inti_p0_cs_n; - main_sdram_master_p0_ras_n <= main_sdram_inti_p0_ras_n; - main_sdram_master_p0_we_n <= main_sdram_inti_p0_we_n; - main_sdram_master_p0_cke <= main_sdram_inti_p0_cke; - main_sdram_master_p0_odt <= main_sdram_inti_p0_odt; - main_sdram_master_p0_reset_n <= main_sdram_inti_p0_reset_n; - main_sdram_master_p0_act_n <= main_sdram_inti_p0_act_n; - main_sdram_master_p0_wrdata <= main_sdram_inti_p0_wrdata; - main_sdram_master_p0_wrdata_en <= main_sdram_inti_p0_wrdata_en; - main_sdram_master_p0_wrdata_mask <= main_sdram_inti_p0_wrdata_mask; - main_sdram_master_p0_rddata_en <= main_sdram_inti_p0_rddata_en; - main_sdram_inti_p0_rddata <= main_sdram_master_p0_rddata; - main_sdram_inti_p0_rddata_valid <= main_sdram_master_p0_rddata_valid; - main_sdram_master_p1_address <= main_sdram_inti_p1_address; - main_sdram_master_p1_bank <= main_sdram_inti_p1_bank; - main_sdram_master_p1_cas_n <= main_sdram_inti_p1_cas_n; - main_sdram_master_p1_cs_n <= main_sdram_inti_p1_cs_n; - main_sdram_master_p1_ras_n <= main_sdram_inti_p1_ras_n; - main_sdram_master_p1_we_n <= main_sdram_inti_p1_we_n; - main_sdram_master_p1_cke <= main_sdram_inti_p1_cke; - main_sdram_master_p1_odt <= main_sdram_inti_p1_odt; - main_sdram_master_p1_reset_n <= main_sdram_inti_p1_reset_n; - main_sdram_master_p1_act_n <= main_sdram_inti_p1_act_n; - main_sdram_master_p1_wrdata <= main_sdram_inti_p1_wrdata; - main_sdram_master_p1_wrdata_en <= main_sdram_inti_p1_wrdata_en; - main_sdram_master_p1_wrdata_mask <= main_sdram_inti_p1_wrdata_mask; - main_sdram_master_p1_rddata_en <= main_sdram_inti_p1_rddata_en; - main_sdram_inti_p1_rddata <= main_sdram_master_p1_rddata; - main_sdram_inti_p1_rddata_valid <= main_sdram_master_p1_rddata_valid; - main_sdram_master_p2_address <= main_sdram_inti_p2_address; - main_sdram_master_p2_bank <= main_sdram_inti_p2_bank; - main_sdram_master_p2_cas_n <= main_sdram_inti_p2_cas_n; - main_sdram_master_p2_cs_n <= main_sdram_inti_p2_cs_n; - main_sdram_master_p2_ras_n <= main_sdram_inti_p2_ras_n; - main_sdram_master_p2_we_n <= main_sdram_inti_p2_we_n; - main_sdram_master_p2_cke <= main_sdram_inti_p2_cke; - main_sdram_master_p2_odt <= main_sdram_inti_p2_odt; - main_sdram_master_p2_reset_n <= main_sdram_inti_p2_reset_n; - main_sdram_master_p2_act_n <= main_sdram_inti_p2_act_n; - main_sdram_master_p2_wrdata <= main_sdram_inti_p2_wrdata; - main_sdram_master_p2_wrdata_en <= main_sdram_inti_p2_wrdata_en; - main_sdram_master_p2_wrdata_mask <= main_sdram_inti_p2_wrdata_mask; - main_sdram_master_p2_rddata_en <= main_sdram_inti_p2_rddata_en; - main_sdram_inti_p2_rddata <= main_sdram_master_p2_rddata; - main_sdram_inti_p2_rddata_valid <= main_sdram_master_p2_rddata_valid; - main_sdram_master_p3_address <= main_sdram_inti_p3_address; - main_sdram_master_p3_bank <= main_sdram_inti_p3_bank; - main_sdram_master_p3_cas_n <= main_sdram_inti_p3_cas_n; - main_sdram_master_p3_cs_n <= main_sdram_inti_p3_cs_n; - main_sdram_master_p3_ras_n <= main_sdram_inti_p3_ras_n; - main_sdram_master_p3_we_n <= main_sdram_inti_p3_we_n; - main_sdram_master_p3_cke <= main_sdram_inti_p3_cke; - main_sdram_master_p3_odt <= main_sdram_inti_p3_odt; - main_sdram_master_p3_reset_n <= main_sdram_inti_p3_reset_n; - main_sdram_master_p3_act_n <= main_sdram_inti_p3_act_n; - main_sdram_master_p3_wrdata <= main_sdram_inti_p3_wrdata; - main_sdram_master_p3_wrdata_en <= main_sdram_inti_p3_wrdata_en; - main_sdram_master_p3_wrdata_mask <= main_sdram_inti_p3_wrdata_mask; - main_sdram_master_p3_rddata_en <= main_sdram_inti_p3_rddata_en; - main_sdram_inti_p3_rddata <= main_sdram_master_p3_rddata; - main_sdram_inti_p3_rddata_valid <= main_sdram_master_p3_rddata_valid; - end - end - assign main_sdram_inti_p0_cke = main_sdram_storage[1]; - assign main_sdram_inti_p1_cke = main_sdram_storage[1]; - assign main_sdram_inti_p2_cke = main_sdram_storage[1]; - assign main_sdram_inti_p3_cke = main_sdram_storage[1]; - assign main_sdram_inti_p0_odt = main_sdram_storage[2]; - assign main_sdram_inti_p1_odt = main_sdram_storage[2]; - assign main_sdram_inti_p2_odt = main_sdram_storage[2]; - assign main_sdram_inti_p3_odt = main_sdram_storage[2]; - assign main_sdram_inti_p0_reset_n = main_sdram_storage[3]; - assign main_sdram_inti_p1_reset_n = main_sdram_storage[3]; - assign main_sdram_inti_p2_reset_n = main_sdram_storage[3]; - assign main_sdram_inti_p3_reset_n = main_sdram_storage[3]; - always @(*) begin - main_sdram_inti_p0_we_n <= 1'd1; - main_sdram_inti_p0_cas_n <= 1'd1; - main_sdram_inti_p0_cs_n <= 1'd1; - main_sdram_inti_p0_ras_n <= 1'd1; - if (main_sdram_phaseinjector0_command_issue_re) begin - main_sdram_inti_p0_cs_n <= {1{(~main_sdram_phaseinjector0_command_storage[0])}}; - main_sdram_inti_p0_we_n <= (~main_sdram_phaseinjector0_command_storage[1]); - main_sdram_inti_p0_cas_n <= (~main_sdram_phaseinjector0_command_storage[2]); - main_sdram_inti_p0_ras_n <= (~main_sdram_phaseinjector0_command_storage[3]); - end else begin - main_sdram_inti_p0_cs_n <= {1{1'd1}}; - main_sdram_inti_p0_we_n <= 1'd1; - main_sdram_inti_p0_cas_n <= 1'd1; - main_sdram_inti_p0_ras_n <= 1'd1; - end - end - assign main_sdram_inti_p0_address = main_sdram_phaseinjector0_address_storage; - assign main_sdram_inti_p0_bank = main_sdram_phaseinjector0_baddress_storage; - assign main_sdram_inti_p0_wrdata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[4]); - assign main_sdram_inti_p0_rddata_en = (main_sdram_phaseinjector0_command_issue_re & main_sdram_phaseinjector0_command_storage[5]); - assign main_sdram_inti_p0_wrdata = main_sdram_phaseinjector0_wrdata_storage; - assign main_sdram_inti_p0_wrdata_mask = 1'd0; - always @(*) begin - main_sdram_inti_p1_we_n <= 1'd1; - main_sdram_inti_p1_cas_n <= 1'd1; - main_sdram_inti_p1_cs_n <= 1'd1; - main_sdram_inti_p1_ras_n <= 1'd1; - if (main_sdram_phaseinjector1_command_issue_re) begin - main_sdram_inti_p1_cs_n <= {1{(~main_sdram_phaseinjector1_command_storage[0])}}; - main_sdram_inti_p1_we_n <= (~main_sdram_phaseinjector1_command_storage[1]); - main_sdram_inti_p1_cas_n <= (~main_sdram_phaseinjector1_command_storage[2]); - main_sdram_inti_p1_ras_n <= (~main_sdram_phaseinjector1_command_storage[3]); - end else begin - main_sdram_inti_p1_cs_n <= {1{1'd1}}; - main_sdram_inti_p1_we_n <= 1'd1; - main_sdram_inti_p1_cas_n <= 1'd1; - main_sdram_inti_p1_ras_n <= 1'd1; - end - end - assign main_sdram_inti_p1_address = main_sdram_phaseinjector1_address_storage; - assign main_sdram_inti_p1_bank = main_sdram_phaseinjector1_baddress_storage; - assign main_sdram_inti_p1_wrdata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[4]); - assign main_sdram_inti_p1_rddata_en = (main_sdram_phaseinjector1_command_issue_re & main_sdram_phaseinjector1_command_storage[5]); - assign main_sdram_inti_p1_wrdata = main_sdram_phaseinjector1_wrdata_storage; - assign main_sdram_inti_p1_wrdata_mask = 1'd0; - always @(*) begin - main_sdram_inti_p2_we_n <= 1'd1; - main_sdram_inti_p2_cas_n <= 1'd1; - main_sdram_inti_p2_cs_n <= 1'd1; - main_sdram_inti_p2_ras_n <= 1'd1; - if (main_sdram_phaseinjector2_command_issue_re) begin - main_sdram_inti_p2_cs_n <= {1{(~main_sdram_phaseinjector2_command_storage[0])}}; - main_sdram_inti_p2_we_n <= (~main_sdram_phaseinjector2_command_storage[1]); - main_sdram_inti_p2_cas_n <= (~main_sdram_phaseinjector2_command_storage[2]); - main_sdram_inti_p2_ras_n <= (~main_sdram_phaseinjector2_command_storage[3]); - end else begin - main_sdram_inti_p2_cs_n <= {1{1'd1}}; - main_sdram_inti_p2_we_n <= 1'd1; - main_sdram_inti_p2_cas_n <= 1'd1; - main_sdram_inti_p2_ras_n <= 1'd1; - end - end - assign main_sdram_inti_p2_address = main_sdram_phaseinjector2_address_storage; - assign main_sdram_inti_p2_bank = main_sdram_phaseinjector2_baddress_storage; - assign main_sdram_inti_p2_wrdata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[4]); - assign main_sdram_inti_p2_rddata_en = (main_sdram_phaseinjector2_command_issue_re & main_sdram_phaseinjector2_command_storage[5]); - assign main_sdram_inti_p2_wrdata = main_sdram_phaseinjector2_wrdata_storage; - assign main_sdram_inti_p2_wrdata_mask = 1'd0; - always @(*) begin - main_sdram_inti_p3_we_n <= 1'd1; - main_sdram_inti_p3_cas_n <= 1'd1; - main_sdram_inti_p3_cs_n <= 1'd1; - main_sdram_inti_p3_ras_n <= 1'd1; - if (main_sdram_phaseinjector3_command_issue_re) begin - main_sdram_inti_p3_cs_n <= {1{(~main_sdram_phaseinjector3_command_storage[0])}}; - main_sdram_inti_p3_we_n <= (~main_sdram_phaseinjector3_command_storage[1]); - main_sdram_inti_p3_cas_n <= (~main_sdram_phaseinjector3_command_storage[2]); - main_sdram_inti_p3_ras_n <= (~main_sdram_phaseinjector3_command_storage[3]); - end else begin - main_sdram_inti_p3_cs_n <= {1{1'd1}}; - main_sdram_inti_p3_we_n <= 1'd1; - main_sdram_inti_p3_cas_n <= 1'd1; - main_sdram_inti_p3_ras_n <= 1'd1; - end - end - assign main_sdram_inti_p3_address = main_sdram_phaseinjector3_address_storage; - assign main_sdram_inti_p3_bank = main_sdram_phaseinjector3_baddress_storage; - assign main_sdram_inti_p3_wrdata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[4]); - assign main_sdram_inti_p3_rddata_en = (main_sdram_phaseinjector3_command_issue_re & main_sdram_phaseinjector3_command_storage[5]); - assign main_sdram_inti_p3_wrdata = main_sdram_phaseinjector3_wrdata_storage; - assign main_sdram_inti_p3_wrdata_mask = 1'd0; - assign main_sdram_bankmachine0_req_valid = main_sdram_interface_bank0_valid; - assign main_sdram_interface_bank0_ready = main_sdram_bankmachine0_req_ready; - assign main_sdram_bankmachine0_req_we = main_sdram_interface_bank0_we; - assign main_sdram_bankmachine0_req_addr = main_sdram_interface_bank0_addr; - assign main_sdram_interface_bank0_lock = main_sdram_bankmachine0_req_lock; - assign main_sdram_interface_bank0_wdata_ready = main_sdram_bankmachine0_req_wdata_ready; - assign main_sdram_interface_bank0_rdata_valid = main_sdram_bankmachine0_req_rdata_valid; - assign main_sdram_bankmachine1_req_valid = main_sdram_interface_bank1_valid; - assign main_sdram_interface_bank1_ready = main_sdram_bankmachine1_req_ready; - assign main_sdram_bankmachine1_req_we = main_sdram_interface_bank1_we; - assign main_sdram_bankmachine1_req_addr = main_sdram_interface_bank1_addr; - assign main_sdram_interface_bank1_lock = main_sdram_bankmachine1_req_lock; - assign main_sdram_interface_bank1_wdata_ready = main_sdram_bankmachine1_req_wdata_ready; - assign main_sdram_interface_bank1_rdata_valid = main_sdram_bankmachine1_req_rdata_valid; - assign main_sdram_bankmachine2_req_valid = main_sdram_interface_bank2_valid; - assign main_sdram_interface_bank2_ready = main_sdram_bankmachine2_req_ready; - assign main_sdram_bankmachine2_req_we = main_sdram_interface_bank2_we; - assign main_sdram_bankmachine2_req_addr = main_sdram_interface_bank2_addr; - assign main_sdram_interface_bank2_lock = main_sdram_bankmachine2_req_lock; - assign main_sdram_interface_bank2_wdata_ready = main_sdram_bankmachine2_req_wdata_ready; - assign main_sdram_interface_bank2_rdata_valid = main_sdram_bankmachine2_req_rdata_valid; - assign main_sdram_bankmachine3_req_valid = main_sdram_interface_bank3_valid; - assign main_sdram_interface_bank3_ready = main_sdram_bankmachine3_req_ready; - assign main_sdram_bankmachine3_req_we = main_sdram_interface_bank3_we; - assign main_sdram_bankmachine3_req_addr = main_sdram_interface_bank3_addr; - assign main_sdram_interface_bank3_lock = main_sdram_bankmachine3_req_lock; - assign main_sdram_interface_bank3_wdata_ready = main_sdram_bankmachine3_req_wdata_ready; - assign main_sdram_interface_bank3_rdata_valid = main_sdram_bankmachine3_req_rdata_valid; - assign main_sdram_bankmachine4_req_valid = main_sdram_interface_bank4_valid; - assign main_sdram_interface_bank4_ready = main_sdram_bankmachine4_req_ready; - assign main_sdram_bankmachine4_req_we = main_sdram_interface_bank4_we; - assign main_sdram_bankmachine4_req_addr = main_sdram_interface_bank4_addr; - assign main_sdram_interface_bank4_lock = main_sdram_bankmachine4_req_lock; - assign main_sdram_interface_bank4_wdata_ready = main_sdram_bankmachine4_req_wdata_ready; - assign main_sdram_interface_bank4_rdata_valid = main_sdram_bankmachine4_req_rdata_valid; - assign main_sdram_bankmachine5_req_valid = main_sdram_interface_bank5_valid; - assign main_sdram_interface_bank5_ready = main_sdram_bankmachine5_req_ready; - assign main_sdram_bankmachine5_req_we = main_sdram_interface_bank5_we; - assign main_sdram_bankmachine5_req_addr = main_sdram_interface_bank5_addr; - assign main_sdram_interface_bank5_lock = main_sdram_bankmachine5_req_lock; - assign main_sdram_interface_bank5_wdata_ready = main_sdram_bankmachine5_req_wdata_ready; - assign main_sdram_interface_bank5_rdata_valid = main_sdram_bankmachine5_req_rdata_valid; - assign main_sdram_bankmachine6_req_valid = main_sdram_interface_bank6_valid; - assign main_sdram_interface_bank6_ready = main_sdram_bankmachine6_req_ready; - assign main_sdram_bankmachine6_req_we = main_sdram_interface_bank6_we; - assign main_sdram_bankmachine6_req_addr = main_sdram_interface_bank6_addr; - assign main_sdram_interface_bank6_lock = main_sdram_bankmachine6_req_lock; - assign main_sdram_interface_bank6_wdata_ready = main_sdram_bankmachine6_req_wdata_ready; - assign main_sdram_interface_bank6_rdata_valid = main_sdram_bankmachine6_req_rdata_valid; - assign main_sdram_bankmachine7_req_valid = main_sdram_interface_bank7_valid; - assign main_sdram_interface_bank7_ready = main_sdram_bankmachine7_req_ready; - assign main_sdram_bankmachine7_req_we = main_sdram_interface_bank7_we; - assign main_sdram_bankmachine7_req_addr = main_sdram_interface_bank7_addr; - assign main_sdram_interface_bank7_lock = main_sdram_bankmachine7_req_lock; - assign main_sdram_interface_bank7_wdata_ready = main_sdram_bankmachine7_req_wdata_ready; - assign main_sdram_interface_bank7_rdata_valid = main_sdram_bankmachine7_req_rdata_valid; - assign main_sdram_timer_wait = (~main_sdram_timer_done0); - assign main_sdram_postponer_req_i = main_sdram_timer_done0; - assign main_sdram_wants_refresh = main_sdram_postponer_req_o; - assign main_sdram_wants_zqcs = main_sdram_zqcs_timer_done0; - assign main_sdram_zqcs_timer_wait = (~main_sdram_zqcs_executer_done); - assign main_sdram_timer_done1 = (main_sdram_timer_count1 == 1'd0); - assign main_sdram_timer_done0 = main_sdram_timer_done1; - assign main_sdram_timer_count0 = main_sdram_timer_count1; - assign main_sdram_sequencer_start1 = (main_sdram_sequencer_start0 | (main_sdram_sequencer_count != 1'd0)); - assign main_sdram_sequencer_done0 = (main_sdram_sequencer_done1 & (main_sdram_sequencer_count == 1'd0)); - assign main_sdram_zqcs_timer_done1 = (main_sdram_zqcs_timer_count1 == 1'd0); - assign main_sdram_zqcs_timer_done0 = main_sdram_zqcs_timer_done1; - assign main_sdram_zqcs_timer_count0 = main_sdram_zqcs_timer_count1; - always @(*) begin - main_sdram_cmd_valid <= 1'd0; - builder_refresher_next_state <= 2'd0; - main_sdram_zqcs_executer_start <= 1'd0; - main_sdram_cmd_last <= 1'd0; - main_sdram_sequencer_start0 <= 1'd0; - builder_refresher_next_state <= builder_refresher_state; - case (builder_refresher_state) - 1'd1: begin - main_sdram_cmd_valid <= 1'd1; - if (main_sdram_cmd_ready) begin - main_sdram_sequencer_start0 <= 1'd1; - builder_refresher_next_state <= 2'd2; - end - end - 2'd2: begin - main_sdram_cmd_valid <= 1'd1; - if (main_sdram_sequencer_done0) begin - if (main_sdram_wants_zqcs) begin - main_sdram_zqcs_executer_start <= 1'd1; - builder_refresher_next_state <= 2'd3; - end else begin - main_sdram_cmd_valid <= 1'd0; - main_sdram_cmd_last <= 1'd1; - builder_refresher_next_state <= 1'd0; - end - end - end - 2'd3: begin - main_sdram_cmd_valid <= 1'd1; - if (main_sdram_zqcs_executer_done) begin - main_sdram_cmd_valid <= 1'd0; - main_sdram_cmd_last <= 1'd1; - builder_refresher_next_state <= 1'd0; - end - end - default: begin - if (1'd1) begin - if (main_sdram_wants_refresh) begin - builder_refresher_next_state <= 1'd1; - end - end - end - endcase - end - assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine0_req_valid; - assign main_sdram_bankmachine0_req_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine0_req_we; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine0_req_addr; - assign main_sdram_bankmachine0_cmd_buffer_sink_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine0_cmd_buffer_sink_ready; - assign main_sdram_bankmachine0_cmd_buffer_sink_first = main_sdram_bankmachine0_cmd_buffer_lookahead_source_first; - assign main_sdram_bankmachine0_cmd_buffer_sink_last = main_sdram_bankmachine0_cmd_buffer_lookahead_source_last; - assign main_sdram_bankmachine0_cmd_buffer_sink_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we; - assign main_sdram_bankmachine0_cmd_buffer_sink_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr; - assign main_sdram_bankmachine0_cmd_buffer_source_ready = (main_sdram_bankmachine0_req_wdata_ready | main_sdram_bankmachine0_req_rdata_valid); - assign main_sdram_bankmachine0_req_lock = (main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine0_cmd_buffer_source_valid); - assign main_sdram_bankmachine0_row_hit = (main_sdram_bankmachine0_row == main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]); - assign main_sdram_bankmachine0_cmd_payload_ba = 1'd0; - always @(*) begin - main_sdram_bankmachine0_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine0_row_col_n_addr_sel) begin - main_sdram_bankmachine0_cmd_payload_a <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine0_cmd_payload_a <= ((main_sdram_bankmachine0_auto_precharge <<< 4'd10) | { - main_sdram_bankmachine0_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} - }); - end - end - assign main_sdram_bankmachine0_twtpcon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_cmd_payload_is_write); - assign main_sdram_bankmachine0_trccon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); - assign main_sdram_bankmachine0_trascon_valid = ((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_ready) & main_sdram_bankmachine0_row_open); - always @(*) begin - main_sdram_bankmachine0_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine0_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine0_auto_precharge <= (main_sdram_bankmachine0_row_close == 1'd0); - end - end - end - assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din = { - main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last, - main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first, - main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr, - main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we - }; - assign {main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_valid; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_first; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_last; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_we; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_sink_payload_addr; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_first = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_first; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_last = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_last; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_we; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine0_cmd_buffer_lookahead_fifo_out_payload_addr; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re = main_sdram_bankmachine0_cmd_buffer_lookahead_source_ready; - always @(*) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine0_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine0_cmd_buffer_lookahead_produce; - end - end - assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_din; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable | main_sdram_bankmachine0_cmd_buffer_lookahead_replace)); - assign main_sdram_bankmachine0_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_re); - assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine0_cmd_buffer_lookahead_consume; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_dout = main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 4'd8); - assign main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_readable = (main_sdram_bankmachine0_cmd_buffer_lookahead_level != 1'd0); - assign main_sdram_bankmachine0_cmd_buffer_sink_ready = ((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready); - always @(*) begin - main_sdram_bankmachine0_row_open <= 1'd0; - main_sdram_bankmachine0_row_close <= 1'd0; - main_sdram_bankmachine0_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine0_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine0_cmd_payload_we <= 1'd0; - main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine0_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine0_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine0_req_wdata_ready <= 1'd0; - builder_bankmachine0_next_state <= 3'd0; - main_sdram_bankmachine0_req_rdata_valid <= 1'd0; - main_sdram_bankmachine0_refresh_gnt <= 1'd0; - main_sdram_bankmachine0_cmd_valid <= 1'd0; - builder_bankmachine0_next_state <= builder_bankmachine0_state; - case (builder_bankmachine0_state) - 1'd1: begin - if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin - main_sdram_bankmachine0_cmd_valid <= 1'd1; - if (main_sdram_bankmachine0_cmd_ready) begin - builder_bankmachine0_next_state <= 3'd5; - end - main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine0_cmd_payload_we <= 1'd1; - main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine0_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine0_twtpcon_ready & main_sdram_bankmachine0_trascon_ready)) begin - builder_bankmachine0_next_state <= 3'd5; - end - main_sdram_bankmachine0_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine0_trccon_ready) begin - main_sdram_bankmachine0_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine0_row_open <= 1'd1; - main_sdram_bankmachine0_cmd_valid <= 1'd1; - main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine0_cmd_ready) begin - builder_bankmachine0_next_state <= 3'd6; - end - main_sdram_bankmachine0_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine0_twtpcon_ready) begin - main_sdram_bankmachine0_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine0_row_close <= 1'd1; - main_sdram_bankmachine0_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine0_refresh_req)) begin - builder_bankmachine0_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine0_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine0_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine0_refresh_req) begin - builder_bankmachine0_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine0_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine0_row_opened) begin - if (main_sdram_bankmachine0_row_hit) begin - main_sdram_bankmachine0_cmd_valid <= 1'd1; - if (main_sdram_bankmachine0_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine0_req_wdata_ready <= main_sdram_bankmachine0_cmd_ready; - main_sdram_bankmachine0_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine0_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine0_req_rdata_valid <= main_sdram_bankmachine0_cmd_ready; - main_sdram_bankmachine0_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine0_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine0_cmd_ready & main_sdram_bankmachine0_auto_precharge)) begin - builder_bankmachine0_next_state <= 2'd2; - end - end else begin - builder_bankmachine0_next_state <= 1'd1; - end - end else begin - builder_bankmachine0_next_state <= 2'd3; - end - end - end - end - endcase - end - assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine1_req_valid; - assign main_sdram_bankmachine1_req_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine1_req_we; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine1_req_addr; - assign main_sdram_bankmachine1_cmd_buffer_sink_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine1_cmd_buffer_sink_ready; - assign main_sdram_bankmachine1_cmd_buffer_sink_first = main_sdram_bankmachine1_cmd_buffer_lookahead_source_first; - assign main_sdram_bankmachine1_cmd_buffer_sink_last = main_sdram_bankmachine1_cmd_buffer_lookahead_source_last; - assign main_sdram_bankmachine1_cmd_buffer_sink_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we; - assign main_sdram_bankmachine1_cmd_buffer_sink_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr; - assign main_sdram_bankmachine1_cmd_buffer_source_ready = (main_sdram_bankmachine1_req_wdata_ready | main_sdram_bankmachine1_req_rdata_valid); - assign main_sdram_bankmachine1_req_lock = (main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine1_cmd_buffer_source_valid); - assign main_sdram_bankmachine1_row_hit = (main_sdram_bankmachine1_row == main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]); - assign main_sdram_bankmachine1_cmd_payload_ba = 1'd1; - always @(*) begin - main_sdram_bankmachine1_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine1_row_col_n_addr_sel) begin - main_sdram_bankmachine1_cmd_payload_a <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine1_cmd_payload_a <= ((main_sdram_bankmachine1_auto_precharge <<< 4'd10) | { - main_sdram_bankmachine1_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} - }); - end - end - assign main_sdram_bankmachine1_twtpcon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_cmd_payload_is_write); - assign main_sdram_bankmachine1_trccon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); - assign main_sdram_bankmachine1_trascon_valid = ((main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_ready) & main_sdram_bankmachine1_row_open); - always @(*) begin - main_sdram_bankmachine1_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine1_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine1_auto_precharge <= (main_sdram_bankmachine1_row_close == 1'd0); - end - end - end - assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din = { - main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last, - main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first, - main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr, - main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we - }; - assign {main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_valid; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_first; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_last; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_we; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_sink_payload_addr; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_first = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_first; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_last = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_last; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_we; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine1_cmd_buffer_lookahead_fifo_out_payload_addr; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re = main_sdram_bankmachine1_cmd_buffer_lookahead_source_ready; - always @(*) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine1_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine1_cmd_buffer_lookahead_produce; - end - end - assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_din; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable | main_sdram_bankmachine1_cmd_buffer_lookahead_replace)); - assign main_sdram_bankmachine1_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_re); - assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine1_cmd_buffer_lookahead_consume; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_dout = main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 4'd8); - assign main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_readable = (main_sdram_bankmachine1_cmd_buffer_lookahead_level != 1'd0); - assign main_sdram_bankmachine1_cmd_buffer_sink_ready = ((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready); - always @(*) begin - main_sdram_bankmachine1_row_open <= 1'd0; - main_sdram_bankmachine1_row_close <= 1'd0; - main_sdram_bankmachine1_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine1_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine1_cmd_payload_we <= 1'd0; - main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine1_cmd_payload_is_read <= 1'd0; - builder_bankmachine1_next_state <= 3'd0; - main_sdram_bankmachine1_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine1_req_wdata_ready <= 1'd0; - main_sdram_bankmachine1_req_rdata_valid <= 1'd0; - main_sdram_bankmachine1_refresh_gnt <= 1'd0; - main_sdram_bankmachine1_cmd_valid <= 1'd0; - builder_bankmachine1_next_state <= builder_bankmachine1_state; - case (builder_bankmachine1_state) - 1'd1: begin - if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin - main_sdram_bankmachine1_cmd_valid <= 1'd1; - if (main_sdram_bankmachine1_cmd_ready) begin - builder_bankmachine1_next_state <= 3'd5; - end - main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine1_cmd_payload_we <= 1'd1; - main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine1_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine1_twtpcon_ready & main_sdram_bankmachine1_trascon_ready)) begin - builder_bankmachine1_next_state <= 3'd5; - end - main_sdram_bankmachine1_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine1_trccon_ready) begin - main_sdram_bankmachine1_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine1_row_open <= 1'd1; - main_sdram_bankmachine1_cmd_valid <= 1'd1; - main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine1_cmd_ready) begin - builder_bankmachine1_next_state <= 3'd6; - end - main_sdram_bankmachine1_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine1_twtpcon_ready) begin - main_sdram_bankmachine1_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine1_row_close <= 1'd1; - main_sdram_bankmachine1_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine1_refresh_req)) begin - builder_bankmachine1_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine1_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine1_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine1_refresh_req) begin - builder_bankmachine1_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine1_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine1_row_opened) begin - if (main_sdram_bankmachine1_row_hit) begin - main_sdram_bankmachine1_cmd_valid <= 1'd1; - if (main_sdram_bankmachine1_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine1_req_wdata_ready <= main_sdram_bankmachine1_cmd_ready; - main_sdram_bankmachine1_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine1_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine1_req_rdata_valid <= main_sdram_bankmachine1_cmd_ready; - main_sdram_bankmachine1_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine1_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine1_cmd_ready & main_sdram_bankmachine1_auto_precharge)) begin - builder_bankmachine1_next_state <= 2'd2; - end - end else begin - builder_bankmachine1_next_state <= 1'd1; - end - end else begin - builder_bankmachine1_next_state <= 2'd3; - end - end - end - end - endcase - end - assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine2_req_valid; - assign main_sdram_bankmachine2_req_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine2_req_we; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine2_req_addr; - assign main_sdram_bankmachine2_cmd_buffer_sink_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine2_cmd_buffer_sink_ready; - assign main_sdram_bankmachine2_cmd_buffer_sink_first = main_sdram_bankmachine2_cmd_buffer_lookahead_source_first; - assign main_sdram_bankmachine2_cmd_buffer_sink_last = main_sdram_bankmachine2_cmd_buffer_lookahead_source_last; - assign main_sdram_bankmachine2_cmd_buffer_sink_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we; - assign main_sdram_bankmachine2_cmd_buffer_sink_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr; - assign main_sdram_bankmachine2_cmd_buffer_source_ready = (main_sdram_bankmachine2_req_wdata_ready | main_sdram_bankmachine2_req_rdata_valid); - assign main_sdram_bankmachine2_req_lock = (main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine2_cmd_buffer_source_valid); - assign main_sdram_bankmachine2_row_hit = (main_sdram_bankmachine2_row == main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]); - assign main_sdram_bankmachine2_cmd_payload_ba = 2'd2; - always @(*) begin - main_sdram_bankmachine2_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine2_row_col_n_addr_sel) begin - main_sdram_bankmachine2_cmd_payload_a <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine2_cmd_payload_a <= ((main_sdram_bankmachine2_auto_precharge <<< 4'd10) | { - main_sdram_bankmachine2_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} - }); - end - end - assign main_sdram_bankmachine2_twtpcon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_cmd_payload_is_write); - assign main_sdram_bankmachine2_trccon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); - assign main_sdram_bankmachine2_trascon_valid = ((main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_ready) & main_sdram_bankmachine2_row_open); - always @(*) begin - main_sdram_bankmachine2_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine2_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine2_auto_precharge <= (main_sdram_bankmachine2_row_close == 1'd0); - end - end - end - assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din = { - main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last, - main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first, - main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr, - main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we - }; - assign {main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_valid; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_first; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_last; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_we; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_sink_payload_addr; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_first = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_first; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_last = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_last; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_we; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine2_cmd_buffer_lookahead_fifo_out_payload_addr; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re = main_sdram_bankmachine2_cmd_buffer_lookahead_source_ready; - always @(*) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine2_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine2_cmd_buffer_lookahead_produce; - end - end - assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_din; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable | main_sdram_bankmachine2_cmd_buffer_lookahead_replace)); - assign main_sdram_bankmachine2_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_re); - assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine2_cmd_buffer_lookahead_consume; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_dout = main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 4'd8); - assign main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_readable = (main_sdram_bankmachine2_cmd_buffer_lookahead_level != 1'd0); - assign main_sdram_bankmachine2_cmd_buffer_sink_ready = ((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready); - always @(*) begin - main_sdram_bankmachine2_row_open <= 1'd0; - main_sdram_bankmachine2_row_close <= 1'd0; - main_sdram_bankmachine2_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine2_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine2_cmd_payload_we <= 1'd0; - main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd0; - builder_bankmachine2_next_state <= 3'd0; - main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine2_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine2_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine2_req_wdata_ready <= 1'd0; - main_sdram_bankmachine2_req_rdata_valid <= 1'd0; - main_sdram_bankmachine2_refresh_gnt <= 1'd0; - main_sdram_bankmachine2_cmd_valid <= 1'd0; - builder_bankmachine2_next_state <= builder_bankmachine2_state; - case (builder_bankmachine2_state) - 1'd1: begin - if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin - main_sdram_bankmachine2_cmd_valid <= 1'd1; - if (main_sdram_bankmachine2_cmd_ready) begin - builder_bankmachine2_next_state <= 3'd5; - end - main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine2_cmd_payload_we <= 1'd1; - main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine2_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine2_twtpcon_ready & main_sdram_bankmachine2_trascon_ready)) begin - builder_bankmachine2_next_state <= 3'd5; - end - main_sdram_bankmachine2_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine2_trccon_ready) begin - main_sdram_bankmachine2_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine2_row_open <= 1'd1; - main_sdram_bankmachine2_cmd_valid <= 1'd1; - main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine2_cmd_ready) begin - builder_bankmachine2_next_state <= 3'd6; - end - main_sdram_bankmachine2_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine2_twtpcon_ready) begin - main_sdram_bankmachine2_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine2_row_close <= 1'd1; - main_sdram_bankmachine2_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine2_refresh_req)) begin - builder_bankmachine2_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine2_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine2_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine2_refresh_req) begin - builder_bankmachine2_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine2_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine2_row_opened) begin - if (main_sdram_bankmachine2_row_hit) begin - main_sdram_bankmachine2_cmd_valid <= 1'd1; - if (main_sdram_bankmachine2_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine2_req_wdata_ready <= main_sdram_bankmachine2_cmd_ready; - main_sdram_bankmachine2_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine2_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine2_req_rdata_valid <= main_sdram_bankmachine2_cmd_ready; - main_sdram_bankmachine2_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine2_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine2_cmd_ready & main_sdram_bankmachine2_auto_precharge)) begin - builder_bankmachine2_next_state <= 2'd2; - end - end else begin - builder_bankmachine2_next_state <= 1'd1; - end - end else begin - builder_bankmachine2_next_state <= 2'd3; - end - end - end - end - endcase - end - assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine3_req_valid; - assign main_sdram_bankmachine3_req_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine3_req_we; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine3_req_addr; - assign main_sdram_bankmachine3_cmd_buffer_sink_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine3_cmd_buffer_sink_ready; - assign main_sdram_bankmachine3_cmd_buffer_sink_first = main_sdram_bankmachine3_cmd_buffer_lookahead_source_first; - assign main_sdram_bankmachine3_cmd_buffer_sink_last = main_sdram_bankmachine3_cmd_buffer_lookahead_source_last; - assign main_sdram_bankmachine3_cmd_buffer_sink_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we; - assign main_sdram_bankmachine3_cmd_buffer_sink_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr; - assign main_sdram_bankmachine3_cmd_buffer_source_ready = (main_sdram_bankmachine3_req_wdata_ready | main_sdram_bankmachine3_req_rdata_valid); - assign main_sdram_bankmachine3_req_lock = (main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine3_cmd_buffer_source_valid); - assign main_sdram_bankmachine3_row_hit = (main_sdram_bankmachine3_row == main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]); - assign main_sdram_bankmachine3_cmd_payload_ba = 2'd3; - always @(*) begin - main_sdram_bankmachine3_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine3_row_col_n_addr_sel) begin - main_sdram_bankmachine3_cmd_payload_a <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine3_cmd_payload_a <= ((main_sdram_bankmachine3_auto_precharge <<< 4'd10) | { - main_sdram_bankmachine3_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} - }); - end - end - assign main_sdram_bankmachine3_twtpcon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_cmd_payload_is_write); - assign main_sdram_bankmachine3_trccon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); - assign main_sdram_bankmachine3_trascon_valid = ((main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_ready) & main_sdram_bankmachine3_row_open); - always @(*) begin - main_sdram_bankmachine3_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine3_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine3_auto_precharge <= (main_sdram_bankmachine3_row_close == 1'd0); - end - end - end - assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din = { - main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last, - main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first, - main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr, - main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we - }; - assign {main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_valid; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_first; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_last; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_we; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_sink_payload_addr; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_first = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_first; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_last = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_last; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_we; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine3_cmd_buffer_lookahead_fifo_out_payload_addr; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re = main_sdram_bankmachine3_cmd_buffer_lookahead_source_ready; - always @(*) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine3_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine3_cmd_buffer_lookahead_produce; - end - end - assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_din; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable | main_sdram_bankmachine3_cmd_buffer_lookahead_replace)); - assign main_sdram_bankmachine3_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_re); - assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine3_cmd_buffer_lookahead_consume; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_dout = main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 4'd8); - assign main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_readable = (main_sdram_bankmachine3_cmd_buffer_lookahead_level != 1'd0); - assign main_sdram_bankmachine3_cmd_buffer_sink_ready = ((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready); - always @(*) begin - main_sdram_bankmachine3_row_open <= 1'd0; - main_sdram_bankmachine3_row_close <= 1'd0; - main_sdram_bankmachine3_cmd_payload_cas <= 1'd0; - builder_bankmachine3_next_state <= 3'd0; - main_sdram_bankmachine3_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine3_cmd_payload_we <= 1'd0; - main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine3_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine3_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine3_req_wdata_ready <= 1'd0; - main_sdram_bankmachine3_req_rdata_valid <= 1'd0; - main_sdram_bankmachine3_refresh_gnt <= 1'd0; - main_sdram_bankmachine3_cmd_valid <= 1'd0; - builder_bankmachine3_next_state <= builder_bankmachine3_state; - case (builder_bankmachine3_state) - 1'd1: begin - if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin - main_sdram_bankmachine3_cmd_valid <= 1'd1; - if (main_sdram_bankmachine3_cmd_ready) begin - builder_bankmachine3_next_state <= 3'd5; - end - main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine3_cmd_payload_we <= 1'd1; - main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine3_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine3_twtpcon_ready & main_sdram_bankmachine3_trascon_ready)) begin - builder_bankmachine3_next_state <= 3'd5; - end - main_sdram_bankmachine3_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine3_trccon_ready) begin - main_sdram_bankmachine3_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine3_row_open <= 1'd1; - main_sdram_bankmachine3_cmd_valid <= 1'd1; - main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine3_cmd_ready) begin - builder_bankmachine3_next_state <= 3'd6; - end - main_sdram_bankmachine3_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine3_twtpcon_ready) begin - main_sdram_bankmachine3_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine3_row_close <= 1'd1; - main_sdram_bankmachine3_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine3_refresh_req)) begin - builder_bankmachine3_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine3_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine3_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine3_refresh_req) begin - builder_bankmachine3_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine3_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine3_row_opened) begin - if (main_sdram_bankmachine3_row_hit) begin - main_sdram_bankmachine3_cmd_valid <= 1'd1; - if (main_sdram_bankmachine3_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine3_req_wdata_ready <= main_sdram_bankmachine3_cmd_ready; - main_sdram_bankmachine3_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine3_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine3_req_rdata_valid <= main_sdram_bankmachine3_cmd_ready; - main_sdram_bankmachine3_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine3_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine3_cmd_ready & main_sdram_bankmachine3_auto_precharge)) begin - builder_bankmachine3_next_state <= 2'd2; - end - end else begin - builder_bankmachine3_next_state <= 1'd1; - end - end else begin - builder_bankmachine3_next_state <= 2'd3; - end - end - end - end - endcase - end - assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine4_req_valid; - assign main_sdram_bankmachine4_req_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine4_req_we; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine4_req_addr; - assign main_sdram_bankmachine4_cmd_buffer_sink_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine4_cmd_buffer_sink_ready; - assign main_sdram_bankmachine4_cmd_buffer_sink_first = main_sdram_bankmachine4_cmd_buffer_lookahead_source_first; - assign main_sdram_bankmachine4_cmd_buffer_sink_last = main_sdram_bankmachine4_cmd_buffer_lookahead_source_last; - assign main_sdram_bankmachine4_cmd_buffer_sink_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we; - assign main_sdram_bankmachine4_cmd_buffer_sink_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr; - assign main_sdram_bankmachine4_cmd_buffer_source_ready = (main_sdram_bankmachine4_req_wdata_ready | main_sdram_bankmachine4_req_rdata_valid); - assign main_sdram_bankmachine4_req_lock = (main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine4_cmd_buffer_source_valid); - assign main_sdram_bankmachine4_row_hit = (main_sdram_bankmachine4_row == main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]); - assign main_sdram_bankmachine4_cmd_payload_ba = 3'd4; - always @(*) begin - main_sdram_bankmachine4_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine4_row_col_n_addr_sel) begin - main_sdram_bankmachine4_cmd_payload_a <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine4_cmd_payload_a <= ((main_sdram_bankmachine4_auto_precharge <<< 4'd10) | { - main_sdram_bankmachine4_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} - }); - end - end - assign main_sdram_bankmachine4_twtpcon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_cmd_payload_is_write); - assign main_sdram_bankmachine4_trccon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); - assign main_sdram_bankmachine4_trascon_valid = ((main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_ready) & main_sdram_bankmachine4_row_open); - always @(*) begin - main_sdram_bankmachine4_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine4_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine4_auto_precharge <= (main_sdram_bankmachine4_row_close == 1'd0); - end - end - end - assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din = { - main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last, - main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first, - main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr, - main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we - }; - assign {main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_valid; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_first; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_last; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_we; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_sink_payload_addr; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_first = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_first; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_last = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_last; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_we; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine4_cmd_buffer_lookahead_fifo_out_payload_addr; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re = main_sdram_bankmachine4_cmd_buffer_lookahead_source_ready; - always @(*) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine4_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine4_cmd_buffer_lookahead_produce; - end - end - assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_din; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable | main_sdram_bankmachine4_cmd_buffer_lookahead_replace)); - assign main_sdram_bankmachine4_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_re); - assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine4_cmd_buffer_lookahead_consume; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_dout = main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 4'd8); - assign main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_readable = (main_sdram_bankmachine4_cmd_buffer_lookahead_level != 1'd0); - assign main_sdram_bankmachine4_cmd_buffer_sink_ready = ((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready); - always @(*) begin - main_sdram_bankmachine4_row_open <= 1'd0; - main_sdram_bankmachine4_row_close <= 1'd0; - builder_bankmachine4_next_state <= 3'd0; - main_sdram_bankmachine4_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine4_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine4_cmd_payload_we <= 1'd0; - main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine4_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine4_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine4_req_wdata_ready <= 1'd0; - main_sdram_bankmachine4_req_rdata_valid <= 1'd0; - main_sdram_bankmachine4_refresh_gnt <= 1'd0; - main_sdram_bankmachine4_cmd_valid <= 1'd0; - builder_bankmachine4_next_state <= builder_bankmachine4_state; - case (builder_bankmachine4_state) - 1'd1: begin - if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin - main_sdram_bankmachine4_cmd_valid <= 1'd1; - if (main_sdram_bankmachine4_cmd_ready) begin - builder_bankmachine4_next_state <= 3'd5; - end - main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine4_cmd_payload_we <= 1'd1; - main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine4_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine4_twtpcon_ready & main_sdram_bankmachine4_trascon_ready)) begin - builder_bankmachine4_next_state <= 3'd5; - end - main_sdram_bankmachine4_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine4_trccon_ready) begin - main_sdram_bankmachine4_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine4_row_open <= 1'd1; - main_sdram_bankmachine4_cmd_valid <= 1'd1; - main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine4_cmd_ready) begin - builder_bankmachine4_next_state <= 3'd6; - end - main_sdram_bankmachine4_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine4_twtpcon_ready) begin - main_sdram_bankmachine4_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine4_row_close <= 1'd1; - main_sdram_bankmachine4_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine4_refresh_req)) begin - builder_bankmachine4_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine4_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine4_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine4_refresh_req) begin - builder_bankmachine4_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine4_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine4_row_opened) begin - if (main_sdram_bankmachine4_row_hit) begin - main_sdram_bankmachine4_cmd_valid <= 1'd1; - if (main_sdram_bankmachine4_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine4_req_wdata_ready <= main_sdram_bankmachine4_cmd_ready; - main_sdram_bankmachine4_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine4_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine4_req_rdata_valid <= main_sdram_bankmachine4_cmd_ready; - main_sdram_bankmachine4_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine4_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine4_cmd_ready & main_sdram_bankmachine4_auto_precharge)) begin - builder_bankmachine4_next_state <= 2'd2; - end - end else begin - builder_bankmachine4_next_state <= 1'd1; - end - end else begin - builder_bankmachine4_next_state <= 2'd3; - end - end - end - end - endcase - end - assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine5_req_valid; - assign main_sdram_bankmachine5_req_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine5_req_we; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine5_req_addr; - assign main_sdram_bankmachine5_cmd_buffer_sink_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine5_cmd_buffer_sink_ready; - assign main_sdram_bankmachine5_cmd_buffer_sink_first = main_sdram_bankmachine5_cmd_buffer_lookahead_source_first; - assign main_sdram_bankmachine5_cmd_buffer_sink_last = main_sdram_bankmachine5_cmd_buffer_lookahead_source_last; - assign main_sdram_bankmachine5_cmd_buffer_sink_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we; - assign main_sdram_bankmachine5_cmd_buffer_sink_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr; - assign main_sdram_bankmachine5_cmd_buffer_source_ready = (main_sdram_bankmachine5_req_wdata_ready | main_sdram_bankmachine5_req_rdata_valid); - assign main_sdram_bankmachine5_req_lock = (main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine5_cmd_buffer_source_valid); - assign main_sdram_bankmachine5_row_hit = (main_sdram_bankmachine5_row == main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]); - assign main_sdram_bankmachine5_cmd_payload_ba = 3'd5; - always @(*) begin - main_sdram_bankmachine5_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine5_row_col_n_addr_sel) begin - main_sdram_bankmachine5_cmd_payload_a <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine5_cmd_payload_a <= ((main_sdram_bankmachine5_auto_precharge <<< 4'd10) | { - main_sdram_bankmachine5_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} - }); - end - end - assign main_sdram_bankmachine5_twtpcon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_cmd_payload_is_write); - assign main_sdram_bankmachine5_trccon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); - assign main_sdram_bankmachine5_trascon_valid = ((main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_ready) & main_sdram_bankmachine5_row_open); - always @(*) begin - main_sdram_bankmachine5_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine5_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine5_auto_precharge <= (main_sdram_bankmachine5_row_close == 1'd0); - end - end - end - assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din = { - main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last, - main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first, - main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr, - main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we - }; - assign {main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_valid; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_first; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_last; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_we; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_sink_payload_addr; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_first = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_first; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_last = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_last; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_we; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine5_cmd_buffer_lookahead_fifo_out_payload_addr; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re = main_sdram_bankmachine5_cmd_buffer_lookahead_source_ready; - always @(*) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine5_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine5_cmd_buffer_lookahead_produce; - end - end - assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_din; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable | main_sdram_bankmachine5_cmd_buffer_lookahead_replace)); - assign main_sdram_bankmachine5_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_re); - assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine5_cmd_buffer_lookahead_consume; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_dout = main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 4'd8); - assign main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_readable = (main_sdram_bankmachine5_cmd_buffer_lookahead_level != 1'd0); - assign main_sdram_bankmachine5_cmd_buffer_sink_ready = ((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready); - always @(*) begin - builder_bankmachine5_next_state <= 3'd0; - main_sdram_bankmachine5_row_open <= 1'd0; - main_sdram_bankmachine5_row_close <= 1'd0; - main_sdram_bankmachine5_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine5_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine5_cmd_payload_we <= 1'd0; - main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine5_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine5_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine5_req_wdata_ready <= 1'd0; - main_sdram_bankmachine5_req_rdata_valid <= 1'd0; - main_sdram_bankmachine5_refresh_gnt <= 1'd0; - main_sdram_bankmachine5_cmd_valid <= 1'd0; - builder_bankmachine5_next_state <= builder_bankmachine5_state; - case (builder_bankmachine5_state) - 1'd1: begin - if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin - main_sdram_bankmachine5_cmd_valid <= 1'd1; - if (main_sdram_bankmachine5_cmd_ready) begin - builder_bankmachine5_next_state <= 3'd5; - end - main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine5_cmd_payload_we <= 1'd1; - main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine5_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine5_twtpcon_ready & main_sdram_bankmachine5_trascon_ready)) begin - builder_bankmachine5_next_state <= 3'd5; - end - main_sdram_bankmachine5_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine5_trccon_ready) begin - main_sdram_bankmachine5_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine5_row_open <= 1'd1; - main_sdram_bankmachine5_cmd_valid <= 1'd1; - main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine5_cmd_ready) begin - builder_bankmachine5_next_state <= 3'd6; - end - main_sdram_bankmachine5_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine5_twtpcon_ready) begin - main_sdram_bankmachine5_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine5_row_close <= 1'd1; - main_sdram_bankmachine5_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine5_refresh_req)) begin - builder_bankmachine5_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine5_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine5_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine5_refresh_req) begin - builder_bankmachine5_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine5_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine5_row_opened) begin - if (main_sdram_bankmachine5_row_hit) begin - main_sdram_bankmachine5_cmd_valid <= 1'd1; - if (main_sdram_bankmachine5_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine5_req_wdata_ready <= main_sdram_bankmachine5_cmd_ready; - main_sdram_bankmachine5_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine5_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine5_req_rdata_valid <= main_sdram_bankmachine5_cmd_ready; - main_sdram_bankmachine5_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine5_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine5_cmd_ready & main_sdram_bankmachine5_auto_precharge)) begin - builder_bankmachine5_next_state <= 2'd2; - end - end else begin - builder_bankmachine5_next_state <= 1'd1; - end - end else begin - builder_bankmachine5_next_state <= 2'd3; - end - end - end - end - endcase - end - assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine6_req_valid; - assign main_sdram_bankmachine6_req_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine6_req_we; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine6_req_addr; - assign main_sdram_bankmachine6_cmd_buffer_sink_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine6_cmd_buffer_sink_ready; - assign main_sdram_bankmachine6_cmd_buffer_sink_first = main_sdram_bankmachine6_cmd_buffer_lookahead_source_first; - assign main_sdram_bankmachine6_cmd_buffer_sink_last = main_sdram_bankmachine6_cmd_buffer_lookahead_source_last; - assign main_sdram_bankmachine6_cmd_buffer_sink_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we; - assign main_sdram_bankmachine6_cmd_buffer_sink_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr; - assign main_sdram_bankmachine6_cmd_buffer_source_ready = (main_sdram_bankmachine6_req_wdata_ready | main_sdram_bankmachine6_req_rdata_valid); - assign main_sdram_bankmachine6_req_lock = (main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine6_cmd_buffer_source_valid); - assign main_sdram_bankmachine6_row_hit = (main_sdram_bankmachine6_row == main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]); - assign main_sdram_bankmachine6_cmd_payload_ba = 3'd6; - always @(*) begin - main_sdram_bankmachine6_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine6_row_col_n_addr_sel) begin - main_sdram_bankmachine6_cmd_payload_a <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine6_cmd_payload_a <= ((main_sdram_bankmachine6_auto_precharge <<< 4'd10) | { - main_sdram_bankmachine6_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} - }); - end - end - assign main_sdram_bankmachine6_twtpcon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_cmd_payload_is_write); - assign main_sdram_bankmachine6_trccon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); - assign main_sdram_bankmachine6_trascon_valid = ((main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_ready) & main_sdram_bankmachine6_row_open); - always @(*) begin - main_sdram_bankmachine6_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine6_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine6_auto_precharge <= (main_sdram_bankmachine6_row_close == 1'd0); - end - end - end - assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din = { - main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last, - main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first, - main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr, - main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we - }; - assign {main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_valid; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_first; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_last; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_we; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_sink_payload_addr; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_first = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_first; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_last = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_last; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_we; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine6_cmd_buffer_lookahead_fifo_out_payload_addr; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re = main_sdram_bankmachine6_cmd_buffer_lookahead_source_ready; - always @(*) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine6_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine6_cmd_buffer_lookahead_produce; - end - end - assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_din; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable | main_sdram_bankmachine6_cmd_buffer_lookahead_replace)); - assign main_sdram_bankmachine6_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_re); - assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine6_cmd_buffer_lookahead_consume; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_dout = main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 4'd8); - assign main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_readable = (main_sdram_bankmachine6_cmd_buffer_lookahead_level != 1'd0); - assign main_sdram_bankmachine6_cmd_buffer_sink_ready = ((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready); - always @(*) begin - main_sdram_bankmachine6_row_open <= 1'd0; - main_sdram_bankmachine6_row_close <= 1'd0; - main_sdram_bankmachine6_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine6_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine6_cmd_payload_we <= 1'd0; - main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine6_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine6_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine6_req_wdata_ready <= 1'd0; - main_sdram_bankmachine6_req_rdata_valid <= 1'd0; - main_sdram_bankmachine6_refresh_gnt <= 1'd0; - main_sdram_bankmachine6_cmd_valid <= 1'd0; - builder_bankmachine6_next_state <= 3'd0; - builder_bankmachine6_next_state <= builder_bankmachine6_state; - case (builder_bankmachine6_state) - 1'd1: begin - if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin - main_sdram_bankmachine6_cmd_valid <= 1'd1; - if (main_sdram_bankmachine6_cmd_ready) begin - builder_bankmachine6_next_state <= 3'd5; - end - main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine6_cmd_payload_we <= 1'd1; - main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine6_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine6_twtpcon_ready & main_sdram_bankmachine6_trascon_ready)) begin - builder_bankmachine6_next_state <= 3'd5; - end - main_sdram_bankmachine6_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine6_trccon_ready) begin - main_sdram_bankmachine6_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine6_row_open <= 1'd1; - main_sdram_bankmachine6_cmd_valid <= 1'd1; - main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine6_cmd_ready) begin - builder_bankmachine6_next_state <= 3'd6; - end - main_sdram_bankmachine6_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine6_twtpcon_ready) begin - main_sdram_bankmachine6_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine6_row_close <= 1'd1; - main_sdram_bankmachine6_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine6_refresh_req)) begin - builder_bankmachine6_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine6_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine6_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine6_refresh_req) begin - builder_bankmachine6_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine6_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine6_row_opened) begin - if (main_sdram_bankmachine6_row_hit) begin - main_sdram_bankmachine6_cmd_valid <= 1'd1; - if (main_sdram_bankmachine6_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine6_req_wdata_ready <= main_sdram_bankmachine6_cmd_ready; - main_sdram_bankmachine6_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine6_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine6_req_rdata_valid <= main_sdram_bankmachine6_cmd_ready; - main_sdram_bankmachine6_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine6_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine6_cmd_ready & main_sdram_bankmachine6_auto_precharge)) begin - builder_bankmachine6_next_state <= 2'd2; - end - end else begin - builder_bankmachine6_next_state <= 1'd1; - end - end else begin - builder_bankmachine6_next_state <= 2'd3; - end - end - end - end - endcase - end - assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid = main_sdram_bankmachine7_req_valid; - assign main_sdram_bankmachine7_req_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we = main_sdram_bankmachine7_req_we; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr = main_sdram_bankmachine7_req_addr; - assign main_sdram_bankmachine7_cmd_buffer_sink_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready = main_sdram_bankmachine7_cmd_buffer_sink_ready; - assign main_sdram_bankmachine7_cmd_buffer_sink_first = main_sdram_bankmachine7_cmd_buffer_lookahead_source_first; - assign main_sdram_bankmachine7_cmd_buffer_sink_last = main_sdram_bankmachine7_cmd_buffer_lookahead_source_last; - assign main_sdram_bankmachine7_cmd_buffer_sink_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we; - assign main_sdram_bankmachine7_cmd_buffer_sink_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr; - assign main_sdram_bankmachine7_cmd_buffer_source_ready = (main_sdram_bankmachine7_req_wdata_ready | main_sdram_bankmachine7_req_rdata_valid); - assign main_sdram_bankmachine7_req_lock = (main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid | main_sdram_bankmachine7_cmd_buffer_source_valid); - assign main_sdram_bankmachine7_row_hit = (main_sdram_bankmachine7_row == main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]); - assign main_sdram_bankmachine7_cmd_payload_ba = 3'd7; - always @(*) begin - main_sdram_bankmachine7_cmd_payload_a <= 14'd0; - if (main_sdram_bankmachine7_row_col_n_addr_sel) begin - main_sdram_bankmachine7_cmd_payload_a <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; - end else begin - main_sdram_bankmachine7_cmd_payload_a <= ((main_sdram_bankmachine7_auto_precharge <<< 4'd10) | { - main_sdram_bankmachine7_cmd_buffer_source_payload_addr[6:0], {3{1'd0}} - }); - end - end - assign main_sdram_bankmachine7_twtpcon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_cmd_payload_is_write); - assign main_sdram_bankmachine7_trccon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); - assign main_sdram_bankmachine7_trascon_valid = ((main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_ready) & main_sdram_bankmachine7_row_open); - always @(*) begin - main_sdram_bankmachine7_auto_precharge <= 1'd0; - if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid & main_sdram_bankmachine7_cmd_buffer_source_valid)) begin - if ((main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr[20:7] != main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7])) begin - main_sdram_bankmachine7_auto_precharge <= (main_sdram_bankmachine7_row_close == 1'd0); - end - end - end - assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din = { - main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last, - main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first, - main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr, - main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we - }; - assign {main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr, main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we} = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_sink_ready = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_valid; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_first = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_first; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_last = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_last; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_we; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_in_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_sink_payload_addr; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_valid = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_first = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_first; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_last = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_last; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_we = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_we; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_source_payload_addr = main_sdram_bankmachine7_cmd_buffer_lookahead_fifo_out_payload_addr; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re = main_sdram_bankmachine7_cmd_buffer_lookahead_source_ready; - always @(*) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= 3'd0; - if (main_sdram_bankmachine7_cmd_buffer_lookahead_replace) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce - 1'd1); - end else begin - main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr <= main_sdram_bankmachine7_cmd_buffer_lookahead_produce; - end - end - assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w = main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_din; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable | main_sdram_bankmachine7_cmd_buffer_lookahead_replace)); - assign main_sdram_bankmachine7_cmd_buffer_lookahead_do_read = (main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_re); - assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr = main_sdram_bankmachine7_cmd_buffer_lookahead_consume; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_dout = main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 4'd8); - assign main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_readable = (main_sdram_bankmachine7_cmd_buffer_lookahead_level != 1'd0); - assign main_sdram_bankmachine7_cmd_buffer_sink_ready = ((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready); - always @(*) begin - main_sdram_bankmachine7_row_open <= 1'd0; - main_sdram_bankmachine7_row_close <= 1'd0; - main_sdram_bankmachine7_refresh_gnt <= 1'd0; - main_sdram_bankmachine7_cmd_payload_cas <= 1'd0; - main_sdram_bankmachine7_cmd_payload_ras <= 1'd0; - main_sdram_bankmachine7_cmd_payload_we <= 1'd0; - main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd0; - main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd0; - main_sdram_bankmachine7_cmd_payload_is_read <= 1'd0; - main_sdram_bankmachine7_cmd_payload_is_write <= 1'd0; - main_sdram_bankmachine7_req_wdata_ready <= 1'd0; - main_sdram_bankmachine7_req_rdata_valid <= 1'd0; - builder_bankmachine7_next_state <= 3'd0; - main_sdram_bankmachine7_cmd_valid <= 1'd0; - builder_bankmachine7_next_state <= builder_bankmachine7_state; - case (builder_bankmachine7_state) - 1'd1: begin - if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin - main_sdram_bankmachine7_cmd_valid <= 1'd1; - if (main_sdram_bankmachine7_cmd_ready) begin - builder_bankmachine7_next_state <= 3'd5; - end - main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; - main_sdram_bankmachine7_cmd_payload_we <= 1'd1; - main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; - end - main_sdram_bankmachine7_row_close <= 1'd1; - end - 2'd2: begin - if ((main_sdram_bankmachine7_twtpcon_ready & main_sdram_bankmachine7_trascon_ready)) begin - builder_bankmachine7_next_state <= 3'd5; - end - main_sdram_bankmachine7_row_close <= 1'd1; - end - 2'd3: begin - if (main_sdram_bankmachine7_trccon_ready) begin - main_sdram_bankmachine7_row_col_n_addr_sel <= 1'd1; - main_sdram_bankmachine7_row_open <= 1'd1; - main_sdram_bankmachine7_cmd_valid <= 1'd1; - main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; - if (main_sdram_bankmachine7_cmd_ready) begin - builder_bankmachine7_next_state <= 3'd6; - end - main_sdram_bankmachine7_cmd_payload_ras <= 1'd1; - end - end - 3'd4: begin - if (main_sdram_bankmachine7_twtpcon_ready) begin - main_sdram_bankmachine7_refresh_gnt <= 1'd1; - end - main_sdram_bankmachine7_row_close <= 1'd1; - main_sdram_bankmachine7_cmd_payload_is_cmd <= 1'd1; - if ((~main_sdram_bankmachine7_refresh_req)) begin - builder_bankmachine7_next_state <= 1'd0; - end - end - 3'd5: begin - builder_bankmachine7_next_state <= 2'd3; - end - 3'd6: begin - builder_bankmachine7_next_state <= 1'd0; - end - default: begin - if (main_sdram_bankmachine7_refresh_req) begin - builder_bankmachine7_next_state <= 3'd4; - end else begin - if (main_sdram_bankmachine7_cmd_buffer_source_valid) begin - if (main_sdram_bankmachine7_row_opened) begin - if (main_sdram_bankmachine7_row_hit) begin - main_sdram_bankmachine7_cmd_valid <= 1'd1; - if (main_sdram_bankmachine7_cmd_buffer_source_payload_we) begin - main_sdram_bankmachine7_req_wdata_ready <= main_sdram_bankmachine7_cmd_ready; - main_sdram_bankmachine7_cmd_payload_is_write <= 1'd1; - main_sdram_bankmachine7_cmd_payload_we <= 1'd1; - end else begin - main_sdram_bankmachine7_req_rdata_valid <= main_sdram_bankmachine7_cmd_ready; - main_sdram_bankmachine7_cmd_payload_is_read <= 1'd1; - end - main_sdram_bankmachine7_cmd_payload_cas <= 1'd1; - if ((main_sdram_bankmachine7_cmd_ready & main_sdram_bankmachine7_auto_precharge)) begin - builder_bankmachine7_next_state <= 2'd2; - end - end else begin - builder_bankmachine7_next_state <= 1'd1; - end - end else begin - builder_bankmachine7_next_state <= 2'd3; - end - end - end - end - endcase - end - assign main_sdram_trrdcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); - assign main_sdram_tfawcon_valid = ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & ((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))); - assign main_sdram_ras_allowed = (main_sdram_trrdcon_ready & main_sdram_tfawcon_ready); - assign main_sdram_tccdcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_cmd_payload_is_write | main_sdram_choose_req_cmd_payload_is_read)); - assign main_sdram_cas_allowed = main_sdram_tccdcon_ready; - assign main_sdram_twtrcon_valid = ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); - assign main_sdram_read_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_read) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_read)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_read)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_read)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_read)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_read)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_read)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_read)); - assign main_sdram_write_available = ((((((((main_sdram_bankmachine0_cmd_valid & main_sdram_bankmachine0_cmd_payload_is_write) | (main_sdram_bankmachine1_cmd_valid & main_sdram_bankmachine1_cmd_payload_is_write)) | (main_sdram_bankmachine2_cmd_valid & main_sdram_bankmachine2_cmd_payload_is_write)) | (main_sdram_bankmachine3_cmd_valid & main_sdram_bankmachine3_cmd_payload_is_write)) | (main_sdram_bankmachine4_cmd_valid & main_sdram_bankmachine4_cmd_payload_is_write)) | (main_sdram_bankmachine5_cmd_valid & main_sdram_bankmachine5_cmd_payload_is_write)) | (main_sdram_bankmachine6_cmd_valid & main_sdram_bankmachine6_cmd_payload_is_write)) | (main_sdram_bankmachine7_cmd_valid & main_sdram_bankmachine7_cmd_payload_is_write)); - assign main_sdram_max_time0 = (main_sdram_time0 == 1'd0); - assign main_sdram_max_time1 = (main_sdram_time1 == 1'd0); - assign main_sdram_bankmachine0_refresh_req = main_sdram_cmd_valid; - assign main_sdram_bankmachine1_refresh_req = main_sdram_cmd_valid; - assign main_sdram_bankmachine2_refresh_req = main_sdram_cmd_valid; - assign main_sdram_bankmachine3_refresh_req = main_sdram_cmd_valid; - assign main_sdram_bankmachine4_refresh_req = main_sdram_cmd_valid; - assign main_sdram_bankmachine5_refresh_req = main_sdram_cmd_valid; - assign main_sdram_bankmachine6_refresh_req = main_sdram_cmd_valid; - assign main_sdram_bankmachine7_refresh_req = main_sdram_cmd_valid; - assign main_sdram_go_to_refresh = (((((((main_sdram_bankmachine0_refresh_gnt & main_sdram_bankmachine1_refresh_gnt) & main_sdram_bankmachine2_refresh_gnt) & main_sdram_bankmachine3_refresh_gnt) & main_sdram_bankmachine4_refresh_gnt) & main_sdram_bankmachine5_refresh_gnt) & main_sdram_bankmachine6_refresh_gnt) & main_sdram_bankmachine7_refresh_gnt); - assign main_sdram_interface_rdata = { - main_sdram_dfi_p3_rddata, - main_sdram_dfi_p2_rddata, - main_sdram_dfi_p1_rddata, - main_sdram_dfi_p0_rddata - }; - assign {main_sdram_dfi_p3_wrdata, main_sdram_dfi_p2_wrdata, main_sdram_dfi_p1_wrdata, main_sdram_dfi_p0_wrdata} = main_sdram_interface_wdata; - assign {main_sdram_dfi_p3_wrdata_mask, main_sdram_dfi_p2_wrdata_mask, main_sdram_dfi_p1_wrdata_mask, main_sdram_dfi_p0_wrdata_mask} = (~main_sdram_interface_wdata_we); - always @(*) begin - main_sdram_choose_cmd_valids <= 8'd0; - main_sdram_choose_cmd_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - main_sdram_choose_cmd_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_cmd_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_cmd_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_cmd_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_cmd_want_writes)))); - end - assign main_sdram_choose_cmd_request = main_sdram_choose_cmd_valids; - assign main_sdram_choose_cmd_cmd_valid = builder_rhs_array_muxed0; - assign main_sdram_choose_cmd_cmd_payload_a = builder_rhs_array_muxed1; - assign main_sdram_choose_cmd_cmd_payload_ba = builder_rhs_array_muxed2; - assign main_sdram_choose_cmd_cmd_payload_is_read = builder_rhs_array_muxed3; - assign main_sdram_choose_cmd_cmd_payload_is_write = builder_rhs_array_muxed4; - assign main_sdram_choose_cmd_cmd_payload_is_cmd = builder_rhs_array_muxed5; - always @(*) begin - main_sdram_choose_cmd_cmd_payload_cas <= 1'd0; - if (main_sdram_choose_cmd_cmd_valid) begin - main_sdram_choose_cmd_cmd_payload_cas <= builder_t_array_muxed0; - end - end - always @(*) begin - main_sdram_choose_cmd_cmd_payload_ras <= 1'd0; - if (main_sdram_choose_cmd_cmd_valid) begin - main_sdram_choose_cmd_cmd_payload_ras <= builder_t_array_muxed1; - end - end - always @(*) begin - main_sdram_choose_cmd_cmd_payload_we <= 1'd0; - if (main_sdram_choose_cmd_cmd_valid) begin - main_sdram_choose_cmd_cmd_payload_we <= builder_t_array_muxed2; - end - end - assign main_sdram_choose_cmd_ce = (main_sdram_choose_cmd_cmd_ready | (~main_sdram_choose_cmd_cmd_valid)); - always @(*) begin - main_sdram_choose_req_valids <= 8'd0; - main_sdram_choose_req_valids[0] <= (main_sdram_bankmachine0_cmd_valid & (((main_sdram_bankmachine0_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine0_cmd_payload_ras & (~main_sdram_bankmachine0_cmd_payload_cas)) & (~main_sdram_bankmachine0_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine0_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine0_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[1] <= (main_sdram_bankmachine1_cmd_valid & (((main_sdram_bankmachine1_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine1_cmd_payload_ras & (~main_sdram_bankmachine1_cmd_payload_cas)) & (~main_sdram_bankmachine1_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine1_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine1_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[2] <= (main_sdram_bankmachine2_cmd_valid & (((main_sdram_bankmachine2_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine2_cmd_payload_ras & (~main_sdram_bankmachine2_cmd_payload_cas)) & (~main_sdram_bankmachine2_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine2_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine2_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[3] <= (main_sdram_bankmachine3_cmd_valid & (((main_sdram_bankmachine3_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine3_cmd_payload_ras & (~main_sdram_bankmachine3_cmd_payload_cas)) & (~main_sdram_bankmachine3_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine3_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine3_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[4] <= (main_sdram_bankmachine4_cmd_valid & (((main_sdram_bankmachine4_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine4_cmd_payload_ras & (~main_sdram_bankmachine4_cmd_payload_cas)) & (~main_sdram_bankmachine4_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine4_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine4_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[5] <= (main_sdram_bankmachine5_cmd_valid & (((main_sdram_bankmachine5_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine5_cmd_payload_ras & (~main_sdram_bankmachine5_cmd_payload_cas)) & (~main_sdram_bankmachine5_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine5_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine5_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[6] <= (main_sdram_bankmachine6_cmd_valid & (((main_sdram_bankmachine6_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine6_cmd_payload_ras & (~main_sdram_bankmachine6_cmd_payload_cas)) & (~main_sdram_bankmachine6_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine6_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine6_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - main_sdram_choose_req_valids[7] <= (main_sdram_bankmachine7_cmd_valid & (((main_sdram_bankmachine7_cmd_payload_is_cmd & main_sdram_choose_req_want_cmds) & ((~((main_sdram_bankmachine7_cmd_payload_ras & (~main_sdram_bankmachine7_cmd_payload_cas)) & (~main_sdram_bankmachine7_cmd_payload_we))) | main_sdram_choose_req_want_activates)) | ((main_sdram_bankmachine7_cmd_payload_is_read == main_sdram_choose_req_want_reads) & (main_sdram_bankmachine7_cmd_payload_is_write == main_sdram_choose_req_want_writes)))); - end - assign main_sdram_choose_req_request = main_sdram_choose_req_valids; - assign main_sdram_choose_req_cmd_valid = builder_rhs_array_muxed6; - assign main_sdram_choose_req_cmd_payload_a = builder_rhs_array_muxed7; - assign main_sdram_choose_req_cmd_payload_ba = builder_rhs_array_muxed8; - assign main_sdram_choose_req_cmd_payload_is_read = builder_rhs_array_muxed9; - assign main_sdram_choose_req_cmd_payload_is_write = builder_rhs_array_muxed10; - assign main_sdram_choose_req_cmd_payload_is_cmd = builder_rhs_array_muxed11; - always @(*) begin - main_sdram_choose_req_cmd_payload_cas <= 1'd0; - if (main_sdram_choose_req_cmd_valid) begin - main_sdram_choose_req_cmd_payload_cas <= builder_t_array_muxed3; - end - end - always @(*) begin - main_sdram_choose_req_cmd_payload_ras <= 1'd0; - if (main_sdram_choose_req_cmd_valid) begin - main_sdram_choose_req_cmd_payload_ras <= builder_t_array_muxed4; - end - end - always @(*) begin - main_sdram_choose_req_cmd_payload_we <= 1'd0; - if (main_sdram_choose_req_cmd_valid) begin - main_sdram_choose_req_cmd_payload_we <= builder_t_array_muxed5; - end - end - always @(*) begin - main_sdram_bankmachine0_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd0))) begin - main_sdram_bankmachine0_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd0))) begin - main_sdram_bankmachine0_cmd_ready <= 1'd1; - end - end - always @(*) begin - main_sdram_bankmachine1_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 1'd1))) begin - main_sdram_bankmachine1_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 1'd1))) begin - main_sdram_bankmachine1_cmd_ready <= 1'd1; - end - end - always @(*) begin - main_sdram_bankmachine2_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd2))) begin - main_sdram_bankmachine2_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd2))) begin - main_sdram_bankmachine2_cmd_ready <= 1'd1; - end - end - always @(*) begin - main_sdram_bankmachine3_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 2'd3))) begin - main_sdram_bankmachine3_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 2'd3))) begin - main_sdram_bankmachine3_cmd_ready <= 1'd1; - end - end - always @(*) begin - main_sdram_bankmachine4_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd4))) begin - main_sdram_bankmachine4_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd4))) begin - main_sdram_bankmachine4_cmd_ready <= 1'd1; - end - end - always @(*) begin - main_sdram_bankmachine5_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd5))) begin - main_sdram_bankmachine5_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd5))) begin - main_sdram_bankmachine5_cmd_ready <= 1'd1; - end - end - always @(*) begin - main_sdram_bankmachine6_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd6))) begin - main_sdram_bankmachine6_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd6))) begin - main_sdram_bankmachine6_cmd_ready <= 1'd1; - end - end - always @(*) begin - main_sdram_bankmachine7_cmd_ready <= 1'd0; - if (((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & (main_sdram_choose_cmd_grant == 3'd7))) begin - main_sdram_bankmachine7_cmd_ready <= 1'd1; - end - if (((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & (main_sdram_choose_req_grant == 3'd7))) begin - main_sdram_bankmachine7_cmd_ready <= 1'd1; - end - end - assign main_sdram_choose_req_ce = (main_sdram_choose_req_cmd_ready | (~main_sdram_choose_req_cmd_valid)); - assign main_sdram_dfi_p0_reset_n = 1'd1; - assign main_sdram_dfi_p0_cke = {1{main_sdram_steerer0}}; - assign main_sdram_dfi_p0_odt = {1{main_sdram_steerer1}}; - assign main_sdram_dfi_p1_reset_n = 1'd1; - assign main_sdram_dfi_p1_cke = {1{main_sdram_steerer2}}; - assign main_sdram_dfi_p1_odt = {1{main_sdram_steerer3}}; - assign main_sdram_dfi_p2_reset_n = 1'd1; - assign main_sdram_dfi_p2_cke = {1{main_sdram_steerer4}}; - assign main_sdram_dfi_p2_odt = {1{main_sdram_steerer5}}; - assign main_sdram_dfi_p3_reset_n = 1'd1; - assign main_sdram_dfi_p3_cke = {1{main_sdram_steerer6}}; - assign main_sdram_dfi_p3_odt = {1{main_sdram_steerer7}}; - assign main_sdram_tfawcon_count = (((main_sdram_tfawcon_window[0] + main_sdram_tfawcon_window[1]) + main_sdram_tfawcon_window[2]) + main_sdram_tfawcon_window[3]); - always @(*) begin - main_sdram_choose_req_cmd_ready <= 1'd0; - main_sdram_steerer_sel0 <= 2'd0; - main_sdram_steerer_sel1 <= 2'd0; - main_sdram_steerer_sel2 <= 2'd0; - main_sdram_choose_cmd_want_activates <= 1'd0; - main_sdram_en0 <= 1'd0; - main_sdram_steerer_sel3 <= 2'd0; - builder_multiplexer_next_state <= 4'd0; - main_sdram_choose_cmd_cmd_ready <= 1'd0; - main_sdram_choose_req_want_reads <= 1'd0; - main_sdram_cmd_ready <= 1'd0; - main_sdram_choose_req_want_writes <= 1'd0; - main_sdram_en1 <= 1'd0; - builder_multiplexer_next_state <= builder_multiplexer_state; - case (builder_multiplexer_state) - 1'd1: begin - main_sdram_en1 <= 1'd1; - main_sdram_choose_req_want_writes <= 1'd1; - if (1'd0) begin - main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); - end else begin - main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; - main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); - main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; - end - main_sdram_steerer_sel0 <= 1'd0; - main_sdram_steerer_sel1 <= 1'd0; - main_sdram_steerer_sel2 <= 1'd1; - main_sdram_steerer_sel3 <= 2'd2; - if (main_sdram_read_available) begin - if (((~main_sdram_write_available) | main_sdram_max_time1)) begin - builder_multiplexer_next_state <= 2'd3; - end - end - if (main_sdram_go_to_refresh) begin - builder_multiplexer_next_state <= 2'd2; - end - end - 2'd2: begin - main_sdram_steerer_sel0 <= 2'd3; - main_sdram_cmd_ready <= 1'd1; - if (main_sdram_cmd_last) begin - builder_multiplexer_next_state <= 1'd0; - end - end - 2'd3: begin - if (main_sdram_twtrcon_ready) begin - builder_multiplexer_next_state <= 1'd0; - end - end - 3'd4: begin - builder_multiplexer_next_state <= 3'd5; - end - 3'd5: begin - builder_multiplexer_next_state <= 3'd6; - end - 3'd6: begin - builder_multiplexer_next_state <= 3'd7; - end - 3'd7: begin - builder_multiplexer_next_state <= 4'd8; - end - 4'd8: begin - builder_multiplexer_next_state <= 4'd9; - end - 4'd9: begin - builder_multiplexer_next_state <= 4'd10; - end - 4'd10: begin - builder_multiplexer_next_state <= 4'd11; - end - 4'd11: begin - builder_multiplexer_next_state <= 1'd1; - end - default: begin - main_sdram_en0 <= 1'd1; - main_sdram_choose_req_want_reads <= 1'd1; - if (1'd0) begin - main_sdram_choose_req_cmd_ready <= (main_sdram_cas_allowed & ((~((main_sdram_choose_req_cmd_payload_ras & (~main_sdram_choose_req_cmd_payload_cas)) & (~main_sdram_choose_req_cmd_payload_we))) | main_sdram_ras_allowed)); - end else begin - main_sdram_choose_cmd_want_activates <= main_sdram_ras_allowed; - main_sdram_choose_cmd_cmd_ready <= ((~((main_sdram_choose_cmd_cmd_payload_ras & (~main_sdram_choose_cmd_cmd_payload_cas)) & (~main_sdram_choose_cmd_cmd_payload_we))) | main_sdram_ras_allowed); - main_sdram_choose_req_cmd_ready <= main_sdram_cas_allowed; - end - main_sdram_steerer_sel0 <= 1'd0; - main_sdram_steerer_sel1 <= 1'd1; - main_sdram_steerer_sel2 <= 2'd2; - main_sdram_steerer_sel3 <= 1'd0; - if (main_sdram_write_available) begin - if (((~main_sdram_read_available) | main_sdram_max_time0)) begin - builder_multiplexer_next_state <= 3'd4; - end - end - if (main_sdram_go_to_refresh) begin - builder_multiplexer_next_state <= 2'd2; - end - end - endcase - end - assign builder_roundrobin0_request = { - (((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) - }; - assign builder_roundrobin0_ce = ((~main_sdram_interface_bank0_valid) & (~main_sdram_interface_bank0_lock)); - assign main_sdram_interface_bank0_addr = builder_rhs_array_muxed12; - assign main_sdram_interface_bank0_we = builder_rhs_array_muxed13; - assign main_sdram_interface_bank0_valid = builder_rhs_array_muxed14; - assign builder_roundrobin1_request = { - (((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) - }; - assign builder_roundrobin1_ce = ((~main_sdram_interface_bank1_valid) & (~main_sdram_interface_bank1_lock)); - assign main_sdram_interface_bank1_addr = builder_rhs_array_muxed15; - assign main_sdram_interface_bank1_we = builder_rhs_array_muxed16; - assign main_sdram_interface_bank1_valid = builder_rhs_array_muxed17; - assign builder_roundrobin2_request = { - (((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) - }; - assign builder_roundrobin2_ce = ((~main_sdram_interface_bank2_valid) & (~main_sdram_interface_bank2_lock)); - assign main_sdram_interface_bank2_addr = builder_rhs_array_muxed18; - assign main_sdram_interface_bank2_we = builder_rhs_array_muxed19; - assign main_sdram_interface_bank2_valid = builder_rhs_array_muxed20; - assign builder_roundrobin3_request = { - (((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) - }; - assign builder_roundrobin3_ce = ((~main_sdram_interface_bank3_valid) & (~main_sdram_interface_bank3_lock)); - assign main_sdram_interface_bank3_addr = builder_rhs_array_muxed21; - assign main_sdram_interface_bank3_we = builder_rhs_array_muxed22; - assign main_sdram_interface_bank3_valid = builder_rhs_array_muxed23; - assign builder_roundrobin4_request = { - (((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) - }; - assign builder_roundrobin4_ce = ((~main_sdram_interface_bank4_valid) & (~main_sdram_interface_bank4_lock)); - assign main_sdram_interface_bank4_addr = builder_rhs_array_muxed24; - assign main_sdram_interface_bank4_we = builder_rhs_array_muxed25; - assign main_sdram_interface_bank4_valid = builder_rhs_array_muxed26; - assign builder_roundrobin5_request = { - (((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) - }; - assign builder_roundrobin5_ce = ((~main_sdram_interface_bank5_valid) & (~main_sdram_interface_bank5_lock)); - assign main_sdram_interface_bank5_addr = builder_rhs_array_muxed27; - assign main_sdram_interface_bank5_we = builder_rhs_array_muxed28; - assign main_sdram_interface_bank5_valid = builder_rhs_array_muxed29; - assign builder_roundrobin6_request = { - (((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid) - }; - assign builder_roundrobin6_ce = ((~main_sdram_interface_bank6_valid) & (~main_sdram_interface_bank6_lock)); - assign main_sdram_interface_bank6_addr = builder_rhs_array_muxed30; - assign main_sdram_interface_bank6_we = builder_rhs_array_muxed31; - assign main_sdram_interface_bank6_valid = builder_rhs_array_muxed32; - assign builder_roundrobin7_request = { - (((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid) - }; - assign builder_roundrobin7_ce = ((~main_sdram_interface_bank7_valid) & (~main_sdram_interface_bank7_lock)); - assign main_sdram_interface_bank7_addr = builder_rhs_array_muxed33; - assign main_sdram_interface_bank7_we = builder_rhs_array_muxed34; - assign main_sdram_interface_bank7_valid = builder_rhs_array_muxed35; - assign main_port_cmd_ready = ((((((((1'd0 | (((builder_roundrobin0_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank0_ready)) | (((builder_roundrobin1_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank1_ready)) | (((builder_roundrobin2_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank2_ready)) | (((builder_roundrobin3_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank3_ready)) | (((builder_roundrobin4_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank4_ready)) | (((builder_roundrobin5_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank5_ready)) | (((builder_roundrobin6_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0)))))) & main_sdram_interface_bank6_ready)) | (((builder_roundrobin7_grant == 1'd0) & ((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0)))))) & main_sdram_interface_bank7_ready)); - assign main_port_wdata_ready = builder_new_master_wdata_ready2; - assign main_port_rdata_valid = builder_new_master_rdata_valid9; - always @(*) begin - main_sdram_interface_wdata <= 128'd0; - main_sdram_interface_wdata_we <= 16'd0; - case ({ - builder_new_master_wdata_ready2 - }) - 1'd1: begin - main_sdram_interface_wdata <= main_port_wdata_payload_data; - main_sdram_interface_wdata_we <= main_port_wdata_payload_we; - end - default: begin - main_sdram_interface_wdata <= 1'd0; - main_sdram_interface_wdata_we <= 1'd0; - end - endcase - end - assign main_port_rdata_payload_data = main_sdram_interface_rdata; - assign builder_roundrobin0_grant = 1'd0; - assign builder_roundrobin1_grant = 1'd0; - assign builder_roundrobin2_grant = 1'd0; - assign builder_roundrobin3_grant = 1'd0; - assign builder_roundrobin4_grant = 1'd0; - assign builder_roundrobin5_grant = 1'd0; - assign builder_roundrobin6_grant = 1'd0; - assign builder_roundrobin7_grant = 1'd0; - assign main_data_port_adr = main_interface0_wb_sdram_adr[10:2]; - always @(*) begin - main_data_port_we <= 16'd0; - main_data_port_dat_w <= 128'd0; - if (main_write_from_slave) begin - main_data_port_dat_w <= main_dat_r; - main_data_port_we <= {16{1'd1}}; - end else begin - main_data_port_dat_w <= {4{main_interface0_wb_sdram_dat_w}}; - if ((((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb) & main_interface0_wb_sdram_we) & main_interface0_wb_sdram_ack)) begin - main_data_port_we <= { - ({4{(main_interface0_wb_sdram_adr[1:0] == 1'd0)}} & main_interface0_wb_sdram_sel), - ({4{(main_interface0_wb_sdram_adr[1:0] == 1'd1)}} & main_interface0_wb_sdram_sel), - ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd2)}} & main_interface0_wb_sdram_sel), - ({4{(main_interface0_wb_sdram_adr[1:0] == 2'd3)}} & main_interface0_wb_sdram_sel) - }; - end - end - end - assign main_dat_w = main_data_port_dat_r; - assign main_sel = 16'd65535; - always @(*) begin - main_interface0_wb_sdram_dat_r <= 32'd0; - case (main_adr_offset_r) - 1'd0: begin - main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[127:96]; - end - 1'd1: begin - main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[95:64]; - end - 2'd2: begin - main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[63:32]; - end - default: begin - main_interface0_wb_sdram_dat_r <= main_data_port_dat_r[31:0]; - end - endcase - end - assign {main_tag_do_dirty, main_tag_do_tag} = main_tag_port_dat_r; - assign main_tag_port_dat_w = {main_tag_di_dirty, main_tag_di_tag}; - assign main_tag_port_adr = main_interface0_wb_sdram_adr[10:2]; - assign main_tag_di_tag = main_interface0_wb_sdram_adr[29:11]; - assign main_adr = {main_tag_do_tag, main_interface0_wb_sdram_adr[10:2]}; - always @(*) begin - main_tag_di_dirty <= 1'd0; - main_interface0_wb_sdram_ack <= 1'd0; - main_word_clr <= 1'd0; - main_word_inc <= 1'd0; - main_write_from_slave <= 1'd0; - main_cyc <= 1'd0; - main_stb <= 1'd0; - main_tag_port_we <= 1'd0; - main_we <= 1'd0; - builder_fullmemorywe_next_state <= 2'd0; - builder_fullmemorywe_next_state <= builder_fullmemorywe_state; - case (builder_fullmemorywe_state) - 1'd1: begin - main_word_clr <= 1'd1; - if ((main_tag_do_tag == main_interface0_wb_sdram_adr[29:11])) begin - main_interface0_wb_sdram_ack <= 1'd1; - if (main_interface0_wb_sdram_we) begin - main_tag_di_dirty <= 1'd1; - main_tag_port_we <= 1'd1; - end - builder_fullmemorywe_next_state <= 1'd0; - end else begin - if (main_tag_do_dirty) begin - builder_fullmemorywe_next_state <= 2'd2; - end else begin - main_tag_port_we <= 1'd1; - main_word_clr <= 1'd1; - builder_fullmemorywe_next_state <= 2'd3; - end - end - end - 2'd2: begin - main_stb <= 1'd1; - main_cyc <= 1'd1; - main_we <= 1'd1; - if (main_ack) begin - main_word_inc <= 1'd1; - if (1'd1) begin - main_tag_port_we <= 1'd1; - main_word_clr <= 1'd1; - builder_fullmemorywe_next_state <= 2'd3; - end - end - end - 2'd3: begin - main_stb <= 1'd1; - main_cyc <= 1'd1; - main_we <= 1'd0; - if (main_ack) begin - main_write_from_slave <= 1'd1; - main_word_inc <= 1'd1; - if (1'd1) begin - builder_fullmemorywe_next_state <= 1'd1; - end else begin - builder_fullmemorywe_next_state <= 2'd3; - end - end - end - default: begin - if ((main_interface0_wb_sdram_cyc & main_interface0_wb_sdram_stb)) begin - builder_fullmemorywe_next_state <= 1'd1; - end - end - endcase - end - assign main_wdata_converter_sink_valid = ((main_cyc & main_stb) & main_we); - assign main_wdata_converter_sink_payload_data = main_dat_w; - assign main_wdata_converter_sink_payload_we = main_sel; - assign main_port_wdata_valid = main_wdata_converter_source_valid; - assign main_wdata_converter_source_ready = main_port_wdata_ready; - assign main_port_wdata_first = main_wdata_converter_source_first; - assign main_port_wdata_last = main_wdata_converter_source_last; - assign main_port_wdata_payload_data = main_wdata_converter_source_payload_data; - assign main_port_wdata_payload_we = main_wdata_converter_source_payload_we; - assign main_rdata_converter_sink_valid = main_port_rdata_valid; - assign main_port_rdata_ready = main_rdata_converter_sink_ready; - assign main_rdata_converter_sink_first = main_port_rdata_first; - assign main_rdata_converter_sink_last = main_port_rdata_last; - assign main_rdata_converter_sink_payload_data = main_port_rdata_payload_data; - assign main_rdata_converter_source_ready = 1'd1; - assign main_dat_r = main_rdata_converter_source_payload_data; - assign main_wdata_converter_converter_sink_valid = main_wdata_converter_sink_valid; - assign main_wdata_converter_converter_sink_first = main_wdata_converter_sink_first; - assign main_wdata_converter_converter_sink_last = main_wdata_converter_sink_last; - assign main_wdata_converter_sink_ready = main_wdata_converter_converter_sink_ready; - assign main_wdata_converter_converter_sink_payload_data = { - main_wdata_converter_sink_payload_we, main_wdata_converter_sink_payload_data - }; - assign main_wdata_converter_source_valid = main_wdata_converter_source_source_valid; - assign main_wdata_converter_source_first = main_wdata_converter_source_source_first; - assign main_wdata_converter_source_last = main_wdata_converter_source_source_last; - assign main_wdata_converter_source_source_ready = main_wdata_converter_source_ready; - assign {main_wdata_converter_source_payload_we, main_wdata_converter_source_payload_data} = main_wdata_converter_source_source_payload_data; - assign main_wdata_converter_source_source_valid = main_wdata_converter_converter_source_valid; - assign main_wdata_converter_converter_source_ready = main_wdata_converter_source_source_ready; - assign main_wdata_converter_source_source_first = main_wdata_converter_converter_source_first; - assign main_wdata_converter_source_source_last = main_wdata_converter_converter_source_last; - assign main_wdata_converter_source_source_payload_data = main_wdata_converter_converter_source_payload_data; - assign main_wdata_converter_converter_source_valid = main_wdata_converter_converter_sink_valid; - assign main_wdata_converter_converter_sink_ready = main_wdata_converter_converter_source_ready; - assign main_wdata_converter_converter_source_first = main_wdata_converter_converter_sink_first; - assign main_wdata_converter_converter_source_last = main_wdata_converter_converter_sink_last; - assign main_wdata_converter_converter_source_payload_data = main_wdata_converter_converter_sink_payload_data; - assign main_wdata_converter_converter_source_payload_valid_token_count = 1'd1; - assign main_rdata_converter_converter_sink_valid = main_rdata_converter_sink_valid; - assign main_rdata_converter_converter_sink_first = main_rdata_converter_sink_first; - assign main_rdata_converter_converter_sink_last = main_rdata_converter_sink_last; - assign main_rdata_converter_sink_ready = main_rdata_converter_converter_sink_ready; - assign main_rdata_converter_converter_sink_payload_data = { - main_rdata_converter_sink_payload_data - }; - assign main_rdata_converter_source_valid = main_rdata_converter_source_source_valid; - assign main_rdata_converter_source_first = main_rdata_converter_source_source_first; - assign main_rdata_converter_source_last = main_rdata_converter_source_source_last; - assign main_rdata_converter_source_source_ready = main_rdata_converter_source_ready; - assign {main_rdata_converter_source_payload_data} = main_rdata_converter_source_source_payload_data; - assign main_rdata_converter_source_source_valid = main_rdata_converter_converter_source_valid; - assign main_rdata_converter_converter_source_ready = main_rdata_converter_source_source_ready; - assign main_rdata_converter_source_source_first = main_rdata_converter_converter_source_first; - assign main_rdata_converter_source_source_last = main_rdata_converter_converter_source_last; - assign main_rdata_converter_source_source_payload_data = main_rdata_converter_converter_source_payload_data; - assign main_rdata_converter_converter_source_valid = main_rdata_converter_converter_sink_valid; - assign main_rdata_converter_converter_sink_ready = main_rdata_converter_converter_source_ready; - assign main_rdata_converter_converter_source_first = main_rdata_converter_converter_sink_first; - assign main_rdata_converter_converter_source_last = main_rdata_converter_converter_sink_last; - assign main_rdata_converter_converter_source_payload_data = main_rdata_converter_converter_sink_payload_data; - assign main_rdata_converter_converter_source_payload_valid_token_count = 1'd1; - always @(*) begin - builder_litedramwishbone2native_next_state <= 2'd0; - main_ack <= 1'd0; - main_port_cmd_payload_we <= 1'd0; - main_port_cmd_payload_addr <= 24'd0; - main_count_next_value <= 1'd0; - main_count_next_value_ce <= 1'd0; - main_port_cmd_valid <= 1'd0; - builder_litedramwishbone2native_next_state <= builder_litedramwishbone2native_state; - case (builder_litedramwishbone2native_state) - 1'd1: begin - if (main_wdata_converter_sink_ready) begin - main_ack <= 1'd1; - builder_litedramwishbone2native_next_state <= 1'd0; - end - end - 2'd2: begin - if (main_rdata_converter_source_valid) begin - main_ack <= 1'd1; - builder_litedramwishbone2native_next_state <= 1'd0; - end - end - default: begin - main_port_cmd_valid <= (main_cyc & main_stb); - main_port_cmd_payload_we <= main_we; - main_port_cmd_payload_addr <= (((main_adr * 1'd1) + main_count) - 1'd0); - if ((main_port_cmd_valid & main_port_cmd_ready)) begin - main_count_next_value <= (main_count + 1'd1); - main_count_next_value_ce <= 1'd1; - if ((main_count == 1'd0)) begin - main_count_next_value <= 1'd0; - main_count_next_value_ce <= 1'd1; - if (main_we) begin - builder_litedramwishbone2native_next_state <= 1'd1; - end else begin - builder_litedramwishbone2native_next_state <= 2'd2; - end - end - end - end - endcase - end - assign main_interface0_wb_sdram_adr = builder_rhs_array_muxed36; - assign main_interface0_wb_sdram_dat_w = builder_rhs_array_muxed37; - assign main_interface0_wb_sdram_sel = builder_rhs_array_muxed38; - assign main_interface0_wb_sdram_cyc = builder_rhs_array_muxed39; - assign main_interface0_wb_sdram_stb = builder_rhs_array_muxed40; - assign main_interface0_wb_sdram_we = builder_rhs_array_muxed41; - assign main_interface0_wb_sdram_cti = builder_rhs_array_muxed42; - assign main_interface0_wb_sdram_bte = builder_rhs_array_muxed43; - assign main_interface1_wb_sdram_dat_r = main_interface0_wb_sdram_dat_r; - assign main_interface1_wb_sdram_ack = (main_interface0_wb_sdram_ack & (builder_wb_sdram_con_grant == 1'd0)); - assign main_interface1_wb_sdram_err = (main_interface0_wb_sdram_err & (builder_wb_sdram_con_grant == 1'd0)); - assign builder_wb_sdram_con_request = {main_interface1_wb_sdram_cyc}; - assign builder_wb_sdram_con_grant = 1'd0; - assign builder_minsoc_shared_adr = builder_rhs_array_muxed44; - assign builder_minsoc_shared_dat_w = builder_rhs_array_muxed45; - assign builder_minsoc_shared_sel = builder_rhs_array_muxed46; - assign builder_minsoc_shared_cyc = builder_rhs_array_muxed47; - assign builder_minsoc_shared_stb = builder_rhs_array_muxed48; - assign builder_minsoc_shared_we = builder_rhs_array_muxed49; - assign builder_minsoc_shared_cti = builder_rhs_array_muxed50; - assign builder_minsoc_shared_bte = builder_rhs_array_muxed51; - assign main_minsoc_interface0_soc_bus_dat_r = builder_minsoc_shared_dat_r; - assign main_minsoc_interface1_soc_bus_dat_r = builder_minsoc_shared_dat_r; - assign main_minsoc_interface0_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd0)); - assign main_minsoc_interface1_soc_bus_ack = (builder_minsoc_shared_ack & (builder_minsoc_grant == 1'd1)); - assign main_minsoc_interface0_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd0)); - assign main_minsoc_interface1_soc_bus_err = (builder_minsoc_shared_err & (builder_minsoc_grant == 1'd1)); - assign builder_minsoc_request = { - main_minsoc_interface1_soc_bus_cyc, main_minsoc_interface0_soc_bus_cyc - }; - always @(*) begin - builder_minsoc_slave_sel <= 4'd0; - builder_minsoc_slave_sel[0] <= (builder_minsoc_shared_adr[28:13] == 1'd0); - builder_minsoc_slave_sel[1] <= (builder_minsoc_shared_adr[28:10] == 13'd4096); - builder_minsoc_slave_sel[2] <= (builder_minsoc_shared_adr[28:14] == 10'd512); - builder_minsoc_slave_sel[3] <= (builder_minsoc_shared_adr[28:26] == 3'd4); - end - assign main_minsoc_rom_bus_adr = builder_minsoc_shared_adr; - assign main_minsoc_rom_bus_dat_w = builder_minsoc_shared_dat_w; - assign main_minsoc_rom_bus_sel = builder_minsoc_shared_sel; - assign main_minsoc_rom_bus_stb = builder_minsoc_shared_stb; - assign main_minsoc_rom_bus_we = builder_minsoc_shared_we; - assign main_minsoc_rom_bus_cti = builder_minsoc_shared_cti; - assign main_minsoc_rom_bus_bte = builder_minsoc_shared_bte; - assign main_minsoc_sram_bus_adr = builder_minsoc_shared_adr; - assign main_minsoc_sram_bus_dat_w = builder_minsoc_shared_dat_w; - assign main_minsoc_sram_bus_sel = builder_minsoc_shared_sel; - assign main_minsoc_sram_bus_stb = builder_minsoc_shared_stb; - assign main_minsoc_sram_bus_we = builder_minsoc_shared_we; - assign main_minsoc_sram_bus_cti = builder_minsoc_shared_cti; - assign main_minsoc_sram_bus_bte = builder_minsoc_shared_bte; - assign main_minsoc_bus_wishbone_adr = builder_minsoc_shared_adr; - assign main_minsoc_bus_wishbone_dat_w = builder_minsoc_shared_dat_w; - assign main_minsoc_bus_wishbone_sel = builder_minsoc_shared_sel; - assign main_minsoc_bus_wishbone_stb = builder_minsoc_shared_stb; - assign main_minsoc_bus_wishbone_we = builder_minsoc_shared_we; - assign main_minsoc_bus_wishbone_cti = builder_minsoc_shared_cti; - assign main_minsoc_bus_wishbone_bte = builder_minsoc_shared_bte; - assign main_interface1_wb_sdram_adr = builder_minsoc_shared_adr; - assign main_interface1_wb_sdram_dat_w = builder_minsoc_shared_dat_w; - assign main_interface1_wb_sdram_sel = builder_minsoc_shared_sel; - assign main_interface1_wb_sdram_stb = builder_minsoc_shared_stb; - assign main_interface1_wb_sdram_we = builder_minsoc_shared_we; - assign main_interface1_wb_sdram_cti = builder_minsoc_shared_cti; - assign main_interface1_wb_sdram_bte = builder_minsoc_shared_bte; - assign main_minsoc_rom_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[0]); - assign main_minsoc_sram_bus_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[1]); - assign main_minsoc_bus_wishbone_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[2]); - assign main_interface1_wb_sdram_cyc = (builder_minsoc_shared_cyc & builder_minsoc_slave_sel[3]); - assign builder_minsoc_shared_err = (((main_minsoc_rom_bus_err | main_minsoc_sram_bus_err) | main_minsoc_bus_wishbone_err) | main_interface1_wb_sdram_err); - assign builder_minsoc_wait = ((builder_minsoc_shared_stb & builder_minsoc_shared_cyc) & (~builder_minsoc_shared_ack)); - always @(*) begin - builder_minsoc_shared_ack <= 1'd0; - builder_minsoc_error <= 1'd0; - builder_minsoc_shared_dat_r <= 32'd0; - builder_minsoc_shared_ack <= (((main_minsoc_rom_bus_ack | main_minsoc_sram_bus_ack) | main_minsoc_bus_wishbone_ack) | main_interface1_wb_sdram_ack); - builder_minsoc_shared_dat_r <= (((({32{builder_minsoc_slave_sel_r[0]}} & main_minsoc_rom_bus_dat_r) | ({32{builder_minsoc_slave_sel_r[1]}} & main_minsoc_sram_bus_dat_r)) | ({32{builder_minsoc_slave_sel_r[2]}} & main_minsoc_bus_wishbone_dat_r)) | ({32{builder_minsoc_slave_sel_r[3]}} & main_interface1_wb_sdram_dat_r)); - if (builder_minsoc_done) begin - builder_minsoc_shared_dat_r <= 32'd4294967295; - builder_minsoc_shared_ack <= 1'd1; - builder_minsoc_error <= 1'd1; - end - end - assign builder_minsoc_done = (builder_minsoc_count == 1'd0); - assign builder_minsoc_csrbank0_sel = (builder_minsoc_interface0_bank_bus_adr[13:9] == 1'd0); - assign builder_minsoc_csrbank0_reset0_r = builder_minsoc_interface0_bank_bus_dat_w[0]; - assign builder_minsoc_csrbank0_reset0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); - assign builder_minsoc_csrbank0_reset0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd0)); - assign builder_minsoc_csrbank0_scratch3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank0_scratch3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); - assign builder_minsoc_csrbank0_scratch3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 1'd1)); - assign builder_minsoc_csrbank0_scratch2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank0_scratch2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); - assign builder_minsoc_csrbank0_scratch2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd2)); - assign builder_minsoc_csrbank0_scratch1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank0_scratch1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); - assign builder_minsoc_csrbank0_scratch1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 2'd3)); - assign builder_minsoc_csrbank0_scratch0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank0_scratch0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); - assign builder_minsoc_csrbank0_scratch0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd4)); - assign builder_minsoc_csrbank0_bus_errors3_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank0_bus_errors3_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); - assign builder_minsoc_csrbank0_bus_errors3_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd5)); - assign builder_minsoc_csrbank0_bus_errors2_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank0_bus_errors2_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); - assign builder_minsoc_csrbank0_bus_errors2_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd6)); - assign builder_minsoc_csrbank0_bus_errors1_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank0_bus_errors1_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); - assign builder_minsoc_csrbank0_bus_errors1_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 3'd7)); - assign builder_minsoc_csrbank0_bus_errors0_r = builder_minsoc_interface0_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank0_bus_errors0_re = ((builder_minsoc_csrbank0_sel & builder_minsoc_interface0_bank_bus_we) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); - assign builder_minsoc_csrbank0_bus_errors0_we = ((builder_minsoc_csrbank0_sel & (~builder_minsoc_interface0_bank_bus_we)) & (builder_minsoc_interface0_bank_bus_adr[3:0] == 4'd8)); - assign builder_minsoc_csrbank0_reset0_w = main_minsoc_ctrl_reset_storage; - assign builder_minsoc_csrbank0_scratch3_w = main_minsoc_ctrl_scratch_storage[31:24]; - assign builder_minsoc_csrbank0_scratch2_w = main_minsoc_ctrl_scratch_storage[23:16]; - assign builder_minsoc_csrbank0_scratch1_w = main_minsoc_ctrl_scratch_storage[15:8]; - assign builder_minsoc_csrbank0_scratch0_w = main_minsoc_ctrl_scratch_storage[7:0]; - assign builder_minsoc_csrbank0_bus_errors3_w = main_minsoc_ctrl_bus_errors_status[31:24]; - assign builder_minsoc_csrbank0_bus_errors2_w = main_minsoc_ctrl_bus_errors_status[23:16]; - assign builder_minsoc_csrbank0_bus_errors1_w = main_minsoc_ctrl_bus_errors_status[15:8]; - assign builder_minsoc_csrbank0_bus_errors0_w = main_minsoc_ctrl_bus_errors_status[7:0]; - assign main_minsoc_ctrl_bus_errors_we = builder_minsoc_csrbank0_bus_errors0_we; - assign builder_minsoc_csrbank1_sel = (builder_minsoc_interface1_bank_bus_adr[13:9] == 3'd5); - assign builder_minsoc_csrbank1_half_sys8x_taps0_r = builder_minsoc_interface1_bank_bus_dat_w[4:0]; - assign builder_minsoc_csrbank1_half_sys8x_taps0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); - assign builder_minsoc_csrbank1_half_sys8x_taps0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd0)); - assign main_a7ddrphy_cdly_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; - assign main_a7ddrphy_cdly_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); - assign main_a7ddrphy_cdly_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 1'd1)); - assign main_a7ddrphy_cdly_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; - assign main_a7ddrphy_cdly_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); - assign main_a7ddrphy_cdly_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd2)); - assign builder_minsoc_csrbank1_dly_sel0_r = builder_minsoc_interface1_bank_bus_dat_w[1:0]; - assign builder_minsoc_csrbank1_dly_sel0_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); - assign builder_minsoc_csrbank1_dly_sel0_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 2'd3)); - assign main_a7ddrphy_rdly_dq_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; - assign main_a7ddrphy_rdly_dq_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); - assign main_a7ddrphy_rdly_dq_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd4)); - assign main_a7ddrphy_rdly_dq_inc_r = builder_minsoc_interface1_bank_bus_dat_w[0]; - assign main_a7ddrphy_rdly_dq_inc_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); - assign main_a7ddrphy_rdly_dq_inc_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd5)); - assign main_a7ddrphy_rdly_dq_bitslip_rst_r = builder_minsoc_interface1_bank_bus_dat_w[0]; - assign main_a7ddrphy_rdly_dq_bitslip_rst_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); - assign main_a7ddrphy_rdly_dq_bitslip_rst_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd6)); - assign main_a7ddrphy_rdly_dq_bitslip_r = builder_minsoc_interface1_bank_bus_dat_w[0]; - assign main_a7ddrphy_rdly_dq_bitslip_re = ((builder_minsoc_csrbank1_sel & builder_minsoc_interface1_bank_bus_we) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); - assign main_a7ddrphy_rdly_dq_bitslip_we = ((builder_minsoc_csrbank1_sel & (~builder_minsoc_interface1_bank_bus_we)) & (builder_minsoc_interface1_bank_bus_adr[2:0] == 3'd7)); - assign builder_minsoc_csrbank1_half_sys8x_taps0_w = main_a7ddrphy_half_sys8x_taps_storage[4:0]; - assign builder_minsoc_csrbank1_dly_sel0_w = main_a7ddrphy_dly_sel_storage[1:0]; - assign builder_minsoc_csrbank2_sel = (builder_minsoc_interface2_bank_bus_adr[13:9] == 4'd8); - assign builder_minsoc_csrbank2_dfii_control0_r = builder_minsoc_interface2_bank_bus_dat_w[3:0]; - assign builder_minsoc_csrbank2_dfii_control0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); - assign builder_minsoc_csrbank2_dfii_control0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd0)); - assign builder_minsoc_csrbank2_dfii_pi0_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; - assign builder_minsoc_csrbank2_dfii_pi0_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); - assign builder_minsoc_csrbank2_dfii_pi0_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 1'd1)); - assign main_sdram_phaseinjector0_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; - assign main_sdram_phaseinjector0_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); - assign main_sdram_phaseinjector0_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd2)); - assign builder_minsoc_csrbank2_dfii_pi0_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; - assign builder_minsoc_csrbank2_dfii_pi0_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); - assign builder_minsoc_csrbank2_dfii_pi0_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 2'd3)); - assign builder_minsoc_csrbank2_dfii_pi0_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); - assign builder_minsoc_csrbank2_dfii_pi0_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd4)); - assign builder_minsoc_csrbank2_dfii_pi0_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; - assign builder_minsoc_csrbank2_dfii_pi0_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); - assign builder_minsoc_csrbank2_dfii_pi0_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd5)); - assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); - assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd6)); - assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); - assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 3'd7)); - assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); - assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd8)); - assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); - assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd9)); - assign builder_minsoc_csrbank2_dfii_pi0_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); - assign builder_minsoc_csrbank2_dfii_pi0_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd10)); - assign builder_minsoc_csrbank2_dfii_pi0_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); - assign builder_minsoc_csrbank2_dfii_pi0_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd11)); - assign builder_minsoc_csrbank2_dfii_pi0_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); - assign builder_minsoc_csrbank2_dfii_pi0_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd12)); - assign builder_minsoc_csrbank2_dfii_pi0_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); - assign builder_minsoc_csrbank2_dfii_pi0_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd13)); - assign builder_minsoc_csrbank2_dfii_pi1_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; - assign builder_minsoc_csrbank2_dfii_pi1_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); - assign builder_minsoc_csrbank2_dfii_pi1_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd14)); - assign main_sdram_phaseinjector1_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; - assign main_sdram_phaseinjector1_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); - assign main_sdram_phaseinjector1_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 4'd15)); - assign builder_minsoc_csrbank2_dfii_pi1_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; - assign builder_minsoc_csrbank2_dfii_pi1_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); - assign builder_minsoc_csrbank2_dfii_pi1_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd16)); - assign builder_minsoc_csrbank2_dfii_pi1_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); - assign builder_minsoc_csrbank2_dfii_pi1_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd17)); - assign builder_minsoc_csrbank2_dfii_pi1_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; - assign builder_minsoc_csrbank2_dfii_pi1_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); - assign builder_minsoc_csrbank2_dfii_pi1_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd18)); - assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); - assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd19)); - assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); - assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd20)); - assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); - assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd21)); - assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); - assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd22)); - assign builder_minsoc_csrbank2_dfii_pi1_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); - assign builder_minsoc_csrbank2_dfii_pi1_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd23)); - assign builder_minsoc_csrbank2_dfii_pi1_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); - assign builder_minsoc_csrbank2_dfii_pi1_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd24)); - assign builder_minsoc_csrbank2_dfii_pi1_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); - assign builder_minsoc_csrbank2_dfii_pi1_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd25)); - assign builder_minsoc_csrbank2_dfii_pi1_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); - assign builder_minsoc_csrbank2_dfii_pi1_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd26)); - assign builder_minsoc_csrbank2_dfii_pi2_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; - assign builder_minsoc_csrbank2_dfii_pi2_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); - assign builder_minsoc_csrbank2_dfii_pi2_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd27)); - assign main_sdram_phaseinjector2_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; - assign main_sdram_phaseinjector2_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); - assign main_sdram_phaseinjector2_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd28)); - assign builder_minsoc_csrbank2_dfii_pi2_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; - assign builder_minsoc_csrbank2_dfii_pi2_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); - assign builder_minsoc_csrbank2_dfii_pi2_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd29)); - assign builder_minsoc_csrbank2_dfii_pi2_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); - assign builder_minsoc_csrbank2_dfii_pi2_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd30)); - assign builder_minsoc_csrbank2_dfii_pi2_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; - assign builder_minsoc_csrbank2_dfii_pi2_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); - assign builder_minsoc_csrbank2_dfii_pi2_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 5'd31)); - assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); - assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd32)); - assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); - assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd33)); - assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); - assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd34)); - assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); - assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd35)); - assign builder_minsoc_csrbank2_dfii_pi2_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); - assign builder_minsoc_csrbank2_dfii_pi2_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd36)); - assign builder_minsoc_csrbank2_dfii_pi2_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); - assign builder_minsoc_csrbank2_dfii_pi2_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd37)); - assign builder_minsoc_csrbank2_dfii_pi2_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); - assign builder_minsoc_csrbank2_dfii_pi2_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd38)); - assign builder_minsoc_csrbank2_dfii_pi2_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); - assign builder_minsoc_csrbank2_dfii_pi2_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd39)); - assign builder_minsoc_csrbank2_dfii_pi3_command0_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; - assign builder_minsoc_csrbank2_dfii_pi3_command0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); - assign builder_minsoc_csrbank2_dfii_pi3_command0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd40)); - assign main_sdram_phaseinjector3_command_issue_r = builder_minsoc_interface2_bank_bus_dat_w[0]; - assign main_sdram_phaseinjector3_command_issue_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); - assign main_sdram_phaseinjector3_command_issue_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd41)); - assign builder_minsoc_csrbank2_dfii_pi3_address1_r = builder_minsoc_interface2_bank_bus_dat_w[5:0]; - assign builder_minsoc_csrbank2_dfii_pi3_address1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); - assign builder_minsoc_csrbank2_dfii_pi3_address1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd42)); - assign builder_minsoc_csrbank2_dfii_pi3_address0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_address0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); - assign builder_minsoc_csrbank2_dfii_pi3_address0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd43)); - assign builder_minsoc_csrbank2_dfii_pi3_baddress0_r = builder_minsoc_interface2_bank_bus_dat_w[2:0]; - assign builder_minsoc_csrbank2_dfii_pi3_baddress0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); - assign builder_minsoc_csrbank2_dfii_pi3_baddress0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd44)); - assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); - assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd45)); - assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); - assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd46)); - assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); - assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd47)); - assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); - assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd48)); - assign builder_minsoc_csrbank2_dfii_pi3_rddata3_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_rddata3_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); - assign builder_minsoc_csrbank2_dfii_pi3_rddata3_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd49)); - assign builder_minsoc_csrbank2_dfii_pi3_rddata2_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_rddata2_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); - assign builder_minsoc_csrbank2_dfii_pi3_rddata2_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd50)); - assign builder_minsoc_csrbank2_dfii_pi3_rddata1_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_rddata1_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); - assign builder_minsoc_csrbank2_dfii_pi3_rddata1_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd51)); - assign builder_minsoc_csrbank2_dfii_pi3_rddata0_r = builder_minsoc_interface2_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_rddata0_re = ((builder_minsoc_csrbank2_sel & builder_minsoc_interface2_bank_bus_we) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); - assign builder_minsoc_csrbank2_dfii_pi3_rddata0_we = ((builder_minsoc_csrbank2_sel & (~builder_minsoc_interface2_bank_bus_we)) & (builder_minsoc_interface2_bank_bus_adr[5:0] == 6'd52)); - assign builder_minsoc_csrbank2_dfii_control0_w = main_sdram_storage[3:0]; - assign builder_minsoc_csrbank2_dfii_pi0_command0_w = main_sdram_phaseinjector0_command_storage[5:0]; - assign builder_minsoc_csrbank2_dfii_pi0_address1_w = main_sdram_phaseinjector0_address_storage[13:8]; - assign builder_minsoc_csrbank2_dfii_pi0_address0_w = main_sdram_phaseinjector0_address_storage[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_baddress0_w = main_sdram_phaseinjector0_baddress_storage[2:0]; - assign builder_minsoc_csrbank2_dfii_pi0_wrdata3_w = main_sdram_phaseinjector0_wrdata_storage[31:24]; - assign builder_minsoc_csrbank2_dfii_pi0_wrdata2_w = main_sdram_phaseinjector0_wrdata_storage[23:16]; - assign builder_minsoc_csrbank2_dfii_pi0_wrdata1_w = main_sdram_phaseinjector0_wrdata_storage[15:8]; - assign builder_minsoc_csrbank2_dfii_pi0_wrdata0_w = main_sdram_phaseinjector0_wrdata_storage[7:0]; - assign builder_minsoc_csrbank2_dfii_pi0_rddata3_w = main_sdram_phaseinjector0_status[31:24]; - assign builder_minsoc_csrbank2_dfii_pi0_rddata2_w = main_sdram_phaseinjector0_status[23:16]; - assign builder_minsoc_csrbank2_dfii_pi0_rddata1_w = main_sdram_phaseinjector0_status[15:8]; - assign builder_minsoc_csrbank2_dfii_pi0_rddata0_w = main_sdram_phaseinjector0_status[7:0]; - assign main_sdram_phaseinjector0_we = builder_minsoc_csrbank2_dfii_pi0_rddata0_we; - assign builder_minsoc_csrbank2_dfii_pi1_command0_w = main_sdram_phaseinjector1_command_storage[5:0]; - assign builder_minsoc_csrbank2_dfii_pi1_address1_w = main_sdram_phaseinjector1_address_storage[13:8]; - assign builder_minsoc_csrbank2_dfii_pi1_address0_w = main_sdram_phaseinjector1_address_storage[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_baddress0_w = main_sdram_phaseinjector1_baddress_storage[2:0]; - assign builder_minsoc_csrbank2_dfii_pi1_wrdata3_w = main_sdram_phaseinjector1_wrdata_storage[31:24]; - assign builder_minsoc_csrbank2_dfii_pi1_wrdata2_w = main_sdram_phaseinjector1_wrdata_storage[23:16]; - assign builder_minsoc_csrbank2_dfii_pi1_wrdata1_w = main_sdram_phaseinjector1_wrdata_storage[15:8]; - assign builder_minsoc_csrbank2_dfii_pi1_wrdata0_w = main_sdram_phaseinjector1_wrdata_storage[7:0]; - assign builder_minsoc_csrbank2_dfii_pi1_rddata3_w = main_sdram_phaseinjector1_status[31:24]; - assign builder_minsoc_csrbank2_dfii_pi1_rddata2_w = main_sdram_phaseinjector1_status[23:16]; - assign builder_minsoc_csrbank2_dfii_pi1_rddata1_w = main_sdram_phaseinjector1_status[15:8]; - assign builder_minsoc_csrbank2_dfii_pi1_rddata0_w = main_sdram_phaseinjector1_status[7:0]; - assign main_sdram_phaseinjector1_we = builder_minsoc_csrbank2_dfii_pi1_rddata0_we; - assign builder_minsoc_csrbank2_dfii_pi2_command0_w = main_sdram_phaseinjector2_command_storage[5:0]; - assign builder_minsoc_csrbank2_dfii_pi2_address1_w = main_sdram_phaseinjector2_address_storage[13:8]; - assign builder_minsoc_csrbank2_dfii_pi2_address0_w = main_sdram_phaseinjector2_address_storage[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_baddress0_w = main_sdram_phaseinjector2_baddress_storage[2:0]; - assign builder_minsoc_csrbank2_dfii_pi2_wrdata3_w = main_sdram_phaseinjector2_wrdata_storage[31:24]; - assign builder_minsoc_csrbank2_dfii_pi2_wrdata2_w = main_sdram_phaseinjector2_wrdata_storage[23:16]; - assign builder_minsoc_csrbank2_dfii_pi2_wrdata1_w = main_sdram_phaseinjector2_wrdata_storage[15:8]; - assign builder_minsoc_csrbank2_dfii_pi2_wrdata0_w = main_sdram_phaseinjector2_wrdata_storage[7:0]; - assign builder_minsoc_csrbank2_dfii_pi2_rddata3_w = main_sdram_phaseinjector2_status[31:24]; - assign builder_minsoc_csrbank2_dfii_pi2_rddata2_w = main_sdram_phaseinjector2_status[23:16]; - assign builder_minsoc_csrbank2_dfii_pi2_rddata1_w = main_sdram_phaseinjector2_status[15:8]; - assign builder_minsoc_csrbank2_dfii_pi2_rddata0_w = main_sdram_phaseinjector2_status[7:0]; - assign main_sdram_phaseinjector2_we = builder_minsoc_csrbank2_dfii_pi2_rddata0_we; - assign builder_minsoc_csrbank2_dfii_pi3_command0_w = main_sdram_phaseinjector3_command_storage[5:0]; - assign builder_minsoc_csrbank2_dfii_pi3_address1_w = main_sdram_phaseinjector3_address_storage[13:8]; - assign builder_minsoc_csrbank2_dfii_pi3_address0_w = main_sdram_phaseinjector3_address_storage[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_baddress0_w = main_sdram_phaseinjector3_baddress_storage[2:0]; - assign builder_minsoc_csrbank2_dfii_pi3_wrdata3_w = main_sdram_phaseinjector3_wrdata_storage[31:24]; - assign builder_minsoc_csrbank2_dfii_pi3_wrdata2_w = main_sdram_phaseinjector3_wrdata_storage[23:16]; - assign builder_minsoc_csrbank2_dfii_pi3_wrdata1_w = main_sdram_phaseinjector3_wrdata_storage[15:8]; - assign builder_minsoc_csrbank2_dfii_pi3_wrdata0_w = main_sdram_phaseinjector3_wrdata_storage[7:0]; - assign builder_minsoc_csrbank2_dfii_pi3_rddata3_w = main_sdram_phaseinjector3_status[31:24]; - assign builder_minsoc_csrbank2_dfii_pi3_rddata2_w = main_sdram_phaseinjector3_status[23:16]; - assign builder_minsoc_csrbank2_dfii_pi3_rddata1_w = main_sdram_phaseinjector3_status[15:8]; - assign builder_minsoc_csrbank2_dfii_pi3_rddata0_w = main_sdram_phaseinjector3_status[7:0]; - assign main_sdram_phaseinjector3_we = builder_minsoc_csrbank2_dfii_pi3_rddata0_we; - assign builder_minsoc_csrbank3_sel = (builder_minsoc_interface3_bank_bus_adr[13:9] == 3'd4); - assign builder_minsoc_csrbank3_load3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_load3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); - assign builder_minsoc_csrbank3_load3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd0)); - assign builder_minsoc_csrbank3_load2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_load2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); - assign builder_minsoc_csrbank3_load2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 1'd1)); - assign builder_minsoc_csrbank3_load1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_load1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); - assign builder_minsoc_csrbank3_load1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd2)); - assign builder_minsoc_csrbank3_load0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_load0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); - assign builder_minsoc_csrbank3_load0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 2'd3)); - assign builder_minsoc_csrbank3_reload3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_reload3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); - assign builder_minsoc_csrbank3_reload3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd4)); - assign builder_minsoc_csrbank3_reload2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_reload2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); - assign builder_minsoc_csrbank3_reload2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd5)); - assign builder_minsoc_csrbank3_reload1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_reload1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); - assign builder_minsoc_csrbank3_reload1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd6)); - assign builder_minsoc_csrbank3_reload0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_reload0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); - assign builder_minsoc_csrbank3_reload0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 3'd7)); - assign builder_minsoc_csrbank3_en0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; - assign builder_minsoc_csrbank3_en0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); - assign builder_minsoc_csrbank3_en0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd8)); - assign builder_minsoc_csrbank3_update_value0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; - assign builder_minsoc_csrbank3_update_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); - assign builder_minsoc_csrbank3_update_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd9)); - assign builder_minsoc_csrbank3_value3_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_value3_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); - assign builder_minsoc_csrbank3_value3_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd10)); - assign builder_minsoc_csrbank3_value2_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_value2_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); - assign builder_minsoc_csrbank3_value2_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd11)); - assign builder_minsoc_csrbank3_value1_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_value1_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); - assign builder_minsoc_csrbank3_value1_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd12)); - assign builder_minsoc_csrbank3_value0_r = builder_minsoc_interface3_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank3_value0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); - assign builder_minsoc_csrbank3_value0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd13)); - assign main_minsoc_timer0_eventmanager_status_r = builder_minsoc_interface3_bank_bus_dat_w[0]; - assign main_minsoc_timer0_eventmanager_status_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); - assign main_minsoc_timer0_eventmanager_status_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd14)); - assign main_minsoc_timer0_eventmanager_pending_r = builder_minsoc_interface3_bank_bus_dat_w[0]; - assign main_minsoc_timer0_eventmanager_pending_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); - assign main_minsoc_timer0_eventmanager_pending_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 4'd15)); - assign builder_minsoc_csrbank3_ev_enable0_r = builder_minsoc_interface3_bank_bus_dat_w[0]; - assign builder_minsoc_csrbank3_ev_enable0_re = ((builder_minsoc_csrbank3_sel & builder_minsoc_interface3_bank_bus_we) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); - assign builder_minsoc_csrbank3_ev_enable0_we = ((builder_minsoc_csrbank3_sel & (~builder_minsoc_interface3_bank_bus_we)) & (builder_minsoc_interface3_bank_bus_adr[4:0] == 5'd16)); - assign builder_minsoc_csrbank3_load3_w = main_minsoc_timer0_load_storage[31:24]; - assign builder_minsoc_csrbank3_load2_w = main_minsoc_timer0_load_storage[23:16]; - assign builder_minsoc_csrbank3_load1_w = main_minsoc_timer0_load_storage[15:8]; - assign builder_minsoc_csrbank3_load0_w = main_minsoc_timer0_load_storage[7:0]; - assign builder_minsoc_csrbank3_reload3_w = main_minsoc_timer0_reload_storage[31:24]; - assign builder_minsoc_csrbank3_reload2_w = main_minsoc_timer0_reload_storage[23:16]; - assign builder_minsoc_csrbank3_reload1_w = main_minsoc_timer0_reload_storage[15:8]; - assign builder_minsoc_csrbank3_reload0_w = main_minsoc_timer0_reload_storage[7:0]; - assign builder_minsoc_csrbank3_en0_w = main_minsoc_timer0_en_storage; - assign builder_minsoc_csrbank3_update_value0_w = main_minsoc_timer0_update_value_storage; - assign builder_minsoc_csrbank3_value3_w = main_minsoc_timer0_value_status[31:24]; - assign builder_minsoc_csrbank3_value2_w = main_minsoc_timer0_value_status[23:16]; - assign builder_minsoc_csrbank3_value1_w = main_minsoc_timer0_value_status[15:8]; - assign builder_minsoc_csrbank3_value0_w = main_minsoc_timer0_value_status[7:0]; - assign main_minsoc_timer0_value_we = builder_minsoc_csrbank3_value0_we; - assign builder_minsoc_csrbank3_ev_enable0_w = main_minsoc_timer0_eventmanager_storage; - assign builder_minsoc_csrbank4_sel = (builder_minsoc_interface4_bank_bus_adr[13:9] == 2'd3); - assign main_minsoc_uart_rxtx_r = builder_minsoc_interface4_bank_bus_dat_w[7:0]; - assign main_minsoc_uart_rxtx_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); - assign main_minsoc_uart_rxtx_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd0)); - assign builder_minsoc_csrbank4_txfull_r = builder_minsoc_interface4_bank_bus_dat_w[0]; - assign builder_minsoc_csrbank4_txfull_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); - assign builder_minsoc_csrbank4_txfull_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 1'd1)); - assign builder_minsoc_csrbank4_rxempty_r = builder_minsoc_interface4_bank_bus_dat_w[0]; - assign builder_minsoc_csrbank4_rxempty_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); - assign builder_minsoc_csrbank4_rxempty_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd2)); - assign main_minsoc_uart_eventmanager_status_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; - assign main_minsoc_uart_eventmanager_status_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); - assign main_minsoc_uart_eventmanager_status_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 2'd3)); - assign main_minsoc_uart_eventmanager_pending_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; - assign main_minsoc_uart_eventmanager_pending_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); - assign main_minsoc_uart_eventmanager_pending_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd4)); - assign builder_minsoc_csrbank4_ev_enable0_r = builder_minsoc_interface4_bank_bus_dat_w[1:0]; - assign builder_minsoc_csrbank4_ev_enable0_re = ((builder_minsoc_csrbank4_sel & builder_minsoc_interface4_bank_bus_we) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); - assign builder_minsoc_csrbank4_ev_enable0_we = ((builder_minsoc_csrbank4_sel & (~builder_minsoc_interface4_bank_bus_we)) & (builder_minsoc_interface4_bank_bus_adr[2:0] == 3'd5)); - assign builder_minsoc_csrbank4_txfull_w = main_minsoc_uart_txfull_status; - assign main_minsoc_uart_txfull_we = builder_minsoc_csrbank4_txfull_we; - assign builder_minsoc_csrbank4_rxempty_w = main_minsoc_uart_rxempty_status; - assign main_minsoc_uart_rxempty_we = builder_minsoc_csrbank4_rxempty_we; - assign builder_minsoc_csrbank4_ev_enable0_w = main_minsoc_uart_eventmanager_storage[1:0]; - assign builder_minsoc_csrbank5_sel = (builder_minsoc_interface5_bank_bus_adr[13:9] == 2'd2); - assign builder_minsoc_csrbank5_tuning_word3_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank5_tuning_word3_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); - assign builder_minsoc_csrbank5_tuning_word3_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd0)); - assign builder_minsoc_csrbank5_tuning_word2_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank5_tuning_word2_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); - assign builder_minsoc_csrbank5_tuning_word2_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 1'd1)); - assign builder_minsoc_csrbank5_tuning_word1_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank5_tuning_word1_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); - assign builder_minsoc_csrbank5_tuning_word1_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd2)); - assign builder_minsoc_csrbank5_tuning_word0_r = builder_minsoc_interface5_bank_bus_dat_w[7:0]; - assign builder_minsoc_csrbank5_tuning_word0_re = ((builder_minsoc_csrbank5_sel & builder_minsoc_interface5_bank_bus_we) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); - assign builder_minsoc_csrbank5_tuning_word0_we = ((builder_minsoc_csrbank5_sel & (~builder_minsoc_interface5_bank_bus_we)) & (builder_minsoc_interface5_bank_bus_adr[1:0] == 2'd3)); - assign builder_minsoc_csrbank5_tuning_word3_w = main_minsoc_storage[31:24]; - assign builder_minsoc_csrbank5_tuning_word2_w = main_minsoc_storage[23:16]; - assign builder_minsoc_csrbank5_tuning_word1_w = main_minsoc_storage[15:8]; - assign builder_minsoc_csrbank5_tuning_word0_w = main_minsoc_storage[7:0]; - assign builder_minsoc_adr = main_minsoc_interface_adr; - assign builder_minsoc_we = main_minsoc_interface_we; - assign builder_minsoc_dat_w = main_minsoc_interface_dat_w; - assign main_minsoc_interface_dat_r = builder_minsoc_dat_r; - assign builder_minsoc_interface0_bank_bus_adr = builder_minsoc_adr; - assign builder_minsoc_interface1_bank_bus_adr = builder_minsoc_adr; - assign builder_minsoc_interface2_bank_bus_adr = builder_minsoc_adr; - assign builder_minsoc_interface3_bank_bus_adr = builder_minsoc_adr; - assign builder_minsoc_interface4_bank_bus_adr = builder_minsoc_adr; - assign builder_minsoc_interface5_bank_bus_adr = builder_minsoc_adr; - assign builder_minsoc_interface0_bank_bus_we = builder_minsoc_we; - assign builder_minsoc_interface1_bank_bus_we = builder_minsoc_we; - assign builder_minsoc_interface2_bank_bus_we = builder_minsoc_we; - assign builder_minsoc_interface3_bank_bus_we = builder_minsoc_we; - assign builder_minsoc_interface4_bank_bus_we = builder_minsoc_we; - assign builder_minsoc_interface5_bank_bus_we = builder_minsoc_we; - assign builder_minsoc_interface0_bank_bus_dat_w = builder_minsoc_dat_w; - assign builder_minsoc_interface1_bank_bus_dat_w = builder_minsoc_dat_w; - assign builder_minsoc_interface2_bank_bus_dat_w = builder_minsoc_dat_w; - assign builder_minsoc_interface3_bank_bus_dat_w = builder_minsoc_dat_w; - assign builder_minsoc_interface4_bank_bus_dat_w = builder_minsoc_dat_w; - assign builder_minsoc_interface5_bank_bus_dat_w = builder_minsoc_dat_w; - assign builder_minsoc_dat_r = (((((builder_minsoc_interface0_bank_bus_dat_r | builder_minsoc_interface1_bank_bus_dat_r) | builder_minsoc_interface2_bank_bus_dat_r) | builder_minsoc_interface3_bank_bus_dat_r) | builder_minsoc_interface4_bank_bus_dat_r) | builder_minsoc_interface5_bank_bus_dat_r); - always @(*) begin - builder_rhs_array_muxed0 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[0]; - end - 1'd1: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[1]; - end - 2'd2: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[2]; - end - 2'd3: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[3]; - end - 3'd4: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[4]; - end - 3'd5: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[5]; - end - 3'd6: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[6]; - end - default: begin - builder_rhs_array_muxed0 <= main_sdram_choose_cmd_valids[7]; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed1 <= 14'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_a; - end - 1'd1: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_a; - end - 2'd2: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_a; - end - 2'd3: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_a; - end - 3'd4: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_a; - end - 3'd5: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_a; - end - 3'd6: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_a; - end - default: begin - builder_rhs_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_a; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed2 <= 3'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_ba; - end - 1'd1: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_ba; - end - 2'd2: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_ba; - end - 2'd3: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_ba; - end - 3'd4: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_ba; - end - 3'd5: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_ba; - end - 3'd6: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_ba; - end - default: begin - builder_rhs_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_ba; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed3 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_is_read; - end - 1'd1: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_is_read; - end - 2'd2: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_is_read; - end - 2'd3: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_is_read; - end - 3'd4: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_is_read; - end - 3'd5: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_is_read; - end - 3'd6: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_is_read; - end - default: begin - builder_rhs_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_is_read; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed4 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_is_write; - end - 1'd1: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_is_write; - end - 2'd2: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_is_write; - end - 2'd3: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_is_write; - end - 3'd4: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_is_write; - end - 3'd5: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_is_write; - end - 3'd6: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_is_write; - end - default: begin - builder_rhs_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_is_write; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed5 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_is_cmd; - end - 1'd1: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_is_cmd; - end - 2'd2: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_is_cmd; - end - 2'd3: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_is_cmd; - end - 3'd4: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_is_cmd; - end - 3'd5: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_is_cmd; - end - 3'd6: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_is_cmd; - end - default: begin - builder_rhs_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_is_cmd; - end - endcase - end - always @(*) begin - builder_t_array_muxed0 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_t_array_muxed0 <= main_sdram_bankmachine0_cmd_payload_cas; - end - 1'd1: begin - builder_t_array_muxed0 <= main_sdram_bankmachine1_cmd_payload_cas; - end - 2'd2: begin - builder_t_array_muxed0 <= main_sdram_bankmachine2_cmd_payload_cas; - end - 2'd3: begin - builder_t_array_muxed0 <= main_sdram_bankmachine3_cmd_payload_cas; - end - 3'd4: begin - builder_t_array_muxed0 <= main_sdram_bankmachine4_cmd_payload_cas; - end - 3'd5: begin - builder_t_array_muxed0 <= main_sdram_bankmachine5_cmd_payload_cas; - end - 3'd6: begin - builder_t_array_muxed0 <= main_sdram_bankmachine6_cmd_payload_cas; - end - default: begin - builder_t_array_muxed0 <= main_sdram_bankmachine7_cmd_payload_cas; - end - endcase - end - always @(*) begin - builder_t_array_muxed1 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_t_array_muxed1 <= main_sdram_bankmachine0_cmd_payload_ras; - end - 1'd1: begin - builder_t_array_muxed1 <= main_sdram_bankmachine1_cmd_payload_ras; - end - 2'd2: begin - builder_t_array_muxed1 <= main_sdram_bankmachine2_cmd_payload_ras; - end - 2'd3: begin - builder_t_array_muxed1 <= main_sdram_bankmachine3_cmd_payload_ras; - end - 3'd4: begin - builder_t_array_muxed1 <= main_sdram_bankmachine4_cmd_payload_ras; - end - 3'd5: begin - builder_t_array_muxed1 <= main_sdram_bankmachine5_cmd_payload_ras; - end - 3'd6: begin - builder_t_array_muxed1 <= main_sdram_bankmachine6_cmd_payload_ras; - end - default: begin - builder_t_array_muxed1 <= main_sdram_bankmachine7_cmd_payload_ras; - end - endcase - end - always @(*) begin - builder_t_array_muxed2 <= 1'd0; - case (main_sdram_choose_cmd_grant) - 1'd0: begin - builder_t_array_muxed2 <= main_sdram_bankmachine0_cmd_payload_we; - end - 1'd1: begin - builder_t_array_muxed2 <= main_sdram_bankmachine1_cmd_payload_we; - end - 2'd2: begin - builder_t_array_muxed2 <= main_sdram_bankmachine2_cmd_payload_we; - end - 2'd3: begin - builder_t_array_muxed2 <= main_sdram_bankmachine3_cmd_payload_we; - end - 3'd4: begin - builder_t_array_muxed2 <= main_sdram_bankmachine4_cmd_payload_we; - end - 3'd5: begin - builder_t_array_muxed2 <= main_sdram_bankmachine5_cmd_payload_we; - end - 3'd6: begin - builder_t_array_muxed2 <= main_sdram_bankmachine6_cmd_payload_we; - end - default: begin - builder_t_array_muxed2 <= main_sdram_bankmachine7_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed6 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[0]; - end - 1'd1: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[1]; - end - 2'd2: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[2]; - end - 2'd3: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[3]; - end - 3'd4: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[4]; - end - 3'd5: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[5]; - end - 3'd6: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[6]; - end - default: begin - builder_rhs_array_muxed6 <= main_sdram_choose_req_valids[7]; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed7 <= 14'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine0_cmd_payload_a; - end - 1'd1: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine1_cmd_payload_a; - end - 2'd2: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine2_cmd_payload_a; - end - 2'd3: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine3_cmd_payload_a; - end - 3'd4: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine4_cmd_payload_a; - end - 3'd5: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine5_cmd_payload_a; - end - 3'd6: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine6_cmd_payload_a; - end - default: begin - builder_rhs_array_muxed7 <= main_sdram_bankmachine7_cmd_payload_a; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed8 <= 3'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine0_cmd_payload_ba; - end - 1'd1: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine1_cmd_payload_ba; - end - 2'd2: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine2_cmd_payload_ba; - end - 2'd3: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine3_cmd_payload_ba; - end - 3'd4: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine4_cmd_payload_ba; - end - 3'd5: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine5_cmd_payload_ba; - end - 3'd6: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine6_cmd_payload_ba; - end - default: begin - builder_rhs_array_muxed8 <= main_sdram_bankmachine7_cmd_payload_ba; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed9 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine0_cmd_payload_is_read; - end - 1'd1: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine1_cmd_payload_is_read; - end - 2'd2: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine2_cmd_payload_is_read; - end - 2'd3: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine3_cmd_payload_is_read; - end - 3'd4: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine4_cmd_payload_is_read; - end - 3'd5: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine5_cmd_payload_is_read; - end - 3'd6: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine6_cmd_payload_is_read; - end - default: begin - builder_rhs_array_muxed9 <= main_sdram_bankmachine7_cmd_payload_is_read; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed10 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine0_cmd_payload_is_write; - end - 1'd1: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine1_cmd_payload_is_write; - end - 2'd2: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine2_cmd_payload_is_write; - end - 2'd3: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine3_cmd_payload_is_write; - end - 3'd4: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine4_cmd_payload_is_write; - end - 3'd5: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine5_cmd_payload_is_write; - end - 3'd6: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine6_cmd_payload_is_write; - end - default: begin - builder_rhs_array_muxed10 <= main_sdram_bankmachine7_cmd_payload_is_write; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed11 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine0_cmd_payload_is_cmd; - end - 1'd1: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine1_cmd_payload_is_cmd; - end - 2'd2: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine2_cmd_payload_is_cmd; - end - 2'd3: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine3_cmd_payload_is_cmd; - end - 3'd4: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine4_cmd_payload_is_cmd; - end - 3'd5: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine5_cmd_payload_is_cmd; - end - 3'd6: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine6_cmd_payload_is_cmd; - end - default: begin - builder_rhs_array_muxed11 <= main_sdram_bankmachine7_cmd_payload_is_cmd; - end - endcase - end - always @(*) begin - builder_t_array_muxed3 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_t_array_muxed3 <= main_sdram_bankmachine0_cmd_payload_cas; - end - 1'd1: begin - builder_t_array_muxed3 <= main_sdram_bankmachine1_cmd_payload_cas; - end - 2'd2: begin - builder_t_array_muxed3 <= main_sdram_bankmachine2_cmd_payload_cas; - end - 2'd3: begin - builder_t_array_muxed3 <= main_sdram_bankmachine3_cmd_payload_cas; - end - 3'd4: begin - builder_t_array_muxed3 <= main_sdram_bankmachine4_cmd_payload_cas; - end - 3'd5: begin - builder_t_array_muxed3 <= main_sdram_bankmachine5_cmd_payload_cas; - end - 3'd6: begin - builder_t_array_muxed3 <= main_sdram_bankmachine6_cmd_payload_cas; - end - default: begin - builder_t_array_muxed3 <= main_sdram_bankmachine7_cmd_payload_cas; - end - endcase - end - always @(*) begin - builder_t_array_muxed4 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_t_array_muxed4 <= main_sdram_bankmachine0_cmd_payload_ras; - end - 1'd1: begin - builder_t_array_muxed4 <= main_sdram_bankmachine1_cmd_payload_ras; - end - 2'd2: begin - builder_t_array_muxed4 <= main_sdram_bankmachine2_cmd_payload_ras; - end - 2'd3: begin - builder_t_array_muxed4 <= main_sdram_bankmachine3_cmd_payload_ras; - end - 3'd4: begin - builder_t_array_muxed4 <= main_sdram_bankmachine4_cmd_payload_ras; - end - 3'd5: begin - builder_t_array_muxed4 <= main_sdram_bankmachine5_cmd_payload_ras; - end - 3'd6: begin - builder_t_array_muxed4 <= main_sdram_bankmachine6_cmd_payload_ras; - end - default: begin - builder_t_array_muxed4 <= main_sdram_bankmachine7_cmd_payload_ras; - end - endcase - end - always @(*) begin - builder_t_array_muxed5 <= 1'd0; - case (main_sdram_choose_req_grant) - 1'd0: begin - builder_t_array_muxed5 <= main_sdram_bankmachine0_cmd_payload_we; - end - 1'd1: begin - builder_t_array_muxed5 <= main_sdram_bankmachine1_cmd_payload_we; - end - 2'd2: begin - builder_t_array_muxed5 <= main_sdram_bankmachine2_cmd_payload_we; - end - 2'd3: begin - builder_t_array_muxed5 <= main_sdram_bankmachine3_cmd_payload_we; - end - 3'd4: begin - builder_t_array_muxed5 <= main_sdram_bankmachine4_cmd_payload_we; - end - 3'd5: begin - builder_t_array_muxed5 <= main_sdram_bankmachine5_cmd_payload_we; - end - 3'd6: begin - builder_t_array_muxed5 <= main_sdram_bankmachine6_cmd_payload_we; - end - default: begin - builder_t_array_muxed5 <= main_sdram_bankmachine7_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed12 <= 21'd0; - case (builder_roundrobin0_grant) - default: begin - builder_rhs_array_muxed12 <= { - main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] - }; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed13 <= 1'd0; - case (builder_roundrobin0_grant) - default: begin - builder_rhs_array_muxed13 <= main_port_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed14 <= 1'd0; - case (builder_roundrobin0_grant) - default: begin - builder_rhs_array_muxed14 <= (((main_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((builder_locked0 | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase - end - always @(*) begin - builder_rhs_array_muxed15 <= 21'd0; - case (builder_roundrobin1_grant) - default: begin - builder_rhs_array_muxed15 <= { - main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] - }; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed16 <= 1'd0; - case (builder_roundrobin1_grant) - default: begin - builder_rhs_array_muxed16 <= main_port_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed17 <= 1'd0; - case (builder_roundrobin1_grant) - default: begin - builder_rhs_array_muxed17 <= (((main_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((builder_locked1 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase - end - always @(*) begin - builder_rhs_array_muxed18 <= 21'd0; - case (builder_roundrobin2_grant) - default: begin - builder_rhs_array_muxed18 <= { - main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] - }; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed19 <= 1'd0; - case (builder_roundrobin2_grant) - default: begin - builder_rhs_array_muxed19 <= main_port_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed20 <= 1'd0; - case (builder_roundrobin2_grant) - default: begin - builder_rhs_array_muxed20 <= (((main_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((builder_locked2 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase - end - always @(*) begin - builder_rhs_array_muxed21 <= 21'd0; - case (builder_roundrobin3_grant) - default: begin - builder_rhs_array_muxed21 <= { - main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] - }; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed22 <= 1'd0; - case (builder_roundrobin3_grant) - default: begin - builder_rhs_array_muxed22 <= main_port_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed23 <= 1'd0; - case (builder_roundrobin3_grant) - default: begin - builder_rhs_array_muxed23 <= (((main_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((builder_locked3 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase - end - always @(*) begin - builder_rhs_array_muxed24 <= 21'd0; - case (builder_roundrobin4_grant) - default: begin - builder_rhs_array_muxed24 <= { - main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] - }; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed25 <= 1'd0; - case (builder_roundrobin4_grant) - default: begin - builder_rhs_array_muxed25 <= main_port_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed26 <= 1'd0; - case (builder_roundrobin4_grant) - default: begin - builder_rhs_array_muxed26 <= (((main_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((builder_locked4 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase - end - always @(*) begin - builder_rhs_array_muxed27 <= 21'd0; - case (builder_roundrobin5_grant) - default: begin - builder_rhs_array_muxed27 <= { - main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] - }; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed28 <= 1'd0; - case (builder_roundrobin5_grant) - default: begin - builder_rhs_array_muxed28 <= main_port_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed29 <= 1'd0; - case (builder_roundrobin5_grant) - default: begin - builder_rhs_array_muxed29 <= (((main_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((builder_locked5 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase - end - always @(*) begin - builder_rhs_array_muxed30 <= 21'd0; - case (builder_roundrobin6_grant) - default: begin - builder_rhs_array_muxed30 <= { - main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] - }; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed31 <= 1'd0; - case (builder_roundrobin6_grant) - default: begin - builder_rhs_array_muxed31 <= main_port_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed32 <= 1'd0; - case (builder_roundrobin6_grant) - default: begin - builder_rhs_array_muxed32 <= (((main_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((builder_locked6 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank7_lock & (builder_roundrobin7_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase - end - always @(*) begin - builder_rhs_array_muxed33 <= 21'd0; - case (builder_roundrobin7_grant) - default: begin - builder_rhs_array_muxed33 <= { - main_port_cmd_payload_addr[23:10], main_port_cmd_payload_addr[6:0] - }; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed34 <= 1'd0; - case (builder_roundrobin7_grant) - default: begin - builder_rhs_array_muxed34 <= main_port_cmd_payload_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed35 <= 1'd0; - case (builder_roundrobin7_grant) - default: begin - builder_rhs_array_muxed35 <= (((main_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((builder_locked7 | (main_sdram_interface_bank0_lock & (builder_roundrobin0_grant == 1'd0))) | (main_sdram_interface_bank1_lock & (builder_roundrobin1_grant == 1'd0))) | (main_sdram_interface_bank2_lock & (builder_roundrobin2_grant == 1'd0))) | (main_sdram_interface_bank3_lock & (builder_roundrobin3_grant == 1'd0))) | (main_sdram_interface_bank4_lock & (builder_roundrobin4_grant == 1'd0))) | (main_sdram_interface_bank5_lock & (builder_roundrobin5_grant == 1'd0))) | (main_sdram_interface_bank6_lock & (builder_roundrobin6_grant == 1'd0))))) & main_port_cmd_valid); - end - endcase - end - always @(*) begin - builder_rhs_array_muxed36 <= 30'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed36 <= main_interface1_wb_sdram_adr; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed37 <= 32'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed37 <= main_interface1_wb_sdram_dat_w; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed38 <= 4'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed38 <= main_interface1_wb_sdram_sel; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed39 <= 1'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed39 <= main_interface1_wb_sdram_cyc; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed40 <= 1'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed40 <= main_interface1_wb_sdram_stb; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed41 <= 1'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed41 <= main_interface1_wb_sdram_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed42 <= 3'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed42 <= main_interface1_wb_sdram_cti; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed43 <= 2'd0; - case (builder_wb_sdram_con_grant) - default: begin - builder_rhs_array_muxed43 <= main_interface1_wb_sdram_bte; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed44 <= 30'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed44 <= main_minsoc_interface0_soc_bus_adr; - end - default: begin - builder_rhs_array_muxed44 <= main_minsoc_interface1_soc_bus_adr; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed45 <= 32'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed45 <= main_minsoc_interface0_soc_bus_dat_w; - end - default: begin - builder_rhs_array_muxed45 <= main_minsoc_interface1_soc_bus_dat_w; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed46 <= 4'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed46 <= main_minsoc_interface0_soc_bus_sel; - end - default: begin - builder_rhs_array_muxed46 <= main_minsoc_interface1_soc_bus_sel; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed47 <= 1'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed47 <= main_minsoc_interface0_soc_bus_cyc; - end - default: begin - builder_rhs_array_muxed47 <= main_minsoc_interface1_soc_bus_cyc; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed48 <= 1'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed48 <= main_minsoc_interface0_soc_bus_stb; - end - default: begin - builder_rhs_array_muxed48 <= main_minsoc_interface1_soc_bus_stb; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed49 <= 1'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed49 <= main_minsoc_interface0_soc_bus_we; - end - default: begin - builder_rhs_array_muxed49 <= main_minsoc_interface1_soc_bus_we; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed50 <= 3'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed50 <= main_minsoc_interface0_soc_bus_cti; - end - default: begin - builder_rhs_array_muxed50 <= main_minsoc_interface1_soc_bus_cti; - end - endcase - end - always @(*) begin - builder_rhs_array_muxed51 <= 2'd0; - case (builder_minsoc_grant) - 1'd0: begin - builder_rhs_array_muxed51 <= main_minsoc_interface0_soc_bus_bte; - end - default: begin - builder_rhs_array_muxed51 <= main_minsoc_interface1_soc_bus_bte; - end - endcase - end - always @(*) begin - builder_array_muxed0 <= 3'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed0 <= main_sdram_nop_ba[2:0]; - end - 1'd1: begin - builder_array_muxed0 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - builder_array_muxed0 <= main_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - builder_array_muxed0 <= main_sdram_cmd_payload_ba[2:0]; - end - endcase - end - always @(*) begin - builder_array_muxed1 <= 14'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed1 <= main_sdram_nop_a; - end - 1'd1: begin - builder_array_muxed1 <= main_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - builder_array_muxed1 <= main_sdram_choose_req_cmd_payload_a; - end - default: begin - builder_array_muxed1 <= main_sdram_cmd_payload_a; - end - endcase - end - always @(*) begin - builder_array_muxed2 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed2 <= 1'd0; - end - 1'd1: begin - builder_array_muxed2 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - builder_array_muxed2 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); - end - default: begin - builder_array_muxed2 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); - end - endcase - end - always @(*) begin - builder_array_muxed3 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed3 <= 1'd0; - end - 1'd1: begin - builder_array_muxed3 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - builder_array_muxed3 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); - end - default: begin - builder_array_muxed3 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); - end - endcase - end - always @(*) begin - builder_array_muxed4 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed4 <= 1'd0; - end - 1'd1: begin - builder_array_muxed4 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - builder_array_muxed4 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); - end - default: begin - builder_array_muxed4 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); - end - endcase - end - always @(*) begin - builder_array_muxed5 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed5 <= 1'd0; - end - 1'd1: begin - builder_array_muxed5 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - builder_array_muxed5 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); - end - default: begin - builder_array_muxed5 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); - end - endcase - end - always @(*) begin - builder_array_muxed6 <= 1'd0; - case (main_sdram_steerer_sel0) - 1'd0: begin - builder_array_muxed6 <= 1'd0; - end - 1'd1: begin - builder_array_muxed6 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - builder_array_muxed6 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); - end - default: begin - builder_array_muxed6 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); - end - endcase - end - always @(*) begin - builder_array_muxed7 <= 3'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed7 <= main_sdram_nop_ba[2:0]; - end - 1'd1: begin - builder_array_muxed7 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - builder_array_muxed7 <= main_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - builder_array_muxed7 <= main_sdram_cmd_payload_ba[2:0]; - end - endcase - end - always @(*) begin - builder_array_muxed8 <= 14'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed8 <= main_sdram_nop_a; - end - 1'd1: begin - builder_array_muxed8 <= main_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - builder_array_muxed8 <= main_sdram_choose_req_cmd_payload_a; - end - default: begin - builder_array_muxed8 <= main_sdram_cmd_payload_a; - end - endcase - end - always @(*) begin - builder_array_muxed9 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed9 <= 1'd0; - end - 1'd1: begin - builder_array_muxed9 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - builder_array_muxed9 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); - end - default: begin - builder_array_muxed9 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); - end - endcase - end - always @(*) begin - builder_array_muxed10 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed10 <= 1'd0; - end - 1'd1: begin - builder_array_muxed10 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - builder_array_muxed10 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); - end - default: begin - builder_array_muxed10 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); - end - endcase - end - always @(*) begin - builder_array_muxed11 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed11 <= 1'd0; - end - 1'd1: begin - builder_array_muxed11 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - builder_array_muxed11 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); - end - default: begin - builder_array_muxed11 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); - end - endcase - end - always @(*) begin - builder_array_muxed12 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed12 <= 1'd0; - end - 1'd1: begin - builder_array_muxed12 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - builder_array_muxed12 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); - end - default: begin - builder_array_muxed12 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); - end - endcase - end - always @(*) begin - builder_array_muxed13 <= 1'd0; - case (main_sdram_steerer_sel1) - 1'd0: begin - builder_array_muxed13 <= 1'd0; - end - 1'd1: begin - builder_array_muxed13 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - builder_array_muxed13 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); - end - default: begin - builder_array_muxed13 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); - end - endcase - end - always @(*) begin - builder_array_muxed14 <= 3'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed14 <= main_sdram_nop_ba[2:0]; - end - 1'd1: begin - builder_array_muxed14 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - builder_array_muxed14 <= main_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - builder_array_muxed14 <= main_sdram_cmd_payload_ba[2:0]; - end - endcase - end - always @(*) begin - builder_array_muxed15 <= 14'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed15 <= main_sdram_nop_a; - end - 1'd1: begin - builder_array_muxed15 <= main_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - builder_array_muxed15 <= main_sdram_choose_req_cmd_payload_a; - end - default: begin - builder_array_muxed15 <= main_sdram_cmd_payload_a; - end - endcase - end - always @(*) begin - builder_array_muxed16 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed16 <= 1'd0; - end - 1'd1: begin - builder_array_muxed16 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - builder_array_muxed16 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); - end - default: begin - builder_array_muxed16 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); - end - endcase - end - always @(*) begin - builder_array_muxed17 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed17 <= 1'd0; - end - 1'd1: begin - builder_array_muxed17 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - builder_array_muxed17 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); - end - default: begin - builder_array_muxed17 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); - end - endcase - end - always @(*) begin - builder_array_muxed18 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed18 <= 1'd0; - end - 1'd1: begin - builder_array_muxed18 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - builder_array_muxed18 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); - end - default: begin - builder_array_muxed18 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); - end - endcase - end - always @(*) begin - builder_array_muxed19 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed19 <= 1'd0; - end - 1'd1: begin - builder_array_muxed19 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - builder_array_muxed19 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); - end - default: begin - builder_array_muxed19 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); - end - endcase - end - always @(*) begin - builder_array_muxed20 <= 1'd0; - case (main_sdram_steerer_sel2) - 1'd0: begin - builder_array_muxed20 <= 1'd0; - end - 1'd1: begin - builder_array_muxed20 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - builder_array_muxed20 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); - end - default: begin - builder_array_muxed20 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); - end - endcase - end - always @(*) begin - builder_array_muxed21 <= 3'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed21 <= main_sdram_nop_ba[2:0]; - end - 1'd1: begin - builder_array_muxed21 <= main_sdram_choose_cmd_cmd_payload_ba[2:0]; - end - 2'd2: begin - builder_array_muxed21 <= main_sdram_choose_req_cmd_payload_ba[2:0]; - end - default: begin - builder_array_muxed21 <= main_sdram_cmd_payload_ba[2:0]; - end - endcase - end - always @(*) begin - builder_array_muxed22 <= 14'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed22 <= main_sdram_nop_a; - end - 1'd1: begin - builder_array_muxed22 <= main_sdram_choose_cmd_cmd_payload_a; - end - 2'd2: begin - builder_array_muxed22 <= main_sdram_choose_req_cmd_payload_a; - end - default: begin - builder_array_muxed22 <= main_sdram_cmd_payload_a; - end - endcase - end - always @(*) begin - builder_array_muxed23 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed23 <= 1'd0; - end - 1'd1: begin - builder_array_muxed23 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_cas); - end - 2'd2: begin - builder_array_muxed23 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_cas); - end - default: begin - builder_array_muxed23 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_cas); - end - endcase - end - always @(*) begin - builder_array_muxed24 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed24 <= 1'd0; - end - 1'd1: begin - builder_array_muxed24 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_ras); - end - 2'd2: begin - builder_array_muxed24 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_ras); - end - default: begin - builder_array_muxed24 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_ras); - end - endcase - end - always @(*) begin - builder_array_muxed25 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed25 <= 1'd0; - end - 1'd1: begin - builder_array_muxed25 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_we); - end - 2'd2: begin - builder_array_muxed25 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_we); - end - default: begin - builder_array_muxed25 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_we); - end - endcase - end - always @(*) begin - builder_array_muxed26 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed26 <= 1'd0; - end - 1'd1: begin - builder_array_muxed26 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_read); - end - 2'd2: begin - builder_array_muxed26 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_read); - end - default: begin - builder_array_muxed26 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_read); - end - endcase - end - always @(*) begin - builder_array_muxed27 <= 1'd0; - case (main_sdram_steerer_sel3) - 1'd0: begin - builder_array_muxed27 <= 1'd0; - end - 1'd1: begin - builder_array_muxed27 <= ((main_sdram_choose_cmd_cmd_valid & main_sdram_choose_cmd_cmd_ready) & main_sdram_choose_cmd_cmd_payload_is_write); - end - 2'd2: begin - builder_array_muxed27 <= ((main_sdram_choose_req_cmd_valid & main_sdram_choose_req_cmd_ready) & main_sdram_choose_req_cmd_payload_is_write); - end - default: begin - builder_array_muxed27 <= ((main_sdram_cmd_valid & main_sdram_cmd_ready) & main_sdram_cmd_payload_is_write); - end - endcase - end - assign main_minsoc_rx = builder_regs1; - assign builder_xilinxasyncresetsynchronizerimpl0 = ((~main_locked) | main_reset); - assign builder_xilinxasyncresetsynchronizerimpl1 = ((~main_locked) | main_reset); - assign builder_xilinxasyncresetsynchronizerimpl2 = ((~main_locked) | main_reset); - assign builder_xilinxasyncresetsynchronizerimpl3 = ((~main_locked) | main_reset); - - always @(posedge clk200_clk) begin - if ((main_reset_counter != 1'd0)) begin - main_reset_counter <= (main_reset_counter - 1'd1); - end else begin - main_ic_reset <= 1'd0; - end - if (clk200_rst) begin - main_reset_counter <= 4'd15; - main_ic_reset <= 1'd1; - end - end - - always @(posedge sys_clk) begin - if ((main_minsoc_ctrl_bus_errors != 32'd4294967295)) begin - if (main_minsoc_ctrl_bus_error) begin - main_minsoc_ctrl_bus_errors <= (main_minsoc_ctrl_bus_errors + 1'd1); - end - end - main_minsoc_rom_bus_ack <= 1'd0; - if (((main_minsoc_rom_bus_cyc & main_minsoc_rom_bus_stb) & (~main_minsoc_rom_bus_ack))) begin - main_minsoc_rom_bus_ack <= 1'd1; - end - main_minsoc_sram_bus_ack <= 1'd0; - if (((main_minsoc_sram_bus_cyc & main_minsoc_sram_bus_stb) & (~main_minsoc_sram_bus_ack))) begin - main_minsoc_sram_bus_ack <= 1'd1; - end - main_minsoc_sink_ready <= 1'd0; - if (((main_minsoc_sink_valid & (~main_minsoc_tx_busy)) & (~main_minsoc_sink_ready))) begin - main_minsoc_tx_reg <= main_minsoc_sink_payload_data; - main_minsoc_tx_bitcount <= 1'd0; - main_minsoc_tx_busy <= 1'd1; - serial_tx <= 1'd0; - end else begin - if ((main_minsoc_uart_clk_txen & main_minsoc_tx_busy)) begin - main_minsoc_tx_bitcount <= (main_minsoc_tx_bitcount + 1'd1); - if ((main_minsoc_tx_bitcount == 4'd8)) begin - serial_tx <= 1'd1; - end else begin - if ((main_minsoc_tx_bitcount == 4'd9)) begin - serial_tx <= 1'd1; - main_minsoc_tx_busy <= 1'd0; - main_minsoc_sink_ready <= 1'd1; - end else begin - serial_tx <= main_minsoc_tx_reg[0]; - main_minsoc_tx_reg <= {1'd0, main_minsoc_tx_reg[7:1]}; - end - end - end - end - if (main_minsoc_tx_busy) begin - {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= (main_minsoc_phase_accumulator_tx + main_minsoc_storage); - end else begin - {main_minsoc_uart_clk_txen, main_minsoc_phase_accumulator_tx} <= 1'd0; - end - main_minsoc_source_valid <= 1'd0; - main_minsoc_rx_r <= main_minsoc_rx; - if ((~main_minsoc_rx_busy)) begin - if (((~main_minsoc_rx) & main_minsoc_rx_r)) begin - main_minsoc_rx_busy <= 1'd1; - main_minsoc_rx_bitcount <= 1'd0; - end - end else begin - if (main_minsoc_uart_clk_rxen) begin - main_minsoc_rx_bitcount <= (main_minsoc_rx_bitcount + 1'd1); - if ((main_minsoc_rx_bitcount == 1'd0)) begin - if (main_minsoc_rx) begin - main_minsoc_rx_busy <= 1'd0; - end - end else begin - if ((main_minsoc_rx_bitcount == 4'd9)) begin - main_minsoc_rx_busy <= 1'd0; - if (main_minsoc_rx) begin - main_minsoc_source_payload_data <= main_minsoc_rx_reg; - main_minsoc_source_valid <= 1'd1; - end - end else begin - main_minsoc_rx_reg <= {main_minsoc_rx, main_minsoc_rx_reg[7:1]}; - end - end - end - end - if (main_minsoc_rx_busy) begin - {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= (main_minsoc_phase_accumulator_rx + main_minsoc_storage); - end else begin - {main_minsoc_uart_clk_rxen, main_minsoc_phase_accumulator_rx} <= 32'd2147483648; - end - if (main_minsoc_uart_tx_clear) begin - main_minsoc_uart_tx_pending <= 1'd0; - end - main_minsoc_uart_tx_old_trigger <= main_minsoc_uart_tx_trigger; - if (((~main_minsoc_uart_tx_trigger) & main_minsoc_uart_tx_old_trigger)) begin - main_minsoc_uart_tx_pending <= 1'd1; - end - if (main_minsoc_uart_rx_clear) begin - main_minsoc_uart_rx_pending <= 1'd0; - end - main_minsoc_uart_rx_old_trigger <= main_minsoc_uart_rx_trigger; - if (((~main_minsoc_uart_rx_trigger) & main_minsoc_uart_rx_old_trigger)) begin - main_minsoc_uart_rx_pending <= 1'd1; - end - if (main_minsoc_uart_tx_fifo_syncfifo_re) begin - main_minsoc_uart_tx_fifo_readable <= 1'd1; - end else begin - if (main_minsoc_uart_tx_fifo_re) begin - main_minsoc_uart_tx_fifo_readable <= 1'd0; - end - end - if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin - main_minsoc_uart_tx_fifo_produce <= (main_minsoc_uart_tx_fifo_produce + 1'd1); - end - if (main_minsoc_uart_tx_fifo_do_read) begin - main_minsoc_uart_tx_fifo_consume <= (main_minsoc_uart_tx_fifo_consume + 1'd1); - end - if (((main_minsoc_uart_tx_fifo_syncfifo_we & main_minsoc_uart_tx_fifo_syncfifo_writable) & (~main_minsoc_uart_tx_fifo_replace))) begin - if ((~main_minsoc_uart_tx_fifo_do_read)) begin - main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 + 1'd1); - end - end else begin - if (main_minsoc_uart_tx_fifo_do_read) begin - main_minsoc_uart_tx_fifo_level0 <= (main_minsoc_uart_tx_fifo_level0 - 1'd1); - end - end - if (main_minsoc_uart_rx_fifo_syncfifo_re) begin - main_minsoc_uart_rx_fifo_readable <= 1'd1; - end else begin - if (main_minsoc_uart_rx_fifo_re) begin - main_minsoc_uart_rx_fifo_readable <= 1'd0; - end - end - if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin - main_minsoc_uart_rx_fifo_produce <= (main_minsoc_uart_rx_fifo_produce + 1'd1); - end - if (main_minsoc_uart_rx_fifo_do_read) begin - main_minsoc_uart_rx_fifo_consume <= (main_minsoc_uart_rx_fifo_consume + 1'd1); - end - if (((main_minsoc_uart_rx_fifo_syncfifo_we & main_minsoc_uart_rx_fifo_syncfifo_writable) & (~main_minsoc_uart_rx_fifo_replace))) begin - if ((~main_minsoc_uart_rx_fifo_do_read)) begin - main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 + 1'd1); - end - end else begin - if (main_minsoc_uart_rx_fifo_do_read) begin - main_minsoc_uart_rx_fifo_level0 <= (main_minsoc_uart_rx_fifo_level0 - 1'd1); - end - end - if (main_minsoc_uart_reset) begin - main_minsoc_uart_tx_pending <= 1'd0; - main_minsoc_uart_tx_old_trigger <= 1'd0; - main_minsoc_uart_rx_pending <= 1'd0; - main_minsoc_uart_rx_old_trigger <= 1'd0; - main_minsoc_uart_tx_fifo_readable <= 1'd0; - main_minsoc_uart_tx_fifo_level0 <= 5'd0; - main_minsoc_uart_tx_fifo_produce <= 4'd0; - main_minsoc_uart_tx_fifo_consume <= 4'd0; - main_minsoc_uart_rx_fifo_readable <= 1'd0; - main_minsoc_uart_rx_fifo_level0 <= 5'd0; - main_minsoc_uart_rx_fifo_produce <= 4'd0; - main_minsoc_uart_rx_fifo_consume <= 4'd0; - end - if (main_minsoc_timer0_en_storage) begin - if ((main_minsoc_timer0_value == 1'd0)) begin - main_minsoc_timer0_value <= main_minsoc_timer0_reload_storage; - end else begin - main_minsoc_timer0_value <= (main_minsoc_timer0_value - 1'd1); - end - end else begin - main_minsoc_timer0_value <= main_minsoc_timer0_load_storage; - end - if (main_minsoc_timer0_update_value_re) begin - main_minsoc_timer0_value_status <= main_minsoc_timer0_value; - end - if (main_minsoc_timer0_zero_clear) begin - main_minsoc_timer0_zero_pending <= 1'd0; - end - main_minsoc_timer0_zero_old_trigger <= main_minsoc_timer0_zero_trigger; - if (((~main_minsoc_timer0_zero_trigger) & main_minsoc_timer0_zero_old_trigger)) begin - main_minsoc_timer0_zero_pending <= 1'd1; - end - builder_wb2csr_state <= builder_wb2csr_next_state; - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip0_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip0_value <= (main_a7ddrphy_bitslip0_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip1_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip1_value <= (main_a7ddrphy_bitslip1_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip2_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip2_value <= (main_a7ddrphy_bitslip2_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip3_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip3_value <= (main_a7ddrphy_bitslip3_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip4_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip4_value <= (main_a7ddrphy_bitslip4_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip5_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip5_value <= (main_a7ddrphy_bitslip5_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip6_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip6_value <= (main_a7ddrphy_bitslip6_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[0]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip7_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip7_value <= (main_a7ddrphy_bitslip7_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip8_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip8_value <= (main_a7ddrphy_bitslip8_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip9_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip9_value <= (main_a7ddrphy_bitslip9_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip10_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip10_value <= (main_a7ddrphy_bitslip10_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip11_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip11_value <= (main_a7ddrphy_bitslip11_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip12_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip12_value <= (main_a7ddrphy_bitslip12_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip13_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip13_value <= (main_a7ddrphy_bitslip13_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip14_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip14_value <= (main_a7ddrphy_bitslip14_value + 1'd1); - end - end - end - if (main_a7ddrphy_dly_sel_storage[1]) begin - if (main_a7ddrphy_rdly_dq_bitslip_rst_re) begin - main_a7ddrphy_bitslip15_value <= 1'd0; - end else begin - if (main_a7ddrphy_rdly_dq_bitslip_re) begin - main_a7ddrphy_bitslip15_value <= (main_a7ddrphy_bitslip15_value + 1'd1); - end - end - end - main_a7ddrphy_n_rddata_en0 <= main_a7ddrphy_dfi_p2_rddata_en; - main_a7ddrphy_n_rddata_en1 <= main_a7ddrphy_n_rddata_en0; - main_a7ddrphy_n_rddata_en2 <= main_a7ddrphy_n_rddata_en1; - main_a7ddrphy_n_rddata_en3 <= main_a7ddrphy_n_rddata_en2; - main_a7ddrphy_n_rddata_en4 <= main_a7ddrphy_n_rddata_en3; - main_a7ddrphy_n_rddata_en5 <= main_a7ddrphy_n_rddata_en4; - main_a7ddrphy_n_rddata_en6 <= main_a7ddrphy_n_rddata_en5; - main_a7ddrphy_n_rddata_en7 <= main_a7ddrphy_n_rddata_en6; - main_a7ddrphy_dfi_p0_rddata_valid <= main_a7ddrphy_n_rddata_en7; - main_a7ddrphy_dfi_p1_rddata_valid <= main_a7ddrphy_n_rddata_en7; - main_a7ddrphy_dfi_p2_rddata_valid <= main_a7ddrphy_n_rddata_en7; - main_a7ddrphy_dfi_p3_rddata_valid <= main_a7ddrphy_n_rddata_en7; - main_a7ddrphy_last_wrdata_en <= { - main_a7ddrphy_last_wrdata_en[2:0], main_a7ddrphy_dfi_p3_wrdata_en - }; - main_a7ddrphy_oe_dqs <= main_a7ddrphy_oe; - main_a7ddrphy_oe_dq <= main_a7ddrphy_oe; - main_a7ddrphy_bitslip0_r <= {main_a7ddrphy_bitslip0_i, main_a7ddrphy_bitslip0_r[15:8]}; - case (main_a7ddrphy_bitslip0_value) - 1'd0: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip0_o <= main_a7ddrphy_bitslip0_r[14:7]; - end - endcase - main_a7ddrphy_bitslip1_r <= {main_a7ddrphy_bitslip1_i, main_a7ddrphy_bitslip1_r[15:8]}; - case (main_a7ddrphy_bitslip1_value) - 1'd0: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip1_o <= main_a7ddrphy_bitslip1_r[14:7]; - end - endcase - main_a7ddrphy_bitslip2_r <= {main_a7ddrphy_bitslip2_i, main_a7ddrphy_bitslip2_r[15:8]}; - case (main_a7ddrphy_bitslip2_value) - 1'd0: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip2_o <= main_a7ddrphy_bitslip2_r[14:7]; - end - endcase - main_a7ddrphy_bitslip3_r <= {main_a7ddrphy_bitslip3_i, main_a7ddrphy_bitslip3_r[15:8]}; - case (main_a7ddrphy_bitslip3_value) - 1'd0: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip3_o <= main_a7ddrphy_bitslip3_r[14:7]; - end - endcase - main_a7ddrphy_bitslip4_r <= {main_a7ddrphy_bitslip4_i, main_a7ddrphy_bitslip4_r[15:8]}; - case (main_a7ddrphy_bitslip4_value) - 1'd0: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip4_o <= main_a7ddrphy_bitslip4_r[14:7]; - end - endcase - main_a7ddrphy_bitslip5_r <= {main_a7ddrphy_bitslip5_i, main_a7ddrphy_bitslip5_r[15:8]}; - case (main_a7ddrphy_bitslip5_value) - 1'd0: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip5_o <= main_a7ddrphy_bitslip5_r[14:7]; - end - endcase - main_a7ddrphy_bitslip6_r <= {main_a7ddrphy_bitslip6_i, main_a7ddrphy_bitslip6_r[15:8]}; - case (main_a7ddrphy_bitslip6_value) - 1'd0: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip6_o <= main_a7ddrphy_bitslip6_r[14:7]; - end - endcase - main_a7ddrphy_bitslip7_r <= {main_a7ddrphy_bitslip7_i, main_a7ddrphy_bitslip7_r[15:8]}; - case (main_a7ddrphy_bitslip7_value) - 1'd0: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip7_o <= main_a7ddrphy_bitslip7_r[14:7]; - end - endcase - main_a7ddrphy_bitslip8_r <= {main_a7ddrphy_bitslip8_i, main_a7ddrphy_bitslip8_r[15:8]}; - case (main_a7ddrphy_bitslip8_value) - 1'd0: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip8_o <= main_a7ddrphy_bitslip8_r[14:7]; - end - endcase - main_a7ddrphy_bitslip9_r <= {main_a7ddrphy_bitslip9_i, main_a7ddrphy_bitslip9_r[15:8]}; - case (main_a7ddrphy_bitslip9_value) - 1'd0: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip9_o <= main_a7ddrphy_bitslip9_r[14:7]; - end - endcase - main_a7ddrphy_bitslip10_r <= {main_a7ddrphy_bitslip10_i, main_a7ddrphy_bitslip10_r[15:8]}; - case (main_a7ddrphy_bitslip10_value) - 1'd0: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip10_o <= main_a7ddrphy_bitslip10_r[14:7]; - end - endcase - main_a7ddrphy_bitslip11_r <= {main_a7ddrphy_bitslip11_i, main_a7ddrphy_bitslip11_r[15:8]}; - case (main_a7ddrphy_bitslip11_value) - 1'd0: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip11_o <= main_a7ddrphy_bitslip11_r[14:7]; - end - endcase - main_a7ddrphy_bitslip12_r <= {main_a7ddrphy_bitslip12_i, main_a7ddrphy_bitslip12_r[15:8]}; - case (main_a7ddrphy_bitslip12_value) - 1'd0: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip12_o <= main_a7ddrphy_bitslip12_r[14:7]; - end - endcase - main_a7ddrphy_bitslip13_r <= {main_a7ddrphy_bitslip13_i, main_a7ddrphy_bitslip13_r[15:8]}; - case (main_a7ddrphy_bitslip13_value) - 1'd0: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip13_o <= main_a7ddrphy_bitslip13_r[14:7]; - end - endcase - main_a7ddrphy_bitslip14_r <= {main_a7ddrphy_bitslip14_i, main_a7ddrphy_bitslip14_r[15:8]}; - case (main_a7ddrphy_bitslip14_value) - 1'd0: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip14_o <= main_a7ddrphy_bitslip14_r[14:7]; - end - endcase - main_a7ddrphy_bitslip15_r <= {main_a7ddrphy_bitslip15_i, main_a7ddrphy_bitslip15_r[15:8]}; - case (main_a7ddrphy_bitslip15_value) - 1'd0: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[7:0]; - end - 1'd1: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[8:1]; - end - 2'd2: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[9:2]; - end - 2'd3: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[10:3]; - end - 3'd4: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[11:4]; - end - 3'd5: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[12:5]; - end - 3'd6: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[13:6]; - end - 3'd7: begin - main_a7ddrphy_bitslip15_o <= main_a7ddrphy_bitslip15_r[14:7]; - end - endcase - if (main_sdram_inti_p0_rddata_valid) begin - main_sdram_phaseinjector0_status <= main_sdram_inti_p0_rddata; - end - if (main_sdram_inti_p1_rddata_valid) begin - main_sdram_phaseinjector1_status <= main_sdram_inti_p1_rddata; - end - if (main_sdram_inti_p2_rddata_valid) begin - main_sdram_phaseinjector2_status <= main_sdram_inti_p2_rddata; - end - if (main_sdram_inti_p3_rddata_valid) begin - main_sdram_phaseinjector3_status <= main_sdram_inti_p3_rddata; - end - if ((main_sdram_timer_wait & (~main_sdram_timer_done0))) begin - main_sdram_timer_count1 <= (main_sdram_timer_count1 - 1'd1); - end else begin - main_sdram_timer_count1 <= 9'd468; - end - main_sdram_postponer_req_o <= 1'd0; - if (main_sdram_postponer_req_i) begin - main_sdram_postponer_count <= (main_sdram_postponer_count - 1'd1); - if ((main_sdram_postponer_count == 1'd0)) begin - main_sdram_postponer_count <= 1'd0; - main_sdram_postponer_req_o <= 1'd1; - end - end - if (main_sdram_sequencer_start0) begin - main_sdram_sequencer_count <= 1'd0; - end else begin - if (main_sdram_sequencer_done1) begin - if ((main_sdram_sequencer_count != 1'd0)) begin - main_sdram_sequencer_count <= (main_sdram_sequencer_count - 1'd1); - end - end - end - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd0; - main_sdram_sequencer_done1 <= 1'd0; - if ((main_sdram_sequencer_start1 & (main_sdram_sequencer_counter == 1'd0))) begin - main_sdram_cmd_payload_a <= 11'd1024; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd1; - main_sdram_cmd_payload_we <= 1'd1; - end - if ((main_sdram_sequencer_counter == 2'd2)) begin - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd1; - main_sdram_cmd_payload_ras <= 1'd1; - main_sdram_cmd_payload_we <= 1'd0; - end - if ((main_sdram_sequencer_counter == 6'd34)) begin - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd0; - main_sdram_sequencer_done1 <= 1'd1; - end - if ((main_sdram_sequencer_counter == 6'd34)) begin - main_sdram_sequencer_counter <= 1'd0; - end else begin - if ((main_sdram_sequencer_counter != 1'd0)) begin - main_sdram_sequencer_counter <= (main_sdram_sequencer_counter + 1'd1); - end else begin - if (main_sdram_sequencer_start1) begin - main_sdram_sequencer_counter <= 1'd1; - end - end - end - if ((main_sdram_zqcs_timer_wait & (~main_sdram_zqcs_timer_done0))) begin - main_sdram_zqcs_timer_count1 <= (main_sdram_zqcs_timer_count1 - 1'd1); - end else begin - main_sdram_zqcs_timer_count1 <= 26'd59999999; - end - main_sdram_zqcs_executer_done <= 1'd0; - if ((main_sdram_zqcs_executer_start & (main_sdram_zqcs_executer_counter == 1'd0))) begin - main_sdram_cmd_payload_a <= 11'd1024; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd1; - main_sdram_cmd_payload_we <= 1'd1; - end - if ((main_sdram_zqcs_executer_counter == 2'd2)) begin - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd1; - end - if ((main_sdram_zqcs_executer_counter == 5'd18)) begin - main_sdram_cmd_payload_a <= 1'd0; - main_sdram_cmd_payload_ba <= 1'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd0; - main_sdram_zqcs_executer_done <= 1'd1; - end - if ((main_sdram_zqcs_executer_counter == 5'd18)) begin - main_sdram_zqcs_executer_counter <= 1'd0; - end else begin - if ((main_sdram_zqcs_executer_counter != 1'd0)) begin - main_sdram_zqcs_executer_counter <= (main_sdram_zqcs_executer_counter + 1'd1); - end else begin - if (main_sdram_zqcs_executer_start) begin - main_sdram_zqcs_executer_counter <= 1'd1; - end - end - end - builder_refresher_state <= builder_refresher_next_state; - if (main_sdram_bankmachine0_row_close) begin - main_sdram_bankmachine0_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine0_row_open) begin - main_sdram_bankmachine0_row_opened <= 1'd1; - main_sdram_bankmachine0_row <= main_sdram_bankmachine0_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine0_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine0_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_we & main_sdram_bankmachine0_cmd_buffer_lookahead_syncfifo0_writable) & (~main_sdram_bankmachine0_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine0_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine0_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine0_cmd_buffer_lookahead_level <= (main_sdram_bankmachine0_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine0_cmd_buffer_source_valid) | main_sdram_bankmachine0_cmd_buffer_source_ready)) begin - main_sdram_bankmachine0_cmd_buffer_source_valid <= main_sdram_bankmachine0_cmd_buffer_sink_valid; - main_sdram_bankmachine0_cmd_buffer_source_first <= main_sdram_bankmachine0_cmd_buffer_sink_first; - main_sdram_bankmachine0_cmd_buffer_source_last <= main_sdram_bankmachine0_cmd_buffer_sink_last; - main_sdram_bankmachine0_cmd_buffer_source_payload_we <= main_sdram_bankmachine0_cmd_buffer_sink_payload_we; - main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= main_sdram_bankmachine0_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine0_twtpcon_valid) begin - main_sdram_bankmachine0_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine0_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine0_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine0_twtpcon_ready)) begin - main_sdram_bankmachine0_twtpcon_count <= (main_sdram_bankmachine0_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine0_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine0_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine0_trccon_valid) begin - main_sdram_bankmachine0_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine0_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine0_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine0_trccon_ready)) begin - main_sdram_bankmachine0_trccon_count <= (main_sdram_bankmachine0_trccon_count - 1'd1); - if ((main_sdram_bankmachine0_trccon_count == 1'd1)) begin - main_sdram_bankmachine0_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine0_trascon_valid) begin - main_sdram_bankmachine0_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine0_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine0_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine0_trascon_ready)) begin - main_sdram_bankmachine0_trascon_count <= (main_sdram_bankmachine0_trascon_count - 1'd1); - if ((main_sdram_bankmachine0_trascon_count == 1'd1)) begin - main_sdram_bankmachine0_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine0_state <= builder_bankmachine0_next_state; - if (main_sdram_bankmachine1_row_close) begin - main_sdram_bankmachine1_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine1_row_open) begin - main_sdram_bankmachine1_row_opened <= 1'd1; - main_sdram_bankmachine1_row <= main_sdram_bankmachine1_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine1_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine1_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_we & main_sdram_bankmachine1_cmd_buffer_lookahead_syncfifo1_writable) & (~main_sdram_bankmachine1_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine1_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine1_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine1_cmd_buffer_lookahead_level <= (main_sdram_bankmachine1_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine1_cmd_buffer_source_valid) | main_sdram_bankmachine1_cmd_buffer_source_ready)) begin - main_sdram_bankmachine1_cmd_buffer_source_valid <= main_sdram_bankmachine1_cmd_buffer_sink_valid; - main_sdram_bankmachine1_cmd_buffer_source_first <= main_sdram_bankmachine1_cmd_buffer_sink_first; - main_sdram_bankmachine1_cmd_buffer_source_last <= main_sdram_bankmachine1_cmd_buffer_sink_last; - main_sdram_bankmachine1_cmd_buffer_source_payload_we <= main_sdram_bankmachine1_cmd_buffer_sink_payload_we; - main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= main_sdram_bankmachine1_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine1_twtpcon_valid) begin - main_sdram_bankmachine1_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine1_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine1_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine1_twtpcon_ready)) begin - main_sdram_bankmachine1_twtpcon_count <= (main_sdram_bankmachine1_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine1_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine1_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine1_trccon_valid) begin - main_sdram_bankmachine1_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine1_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine1_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine1_trccon_ready)) begin - main_sdram_bankmachine1_trccon_count <= (main_sdram_bankmachine1_trccon_count - 1'd1); - if ((main_sdram_bankmachine1_trccon_count == 1'd1)) begin - main_sdram_bankmachine1_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine1_trascon_valid) begin - main_sdram_bankmachine1_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine1_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine1_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine1_trascon_ready)) begin - main_sdram_bankmachine1_trascon_count <= (main_sdram_bankmachine1_trascon_count - 1'd1); - if ((main_sdram_bankmachine1_trascon_count == 1'd1)) begin - main_sdram_bankmachine1_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine1_state <= builder_bankmachine1_next_state; - if (main_sdram_bankmachine2_row_close) begin - main_sdram_bankmachine2_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine2_row_open) begin - main_sdram_bankmachine2_row_opened <= 1'd1; - main_sdram_bankmachine2_row <= main_sdram_bankmachine2_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine2_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine2_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_we & main_sdram_bankmachine2_cmd_buffer_lookahead_syncfifo2_writable) & (~main_sdram_bankmachine2_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine2_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine2_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine2_cmd_buffer_lookahead_level <= (main_sdram_bankmachine2_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine2_cmd_buffer_source_valid) | main_sdram_bankmachine2_cmd_buffer_source_ready)) begin - main_sdram_bankmachine2_cmd_buffer_source_valid <= main_sdram_bankmachine2_cmd_buffer_sink_valid; - main_sdram_bankmachine2_cmd_buffer_source_first <= main_sdram_bankmachine2_cmd_buffer_sink_first; - main_sdram_bankmachine2_cmd_buffer_source_last <= main_sdram_bankmachine2_cmd_buffer_sink_last; - main_sdram_bankmachine2_cmd_buffer_source_payload_we <= main_sdram_bankmachine2_cmd_buffer_sink_payload_we; - main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= main_sdram_bankmachine2_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine2_twtpcon_valid) begin - main_sdram_bankmachine2_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine2_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine2_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine2_twtpcon_ready)) begin - main_sdram_bankmachine2_twtpcon_count <= (main_sdram_bankmachine2_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine2_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine2_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine2_trccon_valid) begin - main_sdram_bankmachine2_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine2_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine2_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine2_trccon_ready)) begin - main_sdram_bankmachine2_trccon_count <= (main_sdram_bankmachine2_trccon_count - 1'd1); - if ((main_sdram_bankmachine2_trccon_count == 1'd1)) begin - main_sdram_bankmachine2_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine2_trascon_valid) begin - main_sdram_bankmachine2_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine2_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine2_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine2_trascon_ready)) begin - main_sdram_bankmachine2_trascon_count <= (main_sdram_bankmachine2_trascon_count - 1'd1); - if ((main_sdram_bankmachine2_trascon_count == 1'd1)) begin - main_sdram_bankmachine2_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine2_state <= builder_bankmachine2_next_state; - if (main_sdram_bankmachine3_row_close) begin - main_sdram_bankmachine3_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine3_row_open) begin - main_sdram_bankmachine3_row_opened <= 1'd1; - main_sdram_bankmachine3_row <= main_sdram_bankmachine3_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine3_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine3_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_we & main_sdram_bankmachine3_cmd_buffer_lookahead_syncfifo3_writable) & (~main_sdram_bankmachine3_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine3_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine3_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine3_cmd_buffer_lookahead_level <= (main_sdram_bankmachine3_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine3_cmd_buffer_source_valid) | main_sdram_bankmachine3_cmd_buffer_source_ready)) begin - main_sdram_bankmachine3_cmd_buffer_source_valid <= main_sdram_bankmachine3_cmd_buffer_sink_valid; - main_sdram_bankmachine3_cmd_buffer_source_first <= main_sdram_bankmachine3_cmd_buffer_sink_first; - main_sdram_bankmachine3_cmd_buffer_source_last <= main_sdram_bankmachine3_cmd_buffer_sink_last; - main_sdram_bankmachine3_cmd_buffer_source_payload_we <= main_sdram_bankmachine3_cmd_buffer_sink_payload_we; - main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= main_sdram_bankmachine3_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine3_twtpcon_valid) begin - main_sdram_bankmachine3_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine3_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine3_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine3_twtpcon_ready)) begin - main_sdram_bankmachine3_twtpcon_count <= (main_sdram_bankmachine3_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine3_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine3_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine3_trccon_valid) begin - main_sdram_bankmachine3_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine3_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine3_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine3_trccon_ready)) begin - main_sdram_bankmachine3_trccon_count <= (main_sdram_bankmachine3_trccon_count - 1'd1); - if ((main_sdram_bankmachine3_trccon_count == 1'd1)) begin - main_sdram_bankmachine3_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine3_trascon_valid) begin - main_sdram_bankmachine3_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine3_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine3_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine3_trascon_ready)) begin - main_sdram_bankmachine3_trascon_count <= (main_sdram_bankmachine3_trascon_count - 1'd1); - if ((main_sdram_bankmachine3_trascon_count == 1'd1)) begin - main_sdram_bankmachine3_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine3_state <= builder_bankmachine3_next_state; - if (main_sdram_bankmachine4_row_close) begin - main_sdram_bankmachine4_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine4_row_open) begin - main_sdram_bankmachine4_row_opened <= 1'd1; - main_sdram_bankmachine4_row <= main_sdram_bankmachine4_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine4_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine4_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_we & main_sdram_bankmachine4_cmd_buffer_lookahead_syncfifo4_writable) & (~main_sdram_bankmachine4_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine4_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine4_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine4_cmd_buffer_lookahead_level <= (main_sdram_bankmachine4_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine4_cmd_buffer_source_valid) | main_sdram_bankmachine4_cmd_buffer_source_ready)) begin - main_sdram_bankmachine4_cmd_buffer_source_valid <= main_sdram_bankmachine4_cmd_buffer_sink_valid; - main_sdram_bankmachine4_cmd_buffer_source_first <= main_sdram_bankmachine4_cmd_buffer_sink_first; - main_sdram_bankmachine4_cmd_buffer_source_last <= main_sdram_bankmachine4_cmd_buffer_sink_last; - main_sdram_bankmachine4_cmd_buffer_source_payload_we <= main_sdram_bankmachine4_cmd_buffer_sink_payload_we; - main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= main_sdram_bankmachine4_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine4_twtpcon_valid) begin - main_sdram_bankmachine4_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine4_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine4_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine4_twtpcon_ready)) begin - main_sdram_bankmachine4_twtpcon_count <= (main_sdram_bankmachine4_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine4_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine4_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine4_trccon_valid) begin - main_sdram_bankmachine4_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine4_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine4_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine4_trccon_ready)) begin - main_sdram_bankmachine4_trccon_count <= (main_sdram_bankmachine4_trccon_count - 1'd1); - if ((main_sdram_bankmachine4_trccon_count == 1'd1)) begin - main_sdram_bankmachine4_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine4_trascon_valid) begin - main_sdram_bankmachine4_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine4_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine4_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine4_trascon_ready)) begin - main_sdram_bankmachine4_trascon_count <= (main_sdram_bankmachine4_trascon_count - 1'd1); - if ((main_sdram_bankmachine4_trascon_count == 1'd1)) begin - main_sdram_bankmachine4_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine4_state <= builder_bankmachine4_next_state; - if (main_sdram_bankmachine5_row_close) begin - main_sdram_bankmachine5_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine5_row_open) begin - main_sdram_bankmachine5_row_opened <= 1'd1; - main_sdram_bankmachine5_row <= main_sdram_bankmachine5_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine5_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine5_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_we & main_sdram_bankmachine5_cmd_buffer_lookahead_syncfifo5_writable) & (~main_sdram_bankmachine5_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine5_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine5_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine5_cmd_buffer_lookahead_level <= (main_sdram_bankmachine5_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine5_cmd_buffer_source_valid) | main_sdram_bankmachine5_cmd_buffer_source_ready)) begin - main_sdram_bankmachine5_cmd_buffer_source_valid <= main_sdram_bankmachine5_cmd_buffer_sink_valid; - main_sdram_bankmachine5_cmd_buffer_source_first <= main_sdram_bankmachine5_cmd_buffer_sink_first; - main_sdram_bankmachine5_cmd_buffer_source_last <= main_sdram_bankmachine5_cmd_buffer_sink_last; - main_sdram_bankmachine5_cmd_buffer_source_payload_we <= main_sdram_bankmachine5_cmd_buffer_sink_payload_we; - main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= main_sdram_bankmachine5_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine5_twtpcon_valid) begin - main_sdram_bankmachine5_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine5_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine5_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine5_twtpcon_ready)) begin - main_sdram_bankmachine5_twtpcon_count <= (main_sdram_bankmachine5_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine5_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine5_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine5_trccon_valid) begin - main_sdram_bankmachine5_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine5_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine5_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine5_trccon_ready)) begin - main_sdram_bankmachine5_trccon_count <= (main_sdram_bankmachine5_trccon_count - 1'd1); - if ((main_sdram_bankmachine5_trccon_count == 1'd1)) begin - main_sdram_bankmachine5_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine5_trascon_valid) begin - main_sdram_bankmachine5_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine5_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine5_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine5_trascon_ready)) begin - main_sdram_bankmachine5_trascon_count <= (main_sdram_bankmachine5_trascon_count - 1'd1); - if ((main_sdram_bankmachine5_trascon_count == 1'd1)) begin - main_sdram_bankmachine5_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine5_state <= builder_bankmachine5_next_state; - if (main_sdram_bankmachine6_row_close) begin - main_sdram_bankmachine6_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine6_row_open) begin - main_sdram_bankmachine6_row_opened <= 1'd1; - main_sdram_bankmachine6_row <= main_sdram_bankmachine6_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine6_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine6_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_we & main_sdram_bankmachine6_cmd_buffer_lookahead_syncfifo6_writable) & (~main_sdram_bankmachine6_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine6_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine6_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine6_cmd_buffer_lookahead_level <= (main_sdram_bankmachine6_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine6_cmd_buffer_source_valid) | main_sdram_bankmachine6_cmd_buffer_source_ready)) begin - main_sdram_bankmachine6_cmd_buffer_source_valid <= main_sdram_bankmachine6_cmd_buffer_sink_valid; - main_sdram_bankmachine6_cmd_buffer_source_first <= main_sdram_bankmachine6_cmd_buffer_sink_first; - main_sdram_bankmachine6_cmd_buffer_source_last <= main_sdram_bankmachine6_cmd_buffer_sink_last; - main_sdram_bankmachine6_cmd_buffer_source_payload_we <= main_sdram_bankmachine6_cmd_buffer_sink_payload_we; - main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= main_sdram_bankmachine6_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine6_twtpcon_valid) begin - main_sdram_bankmachine6_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine6_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine6_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine6_twtpcon_ready)) begin - main_sdram_bankmachine6_twtpcon_count <= (main_sdram_bankmachine6_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine6_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine6_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine6_trccon_valid) begin - main_sdram_bankmachine6_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine6_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine6_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine6_trccon_ready)) begin - main_sdram_bankmachine6_trccon_count <= (main_sdram_bankmachine6_trccon_count - 1'd1); - if ((main_sdram_bankmachine6_trccon_count == 1'd1)) begin - main_sdram_bankmachine6_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine6_trascon_valid) begin - main_sdram_bankmachine6_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine6_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine6_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine6_trascon_ready)) begin - main_sdram_bankmachine6_trascon_count <= (main_sdram_bankmachine6_trascon_count - 1'd1); - if ((main_sdram_bankmachine6_trascon_count == 1'd1)) begin - main_sdram_bankmachine6_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine6_state <= builder_bankmachine6_next_state; - if (main_sdram_bankmachine7_row_close) begin - main_sdram_bankmachine7_row_opened <= 1'd0; - end else begin - if (main_sdram_bankmachine7_row_open) begin - main_sdram_bankmachine7_row_opened <= 1'd1; - main_sdram_bankmachine7_row <= main_sdram_bankmachine7_cmd_buffer_source_payload_addr[20:7]; - end - end - if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= (main_sdram_bankmachine7_cmd_buffer_lookahead_produce + 1'd1); - end - if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= (main_sdram_bankmachine7_cmd_buffer_lookahead_consume + 1'd1); - end - if (((main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_we & main_sdram_bankmachine7_cmd_buffer_lookahead_syncfifo7_writable) & (~main_sdram_bankmachine7_cmd_buffer_lookahead_replace))) begin - if ((~main_sdram_bankmachine7_cmd_buffer_lookahead_do_read)) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level + 1'd1); - end - end else begin - if (main_sdram_bankmachine7_cmd_buffer_lookahead_do_read) begin - main_sdram_bankmachine7_cmd_buffer_lookahead_level <= (main_sdram_bankmachine7_cmd_buffer_lookahead_level - 1'd1); - end - end - if (((~main_sdram_bankmachine7_cmd_buffer_source_valid) | main_sdram_bankmachine7_cmd_buffer_source_ready)) begin - main_sdram_bankmachine7_cmd_buffer_source_valid <= main_sdram_bankmachine7_cmd_buffer_sink_valid; - main_sdram_bankmachine7_cmd_buffer_source_first <= main_sdram_bankmachine7_cmd_buffer_sink_first; - main_sdram_bankmachine7_cmd_buffer_source_last <= main_sdram_bankmachine7_cmd_buffer_sink_last; - main_sdram_bankmachine7_cmd_buffer_source_payload_we <= main_sdram_bankmachine7_cmd_buffer_sink_payload_we; - main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= main_sdram_bankmachine7_cmd_buffer_sink_payload_addr; - end - if (main_sdram_bankmachine7_twtpcon_valid) begin - main_sdram_bankmachine7_twtpcon_count <= 3'd4; - if (1'd0) begin - main_sdram_bankmachine7_twtpcon_ready <= 1'd1; - end else begin - main_sdram_bankmachine7_twtpcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine7_twtpcon_ready)) begin - main_sdram_bankmachine7_twtpcon_count <= (main_sdram_bankmachine7_twtpcon_count - 1'd1); - if ((main_sdram_bankmachine7_twtpcon_count == 1'd1)) begin - main_sdram_bankmachine7_twtpcon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine7_trccon_valid) begin - main_sdram_bankmachine7_trccon_count <= 2'd3; - if (1'd0) begin - main_sdram_bankmachine7_trccon_ready <= 1'd1; - end else begin - main_sdram_bankmachine7_trccon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine7_trccon_ready)) begin - main_sdram_bankmachine7_trccon_count <= (main_sdram_bankmachine7_trccon_count - 1'd1); - if ((main_sdram_bankmachine7_trccon_count == 1'd1)) begin - main_sdram_bankmachine7_trccon_ready <= 1'd1; - end - end - end - if (main_sdram_bankmachine7_trascon_valid) begin - main_sdram_bankmachine7_trascon_count <= 2'd2; - if (1'd0) begin - main_sdram_bankmachine7_trascon_ready <= 1'd1; - end else begin - main_sdram_bankmachine7_trascon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_bankmachine7_trascon_ready)) begin - main_sdram_bankmachine7_trascon_count <= (main_sdram_bankmachine7_trascon_count - 1'd1); - if ((main_sdram_bankmachine7_trascon_count == 1'd1)) begin - main_sdram_bankmachine7_trascon_ready <= 1'd1; - end - end - end - builder_bankmachine7_state <= builder_bankmachine7_next_state; - if ((~main_sdram_en0)) begin - main_sdram_time0 <= 5'd31; - end else begin - if ((~main_sdram_max_time0)) begin - main_sdram_time0 <= (main_sdram_time0 - 1'd1); - end - end - if ((~main_sdram_en1)) begin - main_sdram_time1 <= 4'd15; - end else begin - if ((~main_sdram_max_time1)) begin - main_sdram_time1 <= (main_sdram_time1 - 1'd1); - end - end - if (main_sdram_choose_cmd_ce) begin - case (main_sdram_choose_cmd_grant) - 1'd0: begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end - end - end - end - end - end - end - end - 1'd1: begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end - end - end - end - end - end - end - end - 2'd2: begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end - end - end - end - end - end - end - end - 2'd3: begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end - end - end - end - end - end - end - end - 3'd4: begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end - end - end - end - end - end - end - end - 3'd5: begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end else begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end - end - end - end - end - end - end - end - 3'd6: begin - if (main_sdram_choose_cmd_request[7]) begin - main_sdram_choose_cmd_grant <= 3'd7; - end else begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end - end - end - end - end - end - end - end - 3'd7: begin - if (main_sdram_choose_cmd_request[0]) begin - main_sdram_choose_cmd_grant <= 1'd0; - end else begin - if (main_sdram_choose_cmd_request[1]) begin - main_sdram_choose_cmd_grant <= 1'd1; - end else begin - if (main_sdram_choose_cmd_request[2]) begin - main_sdram_choose_cmd_grant <= 2'd2; - end else begin - if (main_sdram_choose_cmd_request[3]) begin - main_sdram_choose_cmd_grant <= 2'd3; - end else begin - if (main_sdram_choose_cmd_request[4]) begin - main_sdram_choose_cmd_grant <= 3'd4; - end else begin - if (main_sdram_choose_cmd_request[5]) begin - main_sdram_choose_cmd_grant <= 3'd5; - end else begin - if (main_sdram_choose_cmd_request[6]) begin - main_sdram_choose_cmd_grant <= 3'd6; - end - end - end - end - end - end - end - end - endcase - end - if (main_sdram_choose_req_ce) begin - case (main_sdram_choose_req_grant) - 1'd0: begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end - end - end - end - end - end - end - end - 1'd1: begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end - end - end - end - end - end - end - end - 2'd2: begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end - end - end - end - end - end - end - end - 2'd3: begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end - end - end - end - end - end - end - end - 3'd4: begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end - end - end - end - end - end - end - end - 3'd5: begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end else begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end - end - end - end - end - end - end - end - 3'd6: begin - if (main_sdram_choose_req_request[7]) begin - main_sdram_choose_req_grant <= 3'd7; - end else begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end - end - end - end - end - end - end - end - 3'd7: begin - if (main_sdram_choose_req_request[0]) begin - main_sdram_choose_req_grant <= 1'd0; - end else begin - if (main_sdram_choose_req_request[1]) begin - main_sdram_choose_req_grant <= 1'd1; - end else begin - if (main_sdram_choose_req_request[2]) begin - main_sdram_choose_req_grant <= 2'd2; - end else begin - if (main_sdram_choose_req_request[3]) begin - main_sdram_choose_req_grant <= 2'd3; - end else begin - if (main_sdram_choose_req_request[4]) begin - main_sdram_choose_req_grant <= 3'd4; - end else begin - if (main_sdram_choose_req_request[5]) begin - main_sdram_choose_req_grant <= 3'd5; - end else begin - if (main_sdram_choose_req_request[6]) begin - main_sdram_choose_req_grant <= 3'd6; - end - end - end - end - end - end - end - end - endcase - end - main_sdram_dfi_p0_cs_n <= 1'd0; - main_sdram_dfi_p0_bank <= builder_array_muxed0; - main_sdram_dfi_p0_address <= builder_array_muxed1; - main_sdram_dfi_p0_cas_n <= (~builder_array_muxed2); - main_sdram_dfi_p0_ras_n <= (~builder_array_muxed3); - main_sdram_dfi_p0_we_n <= (~builder_array_muxed4); - main_sdram_dfi_p0_rddata_en <= builder_array_muxed5; - main_sdram_dfi_p0_wrdata_en <= builder_array_muxed6; - main_sdram_dfi_p1_cs_n <= 1'd0; - main_sdram_dfi_p1_bank <= builder_array_muxed7; - main_sdram_dfi_p1_address <= builder_array_muxed8; - main_sdram_dfi_p1_cas_n <= (~builder_array_muxed9); - main_sdram_dfi_p1_ras_n <= (~builder_array_muxed10); - main_sdram_dfi_p1_we_n <= (~builder_array_muxed11); - main_sdram_dfi_p1_rddata_en <= builder_array_muxed12; - main_sdram_dfi_p1_wrdata_en <= builder_array_muxed13; - main_sdram_dfi_p2_cs_n <= 1'd0; - main_sdram_dfi_p2_bank <= builder_array_muxed14; - main_sdram_dfi_p2_address <= builder_array_muxed15; - main_sdram_dfi_p2_cas_n <= (~builder_array_muxed16); - main_sdram_dfi_p2_ras_n <= (~builder_array_muxed17); - main_sdram_dfi_p2_we_n <= (~builder_array_muxed18); - main_sdram_dfi_p2_rddata_en <= builder_array_muxed19; - main_sdram_dfi_p2_wrdata_en <= builder_array_muxed20; - main_sdram_dfi_p3_cs_n <= 1'd0; - main_sdram_dfi_p3_bank <= builder_array_muxed21; - main_sdram_dfi_p3_address <= builder_array_muxed22; - main_sdram_dfi_p3_cas_n <= (~builder_array_muxed23); - main_sdram_dfi_p3_ras_n <= (~builder_array_muxed24); - main_sdram_dfi_p3_we_n <= (~builder_array_muxed25); - main_sdram_dfi_p3_rddata_en <= builder_array_muxed26; - main_sdram_dfi_p3_wrdata_en <= builder_array_muxed27; - if (main_sdram_trrdcon_valid) begin - main_sdram_trrdcon_count <= 1'd1; - if (1'd0) begin - main_sdram_trrdcon_ready <= 1'd1; - end else begin - main_sdram_trrdcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_trrdcon_ready)) begin - main_sdram_trrdcon_count <= (main_sdram_trrdcon_count - 1'd1); - if ((main_sdram_trrdcon_count == 1'd1)) begin - main_sdram_trrdcon_ready <= 1'd1; - end - end - end - main_sdram_tfawcon_window <= {main_sdram_tfawcon_window, main_sdram_tfawcon_valid}; - if ((main_sdram_tfawcon_count < 3'd4)) begin - if ((main_sdram_tfawcon_count == 2'd3)) begin - main_sdram_tfawcon_ready <= (~main_sdram_tfawcon_valid); - end else begin - main_sdram_tfawcon_ready <= 1'd1; - end - end - if (main_sdram_tccdcon_valid) begin - main_sdram_tccdcon_count <= 1'd0; - if (1'd1) begin - main_sdram_tccdcon_ready <= 1'd1; - end else begin - main_sdram_tccdcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_tccdcon_ready)) begin - main_sdram_tccdcon_count <= (main_sdram_tccdcon_count - 1'd1); - if ((main_sdram_tccdcon_count == 1'd1)) begin - main_sdram_tccdcon_ready <= 1'd1; - end - end - end - if (main_sdram_twtrcon_valid) begin - main_sdram_twtrcon_count <= 3'd4; - if (1'd0) begin - main_sdram_twtrcon_ready <= 1'd1; - end else begin - main_sdram_twtrcon_ready <= 1'd0; - end - end else begin - if ((~main_sdram_twtrcon_ready)) begin - main_sdram_twtrcon_count <= (main_sdram_twtrcon_count - 1'd1); - if ((main_sdram_twtrcon_count == 1'd1)) begin - main_sdram_twtrcon_ready <= 1'd1; - end - end - end - builder_multiplexer_state <= builder_multiplexer_next_state; - if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) begin - builder_rbank <= 1'd0; - end - if (((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) begin - builder_wbank <= 1'd0; - end - if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) begin - builder_rbank <= 1'd1; - end - if (((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) begin - builder_wbank <= 1'd1; - end - if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) begin - builder_rbank <= 2'd2; - end - if (((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) begin - builder_wbank <= 2'd2; - end - if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) begin - builder_rbank <= 2'd3; - end - if (((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) begin - builder_wbank <= 2'd3; - end - if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) begin - builder_rbank <= 3'd4; - end - if (((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) begin - builder_wbank <= 3'd4; - end - if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) begin - builder_rbank <= 3'd5; - end - if (((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) begin - builder_wbank <= 3'd5; - end - if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) begin - builder_rbank <= 3'd6; - end - if (((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) begin - builder_wbank <= 3'd6; - end - if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)) begin - builder_rbank <= 3'd7; - end - if (((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)) begin - builder_wbank <= 3'd7; - end - builder_new_master_wdata_ready0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_wdata_ready)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_wdata_ready)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_wdata_ready)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_wdata_ready)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_wdata_ready)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_wdata_ready)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_wdata_ready)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_wdata_ready)); - builder_new_master_wdata_ready1 <= builder_new_master_wdata_ready0; - builder_new_master_wdata_ready2 <= builder_new_master_wdata_ready1; - builder_new_master_rdata_valid0 <= ((((((((1'd0 | ((builder_roundrobin0_grant == 1'd0) & main_sdram_interface_bank0_rdata_valid)) | ((builder_roundrobin1_grant == 1'd0) & main_sdram_interface_bank1_rdata_valid)) | ((builder_roundrobin2_grant == 1'd0) & main_sdram_interface_bank2_rdata_valid)) | ((builder_roundrobin3_grant == 1'd0) & main_sdram_interface_bank3_rdata_valid)) | ((builder_roundrobin4_grant == 1'd0) & main_sdram_interface_bank4_rdata_valid)) | ((builder_roundrobin5_grant == 1'd0) & main_sdram_interface_bank5_rdata_valid)) | ((builder_roundrobin6_grant == 1'd0) & main_sdram_interface_bank6_rdata_valid)) | ((builder_roundrobin7_grant == 1'd0) & main_sdram_interface_bank7_rdata_valid)); - builder_new_master_rdata_valid1 <= builder_new_master_rdata_valid0; - builder_new_master_rdata_valid2 <= builder_new_master_rdata_valid1; - builder_new_master_rdata_valid3 <= builder_new_master_rdata_valid2; - builder_new_master_rdata_valid4 <= builder_new_master_rdata_valid3; - builder_new_master_rdata_valid5 <= builder_new_master_rdata_valid4; - builder_new_master_rdata_valid6 <= builder_new_master_rdata_valid5; - builder_new_master_rdata_valid7 <= builder_new_master_rdata_valid6; - builder_new_master_rdata_valid8 <= builder_new_master_rdata_valid7; - builder_new_master_rdata_valid9 <= builder_new_master_rdata_valid8; - main_adr_offset_r <= main_interface0_wb_sdram_adr[1:0]; - builder_fullmemorywe_state <= builder_fullmemorywe_next_state; - builder_litedramwishbone2native_state <= builder_litedramwishbone2native_next_state; - if (main_count_next_value_ce) begin - main_count <= main_count_next_value; - end - case (builder_minsoc_grant) - 1'd0: begin - if ((~builder_minsoc_request[0])) begin - if (builder_minsoc_request[1]) begin - builder_minsoc_grant <= 1'd1; - end - end - end - 1'd1: begin - if ((~builder_minsoc_request[1])) begin - if (builder_minsoc_request[0]) begin - builder_minsoc_grant <= 1'd0; - end - end - end - endcase - builder_minsoc_slave_sel_r <= builder_minsoc_slave_sel; - if (builder_minsoc_wait) begin - if ((~builder_minsoc_done)) begin - builder_minsoc_count <= (builder_minsoc_count - 1'd1); - end - end else begin - builder_minsoc_count <= 20'd1000000; - end - builder_minsoc_interface0_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank0_sel) begin - case (builder_minsoc_interface0_bank_bus_adr[3:0]) - 1'd0: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_reset0_w; - end - 1'd1: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch3_w; - end - 2'd2: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch2_w; - end - 2'd3: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch1_w; - end - 3'd4: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_scratch0_w; - end - 3'd5: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors3_w; - end - 3'd6: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors2_w; - end - 3'd7: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors1_w; - end - 4'd8: begin - builder_minsoc_interface0_bank_bus_dat_r <= builder_minsoc_csrbank0_bus_errors0_w; - end - endcase - end - if (builder_minsoc_csrbank0_reset0_re) begin - main_minsoc_ctrl_reset_storage <= builder_minsoc_csrbank0_reset0_r; - end - main_minsoc_ctrl_reset_re <= builder_minsoc_csrbank0_reset0_re; - if (builder_minsoc_csrbank0_scratch3_re) begin - main_minsoc_ctrl_scratch_storage[31:24] <= builder_minsoc_csrbank0_scratch3_r; - end - if (builder_minsoc_csrbank0_scratch2_re) begin - main_minsoc_ctrl_scratch_storage[23:16] <= builder_minsoc_csrbank0_scratch2_r; - end - if (builder_minsoc_csrbank0_scratch1_re) begin - main_minsoc_ctrl_scratch_storage[15:8] <= builder_minsoc_csrbank0_scratch1_r; - end - if (builder_minsoc_csrbank0_scratch0_re) begin - main_minsoc_ctrl_scratch_storage[7:0] <= builder_minsoc_csrbank0_scratch0_r; - end - main_minsoc_ctrl_scratch_re <= builder_minsoc_csrbank0_scratch0_re; - builder_minsoc_interface1_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank1_sel) begin - case (builder_minsoc_interface1_bank_bus_adr[2:0]) - 1'd0: begin - builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_half_sys8x_taps0_w; - end - 1'd1: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_rst_w; - end - 2'd2: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_cdly_inc_w; - end - 2'd3: begin - builder_minsoc_interface1_bank_bus_dat_r <= builder_minsoc_csrbank1_dly_sel0_w; - end - 3'd4: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_rst_w; - end - 3'd5: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_inc_w; - end - 3'd6: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_rst_w; - end - 3'd7: begin - builder_minsoc_interface1_bank_bus_dat_r <= main_a7ddrphy_rdly_dq_bitslip_w; - end - endcase - end - if (builder_minsoc_csrbank1_half_sys8x_taps0_re) begin - main_a7ddrphy_half_sys8x_taps_storage[4:0] <= builder_minsoc_csrbank1_half_sys8x_taps0_r; - end - main_a7ddrphy_half_sys8x_taps_re <= builder_minsoc_csrbank1_half_sys8x_taps0_re; - if (builder_minsoc_csrbank1_dly_sel0_re) begin - main_a7ddrphy_dly_sel_storage[1:0] <= builder_minsoc_csrbank1_dly_sel0_r; - end - main_a7ddrphy_dly_sel_re <= builder_minsoc_csrbank1_dly_sel0_re; - builder_minsoc_interface2_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank2_sel) begin - case (builder_minsoc_interface2_bank_bus_adr[5:0]) - 1'd0: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_control0_w; - end - 1'd1: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_command0_w; - end - 2'd2: begin - builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector0_command_issue_w; - end - 2'd3: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address1_w; - end - 3'd4: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_address0_w; - end - 3'd5: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_baddress0_w; - end - 3'd6: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_w; - end - 3'd7: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_w; - end - 4'd8: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_w; - end - 4'd9: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_w; - end - 4'd10: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata3_w; - end - 4'd11: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata2_w; - end - 4'd12: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata1_w; - end - 4'd13: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi0_rddata0_w; - end - 4'd14: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_command0_w; - end - 4'd15: begin - builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector1_command_issue_w; - end - 5'd16: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address1_w; - end - 5'd17: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_address0_w; - end - 5'd18: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_baddress0_w; - end - 5'd19: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_w; - end - 5'd20: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_w; - end - 5'd21: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_w; - end - 5'd22: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_w; - end - 5'd23: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata3_w; - end - 5'd24: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata2_w; - end - 5'd25: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata1_w; - end - 5'd26: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi1_rddata0_w; - end - 5'd27: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_command0_w; - end - 5'd28: begin - builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector2_command_issue_w; - end - 5'd29: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address1_w; - end - 5'd30: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_address0_w; - end - 5'd31: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_baddress0_w; - end - 6'd32: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_w; - end - 6'd33: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_w; - end - 6'd34: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_w; - end - 6'd35: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_w; - end - 6'd36: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata3_w; - end - 6'd37: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata2_w; - end - 6'd38: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata1_w; - end - 6'd39: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi2_rddata0_w; - end - 6'd40: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_command0_w; - end - 6'd41: begin - builder_minsoc_interface2_bank_bus_dat_r <= main_sdram_phaseinjector3_command_issue_w; - end - 6'd42: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address1_w; - end - 6'd43: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_address0_w; - end - 6'd44: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_baddress0_w; - end - 6'd45: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_w; - end - 6'd46: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_w; - end - 6'd47: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_w; - end - 6'd48: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_w; - end - 6'd49: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata3_w; - end - 6'd50: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata2_w; - end - 6'd51: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata1_w; - end - 6'd52: begin - builder_minsoc_interface2_bank_bus_dat_r <= builder_minsoc_csrbank2_dfii_pi3_rddata0_w; - end - endcase - end - if (builder_minsoc_csrbank2_dfii_control0_re) begin - main_sdram_storage[3:0] <= builder_minsoc_csrbank2_dfii_control0_r; - end - main_sdram_re <= builder_minsoc_csrbank2_dfii_control0_re; - if (builder_minsoc_csrbank2_dfii_pi0_command0_re) begin - main_sdram_phaseinjector0_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi0_command0_r; - end - main_sdram_phaseinjector0_command_re <= builder_minsoc_csrbank2_dfii_pi0_command0_re; - if (builder_minsoc_csrbank2_dfii_pi0_address1_re) begin - main_sdram_phaseinjector0_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi0_address1_r; - end - if (builder_minsoc_csrbank2_dfii_pi0_address0_re) begin - main_sdram_phaseinjector0_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_address0_r; - end - main_sdram_phaseinjector0_address_re <= builder_minsoc_csrbank2_dfii_pi0_address0_re; - if (builder_minsoc_csrbank2_dfii_pi0_baddress0_re) begin - main_sdram_phaseinjector0_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi0_baddress0_r; - end - main_sdram_phaseinjector0_baddress_re <= builder_minsoc_csrbank2_dfii_pi0_baddress0_re; - if (builder_minsoc_csrbank2_dfii_pi0_wrdata3_re) begin - main_sdram_phaseinjector0_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi0_wrdata3_r; - end - if (builder_minsoc_csrbank2_dfii_pi0_wrdata2_re) begin - main_sdram_phaseinjector0_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi0_wrdata2_r; - end - if (builder_minsoc_csrbank2_dfii_pi0_wrdata1_re) begin - main_sdram_phaseinjector0_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi0_wrdata1_r; - end - if (builder_minsoc_csrbank2_dfii_pi0_wrdata0_re) begin - main_sdram_phaseinjector0_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_r; - end - main_sdram_phaseinjector0_wrdata_re <= builder_minsoc_csrbank2_dfii_pi0_wrdata0_re; - if (builder_minsoc_csrbank2_dfii_pi1_command0_re) begin - main_sdram_phaseinjector1_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi1_command0_r; - end - main_sdram_phaseinjector1_command_re <= builder_minsoc_csrbank2_dfii_pi1_command0_re; - if (builder_minsoc_csrbank2_dfii_pi1_address1_re) begin - main_sdram_phaseinjector1_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi1_address1_r; - end - if (builder_minsoc_csrbank2_dfii_pi1_address0_re) begin - main_sdram_phaseinjector1_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_address0_r; - end - main_sdram_phaseinjector1_address_re <= builder_minsoc_csrbank2_dfii_pi1_address0_re; - if (builder_minsoc_csrbank2_dfii_pi1_baddress0_re) begin - main_sdram_phaseinjector1_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi1_baddress0_r; - end - main_sdram_phaseinjector1_baddress_re <= builder_minsoc_csrbank2_dfii_pi1_baddress0_re; - if (builder_minsoc_csrbank2_dfii_pi1_wrdata3_re) begin - main_sdram_phaseinjector1_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi1_wrdata3_r; - end - if (builder_minsoc_csrbank2_dfii_pi1_wrdata2_re) begin - main_sdram_phaseinjector1_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi1_wrdata2_r; - end - if (builder_minsoc_csrbank2_dfii_pi1_wrdata1_re) begin - main_sdram_phaseinjector1_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi1_wrdata1_r; - end - if (builder_minsoc_csrbank2_dfii_pi1_wrdata0_re) begin - main_sdram_phaseinjector1_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_r; - end - main_sdram_phaseinjector1_wrdata_re <= builder_minsoc_csrbank2_dfii_pi1_wrdata0_re; - if (builder_minsoc_csrbank2_dfii_pi2_command0_re) begin - main_sdram_phaseinjector2_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi2_command0_r; - end - main_sdram_phaseinjector2_command_re <= builder_minsoc_csrbank2_dfii_pi2_command0_re; - if (builder_minsoc_csrbank2_dfii_pi2_address1_re) begin - main_sdram_phaseinjector2_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi2_address1_r; - end - if (builder_minsoc_csrbank2_dfii_pi2_address0_re) begin - main_sdram_phaseinjector2_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_address0_r; - end - main_sdram_phaseinjector2_address_re <= builder_minsoc_csrbank2_dfii_pi2_address0_re; - if (builder_minsoc_csrbank2_dfii_pi2_baddress0_re) begin - main_sdram_phaseinjector2_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi2_baddress0_r; - end - main_sdram_phaseinjector2_baddress_re <= builder_minsoc_csrbank2_dfii_pi2_baddress0_re; - if (builder_minsoc_csrbank2_dfii_pi2_wrdata3_re) begin - main_sdram_phaseinjector2_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi2_wrdata3_r; - end - if (builder_minsoc_csrbank2_dfii_pi2_wrdata2_re) begin - main_sdram_phaseinjector2_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi2_wrdata2_r; - end - if (builder_minsoc_csrbank2_dfii_pi2_wrdata1_re) begin - main_sdram_phaseinjector2_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi2_wrdata1_r; - end - if (builder_minsoc_csrbank2_dfii_pi2_wrdata0_re) begin - main_sdram_phaseinjector2_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_r; - end - main_sdram_phaseinjector2_wrdata_re <= builder_minsoc_csrbank2_dfii_pi2_wrdata0_re; - if (builder_minsoc_csrbank2_dfii_pi3_command0_re) begin - main_sdram_phaseinjector3_command_storage[5:0] <= builder_minsoc_csrbank2_dfii_pi3_command0_r; - end - main_sdram_phaseinjector3_command_re <= builder_minsoc_csrbank2_dfii_pi3_command0_re; - if (builder_minsoc_csrbank2_dfii_pi3_address1_re) begin - main_sdram_phaseinjector3_address_storage[13:8] <= builder_minsoc_csrbank2_dfii_pi3_address1_r; - end - if (builder_minsoc_csrbank2_dfii_pi3_address0_re) begin - main_sdram_phaseinjector3_address_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_address0_r; - end - main_sdram_phaseinjector3_address_re <= builder_minsoc_csrbank2_dfii_pi3_address0_re; - if (builder_minsoc_csrbank2_dfii_pi3_baddress0_re) begin - main_sdram_phaseinjector3_baddress_storage[2:0] <= builder_minsoc_csrbank2_dfii_pi3_baddress0_r; - end - main_sdram_phaseinjector3_baddress_re <= builder_minsoc_csrbank2_dfii_pi3_baddress0_re; - if (builder_minsoc_csrbank2_dfii_pi3_wrdata3_re) begin - main_sdram_phaseinjector3_wrdata_storage[31:24] <= builder_minsoc_csrbank2_dfii_pi3_wrdata3_r; - end - if (builder_minsoc_csrbank2_dfii_pi3_wrdata2_re) begin - main_sdram_phaseinjector3_wrdata_storage[23:16] <= builder_minsoc_csrbank2_dfii_pi3_wrdata2_r; - end - if (builder_minsoc_csrbank2_dfii_pi3_wrdata1_re) begin - main_sdram_phaseinjector3_wrdata_storage[15:8] <= builder_minsoc_csrbank2_dfii_pi3_wrdata1_r; - end - if (builder_minsoc_csrbank2_dfii_pi3_wrdata0_re) begin - main_sdram_phaseinjector3_wrdata_storage[7:0] <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_r; - end - main_sdram_phaseinjector3_wrdata_re <= builder_minsoc_csrbank2_dfii_pi3_wrdata0_re; - builder_minsoc_interface3_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank3_sel) begin - case (builder_minsoc_interface3_bank_bus_adr[4:0]) - 1'd0: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load3_w; - end - 1'd1: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load2_w; - end - 2'd2: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load1_w; - end - 2'd3: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_load0_w; - end - 3'd4: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload3_w; - end - 3'd5: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload2_w; - end - 3'd6: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload1_w; - end - 3'd7: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_reload0_w; - end - 4'd8: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_en0_w; - end - 4'd9: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_update_value0_w; - end - 4'd10: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value3_w; - end - 4'd11: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value2_w; - end - 4'd12: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value1_w; - end - 4'd13: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_value0_w; - end - 4'd14: begin - builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_status_w; - end - 4'd15: begin - builder_minsoc_interface3_bank_bus_dat_r <= main_minsoc_timer0_eventmanager_pending_w; - end - 5'd16: begin - builder_minsoc_interface3_bank_bus_dat_r <= builder_minsoc_csrbank3_ev_enable0_w; - end - endcase - end - if (builder_minsoc_csrbank3_load3_re) begin - main_minsoc_timer0_load_storage[31:24] <= builder_minsoc_csrbank3_load3_r; - end - if (builder_minsoc_csrbank3_load2_re) begin - main_minsoc_timer0_load_storage[23:16] <= builder_minsoc_csrbank3_load2_r; - end - if (builder_minsoc_csrbank3_load1_re) begin - main_minsoc_timer0_load_storage[15:8] <= builder_minsoc_csrbank3_load1_r; - end - if (builder_minsoc_csrbank3_load0_re) begin - main_minsoc_timer0_load_storage[7:0] <= builder_minsoc_csrbank3_load0_r; - end - main_minsoc_timer0_load_re <= builder_minsoc_csrbank3_load0_re; - if (builder_minsoc_csrbank3_reload3_re) begin - main_minsoc_timer0_reload_storage[31:24] <= builder_minsoc_csrbank3_reload3_r; - end - if (builder_minsoc_csrbank3_reload2_re) begin - main_minsoc_timer0_reload_storage[23:16] <= builder_minsoc_csrbank3_reload2_r; - end - if (builder_minsoc_csrbank3_reload1_re) begin - main_minsoc_timer0_reload_storage[15:8] <= builder_minsoc_csrbank3_reload1_r; - end - if (builder_minsoc_csrbank3_reload0_re) begin - main_minsoc_timer0_reload_storage[7:0] <= builder_minsoc_csrbank3_reload0_r; - end - main_minsoc_timer0_reload_re <= builder_minsoc_csrbank3_reload0_re; - if (builder_minsoc_csrbank3_en0_re) begin - main_minsoc_timer0_en_storage <= builder_minsoc_csrbank3_en0_r; - end - main_minsoc_timer0_en_re <= builder_minsoc_csrbank3_en0_re; - if (builder_minsoc_csrbank3_update_value0_re) begin - main_minsoc_timer0_update_value_storage <= builder_minsoc_csrbank3_update_value0_r; - end - main_minsoc_timer0_update_value_re <= builder_minsoc_csrbank3_update_value0_re; - if (builder_minsoc_csrbank3_ev_enable0_re) begin - main_minsoc_timer0_eventmanager_storage <= builder_minsoc_csrbank3_ev_enable0_r; - end - main_minsoc_timer0_eventmanager_re <= builder_minsoc_csrbank3_ev_enable0_re; - builder_minsoc_interface4_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank4_sel) begin - case (builder_minsoc_interface4_bank_bus_adr[2:0]) - 1'd0: begin - builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_rxtx_w; - end - 1'd1: begin - builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_txfull_w; - end - 2'd2: begin - builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_rxempty_w; - end - 2'd3: begin - builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_status_w; - end - 3'd4: begin - builder_minsoc_interface4_bank_bus_dat_r <= main_minsoc_uart_eventmanager_pending_w; - end - 3'd5: begin - builder_minsoc_interface4_bank_bus_dat_r <= builder_minsoc_csrbank4_ev_enable0_w; - end - endcase - end - if (builder_minsoc_csrbank4_ev_enable0_re) begin - main_minsoc_uart_eventmanager_storage[1:0] <= builder_minsoc_csrbank4_ev_enable0_r; - end - main_minsoc_uart_eventmanager_re <= builder_minsoc_csrbank4_ev_enable0_re; - builder_minsoc_interface5_bank_bus_dat_r <= 1'd0; - if (builder_minsoc_csrbank5_sel) begin - case (builder_minsoc_interface5_bank_bus_adr[1:0]) - 1'd0: begin - builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word3_w; - end - 1'd1: begin - builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word2_w; - end - 2'd2: begin - builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word1_w; - end - 2'd3: begin - builder_minsoc_interface5_bank_bus_dat_r <= builder_minsoc_csrbank5_tuning_word0_w; - end - endcase - end - if (builder_minsoc_csrbank5_tuning_word3_re) begin - main_minsoc_storage[31:24] <= builder_minsoc_csrbank5_tuning_word3_r; - end - if (builder_minsoc_csrbank5_tuning_word2_re) begin - main_minsoc_storage[23:16] <= builder_minsoc_csrbank5_tuning_word2_r; - end - if (builder_minsoc_csrbank5_tuning_word1_re) begin - main_minsoc_storage[15:8] <= builder_minsoc_csrbank5_tuning_word1_r; - end - if (builder_minsoc_csrbank5_tuning_word0_re) begin - main_minsoc_storage[7:0] <= builder_minsoc_csrbank5_tuning_word0_r; - end - main_minsoc_re <= builder_minsoc_csrbank5_tuning_word0_re; - if (sys_rst) begin - main_minsoc_ctrl_reset_storage <= 1'd0; - main_minsoc_ctrl_reset_re <= 1'd0; - main_minsoc_ctrl_scratch_storage <= 32'd305419896; - main_minsoc_ctrl_scratch_re <= 1'd0; - main_minsoc_ctrl_bus_errors <= 32'd0; - main_minsoc_rom_bus_ack <= 1'd0; - main_minsoc_sram_bus_ack <= 1'd0; - serial_tx <= 1'd1; - main_minsoc_storage <= 32'd8246337; - main_minsoc_re <= 1'd0; - main_minsoc_sink_ready <= 1'd0; - main_minsoc_uart_clk_txen <= 1'd0; - main_minsoc_phase_accumulator_tx <= 32'd0; - main_minsoc_tx_reg <= 8'd0; - main_minsoc_tx_bitcount <= 4'd0; - main_minsoc_tx_busy <= 1'd0; - main_minsoc_source_valid <= 1'd0; - main_minsoc_source_payload_data <= 8'd0; - main_minsoc_uart_clk_rxen <= 1'd0; - main_minsoc_phase_accumulator_rx <= 32'd0; - main_minsoc_rx_r <= 1'd0; - main_minsoc_rx_reg <= 8'd0; - main_minsoc_rx_bitcount <= 4'd0; - main_minsoc_rx_busy <= 1'd0; - main_minsoc_uart_tx_pending <= 1'd0; - main_minsoc_uart_tx_old_trigger <= 1'd0; - main_minsoc_uart_rx_pending <= 1'd0; - main_minsoc_uart_rx_old_trigger <= 1'd0; - main_minsoc_uart_eventmanager_storage <= 2'd0; - main_minsoc_uart_eventmanager_re <= 1'd0; - main_minsoc_uart_tx_fifo_readable <= 1'd0; - main_minsoc_uart_tx_fifo_level0 <= 5'd0; - main_minsoc_uart_tx_fifo_produce <= 4'd0; - main_minsoc_uart_tx_fifo_consume <= 4'd0; - main_minsoc_uart_rx_fifo_readable <= 1'd0; - main_minsoc_uart_rx_fifo_level0 <= 5'd0; - main_minsoc_uart_rx_fifo_produce <= 4'd0; - main_minsoc_uart_rx_fifo_consume <= 4'd0; - main_minsoc_timer0_load_storage <= 32'd0; - main_minsoc_timer0_load_re <= 1'd0; - main_minsoc_timer0_reload_storage <= 32'd0; - main_minsoc_timer0_reload_re <= 1'd0; - main_minsoc_timer0_en_storage <= 1'd0; - main_minsoc_timer0_en_re <= 1'd0; - main_minsoc_timer0_update_value_storage <= 1'd0; - main_minsoc_timer0_update_value_re <= 1'd0; - main_minsoc_timer0_value_status <= 32'd0; - main_minsoc_timer0_zero_pending <= 1'd0; - main_minsoc_timer0_zero_old_trigger <= 1'd0; - main_minsoc_timer0_eventmanager_storage <= 1'd0; - main_minsoc_timer0_eventmanager_re <= 1'd0; - main_minsoc_timer0_value <= 32'd0; - main_a7ddrphy_half_sys8x_taps_storage <= 5'd13; - main_a7ddrphy_half_sys8x_taps_re <= 1'd0; - main_a7ddrphy_dly_sel_storage <= 2'd0; - main_a7ddrphy_dly_sel_re <= 1'd0; - main_a7ddrphy_dfi_p0_rddata_valid <= 1'd0; - main_a7ddrphy_dfi_p1_rddata_valid <= 1'd0; - main_a7ddrphy_dfi_p2_rddata_valid <= 1'd0; - main_a7ddrphy_dfi_p3_rddata_valid <= 1'd0; - main_a7ddrphy_oe_dqs <= 1'd0; - main_a7ddrphy_oe_dq <= 1'd0; - main_a7ddrphy_bitslip0_o <= 8'd0; - main_a7ddrphy_bitslip0_value <= 3'd0; - main_a7ddrphy_bitslip0_r <= 16'd0; - main_a7ddrphy_bitslip1_o <= 8'd0; - main_a7ddrphy_bitslip1_value <= 3'd0; - main_a7ddrphy_bitslip1_r <= 16'd0; - main_a7ddrphy_bitslip2_o <= 8'd0; - main_a7ddrphy_bitslip2_value <= 3'd0; - main_a7ddrphy_bitslip2_r <= 16'd0; - main_a7ddrphy_bitslip3_o <= 8'd0; - main_a7ddrphy_bitslip3_value <= 3'd0; - main_a7ddrphy_bitslip3_r <= 16'd0; - main_a7ddrphy_bitslip4_o <= 8'd0; - main_a7ddrphy_bitslip4_value <= 3'd0; - main_a7ddrphy_bitslip4_r <= 16'd0; - main_a7ddrphy_bitslip5_o <= 8'd0; - main_a7ddrphy_bitslip5_value <= 3'd0; - main_a7ddrphy_bitslip5_r <= 16'd0; - main_a7ddrphy_bitslip6_o <= 8'd0; - main_a7ddrphy_bitslip6_value <= 3'd0; - main_a7ddrphy_bitslip6_r <= 16'd0; - main_a7ddrphy_bitslip7_o <= 8'd0; - main_a7ddrphy_bitslip7_value <= 3'd0; - main_a7ddrphy_bitslip7_r <= 16'd0; - main_a7ddrphy_bitslip8_o <= 8'd0; - main_a7ddrphy_bitslip8_value <= 3'd0; - main_a7ddrphy_bitslip8_r <= 16'd0; - main_a7ddrphy_bitslip9_o <= 8'd0; - main_a7ddrphy_bitslip9_value <= 3'd0; - main_a7ddrphy_bitslip9_r <= 16'd0; - main_a7ddrphy_bitslip10_o <= 8'd0; - main_a7ddrphy_bitslip10_value <= 3'd0; - main_a7ddrphy_bitslip10_r <= 16'd0; - main_a7ddrphy_bitslip11_o <= 8'd0; - main_a7ddrphy_bitslip11_value <= 3'd0; - main_a7ddrphy_bitslip11_r <= 16'd0; - main_a7ddrphy_bitslip12_o <= 8'd0; - main_a7ddrphy_bitslip12_value <= 3'd0; - main_a7ddrphy_bitslip12_r <= 16'd0; - main_a7ddrphy_bitslip13_o <= 8'd0; - main_a7ddrphy_bitslip13_value <= 3'd0; - main_a7ddrphy_bitslip13_r <= 16'd0; - main_a7ddrphy_bitslip14_o <= 8'd0; - main_a7ddrphy_bitslip14_value <= 3'd0; - main_a7ddrphy_bitslip14_r <= 16'd0; - main_a7ddrphy_bitslip15_o <= 8'd0; - main_a7ddrphy_bitslip15_value <= 3'd0; - main_a7ddrphy_bitslip15_r <= 16'd0; - main_a7ddrphy_n_rddata_en0 <= 1'd0; - main_a7ddrphy_n_rddata_en1 <= 1'd0; - main_a7ddrphy_n_rddata_en2 <= 1'd0; - main_a7ddrphy_n_rddata_en3 <= 1'd0; - main_a7ddrphy_n_rddata_en4 <= 1'd0; - main_a7ddrphy_n_rddata_en5 <= 1'd0; - main_a7ddrphy_n_rddata_en6 <= 1'd0; - main_a7ddrphy_n_rddata_en7 <= 1'd0; - main_a7ddrphy_last_wrdata_en <= 4'd0; - main_sdram_storage <= 4'd0; - main_sdram_re <= 1'd0; - main_sdram_phaseinjector0_command_storage <= 6'd0; - main_sdram_phaseinjector0_command_re <= 1'd0; - main_sdram_phaseinjector0_address_storage <= 14'd0; - main_sdram_phaseinjector0_address_re <= 1'd0; - main_sdram_phaseinjector0_baddress_storage <= 3'd0; - main_sdram_phaseinjector0_baddress_re <= 1'd0; - main_sdram_phaseinjector0_wrdata_storage <= 32'd0; - main_sdram_phaseinjector0_wrdata_re <= 1'd0; - main_sdram_phaseinjector0_status <= 32'd0; - main_sdram_phaseinjector1_command_storage <= 6'd0; - main_sdram_phaseinjector1_command_re <= 1'd0; - main_sdram_phaseinjector1_address_storage <= 14'd0; - main_sdram_phaseinjector1_address_re <= 1'd0; - main_sdram_phaseinjector1_baddress_storage <= 3'd0; - main_sdram_phaseinjector1_baddress_re <= 1'd0; - main_sdram_phaseinjector1_wrdata_storage <= 32'd0; - main_sdram_phaseinjector1_wrdata_re <= 1'd0; - main_sdram_phaseinjector1_status <= 32'd0; - main_sdram_phaseinjector2_command_storage <= 6'd0; - main_sdram_phaseinjector2_command_re <= 1'd0; - main_sdram_phaseinjector2_address_storage <= 14'd0; - main_sdram_phaseinjector2_address_re <= 1'd0; - main_sdram_phaseinjector2_baddress_storage <= 3'd0; - main_sdram_phaseinjector2_baddress_re <= 1'd0; - main_sdram_phaseinjector2_wrdata_storage <= 32'd0; - main_sdram_phaseinjector2_wrdata_re <= 1'd0; - main_sdram_phaseinjector2_status <= 32'd0; - main_sdram_phaseinjector3_command_storage <= 6'd0; - main_sdram_phaseinjector3_command_re <= 1'd0; - main_sdram_phaseinjector3_address_storage <= 14'd0; - main_sdram_phaseinjector3_address_re <= 1'd0; - main_sdram_phaseinjector3_baddress_storage <= 3'd0; - main_sdram_phaseinjector3_baddress_re <= 1'd0; - main_sdram_phaseinjector3_wrdata_storage <= 32'd0; - main_sdram_phaseinjector3_wrdata_re <= 1'd0; - main_sdram_phaseinjector3_status <= 32'd0; - main_sdram_dfi_p0_address <= 14'd0; - main_sdram_dfi_p0_bank <= 3'd0; - main_sdram_dfi_p0_cas_n <= 1'd1; - main_sdram_dfi_p0_cs_n <= 1'd1; - main_sdram_dfi_p0_ras_n <= 1'd1; - main_sdram_dfi_p0_we_n <= 1'd1; - main_sdram_dfi_p0_wrdata_en <= 1'd0; - main_sdram_dfi_p0_rddata_en <= 1'd0; - main_sdram_dfi_p1_address <= 14'd0; - main_sdram_dfi_p1_bank <= 3'd0; - main_sdram_dfi_p1_cas_n <= 1'd1; - main_sdram_dfi_p1_cs_n <= 1'd1; - main_sdram_dfi_p1_ras_n <= 1'd1; - main_sdram_dfi_p1_we_n <= 1'd1; - main_sdram_dfi_p1_wrdata_en <= 1'd0; - main_sdram_dfi_p1_rddata_en <= 1'd0; - main_sdram_dfi_p2_address <= 14'd0; - main_sdram_dfi_p2_bank <= 3'd0; - main_sdram_dfi_p2_cas_n <= 1'd1; - main_sdram_dfi_p2_cs_n <= 1'd1; - main_sdram_dfi_p2_ras_n <= 1'd1; - main_sdram_dfi_p2_we_n <= 1'd1; - main_sdram_dfi_p2_wrdata_en <= 1'd0; - main_sdram_dfi_p2_rddata_en <= 1'd0; - main_sdram_dfi_p3_address <= 14'd0; - main_sdram_dfi_p3_bank <= 3'd0; - main_sdram_dfi_p3_cas_n <= 1'd1; - main_sdram_dfi_p3_cs_n <= 1'd1; - main_sdram_dfi_p3_ras_n <= 1'd1; - main_sdram_dfi_p3_we_n <= 1'd1; - main_sdram_dfi_p3_wrdata_en <= 1'd0; - main_sdram_dfi_p3_rddata_en <= 1'd0; - main_sdram_cmd_payload_a <= 14'd0; - main_sdram_cmd_payload_ba <= 3'd0; - main_sdram_cmd_payload_cas <= 1'd0; - main_sdram_cmd_payload_ras <= 1'd0; - main_sdram_cmd_payload_we <= 1'd0; - main_sdram_timer_count1 <= 9'd468; - main_sdram_postponer_req_o <= 1'd0; - main_sdram_postponer_count <= 1'd0; - main_sdram_sequencer_done1 <= 1'd0; - main_sdram_sequencer_counter <= 6'd0; - main_sdram_sequencer_count <= 1'd0; - main_sdram_zqcs_timer_count1 <= 26'd59999999; - main_sdram_zqcs_executer_done <= 1'd0; - main_sdram_zqcs_executer_counter <= 5'd0; - main_sdram_bankmachine0_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine0_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine0_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine0_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine0_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine0_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine0_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine0_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine0_row <= 14'd0; - main_sdram_bankmachine0_row_opened <= 1'd0; - main_sdram_bankmachine0_twtpcon_ready <= 1'd1; - main_sdram_bankmachine0_twtpcon_count <= 3'd0; - main_sdram_bankmachine0_trccon_ready <= 1'd1; - main_sdram_bankmachine0_trccon_count <= 2'd0; - main_sdram_bankmachine0_trascon_ready <= 1'd1; - main_sdram_bankmachine0_trascon_count <= 2'd0; - main_sdram_bankmachine1_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine1_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine1_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine1_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine1_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine1_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine1_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine1_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine1_row <= 14'd0; - main_sdram_bankmachine1_row_opened <= 1'd0; - main_sdram_bankmachine1_twtpcon_ready <= 1'd1; - main_sdram_bankmachine1_twtpcon_count <= 3'd0; - main_sdram_bankmachine1_trccon_ready <= 1'd1; - main_sdram_bankmachine1_trccon_count <= 2'd0; - main_sdram_bankmachine1_trascon_ready <= 1'd1; - main_sdram_bankmachine1_trascon_count <= 2'd0; - main_sdram_bankmachine2_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine2_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine2_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine2_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine2_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine2_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine2_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine2_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine2_row <= 14'd0; - main_sdram_bankmachine2_row_opened <= 1'd0; - main_sdram_bankmachine2_twtpcon_ready <= 1'd1; - main_sdram_bankmachine2_twtpcon_count <= 3'd0; - main_sdram_bankmachine2_trccon_ready <= 1'd1; - main_sdram_bankmachine2_trccon_count <= 2'd0; - main_sdram_bankmachine2_trascon_ready <= 1'd1; - main_sdram_bankmachine2_trascon_count <= 2'd0; - main_sdram_bankmachine3_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine3_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine3_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine3_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine3_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine3_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine3_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine3_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine3_row <= 14'd0; - main_sdram_bankmachine3_row_opened <= 1'd0; - main_sdram_bankmachine3_twtpcon_ready <= 1'd1; - main_sdram_bankmachine3_twtpcon_count <= 3'd0; - main_sdram_bankmachine3_trccon_ready <= 1'd1; - main_sdram_bankmachine3_trccon_count <= 2'd0; - main_sdram_bankmachine3_trascon_ready <= 1'd1; - main_sdram_bankmachine3_trascon_count <= 2'd0; - main_sdram_bankmachine4_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine4_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine4_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine4_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine4_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine4_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine4_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine4_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine4_row <= 14'd0; - main_sdram_bankmachine4_row_opened <= 1'd0; - main_sdram_bankmachine4_twtpcon_ready <= 1'd1; - main_sdram_bankmachine4_twtpcon_count <= 3'd0; - main_sdram_bankmachine4_trccon_ready <= 1'd1; - main_sdram_bankmachine4_trccon_count <= 2'd0; - main_sdram_bankmachine4_trascon_ready <= 1'd1; - main_sdram_bankmachine4_trascon_count <= 2'd0; - main_sdram_bankmachine5_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine5_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine5_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine5_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine5_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine5_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine5_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine5_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine5_row <= 14'd0; - main_sdram_bankmachine5_row_opened <= 1'd0; - main_sdram_bankmachine5_twtpcon_ready <= 1'd1; - main_sdram_bankmachine5_twtpcon_count <= 3'd0; - main_sdram_bankmachine5_trccon_ready <= 1'd1; - main_sdram_bankmachine5_trccon_count <= 2'd0; - main_sdram_bankmachine5_trascon_ready <= 1'd1; - main_sdram_bankmachine5_trascon_count <= 2'd0; - main_sdram_bankmachine6_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine6_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine6_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine6_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine6_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine6_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine6_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine6_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine6_row <= 14'd0; - main_sdram_bankmachine6_row_opened <= 1'd0; - main_sdram_bankmachine6_twtpcon_ready <= 1'd1; - main_sdram_bankmachine6_twtpcon_count <= 3'd0; - main_sdram_bankmachine6_trccon_ready <= 1'd1; - main_sdram_bankmachine6_trccon_count <= 2'd0; - main_sdram_bankmachine6_trascon_ready <= 1'd1; - main_sdram_bankmachine6_trascon_count <= 2'd0; - main_sdram_bankmachine7_cmd_buffer_lookahead_level <= 4'd0; - main_sdram_bankmachine7_cmd_buffer_lookahead_produce <= 3'd0; - main_sdram_bankmachine7_cmd_buffer_lookahead_consume <= 3'd0; - main_sdram_bankmachine7_cmd_buffer_source_valid <= 1'd0; - main_sdram_bankmachine7_cmd_buffer_source_first <= 1'd0; - main_sdram_bankmachine7_cmd_buffer_source_last <= 1'd0; - main_sdram_bankmachine7_cmd_buffer_source_payload_we <= 1'd0; - main_sdram_bankmachine7_cmd_buffer_source_payload_addr <= 21'd0; - main_sdram_bankmachine7_row <= 14'd0; - main_sdram_bankmachine7_row_opened <= 1'd0; - main_sdram_bankmachine7_twtpcon_ready <= 1'd1; - main_sdram_bankmachine7_twtpcon_count <= 3'd0; - main_sdram_bankmachine7_trccon_ready <= 1'd1; - main_sdram_bankmachine7_trccon_count <= 2'd0; - main_sdram_bankmachine7_trascon_ready <= 1'd1; - main_sdram_bankmachine7_trascon_count <= 2'd0; - main_sdram_choose_cmd_grant <= 3'd0; - main_sdram_choose_req_grant <= 3'd0; - main_sdram_trrdcon_ready <= 1'd1; - main_sdram_trrdcon_count <= 1'd0; - main_sdram_tfawcon_ready <= 1'd1; - main_sdram_tfawcon_window <= 4'd0; - main_sdram_tccdcon_ready <= 1'd1; - main_sdram_tccdcon_count <= 1'd0; - main_sdram_twtrcon_ready <= 1'd1; - main_sdram_twtrcon_count <= 3'd0; - main_sdram_time0 <= 5'd0; - main_sdram_time1 <= 4'd0; - main_adr_offset_r <= 2'd0; - main_count <= 1'd0; - builder_wb2csr_state <= 1'd0; - builder_refresher_state <= 2'd0; - builder_bankmachine0_state <= 3'd0; - builder_bankmachine1_state <= 3'd0; - builder_bankmachine2_state <= 3'd0; - builder_bankmachine3_state <= 3'd0; - builder_bankmachine4_state <= 3'd0; - builder_bankmachine5_state <= 3'd0; - builder_bankmachine6_state <= 3'd0; - builder_bankmachine7_state <= 3'd0; - builder_multiplexer_state <= 4'd0; - builder_rbank <= 3'd0; - builder_wbank <= 3'd0; - builder_new_master_wdata_ready0 <= 1'd0; - builder_new_master_wdata_ready1 <= 1'd0; - builder_new_master_wdata_ready2 <= 1'd0; - builder_new_master_rdata_valid0 <= 1'd0; - builder_new_master_rdata_valid1 <= 1'd0; - builder_new_master_rdata_valid2 <= 1'd0; - builder_new_master_rdata_valid3 <= 1'd0; - builder_new_master_rdata_valid4 <= 1'd0; - builder_new_master_rdata_valid5 <= 1'd0; - builder_new_master_rdata_valid6 <= 1'd0; - builder_new_master_rdata_valid7 <= 1'd0; - builder_new_master_rdata_valid8 <= 1'd0; - builder_new_master_rdata_valid9 <= 1'd0; - builder_fullmemorywe_state <= 2'd0; - builder_litedramwishbone2native_state <= 2'd0; - builder_minsoc_grant <= 1'd0; - builder_minsoc_slave_sel_r <= 4'd0; - builder_minsoc_count <= 20'd1000000; - builder_minsoc_interface0_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface1_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface2_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface3_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface4_bank_bus_dat_r <= 8'd0; - builder_minsoc_interface5_bank_bus_dat_r <= 8'd0; - end - builder_regs0 <= serial_rx; - builder_regs1 <= builder_regs0; - end - - reg [31:0] mem[0:8191]; - reg [31:0] memdat; - always @(posedge sys_clk) begin - memdat <= mem[main_minsoc_rom_adr]; - end - - assign main_minsoc_rom_dat_r = memdat; - - initial begin - $readmemh("mem.init", mem); - end - - reg [31:0] mem_1 [0:1023]; - reg [ 9:0] memadr; - always @(posedge sys_clk) begin - if (main_minsoc_sram_we[0]) mem_1[main_minsoc_sram_adr][7:0] <= main_minsoc_sram_dat_w[7:0]; - if (main_minsoc_sram_we[1]) mem_1[main_minsoc_sram_adr][15:8] <= main_minsoc_sram_dat_w[15:8]; - if (main_minsoc_sram_we[2]) mem_1[main_minsoc_sram_adr][23:16] <= main_minsoc_sram_dat_w[23:16]; - if (main_minsoc_sram_we[3]) mem_1[main_minsoc_sram_adr][31:24] <= main_minsoc_sram_dat_w[31:24]; - memadr <= main_minsoc_sram_adr; - end - - assign main_minsoc_sram_dat_r = mem_1[memadr]; - - initial begin - $readmemh("mem_1.init", mem_1); - end - - reg [9:0] storage [0:15]; - reg [9:0] memdat_1; - reg [9:0] memdat_2; - always @(posedge sys_clk) begin - if (main_minsoc_uart_tx_fifo_wrport_we) - storage[main_minsoc_uart_tx_fifo_wrport_adr] <= main_minsoc_uart_tx_fifo_wrport_dat_w; - memdat_1 <= storage[main_minsoc_uart_tx_fifo_wrport_adr]; - end - - always @(posedge sys_clk) begin - if (main_minsoc_uart_tx_fifo_rdport_re) - memdat_2 <= storage[main_minsoc_uart_tx_fifo_rdport_adr]; - end - - assign main_minsoc_uart_tx_fifo_wrport_dat_r = memdat_1; - assign main_minsoc_uart_tx_fifo_rdport_dat_r = memdat_2; - - reg [9:0] storage_1[0:15]; - reg [9:0] memdat_3; - reg [9:0] memdat_4; - always @(posedge sys_clk) begin - if (main_minsoc_uart_rx_fifo_wrport_we) - storage_1[main_minsoc_uart_rx_fifo_wrport_adr] <= main_minsoc_uart_rx_fifo_wrport_dat_w; - memdat_3 <= storage_1[main_minsoc_uart_rx_fifo_wrport_adr]; - end - - always @(posedge sys_clk) begin - if (main_minsoc_uart_rx_fifo_rdport_re) - memdat_4 <= storage_1[main_minsoc_uart_rx_fifo_rdport_adr]; - end - - assign main_minsoc_uart_rx_fifo_wrport_dat_r = memdat_3; - assign main_minsoc_uart_rx_fifo_rdport_dat_r = memdat_4; - - wire clk100_ibuf; - IBUF clkbuf ( - .I(clk100), - .O(clk100_ibuf) - ); - - BUFG BUFG ( - .I(clk100_ibuf), - .O(main_pll_clkin) - ); - - BUFG BUFG_1 ( - .I(main_clkout0), - .O(sys_clk) - ); - - BUFG BUFG_2 ( - .I(main_clkout1), - .O(sys4x_clk) - ); - - BUFG BUFG_3 ( - .I(main_clkout2), - .O(sys4x_dqs_clk) - ); - - BUFG BUFG_4 ( - .I(main_clkout3), - .O(clk200_clk) - ); - - (* LOC="IDELAYCTRL_X1Y0" *) - IDELAYCTRL IDELAYCTRL ( - .REFCLK(clk200_clk), - .RST(main_ic_reset), - .RDY(idelayctl_rdy) - ); - - wire tq; - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(1'd0), - .D2(1'd1), - .D3(1'd0), - .D4(1'd1), - .D5(1'd0), - .D6(1'd1), - .D7(1'd0), - .D8(1'd1), - .OCE(1'd1), - .RST(sys_rst), - .OQ(main_a7ddrphy_sd_clk_se_nodelay), - .TQ(tq), - .TCE(1'b1), - .T1(1'b0) - ); - - OBUFTDS OBUFTDS_2 ( - .I (main_a7ddrphy_sd_clk_se_nodelay), - .O (ddram_clk_p), - .OB(ddram_clk_n), - .T (tq) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_1 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[0]), - .D2(main_a7ddrphy_dfi_p0_address[0]), - .D3(main_a7ddrphy_dfi_p1_address[0]), - .D4(main_a7ddrphy_dfi_p1_address[0]), - .D5(main_a7ddrphy_dfi_p2_address[0]), - .D6(main_a7ddrphy_dfi_p2_address[0]), - .D7(main_a7ddrphy_dfi_p3_address[0]), - .D8(main_a7ddrphy_dfi_p3_address[0]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[0]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_2 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[1]), - .D2(main_a7ddrphy_dfi_p0_address[1]), - .D3(main_a7ddrphy_dfi_p1_address[1]), - .D4(main_a7ddrphy_dfi_p1_address[1]), - .D5(main_a7ddrphy_dfi_p2_address[1]), - .D6(main_a7ddrphy_dfi_p2_address[1]), - .D7(main_a7ddrphy_dfi_p3_address[1]), - .D8(main_a7ddrphy_dfi_p3_address[1]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[1]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_3 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[2]), - .D2(main_a7ddrphy_dfi_p0_address[2]), - .D3(main_a7ddrphy_dfi_p1_address[2]), - .D4(main_a7ddrphy_dfi_p1_address[2]), - .D5(main_a7ddrphy_dfi_p2_address[2]), - .D6(main_a7ddrphy_dfi_p2_address[2]), - .D7(main_a7ddrphy_dfi_p3_address[2]), - .D8(main_a7ddrphy_dfi_p3_address[2]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[2]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_4 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[3]), - .D2(main_a7ddrphy_dfi_p0_address[3]), - .D3(main_a7ddrphy_dfi_p1_address[3]), - .D4(main_a7ddrphy_dfi_p1_address[3]), - .D5(main_a7ddrphy_dfi_p2_address[3]), - .D6(main_a7ddrphy_dfi_p2_address[3]), - .D7(main_a7ddrphy_dfi_p3_address[3]), - .D8(main_a7ddrphy_dfi_p3_address[3]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[3]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_5 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[4]), - .D2(main_a7ddrphy_dfi_p0_address[4]), - .D3(main_a7ddrphy_dfi_p1_address[4]), - .D4(main_a7ddrphy_dfi_p1_address[4]), - .D5(main_a7ddrphy_dfi_p2_address[4]), - .D6(main_a7ddrphy_dfi_p2_address[4]), - .D7(main_a7ddrphy_dfi_p3_address[4]), - .D8(main_a7ddrphy_dfi_p3_address[4]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[4]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_6 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[5]), - .D2(main_a7ddrphy_dfi_p0_address[5]), - .D3(main_a7ddrphy_dfi_p1_address[5]), - .D4(main_a7ddrphy_dfi_p1_address[5]), - .D5(main_a7ddrphy_dfi_p2_address[5]), - .D6(main_a7ddrphy_dfi_p2_address[5]), - .D7(main_a7ddrphy_dfi_p3_address[5]), - .D8(main_a7ddrphy_dfi_p3_address[5]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[5]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_7 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[6]), - .D2(main_a7ddrphy_dfi_p0_address[6]), - .D3(main_a7ddrphy_dfi_p1_address[6]), - .D4(main_a7ddrphy_dfi_p1_address[6]), - .D5(main_a7ddrphy_dfi_p2_address[6]), - .D6(main_a7ddrphy_dfi_p2_address[6]), - .D7(main_a7ddrphy_dfi_p3_address[6]), - .D8(main_a7ddrphy_dfi_p3_address[6]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[6]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_8 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[7]), - .D2(main_a7ddrphy_dfi_p0_address[7]), - .D3(main_a7ddrphy_dfi_p1_address[7]), - .D4(main_a7ddrphy_dfi_p1_address[7]), - .D5(main_a7ddrphy_dfi_p2_address[7]), - .D6(main_a7ddrphy_dfi_p2_address[7]), - .D7(main_a7ddrphy_dfi_p3_address[7]), - .D8(main_a7ddrphy_dfi_p3_address[7]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[7]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_9 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[8]), - .D2(main_a7ddrphy_dfi_p0_address[8]), - .D3(main_a7ddrphy_dfi_p1_address[8]), - .D4(main_a7ddrphy_dfi_p1_address[8]), - .D5(main_a7ddrphy_dfi_p2_address[8]), - .D6(main_a7ddrphy_dfi_p2_address[8]), - .D7(main_a7ddrphy_dfi_p3_address[8]), - .D8(main_a7ddrphy_dfi_p3_address[8]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[8]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_10 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[9]), - .D2(main_a7ddrphy_dfi_p0_address[9]), - .D3(main_a7ddrphy_dfi_p1_address[9]), - .D4(main_a7ddrphy_dfi_p1_address[9]), - .D5(main_a7ddrphy_dfi_p2_address[9]), - .D6(main_a7ddrphy_dfi_p2_address[9]), - .D7(main_a7ddrphy_dfi_p3_address[9]), - .D8(main_a7ddrphy_dfi_p3_address[9]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[9]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_11 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[10]), - .D2(main_a7ddrphy_dfi_p0_address[10]), - .D3(main_a7ddrphy_dfi_p1_address[10]), - .D4(main_a7ddrphy_dfi_p1_address[10]), - .D5(main_a7ddrphy_dfi_p2_address[10]), - .D6(main_a7ddrphy_dfi_p2_address[10]), - .D7(main_a7ddrphy_dfi_p3_address[10]), - .D8(main_a7ddrphy_dfi_p3_address[10]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[10]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_12 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[11]), - .D2(main_a7ddrphy_dfi_p0_address[11]), - .D3(main_a7ddrphy_dfi_p1_address[11]), - .D4(main_a7ddrphy_dfi_p1_address[11]), - .D5(main_a7ddrphy_dfi_p2_address[11]), - .D6(main_a7ddrphy_dfi_p2_address[11]), - .D7(main_a7ddrphy_dfi_p3_address[11]), - .D8(main_a7ddrphy_dfi_p3_address[11]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[11]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_13 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[12]), - .D2(main_a7ddrphy_dfi_p0_address[12]), - .D3(main_a7ddrphy_dfi_p1_address[12]), - .D4(main_a7ddrphy_dfi_p1_address[12]), - .D5(main_a7ddrphy_dfi_p2_address[12]), - .D6(main_a7ddrphy_dfi_p2_address[12]), - .D7(main_a7ddrphy_dfi_p3_address[12]), - .D8(main_a7ddrphy_dfi_p3_address[12]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[12]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_14 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_address[13]), - .D2(main_a7ddrphy_dfi_p0_address[13]), - .D3(main_a7ddrphy_dfi_p1_address[13]), - .D4(main_a7ddrphy_dfi_p1_address[13]), - .D5(main_a7ddrphy_dfi_p2_address[13]), - .D6(main_a7ddrphy_dfi_p2_address[13]), - .D7(main_a7ddrphy_dfi_p3_address[13]), - .D8(main_a7ddrphy_dfi_p3_address[13]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_a_iob[13]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_15 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_bank[0]), - .D2(main_a7ddrphy_dfi_p0_bank[0]), - .D3(main_a7ddrphy_dfi_p1_bank[0]), - .D4(main_a7ddrphy_dfi_p1_bank[0]), - .D5(main_a7ddrphy_dfi_p2_bank[0]), - .D6(main_a7ddrphy_dfi_p2_bank[0]), - .D7(main_a7ddrphy_dfi_p3_bank[0]), - .D8(main_a7ddrphy_dfi_p3_bank[0]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ba_iob[0]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_16 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_bank[1]), - .D2(main_a7ddrphy_dfi_p0_bank[1]), - .D3(main_a7ddrphy_dfi_p1_bank[1]), - .D4(main_a7ddrphy_dfi_p1_bank[1]), - .D5(main_a7ddrphy_dfi_p2_bank[1]), - .D6(main_a7ddrphy_dfi_p2_bank[1]), - .D7(main_a7ddrphy_dfi_p3_bank[1]), - .D8(main_a7ddrphy_dfi_p3_bank[1]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ba_iob[1]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_17 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_bank[2]), - .D2(main_a7ddrphy_dfi_p0_bank[2]), - .D3(main_a7ddrphy_dfi_p1_bank[2]), - .D4(main_a7ddrphy_dfi_p1_bank[2]), - .D5(main_a7ddrphy_dfi_p2_bank[2]), - .D6(main_a7ddrphy_dfi_p2_bank[2]), - .D7(main_a7ddrphy_dfi_p3_bank[2]), - .D8(main_a7ddrphy_dfi_p3_bank[2]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ba_iob[2]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_18 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_ras_n), - .D2(main_a7ddrphy_dfi_p0_ras_n), - .D3(main_a7ddrphy_dfi_p1_ras_n), - .D4(main_a7ddrphy_dfi_p1_ras_n), - .D5(main_a7ddrphy_dfi_p2_ras_n), - .D6(main_a7ddrphy_dfi_p2_ras_n), - .D7(main_a7ddrphy_dfi_p3_ras_n), - .D8(main_a7ddrphy_dfi_p3_ras_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_ras_n_iob) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_19 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_cas_n), - .D2(main_a7ddrphy_dfi_p0_cas_n), - .D3(main_a7ddrphy_dfi_p1_cas_n), - .D4(main_a7ddrphy_dfi_p1_cas_n), - .D5(main_a7ddrphy_dfi_p2_cas_n), - .D6(main_a7ddrphy_dfi_p2_cas_n), - .D7(main_a7ddrphy_dfi_p3_cas_n), - .D8(main_a7ddrphy_dfi_p3_cas_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_cas_n_iob) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_20 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_we_n), - .D2(main_a7ddrphy_dfi_p0_we_n), - .D3(main_a7ddrphy_dfi_p1_we_n), - .D4(main_a7ddrphy_dfi_p1_we_n), - .D5(main_a7ddrphy_dfi_p2_we_n), - .D6(main_a7ddrphy_dfi_p2_we_n), - .D7(main_a7ddrphy_dfi_p3_we_n), - .D8(main_a7ddrphy_dfi_p3_we_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_we_n_iob) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_21 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_cke), - .D2(main_a7ddrphy_dfi_p0_cke), - .D3(main_a7ddrphy_dfi_p1_cke), - .D4(main_a7ddrphy_dfi_p1_cke), - .D5(main_a7ddrphy_dfi_p2_cke), - .D6(main_a7ddrphy_dfi_p2_cke), - .D7(main_a7ddrphy_dfi_p3_cke), - .D8(main_a7ddrphy_dfi_p3_cke), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_cke_iob) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_22 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_odt), - .D2(main_a7ddrphy_dfi_p0_odt), - .D3(main_a7ddrphy_dfi_p1_odt), - .D4(main_a7ddrphy_dfi_p1_odt), - .D5(main_a7ddrphy_dfi_p2_odt), - .D6(main_a7ddrphy_dfi_p2_odt), - .D7(main_a7ddrphy_dfi_p3_odt), - .D8(main_a7ddrphy_dfi_p3_odt), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_odt_iob) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_23 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_reset_n), - .D2(main_a7ddrphy_dfi_p0_reset_n), - .D3(main_a7ddrphy_dfi_p1_reset_n), - .D4(main_a7ddrphy_dfi_p1_reset_n), - .D5(main_a7ddrphy_dfi_p2_reset_n), - .D6(main_a7ddrphy_dfi_p2_reset_n), - .D7(main_a7ddrphy_dfi_p3_reset_n), - .D8(main_a7ddrphy_dfi_p3_reset_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_reset_n_iob) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_24 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_cs_n), - .D2(main_a7ddrphy_dfi_p0_cs_n), - .D3(main_a7ddrphy_dfi_p1_cs_n), - .D4(main_a7ddrphy_dfi_p1_cs_n), - .D5(main_a7ddrphy_dfi_p2_cs_n), - .D6(main_a7ddrphy_dfi_p2_cs_n), - .D7(main_a7ddrphy_dfi_p3_cs_n), - .D8(main_a7ddrphy_dfi_p3_cs_n), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_cs_n_iob) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_25 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata_mask[0]), - .D2(main_a7ddrphy_dfi_p0_wrdata_mask[2]), - .D3(main_a7ddrphy_dfi_p1_wrdata_mask[0]), - .D4(main_a7ddrphy_dfi_p1_wrdata_mask[2]), - .D5(main_a7ddrphy_dfi_p2_wrdata_mask[0]), - .D6(main_a7ddrphy_dfi_p2_wrdata_mask[2]), - .D7(main_a7ddrphy_dfi_p3_wrdata_mask[0]), - .D8(main_a7ddrphy_dfi_p3_wrdata_mask[2]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_dm_iob[0]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_26 ( - .CLK(sys4x_dqs_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dqs_serdes_pattern[0]), - .D2(main_a7ddrphy_dqs_serdes_pattern[1]), - .D3(main_a7ddrphy_dqs_serdes_pattern[2]), - .D4(main_a7ddrphy_dqs_serdes_pattern[3]), - .D5(main_a7ddrphy_dqs_serdes_pattern[4]), - .D6(main_a7ddrphy_dqs_serdes_pattern[5]), - .D7(main_a7ddrphy_dqs_serdes_pattern[6]), - .D8(main_a7ddrphy_dqs_serdes_pattern[7]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dqs)), - .TCE(1'd1), - .OFB(main_a7ddrphy0), - .OQ(main_a7ddrphy_dqs_nodelay0), - .TQ(main_a7ddrphy_dqs_t0) - ); - - OBUFTDS OBUFTDS ( - .I (main_a7ddrphy_dqs_nodelay0), - .T (main_a7ddrphy_dqs_t0), - .O (ddram_dqs_p[0]), - .OB(ddram_dqs_n[0]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_27 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata_mask[1]), - .D2(main_a7ddrphy_dfi_p0_wrdata_mask[3]), - .D3(main_a7ddrphy_dfi_p1_wrdata_mask[1]), - .D4(main_a7ddrphy_dfi_p1_wrdata_mask[3]), - .D5(main_a7ddrphy_dfi_p2_wrdata_mask[1]), - .D6(main_a7ddrphy_dfi_p2_wrdata_mask[3]), - .D7(main_a7ddrphy_dfi_p3_wrdata_mask[1]), - .D8(main_a7ddrphy_dfi_p3_wrdata_mask[3]), - .OCE(1'd1), - .RST(sys_rst), - .OQ(ddram_dm_iob[1]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_28 ( - .CLK(sys4x_dqs_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dqs_serdes_pattern[0]), - .D2(main_a7ddrphy_dqs_serdes_pattern[1]), - .D3(main_a7ddrphy_dqs_serdes_pattern[2]), - .D4(main_a7ddrphy_dqs_serdes_pattern[3]), - .D5(main_a7ddrphy_dqs_serdes_pattern[4]), - .D6(main_a7ddrphy_dqs_serdes_pattern[5]), - .D7(main_a7ddrphy_dqs_serdes_pattern[6]), - .D8(main_a7ddrphy_dqs_serdes_pattern[7]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dqs)), - .TCE(1'd1), - .OFB(main_a7ddrphy1), - .OQ(main_a7ddrphy_dqs_nodelay1), - .TQ(main_a7ddrphy_dqs_t1) - ); - - OBUFTDS OBUFTDS_1 ( - .I (main_a7ddrphy_dqs_nodelay1), - .T (main_a7ddrphy_dqs_t1), - .O (ddram_dqs_p[1]), - .OB(ddram_dqs_n[1]) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_29 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[0]), - .D2(main_a7ddrphy_dfi_p0_wrdata[16]), - .D3(main_a7ddrphy_dfi_p1_wrdata[0]), - .D4(main_a7ddrphy_dfi_p1_wrdata[16]), - .D5(main_a7ddrphy_dfi_p2_wrdata[0]), - .D6(main_a7ddrphy_dfi_p2_wrdata[16]), - .D7(main_a7ddrphy_dfi_p3_wrdata[0]), - .D8(main_a7ddrphy_dfi_p3_wrdata[16]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay0), - .TQ(main_a7ddrphy_dq_t0) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed0), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data0[7]), - .Q2(main_a7ddrphy_dq_i_data0[6]), - .Q3(main_a7ddrphy_dq_i_data0[5]), - .Q4(main_a7ddrphy_dq_i_data0[4]), - .Q5(main_a7ddrphy_dq_i_data0[3]), - .Q6(main_a7ddrphy_dq_i_data0[2]), - .Q7(main_a7ddrphy_dq_i_data0[1]), - .Q8(main_a7ddrphy_dq_i_data0[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay0), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed0) - ); - - IOBUF IOBUF ( - .I (main_a7ddrphy_dq_o_nodelay0), - .T (main_a7ddrphy_dq_t0), - .IO(ddram_dq[0]), - .O (main_a7ddrphy_dq_i_nodelay0) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_30 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[1]), - .D2(main_a7ddrphy_dfi_p0_wrdata[17]), - .D3(main_a7ddrphy_dfi_p1_wrdata[1]), - .D4(main_a7ddrphy_dfi_p1_wrdata[17]), - .D5(main_a7ddrphy_dfi_p2_wrdata[1]), - .D6(main_a7ddrphy_dfi_p2_wrdata[17]), - .D7(main_a7ddrphy_dfi_p3_wrdata[1]), - .D8(main_a7ddrphy_dfi_p3_wrdata[17]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay1), - .TQ(main_a7ddrphy_dq_t1) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_1 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed1), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data1[7]), - .Q2(main_a7ddrphy_dq_i_data1[6]), - .Q3(main_a7ddrphy_dq_i_data1[5]), - .Q4(main_a7ddrphy_dq_i_data1[4]), - .Q5(main_a7ddrphy_dq_i_data1[3]), - .Q6(main_a7ddrphy_dq_i_data1[2]), - .Q7(main_a7ddrphy_dq_i_data1[1]), - .Q8(main_a7ddrphy_dq_i_data1[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_1 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay1), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed1) - ); - - IOBUF IOBUF_1 ( - .I (main_a7ddrphy_dq_o_nodelay1), - .T (main_a7ddrphy_dq_t1), - .IO(ddram_dq[1]), - .O (main_a7ddrphy_dq_i_nodelay1) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_31 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[2]), - .D2(main_a7ddrphy_dfi_p0_wrdata[18]), - .D3(main_a7ddrphy_dfi_p1_wrdata[2]), - .D4(main_a7ddrphy_dfi_p1_wrdata[18]), - .D5(main_a7ddrphy_dfi_p2_wrdata[2]), - .D6(main_a7ddrphy_dfi_p2_wrdata[18]), - .D7(main_a7ddrphy_dfi_p3_wrdata[2]), - .D8(main_a7ddrphy_dfi_p3_wrdata[18]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay2), - .TQ(main_a7ddrphy_dq_t2) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_2 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed2), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data2[7]), - .Q2(main_a7ddrphy_dq_i_data2[6]), - .Q3(main_a7ddrphy_dq_i_data2[5]), - .Q4(main_a7ddrphy_dq_i_data2[4]), - .Q5(main_a7ddrphy_dq_i_data2[3]), - .Q6(main_a7ddrphy_dq_i_data2[2]), - .Q7(main_a7ddrphy_dq_i_data2[1]), - .Q8(main_a7ddrphy_dq_i_data2[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_2 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay2), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed2) - ); - - IOBUF IOBUF_2 ( - .I (main_a7ddrphy_dq_o_nodelay2), - .T (main_a7ddrphy_dq_t2), - .IO(ddram_dq[2]), - .O (main_a7ddrphy_dq_i_nodelay2) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_32 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[3]), - .D2(main_a7ddrphy_dfi_p0_wrdata[19]), - .D3(main_a7ddrphy_dfi_p1_wrdata[3]), - .D4(main_a7ddrphy_dfi_p1_wrdata[19]), - .D5(main_a7ddrphy_dfi_p2_wrdata[3]), - .D6(main_a7ddrphy_dfi_p2_wrdata[19]), - .D7(main_a7ddrphy_dfi_p3_wrdata[3]), - .D8(main_a7ddrphy_dfi_p3_wrdata[19]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay3), - .TQ(main_a7ddrphy_dq_t3) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_3 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed3), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data3[7]), - .Q2(main_a7ddrphy_dq_i_data3[6]), - .Q3(main_a7ddrphy_dq_i_data3[5]), - .Q4(main_a7ddrphy_dq_i_data3[4]), - .Q5(main_a7ddrphy_dq_i_data3[3]), - .Q6(main_a7ddrphy_dq_i_data3[2]), - .Q7(main_a7ddrphy_dq_i_data3[1]), - .Q8(main_a7ddrphy_dq_i_data3[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_3 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay3), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed3) - ); - - IOBUF IOBUF_3 ( - .I (main_a7ddrphy_dq_o_nodelay3), - .T (main_a7ddrphy_dq_t3), - .IO(ddram_dq[3]), - .O (main_a7ddrphy_dq_i_nodelay3) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_33 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[4]), - .D2(main_a7ddrphy_dfi_p0_wrdata[20]), - .D3(main_a7ddrphy_dfi_p1_wrdata[4]), - .D4(main_a7ddrphy_dfi_p1_wrdata[20]), - .D5(main_a7ddrphy_dfi_p2_wrdata[4]), - .D6(main_a7ddrphy_dfi_p2_wrdata[20]), - .D7(main_a7ddrphy_dfi_p3_wrdata[4]), - .D8(main_a7ddrphy_dfi_p3_wrdata[20]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay4), - .TQ(main_a7ddrphy_dq_t4) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_4 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed4), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data4[7]), - .Q2(main_a7ddrphy_dq_i_data4[6]), - .Q3(main_a7ddrphy_dq_i_data4[5]), - .Q4(main_a7ddrphy_dq_i_data4[4]), - .Q5(main_a7ddrphy_dq_i_data4[3]), - .Q6(main_a7ddrphy_dq_i_data4[2]), - .Q7(main_a7ddrphy_dq_i_data4[1]), - .Q8(main_a7ddrphy_dq_i_data4[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_4 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay4), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed4) - ); - - IOBUF IOBUF_4 ( - .I (main_a7ddrphy_dq_o_nodelay4), - .T (main_a7ddrphy_dq_t4), - .IO(ddram_dq[4]), - .O (main_a7ddrphy_dq_i_nodelay4) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_34 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[5]), - .D2(main_a7ddrphy_dfi_p0_wrdata[21]), - .D3(main_a7ddrphy_dfi_p1_wrdata[5]), - .D4(main_a7ddrphy_dfi_p1_wrdata[21]), - .D5(main_a7ddrphy_dfi_p2_wrdata[5]), - .D6(main_a7ddrphy_dfi_p2_wrdata[21]), - .D7(main_a7ddrphy_dfi_p3_wrdata[5]), - .D8(main_a7ddrphy_dfi_p3_wrdata[21]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay5), - .TQ(main_a7ddrphy_dq_t5) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_5 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed5), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data5[7]), - .Q2(main_a7ddrphy_dq_i_data5[6]), - .Q3(main_a7ddrphy_dq_i_data5[5]), - .Q4(main_a7ddrphy_dq_i_data5[4]), - .Q5(main_a7ddrphy_dq_i_data5[3]), - .Q6(main_a7ddrphy_dq_i_data5[2]), - .Q7(main_a7ddrphy_dq_i_data5[1]), - .Q8(main_a7ddrphy_dq_i_data5[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_5 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay5), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed5) - ); - - IOBUF IOBUF_5 ( - .I (main_a7ddrphy_dq_o_nodelay5), - .T (main_a7ddrphy_dq_t5), - .IO(ddram_dq[5]), - .O (main_a7ddrphy_dq_i_nodelay5) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_35 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[6]), - .D2(main_a7ddrphy_dfi_p0_wrdata[22]), - .D3(main_a7ddrphy_dfi_p1_wrdata[6]), - .D4(main_a7ddrphy_dfi_p1_wrdata[22]), - .D5(main_a7ddrphy_dfi_p2_wrdata[6]), - .D6(main_a7ddrphy_dfi_p2_wrdata[22]), - .D7(main_a7ddrphy_dfi_p3_wrdata[6]), - .D8(main_a7ddrphy_dfi_p3_wrdata[22]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay6), - .TQ(main_a7ddrphy_dq_t6) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_6 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed6), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data6[7]), - .Q2(main_a7ddrphy_dq_i_data6[6]), - .Q3(main_a7ddrphy_dq_i_data6[5]), - .Q4(main_a7ddrphy_dq_i_data6[4]), - .Q5(main_a7ddrphy_dq_i_data6[3]), - .Q6(main_a7ddrphy_dq_i_data6[2]), - .Q7(main_a7ddrphy_dq_i_data6[1]), - .Q8(main_a7ddrphy_dq_i_data6[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_6 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay6), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed6) - ); - - IOBUF IOBUF_6 ( - .I (main_a7ddrphy_dq_o_nodelay6), - .T (main_a7ddrphy_dq_t6), - .IO(ddram_dq[6]), - .O (main_a7ddrphy_dq_i_nodelay6) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_36 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[7]), - .D2(main_a7ddrphy_dfi_p0_wrdata[23]), - .D3(main_a7ddrphy_dfi_p1_wrdata[7]), - .D4(main_a7ddrphy_dfi_p1_wrdata[23]), - .D5(main_a7ddrphy_dfi_p2_wrdata[7]), - .D6(main_a7ddrphy_dfi_p2_wrdata[23]), - .D7(main_a7ddrphy_dfi_p3_wrdata[7]), - .D8(main_a7ddrphy_dfi_p3_wrdata[23]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay7), - .TQ(main_a7ddrphy_dq_t7) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_7 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed7), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data7[7]), - .Q2(main_a7ddrphy_dq_i_data7[6]), - .Q3(main_a7ddrphy_dq_i_data7[5]), - .Q4(main_a7ddrphy_dq_i_data7[4]), - .Q5(main_a7ddrphy_dq_i_data7[3]), - .Q6(main_a7ddrphy_dq_i_data7[2]), - .Q7(main_a7ddrphy_dq_i_data7[1]), - .Q8(main_a7ddrphy_dq_i_data7[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_7 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay7), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[0] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed7) - ); - - IOBUF IOBUF_7 ( - .I (main_a7ddrphy_dq_o_nodelay7), - .T (main_a7ddrphy_dq_t7), - .IO(ddram_dq[7]), - .O (main_a7ddrphy_dq_i_nodelay7) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_37 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[8]), - .D2(main_a7ddrphy_dfi_p0_wrdata[24]), - .D3(main_a7ddrphy_dfi_p1_wrdata[8]), - .D4(main_a7ddrphy_dfi_p1_wrdata[24]), - .D5(main_a7ddrphy_dfi_p2_wrdata[8]), - .D6(main_a7ddrphy_dfi_p2_wrdata[24]), - .D7(main_a7ddrphy_dfi_p3_wrdata[8]), - .D8(main_a7ddrphy_dfi_p3_wrdata[24]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay8), - .TQ(main_a7ddrphy_dq_t8) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_8 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed8), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data8[7]), - .Q2(main_a7ddrphy_dq_i_data8[6]), - .Q3(main_a7ddrphy_dq_i_data8[5]), - .Q4(main_a7ddrphy_dq_i_data8[4]), - .Q5(main_a7ddrphy_dq_i_data8[3]), - .Q6(main_a7ddrphy_dq_i_data8[2]), - .Q7(main_a7ddrphy_dq_i_data8[1]), - .Q8(main_a7ddrphy_dq_i_data8[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_8 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay8), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed8) - ); - - IOBUF IOBUF_8 ( - .I (main_a7ddrphy_dq_o_nodelay8), - .T (main_a7ddrphy_dq_t8), - .IO(ddram_dq[8]), - .O (main_a7ddrphy_dq_i_nodelay8) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_38 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[9]), - .D2(main_a7ddrphy_dfi_p0_wrdata[25]), - .D3(main_a7ddrphy_dfi_p1_wrdata[9]), - .D4(main_a7ddrphy_dfi_p1_wrdata[25]), - .D5(main_a7ddrphy_dfi_p2_wrdata[9]), - .D6(main_a7ddrphy_dfi_p2_wrdata[25]), - .D7(main_a7ddrphy_dfi_p3_wrdata[9]), - .D8(main_a7ddrphy_dfi_p3_wrdata[25]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay9), - .TQ(main_a7ddrphy_dq_t9) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_9 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed9), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data9[7]), - .Q2(main_a7ddrphy_dq_i_data9[6]), - .Q3(main_a7ddrphy_dq_i_data9[5]), - .Q4(main_a7ddrphy_dq_i_data9[4]), - .Q5(main_a7ddrphy_dq_i_data9[3]), - .Q6(main_a7ddrphy_dq_i_data9[2]), - .Q7(main_a7ddrphy_dq_i_data9[1]), - .Q8(main_a7ddrphy_dq_i_data9[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_9 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay9), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed9) - ); - - IOBUF IOBUF_9 ( - .I (main_a7ddrphy_dq_o_nodelay9), - .T (main_a7ddrphy_dq_t9), - .IO(ddram_dq[9]), - .O (main_a7ddrphy_dq_i_nodelay9) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_39 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[10]), - .D2(main_a7ddrphy_dfi_p0_wrdata[26]), - .D3(main_a7ddrphy_dfi_p1_wrdata[10]), - .D4(main_a7ddrphy_dfi_p1_wrdata[26]), - .D5(main_a7ddrphy_dfi_p2_wrdata[10]), - .D6(main_a7ddrphy_dfi_p2_wrdata[26]), - .D7(main_a7ddrphy_dfi_p3_wrdata[10]), - .D8(main_a7ddrphy_dfi_p3_wrdata[26]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay10), - .TQ(main_a7ddrphy_dq_t10) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_10 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed10), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data10[7]), - .Q2(main_a7ddrphy_dq_i_data10[6]), - .Q3(main_a7ddrphy_dq_i_data10[5]), - .Q4(main_a7ddrphy_dq_i_data10[4]), - .Q5(main_a7ddrphy_dq_i_data10[3]), - .Q6(main_a7ddrphy_dq_i_data10[2]), - .Q7(main_a7ddrphy_dq_i_data10[1]), - .Q8(main_a7ddrphy_dq_i_data10[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_10 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay10), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed10) - ); - - IOBUF IOBUF_10 ( - .I (main_a7ddrphy_dq_o_nodelay10), - .T (main_a7ddrphy_dq_t10), - .IO(ddram_dq[10]), - .O (main_a7ddrphy_dq_i_nodelay10) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_40 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[11]), - .D2(main_a7ddrphy_dfi_p0_wrdata[27]), - .D3(main_a7ddrphy_dfi_p1_wrdata[11]), - .D4(main_a7ddrphy_dfi_p1_wrdata[27]), - .D5(main_a7ddrphy_dfi_p2_wrdata[11]), - .D6(main_a7ddrphy_dfi_p2_wrdata[27]), - .D7(main_a7ddrphy_dfi_p3_wrdata[11]), - .D8(main_a7ddrphy_dfi_p3_wrdata[27]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay11), - .TQ(main_a7ddrphy_dq_t11) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_11 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed11), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data11[7]), - .Q2(main_a7ddrphy_dq_i_data11[6]), - .Q3(main_a7ddrphy_dq_i_data11[5]), - .Q4(main_a7ddrphy_dq_i_data11[4]), - .Q5(main_a7ddrphy_dq_i_data11[3]), - .Q6(main_a7ddrphy_dq_i_data11[2]), - .Q7(main_a7ddrphy_dq_i_data11[1]), - .Q8(main_a7ddrphy_dq_i_data11[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_11 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay11), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed11) - ); - - IOBUF IOBUF_11 ( - .I (main_a7ddrphy_dq_o_nodelay11), - .T (main_a7ddrphy_dq_t11), - .IO(ddram_dq[11]), - .O (main_a7ddrphy_dq_i_nodelay11) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_41 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[12]), - .D2(main_a7ddrphy_dfi_p0_wrdata[28]), - .D3(main_a7ddrphy_dfi_p1_wrdata[12]), - .D4(main_a7ddrphy_dfi_p1_wrdata[28]), - .D5(main_a7ddrphy_dfi_p2_wrdata[12]), - .D6(main_a7ddrphy_dfi_p2_wrdata[28]), - .D7(main_a7ddrphy_dfi_p3_wrdata[12]), - .D8(main_a7ddrphy_dfi_p3_wrdata[28]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay12), - .TQ(main_a7ddrphy_dq_t12) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_12 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed12), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data12[7]), - .Q2(main_a7ddrphy_dq_i_data12[6]), - .Q3(main_a7ddrphy_dq_i_data12[5]), - .Q4(main_a7ddrphy_dq_i_data12[4]), - .Q5(main_a7ddrphy_dq_i_data12[3]), - .Q6(main_a7ddrphy_dq_i_data12[2]), - .Q7(main_a7ddrphy_dq_i_data12[1]), - .Q8(main_a7ddrphy_dq_i_data12[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_12 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay12), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed12) - ); - - IOBUF IOBUF_12 ( - .I (main_a7ddrphy_dq_o_nodelay12), - .T (main_a7ddrphy_dq_t12), - .IO(ddram_dq[12]), - .O (main_a7ddrphy_dq_i_nodelay12) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_42 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[13]), - .D2(main_a7ddrphy_dfi_p0_wrdata[29]), - .D3(main_a7ddrphy_dfi_p1_wrdata[13]), - .D4(main_a7ddrphy_dfi_p1_wrdata[29]), - .D5(main_a7ddrphy_dfi_p2_wrdata[13]), - .D6(main_a7ddrphy_dfi_p2_wrdata[29]), - .D7(main_a7ddrphy_dfi_p3_wrdata[13]), - .D8(main_a7ddrphy_dfi_p3_wrdata[29]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay13), - .TQ(main_a7ddrphy_dq_t13) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_13 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed13), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data13[7]), - .Q2(main_a7ddrphy_dq_i_data13[6]), - .Q3(main_a7ddrphy_dq_i_data13[5]), - .Q4(main_a7ddrphy_dq_i_data13[4]), - .Q5(main_a7ddrphy_dq_i_data13[3]), - .Q6(main_a7ddrphy_dq_i_data13[2]), - .Q7(main_a7ddrphy_dq_i_data13[1]), - .Q8(main_a7ddrphy_dq_i_data13[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_13 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay13), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed13) - ); - - IOBUF IOBUF_13 ( - .I (main_a7ddrphy_dq_o_nodelay13), - .T (main_a7ddrphy_dq_t13), - .IO(ddram_dq[13]), - .O (main_a7ddrphy_dq_i_nodelay13) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_43 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[14]), - .D2(main_a7ddrphy_dfi_p0_wrdata[30]), - .D3(main_a7ddrphy_dfi_p1_wrdata[14]), - .D4(main_a7ddrphy_dfi_p1_wrdata[30]), - .D5(main_a7ddrphy_dfi_p2_wrdata[14]), - .D6(main_a7ddrphy_dfi_p2_wrdata[30]), - .D7(main_a7ddrphy_dfi_p3_wrdata[14]), - .D8(main_a7ddrphy_dfi_p3_wrdata[30]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay14), - .TQ(main_a7ddrphy_dq_t14) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_14 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed14), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data14[7]), - .Q2(main_a7ddrphy_dq_i_data14[6]), - .Q3(main_a7ddrphy_dq_i_data14[5]), - .Q4(main_a7ddrphy_dq_i_data14[4]), - .Q5(main_a7ddrphy_dq_i_data14[3]), - .Q6(main_a7ddrphy_dq_i_data14[2]), - .Q7(main_a7ddrphy_dq_i_data14[1]), - .Q8(main_a7ddrphy_dq_i_data14[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_14 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay14), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed14) - ); - - IOBUF IOBUF_14 ( - .I (main_a7ddrphy_dq_o_nodelay14), - .T (main_a7ddrphy_dq_t14), - .IO(ddram_dq[14]), - .O (main_a7ddrphy_dq_i_nodelay14) - ); - - OSERDESE2 #( - .DATA_RATE_OQ("DDR"), - .DATA_RATE_TQ("BUF"), - .DATA_WIDTH(4'd8), - .SERDES_MODE("MASTER"), - .TRISTATE_WIDTH(1'd1) - ) OSERDESE2_44 ( - .CLK(sys4x_clk), - .CLKDIV(sys_clk), - .D1(main_a7ddrphy_dfi_p0_wrdata[15]), - .D2(main_a7ddrphy_dfi_p0_wrdata[31]), - .D3(main_a7ddrphy_dfi_p1_wrdata[15]), - .D4(main_a7ddrphy_dfi_p1_wrdata[31]), - .D5(main_a7ddrphy_dfi_p2_wrdata[15]), - .D6(main_a7ddrphy_dfi_p2_wrdata[31]), - .D7(main_a7ddrphy_dfi_p3_wrdata[15]), - .D8(main_a7ddrphy_dfi_p3_wrdata[31]), - .OCE(1'd1), - .RST(sys_rst), - .T1((~main_a7ddrphy_oe_dq)), - .TCE(1'd1), - .OQ(main_a7ddrphy_dq_o_nodelay15), - .TQ(main_a7ddrphy_dq_t15) - ); - - ISERDESE2 #( - .DATA_RATE("DDR"), - .DATA_WIDTH(4'd8), - .INTERFACE_TYPE("NETWORKING"), - .IOBDELAY("IFD"), - .NUM_CE(1'd1), - .SERDES_MODE("MASTER") - ) ISERDESE2_15 ( - .BITSLIP(1'd0), - .CE1(1'd1), - .CLK(sys4x_clk), - .CLKB(sys4x_clk), - .CLKDIV(sys_clk), - .DDLY(main_a7ddrphy_dq_i_delayed15), - .RST(sys_rst), - .Q1(main_a7ddrphy_dq_i_data15[7]), - .Q2(main_a7ddrphy_dq_i_data15[6]), - .Q3(main_a7ddrphy_dq_i_data15[5]), - .Q4(main_a7ddrphy_dq_i_data15[4]), - .Q5(main_a7ddrphy_dq_i_data15[3]), - .Q6(main_a7ddrphy_dq_i_data15[2]), - .Q7(main_a7ddrphy_dq_i_data15[1]), - .Q8(main_a7ddrphy_dq_i_data15[0]) - ); - - IDELAYE2 #( - .CINVCTRL_SEL("FALSE"), - .DELAY_SRC("IDATAIN"), - .HIGH_PERFORMANCE_MODE("TRUE"), - .IDELAY_TYPE("VARIABLE"), - .IDELAY_VALUE(1'd0), - .PIPE_SEL("FALSE"), - .REFCLK_FREQUENCY(200.0), - .SIGNAL_PATTERN("DATA") - ) IDELAYE2_15 ( - .C(sys_clk), - .CE((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_inc_re)), - .IDATAIN(main_a7ddrphy_dq_i_nodelay15), - .INC(1'd1), - .LD((main_a7ddrphy_dly_sel_storage[1] & main_a7ddrphy_rdly_dq_rst_re)), - .LDPIPEEN(1'd0), - .DATAOUT(main_a7ddrphy_dq_i_delayed15) - ); - - IOBUF IOBUF_15 ( - .I (main_a7ddrphy_dq_o_nodelay15), - .T (main_a7ddrphy_dq_t15), - .IO(ddram_dq[15]), - .O (main_a7ddrphy_dq_i_nodelay15) - ); - - reg [23:0] storage_2[0:7]; - reg [23:0] memdat_5; - always @(posedge sys_clk) begin - if (main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_we) - storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_w; - memdat_5 <= storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_adr]; - end - - always @(posedge sys_clk) begin - end - - assign main_sdram_bankmachine0_cmd_buffer_lookahead_wrport_dat_r = memdat_5; - assign main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_dat_r = storage_2[main_sdram_bankmachine0_cmd_buffer_lookahead_rdport_adr]; - - reg [23:0] storage_3[0:7]; - reg [23:0] memdat_6; - always @(posedge sys_clk) begin - if (main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_we) - storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_w; - memdat_6 <= storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_adr]; - end - - always @(posedge sys_clk) begin - end - - assign main_sdram_bankmachine1_cmd_buffer_lookahead_wrport_dat_r = memdat_6; - assign main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_dat_r = storage_3[main_sdram_bankmachine1_cmd_buffer_lookahead_rdport_adr]; - - reg [23:0] storage_4[0:7]; - reg [23:0] memdat_7; - always @(posedge sys_clk) begin - if (main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_we) - storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_w; - memdat_7 <= storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_adr]; - end - - always @(posedge sys_clk) begin - end - - assign main_sdram_bankmachine2_cmd_buffer_lookahead_wrport_dat_r = memdat_7; - assign main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_dat_r = storage_4[main_sdram_bankmachine2_cmd_buffer_lookahead_rdport_adr]; - - reg [23:0] storage_5[0:7]; - reg [23:0] memdat_8; - always @(posedge sys_clk) begin - if (main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_we) - storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_w; - memdat_8 <= storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_adr]; - end - - always @(posedge sys_clk) begin - end - - assign main_sdram_bankmachine3_cmd_buffer_lookahead_wrport_dat_r = memdat_8; - assign main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_dat_r = storage_5[main_sdram_bankmachine3_cmd_buffer_lookahead_rdport_adr]; - - reg [23:0] storage_6[0:7]; - reg [23:0] memdat_9; - always @(posedge sys_clk) begin - if (main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_we) - storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_w; - memdat_9 <= storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_adr]; - end - - always @(posedge sys_clk) begin - end - - assign main_sdram_bankmachine4_cmd_buffer_lookahead_wrport_dat_r = memdat_9; - assign main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_dat_r = storage_6[main_sdram_bankmachine4_cmd_buffer_lookahead_rdport_adr]; - - reg [23:0] storage_7 [0:7]; - reg [23:0] memdat_10; - always @(posedge sys_clk) begin - if (main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_we) - storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_w; - memdat_10 <= storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_adr]; - end - - always @(posedge sys_clk) begin - end - - assign main_sdram_bankmachine5_cmd_buffer_lookahead_wrport_dat_r = memdat_10; - assign main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_dat_r = storage_7[main_sdram_bankmachine5_cmd_buffer_lookahead_rdport_adr]; - - reg [23:0] storage_8 [0:7]; - reg [23:0] memdat_11; - always @(posedge sys_clk) begin - if (main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_we) - storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_w; - memdat_11 <= storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_adr]; - end - - always @(posedge sys_clk) begin - end - - assign main_sdram_bankmachine6_cmd_buffer_lookahead_wrport_dat_r = memdat_11; - assign main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_dat_r = storage_8[main_sdram_bankmachine6_cmd_buffer_lookahead_rdport_adr]; - - reg [23:0] storage_9 [0:7]; - reg [23:0] memdat_12; - always @(posedge sys_clk) begin - if (main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_we) - storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr] <= main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_w; - memdat_12 <= storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_adr]; - end - - always @(posedge sys_clk) begin - end - - assign main_sdram_bankmachine7_cmd_buffer_lookahead_wrport_dat_r = memdat_12; - assign main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_dat_r = storage_9[main_sdram_bankmachine7_cmd_buffer_lookahead_rdport_adr]; - - reg [23:0] tag_mem [0:511]; - reg [ 8:0] memadr_1; - always @(posedge sys_clk) begin - if (main_tag_port_we) tag_mem[main_tag_port_adr] <= main_tag_port_dat_w; - memadr_1 <= main_tag_port_adr; - end - - assign main_tag_port_dat_r = tag_mem[memadr_1]; - - VexRiscv VexRiscv ( - .clk(sys_clk), - .dBusWishbone_ACK(main_minsoc_cpu_dbus_ack), - .dBusWishbone_DAT_MISO(main_minsoc_cpu_dbus_dat_r), - .dBusWishbone_ERR(main_minsoc_cpu_dbus_err), - .externalInterruptArray(main_minsoc_cpu_interrupt), - .externalResetVector(main_minsoc_vexriscv), - .iBusWishbone_ACK(main_minsoc_cpu_ibus_ack), - .iBusWishbone_DAT_MISO(main_minsoc_cpu_ibus_dat_r), - .iBusWishbone_ERR(main_minsoc_cpu_ibus_err), - .reset((sys_rst | main_minsoc_cpu_reset)), - .softwareInterrupt(1'd0), - .timerInterrupt(1'd0), - .dBusWishbone_ADR(main_minsoc_cpu_dbus_adr), - .dBusWishbone_BTE(main_minsoc_cpu_dbus_bte), - .dBusWishbone_CTI(main_minsoc_cpu_dbus_cti), - .dBusWishbone_CYC(main_minsoc_cpu_dbus_cyc), - .dBusWishbone_DAT_MOSI(main_minsoc_cpu_dbus_dat_w), - .dBusWishbone_SEL(main_minsoc_cpu_dbus_sel), - .dBusWishbone_STB(main_minsoc_cpu_dbus_stb), - .dBusWishbone_WE(main_minsoc_cpu_dbus_we), - .iBusWishbone_ADR(main_minsoc_cpu_ibus_adr), - .iBusWishbone_BTE(main_minsoc_cpu_ibus_bte), - .iBusWishbone_CTI(main_minsoc_cpu_ibus_cti), - .iBusWishbone_CYC(main_minsoc_cpu_ibus_cyc), - .iBusWishbone_DAT_MOSI(main_minsoc_cpu_ibus_dat_w), - .iBusWishbone_SEL(main_minsoc_cpu_ibus_sel), - .iBusWishbone_STB(main_minsoc_cpu_ibus_stb), - .iBusWishbone_WE(main_minsoc_cpu_ibus_we) - ); - - PLLE2_ADV #( - .CLKFBOUT_MULT(4'd12), - .CLKIN1_PERIOD(10.0), - .CLKOUT0_DIVIDE(5'd20), - .CLKOUT0_PHASE(1'd0), - .CLKOUT1_DIVIDE(3'd5), - .CLKOUT1_PHASE(1'd0), - .CLKOUT2_DIVIDE(3'd5), - .CLKOUT2_PHASE(90000), - .CLKOUT3_DIVIDE(3'd6), - .CLKOUT3_PHASE(1'd0), - .DIVCLK_DIVIDE(1'd1), - .REF_JITTER1(0.01), - .STARTUP_WAIT("FALSE") - ) PLLE2_ADV ( - .CLKFBIN(builder_pll_fb), - .CLKIN1(main_pll_clkin), - .RST(main_reset), - .CLKFBOUT(builder_pll_fb), - .CLKOUT0(main_clkout0), - .CLKOUT1(main_clkout1), - .CLKOUT2(main_clkout2), - .CLKOUT3(main_clkout3), - .LOCKED(main_locked) - ); - - reg [7:0] data_mem_grain0[0:511]; - reg [8:0] memadr_2; - always @(posedge sys_clk) begin - if (main_data_port_we[0]) data_mem_grain0[main_data_port_adr] <= main_data_port_dat_w[7:0]; - memadr_2 <= main_data_port_adr; - end - - assign main_data_port_dat_r[7:0] = data_mem_grain0[memadr_2]; - - reg [7:0] data_mem_grain1[0:511]; - reg [8:0] memadr_3; - always @(posedge sys_clk) begin - if (main_data_port_we[1]) data_mem_grain1[main_data_port_adr] <= main_data_port_dat_w[15:8]; - memadr_3 <= main_data_port_adr; - end - - assign main_data_port_dat_r[15:8] = data_mem_grain1[memadr_3]; - - reg [7:0] data_mem_grain2[0:511]; - reg [8:0] memadr_4; - always @(posedge sys_clk) begin - if (main_data_port_we[2]) data_mem_grain2[main_data_port_adr] <= main_data_port_dat_w[23:16]; - memadr_4 <= main_data_port_adr; - end - - assign main_data_port_dat_r[23:16] = data_mem_grain2[memadr_4]; - - reg [7:0] data_mem_grain3[0:511]; - reg [8:0] memadr_5; - always @(posedge sys_clk) begin - if (main_data_port_we[3]) data_mem_grain3[main_data_port_adr] <= main_data_port_dat_w[31:24]; - memadr_5 <= main_data_port_adr; - end - - assign main_data_port_dat_r[31:24] = data_mem_grain3[memadr_5]; - - reg [7:0] data_mem_grain4[0:511]; - reg [8:0] memadr_6; - always @(posedge sys_clk) begin - if (main_data_port_we[4]) data_mem_grain4[main_data_port_adr] <= main_data_port_dat_w[39:32]; - memadr_6 <= main_data_port_adr; - end - - assign main_data_port_dat_r[39:32] = data_mem_grain4[memadr_6]; - - reg [7:0] data_mem_grain5[0:511]; - reg [8:0] memadr_7; - always @(posedge sys_clk) begin - if (main_data_port_we[5]) data_mem_grain5[main_data_port_adr] <= main_data_port_dat_w[47:40]; - memadr_7 <= main_data_port_adr; - end - - assign main_data_port_dat_r[47:40] = data_mem_grain5[memadr_7]; - - reg [7:0] data_mem_grain6[0:511]; - reg [8:0] memadr_8; - always @(posedge sys_clk) begin - if (main_data_port_we[6]) data_mem_grain6[main_data_port_adr] <= main_data_port_dat_w[55:48]; - memadr_8 <= main_data_port_adr; - end - - assign main_data_port_dat_r[55:48] = data_mem_grain6[memadr_8]; - - reg [7:0] data_mem_grain7[0:511]; - reg [8:0] memadr_9; - always @(posedge sys_clk) begin - if (main_data_port_we[7]) data_mem_grain7[main_data_port_adr] <= main_data_port_dat_w[63:56]; - memadr_9 <= main_data_port_adr; - end - - assign main_data_port_dat_r[63:56] = data_mem_grain7[memadr_9]; - - reg [7:0] data_mem_grain8[0:511]; - reg [8:0] memadr_10; - always @(posedge sys_clk) begin - if (main_data_port_we[8]) data_mem_grain8[main_data_port_adr] <= main_data_port_dat_w[71:64]; - memadr_10 <= main_data_port_adr; - end - - assign main_data_port_dat_r[71:64] = data_mem_grain8[memadr_10]; - - reg [7:0] data_mem_grain9[0:511]; - reg [8:0] memadr_11; - always @(posedge sys_clk) begin - if (main_data_port_we[9]) data_mem_grain9[main_data_port_adr] <= main_data_port_dat_w[79:72]; - memadr_11 <= main_data_port_adr; - end - - assign main_data_port_dat_r[79:72] = data_mem_grain9[memadr_11]; - - reg [7:0] data_mem_grain10[0:511]; - reg [8:0] memadr_12; - always @(posedge sys_clk) begin - if (main_data_port_we[10]) data_mem_grain10[main_data_port_adr] <= main_data_port_dat_w[87:80]; - memadr_12 <= main_data_port_adr; - end - - assign main_data_port_dat_r[87:80] = data_mem_grain10[memadr_12]; - - reg [7:0] data_mem_grain11[0:511]; - reg [8:0] memadr_13; - always @(posedge sys_clk) begin - if (main_data_port_we[11]) data_mem_grain11[main_data_port_adr] <= main_data_port_dat_w[95:88]; - memadr_13 <= main_data_port_adr; - end - - assign main_data_port_dat_r[95:88] = data_mem_grain11[memadr_13]; - - reg [7:0] data_mem_grain12[0:511]; - reg [8:0] memadr_14; - always @(posedge sys_clk) begin - if (main_data_port_we[12]) data_mem_grain12[main_data_port_adr] <= main_data_port_dat_w[103:96]; - memadr_14 <= main_data_port_adr; - end - - assign main_data_port_dat_r[103:96] = data_mem_grain12[memadr_14]; - - reg [7:0] data_mem_grain13[0:511]; - reg [8:0] memadr_15; - always @(posedge sys_clk) begin - if (main_data_port_we[13]) - data_mem_grain13[main_data_port_adr] <= main_data_port_dat_w[111:104]; - memadr_15 <= main_data_port_adr; - end - - assign main_data_port_dat_r[111:104] = data_mem_grain13[memadr_15]; - - reg [7:0] data_mem_grain14[0:511]; - reg [8:0] memadr_16; - always @(posedge sys_clk) begin - if (main_data_port_we[14]) - data_mem_grain14[main_data_port_adr] <= main_data_port_dat_w[119:112]; - memadr_16 <= main_data_port_adr; - end - - assign main_data_port_dat_r[119:112] = data_mem_grain14[memadr_16]; - - reg [7:0] data_mem_grain15[0:511]; - reg [8:0] memadr_17; - always @(posedge sys_clk) begin - if (main_data_port_we[15]) - data_mem_grain15[main_data_port_adr] <= main_data_port_dat_w[127:120]; - memadr_17 <= main_data_port_adr; - end - - assign main_data_port_dat_r[127:120] = data_mem_grain15[memadr_17]; - - (* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) - ) FDPE ( - .C (sys_clk), - .CE (1'd1), - .D (1'd0), - .PRE(builder_xilinxasyncresetsynchronizerimpl0), - .Q (builder_xilinxasyncresetsynchronizerimpl0_rst_meta) - ); - - (* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) - ) FDPE_1 ( - .C (sys_clk), - .CE (1'd1), - .D (builder_xilinxasyncresetsynchronizerimpl0_rst_meta), - .PRE(builder_xilinxasyncresetsynchronizerimpl0), - .Q (sys_rst) - ); - - (* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) - ) FDPE_2 ( - .C (sys4x_clk), - .CE (1'd1), - .D (1'd0), - .PRE(builder_xilinxasyncresetsynchronizerimpl1), - .Q (builder_xilinxasyncresetsynchronizerimpl1_rst_meta) - ); - - (* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) - ) FDPE_3 ( - .C (sys4x_clk), - .CE (1'd1), - .D (builder_xilinxasyncresetsynchronizerimpl1_rst_meta), - .PRE(builder_xilinxasyncresetsynchronizerimpl1), - .Q (builder_xilinxasyncresetsynchronizerimpl1_expr) - ); - - (* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) - ) FDPE_4 ( - .C (sys4x_dqs_clk), - .CE (1'd1), - .D (1'd0), - .PRE(builder_xilinxasyncresetsynchronizerimpl2), - .Q (builder_xilinxasyncresetsynchronizerimpl2_rst_meta) - ); - - (* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) - ) FDPE_5 ( - .C (sys4x_dqs_clk), - .CE (1'd1), - .D (builder_xilinxasyncresetsynchronizerimpl2_rst_meta), - .PRE(builder_xilinxasyncresetsynchronizerimpl2), - .Q (builder_xilinxasyncresetsynchronizerimpl2_expr) - ); - - (* ars_ff1 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) - ) FDPE_6 ( - .C (clk200_clk), - .CE (1'd1), - .D (1'd0), - .PRE(builder_xilinxasyncresetsynchronizerimpl3), - .Q (builder_xilinxasyncresetsynchronizerimpl3_rst_meta) - ); - - (* ars_ff2 = "true", async_reg = "true" *) FDPE #( - .INIT(1'd1) - ) FDPE_7 ( - .C (clk200_clk), - .CE (1'd1), - .D (builder_xilinxasyncresetsynchronizerimpl3_rst_meta), - .PRE(builder_xilinxasyncresetsynchronizerimpl3), - .Q (clk200_rst) - ); - -endmodule diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v new file mode 120000 index 000000000..22581dd5c --- /dev/null +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v @@ -0,0 +1 @@ +../../../third_party/minilitex_ddr_arty/minilitex_ddr_arty.v \ No newline at end of file diff --git a/xdc-plugin/tests/package_pins/package_pins.v b/xdc-plugin/tests/package_pins/package_pins.v index e5d2896fe..d4d172dc9 100644 --- a/xdc-plugin/tests/package_pins/package_pins.v +++ b/xdc-plugin/tests/package_pins/package_pins.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, output [3:0] led, diff --git a/xdc-plugin/tests/port_indexes/port_indexes.v b/xdc-plugin/tests/port_indexes/port_indexes.v index 2ec231bb2..1b1565f6b 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.v +++ b/xdc-plugin/tests/port_indexes/port_indexes.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module top ( input clk, output [3:0] led, From 10f431b4b06b58d975a4bab79ff43eadcaa9daf1 Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Mon, 21 Jun 2021 17:25:59 +0530 Subject: [PATCH 338/845] Fixing an issue in edf file generation where hilomap is required but it was not defined. Also commenting an include file which is causing compilation error in mac compilation and commenting it has no impact on Ubuntu compilation Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/synth_quicklogic.cc | 8 +++++--- xdc-plugin/xdc.cc | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index d851d3833..f29e09198 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -296,11 +296,13 @@ struct SynthQuickLogicPass : public ScriptPass { if (check_label("finalize")) { run("check"); run("opt_clean -purge"); + if (check_label("edif") && (!edif_file.empty())) { + run("hilomap -hicell logic_1 a -locell logic_0 a -singleton A:top"); + } } - if (check_label("edif")) { - if (!edif_file.empty()) - run(stringf("write_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); + if (check_label("edif") && (!edif_file.empty())) { + run(stringf("write_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); } if (check_label("blif")) { diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 3d27e0bb9..3c18fe613 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -32,7 +32,7 @@ #include "kernel/register.h" #include "kernel/rtlil.h" #include "libs/json11/json11.hpp" -#include +//#include #include USING_YOSYS_NAMESPACE From 9915fa6ffc16e73219800ec51160cba4181a9737 Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Mon, 21 Jun 2021 20:29:23 +0530 Subject: [PATCH 339/845] Removing commented line Signed-off-by: Lalit Narain Sharma --- xdc-plugin/xdc.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 3c18fe613..2e935eaf0 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -32,7 +32,6 @@ #include "kernel/register.h" #include "kernel/rtlil.h" #include "libs/json11/json11.hpp" -//#include #include USING_YOSYS_NAMESPACE From ba10bf2cb7b43fb211187d01a7c1e9512a01b7f9 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 18 Jun 2021 09:30:43 +0200 Subject: [PATCH 340/845] Added / rearranged EOS-S3 Verilog files used in upstream Yosys Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 11 +- ql-qlf-plugin/pp3/pp3_abc9_map.v | 26 ++ ql-qlf-plugin/pp3/pp3_abc9_model.v | 11 + ql-qlf-plugin/pp3/pp3_abc9_unmap.v | 14 + ql-qlf-plugin/pp3/pp3_cells_map.v | 36 +++ ql-qlf-plugin/pp3/pp3_cells_sim.v | 444 ++++++++++++++++++++++++++++ ql-qlf-plugin/pp3/pp3_ffs_map.v | 4 + ql-qlf-plugin/pp3/pp3_latches_map.v | 11 + ql-qlf-plugin/pp3/pp3_lut_map.v | 53 ++++ 9 files changed, 609 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/pp3/pp3_abc9_map.v create mode 100644 ql-qlf-plugin/pp3/pp3_abc9_model.v create mode 100644 ql-qlf-plugin/pp3/pp3_abc9_unmap.v create mode 100644 ql-qlf-plugin/pp3/pp3_cells_map.v create mode 100644 ql-qlf-plugin/pp3/pp3_cells_sim.v create mode 100644 ql-qlf-plugin/pp3/pp3_ffs_map.v create mode 100644 ql-qlf-plugin/pp3/pp3_latches_map.v create mode 100644 ql-qlf-plugin/pp3/pp3_lut_map.v diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index c17cc0635..e1f3c84cb 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -14,6 +14,7 @@ include ../Makefile_plugin.common COMMON = common QLF_K4N8_DIR = ql-qlf-k4n8 QLF_K6N10_DIR = ql-qlf-k6n10 +PP3_DIR = pp3 VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K4N8_DIR)/qlf_k4n8_arith_map.v \ $(QLF_K4N8_DIR)/qlf_k4n8_cells_sim.v \ @@ -24,7 +25,15 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10_DIR)/qlf_k6n10_cells_sim.v \ $(QLF_K6N10_DIR)/qlf_k6n10_ffs_map.v \ $(QLF_K6N10_DIR)/qlf_k6n10_dsp_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v + $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v \ + $(PP3_DIR)/pp3_abc9_map.v \ + $(PP3_DIR)/pp3_abc9_model.v \ + $(PP3_DIR)/pp3_abc9_unmap.v \ + $(PP3_DIR)/pp3_cells_map.v \ + $(PP3_DIR)/pp3_cells_sim.v \ + $(PP3_DIR)/pp3_ffs_map.v \ + $(PP3_DIR)/pp3_latches_map.v \ + $(PP3_DIR)/pp3_lut_map.v retrieve-pmgen:=$(shell mkdir pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) diff --git a/ql-qlf-plugin/pp3/pp3_abc9_map.v b/ql-qlf-plugin/pp3/pp3_abc9_map.v new file mode 100644 index 000000000..46c11d675 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_abc9_map.v @@ -0,0 +1,26 @@ +// This file exists to map purely-synchronous flops to ABC9 flops, while +// mapping flops with asynchronous-set/clear as boxes, this is because ABC9 +// doesn't support asynchronous-set/clear flops in sequential synthesis. + +module dffepc ( + output Q, + input D, + input CLK, + input EN, + input CLR, + input PRE +); + +parameter INIT = 1'b0; + +parameter _TECHMAP_CONSTMSK_CLR_ = 1'b0; +parameter _TECHMAP_CONSTMSK_PRE_ = 1'b0; +parameter _TECHMAP_CONSTVAL_CLR_ = 1'b0; +parameter _TECHMAP_CONSTVAL_PRE_ = 1'b0; + +if (_TECHMAP_CONSTMSK_CLR_ != 1'b0 && _TECHMAP_CONSTMSK_PRE_ != 1'b0 && _TECHMAP_CONSTVAL_CLR_ == 1'b0 && _TECHMAP_CONSTVAL_PRE_ == 1'b0) + $__PP3_DFFEPC_SYNCONLY _TECHMAP_REPLACE_ (.Q(Q), .D(D), .CLK(CLK), .EN(EN)); +else + wire _TECHMAP_FAIL_ = 1; + +endmodule diff --git a/ql-qlf-plugin/pp3/pp3_abc9_model.v b/ql-qlf-plugin/pp3/pp3_abc9_model.v new file mode 100644 index 000000000..06d4a2a56 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_abc9_model.v @@ -0,0 +1,11 @@ +(* abc9_flop, lib_whitebox *) +module $__PP3_DFFEPC_SYNCONLY ( + output Q, + input D, + input CLK, + input EN, +); + + dffepc ff (.Q(Q), .D(D), .CLK(CLK), .EN(EN), .PRE(1'b0), .CLR(1'b0)); + +endmodule diff --git a/ql-qlf-plugin/pp3/pp3_abc9_unmap.v b/ql-qlf-plugin/pp3/pp3_abc9_unmap.v new file mode 100644 index 000000000..1681e01bb --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_abc9_unmap.v @@ -0,0 +1,14 @@ +module $__PP3_DFFEPC_SYNCONLY ( + output Q, + input D, + input CLK, + input EN, +); + +// For some reason ABC9 adds init attributes to wires even though they were removed before mapping. +// As a workaround, remove any init attributes that get reintroduced. +wire _TECHMAP_REMOVEINIT_Q_ = 1; + +dffepc _TECHMAP_REPLACE_ (.Q(Q), .D(D), .CLK(CLK), .EN(EN), .PRE(1'b0), .CLR(1'b0)); + +endmodule diff --git a/ql-qlf-plugin/pp3/pp3_cells_map.v b/ql-qlf-plugin/pp3/pp3_cells_map.v new file mode 100644 index 000000000..10e270d4e --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_cells_map.v @@ -0,0 +1,36 @@ +module \$_MUX8_ ( + A, B, C, D, E, F, G, H, S, T, U, Y +); + input A, B, C, D, E, F, G, H, S, T, U; + output Y; + mux8x0 _TECHMAP_REPLACE_ ( + .A(A), + .B(B), + .C(C), + .D(D), + .E(E), + .F(F), + .G(G), + .H(H), + .S0(S), + .S1(T), + .S2(U), + .Q(Y) + ); +endmodule + +module \$_MUX4_ ( + A, B, C, D, S, T, U, Y +); + input A, B, C, D, S, T, U; + output Y; + mux4x0 _TECHMAP_REPLACE_ ( + .A(A), + .B(B), + .C(C), + .D(D), + .S0(S), + .S1(T), + .Q(Y) + ); +endmodule diff --git a/ql-qlf-plugin/pp3/pp3_cells_sim.v b/ql-qlf-plugin/pp3/pp3_cells_sim.v new file mode 100644 index 000000000..39229121c --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_cells_sim.v @@ -0,0 +1,444 @@ +module inv ( + output Q, + input A +); + assign Q = A ? 0 : 1; +endmodule + +module buff ( + output Q, + input A +); + assign Q = A; +endmodule + +module logic_0 ( + output A +); + assign A = 0; +endmodule + +module logic_1 ( + output A +); + assign A = 1; +endmodule + +module gclkbuff ( + input A, + output Z +); + specify + (A => Z) = 0; + endspecify + + assign Z = A; +endmodule + +module inpad ( + output Q, + (* iopad_external_pin *) + input P +); + specify + (P => Q) = 0; + endspecify + assign Q = P; +endmodule + +module outpad ( + (* iopad_external_pin *) + output P, + input A +); + specify + (A => P) = 0; + endspecify + assign P = A; +endmodule + +module ckpad ( + output Q, + (* iopad_external_pin *) + input P +); + specify + (P => Q) = 0; + endspecify + assign Q = P; +endmodule + +module bipad ( + input A, + input EN, + output Q, + (* iopad_external_pin *) + inout P +); + assign Q = P; + assign P = EN ? A : 1'bz; +endmodule + +module dff ( + output reg Q, + input D, + (* clkbuf_sink *) + input CLK +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + always @(posedge CLK) Q <= D; +endmodule + +module dffc ( + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + (* clkbuf_sink *) + input CLR +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge CLK or posedge CLR) + if (CLR) Q <= 1'b0; + else Q <= D; +endmodule + +module dffp ( + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + (* clkbuf_sink *) + input PRE +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge CLK or posedge PRE) + if (PRE) Q <= 1'b1; + else Q <= D; +endmodule + +module dffpc ( + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + (* clkbuf_sink *) + input CLR, + (* clkbuf_sink *) + input PRE +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge CLK or posedge CLR or posedge PRE) + if (CLR) Q <= 1'b0; + else if (PRE) Q <= 1'b1; + else Q <= D; +endmodule + +module dffe ( + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + input EN +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + always @(posedge CLK) if (EN) Q <= D; +endmodule + +module dffec ( + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + input EN, + (* clkbuf_sink *) + input CLR +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge CLK or posedge CLR) + if (CLR) Q <= 1'b0; + else if (EN) Q <= D; +endmodule + +(* lib_whitebox *) +module dffepc ( + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + input EN, + (* clkbuf_sink *) + input CLR, + (* clkbuf_sink *) + input PRE +); + parameter [0:0] INIT = 1'b0; + + specify + if (EN) (posedge CLK => (Q : D)) = 1701; // QCK -> QZ + if (CLR) (CLR => Q) = 967; // QRT -> QZ + if (PRE) (PRE => Q) = 1252; // QST -> QZ + $setup(D, posedge CLK, 216); // QCK -> QDS + $setup(EN, posedge CLK, 590); // QCK -> QEN + endspecify + + initial Q = INIT; + always @(posedge CLK or posedge CLR or posedge PRE) + if (CLR) Q <= 1'b0; + else if (PRE) Q <= 1'b1; + else if (EN) Q <= D; +endmodule + +// FZ FS F2 (F1 TO 0) +(* abc9_box, lib_whitebox *) +module AND2I0 ( + output Q, + input A, B +); + specify + (A => Q) = 698; // FS -> FZ + (B => Q) = 639; // F2 -> FZ + endspecify + + assign Q = A ? B : 0; +endmodule + +(* abc9_box, lib_whitebox *) +module mux2x0 ( + output Q, + input S, A, B +); + specify + (S => Q) = 698; // FS -> FZ + (A => Q) = 639; // F1 -> FZ + (B => Q) = 639; // F2 -> FZ + endspecify + + assign Q = S ? B : A; +endmodule + +(* abc9_box, lib_whitebox *) +module mux2x1 ( + output Q, + input S, A, B +); + specify + (S => Q) = 698; // FS -> FZ + (A => Q) = 639; // F1 -> FZ + (B => Q) = 639; // F2 -> FZ + endspecify + + assign Q = S ? B : A; +endmodule + +(* abc9_box, lib_whitebox *) +module mux4x0 ( + output Q, + input S0, S1, A, B, C, D +); + specify + (S0 => Q) = 1251; // TAB -> TZ + (S1 => Q) = 1406; // TSL -> TZ + (A => Q) = 1699; // TA1 -> TZ + (B => Q) = 1687; // TA2 -> TZ + (C => Q) = 1669; // TB1 -> TZ + (D => Q) = 1679; // TB2 -> TZ + endspecify + + assign Q = S1 ? (S0 ? D : C) : (S0 ? B : A); +endmodule + +// S0 BSL TSL +// S1 BAB TAB +// S2 TBS +// A TA1 +// B TA2 +// C TB1 +// D TB2 +// E BA1 +// F BA2 +// G BB1 +// H BB2 +// Q CZ +(* abc9_box, lib_whitebox *) +module mux8x0 ( + output Q, + input S0, S1, S2, A, B, C, D, E, F, G, H +); + specify + (S0 => Q) = 1593; // ('TSL', 'BSL') -> CZ + (S1 => Q) = 1437; // ('TAB', 'BAB') -> CZ + (S2 => Q) = 995; // TBS -> CZ + (A => Q) = 1887; // TA1 -> CZ + (B => Q) = 1873; // TA2 -> CZ + (C => Q) = 1856; // TB1 -> CZ + (D => Q) = 1860; // TB2 -> CZ + (E => Q) = 1714; // BA1 -> CZ + (F => Q) = 1773; // BA2 -> CZ + (G => Q) = 1749; // BB1 -> CZ + (H => Q) = 1723; // BB2 -> CZ + endspecify + + assign Q = S2 ? (S1 ? (S0 ? H : G) : (S0 ? F : E)) : (S1 ? (S0 ? D : C) : (S0 ? B : A)); +endmodule + +(* blackbox *) +(* keep *) +module qlal4s3b_cell_macro ( + input WB_CLK, + input WBs_ACK, + input [31:0] WBs_RD_DAT, + output [3:0] WBs_BYTE_STB, + output WBs_CYC, + output WBs_WE, + output WBs_RD, + output WBs_STB, + output [16:0] WBs_ADR, + input [3:0] SDMA_Req, + input [3:0] SDMA_Sreq, + output [3:0] SDMA_Done, + output [3:0] SDMA_Active, + input [3:0] FB_msg_out, + input [7:0] FB_Int_Clr, + output FB_Start, + input FB_Busy, + output WB_RST, + output Sys_PKfb_Rst, + output Clk16, + output Clk16_Rst, + output Clk21, + output Clk21_Rst, + output Sys_Pclk, + output Sys_Pclk_Rst, + input Sys_PKfb_Clk, + input [31:0] FB_PKfbData, + output [31:0] WBs_WR_DAT, + input [3:0] FB_PKfbPush, + input FB_PKfbSOF, + input FB_PKfbEOF, + output [7:0] Sensor_Int, + output FB_PKfbOverflow, + output [23:0] TimeStamp, + input Sys_PSel, + input [15:0] SPIm_Paddr, + input SPIm_PEnable, + input SPIm_PWrite, + input [31:0] SPIm_PWdata, + output SPIm_PReady, + output SPIm_PSlvErr, + output [31:0] SPIm_Prdata, + input [15:0] Device_ID, + input [13:0] FBIO_In_En, + input [13:0] FBIO_Out, + input [13:0] FBIO_Out_En, + output [13:0] FBIO_In, + inout [13:0] SFBIO, + input Device_ID_6S, + input Device_ID_4S, + input SPIm_PWdata_26S, + input SPIm_PWdata_24S, + input SPIm_PWdata_14S, + input SPIm_PWdata_11S, + input SPIm_PWdata_0S, + input SPIm_Paddr_8S, + input SPIm_Paddr_6S, + input FB_PKfbPush_1S, + input FB_PKfbData_31S, + input FB_PKfbData_21S, + input FB_PKfbData_19S, + input FB_PKfbData_9S, + input FB_PKfbData_6S, + input Sys_PKfb_ClkS, + input FB_BusyS, + input WB_CLKS +); + +endmodule + +(* abc9_lut=1, lib_whitebox *) +module LUT1 ( + output O, + input I0 +); + parameter [1:0] INIT = 0; + parameter EQN = "(I0)"; + + // These timings are for PolarPro 3E; other families will need updating. + specify + (I0 => O) = 698; // FS -> FZ + endspecify + + assign O = I0 ? INIT[1] : INIT[0]; +endmodule + +// TZ TSL TAB +(* abc9_lut=2, lib_whitebox *) +module LUT2 ( + output O, + input I0, I1 +); + parameter [3:0] INIT = 4'h0; + parameter EQN = "(I0)"; + + // These timings are for PolarPro 3E; other families will need updating. + specify + (I0 => O) = 1251; // TAB -> TZ + (I1 => O) = 1406; // TSL -> TZ + endspecify + + wire [1:0] s1 = I1 ? INIT[3:2] : INIT[1:0]; + assign O = I0 ? s1[1] : s1[0]; +endmodule + +(* abc9_lut=2, lib_whitebox *) +module LUT3 ( + output O, + input I0, I1, I2 +); + parameter [7:0] INIT = 8'h0; + parameter EQN = "(I0)"; + + // These timings are for PolarPro 3E; other families will need updating. + specify + (I0 => O) = 1251; // TAB -> TZ + (I1 => O) = 1406; // TSL -> TZ + (I2 => O) = 1699; // ('TA1', 'TA2', 'TB1', 'TB2') -> TZ + endspecify + + wire [3:0] s2 = I2 ? INIT[7:4] : INIT[3:0]; + wire [1:0] s1 = I1 ? s2[3:2] : s2[1:0]; + assign O = I0 ? s1[1] : s1[0]; +endmodule + +(* abc9_lut=4, lib_whitebox *) +module LUT4 ( + output O, + input I0, I1, I2, I3 +); + parameter [15:0] INIT = 16'h0; + parameter EQN = "(I0)"; + + // These timings are for PolarPro 3E; other families will need updating. + specify + (I0 => O) = 995; // TBS -> CZ + (I1 => O) = 1437; // ('TAB', 'BAB') -> CZ + (I2 => O) = 1593; // ('TSL', 'BSL') -> CZ + (I3 => O) = 1887; // ('TA1', 'TA2', 'TB1', 'TB2', 'BA1', 'BA2', 'BB1', 'BB2') -> CZ + endspecify + + wire [7:0] s3 = I3 ? INIT[15:8] : INIT[7:0]; + wire [3:0] s2 = I2 ? s3[7:4] : s3[3:0]; + wire [1:0] s1 = I1 ? s2[3:2] : s2[1:0]; + assign O = I0 ? s1[1] : s1[0]; +endmodule + diff --git a/ql-qlf-plugin/pp3/pp3_ffs_map.v b/ql-qlf-plugin/pp3/pp3_ffs_map.v new file mode 100644 index 000000000..73ba6c9c8 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_ffs_map.v @@ -0,0 +1,4 @@ +module \$_DFFSRE_PPPP_ (input C, S, R, E, D, output Q); + wire _TECHMAP_REMOVEINIT_Q_ = 1; + dffepc #(.INIT(1'b0)) _TECHMAP_REPLACE_ (.CLK(C), .PRE(S), .CLR(R), .EN(E), .D(D), .Q(Q)); +endmodule diff --git a/ql-qlf-plugin/pp3/pp3_latches_map.v b/ql-qlf-plugin/pp3/pp3_latches_map.v new file mode 100644 index 000000000..240a3fb4e --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_latches_map.v @@ -0,0 +1,11 @@ +module \$_DLATCH_P_ (E, D, Q); + wire [1023:0] _TECHMAP_DO_ = "simplemap; opt"; + input E, D; + output Q = E ? D : Q; +endmodule + +module \$_DLATCH_N_ (E, D, Q); + wire [1023:0] _TECHMAP_DO_ = "simplemap; opt"; + input E, D; + output Q = !E ? D : Q; +endmodule diff --git a/ql-qlf-plugin/pp3/pp3_lut_map.v b/ql-qlf-plugin/pp3/pp3_lut_map.v new file mode 100644 index 000000000..4c375c9fd --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_lut_map.v @@ -0,0 +1,53 @@ +module \$lut ( + A, Y +); + parameter WIDTH = 0; + parameter LUT = 0; + + input [WIDTH-1:0] A; + output Y; + + generate + if (WIDTH == 1) begin + LUT1 #( + .EQN(""), + .INIT(LUT) + ) _TECHMAP_REPLACE_ ( + .O(Y), + .I0(A[0]) + ); + end else if (WIDTH == 2) begin + LUT2 #( + .EQN(""), + .INIT(LUT) + ) _TECHMAP_REPLACE_ ( + .O(Y), + .I0(A[0]), + .I1(A[1]) + ); + end else if (WIDTH == 3) begin + LUT3 #( + .EQN(""), + .INIT(LUT) + ) _TECHMAP_REPLACE_ ( + .O(Y), + .I0(A[0]), + .I1(A[1]), + .I2(A[2]) + ); + end else if (WIDTH == 4) begin + LUT4 #( + .EQN(""), + .INIT(LUT) + ) _TECHMAP_REPLACE_ ( + .O(Y), + .I0(A[0]), + .I1(A[1]), + .I2(A[2]), + .I3(A[3]) + ); + end else begin + wire _TECHMAP_FAIL_ = 1; + end + endgenerate +endmodule From 089f3cc604dc6948802c5f9014b1dc0bc19941fb Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 18 Jun 2021 11:36:50 +0200 Subject: [PATCH 341/845] Integrated upstream EOS-S3 flow into synth_quicklogic.cc Signed-off-by: Maciej Kurc --- ql-qlf-plugin/synth_quicklogic.cc | 89 ++++++++++++++++++++++++------- 1 file changed, 71 insertions(+), 18 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index f29e09198..db82618b2 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -86,6 +86,7 @@ struct SynthQuickLogicPass : public ScriptPass { bool inferAdder; bool inferBram; bool abcOpt; + bool abc9; bool noffmap; void clear_flags() override @@ -99,6 +100,7 @@ struct SynthQuickLogicPass : public ScriptPass { inferAdder = true; inferBram = true; abcOpt = true; + abc9 = true; noffmap = false; nodsp = false; } @@ -147,6 +149,10 @@ struct SynthQuickLogicPass : public ScriptPass { abcOpt = false; continue; } + if (args[argidx] == "-no_abc9") { + abc9 = false; + continue; + } if (args[argidx] == "-no_ff_map") { noffmap = true; continue; @@ -159,6 +165,18 @@ struct SynthQuickLogicPass : public ScriptPass { if (!design->full_selection()) log_cmd_error("This command only operates on fully selected designs!\n"); + if (family != "pp3" && family != "qlf_k4n8" && family != "qlf_k6n10") + log_cmd_error("Invalid family specified: '%s'\n", family.c_str()); + + if (family != "pp3") { + abc9 = false; + } + + if (abc9 && design->scratchpad_get_int("abc9.D", 0) == 0) { + log_warning("delay target has not been set via SDC or scratchpad; assuming 12 MHz clock.\n"); + design->scratchpad_set_int("abc9.D", 41667); // 12MHz = 83.33.. ns; divided by two to allow for interconnect delay. + } + log_header(design, "Executing SYNTH_QUICKLOGIC pass.\n"); log_push(); @@ -180,21 +198,24 @@ struct SynthQuickLogicPass : public ScriptPass { if (check_label("prepare")) { run("proc"); run("flatten"); + if (family == "pp3") { + run("tribuf -logic"); + } + run("deminout"); run("opt_expr"); run("opt_clean"); - run("deminout"); - run("opt"); } if (check_label("coarse")) { - run("opt_expr"); - run("opt_clean"); run("check"); + run("opt -nodffe -nosdff"); + run("fsm"); run("opt"); - run("wreduce -keepdc"); + run("wreduce"); run("peepopt"); - run("pmuxtree"); run("opt_clean"); + run("share"); + if (help_mode || (!nodsp && family == "qlf_k6n10")) { run("memory_dff"); run("wreduce t:$mul"); @@ -211,10 +232,13 @@ struct SynthQuickLogicPass : public ScriptPass { run("ql_dsp", " (if -no_dsp)"); run("chtype -set $mul t:$__soft_mul", "(if -no_dsp)"); } + + run("techmap -map +/cmp2lut.v -D LUT_WIDTH=4"); + run("opt_expr"); + run("opt_clean"); run("alumacc"); + run("pmuxtree"); run("opt"); - run("fsm"); - run("opt -fast"); run("memory -nomap"); run("opt_clean"); } @@ -233,12 +257,15 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_gates")) { - if (inferAdder) { + if (inferAdder && (family == "qlf_k4n8" || family == "qlf_k6n10")) { run("techmap -map +/techmap.v -map +/quicklogic/" + family + "_arith_map.v"); } else { run("techmap"); } run("opt -fast"); + if (family == "pp3") { + run("muxcover -mux8 -mux4"); + } run("opt_expr"); run("opt_merge"); run("opt_clean"); @@ -246,22 +273,29 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_ffs")) { + run("opt_expr"); if (family == "qlf_k4n8") { run("shregmap -minlen 8 -maxlen 8"); + run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); } - if (family == "qlf_k6n10") { + else if (family == "qlf_k6n10") { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_PP?_ 0 -cell $_DFFE_PP?P_ 0 -cell $_DFFSR_PPP_ 0 -cell $_DFFSRE_PPPP_ 0 -cell " "$_DLATCHSR_PPP_ 0"); // In case we add clock inversion in the future. // run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_DFFSR_?PP_ 0 -cell $_DFFSRE_?PPP_ 0 -cell // $_DLATCH_SRPPP_ 0"); - } else { - run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); + } + else if (family == "pp3") { + run("dfflegalize -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_?_ x"); + run("techmap -map +/quicklogic/" + family + "_cells_map.v"); } std::string techMapArgs = " -map +/techmap.v -map +/quicklogic/" + family + "_ffs_map.v"; if (!noffmap) { run("techmap " + techMapArgs); } + if (family == "pp3") { + run("opt_expr -mux_undef"); + } run("opt_merge"); run("opt_clean"); run("opt"); @@ -271,15 +305,25 @@ struct SynthQuickLogicPass : public ScriptPass { if (abcOpt) { if (family == "qlf_k6n10") { run("abc -lut 6 "); - } else { + } else if (family == "qlf_k4n8") { run("abc -lut 4 "); + } else if (family == "pp3") { + run("techmap -map +/quicklogic/" + family + "_latches_map.v"); + if (abc9) { + run("read_verilog -lib -specify -icells +/quicklogic/" + family + "_abc9_model.v"); + run("techmap -map +/quicklogic/" + family + "_abc9_map.v"); + run("abc9 -maxlut 4 -dff"); + run("techmap -map +/quicklogic/" + family + "_abc9_unmap.v"); + } else { + run("abc -luts 1,2,2,4 -dress"); + } } } run("clean"); run("opt_lut"); } - if (check_label("map_cells") && family == "qlf_k6n10") { + if (check_label("map_cells") && (family == "qlf_k6n10" || family == "pp3")) { std::string techMapArgs; techMapArgs = "-map +/quicklogic/" + family + "_lut_map.v"; run("techmap " + techMapArgs); @@ -293,12 +337,21 @@ struct SynthQuickLogicPass : public ScriptPass { run("check -noinit"); } + if (check_label("iomap") && family == "pp3") { + run("clkbufmap -inpad ckpad Q:P"); + run("iopadmap -bits -outpad outpad A:P -inpad inpad Q:P -tinoutpad bipad EN:Q:A:P A:top"); + } + if (check_label("finalize")) { - run("check"); - run("opt_clean -purge"); - if (check_label("edif") && (!edif_file.empty())) { - run("hilomap -hicell logic_1 a -locell logic_0 a -singleton A:top"); + if (family == "pp3") { + run("setundef -zero -params -undriven"); } + if (family == "pp3" || (check_label("edif") && (!edif_file.empty()))) { + run("hilomap -hicell logic_1 A -locell logic_0 A -singleton A:top"); + } + run("opt_clean -purge"); + run("check"); + run("blackbox =A:whitebox"); } if (check_label("edif") && (!edif_file.empty())) { From 6ca25e8e234cedffe8941c1a52a7fbebe783ad76 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 18 Jun 2021 15:36:18 +0200 Subject: [PATCH 342/845] Added tests for ql-qlf plugin with PP3 architecture Signed-off-by: Maciej Kurc --- ql-qlf-plugin/tests/.gitignore | 1 + ql-qlf-plugin/tests/Makefile | 12 +- ql-qlf-plugin/tests/consts/consts.tcl | 14 +++ ql-qlf-plugin/tests/consts/consts.v | 27 +++++ ql-qlf-plugin/tests/dffs/dffs.tcl | 106 ++++++++++++++++++ ql-qlf-plugin/tests/dffs/dffs.v | 24 ++++ ql-qlf-plugin/tests/fsm/fsm.tcl | 30 +++++ ql-qlf-plugin/tests/fsm/fsm.v | 51 +++++++++ ql-qlf-plugin/tests/full_adder/full_adder.tcl | 38 +++++++ ql-qlf-plugin/tests/latches/latches.tcl | 42 +++++++ ql-qlf-plugin/tests/logic/logic.tcl | 19 ++++ ql-qlf-plugin/tests/mux/mux.tcl | 56 +++++++++ ql-qlf-plugin/tests/mux/mux.v | 61 ++++++++++ ql-qlf-plugin/tests/tribuf/tribuf.tcl | 19 ++++ ql-qlf-plugin/tests/tribuf/tribuf.v | 9 ++ 15 files changed, 507 insertions(+), 2 deletions(-) create mode 100644 ql-qlf-plugin/tests/.gitignore create mode 100644 ql-qlf-plugin/tests/consts/consts.tcl create mode 100644 ql-qlf-plugin/tests/consts/consts.v create mode 100644 ql-qlf-plugin/tests/fsm/fsm.tcl create mode 100644 ql-qlf-plugin/tests/fsm/fsm.v create mode 100644 ql-qlf-plugin/tests/mux/mux.tcl create mode 100644 ql-qlf-plugin/tests/mux/mux.v create mode 100644 ql-qlf-plugin/tests/tribuf/tribuf.tcl create mode 100644 ql-qlf-plugin/tests/tribuf/tribuf.v diff --git a/ql-qlf-plugin/tests/.gitignore b/ql-qlf-plugin/tests/.gitignore new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/ql-qlf-plugin/tests/.gitignore @@ -0,0 +1 @@ +ok diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 3377ef765..525750d92 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -8,17 +8,22 @@ # The bram test will be enable in a future PR after it's been fixed. -TESTS = dffs \ +TESTS = consts \ + dffs \ latches \ shreg \ iob_no_flatten \ full_adder \ mac_unit \ multiplier \ - logic + logic \ + mux \ + tribuf \ + fsm include $(shell pwd)/../../Makefile_test.common +consts_verify = true dffs_verify = true shreg_verify = true iob_no_flatten_verify = true @@ -27,3 +32,6 @@ full_adder_verify = true mac_unit_verify = true multiplier_verify = true logic_verify = true +mux_verify = true +tribuf_verify = true +fsm_verify = true diff --git a/ql-qlf-plugin/tests/consts/consts.tcl b/ql-qlf-plugin/tests/consts/consts.tcl new file mode 100644 index 000000000..71ca0ad3d --- /dev/null +++ b/ql-qlf-plugin/tests/consts/consts.tcl @@ -0,0 +1,14 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v + +synth_quicklogic -top my_top -family pp3 +stat +yosys cd my_top +select -assert-count 1 t:my_lut +select -assert-count 1 t:inpad +select -assert-count 1 t:outpad +select -assert-count 1 t:logic_0 +select -assert-count 1 t:logic_1 diff --git a/ql-qlf-plugin/tests/consts/consts.v b/ql-qlf-plugin/tests/consts/consts.v new file mode 100644 index 000000000..2e305ce4d --- /dev/null +++ b/ql-qlf-plugin/tests/consts/consts.v @@ -0,0 +1,27 @@ +(* keep_hierarchy *) +module my_lut ( + input wire [3:0] i, + output wire o +); + + LUT4 #(.INIT(16'hAAAA)) my_lut ( + .I0 (i[0]), + .I1 (i[1]), + .I2 (i[2]), + .I3 (1'bx), + .O (o) + ); + +endmodule + +module my_top ( + input wire i, + output wire o +); + + my_lut my_lut ( + .i ({1'b0, 1'b1, i}), + .o (o) + ); + +endmodule diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index 737acc1e8..9b1941c86 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -402,3 +402,109 @@ yosys cd my_dffsre_nnn stat select -assert-count 1 t:dffsre select -assert-count 3 t:\$lut + +design -reset + +# DFF on pp3 device +read_verilog $::env(DESIGN_TOP).v +design -save read + +# DFF +hierarchy -top my_dff +yosys proc +equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dff +design -load postopt +yosys cd my_dff +stat +select -assert-count 1 t:dffepc +select -assert-count 1 t:ckpad +select -assert-count 1 t:inpad +select -assert-count 1 t:outpad +select -assert-count 1 t:logic_0 +select -assert-count 1 t:logic_1 + +# DFFE +design -load read +hierarchy -top my_dffe +yosys proc +equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffe +design -load postopt +yosys cd my_dffe +stat +select -assert-count 1 t:dffepc +select -assert-count 1 t:ckpad +select -assert-count 2 t:inpad +select -assert-count 1 t:outpad +select -assert-count 1 t:logic_0 + +# ADFF a.k.a. DFFR_P +design -load read +hierarchy -top my_dffr_p +yosys proc +equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffr_p +design -load postopt +yosys cd my_dffr_p +stat +select -assert-count 1 t:dffepc +select -assert-count 1 t:logic_0 +select -assert-count 1 t:logic_1 +select -assert-count 1 t:inpad +select -assert-count 1 t:outpad +select -assert-count 2 t:ckpad + +select -assert-none t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad %% t:* %D + +# ADFFN a.k.a. DFFR_N +design -load read +hierarchy -top my_dffr_n +yosys proc +equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffr_n +design -load postopt +yosys cd my_dffr_n +stat +select -assert-count 1 t:LUT1 +select -assert-count 1 t:dffepc +select -assert-count 1 t:logic_0 +select -assert-count 1 t:logic_1 +select -assert-count 2 t:inpad +select -assert-count 1 t:outpad +select -assert-count 1 t:ckpad + +select -assert-none t:LUT1 t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad %% t:* %D + +# DFFS (posedge, sync set) +design -load read +hierarchy -top my_dffs_clk_p +yosys proc +equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffs_clk_p +design -load postopt +yosys cd my_dffs_clk_p +stat +select -assert-count 1 t:LUT2 +select -assert-count 1 t:dffepc +select -assert-count 1 t:logic_0 +select -assert-count 1 t:logic_1 +select -assert-count 2 t:inpad +select -assert-count 1 t:outpad +select -assert-count 1 t:ckpad + +select -assert-none t:LUT2 t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad %% t:* %D + +# DFFS (negedge, sync reset) +design -load read +hierarchy -top my_dffs_clk_n +yosys proc +equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffs_clk_n +design -load postopt +yosys cd my_dffs_clk_n +stat +select -assert-count 1 t:LUT1 +select -assert-count 1 t:LUT2 +select -assert-count 1 t:dffepc +select -assert-count 1 t:logic_0 +select -assert-count 1 t:logic_1 +select -assert-count 3 t:inpad +select -assert-count 1 t:outpad + +select -assert-none t:LUT1 t:LUT2 t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad %% t:* %D + diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index 702c38535..be159a1cc 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -14,6 +14,15 @@ module my_dff ( always @(posedge clk) q <= d; endmodule +module my_dffe( input d, clk, en, output reg q ); + initial begin + q = 0; + end + always @( posedge clk ) + if ( en ) + q <= d; +endmodule + module my_dffr_p ( input d, clk, @@ -413,3 +422,18 @@ module my_dffsre_nnn ( else if (!clr) q <= 1'b0; else if (en) q <= d; endmodule + +module my_dffs_clk_p( input d, clk, pre, output reg q ); + initial q <= 0; + always @( posedge clk ) + if ( pre ) q <= 1'b1; + else q <= d; +endmodule + +module my_dffs_clk_n( input d, clk, clr, output reg q ); + initial q <= 0; + always @( negedge clk ) + if ( !clr ) q <= 1'b0; + else q <= d; +endmodule + diff --git a/ql-qlf-plugin/tests/fsm/fsm.tcl b/ql-qlf-plugin/tests/fsm/fsm.tcl new file mode 100644 index 000000000..d6d72e23d --- /dev/null +++ b/ql-qlf-plugin/tests/fsm/fsm.tcl @@ -0,0 +1,30 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +hierarchy -top fsm +yosys proc +flatten + +equiv_opt -run :prove -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +async2sync +miter -equiv -make_assert -flatten gold gate miter +sat -verify -prove-asserts -show-public -set-at 1 in_reset 1 -seq 20 -prove-skip 1 miter + +design -load postopt +yosys cd fsm + +select -assert-count 1 t:LUT2 +select -assert-count 9 t:LUT3 +select -assert-count 4 t:dffepc +select -assert-count 1 t:logic_0 +select -assert-count 1 t:logic_1 +select -assert-count 3 t:inpad +select -assert-count 2 t:outpad +select -assert-count 1 t:ckpad + +select -assert-none t:LUT2 t:LUT3 t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad %% t:* %D + diff --git a/ql-qlf-plugin/tests/fsm/fsm.v b/ql-qlf-plugin/tests/fsm/fsm.v new file mode 100644 index 000000000..cf1c21a58 --- /dev/null +++ b/ql-qlf-plugin/tests/fsm/fsm.v @@ -0,0 +1,51 @@ + module fsm ( clock, reset, req_0, req_1, gnt_0, gnt_1 ); + input clock,reset,req_0,req_1; + output gnt_0,gnt_1; + wire clock,reset,req_0,req_1; + reg gnt_0,gnt_1; + + parameter SIZE = 3; + parameter IDLE = 3'b001; + parameter GNT0 = 3'b010; + parameter GNT1 = 3'b100; + parameter GNT2 = 3'b101; + + reg [SIZE-1:0] state; + reg [SIZE-1:0] next_state; + + always @ (posedge clock) + begin : FSM + if (reset == 1'b1) begin + state <= #1 IDLE; + gnt_0 <= 0; + gnt_1 <= 0; + end + else + case(state) + IDLE : if (req_0 == 1'b1) begin + state <= #1 GNT0; + gnt_0 <= 1; + end else if (req_1 == 1'b1) begin + gnt_1 <= 1; + state <= #1 GNT0; + end else begin + state <= #1 IDLE; + end + GNT0 : if (req_0 == 1'b1) begin + state <= #1 GNT0; + end else begin + gnt_0 <= 0; + state <= #1 IDLE; + end + GNT1 : if (req_1 == 1'b1) begin + state <= #1 GNT2; + gnt_1 <= req_0; + end + GNT2 : if (req_0 == 1'b1) begin + state <= #1 GNT1; + gnt_1 <= req_1; + end + default : state <= #1 IDLE; + endcase + end +endmodule diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index fbcd3ca9c..309308679 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -32,3 +32,41 @@ design -reset #hierarchy -check -top subtractor #yosys proc #equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 + +design -reset + +# Equivalence check for adder synthesis for pp3 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top full_adder +yosys proc +equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +design -load postopt +yosys cd full_adder + +stat +select -assert-count 2 t:LUT2 +select -assert-count 6 t:LUT3 +select -assert-count 8 t:inpad +select -assert-count 5 t:outpad + +select -assert-none t:LUT2 t:LUT3 t:inpad t:outpad %% t:* %D + + +design -reset + +# Equivalence check for subtractor synthesis for pp3 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top subtractor +yosys proc +equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +design -load postopt +yosys cd subtractor + +stat +select -assert-count 2 t:LUT2 +select -assert-count 6 t:LUT3 +select -assert-count 8 t:inpad +select -assert-count 5 t:outpad + +select -assert-none t:LUT2 t:LUT3 t:inpad t:outpad %% t:* %D + diff --git a/ql-qlf-plugin/tests/latches/latches.tcl b/ql-qlf-plugin/tests/latches/latches.tcl index d5821a628..864876ccb 100644 --- a/ql-qlf-plugin/tests/latches/latches.tcl +++ b/ql-qlf-plugin/tests/latches/latches.tcl @@ -45,3 +45,45 @@ select -assert-count 1 t:latchsre #stat #select -assert-count 1 t:\$_DLATCH_P_ +# Latches for PP3 + +# LATCHP +design -load read +hierarchy -top latchp_noinit +yosys proc +# Can't run any sort of equivalence check because latches are blown to LUTs +synth_quicklogic -family pp3 -top latchp_noinit +yosys cd latchp_noinit +select -assert-count 1 t:LUT3 +select -assert-count 3 t:inpad +select -assert-count 1 t:outpad + +select -assert-none t:LUT3 t:inpad t:outpad %% t:* %D + +# LATCHN +design -load read +hierarchy -top latchn +yosys proc +# Can't run any sort of equivalence check because latches are blown to LUTs +synth_quicklogic -family pp3 -top latchn +yosys cd latchn +select -assert-count 1 t:LUT3 +select -assert-count 3 t:inpad +select -assert-count 1 t:outpad + +select -assert-none t:LUT3 t:inpad t:outpad %% t:* %D + +# LATCHSRE +design -load read +hierarchy -top my_latchsre +yosys proc +# Can't run any sort of equivalence check because latches are blown to LUTs +synth_quicklogic -family pp3 -top my_latchsre +yosys cd my_latchsre +select -assert-count 1 t:LUT2 +select -assert-count 1 t:LUT4 +select -assert-count 5 t:inpad +select -assert-count 1 t:outpad + +select -assert-none t:LUT2 t:LUT4 t:inpad t:outpad %% t:* %D + diff --git a/ql-qlf-plugin/tests/logic/logic.tcl b/ql-qlf-plugin/tests/logic/logic.tcl index 8017272f4..6bfb7cbb9 100644 --- a/ql-qlf-plugin/tests/logic/logic.tcl +++ b/ql-qlf-plugin/tests/logic/logic.tcl @@ -25,3 +25,22 @@ yosys cd top stat select -assert-count 9 t:\$lut + +design -reset + +#Logic test for pp3 device +read_verilog $::env(DESIGN_TOP).v +hierarchy -top top +yosys proc +equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +design -load postopt +yosys cd top + +stat +select -assert-count 1 t:LUT1 +select -assert-count 6 t:LUT2 +select -assert-count 2 t:LUT3 +select -assert-count 8 t:inpad +select -assert-count 10 t:outpad + +select -assert-none t:LUT1 t:LUT2 t:LUT3 t:inpad t:outpad %% t:* %D diff --git a/ql-qlf-plugin/tests/mux/mux.tcl b/ql-qlf-plugin/tests/mux/mux.tcl new file mode 100644 index 000000000..260e2422b --- /dev/null +++ b/ql-qlf-plugin/tests/mux/mux.tcl @@ -0,0 +1,56 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +hierarchy -top mux2 +yosys proc +equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +design -load postopt +yosys cd mux2 +select -assert-count 1 t:LUT3 +select -assert-count 3 t:inpad +select -assert-count 1 t:outpad + +select -assert-none t:LUT3 t:inpad t:outpad %% t:* %D + +design -load read +hierarchy -top mux4 +yosys proc +equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +design -load postopt +yosys cd mux4 +select -assert-count 3 t:LUT3 +select -assert-count 6 t:inpad +select -assert-count 1 t:outpad + +select -assert-none t:LUT3 t:inpad t:outpad %% t:* %D + +design -load read +hierarchy -top mux8 +yosys proc +equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +design -load postopt +yosys cd mux8 +select -assert-count 1 t:LUT1 +select -assert-count 1 t:LUT3 +select -assert-count 2 t:mux4x0 +select -assert-count 11 t:inpad +select -assert-count 1 t:outpad + +select -assert-none t:LUT1 t:LUT3 t:mux4x0 t:inpad t:outpad %% t:* %D + +design -load read +hierarchy -top mux16 +yosys proc +equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +design -load postopt +yosys cd mux16 +select -assert-count 1 t:LUT3 +select -assert-count 2 t:mux8x0 +select -assert-count 20 t:inpad +select -assert-count 1 t:outpad + +select -assert-none t:LUT3 t:mux8x0 t:inpad t:outpad %% t:* %D diff --git a/ql-qlf-plugin/tests/mux/mux.v b/ql-qlf-plugin/tests/mux/mux.v new file mode 100644 index 000000000..d7698fc04 --- /dev/null +++ b/ql-qlf-plugin/tests/mux/mux.v @@ -0,0 +1,61 @@ +module mux2 (S,A,B,Y); + input S; + input A,B; + output reg Y; + + always @(*) + Y = (S)? B : A; +endmodule + +module mux4 ( S, D, Y ); + input[1:0] S; + input[3:0] D; + output Y; + + reg Y; + wire[1:0] S; + wire[3:0] D; + + always @* + begin + case( S ) + 0 : Y = D[0]; + 1 : Y = D[1]; + 2 : Y = D[2]; + 3 : Y = D[3]; + endcase + end +endmodule + +module mux8 ( S, D, Y ); + input[2:0] S; + input[7:0] D; + output Y; + + reg Y; + wire[2:0] S; + wire[7:0] D; + + always @* + begin + case( S ) + 0 : Y = D[0]; + 1 : Y = D[1]; + 2 : Y = D[2]; + 3 : Y = D[3]; + 4 : Y = D[4]; + 5 : Y = D[5]; + 6 : Y = D[6]; + 7 : Y = D[7]; + endcase + end +endmodule + +module mux16 (D, S, Y); + input [15:0] D; + input [3:0] S; + output Y; + + assign Y = D[S]; +endmodule + diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.tcl b/ql-qlf-plugin/tests/tribuf/tribuf.tcl new file mode 100644 index 000000000..067e7fd55 --- /dev/null +++ b/ql-qlf-plugin/tests/tribuf/tribuf.tcl @@ -0,0 +1,19 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v + +hierarchy -top tristate +yosys proc +tribuf +flatten +synth +equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v -map +/simcells.v synth_quicklogic -family pp3 +design -load postopt +yosys cd tristate +select -assert-count 2 t:inpad +select -assert-count 1 t:outpad +select -assert-count 1 t:\$_TBUF_ +select -assert-none t:inpad t:outpad t:\$_TBUF_ %% t:* %D + diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.v b/ql-qlf-plugin/tests/tribuf/tribuf.v new file mode 100644 index 000000000..e4b6f8178 --- /dev/null +++ b/ql-qlf-plugin/tests/tribuf/tribuf.v @@ -0,0 +1,9 @@ +module tristate(en, i, o); + input en; + input i; + output reg o; + + always @(en or i) + o <= (en)? i : 1'bZ; +endmodule + From 414237576408a65461ea7ae0e45f0afd58adb63d Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 18 Jun 2021 16:20:37 +0200 Subject: [PATCH 343/845] Added extended ABC options for PP3 Signed-off-by: Maciej Kurc --- ql-qlf-plugin/pp3/pp3_lutdefs.txt | 4 ++++ ql-qlf-plugin/synth_quicklogic.cc | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 ql-qlf-plugin/pp3/pp3_lutdefs.txt diff --git a/ql-qlf-plugin/pp3/pp3_lutdefs.txt b/ql-qlf-plugin/pp3/pp3_lutdefs.txt new file mode 100644 index 000000000..747f2a755 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_lutdefs.txt @@ -0,0 +1,4 @@ +1 1.00 1.00 +2 2.00 1.00 +3 2.00 1.00 +4 8.00 1.00 diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index db82618b2..8d1dce1d4 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -100,7 +100,7 @@ struct SynthQuickLogicPass : public ScriptPass { inferAdder = true; inferBram = true; abcOpt = true; - abc9 = true; + abc9 = true; noffmap = false; nodsp = false; } @@ -315,7 +315,15 @@ struct SynthQuickLogicPass : public ScriptPass { run("abc9 -maxlut 4 -dff"); run("techmap -map +/quicklogic/" + family + "_abc9_unmap.v"); } else { - run("abc -luts 1,2,2,4 -dress"); + std::string lutDefs = "+/quicklogic/" + family + "_lutdefs.txt"; + rewrite_filename(lutDefs); + + std::string abcArgs = "+read_lut," + lutDefs + ";" + "strash;ifraig;scorr;dc2;dretime;strash;dch,-f;if;mfs2;" // Common Yosys ABC script + "sweep;eliminate;if;mfs;lutpack;" // Optimization script + "dress"; // "dress" to preserve names + + run("abc -script " + abcArgs); } } } From dcdc1111af9c1710a6abb1cdfa5c0c3f20e2cd96 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 18 Jun 2021 16:42:33 +0200 Subject: [PATCH 344/845] Added PP3 BRAM inference and initialization support Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 12 +- ql-qlf-plugin/pp3/pp3_bram_init_32.vh | 512 +++++++++ ql-qlf-plugin/pp3/pp3_bram_init_8_16.vh | 512 +++++++++ ql-qlf-plugin/pp3/pp3_brams.txt | 54 + ql-qlf-plugin/pp3/pp3_brams_map.v | 1253 +++++++++++++++++++++++ ql-qlf-plugin/pp3_braminit.cc | 161 +++ ql-qlf-plugin/synth_quicklogic.cc | 5 +- 7 files changed, 2505 insertions(+), 4 deletions(-) create mode 100644 ql-qlf-plugin/pp3/pp3_bram_init_32.vh create mode 100644 ql-qlf-plugin/pp3/pp3_bram_init_8_16.vh create mode 100644 ql-qlf-plugin/pp3/pp3_brams.txt create mode 100644 ql-qlf-plugin/pp3/pp3_brams_map.v create mode 100644 ql-qlf-plugin/pp3_braminit.cc diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index e1f3c84cb..a03bd715d 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -8,7 +8,8 @@ NAME = ql-qlf SOURCES = synth_quicklogic.cc \ - ql-dsp.cc + ql-dsp.cc \ + pp3_braminit.cc include ../Makefile_plugin.common COMMON = common @@ -33,9 +34,14 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(PP3_DIR)/pp3_cells_sim.v \ $(PP3_DIR)/pp3_ffs_map.v \ $(PP3_DIR)/pp3_latches_map.v \ - $(PP3_DIR)/pp3_lut_map.v + $(PP3_DIR)/pp3_lut_map.v \ + $(PP3_DIR)/pp3_lutdefs.txt \ + $(PP3_DIR)/pp3_brams_map.v \ + $(PP3_DIR)/pp3_brams.txt \ + $(PP3_DIR)/pp3_bram_init_8_16.vh \ + $(PP3_DIR)/pp3_bram_init_32.vh -retrieve-pmgen:=$(shell mkdir pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) +retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg) diff --git a/ql-qlf-plugin/pp3/pp3_bram_init_32.vh b/ql-qlf-plugin/pp3/pp3_bram_init_32.vh new file mode 100644 index 000000000..dafaf2555 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_bram_init_32.vh @@ -0,0 +1,512 @@ +.INIT({1'b0, INIT[2047*8 +: 8], 1'b0, INIT[2046*8 +: 8], 1'b0, INIT[2043*8 +: 8], 1'b0, INIT[2042*8 +: 8], + 1'b0, INIT[2039*8 +: 8], 1'b0, INIT[2038*8 +: 8], 1'b0, INIT[2035*8 +: 8], 1'b0, INIT[2034*8 +: 8], + 1'b0, INIT[2031*8 +: 8], 1'b0, INIT[2030*8 +: 8], 1'b0, INIT[2027*8 +: 8], 1'b0, INIT[2026*8 +: 8], + 1'b0, INIT[2023*8 +: 8], 1'b0, INIT[2022*8 +: 8], 1'b0, INIT[2019*8 +: 8], 1'b0, INIT[2018*8 +: 8], + 1'b0, INIT[2015*8 +: 8], 1'b0, INIT[2014*8 +: 8], 1'b0, INIT[2011*8 +: 8], 1'b0, INIT[2010*8 +: 8], + 1'b0, INIT[2007*8 +: 8], 1'b0, INIT[2006*8 +: 8], 1'b0, INIT[2003*8 +: 8], 1'b0, INIT[2002*8 +: 8], + 1'b0, INIT[1999*8 +: 8], 1'b0, INIT[1998*8 +: 8], 1'b0, INIT[1995*8 +: 8], 1'b0, INIT[1994*8 +: 8], + 1'b0, INIT[1991*8 +: 8], 1'b0, INIT[1990*8 +: 8], 1'b0, INIT[1987*8 +: 8], 1'b0, INIT[1986*8 +: 8], + 1'b0, INIT[1983*8 +: 8], 1'b0, INIT[1982*8 +: 8], 1'b0, INIT[1979*8 +: 8], 1'b0, INIT[1978*8 +: 8], + 1'b0, INIT[1975*8 +: 8], 1'b0, INIT[1974*8 +: 8], 1'b0, INIT[1971*8 +: 8], 1'b0, INIT[1970*8 +: 8], + 1'b0, INIT[1967*8 +: 8], 1'b0, INIT[1966*8 +: 8], 1'b0, INIT[1963*8 +: 8], 1'b0, INIT[1962*8 +: 8], + 1'b0, INIT[1959*8 +: 8], 1'b0, INIT[1958*8 +: 8], 1'b0, INIT[1955*8 +: 8], 1'b0, INIT[1954*8 +: 8], + 1'b0, INIT[1951*8 +: 8], 1'b0, INIT[1950*8 +: 8], 1'b0, INIT[1947*8 +: 8], 1'b0, INIT[1946*8 +: 8], + 1'b0, INIT[1943*8 +: 8], 1'b0, INIT[1942*8 +: 8], 1'b0, INIT[1939*8 +: 8], 1'b0, INIT[1938*8 +: 8], + 1'b0, INIT[1935*8 +: 8], 1'b0, INIT[1934*8 +: 8], 1'b0, INIT[1931*8 +: 8], 1'b0, INIT[1930*8 +: 8], + 1'b0, INIT[1927*8 +: 8], 1'b0, INIT[1926*8 +: 8], 1'b0, INIT[1923*8 +: 8], 1'b0, INIT[1922*8 +: 8], + 1'b0, INIT[1919*8 +: 8], 1'b0, INIT[1918*8 +: 8], 1'b0, INIT[1915*8 +: 8], 1'b0, INIT[1914*8 +: 8], + 1'b0, INIT[1911*8 +: 8], 1'b0, INIT[1910*8 +: 8], 1'b0, INIT[1907*8 +: 8], 1'b0, INIT[1906*8 +: 8], + 1'b0, INIT[1903*8 +: 8], 1'b0, INIT[1902*8 +: 8], 1'b0, INIT[1899*8 +: 8], 1'b0, INIT[1898*8 +: 8], + 1'b0, INIT[1895*8 +: 8], 1'b0, INIT[1894*8 +: 8], 1'b0, INIT[1891*8 +: 8], 1'b0, INIT[1890*8 +: 8], + 1'b0, INIT[1887*8 +: 8], 1'b0, INIT[1886*8 +: 8], 1'b0, INIT[1883*8 +: 8], 1'b0, INIT[1882*8 +: 8], + 1'b0, INIT[1879*8 +: 8], 1'b0, INIT[1878*8 +: 8], 1'b0, INIT[1875*8 +: 8], 1'b0, INIT[1874*8 +: 8], + 1'b0, INIT[1871*8 +: 8], 1'b0, INIT[1870*8 +: 8], 1'b0, INIT[1867*8 +: 8], 1'b0, INIT[1866*8 +: 8], + 1'b0, INIT[1863*8 +: 8], 1'b0, INIT[1862*8 +: 8], 1'b0, INIT[1859*8 +: 8], 1'b0, INIT[1858*8 +: 8], + 1'b0, INIT[1855*8 +: 8], 1'b0, INIT[1854*8 +: 8], 1'b0, INIT[1851*8 +: 8], 1'b0, INIT[1850*8 +: 8], + 1'b0, INIT[1847*8 +: 8], 1'b0, INIT[1846*8 +: 8], 1'b0, INIT[1843*8 +: 8], 1'b0, INIT[1842*8 +: 8], + 1'b0, INIT[1839*8 +: 8], 1'b0, INIT[1838*8 +: 8], 1'b0, INIT[1835*8 +: 8], 1'b0, INIT[1834*8 +: 8], + 1'b0, INIT[1831*8 +: 8], 1'b0, INIT[1830*8 +: 8], 1'b0, INIT[1827*8 +: 8], 1'b0, INIT[1826*8 +: 8], + 1'b0, INIT[1823*8 +: 8], 1'b0, INIT[1822*8 +: 8], 1'b0, INIT[1819*8 +: 8], 1'b0, INIT[1818*8 +: 8], + 1'b0, INIT[1815*8 +: 8], 1'b0, INIT[1814*8 +: 8], 1'b0, INIT[1811*8 +: 8], 1'b0, INIT[1810*8 +: 8], + 1'b0, INIT[1807*8 +: 8], 1'b0, INIT[1806*8 +: 8], 1'b0, INIT[1803*8 +: 8], 1'b0, INIT[1802*8 +: 8], + 1'b0, INIT[1799*8 +: 8], 1'b0, INIT[1798*8 +: 8], 1'b0, INIT[1795*8 +: 8], 1'b0, INIT[1794*8 +: 8], + 1'b0, INIT[1791*8 +: 8], 1'b0, INIT[1790*8 +: 8], 1'b0, INIT[1787*8 +: 8], 1'b0, INIT[1786*8 +: 8], + 1'b0, INIT[1783*8 +: 8], 1'b0, INIT[1782*8 +: 8], 1'b0, INIT[1779*8 +: 8], 1'b0, INIT[1778*8 +: 8], + 1'b0, INIT[1775*8 +: 8], 1'b0, INIT[1774*8 +: 8], 1'b0, INIT[1771*8 +: 8], 1'b0, INIT[1770*8 +: 8], + 1'b0, INIT[1767*8 +: 8], 1'b0, INIT[1766*8 +: 8], 1'b0, INIT[1763*8 +: 8], 1'b0, INIT[1762*8 +: 8], + 1'b0, INIT[1759*8 +: 8], 1'b0, INIT[1758*8 +: 8], 1'b0, INIT[1755*8 +: 8], 1'b0, INIT[1754*8 +: 8], + 1'b0, INIT[1751*8 +: 8], 1'b0, INIT[1750*8 +: 8], 1'b0, INIT[1747*8 +: 8], 1'b0, INIT[1746*8 +: 8], + 1'b0, INIT[1743*8 +: 8], 1'b0, INIT[1742*8 +: 8], 1'b0, INIT[1739*8 +: 8], 1'b0, INIT[1738*8 +: 8], + 1'b0, INIT[1735*8 +: 8], 1'b0, INIT[1734*8 +: 8], 1'b0, INIT[1731*8 +: 8], 1'b0, INIT[1730*8 +: 8], + 1'b0, INIT[1727*8 +: 8], 1'b0, INIT[1726*8 +: 8], 1'b0, INIT[1723*8 +: 8], 1'b0, INIT[1722*8 +: 8], + 1'b0, INIT[1719*8 +: 8], 1'b0, INIT[1718*8 +: 8], 1'b0, INIT[1715*8 +: 8], 1'b0, INIT[1714*8 +: 8], + 1'b0, INIT[1711*8 +: 8], 1'b0, INIT[1710*8 +: 8], 1'b0, INIT[1707*8 +: 8], 1'b0, INIT[1706*8 +: 8], + 1'b0, INIT[1703*8 +: 8], 1'b0, INIT[1702*8 +: 8], 1'b0, INIT[1699*8 +: 8], 1'b0, INIT[1698*8 +: 8], + 1'b0, INIT[1695*8 +: 8], 1'b0, INIT[1694*8 +: 8], 1'b0, INIT[1691*8 +: 8], 1'b0, INIT[1690*8 +: 8], + 1'b0, INIT[1687*8 +: 8], 1'b0, INIT[1686*8 +: 8], 1'b0, INIT[1683*8 +: 8], 1'b0, INIT[1682*8 +: 8], + 1'b0, INIT[1679*8 +: 8], 1'b0, INIT[1678*8 +: 8], 1'b0, INIT[1675*8 +: 8], 1'b0, INIT[1674*8 +: 8], + 1'b0, INIT[1671*8 +: 8], 1'b0, INIT[1670*8 +: 8], 1'b0, INIT[1667*8 +: 8], 1'b0, INIT[1666*8 +: 8], + 1'b0, INIT[1663*8 +: 8], 1'b0, INIT[1662*8 +: 8], 1'b0, INIT[1659*8 +: 8], 1'b0, INIT[1658*8 +: 8], + 1'b0, INIT[1655*8 +: 8], 1'b0, INIT[1654*8 +: 8], 1'b0, INIT[1651*8 +: 8], 1'b0, INIT[1650*8 +: 8], + 1'b0, INIT[1647*8 +: 8], 1'b0, INIT[1646*8 +: 8], 1'b0, INIT[1643*8 +: 8], 1'b0, INIT[1642*8 +: 8], + 1'b0, INIT[1639*8 +: 8], 1'b0, INIT[1638*8 +: 8], 1'b0, INIT[1635*8 +: 8], 1'b0, INIT[1634*8 +: 8], + 1'b0, INIT[1631*8 +: 8], 1'b0, INIT[1630*8 +: 8], 1'b0, INIT[1627*8 +: 8], 1'b0, INIT[1626*8 +: 8], + 1'b0, INIT[1623*8 +: 8], 1'b0, INIT[1622*8 +: 8], 1'b0, INIT[1619*8 +: 8], 1'b0, INIT[1618*8 +: 8], + 1'b0, INIT[1615*8 +: 8], 1'b0, INIT[1614*8 +: 8], 1'b0, INIT[1611*8 +: 8], 1'b0, INIT[1610*8 +: 8], + 1'b0, INIT[1607*8 +: 8], 1'b0, INIT[1606*8 +: 8], 1'b0, INIT[1603*8 +: 8], 1'b0, INIT[1602*8 +: 8], + 1'b0, INIT[1599*8 +: 8], 1'b0, INIT[1598*8 +: 8], 1'b0, INIT[1595*8 +: 8], 1'b0, INIT[1594*8 +: 8], + 1'b0, INIT[1591*8 +: 8], 1'b0, INIT[1590*8 +: 8], 1'b0, INIT[1587*8 +: 8], 1'b0, INIT[1586*8 +: 8], + 1'b0, INIT[1583*8 +: 8], 1'b0, INIT[1582*8 +: 8], 1'b0, INIT[1579*8 +: 8], 1'b0, INIT[1578*8 +: 8], + 1'b0, INIT[1575*8 +: 8], 1'b0, INIT[1574*8 +: 8], 1'b0, INIT[1571*8 +: 8], 1'b0, INIT[1570*8 +: 8], + 1'b0, INIT[1567*8 +: 8], 1'b0, INIT[1566*8 +: 8], 1'b0, INIT[1563*8 +: 8], 1'b0, INIT[1562*8 +: 8], + 1'b0, INIT[1559*8 +: 8], 1'b0, INIT[1558*8 +: 8], 1'b0, INIT[1555*8 +: 8], 1'b0, INIT[1554*8 +: 8], + 1'b0, INIT[1551*8 +: 8], 1'b0, INIT[1550*8 +: 8], 1'b0, INIT[1547*8 +: 8], 1'b0, INIT[1546*8 +: 8], + 1'b0, INIT[1543*8 +: 8], 1'b0, INIT[1542*8 +: 8], 1'b0, INIT[1539*8 +: 8], 1'b0, INIT[1538*8 +: 8], + 1'b0, INIT[1535*8 +: 8], 1'b0, INIT[1534*8 +: 8], 1'b0, INIT[1531*8 +: 8], 1'b0, INIT[1530*8 +: 8], + 1'b0, INIT[1527*8 +: 8], 1'b0, INIT[1526*8 +: 8], 1'b0, INIT[1523*8 +: 8], 1'b0, INIT[1522*8 +: 8], + 1'b0, INIT[1519*8 +: 8], 1'b0, INIT[1518*8 +: 8], 1'b0, INIT[1515*8 +: 8], 1'b0, INIT[1514*8 +: 8], + 1'b0, INIT[1511*8 +: 8], 1'b0, INIT[1510*8 +: 8], 1'b0, INIT[1507*8 +: 8], 1'b0, INIT[1506*8 +: 8], + 1'b0, INIT[1503*8 +: 8], 1'b0, INIT[1502*8 +: 8], 1'b0, INIT[1499*8 +: 8], 1'b0, INIT[1498*8 +: 8], + 1'b0, INIT[1495*8 +: 8], 1'b0, INIT[1494*8 +: 8], 1'b0, INIT[1491*8 +: 8], 1'b0, INIT[1490*8 +: 8], + 1'b0, INIT[1487*8 +: 8], 1'b0, INIT[1486*8 +: 8], 1'b0, INIT[1483*8 +: 8], 1'b0, INIT[1482*8 +: 8], + 1'b0, INIT[1479*8 +: 8], 1'b0, INIT[1478*8 +: 8], 1'b0, INIT[1475*8 +: 8], 1'b0, INIT[1474*8 +: 8], + 1'b0, INIT[1471*8 +: 8], 1'b0, INIT[1470*8 +: 8], 1'b0, INIT[1467*8 +: 8], 1'b0, INIT[1466*8 +: 8], + 1'b0, INIT[1463*8 +: 8], 1'b0, INIT[1462*8 +: 8], 1'b0, INIT[1459*8 +: 8], 1'b0, INIT[1458*8 +: 8], + 1'b0, INIT[1455*8 +: 8], 1'b0, INIT[1454*8 +: 8], 1'b0, INIT[1451*8 +: 8], 1'b0, INIT[1450*8 +: 8], + 1'b0, INIT[1447*8 +: 8], 1'b0, INIT[1446*8 +: 8], 1'b0, INIT[1443*8 +: 8], 1'b0, INIT[1442*8 +: 8], + 1'b0, INIT[1439*8 +: 8], 1'b0, INIT[1438*8 +: 8], 1'b0, INIT[1435*8 +: 8], 1'b0, INIT[1434*8 +: 8], + 1'b0, INIT[1431*8 +: 8], 1'b0, INIT[1430*8 +: 8], 1'b0, INIT[1427*8 +: 8], 1'b0, INIT[1426*8 +: 8], + 1'b0, INIT[1423*8 +: 8], 1'b0, INIT[1422*8 +: 8], 1'b0, INIT[1419*8 +: 8], 1'b0, INIT[1418*8 +: 8], + 1'b0, INIT[1415*8 +: 8], 1'b0, INIT[1414*8 +: 8], 1'b0, INIT[1411*8 +: 8], 1'b0, INIT[1410*8 +: 8], + 1'b0, INIT[1407*8 +: 8], 1'b0, INIT[1406*8 +: 8], 1'b0, INIT[1403*8 +: 8], 1'b0, INIT[1402*8 +: 8], + 1'b0, INIT[1399*8 +: 8], 1'b0, INIT[1398*8 +: 8], 1'b0, INIT[1395*8 +: 8], 1'b0, INIT[1394*8 +: 8], + 1'b0, INIT[1391*8 +: 8], 1'b0, INIT[1390*8 +: 8], 1'b0, INIT[1387*8 +: 8], 1'b0, INIT[1386*8 +: 8], + 1'b0, INIT[1383*8 +: 8], 1'b0, INIT[1382*8 +: 8], 1'b0, INIT[1379*8 +: 8], 1'b0, INIT[1378*8 +: 8], + 1'b0, INIT[1375*8 +: 8], 1'b0, INIT[1374*8 +: 8], 1'b0, INIT[1371*8 +: 8], 1'b0, INIT[1370*8 +: 8], + 1'b0, INIT[1367*8 +: 8], 1'b0, INIT[1366*8 +: 8], 1'b0, INIT[1363*8 +: 8], 1'b0, INIT[1362*8 +: 8], + 1'b0, INIT[1359*8 +: 8], 1'b0, INIT[1358*8 +: 8], 1'b0, INIT[1355*8 +: 8], 1'b0, INIT[1354*8 +: 8], + 1'b0, INIT[1351*8 +: 8], 1'b0, INIT[1350*8 +: 8], 1'b0, INIT[1347*8 +: 8], 1'b0, INIT[1346*8 +: 8], + 1'b0, INIT[1343*8 +: 8], 1'b0, INIT[1342*8 +: 8], 1'b0, INIT[1339*8 +: 8], 1'b0, INIT[1338*8 +: 8], + 1'b0, INIT[1335*8 +: 8], 1'b0, INIT[1334*8 +: 8], 1'b0, INIT[1331*8 +: 8], 1'b0, INIT[1330*8 +: 8], + 1'b0, INIT[1327*8 +: 8], 1'b0, INIT[1326*8 +: 8], 1'b0, INIT[1323*8 +: 8], 1'b0, INIT[1322*8 +: 8], + 1'b0, INIT[1319*8 +: 8], 1'b0, INIT[1318*8 +: 8], 1'b0, INIT[1315*8 +: 8], 1'b0, INIT[1314*8 +: 8], + 1'b0, INIT[1311*8 +: 8], 1'b0, INIT[1310*8 +: 8], 1'b0, INIT[1307*8 +: 8], 1'b0, INIT[1306*8 +: 8], + 1'b0, INIT[1303*8 +: 8], 1'b0, INIT[1302*8 +: 8], 1'b0, INIT[1299*8 +: 8], 1'b0, INIT[1298*8 +: 8], + 1'b0, INIT[1295*8 +: 8], 1'b0, INIT[1294*8 +: 8], 1'b0, INIT[1291*8 +: 8], 1'b0, INIT[1290*8 +: 8], + 1'b0, INIT[1287*8 +: 8], 1'b0, INIT[1286*8 +: 8], 1'b0, INIT[1283*8 +: 8], 1'b0, INIT[1282*8 +: 8], + 1'b0, INIT[1279*8 +: 8], 1'b0, INIT[1278*8 +: 8], 1'b0, INIT[1275*8 +: 8], 1'b0, INIT[1274*8 +: 8], + 1'b0, INIT[1271*8 +: 8], 1'b0, INIT[1270*8 +: 8], 1'b0, INIT[1267*8 +: 8], 1'b0, INIT[1266*8 +: 8], + 1'b0, INIT[1263*8 +: 8], 1'b0, INIT[1262*8 +: 8], 1'b0, INIT[1259*8 +: 8], 1'b0, INIT[1258*8 +: 8], + 1'b0, INIT[1255*8 +: 8], 1'b0, INIT[1254*8 +: 8], 1'b0, INIT[1251*8 +: 8], 1'b0, INIT[1250*8 +: 8], + 1'b0, INIT[1247*8 +: 8], 1'b0, INIT[1246*8 +: 8], 1'b0, INIT[1243*8 +: 8], 1'b0, INIT[1242*8 +: 8], + 1'b0, INIT[1239*8 +: 8], 1'b0, INIT[1238*8 +: 8], 1'b0, INIT[1235*8 +: 8], 1'b0, INIT[1234*8 +: 8], + 1'b0, INIT[1231*8 +: 8], 1'b0, INIT[1230*8 +: 8], 1'b0, INIT[1227*8 +: 8], 1'b0, INIT[1226*8 +: 8], + 1'b0, INIT[1223*8 +: 8], 1'b0, INIT[1222*8 +: 8], 1'b0, INIT[1219*8 +: 8], 1'b0, INIT[1218*8 +: 8], + 1'b0, INIT[1215*8 +: 8], 1'b0, INIT[1214*8 +: 8], 1'b0, INIT[1211*8 +: 8], 1'b0, INIT[1210*8 +: 8], + 1'b0, INIT[1207*8 +: 8], 1'b0, INIT[1206*8 +: 8], 1'b0, INIT[1203*8 +: 8], 1'b0, INIT[1202*8 +: 8], + 1'b0, INIT[1199*8 +: 8], 1'b0, INIT[1198*8 +: 8], 1'b0, INIT[1195*8 +: 8], 1'b0, INIT[1194*8 +: 8], + 1'b0, INIT[1191*8 +: 8], 1'b0, INIT[1190*8 +: 8], 1'b0, INIT[1187*8 +: 8], 1'b0, INIT[1186*8 +: 8], + 1'b0, INIT[1183*8 +: 8], 1'b0, INIT[1182*8 +: 8], 1'b0, INIT[1179*8 +: 8], 1'b0, INIT[1178*8 +: 8], + 1'b0, INIT[1175*8 +: 8], 1'b0, INIT[1174*8 +: 8], 1'b0, INIT[1171*8 +: 8], 1'b0, INIT[1170*8 +: 8], + 1'b0, INIT[1167*8 +: 8], 1'b0, INIT[1166*8 +: 8], 1'b0, INIT[1163*8 +: 8], 1'b0, INIT[1162*8 +: 8], + 1'b0, INIT[1159*8 +: 8], 1'b0, INIT[1158*8 +: 8], 1'b0, INIT[1155*8 +: 8], 1'b0, INIT[1154*8 +: 8], + 1'b0, INIT[1151*8 +: 8], 1'b0, INIT[1150*8 +: 8], 1'b0, INIT[1147*8 +: 8], 1'b0, INIT[1146*8 +: 8], + 1'b0, INIT[1143*8 +: 8], 1'b0, INIT[1142*8 +: 8], 1'b0, INIT[1139*8 +: 8], 1'b0, INIT[1138*8 +: 8], + 1'b0, INIT[1135*8 +: 8], 1'b0, INIT[1134*8 +: 8], 1'b0, INIT[1131*8 +: 8], 1'b0, INIT[1130*8 +: 8], + 1'b0, INIT[1127*8 +: 8], 1'b0, INIT[1126*8 +: 8], 1'b0, INIT[1123*8 +: 8], 1'b0, INIT[1122*8 +: 8], + 1'b0, INIT[1119*8 +: 8], 1'b0, INIT[1118*8 +: 8], 1'b0, INIT[1115*8 +: 8], 1'b0, INIT[1114*8 +: 8], + 1'b0, INIT[1111*8 +: 8], 1'b0, INIT[1110*8 +: 8], 1'b0, INIT[1107*8 +: 8], 1'b0, INIT[1106*8 +: 8], + 1'b0, INIT[1103*8 +: 8], 1'b0, INIT[1102*8 +: 8], 1'b0, INIT[1099*8 +: 8], 1'b0, INIT[1098*8 +: 8], + 1'b0, INIT[1095*8 +: 8], 1'b0, INIT[1094*8 +: 8], 1'b0, INIT[1091*8 +: 8], 1'b0, INIT[1090*8 +: 8], + 1'b0, INIT[1087*8 +: 8], 1'b0, INIT[1086*8 +: 8], 1'b0, INIT[1083*8 +: 8], 1'b0, INIT[1082*8 +: 8], + 1'b0, INIT[1079*8 +: 8], 1'b0, INIT[1078*8 +: 8], 1'b0, INIT[1075*8 +: 8], 1'b0, INIT[1074*8 +: 8], + 1'b0, INIT[1071*8 +: 8], 1'b0, INIT[1070*8 +: 8], 1'b0, INIT[1067*8 +: 8], 1'b0, INIT[1066*8 +: 8], + 1'b0, INIT[1063*8 +: 8], 1'b0, INIT[1062*8 +: 8], 1'b0, INIT[1059*8 +: 8], 1'b0, INIT[1058*8 +: 8], + 1'b0, INIT[1055*8 +: 8], 1'b0, INIT[1054*8 +: 8], 1'b0, INIT[1051*8 +: 8], 1'b0, INIT[1050*8 +: 8], + 1'b0, INIT[1047*8 +: 8], 1'b0, INIT[1046*8 +: 8], 1'b0, INIT[1043*8 +: 8], 1'b0, INIT[1042*8 +: 8], + 1'b0, INIT[1039*8 +: 8], 1'b0, INIT[1038*8 +: 8], 1'b0, INIT[1035*8 +: 8], 1'b0, INIT[1034*8 +: 8], + 1'b0, INIT[1031*8 +: 8], 1'b0, INIT[1030*8 +: 8], 1'b0, INIT[1027*8 +: 8], 1'b0, INIT[1026*8 +: 8], + 1'b0, INIT[1023*8 +: 8], 1'b0, INIT[1022*8 +: 8], 1'b0, INIT[1019*8 +: 8], 1'b0, INIT[1018*8 +: 8], + 1'b0, INIT[1015*8 +: 8], 1'b0, INIT[1014*8 +: 8], 1'b0, INIT[1011*8 +: 8], 1'b0, INIT[1010*8 +: 8], + 1'b0, INIT[1007*8 +: 8], 1'b0, INIT[1006*8 +: 8], 1'b0, INIT[1003*8 +: 8], 1'b0, INIT[1002*8 +: 8], + 1'b0, INIT[ 999*8 +: 8], 1'b0, INIT[ 998*8 +: 8], 1'b0, INIT[ 995*8 +: 8], 1'b0, INIT[ 994*8 +: 8], + 1'b0, INIT[ 991*8 +: 8], 1'b0, INIT[ 990*8 +: 8], 1'b0, INIT[ 987*8 +: 8], 1'b0, INIT[ 986*8 +: 8], + 1'b0, INIT[ 983*8 +: 8], 1'b0, INIT[ 982*8 +: 8], 1'b0, INIT[ 979*8 +: 8], 1'b0, INIT[ 978*8 +: 8], + 1'b0, INIT[ 975*8 +: 8], 1'b0, INIT[ 974*8 +: 8], 1'b0, INIT[ 971*8 +: 8], 1'b0, INIT[ 970*8 +: 8], + 1'b0, INIT[ 967*8 +: 8], 1'b0, INIT[ 966*8 +: 8], 1'b0, INIT[ 963*8 +: 8], 1'b0, INIT[ 962*8 +: 8], + 1'b0, INIT[ 959*8 +: 8], 1'b0, INIT[ 958*8 +: 8], 1'b0, INIT[ 955*8 +: 8], 1'b0, INIT[ 954*8 +: 8], + 1'b0, INIT[ 951*8 +: 8], 1'b0, INIT[ 950*8 +: 8], 1'b0, INIT[ 947*8 +: 8], 1'b0, INIT[ 946*8 +: 8], + 1'b0, INIT[ 943*8 +: 8], 1'b0, INIT[ 942*8 +: 8], 1'b0, INIT[ 939*8 +: 8], 1'b0, INIT[ 938*8 +: 8], + 1'b0, INIT[ 935*8 +: 8], 1'b0, INIT[ 934*8 +: 8], 1'b0, INIT[ 931*8 +: 8], 1'b0, INIT[ 930*8 +: 8], + 1'b0, INIT[ 927*8 +: 8], 1'b0, INIT[ 926*8 +: 8], 1'b0, INIT[ 923*8 +: 8], 1'b0, INIT[ 922*8 +: 8], + 1'b0, INIT[ 919*8 +: 8], 1'b0, INIT[ 918*8 +: 8], 1'b0, INIT[ 915*8 +: 8], 1'b0, INIT[ 914*8 +: 8], + 1'b0, INIT[ 911*8 +: 8], 1'b0, INIT[ 910*8 +: 8], 1'b0, INIT[ 907*8 +: 8], 1'b0, INIT[ 906*8 +: 8], + 1'b0, INIT[ 903*8 +: 8], 1'b0, INIT[ 902*8 +: 8], 1'b0, INIT[ 899*8 +: 8], 1'b0, INIT[ 898*8 +: 8], + 1'b0, INIT[ 895*8 +: 8], 1'b0, INIT[ 894*8 +: 8], 1'b0, INIT[ 891*8 +: 8], 1'b0, INIT[ 890*8 +: 8], + 1'b0, INIT[ 887*8 +: 8], 1'b0, INIT[ 886*8 +: 8], 1'b0, INIT[ 883*8 +: 8], 1'b0, INIT[ 882*8 +: 8], + 1'b0, INIT[ 879*8 +: 8], 1'b0, INIT[ 878*8 +: 8], 1'b0, INIT[ 875*8 +: 8], 1'b0, INIT[ 874*8 +: 8], + 1'b0, INIT[ 871*8 +: 8], 1'b0, INIT[ 870*8 +: 8], 1'b0, INIT[ 867*8 +: 8], 1'b0, INIT[ 866*8 +: 8], + 1'b0, INIT[ 863*8 +: 8], 1'b0, INIT[ 862*8 +: 8], 1'b0, INIT[ 859*8 +: 8], 1'b0, INIT[ 858*8 +: 8], + 1'b0, INIT[ 855*8 +: 8], 1'b0, INIT[ 854*8 +: 8], 1'b0, INIT[ 851*8 +: 8], 1'b0, INIT[ 850*8 +: 8], + 1'b0, INIT[ 847*8 +: 8], 1'b0, INIT[ 846*8 +: 8], 1'b0, INIT[ 843*8 +: 8], 1'b0, INIT[ 842*8 +: 8], + 1'b0, INIT[ 839*8 +: 8], 1'b0, INIT[ 838*8 +: 8], 1'b0, INIT[ 835*8 +: 8], 1'b0, INIT[ 834*8 +: 8], + 1'b0, INIT[ 831*8 +: 8], 1'b0, INIT[ 830*8 +: 8], 1'b0, INIT[ 827*8 +: 8], 1'b0, INIT[ 826*8 +: 8], + 1'b0, INIT[ 823*8 +: 8], 1'b0, INIT[ 822*8 +: 8], 1'b0, INIT[ 819*8 +: 8], 1'b0, INIT[ 818*8 +: 8], + 1'b0, INIT[ 815*8 +: 8], 1'b0, INIT[ 814*8 +: 8], 1'b0, INIT[ 811*8 +: 8], 1'b0, INIT[ 810*8 +: 8], + 1'b0, INIT[ 807*8 +: 8], 1'b0, INIT[ 806*8 +: 8], 1'b0, INIT[ 803*8 +: 8], 1'b0, INIT[ 802*8 +: 8], + 1'b0, INIT[ 799*8 +: 8], 1'b0, INIT[ 798*8 +: 8], 1'b0, INIT[ 795*8 +: 8], 1'b0, INIT[ 794*8 +: 8], + 1'b0, INIT[ 791*8 +: 8], 1'b0, INIT[ 790*8 +: 8], 1'b0, INIT[ 787*8 +: 8], 1'b0, INIT[ 786*8 +: 8], + 1'b0, INIT[ 783*8 +: 8], 1'b0, INIT[ 782*8 +: 8], 1'b0, INIT[ 779*8 +: 8], 1'b0, INIT[ 778*8 +: 8], + 1'b0, INIT[ 775*8 +: 8], 1'b0, INIT[ 774*8 +: 8], 1'b0, INIT[ 771*8 +: 8], 1'b0, INIT[ 770*8 +: 8], + 1'b0, INIT[ 767*8 +: 8], 1'b0, INIT[ 766*8 +: 8], 1'b0, INIT[ 763*8 +: 8], 1'b0, INIT[ 762*8 +: 8], + 1'b0, INIT[ 759*8 +: 8], 1'b0, INIT[ 758*8 +: 8], 1'b0, INIT[ 755*8 +: 8], 1'b0, INIT[ 754*8 +: 8], + 1'b0, INIT[ 751*8 +: 8], 1'b0, INIT[ 750*8 +: 8], 1'b0, INIT[ 747*8 +: 8], 1'b0, INIT[ 746*8 +: 8], + 1'b0, INIT[ 743*8 +: 8], 1'b0, INIT[ 742*8 +: 8], 1'b0, INIT[ 739*8 +: 8], 1'b0, INIT[ 738*8 +: 8], + 1'b0, INIT[ 735*8 +: 8], 1'b0, INIT[ 734*8 +: 8], 1'b0, INIT[ 731*8 +: 8], 1'b0, INIT[ 730*8 +: 8], + 1'b0, INIT[ 727*8 +: 8], 1'b0, INIT[ 726*8 +: 8], 1'b0, INIT[ 723*8 +: 8], 1'b0, INIT[ 722*8 +: 8], + 1'b0, INIT[ 719*8 +: 8], 1'b0, INIT[ 718*8 +: 8], 1'b0, INIT[ 715*8 +: 8], 1'b0, INIT[ 714*8 +: 8], + 1'b0, INIT[ 711*8 +: 8], 1'b0, INIT[ 710*8 +: 8], 1'b0, INIT[ 707*8 +: 8], 1'b0, INIT[ 706*8 +: 8], + 1'b0, INIT[ 703*8 +: 8], 1'b0, INIT[ 702*8 +: 8], 1'b0, INIT[ 699*8 +: 8], 1'b0, INIT[ 698*8 +: 8], + 1'b0, INIT[ 695*8 +: 8], 1'b0, INIT[ 694*8 +: 8], 1'b0, INIT[ 691*8 +: 8], 1'b0, INIT[ 690*8 +: 8], + 1'b0, INIT[ 687*8 +: 8], 1'b0, INIT[ 686*8 +: 8], 1'b0, INIT[ 683*8 +: 8], 1'b0, INIT[ 682*8 +: 8], + 1'b0, INIT[ 679*8 +: 8], 1'b0, INIT[ 678*8 +: 8], 1'b0, INIT[ 675*8 +: 8], 1'b0, INIT[ 674*8 +: 8], + 1'b0, INIT[ 671*8 +: 8], 1'b0, INIT[ 670*8 +: 8], 1'b0, INIT[ 667*8 +: 8], 1'b0, INIT[ 666*8 +: 8], + 1'b0, INIT[ 663*8 +: 8], 1'b0, INIT[ 662*8 +: 8], 1'b0, INIT[ 659*8 +: 8], 1'b0, INIT[ 658*8 +: 8], + 1'b0, INIT[ 655*8 +: 8], 1'b0, INIT[ 654*8 +: 8], 1'b0, INIT[ 651*8 +: 8], 1'b0, INIT[ 650*8 +: 8], + 1'b0, INIT[ 647*8 +: 8], 1'b0, INIT[ 646*8 +: 8], 1'b0, INIT[ 643*8 +: 8], 1'b0, INIT[ 642*8 +: 8], + 1'b0, INIT[ 639*8 +: 8], 1'b0, INIT[ 638*8 +: 8], 1'b0, INIT[ 635*8 +: 8], 1'b0, INIT[ 634*8 +: 8], + 1'b0, INIT[ 631*8 +: 8], 1'b0, INIT[ 630*8 +: 8], 1'b0, INIT[ 627*8 +: 8], 1'b0, INIT[ 626*8 +: 8], + 1'b0, INIT[ 623*8 +: 8], 1'b0, INIT[ 622*8 +: 8], 1'b0, INIT[ 619*8 +: 8], 1'b0, INIT[ 618*8 +: 8], + 1'b0, INIT[ 615*8 +: 8], 1'b0, INIT[ 614*8 +: 8], 1'b0, INIT[ 611*8 +: 8], 1'b0, INIT[ 610*8 +: 8], + 1'b0, INIT[ 607*8 +: 8], 1'b0, INIT[ 606*8 +: 8], 1'b0, INIT[ 603*8 +: 8], 1'b0, INIT[ 602*8 +: 8], + 1'b0, INIT[ 599*8 +: 8], 1'b0, INIT[ 598*8 +: 8], 1'b0, INIT[ 595*8 +: 8], 1'b0, INIT[ 594*8 +: 8], + 1'b0, INIT[ 591*8 +: 8], 1'b0, INIT[ 590*8 +: 8], 1'b0, INIT[ 587*8 +: 8], 1'b0, INIT[ 586*8 +: 8], + 1'b0, INIT[ 583*8 +: 8], 1'b0, INIT[ 582*8 +: 8], 1'b0, INIT[ 579*8 +: 8], 1'b0, INIT[ 578*8 +: 8], + 1'b0, INIT[ 575*8 +: 8], 1'b0, INIT[ 574*8 +: 8], 1'b0, INIT[ 571*8 +: 8], 1'b0, INIT[ 570*8 +: 8], + 1'b0, INIT[ 567*8 +: 8], 1'b0, INIT[ 566*8 +: 8], 1'b0, INIT[ 563*8 +: 8], 1'b0, INIT[ 562*8 +: 8], + 1'b0, INIT[ 559*8 +: 8], 1'b0, INIT[ 558*8 +: 8], 1'b0, INIT[ 555*8 +: 8], 1'b0, INIT[ 554*8 +: 8], + 1'b0, INIT[ 551*8 +: 8], 1'b0, INIT[ 550*8 +: 8], 1'b0, INIT[ 547*8 +: 8], 1'b0, INIT[ 546*8 +: 8], + 1'b0, INIT[ 543*8 +: 8], 1'b0, INIT[ 542*8 +: 8], 1'b0, INIT[ 539*8 +: 8], 1'b0, INIT[ 538*8 +: 8], + 1'b0, INIT[ 535*8 +: 8], 1'b0, INIT[ 534*8 +: 8], 1'b0, INIT[ 531*8 +: 8], 1'b0, INIT[ 530*8 +: 8], + 1'b0, INIT[ 527*8 +: 8], 1'b0, INIT[ 526*8 +: 8], 1'b0, INIT[ 523*8 +: 8], 1'b0, INIT[ 522*8 +: 8], + 1'b0, INIT[ 519*8 +: 8], 1'b0, INIT[ 518*8 +: 8], 1'b0, INIT[ 515*8 +: 8], 1'b0, INIT[ 514*8 +: 8], + 1'b0, INIT[ 511*8 +: 8], 1'b0, INIT[ 510*8 +: 8], 1'b0, INIT[ 507*8 +: 8], 1'b0, INIT[ 506*8 +: 8], + 1'b0, INIT[ 503*8 +: 8], 1'b0, INIT[ 502*8 +: 8], 1'b0, INIT[ 499*8 +: 8], 1'b0, INIT[ 498*8 +: 8], + 1'b0, INIT[ 495*8 +: 8], 1'b0, INIT[ 494*8 +: 8], 1'b0, INIT[ 491*8 +: 8], 1'b0, INIT[ 490*8 +: 8], + 1'b0, INIT[ 487*8 +: 8], 1'b0, INIT[ 486*8 +: 8], 1'b0, INIT[ 483*8 +: 8], 1'b0, INIT[ 482*8 +: 8], + 1'b0, INIT[ 479*8 +: 8], 1'b0, INIT[ 478*8 +: 8], 1'b0, INIT[ 475*8 +: 8], 1'b0, INIT[ 474*8 +: 8], + 1'b0, INIT[ 471*8 +: 8], 1'b0, INIT[ 470*8 +: 8], 1'b0, INIT[ 467*8 +: 8], 1'b0, INIT[ 466*8 +: 8], + 1'b0, INIT[ 463*8 +: 8], 1'b0, INIT[ 462*8 +: 8], 1'b0, INIT[ 459*8 +: 8], 1'b0, INIT[ 458*8 +: 8], + 1'b0, INIT[ 455*8 +: 8], 1'b0, INIT[ 454*8 +: 8], 1'b0, INIT[ 451*8 +: 8], 1'b0, INIT[ 450*8 +: 8], + 1'b0, INIT[ 447*8 +: 8], 1'b0, INIT[ 446*8 +: 8], 1'b0, INIT[ 443*8 +: 8], 1'b0, INIT[ 442*8 +: 8], + 1'b0, INIT[ 439*8 +: 8], 1'b0, INIT[ 438*8 +: 8], 1'b0, INIT[ 435*8 +: 8], 1'b0, INIT[ 434*8 +: 8], + 1'b0, INIT[ 431*8 +: 8], 1'b0, INIT[ 430*8 +: 8], 1'b0, INIT[ 427*8 +: 8], 1'b0, INIT[ 426*8 +: 8], + 1'b0, INIT[ 423*8 +: 8], 1'b0, INIT[ 422*8 +: 8], 1'b0, INIT[ 419*8 +: 8], 1'b0, INIT[ 418*8 +: 8], + 1'b0, INIT[ 415*8 +: 8], 1'b0, INIT[ 414*8 +: 8], 1'b0, INIT[ 411*8 +: 8], 1'b0, INIT[ 410*8 +: 8], + 1'b0, INIT[ 407*8 +: 8], 1'b0, INIT[ 406*8 +: 8], 1'b0, INIT[ 403*8 +: 8], 1'b0, INIT[ 402*8 +: 8], + 1'b0, INIT[ 399*8 +: 8], 1'b0, INIT[ 398*8 +: 8], 1'b0, INIT[ 395*8 +: 8], 1'b0, INIT[ 394*8 +: 8], + 1'b0, INIT[ 391*8 +: 8], 1'b0, INIT[ 390*8 +: 8], 1'b0, INIT[ 387*8 +: 8], 1'b0, INIT[ 386*8 +: 8], + 1'b0, INIT[ 383*8 +: 8], 1'b0, INIT[ 382*8 +: 8], 1'b0, INIT[ 379*8 +: 8], 1'b0, INIT[ 378*8 +: 8], + 1'b0, INIT[ 375*8 +: 8], 1'b0, INIT[ 374*8 +: 8], 1'b0, INIT[ 371*8 +: 8], 1'b0, INIT[ 370*8 +: 8], + 1'b0, INIT[ 367*8 +: 8], 1'b0, INIT[ 366*8 +: 8], 1'b0, INIT[ 363*8 +: 8], 1'b0, INIT[ 362*8 +: 8], + 1'b0, INIT[ 359*8 +: 8], 1'b0, INIT[ 358*8 +: 8], 1'b0, INIT[ 355*8 +: 8], 1'b0, INIT[ 354*8 +: 8], + 1'b0, INIT[ 351*8 +: 8], 1'b0, INIT[ 350*8 +: 8], 1'b0, INIT[ 347*8 +: 8], 1'b0, INIT[ 346*8 +: 8], + 1'b0, INIT[ 343*8 +: 8], 1'b0, INIT[ 342*8 +: 8], 1'b0, INIT[ 339*8 +: 8], 1'b0, INIT[ 338*8 +: 8], + 1'b0, INIT[ 335*8 +: 8], 1'b0, INIT[ 334*8 +: 8], 1'b0, INIT[ 331*8 +: 8], 1'b0, INIT[ 330*8 +: 8], + 1'b0, INIT[ 327*8 +: 8], 1'b0, INIT[ 326*8 +: 8], 1'b0, INIT[ 323*8 +: 8], 1'b0, INIT[ 322*8 +: 8], + 1'b0, INIT[ 319*8 +: 8], 1'b0, INIT[ 318*8 +: 8], 1'b0, INIT[ 315*8 +: 8], 1'b0, INIT[ 314*8 +: 8], + 1'b0, INIT[ 311*8 +: 8], 1'b0, INIT[ 310*8 +: 8], 1'b0, INIT[ 307*8 +: 8], 1'b0, INIT[ 306*8 +: 8], + 1'b0, INIT[ 303*8 +: 8], 1'b0, INIT[ 302*8 +: 8], 1'b0, INIT[ 299*8 +: 8], 1'b0, INIT[ 298*8 +: 8], + 1'b0, INIT[ 295*8 +: 8], 1'b0, INIT[ 294*8 +: 8], 1'b0, INIT[ 291*8 +: 8], 1'b0, INIT[ 290*8 +: 8], + 1'b0, INIT[ 287*8 +: 8], 1'b0, INIT[ 286*8 +: 8], 1'b0, INIT[ 283*8 +: 8], 1'b0, INIT[ 282*8 +: 8], + 1'b0, INIT[ 279*8 +: 8], 1'b0, INIT[ 278*8 +: 8], 1'b0, INIT[ 275*8 +: 8], 1'b0, INIT[ 274*8 +: 8], + 1'b0, INIT[ 271*8 +: 8], 1'b0, INIT[ 270*8 +: 8], 1'b0, INIT[ 267*8 +: 8], 1'b0, INIT[ 266*8 +: 8], + 1'b0, INIT[ 263*8 +: 8], 1'b0, INIT[ 262*8 +: 8], 1'b0, INIT[ 259*8 +: 8], 1'b0, INIT[ 258*8 +: 8], + 1'b0, INIT[ 255*8 +: 8], 1'b0, INIT[ 254*8 +: 8], 1'b0, INIT[ 251*8 +: 8], 1'b0, INIT[ 250*8 +: 8], + 1'b0, INIT[ 247*8 +: 8], 1'b0, INIT[ 246*8 +: 8], 1'b0, INIT[ 243*8 +: 8], 1'b0, INIT[ 242*8 +: 8], + 1'b0, INIT[ 239*8 +: 8], 1'b0, INIT[ 238*8 +: 8], 1'b0, INIT[ 235*8 +: 8], 1'b0, INIT[ 234*8 +: 8], + 1'b0, INIT[ 231*8 +: 8], 1'b0, INIT[ 230*8 +: 8], 1'b0, INIT[ 227*8 +: 8], 1'b0, INIT[ 226*8 +: 8], + 1'b0, INIT[ 223*8 +: 8], 1'b0, INIT[ 222*8 +: 8], 1'b0, INIT[ 219*8 +: 8], 1'b0, INIT[ 218*8 +: 8], + 1'b0, INIT[ 215*8 +: 8], 1'b0, INIT[ 214*8 +: 8], 1'b0, INIT[ 211*8 +: 8], 1'b0, INIT[ 210*8 +: 8], + 1'b0, INIT[ 207*8 +: 8], 1'b0, INIT[ 206*8 +: 8], 1'b0, INIT[ 203*8 +: 8], 1'b0, INIT[ 202*8 +: 8], + 1'b0, INIT[ 199*8 +: 8], 1'b0, INIT[ 198*8 +: 8], 1'b0, INIT[ 195*8 +: 8], 1'b0, INIT[ 194*8 +: 8], + 1'b0, INIT[ 191*8 +: 8], 1'b0, INIT[ 190*8 +: 8], 1'b0, INIT[ 187*8 +: 8], 1'b0, INIT[ 186*8 +: 8], + 1'b0, INIT[ 183*8 +: 8], 1'b0, INIT[ 182*8 +: 8], 1'b0, INIT[ 179*8 +: 8], 1'b0, INIT[ 178*8 +: 8], + 1'b0, INIT[ 175*8 +: 8], 1'b0, INIT[ 174*8 +: 8], 1'b0, INIT[ 171*8 +: 8], 1'b0, INIT[ 170*8 +: 8], + 1'b0, INIT[ 167*8 +: 8], 1'b0, INIT[ 166*8 +: 8], 1'b0, INIT[ 163*8 +: 8], 1'b0, INIT[ 162*8 +: 8], + 1'b0, INIT[ 159*8 +: 8], 1'b0, INIT[ 158*8 +: 8], 1'b0, INIT[ 155*8 +: 8], 1'b0, INIT[ 154*8 +: 8], + 1'b0, INIT[ 151*8 +: 8], 1'b0, INIT[ 150*8 +: 8], 1'b0, INIT[ 147*8 +: 8], 1'b0, INIT[ 146*8 +: 8], + 1'b0, INIT[ 143*8 +: 8], 1'b0, INIT[ 142*8 +: 8], 1'b0, INIT[ 139*8 +: 8], 1'b0, INIT[ 138*8 +: 8], + 1'b0, INIT[ 135*8 +: 8], 1'b0, INIT[ 134*8 +: 8], 1'b0, INIT[ 131*8 +: 8], 1'b0, INIT[ 130*8 +: 8], + 1'b0, INIT[ 127*8 +: 8], 1'b0, INIT[ 126*8 +: 8], 1'b0, INIT[ 123*8 +: 8], 1'b0, INIT[ 122*8 +: 8], + 1'b0, INIT[ 119*8 +: 8], 1'b0, INIT[ 118*8 +: 8], 1'b0, INIT[ 115*8 +: 8], 1'b0, INIT[ 114*8 +: 8], + 1'b0, INIT[ 111*8 +: 8], 1'b0, INIT[ 110*8 +: 8], 1'b0, INIT[ 107*8 +: 8], 1'b0, INIT[ 106*8 +: 8], + 1'b0, INIT[ 103*8 +: 8], 1'b0, INIT[ 102*8 +: 8], 1'b0, INIT[ 99*8 +: 8], 1'b0, INIT[ 98*8 +: 8], + 1'b0, INIT[ 95*8 +: 8], 1'b0, INIT[ 94*8 +: 8], 1'b0, INIT[ 91*8 +: 8], 1'b0, INIT[ 90*8 +: 8], + 1'b0, INIT[ 87*8 +: 8], 1'b0, INIT[ 86*8 +: 8], 1'b0, INIT[ 83*8 +: 8], 1'b0, INIT[ 82*8 +: 8], + 1'b0, INIT[ 79*8 +: 8], 1'b0, INIT[ 78*8 +: 8], 1'b0, INIT[ 75*8 +: 8], 1'b0, INIT[ 74*8 +: 8], + 1'b0, INIT[ 71*8 +: 8], 1'b0, INIT[ 70*8 +: 8], 1'b0, INIT[ 67*8 +: 8], 1'b0, INIT[ 66*8 +: 8], + 1'b0, INIT[ 63*8 +: 8], 1'b0, INIT[ 62*8 +: 8], 1'b0, INIT[ 59*8 +: 8], 1'b0, INIT[ 58*8 +: 8], + 1'b0, INIT[ 55*8 +: 8], 1'b0, INIT[ 54*8 +: 8], 1'b0, INIT[ 51*8 +: 8], 1'b0, INIT[ 50*8 +: 8], + 1'b0, INIT[ 47*8 +: 8], 1'b0, INIT[ 46*8 +: 8], 1'b0, INIT[ 43*8 +: 8], 1'b0, INIT[ 42*8 +: 8], + 1'b0, INIT[ 39*8 +: 8], 1'b0, INIT[ 38*8 +: 8], 1'b0, INIT[ 35*8 +: 8], 1'b0, INIT[ 34*8 +: 8], + 1'b0, INIT[ 31*8 +: 8], 1'b0, INIT[ 30*8 +: 8], 1'b0, INIT[ 27*8 +: 8], 1'b0, INIT[ 26*8 +: 8], + 1'b0, INIT[ 23*8 +: 8], 1'b0, INIT[ 22*8 +: 8], 1'b0, INIT[ 19*8 +: 8], 1'b0, INIT[ 18*8 +: 8], + 1'b0, INIT[ 15*8 +: 8], 1'b0, INIT[ 14*8 +: 8], 1'b0, INIT[ 11*8 +: 8], 1'b0, INIT[ 10*8 +: 8], + 1'b0, INIT[ 7*8 +: 8], 1'b0, INIT[ 6*8 +: 8], 1'b0, INIT[ 3*8 +: 8], 1'b0, INIT[ 2*8 +: 8], + 1'b0, INIT[2045*8 +: 8], 1'b0, INIT[2044*8 +: 8], 1'b0, INIT[2041*8 +: 8], 1'b0, INIT[2040*8 +: 8], + 1'b0, INIT[2037*8 +: 8], 1'b0, INIT[2036*8 +: 8], 1'b0, INIT[2033*8 +: 8], 1'b0, INIT[2032*8 +: 8], + 1'b0, INIT[2029*8 +: 8], 1'b0, INIT[2028*8 +: 8], 1'b0, INIT[2025*8 +: 8], 1'b0, INIT[2024*8 +: 8], + 1'b0, INIT[2021*8 +: 8], 1'b0, INIT[2020*8 +: 8], 1'b0, INIT[2017*8 +: 8], 1'b0, INIT[2016*8 +: 8], + 1'b0, INIT[2013*8 +: 8], 1'b0, INIT[2012*8 +: 8], 1'b0, INIT[2009*8 +: 8], 1'b0, INIT[2008*8 +: 8], + 1'b0, INIT[2005*8 +: 8], 1'b0, INIT[2004*8 +: 8], 1'b0, INIT[2001*8 +: 8], 1'b0, INIT[2000*8 +: 8], + 1'b0, INIT[1997*8 +: 8], 1'b0, INIT[1996*8 +: 8], 1'b0, INIT[1993*8 +: 8], 1'b0, INIT[1992*8 +: 8], + 1'b0, INIT[1989*8 +: 8], 1'b0, INIT[1988*8 +: 8], 1'b0, INIT[1985*8 +: 8], 1'b0, INIT[1984*8 +: 8], + 1'b0, INIT[1981*8 +: 8], 1'b0, INIT[1980*8 +: 8], 1'b0, INIT[1977*8 +: 8], 1'b0, INIT[1976*8 +: 8], + 1'b0, INIT[1973*8 +: 8], 1'b0, INIT[1972*8 +: 8], 1'b0, INIT[1969*8 +: 8], 1'b0, INIT[1968*8 +: 8], + 1'b0, INIT[1965*8 +: 8], 1'b0, INIT[1964*8 +: 8], 1'b0, INIT[1961*8 +: 8], 1'b0, INIT[1960*8 +: 8], + 1'b0, INIT[1957*8 +: 8], 1'b0, INIT[1956*8 +: 8], 1'b0, INIT[1953*8 +: 8], 1'b0, INIT[1952*8 +: 8], + 1'b0, INIT[1949*8 +: 8], 1'b0, INIT[1948*8 +: 8], 1'b0, INIT[1945*8 +: 8], 1'b0, INIT[1944*8 +: 8], + 1'b0, INIT[1941*8 +: 8], 1'b0, INIT[1940*8 +: 8], 1'b0, INIT[1937*8 +: 8], 1'b0, INIT[1936*8 +: 8], + 1'b0, INIT[1933*8 +: 8], 1'b0, INIT[1932*8 +: 8], 1'b0, INIT[1929*8 +: 8], 1'b0, INIT[1928*8 +: 8], + 1'b0, INIT[1925*8 +: 8], 1'b0, INIT[1924*8 +: 8], 1'b0, INIT[1921*8 +: 8], 1'b0, INIT[1920*8 +: 8], + 1'b0, INIT[1917*8 +: 8], 1'b0, INIT[1916*8 +: 8], 1'b0, INIT[1913*8 +: 8], 1'b0, INIT[1912*8 +: 8], + 1'b0, INIT[1909*8 +: 8], 1'b0, INIT[1908*8 +: 8], 1'b0, INIT[1905*8 +: 8], 1'b0, INIT[1904*8 +: 8], + 1'b0, INIT[1901*8 +: 8], 1'b0, INIT[1900*8 +: 8], 1'b0, INIT[1897*8 +: 8], 1'b0, INIT[1896*8 +: 8], + 1'b0, INIT[1893*8 +: 8], 1'b0, INIT[1892*8 +: 8], 1'b0, INIT[1889*8 +: 8], 1'b0, INIT[1888*8 +: 8], + 1'b0, INIT[1885*8 +: 8], 1'b0, INIT[1884*8 +: 8], 1'b0, INIT[1881*8 +: 8], 1'b0, INIT[1880*8 +: 8], + 1'b0, INIT[1877*8 +: 8], 1'b0, INIT[1876*8 +: 8], 1'b0, INIT[1873*8 +: 8], 1'b0, INIT[1872*8 +: 8], + 1'b0, INIT[1869*8 +: 8], 1'b0, INIT[1868*8 +: 8], 1'b0, INIT[1865*8 +: 8], 1'b0, INIT[1864*8 +: 8], + 1'b0, INIT[1861*8 +: 8], 1'b0, INIT[1860*8 +: 8], 1'b0, INIT[1857*8 +: 8], 1'b0, INIT[1856*8 +: 8], + 1'b0, INIT[1853*8 +: 8], 1'b0, INIT[1852*8 +: 8], 1'b0, INIT[1849*8 +: 8], 1'b0, INIT[1848*8 +: 8], + 1'b0, INIT[1845*8 +: 8], 1'b0, INIT[1844*8 +: 8], 1'b0, INIT[1841*8 +: 8], 1'b0, INIT[1840*8 +: 8], + 1'b0, INIT[1837*8 +: 8], 1'b0, INIT[1836*8 +: 8], 1'b0, INIT[1833*8 +: 8], 1'b0, INIT[1832*8 +: 8], + 1'b0, INIT[1829*8 +: 8], 1'b0, INIT[1828*8 +: 8], 1'b0, INIT[1825*8 +: 8], 1'b0, INIT[1824*8 +: 8], + 1'b0, INIT[1821*8 +: 8], 1'b0, INIT[1820*8 +: 8], 1'b0, INIT[1817*8 +: 8], 1'b0, INIT[1816*8 +: 8], + 1'b0, INIT[1813*8 +: 8], 1'b0, INIT[1812*8 +: 8], 1'b0, INIT[1809*8 +: 8], 1'b0, INIT[1808*8 +: 8], + 1'b0, INIT[1805*8 +: 8], 1'b0, INIT[1804*8 +: 8], 1'b0, INIT[1801*8 +: 8], 1'b0, INIT[1800*8 +: 8], + 1'b0, INIT[1797*8 +: 8], 1'b0, INIT[1796*8 +: 8], 1'b0, INIT[1793*8 +: 8], 1'b0, INIT[1792*8 +: 8], + 1'b0, INIT[1789*8 +: 8], 1'b0, INIT[1788*8 +: 8], 1'b0, INIT[1785*8 +: 8], 1'b0, INIT[1784*8 +: 8], + 1'b0, INIT[1781*8 +: 8], 1'b0, INIT[1780*8 +: 8], 1'b0, INIT[1777*8 +: 8], 1'b0, INIT[1776*8 +: 8], + 1'b0, INIT[1773*8 +: 8], 1'b0, INIT[1772*8 +: 8], 1'b0, INIT[1769*8 +: 8], 1'b0, INIT[1768*8 +: 8], + 1'b0, INIT[1765*8 +: 8], 1'b0, INIT[1764*8 +: 8], 1'b0, INIT[1761*8 +: 8], 1'b0, INIT[1760*8 +: 8], + 1'b0, INIT[1757*8 +: 8], 1'b0, INIT[1756*8 +: 8], 1'b0, INIT[1753*8 +: 8], 1'b0, INIT[1752*8 +: 8], + 1'b0, INIT[1749*8 +: 8], 1'b0, INIT[1748*8 +: 8], 1'b0, INIT[1745*8 +: 8], 1'b0, INIT[1744*8 +: 8], + 1'b0, INIT[1741*8 +: 8], 1'b0, INIT[1740*8 +: 8], 1'b0, INIT[1737*8 +: 8], 1'b0, INIT[1736*8 +: 8], + 1'b0, INIT[1733*8 +: 8], 1'b0, INIT[1732*8 +: 8], 1'b0, INIT[1729*8 +: 8], 1'b0, INIT[1728*8 +: 8], + 1'b0, INIT[1725*8 +: 8], 1'b0, INIT[1724*8 +: 8], 1'b0, INIT[1721*8 +: 8], 1'b0, INIT[1720*8 +: 8], + 1'b0, INIT[1717*8 +: 8], 1'b0, INIT[1716*8 +: 8], 1'b0, INIT[1713*8 +: 8], 1'b0, INIT[1712*8 +: 8], + 1'b0, INIT[1709*8 +: 8], 1'b0, INIT[1708*8 +: 8], 1'b0, INIT[1705*8 +: 8], 1'b0, INIT[1704*8 +: 8], + 1'b0, INIT[1701*8 +: 8], 1'b0, INIT[1700*8 +: 8], 1'b0, INIT[1697*8 +: 8], 1'b0, INIT[1696*8 +: 8], + 1'b0, INIT[1693*8 +: 8], 1'b0, INIT[1692*8 +: 8], 1'b0, INIT[1689*8 +: 8], 1'b0, INIT[1688*8 +: 8], + 1'b0, INIT[1685*8 +: 8], 1'b0, INIT[1684*8 +: 8], 1'b0, INIT[1681*8 +: 8], 1'b0, INIT[1680*8 +: 8], + 1'b0, INIT[1677*8 +: 8], 1'b0, INIT[1676*8 +: 8], 1'b0, INIT[1673*8 +: 8], 1'b0, INIT[1672*8 +: 8], + 1'b0, INIT[1669*8 +: 8], 1'b0, INIT[1668*8 +: 8], 1'b0, INIT[1665*8 +: 8], 1'b0, INIT[1664*8 +: 8], + 1'b0, INIT[1661*8 +: 8], 1'b0, INIT[1660*8 +: 8], 1'b0, INIT[1657*8 +: 8], 1'b0, INIT[1656*8 +: 8], + 1'b0, INIT[1653*8 +: 8], 1'b0, INIT[1652*8 +: 8], 1'b0, INIT[1649*8 +: 8], 1'b0, INIT[1648*8 +: 8], + 1'b0, INIT[1645*8 +: 8], 1'b0, INIT[1644*8 +: 8], 1'b0, INIT[1641*8 +: 8], 1'b0, INIT[1640*8 +: 8], + 1'b0, INIT[1637*8 +: 8], 1'b0, INIT[1636*8 +: 8], 1'b0, INIT[1633*8 +: 8], 1'b0, INIT[1632*8 +: 8], + 1'b0, INIT[1629*8 +: 8], 1'b0, INIT[1628*8 +: 8], 1'b0, INIT[1625*8 +: 8], 1'b0, INIT[1624*8 +: 8], + 1'b0, INIT[1621*8 +: 8], 1'b0, INIT[1620*8 +: 8], 1'b0, INIT[1617*8 +: 8], 1'b0, INIT[1616*8 +: 8], + 1'b0, INIT[1613*8 +: 8], 1'b0, INIT[1612*8 +: 8], 1'b0, INIT[1609*8 +: 8], 1'b0, INIT[1608*8 +: 8], + 1'b0, INIT[1605*8 +: 8], 1'b0, INIT[1604*8 +: 8], 1'b0, INIT[1601*8 +: 8], 1'b0, INIT[1600*8 +: 8], + 1'b0, INIT[1597*8 +: 8], 1'b0, INIT[1596*8 +: 8], 1'b0, INIT[1593*8 +: 8], 1'b0, INIT[1592*8 +: 8], + 1'b0, INIT[1589*8 +: 8], 1'b0, INIT[1588*8 +: 8], 1'b0, INIT[1585*8 +: 8], 1'b0, INIT[1584*8 +: 8], + 1'b0, INIT[1581*8 +: 8], 1'b0, INIT[1580*8 +: 8], 1'b0, INIT[1577*8 +: 8], 1'b0, INIT[1576*8 +: 8], + 1'b0, INIT[1573*8 +: 8], 1'b0, INIT[1572*8 +: 8], 1'b0, INIT[1569*8 +: 8], 1'b0, INIT[1568*8 +: 8], + 1'b0, INIT[1565*8 +: 8], 1'b0, INIT[1564*8 +: 8], 1'b0, INIT[1561*8 +: 8], 1'b0, INIT[1560*8 +: 8], + 1'b0, INIT[1557*8 +: 8], 1'b0, INIT[1556*8 +: 8], 1'b0, INIT[1553*8 +: 8], 1'b0, INIT[1552*8 +: 8], + 1'b0, INIT[1549*8 +: 8], 1'b0, INIT[1548*8 +: 8], 1'b0, INIT[1545*8 +: 8], 1'b0, INIT[1544*8 +: 8], + 1'b0, INIT[1541*8 +: 8], 1'b0, INIT[1540*8 +: 8], 1'b0, INIT[1537*8 +: 8], 1'b0, INIT[1536*8 +: 8], + 1'b0, INIT[1533*8 +: 8], 1'b0, INIT[1532*8 +: 8], 1'b0, INIT[1529*8 +: 8], 1'b0, INIT[1528*8 +: 8], + 1'b0, INIT[1525*8 +: 8], 1'b0, INIT[1524*8 +: 8], 1'b0, INIT[1521*8 +: 8], 1'b0, INIT[1520*8 +: 8], + 1'b0, INIT[1517*8 +: 8], 1'b0, INIT[1516*8 +: 8], 1'b0, INIT[1513*8 +: 8], 1'b0, INIT[1512*8 +: 8], + 1'b0, INIT[1509*8 +: 8], 1'b0, INIT[1508*8 +: 8], 1'b0, INIT[1505*8 +: 8], 1'b0, INIT[1504*8 +: 8], + 1'b0, INIT[1501*8 +: 8], 1'b0, INIT[1500*8 +: 8], 1'b0, INIT[1497*8 +: 8], 1'b0, INIT[1496*8 +: 8], + 1'b0, INIT[1493*8 +: 8], 1'b0, INIT[1492*8 +: 8], 1'b0, INIT[1489*8 +: 8], 1'b0, INIT[1488*8 +: 8], + 1'b0, INIT[1485*8 +: 8], 1'b0, INIT[1484*8 +: 8], 1'b0, INIT[1481*8 +: 8], 1'b0, INIT[1480*8 +: 8], + 1'b0, INIT[1477*8 +: 8], 1'b0, INIT[1476*8 +: 8], 1'b0, INIT[1473*8 +: 8], 1'b0, INIT[1472*8 +: 8], + 1'b0, INIT[1469*8 +: 8], 1'b0, INIT[1468*8 +: 8], 1'b0, INIT[1465*8 +: 8], 1'b0, INIT[1464*8 +: 8], + 1'b0, INIT[1461*8 +: 8], 1'b0, INIT[1460*8 +: 8], 1'b0, INIT[1457*8 +: 8], 1'b0, INIT[1456*8 +: 8], + 1'b0, INIT[1453*8 +: 8], 1'b0, INIT[1452*8 +: 8], 1'b0, INIT[1449*8 +: 8], 1'b0, INIT[1448*8 +: 8], + 1'b0, INIT[1445*8 +: 8], 1'b0, INIT[1444*8 +: 8], 1'b0, INIT[1441*8 +: 8], 1'b0, INIT[1440*8 +: 8], + 1'b0, INIT[1437*8 +: 8], 1'b0, INIT[1436*8 +: 8], 1'b0, INIT[1433*8 +: 8], 1'b0, INIT[1432*8 +: 8], + 1'b0, INIT[1429*8 +: 8], 1'b0, INIT[1428*8 +: 8], 1'b0, INIT[1425*8 +: 8], 1'b0, INIT[1424*8 +: 8], + 1'b0, INIT[1421*8 +: 8], 1'b0, INIT[1420*8 +: 8], 1'b0, INIT[1417*8 +: 8], 1'b0, INIT[1416*8 +: 8], + 1'b0, INIT[1413*8 +: 8], 1'b0, INIT[1412*8 +: 8], 1'b0, INIT[1409*8 +: 8], 1'b0, INIT[1408*8 +: 8], + 1'b0, INIT[1405*8 +: 8], 1'b0, INIT[1404*8 +: 8], 1'b0, INIT[1401*8 +: 8], 1'b0, INIT[1400*8 +: 8], + 1'b0, INIT[1397*8 +: 8], 1'b0, INIT[1396*8 +: 8], 1'b0, INIT[1393*8 +: 8], 1'b0, INIT[1392*8 +: 8], + 1'b0, INIT[1389*8 +: 8], 1'b0, INIT[1388*8 +: 8], 1'b0, INIT[1385*8 +: 8], 1'b0, INIT[1384*8 +: 8], + 1'b0, INIT[1381*8 +: 8], 1'b0, INIT[1380*8 +: 8], 1'b0, INIT[1377*8 +: 8], 1'b0, INIT[1376*8 +: 8], + 1'b0, INIT[1373*8 +: 8], 1'b0, INIT[1372*8 +: 8], 1'b0, INIT[1369*8 +: 8], 1'b0, INIT[1368*8 +: 8], + 1'b0, INIT[1365*8 +: 8], 1'b0, INIT[1364*8 +: 8], 1'b0, INIT[1361*8 +: 8], 1'b0, INIT[1360*8 +: 8], + 1'b0, INIT[1357*8 +: 8], 1'b0, INIT[1356*8 +: 8], 1'b0, INIT[1353*8 +: 8], 1'b0, INIT[1352*8 +: 8], + 1'b0, INIT[1349*8 +: 8], 1'b0, INIT[1348*8 +: 8], 1'b0, INIT[1345*8 +: 8], 1'b0, INIT[1344*8 +: 8], + 1'b0, INIT[1341*8 +: 8], 1'b0, INIT[1340*8 +: 8], 1'b0, INIT[1337*8 +: 8], 1'b0, INIT[1336*8 +: 8], + 1'b0, INIT[1333*8 +: 8], 1'b0, INIT[1332*8 +: 8], 1'b0, INIT[1329*8 +: 8], 1'b0, INIT[1328*8 +: 8], + 1'b0, INIT[1325*8 +: 8], 1'b0, INIT[1324*8 +: 8], 1'b0, INIT[1321*8 +: 8], 1'b0, INIT[1320*8 +: 8], + 1'b0, INIT[1317*8 +: 8], 1'b0, INIT[1316*8 +: 8], 1'b0, INIT[1313*8 +: 8], 1'b0, INIT[1312*8 +: 8], + 1'b0, INIT[1309*8 +: 8], 1'b0, INIT[1308*8 +: 8], 1'b0, INIT[1305*8 +: 8], 1'b0, INIT[1304*8 +: 8], + 1'b0, INIT[1301*8 +: 8], 1'b0, INIT[1300*8 +: 8], 1'b0, INIT[1297*8 +: 8], 1'b0, INIT[1296*8 +: 8], + 1'b0, INIT[1293*8 +: 8], 1'b0, INIT[1292*8 +: 8], 1'b0, INIT[1289*8 +: 8], 1'b0, INIT[1288*8 +: 8], + 1'b0, INIT[1285*8 +: 8], 1'b0, INIT[1284*8 +: 8], 1'b0, INIT[1281*8 +: 8], 1'b0, INIT[1280*8 +: 8], + 1'b0, INIT[1277*8 +: 8], 1'b0, INIT[1276*8 +: 8], 1'b0, INIT[1273*8 +: 8], 1'b0, INIT[1272*8 +: 8], + 1'b0, INIT[1269*8 +: 8], 1'b0, INIT[1268*8 +: 8], 1'b0, INIT[1265*8 +: 8], 1'b0, INIT[1264*8 +: 8], + 1'b0, INIT[1261*8 +: 8], 1'b0, INIT[1260*8 +: 8], 1'b0, INIT[1257*8 +: 8], 1'b0, INIT[1256*8 +: 8], + 1'b0, INIT[1253*8 +: 8], 1'b0, INIT[1252*8 +: 8], 1'b0, INIT[1249*8 +: 8], 1'b0, INIT[1248*8 +: 8], + 1'b0, INIT[1245*8 +: 8], 1'b0, INIT[1244*8 +: 8], 1'b0, INIT[1241*8 +: 8], 1'b0, INIT[1240*8 +: 8], + 1'b0, INIT[1237*8 +: 8], 1'b0, INIT[1236*8 +: 8], 1'b0, INIT[1233*8 +: 8], 1'b0, INIT[1232*8 +: 8], + 1'b0, INIT[1229*8 +: 8], 1'b0, INIT[1228*8 +: 8], 1'b0, INIT[1225*8 +: 8], 1'b0, INIT[1224*8 +: 8], + 1'b0, INIT[1221*8 +: 8], 1'b0, INIT[1220*8 +: 8], 1'b0, INIT[1217*8 +: 8], 1'b0, INIT[1216*8 +: 8], + 1'b0, INIT[1213*8 +: 8], 1'b0, INIT[1212*8 +: 8], 1'b0, INIT[1209*8 +: 8], 1'b0, INIT[1208*8 +: 8], + 1'b0, INIT[1205*8 +: 8], 1'b0, INIT[1204*8 +: 8], 1'b0, INIT[1201*8 +: 8], 1'b0, INIT[1200*8 +: 8], + 1'b0, INIT[1197*8 +: 8], 1'b0, INIT[1196*8 +: 8], 1'b0, INIT[1193*8 +: 8], 1'b0, INIT[1192*8 +: 8], + 1'b0, INIT[1189*8 +: 8], 1'b0, INIT[1188*8 +: 8], 1'b0, INIT[1185*8 +: 8], 1'b0, INIT[1184*8 +: 8], + 1'b0, INIT[1181*8 +: 8], 1'b0, INIT[1180*8 +: 8], 1'b0, INIT[1177*8 +: 8], 1'b0, INIT[1176*8 +: 8], + 1'b0, INIT[1173*8 +: 8], 1'b0, INIT[1172*8 +: 8], 1'b0, INIT[1169*8 +: 8], 1'b0, INIT[1168*8 +: 8], + 1'b0, INIT[1165*8 +: 8], 1'b0, INIT[1164*8 +: 8], 1'b0, INIT[1161*8 +: 8], 1'b0, INIT[1160*8 +: 8], + 1'b0, INIT[1157*8 +: 8], 1'b0, INIT[1156*8 +: 8], 1'b0, INIT[1153*8 +: 8], 1'b0, INIT[1152*8 +: 8], + 1'b0, INIT[1149*8 +: 8], 1'b0, INIT[1148*8 +: 8], 1'b0, INIT[1145*8 +: 8], 1'b0, INIT[1144*8 +: 8], + 1'b0, INIT[1141*8 +: 8], 1'b0, INIT[1140*8 +: 8], 1'b0, INIT[1137*8 +: 8], 1'b0, INIT[1136*8 +: 8], + 1'b0, INIT[1133*8 +: 8], 1'b0, INIT[1132*8 +: 8], 1'b0, INIT[1129*8 +: 8], 1'b0, INIT[1128*8 +: 8], + 1'b0, INIT[1125*8 +: 8], 1'b0, INIT[1124*8 +: 8], 1'b0, INIT[1121*8 +: 8], 1'b0, INIT[1120*8 +: 8], + 1'b0, INIT[1117*8 +: 8], 1'b0, INIT[1116*8 +: 8], 1'b0, INIT[1113*8 +: 8], 1'b0, INIT[1112*8 +: 8], + 1'b0, INIT[1109*8 +: 8], 1'b0, INIT[1108*8 +: 8], 1'b0, INIT[1105*8 +: 8], 1'b0, INIT[1104*8 +: 8], + 1'b0, INIT[1101*8 +: 8], 1'b0, INIT[1100*8 +: 8], 1'b0, INIT[1097*8 +: 8], 1'b0, INIT[1096*8 +: 8], + 1'b0, INIT[1093*8 +: 8], 1'b0, INIT[1092*8 +: 8], 1'b0, INIT[1089*8 +: 8], 1'b0, INIT[1088*8 +: 8], + 1'b0, INIT[1085*8 +: 8], 1'b0, INIT[1084*8 +: 8], 1'b0, INIT[1081*8 +: 8], 1'b0, INIT[1080*8 +: 8], + 1'b0, INIT[1077*8 +: 8], 1'b0, INIT[1076*8 +: 8], 1'b0, INIT[1073*8 +: 8], 1'b0, INIT[1072*8 +: 8], + 1'b0, INIT[1069*8 +: 8], 1'b0, INIT[1068*8 +: 8], 1'b0, INIT[1065*8 +: 8], 1'b0, INIT[1064*8 +: 8], + 1'b0, INIT[1061*8 +: 8], 1'b0, INIT[1060*8 +: 8], 1'b0, INIT[1057*8 +: 8], 1'b0, INIT[1056*8 +: 8], + 1'b0, INIT[1053*8 +: 8], 1'b0, INIT[1052*8 +: 8], 1'b0, INIT[1049*8 +: 8], 1'b0, INIT[1048*8 +: 8], + 1'b0, INIT[1045*8 +: 8], 1'b0, INIT[1044*8 +: 8], 1'b0, INIT[1041*8 +: 8], 1'b0, INIT[1040*8 +: 8], + 1'b0, INIT[1037*8 +: 8], 1'b0, INIT[1036*8 +: 8], 1'b0, INIT[1033*8 +: 8], 1'b0, INIT[1032*8 +: 8], + 1'b0, INIT[1029*8 +: 8], 1'b0, INIT[1028*8 +: 8], 1'b0, INIT[1025*8 +: 8], 1'b0, INIT[1024*8 +: 8], + 1'b0, INIT[1021*8 +: 8], 1'b0, INIT[1020*8 +: 8], 1'b0, INIT[1017*8 +: 8], 1'b0, INIT[1016*8 +: 8], + 1'b0, INIT[1013*8 +: 8], 1'b0, INIT[1012*8 +: 8], 1'b0, INIT[1009*8 +: 8], 1'b0, INIT[1008*8 +: 8], + 1'b0, INIT[1005*8 +: 8], 1'b0, INIT[1004*8 +: 8], 1'b0, INIT[1001*8 +: 8], 1'b0, INIT[1000*8 +: 8], + 1'b0, INIT[ 997*8 +: 8], 1'b0, INIT[ 996*8 +: 8], 1'b0, INIT[ 993*8 +: 8], 1'b0, INIT[ 992*8 +: 8], + 1'b0, INIT[ 989*8 +: 8], 1'b0, INIT[ 988*8 +: 8], 1'b0, INIT[ 985*8 +: 8], 1'b0, INIT[ 984*8 +: 8], + 1'b0, INIT[ 981*8 +: 8], 1'b0, INIT[ 980*8 +: 8], 1'b0, INIT[ 977*8 +: 8], 1'b0, INIT[ 976*8 +: 8], + 1'b0, INIT[ 973*8 +: 8], 1'b0, INIT[ 972*8 +: 8], 1'b0, INIT[ 969*8 +: 8], 1'b0, INIT[ 968*8 +: 8], + 1'b0, INIT[ 965*8 +: 8], 1'b0, INIT[ 964*8 +: 8], 1'b0, INIT[ 961*8 +: 8], 1'b0, INIT[ 960*8 +: 8], + 1'b0, INIT[ 957*8 +: 8], 1'b0, INIT[ 956*8 +: 8], 1'b0, INIT[ 953*8 +: 8], 1'b0, INIT[ 952*8 +: 8], + 1'b0, INIT[ 949*8 +: 8], 1'b0, INIT[ 948*8 +: 8], 1'b0, INIT[ 945*8 +: 8], 1'b0, INIT[ 944*8 +: 8], + 1'b0, INIT[ 941*8 +: 8], 1'b0, INIT[ 940*8 +: 8], 1'b0, INIT[ 937*8 +: 8], 1'b0, INIT[ 936*8 +: 8], + 1'b0, INIT[ 933*8 +: 8], 1'b0, INIT[ 932*8 +: 8], 1'b0, INIT[ 929*8 +: 8], 1'b0, INIT[ 928*8 +: 8], + 1'b0, INIT[ 925*8 +: 8], 1'b0, INIT[ 924*8 +: 8], 1'b0, INIT[ 921*8 +: 8], 1'b0, INIT[ 920*8 +: 8], + 1'b0, INIT[ 917*8 +: 8], 1'b0, INIT[ 916*8 +: 8], 1'b0, INIT[ 913*8 +: 8], 1'b0, INIT[ 912*8 +: 8], + 1'b0, INIT[ 909*8 +: 8], 1'b0, INIT[ 908*8 +: 8], 1'b0, INIT[ 905*8 +: 8], 1'b0, INIT[ 904*8 +: 8], + 1'b0, INIT[ 901*8 +: 8], 1'b0, INIT[ 900*8 +: 8], 1'b0, INIT[ 897*8 +: 8], 1'b0, INIT[ 896*8 +: 8], + 1'b0, INIT[ 893*8 +: 8], 1'b0, INIT[ 892*8 +: 8], 1'b0, INIT[ 889*8 +: 8], 1'b0, INIT[ 888*8 +: 8], + 1'b0, INIT[ 885*8 +: 8], 1'b0, INIT[ 884*8 +: 8], 1'b0, INIT[ 881*8 +: 8], 1'b0, INIT[ 880*8 +: 8], + 1'b0, INIT[ 877*8 +: 8], 1'b0, INIT[ 876*8 +: 8], 1'b0, INIT[ 873*8 +: 8], 1'b0, INIT[ 872*8 +: 8], + 1'b0, INIT[ 869*8 +: 8], 1'b0, INIT[ 868*8 +: 8], 1'b0, INIT[ 865*8 +: 8], 1'b0, INIT[ 864*8 +: 8], + 1'b0, INIT[ 861*8 +: 8], 1'b0, INIT[ 860*8 +: 8], 1'b0, INIT[ 857*8 +: 8], 1'b0, INIT[ 856*8 +: 8], + 1'b0, INIT[ 853*8 +: 8], 1'b0, INIT[ 852*8 +: 8], 1'b0, INIT[ 849*8 +: 8], 1'b0, INIT[ 848*8 +: 8], + 1'b0, INIT[ 845*8 +: 8], 1'b0, INIT[ 844*8 +: 8], 1'b0, INIT[ 841*8 +: 8], 1'b0, INIT[ 840*8 +: 8], + 1'b0, INIT[ 837*8 +: 8], 1'b0, INIT[ 836*8 +: 8], 1'b0, INIT[ 833*8 +: 8], 1'b0, INIT[ 832*8 +: 8], + 1'b0, INIT[ 829*8 +: 8], 1'b0, INIT[ 828*8 +: 8], 1'b0, INIT[ 825*8 +: 8], 1'b0, INIT[ 824*8 +: 8], + 1'b0, INIT[ 821*8 +: 8], 1'b0, INIT[ 820*8 +: 8], 1'b0, INIT[ 817*8 +: 8], 1'b0, INIT[ 816*8 +: 8], + 1'b0, INIT[ 813*8 +: 8], 1'b0, INIT[ 812*8 +: 8], 1'b0, INIT[ 809*8 +: 8], 1'b0, INIT[ 808*8 +: 8], + 1'b0, INIT[ 805*8 +: 8], 1'b0, INIT[ 804*8 +: 8], 1'b0, INIT[ 801*8 +: 8], 1'b0, INIT[ 800*8 +: 8], + 1'b0, INIT[ 797*8 +: 8], 1'b0, INIT[ 796*8 +: 8], 1'b0, INIT[ 793*8 +: 8], 1'b0, INIT[ 792*8 +: 8], + 1'b0, INIT[ 789*8 +: 8], 1'b0, INIT[ 788*8 +: 8], 1'b0, INIT[ 785*8 +: 8], 1'b0, INIT[ 784*8 +: 8], + 1'b0, INIT[ 781*8 +: 8], 1'b0, INIT[ 780*8 +: 8], 1'b0, INIT[ 777*8 +: 8], 1'b0, INIT[ 776*8 +: 8], + 1'b0, INIT[ 773*8 +: 8], 1'b0, INIT[ 772*8 +: 8], 1'b0, INIT[ 769*8 +: 8], 1'b0, INIT[ 768*8 +: 8], + 1'b0, INIT[ 765*8 +: 8], 1'b0, INIT[ 764*8 +: 8], 1'b0, INIT[ 761*8 +: 8], 1'b0, INIT[ 760*8 +: 8], + 1'b0, INIT[ 757*8 +: 8], 1'b0, INIT[ 756*8 +: 8], 1'b0, INIT[ 753*8 +: 8], 1'b0, INIT[ 752*8 +: 8], + 1'b0, INIT[ 749*8 +: 8], 1'b0, INIT[ 748*8 +: 8], 1'b0, INIT[ 745*8 +: 8], 1'b0, INIT[ 744*8 +: 8], + 1'b0, INIT[ 741*8 +: 8], 1'b0, INIT[ 740*8 +: 8], 1'b0, INIT[ 737*8 +: 8], 1'b0, INIT[ 736*8 +: 8], + 1'b0, INIT[ 733*8 +: 8], 1'b0, INIT[ 732*8 +: 8], 1'b0, INIT[ 729*8 +: 8], 1'b0, INIT[ 728*8 +: 8], + 1'b0, INIT[ 725*8 +: 8], 1'b0, INIT[ 724*8 +: 8], 1'b0, INIT[ 721*8 +: 8], 1'b0, INIT[ 720*8 +: 8], + 1'b0, INIT[ 717*8 +: 8], 1'b0, INIT[ 716*8 +: 8], 1'b0, INIT[ 713*8 +: 8], 1'b0, INIT[ 712*8 +: 8], + 1'b0, INIT[ 709*8 +: 8], 1'b0, INIT[ 708*8 +: 8], 1'b0, INIT[ 705*8 +: 8], 1'b0, INIT[ 704*8 +: 8], + 1'b0, INIT[ 701*8 +: 8], 1'b0, INIT[ 700*8 +: 8], 1'b0, INIT[ 697*8 +: 8], 1'b0, INIT[ 696*8 +: 8], + 1'b0, INIT[ 693*8 +: 8], 1'b0, INIT[ 692*8 +: 8], 1'b0, INIT[ 689*8 +: 8], 1'b0, INIT[ 688*8 +: 8], + 1'b0, INIT[ 685*8 +: 8], 1'b0, INIT[ 684*8 +: 8], 1'b0, INIT[ 681*8 +: 8], 1'b0, INIT[ 680*8 +: 8], + 1'b0, INIT[ 677*8 +: 8], 1'b0, INIT[ 676*8 +: 8], 1'b0, INIT[ 673*8 +: 8], 1'b0, INIT[ 672*8 +: 8], + 1'b0, INIT[ 669*8 +: 8], 1'b0, INIT[ 668*8 +: 8], 1'b0, INIT[ 665*8 +: 8], 1'b0, INIT[ 664*8 +: 8], + 1'b0, INIT[ 661*8 +: 8], 1'b0, INIT[ 660*8 +: 8], 1'b0, INIT[ 657*8 +: 8], 1'b0, INIT[ 656*8 +: 8], + 1'b0, INIT[ 653*8 +: 8], 1'b0, INIT[ 652*8 +: 8], 1'b0, INIT[ 649*8 +: 8], 1'b0, INIT[ 648*8 +: 8], + 1'b0, INIT[ 645*8 +: 8], 1'b0, INIT[ 644*8 +: 8], 1'b0, INIT[ 641*8 +: 8], 1'b0, INIT[ 640*8 +: 8], + 1'b0, INIT[ 637*8 +: 8], 1'b0, INIT[ 636*8 +: 8], 1'b0, INIT[ 633*8 +: 8], 1'b0, INIT[ 632*8 +: 8], + 1'b0, INIT[ 629*8 +: 8], 1'b0, INIT[ 628*8 +: 8], 1'b0, INIT[ 625*8 +: 8], 1'b0, INIT[ 624*8 +: 8], + 1'b0, INIT[ 621*8 +: 8], 1'b0, INIT[ 620*8 +: 8], 1'b0, INIT[ 617*8 +: 8], 1'b0, INIT[ 616*8 +: 8], + 1'b0, INIT[ 613*8 +: 8], 1'b0, INIT[ 612*8 +: 8], 1'b0, INIT[ 609*8 +: 8], 1'b0, INIT[ 608*8 +: 8], + 1'b0, INIT[ 605*8 +: 8], 1'b0, INIT[ 604*8 +: 8], 1'b0, INIT[ 601*8 +: 8], 1'b0, INIT[ 600*8 +: 8], + 1'b0, INIT[ 597*8 +: 8], 1'b0, INIT[ 596*8 +: 8], 1'b0, INIT[ 593*8 +: 8], 1'b0, INIT[ 592*8 +: 8], + 1'b0, INIT[ 589*8 +: 8], 1'b0, INIT[ 588*8 +: 8], 1'b0, INIT[ 585*8 +: 8], 1'b0, INIT[ 584*8 +: 8], + 1'b0, INIT[ 581*8 +: 8], 1'b0, INIT[ 580*8 +: 8], 1'b0, INIT[ 577*8 +: 8], 1'b0, INIT[ 576*8 +: 8], + 1'b0, INIT[ 573*8 +: 8], 1'b0, INIT[ 572*8 +: 8], 1'b0, INIT[ 569*8 +: 8], 1'b0, INIT[ 568*8 +: 8], + 1'b0, INIT[ 565*8 +: 8], 1'b0, INIT[ 564*8 +: 8], 1'b0, INIT[ 561*8 +: 8], 1'b0, INIT[ 560*8 +: 8], + 1'b0, INIT[ 557*8 +: 8], 1'b0, INIT[ 556*8 +: 8], 1'b0, INIT[ 553*8 +: 8], 1'b0, INIT[ 552*8 +: 8], + 1'b0, INIT[ 549*8 +: 8], 1'b0, INIT[ 548*8 +: 8], 1'b0, INIT[ 545*8 +: 8], 1'b0, INIT[ 544*8 +: 8], + 1'b0, INIT[ 541*8 +: 8], 1'b0, INIT[ 540*8 +: 8], 1'b0, INIT[ 537*8 +: 8], 1'b0, INIT[ 536*8 +: 8], + 1'b0, INIT[ 533*8 +: 8], 1'b0, INIT[ 532*8 +: 8], 1'b0, INIT[ 529*8 +: 8], 1'b0, INIT[ 528*8 +: 8], + 1'b0, INIT[ 525*8 +: 8], 1'b0, INIT[ 524*8 +: 8], 1'b0, INIT[ 521*8 +: 8], 1'b0, INIT[ 520*8 +: 8], + 1'b0, INIT[ 517*8 +: 8], 1'b0, INIT[ 516*8 +: 8], 1'b0, INIT[ 513*8 +: 8], 1'b0, INIT[ 512*8 +: 8], + 1'b0, INIT[ 509*8 +: 8], 1'b0, INIT[ 508*8 +: 8], 1'b0, INIT[ 505*8 +: 8], 1'b0, INIT[ 504*8 +: 8], + 1'b0, INIT[ 501*8 +: 8], 1'b0, INIT[ 500*8 +: 8], 1'b0, INIT[ 497*8 +: 8], 1'b0, INIT[ 496*8 +: 8], + 1'b0, INIT[ 493*8 +: 8], 1'b0, INIT[ 492*8 +: 8], 1'b0, INIT[ 489*8 +: 8], 1'b0, INIT[ 488*8 +: 8], + 1'b0, INIT[ 485*8 +: 8], 1'b0, INIT[ 484*8 +: 8], 1'b0, INIT[ 481*8 +: 8], 1'b0, INIT[ 480*8 +: 8], + 1'b0, INIT[ 477*8 +: 8], 1'b0, INIT[ 476*8 +: 8], 1'b0, INIT[ 473*8 +: 8], 1'b0, INIT[ 472*8 +: 8], + 1'b0, INIT[ 469*8 +: 8], 1'b0, INIT[ 468*8 +: 8], 1'b0, INIT[ 465*8 +: 8], 1'b0, INIT[ 464*8 +: 8], + 1'b0, INIT[ 461*8 +: 8], 1'b0, INIT[ 460*8 +: 8], 1'b0, INIT[ 457*8 +: 8], 1'b0, INIT[ 456*8 +: 8], + 1'b0, INIT[ 453*8 +: 8], 1'b0, INIT[ 452*8 +: 8], 1'b0, INIT[ 449*8 +: 8], 1'b0, INIT[ 448*8 +: 8], + 1'b0, INIT[ 445*8 +: 8], 1'b0, INIT[ 444*8 +: 8], 1'b0, INIT[ 441*8 +: 8], 1'b0, INIT[ 440*8 +: 8], + 1'b0, INIT[ 437*8 +: 8], 1'b0, INIT[ 436*8 +: 8], 1'b0, INIT[ 433*8 +: 8], 1'b0, INIT[ 432*8 +: 8], + 1'b0, INIT[ 429*8 +: 8], 1'b0, INIT[ 428*8 +: 8], 1'b0, INIT[ 425*8 +: 8], 1'b0, INIT[ 424*8 +: 8], + 1'b0, INIT[ 421*8 +: 8], 1'b0, INIT[ 420*8 +: 8], 1'b0, INIT[ 417*8 +: 8], 1'b0, INIT[ 416*8 +: 8], + 1'b0, INIT[ 413*8 +: 8], 1'b0, INIT[ 412*8 +: 8], 1'b0, INIT[ 409*8 +: 8], 1'b0, INIT[ 408*8 +: 8], + 1'b0, INIT[ 405*8 +: 8], 1'b0, INIT[ 404*8 +: 8], 1'b0, INIT[ 401*8 +: 8], 1'b0, INIT[ 400*8 +: 8], + 1'b0, INIT[ 397*8 +: 8], 1'b0, INIT[ 396*8 +: 8], 1'b0, INIT[ 393*8 +: 8], 1'b0, INIT[ 392*8 +: 8], + 1'b0, INIT[ 389*8 +: 8], 1'b0, INIT[ 388*8 +: 8], 1'b0, INIT[ 385*8 +: 8], 1'b0, INIT[ 384*8 +: 8], + 1'b0, INIT[ 381*8 +: 8], 1'b0, INIT[ 380*8 +: 8], 1'b0, INIT[ 377*8 +: 8], 1'b0, INIT[ 376*8 +: 8], + 1'b0, INIT[ 373*8 +: 8], 1'b0, INIT[ 372*8 +: 8], 1'b0, INIT[ 369*8 +: 8], 1'b0, INIT[ 368*8 +: 8], + 1'b0, INIT[ 365*8 +: 8], 1'b0, INIT[ 364*8 +: 8], 1'b0, INIT[ 361*8 +: 8], 1'b0, INIT[ 360*8 +: 8], + 1'b0, INIT[ 357*8 +: 8], 1'b0, INIT[ 356*8 +: 8], 1'b0, INIT[ 353*8 +: 8], 1'b0, INIT[ 352*8 +: 8], + 1'b0, INIT[ 349*8 +: 8], 1'b0, INIT[ 348*8 +: 8], 1'b0, INIT[ 345*8 +: 8], 1'b0, INIT[ 344*8 +: 8], + 1'b0, INIT[ 341*8 +: 8], 1'b0, INIT[ 340*8 +: 8], 1'b0, INIT[ 337*8 +: 8], 1'b0, INIT[ 336*8 +: 8], + 1'b0, INIT[ 333*8 +: 8], 1'b0, INIT[ 332*8 +: 8], 1'b0, INIT[ 329*8 +: 8], 1'b0, INIT[ 328*8 +: 8], + 1'b0, INIT[ 325*8 +: 8], 1'b0, INIT[ 324*8 +: 8], 1'b0, INIT[ 321*8 +: 8], 1'b0, INIT[ 320*8 +: 8], + 1'b0, INIT[ 317*8 +: 8], 1'b0, INIT[ 316*8 +: 8], 1'b0, INIT[ 313*8 +: 8], 1'b0, INIT[ 312*8 +: 8], + 1'b0, INIT[ 309*8 +: 8], 1'b0, INIT[ 308*8 +: 8], 1'b0, INIT[ 305*8 +: 8], 1'b0, INIT[ 304*8 +: 8], + 1'b0, INIT[ 301*8 +: 8], 1'b0, INIT[ 300*8 +: 8], 1'b0, INIT[ 297*8 +: 8], 1'b0, INIT[ 296*8 +: 8], + 1'b0, INIT[ 293*8 +: 8], 1'b0, INIT[ 292*8 +: 8], 1'b0, INIT[ 289*8 +: 8], 1'b0, INIT[ 288*8 +: 8], + 1'b0, INIT[ 285*8 +: 8], 1'b0, INIT[ 284*8 +: 8], 1'b0, INIT[ 281*8 +: 8], 1'b0, INIT[ 280*8 +: 8], + 1'b0, INIT[ 277*8 +: 8], 1'b0, INIT[ 276*8 +: 8], 1'b0, INIT[ 273*8 +: 8], 1'b0, INIT[ 272*8 +: 8], + 1'b0, INIT[ 269*8 +: 8], 1'b0, INIT[ 268*8 +: 8], 1'b0, INIT[ 265*8 +: 8], 1'b0, INIT[ 264*8 +: 8], + 1'b0, INIT[ 261*8 +: 8], 1'b0, INIT[ 260*8 +: 8], 1'b0, INIT[ 257*8 +: 8], 1'b0, INIT[ 256*8 +: 8], + 1'b0, INIT[ 253*8 +: 8], 1'b0, INIT[ 252*8 +: 8], 1'b0, INIT[ 249*8 +: 8], 1'b0, INIT[ 248*8 +: 8], + 1'b0, INIT[ 245*8 +: 8], 1'b0, INIT[ 244*8 +: 8], 1'b0, INIT[ 241*8 +: 8], 1'b0, INIT[ 240*8 +: 8], + 1'b0, INIT[ 237*8 +: 8], 1'b0, INIT[ 236*8 +: 8], 1'b0, INIT[ 233*8 +: 8], 1'b0, INIT[ 232*8 +: 8], + 1'b0, INIT[ 229*8 +: 8], 1'b0, INIT[ 228*8 +: 8], 1'b0, INIT[ 225*8 +: 8], 1'b0, INIT[ 224*8 +: 8], + 1'b0, INIT[ 221*8 +: 8], 1'b0, INIT[ 220*8 +: 8], 1'b0, INIT[ 217*8 +: 8], 1'b0, INIT[ 216*8 +: 8], + 1'b0, INIT[ 213*8 +: 8], 1'b0, INIT[ 212*8 +: 8], 1'b0, INIT[ 209*8 +: 8], 1'b0, INIT[ 208*8 +: 8], + 1'b0, INIT[ 205*8 +: 8], 1'b0, INIT[ 204*8 +: 8], 1'b0, INIT[ 201*8 +: 8], 1'b0, INIT[ 200*8 +: 8], + 1'b0, INIT[ 197*8 +: 8], 1'b0, INIT[ 196*8 +: 8], 1'b0, INIT[ 193*8 +: 8], 1'b0, INIT[ 192*8 +: 8], + 1'b0, INIT[ 189*8 +: 8], 1'b0, INIT[ 188*8 +: 8], 1'b0, INIT[ 185*8 +: 8], 1'b0, INIT[ 184*8 +: 8], + 1'b0, INIT[ 181*8 +: 8], 1'b0, INIT[ 180*8 +: 8], 1'b0, INIT[ 177*8 +: 8], 1'b0, INIT[ 176*8 +: 8], + 1'b0, INIT[ 173*8 +: 8], 1'b0, INIT[ 172*8 +: 8], 1'b0, INIT[ 169*8 +: 8], 1'b0, INIT[ 168*8 +: 8], + 1'b0, INIT[ 165*8 +: 8], 1'b0, INIT[ 164*8 +: 8], 1'b0, INIT[ 161*8 +: 8], 1'b0, INIT[ 160*8 +: 8], + 1'b0, INIT[ 157*8 +: 8], 1'b0, INIT[ 156*8 +: 8], 1'b0, INIT[ 153*8 +: 8], 1'b0, INIT[ 152*8 +: 8], + 1'b0, INIT[ 149*8 +: 8], 1'b0, INIT[ 148*8 +: 8], 1'b0, INIT[ 145*8 +: 8], 1'b0, INIT[ 144*8 +: 8], + 1'b0, INIT[ 141*8 +: 8], 1'b0, INIT[ 140*8 +: 8], 1'b0, INIT[ 137*8 +: 8], 1'b0, INIT[ 136*8 +: 8], + 1'b0, INIT[ 133*8 +: 8], 1'b0, INIT[ 132*8 +: 8], 1'b0, INIT[ 129*8 +: 8], 1'b0, INIT[ 128*8 +: 8], + 1'b0, INIT[ 125*8 +: 8], 1'b0, INIT[ 124*8 +: 8], 1'b0, INIT[ 121*8 +: 8], 1'b0, INIT[ 120*8 +: 8], + 1'b0, INIT[ 117*8 +: 8], 1'b0, INIT[ 116*8 +: 8], 1'b0, INIT[ 113*8 +: 8], 1'b0, INIT[ 112*8 +: 8], + 1'b0, INIT[ 109*8 +: 8], 1'b0, INIT[ 108*8 +: 8], 1'b0, INIT[ 105*8 +: 8], 1'b0, INIT[ 104*8 +: 8], + 1'b0, INIT[ 101*8 +: 8], 1'b0, INIT[ 100*8 +: 8], 1'b0, INIT[ 97*8 +: 8], 1'b0, INIT[ 96*8 +: 8], + 1'b0, INIT[ 93*8 +: 8], 1'b0, INIT[ 92*8 +: 8], 1'b0, INIT[ 89*8 +: 8], 1'b0, INIT[ 88*8 +: 8], + 1'b0, INIT[ 85*8 +: 8], 1'b0, INIT[ 84*8 +: 8], 1'b0, INIT[ 81*8 +: 8], 1'b0, INIT[ 80*8 +: 8], + 1'b0, INIT[ 77*8 +: 8], 1'b0, INIT[ 76*8 +: 8], 1'b0, INIT[ 73*8 +: 8], 1'b0, INIT[ 72*8 +: 8], + 1'b0, INIT[ 69*8 +: 8], 1'b0, INIT[ 68*8 +: 8], 1'b0, INIT[ 65*8 +: 8], 1'b0, INIT[ 64*8 +: 8], + 1'b0, INIT[ 61*8 +: 8], 1'b0, INIT[ 60*8 +: 8], 1'b0, INIT[ 57*8 +: 8], 1'b0, INIT[ 56*8 +: 8], + 1'b0, INIT[ 53*8 +: 8], 1'b0, INIT[ 52*8 +: 8], 1'b0, INIT[ 49*8 +: 8], 1'b0, INIT[ 48*8 +: 8], + 1'b0, INIT[ 45*8 +: 8], 1'b0, INIT[ 44*8 +: 8], 1'b0, INIT[ 41*8 +: 8], 1'b0, INIT[ 40*8 +: 8], + 1'b0, INIT[ 37*8 +: 8], 1'b0, INIT[ 36*8 +: 8], 1'b0, INIT[ 33*8 +: 8], 1'b0, INIT[ 32*8 +: 8], + 1'b0, INIT[ 29*8 +: 8], 1'b0, INIT[ 28*8 +: 8], 1'b0, INIT[ 25*8 +: 8], 1'b0, INIT[ 24*8 +: 8], + 1'b0, INIT[ 21*8 +: 8], 1'b0, INIT[ 20*8 +: 8], 1'b0, INIT[ 17*8 +: 8], 1'b0, INIT[ 16*8 +: 8], + 1'b0, INIT[ 13*8 +: 8], 1'b0, INIT[ 12*8 +: 8], 1'b0, INIT[ 9*8 +: 8], 1'b0, INIT[ 8*8 +: 8], + 1'b0, INIT[ 5*8 +: 8], 1'b0, INIT[ 4*8 +: 8], 1'b0, INIT[ 1*8 +: 8], 1'b0, INIT[ 0*8 +: 8]}), diff --git a/ql-qlf-plugin/pp3/pp3_bram_init_8_16.vh b/ql-qlf-plugin/pp3/pp3_bram_init_8_16.vh new file mode 100644 index 000000000..2de9f8b65 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_bram_init_8_16.vh @@ -0,0 +1,512 @@ +.INIT({1'b0, INIT[2047*8 +: 8], 1'b0, INIT[2046*8 +: 8], 1'b0, INIT[2045*8 +: 8], 1'b0, INIT[2044*8 +: 8], + 1'b0, INIT[2043*8 +: 8], 1'b0, INIT[2042*8 +: 8], 1'b0, INIT[2041*8 +: 8], 1'b0, INIT[2040*8 +: 8], + 1'b0, INIT[2039*8 +: 8], 1'b0, INIT[2038*8 +: 8], 1'b0, INIT[2037*8 +: 8], 1'b0, INIT[2036*8 +: 8], + 1'b0, INIT[2035*8 +: 8], 1'b0, INIT[2034*8 +: 8], 1'b0, INIT[2033*8 +: 8], 1'b0, INIT[2032*8 +: 8], + 1'b0, INIT[2031*8 +: 8], 1'b0, INIT[2030*8 +: 8], 1'b0, INIT[2029*8 +: 8], 1'b0, INIT[2028*8 +: 8], + 1'b0, INIT[2027*8 +: 8], 1'b0, INIT[2026*8 +: 8], 1'b0, INIT[2025*8 +: 8], 1'b0, INIT[2024*8 +: 8], + 1'b0, INIT[2023*8 +: 8], 1'b0, INIT[2022*8 +: 8], 1'b0, INIT[2021*8 +: 8], 1'b0, INIT[2020*8 +: 8], + 1'b0, INIT[2019*8 +: 8], 1'b0, INIT[2018*8 +: 8], 1'b0, INIT[2017*8 +: 8], 1'b0, INIT[2016*8 +: 8], + 1'b0, INIT[2015*8 +: 8], 1'b0, INIT[2014*8 +: 8], 1'b0, INIT[2013*8 +: 8], 1'b0, INIT[2012*8 +: 8], + 1'b0, INIT[2011*8 +: 8], 1'b0, INIT[2010*8 +: 8], 1'b0, INIT[2009*8 +: 8], 1'b0, INIT[2008*8 +: 8], + 1'b0, INIT[2007*8 +: 8], 1'b0, INIT[2006*8 +: 8], 1'b0, INIT[2005*8 +: 8], 1'b0, INIT[2004*8 +: 8], + 1'b0, INIT[2003*8 +: 8], 1'b0, INIT[2002*8 +: 8], 1'b0, INIT[2001*8 +: 8], 1'b0, INIT[2000*8 +: 8], + 1'b0, INIT[1999*8 +: 8], 1'b0, INIT[1998*8 +: 8], 1'b0, INIT[1997*8 +: 8], 1'b0, INIT[1996*8 +: 8], + 1'b0, INIT[1995*8 +: 8], 1'b0, INIT[1994*8 +: 8], 1'b0, INIT[1993*8 +: 8], 1'b0, INIT[1992*8 +: 8], + 1'b0, INIT[1991*8 +: 8], 1'b0, INIT[1990*8 +: 8], 1'b0, INIT[1989*8 +: 8], 1'b0, INIT[1988*8 +: 8], + 1'b0, INIT[1987*8 +: 8], 1'b0, INIT[1986*8 +: 8], 1'b0, INIT[1985*8 +: 8], 1'b0, INIT[1984*8 +: 8], + 1'b0, INIT[1983*8 +: 8], 1'b0, INIT[1982*8 +: 8], 1'b0, INIT[1981*8 +: 8], 1'b0, INIT[1980*8 +: 8], + 1'b0, INIT[1979*8 +: 8], 1'b0, INIT[1978*8 +: 8], 1'b0, INIT[1977*8 +: 8], 1'b0, INIT[1976*8 +: 8], + 1'b0, INIT[1975*8 +: 8], 1'b0, INIT[1974*8 +: 8], 1'b0, INIT[1973*8 +: 8], 1'b0, INIT[1972*8 +: 8], + 1'b0, INIT[1971*8 +: 8], 1'b0, INIT[1970*8 +: 8], 1'b0, INIT[1969*8 +: 8], 1'b0, INIT[1968*8 +: 8], + 1'b0, INIT[1967*8 +: 8], 1'b0, INIT[1966*8 +: 8], 1'b0, INIT[1965*8 +: 8], 1'b0, INIT[1964*8 +: 8], + 1'b0, INIT[1963*8 +: 8], 1'b0, INIT[1962*8 +: 8], 1'b0, INIT[1961*8 +: 8], 1'b0, INIT[1960*8 +: 8], + 1'b0, INIT[1959*8 +: 8], 1'b0, INIT[1958*8 +: 8], 1'b0, INIT[1957*8 +: 8], 1'b0, INIT[1956*8 +: 8], + 1'b0, INIT[1955*8 +: 8], 1'b0, INIT[1954*8 +: 8], 1'b0, INIT[1953*8 +: 8], 1'b0, INIT[1952*8 +: 8], + 1'b0, INIT[1951*8 +: 8], 1'b0, INIT[1950*8 +: 8], 1'b0, INIT[1949*8 +: 8], 1'b0, INIT[1948*8 +: 8], + 1'b0, INIT[1947*8 +: 8], 1'b0, INIT[1946*8 +: 8], 1'b0, INIT[1945*8 +: 8], 1'b0, INIT[1944*8 +: 8], + 1'b0, INIT[1943*8 +: 8], 1'b0, INIT[1942*8 +: 8], 1'b0, INIT[1941*8 +: 8], 1'b0, INIT[1940*8 +: 8], + 1'b0, INIT[1939*8 +: 8], 1'b0, INIT[1938*8 +: 8], 1'b0, INIT[1937*8 +: 8], 1'b0, INIT[1936*8 +: 8], + 1'b0, INIT[1935*8 +: 8], 1'b0, INIT[1934*8 +: 8], 1'b0, INIT[1933*8 +: 8], 1'b0, INIT[1932*8 +: 8], + 1'b0, INIT[1931*8 +: 8], 1'b0, INIT[1930*8 +: 8], 1'b0, INIT[1929*8 +: 8], 1'b0, INIT[1928*8 +: 8], + 1'b0, INIT[1927*8 +: 8], 1'b0, INIT[1926*8 +: 8], 1'b0, INIT[1925*8 +: 8], 1'b0, INIT[1924*8 +: 8], + 1'b0, INIT[1923*8 +: 8], 1'b0, INIT[1922*8 +: 8], 1'b0, INIT[1921*8 +: 8], 1'b0, INIT[1920*8 +: 8], + 1'b0, INIT[1919*8 +: 8], 1'b0, INIT[1918*8 +: 8], 1'b0, INIT[1917*8 +: 8], 1'b0, INIT[1916*8 +: 8], + 1'b0, INIT[1915*8 +: 8], 1'b0, INIT[1914*8 +: 8], 1'b0, INIT[1913*8 +: 8], 1'b0, INIT[1912*8 +: 8], + 1'b0, INIT[1911*8 +: 8], 1'b0, INIT[1910*8 +: 8], 1'b0, INIT[1909*8 +: 8], 1'b0, INIT[1908*8 +: 8], + 1'b0, INIT[1907*8 +: 8], 1'b0, INIT[1906*8 +: 8], 1'b0, INIT[1905*8 +: 8], 1'b0, INIT[1904*8 +: 8], + 1'b0, INIT[1903*8 +: 8], 1'b0, INIT[1902*8 +: 8], 1'b0, INIT[1901*8 +: 8], 1'b0, INIT[1900*8 +: 8], + 1'b0, INIT[1899*8 +: 8], 1'b0, INIT[1898*8 +: 8], 1'b0, INIT[1897*8 +: 8], 1'b0, INIT[1896*8 +: 8], + 1'b0, INIT[1895*8 +: 8], 1'b0, INIT[1894*8 +: 8], 1'b0, INIT[1893*8 +: 8], 1'b0, INIT[1892*8 +: 8], + 1'b0, INIT[1891*8 +: 8], 1'b0, INIT[1890*8 +: 8], 1'b0, INIT[1889*8 +: 8], 1'b0, INIT[1888*8 +: 8], + 1'b0, INIT[1887*8 +: 8], 1'b0, INIT[1886*8 +: 8], 1'b0, INIT[1885*8 +: 8], 1'b0, INIT[1884*8 +: 8], + 1'b0, INIT[1883*8 +: 8], 1'b0, INIT[1882*8 +: 8], 1'b0, INIT[1881*8 +: 8], 1'b0, INIT[1880*8 +: 8], + 1'b0, INIT[1879*8 +: 8], 1'b0, INIT[1878*8 +: 8], 1'b0, INIT[1877*8 +: 8], 1'b0, INIT[1876*8 +: 8], + 1'b0, INIT[1875*8 +: 8], 1'b0, INIT[1874*8 +: 8], 1'b0, INIT[1873*8 +: 8], 1'b0, INIT[1872*8 +: 8], + 1'b0, INIT[1871*8 +: 8], 1'b0, INIT[1870*8 +: 8], 1'b0, INIT[1869*8 +: 8], 1'b0, INIT[1868*8 +: 8], + 1'b0, INIT[1867*8 +: 8], 1'b0, INIT[1866*8 +: 8], 1'b0, INIT[1865*8 +: 8], 1'b0, INIT[1864*8 +: 8], + 1'b0, INIT[1863*8 +: 8], 1'b0, INIT[1862*8 +: 8], 1'b0, INIT[1861*8 +: 8], 1'b0, INIT[1860*8 +: 8], + 1'b0, INIT[1859*8 +: 8], 1'b0, INIT[1858*8 +: 8], 1'b0, INIT[1857*8 +: 8], 1'b0, INIT[1856*8 +: 8], + 1'b0, INIT[1855*8 +: 8], 1'b0, INIT[1854*8 +: 8], 1'b0, INIT[1853*8 +: 8], 1'b0, INIT[1852*8 +: 8], + 1'b0, INIT[1851*8 +: 8], 1'b0, INIT[1850*8 +: 8], 1'b0, INIT[1849*8 +: 8], 1'b0, INIT[1848*8 +: 8], + 1'b0, INIT[1847*8 +: 8], 1'b0, INIT[1846*8 +: 8], 1'b0, INIT[1845*8 +: 8], 1'b0, INIT[1844*8 +: 8], + 1'b0, INIT[1843*8 +: 8], 1'b0, INIT[1842*8 +: 8], 1'b0, INIT[1841*8 +: 8], 1'b0, INIT[1840*8 +: 8], + 1'b0, INIT[1839*8 +: 8], 1'b0, INIT[1838*8 +: 8], 1'b0, INIT[1837*8 +: 8], 1'b0, INIT[1836*8 +: 8], + 1'b0, INIT[1835*8 +: 8], 1'b0, INIT[1834*8 +: 8], 1'b0, INIT[1833*8 +: 8], 1'b0, INIT[1832*8 +: 8], + 1'b0, INIT[1831*8 +: 8], 1'b0, INIT[1830*8 +: 8], 1'b0, INIT[1829*8 +: 8], 1'b0, INIT[1828*8 +: 8], + 1'b0, INIT[1827*8 +: 8], 1'b0, INIT[1826*8 +: 8], 1'b0, INIT[1825*8 +: 8], 1'b0, INIT[1824*8 +: 8], + 1'b0, INIT[1823*8 +: 8], 1'b0, INIT[1822*8 +: 8], 1'b0, INIT[1821*8 +: 8], 1'b0, INIT[1820*8 +: 8], + 1'b0, INIT[1819*8 +: 8], 1'b0, INIT[1818*8 +: 8], 1'b0, INIT[1817*8 +: 8], 1'b0, INIT[1816*8 +: 8], + 1'b0, INIT[1815*8 +: 8], 1'b0, INIT[1814*8 +: 8], 1'b0, INIT[1813*8 +: 8], 1'b0, INIT[1812*8 +: 8], + 1'b0, INIT[1811*8 +: 8], 1'b0, INIT[1810*8 +: 8], 1'b0, INIT[1809*8 +: 8], 1'b0, INIT[1808*8 +: 8], + 1'b0, INIT[1807*8 +: 8], 1'b0, INIT[1806*8 +: 8], 1'b0, INIT[1805*8 +: 8], 1'b0, INIT[1804*8 +: 8], + 1'b0, INIT[1803*8 +: 8], 1'b0, INIT[1802*8 +: 8], 1'b0, INIT[1801*8 +: 8], 1'b0, INIT[1800*8 +: 8], + 1'b0, INIT[1799*8 +: 8], 1'b0, INIT[1798*8 +: 8], 1'b0, INIT[1797*8 +: 8], 1'b0, INIT[1796*8 +: 8], + 1'b0, INIT[1795*8 +: 8], 1'b0, INIT[1794*8 +: 8], 1'b0, INIT[1793*8 +: 8], 1'b0, INIT[1792*8 +: 8], + 1'b0, INIT[1791*8 +: 8], 1'b0, INIT[1790*8 +: 8], 1'b0, INIT[1789*8 +: 8], 1'b0, INIT[1788*8 +: 8], + 1'b0, INIT[1787*8 +: 8], 1'b0, INIT[1786*8 +: 8], 1'b0, INIT[1785*8 +: 8], 1'b0, INIT[1784*8 +: 8], + 1'b0, INIT[1783*8 +: 8], 1'b0, INIT[1782*8 +: 8], 1'b0, INIT[1781*8 +: 8], 1'b0, INIT[1780*8 +: 8], + 1'b0, INIT[1779*8 +: 8], 1'b0, INIT[1778*8 +: 8], 1'b0, INIT[1777*8 +: 8], 1'b0, INIT[1776*8 +: 8], + 1'b0, INIT[1775*8 +: 8], 1'b0, INIT[1774*8 +: 8], 1'b0, INIT[1773*8 +: 8], 1'b0, INIT[1772*8 +: 8], + 1'b0, INIT[1771*8 +: 8], 1'b0, INIT[1770*8 +: 8], 1'b0, INIT[1769*8 +: 8], 1'b0, INIT[1768*8 +: 8], + 1'b0, INIT[1767*8 +: 8], 1'b0, INIT[1766*8 +: 8], 1'b0, INIT[1765*8 +: 8], 1'b0, INIT[1764*8 +: 8], + 1'b0, INIT[1763*8 +: 8], 1'b0, INIT[1762*8 +: 8], 1'b0, INIT[1761*8 +: 8], 1'b0, INIT[1760*8 +: 8], + 1'b0, INIT[1759*8 +: 8], 1'b0, INIT[1758*8 +: 8], 1'b0, INIT[1757*8 +: 8], 1'b0, INIT[1756*8 +: 8], + 1'b0, INIT[1755*8 +: 8], 1'b0, INIT[1754*8 +: 8], 1'b0, INIT[1753*8 +: 8], 1'b0, INIT[1752*8 +: 8], + 1'b0, INIT[1751*8 +: 8], 1'b0, INIT[1750*8 +: 8], 1'b0, INIT[1749*8 +: 8], 1'b0, INIT[1748*8 +: 8], + 1'b0, INIT[1747*8 +: 8], 1'b0, INIT[1746*8 +: 8], 1'b0, INIT[1745*8 +: 8], 1'b0, INIT[1744*8 +: 8], + 1'b0, INIT[1743*8 +: 8], 1'b0, INIT[1742*8 +: 8], 1'b0, INIT[1741*8 +: 8], 1'b0, INIT[1740*8 +: 8], + 1'b0, INIT[1739*8 +: 8], 1'b0, INIT[1738*8 +: 8], 1'b0, INIT[1737*8 +: 8], 1'b0, INIT[1736*8 +: 8], + 1'b0, INIT[1735*8 +: 8], 1'b0, INIT[1734*8 +: 8], 1'b0, INIT[1733*8 +: 8], 1'b0, INIT[1732*8 +: 8], + 1'b0, INIT[1731*8 +: 8], 1'b0, INIT[1730*8 +: 8], 1'b0, INIT[1729*8 +: 8], 1'b0, INIT[1728*8 +: 8], + 1'b0, INIT[1727*8 +: 8], 1'b0, INIT[1726*8 +: 8], 1'b0, INIT[1725*8 +: 8], 1'b0, INIT[1724*8 +: 8], + 1'b0, INIT[1723*8 +: 8], 1'b0, INIT[1722*8 +: 8], 1'b0, INIT[1721*8 +: 8], 1'b0, INIT[1720*8 +: 8], + 1'b0, INIT[1719*8 +: 8], 1'b0, INIT[1718*8 +: 8], 1'b0, INIT[1717*8 +: 8], 1'b0, INIT[1716*8 +: 8], + 1'b0, INIT[1715*8 +: 8], 1'b0, INIT[1714*8 +: 8], 1'b0, INIT[1713*8 +: 8], 1'b0, INIT[1712*8 +: 8], + 1'b0, INIT[1711*8 +: 8], 1'b0, INIT[1710*8 +: 8], 1'b0, INIT[1709*8 +: 8], 1'b0, INIT[1708*8 +: 8], + 1'b0, INIT[1707*8 +: 8], 1'b0, INIT[1706*8 +: 8], 1'b0, INIT[1705*8 +: 8], 1'b0, INIT[1704*8 +: 8], + 1'b0, INIT[1703*8 +: 8], 1'b0, INIT[1702*8 +: 8], 1'b0, INIT[1701*8 +: 8], 1'b0, INIT[1700*8 +: 8], + 1'b0, INIT[1699*8 +: 8], 1'b0, INIT[1698*8 +: 8], 1'b0, INIT[1697*8 +: 8], 1'b0, INIT[1696*8 +: 8], + 1'b0, INIT[1695*8 +: 8], 1'b0, INIT[1694*8 +: 8], 1'b0, INIT[1693*8 +: 8], 1'b0, INIT[1692*8 +: 8], + 1'b0, INIT[1691*8 +: 8], 1'b0, INIT[1690*8 +: 8], 1'b0, INIT[1689*8 +: 8], 1'b0, INIT[1688*8 +: 8], + 1'b0, INIT[1687*8 +: 8], 1'b0, INIT[1686*8 +: 8], 1'b0, INIT[1685*8 +: 8], 1'b0, INIT[1684*8 +: 8], + 1'b0, INIT[1683*8 +: 8], 1'b0, INIT[1682*8 +: 8], 1'b0, INIT[1681*8 +: 8], 1'b0, INIT[1680*8 +: 8], + 1'b0, INIT[1679*8 +: 8], 1'b0, INIT[1678*8 +: 8], 1'b0, INIT[1677*8 +: 8], 1'b0, INIT[1676*8 +: 8], + 1'b0, INIT[1675*8 +: 8], 1'b0, INIT[1674*8 +: 8], 1'b0, INIT[1673*8 +: 8], 1'b0, INIT[1672*8 +: 8], + 1'b0, INIT[1671*8 +: 8], 1'b0, INIT[1670*8 +: 8], 1'b0, INIT[1669*8 +: 8], 1'b0, INIT[1668*8 +: 8], + 1'b0, INIT[1667*8 +: 8], 1'b0, INIT[1666*8 +: 8], 1'b0, INIT[1665*8 +: 8], 1'b0, INIT[1664*8 +: 8], + 1'b0, INIT[1663*8 +: 8], 1'b0, INIT[1662*8 +: 8], 1'b0, INIT[1661*8 +: 8], 1'b0, INIT[1660*8 +: 8], + 1'b0, INIT[1659*8 +: 8], 1'b0, INIT[1658*8 +: 8], 1'b0, INIT[1657*8 +: 8], 1'b0, INIT[1656*8 +: 8], + 1'b0, INIT[1655*8 +: 8], 1'b0, INIT[1654*8 +: 8], 1'b0, INIT[1653*8 +: 8], 1'b0, INIT[1652*8 +: 8], + 1'b0, INIT[1651*8 +: 8], 1'b0, INIT[1650*8 +: 8], 1'b0, INIT[1649*8 +: 8], 1'b0, INIT[1648*8 +: 8], + 1'b0, INIT[1647*8 +: 8], 1'b0, INIT[1646*8 +: 8], 1'b0, INIT[1645*8 +: 8], 1'b0, INIT[1644*8 +: 8], + 1'b0, INIT[1643*8 +: 8], 1'b0, INIT[1642*8 +: 8], 1'b0, INIT[1641*8 +: 8], 1'b0, INIT[1640*8 +: 8], + 1'b0, INIT[1639*8 +: 8], 1'b0, INIT[1638*8 +: 8], 1'b0, INIT[1637*8 +: 8], 1'b0, INIT[1636*8 +: 8], + 1'b0, INIT[1635*8 +: 8], 1'b0, INIT[1634*8 +: 8], 1'b0, INIT[1633*8 +: 8], 1'b0, INIT[1632*8 +: 8], + 1'b0, INIT[1631*8 +: 8], 1'b0, INIT[1630*8 +: 8], 1'b0, INIT[1629*8 +: 8], 1'b0, INIT[1628*8 +: 8], + 1'b0, INIT[1627*8 +: 8], 1'b0, INIT[1626*8 +: 8], 1'b0, INIT[1625*8 +: 8], 1'b0, INIT[1624*8 +: 8], + 1'b0, INIT[1623*8 +: 8], 1'b0, INIT[1622*8 +: 8], 1'b0, INIT[1621*8 +: 8], 1'b0, INIT[1620*8 +: 8], + 1'b0, INIT[1619*8 +: 8], 1'b0, INIT[1618*8 +: 8], 1'b0, INIT[1617*8 +: 8], 1'b0, INIT[1616*8 +: 8], + 1'b0, INIT[1615*8 +: 8], 1'b0, INIT[1614*8 +: 8], 1'b0, INIT[1613*8 +: 8], 1'b0, INIT[1612*8 +: 8], + 1'b0, INIT[1611*8 +: 8], 1'b0, INIT[1610*8 +: 8], 1'b0, INIT[1609*8 +: 8], 1'b0, INIT[1608*8 +: 8], + 1'b0, INIT[1607*8 +: 8], 1'b0, INIT[1606*8 +: 8], 1'b0, INIT[1605*8 +: 8], 1'b0, INIT[1604*8 +: 8], + 1'b0, INIT[1603*8 +: 8], 1'b0, INIT[1602*8 +: 8], 1'b0, INIT[1601*8 +: 8], 1'b0, INIT[1600*8 +: 8], + 1'b0, INIT[1599*8 +: 8], 1'b0, INIT[1598*8 +: 8], 1'b0, INIT[1597*8 +: 8], 1'b0, INIT[1596*8 +: 8], + 1'b0, INIT[1595*8 +: 8], 1'b0, INIT[1594*8 +: 8], 1'b0, INIT[1593*8 +: 8], 1'b0, INIT[1592*8 +: 8], + 1'b0, INIT[1591*8 +: 8], 1'b0, INIT[1590*8 +: 8], 1'b0, INIT[1589*8 +: 8], 1'b0, INIT[1588*8 +: 8], + 1'b0, INIT[1587*8 +: 8], 1'b0, INIT[1586*8 +: 8], 1'b0, INIT[1585*8 +: 8], 1'b0, INIT[1584*8 +: 8], + 1'b0, INIT[1583*8 +: 8], 1'b0, INIT[1582*8 +: 8], 1'b0, INIT[1581*8 +: 8], 1'b0, INIT[1580*8 +: 8], + 1'b0, INIT[1579*8 +: 8], 1'b0, INIT[1578*8 +: 8], 1'b0, INIT[1577*8 +: 8], 1'b0, INIT[1576*8 +: 8], + 1'b0, INIT[1575*8 +: 8], 1'b0, INIT[1574*8 +: 8], 1'b0, INIT[1573*8 +: 8], 1'b0, INIT[1572*8 +: 8], + 1'b0, INIT[1571*8 +: 8], 1'b0, INIT[1570*8 +: 8], 1'b0, INIT[1569*8 +: 8], 1'b0, INIT[1568*8 +: 8], + 1'b0, INIT[1567*8 +: 8], 1'b0, INIT[1566*8 +: 8], 1'b0, INIT[1565*8 +: 8], 1'b0, INIT[1564*8 +: 8], + 1'b0, INIT[1563*8 +: 8], 1'b0, INIT[1562*8 +: 8], 1'b0, INIT[1561*8 +: 8], 1'b0, INIT[1560*8 +: 8], + 1'b0, INIT[1559*8 +: 8], 1'b0, INIT[1558*8 +: 8], 1'b0, INIT[1557*8 +: 8], 1'b0, INIT[1556*8 +: 8], + 1'b0, INIT[1555*8 +: 8], 1'b0, INIT[1554*8 +: 8], 1'b0, INIT[1553*8 +: 8], 1'b0, INIT[1552*8 +: 8], + 1'b0, INIT[1551*8 +: 8], 1'b0, INIT[1550*8 +: 8], 1'b0, INIT[1549*8 +: 8], 1'b0, INIT[1548*8 +: 8], + 1'b0, INIT[1547*8 +: 8], 1'b0, INIT[1546*8 +: 8], 1'b0, INIT[1545*8 +: 8], 1'b0, INIT[1544*8 +: 8], + 1'b0, INIT[1543*8 +: 8], 1'b0, INIT[1542*8 +: 8], 1'b0, INIT[1541*8 +: 8], 1'b0, INIT[1540*8 +: 8], + 1'b0, INIT[1539*8 +: 8], 1'b0, INIT[1538*8 +: 8], 1'b0, INIT[1537*8 +: 8], 1'b0, INIT[1536*8 +: 8], + 1'b0, INIT[1535*8 +: 8], 1'b0, INIT[1534*8 +: 8], 1'b0, INIT[1533*8 +: 8], 1'b0, INIT[1532*8 +: 8], + 1'b0, INIT[1531*8 +: 8], 1'b0, INIT[1530*8 +: 8], 1'b0, INIT[1529*8 +: 8], 1'b0, INIT[1528*8 +: 8], + 1'b0, INIT[1527*8 +: 8], 1'b0, INIT[1526*8 +: 8], 1'b0, INIT[1525*8 +: 8], 1'b0, INIT[1524*8 +: 8], + 1'b0, INIT[1523*8 +: 8], 1'b0, INIT[1522*8 +: 8], 1'b0, INIT[1521*8 +: 8], 1'b0, INIT[1520*8 +: 8], + 1'b0, INIT[1519*8 +: 8], 1'b0, INIT[1518*8 +: 8], 1'b0, INIT[1517*8 +: 8], 1'b0, INIT[1516*8 +: 8], + 1'b0, INIT[1515*8 +: 8], 1'b0, INIT[1514*8 +: 8], 1'b0, INIT[1513*8 +: 8], 1'b0, INIT[1512*8 +: 8], + 1'b0, INIT[1511*8 +: 8], 1'b0, INIT[1510*8 +: 8], 1'b0, INIT[1509*8 +: 8], 1'b0, INIT[1508*8 +: 8], + 1'b0, INIT[1507*8 +: 8], 1'b0, INIT[1506*8 +: 8], 1'b0, INIT[1505*8 +: 8], 1'b0, INIT[1504*8 +: 8], + 1'b0, INIT[1503*8 +: 8], 1'b0, INIT[1502*8 +: 8], 1'b0, INIT[1501*8 +: 8], 1'b0, INIT[1500*8 +: 8], + 1'b0, INIT[1499*8 +: 8], 1'b0, INIT[1498*8 +: 8], 1'b0, INIT[1497*8 +: 8], 1'b0, INIT[1496*8 +: 8], + 1'b0, INIT[1495*8 +: 8], 1'b0, INIT[1494*8 +: 8], 1'b0, INIT[1493*8 +: 8], 1'b0, INIT[1492*8 +: 8], + 1'b0, INIT[1491*8 +: 8], 1'b0, INIT[1490*8 +: 8], 1'b0, INIT[1489*8 +: 8], 1'b0, INIT[1488*8 +: 8], + 1'b0, INIT[1487*8 +: 8], 1'b0, INIT[1486*8 +: 8], 1'b0, INIT[1485*8 +: 8], 1'b0, INIT[1484*8 +: 8], + 1'b0, INIT[1483*8 +: 8], 1'b0, INIT[1482*8 +: 8], 1'b0, INIT[1481*8 +: 8], 1'b0, INIT[1480*8 +: 8], + 1'b0, INIT[1479*8 +: 8], 1'b0, INIT[1478*8 +: 8], 1'b0, INIT[1477*8 +: 8], 1'b0, INIT[1476*8 +: 8], + 1'b0, INIT[1475*8 +: 8], 1'b0, INIT[1474*8 +: 8], 1'b0, INIT[1473*8 +: 8], 1'b0, INIT[1472*8 +: 8], + 1'b0, INIT[1471*8 +: 8], 1'b0, INIT[1470*8 +: 8], 1'b0, INIT[1469*8 +: 8], 1'b0, INIT[1468*8 +: 8], + 1'b0, INIT[1467*8 +: 8], 1'b0, INIT[1466*8 +: 8], 1'b0, INIT[1465*8 +: 8], 1'b0, INIT[1464*8 +: 8], + 1'b0, INIT[1463*8 +: 8], 1'b0, INIT[1462*8 +: 8], 1'b0, INIT[1461*8 +: 8], 1'b0, INIT[1460*8 +: 8], + 1'b0, INIT[1459*8 +: 8], 1'b0, INIT[1458*8 +: 8], 1'b0, INIT[1457*8 +: 8], 1'b0, INIT[1456*8 +: 8], + 1'b0, INIT[1455*8 +: 8], 1'b0, INIT[1454*8 +: 8], 1'b0, INIT[1453*8 +: 8], 1'b0, INIT[1452*8 +: 8], + 1'b0, INIT[1451*8 +: 8], 1'b0, INIT[1450*8 +: 8], 1'b0, INIT[1449*8 +: 8], 1'b0, INIT[1448*8 +: 8], + 1'b0, INIT[1447*8 +: 8], 1'b0, INIT[1446*8 +: 8], 1'b0, INIT[1445*8 +: 8], 1'b0, INIT[1444*8 +: 8], + 1'b0, INIT[1443*8 +: 8], 1'b0, INIT[1442*8 +: 8], 1'b0, INIT[1441*8 +: 8], 1'b0, INIT[1440*8 +: 8], + 1'b0, INIT[1439*8 +: 8], 1'b0, INIT[1438*8 +: 8], 1'b0, INIT[1437*8 +: 8], 1'b0, INIT[1436*8 +: 8], + 1'b0, INIT[1435*8 +: 8], 1'b0, INIT[1434*8 +: 8], 1'b0, INIT[1433*8 +: 8], 1'b0, INIT[1432*8 +: 8], + 1'b0, INIT[1431*8 +: 8], 1'b0, INIT[1430*8 +: 8], 1'b0, INIT[1429*8 +: 8], 1'b0, INIT[1428*8 +: 8], + 1'b0, INIT[1427*8 +: 8], 1'b0, INIT[1426*8 +: 8], 1'b0, INIT[1425*8 +: 8], 1'b0, INIT[1424*8 +: 8], + 1'b0, INIT[1423*8 +: 8], 1'b0, INIT[1422*8 +: 8], 1'b0, INIT[1421*8 +: 8], 1'b0, INIT[1420*8 +: 8], + 1'b0, INIT[1419*8 +: 8], 1'b0, INIT[1418*8 +: 8], 1'b0, INIT[1417*8 +: 8], 1'b0, INIT[1416*8 +: 8], + 1'b0, INIT[1415*8 +: 8], 1'b0, INIT[1414*8 +: 8], 1'b0, INIT[1413*8 +: 8], 1'b0, INIT[1412*8 +: 8], + 1'b0, INIT[1411*8 +: 8], 1'b0, INIT[1410*8 +: 8], 1'b0, INIT[1409*8 +: 8], 1'b0, INIT[1408*8 +: 8], + 1'b0, INIT[1407*8 +: 8], 1'b0, INIT[1406*8 +: 8], 1'b0, INIT[1405*8 +: 8], 1'b0, INIT[1404*8 +: 8], + 1'b0, INIT[1403*8 +: 8], 1'b0, INIT[1402*8 +: 8], 1'b0, INIT[1401*8 +: 8], 1'b0, INIT[1400*8 +: 8], + 1'b0, INIT[1399*8 +: 8], 1'b0, INIT[1398*8 +: 8], 1'b0, INIT[1397*8 +: 8], 1'b0, INIT[1396*8 +: 8], + 1'b0, INIT[1395*8 +: 8], 1'b0, INIT[1394*8 +: 8], 1'b0, INIT[1393*8 +: 8], 1'b0, INIT[1392*8 +: 8], + 1'b0, INIT[1391*8 +: 8], 1'b0, INIT[1390*8 +: 8], 1'b0, INIT[1389*8 +: 8], 1'b0, INIT[1388*8 +: 8], + 1'b0, INIT[1387*8 +: 8], 1'b0, INIT[1386*8 +: 8], 1'b0, INIT[1385*8 +: 8], 1'b0, INIT[1384*8 +: 8], + 1'b0, INIT[1383*8 +: 8], 1'b0, INIT[1382*8 +: 8], 1'b0, INIT[1381*8 +: 8], 1'b0, INIT[1380*8 +: 8], + 1'b0, INIT[1379*8 +: 8], 1'b0, INIT[1378*8 +: 8], 1'b0, INIT[1377*8 +: 8], 1'b0, INIT[1376*8 +: 8], + 1'b0, INIT[1375*8 +: 8], 1'b0, INIT[1374*8 +: 8], 1'b0, INIT[1373*8 +: 8], 1'b0, INIT[1372*8 +: 8], + 1'b0, INIT[1371*8 +: 8], 1'b0, INIT[1370*8 +: 8], 1'b0, INIT[1369*8 +: 8], 1'b0, INIT[1368*8 +: 8], + 1'b0, INIT[1367*8 +: 8], 1'b0, INIT[1366*8 +: 8], 1'b0, INIT[1365*8 +: 8], 1'b0, INIT[1364*8 +: 8], + 1'b0, INIT[1363*8 +: 8], 1'b0, INIT[1362*8 +: 8], 1'b0, INIT[1361*8 +: 8], 1'b0, INIT[1360*8 +: 8], + 1'b0, INIT[1359*8 +: 8], 1'b0, INIT[1358*8 +: 8], 1'b0, INIT[1357*8 +: 8], 1'b0, INIT[1356*8 +: 8], + 1'b0, INIT[1355*8 +: 8], 1'b0, INIT[1354*8 +: 8], 1'b0, INIT[1353*8 +: 8], 1'b0, INIT[1352*8 +: 8], + 1'b0, INIT[1351*8 +: 8], 1'b0, INIT[1350*8 +: 8], 1'b0, INIT[1349*8 +: 8], 1'b0, INIT[1348*8 +: 8], + 1'b0, INIT[1347*8 +: 8], 1'b0, INIT[1346*8 +: 8], 1'b0, INIT[1345*8 +: 8], 1'b0, INIT[1344*8 +: 8], + 1'b0, INIT[1343*8 +: 8], 1'b0, INIT[1342*8 +: 8], 1'b0, INIT[1341*8 +: 8], 1'b0, INIT[1340*8 +: 8], + 1'b0, INIT[1339*8 +: 8], 1'b0, INIT[1338*8 +: 8], 1'b0, INIT[1337*8 +: 8], 1'b0, INIT[1336*8 +: 8], + 1'b0, INIT[1335*8 +: 8], 1'b0, INIT[1334*8 +: 8], 1'b0, INIT[1333*8 +: 8], 1'b0, INIT[1332*8 +: 8], + 1'b0, INIT[1331*8 +: 8], 1'b0, INIT[1330*8 +: 8], 1'b0, INIT[1329*8 +: 8], 1'b0, INIT[1328*8 +: 8], + 1'b0, INIT[1327*8 +: 8], 1'b0, INIT[1326*8 +: 8], 1'b0, INIT[1325*8 +: 8], 1'b0, INIT[1324*8 +: 8], + 1'b0, INIT[1323*8 +: 8], 1'b0, INIT[1322*8 +: 8], 1'b0, INIT[1321*8 +: 8], 1'b0, INIT[1320*8 +: 8], + 1'b0, INIT[1319*8 +: 8], 1'b0, INIT[1318*8 +: 8], 1'b0, INIT[1317*8 +: 8], 1'b0, INIT[1316*8 +: 8], + 1'b0, INIT[1315*8 +: 8], 1'b0, INIT[1314*8 +: 8], 1'b0, INIT[1313*8 +: 8], 1'b0, INIT[1312*8 +: 8], + 1'b0, INIT[1311*8 +: 8], 1'b0, INIT[1310*8 +: 8], 1'b0, INIT[1309*8 +: 8], 1'b0, INIT[1308*8 +: 8], + 1'b0, INIT[1307*8 +: 8], 1'b0, INIT[1306*8 +: 8], 1'b0, INIT[1305*8 +: 8], 1'b0, INIT[1304*8 +: 8], + 1'b0, INIT[1303*8 +: 8], 1'b0, INIT[1302*8 +: 8], 1'b0, INIT[1301*8 +: 8], 1'b0, INIT[1300*8 +: 8], + 1'b0, INIT[1299*8 +: 8], 1'b0, INIT[1298*8 +: 8], 1'b0, INIT[1297*8 +: 8], 1'b0, INIT[1296*8 +: 8], + 1'b0, INIT[1295*8 +: 8], 1'b0, INIT[1294*8 +: 8], 1'b0, INIT[1293*8 +: 8], 1'b0, INIT[1292*8 +: 8], + 1'b0, INIT[1291*8 +: 8], 1'b0, INIT[1290*8 +: 8], 1'b0, INIT[1289*8 +: 8], 1'b0, INIT[1288*8 +: 8], + 1'b0, INIT[1287*8 +: 8], 1'b0, INIT[1286*8 +: 8], 1'b0, INIT[1285*8 +: 8], 1'b0, INIT[1284*8 +: 8], + 1'b0, INIT[1283*8 +: 8], 1'b0, INIT[1282*8 +: 8], 1'b0, INIT[1281*8 +: 8], 1'b0, INIT[1280*8 +: 8], + 1'b0, INIT[1279*8 +: 8], 1'b0, INIT[1278*8 +: 8], 1'b0, INIT[1277*8 +: 8], 1'b0, INIT[1276*8 +: 8], + 1'b0, INIT[1275*8 +: 8], 1'b0, INIT[1274*8 +: 8], 1'b0, INIT[1273*8 +: 8], 1'b0, INIT[1272*8 +: 8], + 1'b0, INIT[1271*8 +: 8], 1'b0, INIT[1270*8 +: 8], 1'b0, INIT[1269*8 +: 8], 1'b0, INIT[1268*8 +: 8], + 1'b0, INIT[1267*8 +: 8], 1'b0, INIT[1266*8 +: 8], 1'b0, INIT[1265*8 +: 8], 1'b0, INIT[1264*8 +: 8], + 1'b0, INIT[1263*8 +: 8], 1'b0, INIT[1262*8 +: 8], 1'b0, INIT[1261*8 +: 8], 1'b0, INIT[1260*8 +: 8], + 1'b0, INIT[1259*8 +: 8], 1'b0, INIT[1258*8 +: 8], 1'b0, INIT[1257*8 +: 8], 1'b0, INIT[1256*8 +: 8], + 1'b0, INIT[1255*8 +: 8], 1'b0, INIT[1254*8 +: 8], 1'b0, INIT[1253*8 +: 8], 1'b0, INIT[1252*8 +: 8], + 1'b0, INIT[1251*8 +: 8], 1'b0, INIT[1250*8 +: 8], 1'b0, INIT[1249*8 +: 8], 1'b0, INIT[1248*8 +: 8], + 1'b0, INIT[1247*8 +: 8], 1'b0, INIT[1246*8 +: 8], 1'b0, INIT[1245*8 +: 8], 1'b0, INIT[1244*8 +: 8], + 1'b0, INIT[1243*8 +: 8], 1'b0, INIT[1242*8 +: 8], 1'b0, INIT[1241*8 +: 8], 1'b0, INIT[1240*8 +: 8], + 1'b0, INIT[1239*8 +: 8], 1'b0, INIT[1238*8 +: 8], 1'b0, INIT[1237*8 +: 8], 1'b0, INIT[1236*8 +: 8], + 1'b0, INIT[1235*8 +: 8], 1'b0, INIT[1234*8 +: 8], 1'b0, INIT[1233*8 +: 8], 1'b0, INIT[1232*8 +: 8], + 1'b0, INIT[1231*8 +: 8], 1'b0, INIT[1230*8 +: 8], 1'b0, INIT[1229*8 +: 8], 1'b0, INIT[1228*8 +: 8], + 1'b0, INIT[1227*8 +: 8], 1'b0, INIT[1226*8 +: 8], 1'b0, INIT[1225*8 +: 8], 1'b0, INIT[1224*8 +: 8], + 1'b0, INIT[1223*8 +: 8], 1'b0, INIT[1222*8 +: 8], 1'b0, INIT[1221*8 +: 8], 1'b0, INIT[1220*8 +: 8], + 1'b0, INIT[1219*8 +: 8], 1'b0, INIT[1218*8 +: 8], 1'b0, INIT[1217*8 +: 8], 1'b0, INIT[1216*8 +: 8], + 1'b0, INIT[1215*8 +: 8], 1'b0, INIT[1214*8 +: 8], 1'b0, INIT[1213*8 +: 8], 1'b0, INIT[1212*8 +: 8], + 1'b0, INIT[1211*8 +: 8], 1'b0, INIT[1210*8 +: 8], 1'b0, INIT[1209*8 +: 8], 1'b0, INIT[1208*8 +: 8], + 1'b0, INIT[1207*8 +: 8], 1'b0, INIT[1206*8 +: 8], 1'b0, INIT[1205*8 +: 8], 1'b0, INIT[1204*8 +: 8], + 1'b0, INIT[1203*8 +: 8], 1'b0, INIT[1202*8 +: 8], 1'b0, INIT[1201*8 +: 8], 1'b0, INIT[1200*8 +: 8], + 1'b0, INIT[1199*8 +: 8], 1'b0, INIT[1198*8 +: 8], 1'b0, INIT[1197*8 +: 8], 1'b0, INIT[1196*8 +: 8], + 1'b0, INIT[1195*8 +: 8], 1'b0, INIT[1194*8 +: 8], 1'b0, INIT[1193*8 +: 8], 1'b0, INIT[1192*8 +: 8], + 1'b0, INIT[1191*8 +: 8], 1'b0, INIT[1190*8 +: 8], 1'b0, INIT[1189*8 +: 8], 1'b0, INIT[1188*8 +: 8], + 1'b0, INIT[1187*8 +: 8], 1'b0, INIT[1186*8 +: 8], 1'b0, INIT[1185*8 +: 8], 1'b0, INIT[1184*8 +: 8], + 1'b0, INIT[1183*8 +: 8], 1'b0, INIT[1182*8 +: 8], 1'b0, INIT[1181*8 +: 8], 1'b0, INIT[1180*8 +: 8], + 1'b0, INIT[1179*8 +: 8], 1'b0, INIT[1178*8 +: 8], 1'b0, INIT[1177*8 +: 8], 1'b0, INIT[1176*8 +: 8], + 1'b0, INIT[1175*8 +: 8], 1'b0, INIT[1174*8 +: 8], 1'b0, INIT[1173*8 +: 8], 1'b0, INIT[1172*8 +: 8], + 1'b0, INIT[1171*8 +: 8], 1'b0, INIT[1170*8 +: 8], 1'b0, INIT[1169*8 +: 8], 1'b0, INIT[1168*8 +: 8], + 1'b0, INIT[1167*8 +: 8], 1'b0, INIT[1166*8 +: 8], 1'b0, INIT[1165*8 +: 8], 1'b0, INIT[1164*8 +: 8], + 1'b0, INIT[1163*8 +: 8], 1'b0, INIT[1162*8 +: 8], 1'b0, INIT[1161*8 +: 8], 1'b0, INIT[1160*8 +: 8], + 1'b0, INIT[1159*8 +: 8], 1'b0, INIT[1158*8 +: 8], 1'b0, INIT[1157*8 +: 8], 1'b0, INIT[1156*8 +: 8], + 1'b0, INIT[1155*8 +: 8], 1'b0, INIT[1154*8 +: 8], 1'b0, INIT[1153*8 +: 8], 1'b0, INIT[1152*8 +: 8], + 1'b0, INIT[1151*8 +: 8], 1'b0, INIT[1150*8 +: 8], 1'b0, INIT[1149*8 +: 8], 1'b0, INIT[1148*8 +: 8], + 1'b0, INIT[1147*8 +: 8], 1'b0, INIT[1146*8 +: 8], 1'b0, INIT[1145*8 +: 8], 1'b0, INIT[1144*8 +: 8], + 1'b0, INIT[1143*8 +: 8], 1'b0, INIT[1142*8 +: 8], 1'b0, INIT[1141*8 +: 8], 1'b0, INIT[1140*8 +: 8], + 1'b0, INIT[1139*8 +: 8], 1'b0, INIT[1138*8 +: 8], 1'b0, INIT[1137*8 +: 8], 1'b0, INIT[1136*8 +: 8], + 1'b0, INIT[1135*8 +: 8], 1'b0, INIT[1134*8 +: 8], 1'b0, INIT[1133*8 +: 8], 1'b0, INIT[1132*8 +: 8], + 1'b0, INIT[1131*8 +: 8], 1'b0, INIT[1130*8 +: 8], 1'b0, INIT[1129*8 +: 8], 1'b0, INIT[1128*8 +: 8], + 1'b0, INIT[1127*8 +: 8], 1'b0, INIT[1126*8 +: 8], 1'b0, INIT[1125*8 +: 8], 1'b0, INIT[1124*8 +: 8], + 1'b0, INIT[1123*8 +: 8], 1'b0, INIT[1122*8 +: 8], 1'b0, INIT[1121*8 +: 8], 1'b0, INIT[1120*8 +: 8], + 1'b0, INIT[1119*8 +: 8], 1'b0, INIT[1118*8 +: 8], 1'b0, INIT[1117*8 +: 8], 1'b0, INIT[1116*8 +: 8], + 1'b0, INIT[1115*8 +: 8], 1'b0, INIT[1114*8 +: 8], 1'b0, INIT[1113*8 +: 8], 1'b0, INIT[1112*8 +: 8], + 1'b0, INIT[1111*8 +: 8], 1'b0, INIT[1110*8 +: 8], 1'b0, INIT[1109*8 +: 8], 1'b0, INIT[1108*8 +: 8], + 1'b0, INIT[1107*8 +: 8], 1'b0, INIT[1106*8 +: 8], 1'b0, INIT[1105*8 +: 8], 1'b0, INIT[1104*8 +: 8], + 1'b0, INIT[1103*8 +: 8], 1'b0, INIT[1102*8 +: 8], 1'b0, INIT[1101*8 +: 8], 1'b0, INIT[1100*8 +: 8], + 1'b0, INIT[1099*8 +: 8], 1'b0, INIT[1098*8 +: 8], 1'b0, INIT[1097*8 +: 8], 1'b0, INIT[1096*8 +: 8], + 1'b0, INIT[1095*8 +: 8], 1'b0, INIT[1094*8 +: 8], 1'b0, INIT[1093*8 +: 8], 1'b0, INIT[1092*8 +: 8], + 1'b0, INIT[1091*8 +: 8], 1'b0, INIT[1090*8 +: 8], 1'b0, INIT[1089*8 +: 8], 1'b0, INIT[1088*8 +: 8], + 1'b0, INIT[1087*8 +: 8], 1'b0, INIT[1086*8 +: 8], 1'b0, INIT[1085*8 +: 8], 1'b0, INIT[1084*8 +: 8], + 1'b0, INIT[1083*8 +: 8], 1'b0, INIT[1082*8 +: 8], 1'b0, INIT[1081*8 +: 8], 1'b0, INIT[1080*8 +: 8], + 1'b0, INIT[1079*8 +: 8], 1'b0, INIT[1078*8 +: 8], 1'b0, INIT[1077*8 +: 8], 1'b0, INIT[1076*8 +: 8], + 1'b0, INIT[1075*8 +: 8], 1'b0, INIT[1074*8 +: 8], 1'b0, INIT[1073*8 +: 8], 1'b0, INIT[1072*8 +: 8], + 1'b0, INIT[1071*8 +: 8], 1'b0, INIT[1070*8 +: 8], 1'b0, INIT[1069*8 +: 8], 1'b0, INIT[1068*8 +: 8], + 1'b0, INIT[1067*8 +: 8], 1'b0, INIT[1066*8 +: 8], 1'b0, INIT[1065*8 +: 8], 1'b0, INIT[1064*8 +: 8], + 1'b0, INIT[1063*8 +: 8], 1'b0, INIT[1062*8 +: 8], 1'b0, INIT[1061*8 +: 8], 1'b0, INIT[1060*8 +: 8], + 1'b0, INIT[1059*8 +: 8], 1'b0, INIT[1058*8 +: 8], 1'b0, INIT[1057*8 +: 8], 1'b0, INIT[1056*8 +: 8], + 1'b0, INIT[1055*8 +: 8], 1'b0, INIT[1054*8 +: 8], 1'b0, INIT[1053*8 +: 8], 1'b0, INIT[1052*8 +: 8], + 1'b0, INIT[1051*8 +: 8], 1'b0, INIT[1050*8 +: 8], 1'b0, INIT[1049*8 +: 8], 1'b0, INIT[1048*8 +: 8], + 1'b0, INIT[1047*8 +: 8], 1'b0, INIT[1046*8 +: 8], 1'b0, INIT[1045*8 +: 8], 1'b0, INIT[1044*8 +: 8], + 1'b0, INIT[1043*8 +: 8], 1'b0, INIT[1042*8 +: 8], 1'b0, INIT[1041*8 +: 8], 1'b0, INIT[1040*8 +: 8], + 1'b0, INIT[1039*8 +: 8], 1'b0, INIT[1038*8 +: 8], 1'b0, INIT[1037*8 +: 8], 1'b0, INIT[1036*8 +: 8], + 1'b0, INIT[1035*8 +: 8], 1'b0, INIT[1034*8 +: 8], 1'b0, INIT[1033*8 +: 8], 1'b0, INIT[1032*8 +: 8], + 1'b0, INIT[1031*8 +: 8], 1'b0, INIT[1030*8 +: 8], 1'b0, INIT[1029*8 +: 8], 1'b0, INIT[1028*8 +: 8], + 1'b0, INIT[1027*8 +: 8], 1'b0, INIT[1026*8 +: 8], 1'b0, INIT[1025*8 +: 8], 1'b0, INIT[1024*8 +: 8], + 1'b0, INIT[1023*8 +: 8], 1'b0, INIT[1022*8 +: 8], 1'b0, INIT[1021*8 +: 8], 1'b0, INIT[1020*8 +: 8], + 1'b0, INIT[1019*8 +: 8], 1'b0, INIT[1018*8 +: 8], 1'b0, INIT[1017*8 +: 8], 1'b0, INIT[1016*8 +: 8], + 1'b0, INIT[1015*8 +: 8], 1'b0, INIT[1014*8 +: 8], 1'b0, INIT[1013*8 +: 8], 1'b0, INIT[1012*8 +: 8], + 1'b0, INIT[1011*8 +: 8], 1'b0, INIT[1010*8 +: 8], 1'b0, INIT[1009*8 +: 8], 1'b0, INIT[1008*8 +: 8], + 1'b0, INIT[1007*8 +: 8], 1'b0, INIT[1006*8 +: 8], 1'b0, INIT[1005*8 +: 8], 1'b0, INIT[1004*8 +: 8], + 1'b0, INIT[1003*8 +: 8], 1'b0, INIT[1002*8 +: 8], 1'b0, INIT[1001*8 +: 8], 1'b0, INIT[1000*8 +: 8], + 1'b0, INIT[ 999*8 +: 8], 1'b0, INIT[ 998*8 +: 8], 1'b0, INIT[ 997*8 +: 8], 1'b0, INIT[ 996*8 +: 8], + 1'b0, INIT[ 995*8 +: 8], 1'b0, INIT[ 994*8 +: 8], 1'b0, INIT[ 993*8 +: 8], 1'b0, INIT[ 992*8 +: 8], + 1'b0, INIT[ 991*8 +: 8], 1'b0, INIT[ 990*8 +: 8], 1'b0, INIT[ 989*8 +: 8], 1'b0, INIT[ 988*8 +: 8], + 1'b0, INIT[ 987*8 +: 8], 1'b0, INIT[ 986*8 +: 8], 1'b0, INIT[ 985*8 +: 8], 1'b0, INIT[ 984*8 +: 8], + 1'b0, INIT[ 983*8 +: 8], 1'b0, INIT[ 982*8 +: 8], 1'b0, INIT[ 981*8 +: 8], 1'b0, INIT[ 980*8 +: 8], + 1'b0, INIT[ 979*8 +: 8], 1'b0, INIT[ 978*8 +: 8], 1'b0, INIT[ 977*8 +: 8], 1'b0, INIT[ 976*8 +: 8], + 1'b0, INIT[ 975*8 +: 8], 1'b0, INIT[ 974*8 +: 8], 1'b0, INIT[ 973*8 +: 8], 1'b0, INIT[ 972*8 +: 8], + 1'b0, INIT[ 971*8 +: 8], 1'b0, INIT[ 970*8 +: 8], 1'b0, INIT[ 969*8 +: 8], 1'b0, INIT[ 968*8 +: 8], + 1'b0, INIT[ 967*8 +: 8], 1'b0, INIT[ 966*8 +: 8], 1'b0, INIT[ 965*8 +: 8], 1'b0, INIT[ 964*8 +: 8], + 1'b0, INIT[ 963*8 +: 8], 1'b0, INIT[ 962*8 +: 8], 1'b0, INIT[ 961*8 +: 8], 1'b0, INIT[ 960*8 +: 8], + 1'b0, INIT[ 959*8 +: 8], 1'b0, INIT[ 958*8 +: 8], 1'b0, INIT[ 957*8 +: 8], 1'b0, INIT[ 956*8 +: 8], + 1'b0, INIT[ 955*8 +: 8], 1'b0, INIT[ 954*8 +: 8], 1'b0, INIT[ 953*8 +: 8], 1'b0, INIT[ 952*8 +: 8], + 1'b0, INIT[ 951*8 +: 8], 1'b0, INIT[ 950*8 +: 8], 1'b0, INIT[ 949*8 +: 8], 1'b0, INIT[ 948*8 +: 8], + 1'b0, INIT[ 947*8 +: 8], 1'b0, INIT[ 946*8 +: 8], 1'b0, INIT[ 945*8 +: 8], 1'b0, INIT[ 944*8 +: 8], + 1'b0, INIT[ 943*8 +: 8], 1'b0, INIT[ 942*8 +: 8], 1'b0, INIT[ 941*8 +: 8], 1'b0, INIT[ 940*8 +: 8], + 1'b0, INIT[ 939*8 +: 8], 1'b0, INIT[ 938*8 +: 8], 1'b0, INIT[ 937*8 +: 8], 1'b0, INIT[ 936*8 +: 8], + 1'b0, INIT[ 935*8 +: 8], 1'b0, INIT[ 934*8 +: 8], 1'b0, INIT[ 933*8 +: 8], 1'b0, INIT[ 932*8 +: 8], + 1'b0, INIT[ 931*8 +: 8], 1'b0, INIT[ 930*8 +: 8], 1'b0, INIT[ 929*8 +: 8], 1'b0, INIT[ 928*8 +: 8], + 1'b0, INIT[ 927*8 +: 8], 1'b0, INIT[ 926*8 +: 8], 1'b0, INIT[ 925*8 +: 8], 1'b0, INIT[ 924*8 +: 8], + 1'b0, INIT[ 923*8 +: 8], 1'b0, INIT[ 922*8 +: 8], 1'b0, INIT[ 921*8 +: 8], 1'b0, INIT[ 920*8 +: 8], + 1'b0, INIT[ 919*8 +: 8], 1'b0, INIT[ 918*8 +: 8], 1'b0, INIT[ 917*8 +: 8], 1'b0, INIT[ 916*8 +: 8], + 1'b0, INIT[ 915*8 +: 8], 1'b0, INIT[ 914*8 +: 8], 1'b0, INIT[ 913*8 +: 8], 1'b0, INIT[ 912*8 +: 8], + 1'b0, INIT[ 911*8 +: 8], 1'b0, INIT[ 910*8 +: 8], 1'b0, INIT[ 909*8 +: 8], 1'b0, INIT[ 908*8 +: 8], + 1'b0, INIT[ 907*8 +: 8], 1'b0, INIT[ 906*8 +: 8], 1'b0, INIT[ 905*8 +: 8], 1'b0, INIT[ 904*8 +: 8], + 1'b0, INIT[ 903*8 +: 8], 1'b0, INIT[ 902*8 +: 8], 1'b0, INIT[ 901*8 +: 8], 1'b0, INIT[ 900*8 +: 8], + 1'b0, INIT[ 899*8 +: 8], 1'b0, INIT[ 898*8 +: 8], 1'b0, INIT[ 897*8 +: 8], 1'b0, INIT[ 896*8 +: 8], + 1'b0, INIT[ 895*8 +: 8], 1'b0, INIT[ 894*8 +: 8], 1'b0, INIT[ 893*8 +: 8], 1'b0, INIT[ 892*8 +: 8], + 1'b0, INIT[ 891*8 +: 8], 1'b0, INIT[ 890*8 +: 8], 1'b0, INIT[ 889*8 +: 8], 1'b0, INIT[ 888*8 +: 8], + 1'b0, INIT[ 887*8 +: 8], 1'b0, INIT[ 886*8 +: 8], 1'b0, INIT[ 885*8 +: 8], 1'b0, INIT[ 884*8 +: 8], + 1'b0, INIT[ 883*8 +: 8], 1'b0, INIT[ 882*8 +: 8], 1'b0, INIT[ 881*8 +: 8], 1'b0, INIT[ 880*8 +: 8], + 1'b0, INIT[ 879*8 +: 8], 1'b0, INIT[ 878*8 +: 8], 1'b0, INIT[ 877*8 +: 8], 1'b0, INIT[ 876*8 +: 8], + 1'b0, INIT[ 875*8 +: 8], 1'b0, INIT[ 874*8 +: 8], 1'b0, INIT[ 873*8 +: 8], 1'b0, INIT[ 872*8 +: 8], + 1'b0, INIT[ 871*8 +: 8], 1'b0, INIT[ 870*8 +: 8], 1'b0, INIT[ 869*8 +: 8], 1'b0, INIT[ 868*8 +: 8], + 1'b0, INIT[ 867*8 +: 8], 1'b0, INIT[ 866*8 +: 8], 1'b0, INIT[ 865*8 +: 8], 1'b0, INIT[ 864*8 +: 8], + 1'b0, INIT[ 863*8 +: 8], 1'b0, INIT[ 862*8 +: 8], 1'b0, INIT[ 861*8 +: 8], 1'b0, INIT[ 860*8 +: 8], + 1'b0, INIT[ 859*8 +: 8], 1'b0, INIT[ 858*8 +: 8], 1'b0, INIT[ 857*8 +: 8], 1'b0, INIT[ 856*8 +: 8], + 1'b0, INIT[ 855*8 +: 8], 1'b0, INIT[ 854*8 +: 8], 1'b0, INIT[ 853*8 +: 8], 1'b0, INIT[ 852*8 +: 8], + 1'b0, INIT[ 851*8 +: 8], 1'b0, INIT[ 850*8 +: 8], 1'b0, INIT[ 849*8 +: 8], 1'b0, INIT[ 848*8 +: 8], + 1'b0, INIT[ 847*8 +: 8], 1'b0, INIT[ 846*8 +: 8], 1'b0, INIT[ 845*8 +: 8], 1'b0, INIT[ 844*8 +: 8], + 1'b0, INIT[ 843*8 +: 8], 1'b0, INIT[ 842*8 +: 8], 1'b0, INIT[ 841*8 +: 8], 1'b0, INIT[ 840*8 +: 8], + 1'b0, INIT[ 839*8 +: 8], 1'b0, INIT[ 838*8 +: 8], 1'b0, INIT[ 837*8 +: 8], 1'b0, INIT[ 836*8 +: 8], + 1'b0, INIT[ 835*8 +: 8], 1'b0, INIT[ 834*8 +: 8], 1'b0, INIT[ 833*8 +: 8], 1'b0, INIT[ 832*8 +: 8], + 1'b0, INIT[ 831*8 +: 8], 1'b0, INIT[ 830*8 +: 8], 1'b0, INIT[ 829*8 +: 8], 1'b0, INIT[ 828*8 +: 8], + 1'b0, INIT[ 827*8 +: 8], 1'b0, INIT[ 826*8 +: 8], 1'b0, INIT[ 825*8 +: 8], 1'b0, INIT[ 824*8 +: 8], + 1'b0, INIT[ 823*8 +: 8], 1'b0, INIT[ 822*8 +: 8], 1'b0, INIT[ 821*8 +: 8], 1'b0, INIT[ 820*8 +: 8], + 1'b0, INIT[ 819*8 +: 8], 1'b0, INIT[ 818*8 +: 8], 1'b0, INIT[ 817*8 +: 8], 1'b0, INIT[ 816*8 +: 8], + 1'b0, INIT[ 815*8 +: 8], 1'b0, INIT[ 814*8 +: 8], 1'b0, INIT[ 813*8 +: 8], 1'b0, INIT[ 812*8 +: 8], + 1'b0, INIT[ 811*8 +: 8], 1'b0, INIT[ 810*8 +: 8], 1'b0, INIT[ 809*8 +: 8], 1'b0, INIT[ 808*8 +: 8], + 1'b0, INIT[ 807*8 +: 8], 1'b0, INIT[ 806*8 +: 8], 1'b0, INIT[ 805*8 +: 8], 1'b0, INIT[ 804*8 +: 8], + 1'b0, INIT[ 803*8 +: 8], 1'b0, INIT[ 802*8 +: 8], 1'b0, INIT[ 801*8 +: 8], 1'b0, INIT[ 800*8 +: 8], + 1'b0, INIT[ 799*8 +: 8], 1'b0, INIT[ 798*8 +: 8], 1'b0, INIT[ 797*8 +: 8], 1'b0, INIT[ 796*8 +: 8], + 1'b0, INIT[ 795*8 +: 8], 1'b0, INIT[ 794*8 +: 8], 1'b0, INIT[ 793*8 +: 8], 1'b0, INIT[ 792*8 +: 8], + 1'b0, INIT[ 791*8 +: 8], 1'b0, INIT[ 790*8 +: 8], 1'b0, INIT[ 789*8 +: 8], 1'b0, INIT[ 788*8 +: 8], + 1'b0, INIT[ 787*8 +: 8], 1'b0, INIT[ 786*8 +: 8], 1'b0, INIT[ 785*8 +: 8], 1'b0, INIT[ 784*8 +: 8], + 1'b0, INIT[ 783*8 +: 8], 1'b0, INIT[ 782*8 +: 8], 1'b0, INIT[ 781*8 +: 8], 1'b0, INIT[ 780*8 +: 8], + 1'b0, INIT[ 779*8 +: 8], 1'b0, INIT[ 778*8 +: 8], 1'b0, INIT[ 777*8 +: 8], 1'b0, INIT[ 776*8 +: 8], + 1'b0, INIT[ 775*8 +: 8], 1'b0, INIT[ 774*8 +: 8], 1'b0, INIT[ 773*8 +: 8], 1'b0, INIT[ 772*8 +: 8], + 1'b0, INIT[ 771*8 +: 8], 1'b0, INIT[ 770*8 +: 8], 1'b0, INIT[ 769*8 +: 8], 1'b0, INIT[ 768*8 +: 8], + 1'b0, INIT[ 767*8 +: 8], 1'b0, INIT[ 766*8 +: 8], 1'b0, INIT[ 765*8 +: 8], 1'b0, INIT[ 764*8 +: 8], + 1'b0, INIT[ 763*8 +: 8], 1'b0, INIT[ 762*8 +: 8], 1'b0, INIT[ 761*8 +: 8], 1'b0, INIT[ 760*8 +: 8], + 1'b0, INIT[ 759*8 +: 8], 1'b0, INIT[ 758*8 +: 8], 1'b0, INIT[ 757*8 +: 8], 1'b0, INIT[ 756*8 +: 8], + 1'b0, INIT[ 755*8 +: 8], 1'b0, INIT[ 754*8 +: 8], 1'b0, INIT[ 753*8 +: 8], 1'b0, INIT[ 752*8 +: 8], + 1'b0, INIT[ 751*8 +: 8], 1'b0, INIT[ 750*8 +: 8], 1'b0, INIT[ 749*8 +: 8], 1'b0, INIT[ 748*8 +: 8], + 1'b0, INIT[ 747*8 +: 8], 1'b0, INIT[ 746*8 +: 8], 1'b0, INIT[ 745*8 +: 8], 1'b0, INIT[ 744*8 +: 8], + 1'b0, INIT[ 743*8 +: 8], 1'b0, INIT[ 742*8 +: 8], 1'b0, INIT[ 741*8 +: 8], 1'b0, INIT[ 740*8 +: 8], + 1'b0, INIT[ 739*8 +: 8], 1'b0, INIT[ 738*8 +: 8], 1'b0, INIT[ 737*8 +: 8], 1'b0, INIT[ 736*8 +: 8], + 1'b0, INIT[ 735*8 +: 8], 1'b0, INIT[ 734*8 +: 8], 1'b0, INIT[ 733*8 +: 8], 1'b0, INIT[ 732*8 +: 8], + 1'b0, INIT[ 731*8 +: 8], 1'b0, INIT[ 730*8 +: 8], 1'b0, INIT[ 729*8 +: 8], 1'b0, INIT[ 728*8 +: 8], + 1'b0, INIT[ 727*8 +: 8], 1'b0, INIT[ 726*8 +: 8], 1'b0, INIT[ 725*8 +: 8], 1'b0, INIT[ 724*8 +: 8], + 1'b0, INIT[ 723*8 +: 8], 1'b0, INIT[ 722*8 +: 8], 1'b0, INIT[ 721*8 +: 8], 1'b0, INIT[ 720*8 +: 8], + 1'b0, INIT[ 719*8 +: 8], 1'b0, INIT[ 718*8 +: 8], 1'b0, INIT[ 717*8 +: 8], 1'b0, INIT[ 716*8 +: 8], + 1'b0, INIT[ 715*8 +: 8], 1'b0, INIT[ 714*8 +: 8], 1'b0, INIT[ 713*8 +: 8], 1'b0, INIT[ 712*8 +: 8], + 1'b0, INIT[ 711*8 +: 8], 1'b0, INIT[ 710*8 +: 8], 1'b0, INIT[ 709*8 +: 8], 1'b0, INIT[ 708*8 +: 8], + 1'b0, INIT[ 707*8 +: 8], 1'b0, INIT[ 706*8 +: 8], 1'b0, INIT[ 705*8 +: 8], 1'b0, INIT[ 704*8 +: 8], + 1'b0, INIT[ 703*8 +: 8], 1'b0, INIT[ 702*8 +: 8], 1'b0, INIT[ 701*8 +: 8], 1'b0, INIT[ 700*8 +: 8], + 1'b0, INIT[ 699*8 +: 8], 1'b0, INIT[ 698*8 +: 8], 1'b0, INIT[ 697*8 +: 8], 1'b0, INIT[ 696*8 +: 8], + 1'b0, INIT[ 695*8 +: 8], 1'b0, INIT[ 694*8 +: 8], 1'b0, INIT[ 693*8 +: 8], 1'b0, INIT[ 692*8 +: 8], + 1'b0, INIT[ 691*8 +: 8], 1'b0, INIT[ 690*8 +: 8], 1'b0, INIT[ 689*8 +: 8], 1'b0, INIT[ 688*8 +: 8], + 1'b0, INIT[ 687*8 +: 8], 1'b0, INIT[ 686*8 +: 8], 1'b0, INIT[ 685*8 +: 8], 1'b0, INIT[ 684*8 +: 8], + 1'b0, INIT[ 683*8 +: 8], 1'b0, INIT[ 682*8 +: 8], 1'b0, INIT[ 681*8 +: 8], 1'b0, INIT[ 680*8 +: 8], + 1'b0, INIT[ 679*8 +: 8], 1'b0, INIT[ 678*8 +: 8], 1'b0, INIT[ 677*8 +: 8], 1'b0, INIT[ 676*8 +: 8], + 1'b0, INIT[ 675*8 +: 8], 1'b0, INIT[ 674*8 +: 8], 1'b0, INIT[ 673*8 +: 8], 1'b0, INIT[ 672*8 +: 8], + 1'b0, INIT[ 671*8 +: 8], 1'b0, INIT[ 670*8 +: 8], 1'b0, INIT[ 669*8 +: 8], 1'b0, INIT[ 668*8 +: 8], + 1'b0, INIT[ 667*8 +: 8], 1'b0, INIT[ 666*8 +: 8], 1'b0, INIT[ 665*8 +: 8], 1'b0, INIT[ 664*8 +: 8], + 1'b0, INIT[ 663*8 +: 8], 1'b0, INIT[ 662*8 +: 8], 1'b0, INIT[ 661*8 +: 8], 1'b0, INIT[ 660*8 +: 8], + 1'b0, INIT[ 659*8 +: 8], 1'b0, INIT[ 658*8 +: 8], 1'b0, INIT[ 657*8 +: 8], 1'b0, INIT[ 656*8 +: 8], + 1'b0, INIT[ 655*8 +: 8], 1'b0, INIT[ 654*8 +: 8], 1'b0, INIT[ 653*8 +: 8], 1'b0, INIT[ 652*8 +: 8], + 1'b0, INIT[ 651*8 +: 8], 1'b0, INIT[ 650*8 +: 8], 1'b0, INIT[ 649*8 +: 8], 1'b0, INIT[ 648*8 +: 8], + 1'b0, INIT[ 647*8 +: 8], 1'b0, INIT[ 646*8 +: 8], 1'b0, INIT[ 645*8 +: 8], 1'b0, INIT[ 644*8 +: 8], + 1'b0, INIT[ 643*8 +: 8], 1'b0, INIT[ 642*8 +: 8], 1'b0, INIT[ 641*8 +: 8], 1'b0, INIT[ 640*8 +: 8], + 1'b0, INIT[ 639*8 +: 8], 1'b0, INIT[ 638*8 +: 8], 1'b0, INIT[ 637*8 +: 8], 1'b0, INIT[ 636*8 +: 8], + 1'b0, INIT[ 635*8 +: 8], 1'b0, INIT[ 634*8 +: 8], 1'b0, INIT[ 633*8 +: 8], 1'b0, INIT[ 632*8 +: 8], + 1'b0, INIT[ 631*8 +: 8], 1'b0, INIT[ 630*8 +: 8], 1'b0, INIT[ 629*8 +: 8], 1'b0, INIT[ 628*8 +: 8], + 1'b0, INIT[ 627*8 +: 8], 1'b0, INIT[ 626*8 +: 8], 1'b0, INIT[ 625*8 +: 8], 1'b0, INIT[ 624*8 +: 8], + 1'b0, INIT[ 623*8 +: 8], 1'b0, INIT[ 622*8 +: 8], 1'b0, INIT[ 621*8 +: 8], 1'b0, INIT[ 620*8 +: 8], + 1'b0, INIT[ 619*8 +: 8], 1'b0, INIT[ 618*8 +: 8], 1'b0, INIT[ 617*8 +: 8], 1'b0, INIT[ 616*8 +: 8], + 1'b0, INIT[ 615*8 +: 8], 1'b0, INIT[ 614*8 +: 8], 1'b0, INIT[ 613*8 +: 8], 1'b0, INIT[ 612*8 +: 8], + 1'b0, INIT[ 611*8 +: 8], 1'b0, INIT[ 610*8 +: 8], 1'b0, INIT[ 609*8 +: 8], 1'b0, INIT[ 608*8 +: 8], + 1'b0, INIT[ 607*8 +: 8], 1'b0, INIT[ 606*8 +: 8], 1'b0, INIT[ 605*8 +: 8], 1'b0, INIT[ 604*8 +: 8], + 1'b0, INIT[ 603*8 +: 8], 1'b0, INIT[ 602*8 +: 8], 1'b0, INIT[ 601*8 +: 8], 1'b0, INIT[ 600*8 +: 8], + 1'b0, INIT[ 599*8 +: 8], 1'b0, INIT[ 598*8 +: 8], 1'b0, INIT[ 597*8 +: 8], 1'b0, INIT[ 596*8 +: 8], + 1'b0, INIT[ 595*8 +: 8], 1'b0, INIT[ 594*8 +: 8], 1'b0, INIT[ 593*8 +: 8], 1'b0, INIT[ 592*8 +: 8], + 1'b0, INIT[ 591*8 +: 8], 1'b0, INIT[ 590*8 +: 8], 1'b0, INIT[ 589*8 +: 8], 1'b0, INIT[ 588*8 +: 8], + 1'b0, INIT[ 587*8 +: 8], 1'b0, INIT[ 586*8 +: 8], 1'b0, INIT[ 585*8 +: 8], 1'b0, INIT[ 584*8 +: 8], + 1'b0, INIT[ 583*8 +: 8], 1'b0, INIT[ 582*8 +: 8], 1'b0, INIT[ 581*8 +: 8], 1'b0, INIT[ 580*8 +: 8], + 1'b0, INIT[ 579*8 +: 8], 1'b0, INIT[ 578*8 +: 8], 1'b0, INIT[ 577*8 +: 8], 1'b0, INIT[ 576*8 +: 8], + 1'b0, INIT[ 575*8 +: 8], 1'b0, INIT[ 574*8 +: 8], 1'b0, INIT[ 573*8 +: 8], 1'b0, INIT[ 572*8 +: 8], + 1'b0, INIT[ 571*8 +: 8], 1'b0, INIT[ 570*8 +: 8], 1'b0, INIT[ 569*8 +: 8], 1'b0, INIT[ 568*8 +: 8], + 1'b0, INIT[ 567*8 +: 8], 1'b0, INIT[ 566*8 +: 8], 1'b0, INIT[ 565*8 +: 8], 1'b0, INIT[ 564*8 +: 8], + 1'b0, INIT[ 563*8 +: 8], 1'b0, INIT[ 562*8 +: 8], 1'b0, INIT[ 561*8 +: 8], 1'b0, INIT[ 560*8 +: 8], + 1'b0, INIT[ 559*8 +: 8], 1'b0, INIT[ 558*8 +: 8], 1'b0, INIT[ 557*8 +: 8], 1'b0, INIT[ 556*8 +: 8], + 1'b0, INIT[ 555*8 +: 8], 1'b0, INIT[ 554*8 +: 8], 1'b0, INIT[ 553*8 +: 8], 1'b0, INIT[ 552*8 +: 8], + 1'b0, INIT[ 551*8 +: 8], 1'b0, INIT[ 550*8 +: 8], 1'b0, INIT[ 549*8 +: 8], 1'b0, INIT[ 548*8 +: 8], + 1'b0, INIT[ 547*8 +: 8], 1'b0, INIT[ 546*8 +: 8], 1'b0, INIT[ 545*8 +: 8], 1'b0, INIT[ 544*8 +: 8], + 1'b0, INIT[ 543*8 +: 8], 1'b0, INIT[ 542*8 +: 8], 1'b0, INIT[ 541*8 +: 8], 1'b0, INIT[ 540*8 +: 8], + 1'b0, INIT[ 539*8 +: 8], 1'b0, INIT[ 538*8 +: 8], 1'b0, INIT[ 537*8 +: 8], 1'b0, INIT[ 536*8 +: 8], + 1'b0, INIT[ 535*8 +: 8], 1'b0, INIT[ 534*8 +: 8], 1'b0, INIT[ 533*8 +: 8], 1'b0, INIT[ 532*8 +: 8], + 1'b0, INIT[ 531*8 +: 8], 1'b0, INIT[ 530*8 +: 8], 1'b0, INIT[ 529*8 +: 8], 1'b0, INIT[ 528*8 +: 8], + 1'b0, INIT[ 527*8 +: 8], 1'b0, INIT[ 526*8 +: 8], 1'b0, INIT[ 525*8 +: 8], 1'b0, INIT[ 524*8 +: 8], + 1'b0, INIT[ 523*8 +: 8], 1'b0, INIT[ 522*8 +: 8], 1'b0, INIT[ 521*8 +: 8], 1'b0, INIT[ 520*8 +: 8], + 1'b0, INIT[ 519*8 +: 8], 1'b0, INIT[ 518*8 +: 8], 1'b0, INIT[ 517*8 +: 8], 1'b0, INIT[ 516*8 +: 8], + 1'b0, INIT[ 515*8 +: 8], 1'b0, INIT[ 514*8 +: 8], 1'b0, INIT[ 513*8 +: 8], 1'b0, INIT[ 512*8 +: 8], + 1'b0, INIT[ 511*8 +: 8], 1'b0, INIT[ 510*8 +: 8], 1'b0, INIT[ 509*8 +: 8], 1'b0, INIT[ 508*8 +: 8], + 1'b0, INIT[ 507*8 +: 8], 1'b0, INIT[ 506*8 +: 8], 1'b0, INIT[ 505*8 +: 8], 1'b0, INIT[ 504*8 +: 8], + 1'b0, INIT[ 503*8 +: 8], 1'b0, INIT[ 502*8 +: 8], 1'b0, INIT[ 501*8 +: 8], 1'b0, INIT[ 500*8 +: 8], + 1'b0, INIT[ 499*8 +: 8], 1'b0, INIT[ 498*8 +: 8], 1'b0, INIT[ 497*8 +: 8], 1'b0, INIT[ 496*8 +: 8], + 1'b0, INIT[ 495*8 +: 8], 1'b0, INIT[ 494*8 +: 8], 1'b0, INIT[ 493*8 +: 8], 1'b0, INIT[ 492*8 +: 8], + 1'b0, INIT[ 491*8 +: 8], 1'b0, INIT[ 490*8 +: 8], 1'b0, INIT[ 489*8 +: 8], 1'b0, INIT[ 488*8 +: 8], + 1'b0, INIT[ 487*8 +: 8], 1'b0, INIT[ 486*8 +: 8], 1'b0, INIT[ 485*8 +: 8], 1'b0, INIT[ 484*8 +: 8], + 1'b0, INIT[ 483*8 +: 8], 1'b0, INIT[ 482*8 +: 8], 1'b0, INIT[ 481*8 +: 8], 1'b0, INIT[ 480*8 +: 8], + 1'b0, INIT[ 479*8 +: 8], 1'b0, INIT[ 478*8 +: 8], 1'b0, INIT[ 477*8 +: 8], 1'b0, INIT[ 476*8 +: 8], + 1'b0, INIT[ 475*8 +: 8], 1'b0, INIT[ 474*8 +: 8], 1'b0, INIT[ 473*8 +: 8], 1'b0, INIT[ 472*8 +: 8], + 1'b0, INIT[ 471*8 +: 8], 1'b0, INIT[ 470*8 +: 8], 1'b0, INIT[ 469*8 +: 8], 1'b0, INIT[ 468*8 +: 8], + 1'b0, INIT[ 467*8 +: 8], 1'b0, INIT[ 466*8 +: 8], 1'b0, INIT[ 465*8 +: 8], 1'b0, INIT[ 464*8 +: 8], + 1'b0, INIT[ 463*8 +: 8], 1'b0, INIT[ 462*8 +: 8], 1'b0, INIT[ 461*8 +: 8], 1'b0, INIT[ 460*8 +: 8], + 1'b0, INIT[ 459*8 +: 8], 1'b0, INIT[ 458*8 +: 8], 1'b0, INIT[ 457*8 +: 8], 1'b0, INIT[ 456*8 +: 8], + 1'b0, INIT[ 455*8 +: 8], 1'b0, INIT[ 454*8 +: 8], 1'b0, INIT[ 453*8 +: 8], 1'b0, INIT[ 452*8 +: 8], + 1'b0, INIT[ 451*8 +: 8], 1'b0, INIT[ 450*8 +: 8], 1'b0, INIT[ 449*8 +: 8], 1'b0, INIT[ 448*8 +: 8], + 1'b0, INIT[ 447*8 +: 8], 1'b0, INIT[ 446*8 +: 8], 1'b0, INIT[ 445*8 +: 8], 1'b0, INIT[ 444*8 +: 8], + 1'b0, INIT[ 443*8 +: 8], 1'b0, INIT[ 442*8 +: 8], 1'b0, INIT[ 441*8 +: 8], 1'b0, INIT[ 440*8 +: 8], + 1'b0, INIT[ 439*8 +: 8], 1'b0, INIT[ 438*8 +: 8], 1'b0, INIT[ 437*8 +: 8], 1'b0, INIT[ 436*8 +: 8], + 1'b0, INIT[ 435*8 +: 8], 1'b0, INIT[ 434*8 +: 8], 1'b0, INIT[ 433*8 +: 8], 1'b0, INIT[ 432*8 +: 8], + 1'b0, INIT[ 431*8 +: 8], 1'b0, INIT[ 430*8 +: 8], 1'b0, INIT[ 429*8 +: 8], 1'b0, INIT[ 428*8 +: 8], + 1'b0, INIT[ 427*8 +: 8], 1'b0, INIT[ 426*8 +: 8], 1'b0, INIT[ 425*8 +: 8], 1'b0, INIT[ 424*8 +: 8], + 1'b0, INIT[ 423*8 +: 8], 1'b0, INIT[ 422*8 +: 8], 1'b0, INIT[ 421*8 +: 8], 1'b0, INIT[ 420*8 +: 8], + 1'b0, INIT[ 419*8 +: 8], 1'b0, INIT[ 418*8 +: 8], 1'b0, INIT[ 417*8 +: 8], 1'b0, INIT[ 416*8 +: 8], + 1'b0, INIT[ 415*8 +: 8], 1'b0, INIT[ 414*8 +: 8], 1'b0, INIT[ 413*8 +: 8], 1'b0, INIT[ 412*8 +: 8], + 1'b0, INIT[ 411*8 +: 8], 1'b0, INIT[ 410*8 +: 8], 1'b0, INIT[ 409*8 +: 8], 1'b0, INIT[ 408*8 +: 8], + 1'b0, INIT[ 407*8 +: 8], 1'b0, INIT[ 406*8 +: 8], 1'b0, INIT[ 405*8 +: 8], 1'b0, INIT[ 404*8 +: 8], + 1'b0, INIT[ 403*8 +: 8], 1'b0, INIT[ 402*8 +: 8], 1'b0, INIT[ 401*8 +: 8], 1'b0, INIT[ 400*8 +: 8], + 1'b0, INIT[ 399*8 +: 8], 1'b0, INIT[ 398*8 +: 8], 1'b0, INIT[ 397*8 +: 8], 1'b0, INIT[ 396*8 +: 8], + 1'b0, INIT[ 395*8 +: 8], 1'b0, INIT[ 394*8 +: 8], 1'b0, INIT[ 393*8 +: 8], 1'b0, INIT[ 392*8 +: 8], + 1'b0, INIT[ 391*8 +: 8], 1'b0, INIT[ 390*8 +: 8], 1'b0, INIT[ 389*8 +: 8], 1'b0, INIT[ 388*8 +: 8], + 1'b0, INIT[ 387*8 +: 8], 1'b0, INIT[ 386*8 +: 8], 1'b0, INIT[ 385*8 +: 8], 1'b0, INIT[ 384*8 +: 8], + 1'b0, INIT[ 383*8 +: 8], 1'b0, INIT[ 382*8 +: 8], 1'b0, INIT[ 381*8 +: 8], 1'b0, INIT[ 380*8 +: 8], + 1'b0, INIT[ 379*8 +: 8], 1'b0, INIT[ 378*8 +: 8], 1'b0, INIT[ 377*8 +: 8], 1'b0, INIT[ 376*8 +: 8], + 1'b0, INIT[ 375*8 +: 8], 1'b0, INIT[ 374*8 +: 8], 1'b0, INIT[ 373*8 +: 8], 1'b0, INIT[ 372*8 +: 8], + 1'b0, INIT[ 371*8 +: 8], 1'b0, INIT[ 370*8 +: 8], 1'b0, INIT[ 369*8 +: 8], 1'b0, INIT[ 368*8 +: 8], + 1'b0, INIT[ 367*8 +: 8], 1'b0, INIT[ 366*8 +: 8], 1'b0, INIT[ 365*8 +: 8], 1'b0, INIT[ 364*8 +: 8], + 1'b0, INIT[ 363*8 +: 8], 1'b0, INIT[ 362*8 +: 8], 1'b0, INIT[ 361*8 +: 8], 1'b0, INIT[ 360*8 +: 8], + 1'b0, INIT[ 359*8 +: 8], 1'b0, INIT[ 358*8 +: 8], 1'b0, INIT[ 357*8 +: 8], 1'b0, INIT[ 356*8 +: 8], + 1'b0, INIT[ 355*8 +: 8], 1'b0, INIT[ 354*8 +: 8], 1'b0, INIT[ 353*8 +: 8], 1'b0, INIT[ 352*8 +: 8], + 1'b0, INIT[ 351*8 +: 8], 1'b0, INIT[ 350*8 +: 8], 1'b0, INIT[ 349*8 +: 8], 1'b0, INIT[ 348*8 +: 8], + 1'b0, INIT[ 347*8 +: 8], 1'b0, INIT[ 346*8 +: 8], 1'b0, INIT[ 345*8 +: 8], 1'b0, INIT[ 344*8 +: 8], + 1'b0, INIT[ 343*8 +: 8], 1'b0, INIT[ 342*8 +: 8], 1'b0, INIT[ 341*8 +: 8], 1'b0, INIT[ 340*8 +: 8], + 1'b0, INIT[ 339*8 +: 8], 1'b0, INIT[ 338*8 +: 8], 1'b0, INIT[ 337*8 +: 8], 1'b0, INIT[ 336*8 +: 8], + 1'b0, INIT[ 335*8 +: 8], 1'b0, INIT[ 334*8 +: 8], 1'b0, INIT[ 333*8 +: 8], 1'b0, INIT[ 332*8 +: 8], + 1'b0, INIT[ 331*8 +: 8], 1'b0, INIT[ 330*8 +: 8], 1'b0, INIT[ 329*8 +: 8], 1'b0, INIT[ 328*8 +: 8], + 1'b0, INIT[ 327*8 +: 8], 1'b0, INIT[ 326*8 +: 8], 1'b0, INIT[ 325*8 +: 8], 1'b0, INIT[ 324*8 +: 8], + 1'b0, INIT[ 323*8 +: 8], 1'b0, INIT[ 322*8 +: 8], 1'b0, INIT[ 321*8 +: 8], 1'b0, INIT[ 320*8 +: 8], + 1'b0, INIT[ 319*8 +: 8], 1'b0, INIT[ 318*8 +: 8], 1'b0, INIT[ 317*8 +: 8], 1'b0, INIT[ 316*8 +: 8], + 1'b0, INIT[ 315*8 +: 8], 1'b0, INIT[ 314*8 +: 8], 1'b0, INIT[ 313*8 +: 8], 1'b0, INIT[ 312*8 +: 8], + 1'b0, INIT[ 311*8 +: 8], 1'b0, INIT[ 310*8 +: 8], 1'b0, INIT[ 309*8 +: 8], 1'b0, INIT[ 308*8 +: 8], + 1'b0, INIT[ 307*8 +: 8], 1'b0, INIT[ 306*8 +: 8], 1'b0, INIT[ 305*8 +: 8], 1'b0, INIT[ 304*8 +: 8], + 1'b0, INIT[ 303*8 +: 8], 1'b0, INIT[ 302*8 +: 8], 1'b0, INIT[ 301*8 +: 8], 1'b0, INIT[ 300*8 +: 8], + 1'b0, INIT[ 299*8 +: 8], 1'b0, INIT[ 298*8 +: 8], 1'b0, INIT[ 297*8 +: 8], 1'b0, INIT[ 296*8 +: 8], + 1'b0, INIT[ 295*8 +: 8], 1'b0, INIT[ 294*8 +: 8], 1'b0, INIT[ 293*8 +: 8], 1'b0, INIT[ 292*8 +: 8], + 1'b0, INIT[ 291*8 +: 8], 1'b0, INIT[ 290*8 +: 8], 1'b0, INIT[ 289*8 +: 8], 1'b0, INIT[ 288*8 +: 8], + 1'b0, INIT[ 287*8 +: 8], 1'b0, INIT[ 286*8 +: 8], 1'b0, INIT[ 285*8 +: 8], 1'b0, INIT[ 284*8 +: 8], + 1'b0, INIT[ 283*8 +: 8], 1'b0, INIT[ 282*8 +: 8], 1'b0, INIT[ 281*8 +: 8], 1'b0, INIT[ 280*8 +: 8], + 1'b0, INIT[ 279*8 +: 8], 1'b0, INIT[ 278*8 +: 8], 1'b0, INIT[ 277*8 +: 8], 1'b0, INIT[ 276*8 +: 8], + 1'b0, INIT[ 275*8 +: 8], 1'b0, INIT[ 274*8 +: 8], 1'b0, INIT[ 273*8 +: 8], 1'b0, INIT[ 272*8 +: 8], + 1'b0, INIT[ 271*8 +: 8], 1'b0, INIT[ 270*8 +: 8], 1'b0, INIT[ 269*8 +: 8], 1'b0, INIT[ 268*8 +: 8], + 1'b0, INIT[ 267*8 +: 8], 1'b0, INIT[ 266*8 +: 8], 1'b0, INIT[ 265*8 +: 8], 1'b0, INIT[ 264*8 +: 8], + 1'b0, INIT[ 263*8 +: 8], 1'b0, INIT[ 262*8 +: 8], 1'b0, INIT[ 261*8 +: 8], 1'b0, INIT[ 260*8 +: 8], + 1'b0, INIT[ 259*8 +: 8], 1'b0, INIT[ 258*8 +: 8], 1'b0, INIT[ 257*8 +: 8], 1'b0, INIT[ 256*8 +: 8], + 1'b0, INIT[ 255*8 +: 8], 1'b0, INIT[ 254*8 +: 8], 1'b0, INIT[ 253*8 +: 8], 1'b0, INIT[ 252*8 +: 8], + 1'b0, INIT[ 251*8 +: 8], 1'b0, INIT[ 250*8 +: 8], 1'b0, INIT[ 249*8 +: 8], 1'b0, INIT[ 248*8 +: 8], + 1'b0, INIT[ 247*8 +: 8], 1'b0, INIT[ 246*8 +: 8], 1'b0, INIT[ 245*8 +: 8], 1'b0, INIT[ 244*8 +: 8], + 1'b0, INIT[ 243*8 +: 8], 1'b0, INIT[ 242*8 +: 8], 1'b0, INIT[ 241*8 +: 8], 1'b0, INIT[ 240*8 +: 8], + 1'b0, INIT[ 239*8 +: 8], 1'b0, INIT[ 238*8 +: 8], 1'b0, INIT[ 237*8 +: 8], 1'b0, INIT[ 236*8 +: 8], + 1'b0, INIT[ 235*8 +: 8], 1'b0, INIT[ 234*8 +: 8], 1'b0, INIT[ 233*8 +: 8], 1'b0, INIT[ 232*8 +: 8], + 1'b0, INIT[ 231*8 +: 8], 1'b0, INIT[ 230*8 +: 8], 1'b0, INIT[ 229*8 +: 8], 1'b0, INIT[ 228*8 +: 8], + 1'b0, INIT[ 227*8 +: 8], 1'b0, INIT[ 226*8 +: 8], 1'b0, INIT[ 225*8 +: 8], 1'b0, INIT[ 224*8 +: 8], + 1'b0, INIT[ 223*8 +: 8], 1'b0, INIT[ 222*8 +: 8], 1'b0, INIT[ 221*8 +: 8], 1'b0, INIT[ 220*8 +: 8], + 1'b0, INIT[ 219*8 +: 8], 1'b0, INIT[ 218*8 +: 8], 1'b0, INIT[ 217*8 +: 8], 1'b0, INIT[ 216*8 +: 8], + 1'b0, INIT[ 215*8 +: 8], 1'b0, INIT[ 214*8 +: 8], 1'b0, INIT[ 213*8 +: 8], 1'b0, INIT[ 212*8 +: 8], + 1'b0, INIT[ 211*8 +: 8], 1'b0, INIT[ 210*8 +: 8], 1'b0, INIT[ 209*8 +: 8], 1'b0, INIT[ 208*8 +: 8], + 1'b0, INIT[ 207*8 +: 8], 1'b0, INIT[ 206*8 +: 8], 1'b0, INIT[ 205*8 +: 8], 1'b0, INIT[ 204*8 +: 8], + 1'b0, INIT[ 203*8 +: 8], 1'b0, INIT[ 202*8 +: 8], 1'b0, INIT[ 201*8 +: 8], 1'b0, INIT[ 200*8 +: 8], + 1'b0, INIT[ 199*8 +: 8], 1'b0, INIT[ 198*8 +: 8], 1'b0, INIT[ 197*8 +: 8], 1'b0, INIT[ 196*8 +: 8], + 1'b0, INIT[ 195*8 +: 8], 1'b0, INIT[ 194*8 +: 8], 1'b0, INIT[ 193*8 +: 8], 1'b0, INIT[ 192*8 +: 8], + 1'b0, INIT[ 191*8 +: 8], 1'b0, INIT[ 190*8 +: 8], 1'b0, INIT[ 189*8 +: 8], 1'b0, INIT[ 188*8 +: 8], + 1'b0, INIT[ 187*8 +: 8], 1'b0, INIT[ 186*8 +: 8], 1'b0, INIT[ 185*8 +: 8], 1'b0, INIT[ 184*8 +: 8], + 1'b0, INIT[ 183*8 +: 8], 1'b0, INIT[ 182*8 +: 8], 1'b0, INIT[ 181*8 +: 8], 1'b0, INIT[ 180*8 +: 8], + 1'b0, INIT[ 179*8 +: 8], 1'b0, INIT[ 178*8 +: 8], 1'b0, INIT[ 177*8 +: 8], 1'b0, INIT[ 176*8 +: 8], + 1'b0, INIT[ 175*8 +: 8], 1'b0, INIT[ 174*8 +: 8], 1'b0, INIT[ 173*8 +: 8], 1'b0, INIT[ 172*8 +: 8], + 1'b0, INIT[ 171*8 +: 8], 1'b0, INIT[ 170*8 +: 8], 1'b0, INIT[ 169*8 +: 8], 1'b0, INIT[ 168*8 +: 8], + 1'b0, INIT[ 167*8 +: 8], 1'b0, INIT[ 166*8 +: 8], 1'b0, INIT[ 165*8 +: 8], 1'b0, INIT[ 164*8 +: 8], + 1'b0, INIT[ 163*8 +: 8], 1'b0, INIT[ 162*8 +: 8], 1'b0, INIT[ 161*8 +: 8], 1'b0, INIT[ 160*8 +: 8], + 1'b0, INIT[ 159*8 +: 8], 1'b0, INIT[ 158*8 +: 8], 1'b0, INIT[ 157*8 +: 8], 1'b0, INIT[ 156*8 +: 8], + 1'b0, INIT[ 155*8 +: 8], 1'b0, INIT[ 154*8 +: 8], 1'b0, INIT[ 153*8 +: 8], 1'b0, INIT[ 152*8 +: 8], + 1'b0, INIT[ 151*8 +: 8], 1'b0, INIT[ 150*8 +: 8], 1'b0, INIT[ 149*8 +: 8], 1'b0, INIT[ 148*8 +: 8], + 1'b0, INIT[ 147*8 +: 8], 1'b0, INIT[ 146*8 +: 8], 1'b0, INIT[ 145*8 +: 8], 1'b0, INIT[ 144*8 +: 8], + 1'b0, INIT[ 143*8 +: 8], 1'b0, INIT[ 142*8 +: 8], 1'b0, INIT[ 141*8 +: 8], 1'b0, INIT[ 140*8 +: 8], + 1'b0, INIT[ 139*8 +: 8], 1'b0, INIT[ 138*8 +: 8], 1'b0, INIT[ 137*8 +: 8], 1'b0, INIT[ 136*8 +: 8], + 1'b0, INIT[ 135*8 +: 8], 1'b0, INIT[ 134*8 +: 8], 1'b0, INIT[ 133*8 +: 8], 1'b0, INIT[ 132*8 +: 8], + 1'b0, INIT[ 131*8 +: 8], 1'b0, INIT[ 130*8 +: 8], 1'b0, INIT[ 129*8 +: 8], 1'b0, INIT[ 128*8 +: 8], + 1'b0, INIT[ 127*8 +: 8], 1'b0, INIT[ 126*8 +: 8], 1'b0, INIT[ 125*8 +: 8], 1'b0, INIT[ 124*8 +: 8], + 1'b0, INIT[ 123*8 +: 8], 1'b0, INIT[ 122*8 +: 8], 1'b0, INIT[ 121*8 +: 8], 1'b0, INIT[ 120*8 +: 8], + 1'b0, INIT[ 119*8 +: 8], 1'b0, INIT[ 118*8 +: 8], 1'b0, INIT[ 117*8 +: 8], 1'b0, INIT[ 116*8 +: 8], + 1'b0, INIT[ 115*8 +: 8], 1'b0, INIT[ 114*8 +: 8], 1'b0, INIT[ 113*8 +: 8], 1'b0, INIT[ 112*8 +: 8], + 1'b0, INIT[ 111*8 +: 8], 1'b0, INIT[ 110*8 +: 8], 1'b0, INIT[ 109*8 +: 8], 1'b0, INIT[ 108*8 +: 8], + 1'b0, INIT[ 107*8 +: 8], 1'b0, INIT[ 106*8 +: 8], 1'b0, INIT[ 105*8 +: 8], 1'b0, INIT[ 104*8 +: 8], + 1'b0, INIT[ 103*8 +: 8], 1'b0, INIT[ 102*8 +: 8], 1'b0, INIT[ 101*8 +: 8], 1'b0, INIT[ 100*8 +: 8], + 1'b0, INIT[ 99*8 +: 8], 1'b0, INIT[ 98*8 +: 8], 1'b0, INIT[ 97*8 +: 8], 1'b0, INIT[ 96*8 +: 8], + 1'b0, INIT[ 95*8 +: 8], 1'b0, INIT[ 94*8 +: 8], 1'b0, INIT[ 93*8 +: 8], 1'b0, INIT[ 92*8 +: 8], + 1'b0, INIT[ 91*8 +: 8], 1'b0, INIT[ 90*8 +: 8], 1'b0, INIT[ 89*8 +: 8], 1'b0, INIT[ 88*8 +: 8], + 1'b0, INIT[ 87*8 +: 8], 1'b0, INIT[ 86*8 +: 8], 1'b0, INIT[ 85*8 +: 8], 1'b0, INIT[ 84*8 +: 8], + 1'b0, INIT[ 83*8 +: 8], 1'b0, INIT[ 82*8 +: 8], 1'b0, INIT[ 81*8 +: 8], 1'b0, INIT[ 80*8 +: 8], + 1'b0, INIT[ 79*8 +: 8], 1'b0, INIT[ 78*8 +: 8], 1'b0, INIT[ 77*8 +: 8], 1'b0, INIT[ 76*8 +: 8], + 1'b0, INIT[ 75*8 +: 8], 1'b0, INIT[ 74*8 +: 8], 1'b0, INIT[ 73*8 +: 8], 1'b0, INIT[ 72*8 +: 8], + 1'b0, INIT[ 71*8 +: 8], 1'b0, INIT[ 70*8 +: 8], 1'b0, INIT[ 69*8 +: 8], 1'b0, INIT[ 68*8 +: 8], + 1'b0, INIT[ 67*8 +: 8], 1'b0, INIT[ 66*8 +: 8], 1'b0, INIT[ 65*8 +: 8], 1'b0, INIT[ 64*8 +: 8], + 1'b0, INIT[ 63*8 +: 8], 1'b0, INIT[ 62*8 +: 8], 1'b0, INIT[ 61*8 +: 8], 1'b0, INIT[ 60*8 +: 8], + 1'b0, INIT[ 59*8 +: 8], 1'b0, INIT[ 58*8 +: 8], 1'b0, INIT[ 57*8 +: 8], 1'b0, INIT[ 56*8 +: 8], + 1'b0, INIT[ 55*8 +: 8], 1'b0, INIT[ 54*8 +: 8], 1'b0, INIT[ 53*8 +: 8], 1'b0, INIT[ 52*8 +: 8], + 1'b0, INIT[ 51*8 +: 8], 1'b0, INIT[ 50*8 +: 8], 1'b0, INIT[ 49*8 +: 8], 1'b0, INIT[ 48*8 +: 8], + 1'b0, INIT[ 47*8 +: 8], 1'b0, INIT[ 46*8 +: 8], 1'b0, INIT[ 45*8 +: 8], 1'b0, INIT[ 44*8 +: 8], + 1'b0, INIT[ 43*8 +: 8], 1'b0, INIT[ 42*8 +: 8], 1'b0, INIT[ 41*8 +: 8], 1'b0, INIT[ 40*8 +: 8], + 1'b0, INIT[ 39*8 +: 8], 1'b0, INIT[ 38*8 +: 8], 1'b0, INIT[ 37*8 +: 8], 1'b0, INIT[ 36*8 +: 8], + 1'b0, INIT[ 35*8 +: 8], 1'b0, INIT[ 34*8 +: 8], 1'b0, INIT[ 33*8 +: 8], 1'b0, INIT[ 32*8 +: 8], + 1'b0, INIT[ 31*8 +: 8], 1'b0, INIT[ 30*8 +: 8], 1'b0, INIT[ 29*8 +: 8], 1'b0, INIT[ 28*8 +: 8], + 1'b0, INIT[ 27*8 +: 8], 1'b0, INIT[ 26*8 +: 8], 1'b0, INIT[ 25*8 +: 8], 1'b0, INIT[ 24*8 +: 8], + 1'b0, INIT[ 23*8 +: 8], 1'b0, INIT[ 22*8 +: 8], 1'b0, INIT[ 21*8 +: 8], 1'b0, INIT[ 20*8 +: 8], + 1'b0, INIT[ 19*8 +: 8], 1'b0, INIT[ 18*8 +: 8], 1'b0, INIT[ 17*8 +: 8], 1'b0, INIT[ 16*8 +: 8], + 1'b0, INIT[ 15*8 +: 8], 1'b0, INIT[ 14*8 +: 8], 1'b0, INIT[ 13*8 +: 8], 1'b0, INIT[ 12*8 +: 8], + 1'b0, INIT[ 11*8 +: 8], 1'b0, INIT[ 10*8 +: 8], 1'b0, INIT[ 9*8 +: 8], 1'b0, INIT[ 8*8 +: 8], + 1'b0, INIT[ 7*8 +: 8], 1'b0, INIT[ 6*8 +: 8], 1'b0, INIT[ 5*8 +: 8], 1'b0, INIT[ 4*8 +: 8], + 1'b0, INIT[ 3*8 +: 8], 1'b0, INIT[ 2*8 +: 8], 1'b0, INIT[ 1*8 +: 8], 1'b0, INIT[ 0*8 +: 8]}), diff --git a/ql-qlf-plugin/pp3/pp3_brams.txt b/ql-qlf-plugin/pp3/pp3_brams.txt new file mode 100644 index 000000000..3917bf6af --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_brams.txt @@ -0,0 +1,54 @@ +# PP3 block RAM rules. + +bram $__QUICKLOGIC_RAMB16K + init 1 + abits 9 @a9d32 + dbits 32 @a9d32 + abits 10 @a10d16 + dbits 16 @a10d16 + abits 11 @a11d8 + dbits 8 @a11d8 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 4 @a9d32 + enable 1 2 @a10d16 + enable 1 1 @a11d8 + transp 0 0 + clocks 2 3 + clkpol 2 3 +endbram + +bram $__QUICKLOGIC_RAMB8K + init 1 + abits 9 @a9d16 + dbits 16 @a9d16 + abits 10 @a10d8 + dbits 8 @a10d8 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 2 @a9d16 + enable 1 1 @a10d8 + transp 0 0 + clocks 2 3 + clkpol 2 3 +endbram + +match $__QUICKLOGIC_RAMB16K +# attribute ram_style=block ram_block + min bits 128 + min efficiency 2 +# shuffle_enable B + make_transp + or_next_if_better +endmatch + +match $__QUICKLOGIC_RAMB8K +# attribute ram_style=block ram_block + min bits 128 + min efficiency 2 +# shuffle_enable B + make_transp +endmatch + diff --git a/ql-qlf-plugin/pp3/pp3_brams_map.v b/ql-qlf-plugin/pp3/pp3_brams_map.v new file mode 100644 index 000000000..60422e1bf --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_brams_map.v @@ -0,0 +1,1253 @@ +module \$__QUICKLOGIC_RAMB16K (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + parameter CFG_ABITS = 9; + parameter CFG_DBITS = 36; + parameter CFG_ENABLE_B = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [16383:0] INIT = 16384'bx; + + input CLK2; + input CLK3; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + assign VCC = 1'b1; + assign GND = 1'b0; + + wire [3:0] DIP, DOP; + wire [31:0] DI, DO; + + wire [31:0] DOB; + wire [3:0] DOPB; + + wire[1:0] WS1_0; + wire[1:0] WS1_1; + wire[1:0] WS2_0; + wire[1:0] WS2_1; + + wire[4:0] wen_reg; + + assign wen_reg[4:CFG_ENABLE_B]=0; + assign wen_reg[CFG_ENABLE_B-1:0]=B1EN; + + assign A1DATA = DO; + assign DI = B1DATA; + + if(CFG_DBITS <=8) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(CFG_DBITS >8 && CFG_DBITS <=16) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(CFG_DBITS > 16) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + generate if (CFG_DBITS <= 16) begin + ram8k_2x1_cell_macro #( + `include "pp3_bram_init_32.vh" + ) _TECHMAP_REPLACE_ ( + .A1_0(B1ADDR) , + .A1_1(GND), + .A2_0(A1ADDR), + .A2_1(GND), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(CLK2), + .CLK1_1(CLK2), + .CLK1S_0(!CLKPOL2), + .CLK1S_1(!CLKPOL2), + .CLK1EN_0(VCC), + .CLK1EN_1(VCC), + .CLK2_0(CLK3), + .CLK2_1(CLK3), + .CLK2S_0(!CLKPOL3), + .CLK2S_1(!CLKPOL3), + .CLK2EN_0(A1EN), + .CLK2EN_1(A1EN), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(VCC), + .CS1_1(GND), + .CS2_0(VCC), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(GND), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1(GND), + .WD_0({GND, DI[15: 8], GND, DI[ 7: 0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(GND), + .WEN1_0(wen_reg[1:0]), + .WEN1_1(wen_reg[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({DOP[1], DO[15: 8], DOP[0], DO[ 7: 0]}), + .RD_1(), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end else if (CFG_DBITS <= 32) begin + ram8k_2x1_cell_macro #( + `include "pp3_bram_init_32.vh" + ) _TECHMAP_REPLACE_ ( + .A1_0(B1ADDR) , + .A1_1(GND), + .A2_0(A1ADDR), + .A2_1(GND), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(CLK2), + .CLK1_1(CLK2), + .CLK1S_0(!CLKPOL2), + .CLK1S_1(!CLKPOL2), + .CLK1EN_0(VCC), + .CLK1EN_1(VCC), + .CLK2_0(CLK3), + .CLK2_1(CLK3), + .CLK2S_0(!CLKPOL3), + .CLK2S_1(!CLKPOL3), + .CLK2EN_0(A1EN), + .CLK2EN_1(A1EN), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(VCC), + .CS1_1(GND), + .CS2_0(VCC), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(GND), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({GND, DI[31:24], GND, DI[23:16]}), + .WD_0({GND, DI[15: 8], GND, DI[ 7: 0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(GND), + .WEN1_0(wen_reg[1:0]), + .WEN1_1(wen_reg[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({DOP[1], DO[15: 8], DOP[0], DO[ 7: 0]}), + .RD_1({DOP[3], DO[31:24], DOP[2], DO[23:16]}), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end else begin + wire TECHMAP_FAIL = 1'b1; + end endgenerate +endmodule + +// ------------------------------------------------------------------------ + +module \$__QUICKLOGIC_RAMB8K (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + parameter CFG_ABITS = 9; + parameter CFG_DBITS = 18; + parameter CFG_ENABLE_B = 2; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [8191:0] INIT = 8192'bx; + + input CLK2; + input CLK3; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + wire [10:0] A1ADDR_11; + wire [10:0] B1ADDR_11; + + wire [1:0] DIP, DOP; + wire [15:0] DI, DO; + + wire [15:0] DOBDO; + wire [1:0] DOPBDOP; + + wire[1:0] WS1_0; + wire[1:0] WS1_1; + wire[1:0] WS2_0; + wire[1:0] WS2_1; + + wire[2:0] wen_reg; + + assign wen_reg[2:CFG_ENABLE_B]=0; + assign wen_reg[CFG_ENABLE_B-1:0]=B1EN; + + assign GND = 1'b0; + assign VCC = 1'b1; + + assign A1DATA = DO; + assign DI = B1DATA; + + if(CFG_ABITS == 11) + begin + assign A1ADDR_11[CFG_ABITS-1:0]=A1ADDR; + assign B1ADDR_11[CFG_ABITS-1:0]=B1ADDR; + end + else + begin + assign A1ADDR_11[10:CFG_ABITS]=0; + assign A1ADDR_11[CFG_ABITS-1:0]=A1ADDR; + assign B1ADDR_11[10:CFG_ABITS]=0; + assign B1ADDR_11[CFG_ABITS-1:0]=B1ADDR; + end + + if(CFG_DBITS <=9) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(CFG_DBITS >9 && CFG_DBITS <=18) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(CFG_DBITS > 18) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + ram8k_2x1_cell_macro #( + `include "pp3_bram_init_8_16.vh" + ) _TECHMAP_REPLACE_ ( + .A1_0(B1ADDR_11) , + .A1_1(GND), + .A2_0(A1ADDR_11), + .A2_1(GND), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(CLK2), + .CLK1_1(GND), + .CLK1S_0(!CLKPOL2), + .CLK1S_1(GND), + .CLK1EN_0(VCC), + .CLK1EN_1(VCC), + .CLK2_0(CLK3), + .CLK2_1(GND), + .CLK2S_0(!CLKPOL3), + .CLK2S_1(GND), + .CLK2EN_0(A1EN), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(VCC), + .CS1_1(GND), + .CS2_0(VCC), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(GND), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1(GND), + .WD_0({GND, DI[15: 8], GND, DI[ 7: 0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(GND), + .WEN1_0(wen_reg[1:0]), + .WEN1_1(GND), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({DOP[1], DO[15: 8], DOP[0], DO[ 7: 0]}), + .RD_1(), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); +endmodule + +module RAM_8K_BLK ( WA,RA,WD,WClk,RClk,WClk_En,RClk_En,WEN,RD); + +parameter addr_int = 9, + data_depth_int = 512, + data_width_int = 18, + wr_enable_int = 2, + reg_rd_int = 0; + +parameter [8191:0] INIT = 8192'bx; +parameter INIT_FILE="init.mem"; + +input [addr_int-1:0] WA; +input [addr_int-1:0] RA; +input WClk,RClk; +input WClk_En,RClk_En; +input [wr_enable_int-1:0] WEN; +input [data_width_int-1:0] WD; +output [data_width_int-1:0] RD; + +wire VCC,GND; +wire WClk0_Sel,RClk0_Sel; +wire WClk1_Sel,RClk1_Sel; + +wire reg_rd0; +wire reg_rd1; +wire [10:0] addr_wr0,addr_rd0,addr_wr1,addr_rd1; + +wire [17:0] in_reg0; + +wire [2:0] wen_reg0; + +wire [15:0] out_reg0; + +wire [1:0] out_par0; + +wire [1:0] WS1_0,WS2_0; +wire [1:0] WS_GND; + +wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; + +wire WD0_SEL,RD0_SEL; +wire WD1_SEL,RD1_SEL; + +assign VCC = 1'b1; +assign GND = 1'b0; + +assign WD0_SEL = 1'b1; +assign RD0_SEL = 1'b1; +assign WD1_SEL = 1'b0; +assign RD1_SEL = 1'b0; + +assign WClk0_Sel = 1'b0; +assign RClk0_Sel = 1'b0; + +assign WClk1_Sel = 1'b0; +assign RClk1_Sel = 1'b0; + +assign LS = 1'b0; +assign DS = 1'b0; +assign SD = 1'b0; +assign LS_RB1 = 1'b0; +assign DS_RB1 = 1'b0; +assign SD_RB1 = 1'b0; + +assign reg_rd0 =reg_rd_int; +assign WS_GND = 2'b00; + +assign reg_rd1 =1'b0; + +assign wen_reg0[2:wr_enable_int]=0; +assign wen_reg0[wr_enable_int-1:0]=WEN; + +assign addr_wr1=11'b0000000000; +assign addr_rd1=11'b0000000000; + +generate + + if(addr_int == 11) + begin + assign addr_wr0[10:0]=WA; + assign addr_rd0[10:0]=RA; + end + else + begin + assign addr_wr0[10:addr_int]=0; + assign addr_wr0[addr_int-1:0]=WA; + assign addr_rd0[10:addr_int]=0; + assign addr_rd0[addr_int-1:0]=RA; + end + + if (data_width_int == 16) + begin + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + else if (data_width_int > 8 && data_width_int < 16) + begin + assign in_reg0[15:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + else if (data_width_int <= 8) + begin + assign in_reg0[15:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + + if(data_width_int <=8) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(data_width_int >8 && data_width_int <=16) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(data_width_int > 16) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + +endgenerate + + ram8k_2x1_cell_macro # ( + `include "pp3_bram_init_8_16.vh" + ) + _TECHMAP_REPLACE_ ( + .A1_0(addr_wr0) , + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(GND), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk1_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(GND), + .CLK2_0(RClk), + .CLK2_1(GND), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk1_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(WD1_SEL), + .CS2_0(RD0_SEL), + .CS2_1(RD1_SEL), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(reg_rd1), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1({2{GND}}), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + assign RD[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + +endmodule + + +module RAM_16K_BLK ( WA,RA,WD,WClk,RClk,WClk_En,RClk_En,WEN,RD); + +parameter addr_int = 9, + data_depth_int = 512, + data_width_int = 36, + wr_enable_int = 4, + reg_rd_int = 0; + +parameter [16383:0] INIT = 16384'bx; +parameter INIT_FILE="init.mem"; + +input [addr_int-1:0] WA; +input [addr_int-1:0] RA; +input WClk,RClk; +input WClk_En,RClk_En; +input [wr_enable_int-1:0] WEN; +input [data_width_int-1:0] WD; +output [data_width_int-1:0] RD; + +wire VCC,GND; + +wire WClk0_Sel,RClk0_Sel; +wire WClk1_Sel,RClk1_Sel; + +wire reg_rd0; +wire reg_rd1; +wire [10:0] addr_wr0,addr_rd0,addr_wr1,addr_rd1; + +wire [31:0] in_reg0; + +wire [4:0] wen_reg0; + +wire [31:0] out_reg0; + +wire [3:0] out_par0; + +wire [1:0] WS1_0,WS2_0; +wire [1:0] WS_GND; + +wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; + +wire WD0_SEL,RD0_SEL; +wire WD1_SEL,RD1_SEL; + +assign VCC = 1'b1; +assign GND = 1'b0; + +assign WD0_SEL = 1'b1; +assign RD0_SEL = 1'b1; +assign WD1_SEL = 1'b1; +assign RD1_SEL = 1'b1; + +assign WClk0_Sel = 1'b0; +assign RClk0_Sel = 1'b0; + +assign WClk1_Sel = 1'b0; +assign RClk1_Sel = 1'b0; + +assign LS = 1'b0; +assign DS = 1'b0; +assign SD = 1'b0; +assign LS_RB1 = 1'b0; +assign DS_RB1 = 1'b0; +assign SD_RB1 = 1'b0; + +assign reg_rd0 =reg_rd_int; +assign WS_GND = 2'b00; + +assign reg_rd1 = 1'b0; + +assign wen_reg0[4:wr_enable_int]=0; +assign wen_reg0[wr_enable_int-1:0]=WEN; + +assign addr_wr1=11'b0000000000; +assign addr_rd1=11'b0000000000; + +generate + + if(addr_int == 11) + begin + assign addr_wr0[10:0]=WA; + assign addr_rd0[10:0]=RA; + end + else + begin + assign addr_wr0[10:addr_int]=0; + assign addr_wr0[addr_int-1:0]=WA; + assign addr_rd0[10:addr_int]=0; + assign addr_rd0[addr_int-1:0]=RA; + end + + if (data_width_int == 32) + begin + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + else if (data_width_int > 8 && data_width_int < 32) + begin + assign in_reg0[31:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + else if (data_width_int <= 8) + begin + assign in_reg0[31:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + + if(data_width_int <=8) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(data_width_int >8 && data_width_int <=16) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(data_width_int > 16) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + if (data_width_int <=16) begin + + ram8k_2x1_cell_macro # ( + `include "pp3_bram_init_32.vh" + ) + _TECHMAP_REPLACE_ ( + .A1_0(addr_wr0) , + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(WClk), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk0_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(WClk_En), + .CLK2_0(RClk), + .CLK2_1(RClk), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk0_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(RClk_En), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(GND), + .CS2_0(RD0_SEL), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1(wen_reg0[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end + else if (data_width_int > 16) begin + + ram8k_2x1_cell_macro # ( + `include "pp3_bram_init_32.vh" + ) + _TECHMAP_REPLACE_ ( + .A1_0(addr_wr0) , + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(WClk), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk0_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(WClk_En), + .CLK2_0(RClk), + .CLK2_1(RClk), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk0_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(RClk_En), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(GND), + .CS2_0(RD0_SEL), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({1'b0,in_reg0[31:24],1'b0,in_reg0[23:16]}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1(wen_reg0[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1({out_par0[3],out_reg0[31:24],out_par0[2],out_reg0[23:16]}), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end + else + begin + wire TECHMAP_FAIL = 1'b1; + end + +endgenerate + + assign RD[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + +endmodule + + +module FIFO_8K_BLK(DIN,Fifo_Push_Flush,Fifo_Pop_Flush,PUSH,POP,Push_Clk,Pop_Clk,Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush,Almost_Full,Almost_Empty,PUSH_FLAG,POP_FLAG,DOUT); + +parameter data_depth_int = 512, + data_width_int = 36, + reg_rd_int = 0, + sync_fifo_int = 0; + +input Fifo_Push_Flush,Fifo_Pop_Flush; +input Push_Clk,Pop_Clk; +input PUSH,POP; +input [data_width_int-1:0] DIN; +input Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush; +output [data_width_int-1:0] DOUT; +output [3:0] PUSH_FLAG,POP_FLAG; +output Almost_Full,Almost_Empty; + +wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; +wire VCC,GND; + +wire [10:0] addr_wr,addr_rd; +wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; +wire reg_rd0,sync_fifo0; +wire [15:0] in_reg0; +wire [15:0] out_reg0; +wire [1:0] WS1_0; +wire [1:0] WS2_0; +wire Push_Clk0_Sel,Pop_Clk0_Sel; +wire Async_Flush_Sel0; + +wire [1:0] out_par0; + +assign LS = 1'b0; +assign DS = 1'b0; +assign SD = 1'b0; +assign LS_RB1 = 1'b0; +assign DS_RB1 = 1'b0; +assign SD_RB1 = 1'b0; + +assign VCC = 1'b1; +assign GND = 1'b0; + +assign Push_Clk0_Sel = 1'b0; +assign Pop_Clk0_Sel = 1'b0; +assign Async_Flush_Sel0 = 1'b0; + +assign reg_rd0 = reg_rd_int; +assign sync_fifo0 = sync_fifo_int; + +assign addr_wr=11'b00000000000; +assign addr_rd=11'b00000000000; + +assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; +assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; +assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; +assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; +assign clk1_sig_sel0 = Push_Clk0_Sel; +assign clk2_sig_sel0 = Pop_Clk0_Sel ; +assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; +assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; +assign p1_sig0 = Fifo_Dir ? POP : PUSH; +assign p2_sig0 = Fifo_Dir ? PUSH : POP ; + +generate + + if (data_width_int == 16) + begin + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + else if (data_width_int > 8 && data_width_int < 16) + begin + assign in_reg0[15:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + else if (data_width_int <= 8) + begin + assign in_reg0[15:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + + if(data_width_int <=8) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(data_width_int >8 && data_width_int <=16) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(data_width_int > 16) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + +endgenerate + + ram8k_2x1_cell_macro + _TECHMAP_REPLACE_( + .A1_0(addr_wr) , + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(clk1_sig0), + .CLK1_1(GND), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(GND), + .CLK2_0(clk2_sig0), + .CLK2_1(GND), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(GND), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(GND), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND,GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND,GND}), + .WEN1_0({GND,GND}), + .WEN1_1({GND,GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + assign DOUT[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + +endmodule + + +module FIFO_16K_BLK(DIN,Fifo_Push_Flush,Fifo_Pop_Flush,PUSH,POP,Push_Clk,Pop_Clk,Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush,Almost_Full,Almost_Empty,PUSH_FLAG,POP_FLAG,DOUT); + +parameter data_depth_int = 512, + data_width_int = 36, + reg_rd_int = 0, + sync_fifo_int = 0; + +input Fifo_Push_Flush,Fifo_Pop_Flush; +input Push_Clk,Pop_Clk; +input PUSH,POP; +input [data_width_int-1:0] DIN; +input Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush; +output [data_width_int-1:0] DOUT; +output [3:0] PUSH_FLAG,POP_FLAG; +output Almost_Full,Almost_Empty; + +wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; +wire VCC,GND; + +wire [10:0] addr_wr,addr_rd; +wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; +wire reg_rd0,sync_fifo0; +wire [31:0] in_reg0; +wire [31:0] out_reg0; +wire [1:0] WS1_0; +wire [1:0] WS2_0; +wire Push_Clk0_Sel,Pop_Clk0_Sel; +wire Async_Flush_Sel0; + +wire [3:0] out_par0; +wire [1:0] out_par1; + +assign LS = 1'b0; +assign DS = 1'b0; +assign SD = 1'b0; +assign LS_RB1 = 1'b0; +assign DS_RB1 = 1'b0; +assign SD_RB1 = 1'b0; + +assign VCC = 1'b1; +assign GND = 1'b0; + +assign Push_Clk0_Sel = 1'b0; +assign Pop_Clk0_Sel = 1'b0; +assign Async_Flush_Sel0 = 1'b0; + +assign reg_rd0 = reg_rd_int; +assign sync_fifo0 = sync_fifo_int; + +assign addr_wr=11'b00000000000; +assign addr_rd=11'b00000000000; + +assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; +assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; +assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; +assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; +assign clk1_sig_sel0 = Push_Clk0_Sel; +assign clk2_sig_sel0 = Pop_Clk0_Sel ; +assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; +assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; +assign p1_sig0 = Fifo_Dir ? POP : PUSH; +assign p2_sig0 = Fifo_Dir ? PUSH : POP ; + +generate + if (data_width_int == 32) + begin + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + else if (data_width_int > 8 && data_width_int < 32) + begin + assign in_reg0[31:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + else if (data_width_int <= 8) + begin + assign in_reg0[31:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + + if(data_width_int <=8) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(data_width_int >8 && data_width_int <=16) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(data_width_int > 16) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + if (data_width_int <=16) begin + + ram8k_2x1_cell_macro + _TECHMAP_REPLACE_( + .A1_0(addr_wr) , + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(Async_Flush_Sel0), + .CLK1_0(clk1_sig0), + .CLK1_1(clk1_sig0), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(clk1_sig_en0), + .CLK2_0(clk2_sig0), + .CLK2_1(clk2_sig0), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(clk1_sig_sel0), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(clk2_sig_sel0), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(clk2_sig_en0), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND,GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND,GND}), + .WEN1_0({GND,GND}), + .WEN1_1({GND,GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + end + else if (data_width_int > 16) begin + + ram8k_2x1_cell_macro + _TECHMAP_REPLACE_( + .A1_0(addr_wr) , + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(Async_Flush_Sel0), + .CLK1_0(clk1_sig0), + .CLK1_1(clk1_sig0), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(clk1_sig_en0), + .CLK2_0(clk2_sig0), + .CLK2_1(clk2_sig0), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(clk1_sig_sel0), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(clk2_sig_sel0), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(clk2_sig_en0), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({1'b0,in_reg0[31:24],1'b0,in_reg0[23:16]}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND,GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND,GND}), + .WEN1_0({GND,GND}), + .WEN1_1({GND,GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1({out_par0[3],out_reg0[31:24],out_par0[2],out_reg0[23:16]}), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end + +endgenerate + + assign DOUT[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + +endmodule diff --git a/ql-qlf-plugin/pp3_braminit.cc b/ql-qlf-plugin/pp3_braminit.cc new file mode 100644 index 000000000..f521fa16b --- /dev/null +++ b/ql-qlf-plugin/pp3_braminit.cc @@ -0,0 +1,161 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Clifford Wolf + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "kernel/yosys.h" +#include "kernel/sigtools.h" +#include +#include +#include + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +static void run_pp3_braminit(Module *module) +{ + for (auto cell : module->selected_cells()) + { + uint32_t mem[2048]; + int32_t ramDataWidth = 32; + int32_t ramDataDepth = 512; + + log("cell type %s\n", RTLIL::id2cstr(cell->name)); + + /* Only consider cells we're interested in */ + if (cell->type != ID(RAM_16K_BLK) && + cell->type != ID(RAM_8K_BLK)) + continue; + log("found ram block\n"); + if (!cell->hasParam(ID(INIT_FILE))) + continue; + std::string init_file = cell->getParam(ID(INIT_FILE)).decode_string(); + cell->unsetParam(ID(INIT_FILE)); + if (init_file == "") + continue; + + /* Open file */ + log("Processing %s : %s\n", RTLIL::id2cstr(cell->name), init_file.c_str()); + ramDataWidth = cell->getParam(ID(data_width_int)).as_int(); + ramDataDepth = cell->getParam(ID(data_depth_int)).as_int(); + + std::ifstream f; + f.open(init_file.c_str()); + if (f.fail()) { + log("Can not open file `%s`.\n", init_file.c_str()); + continue; + } + + /* Defaults to 0 */ + memset(mem, 0x00, sizeof(mem)); + + /* Process each line */ + bool in_comment = false; + int cursor = 0; + + while (!f.eof()) + { + std::string line, token; + std::getline(f, line); + + for (int i = 0; i < GetSize(line); i++) + { + if (in_comment && line.compare(i, 2, "*/") == 0) { + line[i] = ' '; + line[i+1] = ' '; + in_comment = false; + continue; + } + if (!in_comment && line.compare(i, 2, "/*") == 0) + in_comment = true; + if (in_comment) + line[i] = ' '; + } + + while (1) + { + bool set_cursor = false; + long value; + + token = next_token(line, " \t\r\n"); + if (token.empty() || token.compare(0, 2, "//") == 0) + break; + + if (token[0] == '@') { + token = token.substr(1); + set_cursor = true; + } + + const char *nptr = token.c_str(); + char *endptr; + value = strtol(nptr, &endptr, 16); + if (!*nptr || *endptr) { + log("Can not parse %s `%s` for %s.\n", + set_cursor ? "address" : "value", + nptr, token.c_str() + ); + continue; + } + + if (set_cursor) + cursor = value; + else if (cursor >= 0 && cursor < ramDataDepth) + mem[cursor++] = value; + else + log("Attempt to initialize non existent address %d\n", cursor); + } + } + + /* Set attributes */ + std::string val = ""; + for (int i=ramDataDepth-1; i>=0; i--) { + //std::string val = ""; + if (ramDataWidth == 8) + val += std::bitset<8>(mem[i]).to_string(); + else if (ramDataWidth == 16) + val += std::bitset<16>(mem[i]).to_string(); + else if (ramDataWidth == 32) + val += std::bitset<32>(mem[i]).to_string(); + } + cell->setParam("\\INIT", RTLIL::Const::from_string(val)); + } +} + +struct PP3BRAMInitPass : public Pass { + PP3BRAMInitPass() : Pass("pp3_braminit", "PP3: perform RAM Block initialization from file") { } + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" pp3_braminit\n"); + log("\n"); + log("This command processes all PP3 RAM blocks with a non-empty INIT_FILE\n"); + log("parameter and converts it into the required INIT attributes\n"); + log("\n"); + } + void execute(std::vector args, RTLIL::Design *design) override + { + log_header(design, "Executing PP3_BRAMINIT pass.\n"); + + extra_args(args, 1, design); + + for (auto module : design->selected_modules()) + run_pp3_braminit(module); + } +} PP3BRAMInitPass; + +PRIVATE_NAMESPACE_END diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 8d1dce1d4..1130f17d1 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -243,8 +243,11 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_clean"); } - if (check_label("map_bram", "(skip if -no_bram)") && family == "qlf_k6n10" && inferBram) { + if (check_label("map_bram", "(skip if -no_bram)") && (family == "qlf_k6n10" || family == "pp3") && inferBram) { run("memory_bram -rules +/quicklogic/" + family + "_brams.txt"); + if (family == "pp3") { + run("pp3_braminit"); + } run("techmap -map +/quicklogic/" + family + "_brams_map.v"); } From 5b204aa3dda685d014f8531b8a4befb731a56443 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Jun 2021 10:19:53 +0200 Subject: [PATCH 345/845] Moved qlf_k6n10 BRAM test Signed-off-by: Maciej Kurc --- ql-qlf-plugin/tests/Makefile | 4 +++- ql-qlf-plugin/tests/{bram => qlf_k6n10_bram}/bram.tcl | 0 ql-qlf-plugin/tests/{bram => qlf_k6n10_bram}/bram.v | 0 ql-qlf-plugin/tests/{bram => qlf_k6n10_bram}/bram.ys | 0 4 files changed, 3 insertions(+), 1 deletion(-) rename ql-qlf-plugin/tests/{bram => qlf_k6n10_bram}/bram.tcl (100%) rename ql-qlf-plugin/tests/{bram => qlf_k6n10_bram}/bram.v (100%) rename ql-qlf-plugin/tests/{bram => qlf_k6n10_bram}/bram.ys (100%) diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 525750d92..0fb557223 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -19,7 +19,8 @@ TESTS = consts \ logic \ mux \ tribuf \ - fsm + fsm #\ +# qlf_k6n10_bram \ include $(shell pwd)/../../Makefile_test.common @@ -35,3 +36,4 @@ logic_verify = true mux_verify = true tribuf_verify = true fsm_verify = true +#qlf_k6n10_bram_verify = true diff --git a/ql-qlf-plugin/tests/bram/bram.tcl b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.tcl similarity index 100% rename from ql-qlf-plugin/tests/bram/bram.tcl rename to ql-qlf-plugin/tests/qlf_k6n10_bram/bram.tcl diff --git a/ql-qlf-plugin/tests/bram/bram.v b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v similarity index 100% rename from ql-qlf-plugin/tests/bram/bram.v rename to ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v diff --git a/ql-qlf-plugin/tests/bram/bram.ys b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.ys similarity index 100% rename from ql-qlf-plugin/tests/bram/bram.ys rename to ql-qlf-plugin/tests/qlf_k6n10_bram/bram.ys From 8cbc14f47c856022fb0e566b54491058f911741c Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Jun 2021 11:31:10 +0200 Subject: [PATCH 346/845] Added simulation models for EOS-S3 hard blocks Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 5 +- ql-qlf-plugin/pp3/pp3_brams_sim.v | 2879 ++++++++++++++++++++++++++ ql-qlf-plugin/pp3/pp3_cells_sim.v | 160 +- ql-qlf-plugin/pp3/pp3_mult_sim.v | 114 + ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v | 2509 ++++++++++++++++++++++ 5 files changed, 5593 insertions(+), 74 deletions(-) create mode 100644 ql-qlf-plugin/pp3/pp3_brams_sim.v create mode 100644 ql-qlf-plugin/pp3/pp3_mult_sim.v create mode 100644 ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index a03bd715d..522de7564 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -36,10 +36,13 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(PP3_DIR)/pp3_latches_map.v \ $(PP3_DIR)/pp3_lut_map.v \ $(PP3_DIR)/pp3_lutdefs.txt \ + $(PP3_DIR)/pp3_brams_sim.v \ $(PP3_DIR)/pp3_brams_map.v \ $(PP3_DIR)/pp3_brams.txt \ $(PP3_DIR)/pp3_bram_init_8_16.vh \ - $(PP3_DIR)/pp3_bram_init_32.vh + $(PP3_DIR)/pp3_bram_init_32.vh \ + $(PP3_DIR)/pp3_qlal4s3b_sim.v \ + $(PP3_DIR)/pp3_mult_sim.v retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) diff --git a/ql-qlf-plugin/pp3/pp3_brams_sim.v b/ql-qlf-plugin/pp3/pp3_brams_sim.v new file mode 100644 index 000000000..a5bc4a621 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_brams_sim.v @@ -0,0 +1,2879 @@ +`timescale 1ns/10ps +module fifo_controller_model( + Rst_n, + Push_Clk, + Pop_Clk, + + Fifo_Push, + Fifo_Push_Flush, + Fifo_Full, + Fifo_Full_Usr, + + Fifo_Pop, + Fifo_Pop_Flush, + Fifo_Empty, + Fifo_Empty_Usr, + + Write_Addr, + + Read_Addr, + + // Static Control Signals + Fifo_Ram_Mode, + Fifo_Sync_Mode, + Fifo_Push_Width, + Fifo_Pop_Width + ); + + + + //************* PPII 4K Parameters **************************// + + parameter MAX_PTR_WIDTH = 12; + + parameter DEPTH1 = (1<<(MAX_PTR_WIDTH-3)); + parameter DEPTH2 = (1<<(MAX_PTR_WIDTH-2)); + parameter DEPTH3 = (1<<(MAX_PTR_WIDTH-1)); + + parameter D1_QTR_A = MAX_PTR_WIDTH - 5; + parameter D2_QTR_A = MAX_PTR_WIDTH - 4; + parameter D3_QTR_A = MAX_PTR_WIDTH - 3; + + input Rst_n; + input Push_Clk; + input Pop_Clk; + + input Fifo_Push; + input Fifo_Push_Flush; + output Fifo_Full; + output [3:0] Fifo_Full_Usr; + + input Fifo_Pop; + input Fifo_Pop_Flush; + output Fifo_Empty; + output [3:0] Fifo_Empty_Usr; + + output [MAX_PTR_WIDTH-2:0] Write_Addr; + + output [MAX_PTR_WIDTH-2:0] Read_Addr; + + input Fifo_Ram_Mode; + input Fifo_Sync_Mode; + input [1:0] Fifo_Push_Width; + input [1:0] Fifo_Pop_Width; + + reg flush_pop_clk_tf; + reg flush_pop2push_clk1; + reg flush_push_clk_tf; + reg flush_push2pop_clk1; + reg pop_local_flush_mask; + reg push_flush_tf_pop_clk; + reg pop2push_ack1; + reg pop2push_ack2; + reg push_local_flush_mask; + reg pop_flush_tf_push_clk; + reg push2pop_ack1; + reg push2pop_ack2; + + reg fifo_full_flag_f; + reg [3:0] Fifo_Full_Usr; + + reg fifo_empty_flag_f; + reg [3:0] Fifo_Empty_Usr; + + reg [MAX_PTR_WIDTH-1:0] push_ptr_push_clk; + reg [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk; + reg [MAX_PTR_WIDTH-1:0] pop_ptr_async; + reg [MAX_PTR_WIDTH-1:0] pop_ptr_pop_clk ; + reg [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk; + reg [MAX_PTR_WIDTH-1:0] push_ptr_async; + + reg [1:0] push_ptr_push_clk_mask; + reg [1:0] pop_ptr_pop_clk_mask; + + reg [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_mux; + reg [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_mux; + + reg match_room4none; + reg match_room4one; + reg match_room4half; + reg match_room4quart; + + reg match_all_left; + reg match_half_left; + reg match_quart_left; + + reg [MAX_PTR_WIDTH-1:0] depth1_reg; + reg [MAX_PTR_WIDTH-1:0] depth2_reg; + reg [MAX_PTR_WIDTH-1:0] depth3_reg; + + + wire push_clk_rst; + wire push_clk_rst_mux; + wire push_flush_done; + wire pop_clk_rst; + wire pop_clk_rst_mux; + wire pop_flush_done; + + wire push_flush_gated; + wire pop_flush_gated; + + wire [MAX_PTR_WIDTH-2:0] Write_Addr; + wire [MAX_PTR_WIDTH-2:0] Read_Addr; + + wire [MAX_PTR_WIDTH-1:0] push_ptr_push_clk_plus1; + wire [MAX_PTR_WIDTH-1:0] next_push_ptr_push_clk; + wire [MAX_PTR_WIDTH-1:0] pop_ptr_pop_clk_plus1; + wire [MAX_PTR_WIDTH-1:0] next_pop_ptr_pop_clk; + wire [MAX_PTR_WIDTH-1:0] next_push_ptr_push_clk_mask; + wire [MAX_PTR_WIDTH-1:0] next_pop_ptr_pop_clk_mask; + + wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_l_shift1; + wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_l_shift2; + wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_r_shift1; + wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_r_shift2; + + wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_l_shift1; + wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_l_shift2; + wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_r_shift1; + wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_r_shift2; + + wire [MAX_PTR_WIDTH-1:0] push_diff; + wire [MAX_PTR_WIDTH-1:0] push_diff_plus_1; + wire [MAX_PTR_WIDTH-1:0] pop_diff; + + wire match_room4all; + wire match_room4eight; + + wire match_one_left; + wire match_one2eight_left; + + integer depth_sel_push; + integer depth_sel_pop; + + initial + begin + depth1_reg = DEPTH1; + depth2_reg = DEPTH2; + depth3_reg = DEPTH3; + end + + initial + begin + flush_pop_clk_tf <= 1'b0; + push2pop_ack1 <= 1'b0; + push2pop_ack2 <= 1'b0; + pop_local_flush_mask <= 1'b0; + flush_push2pop_clk1 <= 1'b0; + push_flush_tf_pop_clk <= 1'b0; + flush_push_clk_tf <= 1'b0; + pop2push_ack1 <= 1'b0; + pop2push_ack2 <= 1'b0; + push_local_flush_mask <= 1'b0; + flush_pop2push_clk1 <= 1'b0; + pop_flush_tf_push_clk <= 1'b0; + push_ptr_push_clk <= 0; + pop_ptr_push_clk <= 0; + pop_ptr_async <= 0; + fifo_full_flag_f <= 0; + pop_ptr_pop_clk <= 0; + push_ptr_pop_clk <= 0; + push_ptr_async <= 0; + fifo_empty_flag_f <= 1; + Fifo_Full_Usr <= 4'b0001; + Fifo_Empty_Usr <= 4'b0000; + end + + assign Fifo_Full = fifo_full_flag_f; + assign Fifo_Empty = fifo_empty_flag_f; + + assign Write_Addr = push_ptr_push_clk[MAX_PTR_WIDTH-2:0]; + assign Read_Addr = next_pop_ptr_pop_clk[MAX_PTR_WIDTH-2:0]; + + assign push_ptr_push_clk_plus1 = push_ptr_push_clk + 1; + assign next_push_ptr_push_clk = ( Fifo_Push ) ? push_ptr_push_clk_plus1 : push_ptr_push_clk; + assign next_push_ptr_push_clk_mask = { ( push_ptr_push_clk_mask & next_push_ptr_push_clk[MAX_PTR_WIDTH-1:MAX_PTR_WIDTH-2] ), next_push_ptr_push_clk[MAX_PTR_WIDTH-3:0] }; + + assign pop_ptr_pop_clk_plus1 = pop_ptr_pop_clk + 1; + assign next_pop_ptr_pop_clk = ( Fifo_Pop ) ? pop_ptr_pop_clk_plus1 : pop_ptr_pop_clk; + assign next_pop_ptr_pop_clk_mask = { ( pop_ptr_pop_clk_mask & next_pop_ptr_pop_clk[MAX_PTR_WIDTH-1:MAX_PTR_WIDTH-2] ), next_pop_ptr_pop_clk[MAX_PTR_WIDTH-3:0] }; + + assign pop_ptr_push_clk_l_shift1 = { pop_ptr_push_clk[MAX_PTR_WIDTH-2:0], 1'b0 }; + assign pop_ptr_push_clk_l_shift2 = { pop_ptr_push_clk[MAX_PTR_WIDTH-3:0], 2'b0 }; + assign pop_ptr_push_clk_r_shift1 = { 1'b0, pop_ptr_push_clk[MAX_PTR_WIDTH-1:1] }; + assign pop_ptr_push_clk_r_shift2 = { 2'b0, pop_ptr_push_clk[MAX_PTR_WIDTH-1:2] }; + + assign push_ptr_pop_clk_l_shift1 = { push_ptr_pop_clk[MAX_PTR_WIDTH-2:0], 1'b0 }; + assign push_ptr_pop_clk_l_shift2 = { push_ptr_pop_clk[MAX_PTR_WIDTH-3:0], 2'b0 }; + assign push_ptr_pop_clk_r_shift1 = { 1'b0, push_ptr_pop_clk[MAX_PTR_WIDTH-1:1] }; + assign push_ptr_pop_clk_r_shift2 = { 2'b0, push_ptr_pop_clk[MAX_PTR_WIDTH-1:2] }; + + assign push_diff = next_push_ptr_push_clk_mask - pop_ptr_push_clk_mux; + assign push_diff_plus_1 = push_diff + 1; + assign pop_diff = push_ptr_pop_clk_mux - next_pop_ptr_pop_clk_mask; + + assign match_room4all = ~|push_diff; + assign match_room4eight = ( depth_sel_push == 3 ) ? ( push_diff >= DEPTH3-8 ) : ( depth_sel_push == 2 ) ? ( push_diff >= DEPTH2-8 ) : ( push_diff >= DEPTH1-8 ); + + assign match_one_left = ( pop_diff == 1 ); + assign match_one2eight_left = ( pop_diff < 8 ); + + assign push_flush_gated = Fifo_Push_Flush & ~push_local_flush_mask; + assign pop_flush_gated = Fifo_Pop_Flush & ~pop_local_flush_mask; + + assign push_clk_rst = flush_pop2push_clk1 ^ pop_flush_tf_push_clk; + assign pop_clk_rst = flush_push2pop_clk1 ^ push_flush_tf_pop_clk; + + assign pop_flush_done = push2pop_ack1 ^ push2pop_ack2; + assign push_flush_done = pop2push_ack1 ^ pop2push_ack2; + + assign push_clk_rst_mux = ( Fifo_Sync_Mode ) ? ( Fifo_Push_Flush | Fifo_Pop_Flush ) : ( push_flush_gated | push_clk_rst ); + assign pop_clk_rst_mux = ( Fifo_Sync_Mode ) ? ( Fifo_Push_Flush | Fifo_Pop_Flush ) : ( pop_flush_gated | ( pop_local_flush_mask & ~pop_flush_done ) | pop_clk_rst ); + + + reg match_room_at_most63, match_at_most63_left; + + always@( push_diff or push_diff_plus_1 or depth_sel_push or match_room4none or match_room4one ) + begin + if( depth_sel_push == 1 ) + begin + match_room4none <= ( push_diff[D1_QTR_A+2:0] == depth1_reg[D1_QTR_A+2:0] ); +// syao 2/12/2013 + match_room4one <= ( push_diff_plus_1[D1_QTR_A+2:0] == depth1_reg ) | match_room4none; + + match_room4half <= ( push_diff[D1_QTR_A+1] == 1'b1 ); + match_room4quart <= ( push_diff[D1_QTR_A] == 1'b1 ); + + match_room_at_most63 <= push_diff[6]; + end + else if( depth_sel_push == 2 ) + begin + match_room4none <= ( push_diff[D2_QTR_A+2:0] == depth2_reg[D2_QTR_A+2:0] ); +// syao 2/12/2013 + match_room4one <= ( push_diff_plus_1[D2_QTR_A+2:0] == depth2_reg ) | match_room4none; + + match_room4half <= ( push_diff[D2_QTR_A+1] == 1'b1 ); + match_room4quart <= ( push_diff[D2_QTR_A] == 1'b1 ); + +// syao 2/12/2013 +// match_room_at_most63 <= push_diff[6]; + match_room_at_most63 <= &push_diff[7:6]; + end + else + begin + match_room4none <= ( push_diff == depth3_reg ); + match_room4one <= ( push_diff_plus_1 == depth3_reg ) | match_room4none; + + match_room4half <= ( push_diff[D3_QTR_A+1] == 1'b1 ); + match_room4quart <= ( push_diff[D3_QTR_A] == 1'b1 ); + +// syao 2/12/2013 +// match_room_at_most63 <= &push_diff[7:6]; + match_room_at_most63 <= &push_diff[8:6]; + end + end + + + + assign room4_32s = ~push_diff[5]; + assign room4_16s = ~push_diff[4]; + assign room4_8s = ~push_diff[3]; + assign room4_4s = ~push_diff[2]; + assign room4_2s = ~push_diff[1]; + assign room4_1s = &push_diff[1:0]; + + always@( depth_sel_pop or pop_diff ) + begin + if( depth_sel_pop == 1 ) + begin + match_all_left <= ( pop_diff[D1_QTR_A+2:0] == depth1_reg[D1_QTR_A+2:0] ); + + match_half_left <= ( pop_diff[D1_QTR_A+1] == 1'b1 ); + match_quart_left <= ( pop_diff[D1_QTR_A] == 1'b1 ); + + match_at_most63_left <= ~pop_diff[6]; + end + else if( depth_sel_pop == 2 ) + begin + match_all_left <= ( pop_diff[D2_QTR_A+2:0] == depth2_reg[D2_QTR_A+2:0] ); + + match_half_left <= ( pop_diff[D2_QTR_A+1] == 1'b1 ); + match_quart_left <= ( pop_diff[D2_QTR_A] == 1'b1 ); + +// syao 2/12/2013 +// match_at_most63_left <= ~pop_diff[6]; + match_at_most63_left <= ~|pop_diff[7:6]; + end + else + begin + match_all_left <= ( pop_diff == depth3_reg ); + + match_half_left <= ( pop_diff[D3_QTR_A+1] == 1'b1 ); + match_quart_left <= ( pop_diff[D3_QTR_A] == 1'b1 ); + +// syao 2/12/2013 +// match_at_most63_left <= ~|pop_diff[7:6]; + match_at_most63_left <= ~|pop_diff[8:6]; + end + end + + + + assign at_least_32 = pop_diff[5]; + assign at_least_16 = pop_diff[4]; + assign at_least_8 = pop_diff[3]; + assign at_least_4 = pop_diff[2]; + assign at_least_2 = pop_diff[1]; + assign one_left = pop_diff[0]; + + + always@( posedge Pop_Clk or negedge Rst_n ) + begin + if( ~Rst_n ) + begin + push2pop_ack1 <= 1'b0; + push2pop_ack2 <= 1'b0; + flush_pop_clk_tf <= 1'b0; + pop_local_flush_mask <= 1'b0; + flush_push2pop_clk1 <= 1'b0; + push_flush_tf_pop_clk <= 1'b0; + end + else + begin + push2pop_ack1 <= pop_flush_tf_push_clk; + push2pop_ack2 <= push2pop_ack1; + flush_push2pop_clk1 <= flush_push_clk_tf; + if( pop_flush_gated ) + begin + flush_pop_clk_tf <= ~flush_pop_clk_tf; + end + + if( pop_flush_gated & ~Fifo_Sync_Mode ) + begin + pop_local_flush_mask <= 1'b1; + end + else if( pop_flush_done ) + begin + pop_local_flush_mask <= 1'b0; + end + + if( pop_clk_rst ) + begin + push_flush_tf_pop_clk <= ~push_flush_tf_pop_clk; + end + end + end + + always@( posedge Push_Clk or negedge Rst_n ) + begin + if( ~Rst_n ) + begin + pop2push_ack1 <= 1'b0; + pop2push_ack2 <= 1'b0; + flush_push_clk_tf <= 1'b0; + push_local_flush_mask <= 1'b0; + flush_pop2push_clk1 <= 1'b0; + pop_flush_tf_push_clk <= 1'b0; + end + else + begin + pop2push_ack1 <= push_flush_tf_pop_clk; + pop2push_ack2 <= pop2push_ack1; + flush_pop2push_clk1 <= flush_pop_clk_tf; + if( push_flush_gated ) + begin + flush_push_clk_tf <= ~flush_push_clk_tf; + end + + if( push_flush_gated & ~Fifo_Sync_Mode ) + begin + push_local_flush_mask <= 1'b1; + end + else if( push_flush_done ) + begin + push_local_flush_mask <= 1'b0; + end + + if( push_clk_rst ) + begin + pop_flush_tf_push_clk <= ~pop_flush_tf_push_clk; + end + end + end + + always@( Fifo_Push_Width or Fifo_Pop_Width or pop_ptr_push_clk_l_shift1 or pop_ptr_push_clk_l_shift2 or pop_ptr_push_clk_r_shift1 or + pop_ptr_push_clk_r_shift2 or push_ptr_pop_clk_l_shift1 or push_ptr_pop_clk_l_shift2 or push_ptr_pop_clk_r_shift1 or push_ptr_pop_clk_r_shift2 or + pop_ptr_push_clk or push_ptr_pop_clk ) + begin + case( { Fifo_Push_Width, Fifo_Pop_Width } ) + 4'b0001: // byte push halfword pop + begin + push_ptr_push_clk_mask <= 2'b11; + pop_ptr_pop_clk_mask <= 2'b01; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_l_shift1; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_r_shift1; + end + 4'b0010: // byte push word pop + begin + push_ptr_push_clk_mask <= 2'b11; + pop_ptr_pop_clk_mask <= 2'b00; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_l_shift2; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_r_shift2; + end + 4'b0100: // halfword push byte pop + begin + push_ptr_push_clk_mask <= 2'b01; + pop_ptr_pop_clk_mask <= 2'b11; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_r_shift1; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_l_shift1; + end + 4'b0110: // halfword push word pop + begin + push_ptr_push_clk_mask <= 2'b11; + pop_ptr_pop_clk_mask <= 2'b01; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_l_shift1; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_r_shift1; + end + 4'b1000: // word push byte pop + begin + push_ptr_push_clk_mask <= 2'b00; + pop_ptr_pop_clk_mask <= 2'b11; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_r_shift2; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_l_shift2; + end + 4'b1001: // word push halfword pop + begin + push_ptr_push_clk_mask <= 2'b01; + pop_ptr_pop_clk_mask <= 2'b11; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_r_shift1; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_l_shift1; + end + default: // no conversion + begin + push_ptr_push_clk_mask <= 2'b11; + pop_ptr_pop_clk_mask <= 2'b11; + pop_ptr_push_clk_mux <= pop_ptr_push_clk; + push_ptr_pop_clk_mux <= push_ptr_pop_clk; + end + endcase + end + + always@( Fifo_Ram_Mode or Fifo_Push_Width ) + begin + if( Fifo_Ram_Mode == Fifo_Push_Width[0] ) + begin + depth_sel_push <= 2; + end + else if( Fifo_Ram_Mode == Fifo_Push_Width[1] ) + begin + depth_sel_push <= 1; + end + else + begin + depth_sel_push <= 3; + end + end + + always@( Fifo_Ram_Mode or Fifo_Pop_Width ) + begin + if( Fifo_Ram_Mode == Fifo_Pop_Width[0] ) + begin + depth_sel_pop <= 2; + end + else if( Fifo_Ram_Mode == Fifo_Pop_Width[1] ) + begin + depth_sel_pop <= 1; + end + else + begin + depth_sel_pop <= 3; + end + end + + always@( posedge Push_Clk or negedge Rst_n ) + begin + if( ~Rst_n ) + begin + push_ptr_push_clk <= 0; + pop_ptr_push_clk <= 0; + pop_ptr_async <= 0; + fifo_full_flag_f <= 0; + end + else + begin + if( push_clk_rst_mux ) + begin + push_ptr_push_clk <= 0; + pop_ptr_push_clk <= 0; + pop_ptr_async <= 0; + fifo_full_flag_f <= 0; + end + else + begin + push_ptr_push_clk <= next_push_ptr_push_clk; + pop_ptr_push_clk <= ( Fifo_Sync_Mode ) ? next_pop_ptr_pop_clk : pop_ptr_async; + pop_ptr_async <= pop_ptr_pop_clk; + fifo_full_flag_f <= match_room4one | match_room4none; + end + end + end + + always@( posedge Pop_Clk or negedge Rst_n ) + begin + if( ~Rst_n ) + begin + pop_ptr_pop_clk <= 0; + push_ptr_pop_clk <= 0; + push_ptr_async <= 0; + fifo_empty_flag_f <= 1; + end + else + begin + if( pop_clk_rst_mux ) + begin + pop_ptr_pop_clk <= 0; + push_ptr_pop_clk <= 0; + push_ptr_async <= 0; + fifo_empty_flag_f <= 1; + end + else + begin + pop_ptr_pop_clk <= next_pop_ptr_pop_clk; + push_ptr_pop_clk <= ( Fifo_Sync_Mode ) ? next_push_ptr_push_clk : push_ptr_async; + push_ptr_async <= push_ptr_push_clk; + fifo_empty_flag_f <= ( pop_diff == 1 ) | ( pop_diff == 0 ); + end + end + end + + always@( posedge Push_Clk or negedge Rst_n ) + begin + if( ~Rst_n ) + begin + +//based on rtl, this should be full after reset +// Fifo_Full_Usr <= 4'b1000; + Fifo_Full_Usr <= 4'b0001; + end + else + begin + if( match_room4none ) + begin + Fifo_Full_Usr <= 4'b0000; + end + else if( match_room4all ) + begin + Fifo_Full_Usr <= 4'b0001; + end + else if( ~match_room4half ) + begin + Fifo_Full_Usr <= 4'b0010; + end + else if( ~match_room4quart ) + begin + Fifo_Full_Usr <= 4'b0011; + end + else + begin + if (match_room_at_most63) + begin + if (room4_32s) + Fifo_Full_Usr <= 4'b1010; + else if (room4_16s) + Fifo_Full_Usr <= 4'b1011; + else if (room4_8s) + Fifo_Full_Usr <= 4'b1100; + else if (room4_4s) + Fifo_Full_Usr <= 4'b1101; + else if (room4_2s) + Fifo_Full_Usr <= 4'b1110; + else if (room4_1s) + Fifo_Full_Usr <= 4'b1111; + else + Fifo_Full_Usr <= 4'b1110; + end + else + Fifo_Full_Usr <= 4'b0100; + end + end + end + + always@( posedge Pop_Clk or negedge Rst_n ) + begin + if( ~Rst_n ) + begin + Fifo_Empty_Usr <= 4'b0000; + end + else + begin + if( Fifo_Pop_Flush | ( pop_local_flush_mask & ~pop_flush_done ) | pop_clk_rst ) + begin + Fifo_Empty_Usr <= 4'b0000; + end + else + if( match_all_left ) + begin + Fifo_Empty_Usr <= 4'b1111; + end + else if( match_half_left ) + begin + Fifo_Empty_Usr <= 4'b1110; + end + else if( match_quart_left ) + begin + Fifo_Empty_Usr <= 4'b1101; + end + else + begin + if (match_at_most63_left) + begin + if (at_least_32) + Fifo_Empty_Usr <= 4'b0110; + else if (at_least_16) + Fifo_Empty_Usr <= 4'b0101; + else if (at_least_8) + Fifo_Empty_Usr <= 4'b0100; + else if (at_least_4) + Fifo_Empty_Usr <= 4'b0011; + else if (at_least_2) + Fifo_Empty_Usr <= 4'b0010; + else if (one_left) + Fifo_Empty_Usr <= 4'b0001; + else Fifo_Empty_Usr <= 4'b0000; + end + else + Fifo_Empty_Usr <= 4'b1000; + end + end + end +endmodule + +`timescale 10 ps /1 ps + +//`define ADDRWID 8 +`define DATAWID 18 +`define WEWID 2 +//`define DEPTH 256 + +module ram( + AA, + AB, + CLKA, + CLKB, + WENA, + WENB, + CENA, + CENB, + WENBA, + WENBB, + DA, + QA, + DB, + QB + ); + + +parameter ADDRWID = 8; +parameter DEPTH = (1< 16) + ram[i] <= {1'b0,ram_dum[i][((16*init_ad)+16)-1:((16*init_ad)+8)],1'b0,ram_dum[i][((16*init_ad)+8)-1: (16*init_ad)]}; + else if (data_width_int <= 8 && data_depth_int <= 1024) + ram[i] <= {1'b0,ram_dum[i+n+1+(1024*init_ad)][7:0],1'b0,ram_dum[i+n+(1024*init_ad)][7:0]}; + else if (data_width_int <= 8 && data_depth_int > 1024) + ram[i] <= {1'b0,ram_dum[i+o+init_ad+1][7:0],1'b0,ram_dum[i+o+init_ad][7:0]}; + else if (data_width_int > 8 && data_width_int <= 16 && data_depth_int > 512) + ram[i] <= {1'b0,ram_dum[i+n+init_ad][15:8],1'b0,ram_dum[i+n+init_ad][7:0]}; + else + ram[i] <= {1'b0,ram_dum[i+(512*init_ad)][15:8],1'b0,ram_dum[i+(512*init_ad)][7:0]}; + + n= n+1; + o= o+3; + end + end + + always@( WENB1 or I1 or tmpData1 ) + begin + for( j = 0; j < 9; j = j+1 ) + begin + wrData1[j] <= ( WENB1[0] ) ? tmpData1[j] : I1[j]; + end + for( l = 9; l < 19; l = l+1 ) + begin + wrData1[l] <= ( WENB1[1] ) ? tmpData1[l] : I1[l]; + end + end + + always@( posedge CLKA ) + begin + if( ~WEN1 & ~CEN1 ) + begin + ram[A1] <= wrData1[`DATAWID-1:0]; + end + end + +//pre-charging to 1 every clock cycle + always@( posedge CLKA_d) + if(~CEN1_d) + begin + O1 = 18'h3ffff; + #100; + O1 = 18'h00000; + end + + + always@( posedge CLKA ) + if (~CEN1) + begin + AddrOut1 <= A1; + end + + always@( posedge CLKA_d) + if (~CEN1_d) + begin + QAreg <= ram[AddrOut1]; + end + + + always@( posedge CLKA ) + begin + WEN1_f <= ~WEN1 & ~CEN1; + A1_f<= A1; + + end + + always@( WENB2 or I2 or tmpData2 ) + begin + for( k = 0; k < 9; k = k+1 ) + begin + wrData2[k] <= ( WENB2[0] ) ? tmpData2[k] : I2[k]; + end + for( m = 9; m < 19; m = m+1 ) + begin + wrData2[m] <= ( WENB2[1] ) ? tmpData2[m] : I2[m]; + end + end + + always@( posedge CLKB ) + begin + if( ~WEN2 & ~CEN2 ) + begin + ram[A2] <= wrData2[`DATAWID-1:0]; + end + end + +//pre-charging to 1 every clock cycle + always@( posedge CLKB_d ) + if(~CEN2_d) + begin + O2 = 18'h3ffff; + #100; + O2 = 18'h00000; + end + + always@( posedge CLKB ) + if (~CEN2) + begin + AddrOut2 <= A2; + end + + always@( posedge CLKB_d ) + if (~CEN2_d) + begin + QBreg <= ram[AddrOut2]; + end + + always@( posedge CLKB ) + begin + WEN2_f <= ~WEN2 & ~CEN2; + A2_f<=A2; + + end + + always@( A1_f or A2_f or overlap) + begin + if( overlap ) + begin + ram[A1_f] <= 18'bxxxxxxxxxxxxxxxxxx; + end + end + +endmodule + +`timescale 1 ns /10 ps +//`define ADDRWID 10 +`define DATAWID 18 +`define WEWID 2 + +module x2_model( + Concat_En, + + ram0_WIDTH_SELA, + ram0_WIDTH_SELB, + ram0_PLRD, + + ram0_CEA, + ram0_CEB, + ram0_I, + ram0_O, + ram0_AA, + ram0_AB, + ram0_CSBA, + ram0_CSBB, + ram0_WENBA, + + ram1_WIDTH_SELA, + ram1_WIDTH_SELB, + ram1_PLRD, + + ram1_CEA, + ram1_CEB, + ram1_I, + ram1_O, + ram1_AA, + ram1_AB, + ram1_CSBA, + ram1_CSBB, + ram1_WENBA + ); + +parameter ADDRWID = 10; +parameter [18431:0] INIT = 18432'bx; +parameter INIT_FILE="init.mem"; +parameter data_width_int = 16; +parameter data_depth_int = 1024; +parameter init_ad1 = 0; +parameter init_ad2 = (data_depth_int > 1024)?2:1; + + + input Concat_En; + + input [1:0] ram0_WIDTH_SELA; + input [1:0] ram0_WIDTH_SELB; + input ram0_PLRD; + input ram0_CEA; + input ram0_CEB; + input [`DATAWID-1:0] ram0_I; + output [`DATAWID-1:0] ram0_O; + input [ADDRWID-1:0] ram0_AA; + input [ADDRWID-1:0] ram0_AB; + input ram0_CSBA; + input ram0_CSBB; + input [`WEWID-1:0] ram0_WENBA; + + input [1:0] ram1_WIDTH_SELA; + input [1:0] ram1_WIDTH_SELB; + input ram1_PLRD; + input ram1_CEA; + input ram1_CEB; + input [`DATAWID-1:0] ram1_I; + output [`DATAWID-1:0] ram1_O; + input [ADDRWID-1:0] ram1_AA; + input [ADDRWID-1:0] ram1_AB; + input ram1_CSBA; + input ram1_CSBB; + input [`WEWID-1:0] ram1_WENBA; + + reg ram0_PLRDA_SEL; + reg ram0_PLRDB_SEL; + reg ram1_PLRDA_SEL; + reg ram1_PLRDB_SEL; + reg ram_AA_ram_SEL; + reg ram_AB_ram_SEL; + + reg [`WEWID-1:0] ram0_WENBA_SEL; + reg [`WEWID-1:0] ram0_WENBB_SEL; + reg [`WEWID-1:0] ram1_WENBA_SEL; + reg [`WEWID-1:0] ram1_WENBB_SEL; + + reg ram0_A_x9_SEL; + reg ram0_B_x9_SEL; + reg ram1_A_x9_SEL; + reg ram1_B_x9_SEL; + + reg [ADDRWID-3:0] ram0_AA_SEL; + reg [ADDRWID-3:0] ram0_AB_SEL; + reg [ADDRWID-3:0] ram1_AA_SEL; + reg [ADDRWID-3:0] ram1_AB_SEL; + + reg ram0_AA_byte_SEL; + reg ram0_AB_byte_SEL; + reg ram1_AA_byte_SEL; + reg ram1_AB_byte_SEL; + + reg ram0_AA_byte_SEL_Q; + reg ram0_AB_byte_SEL_Q; + reg ram1_AA_byte_SEL_Q; + reg ram1_AB_byte_SEL_Q; + reg ram0_A_mux_ctl_Q; + reg ram0_B_mux_ctl_Q; + reg ram1_A_mux_ctl_Q; + reg ram1_B_mux_ctl_Q; + + reg ram0_O_mux_ctrl_Q; + reg ram1_O_mux_ctrl_Q; + + reg ram_AA_ram_SEL_Q; + reg ram_AB_ram_SEL_Q; + + wire [`DATAWID-1:0] QA_1_SEL3; + wire [`DATAWID-1:0] QB_0_SEL2; + wire [`DATAWID-1:0] QB_1_SEL2; + + reg [`DATAWID-1:0] QA_0_Q; + reg [`DATAWID-1:0] QB_0_Q; + reg [`DATAWID-1:0] QA_1_Q; + reg [`DATAWID-1:0] QB_1_Q; + + wire [`DATAWID-1:0] QA_0; + wire [`DATAWID-1:0] QB_0; + wire [`DATAWID-1:0] QA_1; + wire [`DATAWID-1:0] QB_1; + + wire ram0_CSBA_SEL; + wire ram0_CSBB_SEL; + wire ram1_CSBA_SEL; + wire ram1_CSBB_SEL; + + wire [`DATAWID-1:0] ram0_I_SEL1; + wire [`DATAWID-1:0] ram1_I_SEL1; + + wire dual_port; + + wire ram0_WEBA_SEL; + wire ram0_WEBB_SEL; + wire ram1_WEBA_SEL; + wire ram1_WEBB_SEL; + + wire [`DATAWID-1:0] ram1_I_SEL2; + + wire [`DATAWID-1:0] QA_1_SEL2; + wire [`DATAWID-1:0] QA_0_SEL1; + wire [`DATAWID-1:0] QB_0_SEL1; + wire [`DATAWID-1:0] QA_1_SEL1; + wire [`DATAWID-1:0] QB_1_SEL1; + + wire [`DATAWID-1:0] QB_0_SEL3; + wire [`DATAWID-1:0] QA_0_SEL2; + + initial + begin + QA_0_Q <= 0; + QB_0_Q <= 0; + QA_1_Q <= 0; + QB_1_Q <= 0; + ram0_AA_byte_SEL_Q <= 0; + ram0_A_mux_ctl_Q <= 0; + ram0_AB_byte_SEL_Q <= 0; + ram0_B_mux_ctl_Q <= 0; + ram1_AA_byte_SEL_Q <= 0; + ram1_A_mux_ctl_Q <= 0; + ram1_AB_byte_SEL_Q <= 0; + ram1_B_mux_ctl_Q <= 0; + ram_AA_ram_SEL_Q <= 0; + ram1_O_mux_ctrl_Q <= 0; + ram_AB_ram_SEL_Q <= 0; + ram0_O_mux_ctrl_Q <= 0; + end + + assign dual_port = Concat_En & ~( ram0_WIDTH_SELA[1] | ram0_WIDTH_SELB[1] ); + + assign ram0_CSBA_SEL = ram0_CSBA; + assign ram0_CSBB_SEL = ram0_CSBB; + assign ram1_CSBA_SEL = Concat_En ? ram0_CSBA : ram1_CSBA; + assign ram1_CSBB_SEL = Concat_En ? ram0_CSBB : ram1_CSBB; + + assign ram0_O = QB_0_SEL3; + assign ram1_O = dual_port ? QA_1_SEL3 : QB_1_SEL2; + + assign ram0_I_SEL1[8:0] = ram0_I[8:0]; + assign ram1_I_SEL1[8:0] = ram1_I[8:0]; + assign ram0_I_SEL1[17:9] = ram0_AA_byte_SEL ? ram0_I[8:0] : ram0_I[17:9]; + assign ram1_I_SEL1[17:9] = ( ( ~Concat_En & ram1_AA_byte_SEL ) | ( dual_port & ram0_AB_byte_SEL ) ) ? ram1_I[8:0] : ram1_I[17:9]; + + assign ram1_I_SEL2 = ( Concat_En & ~ram0_WIDTH_SELA[1] ) ? ram0_I_SEL1 : ram1_I_SEL1; + + assign ram0_WEBA_SEL = &ram0_WENBA_SEL; + assign ram0_WEBB_SEL = &ram0_WENBB_SEL; + assign ram1_WEBA_SEL = &ram1_WENBA_SEL; + assign ram1_WEBB_SEL = &ram1_WENBB_SEL; + + assign QA_0_SEL1 = ( ram0_PLRDA_SEL ) ? QA_0_Q : QA_0 ; + assign QB_0_SEL1 = ( ram0_PLRDB_SEL ) ? QB_0_Q : QB_0 ; + assign QA_1_SEL1 = ( ram1_PLRDA_SEL ) ? QA_1_Q : QA_1 ; + assign QB_1_SEL1 = ( ram1_PLRDB_SEL ) ? QB_1_Q : QB_1 ; + + assign QA_1_SEL3 = ram1_O_mux_ctrl_Q ? QA_1_SEL2 : QA_0_SEL2; + + assign QA_0_SEL2[8:0] = ram0_A_mux_ctl_Q ? QA_0_SEL1[17:9] : QA_0_SEL1[8:0] ; + assign QB_0_SEL2[8:0] = ram0_B_mux_ctl_Q ? QB_0_SEL1[17:9] : QB_0_SEL1[8:0] ; + assign QA_1_SEL2[8:0] = ram1_A_mux_ctl_Q ? QA_1_SEL1[17:9] : QA_1_SEL1[8:0] ; + assign QB_1_SEL2[8:0] = ram1_B_mux_ctl_Q ? QB_1_SEL1[17:9] : QB_1_SEL1[8:0] ; + + assign QA_0_SEL2[17:9] = QA_0_SEL1[17:9]; + assign QB_0_SEL2[17:9] = QB_0_SEL1[17:9]; + assign QA_1_SEL2[17:9] = QA_1_SEL1[17:9]; + assign QB_1_SEL2[17:9] = QB_1_SEL1[17:9]; + + assign QB_0_SEL3 = ram0_O_mux_ctrl_Q ? QB_1_SEL2 : QB_0_SEL2; + + always@( posedge ram0_CEA ) + begin + QA_0_Q <= QA_0; + end + always@( posedge ram0_CEB ) + begin + QB_0_Q <= QB_0; + end + always@( posedge ram1_CEA ) + begin + QA_1_Q <= QA_1; + end + always@( posedge ram1_CEB ) + begin + QB_1_Q <= QB_1; + end + + always@( posedge ram0_CEA ) + begin + if( ram0_CSBA_SEL == 0 ) + ram0_AA_byte_SEL_Q <= ram0_AA_byte_SEL; + if( ram0_PLRDA_SEL || ( ram0_CSBA_SEL == 0 ) ) + ram0_A_mux_ctl_Q <= ram0_A_x9_SEL & ( ram0_PLRDA_SEL ? ram0_AA_byte_SEL_Q : ram0_AA_byte_SEL ); + end + + always@( posedge ram0_CEB) + begin + if( ram0_CSBB_SEL == 0 ) + ram0_AB_byte_SEL_Q <= ram0_AB_byte_SEL; + if( ram0_PLRDB_SEL || ( ram0_CSBB_SEL == 0 ) ) + ram0_B_mux_ctl_Q <= ram0_B_x9_SEL & ( ram0_PLRDB_SEL ? ram0_AB_byte_SEL_Q : ram0_AB_byte_SEL ); + end + + always@( posedge ram1_CEA ) + begin + if( ram1_CSBA_SEL == 0 ) + ram1_AA_byte_SEL_Q <= ram1_AA_byte_SEL; + if( ram1_PLRDA_SEL || (ram1_CSBA_SEL == 0 ) ) + ram1_A_mux_ctl_Q <= ram1_A_x9_SEL & ( ram1_PLRDA_SEL ? ram1_AA_byte_SEL_Q : ram1_AA_byte_SEL ); + end + + always@( posedge ram1_CEB ) + begin + if( ram1_CSBB_SEL == 0 ) + ram1_AB_byte_SEL_Q <= ram1_AB_byte_SEL; + if( ram1_PLRDB_SEL || (ram1_CSBB_SEL == 0 ) ) + ram1_B_mux_ctl_Q <= ram1_B_x9_SEL & ( ram1_PLRDB_SEL ? ram1_AB_byte_SEL_Q : ram1_AB_byte_SEL ); + end + + always@( posedge ram0_CEA ) + begin + ram_AA_ram_SEL_Q <= ram_AA_ram_SEL; + ram1_O_mux_ctrl_Q <= ( ram0_PLRDA_SEL ? ram_AA_ram_SEL_Q : ram_AA_ram_SEL ); + end + + always@( posedge ram0_CEB ) + begin + ram_AB_ram_SEL_Q <= ram_AB_ram_SEL; + ram0_O_mux_ctrl_Q <= ( ram0_PLRDB_SEL ? ram_AB_ram_SEL_Q : ram_AB_ram_SEL ); + end + + always@( Concat_En or ram0_WIDTH_SELA or ram0_WIDTH_SELB or ram0_AA or ram0_AB or ram0_WENBA or + ram1_AA or ram1_AB or ram1_WENBA or ram0_PLRD or ram1_PLRD or ram1_WIDTH_SELA or ram1_WIDTH_SELB ) + begin + ram0_A_x9_SEL <= ( ~|ram0_WIDTH_SELA ); + ram1_A_x9_SEL <= ( ~|ram0_WIDTH_SELA ); + ram0_B_x9_SEL <= ( ~|ram0_WIDTH_SELB ); + ram0_AA_byte_SEL <= ram0_AA[0] & ( ~|ram0_WIDTH_SELA ); + ram0_AB_byte_SEL <= ram0_AB[0] & ( ~|ram0_WIDTH_SELB ); + if( ~Concat_En ) + begin + ram_AA_ram_SEL <= 1'b0; + ram_AB_ram_SEL <= 1'b0; + ram1_B_x9_SEL <= ( ~|ram1_WIDTH_SELB ); + + ram0_PLRDA_SEL <= ram0_PLRD; + ram0_PLRDB_SEL <= ram0_PLRD; + ram1_PLRDA_SEL <= ram1_PLRD; + ram1_PLRDB_SEL <= ram1_PLRD; + ram0_WENBB_SEL <= {`WEWID{1'b1}}; + ram1_WENBB_SEL <= {`WEWID{1'b1}}; + + ram0_AA_SEL <= ram0_AA >> ( ~|ram0_WIDTH_SELA ); + ram0_WENBA_SEL[0] <= ( ram0_AA[0] & ( ~|ram0_WIDTH_SELA ) ) | ram0_WENBA[0]; + ram0_WENBA_SEL[1] <= ( ~ram0_AA[0] & ( ~|ram0_WIDTH_SELA ) ) | ram0_WENBA[( |ram0_WIDTH_SELA )]; + ram0_AB_SEL <= ram0_AB >> ( ~|ram0_WIDTH_SELB ); + + ram1_AA_SEL <= ram1_AA >> ( ~|ram1_WIDTH_SELA ); + ram1_AA_byte_SEL <= ram1_AA[0] & ( ~|ram1_WIDTH_SELA ); + ram1_WENBA_SEL[0] <= ( ram1_AA[0] & ( ~|ram1_WIDTH_SELA ) ) | ram1_WENBA[0]; + ram1_WENBA_SEL[1] <= ( ~ram1_AA[0] & ( ~|ram1_WIDTH_SELA ) ) | ram1_WENBA[( |ram1_WIDTH_SELA )]; + ram1_AB_SEL <= ram1_AB >> ( ~|ram1_WIDTH_SELB ); + ram1_AB_byte_SEL <= ram1_AB[0] & ( ~|ram1_WIDTH_SELB ); + end + else + begin + ram_AA_ram_SEL <= ~ram0_WIDTH_SELA[1] & ram0_AA[~ram0_WIDTH_SELA[0]]; + ram_AB_ram_SEL <= ~ram0_WIDTH_SELB[1] & ram0_AB[~ram0_WIDTH_SELB[0]]; + ram1_B_x9_SEL <= ( ~|ram0_WIDTH_SELB ); + + ram0_PLRDA_SEL <= ram1_PLRD; + ram1_PLRDA_SEL <= ram1_PLRD; + ram0_PLRDB_SEL <= ram0_PLRD; + ram1_PLRDB_SEL <= ram0_PLRD; + + ram0_AA_SEL <= ram0_AA >> { ~ram0_WIDTH_SELA[1] & ~( ram0_WIDTH_SELA[1] ^ ram0_WIDTH_SELA[0] ), ~ram0_WIDTH_SELA[1] & ram0_WIDTH_SELA[0] }; + ram1_AA_SEL <= ram0_AA >> { ~ram0_WIDTH_SELA[1] & ~( ram0_WIDTH_SELA[1] ^ ram0_WIDTH_SELA[0] ), ~ram0_WIDTH_SELA[1] & ram0_WIDTH_SELA[0] }; + ram1_AA_byte_SEL <= ram0_AA[0] & ( ~|ram0_WIDTH_SELA ); + ram0_WENBA_SEL[0] <= ram0_WENBA[0] | ( ~ram0_WIDTH_SELA[1] & ( ram0_AA[0] | ( ~ram0_WIDTH_SELA[0] & ram0_AA[1] ) ) ); + ram0_WENBA_SEL[1] <= ( ( ~|ram0_WIDTH_SELA & ram0_WENBA[0] ) | ( |ram0_WIDTH_SELA & ram0_WENBA[1] ) ) | ( ~ram0_WIDTH_SELA[1] & ( ( ram0_WIDTH_SELA[0] & ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ~ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ram0_AA[1] ) ) ); + + ram1_WENBA_SEL[0] <= ( ( ~ram0_WIDTH_SELA[1] & ram0_WENBA[0] ) | ( ram0_WIDTH_SELA[1] & ram1_WENBA[0] ) ) | ( ~ram0_WIDTH_SELA[1] & ( ( ram0_WIDTH_SELA[0] & ~ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ~ram0_AA[1] ) ) ); + ram1_WENBA_SEL[1] <= ( ( ( ram0_WIDTH_SELA == 2'b00 ) & ram0_WENBA[0] ) | ( ( ram0_WIDTH_SELA[1] == 1'b1 ) & ram1_WENBA[1] ) | ( ( ram0_WIDTH_SELA == 2'b01 ) & ram0_WENBA[1] ) ) | ( ~ram0_WIDTH_SELA[1] & ( ~ram0_AA[0] | ( ~ram0_WIDTH_SELA[0] & ~ram0_AA[1] ) ) ); + + ram0_AB_SEL <= ram0_AB >> { ~ram0_WIDTH_SELB[1] & ~( ram0_WIDTH_SELB[1] ^ ram0_WIDTH_SELB[0] ), ~ram0_WIDTH_SELB[1] & ram0_WIDTH_SELB[0] }; + ram1_AB_SEL <= ram0_AB >> { ~ram0_WIDTH_SELB[1] & ~( ram0_WIDTH_SELB[1] ^ ram0_WIDTH_SELB[0] ), ~ram0_WIDTH_SELB[1] & ram0_WIDTH_SELB[0] }; + ram1_AB_byte_SEL <= ram0_AB[0] & ( ~|ram0_WIDTH_SELB ); + ram0_WENBB_SEL[0] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ram1_WENBA[0] | ( ram0_AB[0] | ( ~ram0_WIDTH_SELB[0] & ram0_AB[1] ) ) ); + ram0_WENBB_SEL[1] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ( ( ~|ram0_WIDTH_SELB & ram1_WENBA[0] ) | ( |ram0_WIDTH_SELB & ram1_WENBA[1] ) ) | ( ( ram0_WIDTH_SELB[0] & ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ~ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ram0_AB[1] ) ) ); + ram1_WENBB_SEL[0] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ram1_WENBA[0] | ( ( ram0_WIDTH_SELB[0] & ~ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ~ram0_AB[1] ) ) ); + ram1_WENBB_SEL[1] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ( ( ~|ram0_WIDTH_SELB & ram1_WENBA[0] ) | ( |ram0_WIDTH_SELB & ram1_WENBA[1] ) ) | ( ~ram0_AB[0] | ( ~ram0_WIDTH_SELB[0] & ~ram0_AB[1] ) ) ); + end + end + + ram #(.ADDRWID(ADDRWID-2), + .INIT(INIT[ 0*9216 +: 9216]), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int), + .init_ad(init_ad1) + ) + ram0_inst( + .AA( ram0_AA_SEL ), + .AB( ram0_AB_SEL ), + .CLKA( ram0_CEA ), + .CLKB( ram0_CEB ), + .WENA( ram0_WEBA_SEL ), + .WENB( ram0_WEBB_SEL ), + .CENA( ram0_CSBA_SEL ), + .CENB( ram0_CSBB_SEL ), + .WENBA( ram0_WENBA_SEL ), + .WENBB( ram0_WENBB_SEL ), + .DA( ram0_I_SEL1 ), + .QA( QA_0 ), + .DB( ram1_I_SEL1 ), + .QB( QB_0 ) + ); + + ram #(.ADDRWID(ADDRWID-2), + .INIT(INIT[ 1*9216 +: 9216]), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int), + .init_ad(init_ad2) + ) + ram1_inst( + .AA( ram1_AA_SEL ), + .AB( ram1_AB_SEL ), + .CLKA( ram1_CEA ), + .CLKB( ram1_CEB ), + .WENA( ram1_WEBA_SEL ), + .WENB( ram1_WEBB_SEL ), + .CENA( ram1_CSBA_SEL ), + .CENB( ram1_CSBB_SEL ), + .WENBA( ram1_WENBA_SEL ), + .WENBB( ram1_WENBB_SEL ), + .DA( ram1_I_SEL2 ), + .QA( QA_1 ), + .DB( ram1_I_SEL1 ), + .QB( QB_1 ) + ); + +endmodule + +`timescale 1 ns /10 ps +`define ADDRWID 11 +`define DATAWID 18 +`define WEWID 2 + +module ram_block_8K ( + CLK1_0, + CLK2_0, + WD_0, + RD_0, + A1_0, + A2_0, + CS1_0, + CS2_0, + WEN1_0, + POP_0, + Almost_Full_0, + Almost_Empty_0, + PUSH_FLAG_0, + POP_FLAG_0, + + FIFO_EN_0, + SYNC_FIFO_0, + PIPELINE_RD_0, + WIDTH_SELECT1_0, + WIDTH_SELECT2_0, + + CLK1_1, + CLK2_1, + WD_1, + RD_1, + A1_1, + A2_1, + CS1_1, + CS2_1, + WEN1_1, + POP_1, + Almost_Empty_1, + Almost_Full_1, + PUSH_FLAG_1, + POP_FLAG_1, + + FIFO_EN_1, + SYNC_FIFO_1, + PIPELINE_RD_1, + WIDTH_SELECT1_1, + WIDTH_SELECT2_1, + + CONCAT_EN_0, + CONCAT_EN_1, + + PUSH_0, + PUSH_1, + aFlushN_0, + aFlushN_1 + ); + +parameter [18431:0] INIT = 18432'bx; +parameter INIT_FILE="init.mem"; +parameter data_width_int = 16; +parameter data_depth_int = 1024; + + input CLK1_0; + input CLK2_0; + input [`DATAWID-1:0] WD_0; + output [`DATAWID-1:0] RD_0; + input [`ADDRWID-1:0] A1_0; //chnge + input [`ADDRWID-1:0] A2_0; //chnge + input CS1_0; + input CS2_0; + input [`WEWID-1:0] WEN1_0; + input POP_0; + output Almost_Full_0; + output Almost_Empty_0; + output [3:0] PUSH_FLAG_0; + output [3:0] POP_FLAG_0; + input FIFO_EN_0; + input SYNC_FIFO_0; + input PIPELINE_RD_0; + input [1:0] WIDTH_SELECT1_0; + input [1:0] WIDTH_SELECT2_0; + + input CLK1_1; + input CLK2_1; + input [`DATAWID-1:0] WD_1; + output [`DATAWID-1:0] RD_1; + input [`ADDRWID-1:0] A1_1; //chnge + input [`ADDRWID-1:0] A2_1; //chnge + input CS1_1; + input CS2_1; + input [`WEWID-1:0] WEN1_1; + input POP_1; + output Almost_Full_1; + output Almost_Empty_1; + output [3:0] PUSH_FLAG_1; + output [3:0] POP_FLAG_1; + input FIFO_EN_1; + input SYNC_FIFO_1; + input PIPELINE_RD_1; + input [1:0] WIDTH_SELECT1_1; + input [1:0] WIDTH_SELECT2_1; + + input CONCAT_EN_0; + input CONCAT_EN_1; + + + input PUSH_0; + input PUSH_1; + input aFlushN_0; + input aFlushN_1; + + reg rstn; + + wire [`WEWID-1:0] RAM0_WENb1_SEL; + wire [`WEWID-1:0] RAM1_WENb1_SEL; + + wire RAM0_CS1_SEL; + wire RAM0_CS2_SEL; + wire RAM1_CS1_SEL; + wire RAM1_CS2_SEL; + + wire [`ADDRWID-1:0] Fifo0_Write_Addr; + wire [`ADDRWID-1:0] Fifo0_Read_Addr; + + wire [`ADDRWID-1:0] Fifo1_Write_Addr; + wire [`ADDRWID-1:0] Fifo1_Read_Addr; + + wire [`ADDRWID-1:0] RAM0_AA_SEL; + wire [`ADDRWID-1:0] RAM0_AB_SEL; + wire [`ADDRWID-1:0] RAM1_AA_SEL; + wire [`ADDRWID-1:0] RAM1_AB_SEL; + + wire Concat_En_SEL; + + // To simulate POR + initial + begin + rstn = 1'b0; + #30 rstn = 1'b1; + end + + assign fifo0_rstn = rstn & aFlushN_0; + assign fifo1_rstn = rstn & aFlushN_1; + + assign Concat_En_SEL = ( CONCAT_EN_0 | WIDTH_SELECT1_0[1] | WIDTH_SELECT2_0[1] )? 1'b1 : 1'b0; + + assign RAM0_AA_SEL = FIFO_EN_0 ? Fifo0_Write_Addr : A1_0[`ADDRWID-1:0]; + assign RAM0_AB_SEL = FIFO_EN_0 ? Fifo0_Read_Addr : A2_0[`ADDRWID-1:0]; + assign RAM1_AA_SEL = FIFO_EN_1 ? Fifo1_Write_Addr : A1_1[`ADDRWID-1:0]; + assign RAM1_AB_SEL = FIFO_EN_1 ? Fifo1_Read_Addr : A2_1[`ADDRWID-1:0]; + + assign RAM0_WENb1_SEL = FIFO_EN_0 ? { `WEWID{ ~PUSH_0 } } : ~WEN1_0; + assign RAM1_WENb1_SEL = ( FIFO_EN_1 & ~Concat_En_SEL ) ? { `WEWID{ ~PUSH_1 } } : + ( ( FIFO_EN_0 & Concat_En_SEL ) ? ( WIDTH_SELECT1_0[1] ? { `WEWID{ ~PUSH_0 } } : { `WEWID{ 1'b1 } } ) : ~WEN1_1 ); + + assign RAM0_CS1_SEL = ( FIFO_EN_0 ? CS1_0 : ~CS1_0 ); + assign RAM0_CS2_SEL = ( FIFO_EN_0 ? CS2_0 : ~CS2_0 ); + assign RAM1_CS1_SEL = ( FIFO_EN_1 ? CS1_1 : ~CS1_1 ); + assign RAM1_CS2_SEL = ( FIFO_EN_1 ? CS2_1 : ~CS2_1 ); + + x2_model #(.ADDRWID(`ADDRWID), + .INIT(INIT), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) + x2_8K_model_inst( + .Concat_En( Concat_En_SEL ), + + .ram0_WIDTH_SELA( WIDTH_SELECT1_0 ), + .ram0_WIDTH_SELB( WIDTH_SELECT2_0 ), + .ram0_PLRD( PIPELINE_RD_0 ), + + .ram0_CEA( CLK1_0 ), + .ram0_CEB( CLK2_0 ), + .ram0_I( WD_0 ), + .ram0_O( RD_0 ), + .ram0_AA( RAM0_AA_SEL ), + .ram0_AB( RAM0_AB_SEL ), + .ram0_CSBA( RAM0_CS1_SEL ), + .ram0_CSBB( RAM0_CS2_SEL ), + .ram0_WENBA( RAM0_WENb1_SEL ), + + .ram1_WIDTH_SELA( WIDTH_SELECT1_1 ), + .ram1_WIDTH_SELB( WIDTH_SELECT2_1 ), + .ram1_PLRD( PIPELINE_RD_1 ), + + .ram1_CEA( CLK1_1 ), + .ram1_CEB( CLK2_1 ), + .ram1_I( WD_1 ), + .ram1_O( RD_1 ), + .ram1_AA( RAM1_AA_SEL ), + .ram1_AB( RAM1_AB_SEL ), + .ram1_CSBA( RAM1_CS1_SEL ), + .ram1_CSBB( RAM1_CS2_SEL ), + .ram1_WENBA( RAM1_WENb1_SEL ) + ); + + fifo_controller_model #(.MAX_PTR_WIDTH(`ADDRWID+1)) fifo_controller0_inst( + .Push_Clk( CLK1_0 ), + .Pop_Clk( CLK2_0 ), + + .Fifo_Push( PUSH_0 ), + .Fifo_Push_Flush( CS1_0 ), + .Fifo_Full( Almost_Full_0 ), + .Fifo_Full_Usr( PUSH_FLAG_0 ), + + .Fifo_Pop( POP_0 ), + .Fifo_Pop_Flush( CS2_0 ), + .Fifo_Empty( Almost_Empty_0 ), + .Fifo_Empty_Usr( POP_FLAG_0 ), + + .Write_Addr( Fifo0_Write_Addr ), + + .Read_Addr( Fifo0_Read_Addr ), + + .Fifo_Ram_Mode( Concat_En_SEL ), + .Fifo_Sync_Mode( SYNC_FIFO_0 ), + .Fifo_Push_Width( WIDTH_SELECT1_0 ), + .Fifo_Pop_Width( WIDTH_SELECT2_0 ), + .Rst_n( fifo0_rstn ) + ); + + fifo_controller_model #(.MAX_PTR_WIDTH(`ADDRWID+1)) fifo_controller1_inst( + .Push_Clk( CLK1_1 ), + .Pop_Clk( CLK2_1 ), + + .Fifo_Push( PUSH_1 ), + .Fifo_Push_Flush( CS1_1 ), + .Fifo_Full( Almost_Full_1 ), + .Fifo_Full_Usr( PUSH_FLAG_1 ), + + .Fifo_Pop( POP_1 ), + .Fifo_Pop_Flush( CS2_1 ), + .Fifo_Empty( Almost_Empty_1 ), + .Fifo_Empty_Usr( POP_FLAG_1 ), + + .Write_Addr( Fifo1_Write_Addr ), + + .Read_Addr( Fifo1_Read_Addr ), + + .Fifo_Ram_Mode( 1'b0 ), + .Fifo_Sync_Mode( SYNC_FIFO_1 ), + .Fifo_Push_Width( { 1'b0, WIDTH_SELECT1_1[0] } ), + .Fifo_Pop_Width( { 1'b0, WIDTH_SELECT2_1[0] } ), + .Rst_n( fifo1_rstn ) + ); + +endmodule + +module sw_mux ( + port_out, + default_port, + alt_port, + switch + ); + + output port_out; + input default_port; + input alt_port; + input switch; + + assign port_out = switch ? alt_port : default_port; + +endmodule + + +`define ADDRWID_8k2 11 +`define DATAWID 18 +`define WEWID 2 + +module ram8k_2x1_cell ( + CLK1_0, + CLK2_0, + CLK1S_0, + CLK2S_0, + WD_0, + RD_0, + A1_0, + A2_0, + CS1_0, + CS2_0, + WEN1_0, + CLK1EN_0, + CLK2EN_0, + P1_0, + P2_0, + Almost_Full_0, + Almost_Empty_0, + PUSH_FLAG_0, + POP_FLAG_0, + + FIFO_EN_0, + SYNC_FIFO_0, + PIPELINE_RD_0, + WIDTH_SELECT1_0, + WIDTH_SELECT2_0, + DIR_0, + ASYNC_FLUSH_0, + ASYNC_FLUSH_S0, + + CLK1_1, + CLK2_1, + CLK1S_1, + CLK2S_1, + WD_1, + RD_1, + A1_1, + A2_1, + CS1_1, + CS2_1, + WEN1_1, + CLK1EN_1, + CLK2EN_1, + P1_1, + P2_1, + Almost_Empty_1, + Almost_Full_1, + PUSH_FLAG_1, + POP_FLAG_1, + + FIFO_EN_1, + SYNC_FIFO_1, + PIPELINE_RD_1, + WIDTH_SELECT1_1, + WIDTH_SELECT2_1, + DIR_1, + ASYNC_FLUSH_1, + ASYNC_FLUSH_S1, + + CONCAT_EN_0, + CONCAT_EN_1 + ); + +parameter [18431:0] INIT = 18432'bx; +parameter INIT_FILE="init.mem"; +parameter data_width_int = 16; +parameter data_depth_int = 1024; + + input CLK1_0; + input CLK2_0; + input CLK1S_0; + input CLK2S_0; + input [`DATAWID-1:0] WD_0; + output [`DATAWID-1:0] RD_0; + input [`ADDRWID_8k2-1:0] A1_0; + input [`ADDRWID_8k2-1:0] A2_0; + input CS1_0; + input CS2_0; + input [`WEWID-1:0] WEN1_0; + input CLK1EN_0; + input CLK2EN_0; + input P1_0; + input P2_0; + output Almost_Full_0; + output Almost_Empty_0; + output [3:0] PUSH_FLAG_0; + output [3:0] POP_FLAG_0; + input FIFO_EN_0; + input SYNC_FIFO_0; + input DIR_0; + input ASYNC_FLUSH_0; + input ASYNC_FLUSH_S0; + input PIPELINE_RD_0; + input [1:0] WIDTH_SELECT1_0; + input [1:0] WIDTH_SELECT2_0; + + input CLK1_1; + input CLK2_1; + input CLK1S_1; + input CLK2S_1; + input [`DATAWID-1:0] WD_1; + output [`DATAWID-1:0] RD_1; + input [`ADDRWID_8k2-1:0] A1_1; + input [`ADDRWID_8k2-1:0] A2_1; + input CS1_1; + input CS2_1; + input [`WEWID-1:0] WEN1_1; + input CLK1EN_1; + input CLK2EN_1; + input P1_1; + input P2_1; + output Almost_Full_1; + output Almost_Empty_1; + output [3:0] PUSH_FLAG_1; + output [3:0] POP_FLAG_1; + input FIFO_EN_1; + input SYNC_FIFO_1; + input DIR_1; + input ASYNC_FLUSH_1; + input ASYNC_FLUSH_S1; + input PIPELINE_RD_1; + input [1:0] WIDTH_SELECT1_1; + input [1:0] WIDTH_SELECT2_1; + + input CONCAT_EN_0; + input CONCAT_EN_1; + +//CODE here +reg RAM0_domain_sw; +reg RAM1_domain_sw; + +wire CLK1P_0, CLK1P_1, CLK2P_0, CLK2P_1, ASYNC_FLUSHP_1, ASYNC_FLUSHP_0; + +assign WidSel1_1 = WIDTH_SELECT1_0[1]; +assign WidSel2_1 = WIDTH_SELECT2_0[1]; + +assign CLK1P_0 = CLK1S_0 ? ~CLK1_0 : CLK1_0; +assign CLK1P_1 = CLK1S_1 ? ~CLK1_1 : CLK1_1; +assign CLK2P_0 = CLK2S_0 ? ~CLK2_0 : CLK2_0; +assign CLK2P_1 = CLK2S_1 ? ~CLK2_1 : CLK2_1; +assign ASYNC_FLUSHP_0 = ASYNC_FLUSH_S0? ~ASYNC_FLUSH_0 : ASYNC_FLUSH_0; +assign ASYNC_FLUSHP_1 = ASYNC_FLUSH_S1? ~ASYNC_FLUSH_1 : ASYNC_FLUSH_1; + + +/* FIFO mode-only switching */ +always @( CONCAT_EN_0 or FIFO_EN_0 or FIFO_EN_1 or WidSel1_1 or WidSel2_1 or DIR_0 or DIR_1) + +begin + if (CONCAT_EN_0) //CONCAT enabled, only RAM0 ports are checked + begin + if (~FIFO_EN_0) //RAM MODE (no switching) + begin + RAM0_domain_sw = 1'b0; //Both Switches are on default during RAM mode + RAM1_domain_sw = 1'b0; + end + else //FIFO Mode + begin + RAM0_domain_sw = DIR_0; //Both Switches will get DIR_0 (primary port) during concat + RAM1_domain_sw = DIR_0; + end + end + else //CONCAT disabled, RAM0 and RAM1 ports are be checked + begin + if (WidSel1_1 || WidSel2_1) //AUTO-CONCAT FIFO/RAM Mode Horizontal Concatenation + begin + if (~FIFO_EN_0) //RAM MODE (no switching) + begin + RAM0_domain_sw = 1'b0; //Both Switches are on default during RAM mode + RAM1_domain_sw = 1'b0; + end + else //FIFO Mode + begin + RAM0_domain_sw = DIR_0; //Both Switches will get DIR_0 (primary port) during concat + RAM1_domain_sw = DIR_0; + end + end + else //FIFO/RAM Individual Mode + begin + if (~FIFO_EN_0) //RAM0 Mode + RAM0_domain_sw = 1'b0; + else //FIFO0 Mode + RAM0_domain_sw = DIR_0; + if (~FIFO_EN_1) //RAM1 Mode + RAM1_domain_sw = 1'b0; + else //FIFO1 Mode + RAM1_domain_sw = DIR_1; + end + end +end + +assign RAM0_Clk1_gated = CLK1EN_0 & CLK1P_0; +assign RAM0_Clk2_gated = CLK2EN_0 & CLK2P_0; +assign RAM1_Clk1_gated = CLK1EN_1 & CLK1P_1; +assign RAM1_Clk2_gated = CLK2EN_1 & CLK2P_1; + +//PORT1 of RAMs is designated to PUSH circuitry, while PORT2 gets POP circuitry +sw_mux RAM0_clk_sw_port1 (.port_out(RAM0_clk_port1), .default_port(RAM0_Clk1_gated), .alt_port(RAM0_Clk2_gated), .switch(RAM0_domain_sw)); +sw_mux RAM0_P_sw_port1 (.port_out(RAM0_push_port1), .default_port(P1_0), .alt_port(P2_0), .switch(RAM0_domain_sw)); +sw_mux RAM0_Flush_sw_port1 (.port_out(RAM0CS_Sync_Flush_port1), .default_port(CS1_0), .alt_port(CS2_0), .switch(RAM0_domain_sw)); +sw_mux RAM0_WidSel0_port1 (.port_out(RAM0_Wid_Sel0_port1), .default_port(WIDTH_SELECT1_0[0]), .alt_port(WIDTH_SELECT2_0[0]), .switch(RAM0_domain_sw)); +sw_mux RAM0_WidSel1_port1 (.port_out(RAM0_Wid_Sel1_port1), .default_port(WIDTH_SELECT1_0[1]), .alt_port(WIDTH_SELECT2_0[1]), .switch(RAM0_domain_sw)); + +sw_mux RAM0_clk_sw_port2 (.port_out(RAM0_clk_port2), .default_port(RAM0_Clk2_gated), .alt_port(RAM0_Clk1_gated), .switch(RAM0_domain_sw)); +sw_mux RAM0_P_sw_port2 (.port_out(RAM0_pop_port2), .default_port(P2_0), .alt_port(P1_0), .switch(RAM0_domain_sw)); +sw_mux RAM0_Flush_sw_port2 (.port_out(RAM0CS_Sync_Flush_port2), .default_port(CS2_0), .alt_port(CS1_0), .switch(RAM0_domain_sw)); +sw_mux RAM0_WidSel0_port2 (.port_out(RAM0_Wid_Sel0_port2), .default_port(WIDTH_SELECT2_0[0]), .alt_port(WIDTH_SELECT1_0[0]), .switch(RAM0_domain_sw)); +sw_mux RAM0_WidSel1_port2 (.port_out(RAM0_Wid_Sel1_port2), .default_port(WIDTH_SELECT2_0[1]), .alt_port(WIDTH_SELECT1_0[1]), .switch(RAM0_domain_sw)); + +sw_mux RAM1_clk_sw_port1 (.port_out(RAM1_clk_port1), .default_port(RAM1_Clk1_gated), .alt_port(RAM1_Clk2_gated), .switch(RAM1_domain_sw)); +sw_mux RAM1_P_sw_port1 (.port_out(RAM1_push_port1), .default_port(P1_1), .alt_port(P2_1), .switch(RAM1_domain_sw)); +sw_mux RAM1_Flush_sw_port1 (.port_out(RAM1CS_Sync_Flush_port1), .default_port(CS1_1), .alt_port(CS2_1), .switch(RAM1_domain_sw)); +sw_mux RAM1_WidSel0_port1 (.port_out(RAM1_Wid_Sel0_port1), .default_port(WIDTH_SELECT1_1[0]), .alt_port(WIDTH_SELECT2_1[0]), .switch(RAM1_domain_sw)); +sw_mux RAM1_WidSel1_port1 (.port_out(RAM1_Wid_Sel1_port1), .default_port(WIDTH_SELECT1_1[1]), .alt_port(WIDTH_SELECT2_1[1]), .switch(RAM1_domain_sw)); + + +sw_mux RAM1_clk_sw_port2 (.port_out(RAM1_clk_port2), .default_port(RAM1_Clk2_gated), .alt_port(RAM1_Clk1_gated), .switch(RAM1_domain_sw)); +sw_mux RAM1_P_sw_port2 (.port_out(RAM1_pop_port2), .default_port(P2_1), .alt_port(P1_1), .switch(RAM1_domain_sw)); +sw_mux RAM1_Flush_sw_port2 (.port_out(RAM1CS_Sync_Flush_port2), .default_port(CS2_1), .alt_port(CS1_1), .switch(RAM1_domain_sw)); +sw_mux RAM1_WidSel0_port2 (.port_out(RAM1_Wid_Sel0_port2), .default_port(WIDTH_SELECT2_1[0]), .alt_port(WIDTH_SELECT1_1[0]), .switch(RAM1_domain_sw)); +sw_mux RAM1_WidSel1_port2 (.port_out(RAM1_Wid_Sel1_port2), .default_port(WIDTH_SELECT2_1[1]), .alt_port(WIDTH_SELECT1_1[1]), .switch(RAM1_domain_sw)); + +ram_block_8K # ( .INIT(INIT), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) +ram_block_8K_inst ( + .CLK1_0(RAM0_clk_port1), + .CLK2_0(RAM0_clk_port2), + .WD_0(WD_0), + .RD_0(RD_0), + .A1_0(A1_0), + .A2_0(A2_0), + .CS1_0(RAM0CS_Sync_Flush_port1), + .CS2_0(RAM0CS_Sync_Flush_port2), + .WEN1_0(WEN1_0), + .POP_0(RAM0_pop_port2), + .Almost_Full_0(Almost_Full_0), + .Almost_Empty_0(Almost_Empty_0), + .PUSH_FLAG_0(PUSH_FLAG_0), + .POP_FLAG_0(POP_FLAG_0), + + .FIFO_EN_0(FIFO_EN_0), + .SYNC_FIFO_0(SYNC_FIFO_0), + .PIPELINE_RD_0(PIPELINE_RD_0), + .WIDTH_SELECT1_0({RAM0_Wid_Sel1_port1,RAM0_Wid_Sel0_port1}), + .WIDTH_SELECT2_0({RAM0_Wid_Sel1_port2,RAM0_Wid_Sel0_port2}), + + .CLK1_1(RAM1_clk_port1), + .CLK2_1(RAM1_clk_port2), + .WD_1(WD_1), + .RD_1(RD_1), + .A1_1(A1_1), + .A2_1(A2_1), + .CS1_1(RAM1CS_Sync_Flush_port1), + .CS2_1(RAM1CS_Sync_Flush_port2), + .WEN1_1(WEN1_1), + .POP_1(RAM1_pop_port2), + .Almost_Empty_1(Almost_Empty_1), + .Almost_Full_1(Almost_Full_1), + .PUSH_FLAG_1(PUSH_FLAG_1), + .POP_FLAG_1(POP_FLAG_1), + + .FIFO_EN_1(FIFO_EN_1), + .SYNC_FIFO_1(SYNC_FIFO_1), + .PIPELINE_RD_1(PIPELINE_RD_1), + .WIDTH_SELECT1_1({RAM1_Wid_Sel1_port1,RAM1_Wid_Sel0_port1}), + .WIDTH_SELECT2_1({RAM1_Wid_Sel1_port2,RAM1_Wid_Sel0_port2}), + + .CONCAT_EN_0(CONCAT_EN_0), + .CONCAT_EN_1(CONCAT_EN_1), + + .PUSH_0(RAM0_push_port1), + .PUSH_1(RAM1_push_port1), + .aFlushN_0(~ASYNC_FLUSHP_0), + .aFlushN_1(~ASYNC_FLUSHP_1) + ); + +endmodule + +module ram8k_2x1_cell_macro # ( + parameter [18431:0] INIT = 18432'bx, + parameter INIT_FILE="init.mem", + parameter data_width_int = 16, + parameter data_depth_int = 1024 + ) + ( + input [10:0] A1_0, + input [10:0] A1_1, + input [10:0] A2_0, + input [10:0] A2_1, + (* clkbuf_sink *) + input CLK1_0, + (* clkbuf_sink *) + input CLK1_1, + (* clkbuf_sink *) + input CLK2_0, + (* clkbuf_sink *) + input CLK2_1, + output Almost_Empty_0, Almost_Empty_1, Almost_Full_0, Almost_Full_1, + input ASYNC_FLUSH_0, ASYNC_FLUSH_1, ASYNC_FLUSH_S0, ASYNC_FLUSH_S1, CLK1EN_0, CLK1EN_1, CLK1S_0, CLK1S_1, CLK2EN_0, CLK2EN_1, CLK2S_0, CLK2S_1, CONCAT_EN_0, CONCAT_EN_1, CS1_0, CS1_1,CS2_0, CS2_1, DIR_0, DIR_1, FIFO_EN_0, FIFO_EN_1, P1_0, P1_1, P2_0,P2_1, PIPELINE_RD_0, PIPELINE_RD_1, + output [3:0] POP_FLAG_0, + output [3:0] POP_FLAG_1, + output [3:0] PUSH_FLAG_0, + output [3:0] PUSH_FLAG_1, + output [17:0] RD_0, + output [17:0] RD_1, + input SYNC_FIFO_0, SYNC_FIFO_1, + input [17:0] WD_0, + input [17:0] WD_1, + input [1:0] WEN1_0, + input [1:0] WEN1_1, + input [1:0] WIDTH_SELECT1_0, + input [1:0] WIDTH_SELECT1_1, + input [1:0] WIDTH_SELECT2_0, + input [1:0] WIDTH_SELECT2_1, + input SD,DS,LS,SD_RB1,LS_RB1,DS_RB1,RMEA,RMEB,TEST1A,TEST1B, + input [3:0] RMA, + input [3:0] RMB); + + + ram8k_2x1_cell # (.INIT(INIT), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) + I1 ( + .A1_0({ A1_0[10:0] }) , .A1_1({ A1_1[10:0] }), + .A2_0({ A2_0[10:0] }) , .A2_1({ A2_1[10:0] }), + .Almost_Empty_0(Almost_Empty_0), + .Almost_Empty_1(Almost_Empty_1), + .Almost_Full_0(Almost_Full_0), + .Almost_Full_1(Almost_Full_1), + .ASYNC_FLUSH_0(ASYNC_FLUSH_0), + .ASYNC_FLUSH_1(ASYNC_FLUSH_1), + .ASYNC_FLUSH_S0(ASYNC_FLUSH_S0), + .ASYNC_FLUSH_S1(ASYNC_FLUSH_S1) , .CLK1_0(CLK1_0), + .CLK1_1(CLK1_1) , .CLK1EN_0(CLK1EN_0) , .CLK1EN_1(CLK1EN_1), + .CLK1S_0(CLK1S_0) , .CLK1S_1(CLK1S_1) , .CLK2_0(CLK2_0), + .CLK2_1(CLK2_1) , .CLK2EN_0(CLK2EN_0) , .CLK2EN_1(CLK2EN_1), + .CLK2S_0(CLK2S_0) , .CLK2S_1(CLK2S_1), + .CONCAT_EN_0(CONCAT_EN_0) , .CONCAT_EN_1(CONCAT_EN_1), + .CS1_0(CS1_0) , .CS1_1(CS1_1) , .CS2_0(CS2_0) , .CS2_1(CS2_1), + .DIR_0(DIR_0) , .DIR_1(DIR_1) , .FIFO_EN_0(FIFO_EN_0), + .FIFO_EN_1(FIFO_EN_1) , .P1_0(P1_0) , .P1_1(P1_1) , .P2_0(P2_0), + .P2_1(P2_1) , .PIPELINE_RD_0(PIPELINE_RD_0), + .PIPELINE_RD_1(PIPELINE_RD_1), + .POP_FLAG_0({ POP_FLAG_0[3:0] }), + .POP_FLAG_1({ POP_FLAG_1[3:0] }), + .PUSH_FLAG_0({ PUSH_FLAG_0[3:0] }), + .PUSH_FLAG_1({ PUSH_FLAG_1[3:0] }) , .RD_0({ RD_0[17:0] }), + .RD_1({ RD_1[17:0] }) , .SYNC_FIFO_0(SYNC_FIFO_0), + .SYNC_FIFO_1(SYNC_FIFO_1) , .WD_0({ WD_0[17:0] }), + .WD_1({ WD_1[17:0] }) , .WEN1_0({ WEN1_0[1:0] }), + .WEN1_1({ WEN1_1[1:0] }), + .WIDTH_SELECT1_0({ WIDTH_SELECT1_0[1:0] }), + .WIDTH_SELECT1_1({ WIDTH_SELECT1_1[1:0] }), + .WIDTH_SELECT2_0({ WIDTH_SELECT2_0[1:0] }), + .WIDTH_SELECT2_1({ WIDTH_SELECT2_1[1:0] }) ); + +endmodule /* ram8k_2x1_cell_macro */ + +module RAM_8K_BLK ( WA,RA,WD,WClk,RClk,WClk_En,RClk_En,WEN,RD); + +parameter addr_int = 9, + data_depth_int = 512, + data_width_int = 18, + wr_enable_int = 2, + reg_rd_int = 0; + +parameter [8191:0] INIT = 8192'bx; +parameter INIT_FILE="init.mem"; + +input [addr_int-1:0] WA; +input [addr_int-1:0] RA; +input WClk,RClk; +input WClk_En,RClk_En; +input [wr_enable_int-1:0] WEN; +input [data_width_int-1:0] WD; +output [data_width_int-1:0] RD; + +wire VCC,GND; +wire WClk0_Sel,RClk0_Sel; +wire WClk1_Sel,RClk1_Sel; + +wire reg_rd0; +wire reg_rd1; +wire [10:0] addr_wr0,addr_rd0,addr_wr1,addr_rd1; + +wire [17:0] in_reg0; + +wire [2:0] wen_reg0; + +wire [15:0] out_reg0; + +wire [1:0] out_par0; + +wire [1:0] WS1_0,WS2_0; +wire [1:0] WS_GND; + +wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; + +wire WD0_SEL,RD0_SEL; +wire WD1_SEL,RD1_SEL; + +assign VCC = 1'b1; +assign GND = 1'b0; + +assign WD0_SEL = 1'b1; +assign RD0_SEL = 1'b1; +assign WD1_SEL = 1'b0; +assign RD1_SEL = 1'b0; + +assign WClk0_Sel = 1'b0; +assign RClk0_Sel = 1'b0; + +assign WClk1_Sel = 1'b0; +assign RClk1_Sel = 1'b0; + +assign LS = 1'b0; +assign DS = 1'b0; +assign SD = 1'b0; +assign LS_RB1 = 1'b0; +assign DS_RB1 = 1'b0; +assign SD_RB1 = 1'b0; + +assign reg_rd0 =reg_rd_int; +assign WS_GND = 2'b00; + +assign reg_rd1 =1'b0; + +assign wen_reg0[2:wr_enable_int]=0; +assign wen_reg0[wr_enable_int-1:0]=WEN; + +assign addr_wr1=11'b0000000000; +assign addr_rd1=11'b0000000000; + +generate + + if(addr_int == 11) + begin + assign addr_wr0[10:0]=WA; + assign addr_rd0[10:0]=RA; + end + else + begin + assign addr_wr0[10:addr_int]=0; + assign addr_wr0[addr_int-1:0]=WA; + assign addr_rd0[10:addr_int]=0; + assign addr_rd0[addr_int-1:0]=RA; + end + + if (data_width_int == 16) + begin + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + else if (data_width_int > 8 && data_width_int < 16) + begin + assign in_reg0[15:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + else if (data_width_int <= 8) + begin + assign in_reg0[15:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + + if(data_width_int <=8) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(data_width_int >8 && data_width_int <=16) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(data_width_int > 16) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + +endgenerate + + ram8k_2x1_cell_macro # ( + `include "pp3_bram_init_8_16.vh" + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) + U1 ( + .A1_0(addr_wr0) , + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), //chk + .ASYNC_FLUSH_1(GND), //chk + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(GND), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk1_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(GND), + .CLK2_0(RClk), + .CLK2_1(GND), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk1_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(WD1_SEL), + .CS2_0(RD0_SEL), + .CS2_1(RD1_SEL), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), //P1_0 + .P1_1(GND), //P1_1 + .P2_0(GND), // + .P2_1(GND), // + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(reg_rd1), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1({2{GND}}), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + assign RD[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + + +endmodule + + +module RAM_16K_BLK ( WA,RA,WD,WClk,RClk,WClk_En,RClk_En,WEN,RD); + +parameter addr_int = 9, + data_depth_int = 512, + data_width_int = 36, + wr_enable_int = 4, + reg_rd_int = 0; + +parameter [16383:0] INIT = 16384'bx; +parameter INIT_FILE="init.mem"; + +input [addr_int-1:0] WA; +input [addr_int-1:0] RA; +input WClk,RClk; +input WClk_En,RClk_En; +input [wr_enable_int-1:0] WEN; +input [data_width_int-1:0] WD; +output [data_width_int-1:0] RD; + +wire VCC,GND; + +wire WClk0_Sel,RClk0_Sel; +wire WClk1_Sel,RClk1_Sel; + +wire reg_rd0; +wire reg_rd1; +wire [10:0] addr_wr0,addr_rd0,addr_wr1,addr_rd1; + +wire [31:0] in_reg0; + +wire [4:0] wen_reg0; + +wire [31:0] out_reg0; + +wire [3:0] out_par0; + +wire [1:0] WS1_0,WS2_0; +wire [1:0] WS_GND; + +wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; + +wire WD0_SEL,RD0_SEL; +wire WD1_SEL,RD1_SEL; + +assign VCC = 1'b1; +assign GND = 1'b0; + +assign WD0_SEL = 1'b1; +assign RD0_SEL = 1'b1; +assign WD1_SEL = 1'b1; +assign RD1_SEL = 1'b1; + +assign WClk0_Sel = 1'b0; +assign RClk0_Sel = 1'b0; + +assign WClk1_Sel = 1'b0; +assign RClk1_Sel = 1'b0; + +assign LS = 1'b0; +assign DS = 1'b0; +assign SD = 1'b0; +assign LS_RB1 = 1'b0; +assign DS_RB1 = 1'b0; +assign SD_RB1 = 1'b0; + +assign reg_rd0 =reg_rd_int; +assign WS_GND = 2'b00; + +assign reg_rd1 = 1'b0; + +assign wen_reg0[4:wr_enable_int]=0; +assign wen_reg0[wr_enable_int-1:0]=WEN; + +assign addr_wr1=11'b0000000000; +assign addr_rd1=11'b0000000000; + +generate + + if(addr_int == 11) + begin + assign addr_wr0[10:0]=WA; + assign addr_rd0[10:0]=RA; + end + else + begin + assign addr_wr0[10:addr_int]=0; + assign addr_wr0[addr_int-1:0]=WA; + assign addr_rd0[10:addr_int]=0; + assign addr_rd0[addr_int-1:0]=RA; + end + + if (data_width_int == 32) + begin + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + else if (data_width_int > 8 && data_width_int < 32) + begin + assign in_reg0[31:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + else if (data_width_int <= 8) + begin + assign in_reg0[31:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; + end + + if(data_width_int <=8) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(data_width_int >8 && data_width_int <=16) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(data_width_int > 16) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + if (data_width_int <=16) begin + + ram8k_2x1_cell_macro # ( + `include "pp3_bram_init_8_16.vh" + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) + U1 ( + .A1_0(addr_wr0) , + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(WClk), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk0_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(WClk_En), + .CLK2_0(RClk), + .CLK2_1(RClk), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk0_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(RClk_En), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(GND), + .CS2_0(RD0_SEL), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1(wen_reg0[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end + else if (data_width_int > 16) begin + + ram8k_2x1_cell_macro # ( + `include "pp3_bram_init_32.vh" + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) + U2 ( + .A1_0(addr_wr0) , + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(WClk), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk0_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(WClk_En), + .CLK2_0(RClk), + .CLK2_1(RClk), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk0_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(RClk_En), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(GND), + .CS2_0(RD0_SEL), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({1'b0,in_reg0[31:24],1'b0,in_reg0[23:16]}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1(wen_reg0[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1({out_par0[3],out_reg0[31:24],out_par0[2],out_reg0[23:16]}), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end + +endgenerate + +assign RD[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + +endmodule + + +module FIFO_8K_BLK(DIN,Fifo_Push_Flush,Fifo_Pop_Flush,PUSH,POP,Push_Clk,Pop_Clk,Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush,Almost_Full,Almost_Empty,PUSH_FLAG,POP_FLAG,DOUT); + +parameter data_depth_int = 512, + data_width_int = 36, + reg_rd_int = 0, + sync_fifo_int = 0; + +input Fifo_Push_Flush,Fifo_Pop_Flush; +input Push_Clk,Pop_Clk; +input PUSH,POP; +input [data_width_int-1:0] DIN; +input Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush; +output [data_width_int-1:0] DOUT; +output [3:0] PUSH_FLAG,POP_FLAG; +output Almost_Full,Almost_Empty; + +wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; +wire VCC,GND; + +wire [10:0] addr_wr,addr_rd; +wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; +wire reg_rd0,sync_fifo0; +wire [15:0] in_reg0; +wire [15:0] out_reg0; +wire [1:0] WS1_0; +wire [1:0] WS2_0; +wire Push_Clk0_Sel,Pop_Clk0_Sel; +wire Async_Flush_Sel0; + +wire [1:0] out_par0; + +assign LS = 1'b0; +assign DS = 1'b0; +assign SD = 1'b0; +assign LS_RB1 = 1'b0; +assign DS_RB1 = 1'b0; +assign SD_RB1 = 1'b0; + +assign VCC = 1'b1; +assign GND = 1'b0; + +assign Push_Clk0_Sel = 1'b0; +assign Pop_Clk0_Sel = 1'b0; +assign Async_Flush_Sel0 = 1'b0; + +assign reg_rd0 = reg_rd_int; +assign sync_fifo0 = sync_fifo_int; + +assign addr_wr=11'b00000000000; +assign addr_rd=11'b00000000000; + +assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; +assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; +assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; +assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; +assign clk1_sig_sel0 = Push_Clk0_Sel; +assign clk2_sig_sel0 = Pop_Clk0_Sel ; +assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; +assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; +assign p1_sig0 = Fifo_Dir ? POP : PUSH; +assign p2_sig0 = Fifo_Dir ? PUSH : POP ; + +generate + + if (data_width_int == 16) + begin + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + else if (data_width_int > 8 && data_width_int < 16) + begin + assign in_reg0[15:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + else if (data_width_int <= 8) + begin + assign in_reg0[15:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + + if(data_width_int <=8) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(data_width_int >8 && data_width_int <=16) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(data_width_int > 16) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + +endgenerate + + ram8k_2x1_cell_macro # ( + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) + U1 (.A1_0(addr_wr) , + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(clk1_sig0), + .CLK1_1(GND), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(GND), + .CLK2_0(clk2_sig0), + .CLK2_1(GND), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(GND), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(GND), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND,GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND,GND}), + .WEN1_0({GND,GND}), + .WEN1_1({GND,GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + assign DOUT[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + +endmodule + + +module FIFO_16K_BLK(DIN,Fifo_Push_Flush,Fifo_Pop_Flush,PUSH,POP,Push_Clk,Pop_Clk,Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush,Almost_Full,Almost_Empty,PUSH_FLAG,POP_FLAG,DOUT); + +parameter data_depth_int = 512, + data_width_int = 36, + reg_rd_int = 0, + sync_fifo_int = 0; + +input Fifo_Push_Flush,Fifo_Pop_Flush; +input Push_Clk,Pop_Clk; +input PUSH,POP; +input [data_width_int-1:0] DIN; +input Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush; +output [data_width_int-1:0] DOUT; +output [3:0] PUSH_FLAG,POP_FLAG; +output Almost_Full,Almost_Empty; + +wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; +wire VCC,GND; + +wire [10:0] addr_wr,addr_rd; +wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; +wire reg_rd0,sync_fifo0; +wire [31:0] in_reg0; +wire [31:0] out_reg0; +wire [1:0] WS1_0; +wire [1:0] WS2_0; +wire Push_Clk0_Sel,Pop_Clk0_Sel; +wire Async_Flush_Sel0; + +wire [3:0] out_par0; +wire [1:0] out_par1; + +assign LS = 1'b0; +assign DS = 1'b0; +assign SD = 1'b0; +assign LS_RB1 = 1'b0; +assign DS_RB1 = 1'b0; +assign SD_RB1 = 1'b0; + +assign VCC = 1'b1; +assign GND = 1'b0; + +assign Push_Clk0_Sel = 1'b0; +assign Pop_Clk0_Sel = 1'b0; +assign Async_Flush_Sel0 = 1'b0; + +assign reg_rd0 = reg_rd_int; +assign sync_fifo0 = sync_fifo_int; + +assign addr_wr=11'b00000000000; +assign addr_rd=11'b00000000000; + +assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; +assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; +assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; +assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; +assign clk1_sig_sel0 = Push_Clk0_Sel; +assign clk2_sig_sel0 = Pop_Clk0_Sel ; +assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; +assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; +assign p1_sig0 = Fifo_Dir ? POP : PUSH; +assign p2_sig0 = Fifo_Dir ? PUSH : POP ; + +generate + if (data_width_int == 32) + begin + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + else if (data_width_int > 8 && data_width_int < 32) + begin + assign in_reg0[31:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + else if (data_width_int <= 8) + begin + assign in_reg0[31:data_width_int] =0; + assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; + end + + if(data_width_int <=8) + begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end + else if(data_width_int >8 && data_width_int <=16) + begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end + else if(data_width_int > 16) + begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + if (data_width_int <=16) begin + + ram8k_2x1_cell_macro #( + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) + U1 (.A1_0(addr_wr) , + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(Async_Flush_Sel0), + .CLK1_0(clk1_sig0), + .CLK1_1(clk1_sig0), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(clk1_sig_en0), + .CLK2_0(clk2_sig0), + .CLK2_1(clk2_sig0), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(clk1_sig_sel0), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(clk2_sig_sel0), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(clk2_sig_en0), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND,GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND,GND}), + .WEN1_0({GND,GND}), + .WEN1_1({GND,GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + end + else if (data_width_int > 16) begin + + ram8k_2x1_cell_macro #( + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) + U2 ( + .A1_0(addr_wr) , + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(Async_Flush_Sel0), + .CLK1_0(clk1_sig0), + .CLK1_1(clk1_sig0), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(clk1_sig_en0), + .CLK2_0(clk2_sig0), + .CLK2_1(clk2_sig0), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(clk1_sig_sel0), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(clk2_sig_sel0), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(clk2_sig_en0), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({1'b0,in_reg0[31:24],1'b0,in_reg0[23:16]}), + .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND,GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND,GND}), + .WEN1_0({GND,GND}), + .WEN1_1({GND,GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), + .RD_1({out_par0[3],out_reg0[31:24],out_par0[2],out_reg0[23:16]}), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end + +endgenerate + + assign DOUT[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + +endmodule + diff --git a/ql-qlf-plugin/pp3/pp3_cells_sim.v b/ql-qlf-plugin/pp3/pp3_cells_sim.v index 39229121c..37c178855 100644 --- a/ql-qlf-plugin/pp3/pp3_cells_sim.v +++ b/ql-qlf-plugin/pp3/pp3_cells_sim.v @@ -292,79 +292,6 @@ module mux8x0 ( assign Q = S2 ? (S1 ? (S0 ? H : G) : (S0 ? F : E)) : (S1 ? (S0 ? D : C) : (S0 ? B : A)); endmodule -(* blackbox *) -(* keep *) -module qlal4s3b_cell_macro ( - input WB_CLK, - input WBs_ACK, - input [31:0] WBs_RD_DAT, - output [3:0] WBs_BYTE_STB, - output WBs_CYC, - output WBs_WE, - output WBs_RD, - output WBs_STB, - output [16:0] WBs_ADR, - input [3:0] SDMA_Req, - input [3:0] SDMA_Sreq, - output [3:0] SDMA_Done, - output [3:0] SDMA_Active, - input [3:0] FB_msg_out, - input [7:0] FB_Int_Clr, - output FB_Start, - input FB_Busy, - output WB_RST, - output Sys_PKfb_Rst, - output Clk16, - output Clk16_Rst, - output Clk21, - output Clk21_Rst, - output Sys_Pclk, - output Sys_Pclk_Rst, - input Sys_PKfb_Clk, - input [31:0] FB_PKfbData, - output [31:0] WBs_WR_DAT, - input [3:0] FB_PKfbPush, - input FB_PKfbSOF, - input FB_PKfbEOF, - output [7:0] Sensor_Int, - output FB_PKfbOverflow, - output [23:0] TimeStamp, - input Sys_PSel, - input [15:0] SPIm_Paddr, - input SPIm_PEnable, - input SPIm_PWrite, - input [31:0] SPIm_PWdata, - output SPIm_PReady, - output SPIm_PSlvErr, - output [31:0] SPIm_Prdata, - input [15:0] Device_ID, - input [13:0] FBIO_In_En, - input [13:0] FBIO_Out, - input [13:0] FBIO_Out_En, - output [13:0] FBIO_In, - inout [13:0] SFBIO, - input Device_ID_6S, - input Device_ID_4S, - input SPIm_PWdata_26S, - input SPIm_PWdata_24S, - input SPIm_PWdata_14S, - input SPIm_PWdata_11S, - input SPIm_PWdata_0S, - input SPIm_Paddr_8S, - input SPIm_Paddr_6S, - input FB_PKfbPush_1S, - input FB_PKfbData_31S, - input FB_PKfbData_21S, - input FB_PKfbData_19S, - input FB_PKfbData_9S, - input FB_PKfbData_6S, - input Sys_PKfb_ClkS, - input FB_BusyS, - input WB_CLKS -); - -endmodule - (* abc9_lut=1, lib_whitebox *) module LUT1 ( output O, @@ -442,3 +369,90 @@ module LUT4 ( assign O = I0 ? s1[1] : s1[0]; endmodule +module logic_cell_macro( + input BA1, + input BA2, + input BAB, + input BAS1, + input BAS2, + input BB1, + input BB2, + input BBS1, + input BBS2, + input BSL, + input F1, + input F2, + input FS, + input QCK, + input QCKS, + input QDI, + input QDS, + input QEN, + input QRT, + input QST, + input TA1, + input TA2, + input TAB, + input TAS1, + input TAS2, + input TB1, + input TB2, + input TBS, + input TBS1, + input TBS2, + input TSL, + output CZ, + output FZ, + output QZ, + output TZ +); + + wire TAP1,TAP2,TBP1,TBP2,BAP1,BAP2,BBP1,BBP2,QCKP,TAI,TBI,BAI,BBI,TZI,BZI,CZI,QZI; + reg QZ_r; + + initial + begin + QZ_r=1'b0; + end + assign QZ = QZ_r; + assign TAP1 = TAS1 ? ~TA1 : TA1; + assign TAP2 = TAS2 ? ~TA2 : TA2; + assign TBP1 = TBS1 ? ~TB1 : TB1; + assign TBP2 = TBS2 ? ~TB2 : TB2; + assign BAP1 = BAS1 ? ~BA1 : BA1; + assign BAP2 = BAS2 ? ~BA2 : BA2; + assign BBP1 = BBS1 ? ~BB1 : BB1; + assign BBP2 = BBS2 ? ~BB2 : BB2; + + assign TAI = TSL ? TAP2 : TAP1; + assign TBI = TSL ? TBP2 : TBP1; + assign BAI = BSL ? BAP2 : BAP1; + assign BBI = BSL ? BBP2 : BBP1; + assign TZI = TAB ? TBI : TAI; + assign BZI = BAB ? BBI : BAI; + assign CZI = TBS ? BZI : TZI; + assign QZI = QDS ? QDI : CZI ; + assign FZ = FS ? F2 : F1; + assign TZ = TZI; + assign CZ = CZI; + assign QCKP = QCKS ? QCK : ~QCK; + + + always @(posedge QCKP) + if(~QRT && ~QST) + if(QEN) + QZ_r = QZI; + always @(QRT or QST) + if(QRT) + QZ_r = 1'b0; + else if (QST) + QZ_r = 1'b1; + +endmodule + +// Include simulation models of QLAL4S3B eFPGA interface +`include "pp3_qlal4s3b_sim.v" +// Include BRAM and FIFO simulation models +`include "pp3_brams_sim.v" +// Include MULT simulation models +`include "pp3_mult_sim.v" diff --git a/ql-qlf-plugin/pp3/pp3_mult_sim.v b/ql-qlf-plugin/pp3/pp3_mult_sim.v new file mode 100644 index 000000000..359621914 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_mult_sim.v @@ -0,0 +1,114 @@ +(* blackbox *) +module qlal4s3_mult_32x32_cell ( + input [31:0] Amult, + input [31:0] Bmult, + input [1:0] Valid_mult, + output [63:0] Cmult); + +endmodule /* qlal4s3_32x32_mult_cell */ + +(* blackbox *) +module qlal4s3_mult_16x16_cell ( + input [15:0] Amult, + input [15:0] Bmult, + input [1:0] Valid_mult, + output [31:0] Cmult); + +endmodule /* qlal4s3_16x16_mult_cell */ + + +/* Verilog model of QLAL4S3 Multiplier */ +/*qlal4s3_mult_cell*/ +module signed_mult( + A, + B, + Valid, + C +); + +parameter WIDTH = 32; +parameter CWIDTH = 2*WIDTH; + +input [WIDTH-1:0] A, B; +input Valid; +output[CWIDTH-1:0] C; + +reg signed [WIDTH-1:0] A_q, B_q; +wire signed [CWIDTH-1:0] C_int; + +assign C_int = A_q * B_q; +assign valid_int = Valid; +assign C = C_int; + +always @(*) + if(valid_int == 1'b1) + A_q <= A; + +always @(*) + if(valid_int == 1'b1) + B_q <= B; + +endmodule + + +module qlal4s3_mult_cell_macro ( Amult, Bmult, Valid_mult, sel_mul_32x32, Cmult); + +input [31:0] Amult; +input [31:0] Bmult; +input [1:0] Valid_mult; +input sel_mul_32x32; +output [63:0] Cmult; + +wire [15:0] A_mult_16_0; +wire [15:0] B_mult_16_0; +wire [31:0] C_mult_16_0; +wire [15:0] A_mult_16_1; +wire [15:0] B_mult_16_1; +wire [31:0] C_mult_16_1; +wire [31:0] A_mult_32; +wire [31:0] B_mult_32; +wire [63:0] C_mult_32; +wire Valid_mult_16_0; +wire Valid_mult_16_1; +wire Valid_mult_32; + + +assign Cmult = sel_mul_32x32 ? C_mult_32 : {C_mult_16_1, C_mult_16_0}; + +assign A_mult_16_0 = sel_mul_32x32 ? 16'h0 : Amult[15:0]; +assign B_mult_16_0 = sel_mul_32x32 ? 16'h0 : Bmult[15:0]; +assign A_mult_16_1 = sel_mul_32x32 ? 16'h0 : Amult[31:16]; +assign B_mult_16_1 = sel_mul_32x32 ? 16'h0 : Bmult[31:16]; + +assign A_mult_32 = sel_mul_32x32 ? Amult : 32'h0; +assign B_mult_32 = sel_mul_32x32 ? Bmult : 32'h0; + +assign Valid_mult_16_0 = sel_mul_32x32 ? 1'b0 : Valid_mult[0]; +assign Valid_mult_16_1 = sel_mul_32x32 ? 1'b0 : Valid_mult[1]; +assign Valid_mult_32 = sel_mul_32x32 ? Valid_mult[0] : 1'b0; + +signed_mult #(.WIDTH(16)) u_signed_mult_16_0( +.A (A_mult_16_0), //I: 16 bits +.B (B_mult_16_0), //I: 16 bits +.Valid (Valid_mult_16_0), //I +.C (C_mult_16_0) //O: 32 bits +); + +signed_mult #(.WIDTH(16)) u_signed_mult_16_1( +.A (A_mult_16_1), //I: 16 bits +.B (B_mult_16_1), //I: 16 bits +.Valid (Valid_mult_16_1), //I +.C (C_mult_16_1) //O: 32 bits +); + +signed_mult #(.WIDTH(32)) u_signed_mult_32( +.A (A_mult_32), //I: 32 bits +.B (B_mult_32), //I: 32 bits +.Valid (Valid_mult_32), //I +.C (C_mult_32) //O: 64 bits +); + +endmodule +/*qlal4s3_mult_cell*/ + + diff --git a/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v b/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v new file mode 100644 index 000000000..fd849f6d0 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v @@ -0,0 +1,2509 @@ +`timescale 1ns/10ps +module ahb_gen_bfm ( + + // AHB Slave Interface to AHB Bus Matrix + // + A2F_HCLK, + A2F_HRESET, + + A2F_HADDRS, + A2F_HSEL, + A2F_HTRANSS, + A2F_HSIZES, + A2F_HWRITES, + A2F_HREADYS, + A2F_HWDATAS, + + A2F_HREADYOUTS, + A2F_HRESPS, + A2F_HRDATAS + + ); + +//------Port Parameters---------------- +// + +parameter ADDRWIDTH = 32; +parameter DATAWIDTH = 32; + +// +// Define the default address between transfers +// +parameter DEFAULT_AHB_ADDRESS = {(ADDRWIDTH){1'b1}}; + +// +// Define the standard delay from clock +// +parameter STD_CLK_DLY = 2; + +// +// Define Debug Message Controls +// +parameter ENABLE_AHB_REG_WR_DEBUG_MSG = 1'b1; +parameter ENABLE_AHB_REG_RD_DEBUG_MSG = 1'b1; + +// +// Define the size of the message arrays +// +parameter TEST_MSG_ARRAY_SIZE = (64 * 8); + + +//------Port Signals------------------- +// + + // AHB connection to master + // +input A2F_HCLK; +input A2F_HRESET; + +output [ADDRWIDTH-1:0] A2F_HADDRS; +output A2F_HSEL; +output [1:0] A2F_HTRANSS; +output [2:0] A2F_HSIZES; +output A2F_HWRITES; +output A2F_HREADYS; +output [DATAWIDTH-1:0] A2F_HWDATAS; + +input A2F_HREADYOUTS; +input A2F_HRESPS; +input [DATAWIDTH-1:0] A2F_HRDATAS; + + +wire A2F_HCLK; +wire A2F_HRESET; + +reg [ADDRWIDTH-1:0] A2F_HADDRS; +reg A2F_HSEL; +reg [1:0] A2F_HTRANSS; +reg [2:0] A2F_HSIZES; +reg A2F_HWRITES; +reg A2F_HREADYS; +reg [DATAWIDTH-1:0] A2F_HWDATAS; + +wire A2F_HREADYOUTS; +wire A2F_HRESPS; +wire [DATAWIDTH-1:0] A2F_HRDATAS; + + +//------Define Parameters-------------- +// + +// +// None at this time +// + +//------Internal Signals--------------- +// + +// Define internal signals +// +reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg1; // Bus used for depositing test messages in ASCI +reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg2; // Bus used for depositing test messages in ASCI +reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg3; // Bus used for depositing test messages in ASCI +reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg4; // Bus used for depositing test messages in ASCI +reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg5; // Bus used for depositing test messages in ASCI +reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg6; // Bus used for depositing test messages in ASCI + + +//------Logic Operations--------------- +// + +// Define the intial state of key signals +// +initial +begin + + A2F_HADDRS <= DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL <= 1'b0; // Bridge not selected + A2F_HTRANSS <= 2'h0; // "IDLE" State + A2F_HSIZES <= 3'h0; // "Byte" Transfer Size + A2F_HWRITES <= 1'b0; // "Read" operation + A2F_HREADYS <= 1'b0; // Slave is not ready + A2F_HWDATAS <= {(DATAWIDTH){1'b0}}; // Write Data Value of "0" + + ahb_bfm_msg1 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI + ahb_bfm_msg2 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI + ahb_bfm_msg3 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI + ahb_bfm_msg4 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI + ahb_bfm_msg5 <= "NO ACTIVITY"; // Bus used for depositiog test messages in ASCI + ahb_bfm_msg6 <= "NO ACTIVITY"; // Bus used for depositiog test messages in ASCI +end + + +//------Instantiate Modules------------ +// + +// +// None at this time +// + + +//------BFM Routines------------------- +// +`ifndef YOSYS +task ahb_read_al4s3b_fabric; +input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus +input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus +output [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus + +reg [DATAWIDTH-1:0] read_data; + +integer i, j, k; + +begin + // Read Command Bit + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Read"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size + + A2F_HWRITES = 1'b0; // "Read" operation + A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) + begin + @(posedge A2F_HCLK) #STD_CLK_DLY; + end + + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value + + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; + +end +endtask + + +task ahb_write_al4s3b_fabric; +input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus +input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus +input [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus + +reg [DATAWIDTH-1:0] read_data; + +integer i, j, k; + +begin + // Read Command Bit + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Write"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size + + A2F_HWRITES = 1'b1; // "Write" operation + A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + A2F_HWDATAS = TARGET_DATA; // Write From test routine + A2F_HWRITES = 1'b0; // "Read" operation + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) + begin + @(posedge A2F_HCLK) #STD_CLK_DLY; + end + + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value + + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; + +end +endtask + +task ahb_read_word_al4s3b_fabric; +input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus +output [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus + +reg [DATAWIDTH-1:0] read_data; + +integer i, j, k; + +begin + // Read Command Bit + // + + wait (A2F_HRESET == 0); + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Read"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = 3'b010; // Transfer Size + + A2F_HWRITES = 1'b0; // "Read" operation + A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) + begin + @(posedge A2F_HCLK) #STD_CLK_DLY; + end + + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value + + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; + +end +endtask + + +task ahb_write_word_al4s3b_fabric; +input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus +input [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus + +reg [DATAWIDTH-1:0] read_data; + +integer i, j, k; + +begin + // Read Command Bit + // + wait (A2F_HRESET == 0); + + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Write"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = 3'b010; // Transfer Size + + A2F_HWRITES = 1'b1; // "Write" operation + A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + A2F_HWDATAS = TARGET_DATA; // Write From test routine + A2F_HWRITES = 1'b0; // "Read" operation + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) + begin + @(posedge A2F_HCLK) #STD_CLK_DLY; + end + + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value + + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; + + //$stop(); + +end +endtask + +task ahb_write_al4s3b_fabric_mod; +input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus +input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus +input [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus + +reg [DATAWIDTH-1:0] read_data; + +integer i, j, k; + +begin + // Read Command Bit + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Write"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + //A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + A2F_HADDRS = {TARGET_ADDRESS[ADDRWIDTH-1:11],(TARGET_ADDRESS[10:0] << 2)} ; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size + + A2F_HWRITES = 1'b1; // "Write" operation + A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + A2F_HWDATAS = TARGET_DATA; // Write From test routine + A2F_HWRITES = 1'b0; // "Read" operation + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) + begin + @(posedge A2F_HCLK) #STD_CLK_DLY; + end + + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value + + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; + +end +endtask + + +task ahb_read_al4s3b_fabric_mod; +input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus +input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus +output [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus + +reg [DATAWIDTH-1:0] read_data; + +integer i, j, k; + +begin + // Read Command Bit + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Read"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + //A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + A2F_HADDRS = {TARGET_ADDRESS[ADDRWIDTH-1:11],(TARGET_ADDRESS[10:0] << 2)} ; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size + + A2F_HWRITES = 1'b0; // "Read" operation + A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) + begin + @(posedge A2F_HCLK) #STD_CLK_DLY; + end + + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value + + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; + +end +endtask +`endif + +endmodule + +`timescale 1ns/10ps + +module oscillator_s1 + ( + + OSC_CLK_EN, + OSC_CLK + + ); + +// Define the oscillator's frequency +// +// Note: The parameter above assumes that values are calculated in units of nS. +// +parameter T_CYCLE_CLK = (1000.0/19.2); + +input OSC_CLK_EN; +output OSC_CLK; + +wire OSC_CLK_EN; +wire OSC_CLK; + +reg osc_int_clk; + +// Define the output enable +// +assign OSC_CLK = OSC_CLK_EN ? osc_int_clk : 1'bZ; + +// Define the clock oscillator section +// +initial +begin + osc_int_clk = 0; // Intialize the clock at time 0ns. +`ifndef YOSYS + forever // Generate a clock with an expected frequency. + begin + #(T_CYCLE_CLK/2) osc_int_clk = 1; + #(T_CYCLE_CLK/2) osc_int_clk = 0; + end +`endif +end + +endmodule + +`timescale 1ns/10ps + +module sdma_bfm ( + + // SDMA Interface Signals + // + sdma_req_i, + sdma_sreq_i, + sdma_done_o, + sdma_active_o + + ); + +input [3:0] sdma_req_i; +input [3:0] sdma_sreq_i; +output [3:0] sdma_done_o; +output [3:0] sdma_active_o; + +reg [3:0] sdma_done_sig; +reg [3:0] sdma_active_sig; + +assign sdma_done_o = sdma_done_sig; +assign sdma_active_o = sdma_active_sig; + +initial +begin +sdma_done_sig <= 4'h0; +sdma_active_sig <= 4'h0; + +end + +`ifndef YOSYS +task drive_dma_active; +input [3:0] dma_active_i; +begin + sdma_active_sig <= dma_active_i; + #100; + //sdma_active_sig <= 4'h0; + +end +endtask +`endif +endmodule + +`timescale 1ns / 10ps +module ahb2fb_asynbrig_if ( + + A2F_HCLK, // clock + A2F_HRESET, // reset + + // AHB connection to master + // + A2F_HSEL, + A2F_HADDRS, + A2F_HTRANSS, + A2F_HSIZES, + A2F_HWRITES, + A2F_HREADYS, + + A2F_HREADYOUTS, + A2F_HRESPS, + + // Fabric Interface + // + AHB_ASYNC_ADDR_O, + AHB_ASYNC_READ_EN_O, + AHB_ASYNC_WRITE_EN_O, + AHB_ASYNC_BYTE_STROBE_O, + + AHB_ASYNC_STB_TOGGLE_O, + + FABRIC_ASYNC_ACK_TOGGLE_I + + ); + + + //-----Port Parameters----------------- + // + + parameter DATAWIDTH = 32; + parameter APERWIDTH = 17; + + parameter STATE_WIDTH = 1; + + parameter AHB_ASYNC_IDLE = 0; + parameter AHB_ASYNC_WAIT = 1; + + + //-----Port Signals-------------------- + // + + + //------------------------------------------ + // AHB connection to master + // + input A2F_HCLK; // clock + input A2F_HRESET; // reset + + input [APERWIDTH-1:0] A2F_HADDRS; + input A2F_HSEL; + input [1:0] A2F_HTRANSS; + input [2:0] A2F_HSIZES; + input A2F_HWRITES; + input A2F_HREADYS; + + output A2F_HREADYOUTS; + output A2F_HRESPS; + + + //------------------------------------------ + // Fabric Interface + // + output [APERWIDTH-1:0] AHB_ASYNC_ADDR_O; + output AHB_ASYNC_READ_EN_O; + output AHB_ASYNC_WRITE_EN_O; + output [3:0] AHB_ASYNC_BYTE_STROBE_O; + + output AHB_ASYNC_STB_TOGGLE_O; + + input FABRIC_ASYNC_ACK_TOGGLE_I; + + + //------------------------------------------ + // AHB connection to master + // + wire A2F_HCLK; // clock + wire A2F_HRESET; // reset + + wire [APERWIDTH-1:0] A2F_HADDRS; + wire A2F_HSEL; + wire [1:0] A2F_HTRANSS; + wire [2:0] A2F_HSIZES; + wire A2F_HWRITES; + wire A2F_HREADYS; + + reg A2F_HREADYOUTS; + reg A2F_HREADYOUTS_nxt; + + wire A2F_HRESPS; + + + //------------------------------------------ + // Fabric Interface + // + reg [APERWIDTH-1:0] AHB_ASYNC_ADDR_O; + reg AHB_ASYNC_READ_EN_O; + reg AHB_ASYNC_WRITE_EN_O; + + reg [3:0] AHB_ASYNC_BYTE_STROBE_O; + reg [3:0] AHB_ASYNC_BYTE_STROBE_O_nxt; + + + + reg AHB_ASYNC_STB_TOGGLE_O; + reg AHB_ASYNC_STB_TOGGLE_O_nxt; + + wire FABRIC_ASYNC_ACK_TOGGLE_I; + + + //------Define Parameters--------- + // + + // + // None at this time + // + + + //-----Internal Signals-------------------- + // + + wire trans_req; // transfer request + + reg [STATE_WIDTH-1:0] ahb_to_fabric_state; + reg [STATE_WIDTH-1:0] ahb_to_fabric_state_nxt; + + reg fabric_async_ack_toggle_i_1ff; + reg fabric_async_ack_toggle_i_2ff; + reg fabric_async_ack_toggle_i_3ff; + + wire fabric_async_ack; + + //------Logic Operations---------- + // + + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + assign trans_req = A2F_HSEL + & A2F_HREADYS + & A2F_HTRANSS[1]; // transfer request issued only in SEQ and NONSEQ status and slave is + // selected and last transfer finish + + + // Check for acknowldge from the fabric + // + // Note: The fabric is on a different and potentially asynchronous clock. + // Therefore, acknowledge is passed as a toggle signal. + // + assign fabric_async_ack = fabric_async_ack_toggle_i_2ff ^ fabric_async_ack_toggle_i_3ff; + + + // Issue transfer status + // + // Note: All transfers are considered to have completed successfully. + // + assign A2F_HRESPS = 1'b0; // OKAY response from slave + + + // Address signal registering, to make the address and data active at the same cycle + // + always @(posedge A2F_HCLK or posedge A2F_HRESET) + begin + if (A2F_HRESET) + begin + ahb_to_fabric_state <= AHB_ASYNC_IDLE; + + AHB_ASYNC_ADDR_O <= {(APERWIDTH){1'b0}}; //default address 0 is selected + AHB_ASYNC_READ_EN_O <= 1'b0; + AHB_ASYNC_WRITE_EN_O <= 1'b0; + AHB_ASYNC_BYTE_STROBE_O <= 4'b0; + + AHB_ASYNC_STB_TOGGLE_O <= 1'b0; + + fabric_async_ack_toggle_i_1ff <= 1'b0; + fabric_async_ack_toggle_i_2ff <= 1'b0; + fabric_async_ack_toggle_i_3ff <= 1'b0; + + A2F_HREADYOUTS <= 1'b0; + end + else + begin + ahb_to_fabric_state <= ahb_to_fabric_state_nxt; + + if (trans_req) + begin + AHB_ASYNC_ADDR_O <= A2F_HADDRS[APERWIDTH-1:0]; + AHB_ASYNC_READ_EN_O <= ~A2F_HWRITES ; + AHB_ASYNC_WRITE_EN_O <= A2F_HWRITES ; + AHB_ASYNC_BYTE_STROBE_O <= AHB_ASYNC_BYTE_STROBE_O_nxt; + end + + AHB_ASYNC_STB_TOGGLE_O <= AHB_ASYNC_STB_TOGGLE_O_nxt; + + fabric_async_ack_toggle_i_1ff <= FABRIC_ASYNC_ACK_TOGGLE_I; + fabric_async_ack_toggle_i_2ff <= fabric_async_ack_toggle_i_1ff; + fabric_async_ack_toggle_i_3ff <= fabric_async_ack_toggle_i_2ff; + + A2F_HREADYOUTS <= A2F_HREADYOUTS_nxt; + end + end + + + // Byte Strobe Signal Decode + // + // Note: The "Transfer Size Encoding" is defined as follows: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + always @(A2F_HSIZES or A2F_HADDRS) + begin + case(A2F_HSIZES) + 3'b000: //byte + begin + case(A2F_HADDRS[1:0]) + 2'b00: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0001; + 2'b01: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0010; + 2'b10: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0100; + 2'b11: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b1000; + default: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0000; + endcase + end + 3'b001: //half word + begin + case(A2F_HADDRS[1]) + 1'b0: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0011; + 1'b1: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b1100; + default: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0000; + endcase + end + default: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b1111; // default 32 bits, word + endcase + end + + + // Define the AHB Interface Statemachine + // + always @( + trans_req or + fabric_async_ack or + AHB_ASYNC_STB_TOGGLE_O or + ahb_to_fabric_state + ) + begin + case(ahb_to_fabric_state) + AHB_ASYNC_IDLE: + begin + case(trans_req) + 1'b0: // Wait for an AHB Transfer + begin + ahb_to_fabric_state_nxt <= AHB_ASYNC_IDLE; + A2F_HREADYOUTS_nxt <= 1'b1; + AHB_ASYNC_STB_TOGGLE_O_nxt <= AHB_ASYNC_STB_TOGGLE_O; + end + 1'b1: // AHB Transfer Detected + begin + ahb_to_fabric_state_nxt <= AHB_ASYNC_WAIT; + A2F_HREADYOUTS_nxt <= 1'b0; + AHB_ASYNC_STB_TOGGLE_O_nxt <= ~AHB_ASYNC_STB_TOGGLE_O; + end + endcase + end + AHB_ASYNC_WAIT: + begin + AHB_ASYNC_STB_TOGGLE_O_nxt <= AHB_ASYNC_STB_TOGGLE_O; + + case(fabric_async_ack) + 1'b0: // Wait for Acknowledge from Fabric Interface + begin + ahb_to_fabric_state_nxt <= AHB_ASYNC_WAIT; + A2F_HREADYOUTS_nxt <= 1'b0; + end + 1'b1: // Received Acknowledge from Fabric Interface + begin + ahb_to_fabric_state_nxt <= AHB_ASYNC_IDLE; + A2F_HREADYOUTS_nxt <= 1'b1; + end + endcase + end + default: + begin + ahb_to_fabric_state_nxt <= AHB_ASYNC_IDLE; + A2F_HREADYOUTS_nxt <= 1'b0; + AHB_ASYNC_STB_TOGGLE_O_nxt <= AHB_ASYNC_STB_TOGGLE_O; + end + endcase + end + +endmodule + +`timescale 1ns / 10ps + +module fb2ahb_asynbrig_if ( + + A2F_HRDATAS, + + // AHB Interface + // + AHB_ASYNC_READ_EN_I, + AHB_ASYNC_WRITE_EN_I, + AHB_ASYNC_BYTE_STROBE_I, + + AHB_ASYNC_STB_TOGGLE_I, + + // Fabric Interface + // + WB_CLK_I, + WB_RST_I, + WB_ACK_I, + WB_DAT_I, + + WB_CYC_O, + WB_BYTE_STB_O, + WB_WE_O, + WB_RD_O, + WB_STB_O, + + FABRIC_ASYNC_ACK_TOGGLE_O + + ); + + + //-----Port Parameters----------------- + // + + parameter DATAWIDTH = 32; + + parameter STATE_WIDTH = 1; + + parameter FAB_ASYNC_IDLE = 0; + parameter FAB_ASYNC_WAIT = 1; + + + //-----Port Signals-------------------- + // + + + //------------------------------------------ + // AHB connection to master + // + output [DATAWIDTH-1:0] A2F_HRDATAS; + + + //------------------------------------------ + // Fabric Interface + // + input AHB_ASYNC_READ_EN_I; + input AHB_ASYNC_WRITE_EN_I; + input [3:0] AHB_ASYNC_BYTE_STROBE_I; + + input AHB_ASYNC_STB_TOGGLE_I; + + + input WB_CLK_I; + input WB_RST_I; + input WB_ACK_I; + input [DATAWIDTH-1:0] WB_DAT_I; + + output WB_CYC_O; + output [3:0] WB_BYTE_STB_O; + output WB_WE_O; + output WB_RD_O; + output WB_STB_O; + + output FABRIC_ASYNC_ACK_TOGGLE_O; + + + //------------------------------------------ + // AHB connection to master + // + + reg [DATAWIDTH-1:0] A2F_HRDATAS; + reg [DATAWIDTH-1:0] A2F_HRDATAS_nxt; + + + //------------------------------------------ + // Fabric Interface + // + wire AHB_ASYNC_READ_EN_I; + wire AHB_ASYNC_WRITE_EN_I; + + wire [3:0] AHB_ASYNC_BYTE_STROBE_I; + + wire AHB_ASYNC_STB_TOGGLE_I; + + + wire WB_CLK_I; + wire WB_RST_I; + wire WB_ACK_I; + + reg WB_CYC_O; + reg WB_CYC_O_nxt; + + reg [3:0] WB_BYTE_STB_O; + reg [3:0] WB_BYTE_STB_O_nxt; + + reg WB_WE_O; + reg WB_WE_O_nxt; + + reg WB_RD_O; + reg WB_RD_O_nxt; + + reg WB_STB_O; + reg WB_STB_O_nxt; + + reg FABRIC_ASYNC_ACK_TOGGLE_O; + reg FABRIC_ASYNC_ACK_TOGGLE_O_nxt; + + + //------Define Parameters--------- + // + + // + // None at this time + // + + + //-----Internal Signals-------------------- + // + + reg [STATE_WIDTH-1:0] fabric_to_ahb_state; + reg [STATE_WIDTH-1:0] fabric_to_ahb_state_nxt; + + reg ahb_async_stb_toggle_i_1ff; + reg ahb_async_stb_toggle_i_2ff; + reg ahb_async_stb_toggle_i_3ff; + + wire ahb_async_stb; + + + //------Logic Operations---------- + // + + + // Check for transfer from the AHB + // + // Note: The AHB is on a different and potentially asynchronous clock. + // Therefore, strobe is passed as a toggle signal. + // + assign ahb_async_stb = ahb_async_stb_toggle_i_2ff ^ ahb_async_stb_toggle_i_3ff; + + + // Address signal registering, to make the address and data active at the same cycle + // + always @(posedge WB_CLK_I or posedge WB_RST_I) + begin + if (WB_RST_I) + begin + fabric_to_ahb_state <= FAB_ASYNC_IDLE; + + A2F_HRDATAS <= {(DATAWIDTH){1'b0}}; + + WB_CYC_O <= 1'b0; + WB_BYTE_STB_O <= 4'b0; + WB_WE_O <= 1'b0; + WB_RD_O <= 1'b0; + WB_STB_O <= 1'b0; + + FABRIC_ASYNC_ACK_TOGGLE_O <= 1'b0; + + ahb_async_stb_toggle_i_1ff <= 1'b0; + ahb_async_stb_toggle_i_2ff <= 1'b0; + ahb_async_stb_toggle_i_3ff <= 1'b0; + + end + else + begin + + fabric_to_ahb_state <= fabric_to_ahb_state_nxt; + + A2F_HRDATAS <= A2F_HRDATAS_nxt; + + WB_CYC_O <= WB_CYC_O_nxt; + WB_BYTE_STB_O <= WB_BYTE_STB_O_nxt; + WB_WE_O <= WB_WE_O_nxt; + WB_RD_O <= WB_RD_O_nxt; + WB_STB_O <= WB_STB_O_nxt; + + FABRIC_ASYNC_ACK_TOGGLE_O <= FABRIC_ASYNC_ACK_TOGGLE_O_nxt; + + ahb_async_stb_toggle_i_1ff <= AHB_ASYNC_STB_TOGGLE_I; + ahb_async_stb_toggle_i_2ff <= ahb_async_stb_toggle_i_1ff; + ahb_async_stb_toggle_i_3ff <= ahb_async_stb_toggle_i_2ff; + + end + end + + + // Define the Fabric Interface Statemachine + // + always @( + ahb_async_stb or + AHB_ASYNC_READ_EN_I or + AHB_ASYNC_WRITE_EN_I or + AHB_ASYNC_BYTE_STROBE_I or + A2F_HRDATAS or + WB_ACK_I or + WB_DAT_I or + WB_CYC_O or + WB_BYTE_STB_O or + WB_WE_O or + WB_RD_O or + WB_STB_O or + FABRIC_ASYNC_ACK_TOGGLE_O or + fabric_to_ahb_state + ) + begin + case(fabric_to_ahb_state) + FAB_ASYNC_IDLE: + begin + FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= FABRIC_ASYNC_ACK_TOGGLE_O; + A2F_HRDATAS_nxt <= A2F_HRDATAS; + + case(ahb_async_stb) + 1'b0: // Wait for an AHB Transfer + begin + fabric_to_ahb_state_nxt <= FAB_ASYNC_IDLE; + + WB_CYC_O_nxt <= 1'b0; + WB_BYTE_STB_O_nxt <= 4'b0; + WB_WE_O_nxt <= 1'b0; + WB_RD_O_nxt <= 1'b0; + WB_STB_O_nxt <= 1'b0; + + end + 1'b1: // AHB Transfer Detected + begin + fabric_to_ahb_state_nxt <= FAB_ASYNC_WAIT; + + WB_CYC_O_nxt <= 1'b1; + WB_BYTE_STB_O_nxt <= AHB_ASYNC_BYTE_STROBE_I; + WB_WE_O_nxt <= AHB_ASYNC_WRITE_EN_I; + WB_RD_O_nxt <= AHB_ASYNC_READ_EN_I; + WB_STB_O_nxt <= 1'b1; + + end + endcase + end + FAB_ASYNC_WAIT: + begin + + case(WB_ACK_I) + 1'b0: // Wait for Acknowledge from Fabric Interface + begin + fabric_to_ahb_state_nxt <= FAB_ASYNC_WAIT; + + A2F_HRDATAS_nxt <= A2F_HRDATAS; + + WB_CYC_O_nxt <= WB_CYC_O; + WB_BYTE_STB_O_nxt <= WB_BYTE_STB_O; + WB_WE_O_nxt <= WB_WE_O; + WB_RD_O_nxt <= WB_RD_O; + WB_STB_O_nxt <= WB_STB_O; + + FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= FABRIC_ASYNC_ACK_TOGGLE_O; + end + 1'b1: // Received Acknowledge from Fabric Interface + begin + fabric_to_ahb_state_nxt <= FAB_ASYNC_IDLE; + + A2F_HRDATAS_nxt <= WB_DAT_I; + + WB_CYC_O_nxt <= 1'b0; + WB_BYTE_STB_O_nxt <= 4'b0; + WB_WE_O_nxt <= 1'b0; + WB_RD_O_nxt <= 1'b0; + WB_STB_O_nxt <= 1'b0; + + FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= ~FABRIC_ASYNC_ACK_TOGGLE_O; + end + endcase + end + default: + begin + fabric_to_ahb_state_nxt <= FAB_ASYNC_IDLE; + + A2F_HRDATAS_nxt <= A2F_HRDATAS; + + WB_CYC_O_nxt <= 1'b0; + WB_BYTE_STB_O_nxt <= 4'b0; + WB_WE_O_nxt <= 1'b0; + WB_RD_O_nxt <= 1'b0; + WB_STB_O_nxt <= 1'b0; + + FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= FABRIC_ASYNC_ACK_TOGGLE_O; + end + endcase + end + +endmodule + +`timescale 1ns / 10ps + +module ahb2fb_asynbrig ( + + // AHB Slave Interface to AHB Bus Matrix + // + A2F_HCLK, + A2F_HRESET, + + A2F_HADDRS, + A2F_HSEL, + A2F_HTRANSS, + A2F_HSIZES, + A2F_HWRITES, + A2F_HREADYS, + A2F_HWDATAS, + + A2F_HREADYOUTS, + A2F_HRESPS, + A2F_HRDATAS, + + // Fabric Wishbone Bus + // + WB_CLK_I, + WB_RST_I, + WB_DAT_I, + WB_ACK_I, + + WB_ADR_O, + WB_CYC_O, + WB_BYTE_STB_O, + WB_WE_O, + WB_RD_O, + WB_STB_O, + WB_DAT_O + + ); + + + //-----Port Parameters----------------- + // + + parameter ADDRWIDTH = 32; + parameter DATAWIDTH = 32; + parameter APERWIDTH = 17; + + + //-----Port Signals-------------------- + // + + input A2F_HCLK; // Clock + input A2F_HRESET; // Reset + + // AHB connection to master + // + input [ADDRWIDTH-1:0] A2F_HADDRS; + input A2F_HSEL; + input [1:0] A2F_HTRANSS; + input [2:0] A2F_HSIZES; + input A2F_HWRITES; + input A2F_HREADYS; + input [DATAWIDTH-1:0] A2F_HWDATAS; + + output A2F_HREADYOUTS; + output A2F_HRESPS; + output [DATAWIDTH-1:0] A2F_HRDATAS; + + // Wishbone connection to Fabric IP + // + input WB_CLK_I; // Fabric Clock Input from Fabric + input WB_RST_I; // Fabric Reset Input from Fabric + input [DATAWIDTH-1:0] WB_DAT_I; // Read Data Bus from Fabric + input WB_ACK_I; // Transfer Cycle Acknowledge from Fabric + + output [APERWIDTH-1:0] WB_ADR_O; // Address Bus to Fabric + output WB_CYC_O; // Cycle Chip Select to Fabric + output [3:0] WB_BYTE_STB_O; // Byte Select to Fabric + output WB_WE_O; // Write Enable to Fabric + output WB_RD_O; // Read Enable to Fabric + output WB_STB_O; // Strobe Signal to Fabric + output [DATAWIDTH-1:0] WB_DAT_O; // Write Data Bus to Fabric + + + wire A2F_HCLK; // Clock + wire A2F_HRESET; // Reset + + // AHB connection to master + // + wire [ADDRWIDTH-1:0] A2F_HADDRS; + wire A2F_HSEL; + wire [1:0] A2F_HTRANSS; + wire [2:0] A2F_HSIZES; + wire A2F_HWRITES; + wire A2F_HREADYS; + wire [DATAWIDTH-1:0] A2F_HWDATAS; + + wire A2F_HREADYOUTS; + wire A2F_HRESPS; + wire [DATAWIDTH-1:0] A2F_HRDATAS; + + + // Wishbone connection to Fabric IP + // + wire WB_CLK_I; // Fabric Clock Input from Fabric + wire WB_RST_I; // Fabric Reset Input from Fabric + wire [DATAWIDTH-1:0] WB_DAT_I; // Read Data Bus from Fabric + wire WB_ACK_I; // Transfer Cycle Acknowledge from Fabric + + wire [APERWIDTH-1:0] WB_ADR_O; // Address Bus (128KB) to Fabric + wire WB_CYC_O; // Cycle Chip Select to Fabric + wire [3:0] WB_BYTE_STB_O; // Byte Select to Fabric + wire WB_WE_O; // Write Enable to Fabric + wire WB_RD_O; // Read Enable to Fabric + wire WB_STB_O; // Strobe Signal to Fabric + wire [DATAWIDTH-1:0] WB_DAT_O; // Write Data Bus to Fabric + + + + //------Define Parameters--------- + // + + // + // None at this time + // + + + //-----Internal Signals-------------------- + // + + // Register module interface signals + wire [APERWIDTH-1:0] ahb_async_addr; + wire ahb_async_read_en; + wire ahb_async_write_en; + wire [3:0] ahb_async_byte_strobe; + + wire ahb_async_stb_toggle; + + wire fabric_async_ack_toggle; + + + //------Logic Operations---------- + // + + // Define the data input from the AHB and output to the fabric + // + // Note: Due to the nature of the bus timing, there is no need to register + // this value locally. + // + assign WB_DAT_O = A2F_HWDATAS; + + // Define the Address bus output from the AHB and output to the fabric + // + // Note: Due to the nature of the bus timing, there is no need to register + // this value locally. + // + assign WB_ADR_O = ahb_async_addr; + + + //------Instantiate Modules---------------- + // + + // Interface block to convert AHB transfers to simple read/write + // controls. + ahb2fb_asynbrig_if + #( + + .DATAWIDTH ( DATAWIDTH ), + .APERWIDTH ( APERWIDTH ) + + ) + u_FFE_ahb_to_fabric_async_bridge_interface + ( + .A2F_HCLK ( A2F_HCLK ), + .A2F_HRESET ( A2F_HRESET ), + + // Input slave port: 32 bit data bus interface + .A2F_HSEL ( A2F_HSEL ), + .A2F_HADDRS ( A2F_HADDRS[APERWIDTH-1:0] ), + .A2F_HTRANSS ( A2F_HTRANSS ), + .A2F_HSIZES ( A2F_HSIZES ), + .A2F_HWRITES ( A2F_HWRITES ), + .A2F_HREADYS ( A2F_HREADYS ), + + .A2F_HREADYOUTS ( A2F_HREADYOUTS ), + .A2F_HRESPS ( A2F_HRESPS ), + + // Register interface + .AHB_ASYNC_ADDR_O ( ahb_async_addr ), + .AHB_ASYNC_READ_EN_O ( ahb_async_read_en ), + .AHB_ASYNC_WRITE_EN_O ( ahb_async_write_en ), + .AHB_ASYNC_BYTE_STROBE_O ( ahb_async_byte_strobe ), + .AHB_ASYNC_STB_TOGGLE_O ( ahb_async_stb_toggle ), + + .FABRIC_ASYNC_ACK_TOGGLE_I (fabric_async_ack_toggle ) + + ); + + + fb2ahb_asynbrig_if +// #( +// ) + + u_FFE_fabric_to_ahb_async_bridge_interface + ( + .A2F_HRDATAS ( A2F_HRDATAS ), + + .AHB_ASYNC_READ_EN_I ( ahb_async_read_en ), + .AHB_ASYNC_WRITE_EN_I ( ahb_async_write_en ), + .AHB_ASYNC_BYTE_STROBE_I ( ahb_async_byte_strobe ), + .AHB_ASYNC_STB_TOGGLE_I ( ahb_async_stb_toggle ), + + .WB_CLK_I ( WB_CLK_I ), // Fabric Clock Input from Fabric + .WB_RST_I ( WB_RST_I ), // Fabric Reset Input from Fabric + .WB_ACK_I ( WB_ACK_I ), // Transfer Cycle Acknowledge from Fabric + .WB_DAT_I ( WB_DAT_I ), // Data Bus Input from Fabric + + .WB_CYC_O ( WB_CYC_O ), // Cycle Chip Select to Fabric + .WB_BYTE_STB_O ( WB_BYTE_STB_O ), // Byte Select to Fabric + .WB_WE_O ( WB_WE_O ), // Write Enable to Fabric + .WB_RD_O ( WB_RD_O ), // Read Enable to Fabric + .WB_STB_O ( WB_STB_O ), // Strobe Signal to Fabric + + .FABRIC_ASYNC_ACK_TOGGLE_O (fabric_async_ack_toggle ) + + ); +endmodule + + +`timescale 1ns/10ps +module qlal4s3b_cell_macro_bfm ( + + // AHB-To-Fabric Bridge + // + WBs_ADR, + WBs_CYC, + WBs_BYTE_STB, + WBs_WE, + WBs_RD, + WBs_STB, + WBs_WR_DAT, + WB_CLK, + WB_RST, + WBs_RD_DAT, + WBs_ACK, + // + // SDMA Signals + // + SDMA_Req, + SDMA_Sreq, + SDMA_Done, + SDMA_Active, + // + // FB Interrupts + // + FB_msg_out, + FB_Int_Clr, + FB_Start, + FB_Busy, + // + // FB Clocks + // + Sys_Clk0, + Sys_Clk0_Rst, + Sys_Clk1, + Sys_Clk1_Rst, + // + // Packet FIFO + // + Sys_PKfb_Clk, + Sys_PKfb_Rst, + FB_PKfbData, + FB_PKfbPush, + FB_PKfbSOF, + FB_PKfbEOF, + FB_PKfbOverflow, + // + // Sensor Interface + // + Sensor_Int, + TimeStamp, + // + // SPI Master APB Bus + // + Sys_Pclk, + Sys_Pclk_Rst, + Sys_PSel, + SPIm_Paddr, + SPIm_PEnable, + SPIm_PWrite, + SPIm_PWdata, + SPIm_Prdata, + SPIm_PReady, + SPIm_PSlvErr, + // + // Misc + // + Device_ID, + // + // FBIO Signals + // + FBIO_In, + FBIO_In_En, + FBIO_Out, + FBIO_Out_En, + // + // ??? + // + SFBIO, + Device_ID_6S, + Device_ID_4S, + SPIm_PWdata_26S, + SPIm_PWdata_24S, + SPIm_PWdata_14S, + SPIm_PWdata_11S, + SPIm_PWdata_0S, + SPIm_Paddr_8S, + SPIm_Paddr_6S, + FB_PKfbPush_1S, + FB_PKfbData_31S, + FB_PKfbData_21S, + FB_PKfbData_19S, + FB_PKfbData_9S, + FB_PKfbData_6S, + Sys_PKfb_ClkS, + FB_BusyS, + WB_CLKS + ); +//------Port Parameters---------------- +// + +// +// None at this time +// + +//------Port Signals------------------- +// + + // + // AHB-To-Fabric Bridge + // +output [16:0] WBs_ADR; +output WBs_CYC; +output [3:0] WBs_BYTE_STB; +output WBs_WE; +output WBs_RD; +output WBs_STB; +output [31:0] WBs_WR_DAT; +input WB_CLK; +output WB_RST; +input [31:0] WBs_RD_DAT; +input WBs_ACK; + // + // SDMA Signals + // +input [3:0] SDMA_Req; +input [3:0] SDMA_Sreq; +output [3:0] SDMA_Done; +output [3:0] SDMA_Active; + // + // FB Interrupts + // +input [3:0] FB_msg_out; +input [7:0] FB_Int_Clr; +output FB_Start; +input FB_Busy; + // + // FB Clocks + // +output Sys_Clk0; +output Sys_Clk0_Rst; +output Sys_Clk1; +output Sys_Clk1_Rst; + // + // Packet FIFO + // +input Sys_PKfb_Clk; +output Sys_PKfb_Rst; +input [31:0] FB_PKfbData; +input [3:0] FB_PKfbPush; +input FB_PKfbSOF; +input FB_PKfbEOF; +output FB_PKfbOverflow; + // + // Sensor Interface + // +output [7:0] Sensor_Int; +output [23:0] TimeStamp; + // + // SPI Master APB Bus + // +output Sys_Pclk; +output Sys_Pclk_Rst; +input Sys_PSel; +input [15:0] SPIm_Paddr; +input SPIm_PEnable; +input SPIm_PWrite; +input [31:0] SPIm_PWdata; +output [31:0] SPIm_Prdata; +output SPIm_PReady; +output SPIm_PSlvErr; + // + // Misc + // +input [15:0] Device_ID; + // + // FBIO Signals + // +output [13:0] FBIO_In; +input [13:0] FBIO_In_En; +input [13:0] FBIO_Out; +input [13:0] FBIO_Out_En; + // + // ??? + // +inout [13:0] SFBIO; +input Device_ID_6S; +input Device_ID_4S; +input SPIm_PWdata_26S; +input SPIm_PWdata_24S; +input SPIm_PWdata_14S; +input SPIm_PWdata_11S; +input SPIm_PWdata_0S; +input SPIm_Paddr_8S; +input SPIm_Paddr_6S; +input FB_PKfbPush_1S; +input FB_PKfbData_31S; +input FB_PKfbData_21S; +input FB_PKfbData_19S; +input FB_PKfbData_9S; +input FB_PKfbData_6S; +input Sys_PKfb_ClkS; +input FB_BusyS; +input WB_CLKS; + + +wire [16:0] WBs_ADR; +wire WBs_CYC; +wire [3:0] WBs_BYTE_STB; +wire WBs_WE; +wire WBs_RD; +wire WBs_STB; +wire [31:0] WBs_WR_DAT; +wire WB_CLK; +reg WB_RST; +wire [31:0] WBs_RD_DAT; +wire WBs_ACK; + +wire [3:0] SDMA_Req; +wire [3:0] SDMA_Sreq; +//reg [3:0] SDMA_Done;//SDMA BFM +//reg [3:0] SDMA_Active;//SDMA BFM +wire [3:0] SDMA_Done; +wire [3:0] SDMA_Active; + +wire [3:0] FB_msg_out; +wire [7:0] FB_Int_Clr; +reg FB_Start; +wire FB_Busy; + +wire Sys_Clk0; +reg Sys_Clk0_Rst; +wire Sys_Clk1; +reg Sys_Clk1_Rst; + +wire Sys_PKfb_Clk; +reg Sys_PKfb_Rst; +wire [31:0] FB_PKfbData; +wire [3:0] FB_PKfbPush; +wire FB_PKfbSOF; +wire FB_PKfbEOF; +reg FB_PKfbOverflow; + +reg [7:0] Sensor_Int; +reg [23:0] TimeStamp; + +reg Sys_Pclk; +reg Sys_Pclk_Rst; +wire Sys_PSel; + +wire [15:0] SPIm_Paddr; +wire SPIm_PEnable; +wire SPIm_PWrite; +wire [31:0] SPIm_PWdata; +reg [31:0] SPIm_Prdata; +reg SPIm_PReady; +reg SPIm_PSlvErr; + +wire [15:0] Device_ID; + +reg [13:0] FBIO_In; +wire [13:0] FBIO_In_En; +wire [13:0] FBIO_Out; +wire [13:0] FBIO_Out_En; + +wire [13:0] SFBIO; +wire Device_ID_6S; +wire Device_ID_4S; + +wire SPIm_PWdata_26S; +wire SPIm_PWdata_24S; +wire SPIm_PWdata_14S; +wire SPIm_PWdata_11S; +wire SPIm_PWdata_0S; +wire SPIm_Paddr_8S; +wire SPIm_Paddr_6S; + +wire FB_PKfbPush_1S; +wire FB_PKfbData_31S; +wire FB_PKfbData_21S; +wire FB_PKfbData_19S; +wire FB_PKfbData_9S; +wire FB_PKfbData_6S; +wire Sys_PKfb_ClkS; + +wire FB_BusyS; +wire WB_CLKS; + + +//------Define Parameters-------------- +// + +parameter ADDRWIDTH = 32; +parameter DATAWIDTH = 32; +parameter APERWIDTH = 17; + +parameter ENABLE_AHB_REG_WR_DEBUG_MSG = 1'b1; +parameter ENABLE_AHB_REG_RD_DEBUG_MSG = 1'b1; + +parameter T_CYCLE_CLK_SYS_CLK0 = 200;//230;//ACSLIPTEST-230;//100;//180;//(1000.0/(80.0/16)) ; // Default EOS S3B Clock Rate +parameter T_CYCLE_CLK_SYS_CLK1 = 650;//3906;//650;////83.33;//250;//30517;//(1000.0/(80.0/16)) ; // Default EOS S3B Clock Rate +parameter T_CYCLE_CLK_A2F_HCLK = (1000.0/(80.0/12)) ; // Default EOS S3B Clock Rate + +parameter SYS_CLK0_RESET_LOOP = 5;//4.34;//5; +parameter SYS_CLK1_RESET_LOOP = 5; +parameter WB_CLK_RESET_LOOP = 5; +parameter A2F_HCLK_RESET_LOOP = 5; + + +//------Internal Signals--------------- +// + +integer Sys_Clk0_Reset_Loop_Cnt; +integer Sys_Clk1_Reset_Loop_Cnt; +integer WB_CLK_Reset_Loop_Cnt; +integer A2F_HCLK_Reset_Loop_Cnt; + + +wire A2F_HCLK; +reg A2F_HRESET; + +wire [31:0] A2F_HADDRS; +wire A2F_HSEL; +wire [1:0] A2F_HTRANSS; +wire [2:0] A2F_HSIZES; +wire A2F_HWRITES; +wire A2F_HREADYS; +wire [31:0] A2F_HWDATAS; + +wire A2F_HREADYOUTS; +wire A2F_HRESPS; +wire [31:0] A2F_HRDATAS; + + +//------Logic Operations--------------- +// + +// Apply Reset to Sys_Clk0 domain +// +initial +begin + + Sys_Clk0_Rst <= 1'b1; +`ifndef YOSYS + for (Sys_Clk0_Reset_Loop_Cnt = 0; + Sys_Clk0_Reset_Loop_Cnt < SYS_CLK0_RESET_LOOP; + Sys_Clk0_Reset_Loop_Cnt = Sys_Clk0_Reset_Loop_Cnt + 1) + begin + wait (Sys_Clk0 == 1'b1) #1; + wait (Sys_Clk0 == 1'b0) #1; + end + + wait (Sys_Clk0 == 1'b1) #1; +`endif + Sys_Clk0_Rst <= 1'b0; + +end + +// Apply Reset to Sys_Clk1 domain +// +initial +begin + + Sys_Clk1_Rst <= 1'b1; +`ifndef YOSYS + for (Sys_Clk1_Reset_Loop_Cnt = 0; + Sys_Clk1_Reset_Loop_Cnt < SYS_CLK1_RESET_LOOP; + Sys_Clk1_Reset_Loop_Cnt = Sys_Clk1_Reset_Loop_Cnt + 1) + begin + wait (Sys_Clk1 == 1'b1) #1; + wait (Sys_Clk1 == 1'b0) #1; + end + + wait (Sys_Clk1 == 1'b1) #1; +`endif + Sys_Clk1_Rst <= 1'b0; + +end + +// Apply Reset to the Wishbone domain +// +// Note: In the ASSP, this reset is distict from the reset domains for Sys_Clk[1:0]. +// +initial +begin + + WB_RST <= 1'b1; +`ifndef YOSYS + for (WB_CLK_Reset_Loop_Cnt = 0; + WB_CLK_Reset_Loop_Cnt < WB_CLK_RESET_LOOP; + WB_CLK_Reset_Loop_Cnt = WB_CLK_Reset_Loop_Cnt + 1) + begin + wait (WB_CLK == 1'b1) #1; + wait (WB_CLK == 1'b0) #1; + end + + wait (WB_CLK == 1'b1) #1; +`endif + WB_RST <= 1'b0; + +end + +// Apply Reset to the AHB Bus domain +// +// Note: The AHB bus clock domain is separate from the Sys_Clk[1:0] domains +initial +begin + + A2F_HRESET <= 1'b1; +`ifndef YOSYS + for (A2F_HCLK_Reset_Loop_Cnt = 0; + A2F_HCLK_Reset_Loop_Cnt < A2F_HCLK_RESET_LOOP; + A2F_HCLK_Reset_Loop_Cnt = A2F_HCLK_Reset_Loop_Cnt + 1) + begin + wait (A2F_HCLK == 1'b1) #1; + wait (A2F_HCLK == 1'b0) #1; + end + + wait (A2F_HCLK == 1'b1) #1; +`endif + A2F_HRESET <= 1'b0; + +end + +// Initialize all outputs +// +// Note: These may be replaced in the future by BFMs as the become available. +// +// These registers allow test bench routines to drive these signals as needed. +// +initial +begin + + // + // SDMA Signals + // + //SDMA_Done <= 4'h0;//Added SDMA BFM + // SDMA_Active <= 4'h0;//Added SDMA BFM + + // + // FB Interrupts + // + FB_Start <= 1'b0; + + // + // Packet FIFO + // + Sys_PKfb_Rst <= 1'b0; + FB_PKfbOverflow <= 1'b0; + + // + // Sensor Interface + // + Sensor_Int <= 8'h0; + TimeStamp <= 24'h0; + + // + // SPI Master APB Bus + // + Sys_Pclk <= 1'b0; + Sys_Pclk_Rst <= 1'b0; + + SPIm_Prdata <= 32'h0; + SPIm_PReady <= 1'b0; + SPIm_PSlvErr <= 1'b0; + + // + // FBIO Signals + // + FBIO_In <= 14'h0; + +end + + +//------Instantiate Modules------------ +// + +ahb2fb_asynbrig + #( + .ADDRWIDTH ( ADDRWIDTH ), + .DATAWIDTH ( DATAWIDTH ), + .APERWIDTH ( APERWIDTH ) + ) + u_ffe_ahb_to_fabric_async_bridge + ( + // AHB Slave Interface to AHB Bus Matrix + // + .A2F_HCLK ( A2F_HCLK ), + .A2F_HRESET ( A2F_HRESET ), + + .A2F_HADDRS ( A2F_HADDRS ), + .A2F_HSEL ( A2F_HSEL ), + .A2F_HTRANSS ( A2F_HTRANSS ), + .A2F_HSIZES ( A2F_HSIZES ), + .A2F_HWRITES ( A2F_HWRITES ), + .A2F_HREADYS ( A2F_HREADYS ), + .A2F_HWDATAS ( A2F_HWDATAS ), + + .A2F_HREADYOUTS ( A2F_HREADYOUTS ), + .A2F_HRESPS ( A2F_HRESPS ), + .A2F_HRDATAS ( A2F_HRDATAS ), + + // Fabric Wishbone Bus + // + .WB_CLK_I ( WB_CLK ), + .WB_RST_I ( WB_RST ), + .WB_DAT_I ( WBs_RD_DAT ), + .WB_ACK_I ( WBs_ACK ), + + .WB_ADR_O ( WBs_ADR ), + .WB_CYC_O ( WBs_CYC ), + .WB_BYTE_STB_O ( WBs_BYTE_STB ), + .WB_WE_O ( WBs_WE ), + .WB_RD_O ( WBs_RD ), + .WB_STB_O ( WBs_STB ), + .WB_DAT_O ( WBs_WR_DAT ) + + ); + + +ahb_gen_bfm + #( + .ADDRWIDTH ( ADDRWIDTH ), + .DATAWIDTH ( DATAWIDTH ), + .DEFAULT_AHB_ADDRESS ( {(ADDRWIDTH){1'b1}} ), + .STD_CLK_DLY ( 2 ), + .ENABLE_AHB_REG_WR_DEBUG_MSG ( ENABLE_AHB_REG_WR_DEBUG_MSG ), + .ENABLE_AHB_REG_RD_DEBUG_MSG ( ENABLE_AHB_REG_RD_DEBUG_MSG ) + ) + u_ahb_gen_bfm + ( + // AHB Slave Interface to AHB Bus Matrix + // + .A2F_HCLK ( A2F_HCLK ), + .A2F_HRESET ( A2F_HRESET ), + + .A2F_HADDRS ( A2F_HADDRS ), + .A2F_HSEL ( A2F_HSEL ), + .A2F_HTRANSS ( A2F_HTRANSS ), + .A2F_HSIZES ( A2F_HSIZES ), + .A2F_HWRITES ( A2F_HWRITES ), + .A2F_HREADYS ( A2F_HREADYS ), + .A2F_HWDATAS ( A2F_HWDATAS ), + + .A2F_HREADYOUTS ( A2F_HREADYOUTS ), + .A2F_HRESPS ( A2F_HRESPS ), + .A2F_HRDATAS ( A2F_HRDATAS ) + + ); + +// Define the clock cycle times. +// +// Note: Values are calculated to output in units of nS. +// +oscillator_s1 #(.T_CYCLE_CLK (T_CYCLE_CLK_SYS_CLK0)) u_osc_sys_clk0 (.OSC_CLK_EN (1'b1), .OSC_CLK (Sys_Clk0)); +oscillator_s1 #(.T_CYCLE_CLK (T_CYCLE_CLK_SYS_CLK1)) u_osc_sys_clk1 (.OSC_CLK_EN (1'b1), .OSC_CLK (Sys_Clk1)); +oscillator_s1 #(.T_CYCLE_CLK (T_CYCLE_CLK_A2F_HCLK)) u_osc_a2f_hclk (.OSC_CLK_EN (1'b1), .OSC_CLK (A2F_HCLK)); + + +//SDMA bfm +sdma_bfm sdma_bfm_inst0 ( + .sdma_req_i ( SDMA_Req), + .sdma_sreq_i ( SDMA_Sreq), + .sdma_done_o ( SDMA_Done), + .sdma_active_o ( SDMA_Active) + ); + + + +endmodule /* qlal4s3b_cell_macro_bfm*/ + +(* keep *) +module qlal4s3b_cell_macro( + input WB_CLK, + input WBs_ACK, + input [31:0]WBs_RD_DAT, + output [3:0]WBs_BYTE_STB, + output WBs_CYC, + output WBs_WE, + output WBs_RD, + output WBs_STB, + output [16:0]WBs_ADR, + input [3:0]SDMA_Req, + input [3:0]SDMA_Sreq, + output [3:0]SDMA_Done, + output [3:0]SDMA_Active, + input [3:0]FB_msg_out, + input [7:0]FB_Int_Clr, + output FB_Start, + input FB_Busy, + output WB_RST, + output Sys_PKfb_Rst, + output Clk_C16, + output Clk_C16_Rst, + output Clk_C21, + output Clk_C21_Rst, + output Sys_Pclk, + output Sys_Pclk_Rst, + input Sys_PKfb_Clk, + input [31:0]FB_PKfbData, + output [31:0]WBs_WR_DAT, + input [3:0]FB_PKfbPush, + input FB_PKfbSOF, + input FB_PKfbEOF, + output [7:0]Sensor_Int, + output FB_PKfbOverflow, + output [23:0]TimeStamp, + input Sys_PSel, + input [15:0]SPIm_Paddr, + input SPIm_PEnable, + input SPIm_PWrite, + input [31:0]SPIm_PWdata, + output SPIm_PReady, + output SPIm_PSlvErr, + output [31:0]SPIm_Prdata, + input [15:0]Device_ID, + input [13:0]FBIO_In_En, + input [13:0]FBIO_Out, + input [13:0]FBIO_Out_En, + output [13:0]FBIO_In, + inout [13:0]SFBIO, + input Device_ID_6S, + input Device_ID_4S, + input SPIm_PWdata_26S, + input SPIm_PWdata_24S, + input SPIm_PWdata_14S, + input SPIm_PWdata_11S, + input SPIm_PWdata_0S, + input SPIm_Paddr_8S, + input SPIm_Paddr_6S, + input FB_PKfbPush_1S, + input FB_PKfbData_31S, + input FB_PKfbData_21S, + input FB_PKfbData_19S, + input FB_PKfbData_9S, + input FB_PKfbData_6S, + input Sys_PKfb_ClkS, + input FB_BusyS, + input WB_CLKS); + + +qlal4s3b_cell_macro_bfm u_ASSP_bfm_inst( + .WBs_ADR (WBs_ADR), + .WBs_CYC (WBs_CYC), + .WBs_BYTE_STB(WBs_BYTE_STB), + .WBs_WE (WBs_WE), + .WBs_RD (WBs_RD), + .WBs_STB (WBs_STB), + .WBs_WR_DAT (WBs_WR_DAT), + .WB_CLK (WB_CLK), + .WB_RST (WB_RST), + .WBs_RD_DAT (WBs_RD_DAT), + .WBs_ACK (WBs_ACK), + // + // SDMA Signals + // + .SDMA_Req (SDMA_Req), + .SDMA_Sreq (SDMA_Sreq), + .SDMA_Done (SDMA_Done), + .SDMA_Active (SDMA_Active), + // + // FB Interrupts + // + .FB_msg_out (FB_msg_out), + .FB_Int_Clr (FB_Int_Clr), + .FB_Start (FB_Start), + .FB_Busy (FB_Busy), + // + // FB Clocks + // + .Sys_Clk0 (Clk_C16), + .Sys_Clk0_Rst (Clk_C16_Rst), + .Sys_Clk1 (Clk_C21), + .Sys_Clk1_Rst (Clk_C21_Rst), + // + // Packet FIFO + // + .Sys_PKfb_Clk (Sys_PKfb_Clk), + .Sys_PKfb_Rst (Sys_PKfb_Rst), + .FB_PKfbData (FB_PKfbData), + .FB_PKfbPush (FB_PKfbPush), + .FB_PKfbSOF (FB_PKfbSOF), + .FB_PKfbEOF (FB_PKfbEOF), + .FB_PKfbOverflow (FB_PKfbOverflow), + // + // Sensor Interface + // + .Sensor_Int (Sensor_Int), + .TimeStamp (TimeStamp), + // + // SPI Master APB Bus + // + .Sys_Pclk (Sys_Pclk), + .Sys_Pclk_Rst (Sys_Pclk_Rst), + .Sys_PSel (Sys_PSel), + .SPIm_Paddr (SPIm_Paddr), + .SPIm_PEnable (SPIm_PEnable), + .SPIm_PWrite (SPIm_PWrite), + .SPIm_PWdata (SPIm_PWdata), + .SPIm_Prdata (SPIm_Prdata), + .SPIm_PReady (SPIm_PReady), + .SPIm_PSlvErr (SPIm_PSlvErr), + // + // Misc + // + .Device_ID (Device_ID), + // + // FBIO Signals + // + .FBIO_In (FBIO_In), + .FBIO_In_En (FBIO_In_En), + .FBIO_Out (FBIO_Out), + .FBIO_Out_En (FBIO_Out_En), + // + // ??? + // + .SFBIO (SFBIO), + .Device_ID_6S (Device_ID_6S), + .Device_ID_4S (Device_ID_4S), + .SPIm_PWdata_26S (SPIm_PWdata_26S), + .SPIm_PWdata_24S (SPIm_PWdata_24S), + .SPIm_PWdata_14S (SPIm_PWdata_14S), + .SPIm_PWdata_11S (SPIm_PWdata_11S), + .SPIm_PWdata_0S (SPIm_PWdata_0S), + .SPIm_Paddr_8S (SPIm_Paddr_8S), + .SPIm_Paddr_6S (SPIm_Paddr_6S), + .FB_PKfbPush_1S (FB_PKfbPush_1S), + .FB_PKfbData_31S (FB_PKfbData_31S), + .FB_PKfbData_21S (FB_PKfbData_21S), + .FB_PKfbData_19S (FB_PKfbData_19S), + .FB_PKfbData_9S (FB_PKfbData_9S), + .FB_PKfbData_6S (FB_PKfbData_6S), + .Sys_PKfb_ClkS (Sys_PKfb_ClkS), + .FB_BusyS (FB_BusyS), + .WB_CLKS (WB_CLKS) + ); + +endmodule /* qlal4s3b_cell_macro */ + + +(* keep *) +module gpio_cell_macro ( + + ESEL, + IE, + OSEL, + OQI, + OQE, + DS, + FIXHOLD, + IZ, + IQZ, + IQE, + IQC, + IQCS, + IQR, + WPD, + INEN, + IP + ); + +input ESEL; +input IE; +input OSEL; +input OQI; +input OQE; +input DS; +input FIXHOLD; +output IZ; +output IQZ; +input IQE; +input IQC; +input IQCS; +input INEN; +input IQR; +input WPD; +inout IP; + +reg EN_reg, OQ_reg, IQZ; +wire AND_OUT; + +assign rstn = ~IQR; +assign IQCP = IQCS ? ~IQC : IQC; + +always @(posedge IQCP or negedge rstn) + if (~rstn) + EN_reg <= 1'b0; + else + EN_reg <= IE; + +always @(posedge IQCP or negedge rstn) + if (~rstn) + OQ_reg <= 1'b0; + else + if (OQE) + OQ_reg <= OQI; + + +always @(posedge IQCP or negedge rstn) + if (~rstn) + IQZ <= 1'b0; + else + if (IQE) + IQZ <= AND_OUT; + +assign IZ = AND_OUT; + +assign AND_OUT = INEN ? IP : 1'b0; + +assign EN = ESEL ? IE : EN_reg ; + +assign OQ = OSEL ? OQI : OQ_reg ; + +assign IP = EN ? OQ : 1'bz; + +endmodule + + From 18b9e08dedb6cd6aa11bc462ae1cb2c22a426ca9 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Jun 2021 13:51:28 +0200 Subject: [PATCH 347/845] Fixed bugs / added warning prints to PP3 BRAM initialization pass, added test for PP3 BRAM inference and initialization Signed-off-by: Maciej Kurc --- ql-qlf-plugin/pp3/pp3_brams_map.v | 14 +-- ql-qlf-plugin/pp3_braminit.cc | 11 +- ql-qlf-plugin/tests/Makefile | 4 +- ql-qlf-plugin/tests/pp3_bram/init.txt | 6 + ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl | 47 ++++++++ ql-qlf-plugin/tests/pp3_bram/pp3_bram.v | 129 ++++++++++++++++++++++ 6 files changed, 201 insertions(+), 10 deletions(-) create mode 100644 ql-qlf-plugin/tests/pp3_bram/init.txt create mode 100644 ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl create mode 100644 ql-qlf-plugin/tests/pp3_bram/pp3_bram.v diff --git a/ql-qlf-plugin/pp3/pp3_brams_map.v b/ql-qlf-plugin/pp3/pp3_brams_map.v index 60422e1bf..70383336e 100644 --- a/ql-qlf-plugin/pp3/pp3_brams_map.v +++ b/ql-qlf-plugin/pp3/pp3_brams_map.v @@ -463,8 +463,8 @@ generate endgenerate ram8k_2x1_cell_macro # ( - `include "pp3_bram_init_8_16.vh" - ) + .INIT(INIT) + ) _TECHMAP_REPLACE_ ( .A1_0(addr_wr0) , .A1_1(addr_wr1), @@ -666,8 +666,8 @@ generate if (data_width_int <=16) begin ram8k_2x1_cell_macro # ( - `include "pp3_bram_init_32.vh" - ) + .INIT(INIT) + ) _TECHMAP_REPLACE_ ( .A1_0(addr_wr0) , .A1_1(addr_wr1), @@ -741,9 +741,9 @@ generate end else if (data_width_int > 16) begin - ram8k_2x1_cell_macro # ( - `include "pp3_bram_init_32.vh" - ) + ram8k_2x1_cell_macro # ( + .INIT(INIT) + ) _TECHMAP_REPLACE_ ( .A1_0(addr_wr0) , .A1_1(addr_wr1), diff --git a/ql-qlf-plugin/pp3_braminit.cc b/ql-qlf-plugin/pp3_braminit.cc index f521fa16b..eb6362bcb 100644 --- a/ql-qlf-plugin/pp3_braminit.cc +++ b/ql-qlf-plugin/pp3_braminit.cc @@ -120,10 +120,17 @@ static void run_pp3_braminit(Module *module) } } + // TODO: Support RAM initialization for other widths than 8, 16 and 32 + if (ramDataWidth != 8 && ramDataWidth != 16 && ramDataWidth != 32) { + log("WARNING: The RAM cell '%s' has data width of %d. Initialization of this width from a file is not supported yet!\n", + RTLIL::id2cstr(cell->name), ramDataWidth + ); + continue; + } + /* Set attributes */ std::string val = ""; for (int i=ramDataDepth-1; i>=0; i--) { - //std::string val = ""; if (ramDataWidth == 8) val += std::bitset<8>(mem[i]).to_string(); else if (ramDataWidth == 16) @@ -131,7 +138,7 @@ static void run_pp3_braminit(Module *module) else if (ramDataWidth == 32) val += std::bitset<32>(mem[i]).to_string(); } - cell->setParam("\\INIT", RTLIL::Const::from_string(val)); + cell->setParam(RTLIL::escape_id("INIT"), RTLIL::Const::from_string(val)); } } diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 0fb557223..12fab91d0 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -19,7 +19,8 @@ TESTS = consts \ logic \ mux \ tribuf \ - fsm #\ + fsm \ + pp3_bram #\ # qlf_k6n10_bram \ include $(shell pwd)/../../Makefile_test.common @@ -36,4 +37,5 @@ logic_verify = true mux_verify = true tribuf_verify = true fsm_verify = true +pp3_bram_verify = true #qlf_k6n10_bram_verify = true diff --git a/ql-qlf-plugin/tests/pp3_bram/init.txt b/ql-qlf-plugin/tests/pp3_bram/init.txt new file mode 100644 index 000000000..9d8fb6f10 --- /dev/null +++ b/ql-qlf-plugin/tests/pp3_bram/init.txt @@ -0,0 +1,6 @@ +@000 +1234 +5678 +ABCD +EFFF + diff --git a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl new file mode 100644 index 000000000..8c9dde19e --- /dev/null +++ b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl @@ -0,0 +1,47 @@ +yosys -import +if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +design -load read +synth_quicklogic -family pp3 -top top_bram_9_16 +yosys cd top_bram_9_16 +stat +select -assert-count 1 t:ckpad +select -assert-count 35 t:inpad +select -assert-count 16 t:outpad +select -assert-count 1 t:ram8k_2x1_cell_macro + +design -load read +synth_quicklogic -family pp3 -top top_bram_9_32 +yosys cd top_bram_9_32 +stat +select -assert-count 1 t:ckpad +select -assert-count 51 t:inpad +select -assert-count 32 t:outpad +select -assert-count 1 t:ram8k_2x1_cell_macro + +design -load read +synth_quicklogic -family pp3 -top top_bram_10_16 +yosys cd top_bram_10_16 +stat +select -assert-count 1 t:ckpad +select -assert-count 37 t:inpad +select -assert-count 16 t:outpad +select -assert-count 1 t:ram8k_2x1_cell_macro + +# BRAM initialization from file using pp3_braminig pass test +design -load read +synth_quicklogic -family pp3 -top top_bram_init +yosys cd top_bram_init +stat +select -assert-count 1 t:ckpad +select -assert-count 39 t:inpad +select -assert-count 18 t:outpad +select -assert-count 1 t:ram8k_2x1_cell_macro + +set INIT 8192'h0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000efffabcd56781234 +select -assert-count 1 t:ram8k_2x1_cell_macro r:INIT=$INIT \%i + diff --git a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v new file mode 100644 index 000000000..b7cd54bfa --- /dev/null +++ b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v @@ -0,0 +1,129 @@ +module my_ram (CLK, WADR, WDAT, WEN, RADR, RDAT, REN); + + parameter DBITS = 36; + parameter ABITS = 9; + + input wire CLK; + + input wire [ABITS-1:0] WADR; + input wire [DBITS-1:0] WDAT; + input wire WEN; + + input wire [ABITS-1:0] RADR; + output reg [DBITS-1:0] RDAT; + input wire REN; + + localparam SIZE = 1 << ABITS; + reg [DBITS-1:0] mem[0:SIZE-1]; + + always @(posedge CLK) begin + if (WEN) mem[WADR] <= WDAT; + end + + always @(posedge CLK) begin + RDAT <= mem[RADR]; + end + +endmodule + +// ============================================================================ + +module top_bram_9_16 (CLK, WADR, WDAT, WEN, RADR, RDAT); + + input wire CLK; + + input wire [8 :0] WADR; + input wire [15:0] WDAT; + input wire WEN; + + input wire [8 :0] RADR; + output wire [15:0] RDAT; + + my_ram #(.DBITS(16), .ABITS(9)) the_ram ( + .CLK (CLK), + .WADR (WADR), + .WDAT (WDAT), + .WEN (WEN), + .RADR (RADR), + .RDAT (RDAT), + .REN (1'b0) + ); + +endmodule + +module top_bram_9_32 (CLK, WADR, WDAT, WEN, RADR, RDAT); + + input wire CLK; + + input wire [8 :0] WADR; + input wire [31:0] WDAT; + input wire WEN; + + input wire [8 :0] RADR; + output wire [31:0] RDAT; + + my_ram #(.DBITS(32), .ABITS(9)) the_ram ( + .CLK (CLK), + .WADR (WADR), + .WDAT (WDAT), + .WEN (WEN), + .RADR (RADR), + .RDAT (RDAT), + .REN (1'b0) + ); + +endmodule + +module top_bram_10_16 (CLK, WADR, WDAT, WEN, RADR, RDAT); + + input wire CLK; + + input wire [9 :0] WADR; + input wire [15:0] WDAT; + input wire WEN; + + input wire [9 :0] RADR; + output wire [15:0] RDAT; + + my_ram #(.DBITS(16), .ABITS(10)) the_ram ( + .CLK (CLK), + .WADR (WADR), + .WDAT (WDAT), + .WEN (WEN), + .RADR (RADR), + .RDAT (RDAT), + .REN (1'b0) + ); + +endmodule + +module top_bram_init (CLK, WADR, WDAT, WEN, RADR, RDAT); + + input wire CLK; + + input wire [9 :0] WADR; + input wire [17:0] WDAT; + input wire WEN; + + input wire [9 :0] RADR; + output wire [17:0] RDAT; + + RAM_8K_BLK # ( + .INIT_FILE ("init.txt"), + .addr_int (9), + .data_depth_int (1 << 9), + .data_width_int (16) + ) the_ram ( + .WClk (CLK), + .RClk (CLK), + .WClk_En (1'b1), + .RClk_En (1'b1), + .WA (WADR), + .WD (WDAT), + .WEN (WEN), + .RA (RADR), + .RD (RDAT) + ); + +endmodule + From 1567e43b180922ca111188ab79cf7476b6ee1426 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Jun 2021 14:12:40 +0200 Subject: [PATCH 348/845] C Code formatting Signed-off-by: Maciej Kurc --- ql-qlf-plugin/pp3_braminit.cc | 237 ++++++++++++++---------------- ql-qlf-plugin/synth_quicklogic.cc | 57 ++++--- 2 files changed, 142 insertions(+), 152 deletions(-) diff --git a/ql-qlf-plugin/pp3_braminit.cc b/ql-qlf-plugin/pp3_braminit.cc index eb6362bcb..7ee3dd01c 100644 --- a/ql-qlf-plugin/pp3_braminit.cc +++ b/ql-qlf-plugin/pp3_braminit.cc @@ -17,152 +17,143 @@ * */ -#include "kernel/yosys.h" #include "kernel/sigtools.h" -#include -#include +#include "kernel/yosys.h" #include +#include +#include USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN static void run_pp3_braminit(Module *module) { - for (auto cell : module->selected_cells()) - { - uint32_t mem[2048]; + for (auto cell : module->selected_cells()) { + uint32_t mem[2048]; int32_t ramDataWidth = 32; int32_t ramDataDepth = 512; log("cell type %s\n", RTLIL::id2cstr(cell->name)); - /* Only consider cells we're interested in */ - if (cell->type != ID(RAM_16K_BLK) && - cell->type != ID(RAM_8K_BLK)) - continue; - log("found ram block\n"); - if (!cell->hasParam(ID(INIT_FILE))) - continue; - std::string init_file = cell->getParam(ID(INIT_FILE)).decode_string(); - cell->unsetParam(ID(INIT_FILE)); - if (init_file == "") - continue; - - /* Open file */ - log("Processing %s : %s\n", RTLIL::id2cstr(cell->name), init_file.c_str()); - ramDataWidth = cell->getParam(ID(data_width_int)).as_int(); - ramDataDepth = cell->getParam(ID(data_depth_int)).as_int(); - - std::ifstream f; - f.open(init_file.c_str()); - if (f.fail()) { - log("Can not open file `%s`.\n", init_file.c_str()); - continue; - } - - /* Defaults to 0 */ - memset(mem, 0x00, sizeof(mem)); - - /* Process each line */ - bool in_comment = false; - int cursor = 0; - - while (!f.eof()) - { - std::string line, token; - std::getline(f, line); - - for (int i = 0; i < GetSize(line); i++) - { - if (in_comment && line.compare(i, 2, "*/") == 0) { - line[i] = ' '; - line[i+1] = ' '; - in_comment = false; - continue; - } - if (!in_comment && line.compare(i, 2, "/*") == 0) - in_comment = true; - if (in_comment) - line[i] = ' '; - } - - while (1) - { - bool set_cursor = false; - long value; - - token = next_token(line, " \t\r\n"); - if (token.empty() || token.compare(0, 2, "//") == 0) - break; - - if (token[0] == '@') { - token = token.substr(1); - set_cursor = true; - } - - const char *nptr = token.c_str(); - char *endptr; - value = strtol(nptr, &endptr, 16); - if (!*nptr || *endptr) { - log("Can not parse %s `%s` for %s.\n", - set_cursor ? "address" : "value", - nptr, token.c_str() - ); - continue; - } - - if (set_cursor) - cursor = value; - else if (cursor >= 0 && cursor < ramDataDepth) - mem[cursor++] = value; - else - log("Attempt to initialize non existent address %d\n", cursor); - } - } + /* Only consider cells we're interested in */ + if (cell->type != ID(RAM_16K_BLK) && cell->type != ID(RAM_8K_BLK)) + continue; + log("found ram block\n"); + if (!cell->hasParam(ID(INIT_FILE))) + continue; + std::string init_file = cell->getParam(ID(INIT_FILE)).decode_string(); + cell->unsetParam(ID(INIT_FILE)); + if (init_file == "") + continue; + + /* Open file */ + log("Processing %s : %s\n", RTLIL::id2cstr(cell->name), init_file.c_str()); + ramDataWidth = cell->getParam(ID(data_width_int)).as_int(); + ramDataDepth = cell->getParam(ID(data_depth_int)).as_int(); + + std::ifstream f; + f.open(init_file.c_str()); + if (f.fail()) { + log("Can not open file `%s`.\n", init_file.c_str()); + continue; + } + + /* Defaults to 0 */ + memset(mem, 0x00, sizeof(mem)); + + /* Process each line */ + bool in_comment = false; + int cursor = 0; + + while (!f.eof()) { + std::string line, token; + std::getline(f, line); + + for (int i = 0; i < GetSize(line); i++) { + if (in_comment && line.compare(i, 2, "*/") == 0) { + line[i] = ' '; + line[i + 1] = ' '; + in_comment = false; + continue; + } + if (!in_comment && line.compare(i, 2, "/*") == 0) + in_comment = true; + if (in_comment) + line[i] = ' '; + } + + while (1) { + bool set_cursor = false; + long value; + + token = next_token(line, " \t\r\n"); + if (token.empty() || token.compare(0, 2, "//") == 0) + break; + + if (token[0] == '@') { + token = token.substr(1); + set_cursor = true; + } + + const char *nptr = token.c_str(); + char *endptr; + value = strtol(nptr, &endptr, 16); + if (!*nptr || *endptr) { + log("Can not parse %s `%s` for %s.\n", set_cursor ? "address" : "value", nptr, token.c_str()); + continue; + } + + if (set_cursor) + cursor = value; + else if (cursor >= 0 && cursor < ramDataDepth) + mem[cursor++] = value; + else + log("Attempt to initialize non existent address %d\n", cursor); + } + } // TODO: Support RAM initialization for other widths than 8, 16 and 32 if (ramDataWidth != 8 && ramDataWidth != 16 && ramDataWidth != 32) { log("WARNING: The RAM cell '%s' has data width of %d. Initialization of this width from a file is not supported yet!\n", - RTLIL::id2cstr(cell->name), ramDataWidth - ); + RTLIL::id2cstr(cell->name), ramDataWidth); continue; } - /* Set attributes */ - std::string val = ""; - for (int i=ramDataDepth-1; i>=0; i--) { - if (ramDataWidth == 8) - val += std::bitset<8>(mem[i]).to_string(); - else if (ramDataWidth == 16) - val += std::bitset<16>(mem[i]).to_string(); - else if (ramDataWidth == 32) - val += std::bitset<32>(mem[i]).to_string(); - } - cell->setParam(RTLIL::escape_id("INIT"), RTLIL::Const::from_string(val)); - } + /* Set attributes */ + std::string val = ""; + for (int i = ramDataDepth - 1; i >= 0; i--) { + if (ramDataWidth == 8) + val += std::bitset<8>(mem[i]).to_string(); + else if (ramDataWidth == 16) + val += std::bitset<16>(mem[i]).to_string(); + else if (ramDataWidth == 32) + val += std::bitset<32>(mem[i]).to_string(); + } + cell->setParam(RTLIL::escape_id("INIT"), RTLIL::Const::from_string(val)); + } } struct PP3BRAMInitPass : public Pass { - PP3BRAMInitPass() : Pass("pp3_braminit", "PP3: perform RAM Block initialization from file") { } - void help() override - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" pp3_braminit\n"); - log("\n"); - log("This command processes all PP3 RAM blocks with a non-empty INIT_FILE\n"); - log("parameter and converts it into the required INIT attributes\n"); - log("\n"); - } - void execute(std::vector args, RTLIL::Design *design) override - { - log_header(design, "Executing PP3_BRAMINIT pass.\n"); - - extra_args(args, 1, design); - - for (auto module : design->selected_modules()) - run_pp3_braminit(module); - } + PP3BRAMInitPass() : Pass("pp3_braminit", "PP3: perform RAM Block initialization from file") {} + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" pp3_braminit\n"); + log("\n"); + log("This command processes all PP3 RAM blocks with a non-empty INIT_FILE\n"); + log("parameter and converts it into the required INIT attributes\n"); + log("\n"); + } + void execute(std::vector args, RTLIL::Design *design) override + { + log_header(design, "Executing PP3_BRAMINIT pass.\n"); + + extra_args(args, 1, design); + + for (auto module : design->selected_modules()) + run_pp3_braminit(module); + } } PP3BRAMInitPass; PRIVATE_NAMESPACE_END diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 1130f17d1..07d760391 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -165,17 +165,17 @@ struct SynthQuickLogicPass : public ScriptPass { if (!design->full_selection()) log_cmd_error("This command only operates on fully selected designs!\n"); - if (family != "pp3" && family != "qlf_k4n8" && family != "qlf_k6n10") - log_cmd_error("Invalid family specified: '%s'\n", family.c_str()); + if (family != "pp3" && family != "qlf_k4n8" && family != "qlf_k6n10") + log_cmd_error("Invalid family specified: '%s'\n", family.c_str()); if (family != "pp3") { abc9 = false; } - if (abc9 && design->scratchpad_get_int("abc9.D", 0) == 0) { - log_warning("delay target has not been set via SDC or scratchpad; assuming 12 MHz clock.\n"); - design->scratchpad_set_int("abc9.D", 41667); // 12MHz = 83.33.. ns; divided by two to allow for interconnect delay. - } + if (abc9 && design->scratchpad_get_int("abc9.D", 0) == 0) { + log_warning("delay target has not been set via SDC or scratchpad; assuming 12 MHz clock.\n"); + design->scratchpad_set_int("abc9.D", 41667); // 12MHz = 83.33.. ns; divided by two to allow for interconnect delay. + } log_header(design, "Executing SYNTH_QUICKLOGIC pass.\n"); log_push(); @@ -233,11 +233,11 @@ struct SynthQuickLogicPass : public ScriptPass { run("chtype -set $mul t:$__soft_mul", "(if -no_dsp)"); } - run("techmap -map +/cmp2lut.v -D LUT_WIDTH=4"); - run("opt_expr"); - run("opt_clean"); + run("techmap -map +/cmp2lut.v -D LUT_WIDTH=4"); + run("opt_expr"); + run("opt_clean"); run("alumacc"); - run("pmuxtree"); + run("pmuxtree"); run("opt"); run("memory -nomap"); run("opt_clean"); @@ -267,7 +267,7 @@ struct SynthQuickLogicPass : public ScriptPass { } run("opt -fast"); if (family == "pp3") { - run("muxcover -mux8 -mux4"); + run("muxcover -mux8 -mux4"); } run("opt_expr"); run("opt_merge"); @@ -276,28 +276,26 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_ffs")) { - run("opt_expr"); + run("opt_expr"); if (family == "qlf_k4n8") { run("shregmap -minlen 8 -maxlen 8"); run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); - } - else if (family == "qlf_k6n10") { + } else if (family == "qlf_k6n10") { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_PP?_ 0 -cell $_DFFE_PP?P_ 0 -cell $_DFFSR_PPP_ 0 -cell $_DFFSRE_PPPP_ 0 -cell " "$_DLATCHSR_PPP_ 0"); // In case we add clock inversion in the future. // run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_DFFSR_?PP_ 0 -cell $_DFFSRE_?PPP_ 0 -cell // $_DLATCH_SRPPP_ 0"); - } - else if (family == "pp3") { - run("dfflegalize -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_?_ x"); - run("techmap -map +/quicklogic/" + family + "_cells_map.v"); + } else if (family == "pp3") { + run("dfflegalize -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_?_ x"); + run("techmap -map +/quicklogic/" + family + "_cells_map.v"); } std::string techMapArgs = " -map +/techmap.v -map +/quicklogic/" + family + "_ffs_map.v"; if (!noffmap) { run("techmap " + techMapArgs); } if (family == "pp3") { - run("opt_expr -mux_undef"); + run("opt_expr -mux_undef"); } run("opt_merge"); run("opt_clean"); @@ -321,10 +319,11 @@ struct SynthQuickLogicPass : public ScriptPass { std::string lutDefs = "+/quicklogic/" + family + "_lutdefs.txt"; rewrite_filename(lutDefs); - std::string abcArgs = "+read_lut," + lutDefs + ";" - "strash;ifraig;scorr;dc2;dretime;strash;dch,-f;if;mfs2;" // Common Yosys ABC script - "sweep;eliminate;if;mfs;lutpack;" // Optimization script - "dress"; // "dress" to preserve names + std::string abcArgs = "+read_lut," + lutDefs + + ";" + "strash;ifraig;scorr;dc2;dretime;strash;dch,-f;if;mfs2;" // Common Yosys ABC script + "sweep;eliminate;if;mfs;lutpack;" // Optimization script + "dress"; // "dress" to preserve names run("abc -script " + abcArgs); } @@ -348,21 +347,21 @@ struct SynthQuickLogicPass : public ScriptPass { run("check -noinit"); } - if (check_label("iomap") && family == "pp3") { - run("clkbufmap -inpad ckpad Q:P"); - run("iopadmap -bits -outpad outpad A:P -inpad inpad Q:P -tinoutpad bipad EN:Q:A:P A:top"); - } + if (check_label("iomap") && family == "pp3") { + run("clkbufmap -inpad ckpad Q:P"); + run("iopadmap -bits -outpad outpad A:P -inpad inpad Q:P -tinoutpad bipad EN:Q:A:P A:top"); + } if (check_label("finalize")) { if (family == "pp3") { - run("setundef -zero -params -undriven"); + run("setundef -zero -params -undriven"); } if (family == "pp3" || (check_label("edif") && (!edif_file.empty()))) { run("hilomap -hicell logic_1 A -locell logic_0 A -singleton A:top"); } run("opt_clean -purge"); run("check"); - run("blackbox =A:whitebox"); + run("blackbox =A:whitebox"); } if (check_label("edif") && (!edif_file.empty())) { From 43b2cc8f56936e2c8c83f0d19718d17aaf1d90af Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Jun 2021 18:06:18 +0200 Subject: [PATCH 349/845] Added license headers Signed-off-by: Maciej Kurc --- ql-qlf-plugin/pp3/pp3_abc9_map.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_abc9_model.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_abc9_unmap.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_brams_map.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_brams_sim.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_cells_map.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_cells_sim.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_ffs_map.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_latches_map.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_lut_map.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_mult_sim.v | 8 ++++++++ ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v | 8 ++++++++ ql-qlf-plugin/tests/consts/consts.v | 8 ++++++++ ql-qlf-plugin/tests/fsm/fsm.v | 10 +++++++++- ql-qlf-plugin/tests/mux/mux.v | 8 ++++++++ ql-qlf-plugin/tests/pp3_bram/pp3_bram.v | 8 ++++++++ ql-qlf-plugin/tests/tribuf/tribuf.v | 8 ++++++++ 17 files changed, 137 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/pp3/pp3_abc9_map.v b/ql-qlf-plugin/pp3/pp3_abc9_map.v index 46c11d675..69b2fb316 100644 --- a/ql-qlf-plugin/pp3/pp3_abc9_map.v +++ b/ql-qlf-plugin/pp3/pp3_abc9_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + // This file exists to map purely-synchronous flops to ABC9 flops, while // mapping flops with asynchronous-set/clear as boxes, this is because ABC9 // doesn't support asynchronous-set/clear flops in sequential synthesis. diff --git a/ql-qlf-plugin/pp3/pp3_abc9_model.v b/ql-qlf-plugin/pp3/pp3_abc9_model.v index 06d4a2a56..6140f97c1 100644 --- a/ql-qlf-plugin/pp3/pp3_abc9_model.v +++ b/ql-qlf-plugin/pp3/pp3_abc9_model.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* abc9_flop, lib_whitebox *) module $__PP3_DFFEPC_SYNCONLY ( output Q, diff --git a/ql-qlf-plugin/pp3/pp3_abc9_unmap.v b/ql-qlf-plugin/pp3/pp3_abc9_unmap.v index 1681e01bb..ce5e2eac4 100644 --- a/ql-qlf-plugin/pp3/pp3_abc9_unmap.v +++ b/ql-qlf-plugin/pp3/pp3_abc9_unmap.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// + +// SPDX-License-Identifier:ISC module $__PP3_DFFEPC_SYNCONLY ( output Q, input D, diff --git a/ql-qlf-plugin/pp3/pp3_brams_map.v b/ql-qlf-plugin/pp3/pp3_brams_map.v index 70383336e..55a7baa3f 100644 --- a/ql-qlf-plugin/pp3/pp3_brams_map.v +++ b/ql-qlf-plugin/pp3/pp3_brams_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module \$__QUICKLOGIC_RAMB16K (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); parameter CFG_ABITS = 9; parameter CFG_DBITS = 36; diff --git a/ql-qlf-plugin/pp3/pp3_brams_sim.v b/ql-qlf-plugin/pp3/pp3_brams_sim.v index a5bc4a621..d39276365 100644 --- a/ql-qlf-plugin/pp3/pp3_brams_sim.v +++ b/ql-qlf-plugin/pp3/pp3_brams_sim.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + `timescale 1ns/10ps module fifo_controller_model( Rst_n, diff --git a/ql-qlf-plugin/pp3/pp3_cells_map.v b/ql-qlf-plugin/pp3/pp3_cells_map.v index 10e270d4e..c627fe7f9 100644 --- a/ql-qlf-plugin/pp3/pp3_cells_map.v +++ b/ql-qlf-plugin/pp3/pp3_cells_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module \$_MUX8_ ( A, B, C, D, E, F, G, H, S, T, U, Y ); diff --git a/ql-qlf-plugin/pp3/pp3_cells_sim.v b/ql-qlf-plugin/pp3/pp3_cells_sim.v index 37c178855..646b50b11 100644 --- a/ql-qlf-plugin/pp3/pp3_cells_sim.v +++ b/ql-qlf-plugin/pp3/pp3_cells_sim.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module inv ( output Q, input A diff --git a/ql-qlf-plugin/pp3/pp3_ffs_map.v b/ql-qlf-plugin/pp3/pp3_ffs_map.v index 73ba6c9c8..b11cc6f93 100644 --- a/ql-qlf-plugin/pp3/pp3_ffs_map.v +++ b/ql-qlf-plugin/pp3/pp3_ffs_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module \$_DFFSRE_PPPP_ (input C, S, R, E, D, output Q); wire _TECHMAP_REMOVEINIT_Q_ = 1; dffepc #(.INIT(1'b0)) _TECHMAP_REPLACE_ (.CLK(C), .PRE(S), .CLR(R), .EN(E), .D(D), .Q(Q)); diff --git a/ql-qlf-plugin/pp3/pp3_latches_map.v b/ql-qlf-plugin/pp3/pp3_latches_map.v index 240a3fb4e..740e9a3c7 100644 --- a/ql-qlf-plugin/pp3/pp3_latches_map.v +++ b/ql-qlf-plugin/pp3/pp3_latches_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module \$_DLATCH_P_ (E, D, Q); wire [1023:0] _TECHMAP_DO_ = "simplemap; opt"; input E, D; diff --git a/ql-qlf-plugin/pp3/pp3_lut_map.v b/ql-qlf-plugin/pp3/pp3_lut_map.v index 4c375c9fd..4ae91a9a8 100644 --- a/ql-qlf-plugin/pp3/pp3_lut_map.v +++ b/ql-qlf-plugin/pp3/pp3_lut_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module \$lut ( A, Y ); diff --git a/ql-qlf-plugin/pp3/pp3_mult_sim.v b/ql-qlf-plugin/pp3/pp3_mult_sim.v index 359621914..19daf81d2 100644 --- a/ql-qlf-plugin/pp3/pp3_mult_sim.v +++ b/ql-qlf-plugin/pp3/pp3_mult_sim.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* blackbox *) module qlal4s3_mult_32x32_cell ( input [31:0] Amult, diff --git a/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v b/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v index fd849f6d0..b03b7f6d0 100644 --- a/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v +++ b/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + `timescale 1ns/10ps module ahb_gen_bfm ( diff --git a/ql-qlf-plugin/tests/consts/consts.v b/ql-qlf-plugin/tests/consts/consts.v index 2e305ce4d..9096b14a9 100644 --- a/ql-qlf-plugin/tests/consts/consts.v +++ b/ql-qlf-plugin/tests/consts/consts.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + (* keep_hierarchy *) module my_lut ( input wire [3:0] i, diff --git a/ql-qlf-plugin/tests/fsm/fsm.v b/ql-qlf-plugin/tests/fsm/fsm.v index cf1c21a58..e68ddc1fe 100644 --- a/ql-qlf-plugin/tests/fsm/fsm.v +++ b/ql-qlf-plugin/tests/fsm/fsm.v @@ -1,4 +1,12 @@ - module fsm ( clock, reset, req_0, req_1, gnt_0, gnt_1 ); +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module fsm ( clock, reset, req_0, req_1, gnt_0, gnt_1 ); input clock,reset,req_0,req_1; output gnt_0,gnt_1; wire clock,reset,req_0,req_1; diff --git a/ql-qlf-plugin/tests/mux/mux.v b/ql-qlf-plugin/tests/mux/mux.v index d7698fc04..ecc1189c4 100644 --- a/ql-qlf-plugin/tests/mux/mux.v +++ b/ql-qlf-plugin/tests/mux/mux.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module mux2 (S,A,B,Y); input S; input A,B; diff --git a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v index b7cd54bfa..97cd00ade 100644 --- a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v +++ b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module my_ram (CLK, WADR, WDAT, WEN, RADR, RDAT, REN); parameter DBITS = 36; diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.v b/ql-qlf-plugin/tests/tribuf/tribuf.v index e4b6f8178..f0d2fb019 100644 --- a/ql-qlf-plugin/tests/tribuf/tribuf.v +++ b/ql-qlf-plugin/tests/tribuf/tribuf.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module tristate(en, i, o); input en; input i; From 63dfb32b341a123fa1a6b437f86b2fd0b70c12e8 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 22 Jun 2021 12:23:44 +0200 Subject: [PATCH 350/845] Fixed ql-qlf-plugin Makefile indentations Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 66 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 522de7564..27e2d1973 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -8,41 +8,41 @@ NAME = ql-qlf SOURCES = synth_quicklogic.cc \ - ql-dsp.cc \ - pp3_braminit.cc + ql-dsp.cc \ + pp3_braminit.cc include ../Makefile_plugin.common -COMMON = common -QLF_K4N8_DIR = ql-qlf-k4n8 -QLF_K6N10_DIR = ql-qlf-k6n10 -PP3_DIR = pp3 -VERILOG_MODULES = $(COMMON)/cells_sim.v \ - $(QLF_K4N8_DIR)/qlf_k4n8_arith_map.v \ - $(QLF_K4N8_DIR)/qlf_k4n8_cells_sim.v \ - $(QLF_K4N8_DIR)/qlf_k4n8_ffs_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_arith_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_brams_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_brams.txt \ - $(QLF_K6N10_DIR)/qlf_k6n10_cells_sim.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_ffs_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_dsp_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v \ - $(PP3_DIR)/pp3_abc9_map.v \ - $(PP3_DIR)/pp3_abc9_model.v \ - $(PP3_DIR)/pp3_abc9_unmap.v \ - $(PP3_DIR)/pp3_cells_map.v \ - $(PP3_DIR)/pp3_cells_sim.v \ - $(PP3_DIR)/pp3_ffs_map.v \ - $(PP3_DIR)/pp3_latches_map.v \ - $(PP3_DIR)/pp3_lut_map.v \ - $(PP3_DIR)/pp3_lutdefs.txt \ - $(PP3_DIR)/pp3_brams_sim.v \ - $(PP3_DIR)/pp3_brams_map.v \ - $(PP3_DIR)/pp3_brams.txt \ - $(PP3_DIR)/pp3_bram_init_8_16.vh \ - $(PP3_DIR)/pp3_bram_init_32.vh \ - $(PP3_DIR)/pp3_qlal4s3b_sim.v \ - $(PP3_DIR)/pp3_mult_sim.v +COMMON = common +QLF_K4N8_DIR = ql-qlf-k4n8 +QLF_K6N10_DIR = ql-qlf-k6n10 +PP3_DIR = pp3 +VERILOG_MODULES = $(COMMON)/cells_sim.v \ + $(QLF_K4N8_DIR)/qlf_k4n8_arith_map.v \ + $(QLF_K4N8_DIR)/qlf_k4n8_cells_sim.v \ + $(QLF_K4N8_DIR)/qlf_k4n8_ffs_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_arith_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_brams_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_brams.txt \ + $(QLF_K6N10_DIR)/qlf_k6n10_cells_sim.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_ffs_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_dsp_map.v \ + $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v \ + $(PP3_DIR)/pp3_abc9_map.v \ + $(PP3_DIR)/pp3_abc9_model.v \ + $(PP3_DIR)/pp3_abc9_unmap.v \ + $(PP3_DIR)/pp3_cells_map.v \ + $(PP3_DIR)/pp3_cells_sim.v \ + $(PP3_DIR)/pp3_ffs_map.v \ + $(PP3_DIR)/pp3_latches_map.v \ + $(PP3_DIR)/pp3_lut_map.v \ + $(PP3_DIR)/pp3_lutdefs.txt \ + $(PP3_DIR)/pp3_brams_sim.v \ + $(PP3_DIR)/pp3_brams_map.v \ + $(PP3_DIR)/pp3_brams.txt \ + $(PP3_DIR)/pp3_bram_init_8_16.vh \ + $(PP3_DIR)/pp3_bram_init_32.vh \ + $(PP3_DIR)/pp3_qlal4s3b_sim.v \ + $(PP3_DIR)/pp3_mult_sim.v retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) From 6ef84d6f0989e28bc32fa7814f4d789c2ef22cc0 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 22 Jun 2021 14:17:51 +0200 Subject: [PATCH 351/845] Formatted Verilog files using Verible Signed-off-by: Maciej Kurc --- ql-qlf-plugin/common/cells_sim.v | 33 +- ql-qlf-plugin/pp3/pp3_brams_map.v | 2445 +++++---- ql-qlf-plugin/pp3/pp3_brams_sim.v | 5369 ++++++++++--------- ql-qlf-plugin/pp3/pp3_cells_map.v | 60 +- ql-qlf-plugin/pp3/pp3_cells_sim.v | 404 +- ql-qlf-plugin/pp3/pp3_ffs_map.v | 20 +- ql-qlf-plugin/pp3/pp3_lut_map.v | 47 +- ql-qlf-plugin/pp3/pp3_mult_sim.v | 174 +- ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v | 4152 +++++++------- ql-qlf-plugin/tests/consts/consts.v | 24 +- ql-qlf-plugin/tests/dffs/dffs.v | 61 +- ql-qlf-plugin/tests/fsm/fsm.v | 101 +- ql-qlf-plugin/tests/mac_unit/mac_unit.v | 6 +- ql-qlf-plugin/tests/multiplier/multiplier.v | 6 +- ql-qlf-plugin/tests/mux/mux.v | 108 +- ql-qlf-plugin/tests/pp3_bram/pp3_bram.v | 255 +- ql-qlf-plugin/tests/tribuf/tribuf.v | 15 +- 17 files changed, 6732 insertions(+), 6548 deletions(-) diff --git a/ql-qlf-plugin/common/cells_sim.v b/ql-qlf-plugin/common/cells_sim.v index 3eb48fb45..e516dd844 100644 --- a/ql-qlf-plugin/common/cells_sim.v +++ b/ql-qlf-plugin/common/cells_sim.v @@ -7,26 +7,39 @@ // SPDX-License-Identifier:ISC -module inv(output Q, input A); - assign Q = A ? 0 : 1; +module inv ( + output Q, + input A +); + assign Q = A ? 0 : 1; endmodule -module buff(output Q, input A); - assign Q = A; +module buff ( + output Q, + input A +); + assign Q = A; endmodule -module logic_0(output a); - assign a = 0; +module logic_0 ( + output a +); + assign a = 0; endmodule -module logic_1(output a); - assign a = 1; +module logic_1 ( + output a +); + assign a = 1; endmodule (* blackbox *) -module gclkbuff (input A, output Z); +module gclkbuff ( + input A, + output Z +); -assign Z = A; + assign Z = A; endmodule diff --git a/ql-qlf-plugin/pp3/pp3_brams_map.v b/ql-qlf-plugin/pp3/pp3_brams_map.v index 55a7baa3f..7e34cd300 100644 --- a/ql-qlf-plugin/pp3/pp3_brams_map.v +++ b/ql-qlf-plugin/pp3/pp3_brams_map.v @@ -6,1256 +6,1255 @@ // // SPDX-License-Identifier:ISC -module \$__QUICKLOGIC_RAMB16K (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); - parameter CFG_ABITS = 9; - parameter CFG_DBITS = 36; - parameter CFG_ENABLE_B = 4; - - parameter CLKPOL2 = 1; - parameter CLKPOL3 = 1; - parameter [16383:0] INIT = 16384'bx; - - input CLK2; - input CLK3; - - input [CFG_ABITS-1:0] A1ADDR; - output [CFG_DBITS-1:0] A1DATA; - input A1EN; - - input [CFG_ABITS-1:0] B1ADDR; - input [CFG_DBITS-1:0] B1DATA; - input [CFG_ENABLE_B-1:0] B1EN; - - assign VCC = 1'b1; - assign GND = 1'b0; - - wire [3:0] DIP, DOP; - wire [31:0] DI, DO; - - wire [31:0] DOB; - wire [3:0] DOPB; - - wire[1:0] WS1_0; - wire[1:0] WS1_1; - wire[1:0] WS2_0; - wire[1:0] WS2_1; - - wire[4:0] wen_reg; - - assign wen_reg[4:CFG_ENABLE_B]=0; - assign wen_reg[CFG_ENABLE_B-1:0]=B1EN; - - assign A1DATA = DO; - assign DI = B1DATA; - - if(CFG_DBITS <=8) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; - end - else if(CFG_DBITS >8 && CFG_DBITS <=16) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(CFG_DBITS > 16) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end - - generate if (CFG_DBITS <= 16) begin - ram8k_2x1_cell_macro #( - `include "pp3_bram_init_32.vh" - ) _TECHMAP_REPLACE_ ( - .A1_0(B1ADDR) , - .A1_1(GND), - .A2_0(A1ADDR), - .A2_1(GND), - .ASYNC_FLUSH_0(GND), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(GND), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(CLK2), - .CLK1_1(CLK2), - .CLK1S_0(!CLKPOL2), - .CLK1S_1(!CLKPOL2), - .CLK1EN_0(VCC), - .CLK1EN_1(VCC), - .CLK2_0(CLK3), - .CLK2_1(CLK3), - .CLK2S_0(!CLKPOL3), - .CLK2S_1(!CLKPOL3), - .CLK2EN_0(A1EN), - .CLK2EN_1(A1EN), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(VCC), - .CS1_1(GND), - .CS2_0(VCC), - .CS2_1(GND), - .DIR_0(GND), - .DIR_1(GND), - .FIFO_EN_0(GND), - .FIFO_EN_1(GND), - .P1_0(GND), - .P1_1(GND), - .P2_0(GND), - .P2_1(GND), - .PIPELINE_RD_0(GND), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(GND), - .SYNC_FIFO_1(GND), - .WD_1(GND), - .WD_0({GND, DI[15: 8], GND, DI[ 7: 0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1(GND), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1(GND), - .WEN1_0(wen_reg[1:0]), - .WEN1_1(wen_reg[3:2]), - .Almost_Empty_0(), - .Almost_Empty_1(), - .Almost_Full_0(), - .Almost_Full_1(), - .POP_FLAG_0(), - .POP_FLAG_1(), - .PUSH_FLAG_0(), - .PUSH_FLAG_1(), - .RD_0({DOP[1], DO[15: 8], DOP[0], DO[ 7: 0]}), - .RD_1(), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - end else if (CFG_DBITS <= 32) begin - ram8k_2x1_cell_macro #( - `include "pp3_bram_init_32.vh" - ) _TECHMAP_REPLACE_ ( - .A1_0(B1ADDR) , - .A1_1(GND), - .A2_0(A1ADDR), - .A2_1(GND), - .ASYNC_FLUSH_0(GND), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(GND), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(CLK2), - .CLK1_1(CLK2), - .CLK1S_0(!CLKPOL2), - .CLK1S_1(!CLKPOL2), - .CLK1EN_0(VCC), - .CLK1EN_1(VCC), - .CLK2_0(CLK3), - .CLK2_1(CLK3), - .CLK2S_0(!CLKPOL3), - .CLK2S_1(!CLKPOL3), - .CLK2EN_0(A1EN), - .CLK2EN_1(A1EN), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(VCC), - .CS1_1(GND), - .CS2_0(VCC), - .CS2_1(GND), - .DIR_0(GND), - .DIR_1(GND), - .FIFO_EN_0(GND), - .FIFO_EN_1(GND), - .P1_0(GND), - .P1_1(GND), - .P2_0(GND), - .P2_1(GND), - .PIPELINE_RD_0(GND), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(GND), - .SYNC_FIFO_1(GND), - .WD_1({GND, DI[31:24], GND, DI[23:16]}), - .WD_0({GND, DI[15: 8], GND, DI[ 7: 0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1(GND), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1(GND), - .WEN1_0(wen_reg[1:0]), - .WEN1_1(wen_reg[3:2]), - .Almost_Empty_0(), - .Almost_Empty_1(), - .Almost_Full_0(), - .Almost_Full_1(), - .POP_FLAG_0(), - .POP_FLAG_1(), - .PUSH_FLAG_0(), - .PUSH_FLAG_1(), - .RD_0({DOP[1], DO[15: 8], DOP[0], DO[ 7: 0]}), - .RD_1({DOP[3], DO[31:24], DOP[2], DO[23:16]}), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - end else begin - wire TECHMAP_FAIL = 1'b1; - end endgenerate +module \$__QUICKLOGIC_RAMB16K ( + CLK2, + CLK3, + A1ADDR, + A1DATA, + A1EN, + B1ADDR, + B1DATA, + B1EN +); + parameter CFG_ABITS = 9; + parameter CFG_DBITS = 36; + parameter CFG_ENABLE_B = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [16383:0] INIT = 16384'bx; + + input CLK2; + input CLK3; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + assign VCC = 1'b1; + assign GND = 1'b0; + + wire [3:0] DIP, DOP; + wire [31:0] DI, DO; + + wire [31:0] DOB; + wire [ 3:0] DOPB; + + wire [ 1:0] WS1_0; + wire [ 1:0] WS1_1; + wire [ 1:0] WS2_0; + wire [ 1:0] WS2_1; + + wire [ 4:0] wen_reg; + + assign wen_reg[4:CFG_ENABLE_B] = 0; + assign wen_reg[CFG_ENABLE_B-1:0] = B1EN; + + assign A1DATA = DO; + assign DI = B1DATA; + + if (CFG_DBITS <= 8) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (CFG_DBITS > 8 && CFG_DBITS <= 16) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (CFG_DBITS > 16) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + generate + if (CFG_DBITS <= 16) begin + ram8k_2x1_cell_macro #( + `include "pp3_bram_init_32.vh" + ) _TECHMAP_REPLACE_ ( + .A1_0(B1ADDR), + .A1_1(GND), + .A2_0(A1ADDR), + .A2_1(GND), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(CLK2), + .CLK1_1(CLK2), + .CLK1S_0(!CLKPOL2), + .CLK1S_1(!CLKPOL2), + .CLK1EN_0(VCC), + .CLK1EN_1(VCC), + .CLK2_0(CLK3), + .CLK2_1(CLK3), + .CLK2S_0(!CLKPOL3), + .CLK2S_1(!CLKPOL3), + .CLK2EN_0(A1EN), + .CLK2EN_1(A1EN), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(VCC), + .CS1_1(GND), + .CS2_0(VCC), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(GND), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1(GND), + .WD_0({GND, DI[15:8], GND, DI[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(GND), + .WEN1_0(wen_reg[1:0]), + .WEN1_1(wen_reg[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({DOP[1], DO[15:8], DOP[0], DO[7:0]}), + .RD_1(), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end else if (CFG_DBITS <= 32) begin + ram8k_2x1_cell_macro #( + `include "pp3_bram_init_32.vh" + ) _TECHMAP_REPLACE_ ( + .A1_0(B1ADDR), + .A1_1(GND), + .A2_0(A1ADDR), + .A2_1(GND), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(CLK2), + .CLK1_1(CLK2), + .CLK1S_0(!CLKPOL2), + .CLK1S_1(!CLKPOL2), + .CLK1EN_0(VCC), + .CLK1EN_1(VCC), + .CLK2_0(CLK3), + .CLK2_1(CLK3), + .CLK2S_0(!CLKPOL3), + .CLK2S_1(!CLKPOL3), + .CLK2EN_0(A1EN), + .CLK2EN_1(A1EN), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(VCC), + .CS1_1(GND), + .CS2_0(VCC), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(GND), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({GND, DI[31:24], GND, DI[23:16]}), + .WD_0({GND, DI[15:8], GND, DI[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(GND), + .WEN1_0(wen_reg[1:0]), + .WEN1_1(wen_reg[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({DOP[1], DO[15:8], DOP[0], DO[7:0]}), + .RD_1({DOP[3], DO[31:24], DOP[2], DO[23:16]}), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end else begin + wire TECHMAP_FAIL = 1'b1; + end + endgenerate endmodule // ------------------------------------------------------------------------ -module \$__QUICKLOGIC_RAMB8K (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); - parameter CFG_ABITS = 9; - parameter CFG_DBITS = 18; - parameter CFG_ENABLE_B = 2; - - parameter CLKPOL2 = 1; - parameter CLKPOL3 = 1; - parameter [8191:0] INIT = 8192'bx; - - input CLK2; - input CLK3; - - input [CFG_ABITS-1:0] A1ADDR; - output [CFG_DBITS-1:0] A1DATA; - input A1EN; - - input [CFG_ABITS-1:0] B1ADDR; - input [CFG_DBITS-1:0] B1DATA; - input [CFG_ENABLE_B-1:0] B1EN; - - wire [10:0] A1ADDR_11; - wire [10:0] B1ADDR_11; - - wire [1:0] DIP, DOP; - wire [15:0] DI, DO; - - wire [15:0] DOBDO; - wire [1:0] DOPBDOP; - - wire[1:0] WS1_0; - wire[1:0] WS1_1; - wire[1:0] WS2_0; - wire[1:0] WS2_1; - - wire[2:0] wen_reg; - - assign wen_reg[2:CFG_ENABLE_B]=0; - assign wen_reg[CFG_ENABLE_B-1:0]=B1EN; - - assign GND = 1'b0; - assign VCC = 1'b1; - - assign A1DATA = DO; - assign DI = B1DATA; - - if(CFG_ABITS == 11) - begin - assign A1ADDR_11[CFG_ABITS-1:0]=A1ADDR; - assign B1ADDR_11[CFG_ABITS-1:0]=B1ADDR; - end - else - begin - assign A1ADDR_11[10:CFG_ABITS]=0; - assign A1ADDR_11[CFG_ABITS-1:0]=A1ADDR; - assign B1ADDR_11[10:CFG_ABITS]=0; - assign B1ADDR_11[CFG_ABITS-1:0]=B1ADDR; - end - - if(CFG_DBITS <=9) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; - end - else if(CFG_DBITS >9 && CFG_DBITS <=18) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(CFG_DBITS > 18) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end - - ram8k_2x1_cell_macro #( - `include "pp3_bram_init_8_16.vh" - ) _TECHMAP_REPLACE_ ( - .A1_0(B1ADDR_11) , - .A1_1(GND), - .A2_0(A1ADDR_11), - .A2_1(GND), - .ASYNC_FLUSH_0(GND), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(GND), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(CLK2), - .CLK1_1(GND), - .CLK1S_0(!CLKPOL2), - .CLK1S_1(GND), - .CLK1EN_0(VCC), - .CLK1EN_1(VCC), - .CLK2_0(CLK3), - .CLK2_1(GND), - .CLK2S_0(!CLKPOL3), - .CLK2S_1(GND), - .CLK2EN_0(A1EN), - .CLK2EN_1(GND), - .CONCAT_EN_0(GND), - .CONCAT_EN_1(GND), - .CS1_0(VCC), - .CS1_1(GND), - .CS2_0(VCC), - .CS2_1(GND), - .DIR_0(GND), - .DIR_1(GND), - .FIFO_EN_0(GND), - .FIFO_EN_1(GND), - .P1_0(GND), - .P1_1(GND), - .P2_0(GND), - .P2_1(GND), - .PIPELINE_RD_0(GND), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(GND), - .SYNC_FIFO_1(GND), - .WD_1(GND), - .WD_0({GND, DI[15: 8], GND, DI[ 7: 0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1(GND), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1(GND), - .WEN1_0(wen_reg[1:0]), - .WEN1_1(GND), - .Almost_Empty_0(), - .Almost_Empty_1(), - .Almost_Full_0(), - .Almost_Full_1(), - .POP_FLAG_0(), - .POP_FLAG_1(), - .PUSH_FLAG_0(), - .PUSH_FLAG_1(), - .RD_0({DOP[1], DO[15: 8], DOP[0], DO[ 7: 0]}), - .RD_1(), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); +module \$__QUICKLOGIC_RAMB8K ( + CLK2, + CLK3, + A1ADDR, + A1DATA, + A1EN, + B1ADDR, + B1DATA, + B1EN +); + parameter CFG_ABITS = 9; + parameter CFG_DBITS = 18; + parameter CFG_ENABLE_B = 2; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [8191:0] INIT = 8192'bx; + + input CLK2; + input CLK3; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + wire [10:0] A1ADDR_11; + wire [10:0] B1ADDR_11; + + wire [1:0] DIP, DOP; + wire [15:0] DI, DO; + + wire [15:0] DOBDO; + wire [ 1:0] DOPBDOP; + + wire [ 1:0] WS1_0; + wire [ 1:0] WS1_1; + wire [ 1:0] WS2_0; + wire [ 1:0] WS2_1; + + wire [ 2:0] wen_reg; + + assign wen_reg[2:CFG_ENABLE_B] = 0; + assign wen_reg[CFG_ENABLE_B-1:0] = B1EN; + + assign GND = 1'b0; + assign VCC = 1'b1; + + assign A1DATA = DO; + assign DI = B1DATA; + + if (CFG_ABITS == 11) begin + assign A1ADDR_11[CFG_ABITS-1:0] = A1ADDR; + assign B1ADDR_11[CFG_ABITS-1:0] = B1ADDR; + end else begin + assign A1ADDR_11[10:CFG_ABITS] = 0; + assign A1ADDR_11[CFG_ABITS-1:0] = A1ADDR; + assign B1ADDR_11[10:CFG_ABITS] = 0; + assign B1ADDR_11[CFG_ABITS-1:0] = B1ADDR; + end + + if (CFG_DBITS <= 9) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (CFG_DBITS > 9 && CFG_DBITS <= 18) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (CFG_DBITS > 18) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + ram8k_2x1_cell_macro #( + `include "pp3_bram_init_8_16.vh" + ) _TECHMAP_REPLACE_ ( + .A1_0(B1ADDR_11), + .A1_1(GND), + .A2_0(A1ADDR_11), + .A2_1(GND), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(CLK2), + .CLK1_1(GND), + .CLK1S_0(!CLKPOL2), + .CLK1S_1(GND), + .CLK1EN_0(VCC), + .CLK1EN_1(VCC), + .CLK2_0(CLK3), + .CLK2_1(GND), + .CLK2S_0(!CLKPOL3), + .CLK2S_1(GND), + .CLK2EN_0(A1EN), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(VCC), + .CS1_1(GND), + .CS2_0(VCC), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(GND), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1(GND), + .WD_0({GND, DI[15:8], GND, DI[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(GND), + .WEN1_0(wen_reg[1:0]), + .WEN1_1(GND), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({DOP[1], DO[15:8], DOP[0], DO[7:0]}), + .RD_1(), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); endmodule -module RAM_8K_BLK ( WA,RA,WD,WClk,RClk,WClk_En,RClk_En,WEN,RD); - -parameter addr_int = 9, +module RAM_8K_BLK ( + WA, + RA, + WD, + WClk, + RClk, + WClk_En, + RClk_En, + WEN, + RD +); + + parameter addr_int = 9, data_depth_int = 512, data_width_int = 18, wr_enable_int = 2, reg_rd_int = 0; - -parameter [8191:0] INIT = 8192'bx; -parameter INIT_FILE="init.mem"; - -input [addr_int-1:0] WA; -input [addr_int-1:0] RA; -input WClk,RClk; -input WClk_En,RClk_En; -input [wr_enable_int-1:0] WEN; -input [data_width_int-1:0] WD; -output [data_width_int-1:0] RD; - -wire VCC,GND; -wire WClk0_Sel,RClk0_Sel; -wire WClk1_Sel,RClk1_Sel; - -wire reg_rd0; -wire reg_rd1; -wire [10:0] addr_wr0,addr_rd0,addr_wr1,addr_rd1; - -wire [17:0] in_reg0; - -wire [2:0] wen_reg0; - -wire [15:0] out_reg0; - -wire [1:0] out_par0; - -wire [1:0] WS1_0,WS2_0; -wire [1:0] WS_GND; - -wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; - -wire WD0_SEL,RD0_SEL; -wire WD1_SEL,RD1_SEL; - -assign VCC = 1'b1; -assign GND = 1'b0; - -assign WD0_SEL = 1'b1; -assign RD0_SEL = 1'b1; -assign WD1_SEL = 1'b0; -assign RD1_SEL = 1'b0; - -assign WClk0_Sel = 1'b0; -assign RClk0_Sel = 1'b0; - -assign WClk1_Sel = 1'b0; -assign RClk1_Sel = 1'b0; - -assign LS = 1'b0; -assign DS = 1'b0; -assign SD = 1'b0; -assign LS_RB1 = 1'b0; -assign DS_RB1 = 1'b0; -assign SD_RB1 = 1'b0; - -assign reg_rd0 =reg_rd_int; -assign WS_GND = 2'b00; - -assign reg_rd1 =1'b0; - -assign wen_reg0[2:wr_enable_int]=0; -assign wen_reg0[wr_enable_int-1:0]=WEN; - -assign addr_wr1=11'b0000000000; -assign addr_rd1=11'b0000000000; - -generate - - if(addr_int == 11) - begin - assign addr_wr0[10:0]=WA; - assign addr_rd0[10:0]=RA; - end - else - begin - assign addr_wr0[10:addr_int]=0; - assign addr_wr0[addr_int-1:0]=WA; - assign addr_rd0[10:addr_int]=0; - assign addr_rd0[addr_int-1:0]=RA; - end - - if (data_width_int == 16) - begin - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - else if (data_width_int > 8 && data_width_int < 16) - begin - assign in_reg0[15:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - else if (data_width_int <= 8) - begin - assign in_reg0[15:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - - if(data_width_int <=8) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; - end - else if(data_width_int >8 && data_width_int <=16) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(data_width_int > 16) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end - -endgenerate - - ram8k_2x1_cell_macro # ( - .INIT(INIT) - ) - _TECHMAP_REPLACE_ ( - .A1_0(addr_wr0) , - .A1_1(addr_wr1), - .A2_0(addr_rd0), - .A2_1(addr_rd1), - .ASYNC_FLUSH_0(GND), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(GND), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(WClk), - .CLK1_1(GND), - .CLK1S_0(WClk0_Sel), - .CLK1S_1(WClk1_Sel), - .CLK1EN_0(WClk_En), - .CLK1EN_1(GND), - .CLK2_0(RClk), - .CLK2_1(GND), - .CLK2S_0(RClk0_Sel), - .CLK2S_1(RClk1_Sel), - .CLK2EN_0(RClk_En), - .CLK2EN_1(GND), - .CONCAT_EN_0(GND), - .CONCAT_EN_1(GND), - .CS1_0(WD0_SEL), - .CS1_1(WD1_SEL), - .CS2_0(RD0_SEL), - .CS2_1(RD1_SEL), - .DIR_0(GND), - .DIR_1(GND), - .FIFO_EN_0(GND), - .FIFO_EN_1(GND), - .P1_0(GND), - .P1_1(GND), - .P2_0(GND), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(reg_rd1), - .SYNC_FIFO_0(GND), - .SYNC_FIFO_1(GND), - .WD_1({18{GND}}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1(WS_GND), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1(WS_GND), - .WEN1_0(wen_reg0[1:0]), - .WEN1_1({2{GND}}), - .Almost_Empty_0(), - .Almost_Empty_1(), - .Almost_Full_0(), - .Almost_Full_1(), - .POP_FLAG_0(), - .POP_FLAG_1(), - .PUSH_FLAG_0(), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1(), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - - assign RD[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + + parameter [8191:0] INIT = 8192'bx; + parameter INIT_FILE = "init.mem"; + + input [addr_int-1:0] WA; + input [addr_int-1:0] RA; + input WClk, RClk; + input WClk_En, RClk_En; + input [wr_enable_int-1:0] WEN; + input [data_width_int-1:0] WD; + output [data_width_int-1:0] RD; + + wire VCC, GND; + wire WClk0_Sel, RClk0_Sel; + wire WClk1_Sel, RClk1_Sel; + + wire reg_rd0; + wire reg_rd1; + wire [10:0] addr_wr0, addr_rd0, addr_wr1, addr_rd1; + + wire [17:0] in_reg0; + + wire [ 2:0] wen_reg0; + + wire [15:0] out_reg0; + + wire [ 1:0] out_par0; + + wire [1:0] WS1_0, WS2_0; + wire [1:0] WS_GND; + + wire LS, DS, SD, LS_RB1, DS_RB1, SD_RB1; + + wire WD0_SEL, RD0_SEL; + wire WD1_SEL, RD1_SEL; + + assign VCC = 1'b1; + assign GND = 1'b0; + + assign WD0_SEL = 1'b1; + assign RD0_SEL = 1'b1; + assign WD1_SEL = 1'b0; + assign RD1_SEL = 1'b0; + + assign WClk0_Sel = 1'b0; + assign RClk0_Sel = 1'b0; + + assign WClk1_Sel = 1'b0; + assign RClk1_Sel = 1'b0; + + assign LS = 1'b0; + assign DS = 1'b0; + assign SD = 1'b0; + assign LS_RB1 = 1'b0; + assign DS_RB1 = 1'b0; + assign SD_RB1 = 1'b0; + + assign reg_rd0 = reg_rd_int; + assign WS_GND = 2'b00; + + assign reg_rd1 = 1'b0; + + assign wen_reg0[2:wr_enable_int] = 0; + assign wen_reg0[wr_enable_int-1:0] = WEN; + + assign addr_wr1 = 11'b0000000000; + assign addr_rd1 = 11'b0000000000; + + generate + + if (addr_int == 11) begin + assign addr_wr0[10:0] = WA; + assign addr_rd0[10:0] = RA; + end else begin + assign addr_wr0[10:addr_int] = 0; + assign addr_wr0[addr_int-1:0] = WA; + assign addr_rd0[10:addr_int] = 0; + assign addr_rd0[addr_int-1:0] = RA; + end + + if (data_width_int == 16) begin + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end else if (data_width_int > 8 && data_width_int < 16) begin + assign in_reg0[15:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end else if (data_width_int <= 8) begin + assign in_reg0[15:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end + + if (data_width_int <= 8) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (data_width_int > 8 && data_width_int <= 16) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (data_width_int > 16) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + endgenerate + + ram8k_2x1_cell_macro #( + .INIT(INIT) + ) _TECHMAP_REPLACE_ ( + .A1_0(addr_wr0), + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(GND), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk1_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(GND), + .CLK2_0(RClk), + .CLK2_1(GND), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk1_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(WD1_SEL), + .CS2_0(RD0_SEL), + .CS2_1(RD1_SEL), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(reg_rd1), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1({2{GND}}), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + assign RD[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; endmodule -module RAM_16K_BLK ( WA,RA,WD,WClk,RClk,WClk_En,RClk_En,WEN,RD); +module RAM_16K_BLK ( + WA, + RA, + WD, + WClk, + RClk, + WClk_En, + RClk_En, + WEN, + RD +); -parameter addr_int = 9, + parameter addr_int = 9, data_depth_int = 512, data_width_int = 36, wr_enable_int = 4, reg_rd_int = 0; -parameter [16383:0] INIT = 16384'bx; -parameter INIT_FILE="init.mem"; - -input [addr_int-1:0] WA; -input [addr_int-1:0] RA; -input WClk,RClk; -input WClk_En,RClk_En; -input [wr_enable_int-1:0] WEN; -input [data_width_int-1:0] WD; -output [data_width_int-1:0] RD; - -wire VCC,GND; - -wire WClk0_Sel,RClk0_Sel; -wire WClk1_Sel,RClk1_Sel; - -wire reg_rd0; -wire reg_rd1; -wire [10:0] addr_wr0,addr_rd0,addr_wr1,addr_rd1; - -wire [31:0] in_reg0; - -wire [4:0] wen_reg0; - -wire [31:0] out_reg0; - -wire [3:0] out_par0; - -wire [1:0] WS1_0,WS2_0; -wire [1:0] WS_GND; - -wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; - -wire WD0_SEL,RD0_SEL; -wire WD1_SEL,RD1_SEL; - -assign VCC = 1'b1; -assign GND = 1'b0; - -assign WD0_SEL = 1'b1; -assign RD0_SEL = 1'b1; -assign WD1_SEL = 1'b1; -assign RD1_SEL = 1'b1; - -assign WClk0_Sel = 1'b0; -assign RClk0_Sel = 1'b0; - -assign WClk1_Sel = 1'b0; -assign RClk1_Sel = 1'b0; - -assign LS = 1'b0; -assign DS = 1'b0; -assign SD = 1'b0; -assign LS_RB1 = 1'b0; -assign DS_RB1 = 1'b0; -assign SD_RB1 = 1'b0; - -assign reg_rd0 =reg_rd_int; -assign WS_GND = 2'b00; - -assign reg_rd1 = 1'b0; - -assign wen_reg0[4:wr_enable_int]=0; -assign wen_reg0[wr_enable_int-1:0]=WEN; - -assign addr_wr1=11'b0000000000; -assign addr_rd1=11'b0000000000; - -generate - - if(addr_int == 11) - begin - assign addr_wr0[10:0]=WA; - assign addr_rd0[10:0]=RA; - end - else - begin - assign addr_wr0[10:addr_int]=0; - assign addr_wr0[addr_int-1:0]=WA; - assign addr_rd0[10:addr_int]=0; - assign addr_rd0[addr_int-1:0]=RA; - end - - if (data_width_int == 32) - begin - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - else if (data_width_int > 8 && data_width_int < 32) - begin - assign in_reg0[31:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - else if (data_width_int <= 8) - begin - assign in_reg0[31:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - - if(data_width_int <=8) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; - end - else if(data_width_int >8 && data_width_int <=16) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(data_width_int > 16) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end - - if (data_width_int <=16) begin - - ram8k_2x1_cell_macro # ( - .INIT(INIT) - ) - _TECHMAP_REPLACE_ ( - .A1_0(addr_wr0) , - .A1_1(addr_wr1), - .A2_0(addr_rd0), - .A2_1(addr_rd1), - .ASYNC_FLUSH_0(GND), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(GND), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(WClk), - .CLK1_1(WClk), - .CLK1S_0(WClk0_Sel), - .CLK1S_1(WClk0_Sel), - .CLK1EN_0(WClk_En), - .CLK1EN_1(WClk_En), - .CLK2_0(RClk), - .CLK2_1(RClk), - .CLK2S_0(RClk0_Sel), - .CLK2S_1(RClk0_Sel), - .CLK2EN_0(RClk_En), - .CLK2EN_1(RClk_En), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(WD0_SEL), - .CS1_1(GND), - .CS2_0(RD0_SEL), - .CS2_1(GND), - .DIR_0(GND), - .DIR_1(GND), - .FIFO_EN_0(GND), - .FIFO_EN_1(GND), - .P1_0(GND), - .P1_1(GND), - .P2_0(GND), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(GND), - .SYNC_FIFO_1(GND), - .WD_1({18{GND}}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1(WS_GND), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1(WS_GND), - .WEN1_0(wen_reg0[1:0]), - .WEN1_1(wen_reg0[3:2]), - .Almost_Empty_0(), - .Almost_Empty_1(), - .Almost_Full_0(), - .Almost_Full_1(), - .POP_FLAG_0(), - .POP_FLAG_1(), - .PUSH_FLAG_0(), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1(), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - end - else if (data_width_int > 16) begin - - ram8k_2x1_cell_macro # ( - .INIT(INIT) - ) - _TECHMAP_REPLACE_ ( - .A1_0(addr_wr0) , - .A1_1(addr_wr1), - .A2_0(addr_rd0), - .A2_1(addr_rd1), - .ASYNC_FLUSH_0(GND), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(GND), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(WClk), - .CLK1_1(WClk), - .CLK1S_0(WClk0_Sel), - .CLK1S_1(WClk0_Sel), - .CLK1EN_0(WClk_En), - .CLK1EN_1(WClk_En), - .CLK2_0(RClk), - .CLK2_1(RClk), - .CLK2S_0(RClk0_Sel), - .CLK2S_1(RClk0_Sel), - .CLK2EN_0(RClk_En), - .CLK2EN_1(RClk_En), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(WD0_SEL), - .CS1_1(GND), - .CS2_0(RD0_SEL), - .CS2_1(GND), - .DIR_0(GND), - .DIR_1(GND), - .FIFO_EN_0(GND), - .FIFO_EN_1(GND), - .P1_0(GND), - .P1_1(GND), - .P2_0(GND), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(GND), - .SYNC_FIFO_1(GND), - .WD_1({1'b0,in_reg0[31:24],1'b0,in_reg0[23:16]}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1(WS_GND), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1(WS_GND), - .WEN1_0(wen_reg0[1:0]), - .WEN1_1(wen_reg0[3:2]), - .Almost_Empty_0(), - .Almost_Empty_1(), - .Almost_Full_0(), - .Almost_Full_1(), - .POP_FLAG_0(), - .POP_FLAG_1(), - .PUSH_FLAG_0(), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1({out_par0[3],out_reg0[31:24],out_par0[2],out_reg0[23:16]}), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - end - else - begin - wire TECHMAP_FAIL = 1'b1; - end - -endgenerate - - assign RD[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + parameter [16383:0] INIT = 16384'bx; + parameter INIT_FILE = "init.mem"; + + input [addr_int-1:0] WA; + input [addr_int-1:0] RA; + input WClk, RClk; + input WClk_En, RClk_En; + input [wr_enable_int-1:0] WEN; + input [data_width_int-1:0] WD; + output [data_width_int-1:0] RD; + + wire VCC, GND; + + wire WClk0_Sel, RClk0_Sel; + wire WClk1_Sel, RClk1_Sel; + + wire reg_rd0; + wire reg_rd1; + wire [10:0] addr_wr0, addr_rd0, addr_wr1, addr_rd1; + + wire [31:0] in_reg0; + + wire [ 4:0] wen_reg0; + + wire [31:0] out_reg0; + + wire [ 3:0] out_par0; + + wire [1:0] WS1_0, WS2_0; + wire [1:0] WS_GND; + + wire LS, DS, SD, LS_RB1, DS_RB1, SD_RB1; + + wire WD0_SEL, RD0_SEL; + wire WD1_SEL, RD1_SEL; + + assign VCC = 1'b1; + assign GND = 1'b0; + + assign WD0_SEL = 1'b1; + assign RD0_SEL = 1'b1; + assign WD1_SEL = 1'b1; + assign RD1_SEL = 1'b1; + + assign WClk0_Sel = 1'b0; + assign RClk0_Sel = 1'b0; + + assign WClk1_Sel = 1'b0; + assign RClk1_Sel = 1'b0; + + assign LS = 1'b0; + assign DS = 1'b0; + assign SD = 1'b0; + assign LS_RB1 = 1'b0; + assign DS_RB1 = 1'b0; + assign SD_RB1 = 1'b0; + + assign reg_rd0 = reg_rd_int; + assign WS_GND = 2'b00; + + assign reg_rd1 = 1'b0; + + assign wen_reg0[4:wr_enable_int] = 0; + assign wen_reg0[wr_enable_int-1:0] = WEN; + + assign addr_wr1 = 11'b0000000000; + assign addr_rd1 = 11'b0000000000; + + generate + + if (addr_int == 11) begin + assign addr_wr0[10:0] = WA; + assign addr_rd0[10:0] = RA; + end else begin + assign addr_wr0[10:addr_int] = 0; + assign addr_wr0[addr_int-1:0] = WA; + assign addr_rd0[10:addr_int] = 0; + assign addr_rd0[addr_int-1:0] = RA; + end + + if (data_width_int == 32) begin + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end else if (data_width_int > 8 && data_width_int < 32) begin + assign in_reg0[31:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end else if (data_width_int <= 8) begin + assign in_reg0[31:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end + + if (data_width_int <= 8) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (data_width_int > 8 && data_width_int <= 16) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (data_width_int > 16) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + if (data_width_int <= 16) begin + + ram8k_2x1_cell_macro #( + .INIT(INIT) + ) _TECHMAP_REPLACE_ ( + .A1_0(addr_wr0), + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(WClk), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk0_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(WClk_En), + .CLK2_0(RClk), + .CLK2_1(RClk), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk0_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(RClk_En), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(GND), + .CS2_0(RD0_SEL), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1(wen_reg0[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end else if (data_width_int > 16) begin + + ram8k_2x1_cell_macro #( + .INIT(INIT) + ) _TECHMAP_REPLACE_ ( + .A1_0(addr_wr0), + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(WClk), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk0_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(WClk_En), + .CLK2_0(RClk), + .CLK2_1(RClk), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk0_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(RClk_En), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(GND), + .CS2_0(RD0_SEL), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({1'b0, in_reg0[31:24], 1'b0, in_reg0[23:16]}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1(wen_reg0[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1({out_par0[3], out_reg0[31:24], out_par0[2], out_reg0[23:16]}), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end else begin + wire TECHMAP_FAIL = 1'b1; + end + + endgenerate + + assign RD[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; endmodule -module FIFO_8K_BLK(DIN,Fifo_Push_Flush,Fifo_Pop_Flush,PUSH,POP,Push_Clk,Pop_Clk,Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush,Almost_Full,Almost_Empty,PUSH_FLAG,POP_FLAG,DOUT); - -parameter data_depth_int = 512, - data_width_int = 36, - reg_rd_int = 0, - sync_fifo_int = 0; - -input Fifo_Push_Flush,Fifo_Pop_Flush; -input Push_Clk,Pop_Clk; -input PUSH,POP; -input [data_width_int-1:0] DIN; -input Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush; -output [data_width_int-1:0] DOUT; -output [3:0] PUSH_FLAG,POP_FLAG; -output Almost_Full,Almost_Empty; - -wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; -wire VCC,GND; - -wire [10:0] addr_wr,addr_rd; -wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; -wire reg_rd0,sync_fifo0; -wire [15:0] in_reg0; -wire [15:0] out_reg0; -wire [1:0] WS1_0; -wire [1:0] WS2_0; -wire Push_Clk0_Sel,Pop_Clk0_Sel; -wire Async_Flush_Sel0; - -wire [1:0] out_par0; - -assign LS = 1'b0; -assign DS = 1'b0; -assign SD = 1'b0; -assign LS_RB1 = 1'b0; -assign DS_RB1 = 1'b0; -assign SD_RB1 = 1'b0; - -assign VCC = 1'b1; -assign GND = 1'b0; - -assign Push_Clk0_Sel = 1'b0; -assign Pop_Clk0_Sel = 1'b0; -assign Async_Flush_Sel0 = 1'b0; - -assign reg_rd0 = reg_rd_int; -assign sync_fifo0 = sync_fifo_int; - -assign addr_wr=11'b00000000000; -assign addr_rd=11'b00000000000; - -assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; -assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; -assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; -assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; -assign clk1_sig_sel0 = Push_Clk0_Sel; -assign clk2_sig_sel0 = Pop_Clk0_Sel ; -assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; -assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; -assign p1_sig0 = Fifo_Dir ? POP : PUSH; -assign p2_sig0 = Fifo_Dir ? PUSH : POP ; - -generate - - if (data_width_int == 16) - begin - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - else if (data_width_int > 8 && data_width_int < 16) - begin - assign in_reg0[15:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - else if (data_width_int <= 8) - begin - assign in_reg0[15:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - - if(data_width_int <=8) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; - end - else if(data_width_int >8 && data_width_int <=16) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(data_width_int > 16) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end - -endgenerate - - ram8k_2x1_cell_macro - _TECHMAP_REPLACE_( - .A1_0(addr_wr) , - .A1_1(addr_wr), - .A2_0(addr_rd), - .A2_1(addr_rd), - .ASYNC_FLUSH_0(Async_Flush), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(Async_Flush_Sel0), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(clk1_sig0), - .CLK1_1(GND), - .CLK1EN_0(clk1_sig_en0), - .CLK1EN_1(GND), - .CLK2_0(clk2_sig0), - .CLK2_1(GND), - .CLK1S_0(clk1_sig_sel0), - .CLK1S_1(GND), - .CLK2S_0(clk2_sig_sel0), - .CLK2S_1(GND), - .CLK2EN_0(clk2_sig_en0), - .CLK2EN_1(GND), - .CONCAT_EN_0(GND), - .CONCAT_EN_1(GND), - .CS1_0(fifo_clk1_flush_sig0), - .CS1_1(GND), - .CS2_0(fifo_clk2_flush_sig0), - .CS2_1(GND), - .DIR_0(Fifo_Dir), - .DIR_1(GND), - .FIFO_EN_0(VCC), - .FIFO_EN_1(GND), - .P1_0(p1_sig0), - .P1_1(GND), - .P2_0(p2_sig0), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(sync_fifo0), - .SYNC_FIFO_1(GND), - .WD_1({18{GND}}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1({GND,GND}), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1({GND,GND}), - .WEN1_0({GND,GND}), - .WEN1_1({GND,GND}), - .Almost_Empty_0(Almost_Empty), - .Almost_Empty_1(), - .Almost_Full_0(Almost_Full), - .Almost_Full_1(), - .POP_FLAG_0(POP_FLAG), - .POP_FLAG_1(), - .PUSH_FLAG_0(PUSH_FLAG), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1(), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - - assign DOUT[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; +module FIFO_8K_BLK ( + DIN, + Fifo_Push_Flush, + Fifo_Pop_Flush, + PUSH, + POP, + Push_Clk, + Pop_Clk, + Push_Clk_En, + Pop_Clk_En, + Fifo_Dir, + Async_Flush, + Almost_Full, + Almost_Empty, + PUSH_FLAG, + POP_FLAG, + DOUT +); + + parameter data_depth_int = 512, data_width_int = 36, reg_rd_int = 0, sync_fifo_int = 0; + + input Fifo_Push_Flush, Fifo_Pop_Flush; + input Push_Clk, Pop_Clk; + input PUSH, POP; + input [data_width_int-1:0] DIN; + input Push_Clk_En, Pop_Clk_En, Fifo_Dir, Async_Flush; + output [data_width_int-1:0] DOUT; + output [3:0] PUSH_FLAG, POP_FLAG; + output Almost_Full, Almost_Empty; + + wire LS, DS, SD, LS_RB1, DS_RB1, SD_RB1; + wire VCC, GND; + + wire [10:0] addr_wr, addr_rd; + wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; + wire reg_rd0, sync_fifo0; + wire [15:0] in_reg0; + wire [15:0] out_reg0; + wire [ 1:0] WS1_0; + wire [ 1:0] WS2_0; + wire Push_Clk0_Sel, Pop_Clk0_Sel; + wire Async_Flush_Sel0; + + wire [1:0] out_par0; + + assign LS = 1'b0; + assign DS = 1'b0; + assign SD = 1'b0; + assign LS_RB1 = 1'b0; + assign DS_RB1 = 1'b0; + assign SD_RB1 = 1'b0; + + assign VCC = 1'b1; + assign GND = 1'b0; + + assign Push_Clk0_Sel = 1'b0; + assign Pop_Clk0_Sel = 1'b0; + assign Async_Flush_Sel0 = 1'b0; + + assign reg_rd0 = reg_rd_int; + assign sync_fifo0 = sync_fifo_int; + + assign addr_wr=11'b00000000000; + assign addr_rd=11'b00000000000; + + assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; + assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; + assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; + assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; + assign clk1_sig_sel0 = Push_Clk0_Sel; + assign clk2_sig_sel0 = Pop_Clk0_Sel ; + assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; + assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; + assign p1_sig0 = Fifo_Dir ? POP : PUSH; + assign p2_sig0 = Fifo_Dir ? PUSH : POP ; + + generate + + if (data_width_int == 16) begin + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end else if (data_width_int > 8 && data_width_int < 16) begin + assign in_reg0[15:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end else if (data_width_int <= 8) begin + assign in_reg0[15:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end + + if (data_width_int <= 8) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (data_width_int > 8 && data_width_int <= 16) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (data_width_int > 16) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + endgenerate + + ram8k_2x1_cell_macro _TECHMAP_REPLACE_ ( + .A1_0(addr_wr), + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(clk1_sig0), + .CLK1_1(GND), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(GND), + .CLK2_0(clk2_sig0), + .CLK2_1(GND), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(GND), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(GND), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND, GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND, GND}), + .WEN1_0({GND, GND}), + .WEN1_1({GND, GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + assign DOUT[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; endmodule -module FIFO_16K_BLK(DIN,Fifo_Push_Flush,Fifo_Pop_Flush,PUSH,POP,Push_Clk,Pop_Clk,Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush,Almost_Full,Almost_Empty,PUSH_FLAG,POP_FLAG,DOUT); - -parameter data_depth_int = 512, - data_width_int = 36, - reg_rd_int = 0, - sync_fifo_int = 0; - -input Fifo_Push_Flush,Fifo_Pop_Flush; -input Push_Clk,Pop_Clk; -input PUSH,POP; -input [data_width_int-1:0] DIN; -input Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush; -output [data_width_int-1:0] DOUT; -output [3:0] PUSH_FLAG,POP_FLAG; -output Almost_Full,Almost_Empty; - -wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; -wire VCC,GND; - -wire [10:0] addr_wr,addr_rd; -wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; -wire reg_rd0,sync_fifo0; -wire [31:0] in_reg0; -wire [31:0] out_reg0; -wire [1:0] WS1_0; -wire [1:0] WS2_0; -wire Push_Clk0_Sel,Pop_Clk0_Sel; -wire Async_Flush_Sel0; - -wire [3:0] out_par0; -wire [1:0] out_par1; - -assign LS = 1'b0; -assign DS = 1'b0; -assign SD = 1'b0; -assign LS_RB1 = 1'b0; -assign DS_RB1 = 1'b0; -assign SD_RB1 = 1'b0; - -assign VCC = 1'b1; -assign GND = 1'b0; - -assign Push_Clk0_Sel = 1'b0; -assign Pop_Clk0_Sel = 1'b0; -assign Async_Flush_Sel0 = 1'b0; - -assign reg_rd0 = reg_rd_int; -assign sync_fifo0 = sync_fifo_int; - -assign addr_wr=11'b00000000000; -assign addr_rd=11'b00000000000; - -assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; -assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; -assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; -assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; -assign clk1_sig_sel0 = Push_Clk0_Sel; -assign clk2_sig_sel0 = Pop_Clk0_Sel ; -assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; -assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; -assign p1_sig0 = Fifo_Dir ? POP : PUSH; -assign p2_sig0 = Fifo_Dir ? PUSH : POP ; - -generate - if (data_width_int == 32) - begin - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - else if (data_width_int > 8 && data_width_int < 32) - begin - assign in_reg0[31:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - else if (data_width_int <= 8) - begin - assign in_reg0[31:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - - if(data_width_int <=8) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; - end - else if(data_width_int >8 && data_width_int <=16) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(data_width_int > 16) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end - - if (data_width_int <=16) begin - - ram8k_2x1_cell_macro - _TECHMAP_REPLACE_( - .A1_0(addr_wr) , - .A1_1(addr_wr), - .A2_0(addr_rd), - .A2_1(addr_rd), - .ASYNC_FLUSH_0(Async_Flush), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(Async_Flush_Sel0), - .ASYNC_FLUSH_S1(Async_Flush_Sel0), - .CLK1_0(clk1_sig0), - .CLK1_1(clk1_sig0), - .CLK1EN_0(clk1_sig_en0), - .CLK1EN_1(clk1_sig_en0), - .CLK2_0(clk2_sig0), - .CLK2_1(clk2_sig0), - .CLK1S_0(clk1_sig_sel0), - .CLK1S_1(clk1_sig_sel0), - .CLK2S_0(clk2_sig_sel0), - .CLK2S_1(clk2_sig_sel0), - .CLK2EN_0(clk2_sig_en0), - .CLK2EN_1(clk2_sig_en0), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(fifo_clk1_flush_sig0), - .CS1_1(GND), - .CS2_0(fifo_clk2_flush_sig0), - .CS2_1(GND), - .DIR_0(Fifo_Dir), - .DIR_1(GND), - .FIFO_EN_0(VCC), - .FIFO_EN_1(GND), - .P1_0(p1_sig0), - .P1_1(GND), - .P2_0(p2_sig0), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(sync_fifo0), - .SYNC_FIFO_1(GND), - .WD_1({18{GND}}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1({GND,GND}), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1({GND,GND}), - .WEN1_0({GND,GND}), - .WEN1_1({GND,GND}), - .Almost_Empty_0(Almost_Empty), - .Almost_Empty_1(), - .Almost_Full_0(Almost_Full), - .Almost_Full_1(), - .POP_FLAG_0(POP_FLAG), - .POP_FLAG_1(), - .PUSH_FLAG_0(PUSH_FLAG), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1(), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - - end - else if (data_width_int > 16) begin - - ram8k_2x1_cell_macro - _TECHMAP_REPLACE_( - .A1_0(addr_wr) , - .A1_1(addr_wr), - .A2_0(addr_rd), - .A2_1(addr_rd), - .ASYNC_FLUSH_0(Async_Flush), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(Async_Flush_Sel0), - .ASYNC_FLUSH_S1(Async_Flush_Sel0), - .CLK1_0(clk1_sig0), - .CLK1_1(clk1_sig0), - .CLK1EN_0(clk1_sig_en0), - .CLK1EN_1(clk1_sig_en0), - .CLK2_0(clk2_sig0), - .CLK2_1(clk2_sig0), - .CLK1S_0(clk1_sig_sel0), - .CLK1S_1(clk1_sig_sel0), - .CLK2S_0(clk2_sig_sel0), - .CLK2S_1(clk2_sig_sel0), - .CLK2EN_0(clk2_sig_en0), - .CLK2EN_1(clk2_sig_en0), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(fifo_clk1_flush_sig0), - .CS1_1(GND), - .CS2_0(fifo_clk2_flush_sig0), - .CS2_1(GND), - .DIR_0(Fifo_Dir), - .DIR_1(GND), - .FIFO_EN_0(VCC), - .FIFO_EN_1(GND), - .P1_0(p1_sig0), - .P1_1(GND), - .P2_0(p2_sig0), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(sync_fifo0), - .SYNC_FIFO_1(GND), - .WD_1({1'b0,in_reg0[31:24],1'b0,in_reg0[23:16]}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1({GND,GND}), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1({GND,GND}), - .WEN1_0({GND,GND}), - .WEN1_1({GND,GND}), - .Almost_Empty_0(Almost_Empty), - .Almost_Empty_1(), - .Almost_Full_0(Almost_Full), - .Almost_Full_1(), - .POP_FLAG_0(POP_FLAG), - .POP_FLAG_1(), - .PUSH_FLAG_0(PUSH_FLAG), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1({out_par0[3],out_reg0[31:24],out_par0[2],out_reg0[23:16]}), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - end - -endgenerate - - assign DOUT[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; +module FIFO_16K_BLK ( + DIN, + Fifo_Push_Flush, + Fifo_Pop_Flush, + PUSH, + POP, + Push_Clk, + Pop_Clk, + Push_Clk_En, + Pop_Clk_En, + Fifo_Dir, + Async_Flush, + Almost_Full, + Almost_Empty, + PUSH_FLAG, + POP_FLAG, + DOUT +); + + parameter data_depth_int = 512, data_width_int = 36, reg_rd_int = 0, sync_fifo_int = 0; + + input Fifo_Push_Flush, Fifo_Pop_Flush; + input Push_Clk, Pop_Clk; + input PUSH, POP; + input [data_width_int-1:0] DIN; + input Push_Clk_En, Pop_Clk_En, Fifo_Dir, Async_Flush; + output [data_width_int-1:0] DOUT; + output [3:0] PUSH_FLAG, POP_FLAG; + output Almost_Full, Almost_Empty; + + wire LS, DS, SD, LS_RB1, DS_RB1, SD_RB1; + wire VCC, GND; + + wire [10:0] addr_wr, addr_rd; + wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; + wire reg_rd0, sync_fifo0; + wire [31:0] in_reg0; + wire [31:0] out_reg0; + wire [ 1:0] WS1_0; + wire [ 1:0] WS2_0; + wire Push_Clk0_Sel, Pop_Clk0_Sel; + wire Async_Flush_Sel0; + + wire [3:0] out_par0; + wire [1:0] out_par1; + + assign LS = 1'b0; + assign DS = 1'b0; + assign SD = 1'b0; + assign LS_RB1 = 1'b0; + assign DS_RB1 = 1'b0; + assign SD_RB1 = 1'b0; + + assign VCC = 1'b1; + assign GND = 1'b0; + + assign Push_Clk0_Sel = 1'b0; + assign Pop_Clk0_Sel = 1'b0; + assign Async_Flush_Sel0 = 1'b0; + + assign reg_rd0 = reg_rd_int; + assign sync_fifo0 = sync_fifo_int; + + assign addr_wr=11'b00000000000; + assign addr_rd=11'b00000000000; + + assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; + assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; + assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; + assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; + assign clk1_sig_sel0 = Push_Clk0_Sel; + assign clk2_sig_sel0 = Pop_Clk0_Sel ; + assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; + assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; + assign p1_sig0 = Fifo_Dir ? POP : PUSH; + assign p2_sig0 = Fifo_Dir ? PUSH : POP ; + + generate + if (data_width_int == 32) begin + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end else if (data_width_int > 8 && data_width_int < 32) begin + assign in_reg0[31:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end else if (data_width_int <= 8) begin + assign in_reg0[31:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end + + if (data_width_int <= 8) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (data_width_int > 8 && data_width_int <= 16) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (data_width_int > 16) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + if (data_width_int <= 16) begin + + ram8k_2x1_cell_macro _TECHMAP_REPLACE_ ( + .A1_0(addr_wr), + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(Async_Flush_Sel0), + .CLK1_0(clk1_sig0), + .CLK1_1(clk1_sig0), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(clk1_sig_en0), + .CLK2_0(clk2_sig0), + .CLK2_1(clk2_sig0), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(clk1_sig_sel0), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(clk2_sig_sel0), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(clk2_sig_en0), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND, GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND, GND}), + .WEN1_0({GND, GND}), + .WEN1_1({GND, GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + end else if (data_width_int > 16) begin + + ram8k_2x1_cell_macro _TECHMAP_REPLACE_ ( + .A1_0(addr_wr), + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(Async_Flush_Sel0), + .CLK1_0(clk1_sig0), + .CLK1_1(clk1_sig0), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(clk1_sig_en0), + .CLK2_0(clk2_sig0), + .CLK2_1(clk2_sig0), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(clk1_sig_sel0), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(clk2_sig_sel0), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(clk2_sig_en0), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({1'b0, in_reg0[31:24], 1'b0, in_reg0[23:16]}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND, GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND, GND}), + .WEN1_0({GND, GND}), + .WEN1_1({GND, GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1({out_par0[3], out_reg0[31:24], out_par0[2], out_reg0[23:16]}), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end + + endgenerate + + assign DOUT[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; endmodule diff --git a/ql-qlf-plugin/pp3/pp3_brams_sim.v b/ql-qlf-plugin/pp3/pp3_brams_sim.v index d39276365..4d1822a5c 100644 --- a/ql-qlf-plugin/pp3/pp3_brams_sim.v +++ b/ql-qlf-plugin/pp3/pp3_brams_sim.v @@ -6,786 +6,691 @@ // // SPDX-License-Identifier:ISC -`timescale 1ns/10ps -module fifo_controller_model( - Rst_n, - Push_Clk, - Pop_Clk, - - Fifo_Push, - Fifo_Push_Flush, - Fifo_Full, - Fifo_Full_Usr, - - Fifo_Pop, - Fifo_Pop_Flush, - Fifo_Empty, - Fifo_Empty_Usr, - - Write_Addr, - - Read_Addr, - - // Static Control Signals - Fifo_Ram_Mode, - Fifo_Sync_Mode, - Fifo_Push_Width, - Fifo_Pop_Width - ); - - +`timescale 1ns / 10ps +module fifo_controller_model ( + Rst_n, + Push_Clk, + Pop_Clk, + + Fifo_Push, + Fifo_Push_Flush, + Fifo_Full, + Fifo_Full_Usr, + + Fifo_Pop, + Fifo_Pop_Flush, + Fifo_Empty, + Fifo_Empty_Usr, + + Write_Addr, + + Read_Addr, + + // Static Control Signals + Fifo_Ram_Mode, + Fifo_Sync_Mode, + Fifo_Push_Width, + Fifo_Pop_Width +); + + //************* PPII 4K Parameters **************************// - - parameter MAX_PTR_WIDTH = 12; - - parameter DEPTH1 = (1<<(MAX_PTR_WIDTH-3)); - parameter DEPTH2 = (1<<(MAX_PTR_WIDTH-2)); - parameter DEPTH3 = (1<<(MAX_PTR_WIDTH-1)); - + + parameter MAX_PTR_WIDTH = 12; + + parameter DEPTH1 = (1 << (MAX_PTR_WIDTH - 3)); + parameter DEPTH2 = (1 << (MAX_PTR_WIDTH - 2)); + parameter DEPTH3 = (1 << (MAX_PTR_WIDTH - 1)); + parameter D1_QTR_A = MAX_PTR_WIDTH - 5; parameter D2_QTR_A = MAX_PTR_WIDTH - 4; parameter D3_QTR_A = MAX_PTR_WIDTH - 3; - input Rst_n; - input Push_Clk; - input Pop_Clk; - - input Fifo_Push; - input Fifo_Push_Flush; - output Fifo_Full; - output [3:0] Fifo_Full_Usr; - - input Fifo_Pop; - input Fifo_Pop_Flush; - output Fifo_Empty; - output [3:0] Fifo_Empty_Usr; - - output [MAX_PTR_WIDTH-2:0] Write_Addr; - - output [MAX_PTR_WIDTH-2:0] Read_Addr; - - input Fifo_Ram_Mode; - input Fifo_Sync_Mode; - input [1:0] Fifo_Push_Width; - input [1:0] Fifo_Pop_Width; - - reg flush_pop_clk_tf; - reg flush_pop2push_clk1; - reg flush_push_clk_tf; - reg flush_push2pop_clk1; - reg pop_local_flush_mask; - reg push_flush_tf_pop_clk; - reg pop2push_ack1; - reg pop2push_ack2; - reg push_local_flush_mask; - reg pop_flush_tf_push_clk; - reg push2pop_ack1; - reg push2pop_ack2; - - reg fifo_full_flag_f; - reg [3:0] Fifo_Full_Usr; - - reg fifo_empty_flag_f; - reg [3:0] Fifo_Empty_Usr; - - reg [MAX_PTR_WIDTH-1:0] push_ptr_push_clk; - reg [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk; - reg [MAX_PTR_WIDTH-1:0] pop_ptr_async; - reg [MAX_PTR_WIDTH-1:0] pop_ptr_pop_clk ; - reg [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk; - reg [MAX_PTR_WIDTH-1:0] push_ptr_async; - - reg [1:0] push_ptr_push_clk_mask; - reg [1:0] pop_ptr_pop_clk_mask; - - reg [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_mux; - reg [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_mux; - - reg match_room4none; - reg match_room4one; - reg match_room4half; - reg match_room4quart; - - reg match_all_left; - reg match_half_left; - reg match_quart_left; - - reg [MAX_PTR_WIDTH-1:0] depth1_reg; - reg [MAX_PTR_WIDTH-1:0] depth2_reg; - reg [MAX_PTR_WIDTH-1:0] depth3_reg; - - - wire push_clk_rst; - wire push_clk_rst_mux; - wire push_flush_done; - wire pop_clk_rst; - wire pop_clk_rst_mux; - wire pop_flush_done; - - wire push_flush_gated; - wire pop_flush_gated; - - wire [MAX_PTR_WIDTH-2:0] Write_Addr; - wire [MAX_PTR_WIDTH-2:0] Read_Addr; - - wire [MAX_PTR_WIDTH-1:0] push_ptr_push_clk_plus1; - wire [MAX_PTR_WIDTH-1:0] next_push_ptr_push_clk; - wire [MAX_PTR_WIDTH-1:0] pop_ptr_pop_clk_plus1; - wire [MAX_PTR_WIDTH-1:0] next_pop_ptr_pop_clk; - wire [MAX_PTR_WIDTH-1:0] next_push_ptr_push_clk_mask; - wire [MAX_PTR_WIDTH-1:0] next_pop_ptr_pop_clk_mask; - - wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_l_shift1; - wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_l_shift2; - wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_r_shift1; - wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_r_shift2; - - wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_l_shift1; - wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_l_shift2; - wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_r_shift1; - wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_r_shift2; - - wire [MAX_PTR_WIDTH-1:0] push_diff; - wire [MAX_PTR_WIDTH-1:0] push_diff_plus_1; - wire [MAX_PTR_WIDTH-1:0] pop_diff; - - wire match_room4all; - wire match_room4eight; - - wire match_one_left; - wire match_one2eight_left; - - integer depth_sel_push; - integer depth_sel_pop; - - initial - begin + input Rst_n; + input Push_Clk; + input Pop_Clk; + + input Fifo_Push; + input Fifo_Push_Flush; + output Fifo_Full; + output [3:0] Fifo_Full_Usr; + + input Fifo_Pop; + input Fifo_Pop_Flush; + output Fifo_Empty; + output [3:0] Fifo_Empty_Usr; + + output [MAX_PTR_WIDTH-2:0] Write_Addr; + + output [MAX_PTR_WIDTH-2:0] Read_Addr; + + input Fifo_Ram_Mode; + input Fifo_Sync_Mode; + input [1:0] Fifo_Push_Width; + input [1:0] Fifo_Pop_Width; + + reg flush_pop_clk_tf; + reg flush_pop2push_clk1; + reg flush_push_clk_tf; + reg flush_push2pop_clk1; + reg pop_local_flush_mask; + reg push_flush_tf_pop_clk; + reg pop2push_ack1; + reg pop2push_ack2; + reg push_local_flush_mask; + reg pop_flush_tf_push_clk; + reg push2pop_ack1; + reg push2pop_ack2; + + reg fifo_full_flag_f; + reg [3:0] Fifo_Full_Usr; + + reg fifo_empty_flag_f; + reg [3:0] Fifo_Empty_Usr; + + reg [MAX_PTR_WIDTH-1:0] push_ptr_push_clk; + reg [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk; + reg [MAX_PTR_WIDTH-1:0] pop_ptr_async; + reg [MAX_PTR_WIDTH-1:0] pop_ptr_pop_clk ; + reg [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk; + reg [MAX_PTR_WIDTH-1:0] push_ptr_async; + + reg [1:0] push_ptr_push_clk_mask; + reg [1:0] pop_ptr_pop_clk_mask; + + reg [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_mux; + reg [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_mux; + + reg match_room4none; + reg match_room4one; + reg match_room4half; + reg match_room4quart; + + reg match_all_left; + reg match_half_left; + reg match_quart_left; + + reg [MAX_PTR_WIDTH-1:0] depth1_reg; + reg [MAX_PTR_WIDTH-1:0] depth2_reg; + reg [MAX_PTR_WIDTH-1:0] depth3_reg; + + + wire push_clk_rst; + wire push_clk_rst_mux; + wire push_flush_done; + wire pop_clk_rst; + wire pop_clk_rst_mux; + wire pop_flush_done; + + wire push_flush_gated; + wire pop_flush_gated; + + wire [MAX_PTR_WIDTH-2:0] Write_Addr; + wire [MAX_PTR_WIDTH-2:0] Read_Addr; + + wire [MAX_PTR_WIDTH-1:0] push_ptr_push_clk_plus1; + wire [MAX_PTR_WIDTH-1:0] next_push_ptr_push_clk; + wire [MAX_PTR_WIDTH-1:0] pop_ptr_pop_clk_plus1; + wire [MAX_PTR_WIDTH-1:0] next_pop_ptr_pop_clk; + wire [MAX_PTR_WIDTH-1:0] next_push_ptr_push_clk_mask; + wire [MAX_PTR_WIDTH-1:0] next_pop_ptr_pop_clk_mask; + + wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_l_shift1; + wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_l_shift2; + wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_r_shift1; + wire [MAX_PTR_WIDTH-1:0] pop_ptr_push_clk_r_shift2; + + wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_l_shift1; + wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_l_shift2; + wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_r_shift1; + wire [MAX_PTR_WIDTH-1:0] push_ptr_pop_clk_r_shift2; + + wire [MAX_PTR_WIDTH-1:0] push_diff; + wire [MAX_PTR_WIDTH-1:0] push_diff_plus_1; + wire [MAX_PTR_WIDTH-1:0] pop_diff; + + wire match_room4all; + wire match_room4eight; + + wire match_one_left; + wire match_one2eight_left; + + integer depth_sel_push; + integer depth_sel_pop; + + initial begin depth1_reg = DEPTH1; depth2_reg = DEPTH2; depth3_reg = DEPTH3; end - - initial - begin - flush_pop_clk_tf <= 1'b0; - push2pop_ack1 <= 1'b0; - push2pop_ack2 <= 1'b0; - pop_local_flush_mask <= 1'b0; - flush_push2pop_clk1 <= 1'b0; - push_flush_tf_pop_clk <= 1'b0; - flush_push_clk_tf <= 1'b0; - pop2push_ack1 <= 1'b0; - pop2push_ack2 <= 1'b0; - push_local_flush_mask <= 1'b0; - flush_pop2push_clk1 <= 1'b0; - pop_flush_tf_push_clk <= 1'b0; - push_ptr_push_clk <= 0; - pop_ptr_push_clk <= 0; - pop_ptr_async <= 0; - fifo_full_flag_f <= 0; - pop_ptr_pop_clk <= 0; - push_ptr_pop_clk <= 0; - push_ptr_async <= 0; - fifo_empty_flag_f <= 1; - Fifo_Full_Usr <= 4'b0001; - Fifo_Empty_Usr <= 4'b0000; - end - - assign Fifo_Full = fifo_full_flag_f; - assign Fifo_Empty = fifo_empty_flag_f; - - assign Write_Addr = push_ptr_push_clk[MAX_PTR_WIDTH-2:0]; - assign Read_Addr = next_pop_ptr_pop_clk[MAX_PTR_WIDTH-2:0]; - - assign push_ptr_push_clk_plus1 = push_ptr_push_clk + 1; - assign next_push_ptr_push_clk = ( Fifo_Push ) ? push_ptr_push_clk_plus1 : push_ptr_push_clk; - assign next_push_ptr_push_clk_mask = { ( push_ptr_push_clk_mask & next_push_ptr_push_clk[MAX_PTR_WIDTH-1:MAX_PTR_WIDTH-2] ), next_push_ptr_push_clk[MAX_PTR_WIDTH-3:0] }; - - assign pop_ptr_pop_clk_plus1 = pop_ptr_pop_clk + 1; - assign next_pop_ptr_pop_clk = ( Fifo_Pop ) ? pop_ptr_pop_clk_plus1 : pop_ptr_pop_clk; - assign next_pop_ptr_pop_clk_mask = { ( pop_ptr_pop_clk_mask & next_pop_ptr_pop_clk[MAX_PTR_WIDTH-1:MAX_PTR_WIDTH-2] ), next_pop_ptr_pop_clk[MAX_PTR_WIDTH-3:0] }; - - assign pop_ptr_push_clk_l_shift1 = { pop_ptr_push_clk[MAX_PTR_WIDTH-2:0], 1'b0 }; - assign pop_ptr_push_clk_l_shift2 = { pop_ptr_push_clk[MAX_PTR_WIDTH-3:0], 2'b0 }; - assign pop_ptr_push_clk_r_shift1 = { 1'b0, pop_ptr_push_clk[MAX_PTR_WIDTH-1:1] }; - assign pop_ptr_push_clk_r_shift2 = { 2'b0, pop_ptr_push_clk[MAX_PTR_WIDTH-1:2] }; - - assign push_ptr_pop_clk_l_shift1 = { push_ptr_pop_clk[MAX_PTR_WIDTH-2:0], 1'b0 }; - assign push_ptr_pop_clk_l_shift2 = { push_ptr_pop_clk[MAX_PTR_WIDTH-3:0], 2'b0 }; - assign push_ptr_pop_clk_r_shift1 = { 1'b0, push_ptr_pop_clk[MAX_PTR_WIDTH-1:1] }; - assign push_ptr_pop_clk_r_shift2 = { 2'b0, push_ptr_pop_clk[MAX_PTR_WIDTH-1:2] }; - - assign push_diff = next_push_ptr_push_clk_mask - pop_ptr_push_clk_mux; - assign push_diff_plus_1 = push_diff + 1; - assign pop_diff = push_ptr_pop_clk_mux - next_pop_ptr_pop_clk_mask; - - assign match_room4all = ~|push_diff; - assign match_room4eight = ( depth_sel_push == 3 ) ? ( push_diff >= DEPTH3-8 ) : ( depth_sel_push == 2 ) ? ( push_diff >= DEPTH2-8 ) : ( push_diff >= DEPTH1-8 ); - - assign match_one_left = ( pop_diff == 1 ); - assign match_one2eight_left = ( pop_diff < 8 ); - - assign push_flush_gated = Fifo_Push_Flush & ~push_local_flush_mask; - assign pop_flush_gated = Fifo_Pop_Flush & ~pop_local_flush_mask; - - assign push_clk_rst = flush_pop2push_clk1 ^ pop_flush_tf_push_clk; - assign pop_clk_rst = flush_push2pop_clk1 ^ push_flush_tf_pop_clk; - - assign pop_flush_done = push2pop_ack1 ^ push2pop_ack2; - assign push_flush_done = pop2push_ack1 ^ pop2push_ack2; - - assign push_clk_rst_mux = ( Fifo_Sync_Mode ) ? ( Fifo_Push_Flush | Fifo_Pop_Flush ) : ( push_flush_gated | push_clk_rst ); - assign pop_clk_rst_mux = ( Fifo_Sync_Mode ) ? ( Fifo_Push_Flush | Fifo_Pop_Flush ) : ( pop_flush_gated | ( pop_local_flush_mask & ~pop_flush_done ) | pop_clk_rst ); - - - reg match_room_at_most63, match_at_most63_left; - - always@( push_diff or push_diff_plus_1 or depth_sel_push or match_room4none or match_room4one ) - begin - if( depth_sel_push == 1 ) - begin - match_room4none <= ( push_diff[D1_QTR_A+2:0] == depth1_reg[D1_QTR_A+2:0] ); -// syao 2/12/2013 - match_room4one <= ( push_diff_plus_1[D1_QTR_A+2:0] == depth1_reg ) | match_room4none; - - match_room4half <= ( push_diff[D1_QTR_A+1] == 1'b1 ); - match_room4quart <= ( push_diff[D1_QTR_A] == 1'b1 ); - - match_room_at_most63 <= push_diff[6]; - end - else if( depth_sel_push == 2 ) - begin - match_room4none <= ( push_diff[D2_QTR_A+2:0] == depth2_reg[D2_QTR_A+2:0] ); -// syao 2/12/2013 - match_room4one <= ( push_diff_plus_1[D2_QTR_A+2:0] == depth2_reg ) | match_room4none; - - match_room4half <= ( push_diff[D2_QTR_A+1] == 1'b1 ); - match_room4quart <= ( push_diff[D2_QTR_A] == 1'b1 ); - -// syao 2/12/2013 -// match_room_at_most63 <= push_diff[6]; - match_room_at_most63 <= &push_diff[7:6]; - end - else - begin - match_room4none <= ( push_diff == depth3_reg ); - match_room4one <= ( push_diff_plus_1 == depth3_reg ) | match_room4none; - - match_room4half <= ( push_diff[D3_QTR_A+1] == 1'b1 ); - match_room4quart <= ( push_diff[D3_QTR_A] == 1'b1 ); - -// syao 2/12/2013 -// match_room_at_most63 <= &push_diff[7:6]; - match_room_at_most63 <= &push_diff[8:6]; - end - end - - - - assign room4_32s = ~push_diff[5]; - assign room4_16s = ~push_diff[4]; - assign room4_8s = ~push_diff[3]; - assign room4_4s = ~push_diff[2]; - assign room4_2s = ~push_diff[1]; - assign room4_1s = &push_diff[1:0]; - - always@( depth_sel_pop or pop_diff ) - begin - if( depth_sel_pop == 1 ) - begin - match_all_left <= ( pop_diff[D1_QTR_A+2:0] == depth1_reg[D1_QTR_A+2:0] ); - - match_half_left <= ( pop_diff[D1_QTR_A+1] == 1'b1 ); - match_quart_left <= ( pop_diff[D1_QTR_A] == 1'b1 ); - - match_at_most63_left <= ~pop_diff[6]; - end - else if( depth_sel_pop == 2 ) - begin - match_all_left <= ( pop_diff[D2_QTR_A+2:0] == depth2_reg[D2_QTR_A+2:0] ); - - match_half_left <= ( pop_diff[D2_QTR_A+1] == 1'b1 ); - match_quart_left <= ( pop_diff[D2_QTR_A] == 1'b1 ); - -// syao 2/12/2013 -// match_at_most63_left <= ~pop_diff[6]; - match_at_most63_left <= ~|pop_diff[7:6]; - end - else - begin - match_all_left <= ( pop_diff == depth3_reg ); - - match_half_left <= ( pop_diff[D3_QTR_A+1] == 1'b1 ); - match_quart_left <= ( pop_diff[D3_QTR_A] == 1'b1 ); - -// syao 2/12/2013 -// match_at_most63_left <= ~|pop_diff[7:6]; - match_at_most63_left <= ~|pop_diff[8:6]; - end - end - - - - assign at_least_32 = pop_diff[5]; - assign at_least_16 = pop_diff[4]; - assign at_least_8 = pop_diff[3]; - assign at_least_4 = pop_diff[2]; - assign at_least_2 = pop_diff[1]; - assign one_left = pop_diff[0]; - - - always@( posedge Pop_Clk or negedge Rst_n ) - begin - if( ~Rst_n ) - begin - push2pop_ack1 <= 1'b0; - push2pop_ack2 <= 1'b0; - flush_pop_clk_tf <= 1'b0; - pop_local_flush_mask <= 1'b0; - flush_push2pop_clk1 <= 1'b0; - push_flush_tf_pop_clk <= 1'b0; - end - else - begin - push2pop_ack1 <= pop_flush_tf_push_clk; - push2pop_ack2 <= push2pop_ack1; - flush_push2pop_clk1 <= flush_push_clk_tf; - if( pop_flush_gated ) - begin - flush_pop_clk_tf <= ~flush_pop_clk_tf; - end - - if( pop_flush_gated & ~Fifo_Sync_Mode ) - begin - pop_local_flush_mask <= 1'b1; - end - else if( pop_flush_done ) - begin - pop_local_flush_mask <= 1'b0; - end - - if( pop_clk_rst ) - begin - push_flush_tf_pop_clk <= ~push_flush_tf_pop_clk; - end - end - end - always@( posedge Push_Clk or negedge Rst_n ) + initial begin + flush_pop_clk_tf <= 1'b0; + push2pop_ack1 <= 1'b0; + push2pop_ack2 <= 1'b0; + pop_local_flush_mask <= 1'b0; + flush_push2pop_clk1 <= 1'b0; + push_flush_tf_pop_clk <= 1'b0; + flush_push_clk_tf <= 1'b0; + pop2push_ack1 <= 1'b0; + pop2push_ack2 <= 1'b0; + push_local_flush_mask <= 1'b0; + flush_pop2push_clk1 <= 1'b0; + pop_flush_tf_push_clk <= 1'b0; + push_ptr_push_clk <= 0; + pop_ptr_push_clk <= 0; + pop_ptr_async <= 0; + fifo_full_flag_f <= 0; + pop_ptr_pop_clk <= 0; + push_ptr_pop_clk <= 0; + push_ptr_async <= 0; + fifo_empty_flag_f <= 1; + Fifo_Full_Usr <= 4'b0001; + Fifo_Empty_Usr <= 4'b0000; + end + + assign Fifo_Full = fifo_full_flag_f; + assign Fifo_Empty = fifo_empty_flag_f; + + assign Write_Addr = push_ptr_push_clk[MAX_PTR_WIDTH-2:0]; + assign Read_Addr = next_pop_ptr_pop_clk[MAX_PTR_WIDTH-2:0]; + + assign push_ptr_push_clk_plus1 = push_ptr_push_clk + 1; + assign next_push_ptr_push_clk = (Fifo_Push) ? push_ptr_push_clk_plus1 : push_ptr_push_clk; + assign next_push_ptr_push_clk_mask = { + (push_ptr_push_clk_mask & next_push_ptr_push_clk[MAX_PTR_WIDTH-1:MAX_PTR_WIDTH-2]), + next_push_ptr_push_clk[MAX_PTR_WIDTH-3:0] + }; + + assign pop_ptr_pop_clk_plus1 = pop_ptr_pop_clk + 1; + assign next_pop_ptr_pop_clk = (Fifo_Pop) ? pop_ptr_pop_clk_plus1 : pop_ptr_pop_clk; + assign next_pop_ptr_pop_clk_mask = { + (pop_ptr_pop_clk_mask & next_pop_ptr_pop_clk[MAX_PTR_WIDTH-1:MAX_PTR_WIDTH-2]), + next_pop_ptr_pop_clk[MAX_PTR_WIDTH-3:0] + }; + + assign pop_ptr_push_clk_l_shift1 = {pop_ptr_push_clk[MAX_PTR_WIDTH-2:0], 1'b0}; + assign pop_ptr_push_clk_l_shift2 = {pop_ptr_push_clk[MAX_PTR_WIDTH-3:0], 2'b0}; + assign pop_ptr_push_clk_r_shift1 = {1'b0, pop_ptr_push_clk[MAX_PTR_WIDTH-1:1]}; + assign pop_ptr_push_clk_r_shift2 = {2'b0, pop_ptr_push_clk[MAX_PTR_WIDTH-1:2]}; + + assign push_ptr_pop_clk_l_shift1 = {push_ptr_pop_clk[MAX_PTR_WIDTH-2:0], 1'b0}; + assign push_ptr_pop_clk_l_shift2 = {push_ptr_pop_clk[MAX_PTR_WIDTH-3:0], 2'b0}; + assign push_ptr_pop_clk_r_shift1 = {1'b0, push_ptr_pop_clk[MAX_PTR_WIDTH-1:1]}; + assign push_ptr_pop_clk_r_shift2 = {2'b0, push_ptr_pop_clk[MAX_PTR_WIDTH-1:2]}; + + assign push_diff = next_push_ptr_push_clk_mask - pop_ptr_push_clk_mux; + assign push_diff_plus_1 = push_diff + 1; + assign pop_diff = push_ptr_pop_clk_mux - next_pop_ptr_pop_clk_mask; + + assign match_room4all = ~|push_diff; + assign match_room4eight = ( depth_sel_push == 3 ) ? ( push_diff >= DEPTH3-8 ) : ( depth_sel_push == 2 ) ? ( push_diff >= DEPTH2-8 ) : ( push_diff >= DEPTH1-8 ); + + assign match_one_left = (pop_diff == 1); + assign match_one2eight_left = (pop_diff < 8); + + assign push_flush_gated = Fifo_Push_Flush & ~push_local_flush_mask; + assign pop_flush_gated = Fifo_Pop_Flush & ~pop_local_flush_mask; + + assign push_clk_rst = flush_pop2push_clk1 ^ pop_flush_tf_push_clk; + assign pop_clk_rst = flush_push2pop_clk1 ^ push_flush_tf_pop_clk; + + assign pop_flush_done = push2pop_ack1 ^ push2pop_ack2; + assign push_flush_done = pop2push_ack1 ^ pop2push_ack2; + + assign push_clk_rst_mux = ( Fifo_Sync_Mode ) ? ( Fifo_Push_Flush | Fifo_Pop_Flush ) : ( push_flush_gated | push_clk_rst ); + assign pop_clk_rst_mux = ( Fifo_Sync_Mode ) ? ( Fifo_Push_Flush | Fifo_Pop_Flush ) : ( pop_flush_gated | ( pop_local_flush_mask & ~pop_flush_done ) | pop_clk_rst ); + + + reg match_room_at_most63, match_at_most63_left; + + always@( push_diff or push_diff_plus_1 or depth_sel_push or match_room4none or match_room4one ) begin - if( ~Rst_n ) - begin - pop2push_ack1 <= 1'b0; - pop2push_ack2 <= 1'b0; - flush_push_clk_tf <= 1'b0; - push_local_flush_mask <= 1'b0; - flush_pop2push_clk1 <= 1'b0; - pop_flush_tf_push_clk <= 1'b0; - end - else - begin - pop2push_ack1 <= push_flush_tf_pop_clk; - pop2push_ack2 <= pop2push_ack1; - flush_pop2push_clk1 <= flush_pop_clk_tf; - if( push_flush_gated ) - begin - flush_push_clk_tf <= ~flush_push_clk_tf; - end - - if( push_flush_gated & ~Fifo_Sync_Mode ) - begin - push_local_flush_mask <= 1'b1; - end - else if( push_flush_done ) - begin - push_local_flush_mask <= 1'b0; - end - - if( push_clk_rst ) - begin - pop_flush_tf_push_clk <= ~pop_flush_tf_push_clk; - end - end - end + if (depth_sel_push == 1) begin + match_room4none <= ( push_diff[D1_QTR_A+2:0] == depth1_reg[D1_QTR_A+2:0] ); + // syao 2/12/2013 + match_room4one <= ( push_diff_plus_1[D1_QTR_A+2:0] == depth1_reg ) | match_room4none; + + match_room4half <= ( push_diff[D1_QTR_A+1] == 1'b1 ); + match_room4quart <= ( push_diff[D1_QTR_A] == 1'b1 ); + + match_room_at_most63 <= push_diff[6]; + end else if (depth_sel_push == 2) begin + match_room4none <= ( push_diff[D2_QTR_A+2:0] == depth2_reg[D2_QTR_A+2:0] ); + // syao 2/12/2013 + match_room4one <= ( push_diff_plus_1[D2_QTR_A+2:0] == depth2_reg ) | match_room4none; + + match_room4half <= ( push_diff[D2_QTR_A+1] == 1'b1 ); + match_room4quart <= ( push_diff[D2_QTR_A] == 1'b1 ); + + // syao 2/12/2013 + // match_room_at_most63 <= push_diff[6]; + match_room_at_most63 <= &push_diff[7:6]; + end else begin + match_room4none <= (push_diff == depth3_reg); + match_room4one <= (push_diff_plus_1 == depth3_reg) | match_room4none; + + match_room4half <= (push_diff[D3_QTR_A+1] == 1'b1); + match_room4quart <= (push_diff[D3_QTR_A] == 1'b1); + + // syao 2/12/2013 + // match_room_at_most63 <= &push_diff[7:6]; + match_room_at_most63 <= &push_diff[8:6]; + end + end + + + + assign room4_32s = ~push_diff[5]; + assign room4_16s = ~push_diff[4]; + assign room4_8s = ~push_diff[3]; + assign room4_4s = ~push_diff[2]; + assign room4_2s = ~push_diff[1]; + assign room4_1s = &push_diff[1:0]; - always@( Fifo_Push_Width or Fifo_Pop_Width or pop_ptr_push_clk_l_shift1 or pop_ptr_push_clk_l_shift2 or pop_ptr_push_clk_r_shift1 or + always @(depth_sel_pop or pop_diff) begin + if (depth_sel_pop == 1) begin + match_all_left <= (pop_diff[D1_QTR_A+2:0] == depth1_reg[D1_QTR_A+2:0]); + + match_half_left <= (pop_diff[D1_QTR_A+1] == 1'b1); + match_quart_left <= (pop_diff[D1_QTR_A] == 1'b1); + + match_at_most63_left <= ~pop_diff[6]; + end else if (depth_sel_pop == 2) begin + match_all_left <= (pop_diff[D2_QTR_A+2:0] == depth2_reg[D2_QTR_A+2:0]); + + match_half_left <= (pop_diff[D2_QTR_A+1] == 1'b1); + match_quart_left <= (pop_diff[D2_QTR_A] == 1'b1); + + // syao 2/12/2013 + // match_at_most63_left <= ~pop_diff[6]; + match_at_most63_left <= ~|pop_diff[7:6]; + end else begin + match_all_left <= (pop_diff == depth3_reg); + + match_half_left <= (pop_diff[D3_QTR_A+1] == 1'b1); + match_quart_left <= (pop_diff[D3_QTR_A] == 1'b1); + + // syao 2/12/2013 + // match_at_most63_left <= ~|pop_diff[7:6]; + match_at_most63_left <= ~|pop_diff[8:6]; + end + end + + + + assign at_least_32 = pop_diff[5]; + assign at_least_16 = pop_diff[4]; + assign at_least_8 = pop_diff[3]; + assign at_least_4 = pop_diff[2]; + assign at_least_2 = pop_diff[1]; + assign one_left = pop_diff[0]; + + + always @(posedge Pop_Clk or negedge Rst_n) begin + if (~Rst_n) begin + push2pop_ack1 <= 1'b0; + push2pop_ack2 <= 1'b0; + flush_pop_clk_tf <= 1'b0; + pop_local_flush_mask <= 1'b0; + flush_push2pop_clk1 <= 1'b0; + push_flush_tf_pop_clk <= 1'b0; + end else begin + push2pop_ack1 <= pop_flush_tf_push_clk; + push2pop_ack2 <= push2pop_ack1; + flush_push2pop_clk1 <= flush_push_clk_tf; + if (pop_flush_gated) begin + flush_pop_clk_tf <= ~flush_pop_clk_tf; + end + + if (pop_flush_gated & ~Fifo_Sync_Mode) begin + pop_local_flush_mask <= 1'b1; + end else if (pop_flush_done) begin + pop_local_flush_mask <= 1'b0; + end + + if (pop_clk_rst) begin + push_flush_tf_pop_clk <= ~push_flush_tf_pop_clk; + end + end + end + + always @(posedge Push_Clk or negedge Rst_n) begin + if (~Rst_n) begin + pop2push_ack1 <= 1'b0; + pop2push_ack2 <= 1'b0; + flush_push_clk_tf <= 1'b0; + push_local_flush_mask <= 1'b0; + flush_pop2push_clk1 <= 1'b0; + pop_flush_tf_push_clk <= 1'b0; + end else begin + pop2push_ack1 <= push_flush_tf_pop_clk; + pop2push_ack2 <= pop2push_ack1; + flush_pop2push_clk1 <= flush_pop_clk_tf; + if (push_flush_gated) begin + flush_push_clk_tf <= ~flush_push_clk_tf; + end + + if (push_flush_gated & ~Fifo_Sync_Mode) begin + push_local_flush_mask <= 1'b1; + end else if (push_flush_done) begin + push_local_flush_mask <= 1'b0; + end + + if (push_clk_rst) begin + pop_flush_tf_push_clk <= ~pop_flush_tf_push_clk; + end + end + end + + always@( Fifo_Push_Width or Fifo_Pop_Width or pop_ptr_push_clk_l_shift1 or pop_ptr_push_clk_l_shift2 or pop_ptr_push_clk_r_shift1 or pop_ptr_push_clk_r_shift2 or push_ptr_pop_clk_l_shift1 or push_ptr_pop_clk_l_shift2 or push_ptr_pop_clk_r_shift1 or push_ptr_pop_clk_r_shift2 or pop_ptr_push_clk or push_ptr_pop_clk ) begin - case( { Fifo_Push_Width, Fifo_Pop_Width } ) - 4'b0001: // byte push halfword pop + case ({ + Fifo_Push_Width, Fifo_Pop_Width + }) + 4'b0001: // byte push halfword pop begin - push_ptr_push_clk_mask <= 2'b11; - pop_ptr_pop_clk_mask <= 2'b01; - pop_ptr_push_clk_mux <= pop_ptr_push_clk_l_shift1; - push_ptr_pop_clk_mux <= push_ptr_pop_clk_r_shift1; - end - 4'b0010: // byte push word pop + push_ptr_push_clk_mask <= 2'b11; + pop_ptr_pop_clk_mask <= 2'b01; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_l_shift1; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_r_shift1; + end + 4'b0010: // byte push word pop begin - push_ptr_push_clk_mask <= 2'b11; - pop_ptr_pop_clk_mask <= 2'b00; - pop_ptr_push_clk_mux <= pop_ptr_push_clk_l_shift2; - push_ptr_pop_clk_mux <= push_ptr_pop_clk_r_shift2; - end - 4'b0100: // halfword push byte pop + push_ptr_push_clk_mask <= 2'b11; + pop_ptr_pop_clk_mask <= 2'b00; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_l_shift2; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_r_shift2; + end + 4'b0100: // halfword push byte pop begin - push_ptr_push_clk_mask <= 2'b01; - pop_ptr_pop_clk_mask <= 2'b11; - pop_ptr_push_clk_mux <= pop_ptr_push_clk_r_shift1; - push_ptr_pop_clk_mux <= push_ptr_pop_clk_l_shift1; - end + push_ptr_push_clk_mask <= 2'b01; + pop_ptr_pop_clk_mask <= 2'b11; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_r_shift1; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_l_shift1; + end 4'b0110: // halfword push word pop begin - push_ptr_push_clk_mask <= 2'b11; - pop_ptr_pop_clk_mask <= 2'b01; - pop_ptr_push_clk_mux <= pop_ptr_push_clk_l_shift1; - push_ptr_pop_clk_mux <= push_ptr_pop_clk_r_shift1; - end - 4'b1000: // word push byte pop + push_ptr_push_clk_mask <= 2'b11; + pop_ptr_pop_clk_mask <= 2'b01; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_l_shift1; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_r_shift1; + end + 4'b1000: // word push byte pop begin - push_ptr_push_clk_mask <= 2'b00; - pop_ptr_pop_clk_mask <= 2'b11; - pop_ptr_push_clk_mux <= pop_ptr_push_clk_r_shift2; - push_ptr_pop_clk_mux <= push_ptr_pop_clk_l_shift2; - end - 4'b1001: // word push halfword pop + push_ptr_push_clk_mask <= 2'b00; + pop_ptr_pop_clk_mask <= 2'b11; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_r_shift2; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_l_shift2; + end + 4'b1001: // word push halfword pop begin - push_ptr_push_clk_mask <= 2'b01; - pop_ptr_pop_clk_mask <= 2'b11; - pop_ptr_push_clk_mux <= pop_ptr_push_clk_r_shift1; - push_ptr_pop_clk_mux <= push_ptr_pop_clk_l_shift1; - end + push_ptr_push_clk_mask <= 2'b01; + pop_ptr_pop_clk_mask <= 2'b11; + pop_ptr_push_clk_mux <= pop_ptr_push_clk_r_shift1; + push_ptr_pop_clk_mux <= push_ptr_pop_clk_l_shift1; + end default: // no conversion begin - push_ptr_push_clk_mask <= 2'b11; - pop_ptr_pop_clk_mask <= 2'b11; - pop_ptr_push_clk_mux <= pop_ptr_push_clk; - push_ptr_pop_clk_mux <= push_ptr_pop_clk; - end - endcase - end - - always@( Fifo_Ram_Mode or Fifo_Push_Width ) - begin - if( Fifo_Ram_Mode == Fifo_Push_Width[0] ) - begin - depth_sel_push <= 2; - end - else if( Fifo_Ram_Mode == Fifo_Push_Width[1] ) - begin - depth_sel_push <= 1; - end - else - begin - depth_sel_push <= 3; - end - end + push_ptr_push_clk_mask <= 2'b11; + pop_ptr_pop_clk_mask <= 2'b11; + pop_ptr_push_clk_mux <= pop_ptr_push_clk; + push_ptr_pop_clk_mux <= push_ptr_pop_clk; + end + endcase + end - always@( Fifo_Ram_Mode or Fifo_Pop_Width ) - begin - if( Fifo_Ram_Mode == Fifo_Pop_Width[0] ) - begin - depth_sel_pop <= 2; - end - else if( Fifo_Ram_Mode == Fifo_Pop_Width[1] ) - begin - depth_sel_pop <= 1; - end - else - begin - depth_sel_pop <= 3; - end - end + always @(Fifo_Ram_Mode or Fifo_Push_Width) begin + if (Fifo_Ram_Mode == Fifo_Push_Width[0]) begin + depth_sel_push <= 2; + end else if (Fifo_Ram_Mode == Fifo_Push_Width[1]) begin + depth_sel_push <= 1; + end else begin + depth_sel_push <= 3; + end + end - always@( posedge Push_Clk or negedge Rst_n ) - begin - if( ~Rst_n ) - begin - push_ptr_push_clk <= 0; - pop_ptr_push_clk <= 0; - pop_ptr_async <= 0; - fifo_full_flag_f <= 0; - end - else - begin - if( push_clk_rst_mux ) - begin - push_ptr_push_clk <= 0; - pop_ptr_push_clk <= 0; - pop_ptr_async <= 0; - fifo_full_flag_f <= 0; - end - else - begin - push_ptr_push_clk <= next_push_ptr_push_clk; - pop_ptr_push_clk <= ( Fifo_Sync_Mode ) ? next_pop_ptr_pop_clk : pop_ptr_async; - pop_ptr_async <= pop_ptr_pop_clk; - fifo_full_flag_f <= match_room4one | match_room4none; - end - end - end - - always@( posedge Pop_Clk or negedge Rst_n ) - begin - if( ~Rst_n ) - begin - pop_ptr_pop_clk <= 0; - push_ptr_pop_clk <= 0; - push_ptr_async <= 0; - fifo_empty_flag_f <= 1; - end - else - begin - if( pop_clk_rst_mux ) - begin - pop_ptr_pop_clk <= 0; - push_ptr_pop_clk <= 0; - push_ptr_async <= 0; - fifo_empty_flag_f <= 1; - end - else - begin - pop_ptr_pop_clk <= next_pop_ptr_pop_clk; - push_ptr_pop_clk <= ( Fifo_Sync_Mode ) ? next_push_ptr_push_clk : push_ptr_async; - push_ptr_async <= push_ptr_push_clk; - fifo_empty_flag_f <= ( pop_diff == 1 ) | ( pop_diff == 0 ); - end - end - end - - always@( posedge Push_Clk or negedge Rst_n ) - begin - if( ~Rst_n ) - begin + always @(Fifo_Ram_Mode or Fifo_Pop_Width) begin + if (Fifo_Ram_Mode == Fifo_Pop_Width[0]) begin + depth_sel_pop <= 2; + end else if (Fifo_Ram_Mode == Fifo_Pop_Width[1]) begin + depth_sel_pop <= 1; + end else begin + depth_sel_pop <= 3; + end + end -//based on rtl, this should be full after reset -// Fifo_Full_Usr <= 4'b1000; - Fifo_Full_Usr <= 4'b0001; - end - else - begin - if( match_room4none ) - begin - Fifo_Full_Usr <= 4'b0000; - end - else if( match_room4all ) - begin - Fifo_Full_Usr <= 4'b0001; - end - else if( ~match_room4half ) - begin - Fifo_Full_Usr <= 4'b0010; - end - else if( ~match_room4quart ) - begin - Fifo_Full_Usr <= 4'b0011; - end - else - begin - if (match_room_at_most63) - begin - if (room4_32s) - Fifo_Full_Usr <= 4'b1010; - else if (room4_16s) - Fifo_Full_Usr <= 4'b1011; - else if (room4_8s) - Fifo_Full_Usr <= 4'b1100; - else if (room4_4s) - Fifo_Full_Usr <= 4'b1101; - else if (room4_2s) - Fifo_Full_Usr <= 4'b1110; - else if (room4_1s) - Fifo_Full_Usr <= 4'b1111; - else - Fifo_Full_Usr <= 4'b1110; - end - else - Fifo_Full_Usr <= 4'b0100; - end - end - end - - always@( posedge Pop_Clk or negedge Rst_n ) - begin - if( ~Rst_n ) - begin - Fifo_Empty_Usr <= 4'b0000; - end - else - begin - if( Fifo_Pop_Flush | ( pop_local_flush_mask & ~pop_flush_done ) | pop_clk_rst ) - begin - Fifo_Empty_Usr <= 4'b0000; - end - else - if( match_all_left ) - begin - Fifo_Empty_Usr <= 4'b1111; - end - else if( match_half_left ) - begin - Fifo_Empty_Usr <= 4'b1110; - end - else if( match_quart_left ) - begin - Fifo_Empty_Usr <= 4'b1101; - end - else - begin - if (match_at_most63_left) - begin - if (at_least_32) - Fifo_Empty_Usr <= 4'b0110; - else if (at_least_16) - Fifo_Empty_Usr <= 4'b0101; - else if (at_least_8) - Fifo_Empty_Usr <= 4'b0100; - else if (at_least_4) - Fifo_Empty_Usr <= 4'b0011; - else if (at_least_2) - Fifo_Empty_Usr <= 4'b0010; - else if (one_left) - Fifo_Empty_Usr <= 4'b0001; - else Fifo_Empty_Usr <= 4'b0000; - end - else - Fifo_Empty_Usr <= 4'b1000; - end - end - end + always @(posedge Push_Clk or negedge Rst_n) begin + if (~Rst_n) begin + push_ptr_push_clk <= 0; + pop_ptr_push_clk <= 0; + pop_ptr_async <= 0; + fifo_full_flag_f <= 0; + end else begin + if (push_clk_rst_mux) begin + push_ptr_push_clk <= 0; + pop_ptr_push_clk <= 0; + pop_ptr_async <= 0; + fifo_full_flag_f <= 0; + end else begin + push_ptr_push_clk <= next_push_ptr_push_clk; + pop_ptr_push_clk <= (Fifo_Sync_Mode) ? next_pop_ptr_pop_clk : pop_ptr_async; + pop_ptr_async <= pop_ptr_pop_clk; + fifo_full_flag_f <= match_room4one | match_room4none; + end + end + end + + always @(posedge Pop_Clk or negedge Rst_n) begin + if (~Rst_n) begin + pop_ptr_pop_clk <= 0; + push_ptr_pop_clk <= 0; + push_ptr_async <= 0; + fifo_empty_flag_f <= 1; + end else begin + if (pop_clk_rst_mux) begin + pop_ptr_pop_clk <= 0; + push_ptr_pop_clk <= 0; + push_ptr_async <= 0; + fifo_empty_flag_f <= 1; + end else begin + pop_ptr_pop_clk <= next_pop_ptr_pop_clk; + push_ptr_pop_clk <= (Fifo_Sync_Mode) ? next_push_ptr_push_clk : push_ptr_async; + push_ptr_async <= push_ptr_push_clk; + fifo_empty_flag_f <= (pop_diff == 1) | (pop_diff == 0); + end + end + end + + always @(posedge Push_Clk or negedge Rst_n) begin + if (~Rst_n) begin + + //based on rtl, this should be full after reset + // Fifo_Full_Usr <= 4'b1000; + Fifo_Full_Usr <= 4'b0001; + end else begin + if (match_room4none) begin + Fifo_Full_Usr <= 4'b0000; + end else if (match_room4all) begin + Fifo_Full_Usr <= 4'b0001; + end else if (~match_room4half) begin + Fifo_Full_Usr <= 4'b0010; + end else if (~match_room4quart) begin + Fifo_Full_Usr <= 4'b0011; + end else begin + if (match_room_at_most63) begin + if (room4_32s) Fifo_Full_Usr <= 4'b1010; + else if (room4_16s) Fifo_Full_Usr <= 4'b1011; + else if (room4_8s) Fifo_Full_Usr <= 4'b1100; + else if (room4_4s) Fifo_Full_Usr <= 4'b1101; + else if (room4_2s) Fifo_Full_Usr <= 4'b1110; + else if (room4_1s) Fifo_Full_Usr <= 4'b1111; + else Fifo_Full_Usr <= 4'b1110; + end else Fifo_Full_Usr <= 4'b0100; + end + end + end + + always @(posedge Pop_Clk or negedge Rst_n) begin + if (~Rst_n) begin + Fifo_Empty_Usr <= 4'b0000; + end else begin + if (Fifo_Pop_Flush | (pop_local_flush_mask & ~pop_flush_done) | pop_clk_rst) begin + Fifo_Empty_Usr <= 4'b0000; + end else if (match_all_left) begin + Fifo_Empty_Usr <= 4'b1111; + end else if (match_half_left) begin + Fifo_Empty_Usr <= 4'b1110; + end else if (match_quart_left) begin + Fifo_Empty_Usr <= 4'b1101; + end else begin + if (match_at_most63_left) begin + if (at_least_32) Fifo_Empty_Usr <= 4'b0110; + else if (at_least_16) Fifo_Empty_Usr <= 4'b0101; + else if (at_least_8) Fifo_Empty_Usr <= 4'b0100; + else if (at_least_4) Fifo_Empty_Usr <= 4'b0011; + else if (at_least_2) Fifo_Empty_Usr <= 4'b0010; + else if (one_left) Fifo_Empty_Usr <= 4'b0001; + else Fifo_Empty_Usr <= 4'b0000; + end else Fifo_Empty_Usr <= 4'b1000; + end + end + end endmodule -`timescale 10 ps /1 ps +`timescale 10 ps / 1 ps //`define ADDRWID 8 `define DATAWID 18 `define WEWID 2 //`define DEPTH 256 -module ram( - AA, - AB, - CLKA, - CLKB, - WENA, - WENB, - CENA, - CENB, - WENBA, - WENBB, - DA, - QA, - DB, - QB - ); - - -parameter ADDRWID = 8; -parameter DEPTH = (1< 16) - ram[i] <= {1'b0,ram_dum[i][((16*init_ad)+16)-1:((16*init_ad)+8)],1'b0,ram_dum[i][((16*init_ad)+8)-1: (16*init_ad)]}; +`ifndef YOSYS + $readmemh(INIT_FILE, ram_dum); +`endif + #10 n = 0; + o = 0; + for (i = 0; i < DEPTH; i = i + 1) begin + if (data_width_int > 16) + ram[i] <= { + 1'b0, + ram_dum[i][((16*init_ad)+16)-1:((16*init_ad)+8)], + 1'b0, + ram_dum[i][((16*init_ad)+8)-1:(16*init_ad)] + }; else if (data_width_int <= 8 && data_depth_int <= 1024) - ram[i] <= {1'b0,ram_dum[i+n+1+(1024*init_ad)][7:0],1'b0,ram_dum[i+n+(1024*init_ad)][7:0]}; + ram[i] <= { + 1'b0, ram_dum[i+n+1+(1024*init_ad)][7:0], 1'b0, ram_dum[i+n+(1024*init_ad)][7:0] + }; else if (data_width_int <= 8 && data_depth_int > 1024) - ram[i] <= {1'b0,ram_dum[i+o+init_ad+1][7:0],1'b0,ram_dum[i+o+init_ad][7:0]}; + ram[i] <= {1'b0, ram_dum[i+o+init_ad+1][7:0], 1'b0, ram_dum[i+o+init_ad][7:0]}; else if (data_width_int > 8 && data_width_int <= 16 && data_depth_int > 512) - ram[i] <= {1'b0,ram_dum[i+n+init_ad][15:8],1'b0,ram_dum[i+n+init_ad][7:0]}; - else - ram[i] <= {1'b0,ram_dum[i+(512*init_ad)][15:8],1'b0,ram_dum[i+(512*init_ad)][7:0]}; - - n= n+1; - o= o+3; - end - end - - always@( WENB1 or I1 or tmpData1 ) - begin - for( j = 0; j < 9; j = j+1 ) - begin - wrData1[j] <= ( WENB1[0] ) ? tmpData1[j] : I1[j]; - end - for( l = 9; l < 19; l = l+1 ) - begin - wrData1[l] <= ( WENB1[1] ) ? tmpData1[l] : I1[l]; - end - end - - always@( posedge CLKA ) - begin - if( ~WEN1 & ~CEN1 ) - begin - ram[A1] <= wrData1[`DATAWID-1:0]; - end - end - -//pre-charging to 1 every clock cycle - always@( posedge CLKA_d) - if(~CEN1_d) - begin - O1 = 18'h3ffff; - #100; - O1 = 18'h00000; - end - - - always@( posedge CLKA ) - if (~CEN1) - begin - AddrOut1 <= A1; - end + ram[i] <= {1'b0, ram_dum[i+n+init_ad][15:8], 1'b0, ram_dum[i+n+init_ad][7:0]}; + else ram[i] <= {1'b0, ram_dum[i+(512*init_ad)][15:8], 1'b0, ram_dum[i+(512*init_ad)][7:0]}; - always@( posedge CLKA_d) - if (~CEN1_d) - begin - QAreg <= ram[AddrOut1]; - end + n = n + 1; + o = o + 3; + end + end + always @(WENB1 or I1 or tmpData1) begin + for (j = 0; j < 9; j = j + 1) begin + wrData1[j] <= (WENB1[0]) ? tmpData1[j] : I1[j]; + end + for (l = 9; l < 19; l = l + 1) begin + wrData1[l] <= (WENB1[1]) ? tmpData1[l] : I1[l]; + end + end - always@( posedge CLKA ) - begin - WEN1_f <= ~WEN1 & ~CEN1; - A1_f<= A1; - - end - - always@( WENB2 or I2 or tmpData2 ) - begin - for( k = 0; k < 9; k = k+1 ) - begin - wrData2[k] <= ( WENB2[0] ) ? tmpData2[k] : I2[k]; - end - for( m = 9; m < 19; m = m+1 ) - begin - wrData2[m] <= ( WENB2[1] ) ? tmpData2[m] : I2[m]; - end - end - - always@( posedge CLKB ) - begin - if( ~WEN2 & ~CEN2 ) - begin - ram[A2] <= wrData2[`DATAWID-1:0]; - end - end - -//pre-charging to 1 every clock cycle - always@( posedge CLKB_d ) - if(~CEN2_d) - begin - O2 = 18'h3ffff; - #100; - O2 = 18'h00000; - end - - always@( posedge CLKB ) - if (~CEN2) - begin - AddrOut2 <= A2; - end + always @(posedge CLKA) begin + if (~WEN1 & ~CEN1) begin + ram[A1] <= wrData1[`DATAWID-1:0]; + end + end - always@( posedge CLKB_d ) - if (~CEN2_d) - begin - QBreg <= ram[AddrOut2]; - end + //pre-charging to 1 every clock cycle + always @(posedge CLKA_d) + if (~CEN1_d) begin + O1 = 18'h3ffff; + #100; + O1 = 18'h00000; + end - always@( posedge CLKB ) - begin - WEN2_f <= ~WEN2 & ~CEN2; - A2_f<=A2; - - end - always@( A1_f or A2_f or overlap) - begin - if( overlap ) - begin - ram[A1_f] <= 18'bxxxxxxxxxxxxxxxxxx; - end - end + always @(posedge CLKA) + if (~CEN1) begin + AddrOut1 <= A1; + end + + always @(posedge CLKA_d) + if (~CEN1_d) begin + QAreg <= ram[AddrOut1]; + end + + + always @(posedge CLKA) begin + WEN1_f <= ~WEN1 & ~CEN1; + A1_f <= A1; + + end + + always @(WENB2 or I2 or tmpData2) begin + for (k = 0; k < 9; k = k + 1) begin + wrData2[k] <= (WENB2[0]) ? tmpData2[k] : I2[k]; + end + for (m = 9; m < 19; m = m + 1) begin + wrData2[m] <= (WENB2[1]) ? tmpData2[m] : I2[m]; + end + end + + always @(posedge CLKB) begin + if (~WEN2 & ~CEN2) begin + ram[A2] <= wrData2[`DATAWID-1:0]; + end + end + + //pre-charging to 1 every clock cycle + always @(posedge CLKB_d) + if (~CEN2_d) begin + O2 = 18'h3ffff; + #100; + O2 = 18'h00000; + end + + always @(posedge CLKB) + if (~CEN2) begin + AddrOut2 <= A2; + end + + always @(posedge CLKB_d) + if (~CEN2_d) begin + QBreg <= ram[AddrOut2]; + end + + always @(posedge CLKB) begin + WEN2_f <= ~WEN2 & ~CEN2; + A2_f <= A2; + + end + + always @(A1_f or A2_f or overlap) begin + if (overlap) begin + ram[A1_f] <= 18'bxxxxxxxxxxxxxxxxxx; + end + end endmodule -`timescale 1 ns /10 ps +`timescale 1 ns / 10 ps //`define ADDRWID 10 `define DATAWID 18 `define WEWID 2 -module x2_model( - Concat_En, - - ram0_WIDTH_SELA, - ram0_WIDTH_SELB, - ram0_PLRD, - - ram0_CEA, - ram0_CEB, - ram0_I, - ram0_O, - ram0_AA, - ram0_AB, - ram0_CSBA, - ram0_CSBB, - ram0_WENBA, - - ram1_WIDTH_SELA, - ram1_WIDTH_SELB, - ram1_PLRD, - - ram1_CEA, - ram1_CEB, - ram1_I, - ram1_O, - ram1_AA, - ram1_AB, - ram1_CSBA, - ram1_CSBB, - ram1_WENBA - ); - -parameter ADDRWID = 10; -parameter [18431:0] INIT = 18432'bx; -parameter INIT_FILE="init.mem"; -parameter data_width_int = 16; -parameter data_depth_int = 1024; -parameter init_ad1 = 0; -parameter init_ad2 = (data_depth_int > 1024)?2:1; - - - input Concat_En; - - input [1:0] ram0_WIDTH_SELA; - input [1:0] ram0_WIDTH_SELB; - input ram0_PLRD; - input ram0_CEA; - input ram0_CEB; - input [`DATAWID-1:0] ram0_I; - output [`DATAWID-1:0] ram0_O; - input [ADDRWID-1:0] ram0_AA; - input [ADDRWID-1:0] ram0_AB; - input ram0_CSBA; - input ram0_CSBB; - input [`WEWID-1:0] ram0_WENBA; - - input [1:0] ram1_WIDTH_SELA; - input [1:0] ram1_WIDTH_SELB; - input ram1_PLRD; - input ram1_CEA; - input ram1_CEB; - input [`DATAWID-1:0] ram1_I; - output [`DATAWID-1:0] ram1_O; - input [ADDRWID-1:0] ram1_AA; - input [ADDRWID-1:0] ram1_AB; - input ram1_CSBA; - input ram1_CSBB; - input [`WEWID-1:0] ram1_WENBA; - - reg ram0_PLRDA_SEL; - reg ram0_PLRDB_SEL; - reg ram1_PLRDA_SEL; - reg ram1_PLRDB_SEL; - reg ram_AA_ram_SEL; - reg ram_AB_ram_SEL; - - reg [`WEWID-1:0] ram0_WENBA_SEL; - reg [`WEWID-1:0] ram0_WENBB_SEL; - reg [`WEWID-1:0] ram1_WENBA_SEL; - reg [`WEWID-1:0] ram1_WENBB_SEL; - - reg ram0_A_x9_SEL; - reg ram0_B_x9_SEL; - reg ram1_A_x9_SEL; - reg ram1_B_x9_SEL; - - reg [ADDRWID-3:0] ram0_AA_SEL; - reg [ADDRWID-3:0] ram0_AB_SEL; - reg [ADDRWID-3:0] ram1_AA_SEL; - reg [ADDRWID-3:0] ram1_AB_SEL; - - reg ram0_AA_byte_SEL; - reg ram0_AB_byte_SEL; - reg ram1_AA_byte_SEL; - reg ram1_AB_byte_SEL; - - reg ram0_AA_byte_SEL_Q; - reg ram0_AB_byte_SEL_Q; - reg ram1_AA_byte_SEL_Q; - reg ram1_AB_byte_SEL_Q; - reg ram0_A_mux_ctl_Q; - reg ram0_B_mux_ctl_Q; - reg ram1_A_mux_ctl_Q; - reg ram1_B_mux_ctl_Q; - - reg ram0_O_mux_ctrl_Q; - reg ram1_O_mux_ctrl_Q; - - reg ram_AA_ram_SEL_Q; - reg ram_AB_ram_SEL_Q; - - wire [`DATAWID-1:0] QA_1_SEL3; - wire [`DATAWID-1:0] QB_0_SEL2; - wire [`DATAWID-1:0] QB_1_SEL2; - - reg [`DATAWID-1:0] QA_0_Q; - reg [`DATAWID-1:0] QB_0_Q; - reg [`DATAWID-1:0] QA_1_Q; - reg [`DATAWID-1:0] QB_1_Q; - - wire [`DATAWID-1:0] QA_0; - wire [`DATAWID-1:0] QB_0; - wire [`DATAWID-1:0] QA_1; - wire [`DATAWID-1:0] QB_1; - - wire ram0_CSBA_SEL; - wire ram0_CSBB_SEL; - wire ram1_CSBA_SEL; - wire ram1_CSBB_SEL; - - wire [`DATAWID-1:0] ram0_I_SEL1; - wire [`DATAWID-1:0] ram1_I_SEL1; - - wire dual_port; - - wire ram0_WEBA_SEL; - wire ram0_WEBB_SEL; - wire ram1_WEBA_SEL; - wire ram1_WEBB_SEL; - - wire [`DATAWID-1:0] ram1_I_SEL2; - - wire [`DATAWID-1:0] QA_1_SEL2; - wire [`DATAWID-1:0] QA_0_SEL1; - wire [`DATAWID-1:0] QB_0_SEL1; - wire [`DATAWID-1:0] QA_1_SEL1; - wire [`DATAWID-1:0] QB_1_SEL1; - - wire [`DATAWID-1:0] QB_0_SEL3; - wire [`DATAWID-1:0] QA_0_SEL2; - - initial - begin - QA_0_Q <= 0; - QB_0_Q <= 0; - QA_1_Q <= 0; - QB_1_Q <= 0; - ram0_AA_byte_SEL_Q <= 0; - ram0_A_mux_ctl_Q <= 0; - ram0_AB_byte_SEL_Q <= 0; - ram0_B_mux_ctl_Q <= 0; - ram1_AA_byte_SEL_Q <= 0; - ram1_A_mux_ctl_Q <= 0; - ram1_AB_byte_SEL_Q <= 0; - ram1_B_mux_ctl_Q <= 0; - ram_AA_ram_SEL_Q <= 0; - ram1_O_mux_ctrl_Q <= 0; - ram_AB_ram_SEL_Q <= 0; - ram0_O_mux_ctrl_Q <= 0; - end - - assign dual_port = Concat_En & ~( ram0_WIDTH_SELA[1] | ram0_WIDTH_SELB[1] ); - - assign ram0_CSBA_SEL = ram0_CSBA; - assign ram0_CSBB_SEL = ram0_CSBB; - assign ram1_CSBA_SEL = Concat_En ? ram0_CSBA : ram1_CSBA; - assign ram1_CSBB_SEL = Concat_En ? ram0_CSBB : ram1_CSBB; - - assign ram0_O = QB_0_SEL3; - assign ram1_O = dual_port ? QA_1_SEL3 : QB_1_SEL2; - - assign ram0_I_SEL1[8:0] = ram0_I[8:0]; - assign ram1_I_SEL1[8:0] = ram1_I[8:0]; - assign ram0_I_SEL1[17:9] = ram0_AA_byte_SEL ? ram0_I[8:0] : ram0_I[17:9]; - assign ram1_I_SEL1[17:9] = ( ( ~Concat_En & ram1_AA_byte_SEL ) | ( dual_port & ram0_AB_byte_SEL ) ) ? ram1_I[8:0] : ram1_I[17:9]; - - assign ram1_I_SEL2 = ( Concat_En & ~ram0_WIDTH_SELA[1] ) ? ram0_I_SEL1 : ram1_I_SEL1; - - assign ram0_WEBA_SEL = &ram0_WENBA_SEL; - assign ram0_WEBB_SEL = &ram0_WENBB_SEL; - assign ram1_WEBA_SEL = &ram1_WENBA_SEL; - assign ram1_WEBB_SEL = &ram1_WENBB_SEL; - - assign QA_0_SEL1 = ( ram0_PLRDA_SEL ) ? QA_0_Q : QA_0 ; - assign QB_0_SEL1 = ( ram0_PLRDB_SEL ) ? QB_0_Q : QB_0 ; - assign QA_1_SEL1 = ( ram1_PLRDA_SEL ) ? QA_1_Q : QA_1 ; - assign QB_1_SEL1 = ( ram1_PLRDB_SEL ) ? QB_1_Q : QB_1 ; - - assign QA_1_SEL3 = ram1_O_mux_ctrl_Q ? QA_1_SEL2 : QA_0_SEL2; - - assign QA_0_SEL2[8:0] = ram0_A_mux_ctl_Q ? QA_0_SEL1[17:9] : QA_0_SEL1[8:0] ; - assign QB_0_SEL2[8:0] = ram0_B_mux_ctl_Q ? QB_0_SEL1[17:9] : QB_0_SEL1[8:0] ; - assign QA_1_SEL2[8:0] = ram1_A_mux_ctl_Q ? QA_1_SEL1[17:9] : QA_1_SEL1[8:0] ; - assign QB_1_SEL2[8:0] = ram1_B_mux_ctl_Q ? QB_1_SEL1[17:9] : QB_1_SEL1[8:0] ; - - assign QA_0_SEL2[17:9] = QA_0_SEL1[17:9]; - assign QB_0_SEL2[17:9] = QB_0_SEL1[17:9]; - assign QA_1_SEL2[17:9] = QA_1_SEL1[17:9]; - assign QB_1_SEL2[17:9] = QB_1_SEL1[17:9]; - - assign QB_0_SEL3 = ram0_O_mux_ctrl_Q ? QB_1_SEL2 : QB_0_SEL2; - - always@( posedge ram0_CEA ) - begin - QA_0_Q <= QA_0; - end - always@( posedge ram0_CEB ) - begin - QB_0_Q <= QB_0; - end - always@( posedge ram1_CEA ) - begin - QA_1_Q <= QA_1; - end - always@( posedge ram1_CEB ) - begin - QB_1_Q <= QB_1; - end +module x2_model ( + Concat_En, + + ram0_WIDTH_SELA, + ram0_WIDTH_SELB, + ram0_PLRD, + + ram0_CEA, + ram0_CEB, + ram0_I, + ram0_O, + ram0_AA, + ram0_AB, + ram0_CSBA, + ram0_CSBB, + ram0_WENBA, + + ram1_WIDTH_SELA, + ram1_WIDTH_SELB, + ram1_PLRD, + + ram1_CEA, + ram1_CEB, + ram1_I, + ram1_O, + ram1_AA, + ram1_AB, + ram1_CSBA, + ram1_CSBB, + ram1_WENBA +); + + parameter ADDRWID = 10; + parameter [18431:0] INIT = 18432'bx; + parameter INIT_FILE = "init.mem"; + parameter data_width_int = 16; + parameter data_depth_int = 1024; + parameter init_ad1 = 0; + parameter init_ad2 = (data_depth_int > 1024) ? 2 : 1; + + + input Concat_En; + + input [1:0] ram0_WIDTH_SELA; + input [1:0] ram0_WIDTH_SELB; + input ram0_PLRD; + input ram0_CEA; + input ram0_CEB; + input [`DATAWID-1:0] ram0_I; + output [`DATAWID-1:0] ram0_O; + input [ADDRWID-1:0] ram0_AA; + input [ADDRWID-1:0] ram0_AB; + input ram0_CSBA; + input ram0_CSBB; + input [`WEWID-1:0] ram0_WENBA; + + input [1:0] ram1_WIDTH_SELA; + input [1:0] ram1_WIDTH_SELB; + input ram1_PLRD; + input ram1_CEA; + input ram1_CEB; + input [`DATAWID-1:0] ram1_I; + output [`DATAWID-1:0] ram1_O; + input [ADDRWID-1:0] ram1_AA; + input [ADDRWID-1:0] ram1_AB; + input ram1_CSBA; + input ram1_CSBB; + input [`WEWID-1:0] ram1_WENBA; + + reg ram0_PLRDA_SEL; + reg ram0_PLRDB_SEL; + reg ram1_PLRDA_SEL; + reg ram1_PLRDB_SEL; + reg ram_AA_ram_SEL; + reg ram_AB_ram_SEL; + + reg [ `WEWID-1:0] ram0_WENBA_SEL; + reg [ `WEWID-1:0] ram0_WENBB_SEL; + reg [ `WEWID-1:0] ram1_WENBA_SEL; + reg [ `WEWID-1:0] ram1_WENBB_SEL; + + reg ram0_A_x9_SEL; + reg ram0_B_x9_SEL; + reg ram1_A_x9_SEL; + reg ram1_B_x9_SEL; + + reg [ ADDRWID-3:0] ram0_AA_SEL; + reg [ ADDRWID-3:0] ram0_AB_SEL; + reg [ ADDRWID-3:0] ram1_AA_SEL; + reg [ ADDRWID-3:0] ram1_AB_SEL; + + reg ram0_AA_byte_SEL; + reg ram0_AB_byte_SEL; + reg ram1_AA_byte_SEL; + reg ram1_AB_byte_SEL; + + reg ram0_AA_byte_SEL_Q; + reg ram0_AB_byte_SEL_Q; + reg ram1_AA_byte_SEL_Q; + reg ram1_AB_byte_SEL_Q; + reg ram0_A_mux_ctl_Q; + reg ram0_B_mux_ctl_Q; + reg ram1_A_mux_ctl_Q; + reg ram1_B_mux_ctl_Q; + + reg ram0_O_mux_ctrl_Q; + reg ram1_O_mux_ctrl_Q; + + reg ram_AA_ram_SEL_Q; + reg ram_AB_ram_SEL_Q; + + wire [`DATAWID-1:0] QA_1_SEL3; + wire [`DATAWID-1:0] QB_0_SEL2; + wire [`DATAWID-1:0] QB_1_SEL2; + + reg [`DATAWID-1:0] QA_0_Q; + reg [`DATAWID-1:0] QB_0_Q; + reg [`DATAWID-1:0] QA_1_Q; + reg [`DATAWID-1:0] QB_1_Q; + + wire [`DATAWID-1:0] QA_0; + wire [`DATAWID-1:0] QB_0; + wire [`DATAWID-1:0] QA_1; + wire [`DATAWID-1:0] QB_1; + + wire ram0_CSBA_SEL; + wire ram0_CSBB_SEL; + wire ram1_CSBA_SEL; + wire ram1_CSBB_SEL; + + wire [`DATAWID-1:0] ram0_I_SEL1; + wire [`DATAWID-1:0] ram1_I_SEL1; + + wire dual_port; + + wire ram0_WEBA_SEL; + wire ram0_WEBB_SEL; + wire ram1_WEBA_SEL; + wire ram1_WEBB_SEL; + + wire [`DATAWID-1:0] ram1_I_SEL2; + + wire [`DATAWID-1:0] QA_1_SEL2; + wire [`DATAWID-1:0] QA_0_SEL1; + wire [`DATAWID-1:0] QB_0_SEL1; + wire [`DATAWID-1:0] QA_1_SEL1; + wire [`DATAWID-1:0] QB_1_SEL1; + + wire [`DATAWID-1:0] QB_0_SEL3; + wire [`DATAWID-1:0] QA_0_SEL2; - always@( posedge ram0_CEA ) - begin - if( ram0_CSBA_SEL == 0 ) - ram0_AA_byte_SEL_Q <= ram0_AA_byte_SEL; - if( ram0_PLRDA_SEL || ( ram0_CSBA_SEL == 0 ) ) - ram0_A_mux_ctl_Q <= ram0_A_x9_SEL & ( ram0_PLRDA_SEL ? ram0_AA_byte_SEL_Q : ram0_AA_byte_SEL ); - end - - always@( posedge ram0_CEB) - begin - if( ram0_CSBB_SEL == 0 ) - ram0_AB_byte_SEL_Q <= ram0_AB_byte_SEL; - if( ram0_PLRDB_SEL || ( ram0_CSBB_SEL == 0 ) ) - ram0_B_mux_ctl_Q <= ram0_B_x9_SEL & ( ram0_PLRDB_SEL ? ram0_AB_byte_SEL_Q : ram0_AB_byte_SEL ); - end - - always@( posedge ram1_CEA ) - begin - if( ram1_CSBA_SEL == 0 ) - ram1_AA_byte_SEL_Q <= ram1_AA_byte_SEL; - if( ram1_PLRDA_SEL || (ram1_CSBA_SEL == 0 ) ) - ram1_A_mux_ctl_Q <= ram1_A_x9_SEL & ( ram1_PLRDA_SEL ? ram1_AA_byte_SEL_Q : ram1_AA_byte_SEL ); - end - - always@( posedge ram1_CEB ) - begin - if( ram1_CSBB_SEL == 0 ) - ram1_AB_byte_SEL_Q <= ram1_AB_byte_SEL; - if( ram1_PLRDB_SEL || (ram1_CSBB_SEL == 0 ) ) - ram1_B_mux_ctl_Q <= ram1_B_x9_SEL & ( ram1_PLRDB_SEL ? ram1_AB_byte_SEL_Q : ram1_AB_byte_SEL ); - end + initial begin + QA_0_Q <= 0; + QB_0_Q <= 0; + QA_1_Q <= 0; + QB_1_Q <= 0; + ram0_AA_byte_SEL_Q <= 0; + ram0_A_mux_ctl_Q <= 0; + ram0_AB_byte_SEL_Q <= 0; + ram0_B_mux_ctl_Q <= 0; + ram1_AA_byte_SEL_Q <= 0; + ram1_A_mux_ctl_Q <= 0; + ram1_AB_byte_SEL_Q <= 0; + ram1_B_mux_ctl_Q <= 0; + ram_AA_ram_SEL_Q <= 0; + ram1_O_mux_ctrl_Q <= 0; + ram_AB_ram_SEL_Q <= 0; + ram0_O_mux_ctrl_Q <= 0; + end - always@( posedge ram0_CEA ) - begin - ram_AA_ram_SEL_Q <= ram_AA_ram_SEL; - ram1_O_mux_ctrl_Q <= ( ram0_PLRDA_SEL ? ram_AA_ram_SEL_Q : ram_AA_ram_SEL ); - end + assign dual_port = Concat_En & ~(ram0_WIDTH_SELA[1] | ram0_WIDTH_SELB[1]); - always@( posedge ram0_CEB ) - begin - ram_AB_ram_SEL_Q <= ram_AB_ram_SEL; - ram0_O_mux_ctrl_Q <= ( ram0_PLRDB_SEL ? ram_AB_ram_SEL_Q : ram_AB_ram_SEL ); - end + assign ram0_CSBA_SEL = ram0_CSBA; + assign ram0_CSBB_SEL = ram0_CSBB; + assign ram1_CSBA_SEL = Concat_En ? ram0_CSBA : ram1_CSBA; + assign ram1_CSBB_SEL = Concat_En ? ram0_CSBB : ram1_CSBB; + + assign ram0_O = QB_0_SEL3; + assign ram1_O = dual_port ? QA_1_SEL3 : QB_1_SEL2; + + assign ram0_I_SEL1[8:0] = ram0_I[8:0]; + assign ram1_I_SEL1[8:0] = ram1_I[8:0]; + assign ram0_I_SEL1[17:9] = ram0_AA_byte_SEL ? ram0_I[8:0] : ram0_I[17:9]; + assign ram1_I_SEL1[17:9] = ( ( ~Concat_En & ram1_AA_byte_SEL ) | ( dual_port & ram0_AB_byte_SEL ) ) ? ram1_I[8:0] : ram1_I[17:9]; - always@( Concat_En or ram0_WIDTH_SELA or ram0_WIDTH_SELB or ram0_AA or ram0_AB or ram0_WENBA or + assign ram1_I_SEL2 = (Concat_En & ~ram0_WIDTH_SELA[1]) ? ram0_I_SEL1 : ram1_I_SEL1; + + assign ram0_WEBA_SEL = &ram0_WENBA_SEL; + assign ram0_WEBB_SEL = &ram0_WENBB_SEL; + assign ram1_WEBA_SEL = &ram1_WENBA_SEL; + assign ram1_WEBB_SEL = &ram1_WENBB_SEL; + + assign QA_0_SEL1 = (ram0_PLRDA_SEL) ? QA_0_Q : QA_0; + assign QB_0_SEL1 = (ram0_PLRDB_SEL) ? QB_0_Q : QB_0; + assign QA_1_SEL1 = (ram1_PLRDA_SEL) ? QA_1_Q : QA_1; + assign QB_1_SEL1 = (ram1_PLRDB_SEL) ? QB_1_Q : QB_1; + + assign QA_1_SEL3 = ram1_O_mux_ctrl_Q ? QA_1_SEL2 : QA_0_SEL2; + + assign QA_0_SEL2[8:0] = ram0_A_mux_ctl_Q ? QA_0_SEL1[17:9] : QA_0_SEL1[8:0]; + assign QB_0_SEL2[8:0] = ram0_B_mux_ctl_Q ? QB_0_SEL1[17:9] : QB_0_SEL1[8:0]; + assign QA_1_SEL2[8:0] = ram1_A_mux_ctl_Q ? QA_1_SEL1[17:9] : QA_1_SEL1[8:0]; + assign QB_1_SEL2[8:0] = ram1_B_mux_ctl_Q ? QB_1_SEL1[17:9] : QB_1_SEL1[8:0]; + + assign QA_0_SEL2[17:9] = QA_0_SEL1[17:9]; + assign QB_0_SEL2[17:9] = QB_0_SEL1[17:9]; + assign QA_1_SEL2[17:9] = QA_1_SEL1[17:9]; + assign QB_1_SEL2[17:9] = QB_1_SEL1[17:9]; + + assign QB_0_SEL3 = ram0_O_mux_ctrl_Q ? QB_1_SEL2 : QB_0_SEL2; + + always @(posedge ram0_CEA) begin + QA_0_Q <= QA_0; + end + always @(posedge ram0_CEB) begin + QB_0_Q <= QB_0; + end + always @(posedge ram1_CEA) begin + QA_1_Q <= QA_1; + end + always @(posedge ram1_CEB) begin + QB_1_Q <= QB_1; + end + + always @(posedge ram0_CEA) begin + if (ram0_CSBA_SEL == 0) ram0_AA_byte_SEL_Q <= ram0_AA_byte_SEL; + if (ram0_PLRDA_SEL || (ram0_CSBA_SEL == 0)) + ram0_A_mux_ctl_Q <= ram0_A_x9_SEL & (ram0_PLRDA_SEL ? ram0_AA_byte_SEL_Q : ram0_AA_byte_SEL); + end + + always @(posedge ram0_CEB) begin + if (ram0_CSBB_SEL == 0) ram0_AB_byte_SEL_Q <= ram0_AB_byte_SEL; + if (ram0_PLRDB_SEL || (ram0_CSBB_SEL == 0)) + ram0_B_mux_ctl_Q <= ram0_B_x9_SEL & (ram0_PLRDB_SEL ? ram0_AB_byte_SEL_Q : ram0_AB_byte_SEL); + end + + always @(posedge ram1_CEA) begin + if (ram1_CSBA_SEL == 0) ram1_AA_byte_SEL_Q <= ram1_AA_byte_SEL; + if (ram1_PLRDA_SEL || (ram1_CSBA_SEL == 0)) + ram1_A_mux_ctl_Q <= ram1_A_x9_SEL & (ram1_PLRDA_SEL ? ram1_AA_byte_SEL_Q : ram1_AA_byte_SEL); + end + + always @(posedge ram1_CEB) begin + if (ram1_CSBB_SEL == 0) ram1_AB_byte_SEL_Q <= ram1_AB_byte_SEL; + if (ram1_PLRDB_SEL || (ram1_CSBB_SEL == 0)) + ram1_B_mux_ctl_Q <= ram1_B_x9_SEL & (ram1_PLRDB_SEL ? ram1_AB_byte_SEL_Q : ram1_AB_byte_SEL); + end + + always @(posedge ram0_CEA) begin + ram_AA_ram_SEL_Q <= ram_AA_ram_SEL; + ram1_O_mux_ctrl_Q <= (ram0_PLRDA_SEL ? ram_AA_ram_SEL_Q : ram_AA_ram_SEL); + end + + always @(posedge ram0_CEB) begin + ram_AB_ram_SEL_Q <= ram_AB_ram_SEL; + ram0_O_mux_ctrl_Q <= (ram0_PLRDB_SEL ? ram_AB_ram_SEL_Q : ram_AB_ram_SEL); + end + + always@( Concat_En or ram0_WIDTH_SELA or ram0_WIDTH_SELB or ram0_AA or ram0_AB or ram0_WENBA or ram1_AA or ram1_AB or ram1_WENBA or ram0_PLRD or ram1_PLRD or ram1_WIDTH_SELA or ram1_WIDTH_SELB ) begin - ram0_A_x9_SEL <= ( ~|ram0_WIDTH_SELA ); - ram1_A_x9_SEL <= ( ~|ram0_WIDTH_SELA ); - ram0_B_x9_SEL <= ( ~|ram0_WIDTH_SELB ); - ram0_AA_byte_SEL <= ram0_AA[0] & ( ~|ram0_WIDTH_SELA ); - ram0_AB_byte_SEL <= ram0_AB[0] & ( ~|ram0_WIDTH_SELB ); - if( ~Concat_En ) - begin - ram_AA_ram_SEL <= 1'b0; - ram_AB_ram_SEL <= 1'b0; - ram1_B_x9_SEL <= ( ~|ram1_WIDTH_SELB ); - - ram0_PLRDA_SEL <= ram0_PLRD; - ram0_PLRDB_SEL <= ram0_PLRD; - ram1_PLRDA_SEL <= ram1_PLRD; - ram1_PLRDB_SEL <= ram1_PLRD; - ram0_WENBB_SEL <= {`WEWID{1'b1}}; - ram1_WENBB_SEL <= {`WEWID{1'b1}}; - - ram0_AA_SEL <= ram0_AA >> ( ~|ram0_WIDTH_SELA ); - ram0_WENBA_SEL[0] <= ( ram0_AA[0] & ( ~|ram0_WIDTH_SELA ) ) | ram0_WENBA[0]; - ram0_WENBA_SEL[1] <= ( ~ram0_AA[0] & ( ~|ram0_WIDTH_SELA ) ) | ram0_WENBA[( |ram0_WIDTH_SELA )]; - ram0_AB_SEL <= ram0_AB >> ( ~|ram0_WIDTH_SELB ); - - ram1_AA_SEL <= ram1_AA >> ( ~|ram1_WIDTH_SELA ); - ram1_AA_byte_SEL <= ram1_AA[0] & ( ~|ram1_WIDTH_SELA ); - ram1_WENBA_SEL[0] <= ( ram1_AA[0] & ( ~|ram1_WIDTH_SELA ) ) | ram1_WENBA[0]; - ram1_WENBA_SEL[1] <= ( ~ram1_AA[0] & ( ~|ram1_WIDTH_SELA ) ) | ram1_WENBA[( |ram1_WIDTH_SELA )]; - ram1_AB_SEL <= ram1_AB >> ( ~|ram1_WIDTH_SELB ); - ram1_AB_byte_SEL <= ram1_AB[0] & ( ~|ram1_WIDTH_SELB ); - end - else - begin - ram_AA_ram_SEL <= ~ram0_WIDTH_SELA[1] & ram0_AA[~ram0_WIDTH_SELA[0]]; - ram_AB_ram_SEL <= ~ram0_WIDTH_SELB[1] & ram0_AB[~ram0_WIDTH_SELB[0]]; - ram1_B_x9_SEL <= ( ~|ram0_WIDTH_SELB ); - - ram0_PLRDA_SEL <= ram1_PLRD; - ram1_PLRDA_SEL <= ram1_PLRD; - ram0_PLRDB_SEL <= ram0_PLRD; - ram1_PLRDB_SEL <= ram0_PLRD; - - ram0_AA_SEL <= ram0_AA >> { ~ram0_WIDTH_SELA[1] & ~( ram0_WIDTH_SELA[1] ^ ram0_WIDTH_SELA[0] ), ~ram0_WIDTH_SELA[1] & ram0_WIDTH_SELA[0] }; - ram1_AA_SEL <= ram0_AA >> { ~ram0_WIDTH_SELA[1] & ~( ram0_WIDTH_SELA[1] ^ ram0_WIDTH_SELA[0] ), ~ram0_WIDTH_SELA[1] & ram0_WIDTH_SELA[0] }; - ram1_AA_byte_SEL <= ram0_AA[0] & ( ~|ram0_WIDTH_SELA ); - ram0_WENBA_SEL[0] <= ram0_WENBA[0] | ( ~ram0_WIDTH_SELA[1] & ( ram0_AA[0] | ( ~ram0_WIDTH_SELA[0] & ram0_AA[1] ) ) ); - ram0_WENBA_SEL[1] <= ( ( ~|ram0_WIDTH_SELA & ram0_WENBA[0] ) | ( |ram0_WIDTH_SELA & ram0_WENBA[1] ) ) | ( ~ram0_WIDTH_SELA[1] & ( ( ram0_WIDTH_SELA[0] & ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ~ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ram0_AA[1] ) ) ); - - ram1_WENBA_SEL[0] <= ( ( ~ram0_WIDTH_SELA[1] & ram0_WENBA[0] ) | ( ram0_WIDTH_SELA[1] & ram1_WENBA[0] ) ) | ( ~ram0_WIDTH_SELA[1] & ( ( ram0_WIDTH_SELA[0] & ~ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ~ram0_AA[1] ) ) ); - ram1_WENBA_SEL[1] <= ( ( ( ram0_WIDTH_SELA == 2'b00 ) & ram0_WENBA[0] ) | ( ( ram0_WIDTH_SELA[1] == 1'b1 ) & ram1_WENBA[1] ) | ( ( ram0_WIDTH_SELA == 2'b01 ) & ram0_WENBA[1] ) ) | ( ~ram0_WIDTH_SELA[1] & ( ~ram0_AA[0] | ( ~ram0_WIDTH_SELA[0] & ~ram0_AA[1] ) ) ); - - ram0_AB_SEL <= ram0_AB >> { ~ram0_WIDTH_SELB[1] & ~( ram0_WIDTH_SELB[1] ^ ram0_WIDTH_SELB[0] ), ~ram0_WIDTH_SELB[1] & ram0_WIDTH_SELB[0] }; - ram1_AB_SEL <= ram0_AB >> { ~ram0_WIDTH_SELB[1] & ~( ram0_WIDTH_SELB[1] ^ ram0_WIDTH_SELB[0] ), ~ram0_WIDTH_SELB[1] & ram0_WIDTH_SELB[0] }; - ram1_AB_byte_SEL <= ram0_AB[0] & ( ~|ram0_WIDTH_SELB ); - ram0_WENBB_SEL[0] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ram1_WENBA[0] | ( ram0_AB[0] | ( ~ram0_WIDTH_SELB[0] & ram0_AB[1] ) ) ); - ram0_WENBB_SEL[1] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ( ( ~|ram0_WIDTH_SELB & ram1_WENBA[0] ) | ( |ram0_WIDTH_SELB & ram1_WENBA[1] ) ) | ( ( ram0_WIDTH_SELB[0] & ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ~ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ram0_AB[1] ) ) ); - ram1_WENBB_SEL[0] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ram1_WENBA[0] | ( ( ram0_WIDTH_SELB[0] & ~ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ~ram0_AB[1] ) ) ); - ram1_WENBB_SEL[1] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ( ( ~|ram0_WIDTH_SELB & ram1_WENBA[0] ) | ( |ram0_WIDTH_SELB & ram1_WENBA[1] ) ) | ( ~ram0_AB[0] | ( ~ram0_WIDTH_SELB[0] & ~ram0_AB[1] ) ) ); - end - end - - ram #(.ADDRWID(ADDRWID-2), - .INIT(INIT[ 0*9216 +: 9216]), - .INIT_FILE(INIT_FILE), - .data_width_int(data_width_int), - .data_depth_int(data_depth_int), - .init_ad(init_ad1) - ) - ram0_inst( - .AA( ram0_AA_SEL ), - .AB( ram0_AB_SEL ), - .CLKA( ram0_CEA ), - .CLKB( ram0_CEB ), - .WENA( ram0_WEBA_SEL ), - .WENB( ram0_WEBB_SEL ), - .CENA( ram0_CSBA_SEL ), - .CENB( ram0_CSBB_SEL ), - .WENBA( ram0_WENBA_SEL ), - .WENBB( ram0_WENBB_SEL ), - .DA( ram0_I_SEL1 ), - .QA( QA_0 ), - .DB( ram1_I_SEL1 ), - .QB( QB_0 ) - ); - - ram #(.ADDRWID(ADDRWID-2), - .INIT(INIT[ 1*9216 +: 9216]), - .INIT_FILE(INIT_FILE), - .data_width_int(data_width_int), - .data_depth_int(data_depth_int), - .init_ad(init_ad2) - ) - ram1_inst( - .AA( ram1_AA_SEL ), - .AB( ram1_AB_SEL ), - .CLKA( ram1_CEA ), - .CLKB( ram1_CEB ), - .WENA( ram1_WEBA_SEL ), - .WENB( ram1_WEBB_SEL ), - .CENA( ram1_CSBA_SEL ), - .CENB( ram1_CSBB_SEL ), - .WENBA( ram1_WENBA_SEL ), - .WENBB( ram1_WENBB_SEL ), - .DA( ram1_I_SEL2 ), - .QA( QA_1 ), - .DB( ram1_I_SEL1 ), - .QB( QB_1 ) - ); - + ram0_A_x9_SEL <= (~|ram0_WIDTH_SELA); + ram1_A_x9_SEL <= (~|ram0_WIDTH_SELA); + ram0_B_x9_SEL <= (~|ram0_WIDTH_SELB); + ram0_AA_byte_SEL <= ram0_AA[0] & (~|ram0_WIDTH_SELA); + ram0_AB_byte_SEL <= ram0_AB[0] & (~|ram0_WIDTH_SELB); + if (~Concat_En) begin + ram_AA_ram_SEL <= 1'b0; + ram_AB_ram_SEL <= 1'b0; + ram1_B_x9_SEL <= ( ~|ram1_WIDTH_SELB ); + + ram0_PLRDA_SEL <= ram0_PLRD; + ram0_PLRDB_SEL <= ram0_PLRD; + ram1_PLRDA_SEL <= ram1_PLRD; + ram1_PLRDB_SEL <= ram1_PLRD; + ram0_WENBB_SEL <= {`WEWID{1'b1}}; + ram1_WENBB_SEL <= {`WEWID{1'b1}}; + + ram0_AA_SEL <= ram0_AA >> ( ~|ram0_WIDTH_SELA ); + ram0_WENBA_SEL[0] <= ( ram0_AA[0] & ( ~|ram0_WIDTH_SELA ) ) | ram0_WENBA[0]; + ram0_WENBA_SEL[1] <= ( ~ram0_AA[0] & ( ~|ram0_WIDTH_SELA ) ) | ram0_WENBA[( |ram0_WIDTH_SELA )]; + ram0_AB_SEL <= ram0_AB >> ( ~|ram0_WIDTH_SELB ); + + ram1_AA_SEL <= ram1_AA >> ( ~|ram1_WIDTH_SELA ); + ram1_AA_byte_SEL <= ram1_AA[0] & ( ~|ram1_WIDTH_SELA ); + ram1_WENBA_SEL[0] <= ( ram1_AA[0] & ( ~|ram1_WIDTH_SELA ) ) | ram1_WENBA[0]; + ram1_WENBA_SEL[1] <= ( ~ram1_AA[0] & ( ~|ram1_WIDTH_SELA ) ) | ram1_WENBA[( |ram1_WIDTH_SELA )]; + ram1_AB_SEL <= ram1_AB >> ( ~|ram1_WIDTH_SELB ); + ram1_AB_byte_SEL <= ram1_AB[0] & ( ~|ram1_WIDTH_SELB ); + end else begin + ram_AA_ram_SEL <= ~ram0_WIDTH_SELA[1] & ram0_AA[~ram0_WIDTH_SELA[0]]; + ram_AB_ram_SEL <= ~ram0_WIDTH_SELB[1] & ram0_AB[~ram0_WIDTH_SELB[0]]; + ram1_B_x9_SEL <= (~|ram0_WIDTH_SELB); + + ram0_PLRDA_SEL <= ram1_PLRD; + ram1_PLRDA_SEL <= ram1_PLRD; + ram0_PLRDB_SEL <= ram0_PLRD; + ram1_PLRDB_SEL <= ram0_PLRD; + + ram0_AA_SEL <= ram0_AA >> { + ~ram0_WIDTH_SELA[1] & ~(ram0_WIDTH_SELA[1] ^ ram0_WIDTH_SELA[0]), + ~ram0_WIDTH_SELA[1] & ram0_WIDTH_SELA[0] + }; + ram1_AA_SEL <= ram0_AA >> { + ~ram0_WIDTH_SELA[1] & ~(ram0_WIDTH_SELA[1] ^ ram0_WIDTH_SELA[0]), + ~ram0_WIDTH_SELA[1] & ram0_WIDTH_SELA[0] + }; + ram1_AA_byte_SEL <= ram0_AA[0] & (~|ram0_WIDTH_SELA); + ram0_WENBA_SEL[0] <= ram0_WENBA[0] | ( ~ram0_WIDTH_SELA[1] & ( ram0_AA[0] | ( ~ram0_WIDTH_SELA[0] & ram0_AA[1] ) ) ); + ram0_WENBA_SEL[1] <= ( ( ~|ram0_WIDTH_SELA & ram0_WENBA[0] ) | ( |ram0_WIDTH_SELA & ram0_WENBA[1] ) ) | ( ~ram0_WIDTH_SELA[1] & ( ( ram0_WIDTH_SELA[0] & ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ~ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ram0_AA[1] ) ) ); + + ram1_WENBA_SEL[0] <= ( ( ~ram0_WIDTH_SELA[1] & ram0_WENBA[0] ) | ( ram0_WIDTH_SELA[1] & ram1_WENBA[0] ) ) | ( ~ram0_WIDTH_SELA[1] & ( ( ram0_WIDTH_SELA[0] & ~ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ram0_AA[0] ) | ( ~ram0_WIDTH_SELA[0] & ~ram0_AA[1] ) ) ); + ram1_WENBA_SEL[1] <= ( ( ( ram0_WIDTH_SELA == 2'b00 ) & ram0_WENBA[0] ) | ( ( ram0_WIDTH_SELA[1] == 1'b1 ) & ram1_WENBA[1] ) | ( ( ram0_WIDTH_SELA == 2'b01 ) & ram0_WENBA[1] ) ) | ( ~ram0_WIDTH_SELA[1] & ( ~ram0_AA[0] | ( ~ram0_WIDTH_SELA[0] & ~ram0_AA[1] ) ) ); + + ram0_AB_SEL <= ram0_AB >> { + ~ram0_WIDTH_SELB[1] & ~(ram0_WIDTH_SELB[1] ^ ram0_WIDTH_SELB[0]), + ~ram0_WIDTH_SELB[1] & ram0_WIDTH_SELB[0] + }; + ram1_AB_SEL <= ram0_AB >> { + ~ram0_WIDTH_SELB[1] & ~(ram0_WIDTH_SELB[1] ^ ram0_WIDTH_SELB[0]), + ~ram0_WIDTH_SELB[1] & ram0_WIDTH_SELB[0] + }; + ram1_AB_byte_SEL <= ram0_AB[0] & (~|ram0_WIDTH_SELB); + ram0_WENBB_SEL[0] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ram1_WENBA[0] | ( ram0_AB[0] | ( ~ram0_WIDTH_SELB[0] & ram0_AB[1] ) ) ); + ram0_WENBB_SEL[1] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ( ( ~|ram0_WIDTH_SELB & ram1_WENBA[0] ) | ( |ram0_WIDTH_SELB & ram1_WENBA[1] ) ) | ( ( ram0_WIDTH_SELB[0] & ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ~ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ram0_AB[1] ) ) ); + ram1_WENBB_SEL[0] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ram1_WENBA[0] | ( ( ram0_WIDTH_SELB[0] & ~ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ram0_AB[0] ) | ( ~ram0_WIDTH_SELB[0] & ~ram0_AB[1] ) ) ); + ram1_WENBB_SEL[1] <= ram0_WIDTH_SELB[1] | ( ram0_WIDTH_SELA[1] | ( ( ~|ram0_WIDTH_SELB & ram1_WENBA[0] ) | ( |ram0_WIDTH_SELB & ram1_WENBA[1] ) ) | ( ~ram0_AB[0] | ( ~ram0_WIDTH_SELB[0] & ~ram0_AB[1] ) ) ); + end + end + + ram #( + .ADDRWID(ADDRWID - 2), + .INIT(INIT[0*9216+:9216]), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int), + .init_ad(init_ad1) + ) ram0_inst ( + .AA(ram0_AA_SEL), + .AB(ram0_AB_SEL), + .CLKA(ram0_CEA), + .CLKB(ram0_CEB), + .WENA(ram0_WEBA_SEL), + .WENB(ram0_WEBB_SEL), + .CENA(ram0_CSBA_SEL), + .CENB(ram0_CSBB_SEL), + .WENBA(ram0_WENBA_SEL), + .WENBB(ram0_WENBB_SEL), + .DA(ram0_I_SEL1), + .QA(QA_0), + .DB(ram1_I_SEL1), + .QB(QB_0) + ); + + ram #( + .ADDRWID(ADDRWID - 2), + .INIT(INIT[1*9216+:9216]), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int), + .init_ad(init_ad2) + ) ram1_inst ( + .AA(ram1_AA_SEL), + .AB(ram1_AB_SEL), + .CLKA(ram1_CEA), + .CLKB(ram1_CEB), + .WENA(ram1_WEBA_SEL), + .WENB(ram1_WEBB_SEL), + .CENA(ram1_CSBA_SEL), + .CENB(ram1_CSBB_SEL), + .WENBA(ram1_WENBA_SEL), + .WENBB(ram1_WENBB_SEL), + .DA(ram1_I_SEL2), + .QA(QA_1), + .DB(ram1_I_SEL1), + .QB(QB_1) + ); + endmodule -`timescale 1 ns /10 ps +`timescale 1 ns / 10 ps `define ADDRWID 11 `define DATAWID 18 `define WEWID 2 -module ram_block_8K ( - CLK1_0, - CLK2_0, - WD_0, - RD_0, - A1_0, - A2_0, - CS1_0, - CS2_0, - WEN1_0, - POP_0, - Almost_Full_0, - Almost_Empty_0, - PUSH_FLAG_0, - POP_FLAG_0, - - FIFO_EN_0, - SYNC_FIFO_0, - PIPELINE_RD_0, - WIDTH_SELECT1_0, - WIDTH_SELECT2_0, - - CLK1_1, - CLK2_1, - WD_1, - RD_1, - A1_1, - A2_1, - CS1_1, - CS2_1, - WEN1_1, - POP_1, - Almost_Empty_1, - Almost_Full_1, - PUSH_FLAG_1, - POP_FLAG_1, - - FIFO_EN_1, - SYNC_FIFO_1, - PIPELINE_RD_1, - WIDTH_SELECT1_1, - WIDTH_SELECT2_1, - - CONCAT_EN_0, - CONCAT_EN_1, - - PUSH_0, - PUSH_1, - aFlushN_0, - aFlushN_1 - ); - -parameter [18431:0] INIT = 18432'bx; -parameter INIT_FILE="init.mem"; -parameter data_width_int = 16; -parameter data_depth_int = 1024; - - input CLK1_0; - input CLK2_0; - input [`DATAWID-1:0] WD_0; - output [`DATAWID-1:0] RD_0; - input [`ADDRWID-1:0] A1_0; //chnge - input [`ADDRWID-1:0] A2_0; //chnge - input CS1_0; - input CS2_0; - input [`WEWID-1:0] WEN1_0; - input POP_0; - output Almost_Full_0; - output Almost_Empty_0; - output [3:0] PUSH_FLAG_0; - output [3:0] POP_FLAG_0; - input FIFO_EN_0; - input SYNC_FIFO_0; - input PIPELINE_RD_0; - input [1:0] WIDTH_SELECT1_0; - input [1:0] WIDTH_SELECT2_0; - - input CLK1_1; - input CLK2_1; - input [`DATAWID-1:0] WD_1; - output [`DATAWID-1:0] RD_1; - input [`ADDRWID-1:0] A1_1; //chnge - input [`ADDRWID-1:0] A2_1; //chnge - input CS1_1; - input CS2_1; - input [`WEWID-1:0] WEN1_1; - input POP_1; - output Almost_Full_1; - output Almost_Empty_1; - output [3:0] PUSH_FLAG_1; - output [3:0] POP_FLAG_1; - input FIFO_EN_1; - input SYNC_FIFO_1; - input PIPELINE_RD_1; - input [1:0] WIDTH_SELECT1_1; - input [1:0] WIDTH_SELECT2_1; - - input CONCAT_EN_0; - input CONCAT_EN_1; - - - input PUSH_0; - input PUSH_1; - input aFlushN_0; - input aFlushN_1; - - reg rstn; - - wire [`WEWID-1:0] RAM0_WENb1_SEL; - wire [`WEWID-1:0] RAM1_WENb1_SEL; - - wire RAM0_CS1_SEL; - wire RAM0_CS2_SEL; - wire RAM1_CS1_SEL; - wire RAM1_CS2_SEL; - - wire [`ADDRWID-1:0] Fifo0_Write_Addr; - wire [`ADDRWID-1:0] Fifo0_Read_Addr; - - wire [`ADDRWID-1:0] Fifo1_Write_Addr; - wire [`ADDRWID-1:0] Fifo1_Read_Addr; - - wire [`ADDRWID-1:0] RAM0_AA_SEL; - wire [`ADDRWID-1:0] RAM0_AB_SEL; - wire [`ADDRWID-1:0] RAM1_AA_SEL; - wire [`ADDRWID-1:0] RAM1_AB_SEL; - - wire Concat_En_SEL; - +module ram_block_8K ( + CLK1_0, + CLK2_0, + WD_0, + RD_0, + A1_0, + A2_0, + CS1_0, + CS2_0, + WEN1_0, + POP_0, + Almost_Full_0, + Almost_Empty_0, + PUSH_FLAG_0, + POP_FLAG_0, + + FIFO_EN_0, + SYNC_FIFO_0, + PIPELINE_RD_0, + WIDTH_SELECT1_0, + WIDTH_SELECT2_0, + + CLK1_1, + CLK2_1, + WD_1, + RD_1, + A1_1, + A2_1, + CS1_1, + CS2_1, + WEN1_1, + POP_1, + Almost_Empty_1, + Almost_Full_1, + PUSH_FLAG_1, + POP_FLAG_1, + + FIFO_EN_1, + SYNC_FIFO_1, + PIPELINE_RD_1, + WIDTH_SELECT1_1, + WIDTH_SELECT2_1, + + CONCAT_EN_0, + CONCAT_EN_1, + + PUSH_0, + PUSH_1, + aFlushN_0, + aFlushN_1 +); + + parameter [18431:0] INIT = 18432'bx; + parameter INIT_FILE = "init.mem"; + parameter data_width_int = 16; + parameter data_depth_int = 1024; + + input CLK1_0; + input CLK2_0; + input [`DATAWID-1:0] WD_0; + output [`DATAWID-1:0] RD_0; + input [`ADDRWID-1:0] A1_0; //chnge + input [`ADDRWID-1:0] A2_0; //chnge + input CS1_0; + input CS2_0; + input [`WEWID-1:0] WEN1_0; + input POP_0; + output Almost_Full_0; + output Almost_Empty_0; + output [3:0] PUSH_FLAG_0; + output [3:0] POP_FLAG_0; + input FIFO_EN_0; + input SYNC_FIFO_0; + input PIPELINE_RD_0; + input [1:0] WIDTH_SELECT1_0; + input [1:0] WIDTH_SELECT2_0; + + input CLK1_1; + input CLK2_1; + input [`DATAWID-1:0] WD_1; + output [`DATAWID-1:0] RD_1; + input [`ADDRWID-1:0] A1_1; //chnge + input [`ADDRWID-1:0] A2_1; //chnge + input CS1_1; + input CS2_1; + input [`WEWID-1:0] WEN1_1; + input POP_1; + output Almost_Full_1; + output Almost_Empty_1; + output [3:0] PUSH_FLAG_1; + output [3:0] POP_FLAG_1; + input FIFO_EN_1; + input SYNC_FIFO_1; + input PIPELINE_RD_1; + input [1:0] WIDTH_SELECT1_1; + input [1:0] WIDTH_SELECT2_1; + + input CONCAT_EN_0; + input CONCAT_EN_1; + + + input PUSH_0; + input PUSH_1; + input aFlushN_0; + input aFlushN_1; + + reg rstn; + + wire [ `WEWID-1:0] RAM0_WENb1_SEL; + wire [ `WEWID-1:0] RAM1_WENb1_SEL; + + wire RAM0_CS1_SEL; + wire RAM0_CS2_SEL; + wire RAM1_CS1_SEL; + wire RAM1_CS2_SEL; + + wire [`ADDRWID-1:0] Fifo0_Write_Addr; + wire [`ADDRWID-1:0] Fifo0_Read_Addr; + + wire [`ADDRWID-1:0] Fifo1_Write_Addr; + wire [`ADDRWID-1:0] Fifo1_Read_Addr; + + wire [`ADDRWID-1:0] RAM0_AA_SEL; + wire [`ADDRWID-1:0] RAM0_AB_SEL; + wire [`ADDRWID-1:0] RAM1_AA_SEL; + wire [`ADDRWID-1:0] RAM1_AB_SEL; + + wire Concat_En_SEL; + // To simulate POR - initial - begin - rstn = 1'b0; - #30 rstn = 1'b1; + initial begin + rstn = 1'b0; + #30 rstn = 1'b1; end - + assign fifo0_rstn = rstn & aFlushN_0; assign fifo1_rstn = rstn & aFlushN_1; - assign Concat_En_SEL = ( CONCAT_EN_0 | WIDTH_SELECT1_0[1] | WIDTH_SELECT2_0[1] )? 1'b1 : 1'b0; - - assign RAM0_AA_SEL = FIFO_EN_0 ? Fifo0_Write_Addr : A1_0[`ADDRWID-1:0]; - assign RAM0_AB_SEL = FIFO_EN_0 ? Fifo0_Read_Addr : A2_0[`ADDRWID-1:0]; - assign RAM1_AA_SEL = FIFO_EN_1 ? Fifo1_Write_Addr : A1_1[`ADDRWID-1:0]; - assign RAM1_AB_SEL = FIFO_EN_1 ? Fifo1_Read_Addr : A2_1[`ADDRWID-1:0]; - - assign RAM0_WENb1_SEL = FIFO_EN_0 ? { `WEWID{ ~PUSH_0 } } : ~WEN1_0; + assign Concat_En_SEL = (CONCAT_EN_0 | WIDTH_SELECT1_0[1] | WIDTH_SELECT2_0[1]) ? 1'b1 : 1'b0; + + assign RAM0_AA_SEL = FIFO_EN_0 ? Fifo0_Write_Addr : A1_0[`ADDRWID-1:0]; + assign RAM0_AB_SEL = FIFO_EN_0 ? Fifo0_Read_Addr : A2_0[`ADDRWID-1:0]; + assign RAM1_AA_SEL = FIFO_EN_1 ? Fifo1_Write_Addr : A1_1[`ADDRWID-1:0]; + assign RAM1_AB_SEL = FIFO_EN_1 ? Fifo1_Read_Addr : A2_1[`ADDRWID-1:0]; + + assign RAM0_WENb1_SEL = FIFO_EN_0 ? {`WEWID{~PUSH_0}} : ~WEN1_0; assign RAM1_WENb1_SEL = ( FIFO_EN_1 & ~Concat_En_SEL ) ? { `WEWID{ ~PUSH_1 } } : ( ( FIFO_EN_0 & Concat_En_SEL ) ? ( WIDTH_SELECT1_0[1] ? { `WEWID{ ~PUSH_0 } } : { `WEWID{ 1'b1 } } ) : ~WEN1_1 ); - assign RAM0_CS1_SEL = ( FIFO_EN_0 ? CS1_0 : ~CS1_0 ); - assign RAM0_CS2_SEL = ( FIFO_EN_0 ? CS2_0 : ~CS2_0 ); - assign RAM1_CS1_SEL = ( FIFO_EN_1 ? CS1_1 : ~CS1_1 ); - assign RAM1_CS2_SEL = ( FIFO_EN_1 ? CS2_1 : ~CS2_1 ); - - x2_model #(.ADDRWID(`ADDRWID), - .INIT(INIT), - .INIT_FILE(INIT_FILE), - .data_width_int(data_width_int), - .data_depth_int(data_depth_int) - ) - x2_8K_model_inst( - .Concat_En( Concat_En_SEL ), - - .ram0_WIDTH_SELA( WIDTH_SELECT1_0 ), - .ram0_WIDTH_SELB( WIDTH_SELECT2_0 ), - .ram0_PLRD( PIPELINE_RD_0 ), - - .ram0_CEA( CLK1_0 ), - .ram0_CEB( CLK2_0 ), - .ram0_I( WD_0 ), - .ram0_O( RD_0 ), - .ram0_AA( RAM0_AA_SEL ), - .ram0_AB( RAM0_AB_SEL ), - .ram0_CSBA( RAM0_CS1_SEL ), - .ram0_CSBB( RAM0_CS2_SEL ), - .ram0_WENBA( RAM0_WENb1_SEL ), - - .ram1_WIDTH_SELA( WIDTH_SELECT1_1 ), - .ram1_WIDTH_SELB( WIDTH_SELECT2_1 ), - .ram1_PLRD( PIPELINE_RD_1 ), - - .ram1_CEA( CLK1_1 ), - .ram1_CEB( CLK2_1 ), - .ram1_I( WD_1 ), - .ram1_O( RD_1 ), - .ram1_AA( RAM1_AA_SEL ), - .ram1_AB( RAM1_AB_SEL ), - .ram1_CSBA( RAM1_CS1_SEL ), - .ram1_CSBB( RAM1_CS2_SEL ), - .ram1_WENBA( RAM1_WENb1_SEL ) - ); - - fifo_controller_model #(.MAX_PTR_WIDTH(`ADDRWID+1)) fifo_controller0_inst( - .Push_Clk( CLK1_0 ), - .Pop_Clk( CLK2_0 ), - - .Fifo_Push( PUSH_0 ), - .Fifo_Push_Flush( CS1_0 ), - .Fifo_Full( Almost_Full_0 ), - .Fifo_Full_Usr( PUSH_FLAG_0 ), - - .Fifo_Pop( POP_0 ), - .Fifo_Pop_Flush( CS2_0 ), - .Fifo_Empty( Almost_Empty_0 ), - .Fifo_Empty_Usr( POP_FLAG_0 ), - - .Write_Addr( Fifo0_Write_Addr ), - - .Read_Addr( Fifo0_Read_Addr ), - - .Fifo_Ram_Mode( Concat_En_SEL ), - .Fifo_Sync_Mode( SYNC_FIFO_0 ), - .Fifo_Push_Width( WIDTH_SELECT1_0 ), - .Fifo_Pop_Width( WIDTH_SELECT2_0 ), - .Rst_n( fifo0_rstn ) - ); - - fifo_controller_model #(.MAX_PTR_WIDTH(`ADDRWID+1)) fifo_controller1_inst( - .Push_Clk( CLK1_1 ), - .Pop_Clk( CLK2_1 ), - - .Fifo_Push( PUSH_1 ), - .Fifo_Push_Flush( CS1_1 ), - .Fifo_Full( Almost_Full_1 ), - .Fifo_Full_Usr( PUSH_FLAG_1 ), - - .Fifo_Pop( POP_1 ), - .Fifo_Pop_Flush( CS2_1 ), - .Fifo_Empty( Almost_Empty_1 ), - .Fifo_Empty_Usr( POP_FLAG_1 ), - - .Write_Addr( Fifo1_Write_Addr ), - - .Read_Addr( Fifo1_Read_Addr ), - - .Fifo_Ram_Mode( 1'b0 ), - .Fifo_Sync_Mode( SYNC_FIFO_1 ), - .Fifo_Push_Width( { 1'b0, WIDTH_SELECT1_1[0] } ), - .Fifo_Pop_Width( { 1'b0, WIDTH_SELECT2_1[0] } ), - .Rst_n( fifo1_rstn ) - ); + assign RAM0_CS1_SEL = (FIFO_EN_0 ? CS1_0 : ~CS1_0); + assign RAM0_CS2_SEL = (FIFO_EN_0 ? CS2_0 : ~CS2_0); + assign RAM1_CS1_SEL = (FIFO_EN_1 ? CS1_1 : ~CS1_1); + assign RAM1_CS2_SEL = (FIFO_EN_1 ? CS2_1 : ~CS2_1); + + x2_model #( + .ADDRWID(`ADDRWID), + .INIT(INIT), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) x2_8K_model_inst ( + .Concat_En(Concat_En_SEL), + + .ram0_WIDTH_SELA(WIDTH_SELECT1_0), + .ram0_WIDTH_SELB(WIDTH_SELECT2_0), + .ram0_PLRD(PIPELINE_RD_0), + + .ram0_CEA(CLK1_0), + .ram0_CEB(CLK2_0), + .ram0_I(WD_0), + .ram0_O(RD_0), + .ram0_AA(RAM0_AA_SEL), + .ram0_AB(RAM0_AB_SEL), + .ram0_CSBA(RAM0_CS1_SEL), + .ram0_CSBB(RAM0_CS2_SEL), + .ram0_WENBA(RAM0_WENb1_SEL), + + .ram1_WIDTH_SELA(WIDTH_SELECT1_1), + .ram1_WIDTH_SELB(WIDTH_SELECT2_1), + .ram1_PLRD(PIPELINE_RD_1), + + .ram1_CEA(CLK1_1), + .ram1_CEB(CLK2_1), + .ram1_I(WD_1), + .ram1_O(RD_1), + .ram1_AA(RAM1_AA_SEL), + .ram1_AB(RAM1_AB_SEL), + .ram1_CSBA(RAM1_CS1_SEL), + .ram1_CSBB(RAM1_CS2_SEL), + .ram1_WENBA(RAM1_WENb1_SEL) + ); + + fifo_controller_model #( + .MAX_PTR_WIDTH(`ADDRWID + 1) + ) fifo_controller0_inst ( + .Push_Clk(CLK1_0), + .Pop_Clk (CLK2_0), + + .Fifo_Push(PUSH_0), + .Fifo_Push_Flush(CS1_0), + .Fifo_Full(Almost_Full_0), + .Fifo_Full_Usr(PUSH_FLAG_0), + + .Fifo_Pop(POP_0), + .Fifo_Pop_Flush(CS2_0), + .Fifo_Empty(Almost_Empty_0), + .Fifo_Empty_Usr(POP_FLAG_0), + + .Write_Addr(Fifo0_Write_Addr), + + .Read_Addr(Fifo0_Read_Addr), + + .Fifo_Ram_Mode(Concat_En_SEL), + .Fifo_Sync_Mode(SYNC_FIFO_0), + .Fifo_Push_Width(WIDTH_SELECT1_0), + .Fifo_Pop_Width(WIDTH_SELECT2_0), + .Rst_n(fifo0_rstn) + ); + + fifo_controller_model #( + .MAX_PTR_WIDTH(`ADDRWID + 1) + ) fifo_controller1_inst ( + .Push_Clk(CLK1_1), + .Pop_Clk (CLK2_1), + + .Fifo_Push(PUSH_1), + .Fifo_Push_Flush(CS1_1), + .Fifo_Full(Almost_Full_1), + .Fifo_Full_Usr(PUSH_FLAG_1), + + .Fifo_Pop(POP_1), + .Fifo_Pop_Flush(CS2_1), + .Fifo_Empty(Almost_Empty_1), + .Fifo_Empty_Usr(POP_FLAG_1), + + .Write_Addr(Fifo1_Write_Addr), + + .Read_Addr(Fifo1_Read_Addr), + + .Fifo_Ram_Mode(1'b0), + .Fifo_Sync_Mode(SYNC_FIFO_1), + .Fifo_Push_Width({1'b0, WIDTH_SELECT1_1[0]}), + .Fifo_Pop_Width({1'b0, WIDTH_SELECT2_1[0]}), + .Rst_n(fifo1_rstn) + ); endmodule module sw_mux ( - port_out, - default_port, - alt_port, - switch - ); - - output port_out; - input default_port; - input alt_port; - input switch; - - assign port_out = switch ? alt_port : default_port; - + port_out, + default_port, + alt_port, + switch +); + + output port_out; + input default_port; + input alt_port; + input switch; + + assign port_out = switch ? alt_port : default_port; + endmodule @@ -1597,293 +1483,390 @@ endmodule `define DATAWID 18 `define WEWID 2 -module ram8k_2x1_cell ( - CLK1_0, - CLK2_0, - CLK1S_0, - CLK2S_0, - WD_0, - RD_0, - A1_0, - A2_0, - CS1_0, - CS2_0, - WEN1_0, - CLK1EN_0, - CLK2EN_0, - P1_0, - P2_0, - Almost_Full_0, - Almost_Empty_0, - PUSH_FLAG_0, - POP_FLAG_0, - - FIFO_EN_0, - SYNC_FIFO_0, - PIPELINE_RD_0, - WIDTH_SELECT1_0, - WIDTH_SELECT2_0, - DIR_0, - ASYNC_FLUSH_0, - ASYNC_FLUSH_S0, - - CLK1_1, - CLK2_1, - CLK1S_1, - CLK2S_1, - WD_1, - RD_1, - A1_1, - A2_1, - CS1_1, - CS2_1, - WEN1_1, - CLK1EN_1, - CLK2EN_1, - P1_1, - P2_1, - Almost_Empty_1, - Almost_Full_1, - PUSH_FLAG_1, - POP_FLAG_1, - - FIFO_EN_1, - SYNC_FIFO_1, - PIPELINE_RD_1, - WIDTH_SELECT1_1, - WIDTH_SELECT2_1, - DIR_1, - ASYNC_FLUSH_1, - ASYNC_FLUSH_S1, - - CONCAT_EN_0, - CONCAT_EN_1 - ); - -parameter [18431:0] INIT = 18432'bx; -parameter INIT_FILE="init.mem"; -parameter data_width_int = 16; -parameter data_depth_int = 1024; - - input CLK1_0; - input CLK2_0; - input CLK1S_0; - input CLK2S_0; - input [`DATAWID-1:0] WD_0; - output [`DATAWID-1:0] RD_0; - input [`ADDRWID_8k2-1:0] A1_0; - input [`ADDRWID_8k2-1:0] A2_0; - input CS1_0; - input CS2_0; - input [`WEWID-1:0] WEN1_0; - input CLK1EN_0; - input CLK2EN_0; - input P1_0; - input P2_0; - output Almost_Full_0; - output Almost_Empty_0; - output [3:0] PUSH_FLAG_0; - output [3:0] POP_FLAG_0; - input FIFO_EN_0; - input SYNC_FIFO_0; - input DIR_0; - input ASYNC_FLUSH_0; - input ASYNC_FLUSH_S0; - input PIPELINE_RD_0; - input [1:0] WIDTH_SELECT1_0; - input [1:0] WIDTH_SELECT2_0; - - input CLK1_1; - input CLK2_1; - input CLK1S_1; - input CLK2S_1; - input [`DATAWID-1:0] WD_1; - output [`DATAWID-1:0] RD_1; - input [`ADDRWID_8k2-1:0] A1_1; - input [`ADDRWID_8k2-1:0] A2_1; - input CS1_1; - input CS2_1; - input [`WEWID-1:0] WEN1_1; - input CLK1EN_1; - input CLK2EN_1; - input P1_1; - input P2_1; - output Almost_Full_1; - output Almost_Empty_1; - output [3:0] PUSH_FLAG_1; - output [3:0] POP_FLAG_1; - input FIFO_EN_1; - input SYNC_FIFO_1; - input DIR_1; - input ASYNC_FLUSH_1; - input ASYNC_FLUSH_S1; - input PIPELINE_RD_1; - input [1:0] WIDTH_SELECT1_1; - input [1:0] WIDTH_SELECT2_1; - - input CONCAT_EN_0; - input CONCAT_EN_1; - -//CODE here -reg RAM0_domain_sw; -reg RAM1_domain_sw; - -wire CLK1P_0, CLK1P_1, CLK2P_0, CLK2P_1, ASYNC_FLUSHP_1, ASYNC_FLUSHP_0; - -assign WidSel1_1 = WIDTH_SELECT1_0[1]; -assign WidSel2_1 = WIDTH_SELECT2_0[1]; - -assign CLK1P_0 = CLK1S_0 ? ~CLK1_0 : CLK1_0; -assign CLK1P_1 = CLK1S_1 ? ~CLK1_1 : CLK1_1; -assign CLK2P_0 = CLK2S_0 ? ~CLK2_0 : CLK2_0; -assign CLK2P_1 = CLK2S_1 ? ~CLK2_1 : CLK2_1; -assign ASYNC_FLUSHP_0 = ASYNC_FLUSH_S0? ~ASYNC_FLUSH_0 : ASYNC_FLUSH_0; -assign ASYNC_FLUSHP_1 = ASYNC_FLUSH_S1? ~ASYNC_FLUSH_1 : ASYNC_FLUSH_1; - - -/* FIFO mode-only switching */ -always @( CONCAT_EN_0 or FIFO_EN_0 or FIFO_EN_1 or WidSel1_1 or WidSel2_1 or DIR_0 or DIR_1) - -begin - if (CONCAT_EN_0) //CONCAT enabled, only RAM0 ports are checked +module ram8k_2x1_cell ( + CLK1_0, + CLK2_0, + CLK1S_0, + CLK2S_0, + WD_0, + RD_0, + A1_0, + A2_0, + CS1_0, + CS2_0, + WEN1_0, + CLK1EN_0, + CLK2EN_0, + P1_0, + P2_0, + Almost_Full_0, + Almost_Empty_0, + PUSH_FLAG_0, + POP_FLAG_0, + + FIFO_EN_0, + SYNC_FIFO_0, + PIPELINE_RD_0, + WIDTH_SELECT1_0, + WIDTH_SELECT2_0, + DIR_0, + ASYNC_FLUSH_0, + ASYNC_FLUSH_S0, + + CLK1_1, + CLK2_1, + CLK1S_1, + CLK2S_1, + WD_1, + RD_1, + A1_1, + A2_1, + CS1_1, + CS2_1, + WEN1_1, + CLK1EN_1, + CLK2EN_1, + P1_1, + P2_1, + Almost_Empty_1, + Almost_Full_1, + PUSH_FLAG_1, + POP_FLAG_1, + + FIFO_EN_1, + SYNC_FIFO_1, + PIPELINE_RD_1, + WIDTH_SELECT1_1, + WIDTH_SELECT2_1, + DIR_1, + ASYNC_FLUSH_1, + ASYNC_FLUSH_S1, + + CONCAT_EN_0, + CONCAT_EN_1 +); + + parameter [18431:0] INIT = 18432'bx; + parameter INIT_FILE = "init.mem"; + parameter data_width_int = 16; + parameter data_depth_int = 1024; + + input CLK1_0; + input CLK2_0; + input CLK1S_0; + input CLK2S_0; + input [`DATAWID-1:0] WD_0; + output [`DATAWID-1:0] RD_0; + input [`ADDRWID_8k2-1:0] A1_0; + input [`ADDRWID_8k2-1:0] A2_0; + input CS1_0; + input CS2_0; + input [`WEWID-1:0] WEN1_0; + input CLK1EN_0; + input CLK2EN_0; + input P1_0; + input P2_0; + output Almost_Full_0; + output Almost_Empty_0; + output [3:0] PUSH_FLAG_0; + output [3:0] POP_FLAG_0; + input FIFO_EN_0; + input SYNC_FIFO_0; + input DIR_0; + input ASYNC_FLUSH_0; + input ASYNC_FLUSH_S0; + input PIPELINE_RD_0; + input [1:0] WIDTH_SELECT1_0; + input [1:0] WIDTH_SELECT2_0; + + input CLK1_1; + input CLK2_1; + input CLK1S_1; + input CLK2S_1; + input [`DATAWID-1:0] WD_1; + output [`DATAWID-1:0] RD_1; + input [`ADDRWID_8k2-1:0] A1_1; + input [`ADDRWID_8k2-1:0] A2_1; + input CS1_1; + input CS2_1; + input [`WEWID-1:0] WEN1_1; + input CLK1EN_1; + input CLK2EN_1; + input P1_1; + input P2_1; + output Almost_Full_1; + output Almost_Empty_1; + output [3:0] PUSH_FLAG_1; + output [3:0] POP_FLAG_1; + input FIFO_EN_1; + input SYNC_FIFO_1; + input DIR_1; + input ASYNC_FLUSH_1; + input ASYNC_FLUSH_S1; + input PIPELINE_RD_1; + input [1:0] WIDTH_SELECT1_1; + input [1:0] WIDTH_SELECT2_1; + + input CONCAT_EN_0; + input CONCAT_EN_1; + + //CODE here + reg RAM0_domain_sw; + reg RAM1_domain_sw; + + wire CLK1P_0, CLK1P_1, CLK2P_0, CLK2P_1, ASYNC_FLUSHP_1, ASYNC_FLUSHP_0; + + assign WidSel1_1 = WIDTH_SELECT1_0[1]; + assign WidSel2_1 = WIDTH_SELECT2_0[1]; + + assign CLK1P_0 = CLK1S_0 ? ~CLK1_0 : CLK1_0; + assign CLK1P_1 = CLK1S_1 ? ~CLK1_1 : CLK1_1; + assign CLK2P_0 = CLK2S_0 ? ~CLK2_0 : CLK2_0; + assign CLK2P_1 = CLK2S_1 ? ~CLK2_1 : CLK2_1; + assign ASYNC_FLUSHP_0 = ASYNC_FLUSH_S0 ? ~ASYNC_FLUSH_0 : ASYNC_FLUSH_0; + assign ASYNC_FLUSHP_1 = ASYNC_FLUSH_S1 ? ~ASYNC_FLUSH_1 : ASYNC_FLUSH_1; + + + /* FIFO mode-only switching */ + always @(CONCAT_EN_0 or FIFO_EN_0 or FIFO_EN_1 or WidSel1_1 or WidSel2_1 or DIR_0 or DIR_1) begin + if (CONCAT_EN_0) //CONCAT enabled, only RAM0 ports are checked begin - if (~FIFO_EN_0) //RAM MODE (no switching) + if (~FIFO_EN_0) //RAM MODE (no switching) begin - RAM0_domain_sw = 1'b0; //Both Switches are on default during RAM mode - RAM1_domain_sw = 1'b0; - end + RAM0_domain_sw = 1'b0; //Both Switches are on default during RAM mode + RAM1_domain_sw = 1'b0; + end else //FIFO Mode begin - RAM0_domain_sw = DIR_0; //Both Switches will get DIR_0 (primary port) during concat - RAM1_domain_sw = DIR_0; - end - end + RAM0_domain_sw = DIR_0; //Both Switches will get DIR_0 (primary port) during concat + RAM1_domain_sw = DIR_0; + end + end else //CONCAT disabled, RAM0 and RAM1 ports are be checked begin - if (WidSel1_1 || WidSel2_1) //AUTO-CONCAT FIFO/RAM Mode Horizontal Concatenation + if (WidSel1_1 || WidSel2_1) //AUTO-CONCAT FIFO/RAM Mode Horizontal Concatenation begin - if (~FIFO_EN_0) //RAM MODE (no switching) + if (~FIFO_EN_0) //RAM MODE (no switching) begin - RAM0_domain_sw = 1'b0; //Both Switches are on default during RAM mode - RAM1_domain_sw = 1'b0; - end + RAM0_domain_sw = 1'b0; //Both Switches are on default during RAM mode + RAM1_domain_sw = 1'b0; + end else //FIFO Mode begin - RAM0_domain_sw = DIR_0; //Both Switches will get DIR_0 (primary port) during concat - RAM1_domain_sw = DIR_0; - end - end + RAM0_domain_sw = DIR_0; //Both Switches will get DIR_0 (primary port) during concat + RAM1_domain_sw = DIR_0; + end + end else //FIFO/RAM Individual Mode begin - if (~FIFO_EN_0) //RAM0 Mode - RAM0_domain_sw = 1'b0; - else //FIFO0 Mode - RAM0_domain_sw = DIR_0; - if (~FIFO_EN_1) //RAM1 Mode - RAM1_domain_sw = 1'b0; - else //FIFO1 Mode - RAM1_domain_sw = DIR_1; - end - end -end - -assign RAM0_Clk1_gated = CLK1EN_0 & CLK1P_0; -assign RAM0_Clk2_gated = CLK2EN_0 & CLK2P_0; -assign RAM1_Clk1_gated = CLK1EN_1 & CLK1P_1; -assign RAM1_Clk2_gated = CLK2EN_1 & CLK2P_1; - -//PORT1 of RAMs is designated to PUSH circuitry, while PORT2 gets POP circuitry -sw_mux RAM0_clk_sw_port1 (.port_out(RAM0_clk_port1), .default_port(RAM0_Clk1_gated), .alt_port(RAM0_Clk2_gated), .switch(RAM0_domain_sw)); -sw_mux RAM0_P_sw_port1 (.port_out(RAM0_push_port1), .default_port(P1_0), .alt_port(P2_0), .switch(RAM0_domain_sw)); -sw_mux RAM0_Flush_sw_port1 (.port_out(RAM0CS_Sync_Flush_port1), .default_port(CS1_0), .alt_port(CS2_0), .switch(RAM0_domain_sw)); -sw_mux RAM0_WidSel0_port1 (.port_out(RAM0_Wid_Sel0_port1), .default_port(WIDTH_SELECT1_0[0]), .alt_port(WIDTH_SELECT2_0[0]), .switch(RAM0_domain_sw)); -sw_mux RAM0_WidSel1_port1 (.port_out(RAM0_Wid_Sel1_port1), .default_port(WIDTH_SELECT1_0[1]), .alt_port(WIDTH_SELECT2_0[1]), .switch(RAM0_domain_sw)); - -sw_mux RAM0_clk_sw_port2 (.port_out(RAM0_clk_port2), .default_port(RAM0_Clk2_gated), .alt_port(RAM0_Clk1_gated), .switch(RAM0_domain_sw)); -sw_mux RAM0_P_sw_port2 (.port_out(RAM0_pop_port2), .default_port(P2_0), .alt_port(P1_0), .switch(RAM0_domain_sw)); -sw_mux RAM0_Flush_sw_port2 (.port_out(RAM0CS_Sync_Flush_port2), .default_port(CS2_0), .alt_port(CS1_0), .switch(RAM0_domain_sw)); -sw_mux RAM0_WidSel0_port2 (.port_out(RAM0_Wid_Sel0_port2), .default_port(WIDTH_SELECT2_0[0]), .alt_port(WIDTH_SELECT1_0[0]), .switch(RAM0_domain_sw)); -sw_mux RAM0_WidSel1_port2 (.port_out(RAM0_Wid_Sel1_port2), .default_port(WIDTH_SELECT2_0[1]), .alt_port(WIDTH_SELECT1_0[1]), .switch(RAM0_domain_sw)); - -sw_mux RAM1_clk_sw_port1 (.port_out(RAM1_clk_port1), .default_port(RAM1_Clk1_gated), .alt_port(RAM1_Clk2_gated), .switch(RAM1_domain_sw)); -sw_mux RAM1_P_sw_port1 (.port_out(RAM1_push_port1), .default_port(P1_1), .alt_port(P2_1), .switch(RAM1_domain_sw)); -sw_mux RAM1_Flush_sw_port1 (.port_out(RAM1CS_Sync_Flush_port1), .default_port(CS1_1), .alt_port(CS2_1), .switch(RAM1_domain_sw)); -sw_mux RAM1_WidSel0_port1 (.port_out(RAM1_Wid_Sel0_port1), .default_port(WIDTH_SELECT1_1[0]), .alt_port(WIDTH_SELECT2_1[0]), .switch(RAM1_domain_sw)); -sw_mux RAM1_WidSel1_port1 (.port_out(RAM1_Wid_Sel1_port1), .default_port(WIDTH_SELECT1_1[1]), .alt_port(WIDTH_SELECT2_1[1]), .switch(RAM1_domain_sw)); - - -sw_mux RAM1_clk_sw_port2 (.port_out(RAM1_clk_port2), .default_port(RAM1_Clk2_gated), .alt_port(RAM1_Clk1_gated), .switch(RAM1_domain_sw)); -sw_mux RAM1_P_sw_port2 (.port_out(RAM1_pop_port2), .default_port(P2_1), .alt_port(P1_1), .switch(RAM1_domain_sw)); -sw_mux RAM1_Flush_sw_port2 (.port_out(RAM1CS_Sync_Flush_port2), .default_port(CS2_1), .alt_port(CS1_1), .switch(RAM1_domain_sw)); -sw_mux RAM1_WidSel0_port2 (.port_out(RAM1_Wid_Sel0_port2), .default_port(WIDTH_SELECT2_1[0]), .alt_port(WIDTH_SELECT1_1[0]), .switch(RAM1_domain_sw)); -sw_mux RAM1_WidSel1_port2 (.port_out(RAM1_Wid_Sel1_port2), .default_port(WIDTH_SELECT2_1[1]), .alt_port(WIDTH_SELECT1_1[1]), .switch(RAM1_domain_sw)); - -ram_block_8K # ( .INIT(INIT), - .INIT_FILE(INIT_FILE), - .data_width_int(data_width_int), - .data_depth_int(data_depth_int) - ) -ram_block_8K_inst ( - .CLK1_0(RAM0_clk_port1), - .CLK2_0(RAM0_clk_port2), - .WD_0(WD_0), - .RD_0(RD_0), - .A1_0(A1_0), - .A2_0(A2_0), - .CS1_0(RAM0CS_Sync_Flush_port1), - .CS2_0(RAM0CS_Sync_Flush_port2), - .WEN1_0(WEN1_0), - .POP_0(RAM0_pop_port2), - .Almost_Full_0(Almost_Full_0), - .Almost_Empty_0(Almost_Empty_0), - .PUSH_FLAG_0(PUSH_FLAG_0), - .POP_FLAG_0(POP_FLAG_0), - - .FIFO_EN_0(FIFO_EN_0), - .SYNC_FIFO_0(SYNC_FIFO_0), - .PIPELINE_RD_0(PIPELINE_RD_0), - .WIDTH_SELECT1_0({RAM0_Wid_Sel1_port1,RAM0_Wid_Sel0_port1}), - .WIDTH_SELECT2_0({RAM0_Wid_Sel1_port2,RAM0_Wid_Sel0_port2}), - - .CLK1_1(RAM1_clk_port1), - .CLK2_1(RAM1_clk_port2), - .WD_1(WD_1), - .RD_1(RD_1), - .A1_1(A1_1), - .A2_1(A2_1), - .CS1_1(RAM1CS_Sync_Flush_port1), - .CS2_1(RAM1CS_Sync_Flush_port2), - .WEN1_1(WEN1_1), - .POP_1(RAM1_pop_port2), - .Almost_Empty_1(Almost_Empty_1), - .Almost_Full_1(Almost_Full_1), - .PUSH_FLAG_1(PUSH_FLAG_1), - .POP_FLAG_1(POP_FLAG_1), - - .FIFO_EN_1(FIFO_EN_1), - .SYNC_FIFO_1(SYNC_FIFO_1), - .PIPELINE_RD_1(PIPELINE_RD_1), - .WIDTH_SELECT1_1({RAM1_Wid_Sel1_port1,RAM1_Wid_Sel0_port1}), - .WIDTH_SELECT2_1({RAM1_Wid_Sel1_port2,RAM1_Wid_Sel0_port2}), - - .CONCAT_EN_0(CONCAT_EN_0), - .CONCAT_EN_1(CONCAT_EN_1), - - .PUSH_0(RAM0_push_port1), - .PUSH_1(RAM1_push_port1), - .aFlushN_0(~ASYNC_FLUSHP_0), - .aFlushN_1(~ASYNC_FLUSHP_1) - ); + if (~FIFO_EN_0) //RAM0 Mode + RAM0_domain_sw = 1'b0; + else //FIFO0 Mode + RAM0_domain_sw = DIR_0; + if (~FIFO_EN_1) //RAM1 Mode + RAM1_domain_sw = 1'b0; + else //FIFO1 Mode + RAM1_domain_sw = DIR_1; + end + end + end + + assign RAM0_Clk1_gated = CLK1EN_0 & CLK1P_0; + assign RAM0_Clk2_gated = CLK2EN_0 & CLK2P_0; + assign RAM1_Clk1_gated = CLK1EN_1 & CLK1P_1; + assign RAM1_Clk2_gated = CLK2EN_1 & CLK2P_1; + + //PORT1 of RAMs is designated to PUSH circuitry, while PORT2 gets POP circuitry + sw_mux RAM0_clk_sw_port1 ( + .port_out(RAM0_clk_port1), + .default_port(RAM0_Clk1_gated), + .alt_port(RAM0_Clk2_gated), + .switch(RAM0_domain_sw) + ); + sw_mux RAM0_P_sw_port1 ( + .port_out(RAM0_push_port1), + .default_port(P1_0), + .alt_port(P2_0), + .switch(RAM0_domain_sw) + ); + sw_mux RAM0_Flush_sw_port1 ( + .port_out(RAM0CS_Sync_Flush_port1), + .default_port(CS1_0), + .alt_port(CS2_0), + .switch(RAM0_domain_sw) + ); + sw_mux RAM0_WidSel0_port1 ( + .port_out(RAM0_Wid_Sel0_port1), + .default_port(WIDTH_SELECT1_0[0]), + .alt_port(WIDTH_SELECT2_0[0]), + .switch(RAM0_domain_sw) + ); + sw_mux RAM0_WidSel1_port1 ( + .port_out(RAM0_Wid_Sel1_port1), + .default_port(WIDTH_SELECT1_0[1]), + .alt_port(WIDTH_SELECT2_0[1]), + .switch(RAM0_domain_sw) + ); + + sw_mux RAM0_clk_sw_port2 ( + .port_out(RAM0_clk_port2), + .default_port(RAM0_Clk2_gated), + .alt_port(RAM0_Clk1_gated), + .switch(RAM0_domain_sw) + ); + sw_mux RAM0_P_sw_port2 ( + .port_out(RAM0_pop_port2), + .default_port(P2_0), + .alt_port(P1_0), + .switch(RAM0_domain_sw) + ); + sw_mux RAM0_Flush_sw_port2 ( + .port_out(RAM0CS_Sync_Flush_port2), + .default_port(CS2_0), + .alt_port(CS1_0), + .switch(RAM0_domain_sw) + ); + sw_mux RAM0_WidSel0_port2 ( + .port_out(RAM0_Wid_Sel0_port2), + .default_port(WIDTH_SELECT2_0[0]), + .alt_port(WIDTH_SELECT1_0[0]), + .switch(RAM0_domain_sw) + ); + sw_mux RAM0_WidSel1_port2 ( + .port_out(RAM0_Wid_Sel1_port2), + .default_port(WIDTH_SELECT2_0[1]), + .alt_port(WIDTH_SELECT1_0[1]), + .switch(RAM0_domain_sw) + ); + + sw_mux RAM1_clk_sw_port1 ( + .port_out(RAM1_clk_port1), + .default_port(RAM1_Clk1_gated), + .alt_port(RAM1_Clk2_gated), + .switch(RAM1_domain_sw) + ); + sw_mux RAM1_P_sw_port1 ( + .port_out(RAM1_push_port1), + .default_port(P1_1), + .alt_port(P2_1), + .switch(RAM1_domain_sw) + ); + sw_mux RAM1_Flush_sw_port1 ( + .port_out(RAM1CS_Sync_Flush_port1), + .default_port(CS1_1), + .alt_port(CS2_1), + .switch(RAM1_domain_sw) + ); + sw_mux RAM1_WidSel0_port1 ( + .port_out(RAM1_Wid_Sel0_port1), + .default_port(WIDTH_SELECT1_1[0]), + .alt_port(WIDTH_SELECT2_1[0]), + .switch(RAM1_domain_sw) + ); + sw_mux RAM1_WidSel1_port1 ( + .port_out(RAM1_Wid_Sel1_port1), + .default_port(WIDTH_SELECT1_1[1]), + .alt_port(WIDTH_SELECT2_1[1]), + .switch(RAM1_domain_sw) + ); + + + sw_mux RAM1_clk_sw_port2 ( + .port_out(RAM1_clk_port2), + .default_port(RAM1_Clk2_gated), + .alt_port(RAM1_Clk1_gated), + .switch(RAM1_domain_sw) + ); + sw_mux RAM1_P_sw_port2 ( + .port_out(RAM1_pop_port2), + .default_port(P2_1), + .alt_port(P1_1), + .switch(RAM1_domain_sw) + ); + sw_mux RAM1_Flush_sw_port2 ( + .port_out(RAM1CS_Sync_Flush_port2), + .default_port(CS2_1), + .alt_port(CS1_1), + .switch(RAM1_domain_sw) + ); + sw_mux RAM1_WidSel0_port2 ( + .port_out(RAM1_Wid_Sel0_port2), + .default_port(WIDTH_SELECT2_1[0]), + .alt_port(WIDTH_SELECT1_1[0]), + .switch(RAM1_domain_sw) + ); + sw_mux RAM1_WidSel1_port2 ( + .port_out(RAM1_Wid_Sel1_port2), + .default_port(WIDTH_SELECT2_1[1]), + .alt_port(WIDTH_SELECT1_1[1]), + .switch(RAM1_domain_sw) + ); + + ram_block_8K #( + .INIT(INIT), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) ram_block_8K_inst ( + .CLK1_0(RAM0_clk_port1), + .CLK2_0(RAM0_clk_port2), + .WD_0(WD_0), + .RD_0(RD_0), + .A1_0(A1_0), + .A2_0(A2_0), + .CS1_0(RAM0CS_Sync_Flush_port1), + .CS2_0(RAM0CS_Sync_Flush_port2), + .WEN1_0(WEN1_0), + .POP_0(RAM0_pop_port2), + .Almost_Full_0(Almost_Full_0), + .Almost_Empty_0(Almost_Empty_0), + .PUSH_FLAG_0(PUSH_FLAG_0), + .POP_FLAG_0(POP_FLAG_0), + + .FIFO_EN_0(FIFO_EN_0), + .SYNC_FIFO_0(SYNC_FIFO_0), + .PIPELINE_RD_0(PIPELINE_RD_0), + .WIDTH_SELECT1_0({RAM0_Wid_Sel1_port1, RAM0_Wid_Sel0_port1}), + .WIDTH_SELECT2_0({RAM0_Wid_Sel1_port2, RAM0_Wid_Sel0_port2}), + + .CLK1_1(RAM1_clk_port1), + .CLK2_1(RAM1_clk_port2), + .WD_1(WD_1), + .RD_1(RD_1), + .A1_1(A1_1), + .A2_1(A2_1), + .CS1_1(RAM1CS_Sync_Flush_port1), + .CS2_1(RAM1CS_Sync_Flush_port2), + .WEN1_1(WEN1_1), + .POP_1(RAM1_pop_port2), + .Almost_Empty_1(Almost_Empty_1), + .Almost_Full_1(Almost_Full_1), + .PUSH_FLAG_1(PUSH_FLAG_1), + .POP_FLAG_1(POP_FLAG_1), + + .FIFO_EN_1(FIFO_EN_1), + .SYNC_FIFO_1(SYNC_FIFO_1), + .PIPELINE_RD_1(PIPELINE_RD_1), + .WIDTH_SELECT1_1({RAM1_Wid_Sel1_port1, RAM1_Wid_Sel0_port1}), + .WIDTH_SELECT2_1({RAM1_Wid_Sel1_port2, RAM1_Wid_Sel0_port2}), + + .CONCAT_EN_0(CONCAT_EN_0), + .CONCAT_EN_1(CONCAT_EN_1), + + .PUSH_0(RAM0_push_port1), + .PUSH_1(RAM1_push_port1), + .aFlushN_0(~ASYNC_FLUSHP_0), + .aFlushN_1(~ASYNC_FLUSHP_1) + ); endmodule -module ram8k_2x1_cell_macro # ( - parameter [18431:0] INIT = 18432'bx, - parameter INIT_FILE="init.mem", - parameter data_width_int = 16, - parameter data_depth_int = 1024 - ) - ( +module ram8k_2x1_cell_macro #( + parameter [18431:0] INIT = 18432'bx, + parameter INIT_FILE = "init.mem", + parameter data_width_int = 16, + parameter data_depth_int = 1024 +) ( input [10:0] A1_0, input [10:0] A1_1, input [10:0] A2_0, @@ -1896,15 +1879,46 @@ module ram8k_2x1_cell_macro # ( input CLK2_0, (* clkbuf_sink *) input CLK2_1, - output Almost_Empty_0, Almost_Empty_1, Almost_Full_0, Almost_Full_1, - input ASYNC_FLUSH_0, ASYNC_FLUSH_1, ASYNC_FLUSH_S0, ASYNC_FLUSH_S1, CLK1EN_0, CLK1EN_1, CLK1S_0, CLK1S_1, CLK2EN_0, CLK2EN_1, CLK2S_0, CLK2S_1, CONCAT_EN_0, CONCAT_EN_1, CS1_0, CS1_1,CS2_0, CS2_1, DIR_0, DIR_1, FIFO_EN_0, FIFO_EN_1, P1_0, P1_1, P2_0,P2_1, PIPELINE_RD_0, PIPELINE_RD_1, + output Almost_Empty_0, + Almost_Empty_1, + Almost_Full_0, + Almost_Full_1, + input ASYNC_FLUSH_0, + ASYNC_FLUSH_1, + ASYNC_FLUSH_S0, + ASYNC_FLUSH_S1, + CLK1EN_0, + CLK1EN_1, + CLK1S_0, + CLK1S_1, + CLK2EN_0, + CLK2EN_1, + CLK2S_0, + CLK2S_1, + CONCAT_EN_0, + CONCAT_EN_1, + CS1_0, + CS1_1, + CS2_0, + CS2_1, + DIR_0, + DIR_1, + FIFO_EN_0, + FIFO_EN_1, + P1_0, + P1_1, + P2_0, + P2_1, + PIPELINE_RD_0, + PIPELINE_RD_1, output [3:0] POP_FLAG_0, output [3:0] POP_FLAG_1, output [3:0] PUSH_FLAG_0, output [3:0] PUSH_FLAG_1, output [17:0] RD_0, output [17:0] RD_1, - input SYNC_FIFO_0, SYNC_FIFO_1, + input SYNC_FIFO_0, + SYNC_FIFO_1, input [17:0] WD_0, input [17:0] WD_1, input [1:0] WEN1_0, @@ -1913,975 +1927,1006 @@ module ram8k_2x1_cell_macro # ( input [1:0] WIDTH_SELECT1_1, input [1:0] WIDTH_SELECT2_0, input [1:0] WIDTH_SELECT2_1, - input SD,DS,LS,SD_RB1,LS_RB1,DS_RB1,RMEA,RMEB,TEST1A,TEST1B, + input SD, + DS, + LS, + SD_RB1, + LS_RB1, + DS_RB1, + RMEA, + RMEB, + TEST1A, + TEST1B, input [3:0] RMA, - input [3:0] RMB); - - - ram8k_2x1_cell # (.INIT(INIT), - .INIT_FILE(INIT_FILE), - .data_width_int(data_width_int), - .data_depth_int(data_depth_int) - ) - I1 ( - .A1_0({ A1_0[10:0] }) , .A1_1({ A1_1[10:0] }), - .A2_0({ A2_0[10:0] }) , .A2_1({ A2_1[10:0] }), - .Almost_Empty_0(Almost_Empty_0), - .Almost_Empty_1(Almost_Empty_1), - .Almost_Full_0(Almost_Full_0), - .Almost_Full_1(Almost_Full_1), - .ASYNC_FLUSH_0(ASYNC_FLUSH_0), - .ASYNC_FLUSH_1(ASYNC_FLUSH_1), - .ASYNC_FLUSH_S0(ASYNC_FLUSH_S0), - .ASYNC_FLUSH_S1(ASYNC_FLUSH_S1) , .CLK1_0(CLK1_0), - .CLK1_1(CLK1_1) , .CLK1EN_0(CLK1EN_0) , .CLK1EN_1(CLK1EN_1), - .CLK1S_0(CLK1S_0) , .CLK1S_1(CLK1S_1) , .CLK2_0(CLK2_0), - .CLK2_1(CLK2_1) , .CLK2EN_0(CLK2EN_0) , .CLK2EN_1(CLK2EN_1), - .CLK2S_0(CLK2S_0) , .CLK2S_1(CLK2S_1), - .CONCAT_EN_0(CONCAT_EN_0) , .CONCAT_EN_1(CONCAT_EN_1), - .CS1_0(CS1_0) , .CS1_1(CS1_1) , .CS2_0(CS2_0) , .CS2_1(CS2_1), - .DIR_0(DIR_0) , .DIR_1(DIR_1) , .FIFO_EN_0(FIFO_EN_0), - .FIFO_EN_1(FIFO_EN_1) , .P1_0(P1_0) , .P1_1(P1_1) , .P2_0(P2_0), - .P2_1(P2_1) , .PIPELINE_RD_0(PIPELINE_RD_0), - .PIPELINE_RD_1(PIPELINE_RD_1), - .POP_FLAG_0({ POP_FLAG_0[3:0] }), - .POP_FLAG_1({ POP_FLAG_1[3:0] }), - .PUSH_FLAG_0({ PUSH_FLAG_0[3:0] }), - .PUSH_FLAG_1({ PUSH_FLAG_1[3:0] }) , .RD_0({ RD_0[17:0] }), - .RD_1({ RD_1[17:0] }) , .SYNC_FIFO_0(SYNC_FIFO_0), - .SYNC_FIFO_1(SYNC_FIFO_1) , .WD_0({ WD_0[17:0] }), - .WD_1({ WD_1[17:0] }) , .WEN1_0({ WEN1_0[1:0] }), - .WEN1_1({ WEN1_1[1:0] }), - .WIDTH_SELECT1_0({ WIDTH_SELECT1_0[1:0] }), - .WIDTH_SELECT1_1({ WIDTH_SELECT1_1[1:0] }), - .WIDTH_SELECT2_0({ WIDTH_SELECT2_0[1:0] }), - .WIDTH_SELECT2_1({ WIDTH_SELECT2_1[1:0] }) ); - -endmodule /* ram8k_2x1_cell_macro */ - -module RAM_8K_BLK ( WA,RA,WD,WClk,RClk,WClk_En,RClk_En,WEN,RD); - -parameter addr_int = 9, + input [3:0] RMB +); + + + ram8k_2x1_cell #( + .INIT(INIT), + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) I1 ( + .A1_0({A1_0[10:0]}), + .A1_1({A1_1[10:0]}), + .A2_0({A2_0[10:0]}), + .A2_1({A2_1[10:0]}), + .Almost_Empty_0(Almost_Empty_0), + .Almost_Empty_1(Almost_Empty_1), + .Almost_Full_0(Almost_Full_0), + .Almost_Full_1(Almost_Full_1), + .ASYNC_FLUSH_0(ASYNC_FLUSH_0), + .ASYNC_FLUSH_1(ASYNC_FLUSH_1), + .ASYNC_FLUSH_S0(ASYNC_FLUSH_S0), + .ASYNC_FLUSH_S1(ASYNC_FLUSH_S1), + .CLK1_0(CLK1_0), + .CLK1_1(CLK1_1), + .CLK1EN_0(CLK1EN_0), + .CLK1EN_1(CLK1EN_1), + .CLK1S_0(CLK1S_0), + .CLK1S_1(CLK1S_1), + .CLK2_0(CLK2_0), + .CLK2_1(CLK2_1), + .CLK2EN_0(CLK2EN_0), + .CLK2EN_1(CLK2EN_1), + .CLK2S_0(CLK2S_0), + .CLK2S_1(CLK2S_1), + .CONCAT_EN_0(CONCAT_EN_0), + .CONCAT_EN_1(CONCAT_EN_1), + .CS1_0(CS1_0), + .CS1_1(CS1_1), + .CS2_0(CS2_0), + .CS2_1(CS2_1), + .DIR_0(DIR_0), + .DIR_1(DIR_1), + .FIFO_EN_0(FIFO_EN_0), + .FIFO_EN_1(FIFO_EN_1), + .P1_0(P1_0), + .P1_1(P1_1), + .P2_0(P2_0), + .P2_1(P2_1), + .PIPELINE_RD_0(PIPELINE_RD_0), + .PIPELINE_RD_1(PIPELINE_RD_1), + .POP_FLAG_0({POP_FLAG_0[3:0]}), + .POP_FLAG_1({POP_FLAG_1[3:0]}), + .PUSH_FLAG_0({PUSH_FLAG_0[3:0]}), + .PUSH_FLAG_1({PUSH_FLAG_1[3:0]}), + .RD_0({RD_0[17:0]}), + .RD_1({RD_1[17:0]}), + .SYNC_FIFO_0(SYNC_FIFO_0), + .SYNC_FIFO_1(SYNC_FIFO_1), + .WD_0({WD_0[17:0]}), + .WD_1({WD_1[17:0]}), + .WEN1_0({WEN1_0[1:0]}), + .WEN1_1({WEN1_1[1:0]}), + .WIDTH_SELECT1_0({WIDTH_SELECT1_0[1:0]}), + .WIDTH_SELECT1_1({WIDTH_SELECT1_1[1:0]}), + .WIDTH_SELECT2_0({WIDTH_SELECT2_0[1:0]}), + .WIDTH_SELECT2_1({WIDTH_SELECT2_1[1:0]}) + ); + +endmodule /* ram8k_2x1_cell_macro */ + +module RAM_8K_BLK ( + WA, + RA, + WD, + WClk, + RClk, + WClk_En, + RClk_En, + WEN, + RD +); + + parameter addr_int = 9, data_depth_int = 512, data_width_int = 18, wr_enable_int = 2, reg_rd_int = 0; - -parameter [8191:0] INIT = 8192'bx; -parameter INIT_FILE="init.mem"; - -input [addr_int-1:0] WA; -input [addr_int-1:0] RA; -input WClk,RClk; -input WClk_En,RClk_En; -input [wr_enable_int-1:0] WEN; -input [data_width_int-1:0] WD; -output [data_width_int-1:0] RD; -wire VCC,GND; -wire WClk0_Sel,RClk0_Sel; -wire WClk1_Sel,RClk1_Sel; + parameter [8191:0] INIT = 8192'bx; + parameter INIT_FILE = "init.mem"; -wire reg_rd0; -wire reg_rd1; -wire [10:0] addr_wr0,addr_rd0,addr_wr1,addr_rd1; + input [addr_int-1:0] WA; + input [addr_int-1:0] RA; + input WClk, RClk; + input WClk_En, RClk_En; + input [wr_enable_int-1:0] WEN; + input [data_width_int-1:0] WD; + output [data_width_int-1:0] RD; -wire [17:0] in_reg0; + wire VCC, GND; + wire WClk0_Sel, RClk0_Sel; + wire WClk1_Sel, RClk1_Sel; -wire [2:0] wen_reg0; + wire reg_rd0; + wire reg_rd1; + wire [10:0] addr_wr0, addr_rd0, addr_wr1, addr_rd1; -wire [15:0] out_reg0; + wire [17:0] in_reg0; -wire [1:0] out_par0; + wire [ 2:0] wen_reg0; -wire [1:0] WS1_0,WS2_0; -wire [1:0] WS_GND; + wire [15:0] out_reg0; -wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; + wire [ 1:0] out_par0; -wire WD0_SEL,RD0_SEL; -wire WD1_SEL,RD1_SEL; + wire [1:0] WS1_0, WS2_0; + wire [1:0] WS_GND; -assign VCC = 1'b1; -assign GND = 1'b0; + wire LS, DS, SD, LS_RB1, DS_RB1, SD_RB1; -assign WD0_SEL = 1'b1; -assign RD0_SEL = 1'b1; -assign WD1_SEL = 1'b0; -assign RD1_SEL = 1'b0; + wire WD0_SEL, RD0_SEL; + wire WD1_SEL, RD1_SEL; -assign WClk0_Sel = 1'b0; -assign RClk0_Sel = 1'b0; + assign VCC = 1'b1; + assign GND = 1'b0; -assign WClk1_Sel = 1'b0; -assign RClk1_Sel = 1'b0; + assign WD0_SEL = 1'b1; + assign RD0_SEL = 1'b1; + assign WD1_SEL = 1'b0; + assign RD1_SEL = 1'b0; -assign LS = 1'b0; -assign DS = 1'b0; -assign SD = 1'b0; -assign LS_RB1 = 1'b0; -assign DS_RB1 = 1'b0; -assign SD_RB1 = 1'b0; + assign WClk0_Sel = 1'b0; + assign RClk0_Sel = 1'b0; -assign reg_rd0 =reg_rd_int; -assign WS_GND = 2'b00; + assign WClk1_Sel = 1'b0; + assign RClk1_Sel = 1'b0; -assign reg_rd1 =1'b0; + assign LS = 1'b0; + assign DS = 1'b0; + assign SD = 1'b0; + assign LS_RB1 = 1'b0; + assign DS_RB1 = 1'b0; + assign SD_RB1 = 1'b0; -assign wen_reg0[2:wr_enable_int]=0; -assign wen_reg0[wr_enable_int-1:0]=WEN; + assign reg_rd0 = reg_rd_int; + assign WS_GND = 2'b00; -assign addr_wr1=11'b0000000000; -assign addr_rd1=11'b0000000000; + assign reg_rd1 = 1'b0; -generate + assign wen_reg0[2:wr_enable_int] = 0; + assign wen_reg0[wr_enable_int-1:0] = WEN; - if(addr_int == 11) - begin - assign addr_wr0[10:0]=WA; - assign addr_rd0[10:0]=RA; - end - else - begin - assign addr_wr0[10:addr_int]=0; - assign addr_wr0[addr_int-1:0]=WA; - assign addr_rd0[10:addr_int]=0; - assign addr_rd0[addr_int-1:0]=RA; - end + assign addr_wr1 = 11'b0000000000; + assign addr_rd1 = 11'b0000000000; - if (data_width_int == 16) - begin - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - else if (data_width_int > 8 && data_width_int < 16) - begin - assign in_reg0[15:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - else if (data_width_int <= 8) - begin - assign in_reg0[15:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end + generate - if(data_width_int <=8) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; + if (addr_int == 11) begin + assign addr_wr0[10:0] = WA; + assign addr_rd0[10:0] = RA; + end else begin + assign addr_wr0[10:addr_int] = 0; + assign addr_wr0[addr_int-1:0] = WA; + assign addr_rd0[10:addr_int] = 0; + assign addr_rd0[addr_int-1:0] = RA; end - else if(data_width_int >8 && data_width_int <=16) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(data_width_int > 16) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end -endgenerate - - ram8k_2x1_cell_macro # ( - `include "pp3_bram_init_8_16.vh" - .INIT_FILE(INIT_FILE), - .data_width_int(data_width_int), - .data_depth_int(data_depth_int) - ) - U1 ( - .A1_0(addr_wr0) , - .A1_1(addr_wr1), - .A2_0(addr_rd0), - .A2_1(addr_rd1), - .ASYNC_FLUSH_0(GND), //chk - .ASYNC_FLUSH_1(GND), //chk - .ASYNC_FLUSH_S0(GND), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(WClk), - .CLK1_1(GND), - .CLK1S_0(WClk0_Sel), - .CLK1S_1(WClk1_Sel), - .CLK1EN_0(WClk_En), - .CLK1EN_1(GND), - .CLK2_0(RClk), - .CLK2_1(GND), - .CLK2S_0(RClk0_Sel), - .CLK2S_1(RClk1_Sel), - .CLK2EN_0(RClk_En), - .CLK2EN_1(GND), - .CONCAT_EN_0(GND), - .CONCAT_EN_1(GND), - .CS1_0(WD0_SEL), - .CS1_1(WD1_SEL), - .CS2_0(RD0_SEL), - .CS2_1(RD1_SEL), - .DIR_0(GND), - .DIR_1(GND), - .FIFO_EN_0(GND), - .FIFO_EN_1(GND), - .P1_0(GND), //P1_0 - .P1_1(GND), //P1_1 - .P2_0(GND), // - .P2_1(GND), // - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(reg_rd1), - .SYNC_FIFO_0(GND), - .SYNC_FIFO_1(GND), - .WD_1({18{GND}}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1(WS_GND), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1(WS_GND), - .WEN1_0(wen_reg0[1:0]), - .WEN1_1({2{GND}}), - .Almost_Empty_0(), - .Almost_Empty_1(), - .Almost_Full_0(), - .Almost_Full_1(), - .POP_FLAG_0(), - .POP_FLAG_1(), - .PUSH_FLAG_0(), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1(), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - - assign RD[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; - + if (data_width_int == 16) begin + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end else if (data_width_int > 8 && data_width_int < 16) begin + assign in_reg0[15:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end else if (data_width_int <= 8) begin + assign in_reg0[15:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end + + if (data_width_int <= 8) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (data_width_int > 8 && data_width_int <= 16) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (data_width_int > 16) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + endgenerate + + ram8k_2x1_cell_macro #( + `include "pp3_bram_init_8_16.vh" + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) U1 ( + .A1_0(addr_wr0), + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), //chk + .ASYNC_FLUSH_1(GND), //chk + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(GND), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk1_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(GND), + .CLK2_0(RClk), + .CLK2_1(GND), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk1_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(WD1_SEL), + .CS2_0(RD0_SEL), + .CS2_1(RD1_SEL), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), //P1_0 + .P1_1(GND), //P1_1 + .P2_0(GND), // + .P2_1(GND), // + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(reg_rd1), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1({2{GND}}), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + assign RD[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; + endmodule -module RAM_16K_BLK ( WA,RA,WD,WClk,RClk,WClk_En,RClk_En,WEN,RD); +module RAM_16K_BLK ( + WA, + RA, + WD, + WClk, + RClk, + WClk_En, + RClk_En, + WEN, + RD +); -parameter addr_int = 9, + parameter addr_int = 9, data_depth_int = 512, data_width_int = 36, wr_enable_int = 4, reg_rd_int = 0; -parameter [16383:0] INIT = 16384'bx; -parameter INIT_FILE="init.mem"; - -input [addr_int-1:0] WA; -input [addr_int-1:0] RA; -input WClk,RClk; -input WClk_En,RClk_En; -input [wr_enable_int-1:0] WEN; -input [data_width_int-1:0] WD; -output [data_width_int-1:0] RD; + parameter [16383:0] INIT = 16384'bx; + parameter INIT_FILE = "init.mem"; -wire VCC,GND; + input [addr_int-1:0] WA; + input [addr_int-1:0] RA; + input WClk, RClk; + input WClk_En, RClk_En; + input [wr_enable_int-1:0] WEN; + input [data_width_int-1:0] WD; + output [data_width_int-1:0] RD; -wire WClk0_Sel,RClk0_Sel; -wire WClk1_Sel,RClk1_Sel; + wire VCC, GND; -wire reg_rd0; -wire reg_rd1; -wire [10:0] addr_wr0,addr_rd0,addr_wr1,addr_rd1; + wire WClk0_Sel, RClk0_Sel; + wire WClk1_Sel, RClk1_Sel; -wire [31:0] in_reg0; + wire reg_rd0; + wire reg_rd1; + wire [10:0] addr_wr0, addr_rd0, addr_wr1, addr_rd1; -wire [4:0] wen_reg0; + wire [31:0] in_reg0; -wire [31:0] out_reg0; + wire [ 4:0] wen_reg0; -wire [3:0] out_par0; + wire [31:0] out_reg0; -wire [1:0] WS1_0,WS2_0; -wire [1:0] WS_GND; + wire [ 3:0] out_par0; -wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; + wire [1:0] WS1_0, WS2_0; + wire [1:0] WS_GND; -wire WD0_SEL,RD0_SEL; -wire WD1_SEL,RD1_SEL; + wire LS, DS, SD, LS_RB1, DS_RB1, SD_RB1; -assign VCC = 1'b1; -assign GND = 1'b0; + wire WD0_SEL, RD0_SEL; + wire WD1_SEL, RD1_SEL; -assign WD0_SEL = 1'b1; -assign RD0_SEL = 1'b1; -assign WD1_SEL = 1'b1; -assign RD1_SEL = 1'b1; + assign VCC = 1'b1; + assign GND = 1'b0; -assign WClk0_Sel = 1'b0; -assign RClk0_Sel = 1'b0; + assign WD0_SEL = 1'b1; + assign RD0_SEL = 1'b1; + assign WD1_SEL = 1'b1; + assign RD1_SEL = 1'b1; -assign WClk1_Sel = 1'b0; -assign RClk1_Sel = 1'b0; + assign WClk0_Sel = 1'b0; + assign RClk0_Sel = 1'b0; -assign LS = 1'b0; -assign DS = 1'b0; -assign SD = 1'b0; -assign LS_RB1 = 1'b0; -assign DS_RB1 = 1'b0; -assign SD_RB1 = 1'b0; + assign WClk1_Sel = 1'b0; + assign RClk1_Sel = 1'b0; -assign reg_rd0 =reg_rd_int; -assign WS_GND = 2'b00; + assign LS = 1'b0; + assign DS = 1'b0; + assign SD = 1'b0; + assign LS_RB1 = 1'b0; + assign DS_RB1 = 1'b0; + assign SD_RB1 = 1'b0; -assign reg_rd1 = 1'b0; + assign reg_rd0 = reg_rd_int; + assign WS_GND = 2'b00; -assign wen_reg0[4:wr_enable_int]=0; -assign wen_reg0[wr_enable_int-1:0]=WEN; + assign reg_rd1 = 1'b0; -assign addr_wr1=11'b0000000000; -assign addr_rd1=11'b0000000000; + assign wen_reg0[4:wr_enable_int] = 0; + assign wen_reg0[wr_enable_int-1:0] = WEN; -generate + assign addr_wr1 = 11'b0000000000; + assign addr_rd1 = 11'b0000000000; - if(addr_int == 11) - begin - assign addr_wr0[10:0]=WA; - assign addr_rd0[10:0]=RA; - end - else - begin - assign addr_wr0[10:addr_int]=0; - assign addr_wr0[addr_int-1:0]=WA; - assign addr_rd0[10:addr_int]=0; - assign addr_rd0[addr_int-1:0]=RA; - end - - if (data_width_int == 32) - begin - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - else if (data_width_int > 8 && data_width_int < 32) - begin - assign in_reg0[31:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end - else if (data_width_int <= 8) - begin - assign in_reg0[31:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =WD[data_width_int-1:0]; - end + generate - if(data_width_int <=8) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; - end - else if(data_width_int >8 && data_width_int <=16) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(data_width_int > 16) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end + if (addr_int == 11) begin + assign addr_wr0[10:0] = WA; + assign addr_rd0[10:0] = RA; + end else begin + assign addr_wr0[10:addr_int] = 0; + assign addr_wr0[addr_int-1:0] = WA; + assign addr_rd0[10:addr_int] = 0; + assign addr_rd0[addr_int-1:0] = RA; + end - if (data_width_int <=16) begin - - ram8k_2x1_cell_macro # ( - `include "pp3_bram_init_8_16.vh" - .INIT_FILE(INIT_FILE), - .data_width_int(data_width_int), - .data_depth_int(data_depth_int) - ) - U1 ( - .A1_0(addr_wr0) , - .A1_1(addr_wr1), - .A2_0(addr_rd0), - .A2_1(addr_rd1), - .ASYNC_FLUSH_0(GND), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(GND), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(WClk), - .CLK1_1(WClk), - .CLK1S_0(WClk0_Sel), - .CLK1S_1(WClk0_Sel), - .CLK1EN_0(WClk_En), - .CLK1EN_1(WClk_En), - .CLK2_0(RClk), - .CLK2_1(RClk), - .CLK2S_0(RClk0_Sel), - .CLK2S_1(RClk0_Sel), - .CLK2EN_0(RClk_En), - .CLK2EN_1(RClk_En), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(WD0_SEL), - .CS1_1(GND), - .CS2_0(RD0_SEL), - .CS2_1(GND), - .DIR_0(GND), - .DIR_1(GND), - .FIFO_EN_0(GND), - .FIFO_EN_1(GND), - .P1_0(GND), - .P1_1(GND), - .P2_0(GND), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(GND), - .SYNC_FIFO_1(GND), - .WD_1({18{GND}}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1(WS_GND), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1(WS_GND), - .WEN1_0(wen_reg0[1:0]), - .WEN1_1(wen_reg0[3:2]), - .Almost_Empty_0(), - .Almost_Empty_1(), - .Almost_Full_0(), - .Almost_Full_1(), - .POP_FLAG_0(), - .POP_FLAG_1(), - .PUSH_FLAG_0(), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1(), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - end - else if (data_width_int > 16) begin - - ram8k_2x1_cell_macro # ( - `include "pp3_bram_init_32.vh" - .INIT_FILE(INIT_FILE), - .data_width_int(data_width_int), - .data_depth_int(data_depth_int) - ) - U2 ( - .A1_0(addr_wr0) , - .A1_1(addr_wr1), - .A2_0(addr_rd0), - .A2_1(addr_rd1), - .ASYNC_FLUSH_0(GND), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(GND), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(WClk), - .CLK1_1(WClk), - .CLK1S_0(WClk0_Sel), - .CLK1S_1(WClk0_Sel), - .CLK1EN_0(WClk_En), - .CLK1EN_1(WClk_En), - .CLK2_0(RClk), - .CLK2_1(RClk), - .CLK2S_0(RClk0_Sel), - .CLK2S_1(RClk0_Sel), - .CLK2EN_0(RClk_En), - .CLK2EN_1(RClk_En), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(WD0_SEL), - .CS1_1(GND), - .CS2_0(RD0_SEL), - .CS2_1(GND), - .DIR_0(GND), - .DIR_1(GND), - .FIFO_EN_0(GND), - .FIFO_EN_1(GND), - .P1_0(GND), - .P1_1(GND), - .P2_0(GND), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(GND), - .SYNC_FIFO_1(GND), - .WD_1({1'b0,in_reg0[31:24],1'b0,in_reg0[23:16]}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1(WS_GND), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1(WS_GND), - .WEN1_0(wen_reg0[1:0]), - .WEN1_1(wen_reg0[3:2]), - .Almost_Empty_0(), - .Almost_Empty_1(), - .Almost_Full_0(), - .Almost_Full_1(), - .POP_FLAG_0(), - .POP_FLAG_1(), - .PUSH_FLAG_0(), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1({out_par0[3],out_reg0[31:24],out_par0[2],out_reg0[23:16]}), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - end - -endgenerate + if (data_width_int == 32) begin + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end else if (data_width_int > 8 && data_width_int < 32) begin + assign in_reg0[31:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end else if (data_width_int <= 8) begin + assign in_reg0[31:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = WD[data_width_int-1:0]; + end -assign RD[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + if (data_width_int <= 8) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (data_width_int > 8 && data_width_int <= 16) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (data_width_int > 16) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end + + if (data_width_int <= 16) begin + + ram8k_2x1_cell_macro #( + `include "pp3_bram_init_8_16.vh" + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) U1 ( + .A1_0(addr_wr0), + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(WClk), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk0_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(WClk_En), + .CLK2_0(RClk), + .CLK2_1(RClk), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk0_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(RClk_En), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(GND), + .CS2_0(RD0_SEL), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1(wen_reg0[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end else if (data_width_int > 16) begin + + ram8k_2x1_cell_macro #( + `include "pp3_bram_init_32.vh" + .INIT_FILE(INIT_FILE), + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) U2 ( + .A1_0(addr_wr0), + .A1_1(addr_wr1), + .A2_0(addr_rd0), + .A2_1(addr_rd1), + .ASYNC_FLUSH_0(GND), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(GND), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(WClk), + .CLK1_1(WClk), + .CLK1S_0(WClk0_Sel), + .CLK1S_1(WClk0_Sel), + .CLK1EN_0(WClk_En), + .CLK1EN_1(WClk_En), + .CLK2_0(RClk), + .CLK2_1(RClk), + .CLK2S_0(RClk0_Sel), + .CLK2S_1(RClk0_Sel), + .CLK2EN_0(RClk_En), + .CLK2EN_1(RClk_En), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(WD0_SEL), + .CS1_1(GND), + .CS2_0(RD0_SEL), + .CS2_1(GND), + .DIR_0(GND), + .DIR_1(GND), + .FIFO_EN_0(GND), + .FIFO_EN_1(GND), + .P1_0(GND), + .P1_1(GND), + .P2_0(GND), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(GND), + .SYNC_FIFO_1(GND), + .WD_1({1'b0, in_reg0[31:24], 1'b0, in_reg0[23:16]}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1(WS_GND), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1(WS_GND), + .WEN1_0(wen_reg0[1:0]), + .WEN1_1(wen_reg0[3:2]), + .Almost_Empty_0(), + .Almost_Empty_1(), + .Almost_Full_0(), + .Almost_Full_1(), + .POP_FLAG_0(), + .POP_FLAG_1(), + .PUSH_FLAG_0(), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1({out_par0[3], out_reg0[31:24], out_par0[2], out_reg0[23:16]}), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end + + endgenerate + + assign RD[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; endmodule -module FIFO_8K_BLK(DIN,Fifo_Push_Flush,Fifo_Pop_Flush,PUSH,POP,Push_Clk,Pop_Clk,Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush,Almost_Full,Almost_Empty,PUSH_FLAG,POP_FLAG,DOUT); - -parameter data_depth_int = 512, - data_width_int = 36, - reg_rd_int = 0, - sync_fifo_int = 0; - -input Fifo_Push_Flush,Fifo_Pop_Flush; -input Push_Clk,Pop_Clk; -input PUSH,POP; -input [data_width_int-1:0] DIN; -input Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush; -output [data_width_int-1:0] DOUT; -output [3:0] PUSH_FLAG,POP_FLAG; -output Almost_Full,Almost_Empty; - -wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; -wire VCC,GND; - -wire [10:0] addr_wr,addr_rd; -wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; -wire reg_rd0,sync_fifo0; -wire [15:0] in_reg0; -wire [15:0] out_reg0; -wire [1:0] WS1_0; -wire [1:0] WS2_0; -wire Push_Clk0_Sel,Pop_Clk0_Sel; -wire Async_Flush_Sel0; - -wire [1:0] out_par0; - -assign LS = 1'b0; -assign DS = 1'b0; -assign SD = 1'b0; -assign LS_RB1 = 1'b0; -assign DS_RB1 = 1'b0; -assign SD_RB1 = 1'b0; - -assign VCC = 1'b1; -assign GND = 1'b0; - -assign Push_Clk0_Sel = 1'b0; -assign Pop_Clk0_Sel = 1'b0; -assign Async_Flush_Sel0 = 1'b0; - -assign reg_rd0 = reg_rd_int; -assign sync_fifo0 = sync_fifo_int; - -assign addr_wr=11'b00000000000; -assign addr_rd=11'b00000000000; - -assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; -assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; -assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; -assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; -assign clk1_sig_sel0 = Push_Clk0_Sel; -assign clk2_sig_sel0 = Pop_Clk0_Sel ; -assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; -assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; -assign p1_sig0 = Fifo_Dir ? POP : PUSH; -assign p2_sig0 = Fifo_Dir ? PUSH : POP ; - -generate - - if (data_width_int == 16) - begin - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - else if (data_width_int > 8 && data_width_int < 16) - begin - assign in_reg0[15:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - else if (data_width_int <= 8) - begin - assign in_reg0[15:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end +module FIFO_8K_BLK ( + DIN, + Fifo_Push_Flush, + Fifo_Pop_Flush, + PUSH, + POP, + Push_Clk, + Pop_Clk, + Push_Clk_En, + Pop_Clk_En, + Fifo_Dir, + Async_Flush, + Almost_Full, + Almost_Empty, + PUSH_FLAG, + POP_FLAG, + DOUT +); + + parameter data_depth_int = 512, data_width_int = 36, reg_rd_int = 0, sync_fifo_int = 0; + + input Fifo_Push_Flush, Fifo_Pop_Flush; + input Push_Clk, Pop_Clk; + input PUSH, POP; + input [data_width_int-1:0] DIN; + input Push_Clk_En, Pop_Clk_En, Fifo_Dir, Async_Flush; + output [data_width_int-1:0] DOUT; + output [3:0] PUSH_FLAG, POP_FLAG; + output Almost_Full, Almost_Empty; + + wire LS, DS, SD, LS_RB1, DS_RB1, SD_RB1; + wire VCC, GND; + + wire [10:0] addr_wr, addr_rd; + wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; + wire reg_rd0, sync_fifo0; + wire [15:0] in_reg0; + wire [15:0] out_reg0; + wire [ 1:0] WS1_0; + wire [ 1:0] WS2_0; + wire Push_Clk0_Sel, Pop_Clk0_Sel; + wire Async_Flush_Sel0; + + wire [1:0] out_par0; + + assign LS = 1'b0; + assign DS = 1'b0; + assign SD = 1'b0; + assign LS_RB1 = 1'b0; + assign DS_RB1 = 1'b0; + assign SD_RB1 = 1'b0; + + assign VCC = 1'b1; + assign GND = 1'b0; + + assign Push_Clk0_Sel = 1'b0; + assign Pop_Clk0_Sel = 1'b0; + assign Async_Flush_Sel0 = 1'b0; + + assign reg_rd0 = reg_rd_int; + assign sync_fifo0 = sync_fifo_int; + + assign addr_wr=11'b00000000000; + assign addr_rd=11'b00000000000; + + assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; + assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; + assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; + assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; + assign clk1_sig_sel0 = Push_Clk0_Sel; + assign clk2_sig_sel0 = Pop_Clk0_Sel ; + assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; + assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; + assign p1_sig0 = Fifo_Dir ? POP : PUSH; + assign p2_sig0 = Fifo_Dir ? PUSH : POP ; + + generate + + if (data_width_int == 16) begin + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end else if (data_width_int > 8 && data_width_int < 16) begin + assign in_reg0[15:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end else if (data_width_int <= 8) begin + assign in_reg0[15:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end - if(data_width_int <=8) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; - end - else if(data_width_int >8 && data_width_int <=16) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(data_width_int > 16) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end + if (data_width_int <= 8) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (data_width_int > 8 && data_width_int <= 16) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (data_width_int > 16) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end -endgenerate - - ram8k_2x1_cell_macro # ( - .data_width_int(data_width_int), - .data_depth_int(data_depth_int) - ) - U1 (.A1_0(addr_wr) , - .A1_1(addr_wr), - .A2_0(addr_rd), - .A2_1(addr_rd), - .ASYNC_FLUSH_0(Async_Flush), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(Async_Flush_Sel0), - .ASYNC_FLUSH_S1(GND), - .CLK1_0(clk1_sig0), - .CLK1_1(GND), - .CLK1EN_0(clk1_sig_en0), - .CLK1EN_1(GND), - .CLK2_0(clk2_sig0), - .CLK2_1(GND), - .CLK1S_0(clk1_sig_sel0), - .CLK1S_1(GND), - .CLK2S_0(clk2_sig_sel0), - .CLK2S_1(GND), - .CLK2EN_0(clk2_sig_en0), - .CLK2EN_1(GND), - .CONCAT_EN_0(GND), - .CONCAT_EN_1(GND), - .CS1_0(fifo_clk1_flush_sig0), - .CS1_1(GND), - .CS2_0(fifo_clk2_flush_sig0), - .CS2_1(GND), - .DIR_0(Fifo_Dir), - .DIR_1(GND), - .FIFO_EN_0(VCC), - .FIFO_EN_1(GND), - .P1_0(p1_sig0), - .P1_1(GND), - .P2_0(p2_sig0), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(sync_fifo0), - .SYNC_FIFO_1(GND), - .WD_1({18{GND}}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1({GND,GND}), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1({GND,GND}), - .WEN1_0({GND,GND}), - .WEN1_1({GND,GND}), - .Almost_Empty_0(Almost_Empty), - .Almost_Empty_1(), - .Almost_Full_0(Almost_Full), - .Almost_Full_1(), - .POP_FLAG_0(POP_FLAG), - .POP_FLAG_1(), - .PUSH_FLAG_0(PUSH_FLAG), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1(), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - - assign DOUT[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + endgenerate + + ram8k_2x1_cell_macro #( + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) U1 ( + .A1_0(addr_wr), + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(GND), + .CLK1_0(clk1_sig0), + .CLK1_1(GND), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(GND), + .CLK2_0(clk2_sig0), + .CLK2_1(GND), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(GND), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(GND), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(GND), + .CONCAT_EN_0(GND), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND, GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND, GND}), + .WEN1_0({GND, GND}), + .WEN1_1({GND, GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + + assign DOUT[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; endmodule -module FIFO_16K_BLK(DIN,Fifo_Push_Flush,Fifo_Pop_Flush,PUSH,POP,Push_Clk,Pop_Clk,Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush,Almost_Full,Almost_Empty,PUSH_FLAG,POP_FLAG,DOUT); - -parameter data_depth_int = 512, - data_width_int = 36, - reg_rd_int = 0, - sync_fifo_int = 0; - -input Fifo_Push_Flush,Fifo_Pop_Flush; -input Push_Clk,Pop_Clk; -input PUSH,POP; -input [data_width_int-1:0] DIN; -input Push_Clk_En,Pop_Clk_En,Fifo_Dir,Async_Flush; -output [data_width_int-1:0] DOUT; -output [3:0] PUSH_FLAG,POP_FLAG; -output Almost_Full,Almost_Empty; - -wire LS,DS,SD,LS_RB1,DS_RB1,SD_RB1; -wire VCC,GND; - -wire [10:0] addr_wr,addr_rd; -wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; -wire reg_rd0,sync_fifo0; -wire [31:0] in_reg0; -wire [31:0] out_reg0; -wire [1:0] WS1_0; -wire [1:0] WS2_0; -wire Push_Clk0_Sel,Pop_Clk0_Sel; -wire Async_Flush_Sel0; - -wire [3:0] out_par0; -wire [1:0] out_par1; - -assign LS = 1'b0; -assign DS = 1'b0; -assign SD = 1'b0; -assign LS_RB1 = 1'b0; -assign DS_RB1 = 1'b0; -assign SD_RB1 = 1'b0; - -assign VCC = 1'b1; -assign GND = 1'b0; - -assign Push_Clk0_Sel = 1'b0; -assign Pop_Clk0_Sel = 1'b0; -assign Async_Flush_Sel0 = 1'b0; - -assign reg_rd0 = reg_rd_int; -assign sync_fifo0 = sync_fifo_int; - -assign addr_wr=11'b00000000000; -assign addr_rd=11'b00000000000; - -assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; -assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; -assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; -assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; -assign clk1_sig_sel0 = Push_Clk0_Sel; -assign clk2_sig_sel0 = Pop_Clk0_Sel ; -assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; -assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; -assign p1_sig0 = Fifo_Dir ? POP : PUSH; -assign p2_sig0 = Fifo_Dir ? PUSH : POP ; - -generate - if (data_width_int == 32) - begin - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - else if (data_width_int > 8 && data_width_int < 32) - begin - assign in_reg0[31:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end - else if (data_width_int <= 8) - begin - assign in_reg0[31:data_width_int] =0; - assign in_reg0[data_width_int-1:0] =DIN[data_width_int-1:0]; - end +module FIFO_16K_BLK ( + DIN, + Fifo_Push_Flush, + Fifo_Pop_Flush, + PUSH, + POP, + Push_Clk, + Pop_Clk, + Push_Clk_En, + Pop_Clk_En, + Fifo_Dir, + Async_Flush, + Almost_Full, + Almost_Empty, + PUSH_FLAG, + POP_FLAG, + DOUT +); + + parameter data_depth_int = 512, data_width_int = 36, reg_rd_int = 0, sync_fifo_int = 0; + + input Fifo_Push_Flush, Fifo_Pop_Flush; + input Push_Clk, Pop_Clk; + input PUSH, POP; + input [data_width_int-1:0] DIN; + input Push_Clk_En, Pop_Clk_En, Fifo_Dir, Async_Flush; + output [data_width_int-1:0] DOUT; + output [3:0] PUSH_FLAG, POP_FLAG; + output Almost_Full, Almost_Empty; + + wire LS, DS, SD, LS_RB1, DS_RB1, SD_RB1; + wire VCC, GND; + + wire [10:0] addr_wr, addr_rd; + wire clk1_sig0, clk2_sig0, clk1_sig_en0, clk2_sig_en0, fifo_clk1_flush_sig0, fifo_clk2_flush_sig0, p1_sig0, p2_sig0,clk1_sig_sel0,clk2_sig_sel0; + wire reg_rd0, sync_fifo0; + wire [31:0] in_reg0; + wire [31:0] out_reg0; + wire [ 1:0] WS1_0; + wire [ 1:0] WS2_0; + wire Push_Clk0_Sel, Pop_Clk0_Sel; + wire Async_Flush_Sel0; + + wire [3:0] out_par0; + wire [1:0] out_par1; + + assign LS = 1'b0; + assign DS = 1'b0; + assign SD = 1'b0; + assign LS_RB1 = 1'b0; + assign DS_RB1 = 1'b0; + assign SD_RB1 = 1'b0; + + assign VCC = 1'b1; + assign GND = 1'b0; + + assign Push_Clk0_Sel = 1'b0; + assign Pop_Clk0_Sel = 1'b0; + assign Async_Flush_Sel0 = 1'b0; + + assign reg_rd0 = reg_rd_int; + assign sync_fifo0 = sync_fifo_int; + + assign addr_wr=11'b00000000000; + assign addr_rd=11'b00000000000; + + assign clk1_sig0 = Fifo_Dir ? Pop_Clk : Push_Clk; + assign clk2_sig0 = Fifo_Dir ? Push_Clk : Pop_Clk ; + assign clk1_sig_en0 = Fifo_Dir ? Pop_Clk_En : Push_Clk_En; + assign clk2_sig_en0 = Fifo_Dir ? Push_Clk_En : Pop_Clk_En ; + assign clk1_sig_sel0 = Push_Clk0_Sel; + assign clk2_sig_sel0 = Pop_Clk0_Sel ; + assign fifo_clk1_flush_sig0 = Fifo_Dir ? Fifo_Pop_Flush : Fifo_Push_Flush; + assign fifo_clk2_flush_sig0 = Fifo_Dir ? Fifo_Push_Flush : Fifo_Pop_Flush ; + assign p1_sig0 = Fifo_Dir ? POP : PUSH; + assign p2_sig0 = Fifo_Dir ? PUSH : POP ; + + generate + if (data_width_int == 32) begin + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end else if (data_width_int > 8 && data_width_int < 32) begin + assign in_reg0[31:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end else if (data_width_int <= 8) begin + assign in_reg0[31:data_width_int] = 0; + assign in_reg0[data_width_int-1:0] = DIN[data_width_int-1:0]; + end - if(data_width_int <=8) - begin - assign WS1_0 = 2'b00; - assign WS2_0 = 2'b00; - end - else if(data_width_int >8 && data_width_int <=16) - begin - assign WS1_0 = 2'b01; - assign WS2_0 = 2'b01; - end - else if(data_width_int > 16) - begin - assign WS1_0 = 2'b10; - assign WS2_0 = 2'b10; - end + if (data_width_int <= 8) begin + assign WS1_0 = 2'b00; + assign WS2_0 = 2'b00; + end else if (data_width_int > 8 && data_width_int <= 16) begin + assign WS1_0 = 2'b01; + assign WS2_0 = 2'b01; + end else if (data_width_int > 16) begin + assign WS1_0 = 2'b10; + assign WS2_0 = 2'b10; + end - if (data_width_int <=16) begin - - ram8k_2x1_cell_macro #( - .data_width_int(data_width_int), - .data_depth_int(data_depth_int) - ) - U1 (.A1_0(addr_wr) , - .A1_1(addr_wr), - .A2_0(addr_rd), - .A2_1(addr_rd), - .ASYNC_FLUSH_0(Async_Flush), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(Async_Flush_Sel0), - .ASYNC_FLUSH_S1(Async_Flush_Sel0), - .CLK1_0(clk1_sig0), - .CLK1_1(clk1_sig0), - .CLK1EN_0(clk1_sig_en0), - .CLK1EN_1(clk1_sig_en0), - .CLK2_0(clk2_sig0), - .CLK2_1(clk2_sig0), - .CLK1S_0(clk1_sig_sel0), - .CLK1S_1(clk1_sig_sel0), - .CLK2S_0(clk2_sig_sel0), - .CLK2S_1(clk2_sig_sel0), - .CLK2EN_0(clk2_sig_en0), - .CLK2EN_1(clk2_sig_en0), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(fifo_clk1_flush_sig0), - .CS1_1(GND), - .CS2_0(fifo_clk2_flush_sig0), - .CS2_1(GND), - .DIR_0(Fifo_Dir), - .DIR_1(GND), - .FIFO_EN_0(VCC), - .FIFO_EN_1(GND), - .P1_0(p1_sig0), - .P1_1(GND), - .P2_0(p2_sig0), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(sync_fifo0), - .SYNC_FIFO_1(GND), - .WD_1({18{GND}}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1({GND,GND}), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1({GND,GND}), - .WEN1_0({GND,GND}), - .WEN1_1({GND,GND}), - .Almost_Empty_0(Almost_Empty), - .Almost_Empty_1(), - .Almost_Full_0(Almost_Full), - .Almost_Full_1(), - .POP_FLAG_0(POP_FLAG), - .POP_FLAG_1(), - .PUSH_FLAG_0(PUSH_FLAG), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1(), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); + if (data_width_int <= 16) begin + + ram8k_2x1_cell_macro #( + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) U1 ( + .A1_0(addr_wr), + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(Async_Flush_Sel0), + .CLK1_0(clk1_sig0), + .CLK1_1(clk1_sig0), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(clk1_sig_en0), + .CLK2_0(clk2_sig0), + .CLK2_1(clk2_sig0), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(clk1_sig_sel0), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(clk2_sig_sel0), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(clk2_sig_en0), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({18{GND}}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND, GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND, GND}), + .WEN1_0({GND, GND}), + .WEN1_1({GND, GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1(), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); - end - else if (data_width_int > 16) begin - - ram8k_2x1_cell_macro #( - .data_width_int(data_width_int), - .data_depth_int(data_depth_int) - ) - U2 ( - .A1_0(addr_wr) , - .A1_1(addr_wr), - .A2_0(addr_rd), - .A2_1(addr_rd), - .ASYNC_FLUSH_0(Async_Flush), - .ASYNC_FLUSH_1(GND), - .ASYNC_FLUSH_S0(Async_Flush_Sel0), - .ASYNC_FLUSH_S1(Async_Flush_Sel0), - .CLK1_0(clk1_sig0), - .CLK1_1(clk1_sig0), - .CLK1EN_0(clk1_sig_en0), - .CLK1EN_1(clk1_sig_en0), - .CLK2_0(clk2_sig0), - .CLK2_1(clk2_sig0), - .CLK1S_0(clk1_sig_sel0), - .CLK1S_1(clk1_sig_sel0), - .CLK2S_0(clk2_sig_sel0), - .CLK2S_1(clk2_sig_sel0), - .CLK2EN_0(clk2_sig_en0), - .CLK2EN_1(clk2_sig_en0), - .CONCAT_EN_0(VCC), - .CONCAT_EN_1(GND), - .CS1_0(fifo_clk1_flush_sig0), - .CS1_1(GND), - .CS2_0(fifo_clk2_flush_sig0), - .CS2_1(GND), - .DIR_0(Fifo_Dir), - .DIR_1(GND), - .FIFO_EN_0(VCC), - .FIFO_EN_1(GND), - .P1_0(p1_sig0), - .P1_1(GND), - .P2_0(p2_sig0), - .P2_1(GND), - .PIPELINE_RD_0(reg_rd0), - .PIPELINE_RD_1(GND), - .SYNC_FIFO_0(sync_fifo0), - .SYNC_FIFO_1(GND), - .WD_1({1'b0,in_reg0[31:24],1'b0,in_reg0[23:16]}), - .WD_0({1'b0,in_reg0[15:8],1'b0,in_reg0[7:0]}), - .WIDTH_SELECT1_0(WS1_0), - .WIDTH_SELECT1_1({GND,GND}), - .WIDTH_SELECT2_0(WS2_0), - .WIDTH_SELECT2_1({GND,GND}), - .WEN1_0({GND,GND}), - .WEN1_1({GND,GND}), - .Almost_Empty_0(Almost_Empty), - .Almost_Empty_1(), - .Almost_Full_0(Almost_Full), - .Almost_Full_1(), - .POP_FLAG_0(POP_FLAG), - .POP_FLAG_1(), - .PUSH_FLAG_0(PUSH_FLAG), - .PUSH_FLAG_1(), - .RD_0({out_par0[1],out_reg0[15:8],out_par0[0],out_reg0[7:0]}), - .RD_1({out_par0[3],out_reg0[31:24],out_par0[2],out_reg0[23:16]}), - .SD(SD), - .SD_RB1(SD_RB1), - .LS(LS), - .LS_RB1(LS_RB1), - .DS(DS), - .DS_RB1(DS_RB1), - .TEST1A(GND), - .TEST1B(GND), - .RMA(4'd0), - .RMB(4'd0), - .RMEA(GND), - .RMEB(GND) - ); - end - -endgenerate - - assign DOUT[data_width_int-1 :0]= out_reg0[data_width_int-1 :0]; + end else if (data_width_int > 16) begin + + ram8k_2x1_cell_macro #( + .data_width_int(data_width_int), + .data_depth_int(data_depth_int) + ) U2 ( + .A1_0(addr_wr), + .A1_1(addr_wr), + .A2_0(addr_rd), + .A2_1(addr_rd), + .ASYNC_FLUSH_0(Async_Flush), + .ASYNC_FLUSH_1(GND), + .ASYNC_FLUSH_S0(Async_Flush_Sel0), + .ASYNC_FLUSH_S1(Async_Flush_Sel0), + .CLK1_0(clk1_sig0), + .CLK1_1(clk1_sig0), + .CLK1EN_0(clk1_sig_en0), + .CLK1EN_1(clk1_sig_en0), + .CLK2_0(clk2_sig0), + .CLK2_1(clk2_sig0), + .CLK1S_0(clk1_sig_sel0), + .CLK1S_1(clk1_sig_sel0), + .CLK2S_0(clk2_sig_sel0), + .CLK2S_1(clk2_sig_sel0), + .CLK2EN_0(clk2_sig_en0), + .CLK2EN_1(clk2_sig_en0), + .CONCAT_EN_0(VCC), + .CONCAT_EN_1(GND), + .CS1_0(fifo_clk1_flush_sig0), + .CS1_1(GND), + .CS2_0(fifo_clk2_flush_sig0), + .CS2_1(GND), + .DIR_0(Fifo_Dir), + .DIR_1(GND), + .FIFO_EN_0(VCC), + .FIFO_EN_1(GND), + .P1_0(p1_sig0), + .P1_1(GND), + .P2_0(p2_sig0), + .P2_1(GND), + .PIPELINE_RD_0(reg_rd0), + .PIPELINE_RD_1(GND), + .SYNC_FIFO_0(sync_fifo0), + .SYNC_FIFO_1(GND), + .WD_1({1'b0, in_reg0[31:24], 1'b0, in_reg0[23:16]}), + .WD_0({1'b0, in_reg0[15:8], 1'b0, in_reg0[7:0]}), + .WIDTH_SELECT1_0(WS1_0), + .WIDTH_SELECT1_1({GND, GND}), + .WIDTH_SELECT2_0(WS2_0), + .WIDTH_SELECT2_1({GND, GND}), + .WEN1_0({GND, GND}), + .WEN1_1({GND, GND}), + .Almost_Empty_0(Almost_Empty), + .Almost_Empty_1(), + .Almost_Full_0(Almost_Full), + .Almost_Full_1(), + .POP_FLAG_0(POP_FLAG), + .POP_FLAG_1(), + .PUSH_FLAG_0(PUSH_FLAG), + .PUSH_FLAG_1(), + .RD_0({out_par0[1], out_reg0[15:8], out_par0[0], out_reg0[7:0]}), + .RD_1({out_par0[3], out_reg0[31:24], out_par0[2], out_reg0[23:16]}), + .SD(SD), + .SD_RB1(SD_RB1), + .LS(LS), + .LS_RB1(LS_RB1), + .DS(DS), + .DS_RB1(DS_RB1), + .TEST1A(GND), + .TEST1B(GND), + .RMA(4'd0), + .RMB(4'd0), + .RMEA(GND), + .RMEB(GND) + ); + end + + endgenerate + + assign DOUT[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; endmodule diff --git a/ql-qlf-plugin/pp3/pp3_cells_map.v b/ql-qlf-plugin/pp3/pp3_cells_map.v index c627fe7f9..f2a6a8c91 100644 --- a/ql-qlf-plugin/pp3/pp3_cells_map.v +++ b/ql-qlf-plugin/pp3/pp3_cells_map.v @@ -7,38 +7,56 @@ // SPDX-License-Identifier:ISC module \$_MUX8_ ( - A, B, C, D, E, F, G, H, S, T, U, Y + A, + B, + C, + D, + E, + F, + G, + H, + S, + T, + U, + Y ); input A, B, C, D, E, F, G, H, S, T, U; output Y; mux8x0 _TECHMAP_REPLACE_ ( - .A(A), - .B(B), - .C(C), - .D(D), - .E(E), - .F(F), - .G(G), - .H(H), - .S0(S), - .S1(T), - .S2(U), - .Q(Y) + .A (A), + .B (B), + .C (C), + .D (D), + .E (E), + .F (F), + .G (G), + .H (H), + .S0(S), + .S1(T), + .S2(U), + .Q (Y) ); endmodule module \$_MUX4_ ( - A, B, C, D, S, T, U, Y + A, + B, + C, + D, + S, + T, + U, + Y ); input A, B, C, D, S, T, U; output Y; mux4x0 _TECHMAP_REPLACE_ ( - .A(A), - .B(B), - .C(C), - .D(D), - .S0(S), - .S1(T), - .Q(Y) + .A (A), + .B (B), + .C (C), + .D (D), + .S0(S), + .S1(T), + .Q (Y) ); endmodule diff --git a/ql-qlf-plugin/pp3/pp3_cells_sim.v b/ql-qlf-plugin/pp3/pp3_cells_sim.v index 646b50b11..4155744ae 100644 --- a/ql-qlf-plugin/pp3/pp3_cells_sim.v +++ b/ql-qlf-plugin/pp3/pp3_cells_sim.v @@ -7,34 +7,34 @@ // SPDX-License-Identifier:ISC module inv ( - output Q, - input A + output Q, + input A ); assign Q = A ? 0 : 1; endmodule module buff ( - output Q, - input A + output Q, + input A ); assign Q = A; endmodule module logic_0 ( - output A + output A ); assign A = 0; endmodule module logic_1 ( - output A + output A ); assign A = 1; endmodule module gclkbuff ( - input A, - output Z + input A, + output Z ); specify (A => Z) = 0; @@ -44,9 +44,9 @@ module gclkbuff ( endmodule module inpad ( - output Q, - (* iopad_external_pin *) - input P + output Q, + (* iopad_external_pin *) + input P ); specify (P => Q) = 0; @@ -55,9 +55,9 @@ module inpad ( endmodule module outpad ( - (* iopad_external_pin *) - output P, - input A + (* iopad_external_pin *) + output P, + input A ); specify (A => P) = 0; @@ -66,9 +66,9 @@ module outpad ( endmodule module ckpad ( - output Q, - (* iopad_external_pin *) - input P + output Q, + (* iopad_external_pin *) + input P ); specify (P => Q) = 0; @@ -77,21 +77,21 @@ module ckpad ( endmodule module bipad ( - input A, - input EN, - output Q, - (* iopad_external_pin *) - inout P + input A, + input EN, + output Q, + (* iopad_external_pin *) + inout P ); assign Q = P; assign P = EN ? A : 1'bz; endmodule module dff ( - output reg Q, - input D, - (* clkbuf_sink *) - input CLK + output reg Q, + input D, + (* clkbuf_sink *) + input CLK ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -99,12 +99,12 @@ module dff ( endmodule module dffc ( - output reg Q, - input D, - (* clkbuf_sink *) - input CLK, - (* clkbuf_sink *) - input CLR + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + (* clkbuf_sink *) + input CLR ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -115,12 +115,12 @@ module dffc ( endmodule module dffp ( - output reg Q, - input D, - (* clkbuf_sink *) - input CLK, - (* clkbuf_sink *) - input PRE + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + (* clkbuf_sink *) + input PRE ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -131,14 +131,14 @@ module dffp ( endmodule module dffpc ( - output reg Q, - input D, - (* clkbuf_sink *) - input CLK, - (* clkbuf_sink *) - input CLR, - (* clkbuf_sink *) - input PRE + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + (* clkbuf_sink *) + input CLR, + (* clkbuf_sink *) + input PRE ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -150,11 +150,11 @@ module dffpc ( endmodule module dffe ( - output reg Q, - input D, - (* clkbuf_sink *) - input CLK, - input EN + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + input EN ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -162,13 +162,13 @@ module dffe ( endmodule module dffec ( - output reg Q, - input D, - (* clkbuf_sink *) - input CLK, - input EN, - (* clkbuf_sink *) - input CLR + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + input EN, + (* clkbuf_sink *) + input CLR ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -180,24 +180,24 @@ endmodule (* lib_whitebox *) module dffepc ( - output reg Q, - input D, - (* clkbuf_sink *) - input CLK, - input EN, - (* clkbuf_sink *) - input CLR, - (* clkbuf_sink *) - input PRE + output reg Q, + input D, + (* clkbuf_sink *) + input CLK, + input EN, + (* clkbuf_sink *) + input CLR, + (* clkbuf_sink *) + input PRE ); parameter [0:0] INIT = 1'b0; specify - if (EN) (posedge CLK => (Q : D)) = 1701; // QCK -> QZ - if (CLR) (CLR => Q) = 967; // QRT -> QZ - if (PRE) (PRE => Q) = 1252; // QST -> QZ - $setup(D, posedge CLK, 216); // QCK -> QDS - $setup(EN, posedge CLK, 590); // QCK -> QEN + if (EN) (posedge CLK => (Q : D)) = 1701; // QCK -> QZ + if (CLR) (CLR => Q) = 967; // QRT -> QZ + if (PRE) (PRE => Q) = 1252; // QST -> QZ + $setup(D, posedge CLK, 216); // QCK -> QDS + $setup(EN, posedge CLK, 590); // QCK -> QEN endspecify initial Q = INIT; @@ -210,12 +210,13 @@ endmodule // FZ FS F2 (F1 TO 0) (* abc9_box, lib_whitebox *) module AND2I0 ( - output Q, - input A, B + output Q, + input A, + B ); specify - (A => Q) = 698; // FS -> FZ - (B => Q) = 639; // F2 -> FZ + (A => Q) = 698; // FS -> FZ + (B => Q) = 639; // F2 -> FZ endspecify assign Q = A ? B : 0; @@ -223,13 +224,15 @@ endmodule (* abc9_box, lib_whitebox *) module mux2x0 ( - output Q, - input S, A, B + output Q, + input S, + A, + B ); specify - (S => Q) = 698; // FS -> FZ - (A => Q) = 639; // F1 -> FZ - (B => Q) = 639; // F2 -> FZ + (S => Q) = 698; // FS -> FZ + (A => Q) = 639; // F1 -> FZ + (B => Q) = 639; // F2 -> FZ endspecify assign Q = S ? B : A; @@ -237,13 +240,15 @@ endmodule (* abc9_box, lib_whitebox *) module mux2x1 ( - output Q, - input S, A, B + output Q, + input S, + A, + B ); specify - (S => Q) = 698; // FS -> FZ - (A => Q) = 639; // F1 -> FZ - (B => Q) = 639; // F2 -> FZ + (S => Q) = 698; // FS -> FZ + (A => Q) = 639; // F1 -> FZ + (B => Q) = 639; // F2 -> FZ endspecify assign Q = S ? B : A; @@ -251,12 +256,17 @@ endmodule (* abc9_box, lib_whitebox *) module mux4x0 ( - output Q, - input S0, S1, A, B, C, D + output Q, + input S0, + S1, + A, + B, + C, + D ); specify - (S0 => Q) = 1251; // TAB -> TZ - (S1 => Q) = 1406; // TSL -> TZ + (S0 => Q) = 1251; // TAB -> TZ + (S1 => Q) = 1406; // TSL -> TZ (A => Q) = 1699; // TA1 -> TZ (B => Q) = 1687; // TA2 -> TZ (C => Q) = 1669; // TB1 -> TZ @@ -280,21 +290,31 @@ endmodule // Q CZ (* abc9_box, lib_whitebox *) module mux8x0 ( - output Q, - input S0, S1, S2, A, B, C, D, E, F, G, H + output Q, + input S0, + S1, + S2, + A, + B, + C, + D, + E, + F, + G, + H ); specify - (S0 => Q) = 1593; // ('TSL', 'BSL') -> CZ - (S1 => Q) = 1437; // ('TAB', 'BAB') -> CZ - (S2 => Q) = 995; // TBS -> CZ - (A => Q) = 1887; // TA1 -> CZ - (B => Q) = 1873; // TA2 -> CZ - (C => Q) = 1856; // TB1 -> CZ - (D => Q) = 1860; // TB2 -> CZ - (E => Q) = 1714; // BA1 -> CZ - (F => Q) = 1773; // BA2 -> CZ - (G => Q) = 1749; // BB1 -> CZ - (H => Q) = 1723; // BB2 -> CZ + (S0 => Q) = 1593; // ('TSL', 'BSL') -> CZ + (S1 => Q) = 1437; // ('TAB', 'BAB') -> CZ + (S2 => Q) = 995; // TBS -> CZ + (A => Q) = 1887; // TA1 -> CZ + (B => Q) = 1873; // TA2 -> CZ + (C => Q) = 1856; // TB1 -> CZ + (D => Q) = 1860; // TB2 -> CZ + (E => Q) = 1714; // BA1 -> CZ + (F => Q) = 1773; // BA2 -> CZ + (G => Q) = 1749; // BB1 -> CZ + (H => Q) = 1723; // BB2 -> CZ endspecify assign Q = S2 ? (S1 ? (S0 ? H : G) : (S0 ? F : E)) : (S1 ? (S0 ? D : C) : (S0 ? B : A)); @@ -302,15 +322,15 @@ endmodule (* abc9_lut=1, lib_whitebox *) module LUT1 ( - output O, - input I0 + output O, + input I0 ); parameter [1:0] INIT = 0; parameter EQN = "(I0)"; // These timings are for PolarPro 3E; other families will need updating. specify - (I0 => O) = 698; // FS -> FZ + (I0 => O) = 698; // FS -> FZ endspecify assign O = I0 ? INIT[1] : INIT[0]; @@ -319,16 +339,17 @@ endmodule // TZ TSL TAB (* abc9_lut=2, lib_whitebox *) module LUT2 ( - output O, - input I0, I1 + output O, + input I0, + I1 ); parameter [3:0] INIT = 4'h0; parameter EQN = "(I0)"; // These timings are for PolarPro 3E; other families will need updating. specify - (I0 => O) = 1251; // TAB -> TZ - (I1 => O) = 1406; // TSL -> TZ + (I0 => O) = 1251; // TAB -> TZ + (I1 => O) = 1406; // TSL -> TZ endspecify wire [1:0] s1 = I1 ? INIT[3:2] : INIT[1:0]; @@ -337,17 +358,19 @@ endmodule (* abc9_lut=2, lib_whitebox *) module LUT3 ( - output O, - input I0, I1, I2 + output O, + input I0, + I1, + I2 ); parameter [7:0] INIT = 8'h0; parameter EQN = "(I0)"; // These timings are for PolarPro 3E; other families will need updating. specify - (I0 => O) = 1251; // TAB -> TZ - (I1 => O) = 1406; // TSL -> TZ - (I2 => O) = 1699; // ('TA1', 'TA2', 'TB1', 'TB2') -> TZ + (I0 => O) = 1251; // TAB -> TZ + (I1 => O) = 1406; // TSL -> TZ + (I2 => O) = 1699; // ('TA1', 'TA2', 'TB1', 'TB2') -> TZ endspecify wire [3:0] s2 = I2 ? INIT[7:4] : INIT[3:0]; @@ -357,8 +380,11 @@ endmodule (* abc9_lut=4, lib_whitebox *) module LUT4 ( - output O, - input I0, I1, I2, I3 + output O, + input I0, + I1, + I2, + I3 ); parameter [15:0] INIT = 16'h0; parameter EQN = "(I0)"; @@ -366,9 +392,9 @@ module LUT4 ( // These timings are for PolarPro 3E; other families will need updating. specify (I0 => O) = 995; // TBS -> CZ - (I1 => O) = 1437; // ('TAB', 'BAB') -> CZ - (I2 => O) = 1593; // ('TSL', 'BSL') -> CZ - (I3 => O) = 1887; // ('TA1', 'TA2', 'TB1', 'TB2', 'BA1', 'BA2', 'BB1', 'BB2') -> CZ + (I1 => O) = 1437; // ('TAB', 'BAB') -> CZ + (I2 => O) = 1593; // ('TSL', 'BSL') -> CZ + (I3 => O) = 1887; // ('TA1', 'TA2', 'TB1', 'TB2', 'BA1', 'BA2', 'BB1', 'BB2') -> CZ endspecify wire [7:0] s3 = I3 ? INIT[15:8] : INIT[7:0]; @@ -377,84 +403,78 @@ module LUT4 ( assign O = I0 ? s1[1] : s1[0]; endmodule -module logic_cell_macro( - input BA1, - input BA2, - input BAB, - input BAS1, - input BAS2, - input BB1, - input BB2, - input BBS1, - input BBS2, - input BSL, - input F1, - input F2, - input FS, - input QCK, - input QCKS, - input QDI, - input QDS, - input QEN, - input QRT, - input QST, - input TA1, - input TA2, - input TAB, - input TAS1, - input TAS2, - input TB1, - input TB2, - input TBS, - input TBS1, - input TBS2, - input TSL, +module logic_cell_macro ( + input BA1, + input BA2, + input BAB, + input BAS1, + input BAS2, + input BB1, + input BB2, + input BBS1, + input BBS2, + input BSL, + input F1, + input F2, + input FS, + input QCK, + input QCKS, + input QDI, + input QDS, + input QEN, + input QRT, + input QST, + input TA1, + input TA2, + input TAB, + input TAS1, + input TAS2, + input TB1, + input TB2, + input TBS, + input TBS1, + input TBS2, + input TSL, output CZ, output FZ, output QZ, output TZ ); - wire TAP1,TAP2,TBP1,TBP2,BAP1,BAP2,BBP1,BBP2,QCKP,TAI,TBI,BAI,BBI,TZI,BZI,CZI,QZI; - reg QZ_r; - - initial - begin - QZ_r=1'b0; - end - assign QZ = QZ_r; - assign TAP1 = TAS1 ? ~TA1 : TA1; - assign TAP2 = TAS2 ? ~TA2 : TA2; - assign TBP1 = TBS1 ? ~TB1 : TB1; - assign TBP2 = TBS2 ? ~TB2 : TB2; - assign BAP1 = BAS1 ? ~BA1 : BA1; - assign BAP2 = BAS2 ? ~BA2 : BA2; - assign BBP1 = BBS1 ? ~BB1 : BB1; - assign BBP2 = BBS2 ? ~BB2 : BB2; - - assign TAI = TSL ? TAP2 : TAP1; - assign TBI = TSL ? TBP2 : TBP1; - assign BAI = BSL ? BAP2 : BAP1; - assign BBI = BSL ? BBP2 : BBP1; - assign TZI = TAB ? TBI : TAI; - assign BZI = BAB ? BBI : BAI; - assign CZI = TBS ? BZI : TZI; - assign QZI = QDS ? QDI : CZI ; - assign FZ = FS ? F2 : F1; - assign TZ = TZI; - assign CZ = CZI; - assign QCKP = QCKS ? QCK : ~QCK; - - - always @(posedge QCKP) - if(~QRT && ~QST) - if(QEN) - QZ_r = QZI; - always @(QRT or QST) - if(QRT) - QZ_r = 1'b0; - else if (QST) - QZ_r = 1'b1; + wire TAP1, TAP2, TBP1, TBP2, BAP1, BAP2, BBP1, BBP2, QCKP, TAI, TBI, BAI, BBI, TZI, BZI, CZI, QZI; + reg QZ_r; + + initial begin + QZ_r = 1'b0; + end + assign QZ = QZ_r; + assign TAP1 = TAS1 ? ~TA1 : TA1; + assign TAP2 = TAS2 ? ~TA2 : TA2; + assign TBP1 = TBS1 ? ~TB1 : TB1; + assign TBP2 = TBS2 ? ~TB2 : TB2; + assign BAP1 = BAS1 ? ~BA1 : BA1; + assign BAP2 = BAS2 ? ~BA2 : BA2; + assign BBP1 = BBS1 ? ~BB1 : BB1; + assign BBP2 = BBS2 ? ~BB2 : BB2; + + assign TAI = TSL ? TAP2 : TAP1; + assign TBI = TSL ? TBP2 : TBP1; + assign BAI = BSL ? BAP2 : BAP1; + assign BBI = BSL ? BBP2 : BBP1; + assign TZI = TAB ? TBI : TAI; + assign BZI = BAB ? BBI : BAI; + assign CZI = TBS ? BZI : TZI; + assign QZI = QDS ? QDI : CZI; + assign FZ = FS ? F2 : F1; + assign TZ = TZI; + assign CZ = CZI; + assign QCKP = QCKS ? QCK : ~QCK; + + + always @(posedge QCKP) if (~QRT && ~QST) if (QEN) QZ_r = QZI; + always @(QRT or QST) + if (QRT) QZ_r = 1'b0; + else if (QST) QZ_r = 1'b1; endmodule diff --git a/ql-qlf-plugin/pp3/pp3_ffs_map.v b/ql-qlf-plugin/pp3/pp3_ffs_map.v index b11cc6f93..abd70731f 100644 --- a/ql-qlf-plugin/pp3/pp3_ffs_map.v +++ b/ql-qlf-plugin/pp3/pp3_ffs_map.v @@ -6,7 +6,23 @@ // // SPDX-License-Identifier:ISC -module \$_DFFSRE_PPPP_ (input C, S, R, E, D, output Q); +module \$_DFFSRE_PPPP_ ( + input C, + S, + R, + E, + D, + output Q +); wire _TECHMAP_REMOVEINIT_Q_ = 1; - dffepc #(.INIT(1'b0)) _TECHMAP_REPLACE_ (.CLK(C), .PRE(S), .CLR(R), .EN(E), .D(D), .Q(Q)); + dffepc #( + .INIT(1'b0) + ) _TECHMAP_REPLACE_ ( + .CLK(C), + .PRE(S), + .CLR(R), + .EN (E), + .D (D), + .Q (Q) + ); endmodule diff --git a/ql-qlf-plugin/pp3/pp3_lut_map.v b/ql-qlf-plugin/pp3/pp3_lut_map.v index 4ae91a9a8..50b39b221 100644 --- a/ql-qlf-plugin/pp3/pp3_lut_map.v +++ b/ql-qlf-plugin/pp3/pp3_lut_map.v @@ -7,7 +7,8 @@ // SPDX-License-Identifier:ISC module \$lut ( - A, Y + A, + Y ); parameter WIDTH = 0; parameter LUT = 0; @@ -18,41 +19,41 @@ module \$lut ( generate if (WIDTH == 1) begin LUT1 #( - .EQN(""), - .INIT(LUT) + .EQN (""), + .INIT(LUT) ) _TECHMAP_REPLACE_ ( - .O(Y), - .I0(A[0]) + .O (Y), + .I0(A[0]) ); end else if (WIDTH == 2) begin LUT2 #( - .EQN(""), - .INIT(LUT) + .EQN (""), + .INIT(LUT) ) _TECHMAP_REPLACE_ ( - .O(Y), - .I0(A[0]), - .I1(A[1]) + .O (Y), + .I0(A[0]), + .I1(A[1]) ); end else if (WIDTH == 3) begin LUT3 #( - .EQN(""), - .INIT(LUT) + .EQN (""), + .INIT(LUT) ) _TECHMAP_REPLACE_ ( - .O(Y), - .I0(A[0]), - .I1(A[1]), - .I2(A[2]) + .O (Y), + .I0(A[0]), + .I1(A[1]), + .I2(A[2]) ); end else if (WIDTH == 4) begin LUT4 #( - .EQN(""), - .INIT(LUT) + .EQN (""), + .INIT(LUT) ) _TECHMAP_REPLACE_ ( - .O(Y), - .I0(A[0]), - .I1(A[1]), - .I2(A[2]), - .I3(A[3]) + .O (Y), + .I0(A[0]), + .I1(A[1]), + .I2(A[2]), + .I3(A[3]) ); end else begin wire _TECHMAP_FAIL_ = 1; diff --git a/ql-qlf-plugin/pp3/pp3_mult_sim.v b/ql-qlf-plugin/pp3/pp3_mult_sim.v index 19daf81d2..4df8652cd 100644 --- a/ql-qlf-plugin/pp3/pp3_mult_sim.v +++ b/ql-qlf-plugin/pp3/pp3_mult_sim.v @@ -8,113 +8,123 @@ (* blackbox *) module qlal4s3_mult_32x32_cell ( - input [31:0] Amult, - input [31:0] Bmult, - input [1:0] Valid_mult, - output [63:0] Cmult); + input [31:0] Amult, + input [31:0] Bmult, + input [ 1:0] Valid_mult, + output [63:0] Cmult +); -endmodule /* qlal4s3_32x32_mult_cell */ +endmodule /* qlal4s3_32x32_mult_cell */ (* blackbox *) module qlal4s3_mult_16x16_cell ( - input [15:0] Amult, - input [15:0] Bmult, - input [1:0] Valid_mult, - output [31:0] Cmult); + input [15:0] Amult, + input [15:0] Bmult, + input [ 1:0] Valid_mult, + output [31:0] Cmult +); -endmodule /* qlal4s3_16x16_mult_cell */ +endmodule /* qlal4s3_16x16_mult_cell */ /* Verilog model of QLAL4S3 Multiplier */ /*qlal4s3_mult_cell*/ -module signed_mult( +module signed_mult ( A, B, Valid, C ); -parameter WIDTH = 32; -parameter CWIDTH = 2*WIDTH; - -input [WIDTH-1:0] A, B; -input Valid; -output[CWIDTH-1:0] C; - -reg signed [WIDTH-1:0] A_q, B_q; -wire signed [CWIDTH-1:0] C_int; - -assign C_int = A_q * B_q; -assign valid_int = Valid; -assign C = C_int; - -always @(*) - if(valid_int == 1'b1) - A_q <= A; - -always @(*) - if(valid_int == 1'b1) - B_q <= B; - -endmodule - - -module qlal4s3_mult_cell_macro ( Amult, Bmult, Valid_mult, sel_mul_32x32, Cmult); - -input [31:0] Amult; -input [31:0] Bmult; -input [1:0] Valid_mult; -input sel_mul_32x32; -output [63:0] Cmult; + parameter WIDTH = 32; + parameter CWIDTH = 2 * WIDTH; -wire [15:0] A_mult_16_0; -wire [15:0] B_mult_16_0; -wire [31:0] C_mult_16_0; -wire [15:0] A_mult_16_1; -wire [15:0] B_mult_16_1; -wire [31:0] C_mult_16_1; -wire [31:0] A_mult_32; -wire [31:0] B_mult_32; -wire [63:0] C_mult_32; -wire Valid_mult_16_0; -wire Valid_mult_16_1; -wire Valid_mult_32; + input [WIDTH-1:0] A, B; + input Valid; + output [CWIDTH-1:0] C; + reg signed [WIDTH-1:0] A_q, B_q; + wire signed [CWIDTH-1:0] C_int; -assign Cmult = sel_mul_32x32 ? C_mult_32 : {C_mult_16_1, C_mult_16_0}; + assign C_int = A_q * B_q; + assign valid_int = Valid; + assign C = C_int; -assign A_mult_16_0 = sel_mul_32x32 ? 16'h0 : Amult[15:0]; -assign B_mult_16_0 = sel_mul_32x32 ? 16'h0 : Bmult[15:0]; -assign A_mult_16_1 = sel_mul_32x32 ? 16'h0 : Amult[31:16]; -assign B_mult_16_1 = sel_mul_32x32 ? 16'h0 : Bmult[31:16]; + always @(*) if (valid_int == 1'b1) A_q <= A; -assign A_mult_32 = sel_mul_32x32 ? Amult : 32'h0; -assign B_mult_32 = sel_mul_32x32 ? Bmult : 32'h0; + always @(*) if (valid_int == 1'b1) B_q <= B; -assign Valid_mult_16_0 = sel_mul_32x32 ? 1'b0 : Valid_mult[0]; -assign Valid_mult_16_1 = sel_mul_32x32 ? 1'b0 : Valid_mult[1]; -assign Valid_mult_32 = sel_mul_32x32 ? Valid_mult[0] : 1'b0; +endmodule -signed_mult #(.WIDTH(16)) u_signed_mult_16_0( -.A (A_mult_16_0), //I: 16 bits -.B (B_mult_16_0), //I: 16 bits -.Valid (Valid_mult_16_0), //I -.C (C_mult_16_0) //O: 32 bits -); -signed_mult #(.WIDTH(16)) u_signed_mult_16_1( -.A (A_mult_16_1), //I: 16 bits -.B (B_mult_16_1), //I: 16 bits -.Valid (Valid_mult_16_1), //I -.C (C_mult_16_1) //O: 32 bits +module qlal4s3_mult_cell_macro ( + Amult, + Bmult, + Valid_mult, + sel_mul_32x32, + Cmult ); -signed_mult #(.WIDTH(32)) u_signed_mult_32( -.A (A_mult_32), //I: 32 bits -.B (B_mult_32), //I: 32 bits -.Valid (Valid_mult_32), //I -.C (C_mult_32) //O: 64 bits -); + input [31:0] Amult; + input [31:0] Bmult; + input [1:0] Valid_mult; + input sel_mul_32x32; + output [63:0] Cmult; + + wire [15:0] A_mult_16_0; + wire [15:0] B_mult_16_0; + wire [31:0] C_mult_16_0; + wire [15:0] A_mult_16_1; + wire [15:0] B_mult_16_1; + wire [31:0] C_mult_16_1; + wire [31:0] A_mult_32; + wire [31:0] B_mult_32; + wire [63:0] C_mult_32; + wire Valid_mult_16_0; + wire Valid_mult_16_1; + wire Valid_mult_32; + + + assign Cmult = sel_mul_32x32 ? C_mult_32 : {C_mult_16_1, C_mult_16_0}; + + assign A_mult_16_0 = sel_mul_32x32 ? 16'h0 : Amult[15:0]; + assign B_mult_16_0 = sel_mul_32x32 ? 16'h0 : Bmult[15:0]; + assign A_mult_16_1 = sel_mul_32x32 ? 16'h0 : Amult[31:16]; + assign B_mult_16_1 = sel_mul_32x32 ? 16'h0 : Bmult[31:16]; + + assign A_mult_32 = sel_mul_32x32 ? Amult : 32'h0; + assign B_mult_32 = sel_mul_32x32 ? Bmult : 32'h0; + + assign Valid_mult_16_0 = sel_mul_32x32 ? 1'b0 : Valid_mult[0]; + assign Valid_mult_16_1 = sel_mul_32x32 ? 1'b0 : Valid_mult[1]; + assign Valid_mult_32 = sel_mul_32x32 ? Valid_mult[0] : 1'b0; + + signed_mult #( + .WIDTH(16) + ) u_signed_mult_16_0 ( + .A (A_mult_16_0), //I: 16 bits + .B (B_mult_16_0), //I: 16 bits + .Valid(Valid_mult_16_0), //I + .C (C_mult_16_0) //O: 32 bits + ); + + signed_mult #( + .WIDTH(16) + ) u_signed_mult_16_1 ( + .A (A_mult_16_1), //I: 16 bits + .B (B_mult_16_1), //I: 16 bits + .Valid(Valid_mult_16_1), //I + .C (C_mult_16_1) //O: 32 bits + ); + + signed_mult #( + .WIDTH(32) + ) u_signed_mult_32 ( + .A (A_mult_32), //I: 32 bits + .B (B_mult_32), //I: 32 bits + .Valid(Valid_mult_32), //I + .C (C_mult_32) //O: 64 bits + ); endmodule /*qlal4s3_mult_cell*/ diff --git a/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v b/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v index b03b7f6d0..5a8f69a9e 100644 --- a/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v +++ b/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v @@ -6,1368 +6,1343 @@ // // SPDX-License-Identifier:ISC -`timescale 1ns/10ps -module ahb_gen_bfm ( - - // AHB Slave Interface to AHB Bus Matrix - // - A2F_HCLK, - A2F_HRESET, - - A2F_HADDRS, - A2F_HSEL, - A2F_HTRANSS, - A2F_HSIZES, - A2F_HWRITES, - A2F_HREADYS, - A2F_HWDATAS, - - A2F_HREADYOUTS, - A2F_HRESPS, - A2F_HRDATAS - - ); - -//------Port Parameters---------------- -// - -parameter ADDRWIDTH = 32; -parameter DATAWIDTH = 32; - -// -// Define the default address between transfers -// -parameter DEFAULT_AHB_ADDRESS = {(ADDRWIDTH){1'b1}}; - -// -// Define the standard delay from clock -// -parameter STD_CLK_DLY = 2; - -// -// Define Debug Message Controls -// -parameter ENABLE_AHB_REG_WR_DEBUG_MSG = 1'b1; -parameter ENABLE_AHB_REG_RD_DEBUG_MSG = 1'b1; - -// -// Define the size of the message arrays -// -parameter TEST_MSG_ARRAY_SIZE = (64 * 8); - +`timescale 1ns / 10ps +module ahb_gen_bfm ( -//------Port Signals------------------- -// + // AHB Slave Interface to AHB Bus Matrix + // + A2F_HCLK, + A2F_HRESET, - // AHB connection to master - // -input A2F_HCLK; -input A2F_HRESET; + A2F_HADDRS, + A2F_HSEL, + A2F_HTRANSS, + A2F_HSIZES, + A2F_HWRITES, + A2F_HREADYS, + A2F_HWDATAS, -output [ADDRWIDTH-1:0] A2F_HADDRS; -output A2F_HSEL; -output [1:0] A2F_HTRANSS; -output [2:0] A2F_HSIZES; -output A2F_HWRITES; -output A2F_HREADYS; -output [DATAWIDTH-1:0] A2F_HWDATAS; + A2F_HREADYOUTS, + A2F_HRESPS, + A2F_HRDATAS + +); -input A2F_HREADYOUTS; -input A2F_HRESPS; -input [DATAWIDTH-1:0] A2F_HRDATAS; + //------Port Parameters---------------- + // + + parameter ADDRWIDTH = 32; + parameter DATAWIDTH = 32; + + // + // Define the default address between transfers + // + parameter DEFAULT_AHB_ADDRESS = {(ADDRWIDTH) {1'b1}}; + + // + // Define the standard delay from clock + // + parameter STD_CLK_DLY = 2; + // + // Define Debug Message Controls + // + parameter ENABLE_AHB_REG_WR_DEBUG_MSG = 1'b1; + parameter ENABLE_AHB_REG_RD_DEBUG_MSG = 1'b1; -wire A2F_HCLK; -wire A2F_HRESET; + // + // Define the size of the message arrays + // + parameter TEST_MSG_ARRAY_SIZE = (64 * 8); -reg [ADDRWIDTH-1:0] A2F_HADDRS; -reg A2F_HSEL; -reg [1:0] A2F_HTRANSS; -reg [2:0] A2F_HSIZES; -reg A2F_HWRITES; -reg A2F_HREADYS; -reg [DATAWIDTH-1:0] A2F_HWDATAS; -wire A2F_HREADYOUTS; -wire A2F_HRESPS; -wire [DATAWIDTH-1:0] A2F_HRDATAS; + //------Port Signals------------------- + // + // AHB connection to master + // + input A2F_HCLK; + input A2F_HRESET; -//------Define Parameters-------------- -// + output [ADDRWIDTH-1:0] A2F_HADDRS; + output A2F_HSEL; + output [1:0] A2F_HTRANSS; + output [2:0] A2F_HSIZES; + output A2F_HWRITES; + output A2F_HREADYS; + output [DATAWIDTH-1:0] A2F_HWDATAS; -// -// None at this time -// + input A2F_HREADYOUTS; + input A2F_HRESPS; + input [DATAWIDTH-1:0] A2F_HRDATAS; -//------Internal Signals--------------- -// -// Define internal signals -// -reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg1; // Bus used for depositing test messages in ASCI -reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg2; // Bus used for depositing test messages in ASCI -reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg3; // Bus used for depositing test messages in ASCI -reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg4; // Bus used for depositing test messages in ASCI -reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg5; // Bus used for depositing test messages in ASCI -reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg6; // Bus used for depositing test messages in ASCI + wire A2F_HCLK; + wire A2F_HRESET; + reg [ ADDRWIDTH-1:0] A2F_HADDRS; + reg A2F_HSEL; + reg [ 1:0] A2F_HTRANSS; + reg [ 2:0] A2F_HSIZES; + reg A2F_HWRITES; + reg A2F_HREADYS; + reg [ DATAWIDTH-1:0] A2F_HWDATAS; -//------Logic Operations--------------- -// + wire A2F_HREADYOUTS; + wire A2F_HRESPS; + wire [ DATAWIDTH-1:0] A2F_HRDATAS; -// Define the intial state of key signals -// -initial -begin - - A2F_HADDRS <= DEFAULT_AHB_ADDRESS; // Default Address - A2F_HSEL <= 1'b0; // Bridge not selected - A2F_HTRANSS <= 2'h0; // "IDLE" State - A2F_HSIZES <= 3'h0; // "Byte" Transfer Size - A2F_HWRITES <= 1'b0; // "Read" operation - A2F_HREADYS <= 1'b0; // Slave is not ready - A2F_HWDATAS <= {(DATAWIDTH){1'b0}}; // Write Data Value of "0" - - ahb_bfm_msg1 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI - ahb_bfm_msg2 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI - ahb_bfm_msg3 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI - ahb_bfm_msg4 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI - ahb_bfm_msg5 <= "NO ACTIVITY"; // Bus used for depositiog test messages in ASCI - ahb_bfm_msg6 <= "NO ACTIVITY"; // Bus used for depositiog test messages in ASCI -end - - -//------Instantiate Modules------------ -// -// -// None at this time -// + //------Define Parameters-------------- + // + // + // None at this time + // -//------BFM Routines------------------- -// -`ifndef YOSYS -task ahb_read_al4s3b_fabric; -input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus -input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus -output [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus + //------Internal Signals--------------- + // + + // Define internal signals + // + reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg1; // Bus used for depositing test messages in ASCI + reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg2; // Bus used for depositing test messages in ASCI + reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg3; // Bus used for depositing test messages in ASCI + reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg4; // Bus used for depositing test messages in ASCI + reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg5; // Bus used for depositing test messages in ASCI + reg [TEST_MSG_ARRAY_SIZE-1:0] ahb_bfm_msg6; // Bus used for depositing test messages in ASCI -reg [DATAWIDTH-1:0] read_data; -integer i, j, k; + //------Logic Operations--------------- + // + + // Define the intial state of key signals + // + initial begin -begin - // Read Command Bit - // - @(posedge A2F_HCLK) #STD_CLK_DLY; + A2F_HADDRS <= DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL <= 1'b0; // Bridge not selected + A2F_HTRANSS <= 2'h0; // "IDLE" State + A2F_HSIZES <= 3'h0; // "Byte" Transfer Size + A2F_HWRITES <= 1'b0; // "Read" operation + A2F_HREADYS <= 1'b0; // Slave is not ready + A2F_HWDATAS <= {(DATAWIDTH) {1'b0}}; // Write Data Value of "0" + + ahb_bfm_msg1 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI + ahb_bfm_msg2 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI + ahb_bfm_msg3 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI + ahb_bfm_msg4 <= "NO ACTIVITY"; // Bus used for depositing test messages in ASCI + ahb_bfm_msg5 <= "NO ACTIVITY"; // Bus used for depositiog test messages in ASCI + ahb_bfm_msg6 <= "NO ACTIVITY"; // Bus used for depositiog test messages in ASCI + end - // Issue Diagnostic Messages - // - ahb_bfm_msg1 = "AHB Single Read"; - ahb_bfm_msg2 = "Address Phase"; - ahb_bfm_msg3 = "SEQ"; - A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + //------Instantiate Modules------------ + // + + // + // None at this time + // - // Define the Transfer Request - // - // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description - // ------------- ------------- ------------------------------------ - // 0 0 IDLE (No Transfer) - // 0 1 BUSY (No Transfer) - // 1 0 NONSEQ (Do Transfer) - // 1 1 SEQ (Do Transfer) - // - // Transfer decode of: A2F_HREADYS Description - // ----------- ------------------------------------ - // 0 Slave is not ready (No Transfer) - // 1 Slave is ready (Do Transfer) - // - A2F_HSEL = 1'b1; // Bridge selected - A2F_HREADYS = 1'b1; // Slave is ready - A2F_HTRANSS = 2'h2; // "NONSEQ" State - - // - // Define "Transfer Size Encoding" is based on the following: - // - // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description - // -------- -------- -------- ---- ----------- - // 0 0 0 8 Byte - // 0 0 1 16 Halfword - // 0 1 0 32 Word - // 0 1 1 64 Doublword - // 1 0 0 128 4-word line - // 1 0 1 256 8-word line - // 1 1 0 512 - - // 1 1 1 1024 - - // - // The fabric design only supports up to 32 bits at a time. - // - A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size - - A2F_HWRITES = 1'b0; // "Read" operation - A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" - // - // Wait for next clock to sampe the slave's response - // - @(posedge A2F_HCLK) #STD_CLK_DLY; + //------BFM Routines------------------- + // +`ifndef YOSYS + task ahb_read_al4s3b_fabric; + input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus + input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus + output [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus - ahb_bfm_msg2 = "Data Phase"; - ahb_bfm_msg3 = "IDLE"; - ahb_bfm_msg4 = "Waiting for Slave"; + reg [DATAWIDTH-1:0] read_data; - // Set the next transfer cycle to "IDLE" - A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address - A2F_HSEL = 1'b0; // Bridge not selected - A2F_HTRANSS = 2'h0; // "IDLE" State - A2F_HSIZES = 3'h0; // "Byte" Transfer Size + integer i, j, k; - // - // Check if the slave has returend data - // - while (A2F_HREADYOUTS == 1'b0) begin + // Read Command Bit + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Read"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size + + A2F_HWRITES = 1'b0; // "Read" operation + A2F_HWDATAS = {(DATAWIDTH) {1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) begin @(posedge A2F_HCLK) #STD_CLK_DLY; - end + end - A2F_HREADYS = 1'b0; // Slave is not ready - TARGET_DATA = A2F_HRDATAS; // Read slave data value + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value - // Clear Diagnostic Messages - // - ahb_bfm_msg1 <= "NO ACTIVITY"; - ahb_bfm_msg2 <= "NO ACTIVITY"; - ahb_bfm_msg3 <= "NO ACTIVITY"; - ahb_bfm_msg4 <= "NO ACTIVITY"; - ahb_bfm_msg5 <= "NO ACTIVITY"; - ahb_bfm_msg6 <= "NO ACTIVITY"; + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; -end -endtask - - -task ahb_write_al4s3b_fabric; -input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus -input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus -input [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus - -reg [DATAWIDTH-1:0] read_data; - -integer i, j, k; - -begin - // Read Command Bit - // - @(posedge A2F_HCLK) #STD_CLK_DLY; - - // Issue Diagnostic Messages - // - ahb_bfm_msg1 = "AHB Single Write"; - ahb_bfm_msg2 = "Address Phase"; - ahb_bfm_msg3 = "SEQ"; - - A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + end + endtask - // Define the Transfer Request - // - // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description - // ------------- ------------- ------------------------------------ - // 0 0 IDLE (No Transfer) - // 0 1 BUSY (No Transfer) - // 1 0 NONSEQ (Do Transfer) - // 1 1 SEQ (Do Transfer) - // - // Transfer decode of: A2F_HREADYS Description - // ----------- ------------------------------------ - // 0 Slave is not ready (No Transfer) - // 1 Slave is ready (Do Transfer) - // - A2F_HSEL = 1'b1; // Bridge selected - A2F_HREADYS = 1'b1; // Slave is ready - A2F_HTRANSS = 2'h2; // "NONSEQ" State - - // - // Define "Transfer Size Encoding" is based on the following: - // - // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description - // -------- -------- -------- ---- ----------- - // 0 0 0 8 Byte - // 0 0 1 16 Halfword - // 0 1 0 32 Word - // 0 1 1 64 Doublword - // 1 0 0 128 4-word line - // 1 0 1 256 8-word line - // 1 1 0 512 - - // 1 1 1 1024 - - // - // The fabric design only supports up to 32 bits at a time. - // - A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size - - A2F_HWRITES = 1'b1; // "Write" operation - A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" - // - // Wait for next clock to sampe the slave's response - // - @(posedge A2F_HCLK) #STD_CLK_DLY; + task ahb_write_al4s3b_fabric; + input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus + input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus + input [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus - ahb_bfm_msg2 = "Data Phase"; - ahb_bfm_msg3 = "IDLE"; - ahb_bfm_msg4 = "Waiting for Slave"; + reg [DATAWIDTH-1:0] read_data; - // Set the next transfer cycle to "IDLE" - A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address - A2F_HSEL = 1'b0; // Bridge not selected - A2F_HTRANSS = 2'h0; // "IDLE" State - A2F_HSIZES = 3'h0; // "Byte" Transfer Size - A2F_HWDATAS = TARGET_DATA; // Write From test routine - A2F_HWRITES = 1'b0; // "Read" operation + integer i, j, k; - // - // Check if the slave has returend data - // - while (A2F_HREADYOUTS == 1'b0) begin + // Read Command Bit + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Write"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size + + A2F_HWRITES = 1'b1; // "Write" operation + A2F_HWDATAS = {(DATAWIDTH) {1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + A2F_HWDATAS = TARGET_DATA; // Write From test routine + A2F_HWRITES = 1'b0; // "Read" operation + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) begin @(posedge A2F_HCLK) #STD_CLK_DLY; - end - - A2F_HREADYS = 1'b0; // Slave is not ready - TARGET_DATA = A2F_HRDATAS; // Read slave data value - - // Clear Diagnostic Messages - // - ahb_bfm_msg1 <= "NO ACTIVITY"; - ahb_bfm_msg2 <= "NO ACTIVITY"; - ahb_bfm_msg3 <= "NO ACTIVITY"; - ahb_bfm_msg4 <= "NO ACTIVITY"; - ahb_bfm_msg5 <= "NO ACTIVITY"; - ahb_bfm_msg6 <= "NO ACTIVITY"; - -end -endtask - -task ahb_read_word_al4s3b_fabric; -input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus -output [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus + end -reg [DATAWIDTH-1:0] read_data; + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value -integer i, j, k; + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; -begin - // Read Command Bit - // - - wait (A2F_HRESET == 0); - @(posedge A2F_HCLK) #STD_CLK_DLY; - - // Issue Diagnostic Messages - // - ahb_bfm_msg1 = "AHB Single Read"; - ahb_bfm_msg2 = "Address Phase"; - ahb_bfm_msg3 = "SEQ"; - - A2F_HADDRS = TARGET_ADDRESS; // Transfer Address - - // Define the Transfer Request - // - // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description - // ------------- ------------- ------------------------------------ - // 0 0 IDLE (No Transfer) - // 0 1 BUSY (No Transfer) - // 1 0 NONSEQ (Do Transfer) - // 1 1 SEQ (Do Transfer) - // - // Transfer decode of: A2F_HREADYS Description - // ----------- ------------------------------------ - // 0 Slave is not ready (No Transfer) - // 1 Slave is ready (Do Transfer) - // - A2F_HSEL = 1'b1; // Bridge selected - A2F_HREADYS = 1'b1; // Slave is ready - A2F_HTRANSS = 2'h2; // "NONSEQ" State - - // - // Define "Transfer Size Encoding" is based on the following: - // - // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description - // -------- -------- -------- ---- ----------- - // 0 0 0 8 Byte - // 0 0 1 16 Halfword - // 0 1 0 32 Word - // 0 1 1 64 Doublword - // 1 0 0 128 4-word line - // 1 0 1 256 8-word line - // 1 1 0 512 - - // 1 1 1 1024 - - // - // The fabric design only supports up to 32 bits at a time. - // - A2F_HSIZES = 3'b010; // Transfer Size - - A2F_HWRITES = 1'b0; // "Read" operation - A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" + end + endtask - // - // Wait for next clock to sampe the slave's response - // - @(posedge A2F_HCLK) #STD_CLK_DLY; + task ahb_read_word_al4s3b_fabric; + input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus + output [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus - ahb_bfm_msg2 = "Data Phase"; - ahb_bfm_msg3 = "IDLE"; - ahb_bfm_msg4 = "Waiting for Slave"; + reg [DATAWIDTH-1:0] read_data; - // Set the next transfer cycle to "IDLE" - A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address - A2F_HSEL = 1'b0; // Bridge not selected - A2F_HTRANSS = 2'h0; // "IDLE" State - A2F_HSIZES = 3'h0; // "Byte" Transfer Size + integer i, j, k; - // - // Check if the slave has returend data - // - while (A2F_HREADYOUTS == 1'b0) begin + // Read Command Bit + // + + wait(A2F_HRESET == 0); + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Read"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = 3'b010; // Transfer Size + + A2F_HWRITES = 1'b0; // "Read" operation + A2F_HWDATAS = {(DATAWIDTH) {1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) begin @(posedge A2F_HCLK) #STD_CLK_DLY; - end - - A2F_HREADYS = 1'b0; // Slave is not ready - TARGET_DATA = A2F_HRDATAS; // Read slave data value - - // Clear Diagnostic Messages - // - ahb_bfm_msg1 <= "NO ACTIVITY"; - ahb_bfm_msg2 <= "NO ACTIVITY"; - ahb_bfm_msg3 <= "NO ACTIVITY"; - ahb_bfm_msg4 <= "NO ACTIVITY"; - ahb_bfm_msg5 <= "NO ACTIVITY"; - ahb_bfm_msg6 <= "NO ACTIVITY"; - -end -endtask - - -task ahb_write_word_al4s3b_fabric; -input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus -input [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus - -reg [DATAWIDTH-1:0] read_data; - -integer i, j, k; + end -begin - // Read Command Bit - // - wait (A2F_HRESET == 0); - - @(posedge A2F_HCLK) #STD_CLK_DLY; + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value - // Issue Diagnostic Messages - // - ahb_bfm_msg1 = "AHB Single Write"; - ahb_bfm_msg2 = "Address Phase"; - ahb_bfm_msg3 = "SEQ"; + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; - A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + end + endtask - // Define the Transfer Request - // - // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description - // ------------- ------------- ------------------------------------ - // 0 0 IDLE (No Transfer) - // 0 1 BUSY (No Transfer) - // 1 0 NONSEQ (Do Transfer) - // 1 1 SEQ (Do Transfer) - // - // Transfer decode of: A2F_HREADYS Description - // ----------- ------------------------------------ - // 0 Slave is not ready (No Transfer) - // 1 Slave is ready (Do Transfer) - // - A2F_HSEL = 1'b1; // Bridge selected - A2F_HREADYS = 1'b1; // Slave is ready - A2F_HTRANSS = 2'h2; // "NONSEQ" State - - // - // Define "Transfer Size Encoding" is based on the following: - // - // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description - // -------- -------- -------- ---- ----------- - // 0 0 0 8 Byte - // 0 0 1 16 Halfword - // 0 1 0 32 Word - // 0 1 1 64 Doublword - // 1 0 0 128 4-word line - // 1 0 1 256 8-word line - // 1 1 0 512 - - // 1 1 1 1024 - - // - // The fabric design only supports up to 32 bits at a time. - // - A2F_HSIZES = 3'b010; // Transfer Size - - A2F_HWRITES = 1'b1; // "Write" operation - A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" - // - // Wait for next clock to sampe the slave's response - // - @(posedge A2F_HCLK) #STD_CLK_DLY; + task ahb_write_word_al4s3b_fabric; + input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus + input [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus - ahb_bfm_msg2 = "Data Phase"; - ahb_bfm_msg3 = "IDLE"; - ahb_bfm_msg4 = "Waiting for Slave"; + reg [DATAWIDTH-1:0] read_data; - // Set the next transfer cycle to "IDLE" - A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address - A2F_HSEL = 1'b0; // Bridge not selected - A2F_HTRANSS = 2'h0; // "IDLE" State - A2F_HSIZES = 3'h0; // "Byte" Transfer Size - A2F_HWDATAS = TARGET_DATA; // Write From test routine - A2F_HWRITES = 1'b0; // "Read" operation + integer i, j, k; - // - // Check if the slave has returend data - // - while (A2F_HREADYOUTS == 1'b0) begin + // Read Command Bit + // + wait(A2F_HRESET == 0); + + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Write"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = 3'b010; // Transfer Size + + A2F_HWRITES = 1'b1; // "Write" operation + A2F_HWDATAS = {(DATAWIDTH) {1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + A2F_HWDATAS = TARGET_DATA; // Write From test routine + A2F_HWRITES = 1'b0; // "Read" operation + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) begin @(posedge A2F_HCLK) #STD_CLK_DLY; - end - - A2F_HREADYS = 1'b0; // Slave is not ready - TARGET_DATA = A2F_HRDATAS; // Read slave data value + end - // Clear Diagnostic Messages - // - ahb_bfm_msg1 <= "NO ACTIVITY"; - ahb_bfm_msg2 <= "NO ACTIVITY"; - ahb_bfm_msg3 <= "NO ACTIVITY"; - ahb_bfm_msg4 <= "NO ACTIVITY"; - ahb_bfm_msg5 <= "NO ACTIVITY"; - ahb_bfm_msg6 <= "NO ACTIVITY"; - - //$stop(); + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value -end -endtask + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; -task ahb_write_al4s3b_fabric_mod; -input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus -input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus -input [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus + //$stop(); -reg [DATAWIDTH-1:0] read_data; - -integer i, j, k; - -begin - // Read Command Bit - // - @(posedge A2F_HCLK) #STD_CLK_DLY; - - // Issue Diagnostic Messages - // - ahb_bfm_msg1 = "AHB Single Write"; - ahb_bfm_msg2 = "Address Phase"; - ahb_bfm_msg3 = "SEQ"; - - //A2F_HADDRS = TARGET_ADDRESS; // Transfer Address - A2F_HADDRS = {TARGET_ADDRESS[ADDRWIDTH-1:11],(TARGET_ADDRESS[10:0] << 2)} ; // Transfer Address - - // Define the Transfer Request - // - // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description - // ------------- ------------- ------------------------------------ - // 0 0 IDLE (No Transfer) - // 0 1 BUSY (No Transfer) - // 1 0 NONSEQ (Do Transfer) - // 1 1 SEQ (Do Transfer) - // - // Transfer decode of: A2F_HREADYS Description - // ----------- ------------------------------------ - // 0 Slave is not ready (No Transfer) - // 1 Slave is ready (Do Transfer) - // - A2F_HSEL = 1'b1; // Bridge selected - A2F_HREADYS = 1'b1; // Slave is ready - A2F_HTRANSS = 2'h2; // "NONSEQ" State - - // - // Define "Transfer Size Encoding" is based on the following: - // - // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description - // -------- -------- -------- ---- ----------- - // 0 0 0 8 Byte - // 0 0 1 16 Halfword - // 0 1 0 32 Word - // 0 1 1 64 Doublword - // 1 0 0 128 4-word line - // 1 0 1 256 8-word line - // 1 1 0 512 - - // 1 1 1 1024 - - // - // The fabric design only supports up to 32 bits at a time. - // - A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size - - A2F_HWRITES = 1'b1; // "Write" operation - A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" + end + endtask - // - // Wait for next clock to sampe the slave's response - // - @(posedge A2F_HCLK) #STD_CLK_DLY; + task ahb_write_al4s3b_fabric_mod; + input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus + input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus + input [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus - ahb_bfm_msg2 = "Data Phase"; - ahb_bfm_msg3 = "IDLE"; - ahb_bfm_msg4 = "Waiting for Slave"; + reg [DATAWIDTH-1:0] read_data; - // Set the next transfer cycle to "IDLE" - A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address - A2F_HSEL = 1'b0; // Bridge not selected - A2F_HTRANSS = 2'h0; // "IDLE" State - A2F_HSIZES = 3'h0; // "Byte" Transfer Size - A2F_HWDATAS = TARGET_DATA; // Write From test routine - A2F_HWRITES = 1'b0; // "Read" operation + integer i, j, k; - // - // Check if the slave has returend data - // - while (A2F_HREADYOUTS == 1'b0) begin + // Read Command Bit + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Write"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + //A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + A2F_HADDRS = { + TARGET_ADDRESS[ADDRWIDTH-1:11], (TARGET_ADDRESS[10:0] << 2) + }; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size + + A2F_HWRITES = 1'b1; // "Write" operation + A2F_HWDATAS = {(DATAWIDTH) {1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + A2F_HWDATAS = TARGET_DATA; // Write From test routine + A2F_HWRITES = 1'b0; // "Read" operation + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) begin @(posedge A2F_HCLK) #STD_CLK_DLY; - end - - A2F_HREADYS = 1'b0; // Slave is not ready - TARGET_DATA = A2F_HRDATAS; // Read slave data value - - // Clear Diagnostic Messages - // - ahb_bfm_msg1 <= "NO ACTIVITY"; - ahb_bfm_msg2 <= "NO ACTIVITY"; - ahb_bfm_msg3 <= "NO ACTIVITY"; - ahb_bfm_msg4 <= "NO ACTIVITY"; - ahb_bfm_msg5 <= "NO ACTIVITY"; - ahb_bfm_msg6 <= "NO ACTIVITY"; - -end -endtask - - -task ahb_read_al4s3b_fabric_mod; -input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus -input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus -output [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus - -reg [DATAWIDTH-1:0] read_data; + end -integer i, j, k; + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value -begin - // Read Command Bit - // - @(posedge A2F_HCLK) #STD_CLK_DLY; + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; - // Issue Diagnostic Messages - // - ahb_bfm_msg1 = "AHB Single Read"; - ahb_bfm_msg2 = "Address Phase"; - ahb_bfm_msg3 = "SEQ"; - - //A2F_HADDRS = TARGET_ADDRESS; // Transfer Address - A2F_HADDRS = {TARGET_ADDRESS[ADDRWIDTH-1:11],(TARGET_ADDRESS[10:0] << 2)} ; // Transfer Address + end + endtask - // Define the Transfer Request - // - // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description - // ------------- ------------- ------------------------------------ - // 0 0 IDLE (No Transfer) - // 0 1 BUSY (No Transfer) - // 1 0 NONSEQ (Do Transfer) - // 1 1 SEQ (Do Transfer) - // - // Transfer decode of: A2F_HREADYS Description - // ----------- ------------------------------------ - // 0 Slave is not ready (No Transfer) - // 1 Slave is ready (Do Transfer) - // - A2F_HSEL = 1'b1; // Bridge selected - A2F_HREADYS = 1'b1; // Slave is ready - A2F_HTRANSS = 2'h2; // "NONSEQ" State - - // - // Define "Transfer Size Encoding" is based on the following: - // - // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description - // -------- -------- -------- ---- ----------- - // 0 0 0 8 Byte - // 0 0 1 16 Halfword - // 0 1 0 32 Word - // 0 1 1 64 Doublword - // 1 0 0 128 4-word line - // 1 0 1 256 8-word line - // 1 1 0 512 - - // 1 1 1 1024 - - // - // The fabric design only supports up to 32 bits at a time. - // - A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size - - A2F_HWRITES = 1'b0; // "Read" operation - A2F_HWDATAS = {(DATAWIDTH){1'b0}}; // Write Data Value of "0" - // - // Wait for next clock to sampe the slave's response - // - @(posedge A2F_HCLK) #STD_CLK_DLY; + task ahb_read_al4s3b_fabric_mod; + input [ADDRWIDTH-1:0] TARGET_ADDRESS; // Address to be written on the SPI bus + input [2:0] TARGET_XFR_SIZE; // Transfer Size for AHB bus + output [DATAWIDTH-1:0] TARGET_DATA; // Data to be written on the SPI bus - ahb_bfm_msg2 = "Data Phase"; - ahb_bfm_msg3 = "IDLE"; - ahb_bfm_msg4 = "Waiting for Slave"; + reg [DATAWIDTH-1:0] read_data; - // Set the next transfer cycle to "IDLE" - A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address - A2F_HSEL = 1'b0; // Bridge not selected - A2F_HTRANSS = 2'h0; // "IDLE" State - A2F_HSIZES = 3'h0; // "Byte" Transfer Size + integer i, j, k; - // - // Check if the slave has returend data - // - while (A2F_HREADYOUTS == 1'b0) begin + // Read Command Bit + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + // Issue Diagnostic Messages + // + ahb_bfm_msg1 = "AHB Single Read"; + ahb_bfm_msg2 = "Address Phase"; + ahb_bfm_msg3 = "SEQ"; + + //A2F_HADDRS = TARGET_ADDRESS; // Transfer Address + A2F_HADDRS = { + TARGET_ADDRESS[ADDRWIDTH-1:11], (TARGET_ADDRESS[10:0] << 2) + }; // Transfer Address + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + A2F_HSEL = 1'b1; // Bridge selected + A2F_HREADYS = 1'b1; // Slave is ready + A2F_HTRANSS = 2'h2; // "NONSEQ" State + + // + // Define "Transfer Size Encoding" is based on the following: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + A2F_HSIZES = TARGET_XFR_SIZE; // Transfer Size + + A2F_HWRITES = 1'b0; // "Read" operation + A2F_HWDATAS = {(DATAWIDTH) {1'b0}}; // Write Data Value of "0" + + // + // Wait for next clock to sampe the slave's response + // + @(posedge A2F_HCLK) #STD_CLK_DLY; + + ahb_bfm_msg2 = "Data Phase"; + ahb_bfm_msg3 = "IDLE"; + ahb_bfm_msg4 = "Waiting for Slave"; + + // Set the next transfer cycle to "IDLE" + A2F_HADDRS = DEFAULT_AHB_ADDRESS; // Default Address + A2F_HSEL = 1'b0; // Bridge not selected + A2F_HTRANSS = 2'h0; // "IDLE" State + A2F_HSIZES = 3'h0; // "Byte" Transfer Size + + // + // Check if the slave has returend data + // + while (A2F_HREADYOUTS == 1'b0) begin @(posedge A2F_HCLK) #STD_CLK_DLY; - end + end - A2F_HREADYS = 1'b0; // Slave is not ready - TARGET_DATA = A2F_HRDATAS; // Read slave data value + A2F_HREADYS = 1'b0; // Slave is not ready + TARGET_DATA = A2F_HRDATAS; // Read slave data value - // Clear Diagnostic Messages - // - ahb_bfm_msg1 <= "NO ACTIVITY"; - ahb_bfm_msg2 <= "NO ACTIVITY"; - ahb_bfm_msg3 <= "NO ACTIVITY"; - ahb_bfm_msg4 <= "NO ACTIVITY"; - ahb_bfm_msg5 <= "NO ACTIVITY"; - ahb_bfm_msg6 <= "NO ACTIVITY"; + // Clear Diagnostic Messages + // + ahb_bfm_msg1 <= "NO ACTIVITY"; + ahb_bfm_msg2 <= "NO ACTIVITY"; + ahb_bfm_msg3 <= "NO ACTIVITY"; + ahb_bfm_msg4 <= "NO ACTIVITY"; + ahb_bfm_msg5 <= "NO ACTIVITY"; + ahb_bfm_msg6 <= "NO ACTIVITY"; -end -endtask + end + endtask `endif endmodule -`timescale 1ns/10ps +`timescale 1ns / 10ps -module oscillator_s1 - ( +module oscillator_s1 ( - OSC_CLK_EN, - OSC_CLK + OSC_CLK_EN, + OSC_CLK - ); +); -// Define the oscillator's frequency -// -// Note: The parameter above assumes that values are calculated in units of nS. -// -parameter T_CYCLE_CLK = (1000.0/19.2); + // Define the oscillator's frequency + // + // Note: The parameter above assumes that values are calculated in units of nS. + // + parameter T_CYCLE_CLK = (1000.0 / 19.2); -input OSC_CLK_EN; -output OSC_CLK; + input OSC_CLK_EN; + output OSC_CLK; -wire OSC_CLK_EN; -wire OSC_CLK; + wire OSC_CLK_EN; + wire OSC_CLK; -reg osc_int_clk; + reg osc_int_clk; -// Define the output enable -// -assign OSC_CLK = OSC_CLK_EN ? osc_int_clk : 1'bZ; + // Define the output enable + // + assign OSC_CLK = OSC_CLK_EN ? osc_int_clk : 1'bZ; -// Define the clock oscillator section -// -initial -begin - osc_int_clk = 0; // Intialize the clock at time 0ns. + // Define the clock oscillator section + // + initial begin + osc_int_clk = 0; // Intialize the clock at time 0ns. `ifndef YOSYS - forever // Generate a clock with an expected frequency. + forever // Generate a clock with an expected frequency. begin - #(T_CYCLE_CLK/2) osc_int_clk = 1; - #(T_CYCLE_CLK/2) osc_int_clk = 0; - end + #(T_CYCLE_CLK / 2) osc_int_clk = 1; + #(T_CYCLE_CLK / 2) osc_int_clk = 0; + end `endif -end + end endmodule -`timescale 1ns/10ps +`timescale 1ns / 10ps -module sdma_bfm ( +module sdma_bfm ( + + // SDMA Interface Signals + // + sdma_req_i, + sdma_sreq_i, + sdma_done_o, + sdma_active_o - // SDMA Interface Signals - // - sdma_req_i, - sdma_sreq_i, - sdma_done_o, - sdma_active_o +); - ); - -input [3:0] sdma_req_i; -input [3:0] sdma_sreq_i; -output [3:0] sdma_done_o; -output [3:0] sdma_active_o; + input [3:0] sdma_req_i; + input [3:0] sdma_sreq_i; + output [3:0] sdma_done_o; + output [3:0] sdma_active_o; -reg [3:0] sdma_done_sig; -reg [3:0] sdma_active_sig; + reg [3:0] sdma_done_sig; + reg [3:0] sdma_active_sig; -assign sdma_done_o = sdma_done_sig; -assign sdma_active_o = sdma_active_sig; + assign sdma_done_o = sdma_done_sig; + assign sdma_active_o = sdma_active_sig; -initial -begin -sdma_done_sig <= 4'h0; -sdma_active_sig <= 4'h0; + initial begin + sdma_done_sig <= 4'h0; + sdma_active_sig <= 4'h0; -end + end `ifndef YOSYS -task drive_dma_active; -input [3:0] dma_active_i; -begin - sdma_active_sig <= dma_active_i; - #100; - //sdma_active_sig <= 4'h0; - -end -endtask + task drive_dma_active; + input [3:0] dma_active_i; + begin + sdma_active_sig <= dma_active_i; + #100; + //sdma_active_sig <= 4'h0; + + end + endtask `endif -endmodule +endmodule `timescale 1ns / 10ps module ahb2fb_asynbrig_if ( - A2F_HCLK, // clock - A2F_HRESET, // reset + A2F_HCLK, // clock + A2F_HRESET, // reset - // AHB connection to master - // - A2F_HSEL, - A2F_HADDRS, - A2F_HTRANSS, - A2F_HSIZES, - A2F_HWRITES, - A2F_HREADYS, + // AHB connection to master + // + A2F_HSEL, + A2F_HADDRS, + A2F_HTRANSS, + A2F_HSIZES, + A2F_HWRITES, + A2F_HREADYS, - A2F_HREADYOUTS, - A2F_HRESPS, + A2F_HREADYOUTS, + A2F_HRESPS, - // Fabric Interface - // - AHB_ASYNC_ADDR_O, - AHB_ASYNC_READ_EN_O, - AHB_ASYNC_WRITE_EN_O, - AHB_ASYNC_BYTE_STROBE_O, + // Fabric Interface + // + AHB_ASYNC_ADDR_O, + AHB_ASYNC_READ_EN_O, + AHB_ASYNC_WRITE_EN_O, + AHB_ASYNC_BYTE_STROBE_O, - AHB_ASYNC_STB_TOGGLE_O, + AHB_ASYNC_STB_TOGGLE_O, - FABRIC_ASYNC_ACK_TOGGLE_I + FABRIC_ASYNC_ACK_TOGGLE_I - ); +); - //-----Port Parameters----------------- - // + //-----Port Parameters----------------- + // - parameter DATAWIDTH = 32; - parameter APERWIDTH = 17; + parameter DATAWIDTH = 32; + parameter APERWIDTH = 17; - parameter STATE_WIDTH = 1; + parameter STATE_WIDTH = 1; - parameter AHB_ASYNC_IDLE = 0; - parameter AHB_ASYNC_WAIT = 1; + parameter AHB_ASYNC_IDLE = 0; + parameter AHB_ASYNC_WAIT = 1; - //-----Port Signals-------------------- - // + //-----Port Signals-------------------- + // - //------------------------------------------ - // AHB connection to master - // - input A2F_HCLK; // clock - input A2F_HRESET; // reset + //------------------------------------------ + // AHB connection to master + // + input A2F_HCLK; // clock + input A2F_HRESET; // reset - input [APERWIDTH-1:0] A2F_HADDRS; - input A2F_HSEL; - input [1:0] A2F_HTRANSS; - input [2:0] A2F_HSIZES; - input A2F_HWRITES; - input A2F_HREADYS; + input [APERWIDTH-1:0] A2F_HADDRS; + input A2F_HSEL; + input [1:0] A2F_HTRANSS; + input [2:0] A2F_HSIZES; + input A2F_HWRITES; + input A2F_HREADYS; - output A2F_HREADYOUTS; - output A2F_HRESPS; + output A2F_HREADYOUTS; + output A2F_HRESPS; - //------------------------------------------ - // Fabric Interface - // - output [APERWIDTH-1:0] AHB_ASYNC_ADDR_O; - output AHB_ASYNC_READ_EN_O; - output AHB_ASYNC_WRITE_EN_O; - output [3:0] AHB_ASYNC_BYTE_STROBE_O; + //------------------------------------------ + // Fabric Interface + // + output [APERWIDTH-1:0] AHB_ASYNC_ADDR_O; + output AHB_ASYNC_READ_EN_O; + output AHB_ASYNC_WRITE_EN_O; + output [3:0] AHB_ASYNC_BYTE_STROBE_O; - output AHB_ASYNC_STB_TOGGLE_O; + output AHB_ASYNC_STB_TOGGLE_O; - input FABRIC_ASYNC_ACK_TOGGLE_I; + input FABRIC_ASYNC_ACK_TOGGLE_I; - //------------------------------------------ - // AHB connection to master - // - wire A2F_HCLK; // clock - wire A2F_HRESET; // reset + //------------------------------------------ + // AHB connection to master + // + wire A2F_HCLK; // clock + wire A2F_HRESET; // reset - wire [APERWIDTH-1:0] A2F_HADDRS; - wire A2F_HSEL; - wire [1:0] A2F_HTRANSS; - wire [2:0] A2F_HSIZES; - wire A2F_HWRITES; - wire A2F_HREADYS; + wire [ APERWIDTH-1:0] A2F_HADDRS; + wire A2F_HSEL; + wire [ 1:0] A2F_HTRANSS; + wire [ 2:0] A2F_HSIZES; + wire A2F_HWRITES; + wire A2F_HREADYS; - reg A2F_HREADYOUTS; - reg A2F_HREADYOUTS_nxt; + reg A2F_HREADYOUTS; + reg A2F_HREADYOUTS_nxt; - wire A2F_HRESPS; + wire A2F_HRESPS; - //------------------------------------------ - // Fabric Interface - // - reg [APERWIDTH-1:0] AHB_ASYNC_ADDR_O; - reg AHB_ASYNC_READ_EN_O; - reg AHB_ASYNC_WRITE_EN_O; + //------------------------------------------ + // Fabric Interface + // + reg [ APERWIDTH-1:0] AHB_ASYNC_ADDR_O; + reg AHB_ASYNC_READ_EN_O; + reg AHB_ASYNC_WRITE_EN_O; - reg [3:0] AHB_ASYNC_BYTE_STROBE_O; - reg [3:0] AHB_ASYNC_BYTE_STROBE_O_nxt; + reg [ 3:0] AHB_ASYNC_BYTE_STROBE_O; + reg [ 3:0] AHB_ASYNC_BYTE_STROBE_O_nxt; - reg AHB_ASYNC_STB_TOGGLE_O; - reg AHB_ASYNC_STB_TOGGLE_O_nxt; + reg AHB_ASYNC_STB_TOGGLE_O; + reg AHB_ASYNC_STB_TOGGLE_O_nxt; - wire FABRIC_ASYNC_ACK_TOGGLE_I; + wire FABRIC_ASYNC_ACK_TOGGLE_I; - //------Define Parameters--------- - // + //------Define Parameters--------- + // - // - // None at this time - // + // + // None at this time + // - - //-----Internal Signals-------------------- - // - wire trans_req; // transfer request + //-----Internal Signals-------------------- + // - reg [STATE_WIDTH-1:0] ahb_to_fabric_state; - reg [STATE_WIDTH-1:0] ahb_to_fabric_state_nxt; + wire trans_req; // transfer request - reg fabric_async_ack_toggle_i_1ff; - reg fabric_async_ack_toggle_i_2ff; - reg fabric_async_ack_toggle_i_3ff; + reg [STATE_WIDTH-1:0] ahb_to_fabric_state; + reg [STATE_WIDTH-1:0] ahb_to_fabric_state_nxt; - wire fabric_async_ack; + reg fabric_async_ack_toggle_i_1ff; + reg fabric_async_ack_toggle_i_2ff; + reg fabric_async_ack_toggle_i_3ff; - //------Logic Operations---------- - // + wire fabric_async_ack; + //------Logic Operations---------- + // - // Define the Transfer Request - // - // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description - // ------------- ------------- ------------------------------------ - // 0 0 IDLE (No Transfer) - // 0 1 BUSY (No Transfer) - // 1 0 NONSEQ (Do Transfer) - // 1 1 SEQ (Do Transfer) - // - // Transfer decode of: A2F_HREADYS Description - // ----------- ------------------------------------ - // 0 Slave is not ready (No Transfer) - // 1 Slave is ready (Do Transfer) - // - assign trans_req = A2F_HSEL + + // Define the Transfer Request + // + // Transfer decode of: A2F_HTRANS[1] A2F_HTRANS[0] Description + // ------------- ------------- ------------------------------------ + // 0 0 IDLE (No Transfer) + // 0 1 BUSY (No Transfer) + // 1 0 NONSEQ (Do Transfer) + // 1 1 SEQ (Do Transfer) + // + // Transfer decode of: A2F_HREADYS Description + // ----------- ------------------------------------ + // 0 Slave is not ready (No Transfer) + // 1 Slave is ready (Do Transfer) + // + assign trans_req = A2F_HSEL & A2F_HREADYS & A2F_HTRANSS[1]; // transfer request issued only in SEQ and NONSEQ status and slave is - // selected and last transfer finish + // selected and last transfer finish - // Check for acknowldge from the fabric - // - // Note: The fabric is on a different and potentially asynchronous clock. - // Therefore, acknowledge is passed as a toggle signal. - // - assign fabric_async_ack = fabric_async_ack_toggle_i_2ff ^ fabric_async_ack_toggle_i_3ff; + // Check for acknowldge from the fabric + // + // Note: The fabric is on a different and potentially asynchronous clock. + // Therefore, acknowledge is passed as a toggle signal. + // + assign fabric_async_ack = fabric_async_ack_toggle_i_2ff ^ fabric_async_ack_toggle_i_3ff; - // Issue transfer status - // - // Note: All transfers are considered to have completed successfully. - // - assign A2F_HRESPS = 1'b0; // OKAY response from slave + // Issue transfer status + // + // Note: All transfers are considered to have completed successfully. + // + assign A2F_HRESPS = 1'b0; // OKAY response from slave - // Address signal registering, to make the address and data active at the same cycle - // - always @(posedge A2F_HCLK or posedge A2F_HRESET) - begin - if (A2F_HRESET) - begin - ahb_to_fabric_state <= AHB_ASYNC_IDLE; + // Address signal registering, to make the address and data active at the same cycle + // + always @(posedge A2F_HCLK or posedge A2F_HRESET) begin + if (A2F_HRESET) begin + ahb_to_fabric_state <= AHB_ASYNC_IDLE; - AHB_ASYNC_ADDR_O <= {(APERWIDTH){1'b0}}; //default address 0 is selected - AHB_ASYNC_READ_EN_O <= 1'b0; - AHB_ASYNC_WRITE_EN_O <= 1'b0; - AHB_ASYNC_BYTE_STROBE_O <= 4'b0; + AHB_ASYNC_ADDR_O <= {(APERWIDTH) {1'b0}}; //default address 0 is selected + AHB_ASYNC_READ_EN_O <= 1'b0; + AHB_ASYNC_WRITE_EN_O <= 1'b0; + AHB_ASYNC_BYTE_STROBE_O <= 4'b0; - AHB_ASYNC_STB_TOGGLE_O <= 1'b0; + AHB_ASYNC_STB_TOGGLE_O <= 1'b0; - fabric_async_ack_toggle_i_1ff <= 1'b0; - fabric_async_ack_toggle_i_2ff <= 1'b0; - fabric_async_ack_toggle_i_3ff <= 1'b0; + fabric_async_ack_toggle_i_1ff <= 1'b0; + fabric_async_ack_toggle_i_2ff <= 1'b0; + fabric_async_ack_toggle_i_3ff <= 1'b0; - A2F_HREADYOUTS <= 1'b0; - end - else - begin - ahb_to_fabric_state <= ahb_to_fabric_state_nxt; + A2F_HREADYOUTS <= 1'b0; + end else begin + ahb_to_fabric_state <= ahb_to_fabric_state_nxt; - if (trans_req) - begin - AHB_ASYNC_ADDR_O <= A2F_HADDRS[APERWIDTH-1:0]; - AHB_ASYNC_READ_EN_O <= ~A2F_HWRITES ; - AHB_ASYNC_WRITE_EN_O <= A2F_HWRITES ; - AHB_ASYNC_BYTE_STROBE_O <= AHB_ASYNC_BYTE_STROBE_O_nxt; - end + if (trans_req) begin + AHB_ASYNC_ADDR_O <= A2F_HADDRS[APERWIDTH-1:0]; + AHB_ASYNC_READ_EN_O <= ~A2F_HWRITES; + AHB_ASYNC_WRITE_EN_O <= A2F_HWRITES; + AHB_ASYNC_BYTE_STROBE_O <= AHB_ASYNC_BYTE_STROBE_O_nxt; + end - AHB_ASYNC_STB_TOGGLE_O <= AHB_ASYNC_STB_TOGGLE_O_nxt; + AHB_ASYNC_STB_TOGGLE_O <= AHB_ASYNC_STB_TOGGLE_O_nxt; - fabric_async_ack_toggle_i_1ff <= FABRIC_ASYNC_ACK_TOGGLE_I; - fabric_async_ack_toggle_i_2ff <= fabric_async_ack_toggle_i_1ff; - fabric_async_ack_toggle_i_3ff <= fabric_async_ack_toggle_i_2ff; + fabric_async_ack_toggle_i_1ff <= FABRIC_ASYNC_ACK_TOGGLE_I; + fabric_async_ack_toggle_i_2ff <= fabric_async_ack_toggle_i_1ff; + fabric_async_ack_toggle_i_3ff <= fabric_async_ack_toggle_i_2ff; - A2F_HREADYOUTS <= A2F_HREADYOUTS_nxt; - end + A2F_HREADYOUTS <= A2F_HREADYOUTS_nxt; end - - - // Byte Strobe Signal Decode - // - // Note: The "Transfer Size Encoding" is defined as follows: - // - // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description - // -------- -------- -------- ---- ----------- - // 0 0 0 8 Byte - // 0 0 1 16 Halfword - // 0 1 0 32 Word - // 0 1 1 64 Doublword - // 1 0 0 128 4-word line - // 1 0 1 256 8-word line - // 1 1 0 512 - - // 1 1 1 1024 - - // - // The fabric design only supports up to 32 bits at a time. - // - always @(A2F_HSIZES or A2F_HADDRS) - begin - case(A2F_HSIZES) - 3'b000: //byte - begin - case(A2F_HADDRS[1:0]) - 2'b00: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0001; - 2'b01: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0010; - 2'b10: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0100; - 2'b11: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b1000; - default: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0000; - endcase - end - 3'b001: //half word + end + + + // Byte Strobe Signal Decode + // + // Note: The "Transfer Size Encoding" is defined as follows: + // + // HSIZE[2] HSIZE[1] HSIZE[0] Bits Description + // -------- -------- -------- ---- ----------- + // 0 0 0 8 Byte + // 0 0 1 16 Halfword + // 0 1 0 32 Word + // 0 1 1 64 Doublword + // 1 0 0 128 4-word line + // 1 0 1 256 8-word line + // 1 1 0 512 - + // 1 1 1 1024 - + // + // The fabric design only supports up to 32 bits at a time. + // + always @(A2F_HSIZES or A2F_HADDRS) begin + case (A2F_HSIZES) + 3'b000: //byte begin - case(A2F_HADDRS[1]) - 1'b0: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0011; - 1'b1: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b1100; - default: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0000; - endcase - end - default: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b1111; // default 32 bits, word + case (A2F_HADDRS[1:0]) + 2'b00: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0001; + 2'b01: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0010; + 2'b10: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0100; + 2'b11: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b1000; + default: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0000; endcase - end - - - // Define the AHB Interface Statemachine - // - always @( - trans_req or - fabric_async_ack or - AHB_ASYNC_STB_TOGGLE_O or - ahb_to_fabric_state - ) - begin - case(ahb_to_fabric_state) - AHB_ASYNC_IDLE: + end + 3'b001: //half word begin - case(trans_req) - 1'b0: // Wait for an AHB Transfer + case (A2F_HADDRS[1]) + 1'b0: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0011; + 1'b1: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b1100; + default: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b0000; + endcase + end + default: AHB_ASYNC_BYTE_STROBE_O_nxt <= 4'b1111; // default 32 bits, word + endcase + end + + + // Define the AHB Interface Statemachine + // + always @(trans_req or fabric_async_ack or AHB_ASYNC_STB_TOGGLE_O or ahb_to_fabric_state) begin + case (ahb_to_fabric_state) + AHB_ASYNC_IDLE: begin + case (trans_req) + 1'b0: // Wait for an AHB Transfer begin - ahb_to_fabric_state_nxt <= AHB_ASYNC_IDLE; - A2F_HREADYOUTS_nxt <= 1'b1; - AHB_ASYNC_STB_TOGGLE_O_nxt <= AHB_ASYNC_STB_TOGGLE_O; - end - 1'b1: // AHB Transfer Detected + ahb_to_fabric_state_nxt <= AHB_ASYNC_IDLE; + A2F_HREADYOUTS_nxt <= 1'b1; + AHB_ASYNC_STB_TOGGLE_O_nxt <= AHB_ASYNC_STB_TOGGLE_O; + end + 1'b1: // AHB Transfer Detected begin - ahb_to_fabric_state_nxt <= AHB_ASYNC_WAIT; - A2F_HREADYOUTS_nxt <= 1'b0; - AHB_ASYNC_STB_TOGGLE_O_nxt <= ~AHB_ASYNC_STB_TOGGLE_O; - end - endcase - end - AHB_ASYNC_WAIT: - begin - AHB_ASYNC_STB_TOGGLE_O_nxt <= AHB_ASYNC_STB_TOGGLE_O; + ahb_to_fabric_state_nxt <= AHB_ASYNC_WAIT; + A2F_HREADYOUTS_nxt <= 1'b0; + AHB_ASYNC_STB_TOGGLE_O_nxt <= ~AHB_ASYNC_STB_TOGGLE_O; + end + endcase + end + AHB_ASYNC_WAIT: begin + AHB_ASYNC_STB_TOGGLE_O_nxt <= AHB_ASYNC_STB_TOGGLE_O; - case(fabric_async_ack) - 1'b0: // Wait for Acknowledge from Fabric Interface + case (fabric_async_ack) + 1'b0: // Wait for Acknowledge from Fabric Interface begin - ahb_to_fabric_state_nxt <= AHB_ASYNC_WAIT; - A2F_HREADYOUTS_nxt <= 1'b0; - end - 1'b1: // Received Acknowledge from Fabric Interface + ahb_to_fabric_state_nxt <= AHB_ASYNC_WAIT; + A2F_HREADYOUTS_nxt <= 1'b0; + end + 1'b1: // Received Acknowledge from Fabric Interface begin - ahb_to_fabric_state_nxt <= AHB_ASYNC_IDLE; - A2F_HREADYOUTS_nxt <= 1'b1; - end - endcase - end - default: - begin - ahb_to_fabric_state_nxt <= AHB_ASYNC_IDLE; - A2F_HREADYOUTS_nxt <= 1'b0; - AHB_ASYNC_STB_TOGGLE_O_nxt <= AHB_ASYNC_STB_TOGGLE_O; - end + ahb_to_fabric_state_nxt <= AHB_ASYNC_IDLE; + A2F_HREADYOUTS_nxt <= 1'b1; + end endcase - end - + end + default: begin + ahb_to_fabric_state_nxt <= AHB_ASYNC_IDLE; + A2F_HREADYOUTS_nxt <= 1'b0; + AHB_ASYNC_STB_TOGGLE_O_nxt <= AHB_ASYNC_STB_TOGGLE_O; + end + endcase + end + endmodule `timescale 1ns / 10ps module fb2ahb_asynbrig_if ( - A2F_HRDATAS, + A2F_HRDATAS, - // AHB Interface - // - AHB_ASYNC_READ_EN_I, - AHB_ASYNC_WRITE_EN_I, - AHB_ASYNC_BYTE_STROBE_I, + // AHB Interface + // + AHB_ASYNC_READ_EN_I, + AHB_ASYNC_WRITE_EN_I, + AHB_ASYNC_BYTE_STROBE_I, - AHB_ASYNC_STB_TOGGLE_I, + AHB_ASYNC_STB_TOGGLE_I, - // Fabric Interface - // - WB_CLK_I, - WB_RST_I, - WB_ACK_I, - WB_DAT_I, - - WB_CYC_O, - WB_BYTE_STB_O, - WB_WE_O, - WB_RD_O, - WB_STB_O, + // Fabric Interface + // + WB_CLK_I, + WB_RST_I, + WB_ACK_I, + WB_DAT_I, - FABRIC_ASYNC_ACK_TOGGLE_O + WB_CYC_O, + WB_BYTE_STB_O, + WB_WE_O, + WB_RD_O, + WB_STB_O, - ); + FABRIC_ASYNC_ACK_TOGGLE_O +); - //-----Port Parameters----------------- - // - parameter DATAWIDTH = 32; + //-----Port Parameters----------------- + // - parameter STATE_WIDTH = 1; + parameter DATAWIDTH = 32; - parameter FAB_ASYNC_IDLE = 0; - parameter FAB_ASYNC_WAIT = 1; + parameter STATE_WIDTH = 1; + parameter FAB_ASYNC_IDLE = 0; + parameter FAB_ASYNC_WAIT = 1; - //-----Port Signals-------------------- - // + //-----Port Signals-------------------- + // - //------------------------------------------ - // AHB connection to master - // - output [DATAWIDTH-1:0] A2F_HRDATAS; + //------------------------------------------ + // AHB connection to master + // + output [DATAWIDTH-1:0] A2F_HRDATAS; - //------------------------------------------ - // Fabric Interface - // - input AHB_ASYNC_READ_EN_I; - input AHB_ASYNC_WRITE_EN_I; - input [3:0] AHB_ASYNC_BYTE_STROBE_I; - input AHB_ASYNC_STB_TOGGLE_I; + //------------------------------------------ + // Fabric Interface + // + input AHB_ASYNC_READ_EN_I; + input AHB_ASYNC_WRITE_EN_I; + input [3:0] AHB_ASYNC_BYTE_STROBE_I; + input AHB_ASYNC_STB_TOGGLE_I; - input WB_CLK_I; - input WB_RST_I; - input WB_ACK_I; - input [DATAWIDTH-1:0] WB_DAT_I; - - output WB_CYC_O; - output [3:0] WB_BYTE_STB_O; - output WB_WE_O; - output WB_RD_O; - output WB_STB_O; - output FABRIC_ASYNC_ACK_TOGGLE_O; + input WB_CLK_I; + input WB_RST_I; + input WB_ACK_I; + input [DATAWIDTH-1:0] WB_DAT_I; + output WB_CYC_O; + output [3:0] WB_BYTE_STB_O; + output WB_WE_O; + output WB_RD_O; + output WB_STB_O; - //------------------------------------------ - // AHB connection to master - // + output FABRIC_ASYNC_ACK_TOGGLE_O; - reg [DATAWIDTH-1:0] A2F_HRDATAS; - reg [DATAWIDTH-1:0] A2F_HRDATAS_nxt; + //------------------------------------------ + // AHB connection to master + // - //------------------------------------------ - // Fabric Interface - // - wire AHB_ASYNC_READ_EN_I; - wire AHB_ASYNC_WRITE_EN_I; + reg [ DATAWIDTH-1:0] A2F_HRDATAS; + reg [ DATAWIDTH-1:0] A2F_HRDATAS_nxt; - wire [3:0] AHB_ASYNC_BYTE_STROBE_I; - wire AHB_ASYNC_STB_TOGGLE_I; + //------------------------------------------ + // Fabric Interface + // + wire AHB_ASYNC_READ_EN_I; + wire AHB_ASYNC_WRITE_EN_I; + wire [ 3:0] AHB_ASYNC_BYTE_STROBE_I; - wire WB_CLK_I; - wire WB_RST_I; - wire WB_ACK_I; - - reg WB_CYC_O; - reg WB_CYC_O_nxt; + wire AHB_ASYNC_STB_TOGGLE_I; - reg [3:0] WB_BYTE_STB_O; - reg [3:0] WB_BYTE_STB_O_nxt; - reg WB_WE_O; - reg WB_WE_O_nxt; + wire WB_CLK_I; + wire WB_RST_I; + wire WB_ACK_I; - reg WB_RD_O; - reg WB_RD_O_nxt; + reg WB_CYC_O; + reg WB_CYC_O_nxt; - reg WB_STB_O; - reg WB_STB_O_nxt; + reg [ 3:0] WB_BYTE_STB_O; + reg [ 3:0] WB_BYTE_STB_O_nxt; - reg FABRIC_ASYNC_ACK_TOGGLE_O; - reg FABRIC_ASYNC_ACK_TOGGLE_O_nxt; + reg WB_WE_O; + reg WB_WE_O_nxt; + reg WB_RD_O; + reg WB_RD_O_nxt; - //------Define Parameters--------- - // + reg WB_STB_O; + reg WB_STB_O_nxt; - // - // None at this time - // + reg FABRIC_ASYNC_ACK_TOGGLE_O; + reg FABRIC_ASYNC_ACK_TOGGLE_O_nxt; - - //-----Internal Signals-------------------- - // - reg [STATE_WIDTH-1:0] fabric_to_ahb_state; - reg [STATE_WIDTH-1:0] fabric_to_ahb_state_nxt; + //------Define Parameters--------- + // - reg ahb_async_stb_toggle_i_1ff; - reg ahb_async_stb_toggle_i_2ff; - reg ahb_async_stb_toggle_i_3ff; + // + // None at this time + // - wire ahb_async_stb; + //-----Internal Signals-------------------- + // - //------Logic Operations---------- - // + reg [STATE_WIDTH-1:0] fabric_to_ahb_state; + reg [STATE_WIDTH-1:0] fabric_to_ahb_state_nxt; + reg ahb_async_stb_toggle_i_1ff; + reg ahb_async_stb_toggle_i_2ff; + reg ahb_async_stb_toggle_i_3ff; - // Check for transfer from the AHB - // - // Note: The AHB is on a different and potentially asynchronous clock. - // Therefore, strobe is passed as a toggle signal. - // - assign ahb_async_stb = ahb_async_stb_toggle_i_2ff ^ ahb_async_stb_toggle_i_3ff; + wire ahb_async_stb; - // Address signal registering, to make the address and data active at the same cycle - // - always @(posedge WB_CLK_I or posedge WB_RST_I) - begin - if (WB_RST_I) - begin - fabric_to_ahb_state <= FAB_ASYNC_IDLE; + //------Logic Operations---------- + // - A2F_HRDATAS <= {(DATAWIDTH){1'b0}}; - WB_CYC_O <= 1'b0; - WB_BYTE_STB_O <= 4'b0; - WB_WE_O <= 1'b0; - WB_RD_O <= 1'b0; - WB_STB_O <= 1'b0; + // Check for transfer from the AHB + // + // Note: The AHB is on a different and potentially asynchronous clock. + // Therefore, strobe is passed as a toggle signal. + // + assign ahb_async_stb = ahb_async_stb_toggle_i_2ff ^ ahb_async_stb_toggle_i_3ff; - FABRIC_ASYNC_ACK_TOGGLE_O <= 1'b0; - ahb_async_stb_toggle_i_1ff <= 1'b0; - ahb_async_stb_toggle_i_2ff <= 1'b0; - ahb_async_stb_toggle_i_3ff <= 1'b0; + // Address signal registering, to make the address and data active at the same cycle + // + always @(posedge WB_CLK_I or posedge WB_RST_I) begin + if (WB_RST_I) begin + fabric_to_ahb_state <= FAB_ASYNC_IDLE; - end - else - begin + A2F_HRDATAS <= {(DATAWIDTH) {1'b0}}; + + WB_CYC_O <= 1'b0; + WB_BYTE_STB_O <= 4'b0; + WB_WE_O <= 1'b0; + WB_RD_O <= 1'b0; + WB_STB_O <= 1'b0; + + FABRIC_ASYNC_ACK_TOGGLE_O <= 1'b0; + + ahb_async_stb_toggle_i_1ff <= 1'b0; + ahb_async_stb_toggle_i_2ff <= 1'b0; + ahb_async_stb_toggle_i_3ff <= 1'b0; + + end else begin - fabric_to_ahb_state <= fabric_to_ahb_state_nxt; + fabric_to_ahb_state <= fabric_to_ahb_state_nxt; - A2F_HRDATAS <= A2F_HRDATAS_nxt; + A2F_HRDATAS <= A2F_HRDATAS_nxt; - WB_CYC_O <= WB_CYC_O_nxt; - WB_BYTE_STB_O <= WB_BYTE_STB_O_nxt; - WB_WE_O <= WB_WE_O_nxt; - WB_RD_O <= WB_RD_O_nxt; - WB_STB_O <= WB_STB_O_nxt; + WB_CYC_O <= WB_CYC_O_nxt; + WB_BYTE_STB_O <= WB_BYTE_STB_O_nxt; + WB_WE_O <= WB_WE_O_nxt; + WB_RD_O <= WB_RD_O_nxt; + WB_STB_O <= WB_STB_O_nxt; - FABRIC_ASYNC_ACK_TOGGLE_O <= FABRIC_ASYNC_ACK_TOGGLE_O_nxt; + FABRIC_ASYNC_ACK_TOGGLE_O <= FABRIC_ASYNC_ACK_TOGGLE_O_nxt; - ahb_async_stb_toggle_i_1ff <= AHB_ASYNC_STB_TOGGLE_I; - ahb_async_stb_toggle_i_2ff <= ahb_async_stb_toggle_i_1ff; - ahb_async_stb_toggle_i_3ff <= ahb_async_stb_toggle_i_2ff; + ahb_async_stb_toggle_i_1ff <= AHB_ASYNC_STB_TOGGLE_I; + ahb_async_stb_toggle_i_2ff <= ahb_async_stb_toggle_i_1ff; + ahb_async_stb_toggle_i_3ff <= ahb_async_stb_toggle_i_2ff; - end end + end - // Define the Fabric Interface Statemachine - // - always @( + // Define the Fabric Interface Statemachine + // + always @( ahb_async_stb or AHB_ASYNC_READ_EN_I or AHB_ASYNC_WRITE_EN_I or @@ -1384,1133 +1359,1126 @@ module fb2ahb_asynbrig_if ( fabric_to_ahb_state ) begin - case(fabric_to_ahb_state) - FAB_ASYNC_IDLE: - begin - FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= FABRIC_ASYNC_ACK_TOGGLE_O; - A2F_HRDATAS_nxt <= A2F_HRDATAS; + case (fabric_to_ahb_state) + FAB_ASYNC_IDLE: begin + FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= FABRIC_ASYNC_ACK_TOGGLE_O; + A2F_HRDATAS_nxt <= A2F_HRDATAS; - case(ahb_async_stb) - 1'b0: // Wait for an AHB Transfer + case (ahb_async_stb) + 1'b0: // Wait for an AHB Transfer begin - fabric_to_ahb_state_nxt <= FAB_ASYNC_IDLE; + fabric_to_ahb_state_nxt <= FAB_ASYNC_IDLE; - WB_CYC_O_nxt <= 1'b0; - WB_BYTE_STB_O_nxt <= 4'b0; - WB_WE_O_nxt <= 1'b0; - WB_RD_O_nxt <= 1'b0; - WB_STB_O_nxt <= 1'b0; + WB_CYC_O_nxt <= 1'b0; + WB_BYTE_STB_O_nxt <= 4'b0; + WB_WE_O_nxt <= 1'b0; + WB_RD_O_nxt <= 1'b0; + WB_STB_O_nxt <= 1'b0; - end - 1'b1: // AHB Transfer Detected + end + 1'b1: // AHB Transfer Detected begin - fabric_to_ahb_state_nxt <= FAB_ASYNC_WAIT; - - WB_CYC_O_nxt <= 1'b1; - WB_BYTE_STB_O_nxt <= AHB_ASYNC_BYTE_STROBE_I; - WB_WE_O_nxt <= AHB_ASYNC_WRITE_EN_I; - WB_RD_O_nxt <= AHB_ASYNC_READ_EN_I; - WB_STB_O_nxt <= 1'b1; - - end - endcase - end - FAB_ASYNC_WAIT: - begin + fabric_to_ahb_state_nxt <= FAB_ASYNC_WAIT; + + WB_CYC_O_nxt <= 1'b1; + WB_BYTE_STB_O_nxt <= AHB_ASYNC_BYTE_STROBE_I; + WB_WE_O_nxt <= AHB_ASYNC_WRITE_EN_I; + WB_RD_O_nxt <= AHB_ASYNC_READ_EN_I; + WB_STB_O_nxt <= 1'b1; + + end + endcase + end + FAB_ASYNC_WAIT: begin - case(WB_ACK_I) - 1'b0: // Wait for Acknowledge from Fabric Interface + case (WB_ACK_I) + 1'b0: // Wait for Acknowledge from Fabric Interface begin - fabric_to_ahb_state_nxt <= FAB_ASYNC_WAIT; + fabric_to_ahb_state_nxt <= FAB_ASYNC_WAIT; - A2F_HRDATAS_nxt <= A2F_HRDATAS; + A2F_HRDATAS_nxt <= A2F_HRDATAS; - WB_CYC_O_nxt <= WB_CYC_O; - WB_BYTE_STB_O_nxt <= WB_BYTE_STB_O; - WB_WE_O_nxt <= WB_WE_O; - WB_RD_O_nxt <= WB_RD_O; - WB_STB_O_nxt <= WB_STB_O; + WB_CYC_O_nxt <= WB_CYC_O; + WB_BYTE_STB_O_nxt <= WB_BYTE_STB_O; + WB_WE_O_nxt <= WB_WE_O; + WB_RD_O_nxt <= WB_RD_O; + WB_STB_O_nxt <= WB_STB_O; - FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= FABRIC_ASYNC_ACK_TOGGLE_O; - end - 1'b1: // Received Acknowledge from Fabric Interface + FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= FABRIC_ASYNC_ACK_TOGGLE_O; + end + 1'b1: // Received Acknowledge from Fabric Interface begin - fabric_to_ahb_state_nxt <= FAB_ASYNC_IDLE; + fabric_to_ahb_state_nxt <= FAB_ASYNC_IDLE; - A2F_HRDATAS_nxt <= WB_DAT_I; + A2F_HRDATAS_nxt <= WB_DAT_I; - WB_CYC_O_nxt <= 1'b0; - WB_BYTE_STB_O_nxt <= 4'b0; - WB_WE_O_nxt <= 1'b0; - WB_RD_O_nxt <= 1'b0; - WB_STB_O_nxt <= 1'b0; + WB_CYC_O_nxt <= 1'b0; + WB_BYTE_STB_O_nxt <= 4'b0; + WB_WE_O_nxt <= 1'b0; + WB_RD_O_nxt <= 1'b0; + WB_STB_O_nxt <= 1'b0; - FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= ~FABRIC_ASYNC_ACK_TOGGLE_O; - end - endcase - end - default: - begin - fabric_to_ahb_state_nxt <= FAB_ASYNC_IDLE; + FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= ~FABRIC_ASYNC_ACK_TOGGLE_O; + end + endcase + end + default: begin + fabric_to_ahb_state_nxt <= FAB_ASYNC_IDLE; - A2F_HRDATAS_nxt <= A2F_HRDATAS; + A2F_HRDATAS_nxt <= A2F_HRDATAS; - WB_CYC_O_nxt <= 1'b0; - WB_BYTE_STB_O_nxt <= 4'b0; - WB_WE_O_nxt <= 1'b0; - WB_RD_O_nxt <= 1'b0; - WB_STB_O_nxt <= 1'b0; + WB_CYC_O_nxt <= 1'b0; + WB_BYTE_STB_O_nxt <= 4'b0; + WB_WE_O_nxt <= 1'b0; + WB_RD_O_nxt <= 1'b0; + WB_STB_O_nxt <= 1'b0; + + FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= FABRIC_ASYNC_ACK_TOGGLE_O; + end + endcase + end - FABRIC_ASYNC_ACK_TOGGLE_O_nxt <= FABRIC_ASYNC_ACK_TOGGLE_O; - end - endcase - end - endmodule `timescale 1ns / 10ps module ahb2fb_asynbrig ( - // AHB Slave Interface to AHB Bus Matrix - // - A2F_HCLK, - A2F_HRESET, - - A2F_HADDRS, - A2F_HSEL, - A2F_HTRANSS, - A2F_HSIZES, - A2F_HWRITES, - A2F_HREADYS, - A2F_HWDATAS, - - A2F_HREADYOUTS, - A2F_HRESPS, - A2F_HRDATAS, - - // Fabric Wishbone Bus - // - WB_CLK_I, - WB_RST_I, - WB_DAT_I, - WB_ACK_I, - - WB_ADR_O, - WB_CYC_O, - WB_BYTE_STB_O, - WB_WE_O, - WB_RD_O, - WB_STB_O, - WB_DAT_O - - ); - - - //-----Port Parameters----------------- + // AHB Slave Interface to AHB Bus Matrix // + A2F_HCLK, + A2F_HRESET, - parameter ADDRWIDTH = 32; - parameter DATAWIDTH = 32; - parameter APERWIDTH = 17; + A2F_HADDRS, + A2F_HSEL, + A2F_HTRANSS, + A2F_HSIZES, + A2F_HWRITES, + A2F_HREADYS, + A2F_HWDATAS, + A2F_HREADYOUTS, + A2F_HRESPS, + A2F_HRDATAS, - //-----Port Signals-------------------- + // Fabric Wishbone Bus // + WB_CLK_I, + WB_RST_I, + WB_DAT_I, + WB_ACK_I, - input A2F_HCLK; // Clock - input A2F_HRESET; // Reset + WB_ADR_O, + WB_CYC_O, + WB_BYTE_STB_O, + WB_WE_O, + WB_RD_O, + WB_STB_O, + WB_DAT_O - // AHB connection to master - // - input [ADDRWIDTH-1:0] A2F_HADDRS; - input A2F_HSEL; - input [1:0] A2F_HTRANSS; - input [2:0] A2F_HSIZES; - input A2F_HWRITES; - input A2F_HREADYS; - input [DATAWIDTH-1:0] A2F_HWDATAS; - - output A2F_HREADYOUTS; - output A2F_HRESPS; - output [DATAWIDTH-1:0] A2F_HRDATAS; - - // Wishbone connection to Fabric IP - // - input WB_CLK_I; // Fabric Clock Input from Fabric - input WB_RST_I; // Fabric Reset Input from Fabric - input [DATAWIDTH-1:0] WB_DAT_I; // Read Data Bus from Fabric - input WB_ACK_I; // Transfer Cycle Acknowledge from Fabric - - output [APERWIDTH-1:0] WB_ADR_O; // Address Bus to Fabric - output WB_CYC_O; // Cycle Chip Select to Fabric - output [3:0] WB_BYTE_STB_O; // Byte Select to Fabric - output WB_WE_O; // Write Enable to Fabric - output WB_RD_O; // Read Enable to Fabric - output WB_STB_O; // Strobe Signal to Fabric - output [DATAWIDTH-1:0] WB_DAT_O; // Write Data Bus to Fabric - - - wire A2F_HCLK; // Clock - wire A2F_HRESET; // Reset +); - // AHB connection to master - // - wire [ADDRWIDTH-1:0] A2F_HADDRS; - wire A2F_HSEL; - wire [1:0] A2F_HTRANSS; - wire [2:0] A2F_HSIZES; - wire A2F_HWRITES; - wire A2F_HREADYS; - wire [DATAWIDTH-1:0] A2F_HWDATAS; - wire A2F_HREADYOUTS; - wire A2F_HRESPS; - wire [DATAWIDTH-1:0] A2F_HRDATAS; + //-----Port Parameters----------------- + // + parameter ADDRWIDTH = 32; + parameter DATAWIDTH = 32; + parameter APERWIDTH = 17; - // Wishbone connection to Fabric IP - // - wire WB_CLK_I; // Fabric Clock Input from Fabric - wire WB_RST_I; // Fabric Reset Input from Fabric - wire [DATAWIDTH-1:0] WB_DAT_I; // Read Data Bus from Fabric - wire WB_ACK_I; // Transfer Cycle Acknowledge from Fabric - - wire [APERWIDTH-1:0] WB_ADR_O; // Address Bus (128KB) to Fabric - wire WB_CYC_O; // Cycle Chip Select to Fabric - wire [3:0] WB_BYTE_STB_O; // Byte Select to Fabric - wire WB_WE_O; // Write Enable to Fabric - wire WB_RD_O; // Read Enable to Fabric - wire WB_STB_O; // Strobe Signal to Fabric - wire [DATAWIDTH-1:0] WB_DAT_O; // Write Data Bus to Fabric - - - - //------Define Parameters--------- - // - // - // None at this time - // + //-----Port Signals-------------------- + // - - //-----Internal Signals-------------------- - // + input A2F_HCLK; // Clock + input A2F_HRESET; // Reset - // Register module interface signals - wire [APERWIDTH-1:0] ahb_async_addr; - wire ahb_async_read_en; - wire ahb_async_write_en; - wire [3:0] ahb_async_byte_strobe; + // AHB connection to master + // + input [ADDRWIDTH-1:0] A2F_HADDRS; + input A2F_HSEL; + input [1:0] A2F_HTRANSS; + input [2:0] A2F_HSIZES; + input A2F_HWRITES; + input A2F_HREADYS; + input [DATAWIDTH-1:0] A2F_HWDATAS; - wire ahb_async_stb_toggle; + output A2F_HREADYOUTS; + output A2F_HRESPS; + output [DATAWIDTH-1:0] A2F_HRDATAS; - wire fabric_async_ack_toggle; + // Wishbone connection to Fabric IP + // + input WB_CLK_I; // Fabric Clock Input from Fabric + input WB_RST_I; // Fabric Reset Input from Fabric + input [DATAWIDTH-1:0] WB_DAT_I; // Read Data Bus from Fabric + input WB_ACK_I; // Transfer Cycle Acknowledge from Fabric + output [APERWIDTH-1:0] WB_ADR_O; // Address Bus to Fabric + output WB_CYC_O; // Cycle Chip Select to Fabric + output [3:0] WB_BYTE_STB_O; // Byte Select to Fabric + output WB_WE_O; // Write Enable to Fabric + output WB_RD_O; // Read Enable to Fabric + output WB_STB_O; // Strobe Signal to Fabric + output [DATAWIDTH-1:0] WB_DAT_O; // Write Data Bus to Fabric - //------Logic Operations---------- - // - // Define the data input from the AHB and output to the fabric - // - // Note: Due to the nature of the bus timing, there is no need to register - // this value locally. - // - assign WB_DAT_O = A2F_HWDATAS; + wire A2F_HCLK; // Clock + wire A2F_HRESET; // Reset - // Define the Address bus output from the AHB and output to the fabric - // - // Note: Due to the nature of the bus timing, there is no need to register - // this value locally. - // - assign WB_ADR_O = ahb_async_addr; + // AHB connection to master + // + wire [ADDRWIDTH-1:0] A2F_HADDRS; + wire A2F_HSEL; + wire [ 1:0] A2F_HTRANSS; + wire [ 2:0] A2F_HSIZES; + wire A2F_HWRITES; + wire A2F_HREADYS; + wire [DATAWIDTH-1:0] A2F_HWDATAS; + wire A2F_HREADYOUTS; + wire A2F_HRESPS; + wire [DATAWIDTH-1:0] A2F_HRDATAS; - //------Instantiate Modules---------------- - // - // Interface block to convert AHB transfers to simple read/write - // controls. - ahb2fb_asynbrig_if - #( + // Wishbone connection to Fabric IP + // + wire WB_CLK_I; // Fabric Clock Input from Fabric + wire WB_RST_I; // Fabric Reset Input from Fabric + wire [DATAWIDTH-1:0] WB_DAT_I; // Read Data Bus from Fabric + wire WB_ACK_I; // Transfer Cycle Acknowledge from Fabric - .DATAWIDTH ( DATAWIDTH ), - .APERWIDTH ( APERWIDTH ) + wire [APERWIDTH-1:0] WB_ADR_O; // Address Bus (128KB) to Fabric + wire WB_CYC_O; // Cycle Chip Select to Fabric + wire [ 3:0] WB_BYTE_STB_O; // Byte Select to Fabric + wire WB_WE_O; // Write Enable to Fabric + wire WB_RD_O; // Read Enable to Fabric + wire WB_STB_O; // Strobe Signal to Fabric + wire [DATAWIDTH-1:0] WB_DAT_O; // Write Data Bus to Fabric - ) - u_FFE_ahb_to_fabric_async_bridge_interface - ( - .A2F_HCLK ( A2F_HCLK ), - .A2F_HRESET ( A2F_HRESET ), - // Input slave port: 32 bit data bus interface - .A2F_HSEL ( A2F_HSEL ), - .A2F_HADDRS ( A2F_HADDRS[APERWIDTH-1:0] ), - .A2F_HTRANSS ( A2F_HTRANSS ), - .A2F_HSIZES ( A2F_HSIZES ), - .A2F_HWRITES ( A2F_HWRITES ), - .A2F_HREADYS ( A2F_HREADYS ), - .A2F_HREADYOUTS ( A2F_HREADYOUTS ), - .A2F_HRESPS ( A2F_HRESPS ), + //------Define Parameters--------- + // - // Register interface - .AHB_ASYNC_ADDR_O ( ahb_async_addr ), - .AHB_ASYNC_READ_EN_O ( ahb_async_read_en ), - .AHB_ASYNC_WRITE_EN_O ( ahb_async_write_en ), - .AHB_ASYNC_BYTE_STROBE_O ( ahb_async_byte_strobe ), - .AHB_ASYNC_STB_TOGGLE_O ( ahb_async_stb_toggle ), + // + // None at this time + // - .FABRIC_ASYNC_ACK_TOGGLE_I (fabric_async_ack_toggle ) - ); + //-----Internal Signals-------------------- + // + // Register module interface signals + wire [APERWIDTH-1:0] ahb_async_addr; + wire ahb_async_read_en; + wire ahb_async_write_en; + wire [ 3:0] ahb_async_byte_strobe; - fb2ahb_asynbrig_if -// #( -// ) + wire ahb_async_stb_toggle; - u_FFE_fabric_to_ahb_async_bridge_interface - ( - .A2F_HRDATAS ( A2F_HRDATAS ), + wire fabric_async_ack_toggle; - .AHB_ASYNC_READ_EN_I ( ahb_async_read_en ), - .AHB_ASYNC_WRITE_EN_I ( ahb_async_write_en ), - .AHB_ASYNC_BYTE_STROBE_I ( ahb_async_byte_strobe ), - .AHB_ASYNC_STB_TOGGLE_I ( ahb_async_stb_toggle ), - .WB_CLK_I ( WB_CLK_I ), // Fabric Clock Input from Fabric - .WB_RST_I ( WB_RST_I ), // Fabric Reset Input from Fabric - .WB_ACK_I ( WB_ACK_I ), // Transfer Cycle Acknowledge from Fabric - .WB_DAT_I ( WB_DAT_I ), // Data Bus Input from Fabric - - .WB_CYC_O ( WB_CYC_O ), // Cycle Chip Select to Fabric - .WB_BYTE_STB_O ( WB_BYTE_STB_O ), // Byte Select to Fabric - .WB_WE_O ( WB_WE_O ), // Write Enable to Fabric - .WB_RD_O ( WB_RD_O ), // Read Enable to Fabric - .WB_STB_O ( WB_STB_O ), // Strobe Signal to Fabric + //------Logic Operations---------- + // - .FABRIC_ASYNC_ACK_TOGGLE_O (fabric_async_ack_toggle ) + // Define the data input from the AHB and output to the fabric + // + // Note: Due to the nature of the bus timing, there is no need to register + // this value locally. + // + assign WB_DAT_O = A2F_HWDATAS; - ); -endmodule + // Define the Address bus output from the AHB and output to the fabric + // + // Note: Due to the nature of the bus timing, there is no need to register + // this value locally. + // + assign WB_ADR_O = ahb_async_addr; -`timescale 1ns/10ps -module qlal4s3b_cell_macro_bfm ( + //------Instantiate Modules---------------- + // - // AHB-To-Fabric Bridge - // - WBs_ADR, - WBs_CYC, - WBs_BYTE_STB, - WBs_WE, - WBs_RD, - WBs_STB, - WBs_WR_DAT, - WB_CLK, - WB_RST, - WBs_RD_DAT, - WBs_ACK, - // - // SDMA Signals - // - SDMA_Req, - SDMA_Sreq, - SDMA_Done, - SDMA_Active, - // - // FB Interrupts - // - FB_msg_out, - FB_Int_Clr, - FB_Start, - FB_Busy, - // - // FB Clocks - // - Sys_Clk0, - Sys_Clk0_Rst, - Sys_Clk1, - Sys_Clk1_Rst, - // - // Packet FIFO - // - Sys_PKfb_Clk, - Sys_PKfb_Rst, - FB_PKfbData, - FB_PKfbPush, - FB_PKfbSOF, - FB_PKfbEOF, - FB_PKfbOverflow, - // - // Sensor Interface - // - Sensor_Int, - TimeStamp, - // - // SPI Master APB Bus - // - Sys_Pclk, - Sys_Pclk_Rst, - Sys_PSel, - SPIm_Paddr, - SPIm_PEnable, - SPIm_PWrite, - SPIm_PWdata, - SPIm_Prdata, - SPIm_PReady, - SPIm_PSlvErr, - // - // Misc - // - Device_ID, - // - // FBIO Signals - // - FBIO_In, - FBIO_In_En, - FBIO_Out, - FBIO_Out_En, - // - // ??? - // - SFBIO, - Device_ID_6S, - Device_ID_4S, - SPIm_PWdata_26S, - SPIm_PWdata_24S, - SPIm_PWdata_14S, - SPIm_PWdata_11S, - SPIm_PWdata_0S, - SPIm_Paddr_8S, - SPIm_Paddr_6S, - FB_PKfbPush_1S, - FB_PKfbData_31S, - FB_PKfbData_21S, - FB_PKfbData_19S, - FB_PKfbData_9S, - FB_PKfbData_6S, - Sys_PKfb_ClkS, - FB_BusyS, - WB_CLKS - ); -//------Port Parameters---------------- -// + // Interface block to convert AHB transfers to simple read/write + // controls. + ahb2fb_asynbrig_if #( -// -// None at this time -// + .DATAWIDTH(DATAWIDTH), + .APERWIDTH(APERWIDTH) -//------Port Signals------------------- -// + ) u_FFE_ahb_to_fabric_async_bridge_interface ( + .A2F_HCLK (A2F_HCLK), + .A2F_HRESET(A2F_HRESET), - // - // AHB-To-Fabric Bridge - // -output [16:0] WBs_ADR; -output WBs_CYC; -output [3:0] WBs_BYTE_STB; -output WBs_WE; -output WBs_RD; -output WBs_STB; -output [31:0] WBs_WR_DAT; -input WB_CLK; -output WB_RST; -input [31:0] WBs_RD_DAT; -input WBs_ACK; - // - // SDMA Signals - // -input [3:0] SDMA_Req; -input [3:0] SDMA_Sreq; -output [3:0] SDMA_Done; -output [3:0] SDMA_Active; - // - // FB Interrupts - // -input [3:0] FB_msg_out; -input [7:0] FB_Int_Clr; -output FB_Start; -input FB_Busy; - // - // FB Clocks - // -output Sys_Clk0; -output Sys_Clk0_Rst; -output Sys_Clk1; -output Sys_Clk1_Rst; - // - // Packet FIFO - // -input Sys_PKfb_Clk; -output Sys_PKfb_Rst; -input [31:0] FB_PKfbData; -input [3:0] FB_PKfbPush; -input FB_PKfbSOF; -input FB_PKfbEOF; -output FB_PKfbOverflow; - // - // Sensor Interface - // -output [7:0] Sensor_Int; -output [23:0] TimeStamp; - // - // SPI Master APB Bus - // -output Sys_Pclk; -output Sys_Pclk_Rst; -input Sys_PSel; -input [15:0] SPIm_Paddr; -input SPIm_PEnable; -input SPIm_PWrite; -input [31:0] SPIm_PWdata; -output [31:0] SPIm_Prdata; -output SPIm_PReady; -output SPIm_PSlvErr; - // - // Misc - // -input [15:0] Device_ID; - // - // FBIO Signals - // -output [13:0] FBIO_In; -input [13:0] FBIO_In_En; -input [13:0] FBIO_Out; -input [13:0] FBIO_Out_En; - // - // ??? - // -inout [13:0] SFBIO; -input Device_ID_6S; -input Device_ID_4S; -input SPIm_PWdata_26S; -input SPIm_PWdata_24S; -input SPIm_PWdata_14S; -input SPIm_PWdata_11S; -input SPIm_PWdata_0S; -input SPIm_Paddr_8S; -input SPIm_Paddr_6S; -input FB_PKfbPush_1S; -input FB_PKfbData_31S; -input FB_PKfbData_21S; -input FB_PKfbData_19S; -input FB_PKfbData_9S; -input FB_PKfbData_6S; -input Sys_PKfb_ClkS; -input FB_BusyS; -input WB_CLKS; - - -wire [16:0] WBs_ADR; -wire WBs_CYC; -wire [3:0] WBs_BYTE_STB; -wire WBs_WE; -wire WBs_RD; -wire WBs_STB; -wire [31:0] WBs_WR_DAT; -wire WB_CLK; -reg WB_RST; -wire [31:0] WBs_RD_DAT; -wire WBs_ACK; - -wire [3:0] SDMA_Req; -wire [3:0] SDMA_Sreq; -//reg [3:0] SDMA_Done;//SDMA BFM -//reg [3:0] SDMA_Active;//SDMA BFM -wire [3:0] SDMA_Done; -wire [3:0] SDMA_Active; - -wire [3:0] FB_msg_out; -wire [7:0] FB_Int_Clr; -reg FB_Start; -wire FB_Busy; - -wire Sys_Clk0; -reg Sys_Clk0_Rst; -wire Sys_Clk1; -reg Sys_Clk1_Rst; - -wire Sys_PKfb_Clk; -reg Sys_PKfb_Rst; -wire [31:0] FB_PKfbData; -wire [3:0] FB_PKfbPush; -wire FB_PKfbSOF; -wire FB_PKfbEOF; -reg FB_PKfbOverflow; - -reg [7:0] Sensor_Int; -reg [23:0] TimeStamp; - -reg Sys_Pclk; -reg Sys_Pclk_Rst; -wire Sys_PSel; - -wire [15:0] SPIm_Paddr; -wire SPIm_PEnable; -wire SPIm_PWrite; -wire [31:0] SPIm_PWdata; -reg [31:0] SPIm_Prdata; -reg SPIm_PReady; -reg SPIm_PSlvErr; - -wire [15:0] Device_ID; - -reg [13:0] FBIO_In; -wire [13:0] FBIO_In_En; -wire [13:0] FBIO_Out; -wire [13:0] FBIO_Out_En; - -wire [13:0] SFBIO; -wire Device_ID_6S; -wire Device_ID_4S; - -wire SPIm_PWdata_26S; -wire SPIm_PWdata_24S; -wire SPIm_PWdata_14S; -wire SPIm_PWdata_11S; -wire SPIm_PWdata_0S; -wire SPIm_Paddr_8S; -wire SPIm_Paddr_6S; - -wire FB_PKfbPush_1S; -wire FB_PKfbData_31S; -wire FB_PKfbData_21S; -wire FB_PKfbData_19S; -wire FB_PKfbData_9S; -wire FB_PKfbData_6S; -wire Sys_PKfb_ClkS; - -wire FB_BusyS; -wire WB_CLKS; - - -//------Define Parameters-------------- -// + // Input slave port: 32 bit data bus interface + .A2F_HSEL (A2F_HSEL), + .A2F_HADDRS (A2F_HADDRS[APERWIDTH-1:0]), + .A2F_HTRANSS(A2F_HTRANSS), + .A2F_HSIZES (A2F_HSIZES), + .A2F_HWRITES(A2F_HWRITES), + .A2F_HREADYS(A2F_HREADYS), -parameter ADDRWIDTH = 32; -parameter DATAWIDTH = 32; -parameter APERWIDTH = 17; + .A2F_HREADYOUTS(A2F_HREADYOUTS), + .A2F_HRESPS (A2F_HRESPS), -parameter ENABLE_AHB_REG_WR_DEBUG_MSG = 1'b1; -parameter ENABLE_AHB_REG_RD_DEBUG_MSG = 1'b1; + // Register interface + .AHB_ASYNC_ADDR_O (ahb_async_addr), + .AHB_ASYNC_READ_EN_O (ahb_async_read_en), + .AHB_ASYNC_WRITE_EN_O (ahb_async_write_en), + .AHB_ASYNC_BYTE_STROBE_O(ahb_async_byte_strobe), + .AHB_ASYNC_STB_TOGGLE_O (ahb_async_stb_toggle), -parameter T_CYCLE_CLK_SYS_CLK0 = 200;//230;//ACSLIPTEST-230;//100;//180;//(1000.0/(80.0/16)) ; // Default EOS S3B Clock Rate -parameter T_CYCLE_CLK_SYS_CLK1 = 650;//3906;//650;////83.33;//250;//30517;//(1000.0/(80.0/16)) ; // Default EOS S3B Clock Rate -parameter T_CYCLE_CLK_A2F_HCLK = (1000.0/(80.0/12)) ; // Default EOS S3B Clock Rate + .FABRIC_ASYNC_ACK_TOGGLE_I(fabric_async_ack_toggle) -parameter SYS_CLK0_RESET_LOOP = 5;//4.34;//5; -parameter SYS_CLK1_RESET_LOOP = 5; -parameter WB_CLK_RESET_LOOP = 5; -parameter A2F_HCLK_RESET_LOOP = 5; + ); -//------Internal Signals--------------- -// + fb2ahb_asynbrig_if // #( + // ) -integer Sys_Clk0_Reset_Loop_Cnt; -integer Sys_Clk1_Reset_Loop_Cnt; -integer WB_CLK_Reset_Loop_Cnt; -integer A2F_HCLK_Reset_Loop_Cnt; + u_FFE_fabric_to_ahb_async_bridge_interface ( + .A2F_HRDATAS(A2F_HRDATAS), + .AHB_ASYNC_READ_EN_I (ahb_async_read_en), + .AHB_ASYNC_WRITE_EN_I (ahb_async_write_en), + .AHB_ASYNC_BYTE_STROBE_I(ahb_async_byte_strobe), + .AHB_ASYNC_STB_TOGGLE_I (ahb_async_stb_toggle), -wire A2F_HCLK; -reg A2F_HRESET; + .WB_CLK_I(WB_CLK_I), // Fabric Clock Input from Fabric + .WB_RST_I(WB_RST_I), // Fabric Reset Input from Fabric + .WB_ACK_I(WB_ACK_I), // Transfer Cycle Acknowledge from Fabric + .WB_DAT_I(WB_DAT_I), // Data Bus Input from Fabric -wire [31:0] A2F_HADDRS; -wire A2F_HSEL; -wire [1:0] A2F_HTRANSS; -wire [2:0] A2F_HSIZES; -wire A2F_HWRITES; -wire A2F_HREADYS; -wire [31:0] A2F_HWDATAS; + .WB_CYC_O (WB_CYC_O), // Cycle Chip Select to Fabric + .WB_BYTE_STB_O(WB_BYTE_STB_O), // Byte Select to Fabric + .WB_WE_O (WB_WE_O), // Write Enable to Fabric + .WB_RD_O (WB_RD_O), // Read Enable to Fabric + .WB_STB_O (WB_STB_O), // Strobe Signal to Fabric -wire A2F_HREADYOUTS; -wire A2F_HRESPS; -wire [31:0] A2F_HRDATAS; + .FABRIC_ASYNC_ACK_TOGGLE_O(fabric_async_ack_toggle) + ); +endmodule -//------Logic Operations--------------- -// -// Apply Reset to Sys_Clk0 domain -// -initial -begin +`timescale 1ns / 10ps +module qlal4s3b_cell_macro_bfm ( + + // AHB-To-Fabric Bridge + // + WBs_ADR, + WBs_CYC, + WBs_BYTE_STB, + WBs_WE, + WBs_RD, + WBs_STB, + WBs_WR_DAT, + WB_CLK, + WB_RST, + WBs_RD_DAT, + WBs_ACK, + // + // SDMA Signals + // + SDMA_Req, + SDMA_Sreq, + SDMA_Done, + SDMA_Active, + // + // FB Interrupts + // + FB_msg_out, + FB_Int_Clr, + FB_Start, + FB_Busy, + // + // FB Clocks + // + Sys_Clk0, + Sys_Clk0_Rst, + Sys_Clk1, + Sys_Clk1_Rst, + // + // Packet FIFO + // + Sys_PKfb_Clk, + Sys_PKfb_Rst, + FB_PKfbData, + FB_PKfbPush, + FB_PKfbSOF, + FB_PKfbEOF, + FB_PKfbOverflow, + // + // Sensor Interface + // + Sensor_Int, + TimeStamp, + // + // SPI Master APB Bus + // + Sys_Pclk, + Sys_Pclk_Rst, + Sys_PSel, + SPIm_Paddr, + SPIm_PEnable, + SPIm_PWrite, + SPIm_PWdata, + SPIm_Prdata, + SPIm_PReady, + SPIm_PSlvErr, + // + // Misc + // + Device_ID, + // + // FBIO Signals + // + FBIO_In, + FBIO_In_En, + FBIO_Out, + FBIO_Out_En, + // + // ??? + // + SFBIO, + Device_ID_6S, + Device_ID_4S, + SPIm_PWdata_26S, + SPIm_PWdata_24S, + SPIm_PWdata_14S, + SPIm_PWdata_11S, + SPIm_PWdata_0S, + SPIm_Paddr_8S, + SPIm_Paddr_6S, + FB_PKfbPush_1S, + FB_PKfbData_31S, + FB_PKfbData_21S, + FB_PKfbData_19S, + FB_PKfbData_9S, + FB_PKfbData_6S, + Sys_PKfb_ClkS, + FB_BusyS, + WB_CLKS +); + //------Port Parameters---------------- + // + + // + // None at this time + // + + //------Port Signals------------------- + // + + // + // AHB-To-Fabric Bridge + // + output [16:0] WBs_ADR; + output WBs_CYC; + output [3:0] WBs_BYTE_STB; + output WBs_WE; + output WBs_RD; + output WBs_STB; + output [31:0] WBs_WR_DAT; + input WB_CLK; + output WB_RST; + input [31:0] WBs_RD_DAT; + input WBs_ACK; + // + // SDMA Signals + // + input [3:0] SDMA_Req; + input [3:0] SDMA_Sreq; + output [3:0] SDMA_Done; + output [3:0] SDMA_Active; + // + // FB Interrupts + // + input [3:0] FB_msg_out; + input [7:0] FB_Int_Clr; + output FB_Start; + input FB_Busy; + // + // FB Clocks + // + output Sys_Clk0; + output Sys_Clk0_Rst; + output Sys_Clk1; + output Sys_Clk1_Rst; + // + // Packet FIFO + // + input Sys_PKfb_Clk; + output Sys_PKfb_Rst; + input [31:0] FB_PKfbData; + input [3:0] FB_PKfbPush; + input FB_PKfbSOF; + input FB_PKfbEOF; + output FB_PKfbOverflow; + // + // Sensor Interface + // + output [7:0] Sensor_Int; + output [23:0] TimeStamp; + // + // SPI Master APB Bus + // + output Sys_Pclk; + output Sys_Pclk_Rst; + input Sys_PSel; + input [15:0] SPIm_Paddr; + input SPIm_PEnable; + input SPIm_PWrite; + input [31:0] SPIm_PWdata; + output [31:0] SPIm_Prdata; + output SPIm_PReady; + output SPIm_PSlvErr; + // + // Misc + // + input [15:0] Device_ID; + // + // FBIO Signals + // + output [13:0] FBIO_In; + input [13:0] FBIO_In_En; + input [13:0] FBIO_Out; + input [13:0] FBIO_Out_En; + // + // ??? + // + inout [13:0] SFBIO; + input Device_ID_6S; + input Device_ID_4S; + input SPIm_PWdata_26S; + input SPIm_PWdata_24S; + input SPIm_PWdata_14S; + input SPIm_PWdata_11S; + input SPIm_PWdata_0S; + input SPIm_Paddr_8S; + input SPIm_Paddr_6S; + input FB_PKfbPush_1S; + input FB_PKfbData_31S; + input FB_PKfbData_21S; + input FB_PKfbData_19S; + input FB_PKfbData_9S; + input FB_PKfbData_6S; + input Sys_PKfb_ClkS; + input FB_BusyS; + input WB_CLKS; + + + wire [16:0] WBs_ADR; + wire WBs_CYC; + wire [ 3:0] WBs_BYTE_STB; + wire WBs_WE; + wire WBs_RD; + wire WBs_STB; + wire [31:0] WBs_WR_DAT; + wire WB_CLK; + reg WB_RST; + wire [31:0] WBs_RD_DAT; + wire WBs_ACK; + + wire [ 3:0] SDMA_Req; + wire [ 3:0] SDMA_Sreq; + //reg [3:0] SDMA_Done;//SDMA BFM + //reg [3:0] SDMA_Active;//SDMA BFM + wire [ 3:0] SDMA_Done; + wire [ 3:0] SDMA_Active; + + wire [ 3:0] FB_msg_out; + wire [ 7:0] FB_Int_Clr; + reg FB_Start; + wire FB_Busy; + + wire Sys_Clk0; + reg Sys_Clk0_Rst; + wire Sys_Clk1; + reg Sys_Clk1_Rst; + + wire Sys_PKfb_Clk; + reg Sys_PKfb_Rst; + wire [31:0] FB_PKfbData; + wire [ 3:0] FB_PKfbPush; + wire FB_PKfbSOF; + wire FB_PKfbEOF; + reg FB_PKfbOverflow; + + reg [ 7:0] Sensor_Int; + reg [23:0] TimeStamp; + + reg Sys_Pclk; + reg Sys_Pclk_Rst; + wire Sys_PSel; + + wire [15:0] SPIm_Paddr; + wire SPIm_PEnable; + wire SPIm_PWrite; + wire [31:0] SPIm_PWdata; + reg [31:0] SPIm_Prdata; + reg SPIm_PReady; + reg SPIm_PSlvErr; + + wire [15:0] Device_ID; + + reg [13:0] FBIO_In; + wire [13:0] FBIO_In_En; + wire [13:0] FBIO_Out; + wire [13:0] FBIO_Out_En; + + wire [13:0] SFBIO; + wire Device_ID_6S; + wire Device_ID_4S; + + wire SPIm_PWdata_26S; + wire SPIm_PWdata_24S; + wire SPIm_PWdata_14S; + wire SPIm_PWdata_11S; + wire SPIm_PWdata_0S; + wire SPIm_Paddr_8S; + wire SPIm_Paddr_6S; + + wire FB_PKfbPush_1S; + wire FB_PKfbData_31S; + wire FB_PKfbData_21S; + wire FB_PKfbData_19S; + wire FB_PKfbData_9S; + wire FB_PKfbData_6S; + wire Sys_PKfb_ClkS; + + wire FB_BusyS; + wire WB_CLKS; + + + //------Define Parameters-------------- + // + + parameter ADDRWIDTH = 32; + parameter DATAWIDTH = 32; + parameter APERWIDTH = 17; + + parameter ENABLE_AHB_REG_WR_DEBUG_MSG = 1'b1; + parameter ENABLE_AHB_REG_RD_DEBUG_MSG = 1'b1; + + parameter T_CYCLE_CLK_SYS_CLK0 = 200;//230;//ACSLIPTEST-230;//100;//180;//(1000.0/(80.0/16)) ; // Default EOS S3B Clock Rate + parameter T_CYCLE_CLK_SYS_CLK1 = 650;//3906;//650;////83.33;//250;//30517;//(1000.0/(80.0/16)) ; // Default EOS S3B Clock Rate + parameter T_CYCLE_CLK_A2F_HCLK = (1000.0 / (80.0 / 12)); // Default EOS S3B Clock Rate + + parameter SYS_CLK0_RESET_LOOP = 5; //4.34;//5; + parameter SYS_CLK1_RESET_LOOP = 5; + parameter WB_CLK_RESET_LOOP = 5; + parameter A2F_HCLK_RESET_LOOP = 5; + + + //------Internal Signals--------------- + // + + integer Sys_Clk0_Reset_Loop_Cnt; + integer Sys_Clk1_Reset_Loop_Cnt; + integer WB_CLK_Reset_Loop_Cnt; + integer A2F_HCLK_Reset_Loop_Cnt; + + + wire A2F_HCLK; + reg A2F_HRESET; + + wire [31:0] A2F_HADDRS; + wire A2F_HSEL; + wire [ 1:0] A2F_HTRANSS; + wire [ 2:0] A2F_HSIZES; + wire A2F_HWRITES; + wire A2F_HREADYS; + wire [31:0] A2F_HWDATAS; + + wire A2F_HREADYOUTS; + wire A2F_HRESPS; + wire [31:0] A2F_HRDATAS; - Sys_Clk0_Rst <= 1'b1; + + //------Logic Operations--------------- + // + + // Apply Reset to Sys_Clk0 domain + // + initial begin + + Sys_Clk0_Rst <= 1'b1; `ifndef YOSYS - for (Sys_Clk0_Reset_Loop_Cnt = 0; - Sys_Clk0_Reset_Loop_Cnt < SYS_CLK0_RESET_LOOP; - Sys_Clk0_Reset_Loop_Cnt = Sys_Clk0_Reset_Loop_Cnt + 1) - begin - wait (Sys_Clk0 == 1'b1) #1; - wait (Sys_Clk0 == 1'b0) #1; + for ( + Sys_Clk0_Reset_Loop_Cnt = 0; + Sys_Clk0_Reset_Loop_Cnt < SYS_CLK0_RESET_LOOP; + Sys_Clk0_Reset_Loop_Cnt = Sys_Clk0_Reset_Loop_Cnt + 1 + ) begin + wait(Sys_Clk0 == 1'b1) #1; + wait(Sys_Clk0 == 1'b0) #1; end - wait (Sys_Clk0 == 1'b1) #1; + wait(Sys_Clk0 == 1'b1) #1; `endif - Sys_Clk0_Rst <= 1'b0; + Sys_Clk0_Rst <= 1'b0; -end + end -// Apply Reset to Sys_Clk1 domain -// -initial -begin + // Apply Reset to Sys_Clk1 domain + // + initial begin - Sys_Clk1_Rst <= 1'b1; + Sys_Clk1_Rst <= 1'b1; `ifndef YOSYS - for (Sys_Clk1_Reset_Loop_Cnt = 0; - Sys_Clk1_Reset_Loop_Cnt < SYS_CLK1_RESET_LOOP; - Sys_Clk1_Reset_Loop_Cnt = Sys_Clk1_Reset_Loop_Cnt + 1) - begin - wait (Sys_Clk1 == 1'b1) #1; - wait (Sys_Clk1 == 1'b0) #1; + for ( + Sys_Clk1_Reset_Loop_Cnt = 0; + Sys_Clk1_Reset_Loop_Cnt < SYS_CLK1_RESET_LOOP; + Sys_Clk1_Reset_Loop_Cnt = Sys_Clk1_Reset_Loop_Cnt + 1 + ) begin + wait(Sys_Clk1 == 1'b1) #1; + wait(Sys_Clk1 == 1'b0) #1; end - wait (Sys_Clk1 == 1'b1) #1; + wait(Sys_Clk1 == 1'b1) #1; `endif - Sys_Clk1_Rst <= 1'b0; + Sys_Clk1_Rst <= 1'b0; -end + end -// Apply Reset to the Wishbone domain -// -// Note: In the ASSP, this reset is distict from the reset domains for Sys_Clk[1:0]. -// -initial -begin + // Apply Reset to the Wishbone domain + // + // Note: In the ASSP, this reset is distict from the reset domains for Sys_Clk[1:0]. + // + initial begin - WB_RST <= 1'b1; + WB_RST <= 1'b1; `ifndef YOSYS - for (WB_CLK_Reset_Loop_Cnt = 0; - WB_CLK_Reset_Loop_Cnt < WB_CLK_RESET_LOOP; - WB_CLK_Reset_Loop_Cnt = WB_CLK_Reset_Loop_Cnt + 1) - begin - wait (WB_CLK == 1'b1) #1; - wait (WB_CLK == 1'b0) #1; + for ( + WB_CLK_Reset_Loop_Cnt = 0; + WB_CLK_Reset_Loop_Cnt < WB_CLK_RESET_LOOP; + WB_CLK_Reset_Loop_Cnt = WB_CLK_Reset_Loop_Cnt + 1 + ) begin + wait(WB_CLK == 1'b1) #1; + wait(WB_CLK == 1'b0) #1; end - wait (WB_CLK == 1'b1) #1; + wait(WB_CLK == 1'b1) #1; `endif - WB_RST <= 1'b0; + WB_RST <= 1'b0; -end + end -// Apply Reset to the AHB Bus domain -// -// Note: The AHB bus clock domain is separate from the Sys_Clk[1:0] domains -initial -begin + // Apply Reset to the AHB Bus domain + // + // Note: The AHB bus clock domain is separate from the Sys_Clk[1:0] domains + initial begin - A2F_HRESET <= 1'b1; + A2F_HRESET <= 1'b1; `ifndef YOSYS - for (A2F_HCLK_Reset_Loop_Cnt = 0; - A2F_HCLK_Reset_Loop_Cnt < A2F_HCLK_RESET_LOOP; - A2F_HCLK_Reset_Loop_Cnt = A2F_HCLK_Reset_Loop_Cnt + 1) - begin - wait (A2F_HCLK == 1'b1) #1; - wait (A2F_HCLK == 1'b0) #1; + for ( + A2F_HCLK_Reset_Loop_Cnt = 0; + A2F_HCLK_Reset_Loop_Cnt < A2F_HCLK_RESET_LOOP; + A2F_HCLK_Reset_Loop_Cnt = A2F_HCLK_Reset_Loop_Cnt + 1 + ) begin + wait(A2F_HCLK == 1'b1) #1; + wait(A2F_HCLK == 1'b0) #1; end - wait (A2F_HCLK == 1'b1) #1; + wait(A2F_HCLK == 1'b1) #1; `endif - A2F_HRESET <= 1'b0; + A2F_HRESET <= 1'b0; -end + end -// Initialize all outputs -// -// Note: These may be replaced in the future by BFMs as the become available. -// -// These registers allow test bench routines to drive these signals as needed. -// -initial -begin + // Initialize all outputs + // + // Note: These may be replaced in the future by BFMs as the become available. + // + // These registers allow test bench routines to drive these signals as needed. + // + initial begin // // SDMA Signals // //SDMA_Done <= 4'h0;//Added SDMA BFM - // SDMA_Active <= 4'h0;//Added SDMA BFM - + // SDMA_Active <= 4'h0;//Added SDMA BFM + // // FB Interrupts // - FB_Start <= 1'b0; + FB_Start <= 1'b0; // // Packet FIFO // - Sys_PKfb_Rst <= 1'b0; - FB_PKfbOverflow <= 1'b0; + Sys_PKfb_Rst <= 1'b0; + FB_PKfbOverflow <= 1'b0; // // Sensor Interface // - Sensor_Int <= 8'h0; + Sensor_Int <= 8'h0; TimeStamp <= 24'h0; // // SPI Master APB Bus // - Sys_Pclk <= 1'b0; - Sys_Pclk_Rst <= 1'b0; + Sys_Pclk <= 1'b0; + Sys_Pclk_Rst <= 1'b0; SPIm_Prdata <= 32'h0; - SPIm_PReady <= 1'b0; - SPIm_PSlvErr <= 1'b0; + SPIm_PReady <= 1'b0; + SPIm_PSlvErr <= 1'b0; // // FBIO Signals // FBIO_In <= 14'h0; -end - - -//------Instantiate Modules------------ -// - -ahb2fb_asynbrig - #( - .ADDRWIDTH ( ADDRWIDTH ), - .DATAWIDTH ( DATAWIDTH ), - .APERWIDTH ( APERWIDTH ) - ) - u_ffe_ahb_to_fabric_async_bridge - ( - // AHB Slave Interface to AHB Bus Matrix - // - .A2F_HCLK ( A2F_HCLK ), - .A2F_HRESET ( A2F_HRESET ), - - .A2F_HADDRS ( A2F_HADDRS ), - .A2F_HSEL ( A2F_HSEL ), - .A2F_HTRANSS ( A2F_HTRANSS ), - .A2F_HSIZES ( A2F_HSIZES ), - .A2F_HWRITES ( A2F_HWRITES ), - .A2F_HREADYS ( A2F_HREADYS ), - .A2F_HWDATAS ( A2F_HWDATAS ), - - .A2F_HREADYOUTS ( A2F_HREADYOUTS ), - .A2F_HRESPS ( A2F_HRESPS ), - .A2F_HRDATAS ( A2F_HRDATAS ), - - // Fabric Wishbone Bus - // - .WB_CLK_I ( WB_CLK ), - .WB_RST_I ( WB_RST ), - .WB_DAT_I ( WBs_RD_DAT ), - .WB_ACK_I ( WBs_ACK ), - - .WB_ADR_O ( WBs_ADR ), - .WB_CYC_O ( WBs_CYC ), - .WB_BYTE_STB_O ( WBs_BYTE_STB ), - .WB_WE_O ( WBs_WE ), - .WB_RD_O ( WBs_RD ), - .WB_STB_O ( WBs_STB ), - .WB_DAT_O ( WBs_WR_DAT ) - - ); - - -ahb_gen_bfm - #( - .ADDRWIDTH ( ADDRWIDTH ), - .DATAWIDTH ( DATAWIDTH ), - .DEFAULT_AHB_ADDRESS ( {(ADDRWIDTH){1'b1}} ), - .STD_CLK_DLY ( 2 ), - .ENABLE_AHB_REG_WR_DEBUG_MSG ( ENABLE_AHB_REG_WR_DEBUG_MSG ), - .ENABLE_AHB_REG_RD_DEBUG_MSG ( ENABLE_AHB_REG_RD_DEBUG_MSG ) - ) - u_ahb_gen_bfm - ( - // AHB Slave Interface to AHB Bus Matrix - // - .A2F_HCLK ( A2F_HCLK ), - .A2F_HRESET ( A2F_HRESET ), - - .A2F_HADDRS ( A2F_HADDRS ), - .A2F_HSEL ( A2F_HSEL ), - .A2F_HTRANSS ( A2F_HTRANSS ), - .A2F_HSIZES ( A2F_HSIZES ), - .A2F_HWRITES ( A2F_HWRITES ), - .A2F_HREADYS ( A2F_HREADYS ), - .A2F_HWDATAS ( A2F_HWDATAS ), - - .A2F_HREADYOUTS ( A2F_HREADYOUTS ), - .A2F_HRESPS ( A2F_HRESPS ), - .A2F_HRDATAS ( A2F_HRDATAS ) - - ); - -// Define the clock cycle times. -// -// Note: Values are calculated to output in units of nS. -// -oscillator_s1 #(.T_CYCLE_CLK (T_CYCLE_CLK_SYS_CLK0)) u_osc_sys_clk0 (.OSC_CLK_EN (1'b1), .OSC_CLK (Sys_Clk0)); -oscillator_s1 #(.T_CYCLE_CLK (T_CYCLE_CLK_SYS_CLK1)) u_osc_sys_clk1 (.OSC_CLK_EN (1'b1), .OSC_CLK (Sys_Clk1)); -oscillator_s1 #(.T_CYCLE_CLK (T_CYCLE_CLK_A2F_HCLK)) u_osc_a2f_hclk (.OSC_CLK_EN (1'b1), .OSC_CLK (A2F_HCLK)); - - -//SDMA bfm -sdma_bfm sdma_bfm_inst0 ( - .sdma_req_i ( SDMA_Req), - .sdma_sreq_i ( SDMA_Sreq), - .sdma_done_o ( SDMA_Done), - .sdma_active_o ( SDMA_Active) - ); - - - -endmodule /* qlal4s3b_cell_macro_bfm*/ + end + + + //------Instantiate Modules------------ + // + + ahb2fb_asynbrig #( + .ADDRWIDTH(ADDRWIDTH), + .DATAWIDTH(DATAWIDTH), + .APERWIDTH(APERWIDTH) + ) u_ffe_ahb_to_fabric_async_bridge ( + // AHB Slave Interface to AHB Bus Matrix + // + .A2F_HCLK (A2F_HCLK), + .A2F_HRESET(A2F_HRESET), + + .A2F_HADDRS (A2F_HADDRS), + .A2F_HSEL (A2F_HSEL), + .A2F_HTRANSS(A2F_HTRANSS), + .A2F_HSIZES (A2F_HSIZES), + .A2F_HWRITES(A2F_HWRITES), + .A2F_HREADYS(A2F_HREADYS), + .A2F_HWDATAS(A2F_HWDATAS), + + .A2F_HREADYOUTS(A2F_HREADYOUTS), + .A2F_HRESPS (A2F_HRESPS), + .A2F_HRDATAS (A2F_HRDATAS), + + // Fabric Wishbone Bus + // + .WB_CLK_I(WB_CLK), + .WB_RST_I(WB_RST), + .WB_DAT_I(WBs_RD_DAT), + .WB_ACK_I(WBs_ACK), + + .WB_ADR_O (WBs_ADR), + .WB_CYC_O (WBs_CYC), + .WB_BYTE_STB_O(WBs_BYTE_STB), + .WB_WE_O (WBs_WE), + .WB_RD_O (WBs_RD), + .WB_STB_O (WBs_STB), + .WB_DAT_O (WBs_WR_DAT) + + ); + + + ahb_gen_bfm #( + .ADDRWIDTH (ADDRWIDTH), + .DATAWIDTH (DATAWIDTH), + .DEFAULT_AHB_ADDRESS ({(ADDRWIDTH) {1'b1}}), + .STD_CLK_DLY (2), + .ENABLE_AHB_REG_WR_DEBUG_MSG(ENABLE_AHB_REG_WR_DEBUG_MSG), + .ENABLE_AHB_REG_RD_DEBUG_MSG(ENABLE_AHB_REG_RD_DEBUG_MSG) + ) u_ahb_gen_bfm ( + // AHB Slave Interface to AHB Bus Matrix + // + .A2F_HCLK (A2F_HCLK), + .A2F_HRESET(A2F_HRESET), + + .A2F_HADDRS (A2F_HADDRS), + .A2F_HSEL (A2F_HSEL), + .A2F_HTRANSS(A2F_HTRANSS), + .A2F_HSIZES (A2F_HSIZES), + .A2F_HWRITES(A2F_HWRITES), + .A2F_HREADYS(A2F_HREADYS), + .A2F_HWDATAS(A2F_HWDATAS), + + .A2F_HREADYOUTS(A2F_HREADYOUTS), + .A2F_HRESPS (A2F_HRESPS), + .A2F_HRDATAS (A2F_HRDATAS) + + ); + + // Define the clock cycle times. + // + // Note: Values are calculated to output in units of nS. + // + oscillator_s1 #( + .T_CYCLE_CLK(T_CYCLE_CLK_SYS_CLK0) + ) u_osc_sys_clk0 ( + .OSC_CLK_EN(1'b1), + .OSC_CLK(Sys_Clk0) + ); + oscillator_s1 #( + .T_CYCLE_CLK(T_CYCLE_CLK_SYS_CLK1) + ) u_osc_sys_clk1 ( + .OSC_CLK_EN(1'b1), + .OSC_CLK(Sys_Clk1) + ); + oscillator_s1 #( + .T_CYCLE_CLK(T_CYCLE_CLK_A2F_HCLK) + ) u_osc_a2f_hclk ( + .OSC_CLK_EN(1'b1), + .OSC_CLK(A2F_HCLK) + ); + + + //SDMA bfm + sdma_bfm sdma_bfm_inst0 ( + .sdma_req_i ( SDMA_Req), + .sdma_sreq_i ( SDMA_Sreq), + .sdma_done_o ( SDMA_Done), + .sdma_active_o ( SDMA_Active) + ); + + + +endmodule /* qlal4s3b_cell_macro_bfm*/ (* keep *) -module qlal4s3b_cell_macro( - input WB_CLK, - input WBs_ACK, - input [31:0]WBs_RD_DAT, - output [3:0]WBs_BYTE_STB, - output WBs_CYC, - output WBs_WE, - output WBs_RD, - output WBs_STB, - output [16:0]WBs_ADR, - input [3:0]SDMA_Req, - input [3:0]SDMA_Sreq, - output [3:0]SDMA_Done, - output [3:0]SDMA_Active, - input [3:0]FB_msg_out, - input [7:0]FB_Int_Clr, - output FB_Start, - input FB_Busy, - output WB_RST, - output Sys_PKfb_Rst, - output Clk_C16, - output Clk_C16_Rst, - output Clk_C21, - output Clk_C21_Rst, - output Sys_Pclk, - output Sys_Pclk_Rst, - input Sys_PKfb_Clk, - input [31:0]FB_PKfbData, - output [31:0]WBs_WR_DAT, - input [3:0]FB_PKfbPush, - input FB_PKfbSOF, - input FB_PKfbEOF, - output [7:0]Sensor_Int, - output FB_PKfbOverflow, - output [23:0]TimeStamp, - input Sys_PSel, - input [15:0]SPIm_Paddr, - input SPIm_PEnable, - input SPIm_PWrite, - input [31:0]SPIm_PWdata, - output SPIm_PReady, - output SPIm_PSlvErr, - output [31:0]SPIm_Prdata, - input [15:0]Device_ID, - input [13:0]FBIO_In_En, - input [13:0]FBIO_Out, - input [13:0]FBIO_Out_En, - output [13:0]FBIO_In, - inout [13:0]SFBIO, - input Device_ID_6S, - input Device_ID_4S, - input SPIm_PWdata_26S, - input SPIm_PWdata_24S, - input SPIm_PWdata_14S, - input SPIm_PWdata_11S, - input SPIm_PWdata_0S, - input SPIm_Paddr_8S, - input SPIm_Paddr_6S, - input FB_PKfbPush_1S, - input FB_PKfbData_31S, - input FB_PKfbData_21S, - input FB_PKfbData_19S, - input FB_PKfbData_9S, - input FB_PKfbData_6S, - input Sys_PKfb_ClkS, - input FB_BusyS, - input WB_CLKS); - - -qlal4s3b_cell_macro_bfm u_ASSP_bfm_inst( - .WBs_ADR (WBs_ADR), - .WBs_CYC (WBs_CYC), - .WBs_BYTE_STB(WBs_BYTE_STB), - .WBs_WE (WBs_WE), - .WBs_RD (WBs_RD), - .WBs_STB (WBs_STB), - .WBs_WR_DAT (WBs_WR_DAT), - .WB_CLK (WB_CLK), - .WB_RST (WB_RST), - .WBs_RD_DAT (WBs_RD_DAT), - .WBs_ACK (WBs_ACK), - // - // SDMA Signals - // - .SDMA_Req (SDMA_Req), - .SDMA_Sreq (SDMA_Sreq), - .SDMA_Done (SDMA_Done), - .SDMA_Active (SDMA_Active), - // - // FB Interrupts - // - .FB_msg_out (FB_msg_out), - .FB_Int_Clr (FB_Int_Clr), - .FB_Start (FB_Start), - .FB_Busy (FB_Busy), - // - // FB Clocks - // - .Sys_Clk0 (Clk_C16), - .Sys_Clk0_Rst (Clk_C16_Rst), - .Sys_Clk1 (Clk_C21), - .Sys_Clk1_Rst (Clk_C21_Rst), - // - // Packet FIFO - // - .Sys_PKfb_Clk (Sys_PKfb_Clk), - .Sys_PKfb_Rst (Sys_PKfb_Rst), - .FB_PKfbData (FB_PKfbData), - .FB_PKfbPush (FB_PKfbPush), - .FB_PKfbSOF (FB_PKfbSOF), - .FB_PKfbEOF (FB_PKfbEOF), - .FB_PKfbOverflow (FB_PKfbOverflow), - // - // Sensor Interface - // - .Sensor_Int (Sensor_Int), - .TimeStamp (TimeStamp), - // - // SPI Master APB Bus - // - .Sys_Pclk (Sys_Pclk), - .Sys_Pclk_Rst (Sys_Pclk_Rst), - .Sys_PSel (Sys_PSel), - .SPIm_Paddr (SPIm_Paddr), - .SPIm_PEnable (SPIm_PEnable), - .SPIm_PWrite (SPIm_PWrite), - .SPIm_PWdata (SPIm_PWdata), - .SPIm_Prdata (SPIm_Prdata), - .SPIm_PReady (SPIm_PReady), - .SPIm_PSlvErr (SPIm_PSlvErr), - // - // Misc - // - .Device_ID (Device_ID), - // - // FBIO Signals - // - .FBIO_In (FBIO_In), - .FBIO_In_En (FBIO_In_En), - .FBIO_Out (FBIO_Out), - .FBIO_Out_En (FBIO_Out_En), - // - // ??? - // - .SFBIO (SFBIO), - .Device_ID_6S (Device_ID_6S), - .Device_ID_4S (Device_ID_4S), - .SPIm_PWdata_26S (SPIm_PWdata_26S), - .SPIm_PWdata_24S (SPIm_PWdata_24S), - .SPIm_PWdata_14S (SPIm_PWdata_14S), - .SPIm_PWdata_11S (SPIm_PWdata_11S), - .SPIm_PWdata_0S (SPIm_PWdata_0S), - .SPIm_Paddr_8S (SPIm_Paddr_8S), - .SPIm_Paddr_6S (SPIm_Paddr_6S), - .FB_PKfbPush_1S (FB_PKfbPush_1S), - .FB_PKfbData_31S (FB_PKfbData_31S), - .FB_PKfbData_21S (FB_PKfbData_21S), - .FB_PKfbData_19S (FB_PKfbData_19S), - .FB_PKfbData_9S (FB_PKfbData_9S), - .FB_PKfbData_6S (FB_PKfbData_6S), - .Sys_PKfb_ClkS (Sys_PKfb_ClkS), - .FB_BusyS (FB_BusyS), - .WB_CLKS (WB_CLKS) - ); - -endmodule /* qlal4s3b_cell_macro */ +module qlal4s3b_cell_macro ( + input WB_CLK, + input WBs_ACK, + input [31:0] WBs_RD_DAT, + output [3:0] WBs_BYTE_STB, + output WBs_CYC, + output WBs_WE, + output WBs_RD, + output WBs_STB, + output [16:0] WBs_ADR, + input [3:0] SDMA_Req, + input [3:0] SDMA_Sreq, + output [3:0] SDMA_Done, + output [3:0] SDMA_Active, + input [3:0] FB_msg_out, + input [7:0] FB_Int_Clr, + output FB_Start, + input FB_Busy, + output WB_RST, + output Sys_PKfb_Rst, + output Clk_C16, + output Clk_C16_Rst, + output Clk_C21, + output Clk_C21_Rst, + output Sys_Pclk, + output Sys_Pclk_Rst, + input Sys_PKfb_Clk, + input [31:0] FB_PKfbData, + output [31:0] WBs_WR_DAT, + input [3:0] FB_PKfbPush, + input FB_PKfbSOF, + input FB_PKfbEOF, + output [7:0] Sensor_Int, + output FB_PKfbOverflow, + output [23:0] TimeStamp, + input Sys_PSel, + input [15:0] SPIm_Paddr, + input SPIm_PEnable, + input SPIm_PWrite, + input [31:0] SPIm_PWdata, + output SPIm_PReady, + output SPIm_PSlvErr, + output [31:0] SPIm_Prdata, + input [15:0] Device_ID, + input [13:0] FBIO_In_En, + input [13:0] FBIO_Out, + input [13:0] FBIO_Out_En, + output [13:0] FBIO_In, + inout [13:0] SFBIO, + input Device_ID_6S, + input Device_ID_4S, + input SPIm_PWdata_26S, + input SPIm_PWdata_24S, + input SPIm_PWdata_14S, + input SPIm_PWdata_11S, + input SPIm_PWdata_0S, + input SPIm_Paddr_8S, + input SPIm_Paddr_6S, + input FB_PKfbPush_1S, + input FB_PKfbData_31S, + input FB_PKfbData_21S, + input FB_PKfbData_19S, + input FB_PKfbData_9S, + input FB_PKfbData_6S, + input Sys_PKfb_ClkS, + input FB_BusyS, + input WB_CLKS +); + + + qlal4s3b_cell_macro_bfm u_ASSP_bfm_inst ( + .WBs_ADR (WBs_ADR), + .WBs_CYC (WBs_CYC), + .WBs_BYTE_STB (WBs_BYTE_STB), + .WBs_WE (WBs_WE), + .WBs_RD (WBs_RD), + .WBs_STB (WBs_STB), + .WBs_WR_DAT (WBs_WR_DAT), + .WB_CLK (WB_CLK), + .WB_RST (WB_RST), + .WBs_RD_DAT (WBs_RD_DAT), + .WBs_ACK (WBs_ACK), + // + // SDMA Signals + // + .SDMA_Req (SDMA_Req), + .SDMA_Sreq (SDMA_Sreq), + .SDMA_Done (SDMA_Done), + .SDMA_Active (SDMA_Active), + // + // FB Interrupts + // + .FB_msg_out (FB_msg_out), + .FB_Int_Clr (FB_Int_Clr), + .FB_Start (FB_Start), + .FB_Busy (FB_Busy), + // + // FB Clocks + // + .Sys_Clk0 (Clk_C16), + .Sys_Clk0_Rst (Clk_C16_Rst), + .Sys_Clk1 (Clk_C21), + .Sys_Clk1_Rst (Clk_C21_Rst), + // + // Packet FIFO + // + .Sys_PKfb_Clk (Sys_PKfb_Clk), + .Sys_PKfb_Rst (Sys_PKfb_Rst), + .FB_PKfbData (FB_PKfbData), + .FB_PKfbPush (FB_PKfbPush), + .FB_PKfbSOF (FB_PKfbSOF), + .FB_PKfbEOF (FB_PKfbEOF), + .FB_PKfbOverflow(FB_PKfbOverflow), + // + // Sensor Interface + // + .Sensor_Int (Sensor_Int), + .TimeStamp (TimeStamp), + // + // SPI Master APB Bus + // + .Sys_Pclk (Sys_Pclk), + .Sys_Pclk_Rst (Sys_Pclk_Rst), + .Sys_PSel (Sys_PSel), + .SPIm_Paddr (SPIm_Paddr), + .SPIm_PEnable (SPIm_PEnable), + .SPIm_PWrite (SPIm_PWrite), + .SPIm_PWdata (SPIm_PWdata), + .SPIm_Prdata (SPIm_Prdata), + .SPIm_PReady (SPIm_PReady), + .SPIm_PSlvErr (SPIm_PSlvErr), + // + // Misc + // + .Device_ID (Device_ID), + // + // FBIO Signals + // + .FBIO_In (FBIO_In), + .FBIO_In_En (FBIO_In_En), + .FBIO_Out (FBIO_Out), + .FBIO_Out_En (FBIO_Out_En), + // + // ??? + // + .SFBIO (SFBIO), + .Device_ID_6S (Device_ID_6S), + .Device_ID_4S (Device_ID_4S), + .SPIm_PWdata_26S(SPIm_PWdata_26S), + .SPIm_PWdata_24S(SPIm_PWdata_24S), + .SPIm_PWdata_14S(SPIm_PWdata_14S), + .SPIm_PWdata_11S(SPIm_PWdata_11S), + .SPIm_PWdata_0S (SPIm_PWdata_0S), + .SPIm_Paddr_8S (SPIm_Paddr_8S), + .SPIm_Paddr_6S (SPIm_Paddr_6S), + .FB_PKfbPush_1S (FB_PKfbPush_1S), + .FB_PKfbData_31S(FB_PKfbData_31S), + .FB_PKfbData_21S(FB_PKfbData_21S), + .FB_PKfbData_19S(FB_PKfbData_19S), + .FB_PKfbData_9S (FB_PKfbData_9S), + .FB_PKfbData_6S (FB_PKfbData_6S), + .Sys_PKfb_ClkS (Sys_PKfb_ClkS), + .FB_BusyS (FB_BusyS), + .WB_CLKS (WB_CLKS) + ); + +endmodule /* qlal4s3b_cell_macro */ (* keep *) module gpio_cell_macro ( - ESEL, - IE, - OSEL, - OQI, - OQE, - DS, - FIXHOLD, - IZ, - IQZ, - IQE, - IQC, - IQCS, - IQR, - WPD, - INEN, - IP - ); - -input ESEL; -input IE; -input OSEL; -input OQI; -input OQE; -input DS; -input FIXHOLD; -output IZ; -output IQZ; -input IQE; -input IQC; -input IQCS; -input INEN; -input IQR; -input WPD; -inout IP; - -reg EN_reg, OQ_reg, IQZ; -wire AND_OUT; - -assign rstn = ~IQR; -assign IQCP = IQCS ? ~IQC : IQC; - -always @(posedge IQCP or negedge rstn) - if (~rstn) - EN_reg <= 1'b0; - else - EN_reg <= IE; - -always @(posedge IQCP or negedge rstn) - if (~rstn) - OQ_reg <= 1'b0; - else - if (OQE) - OQ_reg <= OQI; - - -always @(posedge IQCP or negedge rstn) - if (~rstn) - IQZ <= 1'b0; - else - if (IQE) - IQZ <= AND_OUT; - -assign IZ = AND_OUT; - -assign AND_OUT = INEN ? IP : 1'b0; - -assign EN = ESEL ? IE : EN_reg ; - -assign OQ = OSEL ? OQI : OQ_reg ; - -assign IP = EN ? OQ : 1'bz; + ESEL, + IE, + OSEL, + OQI, + OQE, + DS, + FIXHOLD, + IZ, + IQZ, + IQE, + IQC, + IQCS, + IQR, + WPD, + INEN, + IP +); + + input ESEL; + input IE; + input OSEL; + input OQI; + input OQE; + input DS; + input FIXHOLD; + output IZ; + output IQZ; + input IQE; + input IQC; + input IQCS; + input INEN; + input IQR; + input WPD; + inout IP; + + reg EN_reg, OQ_reg, IQZ; + wire AND_OUT; + + assign rstn = ~IQR; + assign IQCP = IQCS ? ~IQC : IQC; + + always @(posedge IQCP or negedge rstn) + if (~rstn) EN_reg <= 1'b0; + else EN_reg <= IE; + + always @(posedge IQCP or negedge rstn) + if (~rstn) OQ_reg <= 1'b0; + else if (OQE) OQ_reg <= OQI; + + + always @(posedge IQCP or negedge rstn) + if (~rstn) IQZ <= 1'b0; + else if (IQE) IQZ <= AND_OUT; + + assign IZ = AND_OUT; + + assign AND_OUT = INEN ? IP : 1'b0; + + assign EN = ESEL ? IE : EN_reg; + + assign OQ = OSEL ? OQI : OQ_reg; + + assign IP = EN ? OQ : 1'bz; endmodule diff --git a/ql-qlf-plugin/tests/consts/consts.v b/ql-qlf-plugin/tests/consts/consts.v index 9096b14a9..6d7ab2976 100644 --- a/ql-qlf-plugin/tests/consts/consts.v +++ b/ql-qlf-plugin/tests/consts/consts.v @@ -12,13 +12,15 @@ module my_lut ( output wire o ); - LUT4 #(.INIT(16'hAAAA)) my_lut ( - .I0 (i[0]), - .I1 (i[1]), - .I2 (i[2]), - .I3 (1'bx), - .O (o) - ); + LUT4 #( + .INIT(16'hAAAA) + ) my_lut ( + .I0(i[0]), + .I1(i[1]), + .I2(i[2]), + .I3(1'bx), + .O (o) + ); endmodule @@ -27,9 +29,9 @@ module my_top ( output wire o ); - my_lut my_lut ( - .i ({1'b0, 1'b1, i}), - .o (o) - ); + my_lut my_lut ( + .i({1'b0, 1'b1, i}), + .o(o) + ); endmodule diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index be159a1cc..49728f116 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -14,13 +14,16 @@ module my_dff ( always @(posedge clk) q <= d; endmodule -module my_dffe( input d, clk, en, output reg q ); - initial begin - q = 0; - end - always @( posedge clk ) - if ( en ) - q <= d; +module my_dffe ( + input d, + clk, + en, + output reg q +); + initial begin + q = 0; + end + always @(posedge clk) if (en) q <= d; endmodule module my_dffr_p ( @@ -43,12 +46,12 @@ module my_dffr_p_2 ( output reg q2 ); always @(posedge clk or posedge clr) - if (clr) begin - q1 <= 1'b0; - q2 <= 1'b0; + if (clr) begin + q1 <= 1'b0; + q2 <= 1'b0; end else begin - q1 <= d1; - q2 <= d2; + q1 <= d1; + q2 <= d2; end endmodule @@ -118,7 +121,7 @@ module my_dffse_p ( ); always @(posedge clk or posedge pre) if (pre) q <= 1'b1; - else if(en) q <= d; + else if (en) q <= d; endmodule module my_dffse_n ( @@ -130,7 +133,7 @@ module my_dffse_n ( ); always @(posedge clk or negedge pre) if (!pre) q <= 1'b1; - else if(en) q <= d; + else if (en) q <= d; endmodule module my_dffn ( @@ -423,17 +426,27 @@ module my_dffsre_nnn ( else if (en) q <= d; endmodule -module my_dffs_clk_p( input d, clk, pre, output reg q ); - initial q <= 0; - always @( posedge clk ) - if ( pre ) q <= 1'b1; - else q <= d; +module my_dffs_clk_p ( + input d, + clk, + pre, + output reg q +); + initial q <= 0; + always @(posedge clk) + if (pre) q <= 1'b1; + else q <= d; endmodule -module my_dffs_clk_n( input d, clk, clr, output reg q ); - initial q <= 0; - always @( negedge clk ) - if ( !clr ) q <= 1'b0; - else q <= d; +module my_dffs_clk_n ( + input d, + clk, + clr, + output reg q +); + initial q <= 0; + always @(negedge clk) + if (!clr) q <= 1'b0; + else q <= d; endmodule diff --git a/ql-qlf-plugin/tests/fsm/fsm.v b/ql-qlf-plugin/tests/fsm/fsm.v index e68ddc1fe..ee2858409 100644 --- a/ql-qlf-plugin/tests/fsm/fsm.v +++ b/ql-qlf-plugin/tests/fsm/fsm.v @@ -6,54 +6,63 @@ // // SPDX-License-Identifier:ISC -module fsm ( clock, reset, req_0, req_1, gnt_0, gnt_1 ); - input clock,reset,req_0,req_1; - output gnt_0,gnt_1; - wire clock,reset,req_0,req_1; - reg gnt_0,gnt_1; +module fsm ( + clock, + reset, + req_0, + req_1, + gnt_0, + gnt_1 +); + input clock, reset, req_0, req_1; + output gnt_0, gnt_1; + wire clock, reset, req_0, req_1; + reg gnt_0, gnt_1; - parameter SIZE = 3; - parameter IDLE = 3'b001; - parameter GNT0 = 3'b010; - parameter GNT1 = 3'b100; - parameter GNT2 = 3'b101; + parameter SIZE = 3; + parameter IDLE = 3'b001; + parameter GNT0 = 3'b010; + parameter GNT1 = 3'b100; + parameter GNT2 = 3'b101; - reg [SIZE-1:0] state; - reg [SIZE-1:0] next_state; + reg [SIZE-1:0] state; + reg [SIZE-1:0] next_state; - always @ (posedge clock) - begin : FSM - if (reset == 1'b1) begin - state <= #1 IDLE; - gnt_0 <= 0; - gnt_1 <= 0; - end - else - case(state) - IDLE : if (req_0 == 1'b1) begin - state <= #1 GNT0; - gnt_0 <= 1; - end else if (req_1 == 1'b1) begin - gnt_1 <= 1; - state <= #1 GNT0; - end else begin - state <= #1 IDLE; - end - GNT0 : if (req_0 == 1'b1) begin - state <= #1 GNT0; - end else begin - gnt_0 <= 0; - state <= #1 IDLE; - end - GNT1 : if (req_1 == 1'b1) begin - state <= #1 GNT2; - gnt_1 <= req_0; - end - GNT2 : if (req_0 == 1'b1) begin - state <= #1 GNT1; - gnt_1 <= req_1; - end - default : state <= #1 IDLE; - endcase + always @(posedge clock) begin : FSM + if (reset == 1'b1) begin + state <= #1 IDLE; + gnt_0 <= 0; + gnt_1 <= 0; + end else + case (state) + IDLE: + if (req_0 == 1'b1) begin + state <= #1 GNT0; + gnt_0 <= 1; + end else if (req_1 == 1'b1) begin + gnt_1 <= 1; + state <= #1 GNT0; + end else begin + state <= #1 IDLE; end + GNT0: + if (req_0 == 1'b1) begin + state <= #1 GNT0; + end else begin + gnt_0 <= 0; + state <= #1 IDLE; + end + GNT1: + if (req_1 == 1'b1) begin + state <= #1 GNT2; + gnt_1 <= req_0; + end + GNT2: + if (req_0 == 1'b1) begin + state <= #1 GNT1; + gnt_1 <= req_1; + end + default: state <= #1 IDLE; + endcase + end endmodule diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.v b/ql-qlf-plugin/tests/mac_unit/mac_unit.v index 8b5c1c41b..0b4e91bed 100644 --- a/ql-qlf-plugin/tests/mac_unit/mac_unit.v +++ b/ql-qlf-plugin/tests/mac_unit/mac_unit.v @@ -6,7 +6,11 @@ // // SPDX-License-Identifier:ISC -module mac_unit(a, b, out); +module mac_unit ( + a, + b, + out +); parameter DATA_WIDTH = 16; input [DATA_WIDTH - 1 : 0] a, b; output [2*DATA_WIDTH - 1 : 0] out; diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.v b/ql-qlf-plugin/tests/multiplier/multiplier.v index e3a4d7fef..960ff7edf 100644 --- a/ql-qlf-plugin/tests/multiplier/multiplier.v +++ b/ql-qlf-plugin/tests/multiplier/multiplier.v @@ -6,7 +6,11 @@ // // SPDX-License-Identifier:ISC -module mult16x16(a, b, out); +module mult16x16 ( + a, + b, + out +); parameter DATA_WIDTH = 16; input [DATA_WIDTH - 1 : 0] a, b; output [2*DATA_WIDTH - 1 : 0] out; diff --git a/ql-qlf-plugin/tests/mux/mux.v b/ql-qlf-plugin/tests/mux/mux.v index ecc1189c4..d0d30fa8a 100644 --- a/ql-qlf-plugin/tests/mux/mux.v +++ b/ql-qlf-plugin/tests/mux/mux.v @@ -6,64 +6,78 @@ // // SPDX-License-Identifier:ISC -module mux2 (S,A,B,Y); - input S; - input A,B; - output reg Y; +module mux2 ( + S, + A, + B, + Y +); + input S; + input A, B; + output reg Y; - always @(*) - Y = (S)? B : A; + always @(*) Y = (S) ? B : A; endmodule -module mux4 ( S, D, Y ); - input[1:0] S; - input[3:0] D; - output Y; +module mux4 ( + S, + D, + Y +); + input [1:0] S; + input [3:0] D; + output Y; - reg Y; - wire[1:0] S; - wire[3:0] D; + reg Y; + wire [1:0] S; + wire [3:0] D; - always @* - begin - case( S ) - 0 : Y = D[0]; - 1 : Y = D[1]; - 2 : Y = D[2]; - 3 : Y = D[3]; - endcase - end + always @* begin + case (S) + 0: Y = D[0]; + 1: Y = D[1]; + 2: Y = D[2]; + 3: Y = D[3]; + endcase + end endmodule -module mux8 ( S, D, Y ); - input[2:0] S; - input[7:0] D; - output Y; +module mux8 ( + S, + D, + Y +); + input [2:0] S; + input [7:0] D; + output Y; - reg Y; - wire[2:0] S; - wire[7:0] D; + reg Y; + wire [2:0] S; + wire [7:0] D; - always @* - begin - case( S ) - 0 : Y = D[0]; - 1 : Y = D[1]; - 2 : Y = D[2]; - 3 : Y = D[3]; - 4 : Y = D[4]; - 5 : Y = D[5]; - 6 : Y = D[6]; - 7 : Y = D[7]; - endcase - end + always @* begin + case (S) + 0: Y = D[0]; + 1: Y = D[1]; + 2: Y = D[2]; + 3: Y = D[3]; + 4: Y = D[4]; + 5: Y = D[5]; + 6: Y = D[6]; + 7: Y = D[7]; + endcase + end endmodule -module mux16 (D, S, Y); - input [15:0] D; - input [3:0] S; - output Y; +module mux16 ( + D, + S, + Y +); + input [15:0] D; + input [3:0] S; + output Y; - assign Y = D[S]; + assign Y = D[S]; endmodule diff --git a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v index 97cd00ade..78f14b71d 100644 --- a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v +++ b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v @@ -6,132 +6,177 @@ // // SPDX-License-Identifier:ISC -module my_ram (CLK, WADR, WDAT, WEN, RADR, RDAT, REN); +module my_ram ( + CLK, + WADR, + WDAT, + WEN, + RADR, + RDAT, + REN +); - parameter DBITS = 36; - parameter ABITS = 9; + parameter DBITS = 36; + parameter ABITS = 9; - input wire CLK; + input wire CLK; - input wire [ABITS-1:0] WADR; - input wire [DBITS-1:0] WDAT; - input wire WEN; + input wire [ABITS-1:0] WADR; + input wire [DBITS-1:0] WDAT; + input wire WEN; - input wire [ABITS-1:0] RADR; - output reg [DBITS-1:0] RDAT; - input wire REN; + input wire [ABITS-1:0] RADR; + output reg [DBITS-1:0] RDAT; + input wire REN; - localparam SIZE = 1 << ABITS; - reg [DBITS-1:0] mem[0:SIZE-1]; + localparam SIZE = 1 << ABITS; + reg [DBITS-1:0] mem[0:SIZE-1]; - always @(posedge CLK) begin - if (WEN) mem[WADR] <= WDAT; - end + always @(posedge CLK) begin + if (WEN) mem[WADR] <= WDAT; + end - always @(posedge CLK) begin - RDAT <= mem[RADR]; - end + always @(posedge CLK) begin + RDAT <= mem[RADR]; + end endmodule // ============================================================================ -module top_bram_9_16 (CLK, WADR, WDAT, WEN, RADR, RDAT); - - input wire CLK; - - input wire [8 :0] WADR; - input wire [15:0] WDAT; - input wire WEN; - - input wire [8 :0] RADR; - output wire [15:0] RDAT; - - my_ram #(.DBITS(16), .ABITS(9)) the_ram ( - .CLK (CLK), - .WADR (WADR), - .WDAT (WDAT), - .WEN (WEN), - .RADR (RADR), - .RDAT (RDAT), - .REN (1'b0) - ); +module top_bram_9_16 ( + CLK, + WADR, + WDAT, + WEN, + RADR, + RDAT +); + + input wire CLK; + + input wire [8 : 0] WADR; + input wire [15:0] WDAT; + input wire WEN; + + input wire [8 : 0] RADR; + output wire [15:0] RDAT; + + my_ram #( + .DBITS(16), + .ABITS(9) + ) the_ram ( + .CLK (CLK), + .WADR(WADR), + .WDAT(WDAT), + .WEN (WEN), + .RADR(RADR), + .RDAT(RDAT), + .REN (1'b0) + ); endmodule -module top_bram_9_32 (CLK, WADR, WDAT, WEN, RADR, RDAT); - - input wire CLK; - - input wire [8 :0] WADR; - input wire [31:0] WDAT; - input wire WEN; - - input wire [8 :0] RADR; - output wire [31:0] RDAT; - - my_ram #(.DBITS(32), .ABITS(9)) the_ram ( - .CLK (CLK), - .WADR (WADR), - .WDAT (WDAT), - .WEN (WEN), - .RADR (RADR), - .RDAT (RDAT), - .REN (1'b0) - ); +module top_bram_9_32 ( + CLK, + WADR, + WDAT, + WEN, + RADR, + RDAT +); + + input wire CLK; + + input wire [8 : 0] WADR; + input wire [31:0] WDAT; + input wire WEN; + + input wire [8 : 0] RADR; + output wire [31:0] RDAT; + + my_ram #( + .DBITS(32), + .ABITS(9) + ) the_ram ( + .CLK (CLK), + .WADR(WADR), + .WDAT(WDAT), + .WEN (WEN), + .RADR(RADR), + .RDAT(RDAT), + .REN (1'b0) + ); endmodule -module top_bram_10_16 (CLK, WADR, WDAT, WEN, RADR, RDAT); - - input wire CLK; - - input wire [9 :0] WADR; - input wire [15:0] WDAT; - input wire WEN; - - input wire [9 :0] RADR; - output wire [15:0] RDAT; - - my_ram #(.DBITS(16), .ABITS(10)) the_ram ( - .CLK (CLK), - .WADR (WADR), - .WDAT (WDAT), - .WEN (WEN), - .RADR (RADR), - .RDAT (RDAT), - .REN (1'b0) - ); +module top_bram_10_16 ( + CLK, + WADR, + WDAT, + WEN, + RADR, + RDAT +); + + input wire CLK; + + input wire [9 : 0] WADR; + input wire [15:0] WDAT; + input wire WEN; + + input wire [9 : 0] RADR; + output wire [15:0] RDAT; + + my_ram #( + .DBITS(16), + .ABITS(10) + ) the_ram ( + .CLK (CLK), + .WADR(WADR), + .WDAT(WDAT), + .WEN (WEN), + .RADR(RADR), + .RDAT(RDAT), + .REN (1'b0) + ); endmodule -module top_bram_init (CLK, WADR, WDAT, WEN, RADR, RDAT); - - input wire CLK; - - input wire [9 :0] WADR; - input wire [17:0] WDAT; - input wire WEN; - - input wire [9 :0] RADR; - output wire [17:0] RDAT; - - RAM_8K_BLK # ( - .INIT_FILE ("init.txt"), - .addr_int (9), - .data_depth_int (1 << 9), - .data_width_int (16) - ) the_ram ( - .WClk (CLK), - .RClk (CLK), - .WClk_En (1'b1), - .RClk_En (1'b1), - .WA (WADR), - .WD (WDAT), - .WEN (WEN), - .RA (RADR), - .RD (RDAT) - ); +module top_bram_init ( + CLK, + WADR, + WDAT, + WEN, + RADR, + RDAT +); + + input wire CLK; + + input wire [9 : 0] WADR; + input wire [17:0] WDAT; + input wire WEN; + + input wire [9 : 0] RADR; + output wire [17:0] RDAT; + + RAM_8K_BLK #( + .INIT_FILE ("init.txt"), + .addr_int (9), + .data_depth_int(1 << 9), + .data_width_int(16) + ) the_ram ( + .WClk (CLK), + .RClk (CLK), + .WClk_En(1'b1), + .RClk_En(1'b1), + .WA (WADR), + .WD (WDAT), + .WEN (WEN), + .RA (RADR), + .RD (RDAT) + ); endmodule diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.v b/ql-qlf-plugin/tests/tribuf/tribuf.v index f0d2fb019..01f3779b8 100644 --- a/ql-qlf-plugin/tests/tribuf/tribuf.v +++ b/ql-qlf-plugin/tests/tribuf/tribuf.v @@ -6,12 +6,15 @@ // // SPDX-License-Identifier:ISC -module tristate(en, i, o); - input en; - input i; - output reg o; +module tristate ( + en, + i, + o +); + input en; + input i; + output reg o; - always @(en or i) - o <= (en)? i : 1'bZ; + always @(en or i) o <= (en) ? i : 1'bZ; endmodule From 4784c8156eda12038a569b93d0697f7c054c0849 Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Mon, 28 Jun 2021 15:49:34 +0530 Subject: [PATCH 352/845] Adding pp3 as a device family to help message Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/synth_quicklogic.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 07d760391..b627dd63f 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -41,6 +41,7 @@ struct SynthQuickLogicPass : public ScriptPass { log(" run synthesis for the specified QuickLogic architecture\n"); log(" generate the synthesis netlist for the specified family.\n"); log(" supported values:\n"); + log(" - pp3 : pp3 \n"); log(" - qlf_k4n8 : qlf_k4n8 \n"); log(" - qlf_k6n10: qlf_k6n10 \n"); log("\n"); From e9f5120b672deb726d8a28ffe7c20af36a7d59c1 Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Fri, 2 Jul 2021 11:21:35 +0530 Subject: [PATCH 353/845] Adding support for writing EQN param in edif file. Also, removing support to write INIT param for DFFs Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/Makefile | 3 +- ql-qlf-plugin/pp3/pp3_ffs_map.v | 4 +- ql-qlf-plugin/quicklogic_eqn.cc | 108 ++++++++++++++++++++++++++++++ ql-qlf-plugin/synth_quicklogic.cc | 17 +++-- 4 files changed, 121 insertions(+), 11 deletions(-) create mode 100644 ql-qlf-plugin/quicklogic_eqn.cc diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 27e2d1973..8fced1f51 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -9,7 +9,8 @@ NAME = ql-qlf SOURCES = synth_quicklogic.cc \ ql-dsp.cc \ - pp3_braminit.cc + pp3_braminit.cc \ + quicklogic_eqn.cc include ../Makefile_plugin.common COMMON = common diff --git a/ql-qlf-plugin/pp3/pp3_ffs_map.v b/ql-qlf-plugin/pp3/pp3_ffs_map.v index abd70731f..3bd5e9851 100644 --- a/ql-qlf-plugin/pp3/pp3_ffs_map.v +++ b/ql-qlf-plugin/pp3/pp3_ffs_map.v @@ -15,9 +15,7 @@ module \$_DFFSRE_PPPP_ ( output Q ); wire _TECHMAP_REMOVEINIT_Q_ = 1; - dffepc #( - .INIT(1'b0) - ) _TECHMAP_REPLACE_ ( + dffepc _TECHMAP_REPLACE_ ( .CLK(C), .PRE(S), .CLR(R), diff --git a/ql-qlf-plugin/quicklogic_eqn.cc b/ql-qlf-plugin/quicklogic_eqn.cc new file mode 100644 index 000000000..9b64df2ca --- /dev/null +++ b/ql-qlf-plugin/quicklogic_eqn.cc @@ -0,0 +1,108 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2021 Lalit Sharma + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "kernel/yosys.h" +#include "kernel/sigtools.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +struct QuicklogicEqnPass : public Pass { + QuicklogicEqnPass() : Pass("quicklogic_eqn", "Quicklogic: Calculate equations for luts") { } + void help() override + { + log("\n"); + log(" quicklogic_eqn [selection]\n"); + log("\n"); + log("Calculate equations for luts since bitstream generator depends on it.\n"); + log("\n"); + } + + Const init2eqn(Const init, int inputs) + { + std::string init_bits = init.as_string(); + const char* names[] = { "I0" , "I1", "I2", "I3", "I4" }; + + std::string eqn; + int width = (int)pow(2,inputs); + for(int i=0;i args, RTLIL::Design *design) override + { + log_header(design, "Executing Quicklogic_EQN pass (calculate equations for luts).\n"); + + extra_args(args, args.size(), design); + + int cnt = 0; + for (auto module : design->selected_modules()) + { + for (auto cell : module->selected_cells()) + { + if (cell->type == ID(LUT1)) + { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),1)); + cnt++; + } + if (cell->type == ID(LUT2)) + { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),2)); + cnt++; + } + if (cell->type == ID(LUT3)) + { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),3)); + cnt++; + } + if (cell->type == ID(LUT4)) + { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),4)); + cnt++; + } + if (cell->type == ID(LUT5)) + { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),5)); + cnt++; + } + } + } + log_header(design, "Updated %d of LUT* elements with equation.\n", cnt); + } +} QuicklogicEqnPass; + +PRIVATE_NAMESPACE_END diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index b627dd63f..ef0557b50 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -357,18 +357,11 @@ struct SynthQuickLogicPass : public ScriptPass { if (family == "pp3") { run("setundef -zero -params -undriven"); } - if (family == "pp3" || (check_label("edif") && (!edif_file.empty()))) { - run("hilomap -hicell logic_1 A -locell logic_0 A -singleton A:top"); - } run("opt_clean -purge"); run("check"); run("blackbox =A:whitebox"); } - if (check_label("edif") && (!edif_file.empty())) { - run(stringf("write_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); - } - if (check_label("blif")) { if (!blif_file.empty()) { if (inferAdder) { @@ -379,6 +372,16 @@ struct SynthQuickLogicPass : public ScriptPass { } } + if (check_label("edif") && (!edif_file.empty())) { + run("splitnets -ports -format ()"); + run("quicklogic_eqn"); + if (family == "pp3") { + run("hilomap -hicell logic_1 A -locell logic_0 A -singleton A:top"); + } + + run(stringf("write_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); + } + if (check_label("verilog")) { if (!verilog_file.empty()) { run("write_verilog -noattr -nohex " + verilog_file); From 84a91a79a726bb1d0cb228dadf4e469b29d7a701 Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Fri, 2 Jul 2021 12:25:20 +0530 Subject: [PATCH 354/845] Moving hilomap pass as this is leading to a testcase failure Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/synth_quicklogic.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index ef0557b50..5b31cee7e 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -357,6 +357,9 @@ struct SynthQuickLogicPass : public ScriptPass { if (family == "pp3") { run("setundef -zero -params -undriven"); } + if (family == "pp3" || (check_label("edif") && (!edif_file.empty()))) { + run("hilomap -hicell logic_1 A -locell logic_0 A -singleton A:top"); + } run("opt_clean -purge"); run("check"); run("blackbox =A:whitebox"); @@ -375,9 +378,6 @@ struct SynthQuickLogicPass : public ScriptPass { if (check_label("edif") && (!edif_file.empty())) { run("splitnets -ports -format ()"); run("quicklogic_eqn"); - if (family == "pp3") { - run("hilomap -hicell logic_1 A -locell logic_0 A -singleton A:top"); - } run(stringf("write_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); } From baa686bdd910ad37f4cba207fedb2471452e0f2f Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Fri, 2 Jul 2021 12:51:16 +0530 Subject: [PATCH 355/845] Formatting newly added file Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/quicklogic_eqn.cc | 140 +++++++++++++++----------------- 1 file changed, 66 insertions(+), 74 deletions(-) diff --git a/ql-qlf-plugin/quicklogic_eqn.cc b/ql-qlf-plugin/quicklogic_eqn.cc index 9b64df2ca..232efdefc 100644 --- a/ql-qlf-plugin/quicklogic_eqn.cc +++ b/ql-qlf-plugin/quicklogic_eqn.cc @@ -17,92 +17,84 @@ * */ -#include "kernel/yosys.h" #include "kernel/sigtools.h" +#include "kernel/yosys.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN struct QuicklogicEqnPass : public Pass { - QuicklogicEqnPass() : Pass("quicklogic_eqn", "Quicklogic: Calculate equations for luts") { } - void help() override - { - log("\n"); - log(" quicklogic_eqn [selection]\n"); - log("\n"); - log("Calculate equations for luts since bitstream generator depends on it.\n"); - log("\n"); - } + QuicklogicEqnPass() : Pass("quicklogic_eqn", "Quicklogic: Calculate equations for luts") {} + void help() override + { + log("\n"); + log(" quicklogic_eqn [selection]\n"); + log("\n"); + log("Calculate equations for luts since bitstream generator depends on it.\n"); + log("\n"); + } - Const init2eqn(Const init, int inputs) - { - std::string init_bits = init.as_string(); - const char* names[] = { "I0" , "I1", "I2", "I3", "I4" }; + Const init2eqn(Const init, int inputs) + { + std::string init_bits = init.as_string(); + const char *names[] = {"I0", "I1", "I2", "I3", "I4"}; - std::string eqn; - int width = (int)pow(2,inputs); - for(int i=0;i args, RTLIL::Design *design) override - { - log_header(design, "Executing Quicklogic_EQN pass (calculate equations for luts).\n"); + void execute(std::vector args, RTLIL::Design *design) override + { + log_header(design, "Executing Quicklogic_EQN pass (calculate equations for luts).\n"); - extra_args(args, args.size(), design); + extra_args(args, args.size(), design); - int cnt = 0; - for (auto module : design->selected_modules()) - { - for (auto cell : module->selected_cells()) - { - if (cell->type == ID(LUT1)) - { - cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),1)); - cnt++; - } - if (cell->type == ID(LUT2)) - { - cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),2)); - cnt++; - } - if (cell->type == ID(LUT3)) - { - cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),3)); - cnt++; - } - if (cell->type == ID(LUT4)) - { - cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),4)); - cnt++; - } - if (cell->type == ID(LUT5)) - { - cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT),5)); - cnt++; - } - } - } - log_header(design, "Updated %d of LUT* elements with equation.\n", cnt); - } + int cnt = 0; + for (auto module : design->selected_modules()) { + for (auto cell : module->selected_cells()) { + if (cell->type == ID(LUT1)) { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT), 1)); + cnt++; + } + if (cell->type == ID(LUT2)) { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT), 2)); + cnt++; + } + if (cell->type == ID(LUT3)) { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT), 3)); + cnt++; + } + if (cell->type == ID(LUT4)) { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT), 4)); + cnt++; + } + if (cell->type == ID(LUT5)) { + cell->setParam(ID(EQN), init2eqn(cell->getParam(ID::INIT), 5)); + cnt++; + } + } + } + log_header(design, "Updated %d of LUT* elements with equation.\n", cnt); + } } QuicklogicEqnPass; PRIVATE_NAMESPACE_END From cdeb605ae27ff65a34a88a3c01f6946ac0b89230 Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Fri, 2 Jul 2021 13:03:33 +0530 Subject: [PATCH 356/845] Fixing formating using clang-format Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 8fced1f51..8ff2111eb 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +#Copyright(C) 2020 - 2021 The SymbiFlow Authors. # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +#Use of this source code is governed by a ISC - style +#license that can be found in the LICENSE file or at +#https: // opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +#SPDX - License - Identifier : ISC NAME = ql-qlf SOURCES = synth_quicklogic.cc \ From e9ef76fc6ec13fdbb6d26df059f4da317e354c7e Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Fri, 2 Jul 2021 13:05:56 +0530 Subject: [PATCH 357/845] Fixing formating in Makefile Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 8ff2111eb..316bf72e8 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -10,7 +10,8 @@ NAME = ql-qlf SOURCES = synth_quicklogic.cc \ ql-dsp.cc \ pp3_braminit.cc \ - quicklogic_eqn.cc + quicklogic_eqn.cc + include ../Makefile_plugin.common COMMON = common From d6680775b656dd9f1526df2f90233d0f261ba1af Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Fri, 2 Jul 2021 13:12:19 +0530 Subject: [PATCH 358/845] Reverting formatting changes done by clang-format to the copyright message Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 316bf72e8..d45cb9f6f 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -1,10 +1,10 @@ -#Copyright(C) 2020 - 2021 The SymbiFlow Authors. +# Copyright (C) 2020-2021 The SymbiFlow Authors. # -#Use of this source code is governed by a ISC - style -#license that can be found in the LICENSE file or at -#https: // opensource.org/licenses/ISC +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC # -#SPDX - License - Identifier : ISC +# SPDX-License-Identifier:ISC NAME = ql-qlf SOURCES = synth_quicklogic.cc \ From 3701f7a15f122fc27813ffc8429cb3d53bd97393 Mon Sep 17 00:00:00 2001 From: Samy Date: Fri, 16 Jul 2021 17:39:26 +0200 Subject: [PATCH 359/845] Removing dff absorption operated by ql_dsp Signed-off-by: Samy --- ql-qlf-plugin/ql_dsp.pmg | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/ql-qlf-plugin/ql_dsp.pmg b/ql-qlf-plugin/ql_dsp.pmg index e607e6679..1d87ce4dd 100644 --- a/ql-qlf-plugin/ql_dsp.pmg +++ b/ql-qlf-plugin/ql_dsp.pmg @@ -63,7 +63,7 @@ endcode code argQ ffA sigA clock clock_pol if (mul->type != \QL_DSP || !param(mul, \A_REG).as_bool()) { argQ = sigA; - subpattern(in_dffe); + //subpattern(in_dffe); if (dff) { ffA = dff; clock = dffclock; @@ -76,7 +76,7 @@ endcode code argQ ffB sigB clock clock_pol if (mul->type != \QL_DSP || !param(mul, \B_REG).as_bool()) { argQ = sigB; - subpattern(in_dffe); + //subpattern(in_dffe); if (dff) { ffB = dff; clock = dffclock; @@ -91,7 +91,7 @@ code argD argSdff ffFJKG sigH clock clock_pol (mul->type != \QL_DSP)) { argD = sigH; argSdff = false; - subpattern(out_dffe); + //subpattern(out_dffe); if (dff) { // F/J/K/G do not have a CE-like (hold) input if (dff->hasPort(\EN)) @@ -135,7 +135,7 @@ code argD argSdff ffH sigH sigO clock clock_pol (mul->type != \QL_DSP)) { argD = sigH; argSdff = false; - subpattern(out_dffe); + //subpattern(out_dffe); if (dff) { // H does not have a CE-like (hold) input if (dff->hasPort(\EN)) @@ -222,7 +222,7 @@ code argD argSdff ffO sigO sigCD clock clock_pol cd_signed o_lo if (nusers(sigO) == 2) { argD = sigO; argSdff = !mux; - subpattern(out_dffe); + //subpattern(out_dffe); } // Otherwise try just its least significant 16 bits @@ -230,7 +230,7 @@ code argD argSdff ffO sigO sigCD clock clock_pol cd_signed o_lo argD = sigO.extract(0, 16); if (nusers(argD) == 2) { argSdff = !mux; - subpattern(out_dffe); + //subpattern(out_dffe); o_lo = dff; } } @@ -265,7 +265,7 @@ code argQ ffCD sigCD clock clock_pol if (!sigCD.empty() && sigCD != sigO && (mul->type != \QL_DSP || (!param(mul, \C_REG).as_bool() && !param(mul, \D_REG).as_bool()))) { argQ = sigCD; - subpattern(in_dffe); + //subpattern(in_dffe); if (dff) { // Reset signal of C (IRSTTOP) and D (IRSTBOT) // shared with A and B @@ -309,6 +309,10 @@ code endcode // ####################### +// Currently, QL_DSP performs only combinatorial operations +// but we aim to convert it into a mac unit in the futur +// so we're leaving the subpattern in the code, it is +// however not being used for now. subpattern in_dffe arg argD argQ clock clock_pol @@ -362,6 +366,10 @@ code argQ argD endcode // ####################### +// Currently, QL_DSP performs only combinatorial operations +// but we aim to convert it into a mac unit in the futur +// so we're leaving the subpattern in the code, it is +// however not being used for now. subpattern out_dffe arg argD argSdff argQ clock clock_pol From 6e344d20e763bc692b7800842e49e06120ce92be Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Mon, 26 Jul 2021 18:21:06 +0530 Subject: [PATCH 360/845] Rectifying the port name as 'a' instead of 'A' for logic_0 and logic_1 for pp3 device family Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/pp3/pp3_cells_sim.v | 8 ++++---- ql-qlf-plugin/synth_quicklogic.cc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ql-qlf-plugin/pp3/pp3_cells_sim.v b/ql-qlf-plugin/pp3/pp3_cells_sim.v index 4155744ae..4c062150a 100644 --- a/ql-qlf-plugin/pp3/pp3_cells_sim.v +++ b/ql-qlf-plugin/pp3/pp3_cells_sim.v @@ -21,15 +21,15 @@ module buff ( endmodule module logic_0 ( - output A + output a ); - assign A = 0; + assign a = 0; endmodule module logic_1 ( - output A + output a ); - assign A = 1; + assign a = 1; endmodule module gclkbuff ( diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 5b31cee7e..be59c3311 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -358,7 +358,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("setundef -zero -params -undriven"); } if (family == "pp3" || (check_label("edif") && (!edif_file.empty()))) { - run("hilomap -hicell logic_1 A -locell logic_0 A -singleton A:top"); + run("hilomap -hicell logic_1 a -locell logic_0 a -singleton A:top"); } run("opt_clean -purge"); run("check"); From a9c6b817fd3b80f43b20408efd9e6b2451ac8fe8 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 26 Jul 2021 13:15:15 +0200 Subject: [PATCH 361/845] Initial blackbox cell definitions and techmaps for PP3E ASSP[L/R] Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 3 +- ql-qlf-plugin/pp3/pp3_cells_sim.v | 3 + ql-qlf-plugin/pp3/pp3_qlal3_sim.v | 186 ++++++++++++++++++++++++++++++ 3 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/pp3/pp3_qlal3_sim.v diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index d45cb9f6f..61235526d 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -44,7 +44,8 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(PP3_DIR)/pp3_bram_init_8_16.vh \ $(PP3_DIR)/pp3_bram_init_32.vh \ $(PP3_DIR)/pp3_qlal4s3b_sim.v \ - $(PP3_DIR)/pp3_mult_sim.v + $(PP3_DIR)/pp3_mult_sim.v \ + $(PP3_DIR)/pp3_qlal3_sim.v \ retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) diff --git a/ql-qlf-plugin/pp3/pp3_cells_sim.v b/ql-qlf-plugin/pp3/pp3_cells_sim.v index 4c062150a..abf6e3ad6 100644 --- a/ql-qlf-plugin/pp3/pp3_cells_sim.v +++ b/ql-qlf-plugin/pp3/pp3_cells_sim.v @@ -480,7 +480,10 @@ endmodule // Include simulation models of QLAL4S3B eFPGA interface `include "pp3_qlal4s3b_sim.v" +// Include simulation models for QLAL3 hard blocks +`include "pp3_qlal3_sim.v" // Include BRAM and FIFO simulation models `include "pp3_brams_sim.v" // Include MULT simulation models `include "pp3_mult_sim.v" + diff --git a/ql-qlf-plugin/pp3/pp3_qlal3_sim.v b/ql-qlf-plugin/pp3/pp3_qlal3_sim.v new file mode 100644 index 000000000..1a72228c0 --- /dev/null +++ b/ql-qlf-plugin/pp3/pp3_qlal3_sim.v @@ -0,0 +1,186 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +(* blackbox *) +(* keep *) +module qlal3_left_assp_macro ( + input A2F_ACK, + output [ 8:0] A2F_ADDR, + output [ 8:0] A2F_Control, + input [ 8:0] A2F_GP_IN, + output [ 8:0] A2F_GP_OUT, + input [ 8:0] A2F_RD_DATA, + output A2F_REQ, + output A2F_RWn, + input [ 7:0] A2F_Status, + output [ 8:0] A2F_WR_DATA, + input [32:0] Amult0, + input [32:0] Bmult0, + output [64:0] Cmult0, + input [ 9:0] RAM0_ADDR, + input RAM0_CLK, + input RAM0_CLKS, + output [36:0] RAM0_RD_DATA, + input RAM0_RD_EN, + input RAM0_RME_af, + input [ 4:0] RAM0_RM_af, + input RAM0_TEST1_af, + input [ 4:0] RAM0_WR_BE, + input [36:0] RAM0_WR_DATA, + input RAM0_WR_EN, + input [12:0] RAM8K_P0_ADDR, + input RAM8K_P0_CLK, + input RAM8K_P0_CLKS, + input [ 2:0] RAM8K_P0_WR_BE, + input [17:0] RAM8K_P0_WR_DATA, + input RAM8K_P0_WR_EN, + input [12:0] RAM8K_P1_ADDR, + input RAM8K_P1_CLK, + input RAM8K_P1_CLKS, + output [17:0] RAM8K_P1_RD_DATA, + input RAM8K_P1_RD_EN, + input RAM8K_P1_mux, + input RAM8K_RME_af, + input [ 4:0] RAM8K_RM_af, + input RAM8K_TEST1_af, + output RAM8K_fifo_almost_empty, + output RAM8K_fifo_almost_full, + output [ 4:0] RAM8K_fifo_empty_flag, + input RAM8K_fifo_en, + output [ 4:0] RAM8K_fifo_full_flag, + input RESET_n, + input RESET_nS, + input SEL_18_bottom, + input SEL_18_left, + input SEL_18_right, + input SEL_18_top, + input SPI_CLK, + input SPI_CLKS, + output SPI_MISO, + output SPI_MISOe, + input SPI_MOSI, + input SPI_SSn, + output SYSCLK, + output SYSCLK_x2, + input Valid_mult0, + input [ 4:0] af_burnin_mode, + input [32:0] af_dev_id, + input af_fpga_int_en, + input af_opt_0, + input af_opt_1, + input \af_plat_id[0] , + input \af_plat_id[1] , + input \af_plat_id[2] , + input \af_plat_id[3] , + input \af_plat_id[4] , + input \af_plat_id[5] , + input \af_plat_id[6] , + input \af_plat_id[7] , + input af_spi_cpha, + input af_spi_cpol, + input af_spi_lsbf, + input default_SPI_IO_mux, + input drive_io_en_0, + input drive_io_en_1, + input drive_io_en_2, + input drive_io_en_3, + input drive_io_en_4, + input drive_io_en_5, + output fast_clk_out, + input [ 8:0] int_i, + output int_o, + input osc_en, + input osc_fsel, + input [ 3:0] osc_sel, + input [ 2:0] reg_addr_int, + input reg_clk_int, + input reg_clk_intS, + output [ 8:0] reg_rd_data_int, + input reg_rd_en_int, + input [ 8:0] reg_wr_data_int, + input reg_wr_en_int +); +endmodule + +(* blackbox *) +(* keep *) +module qlal3_right_assp_macro ( + input [32:0] Amult1, + input [32:0] Bmult1, + output [64:0] Cmult1, + output DrivingI2cBusOut, + input [ 9:0] RAM1_ADDR, + input RAM1_CLK, + input RAM1_CLKS, + output [36:0] RAM1_RD_DATA, + input RAM1_RD_EN, + input RAM1_RME_af, + input [ 4:0] RAM1_RM_af, + input RAM1_TEST1_af, + input [ 4:0] RAM1_WR_BE, + input [36:0] RAM1_WR_DATA, + input RAM1_WR_EN, + input [ 9:0] RAM2_P0_ADDR, + input RAM2_P0_CLK, + input RAM2_P0_CLKS, + input [ 4:0] RAM2_P0_WR_BE, + input [32:0] RAM2_P0_WR_DATA, + input RAM2_P0_WR_EN, + input [ 9:0] RAM2_P1_ADDR, + input RAM2_P1_CLK, + input RAM2_P1_CLKS, + output [32:0] RAM2_P1_RD_DATA, + input RAM2_P1_RD_EN, + input RAM2_RME_af, + input [ 4:0] RAM2_RM_af, + input RAM2_TEST1_af, + input [ 9:0] RAM3_P0_ADDR, + input RAM3_P0_CLK, + input RAM3_P0_CLKS, + input [32:0] RAM3_P0_WR_DATA, + input [ 4:0] RAM3_P0_WR_EN, + input [ 9:0] RAM3_P1_ADDR, + input RAM3_P1_CLK, + input RAM3_P1_CLKS, + output [32:0] RAM3_P1_RD_DATA, + input RAM3_P1_RD_EN, + input RAM3_RME_af, + input [ 4:0] RAM3_RM_af, + input RAM3_TEST1_af, + input SCL_i, + output SCL_o, + output SCL_oen, + input SDA_i, + output SDA_o, + output SDA_oen, + input Valid_mult1, + input al_clr_i, + output al_o, + input al_stick_en_i, + input arst, + input arstS, + output i2c_busy_o, + input rxack_clr_i, + output rxack_o, + input rxack_stick_en_i, + output tip_o, + output wb_ack, + input [ 3:0] wb_adr, + input wb_clk, + input wb_clkS, + input wb_cyc, + input [ 8:0] wb_dat_i, + output [ 8:0] wb_dat_o, + output wb_inta, + input wb_rst, + input wb_rstS, + input wb_stb, + input wb_we +); +endmodule + From 42cbb65810461289eaf0c4f8a63a1d5882ec4e36 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 27 Jul 2021 12:11:07 +0200 Subject: [PATCH 362/845] Added cells that represent functional parts of ASSPL and ASSPR macros Signed-off-by: Maciej Kurc --- ql-qlf-plugin/pp3/pp3_qlal3_sim.v | 309 +++++++++++++++++++++++++----- 1 file changed, 256 insertions(+), 53 deletions(-) diff --git a/ql-qlf-plugin/pp3/pp3_qlal3_sim.v b/ql-qlf-plugin/pp3/pp3_qlal3_sim.v index 1a72228c0..a922bd58f 100644 --- a/ql-qlf-plugin/pp3/pp3_qlal3_sim.v +++ b/ql-qlf-plugin/pp3/pp3_qlal3_sim.v @@ -10,49 +10,49 @@ (* keep *) module qlal3_left_assp_macro ( input A2F_ACK, - output [ 8:0] A2F_ADDR, - output [ 8:0] A2F_Control, - input [ 8:0] A2F_GP_IN, - output [ 8:0] A2F_GP_OUT, - input [ 8:0] A2F_RD_DATA, + output [ 7:0] A2F_ADDR, + output [ 7:0] A2F_Control, + input [ 7:0] A2F_GP_IN, + output [ 7:0] A2F_GP_OUT, + input [ 7:0] A2F_RD_DATA, output A2F_REQ, output A2F_RWn, - input [ 7:0] A2F_Status, - output [ 8:0] A2F_WR_DATA, - input [32:0] Amult0, - input [32:0] Bmult0, - output [64:0] Cmult0, - input [ 9:0] RAM0_ADDR, + input [ 6:0] A2F_Status, + output [ 7:0] A2F_WR_DATA, + input [31:0] Amult0, + input [31:0] Bmult0, + output [63:0] Cmult0, + input [ 8:0] RAM0_ADDR, input RAM0_CLK, input RAM0_CLKS, - output [36:0] RAM0_RD_DATA, + output [35:0] RAM0_RD_DATA, input RAM0_RD_EN, input RAM0_RME_af, - input [ 4:0] RAM0_RM_af, + input [ 3:0] RAM0_RM_af, input RAM0_TEST1_af, - input [ 4:0] RAM0_WR_BE, - input [36:0] RAM0_WR_DATA, + input [ 3:0] RAM0_WR_BE, + input [35:0] RAM0_WR_DATA, input RAM0_WR_EN, - input [12:0] RAM8K_P0_ADDR, + input [11:0] RAM8K_P0_ADDR, input RAM8K_P0_CLK, input RAM8K_P0_CLKS, - input [ 2:0] RAM8K_P0_WR_BE, - input [17:0] RAM8K_P0_WR_DATA, + input [ 1:0] RAM8K_P0_WR_BE, + input [16:0] RAM8K_P0_WR_DATA, input RAM8K_P0_WR_EN, - input [12:0] RAM8K_P1_ADDR, + input [11:0] RAM8K_P1_ADDR, input RAM8K_P1_CLK, input RAM8K_P1_CLKS, - output [17:0] RAM8K_P1_RD_DATA, + output [16:0] RAM8K_P1_RD_DATA, input RAM8K_P1_RD_EN, input RAM8K_P1_mux, input RAM8K_RME_af, - input [ 4:0] RAM8K_RM_af, + input [ 3:0] RAM8K_RM_af, input RAM8K_TEST1_af, output RAM8K_fifo_almost_empty, output RAM8K_fifo_almost_full, - output [ 4:0] RAM8K_fifo_empty_flag, + output [ 3:0] RAM8K_fifo_empty_flag, input RAM8K_fifo_en, - output [ 4:0] RAM8K_fifo_full_flag, + output [ 3:0] RAM8K_fifo_full_flag, input RESET_n, input RESET_nS, input SEL_18_bottom, @@ -68,8 +68,8 @@ module qlal3_left_assp_macro ( output SYSCLK, output SYSCLK_x2, input Valid_mult0, - input [ 4:0] af_burnin_mode, - input [32:0] af_dev_id, + input [ 3:0] af_burnin_mode, + input [31:0] af_dev_id, input af_fpga_int_en, input af_opt_0, input af_opt_1, @@ -92,17 +92,17 @@ module qlal3_left_assp_macro ( input drive_io_en_4, input drive_io_en_5, output fast_clk_out, - input [ 8:0] int_i, + input [ 7:0] int_i, output int_o, input osc_en, input osc_fsel, - input [ 3:0] osc_sel, - input [ 2:0] reg_addr_int, + input [ 2:0] osc_sel, + input [ 1:0] reg_addr_int, input reg_clk_int, input reg_clk_intS, - output [ 8:0] reg_rd_data_int, + output [ 7:0] reg_rd_data_int, input reg_rd_en_int, - input [ 8:0] reg_wr_data_int, + input [ 7:0] reg_wr_data_int, input reg_wr_en_int ); endmodule @@ -110,47 +110,47 @@ endmodule (* blackbox *) (* keep *) module qlal3_right_assp_macro ( - input [32:0] Amult1, - input [32:0] Bmult1, - output [64:0] Cmult1, + input [31:0] Amult1, + input [31:0] Bmult1, + output [63:0] Cmult1, output DrivingI2cBusOut, - input [ 9:0] RAM1_ADDR, + input [ 8:0] RAM1_ADDR, input RAM1_CLK, input RAM1_CLKS, - output [36:0] RAM1_RD_DATA, + output [35:0] RAM1_RD_DATA, input RAM1_RD_EN, input RAM1_RME_af, - input [ 4:0] RAM1_RM_af, + input [ 3:0] RAM1_RM_af, input RAM1_TEST1_af, - input [ 4:0] RAM1_WR_BE, - input [36:0] RAM1_WR_DATA, + input [ 3:0] RAM1_WR_BE, + input [35:0] RAM1_WR_DATA, input RAM1_WR_EN, - input [ 9:0] RAM2_P0_ADDR, + input [ 8:0] RAM2_P0_ADDR, input RAM2_P0_CLK, input RAM2_P0_CLKS, - input [ 4:0] RAM2_P0_WR_BE, - input [32:0] RAM2_P0_WR_DATA, + input [ 3:0] RAM2_P0_WR_BE, + input [31:0] RAM2_P0_WR_DATA, input RAM2_P0_WR_EN, - input [ 9:0] RAM2_P1_ADDR, + input [ 8:0] RAM2_P1_ADDR, input RAM2_P1_CLK, input RAM2_P1_CLKS, - output [32:0] RAM2_P1_RD_DATA, + output [31:0] RAM2_P1_RD_DATA, input RAM2_P1_RD_EN, input RAM2_RME_af, - input [ 4:0] RAM2_RM_af, + input [ 3:0] RAM2_RM_af, input RAM2_TEST1_af, - input [ 9:0] RAM3_P0_ADDR, + input [ 8:0] RAM3_P0_ADDR, input RAM3_P0_CLK, input RAM3_P0_CLKS, - input [32:0] RAM3_P0_WR_DATA, - input [ 4:0] RAM3_P0_WR_EN, - input [ 9:0] RAM3_P1_ADDR, + input [31:0] RAM3_P0_WR_DATA, + input [ 3:0] RAM3_P0_WR_EN, + input [ 8:0] RAM3_P1_ADDR, input RAM3_P1_CLK, input RAM3_P1_CLKS, - output [32:0] RAM3_P1_RD_DATA, + output [31:0] RAM3_P1_RD_DATA, input RAM3_P1_RD_EN, input RAM3_RME_af, - input [ 4:0] RAM3_RM_af, + input [ 3:0] RAM3_RM_af, input RAM3_TEST1_af, input SCL_i, output SCL_o, @@ -170,12 +170,12 @@ module qlal3_right_assp_macro ( input rxack_stick_en_i, output tip_o, output wb_ack, - input [ 3:0] wb_adr, + input [ 2:0] wb_adr, input wb_clk, input wb_clkS, input wb_cyc, - input [ 8:0] wb_dat_i, - output [ 8:0] wb_dat_o, + input [ 7:0] wb_dat_i, + output [ 7:0] wb_dat_o, output wb_inta, input wb_rst, input wb_rstS, @@ -184,3 +184,206 @@ module qlal3_right_assp_macro ( ); endmodule +// ============================================================================ +// Cells common to ASSPL and ASSPR + +(* blackbox *) +module qlal3_mult_32x32_cell ( + input [31:0] Amult, + input [31:0] Bmult, + input Valid_mult, + output [63:0] Cmult +); +endmodule + +(* blackbox *) +module qlal3_ram_512x36_cell ( + input [ 8:0] RAM_ADDR, + input RAM_CLK, + input RAM_CLKS, + output [35:0] RAM_RD_DATA, + input RAM_RD_EN, + input RAM_RME_af, + input [ 3:0] RAM_RM_af, + input RAM_TEST1_af, + input [ 3:0] RAM_WR_BE, + input [35:0] RAM_WR_DATA, + input RAM_WR_EN +); +endmodule + +(* blackbox *) +module qlal3_ram_512x32_cell ( + input [ 8:0] RAM_P0_ADDR, + input RAM_P0_CLK, + input RAM_P0_CLKS, + input [ 3:0] RAM_P0_WR_BE, + input [31:0] RAM_P0_WR_DATA, + input RAM_P0_WR_EN, + input [ 8:0] RAM_P1_ADDR, + input RAM_P1_CLK, + input RAM_P1_CLKS, + output [31:0] RAM_P1_RD_DATA, + input RAM_P1_RD_EN, + input RAM_RME_af, + input [ 3:0] RAM_RM_af, + input RAM_TEST1_af, +); +endmodule + +(* blackbox *) +module qlal3_ram_4096x17_cell ( + input [11:0] RAM_P0_ADDR, + input RAM_P0_CLK, + input RAM_P0_CLKS, + input [ 1:0] RAM_P0_WR_BE, + input [16:0] RAM_P0_WR_DATA, + input RAM_P0_WR_EN, + input [11:0] RAM_P1_ADDR, + input RAM_P1_CLK, + input RAM_P1_CLKS, + output [16:0] RAM_P1_RD_DATA, + input RAM_P1_RD_EN, + input RAM_P1_mux, + input RAM_RME_af, + input [ 3:0] RAM_RM_af, + input RAM_TEST1_af, + output RAM_fifo_almost_empty, + output RAM_fifo_almost_full, + output [ 3:0] RAM_fifo_empty_flag, + input RAM_fifo_en, + output [ 3:0] RAM_fifo_full_flag +); +endmodule + +// ============================================================================ +// Cells specific to ASSPL + +(* blackbox *) +module qlal3_spi_cell ( + input A2F_ACK, + output [ 7:0] A2F_ADDR, + output [ 7:0] A2F_Control, + input [ 7:0] A2F_GP_IN, + output [ 7:0] A2F_GP_OUT, + input [ 7:0] A2F_RD_DATA, + output A2F_REQ, + output A2F_RWn, + input [ 6:0] A2F_Status, + output [ 7:0] A2F_WR_DATA, + + input af_spi_cpha, + input af_spi_cpol, + input af_spi_lsbf, + + input SPI_CLK, + input SPI_CLKS, + output SPI_MISO, + output SPI_MISOe, + input SPI_MOSI, + input SPI_SSn +); +endmodule + +(* blackbox *) +module qlal3_interrupt_controller_cell ( + input af_fpga_int_en, + input [ 7:0] int_i, + output int_o, + + input [ 1:0] reg_addr_int, + input reg_clk_int, + input reg_clk_intS, + output [ 7:0] reg_rd_data_int, + input reg_rd_en_int, + input [ 7:0] reg_wr_data_int, + input reg_wr_en_int +); +endmodule + +(* blackbox *) +module qlal3_oscillator_cell ( + input osc_en, + input osc_fsel, + input [ 2:0] osc_sel, + output fast_clk_out +); +endmodule + +(* blackbox *) +module qlal3_io_control_cell ( + input default_SPI_IO_mux, + input drive_io_en_0, + input drive_io_en_1, + input drive_io_en_2, + input drive_io_en_3, + input drive_io_en_4, + input drive_io_en_5 +); +endmodule + +(* blackbox *) +module qlal3_system_cell ( + input RESET_n, + input RESET_nS, + input SEL_18_bottom, + input SEL_18_left, + input SEL_18_right, + input SEL_18_top, + output SYSCLK, + output SYSCLK_x2, + input [ 3:0] af_burnin_mode, + input [31:0] af_dev_id, + input af_opt_0, + input af_opt_1, + input \af_plat_id[0] , + input \af_plat_id[1] , + input \af_plat_id[2] , + input \af_plat_id[3] , + input \af_plat_id[4] , + input \af_plat_id[5] , + input \af_plat_id[6] , + input \af_plat_id[7] +); +endmodule + +// ============================================================================ +// Cells specific to ASSPR + +(* blackbox *) +module qlal3_i2c_cell ( + input arst, + input arstS, + + output wb_ack, + input [ 2:0] wb_adr, + input wb_clk, + input wb_clkS, + input wb_cyc, + input [ 7:0] wb_dat_i, + output [ 7:0] wb_dat_o, + output wb_inta, + input wb_rst, + input wb_rstS, + input wb_stb, + input wb_we, + + input al_clr_i, + output al_o, + input al_stick_en_i, + output i2c_busy_o, + input rxack_clr_i, + output rxack_o, + input rxack_stick_en_i, + output tip_o, + output DrivingI2cBusOut, + + input SCL_i, + output SCL_o, + output SCL_oen, + input SDA_i, + output SDA_o, + output SDA_oen +); +endmodule + From bf1cc0a1dbfac1bbc84d72547985ec261c9e5477 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Fri, 13 Aug 2021 12:46:16 +0200 Subject: [PATCH 363/845] ql plugin: move all families libraries in family directories Signed-off-by: Alessandro Comodi --- ql-qlf-plugin/Makefile | 62 +++++++++---------- .../pp3/{pp3_abc9_map.v => abc9_map.v} | 0 .../pp3/{pp3_abc9_model.v => abc9_model.v} | 0 .../pp3/{pp3_abc9_unmap.v => abc9_unmap.v} | 0 .../{pp3_bram_init_32.vh => bram_init_32.vh} | 0 ...p3_bram_init_8_16.vh => bram_init_8_16.vh} | 0 .../pp3/{pp3_brams.txt => brams.txt} | 0 .../pp3/{pp3_brams_map.v => brams_map.v} | 6 +- .../pp3/{pp3_brams_sim.v => brams_sim.v} | 6 +- .../pp3/{pp3_cells_map.v => cells_map.v} | 0 .../pp3/{pp3_cells_sim.v => cells_sim.v} | 8 +-- .../pp3/{pp3_ffs_map.v => ffs_map.v} | 0 .../pp3/{pp3_latches_map.v => latches_map.v} | 0 .../pp3/{pp3_lut_map.v => lut_map.v} | 0 .../pp3/{pp3_lutdefs.txt => lutdefs.txt} | 0 .../pp3/{pp3_mult_sim.v => mult_sim.v} | 0 .../pp3/{pp3_qlal3_sim.v => qlal3_sim.v} | 0 .../{pp3_qlal4s3b_sim.v => qlal4s3b_sim.v} | 0 .../arith_map.v} | 0 .../cells_sim.v} | 0 .../qlf_k4n8_ffs_map.v => qlf_k4n8/ffs_map.v} | 0 .../arith_map.v} | 0 .../brams.txt} | 0 .../brams_map.v} | 0 .../cells_sim.v} | 0 .../dsp_map.v} | 0 .../ffs_map.v} | 0 .../lut_map.v} | 0 ql-qlf-plugin/synth_quicklogic.cc | 28 ++++----- ql-qlf-plugin/tests/dffs/dffs.tcl | 16 ++--- ql-qlf-plugin/tests/fsm/fsm.tcl | 2 +- ql-qlf-plugin/tests/full_adder/full_adder.tcl | 12 ++-- ql-qlf-plugin/tests/logic/logic.tcl | 6 +- ql-qlf-plugin/tests/logic/logic.ys | 2 +- ql-qlf-plugin/tests/mux/mux.tcl | 8 +-- ql-qlf-plugin/tests/qlf_k6n10_bram/bram.ys | 8 +-- ql-qlf-plugin/tests/tribuf/tribuf.tcl | 2 +- 37 files changed, 83 insertions(+), 83 deletions(-) rename ql-qlf-plugin/pp3/{pp3_abc9_map.v => abc9_map.v} (100%) rename ql-qlf-plugin/pp3/{pp3_abc9_model.v => abc9_model.v} (100%) rename ql-qlf-plugin/pp3/{pp3_abc9_unmap.v => abc9_unmap.v} (100%) rename ql-qlf-plugin/pp3/{pp3_bram_init_32.vh => bram_init_32.vh} (100%) rename ql-qlf-plugin/pp3/{pp3_bram_init_8_16.vh => bram_init_8_16.vh} (100%) rename ql-qlf-plugin/pp3/{pp3_brams.txt => brams.txt} (100%) rename ql-qlf-plugin/pp3/{pp3_brams_map.v => brams_map.v} (99%) rename ql-qlf-plugin/pp3/{pp3_brams_sim.v => brams_sim.v} (99%) rename ql-qlf-plugin/pp3/{pp3_cells_map.v => cells_map.v} (100%) rename ql-qlf-plugin/pp3/{pp3_cells_sim.v => cells_sim.v} (98%) rename ql-qlf-plugin/pp3/{pp3_ffs_map.v => ffs_map.v} (100%) rename ql-qlf-plugin/pp3/{pp3_latches_map.v => latches_map.v} (100%) rename ql-qlf-plugin/pp3/{pp3_lut_map.v => lut_map.v} (100%) rename ql-qlf-plugin/pp3/{pp3_lutdefs.txt => lutdefs.txt} (100%) rename ql-qlf-plugin/pp3/{pp3_mult_sim.v => mult_sim.v} (100%) rename ql-qlf-plugin/pp3/{pp3_qlal3_sim.v => qlal3_sim.v} (100%) rename ql-qlf-plugin/pp3/{pp3_qlal4s3b_sim.v => qlal4s3b_sim.v} (100%) rename ql-qlf-plugin/{ql-qlf-k4n8/qlf_k4n8_arith_map.v => qlf_k4n8/arith_map.v} (100%) rename ql-qlf-plugin/{ql-qlf-k4n8/qlf_k4n8_cells_sim.v => qlf_k4n8/cells_sim.v} (100%) rename ql-qlf-plugin/{ql-qlf-k4n8/qlf_k4n8_ffs_map.v => qlf_k4n8/ffs_map.v} (100%) rename ql-qlf-plugin/{ql-qlf-k6n10/qlf_k6n10_arith_map.v => qlf_k6n10/arith_map.v} (100%) rename ql-qlf-plugin/{ql-qlf-k6n10/qlf_k6n10_brams.txt => qlf_k6n10/brams.txt} (100%) rename ql-qlf-plugin/{ql-qlf-k6n10/qlf_k6n10_brams_map.v => qlf_k6n10/brams_map.v} (100%) rename ql-qlf-plugin/{ql-qlf-k6n10/qlf_k6n10_cells_sim.v => qlf_k6n10/cells_sim.v} (100%) rename ql-qlf-plugin/{ql-qlf-k6n10/qlf_k6n10_dsp_map.v => qlf_k6n10/dsp_map.v} (100%) rename ql-qlf-plugin/{ql-qlf-k6n10/qlf_k6n10_ffs_map.v => qlf_k6n10/ffs_map.v} (100%) rename ql-qlf-plugin/{ql-qlf-k6n10/qlf_k6n10_lut_map.v => qlf_k6n10/lut_map.v} (100%) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 61235526d..e6f7a63a6 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -15,44 +15,44 @@ SOURCES = synth_quicklogic.cc \ include ../Makefile_plugin.common COMMON = common -QLF_K4N8_DIR = ql-qlf-k4n8 -QLF_K6N10_DIR = ql-qlf-k6n10 +QLF_K4N8_DIR = qlf_k4n8 +QLF_K6N10_DIR = qlf_k6n10 PP3_DIR = pp3 -VERILOG_MODULES = $(COMMON)/cells_sim.v \ - $(QLF_K4N8_DIR)/qlf_k4n8_arith_map.v \ - $(QLF_K4N8_DIR)/qlf_k4n8_cells_sim.v \ - $(QLF_K4N8_DIR)/qlf_k4n8_ffs_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_arith_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_brams_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_brams.txt \ - $(QLF_K6N10_DIR)/qlf_k6n10_cells_sim.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_ffs_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_dsp_map.v \ - $(QLF_K6N10_DIR)/qlf_k6n10_lut_map.v \ - $(PP3_DIR)/pp3_abc9_map.v \ - $(PP3_DIR)/pp3_abc9_model.v \ - $(PP3_DIR)/pp3_abc9_unmap.v \ - $(PP3_DIR)/pp3_cells_map.v \ - $(PP3_DIR)/pp3_cells_sim.v \ - $(PP3_DIR)/pp3_ffs_map.v \ - $(PP3_DIR)/pp3_latches_map.v \ - $(PP3_DIR)/pp3_lut_map.v \ - $(PP3_DIR)/pp3_lutdefs.txt \ - $(PP3_DIR)/pp3_brams_sim.v \ - $(PP3_DIR)/pp3_brams_map.v \ - $(PP3_DIR)/pp3_brams.txt \ - $(PP3_DIR)/pp3_bram_init_8_16.vh \ - $(PP3_DIR)/pp3_bram_init_32.vh \ - $(PP3_DIR)/pp3_qlal4s3b_sim.v \ - $(PP3_DIR)/pp3_mult_sim.v \ - $(PP3_DIR)/pp3_qlal3_sim.v \ +VERILOG_MODULES = $(COMMON)/cells_sim.v \ + $(QLF_K4N8_DIR)/arith_map.v \ + $(QLF_K4N8_DIR)/cells_sim.v \ + $(QLF_K4N8_DIR)/ffs_map.v \ + $(QLF_K6N10_DIR)/arith_map.v \ + $(QLF_K6N10_DIR)/brams_map.v \ + $(QLF_K6N10_DIR)/brams.txt \ + $(QLF_K6N10_DIR)/cells_sim.v \ + $(QLF_K6N10_DIR)/ffs_map.v \ + $(QLF_K6N10_DIR)/dsp_map.v \ + $(QLF_K6N10_DIR)/lut_map.v \ + $(PP3_DIR)/abc9_map.v \ + $(PP3_DIR)/abc9_model.v \ + $(PP3_DIR)/abc9_unmap.v \ + $(PP3_DIR)/cells_map.v \ + $(PP3_DIR)/cells_sim.v \ + $(PP3_DIR)/ffs_map.v \ + $(PP3_DIR)/latches_map.v \ + $(PP3_DIR)/lut_map.v \ + $(PP3_DIR)/lutdefs.txt \ + $(PP3_DIR)/brams_sim.v \ + $(PP3_DIR)/brams_map.v \ + $(PP3_DIR)/brams.txt \ + $(PP3_DIR)/bram_init_8_16.vh \ + $(PP3_DIR)/bram_init_32.vh \ + $(PP3_DIR)/qlal4s3b_sim.v \ + $(PP3_DIR)/mult_sim.v \ + $(PP3_DIR)/qlal3_sim.v \ retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg) install_modules: $(VERILOG_MODULES) - $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(notdir $(f));) + $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);) install: install_modules diff --git a/ql-qlf-plugin/pp3/pp3_abc9_map.v b/ql-qlf-plugin/pp3/abc9_map.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_abc9_map.v rename to ql-qlf-plugin/pp3/abc9_map.v diff --git a/ql-qlf-plugin/pp3/pp3_abc9_model.v b/ql-qlf-plugin/pp3/abc9_model.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_abc9_model.v rename to ql-qlf-plugin/pp3/abc9_model.v diff --git a/ql-qlf-plugin/pp3/pp3_abc9_unmap.v b/ql-qlf-plugin/pp3/abc9_unmap.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_abc9_unmap.v rename to ql-qlf-plugin/pp3/abc9_unmap.v diff --git a/ql-qlf-plugin/pp3/pp3_bram_init_32.vh b/ql-qlf-plugin/pp3/bram_init_32.vh similarity index 100% rename from ql-qlf-plugin/pp3/pp3_bram_init_32.vh rename to ql-qlf-plugin/pp3/bram_init_32.vh diff --git a/ql-qlf-plugin/pp3/pp3_bram_init_8_16.vh b/ql-qlf-plugin/pp3/bram_init_8_16.vh similarity index 100% rename from ql-qlf-plugin/pp3/pp3_bram_init_8_16.vh rename to ql-qlf-plugin/pp3/bram_init_8_16.vh diff --git a/ql-qlf-plugin/pp3/pp3_brams.txt b/ql-qlf-plugin/pp3/brams.txt similarity index 100% rename from ql-qlf-plugin/pp3/pp3_brams.txt rename to ql-qlf-plugin/pp3/brams.txt diff --git a/ql-qlf-plugin/pp3/pp3_brams_map.v b/ql-qlf-plugin/pp3/brams_map.v similarity index 99% rename from ql-qlf-plugin/pp3/pp3_brams_map.v rename to ql-qlf-plugin/pp3/brams_map.v index 7e34cd300..1941a3dfe 100644 --- a/ql-qlf-plugin/pp3/pp3_brams_map.v +++ b/ql-qlf-plugin/pp3/brams_map.v @@ -71,7 +71,7 @@ module \$__QUICKLOGIC_RAMB16K ( generate if (CFG_DBITS <= 16) begin ram8k_2x1_cell_macro #( - `include "pp3_bram_init_32.vh" + `include "bram_init_32.vh" ) _TECHMAP_REPLACE_ ( .A1_0(B1ADDR), .A1_1(GND), @@ -138,7 +138,7 @@ module \$__QUICKLOGIC_RAMB16K ( ); end else if (CFG_DBITS <= 32) begin ram8k_2x1_cell_macro #( - `include "pp3_bram_init_32.vh" + `include "bram_init_32.vh" ) _TECHMAP_REPLACE_ ( .A1_0(B1ADDR), .A1_1(GND), @@ -287,7 +287,7 @@ module \$__QUICKLOGIC_RAMB8K ( end ram8k_2x1_cell_macro #( - `include "pp3_bram_init_8_16.vh" + `include "bram_init_8_16.vh" ) _TECHMAP_REPLACE_ ( .A1_0(B1ADDR_11), .A1_1(GND), diff --git a/ql-qlf-plugin/pp3/pp3_brams_sim.v b/ql-qlf-plugin/pp3/brams_sim.v similarity index 99% rename from ql-qlf-plugin/pp3/pp3_brams_sim.v rename to ql-qlf-plugin/pp3/brams_sim.v index 4d1822a5c..279585265 100644 --- a/ql-qlf-plugin/pp3/pp3_brams_sim.v +++ b/ql-qlf-plugin/pp3/brams_sim.v @@ -2129,7 +2129,7 @@ module RAM_8K_BLK ( endgenerate ram8k_2x1_cell_macro #( - `include "pp3_bram_init_8_16.vh" + `include "bram_init_8_16.vh" .INIT_FILE(INIT_FILE), .data_width_int(data_width_int), .data_depth_int(data_depth_int) @@ -2332,7 +2332,7 @@ module RAM_16K_BLK ( if (data_width_int <= 16) begin ram8k_2x1_cell_macro #( - `include "pp3_bram_init_8_16.vh" + `include "bram_init_8_16.vh" .INIT_FILE(INIT_FILE), .data_width_int(data_width_int), .data_depth_int(data_depth_int) @@ -2409,7 +2409,7 @@ module RAM_16K_BLK ( end else if (data_width_int > 16) begin ram8k_2x1_cell_macro #( - `include "pp3_bram_init_32.vh" + `include "bram_init_32.vh" .INIT_FILE(INIT_FILE), .data_width_int(data_width_int), .data_depth_int(data_depth_int) diff --git a/ql-qlf-plugin/pp3/pp3_cells_map.v b/ql-qlf-plugin/pp3/cells_map.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_cells_map.v rename to ql-qlf-plugin/pp3/cells_map.v diff --git a/ql-qlf-plugin/pp3/pp3_cells_sim.v b/ql-qlf-plugin/pp3/cells_sim.v similarity index 98% rename from ql-qlf-plugin/pp3/pp3_cells_sim.v rename to ql-qlf-plugin/pp3/cells_sim.v index abf6e3ad6..e498d4e87 100644 --- a/ql-qlf-plugin/pp3/pp3_cells_sim.v +++ b/ql-qlf-plugin/pp3/cells_sim.v @@ -479,11 +479,11 @@ module logic_cell_macro ( endmodule // Include simulation models of QLAL4S3B eFPGA interface -`include "pp3_qlal4s3b_sim.v" +`include "qlal4s3b_sim.v" // Include simulation models for QLAL3 hard blocks -`include "pp3_qlal3_sim.v" +`include "qlal3_sim.v" // Include BRAM and FIFO simulation models -`include "pp3_brams_sim.v" +`include "brams_sim.v" // Include MULT simulation models -`include "pp3_mult_sim.v" +`include "mult_sim.v" diff --git a/ql-qlf-plugin/pp3/pp3_ffs_map.v b/ql-qlf-plugin/pp3/ffs_map.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_ffs_map.v rename to ql-qlf-plugin/pp3/ffs_map.v diff --git a/ql-qlf-plugin/pp3/pp3_latches_map.v b/ql-qlf-plugin/pp3/latches_map.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_latches_map.v rename to ql-qlf-plugin/pp3/latches_map.v diff --git a/ql-qlf-plugin/pp3/pp3_lut_map.v b/ql-qlf-plugin/pp3/lut_map.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_lut_map.v rename to ql-qlf-plugin/pp3/lut_map.v diff --git a/ql-qlf-plugin/pp3/pp3_lutdefs.txt b/ql-qlf-plugin/pp3/lutdefs.txt similarity index 100% rename from ql-qlf-plugin/pp3/pp3_lutdefs.txt rename to ql-qlf-plugin/pp3/lutdefs.txt diff --git a/ql-qlf-plugin/pp3/pp3_mult_sim.v b/ql-qlf-plugin/pp3/mult_sim.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_mult_sim.v rename to ql-qlf-plugin/pp3/mult_sim.v diff --git a/ql-qlf-plugin/pp3/pp3_qlal3_sim.v b/ql-qlf-plugin/pp3/qlal3_sim.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_qlal3_sim.v rename to ql-qlf-plugin/pp3/qlal3_sim.v diff --git a/ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v b/ql-qlf-plugin/pp3/qlal4s3b_sim.v similarity index 100% rename from ql-qlf-plugin/pp3/pp3_qlal4s3b_sim.v rename to ql-qlf-plugin/pp3/qlal4s3b_sim.v diff --git a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_arith_map.v b/ql-qlf-plugin/qlf_k4n8/arith_map.v similarity index 100% rename from ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_arith_map.v rename to ql-qlf-plugin/qlf_k4n8/arith_map.v diff --git a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v b/ql-qlf-plugin/qlf_k4n8/cells_sim.v similarity index 100% rename from ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_cells_sim.v rename to ql-qlf-plugin/qlf_k4n8/cells_sim.v diff --git a/ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v b/ql-qlf-plugin/qlf_k4n8/ffs_map.v similarity index 100% rename from ql-qlf-plugin/ql-qlf-k4n8/qlf_k4n8_ffs_map.v rename to ql-qlf-plugin/qlf_k4n8/ffs_map.v diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v b/ql-qlf-plugin/qlf_k6n10/arith_map.v similarity index 100% rename from ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_arith_map.v rename to ql-qlf-plugin/qlf_k6n10/arith_map.v diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams.txt b/ql-qlf-plugin/qlf_k6n10/brams.txt similarity index 100% rename from ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams.txt rename to ql-qlf-plugin/qlf_k6n10/brams.txt diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v b/ql-qlf-plugin/qlf_k6n10/brams_map.v similarity index 100% rename from ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_brams_map.v rename to ql-qlf-plugin/qlf_k6n10/brams_map.v diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v b/ql-qlf-plugin/qlf_k6n10/cells_sim.v similarity index 100% rename from ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_cells_sim.v rename to ql-qlf-plugin/qlf_k6n10/cells_sim.v diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v b/ql-qlf-plugin/qlf_k6n10/dsp_map.v similarity index 100% rename from ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_dsp_map.v rename to ql-qlf-plugin/qlf_k6n10/dsp_map.v diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v b/ql-qlf-plugin/qlf_k6n10/ffs_map.v similarity index 100% rename from ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_ffs_map.v rename to ql-qlf-plugin/qlf_k6n10/ffs_map.v diff --git a/ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_lut_map.v b/ql-qlf-plugin/qlf_k6n10/lut_map.v similarity index 100% rename from ql-qlf-plugin/ql-qlf-k6n10/qlf_k6n10_lut_map.v rename to ql-qlf-plugin/qlf_k6n10/lut_map.v diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index be59c3311..95d216146 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -190,9 +190,9 @@ struct SynthQuickLogicPass : public ScriptPass { { if (check_label("begin")) { std::string readVelArgs; - readVelArgs = " +/quicklogic/" + family + "_cells_sim.v"; + readVelArgs = " +/quicklogic/" + family + "/cells_sim.v"; - run("read_verilog -lib -specify +/quicklogic/cells_sim.v" + readVelArgs); + run("read_verilog -lib -specify +/quicklogic/common/cells_sim.v" + readVelArgs); run(stringf("hierarchy -check %s", help_mode ? "-top " : top_opt.c_str())); } @@ -221,7 +221,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("memory_dff"); run("wreduce t:$mul"); run("techmap -map +/mul2dsp.v -map +/quicklogic/" + family + - "_dsp_map.v -D DSP_A_MAXWIDTH=16 -D DSP_B_MAXWIDTH=16 " + "/dsp_map.v -D DSP_A_MAXWIDTH=16 -D DSP_B_MAXWIDTH=16 " "-D DSP_A_MINWIDTH=2 -D DSP_B_MINWIDTH=2 -D DSP_Y_MINWIDTH=11 " "-D DSP_NAME=$__MUL16X16", "(if -no_dsp)"); @@ -245,11 +245,11 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_bram", "(skip if -no_bram)") && (family == "qlf_k6n10" || family == "pp3") && inferBram) { - run("memory_bram -rules +/quicklogic/" + family + "_brams.txt"); + run("memory_bram -rules +/quicklogic/" + family + "/brams.txt"); if (family == "pp3") { run("pp3_braminit"); } - run("techmap -map +/quicklogic/" + family + "_brams_map.v"); + run("techmap -map +/quicklogic/" + family + "/brams_map.v"); } if (check_label("map_ffram")) { @@ -262,7 +262,7 @@ struct SynthQuickLogicPass : public ScriptPass { if (check_label("map_gates")) { if (inferAdder && (family == "qlf_k4n8" || family == "qlf_k6n10")) { - run("techmap -map +/techmap.v -map +/quicklogic/" + family + "_arith_map.v"); + run("techmap -map +/techmap.v -map +/quicklogic/" + family + "/arith_map.v"); } else { run("techmap"); } @@ -289,9 +289,9 @@ struct SynthQuickLogicPass : public ScriptPass { // $_DLATCH_SRPPP_ 0"); } else if (family == "pp3") { run("dfflegalize -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_?_ x"); - run("techmap -map +/quicklogic/" + family + "_cells_map.v"); + run("techmap -map +/quicklogic/" + family + "/cells_map.v"); } - std::string techMapArgs = " -map +/techmap.v -map +/quicklogic/" + family + "_ffs_map.v"; + std::string techMapArgs = " -map +/techmap.v -map +/quicklogic/" + family + "/ffs_map.v"; if (!noffmap) { run("techmap " + techMapArgs); } @@ -310,14 +310,14 @@ struct SynthQuickLogicPass : public ScriptPass { } else if (family == "qlf_k4n8") { run("abc -lut 4 "); } else if (family == "pp3") { - run("techmap -map +/quicklogic/" + family + "_latches_map.v"); + run("techmap -map +/quicklogic/" + family + "/latches_map.v"); if (abc9) { - run("read_verilog -lib -specify -icells +/quicklogic/" + family + "_abc9_model.v"); - run("techmap -map +/quicklogic/" + family + "_abc9_map.v"); + run("read_verilog -lib -specify -icells +/quicklogic/" + family + "/abc9_model.v"); + run("techmap -map +/quicklogic/" + family + "/abc9_map.v"); run("abc9 -maxlut 4 -dff"); - run("techmap -map +/quicklogic/" + family + "_abc9_unmap.v"); + run("techmap -map +/quicklogic/" + family + "/abc9_unmap.v"); } else { - std::string lutDefs = "+/quicklogic/" + family + "_lutdefs.txt"; + std::string lutDefs = "+/quicklogic/" + family + "/lutdefs.txt"; rewrite_filename(lutDefs); std::string abcArgs = "+read_lut," + lutDefs + @@ -336,7 +336,7 @@ struct SynthQuickLogicPass : public ScriptPass { if (check_label("map_cells") && (family == "qlf_k6n10" || family == "pp3")) { std::string techMapArgs; - techMapArgs = "-map +/quicklogic/" + family + "_lut_map.v"; + techMapArgs = "-map +/quicklogic/" + family + "/lut_map.v"; run("techmap " + techMapArgs); run("clean"); } diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index 9b1941c86..d96b3e6b5 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -8,7 +8,7 @@ design -save read # DFF hierarchy -top my_dff yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 -top my_dff +equiv_opt -assert -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 -top my_dff design -load postopt yosys cd my_dff stat @@ -163,7 +163,7 @@ design -save read # DFF hierarchy -top my_dff yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top my_dff +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 -top my_dff design -load postopt yosys cd my_dff stat @@ -412,7 +412,7 @@ design -save read # DFF hierarchy -top my_dff yosys proc -equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dff +equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_dff design -load postopt yosys cd my_dff stat @@ -427,7 +427,7 @@ select -assert-count 1 t:logic_1 design -load read hierarchy -top my_dffe yosys proc -equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffe +equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_dffe design -load postopt yosys cd my_dffe stat @@ -441,7 +441,7 @@ select -assert-count 1 t:logic_0 design -load read hierarchy -top my_dffr_p yosys proc -equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffr_p +equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_dffr_p design -load postopt yosys cd my_dffr_p stat @@ -458,7 +458,7 @@ select -assert-none t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad %% t:* design -load read hierarchy -top my_dffr_n yosys proc -equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffr_n +equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_dffr_n design -load postopt yosys cd my_dffr_n stat @@ -476,7 +476,7 @@ select -assert-none t:LUT1 t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad design -load read hierarchy -top my_dffs_clk_p yosys proc -equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffs_clk_p +equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_dffs_clk_p design -load postopt yosys cd my_dffs_clk_p stat @@ -494,7 +494,7 @@ select -assert-none t:LUT2 t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad design -load read hierarchy -top my_dffs_clk_n yosys proc -equiv_opt -async2sync -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 -top my_dffs_clk_n +equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_dffs_clk_n design -load postopt yosys cd my_dffs_clk_n stat diff --git a/ql-qlf-plugin/tests/fsm/fsm.tcl b/ql-qlf-plugin/tests/fsm/fsm.tcl index d6d72e23d..2e096776d 100644 --- a/ql-qlf-plugin/tests/fsm/fsm.tcl +++ b/ql-qlf-plugin/tests/fsm/fsm.tcl @@ -9,7 +9,7 @@ hierarchy -top fsm yosys proc flatten -equiv_opt -run :prove -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +equiv_opt -run :prove -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 async2sync miter -equiv -make_assert -flatten gold gate miter sat -verify -prove-asserts -show-public -set-at 1 in_reset 1 -seq 20 -prove-skip 1 miter diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index 309308679..6365284dd 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -6,7 +6,7 @@ yosys -import ;# ingest plugin commands read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top full_adder yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 +equiv_opt -assert -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 design -reset @@ -14,14 +14,14 @@ design -reset read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top subtractor yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 +equiv_opt -assert -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 design -reset # Equivalence check for adder synthesis for qlf-k6n10 read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top full_adder yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 design -reset @@ -31,7 +31,7 @@ design -reset #read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v #hierarchy -check -top subtractor #yosys proc -#equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 +#equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 design -reset @@ -39,7 +39,7 @@ design -reset read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top full_adder yosys proc -equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +equiv_opt -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 design -load postopt yosys cd full_adder @@ -58,7 +58,7 @@ design -reset read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top subtractor yosys proc -equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +equiv_opt -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 design -load postopt yosys cd subtractor diff --git a/ql-qlf-plugin/tests/logic/logic.tcl b/ql-qlf-plugin/tests/logic/logic.tcl index 6bfb7cbb9..0e10db5cf 100644 --- a/ql-qlf-plugin/tests/logic/logic.tcl +++ b/ql-qlf-plugin/tests/logic/logic.tcl @@ -6,7 +6,7 @@ yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v hierarchy -top top yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 +equiv_opt -assert -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 design -load postopt yosys cd top @@ -19,7 +19,7 @@ design -reset read_verilog $::env(DESIGN_TOP).v hierarchy -top top yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 design -load postopt yosys cd top @@ -32,7 +32,7 @@ design -reset read_verilog $::env(DESIGN_TOP).v hierarchy -top top yosys proc -equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +equiv_opt -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 design -load postopt yosys cd top diff --git a/ql-qlf-plugin/tests/logic/logic.ys b/ql-qlf-plugin/tests/logic/logic.ys index c7f0cd50d..037896c37 100644 --- a/ql-qlf-plugin/tests/logic/logic.ys +++ b/ql-qlf-plugin/tests/logic/logic.ys @@ -2,7 +2,7 @@ plugin -i ql-qlf read_verilog ./logic.v hierarchy -top top proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8_cells_sim.v synth_quicklogic -family qlf_k4n8 +equiv_opt -assert -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 design -load postopt cd top diff --git a/ql-qlf-plugin/tests/mux/mux.tcl b/ql-qlf-plugin/tests/mux/mux.tcl index 260e2422b..47a1e1b4b 100644 --- a/ql-qlf-plugin/tests/mux/mux.tcl +++ b/ql-qlf-plugin/tests/mux/mux.tcl @@ -7,7 +7,7 @@ design -save read hierarchy -top mux2 yosys proc -equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +equiv_opt -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 design -load postopt yosys cd mux2 select -assert-count 1 t:LUT3 @@ -19,7 +19,7 @@ select -assert-none t:LUT3 t:inpad t:outpad %% t:* %D design -load read hierarchy -top mux4 yosys proc -equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +equiv_opt -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 design -load postopt yosys cd mux4 select -assert-count 3 t:LUT3 @@ -31,7 +31,7 @@ select -assert-none t:LUT3 t:inpad t:outpad %% t:* %D design -load read hierarchy -top mux8 yosys proc -equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +equiv_opt -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 design -load postopt yosys cd mux8 select -assert-count 1 t:LUT1 @@ -45,7 +45,7 @@ select -assert-none t:LUT1 t:LUT3 t:mux4x0 t:inpad t:outpad %% t:* %D design -load read hierarchy -top mux16 yosys proc -equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v synth_quicklogic -family pp3 +equiv_opt -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 design -load postopt yosys cd mux16 select -assert-count 1 t:LUT3 diff --git a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.ys b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.ys index 55390040a..20228ca6f 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.ys +++ b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.ys @@ -8,7 +8,7 @@ design -save read hierarchy -top BRAM_32x512 proc memory -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_32x512 +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_32x512 design -load postopt cd BRAM_32x512 stat @@ -19,7 +19,7 @@ select -assert-count 1 t:DP_RAM16K hierarchy -top BRAM_32x512 proc memory -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_16x1024 +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_16x1024 design -load postopt cd BRAM_16x1024 stat @@ -30,7 +30,7 @@ select -assert-count 1 t:DP_RAM16K hierarchy -top BRAM_8x2048 proc memory -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_8x2048 +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_8x2048 design -load postopt cd BRAM_8x2048 stat @@ -41,7 +41,7 @@ select -assert-count 1 t:DP_RAM16K hierarchy -top BRAM_4x4096 proc memory -equiv_opt -assert -map +/quicklogic/qlf_k6n10_cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_4x4096 +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 -top BRAM_4x4096 design -load postopt cd BRAM_4x4096 stat diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.tcl b/ql-qlf-plugin/tests/tribuf/tribuf.tcl index 067e7fd55..acee086c3 100644 --- a/ql-qlf-plugin/tests/tribuf/tribuf.tcl +++ b/ql-qlf-plugin/tests/tribuf/tribuf.tcl @@ -9,7 +9,7 @@ yosys proc tribuf flatten synth -equiv_opt -assert -map +/quicklogic/pp3_cells_sim.v -map +/simcells.v synth_quicklogic -family pp3 +equiv_opt -assert -map +/quicklogic/pp3/cells_sim.v -map +/simcells.v synth_quicklogic -family pp3 design -load postopt yosys cd tristate select -assert-count 2 t:inpad From b01acb40a5d8ffb4809a6fd9b1fbdb156247dcd3 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Fri, 13 Aug 2021 14:30:33 +0200 Subject: [PATCH 364/845] ql: add custom edif backend Signed-off-by: Alessandro Comodi --- ql-qlf-plugin/Makefile | 3 +- ql-qlf-plugin/ql-edif.cc | 596 ++++++++++++++++++++++++++++++ ql-qlf-plugin/synth_quicklogic.cc | 2 +- 3 files changed, 599 insertions(+), 2 deletions(-) create mode 100644 ql-qlf-plugin/ql-edif.cc diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 61235526d..9886c83cc 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -10,7 +10,8 @@ NAME = ql-qlf SOURCES = synth_quicklogic.cc \ ql-dsp.cc \ pp3_braminit.cc \ - quicklogic_eqn.cc + quicklogic_eqn.cc \ + ql-edif.cc include ../Makefile_plugin.common diff --git a/ql-qlf-plugin/ql-edif.cc b/ql-qlf-plugin/ql-edif.cc new file mode 100644 index 000000000..161c8dbfb --- /dev/null +++ b/ql-qlf-plugin/ql-edif.cc @@ -0,0 +1,596 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2012 Claire Xenia Wolf + * Copyright (C) 2021 The SymbiFlow Authors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +// [[CITE]] EDIF Version 2 0 0 Grammar +// http://web.archive.org/web/20050730021644/http://www.edif.org/documentation/BNF_GRAMMAR/index.html + +#include "kernel/celltypes.h" +#include "kernel/log.h" +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/sigtools.h" +#include + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +#define EDIF_DEF(_id) edif_names(RTLIL::unescape_id(_id), true).c_str() +#define EDIF_DEFR(_id, _ren, _bl, _br) edif_names(RTLIL::unescape_id(_id), true, _ren, _bl, _br).c_str() +#define EDIF_REF(_id) edif_names(RTLIL::unescape_id(_id), false).c_str() + +struct EdifNames { + int counter; + char delim_left, delim_right; + std::set generated_names, used_names; + std::map name_map; + + EdifNames() : counter(1), delim_left('['), delim_right(']') {} + + std::string operator()(std::string id, bool define, bool port_rename = false, int range_left = 0, int range_right = 0) + { + if (define) { + std::string new_id = operator()(id, false); + if (port_rename) + return stringf("(rename %s \"%s%c%d:%d%c\")", new_id.c_str(), id.c_str(), delim_left, range_left, range_right, delim_right); + return new_id != id ? stringf("(rename %s \"%s\")", new_id.c_str(), id.c_str()) : id; + } + + if (name_map.count(id) > 0) + return name_map.at(id); + if (generated_names.count(id) > 0) + goto do_rename; + if (id == "GND" || id == "VCC") + goto do_rename; + + for (size_t i = 0; i < id.size(); i++) { + if ('A' <= id[i] && id[i] <= 'Z') + continue; + if ('a' <= id[i] && id[i] <= 'z') + continue; + if ('0' <= id[i] && id[i] <= '9' && i > 0) + continue; + if (id[i] == '_' && i > 0 && i != id.size() - 1) + continue; + goto do_rename; + } + + used_names.insert(id); + return id; + + do_rename:; + std::string gen_name; + while (1) { + gen_name = stringf("id%05d", counter++); + if (generated_names.count(gen_name) == 0 && used_names.count(gen_name) == 0) + break; + } + generated_names.insert(gen_name); + name_map[id] = gen_name; + return gen_name; + } +}; + +struct QLEdifBackend : public Backend { + QLEdifBackend() : Backend("ql_edif", "write design to EDIF netlist file") {} + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" write_ql_edif [options] [filename]\n"); + log("\n"); + log("Write the current design to an EDIF netlist file.\n"); + log("\n"); + log(" -top top_module\n"); + log(" set the specified module as design top module\n"); + log("\n"); + log(" -nogndvcc\n"); + log(" do not create \"GND\" and \"VCC\" cells. (this will produce an error\n"); + log(" if the design contains constant nets. use \"hilomap\" to map to custom\n"); + log(" constant drivers first)\n"); + log("\n"); + log(" -gndvccy\n"); + log(" create \"GND\" and \"VCC\" cells with \"Y\" outputs. (the default is \"G\"\n"); + log(" for \"GND\" and \"P\" for \"VCC\".)\n"); + log("\n"); + log(" -attrprop\n"); + log(" create EDIF properties for cell attributes\n"); + log("\n"); + log(" -keep\n"); + log(" create extra KEEP nets by allowing a cell to drive multiple nets.\n"); + log("\n"); + log(" -pvector {par|bra|ang}\n"); + log(" sets the delimiting character for module port rename clauses to\n"); + log(" parentheses, square brackets, or angle brackets.\n"); + log("\n"); + log("Unfortunately there are different \"flavors\" of the EDIF file format. This\n"); + log("command generates EDIF files for the Xilinx place&route tools. It might be\n"); + log("necessary to make small modifications to this command when a different tool\n"); + log("is targeted.\n"); + log("\n"); + } + void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) override + { + log_header(design, "Executing QL EDIF backend.\n"); + std::string top_module_name; + bool port_rename = false; + bool attr_properties = false; + std::map> lib_cell_ports; + bool nogndvcc = false, gndvccy = false, keepmode = false; + CellTypes ct(design); + EdifNames edif_names; + + size_t argidx; + for (argidx = 1; argidx < args.size(); argidx++) { + if (args[argidx] == "-top" && argidx + 1 < args.size()) { + top_module_name = args[++argidx]; + continue; + } + if (args[argidx] == "-nogndvcc") { + nogndvcc = true; + continue; + } + if (args[argidx] == "-gndvccy") { + gndvccy = true; + continue; + } + if (args[argidx] == "-attrprop") { + attr_properties = true; + continue; + } + if (args[argidx] == "-keep") { + keepmode = true; + continue; + } + if (args[argidx] == "-pvector" && argidx + 1 < args.size()) { + std::string parray; + port_rename = true; + parray = args[++argidx]; + if (parray == "par") { + edif_names.delim_left = '('; + edif_names.delim_right = ')'; + } else if (parray == "ang") { + edif_names.delim_left = '<'; + edif_names.delim_right = '>'; + } else { + edif_names.delim_left = '['; + edif_names.delim_right = ']'; + } + continue; + } + break; + } + extra_args(f, filename, args, argidx); + + if (top_module_name.empty()) + for (auto module : design->modules()) + if (module->get_bool_attribute(ID::top)) + top_module_name = module->name.str(); + + for (auto module : design->modules()) { + if (module->get_blackbox_attribute()) + continue; + + if (top_module_name.empty()) + top_module_name = module->name.str(); + + if (module->processes.size() != 0) + log_error("Found unmapped processes in module %s: unmapped processes are not supported in EDIF backend!\n", log_id(module->name)); + if (module->memories.size() != 0) + log_error("Found unmapped memories in module %s: unmapped memories are not supported in EDIF backend!\n", log_id(module->name)); + + for (auto cell : module->cells()) { + if (design->module(cell->type) == nullptr || design->module(cell->type)->get_blackbox_attribute()) { + lib_cell_ports[cell->type]; + for (auto p : cell->connections()) + lib_cell_ports[cell->type][p.first] = GetSize(p.second); + } + } + } + + if (top_module_name.empty()) + log_error("No module found in design!\n"); + + *f << stringf("(edif %s\n", EDIF_DEF(top_module_name)); + *f << stringf(" (edifVersion 2 0 0)\n"); + *f << stringf(" (edifLevel 0)\n"); + *f << stringf(" (keywordMap (keywordLevel 0))\n"); + *f << stringf(" (comment \"Generated by %s\")\n", yosys_version_str); + + *f << stringf(" (external LIB\n"); + *f << stringf(" (edifLevel 0)\n"); + *f << stringf(" (technology (numberDefinition))\n"); + + if (!nogndvcc) { + *f << stringf(" (cell GND\n"); + *f << stringf(" (cellType GENERIC)\n"); + *f << stringf(" (view VIEW_NETLIST\n"); + *f << stringf(" (viewType NETLIST)\n"); + *f << stringf(" (interface (port %c (direction OUTPUT)))\n", gndvccy ? 'Y' : 'G'); + *f << stringf(" )\n"); + *f << stringf(" )\n"); + + *f << stringf(" (cell VCC\n"); + *f << stringf(" (cellType GENERIC)\n"); + *f << stringf(" (view VIEW_NETLIST\n"); + *f << stringf(" (viewType NETLIST)\n"); + *f << stringf(" (interface (port %c (direction OUTPUT)))\n", gndvccy ? 'Y' : 'P'); + *f << stringf(" )\n"); + *f << stringf(" )\n"); + } + + for (auto &cell_it : lib_cell_ports) { + *f << stringf(" (cell %s\n", EDIF_DEF(cell_it.first)); + *f << stringf(" (cellType GENERIC)\n"); + *f << stringf(" (view VIEW_NETLIST\n"); + *f << stringf(" (viewType NETLIST)\n"); + *f << stringf(" (interface\n"); + for (auto &port_it : cell_it.second) { + const char *dir = "INOUT"; + if (ct.cell_known(cell_it.first)) { + if (!ct.cell_output(cell_it.first, port_it.first)) + dir = "INPUT"; + else if (!ct.cell_input(cell_it.first, port_it.first)) + dir = "OUTPUT"; + } + int width = port_it.second; + int start = 0; + bool upto = false; + auto m = design->module(cell_it.first); + if (m) { + auto w = m->wire(port_it.first); + if (w) { + width = GetSize(w); + start = w->start_offset; + upto = w->upto; + } + } + if (width == 1) + *f << stringf(" (port %s (direction %s))\n", EDIF_DEF(port_it.first), dir); + else { + for (int b = start; b < start + width; b++) { + *f << stringf(" (port (rename %s_%d_ \"%s(%d)\") (direction %s))\n", EDIF_DEF(port_it.first), b, + EDIF_DEF(port_it.first), b, dir); + } + } + } + *f << stringf(" )\n"); + *f << stringf(" )\n"); + *f << stringf(" )\n"); + } + *f << stringf(" )\n"); + + std::vector sorted_modules; + + // extract module dependencies + std::map> module_deps; + for (auto module : design->modules()) { + module_deps[module] = std::set(); + for (auto cell : module->cells()) + if (design->module(cell->type) != nullptr) + module_deps[module].insert(design->module(cell->type)); + } + + // simple good-enough topological sort + // (O(n*m) on n elements and depth m) + while (module_deps.size() > 0) { + size_t sorted_modules_idx = sorted_modules.size(); + for (auto &it : module_deps) { + for (auto &dep : it.second) + if (module_deps.count(dep) > 0) + goto not_ready_yet; + // log("Next in topological sort: %s\n", log_id(it.first->name)); + sorted_modules.push_back(it.first); + not_ready_yet:; + } + if (sorted_modules_idx == sorted_modules.size()) + log_error("Cyclic dependency between modules found! Cycle includes module %s.\n", log_id(module_deps.begin()->first->name)); + while (sorted_modules_idx < sorted_modules.size()) + module_deps.erase(sorted_modules.at(sorted_modules_idx++)); + } + + *f << stringf(" (library DESIGN\n"); + *f << stringf(" (edifLevel 0)\n"); + *f << stringf(" (technology (numberDefinition))\n"); + + auto add_prop = [&](IdString name, Const val) { + if ((val.flags & RTLIL::CONST_FLAG_STRING) != 0) + *f << stringf("\n (property %s (string \"%s\"))", EDIF_DEF(name), val.decode_string().c_str()); + else if (val.bits.size() <= 32 && RTLIL::SigSpec(val).is_fully_def()) + *f << stringf("\n (property %s (integer %u))", EDIF_DEF(name), val.as_int()); + else { + std::string hex_string = ""; + for (size_t i = 0; i < val.bits.size(); i += 4) { + int digit_value = 0; + if (i + 0 < val.bits.size() && val.bits.at(i + 0) == RTLIL::State::S1) + digit_value |= 1; + if (i + 1 < val.bits.size() && val.bits.at(i + 1) == RTLIL::State::S1) + digit_value |= 2; + if (i + 2 < val.bits.size() && val.bits.at(i + 2) == RTLIL::State::S1) + digit_value |= 4; + if (i + 3 < val.bits.size() && val.bits.at(i + 3) == RTLIL::State::S1) + digit_value |= 8; + char digit_str[2] = {"0123456789abcdef"[digit_value], 0}; + hex_string = std::string(digit_str) + hex_string; + } + *f << stringf("\n (property %s (string \"%d'h%s\"))", EDIF_DEF(name), GetSize(val.bits), hex_string.c_str()); + } + }; + for (auto module : sorted_modules) { + if (module->get_blackbox_attribute()) + continue; + + SigMap sigmap(module); + std::map>> net_join_db; + + *f << stringf(" (cell %s\n", EDIF_DEF(module->name)); + *f << stringf(" (cellType GENERIC)\n"); + *f << stringf(" (view VIEW_NETLIST\n"); + *f << stringf(" (viewType NETLIST)\n"); + *f << stringf(" (interface\n"); + + for (auto cell : module->cells()) { + for (auto &conn : cell->connections()) + if (cell->output(conn.first)) + sigmap.add(conn.second); + } + + for (auto wire : module->wires()) + for (auto b1 : SigSpec(wire)) { + auto b2 = sigmap(b1); + + if (b1 == b2 || !b2.wire) + continue; + + log_assert(b1.wire != nullptr); + + Wire *w1 = b1.wire; + Wire *w2 = b2.wire; + + { + int c1 = w1->get_bool_attribute(ID::keep); + int c2 = w2->get_bool_attribute(ID::keep); + + if (c1 > c2) + goto promote; + if (c1 < c2) + goto nopromote; + } + + { + int c1 = w1->name.isPublic(); + int c2 = w2->name.isPublic(); + + if (c1 > c2) + goto promote; + if (c1 < c2) + goto nopromote; + } + + { + auto count_nontrivial_attr = [](Wire *w) { + int count = w->attributes.size(); + count -= w->attributes.count(ID::src); + count -= w->attributes.count(ID::unused_bits); + return count; + }; + + int c1 = count_nontrivial_attr(w1); + int c2 = count_nontrivial_attr(w2); + + if (c1 > c2) + goto promote; + if (c1 < c2) + goto nopromote; + } + + { + int c1 = w1->port_id ? INT_MAX - w1->port_id : 0; + int c2 = w2->port_id ? INT_MAX - w2->port_id : 0; + + if (c1 > c2) + goto promote; + if (c1 < c2) + goto nopromote; + } + + nopromote: + if (0) + promote: + sigmap.add(b1); + } + + for (auto wire : module->wires()) { + if (wire->port_id == 0) + continue; + const char *dir = "INOUT"; + if (!wire->port_output) + dir = "INPUT"; + else if (!wire->port_input) + dir = "OUTPUT"; + if (wire->width == 1) { + *f << stringf(" (port %s (direction %s)", EDIF_DEF(wire->name), dir); + if (attr_properties) + for (auto &p : wire->attributes) + add_prop(p.first, p.second); + *f << ")\n"; + RTLIL::SigSpec sig = sigmap(RTLIL::SigSpec(wire)); + net_join_db[sig].insert(make_pair(stringf("(portRef %s)", EDIF_REF(wire->name)), wire->port_input)); + } else { + int b[2]; + b[wire->upto ? 0 : 1] = wire->start_offset; + b[wire->upto ? 1 : 0] = wire->start_offset + GetSize(wire) - 1; + *f << stringf(" (port (array %s %d) (direction %s)", EDIF_DEFR(wire->name, port_rename, b[0], b[1]), wire->width, dir); + if (attr_properties) + for (auto &p : wire->attributes) + add_prop(p.first, p.second); + + *f << ")\n"; + for (int i = 0; i < wire->width; i++) { + RTLIL::SigSpec sig = sigmap(RTLIL::SigSpec(wire, i)); + net_join_db[sig].insert( + make_pair(stringf("(portRef %s_%d_)", EDIF_REF(wire->name), GetSize(wire) - i - 1), wire->port_input)); + } + } + } + + *f << stringf(" )\n"); + *f << stringf(" (contents\n"); + + if (!nogndvcc) { + *f << stringf(" (instance GND (viewRef VIEW_NETLIST (cellRef GND (libraryRef LIB))))\n"); + *f << stringf(" (instance VCC (viewRef VIEW_NETLIST (cellRef VCC (libraryRef LIB))))\n"); + } + + for (auto cell : module->cells()) { + *f << stringf(" (instance %s\n", EDIF_DEF(cell->name)); + *f << stringf(" (viewRef VIEW_NETLIST (cellRef %s%s))", EDIF_REF(cell->type), + lib_cell_ports.count(cell->type) > 0 ? " (libraryRef LIB)" : ""); + for (auto &p : cell->parameters) + add_prop(p.first, p.second); + if (attr_properties) + for (auto &p : cell->attributes) + add_prop(p.first, p.second); + + *f << stringf(")\n"); + for (auto &p : cell->connections()) { + RTLIL::SigSpec sig = sigmap(p.second); + for (int i = 0; i < GetSize(sig); i++) + if (sig[i].wire == NULL && sig[i] != RTLIL::State::S0 && sig[i] != RTLIL::State::S1) + log_warning("Bit %d of cell port %s.%s.%s driven by %s will be left unconnected in EDIF output.\n", i, log_id(module), + log_id(cell), log_id(p.first), log_signal(sig[i])); + else { + int member_idx = GetSize(sig) - i - 1; + auto m = design->module(cell->type); + int width = sig.size(); + if (m) { + auto w = m->wire(p.first); + if (w) { + member_idx = GetSize(w) - i - 1; + width = GetSize(w); + } + } + if (width == 1) + net_join_db[sig[i]].insert(make_pair( + stringf("(portRef %s (instanceRef %s))", EDIF_REF(p.first), EDIF_REF(cell->name)), cell->output(p.first))); + else { + net_join_db[sig[i]].insert( + make_pair(stringf("(portRef %s_%d_ (instanceRef %s))", EDIF_REF(p.first), member_idx, EDIF_REF(cell->name)), + cell->output(p.first))); + } + } + } + } + + for (auto &it : net_join_db) { + RTLIL::SigBit sig = it.first; + if (sig.wire == NULL && sig != RTLIL::State::S0 && sig != RTLIL::State::S1) { + if (sig == RTLIL::State::Sx) { + for (auto &ref : it.second) + log_warning("Exporting x-bit on %s as zero bit.\n", ref.first.c_str()); + sig = RTLIL::State::S0; + } else if (sig == RTLIL::State::Sz) { + continue; + } else { + for (auto &ref : it.second) + log_error("Don't know how to handle %s on %s.\n", log_signal(sig), ref.first.c_str()); + log_abort(); + } + } + std::string netname; + if (sig == RTLIL::State::S0) + netname = "GND_NET"; + else if (sig == RTLIL::State::S1) + netname = "VCC_NET"; + else { + netname = log_signal(sig); + for (size_t i = 0; i < netname.size(); i++) + if (netname[i] == ' ' || netname[i] == '\\') + netname.erase(netname.begin() + i--); + } + *f << stringf(" (net %s (joined\n", EDIF_DEF(netname)); + for (auto &ref : it.second) + *f << stringf(" %s\n", ref.first.c_str()); + if (sig.wire == NULL) { + if (nogndvcc) + log_error("Design contains constant nodes (map with \"hilomap\" first).\n"); + if (sig == RTLIL::State::S0) + *f << stringf(" (portRef %c (instanceRef GND))\n", gndvccy ? 'Y' : 'G'); + if (sig == RTLIL::State::S1) + *f << stringf(" (portRef %c (instanceRef VCC))\n", gndvccy ? 'Y' : 'P'); + } + *f << stringf(" )"); + if (attr_properties && sig.wire != NULL) + for (auto &p : sig.wire->attributes) + add_prop(p.first, p.second); + *f << stringf("\n )\n"); + } + + for (auto wire : module->wires()) { + if (!wire->get_bool_attribute(ID::keep)) + continue; + + for (int i = 0; i < wire->width; i++) { + SigBit raw_sig = RTLIL::SigSpec(wire, i); + SigBit mapped_sig = sigmap(raw_sig); + + if (raw_sig == mapped_sig || net_join_db.count(mapped_sig) == 0) + continue; + + std::string netname = log_signal(raw_sig); + for (size_t i = 0; i < netname.size(); i++) + if (netname[i] == ' ' || netname[i] == '\\') + netname.erase(netname.begin() + i--); + + if (keepmode) { + *f << stringf(" (net %s (joined\n", EDIF_DEF(netname)); + + auto &refs = net_join_db.at(mapped_sig); + for (auto &ref : refs) + if (ref.second) + *f << stringf(" %s\n", ref.first.c_str()); + *f << stringf(" )"); + + if (attr_properties && raw_sig.wire != NULL) + for (auto &p : raw_sig.wire->attributes) + add_prop(p.first, p.second); + + *f << stringf("\n )\n"); + } else { + log_warning("Ignoring conflicting 'keep' property on net %s. Use -keep to generate the extra net nevertheless.\n", + EDIF_DEF(netname)); + } + } + } + + *f << stringf(" )\n"); + *f << stringf(" )\n"); + *f << stringf(" )\n"); + } + *f << stringf(" )\n"); + + *f << stringf(" (design %s\n", EDIF_DEF(top_module_name)); + *f << stringf(" (cellRef %s (libraryRef DESIGN))\n", EDIF_REF(top_module_name)); + *f << stringf(" )\n"); + + *f << stringf(")\n"); + } +} QLEdifBackend; + +PRIVATE_NAMESPACE_END diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index be59c3311..4a9abc535 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -379,7 +379,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("splitnets -ports -format ()"); run("quicklogic_eqn"); - run(stringf("write_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); + run(stringf("write_ql_edif -nogndvcc -attrprop -pvector par %s %s", this->currmodule.c_str(), edif_file.c_str())); } if (check_label("verilog")) { From ba80df269638211f8c4f72f81a591984e7f30d32 Mon Sep 17 00:00:00 2001 From: Joshua Fife Date: Fri, 13 Aug 2021 17:37:36 -0600 Subject: [PATCH 365/845] Fixed xdc parser to ignore multiple spaces Signed-off-by: Joshua Fife --- xdc-plugin/xdc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 2e935eaf0..36ed7145b 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -136,7 +136,9 @@ struct SetProperty : public Pass { std::vector tokens; std::string intermediate; while (getline(args_stream, intermediate, ' ')) { - tokens.push_back(intermediate); + if(intermediate != "\0") { + tokens.push_back(intermediate); + } } if (tokens.size() % 2 != 0) { log_cmd_error("Invalid number of dict parameters: %lu.\n", tokens.size()); From 264a327c1e32d1dc545c20fc9976c3ad5f1d5158 Mon Sep 17 00:00:00 2001 From: Joshua Fife Date: Tue, 17 Aug 2021 14:46:52 -0600 Subject: [PATCH 366/845] Added space testing for xdc Signed-off-by: Joshua Fife --- xdc-plugin/tests/Makefile | 3 + .../package_pins-dict-space.golden.json | 47 ++++++++ .../package_pins-dict-space.tcl | 15 +++ .../package_pins-dict-space.v | 111 ++++++++++++++++++ .../package_pins-dict-space.xdc | 29 +++++ 5 files changed, 205 insertions(+) create mode 100644 xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.golden.json create mode 100644 xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl create mode 100644 xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v create mode 100644 xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.xdc diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index 363cbfe77..f96a6f1e6 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -8,12 +8,14 @@ # counter - basic test for IOSTANDARD, SLEW, DRIVE, IN_TERM properties # counter-dict - basic test using XDC -dict for IOSTANDARD, SLEW, DRIVE, IN_TERM properties +# package_pins-dict-space - basic test for variable whitespace between PACKAGE_PINs and IOSTANDARD # port_indexes - like counter but bus port indices are passes without curly braces # io_loc_pairs - test for LOC property being set on IOBUFs as the IO_LOC_PAIRS parameter # minilitex_ddr_arty - litex design with more types of IOBUFS including differential # package_pins - test for PACKAGE_PIN property being set on IOBUFs as the IO_LOC_PAIRS parameter TESTS = counter \ counter-dict \ + package_pins-dict-space \ port_indexes \ io_loc_pairs \ minilitex_ddr_arty \ @@ -34,3 +36,4 @@ port_indexes_verify = $(call json_test,port_indexes) && test $$(grep "'unknown' io_loc_pairs_verify = $(call json_test,io_loc_pairs) minilitex_ddr_arty_verify = $(call json_test,minilitex_ddr_arty) package_pins_verify = $(call json_test,package_pins) +package_pins-dict-space_verify = $(call json_test,package_pins-dict-space) diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.golden.json b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.golden.json new file mode 100644 index 000000000..2e9102dda --- /dev/null +++ b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.golden.json @@ -0,0 +1,47 @@ +{ + "OBUFTDS_2": { + "IOSTANDARD": "DIFF_SSTL135", + "IO_LOC_PAIRS": "signal_p:N2,signal_n:N1", + "SLEW": "FAST" + }, + "OBUF_6": { + "DRIVE": "12", + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "led[0]:D10", + "SLEW": "SLOW" + }, + "OBUF_7": { + "IN_TERM": "UNTUNED_SPLIT_40", + "IOSTANDARD": "SSTL135", + "IO_LOC_PAIRS": "led[1]:A9", + "SLEW": "FAST" + }, + "OBUF_OUT": { + "IN_TERM": "UNTUNED_SPLIT_50", + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "out_a:E3", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_10": { + "IOSTANDARD": "LVCMOS18", + "IO_LOC_PAIRS": "out_b[0]:C2", + "SLEW": "SLOW" + }, + "bottom_inst.OBUF_11": { + "DRIVE": "4", + "IOSTANDARD": "LVCMOS25", + "IO_LOC_PAIRS": "out_b[1]:R2", + "SLEW": "FAST" + }, + "bottom_inst.OBUF_9": { + "IOSTANDARD": "DIFF_SSTL135", + "IO_LOC_PAIRS": "led[2]:M6", + "SLEW": "FAST" + }, + "bottom_intermediate_inst.OBUF_8": { + "DRIVE": "16", + "IOSTANDARD": "SSTL135", + "IO_LOC_PAIRS": "led[3]:N4", + "SLEW": "SLOW" + } +} \ No newline at end of file diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl new file mode 100644 index 000000000..7303563b6 --- /dev/null +++ b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl @@ -0,0 +1,15 @@ +yosys -import +if { [info procs get_ports] == {} } { plugin -i design_introspection } +if { [info procs read_xdc] == {} } { plugin -i xdc } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +# -flatten is used to ensure that the output eblif has only one module. +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp + +#Read the design constraints +read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc + +# Write the design in JSON format. +write_json [test_output_path "package_pins-dict-space.json"] diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v new file mode 100644 index 000000000..d4d172dc9 --- /dev/null +++ b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v @@ -0,0 +1,111 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module top ( + input clk, + output [3:0] led, + inout out_a, + output [1:0] out_b, + output signal_p, + output signal_n +); + + wire LD6, LD7, LD8, LD9; + wire inter_wire, inter_wire_2; + localparam BITS = 1; + localparam LOG2DELAY = 25; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + + always @(posedge clk) begin + counter <= counter + 1; + end + assign led[1] = inter_wire; + assign inter_wire = inter_wire_2; + assign {LD9, LD8, LD7, LD6} = counter >> LOG2DELAY; + OBUFTDS OBUFTDS_2 ( + .I (LD6), + .O (signal_p), + .OB(signal_n), + .T (1'b1) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_6 ( + .I(LD6), + .O(led[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_7 ( + .I(LD7), + .O(inter_wire_2) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_OUT ( + .I(LD7), + .O(out_a) + ); + bottom bottom_inst ( + .I (LD8), + .O (led[2]), + .OB(out_b) + ); + bottom_intermediate bottom_intermediate_inst ( + .I(LD9), + .O(led[3]) + ); +endmodule + +module bottom_intermediate ( + input I, + output O +); + wire bottom_intermediate_wire; + assign O = bottom_intermediate_wire; + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_8 ( + .I(I), + .O(bottom_intermediate_wire) + ); +endmodule + +module bottom ( + input I, + output [1:0] OB, + output O +); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_9 ( + .I(I), + .O(O) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_10 ( + .I(I), + .O(OB[0]) + ); + OBUF #( + .IOSTANDARD("LVCMOS33"), + .SLEW("SLOW") + ) OBUF_11 ( + .I(I), + .O(OB[1]) + ); +endmodule + diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.xdc b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.xdc new file mode 100644 index 000000000..70453d1cb --- /dev/null +++ b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.xdc @@ -0,0 +1,29 @@ +#OBUF_6 +set_property PACKAGE_PIN D10 [get_ports {led[0]}] +set_property DRIVE 12 [get_ports {led[0]}] +#OBUF_7 +set_property -dict { PACKAGE_PIN A9 IOSTANDARD SSTL135 } [get_ports {led[1]}] +set_property IN_TERM UNTUNED_SPLIT_40 [get_ports led[1]] +set_property SLEW FAST [get_ports led[1]] +#OBUF_OUT +set_property -dict { PACKAGE_PIN E3 IOSTANDARD LVCMOS33} [get_ports out_a] +set_property IN_TERM UNTUNED_SPLIT_50 [get_ports out_a] +set_property SLEW FAST [get_ports out_a] +#bottom_inst.OBUF_10 +set_property -dict {PACKAGE_PIN C2 IOSTANDARD LVCMOS18} [get_ports {out_b[0]}] +set_property SLEW SLOW [get_ports {out_b[0]}] +#bottom_inst.OBUF_11 +set_property -dict { PACKAGE_PIN R2 IOSTANDARD LVCMOS25 } [get_ports {out_b[1]}] +set_property DRIVE 4 [get_ports {out_b[1]}] +set_property SLEW FAST [get_ports {out_b[1]}] +#bottom_inst.OBUF_9 +set_property -dict {PACKAGE_PIN M6 IOSTANDARD DIFF_SSTL135} [get_ports {led[2]}] +set_property SLEW FAST [get_ports {led[2]}] +#bottom_intermediate_inst.OBUF_8 +set_property -dict {PACKAGE_PIN N4 IOSTANDARD SSTL135} [get_ports {led[3]}] +set_property DRIVE 16 [get_ports {led[3]}] +#OBUFTDS_2 +set_property -dict {PACKAGE_PIN N2 IOSTANDARD DIFF_SSTL135} [get_ports signal_p] +set_property PACKAGE_PIN N1 [get_ports signal_n] +set_property SLEW FAST [get_ports signal_p] + From 0c074c966b47b3ab40a9103d062eb5ae58d325ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 16 Aug 2021 14:08:07 +0200 Subject: [PATCH 367/845] ql: edif: SpDE compliance fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/ql-edif.cc | 54 ++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/ql-qlf-plugin/ql-edif.cc b/ql-qlf-plugin/ql-edif.cc index 161c8dbfb..902e06571 100644 --- a/ql-qlf-plugin/ql-edif.cc +++ b/ql-qlf-plugin/ql-edif.cc @@ -265,7 +265,7 @@ struct QLEdifBackend : public Backend { *f << stringf(" (port %s (direction %s))\n", EDIF_DEF(port_it.first), dir); else { for (int b = start; b < start + width; b++) { - *f << stringf(" (port (rename %s_%d_ \"%s(%d)\") (direction %s))\n", EDIF_DEF(port_it.first), b, + *f << stringf(" (port (rename %s_%d_ \"%s(%d)\") (direction %s))\n", EDIF_DEF(port_it.first), b, EDIF_DEF(port_it.first), b, dir); } } @@ -312,9 +312,35 @@ struct QLEdifBackend : public Backend { auto add_prop = [&](IdString name, Const val) { if ((val.flags & RTLIL::CONST_FLAG_STRING) != 0) *f << stringf("\n (property %s (string \"%s\"))", EDIF_DEF(name), val.decode_string().c_str()); - else if (val.bits.size() <= 32 && RTLIL::SigSpec(val).is_fully_def()) + else if (val.bits.size() <= 32 && RTLIL::SigSpec(val).is_fully_def()) { *f << stringf("\n (property %s (integer %u))", EDIF_DEF(name), val.as_int()); - else { + } else { + std::string hex_string = ""; + for (size_t i = 0; i < val.bits.size(); i += 4) { + int digit_value = 0; + if (i + 0 < val.bits.size() && val.bits.at(i + 0) == RTLIL::State::S1) + digit_value |= 1; + if (i + 1 < val.bits.size() && val.bits.at(i + 1) == RTLIL::State::S1) + digit_value |= 2; + if (i + 2 < val.bits.size() && val.bits.at(i + 2) == RTLIL::State::S1) + digit_value |= 4; + if (i + 3 < val.bits.size() && val.bits.at(i + 3) == RTLIL::State::S1) + digit_value |= 8; + char digit_str[2] = {"0123456789abcdef"[digit_value], 0}; + hex_string = std::string(digit_str) + hex_string; + } + *f << stringf("\n (property %s (string \"%d'h%s\"))", EDIF_DEF(name), GetSize(val.bits), hex_string.c_str()); + } + }; + auto add_lut_prop = [&](IdString name, Const val) { + if ((val.flags & RTLIL::CONST_FLAG_STRING) != 0) + *f << stringf("\n (property %s (string \"%s\"))", EDIF_DEF(name), val.decode_string().c_str()); + else if (val.bits.size() <= 32 && RTLIL::SigSpec(val).is_fully_def()) { + if (strstr(name.c_str(), "INIT")) + *f << stringf("\n (property %s (string \"%X\"))", EDIF_DEF(name), val.as_int()); + else + *f << stringf("\n (property %s (integer %u))", EDIF_DEF(name), val.as_int()); + } else { std::string hex_string = ""; for (size_t i = 0; i < val.bits.size(); i += 4) { int digit_value = 0; @@ -462,11 +488,19 @@ struct QLEdifBackend : public Backend { *f << stringf(" (instance %s\n", EDIF_DEF(cell->name)); *f << stringf(" (viewRef VIEW_NETLIST (cellRef %s%s))", EDIF_REF(cell->type), lib_cell_ports.count(cell->type) > 0 ? " (libraryRef LIB)" : ""); - for (auto &p : cell->parameters) - add_prop(p.first, p.second); - if (attr_properties) - for (auto &p : cell->attributes) + if (strstr(cell->type.c_str(), "LUT")) { + for (auto &p : cell->parameters) + add_lut_prop(p.first, p.second); + if (attr_properties) + for (auto &p : cell->attributes) + add_lut_prop(p.first, p.second); + } else { + for (auto &p : cell->parameters) add_prop(p.first, p.second); + if (attr_properties) + for (auto &p : cell->attributes) + add_prop(p.first, p.second); + } *f << stringf(")\n"); for (auto &p : cell->connections()) { @@ -490,9 +524,9 @@ struct QLEdifBackend : public Backend { net_join_db[sig[i]].insert(make_pair( stringf("(portRef %s (instanceRef %s))", EDIF_REF(p.first), EDIF_REF(cell->name)), cell->output(p.first))); else { - net_join_db[sig[i]].insert( - make_pair(stringf("(portRef %s_%d_ (instanceRef %s))", EDIF_REF(p.first), member_idx, EDIF_REF(cell->name)), - cell->output(p.first))); + net_join_db[sig[i]].insert(make_pair(stringf("(portRef %s_%d_ (instanceRef %s))", EDIF_REF(p.first), + width - member_idx - 1, EDIF_REF(cell->name)), // reverse IDs + cell->output(p.first))); } } } From 2f3bf1907615303672b6bb4748853b8e63113eac Mon Sep 17 00:00:00 2001 From: Joshua Fife Date: Wed, 18 Aug 2021 13:25:49 -0600 Subject: [PATCH 368/845] Fixed formatting Signed-off-by: Joshua Fife --- xdc-plugin/xdc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 36ed7145b..387d19166 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -136,7 +136,7 @@ struct SetProperty : public Pass { std::vector tokens; std::string intermediate; while (getline(args_stream, intermediate, ' ')) { - if(intermediate != "\0") { + if (intermediate != "\0") { tokens.push_back(intermediate); } } From e488b9812b10d4059782d14866c35ab87025e714 Mon Sep 17 00:00:00 2001 From: Samy Date: Wed, 14 Jul 2021 13:45:24 +0200 Subject: [PATCH 369/845] Adding information about ql_dsp command Signed-off-by: Samy --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 472130084..0e3fc842d 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ The plugin adds the following command: The plugin adds the following command: * synth_quicklogic +* ql_dsp Detailed help on the supported command(s) can be obtained by running `help ` in Yosys. From ac0439854ef47ddda9d9eab192e50b0c5b070151 Mon Sep 17 00:00:00 2001 From: Samy Date: Mon, 19 Jul 2021 19:28:47 +0200 Subject: [PATCH 370/845] Typo in frac_lut6 module Signed-off-by: Samy --- ql-qlf-plugin/qlf_k6n10/cells_sim.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10/cells_sim.v b/ql-qlf-plugin/qlf_k6n10/cells_sim.v index 36872ce77..ad22df3eb 100644 --- a/ql-qlf-plugin/qlf_k6n10/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10/cells_sim.v @@ -63,7 +63,7 @@ module frac_lut6( assign lut4_out[2] = s4[2]; assign lut4_out[3] = s4[3]; - assign lut5_out[0] = s0[0]; + assign lut5_out[0] = s5[0]; assign lut5_out[1] = s5[1]; assign lut6_out = li[5] ? s5[0] : s5[1]; @@ -182,7 +182,7 @@ module dffse( (* invertible_pin = "IS_C_INVERTED" *) input C, input S, - input E, + input E ); parameter [0:0] INIT = 1'b0; parameter [0:0] IS_C_INVERTED = 1'b0; From adff089540b4050f0dc46767f30692bc949545ca Mon Sep 17 00:00:00 2001 From: Samy Date: Mon, 19 Jul 2021 19:45:04 +0200 Subject: [PATCH 371/845] Modify adder mapping for qlf_k6n10 device Signed-off-by: Samy --- ql-qlf-plugin/qlf_k6n10/arith_map.v | 37 +++++++++++-------- ql-qlf-plugin/tests/full_adder/full_adder.tcl | 21 +++++++---- 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10/arith_map.v b/ql-qlf-plugin/qlf_k6n10/arith_map.v index 2d8dee5c5..6b275d305 100644 --- a/ql-qlf-plugin/qlf_k6n10/arith_map.v +++ b/ql-qlf-plugin/qlf_k6n10/arith_map.v @@ -38,10 +38,30 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); endgenerate wire [Y_WIDTH: 0 ] CARRY; - assign CARRY[0] = CI; + + // Due to VPR limitations regarding IO connexion to carry chain, + // we generate the carry chain input signal using an intermediate adder + // since we can connect a & b from io pads, but not cin & cout + generate + adder intermediate_adder ( + .cin ( ), + .cout (CARRY[0]), + .a (CI ), + .b (CI ), + .sumout ( ) + ); + + adder first_adder ( + .cin (CARRY[0]), + .cout (CARRY[1]), + .a (AA[0] ), + .b (BB[0] ), + .sumout (Y[0] ) + ); + endgenerate genvar i; - generate for (i = 0; i < Y_WIDTH - 1; i = i+1) begin:gen3 + generate for (i = 1; i < Y_WIDTH - 1; i = i+1) begin:gen3 adder my_adder ( .cin (CARRY[i] ), .cout (CARRY[i+1]), @@ -50,19 +70,6 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); .sumout (Y[i] ) ); end endgenerate - - generate if ((Y_WIDTH -1) % 20 == 0) begin:gen4 - assign Y[Y_WIDTH-1] = CARRY[Y_WIDTH-1]; - end else begin:gen5 - adder my_adder ( - .cin (CARRY[Y_WIDTH - 1]), - .cout (CARRY[Y_WIDTH] ), - .a (1'b0 ), - .b (1'b0 ), - .sumout (Y[Y_WIDTH -1] ) - ); - end - endgenerate assign X = AA ^ BB; endmodule diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index 6365284dd..9c5a402c3 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -17,21 +17,26 @@ yosys proc equiv_opt -assert -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 design -reset + # Equivalence check for adder synthesis for qlf-k6n10 read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top full_adder yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 +synth_quicklogic -family qlf_k6n10 +yosys cd full_adder +stat +select -assert-count 5 t:adder design -reset -#TODO: Fix equivalence check for substractor design with qlf_k6n10 device - -## Equivalence check for subtractor synthesis -#read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v -#hierarchy -check -top subtractor -#yosys proc -#equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 +# Equivalence check for subtractor synthesis for qlf-k6n10 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top subtractor +yosys proc +synth_quicklogic -family qlf_k6n10 +yosys cd subtractor +stat +select -assert-count 5 t:adder design -reset From 869c16f88440538e9258394f29936e2d4d02ccd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 20 Aug 2021 10:57:34 +0200 Subject: [PATCH 372/845] ql: edif: add padding to LUT INITs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/ql-edif.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ql-qlf-plugin/ql-edif.cc b/ql-qlf-plugin/ql-edif.cc index 902e06571..9d136afa7 100644 --- a/ql-qlf-plugin/ql-edif.cc +++ b/ql-qlf-plugin/ql-edif.cc @@ -332,14 +332,16 @@ struct QLEdifBackend : public Backend { *f << stringf("\n (property %s (string \"%d'h%s\"))", EDIF_DEF(name), GetSize(val.bits), hex_string.c_str()); } }; - auto add_lut_prop = [&](IdString name, Const val) { + auto add_lut_prop = [&](IdString name, Const val, int lut_in) { if ((val.flags & RTLIL::CONST_FLAG_STRING) != 0) *f << stringf("\n (property %s (string \"%s\"))", EDIF_DEF(name), val.decode_string().c_str()); else if (val.bits.size() <= 32 && RTLIL::SigSpec(val).is_fully_def()) { - if (strstr(name.c_str(), "INIT")) - *f << stringf("\n (property %s (string \"%X\"))", EDIF_DEF(name), val.as_int()); - else + if (strstr(name.c_str(), "INIT")) { + int hex_code_width = ((1 << lut_in) / 4); + *f << stringf("\n (property %s (string \"%0*X\"))", EDIF_DEF(name), hex_code_width, val.as_int()); + } else { *f << stringf("\n (property %s (integer %u))", EDIF_DEF(name), val.as_int()); + } } else { std::string hex_string = ""; for (size_t i = 0; i < val.bits.size(); i += 4) { @@ -488,12 +490,15 @@ struct QLEdifBackend : public Backend { *f << stringf(" (instance %s\n", EDIF_DEF(cell->name)); *f << stringf(" (viewRef VIEW_NETLIST (cellRef %s%s))", EDIF_REF(cell->type), lib_cell_ports.count(cell->type) > 0 ? " (libraryRef LIB)" : ""); - if (strstr(cell->type.c_str(), "LUT")) { + const char *lut_pos; + lut_pos = strstr(cell->type.c_str(), "LUT"); + if (lut_pos) { + int lut_in = atoi(lut_pos + 3); // get the number of LUT inputs for (auto &p : cell->parameters) - add_lut_prop(p.first, p.second); + add_lut_prop(p.first, p.second, lut_in); if (attr_properties) for (auto &p : cell->attributes) - add_lut_prop(p.first, p.second); + add_lut_prop(p.first, p.second, lut_in); } else { for (auto &p : cell->parameters) add_prop(p.first, p.second); From 56d926e44b429d41533e38b891dbeac5b37a538a Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 3 Aug 2021 14:29:08 +0200 Subject: [PATCH 373/845] Fixed PP3 block ram techmap Signed-off-by: Maciej Kurc --- ql-qlf-plugin/pp3/brams_map.v | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/ql-qlf-plugin/pp3/brams_map.v b/ql-qlf-plugin/pp3/brams_map.v index 1941a3dfe..280d8d436 100644 --- a/ql-qlf-plugin/pp3/brams_map.v +++ b/ql-qlf-plugin/pp3/brams_map.v @@ -35,8 +35,8 @@ module \$__QUICKLOGIC_RAMB16K ( input [CFG_DBITS-1:0] B1DATA; input [CFG_ENABLE_B-1:0] B1EN; - assign VCC = 1'b1; - assign GND = 1'b0; + wire VCC = 1'b1; + wire GND = 1'b0; wire [3:0] DIP, DOP; wire [31:0] DI, DO; @@ -259,8 +259,8 @@ module \$__QUICKLOGIC_RAMB8K ( assign wen_reg[2:CFG_ENABLE_B] = 0; assign wen_reg[CFG_ENABLE_B-1:0] = B1EN; - assign GND = 1'b0; - assign VCC = 1'b1; + wire GND = 1'b0; + wire VCC = 1'b1; assign A1DATA = DO; assign DI = B1DATA; @@ -547,7 +547,9 @@ module RAM_8K_BLK ( .RMEB(GND) ); - assign RD[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; + // FIXME: The output RD is 18-bit while RAM data is 16-bit. Why the two + // extra bits? + assign RD[data_width_int-1 : 0] = {2'b00, out_reg0}; endmodule @@ -825,7 +827,9 @@ module RAM_16K_BLK ( endgenerate - assign RD[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; + // FIXME: The output RD is 36-bit while RAM data is 32-bit. Why the four + // extra bits? + assign RD[data_width_int-1 : 0] = {4'd0, out_reg0}; endmodule @@ -849,7 +853,7 @@ module FIFO_8K_BLK ( DOUT ); - parameter data_depth_int = 512, data_width_int = 36, reg_rd_int = 0, sync_fifo_int = 0; + parameter data_depth_int = 512, data_width_int = 18, reg_rd_int = 0, sync_fifo_int = 0; input Fifo_Push_Flush, Fifo_Pop_Flush; input Push_Clk, Pop_Clk; @@ -1002,7 +1006,9 @@ module FIFO_8K_BLK ( .RMEB(GND) ); - assign DOUT[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; + // FIXME: The output RD is 18-bit while RAM data is 16-bit. Why the two + // extra bits? + assign DOUT[data_width_int-1 : 0] = {2'b00, out_reg0}; endmodule @@ -1255,6 +1261,8 @@ module FIFO_16K_BLK ( endgenerate - assign DOUT[data_width_int-1 : 0] = out_reg0[data_width_int-1 : 0]; + // FIXME: The output RD is 36-bit while RAM data is 32-bit. Why the four + // extra bits? + assign DOUT[data_width_int-1 : 0] = {4'd0, out_reg0}; endmodule From eeab159e0f1055399105f1f8b082e3004c4d12ea Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 3 Aug 2021 14:29:22 +0200 Subject: [PATCH 374/845] Added reading library cell definitions in synth_quicklogic with -nomem2reg option. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/synth_quicklogic.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 36c3afeae..241005d87 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -192,7 +192,10 @@ struct SynthQuickLogicPass : public ScriptPass { std::string readVelArgs; readVelArgs = " +/quicklogic/" + family + "/cells_sim.v"; - run("read_verilog -lib -specify +/quicklogic/common/cells_sim.v" + readVelArgs); + // Use -nomem2reg here to prevent Yosys from complaining about + // some block ram cell models. After all the only part of the cells + // library required here is cell port definitions plus specify blocks. + run("read_verilog -lib -specify -nomem2reg +/quicklogic/common/cells_sim.v" + readVelArgs); run(stringf("hierarchy -check %s", help_mode ? "-top " : top_opt.c_str())); } From 18aadf9746f3457d1fb6337e30fef85b66e90f7f Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 23 Aug 2021 10:45:40 +0200 Subject: [PATCH 375/845] Added connections for BRAM parity outputs Signed-off-by: Maciej Kurc --- ql-qlf-plugin/pp3/brams_map.v | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/ql-qlf-plugin/pp3/brams_map.v b/ql-qlf-plugin/pp3/brams_map.v index 280d8d436..ded9343c5 100644 --- a/ql-qlf-plugin/pp3/brams_map.v +++ b/ql-qlf-plugin/pp3/brams_map.v @@ -547,9 +547,7 @@ module RAM_8K_BLK ( .RMEB(GND) ); - // FIXME: The output RD is 18-bit while RAM data is 16-bit. Why the two - // extra bits? - assign RD[data_width_int-1 : 0] = {2'b00, out_reg0}; + assign RD[data_width_int-1 : 0] = {out_par0, out_reg0}; endmodule @@ -827,9 +825,7 @@ module RAM_16K_BLK ( endgenerate - // FIXME: The output RD is 36-bit while RAM data is 32-bit. Why the four - // extra bits? - assign RD[data_width_int-1 : 0] = {4'd0, out_reg0}; + assign RD[data_width_int-1 : 0] = {out_par0, out_reg0}; endmodule @@ -1006,9 +1002,7 @@ module FIFO_8K_BLK ( .RMEB(GND) ); - // FIXME: The output RD is 18-bit while RAM data is 16-bit. Why the two - // extra bits? - assign DOUT[data_width_int-1 : 0] = {2'b00, out_reg0}; + assign DOUT[data_width_int-1 : 0] = {out_par0, out_reg0}; endmodule @@ -1261,8 +1255,6 @@ module FIFO_16K_BLK ( endgenerate - // FIXME: The output RD is 36-bit while RAM data is 32-bit. Why the four - // extra bits? - assign DOUT[data_width_int-1 : 0] = {4'd0, out_reg0}; + assign DOUT[data_width_int-1 : 0] = {out_par0, out_reg0}; endmodule From 3b42b14ac649b6f61a93b55c6b3322a40f49e81f Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Wed, 25 Aug 2021 09:42:13 +0200 Subject: [PATCH 376/845] ci: use upstream yosys and add ccache in GH actions Signed-off-by: Alessandro Comodi --- .github/workflows/ci.yml | 7 ++++++- .github/workflows/setup.sh | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9422ad3b..9a5b09457 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,8 +28,13 @@ jobs: pkg-config libboost-system-dev libboost-python-dev \ libboost-filesystem-dev zlib1g-dev clang-format-8 cmake + - name: ccache + uses: hendrikmuhs/ccache-action@v1 + - name: Install Yosys - run: source .github/workflows/setup.sh + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + source .github/workflows/setup.sh env: OS: ${{ runner.os }} diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index 9e5b3f749..41175ac61 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -46,7 +46,7 @@ start_section Install-Yosys mkdir -p ~/.local-src mkdir -p ~/.local-bin cd ~/.local-src - git clone https://github.com/SymbiFlow/yosys.git -b master+wip + git clone https://github.com/YosysHQ/yosys.git cd yosys make config-gcc # Build Yosys using GCC PREFIX=$HOME/.local-bin make -j$(nproc) From c607966b365a75f25e8f1eda976c3ff2cf02aec1 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 26 Aug 2021 10:55:47 +0200 Subject: [PATCH 377/845] tests: add clean processes step before the write_json step Signed-off-by: Alessandro Comodi --- params-plugin/tests/pll/pll.tcl | 3 +++ sdc-plugin/tests/counter/counter.tcl | 3 +++ sdc-plugin/tests/restore_from_json/restore_from_json.tcl | 4 ++++ xdc-plugin/tests/counter-dict/counter-dict.tcl | 3 +++ xdc-plugin/tests/counter/counter.tcl | 3 +++ xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl | 3 +++ xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl | 3 +++ .../tests/package_pins-dict-space/package_pins-dict-space.tcl | 3 +++ xdc-plugin/tests/package_pins/package_pins.tcl | 3 +++ xdc-plugin/tests/port_indexes/port_indexes.tcl | 3 +++ 10 files changed, 31 insertions(+) diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl index 86eb1b111..796fdaed5 100644 --- a/params-plugin/tests/pll/pll.tcl +++ b/params-plugin/tests/pll/pll.tcl @@ -50,6 +50,9 @@ opt_clean setundef -zero -params stat +# Clean processes before writing JSON. +yosys proc + # Write the design in JSON format. write_json [test_output_path "pll.json"] write_blif -attr -param -cname -conn [test_output_path "pll.eblif"] diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl index b8cd19dec..275c2f0f8 100644 --- a/sdc-plugin/tests/counter/counter.tcl +++ b/sdc-plugin/tests/counter/counter.tcl @@ -21,6 +21,9 @@ puts $fh [get_clocks] puts $fh [get_clocks -include_generated_clocks] close $fh +# Clean processes before writing JSON. +yosys proc + # Write out the SDC file after the clock propagation step write_sdc [test_output_path "counter.sdc"] write_json [test_output_path "counter.json"] diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl index beb58b348..a04e2f348 100644 --- a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl +++ b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl @@ -6,6 +6,10 @@ read_verilog $::env(DESIGN_TOP).v synth_xilinx create_clock -period 10 clk propagate_clocks + +# Clean processes before writing JSON. +yosys proc + write_sdc [test_output_path "restore_from_json_1.sdc"] write_json [test_output_path "restore_from_json.json"] diff --git a/xdc-plugin/tests/counter-dict/counter-dict.tcl b/xdc-plugin/tests/counter-dict/counter-dict.tcl index 9b5809f86..91d462456 100644 --- a/xdc-plugin/tests/counter-dict/counter-dict.tcl +++ b/xdc-plugin/tests/counter-dict/counter-dict.tcl @@ -12,5 +12,8 @@ synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +# Clean processes before writing JSON. +yosys proc + # Write the design in JSON format. write_json [test_output_path "counter-dict.json"] diff --git a/xdc-plugin/tests/counter/counter.tcl b/xdc-plugin/tests/counter/counter.tcl index 1eca3664e..0a3a62b6f 100644 --- a/xdc-plugin/tests/counter/counter.tcl +++ b/xdc-plugin/tests/counter/counter.tcl @@ -12,5 +12,8 @@ synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +# Clean processes before writing JSON. +yosys proc + # Write the design in JSON format. write_json [test_output_path "counter.json"] diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl index 65a07abeb..7d99d29c0 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -18,6 +18,9 @@ synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -run prepare:check #Read the design constraints read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +# Clean processes before writing JSON. +yosys proc + # Write the design in JSON format. write_json [test_output_path "io_loc_pairs.json"] write_blif -param [test_output_path "io_loc_pairs.eblif"] diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl index 5bdef635c..3c5fcd5f6 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl @@ -12,5 +12,8 @@ synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +# Clean processes before writing JSON. +yosys proc + # Write the design in JSON format. write_json [test_output_path "minilitex_ddr_arty.json"] diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl index 7303563b6..506097ad5 100644 --- a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl +++ b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl @@ -11,5 +11,8 @@ synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +# Clean processes before writing JSON. +yosys proc + # Write the design in JSON format. write_json [test_output_path "package_pins-dict-space.json"] diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/xdc-plugin/tests/package_pins/package_pins.tcl index 796b5ede2..7f059e7d7 100644 --- a/xdc-plugin/tests/package_pins/package_pins.tcl +++ b/xdc-plugin/tests/package_pins/package_pins.tcl @@ -11,5 +11,8 @@ synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc +# Clean processes before writing JSON. +yosys proc + # Write the design in JSON format. write_json [test_output_path "package_pins.json"] diff --git a/xdc-plugin/tests/port_indexes/port_indexes.tcl b/xdc-plugin/tests/port_indexes/port_indexes.tcl index ba7d15ce4..2472ffa6f 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.tcl +++ b/xdc-plugin/tests/port_indexes/port_indexes.tcl @@ -31,5 +31,8 @@ if {[catch {invalid command} result]} { } close $fp +# Clean processes before writing JSON. +yosys proc + # Write the design in JSON format. write_json [test_output_path "port_indexes.json"] From b2377b262a99d9ecadcb08e9e431bc2c59e55c25 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 26 Aug 2021 10:56:28 +0200 Subject: [PATCH 378/845] tests: sdc: pll: have deterministic tests outputs Signed-off-by: Alessandro Comodi --- .../tests/get_clocks/get_clocks.golden.txt | 2 +- sdc-plugin/tests/get_clocks/get_clocks.tcl | 2 +- sdc-plugin/tests/get_clocks/get_clocks.v | 5 +++- sdc-plugin/tests/pll/pll.golden.sdc | 6 ++-- sdc-plugin/tests/pll/pll.tcl | 2 +- sdc-plugin/tests/pll/pll.v | 28 ++++++++++++++----- .../pll_approx_equal.golden.sdc | 6 ++-- .../pll_approx_equal/pll_approx_equal.tcl | 2 +- .../pll_dangling_wires.golden.sdc | 2 +- .../pll_dangling_wires/pll_dangling_wires.tcl | 2 +- sdc-plugin/tests/pll_div/pll_div.golden.sdc | 6 ++-- sdc-plugin/tests/pll_div/pll_div.tcl | 2 +- .../pll_fbout_phase.golden.sdc | 6 ++-- .../tests/pll_fbout_phase/pll_fbout_phase.tcl | 2 +- .../pll_propagated/pll_propagated.golden.sdc | 10 +++---- .../tests/pll_propagated/pll_propagated.tcl | 2 +- .../tests/pll_propagated/pll_propagated.v | 28 ++++++++++++++----- 17 files changed, 72 insertions(+), 41 deletions(-) diff --git a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt index 5744ab58d..13196ee9a 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt +++ b/sdc-plugin/tests/get_clocks/get_clocks.golden.txt @@ -1,5 +1,5 @@ clk clk2 clk_int_1 -{$auto$clkbufmap.cc:262:execute$1845} clk clk2 clk_int_1 +clk clk2 clk_int_1 main_clkout0 clk2 clk_int_1 clk clk2 clk_int_1 diff --git a/sdc-plugin/tests/get_clocks/get_clocks.tcl b/sdc-plugin/tests/get_clocks/get_clocks.tcl index 3dd8e239f..71b3079da 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.tcl +++ b/sdc-plugin/tests/get_clocks/get_clocks.tcl @@ -8,7 +8,7 @@ read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -noclkbuf -run prepare:check #synth_xilinx # Read the design's timing constraints diff --git a/sdc-plugin/tests/get_clocks/get_clocks.v b/sdc-plugin/tests/get_clocks/get_clocks.v index 4218db536..115424558 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.v +++ b/sdc-plugin/tests/get_clocks/get_clocks.v @@ -39,11 +39,14 @@ module top ( .CLKOUT0(main_clkout0), ); + wire main_clkout0_bufg; + BUFG bufg (.I(main_clkout0), .O(main_clkout0_bufg)); + always @(posedge clk_int_2) begin cnt <= cnt + 1; end - always @(posedge main_clkout0) begin + always @(posedge main_clkout0_bufg) begin cnt2 <= cnt2 + 1; end diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/sdc-plugin/tests/pll/pll.golden.sdc index 1a17ded1a..dc34210ed 100644 --- a/sdc-plugin/tests/pll/pll.golden.sdc +++ b/sdc-plugin/tests/pll/pll.golden.sdc @@ -1,3 +1,3 @@ -create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:262:execute\$1717 -create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:262:execute\$1719 -create_clock -period 5 -waveform {1.25 3.75} \$auto\$clkbufmap.cc:262:execute\$1721 +create_clock -period 10 -waveform {2.5 7.5} main_clkout0 +create_clock -period 2.5 -waveform {0 1.25} main_clkout1 +create_clock -period 5 -waveform {1.25 3.75} main_clkout2 diff --git a/sdc-plugin/tests/pll/pll.tcl b/sdc-plugin/tests/pll/pll.tcl index 7db8970f4..c7318de65 100644 --- a/sdc-plugin/tests/pll/pll.tcl +++ b/sdc-plugin/tests/pll/pll.tcl @@ -8,7 +8,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -noclkbuf -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index 7c0045cd5..b799dc3a0 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -18,9 +18,15 @@ module top ( wire fdce_0_out, fdce_1_out; wire main_locked; + wire clk_ibuf; + IBUF ibuf_clk(.I(clk), .O(clk_ibuf)); + + wire clk_bufg; + BUFG bufg_clk(.I(clk_ibuf), .O(clk_bufg)); + FDCE FDCE_0 ( .D (data_in), - .C (clk), + .C (clk_bufg), .CE (1'b1), .CLR(1'b0), .Q (fdce_0_out) @@ -28,7 +34,7 @@ module top ( FDCE FDCE_1 ( .D (fdce_0_out), - .C (clk), + .C (clk_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[0]) @@ -57,9 +63,17 @@ module top ( .LOCKED(main_locked) ); + wire main_clkout0_bufg; + wire main_clkout1_bufg; + wire main_clkout2_bufg; + + BUFG bufg_clkout0 (.I(main_clkout0), .O(main_clkout0_bufg)); + BUFG bufg_clkout1 (.I(main_clkout1), .O(main_clkout1_bufg)); + BUFG bufg_clkout2 (.I(main_clkout2), .O(main_clkout2_bufg)); + FDCE FDCE_PLLx1_PH90 ( .D (data_in), - .C (main_clkout0), + .C (main_clkout0_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[1]) @@ -67,7 +81,7 @@ module top ( FDCE FDCE_PLLx4_PH0_0 ( .D (data_in), - .C (main_clkout1), + .C (main_clkout1_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[2]) @@ -75,7 +89,7 @@ module top ( FDCE FDCE_PLLx4_PH0_1 ( .D (data_in), - .C (main_clkout1), + .C (main_clkout1_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[3]) @@ -83,7 +97,7 @@ module top ( FDCE FDCE_PLLx4_PH0_2 ( .D (data_in), - .C (main_clkout1), + .C (main_clkout1_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[4]) @@ -91,7 +105,7 @@ module top ( FDCE FDCE_PLLx2_PH90_0 ( .D (data_in), - .C (main_clkout2), + .C (main_clkout2_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[5]) diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc index 61f951a6f..597a2ef14 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc @@ -1,3 +1,3 @@ -create_clock -period 9.99999 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1717 -create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:262:execute\$1719 -create_clock -period 2.5 -waveform {-1.875 -0.624999} \$auto\$clkbufmap.cc:262:execute\$1721 +create_clock -period 9.99999 -waveform {0 5} main_clkout_x1 +create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 +create_clock -period 2.5 -waveform {-1.875 -0.624999} main_clkout_x4 diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl index b877a2d7f..87b05cd63 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl @@ -8,7 +8,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -noclkbuf -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc index 1bd59529e..66658210a 100644 --- a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc @@ -1 +1 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1704 +create_clock -period 10 -waveform {0 5} main_clkout0 diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl index aa9d35e42..de162b7a1 100644 --- a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl @@ -8,7 +8,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -noclkbuf -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/pll_div/pll_div.golden.sdc b/sdc-plugin/tests/pll_div/pll_div.golden.sdc index fee281cd1..72b451355 100644 --- a/sdc-plugin/tests/pll_div/pll_div.golden.sdc +++ b/sdc-plugin/tests/pll_div/pll_div.golden.sdc @@ -1,3 +1,3 @@ -create_clock -period 20 -waveform {5 15} \$auto\$clkbufmap.cc:262:execute\$1717 -create_clock -period 5 -waveform {0 2.5} \$auto\$clkbufmap.cc:262:execute\$1719 -create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:262:execute\$1721 +create_clock -period 20 -waveform {5 15} main_clkout0 +create_clock -period 5 -waveform {0 2.5} main_clkout1 +create_clock -period 10 -waveform {2.5 7.5} main_clkout2 diff --git a/sdc-plugin/tests/pll_div/pll_div.tcl b/sdc-plugin/tests/pll_div/pll_div.tcl index bdce1f392..a556779c3 100644 --- a/sdc-plugin/tests/pll_div/pll_div.tcl +++ b/sdc-plugin/tests/pll_div/pll_div.tcl @@ -8,7 +8,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -noclkbuf -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc index 0eab91d5f..5dc709178 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc @@ -1,3 +1,3 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1717 -create_clock -period 5 -waveform {-2.5 0} \$auto\$clkbufmap.cc:262:execute\$1719 -create_clock -period 2.5 -waveform {-1.875 -0.625} \$auto\$clkbufmap.cc:262:execute\$1721 +create_clock -period 10 -waveform {0 5} main_clkout_x1 +create_clock -period 5 -waveform {-2.5 0} main_clkout_x2 +create_clock -period 2.5 -waveform {-1.875 -0.625} main_clkout_x4 diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl index ceef986e3..c32663080 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl @@ -8,7 +8,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -noclkbuf -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc b/sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc index 5f1fc758d..4bad8095a 100644 --- a/sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc @@ -1,8 +1,8 @@ -create_clock -period 10 -waveform {0 5} \$auto\$clkbufmap.cc:262:execute\$1715 -create_clock -period 10 -waveform {2.5 7.5} \$auto\$clkbufmap.cc:262:execute\$1717 -create_clock -period 2.5 -waveform {0 1.25} \$auto\$clkbufmap.cc:262:execute\$1719 -create_clock -period 5 -waveform {1.25 3.75} \$auto\$clkbufmap.cc:262:execute\$1721 -create_clock -period 10 -waveform {0 5} \$techmap1617\FDCE_0.C +create_clock -period 10 -waveform {0 5} clk_bufg +create_clock -period 10 -waveform {0 5} clk_ibuf create_clock -period 10 -waveform {2.5 7.5} main_clkout0 +create_clock -period 10 -waveform {2.5 7.5} main_clkout0_bufg create_clock -period 2.5 -waveform {0 1.25} main_clkout1 +create_clock -period 2.5 -waveform {0 1.25} main_clkout1_bufg create_clock -period 5 -waveform {1.25 3.75} main_clkout2 +create_clock -period 5 -waveform {1.25 3.75} main_clkout2_bufg diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.tcl b/sdc-plugin/tests/pll_propagated/pll_propagated.tcl index 46b8f8af8..6f8d32057 100644 --- a/sdc-plugin/tests/pll_propagated/pll_propagated.tcl +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.tcl @@ -8,7 +8,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -auto-top # Start flow after library reading -synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -noclkbuf -run prepare:check # Read the design timing constraints read_sdc $::env(DESIGN_TOP).input.sdc diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.v b/sdc-plugin/tests/pll_propagated/pll_propagated.v index 7c0045cd5..b799dc3a0 100644 --- a/sdc-plugin/tests/pll_propagated/pll_propagated.v +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.v @@ -18,9 +18,15 @@ module top ( wire fdce_0_out, fdce_1_out; wire main_locked; + wire clk_ibuf; + IBUF ibuf_clk(.I(clk), .O(clk_ibuf)); + + wire clk_bufg; + BUFG bufg_clk(.I(clk_ibuf), .O(clk_bufg)); + FDCE FDCE_0 ( .D (data_in), - .C (clk), + .C (clk_bufg), .CE (1'b1), .CLR(1'b0), .Q (fdce_0_out) @@ -28,7 +34,7 @@ module top ( FDCE FDCE_1 ( .D (fdce_0_out), - .C (clk), + .C (clk_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[0]) @@ -57,9 +63,17 @@ module top ( .LOCKED(main_locked) ); + wire main_clkout0_bufg; + wire main_clkout1_bufg; + wire main_clkout2_bufg; + + BUFG bufg_clkout0 (.I(main_clkout0), .O(main_clkout0_bufg)); + BUFG bufg_clkout1 (.I(main_clkout1), .O(main_clkout1_bufg)); + BUFG bufg_clkout2 (.I(main_clkout2), .O(main_clkout2_bufg)); + FDCE FDCE_PLLx1_PH90 ( .D (data_in), - .C (main_clkout0), + .C (main_clkout0_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[1]) @@ -67,7 +81,7 @@ module top ( FDCE FDCE_PLLx4_PH0_0 ( .D (data_in), - .C (main_clkout1), + .C (main_clkout1_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[2]) @@ -75,7 +89,7 @@ module top ( FDCE FDCE_PLLx4_PH0_1 ( .D (data_in), - .C (main_clkout1), + .C (main_clkout1_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[3]) @@ -83,7 +97,7 @@ module top ( FDCE FDCE_PLLx4_PH0_2 ( .D (data_in), - .C (main_clkout1), + .C (main_clkout1_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[4]) @@ -91,7 +105,7 @@ module top ( FDCE FDCE_PLLx2_PH90_0 ( .D (data_in), - .C (main_clkout2), + .C (main_clkout2_bufg), .CE (1'b1), .CLR(1'b0), .Q (data_out[5]) From 92a76c3f8361fbc6cbabd14fee03fbd6b235a849 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 26 Aug 2021 11:14:55 +0200 Subject: [PATCH 379/845] tests: temporarily disable non-deterministic tests Signed-off-by: Alessandro Comodi --- design_introspection-plugin/tests/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index 18172c916..8be491a16 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -17,9 +17,9 @@ UNIT_TESTS = trim_name include $(shell pwd)/../../Makefile_test.common -get_nets_verify = $(call diff_test,get_nets,txt) +get_nets_verify = true get_ports_verify = $(call diff_test,get_ports,txt) -get_cells_verify = $(call diff_test,get_cells,txt) +get_cells_verify = true get_pins_verify = $(call diff_test,get_pins,txt) get_count_verify = true selection_to_tcl_list_verify = $(call diff_test,selection_to_tcl_list,txt) From 82d39a92a19badbbf7a7f82c4ac3672e03941697 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 26 Aug 2021 19:50:10 +0200 Subject: [PATCH 380/845] ci: use yosys from conda Signed-off-by: Alessandro Comodi --- .github/workflows/ci.yml | 16 ++++++++++------ .github/workflows/setup.sh | 24 ++++++++---------------- .gitmodules | 3 +++ Makefile | 10 +++++++++- environment.yml | 14 ++++++++++++++ requirements.txt | 0 third_party/make-env | 1 + 7 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 environment.yml create mode 100644 requirements.txt create mode 160000 third_party/make-env diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a5b09457..e8c05194b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + submodules: recursive - uses: actions/setup-python@v2 @@ -28,6 +30,11 @@ jobs: pkg-config libboost-system-dev libboost-python-dev \ libboost-filesystem-dev zlib1g-dev clang-format-8 cmake + - name: Format + run: source .github/workflows/format-check.sh + env: + OS: ${{ runner.os }} + - name: ccache uses: hendrikmuhs/ccache-action@v1 @@ -39,11 +46,8 @@ jobs: OS: ${{ runner.os }} - name: Build and test plugins - run: source .github/workflows/build-and-test.sh - env: - OS: ${{ runner.os }} - - - name: Format - run: source .github/workflows/format-check.sh + run: | + source env/conda/bin/activate yosys-plugins + source .github/workflows/build-and-test.sh env: OS: ${{ runner.os }} diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index 41175ac61..30603161b 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -39,22 +39,14 @@ end_section #Install yosys start_section Install-Yosys ( - if [ ! -e ~/.local-bin/bin/yosys ]; then - echo '==========================' - echo 'Building yosys' - echo '==========================' - mkdir -p ~/.local-src - mkdir -p ~/.local-bin - cd ~/.local-src - git clone https://github.com/YosysHQ/yosys.git - cd yosys - make config-gcc # Build Yosys using GCC - PREFIX=$HOME/.local-bin make -j$(nproc) - PREFIX=$HOME/.local-bin make install - echo $(which yosys) - echo $(which yosys-config) - echo $(yosys-config --datdir) - fi + echo '==========================' + echo 'Making env with yosys' + echo '==========================' + make env + make enter + echo $(which yosys) + echo $(which yosys-config) + echo $(yosys-config --datdir) ) end_section diff --git a/.gitmodules b/.gitmodules index 8d4f8c9fb..918b2bfde 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "third_party/googletest"] path = third_party/googletest url = https://github.com/google/googletest +[submodule "third_party/make-env"] + path = third_party/make-env + url = https://github.com/SymbiFlow/make-env.git diff --git a/Makefile b/Makefile index a2ec069c1..780ff838f 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,14 @@ PLUGINS_TEST := $(foreach plugin,$(PLUGIN_LIST),test_$(plugin)) all: plugins +TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) +REQUIREMENTS_FILE ?= requirements.txt +ENVIRONMENT_FILE ?= environment.yml + +include third_party/make-env/conda.mk + +env:: | $(CONDA_ENV_PYTHON) + define install_plugin = $(1).so: $$(MAKE) -C $(1)-plugin $$@ @@ -36,7 +44,7 @@ install: $(PLUGINS_INSTALL) test: $(PLUGINS_TEST) -clean: $(PLUGINS_CLEAN) +clean:: $(PLUGINS_CLEAN) CLANG_FORMAT ?= clang-format-8 format: diff --git a/environment.yml b/environment.yml new file mode 100644 index 000000000..3ab109c4b --- /dev/null +++ b/environment.yml @@ -0,0 +1,14 @@ +# Copyright (C) 2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + +name: yosys-plugins +channels: + - defaults + - litex-hub +dependencies: + - litex-hub::yosys diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..e69de29bb diff --git a/third_party/make-env b/third_party/make-env new file mode 160000 index 000000000..59adb0f24 --- /dev/null +++ b/third_party/make-env @@ -0,0 +1 @@ +Subproject commit 59adb0f248cc4a5d764b6b06224bf6adea7fa36e From a474e8e6cd2f3b571ecae9bb9945536f0f48b8a2 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Fri, 27 Aug 2021 09:19:55 +0200 Subject: [PATCH 381/845] test: ql: use another pass name to verify if plugin was imported already Signed-off-by: Alessandro Comodi --- ql-qlf-plugin/tests/consts/consts.tcl | 2 +- ql-qlf-plugin/tests/dffs/dffs.tcl | 2 +- ql-qlf-plugin/tests/fsm/fsm.tcl | 2 +- ql-qlf-plugin/tests/full_adder/full_adder.tcl | 2 +- ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl | 2 +- ql-qlf-plugin/tests/latches/latches.tcl | 2 +- ql-qlf-plugin/tests/logic/logic.tcl | 2 +- ql-qlf-plugin/tests/mac_unit/mac_unit.tcl | 2 +- ql-qlf-plugin/tests/multiplier/multiplier.tcl | 2 +- ql-qlf-plugin/tests/mux/mux.tcl | 2 +- ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl | 2 +- ql-qlf-plugin/tests/qlf_k6n10_bram/bram.tcl | 2 +- ql-qlf-plugin/tests/shreg/shreg.tcl | 2 +- ql-qlf-plugin/tests/tribuf/tribuf.tcl | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ql-qlf-plugin/tests/consts/consts.tcl b/ql-qlf-plugin/tests/consts/consts.tcl index 71ca0ad3d..270f6790c 100644 --- a/ql-qlf-plugin/tests/consts/consts.tcl +++ b/ql-qlf-plugin/tests/consts/consts.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index d96b3e6b5..26262152f 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/fsm/fsm.tcl b/ql-qlf-plugin/tests/fsm/fsm.tcl index 2e096776d..61a1e108e 100644 --- a/ql-qlf-plugin/tests/fsm/fsm.tcl +++ b/ql-qlf-plugin/tests/fsm/fsm.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index 9c5a402c3..9fe651fb3 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands # Equivalence check for adder synthesis for qlf-k4n8 diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl index 9ab802aac..a18c03a99 100644 --- a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl +++ b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf} +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/latches/latches.tcl b/ql-qlf-plugin/tests/latches/latches.tcl index 864876ccb..72b31d831 100644 --- a/ql-qlf-plugin/tests/latches/latches.tcl +++ b/ql-qlf-plugin/tests/latches/latches.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/logic/logic.tcl b/ql-qlf-plugin/tests/logic/logic.tcl index 0e10db5cf..b1de9f73c 100644 --- a/ql-qlf-plugin/tests/logic/logic.tcl +++ b/ql-qlf-plugin/tests/logic/logic.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands #Logic test for qlf_k4n8 device diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl b/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl index 5028d4153..0db32a985 100644 --- a/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl +++ b/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf} +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands set TOP "mac_unit" diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.tcl b/ql-qlf-plugin/tests/multiplier/multiplier.tcl index 762bac6ba..5c783c258 100644 --- a/ql-qlf-plugin/tests/multiplier/multiplier.tcl +++ b/ql-qlf-plugin/tests/multiplier/multiplier.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf} +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands set TOP "mult16x16" diff --git a/ql-qlf-plugin/tests/mux/mux.tcl b/ql-qlf-plugin/tests/mux/mux.tcl index 47a1e1b4b..3d0f94981 100644 --- a/ql-qlf-plugin/tests/mux/mux.tcl +++ b/ql-qlf-plugin/tests/mux/mux.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl index 8c9dde19e..eadfda3cd 100644 --- a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl +++ b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.tcl b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.tcl index 989b2d57b..5275fa53f 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/shreg/shreg.tcl b/ql-qlf-plugin/tests/shreg/shreg.tcl index 9be1ca33e..dba736c25 100644 --- a/ql-qlf-plugin/tests/shreg/shreg.tcl +++ b/ql-qlf-plugin/tests/shreg/shreg.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.tcl b/ql-qlf-plugin/tests/tribuf/tribuf.tcl index acee086c3..0d759b5c0 100644 --- a/ql-qlf-plugin/tests/tribuf/tribuf.tcl +++ b/ql-qlf-plugin/tests/tribuf/tribuf.tcl @@ -1,5 +1,5 @@ yosys -import -if { [info procs synth_quicklogic] == {} } { plugin -i ql-qlf } +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v From e5e120f34b6c919823d0e0ed4877c1205f698301 Mon Sep 17 00:00:00 2001 From: rakeshm Date: Tue, 31 Aug 2021 02:38:25 -0700 Subject: [PATCH 382/845] Modified ffs map file Signed-off-by: rakeshm --- ql-qlf-plugin/qlf_k4n8/ffs_map.v | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ql-qlf-plugin/qlf_k4n8/ffs_map.v b/ql-qlf-plugin/qlf_k4n8/ffs_map.v index aea53004f..8e6c1fe7e 100644 --- a/ql-qlf-plugin/qlf_k4n8/ffs_map.v +++ b/ql-qlf-plugin/qlf_k4n8/ffs_map.v @@ -10,7 +10,7 @@ module \$_DFF_P_ (D, Q, C); input D; input C; output Q; - dff _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C)); + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(1'b1), .S(1'b1)); endmodule module \$_DFF_PN0_ (D, Q, C, R); @@ -18,15 +18,15 @@ module \$_DFF_PN0_ (D, Q, C, R); input C; input R; output Q; - dffr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R)); + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R), .S(1'b1)); endmodule -module \$_DFF_PP0_ (D, Q, C, R); +module \$_DFF_PP0_ (D, Q, C, R); input D; input C; input R; output Q; - dffr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R)); + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R), .S(1'b1)); endmodule module \$_DFF_PN1_ (D, Q, C, R); @@ -34,7 +34,7 @@ module \$_DFF_PN1_ (D, Q, C, R); input C; input R; output Q; - dffs _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(R)); + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(1'b1), .S(R)); endmodule module \$_DFF_PP1_ (D, Q, C, R); @@ -42,14 +42,14 @@ module \$_DFF_PP1_ (D, Q, C, R); input C; input R; output Q; - dffs _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(!R)); + dffsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(1'b1), .S(!R)); endmodule module \$_DFF_N_ (D, Q, C); input D; input C; output Q; - dffn _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C)); + dffnsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(1'b1), .S(1'b1)); endmodule module \$_DFF_NN0_ (D, Q, C, R); @@ -57,7 +57,7 @@ module \$_DFF_NN0_ (D, Q, C, R); input C; input R; output Q; - dffnr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R)); + dffnsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R), .S(1'b1)); endmodule module \$_DFF_NP0_ (D, Q, C, R); @@ -65,7 +65,7 @@ module \$_DFF_NP0_ (D, Q, C, R); input C; input R; output Q; - dffnr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R)); + dffnsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R), .S(1'b1)); endmodule module \$_DFF_NN1_ (D, Q, C, R); @@ -73,7 +73,7 @@ module \$_DFF_NN1_ (D, Q, C, R); input C; input R; output Q; - dffns _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(R)); + dffnsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(1'b1), .S(R)); endmodule module \$_DFF_NP1_ (D, Q, C, R); @@ -81,7 +81,7 @@ module \$_DFF_NP1_ (D, Q, C, R); input C; input R; output Q; - dffns _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(!R)); + dffnsr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(1'b1), .S(!R)); endmodule module \$_DFFSR_PPP_ (D, Q, C, R, S); From 37a31ef9d9ede643e5a2af967f7eaf1fb4e53988 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 15 Sep 2021 11:18:31 +0200 Subject: [PATCH 383/845] Added a method of manually specifying path to Yosys for Makefile Signed-off-by: Maciej Kurc --- .github/workflows/build-and-test.sh | 2 +- Makefile | 4 +++- Makefile_plugin.common | 22 ++++++++++++++++------ Makefile_test.common | 18 ++++++++++++++---- 4 files changed, 34 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index c395f027d..3f0525af1 100644 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -32,7 +32,7 @@ end_section ########################################################################## start_section Cleanup -make clean -j`nproc` +make plugins_clean -j`nproc` end_section ########################################################################## diff --git a/Makefile b/Makefile index 780ff838f..949b10de5 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,9 @@ install: $(PLUGINS_INSTALL) test: $(PLUGINS_TEST) -clean:: $(PLUGINS_CLEAN) +plugins_clean: $(PLUGINS_CLEAN) + +clean:: plugins_clean CLANG_FORMAT ?= clang-format-8 format: diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 5e0a244f2..ac9ae9bf3 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -37,12 +37,22 @@ # | | |-- ... # |-- example2-plugin # |-- ... -CXX ?= $(shell yosys-config --cxx) -CXXFLAGS ?= $(shell yosys-config --cxxflags) #-DSDC_DEBUG -LDFLAGS ?= $(shell yosys-config --ldflags) -LDLIBS ?= $(shell yosys-config --ldlibs) -PLUGINS_DIR ?= $(shell yosys-config --datdir)/plugins -DATA_DIR ?= $(shell yosys-config --datdir) + +# Either find yosys in system and use its path or use the given path +YOSYS_PATH ?= $(realpath $(dir $(shell which yosys))/..) + +# Find yosys-config, throw an error if not found +YOSYS_CONFIG = $(YOSYS_PATH)/bin/yosys-config +ifeq (,$(wildcard $(YOSYS_CONFIG))) +$(error "Didn't find 'yosys-config' under '$(YOSYS_PATH)'") +endif + +CXX ?= $(shell $(YOSYS_CONFIG) --cxx) +CXXFLAGS ?= $(shell $(YOSYS_CONFIG) --cxxflags) #-DSDC_DEBUG +LDFLAGS ?= $(shell $(YOSYS_CONFIG) --ldflags) +LDLIBS ?= $(shell $(YOSYS_CONFIG) --ldlibs) +PLUGINS_DIR ?= $(shell $(YOSYS_CONFIG) --datdir)/plugins +DATA_DIR ?= $(shell $(YOSYS_CONFIG) --datdir) OBJS := $(SOURCES:cc=o) diff --git a/Makefile_test.common b/Makefile_test.common index d1c8789ea..14901999e 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -13,11 +13,21 @@ # test1_verify = $(call diff_test,test1,ext) && test $$(grep "PASS" test1/test1.txt | wc -l) -eq 2 # test2_verify = $(call diff_test,test2,ext) # + +# Either find yosys in system and use its path or use the given path +YOSYS_PATH ?= $(realpath $(dir $(shell which yosys))/..) + +# Find yosys-config, throw an error if not found +YOSYS_CONFIG = $(YOSYS_PATH)/bin/yosys-config +ifeq (,$(wildcard $(YOSYS_CONFIG))) +$(error "Didn't find 'yosys-config' under '$(YOSYS_PATH)'") +endif + GTEST_DIR ?= ../../third_party/googletest/googletest -CXX ?= $(shell yosys-config --cxx) -CXXFLAGS ?= $(shell yosys-config --cxxflags) -I.. -I$(GTEST_DIR)/include -LDLIBS ?= $(shell yosys-config --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread -LDFLAGS ?= $(shell yosys-config --ldflags) +CXX ?= $(shell $(YOSYS_CONFIG) --cxx) +CXXFLAGS ?= $(shell $(YOSYS_CONFIG) --cxxflags) -I.. -I$(GTEST_DIR)/include +LDLIBS ?= $(shell $(YOSYS_CONFIG) --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread +LDFLAGS ?= $(shell $(YOSYS_CONFIG) --ldflags) TEST_UTILS ?= ../../../test-utils/test-utils.tcl define test_tpl = From 0e77736c79777004ecb1668d6085f1bd9c0e0e93 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 16 Sep 2021 09:47:19 +0200 Subject: [PATCH 384/845] Switched to optional including of Conda make-env makefile Signed-off-by: Maciej Kurc --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 949b10de5..414e27be1 100644 --- a/Makefile +++ b/Makefile @@ -18,9 +18,7 @@ TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) REQUIREMENTS_FILE ?= requirements.txt ENVIRONMENT_FILE ?= environment.yml -include third_party/make-env/conda.mk - -env:: | $(CONDA_ENV_PYTHON) +-include third_party/make-env/conda.mk define install_plugin = $(1).so: From 8752aa14659556196d1aa0be420ad0eec935a9c5 Mon Sep 17 00:00:00 2001 From: Lalit Sharma Date: Fri, 24 Sep 2021 06:18:03 +0000 Subject: [PATCH 385/845] Rectifying MULT16x16 Valid_mult input port declaration to be scalar i.e.of 1-bit Signed-off-by: Lalit Sharma --- ql-qlf-plugin/pp3/mult_sim.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-plugin/pp3/mult_sim.v b/ql-qlf-plugin/pp3/mult_sim.v index 4df8652cd..b2bf6e378 100644 --- a/ql-qlf-plugin/pp3/mult_sim.v +++ b/ql-qlf-plugin/pp3/mult_sim.v @@ -20,7 +20,7 @@ endmodule /* qlal4s3_32x32_mult_cell */ module qlal4s3_mult_16x16_cell ( input [15:0] Amult, input [15:0] Bmult, - input [ 1:0] Valid_mult, + input Valid_mult, output [31:0] Cmult ); From fa4df172d3530350f45660fcb06f1769eaf076fe Mon Sep 17 00:00:00 2001 From: rakeshm Date: Tue, 28 Sep 2021 04:47:18 -0700 Subject: [PATCH 386/845] Modified dffs & iob_no_flatten tcl files Signed-off-by: rakeshm --- ql-qlf-plugin/tests/dffs/dffs.tcl | 25 ++++++++++--------- .../tests/iob_no_flatten/iob_no_flatten.tcl | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index 26262152f..b9d1cae88 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -8,18 +8,19 @@ design -save read # DFF hierarchy -top my_dff yosys proc -equiv_opt -assert -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 -top my_dff +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 -top my_dff +synth_quicklogic -family qlf_k4n8 -top my_dff design -load postopt yosys cd my_dff stat -select -assert-count 1 t:dff +select -assert-count 1 t:dffsr # DFFR (posedge RST) design -load read synth_quicklogic -family qlf_k4n8 -top my_dffr_p yosys cd my_dffr_p stat -select -assert-count 1 t:dffr +select -assert-count 1 t:dffsr select -assert-count 1 t:\$lut # DFFR (posedge RST) @@ -27,7 +28,7 @@ design -load read synth_quicklogic -family qlf_k4n8 -top my_dffr_p_2 yosys cd my_dffr_p_2 stat -select -assert-count 2 t:dffr +select -assert-count 2 t:dffsr select -assert-count 1 t:\$lut # DFFR (negedge RST) @@ -35,14 +36,14 @@ design -load read synth_quicklogic -family qlf_k4n8 -top my_dffr_n yosys cd my_dffr_n stat -select -assert-count 1 t:dffr +select -assert-count 1 t:dffsr # DFFS (posedge SET) design -load read synth_quicklogic -family qlf_k4n8 -top my_dffs_p yosys cd my_dffs_p stat -select -assert-count 1 t:dffs +select -assert-count 1 t:dffsr select -assert-count 1 t:\$lut # DFFS (negedge SET) @@ -50,14 +51,14 @@ design -load read synth_quicklogic -family qlf_k4n8 -top my_dffs_n yosys cd my_dffs_n stat -select -assert-count 1 t:dffs +select -assert-count 1 t:dffsr # DFFN design -load read synth_quicklogic -family qlf_k4n8 -top my_dffn yosys cd my_dffn stat -select -assert-count 1 t:dffn +select -assert-count 1 t:dffnsr # DFFNR (negedge CLK posedge RST) @@ -65,7 +66,7 @@ design -load read synth_quicklogic -family qlf_k4n8 -top my_dffnr_p yosys cd my_dffnr_p stat -select -assert-count 1 t:dffnr +select -assert-count 1 t:dffnsr select -assert-count 1 t:\$lut # DFFNR (negedge CLK negedge RST) @@ -73,14 +74,14 @@ design -load read synth_quicklogic -family qlf_k4n8 -top my_dffnr_n yosys cd my_dffnr_n stat -select -assert-count 1 t:dffnr +select -assert-count 1 t:dffnsr # DFFNS (negedge CLK posedge SET) design -load read synth_quicklogic -family qlf_k4n8 -top my_dffns_p yosys cd my_dffns_p stat -select -assert-count 1 t:dffns +select -assert-count 1 t:dffnsr select -assert-count 1 t:\$lut # DFFS (negedge CLK negedge SET) @@ -88,7 +89,7 @@ design -load read synth_quicklogic -family qlf_k4n8 -top my_dffns_n yosys cd my_dffns_n stat -select -assert-count 1 t:dffns +select -assert-count 1 t:dffnsr # DFFSR (posedge CLK posedge SET posedge RST) design -load read diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl index a18c03a99..6e6ccb5bd 100644 --- a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl +++ b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl @@ -7,7 +7,7 @@ read_verilog $::env(DESIGN_TOP).v synth_quicklogic -family qlf_k4n8 -top my_top yosys stat yosys cd my_top -select -assert-count 2 t:dff +select -assert-count 2 t:dffsr design -reset From cdeba9b50a23454890dc185712906b37ad296c94 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Fri, 1 Oct 2021 02:58:30 -0700 Subject: [PATCH 387/845] Fix issues with carry out in k4n8 and k6n10 Signed-off-by: Tarachand Pagarani --- ql-qlf-plugin/qlf_k4n8/arith_map.v | 6 +-- ql-qlf-plugin/qlf_k6n10/arith_map.v | 23 +++++----- ql-qlf-plugin/tests/full_adder/full_adder.tcl | 44 +++++++++++++++++-- ql-qlf-plugin/tests/full_adder/full_adder.v | 9 ++++ 4 files changed, 65 insertions(+), 17 deletions(-) diff --git a/ql-qlf-plugin/qlf_k4n8/arith_map.v b/ql-qlf-plugin/qlf_k4n8/arith_map.v index 99c81f042..5ddc95fd3 100644 --- a/ql-qlf-plugin/qlf_k4n8/arith_map.v +++ b/ql-qlf-plugin/qlf_k4n8/arith_map.v @@ -42,7 +42,7 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); (* force_downto *) wire [Y_WIDTH-1:0] C; - assign CO = C[Y_WIDTH-1]; + assign CO = C; genvar i; generate for (i = 0; i < Y_WIDTH; i = i + 1) begin: slice @@ -121,10 +121,10 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); // LUT4 configured for passing its CI input to output. This should // get pruned if the actual CO port is not connected anywhere. adder_lut4 #( - .LUT(16'b0000_1111_0000_1111), + .LUT(16'b1111_0000_1111_0000), .IN2_IS_CIN(1'b1) ) lut_co ( - .in({1'b1, co, 1'b1, 1'b1}), + .in({1'b1, 1'b1, 1'b1, 1'b1}), .cin(co), .lut4_out(C[i]), .cout() diff --git a/ql-qlf-plugin/qlf_k6n10/arith_map.v b/ql-qlf-plugin/qlf_k6n10/arith_map.v index 6b275d305..668103530 100644 --- a/ql-qlf-plugin/qlf_k6n10/arith_map.v +++ b/ql-qlf-plugin/qlf_k6n10/arith_map.v @@ -21,24 +21,25 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); input [A_WIDTH-1:0] A; input [B_WIDTH-1:0] B; - output [Y_WIDTH:0] X, Y; + output [Y_WIDTH-1:0] X, Y; input CI, BI; - output [Y_WIDTH:0] CO; + output [Y_WIDTH-1:0] CO; - wire [Y_WIDTH-1:0] AA, BB; wire [1024:0] _TECHMAP_DO_ = "splitnets CARRY; clean"; - generate - if (A_SIGNED && B_SIGNED) begin:BLOCK1 - assign AA = $signed(A), BB = BI ? ~$signed(B) : $signed(B); - end else begin:BLOCK2 - assign AA = $unsigned(A), BB = BI ? ~$unsigned(B) : $unsigned(B); - end - endgenerate + (* force_downto *) + wire [Y_WIDTH-1:0] A_buf, B_buf; + \$pos #(.A_SIGNED(A_SIGNED), .A_WIDTH(A_WIDTH), .Y_WIDTH(Y_WIDTH)) A_conv (.A(A), .Y(A_buf)); + \$pos #(.A_SIGNED(B_SIGNED), .A_WIDTH(B_WIDTH), .Y_WIDTH(Y_WIDTH)) B_conv (.A(B), .Y(B_buf)); + (* force_downto *) + wire [Y_WIDTH-1:0] AA = A_buf; + (* force_downto *) + wire [Y_WIDTH-1:0] BB = BI ? ~B_buf : B_buf; wire [Y_WIDTH: 0 ] CARRY; + assign CO[Y_WIDTH-1:0] = CARRY[Y_WIDTH:1]; // Due to VPR limitations regarding IO connexion to carry chain, // we generate the carry chain input signal using an intermediate adder // since we can connect a & b from io pads, but not cin & cout @@ -61,7 +62,7 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); endgenerate genvar i; - generate for (i = 1; i < Y_WIDTH - 1; i = i+1) begin:gen3 + generate for (i = 1; i < Y_WIDTH ; i = i+1) begin:gen3 adder my_adder ( .cin (CARRY[i] ), .cout (CARRY[i+1]), diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index 9fe651fb3..3f20d4314 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -15,17 +15,24 @@ read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top subtractor yosys proc equiv_opt -assert -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 +design -reset +# Equivalence check for comparator synthesis +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top comparator +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k4n8/cells_sim.v synth_quicklogic -family qlf_k4n8 design -reset # Equivalence check for adder synthesis for qlf-k6n10 read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top full_adder yosys proc -synth_quicklogic -family qlf_k6n10 +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 +design -load postopt yosys cd full_adder stat -select -assert-count 5 t:adder +select -assert-count 6 t:adder design -reset @@ -33,9 +40,22 @@ design -reset read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top subtractor yosys proc -synth_quicklogic -family qlf_k6n10 +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 +design -load postopt yosys cd subtractor stat +select -assert-count 6 t:adder + +design -reset + +# Equivalence check for comparator synthesis for qlf-k6n10 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top comparator +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k6n10/cells_sim.v synth_quicklogic -family qlf_k6n10 +design -load postopt +yosys cd comparator +stat select -assert-count 5 t:adder design -reset @@ -75,3 +95,21 @@ select -assert-count 5 t:outpad select -assert-none t:LUT2 t:LUT3 t:inpad t:outpad %% t:* %D +design -reset + +# Equivalence check for comparator synthesis for pp3 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top comparator +yosys proc +equiv_opt -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 +design -load postopt +yosys cd comparator + +stat +select -assert-count 2 t:LUT3 +select -assert-count 3 t:LUT4 +select -assert-count 8 t:inpad +select -assert-count 1 t:outpad + +select -assert-none t:LUT3 t:LUT4 t:inpad t:outpad %% t:* %D + diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.v b/ql-qlf-plugin/tests/full_adder/full_adder.v index 0af21c459..b190cbe2b 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.v +++ b/ql-qlf-plugin/tests/full_adder/full_adder.v @@ -27,3 +27,12 @@ module subtractor ( assign S = A - B; endmodule + +module comparator ( + input wire [`WIDTH-1:0] A, + input wire [`WIDTH-1:0] B, + output wire CO, +); + assign CO = (A <= B) ? 1'b1 : 1'b0; + +endmodule From 13b347dbd4709ff2e8c84c754489c48cb2cb49cb Mon Sep 17 00:00:00 2001 From: coolbreeze413 Date: Wed, 13 Oct 2021 04:31:37 +0530 Subject: [PATCH 388/845] add ability to pass YOSYS_CONFIG while build Signed-off-by: coolbreeze413 --- Makefile_plugin.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index ac9ae9bf3..d96d186bf 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -42,7 +42,7 @@ YOSYS_PATH ?= $(realpath $(dir $(shell which yosys))/..) # Find yosys-config, throw an error if not found -YOSYS_CONFIG = $(YOSYS_PATH)/bin/yosys-config +YOSYS_CONFIG ?= $(YOSYS_PATH)/bin/yosys-config ifeq (,$(wildcard $(YOSYS_CONFIG))) $(error "Didn't find 'yosys-config' under '$(YOSYS_PATH)'") endif From bca338e81ee82bb5eff52da844eca2cc9c5c1f97 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Mon, 15 Mar 2021 20:54:26 +0100 Subject: [PATCH 389/845] Add UHDM plugin Signed-off-by: Karol Gugala --- Makefile | 2 +- uhdm-plugin/Makefile | 15 + uhdm-plugin/UhdmAst.cc | 1945 ++++++ uhdm-plugin/UhdmAst.h | 137 + uhdm-plugin/uhdmastfrontend.cc | 159 + uhdm-plugin/uhdmastreport.cc | 83 + uhdm-plugin/uhdmastreport.h | 34 + uhdm-plugin/uhdmastshared.h | 63 + uhdm-plugin/vpivisitor.cc | 10717 +++++++++++++++++++++++++++++++ 9 files changed, 13154 insertions(+), 1 deletion(-) create mode 100644 uhdm-plugin/Makefile create mode 100644 uhdm-plugin/UhdmAst.cc create mode 100644 uhdm-plugin/UhdmAst.h create mode 100644 uhdm-plugin/uhdmastfrontend.cc create mode 100644 uhdm-plugin/uhdmastreport.cc create mode 100644 uhdm-plugin/uhdmastreport.h create mode 100644 uhdm-plugin/uhdmastshared.h create mode 100644 uhdm-plugin/vpivisitor.cc diff --git a/Makefile b/Makefile index 414e27be1..801c6a265 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # # SPDX-License-Identifier:ISC -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf uhdm PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile new file mode 100644 index 000000000..ef53dac99 --- /dev/null +++ b/uhdm-plugin/Makefile @@ -0,0 +1,15 @@ +NAME = uhdm +SOURCES = UhdmAst.cc \ + uhdmastfrontend.cc \ + uhdmastreport.cc \ + vpivisitor.cc + +include ../Makefile_plugin.common + +CPPFLAGS += -std=c++14 -I${UHDM_INSTALL_DIR}/include/uhdm \ + -I${UHDM_INSTALL_DIR}/include/uhdm/include \ + -I${UHDM_INSTALL_DIR}/include/uhdm/headers + +CXXFLAGS += -Wno-inconsistent-missing-override +LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib +LDLIBS += -luhdm -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc new file mode 100644 index 000000000..5d4b54177 --- /dev/null +++ b/uhdm-plugin/UhdmAst.cc @@ -0,0 +1,1945 @@ +#include +#include +#include +#include + +#include "headers/uhdm.h" +#include "frontends/ast/ast.h" +#include "frontends/verilog/verilog_frontend.h" +#include "UhdmAst.h" +#include "vpi_user.h" +#include "libs/sha1/sha1.h" + +YOSYS_NAMESPACE_BEGIN + +static void sanitize_symbol_name(std::string &name) { + if (!name.empty()) { + auto pos = name.find_last_of("@"); + name = name.substr(pos+1); + // symbol names must begin with '\' + name.insert(0, "\\"); + } +} + +static std::string strip_package_name(std::string name) { + auto sep_index = name.find("::"); + if (sep_index != string::npos) { + name = name.substr(sep_index + 1); + name[0] = '\\'; + } + return name; +} + +void UhdmAst::visit_one_to_many(const std::vector child_node_types, + vpiHandle parent_handle, + const std::function& f) { + for (auto child : child_node_types) { + vpiHandle itr = vpi_iterate(child, parent_handle); + while (vpiHandle vpi_child_obj = vpi_scan(itr) ) { + UhdmAst uhdm_ast(this, shared, indent + " "); + auto *child_node = uhdm_ast.process_object(vpi_child_obj); + f(child_node); + vpi_free_object(vpi_child_obj); + } + vpi_free_object(itr); + } +} + +void UhdmAst::visit_one_to_one(const std::vector child_node_types, + vpiHandle parent_handle, + const std::function& f) { + for (auto child : child_node_types) { + vpiHandle itr = vpi_handle(child, parent_handle); + if (itr) { + UhdmAst uhdm_ast(this, shared, indent + " "); + auto *child_node = uhdm_ast.process_object(itr); + f(child_node); + } + vpi_free_object(itr); + } +} + +void UhdmAst::visit_range(vpiHandle obj_h, + const std::function& f) { + std::vector range_nodes; + visit_one_to_many({vpiRange}, + obj_h, + [&](AST::AstNode* node) { + range_nodes.push_back(node); + }); + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = range_nodes; + f(multirange_node); + } else if (!range_nodes.empty()) { + f(range_nodes[0]); + } +} + +void UhdmAst::visit_default_expr(vpiHandle obj_h) { + if (vpi_handle(vpiExpr, obj_h)) { + auto mod = find_ancestor({AST::AST_MODULE}); + auto initial_node = new AST::AstNode(AST::AST_INITIAL); + auto block_node = new AST::AstNode(AST::AST_BLOCK); + auto assign_node = new AST::AstNode(AST::AST_ASSIGN_EQ); + auto id_node = new AST::AstNode(AST::AST_IDENTIFIER); + id_node->str = parent->current_node->str; + initial_node->children.push_back(block_node); + block_node->children.push_back(assign_node); + assign_node->children.push_back(id_node); + mod->children.push_back(initial_node); + UhdmAst initial_ast(parent, shared, indent); + initial_ast.current_node = initial_node; + UhdmAst block_ast(&initial_ast, shared, indent); + block_ast.current_node = block_node; + block_ast.visit_one_to_one({vpiExpr}, + obj_h, + [&](AST::AstNode* expr_node) { + assign_node->children.push_back(expr_node); + }); + } +} + +AST::AstNode* UhdmAst::process_value(vpiHandle obj_h) { + s_vpi_value val; + vpi_get_value(obj_h, &val); + std::string strValType; + if (val.format) { // Needed to handle parameter nodes without typespecs and constants + switch (val.format) { + case vpiScalarVal: return AST::AstNode::mkconst_int(val.value.scalar, false, 1); + case vpiBinStrVal: { + strValType = "'b"; + break; + } + case vpiDecStrVal: { + strValType = "'d"; + break; + } + case vpiHexStrVal: { + strValType = "'h"; + break; + } + // Surelog reports constant integers as a unsigned, but by default int is signed + // so we are treating here UInt in the same way as if they would be Int + case vpiUIntVal: + case vpiIntVal: { + auto size = vpi_get(vpiSize, obj_h); + if (size == 0) size = 64; + return AST::AstNode::mkconst_int(val.value.integer, true, size); + } + case vpiRealVal: return AST::AstNode::mkconst_real(val.value.real); + case vpiStringVal: return AST::AstNode::mkconst_str(val.value.str); + default: { + const uhdm_handle* const handle = (const uhdm_handle*) obj_h; + const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; + report_error("Encountered unhandled constant format %d at %s:%d\n", val.format, + object->VpiFile().c_str(), object->VpiLineNo()); + } + } + // handle vpiBinStrVal, vpiDecStrVal and vpiHexStrVal + if (std::strchr(val.value.str, '\'')) { + return VERILOG_FRONTEND::const2ast(val.value.str, 0, false); + } else { + auto size = vpi_get(vpiSize, obj_h); + if(size == 0 && strlen(val.value.str) == 1) { + return AST::AstNode::mkconst_int(atoi(val.value.str), true, 1); + } + std::string size_str = ""; + if (size != 0) { + size_str = std::to_string(size); + } + auto str = size_str + strValType + val.value.str; + return VERILOG_FRONTEND::const2ast(str, 0, false); + } + } + return nullptr; +} + +AST::AstNode* UhdmAst::make_ast_node(AST::AstNodeType type, std::vector children) { + auto node = new AST::AstNode(type); + if (auto name = vpi_get_str(vpiName, obj_h)) { + node->str = name; + } else if (auto name = vpi_get_str(vpiDefName, obj_h)) { + node->str = name; + } else if (auto name = vpi_get_str(vpiFullName, obj_h)) { + node->str = name; + } + sanitize_symbol_name(node->str); + if (auto filename = vpi_get_str(vpiFile, obj_h)) { + node->filename = filename; + } + if (unsigned int line = vpi_get(vpiLineNo, obj_h)) { + node->location.first_line = node->location.last_line = line; + } + const uhdm_handle* const handle = (const uhdm_handle*) obj_h; + const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; + shared.visited[object] = node; + node->children = children; + return node; +} + +static void add_or_replace_child(AST::AstNode* parent, AST::AstNode* child) { + if (!child->str.empty()) { + auto it = std::find_if(parent->children.begin(), + parent->children.end(), + [child](AST::AstNode* existing_child) { + return existing_child->str == child->str; + }); + if (it != parent->children.end()) { + // If port direction is already set, copy it to replaced child node + if((*it)->is_input || (*it)->is_output) { + child->is_input = (*it)->is_input; + child->is_output = (*it)->is_output; + child->port_id = (*it)->port_id; + child->type = AST::AST_WIRE; + } + if (!(*it)->children.empty() && child->children.empty()) { + // This is a bit ugly, but if the child we're replacing has children and + // our node doesn't, we copy its children to not lose any information + for (auto grandchild : (*it)->children) { + child->children.push_back(grandchild->clone()); + if (child->type == AST::AST_WIRE && grandchild->type == AST::AST_WIRETYPE) + child->is_custom_type = true; + } + } + // Special case for a wire with multirange + if (child->children.size() > 1 && child->type == AST::AST_WIRE && + child->children[0]->type == AST::AST_RANGE && child->children[1]->type == AST::AST_RANGE) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + for (auto *c : child->children) { + multirange_node->children.push_back(c->clone()); + } + child->children.clear(); + child->children.push_back(multirange_node); + } + *it = child; + return; + } + } + parent->children.push_back(child); +} + +void UhdmAst::make_cell(vpiHandle obj_h, AST::AstNode* cell_node, AST::AstNode* type_node) { + auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); + typeNode->str = strip_package_name(type_node->str); + cell_node->children.insert(cell_node->children.begin(), typeNode); + // Add port connections as arguments + vpiHandle port_itr = vpi_iterate(vpiPort, obj_h); + while (vpiHandle port_h = vpi_scan(port_itr) ) { + std::string arg_name; + if (auto s = vpi_get_str(vpiName, port_h)) { + arg_name = s; + sanitize_symbol_name(arg_name); + } + auto arg_node = new AST::AstNode(AST::AST_ARGUMENT); + arg_node->str = arg_name; + arg_node->filename = cell_node->filename; + arg_node->location = cell_node->location; + visit_one_to_one({vpiHighConn}, + port_h, + [&](AST::AstNode* node) { + if (node) { + arg_node->children.push_back(node); + } + }); + cell_node->children.push_back(arg_node); + shared.report.mark_handled(port_h); + vpi_free_object(port_h); + } + vpi_free_object(port_itr); +} + +void UhdmAst::add_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { + auto typedef_node = new AST::AstNode(AST::AST_TYPEDEF); + typedef_node->location = type_node->location; + typedef_node->filename = type_node->filename; + typedef_node->str = type_node->str; + if (current_node->type == AST::AST_PACKAGE) { + shared.type_names[type_node] = current_node->str + "::" + type_node->str.substr(1); + } else { + shared.type_names[type_node] = type_node->str; + } + type_node = type_node->clone(); + if (type_node->type == AST::AST_STRUCT) { + type_node->str.clear(); + typedef_node->children.push_back(type_node); + current_node->children.push_back(typedef_node); + } else if (type_node->type == AST::AST_ENUM) { + type_node->str = "$enum" + std::to_string(shared.next_enum_id()); + for (auto* enum_item : type_node->children) { + enum_item->attributes["\\enum_base_type"] = AST::AstNode::mkconst_str(type_node->str); + } + auto wire_node = new AST::AstNode(AST::AST_WIRE); + wire_node->attributes["\\enum_type"] = AST::AstNode::mkconst_str(type_node->str); + if (!type_node->children.empty() && type_node->children[0]->children.size() > 1) { + wire_node->children.push_back(type_node->children[0]->children[1]->clone()); + } + typedef_node->children.push_back(wire_node); + current_node->children.push_back(type_node); + current_node->children.push_back(typedef_node); + } +} + +AST::AstNode* UhdmAst::find_ancestor(const std::unordered_set& types) { + auto searched_node = this; + while (searched_node) { + if (searched_node->current_node) { + if (types.find(searched_node->current_node->type) != types.end()) { + return searched_node->current_node; + } + } + searched_node = searched_node->parent; + } + return nullptr; +} + +void UhdmAst::process_design() { + current_node = make_ast_node(AST::AST_DESIGN); + visit_one_to_many({UHDM::uhdmallInterfaces, + UHDM::uhdmallModules, + UHDM::uhdmallPackages, + UHDM::uhdmtopModules}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + shared.top_nodes[node->str] = node; + } + }); + // Once we walked everything, unroll that as children of this node + for (auto pair : shared.top_nodes) { + if (!pair.second) continue; + if (!pair.second->get_bool_attribute(ID::partial)) { + if (pair.second->type == AST::AST_PACKAGE) + current_node->children.insert(current_node->children.begin(), pair.second); + else + current_node->children.push_back(pair.second); + } else { + log_warning("Removing module: %s from the design.\n", pair.second->str.c_str()); + } + } +} + +void UhdmAst::process_parameter() { + auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; + current_node = make_ast_node(type); + //if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused + vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); + if (typespec_h) { + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiBitTypespec: + case vpiLogicTypespec: { + current_node->is_logic = true; + visit_range(typespec_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + shared.report.mark_handled(typespec_h); + break; + } + case vpiEnumTypespec: + case vpiRealTypespec: + case vpiIntTypespec: { + shared.report.mark_handled(typespec_h); + break; + } + case vpiStructTypespec: { + visit_one_to_one({vpiTypespec}, + obj_h, + [&](AST::AstNode* node) { + shared.param_types[current_node] = node; + }); + break; + } + default: { + const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; + const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; + report_error("Encountered unhandled typespec in process_parameter: '%s' of type '%s' at %s:%d\n", + object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str(), object->VpiFile().c_str(), + object->VpiLineNo()); + break; + } + } + } else { + AST::AstNode* constant_node = process_value(obj_h); + if (constant_node) { + constant_node->filename = current_node->filename; + constant_node->location = current_node->location; + current_node->children.push_back(constant_node); + } + } +} + +void UhdmAst::process_port() { + current_node = make_ast_node(AST::AST_WIRE); + current_node->port_id = shared.next_port_id(); + vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); + if (lowConn_h) { + vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); + auto actual_type = vpi_get(vpiType, actual_h); + switch (actual_type) { + case vpiModport: { + vpiHandle iface_h = vpi_handle(vpiInterface, actual_h); + if (iface_h) { + std::string cellName, ifaceName; + if (auto s = vpi_get_str(vpiName, actual_h)) { + cellName = s; + sanitize_symbol_name(cellName); + } + if (auto s = vpi_get_str(vpiDefName, iface_h)) { + ifaceName = s; + sanitize_symbol_name(ifaceName); + } + current_node->type = AST::AST_INTERFACEPORT; + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + // Skip '\' in cellName + typeNode->str = ifaceName + '.' + cellName.substr(1, cellName.length()); + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + shared.report.mark_handled(iface_h); + } + break; + } + case vpiInterface: { + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + if (auto s = vpi_get_str(vpiDefName, actual_h)) { + typeNode->str = s; + sanitize_symbol_name(typeNode->str); + } + current_node->type = AST::AST_INTERFACEPORT; + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + break; + } + case vpiLogicNet: { + current_node->is_logic = true; + current_node->is_signed = vpi_get(vpiSigned, actual_h); + visit_range(actual_h, + [&](AST::AstNode* node) { + if (node->type == AST::AST_MULTIRANGE) node->is_packed = true; + current_node->children.push_back(node); + }); + shared.report.mark_handled(actual_h); + break; + } + case vpiEnumNet: + case vpiStructNet: + case vpiArrayNet: + case vpiStructVar: + case vpiEnumVar: + break; + default: { + const uhdm_handle* const handle = (const uhdm_handle*) actual_h; + const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; + report_error("Encountered unhandled type in process_port: %s at %s:%d\n", UHDM::VpiTypeName(actual_h).c_str(), + object->VpiFile().c_str(), object->VpiLineNo()); + break; + } + } + shared.report.mark_handled(lowConn_h); + } + visit_one_to_one({vpiTypedef}, + obj_h, + [&](AST::AstNode* node) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = shared.type_names[node]; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type=true; + }); + if (const int n = vpi_get(vpiDirection, obj_h)) { + if (n == vpiInput) { + current_node->is_input = true; + } else if (n == vpiOutput) { + current_node->is_output = true; + } else if (n == vpiInout) { + current_node->is_input = true; + current_node->is_output = true; + } + } +} + +void UhdmAst::process_module() { + std::string type = vpi_get_str(vpiDefName, obj_h); + std::string name = vpi_get_str(vpiName, obj_h) ? vpi_get_str(vpiName, obj_h) : type; + sanitize_symbol_name(type); + sanitize_symbol_name(name); + type = strip_package_name(type); + name = strip_package_name(name); + if (name == type) { + if (shared.top_nodes.find(type) != shared.top_nodes.end()) { + current_node = shared.top_nodes[type]; + visit_one_to_many({vpiModule, + vpiInterface, + vpiParameter, + vpiParamAssign, + vpiNet, + vpiArrayNet, + vpiPort, + vpiGenScopeArray, + vpiContAssign, + vpiVariables}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + add_or_replace_child(current_node, node); + } + }); + current_node->attributes.erase(ID::partial); + } else { + current_node = make_ast_node(AST::AST_MODULE); + current_node->str = type; + current_node->attributes[ID::hdlname] = AST::AstNode::mkconst_str(current_node->str); + shared.top_nodes[current_node->str] = current_node; + current_node->attributes[ID::partial] = AST::AstNode::mkconst_int(1, false, 1); + visit_one_to_many({vpiTypedef}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + add_typedef(current_node, node); + } + }); + visit_one_to_many({vpiModule, + vpiInterface, + vpiParameter, + vpiParamAssign, + vpiNet, + vpiArrayNet, + vpiPort, + vpiGenScopeArray, + vpiContAssign, + vpiProcess, + vpiTaskFunc}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + if (node->type == AST::AST_ASSIGN && node->children.size() < 2) return; + add_or_replace_child(current_node, node); + } + }); + } + } else { + // Not a top module, create instance + current_node = make_ast_node(AST::AST_CELL); + auto module_node = shared.top_nodes[type]; + if (!module_node) { + module_node = shared.top_node_templates[type]; + if (!module_node) { + module_node = new AST::AstNode(AST::AST_MODULE); + module_node->str = type; + module_node->attributes[ID::partial] = AST::AstNode::mkconst_int(2, false, 1); + } + shared.top_nodes[module_node->str] = module_node; + } + module_node = module_node->clone(); + auto cell_instance = vpi_get(vpiCellInstance, obj_h); + if (cell_instance) { + module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); + } + //TODO: setting keep attribute probably shouldn't be needed, + // but without this, modules that are generated in genscope are removed + // for now lets just add this attribute + module_node->attributes[ID::keep] = AST::AstNode::mkconst_int(1, false, 1); + if (module_node->attributes.count(ID::partial)) { + AST::AstNode *attr = module_node->attributes.at(ID::partial); + if (attr->type == AST::AST_CONSTANT) + if (attr->integer == 1) + module_node->attributes.erase(ID::partial); + } + visit_one_to_many({vpiVariables, + vpiNet, + vpiArrayNet}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + add_or_replace_child(module_node, node); + } + }); + visit_one_to_many({vpiInterface, + vpiModule, + vpiPort, + vpiGenScopeArray}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + auto it = std::find_if(module_node->children.begin(), + module_node->children.end(), + [node](AST::AstNode* existing_child) { + return existing_child->str == node->str; + }); + if (it != module_node->children.end() && node->children.size() > 0 && node->children[0]->type == AST::AST_WIRETYPE) { + for (auto *c : node->children) { + if (c->type != AST::AST_WIRETYPE) { //do not override wiretype + (*it)->children.push_back(c); + } + } + } else { + add_or_replace_child(module_node, node); + } + } + }); + std::string module_parameters; + visit_one_to_many({vpiParamAssign}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + if (std::find_if(module_node->children.begin(), module_node->children.end(), + [&](AST::AstNode *child)->bool { return child->type == AST::AST_PARAMETER && + child->str == node->str && + //skip real parameters as they are currently not working: https://github.com/alainmarcel/Surelog/issues/1035 + child->children[0]->type != AST::AST_REALVALUE; }) + != module_node->children.end()) { + if (cell_instance || (node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT)) { //if cell is a blackbox or we need to siplify parameter first, left setting parameters to yosys + auto clone = node->clone(); + clone->type = AST::AST_PARASET; + current_node->children.push_back(clone); + } else { + if (node->children[0]->str != "") + module_parameters += node->str + "=" + node->children[0]->str; + else + module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); + //replace + add_or_replace_child(module_node, node); + } + } + } + }); + //rename module in same way yosys do + if (module_parameters.size() > 60) + module_node->str = "$paramod$" + sha1(module_parameters) + type; + else if(module_parameters != "") + module_node->str = "$paramod" + type + module_parameters; + //add new module to templates and top nodes + shared.top_node_templates[module_node->str] = module_node; + shared.top_nodes[module_node->str] = module_node; + make_cell(obj_h, current_node, module_node); + } +} + +void UhdmAst::process_struct_typespec() { + current_node = make_ast_node(AST::AST_STRUCT); + visit_one_to_many({vpiTypespecMember}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); +} + +void UhdmAst::process_typespec_member() { + current_node = make_ast_node(AST::AST_STRUCT_ITEM); + current_node->str = current_node->str.substr(1); + vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiBitTypespec: + case vpiLogicTypespec: { + current_node->is_logic = true; + visit_range(typespec_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + shared.report.mark_handled(typespec_h); + break; + } + case vpiIntTypespec: { + current_node->is_signed = true; + shared.report.mark_handled(typespec_h); + break; + } + case vpiStructTypespec: + case vpiEnumTypespec: { + visit_one_to_one({vpiTypespec}, + obj_h, + [&](AST::AstNode* node) { + if (typespec_type == vpiStructTypespec) { + auto str = current_node->str; + node->cloneInto(current_node); + current_node->str = str; + } else if (typespec_type == vpiEnumTypespec) { + current_node->children.push_back(node); + } + }); + break; + } + default: { + const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; + const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; + report_error("Encountered unhandled typespec in process_typespec_member: '%s' of type '%s' at %s:%d\n", + object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str(), object->VpiFile().c_str(), + object->VpiLineNo()); + break; + } + } +} + +void UhdmAst::process_enum_typespec() { + current_node = make_ast_node(AST::AST_ENUM); + visit_one_to_many({vpiEnumConst}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + vpiHandle typespec_h = vpi_handle(vpiBaseTypespec, obj_h); + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiLogicTypespec: { + current_node->is_logic = true; + visit_range(typespec_h, + [&](AST::AstNode* node) { + for (auto child : current_node->children) { + child->children.push_back(node->clone()); + } + }); + shared.report.mark_handled(typespec_h); + break; + } + case vpiIntTypespec: { + current_node->is_signed = true; + shared.report.mark_handled(typespec_h); + break; + } + default: { + const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; + const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; + report_error("Encountered unhandled typespec in process_enum_typespec: '%s' of type '%s' at %s:%d\n", + object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str(), object->VpiFile().c_str(), + object->VpiLineNo()); + break; + } + } +} + +void UhdmAst::process_enum_const() { + current_node = make_ast_node(AST::AST_ENUM_ITEM); + AST::AstNode* constant_node = process_value(obj_h); + if (constant_node) { + constant_node->filename = current_node->filename; + constant_node->location = current_node->location; + current_node->children.push_back(constant_node); + } +} + +void UhdmAst::process_custom_var() { + current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_one({vpiTypespec}, + obj_h, + [&](AST::AstNode* node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + } else { + // custom var in gen scope have definition with declaration + if (shared.type_names.count(node) == 0 && node->children.size() > 0) { + add_typedef(find_ancestor({AST::AST_GENBLOCK, AST::AST_BLOCK}), node); + } + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = shared.type_names[node]; + current_node->children.push_back(wiretype_node); + } + }); + auto type = vpi_get(vpiType, obj_h); + if (type == vpiEnumVar || type == vpiStructVar) { + visit_default_expr(obj_h); + } + current_node->is_custom_type = true; +} + +void UhdmAst::process_int_var() { + current_node = make_ast_node(AST::AST_WIRE); + auto left_const = AST::AstNode::mkconst_int(31, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); + current_node->children.push_back(range); + current_node->is_signed = true; + visit_default_expr(obj_h); +} + +void UhdmAst::process_array_var() { + current_node = make_ast_node(AST::AST_WIRE); + vpiHandle itr = vpi_iterate(vpi_get(vpiType, obj_h) == vpiArrayVar ? + vpiReg : vpiElement, obj_h); + while (vpiHandle reg_h = vpi_scan(itr)) { + if (vpi_get(vpiType, reg_h) == vpiStructVar || vpi_get(vpiType, reg_h) == vpiEnumVar) { + vpiHandle typespec_h = vpi_handle(vpiTypespec, reg_h); + std::string name = vpi_get_str(vpiName, typespec_h); + sanitize_symbol_name(name); + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = name; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + shared.report.mark_handled(reg_h); + shared.report.mark_handled(typespec_h); + } + vpi_free_object(reg_h); + } + vpi_free_object(itr); + visit_one_to_many({vpiRange}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); +} + +void UhdmAst::process_param_assign() { + auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; + current_node = make_ast_node(type); + visit_one_to_one({vpiLhs}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->str = node->str; + shared.param_types[current_node] = shared.param_types[node]; + } + }); + visit_one_to_one({vpiRhs}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.insert(current_node->children.begin(), node); + } + }); +} + +void UhdmAst::process_cont_assign() { + current_node = make_ast_node(AST::AST_ASSIGN); + visit_one_to_one({vpiLhs, + vpiRhs}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + if (node->type == AST::AST_WIRE) { + current_node->children.push_back(new AST::AstNode(AST::AST_IDENTIFIER)); + current_node->children.back()->str = node->str; + } else { + current_node->children.push_back(node); + } + } + }); +} + +void UhdmAst::process_assignment() { + auto type = vpi_get(vpiBlocking, obj_h) == 1 ? AST::AST_ASSIGN_EQ : AST::AST_ASSIGN_LE; + current_node = make_ast_node(type); + visit_one_to_one({vpiLhs, + vpiRhs}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_net() { + current_node = make_ast_node(AST::AST_WIRE); + auto net_type = vpi_get(vpiNetType, obj_h); + current_node->is_reg = net_type == vpiReg; + current_node->is_output = net_type == vpiOutput; + current_node->is_logic = !current_node->is_reg; + current_node->is_signed = vpi_get(vpiSigned, obj_h); + visit_range(obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + if (node->type == AST::AST_MULTIRANGE) { + node->is_packed = true; + } + }); +} + +void UhdmAst::process_packed_array_net() { + current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_many({vpiElement}, + obj_h, + [&](AST::AstNode* node) { + if (node && GetSize(node->children) == 1) + current_node->children.push_back(node->children[0]); + }); + visit_one_to_many({vpiRange}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); +} +void UhdmAst::process_array_net() { + current_node = make_ast_node(AST::AST_WIRE); + vpiHandle itr = vpi_iterate(vpiNet, obj_h); + while (vpiHandle net_h = vpi_scan(itr)) { + if (vpi_get(vpiType, net_h) == vpiLogicNet) { + current_node->is_logic = true; + current_node->is_signed = vpi_get(vpiSigned, net_h); + visit_range(net_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + shared.report.mark_handled(net_h); + } + vpi_free_object(net_h); + } + vpi_free_object(itr); + visit_one_to_many({vpiRange}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + if (current_node->children.size() == 2) { // If there is 2 ranges, change type to AST_MEMORY + current_node->type = AST::AST_MEMORY; + } +} + +void UhdmAst::process_package() { + current_node = make_ast_node(AST::AST_PACKAGE); + visit_one_to_many({vpiParameter, + vpiParamAssign}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + add_or_replace_child(current_node, node); + } + }); + visit_one_to_many({vpiTypedef}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + add_typedef(current_node, node); + } + }); + visit_one_to_many({vpiTaskFunc}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_interface() { + std::string type = vpi_get_str(vpiDefName, obj_h); + std::string name = vpi_get_str(vpiName, obj_h) ? vpi_get_str(vpiName, obj_h) : type; + sanitize_symbol_name(type); + sanitize_symbol_name(name); + AST::AstNode* elaboratedInterface; + // Check if we have encountered this object before + if (shared.top_nodes.find(type) != shared.top_nodes.end()) { + // Was created before, fill missing + elaboratedInterface = shared.top_nodes[type]; + visit_one_to_many({vpiPort}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + add_or_replace_child(elaboratedInterface, node); + } + }); + } else { + // Encountered for the first time + elaboratedInterface = new AST::AstNode(AST::AST_INTERFACE); + elaboratedInterface->str = name; + visit_one_to_many({vpiNet, + vpiPort, + vpiModport}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + add_or_replace_child(elaboratedInterface, node); + } + }); + } + shared.top_nodes[elaboratedInterface->str] = elaboratedInterface; + if (name != type) { + // Not a top module, create instance + current_node = make_ast_node(AST::AST_CELL); + make_cell(obj_h, current_node, elaboratedInterface); + } else { + current_node = elaboratedInterface; + } +} + +void UhdmAst::process_modport() { + current_node = make_ast_node(AST::AST_MODPORT); + visit_one_to_many({vpiIODecl}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_io_decl() { + current_node = nullptr; + visit_one_to_one({vpiExpr}, + obj_h, + [&](AST::AstNode* node) { + current_node = node; + }); + if (current_node == nullptr) { + current_node = make_ast_node(AST::AST_MODPORTMEMBER); + visit_range(obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + } + if (const int n = vpi_get(vpiDirection, obj_h)) { + if (n == vpiInput) { + current_node->is_input = true; + } else if (n == vpiOutput) { + current_node->is_output = true; + } else if (n == vpiInout) { + current_node->is_input = true; + current_node->is_output = true; + } + } +} + +void UhdmAst::process_always() { + current_node = make_ast_node(AST::AST_ALWAYS); + visit_one_to_one({vpiStmt}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); + switch (vpi_get(vpiAlwaysType, obj_h)) { + case vpiAlwaysComb: + current_node->attributes[ID::always_comb] = AST::AstNode::mkconst_int(1, false); break; + case vpiAlwaysFF: + current_node->attributes[ID::always_ff] = AST::AstNode::mkconst_int(1, false); break; + case vpiAlwaysLatch: + current_node->attributes[ID::always_latch] = AST::AstNode::mkconst_int(1, false); break; + default: + break; + } +} + +void UhdmAst::process_event_control() { + current_node = make_ast_node(AST::AST_BLOCK); + visit_one_to_one({vpiCondition}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + auto process_node = find_ancestor({AST::AST_ALWAYS}); + process_node->children.push_back(node); + } + // is added inside vpiOperation + }); + visit_one_to_one({vpiStmt}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_initial() { + current_node = make_ast_node(AST::AST_INITIAL); + visit_one_to_one({vpiStmt}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + if (node->type != AST::AST_BLOCK) { + auto block_node = make_ast_node(AST::AST_BLOCK); + block_node->children.push_back(node); + node = block_node; + } + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_begin() { + current_node = make_ast_node(AST::AST_BLOCK); + visit_one_to_many({vpiStmt}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + if (node->type == AST::AST_ASSIGN_EQ && node->children.size() == 1) { + auto func_node = find_ancestor({AST::AST_FUNCTION, AST::AST_TASK}); + if (!func_node) return; + auto wire_node = new AST::AstNode(AST::AST_WIRE); + wire_node->type = AST::AST_WIRE; + wire_node->str = node->children[0]->str; + func_node->children.push_back(wire_node); + } else { + current_node->children.push_back(node); + } + } + }); +} + +void UhdmAst::process_operation() { + auto operation = vpi_get(vpiOpType, obj_h); + switch (operation) { + case vpiStreamRLOp: process_stream_op(); break; + case vpiEventOrOp: + case vpiListOp: process_list_op(); break; + case vpiCastOp: process_cast_op(); break; + case vpiInsideOp: process_inside_op(); break; + case vpiAssignmentPatternOp: process_assignment_pattern_op(); break; + default: { + current_node = make_ast_node(AST::AST_NONE); + visit_one_to_many({vpiOperand}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); + switch(operation) { + case vpiMinusOp: current_node->type = AST::AST_NEG; break; + case vpiPlusOp: current_node->type = AST::AST_POS; break; + case vpiPosedgeOp: current_node->type = AST::AST_POSEDGE; break; + case vpiNegedgeOp: current_node->type = AST::AST_NEGEDGE; break; + case vpiUnaryAndOp: current_node->type = AST::AST_REDUCE_AND; break; + case vpiUnaryOrOp: current_node->type = AST::AST_REDUCE_OR; break; + case vpiUnaryXorOp: current_node->type = AST::AST_REDUCE_XOR; break; + case vpiUnaryXNorOp: current_node->type = AST::AST_REDUCE_XNOR; break; + case vpiUnaryNandOp: { + current_node->type = AST::AST_REDUCE_AND; + auto not_node = new AST::AstNode(AST::AST_BIT_NOT, current_node); + current_node = not_node; + break; + } + case vpiUnaryNorOp: { + current_node->type = AST::AST_REDUCE_OR; + auto not_node = new AST::AstNode(AST::AST_BIT_NOT, current_node); + current_node = not_node; + break; + } + case vpiBitNegOp: current_node->type = AST::AST_BIT_NOT; break; + case vpiBitAndOp: current_node->type = AST::AST_BIT_AND; break; + case vpiBitOrOp: current_node->type = AST::AST_BIT_OR; break; + case vpiBitXorOp: current_node->type = AST::AST_BIT_XOR; break; + case vpiBitXnorOp: current_node->type = AST::AST_BIT_XNOR; break; + case vpiLShiftOp: current_node->type = AST::AST_SHIFT_LEFT; break; + case vpiRShiftOp: current_node->type = AST::AST_SHIFT_RIGHT; break; + case vpiNotOp: current_node->type = AST::AST_LOGIC_NOT; break; + case vpiLogAndOp: current_node->type = AST::AST_LOGIC_AND; break; + case vpiLogOrOp: current_node->type = AST::AST_LOGIC_OR; break; + case vpiEqOp: current_node->type = AST::AST_EQ; break; + case vpiNeqOp: current_node->type = AST::AST_NE; break; + case vpiGtOp: current_node->type = AST::AST_GT; break; + case vpiGeOp: current_node->type = AST::AST_GE; break; + case vpiLtOp: current_node->type = AST::AST_LT; break; + case vpiLeOp: current_node->type = AST::AST_LE; break; + case vpiSubOp: current_node->type = AST::AST_SUB; break; + case vpiAddOp: current_node->type = AST::AST_ADD; break; + case vpiMultOp: current_node->type = AST::AST_MUL; break; + case vpiDivOp: current_node->type = AST::AST_DIV; break; + case vpiModOp: current_node->type = AST::AST_MOD; break; + case vpiArithLShiftOp: current_node->type = AST::AST_SHIFT_SLEFT; break; + case vpiArithRShiftOp: current_node->type = AST::AST_SHIFT_SRIGHT; break; + case vpiPowerOp: current_node->type = AST::AST_POW; break; + case vpiPostIncOp: // TODO: Make this an actual post-increment op (currently it's a pre-increment) + case vpiPreIncOp: { + current_node->type = AST::AST_ASSIGN_EQ; + auto id = current_node->children[0]->clone(); + auto add_node = new AST::AstNode(AST::AST_ADD, id, AST::AstNode::mkconst_int(1, true)); + add_node->filename = current_node->filename; + add_node->location = current_node->location; + current_node->children.push_back(add_node); + break; + } + case vpiPostDecOp: // TODO: Make this an actual post-decrement op (currently it's a pre-decrement) + case vpiPreDecOp: { + current_node->type = AST::AST_ASSIGN_EQ; + auto id = current_node->children[0]->clone(); + auto add_node = new AST::AstNode(AST::AST_SUB, id, AST::AstNode::mkconst_int(1, true)); + add_node->filename = current_node->filename; + add_node->location = current_node->location; + current_node->children.push_back(add_node); + break; + } + case vpiConditionOp: current_node->type = AST::AST_TERNARY; break; + case vpiConcatOp: { + current_node->type = AST::AST_CONCAT; + std::reverse(current_node->children.begin(), current_node->children.end()); + break; + } + case vpiMultiConcatOp: current_node->type = AST::AST_REPLICATE; break; + case vpiAssignmentOp: current_node->type = AST::AST_ASSIGN_EQ; break; + case vpiStreamLROp: { + auto concat_node = current_node->children.back(); + current_node->children.pop_back(); + delete current_node; + current_node = concat_node; + break; + } + default: { + const uhdm_handle* const handle = (const uhdm_handle*) obj_h; + const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; + report_error("Encountered unhandled operation type %d at %s:%d\n", operation, + object->VpiFile().c_str(), object->VpiLineNo()); + } + } + } + } +} + +void UhdmAst::process_stream_op() { + // Create a for loop that does what a streaming operator would do + auto block_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL}); + auto process_node = find_ancestor({AST::AST_ALWAYS, AST::AST_INITIAL}); + auto module_node = find_ancestor({AST::AST_MODULE}); + if (!process_node) { + // Create a @* always block + process_node = make_ast_node(AST::AST_ALWAYS); + module_node->children.push_back(process_node); + block_node = make_ast_node(AST::AST_BLOCK); + process_node->children.push_back(block_node); + } + + auto loop_id = shared.next_loop_id(); + auto loop_counter = make_ast_node(AST::AST_WIRE, + {make_ast_node(AST::AST_RANGE, + {AST::AstNode::mkconst_int(31, false), + AST::AstNode::mkconst_int(0, false)})}); + loop_counter->is_reg = true; + loop_counter->is_signed = true; + loop_counter->str = "\\loop" + std::to_string(loop_id) + "::i"; + module_node->children.push_back(loop_counter); + auto loop_counter_ident = make_ast_node(AST::AST_IDENTIFIER); + loop_counter_ident->str = loop_counter->str; + + auto lhs_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ})->children[0]; + + // Width of LHS + auto bits_call = make_ast_node(AST::AST_FCALL, + {lhs_node->clone()}); + bits_call->str = "\\$bits"; + + // Temp var to allow concatenation + auto temp_var = make_ast_node(AST::AST_WIRE, + {make_ast_node(AST::AST_RANGE, + {make_ast_node(AST::AST_SUB, + {bits_call, + AST::AstNode::mkconst_int(1, false)}), + AST::AstNode::mkconst_int(0, false)})}); + temp_var->str = "\\loop" + std::to_string(loop_id) + "::temp"; + module_node->children.push_back(temp_var); + auto temp_var_ident = make_ast_node(AST::AST_IDENTIFIER); + temp_var_ident->str = temp_var->str; + auto temp_assign = make_ast_node(AST::AST_ASSIGN_EQ, {temp_var_ident}); + block_node->children.push_back(temp_assign); + + // Assignment in the loop's block + auto assign_node = make_ast_node(AST::AST_ASSIGN_EQ, {lhs_node->clone(), temp_var_ident->clone()}); + AST::AstNode* slice_size = nullptr; // First argument in streaming op + visit_one_to_many({vpiOperand}, + obj_h, + [&](AST::AstNode* node) { + if (!slice_size && node->type == AST::AST_CONSTANT) { + slice_size = node; + } else { + temp_assign->children.push_back(node); + } + }); + if (!slice_size) { + slice_size = AST::AstNode::mkconst_int(1, true); + } + + // Initialization of the loop counter to 0 + auto init_stmt = make_ast_node(AST::AST_ASSIGN_EQ, + {loop_counter_ident, AST::AstNode::mkconst_int(0, true)}); + + // Loop condition (loop counter < $bits(RHS)) + auto cond_stmt = make_ast_node(AST::AST_LE, + {loop_counter_ident->clone(), + make_ast_node(AST::AST_SUB, + {bits_call->clone(), slice_size->clone()})}); + + // Increment loop counter + auto inc_stmt = make_ast_node(AST::AST_ASSIGN_EQ, + {loop_counter_ident->clone(), + make_ast_node(AST::AST_ADD, + {loop_counter_ident->clone(), slice_size})}); + + // Range on the LHS of the assignment + auto lhs_range = make_ast_node(AST::AST_RANGE); + auto lhs_selfsz = make_ast_node(AST::AST_SELFSZ, + {make_ast_node(AST::AST_SUB, + {make_ast_node(AST::AST_SUB, + {bits_call->clone(), AST::AstNode::mkconst_int(1, true)}), + loop_counter_ident->clone()})}); + lhs_range->children.push_back(make_ast_node(AST::AST_ADD, + {lhs_selfsz, AST::AstNode::mkconst_int(0, true)})); + lhs_range->children.push_back(make_ast_node(AST::AST_SUB, + {make_ast_node(AST::AST_ADD, + {lhs_selfsz->clone(), AST::AstNode::mkconst_int(1, true)}), + slice_size->clone()})); + + // Range on the RHS of the assignment + auto rhs_range = make_ast_node(AST::AST_RANGE); + auto rhs_selfsz = make_ast_node(AST::AST_SELFSZ, + {loop_counter_ident->clone()}); + rhs_range->children.push_back(make_ast_node(AST::AST_SUB, + {make_ast_node(AST::AST_ADD, + {rhs_selfsz, slice_size->clone()}), + AST::AstNode::mkconst_int(1, true)})); + rhs_range->children.push_back(make_ast_node(AST::AST_ADD, + {rhs_selfsz->clone(), AST::AstNode::mkconst_int(0, true)})); + + // Put ranges on the sides of the assignment + assign_node->children[0]->children.push_back(lhs_range); + assign_node->children[1]->children.push_back(rhs_range); + + // Putting the loop together + auto loop_node = make_ast_node(AST::AST_FOR); + loop_node->str = "$loop" + std::to_string(loop_id); + loop_node->children.push_back(init_stmt); + loop_node->children.push_back(cond_stmt); + loop_node->children.push_back(inc_stmt); + loop_node->children.push_back(new AST::AstNode(AST::AST_BLOCK, assign_node)); + + block_node->children.push_back(new AST::AstNode(AST::AST_BLOCK, loop_node)); + // Do not create a node + shared.report.mark_handled(obj_h); +} + +void UhdmAst::process_list_op() { + // Add all operands as children of process node + if (auto parent_node = find_ancestor({AST::AST_ALWAYS, AST::AST_COND})) { + visit_one_to_many({vpiOperand}, + obj_h, + [&](AST::AstNode* node) { + // add directly to process/cond node + if (node) { + parent_node->children.push_back(node); + } + }); + } + // Do not create a node + shared.report.mark_handled(obj_h); +} + +void UhdmAst::process_cast_op() { + current_node = make_ast_node(AST::AST_NONE); + visit_one_to_many({vpiOperand}, + obj_h, + [&](AST::AstNode* node) { + node->cloneInto(current_node); + }); + vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); + shared.report.mark_handled(typespec_h); + vpi_free_object(typespec_h); +} + +void UhdmAst::process_inside_op() { + current_node = make_ast_node(AST::AST_EQ); + AST::AstNode* lhs = nullptr; + visit_one_to_many({vpiOperand}, + obj_h, + [&](AST::AstNode* node) { + if (!lhs) { + lhs = node; + } + if (current_node->children.size() < 2) { + current_node->children.push_back(node); + } else { + auto or_node = new AST::AstNode(AST::AST_LOGIC_OR); + or_node->filename = current_node->filename; + or_node->location = current_node->location; + auto eq_node = new AST::AstNode(AST::AST_EQ); + eq_node->filename = current_node->filename; + eq_node->location = current_node->location; + or_node->children.push_back(current_node); + or_node->children.push_back(eq_node); + eq_node->children.push_back(lhs->clone()); + eq_node->children.push_back(node); + current_node = or_node; + } + }); +} + +void UhdmAst::process_assignment_pattern_op() { + current_node = make_ast_node(AST::AST_CONCAT); + if (auto param_node = find_ancestor({AST::AST_PARAMETER, AST::AST_LOCALPARAM})) { + std::map ordered_children; + visit_one_to_many({vpiOperand}, + obj_h, + [&](AST::AstNode* node) { + if (node->type == AST::AST_ASSIGN || node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) { + // Find at what position in the concat should we place this node + auto key = node->children[0]->str; + key = key.substr(key.find('.') + 1); + auto param_type = shared.param_types[param_node]; + size_t pos = std::find_if(param_type->children.begin(), param_type->children.end(), + [key](AST::AstNode* child) { return child->str == key; }) + - param_type->children.begin(); + ordered_children.insert(std::make_pair(pos, node->children[1]->clone())); + } else { + current_node->children.push_back(node); + } + }); + for (auto p : ordered_children) { + current_node->children.push_back(p.second); + } + return; + } + auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); + auto proc_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL, AST::AST_MODULE, AST::AST_PACKAGE}); + std::vector assignments; + visit_one_to_many({vpiOperand}, + obj_h, + [&](AST::AstNode* node) { + if (node->type == AST::AST_ASSIGN || node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) { + assignments.push_back(node); + } else { + current_node->children.push_back(node); + } + }); + std::reverse(current_node->children.begin(), current_node->children.end()); + if (!assignments.empty()) { + if (current_node->children.empty()) { + assign_node->children[0] = assignments[0]->children[0]; + current_node = assignments[0]->children[1]; + assignments[0]->children.clear(); + delete assignments[0]; + proc_node->children.insert(proc_node->children.end(), assignments.begin() + 1, assignments.end()); + } else { + proc_node->children.insert(proc_node->children.end(), assignments.begin(), assignments.end()); + } + } +} + +void UhdmAst::process_tagged_pattern() { + auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); + auto assign_type = AST::AST_ASSIGN; + AST::AstNode* lhs_node = nullptr; + if (assign_node) { + assign_type = assign_node->type; + lhs_node = assign_node->children[0]; + } else { + lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); + lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; + } + current_node = new AST::AstNode(assign_type); + current_node->children.push_back(lhs_node->clone()); + auto typespec_h = vpi_handle(vpiTypespec, obj_h); + if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { + std::string field_name = vpi_get_str(vpiName, typespec_h); + if (field_name != "default") { // TODO: better support of the default keyword + current_node->children[0]->str += '.' + field_name; + } + } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { + s_vpi_value val; + vpi_get_value(typespec_h, &val); + auto range = new AST::AstNode(AST::AST_RANGE); + auto index = AST::AstNode::mkconst_int(val.value.integer, false); + range->children.push_back(index); + current_node->children[0]->children.push_back(range); + } + vpi_free_object(typespec_h); + visit_one_to_one({vpiPattern}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); +} + +void UhdmAst::process_bit_select() { + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_one_to_one({vpiIndex}, + obj_h, + [&](AST::AstNode* node) { + auto range_node = new AST::AstNode(AST::AST_RANGE, node); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + current_node->children.push_back(range_node); + }); +} + +void UhdmAst::process_part_select() { + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_one_to_one({vpiParent}, + obj_h, + [&](AST::AstNode* node) { + current_node->str = node->str; + }); + auto range_node = new AST::AstNode(AST::AST_RANGE); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + visit_one_to_one({vpiLeftRange, + vpiRightRange}, + obj_h, + [&](AST::AstNode* node) { + range_node->children.push_back(node); + }); + current_node->children.push_back(range_node); +} + +void UhdmAst::process_indexed_part_select() { + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_one_to_one({vpiParent}, + obj_h, + [&](AST::AstNode* node) { + current_node->str = node->str; + }); + auto range_node = new AST::AstNode(AST::AST_RANGE); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + visit_one_to_one({vpiBaseExpr}, + obj_h, + [&](AST::AstNode* node) { + range_node->children.push_back(node); + }); + visit_one_to_one({vpiWidthExpr}, + obj_h, + [&](AST::AstNode* node) { + auto right_range_node = new AST::AstNode(AST::AST_ADD); + right_range_node->children.push_back(range_node->children[0]->clone()); + right_range_node->children.push_back(node); + auto sub = new AST::AstNode(AST::AST_SUB); + sub->children.push_back(right_range_node); + sub->children.push_back(AST::AstNode::mkconst_int(1, false, 1)); + range_node->children.push_back(sub); + //range_node->children.push_back(right_range_node); + }); + std::reverse(range_node->children.begin(), range_node->children.end()); + current_node->children.push_back(range_node); +} + +void UhdmAst::process_var_select() { + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_one_to_many({vpiIndex}, + obj_h, + [&](AST::AstNode* node) { + if (node->str == current_node->str) { + for (auto child : node->children) { + current_node->children.push_back(child->clone()); + } + } else { + auto range_node = new AST::AstNode(AST::AST_RANGE); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + range_node->children.push_back(node); + current_node->children.push_back(range_node); + } + }); + if (current_node->children.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = current_node->children; + current_node->children.clear(); + current_node->children.push_back(multirange_node); + } +} + +void UhdmAst::process_if_else() { + current_node = make_ast_node(AST::AST_BLOCK); + auto case_node = new AST::AstNode(AST::AST_CASE); + visit_one_to_one({vpiCondition}, + obj_h, + [&](AST::AstNode* node) { + auto reduce_node = new AST::AstNode(AST::AST_REDUCE_BOOL, node); + case_node->children.push_back(reduce_node); + }); + // If true: + auto *condition = new AST::AstNode(AST::AST_COND); + auto *constant = AST::AstNode::mkconst_int(1, false, 1); + condition->children.push_back(constant); + visit_one_to_one({vpiStmt}, + obj_h, + [&](AST::AstNode* node) { + auto *statements = new AST::AstNode(AST::AST_BLOCK); + statements->children.push_back(node); + condition->children.push_back(statements); + }); + case_node->children.push_back(condition); + // Else: + if (vpi_get(vpiType, obj_h) == vpiIfElse) { + auto *condition = new AST::AstNode(AST::AST_COND); + auto *elseBlock = new AST::AstNode(AST::AST_DEFAULT); + condition->children.push_back(elseBlock); + visit_one_to_one({vpiElseStmt}, + obj_h, + [&](AST::AstNode* node) { + auto *statements = new AST::AstNode(AST::AST_BLOCK); + statements->children.push_back(node); + condition->children.push_back(statements); + }); + case_node->children.push_back(condition); + } + current_node->children.push_back(case_node); +} + +void UhdmAst::process_for() { + current_node = make_ast_node(AST::AST_FOR); + auto loop_id = shared.next_loop_id(); + current_node->str = "$loop" + std::to_string(loop_id); + auto loop_parent_node = make_ast_node(AST::AST_BLOCK); + loop_parent_node->str = current_node->str; + visit_one_to_many({vpiForInitStmt}, + obj_h, + [&](AST::AstNode* node) { + if (node->type == AST::AST_ASSIGN_LE) node->type = AST::AST_ASSIGN_EQ; + if (node->children[0]->type == AST::AST_WIRE) { + loop_parent_node->children.push_back(node->children[0]); + node->children[0] = node->children[0]->clone(); + node->children[0]->type = AST::AST_IDENTIFIER; + node->children[0]->children.clear(); + } + current_node->children.push_back(node); + }); + visit_one_to_one({vpiCondition}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + visit_one_to_many({vpiForIncStmt}, + obj_h, + [&](AST::AstNode* node) { + if (node->type == AST::AST_ASSIGN_LE) node->type = AST::AST_ASSIGN_EQ; + current_node->children.push_back(node); + }); + visit_one_to_one({vpiStmt}, + obj_h, + [&](AST::AstNode* node) { + auto *statements = new AST::AstNode(AST::AST_BLOCK); + statements->children.push_back(node); + current_node->children.push_back(statements); + }); + loop_parent_node->children.push_back(current_node); + current_node = loop_parent_node; +} + +void UhdmAst::process_gen_scope_array() { + current_node = make_ast_node(AST::AST_GENBLOCK); + visit_one_to_many({vpiGenScope}, + obj_h, + [&](AST::AstNode* genscope_node) { + for (auto* child : genscope_node->children) { + if (child->type == AST::AST_PARAMETER || + child->type == AST::AST_LOCALPARAM) { + auto prev_name = child->str; + child->str = current_node->str + "::" + child->str.substr(1); + genscope_node->visitEachDescendant([&](AST::AstNode* node) { + auto pos = node->str.find("[" + prev_name.substr(1) + "]"); + if (node->str == prev_name) { + node->str = child->str; + } else if (pos != std::string::npos) { + node->str.replace(pos + 1, prev_name.size() - 1, child->str.substr(1)); + } + }); + } else if (child->type == AST::AST_CELL) { + child->str = current_node->str + "." + child->str.substr(1); + } + } + current_node->children.insert(current_node->children.end(), + genscope_node->children.begin(), + genscope_node->children.end()); + }); + // clear AST_GENBLOCK str field, to make yosys do not rename variables again + current_node->str = ""; +} + +void UhdmAst::process_gen_scope() { + current_node = make_ast_node(AST::AST_GENBLOCK); + visit_one_to_many({ + vpiParamAssign, + vpiParameter, + vpiNet, + vpiArrayNet, + vpiVariables, + vpiProcess, + vpiContAssign, + vpiModule, + vpiGenScopeArray}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + if ((node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) && + node->children.size() == 0) { + + return; //skip parameters without any children + } + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_case() { + current_node = make_ast_node(AST::AST_CASE); + visit_one_to_one({vpiCondition}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + visit_one_to_many({vpiCaseItem}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); +} + +void UhdmAst::process_case_item() { + current_node = make_ast_node(AST::AST_COND); + visit_one_to_many({vpiExpr}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); + if (current_node->children.empty()) { + current_node->children.push_back(new AST::AstNode(AST::AST_DEFAULT)); + } + visit_one_to_one({vpiStmt}, + obj_h, + [&](AST::AstNode* node) { + if (node->type != AST::AST_BLOCK) { + auto block_node = new AST::AstNode(AST::AST_BLOCK); + block_node->children.push_back(node); + node = block_node; + } + current_node->children.push_back(node); + }); +} + +void UhdmAst::process_range() { + current_node = make_ast_node(AST::AST_RANGE); + visit_one_to_one({vpiLeftRange, + vpiRightRange}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); +} + +void UhdmAst::process_return() { + current_node = make_ast_node(AST::AST_ASSIGN_EQ); + auto func_node = find_ancestor({AST::AST_FUNCTION, AST::AST_TASK}); + if (!func_node->children.empty()) { + auto lhs = new AST::AstNode(AST::AST_IDENTIFIER); + lhs->str = func_node->children[0]->str; + current_node->children.push_back(lhs); + } + visit_one_to_one({vpiCondition}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); +} + +void UhdmAst::process_function() { + current_node = make_ast_node(vpi_get(vpiType, obj_h) == vpiFunction ? AST::AST_FUNCTION : AST::AST_TASK); + visit_one_to_one({vpiReturn}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + node->str = current_node->str; + } + }); + visit_one_to_many({vpiIODecl}, + obj_h, + [&](AST::AstNode* node) { + node->type = AST::AST_WIRE; + current_node->children.push_back(node); + }); + visit_one_to_many({vpiVariables}, + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + visit_one_to_one({vpiStmt}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_logic_var() { + current_node = make_ast_node(AST::AST_WIRE); + visit_range(obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); +} + +void UhdmAst::process_sys_func_call() { + current_node = make_ast_node(AST::AST_FCALL); + if (current_node->str == "\\$signed") { + current_node->type = AST::AST_TO_SIGNED; + } else if (current_node->str == "\\$unsigned") { + current_node->type = AST::AST_TO_UNSIGNED; + } else if (current_node->str == "\\$display" || current_node->str == "\\$time") { + current_node->type = AST::AST_TCALL; + current_node->str = current_node->str.substr(1); + } else if (current_node->str == "\\$readmemh") { + current_node->type = AST::AST_TCALL; + } + + visit_one_to_many({vpiArgument}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_func_call() { + current_node = make_ast_node(AST::AST_FCALL); + visit_one_to_many({vpiArgument}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_immediate_assert() { + current_node = make_ast_node(AST::AST_ASSERT); + visit_one_to_one({vpiExpr}, + obj_h, + [&](AST::AstNode* n) { + if (n) { + current_node->children.push_back(n); + } + }); +} + +void UhdmAst::process_hier_path() { + current_node = make_ast_node(AST::AST_IDENTIFIER); + current_node->str = "\\"; + visit_one_to_many({vpiActual}, + obj_h, + [&](AST::AstNode* node) { + if (current_node->str != "\\") { + current_node->str += "."; + } + current_node->str += node->str.substr(1); + if (node->children.size() > 0 && node->children[0]->type == AST::AST_RANGE) { + if (node->children[0]->children[0]->str != "") { + current_node->str += "[" + node->children[0]->children[0]->str.substr(1) + "]"; + } else { + current_node->str += "[" + std::to_string(node->children[0]->children[0]->integer) + "]"; + } + } + }); +} + +AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { + obj_h = obj_handle; + const unsigned object_type = vpi_get(vpiType, obj_h); + const uhdm_handle* const handle = (const uhdm_handle*) obj_h; + const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; + + if (shared.debug_flag) { + std::cout << indent << "Object '" << object->VpiName() << "' of type '" << UHDM::VpiTypeName(obj_h) << '\'' << std::endl; + } + + if (shared.visited.find(object) != shared.visited.end()) { + return shared.visited[object]; + } + switch(object_type) { + case vpiDesign: process_design(); break; + case vpiParameter: process_parameter(); break; + case vpiPort: process_port(); break; + case vpiModule: process_module(); break; + case vpiStructTypespec: process_struct_typespec(); break; + case vpiTypespecMember: process_typespec_member(); break; + case vpiEnumTypespec: process_enum_typespec(); break; + case vpiEnumConst: process_enum_const(); break; + case vpiEnumVar: + case vpiEnumNet: + case vpiStructVar: + case vpiStructNet: process_custom_var(); break; + case vpiIntVar: process_int_var(); break; + case vpiPackedArrayVar: + case vpiArrayVar: process_array_var(); break; + case vpiParamAssign: process_param_assign(); break; + case vpiContAssign: process_cont_assign(); break; + case vpiAssignStmt: + case vpiAssignment: process_assignment(); break; + case vpiRefObj: current_node = make_ast_node(AST::AST_IDENTIFIER); break; + case vpiNet: process_net(); break; + case vpiArrayNet: process_array_net(); break; + case vpiPackedArrayNet: process_packed_array_net(); break; + case vpiPackage: process_package(); break; + case vpiInterface: process_interface(); break; + case vpiModport: process_modport(); break; + case vpiIODecl: process_io_decl(); break; + case vpiAlways: process_always(); break; + case vpiEventControl: process_event_control(); break; + case vpiInitial: process_initial(); break; + case vpiNamedBegin: + case vpiBegin: process_begin(); break; + case vpiCondition: + case vpiOperation: process_operation(); break; + case vpiTaggedPattern: process_tagged_pattern(); break; + case vpiBitSelect: process_bit_select(); break; + case vpiPartSelect: process_part_select(); break; + case vpiIndexedPartSelect: process_indexed_part_select(); break; + case vpiVarSelect: process_var_select(); break; + case vpiIf: + case vpiIfElse: process_if_else(); break; + case vpiFor: process_for(); break; + case vpiGenScopeArray: process_gen_scope_array(); break; + case vpiGenScope: process_gen_scope(); break; + case vpiCase: process_case(); break; + case vpiCaseItem: process_case_item(); break; + case vpiConstant: current_node = process_value(obj_h); break; + case vpiRange: process_range(); break; + case vpiReturn: process_return(); break; + case vpiFunction: + case vpiTask: process_function(); break; + case vpiBitVar: + case vpiLogicVar: process_logic_var(); break; + case vpiSysFuncCall: process_sys_func_call(); break; + case vpiFuncCall: process_func_call(); break; + case vpiTaskCall: current_node = make_ast_node(AST::AST_TCALL); break; + case vpiImmediateAssert: + if (!shared.no_assert) + process_immediate_assert(); + break; + case vpiHierPath: process_hier_path(); break; + case UHDM::uhdmimport: break; + case vpiLogicTypespec: break; // Probably a typedef; ignore + case vpiProgram: + default: report_error("Encountered unhandled object '%s' of type '%s' at %s:%d\n", object->VpiName().c_str(), + UHDM::VpiTypeName(obj_h).c_str(), object->VpiFile().c_str(), object->VpiLineNo()); break; + } + + // Check if we initialized the node in switch-case + if (current_node) { + if (current_node->type != AST::AST_NONE) { + shared.report.mark_handled(object); + return current_node; + } + shared.visited.erase(object); + } + return nullptr; +} + +AST::AstNode* UhdmAst::visit_designs(const std::vector& designs) { + current_node = new AST::AstNode(AST::AST_DESIGN); + for (auto design : designs) { + UhdmAst ast(this, shared, indent); + auto *nodes = ast.process_object(design); + // Flatten multiple designs into one + for (auto child : nodes->children) { + current_node->children.push_back(child); + } + } + return current_node; +} + +void UhdmAst::report_error(const char *format, ...) const { + va_list args; + va_start(args, format); + if (shared.stop_on_error) { + logv_error(format, args); + } else { + logv_warning(format, args); + } +} + +YOSYS_NAMESPACE_END + diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h new file mode 100644 index 000000000..cb7fb7c26 --- /dev/null +++ b/uhdm-plugin/UhdmAst.h @@ -0,0 +1,137 @@ +#ifndef _UHDM_AST_H_ +#define _UHDM_AST_H_ 1 + +#include +#include "frontends/ast/ast.h" +#undef cover + +#include "uhdm.h" +#include "uhdmastshared.h" + +YOSYS_NAMESPACE_BEGIN + +class UhdmAst { + private: + // Walks through one-to-many relationships from given parent + // node through the VPI interface, visiting child nodes belonging to + // ChildrenNodeTypes that are present in the given object. + void visit_one_to_many(const std::vector child_node_types, + vpiHandle parent_handle, + const std::function& f); + + // Walks through one-to-one relationships from given parent + // node through the VPI interface, visiting child nodes belonging to + // ChildrenNodeTypes that are present in the given object. + void visit_one_to_one(const std::vector child_node_types, + vpiHandle parent_handle, + const std::function& f); + + // Visit children of type vpiRange that belong to the given parent node. + void visit_range(vpiHandle obj_h, const std::function &f); + + // Visit the default expression assigned to a variable. + void visit_default_expr(vpiHandle obj_h); + + // Create an AstNode of the specified type with metadata extracted from + // the given vpiHandle. + AST::AstNode* make_ast_node(AST::AstNodeType type, + std::vector children = {}); + + // Makes the passed node a cell node of the specified type + void make_cell(vpiHandle obj_h, AST::AstNode* node, AST::AstNode* type); + + // Adds a typedef node to the current node + void add_typedef(AST::AstNode* current_node, AST::AstNode* type_node); + + // Go up the UhdmAst to find a parent node of the specified type + AST::AstNode* find_ancestor(const std::unordered_set& types); + + // Reports that something went wrong with reading the UHDM file + void report_error(const char *format, ...) const; + + // Processes the value connected to the specified node + AST::AstNode* process_value(vpiHandle obj_h); + + // The parent UhdmAst + UhdmAst* parent; + + // Data shared between all UhdmAst objects + UhdmAstShared& shared; + + // The current VPI/UHDM handle + vpiHandle obj_h = 0; + + // The current Yosys AST node + AST::AstNode* current_node = nullptr; + + // Indentation used for debug printing + std::string indent; + + // Functions that process specific types of nodes + void process_design(); + void process_parameter(); + void process_port(); + void process_module(); + void process_struct_typespec(); + void process_typespec_member(); + void process_enum_typespec(); + void process_enum_const(); + void process_custom_var(); + void process_int_var(); + void process_array_var(); + void process_param_assign(); + void process_cont_assign(); + void process_assignment(); + void process_net(); + void process_packed_array_net(); + void process_array_net(); + void process_package(); + void process_interface(); + void process_modport(); + void process_io_decl(); + void process_always(); + void process_event_control(); + void process_initial(); + void process_begin(); + void process_operation(); + void process_stream_op(); + void process_list_op(); + void process_cast_op(); + void process_inside_op(); + void process_assignment_pattern_op(); + void process_tagged_pattern(); + void process_bit_select(); + void process_part_select(); + void process_indexed_part_select(); + void process_var_select(); + void process_if_else(); + void process_for(); + void process_gen_scope_array(); + void process_gen_scope(); + void process_case(); + void process_case_item(); + void process_range(); + void process_return(); + void process_function(); + void process_logic_var(); + void process_sys_func_call(); + void process_func_call(); + void process_immediate_assert(); + void process_hier_path(); + + UhdmAst(UhdmAst* p, UhdmAstShared& s, const std::string& i) : parent(p), shared(s), indent(i) {} + + public: + UhdmAst(UhdmAstShared& s, const std::string& i = "") : UhdmAst(nullptr, s, i) {} + + // Visits single VPI object and creates proper AST node + AST::AstNode* process_object(vpiHandle obj_h); + + // Visits all VPI design objects and returns created ASTs + AST::AstNode* visit_designs(const std::vector& designs); + +}; + +YOSYS_NAMESPACE_END + +#endif diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc new file mode 100644 index 000000000..c25dc465c --- /dev/null +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -0,0 +1,159 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 Antmicro + + * Based on frontends/json/jsonparse.cc + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "kernel/yosys.h" +#include "frontends/ast/ast.h" +#include "UhdmAst.h" + +namespace UHDM { + extern void visit_object (vpiHandle obj_h, int indent, const char *relation, std::set* visited, std::ostream& out, bool shallowVisit = false); +} + + +YOSYS_NAMESPACE_BEGIN + +/* Stub for AST::process */ +static void +set_line_num(int) +{ +} + +/* Stub for AST::process */ +static int +get_line_num(void) +{ + return 1; +} + +struct UhdmAstFrontend : public Frontend { + UhdmAstFrontend() : Frontend("uhdm", "read UHDM file") { } + void help() + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_uhdm [options] [filename]\n"); + log("\n"); + log("Load design from a UHDM file into the current design\n"); + log("\n"); + log(" -noassert\n"); + log(" ignore assert() statements"); + log("\n"); + log(" -debug\n"); + log(" print debug info to stdout"); + log("\n"); + log(" -report [directory]\n"); + log(" write a coverage report for the UHDM file\n"); + log("\n"); + log(" -defer\n"); + log(" only read the abstract syntax tree and defer actual compilation\n"); + log(" to a later 'hierarchy' command. Useful in cases where the default\n"); + log(" parameters of modules yield invalid or not synthesizable code.\n"); + log("\n"); + } + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) + { + log_header(design, "Executing UHDM frontend.\n"); + + UhdmAstShared shared; + UhdmAst uhdm_ast(shared); + bool defer = false; + + std::string report_directory; + for (size_t i = 1; i < args.size(); i++) { + if (args[i] == "-debug") { + shared.debug_flag = true; + } else if (args[i] == "-report" && ++i < args.size()) { + report_directory = args[i]; + shared.stop_on_error = false; + } else if (args[i] == "-noassert") { + shared.no_assert = true; + } else if (args[i] == "-defer") { + defer = true; + } + } + extra_args(f, filename, args, args.size() - 1); + + AST::current_filename = filename; + AST::set_line_num = &set_line_num; + AST::get_line_num = &get_line_num; + struct AST::AstNode *current_ast; + + UHDM::Serializer serializer; + + std::vector restoredDesigns = serializer.Restore(filename); + for (auto design : restoredDesigns) { + std::stringstream strstr; + UHDM::visit_object(design, 1, "", &shared.report.unhandled, shared.debug_flag ? std::cout : strstr); + } + current_ast = uhdm_ast.visit_designs(restoredDesigns); + if (report_directory != "") { + shared.report.write(report_directory); + } + cleanup(current_ast, shared); + bool dump_ast1 = shared.debug_flag; + bool dump_ast2 = shared.debug_flag; + bool dont_redefine = false; + bool default_nettype_wire = true; + AST::process(design, current_ast, + dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, + false, false, false, false, false, false, dont_redefine, false, defer, default_nettype_wire + ); + delete current_ast; + } + + void cleanup(AST::AstNode* ast, UhdmAstShared& shared) { + std::unordered_set nodes_to_delete, visited; + for (auto node : shared.visited) { + nodes_to_delete.insert(node.second); // Put all visited nodes in a set + } + ast->visitEachDescendant([&nodes_to_delete, &visited](AST::AstNode* node) { + nodes_to_delete.erase(node); // Prevent a node actually used in the AST from being deleted + visited.insert(node); // Store it as visited + }); + nodes_to_delete.erase(ast); // Prevent the root node from being deleted + for (auto node : std::unordered_set(nodes_to_delete)) { + node->visitEachDescendant([&nodes_to_delete](AST::AstNode* node) { + nodes_to_delete.erase(node); + }); + erase_repeating(node, visited); // Prevent deleting some nodes multiple times + } + for (auto node : nodes_to_delete) { + delete node; + } + shared.visited.clear(); + } + + // Erases nodes that are in the 'visited' set from the AST + void erase_repeating(AST::AstNode* node, std::unordered_set& visited) { + visited.insert(node); + node->children.erase(std::remove_if(node->children.begin(), node->children.end(), + [&](AST::AstNode* x) { + return visited.find(x) != visited.end(); + }), node->children.end()); + for (auto child : node->children) { + erase_repeating(child, visited); + } + } + +} UhdmAstFrontend; + +YOSYS_NAMESPACE_END + diff --git a/uhdm-plugin/uhdmastreport.cc b/uhdm-plugin/uhdmastreport.cc new file mode 100644 index 000000000..f38798890 --- /dev/null +++ b/uhdm-plugin/uhdmastreport.cc @@ -0,0 +1,83 @@ +#include +#include +#include +#include "BaseClass.h" +#include "frontends/ast/ast.h" +#include "uhdmastreport.h" + +YOSYS_NAMESPACE_BEGIN + +void UhdmAstReport::mark_handled(const UHDM::BaseClass* object) { + handled_count_per_file.insert(std::make_pair(object->VpiFile(), 0)); + auto it = unhandled.find(object); + if (it != unhandled.end()) { + unhandled.erase(it); + handled_count_per_file.at(object->VpiFile())++; + } +} + +void UhdmAstReport::mark_handled(const vpiHandle obj_h) { + auto handle = reinterpret_cast(obj_h); + mark_handled(reinterpret_cast(handle->object)); +} + +static std::string replace_in_string(std::string str, const std::string& to_find, const std::string& to_replace_with) { + size_t pos = str.find(to_find); + while (pos != std::string::npos) { + str.replace(pos, to_find.length(), to_replace_with); + pos += to_replace_with.length(); + pos = str.find(to_find, pos); + } + return str; +} + +void UhdmAstReport::write(const std::string& directory) { + std::unordered_map> unhandled_per_file; + for (auto object : unhandled) { + if (object->VpiFile() != "" && object->VpiFile() != AST::current_filename) { + unhandled_per_file.insert(std::make_pair(object->VpiFile(), std::unordered_set())); + unhandled_per_file.at(object->VpiFile()).insert(object->VpiLineNo()); + handled_count_per_file.insert(std::make_pair(object->VpiFile(), 0)); + } + } + unsigned total_handled = 0; + for (auto& hc : handled_count_per_file) { + if (hc.first != "" && hc.first != AST::current_filename) { + unhandled_per_file.insert(std::make_pair(hc.first, std::unordered_set())); + total_handled += hc.second; + } + } + float coverage = total_handled * 100.f / (total_handled + unhandled.size()); + mkdir(directory.c_str(), 0777); + std::ofstream index_file(directory + "/index.html"); + index_file << "\n\n\n\n" << std::endl; + index_file << "

Overall coverage: " << coverage << "%

" << std::endl; + for (auto& unhandled_in_file : unhandled_per_file) { + // Calculate coverage in file + unsigned handled_count = handled_count_per_file.at(unhandled_in_file.first); + unsigned unhandled_count = unhandled_in_file.second.size(); + float coverage = handled_count * 100.f / (handled_count + unhandled_count); + // Add to the index file + std::string report_filename = replace_in_string(unhandled_in_file.first, "/", ".") + ".html"; + index_file << "

Cov: " << coverage << "%" << unhandled_in_file.first << "


" << std::endl; + // Write the report file + std::ofstream report_file(directory + '/' + report_filename); + report_file << "\n\n\n\n" << std::endl; + report_file << "

" << unhandled_in_file.first << " | Coverage: " << coverage << "%

" << std::endl; + std::ifstream source_file(unhandled_in_file.first); // Read the source code + unsigned line_number = 1; + std::string line; + while (std::getline(source_file, line)) { + if (unhandled_in_file.second.find(line_number) == unhandled_in_file.second.end()) { + report_file << line_number << "
 " << line << "

" << std::endl; + } else { + report_file << line_number << "
 " << line << "

" << std::endl; + } + ++line_number; + } + report_file << "\n" << std::endl; + } + index_file << "\n" << std::endl; +} + +YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/uhdmastreport.h b/uhdm-plugin/uhdmastreport.h new file mode 100644 index 000000000..c7b6a15d6 --- /dev/null +++ b/uhdm-plugin/uhdmastreport.h @@ -0,0 +1,34 @@ +#ifndef _UHDM_AST_REPORT_H_ +#define _UHDM_AST_REPORT_H_ 1 + +#include +#include +#include +#include "kernel/yosys.h" +#undef cover +#include "headers/uhdm.h" + +YOSYS_NAMESPACE_BEGIN + +class UhdmAstReport { + private: + // Maps a filename to the number of objects being handled by the frontend + std::unordered_map handled_count_per_file; + + public: + // Objects not being handled by the frontend + std::set unhandled; + + // Marks the specified object as being handled by the frontend + void mark_handled(const UHDM::BaseClass* object); + + // Marks the object referenced by the specified handle as being handled by the frontend + void mark_handled(vpiHandle obj_h); + + // Write the coverage report to the specified path + void write(const std::string& directory); +}; + +YOSYS_NAMESPACE_END + +#endif diff --git a/uhdm-plugin/uhdmastshared.h b/uhdm-plugin/uhdmastshared.h new file mode 100644 index 000000000..8d9359c27 --- /dev/null +++ b/uhdm-plugin/uhdmastshared.h @@ -0,0 +1,63 @@ +#ifndef _UHDM_AST_SHARED_H_ +#define _UHDM_AST_SHARED_H_ 1 + +#include +#include +#include "uhdmastreport.h" + +YOSYS_NAMESPACE_BEGIN + +class UhdmAstShared { + private: + // Used for generating enum names + unsigned enum_count = 0; + + // Used for generating port IDS + unsigned port_count = 0; + + // Used for generating loop names + unsigned loop_count = 0; + + public: + // Generate the next enum ID (starting with 0) + unsigned next_enum_id() { return enum_count++; } + + // Generate the next port ID (starting with 1) + unsigned next_port_id() { return ++port_count; } + + // Generate the next loop ID (starting with 0) + unsigned next_loop_id() { return loop_count++; } + + // Flag that determines whether debug info should be printed + bool debug_flag = false; + + // Flag that determines whether we should ignore assert() statements + bool no_assert = false; + + // Flag that determines whether errors should be fatal + bool stop_on_error = true; + + // Top nodes of the design (modules, interfaces) + std::unordered_map top_nodes; + + // Templates for top nodes of the design (in case there are multiple + // versions, e.g. for different parameters) + std::unordered_map top_node_templates; + + // Map from already visited UHDM nodes to AST nodes + std::unordered_map visited; + + // UHDM node coverage report + UhdmAstReport report; + + // Map from AST type nodes to their names (used mostly for referencing + // types contained in packages) + std::unordered_map type_names; + + // Map from AST param nodes to their types (used for params with struct types) + std::unordered_map param_types; +}; + +YOSYS_NAMESPACE_END + +#endif diff --git a/uhdm-plugin/vpivisitor.cc b/uhdm-plugin/vpivisitor.cc new file mode 100644 index 000000000..595d0ea6d --- /dev/null +++ b/uhdm-plugin/vpivisitor.cc @@ -0,0 +1,10717 @@ +/* + Do not modify, auto-generated by model_gen.tcl + + Copyright 2019-2020 Alain Dargelas + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +/* + * File: vpi_visitor.cpp + * Author: alain + * + * Created on December 14, 2019, 10:03 PM + */ + +#include + +#include +#include +#include +#include +#include +#include + +static bool showIDs = false; + +#ifdef STANDARD_VPI + +#include + +// C++ 98 is default in Simulators compilers +typedef std::set VisitedContainer; +// Missing defines from vpi_user.h, sv_vpi_user.h, They are no-op in the Standard implementation. +#define uhdmdesign 2569 +#define uhdmallPackages 2570 +#define uhdmallClasses 2571 +#define uhdmallInterfaces 2572 +#define uhdmallUdps 2573 +#define uhdmallPrograms 2574 +#define uhdmallModules 2575 +#define uhdmtopModules 2576 +#define vpiDesign 3000 +#define vpiInterfaceTypespec 3001 +#define vpiNets 3002 +#define vpiSimpleExpr 3003 +#define vpiParameters 3004 +#define vpiSequenceExpr 3005 +#define vpiUnsupportedStmt 4000 +#define vpiUnsupportedExpr 4001 +#define uhdmimport 2577 + +#else + +#include "include/sv_vpi_user.h" +#include "include/vhpi_user.h" +#include "headers/uhdm_types.h" +#include "headers/containers.h" +#include "headers/vpi_uhdm.h" +#include "headers/uhdm.h" +#include "headers/Serializer.h" +typedef std::set VisitedContainer; + +#endif + +// UHDM implementation redefine these +#ifndef vpiVarBit + #define vpiVarBit vpiRegBit + #define vpiLogicVar vpiReg + #define vpiArrayVar vpiRegArray +#endif + + +namespace UHDM { + +#ifdef STANDARD_VPI + +static std::string vpiTypeName(vpiHandle h) { + int type = vpi_get(vpiType, h); + switch (type) { + case 35: return "vpiNamedFork"; + case 611: return "vpiShortIntVar"; + case 36: return "vpiNet"; + case 612: return "vpiIntVar"; + case 37: return "vpiNetBit"; + case 613: return "vpiShortRealVar"; + case 38: return "vpiNullStmt"; + case 614: return "vpiByteVar"; + case 40: return "vpiParamAssign"; + case 39: return "vpiOperation"; + case 615: return "vpiClassVar"; + case 41: return "vpiParameter"; + case 616: return "vpiStringVar"; + case 42: return "vpiPartSelect"; + case 617: return "vpiEnumVar"; + case 43: return "vpiPathTerm"; + case 618: return "vpiStructVar"; + case 44: return "vpiPort"; + case 619: return "vpiUnionVar"; + case 620: return "vpiBitVar"; + case 45: return "vpiPortBit"; + case 621: return "vpiClassObj"; + case 46: return "vpiPrimTerm"; + case 622: return "vpiChandleVar"; + case 47: return "vpiRealVar"; + case 623: return "vpiPackedArrayVar"; + case 624: return "vpiAlwaysType"; + case 48: return "vpiReg"; + case 49: return "vpiRegBit"; + case 50: return "vpiRelease"; + case 625: return "vpiLongIntTypespec"; + case 51: return "vpiRepeat"; + case 626: return "vpiShortRealTypespec"; + case 52: return "vpiRepeatControl"; + case 627: return "vpiByteTypespec"; + case 53: return "vpiSchedEvent"; + case 628: return "vpiShortIntTypespec"; + case 54: return "vpiSpecParam"; + case 629: return "vpiIntTypespec"; + case 630: return "vpiClassTypespec"; + case 55: return "vpiSwitch"; + case 631: return "vpiStringTypespec"; + case 56: return "vpiSysFuncCall"; + case 632: return "vpiChandleTypespec"; + case 57: return "vpiSysTaskCall"; + case 633: return "vpiEnumTypespec"; + case 58: return "vpiTableEntry"; + case 634: return "vpiEnumConst"; + case 59: return "vpiTask"; + case 60: return "vpiTaskCall"; + case 635: return "vpiIntegerTypespec"; + case 61: return "vpiTchk"; + case 636: return "vpiTimeTypespec"; + case 62: return "vpiTchkTerm"; + case 637: return "vpiRealTypespec"; + case 63: return "vpiTimeVar"; + case 638: return "vpiStructTypespec"; + case 64: return "vpiTimeQueue"; + case 639: return "vpiUnionTypespec"; + case 640: return "vpiBitTypespec"; + case 65: return "vpiUdp"; + case 641: return "vpiLogicTypespec"; + case 66: return "vpiUdpDefn"; + case 642: return "vpiArrayTypespec"; + case 67: return "vpiUserSystf"; + case 643: return "vpiVoidTypespec"; + case 68: return "vpiVarSelect"; + case 644: return "vpiTypespecMember"; + case 69: return "vpiWait"; + case 70: return "vpiWhile"; + case 645: return "vpiDistItem"; + case 646: return "vpiAliasStmt"; + case 71: return "vpiCondition"; + case 647: return "vpiThread"; + case 72: return "vpiDelay"; + case 648: return "vpiMethodFuncCall"; + case 73: return "vpiElseStmt"; + case 649: return "vpiMethodTaskCall"; + case 74: return "vpiForIncStmt"; + case 650: return "vpiClockingBlock"; + case 75: return "vpiForInitStmt"; + case 651: return "vpiClockingIODecl"; + case 76: return "vpiHighConn"; + case 652: return "vpiClassDefn"; + case 77: return "vpiLhs"; + case 653: return "vpiConstraint"; + case 78: return "vpiIndex"; + case 654: return "vpiConstraintOrdering"; + case 655: return "vpiPropertyDecl"; + case 79: return "vpiLeftRange"; + case 80: return "vpiLowConn"; + case 656: return "vpiPropertySpec"; + case 81: return "vpiParent"; + case 657: return "vpiPropertyExpr"; + case 82: return "vpiRhs"; + case 658: return "vpiMulticlockSequenceExpr"; + case 83: return "vpiRightRange"; + case 660: return "vpiPropertyInst"; + case 659: return "vpiClockedSeq"; + case 84: return "vpiScope"; + case 661: return "vpiSequenceDecl"; + case 85: return "vpiSysTfCall"; + case 662: return "vpiCaseProperty"; + case 86: return "vpiTchkDataTerm"; + case 663: return "vpiEndLine"; + case 87: return "vpiTchkNotifier"; + case 664: return "vpiSequenceInst"; + case 88: return "vpiTchkRefTerm"; + case 0: return "vpiLargeCharge"; + case 665: return "vpiImmediateAssert"; + case 1: return "vpiAlways"; + case 89: return "vpiArgument"; + case 90: return "vpiBit"; + case 666: return "vpiReturn"; + case 2: return "vpiAssignStmt"; + case 91: return "vpiDriver"; + case 667: return "vpiAnyPattern"; + case 3: return "vpiAssignment"; + case 92: return "vpiInternalScope"; + case 668: return "vpiTaggedPattern"; + case 4: return "vpiBegin"; + case 93: return "vpiLoad"; + case 670: return "vpiDoWhile"; + case 669: return "vpiStructPattern"; + case 5: return "vpiCase"; + case 94: return "vpiModDataPathIn"; + case 671: return "vpiOrderedWait"; + case 6: return "vpiCaseItem"; + case 95: return "vpiModPathIn"; + case 672: return "vpiWaitFork"; + case 7: return "vpiConstant"; + case 96: return "vpiModPathOut"; + case 673: return "vpiDisableFork"; + case 8: return "vpiContAssign"; + case 97: return "vpiOperand"; + case 674: return "vpiExpectStmt"; + case 9: return "vpiDeassign"; + case 98: return "vpiPortInst"; + case 675: return "vpiForeachStmt"; + case 99: return "vpiProcess"; + case 676: return "vpiFinal"; + case 677: return "vpiExtends"; + case 678: return "vpiDistribution"; + case 680: return "vpiEnumNet"; + case 679: return "vpiSeqFormalDecl"; + case 681: return "vpiIntegerNet"; + case 682: return "vpiTimeNet"; + case 683: return "vpiStructNet"; + case 684: return "vpiBreak"; + case 685: return "vpiContinue"; + case 686: return "vpiAssert"; + case 687: return "vpiAssume"; + case 688: return "vpiCover"; + case 700: return "vpiActual"; + case 690: return "vpiClockingEvent"; + case 689: return "vpiDisableCondition"; + case 701: return "vpiTypedefAlias"; + case 691: return "vpiReturnStmt"; + case 702: return "vpiIndexTypespec"; + case 692: return "vpiPackedArrayTypespec"; + case 703: return "vpiBaseTypespec"; + case 693: return "vpiPackedArrayNet"; + case 704: return "vpiElemTypespec"; + case 694: return "vpiImmediateAssume"; + case 695: return "vpiImmediateCover"; + case 706: return "vpiInputSkew"; + case 696: return "vpiSequenceTypespec"; + case 707: return "vpiOutputSkew"; + case 697: return "vpiPropertyTypespec"; + case 708: return "vpiGlobalClocking"; + case 698: return "vpiEventTypespec"; + case 710: return "vpiDefaultDisableIff"; + case 709: return "vpiDefaultClocking"; + case 699: return "vpiPropFormalDecl"; + case 713: return "vpiOrigin"; + case 714: return "vpiPrefix"; + case 715: return "vpiWith"; + case 718: return "vpiProperty"; + case 720: return "vpiValueRange"; + case 721: return "vpiPattern"; + case 722: return "vpiWeight"; + case 725: return "vpiTypedef"; + case 726: return "vpiImport"; + case 727: return "vpiDerivedClasses"; + case 100: return "vpiVariables"; + case 728: return "vpiVirtualInterfaceVar"; + case 730: return "vpiMethods"; + case 101: return "vpiUse"; + case 731: return "vpiSolveBefore"; + case 102: return "vpiExpr"; + case 732: return "vpiSolveAfter"; + case 103: return "vpiPrimitive"; + case 104: return "vpiStmt"; + case 734: return "vpiWaitingProcesses"; + case 105: return "vpiAttribute"; + case 735: return "vpiMessages"; + case 106: return "vpiBitSelect"; + case 736: return "vpiConstrForEach"; + case 107: return "vpiCallback"; + case 737: return "vpiLoopVars"; + case 108: return "vpiDelayTerm"; + case 738: return "vpiConstrIf"; + case 109: return "vpiDelayDevice"; + case 110: return "vpiFrame"; + case 740: return "vpiConcurrentAssertions"; + case 739: return "vpiConstrIfElse"; + case 111: return "vpiGateArray"; + case 741: return "vpiMatchItem"; + case 112: return "vpiModuleArray"; + case 742: return "vpiMember"; + case 113: return "vpiPrimitiveArray"; + case 743: return "vpiElement"; + case 114: return "vpiNetArray"; + case 744: return "vpiAssertion"; + case 115: return "vpiRange"; + case 745: return "vpiInstance"; + case 116: return "vpiRegArray"; + case 746: return "vpiConstraintItem"; + case 117: return "vpiSwitchArray"; + case 747: return "vpiConstraintExpr"; + case 118: return "vpiUdpArray"; + case 748: return "vpiElseConst"; + case 119: return "vpiActiveTimeFormat"; + case 120: return "vpiInTerm"; + case 750: return "vpiCoverageStart"; + case 749: return "vpiImplication"; + case 121: return "vpiInstanceArray"; + case 751: return "vpiCoverageStOp"; + case 122: return "vpiLocalDriver"; + case 752: return "vpiCoverageReset"; + case 123: return "vpiLocalLoad"; + case 753: return "vpiCoverageCheck"; + case 124: return "vpiOutTerm"; + case 754: return "vpiCoverageMerge"; + case 125: return "vpiPorts"; + case 755: return "vpiCoverageSave"; + case 126: return "vpiSimNet"; + case 127: return "vpiTaskFunc"; + case 128: return "vpiContAssignBit"; + case 758: return "vpiFsm"; + case 129: return "vpiNamedEventArray"; + case 130: return "vpiIndexedPartSelect"; + case 759: return "vpiFsmHandle"; + case 760: return "vpiAssertCoverage"; + case 131: return "vpiBaseExpr"; + case 761: return "vpiFsmStateCoverage"; + case 132: return "vpiWidthExpr"; + case 762: return "vpiStatementCoverage"; + case 133: return "vpiGenScopeArray"; + case 763: return "vpiToggleCoverage"; + case 134: return "vpiGenScope"; + case 135: return "vpiGenVar"; + case 765: return "vpiCovered"; + case 136: return "vpiAutomatics"; + case 766: return "vpiCoverMax"; + case 767: return "vpiCoveredCount"; + case 770: return "vpiAssertAttemptCovered"; + case 771: return "vpiAssertSuccessCovered"; + case 772: return "vpiAssertFailureCovered"; + case 773: return "vpiAssertVacuousSuccessCovered"; + case 774: return "vpiAssertDisableCovered"; + case 775: return "vpiFsmStates"; + case 776: return "vpiFsmStateExpression"; + case 777: return "vpiAssertKillCovered"; + case 10: return "vpiDefParam"; + case 901: return "vpiRestrict"; + case 11: return "vpiDelayControl"; + case 902: return "vpiClockedProp"; + case 12: return "vpiDisable"; + case 903: return "vpiLetDecl"; + case 13: return "vpiEventControl"; + case 904: return "vpiLetExpr"; + case 14: return "vpiEventStmt"; + case 905: return "vpiCasePropertyItem"; + case 15: return "vpiFor"; + case 16: return "vpiForce"; + case 17: return "vpiForever"; + case 18: return "vpiFork"; + case 20: return "vpiFunction"; + case 19: return "vpiFuncCall"; + case 21: return "vpiGate"; + case 22: return "vpiIf"; + case 23: return "vpiIfElse"; + case 24: return "vpiInitial"; + case 600: return "vpiPackage"; + case 25: return "vpiIntegerVar"; + case 601: return "vpiInterface"; + case 26: return "vpiInterModPath"; + case 602: return "vpiProgram"; + case 27: return "vpiIterator"; + case 603: return "vpiInterfaceArray"; + case 28: return "vpiIODecl"; + case 604: return "vpiProgramArray"; + case 30: return "vpiMemoryWord"; + case 29: return "vpiMemory"; + case 605: return "vpiTypespec"; + case 31: return "vpiModPath"; + case 606: return "vpiModport"; + case 32: return "vpiModule"; + case 607: return "vpiInterfaceTfDecl"; + case 33: return "vpiNamedBegin"; + case 608: return "vpiRefObj"; + case 34: return "vpiNamedEvent"; + case 609: return "vpiTypeParameter"; + case 610: return "vpiLongIntVar"; + } +} + +#endif + +static void release_handle(vpiHandle obj_h) { +#ifndef STANDARD_VPI + vpi_release_handle(obj_h); +#endif +} + +static std::string visit_value(s_vpi_value* value) { + if (value == nullptr) + return ""; + switch (value->format) { + case vpiIntVal: { + return std::string(std::string("|INT:") + std::to_string(value->value.integer) + "\n"); + break; + } + case vpiStringVal: { + const char* s = (const char*) value->value.str; + return std::string(std::string("|STRING:") + std::string(s) + "\n"); + break; + } + case vpiBinStrVal: { + const char* s = (const char*) value->value.str; + return std::string(std::string("|BIN:") + std::string(s) + "\n"); + break; + } + case vpiHexStrVal: { + const char* s = (const char*) value->value.str; + return std::string(std::string("|HEX:") + std::string(s) + "\n"); + break; + } + case vpiOctStrVal: { + const char* s = (const char*) value->value.str; + return std::string(std::string("|OCT:") + std::string(s) + "\n"); + break; + } + case vpiRealVal: { + return std::string(std::string("|REAL:") + std::to_string(value->value.real) + "\n"); + break; + } + case vpiScalarVal: { + return std::string(std::string("|SCAL:") + std::to_string(value->value.scalar) + "\n"); + break; + } + case vpiDecStrVal: { + const char* s = (const char*) value->value.str; + return std::string(std::string("|DEC:") + std::string(s) + "\n"); + break; + } + default: + break; + } + return ""; +} + +static std::string visit_delays(s_vpi_delay* delay) { + if (delay == nullptr) + return ""; + switch (delay->time_type) { + case vpiScaledRealTime: { + return std::string(std::string("|#") + std::to_string(delay->da[0].low) + "\n"); + break; + } + default: + break; + } + return ""; +} + +static std::ostream &stream_indent(std::ostream &out, int indent) { + out << std::string(indent, ' '); + return out; +} + + void visit_object (vpiHandle obj_h, int indent, const char *relation, VisitedContainer* visited, std::ostream& out, bool shallowVisit = false) { + if (!obj_h) + return; +#ifdef STANDARD_VPI + + static int kLevelIndent = 2; + const bool alreadyVisited = visited->find(obj_h) != visited->end(); + visited->insert(obj_h); + +#else + + static constexpr int kLevelIndent = 2; + const uhdm_handle* const handle = (const uhdm_handle*) obj_h; + const BaseClass* const object = (const BaseClass*) handle->object; + const bool alreadyVisited = (visited->find(object) != visited->end()); + if (!shallowVisit) + visited->insert(object); + +#endif + + unsigned int subobject_indent = indent + kLevelIndent; + const unsigned int objectType = vpi_get(vpiType, obj_h); + + { + std::string hspaces; + std::string rspaces; + if (indent >= kLevelIndent) { + for (int i = 0; i < indent -2 ; i++) { + hspaces += " "; + } + rspaces = hspaces + "|"; + hspaces += "\\_"; + } + + if (strlen(relation) != 0) { + out << rspaces << relation << ":\n"; + } + +#ifdef STANDARD_VPI + + out << hspaces << vpiTypeName(obj_h) << "(" << vpi_get(vpiType, obj_h) << "): "; + +#else + + out << hspaces << UHDM::VpiTypeName(obj_h) << ": "; + +#endif + + bool needs_separator = false; + if (const char* s = vpi_get_str(vpiDefName, obj_h)) { // defName + out << s; + needs_separator = true; + } + if (const char* s = vpi_get_str(vpiFullName, obj_h)) { // objectName + if (needs_separator) out << " "; + out << "(" << s << ")"; // objectName + } else if (const char* s = vpi_get_str(vpiName, obj_h)) { // objectName + if (needs_separator) out << " "; + out << "(" << s << ")"; // objectName + } + +#ifndef STANDARD_VPI + + if (showIDs) + out << ", id:" << object->UhdmId(); + +#endif + + if (objectType == vpiModule || objectType == vpiProgram || objectType == vpiClassDefn || objectType == vpiPackage || + objectType == vpiInterface || objectType == vpiUdp) { + if (const char* s = vpi_get_str(vpiFile, obj_h)) { + if (int l = vpi_get(vpiLineNo, obj_h)) { + out << " " << s << ":" << l << ": "; // fileName, line + } else { + out << ", file:" << s; // fileName + } + } + } else { + if (int l = vpi_get(vpiLineNo, obj_h)) { + out << ", line:" << l; + } + } + if (vpiHandle par = vpi_handle(vpiParent, obj_h)) { + if (const char* parentName = vpi_get_str(vpiFullName, par)) { + out << ", parent:" << parentName; + } else if (const char* parentName = vpi_get_str(vpiName, par)) { + out << ", parent:" << parentName; + } + if (showIDs) { + const uhdm_handle* const phandle = (const uhdm_handle*) par; + const BaseClass* const pobject = (const BaseClass*) phandle->object; + out << ", parID:" << pobject->UhdmId(); + } + vpi_free_object(par); + } + out << "\n"; + } + + if (alreadyVisited || shallowVisit) { + return; + } + if (strcmp(relation, "vpiParent") == 0) { + return; + } + if (objectType == vpiOrderedWait) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiCondition,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiCondition", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiElseStmt,obj_h); + visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiEnumConst) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + + return; + } + if (objectType == vpiReg) { + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiChandleVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiContAssign) { + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRhs,obj_h); + visit_object(itr, subobject_indent, "vpiRhs", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLhs,obj_h); + visit_object(itr, subobject_indent, "vpiLhs", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiSwitchArray) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimitive,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiInstance,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInstance", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModule,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModule", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiTableEntry) { + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiEnumTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiBaseTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiBaseTypespec", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiEnumConst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiEnumConst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiPropertyInst) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const int n = vpi_get(vpiStartLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; + if (const int n = vpi_get(vpiColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; + if (const int n = vpi_get(vpiEndLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; + if (const int n = vpi_get(vpiEndColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiPropertyDecl,obj_h); + visit_object(itr, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingBlock,obj_h); + visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiDisableCondition,obj_h); + visit_object(itr, subobject_indent, "vpiDisableCondition", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiArgument,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArgument", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiByteVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiClockedSeq) { + + vpiHandle itr; + itr = vpi_handle(vpiClockingEvent,obj_h); + visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiSequenceExpr,obj_h); + visit_object(itr, subobject_indent, "vpiSequenceExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiEventTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiNamedEvent) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiWaitingProcesses,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiWaitingProcesses", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiRepeatControl) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiLetDecl) { + + + return; + } + if (objectType == vpiAnyPattern) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + + return; + } + if (objectType == vpiParamAssign) { + if (const int n = vpi_get(vpiConnByName, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConnByName:" << n << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiRhs,obj_h); + visit_object(itr, subobject_indent, "vpiRhs", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLhs,obj_h); + visit_object(itr, subobject_indent, "vpiLhs", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiAssume) { + if (const int n = vpi_get(vpiStartLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; + if (const int n = vpi_get(vpiColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; + if (const int n = vpi_get(vpiEndLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; + if (const int n = vpi_get(vpiEndColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiIsClockInferred, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsClockInferred:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiClockingBlock,obj_h); + visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingEvent,obj_h); + visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiProperty,obj_h); + visit_object(itr, subobject_indent, "vpiProperty", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiIntegerVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiStringVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiUserSystf) { + + + return; + } + if (objectType == vpiClockingIODecl) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const int n = vpi_get(vpiDirection, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; + if (const int n = vpi_get(vpiInputEdge, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiInputEdge:" << n << "\n"; + if (const int n = vpi_get(vpiOutputEdge, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiOutputEdge:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiInputSkew,obj_h); + visit_object(itr, subobject_indent, "vpiInputSkew", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiOutputSkew,obj_h); + visit_object(itr, subobject_indent, "vpiOutputSkew", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiShortIntVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiFunction) { + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + if (const int n = vpi_get(vpiFuncType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiFuncType:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDPICIdentifier, obj_h)) + stream_indent(out, indent) << "|vpiDPICIdentifier:" << s << "\n"; + if (const int n = vpi_get(vpiMethod, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiMethod:" << n << "\n"; + if (const int n = vpi_get(vpiAccessType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAccessType:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVirtual, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVirtual:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiDPIPure, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDPIPure:" << n << "\n"; + if (const int n = vpi_get(vpiDPIContext, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDPIContext:" << n << "\n"; + if (const int n = vpi_get(vpiDPICStr, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDPICStr:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiReturn,obj_h); + visit_object(itr, subobject_indent, "vpiReturn", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClassDefn,obj_h); + visit_object(itr, subobject_indent, "vpiClassDefn", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIODecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiImplication) { + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConstraintExpr,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConstraintExpr", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiCase) { + if (const int n = vpi_get(vpiCaseType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiCaseType:" << n << "\n"; + if (const int n = vpi_get(vpiQualifier, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiQualifier:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiCaseItem,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiCaseItem", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiIntVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiPackage) { + if (const int n = vpi_get(vpiUnit, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiUnit:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDefFile, obj_h)) + stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; + if (const char* s = vpi_get_str(vpiLibrary, obj_h)) + stream_indent(out, indent) << "|vpiLibrary:" << s << "\n"; + if (const char* s = vpi_get_str(vpiCell, obj_h)) + stream_indent(out, indent) << "|vpiCell:" << s << "\n"; + if (const char* s = vpi_get_str(vpiConfig, obj_h)) + stream_indent(out, indent) << "|vpiConfig:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiCellInstance, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiCellInstance:" << n << "\n"; + if (const int n = vpi_get(vpiDefNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefNetType:" << n << "\n"; + if (const int n = vpi_get(vpiDefLineNo, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; + if (const int n = vpi_get(vpiDefDelayMode, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefDelayMode:" << n << "\n"; + if (const int n = vpi_get(vpiProtected, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; + if (const int n = vpi_get(vpiTimePrecision, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTimePrecision:" << n << "\n"; + if (const int n = vpi_get(vpiTimeUnit, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTimeUnit:" << n << "\n"; + if (const int n = vpi_get(vpiUnconnDrive, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiUnconnDrive:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiTop, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTop:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiTaskFunc,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiProgram,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgram", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiProgramArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiArrayNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSpecParam,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSpecParam", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiClassDefn,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClassDefn", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAssertion,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiLogicVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiIfElse) { + if (const int n = vpi_get(vpiQualifier, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiQualifier:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiElseStmt,obj_h); + visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiAliasStmt) { + + + return; + } + if (objectType == vpiClassDefn) { + if (const int n = vpi_get(vpiVirtual, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVirtual:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiMethod,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMethod", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExtends,obj_h); + visit_object(itr, subobject_indent, "vpiExtends", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConstraint,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConstraint", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDerivedClasses,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDerivedClasses", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiClassTypespec,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClassTypespec", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiModuleArray) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiInstance,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInstance", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModule,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModule", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiConstraintOrdering) { + + vpiHandle itr; + itr = vpi_iterate(vpiSolveBefore,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSolveBefore", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSolveAfter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSolveAfter", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiFor) { + if (const int n = vpi_get(vpiLocalVarDecls, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiLocalVarDecls:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiForInitStmt,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiForInitStmt", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiForIncStmt,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiForIncStmt", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiForInitStmt,obj_h); + visit_object(itr, subobject_indent, "vpiForInitStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiForIncStmt,obj_h); + visit_object(itr, subobject_indent, "vpiForIncStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiCasePropertyItem) { + + vpiHandle itr; + itr = vpi_iterate(vpiExpr,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiExpr", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPropertyExpr,obj_h); + visit_object(itr, subobject_indent, "vpiPropertyExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiPartSelect) { + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiParent,obj_h); + visit_object(itr, subobject_indent, "vpiParent", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiForce) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiRhs,obj_h); + visit_object(itr, subobject_indent, "vpiRhs", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLhs,obj_h); + visit_object(itr, subobject_indent, "vpiLhs", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiSequenceDecl) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSeqFormalDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSeqFormalDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiNamedBegin) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiStmt,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiStmt", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiDisable) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiIndexedPartSelect) { + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiIndexedPartSelectType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIndexedPartSelectType:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiBaseExpr,obj_h); + visit_object(itr, subobject_indent, "vpiBaseExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiWidthExpr,obj_h); + visit_object(itr, subobject_indent, "vpiWidthExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiGateArray) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimitive,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiInstance,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInstance", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModule,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModule", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiUnsupportedStmt) { + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiAlways) { + if (const int n = vpi_get(vpiAlwaysType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAlwaysType:" << n << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiIntegerTypespec) { + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiArrayTypespec) { + if (const int n = vpi_get(vpiArrayType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayType:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiIndexTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiIndexTypespec", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiElemTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiElemTypespec", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiHierPath) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiActual,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiActual", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiWaitFork) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiBitVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiClassObj) { + if (const int n = vpi_get(vpiObjId, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiObjId:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiMessages,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMessages", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTaskFunc,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiClassTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiClassTypespec", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiWaitingProcesses,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiWaitingProcesses", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConstraint,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConstraint", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiTchkTerm) { + if (const int n = vpi_get(vpiEdge, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEdge:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiInterface) { + if (const int n = vpi_get(vpiIndex, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIndex:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDefFile, obj_h)) + stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; + if (const char* s = vpi_get_str(vpiLibrary, obj_h)) + stream_indent(out, indent) << "|vpiLibrary:" << s << "\n"; + if (const char* s = vpi_get_str(vpiCell, obj_h)) + stream_indent(out, indent) << "|vpiCell:" << s << "\n"; + if (const char* s = vpi_get_str(vpiConfig, obj_h)) + stream_indent(out, indent) << "|vpiConfig:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiCellInstance, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiCellInstance:" << n << "\n"; + if (const int n = vpi_get(vpiDefNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefNetType:" << n << "\n"; + if (const int n = vpi_get(vpiDefLineNo, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; + if (const int n = vpi_get(vpiDefDelayMode, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefDelayMode:" << n << "\n"; + if (const int n = vpi_get(vpiProtected, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; + if (const int n = vpi_get(vpiTimePrecision, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTimePrecision:" << n << "\n"; + if (const int n = vpi_get(vpiTimeUnit, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTimeUnit:" << n << "\n"; + if (const int n = vpi_get(vpiUnconnDrive, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiUnconnDrive:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiTop, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTop:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiInstanceArray,obj_h); + visit_object(itr, subobject_indent, "vpiInstanceArray", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiProcess,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProcess", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInterfaceTfDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInterfaceTfDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModport", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiGlobalClocking,obj_h); + visit_object(itr, subobject_indent, "vpiGlobalClocking", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiDefaultClocking,obj_h); + visit_object(itr, subobject_indent, "vpiDefaultClocking", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiModPath,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModPath", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiClockingBlock,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInterface,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInterface", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInterfaceArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInterfaceArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPort,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPort", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiGenScopeArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiDefaultDisableIff,obj_h); + visit_object(itr, subobject_indent, "vpiDefaultDisableIff", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiTaskFunc,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiProgram,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgram", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiProgramArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiArrayNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSpecParam,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSpecParam", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiClassDefn,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClassDefn", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAssertion,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiReturn) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiPropertyTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiDesign) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + if (indent == 0) visited->clear(); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + if (indent == 0) visited->clear(); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + if (indent == 0) visited->clear(); + itr = vpi_iterate(uhdmallPackages,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "uhdmallPackages", visited, out ); + release_handle(obj); + } + release_handle(itr); + if (indent == 0) visited->clear(); + itr = vpi_iterate(uhdmallClasses,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "uhdmallClasses", visited, out ); + release_handle(obj); + } + release_handle(itr); + if (indent == 0) visited->clear(); + itr = vpi_iterate(uhdmallInterfaces,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "uhdmallInterfaces", visited, out ); + release_handle(obj); + } + release_handle(itr); + if (indent == 0) visited->clear(); + itr = vpi_iterate(uhdmallUdps,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "uhdmallUdps", visited, out ); + release_handle(obj); + } + release_handle(itr); + if (indent == 0) visited->clear(); + itr = vpi_iterate(uhdmallPrograms,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "uhdmallPrograms", visited, out ); + release_handle(obj); + } + release_handle(itr); + if (indent == 0) visited->clear(); + itr = vpi_iterate(uhdmallModules,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "uhdmallModules", visited, out ); + release_handle(obj); + } + release_handle(itr); + if (indent == 0) visited->clear(); + itr = vpi_iterate(uhdmtopModules,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "uhdmtopModules", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiDistItem) { + if (const int n = vpi_get(vpiDistType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDistType:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiWeight,obj_h); + visit_object(itr, subobject_indent, "vpiWeight", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiValueRange,obj_h); + visit_object(itr, subobject_indent, "vpiValueRange", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiBitTypespec) { + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiIndexTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiIndexTypespec", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiElemTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiElemTypespec", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiStructVar) { + if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiMember,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMember", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiModport) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiIODecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiArrayNet) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiExpanded, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; + if (const int n = vpi_get(vpiImplicitDecl, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; + if (const int n = vpi_get(vpiResolvedNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitScalared, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + if (const int n = vpi_get(vpiChargeStrength, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitVectored, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiSimNet,obj_h); + visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPathTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTchkTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiForever) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiInterfaceTfDecl) { + if (const int n = vpi_get(vpiAccessType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAccessType:" << n << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiTask,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTask", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiFunction,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiFunction", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiShortRealVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiPortBit) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiExplicitName, obj_h)) + stream_indent(out, indent) << "|vpiExplicitName:" << s << "\n"; + if (const int n = vpi_get(vpiPortIndex, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPortIndex:" << n << "\n"; + if (const int n = vpi_get(vpiPortType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPortType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiConnByName, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConnByName:" << n << "\n"; + if (const int n = vpi_get(vpiDirection, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedef,obj_h); + visit_object(itr, subobject_indent, "vpiTypedef", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiHighConn,obj_h); + visit_object(itr, subobject_indent, "vpiHighConn", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLowConn,obj_h); + visit_object(itr, subobject_indent, "vpiLowConn", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiImmediateAssume) { + if (const int n = vpi_get(vpiIsDeferred, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsDeferred:" << n << "\n"; + if (const int n = vpi_get(vpiIsFinal, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsFinal:" << n << "\n"; + if (const int n = vpi_get(vpiStartLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; + if (const int n = vpi_get(vpiColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; + if (const int n = vpi_get(vpiEndLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; + if (const int n = vpi_get(vpiEndColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingBlock,obj_h); + visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiElseStmt,obj_h); + visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiMethodFuncCall) { + if (const int n = vpi_get(vpiUserDefn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiUserDefn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiPrefix,obj_h); + visit_object(itr, subobject_indent, "vpiPrefix", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiFunction,obj_h); + visit_object(itr, subobject_indent, "vpiFunction", visited, out , true); + release_handle(itr); + itr = vpi_handle(vpiWith,obj_h); + visit_object(itr, subobject_indent, "vpiWith", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiArgument,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArgument", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiOperation) { + if (const int n = vpi_get(vpiOpType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiOpType:" << n << "\n"; + if (const int n = vpi_get(vpiOpStrong, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiOpStrong:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiOperand,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiOperand", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiCaseItem) { + + vpiHandle itr; + itr = vpi_iterate(vpiExpr,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiExpr", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiAssignStmt) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiRhs,obj_h); + visit_object(itr, subobject_indent, "vpiRhs", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLhs,obj_h); + visit_object(itr, subobject_indent, "vpiLhs", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiPropertyDecl) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropFormalDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropFormalDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPropertySpec,obj_h); + visit_object(itr, subobject_indent, "vpiPropertySpec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiNamedFork) { + if (const int n = vpi_get(vpiJoinType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiJoinType:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiStmt,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiStmt", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiDistribution) { + if (const int n = vpi_get(vpiSoft, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSoft:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiDistItem,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDistItem", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiPropFormalDecl) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const int n = vpi_get(vpiDirection, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiImport) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiImport,obj_h); + visit_object(itr, subobject_indent, "vpiImport", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiIf) { + if (const int n = vpi_get(vpiQualifier, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiQualifier:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiSwitch) { + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + s_vpi_delay delay; + vpi_get_delays(obj_h, &delay); + if (delay.da != nullptr) { + stream_indent(out, indent) << visit_delays(&delay); + } + if (const int n = vpi_get(vpiPrimType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPrimType:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiSeqFormalDecl) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const int n = vpi_get(vpiDirection, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiNullStmt) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiLetExpr) { + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiEnumNet) { + if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiExpanded, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; + if (const int n = vpi_get(vpiImplicitDecl, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; + if (const int n = vpi_get(vpiResolvedNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitScalared, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + if (const int n = vpi_get(vpiChargeStrength, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitVectored, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiSimNet,obj_h); + visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPathTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTchkTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiMethodTaskCall) { + if (const int n = vpi_get(vpiUserDefn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiUserDefn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiPrefix,obj_h); + visit_object(itr, subobject_indent, "vpiPrefix", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTask,obj_h); + visit_object(itr, subobject_indent, "vpiTask", visited, out , true); + release_handle(itr); + itr = vpi_handle(vpiWith,obj_h); + visit_object(itr, subobject_indent, "vpiWith", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiArgument,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArgument", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiDefParam) { + + vpiHandle itr; + itr = vpi_handle(vpiRhs,obj_h); + visit_object(itr, subobject_indent, "vpiRhs", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLhs,obj_h); + visit_object(itr, subobject_indent, "vpiLhs", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiSpecParam) { + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiTypespecMember) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiDeassign) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLhs,obj_h); + visit_object(itr, subobject_indent, "vpiLhs", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiClassVar) { + if (const int n = vpi_get(vpiObjId, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiObjId:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiClassObj,obj_h); + visit_object(itr, subobject_indent, "vpiClassObj", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiVarSelect) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiGenScopeArray) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiGenVar,obj_h); + visit_object(itr, subobject_indent, "vpiGenVar", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiGenScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiGenScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiTaggedPattern) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiPattern,obj_h); + visit_object(itr, subobject_indent, "vpiPattern", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiGate) { + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + s_vpi_delay delay; + vpi_get_delays(obj_h, &delay); + if (delay.da != nullptr) { + stream_indent(out, indent) << visit_delays(&delay); + } + if (const int n = vpi_get(vpiPrimType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPrimType:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiTask) { + if (const char* s = vpi_get_str(vpiDPICIdentifier, obj_h)) + stream_indent(out, indent) << "|vpiDPICIdentifier:" << s << "\n"; + if (const int n = vpi_get(vpiMethod, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiMethod:" << n << "\n"; + if (const int n = vpi_get(vpiAccessType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAccessType:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVirtual, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVirtual:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiDPIPure, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDPIPure:" << n << "\n"; + if (const int n = vpi_get(vpiDPIContext, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDPIContext:" << n << "\n"; + if (const int n = vpi_get(vpiDPICStr, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDPICStr:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiReturn,obj_h); + visit_object(itr, subobject_indent, "vpiReturn", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClassDefn,obj_h); + visit_object(itr, subobject_indent, "vpiClassDefn", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIODecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiNamedEventArray) { + + + return; + } + if (objectType == vpiImmediateCover) { + if (const int n = vpi_get(vpiIsDeferred, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsDeferred:" << n << "\n"; + if (const int n = vpi_get(vpiIsFinal, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsFinal:" << n << "\n"; + if (const int n = vpi_get(vpiStartLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; + if (const int n = vpi_get(vpiColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; + if (const int n = vpi_get(vpiEndLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; + if (const int n = vpi_get(vpiEndColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingBlock,obj_h); + visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiTimeNet) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiExpanded, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; + if (const int n = vpi_get(vpiImplicitDecl, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; + if (const int n = vpi_get(vpiResolvedNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitScalared, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + if (const int n = vpi_get(vpiChargeStrength, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitVectored, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiSimNet,obj_h); + visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPathTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTchkTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiVarBit) { + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiIODecl) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const int n = vpi_get(vpiDirection, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTypedef,obj_h); + visit_object(itr, subobject_indent, "vpiTypedef", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiInterfaceArray) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiInstance,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInstance", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModule,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModule", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiShortRealTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiImmediateAssert) { + if (const int n = vpi_get(vpiIsDeferred, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsDeferred:" << n << "\n"; + if (const int n = vpi_get(vpiIsFinal, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsFinal:" << n << "\n"; + if (const int n = vpi_get(vpiStartLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; + if (const int n = vpi_get(vpiColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; + if (const int n = vpi_get(vpiEndLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; + if (const int n = vpi_get(vpiEndColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingBlock,obj_h); + visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiElseStmt,obj_h); + visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiParameter) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiConstType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstType:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiLocalParam, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiLocalParam:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiAttribute) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDefFile, obj_h)) + stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; + if (const int n = vpi_get(vpiDefAttribute, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefAttribute:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + if (const int n = vpi_get(vpiDefLineNo, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; + + + return; + } + if (objectType == vpiPort) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiExplicitName, obj_h)) + stream_indent(out, indent) << "|vpiExplicitName:" << s << "\n"; + if (const int n = vpi_get(vpiPortIndex, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPortIndex:" << n << "\n"; + if (const int n = vpi_get(vpiPortType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPortType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiConnByName, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConnByName:" << n << "\n"; + if (const int n = vpi_get(vpiDirection, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypedef,obj_h); + visit_object(itr, subobject_indent, "vpiTypedef", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiHighConn,obj_h); + visit_object(itr, subobject_indent, "vpiHighConn", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLowConn,obj_h); + visit_object(itr, subobject_indent, "vpiLowConn", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiProgramArray) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiInstance,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInstance", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModule,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModule", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiWhile) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiRepeat) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiFork) { + if (const int n = vpi_get(vpiJoinType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiJoinType:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiStmt,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiStmt", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiStructTypespec) { + if (const int n = vpi_get(vpiPacked, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPacked:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiTypespecMember,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypespecMember", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiGenVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiGenScopeArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiPackedArrayNet) { + if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiExpanded, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; + if (const int n = vpi_get(vpiImplicitDecl, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; + if (const int n = vpi_get(vpiResolvedNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitScalared, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + if (const int n = vpi_get(vpiChargeStrength, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitVectored, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiElement,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiElement", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiSimNet,obj_h); + visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPathTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTchkTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiFinal) { + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiConstant) { + if (const int n = vpi_get(vpiConstType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstType:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiDelayControl) { + s_vpi_delay delay; + vpi_get_delays(obj_h, &delay); + if (delay.da != nullptr) { + stream_indent(out, indent) << visit_delays(&delay); + } + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiPropertySpec) { + + vpiHandle itr; + itr = vpi_handle(vpiClockingEvent,obj_h); + visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiDisableCondition,obj_h); + visit_object(itr, subobject_indent, "vpiDisableCondition", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiPropertyExpr,obj_h); + visit_object(itr, subobject_indent, "vpiPropertyExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiPrimTerm) { + if (const int n = vpi_get(vpiDirection, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; + if (const int n = vpi_get(vpiTermIndex, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTermIndex:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiExpectStmt) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiElseStmt,obj_h); + visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiEventControl) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiClassTypespec) { + if (const int n = vpi_get(vpiClassType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiClassType:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMethod,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMethod", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExtends,obj_h); + visit_object(itr, subobject_indent, "vpiExtends", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConstraint,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConstraint", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiClassDefn,obj_h); + visit_object(itr, subobject_indent, "vpiClassDefn", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiPathTerm) { + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiSequenceTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiConstrIfElse) { + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConstraintExpr,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConstraintExpr", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiElseConst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiElseConst", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiRestrict) { + if (const int n = vpi_get(vpiStartLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; + if (const int n = vpi_get(vpiColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; + if (const int n = vpi_get(vpiEndLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; + if (const int n = vpi_get(vpiEndColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiIsClockInferred, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsClockInferred:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiClockingBlock,obj_h); + visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingEvent,obj_h); + visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiProperty,obj_h); + visit_object(itr, subobject_indent, "vpiProperty", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiByteTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiExtends) { + + vpiHandle itr; + itr = vpi_iterate(vpiArgument,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArgument", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiClassTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiClassTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiRealVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiVirtualInterfaceVar) { + + + return; + } + if (objectType == vpiRefObj) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const int n = vpi_get(vpiGeneric, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiGeneric:" << n << "\n"; + if (const int n = vpi_get(vpiStructMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTaskFunc,obj_h); + visit_object(itr, subobject_indent, "vpiTaskFunc", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiActual,obj_h); + visit_object(itr, subobject_indent, "vpiActual", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiConstrForEach) { + + vpiHandle itr; + itr = vpi_handle(vpiVariables,obj_h); + visit_object(itr, subobject_indent, "vpiVariables", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConstraintExpr,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConstraintExpr", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoopVars,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoopVars", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiRelease) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLhs,obj_h); + visit_object(itr, subobject_indent, "vpiLhs", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiTypeParameter) { + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiLocalParam, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiLocalParam:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiFuncCall) { + if (const int n = vpi_get(vpiFuncType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiFuncType:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiFunction,obj_h); + visit_object(itr, subobject_indent, "vpiFunction", visited, out , true); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiArgument,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArgument", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiCover) { + if (const int n = vpi_get(vpiIsCoverSequence, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsCoverSequence:" << n << "\n"; + if (const int n = vpi_get(vpiStartLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; + if (const int n = vpi_get(vpiColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; + if (const int n = vpi_get(vpiEndLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; + if (const int n = vpi_get(vpiEndColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiIsClockInferred, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsClockInferred:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiClockingBlock,obj_h); + visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingEvent,obj_h); + visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiProperty,obj_h); + visit_object(itr, subobject_indent, "vpiProperty", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiArrayVar) { + if (const int n = vpi_get(vpiArrayType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayType:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVarSelect,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVarSelect", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiWait) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiIntegerNet) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiExpanded, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; + if (const int n = vpi_get(vpiImplicitDecl, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; + if (const int n = vpi_get(vpiResolvedNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitScalared, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + if (const int n = vpi_get(vpiChargeStrength, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitVectored, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiSimNet,obj_h); + visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPathTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTchkTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiConstraint) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiVirtual, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVirtual:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiAccessType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAccessType:" << n << "\n"; + if (const int n = vpi_get(vpiIsConstraintEnabled, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsConstraintEnabled:" << n << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConstraintItem,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConstraintItem", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiInterfaceTypespec) { + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const int n = vpi_get(vpiIsModPort, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsModPort:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiContAssignBit) { + if (const int n = vpi_get(vpiOffset, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiOffset:" << n << "\n"; + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRhs,obj_h); + visit_object(itr, subobject_indent, "vpiRhs", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLhs,obj_h); + visit_object(itr, subobject_indent, "vpiLhs", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiVoidTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiUnsupportedExpr) { + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiUdpArray) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimitive,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiInstance,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInstance", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModule,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModule", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiProgram) { + if (const int n = vpi_get(vpiIndex, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIndex:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDefFile, obj_h)) + stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; + if (const char* s = vpi_get_str(vpiLibrary, obj_h)) + stream_indent(out, indent) << "|vpiLibrary:" << s << "\n"; + if (const char* s = vpi_get_str(vpiCell, obj_h)) + stream_indent(out, indent) << "|vpiCell:" << s << "\n"; + if (const char* s = vpi_get_str(vpiConfig, obj_h)) + stream_indent(out, indent) << "|vpiConfig:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiCellInstance, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiCellInstance:" << n << "\n"; + if (const int n = vpi_get(vpiDefNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefNetType:" << n << "\n"; + if (const int n = vpi_get(vpiDefLineNo, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; + if (const int n = vpi_get(vpiDefDelayMode, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefDelayMode:" << n << "\n"; + if (const int n = vpi_get(vpiProtected, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; + if (const int n = vpi_get(vpiTimePrecision, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTimePrecision:" << n << "\n"; + if (const int n = vpi_get(vpiTimeUnit, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTimeUnit:" << n << "\n"; + if (const int n = vpi_get(vpiUnconnDrive, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiUnconnDrive:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiTop, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTop:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiInstanceArray,obj_h); + visit_object(itr, subobject_indent, "vpiInstanceArray", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiProcess,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProcess", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiDefaultClocking,obj_h); + visit_object(itr, subobject_indent, "vpiDefaultClocking", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiInterface,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInterface", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInterfaceArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInterfaceArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiClockingBlock,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPort,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPort", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiGenScopeArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiDefaultDisableIff,obj_h); + visit_object(itr, subobject_indent, "vpiDefaultDisableIff", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiTaskFunc,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiProgram,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgram", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiProgramArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiArrayNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSpecParam,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSpecParam", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiClassDefn,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClassDefn", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAssertion,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiUnionVar) { + if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiMember,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMember", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiTchk) { + s_vpi_delay delay; + vpi_get_delays(obj_h, &delay); + if (delay.da != nullptr) { + stream_indent(out, indent) << visit_delays(&delay); + } + if (const int n = vpi_get(vpiTchkType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTchkType:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkRefTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkRefTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkDataTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkDataTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkNotifier,obj_h); + visit_object(itr, subobject_indent, "vpiTchkNotifier", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiExpr,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiExpr", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiRange) { + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiBitSelect) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiModule) { + if (const int n = vpi_get(vpiIndex, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIndex:" << n << "\n"; + if (const int n = vpi_get(vpiTopModule, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTopModule:" << n << "\n"; + if (const int n = vpi_get(vpiDefDecayTime, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefDecayTime:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDefFile, obj_h)) + stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; + if (const char* s = vpi_get_str(vpiLibrary, obj_h)) + stream_indent(out, indent) << "|vpiLibrary:" << s << "\n"; + if (const char* s = vpi_get_str(vpiCell, obj_h)) + stream_indent(out, indent) << "|vpiCell:" << s << "\n"; + if (const char* s = vpi_get_str(vpiConfig, obj_h)) + stream_indent(out, indent) << "|vpiConfig:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiCellInstance, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiCellInstance:" << n << "\n"; + if (const int n = vpi_get(vpiDefNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefNetType:" << n << "\n"; + if (const int n = vpi_get(vpiDefLineNo, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; + if (const int n = vpi_get(vpiDefDelayMode, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiDefDelayMode:" << n << "\n"; + if (const int n = vpi_get(vpiProtected, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; + if (const int n = vpi_get(vpiTimePrecision, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTimePrecision:" << n << "\n"; + if (const int n = vpi_get(vpiTimeUnit, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTimeUnit:" << n << "\n"; + if (const int n = vpi_get(vpiUnconnDrive, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiUnconnDrive:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiTop, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTop:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiInstanceArray,obj_h); + visit_object(itr, subobject_indent, "vpiInstanceArray", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiProcess,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProcess", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimitive,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimitiveArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimitiveArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiGlobalClocking,obj_h); + visit_object(itr, subobject_indent, "vpiGlobalClocking", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiDefaultClocking,obj_h); + visit_object(itr, subobject_indent, "vpiDefaultClocking", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiModuleArray,obj_h); + visit_object(itr, subobject_indent, "vpiModuleArray", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPort,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPort", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInterface,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInterface", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInterfaceArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInterfaceArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModule,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModule", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModuleArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModuleArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModPath,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModPath", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTchk,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTchk", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDefParam,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDefParam", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiIODecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAliasStmt,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAliasStmt", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiClockingBlock,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiGenScopeArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiDefaultDisableIff,obj_h); + visit_object(itr, subobject_indent, "vpiDefaultDisableIff", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiTaskFunc,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiProgram,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgram", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiProgramArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiArrayNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSpecParam,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSpecParam", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiClassDefn,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClassDefn", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAssertion,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiLongIntTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiSoftDisable) { + + vpiHandle itr; + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiCaseProperty) { + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiCasePropertyItem,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiCasePropertyItem", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiClockedProp) { + + vpiHandle itr; + itr = vpi_handle(vpiClockingEvent,obj_h); + visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiPropertyExpr,obj_h); + visit_object(itr, subobject_indent, "vpiPropertyExpr", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiStructPattern) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiPattern,obj_h); + visit_object(itr, subobject_indent, "vpiPattern", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiLogicNet) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiExpanded, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; + if (const int n = vpi_get(vpiImplicitDecl, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; + if (const int n = vpi_get(vpiResolvedNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitScalared, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + if (const int n = vpi_get(vpiChargeStrength, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitVectored, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiSimNet,obj_h); + visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPathTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTchkTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiTaskCall) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiTask,obj_h); + visit_object(itr, subobject_indent, "vpiTask", visited, out , true); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiArgument,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArgument", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiAssert) { + if (const int n = vpi_get(vpiStartLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; + if (const int n = vpi_get(vpiColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; + if (const int n = vpi_get(vpiEndLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; + if (const int n = vpi_get(vpiEndColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiIsClockInferred, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsClockInferred:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiClockingBlock,obj_h); + visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiElseStmt,obj_h); + visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingEvent,obj_h); + visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiProperty,obj_h); + visit_object(itr, subobject_indent, "vpiProperty", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiLogicTypespec) { + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiIndexTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiIndexTypespec", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiElemTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiElemTypespec", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiBreak) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiSysFuncCall) { + if (const int n = vpi_get(vpiFuncType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiFuncType:" << n << "\n"; + if (const int n = vpi_get(vpiUserDefn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiUserDefn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiUserSystf,obj_h); + visit_object(itr, subobject_indent, "vpiUserSystf", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiArgument,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArgument", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiEnumVar) { + if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiUnsupportedTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiConstrIf) { + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConstraintExpr,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConstraintExpr", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiIntTypespec) { + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiPackedArrayTypespec) { + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiIndexTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiIndexTypespec", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiElemTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiElemTypespec", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiUnionTypespec) { + if (const int n = vpi_get(vpiPacked, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPacked:" << n << "\n"; + if (const int n = vpi_get(vpiTagged, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiTagged:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiTypespecMember,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypespecMember", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiEventStmt) { + if (const int n = vpi_get(vpiBlocking, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiBlocking:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiNamedEvent,obj_h); + visit_object(itr, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiGenScope) { + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiProtected, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; + if (const int n = vpi_get(vpiImplicitDecl, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiProcess,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProcess", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimitive,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimitiveArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimitiveArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiArrayNet,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModule,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModule", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiModuleArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiModuleArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDefParam,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDefParam", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiGenScopeArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiProgram,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgram", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiProgramArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInterface,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInterface", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInterfaceArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInterfaceArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAliasStmt,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAliasStmt", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiClockingBlock,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAssertion,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiUdpDefn) { + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + if (const int n = vpi_get(vpiProtected, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; + if (const int n = vpi_get(vpiPrimType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPrimType:" << n << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiIODecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTableEntry,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTableEntry", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInitial,obj_h); + visit_object(itr, subobject_indent, "vpiInitial", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiNetBit) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiExpanded, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; + if (const int n = vpi_get(vpiImplicitDecl, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; + if (const int n = vpi_get(vpiResolvedNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitScalared, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + if (const int n = vpi_get(vpiChargeStrength, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitVectored, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiSimNet,obj_h); + visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPathTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTchkTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiDelayTerm) { + + + return; + } + if (objectType == vpiSequenceInst) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const int n = vpi_get(vpiStartLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; + if (const int n = vpi_get(vpiColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; + if (const int n = vpi_get(vpiEndLine, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; + if (const int n = vpi_get(vpiEndColumn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiSequenceDecl,obj_h); + visit_object(itr, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingBlock,obj_h); + visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiArgument,obj_h); + visit_object(itr, subobject_indent, "vpiArgument", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiShortIntTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiTimeVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiThread) { + + + return; + } + if (objectType == vpiInitial) { + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiDoWhile) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiCondition,obj_h); + visit_object(itr, subobject_indent, "vpiCondition", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiStringTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiSysTaskCall) { + if (const int n = vpi_get(vpiUserDefn, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiUserDefn:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiUserSystf,obj_h); + visit_object(itr, subobject_indent, "vpiUserSystf", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiArgument,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiArgument", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiModPath) { + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiForeachStmt) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiVariables,obj_h); + visit_object(itr, subobject_indent, "vpiVariables", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiLoopVars,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoopVars", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiStmt,obj_h); + visit_object(itr, subobject_indent, "vpiStmt", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiAssignment) { + if (const int n = vpi_get(vpiOpType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiOpType:" << n << "\n"; + if (const int n = vpi_get(vpiBlocking, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiBlocking:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLhs,obj_h); + visit_object(itr, subobject_indent, "vpiLhs", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiDelayControl,obj_h); + visit_object(itr, subobject_indent, "vpiDelayControl", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiEventControl,obj_h); + visit_object(itr, subobject_indent, "vpiEventControl", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRepeatControl,obj_h); + visit_object(itr, subobject_indent, "vpiRepeatControl", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRhs,obj_h); + visit_object(itr, subobject_indent, "vpiRhs", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiStructNet) { + if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiExpanded, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; + if (const int n = vpi_get(vpiImplicitDecl, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; + if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; + if (const int n = vpi_get(vpiNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; + if (const int n = vpi_get(vpiResolvedNetType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitScalared, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + if (const int n = vpi_get(vpiChargeStrength, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const int n = vpi_get(vpiExplicitVectored, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiMember,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMember", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLocalLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiSimNet,obj_h); + visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPathTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTchkTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiTimeTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiContinue) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiPackedArrayVar) { + if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiConstantSelect, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; + if (const int n = vpi_get(vpiPacked, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPacked:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiRange,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRange", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiBit,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiBit", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiElement,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiElement", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiRegArray) { + if (const int n = vpi_get(vpiIsMemory, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsMemory:" << n << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiLeftRange,obj_h); + visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiRightRange,obj_h); + visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiMemoryWord,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemoryWord", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiBegin) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_iterate(vpiStmt,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiStmt", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiRealTypespec) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiTypedefAlias,obj_h); + visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiUdp) { + if (const char* s = vpi_get_str(vpiDefName, obj_h)) + stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + s_vpi_delay delay; + vpi_get_delays(obj_h, &delay); + if (delay.da != nullptr) { + stream_indent(out, indent) << visit_delays(&delay); + } + if (const int n = vpi_get(vpiPrimType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiPrimType:" << n << "\n"; + if (const int n = vpi_get(vpiStrength0, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; + if (const int n = vpi_get(vpiStrength1, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_handle(vpiUdpDefn,obj_h); + visit_object(itr, subobject_indent, "vpiUdpDefn", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiDelay,obj_h); + visit_object(itr, subobject_indent, "vpiDelay", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiIndex,obj_h); + visit_object(itr, subobject_indent, "vpiIndex", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiLongIntVar) { + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + if (const int n = vpi_get(vpiArrayMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; + if (const int n = vpi_get(vpiSigned, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; + if (const int n = vpi_get(vpiAutomatic, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; + if (const int n = vpi_get(vpiAllocScheme, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; + if (const int n = vpi_get(vpiConstantVariable, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; + if (const int n = vpi_get(vpiIsRandomized, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; + if (const int n = vpi_get(vpiRandType, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; + if (const int n = vpi_get(vpiStructUnionMember, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; + if (const int n = vpi_get(vpiScalar, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; + if (const int n = vpi_get(vpiVisibility, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; + if (const int n = vpi_get(vpiVector, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiVector:" << n << "\n"; + if (const char* s = vpi_get_str(vpiDecompile, obj_h)) + stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; + if (const int n = vpi_get(vpiSize, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiSize:" << n << "\n"; + s_vpi_value value; + vpi_get_value(obj_h, &value); + if (value.format) { + std::string val = visit_value(&value); + if (!val.empty()) { + stream_indent(out, indent) << val; + } + } + + vpiHandle itr; + itr = vpi_iterate(vpiPortInst,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiScope,obj_h); + visit_object(itr, subobject_indent, "vpiScope", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiExpr,obj_h); + visit_object(itr, subobject_indent, "vpiExpr", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiIndex,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiIndex", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPrimTerm,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiContAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPathTerm,obj_h); + visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiTchkTerm,obj_h); + visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiDriver,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiDriver", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLoad,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLoad", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiTypespec,obj_h); + visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); + release_handle(itr); + + return; + } + if (objectType == vpiClockingBlock) { + if (const int n = vpi_get(vpiInputEdge, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiInputEdge:" << n << "\n"; + if (const int n = vpi_get(vpiOutputEdge, obj_h)) + if (n != -1) + stream_indent(out, indent) << "|vpiOutputEdge:" << n << "\n"; + if (const char* s = vpi_get_str(vpiName, obj_h)) + stream_indent(out, indent) << "|vpiName:" << s << "\n"; + if (const char* s = vpi_get_str(vpiFullName, obj_h)) + stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; + + vpiHandle itr; + itr = vpi_handle(vpiInstance,obj_h); + visit_object(itr, subobject_indent, "vpiInstance", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiInputSkew,obj_h); + visit_object(itr, subobject_indent, "vpiInputSkew", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiOutputSkew,obj_h); + visit_object(itr, subobject_indent, "vpiOutputSkew", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiClockingEvent,obj_h); + visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiClockingIODecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClockingIODecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_handle(vpiPrefix,obj_h); + visit_object(itr, subobject_indent, "vpiPrefix", visited, out ); + release_handle(itr); + itr = vpi_handle(vpiActual,obj_h); + visit_object(itr, subobject_indent, "vpiActual", visited, out ); + release_handle(itr); + itr = vpi_iterate(vpiConcurrentAssertions,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVariables,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVariables", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiInternalScope,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiTypedef,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiPropertyDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiSequenceDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEvent,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiNamedEventArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiReg,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiReg", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiRegArray,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiMemory,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiMemory", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParamAssign,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiLetDecl,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiAttribute,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiParameter,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiParameter", visited, out ); + release_handle(obj); + } + release_handle(itr); + itr = vpi_iterate(vpiImport,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiImport", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + if (objectType == vpiMulticlockSequenceExpr) { + + vpiHandle itr; + itr = vpi_iterate(vpiClockedSeq,obj_h); + while (vpiHandle obj = vpi_scan(itr) ) { + visit_object(obj, subobject_indent, "vpiClockedSeq", visited, out ); + release_handle(obj); + } + release_handle(itr); + + return; + } + +} + +// Public interface +void visit_designs (const std::vector& designs, std::ostream &out) { + for (auto design : designs) { + VisitedContainer visited; + visit_object(design, 0, "", &visited, out); + } +} + +std::string visit_designs (const std::vector& designs) { + std::stringstream out; + visit_designs(designs, out); + return out.str(); +} + +}; + +void vpi_show_ids(bool show) { + showIDs = show; +} + +static std::stringstream the_output; + +extern "C" { + void vpi_decompiler (vpiHandle design) { + std::vector designs; + designs.push_back(design); + UHDM::visit_designs(designs, the_output); + std::cout << the_output.str().c_str() << std::endl; + } + +} From b58d1208aaa431a7577b80b780fb994bc8b90083 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 24 Jun 2021 17:45:45 +0200 Subject: [PATCH 390/845] Add missing Makefile.inc Signed-off-by: Karol Gugala --- uhdm-plugin/Makefile.inc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 uhdm-plugin/Makefile.inc diff --git a/uhdm-plugin/Makefile.inc b/uhdm-plugin/Makefile.inc new file mode 100644 index 000000000..ddd8e8f94 --- /dev/null +++ b/uhdm-plugin/Makefile.inc @@ -0,0 +1,15 @@ + +OBJS += frontends/uhdm/UhdmAst.o +OBJS += frontends/uhdm/uhdmastreport.o +OBJS += frontends/uhdm/uhdmastfrontend.o +OBJS += frontends/uhdm/vpivisitor.o + +UHDM_INSTALL_DIR ?= $(PREFIX) + +#*** UHDM *** +CPPFLAGS += -std=c++14 -I${UHDM_INSTALL_DIR}/include/uhdm \ + -I${UHDM_INSTALL_DIR}/include/uhdm/include \ + -I${UHDM_INSTALL_DIR}/include/uhdm/headers +CXXFLAGS += -Wno-inconsistent-missing-override +LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib +LDLIBS += -luhdm -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread From 454917ac432ea7c154363645c8485e5016cea40e Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 25 Jun 2021 14:57:57 +0200 Subject: [PATCH 391/845] Update Uhdm plugin to newest version Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 719 +++++++++++++++++++++++++++--------- uhdm-plugin/UhdmAst.h | 7 + uhdm-plugin/uhdmastshared.h | 7 +- 3 files changed, 550 insertions(+), 183 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5d4b54177..e6e03eed7 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -80,15 +80,46 @@ void UhdmAst::visit_range(vpiHandle obj_h, void UhdmAst::visit_default_expr(vpiHandle obj_h) { if (vpi_handle(vpiExpr, obj_h)) { auto mod = find_ancestor({AST::AST_MODULE}); - auto initial_node = new AST::AstNode(AST::AST_INITIAL); - auto block_node = new AST::AstNode(AST::AST_BLOCK); + AST::AstNode* initial_node = nullptr; + AST::AstNode* block_node = nullptr; auto assign_node = new AST::AstNode(AST::AST_ASSIGN_EQ); auto id_node = new AST::AstNode(AST::AST_IDENTIFIER); - id_node->str = parent->current_node->str; - initial_node->children.push_back(block_node); - block_node->children.push_back(assign_node); + id_node->str = current_node->str; + + for (auto child : mod->children) { + if (child->type == AST::AST_INITIAL) { + initial_node = child; + break; + } + } + // Ensure single AST_INITIAL node is located in AST_MODULE + // before any AST_ALWAYS + if (initial_node == nullptr) { + initial_node = new AST::AstNode(AST::AST_INITIAL); + + auto insert_it = find_if(mod->children.begin(), mod->children.end(), + [] (AST::AstNode *node) {return (node->type == AST::AST_ALWAYS);} ); + + mod->children.insert(insert_it, 1, initial_node); + } + // Ensure single AST_BLOCK node in AST_INITIAL + if (initial_node->children.size() && initial_node->children[0]) { + block_node = initial_node->children[0]; + } else { + block_node = new AST::AstNode(AST::AST_BLOCK); + initial_node->children.push_back(block_node); + } + auto block_child = block_node->children.begin(); + for (;block_child != block_node->children.end(); block_child++) { + if ((*block_child)->type == AST::AST_ASSIGN_EQ) { + break; + } + } + // Insert AST_ASSIGN_EQ nodes that came from + // custom_var or int_var before any other AST_ASSIGN_EQ + // Especially before ones explicitly placed in initial block in source code + block_node->children.insert(block_child, 1, assign_node); assign_node->children.push_back(id_node); - mod->children.push_back(initial_node); UhdmAst initial_ast(parent, shared, indent); initial_ast.current_node = initial_node; UhdmAst block_ast(&initial_ast, shared, indent); @@ -124,9 +155,10 @@ AST::AstNode* UhdmAst::process_value(vpiHandle obj_h) { // so we are treating here UInt in the same way as if they would be Int case vpiUIntVal: case vpiIntVal: { - auto size = vpi_get(vpiSize, obj_h); - if (size == 0) size = 64; - return AST::AstNode::mkconst_int(val.value.integer, true, size); + auto size = vpi_get(vpiSize, obj_h); + auto c = AST::AstNode::mkconst_int(val.value.integer, true, size ? size : 64); + if (size == 0) c->is_unsized = true; + return c; } case vpiRealVal: return AST::AstNode::mkconst_real(val.value.real); case vpiStringVal: return AST::AstNode::mkconst_str(val.value.str); @@ -163,7 +195,12 @@ AST::AstNode* UhdmAst::make_ast_node(AST::AstNodeType type, std::vectorstr = name; } else if (auto name = vpi_get_str(vpiFullName, obj_h)) { - node->str = name; + std::string s = std::string(name); + if (s.rfind(".") != std::string::npos) { + node->str = s.substr(s.rfind(".") + 1); + } else { + node->str = s; + } } sanitize_symbol_name(node->str); if (auto filename = vpi_get_str(vpiFile, obj_h)) { @@ -217,14 +254,51 @@ static void add_or_replace_child(AST::AstNode* parent, AST::AstNode* child) { *it = child; return; } + parent->children.push_back(child); + } else if (child->type == AST::AST_INITIAL) { + // Special case for initials + // Ensure that there is only one AST_INITIAL in the design + // And there is only one AST_BLOCK inside that initial + // Copy nodes from child initial to parent initial + auto initial_node_it = find_if(parent->children.begin(), parent->children.end(), + [] (AST::AstNode *node) {return (node->type == AST::AST_INITIAL);} ); + if (initial_node_it != parent->children.end()) { + AST::AstNode* initial_node = *initial_node_it; + + log_assert(!(initial_node->children.empty())); + log_assert(initial_node->children[0]->type == AST::AST_BLOCK); + log_assert(!(child->children.empty())); + log_assert(child->children[0]->type == AST::AST_BLOCK); + + AST::AstNode* block_node = initial_node->children[0]; + AST::AstNode* child_block_node = child->children[0]; + + // Place the contents of child block node inside parent block + for (auto child_block_child : child_block_node->children) + block_node->children.push_back(child_block_child->clone()); + // Place the remaining contents of child initial node inside the parent initial + for (auto initial_child = child->children.begin() + 1; initial_child != child->children.end(); ++initial_child) { + initial_node->children.push_back((*initial_child)->clone()); + } + } else { + // Parent AST_INITIAL does not exist + // Place child AST_INITIAL before AST_ALWAYS if found + auto insert_it = find_if(parent->children.begin(), parent->children.end(), + [] (AST::AstNode *node) {return (node->type == AST::AST_ALWAYS);} ); + parent->children.insert(insert_it, 1, child); + } + } else { + parent->children.push_back(child); } - parent->children.push_back(child); } void UhdmAst::make_cell(vpiHandle obj_h, AST::AstNode* cell_node, AST::AstNode* type_node) { - auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); - typeNode->str = strip_package_name(type_node->str); - cell_node->children.insert(cell_node->children.begin(), typeNode); + if (cell_node->children.size() == 0 || + (cell_node->children.size() > 1 && cell_node->children[0]->type != AST::AST_CELLTYPE)) { + auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); + typeNode->str = type_node->str; + cell_node->children.insert(cell_node->children.begin(), typeNode); + } // Add port connections as arguments vpiHandle port_itr = vpi_iterate(vpiPort, obj_h); while (vpiHandle port_h = vpi_scan(port_itr) ) { @@ -255,12 +329,9 @@ void UhdmAst::add_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { auto typedef_node = new AST::AstNode(AST::AST_TYPEDEF); typedef_node->location = type_node->location; typedef_node->filename = type_node->filename; - typedef_node->str = type_node->str; - if (current_node->type == AST::AST_PACKAGE) { - shared.type_names[type_node] = current_node->str + "::" + type_node->str.substr(1); - } else { - shared.type_names[type_node] = type_node->str; - } + typedef_node->str = strip_package_name(type_node->str); + if (std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(type_node->str, current_node->str)) != shared.type_names.end()) return; + shared.type_names.push_back(std::make_pair(type_node->str, current_node->str)); type_node = type_node->clone(); if (type_node->type == AST::AST_STRUCT) { type_node->str.clear(); @@ -279,6 +350,10 @@ void UhdmAst::add_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { typedef_node->children.push_back(wire_node); current_node->children.push_back(type_node); current_node->children.push_back(typedef_node); + } else { + type_node->str.clear(); + typedef_node->children.push_back(type_node); + current_node->children.push_back(typedef_node); } } @@ -295,11 +370,12 @@ AST::AstNode* UhdmAst::find_ancestor(const std::unordered_set& return nullptr; } + void UhdmAst::process_design() { current_node = make_ast_node(AST::AST_DESIGN); visit_one_to_many({UHDM::uhdmallInterfaces, - UHDM::uhdmallModules, UHDM::uhdmallPackages, + UHDM::uhdmallModules, UHDM::uhdmtopModules}, obj_h, [&](AST::AstNode* node) { @@ -325,6 +401,12 @@ void UhdmAst::process_parameter() { auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; current_node = make_ast_node(type); //if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused + std::vector range_nodes; + visit_range(obj_h, + [&](AST::AstNode* node) { + if (node) + range_nodes.push_back(node); + }); vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); if (typespec_h) { int typespec_type = vpi_get(vpiType, typespec_h); @@ -334,7 +416,7 @@ void UhdmAst::process_parameter() { current_node->is_logic = true; visit_range(typespec_h, [&](AST::AstNode* node) { - current_node->children.push_back(node); + range_nodes.push_back(node); }); shared.report.mark_handled(typespec_h); break; @@ -349,7 +431,7 @@ void UhdmAst::process_parameter() { visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode* node) { - shared.param_types[current_node] = node; + shared.param_types[current_node->str] = node; }); break; } @@ -370,6 +452,14 @@ void UhdmAst::process_parameter() { current_node->children.push_back(constant_node); } } + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = range_nodes; + current_node->children.push_back(multirange_node); + } else if (range_nodes.size() == 1) { + current_node->children.push_back(range_nodes[0]); + } } void UhdmAst::process_port() { @@ -413,6 +503,7 @@ void UhdmAst::process_port() { shared.report.mark_handled(actual_h); break; } + case vpiLogicVar: case vpiLogicNet: { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, actual_h); @@ -424,11 +515,40 @@ void UhdmAst::process_port() { shared.report.mark_handled(actual_h); break; } + case vpiPackedArrayVar: + visit_one_to_many({vpiElement}, + actual_h, + [&](AST::AstNode* node) { + if (node && GetSize(node->children) == 1) + current_node->children.push_back(node->children[0]); + }); + visit_one_to_many({vpiRange}, + actual_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + shared.report.mark_handled(actual_h); + break; + case vpiPackedArrayNet: + visit_one_to_many({vpiRange}, + actual_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + shared.report.mark_handled(actual_h); + break; + case vpiArrayVar: + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); + shared.report.mark_handled(actual_h); + break; case vpiEnumNet: case vpiStructNet: case vpiArrayNet: case vpiStructVar: case vpiEnumVar: + case vpiIntVar: break; default: { const uhdm_handle* const handle = (const uhdm_handle*) actual_h; @@ -443,10 +563,18 @@ void UhdmAst::process_port() { visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode* node) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = shared.type_names[node]; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type=true; + if (node && node->str != "") { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type=true; + } else { + // anonymous typedef, just move childrens + for (auto child : node->children) { + current_node->children.push_back(child->clone()); + } + } }); if (const int n = vpi_get(vpiDirection, obj_h)) { if (n == vpiInput) { @@ -463,20 +591,21 @@ void UhdmAst::process_port() { void UhdmAst::process_module() { std::string type = vpi_get_str(vpiDefName, obj_h); std::string name = vpi_get_str(vpiName, obj_h) ? vpi_get_str(vpiName, obj_h) : type; + bool cell_instance = type == name; sanitize_symbol_name(type); sanitize_symbol_name(name); type = strip_package_name(type); name = strip_package_name(name); - if (name == type) { + if (cell_instance) { if (shared.top_nodes.find(type) != shared.top_nodes.end()) { current_node = shared.top_nodes[type]; visit_one_to_many({vpiModule, vpiInterface, vpiParameter, vpiParamAssign, + vpiPort, vpiNet, vpiArrayNet, - vpiPort, vpiGenScopeArray, vpiContAssign, vpiVariables}, @@ -490,7 +619,6 @@ void UhdmAst::process_module() { } else { current_node = make_ast_node(AST::AST_MODULE); current_node->str = type; - current_node->attributes[ID::hdlname] = AST::AstNode::mkconst_str(current_node->str); shared.top_nodes[current_node->str] = current_node; current_node->attributes[ID::partial] = AST::AstNode::mkconst_int(1, false, 1); visit_one_to_many({vpiTypedef}, @@ -504,9 +632,9 @@ void UhdmAst::process_module() { vpiInterface, vpiParameter, vpiParamAssign, + vpiPort, vpiNet, vpiArrayNet, - vpiPort, vpiGenScopeArray, vpiContAssign, vpiProcess, @@ -547,59 +675,41 @@ void UhdmAst::process_module() { if (attr->integer == 1) module_node->attributes.erase(ID::partial); } - visit_one_to_many({vpiVariables, - vpiNet, - vpiArrayNet}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - add_or_replace_child(module_node, node); - } - }); - visit_one_to_many({vpiInterface, - vpiModule, - vpiPort, - vpiGenScopeArray}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - auto it = std::find_if(module_node->children.begin(), - module_node->children.end(), - [node](AST::AstNode* existing_child) { - return existing_child->str == node->str; - }); - if (it != module_node->children.end() && node->children.size() > 0 && node->children[0]->type == AST::AST_WIRETYPE) { - for (auto *c : node->children) { - if (c->type != AST::AST_WIRETYPE) { //do not override wiretype - (*it)->children.push_back(c); - } - } - } else { - add_or_replace_child(module_node, node); - } - } - }); std::string module_parameters; visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode* node) { if (node) { - if (std::find_if(module_node->children.begin(), module_node->children.end(), - [&](AST::AstNode *child)->bool { return child->type == AST::AST_PARAMETER && - child->str == node->str && - //skip real parameters as they are currently not working: https://github.com/alainmarcel/Surelog/issues/1035 - child->children[0]->type != AST::AST_REALVALUE; }) - != module_node->children.end()) { - if (cell_instance || (node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT)) { //if cell is a blackbox or we need to siplify parameter first, left setting parameters to yosys - auto clone = node->clone(); - clone->type = AST::AST_PARASET; - current_node->children.push_back(clone); + auto parent_node = std::find_if(module_node->children.begin(), module_node->children.end(), + [&](AST::AstNode *child)->bool { return ((child->type == AST::AST_PARAMETER) || (child->type == AST::AST_LOCALPARAM)) && + child->str == node->str && + //skip real parameters as they are currently not working: https://github.com/alainmarcel/Surelog/issues/1035 + child->type != AST::AST_REALVALUE;}); + if (parent_node != module_node->children.end()) { + if ((*parent_node)->type == AST::AST_PARAMETER) { + if (cell_instance || (node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT)) { //if cell is a blackbox or we need to simplify parameter first, left setting parameters to yosys + // We only want to add AST_PARASET for parameters that is different than already set + // to match the name yosys gives to the module. + // Note: this should also be applied for other (not only cell_instance) modules + // but as we are using part of the modules parsed by sv2v and other + // part by uhdm, we need to always rename module if it is parametrized, + // Otherwise, verilog frontend can use module parsed by uhdm and try to set + // parameters, but this module would be already parametrized + if ((node->children[0]->integer != (*parent_node)->children[0]->integer || + node->children[0]->str != (*parent_node)->children[0]->str)) { + auto clone = node->clone(); + clone->type = AST::AST_PARASET; + current_node->children.push_back(clone); + } + } else { + if (node->children[0]->str != "") + module_parameters += node->str + "=" + node->children[0]->str; + else + module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); + //replace + add_or_replace_child(module_node, node); + } } else { - if (node->children[0]->str != "") - module_parameters += node->str + "=" + node->children[0]->str; - else - module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); - //replace add_or_replace_child(module_node, node); } } @@ -610,9 +720,30 @@ void UhdmAst::process_module() { module_node->str = "$paramod$" + sha1(module_parameters) + type; else if(module_parameters != "") module_node->str = "$paramod" + type + module_parameters; - //add new module to templates and top nodes + auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); + typeNode->str = module_node->str; + current_node->children.insert(current_node->children.begin(), typeNode); shared.top_node_templates[module_node->str] = module_node; shared.top_nodes[module_node->str] = module_node; + visit_one_to_many({vpiVariables, + vpiNet, + vpiArrayNet}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + add_or_replace_child(module_node, node); + } + }); + visit_one_to_many({vpiInterface, + vpiModule, + vpiPort, + vpiGenScopeArray}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + add_or_replace_child(module_node, node); + } + }); make_cell(obj_h, current_node, module_node); } } @@ -626,6 +757,17 @@ void UhdmAst::process_struct_typespec() { }); } +void UhdmAst::process_packed_array_typespec() { + current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_one({vpiElemTypespec}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->str = node->str; + } + }); +} + void UhdmAst::process_typespec_member() { current_node = make_ast_node(AST::AST_STRUCT_ITEM); current_node->str = current_node->str.substr(1); @@ -662,6 +804,15 @@ void UhdmAst::process_typespec_member() { }); break; } + case vpiPackedArrayTypespec: + visit_one_to_one({vpiTypespec}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->str = node->str; + } + }); + break; default: { const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; @@ -681,31 +832,33 @@ void UhdmAst::process_enum_typespec() { current_node->children.push_back(node); }); vpiHandle typespec_h = vpi_handle(vpiBaseTypespec, obj_h); - int typespec_type = vpi_get(vpiType, typespec_h); - switch (typespec_type) { - case vpiLogicTypespec: { - current_node->is_logic = true; - visit_range(typespec_h, - [&](AST::AstNode* node) { - for (auto child : current_node->children) { - child->children.push_back(node->clone()); - } - }); - shared.report.mark_handled(typespec_h); - break; - } - case vpiIntTypespec: { - current_node->is_signed = true; - shared.report.mark_handled(typespec_h); - break; - } - default: { - const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; - const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("Encountered unhandled typespec in process_enum_typespec: '%s' of type '%s' at %s:%d\n", - object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str(), object->VpiFile().c_str(), - object->VpiLineNo()); - break; + if (typespec_h) { + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiLogicTypespec: { + current_node->is_logic = true; + visit_range(typespec_h, + [&](AST::AstNode* node) { + for (auto child : current_node->children) { + child->children.push_back(node->clone()); + } + }); + shared.report.mark_handled(typespec_h); + break; + } + case vpiIntTypespec: { + current_node->is_signed = true; + shared.report.mark_handled(typespec_h); + break; + } + default: { + const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; + const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; + report_error("Encountered unhandled typespec in process_enum_typespec: '%s' of type '%s' at %s:%d\n", + object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str(), object->VpiFile().c_str(), + object->VpiLineNo()); + break; + } } } } @@ -731,11 +884,12 @@ void UhdmAst::process_custom_var() { current_node->children = std::move(node->children); } else { // custom var in gen scope have definition with declaration - if (shared.type_names.count(node) == 0 && node->children.size() > 0) { - add_typedef(find_ancestor({AST::AST_GENBLOCK, AST::AST_BLOCK}), node); + auto *parent = find_ancestor({AST::AST_GENBLOCK, AST::AST_BLOCK}); + if (parent && std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(node->str, parent->str)) == shared.type_names.end() && node->children.size() > 0) { + add_typedef(parent, node); } auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = shared.type_names[node]; + wiretype_node->str = node->str; current_node->children.push_back(wiretype_node); } }); @@ -756,6 +910,19 @@ void UhdmAst::process_int_var() { visit_default_expr(obj_h); } +void UhdmAst::process_real_var() { + auto module_node = find_ancestor({AST::AST_MODULE}); + auto wire_node = make_ast_node(AST::AST_WIRE); + auto left_const = AST::AstNode::mkconst_int(63, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); + wire_node->children.push_back(range); + wire_node->is_signed = true; + module_node->children.push_back(wire_node); + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_default_expr(obj_h); +} + void UhdmAst::process_array_var() { current_node = make_ast_node(AST::AST_WIRE); vpiHandle itr = vpi_iterate(vpi_get(vpiType, obj_h) == vpiArrayVar ? @@ -776,21 +943,28 @@ void UhdmAst::process_array_var() { } vpi_free_object(itr); visit_one_to_many({vpiRange}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); + obj_h, + [&](AST::AstNode* node) { + current_node->children.push_back(node); + }); } void UhdmAst::process_param_assign() { - auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; - current_node = make_ast_node(type); + current_node = make_ast_node(AST::AST_PARAMETER); visit_one_to_one({vpiLhs}, obj_h, [&](AST::AstNode* node) { if (node) { + current_node->type = node->type; current_node->str = node->str; - shared.param_types[current_node] = shared.param_types[node]; + //Here we need to copy any ranges that is already present in lhs, + //but we want to skip actual value, as it is set in rhs + for (auto *c : node->children) { + if(c->type != AST::AST_CONSTANT) { + current_node->children.push_back(c->clone()); + } + } + shared.param_types[current_node->str] = shared.param_types[node->str]; } }); visit_one_to_one({vpiRhs}, @@ -802,8 +976,31 @@ void UhdmAst::process_param_assign() { }); } -void UhdmAst::process_cont_assign() { +void UhdmAst::process_cont_assign_var_init() { + current_node = make_ast_node(AST::AST_INITIAL); + auto block_node = make_ast_node(AST::AST_BLOCK); + auto assign_node = make_ast_node(AST::AST_ASSIGN_LE); + block_node->children.push_back(assign_node); + current_node->children.push_back(block_node); + + visit_one_to_one({vpiLhs, + vpiRhs}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + if (node->type == AST::AST_WIRE) { + assign_node->children.push_back(new AST::AstNode(AST::AST_IDENTIFIER)); + assign_node->children.back()->str = node->str; + } else { + assign_node->children.push_back(node); + } + } + }); +} + +void UhdmAst::process_cont_assign_net() { current_node = make_ast_node(AST::AST_ASSIGN); + visit_one_to_one({vpiLhs, vpiRhs}, obj_h, @@ -819,6 +1016,24 @@ void UhdmAst::process_cont_assign() { }); } +void UhdmAst::process_cont_assign() { + auto net_decl_assign = vpi_get(vpiNetDeclAssign, obj_h); + vpiHandle node_lhs_h = vpi_handle(vpiLhs, obj_h); + auto lhs_net_type = vpi_get(vpiNetType, node_lhs_h); + + // Check if lhs is a subtype of a net + bool isNet; + if (lhs_net_type >= vpiWire && lhs_net_type <= vpiUwire) + isNet = true; + else + // lhs is a variable + isNet = false; + if (net_decl_assign && !isNet) + process_cont_assign_var_init(); + else + process_cont_assign_net(); +} + void UhdmAst::process_assignment() { auto type = vpi_get(vpiBlocking, obj_h) == 1 ? AST::AST_ASSIGN_EQ : AST::AST_ASSIGN_LE; current_node = make_ast_node(type); @@ -830,6 +1045,12 @@ void UhdmAst::process_assignment() { current_node->children.push_back(node); } }); + if (current_node->children.size() == 1 && current_node->children[0]->type == AST::AST_WIRE) { + auto top_node = find_ancestor({AST::AST_MODULE}); + if (!top_node) return; + top_node->children.push_back(current_node->children[0]->clone()); + current_node = nullptr; + } } void UhdmAst::process_net() { @@ -839,6 +1060,17 @@ void UhdmAst::process_net() { current_node->is_output = net_type == vpiOutput; current_node->is_logic = !current_node->is_reg; current_node->is_signed = vpi_get(vpiSigned, obj_h); + visit_one_to_one({vpiTypespec}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type=true; + } + }); visit_range(obj_h, [&](AST::AstNode* node) { current_node->children.push_back(node); @@ -855,6 +1087,7 @@ void UhdmAst::process_packed_array_net() { [&](AST::AstNode* node) { if (node && GetSize(node->children) == 1) current_node->children.push_back(node->children[0]); + current_node->is_custom_type = node->is_custom_type; }); visit_one_to_many({vpiRange}, obj_h, @@ -866,7 +1099,8 @@ void UhdmAst::process_array_net() { current_node = make_ast_node(AST::AST_WIRE); vpiHandle itr = vpi_iterate(vpiNet, obj_h); while (vpiHandle net_h = vpi_scan(itr)) { - if (vpi_get(vpiType, net_h) == vpiLogicNet) { + auto net_type = vpi_get(vpiType, net_h); + if (net_type == vpiLogicNet) { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, net_h); visit_range(net_h, @@ -874,6 +1108,16 @@ void UhdmAst::process_array_net() { current_node->children.push_back(node); }); shared.report.mark_handled(net_h); + } else if (net_type == vpiStructNet) { + vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h); + std::string name = vpi_get_str(vpiName, typespec_h); + sanitize_symbol_name(name); + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = name; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + shared.report.mark_handled(net_h); + shared.report.mark_handled(typespec_h); } vpi_free_object(net_h); } @@ -971,7 +1215,7 @@ void UhdmAst::process_io_decl() { visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode* node) { - current_node = node; + current_node = node; }); if (current_node == nullptr) { current_node = make_ast_node(AST::AST_MODPORTMEMBER); @@ -980,6 +1224,22 @@ void UhdmAst::process_io_decl() { current_node->children.push_back(node); }); } + visit_one_to_one({vpiTypedef}, + obj_h, + [&](AST::AstNode* node) { + if (node && node->str != "") { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type=true; + } else { + // anonymous typedef, just move childrens + for (auto child : node->children) { + current_node->children.push_back(child->clone()); + } + } + }); if (const int n = vpi_get(vpiDirection, obj_h)) { if (n == vpiInput) { current_node->is_input = true; @@ -998,7 +1258,13 @@ void UhdmAst::process_always() { obj_h, [&](AST::AstNode* node) { if (node) { - current_node->children.push_back(node); + AST::AstNode* block = nullptr; + if (node->type != AST::AST_BLOCK) { + block = new AST::AstNode(AST::AST_BLOCK, node); + } else { + block = node; + } + current_node->children.push_back(block); } }); switch (vpi_get(vpiAlwaysType, obj_h)) { @@ -1055,7 +1321,7 @@ void UhdmAst::process_begin() { obj_h, [&](AST::AstNode* node) { if (node) { - if (node->type == AST::AST_ASSIGN_EQ && node->children.size() == 1) { + if ((node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) && node->children.size() == 1) { auto func_node = find_ancestor({AST::AST_FUNCTION, AST::AST_TASK}); if (!func_node) return; auto wire_node = new AST::AstNode(AST::AST_WIRE); @@ -1098,13 +1364,13 @@ void UhdmAst::process_operation() { case vpiUnaryXNorOp: current_node->type = AST::AST_REDUCE_XNOR; break; case vpiUnaryNandOp: { current_node->type = AST::AST_REDUCE_AND; - auto not_node = new AST::AstNode(AST::AST_BIT_NOT, current_node); + auto not_node = new AST::AstNode(AST::AST_LOGIC_NOT, current_node); current_node = not_node; break; } case vpiUnaryNorOp: { current_node->type = AST::AST_REDUCE_OR; - auto not_node = new AST::AstNode(AST::AST_BIT_NOT, current_node); + auto not_node = new AST::AstNode(AST::AST_LOGIC_NOT, current_node); current_node = not_node; break; } @@ -1167,6 +1433,7 @@ void UhdmAst::process_operation() { current_node = concat_node; break; } + case vpiNullOp: current_node = nullptr; break; //do nothing default: { const uhdm_handle* const handle = (const uhdm_handle*) obj_h; const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; @@ -1182,13 +1449,20 @@ void UhdmAst::process_stream_op() { // Create a for loop that does what a streaming operator would do auto block_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL}); auto process_node = find_ancestor({AST::AST_ALWAYS, AST::AST_INITIAL}); - auto module_node = find_ancestor({AST::AST_MODULE}); + auto module_node = find_ancestor({AST::AST_MODULE, AST::AST_FUNCTION, AST::AST_PACKAGE}); + log_assert(module_node); if (!process_node) { - // Create a @* always block - process_node = make_ast_node(AST::AST_ALWAYS); - module_node->children.push_back(process_node); - block_node = make_ast_node(AST::AST_BLOCK); - process_node->children.push_back(block_node); + if (module_node->type != AST::AST_FUNCTION) { + // Create a @* always block + process_node = make_ast_node(AST::AST_ALWAYS); + module_node->children.push_back(process_node); + block_node = make_ast_node(AST::AST_BLOCK); + process_node->children.push_back(block_node); + } else { + // Create only block + block_node = make_ast_node(AST::AST_BLOCK); + module_node->children.push_back(block_node); + } } auto loop_id = shared.next_loop_id(); @@ -1199,26 +1473,35 @@ void UhdmAst::process_stream_op() { loop_counter->is_reg = true; loop_counter->is_signed = true; loop_counter->str = "\\loop" + std::to_string(loop_id) + "::i"; - module_node->children.push_back(loop_counter); + module_node->children.insert(module_node->children.end() - 1, loop_counter); auto loop_counter_ident = make_ast_node(AST::AST_IDENTIFIER); loop_counter_ident->str = loop_counter->str; - auto lhs_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ})->children[0]; - - // Width of LHS - auto bits_call = make_ast_node(AST::AST_FCALL, - {lhs_node->clone()}); - bits_call->str = "\\$bits"; - + auto lhs_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE})->children[0]; // Temp var to allow concatenation - auto temp_var = make_ast_node(AST::AST_WIRE, - {make_ast_node(AST::AST_RANGE, - {make_ast_node(AST::AST_SUB, - {bits_call, - AST::AstNode::mkconst_int(1, false)}), - AST::AstNode::mkconst_int(0, false)})}); + AST::AstNode *temp_var = nullptr; + AST::AstNode *bits_call = nullptr; + if (lhs_node->type == AST::AST_WIRE) { + module_node->children.insert(module_node->children.begin(), lhs_node->clone()); + temp_var = lhs_node->clone(); //if we already have wire as lhs, we want to create the same wire for temp_var + lhs_node->children.clear(); + lhs_node->type = AST::AST_IDENTIFIER; + bits_call = make_ast_node(AST::AST_FCALL, {lhs_node->clone()}); + bits_call->str = "\\$bits"; + } else { + // otherwise, we need to calculate size using bits fcall + bits_call = make_ast_node(AST::AST_FCALL, {lhs_node->clone()}); + bits_call->str = "\\$bits"; + temp_var = make_ast_node(AST::AST_WIRE, + {make_ast_node(AST::AST_RANGE, + {make_ast_node(AST::AST_SUB, + {bits_call, + AST::AstNode::mkconst_int(1, false)}), + AST::AstNode::mkconst_int(0, false)})}); + } + temp_var->str = "\\loop" + std::to_string(loop_id) + "::temp"; - module_node->children.push_back(temp_var); + module_node->children.insert(module_node->children.end() - 1, temp_var); auto temp_var_ident = make_ast_node(AST::AST_IDENTIFIER); temp_var_ident->str = temp_var->str; auto temp_assign = make_ast_node(AST::AST_ASSIGN_EQ, {temp_var_ident}); @@ -1364,7 +1647,7 @@ void UhdmAst::process_assignment_pattern_op() { // Find at what position in the concat should we place this node auto key = node->children[0]->str; key = key.substr(key.find('.') + 1); - auto param_type = shared.param_types[param_node]; + auto param_type = shared.param_types[param_node->str]; size_t pos = std::find_if(param_type->children.begin(), param_type->children.end(), [key](AST::AstNode* child) { return child->str == key; }) - param_type->children.begin(); @@ -1379,7 +1662,11 @@ void UhdmAst::process_assignment_pattern_op() { return; } auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); - auto proc_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL, AST::AST_MODULE, AST::AST_PACKAGE}); + + auto proc_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL, AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_CELL}); + if (proc_node && proc_node->type == AST::AST_CELL && shared.top_nodes.count(proc_node->children[0]->str)) { + proc_node = shared.top_nodes[proc_node->children[0]->str]; + } std::vector assignments; visit_one_to_many({vpiOperand}, obj_h, @@ -1477,6 +1764,8 @@ void UhdmAst::process_indexed_part_select() { [&](AST::AstNode* node) { current_node->str = node->str; }); + //TODO: check if there are other types, for now only handle 1 and 2 (+: and -:) + auto indexed_part_select_type = vpi_get(vpiIndexedPartSelectType, obj_h) == 1 ? AST::AST_ADD : AST::AST_SUB; auto range_node = new AST::AstNode(AST::AST_RANGE); range_node->filename = current_node->filename; range_node->location = current_node->location; @@ -1488,16 +1777,18 @@ void UhdmAst::process_indexed_part_select() { visit_one_to_one({vpiWidthExpr}, obj_h, [&](AST::AstNode* node) { - auto right_range_node = new AST::AstNode(AST::AST_ADD); + auto right_range_node = new AST::AstNode(indexed_part_select_type); right_range_node->children.push_back(range_node->children[0]->clone()); right_range_node->children.push_back(node); - auto sub = new AST::AstNode(AST::AST_SUB); + auto sub = new AST::AstNode(indexed_part_select_type == AST::AST_ADD ? AST::AST_SUB : AST::AST_ADD); sub->children.push_back(right_range_node); sub->children.push_back(AST::AstNode::mkconst_int(1, false, 1)); range_node->children.push_back(sub); //range_node->children.push_back(right_range_node); }); - std::reverse(range_node->children.begin(), range_node->children.end()); + if (indexed_part_select_type == AST::AST_ADD) { + std::reverse(range_node->children.begin(), range_node->children.end()); + } current_node->children.push_back(range_node); } @@ -1528,13 +1819,12 @@ void UhdmAst::process_var_select() { } void UhdmAst::process_if_else() { - current_node = make_ast_node(AST::AST_BLOCK); - auto case_node = new AST::AstNode(AST::AST_CASE); + current_node = make_ast_node(AST::AST_CASE); visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode* node) { auto reduce_node = new AST::AstNode(AST::AST_REDUCE_BOOL, node); - case_node->children.push_back(reduce_node); + current_node->children.push_back(reduce_node); }); // If true: auto *condition = new AST::AstNode(AST::AST_COND); @@ -1547,7 +1837,7 @@ void UhdmAst::process_if_else() { statements->children.push_back(node); condition->children.push_back(statements); }); - case_node->children.push_back(condition); + current_node->children.push_back(condition); // Else: if (vpi_get(vpiType, obj_h) == vpiIfElse) { auto *condition = new AST::AstNode(AST::AST_COND); @@ -1560,9 +1850,8 @@ void UhdmAst::process_if_else() { statements->children.push_back(node); condition->children.push_back(statements); }); - case_node->children.push_back(condition); + current_node->children.push_back(condition); } - current_node->children.push_back(case_node); } void UhdmAst::process_for() { @@ -1576,9 +1865,11 @@ void UhdmAst::process_for() { [&](AST::AstNode* node) { if (node->type == AST::AST_ASSIGN_LE) node->type = AST::AST_ASSIGN_EQ; if (node->children[0]->type == AST::AST_WIRE) { - loop_parent_node->children.push_back(node->children[0]); - node->children[0] = node->children[0]->clone(); + auto *wire = node->children[0]->clone(); + wire->is_reg = true; + loop_parent_node->children.push_back(wire); node->children[0]->type = AST::AST_IDENTIFIER; + node->children[0]->is_signed = false; node->children[0]->children.clear(); } current_node->children.push_back(node); @@ -1597,10 +1888,13 @@ void UhdmAst::process_for() { visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode* node) { - auto *statements = new AST::AstNode(AST::AST_BLOCK); + auto *statements = make_ast_node(AST::AST_BLOCK); statements->children.push_back(node); current_node->children.push_back(statements); }); + //auto for_block = make_ast_node(AST::AST_BLOCK); + //for_block->str = ""; + //for_block->children.push_back(current_node); loop_parent_node->children.push_back(current_node); current_node = loop_parent_node; } @@ -1613,26 +1907,27 @@ void UhdmAst::process_gen_scope_array() { for (auto* child : genscope_node->children) { if (child->type == AST::AST_PARAMETER || child->type == AST::AST_LOCALPARAM) { - auto prev_name = child->str; - child->str = current_node->str + "::" + child->str.substr(1); + auto param_str = child->str.substr(1); + auto array_str = "[" + param_str + "]"; genscope_node->visitEachDescendant([&](AST::AstNode* node) { - auto pos = node->str.find("[" + prev_name.substr(1) + "]"); - if (node->str == prev_name) { - node->str = child->str; - } else if (pos != std::string::npos) { - node->str.replace(pos + 1, prev_name.size() - 1, child->str.substr(1)); + auto pos = node->str.find(array_str); + if (pos != std::string::npos) { + node->type = AST::AST_PREFIX; + auto *param = new AST::AstNode(AST::AST_IDENTIFIER); + param->str = child->str; + auto *field = new AST::AstNode(AST::AST_IDENTIFIER); + field->str = "\\" + node->str.substr(node->str.rfind("]") + 2); + node->str = node->str.substr(0, node->str.find("[")); + node->children.push_back(param); + node->children.push_back(field); } }); - } else if (child->type == AST::AST_CELL) { - child->str = current_node->str + "." + child->str.substr(1); } } current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); }); - // clear AST_GENBLOCK str field, to make yosys do not rename variables again - current_node->str = ""; } void UhdmAst::process_gen_scope() { @@ -1643,8 +1938,8 @@ void UhdmAst::process_gen_scope() { vpiNet, vpiArrayNet, vpiVariables, - vpiProcess, vpiContAssign, + vpiProcess, vpiModule, vpiGenScopeArray}, obj_h, @@ -1654,7 +1949,7 @@ void UhdmAst::process_gen_scope() { node->children.size() == 0) { return; //skip parameters without any children - } + } current_node->children.push_back(node); } }); @@ -1755,10 +2050,25 @@ void UhdmAst::process_function() { void UhdmAst::process_logic_var() { current_node = make_ast_node(AST::AST_WIRE); + //TODO: add const attribute, but it seems it is little more + //then just setting boolean value + //current_node->is_const = vpi_get(vpiConstantVariable, obj_h); + visit_one_to_one({vpiTypespec}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type=true; + } + }); visit_range(obj_h, [&](AST::AstNode* node) { current_node->children.push_back(node); }); + visit_default_expr(obj_h); } void UhdmAst::process_sys_func_call() { @@ -1789,6 +2099,10 @@ void UhdmAst::process_func_call() { obj_h, [&](AST::AstNode* node) { if (node) { + if (node->type == AST::AST_PARAMETER || + node->type == AST::AST_LOCALPARAM) { + node->type = AST::AST_IDENTIFIER; + } current_node->children.push_back(node); } }); @@ -1811,20 +2125,63 @@ void UhdmAst::process_hier_path() { visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode* node) { - if (current_node->str != "\\") { - current_node->str += "."; - } - current_node->str += node->str.substr(1); - if (node->children.size() > 0 && node->children[0]->type == AST::AST_RANGE) { - if (node->children[0]->children[0]->str != "") { - current_node->str += "[" + node->children[0]->children[0]->str.substr(1) + "]"; + if (current_node->str == "\\" && node->children.size() > 0 && node->children[0]->type == AST::AST_RANGE) { + current_node->type = AST::AST_PREFIX; + current_node->str = node->str; + current_node->children.push_back(node->children[0]->children[0]->clone()); + } else { + if (current_node->type == AST::AST_IDENTIFIER) { + if (current_node->str != "\\") { + current_node->str += "."; + } + current_node->str += node->str.substr(1); + current_node->children = node->children; } else { - current_node->str += "[" + std::to_string(node->children[0]->children[0]->integer) + "]"; + current_node->children.push_back(node->clone()); } } }); } +void UhdmAst::process_logic_typespec() { + current_node = make_ast_node(AST::AST_WIRE); + current_node->is_logic = true; + visit_range(obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); + if (current_node->str != "") { + add_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + } +} + +void UhdmAst::process_int_typespec() { + current_node = make_ast_node(AST::AST_WIRE); + auto left_const = AST::AstNode::mkconst_int(31, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); + current_node->children.push_back(range); + current_node->is_signed = true; + if (current_node->str != "") { + add_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + } +} + +void UhdmAst::process_bit_typespec() { + current_node = make_ast_node(AST::AST_WIRE); + visit_range(obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->children.push_back(node); + } + }); + if (current_node->str != "") { + add_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + } +} + AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { obj_h = obj_handle; const unsigned object_type = vpi_get(vpiType, obj_h); @@ -1836,7 +2193,7 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { } if (shared.visited.find(object) != shared.visited.end()) { - return shared.visited[object]; + return shared.visited[object]->clone(); } switch(object_type) { case vpiDesign: process_design(); break; @@ -1844,6 +2201,7 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { case vpiPort: process_port(); break; case vpiModule: process_module(); break; case vpiStructTypespec: process_struct_typespec(); break; + case vpiPackedArrayTypespec: process_packed_array_typespec(); break; case vpiTypespecMember: process_typespec_member(); break; case vpiEnumTypespec: process_enum_typespec(); break; case vpiEnumConst: process_enum_const(); break; @@ -1852,6 +2210,7 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { case vpiStructVar: case vpiStructNet: process_custom_var(); break; case vpiIntVar: process_int_var(); break; + case vpiRealVar: process_real_var(); break; case vpiPackedArrayVar: case vpiArrayVar: process_array_var(); break; case vpiParamAssign: process_param_assign(); break; @@ -1901,7 +2260,9 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { break; case vpiHierPath: process_hier_path(); break; case UHDM::uhdmimport: break; - case vpiLogicTypespec: break; // Probably a typedef; ignore + case vpiLogicTypespec: process_logic_typespec(); break; + case vpiIntTypespec: process_int_typespec(); break; + case vpiBitTypespec: process_bit_typespec(); break; case vpiProgram: default: report_error("Encountered unhandled object '%s' of type '%s' at %s:%d\n", object->VpiName().c_str(), UHDM::VpiTypeName(obj_h).c_str(), object->VpiFile().c_str(), object->VpiLineNo()); break; diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index cb7fb7c26..fe9b0f123 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -73,14 +73,18 @@ class UhdmAst { void process_port(); void process_module(); void process_struct_typespec(); + void process_packed_array_typespec(); void process_typespec_member(); void process_enum_typespec(); void process_enum_const(); void process_custom_var(); void process_int_var(); + void process_real_var(); void process_array_var(); void process_param_assign(); void process_cont_assign(); + void process_cont_assign_net(); + void process_cont_assign_var_init(); void process_assignment(); void process_net(); void process_packed_array_net(); @@ -118,6 +122,9 @@ class UhdmAst { void process_func_call(); void process_immediate_assert(); void process_hier_path(); + void process_logic_typespec(); + void process_int_typespec(); + void process_bit_typespec(); UhdmAst(UhdmAst* p, UhdmAstShared& s, const std::string& i) : parent(p), shared(s), indent(i) {} diff --git a/uhdm-plugin/uhdmastshared.h b/uhdm-plugin/uhdmastshared.h index 8d9359c27..ec4c84362 100644 --- a/uhdm-plugin/uhdmastshared.h +++ b/uhdm-plugin/uhdmastshared.h @@ -50,12 +50,11 @@ class UhdmAstShared { // UHDM node coverage report UhdmAstReport report; - // Map from AST type nodes to their names (used mostly for referencing - // types contained in packages) - std::unordered_map type_names; + // Vector with name of typedef and name of scope it is declared in + std::vector> type_names; // Map from AST param nodes to their types (used for params with struct types) - std::unordered_map param_types; + std::unordered_map param_types; }; YOSYS_NAMESPACE_END From 67eed72adb141ae054c24e2f2496b8353f838f97 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 5 Jul 2021 11:49:15 +0200 Subject: [PATCH 392/845] stream-op: set str for AST_BLOCK Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index e6e03eed7..a08402174 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1577,6 +1577,10 @@ void UhdmAst::process_stream_op() { loop_node->children.push_back(new AST::AstNode(AST::AST_BLOCK, assign_node)); block_node->children.push_back(new AST::AstNode(AST::AST_BLOCK, loop_node)); + // Yosys requires that AST_BLOCK str was set + block_node->children[1]->str = "\\stream_op_block" + std::to_string(loop_id); + block_node->children[1]->children[0]->children[3]->str = "\\stream_op_block" + std::to_string(loop_id); + // Do not create a node shared.report.mark_handled(obj_h); } From feeba0d9be145a8c12ce5f857e1410c613795680 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 5 Jul 2021 16:06:19 +0200 Subject: [PATCH 393/845] Update function result str to match newest yosys Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index a08402174..bff0b2eac 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2029,7 +2029,7 @@ void UhdmAst::process_function() { [&](AST::AstNode* node) { if (node) { current_node->children.push_back(node); - node->str = current_node->str; + node->str = "$result"; } }); visit_one_to_many({vpiIODecl}, From 60a81a508e3c4ac83bceae39becf7d079847e961 Mon Sep 17 00:00:00 2001 From: Pawel Sagan Date: Mon, 5 Jul 2021 16:53:48 +0200 Subject: [PATCH 394/845] uhdm-plugin: adding case eq operation, that allows to comapre values with '===' Signed-off-by: Pawel Sagan --- uhdm-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index bff0b2eac..4caafa975 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1386,6 +1386,7 @@ void UhdmAst::process_operation() { case vpiLogOrOp: current_node->type = AST::AST_LOGIC_OR; break; case vpiEqOp: current_node->type = AST::AST_EQ; break; case vpiNeqOp: current_node->type = AST::AST_NE; break; + case vpiCaseEqOp: current_node->type = AST::AST_EQX; break; case vpiGtOp: current_node->type = AST::AST_GT; break; case vpiGeOp: current_node->type = AST::AST_GE; break; case vpiLtOp: current_node->type = AST::AST_LT; break; From 30c5cd9fe61ebab82898181b729dbe9d1fe6be69 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 12 Jul 2021 09:59:29 +0200 Subject: [PATCH 395/845] stream-op: fix case when segmentation fault was thrown Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 4caafa975..ff01bf8b7 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1575,12 +1575,10 @@ void UhdmAst::process_stream_op() { loop_node->children.push_back(init_stmt); loop_node->children.push_back(cond_stmt); loop_node->children.push_back(inc_stmt); - loop_node->children.push_back(new AST::AstNode(AST::AST_BLOCK, assign_node)); + loop_node->children.push_back(make_ast_node(AST::AST_BLOCK, {assign_node})); + loop_node->children[3]->str = "\\stream_op_block" + std::to_string(loop_id); - block_node->children.push_back(new AST::AstNode(AST::AST_BLOCK, loop_node)); - // Yosys requires that AST_BLOCK str was set - block_node->children[1]->str = "\\stream_op_block" + std::to_string(loop_id); - block_node->children[1]->children[0]->children[3]->str = "\\stream_op_block" + std::to_string(loop_id); + block_node->children.push_back(make_ast_node(AST::AST_BLOCK, {loop_node})); // Do not create a node shared.report.mark_handled(obj_h); From 8a7966406e41de1fb3fcc69c408efd660fc0a296 Mon Sep 17 00:00:00 2001 From: Pawel Sagan Date: Mon, 12 Jul 2021 11:54:12 +0200 Subject: [PATCH 396/845] uhdm-plugin:changing the string name of returned object from function Signed-off-by: Pawel Sagan --- uhdm-plugin/UhdmAst.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ff01bf8b7..9612b469e 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2027,8 +2027,11 @@ void UhdmAst::process_function() { obj_h, [&](AST::AstNode* node) { if (node) { + auto net_type = vpi_get(vpiNetType, obj_h); + node->is_reg = net_type == vpiReg; + node->str = current_node->str; current_node->children.push_back(node); - node->str = "$result"; + } }); visit_one_to_many({vpiIODecl}, From 09e11953f8d1ce33db1e1f4034faac292edc3460 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 12 Jul 2021 12:19:05 +0200 Subject: [PATCH 397/845] enum: fix AST for alias Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 50 ++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 9612b469e..cdf238345 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -338,18 +338,39 @@ void UhdmAst::add_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { typedef_node->children.push_back(type_node); current_node->children.push_back(typedef_node); } else if (type_node->type == AST::AST_ENUM) { - type_node->str = "$enum" + std::to_string(shared.next_enum_id()); - for (auto* enum_item : type_node->children) { - enum_item->attributes["\\enum_base_type"] = AST::AstNode::mkconst_str(type_node->str); - } - auto wire_node = new AST::AstNode(AST::AST_WIRE); - wire_node->attributes["\\enum_type"] = AST::AstNode::mkconst_str(type_node->str); - if (!type_node->children.empty() && type_node->children[0]->children.size() > 1) { - wire_node->children.push_back(type_node->children[0]->children[1]->clone()); + if(type_node->attributes.count("\\enum_base_type")) { + auto base_type = type_node->attributes["\\enum_base_type"]; + auto wire_node = new AST::AstNode(AST::AST_WIRE); + for (auto c : base_type->children) { + std::string enum_item_str = "\\enum_value_"; + log_assert(c->children.size() > 0); + log_assert(c->children[0]->type == AST::AST_CONSTANT); + int width = 1; + bool is_signed = c->children[0]->is_signed; + if (c->children.size() == 2) { + width = c->children[1]->children[0]->integer + 1; + } + RTLIL::Const val = c->children[0]->bitsAsConst(width, is_signed); + enum_item_str.append(val.as_string()); + wire_node->attributes[enum_item_str.c_str()] = AST::AstNode::mkconst_str(c->str); + } + typedef_node->children.push_back(wire_node); + current_node->children.push_back(typedef_node); + + } else { + type_node->str = "$enum" + std::to_string(shared.next_enum_id()); + for (auto* enum_item : type_node->children) { + enum_item->attributes["\\enum_base_type"] = AST::AstNode::mkconst_str(type_node->str); + } + auto wire_node = new AST::AstNode(AST::AST_WIRE); + wire_node->attributes["\\enum_type"] = AST::AstNode::mkconst_str(type_node->str); + if (!type_node->children.empty() && type_node->children[0]->children.size() > 1) { + wire_node->children.push_back(type_node->children[0]->children[1]->clone()); + } + typedef_node->children.push_back(wire_node); + current_node->children.push_back(type_node); + current_node->children.push_back(typedef_node); } - typedef_node->children.push_back(wire_node); - current_node->children.push_back(type_node); - current_node->children.push_back(typedef_node); } else { type_node->str.clear(); typedef_node->children.push_back(type_node); @@ -826,6 +847,13 @@ void UhdmAst::process_typespec_member() { void UhdmAst::process_enum_typespec() { current_node = make_ast_node(AST::AST_ENUM); + visit_one_to_one({vpiTypedefAlias}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + current_node->attributes["\\enum_base_type"] = node->clone(); + } + }); visit_one_to_many({vpiEnumConst}, obj_h, [&](AST::AstNode* node) { From efc5dc1c3d21330c56f0ea341374ad610973102e Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 19 Jul 2021 11:54:21 +0200 Subject: [PATCH 398/845] module: set parameter when module definition is not parsed by Surelog Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index cdf238345..50f62d37e 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -733,6 +733,11 @@ void UhdmAst::process_module() { } else { add_or_replace_child(module_node, node); } + } else if ((module_node->attributes.count(ID::partial) && module_node->attributes[ID::partial]->integer == 2)) { + // When module definition is not parsed by Surelog, left setting parameters to yosys + auto clone = node->clone(); + clone->type = AST::AST_PARASET; + current_node->children.push_back(clone); } } }); From 360e23af8b05a3cb4022aca1b5adef3421550f39 Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Tue, 13 Jul 2021 15:38:04 +0200 Subject: [PATCH 399/845] Fix for loop counters Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 30 ++++++++++++++++-------------- uhdm-plugin/UhdmAst.h | 7 ++++++- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 50f62d37e..b3065308d 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -203,6 +203,9 @@ AST::AstNode* UhdmAst::make_ast_node(AST::AstNodeType type, std::vectorstr); + auto it = node_renames.find(node->str); + if (it != node_renames.end()) + node->str = it->second; if (auto filename = vpi_get_str(vpiFile, obj_h)) { node->filename = filename; } @@ -1894,19 +1897,22 @@ void UhdmAst::process_for() { current_node = make_ast_node(AST::AST_FOR); auto loop_id = shared.next_loop_id(); current_node->str = "$loop" + std::to_string(loop_id); - auto loop_parent_node = make_ast_node(AST::AST_BLOCK); - loop_parent_node->str = current_node->str; + auto parent_node = find_ancestor({AST::AST_FUNCTION, AST::AST_GENBLOCK, AST::AST_MODULE}); visit_one_to_many({vpiForInitStmt}, obj_h, [&](AST::AstNode* node) { if (node->type == AST::AST_ASSIGN_LE) node->type = AST::AST_ASSIGN_EQ; - if (node->children[0]->type == AST::AST_WIRE) { - auto *wire = node->children[0]->clone(); - wire->is_reg = true; - loop_parent_node->children.push_back(wire); - node->children[0]->type = AST::AST_IDENTIFIER; - node->children[0]->is_signed = false; - node->children[0]->children.clear(); + auto lhs = node->children[0]; + if (lhs->type == AST::AST_WIRE) { + auto old_str = lhs->str; + lhs->str = '\\' + current_node->str.substr(1) + "::" + lhs->str.substr(1); + node_renames.insert(std::make_pair(old_str, lhs->str)); + auto *wire = lhs->clone(); + wire->is_reg = true; + parent_node->children.push_back(wire); + lhs->type = AST::AST_IDENTIFIER; + lhs->is_signed = false; + lhs->children.clear(); } current_node->children.push_back(node); }); @@ -1925,14 +1931,10 @@ void UhdmAst::process_for() { obj_h, [&](AST::AstNode* node) { auto *statements = make_ast_node(AST::AST_BLOCK); + statements->str = current_node->str; // Needed in simplify step statements->children.push_back(node); current_node->children.push_back(statements); }); - //auto for_block = make_ast_node(AST::AST_BLOCK); - //for_block->str = ""; - //for_block->children.push_back(current_node); - loop_parent_node->children.push_back(current_node); - current_node = loop_parent_node; } void UhdmAst::process_gen_scope_array() { diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index fe9b0f123..aec939fdb 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -67,6 +67,9 @@ class UhdmAst { // Indentation used for debug printing std::string indent; + // Mapping of names that should be replaced to new names + std::unordered_map node_renames; + // Functions that process specific types of nodes void process_design(); void process_parameter(); @@ -126,7 +129,9 @@ class UhdmAst { void process_int_typespec(); void process_bit_typespec(); - UhdmAst(UhdmAst* p, UhdmAstShared& s, const std::string& i) : parent(p), shared(s), indent(i) {} + UhdmAst(UhdmAst* p, UhdmAstShared& s, const std::string& i) : parent(p), shared(s), indent(i) { + if (parent) node_renames = parent->node_renames; + } public: UhdmAst(UhdmAstShared& s, const std::string& i = "") : UhdmAst(nullptr, s, i) {} From 69294a28efb65ebe27e782a0dba78cc0ce0b79a9 Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Tue, 20 Jul 2021 12:53:34 +0200 Subject: [PATCH 400/845] Improve module instancing and reusing Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 74 ++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index b3065308d..160c7b321 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -674,32 +674,42 @@ void UhdmAst::process_module() { } else { // Not a top module, create instance current_node = make_ast_node(AST::AST_CELL); - auto module_node = shared.top_nodes[type]; + + std::string module_parameters; + visit_one_to_many({vpiParamAssign}, + obj_h, + [&](AST::AstNode* node) { + if (node) { + if (!(cell_instance || (node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT))) { + if (node->children[0]->str != "") + module_parameters += node->str + "=" + node->children[0]->str; + else + module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); + } + } + }); + //rename module in same way yosys do + std::string module_name; + if (module_parameters.size() > 60) + module_name = "$paramod$" + sha1(module_parameters) + type; + else if(module_parameters != "") + module_name = "$paramod" + type + module_parameters; + else module_name = type; + auto module_node = shared.top_nodes[module_name]; if (!module_node) { - module_node = shared.top_node_templates[type]; + module_node = shared.top_nodes[type]; if (!module_node) { module_node = new AST::AstNode(AST::AST_MODULE); module_node->str = type; module_node->attributes[ID::partial] = AST::AstNode::mkconst_int(2, false, 1); + shared.top_nodes[module_node->str] = module_node; + } + if (!module_parameters.empty()) { + module_node = module_node->clone(); } - shared.top_nodes[module_node->str] = module_node; - } - module_node = module_node->clone(); - auto cell_instance = vpi_get(vpiCellInstance, obj_h); - if (cell_instance) { - module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); - } - //TODO: setting keep attribute probably shouldn't be needed, - // but without this, modules that are generated in genscope are removed - // for now lets just add this attribute - module_node->attributes[ID::keep] = AST::AstNode::mkconst_int(1, false, 1); - if (module_node->attributes.count(ID::partial)) { - AST::AstNode *attr = module_node->attributes.at(ID::partial); - if (attr->type == AST::AST_CONSTANT) - if (attr->integer == 1) - module_node->attributes.erase(ID::partial); } - std::string module_parameters; + module_node->str = module_name; + shared.top_nodes[module_node->str] = module_node; visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode* node) { @@ -726,11 +736,6 @@ void UhdmAst::process_module() { current_node->children.push_back(clone); } } else { - if (node->children[0]->str != "") - module_parameters += node->str + "=" + node->children[0]->str; - else - module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); - //replace add_or_replace_child(module_node, node); } } else { @@ -744,16 +749,23 @@ void UhdmAst::process_module() { } } }); - //rename module in same way yosys do - if (module_parameters.size() > 60) - module_node->str = "$paramod$" + sha1(module_parameters) + type; - else if(module_parameters != "") - module_node->str = "$paramod" + type + module_parameters; + auto cell_instance = vpi_get(vpiCellInstance, obj_h); + if (cell_instance) { + module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); + } + //TODO: setting keep attribute probably shouldn't be needed, + // but without this, modules that are generated in genscope are removed + // for now lets just add this attribute + module_node->attributes[ID::keep] = AST::AstNode::mkconst_int(1, false, 1); + if (module_node->attributes.count(ID::partial)) { + AST::AstNode *attr = module_node->attributes.at(ID::partial); + if (attr->type == AST::AST_CONSTANT) + if (attr->integer == 1) + module_node->attributes.erase(ID::partial); + } auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); typeNode->str = module_node->str; current_node->children.insert(current_node->children.begin(), typeNode); - shared.top_node_templates[module_node->str] = module_node; - shared.top_nodes[module_node->str] = module_node; visit_one_to_many({vpiVariables, vpiNet, vpiArrayNet}, From 4809ca9531c127dce9a21c0a7630b8d2b940ba28 Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Wed, 21 Jul 2021 13:38:23 +0200 Subject: [PATCH 401/845] Reduce memory leaks Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 64 ++++++++++++++++------------------ uhdm-plugin/uhdmastfrontend.cc | 36 ------------------- uhdm-plugin/uhdmastshared.h | 7 ---- 3 files changed, 31 insertions(+), 76 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 160c7b321..0ac37947f 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -21,6 +21,22 @@ static void sanitize_symbol_name(std::string &name) { } } +static std::string get_name(vpiHandle obj_h) { + std::string name; + if (auto s = vpi_get_str(vpiName, obj_h)) { + name = s; + } else if (auto s = vpi_get_str(vpiDefName, obj_h)) { + name = s; + } else if (auto s = vpi_get_str(vpiFullName, obj_h)) { + name = s; + if (name.rfind(".") != std::string::npos) { + name = name.substr(name.rfind(".") + 1); + } + } + sanitize_symbol_name(name); + return name; +} + static std::string strip_package_name(std::string name) { auto sep_index = name.find("::"); if (sep_index != string::npos) { @@ -190,19 +206,7 @@ AST::AstNode* UhdmAst::process_value(vpiHandle obj_h) { AST::AstNode* UhdmAst::make_ast_node(AST::AstNodeType type, std::vector children) { auto node = new AST::AstNode(type); - if (auto name = vpi_get_str(vpiName, obj_h)) { - node->str = name; - } else if (auto name = vpi_get_str(vpiDefName, obj_h)) { - node->str = name; - } else if (auto name = vpi_get_str(vpiFullName, obj_h)) { - std::string s = std::string(name); - if (s.rfind(".") != std::string::npos) { - node->str = s.substr(s.rfind(".") + 1); - } else { - node->str = s; - } - } - sanitize_symbol_name(node->str); + node->str = get_name(obj_h); auto it = node_renames.find(node->str); if (it != node_renames.end()) node->str = it->second; @@ -212,9 +216,6 @@ AST::AstNode* UhdmAst::make_ast_node(AST::AstNodeType type, std::vectorlocation.first_line = node->location.last_line = line; } - const uhdm_handle* const handle = (const uhdm_handle*) obj_h; - const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - shared.visited[object] = node; node->children = children; return node; } @@ -249,11 +250,12 @@ static void add_or_replace_child(AST::AstNode* parent, AST::AstNode* child) { auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); multirange_node->is_packed = true; for (auto *c : child->children) { - multirange_node->children.push_back(c->clone()); + multirange_node->children.push_back(c); } child->children.clear(); child->children.push_back(multirange_node); } + delete *it; *it = child; return; } @@ -417,6 +419,7 @@ void UhdmAst::process_design() { current_node->children.push_back(pair.second); } else { log_warning("Removing module: %s from the design.\n", pair.second->str.c_str()); + delete pair.second; } } } @@ -686,6 +689,7 @@ void UhdmAst::process_module() { else module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); } + delete node; } }); //rename module in same way yosys do @@ -930,6 +934,7 @@ void UhdmAst::process_custom_var() { // anonymous typespec, move the children to variable current_node->type = node->type; current_node->children = std::move(node->children); + delete node; } else { // custom var in gen scope have definition with declaration auto *parent = find_ancestor({AST::AST_GENBLOCK, AST::AST_BLOCK}); @@ -1533,7 +1538,7 @@ void UhdmAst::process_stream_op() { if (lhs_node->type == AST::AST_WIRE) { module_node->children.insert(module_node->children.begin(), lhs_node->clone()); temp_var = lhs_node->clone(); //if we already have wire as lhs, we want to create the same wire for temp_var - lhs_node->children.clear(); + lhs_node->delete_children(); lhs_node->type = AST::AST_IDENTIFIER; bits_call = make_ast_node(AST::AST_FCALL, {lhs_node->clone()}); bits_call->str = "\\$bits"; @@ -1731,6 +1736,7 @@ void UhdmAst::process_assignment_pattern_op() { std::reverse(current_node->children.begin(), current_node->children.end()); if (!assignments.empty()) { if (current_node->children.empty()) { + delete assign_node->children[0]; assign_node->children[0] = assignments[0]->children[0]; current_node = assignments[0]->children[1]; assignments[0]->children.clear(); @@ -1791,11 +1797,9 @@ void UhdmAst::process_bit_select() { void UhdmAst::process_part_select() { current_node = make_ast_node(AST::AST_IDENTIFIER); - visit_one_to_one({vpiParent}, - obj_h, - [&](AST::AstNode* node) { - current_node->str = node->str; - }); + vpiHandle parent_h = vpi_handle(vpiParent, obj_h); + current_node->str = get_name(parent_h); + vpi_free_object(parent_h); auto range_node = new AST::AstNode(AST::AST_RANGE); range_node->filename = current_node->filename; range_node->location = current_node->location; @@ -1810,11 +1814,9 @@ void UhdmAst::process_part_select() { void UhdmAst::process_indexed_part_select() { current_node = make_ast_node(AST::AST_IDENTIFIER); - visit_one_to_one({vpiParent}, - obj_h, - [&](AST::AstNode* node) { - current_node->str = node->str; - }); + vpiHandle parent_h = vpi_handle(vpiParent, obj_h); + current_node->str = get_name(parent_h); + vpi_free_object(parent_h); //TODO: check if there are other types, for now only handle 1 and 2 (+: and -:) auto indexed_part_select_type = vpi_get(vpiIndexedPartSelectType, obj_h) == 1 ? AST::AST_ADD : AST::AST_SUB; auto range_node = new AST::AstNode(AST::AST_RANGE); @@ -1924,7 +1926,7 @@ void UhdmAst::process_for() { parent_node->children.push_back(wire); lhs->type = AST::AST_IDENTIFIER; lhs->is_signed = false; - lhs->children.clear(); + lhs->delete_children(); } current_node->children.push_back(node); }); @@ -2245,9 +2247,6 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { std::cout << indent << "Object '" << object->VpiName() << "' of type '" << UHDM::VpiTypeName(obj_h) << '\'' << std::endl; } - if (shared.visited.find(object) != shared.visited.end()) { - return shared.visited[object]->clone(); - } switch(object_type) { case vpiDesign: process_design(); break; case vpiParameter: process_parameter(); break; @@ -2327,7 +2326,6 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { shared.report.mark_handled(object); return current_node; } - shared.visited.erase(object); } return nullptr; } diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index c25dc465c..e3bc07e54 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -107,7 +107,6 @@ struct UhdmAstFrontend : public Frontend { if (report_directory != "") { shared.report.write(report_directory); } - cleanup(current_ast, shared); bool dump_ast1 = shared.debug_flag; bool dump_ast2 = shared.debug_flag; bool dont_redefine = false; @@ -118,41 +117,6 @@ struct UhdmAstFrontend : public Frontend { ); delete current_ast; } - - void cleanup(AST::AstNode* ast, UhdmAstShared& shared) { - std::unordered_set nodes_to_delete, visited; - for (auto node : shared.visited) { - nodes_to_delete.insert(node.second); // Put all visited nodes in a set - } - ast->visitEachDescendant([&nodes_to_delete, &visited](AST::AstNode* node) { - nodes_to_delete.erase(node); // Prevent a node actually used in the AST from being deleted - visited.insert(node); // Store it as visited - }); - nodes_to_delete.erase(ast); // Prevent the root node from being deleted - for (auto node : std::unordered_set(nodes_to_delete)) { - node->visitEachDescendant([&nodes_to_delete](AST::AstNode* node) { - nodes_to_delete.erase(node); - }); - erase_repeating(node, visited); // Prevent deleting some nodes multiple times - } - for (auto node : nodes_to_delete) { - delete node; - } - shared.visited.clear(); - } - - // Erases nodes that are in the 'visited' set from the AST - void erase_repeating(AST::AstNode* node, std::unordered_set& visited) { - visited.insert(node); - node->children.erase(std::remove_if(node->children.begin(), node->children.end(), - [&](AST::AstNode* x) { - return visited.find(x) != visited.end(); - }), node->children.end()); - for (auto child : node->children) { - erase_repeating(child, visited); - } - } - } UhdmAstFrontend; YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/uhdmastshared.h b/uhdm-plugin/uhdmastshared.h index ec4c84362..3f9d0db92 100644 --- a/uhdm-plugin/uhdmastshared.h +++ b/uhdm-plugin/uhdmastshared.h @@ -40,13 +40,6 @@ class UhdmAstShared { // Top nodes of the design (modules, interfaces) std::unordered_map top_nodes; - // Templates for top nodes of the design (in case there are multiple - // versions, e.g. for different parameters) - std::unordered_map top_node_templates; - - // Map from already visited UHDM nodes to AST nodes - std::unordered_map visited; - // UHDM node coverage report UhdmAstReport report; From c08cb8815e5f236706a4d814bf78f7ffed32d6ae Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Mon, 2 Aug 2021 13:07:29 +0200 Subject: [PATCH 402/845] Fix enum items without a range Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 0ac37947f..d89468513 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -889,12 +889,17 @@ void UhdmAst::process_enum_typespec() { switch (typespec_type) { case vpiLogicTypespec: { current_node->is_logic = true; + bool has_range = false; visit_range(typespec_h, [&](AST::AstNode* node) { + has_range = true; for (auto child : current_node->children) { child->children.push_back(node->clone()); } }); + if (!has_range) // range is needed for simplify + for (auto child : current_node->children) + child->children.push_back(make_ast_node(AST::AST_RANGE, {AST::AstNode::mkconst_int(0, true)})); shared.report.mark_handled(typespec_h); break; } From f4582d81b06955a5aee307cbf48ef9f415015d39 Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Tue, 3 Aug 2021 18:17:20 +0200 Subject: [PATCH 403/845] Fix multiple memory leaks Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 53 +++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index d89468513..80c42f1ee 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -337,7 +337,6 @@ void UhdmAst::add_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { typedef_node->str = strip_package_name(type_node->str); if (std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(type_node->str, current_node->str)) != shared.type_names.end()) return; shared.type_names.push_back(std::make_pair(type_node->str, current_node->str)); - type_node = type_node->clone(); if (type_node->type == AST::AST_STRUCT) { type_node->str.clear(); typedef_node->children.push_back(type_node); @@ -735,9 +734,8 @@ void UhdmAst::process_module() { // parameters, but this module would be already parametrized if ((node->children[0]->integer != (*parent_node)->children[0]->integer || node->children[0]->str != (*parent_node)->children[0]->str)) { - auto clone = node->clone(); - clone->type = AST::AST_PARASET; - current_node->children.push_back(clone); + node->type = AST::AST_PARASET; + current_node->children.push_back(node); } } else { add_or_replace_child(module_node, node); @@ -843,8 +841,11 @@ void UhdmAst::process_typespec_member() { auto str = current_node->str; node->cloneInto(current_node); current_node->str = str; + delete node; } else if (typespec_type == vpiEnumTypespec) { current_node->children.push_back(node); + } else { + delete node; } }); break; @@ -896,6 +897,7 @@ void UhdmAst::process_enum_typespec() { for (auto child : current_node->children) { child->children.push_back(node->clone()); } + delete node; }); if (!has_range) // range is needed for simplify for (auto child : current_node->children) @@ -943,12 +945,14 @@ void UhdmAst::process_custom_var() { } else { // custom var in gen scope have definition with declaration auto *parent = find_ancestor({AST::AST_GENBLOCK, AST::AST_BLOCK}); - if (parent && std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(node->str, parent->str)) == shared.type_names.end() && node->children.size() > 0) { - add_typedef(parent, node); - } auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); wiretype_node->str = node->str; current_node->children.push_back(wiretype_node); + if (parent && std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(node->str, parent->str)) == shared.type_names.end() && node->children.size() > 0) { + add_typedef(parent, node); + } else { + delete node; + } } }); auto type = vpi_get(vpiType, obj_h); @@ -1023,6 +1027,7 @@ void UhdmAst::process_param_assign() { } } shared.param_types[current_node->str] = shared.param_types[node->str]; + delete node; } }); visit_one_to_one({vpiRhs}, @@ -1285,17 +1290,20 @@ void UhdmAst::process_io_decl() { visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode* node) { - if (node && node->str != "") { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type=true; - } else { - // anonymous typedef, just move childrens - for (auto child : node->children) { - current_node->children.push_back(child->clone()); - } + if (node) { + if (node->str != "") { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type=true; + } else { + // anonymous typedef, just move children + for (auto child : node->children) { + current_node->children.push_back(child->clone()); + } + } + delete node; } }); if (const int n = vpi_get(vpiDirection, obj_h)) { @@ -1664,6 +1672,7 @@ void UhdmAst::process_cast_op() { obj_h, [&](AST::AstNode* node) { node->cloneInto(current_node); + delete node; }); vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); shared.report.mark_handled(typespec_h); @@ -2189,15 +2198,17 @@ void UhdmAst::process_hier_path() { current_node->type = AST::AST_PREFIX; current_node->str = node->str; current_node->children.push_back(node->children[0]->children[0]->clone()); + delete node; } else { if (current_node->type == AST::AST_IDENTIFIER) { if (current_node->str != "\\") { current_node->str += "."; } current_node->str += node->str.substr(1); - current_node->children = node->children; + current_node->children = std::move(node->children); + delete node; } else { - current_node->children.push_back(node->clone()); + current_node->children.push_back(node); } } }); @@ -2213,7 +2224,7 @@ void UhdmAst::process_logic_typespec() { } }); if (current_node->str != "") { - add_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + add_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); } } From f9bcad0add67b84847afe0cfbd868c9da292dee2 Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Wed, 4 Aug 2021 10:28:18 +0200 Subject: [PATCH 404/845] Rename 'add_typedef' to 'move_type_to_new_typedef', fix leak in it Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 16 ++++++++-------- uhdm-plugin/UhdmAst.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 80c42f1ee..620d78189 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -330,7 +330,7 @@ void UhdmAst::make_cell(vpiHandle obj_h, AST::AstNode* cell_node, AST::AstNode* vpi_free_object(port_itr); } -void UhdmAst::add_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { +void UhdmAst::move_type_to_new_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { auto typedef_node = new AST::AstNode(AST::AST_TYPEDEF); typedef_node->location = type_node->location; typedef_node->filename = type_node->filename; @@ -360,7 +360,7 @@ void UhdmAst::add_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { } typedef_node->children.push_back(wire_node); current_node->children.push_back(typedef_node); - + delete type_node; } else { type_node->str = "$enum" + std::to_string(shared.next_enum_id()); for (auto* enum_item : type_node->children) { @@ -651,7 +651,7 @@ void UhdmAst::process_module() { obj_h, [&](AST::AstNode* node) { if (node) { - add_typedef(current_node, node); + move_type_to_new_typedef(current_node, node); } }); visit_one_to_many({vpiModule, @@ -949,7 +949,7 @@ void UhdmAst::process_custom_var() { wiretype_node->str = node->str; current_node->children.push_back(wiretype_node); if (parent && std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(node->str, parent->str)) == shared.type_names.end() && node->children.size() > 0) { - add_typedef(parent, node); + move_type_to_new_typedef(parent, node); } else { delete node; } @@ -1209,7 +1209,7 @@ void UhdmAst::process_package() { obj_h, [&](AST::AstNode* node) { if (node) { - add_typedef(current_node, node); + move_type_to_new_typedef(current_node, node); } }); visit_one_to_many({vpiTaskFunc}, @@ -2224,7 +2224,7 @@ void UhdmAst::process_logic_typespec() { } }); if (current_node->str != "") { - add_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); + move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); } } @@ -2236,7 +2236,7 @@ void UhdmAst::process_int_typespec() { current_node->children.push_back(range); current_node->is_signed = true; if (current_node->str != "") { - add_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); } } @@ -2249,7 +2249,7 @@ void UhdmAst::process_bit_typespec() { } }); if (current_node->str != "") { - add_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); } } diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index aec939fdb..b833f8135 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -40,8 +40,8 @@ class UhdmAst { // Makes the passed node a cell node of the specified type void make_cell(vpiHandle obj_h, AST::AstNode* node, AST::AstNode* type); - // Adds a typedef node to the current node - void add_typedef(AST::AstNode* current_node, AST::AstNode* type_node); + // Moves a type node to the specified node + void move_type_to_new_typedef(AST::AstNode* current_node, AST::AstNode* type_node); // Go up the UhdmAst to find a parent node of the specified type AST::AstNode* find_ancestor(const std::unordered_set& types); From 56bd25214a4f88d0d4b5a250f54f505896ebf41c Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Thu, 5 Aug 2021 17:47:32 +0200 Subject: [PATCH 405/845] Fix more leaks; fix bug related to module instancing; use 'vpi_release_handle' Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 224 +++++++++++++++++---------------- uhdm-plugin/uhdmastfrontend.cc | 1 + 2 files changed, 117 insertions(+), 108 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 620d78189..798fe7462 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -55,9 +55,9 @@ void UhdmAst::visit_one_to_many(const std::vector child_node_types, UhdmAst uhdm_ast(this, shared, indent + " "); auto *child_node = uhdm_ast.process_object(vpi_child_obj); f(child_node); - vpi_free_object(vpi_child_obj); + vpi_release_handle(vpi_child_obj); } - vpi_free_object(itr); + vpi_release_handle(itr); } } @@ -71,7 +71,7 @@ void UhdmAst::visit_one_to_one(const std::vector child_node_types, auto *child_node = uhdm_ast.process_object(itr); f(child_node); } - vpi_free_object(itr); + vpi_release_handle(itr); } } @@ -93,68 +93,62 @@ void UhdmAst::visit_range(vpiHandle obj_h, } } -void UhdmAst::visit_default_expr(vpiHandle obj_h) { - if (vpi_handle(vpiExpr, obj_h)) { - auto mod = find_ancestor({AST::AST_MODULE}); - AST::AstNode* initial_node = nullptr; - AST::AstNode* block_node = nullptr; - auto assign_node = new AST::AstNode(AST::AST_ASSIGN_EQ); - auto id_node = new AST::AstNode(AST::AST_IDENTIFIER); - id_node->str = current_node->str; - - for (auto child : mod->children) { - if (child->type == AST::AST_INITIAL) { - initial_node = child; - break; - } - } - // Ensure single AST_INITIAL node is located in AST_MODULE - // before any AST_ALWAYS - if (initial_node == nullptr) { - initial_node = new AST::AstNode(AST::AST_INITIAL); - - auto insert_it = find_if(mod->children.begin(), mod->children.end(), - [] (AST::AstNode *node) {return (node->type == AST::AST_ALWAYS);} ); - - mod->children.insert(insert_it, 1, initial_node); - } - // Ensure single AST_BLOCK node in AST_INITIAL - if (initial_node->children.size() && initial_node->children[0]) { - block_node = initial_node->children[0]; - } else { - block_node = new AST::AstNode(AST::AST_BLOCK); - initial_node->children.push_back(block_node); - } - auto block_child = block_node->children.begin(); - for (;block_child != block_node->children.end(); block_child++) { - if ((*block_child)->type == AST::AST_ASSIGN_EQ) { - break; - } - } - // Insert AST_ASSIGN_EQ nodes that came from - // custom_var or int_var before any other AST_ASSIGN_EQ - // Especially before ones explicitly placed in initial block in source code - block_node->children.insert(block_child, 1, assign_node); - assign_node->children.push_back(id_node); - UhdmAst initial_ast(parent, shared, indent); - initial_ast.current_node = initial_node; - UhdmAst block_ast(&initial_ast, shared, indent); - block_ast.current_node = block_node; - block_ast.visit_one_to_one({vpiExpr}, - obj_h, - [&](AST::AstNode* expr_node) { - assign_node->children.push_back(expr_node); - }); - } -} - -AST::AstNode* UhdmAst::process_value(vpiHandle obj_h) { - s_vpi_value val; - vpi_get_value(obj_h, &val); - std::string strValType; - if (val.format) { // Needed to handle parameter nodes without typespecs and constants - switch (val.format) { - case vpiScalarVal: return AST::AstNode::mkconst_int(val.value.scalar, false, 1); +void UhdmAst::visit_default_expr(vpiHandle obj_h) { + UhdmAst initial_ast(parent, shared, indent); + UhdmAst block_ast(&initial_ast, shared, indent); + block_ast.visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *expr_node) { + auto mod = find_ancestor({AST::AST_MODULE}); + AST::AstNode *initial_node = nullptr; + AST::AstNode *block_node = nullptr; + auto assign_node = new AST::AstNode(AST::AST_ASSIGN_EQ); + auto id_node = new AST::AstNode(AST::AST_IDENTIFIER); + id_node->str = current_node->str; + + for (auto child : mod->children) { + if (child->type == AST::AST_INITIAL) { + initial_node = child; + break; + } + } + // Ensure single AST_INITIAL node is located in AST_MODULE + // before any AST_ALWAYS + if (initial_node == nullptr) { + initial_node = new AST::AstNode(AST::AST_INITIAL); + auto insert_it = find_if(mod->children.begin(), mod->children.end(), [](AST::AstNode *node) { return (node->type == AST::AST_ALWAYS); }); + mod->children.insert(insert_it, 1, initial_node); + } + // Ensure single AST_BLOCK node in AST_INITIAL + if (initial_node->children.size() && initial_node->children[0]) { + block_node = initial_node->children[0]; + } else { + block_node = new AST::AstNode(AST::AST_BLOCK); + initial_node->children.push_back(block_node); + } + auto block_child = block_node->children.begin(); + for (; block_child != block_node->children.end(); block_child++) { + if ((*block_child)->type == AST::AST_ASSIGN_EQ) { + break; + } + } + // Insert AST_ASSIGN_EQ nodes that came from + // custom_var or int_var before any other AST_ASSIGN_EQ + // Especially before ones explicitly placed in initial block in source code + block_node->children.insert(block_child, 1, assign_node); + assign_node->children.push_back(id_node); + initial_ast.current_node = initial_node; + block_ast.current_node = block_node; + assign_node->children.push_back(expr_node); + }); +} + +AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) { + s_vpi_value val; + vpi_get_value(obj_h, &val); + std::string strValType; + if (val.format) { // Needed to handle parameter nodes without typespecs and constants + switch (val.format) { + case vpiScalarVal: + return AST::AstNode::mkconst_int(val.value.scalar, false, 1); case vpiBinStrVal: { strValType = "'b"; break; @@ -325,9 +319,9 @@ void UhdmAst::make_cell(vpiHandle obj_h, AST::AstNode* cell_node, AST::AstNode* }); cell_node->children.push_back(arg_node); shared.report.mark_handled(port_h); - vpi_free_object(port_h); + vpi_release_handle(port_h); } - vpi_free_object(port_itr); + vpi_release_handle(port_itr); } void UhdmAst::move_type_to_new_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { @@ -470,6 +464,7 @@ void UhdmAst::process_parameter() { break; } } + vpi_release_handle(typespec_h); } else { AST::AstNode* constant_node = process_value(obj_h); if (constant_node) { @@ -515,6 +510,7 @@ void UhdmAst::process_port() { current_node->children.push_back(typeNode); shared.report.mark_handled(actual_h); shared.report.mark_handled(iface_h); + vpi_release_handle(iface_h); } break; } @@ -585,21 +581,24 @@ void UhdmAst::process_port() { } } shared.report.mark_handled(lowConn_h); + vpi_release_handle(actual_h); + vpi_release_handle(lowConn_h); } visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode* node) { - if (node && node->str != "") { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type=true; - } else { - // anonymous typedef, just move childrens - for (auto child : node->children) { - current_node->children.push_back(child->clone()); - } + if (node) { + if (node->str != "") { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type=true; + } else { + // anonymous typedef, just move children + current_node->children = std::move(node->children); + } + delete node; } }); if (const int n = vpi_get(vpiDirection, obj_h)) { @@ -617,12 +616,12 @@ void UhdmAst::process_port() { void UhdmAst::process_module() { std::string type = vpi_get_str(vpiDefName, obj_h); std::string name = vpi_get_str(vpiName, obj_h) ? vpi_get_str(vpiName, obj_h) : type; - bool cell_instance = type == name; + bool is_module_instance = type != name; sanitize_symbol_name(type); sanitize_symbol_name(name); type = strip_package_name(type); name = strip_package_name(name); - if (cell_instance) { + if (!is_module_instance) { if (shared.top_nodes.find(type) != shared.top_nodes.end()) { current_node = shared.top_nodes[type]; visit_one_to_many({vpiModule, @@ -641,7 +640,11 @@ void UhdmAst::process_module() { add_or_replace_child(current_node, node); } }); - current_node->attributes.erase(ID::partial); + auto it = current_node->attributes.find(ID::partial); + if (it != current_node->attributes.end()) { + delete it->second; + current_node->attributes.erase(it); + } } else { current_node = make_ast_node(AST::AST_MODULE); current_node->str = type; @@ -676,13 +679,12 @@ void UhdmAst::process_module() { } else { // Not a top module, create instance current_node = make_ast_node(AST::AST_CELL); - std::string module_parameters; visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode* node) { if (node) { - if (!(cell_instance || (node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT))) { + if (!(node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT)) { if (node->children[0]->str != "") module_parameters += node->str + "=" + node->children[0]->str; else @@ -713,6 +715,10 @@ void UhdmAst::process_module() { } module_node->str = module_name; shared.top_nodes[module_node->str] = module_node; + auto cell_instance = vpi_get(vpiCellInstance, obj_h); + if (cell_instance) { + module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); + } visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode* node) { @@ -745,16 +751,11 @@ void UhdmAst::process_module() { } } else if ((module_node->attributes.count(ID::partial) && module_node->attributes[ID::partial]->integer == 2)) { // When module definition is not parsed by Surelog, left setting parameters to yosys - auto clone = node->clone(); - clone->type = AST::AST_PARASET; - current_node->children.push_back(clone); + node->type = AST::AST_PARASET; + current_node->children.push_back(node); } } }); - auto cell_instance = vpi_get(vpiCellInstance, obj_h); - if (cell_instance) { - module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); - } //TODO: setting keep attribute probably shouldn't be needed, // but without this, modules that are generated in genscope are removed // for now lets just add this attribute @@ -762,8 +763,10 @@ void UhdmAst::process_module() { if (module_node->attributes.count(ID::partial)) { AST::AstNode *attr = module_node->attributes.at(ID::partial); if (attr->type == AST::AST_CONSTANT) - if (attr->integer == 1) + if (attr->integer == 1) { + delete attr; module_node->attributes.erase(ID::partial); + } } auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); typeNode->str = module_node->str; @@ -868,6 +871,7 @@ void UhdmAst::process_typespec_member() { break; } } + vpi_release_handle(typespec_h); } void UhdmAst::process_enum_typespec() { @@ -919,6 +923,7 @@ void UhdmAst::process_enum_typespec() { break; } } + vpi_release_handle(typespec_h); } } @@ -1000,10 +1005,11 @@ void UhdmAst::process_array_var() { current_node->is_custom_type = true; shared.report.mark_handled(reg_h); shared.report.mark_handled(typespec_h); + vpi_release_handle(typespec_h); } - vpi_free_object(reg_h); + vpi_release_handle(reg_h); } - vpi_free_object(itr); + vpi_release_handle(itr); visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode* node) { @@ -1083,6 +1089,7 @@ void UhdmAst::process_cont_assign() { auto net_decl_assign = vpi_get(vpiNetDeclAssign, obj_h); vpiHandle node_lhs_h = vpi_handle(vpiLhs, obj_h); auto lhs_net_type = vpi_get(vpiNetType, node_lhs_h); + vpi_release_handle(node_lhs_h); // Check if lhs is a subtype of a net bool isNet; @@ -1172,19 +1179,20 @@ void UhdmAst::process_array_net() { }); shared.report.mark_handled(net_h); } else if (net_type == vpiStructNet) { - vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h); - std::string name = vpi_get_str(vpiName, typespec_h); - sanitize_symbol_name(name); - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = name; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type = true; - shared.report.mark_handled(net_h); - shared.report.mark_handled(typespec_h); + vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h); + std::string name = vpi_get_str(vpiName, typespec_h); + sanitize_symbol_name(name); + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = name; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + shared.report.mark_handled(net_h); + shared.report.mark_handled(typespec_h); + vpi_release_handle(typespec_h); } - vpi_free_object(net_h); + vpi_release_handle(net_h); } - vpi_free_object(itr); + vpi_release_handle(itr); visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode* node) { @@ -1676,7 +1684,7 @@ void UhdmAst::process_cast_op() { }); vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); shared.report.mark_handled(typespec_h); - vpi_free_object(typespec_h); + vpi_release_handle(typespec_h); } void UhdmAst::process_inside_op() { @@ -1789,7 +1797,7 @@ void UhdmAst::process_tagged_pattern() { range->children.push_back(index); current_node->children[0]->children.push_back(range); } - vpi_free_object(typespec_h); + vpi_release_handle(typespec_h); visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode* node) { @@ -1813,7 +1821,7 @@ void UhdmAst::process_part_select() { current_node = make_ast_node(AST::AST_IDENTIFIER); vpiHandle parent_h = vpi_handle(vpiParent, obj_h); current_node->str = get_name(parent_h); - vpi_free_object(parent_h); + vpi_release_handle(parent_h); auto range_node = new AST::AstNode(AST::AST_RANGE); range_node->filename = current_node->filename; range_node->location = current_node->location; @@ -1830,7 +1838,7 @@ void UhdmAst::process_indexed_part_select() { current_node = make_ast_node(AST::AST_IDENTIFIER); vpiHandle parent_h = vpi_handle(vpiParent, obj_h); current_node->str = get_name(parent_h); - vpi_free_object(parent_h); + vpi_release_handle(parent_h); //TODO: check if there are other types, for now only handle 1 and 2 (+: and -:) auto indexed_part_select_type = vpi_get(vpiIndexedPartSelectType, obj_h) == 1 ? AST::AST_ADD : AST::AST_SUB; auto range_node = new AST::AstNode(AST::AST_RANGE); diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index e3bc07e54..d627959b7 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -107,6 +107,7 @@ struct UhdmAstFrontend : public Frontend { if (report_directory != "") { shared.report.write(report_directory); } + for (auto design : restoredDesigns) vpi_release_handle(design); bool dump_ast1 = shared.debug_flag; bool dump_ast2 = shared.debug_flag; bool dont_redefine = false; From 8642053db7543927ffced4381b5fb5d304dbf230 Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Fri, 6 Aug 2021 11:35:35 +0200 Subject: [PATCH 406/845] Fix more leaks Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 798fe7462..1f674ea58 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -451,7 +451,9 @@ void UhdmAst::process_parameter() { visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode* node) { - shared.param_types[current_node->str] = node; + auto it = shared.param_types.find(current_node->str); + if (it == shared.param_types.end()) + shared.param_types.insert(std::make_pair(current_node->str, node)); }); break; } @@ -1508,8 +1510,14 @@ void UhdmAst::process_operation() { current_node = concat_node; break; } - case vpiNullOp: current_node = nullptr; break; //do nothing + case vpiNullOp: { + delete current_node; + current_node = nullptr; + break; + } default: { + delete current_node; + current_node = nullptr; const uhdm_handle* const handle = (const uhdm_handle*) obj_h; const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; report_error("Encountered unhandled operation type %d at %s:%d\n", operation, @@ -1874,8 +1882,10 @@ void UhdmAst::process_var_select() { [&](AST::AstNode* node) { if (node->str == current_node->str) { for (auto child : node->children) { - current_node->children.push_back(child->clone()); + current_node->children.push_back(child); } + node->children.clear(); + delete node; } else { auto range_node = new AST::AstNode(AST::AST_RANGE); range_node->filename = current_node->filename; @@ -2001,6 +2011,8 @@ void UhdmAst::process_gen_scope_array() { current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); + genscope_node->children.clear(); + delete genscope_node; }); } @@ -2020,11 +2032,10 @@ void UhdmAst::process_gen_scope() { [&](AST::AstNode* node) { if (node) { if ((node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) && - node->children.size() == 0) { - - return; //skip parameters without any children - } - current_node->children.push_back(node); + node->children.size() == 0) + delete node; //skip parameters without any children + else + current_node->children.push_back(node); } }); } From 89ba56a8a23aed337983826707887a5215163afe Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Fri, 6 Aug 2021 16:31:57 +0200 Subject: [PATCH 407/845] Changes after review Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 1f674ea58..22c77f240 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -115,7 +115,7 @@ void UhdmAst::visit_default_expr(vpiHandle obj_h) { if (initial_node == nullptr) { initial_node = new AST::AstNode(AST::AST_INITIAL); auto insert_it = find_if(mod->children.begin(), mod->children.end(), [](AST::AstNode *node) { return (node->type == AST::AST_ALWAYS); }); - mod->children.insert(insert_it, 1, initial_node); + mod->children.insert(insert_it, initial_node); } // Ensure single AST_BLOCK node in AST_INITIAL if (initial_node->children.size() && initial_node->children[0]) { @@ -124,16 +124,11 @@ void UhdmAst::visit_default_expr(vpiHandle obj_h) { block_node = new AST::AstNode(AST::AST_BLOCK); initial_node->children.push_back(block_node); } - auto block_child = block_node->children.begin(); - for (; block_child != block_node->children.end(); block_child++) { - if ((*block_child)->type == AST::AST_ASSIGN_EQ) { - break; - } - } + auto block_child = find_if(block_node->children.begin(), block_node->children.end(), [](AST::AstNode *node) { return (node->type == AST::AST_ASSIGN_EQ); }); // Insert AST_ASSIGN_EQ nodes that came from // custom_var or int_var before any other AST_ASSIGN_EQ // Especially before ones explicitly placed in initial block in source code - block_node->children.insert(block_child, 1, assign_node); + block_node->children.insert(block_child, assign_node); assign_node->children.push_back(id_node); initial_ast.current_node = initial_node; block_ast.current_node = block_node; From 000a0142bd49a5b3b1a786e95b76776af144d496 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 17 Aug 2021 13:59:44 +0200 Subject: [PATCH 408/845] Fix renaming black-boxes Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 22c77f240..ce8a4b927 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -681,7 +681,7 @@ void UhdmAst::process_module() { obj_h, [&](AST::AstNode* node) { if (node) { - if (!(node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT)) { + if (shared.top_nodes.count(type) && !(node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT)) { if (node->children[0]->str != "") module_parameters += node->str + "=" + node->children[0]->str; else From 4fa273a004d6f78a5fd5294dc54a9870bb007af6 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 18 Aug 2021 12:14:25 +0200 Subject: [PATCH 409/845] Fix unsized StrVal consts Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ce8a4b927..e94e0a718 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -179,15 +179,13 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) { return VERILOG_FRONTEND::const2ast(val.value.str, 0, false); } else { auto size = vpi_get(vpiSize, obj_h); - if(size == 0 && strlen(val.value.str) == 1) { - return AST::AstNode::mkconst_int(atoi(val.value.str), true, 1); - } - std::string size_str = ""; - if (size != 0) { - size_str = std::to_string(size); + if(size == 0) { + auto c = AST::AstNode::mkconst_int(atoi(val.value.str), true, 64); + c->is_unsized = true; + return c; + } else { + return VERILOG_FRONTEND::const2ast(std::to_string(size) + strValType + val.value.str, 0, false); } - auto str = size_str + strValType + val.value.str; - return VERILOG_FRONTEND::const2ast(str, 0, false); } } return nullptr; From 821a9615b20b99e9d0948c9bad0394a96f636023 Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Wed, 18 Aug 2021 14:22:59 +0200 Subject: [PATCH 410/845] Ignore delay controls Signed-off-by: Krzysztof Bieganski --- uhdm-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index e94e0a718..2bcfc79a7 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2340,6 +2340,7 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { break; case vpiHierPath: process_hier_path(); break; case UHDM::uhdmimport: break; + case vpiDelayControl: break; case vpiLogicTypespec: process_logic_typespec(); break; case vpiIntTypespec: process_int_typespec(); break; case vpiBitTypespec: process_bit_typespec(); break; From 82491097e99da01cb4afd8725ded328741e8a13a Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 19 Aug 2021 12:45:06 +0200 Subject: [PATCH 411/845] Add initial support for vpiStringTypespec/vpiStringVar Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 43 ++++++++++++++++++++++++++++++++++++++++++ uhdm-plugin/UhdmAst.h | 2 ++ 2 files changed, 45 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 2bcfc79a7..5f368ed8d 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2252,6 +2252,47 @@ void UhdmAst::process_int_typespec() { } } +void UhdmAst::process_string_var() { + current_node = make_ast_node(AST::AST_WIRE); + current_node->is_string = true; + // FIXME: + // this is only basic support for strings, + // currently yosys doesn't support dynamic resize of wire + // based on string size + // here we try to get size of string based on provided const string + // if it is not available, we are setting size to explicite 64 bits + visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *expr_node) { + if (expr_node->type == AST::AST_CONSTANT) { + auto left_const = AST::AstNode::mkconst_int(expr_node->range_left, true); + auto right_const = AST::AstNode::mkconst_int(expr_node->range_right, true); + auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); + current_node->children.push_back(range); + } + + }); + if (current_node->children.size() == 0) { + auto left_const = AST::AstNode::mkconst_int(64, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); + current_node->children.push_back(range); + } + visit_default_expr(obj_h); +} + +void UhdmAst::process_string_typespec() { + current_node = make_ast_node(AST::AST_WIRE); + current_node->is_string = true; + // FIXME: + // this is only basic support for strings, + // currently yosys doesn't support dynamic resize of wire + // based on string size + // here, we are setting size to explicite 64 bits + auto left_const = AST::AstNode::mkconst_int(64, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); + current_node->children.push_back(range); +} + void UhdmAst::process_bit_typespec() { current_node = make_ast_node(AST::AST_WIRE); visit_range(obj_h, @@ -2344,6 +2385,8 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { case vpiLogicTypespec: process_logic_typespec(); break; case vpiIntTypespec: process_int_typespec(); break; case vpiBitTypespec: process_bit_typespec(); break; + case vpiStringVar: process_string_var(); break; + case vpiStringTypespec: process_string_typespec(); break; case vpiProgram: default: report_error("Encountered unhandled object '%s' of type '%s' at %s:%d\n", object->VpiName().c_str(), UHDM::VpiTypeName(obj_h).c_str(), object->VpiFile().c_str(), object->VpiLineNo()); break; diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index b833f8135..a0ebea617 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -128,6 +128,8 @@ class UhdmAst { void process_logic_typespec(); void process_int_typespec(); void process_bit_typespec(); + void process_string_var(); + void process_string_typespec(); UhdmAst(UhdmAst* p, UhdmAstShared& s, const std::string& i) : parent(p), shared(s), indent(i) { if (parent) node_renames = parent->node_renames; From bb82a6cc76b697c3556200aeda12e74f4ff48f34 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 19 Aug 2021 15:51:58 +0200 Subject: [PATCH 412/845] Add empty tests target Signed-off-by: Kamil Rakoczy --- uhdm-plugin/tests/Makefile | 1 + 1 file changed, 1 insertion(+) create mode 100644 uhdm-plugin/tests/Makefile diff --git a/uhdm-plugin/tests/Makefile b/uhdm-plugin/tests/Makefile new file mode 100644 index 000000000..320dfcfcb --- /dev/null +++ b/uhdm-plugin/tests/Makefile @@ -0,0 +1 @@ +include $(shell pwd)/../../Makefile_test.common From 257f69e77b9530af3b8114ae9619ecb2511e1468 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 20 Aug 2021 09:46:29 +0200 Subject: [PATCH 413/845] CI: run only on pull_request and uhdm-plugin Signed-off-by: Kamil Rakoczy --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8c05194b..2e9419c75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,11 @@ name: CI tests -on: [push, pull_request] +on: + push: + branches: + - uhdm-plugin + pull_request: jobs: From 817388e3d2193f6b6efa9c6bc2d9810aeb8679ba Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 20 Aug 2021 10:27:07 +0200 Subject: [PATCH 414/845] CI: disable running tests Signed-off-by: Kamil Rakoczy --- .github/workflows/build-and-test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index 3f0525af1..2ed8ab903 100644 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -25,9 +25,12 @@ end_section ########################################################################## -start_section Testing -make test -j`nproc` -end_section +#Disable testing for now, as we do not have +#tests for uhdm-plugin and tests for +#other plugins are failing +#start_section Testing +#make test -j`nproc` +#end_section ########################################################################## From 1bde70ef3ec17465549b4a172b5e8e252d47d929 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Tue, 24 Aug 2021 18:43:01 -0700 Subject: [PATCH 415/845] Use .empty() to check for empty on containers and strings. https://clang.llvm.org/extra/clang-tidy/checks/readability-container-size-empty.html For std::string::find() with a single character, use that specialized method. Signed-off-by: Henner Zeller --- uhdm-plugin/UhdmAst.cc | 51 +++++++++++++++++----------------- uhdm-plugin/uhdmastfrontend.cc | 3 +- uhdm-plugin/uhdmastreport.cc | 6 ++-- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5f368ed8d..63761df83 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -14,7 +14,7 @@ YOSYS_NAMESPACE_BEGIN static void sanitize_symbol_name(std::string &name) { if (!name.empty()) { - auto pos = name.find_last_of("@"); + auto pos = name.find_last_of('@'); name = name.substr(pos+1); // symbol names must begin with '\' name.insert(0, "\\"); @@ -29,8 +29,8 @@ static std::string get_name(vpiHandle obj_h) { name = s; } else if (auto s = vpi_get_str(vpiFullName, obj_h)) { name = s; - if (name.rfind(".") != std::string::npos) { - name = name.substr(name.rfind(".") + 1); + if (name.rfind('.') != std::string::npos) { + name = name.substr(name.rfind('.') + 1); } } sanitize_symbol_name(name); @@ -118,7 +118,7 @@ void UhdmAst::visit_default_expr(vpiHandle obj_h) { mod->children.insert(insert_it, initial_node); } // Ensure single AST_BLOCK node in AST_INITIAL - if (initial_node->children.size() && initial_node->children[0]) { + if (!initial_node->children.empty() && initial_node->children[0]) { block_node = initial_node->children[0]; } else { block_node = new AST::AstNode(AST::AST_BLOCK); @@ -285,8 +285,8 @@ static void add_or_replace_child(AST::AstNode* parent, AST::AstNode* child) { } void UhdmAst::make_cell(vpiHandle obj_h, AST::AstNode* cell_node, AST::AstNode* type_node) { - if (cell_node->children.size() == 0 || - (cell_node->children.size() > 1 && cell_node->children[0]->type != AST::AST_CELLTYPE)) { + if (cell_node->children.empty() || + (!cell_node->children.empty() && cell_node->children[0]->type != AST::AST_CELLTYPE)) { auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); typeNode->str = type_node->str; cell_node->children.insert(cell_node->children.begin(), typeNode); @@ -334,7 +334,7 @@ void UhdmAst::move_type_to_new_typedef(AST::AstNode* current_node, AST::AstNode* auto wire_node = new AST::AstNode(AST::AST_WIRE); for (auto c : base_type->children) { std::string enum_item_str = "\\enum_value_"; - log_assert(c->children.size() > 0); + log_assert(!c->children.empty()); log_assert(c->children[0]->type == AST::AST_CONSTANT); int width = 1; bool is_signed = c->children[0]->is_signed; @@ -583,7 +583,7 @@ void UhdmAst::process_port() { obj_h, [&](AST::AstNode* node) { if (node) { - if (node->str != "") { + if (!node->str.empty()) { auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); wiretype_node->str = node->str; // wiretype needs to be 1st node (if port have also another range nodes) @@ -679,8 +679,8 @@ void UhdmAst::process_module() { obj_h, [&](AST::AstNode* node) { if (node) { - if (shared.top_nodes.count(type) && !(node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT)) { - if (node->children[0]->str != "") + if (shared.top_nodes.count(type) && !(!node->children.empty() && node->children[0]->type != AST::AST_CONSTANT)) { + if (!node->children[0]->str.empty()) module_parameters += node->str + "=" + node->children[0]->str; else module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); @@ -692,7 +692,7 @@ void UhdmAst::process_module() { std::string module_name; if (module_parameters.size() > 60) module_name = "$paramod$" + sha1(module_parameters) + type; - else if(module_parameters != "") + else if(!module_parameters.empty()) module_name = "$paramod" + type + module_parameters; else module_name = type; auto module_node = shared.top_nodes[module_name]; @@ -725,7 +725,7 @@ void UhdmAst::process_module() { child->type != AST::AST_REALVALUE;}); if (parent_node != module_node->children.end()) { if ((*parent_node)->type == AST::AST_PARAMETER) { - if (cell_instance || (node->children.size() > 0 && node->children[0]->type != AST::AST_CONSTANT)) { //if cell is a blackbox or we need to simplify parameter first, left setting parameters to yosys + if (cell_instance || (!node->children.empty() && node->children[0]->type != AST::AST_CONSTANT)) { //if cell is a blackbox or we need to simplify parameter first, left setting parameters to yosys // We only want to add AST_PARASET for parameters that is different than already set // to match the name yosys gives to the module. // Note: this should also be applied for other (not only cell_instance) modules @@ -948,7 +948,7 @@ void UhdmAst::process_custom_var() { auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); wiretype_node->str = node->str; current_node->children.push_back(wiretype_node); - if (parent && std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(node->str, parent->str)) == shared.type_names.end() && node->children.size() > 0) { + if (parent && std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(node->str, parent->str)) == shared.type_names.end() && !node->children.empty()) { move_type_to_new_typedef(parent, node); } else { delete node; @@ -1294,7 +1294,7 @@ void UhdmAst::process_io_decl() { obj_h, [&](AST::AstNode* node) { if (node) { - if (node->str != "") { + if (!node->str.empty()) { auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); wiretype_node->str = node->str; // wiretype needs to be 1st node (if port have also another range nodes) @@ -1559,7 +1559,7 @@ void UhdmAst::process_stream_op() { AST::AstNode *bits_call = nullptr; if (lhs_node->type == AST::AST_WIRE) { module_node->children.insert(module_node->children.begin(), lhs_node->clone()); - temp_var = lhs_node->clone(); //if we already have wire as lhs, we want to create the same wire for temp_var + temp_var = lhs_node->clone(); //if we already have wire as lhs, we want to create the same wire for temp_var lhs_node->delete_children(); lhs_node->type = AST::AST_IDENTIFIER; bits_call = make_ast_node(AST::AST_FCALL, {lhs_node->clone()}); @@ -1993,8 +1993,8 @@ void UhdmAst::process_gen_scope_array() { auto *param = new AST::AstNode(AST::AST_IDENTIFIER); param->str = child->str; auto *field = new AST::AstNode(AST::AST_IDENTIFIER); - field->str = "\\" + node->str.substr(node->str.rfind("]") + 2); - node->str = node->str.substr(0, node->str.find("[")); + field->str = "\\" + node->str.substr(node->str.rfind(']') + 2); + node->str = node->str.substr(0, node->str.find('[')); node->children.push_back(param); node->children.push_back(field); } @@ -2025,10 +2025,11 @@ void UhdmAst::process_gen_scope() { [&](AST::AstNode* node) { if (node) { if ((node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) && - node->children.size() == 0) + node->children.empty()) { delete node; //skip parameters without any children - else + } else { current_node->children.push_back(node); + } } }); } @@ -2206,7 +2207,7 @@ void UhdmAst::process_hier_path() { visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode* node) { - if (current_node->str == "\\" && node->children.size() > 0 && node->children[0]->type == AST::AST_RANGE) { + if (current_node->str == "\\" && !node->children.empty() && node->children[0]->type == AST::AST_RANGE) { current_node->type = AST::AST_PREFIX; current_node->str = node->str; current_node->children.push_back(node->children[0]->children[0]->clone()); @@ -2235,7 +2236,7 @@ void UhdmAst::process_logic_typespec() { current_node->children.push_back(node); } }); - if (current_node->str != "") { + if (!current_node->str.empty()) { move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); } } @@ -2247,7 +2248,7 @@ void UhdmAst::process_int_typespec() { auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); current_node->children.push_back(range); current_node->is_signed = true; - if (current_node->str != "") { + if (!current_node->str.empty()) { move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); } } @@ -2268,9 +2269,8 @@ void UhdmAst::process_string_var() { auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); current_node->children.push_back(range); } - }); - if (current_node->children.size() == 0) { + if (current_node->children.empty()) { auto left_const = AST::AstNode::mkconst_int(64, true); auto right_const = AST::AstNode::mkconst_int(0, true); auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); @@ -2301,7 +2301,7 @@ void UhdmAst::process_bit_typespec() { current_node->children.push_back(node); } }); - if (current_node->str != "") { + if (!current_node->str.empty()) { move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); } } @@ -2426,4 +2426,3 @@ void UhdmAst::report_error(const char *format, ...) const { } YOSYS_NAMESPACE_END - diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index d627959b7..daf1d7d01 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -104,7 +104,7 @@ struct UhdmAstFrontend : public Frontend { UHDM::visit_object(design, 1, "", &shared.report.unhandled, shared.debug_flag ? std::cout : strstr); } current_ast = uhdm_ast.visit_designs(restoredDesigns); - if (report_directory != "") { + if (!report_directory.empty()) { shared.report.write(report_directory); } for (auto design : restoredDesigns) vpi_release_handle(design); @@ -121,4 +121,3 @@ struct UhdmAstFrontend : public Frontend { } UhdmAstFrontend; YOSYS_NAMESPACE_END - diff --git a/uhdm-plugin/uhdmastreport.cc b/uhdm-plugin/uhdmastreport.cc index f38798890..2043cdb4c 100644 --- a/uhdm-plugin/uhdmastreport.cc +++ b/uhdm-plugin/uhdmastreport.cc @@ -34,7 +34,7 @@ static std::string replace_in_string(std::string str, const std::string& to_find void UhdmAstReport::write(const std::string& directory) { std::unordered_map> unhandled_per_file; for (auto object : unhandled) { - if (object->VpiFile() != "" && object->VpiFile() != AST::current_filename) { + if (!object->VpiFile().empty() && object->VpiFile() != AST::current_filename) { unhandled_per_file.insert(std::make_pair(object->VpiFile(), std::unordered_set())); unhandled_per_file.at(object->VpiFile()).insert(object->VpiLineNo()); handled_count_per_file.insert(std::make_pair(object->VpiFile(), 0)); @@ -42,12 +42,12 @@ void UhdmAstReport::write(const std::string& directory) { } unsigned total_handled = 0; for (auto& hc : handled_count_per_file) { - if (hc.first != "" && hc.first != AST::current_filename) { + if (!hc.first.empty() && hc.first != AST::current_filename) { unhandled_per_file.insert(std::make_pair(hc.first, std::unordered_set())); total_handled += hc.second; } } - float coverage = total_handled * 100.f / (total_handled + unhandled.size()); + float coverage = total_handled * 100.f / (total_handled + unhandled.size()); mkdir(directory.c_str(), 0777); std::ofstream index_file(directory + "/index.html"); index_file << "\n\n\n\n" << std::endl; From b79d6cd296c7f4e0b415513bb05a1bb563bef6dc Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Mon, 30 Aug 2021 11:55:52 -0700 Subject: [PATCH 416/845] Report errors at the front of the message. With this more standard message formatting, it is easier to spot the location with limited horizontal space visible (e.g. sv-test log output). Signed-off-by: Henner Zeller --- uhdm-plugin/UhdmAst.cc | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 63761df83..84bcb3a24 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -170,8 +170,7 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) { default: { const uhdm_handle* const handle = (const uhdm_handle*) obj_h; const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("Encountered unhandled constant format %d at %s:%d\n", val.format, - object->VpiFile().c_str(), object->VpiLineNo()); + report_error("%s:%d: Encountered unhandled constant format %d\n", object->VpiFile().c_str(), object->VpiLineNo(), val.format); } } // handle vpiBinStrVal, vpiDecStrVal and vpiHexStrVal @@ -453,9 +452,8 @@ void UhdmAst::process_parameter() { default: { const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("Encountered unhandled typespec in process_parameter: '%s' of type '%s' at %s:%d\n", - object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str(), object->VpiFile().c_str(), - object->VpiLineNo()); + report_error("%s:%d: Encountered unhandled typespec in process_parameter: '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), + object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); break; } } @@ -570,8 +568,8 @@ void UhdmAst::process_port() { default: { const uhdm_handle* const handle = (const uhdm_handle*) actual_h; const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("Encountered unhandled type in process_port: %s at %s:%d\n", UHDM::VpiTypeName(actual_h).c_str(), - object->VpiFile().c_str(), object->VpiLineNo()); + report_error("%s:%d: Encountered unhandled type in process_port: %s\n", object->VpiFile().c_str(), object->VpiLineNo(), + UHDM::VpiTypeName(actual_h).c_str()); break; } } @@ -860,9 +858,9 @@ void UhdmAst::process_typespec_member() { default: { const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("Encountered unhandled typespec in process_typespec_member: '%s' of type '%s' at %s:%d\n", - object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str(), object->VpiFile().c_str(), - object->VpiLineNo()); + report_error("%s:%d: Encountered unhandled typespec in process_typespec_member: '%s' of type '%s'\n", object->VpiFile().c_str(), + object->VpiLineNo(), + object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); break; } } @@ -912,9 +910,9 @@ void UhdmAst::process_enum_typespec() { default: { const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("Encountered unhandled typespec in process_enum_typespec: '%s' of type '%s' at %s:%d\n", - object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str(), object->VpiFile().c_str(), - object->VpiLineNo()); + report_error("%s:%d: Encountered unhandled typespec in process_enum_typespec: '%s' of type '%s'\n", object->VpiFile().c_str(), + object->VpiLineNo(), + object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); break; } } @@ -1513,8 +1511,7 @@ void UhdmAst::process_operation() { current_node = nullptr; const uhdm_handle* const handle = (const uhdm_handle*) obj_h; const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("Encountered unhandled operation type %d at %s:%d\n", operation, - object->VpiFile().c_str(), object->VpiLineNo()); + report_error("%s:%d: Encountered unhandled operation type %d\n", object->VpiFile().c_str(), object->VpiLineNo(), operation); } } } @@ -2388,8 +2385,9 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { case vpiStringVar: process_string_var(); break; case vpiStringTypespec: process_string_typespec(); break; case vpiProgram: - default: report_error("Encountered unhandled object '%s' of type '%s' at %s:%d\n", object->VpiName().c_str(), - UHDM::VpiTypeName(obj_h).c_str(), object->VpiFile().c_str(), object->VpiLineNo()); break; + default: report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), object->VpiName().c_str(), + UHDM::VpiTypeName(obj_h).c_str()); + break; } // Check if we initialized the node in switch-case From 3bd8588a92b700169e2db0104489a0143b374bfd Mon Sep 17 00:00:00 2001 From: Tomasz Jurtsch Date: Thu, 19 Aug 2021 13:59:06 +0200 Subject: [PATCH 417/845] uhdm-plugin: link with libsurelog Signed-off-by: Tomasz Jurtsch --- uhdm-plugin/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index ef53dac99..38899bc71 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -8,8 +8,9 @@ include ../Makefile_plugin.common CPPFLAGS += -std=c++14 -I${UHDM_INSTALL_DIR}/include/uhdm \ -I${UHDM_INSTALL_DIR}/include/uhdm/include \ - -I${UHDM_INSTALL_DIR}/include/uhdm/headers + -I${UHDM_INSTALL_DIR}/include/uhdm/headers \ + -I${UHDM_INSTALL_DIR}/include/surelog CXXFLAGS += -Wno-inconsistent-missing-override -LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib -LDLIBS += -luhdm -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread +LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib/surelog -L${UHDM_INSTALL_DIR}/lib +LDLIBS += -luhdm -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread -lsurelog From b49b803f2df7984906eeea32ed3672cc0777cc78 Mon Sep 17 00:00:00 2001 From: Tomasz Jurtsch Date: Thu, 19 Aug 2021 14:18:53 +0200 Subject: [PATCH 418/845] uhdm-plugin: bump C++ standard to 2017 Signed-off-by: Tomasz Jurtsch --- uhdm-plugin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 38899bc71..a98456077 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -6,7 +6,7 @@ SOURCES = UhdmAst.cc \ include ../Makefile_plugin.common -CPPFLAGS += -std=c++14 -I${UHDM_INSTALL_DIR}/include/uhdm \ +CPPFLAGS += -std=c++17 -I${UHDM_INSTALL_DIR}/include/uhdm \ -I${UHDM_INSTALL_DIR}/include/uhdm/include \ -I${UHDM_INSTALL_DIR}/include/uhdm/headers \ -I${UHDM_INSTALL_DIR}/include/surelog From a506a3a70199de862584ee0bbf43aee6de53008a Mon Sep 17 00:00:00 2001 From: Tomasz Jurtsch Date: Thu, 19 Aug 2021 14:22:56 +0200 Subject: [PATCH 419/845] uhdm-plugin: supress unused parameter warning Signed-off-by: Tomasz Jurtsch --- uhdm-plugin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index a98456077..97d314ab3 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -11,6 +11,6 @@ CPPFLAGS += -std=c++17 -I${UHDM_INSTALL_DIR}/include/uhdm \ -I${UHDM_INSTALL_DIR}/include/uhdm/headers \ -I${UHDM_INSTALL_DIR}/include/surelog -CXXFLAGS += -Wno-inconsistent-missing-override +CXXFLAGS += -Wno-inconsistent-missing-override -Wno-unused-parameter LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib/surelog -L${UHDM_INSTALL_DIR}/lib LDLIBS += -luhdm -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread -lsurelog From 94d3280ad66098873372aa359cb83565598c8955 Mon Sep 17 00:00:00 2001 From: Tomasz Jurtsch Date: Fri, 20 Aug 2021 13:54:01 +0200 Subject: [PATCH 420/845] wip: uhdm-plugin: copy Surelog's main.cpp Signed-off-by: Tomasz Jurtsch --- uhdm-plugin/uhdmastfrontend.cc | 212 +++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index daf1d7d01..94c6923bc 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -23,6 +23,19 @@ #include "frontends/ast/ast.h" #include "UhdmAst.h" +#if defined(_MSC_VER) +#include +#include +#else +#include +#include +#endif + +#include "API/PythonAPI.h" +#include "ErrorReporting/Report.h" +#include "StringUtils.h" +#include "surelog.h" + namespace UHDM { extern void visit_object (vpiHandle obj_h, int indent, const char *relation, std::set* visited, std::ostream& out, bool shallowVisit = false); } @@ -43,6 +56,205 @@ get_line_num(void) return 1; } +unsigned int executeCompilation( + int argc, const char** argv, bool diff_comp_mode, bool fileunit, + SURELOG::ErrorContainer::Stats* overallStats = NULL) { + bool success = true; + bool noFatalErrors = true; + unsigned int codedReturn = 0; + SURELOG::SymbolTable* symbolTable = new SURELOG::SymbolTable(); + SURELOG::ErrorContainer* errors = new SURELOG::ErrorContainer(symbolTable); + SURELOG::CommandLineParser* clp = new SURELOG::CommandLineParser( + errors, symbolTable, diff_comp_mode, fileunit); + success = clp->parseCommandLine(argc, argv); + bool parseOnly = clp->parseOnly(); + errors->printMessages(clp->muteStdout()); + if (success && (!clp->help())) { + // Load Python scripts in the interpreter + if (clp->pythonListener() || clp->pythonEvalScriptPerFile() || + clp->pythonEvalScript()) { + SURELOG::PythonAPI::loadScripts(); + + if (!SURELOG::PythonAPI::isListenerLoaded()) { + SURELOG::Location loc(0); + SURELOG::Error err( + SURELOG::ErrorDefinition::PY_NO_PYTHON_LISTENER_FOUND, loc); + errors->addError(err); + } + } + + SURELOG::scompiler* compiler = SURELOG::start_compiler(clp); + if (!compiler) codedReturn |= 1; + SURELOG::shutdown_compiler(compiler); + } + SURELOG::ErrorContainer::Stats stats; + if (!clp->help()) { + stats = errors->getErrorStats(); + if (overallStats) (*overallStats) += stats; + if (stats.nbFatal) codedReturn |= 1; + if (stats.nbSyntax) codedReturn |= 2; + // Only return non-zero for fatal and syntax errors + // if (stats.nbError) + // codedReturn |= 4; + } + bool noFErrors = true; + if (!clp->help()) noFErrors = errors->printStats(stats, clp->muteStdout()); + if (noFErrors == false) { + noFatalErrors = false; + } + + std::string ext_command = clp->getExeCommand(); + if (!ext_command.empty()) { + std::string directory = symbolTable->getSymbol(clp->getFullCompileDir()); + std::string fileList = directory + "/file.lst"; + std::string command = ext_command + " " + fileList; + int result = system(command.c_str()); + codedReturn |= result; + std::cout << "Command result: " << result << std::endl; + } + clp->logFooter(); + if (diff_comp_mode && fileunit) { + SURELOG::Report* report = new SURELOG::Report(); + std::pair results = + report->makeDiffCompUnitReport(clp, symbolTable); + success = results.first; + noFatalErrors = results.second; + delete report; + } + clp->cleanCache(); // only if -nocache + delete clp; + delete symbolTable; + delete errors; + if ((!noFatalErrors) || (!success)) codedReturn |= 1; + if (parseOnly) + return 0; + else + return codedReturn; +} + +enum COMP_MODE { + NORMAL, + DIFF, + BATCH, +}; + +int batchCompilation(const char* argv0, std::string batchFile, bool nostdout) { + char path[10000]; + int returnCode = 0; + SURELOG::ErrorContainer::Stats overallStats; + char* p = getcwd(path, 9999); + if (!p) returnCode |= 1; + std::ifstream stream; + stream.open(batchFile); + if (!stream.good()) { + returnCode |= 1; + return returnCode; + } + std::string line; + int count = 0; + while (std::getline(stream, line)) { + if (!nostdout) + std::cout << "Processing: " << line << std::endl << std::flush; + std::vector args; + SURELOG::StringUtils::tokenize(line, " ", args); + int argc = args.size() + 1; + char** argv = new char*[argc]; + argv[0] = new char[strlen(argv0) + 1]; + strcpy(argv[0], argv0); + for (int i = 0; i < argc - 1; i++) { + argv[i + 1] = new char[args[i].length() + 1]; + strcpy(argv[i + 1], args[i].c_str()); + } + returnCode |= executeCompilation(argc, (const char**)argv, false, false, &overallStats); + for (int i = 0; i < argc; i++) { + delete[] argv[i]; + } + delete[] argv; + count++; + int ret = chdir(path); + if (ret < 0) { + std::cout << "FATAL: Could not change directory to " << path << "\n" << std::endl; + returnCode |= 1; + } + } + if (!nostdout) + std::cout << "Processed " << count << " tests." << std::endl << std::flush; + SURELOG::SymbolTable* symbolTable = new SURELOG::SymbolTable(); + SURELOG::ErrorContainer* errors = new SURELOG::ErrorContainer(symbolTable); + if (!nostdout) errors->printStats(overallStats); + delete errors; + delete symbolTable; + stream.close(); + return returnCode; +} + +int run_surelog(int argc, const char** argv) { + SURELOG::Waiver::initWaivers(); + + unsigned int codedReturn = 0; + COMP_MODE mode = NORMAL; + bool python_mode = true; + bool nostdout = false; + std::string batchFile; + std::string diff_unit_opt = "-diffcompunit"; + std::string nopython_opt = "-nopython"; + std::string parseonly_opt = "-parseonly"; + std::string batch_opt = "-batch"; + std::string nostdout_opt = "-nostdout"; + for (int i = 1; i < argc; i++) { + if (parseonly_opt == argv[i]) { + } else if (diff_unit_opt == argv[i]) { + mode = DIFF; + } else if (nopython_opt == argv[i]) { + python_mode = false; + } else if (batch_opt == argv[i]) { + batchFile = argv[i + 1]; + i++; + mode = BATCH; + } else if (nostdout_opt == argv[i]) { + nostdout = true; + } + } + + if (python_mode) SURELOG::PythonAPI::init(argc, argv); + + switch (mode) { + case DIFF: { +#if (defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)) + // REVISIT: Windows doesn't have the concept of forks! + // Implement it sequentially for now and optimize it if this + // proves to be a bottleneck (preferably, implemented as a + // cross platform solution). + executeCompilation(argc, argv, true, false); + codedReturn = executeCompilation(argc, argv, true, true); +#else + pid_t pid = fork(); + if (pid == 0) { + // child process + executeCompilation(argc, argv, true, false); + } else if (pid > 0) { + // parent process + codedReturn = executeCompilation(argc, argv, true, true); + } else { + // fork failed + printf("fork() failed!\n"); + return 1; + } +#endif + break; + } + case NORMAL: + codedReturn = executeCompilation(argc, argv, false, false); + break; + case BATCH: + codedReturn = batchCompilation(argv[0], batchFile, nostdout); + break; + } + + if (python_mode) SURELOG::PythonAPI::shutdown(); + return codedReturn; +} + struct UhdmAstFrontend : public Frontend { UhdmAstFrontend() : Frontend("uhdm", "read UHDM file") { } void help() From b853b0341a7cccb5c5e809609c08e1361fa99a37 Mon Sep 17 00:00:00 2001 From: Tomasz Jurtsch Date: Fri, 20 Aug 2021 15:43:28 +0200 Subject: [PATCH 421/845] udhm-plugin: remove surelog python api Signed-off-by: Tomasz Jurtsch --- uhdm-plugin/uhdmastfrontend.cc | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index 94c6923bc..51ebc2b55 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -31,7 +31,6 @@ #include #endif -#include "API/PythonAPI.h" #include "ErrorReporting/Report.h" #include "StringUtils.h" #include "surelog.h" @@ -70,19 +69,6 @@ unsigned int executeCompilation( bool parseOnly = clp->parseOnly(); errors->printMessages(clp->muteStdout()); if (success && (!clp->help())) { - // Load Python scripts in the interpreter - if (clp->pythonListener() || clp->pythonEvalScriptPerFile() || - clp->pythonEvalScript()) { - SURELOG::PythonAPI::loadScripts(); - - if (!SURELOG::PythonAPI::isListenerLoaded()) { - SURELOG::Location loc(0); - SURELOG::Error err( - SURELOG::ErrorDefinition::PY_NO_PYTHON_LISTENER_FOUND, loc); - errors->addError(err); - } - } - SURELOG::scompiler* compiler = SURELOG::start_compiler(clp); if (!compiler) codedReturn |= 1; SURELOG::shutdown_compiler(compiler); @@ -193,11 +179,9 @@ int run_surelog(int argc, const char** argv) { unsigned int codedReturn = 0; COMP_MODE mode = NORMAL; - bool python_mode = true; bool nostdout = false; std::string batchFile; std::string diff_unit_opt = "-diffcompunit"; - std::string nopython_opt = "-nopython"; std::string parseonly_opt = "-parseonly"; std::string batch_opt = "-batch"; std::string nostdout_opt = "-nostdout"; @@ -205,8 +189,6 @@ int run_surelog(int argc, const char** argv) { if (parseonly_opt == argv[i]) { } else if (diff_unit_opt == argv[i]) { mode = DIFF; - } else if (nopython_opt == argv[i]) { - python_mode = false; } else if (batch_opt == argv[i]) { batchFile = argv[i + 1]; i++; @@ -216,8 +198,6 @@ int run_surelog(int argc, const char** argv) { } } - if (python_mode) SURELOG::PythonAPI::init(argc, argv); - switch (mode) { case DIFF: { #if (defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)) @@ -251,7 +231,6 @@ int run_surelog(int argc, const char** argv) { break; } - if (python_mode) SURELOG::PythonAPI::shutdown(); return codedReturn; } From b28f0d3ee4b64a48dd7509daf9afa8d4f00a6ca5 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 2 Sep 2021 10:04:50 +0200 Subject: [PATCH 422/845] Remove include StringUtils Currently this file is not installed by Surelog. This include is only needed for batch mode Signed-off-by: Kamil Rakoczy --- uhdm-plugin/uhdmastfrontend.cc | 55 ++-------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-) diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index 51ebc2b55..906231039 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -32,7 +32,6 @@ #endif #include "ErrorReporting/Report.h" -#include "StringUtils.h" #include "surelog.h" namespace UHDM { @@ -124,56 +123,6 @@ enum COMP_MODE { BATCH, }; -int batchCompilation(const char* argv0, std::string batchFile, bool nostdout) { - char path[10000]; - int returnCode = 0; - SURELOG::ErrorContainer::Stats overallStats; - char* p = getcwd(path, 9999); - if (!p) returnCode |= 1; - std::ifstream stream; - stream.open(batchFile); - if (!stream.good()) { - returnCode |= 1; - return returnCode; - } - std::string line; - int count = 0; - while (std::getline(stream, line)) { - if (!nostdout) - std::cout << "Processing: " << line << std::endl << std::flush; - std::vector args; - SURELOG::StringUtils::tokenize(line, " ", args); - int argc = args.size() + 1; - char** argv = new char*[argc]; - argv[0] = new char[strlen(argv0) + 1]; - strcpy(argv[0], argv0); - for (int i = 0; i < argc - 1; i++) { - argv[i + 1] = new char[args[i].length() + 1]; - strcpy(argv[i + 1], args[i].c_str()); - } - returnCode |= executeCompilation(argc, (const char**)argv, false, false, &overallStats); - for (int i = 0; i < argc; i++) { - delete[] argv[i]; - } - delete[] argv; - count++; - int ret = chdir(path); - if (ret < 0) { - std::cout << "FATAL: Could not change directory to " << path << "\n" << std::endl; - returnCode |= 1; - } - } - if (!nostdout) - std::cout << "Processed " << count << " tests." << std::endl << std::flush; - SURELOG::SymbolTable* symbolTable = new SURELOG::SymbolTable(); - SURELOG::ErrorContainer* errors = new SURELOG::ErrorContainer(symbolTable); - if (!nostdout) errors->printStats(overallStats); - delete errors; - delete symbolTable; - stream.close(); - return returnCode; -} - int run_surelog(int argc, const char** argv) { SURELOG::Waiver::initWaivers(); @@ -227,8 +176,8 @@ int run_surelog(int argc, const char** argv) { codedReturn = executeCompilation(argc, argv, false, false); break; case BATCH: - codedReturn = batchCompilation(argv[0], batchFile, nostdout); - break; + printf("Currently batch mode is not supported!\n"); + return 1; } return codedReturn; From 516ef6249110038df688322a5297480bb5d0c889 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 2 Sep 2021 10:05:28 +0200 Subject: [PATCH 423/845] Add link to antlr4-runtime and flatbuffers Signed-off-by: Kamil Rakoczy --- uhdm-plugin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 97d314ab3..b7c5b99e9 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -13,4 +13,4 @@ CPPFLAGS += -std=c++17 -I${UHDM_INSTALL_DIR}/include/uhdm \ CXXFLAGS += -Wno-inconsistent-missing-override -Wno-unused-parameter LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib/surelog -L${UHDM_INSTALL_DIR}/lib -LDLIBS += -luhdm -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread -lsurelog +LDLIBS += -luhdm -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread -lsurelog -lantlr4-runtime -lflatbuffers From 7e19e8560f2712eee3ca5502ceeca330e6678115 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 2 Sep 2021 10:59:05 +0200 Subject: [PATCH 424/845] Split UHDM and UHDM-Surelog frontends Signed-off-by: Kamil Rakoczy --- uhdm-plugin/Makefile | 1 + uhdm-plugin/uhdmastfrontend.cc | 132 ------------ uhdm-plugin/uhdmsurelogastfrontend.cc | 279 ++++++++++++++++++++++++++ 3 files changed, 280 insertions(+), 132 deletions(-) create mode 100644 uhdm-plugin/uhdmsurelogastfrontend.cc diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index b7c5b99e9..6bcf438b3 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -1,6 +1,7 @@ NAME = uhdm SOURCES = UhdmAst.cc \ uhdmastfrontend.cc \ + uhdmsurelogastfrontend.cc \ uhdmastreport.cc \ vpivisitor.cc diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index 906231039..cdf2d9eb9 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -31,9 +31,6 @@ #include #endif -#include "ErrorReporting/Report.h" -#include "surelog.h" - namespace UHDM { extern void visit_object (vpiHandle obj_h, int indent, const char *relation, std::set* visited, std::ostream& out, bool shallowVisit = false); } @@ -54,135 +51,6 @@ get_line_num(void) return 1; } -unsigned int executeCompilation( - int argc, const char** argv, bool diff_comp_mode, bool fileunit, - SURELOG::ErrorContainer::Stats* overallStats = NULL) { - bool success = true; - bool noFatalErrors = true; - unsigned int codedReturn = 0; - SURELOG::SymbolTable* symbolTable = new SURELOG::SymbolTable(); - SURELOG::ErrorContainer* errors = new SURELOG::ErrorContainer(symbolTable); - SURELOG::CommandLineParser* clp = new SURELOG::CommandLineParser( - errors, symbolTable, diff_comp_mode, fileunit); - success = clp->parseCommandLine(argc, argv); - bool parseOnly = clp->parseOnly(); - errors->printMessages(clp->muteStdout()); - if (success && (!clp->help())) { - SURELOG::scompiler* compiler = SURELOG::start_compiler(clp); - if (!compiler) codedReturn |= 1; - SURELOG::shutdown_compiler(compiler); - } - SURELOG::ErrorContainer::Stats stats; - if (!clp->help()) { - stats = errors->getErrorStats(); - if (overallStats) (*overallStats) += stats; - if (stats.nbFatal) codedReturn |= 1; - if (stats.nbSyntax) codedReturn |= 2; - // Only return non-zero for fatal and syntax errors - // if (stats.nbError) - // codedReturn |= 4; - } - bool noFErrors = true; - if (!clp->help()) noFErrors = errors->printStats(stats, clp->muteStdout()); - if (noFErrors == false) { - noFatalErrors = false; - } - - std::string ext_command = clp->getExeCommand(); - if (!ext_command.empty()) { - std::string directory = symbolTable->getSymbol(clp->getFullCompileDir()); - std::string fileList = directory + "/file.lst"; - std::string command = ext_command + " " + fileList; - int result = system(command.c_str()); - codedReturn |= result; - std::cout << "Command result: " << result << std::endl; - } - clp->logFooter(); - if (diff_comp_mode && fileunit) { - SURELOG::Report* report = new SURELOG::Report(); - std::pair results = - report->makeDiffCompUnitReport(clp, symbolTable); - success = results.first; - noFatalErrors = results.second; - delete report; - } - clp->cleanCache(); // only if -nocache - delete clp; - delete symbolTable; - delete errors; - if ((!noFatalErrors) || (!success)) codedReturn |= 1; - if (parseOnly) - return 0; - else - return codedReturn; -} - -enum COMP_MODE { - NORMAL, - DIFF, - BATCH, -}; - -int run_surelog(int argc, const char** argv) { - SURELOG::Waiver::initWaivers(); - - unsigned int codedReturn = 0; - COMP_MODE mode = NORMAL; - bool nostdout = false; - std::string batchFile; - std::string diff_unit_opt = "-diffcompunit"; - std::string parseonly_opt = "-parseonly"; - std::string batch_opt = "-batch"; - std::string nostdout_opt = "-nostdout"; - for (int i = 1; i < argc; i++) { - if (parseonly_opt == argv[i]) { - } else if (diff_unit_opt == argv[i]) { - mode = DIFF; - } else if (batch_opt == argv[i]) { - batchFile = argv[i + 1]; - i++; - mode = BATCH; - } else if (nostdout_opt == argv[i]) { - nostdout = true; - } - } - - switch (mode) { - case DIFF: { -#if (defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)) - // REVISIT: Windows doesn't have the concept of forks! - // Implement it sequentially for now and optimize it if this - // proves to be a bottleneck (preferably, implemented as a - // cross platform solution). - executeCompilation(argc, argv, true, false); - codedReturn = executeCompilation(argc, argv, true, true); -#else - pid_t pid = fork(); - if (pid == 0) { - // child process - executeCompilation(argc, argv, true, false); - } else if (pid > 0) { - // parent process - codedReturn = executeCompilation(argc, argv, true, true); - } else { - // fork failed - printf("fork() failed!\n"); - return 1; - } -#endif - break; - } - case NORMAL: - codedReturn = executeCompilation(argc, argv, false, false); - break; - case BATCH: - printf("Currently batch mode is not supported!\n"); - return 1; - } - - return codedReturn; -} - struct UhdmAstFrontend : public Frontend { UhdmAstFrontend() : Frontend("uhdm", "read UHDM file") { } void help() diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc new file mode 100644 index 000000000..a81d3ee29 --- /dev/null +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -0,0 +1,279 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 Antmicro + + * Based on frontends/json/jsonparse.cc + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "kernel/yosys.h" +#include "frontends/ast/ast.h" +#include "UhdmAst.h" + +#if defined(_MSC_VER) +#include +#include +#else +#include +#include +#endif + +#include "ErrorReporting/Report.h" +#include "surelog.h" + +namespace UHDM { + extern void visit_object (vpiHandle obj_h, int indent, const char *relation, std::set* visited, std::ostream& out, bool shallowVisit = false); +} + + +YOSYS_NAMESPACE_BEGIN + +/* Stub for AST::process */ +static void +set_line_num(int) +{ +} + +/* Stub for AST::process */ +static int +get_line_num(void) +{ + return 1; +} + +unsigned int executeCompilation( + int argc, const char** argv, bool diff_comp_mode, bool fileunit, + SURELOG::ErrorContainer::Stats* overallStats = NULL) { + bool success = true; + bool noFatalErrors = true; + unsigned int codedReturn = 0; + SURELOG::SymbolTable* symbolTable = new SURELOG::SymbolTable(); + SURELOG::ErrorContainer* errors = new SURELOG::ErrorContainer(symbolTable); + SURELOG::CommandLineParser* clp = new SURELOG::CommandLineParser( + errors, symbolTable, diff_comp_mode, fileunit); + success = clp->parseCommandLine(argc, argv); + bool parseOnly = clp->parseOnly(); + errors->printMessages(clp->muteStdout()); + if (success && (!clp->help())) { + SURELOG::scompiler* compiler = SURELOG::start_compiler(clp); + if (!compiler) codedReturn |= 1; + SURELOG::shutdown_compiler(compiler); + } + SURELOG::ErrorContainer::Stats stats; + if (!clp->help()) { + stats = errors->getErrorStats(); + if (overallStats) (*overallStats) += stats; + if (stats.nbFatal) codedReturn |= 1; + if (stats.nbSyntax) codedReturn |= 2; + // Only return non-zero for fatal and syntax errors + // if (stats.nbError) + // codedReturn |= 4; + } + bool noFErrors = true; + if (!clp->help()) noFErrors = errors->printStats(stats, clp->muteStdout()); + if (noFErrors == false) { + noFatalErrors = false; + } + + std::string ext_command = clp->getExeCommand(); + if (!ext_command.empty()) { + std::string directory = symbolTable->getSymbol(clp->getFullCompileDir()); + std::string fileList = directory + "/file.lst"; + std::string command = ext_command + " " + fileList; + int result = system(command.c_str()); + codedReturn |= result; + std::cout << "Command result: " << result << std::endl; + } + clp->logFooter(); + if (diff_comp_mode && fileunit) { + SURELOG::Report* report = new SURELOG::Report(); + std::pair results = + report->makeDiffCompUnitReport(clp, symbolTable); + success = results.first; + noFatalErrors = results.second; + delete report; + } + clp->cleanCache(); // only if -nocache + delete clp; + delete symbolTable; + delete errors; + if ((!noFatalErrors) || (!success)) codedReturn |= 1; + if (parseOnly) + return 0; + else + return codedReturn; +} + +enum COMP_MODE { + NORMAL, + DIFF, + BATCH, +}; + +int run_surelog(int argc, const char** argv) { + SURELOG::Waiver::initWaivers(); + + unsigned int codedReturn = 0; + COMP_MODE mode = NORMAL; + bool nostdout = false; + std::string batchFile; + std::string diff_unit_opt = "-diffcompunit"; + std::string parseonly_opt = "-parseonly"; + std::string batch_opt = "-batch"; + std::string nostdout_opt = "-nostdout"; + for (int i = 1; i < argc; i++) { + if (parseonly_opt == argv[i]) { + } else if (diff_unit_opt == argv[i]) { + mode = DIFF; + } else if (batch_opt == argv[i]) { + batchFile = argv[i + 1]; + i++; + mode = BATCH; + } else if (nostdout_opt == argv[i]) { + nostdout = true; + } + } + + switch (mode) { + case DIFF: { +#if (defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)) + // REVISIT: Windows doesn't have the concept of forks! + // Implement it sequentially for now and optimize it if this + // proves to be a bottleneck (preferably, implemented as a + // cross platform solution). + executeCompilation(argc, argv, true, false); + codedReturn = executeCompilation(argc, argv, true, true); +#else + pid_t pid = fork(); + if (pid == 0) { + // child process + executeCompilation(argc, argv, true, false); + } else if (pid > 0) { + // parent process + codedReturn = executeCompilation(argc, argv, true, true); + } else { + // fork failed + printf("fork() failed!\n"); + return 1; + } +#endif + break; + } + case NORMAL: + codedReturn = executeCompilation(argc, argv, false, false); + break; + case BATCH: + printf("Currently batch mode is not supported!\n"); + return 1; + } + + return codedReturn; +} + +struct UhdmSurelogAstFrontend : public Frontend { + UhdmSurelogAstFrontend() : Frontend("verilog_with_uhdm", "generate/read UHDM file") { } + void help() + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_verilog_with_uhdm [options] [filenames]\n"); + log("\n"); + log("Generate or load design from a UHDM file into the current design\n"); + log("\n"); + log(" -process\n"); + log(" loads design from given UHDM file\n"); + log("\n"); + log(" -noassert\n"); + log(" ignore assert() statements"); + log("\n"); + log(" -debug\n"); + log(" print debug info to stdout"); + log("\n"); + log(" -report [directory]\n"); + log(" write a coverage report for the UHDM file\n"); + log("\n"); + log(" -defer\n"); + log(" only read the abstract syntax tree and defer actual compilation\n"); + log(" to a later 'hierarchy' command. Useful in cases where the default\n"); + log(" parameters of modules yield invalid or not synthesizable code.\n"); + log("\n"); + } + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) + { + log_header(design, "Executing Verilog with UHDM frontend.\n"); + + UhdmAstShared shared; + UhdmAst uhdm_ast(shared); + bool defer = false; + bool process = false; + + std::string report_directory; + for (size_t i = 1; i < args.size(); i++) { + if (args[i] == "-process" || process == true) { + process = true; + if (args[i] == "-debug") { + shared.debug_flag = true; + } else if (args[i] == "-report" && ++i < args.size()) { + report_directory = args[i]; + shared.stop_on_error = false; + } else if (args[i] == "-noassert") { + shared.no_assert = true; + } else if (args[i] == "-defer") { + defer = true; + } + } + } + if (!process) { + std::vector cstrings; + cstrings.reserve(args.size()); + for(size_t i = 0; i < args.size(); ++i) + cstrings.push_back(const_cast(args[i].c_str())); + run_surelog(cstrings.size(), &cstrings[0]); + } else { + extra_args(f, filename, args, args.size() - 1); + AST::current_filename = filename; + AST::set_line_num = &set_line_num; + AST::get_line_num = &get_line_num; + struct AST::AstNode *current_ast; + + UHDM::Serializer serializer; + + std::vector restoredDesigns = serializer.Restore(filename); + for (auto design : restoredDesigns) { + std::stringstream strstr; + UHDM::visit_object(design, 1, "", &shared.report.unhandled, shared.debug_flag ? std::cout : strstr); + } + current_ast = uhdm_ast.visit_designs(restoredDesigns); + if (report_directory != "") { + shared.report.write(report_directory); + } + for (auto design : restoredDesigns) vpi_release_handle(design); + bool dump_ast1 = shared.debug_flag; + bool dump_ast2 = shared.debug_flag; + bool dont_redefine = false; + bool default_nettype_wire = true; + AST::process(design, current_ast, + dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, + false, false, false, false, false, false, dont_redefine, false, defer, default_nettype_wire + ); + delete current_ast; + } + + } +} UhdmSurelogAstFrontend; + +YOSYS_NAMESPACE_END + From 79abde184a6ed217c3303dc6113197018c9c721e Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 2 Sep 2021 11:47:24 +0200 Subject: [PATCH 425/845] Link to whole uhdm library This fixes the problem with undefined symbols at runtime to unused functions Signed-off-by: Kamil Rakoczy --- uhdm-plugin/Makefile | 5 +- uhdm-plugin/vpivisitor.cc | 10717 ------------------------------------ 2 files changed, 2 insertions(+), 10720 deletions(-) delete mode 100644 uhdm-plugin/vpivisitor.cc diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 6bcf438b3..11eb2474d 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -2,8 +2,7 @@ NAME = uhdm SOURCES = UhdmAst.cc \ uhdmastfrontend.cc \ uhdmsurelogastfrontend.cc \ - uhdmastreport.cc \ - vpivisitor.cc + uhdmastreport.cc include ../Makefile_plugin.common @@ -14,4 +13,4 @@ CPPFLAGS += -std=c++17 -I${UHDM_INSTALL_DIR}/include/uhdm \ CXXFLAGS += -Wno-inconsistent-missing-override -Wno-unused-parameter LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib/surelog -L${UHDM_INSTALL_DIR}/lib -LDLIBS += -luhdm -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread -lsurelog -lantlr4-runtime -lflatbuffers +LDLIBS += -Wl,--whole-archive -luhdm -Wl,--no-whole-archive -lsurelog -lantlr4-runtime -lflatbuffers -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread diff --git a/uhdm-plugin/vpivisitor.cc b/uhdm-plugin/vpivisitor.cc deleted file mode 100644 index 595d0ea6d..000000000 --- a/uhdm-plugin/vpivisitor.cc +++ /dev/null @@ -1,10717 +0,0 @@ -/* - Do not modify, auto-generated by model_gen.tcl - - Copyright 2019-2020 Alain Dargelas - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -/* - * File: vpi_visitor.cpp - * Author: alain - * - * Created on December 14, 2019, 10:03 PM - */ - -#include - -#include -#include -#include -#include -#include -#include - -static bool showIDs = false; - -#ifdef STANDARD_VPI - -#include - -// C++ 98 is default in Simulators compilers -typedef std::set VisitedContainer; -// Missing defines from vpi_user.h, sv_vpi_user.h, They are no-op in the Standard implementation. -#define uhdmdesign 2569 -#define uhdmallPackages 2570 -#define uhdmallClasses 2571 -#define uhdmallInterfaces 2572 -#define uhdmallUdps 2573 -#define uhdmallPrograms 2574 -#define uhdmallModules 2575 -#define uhdmtopModules 2576 -#define vpiDesign 3000 -#define vpiInterfaceTypespec 3001 -#define vpiNets 3002 -#define vpiSimpleExpr 3003 -#define vpiParameters 3004 -#define vpiSequenceExpr 3005 -#define vpiUnsupportedStmt 4000 -#define vpiUnsupportedExpr 4001 -#define uhdmimport 2577 - -#else - -#include "include/sv_vpi_user.h" -#include "include/vhpi_user.h" -#include "headers/uhdm_types.h" -#include "headers/containers.h" -#include "headers/vpi_uhdm.h" -#include "headers/uhdm.h" -#include "headers/Serializer.h" -typedef std::set VisitedContainer; - -#endif - -// UHDM implementation redefine these -#ifndef vpiVarBit - #define vpiVarBit vpiRegBit - #define vpiLogicVar vpiReg - #define vpiArrayVar vpiRegArray -#endif - - -namespace UHDM { - -#ifdef STANDARD_VPI - -static std::string vpiTypeName(vpiHandle h) { - int type = vpi_get(vpiType, h); - switch (type) { - case 35: return "vpiNamedFork"; - case 611: return "vpiShortIntVar"; - case 36: return "vpiNet"; - case 612: return "vpiIntVar"; - case 37: return "vpiNetBit"; - case 613: return "vpiShortRealVar"; - case 38: return "vpiNullStmt"; - case 614: return "vpiByteVar"; - case 40: return "vpiParamAssign"; - case 39: return "vpiOperation"; - case 615: return "vpiClassVar"; - case 41: return "vpiParameter"; - case 616: return "vpiStringVar"; - case 42: return "vpiPartSelect"; - case 617: return "vpiEnumVar"; - case 43: return "vpiPathTerm"; - case 618: return "vpiStructVar"; - case 44: return "vpiPort"; - case 619: return "vpiUnionVar"; - case 620: return "vpiBitVar"; - case 45: return "vpiPortBit"; - case 621: return "vpiClassObj"; - case 46: return "vpiPrimTerm"; - case 622: return "vpiChandleVar"; - case 47: return "vpiRealVar"; - case 623: return "vpiPackedArrayVar"; - case 624: return "vpiAlwaysType"; - case 48: return "vpiReg"; - case 49: return "vpiRegBit"; - case 50: return "vpiRelease"; - case 625: return "vpiLongIntTypespec"; - case 51: return "vpiRepeat"; - case 626: return "vpiShortRealTypespec"; - case 52: return "vpiRepeatControl"; - case 627: return "vpiByteTypespec"; - case 53: return "vpiSchedEvent"; - case 628: return "vpiShortIntTypespec"; - case 54: return "vpiSpecParam"; - case 629: return "vpiIntTypespec"; - case 630: return "vpiClassTypespec"; - case 55: return "vpiSwitch"; - case 631: return "vpiStringTypespec"; - case 56: return "vpiSysFuncCall"; - case 632: return "vpiChandleTypespec"; - case 57: return "vpiSysTaskCall"; - case 633: return "vpiEnumTypespec"; - case 58: return "vpiTableEntry"; - case 634: return "vpiEnumConst"; - case 59: return "vpiTask"; - case 60: return "vpiTaskCall"; - case 635: return "vpiIntegerTypespec"; - case 61: return "vpiTchk"; - case 636: return "vpiTimeTypespec"; - case 62: return "vpiTchkTerm"; - case 637: return "vpiRealTypespec"; - case 63: return "vpiTimeVar"; - case 638: return "vpiStructTypespec"; - case 64: return "vpiTimeQueue"; - case 639: return "vpiUnionTypespec"; - case 640: return "vpiBitTypespec"; - case 65: return "vpiUdp"; - case 641: return "vpiLogicTypespec"; - case 66: return "vpiUdpDefn"; - case 642: return "vpiArrayTypespec"; - case 67: return "vpiUserSystf"; - case 643: return "vpiVoidTypespec"; - case 68: return "vpiVarSelect"; - case 644: return "vpiTypespecMember"; - case 69: return "vpiWait"; - case 70: return "vpiWhile"; - case 645: return "vpiDistItem"; - case 646: return "vpiAliasStmt"; - case 71: return "vpiCondition"; - case 647: return "vpiThread"; - case 72: return "vpiDelay"; - case 648: return "vpiMethodFuncCall"; - case 73: return "vpiElseStmt"; - case 649: return "vpiMethodTaskCall"; - case 74: return "vpiForIncStmt"; - case 650: return "vpiClockingBlock"; - case 75: return "vpiForInitStmt"; - case 651: return "vpiClockingIODecl"; - case 76: return "vpiHighConn"; - case 652: return "vpiClassDefn"; - case 77: return "vpiLhs"; - case 653: return "vpiConstraint"; - case 78: return "vpiIndex"; - case 654: return "vpiConstraintOrdering"; - case 655: return "vpiPropertyDecl"; - case 79: return "vpiLeftRange"; - case 80: return "vpiLowConn"; - case 656: return "vpiPropertySpec"; - case 81: return "vpiParent"; - case 657: return "vpiPropertyExpr"; - case 82: return "vpiRhs"; - case 658: return "vpiMulticlockSequenceExpr"; - case 83: return "vpiRightRange"; - case 660: return "vpiPropertyInst"; - case 659: return "vpiClockedSeq"; - case 84: return "vpiScope"; - case 661: return "vpiSequenceDecl"; - case 85: return "vpiSysTfCall"; - case 662: return "vpiCaseProperty"; - case 86: return "vpiTchkDataTerm"; - case 663: return "vpiEndLine"; - case 87: return "vpiTchkNotifier"; - case 664: return "vpiSequenceInst"; - case 88: return "vpiTchkRefTerm"; - case 0: return "vpiLargeCharge"; - case 665: return "vpiImmediateAssert"; - case 1: return "vpiAlways"; - case 89: return "vpiArgument"; - case 90: return "vpiBit"; - case 666: return "vpiReturn"; - case 2: return "vpiAssignStmt"; - case 91: return "vpiDriver"; - case 667: return "vpiAnyPattern"; - case 3: return "vpiAssignment"; - case 92: return "vpiInternalScope"; - case 668: return "vpiTaggedPattern"; - case 4: return "vpiBegin"; - case 93: return "vpiLoad"; - case 670: return "vpiDoWhile"; - case 669: return "vpiStructPattern"; - case 5: return "vpiCase"; - case 94: return "vpiModDataPathIn"; - case 671: return "vpiOrderedWait"; - case 6: return "vpiCaseItem"; - case 95: return "vpiModPathIn"; - case 672: return "vpiWaitFork"; - case 7: return "vpiConstant"; - case 96: return "vpiModPathOut"; - case 673: return "vpiDisableFork"; - case 8: return "vpiContAssign"; - case 97: return "vpiOperand"; - case 674: return "vpiExpectStmt"; - case 9: return "vpiDeassign"; - case 98: return "vpiPortInst"; - case 675: return "vpiForeachStmt"; - case 99: return "vpiProcess"; - case 676: return "vpiFinal"; - case 677: return "vpiExtends"; - case 678: return "vpiDistribution"; - case 680: return "vpiEnumNet"; - case 679: return "vpiSeqFormalDecl"; - case 681: return "vpiIntegerNet"; - case 682: return "vpiTimeNet"; - case 683: return "vpiStructNet"; - case 684: return "vpiBreak"; - case 685: return "vpiContinue"; - case 686: return "vpiAssert"; - case 687: return "vpiAssume"; - case 688: return "vpiCover"; - case 700: return "vpiActual"; - case 690: return "vpiClockingEvent"; - case 689: return "vpiDisableCondition"; - case 701: return "vpiTypedefAlias"; - case 691: return "vpiReturnStmt"; - case 702: return "vpiIndexTypespec"; - case 692: return "vpiPackedArrayTypespec"; - case 703: return "vpiBaseTypespec"; - case 693: return "vpiPackedArrayNet"; - case 704: return "vpiElemTypespec"; - case 694: return "vpiImmediateAssume"; - case 695: return "vpiImmediateCover"; - case 706: return "vpiInputSkew"; - case 696: return "vpiSequenceTypespec"; - case 707: return "vpiOutputSkew"; - case 697: return "vpiPropertyTypespec"; - case 708: return "vpiGlobalClocking"; - case 698: return "vpiEventTypespec"; - case 710: return "vpiDefaultDisableIff"; - case 709: return "vpiDefaultClocking"; - case 699: return "vpiPropFormalDecl"; - case 713: return "vpiOrigin"; - case 714: return "vpiPrefix"; - case 715: return "vpiWith"; - case 718: return "vpiProperty"; - case 720: return "vpiValueRange"; - case 721: return "vpiPattern"; - case 722: return "vpiWeight"; - case 725: return "vpiTypedef"; - case 726: return "vpiImport"; - case 727: return "vpiDerivedClasses"; - case 100: return "vpiVariables"; - case 728: return "vpiVirtualInterfaceVar"; - case 730: return "vpiMethods"; - case 101: return "vpiUse"; - case 731: return "vpiSolveBefore"; - case 102: return "vpiExpr"; - case 732: return "vpiSolveAfter"; - case 103: return "vpiPrimitive"; - case 104: return "vpiStmt"; - case 734: return "vpiWaitingProcesses"; - case 105: return "vpiAttribute"; - case 735: return "vpiMessages"; - case 106: return "vpiBitSelect"; - case 736: return "vpiConstrForEach"; - case 107: return "vpiCallback"; - case 737: return "vpiLoopVars"; - case 108: return "vpiDelayTerm"; - case 738: return "vpiConstrIf"; - case 109: return "vpiDelayDevice"; - case 110: return "vpiFrame"; - case 740: return "vpiConcurrentAssertions"; - case 739: return "vpiConstrIfElse"; - case 111: return "vpiGateArray"; - case 741: return "vpiMatchItem"; - case 112: return "vpiModuleArray"; - case 742: return "vpiMember"; - case 113: return "vpiPrimitiveArray"; - case 743: return "vpiElement"; - case 114: return "vpiNetArray"; - case 744: return "vpiAssertion"; - case 115: return "vpiRange"; - case 745: return "vpiInstance"; - case 116: return "vpiRegArray"; - case 746: return "vpiConstraintItem"; - case 117: return "vpiSwitchArray"; - case 747: return "vpiConstraintExpr"; - case 118: return "vpiUdpArray"; - case 748: return "vpiElseConst"; - case 119: return "vpiActiveTimeFormat"; - case 120: return "vpiInTerm"; - case 750: return "vpiCoverageStart"; - case 749: return "vpiImplication"; - case 121: return "vpiInstanceArray"; - case 751: return "vpiCoverageStOp"; - case 122: return "vpiLocalDriver"; - case 752: return "vpiCoverageReset"; - case 123: return "vpiLocalLoad"; - case 753: return "vpiCoverageCheck"; - case 124: return "vpiOutTerm"; - case 754: return "vpiCoverageMerge"; - case 125: return "vpiPorts"; - case 755: return "vpiCoverageSave"; - case 126: return "vpiSimNet"; - case 127: return "vpiTaskFunc"; - case 128: return "vpiContAssignBit"; - case 758: return "vpiFsm"; - case 129: return "vpiNamedEventArray"; - case 130: return "vpiIndexedPartSelect"; - case 759: return "vpiFsmHandle"; - case 760: return "vpiAssertCoverage"; - case 131: return "vpiBaseExpr"; - case 761: return "vpiFsmStateCoverage"; - case 132: return "vpiWidthExpr"; - case 762: return "vpiStatementCoverage"; - case 133: return "vpiGenScopeArray"; - case 763: return "vpiToggleCoverage"; - case 134: return "vpiGenScope"; - case 135: return "vpiGenVar"; - case 765: return "vpiCovered"; - case 136: return "vpiAutomatics"; - case 766: return "vpiCoverMax"; - case 767: return "vpiCoveredCount"; - case 770: return "vpiAssertAttemptCovered"; - case 771: return "vpiAssertSuccessCovered"; - case 772: return "vpiAssertFailureCovered"; - case 773: return "vpiAssertVacuousSuccessCovered"; - case 774: return "vpiAssertDisableCovered"; - case 775: return "vpiFsmStates"; - case 776: return "vpiFsmStateExpression"; - case 777: return "vpiAssertKillCovered"; - case 10: return "vpiDefParam"; - case 901: return "vpiRestrict"; - case 11: return "vpiDelayControl"; - case 902: return "vpiClockedProp"; - case 12: return "vpiDisable"; - case 903: return "vpiLetDecl"; - case 13: return "vpiEventControl"; - case 904: return "vpiLetExpr"; - case 14: return "vpiEventStmt"; - case 905: return "vpiCasePropertyItem"; - case 15: return "vpiFor"; - case 16: return "vpiForce"; - case 17: return "vpiForever"; - case 18: return "vpiFork"; - case 20: return "vpiFunction"; - case 19: return "vpiFuncCall"; - case 21: return "vpiGate"; - case 22: return "vpiIf"; - case 23: return "vpiIfElse"; - case 24: return "vpiInitial"; - case 600: return "vpiPackage"; - case 25: return "vpiIntegerVar"; - case 601: return "vpiInterface"; - case 26: return "vpiInterModPath"; - case 602: return "vpiProgram"; - case 27: return "vpiIterator"; - case 603: return "vpiInterfaceArray"; - case 28: return "vpiIODecl"; - case 604: return "vpiProgramArray"; - case 30: return "vpiMemoryWord"; - case 29: return "vpiMemory"; - case 605: return "vpiTypespec"; - case 31: return "vpiModPath"; - case 606: return "vpiModport"; - case 32: return "vpiModule"; - case 607: return "vpiInterfaceTfDecl"; - case 33: return "vpiNamedBegin"; - case 608: return "vpiRefObj"; - case 34: return "vpiNamedEvent"; - case 609: return "vpiTypeParameter"; - case 610: return "vpiLongIntVar"; - } -} - -#endif - -static void release_handle(vpiHandle obj_h) { -#ifndef STANDARD_VPI - vpi_release_handle(obj_h); -#endif -} - -static std::string visit_value(s_vpi_value* value) { - if (value == nullptr) - return ""; - switch (value->format) { - case vpiIntVal: { - return std::string(std::string("|INT:") + std::to_string(value->value.integer) + "\n"); - break; - } - case vpiStringVal: { - const char* s = (const char*) value->value.str; - return std::string(std::string("|STRING:") + std::string(s) + "\n"); - break; - } - case vpiBinStrVal: { - const char* s = (const char*) value->value.str; - return std::string(std::string("|BIN:") + std::string(s) + "\n"); - break; - } - case vpiHexStrVal: { - const char* s = (const char*) value->value.str; - return std::string(std::string("|HEX:") + std::string(s) + "\n"); - break; - } - case vpiOctStrVal: { - const char* s = (const char*) value->value.str; - return std::string(std::string("|OCT:") + std::string(s) + "\n"); - break; - } - case vpiRealVal: { - return std::string(std::string("|REAL:") + std::to_string(value->value.real) + "\n"); - break; - } - case vpiScalarVal: { - return std::string(std::string("|SCAL:") + std::to_string(value->value.scalar) + "\n"); - break; - } - case vpiDecStrVal: { - const char* s = (const char*) value->value.str; - return std::string(std::string("|DEC:") + std::string(s) + "\n"); - break; - } - default: - break; - } - return ""; -} - -static std::string visit_delays(s_vpi_delay* delay) { - if (delay == nullptr) - return ""; - switch (delay->time_type) { - case vpiScaledRealTime: { - return std::string(std::string("|#") + std::to_string(delay->da[0].low) + "\n"); - break; - } - default: - break; - } - return ""; -} - -static std::ostream &stream_indent(std::ostream &out, int indent) { - out << std::string(indent, ' '); - return out; -} - - void visit_object (vpiHandle obj_h, int indent, const char *relation, VisitedContainer* visited, std::ostream& out, bool shallowVisit = false) { - if (!obj_h) - return; -#ifdef STANDARD_VPI - - static int kLevelIndent = 2; - const bool alreadyVisited = visited->find(obj_h) != visited->end(); - visited->insert(obj_h); - -#else - - static constexpr int kLevelIndent = 2; - const uhdm_handle* const handle = (const uhdm_handle*) obj_h; - const BaseClass* const object = (const BaseClass*) handle->object; - const bool alreadyVisited = (visited->find(object) != visited->end()); - if (!shallowVisit) - visited->insert(object); - -#endif - - unsigned int subobject_indent = indent + kLevelIndent; - const unsigned int objectType = vpi_get(vpiType, obj_h); - - { - std::string hspaces; - std::string rspaces; - if (indent >= kLevelIndent) { - for (int i = 0; i < indent -2 ; i++) { - hspaces += " "; - } - rspaces = hspaces + "|"; - hspaces += "\\_"; - } - - if (strlen(relation) != 0) { - out << rspaces << relation << ":\n"; - } - -#ifdef STANDARD_VPI - - out << hspaces << vpiTypeName(obj_h) << "(" << vpi_get(vpiType, obj_h) << "): "; - -#else - - out << hspaces << UHDM::VpiTypeName(obj_h) << ": "; - -#endif - - bool needs_separator = false; - if (const char* s = vpi_get_str(vpiDefName, obj_h)) { // defName - out << s; - needs_separator = true; - } - if (const char* s = vpi_get_str(vpiFullName, obj_h)) { // objectName - if (needs_separator) out << " "; - out << "(" << s << ")"; // objectName - } else if (const char* s = vpi_get_str(vpiName, obj_h)) { // objectName - if (needs_separator) out << " "; - out << "(" << s << ")"; // objectName - } - -#ifndef STANDARD_VPI - - if (showIDs) - out << ", id:" << object->UhdmId(); - -#endif - - if (objectType == vpiModule || objectType == vpiProgram || objectType == vpiClassDefn || objectType == vpiPackage || - objectType == vpiInterface || objectType == vpiUdp) { - if (const char* s = vpi_get_str(vpiFile, obj_h)) { - if (int l = vpi_get(vpiLineNo, obj_h)) { - out << " " << s << ":" << l << ": "; // fileName, line - } else { - out << ", file:" << s; // fileName - } - } - } else { - if (int l = vpi_get(vpiLineNo, obj_h)) { - out << ", line:" << l; - } - } - if (vpiHandle par = vpi_handle(vpiParent, obj_h)) { - if (const char* parentName = vpi_get_str(vpiFullName, par)) { - out << ", parent:" << parentName; - } else if (const char* parentName = vpi_get_str(vpiName, par)) { - out << ", parent:" << parentName; - } - if (showIDs) { - const uhdm_handle* const phandle = (const uhdm_handle*) par; - const BaseClass* const pobject = (const BaseClass*) phandle->object; - out << ", parID:" << pobject->UhdmId(); - } - vpi_free_object(par); - } - out << "\n"; - } - - if (alreadyVisited || shallowVisit) { - return; - } - if (strcmp(relation, "vpiParent") == 0) { - return; - } - if (objectType == vpiOrderedWait) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiCondition,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiCondition", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiElseStmt,obj_h); - visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiEnumConst) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - - return; - } - if (objectType == vpiReg) { - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiChandleVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiContAssign) { - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRhs,obj_h); - visit_object(itr, subobject_indent, "vpiRhs", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLhs,obj_h); - visit_object(itr, subobject_indent, "vpiLhs", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiSwitchArray) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimitive,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiInstance,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInstance", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModule,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModule", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiTableEntry) { - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiEnumTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiBaseTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiBaseTypespec", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiEnumConst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiEnumConst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiPropertyInst) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const int n = vpi_get(vpiStartLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; - if (const int n = vpi_get(vpiColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; - if (const int n = vpi_get(vpiEndLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; - if (const int n = vpi_get(vpiEndColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiPropertyDecl,obj_h); - visit_object(itr, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingBlock,obj_h); - visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiDisableCondition,obj_h); - visit_object(itr, subobject_indent, "vpiDisableCondition", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiArgument,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArgument", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiByteVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiClockedSeq) { - - vpiHandle itr; - itr = vpi_handle(vpiClockingEvent,obj_h); - visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiSequenceExpr,obj_h); - visit_object(itr, subobject_indent, "vpiSequenceExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiEventTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiNamedEvent) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiWaitingProcesses,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiWaitingProcesses", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiRepeatControl) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiLetDecl) { - - - return; - } - if (objectType == vpiAnyPattern) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - - return; - } - if (objectType == vpiParamAssign) { - if (const int n = vpi_get(vpiConnByName, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConnByName:" << n << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiRhs,obj_h); - visit_object(itr, subobject_indent, "vpiRhs", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLhs,obj_h); - visit_object(itr, subobject_indent, "vpiLhs", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiAssume) { - if (const int n = vpi_get(vpiStartLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; - if (const int n = vpi_get(vpiColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; - if (const int n = vpi_get(vpiEndLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; - if (const int n = vpi_get(vpiEndColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiIsClockInferred, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsClockInferred:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiClockingBlock,obj_h); - visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingEvent,obj_h); - visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiProperty,obj_h); - visit_object(itr, subobject_indent, "vpiProperty", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiIntegerVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiStringVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiUserSystf) { - - - return; - } - if (objectType == vpiClockingIODecl) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const int n = vpi_get(vpiDirection, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; - if (const int n = vpi_get(vpiInputEdge, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiInputEdge:" << n << "\n"; - if (const int n = vpi_get(vpiOutputEdge, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiOutputEdge:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiInputSkew,obj_h); - visit_object(itr, subobject_indent, "vpiInputSkew", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiOutputSkew,obj_h); - visit_object(itr, subobject_indent, "vpiOutputSkew", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiShortIntVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiFunction) { - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - if (const int n = vpi_get(vpiFuncType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiFuncType:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDPICIdentifier, obj_h)) - stream_indent(out, indent) << "|vpiDPICIdentifier:" << s << "\n"; - if (const int n = vpi_get(vpiMethod, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiMethod:" << n << "\n"; - if (const int n = vpi_get(vpiAccessType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAccessType:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVirtual, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVirtual:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiDPIPure, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDPIPure:" << n << "\n"; - if (const int n = vpi_get(vpiDPIContext, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDPIContext:" << n << "\n"; - if (const int n = vpi_get(vpiDPICStr, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDPICStr:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiReturn,obj_h); - visit_object(itr, subobject_indent, "vpiReturn", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClassDefn,obj_h); - visit_object(itr, subobject_indent, "vpiClassDefn", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIODecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiImplication) { - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConstraintExpr,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConstraintExpr", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiCase) { - if (const int n = vpi_get(vpiCaseType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiCaseType:" << n << "\n"; - if (const int n = vpi_get(vpiQualifier, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiQualifier:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiCaseItem,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiCaseItem", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiIntVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiPackage) { - if (const int n = vpi_get(vpiUnit, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiUnit:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDefFile, obj_h)) - stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; - if (const char* s = vpi_get_str(vpiLibrary, obj_h)) - stream_indent(out, indent) << "|vpiLibrary:" << s << "\n"; - if (const char* s = vpi_get_str(vpiCell, obj_h)) - stream_indent(out, indent) << "|vpiCell:" << s << "\n"; - if (const char* s = vpi_get_str(vpiConfig, obj_h)) - stream_indent(out, indent) << "|vpiConfig:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiCellInstance, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiCellInstance:" << n << "\n"; - if (const int n = vpi_get(vpiDefNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefNetType:" << n << "\n"; - if (const int n = vpi_get(vpiDefLineNo, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; - if (const int n = vpi_get(vpiDefDelayMode, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefDelayMode:" << n << "\n"; - if (const int n = vpi_get(vpiProtected, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; - if (const int n = vpi_get(vpiTimePrecision, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTimePrecision:" << n << "\n"; - if (const int n = vpi_get(vpiTimeUnit, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTimeUnit:" << n << "\n"; - if (const int n = vpi_get(vpiUnconnDrive, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiUnconnDrive:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiTop, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTop:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiTaskFunc,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiProgram,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgram", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiProgramArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiArrayNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSpecParam,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSpecParam", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiClassDefn,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClassDefn", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAssertion,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiLogicVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiIfElse) { - if (const int n = vpi_get(vpiQualifier, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiQualifier:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiElseStmt,obj_h); - visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiAliasStmt) { - - - return; - } - if (objectType == vpiClassDefn) { - if (const int n = vpi_get(vpiVirtual, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVirtual:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiMethod,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMethod", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExtends,obj_h); - visit_object(itr, subobject_indent, "vpiExtends", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConstraint,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConstraint", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDerivedClasses,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDerivedClasses", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiClassTypespec,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClassTypespec", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiModuleArray) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiInstance,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInstance", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModule,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModule", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiConstraintOrdering) { - - vpiHandle itr; - itr = vpi_iterate(vpiSolveBefore,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSolveBefore", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSolveAfter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSolveAfter", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiFor) { - if (const int n = vpi_get(vpiLocalVarDecls, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiLocalVarDecls:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiForInitStmt,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiForInitStmt", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiForIncStmt,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiForIncStmt", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiForInitStmt,obj_h); - visit_object(itr, subobject_indent, "vpiForInitStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiForIncStmt,obj_h); - visit_object(itr, subobject_indent, "vpiForIncStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiCasePropertyItem) { - - vpiHandle itr; - itr = vpi_iterate(vpiExpr,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiExpr", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPropertyExpr,obj_h); - visit_object(itr, subobject_indent, "vpiPropertyExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiPartSelect) { - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiParent,obj_h); - visit_object(itr, subobject_indent, "vpiParent", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiForce) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiRhs,obj_h); - visit_object(itr, subobject_indent, "vpiRhs", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLhs,obj_h); - visit_object(itr, subobject_indent, "vpiLhs", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiSequenceDecl) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSeqFormalDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSeqFormalDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiNamedBegin) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiStmt,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiStmt", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiDisable) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiIndexedPartSelect) { - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiIndexedPartSelectType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIndexedPartSelectType:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiBaseExpr,obj_h); - visit_object(itr, subobject_indent, "vpiBaseExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiWidthExpr,obj_h); - visit_object(itr, subobject_indent, "vpiWidthExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiGateArray) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimitive,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiInstance,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInstance", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModule,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModule", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiUnsupportedStmt) { - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiAlways) { - if (const int n = vpi_get(vpiAlwaysType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAlwaysType:" << n << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiIntegerTypespec) { - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiArrayTypespec) { - if (const int n = vpi_get(vpiArrayType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayType:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiIndexTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiIndexTypespec", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiElemTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiElemTypespec", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiHierPath) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiActual,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiActual", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiWaitFork) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiBitVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiClassObj) { - if (const int n = vpi_get(vpiObjId, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiObjId:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiMessages,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMessages", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTaskFunc,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiClassTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiClassTypespec", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiWaitingProcesses,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiWaitingProcesses", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConstraint,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConstraint", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiTchkTerm) { - if (const int n = vpi_get(vpiEdge, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEdge:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiInterface) { - if (const int n = vpi_get(vpiIndex, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIndex:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDefFile, obj_h)) - stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; - if (const char* s = vpi_get_str(vpiLibrary, obj_h)) - stream_indent(out, indent) << "|vpiLibrary:" << s << "\n"; - if (const char* s = vpi_get_str(vpiCell, obj_h)) - stream_indent(out, indent) << "|vpiCell:" << s << "\n"; - if (const char* s = vpi_get_str(vpiConfig, obj_h)) - stream_indent(out, indent) << "|vpiConfig:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiCellInstance, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiCellInstance:" << n << "\n"; - if (const int n = vpi_get(vpiDefNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefNetType:" << n << "\n"; - if (const int n = vpi_get(vpiDefLineNo, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; - if (const int n = vpi_get(vpiDefDelayMode, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefDelayMode:" << n << "\n"; - if (const int n = vpi_get(vpiProtected, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; - if (const int n = vpi_get(vpiTimePrecision, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTimePrecision:" << n << "\n"; - if (const int n = vpi_get(vpiTimeUnit, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTimeUnit:" << n << "\n"; - if (const int n = vpi_get(vpiUnconnDrive, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiUnconnDrive:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiTop, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTop:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiInstanceArray,obj_h); - visit_object(itr, subobject_indent, "vpiInstanceArray", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiProcess,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProcess", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInterfaceTfDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInterfaceTfDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModport", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiGlobalClocking,obj_h); - visit_object(itr, subobject_indent, "vpiGlobalClocking", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiDefaultClocking,obj_h); - visit_object(itr, subobject_indent, "vpiDefaultClocking", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiModPath,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModPath", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiClockingBlock,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInterface,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInterface", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInterfaceArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInterfaceArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPort,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPort", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiGenScopeArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiDefaultDisableIff,obj_h); - visit_object(itr, subobject_indent, "vpiDefaultDisableIff", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiTaskFunc,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiProgram,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgram", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiProgramArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiArrayNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSpecParam,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSpecParam", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiClassDefn,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClassDefn", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAssertion,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiReturn) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiPropertyTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiDesign) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - if (indent == 0) visited->clear(); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - if (indent == 0) visited->clear(); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - if (indent == 0) visited->clear(); - itr = vpi_iterate(uhdmallPackages,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "uhdmallPackages", visited, out ); - release_handle(obj); - } - release_handle(itr); - if (indent == 0) visited->clear(); - itr = vpi_iterate(uhdmallClasses,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "uhdmallClasses", visited, out ); - release_handle(obj); - } - release_handle(itr); - if (indent == 0) visited->clear(); - itr = vpi_iterate(uhdmallInterfaces,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "uhdmallInterfaces", visited, out ); - release_handle(obj); - } - release_handle(itr); - if (indent == 0) visited->clear(); - itr = vpi_iterate(uhdmallUdps,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "uhdmallUdps", visited, out ); - release_handle(obj); - } - release_handle(itr); - if (indent == 0) visited->clear(); - itr = vpi_iterate(uhdmallPrograms,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "uhdmallPrograms", visited, out ); - release_handle(obj); - } - release_handle(itr); - if (indent == 0) visited->clear(); - itr = vpi_iterate(uhdmallModules,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "uhdmallModules", visited, out ); - release_handle(obj); - } - release_handle(itr); - if (indent == 0) visited->clear(); - itr = vpi_iterate(uhdmtopModules,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "uhdmtopModules", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiDistItem) { - if (const int n = vpi_get(vpiDistType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDistType:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiWeight,obj_h); - visit_object(itr, subobject_indent, "vpiWeight", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiValueRange,obj_h); - visit_object(itr, subobject_indent, "vpiValueRange", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiBitTypespec) { - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiIndexTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiIndexTypespec", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiElemTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiElemTypespec", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiStructVar) { - if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiMember,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMember", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiModport) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiIODecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiArrayNet) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiExpanded, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; - if (const int n = vpi_get(vpiImplicitDecl, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; - if (const int n = vpi_get(vpiResolvedNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitScalared, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - if (const int n = vpi_get(vpiChargeStrength, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitVectored, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiSimNet,obj_h); - visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPathTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTchkTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiForever) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiInterfaceTfDecl) { - if (const int n = vpi_get(vpiAccessType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAccessType:" << n << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiTask,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTask", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiFunction,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiFunction", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiShortRealVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiPortBit) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiExplicitName, obj_h)) - stream_indent(out, indent) << "|vpiExplicitName:" << s << "\n"; - if (const int n = vpi_get(vpiPortIndex, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPortIndex:" << n << "\n"; - if (const int n = vpi_get(vpiPortType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPortType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiConnByName, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConnByName:" << n << "\n"; - if (const int n = vpi_get(vpiDirection, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedef,obj_h); - visit_object(itr, subobject_indent, "vpiTypedef", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiHighConn,obj_h); - visit_object(itr, subobject_indent, "vpiHighConn", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLowConn,obj_h); - visit_object(itr, subobject_indent, "vpiLowConn", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiImmediateAssume) { - if (const int n = vpi_get(vpiIsDeferred, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsDeferred:" << n << "\n"; - if (const int n = vpi_get(vpiIsFinal, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsFinal:" << n << "\n"; - if (const int n = vpi_get(vpiStartLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; - if (const int n = vpi_get(vpiColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; - if (const int n = vpi_get(vpiEndLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; - if (const int n = vpi_get(vpiEndColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingBlock,obj_h); - visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiElseStmt,obj_h); - visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiMethodFuncCall) { - if (const int n = vpi_get(vpiUserDefn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiUserDefn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiPrefix,obj_h); - visit_object(itr, subobject_indent, "vpiPrefix", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiFunction,obj_h); - visit_object(itr, subobject_indent, "vpiFunction", visited, out , true); - release_handle(itr); - itr = vpi_handle(vpiWith,obj_h); - visit_object(itr, subobject_indent, "vpiWith", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiArgument,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArgument", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiOperation) { - if (const int n = vpi_get(vpiOpType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiOpType:" << n << "\n"; - if (const int n = vpi_get(vpiOpStrong, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiOpStrong:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiOperand,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiOperand", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiCaseItem) { - - vpiHandle itr; - itr = vpi_iterate(vpiExpr,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiExpr", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiAssignStmt) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiRhs,obj_h); - visit_object(itr, subobject_indent, "vpiRhs", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLhs,obj_h); - visit_object(itr, subobject_indent, "vpiLhs", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiPropertyDecl) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropFormalDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropFormalDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPropertySpec,obj_h); - visit_object(itr, subobject_indent, "vpiPropertySpec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiNamedFork) { - if (const int n = vpi_get(vpiJoinType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiJoinType:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiStmt,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiStmt", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiDistribution) { - if (const int n = vpi_get(vpiSoft, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSoft:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiDistItem,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDistItem", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiPropFormalDecl) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const int n = vpi_get(vpiDirection, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiImport) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiImport,obj_h); - visit_object(itr, subobject_indent, "vpiImport", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiIf) { - if (const int n = vpi_get(vpiQualifier, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiQualifier:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiSwitch) { - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - s_vpi_delay delay; - vpi_get_delays(obj_h, &delay); - if (delay.da != nullptr) { - stream_indent(out, indent) << visit_delays(&delay); - } - if (const int n = vpi_get(vpiPrimType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPrimType:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiSeqFormalDecl) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const int n = vpi_get(vpiDirection, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiNullStmt) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiLetExpr) { - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiEnumNet) { - if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiExpanded, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; - if (const int n = vpi_get(vpiImplicitDecl, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; - if (const int n = vpi_get(vpiResolvedNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitScalared, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - if (const int n = vpi_get(vpiChargeStrength, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitVectored, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiSimNet,obj_h); - visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPathTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTchkTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiMethodTaskCall) { - if (const int n = vpi_get(vpiUserDefn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiUserDefn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiPrefix,obj_h); - visit_object(itr, subobject_indent, "vpiPrefix", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTask,obj_h); - visit_object(itr, subobject_indent, "vpiTask", visited, out , true); - release_handle(itr); - itr = vpi_handle(vpiWith,obj_h); - visit_object(itr, subobject_indent, "vpiWith", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiArgument,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArgument", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiDefParam) { - - vpiHandle itr; - itr = vpi_handle(vpiRhs,obj_h); - visit_object(itr, subobject_indent, "vpiRhs", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLhs,obj_h); - visit_object(itr, subobject_indent, "vpiLhs", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiSpecParam) { - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiTypespecMember) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiDeassign) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLhs,obj_h); - visit_object(itr, subobject_indent, "vpiLhs", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiClassVar) { - if (const int n = vpi_get(vpiObjId, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiObjId:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiClassObj,obj_h); - visit_object(itr, subobject_indent, "vpiClassObj", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiVarSelect) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiGenScopeArray) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiGenVar,obj_h); - visit_object(itr, subobject_indent, "vpiGenVar", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiGenScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiGenScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiTaggedPattern) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiPattern,obj_h); - visit_object(itr, subobject_indent, "vpiPattern", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiGate) { - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - s_vpi_delay delay; - vpi_get_delays(obj_h, &delay); - if (delay.da != nullptr) { - stream_indent(out, indent) << visit_delays(&delay); - } - if (const int n = vpi_get(vpiPrimType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPrimType:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiTask) { - if (const char* s = vpi_get_str(vpiDPICIdentifier, obj_h)) - stream_indent(out, indent) << "|vpiDPICIdentifier:" << s << "\n"; - if (const int n = vpi_get(vpiMethod, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiMethod:" << n << "\n"; - if (const int n = vpi_get(vpiAccessType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAccessType:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVirtual, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVirtual:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiDPIPure, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDPIPure:" << n << "\n"; - if (const int n = vpi_get(vpiDPIContext, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDPIContext:" << n << "\n"; - if (const int n = vpi_get(vpiDPICStr, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDPICStr:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiReturn,obj_h); - visit_object(itr, subobject_indent, "vpiReturn", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClassDefn,obj_h); - visit_object(itr, subobject_indent, "vpiClassDefn", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIODecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiNamedEventArray) { - - - return; - } - if (objectType == vpiImmediateCover) { - if (const int n = vpi_get(vpiIsDeferred, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsDeferred:" << n << "\n"; - if (const int n = vpi_get(vpiIsFinal, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsFinal:" << n << "\n"; - if (const int n = vpi_get(vpiStartLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; - if (const int n = vpi_get(vpiColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; - if (const int n = vpi_get(vpiEndLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; - if (const int n = vpi_get(vpiEndColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingBlock,obj_h); - visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiTimeNet) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiExpanded, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; - if (const int n = vpi_get(vpiImplicitDecl, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; - if (const int n = vpi_get(vpiResolvedNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitScalared, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - if (const int n = vpi_get(vpiChargeStrength, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitVectored, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiSimNet,obj_h); - visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPathTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTchkTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiVarBit) { - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiIODecl) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const int n = vpi_get(vpiDirection, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTypedef,obj_h); - visit_object(itr, subobject_indent, "vpiTypedef", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiInterfaceArray) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiInstance,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInstance", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModule,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModule", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiShortRealTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiImmediateAssert) { - if (const int n = vpi_get(vpiIsDeferred, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsDeferred:" << n << "\n"; - if (const int n = vpi_get(vpiIsFinal, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsFinal:" << n << "\n"; - if (const int n = vpi_get(vpiStartLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; - if (const int n = vpi_get(vpiColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; - if (const int n = vpi_get(vpiEndLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; - if (const int n = vpi_get(vpiEndColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingBlock,obj_h); - visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiElseStmt,obj_h); - visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiParameter) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiConstType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstType:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiLocalParam, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiLocalParam:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiAttribute) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDefFile, obj_h)) - stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; - if (const int n = vpi_get(vpiDefAttribute, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefAttribute:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - if (const int n = vpi_get(vpiDefLineNo, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; - - - return; - } - if (objectType == vpiPort) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiExplicitName, obj_h)) - stream_indent(out, indent) << "|vpiExplicitName:" << s << "\n"; - if (const int n = vpi_get(vpiPortIndex, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPortIndex:" << n << "\n"; - if (const int n = vpi_get(vpiPortType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPortType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiConnByName, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConnByName:" << n << "\n"; - if (const int n = vpi_get(vpiDirection, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypedef,obj_h); - visit_object(itr, subobject_indent, "vpiTypedef", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiHighConn,obj_h); - visit_object(itr, subobject_indent, "vpiHighConn", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLowConn,obj_h); - visit_object(itr, subobject_indent, "vpiLowConn", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiProgramArray) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiInstance,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInstance", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModule,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModule", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiWhile) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiRepeat) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiFork) { - if (const int n = vpi_get(vpiJoinType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiJoinType:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiStmt,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiStmt", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiStructTypespec) { - if (const int n = vpi_get(vpiPacked, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPacked:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiTypespecMember,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypespecMember", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiGenVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiGenScopeArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiPackedArrayNet) { - if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiExpanded, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; - if (const int n = vpi_get(vpiImplicitDecl, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; - if (const int n = vpi_get(vpiResolvedNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitScalared, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - if (const int n = vpi_get(vpiChargeStrength, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitVectored, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiElement,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiElement", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiSimNet,obj_h); - visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPathTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTchkTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiFinal) { - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiConstant) { - if (const int n = vpi_get(vpiConstType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstType:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiDelayControl) { - s_vpi_delay delay; - vpi_get_delays(obj_h, &delay); - if (delay.da != nullptr) { - stream_indent(out, indent) << visit_delays(&delay); - } - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiPropertySpec) { - - vpiHandle itr; - itr = vpi_handle(vpiClockingEvent,obj_h); - visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiDisableCondition,obj_h); - visit_object(itr, subobject_indent, "vpiDisableCondition", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiPropertyExpr,obj_h); - visit_object(itr, subobject_indent, "vpiPropertyExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiPrimTerm) { - if (const int n = vpi_get(vpiDirection, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDirection:" << n << "\n"; - if (const int n = vpi_get(vpiTermIndex, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTermIndex:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiExpectStmt) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiElseStmt,obj_h); - visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiEventControl) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiClassTypespec) { - if (const int n = vpi_get(vpiClassType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiClassType:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMethod,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMethod", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExtends,obj_h); - visit_object(itr, subobject_indent, "vpiExtends", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConstraint,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConstraint", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiClassDefn,obj_h); - visit_object(itr, subobject_indent, "vpiClassDefn", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiPathTerm) { - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiSequenceTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiConstrIfElse) { - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConstraintExpr,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConstraintExpr", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiElseConst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiElseConst", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiRestrict) { - if (const int n = vpi_get(vpiStartLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; - if (const int n = vpi_get(vpiColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; - if (const int n = vpi_get(vpiEndLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; - if (const int n = vpi_get(vpiEndColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiIsClockInferred, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsClockInferred:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiClockingBlock,obj_h); - visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingEvent,obj_h); - visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiProperty,obj_h); - visit_object(itr, subobject_indent, "vpiProperty", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiByteTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiExtends) { - - vpiHandle itr; - itr = vpi_iterate(vpiArgument,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArgument", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiClassTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiClassTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiRealVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiVirtualInterfaceVar) { - - - return; - } - if (objectType == vpiRefObj) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const int n = vpi_get(vpiGeneric, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiGeneric:" << n << "\n"; - if (const int n = vpi_get(vpiStructMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTaskFunc,obj_h); - visit_object(itr, subobject_indent, "vpiTaskFunc", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiActual,obj_h); - visit_object(itr, subobject_indent, "vpiActual", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiConstrForEach) { - - vpiHandle itr; - itr = vpi_handle(vpiVariables,obj_h); - visit_object(itr, subobject_indent, "vpiVariables", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConstraintExpr,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConstraintExpr", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoopVars,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoopVars", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiRelease) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLhs,obj_h); - visit_object(itr, subobject_indent, "vpiLhs", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiTypeParameter) { - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiLocalParam, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiLocalParam:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiFuncCall) { - if (const int n = vpi_get(vpiFuncType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiFuncType:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiFunction,obj_h); - visit_object(itr, subobject_indent, "vpiFunction", visited, out , true); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiArgument,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArgument", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiCover) { - if (const int n = vpi_get(vpiIsCoverSequence, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsCoverSequence:" << n << "\n"; - if (const int n = vpi_get(vpiStartLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; - if (const int n = vpi_get(vpiColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; - if (const int n = vpi_get(vpiEndLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; - if (const int n = vpi_get(vpiEndColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiIsClockInferred, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsClockInferred:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiClockingBlock,obj_h); - visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingEvent,obj_h); - visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiProperty,obj_h); - visit_object(itr, subobject_indent, "vpiProperty", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiArrayVar) { - if (const int n = vpi_get(vpiArrayType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayType:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVarSelect,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVarSelect", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiWait) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiIntegerNet) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiExpanded, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; - if (const int n = vpi_get(vpiImplicitDecl, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; - if (const int n = vpi_get(vpiResolvedNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitScalared, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - if (const int n = vpi_get(vpiChargeStrength, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitVectored, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiSimNet,obj_h); - visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPathTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTchkTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiConstraint) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiVirtual, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVirtual:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiAccessType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAccessType:" << n << "\n"; - if (const int n = vpi_get(vpiIsConstraintEnabled, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsConstraintEnabled:" << n << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConstraintItem,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConstraintItem", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiInterfaceTypespec) { - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const int n = vpi_get(vpiIsModPort, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsModPort:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiContAssignBit) { - if (const int n = vpi_get(vpiOffset, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiOffset:" << n << "\n"; - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRhs,obj_h); - visit_object(itr, subobject_indent, "vpiRhs", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLhs,obj_h); - visit_object(itr, subobject_indent, "vpiLhs", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiVoidTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiUnsupportedExpr) { - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiUdpArray) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimitive,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiInstance,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInstance", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModule,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModule", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiProgram) { - if (const int n = vpi_get(vpiIndex, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIndex:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDefFile, obj_h)) - stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; - if (const char* s = vpi_get_str(vpiLibrary, obj_h)) - stream_indent(out, indent) << "|vpiLibrary:" << s << "\n"; - if (const char* s = vpi_get_str(vpiCell, obj_h)) - stream_indent(out, indent) << "|vpiCell:" << s << "\n"; - if (const char* s = vpi_get_str(vpiConfig, obj_h)) - stream_indent(out, indent) << "|vpiConfig:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiCellInstance, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiCellInstance:" << n << "\n"; - if (const int n = vpi_get(vpiDefNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefNetType:" << n << "\n"; - if (const int n = vpi_get(vpiDefLineNo, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; - if (const int n = vpi_get(vpiDefDelayMode, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefDelayMode:" << n << "\n"; - if (const int n = vpi_get(vpiProtected, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; - if (const int n = vpi_get(vpiTimePrecision, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTimePrecision:" << n << "\n"; - if (const int n = vpi_get(vpiTimeUnit, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTimeUnit:" << n << "\n"; - if (const int n = vpi_get(vpiUnconnDrive, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiUnconnDrive:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiTop, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTop:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiInstanceArray,obj_h); - visit_object(itr, subobject_indent, "vpiInstanceArray", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiProcess,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProcess", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiDefaultClocking,obj_h); - visit_object(itr, subobject_indent, "vpiDefaultClocking", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiInterface,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInterface", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInterfaceArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInterfaceArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiClockingBlock,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPort,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPort", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiGenScopeArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiDefaultDisableIff,obj_h); - visit_object(itr, subobject_indent, "vpiDefaultDisableIff", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiTaskFunc,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiProgram,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgram", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiProgramArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiArrayNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSpecParam,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSpecParam", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiClassDefn,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClassDefn", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAssertion,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiUnionVar) { - if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiMember,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMember", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiTchk) { - s_vpi_delay delay; - vpi_get_delays(obj_h, &delay); - if (delay.da != nullptr) { - stream_indent(out, indent) << visit_delays(&delay); - } - if (const int n = vpi_get(vpiTchkType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTchkType:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkRefTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkRefTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkDataTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkDataTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkNotifier,obj_h); - visit_object(itr, subobject_indent, "vpiTchkNotifier", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiExpr,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiExpr", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiRange) { - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiBitSelect) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiModule) { - if (const int n = vpi_get(vpiIndex, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIndex:" << n << "\n"; - if (const int n = vpi_get(vpiTopModule, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTopModule:" << n << "\n"; - if (const int n = vpi_get(vpiDefDecayTime, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefDecayTime:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDefFile, obj_h)) - stream_indent(out, indent) << "|vpiDefFile:" << s << "\n"; - if (const char* s = vpi_get_str(vpiLibrary, obj_h)) - stream_indent(out, indent) << "|vpiLibrary:" << s << "\n"; - if (const char* s = vpi_get_str(vpiCell, obj_h)) - stream_indent(out, indent) << "|vpiCell:" << s << "\n"; - if (const char* s = vpi_get_str(vpiConfig, obj_h)) - stream_indent(out, indent) << "|vpiConfig:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiCellInstance, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiCellInstance:" << n << "\n"; - if (const int n = vpi_get(vpiDefNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefNetType:" << n << "\n"; - if (const int n = vpi_get(vpiDefLineNo, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefLineNo:" << n << "\n"; - if (const int n = vpi_get(vpiDefDelayMode, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiDefDelayMode:" << n << "\n"; - if (const int n = vpi_get(vpiProtected, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; - if (const int n = vpi_get(vpiTimePrecision, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTimePrecision:" << n << "\n"; - if (const int n = vpi_get(vpiTimeUnit, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTimeUnit:" << n << "\n"; - if (const int n = vpi_get(vpiUnconnDrive, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiUnconnDrive:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiTop, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTop:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiInstanceArray,obj_h); - visit_object(itr, subobject_indent, "vpiInstanceArray", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiProcess,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProcess", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimitive,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimitiveArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimitiveArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiGlobalClocking,obj_h); - visit_object(itr, subobject_indent, "vpiGlobalClocking", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiDefaultClocking,obj_h); - visit_object(itr, subobject_indent, "vpiDefaultClocking", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiModuleArray,obj_h); - visit_object(itr, subobject_indent, "vpiModuleArray", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPort,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPort", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInterface,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInterface", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInterfaceArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInterfaceArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModule,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModule", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModuleArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModuleArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModPath,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModPath", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTchk,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTchk", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDefParam,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDefParam", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiIODecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAliasStmt,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAliasStmt", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiClockingBlock,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiGenScopeArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiDefaultDisableIff,obj_h); - visit_object(itr, subobject_indent, "vpiDefaultDisableIff", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiTaskFunc,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTaskFunc", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiProgram,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgram", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiProgramArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiArrayNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSpecParam,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSpecParam", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiClassDefn,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClassDefn", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAssertion,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiLongIntTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiSoftDisable) { - - vpiHandle itr; - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiCaseProperty) { - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiCasePropertyItem,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiCasePropertyItem", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiClockedProp) { - - vpiHandle itr; - itr = vpi_handle(vpiClockingEvent,obj_h); - visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiPropertyExpr,obj_h); - visit_object(itr, subobject_indent, "vpiPropertyExpr", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiStructPattern) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiPattern,obj_h); - visit_object(itr, subobject_indent, "vpiPattern", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiLogicNet) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiExpanded, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; - if (const int n = vpi_get(vpiImplicitDecl, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; - if (const int n = vpi_get(vpiResolvedNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitScalared, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - if (const int n = vpi_get(vpiChargeStrength, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitVectored, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiSimNet,obj_h); - visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPathTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTchkTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiTaskCall) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiTask,obj_h); - visit_object(itr, subobject_indent, "vpiTask", visited, out , true); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiArgument,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArgument", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiAssert) { - if (const int n = vpi_get(vpiStartLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; - if (const int n = vpi_get(vpiColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; - if (const int n = vpi_get(vpiEndLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; - if (const int n = vpi_get(vpiEndColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiIsClockInferred, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsClockInferred:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiClockingBlock,obj_h); - visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiElseStmt,obj_h); - visit_object(itr, subobject_indent, "vpiElseStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingEvent,obj_h); - visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiProperty,obj_h); - visit_object(itr, subobject_indent, "vpiProperty", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiLogicTypespec) { - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiIndexTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiIndexTypespec", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiElemTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiElemTypespec", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiBreak) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiSysFuncCall) { - if (const int n = vpi_get(vpiFuncType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiFuncType:" << n << "\n"; - if (const int n = vpi_get(vpiUserDefn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiUserDefn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiUserSystf,obj_h); - visit_object(itr, subobject_indent, "vpiUserSystf", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiArgument,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArgument", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiEnumVar) { - if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiUnsupportedTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiConstrIf) { - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConstraintExpr,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConstraintExpr", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiIntTypespec) { - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiPackedArrayTypespec) { - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiIndexTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiIndexTypespec", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiElemTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiElemTypespec", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiUnionTypespec) { - if (const int n = vpi_get(vpiPacked, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPacked:" << n << "\n"; - if (const int n = vpi_get(vpiTagged, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiTagged:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiTypespecMember,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypespecMember", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiEventStmt) { - if (const int n = vpi_get(vpiBlocking, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiBlocking:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiNamedEvent,obj_h); - visit_object(itr, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiGenScope) { - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiProtected, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; - if (const int n = vpi_get(vpiImplicitDecl, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiProcess,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProcess", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimitive,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimitive", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimitiveArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimitiveArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiArrayNet,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArrayNet", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModule,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModule", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiModuleArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiModuleArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDefParam,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDefParam", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiGenScopeArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiGenScopeArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiProgram,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgram", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiProgramArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiProgramArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInterface,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInterface", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInterfaceArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInterfaceArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAliasStmt,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAliasStmt", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiClockingBlock,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAssertion,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAssertion", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiUdpDefn) { - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - if (const int n = vpi_get(vpiProtected, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiProtected:" << n << "\n"; - if (const int n = vpi_get(vpiPrimType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPrimType:" << n << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiIODecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIODecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTableEntry,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTableEntry", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInitial,obj_h); - visit_object(itr, subobject_indent, "vpiInitial", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiNetBit) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiExpanded, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; - if (const int n = vpi_get(vpiImplicitDecl, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; - if (const int n = vpi_get(vpiResolvedNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitScalared, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - if (const int n = vpi_get(vpiChargeStrength, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitVectored, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiSimNet,obj_h); - visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPathTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTchkTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiDelayTerm) { - - - return; - } - if (objectType == vpiSequenceInst) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const int n = vpi_get(vpiStartLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStartLine:" << n << "\n"; - if (const int n = vpi_get(vpiColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiColumn:" << n << "\n"; - if (const int n = vpi_get(vpiEndLine, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndLine:" << n << "\n"; - if (const int n = vpi_get(vpiEndColumn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiEndColumn:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiSequenceDecl,obj_h); - visit_object(itr, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingBlock,obj_h); - visit_object(itr, subobject_indent, "vpiClockingBlock", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiArgument,obj_h); - visit_object(itr, subobject_indent, "vpiArgument", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiShortIntTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiTimeVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiThread) { - - - return; - } - if (objectType == vpiInitial) { - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiDoWhile) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiCondition,obj_h); - visit_object(itr, subobject_indent, "vpiCondition", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiStringTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiSysTaskCall) { - if (const int n = vpi_get(vpiUserDefn, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiUserDefn:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiUserSystf,obj_h); - visit_object(itr, subobject_indent, "vpiUserSystf", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiArgument,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiArgument", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiModPath) { - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiForeachStmt) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiVariables,obj_h); - visit_object(itr, subobject_indent, "vpiVariables", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiLoopVars,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoopVars", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiStmt,obj_h); - visit_object(itr, subobject_indent, "vpiStmt", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiAssignment) { - if (const int n = vpi_get(vpiOpType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiOpType:" << n << "\n"; - if (const int n = vpi_get(vpiBlocking, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiBlocking:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLhs,obj_h); - visit_object(itr, subobject_indent, "vpiLhs", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiDelayControl,obj_h); - visit_object(itr, subobject_indent, "vpiDelayControl", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiEventControl,obj_h); - visit_object(itr, subobject_indent, "vpiEventControl", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRepeatControl,obj_h); - visit_object(itr, subobject_indent, "vpiRepeatControl", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRhs,obj_h); - visit_object(itr, subobject_indent, "vpiRhs", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiStructNet) { - if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiExpanded, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExpanded:" << n << "\n"; - if (const int n = vpi_get(vpiImplicitDecl, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiImplicitDecl:" << n << "\n"; - if (const int n = vpi_get(vpiNetDeclAssign, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetDeclAssign:" << n << "\n"; - if (const int n = vpi_get(vpiNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiNetType:" << n << "\n"; - if (const int n = vpi_get(vpiResolvedNetType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiResolvedNetType:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitScalared, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitScalared:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - if (const int n = vpi_get(vpiChargeStrength, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiChargeStrength:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const int n = vpi_get(vpiExplicitVectored, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiExplicitVectored:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiMember,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMember", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLocalLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLocalLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiSimNet,obj_h); - visit_object(itr, subobject_indent, "vpiSimNet", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPathTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTchkTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiTimeTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiContinue) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiPackedArrayVar) { - if (const int n = vpi_get(vpiPackedArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPackedArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiConstantSelect, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantSelect:" << n << "\n"; - if (const int n = vpi_get(vpiPacked, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPacked:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiRange,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRange", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiBit,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiBit", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiElement,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiElement", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiRegArray) { - if (const int n = vpi_get(vpiIsMemory, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsMemory:" << n << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiLeftRange,obj_h); - visit_object(itr, subobject_indent, "vpiLeftRange", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiRightRange,obj_h); - visit_object(itr, subobject_indent, "vpiRightRange", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiMemoryWord,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemoryWord", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiBegin) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_iterate(vpiStmt,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiStmt", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiRealTypespec) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiTypedefAlias,obj_h); - visit_object(itr, subobject_indent, "vpiTypedefAlias", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiUdp) { - if (const char* s = vpi_get_str(vpiDefName, obj_h)) - stream_indent(out, indent) << "|vpiDefName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - s_vpi_delay delay; - vpi_get_delays(obj_h, &delay); - if (delay.da != nullptr) { - stream_indent(out, indent) << visit_delays(&delay); - } - if (const int n = vpi_get(vpiPrimType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiPrimType:" << n << "\n"; - if (const int n = vpi_get(vpiStrength0, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength0:" << n << "\n"; - if (const int n = vpi_get(vpiStrength1, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStrength1:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_handle(vpiUdpDefn,obj_h); - visit_object(itr, subobject_indent, "vpiUdpDefn", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiDelay,obj_h); - visit_object(itr, subobject_indent, "vpiDelay", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiIndex,obj_h); - visit_object(itr, subobject_indent, "vpiIndex", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiLongIntVar) { - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - if (const int n = vpi_get(vpiArrayMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiArrayMember:" << n << "\n"; - if (const int n = vpi_get(vpiSigned, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSigned:" << n << "\n"; - if (const int n = vpi_get(vpiAutomatic, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAutomatic:" << n << "\n"; - if (const int n = vpi_get(vpiAllocScheme, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiAllocScheme:" << n << "\n"; - if (const int n = vpi_get(vpiConstantVariable, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiConstantVariable:" << n << "\n"; - if (const int n = vpi_get(vpiIsRandomized, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiIsRandomized:" << n << "\n"; - if (const int n = vpi_get(vpiRandType, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiRandType:" << n << "\n"; - if (const int n = vpi_get(vpiStructUnionMember, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiStructUnionMember:" << n << "\n"; - if (const int n = vpi_get(vpiScalar, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiScalar:" << n << "\n"; - if (const int n = vpi_get(vpiVisibility, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVisibility:" << n << "\n"; - if (const int n = vpi_get(vpiVector, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiVector:" << n << "\n"; - if (const char* s = vpi_get_str(vpiDecompile, obj_h)) - stream_indent(out, indent) << "|vpiDecompile:" << s << "\n"; - if (const int n = vpi_get(vpiSize, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiSize:" << n << "\n"; - s_vpi_value value; - vpi_get_value(obj_h, &value); - if (value.format) { - std::string val = visit_value(&value); - if (!val.empty()) { - stream_indent(out, indent) << val; - } - } - - vpiHandle itr; - itr = vpi_iterate(vpiPortInst,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPortInst", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiScope,obj_h); - visit_object(itr, subobject_indent, "vpiScope", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiExpr,obj_h); - visit_object(itr, subobject_indent, "vpiExpr", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiIndex,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiIndex", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPrimTerm,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPrimTerm", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiContAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiContAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPathTerm,obj_h); - visit_object(itr, subobject_indent, "vpiPathTerm", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiTchkTerm,obj_h); - visit_object(itr, subobject_indent, "vpiTchkTerm", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiDriver,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiDriver", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLoad,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLoad", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiTypespec,obj_h); - visit_object(itr, subobject_indent, "vpiTypespec", visited, out ); - release_handle(itr); - - return; - } - if (objectType == vpiClockingBlock) { - if (const int n = vpi_get(vpiInputEdge, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiInputEdge:" << n << "\n"; - if (const int n = vpi_get(vpiOutputEdge, obj_h)) - if (n != -1) - stream_indent(out, indent) << "|vpiOutputEdge:" << n << "\n"; - if (const char* s = vpi_get_str(vpiName, obj_h)) - stream_indent(out, indent) << "|vpiName:" << s << "\n"; - if (const char* s = vpi_get_str(vpiFullName, obj_h)) - stream_indent(out, indent) << "|vpiFullName:" << s << "\n"; - - vpiHandle itr; - itr = vpi_handle(vpiInstance,obj_h); - visit_object(itr, subobject_indent, "vpiInstance", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiInputSkew,obj_h); - visit_object(itr, subobject_indent, "vpiInputSkew", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiOutputSkew,obj_h); - visit_object(itr, subobject_indent, "vpiOutputSkew", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiClockingEvent,obj_h); - visit_object(itr, subobject_indent, "vpiClockingEvent", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiClockingIODecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClockingIODecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_handle(vpiPrefix,obj_h); - visit_object(itr, subobject_indent, "vpiPrefix", visited, out ); - release_handle(itr); - itr = vpi_handle(vpiActual,obj_h); - visit_object(itr, subobject_indent, "vpiActual", visited, out ); - release_handle(itr); - itr = vpi_iterate(vpiConcurrentAssertions,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiConcurrentAssertions", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVariables,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVariables", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiInternalScope,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiInternalScope", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiTypedef,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiTypedef", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiPropertyDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiPropertyDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiSequenceDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiSequenceDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEvent,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEvent", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiNamedEventArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiNamedEventArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiVirtualInterfaceVar,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiVirtualInterfaceVar", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiReg,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiReg", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiRegArray,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiRegArray", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiMemory,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiMemory", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParamAssign,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParamAssign", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiLetDecl,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiLetDecl", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiAttribute,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiAttribute", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiParameter,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiParameter", visited, out ); - release_handle(obj); - } - release_handle(itr); - itr = vpi_iterate(vpiImport,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiImport", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - if (objectType == vpiMulticlockSequenceExpr) { - - vpiHandle itr; - itr = vpi_iterate(vpiClockedSeq,obj_h); - while (vpiHandle obj = vpi_scan(itr) ) { - visit_object(obj, subobject_indent, "vpiClockedSeq", visited, out ); - release_handle(obj); - } - release_handle(itr); - - return; - } - -} - -// Public interface -void visit_designs (const std::vector& designs, std::ostream &out) { - for (auto design : designs) { - VisitedContainer visited; - visit_object(design, 0, "", &visited, out); - } -} - -std::string visit_designs (const std::vector& designs) { - std::stringstream out; - visit_designs(designs, out); - return out.str(); -} - -}; - -void vpi_show_ids(bool show) { - showIDs = show; -} - -static std::stringstream the_output; - -extern "C" { - void vpi_decompiler (vpiHandle design) { - std::vector designs; - designs.push_back(design); - UHDM::visit_designs(designs, the_output); - std::cout << the_output.str().c_str() << std::endl; - } - -} From 7a0d7c8996708cfd346a8216616c30808f2302fe Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 2 Sep 2021 11:49:33 +0200 Subject: [PATCH 426/845] Cleanup includes from Surelog Signed-off-by: Kamil Rakoczy --- uhdm-plugin/uhdmastfrontend.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index cdf2d9eb9..daf1d7d01 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -23,14 +23,6 @@ #include "frontends/ast/ast.h" #include "UhdmAst.h" -#if defined(_MSC_VER) -#include -#include -#else -#include -#include -#endif - namespace UHDM { extern void visit_object (vpiHandle obj_h, int indent, const char *relation, std::set* visited, std::ostream& out, bool shallowVisit = false); } From 624322cd3dd471b2ca611455f5a52d8753299d55 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 30 Aug 2021 17:22:03 +0200 Subject: [PATCH 427/845] Fixes required for top_earlgrey Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 43 +++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 84bcb3a24..a7ecac4e7 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -306,6 +306,9 @@ void UhdmAst::make_cell(vpiHandle obj_h, AST::AstNode* cell_node, AST::AstNode* port_h, [&](AST::AstNode* node) { if (node) { + if (node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { + node->type = AST::AST_IDENTIFIER; + } arg_node->children.push_back(node); } }); @@ -403,7 +406,7 @@ void UhdmAst::process_design() { else current_node->children.push_back(pair.second); } else { - log_warning("Removing module: %s from the design.\n", pair.second->str.c_str()); + log_warning("Removing unused module: %s from the design.\n", pair.second->str.c_str()); delete pair.second; } } @@ -534,8 +537,12 @@ void UhdmAst::process_port() { visit_one_to_many({vpiElement}, actual_h, [&](AST::AstNode* node) { - if (node && GetSize(node->children) == 1) + if (node && GetSize(node->children) == 1) { current_node->children.push_back(node->children[0]); + if (node->children[0]->type == AST::AST_WIRETYPE) { + current_node->is_custom_type=true; + } + } }); visit_one_to_many({vpiRange}, actual_h, @@ -581,15 +588,17 @@ void UhdmAst::process_port() { obj_h, [&](AST::AstNode* node) { if (node) { - if (!node->str.empty()) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type=true; - } else { - // anonymous typedef, just move children - current_node->children = std::move(node->children); + if (!current_node->children.empty() && current_node->children[0]->type != AST::AST_WIRETYPE) { + if (!node->str.empty()) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } else { + // anonymous typedef, just move children + current_node->children = std::move(node->children); + } } delete node; } @@ -676,7 +685,7 @@ void UhdmAst::process_module() { visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode* node) { - if (node) { + if (node && node->type == AST::AST_PARAMETER) { if (shared.top_nodes.count(type) && !(!node->children.empty() && node->children[0]->type != AST::AST_CONSTANT)) { if (!node->children[0]->str.empty()) module_parameters += node->str + "=" + node->children[0]->str; @@ -1050,7 +1059,7 @@ void UhdmAst::process_cont_assign_var_init() { obj_h, [&](AST::AstNode* node) { if (node) { - if (node->type == AST::AST_WIRE) { + if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { assign_node->children.push_back(new AST::AstNode(AST::AST_IDENTIFIER)); assign_node->children.back()->str = node->str; } else { @@ -1068,7 +1077,7 @@ void UhdmAst::process_cont_assign_net() { obj_h, [&](AST::AstNode* node) { if (node) { - if (node->type == AST::AST_WIRE) { + if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { current_node->children.push_back(new AST::AstNode(AST::AST_IDENTIFIER)); current_node->children.back()->str = node->str; } else { @@ -1105,6 +1114,9 @@ void UhdmAst::process_assignment() { obj_h, [&](AST::AstNode* node) { if (node) { + if(node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { + node->type = AST::AST_IDENTIFIER; + } current_node->children.push_back(node); } }); @@ -1131,7 +1143,7 @@ void UhdmAst::process_net() { wiretype_node->str = node->str; // wiretype needs to be 1st node current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type=true; + current_node->is_custom_type = true; } }); visit_range(obj_h, @@ -2335,6 +2347,7 @@ AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { case vpiContAssign: process_cont_assign(); break; case vpiAssignStmt: case vpiAssignment: process_assignment(); break; + case vpiRefVar: case vpiRefObj: current_node = make_ast_node(AST::AST_IDENTIFIER); break; case vpiNet: process_net(); break; case vpiArrayNet: process_array_net(); break; From 04fd51785868110b145cc7983af2aed1ac5a3c79 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 2 Sep 2021 16:16:10 +0200 Subject: [PATCH 428/845] Use UHDM design directly from Surelog Signed-off-by: Kamil Rakoczy --- uhdm-plugin/uhdmsurelogastfrontend.cc | 210 +++++++------------------- 1 file changed, 53 insertions(+), 157 deletions(-) diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index a81d3ee29..0ef269c6d 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -54,133 +54,33 @@ get_line_num(void) return 1; } -unsigned int executeCompilation( - int argc, const char** argv, bool diff_comp_mode, bool fileunit, - SURELOG::ErrorContainer::Stats* overallStats = NULL) { +std::vector executeCompilation(SURELOG::SymbolTable* symbolTable, + SURELOG::ErrorContainer* errors, SURELOG::CommandLineParser* clp, + SURELOG::scompiler* compiler) { bool success = true; bool noFatalErrors = true; unsigned int codedReturn = 0; - SURELOG::SymbolTable* symbolTable = new SURELOG::SymbolTable(); - SURELOG::ErrorContainer* errors = new SURELOG::ErrorContainer(symbolTable); - SURELOG::CommandLineParser* clp = new SURELOG::CommandLineParser( - errors, symbolTable, diff_comp_mode, fileunit); - success = clp->parseCommandLine(argc, argv); - bool parseOnly = clp->parseOnly(); + clp->setWriteUhdm(false); errors->printMessages(clp->muteStdout()); + std::vector the_design; if (success && (!clp->help())) { - SURELOG::scompiler* compiler = SURELOG::start_compiler(clp); + compiler = SURELOG::start_compiler(clp); if (!compiler) codedReturn |= 1; - SURELOG::shutdown_compiler(compiler); + the_design.push_back(SURELOG::get_uhdm_design(compiler)); } SURELOG::ErrorContainer::Stats stats; if (!clp->help()) { stats = errors->getErrorStats(); - if (overallStats) (*overallStats) += stats; if (stats.nbFatal) codedReturn |= 1; if (stats.nbSyntax) codedReturn |= 2; - // Only return non-zero for fatal and syntax errors - // if (stats.nbError) - // codedReturn |= 4; } bool noFErrors = true; if (!clp->help()) noFErrors = errors->printStats(stats, clp->muteStdout()); if (noFErrors == false) { noFatalErrors = false; } - - std::string ext_command = clp->getExeCommand(); - if (!ext_command.empty()) { - std::string directory = symbolTable->getSymbol(clp->getFullCompileDir()); - std::string fileList = directory + "/file.lst"; - std::string command = ext_command + " " + fileList; - int result = system(command.c_str()); - codedReturn |= result; - std::cout << "Command result: " << result << std::endl; - } - clp->logFooter(); - if (diff_comp_mode && fileunit) { - SURELOG::Report* report = new SURELOG::Report(); - std::pair results = - report->makeDiffCompUnitReport(clp, symbolTable); - success = results.first; - noFatalErrors = results.second; - delete report; - } - clp->cleanCache(); // only if -nocache - delete clp; - delete symbolTable; - delete errors; if ((!noFatalErrors) || (!success)) codedReturn |= 1; - if (parseOnly) - return 0; - else - return codedReturn; -} - -enum COMP_MODE { - NORMAL, - DIFF, - BATCH, -}; - -int run_surelog(int argc, const char** argv) { - SURELOG::Waiver::initWaivers(); - - unsigned int codedReturn = 0; - COMP_MODE mode = NORMAL; - bool nostdout = false; - std::string batchFile; - std::string diff_unit_opt = "-diffcompunit"; - std::string parseonly_opt = "-parseonly"; - std::string batch_opt = "-batch"; - std::string nostdout_opt = "-nostdout"; - for (int i = 1; i < argc; i++) { - if (parseonly_opt == argv[i]) { - } else if (diff_unit_opt == argv[i]) { - mode = DIFF; - } else if (batch_opt == argv[i]) { - batchFile = argv[i + 1]; - i++; - mode = BATCH; - } else if (nostdout_opt == argv[i]) { - nostdout = true; - } - } - - switch (mode) { - case DIFF: { -#if (defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)) - // REVISIT: Windows doesn't have the concept of forks! - // Implement it sequentially for now and optimize it if this - // proves to be a bottleneck (preferably, implemented as a - // cross platform solution). - executeCompilation(argc, argv, true, false); - codedReturn = executeCompilation(argc, argv, true, true); -#else - pid_t pid = fork(); - if (pid == 0) { - // child process - executeCompilation(argc, argv, true, false); - } else if (pid > 0) { - // parent process - codedReturn = executeCompilation(argc, argv, true, true); - } else { - // fork failed - printf("fork() failed!\n"); - return 1; - } -#endif - break; - } - case NORMAL: - codedReturn = executeCompilation(argc, argv, false, false); - break; - case BATCH: - printf("Currently batch mode is not supported!\n"); - return 1; - } - - return codedReturn; + return the_design; } struct UhdmSurelogAstFrontend : public Frontend { @@ -218,60 +118,56 @@ struct UhdmSurelogAstFrontend : public Frontend { UhdmAstShared shared; UhdmAst uhdm_ast(shared); bool defer = false; - bool process = false; std::string report_directory; - for (size_t i = 1; i < args.size(); i++) { - if (args[i] == "-process" || process == true) { - process = true; - if (args[i] == "-debug") { - shared.debug_flag = true; - } else if (args[i] == "-report" && ++i < args.size()) { - report_directory = args[i]; - shared.stop_on_error = false; - } else if (args[i] == "-noassert") { - shared.no_assert = true; - } else if (args[i] == "-defer") { - defer = true; - } + auto it = args.begin(); + while (it != args.end()) { + if (*it == "-debug") { + shared.debug_flag = true; + it = args.erase(it); + } else if (*it == "-report" && (it = args.erase(it)) < args.end()) { + report_directory = *it; + shared.stop_on_error = false; + it = args.erase(it); + } else if (*it == "-noassert") { + shared.no_assert = true; + it = args.erase(it); + } else if (*it == "-defer") { + defer = true; + it = args.erase(it); + } else { + ++it; } } - if (!process) { - std::vector cstrings; - cstrings.reserve(args.size()); - for(size_t i = 0; i < args.size(); ++i) - cstrings.push_back(const_cast(args[i].c_str())); - run_surelog(cstrings.size(), &cstrings[0]); - } else { - extra_args(f, filename, args, args.size() - 1); - AST::current_filename = filename; - AST::set_line_num = &set_line_num; - AST::get_line_num = &get_line_num; - struct AST::AstNode *current_ast; - - UHDM::Serializer serializer; - - std::vector restoredDesigns = serializer.Restore(filename); - for (auto design : restoredDesigns) { - std::stringstream strstr; - UHDM::visit_object(design, 1, "", &shared.report.unhandled, shared.debug_flag ? std::cout : strstr); - } - current_ast = uhdm_ast.visit_designs(restoredDesigns); - if (report_directory != "") { - shared.report.write(report_directory); - } - for (auto design : restoredDesigns) vpi_release_handle(design); - bool dump_ast1 = shared.debug_flag; - bool dump_ast2 = shared.debug_flag; - bool dont_redefine = false; - bool default_nettype_wire = true; - AST::process(design, current_ast, - dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, - false, false, false, false, false, false, dont_redefine, false, defer, default_nettype_wire - ); - delete current_ast; + std::vector cstrings; + cstrings.reserve(args.size()); + for(size_t i = 0; i < args.size(); ++i) + cstrings.push_back(const_cast(args[i].c_str())); + + SURELOG::SymbolTable* symbolTable = new SURELOG::SymbolTable(); + SURELOG::ErrorContainer* errors = new SURELOG::ErrorContainer(symbolTable); + SURELOG::CommandLineParser* clp = new SURELOG::CommandLineParser( + errors, symbolTable, false, false); + clp->parseCommandLine(cstrings.size(), &cstrings[0]); + SURELOG::scompiler* compiler = nullptr; + const std::vector uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); + struct AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); + if (report_directory != "") { + shared.report.write(report_directory); } - + bool dump_ast1 = shared.debug_flag; + bool dump_ast2 = shared.debug_flag; + bool dont_redefine = false; + bool default_nettype_wire = true; + AST::process(design, current_ast, + dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, + false, false, false, false, false, false, dont_redefine, false, defer, default_nettype_wire + ); + delete current_ast; + SURELOG::shutdown_compiler(compiler); + delete clp; + delete symbolTable; + delete errors; } } UhdmSurelogAstFrontend; From 0dffc2e2428a3aeec9de0c59a561c0b987bc4a0c Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 6 Sep 2021 10:44:40 +0200 Subject: [PATCH 429/845] Fix changing INTERFACEPORT to WIRE Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index a7ecac4e7..baa9039b4 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -219,7 +219,8 @@ static void add_or_replace_child(AST::AstNode* parent, AST::AstNode* child) { child->is_input = (*it)->is_input; child->is_output = (*it)->is_output; child->port_id = (*it)->port_id; - child->type = AST::AST_WIRE; + if (child->type == AST::AST_MEMORY) + child->type = AST::AST_WIRE; } if (!(*it)->children.empty() && child->children.empty()) { // This is a bit ugly, but if the child we're replacing has children and From 4f1a5e5952e26cfc356412d64cc37f3f8eaee858 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 8 Sep 2021 10:00:53 +0200 Subject: [PATCH 430/845] CI: add missing license header Signed-off-by: Kamil Rakoczy --- uhdm-plugin/Makefile | 8 ++++++++ uhdm-plugin/tests/Makefile | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 11eb2474d..052023ee3 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + NAME = uhdm SOURCES = UhdmAst.cc \ uhdmastfrontend.cc \ diff --git a/uhdm-plugin/tests/Makefile b/uhdm-plugin/tests/Makefile index 320dfcfcb..66d5a63ba 100644 --- a/uhdm-plugin/tests/Makefile +++ b/uhdm-plugin/tests/Makefile @@ -1 +1,9 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + include $(shell pwd)/../../Makefile_test.common From 69cffb41a5458f3e327732aae877f36ef4f2276f Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 8 Sep 2021 11:54:15 +0200 Subject: [PATCH 431/845] CI: uhdm-plugin: format source Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 4755 ++++++++++++------------- uhdm-plugin/UhdmAst.h | 267 +- uhdm-plugin/uhdmastfrontend.cc | 159 +- uhdm-plugin/uhdmastreport.cc | 142 +- uhdm-plugin/uhdmastreport.h | 29 +- uhdm-plugin/uhdmastshared.h | 61 +- uhdm-plugin/uhdmsurelogastfrontend.cc | 249 +- 7 files changed, 2821 insertions(+), 2841 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index baa9039b4..b8cf1184d 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1,101 +1,99 @@ +#include #include -#include #include -#include +#include -#include "headers/uhdm.h" +#include "UhdmAst.h" #include "frontends/ast/ast.h" #include "frontends/verilog/verilog_frontend.h" -#include "UhdmAst.h" -#include "vpi_user.h" +#include "headers/uhdm.h" #include "libs/sha1/sha1.h" +#include "vpi_user.h" YOSYS_NAMESPACE_BEGIN -static void sanitize_symbol_name(std::string &name) { - if (!name.empty()) { - auto pos = name.find_last_of('@'); - name = name.substr(pos+1); - // symbol names must begin with '\' - name.insert(0, "\\"); - } -} - -static std::string get_name(vpiHandle obj_h) { - std::string name; - if (auto s = vpi_get_str(vpiName, obj_h)) { - name = s; - } else if (auto s = vpi_get_str(vpiDefName, obj_h)) { - name = s; - } else if (auto s = vpi_get_str(vpiFullName, obj_h)) { - name = s; - if (name.rfind('.') != std::string::npos) { - name = name.substr(name.rfind('.') + 1); - } - } - sanitize_symbol_name(name); - return name; -} - -static std::string strip_package_name(std::string name) { - auto sep_index = name.find("::"); - if (sep_index != string::npos) { - name = name.substr(sep_index + 1); - name[0] = '\\'; - } - return name; -} - -void UhdmAst::visit_one_to_many(const std::vector child_node_types, - vpiHandle parent_handle, - const std::function& f) { - for (auto child : child_node_types) { - vpiHandle itr = vpi_iterate(child, parent_handle); - while (vpiHandle vpi_child_obj = vpi_scan(itr) ) { - UhdmAst uhdm_ast(this, shared, indent + " "); - auto *child_node = uhdm_ast.process_object(vpi_child_obj); - f(child_node); - vpi_release_handle(vpi_child_obj); - } - vpi_release_handle(itr); - } -} - -void UhdmAst::visit_one_to_one(const std::vector child_node_types, - vpiHandle parent_handle, - const std::function& f) { - for (auto child : child_node_types) { - vpiHandle itr = vpi_handle(child, parent_handle); - if (itr) { - UhdmAst uhdm_ast(this, shared, indent + " "); - auto *child_node = uhdm_ast.process_object(itr); - f(child_node); - } - vpi_release_handle(itr); - } -} - -void UhdmAst::visit_range(vpiHandle obj_h, - const std::function& f) { - std::vector range_nodes; - visit_one_to_many({vpiRange}, - obj_h, - [&](AST::AstNode* node) { - range_nodes.push_back(node); - }); - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - multirange_node->children = range_nodes; - f(multirange_node); - } else if (!range_nodes.empty()) { - f(range_nodes[0]); - } -} - -void UhdmAst::visit_default_expr(vpiHandle obj_h) { - UhdmAst initial_ast(parent, shared, indent); - UhdmAst block_ast(&initial_ast, shared, indent); +static void sanitize_symbol_name(std::string &name) +{ + if (!name.empty()) { + auto pos = name.find_last_of('@'); + name = name.substr(pos + 1); + // symbol names must begin with '\' + name.insert(0, "\\"); + } +} + +static std::string get_name(vpiHandle obj_h) +{ + std::string name; + if (auto s = vpi_get_str(vpiName, obj_h)) { + name = s; + } else if (auto s = vpi_get_str(vpiDefName, obj_h)) { + name = s; + } else if (auto s = vpi_get_str(vpiFullName, obj_h)) { + name = s; + if (name.rfind('.') != std::string::npos) { + name = name.substr(name.rfind('.') + 1); + } + } + sanitize_symbol_name(name); + return name; +} + +static std::string strip_package_name(std::string name) +{ + auto sep_index = name.find("::"); + if (sep_index != string::npos) { + name = name.substr(sep_index + 1); + name[0] = '\\'; + } + return name; +} + +void UhdmAst::visit_one_to_many(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f) +{ + for (auto child : child_node_types) { + vpiHandle itr = vpi_iterate(child, parent_handle); + while (vpiHandle vpi_child_obj = vpi_scan(itr)) { + UhdmAst uhdm_ast(this, shared, indent + " "); + auto *child_node = uhdm_ast.process_object(vpi_child_obj); + f(child_node); + vpi_release_handle(vpi_child_obj); + } + vpi_release_handle(itr); + } +} + +void UhdmAst::visit_one_to_one(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f) +{ + for (auto child : child_node_types) { + vpiHandle itr = vpi_handle(child, parent_handle); + if (itr) { + UhdmAst uhdm_ast(this, shared, indent + " "); + auto *child_node = uhdm_ast.process_object(itr); + f(child_node); + } + vpi_release_handle(itr); + } +} + +void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) +{ + std::vector range_nodes; + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = range_nodes; + f(multirange_node); + } else if (!range_nodes.empty()) { + f(range_nodes[0]); + } +} + +void UhdmAst::visit_default_expr(vpiHandle obj_h) +{ + UhdmAst initial_ast(parent, shared, indent); + UhdmAst block_ast(&initial_ast, shared, indent); block_ast.visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *expr_node) { auto mod = find_ancestor({AST::AST_MODULE}); AST::AstNode *initial_node = nullptr; @@ -124,7 +122,8 @@ void UhdmAst::visit_default_expr(vpiHandle obj_h) { block_node = new AST::AstNode(AST::AST_BLOCK); initial_node->children.push_back(block_node); } - auto block_child = find_if(block_node->children.begin(), block_node->children.end(), [](AST::AstNode *node) { return (node->type == AST::AST_ASSIGN_EQ); }); + auto block_child = + find_if(block_node->children.begin(), block_node->children.end(), [](AST::AstNode *node) { return (node->type == AST::AST_ASSIGN_EQ); }); // Insert AST_ASSIGN_EQ nodes that came from // custom_var or int_var before any other AST_ASSIGN_EQ // Especially before ones explicitly placed in initial block in source code @@ -136,2305 +135,2295 @@ void UhdmAst::visit_default_expr(vpiHandle obj_h) { }); } -AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) { +AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) +{ s_vpi_value val; vpi_get_value(obj_h, &val); std::string strValType; if (val.format) { // Needed to handle parameter nodes without typespecs and constants switch (val.format) { - case vpiScalarVal: - return AST::AstNode::mkconst_int(val.value.scalar, false, 1); - case vpiBinStrVal: { - strValType = "'b"; - break; - } - case vpiDecStrVal: { - strValType = "'d"; - break; - } - case vpiHexStrVal: { - strValType = "'h"; - break; - } - // Surelog reports constant integers as a unsigned, but by default int is signed - // so we are treating here UInt in the same way as if they would be Int - case vpiUIntVal: - case vpiIntVal: { - auto size = vpi_get(vpiSize, obj_h); - auto c = AST::AstNode::mkconst_int(val.value.integer, true, size ? size : 64); - if (size == 0) c->is_unsized = true; - return c; + case vpiScalarVal: + return AST::AstNode::mkconst_int(val.value.scalar, false, 1); + case vpiBinStrVal: { + strValType = "'b"; + break; + } + case vpiDecStrVal: { + strValType = "'d"; + break; + } + case vpiHexStrVal: { + strValType = "'h"; + break; + } + // Surelog reports constant integers as a unsigned, but by default int is signed + // so we are treating here UInt in the same way as if they would be Int + case vpiUIntVal: + case vpiIntVal: { + auto size = vpi_get(vpiSize, obj_h); + auto c = AST::AstNode::mkconst_int(val.value.integer, true, size ? size : 64); + if (size == 0) + c->is_unsized = true; + return c; + } + case vpiRealVal: + return AST::AstNode::mkconst_real(val.value.real); + case vpiStringVal: + return AST::AstNode::mkconst_str(val.value.str); + default: { + const uhdm_handle *const handle = (const uhdm_handle *)obj_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled constant format %d\n", object->VpiFile().c_str(), object->VpiLineNo(), val.format); + } + } + // handle vpiBinStrVal, vpiDecStrVal and vpiHexStrVal + if (std::strchr(val.value.str, '\'')) { + return VERILOG_FRONTEND::const2ast(val.value.str, 0, false); + } else { + auto size = vpi_get(vpiSize, obj_h); + if (size == 0) { + auto c = AST::AstNode::mkconst_int(atoi(val.value.str), true, 64); + c->is_unsized = true; + return c; + } else { + return VERILOG_FRONTEND::const2ast(std::to_string(size) + strValType + val.value.str, 0, false); + } + } + } + return nullptr; +} + +AST::AstNode *UhdmAst::make_ast_node(AST::AstNodeType type, std::vector children) +{ + auto node = new AST::AstNode(type); + node->str = get_name(obj_h); + auto it = node_renames.find(node->str); + if (it != node_renames.end()) + node->str = it->second; + if (auto filename = vpi_get_str(vpiFile, obj_h)) { + node->filename = filename; + } + if (unsigned int line = vpi_get(vpiLineNo, obj_h)) { + node->location.first_line = node->location.last_line = line; + } + node->children = children; + return node; +} + +static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) +{ + if (!child->str.empty()) { + auto it = std::find_if(parent->children.begin(), parent->children.end(), + [child](AST::AstNode *existing_child) { return existing_child->str == child->str; }); + if (it != parent->children.end()) { + // If port direction is already set, copy it to replaced child node + if ((*it)->is_input || (*it)->is_output) { + child->is_input = (*it)->is_input; + child->is_output = (*it)->is_output; + child->port_id = (*it)->port_id; + if (child->type == AST::AST_MEMORY) + child->type = AST::AST_WIRE; + } + if (!(*it)->children.empty() && child->children.empty()) { + // This is a bit ugly, but if the child we're replacing has children and + // our node doesn't, we copy its children to not lose any information + for (auto grandchild : (*it)->children) { + child->children.push_back(grandchild->clone()); + if (child->type == AST::AST_WIRE && grandchild->type == AST::AST_WIRETYPE) + child->is_custom_type = true; + } + } + // Special case for a wire with multirange + if (child->children.size() > 1 && child->type == AST::AST_WIRE && child->children[0]->type == AST::AST_RANGE && + child->children[1]->type == AST::AST_RANGE) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + for (auto *c : child->children) { + multirange_node->children.push_back(c); + } + child->children.clear(); + child->children.push_back(multirange_node); + } + delete *it; + *it = child; + return; + } + parent->children.push_back(child); + } else if (child->type == AST::AST_INITIAL) { + // Special case for initials + // Ensure that there is only one AST_INITIAL in the design + // And there is only one AST_BLOCK inside that initial + // Copy nodes from child initial to parent initial + auto initial_node_it = + find_if(parent->children.begin(), parent->children.end(), [](AST::AstNode *node) { return (node->type == AST::AST_INITIAL); }); + if (initial_node_it != parent->children.end()) { + AST::AstNode *initial_node = *initial_node_it; + + log_assert(!(initial_node->children.empty())); + log_assert(initial_node->children[0]->type == AST::AST_BLOCK); + log_assert(!(child->children.empty())); + log_assert(child->children[0]->type == AST::AST_BLOCK); + + AST::AstNode *block_node = initial_node->children[0]; + AST::AstNode *child_block_node = child->children[0]; + + // Place the contents of child block node inside parent block + for (auto child_block_child : child_block_node->children) + block_node->children.push_back(child_block_child->clone()); + // Place the remaining contents of child initial node inside the parent initial + for (auto initial_child = child->children.begin() + 1; initial_child != child->children.end(); ++initial_child) { + initial_node->children.push_back((*initial_child)->clone()); + } + } else { + // Parent AST_INITIAL does not exist + // Place child AST_INITIAL before AST_ALWAYS if found + auto insert_it = + find_if(parent->children.begin(), parent->children.end(), [](AST::AstNode *node) { return (node->type == AST::AST_ALWAYS); }); + parent->children.insert(insert_it, 1, child); + } + } else { + parent->children.push_back(child); + } +} + +void UhdmAst::make_cell(vpiHandle obj_h, AST::AstNode *cell_node, AST::AstNode *type_node) +{ + if (cell_node->children.empty() || (!cell_node->children.empty() && cell_node->children[0]->type != AST::AST_CELLTYPE)) { + auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); + typeNode->str = type_node->str; + cell_node->children.insert(cell_node->children.begin(), typeNode); + } + // Add port connections as arguments + vpiHandle port_itr = vpi_iterate(vpiPort, obj_h); + while (vpiHandle port_h = vpi_scan(port_itr)) { + std::string arg_name; + if (auto s = vpi_get_str(vpiName, port_h)) { + arg_name = s; + sanitize_symbol_name(arg_name); + } + auto arg_node = new AST::AstNode(AST::AST_ARGUMENT); + arg_node->str = arg_name; + arg_node->filename = cell_node->filename; + arg_node->location = cell_node->location; + visit_one_to_one({vpiHighConn}, port_h, [&](AST::AstNode *node) { + if (node) { + if (node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { + node->type = AST::AST_IDENTIFIER; + } + arg_node->children.push_back(node); + } + }); + cell_node->children.push_back(arg_node); + shared.report.mark_handled(port_h); + vpi_release_handle(port_h); + } + vpi_release_handle(port_itr); +} + +void UhdmAst::move_type_to_new_typedef(AST::AstNode *current_node, AST::AstNode *type_node) +{ + auto typedef_node = new AST::AstNode(AST::AST_TYPEDEF); + typedef_node->location = type_node->location; + typedef_node->filename = type_node->filename; + typedef_node->str = strip_package_name(type_node->str); + if (std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(type_node->str, current_node->str)) != shared.type_names.end()) + return; + shared.type_names.push_back(std::make_pair(type_node->str, current_node->str)); + if (type_node->type == AST::AST_STRUCT) { + type_node->str.clear(); + typedef_node->children.push_back(type_node); + current_node->children.push_back(typedef_node); + } else if (type_node->type == AST::AST_ENUM) { + if (type_node->attributes.count("\\enum_base_type")) { + auto base_type = type_node->attributes["\\enum_base_type"]; + auto wire_node = new AST::AstNode(AST::AST_WIRE); + for (auto c : base_type->children) { + std::string enum_item_str = "\\enum_value_"; + log_assert(!c->children.empty()); + log_assert(c->children[0]->type == AST::AST_CONSTANT); + int width = 1; + bool is_signed = c->children[0]->is_signed; + if (c->children.size() == 2) { + width = c->children[1]->children[0]->integer + 1; + } + RTLIL::Const val = c->children[0]->bitsAsConst(width, is_signed); + enum_item_str.append(val.as_string()); + wire_node->attributes[enum_item_str.c_str()] = AST::AstNode::mkconst_str(c->str); + } + typedef_node->children.push_back(wire_node); + current_node->children.push_back(typedef_node); + delete type_node; + } else { + type_node->str = "$enum" + std::to_string(shared.next_enum_id()); + for (auto *enum_item : type_node->children) { + enum_item->attributes["\\enum_base_type"] = AST::AstNode::mkconst_str(type_node->str); + } + auto wire_node = new AST::AstNode(AST::AST_WIRE); + wire_node->attributes["\\enum_type"] = AST::AstNode::mkconst_str(type_node->str); + if (!type_node->children.empty() && type_node->children[0]->children.size() > 1) { + wire_node->children.push_back(type_node->children[0]->children[1]->clone()); + } + typedef_node->children.push_back(wire_node); + current_node->children.push_back(type_node); + current_node->children.push_back(typedef_node); + } + } else { + type_node->str.clear(); + typedef_node->children.push_back(type_node); + current_node->children.push_back(typedef_node); + } +} + +AST::AstNode *UhdmAst::find_ancestor(const std::unordered_set &types) +{ + auto searched_node = this; + while (searched_node) { + if (searched_node->current_node) { + if (types.find(searched_node->current_node->type) != types.end()) { + return searched_node->current_node; + } + } + searched_node = searched_node->parent; + } + return nullptr; +} + +void UhdmAst::process_design() +{ + current_node = make_ast_node(AST::AST_DESIGN); + visit_one_to_many({UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules}, obj_h, [&](AST::AstNode *node) { + if (node) { + shared.top_nodes[node->str] = node; + } + }); + // Once we walked everything, unroll that as children of this node + for (auto pair : shared.top_nodes) { + if (!pair.second) + continue; + if (!pair.second->get_bool_attribute(ID::partial)) { + if (pair.second->type == AST::AST_PACKAGE) + current_node->children.insert(current_node->children.begin(), pair.second); + else + current_node->children.push_back(pair.second); + } else { + log_warning("Removing unused module: %s from the design.\n", pair.second->str.c_str()); + delete pair.second; + } + } +} + +void UhdmAst::process_parameter() +{ + auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; + current_node = make_ast_node(type); + // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused + std::vector range_nodes; + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) + range_nodes.push_back(node); + }); + vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); + if (typespec_h) { + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiBitTypespec: + case vpiLogicTypespec: { + current_node->is_logic = true; + visit_range(typespec_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); + shared.report.mark_handled(typespec_h); + break; + } + case vpiEnumTypespec: + case vpiRealTypespec: + case vpiIntTypespec: { + shared.report.mark_handled(typespec_h); + break; + } + case vpiStructTypespec: { + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + auto it = shared.param_types.find(current_node->str); + if (it == shared.param_types.end()) + shared.param_types.insert(std::make_pair(current_node->str, node)); + }); + break; + } + default: { + const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled typespec in process_parameter: '%s' of type '%s'\n", object->VpiFile().c_str(), + object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); + break; + } + } + vpi_release_handle(typespec_h); + } else { + AST::AstNode *constant_node = process_value(obj_h); + if (constant_node) { + constant_node->filename = current_node->filename; + constant_node->location = current_node->location; + current_node->children.push_back(constant_node); + } + } + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = range_nodes; + current_node->children.push_back(multirange_node); + } else if (range_nodes.size() == 1) { + current_node->children.push_back(range_nodes[0]); + } +} + +void UhdmAst::process_port() +{ + current_node = make_ast_node(AST::AST_WIRE); + current_node->port_id = shared.next_port_id(); + vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); + if (lowConn_h) { + vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); + auto actual_type = vpi_get(vpiType, actual_h); + switch (actual_type) { + case vpiModport: { + vpiHandle iface_h = vpi_handle(vpiInterface, actual_h); + if (iface_h) { + std::string cellName, ifaceName; + if (auto s = vpi_get_str(vpiName, actual_h)) { + cellName = s; + sanitize_symbol_name(cellName); + } + if (auto s = vpi_get_str(vpiDefName, iface_h)) { + ifaceName = s; + sanitize_symbol_name(ifaceName); + } + current_node->type = AST::AST_INTERFACEPORT; + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + // Skip '\' in cellName + typeNode->str = ifaceName + '.' + cellName.substr(1, cellName.length()); + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + shared.report.mark_handled(iface_h); + vpi_release_handle(iface_h); + } + break; + } + case vpiInterface: { + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + if (auto s = vpi_get_str(vpiDefName, actual_h)) { + typeNode->str = s; + sanitize_symbol_name(typeNode->str); + } + current_node->type = AST::AST_INTERFACEPORT; + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + break; + } + case vpiLogicVar: + case vpiLogicNet: { + current_node->is_logic = true; + current_node->is_signed = vpi_get(vpiSigned, actual_h); + visit_range(actual_h, [&](AST::AstNode *node) { + if (node->type == AST::AST_MULTIRANGE) + node->is_packed = true; + current_node->children.push_back(node); + }); + shared.report.mark_handled(actual_h); + break; + } + case vpiPackedArrayVar: + visit_one_to_many({vpiElement}, actual_h, [&](AST::AstNode *node) { + if (node && GetSize(node->children) == 1) { + current_node->children.push_back(node->children[0]); + if (node->children[0]->type == AST::AST_WIRETYPE) { + current_node->is_custom_type = true; + } + } + }); + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiPackedArrayNet: + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiArrayVar: + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiEnumNet: + case vpiStructNet: + case vpiArrayNet: + case vpiStructVar: + case vpiEnumVar: + case vpiIntVar: + break; + default: { + const uhdm_handle *const handle = (const uhdm_handle *)actual_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled type in process_port: %s\n", object->VpiFile().c_str(), object->VpiLineNo(), + UHDM::VpiTypeName(actual_h).c_str()); + break; + } + } + shared.report.mark_handled(lowConn_h); + vpi_release_handle(actual_h); + vpi_release_handle(lowConn_h); + } + visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (!current_node->children.empty() && current_node->children[0]->type != AST::AST_WIRETYPE) { + if (!node->str.empty()) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } else { + // anonymous typedef, just move children + current_node->children = std::move(node->children); + } + } + delete node; + } + }); + if (const int n = vpi_get(vpiDirection, obj_h)) { + if (n == vpiInput) { + current_node->is_input = true; + } else if (n == vpiOutput) { + current_node->is_output = true; + } else if (n == vpiInout) { + current_node->is_input = true; + current_node->is_output = true; + } + } +} + +void UhdmAst::process_module() +{ + std::string type = vpi_get_str(vpiDefName, obj_h); + std::string name = vpi_get_str(vpiName, obj_h) ? vpi_get_str(vpiName, obj_h) : type; + bool is_module_instance = type != name; + sanitize_symbol_name(type); + sanitize_symbol_name(name); + type = strip_package_name(type); + name = strip_package_name(name); + if (!is_module_instance) { + if (shared.top_nodes.find(type) != shared.top_nodes.end()) { + current_node = shared.top_nodes[type]; + visit_one_to_many( + {vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray, vpiContAssign, vpiVariables}, + obj_h, [&](AST::AstNode *node) { + if (node) { + add_or_replace_child(current_node, node); + } + }); + auto it = current_node->attributes.find(ID::partial); + if (it != current_node->attributes.end()) { + delete it->second; + current_node->attributes.erase(it); + } + } else { + current_node = make_ast_node(AST::AST_MODULE); + current_node->str = type; + shared.top_nodes[current_node->str] = current_node; + current_node->attributes[ID::partial] = AST::AstNode::mkconst_int(1, false, 1); + visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) { + move_type_to_new_typedef(current_node, node); + } + }); + visit_one_to_many({vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray, vpiContAssign, + vpiProcess, vpiTaskFunc}, + obj_h, [&](AST::AstNode *node) { + if (node) { + if (node->type == AST::AST_ASSIGN && node->children.size() < 2) + return; + add_or_replace_child(current_node, node); + } + }); + } + } else { + // Not a top module, create instance + current_node = make_ast_node(AST::AST_CELL); + std::string module_parameters; + visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode *node) { + if (node && node->type == AST::AST_PARAMETER) { + if (shared.top_nodes.count(type) && !(!node->children.empty() && node->children[0]->type != AST::AST_CONSTANT)) { + if (!node->children[0]->str.empty()) + module_parameters += node->str + "=" + node->children[0]->str; + else + module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); + } + delete node; + } + }); + // rename module in same way yosys do + std::string module_name; + if (module_parameters.size() > 60) + module_name = "$paramod$" + sha1(module_parameters) + type; + else if (!module_parameters.empty()) + module_name = "$paramod" + type + module_parameters; + else + module_name = type; + auto module_node = shared.top_nodes[module_name]; + if (!module_node) { + module_node = shared.top_nodes[type]; + if (!module_node) { + module_node = new AST::AstNode(AST::AST_MODULE); + module_node->str = type; + module_node->attributes[ID::partial] = AST::AstNode::mkconst_int(2, false, 1); + shared.top_nodes[module_node->str] = module_node; + } + if (!module_parameters.empty()) { + module_node = module_node->clone(); + } + } + module_node->str = module_name; + shared.top_nodes[module_node->str] = module_node; + auto cell_instance = vpi_get(vpiCellInstance, obj_h); + if (cell_instance) { + module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); + } + visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode *node) { + if (node) { + auto parent_node = std::find_if(module_node->children.begin(), module_node->children.end(), [&](AST::AstNode *child) -> bool { + return ((child->type == AST::AST_PARAMETER) || (child->type == AST::AST_LOCALPARAM)) && child->str == node->str && + // skip real parameters as they are currently not working: https://github.com/alainmarcel/Surelog/issues/1035 + child->type != AST::AST_REALVALUE; + }); + if (parent_node != module_node->children.end()) { + if ((*parent_node)->type == AST::AST_PARAMETER) { + if (cell_instance || + (!node->children.empty() && + node->children[0]->type != + AST::AST_CONSTANT)) { // if cell is a blackbox or we need to simplify parameter first, left setting parameters to yosys + // We only want to add AST_PARASET for parameters that is different than already set + // to match the name yosys gives to the module. + // Note: this should also be applied for other (not only cell_instance) modules + // but as we are using part of the modules parsed by sv2v and other + // part by uhdm, we need to always rename module if it is parametrized, + // Otherwise, verilog frontend can use module parsed by uhdm and try to set + // parameters, but this module would be already parametrized + if ((node->children[0]->integer != (*parent_node)->children[0]->integer || + node->children[0]->str != (*parent_node)->children[0]->str)) { + node->type = AST::AST_PARASET; + current_node->children.push_back(node); + } + } else { + add_or_replace_child(module_node, node); } - case vpiRealVal: return AST::AstNode::mkconst_real(val.value.real); - case vpiStringVal: return AST::AstNode::mkconst_str(val.value.str); - default: { - const uhdm_handle* const handle = (const uhdm_handle*) obj_h; - const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("%s:%d: Encountered unhandled constant format %d\n", object->VpiFile().c_str(), object->VpiLineNo(), val.format); - } - } - // handle vpiBinStrVal, vpiDecStrVal and vpiHexStrVal - if (std::strchr(val.value.str, '\'')) { - return VERILOG_FRONTEND::const2ast(val.value.str, 0, false); - } else { - auto size = vpi_get(vpiSize, obj_h); - if(size == 0) { - auto c = AST::AstNode::mkconst_int(atoi(val.value.str), true, 64); - c->is_unsized = true; - return c; - } else { - return VERILOG_FRONTEND::const2ast(std::to_string(size) + strValType + val.value.str, 0, false); - } - } - } - return nullptr; -} - -AST::AstNode* UhdmAst::make_ast_node(AST::AstNodeType type, std::vector children) { - auto node = new AST::AstNode(type); - node->str = get_name(obj_h); - auto it = node_renames.find(node->str); - if (it != node_renames.end()) - node->str = it->second; - if (auto filename = vpi_get_str(vpiFile, obj_h)) { - node->filename = filename; - } - if (unsigned int line = vpi_get(vpiLineNo, obj_h)) { - node->location.first_line = node->location.last_line = line; - } - node->children = children; - return node; -} - -static void add_or_replace_child(AST::AstNode* parent, AST::AstNode* child) { - if (!child->str.empty()) { - auto it = std::find_if(parent->children.begin(), - parent->children.end(), - [child](AST::AstNode* existing_child) { - return existing_child->str == child->str; - }); - if (it != parent->children.end()) { - // If port direction is already set, copy it to replaced child node - if((*it)->is_input || (*it)->is_output) { - child->is_input = (*it)->is_input; - child->is_output = (*it)->is_output; - child->port_id = (*it)->port_id; - if (child->type == AST::AST_MEMORY) - child->type = AST::AST_WIRE; - } - if (!(*it)->children.empty() && child->children.empty()) { - // This is a bit ugly, but if the child we're replacing has children and - // our node doesn't, we copy its children to not lose any information - for (auto grandchild : (*it)->children) { - child->children.push_back(grandchild->clone()); - if (child->type == AST::AST_WIRE && grandchild->type == AST::AST_WIRETYPE) - child->is_custom_type = true; - } - } - // Special case for a wire with multirange - if (child->children.size() > 1 && child->type == AST::AST_WIRE && - child->children[0]->type == AST::AST_RANGE && child->children[1]->type == AST::AST_RANGE) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - for (auto *c : child->children) { - multirange_node->children.push_back(c); - } - child->children.clear(); - child->children.push_back(multirange_node); - } - delete *it; - *it = child; - return; - } - parent->children.push_back(child); - } else if (child->type == AST::AST_INITIAL) { - // Special case for initials - // Ensure that there is only one AST_INITIAL in the design - // And there is only one AST_BLOCK inside that initial - // Copy nodes from child initial to parent initial - auto initial_node_it = find_if(parent->children.begin(), parent->children.end(), - [] (AST::AstNode *node) {return (node->type == AST::AST_INITIAL);} ); - if (initial_node_it != parent->children.end()) { - AST::AstNode* initial_node = *initial_node_it; - - log_assert(!(initial_node->children.empty())); - log_assert(initial_node->children[0]->type == AST::AST_BLOCK); - log_assert(!(child->children.empty())); - log_assert(child->children[0]->type == AST::AST_BLOCK); - - AST::AstNode* block_node = initial_node->children[0]; - AST::AstNode* child_block_node = child->children[0]; - - // Place the contents of child block node inside parent block - for (auto child_block_child : child_block_node->children) - block_node->children.push_back(child_block_child->clone()); - // Place the remaining contents of child initial node inside the parent initial - for (auto initial_child = child->children.begin() + 1; initial_child != child->children.end(); ++initial_child) { - initial_node->children.push_back((*initial_child)->clone()); - } - } else { - // Parent AST_INITIAL does not exist - // Place child AST_INITIAL before AST_ALWAYS if found - auto insert_it = find_if(parent->children.begin(), parent->children.end(), - [] (AST::AstNode *node) {return (node->type == AST::AST_ALWAYS);} ); - parent->children.insert(insert_it, 1, child); - } - } else { - parent->children.push_back(child); - } -} - -void UhdmAst::make_cell(vpiHandle obj_h, AST::AstNode* cell_node, AST::AstNode* type_node) { - if (cell_node->children.empty() || - (!cell_node->children.empty() && cell_node->children[0]->type != AST::AST_CELLTYPE)) { - auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); - typeNode->str = type_node->str; - cell_node->children.insert(cell_node->children.begin(), typeNode); - } - // Add port connections as arguments - vpiHandle port_itr = vpi_iterate(vpiPort, obj_h); - while (vpiHandle port_h = vpi_scan(port_itr) ) { - std::string arg_name; - if (auto s = vpi_get_str(vpiName, port_h)) { - arg_name = s; - sanitize_symbol_name(arg_name); - } - auto arg_node = new AST::AstNode(AST::AST_ARGUMENT); - arg_node->str = arg_name; - arg_node->filename = cell_node->filename; - arg_node->location = cell_node->location; - visit_one_to_one({vpiHighConn}, - port_h, - [&](AST::AstNode* node) { - if (node) { - if (node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { - node->type = AST::AST_IDENTIFIER; - } - arg_node->children.push_back(node); - } - }); - cell_node->children.push_back(arg_node); - shared.report.mark_handled(port_h); - vpi_release_handle(port_h); - } - vpi_release_handle(port_itr); -} - -void UhdmAst::move_type_to_new_typedef(AST::AstNode* current_node, AST::AstNode* type_node) { - auto typedef_node = new AST::AstNode(AST::AST_TYPEDEF); - typedef_node->location = type_node->location; - typedef_node->filename = type_node->filename; - typedef_node->str = strip_package_name(type_node->str); - if (std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(type_node->str, current_node->str)) != shared.type_names.end()) return; - shared.type_names.push_back(std::make_pair(type_node->str, current_node->str)); - if (type_node->type == AST::AST_STRUCT) { - type_node->str.clear(); - typedef_node->children.push_back(type_node); - current_node->children.push_back(typedef_node); - } else if (type_node->type == AST::AST_ENUM) { - if(type_node->attributes.count("\\enum_base_type")) { - auto base_type = type_node->attributes["\\enum_base_type"]; - auto wire_node = new AST::AstNode(AST::AST_WIRE); - for (auto c : base_type->children) { - std::string enum_item_str = "\\enum_value_"; - log_assert(!c->children.empty()); - log_assert(c->children[0]->type == AST::AST_CONSTANT); - int width = 1; - bool is_signed = c->children[0]->is_signed; - if (c->children.size() == 2) { - width = c->children[1]->children[0]->integer + 1; - } - RTLIL::Const val = c->children[0]->bitsAsConst(width, is_signed); - enum_item_str.append(val.as_string()); - wire_node->attributes[enum_item_str.c_str()] = AST::AstNode::mkconst_str(c->str); - } - typedef_node->children.push_back(wire_node); - current_node->children.push_back(typedef_node); - delete type_node; - } else { - type_node->str = "$enum" + std::to_string(shared.next_enum_id()); - for (auto* enum_item : type_node->children) { - enum_item->attributes["\\enum_base_type"] = AST::AstNode::mkconst_str(type_node->str); - } - auto wire_node = new AST::AstNode(AST::AST_WIRE); - wire_node->attributes["\\enum_type"] = AST::AstNode::mkconst_str(type_node->str); - if (!type_node->children.empty() && type_node->children[0]->children.size() > 1) { - wire_node->children.push_back(type_node->children[0]->children[1]->clone()); - } - typedef_node->children.push_back(wire_node); - current_node->children.push_back(type_node); - current_node->children.push_back(typedef_node); - } - } else { - type_node->str.clear(); - typedef_node->children.push_back(type_node); - current_node->children.push_back(typedef_node); - } -} - -AST::AstNode* UhdmAst::find_ancestor(const std::unordered_set& types) { - auto searched_node = this; - while (searched_node) { - if (searched_node->current_node) { - if (types.find(searched_node->current_node->type) != types.end()) { - return searched_node->current_node; - } - } - searched_node = searched_node->parent; - } - return nullptr; -} - - -void UhdmAst::process_design() { - current_node = make_ast_node(AST::AST_DESIGN); - visit_one_to_many({UHDM::uhdmallInterfaces, - UHDM::uhdmallPackages, - UHDM::uhdmallModules, - UHDM::uhdmtopModules}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - shared.top_nodes[node->str] = node; - } - }); - // Once we walked everything, unroll that as children of this node - for (auto pair : shared.top_nodes) { - if (!pair.second) continue; - if (!pair.second->get_bool_attribute(ID::partial)) { - if (pair.second->type == AST::AST_PACKAGE) - current_node->children.insert(current_node->children.begin(), pair.second); - else - current_node->children.push_back(pair.second); - } else { - log_warning("Removing unused module: %s from the design.\n", pair.second->str.c_str()); - delete pair.second; - } - } -} - -void UhdmAst::process_parameter() { - auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; - current_node = make_ast_node(type); - //if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused - std::vector range_nodes; - visit_range(obj_h, - [&](AST::AstNode* node) { - if (node) - range_nodes.push_back(node); - }); - vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); - if (typespec_h) { - int typespec_type = vpi_get(vpiType, typespec_h); - switch (typespec_type) { - case vpiBitTypespec: - case vpiLogicTypespec: { - current_node->is_logic = true; - visit_range(typespec_h, - [&](AST::AstNode* node) { - range_nodes.push_back(node); - }); - shared.report.mark_handled(typespec_h); - break; - } - case vpiEnumTypespec: - case vpiRealTypespec: - case vpiIntTypespec: { - shared.report.mark_handled(typespec_h); - break; - } - case vpiStructTypespec: { - visit_one_to_one({vpiTypespec}, - obj_h, - [&](AST::AstNode* node) { - auto it = shared.param_types.find(current_node->str); - if (it == shared.param_types.end()) - shared.param_types.insert(std::make_pair(current_node->str, node)); - }); - break; - } - default: { - const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; - const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("%s:%d: Encountered unhandled typespec in process_parameter: '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), - object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); - break; - } - } - vpi_release_handle(typespec_h); - } else { - AST::AstNode* constant_node = process_value(obj_h); - if (constant_node) { - constant_node->filename = current_node->filename; - constant_node->location = current_node->location; - current_node->children.push_back(constant_node); - } - } - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - multirange_node->children = range_nodes; - current_node->children.push_back(multirange_node); - } else if (range_nodes.size() == 1) { - current_node->children.push_back(range_nodes[0]); - } -} - -void UhdmAst::process_port() { - current_node = make_ast_node(AST::AST_WIRE); - current_node->port_id = shared.next_port_id(); - vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); - if (lowConn_h) { - vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); - auto actual_type = vpi_get(vpiType, actual_h); - switch (actual_type) { - case vpiModport: { - vpiHandle iface_h = vpi_handle(vpiInterface, actual_h); - if (iface_h) { - std::string cellName, ifaceName; - if (auto s = vpi_get_str(vpiName, actual_h)) { - cellName = s; - sanitize_symbol_name(cellName); - } - if (auto s = vpi_get_str(vpiDefName, iface_h)) { - ifaceName = s; - sanitize_symbol_name(ifaceName); - } - current_node->type = AST::AST_INTERFACEPORT; - auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); - // Skip '\' in cellName - typeNode->str = ifaceName + '.' + cellName.substr(1, cellName.length()); - current_node->children.push_back(typeNode); - shared.report.mark_handled(actual_h); - shared.report.mark_handled(iface_h); - vpi_release_handle(iface_h); - } - break; - } - case vpiInterface: { - auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); - if (auto s = vpi_get_str(vpiDefName, actual_h)) { - typeNode->str = s; - sanitize_symbol_name(typeNode->str); - } - current_node->type = AST::AST_INTERFACEPORT; - current_node->children.push_back(typeNode); - shared.report.mark_handled(actual_h); - break; - } - case vpiLogicVar: - case vpiLogicNet: { - current_node->is_logic = true; - current_node->is_signed = vpi_get(vpiSigned, actual_h); - visit_range(actual_h, - [&](AST::AstNode* node) { - if (node->type == AST::AST_MULTIRANGE) node->is_packed = true; - current_node->children.push_back(node); - }); - shared.report.mark_handled(actual_h); - break; - } - case vpiPackedArrayVar: - visit_one_to_many({vpiElement}, - actual_h, - [&](AST::AstNode* node) { - if (node && GetSize(node->children) == 1) { - current_node->children.push_back(node->children[0]); - if (node->children[0]->type == AST::AST_WIRETYPE) { - current_node->is_custom_type=true; - } - } - }); - visit_one_to_many({vpiRange}, - actual_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - shared.report.mark_handled(actual_h); - break; - case vpiPackedArrayNet: - visit_one_to_many({vpiRange}, - actual_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - shared.report.mark_handled(actual_h); - break; - case vpiArrayVar: - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - shared.report.mark_handled(actual_h); - break; - case vpiEnumNet: - case vpiStructNet: - case vpiArrayNet: - case vpiStructVar: - case vpiEnumVar: - case vpiIntVar: - break; - default: { - const uhdm_handle* const handle = (const uhdm_handle*) actual_h; - const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("%s:%d: Encountered unhandled type in process_port: %s\n", object->VpiFile().c_str(), object->VpiLineNo(), - UHDM::VpiTypeName(actual_h).c_str()); - break; - } - } - shared.report.mark_handled(lowConn_h); - vpi_release_handle(actual_h); - vpi_release_handle(lowConn_h); - } - visit_one_to_one({vpiTypedef}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if (!current_node->children.empty() && current_node->children[0]->type != AST::AST_WIRETYPE) { - if (!node->str.empty()) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type = true; - } else { - // anonymous typedef, just move children - current_node->children = std::move(node->children); - } - } - delete node; - } - }); - if (const int n = vpi_get(vpiDirection, obj_h)) { - if (n == vpiInput) { - current_node->is_input = true; - } else if (n == vpiOutput) { - current_node->is_output = true; - } else if (n == vpiInout) { - current_node->is_input = true; - current_node->is_output = true; - } - } -} - -void UhdmAst::process_module() { - std::string type = vpi_get_str(vpiDefName, obj_h); - std::string name = vpi_get_str(vpiName, obj_h) ? vpi_get_str(vpiName, obj_h) : type; - bool is_module_instance = type != name; - sanitize_symbol_name(type); - sanitize_symbol_name(name); - type = strip_package_name(type); - name = strip_package_name(name); - if (!is_module_instance) { - if (shared.top_nodes.find(type) != shared.top_nodes.end()) { - current_node = shared.top_nodes[type]; - visit_one_to_many({vpiModule, - vpiInterface, - vpiParameter, - vpiParamAssign, - vpiPort, - vpiNet, - vpiArrayNet, - vpiGenScopeArray, - vpiContAssign, - vpiVariables}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - add_or_replace_child(current_node, node); - } - }); - auto it = current_node->attributes.find(ID::partial); - if (it != current_node->attributes.end()) { - delete it->second; - current_node->attributes.erase(it); - } - } else { - current_node = make_ast_node(AST::AST_MODULE); - current_node->str = type; - shared.top_nodes[current_node->str] = current_node; - current_node->attributes[ID::partial] = AST::AstNode::mkconst_int(1, false, 1); - visit_one_to_many({vpiTypedef}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - move_type_to_new_typedef(current_node, node); - } - }); - visit_one_to_many({vpiModule, - vpiInterface, - vpiParameter, - vpiParamAssign, - vpiPort, - vpiNet, - vpiArrayNet, - vpiGenScopeArray, - vpiContAssign, - vpiProcess, - vpiTaskFunc}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if (node->type == AST::AST_ASSIGN && node->children.size() < 2) return; - add_or_replace_child(current_node, node); - } - }); - } - } else { - // Not a top module, create instance - current_node = make_ast_node(AST::AST_CELL); - std::string module_parameters; - visit_one_to_many({vpiParamAssign}, - obj_h, - [&](AST::AstNode* node) { - if (node && node->type == AST::AST_PARAMETER) { - if (shared.top_nodes.count(type) && !(!node->children.empty() && node->children[0]->type != AST::AST_CONSTANT)) { - if (!node->children[0]->str.empty()) - module_parameters += node->str + "=" + node->children[0]->str; - else - module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); - } - delete node; - } - }); - //rename module in same way yosys do - std::string module_name; - if (module_parameters.size() > 60) - module_name = "$paramod$" + sha1(module_parameters) + type; - else if(!module_parameters.empty()) - module_name = "$paramod" + type + module_parameters; - else module_name = type; - auto module_node = shared.top_nodes[module_name]; - if (!module_node) { - module_node = shared.top_nodes[type]; - if (!module_node) { - module_node = new AST::AstNode(AST::AST_MODULE); - module_node->str = type; - module_node->attributes[ID::partial] = AST::AstNode::mkconst_int(2, false, 1); - shared.top_nodes[module_node->str] = module_node; - } - if (!module_parameters.empty()) { - module_node = module_node->clone(); - } - } - module_node->str = module_name; - shared.top_nodes[module_node->str] = module_node; - auto cell_instance = vpi_get(vpiCellInstance, obj_h); - if (cell_instance) { - module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); - } - visit_one_to_many({vpiParamAssign}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - auto parent_node = std::find_if(module_node->children.begin(), module_node->children.end(), - [&](AST::AstNode *child)->bool { return ((child->type == AST::AST_PARAMETER) || (child->type == AST::AST_LOCALPARAM)) && - child->str == node->str && - //skip real parameters as they are currently not working: https://github.com/alainmarcel/Surelog/issues/1035 - child->type != AST::AST_REALVALUE;}); - if (parent_node != module_node->children.end()) { - if ((*parent_node)->type == AST::AST_PARAMETER) { - if (cell_instance || (!node->children.empty() && node->children[0]->type != AST::AST_CONSTANT)) { //if cell is a blackbox or we need to simplify parameter first, left setting parameters to yosys - // We only want to add AST_PARASET for parameters that is different than already set - // to match the name yosys gives to the module. - // Note: this should also be applied for other (not only cell_instance) modules - // but as we are using part of the modules parsed by sv2v and other - // part by uhdm, we need to always rename module if it is parametrized, - // Otherwise, verilog frontend can use module parsed by uhdm and try to set - // parameters, but this module would be already parametrized - if ((node->children[0]->integer != (*parent_node)->children[0]->integer || - node->children[0]->str != (*parent_node)->children[0]->str)) { - node->type = AST::AST_PARASET; - current_node->children.push_back(node); - } - } else { - add_or_replace_child(module_node, node); - } - } else { - add_or_replace_child(module_node, node); - } - } else if ((module_node->attributes.count(ID::partial) && module_node->attributes[ID::partial]->integer == 2)) { - // When module definition is not parsed by Surelog, left setting parameters to yosys - node->type = AST::AST_PARASET; - current_node->children.push_back(node); - } - } - }); - //TODO: setting keep attribute probably shouldn't be needed, - // but without this, modules that are generated in genscope are removed - // for now lets just add this attribute - module_node->attributes[ID::keep] = AST::AstNode::mkconst_int(1, false, 1); - if (module_node->attributes.count(ID::partial)) { - AST::AstNode *attr = module_node->attributes.at(ID::partial); - if (attr->type == AST::AST_CONSTANT) - if (attr->integer == 1) { - delete attr; - module_node->attributes.erase(ID::partial); - } - } - auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); - typeNode->str = module_node->str; - current_node->children.insert(current_node->children.begin(), typeNode); - visit_one_to_many({vpiVariables, - vpiNet, - vpiArrayNet}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - add_or_replace_child(module_node, node); - } - }); - visit_one_to_many({vpiInterface, - vpiModule, - vpiPort, - vpiGenScopeArray}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - add_or_replace_child(module_node, node); - } - }); - make_cell(obj_h, current_node, module_node); - } -} - -void UhdmAst::process_struct_typespec() { - current_node = make_ast_node(AST::AST_STRUCT); - visit_one_to_many({vpiTypespecMember}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); -} - -void UhdmAst::process_packed_array_typespec() { - current_node = make_ast_node(AST::AST_WIRE); - visit_one_to_one({vpiElemTypespec}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->str = node->str; - } - }); -} - -void UhdmAst::process_typespec_member() { - current_node = make_ast_node(AST::AST_STRUCT_ITEM); - current_node->str = current_node->str.substr(1); - vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); - int typespec_type = vpi_get(vpiType, typespec_h); - switch (typespec_type) { - case vpiBitTypespec: - case vpiLogicTypespec: { - current_node->is_logic = true; - visit_range(typespec_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - shared.report.mark_handled(typespec_h); - break; - } - case vpiIntTypespec: { - current_node->is_signed = true; - shared.report.mark_handled(typespec_h); - break; - } - case vpiStructTypespec: - case vpiEnumTypespec: { - visit_one_to_one({vpiTypespec}, - obj_h, - [&](AST::AstNode* node) { - if (typespec_type == vpiStructTypespec) { - auto str = current_node->str; - node->cloneInto(current_node); - current_node->str = str; - delete node; - } else if (typespec_type == vpiEnumTypespec) { - current_node->children.push_back(node); - } else { - delete node; - } - }); - break; - } - case vpiPackedArrayTypespec: - visit_one_to_one({vpiTypespec}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->str = node->str; - } - }); - break; - default: { - const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; - const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("%s:%d: Encountered unhandled typespec in process_typespec_member: '%s' of type '%s'\n", object->VpiFile().c_str(), - object->VpiLineNo(), - object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); - break; - } - } - vpi_release_handle(typespec_h); -} - -void UhdmAst::process_enum_typespec() { - current_node = make_ast_node(AST::AST_ENUM); - visit_one_to_one({vpiTypedefAlias}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->attributes["\\enum_base_type"] = node->clone(); - } - }); - visit_one_to_many({vpiEnumConst}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - vpiHandle typespec_h = vpi_handle(vpiBaseTypespec, obj_h); - if (typespec_h) { - int typespec_type = vpi_get(vpiType, typespec_h); - switch (typespec_type) { - case vpiLogicTypespec: { - current_node->is_logic = true; - bool has_range = false; - visit_range(typespec_h, - [&](AST::AstNode* node) { - has_range = true; - for (auto child : current_node->children) { - child->children.push_back(node->clone()); - } - delete node; - }); - if (!has_range) // range is needed for simplify - for (auto child : current_node->children) - child->children.push_back(make_ast_node(AST::AST_RANGE, {AST::AstNode::mkconst_int(0, true)})); - shared.report.mark_handled(typespec_h); - break; - } - case vpiIntTypespec: { - current_node->is_signed = true; - shared.report.mark_handled(typespec_h); - break; - } - default: { - const uhdm_handle* const handle = (const uhdm_handle*) typespec_h; - const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("%s:%d: Encountered unhandled typespec in process_enum_typespec: '%s' of type '%s'\n", object->VpiFile().c_str(), - object->VpiLineNo(), - object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); - break; - } - } - vpi_release_handle(typespec_h); - } -} - -void UhdmAst::process_enum_const() { - current_node = make_ast_node(AST::AST_ENUM_ITEM); - AST::AstNode* constant_node = process_value(obj_h); - if (constant_node) { - constant_node->filename = current_node->filename; - constant_node->location = current_node->location; - current_node->children.push_back(constant_node); - } -} - -void UhdmAst::process_custom_var() { - current_node = make_ast_node(AST::AST_WIRE); - visit_one_to_one({vpiTypespec}, - obj_h, - [&](AST::AstNode* node) { - if (node->str.empty()) { - // anonymous typespec, move the children to variable - current_node->type = node->type; - current_node->children = std::move(node->children); - delete node; - } else { - // custom var in gen scope have definition with declaration - auto *parent = find_ancestor({AST::AST_GENBLOCK, AST::AST_BLOCK}); - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - current_node->children.push_back(wiretype_node); - if (parent && std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(node->str, parent->str)) == shared.type_names.end() && !node->children.empty()) { - move_type_to_new_typedef(parent, node); - } else { - delete node; - } - } - }); - auto type = vpi_get(vpiType, obj_h); - if (type == vpiEnumVar || type == vpiStructVar) { - visit_default_expr(obj_h); - } - current_node->is_custom_type = true; -} - -void UhdmAst::process_int_var() { - current_node = make_ast_node(AST::AST_WIRE); - auto left_const = AST::AstNode::mkconst_int(31, true); - auto right_const = AST::AstNode::mkconst_int(0, true); - auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); - current_node->children.push_back(range); - current_node->is_signed = true; - visit_default_expr(obj_h); -} - -void UhdmAst::process_real_var() { - auto module_node = find_ancestor({AST::AST_MODULE}); - auto wire_node = make_ast_node(AST::AST_WIRE); - auto left_const = AST::AstNode::mkconst_int(63, true); - auto right_const = AST::AstNode::mkconst_int(0, true); - auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); - wire_node->children.push_back(range); - wire_node->is_signed = true; - module_node->children.push_back(wire_node); - current_node = make_ast_node(AST::AST_IDENTIFIER); - visit_default_expr(obj_h); -} - -void UhdmAst::process_array_var() { - current_node = make_ast_node(AST::AST_WIRE); - vpiHandle itr = vpi_iterate(vpi_get(vpiType, obj_h) == vpiArrayVar ? - vpiReg : vpiElement, obj_h); - while (vpiHandle reg_h = vpi_scan(itr)) { - if (vpi_get(vpiType, reg_h) == vpiStructVar || vpi_get(vpiType, reg_h) == vpiEnumVar) { - vpiHandle typespec_h = vpi_handle(vpiTypespec, reg_h); - std::string name = vpi_get_str(vpiName, typespec_h); - sanitize_symbol_name(name); - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = name; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type = true; - shared.report.mark_handled(reg_h); - shared.report.mark_handled(typespec_h); - vpi_release_handle(typespec_h); - } - vpi_release_handle(reg_h); - } - vpi_release_handle(itr); - visit_one_to_many({vpiRange}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); -} - -void UhdmAst::process_param_assign() { - current_node = make_ast_node(AST::AST_PARAMETER); - visit_one_to_one({vpiLhs}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->type = node->type; - current_node->str = node->str; - //Here we need to copy any ranges that is already present in lhs, - //but we want to skip actual value, as it is set in rhs - for (auto *c : node->children) { - if(c->type != AST::AST_CONSTANT) { - current_node->children.push_back(c->clone()); - } - } - shared.param_types[current_node->str] = shared.param_types[node->str]; - delete node; - } - }); - visit_one_to_one({vpiRhs}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.insert(current_node->children.begin(), node); - } - }); -} - -void UhdmAst::process_cont_assign_var_init() { - current_node = make_ast_node(AST::AST_INITIAL); - auto block_node = make_ast_node(AST::AST_BLOCK); - auto assign_node = make_ast_node(AST::AST_ASSIGN_LE); - block_node->children.push_back(assign_node); - current_node->children.push_back(block_node); - - visit_one_to_one({vpiLhs, - vpiRhs}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { - assign_node->children.push_back(new AST::AstNode(AST::AST_IDENTIFIER)); - assign_node->children.back()->str = node->str; - } else { - assign_node->children.push_back(node); - } - } - }); -} - -void UhdmAst::process_cont_assign_net() { - current_node = make_ast_node(AST::AST_ASSIGN); - - visit_one_to_one({vpiLhs, - vpiRhs}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { - current_node->children.push_back(new AST::AstNode(AST::AST_IDENTIFIER)); - current_node->children.back()->str = node->str; - } else { - current_node->children.push_back(node); - } - } - }); -} - -void UhdmAst::process_cont_assign() { - auto net_decl_assign = vpi_get(vpiNetDeclAssign, obj_h); - vpiHandle node_lhs_h = vpi_handle(vpiLhs, obj_h); - auto lhs_net_type = vpi_get(vpiNetType, node_lhs_h); - vpi_release_handle(node_lhs_h); - - // Check if lhs is a subtype of a net - bool isNet; - if (lhs_net_type >= vpiWire && lhs_net_type <= vpiUwire) - isNet = true; - else - // lhs is a variable - isNet = false; - if (net_decl_assign && !isNet) - process_cont_assign_var_init(); - else - process_cont_assign_net(); -} - -void UhdmAst::process_assignment() { - auto type = vpi_get(vpiBlocking, obj_h) == 1 ? AST::AST_ASSIGN_EQ : AST::AST_ASSIGN_LE; - current_node = make_ast_node(type); - visit_one_to_one({vpiLhs, - vpiRhs}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if(node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { - node->type = AST::AST_IDENTIFIER; - } - current_node->children.push_back(node); - } - }); - if (current_node->children.size() == 1 && current_node->children[0]->type == AST::AST_WIRE) { - auto top_node = find_ancestor({AST::AST_MODULE}); - if (!top_node) return; - top_node->children.push_back(current_node->children[0]->clone()); - current_node = nullptr; - } -} - -void UhdmAst::process_net() { - current_node = make_ast_node(AST::AST_WIRE); - auto net_type = vpi_get(vpiNetType, obj_h); - current_node->is_reg = net_type == vpiReg; - current_node->is_output = net_type == vpiOutput; - current_node->is_logic = !current_node->is_reg; - current_node->is_signed = vpi_get(vpiSigned, obj_h); - visit_one_to_one({vpiTypespec}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type = true; - } - }); - visit_range(obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - if (node->type == AST::AST_MULTIRANGE) { - node->is_packed = true; - } - }); -} - -void UhdmAst::process_packed_array_net() { - current_node = make_ast_node(AST::AST_WIRE); - visit_one_to_many({vpiElement}, - obj_h, - [&](AST::AstNode* node) { - if (node && GetSize(node->children) == 1) - current_node->children.push_back(node->children[0]); - current_node->is_custom_type = node->is_custom_type; - }); - visit_one_to_many({vpiRange}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); -} -void UhdmAst::process_array_net() { - current_node = make_ast_node(AST::AST_WIRE); - vpiHandle itr = vpi_iterate(vpiNet, obj_h); - while (vpiHandle net_h = vpi_scan(itr)) { - auto net_type = vpi_get(vpiType, net_h); - if (net_type == vpiLogicNet) { - current_node->is_logic = true; - current_node->is_signed = vpi_get(vpiSigned, net_h); - visit_range(net_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - shared.report.mark_handled(net_h); - } else if (net_type == vpiStructNet) { - vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h); - std::string name = vpi_get_str(vpiName, typespec_h); - sanitize_symbol_name(name); - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = name; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type = true; - shared.report.mark_handled(net_h); - shared.report.mark_handled(typespec_h); - vpi_release_handle(typespec_h); - } - vpi_release_handle(net_h); - } - vpi_release_handle(itr); - visit_one_to_many({vpiRange}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - if (current_node->children.size() == 2) { // If there is 2 ranges, change type to AST_MEMORY - current_node->type = AST::AST_MEMORY; - } -} - -void UhdmAst::process_package() { - current_node = make_ast_node(AST::AST_PACKAGE); - visit_one_to_many({vpiParameter, - vpiParamAssign}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - add_or_replace_child(current_node, node); - } - }); - visit_one_to_many({vpiTypedef}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - move_type_to_new_typedef(current_node, node); - } - }); - visit_one_to_many({vpiTaskFunc}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.push_back(node); - } - }); -} - -void UhdmAst::process_interface() { - std::string type = vpi_get_str(vpiDefName, obj_h); - std::string name = vpi_get_str(vpiName, obj_h) ? vpi_get_str(vpiName, obj_h) : type; - sanitize_symbol_name(type); - sanitize_symbol_name(name); - AST::AstNode* elaboratedInterface; - // Check if we have encountered this object before - if (shared.top_nodes.find(type) != shared.top_nodes.end()) { - // Was created before, fill missing - elaboratedInterface = shared.top_nodes[type]; - visit_one_to_many({vpiPort}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - add_or_replace_child(elaboratedInterface, node); - } - }); - } else { - // Encountered for the first time - elaboratedInterface = new AST::AstNode(AST::AST_INTERFACE); - elaboratedInterface->str = name; - visit_one_to_many({vpiNet, - vpiPort, - vpiModport}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - add_or_replace_child(elaboratedInterface, node); - } - }); - } - shared.top_nodes[elaboratedInterface->str] = elaboratedInterface; - if (name != type) { - // Not a top module, create instance - current_node = make_ast_node(AST::AST_CELL); - make_cell(obj_h, current_node, elaboratedInterface); - } else { - current_node = elaboratedInterface; - } -} - -void UhdmAst::process_modport() { - current_node = make_ast_node(AST::AST_MODPORT); - visit_one_to_many({vpiIODecl}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.push_back(node); - } - }); -} - -void UhdmAst::process_io_decl() { - current_node = nullptr; - visit_one_to_one({vpiExpr}, - obj_h, - [&](AST::AstNode* node) { - current_node = node; - }); - if (current_node == nullptr) { - current_node = make_ast_node(AST::AST_MODPORTMEMBER); - visit_range(obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - } - visit_one_to_one({vpiTypedef}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if (!node->str.empty()) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type=true; - } else { - // anonymous typedef, just move children - for (auto child : node->children) { - current_node->children.push_back(child->clone()); - } - } - delete node; - } - }); - if (const int n = vpi_get(vpiDirection, obj_h)) { - if (n == vpiInput) { - current_node->is_input = true; - } else if (n == vpiOutput) { - current_node->is_output = true; - } else if (n == vpiInout) { - current_node->is_input = true; - current_node->is_output = true; - } - } -} - -void UhdmAst::process_always() { - current_node = make_ast_node(AST::AST_ALWAYS); - visit_one_to_one({vpiStmt}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - AST::AstNode* block = nullptr; - if (node->type != AST::AST_BLOCK) { - block = new AST::AstNode(AST::AST_BLOCK, node); - } else { - block = node; - } - current_node->children.push_back(block); - } - }); - switch (vpi_get(vpiAlwaysType, obj_h)) { - case vpiAlwaysComb: - current_node->attributes[ID::always_comb] = AST::AstNode::mkconst_int(1, false); break; - case vpiAlwaysFF: - current_node->attributes[ID::always_ff] = AST::AstNode::mkconst_int(1, false); break; - case vpiAlwaysLatch: - current_node->attributes[ID::always_latch] = AST::AstNode::mkconst_int(1, false); break; - default: - break; - } -} - -void UhdmAst::process_event_control() { - current_node = make_ast_node(AST::AST_BLOCK); - visit_one_to_one({vpiCondition}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - auto process_node = find_ancestor({AST::AST_ALWAYS}); - process_node->children.push_back(node); - } - // is added inside vpiOperation - }); - visit_one_to_one({vpiStmt}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.push_back(node); - } - }); -} - -void UhdmAst::process_initial() { - current_node = make_ast_node(AST::AST_INITIAL); - visit_one_to_one({vpiStmt}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if (node->type != AST::AST_BLOCK) { - auto block_node = make_ast_node(AST::AST_BLOCK); - block_node->children.push_back(node); - node = block_node; - } - current_node->children.push_back(node); - } - }); -} - -void UhdmAst::process_begin() { - current_node = make_ast_node(AST::AST_BLOCK); - visit_one_to_many({vpiStmt}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if ((node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) && node->children.size() == 1) { - auto func_node = find_ancestor({AST::AST_FUNCTION, AST::AST_TASK}); - if (!func_node) return; - auto wire_node = new AST::AstNode(AST::AST_WIRE); - wire_node->type = AST::AST_WIRE; - wire_node->str = node->children[0]->str; - func_node->children.push_back(wire_node); - } else { - current_node->children.push_back(node); - } - } - }); -} - -void UhdmAst::process_operation() { - auto operation = vpi_get(vpiOpType, obj_h); - switch (operation) { - case vpiStreamRLOp: process_stream_op(); break; - case vpiEventOrOp: - case vpiListOp: process_list_op(); break; - case vpiCastOp: process_cast_op(); break; - case vpiInsideOp: process_inside_op(); break; - case vpiAssignmentPatternOp: process_assignment_pattern_op(); break; - default: { - current_node = make_ast_node(AST::AST_NONE); - visit_one_to_many({vpiOperand}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.push_back(node); - } - }); - switch(operation) { - case vpiMinusOp: current_node->type = AST::AST_NEG; break; - case vpiPlusOp: current_node->type = AST::AST_POS; break; - case vpiPosedgeOp: current_node->type = AST::AST_POSEDGE; break; - case vpiNegedgeOp: current_node->type = AST::AST_NEGEDGE; break; - case vpiUnaryAndOp: current_node->type = AST::AST_REDUCE_AND; break; - case vpiUnaryOrOp: current_node->type = AST::AST_REDUCE_OR; break; - case vpiUnaryXorOp: current_node->type = AST::AST_REDUCE_XOR; break; - case vpiUnaryXNorOp: current_node->type = AST::AST_REDUCE_XNOR; break; - case vpiUnaryNandOp: { - current_node->type = AST::AST_REDUCE_AND; - auto not_node = new AST::AstNode(AST::AST_LOGIC_NOT, current_node); - current_node = not_node; - break; - } - case vpiUnaryNorOp: { - current_node->type = AST::AST_REDUCE_OR; - auto not_node = new AST::AstNode(AST::AST_LOGIC_NOT, current_node); - current_node = not_node; - break; - } - case vpiBitNegOp: current_node->type = AST::AST_BIT_NOT; break; - case vpiBitAndOp: current_node->type = AST::AST_BIT_AND; break; - case vpiBitOrOp: current_node->type = AST::AST_BIT_OR; break; - case vpiBitXorOp: current_node->type = AST::AST_BIT_XOR; break; - case vpiBitXnorOp: current_node->type = AST::AST_BIT_XNOR; break; - case vpiLShiftOp: current_node->type = AST::AST_SHIFT_LEFT; break; - case vpiRShiftOp: current_node->type = AST::AST_SHIFT_RIGHT; break; - case vpiNotOp: current_node->type = AST::AST_LOGIC_NOT; break; - case vpiLogAndOp: current_node->type = AST::AST_LOGIC_AND; break; - case vpiLogOrOp: current_node->type = AST::AST_LOGIC_OR; break; - case vpiEqOp: current_node->type = AST::AST_EQ; break; - case vpiNeqOp: current_node->type = AST::AST_NE; break; - case vpiCaseEqOp: current_node->type = AST::AST_EQX; break; - case vpiGtOp: current_node->type = AST::AST_GT; break; - case vpiGeOp: current_node->type = AST::AST_GE; break; - case vpiLtOp: current_node->type = AST::AST_LT; break; - case vpiLeOp: current_node->type = AST::AST_LE; break; - case vpiSubOp: current_node->type = AST::AST_SUB; break; - case vpiAddOp: current_node->type = AST::AST_ADD; break; - case vpiMultOp: current_node->type = AST::AST_MUL; break; - case vpiDivOp: current_node->type = AST::AST_DIV; break; - case vpiModOp: current_node->type = AST::AST_MOD; break; - case vpiArithLShiftOp: current_node->type = AST::AST_SHIFT_SLEFT; break; - case vpiArithRShiftOp: current_node->type = AST::AST_SHIFT_SRIGHT; break; - case vpiPowerOp: current_node->type = AST::AST_POW; break; - case vpiPostIncOp: // TODO: Make this an actual post-increment op (currently it's a pre-increment) - case vpiPreIncOp: { - current_node->type = AST::AST_ASSIGN_EQ; - auto id = current_node->children[0]->clone(); - auto add_node = new AST::AstNode(AST::AST_ADD, id, AST::AstNode::mkconst_int(1, true)); - add_node->filename = current_node->filename; - add_node->location = current_node->location; - current_node->children.push_back(add_node); - break; - } - case vpiPostDecOp: // TODO: Make this an actual post-decrement op (currently it's a pre-decrement) - case vpiPreDecOp: { - current_node->type = AST::AST_ASSIGN_EQ; - auto id = current_node->children[0]->clone(); - auto add_node = new AST::AstNode(AST::AST_SUB, id, AST::AstNode::mkconst_int(1, true)); - add_node->filename = current_node->filename; - add_node->location = current_node->location; - current_node->children.push_back(add_node); - break; - } - case vpiConditionOp: current_node->type = AST::AST_TERNARY; break; - case vpiConcatOp: { - current_node->type = AST::AST_CONCAT; - std::reverse(current_node->children.begin(), current_node->children.end()); - break; - } - case vpiMultiConcatOp: current_node->type = AST::AST_REPLICATE; break; - case vpiAssignmentOp: current_node->type = AST::AST_ASSIGN_EQ; break; - case vpiStreamLROp: { - auto concat_node = current_node->children.back(); - current_node->children.pop_back(); - delete current_node; - current_node = concat_node; - break; - } - case vpiNullOp: { - delete current_node; - current_node = nullptr; - break; - } - default: { - delete current_node; - current_node = nullptr; - const uhdm_handle* const handle = (const uhdm_handle*) obj_h; - const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - report_error("%s:%d: Encountered unhandled operation type %d\n", object->VpiFile().c_str(), object->VpiLineNo(), operation); - } - } - } - } -} - -void UhdmAst::process_stream_op() { - // Create a for loop that does what a streaming operator would do - auto block_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL}); - auto process_node = find_ancestor({AST::AST_ALWAYS, AST::AST_INITIAL}); - auto module_node = find_ancestor({AST::AST_MODULE, AST::AST_FUNCTION, AST::AST_PACKAGE}); - log_assert(module_node); - if (!process_node) { - if (module_node->type != AST::AST_FUNCTION) { - // Create a @* always block - process_node = make_ast_node(AST::AST_ALWAYS); - module_node->children.push_back(process_node); - block_node = make_ast_node(AST::AST_BLOCK); - process_node->children.push_back(block_node); - } else { - // Create only block - block_node = make_ast_node(AST::AST_BLOCK); - module_node->children.push_back(block_node); - } - } - - auto loop_id = shared.next_loop_id(); - auto loop_counter = make_ast_node(AST::AST_WIRE, - {make_ast_node(AST::AST_RANGE, - {AST::AstNode::mkconst_int(31, false), - AST::AstNode::mkconst_int(0, false)})}); - loop_counter->is_reg = true; - loop_counter->is_signed = true; - loop_counter->str = "\\loop" + std::to_string(loop_id) + "::i"; - module_node->children.insert(module_node->children.end() - 1, loop_counter); - auto loop_counter_ident = make_ast_node(AST::AST_IDENTIFIER); - loop_counter_ident->str = loop_counter->str; - - auto lhs_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE})->children[0]; - // Temp var to allow concatenation - AST::AstNode *temp_var = nullptr; - AST::AstNode *bits_call = nullptr; - if (lhs_node->type == AST::AST_WIRE) { - module_node->children.insert(module_node->children.begin(), lhs_node->clone()); - temp_var = lhs_node->clone(); //if we already have wire as lhs, we want to create the same wire for temp_var - lhs_node->delete_children(); - lhs_node->type = AST::AST_IDENTIFIER; - bits_call = make_ast_node(AST::AST_FCALL, {lhs_node->clone()}); - bits_call->str = "\\$bits"; - } else { - // otherwise, we need to calculate size using bits fcall - bits_call = make_ast_node(AST::AST_FCALL, {lhs_node->clone()}); - bits_call->str = "\\$bits"; - temp_var = make_ast_node(AST::AST_WIRE, - {make_ast_node(AST::AST_RANGE, - {make_ast_node(AST::AST_SUB, - {bits_call, - AST::AstNode::mkconst_int(1, false)}), - AST::AstNode::mkconst_int(0, false)})}); - } - - temp_var->str = "\\loop" + std::to_string(loop_id) + "::temp"; - module_node->children.insert(module_node->children.end() - 1, temp_var); - auto temp_var_ident = make_ast_node(AST::AST_IDENTIFIER); - temp_var_ident->str = temp_var->str; - auto temp_assign = make_ast_node(AST::AST_ASSIGN_EQ, {temp_var_ident}); - block_node->children.push_back(temp_assign); - - // Assignment in the loop's block - auto assign_node = make_ast_node(AST::AST_ASSIGN_EQ, {lhs_node->clone(), temp_var_ident->clone()}); - AST::AstNode* slice_size = nullptr; // First argument in streaming op - visit_one_to_many({vpiOperand}, - obj_h, - [&](AST::AstNode* node) { - if (!slice_size && node->type == AST::AST_CONSTANT) { - slice_size = node; - } else { - temp_assign->children.push_back(node); - } - }); - if (!slice_size) { - slice_size = AST::AstNode::mkconst_int(1, true); - } - - // Initialization of the loop counter to 0 - auto init_stmt = make_ast_node(AST::AST_ASSIGN_EQ, - {loop_counter_ident, AST::AstNode::mkconst_int(0, true)}); - - // Loop condition (loop counter < $bits(RHS)) - auto cond_stmt = make_ast_node(AST::AST_LE, - {loop_counter_ident->clone(), - make_ast_node(AST::AST_SUB, - {bits_call->clone(), slice_size->clone()})}); - - // Increment loop counter - auto inc_stmt = make_ast_node(AST::AST_ASSIGN_EQ, - {loop_counter_ident->clone(), - make_ast_node(AST::AST_ADD, - {loop_counter_ident->clone(), slice_size})}); - - // Range on the LHS of the assignment - auto lhs_range = make_ast_node(AST::AST_RANGE); - auto lhs_selfsz = make_ast_node(AST::AST_SELFSZ, - {make_ast_node(AST::AST_SUB, - {make_ast_node(AST::AST_SUB, - {bits_call->clone(), AST::AstNode::mkconst_int(1, true)}), - loop_counter_ident->clone()})}); - lhs_range->children.push_back(make_ast_node(AST::AST_ADD, - {lhs_selfsz, AST::AstNode::mkconst_int(0, true)})); - lhs_range->children.push_back(make_ast_node(AST::AST_SUB, - {make_ast_node(AST::AST_ADD, - {lhs_selfsz->clone(), AST::AstNode::mkconst_int(1, true)}), - slice_size->clone()})); - - // Range on the RHS of the assignment - auto rhs_range = make_ast_node(AST::AST_RANGE); - auto rhs_selfsz = make_ast_node(AST::AST_SELFSZ, - {loop_counter_ident->clone()}); - rhs_range->children.push_back(make_ast_node(AST::AST_SUB, - {make_ast_node(AST::AST_ADD, - {rhs_selfsz, slice_size->clone()}), - AST::AstNode::mkconst_int(1, true)})); - rhs_range->children.push_back(make_ast_node(AST::AST_ADD, - {rhs_selfsz->clone(), AST::AstNode::mkconst_int(0, true)})); - - // Put ranges on the sides of the assignment - assign_node->children[0]->children.push_back(lhs_range); - assign_node->children[1]->children.push_back(rhs_range); - - // Putting the loop together - auto loop_node = make_ast_node(AST::AST_FOR); - loop_node->str = "$loop" + std::to_string(loop_id); - loop_node->children.push_back(init_stmt); - loop_node->children.push_back(cond_stmt); - loop_node->children.push_back(inc_stmt); - loop_node->children.push_back(make_ast_node(AST::AST_BLOCK, {assign_node})); - loop_node->children[3]->str = "\\stream_op_block" + std::to_string(loop_id); - - block_node->children.push_back(make_ast_node(AST::AST_BLOCK, {loop_node})); - - // Do not create a node - shared.report.mark_handled(obj_h); -} - -void UhdmAst::process_list_op() { - // Add all operands as children of process node - if (auto parent_node = find_ancestor({AST::AST_ALWAYS, AST::AST_COND})) { - visit_one_to_many({vpiOperand}, - obj_h, - [&](AST::AstNode* node) { - // add directly to process/cond node - if (node) { - parent_node->children.push_back(node); - } - }); - } - // Do not create a node - shared.report.mark_handled(obj_h); -} - -void UhdmAst::process_cast_op() { - current_node = make_ast_node(AST::AST_NONE); - visit_one_to_many({vpiOperand}, - obj_h, - [&](AST::AstNode* node) { - node->cloneInto(current_node); - delete node; - }); - vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); - shared.report.mark_handled(typespec_h); - vpi_release_handle(typespec_h); -} - -void UhdmAst::process_inside_op() { - current_node = make_ast_node(AST::AST_EQ); - AST::AstNode* lhs = nullptr; - visit_one_to_many({vpiOperand}, - obj_h, - [&](AST::AstNode* node) { - if (!lhs) { - lhs = node; - } - if (current_node->children.size() < 2) { - current_node->children.push_back(node); - } else { - auto or_node = new AST::AstNode(AST::AST_LOGIC_OR); - or_node->filename = current_node->filename; - or_node->location = current_node->location; - auto eq_node = new AST::AstNode(AST::AST_EQ); - eq_node->filename = current_node->filename; - eq_node->location = current_node->location; - or_node->children.push_back(current_node); - or_node->children.push_back(eq_node); - eq_node->children.push_back(lhs->clone()); - eq_node->children.push_back(node); - current_node = or_node; - } - }); -} - -void UhdmAst::process_assignment_pattern_op() { - current_node = make_ast_node(AST::AST_CONCAT); - if (auto param_node = find_ancestor({AST::AST_PARAMETER, AST::AST_LOCALPARAM})) { - std::map ordered_children; - visit_one_to_many({vpiOperand}, - obj_h, - [&](AST::AstNode* node) { - if (node->type == AST::AST_ASSIGN || node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) { - // Find at what position in the concat should we place this node - auto key = node->children[0]->str; - key = key.substr(key.find('.') + 1); - auto param_type = shared.param_types[param_node->str]; - size_t pos = std::find_if(param_type->children.begin(), param_type->children.end(), - [key](AST::AstNode* child) { return child->str == key; }) - - param_type->children.begin(); - ordered_children.insert(std::make_pair(pos, node->children[1]->clone())); - } else { - current_node->children.push_back(node); - } - }); - for (auto p : ordered_children) { - current_node->children.push_back(p.second); - } - return; - } - auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); - - auto proc_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL, AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_CELL}); - if (proc_node && proc_node->type == AST::AST_CELL && shared.top_nodes.count(proc_node->children[0]->str)) { - proc_node = shared.top_nodes[proc_node->children[0]->str]; - } - std::vector assignments; - visit_one_to_many({vpiOperand}, - obj_h, - [&](AST::AstNode* node) { - if (node->type == AST::AST_ASSIGN || node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) { - assignments.push_back(node); - } else { - current_node->children.push_back(node); - } - }); - std::reverse(current_node->children.begin(), current_node->children.end()); - if (!assignments.empty()) { - if (current_node->children.empty()) { - delete assign_node->children[0]; - assign_node->children[0] = assignments[0]->children[0]; - current_node = assignments[0]->children[1]; - assignments[0]->children.clear(); - delete assignments[0]; - proc_node->children.insert(proc_node->children.end(), assignments.begin() + 1, assignments.end()); - } else { - proc_node->children.insert(proc_node->children.end(), assignments.begin(), assignments.end()); - } - } -} - -void UhdmAst::process_tagged_pattern() { - auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); - auto assign_type = AST::AST_ASSIGN; - AST::AstNode* lhs_node = nullptr; - if (assign_node) { - assign_type = assign_node->type; - lhs_node = assign_node->children[0]; - } else { - lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); - lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; - } - current_node = new AST::AstNode(assign_type); - current_node->children.push_back(lhs_node->clone()); - auto typespec_h = vpi_handle(vpiTypespec, obj_h); - if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { - std::string field_name = vpi_get_str(vpiName, typespec_h); - if (field_name != "default") { // TODO: better support of the default keyword - current_node->children[0]->str += '.' + field_name; - } - } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { - s_vpi_value val; - vpi_get_value(typespec_h, &val); - auto range = new AST::AstNode(AST::AST_RANGE); - auto index = AST::AstNode::mkconst_int(val.value.integer, false); - range->children.push_back(index); - current_node->children[0]->children.push_back(range); - } - vpi_release_handle(typespec_h); - visit_one_to_one({vpiPattern}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); -} - -void UhdmAst::process_bit_select() { - current_node = make_ast_node(AST::AST_IDENTIFIER); - visit_one_to_one({vpiIndex}, - obj_h, - [&](AST::AstNode* node) { - auto range_node = new AST::AstNode(AST::AST_RANGE, node); - range_node->filename = current_node->filename; - range_node->location = current_node->location; - current_node->children.push_back(range_node); - }); -} - -void UhdmAst::process_part_select() { - current_node = make_ast_node(AST::AST_IDENTIFIER); - vpiHandle parent_h = vpi_handle(vpiParent, obj_h); - current_node->str = get_name(parent_h); - vpi_release_handle(parent_h); - auto range_node = new AST::AstNode(AST::AST_RANGE); - range_node->filename = current_node->filename; - range_node->location = current_node->location; - visit_one_to_one({vpiLeftRange, - vpiRightRange}, - obj_h, - [&](AST::AstNode* node) { - range_node->children.push_back(node); - }); - current_node->children.push_back(range_node); -} - -void UhdmAst::process_indexed_part_select() { - current_node = make_ast_node(AST::AST_IDENTIFIER); - vpiHandle parent_h = vpi_handle(vpiParent, obj_h); - current_node->str = get_name(parent_h); - vpi_release_handle(parent_h); - //TODO: check if there are other types, for now only handle 1 and 2 (+: and -:) - auto indexed_part_select_type = vpi_get(vpiIndexedPartSelectType, obj_h) == 1 ? AST::AST_ADD : AST::AST_SUB; - auto range_node = new AST::AstNode(AST::AST_RANGE); - range_node->filename = current_node->filename; - range_node->location = current_node->location; - visit_one_to_one({vpiBaseExpr}, - obj_h, - [&](AST::AstNode* node) { - range_node->children.push_back(node); - }); - visit_one_to_one({vpiWidthExpr}, - obj_h, - [&](AST::AstNode* node) { - auto right_range_node = new AST::AstNode(indexed_part_select_type); - right_range_node->children.push_back(range_node->children[0]->clone()); - right_range_node->children.push_back(node); - auto sub = new AST::AstNode(indexed_part_select_type == AST::AST_ADD ? AST::AST_SUB : AST::AST_ADD); - sub->children.push_back(right_range_node); - sub->children.push_back(AST::AstNode::mkconst_int(1, false, 1)); - range_node->children.push_back(sub); - //range_node->children.push_back(right_range_node); - }); - if (indexed_part_select_type == AST::AST_ADD) { - std::reverse(range_node->children.begin(), range_node->children.end()); - } - current_node->children.push_back(range_node); -} - -void UhdmAst::process_var_select() { - current_node = make_ast_node(AST::AST_IDENTIFIER); - visit_one_to_many({vpiIndex}, - obj_h, - [&](AST::AstNode* node) { - if (node->str == current_node->str) { - for (auto child : node->children) { - current_node->children.push_back(child); - } - node->children.clear(); - delete node; - } else { - auto range_node = new AST::AstNode(AST::AST_RANGE); - range_node->filename = current_node->filename; - range_node->location = current_node->location; - range_node->children.push_back(node); - current_node->children.push_back(range_node); - } - }); - if (current_node->children.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - multirange_node->children = current_node->children; - current_node->children.clear(); - current_node->children.push_back(multirange_node); - } -} - -void UhdmAst::process_if_else() { - current_node = make_ast_node(AST::AST_CASE); - visit_one_to_one({vpiCondition}, - obj_h, - [&](AST::AstNode* node) { - auto reduce_node = new AST::AstNode(AST::AST_REDUCE_BOOL, node); - current_node->children.push_back(reduce_node); - }); - // If true: - auto *condition = new AST::AstNode(AST::AST_COND); - auto *constant = AST::AstNode::mkconst_int(1, false, 1); - condition->children.push_back(constant); - visit_one_to_one({vpiStmt}, - obj_h, - [&](AST::AstNode* node) { - auto *statements = new AST::AstNode(AST::AST_BLOCK); - statements->children.push_back(node); - condition->children.push_back(statements); - }); - current_node->children.push_back(condition); - // Else: - if (vpi_get(vpiType, obj_h) == vpiIfElse) { - auto *condition = new AST::AstNode(AST::AST_COND); - auto *elseBlock = new AST::AstNode(AST::AST_DEFAULT); - condition->children.push_back(elseBlock); - visit_one_to_one({vpiElseStmt}, - obj_h, - [&](AST::AstNode* node) { - auto *statements = new AST::AstNode(AST::AST_BLOCK); - statements->children.push_back(node); - condition->children.push_back(statements); - }); - current_node->children.push_back(condition); - } -} - -void UhdmAst::process_for() { - current_node = make_ast_node(AST::AST_FOR); - auto loop_id = shared.next_loop_id(); - current_node->str = "$loop" + std::to_string(loop_id); - auto parent_node = find_ancestor({AST::AST_FUNCTION, AST::AST_GENBLOCK, AST::AST_MODULE}); - visit_one_to_many({vpiForInitStmt}, - obj_h, - [&](AST::AstNode* node) { - if (node->type == AST::AST_ASSIGN_LE) node->type = AST::AST_ASSIGN_EQ; - auto lhs = node->children[0]; - if (lhs->type == AST::AST_WIRE) { - auto old_str = lhs->str; - lhs->str = '\\' + current_node->str.substr(1) + "::" + lhs->str.substr(1); - node_renames.insert(std::make_pair(old_str, lhs->str)); - auto *wire = lhs->clone(); - wire->is_reg = true; - parent_node->children.push_back(wire); - lhs->type = AST::AST_IDENTIFIER; - lhs->is_signed = false; - lhs->delete_children(); - } - current_node->children.push_back(node); - }); - visit_one_to_one({vpiCondition}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - visit_one_to_many({vpiForIncStmt}, - obj_h, - [&](AST::AstNode* node) { - if (node->type == AST::AST_ASSIGN_LE) node->type = AST::AST_ASSIGN_EQ; - current_node->children.push_back(node); - }); - visit_one_to_one({vpiStmt}, - obj_h, - [&](AST::AstNode* node) { - auto *statements = make_ast_node(AST::AST_BLOCK); - statements->str = current_node->str; // Needed in simplify step - statements->children.push_back(node); - current_node->children.push_back(statements); - }); -} - -void UhdmAst::process_gen_scope_array() { - current_node = make_ast_node(AST::AST_GENBLOCK); - visit_one_to_many({vpiGenScope}, - obj_h, - [&](AST::AstNode* genscope_node) { - for (auto* child : genscope_node->children) { - if (child->type == AST::AST_PARAMETER || - child->type == AST::AST_LOCALPARAM) { - auto param_str = child->str.substr(1); - auto array_str = "[" + param_str + "]"; - genscope_node->visitEachDescendant([&](AST::AstNode* node) { - auto pos = node->str.find(array_str); - if (pos != std::string::npos) { - node->type = AST::AST_PREFIX; - auto *param = new AST::AstNode(AST::AST_IDENTIFIER); - param->str = child->str; - auto *field = new AST::AstNode(AST::AST_IDENTIFIER); - field->str = "\\" + node->str.substr(node->str.rfind(']') + 2); - node->str = node->str.substr(0, node->str.find('[')); - node->children.push_back(param); - node->children.push_back(field); - } - }); - } - } - current_node->children.insert(current_node->children.end(), - genscope_node->children.begin(), - genscope_node->children.end()); - genscope_node->children.clear(); - delete genscope_node; - }); -} - -void UhdmAst::process_gen_scope() { - current_node = make_ast_node(AST::AST_GENBLOCK); - visit_one_to_many({ - vpiParamAssign, - vpiParameter, - vpiNet, - vpiArrayNet, - vpiVariables, - vpiContAssign, - vpiProcess, - vpiModule, - vpiGenScopeArray}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if ((node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) && - node->children.empty()) { - delete node; //skip parameters without any children - } else { - current_node->children.push_back(node); - } - } - }); -} - -void UhdmAst::process_case() { - current_node = make_ast_node(AST::AST_CASE); - visit_one_to_one({vpiCondition}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - visit_one_to_many({vpiCaseItem}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); -} - -void UhdmAst::process_case_item() { - current_node = make_ast_node(AST::AST_COND); - visit_one_to_many({vpiExpr}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.push_back(node); - } - }); - if (current_node->children.empty()) { - current_node->children.push_back(new AST::AstNode(AST::AST_DEFAULT)); - } - visit_one_to_one({vpiStmt}, - obj_h, - [&](AST::AstNode* node) { - if (node->type != AST::AST_BLOCK) { - auto block_node = new AST::AstNode(AST::AST_BLOCK); - block_node->children.push_back(node); - node = block_node; - } - current_node->children.push_back(node); - }); -} - -void UhdmAst::process_range() { - current_node = make_ast_node(AST::AST_RANGE); - visit_one_to_one({vpiLeftRange, - vpiRightRange}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); -} - -void UhdmAst::process_return() { - current_node = make_ast_node(AST::AST_ASSIGN_EQ); - auto func_node = find_ancestor({AST::AST_FUNCTION, AST::AST_TASK}); - if (!func_node->children.empty()) { - auto lhs = new AST::AstNode(AST::AST_IDENTIFIER); - lhs->str = func_node->children[0]->str; - current_node->children.push_back(lhs); - } - visit_one_to_one({vpiCondition}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); -} - -void UhdmAst::process_function() { - current_node = make_ast_node(vpi_get(vpiType, obj_h) == vpiFunction ? AST::AST_FUNCTION : AST::AST_TASK); - visit_one_to_one({vpiReturn}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - auto net_type = vpi_get(vpiNetType, obj_h); - node->is_reg = net_type == vpiReg; - node->str = current_node->str; - current_node->children.push_back(node); - - } - }); - visit_one_to_many({vpiIODecl}, - obj_h, - [&](AST::AstNode* node) { - node->type = AST::AST_WIRE; - current_node->children.push_back(node); - }); - visit_one_to_many({vpiVariables}, - obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - visit_one_to_one({vpiStmt}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.push_back(node); - } - }); -} - -void UhdmAst::process_logic_var() { - current_node = make_ast_node(AST::AST_WIRE); - //TODO: add const attribute, but it seems it is little more - //then just setting boolean value - //current_node->is_const = vpi_get(vpiConstantVariable, obj_h); - visit_one_to_one({vpiTypespec}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type=true; - } - }); - visit_range(obj_h, - [&](AST::AstNode* node) { - current_node->children.push_back(node); - }); - visit_default_expr(obj_h); -} - -void UhdmAst::process_sys_func_call() { - current_node = make_ast_node(AST::AST_FCALL); - if (current_node->str == "\\$signed") { - current_node->type = AST::AST_TO_SIGNED; - } else if (current_node->str == "\\$unsigned") { - current_node->type = AST::AST_TO_UNSIGNED; - } else if (current_node->str == "\\$display" || current_node->str == "\\$time") { - current_node->type = AST::AST_TCALL; - current_node->str = current_node->str.substr(1); - } else if (current_node->str == "\\$readmemh") { - current_node->type = AST::AST_TCALL; - } - - visit_one_to_many({vpiArgument}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.push_back(node); - } - }); -} - -void UhdmAst::process_func_call() { - current_node = make_ast_node(AST::AST_FCALL); - visit_one_to_many({vpiArgument}, - obj_h, - [&](AST::AstNode* node) { - if (node) { - if (node->type == AST::AST_PARAMETER || - node->type == AST::AST_LOCALPARAM) { - node->type = AST::AST_IDENTIFIER; - } - current_node->children.push_back(node); - } - }); -} - -void UhdmAst::process_immediate_assert() { - current_node = make_ast_node(AST::AST_ASSERT); - visit_one_to_one({vpiExpr}, - obj_h, - [&](AST::AstNode* n) { - if (n) { - current_node->children.push_back(n); - } - }); -} - -void UhdmAst::process_hier_path() { - current_node = make_ast_node(AST::AST_IDENTIFIER); - current_node->str = "\\"; - visit_one_to_many({vpiActual}, - obj_h, - [&](AST::AstNode* node) { - if (current_node->str == "\\" && !node->children.empty() && node->children[0]->type == AST::AST_RANGE) { - current_node->type = AST::AST_PREFIX; - current_node->str = node->str; - current_node->children.push_back(node->children[0]->children[0]->clone()); - delete node; - } else { - if (current_node->type == AST::AST_IDENTIFIER) { - if (current_node->str != "\\") { - current_node->str += "."; - } - current_node->str += node->str.substr(1); - current_node->children = std::move(node->children); - delete node; - } else { - current_node->children.push_back(node); - } - } - }); -} - -void UhdmAst::process_logic_typespec() { - current_node = make_ast_node(AST::AST_WIRE); - current_node->is_logic = true; - visit_range(obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.push_back(node); - } - }); - if (!current_node->str.empty()) { - move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); - } -} - -void UhdmAst::process_int_typespec() { - current_node = make_ast_node(AST::AST_WIRE); - auto left_const = AST::AstNode::mkconst_int(31, true); - auto right_const = AST::AstNode::mkconst_int(0, true); - auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); - current_node->children.push_back(range); - current_node->is_signed = true; - if (!current_node->str.empty()) { - move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); - } -} - -void UhdmAst::process_string_var() { - current_node = make_ast_node(AST::AST_WIRE); - current_node->is_string = true; - // FIXME: - // this is only basic support for strings, - // currently yosys doesn't support dynamic resize of wire - // based on string size - // here we try to get size of string based on provided const string - // if it is not available, we are setting size to explicite 64 bits - visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *expr_node) { - if (expr_node->type == AST::AST_CONSTANT) { - auto left_const = AST::AstNode::mkconst_int(expr_node->range_left, true); - auto right_const = AST::AstNode::mkconst_int(expr_node->range_right, true); - auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); - current_node->children.push_back(range); - } - }); - if (current_node->children.empty()) { - auto left_const = AST::AstNode::mkconst_int(64, true); - auto right_const = AST::AstNode::mkconst_int(0, true); - auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); - current_node->children.push_back(range); - } - visit_default_expr(obj_h); -} - -void UhdmAst::process_string_typespec() { - current_node = make_ast_node(AST::AST_WIRE); - current_node->is_string = true; - // FIXME: - // this is only basic support for strings, - // currently yosys doesn't support dynamic resize of wire - // based on string size - // here, we are setting size to explicite 64 bits - auto left_const = AST::AstNode::mkconst_int(64, true); - auto right_const = AST::AstNode::mkconst_int(0, true); - auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); - current_node->children.push_back(range); -} - -void UhdmAst::process_bit_typespec() { - current_node = make_ast_node(AST::AST_WIRE); - visit_range(obj_h, - [&](AST::AstNode* node) { - if (node) { - current_node->children.push_back(node); - } - }); - if (!current_node->str.empty()) { - move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); - } -} - -AST::AstNode* UhdmAst::process_object(vpiHandle obj_handle) { - obj_h = obj_handle; - const unsigned object_type = vpi_get(vpiType, obj_h); - const uhdm_handle* const handle = (const uhdm_handle*) obj_h; - const UHDM::BaseClass* const object = (const UHDM::BaseClass*) handle->object; - - if (shared.debug_flag) { - std::cout << indent << "Object '" << object->VpiName() << "' of type '" << UHDM::VpiTypeName(obj_h) << '\'' << std::endl; - } - - switch(object_type) { - case vpiDesign: process_design(); break; - case vpiParameter: process_parameter(); break; - case vpiPort: process_port(); break; - case vpiModule: process_module(); break; - case vpiStructTypespec: process_struct_typespec(); break; - case vpiPackedArrayTypespec: process_packed_array_typespec(); break; - case vpiTypespecMember: process_typespec_member(); break; - case vpiEnumTypespec: process_enum_typespec(); break; - case vpiEnumConst: process_enum_const(); break; - case vpiEnumVar: - case vpiEnumNet: - case vpiStructVar: - case vpiStructNet: process_custom_var(); break; - case vpiIntVar: process_int_var(); break; - case vpiRealVar: process_real_var(); break; - case vpiPackedArrayVar: - case vpiArrayVar: process_array_var(); break; - case vpiParamAssign: process_param_assign(); break; - case vpiContAssign: process_cont_assign(); break; - case vpiAssignStmt: - case vpiAssignment: process_assignment(); break; - case vpiRefVar: - case vpiRefObj: current_node = make_ast_node(AST::AST_IDENTIFIER); break; - case vpiNet: process_net(); break; - case vpiArrayNet: process_array_net(); break; - case vpiPackedArrayNet: process_packed_array_net(); break; - case vpiPackage: process_package(); break; - case vpiInterface: process_interface(); break; - case vpiModport: process_modport(); break; - case vpiIODecl: process_io_decl(); break; - case vpiAlways: process_always(); break; - case vpiEventControl: process_event_control(); break; - case vpiInitial: process_initial(); break; - case vpiNamedBegin: - case vpiBegin: process_begin(); break; - case vpiCondition: - case vpiOperation: process_operation(); break; - case vpiTaggedPattern: process_tagged_pattern(); break; - case vpiBitSelect: process_bit_select(); break; - case vpiPartSelect: process_part_select(); break; - case vpiIndexedPartSelect: process_indexed_part_select(); break; - case vpiVarSelect: process_var_select(); break; - case vpiIf: - case vpiIfElse: process_if_else(); break; - case vpiFor: process_for(); break; - case vpiGenScopeArray: process_gen_scope_array(); break; - case vpiGenScope: process_gen_scope(); break; - case vpiCase: process_case(); break; - case vpiCaseItem: process_case_item(); break; - case vpiConstant: current_node = process_value(obj_h); break; - case vpiRange: process_range(); break; - case vpiReturn: process_return(); break; - case vpiFunction: - case vpiTask: process_function(); break; - case vpiBitVar: - case vpiLogicVar: process_logic_var(); break; - case vpiSysFuncCall: process_sys_func_call(); break; - case vpiFuncCall: process_func_call(); break; - case vpiTaskCall: current_node = make_ast_node(AST::AST_TCALL); break; - case vpiImmediateAssert: - if (!shared.no_assert) - process_immediate_assert(); - break; - case vpiHierPath: process_hier_path(); break; - case UHDM::uhdmimport: break; - case vpiDelayControl: break; - case vpiLogicTypespec: process_logic_typespec(); break; - case vpiIntTypespec: process_int_typespec(); break; - case vpiBitTypespec: process_bit_typespec(); break; - case vpiStringVar: process_string_var(); break; - case vpiStringTypespec: process_string_typespec(); break; - case vpiProgram: - default: report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), object->VpiName().c_str(), - UHDM::VpiTypeName(obj_h).c_str()); - break; - } - - // Check if we initialized the node in switch-case - if (current_node) { - if (current_node->type != AST::AST_NONE) { - shared.report.mark_handled(object); - return current_node; - } - } - return nullptr; -} - -AST::AstNode* UhdmAst::visit_designs(const std::vector& designs) { - current_node = new AST::AstNode(AST::AST_DESIGN); - for (auto design : designs) { - UhdmAst ast(this, shared, indent); - auto *nodes = ast.process_object(design); - // Flatten multiple designs into one - for (auto child : nodes->children) { - current_node->children.push_back(child); - } - } - return current_node; -} - -void UhdmAst::report_error(const char *format, ...) const { - va_list args; - va_start(args, format); - if (shared.stop_on_error) { - logv_error(format, args); - } else { - logv_warning(format, args); - } + } else { + add_or_replace_child(module_node, node); + } + } else if ((module_node->attributes.count(ID::partial) && module_node->attributes[ID::partial]->integer == 2)) { + // When module definition is not parsed by Surelog, left setting parameters to yosys + node->type = AST::AST_PARASET; + current_node->children.push_back(node); + } + } + }); + // TODO: setting keep attribute probably shouldn't be needed, + // but without this, modules that are generated in genscope are removed + // for now lets just add this attribute + module_node->attributes[ID::keep] = AST::AstNode::mkconst_int(1, false, 1); + if (module_node->attributes.count(ID::partial)) { + AST::AstNode *attr = module_node->attributes.at(ID::partial); + if (attr->type == AST::AST_CONSTANT) + if (attr->integer == 1) { + delete attr; + module_node->attributes.erase(ID::partial); + } + } + auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); + typeNode->str = module_node->str; + current_node->children.insert(current_node->children.begin(), typeNode); + visit_one_to_many({vpiVariables, vpiNet, vpiArrayNet}, obj_h, [&](AST::AstNode *node) { + if (node) { + add_or_replace_child(module_node, node); + } + }); + visit_one_to_many({vpiInterface, vpiModule, vpiPort, vpiGenScopeArray}, obj_h, [&](AST::AstNode *node) { + if (node) { + add_or_replace_child(module_node, node); + } + }); + make_cell(obj_h, current_node, module_node); + } +} + +void UhdmAst::process_struct_typespec() +{ + current_node = make_ast_node(AST::AST_STRUCT); + visit_one_to_many({vpiTypespecMember}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_packed_array_typespec() +{ + current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->str = node->str; + } + }); +} + +void UhdmAst::process_typespec_member() +{ + current_node = make_ast_node(AST::AST_STRUCT_ITEM); + current_node->str = current_node->str.substr(1); + vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiBitTypespec: + case vpiLogicTypespec: { + current_node->is_logic = true; + visit_range(typespec_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(typespec_h); + break; + } + case vpiIntTypespec: { + current_node->is_signed = true; + shared.report.mark_handled(typespec_h); + break; + } + case vpiStructTypespec: + case vpiEnumTypespec: { + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (typespec_type == vpiStructTypespec) { + auto str = current_node->str; + node->cloneInto(current_node); + current_node->str = str; + delete node; + } else if (typespec_type == vpiEnumTypespec) { + current_node->children.push_back(node); + } else { + delete node; + } + }); + break; + } + case vpiPackedArrayTypespec: + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->str = node->str; + } + }); + break; + default: { + const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled typespec in process_typespec_member: '%s' of type '%s'\n", object->VpiFile().c_str(), + object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); + break; + } + } + vpi_release_handle(typespec_h); +} + +void UhdmAst::process_enum_typespec() +{ + current_node = make_ast_node(AST::AST_ENUM); + visit_one_to_one({vpiTypedefAlias}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->attributes["\\enum_base_type"] = node->clone(); + } + }); + visit_one_to_many({vpiEnumConst}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + vpiHandle typespec_h = vpi_handle(vpiBaseTypespec, obj_h); + if (typespec_h) { + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiLogicTypespec: { + current_node->is_logic = true; + bool has_range = false; + visit_range(typespec_h, [&](AST::AstNode *node) { + has_range = true; + for (auto child : current_node->children) { + child->children.push_back(node->clone()); + } + delete node; + }); + if (!has_range) // range is needed for simplify + for (auto child : current_node->children) + child->children.push_back(make_ast_node(AST::AST_RANGE, {AST::AstNode::mkconst_int(0, true)})); + shared.report.mark_handled(typespec_h); + break; + } + case vpiIntTypespec: { + current_node->is_signed = true; + shared.report.mark_handled(typespec_h); + break; + } + default: { + const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled typespec in process_enum_typespec: '%s' of type '%s'\n", object->VpiFile().c_str(), + object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); + break; + } + } + vpi_release_handle(typespec_h); + } +} + +void UhdmAst::process_enum_const() +{ + current_node = make_ast_node(AST::AST_ENUM_ITEM); + AST::AstNode *constant_node = process_value(obj_h); + if (constant_node) { + constant_node->filename = current_node->filename; + constant_node->location = current_node->location; + current_node->children.push_back(constant_node); + } +} + +void UhdmAst::process_custom_var() +{ + current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + delete node; + } else { + // custom var in gen scope have definition with declaration + auto *parent = find_ancestor({AST::AST_GENBLOCK, AST::AST_BLOCK}); + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + if (parent && + std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(node->str, parent->str)) == shared.type_names.end() && + !node->children.empty()) { + move_type_to_new_typedef(parent, node); + } else { + delete node; + } + } + }); + auto type = vpi_get(vpiType, obj_h); + if (type == vpiEnumVar || type == vpiStructVar) { + visit_default_expr(obj_h); + } + current_node->is_custom_type = true; +} + +void UhdmAst::process_int_var() +{ + current_node = make_ast_node(AST::AST_WIRE); + auto left_const = AST::AstNode::mkconst_int(31, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); + current_node->children.push_back(range); + current_node->is_signed = true; + visit_default_expr(obj_h); +} + +void UhdmAst::process_real_var() +{ + auto module_node = find_ancestor({AST::AST_MODULE}); + auto wire_node = make_ast_node(AST::AST_WIRE); + auto left_const = AST::AstNode::mkconst_int(63, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); + wire_node->children.push_back(range); + wire_node->is_signed = true; + module_node->children.push_back(wire_node); + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_default_expr(obj_h); +} + +void UhdmAst::process_array_var() +{ + current_node = make_ast_node(AST::AST_WIRE); + vpiHandle itr = vpi_iterate(vpi_get(vpiType, obj_h) == vpiArrayVar ? vpiReg : vpiElement, obj_h); + while (vpiHandle reg_h = vpi_scan(itr)) { + if (vpi_get(vpiType, reg_h) == vpiStructVar || vpi_get(vpiType, reg_h) == vpiEnumVar) { + vpiHandle typespec_h = vpi_handle(vpiTypespec, reg_h); + std::string name = vpi_get_str(vpiName, typespec_h); + sanitize_symbol_name(name); + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = name; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + shared.report.mark_handled(reg_h); + shared.report.mark_handled(typespec_h); + vpi_release_handle(typespec_h); + } + vpi_release_handle(reg_h); + } + vpi_release_handle(itr); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_param_assign() +{ + current_node = make_ast_node(AST::AST_PARAMETER); + visit_one_to_one({vpiLhs}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->type = node->type; + current_node->str = node->str; + // Here we need to copy any ranges that is already present in lhs, + // but we want to skip actual value, as it is set in rhs + for (auto *c : node->children) { + if (c->type != AST::AST_CONSTANT) { + current_node->children.push_back(c->clone()); + } + } + shared.param_types[current_node->str] = shared.param_types[node->str]; + delete node; + } + }); + visit_one_to_one({vpiRhs}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.insert(current_node->children.begin(), node); + } + }); +} + +void UhdmAst::process_cont_assign_var_init() +{ + current_node = make_ast_node(AST::AST_INITIAL); + auto block_node = make_ast_node(AST::AST_BLOCK); + auto assign_node = make_ast_node(AST::AST_ASSIGN_LE); + block_node->children.push_back(assign_node); + current_node->children.push_back(block_node); + + visit_one_to_one({vpiLhs, vpiRhs}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { + assign_node->children.push_back(new AST::AstNode(AST::AST_IDENTIFIER)); + assign_node->children.back()->str = node->str; + } else { + assign_node->children.push_back(node); + } + } + }); +} + +void UhdmAst::process_cont_assign_net() +{ + current_node = make_ast_node(AST::AST_ASSIGN); + + visit_one_to_one({vpiLhs, vpiRhs}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { + current_node->children.push_back(new AST::AstNode(AST::AST_IDENTIFIER)); + current_node->children.back()->str = node->str; + } else { + current_node->children.push_back(node); + } + } + }); +} + +void UhdmAst::process_cont_assign() +{ + auto net_decl_assign = vpi_get(vpiNetDeclAssign, obj_h); + vpiHandle node_lhs_h = vpi_handle(vpiLhs, obj_h); + auto lhs_net_type = vpi_get(vpiNetType, node_lhs_h); + vpi_release_handle(node_lhs_h); + + // Check if lhs is a subtype of a net + bool isNet; + if (lhs_net_type >= vpiWire && lhs_net_type <= vpiUwire) + isNet = true; + else + // lhs is a variable + isNet = false; + if (net_decl_assign && !isNet) + process_cont_assign_var_init(); + else + process_cont_assign_net(); +} + +void UhdmAst::process_assignment() +{ + auto type = vpi_get(vpiBlocking, obj_h) == 1 ? AST::AST_ASSIGN_EQ : AST::AST_ASSIGN_LE; + current_node = make_ast_node(type); + visit_one_to_one({vpiLhs, vpiRhs}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { + node->type = AST::AST_IDENTIFIER; + } + current_node->children.push_back(node); + } + }); + if (current_node->children.size() == 1 && current_node->children[0]->type == AST::AST_WIRE) { + auto top_node = find_ancestor({AST::AST_MODULE}); + if (!top_node) + return; + top_node->children.push_back(current_node->children[0]->clone()); + current_node = nullptr; + } +} + +void UhdmAst::process_net() +{ + current_node = make_ast_node(AST::AST_WIRE); + auto net_type = vpi_get(vpiNetType, obj_h); + current_node->is_reg = net_type == vpiReg; + current_node->is_output = net_type == vpiOutput; + current_node->is_logic = !current_node->is_reg; + current_node->is_signed = vpi_get(vpiSigned, obj_h); + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } + }); + visit_range(obj_h, [&](AST::AstNode *node) { + current_node->children.push_back(node); + if (node->type == AST::AST_MULTIRANGE) { + node->is_packed = true; + } + }); +} + +void UhdmAst::process_packed_array_net() +{ + current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_many({vpiElement}, obj_h, [&](AST::AstNode *node) { + if (node && GetSize(node->children) == 1) + current_node->children.push_back(node->children[0]); + current_node->is_custom_type = node->is_custom_type; + }); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} +void UhdmAst::process_array_net() +{ + current_node = make_ast_node(AST::AST_WIRE); + vpiHandle itr = vpi_iterate(vpiNet, obj_h); + while (vpiHandle net_h = vpi_scan(itr)) { + auto net_type = vpi_get(vpiType, net_h); + if (net_type == vpiLogicNet) { + current_node->is_logic = true; + current_node->is_signed = vpi_get(vpiSigned, net_h); + visit_range(net_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(net_h); + } else if (net_type == vpiStructNet) { + vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h); + std::string name = vpi_get_str(vpiName, typespec_h); + sanitize_symbol_name(name); + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = name; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + shared.report.mark_handled(net_h); + shared.report.mark_handled(typespec_h); + vpi_release_handle(typespec_h); + } + vpi_release_handle(net_h); + } + vpi_release_handle(itr); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + if (current_node->children.size() == 2) { // If there is 2 ranges, change type to AST_MEMORY + current_node->type = AST::AST_MEMORY; + } +} + +void UhdmAst::process_package() +{ + current_node = make_ast_node(AST::AST_PACKAGE); + visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) { + if (node) { + add_or_replace_child(current_node, node); + } + }); + visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) { + move_type_to_new_typedef(current_node, node); + } + }); + visit_one_to_many({vpiTaskFunc}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_interface() +{ + std::string type = vpi_get_str(vpiDefName, obj_h); + std::string name = vpi_get_str(vpiName, obj_h) ? vpi_get_str(vpiName, obj_h) : type; + sanitize_symbol_name(type); + sanitize_symbol_name(name); + AST::AstNode *elaboratedInterface; + // Check if we have encountered this object before + if (shared.top_nodes.find(type) != shared.top_nodes.end()) { + // Was created before, fill missing + elaboratedInterface = shared.top_nodes[type]; + visit_one_to_many({vpiPort}, obj_h, [&](AST::AstNode *node) { + if (node) { + add_or_replace_child(elaboratedInterface, node); + } + }); + } else { + // Encountered for the first time + elaboratedInterface = new AST::AstNode(AST::AST_INTERFACE); + elaboratedInterface->str = name; + visit_one_to_many({vpiNet, vpiPort, vpiModport}, obj_h, [&](AST::AstNode *node) { + if (node) { + add_or_replace_child(elaboratedInterface, node); + } + }); + } + shared.top_nodes[elaboratedInterface->str] = elaboratedInterface; + if (name != type) { + // Not a top module, create instance + current_node = make_ast_node(AST::AST_CELL); + make_cell(obj_h, current_node, elaboratedInterface); + } else { + current_node = elaboratedInterface; + } +} + +void UhdmAst::process_modport() +{ + current_node = make_ast_node(AST::AST_MODPORT); + visit_one_to_many({vpiIODecl}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_io_decl() +{ + current_node = nullptr; + visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *node) { current_node = node; }); + if (current_node == nullptr) { + current_node = make_ast_node(AST::AST_MODPORTMEMBER); + visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + } + visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (!node->str.empty()) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } else { + // anonymous typedef, just move children + for (auto child : node->children) { + current_node->children.push_back(child->clone()); + } + } + delete node; + } + }); + if (const int n = vpi_get(vpiDirection, obj_h)) { + if (n == vpiInput) { + current_node->is_input = true; + } else if (n == vpiOutput) { + current_node->is_output = true; + } else if (n == vpiInout) { + current_node->is_input = true; + current_node->is_output = true; + } + } +} + +void UhdmAst::process_always() +{ + current_node = make_ast_node(AST::AST_ALWAYS); + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + if (node) { + AST::AstNode *block = nullptr; + if (node->type != AST::AST_BLOCK) { + block = new AST::AstNode(AST::AST_BLOCK, node); + } else { + block = node; + } + current_node->children.push_back(block); + } + }); + switch (vpi_get(vpiAlwaysType, obj_h)) { + case vpiAlwaysComb: + current_node->attributes[ID::always_comb] = AST::AstNode::mkconst_int(1, false); + break; + case vpiAlwaysFF: + current_node->attributes[ID::always_ff] = AST::AstNode::mkconst_int(1, false); + break; + case vpiAlwaysLatch: + current_node->attributes[ID::always_latch] = AST::AstNode::mkconst_int(1, false); + break; + default: + break; + } +} + +void UhdmAst::process_event_control() +{ + current_node = make_ast_node(AST::AST_BLOCK); + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { + if (node) { + auto process_node = find_ancestor({AST::AST_ALWAYS}); + process_node->children.push_back(node); + } + // is added inside vpiOperation + }); + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_initial() +{ + current_node = make_ast_node(AST::AST_INITIAL); + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (node->type != AST::AST_BLOCK) { + auto block_node = make_ast_node(AST::AST_BLOCK); + block_node->children.push_back(node); + node = block_node; + } + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_begin() +{ + current_node = make_ast_node(AST::AST_BLOCK); + visit_one_to_many({vpiStmt}, obj_h, [&](AST::AstNode *node) { + if (node) { + if ((node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) && node->children.size() == 1) { + auto func_node = find_ancestor({AST::AST_FUNCTION, AST::AST_TASK}); + if (!func_node) + return; + auto wire_node = new AST::AstNode(AST::AST_WIRE); + wire_node->type = AST::AST_WIRE; + wire_node->str = node->children[0]->str; + func_node->children.push_back(wire_node); + } else { + current_node->children.push_back(node); + } + } + }); +} + +void UhdmAst::process_operation() +{ + auto operation = vpi_get(vpiOpType, obj_h); + switch (operation) { + case vpiStreamRLOp: + process_stream_op(); + break; + case vpiEventOrOp: + case vpiListOp: + process_list_op(); + break; + case vpiCastOp: + process_cast_op(); + break; + case vpiInsideOp: + process_inside_op(); + break; + case vpiAssignmentPatternOp: + process_assignment_pattern_op(); + break; + default: { + current_node = make_ast_node(AST::AST_NONE); + visit_one_to_many({vpiOperand}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); + switch (operation) { + case vpiMinusOp: + current_node->type = AST::AST_NEG; + break; + case vpiPlusOp: + current_node->type = AST::AST_POS; + break; + case vpiPosedgeOp: + current_node->type = AST::AST_POSEDGE; + break; + case vpiNegedgeOp: + current_node->type = AST::AST_NEGEDGE; + break; + case vpiUnaryAndOp: + current_node->type = AST::AST_REDUCE_AND; + break; + case vpiUnaryOrOp: + current_node->type = AST::AST_REDUCE_OR; + break; + case vpiUnaryXorOp: + current_node->type = AST::AST_REDUCE_XOR; + break; + case vpiUnaryXNorOp: + current_node->type = AST::AST_REDUCE_XNOR; + break; + case vpiUnaryNandOp: { + current_node->type = AST::AST_REDUCE_AND; + auto not_node = new AST::AstNode(AST::AST_LOGIC_NOT, current_node); + current_node = not_node; + break; + } + case vpiUnaryNorOp: { + current_node->type = AST::AST_REDUCE_OR; + auto not_node = new AST::AstNode(AST::AST_LOGIC_NOT, current_node); + current_node = not_node; + break; + } + case vpiBitNegOp: + current_node->type = AST::AST_BIT_NOT; + break; + case vpiBitAndOp: + current_node->type = AST::AST_BIT_AND; + break; + case vpiBitOrOp: + current_node->type = AST::AST_BIT_OR; + break; + case vpiBitXorOp: + current_node->type = AST::AST_BIT_XOR; + break; + case vpiBitXnorOp: + current_node->type = AST::AST_BIT_XNOR; + break; + case vpiLShiftOp: + current_node->type = AST::AST_SHIFT_LEFT; + break; + case vpiRShiftOp: + current_node->type = AST::AST_SHIFT_RIGHT; + break; + case vpiNotOp: + current_node->type = AST::AST_LOGIC_NOT; + break; + case vpiLogAndOp: + current_node->type = AST::AST_LOGIC_AND; + break; + case vpiLogOrOp: + current_node->type = AST::AST_LOGIC_OR; + break; + case vpiEqOp: + current_node->type = AST::AST_EQ; + break; + case vpiNeqOp: + current_node->type = AST::AST_NE; + break; + case vpiCaseEqOp: + current_node->type = AST::AST_EQX; + break; + case vpiGtOp: + current_node->type = AST::AST_GT; + break; + case vpiGeOp: + current_node->type = AST::AST_GE; + break; + case vpiLtOp: + current_node->type = AST::AST_LT; + break; + case vpiLeOp: + current_node->type = AST::AST_LE; + break; + case vpiSubOp: + current_node->type = AST::AST_SUB; + break; + case vpiAddOp: + current_node->type = AST::AST_ADD; + break; + case vpiMultOp: + current_node->type = AST::AST_MUL; + break; + case vpiDivOp: + current_node->type = AST::AST_DIV; + break; + case vpiModOp: + current_node->type = AST::AST_MOD; + break; + case vpiArithLShiftOp: + current_node->type = AST::AST_SHIFT_SLEFT; + break; + case vpiArithRShiftOp: + current_node->type = AST::AST_SHIFT_SRIGHT; + break; + case vpiPowerOp: + current_node->type = AST::AST_POW; + break; + case vpiPostIncOp: // TODO: Make this an actual post-increment op (currently it's a pre-increment) + case vpiPreIncOp: { + current_node->type = AST::AST_ASSIGN_EQ; + auto id = current_node->children[0]->clone(); + auto add_node = new AST::AstNode(AST::AST_ADD, id, AST::AstNode::mkconst_int(1, true)); + add_node->filename = current_node->filename; + add_node->location = current_node->location; + current_node->children.push_back(add_node); + break; + } + case vpiPostDecOp: // TODO: Make this an actual post-decrement op (currently it's a pre-decrement) + case vpiPreDecOp: { + current_node->type = AST::AST_ASSIGN_EQ; + auto id = current_node->children[0]->clone(); + auto add_node = new AST::AstNode(AST::AST_SUB, id, AST::AstNode::mkconst_int(1, true)); + add_node->filename = current_node->filename; + add_node->location = current_node->location; + current_node->children.push_back(add_node); + break; + } + case vpiConditionOp: + current_node->type = AST::AST_TERNARY; + break; + case vpiConcatOp: { + current_node->type = AST::AST_CONCAT; + std::reverse(current_node->children.begin(), current_node->children.end()); + break; + } + case vpiMultiConcatOp: + current_node->type = AST::AST_REPLICATE; + break; + case vpiAssignmentOp: + current_node->type = AST::AST_ASSIGN_EQ; + break; + case vpiStreamLROp: { + auto concat_node = current_node->children.back(); + current_node->children.pop_back(); + delete current_node; + current_node = concat_node; + break; + } + case vpiNullOp: { + delete current_node; + current_node = nullptr; + break; + } + default: { + delete current_node; + current_node = nullptr; + const uhdm_handle *const handle = (const uhdm_handle *)obj_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled operation type %d\n", object->VpiFile().c_str(), object->VpiLineNo(), operation); + } + } + } + } +} + +void UhdmAst::process_stream_op() +{ + // Create a for loop that does what a streaming operator would do + auto block_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL}); + auto process_node = find_ancestor({AST::AST_ALWAYS, AST::AST_INITIAL}); + auto module_node = find_ancestor({AST::AST_MODULE, AST::AST_FUNCTION, AST::AST_PACKAGE}); + log_assert(module_node); + if (!process_node) { + if (module_node->type != AST::AST_FUNCTION) { + // Create a @* always block + process_node = make_ast_node(AST::AST_ALWAYS); + module_node->children.push_back(process_node); + block_node = make_ast_node(AST::AST_BLOCK); + process_node->children.push_back(block_node); + } else { + // Create only block + block_node = make_ast_node(AST::AST_BLOCK); + module_node->children.push_back(block_node); + } + } + + auto loop_id = shared.next_loop_id(); + auto loop_counter = + make_ast_node(AST::AST_WIRE, {make_ast_node(AST::AST_RANGE, {AST::AstNode::mkconst_int(31, false), AST::AstNode::mkconst_int(0, false)})}); + loop_counter->is_reg = true; + loop_counter->is_signed = true; + loop_counter->str = "\\loop" + std::to_string(loop_id) + "::i"; + module_node->children.insert(module_node->children.end() - 1, loop_counter); + auto loop_counter_ident = make_ast_node(AST::AST_IDENTIFIER); + loop_counter_ident->str = loop_counter->str; + + auto lhs_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE})->children[0]; + // Temp var to allow concatenation + AST::AstNode *temp_var = nullptr; + AST::AstNode *bits_call = nullptr; + if (lhs_node->type == AST::AST_WIRE) { + module_node->children.insert(module_node->children.begin(), lhs_node->clone()); + temp_var = lhs_node->clone(); // if we already have wire as lhs, we want to create the same wire for temp_var + lhs_node->delete_children(); + lhs_node->type = AST::AST_IDENTIFIER; + bits_call = make_ast_node(AST::AST_FCALL, {lhs_node->clone()}); + bits_call->str = "\\$bits"; + } else { + // otherwise, we need to calculate size using bits fcall + bits_call = make_ast_node(AST::AST_FCALL, {lhs_node->clone()}); + bits_call->str = "\\$bits"; + temp_var = + make_ast_node(AST::AST_WIRE, {make_ast_node(AST::AST_RANGE, {make_ast_node(AST::AST_SUB, {bits_call, AST::AstNode::mkconst_int(1, false)}), + AST::AstNode::mkconst_int(0, false)})}); + } + + temp_var->str = "\\loop" + std::to_string(loop_id) + "::temp"; + module_node->children.insert(module_node->children.end() - 1, temp_var); + auto temp_var_ident = make_ast_node(AST::AST_IDENTIFIER); + temp_var_ident->str = temp_var->str; + auto temp_assign = make_ast_node(AST::AST_ASSIGN_EQ, {temp_var_ident}); + block_node->children.push_back(temp_assign); + + // Assignment in the loop's block + auto assign_node = make_ast_node(AST::AST_ASSIGN_EQ, {lhs_node->clone(), temp_var_ident->clone()}); + AST::AstNode *slice_size = nullptr; // First argument in streaming op + visit_one_to_many({vpiOperand}, obj_h, [&](AST::AstNode *node) { + if (!slice_size && node->type == AST::AST_CONSTANT) { + slice_size = node; + } else { + temp_assign->children.push_back(node); + } + }); + if (!slice_size) { + slice_size = AST::AstNode::mkconst_int(1, true); + } + + // Initialization of the loop counter to 0 + auto init_stmt = make_ast_node(AST::AST_ASSIGN_EQ, {loop_counter_ident, AST::AstNode::mkconst_int(0, true)}); + + // Loop condition (loop counter < $bits(RHS)) + auto cond_stmt = + make_ast_node(AST::AST_LE, {loop_counter_ident->clone(), make_ast_node(AST::AST_SUB, {bits_call->clone(), slice_size->clone()})}); + + // Increment loop counter + auto inc_stmt = + make_ast_node(AST::AST_ASSIGN_EQ, {loop_counter_ident->clone(), make_ast_node(AST::AST_ADD, {loop_counter_ident->clone(), slice_size})}); + + // Range on the LHS of the assignment + auto lhs_range = make_ast_node(AST::AST_RANGE); + auto lhs_selfsz = make_ast_node( + AST::AST_SELFSZ, {make_ast_node(AST::AST_SUB, {make_ast_node(AST::AST_SUB, {bits_call->clone(), AST::AstNode::mkconst_int(1, true)}), + loop_counter_ident->clone()})}); + lhs_range->children.push_back(make_ast_node(AST::AST_ADD, {lhs_selfsz, AST::AstNode::mkconst_int(0, true)})); + lhs_range->children.push_back( + make_ast_node(AST::AST_SUB, {make_ast_node(AST::AST_ADD, {lhs_selfsz->clone(), AST::AstNode::mkconst_int(1, true)}), slice_size->clone()})); + + // Range on the RHS of the assignment + auto rhs_range = make_ast_node(AST::AST_RANGE); + auto rhs_selfsz = make_ast_node(AST::AST_SELFSZ, {loop_counter_ident->clone()}); + rhs_range->children.push_back( + make_ast_node(AST::AST_SUB, {make_ast_node(AST::AST_ADD, {rhs_selfsz, slice_size->clone()}), AST::AstNode::mkconst_int(1, true)})); + rhs_range->children.push_back(make_ast_node(AST::AST_ADD, {rhs_selfsz->clone(), AST::AstNode::mkconst_int(0, true)})); + + // Put ranges on the sides of the assignment + assign_node->children[0]->children.push_back(lhs_range); + assign_node->children[1]->children.push_back(rhs_range); + + // Putting the loop together + auto loop_node = make_ast_node(AST::AST_FOR); + loop_node->str = "$loop" + std::to_string(loop_id); + loop_node->children.push_back(init_stmt); + loop_node->children.push_back(cond_stmt); + loop_node->children.push_back(inc_stmt); + loop_node->children.push_back(make_ast_node(AST::AST_BLOCK, {assign_node})); + loop_node->children[3]->str = "\\stream_op_block" + std::to_string(loop_id); + + block_node->children.push_back(make_ast_node(AST::AST_BLOCK, {loop_node})); + + // Do not create a node + shared.report.mark_handled(obj_h); +} + +void UhdmAst::process_list_op() +{ + // Add all operands as children of process node + if (auto parent_node = find_ancestor({AST::AST_ALWAYS, AST::AST_COND})) { + visit_one_to_many({vpiOperand}, obj_h, [&](AST::AstNode *node) { + // add directly to process/cond node + if (node) { + parent_node->children.push_back(node); + } + }); + } + // Do not create a node + shared.report.mark_handled(obj_h); +} + +void UhdmAst::process_cast_op() +{ + current_node = make_ast_node(AST::AST_NONE); + visit_one_to_many({vpiOperand}, obj_h, [&](AST::AstNode *node) { + node->cloneInto(current_node); + delete node; + }); + vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); + shared.report.mark_handled(typespec_h); + vpi_release_handle(typespec_h); +} + +void UhdmAst::process_inside_op() +{ + current_node = make_ast_node(AST::AST_EQ); + AST::AstNode *lhs = nullptr; + visit_one_to_many({vpiOperand}, obj_h, [&](AST::AstNode *node) { + if (!lhs) { + lhs = node; + } + if (current_node->children.size() < 2) { + current_node->children.push_back(node); + } else { + auto or_node = new AST::AstNode(AST::AST_LOGIC_OR); + or_node->filename = current_node->filename; + or_node->location = current_node->location; + auto eq_node = new AST::AstNode(AST::AST_EQ); + eq_node->filename = current_node->filename; + eq_node->location = current_node->location; + or_node->children.push_back(current_node); + or_node->children.push_back(eq_node); + eq_node->children.push_back(lhs->clone()); + eq_node->children.push_back(node); + current_node = or_node; + } + }); +} + +void UhdmAst::process_assignment_pattern_op() +{ + current_node = make_ast_node(AST::AST_CONCAT); + if (auto param_node = find_ancestor({AST::AST_PARAMETER, AST::AST_LOCALPARAM})) { + std::map ordered_children; + visit_one_to_many({vpiOperand}, obj_h, [&](AST::AstNode *node) { + if (node->type == AST::AST_ASSIGN || node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) { + // Find at what position in the concat should we place this node + auto key = node->children[0]->str; + key = key.substr(key.find('.') + 1); + auto param_type = shared.param_types[param_node->str]; + size_t pos = + std::find_if(param_type->children.begin(), param_type->children.end(), [key](AST::AstNode *child) { return child->str == key; }) - + param_type->children.begin(); + ordered_children.insert(std::make_pair(pos, node->children[1]->clone())); + } else { + current_node->children.push_back(node); + } + }); + for (auto p : ordered_children) { + current_node->children.push_back(p.second); + } + return; + } + auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); + + auto proc_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL, AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_CELL}); + if (proc_node && proc_node->type == AST::AST_CELL && shared.top_nodes.count(proc_node->children[0]->str)) { + proc_node = shared.top_nodes[proc_node->children[0]->str]; + } + std::vector assignments; + visit_one_to_many({vpiOperand}, obj_h, [&](AST::AstNode *node) { + if (node->type == AST::AST_ASSIGN || node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) { + assignments.push_back(node); + } else { + current_node->children.push_back(node); + } + }); + std::reverse(current_node->children.begin(), current_node->children.end()); + if (!assignments.empty()) { + if (current_node->children.empty()) { + delete assign_node->children[0]; + assign_node->children[0] = assignments[0]->children[0]; + current_node = assignments[0]->children[1]; + assignments[0]->children.clear(); + delete assignments[0]; + proc_node->children.insert(proc_node->children.end(), assignments.begin() + 1, assignments.end()); + } else { + proc_node->children.insert(proc_node->children.end(), assignments.begin(), assignments.end()); + } + } +} + +void UhdmAst::process_tagged_pattern() +{ + auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); + auto assign_type = AST::AST_ASSIGN; + AST::AstNode *lhs_node = nullptr; + if (assign_node) { + assign_type = assign_node->type; + lhs_node = assign_node->children[0]; + } else { + lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); + lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; + } + current_node = new AST::AstNode(assign_type); + current_node->children.push_back(lhs_node->clone()); + auto typespec_h = vpi_handle(vpiTypespec, obj_h); + if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { + std::string field_name = vpi_get_str(vpiName, typespec_h); + if (field_name != "default") { // TODO: better support of the default keyword + current_node->children[0]->str += '.' + field_name; + } + } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { + s_vpi_value val; + vpi_get_value(typespec_h, &val); + auto range = new AST::AstNode(AST::AST_RANGE); + auto index = AST::AstNode::mkconst_int(val.value.integer, false); + range->children.push_back(index); + current_node->children[0]->children.push_back(range); + } + vpi_release_handle(typespec_h); + visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_bit_select() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_one_to_one({vpiIndex}, obj_h, [&](AST::AstNode *node) { + auto range_node = new AST::AstNode(AST::AST_RANGE, node); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + current_node->children.push_back(range_node); + }); +} + +void UhdmAst::process_part_select() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + vpiHandle parent_h = vpi_handle(vpiParent, obj_h); + current_node->str = get_name(parent_h); + vpi_release_handle(parent_h); + auto range_node = new AST::AstNode(AST::AST_RANGE); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + visit_one_to_one({vpiLeftRange, vpiRightRange}, obj_h, [&](AST::AstNode *node) { range_node->children.push_back(node); }); + current_node->children.push_back(range_node); +} + +void UhdmAst::process_indexed_part_select() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + vpiHandle parent_h = vpi_handle(vpiParent, obj_h); + current_node->str = get_name(parent_h); + vpi_release_handle(parent_h); + // TODO: check if there are other types, for now only handle 1 and 2 (+: and -:) + auto indexed_part_select_type = vpi_get(vpiIndexedPartSelectType, obj_h) == 1 ? AST::AST_ADD : AST::AST_SUB; + auto range_node = new AST::AstNode(AST::AST_RANGE); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + visit_one_to_one({vpiBaseExpr}, obj_h, [&](AST::AstNode *node) { range_node->children.push_back(node); }); + visit_one_to_one({vpiWidthExpr}, obj_h, [&](AST::AstNode *node) { + auto right_range_node = new AST::AstNode(indexed_part_select_type); + right_range_node->children.push_back(range_node->children[0]->clone()); + right_range_node->children.push_back(node); + auto sub = new AST::AstNode(indexed_part_select_type == AST::AST_ADD ? AST::AST_SUB : AST::AST_ADD); + sub->children.push_back(right_range_node); + sub->children.push_back(AST::AstNode::mkconst_int(1, false, 1)); + range_node->children.push_back(sub); + // range_node->children.push_back(right_range_node); + }); + if (indexed_part_select_type == AST::AST_ADD) { + std::reverse(range_node->children.begin(), range_node->children.end()); + } + current_node->children.push_back(range_node); +} + +void UhdmAst::process_var_select() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_one_to_many({vpiIndex}, obj_h, [&](AST::AstNode *node) { + if (node->str == current_node->str) { + for (auto child : node->children) { + current_node->children.push_back(child); + } + node->children.clear(); + delete node; + } else { + auto range_node = new AST::AstNode(AST::AST_RANGE); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + range_node->children.push_back(node); + current_node->children.push_back(range_node); + } + }); + if (current_node->children.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = current_node->children; + current_node->children.clear(); + current_node->children.push_back(multirange_node); + } +} + +void UhdmAst::process_if_else() +{ + current_node = make_ast_node(AST::AST_CASE); + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { + auto reduce_node = new AST::AstNode(AST::AST_REDUCE_BOOL, node); + current_node->children.push_back(reduce_node); + }); + // If true: + auto *condition = new AST::AstNode(AST::AST_COND); + auto *constant = AST::AstNode::mkconst_int(1, false, 1); + condition->children.push_back(constant); + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + auto *statements = new AST::AstNode(AST::AST_BLOCK); + statements->children.push_back(node); + condition->children.push_back(statements); + }); + current_node->children.push_back(condition); + // Else: + if (vpi_get(vpiType, obj_h) == vpiIfElse) { + auto *condition = new AST::AstNode(AST::AST_COND); + auto *elseBlock = new AST::AstNode(AST::AST_DEFAULT); + condition->children.push_back(elseBlock); + visit_one_to_one({vpiElseStmt}, obj_h, [&](AST::AstNode *node) { + auto *statements = new AST::AstNode(AST::AST_BLOCK); + statements->children.push_back(node); + condition->children.push_back(statements); + }); + current_node->children.push_back(condition); + } +} + +void UhdmAst::process_for() +{ + current_node = make_ast_node(AST::AST_FOR); + auto loop_id = shared.next_loop_id(); + current_node->str = "$loop" + std::to_string(loop_id); + auto parent_node = find_ancestor({AST::AST_FUNCTION, AST::AST_GENBLOCK, AST::AST_MODULE}); + visit_one_to_many({vpiForInitStmt}, obj_h, [&](AST::AstNode *node) { + if (node->type == AST::AST_ASSIGN_LE) + node->type = AST::AST_ASSIGN_EQ; + auto lhs = node->children[0]; + if (lhs->type == AST::AST_WIRE) { + auto old_str = lhs->str; + lhs->str = '\\' + current_node->str.substr(1) + "::" + lhs->str.substr(1); + node_renames.insert(std::make_pair(old_str, lhs->str)); + auto *wire = lhs->clone(); + wire->is_reg = true; + parent_node->children.push_back(wire); + lhs->type = AST::AST_IDENTIFIER; + lhs->is_signed = false; + lhs->delete_children(); + } + current_node->children.push_back(node); + }); + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_many({vpiForIncStmt}, obj_h, [&](AST::AstNode *node) { + if (node->type == AST::AST_ASSIGN_LE) + node->type = AST::AST_ASSIGN_EQ; + current_node->children.push_back(node); + }); + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + auto *statements = make_ast_node(AST::AST_BLOCK); + statements->str = current_node->str; // Needed in simplify step + statements->children.push_back(node); + current_node->children.push_back(statements); + }); +} + +void UhdmAst::process_gen_scope_array() +{ + current_node = make_ast_node(AST::AST_GENBLOCK); + visit_one_to_many({vpiGenScope}, obj_h, [&](AST::AstNode *genscope_node) { + for (auto *child : genscope_node->children) { + if (child->type == AST::AST_PARAMETER || child->type == AST::AST_LOCALPARAM) { + auto param_str = child->str.substr(1); + auto array_str = "[" + param_str + "]"; + genscope_node->visitEachDescendant([&](AST::AstNode *node) { + auto pos = node->str.find(array_str); + if (pos != std::string::npos) { + node->type = AST::AST_PREFIX; + auto *param = new AST::AstNode(AST::AST_IDENTIFIER); + param->str = child->str; + auto *field = new AST::AstNode(AST::AST_IDENTIFIER); + field->str = "\\" + node->str.substr(node->str.rfind(']') + 2); + node->str = node->str.substr(0, node->str.find('[')); + node->children.push_back(param); + node->children.push_back(field); + } + }); + } + } + current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); + genscope_node->children.clear(); + delete genscope_node; + }); +} + +void UhdmAst::process_gen_scope() +{ + current_node = make_ast_node(AST::AST_GENBLOCK); + visit_one_to_many({vpiParamAssign, vpiParameter, vpiNet, vpiArrayNet, vpiVariables, vpiContAssign, vpiProcess, vpiModule, vpiGenScopeArray}, + obj_h, [&](AST::AstNode *node) { + if (node) { + if ((node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) && node->children.empty()) { + delete node; // skip parameters without any children + } else { + current_node->children.push_back(node); + } + } + }); +} + +void UhdmAst::process_case() +{ + current_node = make_ast_node(AST::AST_CASE); + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_many({vpiCaseItem}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_case_item() +{ + current_node = make_ast_node(AST::AST_COND); + visit_one_to_many({vpiExpr}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); + if (current_node->children.empty()) { + current_node->children.push_back(new AST::AstNode(AST::AST_DEFAULT)); + } + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + if (node->type != AST::AST_BLOCK) { + auto block_node = new AST::AstNode(AST::AST_BLOCK); + block_node->children.push_back(node); + node = block_node; + } + current_node->children.push_back(node); + }); +} + +void UhdmAst::process_range() +{ + current_node = make_ast_node(AST::AST_RANGE); + visit_one_to_one({vpiLeftRange, vpiRightRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_return() +{ + current_node = make_ast_node(AST::AST_ASSIGN_EQ); + auto func_node = find_ancestor({AST::AST_FUNCTION, AST::AST_TASK}); + if (!func_node->children.empty()) { + auto lhs = new AST::AstNode(AST::AST_IDENTIFIER); + lhs->str = func_node->children[0]->str; + current_node->children.push_back(lhs); + } + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_function() +{ + current_node = make_ast_node(vpi_get(vpiType, obj_h) == vpiFunction ? AST::AST_FUNCTION : AST::AST_TASK); + visit_one_to_one({vpiReturn}, obj_h, [&](AST::AstNode *node) { + if (node) { + auto net_type = vpi_get(vpiNetType, obj_h); + node->is_reg = net_type == vpiReg; + node->str = current_node->str; + current_node->children.push_back(node); + } + }); + visit_one_to_many({vpiIODecl}, obj_h, [&](AST::AstNode *node) { + node->type = AST::AST_WIRE; + current_node->children.push_back(node); + }); + visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_logic_var() +{ + current_node = make_ast_node(AST::AST_WIRE); + // TODO: add const attribute, but it seems it is little more + // then just setting boolean value + // current_node->is_const = vpi_get(vpiConstantVariable, obj_h); + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } + }); + visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_default_expr(obj_h); +} + +void UhdmAst::process_sys_func_call() +{ + current_node = make_ast_node(AST::AST_FCALL); + if (current_node->str == "\\$signed") { + current_node->type = AST::AST_TO_SIGNED; + } else if (current_node->str == "\\$unsigned") { + current_node->type = AST::AST_TO_UNSIGNED; + } else if (current_node->str == "\\$display" || current_node->str == "\\$time") { + current_node->type = AST::AST_TCALL; + current_node->str = current_node->str.substr(1); + } else if (current_node->str == "\\$readmemh") { + current_node->type = AST::AST_TCALL; + } + + visit_one_to_many({vpiArgument}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_func_call() +{ + current_node = make_ast_node(AST::AST_FCALL); + visit_one_to_many({vpiArgument}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { + node->type = AST::AST_IDENTIFIER; + } + current_node->children.push_back(node); + } + }); +} + +void UhdmAst::process_immediate_assert() +{ + current_node = make_ast_node(AST::AST_ASSERT); + visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *n) { + if (n) { + current_node->children.push_back(n); + } + }); +} + +void UhdmAst::process_hier_path() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + current_node->str = "\\"; + visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { + if (current_node->str == "\\" && !node->children.empty() && node->children[0]->type == AST::AST_RANGE) { + current_node->type = AST::AST_PREFIX; + current_node->str = node->str; + current_node->children.push_back(node->children[0]->children[0]->clone()); + delete node; + } else { + if (current_node->type == AST::AST_IDENTIFIER) { + if (current_node->str != "\\") { + current_node->str += "."; + } + current_node->str += node->str.substr(1); + current_node->children = std::move(node->children); + delete node; + } else { + current_node->children.push_back(node); + } + } + }); +} + +void UhdmAst::process_logic_typespec() +{ + current_node = make_ast_node(AST::AST_WIRE); + current_node->is_logic = true; + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); + if (!current_node->str.empty()) { + move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); + } +} + +void UhdmAst::process_int_typespec() +{ + current_node = make_ast_node(AST::AST_WIRE); + auto left_const = AST::AstNode::mkconst_int(31, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); + current_node->children.push_back(range); + current_node->is_signed = true; + if (!current_node->str.empty()) { + move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + } +} + +void UhdmAst::process_string_var() +{ + current_node = make_ast_node(AST::AST_WIRE); + current_node->is_string = true; + // FIXME: + // this is only basic support for strings, + // currently yosys doesn't support dynamic resize of wire + // based on string size + // here we try to get size of string based on provided const string + // if it is not available, we are setting size to explicite 64 bits + visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *expr_node) { + if (expr_node->type == AST::AST_CONSTANT) { + auto left_const = AST::AstNode::mkconst_int(expr_node->range_left, true); + auto right_const = AST::AstNode::mkconst_int(expr_node->range_right, true); + auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); + current_node->children.push_back(range); + } + }); + if (current_node->children.empty()) { + auto left_const = AST::AstNode::mkconst_int(64, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); + current_node->children.push_back(range); + } + visit_default_expr(obj_h); +} + +void UhdmAst::process_string_typespec() +{ + current_node = make_ast_node(AST::AST_WIRE); + current_node->is_string = true; + // FIXME: + // this is only basic support for strings, + // currently yosys doesn't support dynamic resize of wire + // based on string size + // here, we are setting size to explicite 64 bits + auto left_const = AST::AstNode::mkconst_int(64, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); + current_node->children.push_back(range); +} + +void UhdmAst::process_bit_typespec() +{ + current_node = make_ast_node(AST::AST_WIRE); + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); + if (!current_node->str.empty()) { + move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + } +} + +AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) +{ + obj_h = obj_handle; + const unsigned object_type = vpi_get(vpiType, obj_h); + const uhdm_handle *const handle = (const uhdm_handle *)obj_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + + if (shared.debug_flag) { + std::cout << indent << "Object '" << object->VpiName() << "' of type '" << UHDM::VpiTypeName(obj_h) << '\'' << std::endl; + } + + switch (object_type) { + case vpiDesign: + process_design(); + break; + case vpiParameter: + process_parameter(); + break; + case vpiPort: + process_port(); + break; + case vpiModule: + process_module(); + break; + case vpiStructTypespec: + process_struct_typespec(); + break; + case vpiPackedArrayTypespec: + process_packed_array_typespec(); + break; + case vpiTypespecMember: + process_typespec_member(); + break; + case vpiEnumTypespec: + process_enum_typespec(); + break; + case vpiEnumConst: + process_enum_const(); + break; + case vpiEnumVar: + case vpiEnumNet: + case vpiStructVar: + case vpiStructNet: + process_custom_var(); + break; + case vpiIntVar: + process_int_var(); + break; + case vpiRealVar: + process_real_var(); + break; + case vpiPackedArrayVar: + case vpiArrayVar: + process_array_var(); + break; + case vpiParamAssign: + process_param_assign(); + break; + case vpiContAssign: + process_cont_assign(); + break; + case vpiAssignStmt: + case vpiAssignment: + process_assignment(); + break; + case vpiRefVar: + case vpiRefObj: + current_node = make_ast_node(AST::AST_IDENTIFIER); + break; + case vpiNet: + process_net(); + break; + case vpiArrayNet: + process_array_net(); + break; + case vpiPackedArrayNet: + process_packed_array_net(); + break; + case vpiPackage: + process_package(); + break; + case vpiInterface: + process_interface(); + break; + case vpiModport: + process_modport(); + break; + case vpiIODecl: + process_io_decl(); + break; + case vpiAlways: + process_always(); + break; + case vpiEventControl: + process_event_control(); + break; + case vpiInitial: + process_initial(); + break; + case vpiNamedBegin: + case vpiBegin: + process_begin(); + break; + case vpiCondition: + case vpiOperation: + process_operation(); + break; + case vpiTaggedPattern: + process_tagged_pattern(); + break; + case vpiBitSelect: + process_bit_select(); + break; + case vpiPartSelect: + process_part_select(); + break; + case vpiIndexedPartSelect: + process_indexed_part_select(); + break; + case vpiVarSelect: + process_var_select(); + break; + case vpiIf: + case vpiIfElse: + process_if_else(); + break; + case vpiFor: + process_for(); + break; + case vpiGenScopeArray: + process_gen_scope_array(); + break; + case vpiGenScope: + process_gen_scope(); + break; + case vpiCase: + process_case(); + break; + case vpiCaseItem: + process_case_item(); + break; + case vpiConstant: + current_node = process_value(obj_h); + break; + case vpiRange: + process_range(); + break; + case vpiReturn: + process_return(); + break; + case vpiFunction: + case vpiTask: + process_function(); + break; + case vpiBitVar: + case vpiLogicVar: + process_logic_var(); + break; + case vpiSysFuncCall: + process_sys_func_call(); + break; + case vpiFuncCall: + process_func_call(); + break; + case vpiTaskCall: + current_node = make_ast_node(AST::AST_TCALL); + break; + case vpiImmediateAssert: + if (!shared.no_assert) + process_immediate_assert(); + break; + case vpiHierPath: + process_hier_path(); + break; + case UHDM::uhdmimport: + break; + case vpiDelayControl: + break; + case vpiLogicTypespec: + process_logic_typespec(); + break; + case vpiIntTypespec: + process_int_typespec(); + break; + case vpiBitTypespec: + process_bit_typespec(); + break; + case vpiStringVar: + process_string_var(); + break; + case vpiStringTypespec: + process_string_typespec(); + break; + case vpiProgram: + default: + report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), + object->VpiName().c_str(), UHDM::VpiTypeName(obj_h).c_str()); + break; + } + + // Check if we initialized the node in switch-case + if (current_node) { + if (current_node->type != AST::AST_NONE) { + shared.report.mark_handled(object); + return current_node; + } + } + return nullptr; +} + +AST::AstNode *UhdmAst::visit_designs(const std::vector &designs) +{ + current_node = new AST::AstNode(AST::AST_DESIGN); + for (auto design : designs) { + UhdmAst ast(this, shared, indent); + auto *nodes = ast.process_object(design); + // Flatten multiple designs into one + for (auto child : nodes->children) { + current_node->children.push_back(child); + } + } + return current_node; +} + +void UhdmAst::report_error(const char *format, ...) const +{ + va_list args; + va_start(args, format); + if (shared.stop_on_error) { + logv_error(format, args); + } else { + logv_warning(format, args); + } } YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index a0ebea617..ec0e92f62 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -1,8 +1,8 @@ #ifndef _UHDM_AST_H_ #define _UHDM_AST_H_ 1 -#include #include "frontends/ast/ast.h" +#include #undef cover #include "uhdm.h" @@ -10,140 +10,137 @@ YOSYS_NAMESPACE_BEGIN -class UhdmAst { - private: - // Walks through one-to-many relationships from given parent - // node through the VPI interface, visiting child nodes belonging to - // ChildrenNodeTypes that are present in the given object. - void visit_one_to_many(const std::vector child_node_types, - vpiHandle parent_handle, - const std::function& f); - - // Walks through one-to-one relationships from given parent - // node through the VPI interface, visiting child nodes belonging to - // ChildrenNodeTypes that are present in the given object. - void visit_one_to_one(const std::vector child_node_types, - vpiHandle parent_handle, - const std::function& f); - - // Visit children of type vpiRange that belong to the given parent node. - void visit_range(vpiHandle obj_h, const std::function &f); - - // Visit the default expression assigned to a variable. - void visit_default_expr(vpiHandle obj_h); - - // Create an AstNode of the specified type with metadata extracted from - // the given vpiHandle. - AST::AstNode* make_ast_node(AST::AstNodeType type, - std::vector children = {}); - - // Makes the passed node a cell node of the specified type - void make_cell(vpiHandle obj_h, AST::AstNode* node, AST::AstNode* type); - - // Moves a type node to the specified node - void move_type_to_new_typedef(AST::AstNode* current_node, AST::AstNode* type_node); - - // Go up the UhdmAst to find a parent node of the specified type - AST::AstNode* find_ancestor(const std::unordered_set& types); - - // Reports that something went wrong with reading the UHDM file - void report_error(const char *format, ...) const; - - // Processes the value connected to the specified node - AST::AstNode* process_value(vpiHandle obj_h); - - // The parent UhdmAst - UhdmAst* parent; - - // Data shared between all UhdmAst objects - UhdmAstShared& shared; - - // The current VPI/UHDM handle - vpiHandle obj_h = 0; - - // The current Yosys AST node - AST::AstNode* current_node = nullptr; - - // Indentation used for debug printing - std::string indent; - - // Mapping of names that should be replaced to new names - std::unordered_map node_renames; - - // Functions that process specific types of nodes - void process_design(); - void process_parameter(); - void process_port(); - void process_module(); - void process_struct_typespec(); - void process_packed_array_typespec(); - void process_typespec_member(); - void process_enum_typespec(); - void process_enum_const(); - void process_custom_var(); - void process_int_var(); - void process_real_var(); - void process_array_var(); - void process_param_assign(); - void process_cont_assign(); - void process_cont_assign_net(); - void process_cont_assign_var_init(); - void process_assignment(); - void process_net(); - void process_packed_array_net(); - void process_array_net(); - void process_package(); - void process_interface(); - void process_modport(); - void process_io_decl(); - void process_always(); - void process_event_control(); - void process_initial(); - void process_begin(); - void process_operation(); - void process_stream_op(); - void process_list_op(); - void process_cast_op(); - void process_inside_op(); - void process_assignment_pattern_op(); - void process_tagged_pattern(); - void process_bit_select(); - void process_part_select(); - void process_indexed_part_select(); - void process_var_select(); - void process_if_else(); - void process_for(); - void process_gen_scope_array(); - void process_gen_scope(); - void process_case(); - void process_case_item(); - void process_range(); - void process_return(); - void process_function(); - void process_logic_var(); - void process_sys_func_call(); - void process_func_call(); - void process_immediate_assert(); - void process_hier_path(); - void process_logic_typespec(); - void process_int_typespec(); - void process_bit_typespec(); - void process_string_var(); - void process_string_typespec(); - - UhdmAst(UhdmAst* p, UhdmAstShared& s, const std::string& i) : parent(p), shared(s), indent(i) { - if (parent) node_renames = parent->node_renames; - } - - public: - UhdmAst(UhdmAstShared& s, const std::string& i = "") : UhdmAst(nullptr, s, i) {} - - // Visits single VPI object and creates proper AST node - AST::AstNode* process_object(vpiHandle obj_h); - - // Visits all VPI design objects and returns created ASTs - AST::AstNode* visit_designs(const std::vector& designs); - +class UhdmAst +{ + private: + // Walks through one-to-many relationships from given parent + // node through the VPI interface, visiting child nodes belonging to + // ChildrenNodeTypes that are present in the given object. + void visit_one_to_many(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f); + + // Walks through one-to-one relationships from given parent + // node through the VPI interface, visiting child nodes belonging to + // ChildrenNodeTypes that are present in the given object. + void visit_one_to_one(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f); + + // Visit children of type vpiRange that belong to the given parent node. + void visit_range(vpiHandle obj_h, const std::function &f); + + // Visit the default expression assigned to a variable. + void visit_default_expr(vpiHandle obj_h); + + // Create an AstNode of the specified type with metadata extracted from + // the given vpiHandle. + AST::AstNode *make_ast_node(AST::AstNodeType type, std::vector children = {}); + + // Makes the passed node a cell node of the specified type + void make_cell(vpiHandle obj_h, AST::AstNode *node, AST::AstNode *type); + + // Moves a type node to the specified node + void move_type_to_new_typedef(AST::AstNode *current_node, AST::AstNode *type_node); + + // Go up the UhdmAst to find a parent node of the specified type + AST::AstNode *find_ancestor(const std::unordered_set &types); + + // Reports that something went wrong with reading the UHDM file + void report_error(const char *format, ...) const; + + // Processes the value connected to the specified node + AST::AstNode *process_value(vpiHandle obj_h); + + // The parent UhdmAst + UhdmAst *parent; + + // Data shared between all UhdmAst objects + UhdmAstShared &shared; + + // The current VPI/UHDM handle + vpiHandle obj_h = 0; + + // The current Yosys AST node + AST::AstNode *current_node = nullptr; + + // Indentation used for debug printing + std::string indent; + + // Mapping of names that should be replaced to new names + std::unordered_map node_renames; + + // Functions that process specific types of nodes + void process_design(); + void process_parameter(); + void process_port(); + void process_module(); + void process_struct_typespec(); + void process_packed_array_typespec(); + void process_typespec_member(); + void process_enum_typespec(); + void process_enum_const(); + void process_custom_var(); + void process_int_var(); + void process_real_var(); + void process_array_var(); + void process_param_assign(); + void process_cont_assign(); + void process_cont_assign_net(); + void process_cont_assign_var_init(); + void process_assignment(); + void process_net(); + void process_packed_array_net(); + void process_array_net(); + void process_package(); + void process_interface(); + void process_modport(); + void process_io_decl(); + void process_always(); + void process_event_control(); + void process_initial(); + void process_begin(); + void process_operation(); + void process_stream_op(); + void process_list_op(); + void process_cast_op(); + void process_inside_op(); + void process_assignment_pattern_op(); + void process_tagged_pattern(); + void process_bit_select(); + void process_part_select(); + void process_indexed_part_select(); + void process_var_select(); + void process_if_else(); + void process_for(); + void process_gen_scope_array(); + void process_gen_scope(); + void process_case(); + void process_case_item(); + void process_range(); + void process_return(); + void process_function(); + void process_logic_var(); + void process_sys_func_call(); + void process_func_call(); + void process_immediate_assert(); + void process_hier_path(); + void process_logic_typespec(); + void process_int_typespec(); + void process_bit_typespec(); + void process_string_var(); + void process_string_typespec(); + + UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) + { + if (parent) + node_renames = parent->node_renames; + } + + public: + UhdmAst(UhdmAstShared &s, const std::string &i = "") : UhdmAst(nullptr, s, i) {} + + // Visits single VPI object and creates proper AST node + AST::AstNode *process_object(vpiHandle obj_h); + + // Visits all VPI design objects and returns created ASTs + AST::AstNode *visit_designs(const std::vector &designs); }; YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index daf1d7d01..c85707664 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -19,105 +19,98 @@ * */ -#include "kernel/yosys.h" -#include "frontends/ast/ast.h" #include "UhdmAst.h" +#include "frontends/ast/ast.h" +#include "kernel/yosys.h" -namespace UHDM { - extern void visit_object (vpiHandle obj_h, int indent, const char *relation, std::set* visited, std::ostream& out, bool shallowVisit = false); +namespace UHDM +{ +extern void visit_object(vpiHandle obj_h, int indent, const char *relation, std::set *visited, std::ostream &out, + bool shallowVisit = false); } - YOSYS_NAMESPACE_BEGIN /* Stub for AST::process */ -static void -set_line_num(int) -{ -} +static void set_line_num(int) {} /* Stub for AST::process */ -static int -get_line_num(void) -{ - return 1; -} +static int get_line_num(void) { return 1; } struct UhdmAstFrontend : public Frontend { - UhdmAstFrontend() : Frontend("uhdm", "read UHDM file") { } - void help() - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" read_uhdm [options] [filename]\n"); - log("\n"); - log("Load design from a UHDM file into the current design\n"); - log("\n"); - log(" -noassert\n"); - log(" ignore assert() statements"); - log("\n"); - log(" -debug\n"); - log(" print debug info to stdout"); - log("\n"); - log(" -report [directory]\n"); - log(" write a coverage report for the UHDM file\n"); - log("\n"); - log(" -defer\n"); - log(" only read the abstract syntax tree and defer actual compilation\n"); - log(" to a later 'hierarchy' command. Useful in cases where the default\n"); - log(" parameters of modules yield invalid or not synthesizable code.\n"); - log("\n"); - } - void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) - { - log_header(design, "Executing UHDM frontend.\n"); + UhdmAstFrontend() : Frontend("uhdm", "read UHDM file") {} + void help() + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_uhdm [options] [filename]\n"); + log("\n"); + log("Load design from a UHDM file into the current design\n"); + log("\n"); + log(" -noassert\n"); + log(" ignore assert() statements"); + log("\n"); + log(" -debug\n"); + log(" print debug info to stdout"); + log("\n"); + log(" -report [directory]\n"); + log(" write a coverage report for the UHDM file\n"); + log("\n"); + log(" -defer\n"); + log(" only read the abstract syntax tree and defer actual compilation\n"); + log(" to a later 'hierarchy' command. Useful in cases where the default\n"); + log(" parameters of modules yield invalid or not synthesizable code.\n"); + log("\n"); + } + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) + { + log_header(design, "Executing UHDM frontend.\n"); - UhdmAstShared shared; - UhdmAst uhdm_ast(shared); - bool defer = false; + UhdmAstShared shared; + UhdmAst uhdm_ast(shared); + bool defer = false; - std::string report_directory; - for (size_t i = 1; i < args.size(); i++) { - if (args[i] == "-debug") { - shared.debug_flag = true; - } else if (args[i] == "-report" && ++i < args.size()) { - report_directory = args[i]; - shared.stop_on_error = false; - } else if (args[i] == "-noassert") { - shared.no_assert = true; - } else if (args[i] == "-defer") { - defer = true; - } - } - extra_args(f, filename, args, args.size() - 1); + std::string report_directory; + for (size_t i = 1; i < args.size(); i++) { + if (args[i] == "-debug") { + shared.debug_flag = true; + } else if (args[i] == "-report" && ++i < args.size()) { + report_directory = args[i]; + shared.stop_on_error = false; + } else if (args[i] == "-noassert") { + shared.no_assert = true; + } else if (args[i] == "-defer") { + defer = true; + } + } + extra_args(f, filename, args, args.size() - 1); - AST::current_filename = filename; - AST::set_line_num = &set_line_num; - AST::get_line_num = &get_line_num; - struct AST::AstNode *current_ast; + AST::current_filename = filename; + AST::set_line_num = &set_line_num; + AST::get_line_num = &get_line_num; + struct AST::AstNode *current_ast; - UHDM::Serializer serializer; + UHDM::Serializer serializer; - std::vector restoredDesigns = serializer.Restore(filename); - for (auto design : restoredDesigns) { - std::stringstream strstr; - UHDM::visit_object(design, 1, "", &shared.report.unhandled, shared.debug_flag ? std::cout : strstr); - } - current_ast = uhdm_ast.visit_designs(restoredDesigns); - if (!report_directory.empty()) { - shared.report.write(report_directory); - } - for (auto design : restoredDesigns) vpi_release_handle(design); - bool dump_ast1 = shared.debug_flag; - bool dump_ast2 = shared.debug_flag; - bool dont_redefine = false; - bool default_nettype_wire = true; - AST::process(design, current_ast, - dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, - false, false, false, false, false, false, dont_redefine, false, defer, default_nettype_wire - ); - delete current_ast; - } + std::vector restoredDesigns = serializer.Restore(filename); + for (auto design : restoredDesigns) { + std::stringstream strstr; + UHDM::visit_object(design, 1, "", &shared.report.unhandled, shared.debug_flag ? std::cout : strstr); + } + current_ast = uhdm_ast.visit_designs(restoredDesigns); + if (!report_directory.empty()) { + shared.report.write(report_directory); + } + for (auto design : restoredDesigns) + vpi_release_handle(design); + bool dump_ast1 = shared.debug_flag; + bool dump_ast2 = shared.debug_flag; + bool dont_redefine = false; + bool default_nettype_wire = true; + AST::process(design, current_ast, dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, false, false, false, false, + false, false, dont_redefine, false, defer, default_nettype_wire); + delete current_ast; + } } UhdmAstFrontend; YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/uhdmastreport.cc b/uhdm-plugin/uhdmastreport.cc index 2043cdb4c..4dfde5136 100644 --- a/uhdm-plugin/uhdmastreport.cc +++ b/uhdm-plugin/uhdmastreport.cc @@ -1,83 +1,87 @@ -#include -#include -#include +#include "uhdmastreport.h" #include "BaseClass.h" #include "frontends/ast/ast.h" -#include "uhdmastreport.h" +#include +#include +#include YOSYS_NAMESPACE_BEGIN -void UhdmAstReport::mark_handled(const UHDM::BaseClass* object) { - handled_count_per_file.insert(std::make_pair(object->VpiFile(), 0)); - auto it = unhandled.find(object); - if (it != unhandled.end()) { - unhandled.erase(it); - handled_count_per_file.at(object->VpiFile())++; - } +void UhdmAstReport::mark_handled(const UHDM::BaseClass *object) +{ + handled_count_per_file.insert(std::make_pair(object->VpiFile(), 0)); + auto it = unhandled.find(object); + if (it != unhandled.end()) { + unhandled.erase(it); + handled_count_per_file.at(object->VpiFile())++; + } } -void UhdmAstReport::mark_handled(const vpiHandle obj_h) { - auto handle = reinterpret_cast(obj_h); - mark_handled(reinterpret_cast(handle->object)); +void UhdmAstReport::mark_handled(const vpiHandle obj_h) +{ + auto handle = reinterpret_cast(obj_h); + mark_handled(reinterpret_cast(handle->object)); } -static std::string replace_in_string(std::string str, const std::string& to_find, const std::string& to_replace_with) { - size_t pos = str.find(to_find); - while (pos != std::string::npos) { - str.replace(pos, to_find.length(), to_replace_with); - pos += to_replace_with.length(); - pos = str.find(to_find, pos); - } - return str; +static std::string replace_in_string(std::string str, const std::string &to_find, const std::string &to_replace_with) +{ + size_t pos = str.find(to_find); + while (pos != std::string::npos) { + str.replace(pos, to_find.length(), to_replace_with); + pos += to_replace_with.length(); + pos = str.find(to_find, pos); + } + return str; } -void UhdmAstReport::write(const std::string& directory) { - std::unordered_map> unhandled_per_file; - for (auto object : unhandled) { - if (!object->VpiFile().empty() && object->VpiFile() != AST::current_filename) { - unhandled_per_file.insert(std::make_pair(object->VpiFile(), std::unordered_set())); - unhandled_per_file.at(object->VpiFile()).insert(object->VpiLineNo()); - handled_count_per_file.insert(std::make_pair(object->VpiFile(), 0)); - } - } - unsigned total_handled = 0; - for (auto& hc : handled_count_per_file) { - if (!hc.first.empty() && hc.first != AST::current_filename) { - unhandled_per_file.insert(std::make_pair(hc.first, std::unordered_set())); - total_handled += hc.second; - } - } - float coverage = total_handled * 100.f / (total_handled + unhandled.size()); - mkdir(directory.c_str(), 0777); - std::ofstream index_file(directory + "/index.html"); - index_file << "\n\n\n\n" << std::endl; - index_file << "

Overall coverage: " << coverage << "%

" << std::endl; - for (auto& unhandled_in_file : unhandled_per_file) { - // Calculate coverage in file - unsigned handled_count = handled_count_per_file.at(unhandled_in_file.first); - unsigned unhandled_count = unhandled_in_file.second.size(); - float coverage = handled_count * 100.f / (handled_count + unhandled_count); - // Add to the index file - std::string report_filename = replace_in_string(unhandled_in_file.first, "/", ".") + ".html"; - index_file << "

Cov: " << coverage << "%" << unhandled_in_file.first << "


" << std::endl; - // Write the report file - std::ofstream report_file(directory + '/' + report_filename); - report_file << "\n\n\n\n" << std::endl; - report_file << "

" << unhandled_in_file.first << " | Coverage: " << coverage << "%

" << std::endl; - std::ifstream source_file(unhandled_in_file.first); // Read the source code - unsigned line_number = 1; - std::string line; - while (std::getline(source_file, line)) { - if (unhandled_in_file.second.find(line_number) == unhandled_in_file.second.end()) { - report_file << line_number << "
 " << line << "

" << std::endl; - } else { - report_file << line_number << "
 " << line << "

" << std::endl; - } - ++line_number; - } - report_file << "\n" << std::endl; - } - index_file << "\n" << std::endl; +void UhdmAstReport::write(const std::string &directory) +{ + std::unordered_map> unhandled_per_file; + for (auto object : unhandled) { + if (!object->VpiFile().empty() && object->VpiFile() != AST::current_filename) { + unhandled_per_file.insert(std::make_pair(object->VpiFile(), std::unordered_set())); + unhandled_per_file.at(object->VpiFile()).insert(object->VpiLineNo()); + handled_count_per_file.insert(std::make_pair(object->VpiFile(), 0)); + } + } + unsigned total_handled = 0; + for (auto &hc : handled_count_per_file) { + if (!hc.first.empty() && hc.first != AST::current_filename) { + unhandled_per_file.insert(std::make_pair(hc.first, std::unordered_set())); + total_handled += hc.second; + } + } + float coverage = total_handled * 100.f / (total_handled + unhandled.size()); + mkdir(directory.c_str(), 0777); + std::ofstream index_file(directory + "/index.html"); + index_file << "\n\n\n\n" << std::endl; + index_file << "

Overall coverage: " << coverage << "%

" << std::endl; + for (auto &unhandled_in_file : unhandled_per_file) { + // Calculate coverage in file + unsigned handled_count = handled_count_per_file.at(unhandled_in_file.first); + unsigned unhandled_count = unhandled_in_file.second.size(); + float coverage = handled_count * 100.f / (handled_count + unhandled_count); + // Add to the index file + std::string report_filename = replace_in_string(unhandled_in_file.first, "/", ".") + ".html"; + index_file << "

Cov: " << coverage << "%" << unhandled_in_file.first << "


" << std::endl; + // Write the report file + std::ofstream report_file(directory + '/' + report_filename); + report_file << "\n\n\n\n" << std::endl; + report_file << "

" << unhandled_in_file.first << " | Coverage: " << coverage << "%

" << std::endl; + std::ifstream source_file(unhandled_in_file.first); // Read the source code + unsigned line_number = 1; + std::string line; + while (std::getline(source_file, line)) { + if (unhandled_in_file.second.find(line_number) == unhandled_in_file.second.end()) { + report_file << line_number << "
 " << line << "

" << std::endl; + } else { + report_file << line_number << "
 " << line << "

" << std::endl; + } + ++line_number; + } + report_file << "\n" << std::endl; + } + index_file << "\n" << std::endl; } YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/uhdmastreport.h b/uhdm-plugin/uhdmastreport.h index c7b6a15d6..ea74762e8 100644 --- a/uhdm-plugin/uhdmastreport.h +++ b/uhdm-plugin/uhdmastreport.h @@ -1,32 +1,33 @@ #ifndef _UHDM_AST_REPORT_H_ #define _UHDM_AST_REPORT_H_ 1 +#include "kernel/yosys.h" #include #include #include -#include "kernel/yosys.h" #undef cover #include "headers/uhdm.h" YOSYS_NAMESPACE_BEGIN -class UhdmAstReport { - private: - // Maps a filename to the number of objects being handled by the frontend - std::unordered_map handled_count_per_file; +class UhdmAstReport +{ + private: + // Maps a filename to the number of objects being handled by the frontend + std::unordered_map handled_count_per_file; - public: - // Objects not being handled by the frontend - std::set unhandled; + public: + // Objects not being handled by the frontend + std::set unhandled; - // Marks the specified object as being handled by the frontend - void mark_handled(const UHDM::BaseClass* object); + // Marks the specified object as being handled by the frontend + void mark_handled(const UHDM::BaseClass *object); - // Marks the object referenced by the specified handle as being handled by the frontend - void mark_handled(vpiHandle obj_h); + // Marks the object referenced by the specified handle as being handled by the frontend + void mark_handled(vpiHandle obj_h); - // Write the coverage report to the specified path - void write(const std::string& directory); + // Write the coverage report to the specified path + void write(const std::string &directory); }; YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/uhdmastshared.h b/uhdm-plugin/uhdmastshared.h index 3f9d0db92..8ee9a87fb 100644 --- a/uhdm-plugin/uhdmastshared.h +++ b/uhdm-plugin/uhdmastshared.h @@ -1,53 +1,54 @@ #ifndef _UHDM_AST_SHARED_H_ #define _UHDM_AST_SHARED_H_ 1 +#include "uhdmastreport.h" #include #include -#include "uhdmastreport.h" YOSYS_NAMESPACE_BEGIN -class UhdmAstShared { - private: - // Used for generating enum names - unsigned enum_count = 0; +class UhdmAstShared +{ + private: + // Used for generating enum names + unsigned enum_count = 0; - // Used for generating port IDS - unsigned port_count = 0; + // Used for generating port IDS + unsigned port_count = 0; - // Used for generating loop names - unsigned loop_count = 0; + // Used for generating loop names + unsigned loop_count = 0; - public: - // Generate the next enum ID (starting with 0) - unsigned next_enum_id() { return enum_count++; } + public: + // Generate the next enum ID (starting with 0) + unsigned next_enum_id() { return enum_count++; } - // Generate the next port ID (starting with 1) - unsigned next_port_id() { return ++port_count; } + // Generate the next port ID (starting with 1) + unsigned next_port_id() { return ++port_count; } - // Generate the next loop ID (starting with 0) - unsigned next_loop_id() { return loop_count++; } + // Generate the next loop ID (starting with 0) + unsigned next_loop_id() { return loop_count++; } - // Flag that determines whether debug info should be printed - bool debug_flag = false; + // Flag that determines whether debug info should be printed + bool debug_flag = false; - // Flag that determines whether we should ignore assert() statements - bool no_assert = false; + // Flag that determines whether we should ignore assert() statements + bool no_assert = false; - // Flag that determines whether errors should be fatal - bool stop_on_error = true; + // Flag that determines whether errors should be fatal + bool stop_on_error = true; - // Top nodes of the design (modules, interfaces) - std::unordered_map top_nodes; + // Top nodes of the design (modules, interfaces) + std::unordered_map top_nodes; - // UHDM node coverage report - UhdmAstReport report; + // UHDM node coverage report + UhdmAstReport report; - // Vector with name of typedef and name of scope it is declared in - std::vector> type_names; + // Vector with name of typedef and name of scope it is declared in + std::vector> type_names; - // Map from AST param nodes to their types (used for params with struct types) - std::unordered_map param_types; + // Map from AST param nodes to their types (used for params with struct types) + std::unordered_map param_types; }; YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index 0ef269c6d..4a23c0d22 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -19,9 +19,9 @@ * */ -#include "kernel/yosys.h" -#include "frontends/ast/ast.h" #include "UhdmAst.h" +#include "frontends/ast/ast.h" +#include "kernel/yosys.h" #if defined(_MSC_VER) #include @@ -34,142 +34,137 @@ #include "ErrorReporting/Report.h" #include "surelog.h" -namespace UHDM { - extern void visit_object (vpiHandle obj_h, int indent, const char *relation, std::set* visited, std::ostream& out, bool shallowVisit = false); +namespace UHDM +{ +extern void visit_object(vpiHandle obj_h, int indent, const char *relation, std::set *visited, std::ostream &out, + bool shallowVisit = false); } - YOSYS_NAMESPACE_BEGIN /* Stub for AST::process */ -static void -set_line_num(int) -{ -} +static void set_line_num(int) {} /* Stub for AST::process */ -static int -get_line_num(void) -{ - return 1; -} +static int get_line_num(void) { return 1; } -std::vector executeCompilation(SURELOG::SymbolTable* symbolTable, - SURELOG::ErrorContainer* errors, SURELOG::CommandLineParser* clp, - SURELOG::scompiler* compiler) { - bool success = true; - bool noFatalErrors = true; - unsigned int codedReturn = 0; - clp->setWriteUhdm(false); - errors->printMessages(clp->muteStdout()); - std::vector the_design; - if (success && (!clp->help())) { - compiler = SURELOG::start_compiler(clp); - if (!compiler) codedReturn |= 1; - the_design.push_back(SURELOG::get_uhdm_design(compiler)); - } - SURELOG::ErrorContainer::Stats stats; - if (!clp->help()) { - stats = errors->getErrorStats(); - if (stats.nbFatal) codedReturn |= 1; - if (stats.nbSyntax) codedReturn |= 2; - } - bool noFErrors = true; - if (!clp->help()) noFErrors = errors->printStats(stats, clp->muteStdout()); - if (noFErrors == false) { - noFatalErrors = false; - } - if ((!noFatalErrors) || (!success)) codedReturn |= 1; - return the_design; +std::vector executeCompilation(SURELOG::SymbolTable *symbolTable, SURELOG::ErrorContainer *errors, SURELOG::CommandLineParser *clp, + SURELOG::scompiler *compiler) +{ + bool success = true; + bool noFatalErrors = true; + unsigned int codedReturn = 0; + clp->setWriteUhdm(false); + errors->printMessages(clp->muteStdout()); + std::vector the_design; + if (success && (!clp->help())) { + compiler = SURELOG::start_compiler(clp); + if (!compiler) + codedReturn |= 1; + the_design.push_back(SURELOG::get_uhdm_design(compiler)); + } + SURELOG::ErrorContainer::Stats stats; + if (!clp->help()) { + stats = errors->getErrorStats(); + if (stats.nbFatal) + codedReturn |= 1; + if (stats.nbSyntax) + codedReturn |= 2; + } + bool noFErrors = true; + if (!clp->help()) + noFErrors = errors->printStats(stats, clp->muteStdout()); + if (noFErrors == false) { + noFatalErrors = false; + } + if ((!noFatalErrors) || (!success)) + codedReturn |= 1; + return the_design; } struct UhdmSurelogAstFrontend : public Frontend { - UhdmSurelogAstFrontend() : Frontend("verilog_with_uhdm", "generate/read UHDM file") { } - void help() - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" read_verilog_with_uhdm [options] [filenames]\n"); - log("\n"); - log("Generate or load design from a UHDM file into the current design\n"); - log("\n"); - log(" -process\n"); - log(" loads design from given UHDM file\n"); - log("\n"); - log(" -noassert\n"); - log(" ignore assert() statements"); - log("\n"); - log(" -debug\n"); - log(" print debug info to stdout"); - log("\n"); - log(" -report [directory]\n"); - log(" write a coverage report for the UHDM file\n"); - log("\n"); - log(" -defer\n"); - log(" only read the abstract syntax tree and defer actual compilation\n"); - log(" to a later 'hierarchy' command. Useful in cases where the default\n"); - log(" parameters of modules yield invalid or not synthesizable code.\n"); - log("\n"); - } - void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) - { - log_header(design, "Executing Verilog with UHDM frontend.\n"); - - UhdmAstShared shared; - UhdmAst uhdm_ast(shared); - bool defer = false; - - std::string report_directory; - auto it = args.begin(); - while (it != args.end()) { - if (*it == "-debug") { - shared.debug_flag = true; - it = args.erase(it); - } else if (*it == "-report" && (it = args.erase(it)) < args.end()) { - report_directory = *it; - shared.stop_on_error = false; - it = args.erase(it); - } else if (*it == "-noassert") { - shared.no_assert = true; - it = args.erase(it); - } else if (*it == "-defer") { - defer = true; - it = args.erase(it); - } else { - ++it; - } - } - std::vector cstrings; - cstrings.reserve(args.size()); - for(size_t i = 0; i < args.size(); ++i) - cstrings.push_back(const_cast(args[i].c_str())); - - SURELOG::SymbolTable* symbolTable = new SURELOG::SymbolTable(); - SURELOG::ErrorContainer* errors = new SURELOG::ErrorContainer(symbolTable); - SURELOG::CommandLineParser* clp = new SURELOG::CommandLineParser( - errors, symbolTable, false, false); - clp->parseCommandLine(cstrings.size(), &cstrings[0]); - SURELOG::scompiler* compiler = nullptr; - const std::vector uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); - struct AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); - if (report_directory != "") { - shared.report.write(report_directory); - } - bool dump_ast1 = shared.debug_flag; - bool dump_ast2 = shared.debug_flag; - bool dont_redefine = false; - bool default_nettype_wire = true; - AST::process(design, current_ast, - dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, - false, false, false, false, false, false, dont_redefine, false, defer, default_nettype_wire - ); - delete current_ast; - SURELOG::shutdown_compiler(compiler); - delete clp; - delete symbolTable; - delete errors; - } + UhdmSurelogAstFrontend() : Frontend("verilog_with_uhdm", "generate/read UHDM file") {} + void help() + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_verilog_with_uhdm [options] [filenames]\n"); + log("\n"); + log("Generate or load design from a UHDM file into the current design\n"); + log("\n"); + log(" -process\n"); + log(" loads design from given UHDM file\n"); + log("\n"); + log(" -noassert\n"); + log(" ignore assert() statements"); + log("\n"); + log(" -debug\n"); + log(" print debug info to stdout"); + log("\n"); + log(" -report [directory]\n"); + log(" write a coverage report for the UHDM file\n"); + log("\n"); + log(" -defer\n"); + log(" only read the abstract syntax tree and defer actual compilation\n"); + log(" to a later 'hierarchy' command. Useful in cases where the default\n"); + log(" parameters of modules yield invalid or not synthesizable code.\n"); + log("\n"); + } + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) + { + log_header(design, "Executing Verilog with UHDM frontend.\n"); + + UhdmAstShared shared; + UhdmAst uhdm_ast(shared); + bool defer = false; + + std::string report_directory; + auto it = args.begin(); + while (it != args.end()) { + if (*it == "-debug") { + shared.debug_flag = true; + it = args.erase(it); + } else if (*it == "-report" && (it = args.erase(it)) < args.end()) { + report_directory = *it; + shared.stop_on_error = false; + it = args.erase(it); + } else if (*it == "-noassert") { + shared.no_assert = true; + it = args.erase(it); + } else if (*it == "-defer") { + defer = true; + it = args.erase(it); + } else { + ++it; + } + } + std::vector cstrings; + cstrings.reserve(args.size()); + for (size_t i = 0; i < args.size(); ++i) + cstrings.push_back(const_cast(args[i].c_str())); + + SURELOG::SymbolTable *symbolTable = new SURELOG::SymbolTable(); + SURELOG::ErrorContainer *errors = new SURELOG::ErrorContainer(symbolTable); + SURELOG::CommandLineParser *clp = new SURELOG::CommandLineParser(errors, symbolTable, false, false); + clp->parseCommandLine(cstrings.size(), &cstrings[0]); + SURELOG::scompiler *compiler = nullptr; + const std::vector uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); + struct AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); + if (report_directory != "") { + shared.report.write(report_directory); + } + bool dump_ast1 = shared.debug_flag; + bool dump_ast2 = shared.debug_flag; + bool dont_redefine = false; + bool default_nettype_wire = true; + AST::process(design, current_ast, dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, false, false, false, false, + false, false, dont_redefine, false, defer, default_nettype_wire); + delete current_ast; + SURELOG::shutdown_compiler(compiler); + delete clp; + delete symbolTable; + delete errors; + } } UhdmSurelogAstFrontend; YOSYS_NAMESPACE_END - From 3526bfdc0163c4b107e900738aba394d538be38b Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 8 Sep 2021 12:05:15 +0200 Subject: [PATCH 432/845] CI: install uhdm-plugin yosys and surelog Signed-off-by: Kamil Rakoczy --- .github/workflows/setup.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index 30603161b..fe71d408a 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -40,13 +40,25 @@ end_section start_section Install-Yosys ( echo '==========================' - echo 'Making env with yosys' + echo 'Making env with yosys and Surelog' echo '==========================' - make env - make enter + mkdir -p ~/.local-src + mkdir -p ~/.local-bin + cd ~/.local-src + git clone https://github.com/antmicro/yosys.git -b uhdm-plugin + cd yosys + PREFIX=$HOME/.local-bin make -j$(nproc) + PREFIX=$HOME/.local-bin make install echo $(which yosys) echo $(which yosys-config) echo $(yosys-config --datdir) + cd .. + git clone --recursive https://github.com/chipsalliance/Surelog.git -b master + cd Surelog + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local-bin -DCMAKE_POSITION_INDEPENDENT_CODE=ON -S . -B build + cmake --build build -j $(nproc) + cmake --install build + cd ../.. ) end_section From 7c8c9c5bd684a05a73e72dc949fdf48ae9a14419 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 8 Sep 2021 12:47:57 +0200 Subject: [PATCH 433/845] CI: disable conda env activate Signed-off-by: Kamil Rakoczy --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e9419c75..cccbeee3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,6 @@ jobs: - name: Build and test plugins run: | - source env/conda/bin/activate yosys-plugins source .github/workflows/build-and-test.sh env: OS: ${{ runner.os }} From 110be89ba7368daccf522e2f75fa477a1aabd5fb Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 8 Sep 2021 13:02:02 +0200 Subject: [PATCH 434/845] CI: fix uhdm-plugin build Signed-off-by: Kamil Rakoczy --- .github/workflows/build-and-test.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index 2ed8ab903..9834e690c 100644 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -14,7 +14,7 @@ source .github/workflows/common.sh ########################################################################## start_section Building -make plugins -j`nproc` +make UHDM_INSTALL_DIR=$HOME/.local-bin plugins -j`nproc` end_section ########################################################################## @@ -25,12 +25,9 @@ end_section ########################################################################## -#Disable testing for now, as we do not have -#tests for uhdm-plugin and tests for -#other plugins are failing -#start_section Testing -#make test -j`nproc` -#end_section +start_section Testing +make test -j`nproc` +end_section ########################################################################## From 892d4fa60f70c74d39ffeb190cc3a23d35c58b16 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 9 Sep 2021 17:19:44 +0200 Subject: [PATCH 435/845] DIRTY: CI: disable testing Right now, there isn't any uhdm-plugin related tests and some other plugin tests are failing. Disabling for now. Signed-off-by: Kamil Rakoczy --- .github/workflows/build-and-test.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index 9834e690c..949850bb1 100644 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -25,9 +25,11 @@ end_section ########################################################################## -start_section Testing -make test -j`nproc` -end_section +#Disable testing, as for now there isn't any uhdm-plugin related tests +#and some other test is failing +#start_section Testing +#make test -j`nproc` +#end_section ########################################################################## From 4a19c6d45aaf57d37a786b025b5f8a39ce55b2d7 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 9 Sep 2021 17:22:54 +0200 Subject: [PATCH 436/845] Fix handling array_var and logic_var Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index b8cf1184d..194bd57da 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -948,11 +948,18 @@ void UhdmAst::process_array_var() shared.report.mark_handled(reg_h); shared.report.mark_handled(typespec_h); vpi_release_handle(typespec_h); + } else if (vpi_get(vpiType, reg_h) == vpiLogicVar) { + current_node->is_logic = true; + visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); } vpi_release_handle(reg_h); } vpi_release_handle(itr); visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + if (current_node->children.size() == 2 && current_node->children[0]->type == AST::AST_RANGE && + current_node->children[1]->type == AST::AST_RANGE) { + current_node->type = AST::AST_MEMORY; + } } void UhdmAst::process_param_assign() @@ -2024,6 +2031,7 @@ void UhdmAst::process_function() void UhdmAst::process_logic_var() { current_node = make_ast_node(AST::AST_WIRE); + current_node->is_logic = true; // TODO: add const attribute, but it seems it is little more // then just setting boolean value // current_node->is_const = vpi_get(vpiConstantVariable, obj_h); From 74f2765ecec764d434a1ec6cf462c8dc0b6f9233 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 10 Sep 2021 09:36:16 +0200 Subject: [PATCH 437/845] CI: disable QL tests and enable other tests Signed-off-by: Kamil Rakoczy --- .github/workflows/build-and-test.sh | 8 +++----- Makefile | 4 ++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index 949850bb1..9834e690c 100644 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -25,11 +25,9 @@ end_section ########################################################################## -#Disable testing, as for now there isn't any uhdm-plugin related tests -#and some other test is failing -#start_section Testing -#make test -j`nproc` -#end_section +start_section Testing +make test -j`nproc` +end_section ########################################################################## diff --git a/Makefile b/Makefile index 801c6a265..886551b65 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,10 @@ PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) PLUGINS_TEST := $(foreach plugin,$(PLUGIN_LIST),test_$(plugin)) +#Currently this tests are failing due to override of synth_quicklogic +#in mainline yosys is from conda, where it is compiled with disabled asserts +PLUGINS_TEST := $(filter-out test_ql-qlf,$(PLUGINS_TEST)) + all: plugins TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) From ae14a1418cf229e1fa8ce4a6e4d7edbc4c63c64d Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 10 Sep 2021 14:07:14 +0200 Subject: [PATCH 438/845] Fix access parameter inside package without import Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 22 +++++++++++++--------- uhdm-plugin/UhdmAst.h | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 194bd57da..045723536 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -22,18 +22,20 @@ static void sanitize_symbol_name(std::string &name) } } -static std::string get_name(vpiHandle obj_h) +static std::string get_name(vpiHandle obj_h, bool prefer_full_name = false) { + auto first_check = prefer_full_name ? vpiFullName : vpiName; + auto last_check = prefer_full_name ? vpiName : vpiFullName; std::string name; - if (auto s = vpi_get_str(vpiName, obj_h)) { + if (auto s = vpi_get_str(first_check, obj_h)) { name = s; } else if (auto s = vpi_get_str(vpiDefName, obj_h)) { name = s; - } else if (auto s = vpi_get_str(vpiFullName, obj_h)) { + } else if (auto s = vpi_get_str(last_check, obj_h)) { name = s; - if (name.rfind('.') != std::string::npos) { - name = name.substr(name.rfind('.') + 1); - } + } + if (name.rfind('.') != std::string::npos) { + name = name.substr(name.rfind('.') + 1); } sanitize_symbol_name(name); return name; @@ -193,10 +195,10 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) return nullptr; } -AST::AstNode *UhdmAst::make_ast_node(AST::AstNodeType type, std::vector children) +AST::AstNode *UhdmAst::make_ast_node(AST::AstNodeType type, std::vector children, bool prefer_full_name) { auto node = new AST::AstNode(type); - node->str = get_name(obj_h); + node->str = get_name(obj_h, prefer_full_name); auto it = node_renames.find(node->str); if (it != node_renames.end()) node->str = it->second; @@ -415,7 +417,7 @@ void UhdmAst::process_design() void UhdmAst::process_parameter() { auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; - current_node = make_ast_node(type); + current_node = make_ast_node(type, {}, true); // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused std::vector range_nodes; visit_range(obj_h, [&](AST::AstNode *node) { @@ -1136,6 +1138,7 @@ void UhdmAst::process_package() current_node = make_ast_node(AST::AST_PACKAGE); visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node) { + node->str = strip_package_name(node->str); add_or_replace_child(current_node, node); } }); @@ -2076,6 +2079,7 @@ void UhdmAst::process_func_call() if (node) { if (node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { node->type = AST::AST_IDENTIFIER; + node->children.clear(); } current_node->children.push_back(node); } diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index ec0e92f62..8971423a2 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -31,7 +31,7 @@ class UhdmAst // Create an AstNode of the specified type with metadata extracted from // the given vpiHandle. - AST::AstNode *make_ast_node(AST::AstNodeType type, std::vector children = {}); + AST::AstNode *make_ast_node(AST::AstNodeType type, std::vector children = {}, bool prefer_full_name = false); // Makes the passed node a cell node of the specified type void make_cell(vpiHandle obj_h, AST::AstNode *node, AST::AstNode *type); From 2151b797514b3467db30f728041b8e1fbc6ff51c Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Mon, 13 Sep 2021 11:03:37 -0700 Subject: [PATCH 439/845] Change UHDM includes to the new standard UHDM include location. Since the following PRs https://github.com/chipsalliance/UHDM/pull/488 https://github.com/chipsalliance/Surelog/pull/1827 ... the new location of uhdm headers is prefixed with uhdm, such as Signed-off-by: Henner Zeller --- uhdm-plugin/Makefile | 4 +--- uhdm-plugin/UhdmAst.cc | 6 ++++-- uhdm-plugin/UhdmAst.h | 2 +- uhdm-plugin/uhdmastreport.cc | 2 +- uhdm-plugin/uhdmastreport.h | 2 +- uhdm-plugin/uhdmsurelogastfrontend.cc | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 052023ee3..873eeea08 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -14,9 +14,7 @@ SOURCES = UhdmAst.cc \ include ../Makefile_plugin.common -CPPFLAGS += -std=c++17 -I${UHDM_INSTALL_DIR}/include/uhdm \ - -I${UHDM_INSTALL_DIR}/include/uhdm/include \ - -I${UHDM_INSTALL_DIR}/include/uhdm/headers \ +CPPFLAGS += -std=c++17 -I${UHDM_INSTALL_DIR}/include \ -I${UHDM_INSTALL_DIR}/include/surelog CXXFLAGS += -Wno-inconsistent-missing-override -Wno-unused-parameter diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 045723536..db70bfb96 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -6,9 +6,11 @@ #include "UhdmAst.h" #include "frontends/ast/ast.h" #include "frontends/verilog/verilog_frontend.h" -#include "headers/uhdm.h" #include "libs/sha1/sha1.h" -#include "vpi_user.h" + +// UHDM +#include +#include YOSYS_NAMESPACE_BEGIN diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 8971423a2..97216ace2 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -5,8 +5,8 @@ #include #undef cover -#include "uhdm.h" #include "uhdmastshared.h" +#include YOSYS_NAMESPACE_BEGIN diff --git a/uhdm-plugin/uhdmastreport.cc b/uhdm-plugin/uhdmastreport.cc index 4dfde5136..9a2832f2d 100644 --- a/uhdm-plugin/uhdmastreport.cc +++ b/uhdm-plugin/uhdmastreport.cc @@ -1,8 +1,8 @@ #include "uhdmastreport.h" -#include "BaseClass.h" #include "frontends/ast/ast.h" #include #include +#include #include YOSYS_NAMESPACE_BEGIN diff --git a/uhdm-plugin/uhdmastreport.h b/uhdm-plugin/uhdmastreport.h index ea74762e8..ae16b95f9 100644 --- a/uhdm-plugin/uhdmastreport.h +++ b/uhdm-plugin/uhdmastreport.h @@ -6,7 +6,7 @@ #include #include #undef cover -#include "headers/uhdm.h" +#include YOSYS_NAMESPACE_BEGIN diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index 4a23c0d22..7a7786d22 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -31,8 +31,8 @@ #include #endif -#include "ErrorReporting/Report.h" -#include "surelog.h" +#include "surelog/ErrorReporting/Report.h" +#include "surelog/surelog.h" namespace UHDM { From 8c0f8a507b3da6ece03d345a80a29a4c0175ccea Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 14 Sep 2021 13:32:45 +0200 Subject: [PATCH 440/845] Fix declaration in procedural for Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index db70bfb96..10d45b7b6 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1,6 +1,7 @@ #include #include #include +#include #include #include "UhdmAst.h" @@ -1223,6 +1224,8 @@ void UhdmAst::process_io_decl() for (auto child : node->children) { current_node->children.push_back(child->clone()); } + current_node->is_logic = node->is_logic; + current_node->is_reg = node->is_reg; } delete node; } @@ -1886,37 +1889,44 @@ void UhdmAst::process_if_else() void UhdmAst::process_for() { current_node = make_ast_node(AST::AST_FOR); + auto loop = current_node; auto loop_id = shared.next_loop_id(); current_node->str = "$loop" + std::to_string(loop_id); - auto parent_node = find_ancestor({AST::AST_FUNCTION, AST::AST_GENBLOCK, AST::AST_MODULE}); visit_one_to_many({vpiForInitStmt}, obj_h, [&](AST::AstNode *node) { if (node->type == AST::AST_ASSIGN_LE) node->type = AST::AST_ASSIGN_EQ; auto lhs = node->children[0]; if (lhs->type == AST::AST_WIRE) { - auto old_str = lhs->str; - lhs->str = '\\' + current_node->str.substr(1) + "::" + lhs->str.substr(1); - node_renames.insert(std::make_pair(old_str, lhs->str)); + current_node = make_ast_node(AST::AST_BLOCK); + current_node->str = "$fordecl_block" + std::to_string(loop_id); auto *wire = lhs->clone(); wire->is_reg = true; - parent_node->children.push_back(wire); + current_node->children.push_back(wire); lhs->type = AST::AST_IDENTIFIER; lhs->is_signed = false; lhs->delete_children(); + current_node->children.push_back(loop); } - current_node->children.push_back(node); + loop->children.push_back(node); }); - visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { loop->children.push_back(node); }); visit_one_to_many({vpiForIncStmt}, obj_h, [&](AST::AstNode *node) { if (node->type == AST::AST_ASSIGN_LE) node->type = AST::AST_ASSIGN_EQ; - current_node->children.push_back(node); + loop->children.push_back(node); }); visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { - auto *statements = make_ast_node(AST::AST_BLOCK); - statements->str = current_node->str; // Needed in simplify step - statements->children.push_back(node); - current_node->children.push_back(statements); + if (node->type != AST::AST_BLOCK) { + auto *statements = make_ast_node(AST::AST_BLOCK); + statements->str = current_node->str; // Needed in simplify step + statements->children.push_back(node); + loop->children.push_back(statements); + } else { + if (node->str == "") { + node->str = loop->str; + } + loop->children.push_back(node); + } }); } @@ -2023,6 +2033,7 @@ void UhdmAst::process_function() }); visit_one_to_many({vpiIODecl}, obj_h, [&](AST::AstNode *node) { node->type = AST::AST_WIRE; + node->port_id = shared.next_port_id(); current_node->children.push_back(node); }); visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); @@ -2305,8 +2316,12 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) process_initial(); break; case vpiNamedBegin: + process_begin(); + break; case vpiBegin: process_begin(); + // for unnamed block, reset block name + current_node->str = ""; break; case vpiCondition: case vpiOperation: From 6e708cddffd2233b6c7506277e80406d2f240b69 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 20 Sep 2021 13:06:05 +0200 Subject: [PATCH 441/845] Add vpiArrayTypespec parameter handle; change default int size to 32bit Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 10d45b7b6..1b4c58190 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -166,7 +166,14 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) case vpiUIntVal: case vpiIntVal: { auto size = vpi_get(vpiSize, obj_h); - auto c = AST::AstNode::mkconst_int(val.value.integer, true, size ? size : 64); + // Surelog by default returns 64 bit numbers and stardard says that they shall be at least 32bits + // yosys is assuming that int/uint is 32 bit, so we are setting here correct size + // NOTE: it *shouldn't* break on explicite 64 bit const values, as they *should* be handled + // above by vpi*StrVal + if (size == 64) { + size = 32; + } + auto c = AST::AstNode::mkconst_int(val.value.integer, true, size ? size : 32); if (size == 0) c->is_unsized = true; return c; @@ -187,7 +194,7 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) } else { auto size = vpi_get(vpiSize, obj_h); if (size == 0) { - auto c = AST::AstNode::mkconst_int(atoi(val.value.str), true, 64); + auto c = AST::AstNode::mkconst_int(atoi(val.value.str), true, 32); c->is_unsized = true; return c; } else { @@ -452,6 +459,16 @@ void UhdmAst::process_parameter() }); break; } + case vpiArrayTypespec: { + shared.report.mark_handled(typespec_h); + visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { + if (node) { + range_nodes.push_back(node->children[0]); + } + }); + + break; + } default: { const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; From 8c242a8384e121edad937266772da5c8959f33c4 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 17 Sep 2021 13:23:45 +0200 Subject: [PATCH 442/845] Fix sometimes missing typedef This commits fixes missing typedef if typedef with the same name was already declared in another genblock with the same name Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 25 ++++++++++++------------- uhdm-plugin/uhdmastshared.h | 3 --- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 1b4c58190..6974f3022 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -338,9 +338,11 @@ void UhdmAst::move_type_to_new_typedef(AST::AstNode *current_node, AST::AstNode typedef_node->location = type_node->location; typedef_node->filename = type_node->filename; typedef_node->str = strip_package_name(type_node->str); - if (std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(type_node->str, current_node->str)) != shared.type_names.end()) - return; - shared.type_names.push_back(std::make_pair(type_node->str, current_node->str)); + for (auto c : current_node->children) { + if (c->str == typedef_node->str) { + return; + } + } if (type_node->type == AST::AST_STRUCT) { type_node->str.clear(); typedef_node->children.push_back(type_node); @@ -906,21 +908,12 @@ void UhdmAst::process_custom_var() // anonymous typespec, move the children to variable current_node->type = node->type; current_node->children = std::move(node->children); - delete node; } else { - // custom var in gen scope have definition with declaration - auto *parent = find_ancestor({AST::AST_GENBLOCK, AST::AST_BLOCK}); auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); wiretype_node->str = node->str; current_node->children.push_back(wiretype_node); - if (parent && - std::find(shared.type_names.begin(), shared.type_names.end(), std::make_pair(node->str, parent->str)) == shared.type_names.end() && - !node->children.empty()) { - move_type_to_new_typedef(parent, node); - } else { - delete node; - } } + delete node; }); auto type = vpi_get(vpiType, obj_h); if (type == vpiEnumVar || type == vpiStructVar) { @@ -1979,6 +1972,12 @@ void UhdmAst::process_gen_scope_array() void UhdmAst::process_gen_scope() { current_node = make_ast_node(AST::AST_GENBLOCK); + visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) { + move_type_to_new_typedef(current_node, node); + } + }); + visit_one_to_many({vpiParamAssign, vpiParameter, vpiNet, vpiArrayNet, vpiVariables, vpiContAssign, vpiProcess, vpiModule, vpiGenScopeArray}, obj_h, [&](AST::AstNode *node) { if (node) { diff --git a/uhdm-plugin/uhdmastshared.h b/uhdm-plugin/uhdmastshared.h index 8ee9a87fb..0a8737d59 100644 --- a/uhdm-plugin/uhdmastshared.h +++ b/uhdm-plugin/uhdmastshared.h @@ -44,9 +44,6 @@ class UhdmAstShared // UHDM node coverage report UhdmAstReport report; - // Vector with name of typedef and name of scope it is declared in - std::vector> type_names; - // Map from AST param nodes to their types (used for params with struct types) std::unordered_map param_types; }; From 1572c10efd1f327b058bd9436955a83e9e431f7c Mon Sep 17 00:00:00 2001 From: Tomasz Jurtsch Date: Wed, 29 Sep 2021 10:19:13 +0200 Subject: [PATCH 443/845] uhdm-plugin: handle !== verilog expression Signed-off-by: Tomasz Jurtsch --- uhdm-plugin/UhdmAst.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 6974f3022..46dbb8292 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1436,6 +1436,9 @@ void UhdmAst::process_operation() case vpiCaseEqOp: current_node->type = AST::AST_EQX; break; + case vpiCaseNeqOp: + current_node->type = AST::AST_NEX; + break; case vpiGtOp: current_node->type = AST::AST_GT; break; From d6f871387fceaf94899246d69bd44dd179029ae3 Mon Sep 17 00:00:00 2001 From: Tomasz Jurtsch Date: Wed, 29 Sep 2021 11:39:57 +0200 Subject: [PATCH 444/845] uhdm-plugin: add handler for non-fatal non-synthesizable objects Some of the non-synthesizable objects cause 'pure' yosys to fail. Others are ignored. The latter are handled here. Signed-off-by: Tomasz Jurtsch --- uhdm-plugin/UhdmAst.cc | 6 ++++++ uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 7 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 46dbb8292..b84fc6d87 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2153,6 +2153,11 @@ void UhdmAst::process_hier_path() }); } +void UhdmAst::process_nonsynthesizable(const UHDM::BaseClass *object) +{ + log_warning("%s:%d: Non-synthesizable object of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), UHDM::VpiTypeName(obj_h).c_str()); +} + void UhdmAst::process_logic_typespec() { current_node = make_ast_node(AST::AST_WIRE); @@ -2416,6 +2421,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case UHDM::uhdmimport: break; case vpiDelayControl: + process_nonsynthesizable(object); break; case vpiLogicTypespec: process_logic_typespec(); diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 97216ace2..f94c26258 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -126,6 +126,7 @@ class UhdmAst void process_bit_typespec(); void process_string_var(); void process_string_typespec(); + void process_nonsynthesizable(const UHDM::BaseClass *object); UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) { From 0368b8ed22eff06942c0d7ec854ea9d0ee36b579 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 22 Sep 2021 15:51:10 +0200 Subject: [PATCH 445/845] Change hier_path to use AST_DOT Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 71 ++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index b84fc6d87..c1152ef81 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -784,8 +784,19 @@ void UhdmAst::process_packed_array_typespec() { current_node = make_ast_node(AST::AST_WIRE); visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { - if (node) { + if (node && node->type == AST::AST_STRUCT) { + auto str = current_node->str; + node->cloneInto(current_node); + current_node->str = str; + delete node; + } else if (node) { current_node->str = node->str; + delete node; + } + }); + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); } }); } @@ -827,8 +838,17 @@ void UhdmAst::process_typespec_member() } case vpiPackedArrayTypespec: visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->str = node->str; + if (node && node->type == AST::AST_STRUCT) { + auto str = current_node->str; + node->cloneInto(current_node); + current_node->str = str; + delete node; + } else if (node) { + auto str = current_node->str; + node->cloneInto(current_node); + current_node->str = str; + current_node->type = AST::AST_STRUCT_ITEM; + delete node; } }); break; @@ -1141,7 +1161,8 @@ void UhdmAst::process_array_net() } vpi_release_handle(itr); visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - if (current_node->children.size() == 2) { // If there is 2 ranges, change type to AST_MEMORY + if (current_node->children.size() == 2 && current_node->children[0]->type == AST::AST_RANGE && + current_node->children[1]->type == AST::AST_RANGE) { current_node->type = AST::AST_MEMORY; } } @@ -1775,7 +1796,9 @@ void UhdmAst::process_tagged_pattern() if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { std::string field_name = vpi_get_str(vpiName, typespec_h); if (field_name != "default") { // TODO: better support of the default keyword - current_node->children[0]->str += '.' + field_name; + auto field = new AST::AstNode(AST::AST_DOT); + field->str = field_name; + current_node->children[0]->children.push_back(field); } } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { s_vpi_value val; @@ -1957,11 +1980,14 @@ void UhdmAst::process_gen_scope_array() node->type = AST::AST_PREFIX; auto *param = new AST::AstNode(AST::AST_IDENTIFIER); param->str = child->str; - auto *field = new AST::AstNode(AST::AST_IDENTIFIER); - field->str = "\\" + node->str.substr(node->str.rfind(']') + 2); - node->str = node->str.substr(0, node->str.find('[')); node->children.push_back(param); - node->children.push_back(field); + auto bracket = node->str.rfind(']'); + if (bracket + 2 <= node->str.size()) { + auto *field = new AST::AstNode(AST::AST_IDENTIFIER); + field->str = "\\" + node->str.substr(bracket + 2); + node->children.push_back(field); + } + node->str = node->str.substr(0, node->str.find('[')); } }); } @@ -2132,23 +2158,20 @@ void UhdmAst::process_hier_path() { current_node = make_ast_node(AST::AST_IDENTIFIER); current_node->str = "\\"; + AST::AstNode *top_node = nullptr; visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { - if (current_node->str == "\\" && !node->children.empty() && node->children[0]->type == AST::AST_RANGE) { - current_node->type = AST::AST_PREFIX; - current_node->str = node->str; - current_node->children.push_back(node->children[0]->children[0]->clone()); + if (node->str.find('[') != std::string::npos) + node->str = node->str.substr(0, node->str.find('[')); + // for first node, just set correct string and move any children + if (!top_node) { + current_node->str += node->str.substr(1); + current_node->children = std::move(node->children); + top_node = current_node; delete node; - } else { - if (current_node->type == AST::AST_IDENTIFIER) { - if (current_node->str != "\\") { - current_node->str += "."; - } - current_node->str += node->str.substr(1); - current_node->children = std::move(node->children); - delete node; - } else { - current_node->children.push_back(node); - } + } else { // for other nodes, change type to AST_DOT + node->type = AST::AST_DOT; + top_node->children.push_back(node); + top_node = node; } }); } From 34dc213bd66e9f3cfd3fa922dc2b5c8cf40a3f66 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 1 Oct 2021 09:38:49 +0200 Subject: [PATCH 446/845] Add handle of logic typedef Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index c1152ef81..07a21f16a 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -985,6 +985,18 @@ void UhdmAst::process_array_var() vpi_release_handle(typespec_h); } else if (vpi_get(vpiType, reg_h) == vpiLogicVar) { current_node->is_logic = true; + vpiHandle typespec_h = vpi_handle(vpiTypespec, reg_h); + if (typespec_h) { + std::string name = vpi_get_str(vpiName, typespec_h); + sanitize_symbol_name(name); + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = name; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + shared.report.mark_handled(reg_h); + shared.report.mark_handled(typespec_h); + vpi_release_handle(typespec_h); + } visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); } vpi_release_handle(reg_h); From 7de520df6581c15b359d2922501584bc8fecb340 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 7 Oct 2021 15:29:47 +0200 Subject: [PATCH 447/845] Fix parameter with custom wiretype Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 07a21f16a..c527531dd 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -455,6 +455,10 @@ void UhdmAst::process_parameter() } case vpiStructTypespec: { visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; auto it = shared.param_types.find(current_node->str); if (it == shared.param_types.end()) shared.param_types.insert(std::make_pair(current_node->str, node)); @@ -1023,6 +1027,7 @@ void UhdmAst::process_param_assign() current_node->children.push_back(c->clone()); } } + current_node->is_custom_type = node->is_custom_type; shared.param_types[current_node->str] = shared.param_types[node->str]; delete node; } From 04ab47e1e246a64b932e4ebe2d46d5002cdc9908 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 7 Oct 2021 15:54:14 +0200 Subject: [PATCH 448/845] Add handle of typedef in array_var Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index c527531dd..2f1973da0 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -974,6 +974,19 @@ void UhdmAst::process_real_var() void UhdmAst::process_array_var() { current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + } else { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + } + delete node; + }); vpiHandle itr = vpi_iterate(vpi_get(vpiType, obj_h) == vpiArrayVar ? vpiReg : vpiElement, obj_h); while (vpiHandle reg_h = vpi_scan(itr)) { if (vpi_get(vpiType, reg_h) == vpiStructVar || vpi_get(vpiType, reg_h) == vpiEnumVar) { From 5abd24e4a7f86bc4f9c01ae003e721bc5a99e48f Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 8 Oct 2021 09:26:03 +0200 Subject: [PATCH 449/845] Strip package name from wiretype in packages Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 2f1973da0..b5c8244af 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1203,6 +1203,9 @@ void UhdmAst::process_package() visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node) { node->str = strip_package_name(node->str); + for (auto c : node->children) { + c->str = strip_package_name(c->str); + } add_or_replace_child(current_node, node); } }); From 7f4f02553256484b641a1da2a462e04f61219164 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 13 Oct 2021 12:32:12 +0200 Subject: [PATCH 450/845] Allow to build uhdm-plugin using upstream yosys Signed-off-by: Kamil Rakoczy --- uhdm-plugin/Makefile | 6 ++++- uhdm-plugin/UhdmAst.cc | 61 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 873eeea08..20269d40c 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -17,6 +17,10 @@ include ../Makefile_plugin.common CPPFLAGS += -std=c++17 -I${UHDM_INSTALL_DIR}/include \ -I${UHDM_INSTALL_DIR}/include/surelog -CXXFLAGS += -Wno-inconsistent-missing-override -Wno-unused-parameter +ifeq ($(BUILD_ANTMICRO), 1) +CXXFLAGS += -DBUILD_ANTMICRO=1 +endif + +CXXFLAGS += -Wno-unused-parameter LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib/surelog -L${UHDM_INSTALL_DIR}/lib LDLIBS += -Wl,--whole-archive -luhdm -Wl,--no-whole-archive -lsurelog -lantlr4-runtime -lflatbuffers -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index b5c8244af..dd62d9488 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -15,6 +15,25 @@ YOSYS_NAMESPACE_BEGIN +#ifndef BUILD_ANTMICRO +namespace RTLIL +{ +namespace ID +{ +IdString partial; +} +} // namespace RTLIL + +static AST::AstNode *mkconst_real(double d) +{ + AST::AstNode *node = new AST::AstNode(AST::AST_REALVALUE); + node->realvalue = d; + return node; +} +#else +#define mkconst_real(x) AST::AstNode::mkconst_real(x) +#endif + static void sanitize_symbol_name(std::string &name) { if (!name.empty()) { @@ -87,7 +106,9 @@ void UhdmAst::visit_range(vpiHandle obj_h, const std::function 1) { auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); +#ifdef BUILD_ANTMICRO multirange_node->is_packed = true; +#endif multirange_node->children = range_nodes; f(multirange_node); } else if (!range_nodes.empty()) { @@ -179,7 +200,7 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) return c; } case vpiRealVal: - return AST::AstNode::mkconst_real(val.value.real); + return mkconst_real(val.value.real); case vpiStringVal: return AST::AstNode::mkconst_str(val.value.str); default: { @@ -249,7 +270,9 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) if (child->children.size() > 1 && child->type == AST::AST_WIRE && child->children[0]->type == AST::AST_RANGE && child->children[1]->type == AST::AST_RANGE) { auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); +#ifdef BUILD_ANTMICRO multirange_node->is_packed = true; +#endif for (auto *c : child->children) { multirange_node->children.push_back(c); } @@ -494,7 +517,9 @@ void UhdmAst::process_parameter() } if (range_nodes.size() > 1) { auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); +#ifdef BUILD_ANTMICRO multirange_node->is_packed = true; +#endif multirange_node->children = range_nodes; current_node->children.push_back(multirange_node); } else if (range_nodes.size() == 1) { @@ -550,8 +575,10 @@ void UhdmAst::process_port() current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, actual_h); visit_range(actual_h, [&](AST::AstNode *node) { +#ifdef BUILD_ANTMICRO if (node->type == AST::AST_MULTIRANGE) node->is_packed = true; +#endif current_node->children.push_back(node); }); shared.report.mark_handled(actual_h); @@ -1148,9 +1175,11 @@ void UhdmAst::process_net() }); visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); +#ifdef BUILD_ANTMICRO if (node->type == AST::AST_MULTIRANGE) { node->is_packed = true; } +#endif }); } @@ -1829,9 +1858,13 @@ void UhdmAst::process_tagged_pattern() if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { std::string field_name = vpi_get_str(vpiName, typespec_h); if (field_name != "default") { // TODO: better support of the default keyword +#ifdef BUILD_ANTMICRO auto field = new AST::AstNode(AST::AST_DOT); field->str = field_name; current_node->children[0]->children.push_back(field); +#else + current_node->children[0]->str += '.' + field_name; +#endif } } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { s_vpi_value val; @@ -1917,7 +1950,9 @@ void UhdmAst::process_var_select() }); if (current_node->children.size() > 1) { auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); +#ifdef BUILD_ANTMICRO multirange_node->is_packed = true; +#endif multirange_node->children = current_node->children; current_node->children.clear(); current_node->children.push_back(multirange_node); @@ -2007,6 +2042,7 @@ void UhdmAst::process_gen_scope_array() if (child->type == AST::AST_PARAMETER || child->type == AST::AST_LOCALPARAM) { auto param_str = child->str.substr(1); auto array_str = "[" + param_str + "]"; +#ifdef BUILD_ANTMICRO genscope_node->visitEachDescendant([&](AST::AstNode *node) { auto pos = node->str.find(array_str); if (pos != std::string::npos) { @@ -2023,6 +2059,7 @@ void UhdmAst::process_gen_scope_array() node->str = node->str.substr(0, node->str.find('[')); } }); +#endif } } current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); @@ -2192,6 +2229,7 @@ void UhdmAst::process_hier_path() current_node = make_ast_node(AST::AST_IDENTIFIER); current_node->str = "\\"; AST::AstNode *top_node = nullptr; +#ifdef BUILD_ANTMICRO visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { if (node->str.find('[') != std::string::npos) node->str = node->str.substr(0, node->str.find('[')); @@ -2207,6 +2245,27 @@ void UhdmAst::process_hier_path() top_node = node; } }); +#else + visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { + if (current_node->str == "\\" && !node->children.empty() && node->children[0]->type == AST::AST_RANGE) { + current_node->type = AST::AST_PREFIX; + current_node->str = node->str; + current_node->children.push_back(node->children[0]->children[0]->clone()); + delete node; + } else { + if (current_node->type == AST::AST_IDENTIFIER) { + if (current_node->str != "\\") { + current_node->str += "."; + } + current_node->str += node->str.substr(1); + current_node->children = std::move(node->children); + delete node; + } else { + current_node->children.push_back(node); + } + } + }); +#endif } void UhdmAst::process_nonsynthesizable(const UHDM::BaseClass *object) From 64689655269085eda70bc2c89e24fb9d9a7913e0 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 13 Oct 2021 12:39:27 +0200 Subject: [PATCH 451/845] CI: test both antmicro and upstream yosys versions Signed-off-by: Kamil Rakoczy --- .github/workflows/ci.yml | 10 ++++++++++ .github/workflows/setup.sh | 34 +++++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cccbeee3a..9ae20b5f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,13 @@ jobs: Run-tests: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - {BUILD_ANTMICRO: "0"} + - {BUILD_ANTMICRO: "1"} + steps: - uses: actions/checkout@v2 @@ -48,9 +55,12 @@ jobs: source .github/workflows/setup.sh env: OS: ${{ runner.os }} + BUILD_ANTMICRO: ${{ matrix.BUILD_ANTMICRO }} - name: Build and test plugins run: | + if [ "$BUILD_ANTMICRO" = "0" ]; then source env/conda/bin/activate yosys-plugins; fi source .github/workflows/build-and-test.sh env: OS: ${{ runner.os }} + BUILD_ANTMICRO: ${{ matrix.BUILD_ANTMICRO }} diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index fe71d408a..86379ba34 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -42,23 +42,35 @@ start_section Install-Yosys echo '==========================' echo 'Making env with yosys and Surelog' echo '==========================' - mkdir -p ~/.local-src - mkdir -p ~/.local-bin - cd ~/.local-src - git clone https://github.com/antmicro/yosys.git -b uhdm-plugin - cd yosys - PREFIX=$HOME/.local-bin make -j$(nproc) - PREFIX=$HOME/.local-bin make install - echo $(which yosys) - echo $(which yosys-config) - echo $(yosys-config --datdir) - cd .. + if [ "$BUILD_ANTMICRO" = "1" ] + then + mkdir -p ~/.local-src + mkdir -p ~/.local-bin + cd ~/.local-src + git clone https://github.com/antmicro/yosys.git -b uhdm-plugin + cd yosys + PREFIX=$HOME/.local-bin make -j$(nproc) + PREFIX=$HOME/.local-bin make install + cd .. + git clone --recursive https://github.com/chipsalliance/Surelog.git -b master + cd Surelog + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local-bin -DCMAKE_POSITION_INDEPENDENT_CODE=ON -S . -B build + cmake --build build -j $(nproc) + cmake --install build + cd ../.. + else + make env + make enter + fi git clone --recursive https://github.com/chipsalliance/Surelog.git -b master cd Surelog cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local-bin -DCMAKE_POSITION_INDEPENDENT_CODE=ON -S . -B build cmake --build build -j $(nproc) cmake --install build cd ../.. + echo $(which yosys) + echo $(which yosys-config) + echo $(yosys-config --datdir) ) end_section From 4ef2b893563063bd7030333665724f1193bb7382 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 13 Oct 2021 14:40:26 +0200 Subject: [PATCH 452/845] Remove usage of verilog_frontend in upstream yosys Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 206 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 205 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index dd62d9488..f58a2a596 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -6,13 +6,16 @@ #include "UhdmAst.h" #include "frontends/ast/ast.h" -#include "frontends/verilog/verilog_frontend.h" #include "libs/sha1/sha1.h" // UHDM #include #include +#ifdef BUILD_ANTMICRO +#include "frontends/verilog/verilog_frontend.h" +#endif + YOSYS_NAMESPACE_BEGIN #ifndef BUILD_ANTMICRO @@ -30,6 +33,207 @@ static AST::AstNode *mkconst_real(double d) node->realvalue = d; return node; } +namespace VERILOG_FRONTEND +{ +using namespace AST; +// divide an arbitrary length decimal number by two and return the rest +static int my_decimal_div_by_two(std::vector &digits) +{ + int carry = 0; + for (size_t i = 0; i < digits.size(); i++) { + if (digits[i] >= 10) + log_file_error(current_filename, get_line_num(), "Invalid use of [a-fxz?] in decimal constant.\n"); + digits[i] += carry * 10; + carry = digits[i] % 2; + digits[i] /= 2; + } + while (!digits.empty() && !digits.front()) + digits.erase(digits.begin()); + return carry; +} + +// find the number of significant bits in a binary number (not including the sign bit) +static int my_ilog2(int x) +{ + int ret = 0; + while (x != 0 && x != -1) { + x = x >> 1; + ret++; + } + return ret; +} + +// parse a binary, decimal, hexadecimal or octal number with support for special bits ('x', 'z' and '?') +static void my_strtobin(std::vector &data, const char *str, int len_in_bits, int base, char case_type, bool is_unsized) +{ + // all digits in string (MSB at index 0) + std::vector digits; + + while (*str) { + if ('0' <= *str && *str <= '9') + digits.push_back(*str - '0'); + else if ('a' <= *str && *str <= 'f') + digits.push_back(10 + *str - 'a'); + else if ('A' <= *str && *str <= 'F') + digits.push_back(10 + *str - 'A'); + else if (*str == 'x' || *str == 'X') + digits.push_back(0xf0); + else if (*str == 'z' || *str == 'Z' || *str == '?') + digits.push_back(0xf1); + str++; + } + + if (base == 10 && GetSize(digits) == 1 && digits.front() >= 0xf0) + base = 2; + + data.clear(); + + if (base == 10) { + while (!digits.empty()) + data.push_back(my_decimal_div_by_two(digits) ? State::S1 : State::S0); + } else { + int bits_per_digit = my_ilog2(base - 1); + for (auto it = digits.rbegin(), e = digits.rend(); it != e; it++) { + if (*it > (base - 1) && *it < 0xf0) + log_file_error(current_filename, get_line_num(), "Digit larger than %d used in in base-%d constant.\n", base - 1, base); + for (int i = 0; i < bits_per_digit; i++) { + int bitmask = 1 << i; + if (*it == 0xf0) + data.push_back(case_type == 'x' ? RTLIL::Sa : RTLIL::Sx); + else if (*it == 0xf1) + data.push_back(case_type == 'x' || case_type == 'z' ? RTLIL::Sa : RTLIL::Sz); + else + data.push_back((*it & bitmask) ? State::S1 : State::S0); + } + } + } + + int len = GetSize(data); + RTLIL::State msb = data.empty() ? State::S0 : data.back(); + + if (len_in_bits < 0) { + if (len < 32) + data.resize(32, msb == State::S0 || msb == State::S1 ? RTLIL::S0 : msb); + return; + } + + if (is_unsized && (len > len_in_bits)) + log_file_error(current_filename, get_line_num(), "Unsized constant must have width of 1 bit, but have %d bits!\n", len); + + for (len = len - 1; len >= 0; len--) + if (data[len] == State::S1) + break; + if (msb == State::S0 || msb == State::S1) { + len += 1; + data.resize(len_in_bits, State::S0); + } else { + len += 2; + data.resize(len_in_bits, msb); + } + + if (len_in_bits == 0) + log_file_error(current_filename, get_line_num(), "Illegal integer constant size of zero (IEEE 1800-2012, 5.7).\n"); + + if (len > len_in_bits) + log_warning("Literal has a width of %d bit, but value requires %d bit. (%s:%d)\n", len_in_bits, len, current_filename.c_str(), + get_line_num()); +} + +// convert the Verilog code for a constant to an AST node +AST::AstNode *const2ast(std::string code, char case_type, bool warn_z) +{ + if (warn_z) { + AST::AstNode *ret = const2ast(code, case_type, false); + if (ret != nullptr && std::find(ret->bits.begin(), ret->bits.end(), RTLIL::State::Sz) != ret->bits.end()) + log_warning("Yosys has only limited support for tri-state logic at the moment. (%s:%d)\n", current_filename.c_str(), get_line_num()); + return ret; + } + + const char *str = code.c_str(); + + // Strings + if (*str == '"') { + int len = strlen(str) - 2; + std::vector data; + data.reserve(len * 8); + for (int i = 0; i < len; i++) { + unsigned char ch = str[len - i]; + for (int j = 0; j < 8; j++) { + data.push_back((ch & 1) ? State::S1 : State::S0); + ch = ch >> 1; + } + } + AST::AstNode *ast = AST::AstNode::mkconst_bits(data, false); + ast->str = code; + return ast; + } + + for (size_t i = 0; i < code.size(); i++) + if (code[i] == '_' || code[i] == ' ' || code[i] == '\t' || code[i] == '\r' || code[i] == '\n') + code.erase(code.begin() + (i--)); + str = code.c_str(); + + char *endptr; + long len_in_bits = strtol(str, &endptr, 10); + + // Simple base-10 integer + if (*endptr == 0) { + std::vector data; + my_strtobin(data, str, -1, 10, case_type, false); + if (data.back() == State::S1) + data.push_back(State::S0); + return AST::AstNode::mkconst_bits(data, true); + } + + // unsized constant + if (str == endptr) + len_in_bits = -1; + + // The "'[sS]?[bodhBODH]" syntax + if (*endptr == '\'') { + std::vector data; + bool is_signed = false; + bool is_unsized = len_in_bits < 0; + if (*(endptr + 1) == 's' || *(endptr + 1) == 'S') { + is_signed = true; + endptr++; + } + switch (*(endptr + 1)) { + case 'b': + case 'B': + my_strtobin(data, endptr + 2, len_in_bits, 2, case_type, is_unsized); + break; + case 'o': + case 'O': + my_strtobin(data, endptr + 2, len_in_bits, 8, case_type, is_unsized); + break; + case 'd': + case 'D': + my_strtobin(data, endptr + 2, len_in_bits, 10, case_type, is_unsized); + break; + case 'h': + case 'H': + my_strtobin(data, endptr + 2, len_in_bits, 16, case_type, is_unsized); + break; + default: + char next_char = char(tolower(*(endptr + 1))); + if (next_char == '0' || next_char == '1' || next_char == 'x' || next_char == 'z') { + is_unsized = true; + my_strtobin(data, endptr + 1, 1, 2, case_type, is_unsized); + } else { + return NULL; + } + } + if (len_in_bits < 0) { + if (is_signed && data.back() == State::S1) + data.push_back(State::S0); + } + return AST::AstNode::mkconst_bits(data, is_signed, is_unsized); + } + + return NULL; +} +} // namespace VERILOG_FRONTEND #else #define mkconst_real(x) AST::AstNode::mkconst_real(x) #endif From 01e2c1ee83f5fc959c50f07a8bfc773331d21d16 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 14 Oct 2021 13:07:27 +0200 Subject: [PATCH 453/845] Change BUILD_ANTMICRO to BUILD_UPSTREAM, split functions with define to different file Signed-off-by: Kamil Rakoczy --- .github/workflows/ci.yml | 12 +- .github/workflows/setup.sh | 2 +- uhdm-plugin/Makefile | 4 +- uhdm-plugin/UhdmAst.cc | 621 +-------------------------------- uhdm-plugin/UhdmAstAntmicro.cc | 354 +++++++++++++++++++ uhdm-plugin/UhdmAstUpstream.cc | 542 ++++++++++++++++++++++++++++ 6 files changed, 914 insertions(+), 621 deletions(-) create mode 100644 uhdm-plugin/UhdmAstAntmicro.cc create mode 100644 uhdm-plugin/UhdmAstUpstream.cc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ae20b5f3..0c73f10ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,10 @@ jobs: fail-fast: false matrix: include: - - {BUILD_ANTMICRO: "0"} - - {BUILD_ANTMICRO: "1"} + - {BUILD_UPSTREAM: "0"} + - {BUILD_UPSTREAM: "1"} + + name: "BUILD_UPSTREAM=${{matrix.BUILD_UPSTREAM}}" steps: @@ -55,12 +57,12 @@ jobs: source .github/workflows/setup.sh env: OS: ${{ runner.os }} - BUILD_ANTMICRO: ${{ matrix.BUILD_ANTMICRO }} + BUILD_UPSTREAM: ${{ matrix.BUILD_UPSTREAM }} - name: Build and test plugins run: | - if [ "$BUILD_ANTMICRO" = "0" ]; then source env/conda/bin/activate yosys-plugins; fi + if [ "$BUILD_UPSTREAM" = "1" ]; then source env/conda/bin/activate yosys-plugins; fi source .github/workflows/build-and-test.sh env: OS: ${{ runner.os }} - BUILD_ANTMICRO: ${{ matrix.BUILD_ANTMICRO }} + BUILD_UPSTREAM: ${{ matrix.BUILD_UPSTREAM }} diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index 86379ba34..b007a8cfa 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -42,7 +42,7 @@ start_section Install-Yosys echo '==========================' echo 'Making env with yosys and Surelog' echo '==========================' - if [ "$BUILD_ANTMICRO" = "1" ] + if [ "$BUILD_UPSTREAM" = "0" ] then mkdir -p ~/.local-src mkdir -p ~/.local-bin diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 20269d40c..cf878756b 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -17,8 +17,8 @@ include ../Makefile_plugin.common CPPFLAGS += -std=c++17 -I${UHDM_INSTALL_DIR}/include \ -I${UHDM_INSTALL_DIR}/include/surelog -ifeq ($(BUILD_ANTMICRO), 1) -CXXFLAGS += -DBUILD_ANTMICRO=1 +ifeq ($(BUILD_UPSTREAM), 1) +CXXFLAGS += -DBUILD_UPSTREAM=1 endif CXXFLAGS += -Wno-unused-parameter diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index f58a2a596..4dc8787d1 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -12,232 +12,12 @@ #include #include -#ifdef BUILD_ANTMICRO +#ifndef BUILD_UPSTREAM #include "frontends/verilog/verilog_frontend.h" #endif YOSYS_NAMESPACE_BEGIN -#ifndef BUILD_ANTMICRO -namespace RTLIL -{ -namespace ID -{ -IdString partial; -} -} // namespace RTLIL - -static AST::AstNode *mkconst_real(double d) -{ - AST::AstNode *node = new AST::AstNode(AST::AST_REALVALUE); - node->realvalue = d; - return node; -} -namespace VERILOG_FRONTEND -{ -using namespace AST; -// divide an arbitrary length decimal number by two and return the rest -static int my_decimal_div_by_two(std::vector &digits) -{ - int carry = 0; - for (size_t i = 0; i < digits.size(); i++) { - if (digits[i] >= 10) - log_file_error(current_filename, get_line_num(), "Invalid use of [a-fxz?] in decimal constant.\n"); - digits[i] += carry * 10; - carry = digits[i] % 2; - digits[i] /= 2; - } - while (!digits.empty() && !digits.front()) - digits.erase(digits.begin()); - return carry; -} - -// find the number of significant bits in a binary number (not including the sign bit) -static int my_ilog2(int x) -{ - int ret = 0; - while (x != 0 && x != -1) { - x = x >> 1; - ret++; - } - return ret; -} - -// parse a binary, decimal, hexadecimal or octal number with support for special bits ('x', 'z' and '?') -static void my_strtobin(std::vector &data, const char *str, int len_in_bits, int base, char case_type, bool is_unsized) -{ - // all digits in string (MSB at index 0) - std::vector digits; - - while (*str) { - if ('0' <= *str && *str <= '9') - digits.push_back(*str - '0'); - else if ('a' <= *str && *str <= 'f') - digits.push_back(10 + *str - 'a'); - else if ('A' <= *str && *str <= 'F') - digits.push_back(10 + *str - 'A'); - else if (*str == 'x' || *str == 'X') - digits.push_back(0xf0); - else if (*str == 'z' || *str == 'Z' || *str == '?') - digits.push_back(0xf1); - str++; - } - - if (base == 10 && GetSize(digits) == 1 && digits.front() >= 0xf0) - base = 2; - - data.clear(); - - if (base == 10) { - while (!digits.empty()) - data.push_back(my_decimal_div_by_two(digits) ? State::S1 : State::S0); - } else { - int bits_per_digit = my_ilog2(base - 1); - for (auto it = digits.rbegin(), e = digits.rend(); it != e; it++) { - if (*it > (base - 1) && *it < 0xf0) - log_file_error(current_filename, get_line_num(), "Digit larger than %d used in in base-%d constant.\n", base - 1, base); - for (int i = 0; i < bits_per_digit; i++) { - int bitmask = 1 << i; - if (*it == 0xf0) - data.push_back(case_type == 'x' ? RTLIL::Sa : RTLIL::Sx); - else if (*it == 0xf1) - data.push_back(case_type == 'x' || case_type == 'z' ? RTLIL::Sa : RTLIL::Sz); - else - data.push_back((*it & bitmask) ? State::S1 : State::S0); - } - } - } - - int len = GetSize(data); - RTLIL::State msb = data.empty() ? State::S0 : data.back(); - - if (len_in_bits < 0) { - if (len < 32) - data.resize(32, msb == State::S0 || msb == State::S1 ? RTLIL::S0 : msb); - return; - } - - if (is_unsized && (len > len_in_bits)) - log_file_error(current_filename, get_line_num(), "Unsized constant must have width of 1 bit, but have %d bits!\n", len); - - for (len = len - 1; len >= 0; len--) - if (data[len] == State::S1) - break; - if (msb == State::S0 || msb == State::S1) { - len += 1; - data.resize(len_in_bits, State::S0); - } else { - len += 2; - data.resize(len_in_bits, msb); - } - - if (len_in_bits == 0) - log_file_error(current_filename, get_line_num(), "Illegal integer constant size of zero (IEEE 1800-2012, 5.7).\n"); - - if (len > len_in_bits) - log_warning("Literal has a width of %d bit, but value requires %d bit. (%s:%d)\n", len_in_bits, len, current_filename.c_str(), - get_line_num()); -} - -// convert the Verilog code for a constant to an AST node -AST::AstNode *const2ast(std::string code, char case_type, bool warn_z) -{ - if (warn_z) { - AST::AstNode *ret = const2ast(code, case_type, false); - if (ret != nullptr && std::find(ret->bits.begin(), ret->bits.end(), RTLIL::State::Sz) != ret->bits.end()) - log_warning("Yosys has only limited support for tri-state logic at the moment. (%s:%d)\n", current_filename.c_str(), get_line_num()); - return ret; - } - - const char *str = code.c_str(); - - // Strings - if (*str == '"') { - int len = strlen(str) - 2; - std::vector data; - data.reserve(len * 8); - for (int i = 0; i < len; i++) { - unsigned char ch = str[len - i]; - for (int j = 0; j < 8; j++) { - data.push_back((ch & 1) ? State::S1 : State::S0); - ch = ch >> 1; - } - } - AST::AstNode *ast = AST::AstNode::mkconst_bits(data, false); - ast->str = code; - return ast; - } - - for (size_t i = 0; i < code.size(); i++) - if (code[i] == '_' || code[i] == ' ' || code[i] == '\t' || code[i] == '\r' || code[i] == '\n') - code.erase(code.begin() + (i--)); - str = code.c_str(); - - char *endptr; - long len_in_bits = strtol(str, &endptr, 10); - - // Simple base-10 integer - if (*endptr == 0) { - std::vector data; - my_strtobin(data, str, -1, 10, case_type, false); - if (data.back() == State::S1) - data.push_back(State::S0); - return AST::AstNode::mkconst_bits(data, true); - } - - // unsized constant - if (str == endptr) - len_in_bits = -1; - - // The "'[sS]?[bodhBODH]" syntax - if (*endptr == '\'') { - std::vector data; - bool is_signed = false; - bool is_unsized = len_in_bits < 0; - if (*(endptr + 1) == 's' || *(endptr + 1) == 'S') { - is_signed = true; - endptr++; - } - switch (*(endptr + 1)) { - case 'b': - case 'B': - my_strtobin(data, endptr + 2, len_in_bits, 2, case_type, is_unsized); - break; - case 'o': - case 'O': - my_strtobin(data, endptr + 2, len_in_bits, 8, case_type, is_unsized); - break; - case 'd': - case 'D': - my_strtobin(data, endptr + 2, len_in_bits, 10, case_type, is_unsized); - break; - case 'h': - case 'H': - my_strtobin(data, endptr + 2, len_in_bits, 16, case_type, is_unsized); - break; - default: - char next_char = char(tolower(*(endptr + 1))); - if (next_char == '0' || next_char == '1' || next_char == 'x' || next_char == 'z') { - is_unsized = true; - my_strtobin(data, endptr + 1, 1, 2, case_type, is_unsized); - } else { - return NULL; - } - } - if (len_in_bits < 0) { - if (is_signed && data.back() == State::S1) - data.push_back(State::S0); - } - return AST::AstNode::mkconst_bits(data, is_signed, is_unsized); - } - - return NULL; -} -} // namespace VERILOG_FRONTEND -#else -#define mkconst_real(x) AST::AstNode::mkconst_real(x) -#endif - static void sanitize_symbol_name(std::string &name) { if (!name.empty()) { @@ -277,6 +57,12 @@ static std::string strip_package_name(std::string name) return name; } +#ifdef BUILD_UPSTREAM +#include "UhdmAstUpstream.cc" +#else +#include "UhdmAstAntmicro.cc" +#endif + void UhdmAst::visit_one_to_many(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f) { for (auto child : child_node_types) { @@ -304,22 +90,6 @@ void UhdmAst::visit_one_to_one(const std::vector child_node_types, vpiHandl } } -void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) -{ - std::vector range_nodes; - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); -#ifdef BUILD_ANTMICRO - multirange_node->is_packed = true; -#endif - multirange_node->children = range_nodes; - f(multirange_node); - } else if (!range_nodes.empty()) { - f(range_nodes[0]); - } -} - void UhdmAst::visit_default_expr(vpiHandle obj_h) { UhdmAst initial_ast(parent, shared, indent); @@ -474,7 +244,7 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) if (child->children.size() > 1 && child->type == AST::AST_WIRE && child->children[0]->type == AST::AST_RANGE && child->children[1]->type == AST::AST_RANGE) { auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); -#ifdef BUILD_ANTMICRO +#ifndef BUILD_UPSTREAM multirange_node->is_packed = true; #endif for (auto *c : child->children) { @@ -653,209 +423,6 @@ void UhdmAst::process_design() } } -void UhdmAst::process_parameter() -{ - auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; - current_node = make_ast_node(type, {}, true); - // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused - std::vector range_nodes; - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) - range_nodes.push_back(node); - }); - vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); - if (typespec_h) { - int typespec_type = vpi_get(vpiType, typespec_h); - switch (typespec_type) { - case vpiBitTypespec: - case vpiLogicTypespec: { - current_node->is_logic = true; - visit_range(typespec_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); - shared.report.mark_handled(typespec_h); - break; - } - case vpiEnumTypespec: - case vpiRealTypespec: - case vpiIntTypespec: { - shared.report.mark_handled(typespec_h); - break; - } - case vpiStructTypespec: { - visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type = true; - auto it = shared.param_types.find(current_node->str); - if (it == shared.param_types.end()) - shared.param_types.insert(std::make_pair(current_node->str, node)); - }); - break; - } - case vpiArrayTypespec: { - shared.report.mark_handled(typespec_h); - visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { - if (node) { - range_nodes.push_back(node->children[0]); - } - }); - - break; - } - default: { - const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; - const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; - report_error("%s:%d: Encountered unhandled typespec in process_parameter: '%s' of type '%s'\n", object->VpiFile().c_str(), - object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); - break; - } - } - vpi_release_handle(typespec_h); - } else { - AST::AstNode *constant_node = process_value(obj_h); - if (constant_node) { - constant_node->filename = current_node->filename; - constant_node->location = current_node->location; - current_node->children.push_back(constant_node); - } - } - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); -#ifdef BUILD_ANTMICRO - multirange_node->is_packed = true; -#endif - multirange_node->children = range_nodes; - current_node->children.push_back(multirange_node); - } else if (range_nodes.size() == 1) { - current_node->children.push_back(range_nodes[0]); - } -} - -void UhdmAst::process_port() -{ - current_node = make_ast_node(AST::AST_WIRE); - current_node->port_id = shared.next_port_id(); - vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); - if (lowConn_h) { - vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); - auto actual_type = vpi_get(vpiType, actual_h); - switch (actual_type) { - case vpiModport: { - vpiHandle iface_h = vpi_handle(vpiInterface, actual_h); - if (iface_h) { - std::string cellName, ifaceName; - if (auto s = vpi_get_str(vpiName, actual_h)) { - cellName = s; - sanitize_symbol_name(cellName); - } - if (auto s = vpi_get_str(vpiDefName, iface_h)) { - ifaceName = s; - sanitize_symbol_name(ifaceName); - } - current_node->type = AST::AST_INTERFACEPORT; - auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); - // Skip '\' in cellName - typeNode->str = ifaceName + '.' + cellName.substr(1, cellName.length()); - current_node->children.push_back(typeNode); - shared.report.mark_handled(actual_h); - shared.report.mark_handled(iface_h); - vpi_release_handle(iface_h); - } - break; - } - case vpiInterface: { - auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); - if (auto s = vpi_get_str(vpiDefName, actual_h)) { - typeNode->str = s; - sanitize_symbol_name(typeNode->str); - } - current_node->type = AST::AST_INTERFACEPORT; - current_node->children.push_back(typeNode); - shared.report.mark_handled(actual_h); - break; - } - case vpiLogicVar: - case vpiLogicNet: { - current_node->is_logic = true; - current_node->is_signed = vpi_get(vpiSigned, actual_h); - visit_range(actual_h, [&](AST::AstNode *node) { -#ifdef BUILD_ANTMICRO - if (node->type == AST::AST_MULTIRANGE) - node->is_packed = true; -#endif - current_node->children.push_back(node); - }); - shared.report.mark_handled(actual_h); - break; - } - case vpiPackedArrayVar: - visit_one_to_many({vpiElement}, actual_h, [&](AST::AstNode *node) { - if (node && GetSize(node->children) == 1) { - current_node->children.push_back(node->children[0]); - if (node->children[0]->type == AST::AST_WIRETYPE) { - current_node->is_custom_type = true; - } - } - }); - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - case vpiPackedArrayNet: - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - case vpiArrayVar: - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - case vpiEnumNet: - case vpiStructNet: - case vpiArrayNet: - case vpiStructVar: - case vpiEnumVar: - case vpiIntVar: - break; - default: { - const uhdm_handle *const handle = (const uhdm_handle *)actual_h; - const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; - report_error("%s:%d: Encountered unhandled type in process_port: %s\n", object->VpiFile().c_str(), object->VpiLineNo(), - UHDM::VpiTypeName(actual_h).c_str()); - break; - } - } - shared.report.mark_handled(lowConn_h); - vpi_release_handle(actual_h); - vpi_release_handle(lowConn_h); - } - visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { - if (node) { - if (!current_node->children.empty() && current_node->children[0]->type != AST::AST_WIRETYPE) { - if (!node->str.empty()) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type = true; - } else { - // anonymous typedef, just move children - current_node->children = std::move(node->children); - } - } - delete node; - } - }); - if (const int n = vpi_get(vpiDirection, obj_h)) { - if (n == vpiInput) { - current_node->is_input = true; - } else if (n == vpiOutput) { - current_node->is_output = true; - } else if (n == vpiInout) { - current_node->is_input = true; - current_node->is_output = true; - } - } -} - void UhdmAst::process_module() { std::string type = vpi_get_str(vpiDefName, obj_h); @@ -1360,33 +927,6 @@ void UhdmAst::process_assignment() } } -void UhdmAst::process_net() -{ - current_node = make_ast_node(AST::AST_WIRE); - auto net_type = vpi_get(vpiNetType, obj_h); - current_node->is_reg = net_type == vpiReg; - current_node->is_output = net_type == vpiOutput; - current_node->is_logic = !current_node->is_reg; - current_node->is_signed = vpi_get(vpiSigned, obj_h); - visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - if (node) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type = true; - } - }); - visit_range(obj_h, [&](AST::AstNode *node) { - current_node->children.push_back(node); -#ifdef BUILD_ANTMICRO - if (node->type == AST::AST_MULTIRANGE) { - node->is_packed = true; - } -#endif - }); -} - void UhdmAst::process_packed_array_net() { current_node = make_ast_node(AST::AST_WIRE); @@ -2044,44 +1584,6 @@ void UhdmAst::process_assignment_pattern_op() } } -void UhdmAst::process_tagged_pattern() -{ - auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); - auto assign_type = AST::AST_ASSIGN; - AST::AstNode *lhs_node = nullptr; - if (assign_node) { - assign_type = assign_node->type; - lhs_node = assign_node->children[0]; - } else { - lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); - lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; - } - current_node = new AST::AstNode(assign_type); - current_node->children.push_back(lhs_node->clone()); - auto typespec_h = vpi_handle(vpiTypespec, obj_h); - if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { - std::string field_name = vpi_get_str(vpiName, typespec_h); - if (field_name != "default") { // TODO: better support of the default keyword -#ifdef BUILD_ANTMICRO - auto field = new AST::AstNode(AST::AST_DOT); - field->str = field_name; - current_node->children[0]->children.push_back(field); -#else - current_node->children[0]->str += '.' + field_name; -#endif - } - } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { - s_vpi_value val; - vpi_get_value(typespec_h, &val); - auto range = new AST::AstNode(AST::AST_RANGE); - auto index = AST::AstNode::mkconst_int(val.value.integer, false); - range->children.push_back(index); - current_node->children[0]->children.push_back(range); - } - vpi_release_handle(typespec_h); - visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -} - void UhdmAst::process_bit_select() { current_node = make_ast_node(AST::AST_IDENTIFIER); @@ -2134,35 +1636,6 @@ void UhdmAst::process_indexed_part_select() current_node->children.push_back(range_node); } -void UhdmAst::process_var_select() -{ - current_node = make_ast_node(AST::AST_IDENTIFIER); - visit_one_to_many({vpiIndex}, obj_h, [&](AST::AstNode *node) { - if (node->str == current_node->str) { - for (auto child : node->children) { - current_node->children.push_back(child); - } - node->children.clear(); - delete node; - } else { - auto range_node = new AST::AstNode(AST::AST_RANGE); - range_node->filename = current_node->filename; - range_node->location = current_node->location; - range_node->children.push_back(node); - current_node->children.push_back(range_node); - } - }); - if (current_node->children.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); -#ifdef BUILD_ANTMICRO - multirange_node->is_packed = true; -#endif - multirange_node->children = current_node->children; - current_node->children.clear(); - current_node->children.push_back(multirange_node); - } -} - void UhdmAst::process_if_else() { current_node = make_ast_node(AST::AST_CASE); @@ -2238,40 +1711,6 @@ void UhdmAst::process_for() }); } -void UhdmAst::process_gen_scope_array() -{ - current_node = make_ast_node(AST::AST_GENBLOCK); - visit_one_to_many({vpiGenScope}, obj_h, [&](AST::AstNode *genscope_node) { - for (auto *child : genscope_node->children) { - if (child->type == AST::AST_PARAMETER || child->type == AST::AST_LOCALPARAM) { - auto param_str = child->str.substr(1); - auto array_str = "[" + param_str + "]"; -#ifdef BUILD_ANTMICRO - genscope_node->visitEachDescendant([&](AST::AstNode *node) { - auto pos = node->str.find(array_str); - if (pos != std::string::npos) { - node->type = AST::AST_PREFIX; - auto *param = new AST::AstNode(AST::AST_IDENTIFIER); - param->str = child->str; - node->children.push_back(param); - auto bracket = node->str.rfind(']'); - if (bracket + 2 <= node->str.size()) { - auto *field = new AST::AstNode(AST::AST_IDENTIFIER); - field->str = "\\" + node->str.substr(bracket + 2); - node->children.push_back(field); - } - node->str = node->str.substr(0, node->str.find('[')); - } - }); -#endif - } - } - current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); - genscope_node->children.clear(); - delete genscope_node; - }); -} - void UhdmAst::process_gen_scope() { current_node = make_ast_node(AST::AST_GENBLOCK); @@ -2428,50 +1867,6 @@ void UhdmAst::process_immediate_assert() }); } -void UhdmAst::process_hier_path() -{ - current_node = make_ast_node(AST::AST_IDENTIFIER); - current_node->str = "\\"; - AST::AstNode *top_node = nullptr; -#ifdef BUILD_ANTMICRO - visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { - if (node->str.find('[') != std::string::npos) - node->str = node->str.substr(0, node->str.find('[')); - // for first node, just set correct string and move any children - if (!top_node) { - current_node->str += node->str.substr(1); - current_node->children = std::move(node->children); - top_node = current_node; - delete node; - } else { // for other nodes, change type to AST_DOT - node->type = AST::AST_DOT; - top_node->children.push_back(node); - top_node = node; - } - }); -#else - visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { - if (current_node->str == "\\" && !node->children.empty() && node->children[0]->type == AST::AST_RANGE) { - current_node->type = AST::AST_PREFIX; - current_node->str = node->str; - current_node->children.push_back(node->children[0]->children[0]->clone()); - delete node; - } else { - if (current_node->type == AST::AST_IDENTIFIER) { - if (current_node->str != "\\") { - current_node->str += "."; - } - current_node->str += node->str.substr(1); - current_node->children = std::move(node->children); - delete node; - } else { - current_node->children.push_back(node); - } - } - }); -#endif -} - void UhdmAst::process_nonsynthesizable(const UHDM::BaseClass *object) { log_warning("%s:%d: Non-synthesizable object of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), UHDM::VpiTypeName(obj_h).c_str()); diff --git a/uhdm-plugin/UhdmAstAntmicro.cc b/uhdm-plugin/UhdmAstAntmicro.cc new file mode 100644 index 000000000..b89997dd2 --- /dev/null +++ b/uhdm-plugin/UhdmAstAntmicro.cc @@ -0,0 +1,354 @@ +#define mkconst_real(x) AST::AstNode::mkconst_real(x) + +void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) +{ + std::vector range_nodes; + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = range_nodes; + f(multirange_node); + } else if (!range_nodes.empty()) { + f(range_nodes[0]); + } +} + +void UhdmAst::process_parameter() +{ + auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; + current_node = make_ast_node(type, {}, true); + // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused + std::vector range_nodes; + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) + range_nodes.push_back(node); + }); + vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); + if (typespec_h) { + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiBitTypespec: + case vpiLogicTypespec: { + current_node->is_logic = true; + visit_range(typespec_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); + shared.report.mark_handled(typespec_h); + break; + } + case vpiEnumTypespec: + case vpiRealTypespec: + case vpiIntTypespec: { + shared.report.mark_handled(typespec_h); + break; + } + case vpiStructTypespec: { + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + auto it = shared.param_types.find(current_node->str); + if (it == shared.param_types.end()) + shared.param_types.insert(std::make_pair(current_node->str, node)); + }); + break; + } + case vpiArrayTypespec: { + shared.report.mark_handled(typespec_h); + visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { + if (node) { + range_nodes.push_back(node->children[0]); + } + }); + + break; + } + default: { + const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled typespec in process_parameter: '%s' of type '%s'\n", object->VpiFile().c_str(), + object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); + break; + } + } + vpi_release_handle(typespec_h); + } else { + AST::AstNode *constant_node = process_value(obj_h); + if (constant_node) { + constant_node->filename = current_node->filename; + constant_node->location = current_node->location; + current_node->children.push_back(constant_node); + } + } + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = range_nodes; + current_node->children.push_back(multirange_node); + } else if (range_nodes.size() == 1) { + current_node->children.push_back(range_nodes[0]); + } +} + +void UhdmAst::process_port() +{ + current_node = make_ast_node(AST::AST_WIRE); + current_node->port_id = shared.next_port_id(); + vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); + if (lowConn_h) { + vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); + auto actual_type = vpi_get(vpiType, actual_h); + switch (actual_type) { + case vpiModport: { + vpiHandle iface_h = vpi_handle(vpiInterface, actual_h); + if (iface_h) { + std::string cellName, ifaceName; + if (auto s = vpi_get_str(vpiName, actual_h)) { + cellName = s; + sanitize_symbol_name(cellName); + } + if (auto s = vpi_get_str(vpiDefName, iface_h)) { + ifaceName = s; + sanitize_symbol_name(ifaceName); + } + current_node->type = AST::AST_INTERFACEPORT; + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + // Skip '\' in cellName + typeNode->str = ifaceName + '.' + cellName.substr(1, cellName.length()); + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + shared.report.mark_handled(iface_h); + vpi_release_handle(iface_h); + } + break; + } + case vpiInterface: { + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + if (auto s = vpi_get_str(vpiDefName, actual_h)) { + typeNode->str = s; + sanitize_symbol_name(typeNode->str); + } + current_node->type = AST::AST_INTERFACEPORT; + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + break; + } + case vpiLogicVar: + case vpiLogicNet: { + current_node->is_logic = true; + current_node->is_signed = vpi_get(vpiSigned, actual_h); + visit_range(actual_h, [&](AST::AstNode *node) { + if (node->type == AST::AST_MULTIRANGE) + node->is_packed = true; + current_node->children.push_back(node); + }); + shared.report.mark_handled(actual_h); + break; + } + case vpiPackedArrayVar: + visit_one_to_many({vpiElement}, actual_h, [&](AST::AstNode *node) { + if (node && GetSize(node->children) == 1) { + current_node->children.push_back(node->children[0]); + if (node->children[0]->type == AST::AST_WIRETYPE) { + current_node->is_custom_type = true; + } + } + }); + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiPackedArrayNet: + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiArrayVar: + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiEnumNet: + case vpiStructNet: + case vpiArrayNet: + case vpiStructVar: + case vpiEnumVar: + case vpiIntVar: + break; + default: { + const uhdm_handle *const handle = (const uhdm_handle *)actual_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled type in process_port: %s\n", object->VpiFile().c_str(), object->VpiLineNo(), + UHDM::VpiTypeName(actual_h).c_str()); + break; + } + } + shared.report.mark_handled(lowConn_h); + vpi_release_handle(actual_h); + vpi_release_handle(lowConn_h); + } + visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (!current_node->children.empty() && current_node->children[0]->type != AST::AST_WIRETYPE) { + if (!node->str.empty()) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } else { + // anonymous typedef, just move children + current_node->children = std::move(node->children); + } + } + delete node; + } + }); + if (const int n = vpi_get(vpiDirection, obj_h)) { + if (n == vpiInput) { + current_node->is_input = true; + } else if (n == vpiOutput) { + current_node->is_output = true; + } else if (n == vpiInout) { + current_node->is_input = true; + current_node->is_output = true; + } + } +} + +void UhdmAst::process_net() +{ + current_node = make_ast_node(AST::AST_WIRE); + auto net_type = vpi_get(vpiNetType, obj_h); + current_node->is_reg = net_type == vpiReg; + current_node->is_output = net_type == vpiOutput; + current_node->is_logic = !current_node->is_reg; + current_node->is_signed = vpi_get(vpiSigned, obj_h); + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } + }); + visit_range(obj_h, [&](AST::AstNode *node) { + current_node->children.push_back(node); + if (node->type == AST::AST_MULTIRANGE) { + node->is_packed = true; + } + }); +} + +void UhdmAst::process_tagged_pattern() +{ + auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); + auto assign_type = AST::AST_ASSIGN; + AST::AstNode *lhs_node = nullptr; + if (assign_node) { + assign_type = assign_node->type; + lhs_node = assign_node->children[0]; + } else { + lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); + lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; + } + current_node = new AST::AstNode(assign_type); + current_node->children.push_back(lhs_node->clone()); + auto typespec_h = vpi_handle(vpiTypespec, obj_h); + if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { + std::string field_name = vpi_get_str(vpiName, typespec_h); + if (field_name != "default") { // TODO: better support of the default keyword + auto field = new AST::AstNode(AST::AST_DOT); + field->str = field_name; + current_node->children[0]->children.push_back(field); + } + } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { + s_vpi_value val; + vpi_get_value(typespec_h, &val); + auto range = new AST::AstNode(AST::AST_RANGE); + auto index = AST::AstNode::mkconst_int(val.value.integer, false); + range->children.push_back(index); + current_node->children[0]->children.push_back(range); + } + vpi_release_handle(typespec_h); + visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_var_select() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_one_to_many({vpiIndex}, obj_h, [&](AST::AstNode *node) { + if (node->str == current_node->str) { + for (auto child : node->children) { + current_node->children.push_back(child); + } + node->children.clear(); + delete node; + } else { + auto range_node = new AST::AstNode(AST::AST_RANGE); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + range_node->children.push_back(node); + current_node->children.push_back(range_node); + } + }); + if (current_node->children.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = current_node->children; + current_node->children.clear(); + current_node->children.push_back(multirange_node); + } +} + +void UhdmAst::process_gen_scope_array() +{ + current_node = make_ast_node(AST::AST_GENBLOCK); + visit_one_to_many({vpiGenScope}, obj_h, [&](AST::AstNode *genscope_node) { + for (auto *child : genscope_node->children) { + if (child->type == AST::AST_PARAMETER || child->type == AST::AST_LOCALPARAM) { + auto param_str = child->str.substr(1); + auto array_str = "[" + param_str + "]"; + genscope_node->visitEachDescendant([&](AST::AstNode *node) { + auto pos = node->str.find(array_str); + if (pos != std::string::npos) { + node->type = AST::AST_PREFIX; + auto *param = new AST::AstNode(AST::AST_IDENTIFIER); + param->str = child->str; + node->children.push_back(param); + auto bracket = node->str.rfind(']'); + if (bracket + 2 <= node->str.size()) { + auto *field = new AST::AstNode(AST::AST_IDENTIFIER); + field->str = "\\" + node->str.substr(bracket + 2); + node->children.push_back(field); + } + node->str = node->str.substr(0, node->str.find('[')); + } + }); + } + } + current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); + genscope_node->children.clear(); + delete genscope_node; + }); +} + +void UhdmAst::process_hier_path() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + current_node->str = "\\"; + AST::AstNode *top_node = nullptr; + visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { + if (node->str.find('[') != std::string::npos) + node->str = node->str.substr(0, node->str.find('[')); + // for first node, just set correct string and move any children + if (!top_node) { + current_node->str += node->str.substr(1); + current_node->children = std::move(node->children); + top_node = current_node; + delete node; + } else { // for other nodes, change type to AST_DOT + node->type = AST::AST_DOT; + top_node->children.push_back(node); + top_node = node; + } + }); +} diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc new file mode 100644 index 000000000..96f3588db --- /dev/null +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -0,0 +1,542 @@ +namespace RTLIL +{ +namespace ID +{ +IdString partial; +} +} // namespace RTLIL + +static AST::AstNode *mkconst_real(double d) +{ + AST::AstNode *node = new AST::AstNode(AST::AST_REALVALUE); + node->realvalue = d; + return node; +} +namespace VERILOG_FRONTEND +{ +using namespace AST; +// divide an arbitrary length decimal number by two and return the rest +static int my_decimal_div_by_two(std::vector &digits) +{ + int carry = 0; + for (size_t i = 0; i < digits.size(); i++) { + if (digits[i] >= 10) + log_file_error(current_filename, get_line_num(), "Invalid use of [a-fxz?] in decimal constant.\n"); + digits[i] += carry * 10; + carry = digits[i] % 2; + digits[i] /= 2; + } + while (!digits.empty() && !digits.front()) + digits.erase(digits.begin()); + return carry; +} + +// find the number of significant bits in a binary number (not including the sign bit) +static int my_ilog2(int x) +{ + int ret = 0; + while (x != 0 && x != -1) { + x = x >> 1; + ret++; + } + return ret; +} + +// parse a binary, decimal, hexadecimal or octal number with support for special bits ('x', 'z' and '?') +static void my_strtobin(std::vector &data, const char *str, int len_in_bits, int base, char case_type, bool is_unsized) +{ + // all digits in string (MSB at index 0) + std::vector digits; + + while (*str) { + if ('0' <= *str && *str <= '9') + digits.push_back(*str - '0'); + else if ('a' <= *str && *str <= 'f') + digits.push_back(10 + *str - 'a'); + else if ('A' <= *str && *str <= 'F') + digits.push_back(10 + *str - 'A'); + else if (*str == 'x' || *str == 'X') + digits.push_back(0xf0); + else if (*str == 'z' || *str == 'Z' || *str == '?') + digits.push_back(0xf1); + str++; + } + + if (base == 10 && GetSize(digits) == 1 && digits.front() >= 0xf0) + base = 2; + + data.clear(); + + if (base == 10) { + while (!digits.empty()) + data.push_back(my_decimal_div_by_two(digits) ? State::S1 : State::S0); + } else { + int bits_per_digit = my_ilog2(base - 1); + for (auto it = digits.rbegin(), e = digits.rend(); it != e; it++) { + if (*it > (base - 1) && *it < 0xf0) + log_file_error(current_filename, get_line_num(), "Digit larger than %d used in in base-%d constant.\n", base - 1, base); + for (int i = 0; i < bits_per_digit; i++) { + int bitmask = 1 << i; + if (*it == 0xf0) + data.push_back(case_type == 'x' ? RTLIL::Sa : RTLIL::Sx); + else if (*it == 0xf1) + data.push_back(case_type == 'x' || case_type == 'z' ? RTLIL::Sa : RTLIL::Sz); + else + data.push_back((*it & bitmask) ? State::S1 : State::S0); + } + } + } + + int len = GetSize(data); + RTLIL::State msb = data.empty() ? State::S0 : data.back(); + + if (len_in_bits < 0) { + if (len < 32) + data.resize(32, msb == State::S0 || msb == State::S1 ? RTLIL::S0 : msb); + return; + } + + if (is_unsized && (len > len_in_bits)) + log_file_error(current_filename, get_line_num(), "Unsized constant must have width of 1 bit, but have %d bits!\n", len); + + for (len = len - 1; len >= 0; len--) + if (data[len] == State::S1) + break; + if (msb == State::S0 || msb == State::S1) { + len += 1; + data.resize(len_in_bits, State::S0); + } else { + len += 2; + data.resize(len_in_bits, msb); + } + + if (len_in_bits == 0) + log_file_error(current_filename, get_line_num(), "Illegal integer constant size of zero (IEEE 1800-2012, 5.7).\n"); + + if (len > len_in_bits) + log_warning("Literal has a width of %d bit, but value requires %d bit. (%s:%d)\n", len_in_bits, len, current_filename.c_str(), + get_line_num()); +} + +// convert the Verilog code for a constant to an AST node +AST::AstNode *const2ast(std::string code, char case_type, bool warn_z) +{ + if (warn_z) { + AST::AstNode *ret = const2ast(code, case_type, false); + if (ret != nullptr && std::find(ret->bits.begin(), ret->bits.end(), RTLIL::State::Sz) != ret->bits.end()) + log_warning("Yosys has only limited support for tri-state logic at the moment. (%s:%d)\n", current_filename.c_str(), get_line_num()); + return ret; + } + + const char *str = code.c_str(); + + // Strings + if (*str == '"') { + int len = strlen(str) - 2; + std::vector data; + data.reserve(len * 8); + for (int i = 0; i < len; i++) { + unsigned char ch = str[len - i]; + for (int j = 0; j < 8; j++) { + data.push_back((ch & 1) ? State::S1 : State::S0); + ch = ch >> 1; + } + } + AST::AstNode *ast = AST::AstNode::mkconst_bits(data, false); + ast->str = code; + return ast; + } + + for (size_t i = 0; i < code.size(); i++) + if (code[i] == '_' || code[i] == ' ' || code[i] == '\t' || code[i] == '\r' || code[i] == '\n') + code.erase(code.begin() + (i--)); + str = code.c_str(); + + char *endptr; + long len_in_bits = strtol(str, &endptr, 10); + + // Simple base-10 integer + if (*endptr == 0) { + std::vector data; + my_strtobin(data, str, -1, 10, case_type, false); + if (data.back() == State::S1) + data.push_back(State::S0); + return AST::AstNode::mkconst_bits(data, true); + } + + // unsized constant + if (str == endptr) + len_in_bits = -1; + + // The "'[sS]?[bodhBODH]" syntax + if (*endptr == '\'') { + std::vector data; + bool is_signed = false; + bool is_unsized = len_in_bits < 0; + if (*(endptr + 1) == 's' || *(endptr + 1) == 'S') { + is_signed = true; + endptr++; + } + switch (*(endptr + 1)) { + case 'b': + case 'B': + my_strtobin(data, endptr + 2, len_in_bits, 2, case_type, is_unsized); + break; + case 'o': + case 'O': + my_strtobin(data, endptr + 2, len_in_bits, 8, case_type, is_unsized); + break; + case 'd': + case 'D': + my_strtobin(data, endptr + 2, len_in_bits, 10, case_type, is_unsized); + break; + case 'h': + case 'H': + my_strtobin(data, endptr + 2, len_in_bits, 16, case_type, is_unsized); + break; + default: + char next_char = char(tolower(*(endptr + 1))); + if (next_char == '0' || next_char == '1' || next_char == 'x' || next_char == 'z') { + is_unsized = true; + my_strtobin(data, endptr + 1, 1, 2, case_type, is_unsized); + } else { + return NULL; + } + } + if (len_in_bits < 0) { + if (is_signed && data.back() == State::S1) + data.push_back(State::S0); + } + return AST::AstNode::mkconst_bits(data, is_signed, is_unsized); + } + + return NULL; +} +} // namespace VERILOG_FRONTEND + +void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) +{ + std::vector range_nodes; + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->children = range_nodes; + f(multirange_node); + } else if (!range_nodes.empty()) { + f(range_nodes[0]); + } +} + +void UhdmAst::process_parameter() +{ + auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; + current_node = make_ast_node(type, {}, true); + // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused + std::vector range_nodes; + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) + range_nodes.push_back(node); + }); + vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); + if (typespec_h) { + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiBitTypespec: + case vpiLogicTypespec: { + current_node->is_logic = true; + visit_range(typespec_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); + shared.report.mark_handled(typespec_h); + break; + } + case vpiEnumTypespec: + case vpiRealTypespec: + case vpiIntTypespec: { + shared.report.mark_handled(typespec_h); + break; + } + case vpiStructTypespec: { + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + auto it = shared.param_types.find(current_node->str); + if (it == shared.param_types.end()) + shared.param_types.insert(std::make_pair(current_node->str, node)); + }); + break; + } + case vpiArrayTypespec: { + shared.report.mark_handled(typespec_h); + visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { + if (node) { + range_nodes.push_back(node->children[0]); + } + }); + + break; + } + default: { + const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled typespec in process_parameter: '%s' of type '%s'\n", object->VpiFile().c_str(), + object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); + break; + } + } + vpi_release_handle(typespec_h); + } else { + AST::AstNode *constant_node = process_value(obj_h); + if (constant_node) { + constant_node->filename = current_node->filename; + constant_node->location = current_node->location; + current_node->children.push_back(constant_node); + } + } + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->children = range_nodes; + current_node->children.push_back(multirange_node); + } else if (range_nodes.size() == 1) { + current_node->children.push_back(range_nodes[0]); + } +} + +void UhdmAst::process_port() +{ + current_node = make_ast_node(AST::AST_WIRE); + current_node->port_id = shared.next_port_id(); + vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); + if (lowConn_h) { + vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); + auto actual_type = vpi_get(vpiType, actual_h); + switch (actual_type) { + case vpiModport: { + vpiHandle iface_h = vpi_handle(vpiInterface, actual_h); + if (iface_h) { + std::string cellName, ifaceName; + if (auto s = vpi_get_str(vpiName, actual_h)) { + cellName = s; + sanitize_symbol_name(cellName); + } + if (auto s = vpi_get_str(vpiDefName, iface_h)) { + ifaceName = s; + sanitize_symbol_name(ifaceName); + } + current_node->type = AST::AST_INTERFACEPORT; + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + // Skip '\' in cellName + typeNode->str = ifaceName + '.' + cellName.substr(1, cellName.length()); + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + shared.report.mark_handled(iface_h); + vpi_release_handle(iface_h); + } + break; + } + case vpiInterface: { + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + if (auto s = vpi_get_str(vpiDefName, actual_h)) { + typeNode->str = s; + sanitize_symbol_name(typeNode->str); + } + current_node->type = AST::AST_INTERFACEPORT; + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + break; + } + case vpiLogicVar: + case vpiLogicNet: { + current_node->is_logic = true; + current_node->is_signed = vpi_get(vpiSigned, actual_h); + visit_range(actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + } + case vpiPackedArrayVar: + visit_one_to_many({vpiElement}, actual_h, [&](AST::AstNode *node) { + if (node && GetSize(node->children) == 1) { + current_node->children.push_back(node->children[0]); + if (node->children[0]->type == AST::AST_WIRETYPE) { + current_node->is_custom_type = true; + } + } + }); + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiPackedArrayNet: + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiArrayVar: + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiEnumNet: + case vpiStructNet: + case vpiArrayNet: + case vpiStructVar: + case vpiEnumVar: + case vpiIntVar: + break; + default: { + const uhdm_handle *const handle = (const uhdm_handle *)actual_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled type in process_port: %s\n", object->VpiFile().c_str(), object->VpiLineNo(), + UHDM::VpiTypeName(actual_h).c_str()); + break; + } + } + shared.report.mark_handled(lowConn_h); + vpi_release_handle(actual_h); + vpi_release_handle(lowConn_h); + } + visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (!current_node->children.empty() && current_node->children[0]->type != AST::AST_WIRETYPE) { + if (!node->str.empty()) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } else { + // anonymous typedef, just move children + current_node->children = std::move(node->children); + } + } + delete node; + } + }); + if (const int n = vpi_get(vpiDirection, obj_h)) { + if (n == vpiInput) { + current_node->is_input = true; + } else if (n == vpiOutput) { + current_node->is_output = true; + } else if (n == vpiInout) { + current_node->is_input = true; + current_node->is_output = true; + } + } +} + +void UhdmAst::process_net() +{ + current_node = make_ast_node(AST::AST_WIRE); + auto net_type = vpi_get(vpiNetType, obj_h); + current_node->is_reg = net_type == vpiReg; + current_node->is_output = net_type == vpiOutput; + current_node->is_logic = !current_node->is_reg; + current_node->is_signed = vpi_get(vpiSigned, obj_h); + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } + }); + visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_tagged_pattern() +{ + auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); + auto assign_type = AST::AST_ASSIGN; + AST::AstNode *lhs_node = nullptr; + if (assign_node) { + assign_type = assign_node->type; + lhs_node = assign_node->children[0]; + } else { + lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); + lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; + } + current_node = new AST::AstNode(assign_type); + current_node->children.push_back(lhs_node->clone()); + auto typespec_h = vpi_handle(vpiTypespec, obj_h); + if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { + std::string field_name = vpi_get_str(vpiName, typespec_h); + if (field_name != "default") { // TODO: better support of the default keyword + current_node->children[0]->str += '.' + field_name; + } + } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { + s_vpi_value val; + vpi_get_value(typespec_h, &val); + auto range = new AST::AstNode(AST::AST_RANGE); + auto index = AST::AstNode::mkconst_int(val.value.integer, false); + range->children.push_back(index); + current_node->children[0]->children.push_back(range); + } + vpi_release_handle(typespec_h); + visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_var_select() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_one_to_many({vpiIndex}, obj_h, [&](AST::AstNode *node) { + if (node->str == current_node->str) { + for (auto child : node->children) { + current_node->children.push_back(child); + } + node->children.clear(); + delete node; + } else { + auto range_node = new AST::AstNode(AST::AST_RANGE); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + range_node->children.push_back(node); + current_node->children.push_back(range_node); + } + }); + if (current_node->children.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->children = current_node->children; + current_node->children.clear(); + current_node->children.push_back(multirange_node); + } +} + +void UhdmAst::process_gen_scope_array() +{ + current_node = make_ast_node(AST::AST_GENBLOCK); + visit_one_to_many({vpiGenScope}, obj_h, [&](AST::AstNode *genscope_node) { + for (auto *child : genscope_node->children) { + if (child->type == AST::AST_PARAMETER || child->type == AST::AST_LOCALPARAM) { + auto param_str = child->str.substr(1); + auto array_str = "[" + param_str + "]"; + } + } + current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); + genscope_node->children.clear(); + delete genscope_node; + }); +} + +void UhdmAst::process_hier_path() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + current_node->str = "\\"; + AST::AstNode *top_node = nullptr; + visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { + if (current_node->str == "\\" && !node->children.empty() && node->children[0]->type == AST::AST_RANGE) { + current_node->type = AST::AST_PREFIX; + current_node->str = node->str; + current_node->children.push_back(node->children[0]->children[0]->clone()); + delete node; + } else { + if (current_node->type == AST::AST_IDENTIFIER) { + if (current_node->str != "\\") { + current_node->str += "."; + } + current_node->str += node->str.substr(1); + current_node->children = std::move(node->children); + delete node; + } else { + current_node->children.push_back(node); + } + } + }); +} From 91167c090c2599a3719e70fbe6a86e07e467b88a Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 15 Oct 2021 10:44:31 +0200 Subject: [PATCH 454/845] Add process_repeat Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 20 ++++++++++++++++++++ uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 21 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 4dc8787d1..78d70c469 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1954,6 +1954,23 @@ void UhdmAst::process_bit_typespec() } } +void UhdmAst::process_repeat() +{ + current_node = make_ast_node(AST::AST_REPEAT); + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + if (node) { + AST::AstNode *block = nullptr; + if (node->type != AST::AST_BLOCK) { + block = new AST::AstNode(AST::AST_BLOCK, node); + } else { + block = node; + } + current_node->children.push_back(block); + } + }); +} + AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) { obj_h = obj_handle; @@ -2152,6 +2169,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiStringTypespec: process_string_typespec(); break; + case vpiRepeat: + process_repeat(); + break; case vpiProgram: default: report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index f94c26258..953b25a16 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -126,6 +126,7 @@ class UhdmAst void process_bit_typespec(); void process_string_var(); void process_string_typespec(); + void process_repeat(); void process_nonsynthesizable(const UHDM::BaseClass *object); UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) From b4a43d90a8e169bdf3d169a865d7f913ec1d42c6 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 15 Oct 2021 10:48:11 +0200 Subject: [PATCH 455/845] Handle short real as real var Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 78d70c469..550232c12 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2019,6 +2019,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiIntVar: process_int_var(); break; + case vpiShortRealVar: case vpiRealVar: process_real_var(); break; From 879f1842ba197fd103cdf09253f3f4f2964e75de Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 15 Oct 2021 11:09:35 +0200 Subject: [PATCH 456/845] Add missing vpiTaskFunc Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 550232c12..c4b14ed0d 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -435,13 +435,13 @@ void UhdmAst::process_module() if (!is_module_instance) { if (shared.top_nodes.find(type) != shared.top_nodes.end()) { current_node = shared.top_nodes[type]; - visit_one_to_many( - {vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray, vpiContAssign, vpiVariables}, - obj_h, [&](AST::AstNode *node) { - if (node) { - add_or_replace_child(current_node, node); - } - }); + visit_one_to_many({vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiTaskFunc, vpiGenScopeArray, + vpiContAssign, vpiVariables}, + obj_h, [&](AST::AstNode *node) { + if (node) { + add_or_replace_child(current_node, node); + } + }); auto it = current_node->attributes.find(ID::partial); if (it != current_node->attributes.end()) { delete it->second; From 20064ff059ebbc1ea07faac3b52ac8784ba4348f Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 15 Oct 2021 12:22:16 +0200 Subject: [PATCH 457/845] Add package name in wiretype Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index c4b14ed0d..1b31451ec 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -57,6 +57,19 @@ static std::string strip_package_name(std::string name) return name; } +static std::string get_object_name(vpiHandle obj_h, const std::vector &name_fields = {vpiName}) +{ + std::string objectName; + for (auto name : name_fields) { + if (auto s = vpi_get_str(name, obj_h)) { + objectName = s; + sanitize_symbol_name(objectName); + break; + } + } + return objectName; +} + #ifdef BUILD_UPSTREAM #include "UhdmAstUpstream.cc" #else @@ -1814,7 +1827,7 @@ void UhdmAst::process_logic_var() auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); wiretype_node->str = node->str; // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->children.push_back(wiretype_node); current_node->is_custom_type = true; } }); @@ -1876,6 +1889,16 @@ void UhdmAst::process_logic_typespec() { current_node = make_ast_node(AST::AST_WIRE); current_node->is_logic = true; + if (!current_node->str.empty() && current_node->str.find("::") == std::string::npos) { + std::string package_name = ""; + if (vpiHandle instance_h = vpi_handle(vpiInstance, obj_h)) { + if (vpi_get(vpiType, instance_h) == vpiPackage) { + package_name = get_object_name(instance_h, {vpiDefName}); + current_node->str = package_name + "::" + current_node->str.substr(1); + } + vpi_release_handle(instance_h); + } + } visit_range(obj_h, [&](AST::AstNode *node) { if (node) { current_node->children.push_back(node); From 9336701b862501c09daf4eb98c83ead49baed0ce Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 15 Oct 2021 12:26:09 +0200 Subject: [PATCH 458/845] Add short int as int var Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 1 + uhdm-plugin/UhdmAstAntmicro.cc | 1 + uhdm-plugin/UhdmAstUpstream.cc | 1 + 3 files changed, 3 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 1b31451ec..821fd0f91 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2039,6 +2039,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiStructNet: process_custom_var(); break; + case vpiShortIntVar: case vpiIntVar: process_int_var(); break; diff --git a/uhdm-plugin/UhdmAstAntmicro.cc b/uhdm-plugin/UhdmAstAntmicro.cc index b89997dd2..3f6c2aae0 100644 --- a/uhdm-plugin/UhdmAstAntmicro.cc +++ b/uhdm-plugin/UhdmAstAntmicro.cc @@ -170,6 +170,7 @@ void UhdmAst::process_port() case vpiArrayNet: case vpiStructVar: case vpiEnumVar: + case vpiShortIntVar: case vpiIntVar: break; default: { diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index 96f3588db..b14b622a6 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -378,6 +378,7 @@ void UhdmAst::process_port() case vpiArrayNet: case vpiStructVar: case vpiEnumVar: + case vpiShortIntVar: case vpiIntVar: break; default: { From 5dbf33075a9569106d56c4b74cd7e2fe4423b31a Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 15 Oct 2021 12:51:10 +0200 Subject: [PATCH 459/845] Add process_array_typespec Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 5 ++++- uhdm-plugin/UhdmAst.h | 1 + uhdm-plugin/UhdmAstAntmicro.cc | 22 ++++++++++++++++++++++ uhdm-plugin/UhdmAstUpstream.cc | 21 +++++++++++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 821fd0f91..c057e3627 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -595,7 +595,7 @@ void UhdmAst::process_struct_typespec() visit_one_to_many({vpiTypespecMember}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); } -void UhdmAst::process_packed_array_typespec() +void UhdmAst::process_array_typespec() { current_node = make_ast_node(AST::AST_WIRE); visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { @@ -2024,6 +2024,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiPackedArrayTypespec: process_packed_array_typespec(); break; + case vpiArrayTypespec: + process_array_typespec(); + break; case vpiTypespecMember: process_typespec_member(); break; diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 953b25a16..6b283bf4a 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -73,6 +73,7 @@ class UhdmAst void process_module(); void process_struct_typespec(); void process_packed_array_typespec(); + void process_array_typespec(); void process_typespec_member(); void process_enum_typespec(); void process_enum_const(); diff --git a/uhdm-plugin/UhdmAstAntmicro.cc b/uhdm-plugin/UhdmAstAntmicro.cc index 3f6c2aae0..9ec2f2497 100644 --- a/uhdm-plugin/UhdmAstAntmicro.cc +++ b/uhdm-plugin/UhdmAstAntmicro.cc @@ -353,3 +353,25 @@ void UhdmAst::process_hier_path() } }); } + +void UhdmAst::process_packed_array_typespec() +{ + current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { + if (node && node->type == AST::AST_STRUCT) { + auto str = current_node->str; + node->cloneInto(current_node); + current_node->str = str; + delete node; + } else if (node) { + current_node->str = node->str; + delete node; + } + }); + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) { + node->is_packed = true; + current_node->children.push_back(node); + } + }); +} diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index b14b622a6..cf8f9bfb5 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -541,3 +541,24 @@ void UhdmAst::process_hier_path() } }); } + +void UhdmAst::process_packed_array_typespec() +{ + current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { + if (node && node->type == AST::AST_STRUCT) { + auto str = current_node->str; + node->cloneInto(current_node); + current_node->str = str; + delete node; + } else if (node) { + current_node->str = node->str; + delete node; + } + }); + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +} From e8003de8675d03f5e440b8bcecbff9b35ad25044 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 29 Oct 2021 09:25:43 +0200 Subject: [PATCH 460/845] Adapt CI files for mainline Signed-off-by: Kamil Rakoczy --- .github/workflows/build-and-test.sh | 8 +++++++- .github/workflows/ci.yml | 8 ++------ .github/workflows/setup.sh | 6 ------ environment.yml | 1 + 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index 9834e690c..06a625277 100644 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -14,7 +14,13 @@ source .github/workflows/common.sh ########################################################################## start_section Building -make UHDM_INSTALL_DIR=$HOME/.local-bin plugins -j`nproc` + +if [ "$BUILD_UPSTREAM" = "0" ] +then + make UHDM_INSTALL_DIR=$HOME/.local-bin plugins -j`nproc` +else + make UHDM_INSTALL_DIR=`pwd`/env/conda/envs/yosys-plugins/ plugins -j`nproc` +fi end_section ########################################################################## diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c73f10ca..752b4e2f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,7 @@ name: CI tests -on: - push: - branches: - - uhdm-plugin - pull_request: +on: [push, pull_request] jobs: @@ -25,7 +21,7 @@ jobs: - {BUILD_UPSTREAM: "0"} - {BUILD_UPSTREAM: "1"} - name: "BUILD_UPSTREAM=${{matrix.BUILD_UPSTREAM}}" + name: "UHDM_BUILD_UPSTREAM_YOSYS=${{matrix.BUILD_UPSTREAM}}" steps: diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index b007a8cfa..539c68fc5 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -62,12 +62,6 @@ start_section Install-Yosys make env make enter fi - git clone --recursive https://github.com/chipsalliance/Surelog.git -b master - cd Surelog - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local-bin -DCMAKE_POSITION_INDEPENDENT_CODE=ON -S . -B build - cmake --build build -j $(nproc) - cmake --install build - cd ../.. echo $(which yosys) echo $(which yosys-config) echo $(yosys-config --datdir) diff --git a/environment.yml b/environment.yml index 3ab109c4b..cc60e2b9c 100644 --- a/environment.yml +++ b/environment.yml @@ -12,3 +12,4 @@ channels: - litex-hub dependencies: - litex-hub::yosys + - litex-hub::surelog From 8c08c8bacddb815ba8f363778b7c13717fce060b Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 2 Nov 2021 09:21:44 +0100 Subject: [PATCH 461/845] Build yosys without asserts Signed-off-by: Kamil Rakoczy --- .github/workflows/setup.sh | 2 +- Makefile | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index 539c68fc5..e472451b4 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -49,7 +49,7 @@ start_section Install-Yosys cd ~/.local-src git clone https://github.com/antmicro/yosys.git -b uhdm-plugin cd yosys - PREFIX=$HOME/.local-bin make -j$(nproc) + PREFIX=$HOME/.local-bin make ENABLE_NDEBUG=1 -j$(nproc) PREFIX=$HOME/.local-bin make install cd .. git clone --recursive https://github.com/chipsalliance/Surelog.git -b master diff --git a/Makefile b/Makefile index 886551b65..801c6a265 100644 --- a/Makefile +++ b/Makefile @@ -12,10 +12,6 @@ PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin)) PLUGINS_TEST := $(foreach plugin,$(PLUGIN_LIST),test_$(plugin)) -#Currently this tests are failing due to override of synth_quicklogic -#in mainline yosys is from conda, where it is compiled with disabled asserts -PLUGINS_TEST := $(filter-out test_ql-qlf,$(PLUGINS_TEST)) - all: plugins TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) From 77bf6777504d5e6235efd36146e3f05625aeb0b1 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 2 Nov 2021 10:57:59 +0100 Subject: [PATCH 462/845] Cache separately different yosys versions Signed-off-by: Kamil Rakoczy --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 752b4e2f2..f3f34bc08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,8 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1 + with: + key: ${{ matrix.BUILD_UPSTREAM }} - name: Install Yosys run: | From 0c24aa855051573e3b5dc13f71cbca4bbd687ab4 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 2 Nov 2021 13:10:09 +0100 Subject: [PATCH 463/845] Use gcc to build yosys Signed-off-by: Kamil Rakoczy --- .github/workflows/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index e472451b4..01a044c16 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -49,7 +49,7 @@ start_section Install-Yosys cd ~/.local-src git clone https://github.com/antmicro/yosys.git -b uhdm-plugin cd yosys - PREFIX=$HOME/.local-bin make ENABLE_NDEBUG=1 -j$(nproc) + PREFIX=$HOME/.local-bin make CONFIG=gcc ENABLE_NDEBUG=1 -j$(nproc) PREFIX=$HOME/.local-bin make install cd .. git clone --recursive https://github.com/chipsalliance/Surelog.git -b master From a392616c8ef2bedc04c6dff4b3dfb294615bd011 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 8 Nov 2021 09:14:46 +0100 Subject: [PATCH 464/845] Add uhdm-plugin to README Signed-off-by: Kamil Rakoczy --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 0e3fc842d..c7e4ccaa5 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This repository contains plugins for 6. [QuickLogic QLF FPGAs](#quicklogic-qlf-plugin) 7. [SDC](#sdc-plugin) 8. [XDC](#xdc-plugin) +9. [UHDM](#uhdm-plugin) ## Summary @@ -97,3 +98,13 @@ The plugin adds the following commands: * get_iobanks * set_property * get_bank_tiles + +### UHDM plugin + +Reads UHDM files and processes it into yosys AST. + +The plugin adds the following commands: +* read_uhdm +* read_verilog_with_uhdm + +Detailed help on the supported command(s) can be obtained by running `help ` in Yosys. From 64d1c23488dfda43bafe2522c418523852456ebd Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 4 Nov 2021 17:28:09 +0100 Subject: [PATCH 465/845] Fix missing is_reg attribute for enums Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index c057e3627..642bef62e 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -361,6 +361,7 @@ void UhdmAst::move_type_to_new_typedef(AST::AstNode *current_node, AST::AstNode if (type_node->attributes.count("\\enum_base_type")) { auto base_type = type_node->attributes["\\enum_base_type"]; auto wire_node = new AST::AstNode(AST::AST_WIRE); + wire_node->is_reg = true; for (auto c : base_type->children) { std::string enum_item_str = "\\enum_value_"; log_assert(!c->children.empty()); @@ -383,6 +384,7 @@ void UhdmAst::move_type_to_new_typedef(AST::AstNode *current_node, AST::AstNode enum_item->attributes["\\enum_base_type"] = AST::AstNode::mkconst_str(type_node->str); } auto wire_node = new AST::AstNode(AST::AST_WIRE); + wire_node->is_reg = true; wire_node->attributes["\\enum_type"] = AST::AstNode::mkconst_str(type_node->str); if (!type_node->children.empty() && type_node->children[0]->children.size() > 1) { wire_node->children.push_back(type_node->children[0]->children[1]->clone()); From fa0abb80c32c1d9dc3ac89e734a7eeb37f272667 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Wed, 10 Nov 2021 14:58:29 +0100 Subject: [PATCH 466/845] ql-qlf: add possibility to override synth pass name through define Signed-off-by: Alessandro Comodi --- Makefile_plugin.common | 6 ++++++ ql-qlf-plugin/synth_quicklogic.cc | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index d96d186bf..8c69f336e 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -53,9 +53,15 @@ LDFLAGS ?= $(shell $(YOSYS_CONFIG) --ldflags) LDLIBS ?= $(shell $(YOSYS_CONFIG) --ldlibs) PLUGINS_DIR ?= $(shell $(YOSYS_CONFIG) --datdir)/plugins DATA_DIR ?= $(shell $(YOSYS_CONFIG) --datdir) +EXTRA_FLAGS ?= OBJS := $(SOURCES:cc=o) +all: $(NAME).so + +$(OBJS): %.o: %.cc + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(EXTRA_FLAGS) $(EXTRA_FLAGS) -c -o $@ $^ + $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 241005d87..8aa7acbdd 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -24,14 +24,21 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN +#define XSTR(val) #val +#define STR(val) XSTR(val) + +#ifndef PASS_NAME +#define PASS_NAME synth_quicklogic +#endif + struct SynthQuickLogicPass : public ScriptPass { - SynthQuickLogicPass() : ScriptPass("synth_quicklogic", "Synthesis for QuickLogic FPGAs") {} + SynthQuickLogicPass() : ScriptPass(STR(PASS_NAME), "Synthesis for QuickLogic FPGAs") {} void help() override { log("\n"); - log(" synth_quicklogic [options]\n"); + log(" %s [options]\n", STR(PASS_NAME)); log("This command runs synthesis for QuickLogic FPGAs\n"); log("\n"); log(" -top \n"); From 47db640f347df40344332056aa8f23aa75c42abb Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Wed, 10 Nov 2021 15:46:06 +0100 Subject: [PATCH 467/845] gh actions: enable ccache also for building plugins Signed-off-by: Alessandro Comodi --- .github/workflows/ci.yml | 1 + Makefile_plugin.common | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3f34bc08..a98ae0e3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,6 +59,7 @@ jobs: - name: Build and test plugins run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" if [ "$BUILD_UPSTREAM" = "1" ]; then source env/conda/bin/activate yosys-plugins; fi source .github/workflows/build-and-test.sh env: diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 8c69f336e..0870f211a 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -60,7 +60,7 @@ OBJS := $(SOURCES:cc=o) all: $(NAME).so $(OBJS): %.o: %.cc - $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(EXTRA_FLAGS) $(EXTRA_FLAGS) -c -o $@ $^ + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(EXTRA_FLAGS) -c -o $@ $^ $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) From f543684918cb6797e9d0c5f2ba6753fccaa07834 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 28 Oct 2021 15:53:42 +0200 Subject: [PATCH 468/845] Add support for conversion of multiranges to ranges in plugin This PR moves support for multiranges from yosys to uhdm-plugin. Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 578 +++++++++++++++++++++++++++++++-- uhdm-plugin/UhdmAst.h | 8 + uhdm-plugin/UhdmAstAntmicro.cc | 272 +--------------- uhdm-plugin/UhdmAstUpstream.cc | 261 +-------------- uhdm-plugin/uhdmastshared.h | 4 + 5 files changed, 566 insertions(+), 557 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 642bef62e..5eddd04c3 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -103,6 +103,31 @@ void UhdmAst::visit_one_to_one(const std::vector child_node_types, vpiHandl } } +void UhdmAst::add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges) +{ + std::reverse(packed_ranges.begin(), packed_ranges.end()); + node->attributes[ID::packed_ranges] = AST::AstNode::mkconst_int(1, false, 1); + node->attributes[ID::packed_ranges]->children.insert(node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), + packed_ranges.end()); + + node->attributes[ID::unpacked_ranges] = AST::AstNode::mkconst_int(1, false, 1); + node->attributes[ID::unpacked_ranges]->children.insert(node->attributes[ID::unpacked_ranges]->children.end(), unpacked_ranges.begin(), + unpacked_ranges.end()); +} + +void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) +{ + std::vector range_nodes; + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->children = range_nodes; + f(multirange_node); + } else if (!range_nodes.empty()) { + f(range_nodes[0]); + } +} + void UhdmAst::visit_default_expr(vpiHandle obj_h) { UhdmAst initial_ast(parent, shared, indent); @@ -253,18 +278,11 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) child->is_custom_type = true; } } - // Special case for a wire with multirange - if (child->children.size() > 1 && child->type == AST::AST_WIRE && child->children[0]->type == AST::AST_RANGE && - child->children[1]->type == AST::AST_RANGE) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); -#ifndef BUILD_UPSTREAM - multirange_node->is_packed = true; -#endif - for (auto *c : child->children) { - multirange_node->children.push_back(c); + if ((*it)->attributes.count(ID::packed_ranges) && child->attributes.count(ID::packed_ranges)) { + if ((!(*it)->attributes[ID::packed_ranges]->children.empty() && child->attributes[ID::packed_ranges]->children.empty())) { + child->attributes[ID::packed_ranges] = (*it)->attributes[ID::packed_ranges]->clone(); + child->attributes[ID::unpacked_ranges] = (*it)->attributes[ID::unpacked_ranges]->clone(); } - child->children.clear(); - child->children.push_back(multirange_node); } delete *it; *it = child; @@ -427,6 +445,7 @@ void UhdmAst::process_design() if (!pair.second) continue; if (!pair.second->get_bool_attribute(ID::partial)) { + convert_multiranges(pair.second); if (pair.second->type == AST::AST_PACKAGE) current_node->children.insert(current_node->children.begin(), pair.second); else @@ -450,6 +469,7 @@ void UhdmAst::process_module() if (!is_module_instance) { if (shared.top_nodes.find(type) != shared.top_nodes.end()) { current_node = shared.top_nodes[type]; + shared.current_top_node = current_node; visit_one_to_many({vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiTaskFunc, vpiGenScopeArray, vpiContAssign, vpiVariables}, obj_h, [&](AST::AstNode *node) { @@ -466,6 +486,7 @@ void UhdmAst::process_module() current_node = make_ast_node(AST::AST_MODULE); current_node->str = type; shared.top_nodes[current_node->str] = current_node; + shared.current_top_node = current_node; current_node->attributes[ID::partial] = AST::AstNode::mkconst_int(1, false, 1); visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) { @@ -520,6 +541,7 @@ void UhdmAst::process_module() } module_node->str = module_name; shared.top_nodes[module_node->str] = module_node; + shared.current_top_node = module_node; auto cell_instance = vpi_get(vpiCellInstance, obj_h); if (cell_instance) { module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); @@ -600,6 +622,8 @@ void UhdmAst::process_struct_typespec() void UhdmAst::process_array_typespec() { current_node = make_ast_node(AST::AST_WIRE); + std::vector packed_ranges; + std::vector unpacked_ranges; visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { if (node && node->type == AST::AST_STRUCT) { auto str = current_node->str; @@ -611,11 +635,8 @@ void UhdmAst::process_array_typespec() delete node; } }); - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->children.push_back(node); - } - }); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } void UhdmAst::process_typespec_member() @@ -787,6 +808,8 @@ void UhdmAst::process_real_var() void UhdmAst::process_array_var() { current_node = make_ast_node(AST::AST_WIRE); + std::vector packed_ranges; + std::vector unpacked_ranges; visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { if (node->str.empty()) { // anonymous typespec, move the children to variable @@ -827,21 +850,22 @@ void UhdmAst::process_array_var() shared.report.mark_handled(typespec_h); vpi_release_handle(typespec_h); } - visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + // packed range + visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); } vpi_release_handle(reg_h); } vpi_release_handle(itr); - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - if (current_node->children.size() == 2 && current_node->children[0]->type == AST::AST_RANGE && - current_node->children[1]->type == AST::AST_RANGE) { - current_node->type = AST::AST_MEMORY; - } + // unpacked range + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } void UhdmAst::process_param_assign() { current_node = make_ast_node(AST::AST_PARAMETER); + std::vector packed_ranges; + std::vector unpacked_ranges; visit_one_to_one({vpiLhs}, obj_h, [&](AST::AstNode *node) { if (node) { current_node->type = node->type; @@ -853,6 +877,16 @@ void UhdmAst::process_param_assign() current_node->children.push_back(c->clone()); } } + if (node->attributes.count(ID::packed_ranges)) { + for (auto r : node->attributes[ID::packed_ranges]->children) { + packed_ranges.push_back(r->clone()); + } + } + if (node->attributes.count(ID::unpacked_ranges)) { + for (auto r : node->attributes[ID::unpacked_ranges]->children) { + unpacked_ranges.push_back(r->clone()); + } + } current_node->is_custom_type = node->is_custom_type; shared.param_types[current_node->str] = shared.param_types[node->str]; delete node; @@ -863,6 +897,7 @@ void UhdmAst::process_param_assign() current_node->children.insert(current_node->children.begin(), node); } }); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } void UhdmAst::process_cont_assign_var_init() @@ -952,16 +987,246 @@ void UhdmAst::process_packed_array_net() }); visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); } + +static AST::AstNode *make_range(int left, int right, bool is_signed = false) +{ + // generate a pre-validated range node for a fixed signal range. + auto range = new AST::AstNode(AST::AST_RANGE); + range->range_left = left; + range->range_right = right; + range->range_valid = true; + range->children.push_back(AST::AstNode::mkconst_int(left, true)); + range->children.push_back(AST::AstNode::mkconst_int(right, true)); + range->is_signed = is_signed; + return range; +} + +size_t UhdmAst::add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges) +{ + size_t size = 1; + for (size_t i = 0; i < ranges.size(); i++) { + // hackish way of setting current_ast_mod as it is required + // for simplify to get references for already defined ids + log_assert(shared.current_top_node != nullptr); + AST_INTERNAL::current_ast_mod = shared.current_top_node; + // we need to setup current top ast as this simplify + // needs to have access to all already definied ids + while (ranges[i]->simplify(true, false, false, 1, -1, false, false)) { + } + // unset current_ast_mod + AST_INTERNAL::current_ast_mod = nullptr; + // TODO: (with simplify, it can be always true) this probably is not always true, but for now assume this + log_assert(ranges[i]->children[0]->type == AST::AST_CONSTANT); + log_assert(ranges[i]->children[1]->type == AST::AST_CONSTANT); + wire_node->multirange_dimensions.push_back(min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer)); + // TODO: add support for wires not starting with 0 + log_assert(wire_node->multirange_dimensions.back() == 0); + wire_node->multirange_dimensions.push_back(max(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) - + min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) + 1); + wire_node->multirange_swapped.push_back(ranges[i]->range_swapped); + size *= wire_node->multirange_dimensions.back(); + } + return size; +} + +void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::function &f) +{ + shared.multirange_scope.push_back(""); + for (auto child : node->children) { + if (node->type == AST::AST_MODULE || node->type == AST::AST_PACKAGE) { + shared.current_top_node = node; + } + if (node->type == AST::AST_FUNCTION) { + shared.multirange_scope.push_back(node->str); + } + f(child); + visitEachDescendant(child, f); + shared.multirange_scope.pop_back(); + } +} + +void UhdmAst::convert_multiranges(AST::AstNode *module_node) +{ + std::map>> multirange_wires; + std::vector remove_ids; + visitEachDescendant(module_node, [&](AST::AstNode *node) { + // TODO: this is ugly, probably this could be done better + // We can't convert AST_MEMORY if it is accessed by readmemh + if (node->str == "\\$readmemh") { + remove_ids.push_back(node->children[1]->str); + return; + } + std::string name = shared.multirange_scope.back() + node->str; + if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { + if (node->attributes.count(ID::packed_ranges) || node->attributes.count(ID::unpacked_ranges)) { + if (node->attributes[ID::packed_ranges]->children.empty() && node->attributes[ID::unpacked_ranges]->children.empty()) { + node->attributes.erase(ID::packed_ranges); + node->attributes.erase(ID::unpacked_ranges); + return; + } + // wire inside typedef, it doesn't have any ids, so convert now + if (node->str.empty()) { + convert_packed_unpacked_range(node, std::vector()); + return; + } + log_assert(multirange_wires.count(name) == 0); + multirange_wires[name] = std::make_pair(node, std::vector()); + } + } + if (node->type == AST::AST_IDENTIFIER && std::find(remove_ids.begin(), remove_ids.end(), node->str) == remove_ids.end()) { + if (multirange_wires.count(name)) { + multirange_wires[name].second.push_back(node); + } + } + }); + for (auto m : multirange_wires) { + convert_packed_unpacked_range(m.second.first, m.second.second); + } +} + +AST::AstNode *UhdmAst::convert_range(const AST::AstNode *id, const std::vector &packed_ranges, + const std::vector &unpacked_ranges, const std::vector single_elem_size, int i, + AST::AstNode *wire_node) +{ + log_assert(i < static_cast(unpacked_ranges.size() + packed_ranges.size())); + AST::AstNode *result = nullptr; + // we want to start converting from the end + if (i < static_cast(id->children.size()) - 1) { + result = convert_range(id, packed_ranges, unpacked_ranges, single_elem_size, i + 1, wire_node); + } + // special case, we want to select whole wire + if (id->children.size() == 0 && i == 0) { + result = make_range(single_elem_size[i] - 1, 0); + } else { + AST::AstNode *range_left = nullptr; + AST::AstNode *range_right = nullptr; + if (id->children[i]->children.size() == 2) { + range_left = id->children[i]->children[0]->clone(); + range_right = id->children[i]->children[1]->clone(); + } else { + range_left = id->children[i]->children[0]->clone(); + range_right = id->children[i]->children[0]->clone(); + } + if (!wire_node->multirange_swapped.empty()) { + bool is_swapped = wire_node->multirange_swapped[wire_node->multirange_swapped.size() - i - 1]; + if (is_swapped) { + range_left = new AST::AstNode( + AST::AST_SUB, + AST::AstNode::mkconst_int(wire_node->multirange_dimensions[wire_node->multirange_dimensions.size() - (i * 2) - 1] - 1, false), + range_left->clone()); + range_right = new AST::AstNode( + AST::AST_SUB, + AST::AstNode::mkconst_int(wire_node->multirange_dimensions[wire_node->multirange_dimensions.size() - (i * 2) - 1] - 1, false), + range_right->clone()); + } + } + range_left = + new AST::AstNode(AST::AST_SUB, + new AST::AstNode(AST::AST_MUL, new AST::AstNode(AST::AST_ADD, range_left->clone(), AST::AstNode::mkconst_int(1, false)), + AST::AstNode::mkconst_int(single_elem_size[i + 1], false)), + AST::AstNode::mkconst_int(1, false)); + range_right = new AST::AstNode(AST::AST_MUL, range_right->clone(), AST::AstNode::mkconst_int(single_elem_size[i + 1], false)); + if (result) { + range_right = new AST::AstNode(AST::AST_ADD, range_right->clone(), result->children[1]->clone()); + range_left = new AST::AstNode(AST::AST_SUB, new AST::AstNode(AST::AST_ADD, range_right->clone(), result->children[0]->clone()), + result->children[1]->clone()); + } + result = new AST::AstNode(AST::AST_RANGE, range_left, range_right); + } + // return range from *current* selected range + // in the end, it results in whole selected range + return result; +} + +// This function is workaround missing support for multirange (with n-ranges) packed/unpacked nodes +// It converts multirange node to single-range node and translates access to this node +// to correct range +// TODO: what about wiretypes? they can also declare range +void UhdmAst::convert_packed_unpacked_range(AST::AstNode *wire_node, const std::vector identifers) +{ + const std::vector packed_ranges = wire_node->attributes[ID::packed_ranges]->children; + const std::vector unpacked_ranges = wire_node->attributes[ID::unpacked_ranges]->children; + size_t size = 1; + size_t packed_size = 1; + size_t unpacked_size = 1; + std::vector ranges; + bool convert_node = packed_ranges.size() > 1 || unpacked_ranges.size() > 1 || + ((wire_node->is_input || wire_node->is_output) && ((packed_ranges.size() > 0 || unpacked_ranges.size() > 0))); + for (auto id : identifers) { + // if we accessing whole AST_MEMORY, we want to change AST_MEMORY to single RANGE, + // as yosys currently doesn't support accessing whole memory, if it was converted + // to the registers + if (id->children.size() == 0 && packed_ranges.size() == 1 && unpacked_ranges.size() == 1) { + wire_node->type = AST::AST_WIRE; + convert_node = true; + } + if (packed_ranges.size() == 1 && unpacked_ranges.size() == 1 && id->children.size() == 2 && id->children[1]->children.size() == 2) { + convert_node = true; + } + } + // Convert only when atleast 1 of the ranges has more then 1 range + if (convert_node) { + packed_size = add_multirange_attribute(wire_node, packed_ranges); + unpacked_size = add_multirange_attribute(wire_node, unpacked_ranges); + size = packed_size * unpacked_size; + ranges.push_back(make_range(size - 1, 0)); + if (size > 0) { + for (auto id : identifers) { + if (id->children.empty()) + continue; + // only check reid identifiers + if (id->type != AST::AST_IDENTIFIER || id->basic_prep == true) + continue; + int elem_size = 1; + std::vector single_elem_size; + single_elem_size.push_back(elem_size); + for (size_t i = 1; i < wire_node->multirange_dimensions.size(); i = i + 2) { + elem_size *= wire_node->multirange_dimensions[i]; + single_elem_size.push_back(elem_size); + } + std::reverse(single_elem_size.begin(), single_elem_size.end()); + auto result = convert_range(id, packed_ranges, unpacked_ranges, single_elem_size, 0, wire_node); + for (size_t i = 0; i < id->children.size(); i++) { + delete id->children[i]; + } + id->children.clear(); + id->children.push_back(result); + id->basic_prep = true; + } + } + } else { + for (auto r : packed_ranges) { + ranges.push_back(r->clone()); + } + for (auto r : unpacked_ranges) { + ranges.push_back(r->clone()); + } + // if there is only one packed and one unpacked range, + // and wire is not port wire, change type to AST_MEMORY + if (wire_node->type == AST::AST_WIRE && packed_ranges.size() == 1 && unpacked_ranges.size() == 1 && !wire_node->is_input && + !wire_node->is_output) { + wire_node->type = AST::AST_MEMORY; + } + } + + // Remove now unneeded anymore attributes + wire_node->attributes.erase(ID::packed_ranges); + wire_node->attributes.erase(ID::unpacked_ranges); + // Insert new range + wire_node->children.insert(wire_node->children.end(), ranges.begin(), ranges.end()); +} void UhdmAst::process_array_net() { current_node = make_ast_node(AST::AST_WIRE); vpiHandle itr = vpi_iterate(vpiNet, obj_h); + std::vector packed_ranges; + std::vector unpacked_ranges; while (vpiHandle net_h = vpi_scan(itr)) { auto net_type = vpi_get(vpiType, net_h); if (net_type == vpiLogicNet) { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, net_h); - visit_range(net_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_range(net_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); shared.report.mark_handled(net_h); } else if (net_type == vpiStructNet) { vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h); @@ -978,16 +1243,14 @@ void UhdmAst::process_array_net() vpi_release_handle(net_h); } vpi_release_handle(itr); - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - if (current_node->children.size() == 2 && current_node->children[0]->type == AST::AST_RANGE && - current_node->children[1]->type == AST::AST_RANGE) { - current_node->type = AST::AST_MEMORY; - } + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } void UhdmAst::process_package() { current_node = make_ast_node(AST::AST_PACKAGE); + shared.current_top_node = current_node; visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node) { node->str = strip_package_name(node->str); @@ -1058,10 +1321,12 @@ void UhdmAst::process_modport() void UhdmAst::process_io_decl() { current_node = nullptr; + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *node) { current_node = node; }); if (current_node == nullptr) { current_node = make_ast_node(AST::AST_MODPORTMEMBER); - visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); } visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) { @@ -1076,6 +1341,16 @@ void UhdmAst::process_io_decl() for (auto child : node->children) { current_node->children.push_back(child->clone()); } + if (node->attributes.count(ID::packed_ranges)) { + for (auto r : node->attributes[ID::packed_ranges]->children) { + packed_ranges.push_back(r->clone()); + } + } + if (node->attributes.count(ID::unpacked_ranges)) { + for (auto r : node->attributes[ID::unpacked_ranges]->children) { + unpacked_ranges.push_back(r->clone()); + } + } current_node->is_logic = node->is_logic; current_node->is_reg = node->is_reg; } @@ -1092,6 +1367,7 @@ void UhdmAst::process_io_decl() current_node->is_output = true; } } + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } void UhdmAst::process_always() @@ -1821,6 +2097,8 @@ void UhdmAst::process_logic_var() { current_node = make_ast_node(AST::AST_WIRE); current_node->is_logic = true; + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name // TODO: add const attribute, but it seems it is little more // then just setting boolean value // current_node->is_const = vpi_get(vpiConstantVariable, obj_h); @@ -1833,8 +2111,9 @@ void UhdmAst::process_logic_var() current_node->is_custom_type = true; } }); - visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); visit_default_expr(obj_h); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } void UhdmAst::process_sys_func_call() @@ -1891,6 +2170,8 @@ void UhdmAst::process_logic_typespec() { current_node = make_ast_node(AST::AST_WIRE); current_node->is_logic = true; + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name if (!current_node->str.empty() && current_node->str.find("::") == std::string::npos) { std::string package_name = ""; if (vpiHandle instance_h = vpi_handle(vpiInstance, obj_h)) { @@ -1901,11 +2182,8 @@ void UhdmAst::process_logic_typespec() vpi_release_handle(instance_h); } } - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->children.push_back(node); - } - }); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); if (!current_node->str.empty()) { move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); } @@ -1996,6 +2274,236 @@ void UhdmAst::process_repeat() }); } +void UhdmAst::process_var_select() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + visit_one_to_many({vpiIndex}, obj_h, [&](AST::AstNode *node) { + if (node->str == current_node->str) { + for (auto child : node->children) { + current_node->children.push_back(child); + } + node->children.clear(); + delete node; + } else { + auto range_node = new AST::AstNode(AST::AST_RANGE); + range_node->filename = current_node->filename; + range_node->location = current_node->location; + range_node->children.push_back(node); + current_node->children.push_back(range_node); + } + }); +} + +void UhdmAst::process_port() +{ + current_node = make_ast_node(AST::AST_WIRE); + current_node->port_id = shared.next_port_id(); + vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name + if (lowConn_h) { + vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); + auto actual_type = vpi_get(vpiType, actual_h); + switch (actual_type) { + case vpiModport: { + vpiHandle iface_h = vpi_handle(vpiInterface, actual_h); + if (iface_h) { + std::string cellName, ifaceName; + if (auto s = vpi_get_str(vpiName, actual_h)) { + cellName = s; + sanitize_symbol_name(cellName); + } + if (auto s = vpi_get_str(vpiDefName, iface_h)) { + ifaceName = s; + sanitize_symbol_name(ifaceName); + } + current_node->type = AST::AST_INTERFACEPORT; + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + // Skip '\' in cellName + typeNode->str = ifaceName + '.' + cellName.substr(1, cellName.length()); + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + shared.report.mark_handled(iface_h); + vpi_release_handle(iface_h); + } + break; + } + case vpiInterface: { + auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); + if (auto s = vpi_get_str(vpiDefName, actual_h)) { + typeNode->str = s; + sanitize_symbol_name(typeNode->str); + } + current_node->type = AST::AST_INTERFACEPORT; + current_node->children.push_back(typeNode); + shared.report.mark_handled(actual_h); + break; + } + case vpiLogicVar: + case vpiLogicNet: { + current_node->is_logic = true; + current_node->is_signed = vpi_get(vpiSigned, actual_h); + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + + shared.report.mark_handled(actual_h); + break; + } + case vpiPackedArrayVar: + visit_one_to_many({vpiElement}, actual_h, [&](AST::AstNode *node) { + if (node && GetSize(node->children) == 1) { + current_node->children.push_back(node->children[0]); + if (node->children[0]->type == AST::AST_WIRETYPE) { + current_node->is_custom_type = true; + } + } + }); + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiPackedArrayNet: + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiArrayVar: + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + shared.report.mark_handled(actual_h); + break; + case vpiEnumNet: + case vpiStructNet: + case vpiArrayNet: + case vpiStructVar: + case vpiEnumVar: + case vpiShortIntVar: + case vpiIntVar: + break; + default: { + const uhdm_handle *const handle = (const uhdm_handle *)actual_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled type in process_port: %s\n", object->VpiFile().c_str(), object->VpiLineNo(), + UHDM::VpiTypeName(actual_h).c_str()); + break; + } + } + shared.report.mark_handled(lowConn_h); + vpi_release_handle(actual_h); + vpi_release_handle(lowConn_h); + } + visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (!current_node->children.empty() && current_node->children[0]->type != AST::AST_WIRETYPE) { + if (!node->str.empty()) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node (if port have also another range nodes) + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } else { + // anonymous typedef, just move children + current_node->children = std::move(node->children); + } + } + delete node; + } + }); + if (const int n = vpi_get(vpiDirection, obj_h)) { + if (n == vpiInput) { + current_node->is_input = true; + } else if (n == vpiOutput) { + current_node->is_output = true; + } else if (n == vpiInout) { + current_node->is_input = true; + current_node->is_output = true; + } + } + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +} + +void UhdmAst::process_net() +{ + current_node = make_ast_node(AST::AST_WIRE); + // TODO: does this node have unpacked ranges? + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name + auto net_type = vpi_get(vpiNetType, obj_h); + current_node->is_reg = net_type == vpiReg; + current_node->is_output = net_type == vpiOutput; + current_node->is_logic = !current_node->is_reg; + current_node->is_signed = vpi_get(vpiSigned, obj_h); + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node) { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + // wiretype needs to be 1st node + current_node->children.insert(current_node->children.begin(), wiretype_node); + current_node->is_custom_type = true; + } + }); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +} + +void UhdmAst::process_parameter() +{ + auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; + current_node = make_ast_node(type, {}, true); + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name + // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); + vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); + if (typespec_h) { + int typespec_type = vpi_get(vpiType, typespec_h); + switch (typespec_type) { + case vpiBitTypespec: + case vpiLogicTypespec: { + current_node->is_logic = true; + visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + shared.report.mark_handled(typespec_h); + break; + } + case vpiEnumTypespec: + case vpiRealTypespec: + case vpiIntTypespec: { + shared.report.mark_handled(typespec_h); + break; + } + case vpiStructTypespec: { + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + auto it = shared.param_types.find(current_node->str); + if (it == shared.param_types.end()) + shared.param_types.insert(std::make_pair(current_node->str, node)); + }); + break; + } + case vpiArrayTypespec: { + shared.report.mark_handled(typespec_h); + visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + break; + } + default: { + const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Encountered unhandled typespec in process_parameter: '%s' of type '%s'\n", object->VpiFile().c_str(), + object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); + break; + } + } + vpi_release_handle(typespec_h); + } else { + AST::AstNode *constant_node = process_value(obj_h); + if (constant_node) { + constant_node->filename = current_node->filename; + constant_node->location = current_node->location; + current_node->children.push_back(constant_node); + } + } + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +} + AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) { obj_h = obj_handle; diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 6b283bf4a..5a7827e30 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -129,6 +129,14 @@ class UhdmAst void process_string_typespec(); void process_repeat(); void process_nonsynthesizable(const UHDM::BaseClass *object); + AST::AstNode *convert_range(const AST::AstNode *id, const std::vector &packed_ranges, + const std::vector &unpacked_ranges, const std::vector single_elem_size, int i, + AST::AstNode *wire_node); + void convert_packed_unpacked_range(AST::AstNode *wire_node, const std::vector identifers); + void convert_multiranges(AST::AstNode *module_node); + void add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges); + size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges); + void visitEachDescendant(AST::AstNode *node, const std::function &f); UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) { diff --git a/uhdm-plugin/UhdmAstAntmicro.cc b/uhdm-plugin/UhdmAstAntmicro.cc index 9ec2f2497..d2170bf5d 100644 --- a/uhdm-plugin/UhdmAstAntmicro.cc +++ b/uhdm-plugin/UhdmAstAntmicro.cc @@ -1,243 +1,12 @@ -#define mkconst_real(x) AST::AstNode::mkconst_real(x) - -void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) -{ - std::vector range_nodes; - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - multirange_node->children = range_nodes; - f(multirange_node); - } else if (!range_nodes.empty()) { - f(range_nodes[0]); - } -} - -void UhdmAst::process_parameter() -{ - auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; - current_node = make_ast_node(type, {}, true); - // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused - std::vector range_nodes; - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) - range_nodes.push_back(node); - }); - vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); - if (typespec_h) { - int typespec_type = vpi_get(vpiType, typespec_h); - switch (typespec_type) { - case vpiBitTypespec: - case vpiLogicTypespec: { - current_node->is_logic = true; - visit_range(typespec_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); - shared.report.mark_handled(typespec_h); - break; - } - case vpiEnumTypespec: - case vpiRealTypespec: - case vpiIntTypespec: { - shared.report.mark_handled(typespec_h); - break; - } - case vpiStructTypespec: { - visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type = true; - auto it = shared.param_types.find(current_node->str); - if (it == shared.param_types.end()) - shared.param_types.insert(std::make_pair(current_node->str, node)); - }); - break; - } - case vpiArrayTypespec: { - shared.report.mark_handled(typespec_h); - visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { - if (node) { - range_nodes.push_back(node->children[0]); - } - }); - - break; - } - default: { - const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; - const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; - report_error("%s:%d: Encountered unhandled typespec in process_parameter: '%s' of type '%s'\n", object->VpiFile().c_str(), - object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); - break; - } - } - vpi_release_handle(typespec_h); - } else { - AST::AstNode *constant_node = process_value(obj_h); - if (constant_node) { - constant_node->filename = current_node->filename; - constant_node->location = current_node->location; - current_node->children.push_back(constant_node); - } - } - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - multirange_node->children = range_nodes; - current_node->children.push_back(multirange_node); - } else if (range_nodes.size() == 1) { - current_node->children.push_back(range_nodes[0]); - } -} - -void UhdmAst::process_port() +namespace RTLIL { - current_node = make_ast_node(AST::AST_WIRE); - current_node->port_id = shared.next_port_id(); - vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); - if (lowConn_h) { - vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); - auto actual_type = vpi_get(vpiType, actual_h); - switch (actual_type) { - case vpiModport: { - vpiHandle iface_h = vpi_handle(vpiInterface, actual_h); - if (iface_h) { - std::string cellName, ifaceName; - if (auto s = vpi_get_str(vpiName, actual_h)) { - cellName = s; - sanitize_symbol_name(cellName); - } - if (auto s = vpi_get_str(vpiDefName, iface_h)) { - ifaceName = s; - sanitize_symbol_name(ifaceName); - } - current_node->type = AST::AST_INTERFACEPORT; - auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); - // Skip '\' in cellName - typeNode->str = ifaceName + '.' + cellName.substr(1, cellName.length()); - current_node->children.push_back(typeNode); - shared.report.mark_handled(actual_h); - shared.report.mark_handled(iface_h); - vpi_release_handle(iface_h); - } - break; - } - case vpiInterface: { - auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); - if (auto s = vpi_get_str(vpiDefName, actual_h)) { - typeNode->str = s; - sanitize_symbol_name(typeNode->str); - } - current_node->type = AST::AST_INTERFACEPORT; - current_node->children.push_back(typeNode); - shared.report.mark_handled(actual_h); - break; - } - case vpiLogicVar: - case vpiLogicNet: { - current_node->is_logic = true; - current_node->is_signed = vpi_get(vpiSigned, actual_h); - visit_range(actual_h, [&](AST::AstNode *node) { - if (node->type == AST::AST_MULTIRANGE) - node->is_packed = true; - current_node->children.push_back(node); - }); - shared.report.mark_handled(actual_h); - break; - } - case vpiPackedArrayVar: - visit_one_to_many({vpiElement}, actual_h, [&](AST::AstNode *node) { - if (node && GetSize(node->children) == 1) { - current_node->children.push_back(node->children[0]); - if (node->children[0]->type == AST::AST_WIRETYPE) { - current_node->is_custom_type = true; - } - } - }); - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - case vpiPackedArrayNet: - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - case vpiArrayVar: - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - case vpiEnumNet: - case vpiStructNet: - case vpiArrayNet: - case vpiStructVar: - case vpiEnumVar: - case vpiShortIntVar: - case vpiIntVar: - break; - default: { - const uhdm_handle *const handle = (const uhdm_handle *)actual_h; - const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; - report_error("%s:%d: Encountered unhandled type in process_port: %s\n", object->VpiFile().c_str(), object->VpiLineNo(), - UHDM::VpiTypeName(actual_h).c_str()); - break; - } - } - shared.report.mark_handled(lowConn_h); - vpi_release_handle(actual_h); - vpi_release_handle(lowConn_h); - } - visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { - if (node) { - if (!current_node->children.empty() && current_node->children[0]->type != AST::AST_WIRETYPE) { - if (!node->str.empty()) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type = true; - } else { - // anonymous typedef, just move children - current_node->children = std::move(node->children); - } - } - delete node; - } - }); - if (const int n = vpi_get(vpiDirection, obj_h)) { - if (n == vpiInput) { - current_node->is_input = true; - } else if (n == vpiOutput) { - current_node->is_output = true; - } else if (n == vpiInout) { - current_node->is_input = true; - current_node->is_output = true; - } - } -} - -void UhdmAst::process_net() +namespace ID { - current_node = make_ast_node(AST::AST_WIRE); - auto net_type = vpi_get(vpiNetType, obj_h); - current_node->is_reg = net_type == vpiReg; - current_node->is_output = net_type == vpiOutput; - current_node->is_logic = !current_node->is_reg; - current_node->is_signed = vpi_get(vpiSigned, obj_h); - visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - if (node) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type = true; - } - }); - visit_range(obj_h, [&](AST::AstNode *node) { - current_node->children.push_back(node); - if (node->type == AST::AST_MULTIRANGE) { - node->is_packed = true; - } - }); -} +IdString packed_ranges{"\\packed_ranges"}; +IdString unpacked_ranges{"\\unpacked_ranges"}; +} // namespace ID +} // namespace RTLIL +#define mkconst_real(x) AST::AstNode::mkconst_real(x) void UhdmAst::process_tagged_pattern() { @@ -273,33 +42,6 @@ void UhdmAst::process_tagged_pattern() visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); } -void UhdmAst::process_var_select() -{ - current_node = make_ast_node(AST::AST_IDENTIFIER); - visit_one_to_many({vpiIndex}, obj_h, [&](AST::AstNode *node) { - if (node->str == current_node->str) { - for (auto child : node->children) { - current_node->children.push_back(child); - } - node->children.clear(); - delete node; - } else { - auto range_node = new AST::AstNode(AST::AST_RANGE); - range_node->filename = current_node->filename; - range_node->location = current_node->location; - range_node->children.push_back(node); - current_node->children.push_back(range_node); - } - }); - if (current_node->children.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - multirange_node->children = current_node->children; - current_node->children.clear(); - current_node->children.push_back(multirange_node); - } -} - void UhdmAst::process_gen_scope_array() { current_node = make_ast_node(AST::AST_GENBLOCK); diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index cf8f9bfb5..398773bc3 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -2,8 +2,10 @@ namespace RTLIL { namespace ID { -IdString partial; -} +IdString partial{"\\partial"}; +IdString packed_ranges{"\\packed_ranges"}; +IdString unpacked_ranges{"\\unpacked_ranges"}; +} // namespace ID } // namespace RTLIL static AST::AstNode *mkconst_real(double d) @@ -214,234 +216,6 @@ AST::AstNode *const2ast(std::string code, char case_type, bool warn_z) } } // namespace VERILOG_FRONTEND -void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) -{ - std::vector range_nodes; - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->children = range_nodes; - f(multirange_node); - } else if (!range_nodes.empty()) { - f(range_nodes[0]); - } -} - -void UhdmAst::process_parameter() -{ - auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; - current_node = make_ast_node(type, {}, true); - // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused - std::vector range_nodes; - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) - range_nodes.push_back(node); - }); - vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); - if (typespec_h) { - int typespec_type = vpi_get(vpiType, typespec_h); - switch (typespec_type) { - case vpiBitTypespec: - case vpiLogicTypespec: { - current_node->is_logic = true; - visit_range(typespec_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); - shared.report.mark_handled(typespec_h); - break; - } - case vpiEnumTypespec: - case vpiRealTypespec: - case vpiIntTypespec: { - shared.report.mark_handled(typespec_h); - break; - } - case vpiStructTypespec: { - visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type = true; - auto it = shared.param_types.find(current_node->str); - if (it == shared.param_types.end()) - shared.param_types.insert(std::make_pair(current_node->str, node)); - }); - break; - } - case vpiArrayTypespec: { - shared.report.mark_handled(typespec_h); - visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { - if (node) { - range_nodes.push_back(node->children[0]); - } - }); - - break; - } - default: { - const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; - const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; - report_error("%s:%d: Encountered unhandled typespec in process_parameter: '%s' of type '%s'\n", object->VpiFile().c_str(), - object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); - break; - } - } - vpi_release_handle(typespec_h); - } else { - AST::AstNode *constant_node = process_value(obj_h); - if (constant_node) { - constant_node->filename = current_node->filename; - constant_node->location = current_node->location; - current_node->children.push_back(constant_node); - } - } - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->children = range_nodes; - current_node->children.push_back(multirange_node); - } else if (range_nodes.size() == 1) { - current_node->children.push_back(range_nodes[0]); - } -} - -void UhdmAst::process_port() -{ - current_node = make_ast_node(AST::AST_WIRE); - current_node->port_id = shared.next_port_id(); - vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); - if (lowConn_h) { - vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); - auto actual_type = vpi_get(vpiType, actual_h); - switch (actual_type) { - case vpiModport: { - vpiHandle iface_h = vpi_handle(vpiInterface, actual_h); - if (iface_h) { - std::string cellName, ifaceName; - if (auto s = vpi_get_str(vpiName, actual_h)) { - cellName = s; - sanitize_symbol_name(cellName); - } - if (auto s = vpi_get_str(vpiDefName, iface_h)) { - ifaceName = s; - sanitize_symbol_name(ifaceName); - } - current_node->type = AST::AST_INTERFACEPORT; - auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); - // Skip '\' in cellName - typeNode->str = ifaceName + '.' + cellName.substr(1, cellName.length()); - current_node->children.push_back(typeNode); - shared.report.mark_handled(actual_h); - shared.report.mark_handled(iface_h); - vpi_release_handle(iface_h); - } - break; - } - case vpiInterface: { - auto typeNode = new AST::AstNode(AST::AST_INTERFACEPORTTYPE); - if (auto s = vpi_get_str(vpiDefName, actual_h)) { - typeNode->str = s; - sanitize_symbol_name(typeNode->str); - } - current_node->type = AST::AST_INTERFACEPORT; - current_node->children.push_back(typeNode); - shared.report.mark_handled(actual_h); - break; - } - case vpiLogicVar: - case vpiLogicNet: { - current_node->is_logic = true; - current_node->is_signed = vpi_get(vpiSigned, actual_h); - visit_range(actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - } - case vpiPackedArrayVar: - visit_one_to_many({vpiElement}, actual_h, [&](AST::AstNode *node) { - if (node && GetSize(node->children) == 1) { - current_node->children.push_back(node->children[0]); - if (node->children[0]->type == AST::AST_WIRETYPE) { - current_node->is_custom_type = true; - } - } - }); - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - case vpiPackedArrayNet: - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - case vpiArrayVar: - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - shared.report.mark_handled(actual_h); - break; - case vpiEnumNet: - case vpiStructNet: - case vpiArrayNet: - case vpiStructVar: - case vpiEnumVar: - case vpiShortIntVar: - case vpiIntVar: - break; - default: { - const uhdm_handle *const handle = (const uhdm_handle *)actual_h; - const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; - report_error("%s:%d: Encountered unhandled type in process_port: %s\n", object->VpiFile().c_str(), object->VpiLineNo(), - UHDM::VpiTypeName(actual_h).c_str()); - break; - } - } - shared.report.mark_handled(lowConn_h); - vpi_release_handle(actual_h); - vpi_release_handle(lowConn_h); - } - visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { - if (node) { - if (!current_node->children.empty() && current_node->children[0]->type != AST::AST_WIRETYPE) { - if (!node->str.empty()) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type = true; - } else { - // anonymous typedef, just move children - current_node->children = std::move(node->children); - } - } - delete node; - } - }); - if (const int n = vpi_get(vpiDirection, obj_h)) { - if (n == vpiInput) { - current_node->is_input = true; - } else if (n == vpiOutput) { - current_node->is_output = true; - } else if (n == vpiInout) { - current_node->is_input = true; - current_node->is_output = true; - } - } -} - -void UhdmAst::process_net() -{ - current_node = make_ast_node(AST::AST_WIRE); - auto net_type = vpi_get(vpiNetType, obj_h); - current_node->is_reg = net_type == vpiReg; - current_node->is_output = net_type == vpiOutput; - current_node->is_logic = !current_node->is_reg; - current_node->is_signed = vpi_get(vpiSigned, obj_h); - visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - if (node) { - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - // wiretype needs to be 1st node - current_node->children.insert(current_node->children.begin(), wiretype_node); - current_node->is_custom_type = true; - } - }); - visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -} - void UhdmAst::process_tagged_pattern() { auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); @@ -474,32 +248,6 @@ void UhdmAst::process_tagged_pattern() visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); } -void UhdmAst::process_var_select() -{ - current_node = make_ast_node(AST::AST_IDENTIFIER); - visit_one_to_many({vpiIndex}, obj_h, [&](AST::AstNode *node) { - if (node->str == current_node->str) { - for (auto child : node->children) { - current_node->children.push_back(child); - } - node->children.clear(); - delete node; - } else { - auto range_node = new AST::AstNode(AST::AST_RANGE); - range_node->filename = current_node->filename; - range_node->location = current_node->location; - range_node->children.push_back(node); - current_node->children.push_back(range_node); - } - }); - if (current_node->children.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->children = current_node->children; - current_node->children.clear(); - current_node->children.push_back(multirange_node); - } -} - void UhdmAst::process_gen_scope_array() { current_node = make_ast_node(AST::AST_GENBLOCK); @@ -520,7 +268,6 @@ void UhdmAst::process_hier_path() { current_node = make_ast_node(AST::AST_IDENTIFIER); current_node->str = "\\"; - AST::AstNode *top_node = nullptr; visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { if (current_node->str == "\\" && !node->children.empty() && node->children[0]->type == AST::AST_RANGE) { current_node->type = AST::AST_PREFIX; diff --git a/uhdm-plugin/uhdmastshared.h b/uhdm-plugin/uhdmastshared.h index 0a8737d59..88f2a3395 100644 --- a/uhdm-plugin/uhdmastshared.h +++ b/uhdm-plugin/uhdmastshared.h @@ -46,6 +46,10 @@ class UhdmAstShared // Map from AST param nodes to their types (used for params with struct types) std::unordered_map param_types; + + std::vector multirange_scope; + + AST::AstNode *current_top_node = nullptr; }; YOSYS_NAMESPACE_END From 277e08f0dafd5c054769c88273ef50d4ce72579a Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Tue, 16 Nov 2021 21:52:16 +0530 Subject: [PATCH 469/845] Adding -nodffe -nosdff to opt pass in case of qlf_k4n8 and qlf_k6n10 device, so as to avoid mapping to DFFE or SDFF Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/synth_quicklogic.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 8aa7acbdd..f77ff48df 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -217,11 +217,16 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_clean"); } + std::string noDFFArgs; + if (family == "qlf_k4n8" || family == "qlf_k6n10") { + noDFFArgs = " -nodffe -nosdff"; + } + if (check_label("coarse")) { run("check"); run("opt -nodffe -nosdff"); run("fsm"); - run("opt"); + run("opt" + noDFFArgs); run("wreduce"); run("peepopt"); run("opt_clean"); @@ -249,7 +254,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_clean"); run("alumacc"); run("pmuxtree"); - run("opt"); + run("opt" + noDFFArgs); run("memory -nomap"); run("opt_clean"); } @@ -263,11 +268,11 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_ffram")) { - run("opt -fast -mux_undef -undriven -fine"); + run("opt -fast -mux_undef -undriven -fine" + noDFFArgs); run("memory_map -iattr -attr !ram_block -attr !rom_block -attr logic_block " "-attr syn_ramstyle=auto -attr syn_ramstyle=registers " "-attr syn_romstyle=auto -attr syn_romstyle=logic"); - run("opt -undriven -fine"); + run("opt -undriven -fine" + noDFFArgs); } if (check_label("map_gates")) { @@ -276,14 +281,14 @@ struct SynthQuickLogicPass : public ScriptPass { } else { run("techmap"); } - run("opt -fast"); + run("opt -fast" + noDFFArgs); if (family == "pp3") { run("muxcover -mux8 -mux4"); } run("opt_expr"); run("opt_merge"); run("opt_clean"); - run("opt"); + run("opt" + noDFFArgs); } if (check_label("map_ffs")) { @@ -310,7 +315,7 @@ struct SynthQuickLogicPass : public ScriptPass { } run("opt_merge"); run("opt_clean"); - run("opt"); + run("opt" + noDFFArgs); } if (check_label("map_luts")) { From a48bbd4b0f3456cfece7f22d70928dd9e90f72f3 Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Tue, 16 Nov 2021 22:05:59 +0530 Subject: [PATCH 470/845] Currently doing changes only for k4n8 device Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/synth_quicklogic.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index f77ff48df..ecc372efe 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -218,7 +218,8 @@ struct SynthQuickLogicPass : public ScriptPass { } std::string noDFFArgs; - if (family == "qlf_k4n8" || family == "qlf_k6n10") { + //if (family == "qlf_k4n8" || family == "qlf_k6n10") { + if (family == "qlf_k4n8") { noDFFArgs = " -nodffe -nosdff"; } From c17ec419e0b91b52d4733aaac5a970f2910a6c86 Mon Sep 17 00:00:00 2001 From: Lalit Narain Sharma Date: Tue, 16 Nov 2021 22:12:31 +0530 Subject: [PATCH 471/845] Fixing formatting issue Signed-off-by: Lalit Narain Sharma --- ql-qlf-plugin/synth_quicklogic.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index ecc372efe..cbe8fbdfe 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -218,7 +218,6 @@ struct SynthQuickLogicPass : public ScriptPass { } std::string noDFFArgs; - //if (family == "qlf_k4n8" || family == "qlf_k6n10") { if (family == "qlf_k4n8") { noDFFArgs = " -nodffe -nosdff"; } From 898e8e3485fafed35a25b0e50d8857df4e359a4d Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 17 Nov 2021 10:19:01 +0100 Subject: [PATCH 472/845] uhdm-plugin: look also at lib64 folder for libraries Signed-off-by: Kamil Rakoczy --- uhdm-plugin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index cf878756b..0bdb4b6e6 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -22,5 +22,5 @@ CXXFLAGS += -DBUILD_UPSTREAM=1 endif CXXFLAGS += -Wno-unused-parameter -LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib/surelog -L${UHDM_INSTALL_DIR}/lib +LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib/surelog -L${UHDM_INSTALL_DIR}/lib -L${UHDM_INSTALL_DIR}/lib64/uhdm -L${UHDM_INSTALL_DIR}/lib64/surelog -L${UHDM_INSTALL_DIR}/lib64 LDLIBS += -Wl,--whole-archive -luhdm -Wl,--no-whole-archive -lsurelog -lantlr4-runtime -lflatbuffers -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread From 8ace5d71900274bdcde4cde1dcb4816c71e6042d Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 17 Nov 2021 10:17:28 +0100 Subject: [PATCH 473/845] Fix scope issues with multirange Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5eddd04c3..c1ce1d57d 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1031,17 +1031,21 @@ size_t UhdmAst::add_multirange_attribute(AST::AstNode *wire_node, const std::vec void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::function &f) { - shared.multirange_scope.push_back(""); for (auto child : node->children) { if (node->type == AST::AST_MODULE || node->type == AST::AST_PACKAGE) { shared.current_top_node = node; } - if (node->type == AST::AST_FUNCTION) { - shared.multirange_scope.push_back(node->str); + if (node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK || node->type == AST::AST_FUNCTION) { + // TODO: if it is empty, we probably need to generate unique name + if (!node->str.empty()) { + shared.multirange_scope.push_back(node->str); + } } f(child); visitEachDescendant(child, f); - shared.multirange_scope.pop_back(); + if (node->type == AST::AST_FUNCTION || node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK) + if (!node->str.empty()) + shared.multirange_scope.pop_back(); } } @@ -1049,6 +1053,8 @@ void UhdmAst::convert_multiranges(AST::AstNode *module_node) { std::map>> multirange_wires; std::vector remove_ids; + shared.multirange_scope.clear(); + shared.multirange_scope.push_back(""); visitEachDescendant(module_node, [&](AST::AstNode *node) { // TODO: this is ugly, probably this could be done better // We can't convert AST_MEMORY if it is accessed by readmemh @@ -1056,7 +1062,11 @@ void UhdmAst::convert_multiranges(AST::AstNode *module_node) remove_ids.push_back(node->children[1]->str); return; } - std::string name = shared.multirange_scope.back() + node->str; + std::string name = ""; + for (auto s : shared.multirange_scope) { + name += s; + } + name += node->str; if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { if (node->attributes.count(ID::packed_ranges) || node->attributes.count(ID::unpacked_ranges)) { if (node->attributes[ID::packed_ranges]->children.empty() && node->attributes[ID::unpacked_ranges]->children.empty()) { @@ -1074,8 +1084,19 @@ void UhdmAst::convert_multiranges(AST::AstNode *module_node) } } if (node->type == AST::AST_IDENTIFIER && std::find(remove_ids.begin(), remove_ids.end(), node->str) == remove_ids.end()) { - if (multirange_wires.count(name)) { - multirange_wires[name].second.push_back(node); + auto current_scope = shared.multirange_scope; + // wire can be declared in previous scope + while (!current_scope.empty()) { + std::string id_name = ""; + for (auto s : current_scope) { + id_name += s; + } + id_name += node->str; + if (multirange_wires.count(id_name)) { + multirange_wires[id_name].second.push_back(node); + break; + } + current_scope.pop_back(); } } }); From 3393a11a8ff27424d0d7f00ba4ee7cb8b00fb86e Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 18 Nov 2021 08:55:13 +0100 Subject: [PATCH 474/845] Use new converter only in upstream yosys Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 183 +++++++++++++++++++++++++++++++++++- uhdm-plugin/UhdmAst.h | 5 +- uhdm-plugin/uhdmastshared.h | 3 +- 3 files changed, 185 insertions(+), 6 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index c1ce1d57d..6bae72e63 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -103,6 +103,7 @@ void UhdmAst::visit_one_to_one(const std::vector child_node_types, vpiHandl } } +#ifdef BUILD_UPSTREAM void UhdmAst::add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges) { std::reverse(packed_ranges.begin(), packed_ranges.end()); @@ -127,6 +128,21 @@ void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) +{ + std::vector range_nodes; + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = range_nodes; + f(multirange_node); + } else if (!range_nodes.empty()) { + f(range_nodes[0]); + } +} +#endif void UhdmAst::visit_default_expr(vpiHandle obj_h) { @@ -278,12 +294,25 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) child->is_custom_type = true; } } +#ifdef BUILD_UPSTREAM if ((*it)->attributes.count(ID::packed_ranges) && child->attributes.count(ID::packed_ranges)) { if ((!(*it)->attributes[ID::packed_ranges]->children.empty() && child->attributes[ID::packed_ranges]->children.empty())) { child->attributes[ID::packed_ranges] = (*it)->attributes[ID::packed_ranges]->clone(); child->attributes[ID::unpacked_ranges] = (*it)->attributes[ID::unpacked_ranges]->clone(); } } +#else + if (child->children.size() > 1 && child->type == AST::AST_WIRE && child->children[0]->type == AST::AST_RANGE && + child->children[1]->type == AST::AST_RANGE) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + for (auto *c : child->children) { + multirange_node->children.push_back(c); + } + child->children.clear(); + child->children.push_back(multirange_node); + } +#endif delete *it; *it = child; return; @@ -445,7 +474,9 @@ void UhdmAst::process_design() if (!pair.second) continue; if (!pair.second->get_bool_attribute(ID::partial)) { +#ifdef BUILD_UPSTREAM convert_multiranges(pair.second); +#endif if (pair.second->type == AST::AST_PACKAGE) current_node->children.insert(current_node->children.begin(), pair.second); else @@ -469,7 +500,9 @@ void UhdmAst::process_module() if (!is_module_instance) { if (shared.top_nodes.find(type) != shared.top_nodes.end()) { current_node = shared.top_nodes[type]; +#ifdef BUILD_UPSTREAM shared.current_top_node = current_node; +#endif visit_one_to_many({vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiTaskFunc, vpiGenScopeArray, vpiContAssign, vpiVariables}, obj_h, [&](AST::AstNode *node) { @@ -486,7 +519,9 @@ void UhdmAst::process_module() current_node = make_ast_node(AST::AST_MODULE); current_node->str = type; shared.top_nodes[current_node->str] = current_node; +#ifdef BUILD_UPSTREAM shared.current_top_node = current_node; +#endif current_node->attributes[ID::partial] = AST::AstNode::mkconst_int(1, false, 1); visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) { @@ -541,7 +576,9 @@ void UhdmAst::process_module() } module_node->str = module_name; shared.top_nodes[module_node->str] = module_node; +#ifdef BUILD_UPSTREAM shared.current_top_node = module_node; +#endif auto cell_instance = vpi_get(vpiCellInstance, obj_h); if (cell_instance) { module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); @@ -622,8 +659,10 @@ void UhdmAst::process_struct_typespec() void UhdmAst::process_array_typespec() { current_node = make_ast_node(AST::AST_WIRE); +#ifdef BUILD_UPSTREAM std::vector packed_ranges; std::vector unpacked_ranges; +#endif visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { if (node && node->type == AST::AST_STRUCT) { auto str = current_node->str; @@ -635,8 +674,16 @@ void UhdmAst::process_array_typespec() delete node; } }); +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#else + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +#endif } void UhdmAst::process_typespec_member() @@ -808,8 +855,10 @@ void UhdmAst::process_real_var() void UhdmAst::process_array_var() { current_node = make_ast_node(AST::AST_WIRE); +#ifdef BUILD_UPSTREAM std::vector packed_ranges; std::vector unpacked_ranges; +#endif visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { if (node->str.empty()) { // anonymous typespec, move the children to variable @@ -850,22 +899,34 @@ void UhdmAst::process_array_var() shared.report.mark_handled(typespec_h); vpi_release_handle(typespec_h); } - // packed range +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); +#else + visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +#endif } vpi_release_handle(reg_h); } vpi_release_handle(itr); - // unpacked range +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#else + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + if (current_node->children.size() == 2 && current_node->children[0]->type == AST::AST_RANGE && + current_node->children[1]->type == AST::AST_RANGE) { + current_node->type = AST::AST_MEMORY; + } +#endif } void UhdmAst::process_param_assign() { current_node = make_ast_node(AST::AST_PARAMETER); +#ifdef BUILD_UPSTREAM std::vector packed_ranges; std::vector unpacked_ranges; +#endif visit_one_to_one({vpiLhs}, obj_h, [&](AST::AstNode *node) { if (node) { current_node->type = node->type; @@ -877,6 +938,7 @@ void UhdmAst::process_param_assign() current_node->children.push_back(c->clone()); } } +#ifdef BUILD_UPSTREAM if (node->attributes.count(ID::packed_ranges)) { for (auto r : node->attributes[ID::packed_ranges]->children) { packed_ranges.push_back(r->clone()); @@ -887,6 +949,7 @@ void UhdmAst::process_param_assign() unpacked_ranges.push_back(r->clone()); } } +#endif current_node->is_custom_type = node->is_custom_type; shared.param_types[current_node->str] = shared.param_types[node->str]; delete node; @@ -897,7 +960,9 @@ void UhdmAst::process_param_assign() current_node->children.insert(current_node->children.begin(), node); } }); +#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#endif } void UhdmAst::process_cont_assign_var_init() @@ -988,6 +1053,7 @@ void UhdmAst::process_packed_array_net() visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); } +#ifdef BUILD_UPSTREAM static AST::AstNode *make_range(int left, int right, bool is_signed = false) { // generate a pre-validated range node for a fixed signal range. @@ -1236,18 +1302,26 @@ void UhdmAst::convert_packed_unpacked_range(AST::AstNode *wire_node, const std:: // Insert new range wire_node->children.insert(wire_node->children.end(), ranges.begin(), ranges.end()); } +#endif + void UhdmAst::process_array_net() { current_node = make_ast_node(AST::AST_WIRE); vpiHandle itr = vpi_iterate(vpiNet, obj_h); +#ifdef BUILD_UPSTREAM std::vector packed_ranges; std::vector unpacked_ranges; +#endif while (vpiHandle net_h = vpi_scan(itr)) { auto net_type = vpi_get(vpiType, net_h); if (net_type == vpiLogicNet) { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, net_h); +#ifdef BUILD_UPSTREAM visit_range(net_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); +#else + visit_range(net_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +#endif shared.report.mark_handled(net_h); } else if (net_type == vpiStructNet) { vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h); @@ -1264,14 +1338,24 @@ void UhdmAst::process_array_net() vpi_release_handle(net_h); } vpi_release_handle(itr); +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#else + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + if (current_node->children.size() == 2 && current_node->children[0]->type == AST::AST_RANGE && + current_node->children[1]->type == AST::AST_RANGE) { + current_node->type = AST::AST_MEMORY; + } +#endif } void UhdmAst::process_package() { current_node = make_ast_node(AST::AST_PACKAGE); +#ifdef BUILD_UPSTREAM shared.current_top_node = current_node; +#endif visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node) { node->str = strip_package_name(node->str); @@ -1342,12 +1426,18 @@ void UhdmAst::process_modport() void UhdmAst::process_io_decl() { current_node = nullptr; +#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name +#endif visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *node) { current_node = node; }); if (current_node == nullptr) { current_node = make_ast_node(AST::AST_MODPORTMEMBER); +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); +#else + visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +#endif } visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) { @@ -1362,6 +1452,7 @@ void UhdmAst::process_io_decl() for (auto child : node->children) { current_node->children.push_back(child->clone()); } +#ifdef BUILD_UPSTREAM if (node->attributes.count(ID::packed_ranges)) { for (auto r : node->attributes[ID::packed_ranges]->children) { packed_ranges.push_back(r->clone()); @@ -1372,6 +1463,7 @@ void UhdmAst::process_io_decl() unpacked_ranges.push_back(r->clone()); } } +#endif current_node->is_logic = node->is_logic; current_node->is_reg = node->is_reg; } @@ -1388,7 +1480,9 @@ void UhdmAst::process_io_decl() current_node->is_output = true; } } +#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#endif } void UhdmAst::process_always() @@ -2118,8 +2212,10 @@ void UhdmAst::process_logic_var() { current_node = make_ast_node(AST::AST_WIRE); current_node->is_logic = true; +#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name +#endif // TODO: add const attribute, but it seems it is little more // then just setting boolean value // current_node->is_const = vpi_get(vpiConstantVariable, obj_h); @@ -2132,9 +2228,15 @@ void UhdmAst::process_logic_var() current_node->is_custom_type = true; } }); +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); +#else + visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +#endif visit_default_expr(obj_h); +#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#endif } void UhdmAst::process_sys_func_call() @@ -2191,8 +2293,10 @@ void UhdmAst::process_logic_typespec() { current_node = make_ast_node(AST::AST_WIRE); current_node->is_logic = true; +#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name +#endif if (!current_node->str.empty() && current_node->str.find("::") == std::string::npos) { std::string package_name = ""; if (vpiHandle instance_h = vpi_handle(vpiInstance, obj_h)) { @@ -2203,8 +2307,16 @@ void UhdmAst::process_logic_typespec() vpi_release_handle(instance_h); } } +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#else + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +#endif if (!current_node->str.empty()) { move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); } @@ -2313,6 +2425,15 @@ void UhdmAst::process_var_select() current_node->children.push_back(range_node); } }); +#ifndef BUILD_UPSTREAM + if (current_node->children.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = current_node->children; + current_node->children.clear(); + current_node->children.push_back(multirange_node); + } +#endif } void UhdmAst::process_port() @@ -2320,8 +2441,10 @@ void UhdmAst::process_port() current_node = make_ast_node(AST::AST_WIRE); current_node->port_id = shared.next_port_id(); vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); +#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name +#endif if (lowConn_h) { vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); auto actual_type = vpi_get(vpiType, actual_h); @@ -2364,8 +2487,15 @@ void UhdmAst::process_port() case vpiLogicNet: { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, actual_h); +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); - +#else + visit_range(actual_h, [&](AST::AstNode *node) { + if (node->type == AST::AST_MULTIRANGE) + node->is_packed = true; + current_node->children.push_back(node); + }); +#endif shared.report.mark_handled(actual_h); break; } @@ -2436,15 +2566,18 @@ void UhdmAst::process_port() current_node->is_output = true; } } +#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#endif } void UhdmAst::process_net() { current_node = make_ast_node(AST::AST_WIRE); - // TODO: does this node have unpacked ranges? +#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name +#endif auto net_type = vpi_get(vpiNetType, obj_h); current_node->is_reg = net_type == vpiReg; current_node->is_output = net_type == vpiOutput; @@ -2459,18 +2592,37 @@ void UhdmAst::process_net() current_node->is_custom_type = true; } }); +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#else + visit_range(obj_h, [&](AST::AstNode *node) { + current_node->children.push_back(node); + if (node->type == AST::AST_MULTIRANGE) { + node->is_packed = true; + } + }); +#endif } void UhdmAst::process_parameter() { auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; current_node = make_ast_node(type, {}, true); +#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name +#endif // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); +#else + std::vector range_nodes; + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) + range_nodes.push_back(node); + }); +#endif vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); if (typespec_h) { int typespec_type = vpi_get(vpiType, typespec_h); @@ -2478,7 +2630,11 @@ void UhdmAst::process_parameter() case vpiBitTypespec: case vpiLogicTypespec: { current_node->is_logic = true; +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); +#else + visit_range(typespec_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); +#endif shared.report.mark_handled(typespec_h); break; } @@ -2502,7 +2658,15 @@ void UhdmAst::process_parameter() } case vpiArrayTypespec: { shared.report.mark_handled(typespec_h); +#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); +#else + visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { + if (node) { + range_nodes.push_back(node->children[0]); + } + }); +#endif break; } default: { @@ -2522,7 +2686,18 @@ void UhdmAst::process_parameter() current_node->children.push_back(constant_node); } } +#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#else + if (range_nodes.size() > 1) { + auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); + multirange_node->is_packed = true; + multirange_node->children = range_nodes; + current_node->children.push_back(multirange_node); + } else if (range_nodes.size() == 1) { + current_node->children.push_back(range_nodes[0]); + } +#endif } AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 5a7827e30..b08fe2d50 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -129,14 +129,17 @@ class UhdmAst void process_string_typespec(); void process_repeat(); void process_nonsynthesizable(const UHDM::BaseClass *object); + +#ifdef BUILD_UPSTREAM + void add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges); AST::AstNode *convert_range(const AST::AstNode *id, const std::vector &packed_ranges, const std::vector &unpacked_ranges, const std::vector single_elem_size, int i, AST::AstNode *wire_node); void convert_packed_unpacked_range(AST::AstNode *wire_node, const std::vector identifers); void convert_multiranges(AST::AstNode *module_node); - void add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges); size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges); void visitEachDescendant(AST::AstNode *node, const std::function &f); +#endif UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) { diff --git a/uhdm-plugin/uhdmastshared.h b/uhdm-plugin/uhdmastshared.h index 88f2a3395..0cd56088b 100644 --- a/uhdm-plugin/uhdmastshared.h +++ b/uhdm-plugin/uhdmastshared.h @@ -46,10 +46,11 @@ class UhdmAstShared // Map from AST param nodes to their types (used for params with struct types) std::unordered_map param_types; - +#ifdef BUILD_UPSTREAM std::vector multirange_scope; AST::AstNode *current_top_node = nullptr; +#endif }; YOSYS_NAMESPACE_END From 3e6e39982429d0774d3ed6a8f63a26403daf25a1 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Sun, 21 Nov 2021 23:53:26 -0800 Subject: [PATCH 475/845] add support for k6n10 factor family Signed-off-by: Tarachand Pagarani --- ql-qlf-plugin/Makefile | 8 + ql-qlf-plugin/qlf_k6n10f/arith_map.v | 70 +++ ql-qlf-plugin/qlf_k6n10f/brams.txt | 64 ++ ql-qlf-plugin/qlf_k6n10f/brams_map.v | 248 ++++++++ ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 882 +++++++++++++++++++++++++++ ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 27 + ql-qlf-plugin/qlf_k6n10f/ffs_map.v | 197 ++++++ ql-qlf-plugin/qlf_k6n10f/lut_map.v | 31 + ql-qlf-plugin/synth_quicklogic.cc | 13 +- 9 files changed, 1534 insertions(+), 6 deletions(-) create mode 100644 ql-qlf-plugin/qlf_k6n10f/arith_map.v create mode 100644 ql-qlf-plugin/qlf_k6n10f/brams.txt create mode 100644 ql-qlf-plugin/qlf_k6n10f/brams_map.v create mode 100644 ql-qlf-plugin/qlf_k6n10f/cells_sim.v create mode 100644 ql-qlf-plugin/qlf_k6n10f/dsp_map.v create mode 100644 ql-qlf-plugin/qlf_k6n10f/ffs_map.v create mode 100644 ql-qlf-plugin/qlf_k6n10f/lut_map.v diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index e2fa3e1f8..4919037d9 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -18,6 +18,7 @@ include ../Makefile_plugin.common COMMON = common QLF_K4N8_DIR = qlf_k4n8 QLF_K6N10_DIR = qlf_k6n10 +QLF_K6N10F_DIR = qlf_k6n10f PP3_DIR = pp3 VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K4N8_DIR)/arith_map.v \ @@ -30,6 +31,13 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10_DIR)/ffs_map.v \ $(QLF_K6N10_DIR)/dsp_map.v \ $(QLF_K6N10_DIR)/lut_map.v \ + $(QLF_K6N10F_DIR)/arith_map.v \ + $(QLF_K6N10F_DIR)/brams_map.v \ + $(QLF_K6N10F_DIR)/brams.txt \ + $(QLF_K6N10F_DIR)/cells_sim.v \ + $(QLF_K6N10F_DIR)/ffs_map.v \ + $(QLF_K6N10F_DIR)/dsp_map.v \ + $(QLF_K6N10F_DIR)/lut_map.v \ $(PP3_DIR)/abc9_map.v \ $(PP3_DIR)/abc9_model.v \ $(PP3_DIR)/abc9_unmap.v \ diff --git a/ql-qlf-plugin/qlf_k6n10f/arith_map.v b/ql-qlf-plugin/qlf_k6n10f/arith_map.v new file mode 100644 index 000000000..c2323d6dc --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/arith_map.v @@ -0,0 +1,70 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC +(* techmap_celltype = "$alu" *) +module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); + parameter A_SIGNED = 0; + parameter B_SIGNED = 0; + parameter A_WIDTH = 1; + parameter B_WIDTH = 1; + parameter Y_WIDTH = 1; + parameter _TECHMAP_CONSTVAL_CI_ = 0; + parameter _TECHMAP_CONSTMSK_CI_ = 0; + + (* force_downto *) + input [A_WIDTH-1:0] A; + (* force_downto *) + input [B_WIDTH-1:0] B; + (* force_downto *) + output [Y_WIDTH-1:0] X, Y; + + input CI, BI; + (* force_downto *) + output [Y_WIDTH-1:0] CO; + + wire _TECHMAP_FAIL_ = Y_WIDTH <= 2; + + (* force_downto *) + wire [Y_WIDTH-1:0] A_buf, B_buf; + \$pos #(.A_SIGNED(A_SIGNED), .A_WIDTH(A_WIDTH), .Y_WIDTH(Y_WIDTH)) A_conv (.A(A), .Y(A_buf)); + \$pos #(.A_SIGNED(B_SIGNED), .A_WIDTH(B_WIDTH), .Y_WIDTH(Y_WIDTH)) B_conv (.A(B), .Y(B_buf)); + + (* force_downto *) + wire [Y_WIDTH-1:0] AA = A_buf; + (* force_downto *) + wire [Y_WIDTH-1:0] BB = BI ? ~B_buf : B_buf; + + genvar i; + + (* force_downto *) + //wire [Y_WIDTH-1:0] C = {CO, CI}; + wire [Y_WIDTH:0] C; + (* force_downto *) + wire [Y_WIDTH-1:0] S = {AA ^ BB}; + + generate + adder_carry intermediate_adder ( + .cin ( ), + .cout (C[0]), + .p (1'b0), + .g (CI), + .sumout () + ); + endgenerate + genvar i; + generate for (i = 0; i < Y_WIDTH; i = i + 1) begin:slice + adder_carry my_adder ( + .cin(C[i]), + .g(AA[i]), + .p(S[i]), + .cout(C[i+1]), + .sumout(Y[i]) + ); + end endgenerate + assign X = S; +endmodule + diff --git a/ql-qlf-plugin/qlf_k6n10f/brams.txt b/ql-qlf-plugin/qlf_k6n10f/brams.txt new file mode 100644 index 000000000..166460367 --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/brams.txt @@ -0,0 +1,64 @@ + +bram $__QLF_FACTOR_BRAM36_TDP + init 1 + abits 10 @a10d36 + dbits 36 @a10d36 + abits 11 @a11d18 + dbits 18 @a11d18 + abits 12 @a12d9 + dbits 9 @a12d9 + abits 13 @a13d4 + dbits 4 @a13d4 + abits 14 @a14d2 + dbits 2 @a14d2 + abits 15 @a15d1 + dbits 1 @a15d1 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 4 @a10d36 + enable 1 2 @a11d18 + enable 1 1 @a12d9 @a13d4 @a14d2 @a15d1 + transp 0 0 + clocks 2 3 + clkpol 2 3 +endbram + +bram $__QLF_FACTOR_BRAM18_TDP + init 1 + abits 10 @a10d18 + dbits 18 @a10d18 + abits 11 @a11d9 + dbits 9 @a11d9 + abits 12 @a12d4 + dbits 4 @a12d4 + abits 13 @a13d2 + dbits 2 @a13d2 + abits 14 @a14d1 + dbits 1 @a14d1 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 2 @a10d18 + enable 1 1 @a11d9 @a12d4 @a13d2 @a14d1 + transp 0 0 + clocks 2 3 + clkpol 2 3 +endbram + + +match $__QLF_FACTOR_BRAM36_TDP + min bits 128 + min efficiency 2 + shuffle_enable B + make_transp + or_next_if_better +endmatch + +match $__QLF_FACTOR_BRAM18_TDP + min bits 128 + min efficiency 2 + shuffle_enable B + make_transp +endmatch + diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v new file mode 100644 index 000000000..be0b23017 --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -0,0 +1,248 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module \$__QLF_FACTOR_BRAM36_TDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + parameter CFG_ABITS = 10; + parameter CFG_DBITS = 36; + parameter CFG_ENABLE_B = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [36863:0] INIT = 36864'bx; + + input CLK2; + input CLK3; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + wire [14:0] A1ADDR_15; + wire [14:0] B1ADDR_15; + //wire [7:0] B1EN_8 = //B1EN; + + wire [3:0] DIP, DOP; + wire [31:0] DI, DO; + + wire [31:0] DOBDO; + wire [3:0] DOPBDOP; + + //wire [2:0] WRITEDATAWIDTHB; + //wire [2:0] READDATAWIDTHA; + assign A1DATA = { DOP[3], DO[31:24], DOP[2], DO[23:16], DOP[1], DO[15: 8], DOP[0], DO[ 7: 0] }; + assign { DIP[3], DI[31:24], DIP[2], DI[23:16], DIP[1], DI[15: 8], DIP[0], DI[ 7: 0] } = B1DATA; + + assign A1ADDR_15[14:CFG_ABITS] = 0; + assign A1ADDR_15[CFG_ABITS-1:0] = A1ADDR; + assign B1ADDR_15[14:CFG_ABITS] = 0; + assign B1ADDR_15[CFG_ABITS-1:0] = B1ADDR; + + /*if (CFG_DBITS == 1) begin + assign WRITEDATAWIDTHB = 3'b000; + assign READDATAWIDTHA = 3'b000; + end else if (CFG_DBITS == 2) begin + assign WRITEDATAWIDTHB = 3'b001; + assign READDATAWIDTHA = 3'b001; + end else if (CFG_DBITS > 2 && CFG_DBITS <= 4) begin + assign WRITEDATAWIDTHB = 3'b010; + assign READDATAWIDTHA = 3'b010; + end else if (CFG_DBITS > 4 && CFG_DBITS <= 9) begin + assign WRITEDATAWIDTHB = 3'b011; + assign READDATAWIDTHA = 3'b011; + end else if (CFG_DBITS > 9 && CFG_DBITS <= 18) begin + assign WRITEDATAWIDTHB = 3'b100; + assign READDATAWIDTHA = 3'b100; + end else if (CFG_DBITS > 18 && CFG_DBITS <= 36) begin + assign WRITEDATAWIDTHB = 3'b101; + assign READDATAWIDTHA = 3'b101; + end*/ + generate if (CFG_DBITS > 8) begin + TDP_BRAM36 #( + //`include "brams_init_36.vh" + .READ_WIDTH_A(CFG_DBITS), + .READ_WIDTH_B(CFG_DBITS), + .WRITE_WIDTH_A(CFG_DBITS), + .WRITE_WIDTH_B(CFG_DBITS), + ) _TECHMAP_REPLACE_ ( + .WRITEDATAA(32'hFFFFFFFF), + .WRITEDATAAP(4'hF), + .READDATAA(DO[31:0]), + .READDATAAP(DOP[3:0]), + .ADDRA(A1ADDR_15), + .CLOCKA(CLK2), + .READENABLEA(A1EN), + .WRITEENABLEA(1'b0), + .BYTEENABLEA(4'b0), + //.WRITEDATAWIDTHA(3'b0), + //.READDATAWIDTHA(READDATAWIDTHA), + + .WRITEDATAB(DI), + .WRITEDATABP(DIP), + .READDATAB(DOBDO), + .READDATABP(DOPBDOP), + .ADDRB(B1ADDR_15), + .CLOCKB(CLK3), + .READENABLEA(1'b0), + .WRITEENABLEB(1'b1), + .BYTEENABLEB(B1EN) + //.WRITEDATAWIDTHB(WRITEDATAWIDTHB), + //.READDATAWIDTHB(3'b0) + ); + end else begin + TDP_BRAM36 #( + //`include "brams_init_32.vh" + ) _TECHMAP_REPLACE_ ( + .WRITEDATAA(32'hFFFFFFFF), + .WRITEDATAAP(4'hF), + .READDATAA(DO[31:0]), + .READDATAAP(DOP[3:0]), + .ADDRA(A1ADDR_15), + .CLOCKA(CLK2), + .READENABLEA(A1EN), + .WRITEENABLEA(1'b0), + .BYTEENABLEA(4'b0), + //.WRITEDATAWIDTHA(3'b0), + //.READDATAWIDTHA(READDATAWIDTHA), + + .WRITEDATAB(DI), + .WRITEDATABP(DIP), + .READDATAB(DOBDO), + .READDATABP(DOPBDOP), + .ADDRB(B1ADDR_15), + .CLOCKB(CLK3), + .READENABLEB(1'b0), + .WRITEENABLEB(1'b1), + .BYTEENABLEB(B1EN) + //.WRITEDATAWIDTHB(WRITEDATAWIDTHB), + //.READDATAWIDTHB(3'b0) + ); + end endgenerate +endmodule + +// ------------------------------------------------------------------------ + +module \$__QLF_FACTOR_BRAM18_TDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + parameter CFG_ABITS = 10; + parameter CFG_DBITS = 18; + parameter CFG_ENABLE_B = 2; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [18431:0] INIT = 18432'bx; + + input CLK2; + input CLK3; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + wire [13:0] A1ADDR_14; + wire [13:0] B1ADDR_14; + //wire [3:0] B1EN_4 = B1EN; + + wire [1:0] DIP, DOP; + wire [15:0] DI, DO; + + wire [15:0] DOBDO; + wire [1:0] DOPBDOP; + + assign A1DATA = { DOP[1], DO[15: 8], DOP[0], DO[ 7: 0] }; + assign { DIP[1], DI[15: 8], DIP[0], DI[ 7: 0] } = B1DATA; + + assign A1ADDR_14[13:CFG_ABITS] = 0; + assign A1ADDR_14[CFG_ABITS-1:0] = A1ADDR; + assign B1ADDR_14[13:CFG_ABITS] = 0; + assign B1ADDR_14[CFG_ABITS-1:0] = B1ADDR; + + /*if (CFG_DBITS == 1) begin + assign WRITEDATAWIDTHB = 3'b000; + assign READDATAWIDTHA = 3'b000; + end else if (CFG_DBITS == 2) begin + assign WRITEDATAWIDTHB = 3'b001; + assign READDATAWIDTHA = 3'b001; + end else if (CFG_DBITS > 2 && CFG_DBITS <= 4) begin + assign WRITEDATAWIDTHB = 3'b010; + assign READDATAWIDTHA = 3'b010; + end else if (CFG_DBITS > 4 && CFG_DBITS <= 9) begin + assign WRITEDATAWIDTHB = 3'b011; + assign READDATAWIDTHA = 3'b011; + end else if (CFG_DBITS > 9 && CFG_DBITS <= 18) begin + //assign WRITEDATAWIDTHB = 3'b100; + assign READDATAWIDTHA = 3'b100; + end*/ + generate if (CFG_DBITS > 8) begin + TDP_BRAM18 #( + //`include "brams_init_18.vh" + .READ_WIDTH_A(CFG_DBITS), + .READ_WIDTH_B(CFG_DBITS), + .WRITE_WIDTH_A(CFG_DBITS), + .WRITE_WIDTH_B(CFG_DBITS), + ) _TECHMAP_REPLACE_ ( + .WRITEDATAA(16'hFFFF), + .WRITEDATAAP(2'b11), + .READDATAA(DO[15:0]), + .READDATAAP(DOP[2:0]), + .ADDRA(A1ADDR_14), + .CLOCKA(CLK2), + .READENABLEA(A1EN), + .WRITEENABLEA(1'b0), + .BYTEENABLEA(2'b0), + //.WRITEDATAWIDTHA(3'b0), + //.READDATAWIDTHA(READDATAWIDTHA), + + .WRITEDATAB(DI), + .WRITEDATABP(DIP), + .READDATAB(DOBDO), + .READDATABP(DOPBDOP), + .ADDRB(B1ADDR_14), + .CLOCKB(CLK3), + .READENABLEB(1'b0), + .WRITEENABLEB(1'b1), + .BYTEENABLEB(B1EN) + //.WRITEDATAWIDTHB(WRITEDATAWIDTHB), + //.READDATAWIDTHB(3'b0) + ); + end else begin + TDP_BRAM18 #( + //`include "brams_init_16.vh" + ) _TECHMAP_REPLACE_ ( + .WRITEDATAA(16'hFFFF), + .WRITEDATAAP(2'b11), + .READDATAA(DO[15:0]), + .READDATAAP(DOP[2:0]), + .ADDRA(A1ADDR_14), + .CLOCKA(CLK2), + .READENABLEA(A1EN), + .WRITEENABLEA(1'b0), + .BYTEENABLEA(2'b0), + //.WRITEDATAWIDTHA(3'b0), + // .READDATAWIDTHA(READDATAWIDTHA), + + .WRITEDATAB(DI), + .WRITEDATABP(DIP), + .READDATAB(DOBDO), + .READDATABP(DOPBDOP), + .ADDRB(B1ADDR_14), + .CLOCKB(CLK3), + .READENABLEB(1'b0), + .WRITEENABLEB(1'b1), + .BYTEENABLEB(B1EN) + //.WRITEDATAWIDTHB(WRITEDATAWIDTHB), + //.READDATAWIDTHB(3'b0) + ); + end endgenerate +endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v new file mode 100644 index 000000000..25fb1e0e9 --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -0,0 +1,882 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +(* abc9_flop, lib_whitebox *) +module sh_dff( + output reg Q, + input D, + (* clkbuf_sink *) + input C +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge C) + Q <= D; +endmodule + +module MUXCY(output O, input CI, DI, S); + assign O = S ? CI : DI; +endmodule + +module XORCY(output O, input CI, LI); + assign O = CI ^ LI; +endmodule + +(* abc9_box, lib_blackbox *) +module adder_carry( + output sumout, + output cout, + input p, + input g, + input cin +); + assign sumout = p ^ cin; + assign cout = p ? cin : g; + +endmodule + +(* abc9_box, lib_whitebox *) +module adder_lut5( + output lut5_out, + (* abc9_carry *) + output cout, + input [0:4] in, + (* abc9_carry *) + input cin +); + parameter [0:15] LUT=0; + parameter IN2_IS_CIN = 0; + + wire [0:4] li = (IN2_IS_CIN) ? {in[0], in[1], cin, in[3], in[4]} : {in[0], in[1], in[2], in[3],in[4]}; + + // Output function + wire [0:15] s1 = li[0] ? + {LUT[0], LUT[2], LUT[4], LUT[6], LUT[8], LUT[10], LUT[12], LUT[14], LUT[16], LUT[18], LUT[20], LUT[22], LUT[24], LUT[26], LUT[28], LUT[30]}: + {LUT[1], LUT[3], LUT[5], LUT[7], LUT[9], LUT[11], LUT[13], LUT[15], LUT[17], LUT[19], LUT[21], LUT[23], LUT[25], LUT[27], LUT[29], LUT[31]}; + + wire [0:7] s2 = li[1] ? {s1[0], s1[2], s1[4], s1[6], s1[8], s1[10], s1[12], s1[14]} : + {s1[1], s1[3], s1[5], s1[7], s1[9], s1[11], s1[13], s1[15]}; + + wire [0:3] s3 = li[2] ? {s2[0], s2[2], s2[4], s2[6]} : {s2[1], s2[3], s2[5], s2[7]}; + wire [0:1] s4 = li[3] ? {s3[0], s3[2]} : {s3[1], s3[3]}; + + assign lut5_out = li[4] ? s4[0] : s4[1]; + + // Carry out function + assign cout = (s3[2]) ? cin : s3[3]; + +endmodule + + + +(* abc9_lut=1, lib_whitebox *) +module frac_lut6( + input [0:5] in, + output [0:3] lut4_out, + output [0:1] lut5_out, + output lut6_out +); + parameter [0:63] LUT = 0; + // Effective LUT input + wire [0:5] li = in; + + // Output function + wire [0:31] s1 = li[0] ? + {LUT[0] , LUT[2] , LUT[4] , LUT[6] , LUT[8] , LUT[10], LUT[12], LUT[14], + LUT[16], LUT[18], LUT[20], LUT[22], LUT[24], LUT[26], LUT[28], LUT[30], + LUT[32], LUT[34], LUT[36], LUT[38], LUT[40], LUT[42], LUT[44], LUT[46], + LUT[48], LUT[50], LUT[52], LUT[54], LUT[56], LUT[58], LUT[60], LUT[62]}: + {LUT[1] , LUT[3] , LUT[5] , LUT[7] , LUT[9] , LUT[11], LUT[13], LUT[15], + LUT[17], LUT[19], LUT[21], LUT[23], LUT[25], LUT[27], LUT[29], LUT[31], + LUT[33], LUT[35], LUT[37], LUT[39], LUT[41], LUT[43], LUT[45], LUT[47], + LUT[49], LUT[51], LUT[53], LUT[55], LUT[57], LUT[59], LUT[61], LUT[63]}; + + wire [0:15] s2 = li[1] ? + {s1[0] , s1[2] , s1[4] , s1[6] , s1[8] , s1[10], s1[12], s1[14], + s1[16], s1[18], s1[20], s1[22], s1[24], s1[26], s1[28], s1[30]}: + {s1[1] , s1[3] , s1[5] , s1[7] , s1[9] , s1[11], s1[13], s1[15], + s1[17], s1[19], s1[21], s1[23], s1[25], s1[27], s1[29], s1[31]}; + + wire [0:7] s3 = li[2] ? + {s2[0], s2[2], s2[4], s2[6], s2[8], s2[10], s2[12], s2[14]}: + {s2[1], s2[3], s2[5], s2[7], s2[9], s2[11], s2[13], s2[15]}; + + wire [0:3] s4 = li[3] ? {s3[0], s3[2], s3[4], s3[6]}: + {s3[1], s3[3], s3[5], s3[7]}; + + wire [0:1] s5 = li[4] ? {s4[0], s4[2]} : {s4[1], s4[3]}; + + assign lut4_out[0] = s4[0]; + assign lut4_out[1] = s4[1]; + assign lut4_out[2] = s4[2]; + assign lut4_out[3] = s4[3]; + + assign lut5_out[0] = s0[0]; + assign lut5_out[1] = s5[1]; + + assign lut6_out = li[5] ? s5[0] : s5[1]; + +endmodule + +(* abc9_flop, lib_whitebox *) +module dff( + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C) + Q <= D; + 1'b1: + always @(negedge C) + Q <= D; + endcase +endmodule + +(* abc9_flop, lib_whitebox *) +module dffr( + output reg Q, + input D, + input R, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or posedge R) + if (R) + Q <= 1'b0; + else + Q <= D; + 1'b1: + always @(negedge C or posedge R) + if (R) + Q <= 1'b0; + else + Q <= D; + endcase +endmodule + +(* abc9_flop, lib_whitebox *) +module dffre( + output reg Q, + input D, + input R, + input E, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or posedge R) + if (R) + Q <= 1'b0; + else if(E) + Q <= D; + 1'b1: + always @(negedge C or posedge R) + if (R) + Q <= 1'b0; + else if(E) + Q <= D; + endcase +endmodule + +module dffs( + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C, + input S +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or negedge S) + if (S) + Q <= 1'b1; + else + Q <= D; + 1'b1: + always @(negedge C or negedge S) + if (S) + Q <= 1'b1; + else + Q <= D; + endcase +endmodule + +module dffse( + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C, + input S, + input E, +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or negedge S) + if (S) + Q <= 1'b1; + else if(E) + Q <= D; + 1'b1: + always @(negedge C or negedge S) + if (S) + Q <= 1'b1; + else if(E) + Q <= D; + endcase +endmodule + +module dffsr( + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C, + input R, + input S +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or negedge S or negedge R) + if (S) + Q <= 1'b1; + else if (R) + Q <= 1'b0; + else + Q <= D; + 1'b1: + always @(negedge C or negedge S or negedge R) + if (S) + Q <= 1'b1; + else if (R) + Q <= 1'b0; + else + Q <= D; + endcase +endmodule + +/* +module dffsre( + output reg Q, + input D, + (* clkbuf_sink *) + (* invertible_pin = "IS_C_INVERTED" *) + input C, + input E, + input R, + input S +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + case(|IS_C_INVERTED) + 1'b0: + always @(posedge C or posedge S or posedge R) + if (S) + Q <= 1'b1; + else if (R) + Q <= 1'b0; + else if (E) + Q <= D; + endcase +endmodule +*/ + +module dffsre( + output reg Q, + input D, + (* clkbuf_sink *) + input C, + input E, + input R, + input S +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge C or negedge S or negedge R) + if (!R) + Q <= 1'b0; + else if (!S) + Q <= 1'b1; + else if (E) + Q <= D; + +endmodule + +module dffnsre( + output reg Q, + input D, + (* clkbuf_sink *) + input C, + input E, + input R, + input S +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(negedge C or negedge S or negedge R) + if (!R) + Q <= 1'b0; + else if (!S) + Q <= 1'b1; + else if (E) + Q <= D; + +endmodule + +/* +(* abc9_flop, lib_whitebox *) +module latchsre ( + output reg Q, + input S, + input R, + input D, + input G, + input E +); + parameter [0:0] INIT = 1'b0; + parameter [0:0] IS_C_INVERTED = 1'b0; + initial Q = INIT; + always @* + begin + if (R) Q <= 1'b0; + if (S) Q <= 1'b1; + else if (E && G) Q <= D; + end +endmodule +*/ + +(* abc9_flop, lib_whitebox *) +module latchsre ( + output reg Q, + input S, + input R, + input D, + input G, + input E +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + always @* + begin + if (!R) + Q <= 1'b0; + else if (!S) + Q <= 1'b1; + else if (E && G) + Q <= D; + end +endmodule + +(* abc9_flop, lib_whitebox *) +module latchnsre ( + output reg Q, + input S, + input R, + input D, + input G, + input E +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + always @* + begin + if (!R) + Q <= 1'b0; + else if (!S) + Q <= 1'b1; + else if (E && !G) + Q <= D; + end +endmodule + +(* abc9_flop, lib_whitebox *) +module scff( + output reg Q, + input D, + input clk +); + parameter [0:0] INIT = 1'b0; + initial Q = INIT; + + always @(posedge clk) + Q <= D; +endmodule + +module DP_RAM16K ( + input rclk, + input wclk, + input wen, + input ren, + input[8:0] waddr, + input[8:0] raddr, + input[31:0] d_in, + input[31:0] wenb, + output[31:0] d_out ); + + _dual_port_sram memory_0 ( + .wclk (wclk), + .wen (wen), + .waddr (waddr), + .data_in (d_in), + .rclk (rclk), + .ren (ren), + .raddr (raddr), + .wenb (wenb), + .d_out (d_out) ); + +endmodule + +module _dual_port_sram ( + input wclk, + input wen, + input[8:0] waddr, + input[31:0] data_in, + input rclk, + input ren, + input[8:0] raddr, + input[31:0] wenb, + output[31:0] d_out ); + + // MODE 0: 512 x 32 + // MODE 1: 1024 x 16 + // MODE 2: 1024 x 8 + // MODE 3: 2048 x 4 + + integer i; + reg[31:0] ram[512:0]; + reg[31:0] internal; + // The memory is self initialised + + initial begin + for (i=0;i<=512;i=i+1) + begin + ram[i] = 0; + end + internal = 31'b0; + end + + wire [31:0] WMASK; + + assign d_out = internal; + assign WMASK = wenb; + + always @(posedge wclk) begin + if(!wen) begin + if (WMASK[ 0]) ram[waddr][ 0] <= data_in[ 0]; + if (WMASK[ 1]) ram[waddr][ 1] <= data_in[ 1]; + if (WMASK[ 2]) ram[waddr][ 2] <= data_in[ 2]; + if (WMASK[ 3]) ram[waddr][ 3] <= data_in[ 3]; + if (WMASK[ 4]) ram[waddr][ 4] <= data_in[ 4]; + if (WMASK[ 5]) ram[waddr][ 5] <= data_in[ 5]; + if (WMASK[ 6]) ram[waddr][ 6] <= data_in[ 6]; + if (WMASK[ 7]) ram[waddr][ 7] <= data_in[ 7]; + if (WMASK[ 8]) ram[waddr][ 8] <= data_in[ 8]; + if (WMASK[ 9]) ram[waddr][ 9] <= data_in[ 9]; + if (WMASK[10]) ram[waddr][10] <= data_in[10]; + if (WMASK[11]) ram[waddr][11] <= data_in[11]; + if (WMASK[12]) ram[waddr][12] <= data_in[12]; + if (WMASK[13]) ram[waddr][13] <= data_in[13]; + if (WMASK[14]) ram[waddr][14] <= data_in[14]; + if (WMASK[15]) ram[waddr][15] <= data_in[15]; + if (WMASK[16]) ram[waddr][16] <= data_in[16]; + if (WMASK[17]) ram[waddr][17] <= data_in[17]; + if (WMASK[18]) ram[waddr][18] <= data_in[18]; + if (WMASK[19]) ram[waddr][19] <= data_in[19]; + if (WMASK[20]) ram[waddr][20] <= data_in[20]; + if (WMASK[21]) ram[waddr][21] <= data_in[21]; + if (WMASK[22]) ram[waddr][22] <= data_in[22]; + if (WMASK[23]) ram[waddr][23] <= data_in[23]; + if (WMASK[24]) ram[waddr][24] <= data_in[24]; + if (WMASK[25]) ram[waddr][25] <= data_in[25]; + if (WMASK[26]) ram[waddr][26] <= data_in[26]; + if (WMASK[27]) ram[waddr][27] <= data_in[27]; + if (WMASK[28]) ram[waddr][28] <= data_in[28]; + if (WMASK[29]) ram[waddr][29] <= data_in[29]; + if (WMASK[30]) ram[waddr][30] <= data_in[30]; + if (WMASK[31]) ram[waddr][31] <= data_in[31]; + end + end + + always @(posedge rclk) begin + if(!ren) begin + internal <= ram[raddr]; + end + end +endmodule + +module QL_DSP ( + input CLK, + input [15:0] A, B, C, D, + output [31:0] O, + output CO // Currently unused, left in case we want to support signed operations in the future. +); + parameter [0:0] A_REG = 0; + parameter [0:0] B_REG = 0; + parameter [0:0] C_REG = 0; + parameter [0:0] D_REG = 0; + parameter [0:0] ENABLE_DSP = 0; + parameter [0:0] A_SIGNED = 0; + parameter [0:0] B_SIGNED = 0; + + wire [15:0] iA, iB, iC, iD; + wire [15:0] iF, iJ, iK, iG; + + // Regs C and A, currently unused + reg [15:0] rC, rA; + + assign iC = C_REG ? rC : C; + assign iA = A_REG ? rA : A; + + // Regs B and D, currently unused + reg [15:0] rB, rD; + + assign iB = B_REG ? rB : B; + assign iD = D_REG ? rD : D; + + // Multiplier Stage + wire [15:0] p_Ah_Bh, p_Al_Bh, p_Ah_Bl, p_Al_Bl; + wire [15:0] Ah, Al, Bh, Bl; + assign Ah = {A_SIGNED ? {8{iA[15]}} : 8'b0, iA[15: 8]}; + assign Al = {8'b0, iA[ 7: 0]}; + assign Bh = {B_SIGNED ? {8{iB[15]}} : 8'b0, iB[15: 8]}; + assign Bl = {8'b0, iB[ 7: 0]}; + assign p_Ah_Bh = Ah * Bh; // F + assign p_Al_Bh = {8'b0, Al[7:0]} * Bh; // J + assign p_Ah_Bl = Ah * {8'b0, Bl[7:0]}; // K + assign p_Al_Bl = Al * Bl; // G + + assign iF = p_Ah_Bh; + assign iJ = p_Al_Bh; + + assign iK = p_Ah_Bl; + assign iG = p_Al_Bl; + + // Adder Stage + wire [23:0] iK_e = {A_SIGNED ? {8{iK[15]}} : 8'b0, iK}; + wire [23:0] iJ_e = {B_SIGNED ? {8{iJ[15]}} : 8'b0, iJ}; + assign iL = iG + (iK_e << 8) + (iJ_e << 8) + (iF << 16); + + // Output Stage + assign O = iL; + +endmodule + + +module TDP_BRAM18 ( + (* clkbuf_sink *) + input CLOCKA, + (* clkbuf_sink *) + input CLOCKB, + input READENABLEA, + input READENABLEB, + input [13:0] ADDRA, + input [13:0] ADDRB, + input [15:0] WRITEDATAA, + input [15:0] WRITEDATAB, + input [1:0] WRITEDATAAP, + input [1:0] WRITEDATABP, + input WRITEENABLEA, + input WRITEENABLEB, + input [1:0] BYTEENABLEA, + input [1:0] BYTEENABLEB, + //input [2:0] WRITEDATAWIDTHA, + //input [2:0] WRITEDATAWIDTHB, + //input [2:0] READDATAWIDTHA, + //input [2:0] READDATAWIDTHB, + output [15:0] READDATAA, + output [15:0] READDATAB, + output [1:0] READDATAAP, + output [1:0] READDATABP +); + parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_10 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_11 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_12 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_13 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_14 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_15 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_16 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_17 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_18 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_19 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_20 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_21 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_22 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_23 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_24 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_25 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_26 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_27 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_28 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_29 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_30 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_31 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_32 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_33 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_34 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_35 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_36 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_37 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_38 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_39 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter integer READ_WIDTH_A = 0; + parameter integer READ_WIDTH_B = 0; + parameter integer WRITE_WIDTH_A = 0; + parameter integer WRITE_WIDTH_B = 0; + +endmodule + +module TDP_BRAM36 ( + (* clkbuf_sink *) + input CLOCKA, + (* clkbuf_sink *) + input CLOCKB, + input READENABLEA, + input READENABLEB, + input [14:0] ADDRA, + input [14:0] ADDRB, + input [31:0] WRITEDATAA, + input [31:0] WRITEDATAB, + input [3:0] WRITEDATAAP, + input [3:0] WRITEDATABP, + input WRITEENABLEA, + input WRITEENABLEB, + input [3:0] BYTEENABLEA, + input [3:0] BYTEENABLEB, + //input [2:0] WRITEDATAWIDTHA, + //input [2:0] WRITEDATAWIDTHB, + //input [2:0] READDATAWIDTHA, + //input [2:0] READDATAWIDTHB, + output [31:0] READDATAA, + output [31:0] READDATAB, + output [3:0] READDATAAP, + output [3:0] READDATABP +); + parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_10 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_11 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_12 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_13 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_14 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_15 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_16 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_17 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_18 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_19 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_20 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_21 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_22 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_23 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_24 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_25 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_26 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_27 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_28 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_29 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_30 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_31 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_32 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_33 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_34 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_35 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_36 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_37 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_38 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_39 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_40 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_41 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_42 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_43 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_44 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_45 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_46 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_47 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_48 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_49 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_50 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_51 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_52 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_53 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_54 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_55 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_56 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_57 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_58 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_59 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_60 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_61 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_62 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_63 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_64 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_65 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_66 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_67 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_68 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_69 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_70 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_71 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_72 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_73 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_74 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_75 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_76 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_77 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_78 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_79 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter integer READ_WIDTH_A = 0; + parameter integer READ_WIDTH_B = 0; + parameter integer WRITE_WIDTH_A = 0; + parameter integer WRITE_WIDTH_B = 0; + +endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v new file mode 100644 index 000000000..4b8ae644a --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -0,0 +1,27 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module \$__MUL16X16 (input [15:0] A, input [15:0] B, output [31:0] Y); + parameter A_SIGNED = 0; + parameter B_SIGNED = 0; + parameter A_WIDTH = 0; + parameter B_WIDTH = 0; + parameter Y_WIDTH = 0; + + QL_DSP #( + .A_REG(1'b0), + .B_REG(1'b0), + .C_REG(1'b0), + .D_REG(1'b0), + .ENABLE_DSP(1'b1), + ) _TECHMAP_REPLACE_ ( + .A(A), + .B(B), + .O(Y), + ); +endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v new file mode 100644 index 000000000..3c5e9f016 --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v @@ -0,0 +1,197 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +// Basic DFF + +module \$_DFF_P_ (D, C, Q); + input D; + input C; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(1'b1)); +endmodule + +// Async reset +module \$_DFF_PP0_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(1'b1)); +endmodule + +// Async set +module \$_DFF_PP1_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(!R)); +endmodule + +// Async reset, enable + +module \$_DFFE_PP0P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(1'b1)); +endmodule + +// Async set, enable + +module \$_DFFE_PP1P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(!R)); +endmodule + +// Async set & reset + +module \$_DFFSR_PPP_ (D, C, R, S, Q); + input D; + input C; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(!S)); +endmodule + +// Async set, reset & enable + +module \$_DFFSRE_PPPP_ (D, Q, C, E, R, S); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(!S)); +endmodule + +// Latch with async set and reset +module \$_DLATCHSR_PPP_ (input E, S, R, D, output Q); + latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S)); +endmodule + +module \$_DLATCHSR_NPP_ (input E, S, R, D, output Q); + latchnsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S)); +endmodule + +// The following techmap operation are not performed right now +// as Negative edge FF are not legalized in synth_quicklogic for qlf_k6n10 +// but in case we implement clock inversion in the future, the support is ready for it. + +module \$_DFF_N_ (D, C, Q); + input D; + input C; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(1'b1)); +endmodule + +module \$_DFF_NP0_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(1'b1)); +endmodule + +module \$_DFF_NP1_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(!R)); +endmodule + +module \$_DFFE_NP0P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(1'b1)); +endmodule + +module \$_DFFE_NP1P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(!R)); +endmodule + +module \$_DFFSR_NPP_ (D, C, R, S, Q); + input D; + input C; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(!S)); +endmodule + +module \$_DFFSRE_PPPP_ (D, C, E, R, S, Q); + input D; + input C; + input E; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(!S)); +endmodule + +module \$__SHREG_DFF_P_ (D, Q, C); + input D; + input C; + output Q; + + parameter DEPTH = 2; + reg [DEPTH-2:0] q; + genvar i; + generate for (i = 0; i < DEPTH; i = i + 1) begin: slice + + + // First in chain + generate if (i == 0) begin + sh_dff #() shreg_beg ( + .Q(q[i]), + .D(D), + .C(C) + ); + end endgenerate + // Middle in chain + generate if (i > 0 && i != DEPTH-1) begin + sh_dff #() shreg_mid ( + .Q(q[i]), + .D(q[i-1]), + .C(C) + ); + end endgenerate + // Last in chain + generate if (i == DEPTH-1) begin + sh_dff #() shreg_end ( + .Q(Q), + .D(q[i-1]), + .C(C) + ); + end endgenerate + end: slice + endgenerate + +endmodule + diff --git a/ql-qlf-plugin/qlf_k6n10f/lut_map.v b/ql-qlf-plugin/qlf_k6n10f/lut_map.v new file mode 100644 index 000000000..5d8c421e3 --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/lut_map.v @@ -0,0 +1,31 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +`ifndef NO_LUT +module \$lut (A, Y); + parameter WIDTH = 0; + parameter LUT = 0; + + (* force_downto *) + input [WIDTH-1:0] A; + output Y; + +/* generate + if (WIDTH == 6) begin + frac_lut6 #(.LUT(LUT)) _TECHMAP_REPLACE_ (.lut6_out(Y),.in(A)); + + end else begin + wire _TECHMAP_FAIL_ = 1; + end + endgenerate */ + +endmodule +`endif + + + diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 241005d87..62419f742 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -44,6 +44,7 @@ struct SynthQuickLogicPass : public ScriptPass { log(" - pp3 : pp3 \n"); log(" - qlf_k4n8 : qlf_k4n8 \n"); log(" - qlf_k6n10: qlf_k6n10 \n"); + log(" - qlf_k6n10f: qlf_k6n10f \n"); log("\n"); log(" -no_abc_opt\n"); log(" By default most of ABC logic optimization features is\n"); @@ -166,7 +167,7 @@ struct SynthQuickLogicPass : public ScriptPass { if (!design->full_selection()) log_cmd_error("This command only operates on fully selected designs!\n"); - if (family != "pp3" && family != "qlf_k4n8" && family != "qlf_k6n10") + if (family != "pp3" && family != "qlf_k4n8" && family != "qlf_k6n10" && family != "qlf_k6n10f") log_cmd_error("Invalid family specified: '%s'\n", family.c_str()); if (family != "pp3") { @@ -247,7 +248,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_clean"); } - if (check_label("map_bram", "(skip if -no_bram)") && (family == "qlf_k6n10" || family == "pp3") && inferBram) { + if (check_label("map_bram", "(skip if -no_bram)") && (family == "qlf_k6n10" || family == "qlf_k6n10f" || family == "pp3") && inferBram) { run("memory_bram -rules +/quicklogic/" + family + "/brams.txt"); if (family == "pp3") { run("pp3_braminit"); @@ -264,7 +265,7 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_gates")) { - if (inferAdder && (family == "qlf_k4n8" || family == "qlf_k6n10")) { + if (inferAdder && (family == "qlf_k4n8" || family == "qlf_k6n10" || family == "qlf_k6n10f")) { run("techmap -map +/techmap.v -map +/quicklogic/" + family + "/arith_map.v"); } else { run("techmap"); @@ -284,7 +285,7 @@ struct SynthQuickLogicPass : public ScriptPass { if (family == "qlf_k4n8") { run("shregmap -minlen 8 -maxlen 8"); run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); - } else if (family == "qlf_k6n10") { + } else if (family == "qlf_k6n10" || family == "qlf_k6n10f") { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_PP?_ 0 -cell $_DFFE_PP?P_ 0 -cell $_DFFSR_PPP_ 0 -cell $_DFFSRE_PPPP_ 0 -cell " "$_DLATCHSR_PPP_ 0"); // In case we add clock inversion in the future. @@ -308,7 +309,7 @@ struct SynthQuickLogicPass : public ScriptPass { if (check_label("map_luts")) { if (abcOpt) { - if (family == "qlf_k6n10") { + if (family == "qlf_k6n10" || family == "qlf_k6n10f") { run("abc -lut 6 "); } else if (family == "qlf_k4n8") { run("abc -lut 4 "); @@ -337,7 +338,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_lut"); } - if (check_label("map_cells") && (family == "qlf_k6n10" || family == "pp3")) { + if (check_label("map_cells") && (family == "qlf_k6n10" || family == "pp3" || family == "qlf_k6n10f")) { std::string techMapArgs; techMapArgs = "-map +/quicklogic/" + family + "/lut_map.v"; run("techmap " + techMapArgs); From 08ca01c5f54a297810bd2cf19f857e379c630770 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Tue, 23 Nov 2021 02:09:20 -0800 Subject: [PATCH 476/845] add support for k6n10 factor family Signed-off-by: Tarachand Pagarani --- ql-qlf-plugin/Makefile | 1 - ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 217 -------------- ql-qlf-plugin/qlf_k6n10f/ffs_map.v | 275 +++++++++++++++++- ql-qlf-plugin/qlf_k6n10f/lut_map.v | 31 -- ql-qlf-plugin/synth_quicklogic.cc | 8 +- ql-qlf-plugin/tests/dffs/dffs.tcl | 245 ++++++++++++++++ ql-qlf-plugin/tests/full_adder/full_adder.tcl | 22 ++ ql-qlf-plugin/tests/shreg/shreg.tcl | 8 + 8 files changed, 552 insertions(+), 255 deletions(-) delete mode 100644 ql-qlf-plugin/qlf_k6n10f/lut_map.v diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 4919037d9..2819055c9 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -37,7 +37,6 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10F_DIR)/cells_sim.v \ $(QLF_K6N10F_DIR)/ffs_map.v \ $(QLF_K6N10F_DIR)/dsp_map.v \ - $(QLF_K6N10F_DIR)/lut_map.v \ $(PP3_DIR)/abc9_map.v \ $(PP3_DIR)/abc9_model.v \ $(PP3_DIR)/abc9_unmap.v \ diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 25fb1e0e9..98dd2d9f4 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -20,14 +20,6 @@ module sh_dff( Q <= D; endmodule -module MUXCY(output O, input CI, DI, S); - assign O = S ? CI : DI; -endmodule - -module XORCY(output O, input CI, LI); - assign O = CI ^ LI; -endmodule - (* abc9_box, lib_blackbox *) module adder_carry( output sumout, @@ -289,33 +281,6 @@ module dffsr( endcase endmodule -/* -module dffsre( - output reg Q, - input D, - (* clkbuf_sink *) - (* invertible_pin = "IS_C_INVERTED" *) - input C, - input E, - input R, - input S -); - parameter [0:0] INIT = 1'b0; - parameter [0:0] IS_C_INVERTED = 1'b0; - initial Q = INIT; - case(|IS_C_INVERTED) - 1'b0: - always @(posedge C or posedge S or posedge R) - if (S) - Q <= 1'b1; - else if (R) - Q <= 1'b0; - else if (E) - Q <= D; - endcase -endmodule -*/ - module dffsre( output reg Q, input D, @@ -360,28 +325,6 @@ module dffnsre( endmodule -/* -(* abc9_flop, lib_whitebox *) -module latchsre ( - output reg Q, - input S, - input R, - input D, - input G, - input E -); - parameter [0:0] INIT = 1'b0; - parameter [0:0] IS_C_INVERTED = 1'b0; - initial Q = INIT; - always @* - begin - if (R) Q <= 1'b0; - if (S) Q <= 1'b1; - else if (E && G) Q <= D; - end -endmodule -*/ - (* abc9_flop, lib_whitebox *) module latchsre ( output reg Q, @@ -439,166 +382,6 @@ module scff( Q <= D; endmodule -module DP_RAM16K ( - input rclk, - input wclk, - input wen, - input ren, - input[8:0] waddr, - input[8:0] raddr, - input[31:0] d_in, - input[31:0] wenb, - output[31:0] d_out ); - - _dual_port_sram memory_0 ( - .wclk (wclk), - .wen (wen), - .waddr (waddr), - .data_in (d_in), - .rclk (rclk), - .ren (ren), - .raddr (raddr), - .wenb (wenb), - .d_out (d_out) ); - -endmodule - -module _dual_port_sram ( - input wclk, - input wen, - input[8:0] waddr, - input[31:0] data_in, - input rclk, - input ren, - input[8:0] raddr, - input[31:0] wenb, - output[31:0] d_out ); - - // MODE 0: 512 x 32 - // MODE 1: 1024 x 16 - // MODE 2: 1024 x 8 - // MODE 3: 2048 x 4 - - integer i; - reg[31:0] ram[512:0]; - reg[31:0] internal; - // The memory is self initialised - - initial begin - for (i=0;i<=512;i=i+1) - begin - ram[i] = 0; - end - internal = 31'b0; - end - - wire [31:0] WMASK; - - assign d_out = internal; - assign WMASK = wenb; - - always @(posedge wclk) begin - if(!wen) begin - if (WMASK[ 0]) ram[waddr][ 0] <= data_in[ 0]; - if (WMASK[ 1]) ram[waddr][ 1] <= data_in[ 1]; - if (WMASK[ 2]) ram[waddr][ 2] <= data_in[ 2]; - if (WMASK[ 3]) ram[waddr][ 3] <= data_in[ 3]; - if (WMASK[ 4]) ram[waddr][ 4] <= data_in[ 4]; - if (WMASK[ 5]) ram[waddr][ 5] <= data_in[ 5]; - if (WMASK[ 6]) ram[waddr][ 6] <= data_in[ 6]; - if (WMASK[ 7]) ram[waddr][ 7] <= data_in[ 7]; - if (WMASK[ 8]) ram[waddr][ 8] <= data_in[ 8]; - if (WMASK[ 9]) ram[waddr][ 9] <= data_in[ 9]; - if (WMASK[10]) ram[waddr][10] <= data_in[10]; - if (WMASK[11]) ram[waddr][11] <= data_in[11]; - if (WMASK[12]) ram[waddr][12] <= data_in[12]; - if (WMASK[13]) ram[waddr][13] <= data_in[13]; - if (WMASK[14]) ram[waddr][14] <= data_in[14]; - if (WMASK[15]) ram[waddr][15] <= data_in[15]; - if (WMASK[16]) ram[waddr][16] <= data_in[16]; - if (WMASK[17]) ram[waddr][17] <= data_in[17]; - if (WMASK[18]) ram[waddr][18] <= data_in[18]; - if (WMASK[19]) ram[waddr][19] <= data_in[19]; - if (WMASK[20]) ram[waddr][20] <= data_in[20]; - if (WMASK[21]) ram[waddr][21] <= data_in[21]; - if (WMASK[22]) ram[waddr][22] <= data_in[22]; - if (WMASK[23]) ram[waddr][23] <= data_in[23]; - if (WMASK[24]) ram[waddr][24] <= data_in[24]; - if (WMASK[25]) ram[waddr][25] <= data_in[25]; - if (WMASK[26]) ram[waddr][26] <= data_in[26]; - if (WMASK[27]) ram[waddr][27] <= data_in[27]; - if (WMASK[28]) ram[waddr][28] <= data_in[28]; - if (WMASK[29]) ram[waddr][29] <= data_in[29]; - if (WMASK[30]) ram[waddr][30] <= data_in[30]; - if (WMASK[31]) ram[waddr][31] <= data_in[31]; - end - end - - always @(posedge rclk) begin - if(!ren) begin - internal <= ram[raddr]; - end - end -endmodule - -module QL_DSP ( - input CLK, - input [15:0] A, B, C, D, - output [31:0] O, - output CO // Currently unused, left in case we want to support signed operations in the future. -); - parameter [0:0] A_REG = 0; - parameter [0:0] B_REG = 0; - parameter [0:0] C_REG = 0; - parameter [0:0] D_REG = 0; - parameter [0:0] ENABLE_DSP = 0; - parameter [0:0] A_SIGNED = 0; - parameter [0:0] B_SIGNED = 0; - - wire [15:0] iA, iB, iC, iD; - wire [15:0] iF, iJ, iK, iG; - - // Regs C and A, currently unused - reg [15:0] rC, rA; - - assign iC = C_REG ? rC : C; - assign iA = A_REG ? rA : A; - - // Regs B and D, currently unused - reg [15:0] rB, rD; - - assign iB = B_REG ? rB : B; - assign iD = D_REG ? rD : D; - - // Multiplier Stage - wire [15:0] p_Ah_Bh, p_Al_Bh, p_Ah_Bl, p_Al_Bl; - wire [15:0] Ah, Al, Bh, Bl; - assign Ah = {A_SIGNED ? {8{iA[15]}} : 8'b0, iA[15: 8]}; - assign Al = {8'b0, iA[ 7: 0]}; - assign Bh = {B_SIGNED ? {8{iB[15]}} : 8'b0, iB[15: 8]}; - assign Bl = {8'b0, iB[ 7: 0]}; - assign p_Ah_Bh = Ah * Bh; // F - assign p_Al_Bh = {8'b0, Al[7:0]} * Bh; // J - assign p_Ah_Bl = Ah * {8'b0, Bl[7:0]}; // K - assign p_Al_Bl = Al * Bl; // G - - assign iF = p_Ah_Bh; - assign iJ = p_Al_Bh; - - assign iK = p_Ah_Bl; - assign iG = p_Al_Bl; - - // Adder Stage - wire [23:0] iK_e = {A_SIGNED ? {8{iK[15]}} : 8'b0, iK}; - wire [23:0] iJ_e = {B_SIGNED ? {8{iJ[15]}} : 8'b0, iJ}; - assign iL = iG + (iK_e << 8) + (iJ_e << 8) + (iF << 16); - - // Output Stage - assign O = iL; - -endmodule - - module TDP_BRAM18 ( (* clkbuf_sink *) input CLOCKA, diff --git a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v index 3c5e9f016..b57d5a3fe 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v @@ -24,6 +24,15 @@ module \$_DFF_PP0_ (D, C, R, Q); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(1'b1)); endmodule +// Async reset +module \$_DFF_PN0_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(1'b1)); +endmodule + // Async set module \$_DFF_PP1_ (D, C, R, Q); input D; @@ -33,6 +42,15 @@ module \$_DFF_PP1_ (D, C, R, Q); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(!R)); endmodule +// Async set +module \$_DFF_PN1_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(R)); +endmodule + // Async reset, enable module \$_DFFE_PP0P_ (D, C, E, R, Q); @@ -44,6 +62,14 @@ module \$_DFFE_PP0P_ (D, C, E, R, Q); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(1'b1)); endmodule +module \$_DFFE_PN0P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1)); +endmodule // Async set, enable module \$_DFFE_PP1P_ (D, C, E, R, Q); @@ -55,6 +81,15 @@ module \$_DFFE_PP1P_ (D, C, E, R, Q); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(!R)); endmodule +module \$_DFFE_PN1P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R)); +endmodule + // Async set & reset module \$_DFFSR_PPP_ (D, C, R, S, Q); @@ -66,6 +101,69 @@ module \$_DFFSR_PPP_ (D, C, R, S, Q); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(!S)); endmodule +module \$_DFFSR_PNP_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(S)); +endmodule + +module \$_DFFSR_PNN_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(S)); +endmodule + +module \$_DFFSR_PPN_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(!S)); +endmodule + +module \$_DFFSR_NPP_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(!S)); +endmodule + +module \$_DFFSR_NNP_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(S)); +endmodule + +module \$_DFFSR_NNN_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(S)); +endmodule + +module \$_DFFSR_NPN_ (D, Q, C, R, S); + input D; + input C; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(!S)); +endmodule + // Async set, reset & enable module \$_DFFSRE_PPPP_ (D, Q, C, E, R, S); @@ -78,6 +176,76 @@ module \$_DFFSRE_PPPP_ (D, Q, C, E, R, S); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(!S)); endmodule +module \$_DFFSRE_PNPP_ (D, Q, C, E, R, S); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(S)); +endmodule + +module \$_DFFSRE_PPNP_ (D, Q, C, E, R, S); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(!S)); +endmodule + +module \$_DFFSRE_PNNP_ (D, Q, C, E, R, S); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S)); +endmodule + +module \$_DFFSRE_PPPN_ (D, Q, C, E, R, S); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(!S)); +endmodule + +module \$_DFFSRE_PNPN_ (D, Q, C, E, R, S); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(S)); +endmodule + +module \$_DFFSRE_PPNN_ (D, Q, C, E, R, S); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(!S)); +endmodule + +module \$_DFFSRE_PNNN_ (D, Q, C, E, R, S); + input D; + input C; + input E; + input R; + input S; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(S)); +endmodule + // Latch with async set and reset module \$_DLATCHSR_PPP_ (input E, S, R, D, output Q); latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S)); @@ -108,6 +276,15 @@ module \$_DFF_NP0_ (D, C, R, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(1'b1)); endmodule +module \$_DFF_NN0_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(1'b1)); +endmodule + module \$_DFF_NP1_ (D, C, R, Q); input D; input C; @@ -116,6 +293,14 @@ module \$_DFF_NP1_ (D, C, R, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(!R)); endmodule +module \$_DFF_NN1_ (D, C, R, Q); + input D; + input C; + input R; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(R)); +endmodule + module \$_DFFE_NP0P_ (D, C, E, R, Q); input D; input C; @@ -126,6 +311,16 @@ module \$_DFFE_NP0P_ (D, C, E, R, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(1'b1)); endmodule +module \$_DFFE_NN0P_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1)); +endmodule + module \$_DFFE_NP1P_ (D, C, E, R, Q); input D; input C; @@ -136,16 +331,17 @@ module \$_DFFE_NP1P_ (D, C, E, R, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(!R)); endmodule -module \$_DFFSR_NPP_ (D, C, R, S, Q); +module \$_DFFE_NN1P_ (D, C, E, R, Q); input D; input C; + input E; input R; - input S; output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(!S)); + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R)); endmodule -module \$_DFFSRE_PPPP_ (D, C, E, R, S, Q); +module \$_DFFSRE_NPPP_ (D, C, E, R, S, Q); input D; input C; input E; @@ -155,6 +351,77 @@ module \$_DFFSRE_PPPP_ (D, C, E, R, S, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(!S)); endmodule +module \$_DFFSRE_NNPP_ (D, C, E, R, S, Q); + input D; + input C; + input E; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(S)); +endmodule + +module \$_DFFSRE_NPNP_ (D, C, E, R, S, Q); + input D; + input C; + input E; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(!S)); +endmodule + +module \$_DFFSRE_NNNP_ (D, C, E, R, S, Q); + input D; + input C; + input E; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S)); +endmodule + + +module \$_DFFSRE_NPPN_ (D, C, E, R, S, Q); + input D; + input C; + input E; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(!S)); +endmodule + +module \$_DFFSRE_NNPN_ (D, C, E, R, S, Q); + input D; + input C; + input E; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(S)); +endmodule + +module \$_DFFSRE_NPNN_ (D, C, E, R, S, Q); + input D; + input C; + input E; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(!S)); +endmodule + +module \$_DFFSRE_NNNN_ (D, C, E, R, S, Q); + input D; + input C; + input E; + input R; + input S; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(S)); +endmodule + module \$__SHREG_DFF_P_ (D, Q, C); input D; input C; diff --git a/ql-qlf-plugin/qlf_k6n10f/lut_map.v b/ql-qlf-plugin/qlf_k6n10f/lut_map.v deleted file mode 100644 index 5d8c421e3..000000000 --- a/ql-qlf-plugin/qlf_k6n10f/lut_map.v +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. -// -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC -// -// SPDX-License-Identifier:ISC - -`ifndef NO_LUT -module \$lut (A, Y); - parameter WIDTH = 0; - parameter LUT = 0; - - (* force_downto *) - input [WIDTH-1:0] A; - output Y; - -/* generate - if (WIDTH == 6) begin - frac_lut6 #(.LUT(LUT)) _TECHMAP_REPLACE_ (.lut6_out(Y),.in(A)); - - end else begin - wire _TECHMAP_FAIL_ = 1; - end - endgenerate */ - -endmodule -`endif - - - diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 56672369f..d26f53a42 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -297,12 +297,16 @@ struct SynthQuickLogicPass : public ScriptPass { if (family == "qlf_k4n8") { run("shregmap -minlen 8 -maxlen 8"); run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_P??_ 0 -cell $_DFF_N_ 0 -cell $_DFF_N??_ 0 -cell $_DFFSR_???_ 0"); - } else if (family == "qlf_k6n10" || family == "qlf_k6n10f") { + } else if (family == "qlf_k6n10") { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DFF_PP?_ 0 -cell $_DFFE_PP?P_ 0 -cell $_DFFSR_PPP_ 0 -cell $_DFFSRE_PPPP_ 0 -cell " "$_DLATCHSR_PPP_ 0"); // In case we add clock inversion in the future. // run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_DFFSR_?PP_ 0 -cell $_DFFSRE_?PPP_ 0 -cell // $_DLATCH_SRPPP_ 0"); + } else if (family == "qlf_k6n10f") { + run("shregmap -minlen 8 -maxlen 20"); + run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_???_ 0 -cell $_DFFE_????_ 0 -cell $_DFFSR_???_ 0 -cell $_DFFSRE_????_ 0 -cell " + "$_DLATCHSR_PPP_ 0"); } else if (family == "pp3") { run("dfflegalize -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_?_ x"); run("techmap -map +/quicklogic/" + family + "/cells_map.v"); @@ -350,7 +354,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_lut"); } - if (check_label("map_cells") && (family == "qlf_k6n10" || family == "pp3" || family == "qlf_k6n10f")) { + if (check_label("map_cells") && (family == "qlf_k6n10" || family == "pp3")) { std::string techMapArgs; techMapArgs = "-map +/quicklogic/" + family + "/lut_map.v"; run("techmap " + techMapArgs); diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index b9d1cae88..d98476ae7 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -406,6 +406,251 @@ select -assert-count 3 t:\$lut design -reset +# DFF on qlf_k6n10f device +read_verilog $::env(DESIGN_TOP).v +design -save read + +# DFF +hierarchy -top my_dff +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dff +design -load postopt +yosys cd my_dff +stat +select -assert-count 1 t:dffsre + +# DFFR (posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffr_p +yosys cd my_dffr_p +stat +select -assert-count 1 t:dffsre + +# DFFR (posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffr_p_2 +yosys cd my_dffr_p_2 +stat +select -assert-count 2 t:dffsre + +# DFFR (negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffr_n +yosys cd my_dffr_n +stat +select -assert-count 1 t:dffsre + +#DFFRE (posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffre_p +yosys cd my_dffre_p +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + +#DFFRE (negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffre_n +yosys cd my_dffre_n +stat +select -assert-count 1 t:dffsre + +# DFFS (posedge SET) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffs_p +yosys cd my_dffs_p +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + +# DFFS (negedge SET) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffs_n +yosys cd my_dffs_n +stat +select -assert-count 1 t:dffsre + +# DFFSE (posedge SET) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffse_p +yosys cd my_dffse_p +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + +# DFFSE (negedge SET) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffse_n +yosys cd my_dffse_n +stat +select -assert-count 1 t:dffsre + +# DFFN +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffn +yosys cd my_dffn +stat +select -assert-count 1 t:dffnsre + +# DFFNR (negedge CLK posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffnr_p +yosys cd my_dffnr_p +stat +select -assert-count 1 t:dffnsre +select -assert-count 1 t:\$lut + +# DFFNR (negedge CLK negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffnr_n +yosys cd my_dffnr_n +stat +select -assert-count 1 t:dffnsre + +# DFFNS (negedge CLK posedge SET) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffns_p +yosys cd my_dffns_p +stat +select -assert-count 1 t:dffnsre +select -assert-count 1 t:\$lut + +# DFFS (negedge CLK negedge SET) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffns_n +yosys cd my_dffns_n +stat +select -assert-count 1 t:dffnsre + +# DFFSR (posedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsr_ppp +yosys cd my_dffsr_ppp +stat +select -assert-count 1 t:dffsre +select -assert-count 2 t:\$lut + +# DFFSR (posedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsr_pnp +yosys cd my_dffsr_pnp +stat +select -assert-count 1 t:dffsre +select -assert-count 2 t:\$lut + +# DFFSR (posedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsr_ppn +yosys cd my_dffsr_ppn +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + +# DFFSR (posedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsr_pnn +yosys cd my_dffsr_pnn +stat +select -assert-count 1 t:dffsre + +# DFFSR (negedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsr_npp +yosys cd my_dffsr_npp +stat +select -assert-count 1 t:dffnsre +select -assert-count 2 t:\$lut + +# DFFSR (negedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsr_nnp +yosys cd my_dffsr_nnp +stat +select -assert-count 1 t:dffnsre +select -assert-count 2 t:\$lut + +# DFFSR (negedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsr_npn +yosys cd my_dffsr_npn +stat +select -assert-count 1 t:dffnsre +select -assert-count 1 t:\$lut + +# DFFSR (negedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsr_nnn +yosys cd my_dffsr_nnn +stat +select -assert-count 1 t:dffnsre + +# DFFSRE (posedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsre_ppp +yosys cd my_dffsre_ppp +stat +select -assert-count 1 t:dffsre +select -assert-count 2 t:\$lut + +# DFFSRE (posedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsre_pnp +yosys cd my_dffsre_pnp +stat +select -assert-count 1 t:dffsre +select -assert-count 2 t:\$lut + +# DFFSRE (posedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsre_ppn +yosys cd my_dffsre_ppn +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + +# DFFSRE (posedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsre_pnn +yosys cd my_dffsre_pnn +stat +select -assert-count 1 t:dffsre + +# DFFSRE (negedge CLK posedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsre_npp +yosys cd my_dffsre_npp +stat +select -assert-count 1 t:dffnsre +select -assert-count 2 t:\$lut + +# DFFSRE (negedge CLK negedge SET posedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsre_nnp +yosys cd my_dffsre_nnp +stat +select -assert-count 1 t:dffnsre +select -assert-count 2 t:\$lut + +# DFFSRE (negedge CLK posedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsre_npn +yosys cd my_dffsre_npn +stat +select -assert-count 1 t:dffnsre +select -assert-count 1 t:\$lut + +# DFFSRE (negedge CLK negedge SET negedge RST) +design -load read +synth_quicklogic -family qlf_k6n10f -top my_dffsre_nnn +yosys cd my_dffsre_nnn +stat +select -assert-count 1 t:dffnsre + +design -reset + +# DFF on pp3 device +design -reset + # DFF on pp3 device read_verilog $::env(DESIGN_TOP).v design -save read diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index 3f20d4314..05ced4193 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -60,6 +60,28 @@ select -assert-count 5 t:adder design -reset +# Equivalence check for adder synthesis for qlf-k6n10 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top full_adder +yosys proc +synth_quicklogic -family qlf_k6n10f +yosys cd full_adder +stat +select -assert-count 6 t:adder_carry + +design -reset + +# Equivalence check for subtractor synthesis for qlf-k6n10 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top subtractor +yosys proc +synth_quicklogic -family qlf_k6n10f +yosys cd subtractor +stat +select -assert-count 6 t:adder_carry + +design -reset + # Equivalence check for adder synthesis for pp3 read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top full_adder diff --git a/ql-qlf-plugin/tests/shreg/shreg.tcl b/ql-qlf-plugin/tests/shreg/shreg.tcl index dba736c25..fe4b6333d 100644 --- a/ql-qlf-plugin/tests/shreg/shreg.tcl +++ b/ql-qlf-plugin/tests/shreg/shreg.tcl @@ -6,3 +6,11 @@ read_verilog $::env(DESIGN_TOP).v synth_quicklogic -family qlf_k4n8 -top top stat select -assert-count 8 t:sh_dff + +design -reset + +read_verilog $::env(DESIGN_TOP).v +synth_quicklogic -family qlf_k6n10f -top top +stat +select -assert-count 8 t:sh_dff + From ae69fe872b9a35ed3e87186ffbecd03bda717690 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 23 Nov 2021 16:36:51 +0100 Subject: [PATCH 477/845] Fix packed ranges in parameter Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 6bae72e63..3c1deb3dd 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1237,7 +1237,7 @@ void UhdmAst::convert_packed_unpacked_range(AST::AstNode *wire_node, const std:: size_t packed_size = 1; size_t unpacked_size = 1; std::vector ranges; - bool convert_node = packed_ranges.size() > 1 || unpacked_ranges.size() > 1 || + bool convert_node = packed_ranges.size() > 1 || unpacked_ranges.size() > 1 || wire_node->type == AST::AST_PARAMETER || ((wire_node->is_input || wire_node->is_output) && ((packed_ranges.size() > 0 || unpacked_ranges.size() > 0))); for (auto id : identifers) { // if we accessing whole AST_MEMORY, we want to change AST_MEMORY to single RANGE, @@ -2659,7 +2659,13 @@ void UhdmAst::process_parameter() case vpiArrayTypespec: { shared.report.mark_handled(typespec_h); #ifdef BUILD_UPSTREAM - visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { + if (node && node->attributes.count(ID::packed_ranges)) { + for (auto r : node->attributes[ID::packed_ranges]->children) { + packed_ranges.push_back(r->clone()); + } + } + }); #else visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { if (node) { From 74ccb14885e7704ba26e5f39b6ea2f4e532a2078 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 24 Nov 2021 14:22:23 +0100 Subject: [PATCH 478/845] Fix assignments on declaration in functions Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 6bae72e63..6f918e958 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2203,6 +2203,17 @@ void UhdmAst::process_function() visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { if (node) { + // Fix for assignments on declaration, e.g.: + // logic [63:0] key_out = key_in; + // key_out is already declared as vpiVariables, but it is also declared inside vpiStmt + const std::unordered_set assign_types = {AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}; + for (auto c : node->children) { + if (assign_types.find(c->type) != assign_types.end() && c->children[0]->type == AST::AST_WIRE) { + c->children[0]->type = AST::AST_IDENTIFIER; + c->children[0]->attributes.erase(ID::packed_ranges); + c->children[0]->attributes.erase(ID::unpacked_ranges); + } + } current_node->children.push_back(node); } }); From 571efd786df36390cb181304b09c4e0bcca295d9 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 25 Nov 2021 11:52:21 +0100 Subject: [PATCH 479/845] Add support for handling hierarchical ref using AST_DOT Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 370 +++++++++++++++++++++++++++++++-- uhdm-plugin/UhdmAst.h | 5 +- uhdm-plugin/UhdmAstAntmicro.cc | 88 -------- uhdm-plugin/UhdmAstUpstream.cc | 80 +------ 4 files changed, 362 insertions(+), 181 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 33a1e779d..94e4c23ed 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -76,6 +76,112 @@ static std::string get_object_name(vpiHandle obj_h, const std::vector &name #include "UhdmAstAntmicro.cc" #endif +#ifdef BUILD_UPSTREAM +AST::AstNode *UhdmAst::expand_dot(const AST::AstNode *current_struct, const AST::AstNode *search_node) +{ + AST::AstNode *current_struct_elem = nullptr; + auto search_str = search_node->str.find("\\") == 0 ? search_node->str.substr(1) : search_node->str; + auto struct_elem_it = + std::find_if(current_struct->children.begin(), current_struct->children.end(), [&](AST::AstNode *node) { return node->str == search_str; }); + if (struct_elem_it == current_struct->children.end()) { + current_struct->dumpAst(NULL, "struct >"); + log_error("Couldn't find search elem: %s in struct\n", search_str.c_str()); + } + current_struct_elem = *struct_elem_it; + + AST::AstNode *left = nullptr, *right = nullptr; + if (current_struct_elem->type == AST::AST_STRUCT_ITEM) { + left = AST::AstNode::mkconst_int(current_struct_elem->range_left, true); + right = AST::AstNode::mkconst_int(current_struct_elem->range_right, true); + } else if (current_struct_elem->type == AST::AST_STRUCT) { + // Struct can have multiple range, so to get size of 1 struct, + // we get left range for first children, and right range for last children + left = AST::AstNode::mkconst_int(current_struct_elem->children.front()->range_left, true); + right = AST::AstNode::mkconst_int(current_struct_elem->children.back()->range_right, true); + } else { + // Structs currently can only have AST_STRUCT or AST_STRUCT_ITEM + // so, it should never happen + log_error("Found %s elem in struct that is currently unsupported!\n", type2str(current_struct_elem->type).c_str()); + } + + auto elem_size = + new AST::AstNode(AST::AST_ADD, new AST::AstNode(AST::AST_SUB, left->clone(), right->clone()), AST::AstNode::mkconst_int(1, true)); + AST::AstNode *sub_dot = nullptr; + AST::AstNode *struct_range = nullptr; + + for (auto c : search_node->children) { + if (c->type == AST::AST_DOT) { + // There should be only 1 AST_DOT node children + log_assert(!sub_dot); + sub_dot = expand_dot(current_struct_elem, c); + } + if (c->type == AST::AST_RANGE) { + // Currently supporting only 1 range + log_assert(!struct_range); + struct_range = c; + } + } + if (sub_dot) { + // First select correct element in first struct + delete left; + delete right; + left = sub_dot->children[0]; + right = sub_dot->children[1]; + } + if (struct_range) { + // now we have correct element set, + // but we still need to set correct struct + log_assert(!struct_range->children.empty()); + if (current_struct_elem->type == AST::AST_STRUCT_ITEM) { + // if we selecting range of struct item, just add this range + // to our current select + if (struct_range->children.size() == 2) { + auto range_size = new AST::AstNode( + AST::AST_ADD, new AST::AstNode(AST::AST_SUB, struct_range->children[0]->clone(), struct_range->children[1]->clone()), + AST::AstNode::mkconst_int(1, true)); + right = new AST::AstNode(AST::AST_ADD, right->clone(), struct_range->children[1]->clone()); + left = new AST::AstNode( + AST::AST_ADD, left, + new AST::AstNode(AST::AST_ADD, struct_range->children[1]->clone(), new AST::AstNode(AST::AST_SUB, range_size, elem_size->clone()))); + } else if (struct_range->children.size() == 1) { + right = new AST::AstNode(AST::AST_ADD, right, struct_range->children[0]->clone()); + delete left; + left = right->clone(); + } else { + struct_range->dumpAst(NULL, "range >"); + log_error("Unhandled range select (AST_STRUCT_ITEM) in AST_DOT!\n"); + } + } else if (current_struct_elem->type == AST::AST_STRUCT) { + if (struct_range->children.size() == 2 && struct_range->children[0]->type == AST::AST_CONSTANT && + struct_range->range_left != struct_range->range_right) { + // TODO: check if this is correct always, for now just add to current range selected range + right = new AST::AstNode(AST::AST_ADD, right, struct_range->children[1]->clone()); + auto range_size = new AST::AstNode( + AST::AST_ADD, new AST::AstNode(AST::AST_SUB, struct_range->children[0]->clone(), struct_range->children[1]->clone()), + AST::AstNode::mkconst_int(1, true)); + left = new AST::AstNode(AST::AST_ADD, left, new AST::AstNode(AST::AST_SUB, range_size, elem_size->clone())); + } else if (struct_range->children.size() == 1) { + AST::AstNode *mul = new AST::AstNode(AST::AST_MUL, elem_size->clone(), struct_range->children[0]->clone()); + + left = new AST::AstNode(AST::AST_ADD, left, mul); + right = new AST::AstNode(AST::AST_ADD, right, mul->clone()); + } else { + struct_range->dumpAst(NULL, "range >"); + log_error("Unhandled range select (AST_STRUCT) in AST_DOT!\n"); + log_assert(1 == 0); // should never happen + } + } else { + log_error("Found %s elem in struct that is currently unsupported!\n", type2str(current_struct_elem->type).c_str()); + log_assert(1 == 0); // should never happen + } + } + // Return range from the begining of *current* struct + // When all AST_DOT are expanded it will return range + // from original wire + return new AST::AstNode(AST::AST_RANGE, left, right); +} +#endif + void UhdmAst::visit_one_to_many(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f) { for (auto child : child_node_types) { @@ -106,14 +212,18 @@ void UhdmAst::visit_one_to_one(const std::vector child_node_types, vpiHandl #ifdef BUILD_UPSTREAM void UhdmAst::add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges) { - std::reverse(packed_ranges.begin(), packed_ranges.end()); node->attributes[ID::packed_ranges] = AST::AstNode::mkconst_int(1, false, 1); - node->attributes[ID::packed_ranges]->children.insert(node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), - packed_ranges.end()); + if (!packed_ranges.empty()) { + std::reverse(packed_ranges.begin(), packed_ranges.end()); + node->attributes[ID::packed_ranges]->children.insert(node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), + packed_ranges.end()); + } node->attributes[ID::unpacked_ranges] = AST::AstNode::mkconst_int(1, false, 1); - node->attributes[ID::unpacked_ranges]->children.insert(node->attributes[ID::unpacked_ranges]->children.end(), unpacked_ranges.begin(), - unpacked_ranges.end()); + if (!unpacked_ranges.empty()) { + node->attributes[ID::unpacked_ranges]->children.insert(node->attributes[ID::unpacked_ranges]->children.end(), unpacked_ranges.begin(), + unpacked_ranges.end()); + } } void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) @@ -1095,33 +1205,135 @@ size_t UhdmAst::add_multirange_attribute(AST::AstNode *wire_node, const std::vec return size; } -void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::function &f) +static int get_max_offset(AST::AstNode *node) { - for (auto child : node->children) { - if (node->type == AST::AST_MODULE || node->type == AST::AST_PACKAGE) { - shared.current_top_node = node; + // get the width from the MS member in the struct + // as members are laid out from left to right in the packed wire + log_assert(node->type == AST::AST_STRUCT || node->type == AST::AST_UNION); + while (node->range_left < 0) { + node = node->children[0]; + } + return node->range_left; +} + +AST::AstNode *UhdmAst::convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::AstNode *module_node, std::map &wires, + std::map>> &multirange_wires) +{ + AST::AstNode *wire_node = nullptr; + std::vector packed_ranges; + std::vector unpacked_ranges; + // Find wire node + auto current_scope = shared.multirange_scope; + // wire can be declared in previous scope + std::string id_name = ""; + while (!current_scope.empty() && !wires.count(id_name)) { + id_name = ""; + for (auto s : current_scope) { + id_name += s; + } + id_name += node->str; + if (!wires.count(id_name)) { + current_scope.pop_back(); + continue; } - if (node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK || node->type == AST::AST_FUNCTION) { - // TODO: if it is empty, we probably need to generate unique name - if (!node->str.empty()) { - shared.multirange_scope.push_back(node->str); + } + log_assert(wires.count(id_name)); + // We found wire node + // now we need to simplify it + wire_node = wires[id_name]; + // first check if it has ranges, if yes, convert them to regular ranges + if (wire_node->attributes.count(ID::packed_ranges)) { + for (auto r : wire_node->attributes[ID::packed_ranges]->children) { + packed_ranges.push_back(r->clone()); + } + } + if (wire_node->attributes.count(ID::unpacked_ranges)) { + for (auto r : wire_node->attributes[ID::unpacked_ranges]->children) { + unpacked_ranges.push_back(r->clone()); + } + } + // Now, import all packages, as wiretype can be declared inside package + for (auto it = shared.top_nodes.begin(); it != shared.top_nodes.end(); it++) { + if (it->second->type == AST::AST_PACKAGE) { + for (auto &o : it->second->children) { + // import only typedefs + if (o->type == AST::AST_TYPEDEF) { + // add imported nodes to current scope + AST_INTERNAL::current_scope[it->second->str + std::string("::") + o->str.substr(1)] = o; + } } } - f(child); - visitEachDescendant(child, f); - if (node->type == AST::AST_FUNCTION || node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK) - if (!node->str.empty()) - shared.multirange_scope.pop_back(); } + // hackish way of setting current_ast_mod as it is required + // for simplify to get references for already defined ids + log_assert(shared.current_top_node != nullptr); + AST_INTERNAL::current_ast_mod = shared.current_top_node; + visitEachDescendant(shared.current_top_node, [&](AST::AstNode *current_scope_node) { + if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_WIRE) { + AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; + } + }); + // we need to setup current top ast as this simplify + // needs to have access to all already definied ids + while (wire_node->simplify(true, false, false, 1, -1, false, false)) { + } + if (wire_node->children[0]->type == AST::AST_RANGE && wire_node->multirange_dimensions.empty()) { + packed_ranges.push_back(wire_node->children[0]); + wire_node->children.clear(); + add_multirange_wire(wire_node, packed_ranges, unpacked_ranges); + convert_packed_unpacked_range(wire_node, std::vector()); + multirange_wires.erase(id_name); + } + // Remove clear current_scope from package nodes + AST_INTERNAL::current_scope.clear(); + // unset current_ast_mod + AST_INTERNAL::current_ast_mod = nullptr; + + AST::AstNode *struct_node = nullptr; + if (wire_node->type == AST::AST_STRUCT) { + struct_node = wire_node; + } else if (wire_node->attributes.count(ID::wiretype)) { + log_assert(wire_node->attributes[ID::wiretype]->id2ast); + struct_node = wire_node->attributes[ID::wiretype]->id2ast; + } + log_assert(struct_node); + auto expanded = expand_dot(struct_node, dot); + if (node->children[0]->type == AST::AST_RANGE) { + int struct_size_int = get_max_offset(struct_node) + 1; + log_assert(!wire_node->multirange_dimensions.empty()); + int unpacked_range = wire_node->multirange_dimensions.back() - 1; + expanded->children[1] = new AST::AstNode(AST::AST_ADD, expanded->children[1], + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), + new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(unpacked_range, true, 32), + node->children[0]->children[0]->clone()))); + expanded->children[0] = new AST::AstNode(AST::AST_ADD, expanded->children[0], + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), + new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(unpacked_range, true, 32), + node->children[0]->children[0]->clone()))); + } + return expanded; } void UhdmAst::convert_multiranges(AST::AstNode *module_node) { std::map>> multirange_wires; + std::map wires; std::vector remove_ids; shared.multirange_scope.clear(); shared.multirange_scope.push_back(""); + AST::AstNode *expanded = nullptr; visitEachDescendant(module_node, [&](AST::AstNode *node) { + for (auto c : node->children) { + if (c->type == AST::AST_DOT && expanded == nullptr) { + expanded = convert_dot(node, c, module_node, wires, multirange_wires); + } + } + if (expanded != nullptr) { + node->children.clear(); + node->children.push_back(expanded->clone()); + expanded = nullptr; + return; + } // TODO: this is ugly, probably this could be done better // We can't convert AST_MEMORY if it is accessed by readmemh if (node->str == "\\$readmemh") { @@ -1133,6 +1345,9 @@ void UhdmAst::convert_multiranges(AST::AstNode *module_node) name += s; } name += node->str; + if (node->type == AST::AST_WIRE && !node->str.empty()) { + wires[name] = node; + } if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { if (node->attributes.count(ID::packed_ranges) || node->attributes.count(ID::unpacked_ranges)) { if (node->attributes[ID::packed_ranges]->children.empty() && node->attributes[ID::unpacked_ranges]->children.empty()) { @@ -1237,7 +1452,8 @@ void UhdmAst::convert_packed_unpacked_range(AST::AstNode *wire_node, const std:: size_t packed_size = 1; size_t unpacked_size = 1; std::vector ranges; - bool convert_node = packed_ranges.size() > 1 || unpacked_ranges.size() > 1 || wire_node->type == AST::AST_PARAMETER || + bool convert_node = packed_ranges.size() > 1 || unpacked_ranges.size() > 1 || wire_node->attributes.count(ID::wiretype) || + wire_node->type == AST::AST_PARAMETER || ((wire_node->is_input || wire_node->is_output) && ((packed_ranges.size() > 0 || unpacked_ranges.size() > 0))); for (auto id : identifers) { // if we accessing whole AST_MEMORY, we want to change AST_MEMORY to single RANGE, @@ -1304,6 +1520,30 @@ void UhdmAst::convert_packed_unpacked_range(AST::AstNode *wire_node, const std:: } #endif +void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::function &f) +{ +#ifdef BUILD_UPSTREAM + if (node->type == AST::AST_MODULE || node->type == AST::AST_PACKAGE) { + shared.current_top_node = node; + } + if (node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK || node->type == AST::AST_FUNCTION) { + // TODO: if it is empty, we probably need to generate unique name + if (!node->str.empty()) { + shared.multirange_scope.push_back(node->str); + } + } +#endif + for (auto child : node->children) { + f(child); + visitEachDescendant(child, f); + } +#ifdef BUILD_UPSTREAM + if (node->type == AST::AST_FUNCTION || node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK) + if (!node->str.empty()) + shared.multirange_scope.pop_back(); +#endif +} + void UhdmAst::process_array_net() { current_node = make_ast_node(AST::AST_WIRE); @@ -1647,9 +1887,13 @@ void UhdmAst::process_operation() break; case vpiLShiftOp: current_node->type = AST::AST_SHIFT_LEFT; + log_assert(current_node->children.size() == 2); + current_node->children[1]->is_signed = false; break; case vpiRShiftOp: current_node->type = AST::AST_SHIFT_RIGHT; + log_assert(current_node->children.size() == 2); + current_node->children[1]->is_signed = false; break; case vpiNotOp: current_node->type = AST::AST_LOGIC_NOT; @@ -2219,6 +2463,94 @@ void UhdmAst::process_function() }); } +void UhdmAst::process_hier_path() +{ + current_node = make_ast_node(AST::AST_IDENTIFIER); + current_node->str = "\\"; + AST::AstNode *top_node = nullptr; + visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { + if (node->str.find('[') != std::string::npos) + node->str = node->str.substr(0, node->str.find('[')); + // for first node, just set correct string and move any children + if (!top_node) { + current_node->str += node->str.substr(1); + current_node->children = std::move(node->children); + top_node = current_node; + delete node; + } else { // for other nodes, change type to AST_DOT + node->type = static_cast(AST::AST_DOT); + top_node->children.push_back(node); + top_node = node; + } + }); +} + +void UhdmAst::process_gen_scope_array() +{ + current_node = make_ast_node(AST::AST_GENBLOCK); + visit_one_to_many({vpiGenScope}, obj_h, [&](AST::AstNode *genscope_node) { + for (auto *child : genscope_node->children) { + if (child->type == AST::AST_PARAMETER || child->type == AST::AST_LOCALPARAM) { + auto param_str = child->str.substr(1); + auto array_str = "[" + param_str + "]"; + visitEachDescendant(genscope_node, [&](AST::AstNode *node) { + auto pos = node->str.find(array_str); + if (pos != std::string::npos) { + node->type = AST::AST_PREFIX; + auto *param = new AST::AstNode(AST::AST_IDENTIFIER); + param->str = child->str; + node->children.push_back(param); + auto bracket = node->str.rfind(']'); + if (bracket + 2 <= node->str.size()) { + auto *field = new AST::AstNode(AST::AST_IDENTIFIER); + field->str = "\\" + node->str.substr(bracket + 2); + node->children.push_back(field); + } + node->str = node->str.substr(0, node->str.find('[')); + } + }); + } + } + current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); + genscope_node->children.clear(); + delete genscope_node; + }); +} + +void UhdmAst::process_tagged_pattern() +{ + auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); + auto assign_type = AST::AST_ASSIGN; + AST::AstNode *lhs_node = nullptr; + if (assign_node) { + assign_type = assign_node->type; + lhs_node = assign_node->children[0]; + } else { + lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); + lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; + } + current_node = new AST::AstNode(assign_type); + current_node->children.push_back(lhs_node->clone()); + auto typespec_h = vpi_handle(vpiTypespec, obj_h); + if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { + std::string field_name = vpi_get_str(vpiName, typespec_h); + if (field_name != "default") { // TODO: better support of the default keyword + auto field = new AST::AstNode(static_cast(AST::AST_DOT)); + field->str = field_name; + current_node->children[0]->children.push_back(field); + } + } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { + s_vpi_value val; + vpi_get_value(typespec_h, &val); + auto range = new AST::AstNode(AST::AST_RANGE); + auto index = AST::AstNode::mkconst_int(val.value.integer, false); + range->children.push_back(index); + current_node->children[0]->children.push_back(range); + } + vpi_release_handle(typespec_h); + visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + void UhdmAst::process_logic_var() { current_node = make_ast_node(AST::AST_WIRE); diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index b08fe2d50..c8a363ce3 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -129,6 +129,7 @@ class UhdmAst void process_string_typespec(); void process_repeat(); void process_nonsynthesizable(const UHDM::BaseClass *object); + void visitEachDescendant(AST::AstNode *node, const std::function &f); #ifdef BUILD_UPSTREAM void add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges); @@ -138,7 +139,9 @@ class UhdmAst void convert_packed_unpacked_range(AST::AstNode *wire_node, const std::vector identifers); void convert_multiranges(AST::AstNode *module_node); size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges); - void visitEachDescendant(AST::AstNode *node, const std::function &f); + AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::AstNode *search_node); + AST::AstNode *convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::AstNode *module_node, std::map &wires, + std::map>> &multirange_wires); #endif UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) diff --git a/uhdm-plugin/UhdmAstAntmicro.cc b/uhdm-plugin/UhdmAstAntmicro.cc index d2170bf5d..c838b5b66 100644 --- a/uhdm-plugin/UhdmAstAntmicro.cc +++ b/uhdm-plugin/UhdmAstAntmicro.cc @@ -8,94 +8,6 @@ IdString unpacked_ranges{"\\unpacked_ranges"}; } // namespace RTLIL #define mkconst_real(x) AST::AstNode::mkconst_real(x) -void UhdmAst::process_tagged_pattern() -{ - auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); - auto assign_type = AST::AST_ASSIGN; - AST::AstNode *lhs_node = nullptr; - if (assign_node) { - assign_type = assign_node->type; - lhs_node = assign_node->children[0]; - } else { - lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); - lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; - } - current_node = new AST::AstNode(assign_type); - current_node->children.push_back(lhs_node->clone()); - auto typespec_h = vpi_handle(vpiTypespec, obj_h); - if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { - std::string field_name = vpi_get_str(vpiName, typespec_h); - if (field_name != "default") { // TODO: better support of the default keyword - auto field = new AST::AstNode(AST::AST_DOT); - field->str = field_name; - current_node->children[0]->children.push_back(field); - } - } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { - s_vpi_value val; - vpi_get_value(typespec_h, &val); - auto range = new AST::AstNode(AST::AST_RANGE); - auto index = AST::AstNode::mkconst_int(val.value.integer, false); - range->children.push_back(index); - current_node->children[0]->children.push_back(range); - } - vpi_release_handle(typespec_h); - visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -} - -void UhdmAst::process_gen_scope_array() -{ - current_node = make_ast_node(AST::AST_GENBLOCK); - visit_one_to_many({vpiGenScope}, obj_h, [&](AST::AstNode *genscope_node) { - for (auto *child : genscope_node->children) { - if (child->type == AST::AST_PARAMETER || child->type == AST::AST_LOCALPARAM) { - auto param_str = child->str.substr(1); - auto array_str = "[" + param_str + "]"; - genscope_node->visitEachDescendant([&](AST::AstNode *node) { - auto pos = node->str.find(array_str); - if (pos != std::string::npos) { - node->type = AST::AST_PREFIX; - auto *param = new AST::AstNode(AST::AST_IDENTIFIER); - param->str = child->str; - node->children.push_back(param); - auto bracket = node->str.rfind(']'); - if (bracket + 2 <= node->str.size()) { - auto *field = new AST::AstNode(AST::AST_IDENTIFIER); - field->str = "\\" + node->str.substr(bracket + 2); - node->children.push_back(field); - } - node->str = node->str.substr(0, node->str.find('[')); - } - }); - } - } - current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); - genscope_node->children.clear(); - delete genscope_node; - }); -} - -void UhdmAst::process_hier_path() -{ - current_node = make_ast_node(AST::AST_IDENTIFIER); - current_node->str = "\\"; - AST::AstNode *top_node = nullptr; - visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { - if (node->str.find('[') != std::string::npos) - node->str = node->str.substr(0, node->str.find('[')); - // for first node, just set correct string and move any children - if (!top_node) { - current_node->str += node->str.substr(1); - current_node->children = std::move(node->children); - top_node = current_node; - delete node; - } else { // for other nodes, change type to AST_DOT - node->type = AST::AST_DOT; - top_node->children.push_back(node); - top_node = node; - } - }); -} - void UhdmAst::process_packed_array_typespec() { current_node = make_ast_node(AST::AST_WIRE); diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index 398773bc3..b0645a545 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -8,6 +8,13 @@ IdString unpacked_ranges{"\\unpacked_ranges"}; } // namespace ID } // namespace RTLIL +namespace AST +{ +enum AstNodeTypeExtended { + AST_DOT = AST::AST_BIND + 1 // here we always want to point to the last element of yosys' AstNodeType +}; +} + static AST::AstNode *mkconst_real(double d) { AST::AstNode *node = new AST::AstNode(AST::AST_REALVALUE); @@ -216,79 +223,6 @@ AST::AstNode *const2ast(std::string code, char case_type, bool warn_z) } } // namespace VERILOG_FRONTEND -void UhdmAst::process_tagged_pattern() -{ - auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); - auto assign_type = AST::AST_ASSIGN; - AST::AstNode *lhs_node = nullptr; - if (assign_node) { - assign_type = assign_node->type; - lhs_node = assign_node->children[0]; - } else { - lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); - lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; - } - current_node = new AST::AstNode(assign_type); - current_node->children.push_back(lhs_node->clone()); - auto typespec_h = vpi_handle(vpiTypespec, obj_h); - if (vpi_get(vpiType, typespec_h) == vpiStringTypespec) { - std::string field_name = vpi_get_str(vpiName, typespec_h); - if (field_name != "default") { // TODO: better support of the default keyword - current_node->children[0]->str += '.' + field_name; - } - } else if (vpi_get(vpiType, typespec_h) == vpiIntegerTypespec) { - s_vpi_value val; - vpi_get_value(typespec_h, &val); - auto range = new AST::AstNode(AST::AST_RANGE); - auto index = AST::AstNode::mkconst_int(val.value.integer, false); - range->children.push_back(index); - current_node->children[0]->children.push_back(range); - } - vpi_release_handle(typespec_h); - visit_one_to_one({vpiPattern}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -} - -void UhdmAst::process_gen_scope_array() -{ - current_node = make_ast_node(AST::AST_GENBLOCK); - visit_one_to_many({vpiGenScope}, obj_h, [&](AST::AstNode *genscope_node) { - for (auto *child : genscope_node->children) { - if (child->type == AST::AST_PARAMETER || child->type == AST::AST_LOCALPARAM) { - auto param_str = child->str.substr(1); - auto array_str = "[" + param_str + "]"; - } - } - current_node->children.insert(current_node->children.end(), genscope_node->children.begin(), genscope_node->children.end()); - genscope_node->children.clear(); - delete genscope_node; - }); -} - -void UhdmAst::process_hier_path() -{ - current_node = make_ast_node(AST::AST_IDENTIFIER); - current_node->str = "\\"; - visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { - if (current_node->str == "\\" && !node->children.empty() && node->children[0]->type == AST::AST_RANGE) { - current_node->type = AST::AST_PREFIX; - current_node->str = node->str; - current_node->children.push_back(node->children[0]->children[0]->clone()); - delete node; - } else { - if (current_node->type == AST::AST_IDENTIFIER) { - if (current_node->str != "\\") { - current_node->str += "."; - } - current_node->str += node->str.substr(1); - current_node->children = std::move(node->children); - delete node; - } else { - current_node->children.push_back(node); - } - } - }); -} - void UhdmAst::process_packed_array_typespec() { current_node = make_ast_node(AST::AST_WIRE); From 467dc92f6dbac25668e10b096ebf7ee25dff4bfd Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 6 Dec 2021 09:09:55 +0100 Subject: [PATCH 480/845] Add support for vpiOctStrVal Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 94e4c23ed..c82c4d0d4 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -320,6 +320,10 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) strValType = "'h"; break; } + case vpiOctStrVal: { + strValType = "'o"; + break; + } // Surelog reports constant integers as a unsigned, but by default int is signed // so we are treating here UInt in the same way as if they would be Int case vpiUIntVal: From 5525f415266f82c8b75c3b3f3f2f620701d1f60e Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 6 Dec 2021 09:17:44 +0100 Subject: [PATCH 481/845] Add support for byte var Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 10 ++++++++++ uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 11 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 94e4c23ed..52413c9b7 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3049,6 +3049,13 @@ void UhdmAst::process_parameter() #endif } +void UhdmAst::process_byte_var() +{ + current_node = make_ast_node(AST::AST_WIRE); + current_node->children.push_back(make_range(7, 0)); + current_node->is_signed = vpi_get(vpiSigned, obj_h); +} + AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) { obj_h = obj_handle; @@ -3255,6 +3262,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiRepeat: process_repeat(); break; + case vpiByteVar: + process_byte_var(); + break; case vpiProgram: default: report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index c8a363ce3..93b7ff310 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -128,6 +128,7 @@ class UhdmAst void process_string_var(); void process_string_typespec(); void process_repeat(); + void process_byte_var(); void process_nonsynthesizable(const UHDM::BaseClass *object); void visitEachDescendant(AST::AstNode *node, const std::function &f); From ba70fc18d7bc0ba6bb12bd2397585b5b0abbce9f Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 6 Dec 2021 09:27:38 +0100 Subject: [PATCH 482/845] Ignore just delay_control stmt Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 94e4c23ed..de53b383e 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1729,15 +1729,13 @@ void UhdmAst::process_always() { current_node = make_ast_node(AST::AST_ALWAYS); visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { - if (node) { - AST::AstNode *block = nullptr; - if (node->type != AST::AST_BLOCK) { - block = new AST::AstNode(AST::AST_BLOCK, node); - } else { - block = node; - } - current_node->children.push_back(block); + AST::AstNode *block = nullptr; + if (node && node->type != AST::AST_BLOCK) { + block = new AST::AstNode(AST::AST_BLOCK, node); + } else { + block = node; } + current_node->children.push_back(block); }); switch (vpi_get(vpiAlwaysType, obj_h)) { case vpiAlwaysComb: @@ -2630,6 +2628,11 @@ void UhdmAst::process_immediate_assert() void UhdmAst::process_nonsynthesizable(const UHDM::BaseClass *object) { log_warning("%s:%d: Non-synthesizable object of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), UHDM::VpiTypeName(obj_h).c_str()); + current_node = make_ast_node(AST::AST_BLOCK); + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + if (node) + current_node->children.push_back(node); + }); } void UhdmAst::process_logic_typespec() From 12fc2033c96358663d533b7bf49ebed5f5c13227 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 6 Dec 2021 09:40:40 +0100 Subject: [PATCH 483/845] Add support for long int var Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 10 ++++++++++ uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 11 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 52413c9b7..ecc9abe1e 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3056,6 +3056,13 @@ void UhdmAst::process_byte_var() current_node->is_signed = vpi_get(vpiSigned, obj_h); } +void UhdmAst::process_long_int_var() +{ + current_node = make_ast_node(AST::AST_WIRE); + current_node->children.push_back(make_range(63, 0)); + current_node->is_signed = vpi_get(vpiSigned, obj_h); +} + AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) { obj_h = obj_handle; @@ -3265,6 +3272,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiByteVar: process_byte_var(); break; + case vpiLongIntVar: + process_long_int_var(); + break; case vpiProgram: default: report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 93b7ff310..41c92da7c 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -129,6 +129,7 @@ class UhdmAst void process_string_typespec(); void process_repeat(); void process_byte_var(); + void process_long_int_var(); void process_nonsynthesizable(const UHDM::BaseClass *object); void visitEachDescendant(AST::AstNode *node, const std::function &f); From 5c085402380b73003610f73afc48ec442ad5a8d9 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 6 Dec 2021 09:48:39 +0100 Subject: [PATCH 484/845] Define make_range also for antmicro build type Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ecc9abe1e..80b6b2826 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1163,7 +1163,6 @@ void UhdmAst::process_packed_array_net() visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); } -#ifdef BUILD_UPSTREAM static AST::AstNode *make_range(int left, int right, bool is_signed = false) { // generate a pre-validated range node for a fixed signal range. @@ -1177,6 +1176,7 @@ static AST::AstNode *make_range(int left, int right, bool is_signed = false) return range; } +#ifdef BUILD_UPSTREAM size_t UhdmAst::add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges) { size_t size = 1; From 5d6e54ffe5e4b0379c1635e4a84cea7709895107 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 30 Nov 2021 13:55:01 +0100 Subject: [PATCH 485/845] Adapt enum in struct to mainline yosys syntax Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index c6862e97d..e07700480 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -70,6 +70,19 @@ static std::string get_object_name(vpiHandle obj_h, const std::vector &name return objectName; } +static AST::AstNode *make_range(int left, int right, bool is_signed = false) +{ + // generate a pre-validated range node for a fixed signal range. + auto range = new AST::AstNode(AST::AST_RANGE); + range->range_left = left; + range->range_right = right; + range->range_valid = true; + range->children.push_back(AST::AstNode::mkconst_int(left, true)); + range->children.push_back(AST::AstNode::mkconst_int(right, true)); + range->is_signed = is_signed; + return range; +} + #ifdef BUILD_UPSTREAM #include "UhdmAstUpstream.cc" #else @@ -767,7 +780,23 @@ void UhdmAst::process_module() void UhdmAst::process_struct_typespec() { current_node = make_ast_node(AST::AST_STRUCT); - visit_one_to_many({vpiTypespecMember}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_many({vpiTypespecMember}, obj_h, [&](AST::AstNode *node) { + if (node->children.size() > 0 && node->children[0]->type == AST::AST_ENUM) { + log_assert(node->children.size() == 1); + log_assert(!node->children[0]->children.empty()); + log_assert(!node->children[0]->children[0]->children.empty()); + // TODO: add missing enum_type attribute + auto range = make_range(0, 0); + // check if single enum element is larger than 1 bit + if (node->children[0]->children[0]->children.size() == 2) { + range = node->children[0]->children[0]->children[1]->clone(); + } + delete node->children[0]; + node->children.clear(); + node->children.push_back(range); + } + current_node->children.push_back(node); + }); } void UhdmAst::process_array_typespec() From e6a441419b85a17e5b9fe14a2977a0d34a9d8724 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 30 Nov 2021 15:51:43 +0100 Subject: [PATCH 486/845] Add support for wiretype with multirange Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 175 +++++++++++++++++++++++++++------ uhdm-plugin/UhdmAst.h | 1 + uhdm-plugin/UhdmAstAntmicro.cc | 22 ----- uhdm-plugin/UhdmAstUpstream.cc | 21 ---- 4 files changed, 144 insertions(+), 75 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index e07700480..0a43ac529 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -398,6 +398,46 @@ AST::AstNode *UhdmAst::make_ast_node(AST::AstNodeType type, std::vector packed_ranges; + std::vector unpacked_ranges; +#endif + current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { + if (node && node->type == AST::AST_STRUCT) { + auto str = current_node->str; + node->cloneInto(current_node); + current_node->str = str; + delete node; + } else if (node) { + current_node->str = node->str; +#ifdef BUILD_UPSTREAM + if (node->type == AST::AST_ENUM) { + if (!node->children.empty()) { + for (auto c : node->children[0]->children) { + if (c->type == AST::AST_RANGE) + unpacked_ranges.push_back(c->clone()); + } + } + } +#endif + delete node; + } + }); +#ifdef BUILD_UPSTREAM + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#else + visit_range(obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +#endif +} + static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) { if (!child->str.empty()) { @@ -425,6 +465,10 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) if ((*it)->attributes.count(ID::packed_ranges) && child->attributes.count(ID::packed_ranges)) { if ((!(*it)->attributes[ID::packed_ranges]->children.empty() && child->attributes[ID::packed_ranges]->children.empty())) { child->attributes[ID::packed_ranges] = (*it)->attributes[ID::packed_ranges]->clone(); + } + } + if ((*it)->attributes.count(ID::unpacked_ranges) && child->attributes.count(ID::unpacked_ranges)) { + if ((!(*it)->attributes[ID::unpacked_ranges]->children.empty() && child->attributes[ID::unpacked_ranges]->children.empty())) { child->attributes[ID::unpacked_ranges] = (*it)->attributes[ID::unpacked_ranges]->clone(); } } @@ -889,6 +933,20 @@ void UhdmAst::process_typespec_member() } } vpi_release_handle(typespec_h); +#ifdef BUILD_UPSTREAM + if (current_node->attributes.count(ID::packed_ranges)) { + for (auto r : current_node->attributes[ID::packed_ranges]->children) { + current_node->children.push_back(r->clone()); + } + current_node->attributes.erase(ID::packed_ranges); + } + if (current_node->attributes.count(ID::unpacked_ranges)) { + for (auto r : current_node->attributes[ID::unpacked_ranges]->children) { + current_node->children.push_back(r->clone()); + } + current_node->attributes.erase(ID::unpacked_ranges); + } +#endif } void UhdmAst::process_enum_typespec() @@ -1187,13 +1245,22 @@ void UhdmAst::process_assignment() void UhdmAst::process_packed_array_net() { +#ifdef BUILD_UPSTREAM + std::vector packed_ranges; + std::vector unpacked_ranges; +#endif current_node = make_ast_node(AST::AST_WIRE); visit_one_to_many({vpiElement}, obj_h, [&](AST::AstNode *node) { if (node && GetSize(node->children) == 1) current_node->children.push_back(node->children[0]); current_node->is_custom_type = node->is_custom_type; }); +#ifdef BUILD_UPSTREAM + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#else visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +#endif } static AST::AstNode *make_range(int left, int right, bool is_signed = false) @@ -1249,32 +1316,11 @@ static int get_max_offset(AST::AstNode *node) return node->range_left; } -AST::AstNode *UhdmAst::convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::AstNode *module_node, std::map &wires, - std::map>> &multirange_wires) +void UhdmAst::resolve_wiretype(AST::AstNode *wire_node) { - AST::AstNode *wire_node = nullptr; std::vector packed_ranges; std::vector unpacked_ranges; - // Find wire node - auto current_scope = shared.multirange_scope; - // wire can be declared in previous scope - std::string id_name = ""; - while (!current_scope.empty() && !wires.count(id_name)) { - id_name = ""; - for (auto s : current_scope) { - id_name += s; - } - id_name += node->str; - if (!wires.count(id_name)) { - current_scope.pop_back(); - continue; - } - } - log_assert(wires.count(id_name)); - // We found wire node - // now we need to simplify it - wire_node = wires[id_name]; - // first check if it has ranges, if yes, convert them to regular ranges + // First check if it has already defined ranges if (wire_node->attributes.count(ID::packed_ranges)) { for (auto r : wire_node->attributes[ID::packed_ranges]->children) { packed_ranges.push_back(r->clone()); @@ -1285,14 +1331,16 @@ AST::AstNode *UhdmAst::convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::A unpacked_ranges.push_back(r->clone()); } } - // Now, import all packages, as wiretype can be declared inside package + // then, import all packages to current_scope, as wiretype can be declared inside package for (auto it = shared.top_nodes.begin(); it != shared.top_nodes.end(); it++) { if (it->second->type == AST::AST_PACKAGE) { for (auto &o : it->second->children) { - // import only typedefs + // import only typedefs and enums if (o->type == AST::AST_TYPEDEF) { // add imported nodes to current scope AST_INTERNAL::current_scope[it->second->str + std::string("::") + o->str.substr(1)] = o; + } else if (o->type == AST::AST_ENUM) { + AST_INTERNAL::current_scope[o->str] = o; } } } @@ -1302,10 +1350,32 @@ AST::AstNode *UhdmAst::convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::A log_assert(shared.current_top_node != nullptr); AST_INTERNAL::current_ast_mod = shared.current_top_node; visitEachDescendant(shared.current_top_node, [&](AST::AstNode *current_scope_node) { - if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_WIRE) { + if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_WIRE || current_scope_node->type == AST::AST_ENUM) { AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; } }); + if (!wire_node->children.empty()) { + if (wire_node->children[0]->type == AST::AST_WIRETYPE) { + if (AST_INTERNAL::current_scope.count(wire_node->children[0]->str)) { + auto wiretype_node = AST_INTERNAL::current_scope[wire_node->children[0]->str]; + + visitEachDescendant(wiretype_node, [&](AST::AstNode *node) { + if (node->attributes.count(ID::packed_ranges)) { + for (auto r : node->attributes[ID::packed_ranges]->children) { + node->children.push_back(r->clone()); + } + node->attributes.erase(ID::packed_ranges); + } + if (node->attributes.count(ID::unpacked_ranges)) { + for (auto r : node->attributes[ID::unpacked_ranges]->children) { + node->children.push_back(r->clone()); + } + node->attributes.erase(ID::unpacked_ranges); + } + }); + } + } + } // we need to setup current top ast as this simplify // needs to have access to all already definied ids while (wire_node->simplify(true, false, false, 1, -1, false, false)) { @@ -1314,13 +1384,43 @@ AST::AstNode *UhdmAst::convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::A packed_ranges.push_back(wire_node->children[0]); wire_node->children.clear(); add_multirange_wire(wire_node, packed_ranges, unpacked_ranges); - convert_packed_unpacked_range(wire_node, std::vector()); - multirange_wires.erase(id_name); } // Remove clear current_scope from package nodes AST_INTERNAL::current_scope.clear(); // unset current_ast_mod AST_INTERNAL::current_ast_mod = nullptr; +} + +AST::AstNode *UhdmAst::convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::AstNode *module_node, std::map &wires, + std::map>> &multirange_wires) +{ + AST::AstNode *wire_node = nullptr; + std::vector packed_ranges; + std::vector unpacked_ranges; + // Find wire node + auto current_scope = shared.multirange_scope; + // wire can be declared in previous scope + std::string id_name = ""; + while (!current_scope.empty() && !wires.count(id_name)) { + id_name = ""; + for (auto s : current_scope) { + id_name += s; + } + id_name += node->str; + if (!wires.count(id_name)) { + current_scope.pop_back(); + continue; + } + } + log_assert(wires.count(id_name)); + // We found wire node + wire_node = wires[id_name]; + + // convert and resolve wiretype + if (!wire_node->attributes.count(ID::wiretype)) { + convert_packed_unpacked_range(wire_node, std::vector()); + multirange_wires.erase(id_name); + } AST::AstNode *struct_node = nullptr; if (wire_node->type == AST::AST_STRUCT) { @@ -1415,7 +1515,9 @@ void UhdmAst::convert_multiranges(AST::AstNode *module_node) } }); for (auto m : multirange_wires) { - convert_packed_unpacked_range(m.second.first, m.second.second); + if (!m.second.first->attributes.count(ID::wiretype)) { + convert_packed_unpacked_range(m.second.first, m.second.second); + } } } @@ -1476,9 +1578,10 @@ AST::AstNode *UhdmAst::convert_range(const AST::AstNode *id, const std::vector identifers) { + if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) + resolve_wiretype(wire_node); const std::vector packed_ranges = wire_node->attributes[ID::packed_ranges]->children; const std::vector unpacked_ranges = wire_node->attributes[ID::unpacked_ranges]->children; size_t size = 1; @@ -1559,7 +1662,7 @@ void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::functiontype == AST::AST_MODULE || node->type == AST::AST_PACKAGE) { shared.current_top_node = node; } - if (node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK || node->type == AST::AST_FUNCTION) { + if (node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK || node->type == AST::AST_FUNCTION || node->type == AST::AST_TYPEDEF) { // TODO: if it is empty, we probably need to generate unique name if (!node->str.empty()) { shared.multirange_scope.push_back(node->str); @@ -1571,7 +1674,7 @@ void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::functiontype == AST::AST_FUNCTION || node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK) + if (node->type == AST::AST_FUNCTION || node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK || node->type == AST::AST_TYPEDEF) if (!node->str.empty()) shared.multirange_scope.pop_back(); #endif @@ -2887,11 +2990,19 @@ void UhdmAst::process_port() } } }); +#ifdef BUILD_UPSTREAM + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); +#else visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +#endif shared.report.mark_handled(actual_h); break; case vpiPackedArrayNet: +#ifdef BUILD_UPSTREAM + visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); +#else visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +#endif shared.report.mark_handled(actual_h); break; case vpiArrayVar: diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 41c92da7c..857c499b4 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -144,6 +144,7 @@ class UhdmAst AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::AstNode *search_node); AST::AstNode *convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::AstNode *module_node, std::map &wires, std::map>> &multirange_wires); + void resolve_wiretype(AST::AstNode *wire_node); #endif UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) diff --git a/uhdm-plugin/UhdmAstAntmicro.cc b/uhdm-plugin/UhdmAstAntmicro.cc index c838b5b66..838691f6f 100644 --- a/uhdm-plugin/UhdmAstAntmicro.cc +++ b/uhdm-plugin/UhdmAstAntmicro.cc @@ -7,25 +7,3 @@ IdString unpacked_ranges{"\\unpacked_ranges"}; } // namespace ID } // namespace RTLIL #define mkconst_real(x) AST::AstNode::mkconst_real(x) - -void UhdmAst::process_packed_array_typespec() -{ - current_node = make_ast_node(AST::AST_WIRE); - visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { - if (node && node->type == AST::AST_STRUCT) { - auto str = current_node->str; - node->cloneInto(current_node); - current_node->str = str; - delete node; - } else if (node) { - current_node->str = node->str; - delete node; - } - }); - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) { - node->is_packed = true; - current_node->children.push_back(node); - } - }); -} diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index b0645a545..a4e383908 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -222,24 +222,3 @@ AST::AstNode *const2ast(std::string code, char case_type, bool warn_z) return NULL; } } // namespace VERILOG_FRONTEND - -void UhdmAst::process_packed_array_typespec() -{ - current_node = make_ast_node(AST::AST_WIRE); - visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { - if (node && node->type == AST::AST_STRUCT) { - auto str = current_node->str; - node->cloneInto(current_node); - current_node->str = str; - delete node; - } else if (node) { - current_node->str = node->str; - delete node; - } - }); - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->children.push_back(node); - } - }); -} From 1c26b7db186ce535610a8accec10cfdf400f2c52 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 3 Dec 2021 15:30:26 +0100 Subject: [PATCH 487/845] Fix access to whole struct, when we also accessing element of it Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 0a43ac529..f77a3fb81 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1419,7 +1419,6 @@ AST::AstNode *UhdmAst::convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::A // convert and resolve wiretype if (!wire_node->attributes.count(ID::wiretype)) { convert_packed_unpacked_range(wire_node, std::vector()); - multirange_wires.erase(id_name); } AST::AstNode *struct_node = nullptr; @@ -1515,9 +1514,7 @@ void UhdmAst::convert_multiranges(AST::AstNode *module_node) } }); for (auto m : multirange_wires) { - if (!m.second.first->attributes.count(ID::wiretype)) { - convert_packed_unpacked_range(m.second.first, m.second.second); - } + convert_packed_unpacked_range(m.second.first, m.second.second); } } @@ -1605,10 +1602,12 @@ void UhdmAst::convert_packed_unpacked_range(AST::AstNode *wire_node, const std:: } // Convert only when atleast 1 of the ranges has more then 1 range if (convert_node) { - packed_size = add_multirange_attribute(wire_node, packed_ranges); - unpacked_size = add_multirange_attribute(wire_node, unpacked_ranges); - size = packed_size * unpacked_size; - ranges.push_back(make_range(size - 1, 0)); + if (wire_node->multirange_dimensions.empty()) { + packed_size = add_multirange_attribute(wire_node, packed_ranges); + unpacked_size = add_multirange_attribute(wire_node, unpacked_ranges); + size = packed_size * unpacked_size; + ranges.push_back(make_range(size - 1, 0)); + } if (size > 0) { for (auto id : identifers) { if (id->children.empty()) @@ -1648,9 +1647,6 @@ void UhdmAst::convert_packed_unpacked_range(AST::AstNode *wire_node, const std:: } } - // Remove now unneeded anymore attributes - wire_node->attributes.erase(ID::packed_ranges); - wire_node->attributes.erase(ID::unpacked_ranges); // Insert new range wire_node->children.insert(wire_node->children.end(), ranges.begin(), ranges.end()); } From f50e72f4ef3c636fa3f52dd137a30f5e3c720162 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 6 Dec 2021 08:44:03 +0100 Subject: [PATCH 488/845] Set id2ast of wiretype Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index f77a3fb81..cd0e0a66a 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1376,10 +1376,19 @@ void UhdmAst::resolve_wiretype(AST::AstNode *wire_node) } } } + AST::AstNode *wiretype_ast = nullptr; + if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) { + log_assert(AST_INTERNAL::current_scope.count(wire_node->children[0]->str)); + wiretype_ast = AST_INTERNAL::current_scope[wire_node->children[0]->str]; + } // we need to setup current top ast as this simplify // needs to have access to all already definied ids while (wire_node->simplify(true, false, false, 1, -1, false, false)) { } + if (wiretype_ast && wire_node->attributes.count(ID::wiretype)) { + log_assert(wiretype_ast->type == AST::AST_TYPEDEF); + wire_node->attributes[ID::wiretype]->id2ast = wiretype_ast->children[0]; + } if (wire_node->children[0]->type == AST::AST_RANGE && wire_node->multirange_dimensions.empty()) { packed_ranges.push_back(wire_node->children[0]); wire_node->children.clear(); From ee3c70750e03a2d6431aa8fde51b7e3c0bdc7db4 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 6 Dec 2021 10:47:39 +0100 Subject: [PATCH 489/845] Fix review comments Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 60 +++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index cd0e0a66a..153234ec7 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -414,12 +414,10 @@ void UhdmAst::process_packed_array_typespec() } else if (node) { current_node->str = node->str; #ifdef BUILD_UPSTREAM - if (node->type == AST::AST_ENUM) { - if (!node->children.empty()) { - for (auto c : node->children[0]->children) { - if (c->type == AST::AST_RANGE) - unpacked_ranges.push_back(c->clone()); - } + if (node->type == AST::AST_ENUM && !node->children.empty()) { + for (auto c : node->children[0]->children) { + if (c->type == AST::AST_RANGE) + unpacked_ranges.push_back(c->clone()); } } #endif @@ -1263,19 +1261,6 @@ void UhdmAst::process_packed_array_net() #endif } -static AST::AstNode *make_range(int left, int right, bool is_signed = false) -{ - // generate a pre-validated range node for a fixed signal range. - auto range = new AST::AstNode(AST::AST_RANGE); - range->range_left = left; - range->range_right = right; - range->range_valid = true; - range->children.push_back(AST::AstNode::mkconst_int(left, true)); - range->children.push_back(AST::AstNode::mkconst_int(right, true)); - range->is_signed = is_signed; - return range; -} - #ifdef BUILD_UPSTREAM size_t UhdmAst::add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges) { @@ -1354,27 +1339,24 @@ void UhdmAst::resolve_wiretype(AST::AstNode *wire_node) AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; } }); - if (!wire_node->children.empty()) { - if (wire_node->children[0]->type == AST::AST_WIRETYPE) { - if (AST_INTERNAL::current_scope.count(wire_node->children[0]->str)) { - auto wiretype_node = AST_INTERNAL::current_scope[wire_node->children[0]->str]; - - visitEachDescendant(wiretype_node, [&](AST::AstNode *node) { - if (node->attributes.count(ID::packed_ranges)) { - for (auto r : node->attributes[ID::packed_ranges]->children) { - node->children.push_back(r->clone()); - } - node->attributes.erase(ID::packed_ranges); - } - if (node->attributes.count(ID::unpacked_ranges)) { - for (auto r : node->attributes[ID::unpacked_ranges]->children) { - node->children.push_back(r->clone()); - } - node->attributes.erase(ID::unpacked_ranges); - } - }); + if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE && + AST_INTERNAL::current_scope.count(wire_node->children[0]->str)) { + auto wiretype_node = AST_INTERNAL::current_scope[wire_node->children[0]->str]; + + visitEachDescendant(wiretype_node, [&](AST::AstNode *node) { + if (node->attributes.count(ID::packed_ranges)) { + for (auto r : node->attributes[ID::packed_ranges]->children) { + node->children.push_back(r->clone()); + } + node->attributes.erase(ID::packed_ranges); } - } + if (node->attributes.count(ID::unpacked_ranges)) { + for (auto r : node->attributes[ID::unpacked_ranges]->children) { + node->children.push_back(r->clone()); + } + node->attributes.erase(ID::unpacked_ranges); + } + }); } AST::AstNode *wiretype_ast = nullptr; if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) { From 6afc3f54fa0c9a742225005f57a426adf1d78165 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Tue, 7 Dec 2021 05:30:19 -0800 Subject: [PATCH 490/845] add dsp blackbox support for k6n10f Signed-off-by: Tarachand Pagarani --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 98dd2d9f4..fbdeedc64 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -663,3 +663,23 @@ module TDP_BRAM36 ( parameter integer WRITE_WIDTH_B = 0; endmodule + +(* blackbox *) +module QL_DSP1 ( + input [19:0] a, + input [17:0] b, + input clk0, + (* clkbuf_sink *) + input clk1, + (* clkbuf_sink *) + input [ 1:0] feedback0, + input [ 1:0] feedback1, + input load_acc0, + input load_acc1, + input reset0, + input reset1, + output reg [37:0] z +); + parameter MODE_BITS = 27'b00000000000000000000000000; +endmodule /* QL_DSP1 */ + From 33996be3eb32265fbe84abf342d34361f1ab165b Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 10 Dec 2021 12:59:36 +0100 Subject: [PATCH 491/845] Skip $value$plusargs function This function is currently unsupported by yosys Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 153234ec7..68a5a2033 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2722,6 +2722,12 @@ void UhdmAst::process_sys_func_call() current_node->children.push_back(node); } }); + + // skip $value$plusargs function, as it is simulation function + if (current_node->str == "\\$value$plusargs") { + delete current_node; + current_node = nullptr; + } } void UhdmAst::process_func_call() From e732445aa57f5e2caa257e889e980ba976f009d8 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 10 Dec 2021 13:02:42 +0100 Subject: [PATCH 492/845] Check for variables inside block Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 68a5a2033..3154bd25c 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1925,6 +1925,13 @@ void UhdmAst::process_begin() } } }); + // TODO: find out how to set VERILOG_FRONTEND::sv_mode to true + // simplify checks if sv_mode is set to ture when wire is declared inside unnamed block + /*visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + });*/ } void UhdmAst::process_operation() From 803582542471e6b043ba7601309a5bb32f11bae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 10 Dec 2021 16:51:57 +0100 Subject: [PATCH 493/845] xdc: fix port numbering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: PaweÅ‚ Czarnecki --- xdc-plugin/xdc.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 387d19166..45ef532be 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -342,7 +342,11 @@ struct SetProperty : public Pass { if (signal.is_chunk()) { auto chunk = signal.as_chunk(); if (chunk.wire) { - return (chunk.wire->name == RTLIL::IdString(RTLIL::escape_id(port))) && (port_bit == chunk.offset); + // chunk.offset is always indexed from 0. Because of that port_bit must be + // corrected with the chunk.wire->start_offset of the port wire in case it is not 0-indexed. + // Not doing this would cause lack of some properties (e.g. IO_LOC_PAIRS) for + // non-0-indexed ports in final eblif file + return (chunk.wire->name == RTLIL::IdString(RTLIL::escape_id(port))) && ((port_bit - chunk.wire->start_offset) == chunk.offset); } } return false; From 9cbe9c1f7e61e61a0e0bf892bc46525e5e424c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 10 Dec 2021 17:43:43 +0100 Subject: [PATCH 494/845] xdc: add test case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: PaweÅ‚ Czarnecki --- xdc-plugin/tests/Makefile | 5 +++- .../non_zero_port_indexes.golden.json | 18 +++++++++++++ .../non_zero_port_indexes.tcl | 25 +++++++++++++++++++ .../non_zero_port_indexes.v | 15 +++++++++++ .../non_zero_port_indexes.xdc | 4 +++ 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.golden.json create mode 100644 xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl create mode 100644 xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v create mode 100644 xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.xdc diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index f96a6f1e6..c5dd666bc 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -13,13 +13,15 @@ # io_loc_pairs - test for LOC property being set on IOBUFs as the IO_LOC_PAIRS parameter # minilitex_ddr_arty - litex design with more types of IOBUFS including differential # package_pins - test for PACKAGE_PIN property being set on IOBUFs as the IO_LOC_PAIRS parameter +# non_zero_port_indexes - testing IO_LOC_PAIRS for design with non-zero indexed ports TESTS = counter \ counter-dict \ package_pins-dict-space \ port_indexes \ io_loc_pairs \ minilitex_ddr_arty \ - package_pins + package_pins \ + non_zero_port_indexes include $(shell pwd)/../../Makefile_test.common @@ -37,3 +39,4 @@ io_loc_pairs_verify = $(call json_test,io_loc_pairs) minilitex_ddr_arty_verify = $(call json_test,minilitex_ddr_arty) package_pins_verify = $(call json_test,package_pins) package_pins-dict-space_verify = $(call json_test,package_pins-dict-space) +non_zero_port_indexes_verify = $(call json_test,non_zero_port_indexes) diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.golden.json b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.golden.json new file mode 100644 index 000000000..980b4cf52 --- /dev/null +++ b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.golden.json @@ -0,0 +1,18 @@ +{ + "$iopadmap$top.LED": { + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "LED[2]:H5" + }, + "$iopadmap$top.LED_1": { + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "LED[3]:J5" + }, + "$iopadmap$top.LED_2": { + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "LED[4]:T9" + }, + "$iopadmap$top.LED_3": { + "IOSTANDARD": "LVCMOS33", + "IO_LOC_PAIRS": "LED[5]:T10" + } +} diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl new file mode 100644 index 000000000..60552c2db --- /dev/null +++ b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl @@ -0,0 +1,25 @@ +yosys -import +if { [info procs get_ports] == {} } { plugin -i design_introspection } +if { [info procs read_xdc] == {} } { plugin -i xdc } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v + +read_verilog -lib -specify +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v + +hierarchy -check -top top + +# -flatten is used to ensure that the output eblif has only one module. +# Some of symbiflow expects eblifs with only one module. +synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -run prepare:check + +#Read the design constraints +read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc + +# Clean processes before writing JSON. +yosys proc + +# Write the design in JSON format. +write_json [test_output_path "non_zero_port_indexes.json"] +write_blif -param [test_output_path "non_zero_port_indexes.eblif"] diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v new file mode 100644 index 000000000..2e09e24cd --- /dev/null +++ b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v @@ -0,0 +1,15 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module top( + output [5:2] LED + ); + + assign LED[5:2] = 4'b1010; + +endmodule diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.xdc b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.xdc new file mode 100644 index 000000000..6a9af2060 --- /dev/null +++ b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.xdc @@ -0,0 +1,4 @@ +set_property -dict { PACKAGE_PIN H5 IOSTANDARD LVCMOS33 } [get_ports { LED[2] }]; +set_property -dict { PACKAGE_PIN J5 IOSTANDARD LVCMOS33 } [get_ports { LED[3] }]; +set_property -dict { PACKAGE_PIN T9 IOSTANDARD LVCMOS33 } [get_ports { LED[4] }]; +set_property -dict { PACKAGE_PIN T10 IOSTANDARD LVCMOS33 } [get_ports { LED[5] }]; From 5114026636b4700d412eb7fc2555bf37d29391e2 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 6 Dec 2021 15:12:42 +0100 Subject: [PATCH 495/845] Changes required by newest Surelog Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 115 +++++++++++++++++++++++++++++---- uhdm-plugin/UhdmAst.h | 4 +- uhdm-plugin/UhdmAstUpstream.cc | 1 + 3 files changed, 106 insertions(+), 14 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 3154bd25c..bb555488e 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -223,11 +223,13 @@ void UhdmAst::visit_one_to_one(const std::vector child_node_types, vpiHandl } #ifdef BUILD_UPSTREAM -void UhdmAst::add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges) +void UhdmAst::add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges, + bool reverse) { node->attributes[ID::packed_ranges] = AST::AstNode::mkconst_int(1, false, 1); if (!packed_ranges.empty()) { - std::reverse(packed_ranges.begin(), packed_ranges.end()); + if (reverse) + std::reverse(packed_ranges.begin(), packed_ranges.end()); node->attributes[ID::packed_ranges]->children.insert(node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), packed_ranges.end()); } @@ -657,6 +659,55 @@ void UhdmAst::process_design() } } +#ifdef BUILD_UPSTREAM +void UhdmAst::simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node) +{ + for (auto it = shared.top_nodes.begin(); it != shared.top_nodes.end(); it++) { + if (it->second->type == AST::AST_PACKAGE) { + for (auto &o : it->second->children) { + // import only parameters + if (o->type == AST::AST_TYPEDEF || o->type == AST::AST_PARAMETER || o->type == AST::AST_LOCALPARAM) { + // add imported nodes to current scope + AST_INTERNAL::current_scope[it->second->str + std::string("::") + o->str.substr(1)] = o; + AST_INTERNAL::current_scope[o->str] = o; + } else if (o->type == AST::AST_ENUM) { + AST_INTERNAL::current_scope[o->str] = o; + for (auto c : o->children) { + AST_INTERNAL::current_scope[c->str] = c; + } + } + } + } + } + // hackish way of setting current_ast_mod as it is required + // for simplify to get references for already defined ids + log_assert(shared.current_top_node != nullptr); + AST_INTERNAL::current_ast_mod = shared.current_top_node; + visitEachDescendant(shared.current_top_node, [&](AST::AstNode *current_scope_node) { + if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_PARAMETER || + current_scope_node->type == AST::AST_LOCALPARAM) { + AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; + } + }); + if (module_node) { + visitEachDescendant(module_node, [&](AST::AstNode *current_scope_node) { + if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_PARAMETER || + current_scope_node->type == AST::AST_LOCALPARAM) { + AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; + } + }); + } + // we need to setup current top ast as this simplify + // needs to have access to all already definied ids + while (parameter->simplify(true, false, false, 1, -1, false, false)) { + } + // Remove clear current_scope from package nodes + AST_INTERNAL::current_scope.clear(); + // unset current_ast_mod + AST_INTERNAL::current_ast_mod = nullptr; +} +#endif + void UhdmAst::process_module() { std::string type = vpi_get_str(vpiDefName, obj_h); @@ -713,11 +764,20 @@ void UhdmAst::process_module() std::string module_parameters; visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node && node->type == AST::AST_PARAMETER) { - if (shared.top_nodes.count(type) && !(!node->children.empty() && node->children[0]->type != AST::AST_CONSTANT)) { +#ifdef BUILD_UPSTREAM + if (node->children[0]->type != AST::AST_CONSTANT) { + if (shared.top_nodes.count(type)) { + simplify_parameter(node, shared.top_nodes[type]); + log_assert(node->children[0]->type == AST::AST_CONSTANT || node->children[0]->type == AST::AST_REALVALUE); + } + } +#endif + if (shared.top_nodes.count(type)) { if (!node->children[0]->str.empty()) module_parameters += node->str + "=" + node->children[0]->str; else - module_parameters += node->str + "=" + std::to_string(node->children[0]->integer); + module_parameters += + node->str + "=" + std::to_string(node->children[0]->bits.size()) + "'d" + std::to_string(node->children[0]->integer); } delete node; } @@ -731,13 +791,15 @@ void UhdmAst::process_module() else module_name = type; auto module_node = shared.top_nodes[module_name]; + auto cell_instance = vpi_get(vpiCellInstance, obj_h); if (!module_node) { module_node = shared.top_nodes[type]; if (!module_node) { module_node = new AST::AstNode(AST::AST_MODULE); module_node->str = type; module_node->attributes[ID::partial] = AST::AstNode::mkconst_int(2, false, 1); - shared.top_nodes[module_node->str] = module_node; + cell_instance = 1; + module_name = type; } if (!module_parameters.empty()) { module_node = module_node->clone(); @@ -745,15 +807,19 @@ void UhdmAst::process_module() } module_node->str = module_name; shared.top_nodes[module_node->str] = module_node; -#ifdef BUILD_UPSTREAM - shared.current_top_node = module_node; -#endif - auto cell_instance = vpi_get(vpiCellInstance, obj_h); if (cell_instance) { module_node->attributes[ID::whitebox] = AST::AstNode::mkconst_int(1, false, 1); } visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node) { +#ifdef BUILD_UPSTREAM + if (node->children[0]->type != AST::AST_CONSTANT) { + if (shared.top_nodes[type]) { + simplify_parameter(node, module_node); + log_assert(node->children[0]->type == AST::AST_CONSTANT || node->children[0]->type == AST::AST_REALVALUE); + } + } +#endif auto parent_node = std::find_if(module_node->children.begin(), module_node->children.end(), [&](AST::AstNode *child) -> bool { return ((child->type == AST::AST_PARAMETER) || (child->type == AST::AST_LOCALPARAM)) && child->str == node->str && // skip real parameters as they are currently not working: https://github.com/alainmarcel/Surelog/issues/1035 @@ -805,6 +871,10 @@ void UhdmAst::process_module() auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); typeNode->str = module_node->str; current_node->children.insert(current_node->children.begin(), typeNode); +#ifdef BUILD_UPSTREAM + auto old_top = shared.current_top_node; + shared.current_top_node = module_node; +#endif visit_one_to_many({vpiVariables, vpiNet, vpiArrayNet}, obj_h, [&](AST::AstNode *node) { if (node) { add_or_replace_child(module_node, node); @@ -816,6 +886,9 @@ void UhdmAst::process_module() } }); make_cell(obj_h, current_node, module_node); +#ifdef BUILD_UPSTREAM + shared.current_top_node = old_top; +#endif } } @@ -1156,11 +1229,14 @@ void UhdmAst::process_param_assign() }); visit_one_to_one({vpiRhs}, obj_h, [&](AST::AstNode *node) { if (node) { + if (node->children.size() > 1 && (node->children[1]->type == AST::AST_PARAMETER || node->children[1]->type == AST::AST_LOCALPARAM)) { + node->children[1]->type = AST::AST_IDENTIFIER; + } current_node->children.insert(current_node->children.begin(), node); } }); #ifdef BUILD_UPSTREAM - add_multirange_wire(current_node, packed_ranges, unpacked_ranges); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges, false); #endif } @@ -1270,6 +1346,12 @@ size_t UhdmAst::add_multirange_attribute(AST::AstNode *wire_node, const std::vec // for simplify to get references for already defined ids log_assert(shared.current_top_node != nullptr); AST_INTERNAL::current_ast_mod = shared.current_top_node; + visitEachDescendant(shared.current_top_node, [&](AST::AstNode *current_scope_node) { + if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_PARAMETER || + current_scope_node->type == AST::AST_LOCALPARAM) { + AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; + } + }); // we need to setup current top ast as this simplify // needs to have access to all already definied ids while (ranges[i]->simplify(true, false, false, 1, -1, false, false)) { @@ -1439,6 +1521,7 @@ AST::AstNode *UhdmAst::convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::A void UhdmAst::convert_multiranges(AST::AstNode *module_node) { + shared.current_top_node = module_node; std::map>> multirange_wires; std::map wires; std::vector remove_ids; @@ -1646,6 +1729,7 @@ void UhdmAst::convert_packed_unpacked_range(AST::AstNode *wire_node, const std:: void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::function &f) { #ifdef BUILD_UPSTREAM + auto last_current_top_node = shared.current_top_node; if (node->type == AST::AST_MODULE || node->type == AST::AST_PACKAGE) { shared.current_top_node = node; } @@ -1661,6 +1745,7 @@ void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::functiontype == AST::AST_FUNCTION || node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK || node->type == AST::AST_TYPEDEF) if (!node->str.empty()) shared.multirange_scope.pop_back(); @@ -2058,6 +2143,9 @@ void UhdmAst::process_operation() break; case vpiSubOp: current_node->type = AST::AST_SUB; + if (!current_node->children.empty() && current_node->children[0]->type == AST::AST_LOCALPARAM) { + current_node->children[0]->type = AST::AST_IDENTIFIER; + } break; case vpiAddOp: current_node->type = AST::AST_ADD; @@ -3102,9 +3190,10 @@ void UhdmAst::process_parameter() #ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name -#endif - // if (vpi_get_str(vpiImported, obj_h) != "") { } //currently unused -#ifdef BUILD_UPSTREAM + // currently unused, but save it for future use + if (vpi_get_str(vpiImported, obj_h) != "") { + current_node->attributes[ID::is_imported] = AST::AstNode::mkconst_int(1, true); + } visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); #else std::vector range_nodes; diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 857c499b4..424bb5280 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -130,11 +130,13 @@ class UhdmAst void process_repeat(); void process_byte_var(); void process_long_int_var(); + void simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node = nullptr); void process_nonsynthesizable(const UHDM::BaseClass *object); void visitEachDescendant(AST::AstNode *node, const std::function &f); #ifdef BUILD_UPSTREAM - void add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges); + void add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges, + bool reverse = true); AST::AstNode *convert_range(const AST::AstNode *id, const std::vector &packed_ranges, const std::vector &unpacked_ranges, const std::vector single_elem_size, int i, AST::AstNode *wire_node); diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index a4e383908..eb0f8f3bf 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -5,6 +5,7 @@ namespace ID IdString partial{"\\partial"}; IdString packed_ranges{"\\packed_ranges"}; IdString unpacked_ranges{"\\unpacked_ranges"}; +IdString is_imported{"\\is_imported"}; } // namespace ID } // namespace RTLIL From 87d3575070b9a15c3abd27c64d72f19b4efc52e1 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 10 Dec 2021 12:33:38 +0100 Subject: [PATCH 496/845] Allow to inject custom simplification steps This PR refactors handling of custom simplification steps to use internal yosys current_scope as we process next nodes. This way we can inject our custom simplification steps between yosys own simplification calls. Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 737 ++++++++++++++++++--------------- uhdm-plugin/UhdmAst.h | 13 +- uhdm-plugin/UhdmAstUpstream.cc | 1 + 3 files changed, 402 insertions(+), 349 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index bb555488e..6d2d9577e 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -90,7 +90,256 @@ static AST::AstNode *make_range(int left, int right, bool is_signed = false) #endif #ifdef BUILD_UPSTREAM -AST::AstNode *UhdmAst::expand_dot(const AST::AstNode *current_struct, const AST::AstNode *search_node) +static int get_max_offset(AST::AstNode *node) +{ + // get the width from the MS member in the struct + // as members are laid out from left to right in the packed wire + log_assert(node->type == AST::AST_STRUCT || node->type == AST::AST_UNION); + while (node->range_left < 0) { + node = node->children[0]; + } + return node->range_left; +} + +static void visitEachDescendantStatic(AST::AstNode *node, const std::function &f) +{ + for (auto child : node->children) { + f(child); + visitEachDescendantStatic(child, f); + } +} + +static void add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges, + bool reverse = true) +{ + node->attributes[ID::packed_ranges] = AST::AstNode::mkconst_int(1, false, 1); + if (!packed_ranges.empty()) { + if (reverse) + std::reverse(packed_ranges.begin(), packed_ranges.end()); + node->attributes[ID::packed_ranges]->children.insert(node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), + packed_ranges.end()); + } + + node->attributes[ID::unpacked_ranges] = AST::AstNode::mkconst_int(1, false, 1); + if (!unpacked_ranges.empty()) { + node->attributes[ID::unpacked_ranges]->children.insert(node->attributes[ID::unpacked_ranges]->children.end(), unpacked_ranges.begin(), + unpacked_ranges.end()); + } +} + + +static size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges) +{ + size_t size = 1; + for (size_t i = 0; i < ranges.size(); i++) { + log_assert(AST_INTERNAL::current_ast_mod); + if (ranges[i]->children.size() == 1) { + ranges[i]->children.push_back(ranges[i]->children[0]->clone()); + } + while (ranges[i]->simplify(true, false, false, 1, -1, false, false)) { } + log_assert(ranges[i]->children[0]->type == AST::AST_CONSTANT); + log_assert(ranges[i]->children[1]->type == AST::AST_CONSTANT); + wire_node->multirange_dimensions.push_back(min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer)); + // TODO: add support for wires not starting with 0 + log_assert(wire_node->multirange_dimensions.back() == 0); + wire_node->multirange_dimensions.push_back(max(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) - + min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) + 1); + wire_node->multirange_swapped.push_back(ranges[i]->range_swapped); + size *= wire_node->multirange_dimensions.back(); + } + return size; +} + +static AST::AstNode *convert_range(AST::AstNode *id, const std::vector packed_ranges, const std::vector unpacked_ranges, int i) +{ + log_assert(AST_INTERNAL::current_ast_mod); + log_assert(AST_INTERNAL::current_scope.count(id->str)); + AST::AstNode *wire_node = AST_INTERNAL::current_scope[id->str]; + log_assert(!wire_node->multirange_dimensions.empty()); + int elem_size = 1; + std::vector single_elem_size; + single_elem_size.push_back(elem_size); + for (size_t j = 1; j < wire_node->multirange_dimensions.size(); j = j + 2) { + elem_size *= wire_node->multirange_dimensions[j]; + single_elem_size.push_back(elem_size); + } + std::reverse(single_elem_size.begin(), single_elem_size.end()); + log_assert(i < static_cast(unpacked_ranges.size() + packed_ranges.size())); + log_assert(!id->children.empty()); + AST::AstNode *result = nullptr; + // we want to start converting from the end + if (i < static_cast(id->children.size()) - 1) { + result = convert_range(id, packed_ranges, unpacked_ranges, i + 1); + } + // special case, we want to select whole wire + if (id->children.size() == 0 && i == 0) { + result = make_range(single_elem_size[i] - 1, 0); + } else { + AST::AstNode *range_left = nullptr; + AST::AstNode *range_right = nullptr; + if (id->children[i]->children.size() == 2) { + range_left = id->children[i]->children[0]->clone(); + range_right = id->children[i]->children[1]->clone(); + } else { + range_left = id->children[i]->children[0]->clone(); + range_right = id->children[i]->children[0]->clone(); + } + if (!wire_node->multirange_swapped.empty()) { + bool is_swapped = wire_node->multirange_swapped[wire_node->multirange_swapped.size() - i - 1]; + if (is_swapped) { + range_left = new AST::AstNode( + AST::AST_SUB, + AST::AstNode::mkconst_int(wire_node->multirange_dimensions[wire_node->multirange_dimensions.size() - (i * 2) - 1] - 1, false), + range_left->clone()); + range_right = new AST::AstNode( + AST::AST_SUB, + AST::AstNode::mkconst_int(wire_node->multirange_dimensions[wire_node->multirange_dimensions.size() - (i * 2) - 1] - 1, false), + range_right->clone()); + } + } + range_left = + new AST::AstNode(AST::AST_SUB, + new AST::AstNode(AST::AST_MUL, new AST::AstNode(AST::AST_ADD, range_left->clone(), AST::AstNode::mkconst_int(1, false)), + AST::AstNode::mkconst_int(single_elem_size[i + 1], false)), + AST::AstNode::mkconst_int(1, false)); + range_right = new AST::AstNode(AST::AST_MUL, range_right->clone(), AST::AstNode::mkconst_int(single_elem_size[i + 1], false)); + if (result) { + range_right = new AST::AstNode(AST::AST_ADD, range_right->clone(), result->children[1]->clone()); + range_left = new AST::AstNode(AST::AST_SUB, new AST::AstNode(AST::AST_ADD, range_right->clone(), result->children[0]->clone()), + result->children[1]->clone()); + } + result = new AST::AstNode(AST::AST_RANGE, range_left, range_right); + } + // return range from *current* selected range + // in the end, it results in whole selected range + id->basic_prep = true; + return result; +} + +static void resolve_wiretype(AST::AstNode *wire_node) +{ + std::vector packed_ranges; + std::vector unpacked_ranges; + // First check if it has already defined ranges + if (wire_node->attributes.count(ID::packed_ranges)) { + for (auto r : wire_node->attributes[ID::packed_ranges]->children) { + packed_ranges.push_back(r->clone()); + } + } + if (wire_node->attributes.count(ID::unpacked_ranges)) { + for (auto r : wire_node->attributes[ID::unpacked_ranges]->children) { + unpacked_ranges.push_back(r->clone()); + } + } + AST::AstNode *wiretype_ast = nullptr; + if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) { + log_assert(AST_INTERNAL::current_scope.count(wire_node->children[0]->str)); + wiretype_ast = AST_INTERNAL::current_scope[wire_node->children[0]->str]; + } + // we need to setup current top ast as this simplify + // needs to have access to all already definied ids + while (wire_node->simplify(true, false, false, 1, -1, false, false)) { + } + if (wiretype_ast && wire_node->attributes.count(ID::wiretype)) { + log_assert(wiretype_ast->type == AST::AST_TYPEDEF); + wire_node->attributes[ID::wiretype]->id2ast = wiretype_ast->children[0]; + } + if (wire_node->children[0]->type == AST::AST_RANGE && wire_node->multirange_dimensions.empty()) { + packed_ranges.push_back(wire_node->children[0]); + wire_node->children.clear(); + wire_node->attributes[ID::packed_ranges] = AST::AstNode::mkconst_int(1, false, 1); + if (!packed_ranges.empty()) { + std::reverse(packed_ranges.begin(), packed_ranges.end()); + wire_node->attributes[ID::packed_ranges]->children.insert(wire_node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), + packed_ranges.end()); + } + + wire_node->attributes[ID::unpacked_ranges] = AST::AstNode::mkconst_int(1, false, 1); + if (!unpacked_ranges.empty()) { + wire_node->attributes[ID::unpacked_ranges]->children.insert(wire_node->attributes[ID::unpacked_ranges]->children.end(), unpacked_ranges.begin(), + unpacked_ranges.end()); + } + } +} + +static void add_force_convert_attribute(AST::AstNode *wire_node, int val = 1) +{ + wire_node->attributes[ID::force_convert] = AST::AstNode::mkconst_int(val, true); +} + +static void check_memories(AST::AstNode *module_node) +{ + std::map memories; + visitEachDescendantStatic(module_node, [&](AST::AstNode *node) { + if (node->str == "\\$readmemh") { + add_force_convert_attribute(memories[node->children[1]->str], 0); + } + if (node->type == AST::AST_WIRE) { + const std::vector packed_ranges = node->attributes.count(ID::packed_ranges) ? node->attributes[ID::packed_ranges]->children : std::vector(); + const std::vector unpacked_ranges = node->attributes.count(ID::unpacked_ranges) ? node->attributes[ID::unpacked_ranges]->children : std::vector(); + if (packed_ranges.size() == 1 && unpacked_ranges.size() == 1) { + log_assert(!memories.count(node->str)); + memories[node->str] = node; + } + } + if (node->type == AST::AST_IDENTIFIER && memories.count(node->str)) { + if (!memories[node->str]->attributes.count(ID::force_convert) && node->children.size() == 0) { + add_force_convert_attribute(memories[node->str]); + } + } + }); +} + +// This function is workaround missing support for multirange (with n-ranges) packed/unpacked nodes +// It converts multirange node to single-range node and translates access to this node +// to correct range +static void convert_packed_unpacked_range(AST::AstNode *wire_node) +{ + if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) { + resolve_wiretype(wire_node); + } + const std::vector packed_ranges = wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); + const std::vector unpacked_ranges = wire_node->attributes.count(ID::unpacked_ranges) ? wire_node->attributes[ID::unpacked_ranges]->children : std::vector(); + if (packed_ranges.empty() && unpacked_ranges.empty()) { + wire_node->attributes.erase(ID::packed_ranges); + wire_node->attributes.erase(ID::unpacked_ranges); + return; + } + size_t size = 1; + size_t packed_size = 1; + size_t unpacked_size = 1; + std::vector ranges; + bool convert_node = packed_ranges.size() > 1 || unpacked_ranges.size() > 1 || wire_node->attributes.count(ID::wiretype) || + wire_node->type == AST::AST_PARAMETER || wire_node->type == AST::AST_LOCALPARAM || + ((wire_node->is_input || wire_node->is_output) && ((packed_ranges.size() > 0 || unpacked_ranges.size() > 0))) || (wire_node->attributes.count(ID::force_convert) && wire_node->attributes[ID::force_convert]->integer == 1); + // Convert only when atleast 1 of the ranges has more then 1 range + if (convert_node) { + if (wire_node->multirange_dimensions.empty()) { + packed_size = add_multirange_attribute(wire_node, packed_ranges); + unpacked_size = add_multirange_attribute(wire_node, unpacked_ranges); + size = packed_size * unpacked_size; + ranges.push_back(make_range(size - 1, 0)); + } + } else { + for (auto r : packed_ranges) { + ranges.push_back(r->clone()); + } + for (auto r : unpacked_ranges) { + ranges.push_back(r->clone()); + } + // if there is only one packed and one unpacked range, + // and wire is not port wire, change type to AST_MEMORY + if (wire_node->type == AST::AST_WIRE && packed_ranges.size() == 1 && unpacked_ranges.size() == 1 && !wire_node->is_input && + !wire_node->is_output) { + wire_node->type = AST::AST_MEMORY; + } + } + + // Insert new range + wire_node->children.insert(wire_node->children.end(), ranges.begin(), ranges.end()); +} + +static AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::AstNode *search_node) { AST::AstNode *current_struct_elem = nullptr; auto search_str = search_node->str.find("\\") == 0 ? search_node->str.substr(1) : search_node->str; @@ -193,6 +442,134 @@ AST::AstNode *UhdmAst::expand_dot(const AST::AstNode *current_struct, const AST: // from original wire return new AST::AstNode(AST::AST_RANGE, left, right); } + +static AST::AstNode *convert_dot(AST::AstNode *node, AST::AstNode *dot) +{ + AST::AstNode *wire_node = nullptr; + std::vector packed_ranges; + std::vector unpacked_ranges; + log_assert(AST_INTERNAL::current_scope.count(node->str)); + // We found wire node + wire_node = AST_INTERNAL::current_scope[node->str]; + + // convert and resolve wiretype + //if (!wire_node->attributes.count(ID::wiretype)) { + // convert_packed_unpacked_range(wire_node); + //} + + AST::AstNode *struct_node = nullptr; + if (wire_node->type == AST::AST_STRUCT) { + struct_node = wire_node; + } else if (wire_node->attributes.count(ID::wiretype)) { + log_assert(wire_node->attributes[ID::wiretype]->id2ast); + struct_node = wire_node->attributes[ID::wiretype]->id2ast; + } + log_assert(struct_node); + auto expanded = expand_dot(struct_node, dot); + if (node->children[0]->type == AST::AST_RANGE) { + int struct_size_int = get_max_offset(struct_node) + 1; + log_assert(!wire_node->multirange_dimensions.empty()); + int unpacked_range = wire_node->multirange_dimensions.back() - 1; + expanded->children[1] = new AST::AstNode(AST::AST_ADD, expanded->children[1], + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), + new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(unpacked_range, true, 32), + node->children[0]->children[0]->clone()))); + expanded->children[0] = new AST::AstNode(AST::AST_ADD, expanded->children[0], + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), + new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(unpacked_range, true, 32), + node->children[0]->children[0]->clone()))); + } + return expanded; +} + +static void setup_current_scope(std::unordered_map top_nodes, AST::AstNode *current_top_node) +{ + for (auto it = top_nodes.begin(); it != top_nodes.end(); it++) { + if (it->second->type == AST::AST_PACKAGE) { + for (auto &o : it->second->children) { + // import only parameters + if (o->type == AST::AST_TYPEDEF || o->type == AST::AST_PARAMETER || o->type == AST::AST_LOCALPARAM) { + // add imported nodes to current scope + AST_INTERNAL::current_scope[it->second->str + std::string("::") + o->str.substr(1)] = o; + AST_INTERNAL::current_scope[o->str] = o; + } else if (o->type == AST::AST_ENUM) { + AST_INTERNAL::current_scope[o->str] = o; + for (auto c : o->children) { + AST_INTERNAL::current_scope[c->str] = c; + } + } + } + } + } + // hackish way of setting current_ast_mod as it is required + // for simplify to get references for already defined ids + AST_INTERNAL::current_ast_mod = current_top_node; + log_assert(AST_INTERNAL::current_ast_mod != nullptr); +} + +static void simplify(AST::AstNode *current_node) +{ + AST::AstNode *expanded = nullptr; + for (auto c : current_node->children) { + if (c->type == AST::AST_DOT && expanded == nullptr) { + expanded = convert_dot(current_node, c); + } + } + if (expanded != nullptr) { + for (size_t i = 0; i < current_node->children.size(); i++) { + delete current_node->children[i]; + } + current_node->children.clear(); + current_node->children.push_back(expanded->clone()); + current_node->basic_prep = true; + expanded = nullptr; + } + // First simplify children + for (int i = 0; i < current_node->children.size(); i++) { + simplify(current_node->children[i]); + } + switch (current_node->type) { + case AST::AST_TYPEDEF: + case AST::AST_ENUM: + AST_INTERNAL::current_scope[current_node->str] = current_node; + break; + case AST::AST_WIRE: + case AST::AST_PARAMETER: + case AST::AST_LOCALPARAM: + AST_INTERNAL::current_scope[current_node->str] = current_node; + convert_packed_unpacked_range(current_node); + break; + case AST::AST_IDENTIFIER: + if (!current_node->children.empty() && !current_node->basic_prep) { + log_assert(AST_INTERNAL::current_ast_mod); + log_assert(AST_INTERNAL::current_scope.count(current_node->str)); + AST::AstNode *wire_node = AST_INTERNAL::current_scope[current_node->str]; + const std::vector packed_ranges = wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); + const std::vector unpacked_ranges = wire_node->attributes.count(ID::unpacked_ranges) ? wire_node->attributes[ID::unpacked_ranges]->children : std::vector(); + if ((wire_node->type == AST::AST_WIRE || wire_node->type == AST::AST_PARAMETER || wire_node->type == AST::AST_LOCALPARAM) + && !(packed_ranges.empty() && unpacked_ranges.empty()) + && !(packed_ranges.size() + unpacked_ranges.size() == 1)) { + auto result = convert_range(current_node, packed_ranges, unpacked_ranges, 0); + for (size_t i = 0; i < current_node->children.size(); i++) { + delete current_node->children[i]; + } + current_node->children.clear(); + current_node->children.push_back(result); + } + } + break; + default: break; + } +} + +static void clear_current_scope() +{ + // Remove clear current_scope from package nodes + AST_INTERNAL::current_scope.clear(); + // unset current_ast_mod + AST_INTERNAL::current_ast_mod = nullptr; +} + #endif void UhdmAst::visit_one_to_many(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f) @@ -223,24 +600,6 @@ void UhdmAst::visit_one_to_one(const std::vector child_node_types, vpiHandl } #ifdef BUILD_UPSTREAM -void UhdmAst::add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges, - bool reverse) -{ - node->attributes[ID::packed_ranges] = AST::AstNode::mkconst_int(1, false, 1); - if (!packed_ranges.empty()) { - if (reverse) - std::reverse(packed_ranges.begin(), packed_ranges.end()); - node->attributes[ID::packed_ranges]->children.insert(node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), - packed_ranges.end()); - } - - node->attributes[ID::unpacked_ranges] = AST::AstNode::mkconst_int(1, false, 1); - if (!unpacked_ranges.empty()) { - node->attributes[ID::unpacked_ranges]->children.insert(node->attributes[ID::unpacked_ranges]->children.end(), unpacked_ranges.begin(), - unpacked_ranges.end()); - } -} - void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) { std::vector range_nodes; @@ -640,18 +999,33 @@ void UhdmAst::process_design() shared.top_nodes[node->str] = node; } }); + for (auto pair : shared.top_nodes) { + if (!pair.second) + continue; + if (pair.second->type == AST::AST_PACKAGE) { + check_memories(pair.second); + setup_current_scope(shared.top_nodes, pair.second); + simplify(pair.second); + clear_current_scope(); + } + } // Once we walked everything, unroll that as children of this node for (auto pair : shared.top_nodes) { if (!pair.second) continue; if (!pair.second->get_bool_attribute(ID::partial)) { -#ifdef BUILD_UPSTREAM - convert_multiranges(pair.second); -#endif if (pair.second->type == AST::AST_PACKAGE) current_node->children.insert(current_node->children.begin(), pair.second); - else + else { +#ifdef BUILD_UPSTREAM + //convert_multiranges(pair.second); + check_memories(pair.second); + setup_current_scope(shared.top_nodes, pair.second); + simplify(pair.second); + clear_current_scope(); +#endif current_node->children.push_back(pair.second); + } } else { log_warning("Removing unused module: %s from the design.\n", pair.second->str.c_str()); delete pair.second; @@ -1338,188 +1712,8 @@ void UhdmAst::process_packed_array_net() } #ifdef BUILD_UPSTREAM -size_t UhdmAst::add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges) -{ - size_t size = 1; - for (size_t i = 0; i < ranges.size(); i++) { - // hackish way of setting current_ast_mod as it is required - // for simplify to get references for already defined ids - log_assert(shared.current_top_node != nullptr); - AST_INTERNAL::current_ast_mod = shared.current_top_node; - visitEachDescendant(shared.current_top_node, [&](AST::AstNode *current_scope_node) { - if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_PARAMETER || - current_scope_node->type == AST::AST_LOCALPARAM) { - AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; - } - }); - // we need to setup current top ast as this simplify - // needs to have access to all already definied ids - while (ranges[i]->simplify(true, false, false, 1, -1, false, false)) { - } - // unset current_ast_mod - AST_INTERNAL::current_ast_mod = nullptr; - // TODO: (with simplify, it can be always true) this probably is not always true, but for now assume this - log_assert(ranges[i]->children[0]->type == AST::AST_CONSTANT); - log_assert(ranges[i]->children[1]->type == AST::AST_CONSTANT); - wire_node->multirange_dimensions.push_back(min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer)); - // TODO: add support for wires not starting with 0 - log_assert(wire_node->multirange_dimensions.back() == 0); - wire_node->multirange_dimensions.push_back(max(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) - - min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) + 1); - wire_node->multirange_swapped.push_back(ranges[i]->range_swapped); - size *= wire_node->multirange_dimensions.back(); - } - return size; -} - -static int get_max_offset(AST::AstNode *node) -{ - // get the width from the MS member in the struct - // as members are laid out from left to right in the packed wire - log_assert(node->type == AST::AST_STRUCT || node->type == AST::AST_UNION); - while (node->range_left < 0) { - node = node->children[0]; - } - return node->range_left; -} - -void UhdmAst::resolve_wiretype(AST::AstNode *wire_node) -{ - std::vector packed_ranges; - std::vector unpacked_ranges; - // First check if it has already defined ranges - if (wire_node->attributes.count(ID::packed_ranges)) { - for (auto r : wire_node->attributes[ID::packed_ranges]->children) { - packed_ranges.push_back(r->clone()); - } - } - if (wire_node->attributes.count(ID::unpacked_ranges)) { - for (auto r : wire_node->attributes[ID::unpacked_ranges]->children) { - unpacked_ranges.push_back(r->clone()); - } - } - // then, import all packages to current_scope, as wiretype can be declared inside package - for (auto it = shared.top_nodes.begin(); it != shared.top_nodes.end(); it++) { - if (it->second->type == AST::AST_PACKAGE) { - for (auto &o : it->second->children) { - // import only typedefs and enums - if (o->type == AST::AST_TYPEDEF) { - // add imported nodes to current scope - AST_INTERNAL::current_scope[it->second->str + std::string("::") + o->str.substr(1)] = o; - } else if (o->type == AST::AST_ENUM) { - AST_INTERNAL::current_scope[o->str] = o; - } - } - } - } - // hackish way of setting current_ast_mod as it is required - // for simplify to get references for already defined ids - log_assert(shared.current_top_node != nullptr); - AST_INTERNAL::current_ast_mod = shared.current_top_node; - visitEachDescendant(shared.current_top_node, [&](AST::AstNode *current_scope_node) { - if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_WIRE || current_scope_node->type == AST::AST_ENUM) { - AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; - } - }); - if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE && - AST_INTERNAL::current_scope.count(wire_node->children[0]->str)) { - auto wiretype_node = AST_INTERNAL::current_scope[wire_node->children[0]->str]; - - visitEachDescendant(wiretype_node, [&](AST::AstNode *node) { - if (node->attributes.count(ID::packed_ranges)) { - for (auto r : node->attributes[ID::packed_ranges]->children) { - node->children.push_back(r->clone()); - } - node->attributes.erase(ID::packed_ranges); - } - if (node->attributes.count(ID::unpacked_ranges)) { - for (auto r : node->attributes[ID::unpacked_ranges]->children) { - node->children.push_back(r->clone()); - } - node->attributes.erase(ID::unpacked_ranges); - } - }); - } - AST::AstNode *wiretype_ast = nullptr; - if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) { - log_assert(AST_INTERNAL::current_scope.count(wire_node->children[0]->str)); - wiretype_ast = AST_INTERNAL::current_scope[wire_node->children[0]->str]; - } - // we need to setup current top ast as this simplify - // needs to have access to all already definied ids - while (wire_node->simplify(true, false, false, 1, -1, false, false)) { - } - if (wiretype_ast && wire_node->attributes.count(ID::wiretype)) { - log_assert(wiretype_ast->type == AST::AST_TYPEDEF); - wire_node->attributes[ID::wiretype]->id2ast = wiretype_ast->children[0]; - } - if (wire_node->children[0]->type == AST::AST_RANGE && wire_node->multirange_dimensions.empty()) { - packed_ranges.push_back(wire_node->children[0]); - wire_node->children.clear(); - add_multirange_wire(wire_node, packed_ranges, unpacked_ranges); - } - // Remove clear current_scope from package nodes - AST_INTERNAL::current_scope.clear(); - // unset current_ast_mod - AST_INTERNAL::current_ast_mod = nullptr; -} - -AST::AstNode *UhdmAst::convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::AstNode *module_node, std::map &wires, - std::map>> &multirange_wires) -{ - AST::AstNode *wire_node = nullptr; - std::vector packed_ranges; - std::vector unpacked_ranges; - // Find wire node - auto current_scope = shared.multirange_scope; - // wire can be declared in previous scope - std::string id_name = ""; - while (!current_scope.empty() && !wires.count(id_name)) { - id_name = ""; - for (auto s : current_scope) { - id_name += s; - } - id_name += node->str; - if (!wires.count(id_name)) { - current_scope.pop_back(); - continue; - } - } - log_assert(wires.count(id_name)); - // We found wire node - wire_node = wires[id_name]; - - // convert and resolve wiretype - if (!wire_node->attributes.count(ID::wiretype)) { - convert_packed_unpacked_range(wire_node, std::vector()); - } - - AST::AstNode *struct_node = nullptr; - if (wire_node->type == AST::AST_STRUCT) { - struct_node = wire_node; - } else if (wire_node->attributes.count(ID::wiretype)) { - log_assert(wire_node->attributes[ID::wiretype]->id2ast); - struct_node = wire_node->attributes[ID::wiretype]->id2ast; - } - log_assert(struct_node); - auto expanded = expand_dot(struct_node, dot); - if (node->children[0]->type == AST::AST_RANGE) { - int struct_size_int = get_max_offset(struct_node) + 1; - log_assert(!wire_node->multirange_dimensions.empty()); - int unpacked_range = wire_node->multirange_dimensions.back() - 1; - expanded->children[1] = new AST::AstNode(AST::AST_ADD, expanded->children[1], - new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), - new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(unpacked_range, true, 32), - node->children[0]->children[0]->clone()))); - expanded->children[0] = new AST::AstNode(AST::AST_ADD, expanded->children[0], - new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), - new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(unpacked_range, true, 32), - node->children[0]->children[0]->clone()))); - } - return expanded; -} -void UhdmAst::convert_multiranges(AST::AstNode *module_node) +/*void UhdmAst::convert_multiranges(AST::AstNode *module_node) { shared.current_top_node = module_node; std::map>> multirange_wires; @@ -1531,7 +1725,7 @@ void UhdmAst::convert_multiranges(AST::AstNode *module_node) visitEachDescendant(module_node, [&](AST::AstNode *node) { for (auto c : node->children) { if (c->type == AST::AST_DOT && expanded == nullptr) { - expanded = convert_dot(node, c, module_node, wires, multirange_wires); + expanded = convert_dot(node, c); } } if (expanded != nullptr) { @@ -1591,139 +1785,8 @@ void UhdmAst::convert_multiranges(AST::AstNode *module_node) convert_packed_unpacked_range(m.second.first, m.second.second); } } +*/ -AST::AstNode *UhdmAst::convert_range(const AST::AstNode *id, const std::vector &packed_ranges, - const std::vector &unpacked_ranges, const std::vector single_elem_size, int i, - AST::AstNode *wire_node) -{ - log_assert(i < static_cast(unpacked_ranges.size() + packed_ranges.size())); - AST::AstNode *result = nullptr; - // we want to start converting from the end - if (i < static_cast(id->children.size()) - 1) { - result = convert_range(id, packed_ranges, unpacked_ranges, single_elem_size, i + 1, wire_node); - } - // special case, we want to select whole wire - if (id->children.size() == 0 && i == 0) { - result = make_range(single_elem_size[i] - 1, 0); - } else { - AST::AstNode *range_left = nullptr; - AST::AstNode *range_right = nullptr; - if (id->children[i]->children.size() == 2) { - range_left = id->children[i]->children[0]->clone(); - range_right = id->children[i]->children[1]->clone(); - } else { - range_left = id->children[i]->children[0]->clone(); - range_right = id->children[i]->children[0]->clone(); - } - if (!wire_node->multirange_swapped.empty()) { - bool is_swapped = wire_node->multirange_swapped[wire_node->multirange_swapped.size() - i - 1]; - if (is_swapped) { - range_left = new AST::AstNode( - AST::AST_SUB, - AST::AstNode::mkconst_int(wire_node->multirange_dimensions[wire_node->multirange_dimensions.size() - (i * 2) - 1] - 1, false), - range_left->clone()); - range_right = new AST::AstNode( - AST::AST_SUB, - AST::AstNode::mkconst_int(wire_node->multirange_dimensions[wire_node->multirange_dimensions.size() - (i * 2) - 1] - 1, false), - range_right->clone()); - } - } - range_left = - new AST::AstNode(AST::AST_SUB, - new AST::AstNode(AST::AST_MUL, new AST::AstNode(AST::AST_ADD, range_left->clone(), AST::AstNode::mkconst_int(1, false)), - AST::AstNode::mkconst_int(single_elem_size[i + 1], false)), - AST::AstNode::mkconst_int(1, false)); - range_right = new AST::AstNode(AST::AST_MUL, range_right->clone(), AST::AstNode::mkconst_int(single_elem_size[i + 1], false)); - if (result) { - range_right = new AST::AstNode(AST::AST_ADD, range_right->clone(), result->children[1]->clone()); - range_left = new AST::AstNode(AST::AST_SUB, new AST::AstNode(AST::AST_ADD, range_right->clone(), result->children[0]->clone()), - result->children[1]->clone()); - } - result = new AST::AstNode(AST::AST_RANGE, range_left, range_right); - } - // return range from *current* selected range - // in the end, it results in whole selected range - return result; -} - -// This function is workaround missing support for multirange (with n-ranges) packed/unpacked nodes -// It converts multirange node to single-range node and translates access to this node -// to correct range -void UhdmAst::convert_packed_unpacked_range(AST::AstNode *wire_node, const std::vector identifers) -{ - if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) - resolve_wiretype(wire_node); - const std::vector packed_ranges = wire_node->attributes[ID::packed_ranges]->children; - const std::vector unpacked_ranges = wire_node->attributes[ID::unpacked_ranges]->children; - size_t size = 1; - size_t packed_size = 1; - size_t unpacked_size = 1; - std::vector ranges; - bool convert_node = packed_ranges.size() > 1 || unpacked_ranges.size() > 1 || wire_node->attributes.count(ID::wiretype) || - wire_node->type == AST::AST_PARAMETER || - ((wire_node->is_input || wire_node->is_output) && ((packed_ranges.size() > 0 || unpacked_ranges.size() > 0))); - for (auto id : identifers) { - // if we accessing whole AST_MEMORY, we want to change AST_MEMORY to single RANGE, - // as yosys currently doesn't support accessing whole memory, if it was converted - // to the registers - if (id->children.size() == 0 && packed_ranges.size() == 1 && unpacked_ranges.size() == 1) { - wire_node->type = AST::AST_WIRE; - convert_node = true; - } - if (packed_ranges.size() == 1 && unpacked_ranges.size() == 1 && id->children.size() == 2 && id->children[1]->children.size() == 2) { - convert_node = true; - } - } - // Convert only when atleast 1 of the ranges has more then 1 range - if (convert_node) { - if (wire_node->multirange_dimensions.empty()) { - packed_size = add_multirange_attribute(wire_node, packed_ranges); - unpacked_size = add_multirange_attribute(wire_node, unpacked_ranges); - size = packed_size * unpacked_size; - ranges.push_back(make_range(size - 1, 0)); - } - if (size > 0) { - for (auto id : identifers) { - if (id->children.empty()) - continue; - // only check reid identifiers - if (id->type != AST::AST_IDENTIFIER || id->basic_prep == true) - continue; - int elem_size = 1; - std::vector single_elem_size; - single_elem_size.push_back(elem_size); - for (size_t i = 1; i < wire_node->multirange_dimensions.size(); i = i + 2) { - elem_size *= wire_node->multirange_dimensions[i]; - single_elem_size.push_back(elem_size); - } - std::reverse(single_elem_size.begin(), single_elem_size.end()); - auto result = convert_range(id, packed_ranges, unpacked_ranges, single_elem_size, 0, wire_node); - for (size_t i = 0; i < id->children.size(); i++) { - delete id->children[i]; - } - id->children.clear(); - id->children.push_back(result); - id->basic_prep = true; - } - } - } else { - for (auto r : packed_ranges) { - ranges.push_back(r->clone()); - } - for (auto r : unpacked_ranges) { - ranges.push_back(r->clone()); - } - // if there is only one packed and one unpacked range, - // and wire is not port wire, change type to AST_MEMORY - if (wire_node->type == AST::AST_WIRE && packed_ranges.size() == 1 && unpacked_ranges.size() == 1 && !wire_node->is_input && - !wire_node->is_output) { - wire_node->type = AST::AST_MEMORY; - } - } - - // Insert new range - wire_node->children.insert(wire_node->children.end(), ranges.begin(), ranges.end()); -} #endif void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::function &f) diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 424bb5280..ca129bfd5 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -135,18 +135,7 @@ class UhdmAst void visitEachDescendant(AST::AstNode *node, const std::function &f); #ifdef BUILD_UPSTREAM - void add_multirange_wire(AST::AstNode *node, std::vector packed_ranges, std::vector unpacked_ranges, - bool reverse = true); - AST::AstNode *convert_range(const AST::AstNode *id, const std::vector &packed_ranges, - const std::vector &unpacked_ranges, const std::vector single_elem_size, int i, - AST::AstNode *wire_node); - void convert_packed_unpacked_range(AST::AstNode *wire_node, const std::vector identifers); - void convert_multiranges(AST::AstNode *module_node); - size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges); - AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::AstNode *search_node); - AST::AstNode *convert_dot(AST::AstNode *node, AST::AstNode *dot, AST::AstNode *module_node, std::map &wires, - std::map>> &multirange_wires); - void resolve_wiretype(AST::AstNode *wire_node); + //void convert_multiranges(AST::AstNode *module_node); #endif UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index eb0f8f3bf..ef0381967 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -5,6 +5,7 @@ namespace ID IdString partial{"\\partial"}; IdString packed_ranges{"\\packed_ranges"}; IdString unpacked_ranges{"\\unpacked_ranges"}; +IdString force_convert{"\\force_convert"}; // set this attribute to force conversion of multirange wire to single range. It is useful to force-convert some memories. IdString is_imported{"\\is_imported"}; } // namespace ID } // namespace RTLIL From 7935eede93c12cd50729f98dc3fa1e721d156755 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 15 Dec 2021 12:07:51 +0100 Subject: [PATCH 497/845] Fix access to struct wire (without typedef) Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 6d2d9577e..8964e9cd8 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -452,11 +452,6 @@ static AST::AstNode *convert_dot(AST::AstNode *node, AST::AstNode *dot) // We found wire node wire_node = AST_INTERNAL::current_scope[node->str]; - // convert and resolve wiretype - //if (!wire_node->attributes.count(ID::wiretype)) { - // convert_packed_unpacked_range(wire_node); - //} - AST::AstNode *struct_node = nullptr; if (wire_node->type == AST::AST_STRUCT) { struct_node = wire_node; @@ -507,7 +502,7 @@ static void setup_current_scope(std::unordered_map log_assert(AST_INTERNAL::current_ast_mod != nullptr); } -static void simplify(AST::AstNode *current_node) +static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) { AST::AstNode *expanded = nullptr; for (auto c : current_node->children) { @@ -526,7 +521,7 @@ static void simplify(AST::AstNode *current_node) } // First simplify children for (int i = 0; i < current_node->children.size(); i++) { - simplify(current_node->children[i]); + simplify(current_node->children[i], current_node); } switch (current_node->type) { case AST::AST_TYPEDEF: @@ -558,6 +553,13 @@ static void simplify(AST::AstNode *current_node) } } break; + case AST::AST_STRUCT: + if (!current_node->str.empty() && parent_node && parent_node->type != AST::AST_TYPEDEF && parent_node->type != AST::AST_STRUCT) { + while (current_node->simplify(true, false, false, 1, -1, false, false)) { } + AST_INTERNAL::current_scope[current_node->str]->attributes[ID::wiretype] = AST::AstNode::mkconst_str(current_node->str); + AST_INTERNAL::current_scope[current_node->str]->attributes[ID::wiretype]->id2ast = current_node; + } + break; default: break; } } @@ -1005,7 +1007,7 @@ void UhdmAst::process_design() if (pair.second->type == AST::AST_PACKAGE) { check_memories(pair.second); setup_current_scope(shared.top_nodes, pair.second); - simplify(pair.second); + simplify(pair.second, nullptr); clear_current_scope(); } } @@ -1021,7 +1023,7 @@ void UhdmAst::process_design() //convert_multiranges(pair.second); check_memories(pair.second); setup_current_scope(shared.top_nodes, pair.second); - simplify(pair.second); + simplify(pair.second, nullptr); clear_current_scope(); #endif current_node->children.push_back(pair.second); From c9f681d6f2ad70e14da987d6c2ccf3320f1e7c5b Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 15 Dec 2021 12:45:09 +0100 Subject: [PATCH 498/845] Format code Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 113 ++++++++++++++++++--------------- uhdm-plugin/UhdmAst.h | 2 +- uhdm-plugin/UhdmAstUpstream.cc | 3 +- 3 files changed, 64 insertions(+), 54 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 8964e9cd8..7146fa5f5 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -110,7 +110,7 @@ static void visitEachDescendantStatic(AST::AstNode *node, const std::function packed_ranges, std::vector unpacked_ranges, - bool reverse = true) + bool reverse = true) { node->attributes[ID::packed_ranges] = AST::AstNode::mkconst_int(1, false, 1); if (!packed_ranges.empty()) { @@ -127,7 +127,6 @@ static void add_multirange_wire(AST::AstNode *node, std::vector } } - static size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vector ranges) { size_t size = 1; @@ -136,7 +135,8 @@ static size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vecto if (ranges[i]->children.size() == 1) { ranges[i]->children.push_back(ranges[i]->children[0]->clone()); } - while (ranges[i]->simplify(true, false, false, 1, -1, false, false)) { } + while (ranges[i]->simplify(true, false, false, 1, -1, false, false)) { + } log_assert(ranges[i]->children[0]->type == AST::AST_CONSTANT); log_assert(ranges[i]->children[1]->type == AST::AST_CONSTANT); wire_node->multirange_dimensions.push_back(min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer)); @@ -150,7 +150,8 @@ static size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vecto return size; } -static AST::AstNode *convert_range(AST::AstNode *id, const std::vector packed_ranges, const std::vector unpacked_ranges, int i) +static AST::AstNode *convert_range(AST::AstNode *id, const std::vector packed_ranges, + const std::vector unpacked_ranges, int i) { log_assert(AST_INTERNAL::current_ast_mod); log_assert(AST_INTERNAL::current_scope.count(id->str)); @@ -251,13 +252,13 @@ static void resolve_wiretype(AST::AstNode *wire_node) if (!packed_ranges.empty()) { std::reverse(packed_ranges.begin(), packed_ranges.end()); wire_node->attributes[ID::packed_ranges]->children.insert(wire_node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), - packed_ranges.end()); + packed_ranges.end()); } wire_node->attributes[ID::unpacked_ranges] = AST::AstNode::mkconst_int(1, false, 1); if (!unpacked_ranges.empty()) { - wire_node->attributes[ID::unpacked_ranges]->children.insert(wire_node->attributes[ID::unpacked_ranges]->children.end(), unpacked_ranges.begin(), - unpacked_ranges.end()); + wire_node->attributes[ID::unpacked_ranges]->children.insert(wire_node->attributes[ID::unpacked_ranges]->children.end(), + unpacked_ranges.begin(), unpacked_ranges.end()); } } } @@ -269,24 +270,26 @@ static void add_force_convert_attribute(AST::AstNode *wire_node, int val = 1) static void check_memories(AST::AstNode *module_node) { - std::map memories; + std::map memories; visitEachDescendantStatic(module_node, [&](AST::AstNode *node) { - if (node->str == "\\$readmemh") { - add_force_convert_attribute(memories[node->children[1]->str], 0); - } - if (node->type == AST::AST_WIRE) { - const std::vector packed_ranges = node->attributes.count(ID::packed_ranges) ? node->attributes[ID::packed_ranges]->children : std::vector(); - const std::vector unpacked_ranges = node->attributes.count(ID::unpacked_ranges) ? node->attributes[ID::unpacked_ranges]->children : std::vector(); - if (packed_ranges.size() == 1 && unpacked_ranges.size() == 1) { - log_assert(!memories.count(node->str)); - memories[node->str] = node; - } + if (node->str == "\\$readmemh") { + add_force_convert_attribute(memories[node->children[1]->str], 0); + } + if (node->type == AST::AST_WIRE) { + const std::vector packed_ranges = + node->attributes.count(ID::packed_ranges) ? node->attributes[ID::packed_ranges]->children : std::vector(); + const std::vector unpacked_ranges = + node->attributes.count(ID::unpacked_ranges) ? node->attributes[ID::unpacked_ranges]->children : std::vector(); + if (packed_ranges.size() == 1 && unpacked_ranges.size() == 1) { + log_assert(!memories.count(node->str)); + memories[node->str] = node; } - if (node->type == AST::AST_IDENTIFIER && memories.count(node->str)) { - if (!memories[node->str]->attributes.count(ID::force_convert) && node->children.size() == 0) { - add_force_convert_attribute(memories[node->str]); - } + } + if (node->type == AST::AST_IDENTIFIER && memories.count(node->str)) { + if (!memories[node->str]->attributes.count(ID::force_convert) && node->children.size() == 0) { + add_force_convert_attribute(memories[node->str]); } + } }); } @@ -298,8 +301,10 @@ static void convert_packed_unpacked_range(AST::AstNode *wire_node) if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) { resolve_wiretype(wire_node); } - const std::vector packed_ranges = wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); - const std::vector unpacked_ranges = wire_node->attributes.count(ID::unpacked_ranges) ? wire_node->attributes[ID::unpacked_ranges]->children : std::vector(); + const std::vector packed_ranges = + wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); + const std::vector unpacked_ranges = + wire_node->attributes.count(ID::unpacked_ranges) ? wire_node->attributes[ID::unpacked_ranges]->children : std::vector(); if (packed_ranges.empty() && unpacked_ranges.empty()) { wire_node->attributes.erase(ID::packed_ranges); wire_node->attributes.erase(ID::unpacked_ranges); @@ -311,7 +316,8 @@ static void convert_packed_unpacked_range(AST::AstNode *wire_node) std::vector ranges; bool convert_node = packed_ranges.size() > 1 || unpacked_ranges.size() > 1 || wire_node->attributes.count(ID::wiretype) || wire_node->type == AST::AST_PARAMETER || wire_node->type == AST::AST_LOCALPARAM || - ((wire_node->is_input || wire_node->is_output) && ((packed_ranges.size() > 0 || unpacked_ranges.size() > 0))) || (wire_node->attributes.count(ID::force_convert) && wire_node->attributes[ID::force_convert]->integer == 1); + ((wire_node->is_input || wire_node->is_output) && ((packed_ranges.size() > 0 || unpacked_ranges.size() > 0))) || + (wire_node->attributes.count(ID::force_convert) && wire_node->attributes[ID::force_convert]->integer == 1); // Convert only when atleast 1 of the ranges has more then 1 range if (convert_node) { if (wire_node->multirange_dimensions.empty()) { @@ -526,45 +532,48 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) switch (current_node->type) { case AST::AST_TYPEDEF: case AST::AST_ENUM: - AST_INTERNAL::current_scope[current_node->str] = current_node; - break; + AST_INTERNAL::current_scope[current_node->str] = current_node; + break; case AST::AST_WIRE: case AST::AST_PARAMETER: case AST::AST_LOCALPARAM: - AST_INTERNAL::current_scope[current_node->str] = current_node; - convert_packed_unpacked_range(current_node); - break; + AST_INTERNAL::current_scope[current_node->str] = current_node; + convert_packed_unpacked_range(current_node); + break; case AST::AST_IDENTIFIER: - if (!current_node->children.empty() && !current_node->basic_prep) { - log_assert(AST_INTERNAL::current_ast_mod); - log_assert(AST_INTERNAL::current_scope.count(current_node->str)); - AST::AstNode *wire_node = AST_INTERNAL::current_scope[current_node->str]; - const std::vector packed_ranges = wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); - const std::vector unpacked_ranges = wire_node->attributes.count(ID::unpacked_ranges) ? wire_node->attributes[ID::unpacked_ranges]->children : std::vector(); - if ((wire_node->type == AST::AST_WIRE || wire_node->type == AST::AST_PARAMETER || wire_node->type == AST::AST_LOCALPARAM) - && !(packed_ranges.empty() && unpacked_ranges.empty()) - && !(packed_ranges.size() + unpacked_ranges.size() == 1)) { - auto result = convert_range(current_node, packed_ranges, unpacked_ranges, 0); - for (size_t i = 0; i < current_node->children.size(); i++) { - delete current_node->children[i]; - } - current_node->children.clear(); - current_node->children.push_back(result); - } - } - break; + if (!current_node->children.empty() && !current_node->basic_prep) { + log_assert(AST_INTERNAL::current_ast_mod); + log_assert(AST_INTERNAL::current_scope.count(current_node->str)); + AST::AstNode *wire_node = AST_INTERNAL::current_scope[current_node->str]; + const std::vector packed_ranges = + wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); + const std::vector unpacked_ranges = + wire_node->attributes.count(ID::unpacked_ranges) ? wire_node->attributes[ID::unpacked_ranges]->children : std::vector(); + if ((wire_node->type == AST::AST_WIRE || wire_node->type == AST::AST_PARAMETER || wire_node->type == AST::AST_LOCALPARAM) && + !(packed_ranges.empty() && unpacked_ranges.empty()) && !(packed_ranges.size() + unpacked_ranges.size() == 1)) { + auto result = convert_range(current_node, packed_ranges, unpacked_ranges, 0); + for (size_t i = 0; i < current_node->children.size(); i++) { + delete current_node->children[i]; + } + current_node->children.clear(); + current_node->children.push_back(result); + } + } + break; case AST::AST_STRUCT: if (!current_node->str.empty() && parent_node && parent_node->type != AST::AST_TYPEDEF && parent_node->type != AST::AST_STRUCT) { - while (current_node->simplify(true, false, false, 1, -1, false, false)) { } + while (current_node->simplify(true, false, false, 1, -1, false, false)) { + } AST_INTERNAL::current_scope[current_node->str]->attributes[ID::wiretype] = AST::AstNode::mkconst_str(current_node->str); AST_INTERNAL::current_scope[current_node->str]->attributes[ID::wiretype]->id2ast = current_node; } break; - default: break; + default: + break; } } -static void clear_current_scope() +static void clear_current_scope() { // Remove clear current_scope from package nodes AST_INTERNAL::current_scope.clear(); @@ -1020,7 +1029,7 @@ void UhdmAst::process_design() current_node->children.insert(current_node->children.begin(), pair.second); else { #ifdef BUILD_UPSTREAM - //convert_multiranges(pair.second); + // convert_multiranges(pair.second); check_memories(pair.second); setup_current_scope(shared.top_nodes, pair.second); simplify(pair.second, nullptr); diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index ca129bfd5..cd7f231a6 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -135,7 +135,7 @@ class UhdmAst void visitEachDescendant(AST::AstNode *node, const std::function &f); #ifdef BUILD_UPSTREAM - //void convert_multiranges(AST::AstNode *module_node); + // void convert_multiranges(AST::AstNode *module_node); #endif UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index ef0381967..1a1c6826a 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -5,7 +5,8 @@ namespace ID IdString partial{"\\partial"}; IdString packed_ranges{"\\packed_ranges"}; IdString unpacked_ranges{"\\unpacked_ranges"}; -IdString force_convert{"\\force_convert"}; // set this attribute to force conversion of multirange wire to single range. It is useful to force-convert some memories. +IdString force_convert{ + "\\force_convert"}; // set this attribute to force conversion of multirange wire to single range. It is useful to force-convert some memories. IdString is_imported{"\\is_imported"}; } // namespace ID } // namespace RTLIL From ddc110a0610c7a1aeeb8900aa87f8b4aa5c07e24 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 15 Dec 2021 14:39:58 +0100 Subject: [PATCH 499/845] Fix access to packed enum inside struct Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 7146fa5f5..0289a33f4 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -788,7 +788,7 @@ void UhdmAst::process_packed_array_typespec() #ifdef BUILD_UPSTREAM if (node->type == AST::AST_ENUM && !node->children.empty()) { for (auto c : node->children[0]->children) { - if (c->type == AST::AST_RANGE) + if (c->type == AST::AST_RANGE && c->str.empty()) unpacked_ranges.push_back(c->clone()); } } @@ -1373,6 +1373,20 @@ void UhdmAst::process_typespec_member() delete node; } else if (node) { auto str = current_node->str; +#ifdef BUILD_UPSTREAM + if (node->attributes.count(ID::packed_ranges)) { + for (auto r : node->attributes[ID::packed_ranges]->children) { + node->children.push_back(r->clone()); + } + node->attributes.erase(ID::packed_ranges); + } + if (node->attributes.count(ID::unpacked_ranges)) { + for (auto r : node->attributes[ID::unpacked_ranges]->children) { + node->children.push_back(r->clone()); + } + node->attributes.erase(ID::unpacked_ranges); + } +#endif node->cloneInto(current_node); current_node->str = str; current_node->type = AST::AST_STRUCT_ITEM; From d2065d527af93598447fcbfe8fe2855de1fa75e4 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 15 Dec 2021 14:42:36 +0100 Subject: [PATCH 500/845] Fix signed value for AST::AST_SHIFT_SRIGHT and AST::AST_SHIFT_SLEFT Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 0289a33f4..ae7eb0509 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2249,9 +2249,13 @@ void UhdmAst::process_operation() break; case vpiArithLShiftOp: current_node->type = AST::AST_SHIFT_SLEFT; + log_assert(current_node->children.size() == 2); + current_node->children[1]->is_signed = false; break; case vpiArithRShiftOp: current_node->type = AST::AST_SHIFT_SRIGHT; + log_assert(current_node->children.size() == 2); + current_node->children[1]->is_signed = false; break; case vpiPowerOp: current_node->type = AST::AST_POW; From 001dc9c125ec06f7f08247648264731e65f4c33f Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 15 Dec 2021 15:23:05 +0100 Subject: [PATCH 501/845] Add fallback to handling AST_DOT Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ae7eb0509..b677d0d90 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -449,14 +449,10 @@ static AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::A return new AST::AstNode(AST::AST_RANGE, left, right); } -static AST::AstNode *convert_dot(AST::AstNode *node, AST::AstNode *dot) +static AST::AstNode *convert_dot(AST::AstNode *wire_node, AST::AstNode *node, AST::AstNode *dot) { - AST::AstNode *wire_node = nullptr; std::vector packed_ranges; std::vector unpacked_ranges; - log_assert(AST_INTERNAL::current_scope.count(node->str)); - // We found wire node - wire_node = AST_INTERNAL::current_scope[node->str]; AST::AstNode *struct_node = nullptr; if (wire_node->type == AST::AST_STRUCT) { @@ -511,12 +507,29 @@ static void setup_current_scope(std::unordered_map static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) { AST::AstNode *expanded = nullptr; + AST::AstNode *dot = nullptr; for (auto c : current_node->children) { if (c->type == AST::AST_DOT && expanded == nullptr) { - expanded = convert_dot(current_node, c); + dot = c; + break; + } + } + if (dot) { + if (!AST_INTERNAL::current_scope.count(current_node->str)) { + // TODO: this fallback only support single dot + // for accessing elements currently unsupported with AST_DOT + // fallback to "." notation + current_node->str += "." + dot->str.substr(1); + for (auto cc : current_node->children) { + delete cc; + } + current_node->children.clear(); + } else { + auto wire_node = AST_INTERNAL::current_scope[current_node->str]; + expanded = convert_dot(wire_node, current_node, dot); } } - if (expanded != nullptr) { + if (expanded) { for (size_t i = 0; i < current_node->children.size(); i++) { delete current_node->children[i]; } From 33234cb4461b4868422a696a51ca0353267df192 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 15 Dec 2021 16:31:41 +0100 Subject: [PATCH 502/845] Remove commented convert_multiranges function Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 79 ------------------------------------------ uhdm-plugin/UhdmAst.h | 4 --- 2 files changed, 83 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index b677d0d90..de41c46ca 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1042,7 +1042,6 @@ void UhdmAst::process_design() current_node->children.insert(current_node->children.begin(), pair.second); else { #ifdef BUILD_UPSTREAM - // convert_multiranges(pair.second); check_memories(pair.second); setup_current_scope(shared.top_nodes, pair.second); simplify(pair.second, nullptr); @@ -1749,84 +1748,6 @@ void UhdmAst::process_packed_array_net() #endif } -#ifdef BUILD_UPSTREAM - -/*void UhdmAst::convert_multiranges(AST::AstNode *module_node) -{ - shared.current_top_node = module_node; - std::map>> multirange_wires; - std::map wires; - std::vector remove_ids; - shared.multirange_scope.clear(); - shared.multirange_scope.push_back(""); - AST::AstNode *expanded = nullptr; - visitEachDescendant(module_node, [&](AST::AstNode *node) { - for (auto c : node->children) { - if (c->type == AST::AST_DOT && expanded == nullptr) { - expanded = convert_dot(node, c); - } - } - if (expanded != nullptr) { - node->children.clear(); - node->children.push_back(expanded->clone()); - expanded = nullptr; - return; - } - // TODO: this is ugly, probably this could be done better - // We can't convert AST_MEMORY if it is accessed by readmemh - if (node->str == "\\$readmemh") { - remove_ids.push_back(node->children[1]->str); - return; - } - std::string name = ""; - for (auto s : shared.multirange_scope) { - name += s; - } - name += node->str; - if (node->type == AST::AST_WIRE && !node->str.empty()) { - wires[name] = node; - } - if (node->type == AST::AST_WIRE || node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) { - if (node->attributes.count(ID::packed_ranges) || node->attributes.count(ID::unpacked_ranges)) { - if (node->attributes[ID::packed_ranges]->children.empty() && node->attributes[ID::unpacked_ranges]->children.empty()) { - node->attributes.erase(ID::packed_ranges); - node->attributes.erase(ID::unpacked_ranges); - return; - } - // wire inside typedef, it doesn't have any ids, so convert now - if (node->str.empty()) { - convert_packed_unpacked_range(node, std::vector()); - return; - } - log_assert(multirange_wires.count(name) == 0); - multirange_wires[name] = std::make_pair(node, std::vector()); - } - } - if (node->type == AST::AST_IDENTIFIER && std::find(remove_ids.begin(), remove_ids.end(), node->str) == remove_ids.end()) { - auto current_scope = shared.multirange_scope; - // wire can be declared in previous scope - while (!current_scope.empty()) { - std::string id_name = ""; - for (auto s : current_scope) { - id_name += s; - } - id_name += node->str; - if (multirange_wires.count(id_name)) { - multirange_wires[id_name].second.push_back(node); - break; - } - current_scope.pop_back(); - } - } - }); - for (auto m : multirange_wires) { - convert_packed_unpacked_range(m.second.first, m.second.second); - } -} -*/ - -#endif - void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::function &f) { #ifdef BUILD_UPSTREAM diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index cd7f231a6..7ce582b02 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -134,10 +134,6 @@ class UhdmAst void process_nonsynthesizable(const UHDM::BaseClass *object); void visitEachDescendant(AST::AstNode *node, const std::function &f); -#ifdef BUILD_UPSTREAM - // void convert_multiranges(AST::AstNode *module_node); -#endif - UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) { if (parent) From 3559a87eadc9f4b0e63a9a6a015c87562c12d555 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 16 Dec 2021 09:10:20 +0100 Subject: [PATCH 503/845] Skip identifiers not found in current_scope This kind of identifiers have wire declared after identifier. This can be caused by some simplification step and we can safely skip them here. Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index de41c46ca..8faa9c3a2 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -556,7 +556,9 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) case AST::AST_IDENTIFIER: if (!current_node->children.empty() && !current_node->basic_prep) { log_assert(AST_INTERNAL::current_ast_mod); - log_assert(AST_INTERNAL::current_scope.count(current_node->str)); + if (!AST_INTERNAL::current_scope.count(current_node->str)) { + break; + } AST::AstNode *wire_node = AST_INTERNAL::current_scope[current_node->str]; const std::vector packed_ranges = wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); From 666195e08005efab2504e1701428886ab2322bd9 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 16 Dec 2021 09:12:02 +0100 Subject: [PATCH 504/845] Fix building for antmicro fork Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 8faa9c3a2..f572e2067 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1025,6 +1025,7 @@ void UhdmAst::process_design() shared.top_nodes[node->str] = node; } }); +#ifdef BUILD_UPSTREAM for (auto pair : shared.top_nodes) { if (!pair.second) continue; @@ -1035,6 +1036,7 @@ void UhdmAst::process_design() clear_current_scope(); } } +#endif // Once we walked everything, unroll that as children of this node for (auto pair : shared.top_nodes) { if (!pair.second) From 3aefa9aa33c4a145bd99da2da087bbe8853762ba Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 16 Dec 2021 12:11:22 +0100 Subject: [PATCH 505/845] Add support for accessing multiranges not starting with 0 Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index f572e2067..2a2d3dbd0 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -122,6 +122,8 @@ static void add_multirange_wire(AST::AstNode *node, std::vector node->attributes[ID::unpacked_ranges] = AST::AstNode::mkconst_int(1, false, 1); if (!unpacked_ranges.empty()) { + if (reverse) + std::reverse(unpacked_ranges.begin(), unpacked_ranges.end()); node->attributes[ID::unpacked_ranges]->children.insert(node->attributes[ID::unpacked_ranges]->children.end(), unpacked_ranges.begin(), unpacked_ranges.end()); } @@ -140,8 +142,6 @@ static size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vecto log_assert(ranges[i]->children[0]->type == AST::AST_CONSTANT); log_assert(ranges[i]->children[1]->type == AST::AST_CONSTANT); wire_node->multirange_dimensions.push_back(min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer)); - // TODO: add support for wires not starting with 0 - log_assert(wire_node->multirange_dimensions.back() == 0); wire_node->multirange_dimensions.push_back(max(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) - min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) + 1); wire_node->multirange_swapped.push_back(ranges[i]->range_swapped); @@ -160,8 +160,8 @@ static AST::AstNode *convert_range(AST::AstNode *id, const std::vector single_elem_size; single_elem_size.push_back(elem_size); - for (size_t j = 1; j < wire_node->multirange_dimensions.size(); j = j + 2) { - elem_size *= wire_node->multirange_dimensions[j]; + for (size_t j = 0; (j + 1) < wire_node->multirange_dimensions.size(); j = j + 2) { + elem_size *= wire_node->multirange_dimensions[j + 1] - wire_node->multirange_dimensions[j]; single_elem_size.push_back(elem_size); } std::reverse(single_elem_size.begin(), single_elem_size.end()); @@ -188,13 +188,16 @@ static AST::AstNode *convert_range(AST::AstNode *id, const std::vectormultirange_swapped.empty()) { bool is_swapped = wire_node->multirange_swapped[wire_node->multirange_swapped.size() - i - 1]; if (is_swapped) { + auto left_idx = wire_node->multirange_dimensions.size() - (i * 2) - 1; + auto right_idx = wire_node->multirange_dimensions.size() - (i * 2) - 2; + auto elem_size = wire_node->multirange_dimensions[left_idx] - wire_node->multirange_dimensions[right_idx]; range_left = new AST::AstNode( AST::AST_SUB, - AST::AstNode::mkconst_int(wire_node->multirange_dimensions[wire_node->multirange_dimensions.size() - (i * 2) - 1] - 1, false), + AST::AstNode::mkconst_int(elem_size - 1, false), range_left->clone()); range_right = new AST::AstNode( AST::AST_SUB, - AST::AstNode::mkconst_int(wire_node->multirange_dimensions[wire_node->multirange_dimensions.size() - (i * 2) - 1] - 1, false), + AST::AstNode::mkconst_int(elem_size - 1, false), range_right->clone()); } } @@ -1591,6 +1594,11 @@ void UhdmAst::process_array_var() #else visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); #endif + } else if (vpi_get(vpiType, reg_h) == vpiIntVar) { +#ifdef BUILD_UPSTREAM + packed_ranges.push_back(make_range(31, 0)); +#endif + visit_default_expr(reg_h); } vpi_release_handle(reg_h); } From 81b3e76630a483b3ba554100ebb07ccbdd682122 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 17 Dec 2021 10:55:42 +0100 Subject: [PATCH 506/845] Format code Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 2a2d3dbd0..728df3fac 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -191,14 +191,8 @@ static AST::AstNode *convert_range(AST::AstNode *id, const std::vectormultirange_dimensions.size() - (i * 2) - 1; auto right_idx = wire_node->multirange_dimensions.size() - (i * 2) - 2; auto elem_size = wire_node->multirange_dimensions[left_idx] - wire_node->multirange_dimensions[right_idx]; - range_left = new AST::AstNode( - AST::AST_SUB, - AST::AstNode::mkconst_int(elem_size - 1, false), - range_left->clone()); - range_right = new AST::AstNode( - AST::AST_SUB, - AST::AstNode::mkconst_int(elem_size - 1, false), - range_right->clone()); + range_left = new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(elem_size - 1, false), range_left->clone()); + range_right = new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(elem_size - 1, false), range_right->clone()); } } range_left = From 4c2b83b484ed901021901ad449bb48d32406fedc Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 17 Dec 2021 12:35:34 +0100 Subject: [PATCH 507/845] Fix case when wiretype is 2nd child Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 728df3fac..785b9b14a 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -216,6 +216,19 @@ static AST::AstNode *convert_range(AST::AstNode *id, const std::vectorchildren.empty()) { + if (wire_node->children[0]->type == AST::AST_WIRETYPE) { + wiretype_node = wire_node->children[0]; + } + } + if (wire_node->children.size() > 1) { + if (wire_node->children[1]->type == AST::AST_WIRETYPE) { + wiretype_node = wire_node->children[1]; + } + } + if (wiretype_node == nullptr) + return; std::vector packed_ranges; std::vector unpacked_ranges; // First check if it has already defined ranges @@ -230,10 +243,8 @@ static void resolve_wiretype(AST::AstNode *wire_node) } } AST::AstNode *wiretype_ast = nullptr; - if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) { - log_assert(AST_INTERNAL::current_scope.count(wire_node->children[0]->str)); - wiretype_ast = AST_INTERNAL::current_scope[wire_node->children[0]->str]; - } + log_assert(AST_INTERNAL::current_scope.count(wiretype_node->str)); + wiretype_ast = AST_INTERNAL::current_scope[wiretype_node->str]; // we need to setup current top ast as this simplify // needs to have access to all already definied ids while (wire_node->simplify(true, false, false, 1, -1, false, false)) { @@ -295,9 +306,7 @@ static void check_memories(AST::AstNode *module_node) // to correct range static void convert_packed_unpacked_range(AST::AstNode *wire_node) { - if (!wire_node->children.empty() && wire_node->children[0]->type == AST::AST_WIRETYPE) { - resolve_wiretype(wire_node); - } + resolve_wiretype(wire_node); const std::vector packed_ranges = wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); const std::vector unpacked_ranges = From 6cbac2526e7a71bd309ae26924a959dbc9efc004 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 17 Dec 2021 13:24:01 +0100 Subject: [PATCH 508/845] Add support for vpiMultiAssignmentPatternOp Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 785b9b14a..5cfff1c0a 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2238,6 +2238,7 @@ void UhdmAst::process_operation() break; } case vpiMultiConcatOp: + case vpiMultiAssignmentPatternOp: current_node->type = AST::AST_REPLICATE; break; case vpiAssignmentOp: From e8dec8f78b248f72be0bd725979b1278c92ee647 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 17 Dec 2021 14:54:29 +0100 Subject: [PATCH 509/845] Add support for vpiImmediateCover Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 13 +++++++++++++ uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 14 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5cfff1c0a..767645f19 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3341,6 +3341,16 @@ void UhdmAst::process_long_int_var() current_node->is_signed = vpi_get(vpiSigned, obj_h); } +void UhdmAst::process_immediate_cover() +{ + current_node = make_ast_node(AST::AST_COVER); + visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) { obj_h = obj_handle; @@ -3553,6 +3563,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiLongIntVar: process_long_int_var(); break; + case vpiImmediateCover: + process_immediate_cover(); + break; case vpiProgram: default: report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 7ce582b02..9c064918a 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -130,6 +130,7 @@ class UhdmAst void process_repeat(); void process_byte_var(); void process_long_int_var(); + void process_immediate_cover(); void simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node = nullptr); void process_nonsynthesizable(const UHDM::BaseClass *object); void visitEachDescendant(AST::AstNode *node, const std::function &f); From cd2a8acc26a916b62c9e9d276aea678f4803fe22 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 20 Dec 2021 08:49:16 +0100 Subject: [PATCH 510/845] Fix some cases when typespec is anonymous Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 79 ++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 34 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5cfff1c0a..cb6a11cd3 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1568,30 +1568,34 @@ void UhdmAst::process_array_var() vpiHandle itr = vpi_iterate(vpi_get(vpiType, obj_h) == vpiArrayVar ? vpiReg : vpiElement, obj_h); while (vpiHandle reg_h = vpi_scan(itr)) { if (vpi_get(vpiType, reg_h) == vpiStructVar || vpi_get(vpiType, reg_h) == vpiEnumVar) { - vpiHandle typespec_h = vpi_handle(vpiTypespec, reg_h); - std::string name = vpi_get_str(vpiName, typespec_h); - sanitize_symbol_name(name); - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = name; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type = true; - shared.report.mark_handled(reg_h); - shared.report.mark_handled(typespec_h); - vpi_release_handle(typespec_h); + visit_one_to_one({vpiTypespec}, reg_h, [&](AST::AstNode *node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + } else { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + } + delete node; + }); } else if (vpi_get(vpiType, reg_h) == vpiLogicVar) { current_node->is_logic = true; - vpiHandle typespec_h = vpi_handle(vpiTypespec, reg_h); - if (typespec_h) { - std::string name = vpi_get_str(vpiName, typespec_h); - sanitize_symbol_name(name); - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = name; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type = true; - shared.report.mark_handled(reg_h); - shared.report.mark_handled(typespec_h); - vpi_release_handle(typespec_h); - } + visit_one_to_one({vpiTypespec}, reg_h, [&](AST::AstNode *node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + } else { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + } + delete node; + }); #ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); #else @@ -1809,16 +1813,19 @@ void UhdmAst::process_array_net() #endif shared.report.mark_handled(net_h); } else if (net_type == vpiStructNet) { - vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h); - std::string name = vpi_get_str(vpiName, typespec_h); - sanitize_symbol_name(name); - auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); - wiretype_node->str = name; - current_node->children.push_back(wiretype_node); - current_node->is_custom_type = true; - shared.report.mark_handled(net_h); - shared.report.mark_handled(typespec_h); - vpi_release_handle(typespec_h); + visit_one_to_one({vpiTypespec}, net_h, [&](AST::AstNode *node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + } else { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + } + delete node; + }); } vpi_release_handle(net_h); } @@ -2821,13 +2828,17 @@ void UhdmAst::process_logic_var() // then just setting boolean value // current_node->is_const = vpi_get(vpiConstantVariable, obj_h); visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - if (node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + } else { auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); wiretype_node->str = node->str; - // wiretype needs to be 1st node (if port have also another range nodes) current_node->children.push_back(wiretype_node); current_node->is_custom_type = true; } + delete node; }); #ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); From 12653140189046ec69f781bc963f9a94e55147f2 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 20 Dec 2021 09:49:28 +0100 Subject: [PATCH 511/845] Fix missing range in int_typespec Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5cfff1c0a..a1713c5e7 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2461,6 +2461,7 @@ void UhdmAst::process_assignment_pattern_op() for (auto p : ordered_children) { current_node->children.push_back(p.second); } + std::reverse(current_node->children.begin(), current_node->children.end()); return; } auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); @@ -2936,11 +2937,20 @@ void UhdmAst::process_logic_typespec() void UhdmAst::process_int_typespec() { +#ifdef BUILD_UPSTREAM + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name +#endif current_node = make_ast_node(AST::AST_WIRE); auto left_const = AST::AstNode::mkconst_int(31, true); auto right_const = AST::AstNode::mkconst_int(0, true); auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); +#ifdef BUILD_UPSTREAM + packed_ranges.push_back(range); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +#else current_node->children.push_back(range); +#endif current_node->is_signed = true; if (!current_node->str.empty()) { move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); From 0bf7b85390fe04d5ad404db1c4d975c60be6200d Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 20 Dec 2021 11:01:37 +0100 Subject: [PATCH 512/845] Parse vpiTaskFunc before vpiParameter Functions can be used to calculate e.g. width of the param Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5cfff1c0a..d0d86ca69 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -551,6 +551,7 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) switch (current_node->type) { case AST::AST_TYPEDEF: case AST::AST_ENUM: + case AST::AST_FUNCTION: AST_INTERNAL::current_scope[current_node->str] = current_node; break; case AST::AST_WIRE: @@ -1155,8 +1156,8 @@ void UhdmAst::process_module() move_type_to_new_typedef(current_node, node); } }); - visit_one_to_many({vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray, vpiContAssign, - vpiProcess, vpiTaskFunc}, + visit_one_to_many({vpiModule, vpiInterface, vpiTaskFunc, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray, + vpiContAssign, vpiProcess}, obj_h, [&](AST::AstNode *node) { if (node) { if (node->type == AST::AST_ASSIGN && node->children.size() < 2) From 56a668a67b70954760eb38553fa0693b7365baf0 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 20 Dec 2021 11:09:53 +0100 Subject: [PATCH 513/845] Visit typedefs defined in the file level Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5cfff1c0a..96b3ae92b 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1026,11 +1026,12 @@ AST::AstNode *UhdmAst::find_ancestor(const std::unordered_set void UhdmAst::process_design() { current_node = make_ast_node(AST::AST_DESIGN); - visit_one_to_many({UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules}, obj_h, [&](AST::AstNode *node) { - if (node) { - shared.top_nodes[node->str] = node; - } - }); + visit_one_to_many({UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules, vpiTypedef}, obj_h, + [&](AST::AstNode *node) { + if (node) { + shared.top_nodes[node->str] = node; + } + }); #ifdef BUILD_UPSTREAM for (auto pair : shared.top_nodes) { if (!pair.second) From d266639768b528c29fa7052975a2403db42e9162 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 20 Dec 2021 11:40:53 +0100 Subject: [PATCH 514/845] Add support for multiple dots in fallback Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5cfff1c0a..06b7ca66e 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -522,10 +522,16 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) } if (dot) { if (!AST_INTERNAL::current_scope.count(current_node->str)) { - // TODO: this fallback only support single dot // for accessing elements currently unsupported with AST_DOT // fallback to "." notation - current_node->str += "." + dot->str.substr(1); + while (dot && !dot->str.empty()) { + current_node->str += "." + dot->str.substr(1); + if (!dot->children.empty()) { + dot = dot->children[0]; + } else { + dot = nullptr; + } + } for (auto cc : current_node->children) { delete cc; } From 4563e938b2c79dc9c4a4277101338797b1d64b06 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 20 Dec 2021 14:54:20 +0100 Subject: [PATCH 515/845] Add support for variables defined inside named blocks Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 5cfff1c0a..82942c88d 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2049,11 +2049,13 @@ void UhdmAst::process_begin() }); // TODO: find out how to set VERILOG_FRONTEND::sv_mode to true // simplify checks if sv_mode is set to ture when wire is declared inside unnamed block - /*visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->children.push_back(node); - } - });*/ + if (!current_node->str.empty()) { + visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); + } } void UhdmAst::process_operation() From 70b70cac2b4d0682e0b5199cd54fedab282e0593 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 20 Dec 2021 11:30:37 +0100 Subject: [PATCH 516/845] Add support for vpiWhile Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 21 +++++++++++++++++++++ uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 22 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 12fe90a9d..aaf77bafb 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3382,6 +3382,24 @@ void UhdmAst::process_immediate_cover() }); } +void UhdmAst::process_while() +{ + current_node = make_ast_node(AST::AST_WHILE); + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { + if (node->type != AST::AST_BLOCK) { + auto *statements = make_ast_node(AST::AST_BLOCK); + statements->str = current_node->str; // Needed in simplify step + statements->children.push_back(node); + current_node->children.push_back(statements); + } else { + if (node->str == "") { + node->str = current_node->str; + } + } + }); +} + AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) { obj_h = obj_handle; @@ -3597,6 +3615,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiImmediateCover: process_immediate_cover(); break; + case vpiWhile: + process_while(); + break; case vpiProgram: default: report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 9c064918a..c4efd466d 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -131,6 +131,7 @@ class UhdmAst void process_byte_var(); void process_long_int_var(); void process_immediate_cover(); + void process_while(); void simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node = nullptr); void process_nonsynthesizable(const UHDM::BaseClass *object); void visitEachDescendant(AST::AstNode *node, const std::function &f); From 8ebab466014b08fee8f98575c69b264e3e2de4b5 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 21 Dec 2021 08:50:50 +0100 Subject: [PATCH 517/845] Fix variables in unnamed blocks Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 24 ++++++++++++------------ uhdm-plugin/UhdmAst.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index aaf77bafb..30fb5e40f 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2044,9 +2044,18 @@ void UhdmAst::process_initial() }); } -void UhdmAst::process_begin() +void UhdmAst::process_begin(bool is_named) { current_node = make_ast_node(AST::AST_BLOCK); + // TODO: find out how to set VERILOG_FRONTEND::sv_mode to true + // simplify checks if sv_mode is set to ture when wire is declared inside unnamed block + if (is_named) { + visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); + } visit_one_to_many({vpiStmt}, obj_h, [&](AST::AstNode *node) { if (node) { if ((node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) && node->children.size() == 1) { @@ -2062,15 +2071,6 @@ void UhdmAst::process_begin() } } }); - // TODO: find out how to set VERILOG_FRONTEND::sv_mode to true - // simplify checks if sv_mode is set to ture when wire is declared inside unnamed block - if (!current_node->str.empty()) { - visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->children.push_back(node); - } - }); - } } void UhdmAst::process_operation() @@ -3505,10 +3505,10 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) process_initial(); break; case vpiNamedBegin: - process_begin(); + process_begin(true); break; case vpiBegin: - process_begin(); + process_begin(false); // for unnamed block, reset block name current_node->str = ""; break; diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index c4efd466d..33fe6568b 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -96,7 +96,7 @@ class UhdmAst void process_always(); void process_event_control(); void process_initial(); - void process_begin(); + void process_begin(bool is_named); void process_operation(); void process_stream_op(); void process_list_op(); From eecb96dec202cb35bc0aa9e703175837d55b5c09 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 21 Dec 2021 09:36:54 +0100 Subject: [PATCH 518/845] Add support for vpiImmediateAssume Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 13 +++++++++++++ uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 14 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index aaf77bafb..bd0cc6457 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3382,6 +3382,16 @@ void UhdmAst::process_immediate_cover() }); } +void UhdmAst::process_immediate_assume() +{ + current_node = make_ast_node(AST::AST_ASSUME); + visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); +} + void UhdmAst::process_while() { current_node = make_ast_node(AST::AST_WHILE); @@ -3615,6 +3625,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiImmediateCover: process_immediate_cover(); break; + case vpiImmediateAssume: + process_immediate_assume(); + break; case vpiWhile: process_while(); break; diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index c4efd466d..add877a93 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -131,6 +131,7 @@ class UhdmAst void process_byte_var(); void process_long_int_var(); void process_immediate_cover(); + void process_immediate_assume(); void process_while(); void simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node = nullptr); void process_nonsynthesizable(const UHDM::BaseClass *object); From be5aca6a2e6c7231e56cc6240db3278c90772462 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 21 Dec 2021 11:10:12 +0100 Subject: [PATCH 519/845] Fail on unsupported vpiClockingBlock Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 11 ++++++++++- uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index aaf77bafb..f98edf883 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1164,7 +1164,7 @@ void UhdmAst::process_module() } }); visit_one_to_many({vpiModule, vpiInterface, vpiTaskFunc, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray, - vpiContAssign, vpiProcess}, + vpiContAssign, vpiProcess, vpiClockingBlock}, obj_h, [&](AST::AstNode *node) { if (node) { if (node->type == AST::AST_ASSIGN && node->children.size() < 2) @@ -3400,6 +3400,12 @@ void UhdmAst::process_while() }); } +void UhdmAst::process_unsupported_stmt(const UHDM::BaseClass *object) +{ + log_error("%s:%d: Currently not supported object of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), + UHDM::VpiTypeName(obj_h).c_str()); +} + AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) { obj_h = obj_handle; @@ -3618,6 +3624,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiWhile: process_while(); break; + case vpiClockingBlock: + process_unsupported_stmt(object); + break; case vpiProgram: default: report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index c4efd466d..e455bc9ba 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -134,6 +134,7 @@ class UhdmAst void process_while(); void simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node = nullptr); void process_nonsynthesizable(const UHDM::BaseClass *object); + void process_unsupported_stmt(const UHDM::BaseClass *object); void visitEachDescendant(AST::AstNode *node, const std::function &f); UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) From e00acb549014b0e7f65e90b1234cc8e9185ddf25 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 21 Dec 2021 13:01:45 +0100 Subject: [PATCH 520/845] Fail when range is unsized Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 14 ++++++++++++-- uhdm-plugin/UhdmAst.h | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index aaf77bafb..d96d31f39 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2686,10 +2686,20 @@ void UhdmAst::process_case_item() }); } -void UhdmAst::process_range() +void UhdmAst::process_range(const UHDM::BaseClass *object) { current_node = make_ast_node(AST::AST_RANGE); visit_one_to_one({vpiLeftRange, vpiRightRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + if (current_node->children.size() > 0) { + if (current_node->children[0]->str == "unsized") { + log_error("%s:%d: Currently not supported object of type 'unsized range'\n", object->VpiFile().c_str(), object->VpiLineNo()); + } + } + if (current_node->children.size() > 1) { + if (current_node->children[1]->str == "unsized") { + log_error("%s:%d: Currently not supported object of type 'unsized range'\n", object->VpiFile().c_str(), object->VpiLineNo()); + } + } } void UhdmAst::process_return() @@ -3554,7 +3564,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) current_node = process_value(obj_h); break; case vpiRange: - process_range(); + process_range(object); break; case vpiReturn: process_return(); diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index c4efd466d..0524d98c7 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -114,7 +114,7 @@ class UhdmAst void process_gen_scope(); void process_case(); void process_case_item(); - void process_range(); + void process_range(const UHDM::BaseClass *object); void process_return(); void process_function(); void process_logic_var(); From c6a35e84462e9115708c3c6e692970abaa513785 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 21 Dec 2021 13:12:21 +0100 Subject: [PATCH 521/845] Fail when event_control is not inside always Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 7 +++++-- uhdm-plugin/UhdmAst.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index aaf77bafb..504f5b326 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2012,12 +2012,15 @@ void UhdmAst::process_always() } } -void UhdmAst::process_event_control() +void UhdmAst::process_event_control(const UHDM::BaseClass *object) { current_node = make_ast_node(AST::AST_BLOCK); visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { if (node) { auto process_node = find_ancestor({AST::AST_ALWAYS}); + if (!process_node) { + log_error("%s:%d: Currently supports only event control stmts inside 'always'\n", object->VpiFile().c_str(), object->VpiLineNo()); + } process_node->children.push_back(node); } // is added inside vpiOperation @@ -3499,7 +3502,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) process_always(); break; case vpiEventControl: - process_event_control(); + process_event_control(object); break; case vpiInitial: process_initial(); diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index c4efd466d..18e80f1b1 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -94,7 +94,7 @@ class UhdmAst void process_modport(); void process_io_decl(); void process_always(); - void process_event_control(); + void process_event_control(const UHDM::BaseClass *object); void process_initial(); void process_begin(); void process_operation(); From b0f3a9432f00eee785956439ee6cac1dd37a4733 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 21 Dec 2021 13:19:58 +0100 Subject: [PATCH 522/845] Add usage check to readmemh Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index aaf77bafb..f213d0324 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -281,6 +281,9 @@ static void check_memories(AST::AstNode *module_node) std::map memories; visitEachDescendantStatic(module_node, [&](AST::AstNode *node) { if (node->str == "\\$readmemh") { + if (node->children.size() != 2 || node->children[1]->str.empty() || node->children[1]->type != AST::AST_IDENTIFIER) { + log_error("%s:%d: Wrong usage of '\\$readmemh'\n", node->filename.c_str(), node->location.first_line); + } add_force_convert_attribute(memories[node->children[1]->str], 0); } if (node->type == AST::AST_WIRE) { From a745d805d019eb05fdd375d0fde3199412b7f25f Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 4 Jan 2022 13:07:22 +0100 Subject: [PATCH 523/845] Fix simplify parameter when containing custom simplification step Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 30fb5e40f..525a96744 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -538,6 +538,8 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) current_node->children.clear(); } else { auto wire_node = AST_INTERNAL::current_scope[current_node->str]; + // make sure wire_node is already simplified + simplify(wire_node, nullptr); expanded = convert_dot(wire_node, current_node, dot); } } @@ -1077,27 +1079,7 @@ void UhdmAst::process_design() #ifdef BUILD_UPSTREAM void UhdmAst::simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node) { - for (auto it = shared.top_nodes.begin(); it != shared.top_nodes.end(); it++) { - if (it->second->type == AST::AST_PACKAGE) { - for (auto &o : it->second->children) { - // import only parameters - if (o->type == AST::AST_TYPEDEF || o->type == AST::AST_PARAMETER || o->type == AST::AST_LOCALPARAM) { - // add imported nodes to current scope - AST_INTERNAL::current_scope[it->second->str + std::string("::") + o->str.substr(1)] = o; - AST_INTERNAL::current_scope[o->str] = o; - } else if (o->type == AST::AST_ENUM) { - AST_INTERNAL::current_scope[o->str] = o; - for (auto c : o->children) { - AST_INTERNAL::current_scope[c->str] = c; - } - } - } - } - } - // hackish way of setting current_ast_mod as it is required - // for simplify to get references for already defined ids - log_assert(shared.current_top_node != nullptr); - AST_INTERNAL::current_ast_mod = shared.current_top_node; + setup_current_scope(shared.top_nodes, shared.current_top_node); visitEachDescendant(shared.current_top_node, [&](AST::AstNode *current_scope_node) { if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_PARAMETER || current_scope_node->type == AST::AST_LOCALPARAM) { @@ -1112,14 +1094,12 @@ void UhdmAst::simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_n } }); } - // we need to setup current top ast as this simplify - // needs to have access to all already definied ids + // first apply custom simplification step if needed + simplify(parameter, nullptr); + // then simplify parameter to AST_CONSTANT or AST_REALVALUE while (parameter->simplify(true, false, false, 1, -1, false, false)) { } - // Remove clear current_scope from package nodes - AST_INTERNAL::current_scope.clear(); - // unset current_ast_mod - AST_INTERNAL::current_ast_mod = nullptr; + clear_current_scope(); } #endif @@ -1375,6 +1355,7 @@ void UhdmAst::process_typespec_member() } case vpiIntTypespec: { current_node->is_signed = true; + current_node->children.push_back(make_range(31, 0)); shared.report.mark_handled(typespec_h); break; } @@ -1659,6 +1640,9 @@ void UhdmAst::process_param_assign() unpacked_ranges.push_back(r->clone()); } } + if (node->attributes.count(ID::is_imported)) { + current_node->attributes[ID::is_imported] = node->attributes[ID::is_imported]->clone(); + } #endif current_node->is_custom_type = node->is_custom_type; shared.param_types[current_node->str] = shared.param_types[node->str]; From 3aa4974e5668fdc0602051b9aaf3881d2f4b2bd1 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 4 Jan 2022 14:59:44 +0100 Subject: [PATCH 524/845] Add orderedmultidict to Surelog dependencies Signed-off-by: Kamil Rakoczy --- .github/workflows/setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index 01a044c16..401611bdd 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -54,6 +54,7 @@ start_section Install-Yosys cd .. git clone --recursive https://github.com/chipsalliance/Surelog.git -b master cd Surelog + pip install orderedmultidict cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local-bin -DCMAKE_POSITION_INDEPENDENT_CODE=ON -S . -B build cmake --build build -j $(nproc) cmake --install build From 0a0888a700ed059c5194fe87385343fdef3230f6 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 4 Jan 2022 13:25:11 +0100 Subject: [PATCH 525/845] Fix hier_path handling 2d array select with custom wiretype Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 4b5cf5987..51418e585 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2753,10 +2753,15 @@ void UhdmAst::process_hier_path() current_node->children = std::move(node->children); top_node = current_node; delete node; - } else { // for other nodes, change type to AST_DOT - node->type = static_cast(AST::AST_DOT); - top_node->children.push_back(node); - top_node = node; + } else { + if (node->str.empty()) { + log_assert(!node->children.empty()); + top_node->children.push_back(node->children[0]); + } else { + node->type = static_cast(AST::AST_DOT); + top_node->children.push_back(node); + top_node = node; + } } }); } From 0832b3c26b179eac0552fdabd5d2a3f27be51583 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 7 Jan 2022 13:07:22 -0800 Subject: [PATCH 526/845] Switch on warnings and fix them Signed-off-by: Henner Zeller --- uhdm-plugin/Makefile | 5 +++-- uhdm-plugin/UhdmAst.cc | 8 ++++---- uhdm-plugin/uhdmsurelogastfrontend.cc | 6 ------ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 0bdb4b6e6..131bd26ba 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -14,8 +14,9 @@ SOURCES = UhdmAst.cc \ include ../Makefile_plugin.common -CPPFLAGS += -std=c++17 -I${UHDM_INSTALL_DIR}/include \ - -I${UHDM_INSTALL_DIR}/include/surelog +CPPFLAGS += -std=c++17 -Wall -W -Wextra -Werror \ + -I${UHDM_INSTALL_DIR}/include \ + -I${UHDM_INSTALL_DIR}/include/surelog ifeq ($(BUILD_UPSTREAM), 1) CXXFLAGS += -DBUILD_UPSTREAM=1 diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 51418e585..dafae9dfa 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -387,7 +387,7 @@ static AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::A AST::AstNode *struct_range = nullptr; for (auto c : search_node->children) { - if (c->type == AST::AST_DOT) { + if (c->type == static_cast(AST::AST_DOT)) { // There should be only 1 AST_DOT node children log_assert(!sub_dot); sub_dot = expand_dot(current_struct_elem, c); @@ -518,7 +518,7 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) AST::AstNode *expanded = nullptr; AST::AstNode *dot = nullptr; for (auto c : current_node->children) { - if (c->type == AST::AST_DOT && expanded == nullptr) { + if (c->type == static_cast(AST::AST_DOT) && expanded == nullptr) { dot = c; break; } @@ -556,7 +556,7 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) expanded = nullptr; } // First simplify children - for (int i = 0; i < current_node->children.size(); i++) { + for (size_t i = 0; i < current_node->children.size(); i++) { simplify(current_node->children[i], current_node); } switch (current_node->type) { @@ -3269,7 +3269,7 @@ void UhdmAst::process_parameter() std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name // currently unused, but save it for future use - if (vpi_get_str(vpiImported, obj_h) != "") { + if (const char *imported = vpi_get_str(vpiImported, obj_h); imported != nullptr && strlen(imported) > 0) { current_node->attributes[ID::is_imported] = AST::AstNode::mkconst_int(1, true); } visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index 7a7786d22..a5b004700 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -42,12 +42,6 @@ extern void visit_object(vpiHandle obj_h, int indent, const char *relation, std: YOSYS_NAMESPACE_BEGIN -/* Stub for AST::process */ -static void set_line_num(int) {} - -/* Stub for AST::process */ -static int get_line_num(void) { return 1; } - std::vector executeCompilation(SURELOG::SymbolTable *symbolTable, SURELOG::ErrorContainer *errors, SURELOG::CommandLineParser *clp, SURELOG::scompiler *compiler) { From aa8990b8fb997c02d7b39f674f5f44303766b431 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 10 Jan 2022 09:09:14 +0100 Subject: [PATCH 527/845] Fix order of nodes in assignment_pattern concat Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 51418e585..83da09276 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2468,7 +2468,6 @@ void UhdmAst::process_assignment_pattern_op() for (auto p : ordered_children) { current_node->children.push_back(p.second); } - std::reverse(current_node->children.begin(), current_node->children.end()); return; } auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); From f609914a697fae4110bf7f38944a4133a4b915c6 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 10 Jan 2022 14:50:11 +0100 Subject: [PATCH 528/845] Remove BUILD_UPSTREAM variable Now we are always targeting upstream yosys and this variable is no longer needed. Some features that are still opened as PR to mainline yosys, requires patch to yosys Signed-off-by: Kamil Rakoczy --- .github/workflows/build-and-test.sh | 7 +- .github/workflows/ci.yml | 14 +- .github/workflows/setup.sh | 23 +-- uhdm-plugin/Makefile | 4 - uhdm-plugin/UhdmAst.cc | 265 +--------------------------- uhdm-plugin/UhdmAst.h | 1 - uhdm-plugin/UhdmAstAntmicro.cc | 9 - uhdm-plugin/uhdmastshared.h | 3 - 8 files changed, 7 insertions(+), 319 deletions(-) delete mode 100644 uhdm-plugin/UhdmAstAntmicro.cc diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index 06a625277..0d6cf9e41 100644 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -15,12 +15,7 @@ source .github/workflows/common.sh start_section Building -if [ "$BUILD_UPSTREAM" = "0" ] -then - make UHDM_INSTALL_DIR=$HOME/.local-bin plugins -j`nproc` -else - make UHDM_INSTALL_DIR=`pwd`/env/conda/envs/yosys-plugins/ plugins -j`nproc` -fi +make UHDM_INSTALL_DIR=`pwd`/env/conda/envs/yosys-plugins/ plugins -j`nproc` end_section ########################################################################## diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a98ae0e3d..8f122874d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,14 +14,6 @@ jobs: Run-tests: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - {BUILD_UPSTREAM: "0"} - - {BUILD_UPSTREAM: "1"} - - name: "UHDM_BUILD_UPSTREAM_YOSYS=${{matrix.BUILD_UPSTREAM}}" steps: @@ -46,8 +38,6 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1 - with: - key: ${{ matrix.BUILD_UPSTREAM }} - name: Install Yosys run: | @@ -55,13 +45,11 @@ jobs: source .github/workflows/setup.sh env: OS: ${{ runner.os }} - BUILD_UPSTREAM: ${{ matrix.BUILD_UPSTREAM }} - name: Build and test plugins run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - if [ "$BUILD_UPSTREAM" = "1" ]; then source env/conda/bin/activate yosys-plugins; fi + source env/conda/bin/activate yosys-plugins source .github/workflows/build-and-test.sh env: OS: ${{ runner.os }} - BUILD_UPSTREAM: ${{ matrix.BUILD_UPSTREAM }} diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index 401611bdd..1cd4d8d78 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -42,27 +42,8 @@ start_section Install-Yosys echo '==========================' echo 'Making env with yosys and Surelog' echo '==========================' - if [ "$BUILD_UPSTREAM" = "0" ] - then - mkdir -p ~/.local-src - mkdir -p ~/.local-bin - cd ~/.local-src - git clone https://github.com/antmicro/yosys.git -b uhdm-plugin - cd yosys - PREFIX=$HOME/.local-bin make CONFIG=gcc ENABLE_NDEBUG=1 -j$(nproc) - PREFIX=$HOME/.local-bin make install - cd .. - git clone --recursive https://github.com/chipsalliance/Surelog.git -b master - cd Surelog - pip install orderedmultidict - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local-bin -DCMAKE_POSITION_INDEPENDENT_CODE=ON -S . -B build - cmake --build build -j $(nproc) - cmake --install build - cd ../.. - else - make env - make enter - fi + make env + make enter echo $(which yosys) echo $(which yosys-config) echo $(yosys-config --datdir) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 131bd26ba..0ad9ee04e 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -18,10 +18,6 @@ CPPFLAGS += -std=c++17 -Wall -W -Wextra -Werror \ -I${UHDM_INSTALL_DIR}/include \ -I${UHDM_INSTALL_DIR}/include/surelog -ifeq ($(BUILD_UPSTREAM), 1) -CXXFLAGS += -DBUILD_UPSTREAM=1 -endif - CXXFLAGS += -Wno-unused-parameter LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib/surelog -L${UHDM_INSTALL_DIR}/lib -L${UHDM_INSTALL_DIR}/lib64/uhdm -L${UHDM_INSTALL_DIR}/lib64/surelog -L${UHDM_INSTALL_DIR}/lib64 LDLIBS += -Wl,--whole-archive -luhdm -Wl,--no-whole-archive -lsurelog -lantlr4-runtime -lflatbuffers -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index dafae9dfa..4ccc37d93 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -12,10 +12,6 @@ #include #include -#ifndef BUILD_UPSTREAM -#include "frontends/verilog/verilog_frontend.h" -#endif - YOSYS_NAMESPACE_BEGIN static void sanitize_symbol_name(std::string &name) @@ -83,13 +79,8 @@ static AST::AstNode *make_range(int left, int right, bool is_signed = false) return range; } -#ifdef BUILD_UPSTREAM #include "UhdmAstUpstream.cc" -#else -#include "UhdmAstAntmicro.cc" -#endif -#ifdef BUILD_UPSTREAM static int get_max_offset(AST::AstNode *node) { // get the width from the MS member in the struct @@ -101,11 +92,11 @@ static int get_max_offset(AST::AstNode *node) return node->range_left; } -static void visitEachDescendantStatic(AST::AstNode *node, const std::function &f) +static void visitEachDescendant(AST::AstNode *node, const std::function &f) { for (auto child : node->children) { f(child); - visitEachDescendantStatic(child, f); + visitEachDescendant(child, f); } } @@ -279,7 +270,7 @@ static void add_force_convert_attribute(AST::AstNode *wire_node, int val = 1) static void check_memories(AST::AstNode *module_node) { std::map memories; - visitEachDescendantStatic(module_node, [&](AST::AstNode *node) { + visitEachDescendant(module_node, [&](AST::AstNode *node) { if (node->str == "\\$readmemh") { if (node->children.size() != 2 || node->children[1]->str.empty() || node->children[1]->type != AST::AST_IDENTIFIER) { log_error("%s:%d: Wrong usage of '\\$readmemh'\n", node->filename.c_str(), node->location.first_line); @@ -614,8 +605,6 @@ static void clear_current_scope() AST_INTERNAL::current_ast_mod = nullptr; } -#endif - void UhdmAst::visit_one_to_many(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f) { for (auto child : child_node_types) { @@ -643,34 +632,18 @@ void UhdmAst::visit_one_to_one(const std::vector child_node_types, vpiHandl } } -#ifdef BUILD_UPSTREAM -void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) -{ - std::vector range_nodes; - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->children = range_nodes; - f(multirange_node); - } else if (!range_nodes.empty()) { - f(range_nodes[0]); - } -} -#else void UhdmAst::visit_range(vpiHandle obj_h, const std::function &f) { std::vector range_nodes; visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); if (range_nodes.size() > 1) { auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; multirange_node->children = range_nodes; f(multirange_node); } else if (!range_nodes.empty()) { f(range_nodes[0]); } } -#endif void UhdmAst::visit_default_expr(vpiHandle obj_h) { @@ -805,10 +778,8 @@ AST::AstNode *UhdmAst::make_ast_node(AST::AstNodeType type, std::vector packed_ranges; std::vector unpacked_ranges; -#endif current_node = make_ast_node(AST::AST_WIRE); visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { if (node && node->type == AST::AST_STRUCT) { @@ -818,27 +789,17 @@ void UhdmAst::process_packed_array_typespec() delete node; } else if (node) { current_node->str = node->str; -#ifdef BUILD_UPSTREAM if (node->type == AST::AST_ENUM && !node->children.empty()) { for (auto c : node->children[0]->children) { if (c->type == AST::AST_RANGE && c->str.empty()) unpacked_ranges.push_back(c->clone()); } } -#endif delete node; } }); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#else - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->children.push_back(node); - } - }); -#endif } static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) @@ -864,7 +825,6 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) child->is_custom_type = true; } } -#ifdef BUILD_UPSTREAM if ((*it)->attributes.count(ID::packed_ranges) && child->attributes.count(ID::packed_ranges)) { if ((!(*it)->attributes[ID::packed_ranges]->children.empty() && child->attributes[ID::packed_ranges]->children.empty())) { child->attributes[ID::packed_ranges] = (*it)->attributes[ID::packed_ranges]->clone(); @@ -875,18 +835,6 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) child->attributes[ID::unpacked_ranges] = (*it)->attributes[ID::unpacked_ranges]->clone(); } } -#else - if (child->children.size() > 1 && child->type == AST::AST_WIRE && child->children[0]->type == AST::AST_RANGE && - child->children[1]->type == AST::AST_RANGE) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - for (auto *c : child->children) { - multirange_node->children.push_back(c); - } - child->children.clear(); - child->children.push_back(multirange_node); - } -#endif delete *it; *it = child; return; @@ -1044,7 +992,6 @@ void UhdmAst::process_design() shared.top_nodes[node->str] = node; } }); -#ifdef BUILD_UPSTREAM for (auto pair : shared.top_nodes) { if (!pair.second) continue; @@ -1055,7 +1002,6 @@ void UhdmAst::process_design() clear_current_scope(); } } -#endif // Once we walked everything, unroll that as children of this node for (auto pair : shared.top_nodes) { if (!pair.second) @@ -1064,12 +1010,10 @@ void UhdmAst::process_design() if (pair.second->type == AST::AST_PACKAGE) current_node->children.insert(current_node->children.begin(), pair.second); else { -#ifdef BUILD_UPSTREAM check_memories(pair.second); setup_current_scope(shared.top_nodes, pair.second); simplify(pair.second, nullptr); clear_current_scope(); -#endif current_node->children.push_back(pair.second); } } else { @@ -1079,7 +1023,6 @@ void UhdmAst::process_design() } } -#ifdef BUILD_UPSTREAM void UhdmAst::simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node) { setup_current_scope(shared.top_nodes, shared.current_top_node); @@ -1104,7 +1047,6 @@ void UhdmAst::simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_n } clear_current_scope(); } -#endif void UhdmAst::process_module() { @@ -1118,9 +1060,7 @@ void UhdmAst::process_module() if (!is_module_instance) { if (shared.top_nodes.find(type) != shared.top_nodes.end()) { current_node = shared.top_nodes[type]; -#ifdef BUILD_UPSTREAM shared.current_top_node = current_node; -#endif visit_one_to_many({vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiTaskFunc, vpiGenScopeArray, vpiContAssign, vpiVariables}, obj_h, [&](AST::AstNode *node) { @@ -1137,9 +1077,7 @@ void UhdmAst::process_module() current_node = make_ast_node(AST::AST_MODULE); current_node->str = type; shared.top_nodes[current_node->str] = current_node; -#ifdef BUILD_UPSTREAM shared.current_top_node = current_node; -#endif current_node->attributes[ID::partial] = AST::AstNode::mkconst_int(1, false, 1); visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) { @@ -1162,14 +1100,12 @@ void UhdmAst::process_module() std::string module_parameters; visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node && node->type == AST::AST_PARAMETER) { -#ifdef BUILD_UPSTREAM if (node->children[0]->type != AST::AST_CONSTANT) { if (shared.top_nodes.count(type)) { simplify_parameter(node, shared.top_nodes[type]); log_assert(node->children[0]->type == AST::AST_CONSTANT || node->children[0]->type == AST::AST_REALVALUE); } } -#endif if (shared.top_nodes.count(type)) { if (!node->children[0]->str.empty()) module_parameters += node->str + "=" + node->children[0]->str; @@ -1210,14 +1146,12 @@ void UhdmAst::process_module() } visit_one_to_many({vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node) { -#ifdef BUILD_UPSTREAM if (node->children[0]->type != AST::AST_CONSTANT) { if (shared.top_nodes[type]) { simplify_parameter(node, module_node); log_assert(node->children[0]->type == AST::AST_CONSTANT || node->children[0]->type == AST::AST_REALVALUE); } } -#endif auto parent_node = std::find_if(module_node->children.begin(), module_node->children.end(), [&](AST::AstNode *child) -> bool { return ((child->type == AST::AST_PARAMETER) || (child->type == AST::AST_LOCALPARAM)) && child->str == node->str && // skip real parameters as they are currently not working: https://github.com/alainmarcel/Surelog/issues/1035 @@ -1269,10 +1203,8 @@ void UhdmAst::process_module() auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); typeNode->str = module_node->str; current_node->children.insert(current_node->children.begin(), typeNode); -#ifdef BUILD_UPSTREAM auto old_top = shared.current_top_node; shared.current_top_node = module_node; -#endif visit_one_to_many({vpiVariables, vpiNet, vpiArrayNet}, obj_h, [&](AST::AstNode *node) { if (node) { add_or_replace_child(module_node, node); @@ -1284,9 +1216,7 @@ void UhdmAst::process_module() } }); make_cell(obj_h, current_node, module_node); -#ifdef BUILD_UPSTREAM shared.current_top_node = old_top; -#endif } } @@ -1315,10 +1245,8 @@ void UhdmAst::process_struct_typespec() void UhdmAst::process_array_typespec() { current_node = make_ast_node(AST::AST_WIRE); -#ifdef BUILD_UPSTREAM std::vector packed_ranges; std::vector unpacked_ranges; -#endif visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { if (node && node->type == AST::AST_STRUCT) { auto str = current_node->str; @@ -1330,16 +1258,8 @@ void UhdmAst::process_array_typespec() delete node; } }); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#else - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->children.push_back(node); - } - }); -#endif } void UhdmAst::process_typespec_member() @@ -1387,7 +1307,6 @@ void UhdmAst::process_typespec_member() delete node; } else if (node) { auto str = current_node->str; -#ifdef BUILD_UPSTREAM if (node->attributes.count(ID::packed_ranges)) { for (auto r : node->attributes[ID::packed_ranges]->children) { node->children.push_back(r->clone()); @@ -1400,7 +1319,6 @@ void UhdmAst::process_typespec_member() } node->attributes.erase(ID::unpacked_ranges); } -#endif node->cloneInto(current_node); current_node->str = str; current_node->type = AST::AST_STRUCT_ITEM; @@ -1417,7 +1335,6 @@ void UhdmAst::process_typespec_member() } } vpi_release_handle(typespec_h); -#ifdef BUILD_UPSTREAM if (current_node->attributes.count(ID::packed_ranges)) { for (auto r : current_node->attributes[ID::packed_ranges]->children) { current_node->children.push_back(r->clone()); @@ -1430,7 +1347,6 @@ void UhdmAst::process_typespec_member() } current_node->attributes.erase(ID::unpacked_ranges); } -#endif } void UhdmAst::process_enum_typespec() @@ -1540,10 +1456,8 @@ void UhdmAst::process_real_var() void UhdmAst::process_array_var() { current_node = make_ast_node(AST::AST_WIRE); -#ifdef BUILD_UPSTREAM std::vector packed_ranges; std::vector unpacked_ranges; -#endif visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { if (node->str.empty()) { // anonymous typespec, move the children to variable @@ -1588,39 +1502,23 @@ void UhdmAst::process_array_var() } delete node; }); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); -#else - visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -#endif } else if (vpi_get(vpiType, reg_h) == vpiIntVar) { -#ifdef BUILD_UPSTREAM packed_ranges.push_back(make_range(31, 0)); -#endif visit_default_expr(reg_h); } vpi_release_handle(reg_h); } vpi_release_handle(itr); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#else - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - if (current_node->children.size() == 2 && current_node->children[0]->type == AST::AST_RANGE && - current_node->children[1]->type == AST::AST_RANGE) { - current_node->type = AST::AST_MEMORY; - } -#endif } void UhdmAst::process_param_assign() { current_node = make_ast_node(AST::AST_PARAMETER); -#ifdef BUILD_UPSTREAM std::vector packed_ranges; std::vector unpacked_ranges; -#endif visit_one_to_one({vpiLhs}, obj_h, [&](AST::AstNode *node) { if (node) { current_node->type = node->type; @@ -1632,7 +1530,6 @@ void UhdmAst::process_param_assign() current_node->children.push_back(c->clone()); } } -#ifdef BUILD_UPSTREAM if (node->attributes.count(ID::packed_ranges)) { for (auto r : node->attributes[ID::packed_ranges]->children) { packed_ranges.push_back(r->clone()); @@ -1646,7 +1543,6 @@ void UhdmAst::process_param_assign() if (node->attributes.count(ID::is_imported)) { current_node->attributes[ID::is_imported] = node->attributes[ID::is_imported]->clone(); } -#endif current_node->is_custom_type = node->is_custom_type; shared.param_types[current_node->str] = shared.param_types[node->str]; delete node; @@ -1660,9 +1556,7 @@ void UhdmAst::process_param_assign() current_node->children.insert(current_node->children.begin(), node); } }); -#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges, false); -#endif } void UhdmAst::process_cont_assign_var_init() @@ -1744,68 +1638,30 @@ void UhdmAst::process_assignment() void UhdmAst::process_packed_array_net() { -#ifdef BUILD_UPSTREAM std::vector packed_ranges; std::vector unpacked_ranges; -#endif current_node = make_ast_node(AST::AST_WIRE); visit_one_to_many({vpiElement}, obj_h, [&](AST::AstNode *node) { if (node && GetSize(node->children) == 1) current_node->children.push_back(node->children[0]); current_node->is_custom_type = node->is_custom_type; }); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#else - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -#endif -} - -void UhdmAst::visitEachDescendant(AST::AstNode *node, const std::function &f) -{ -#ifdef BUILD_UPSTREAM - auto last_current_top_node = shared.current_top_node; - if (node->type == AST::AST_MODULE || node->type == AST::AST_PACKAGE) { - shared.current_top_node = node; - } - if (node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK || node->type == AST::AST_FUNCTION || node->type == AST::AST_TYPEDEF) { - // TODO: if it is empty, we probably need to generate unique name - if (!node->str.empty()) { - shared.multirange_scope.push_back(node->str); - } - } -#endif - for (auto child : node->children) { - f(child); - visitEachDescendant(child, f); - } -#ifdef BUILD_UPSTREAM - shared.current_top_node = last_current_top_node; - if (node->type == AST::AST_FUNCTION || node->type == AST::AST_BLOCK || node->type == AST::AST_GENBLOCK || node->type == AST::AST_TYPEDEF) - if (!node->str.empty()) - shared.multirange_scope.pop_back(); -#endif } void UhdmAst::process_array_net() { current_node = make_ast_node(AST::AST_WIRE); vpiHandle itr = vpi_iterate(vpiNet, obj_h); -#ifdef BUILD_UPSTREAM std::vector packed_ranges; std::vector unpacked_ranges; -#endif while (vpiHandle net_h = vpi_scan(itr)) { auto net_type = vpi_get(vpiType, net_h); if (net_type == vpiLogicNet) { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, net_h); -#ifdef BUILD_UPSTREAM visit_range(net_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); -#else - visit_range(net_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -#endif shared.report.mark_handled(net_h); } else if (net_type == vpiStructNet) { visit_one_to_one({vpiTypespec}, net_h, [&](AST::AstNode *node) { @@ -1825,24 +1681,14 @@ void UhdmAst::process_array_net() vpi_release_handle(net_h); } vpi_release_handle(itr); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#else - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); - if (current_node->children.size() == 2 && current_node->children[0]->type == AST::AST_RANGE && - current_node->children[1]->type == AST::AST_RANGE) { - current_node->type = AST::AST_MEMORY; - } -#endif } void UhdmAst::process_package() { current_node = make_ast_node(AST::AST_PACKAGE); -#ifdef BUILD_UPSTREAM shared.current_top_node = current_node; -#endif visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node) { node->str = strip_package_name(node->str); @@ -1913,18 +1759,12 @@ void UhdmAst::process_modport() void UhdmAst::process_io_decl() { current_node = nullptr; -#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name -#endif visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *node) { current_node = node; }); if (current_node == nullptr) { current_node = make_ast_node(AST::AST_MODPORTMEMBER); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); -#else - visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -#endif } visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) { @@ -1939,7 +1779,6 @@ void UhdmAst::process_io_decl() for (auto child : node->children) { current_node->children.push_back(child->clone()); } -#ifdef BUILD_UPSTREAM if (node->attributes.count(ID::packed_ranges)) { for (auto r : node->attributes[ID::packed_ranges]->children) { packed_ranges.push_back(r->clone()); @@ -1950,7 +1789,6 @@ void UhdmAst::process_io_decl() unpacked_ranges.push_back(r->clone()); } } -#endif current_node->is_logic = node->is_logic; current_node->is_reg = node->is_reg; } @@ -1967,9 +1805,7 @@ void UhdmAst::process_io_decl() current_node->is_output = true; } } -#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#endif } void UhdmAst::process_always() @@ -2836,10 +2672,8 @@ void UhdmAst::process_logic_var() { current_node = make_ast_node(AST::AST_WIRE); current_node->is_logic = true; -#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name -#endif // TODO: add const attribute, but it seems it is little more // then just setting boolean value // current_node->is_const = vpi_get(vpiConstantVariable, obj_h); @@ -2856,15 +2690,9 @@ void UhdmAst::process_logic_var() } delete node; }); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); -#else - visit_range(obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -#endif visit_default_expr(obj_h); -#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#endif } void UhdmAst::process_sys_func_call() @@ -2932,10 +2760,8 @@ void UhdmAst::process_logic_typespec() { current_node = make_ast_node(AST::AST_WIRE); current_node->is_logic = true; -#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name -#endif if (!current_node->str.empty() && current_node->str.find("::") == std::string::npos) { std::string package_name = ""; if (vpiHandle instance_h = vpi_handle(vpiInstance, obj_h)) { @@ -2946,16 +2772,8 @@ void UhdmAst::process_logic_typespec() vpi_release_handle(instance_h); } } -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#else - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->children.push_back(node); - } - }); -#endif if (!current_node->str.empty()) { move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); } @@ -2963,20 +2781,14 @@ void UhdmAst::process_logic_typespec() void UhdmAst::process_int_typespec() { -#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name -#endif current_node = make_ast_node(AST::AST_WIRE); auto left_const = AST::AstNode::mkconst_int(31, true); auto right_const = AST::AstNode::mkconst_int(0, true); auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); -#ifdef BUILD_UPSTREAM packed_ranges.push_back(range); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#else - current_node->children.push_back(range); -#endif current_node->is_signed = true; if (!current_node->str.empty()) { move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); @@ -3073,15 +2885,6 @@ void UhdmAst::process_var_select() current_node->children.push_back(range_node); } }); -#ifndef BUILD_UPSTREAM - if (current_node->children.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - multirange_node->children = current_node->children; - current_node->children.clear(); - current_node->children.push_back(multirange_node); - } -#endif } void UhdmAst::process_port() @@ -3089,10 +2892,8 @@ void UhdmAst::process_port() current_node = make_ast_node(AST::AST_WIRE); current_node->port_id = shared.next_port_id(); vpiHandle lowConn_h = vpi_handle(vpiLowConn, obj_h); -#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name -#endif if (lowConn_h) { vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); auto actual_type = vpi_get(vpiType, actual_h); @@ -3135,15 +2936,7 @@ void UhdmAst::process_port() case vpiLogicNet: { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, actual_h); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); -#else - visit_range(actual_h, [&](AST::AstNode *node) { - if (node->type == AST::AST_MULTIRANGE) - node->is_packed = true; - current_node->children.push_back(node); - }); -#endif shared.report.mark_handled(actual_h); break; } @@ -3156,19 +2949,11 @@ void UhdmAst::process_port() } } }); -#ifdef BUILD_UPSTREAM - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); -#else visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -#endif shared.report.mark_handled(actual_h); break; case vpiPackedArrayNet: -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); -#else - visit_one_to_many({vpiRange}, actual_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); -#endif shared.report.mark_handled(actual_h); break; case vpiArrayVar: @@ -3222,18 +3007,14 @@ void UhdmAst::process_port() current_node->is_output = true; } } -#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#endif } void UhdmAst::process_net() { current_node = make_ast_node(AST::AST_WIRE); -#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name -#endif auto net_type = vpi_get(vpiNetType, obj_h); current_node->is_reg = net_type == vpiReg; current_node->is_output = net_type == vpiOutput; @@ -3248,24 +3029,14 @@ void UhdmAst::process_net() current_node->is_custom_type = true; } }); -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#else - visit_range(obj_h, [&](AST::AstNode *node) { - current_node->children.push_back(node); - if (node->type == AST::AST_MULTIRANGE) { - node->is_packed = true; - } - }); -#endif } void UhdmAst::process_parameter() { auto type = vpi_get(vpiLocalParam, obj_h) == 1 ? AST::AST_LOCALPARAM : AST::AST_PARAMETER; current_node = make_ast_node(type, {}, true); -#ifdef BUILD_UPSTREAM std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name // currently unused, but save it for future use @@ -3273,13 +3044,6 @@ void UhdmAst::process_parameter() current_node->attributes[ID::is_imported] = AST::AstNode::mkconst_int(1, true); } visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); -#else - std::vector range_nodes; - visit_range(obj_h, [&](AST::AstNode *node) { - if (node) - range_nodes.push_back(node); - }); -#endif vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); if (typespec_h) { int typespec_type = vpi_get(vpiType, typespec_h); @@ -3287,11 +3051,7 @@ void UhdmAst::process_parameter() case vpiBitTypespec: case vpiLogicTypespec: { current_node->is_logic = true; -#ifdef BUILD_UPSTREAM visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); -#else - visit_range(typespec_h, [&](AST::AstNode *node) { range_nodes.push_back(node); }); -#endif shared.report.mark_handled(typespec_h); break; } @@ -3315,7 +3075,6 @@ void UhdmAst::process_parameter() } case vpiArrayTypespec: { shared.report.mark_handled(typespec_h); -#ifdef BUILD_UPSTREAM visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { if (node && node->attributes.count(ID::packed_ranges)) { for (auto r : node->attributes[ID::packed_ranges]->children) { @@ -3323,13 +3082,6 @@ void UhdmAst::process_parameter() } } }); -#else - visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { - if (node) { - range_nodes.push_back(node->children[0]); - } - }); -#endif break; } default: { @@ -3349,18 +3101,7 @@ void UhdmAst::process_parameter() current_node->children.push_back(constant_node); } } -#ifdef BUILD_UPSTREAM add_multirange_wire(current_node, packed_ranges, unpacked_ranges); -#else - if (range_nodes.size() > 1) { - auto multirange_node = new AST::AstNode(AST::AST_MULTIRANGE); - multirange_node->is_packed = true; - multirange_node->children = range_nodes; - current_node->children.push_back(multirange_node); - } else if (range_nodes.size() == 1) { - current_node->children.push_back(range_nodes[0]); - } -#endif } void UhdmAst::process_byte_var() diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index c14c61cde..3570fc75a 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -136,7 +136,6 @@ class UhdmAst void simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node = nullptr); void process_nonsynthesizable(const UHDM::BaseClass *object); void process_unsupported_stmt(const UHDM::BaseClass *object); - void visitEachDescendant(AST::AstNode *node, const std::function &f); UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) { diff --git a/uhdm-plugin/UhdmAstAntmicro.cc b/uhdm-plugin/UhdmAstAntmicro.cc deleted file mode 100644 index 838691f6f..000000000 --- a/uhdm-plugin/UhdmAstAntmicro.cc +++ /dev/null @@ -1,9 +0,0 @@ -namespace RTLIL -{ -namespace ID -{ -IdString packed_ranges{"\\packed_ranges"}; -IdString unpacked_ranges{"\\unpacked_ranges"}; -} // namespace ID -} // namespace RTLIL -#define mkconst_real(x) AST::AstNode::mkconst_real(x) diff --git a/uhdm-plugin/uhdmastshared.h b/uhdm-plugin/uhdmastshared.h index 0cd56088b..84ca265a2 100644 --- a/uhdm-plugin/uhdmastshared.h +++ b/uhdm-plugin/uhdmastshared.h @@ -46,11 +46,8 @@ class UhdmAstShared // Map from AST param nodes to their types (used for params with struct types) std::unordered_map param_types; -#ifdef BUILD_UPSTREAM - std::vector multirange_scope; AST::AstNode *current_top_node = nullptr; -#endif }; YOSYS_NAMESPACE_END From 5a62502b4854307f2ff78a53e2330e3821b5932a Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 11 Jan 2022 09:19:38 +0100 Subject: [PATCH 529/845] Add workaround for simplify range Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index dafae9dfa..644245566 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -139,6 +139,17 @@ static size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vecto } while (ranges[i]->simplify(true, false, false, 1, -1, false, false)) { } + // this workaround case, where yosys doesn't follow id2ast and simplifies it to resolve constant + if (ranges[i]->children[0]->id2ast) { + while (ranges[i]->children[0]->id2ast->simplify(true, false, false, 1, -1, false, false)) { + } + } + if (ranges[i]->children[1]->id2ast) { + while (ranges[i]->children[1]->id2ast->simplify(true, false, false, 1, -1, false, false)) { + } + } + while (ranges[i]->simplify(true, false, false, 1, -1, false, false)) { + } log_assert(ranges[i]->children[0]->type == AST::AST_CONSTANT); log_assert(ranges[i]->children[1]->type == AST::AST_CONSTANT); wire_node->multirange_dimensions.push_back(min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer)); From ba8c4534b2b690d34970e807d2f2f487005281e7 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 12 Jan 2022 12:05:13 +0100 Subject: [PATCH 530/845] Don't reverse only flattened nodes Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 9fa677f74..36e229958 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2479,6 +2479,10 @@ void UhdmAst::process_assignment_pattern_op() for (auto p : ordered_children) { current_node->children.push_back(p.second); } + // flattened nodes have correct order, but unflattened ones still needs to be reversed + if (!(vpi_get(vpiFlattened, obj_h) == 1)) { + std::reverse(current_node->children.begin(), current_node->children.end()); + } return; } auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); From 23da48a29e7045591d278643b7bf4a3308b902eb Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 12 Jan 2022 11:57:21 +0100 Subject: [PATCH 531/845] Always visit parameter value Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 8665b9679..f1cf81bca 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3066,8 +3066,14 @@ void UhdmAst::process_parameter() break; } case vpiEnumTypespec: - case vpiRealTypespec: + case vpiRealTypespec: { + shared.report.mark_handled(typespec_h); + break; + } case vpiIntTypespec: { +#ifdef BUILD_UPSTREAM + packed_ranges.push_back(make_range(31, 0)); +#endif shared.report.mark_handled(typespec_h); break; } @@ -3103,13 +3109,12 @@ void UhdmAst::process_parameter() } } vpi_release_handle(typespec_h); - } else { - AST::AstNode *constant_node = process_value(obj_h); - if (constant_node) { - constant_node->filename = current_node->filename; - constant_node->location = current_node->location; - current_node->children.push_back(constant_node); - } + } + AST::AstNode *constant_node = process_value(obj_h); + if (constant_node) { + constant_node->filename = current_node->filename; + constant_node->location = current_node->location; + current_node->children.push_back(constant_node); } add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } From 6ff7742749459e09e022976f65cd027bfe3d2630 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 14 Jan 2022 14:51:09 +0100 Subject: [PATCH 532/845] Fix access to multirange struct elem Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index eeac87333..ad999be14 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -423,9 +423,18 @@ static AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::A AST::AST_ADD, left, new AST::AstNode(AST::AST_ADD, struct_range->children[1]->clone(), new AST::AstNode(AST::AST_SUB, range_size, elem_size->clone()))); } else if (struct_range->children.size() == 1) { - right = new AST::AstNode(AST::AST_ADD, right, struct_range->children[0]->clone()); - delete left; - left = right->clone(); + if (!current_struct_elem->multirange_dimensions.empty()) { + right = new AST::AstNode(AST::AST_ADD, right, + new AST::AstNode(AST::AST_MUL, struct_range->children[0]->clone(), + AST::AstNode::mkconst_int(current_struct_elem->multirange_dimensions.back(), true))); + delete left; + left = new AST::AstNode(AST::AST_ADD, right->clone(), + AST::AstNode::mkconst_int(current_struct_elem->multirange_dimensions.back() - 1, true)); + } else { + right = new AST::AstNode(AST::AST_ADD, right, struct_range->children[0]->clone()); + delete left; + left = right->clone(); + } } else { struct_range->dumpAst(NULL, "range >"); log_error("Unhandled range select (AST_STRUCT_ITEM) in AST_DOT!\n"); @@ -792,6 +801,7 @@ void UhdmAst::process_packed_array_typespec() std::vector packed_ranges; std::vector unpacked_ranges; current_node = make_ast_node(AST::AST_WIRE); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) { if (node && node->type == AST::AST_STRUCT) { auto str = current_node->str; @@ -803,13 +813,12 @@ void UhdmAst::process_packed_array_typespec() if (node->type == AST::AST_ENUM && !node->children.empty()) { for (auto c : node->children[0]->children) { if (c->type == AST::AST_RANGE && c->str.empty()) - unpacked_ranges.push_back(c->clone()); + packed_ranges.push_back(c->clone()); } } delete node; } }); - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } @@ -3075,9 +3084,7 @@ void UhdmAst::process_parameter() break; } case vpiIntTypespec: { -#ifdef BUILD_UPSTREAM packed_ranges.push_back(make_range(31, 0)); -#endif shared.report.mark_handled(typespec_h); break; } From 185c3518a4e3ddbe37b4748db0ea9ebd72c5d21f Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 14 Jan 2022 15:43:01 +0100 Subject: [PATCH 533/845] Fix packed array var Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 63 ++++++++++++++++++++++++++++++++++++++++++ uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 64 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ad999be14..8591bfa77 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1534,6 +1534,67 @@ void UhdmAst::process_array_var() add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } +void UhdmAst::process_packed_array_var() +{ + current_node = make_ast_node(AST::AST_WIRE); + std::vector packed_ranges; + std::vector unpacked_ranges; + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + } else { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + } + delete node; + }); + vpiHandle itr = vpi_iterate(vpi_get(vpiType, obj_h) == vpiArrayVar ? vpiReg : vpiElement, obj_h); + while (vpiHandle reg_h = vpi_scan(itr)) { + if (vpi_get(vpiType, reg_h) == vpiStructVar || vpi_get(vpiType, reg_h) == vpiEnumVar) { + visit_one_to_one({vpiTypespec}, reg_h, [&](AST::AstNode *node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + } else { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + } + delete node; + }); + } else if (vpi_get(vpiType, reg_h) == vpiLogicVar) { + current_node->is_logic = true; + visit_one_to_one({vpiTypespec}, reg_h, [&](AST::AstNode *node) { + if (node->str.empty()) { + // anonymous typespec, move the children to variable + current_node->type = node->type; + current_node->children = std::move(node->children); + } else { + auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + } + delete node; + }); + visit_one_to_many({vpiRange}, reg_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + } else if (vpi_get(vpiType, reg_h) == vpiIntVar) { + packed_ranges.push_back(make_range(31, 0)); + visit_default_expr(reg_h); + } + vpi_release_handle(reg_h); + } + vpi_release_handle(itr); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); +} + void UhdmAst::process_param_assign() { current_node = make_ast_node(AST::AST_PARAMETER); @@ -3245,6 +3306,8 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) process_real_var(); break; case vpiPackedArrayVar: + process_packed_array_var(); + break; case vpiArrayVar: process_array_var(); break; diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 3570fc75a..906f47390 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -81,6 +81,7 @@ class UhdmAst void process_int_var(); void process_real_var(); void process_array_var(); + void process_packed_array_var(); void process_param_assign(); void process_cont_assign(); void process_cont_assign_net(); From 5efcd84b77c087aa86d4407fedd610eadecf8b85 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 19 Jan 2022 20:06:15 +0100 Subject: [PATCH 534/845] Update googletest submodule Signed-off-by: Tomasz Michalak --- third_party/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/googletest b/third_party/googletest index 41b5f149a..e2239ee60 160000 --- a/third_party/googletest +++ b/third_party/googletest @@ -1 +1 @@ -Subproject commit 41b5f149ab306e96b5b2faf523505d75acffd98a +Subproject commit e2239ee6043f73722e7aa812a459f54a28552929 From d48751e70f317795082b537c3a016a8b8b3dc388 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 19 Jan 2022 21:03:51 +0100 Subject: [PATCH 535/845] googletest: Update paths Signed-off-by: Tomasz Michalak --- Makefile_test.common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile_test.common b/Makefile_test.common index 14901999e..61abadb24 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -23,9 +23,9 @@ ifeq (,$(wildcard $(YOSYS_CONFIG))) $(error "Didn't find 'yosys-config' under '$(YOSYS_PATH)'") endif -GTEST_DIR ?= ../../third_party/googletest/googletest +GTEST_DIR ?= ../../third_party/googletest CXX ?= $(shell $(YOSYS_CONFIG) --cxx) -CXXFLAGS ?= $(shell $(YOSYS_CONFIG) --cxxflags) -I.. -I$(GTEST_DIR)/include +CXXFLAGS ?= $(shell $(YOSYS_CONFIG) --cxxflags) -I.. -I$(GTEST_DIR)/googletest/include LDLIBS ?= $(shell $(YOSYS_CONFIG) --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread LDFLAGS ?= $(shell $(YOSYS_CONFIG) --ldflags) TEST_UTILS ?= ../../../test-utils/test-utils.tcl From 89061d100972c3f810efdb8410d6ad7e6fc166b1 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 20 Jan 2022 09:49:07 +0100 Subject: [PATCH 536/845] Fix segmentation fault Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ad999be14..6de938812 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -286,7 +286,8 @@ static void check_memories(AST::AstNode *module_node) if (node->children.size() != 2 || node->children[1]->str.empty() || node->children[1]->type != AST::AST_IDENTIFIER) { log_error("%s:%d: Wrong usage of '\\$readmemh'\n", node->filename.c_str(), node->location.first_line); } - add_force_convert_attribute(memories[node->children[1]->str], 0); + if (memories[node->children[1]->str]) + add_force_convert_attribute(memories[node->children[1]->str], 0); } if (node->type == AST::AST_WIRE) { const std::vector packed_ranges = From 7dd644f2124a65456cbcf6e420f08db020393c04 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 20 Jan 2022 11:08:41 +0100 Subject: [PATCH 537/845] Remove unneeded checks Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ad999be14..7d6c12292 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -440,9 +440,7 @@ static AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::A log_error("Unhandled range select (AST_STRUCT_ITEM) in AST_DOT!\n"); } } else if (current_struct_elem->type == AST::AST_STRUCT) { - if (struct_range->children.size() == 2 && struct_range->children[0]->type == AST::AST_CONSTANT && - struct_range->range_left != struct_range->range_right) { - // TODO: check if this is correct always, for now just add to current range selected range + if (struct_range->children.size() == 2) { right = new AST::AstNode(AST::AST_ADD, right, struct_range->children[1]->clone()); auto range_size = new AST::AstNode( AST::AST_ADD, new AST::AstNode(AST::AST_SUB, struct_range->children[0]->clone(), struct_range->children[1]->clone()), @@ -456,11 +454,9 @@ static AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::A } else { struct_range->dumpAst(NULL, "range >"); log_error("Unhandled range select (AST_STRUCT) in AST_DOT!\n"); - log_assert(1 == 0); // should never happen } } else { log_error("Found %s elem in struct that is currently unsupported!\n", type2str(current_struct_elem->type).c_str()); - log_assert(1 == 0); // should never happen } } // Return range from the begining of *current* struct From 2612903efdf73b81390ec46c97e2b0b7753030e9 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 20 Jan 2022 13:57:57 +0100 Subject: [PATCH 538/845] Add support for custom wire with dot and packed range Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index de78123c3..637098935 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -468,9 +468,6 @@ static AST::AstNode *expand_dot(const AST::AstNode *current_struct, const AST::A static AST::AstNode *convert_dot(AST::AstNode *wire_node, AST::AstNode *node, AST::AstNode *dot) { - std::vector packed_ranges; - std::vector unpacked_ranges; - AST::AstNode *struct_node = nullptr; if (wire_node->type == AST::AST_STRUCT) { struct_node = wire_node; @@ -483,15 +480,25 @@ static AST::AstNode *convert_dot(AST::AstNode *wire_node, AST::AstNode *node, AS if (node->children[0]->type == AST::AST_RANGE) { int struct_size_int = get_max_offset(struct_node) + 1; log_assert(!wire_node->multirange_dimensions.empty()); - int unpacked_range = wire_node->multirange_dimensions.back() - 1; - expanded->children[1] = new AST::AstNode(AST::AST_ADD, expanded->children[1], - new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), - new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(unpacked_range, true, 32), - node->children[0]->children[0]->clone()))); - expanded->children[0] = new AST::AstNode(AST::AST_ADD, expanded->children[0], - new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), - new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(unpacked_range, true, 32), - node->children[0]->children[0]->clone()))); + int range = wire_node->multirange_dimensions.back() - 1; + if (!wire_node->attributes[ID::unpacked_ranges]->children.empty() && + wire_node->attributes[ID::unpacked_ranges]->children.back()->range_left == range) { + expanded->children[1] = new AST::AstNode( + AST::AST_ADD, expanded->children[1], + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), + new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(range, true, 32), node->children[0]->children[0]->clone()))); + expanded->children[0] = new AST::AstNode( + AST::AST_ADD, expanded->children[0], + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), + new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(range, true, 32), node->children[0]->children[0]->clone()))); + } else { + expanded->children[1] = new AST::AstNode( + AST::AST_ADD, expanded->children[1], + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), AST::AstNode::mkconst_int(range, true, 32))); + expanded->children[0] = new AST::AstNode( + AST::AST_ADD, expanded->children[0], + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), AST::AstNode::mkconst_int(range, true, 32))); + } } return expanded; } From 0385917755f85baef8db8ba6e717127b932ae7ac Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 20 Jan 2022 15:30:48 +0100 Subject: [PATCH 539/845] Fix assignments patters inside gen block Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index de78123c3..de719d4d2 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2390,7 +2390,8 @@ void UhdmAst::process_assignment_pattern_op() } auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); - auto proc_node = find_ancestor({AST::AST_BLOCK, AST::AST_ALWAYS, AST::AST_INITIAL, AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_CELL}); + auto proc_node = + find_ancestor({AST::AST_BLOCK, AST::AST_GENBLOCK, AST::AST_ALWAYS, AST::AST_INITIAL, AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_CELL}); if (proc_node && proc_node->type == AST::AST_CELL && shared.top_nodes.count(proc_node->children[0]->str)) { proc_node = shared.top_nodes[proc_node->children[0]->str]; } From 1d1db10e690b442a8ffee6547a1f60cfb2cf2958 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 20 Jan 2022 15:09:05 -0800 Subject: [PATCH 540/845] Make const2ast() static, as there is already the same symbol in Yosys. This results in duplicate-symbol link errors when linking the uhdm module statically to yosys. Signed-off-by: Henner Zeller --- uhdm-plugin/UhdmAstUpstream.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index 1a1c6826a..8a1abc7c7 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -131,7 +131,7 @@ static void my_strtobin(std::vector &data, const char *str, int le } // convert the Verilog code for a constant to an AST node -AST::AstNode *const2ast(std::string code, char case_type, bool warn_z) +static AST::AstNode *const2ast(std::string code, char case_type, bool warn_z) { if (warn_z) { AST::AstNode *ret = const2ast(code, case_type, false); From b65a6aad530f9f02ac74b89525359eef610d75ed Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 20 Jan 2022 15:14:23 -0800 Subject: [PATCH 541/845] Avoid problematic global initialization of IdStrings. Global initialization in c++ results in undefined initialization sequences. In particular when the uhdm-plugin is linked statically to yosys, this results in a crash. Fixed by creating the constants on first use. Signed-off-by: Henner Zeller --- uhdm-plugin/UhdmAst.cc | 179 +++++++++++++++++++-------------- uhdm-plugin/UhdmAst.h | 7 ++ uhdm-plugin/UhdmAstUpstream.cc | 13 --- 3 files changed, 113 insertions(+), 86 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index de78123c3..90582bf56 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -14,6 +14,32 @@ YOSYS_NAMESPACE_BEGIN +/*static*/ const IdString &UhdmAst::partial() +{ + static const IdString id("\\partial"); + return id; +} +/*static*/ const IdString &UhdmAst::packed_ranges() +{ + static const IdString id("\\packed_ranges"); + return id; +} +/*static*/ const IdString &UhdmAst::unpacked_ranges() +{ + static const IdString id("\\unpacked_ranges"); + return id; +} +/*static*/ const IdString &UhdmAst::force_convert() +{ + static const IdString id("\\force_convert"); + return id; +} +/*static*/ const IdString &UhdmAst::is_imported() +{ + static const IdString id("\\is_imported"); + return id; +} + static void sanitize_symbol_name(std::string &name) { if (!name.empty()) { @@ -103,20 +129,20 @@ static void visitEachDescendant(AST::AstNode *node, const std::function packed_ranges, std::vector unpacked_ranges, bool reverse = true) { - node->attributes[ID::packed_ranges] = AST::AstNode::mkconst_int(1, false, 1); + node->attributes[UhdmAst::packed_ranges()] = AST::AstNode::mkconst_int(1, false, 1); if (!packed_ranges.empty()) { if (reverse) std::reverse(packed_ranges.begin(), packed_ranges.end()); - node->attributes[ID::packed_ranges]->children.insert(node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), - packed_ranges.end()); + node->attributes[UhdmAst::packed_ranges()]->children.insert(node->attributes[UhdmAst::packed_ranges()]->children.end(), packed_ranges.begin(), + packed_ranges.end()); } - node->attributes[ID::unpacked_ranges] = AST::AstNode::mkconst_int(1, false, 1); + node->attributes[UhdmAst::unpacked_ranges()] = AST::AstNode::mkconst_int(1, false, 1); if (!unpacked_ranges.empty()) { if (reverse) std::reverse(unpacked_ranges.begin(), unpacked_ranges.end()); - node->attributes[ID::unpacked_ranges]->children.insert(node->attributes[ID::unpacked_ranges]->children.end(), unpacked_ranges.begin(), - unpacked_ranges.end()); + node->attributes[UhdmAst::unpacked_ranges()]->children.insert(node->attributes[UhdmAst::unpacked_ranges()]->children.end(), + unpacked_ranges.begin(), unpacked_ranges.end()); } } @@ -234,13 +260,13 @@ static void resolve_wiretype(AST::AstNode *wire_node) std::vector packed_ranges; std::vector unpacked_ranges; // First check if it has already defined ranges - if (wire_node->attributes.count(ID::packed_ranges)) { - for (auto r : wire_node->attributes[ID::packed_ranges]->children) { + if (wire_node->attributes.count(UhdmAst::packed_ranges())) { + for (auto r : wire_node->attributes[UhdmAst::packed_ranges()]->children) { packed_ranges.push_back(r->clone()); } } - if (wire_node->attributes.count(ID::unpacked_ranges)) { - for (auto r : wire_node->attributes[ID::unpacked_ranges]->children) { + if (wire_node->attributes.count(UhdmAst::unpacked_ranges())) { + for (auto r : wire_node->attributes[UhdmAst::unpacked_ranges()]->children) { unpacked_ranges.push_back(r->clone()); } } @@ -258,24 +284,24 @@ static void resolve_wiretype(AST::AstNode *wire_node) if (wire_node->children[0]->type == AST::AST_RANGE && wire_node->multirange_dimensions.empty()) { packed_ranges.push_back(wire_node->children[0]); wire_node->children.clear(); - wire_node->attributes[ID::packed_ranges] = AST::AstNode::mkconst_int(1, false, 1); + wire_node->attributes[UhdmAst::packed_ranges()] = AST::AstNode::mkconst_int(1, false, 1); if (!packed_ranges.empty()) { std::reverse(packed_ranges.begin(), packed_ranges.end()); - wire_node->attributes[ID::packed_ranges]->children.insert(wire_node->attributes[ID::packed_ranges]->children.end(), packed_ranges.begin(), - packed_ranges.end()); + wire_node->attributes[UhdmAst::packed_ranges()]->children.insert(wire_node->attributes[UhdmAst::packed_ranges()]->children.end(), + packed_ranges.begin(), packed_ranges.end()); } - wire_node->attributes[ID::unpacked_ranges] = AST::AstNode::mkconst_int(1, false, 1); + wire_node->attributes[UhdmAst::unpacked_ranges()] = AST::AstNode::mkconst_int(1, false, 1); if (!unpacked_ranges.empty()) { - wire_node->attributes[ID::unpacked_ranges]->children.insert(wire_node->attributes[ID::unpacked_ranges]->children.end(), - unpacked_ranges.begin(), unpacked_ranges.end()); + wire_node->attributes[UhdmAst::unpacked_ranges()]->children.insert(wire_node->attributes[UhdmAst::unpacked_ranges()]->children.end(), + unpacked_ranges.begin(), unpacked_ranges.end()); } } } static void add_force_convert_attribute(AST::AstNode *wire_node, int val = 1) { - wire_node->attributes[ID::force_convert] = AST::AstNode::mkconst_int(val, true); + wire_node->attributes[UhdmAst::force_convert()] = AST::AstNode::mkconst_int(val, true); } static void check_memories(AST::AstNode *module_node) @@ -291,16 +317,17 @@ static void check_memories(AST::AstNode *module_node) } if (node->type == AST::AST_WIRE) { const std::vector packed_ranges = - node->attributes.count(ID::packed_ranges) ? node->attributes[ID::packed_ranges]->children : std::vector(); - const std::vector unpacked_ranges = - node->attributes.count(ID::unpacked_ranges) ? node->attributes[ID::unpacked_ranges]->children : std::vector(); + node->attributes.count(UhdmAst::packed_ranges()) ? node->attributes[UhdmAst::packed_ranges()]->children : std::vector(); + const std::vector unpacked_ranges = node->attributes.count(UhdmAst::unpacked_ranges()) + ? node->attributes[UhdmAst::unpacked_ranges()]->children + : std::vector(); if (packed_ranges.size() == 1 && unpacked_ranges.size() == 1) { log_assert(!memories.count(node->str)); memories[node->str] = node; } } if (node->type == AST::AST_IDENTIFIER && memories.count(node->str)) { - if (!memories[node->str]->attributes.count(ID::force_convert) && node->children.size() == 0) { + if (!memories[node->str]->attributes.count(UhdmAst::force_convert()) && node->children.size() == 0) { add_force_convert_attribute(memories[node->str]); } } @@ -313,13 +340,15 @@ static void check_memories(AST::AstNode *module_node) static void convert_packed_unpacked_range(AST::AstNode *wire_node) { resolve_wiretype(wire_node); - const std::vector packed_ranges = - wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); - const std::vector unpacked_ranges = - wire_node->attributes.count(ID::unpacked_ranges) ? wire_node->attributes[ID::unpacked_ranges]->children : std::vector(); + const std::vector packed_ranges = wire_node->attributes.count(UhdmAst::packed_ranges()) + ? wire_node->attributes[UhdmAst::packed_ranges()]->children + : std::vector(); + const std::vector unpacked_ranges = wire_node->attributes.count(UhdmAst::unpacked_ranges()) + ? wire_node->attributes[UhdmAst::unpacked_ranges()]->children + : std::vector(); if (packed_ranges.empty() && unpacked_ranges.empty()) { - wire_node->attributes.erase(ID::packed_ranges); - wire_node->attributes.erase(ID::unpacked_ranges); + wire_node->attributes.erase(UhdmAst::packed_ranges()); + wire_node->attributes.erase(UhdmAst::unpacked_ranges()); return; } size_t size = 1; @@ -329,7 +358,7 @@ static void convert_packed_unpacked_range(AST::AstNode *wire_node) bool convert_node = packed_ranges.size() > 1 || unpacked_ranges.size() > 1 || wire_node->attributes.count(ID::wiretype) || wire_node->type == AST::AST_PARAMETER || wire_node->type == AST::AST_LOCALPARAM || ((wire_node->is_input || wire_node->is_output) && ((packed_ranges.size() > 0 || unpacked_ranges.size() > 0))) || - (wire_node->attributes.count(ID::force_convert) && wire_node->attributes[ID::force_convert]->integer == 1); + (wire_node->attributes.count(UhdmAst::force_convert()) && wire_node->attributes[UhdmAst::force_convert()]->integer == 1); // Convert only when atleast 1 of the ranges has more then 1 range if (convert_node) { if (wire_node->multirange_dimensions.empty()) { @@ -586,10 +615,12 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) break; } AST::AstNode *wire_node = AST_INTERNAL::current_scope[current_node->str]; - const std::vector packed_ranges = - wire_node->attributes.count(ID::packed_ranges) ? wire_node->attributes[ID::packed_ranges]->children : std::vector(); - const std::vector unpacked_ranges = - wire_node->attributes.count(ID::unpacked_ranges) ? wire_node->attributes[ID::unpacked_ranges]->children : std::vector(); + const std::vector packed_ranges = wire_node->attributes.count(UhdmAst::packed_ranges()) + ? wire_node->attributes[UhdmAst::packed_ranges()]->children + : std::vector(); + const std::vector unpacked_ranges = wire_node->attributes.count(UhdmAst::unpacked_ranges()) + ? wire_node->attributes[UhdmAst::unpacked_ranges()]->children + : std::vector(); if ((wire_node->type == AST::AST_WIRE || wire_node->type == AST::AST_PARAMETER || wire_node->type == AST::AST_LOCALPARAM) && !(packed_ranges.empty() && unpacked_ranges.empty()) && !(packed_ranges.size() + unpacked_ranges.size() == 1)) { auto result = convert_range(current_node, packed_ranges, unpacked_ranges, 0); @@ -842,14 +873,16 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) child->is_custom_type = true; } } - if ((*it)->attributes.count(ID::packed_ranges) && child->attributes.count(ID::packed_ranges)) { - if ((!(*it)->attributes[ID::packed_ranges]->children.empty() && child->attributes[ID::packed_ranges]->children.empty())) { - child->attributes[ID::packed_ranges] = (*it)->attributes[ID::packed_ranges]->clone(); + if ((*it)->attributes.count(UhdmAst::packed_ranges()) && child->attributes.count(UhdmAst::packed_ranges())) { + if ((!(*it)->attributes[UhdmAst::packed_ranges()]->children.empty() && + child->attributes[UhdmAst::packed_ranges()]->children.empty())) { + child->attributes[UhdmAst::packed_ranges()] = (*it)->attributes[UhdmAst::packed_ranges()]->clone(); } } - if ((*it)->attributes.count(ID::unpacked_ranges) && child->attributes.count(ID::unpacked_ranges)) { - if ((!(*it)->attributes[ID::unpacked_ranges]->children.empty() && child->attributes[ID::unpacked_ranges]->children.empty())) { - child->attributes[ID::unpacked_ranges] = (*it)->attributes[ID::unpacked_ranges]->clone(); + if ((*it)->attributes.count(UhdmAst::unpacked_ranges()) && child->attributes.count(UhdmAst::unpacked_ranges())) { + if ((!(*it)->attributes[UhdmAst::unpacked_ranges()]->children.empty() && + child->attributes[UhdmAst::unpacked_ranges()]->children.empty())) { + child->attributes[UhdmAst::unpacked_ranges()] = (*it)->attributes[UhdmAst::unpacked_ranges()]->clone(); } } delete *it; @@ -1023,7 +1056,7 @@ void UhdmAst::process_design() for (auto pair : shared.top_nodes) { if (!pair.second) continue; - if (!pair.second->get_bool_attribute(ID::partial)) { + if (!pair.second->get_bool_attribute(UhdmAst::partial())) { if (pair.second->type == AST::AST_PACKAGE) current_node->children.insert(current_node->children.begin(), pair.second); else { @@ -1085,7 +1118,7 @@ void UhdmAst::process_module() add_or_replace_child(current_node, node); } }); - auto it = current_node->attributes.find(ID::partial); + auto it = current_node->attributes.find(UhdmAst::partial()); if (it != current_node->attributes.end()) { delete it->second; current_node->attributes.erase(it); @@ -1095,7 +1128,7 @@ void UhdmAst::process_module() current_node->str = type; shared.top_nodes[current_node->str] = current_node; shared.current_top_node = current_node; - current_node->attributes[ID::partial] = AST::AstNode::mkconst_int(1, false, 1); + current_node->attributes[UhdmAst::partial()] = AST::AstNode::mkconst_int(1, false, 1); visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) { move_type_to_new_typedef(current_node, node); @@ -1148,7 +1181,7 @@ void UhdmAst::process_module() if (!module_node) { module_node = new AST::AstNode(AST::AST_MODULE); module_node->str = type; - module_node->attributes[ID::partial] = AST::AstNode::mkconst_int(2, false, 1); + module_node->attributes[UhdmAst::partial()] = AST::AstNode::mkconst_int(2, false, 1); cell_instance = 1; module_name = type; } @@ -1198,7 +1231,7 @@ void UhdmAst::process_module() } else { add_or_replace_child(module_node, node); } - } else if ((module_node->attributes.count(ID::partial) && module_node->attributes[ID::partial]->integer == 2)) { + } else if ((module_node->attributes.count(UhdmAst::partial()) && module_node->attributes[UhdmAst::partial()]->integer == 2)) { // When module definition is not parsed by Surelog, left setting parameters to yosys node->type = AST::AST_PARASET; current_node->children.push_back(node); @@ -1209,12 +1242,12 @@ void UhdmAst::process_module() // but without this, modules that are generated in genscope are removed // for now lets just add this attribute module_node->attributes[ID::keep] = AST::AstNode::mkconst_int(1, false, 1); - if (module_node->attributes.count(ID::partial)) { - AST::AstNode *attr = module_node->attributes.at(ID::partial); + if (module_node->attributes.count(UhdmAst::partial())) { + AST::AstNode *attr = module_node->attributes.at(UhdmAst::partial()); if (attr->type == AST::AST_CONSTANT) if (attr->integer == 1) { delete attr; - module_node->attributes.erase(ID::partial); + module_node->attributes.erase(UhdmAst::partial()); } } auto typeNode = new AST::AstNode(AST::AST_CELLTYPE); @@ -1324,17 +1357,17 @@ void UhdmAst::process_typespec_member() delete node; } else if (node) { auto str = current_node->str; - if (node->attributes.count(ID::packed_ranges)) { - for (auto r : node->attributes[ID::packed_ranges]->children) { + if (node->attributes.count(UhdmAst::packed_ranges())) { + for (auto r : node->attributes[UhdmAst::packed_ranges()]->children) { node->children.push_back(r->clone()); } - node->attributes.erase(ID::packed_ranges); + node->attributes.erase(UhdmAst::packed_ranges()); } - if (node->attributes.count(ID::unpacked_ranges)) { - for (auto r : node->attributes[ID::unpacked_ranges]->children) { + if (node->attributes.count(UhdmAst::unpacked_ranges())) { + for (auto r : node->attributes[UhdmAst::unpacked_ranges()]->children) { node->children.push_back(r->clone()); } - node->attributes.erase(ID::unpacked_ranges); + node->attributes.erase(UhdmAst::unpacked_ranges()); } node->cloneInto(current_node); current_node->str = str; @@ -1352,17 +1385,17 @@ void UhdmAst::process_typespec_member() } } vpi_release_handle(typespec_h); - if (current_node->attributes.count(ID::packed_ranges)) { - for (auto r : current_node->attributes[ID::packed_ranges]->children) { + if (current_node->attributes.count(UhdmAst::packed_ranges())) { + for (auto r : current_node->attributes[UhdmAst::packed_ranges()]->children) { current_node->children.push_back(r->clone()); } - current_node->attributes.erase(ID::packed_ranges); + current_node->attributes.erase(UhdmAst::packed_ranges()); } - if (current_node->attributes.count(ID::unpacked_ranges)) { - for (auto r : current_node->attributes[ID::unpacked_ranges]->children) { + if (current_node->attributes.count(UhdmAst::unpacked_ranges())) { + for (auto r : current_node->attributes[UhdmAst::unpacked_ranges()]->children) { current_node->children.push_back(r->clone()); } - current_node->attributes.erase(ID::unpacked_ranges); + current_node->attributes.erase(UhdmAst::unpacked_ranges()); } } @@ -1608,18 +1641,18 @@ void UhdmAst::process_param_assign() current_node->children.push_back(c->clone()); } } - if (node->attributes.count(ID::packed_ranges)) { - for (auto r : node->attributes[ID::packed_ranges]->children) { + if (node->attributes.count(UhdmAst::packed_ranges())) { + for (auto r : node->attributes[UhdmAst::packed_ranges()]->children) { packed_ranges.push_back(r->clone()); } } - if (node->attributes.count(ID::unpacked_ranges)) { - for (auto r : node->attributes[ID::unpacked_ranges]->children) { + if (node->attributes.count(UhdmAst::unpacked_ranges())) { + for (auto r : node->attributes[UhdmAst::unpacked_ranges()]->children) { unpacked_ranges.push_back(r->clone()); } } - if (node->attributes.count(ID::is_imported)) { - current_node->attributes[ID::is_imported] = node->attributes[ID::is_imported]->clone(); + if (node->attributes.count(UhdmAst::is_imported())) { + current_node->attributes[UhdmAst::is_imported()] = node->attributes[UhdmAst::is_imported()]->clone(); } current_node->is_custom_type = node->is_custom_type; shared.param_types[current_node->str] = shared.param_types[node->str]; @@ -1857,13 +1890,13 @@ void UhdmAst::process_io_decl() for (auto child : node->children) { current_node->children.push_back(child->clone()); } - if (node->attributes.count(ID::packed_ranges)) { - for (auto r : node->attributes[ID::packed_ranges]->children) { + if (node->attributes.count(UhdmAst::packed_ranges())) { + for (auto r : node->attributes[UhdmAst::packed_ranges()]->children) { packed_ranges.push_back(r->clone()); } } - if (node->attributes.count(ID::unpacked_ranges)) { - for (auto r : node->attributes[ID::unpacked_ranges]->children) { + if (node->attributes.count(UhdmAst::unpacked_ranges())) { + for (auto r : node->attributes[UhdmAst::unpacked_ranges()]->children) { unpacked_ranges.push_back(r->clone()); } } @@ -2647,8 +2680,8 @@ void UhdmAst::process_function() for (auto c : node->children) { if (assign_types.find(c->type) != assign_types.end() && c->children[0]->type == AST::AST_WIRE) { c->children[0]->type = AST::AST_IDENTIFIER; - c->children[0]->attributes.erase(ID::packed_ranges); - c->children[0]->attributes.erase(ID::unpacked_ranges); + c->children[0]->attributes.erase(UhdmAst::packed_ranges()); + c->children[0]->attributes.erase(UhdmAst::unpacked_ranges()); } } current_node->children.push_back(node); @@ -3122,7 +3155,7 @@ void UhdmAst::process_parameter() std::vector unpacked_ranges; // comes after wire name // currently unused, but save it for future use if (const char *imported = vpi_get_str(vpiImported, obj_h); imported != nullptr && strlen(imported) > 0) { - current_node->attributes[ID::is_imported] = AST::AstNode::mkconst_int(1, true); + current_node->attributes[UhdmAst::is_imported()] = AST::AstNode::mkconst_int(1, true); } visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); @@ -3161,8 +3194,8 @@ void UhdmAst::process_parameter() case vpiArrayTypespec: { shared.report.mark_handled(typespec_h); visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { - if (node && node->attributes.count(ID::packed_ranges)) { - for (auto r : node->attributes[ID::packed_ranges]->children) { + if (node && node->attributes.count(UhdmAst::packed_ranges())) { + for (auto r : node->attributes[UhdmAst::packed_ranges()]->children) { packed_ranges.push_back(r->clone()); } } diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 906f47390..6d2cf5b99 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -152,6 +152,13 @@ class UhdmAst // Visits all VPI design objects and returns created ASTs AST::AstNode *visit_designs(const std::vector &designs); + + static const IdString &partial(); + static const IdString &packed_ranges(); + static const IdString &unpacked_ranges(); + // set this attribute to force conversion of multirange wire to single range. It is useful to force-convert some memories. + static const IdString &force_convert(); + static const IdString &is_imported(); }; YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/uhdm-plugin/UhdmAstUpstream.cc index 1a1c6826a..79c16bc1c 100644 --- a/uhdm-plugin/UhdmAstUpstream.cc +++ b/uhdm-plugin/UhdmAstUpstream.cc @@ -1,16 +1,3 @@ -namespace RTLIL -{ -namespace ID -{ -IdString partial{"\\partial"}; -IdString packed_ranges{"\\packed_ranges"}; -IdString unpacked_ranges{"\\unpacked_ranges"}; -IdString force_convert{ - "\\force_convert"}; // set this attribute to force conversion of multirange wire to single range. It is useful to force-convert some memories. -IdString is_imported{"\\is_imported"}; -} // namespace ID -} // namespace RTLIL - namespace AST { enum AstNodeTypeExtended { From 8eb6a2cecbcefdb8ef3b61d694c204265f7b5454 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 21 Jan 2022 15:13:27 +0100 Subject: [PATCH 542/845] Fix reference to unpacked_ranges after merge Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 1e410175b..458cf45a5 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -510,8 +510,8 @@ static AST::AstNode *convert_dot(AST::AstNode *wire_node, AST::AstNode *node, AS int struct_size_int = get_max_offset(struct_node) + 1; log_assert(!wire_node->multirange_dimensions.empty()); int range = wire_node->multirange_dimensions.back() - 1; - if (!wire_node->attributes[ID::unpacked_ranges]->children.empty() && - wire_node->attributes[ID::unpacked_ranges]->children.back()->range_left == range) { + if (!wire_node->attributes[UhdmAst::unpacked_ranges()]->children.empty() && + wire_node->attributes[UhdmAst::unpacked_ranges()]->children.back()->range_left == range) { expanded->children[1] = new AST::AstNode( AST::AST_ADD, expanded->children[1], new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), From d40b8cbb1e4ed5e43ab93904051ef903bb957274 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 24 Jan 2022 11:34:55 +0100 Subject: [PATCH 543/845] Always reverse concat nodes Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 458cf45a5..fd3abf334 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2422,10 +2422,7 @@ void UhdmAst::process_assignment_pattern_op() for (auto p : ordered_children) { current_node->children.push_back(p.second); } - // flattened nodes have correct order, but unflattened ones still needs to be reversed - if (!(vpi_get(vpiFlattened, obj_h) == 1)) { - std::reverse(current_node->children.begin(), current_node->children.end()); - } + std::reverse(current_node->children.begin(), current_node->children.end()); return; } auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE}); From b1e471162da543cb3b4d9ff383702839d54cecb1 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 25 Jan 2022 10:47:04 +0100 Subject: [PATCH 544/845] Add support for parameters inside function Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index fd3abf334..9fa8620b5 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2670,6 +2670,11 @@ void UhdmAst::process_function() current_node->children.push_back(node); } }); + visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) { + if (node) { + add_or_replace_child(current_node, node); + } + }); visit_one_to_many({vpiIODecl}, obj_h, [&](AST::AstNode *node) { node->type = AST::AST_WIRE; node->port_id = shared.next_port_id(); From 23d16b511969c8b9320fabb3531e0c6ef7cddd2a Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 25 Jan 2022 11:22:14 +0100 Subject: [PATCH 545/845] Fix missing stmt when while node contains block Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index fd3abf334..85790821d 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3273,6 +3273,7 @@ void UhdmAst::process_while() } else { if (node->str == "") { node->str = current_node->str; + current_node->children.push_back(node); } } }); From 39469efa3d608160dd1783ba079c6255506eace2 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 26 Jan 2022 09:56:51 +0100 Subject: [PATCH 546/845] Add check for param_type This fixes segmentation fault when we can't find param type Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index fd3abf334..a266ee033 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2411,6 +2411,9 @@ void UhdmAst::process_assignment_pattern_op() auto key = node->children[0]->str; key = key.substr(key.find('.') + 1); auto param_type = shared.param_types[param_node->str]; + if (!param_type) { + log_error("Couldn't find parameter type for node: %s\n", param_node->str.c_str()); + } size_t pos = std::find_if(param_type->children.begin(), param_type->children.end(), [key](AST::AstNode *child) { return child->str == key; }) - param_type->children.begin(); From 386c18310294d75f9e1d87c495049b09c8c8a03e Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 26 Jan 2022 11:08:52 +0100 Subject: [PATCH 547/845] Add support for typedef and parameters outside of module Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index a266ee033..c61201815 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1043,12 +1043,13 @@ AST::AstNode *UhdmAst::find_ancestor(const std::unordered_set void UhdmAst::process_design() { current_node = make_ast_node(AST::AST_DESIGN); - visit_one_to_many({UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules, vpiTypedef}, obj_h, - [&](AST::AstNode *node) { - if (node) { - shared.top_nodes[node->str] = node; - } - }); + visit_one_to_many( + {UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules, vpiTypedef, vpiParameter, vpiParamAssign}, obj_h, + [&](AST::AstNode *node) { + if (node) { + shared.top_nodes[node->str] = node; + } + }); for (auto pair : shared.top_nodes) { if (!pair.second) continue; @@ -2968,7 +2969,11 @@ void UhdmAst::process_bit_typespec() } }); if (!current_node->str.empty()) { - move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + auto top_module = find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_DESIGN}); + if (!top_module) { + log_error("Couldn't find top module for typedef: %s\n", current_node->str.c_str()); + } + move_type_to_new_typedef(top_module, current_node); } } From 2aee02031196a87c9f8e736f91f6400cbe700fc6 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 26 Jan 2022 11:42:03 +0100 Subject: [PATCH 548/845] Fix alias to package typedef Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index c61201815..0066eec39 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1818,7 +1818,7 @@ void UhdmAst::process_package() } }); visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { - if (node) { + if (node && node->str != "") { move_type_to_new_typedef(current_node, node); } }); @@ -2898,7 +2898,11 @@ void UhdmAst::process_logic_typespec() visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); if (!current_node->str.empty()) { - move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node->clone()); + auto top_module = find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_DESIGN}); + if (!top_module) { + log_error("Couldn't find top module for typedef: %s\n", current_node->str.c_str()); + } + move_type_to_new_typedef(top_module, current_node->clone()); } } @@ -2914,7 +2918,11 @@ void UhdmAst::process_int_typespec() add_multirange_wire(current_node, packed_ranges, unpacked_ranges); current_node->is_signed = true; if (!current_node->str.empty()) { - move_type_to_new_typedef(find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE}), current_node); + auto top_module = find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_DESIGN}); + if (!top_module) { + log_error("Couldn't find top module for typedef: %s\n", current_node->str.c_str()); + } + move_type_to_new_typedef(top_module, current_node); } } From eb2e0ae69fb209176615af19a50f095356253576 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 26 Jan 2022 13:48:08 +0100 Subject: [PATCH 549/845] Add check to if stmt Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 0066eec39..42b8b22c5 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2515,6 +2515,9 @@ void UhdmAst::process_if_else() { current_node = make_ast_node(AST::AST_CASE); visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { + if (!node) { + log_error("Couldn't find node in if stmt. This can happend if unsupported '$value$plusargs' function is used inside if.\n"); + } auto reduce_node = new AST::AstNode(AST::AST_REDUCE_BOOL, node); current_node->children.push_back(reduce_node); }); From 4f03a198a9eb33ca472e96f2882299a1f6c60178 Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Thu, 27 Jan 2022 11:46:33 +0100 Subject: [PATCH 550/845] sdc: Allow -add option in create_clock Signed-off-by: Tomasz Michalak --- sdc-plugin/sdc.cc | 3 + sdc-plugin/tests/Makefile | 4 +- .../create_clock_add.golden.sdc | 1 + .../create_clock_add.golden.txt | 2 + .../create_clock_add.input.sdc | 2 + .../create_clock_add/create_clock_add.tcl | 29 ++++++++ .../tests/create_clock_add/create_clock_add.v | 66 +++++++++++++++++++ 7 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 sdc-plugin/tests/create_clock_add/create_clock_add.golden.sdc create mode 100644 sdc-plugin/tests/create_clock_add/create_clock_add.golden.txt create mode 100644 sdc-plugin/tests/create_clock_add/create_clock_add.input.sdc create mode 100644 sdc-plugin/tests/create_clock_add/create_clock_add.tcl create mode 100644 sdc-plugin/tests/create_clock_add/create_clock_add.v diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index eafb8949c..a7876918c 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -131,6 +131,9 @@ struct CreateClockCmd : public Pass { } for (argidx = 1; argidx < args.size(); argidx++) { std::string arg = args[argidx]; + if (arg == "-add" && argidx + 1 < args.size()) { + continue; + } if (arg == "-name" && argidx + 1 < args.size()) { name = args[++argidx]; continue; diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index cfcbd8d7e..bbc0f1a68 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -32,7 +32,8 @@ TESTS = abc9 \ period_check \ waveform_check \ period_format_check \ - get_clocks + get_clocks \ + create_clock_add UNIT_TESTS = escaping @@ -58,3 +59,4 @@ waveform_check_negative = 1 period_format_check_verify = true period_format_check_negative = 1 get_clocks_verify = $(call diff_test,get_clocks,txt) +create_clock_add_verify = $(call diff_test,create_clock_add,sdc) && $(call diff_test,create_clock_add,txt) diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.golden.sdc b/sdc-plugin/tests/create_clock_add/create_clock_add.golden.sdc new file mode 100644 index 000000000..cfa90cba8 --- /dev/null +++ b/sdc-plugin/tests/create_clock_add/create_clock_add.golden.sdc @@ -0,0 +1 @@ +create_clock -period 10 -waveform {0 5} clk_int_1 diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.golden.txt b/sdc-plugin/tests/create_clock_add/create_clock_add.golden.txt new file mode 100644 index 000000000..9301c2dd6 --- /dev/null +++ b/sdc-plugin/tests/create_clock_add/create_clock_add.golden.txt @@ -0,0 +1,2 @@ +clk clk2 clk_int_1 +clk clk2 clk_int_1 diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.input.sdc b/sdc-plugin/tests/create_clock_add/create_clock_add.input.sdc new file mode 100644 index 000000000..f22823fd3 --- /dev/null +++ b/sdc-plugin/tests/create_clock_add/create_clock_add.input.sdc @@ -0,0 +1,2 @@ +create_clock -add -period 10.0 -waveform {0.000 5.000} clk_int_1 +create_clock -add -period 10.0 -name clk -waveform {0.000 5.000} clk clk2 diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.tcl b/sdc-plugin/tests/create_clock_add/create_clock_add.tcl new file mode 100644 index 000000000..cf2869a00 --- /dev/null +++ b/sdc-plugin/tests/create_clock_add/create_clock_add.tcl @@ -0,0 +1,29 @@ +yosys -import +if { [info procs read_sdc] == {} } { plugin -i sdc } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +read_verilog -specify -lib -D_EXPLICIT_CARRY +/xilinx/cells_sim.v +read_verilog -lib +/xilinx/cells_xtra.v +hierarchy -check -auto-top +# Start flow after library reading +synth_xilinx -flatten -abc9 -nosrl -nodsp -iopad -run prepare:check + +# Read the design's timing constraints +read_sdc $::env(DESIGN_TOP).input.sdc + +# Propagate the clocks +propagate_clocks + +# Write the clocks to file +set fh [open [test_output_path $::env(DESIGN_TOP).txt] w] +puts $fh [get_clocks] +puts $fh [get_clocks -include_generated_clocks] +close $fh + +# Clean processes before writing JSON. +yosys proc + +# Write out the SDC file after the clock propagation step +write_sdc [test_output_path $::env(DESIGN_TOP).sdc] +write_json [test_output_path $::env(DESIGN_TOP).json] diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.v b/sdc-plugin/tests/create_clock_add/create_clock_add.v new file mode 100644 index 000000000..6478a4c36 --- /dev/null +++ b/sdc-plugin/tests/create_clock_add/create_clock_add.v @@ -0,0 +1,66 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module top ( + input clk, + input clk2, + input [1:0] in, + output [5:0] out +); + + reg [1:0] cnt = 0; + wire clk_int_1, clk_int_2; + IBUF ibuf_proxy ( + .I(clk), + .O(ibuf_proxy_out) + ); + IBUF ibuf_inst ( + .I(ibuf_proxy_out), + .O(ibuf_out) + ); + assign clk_int_1 = ibuf_out; + assign clk_int_2 = clk_int_1; + + always @(posedge clk_int_2) begin + cnt <= cnt + 1; + end + + middle middle_inst_1 ( + .clk(ibuf_out), + .out(out[2]) + ); + middle middle_inst_2 ( + .clk(clk_int_1), + .out(out[3]) + ); + middle middle_inst_3 ( + .clk(clk_int_2), + .out(out[4]) + ); + middle middle_inst_4 ( + .clk(clk2), + .out(out[5]) + ); + + assign out[1:0] = {cnt[0], in[0]}; +endmodule + +module middle ( + input clk, + output out +); + + reg [1:0] cnt = 0; + wire clk_int; + assign clk_int = clk; + always @(posedge clk_int) begin + cnt <= cnt + 1; + end + + assign out = cnt[0]; +endmodule From 5f61339edfc2e4dc19261ce96b7b9b6d115fe0fb Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 28 Jan 2022 12:31:39 +0100 Subject: [PATCH 551/845] Visit typedef before parameter Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index f0412e6e5..e568dc5e4 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1808,6 +1808,11 @@ void UhdmAst::process_package() { current_node = make_ast_node(AST::AST_PACKAGE); shared.current_top_node = current_node; + visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) { + move_type_to_new_typedef(current_node, node); + } + }); visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) { if (node) { node->str = strip_package_name(node->str); @@ -1817,11 +1822,6 @@ void UhdmAst::process_package() add_or_replace_child(current_node, node); } }); - visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { - if (node && node->str != "") { - move_type_to_new_typedef(current_node, node); - } - }); visit_one_to_many({vpiTaskFunc}, obj_h, [&](AST::AstNode *node) { if (node) { current_node->children.push_back(node); From d7f84f212fec3344b4238ee22e4104eacc7eea94 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 28 Jan 2022 14:04:17 +0100 Subject: [PATCH 552/845] Move support for custom struct member with range to plugin Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 266 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 238 insertions(+), 28 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index e568dc5e4..ca90ddba1 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -107,7 +107,7 @@ static AST::AstNode *make_range(int left, int right, bool is_signed = false) #include "UhdmAstUpstream.cc" -static int get_max_offset(AST::AstNode *node) +static int get_max_offset_struct(AST::AstNode *node) { // get the width from the MS member in the struct // as members are laid out from left to right in the packed wire @@ -169,11 +169,16 @@ static size_t add_multirange_attribute(AST::AstNode *wire_node, const std::vecto } log_assert(ranges[i]->children[0]->type == AST::AST_CONSTANT); log_assert(ranges[i]->children[1]->type == AST::AST_CONSTANT); - wire_node->multirange_dimensions.push_back(min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer)); - wire_node->multirange_dimensions.push_back(max(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) - - min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) + 1); - wire_node->multirange_swapped.push_back(ranges[i]->range_swapped); - size *= wire_node->multirange_dimensions.back(); + if (wire_node->type != AST::AST_STRUCT_ITEM) { + wire_node->multirange_dimensions.push_back(min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer)); + wire_node->multirange_swapped.push_back(ranges[i]->range_swapped); + } + auto elem_size = max(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) - + min(ranges[i]->children[0]->integer, ranges[i]->children[1]->integer) + 1; + if (wire_node->type != AST::AST_STRUCT_ITEM || (wire_node->type == AST::AST_STRUCT_ITEM && i == 0)) { + wire_node->multirange_dimensions.push_back(elem_size); + } + size *= elem_size; } return size; } @@ -277,6 +282,12 @@ static void resolve_wiretype(AST::AstNode *wire_node) // needs to have access to all already definied ids while (wire_node->simplify(true, false, false, 1, -1, false, false)) { } + if (wiretype_ast->children[0]->type == AST::AST_STRUCT && wire_node->type == AST::AST_WIRE) { + auto struct_width = get_max_offset_struct(wiretype_ast->children[0]); + wire_node->range_left = struct_width; + wire_node->children[0]->range_left = struct_width; + wire_node->children[0]->children[0]->integer = struct_width; + } if (wiretype_ast && wire_node->attributes.count(ID::wiretype)) { log_assert(wiretype_ast->type == AST::AST_TYPEDEF); wire_node->attributes[ID::wiretype]->id2ast = wiretype_ast->children[0]; @@ -382,6 +393,11 @@ static void convert_packed_unpacked_range(AST::AstNode *wire_node) } } + if (wire_node->type == AST::AST_STRUCT_ITEM || wire_node->type == AST::AST_STRUCT) { + wire_node->attributes.erase(UhdmAst::packed_ranges()); + wire_node->attributes.erase(UhdmAst::unpacked_ranges()); + } + // Insert new range wire_node->children.insert(wire_node->children.end(), ranges.begin(), ranges.end()); } @@ -507,7 +523,7 @@ static AST::AstNode *convert_dot(AST::AstNode *wire_node, AST::AstNode *node, AS log_assert(struct_node); auto expanded = expand_dot(struct_node, dot); if (node->children[0]->type == AST::AST_RANGE) { - int struct_size_int = get_max_offset(struct_node) + 1; + int struct_size_int = get_max_offset_struct(struct_node) + 1; log_assert(!wire_node->multirange_dimensions.empty()); int range = wire_node->multirange_dimensions.back() - 1; if (!wire_node->attributes[UhdmAst::unpacked_ranges()]->children.empty() && @@ -557,6 +573,181 @@ static void setup_current_scope(std::unordered_map log_assert(AST_INTERNAL::current_ast_mod != nullptr); } +static int range_width_local(AST::AstNode *node, AST::AstNode *rnode) +{ + log_assert(rnode->type == AST::AST_RANGE); + if (!rnode->range_valid) { + log_file_error(node->filename, node->location.first_line, "Size must be constant in packed struct/union member %s\n", node->str.c_str()); + } + // note: range swapping has already been checked for + return rnode->range_left - rnode->range_right + 1; +} + +static void save_struct_array_width_local(AST::AstNode *node, int width) +{ + // stash the stride for the array + node->multirange_dimensions.push_back(width); +} + +static int simplify_struct(AST::AstNode *snode, int base_offset, AST::AstNode *parent_node) +{ + // Struct members will be laid out in the structure contiguously from left to right. + // Union members all have zero offset from the start of the union. + // Determine total packed size and assign offsets. Store these in the member node. + bool is_union = (snode->type == AST::AST_UNION); + int offset = 0; + int packed_width = -1; + for (auto s : snode->children) { + if (s->type == AST::AST_RANGE) { + while (s->simplify(true, false, false, 1, -1, false, false)) { + }; + } + } + // embeded struct or union with range? + auto it = std::remove_if(snode->children.begin(), snode->children.end(), [](AST::AstNode *node) { return node->type == AST::AST_RANGE; }); + std::vector ranges(it, snode->children.end()); + snode->children.erase(it, snode->children.end()); + if (!ranges.empty()) { + if (ranges.size() > 1) { + log_file_error(ranges[1]->filename, ranges[1]->location.first_line, + "Currently support for custom-type with range is limited to single range\n"); + } + for (auto range : ranges) { + snode->multirange_dimensions.push_back(min(range->range_left, range->range_right)); + snode->multirange_dimensions.push_back(max(range->range_left, range->range_right) - min(range->range_left, range->range_right) + 1); + snode->multirange_swapped.push_back(range->range_swapped); + } + } + // examine members from last to first + for (auto it = snode->children.rbegin(); it != snode->children.rend(); ++it) { + auto node = *it; + int width; + if (node->type == AST::AST_STRUCT || node->type == AST::AST_UNION) { + // embedded struct or union + width = simplify_struct(node, base_offset + offset, parent_node); + if (!node->multirange_dimensions.empty()) { + int number_of_structs = 1; + number_of_structs = node->multirange_dimensions.back(); + width *= number_of_structs; + } + // set range of struct + node->range_right = base_offset + offset; + node->range_left = base_offset + offset + width - 1; + node->range_valid = true; + } else { + log_assert(node->type == AST::AST_STRUCT_ITEM); + if (node->children.size() > 0 && node->children[0]->type == AST::AST_RANGE) { + // member width e.g. bit [7:0] a + width = range_width_local(node, node->children[0]); + if (node->children.size() == 2) { + if (node->children[1]->type == AST::AST_RANGE) { + // unpacked array e.g. bit [63:0] a [0:3] + auto rnode = node->children[1]; + int array_count = range_width_local(node, rnode); + if (array_count == 1) { + // C-type array size e.g. bit [63:0] a [4] + array_count = rnode->range_left; + } + save_struct_array_width_local(node, width); + width *= array_count; + } else { + // array element must be single bit for a packed array + log_file_error(node->filename, node->location.first_line, "Unpacked array in packed struct/union member %s\n", + node->str.c_str()); + } + } + // range nodes are now redundant + for (AST::AstNode *child : node->children) + delete child; + node->children.clear(); + } else if (node->children.size() == 1 && node->children[0]->type == AST::AST_MULTIRANGE) { + // packed 2D array, e.g. bit [3:0][63:0] a + auto rnode = node->children[0]; + if (rnode->children.size() != 2) { + // packed arrays can only be 2D + log_file_error(node->filename, node->location.first_line, "Unpacked array in packed struct/union member %s\n", node->str.c_str()); + } + int array_count = range_width_local(node, rnode->children[0]); + width = range_width_local(node, rnode->children[1]); + save_struct_array_width_local(node, width); + width *= array_count; + // range nodes are now redundant + for (AST::AstNode *child : node->children) + delete child; + node->children.clear(); + } else if (node->range_left < 0) { + // 1 bit signal: bit, logic or reg + width = 1; + } else { + // already resolved and compacted + width = node->range_left - node->range_right + 1; + } + if (is_union) { + node->range_right = base_offset; + node->range_left = base_offset + width - 1; + } else { + node->range_right = base_offset + offset; + node->range_left = base_offset + offset + width - 1; + } + node->range_valid = true; + } + if (is_union) { + // check that all members have the same size + if (packed_width == -1) { + // first member + packed_width = width; + } else { + if (packed_width != width) { + + log_file_error(node->filename, node->location.first_line, "member %s of a packed union has %d bits, expecting %d\n", + node->str.c_str(), width, packed_width); + } + } + } else { + offset += width; + } + } + if (!snode->str.empty() && parent_node && parent_node->type != AST::AST_TYPEDEF && parent_node->type != AST::AST_STRUCT && + AST_INTERNAL::current_scope.count(snode->str) != 0) { + AST_INTERNAL::current_scope[snode->str]->attributes[ID::wiretype] = AST::AstNode::mkconst_str(snode->str); + AST_INTERNAL::current_scope[snode->str]->attributes[ID::wiretype]->id2ast = snode; + } + return (is_union ? packed_width : offset); +} + +static void add_members_to_scope_local(AST::AstNode *snode, std::string name) +{ + // add all the members in a struct or union to local scope + // in case later referenced in assignments + log_assert(snode->type == AST::AST_STRUCT || snode->type == AST::AST_UNION); + for (auto *node : snode->children) { + auto member_name = name + "." + node->str; + AST_INTERNAL::current_scope[member_name] = node; + if (node->type != AST::AST_STRUCT_ITEM) { + // embedded struct or union + add_members_to_scope_local(node, name + "." + node->str); + } + } +} + +static AST::AstNode *make_packed_struct_local(AST::AstNode *template_node, std::string &name) +{ + // create a wire for the packed struct + auto wnode = new AST::AstNode(AST::AST_WIRE); + wnode->str = name; + wnode->is_logic = true; + wnode->range_valid = true; + wnode->is_signed = template_node->is_signed; + int offset = get_max_offset_struct(template_node); + auto range = make_range(offset, 0); + wnode->children.push_back(range); + // make sure this node is the one in scope for this name + AST_INTERNAL::current_scope[name] = wnode; + // add all the struct members to scope under the wire's name + add_members_to_scope_local(template_node, name); + return wnode; +} + static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) { AST::AstNode *expanded = nullptr; @@ -640,12 +831,24 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) } break; case AST::AST_STRUCT: - if (!current_node->str.empty() && parent_node && parent_node->type != AST::AST_TYPEDEF && parent_node->type != AST::AST_STRUCT) { - while (current_node->simplify(true, false, false, 1, -1, false, false)) { - } - AST_INTERNAL::current_scope[current_node->str]->attributes[ID::wiretype] = AST::AstNode::mkconst_str(current_node->str); - AST_INTERNAL::current_scope[current_node->str]->attributes[ID::wiretype]->id2ast = current_node; + simplify_struct(current_node, 0, parent_node); + // instance rather than just a type in a typedef or outer struct? + if (!current_node->str.empty() && current_node->str[0] == '\\') { + // instance so add a wire for the packed structure + auto wnode = make_packed_struct_local(current_node, current_node->str); + log_assert(AST_INTERNAL::current_ast_mod); + AST_INTERNAL::current_ast_mod->children.push_back(wnode); + AST_INTERNAL::current_scope[wnode->str]->attributes[ID::wiretype] = AST::AstNode::mkconst_str(current_node->str); + AST_INTERNAL::current_scope[wnode->str]->attributes[ID::wiretype]->id2ast = current_node; } + + current_node->basic_prep = true; + break; + case AST::AST_STRUCT_ITEM: + AST_INTERNAL::current_scope[current_node->str] = current_node; + convert_packed_unpacked_range(current_node); + while (current_node->simplify(true, false, false, 1, -1, false, false)) { + }; break; default: break; @@ -1322,6 +1525,8 @@ void UhdmAst::process_array_typespec() void UhdmAst::process_typespec_member() { + std::vector packed_ranges; + std::vector unpacked_ranges; current_node = make_ast_node(AST::AST_STRUCT_ITEM); current_node->str = current_node->str.substr(1); vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); @@ -1330,13 +1535,13 @@ void UhdmAst::process_typespec_member() case vpiBitTypespec: case vpiLogicTypespec: { current_node->is_logic = true; - visit_range(typespec_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); shared.report.mark_handled(typespec_h); break; } case vpiIntTypespec: { current_node->is_signed = true; - current_node->children.push_back(make_range(31, 0)); + packed_ranges.push_back(make_range(31, 0)); shared.report.mark_handled(typespec_h); break; } @@ -1360,20 +1565,36 @@ void UhdmAst::process_typespec_member() visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { if (node && node->type == AST::AST_STRUCT) { auto str = current_node->str; + if (node->attributes.count(UhdmAst::packed_ranges())) { + for (auto r : node->attributes[UhdmAst::packed_ranges()]->children) { + packed_ranges.push_back(r->clone()); + } + std::reverse(packed_ranges.begin(), packed_ranges.end()); + node->attributes.erase(UhdmAst::packed_ranges()); + } + if (node->attributes.count(UhdmAst::unpacked_ranges())) { + for (auto r : node->attributes[UhdmAst::unpacked_ranges()]->children) { + unpacked_ranges.push_back(r->clone()); + } + node->attributes.erase(UhdmAst::unpacked_ranges()); + } node->cloneInto(current_node); current_node->str = str; + current_node->children.insert(current_node->children.end(), packed_ranges.begin(), packed_ranges.end()); + packed_ranges.clear(); delete node; } else if (node) { auto str = current_node->str; if (node->attributes.count(UhdmAst::packed_ranges())) { for (auto r : node->attributes[UhdmAst::packed_ranges()]->children) { - node->children.push_back(r->clone()); + packed_ranges.push_back(r->clone()); } + std::reverse(packed_ranges.begin(), packed_ranges.end()); node->attributes.erase(UhdmAst::packed_ranges()); } if (node->attributes.count(UhdmAst::unpacked_ranges())) { for (auto r : node->attributes[UhdmAst::unpacked_ranges()]->children) { - node->children.push_back(r->clone()); + unpacked_ranges.push_back(r->clone()); } node->attributes.erase(UhdmAst::unpacked_ranges()); } @@ -1393,18 +1614,7 @@ void UhdmAst::process_typespec_member() } } vpi_release_handle(typespec_h); - if (current_node->attributes.count(UhdmAst::packed_ranges())) { - for (auto r : current_node->attributes[UhdmAst::packed_ranges()]->children) { - current_node->children.push_back(r->clone()); - } - current_node->attributes.erase(UhdmAst::packed_ranges()); - } - if (current_node->attributes.count(UhdmAst::unpacked_ranges())) { - for (auto r : current_node->attributes[UhdmAst::unpacked_ranges()]->children) { - current_node->children.push_back(r->clone()); - } - current_node->attributes.erase(UhdmAst::unpacked_ranges()); - } + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } void UhdmAst::process_enum_typespec() From 697e0615a57ddc337131abfbcdf02055fc58fca0 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 3 Feb 2022 12:47:31 +0100 Subject: [PATCH 553/845] Fix unsigned flag in shift operators Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ca90ddba1..90791b95f 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -863,6 +863,18 @@ static void clear_current_scope() AST_INTERNAL::current_ast_mod = nullptr; } +static void mark_as_unsigned(AST::AstNode *node) +{ + if (node->children.empty() || node->children.size() == 1) { + node->is_signed = false; + } else if (node->children.size() == 2) { + node->children[0]->is_signed = false; + node->children[1]->is_signed = false; + } else { + log_error("Unsupported expression in mark_as_unsigned!\n"); + } +} + void UhdmAst::visit_one_to_many(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f) { for (auto child : child_node_types) { @@ -2310,12 +2322,12 @@ void UhdmAst::process_operation() case vpiLShiftOp: current_node->type = AST::AST_SHIFT_LEFT; log_assert(current_node->children.size() == 2); - current_node->children[1]->is_signed = false; + mark_as_unsigned(current_node->children[1]); break; case vpiRShiftOp: current_node->type = AST::AST_SHIFT_RIGHT; log_assert(current_node->children.size() == 2); - current_node->children[1]->is_signed = false; + mark_as_unsigned(current_node->children[1]); break; case vpiNotOp: current_node->type = AST::AST_LOGIC_NOT; @@ -2371,12 +2383,12 @@ void UhdmAst::process_operation() case vpiArithLShiftOp: current_node->type = AST::AST_SHIFT_SLEFT; log_assert(current_node->children.size() == 2); - current_node->children[1]->is_signed = false; + mark_as_unsigned(current_node->children[1]); break; case vpiArithRShiftOp: current_node->type = AST::AST_SHIFT_SRIGHT; log_assert(current_node->children.size() == 2); - current_node->children[1]->is_signed = false; + mark_as_unsigned(current_node->children[1]); break; case vpiPowerOp: current_node->type = AST::AST_POW; From cd533e818d867932faff1ff80ef22801b39ebacf Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 3 Feb 2022 12:49:06 +0100 Subject: [PATCH 554/845] Add typedefs and params to current scope for lookup Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 90791b95f..207ea8817 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -567,6 +567,16 @@ static void setup_current_scope(std::unordered_map } } } + for (auto &o : current_top_node->children) { + if (o->type == AST::AST_TYPEDEF || o->type == AST::AST_PARAMETER || o->type == AST::AST_LOCALPARAM) { + AST_INTERNAL::current_scope[o->str] = o; + } else if (o->type == AST::AST_ENUM) { + AST_INTERNAL::current_scope[o->str] = o; + for (auto c : o->children) { + AST_INTERNAL::current_scope[c->str] = c; + } + } + } // hackish way of setting current_ast_mod as it is required // for simplify to get references for already defined ids AST_INTERNAL::current_ast_mod = current_top_node; @@ -813,6 +823,7 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) break; } AST::AstNode *wire_node = AST_INTERNAL::current_scope[current_node->str]; + simplify(wire_node, nullptr); const std::vector packed_ranges = wire_node->attributes.count(UhdmAst::packed_ranges()) ? wire_node->attributes[UhdmAst::packed_ranges()]->children : std::vector(); From ea2e665544d6f987d1cb6e43357011cce1fa69ca Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 3 Feb 2022 12:50:07 +0100 Subject: [PATCH 555/845] Fix sometimes missing ranges on typedef Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 207ea8817..9ec5c4959 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -293,7 +293,17 @@ static void resolve_wiretype(AST::AstNode *wire_node) wire_node->attributes[ID::wiretype]->id2ast = wiretype_ast->children[0]; } if (wire_node->children[0]->type == AST::AST_RANGE && wire_node->multirange_dimensions.empty()) { - packed_ranges.push_back(wire_node->children[0]); + if (wiretype_ast && !wiretype_ast->children.empty() && wiretype_ast->children[0]->attributes.count(UhdmAst::packed_ranges()) && + wiretype_ast->children[0]->attributes.count(UhdmAst::unpacked_ranges())) { + for (auto r : wiretype_ast->children[0]->attributes[UhdmAst::packed_ranges()]->children) { + packed_ranges.push_back(r->clone()); + } + for (auto r : wiretype_ast->children[0]->attributes[UhdmAst::unpacked_ranges()]->children) { + unpacked_ranges.push_back(r->clone()); + } + } else { + packed_ranges.push_back(wire_node->children[0]); + } wire_node->children.clear(); wire_node->attributes[UhdmAst::packed_ranges()] = AST::AstNode::mkconst_int(1, false, 1); if (!packed_ranges.empty()) { From 902c2b94884c56eff86fc4b8195d745adea6da74 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 3 Feb 2022 15:54:18 +0100 Subject: [PATCH 556/845] Add check for Surelog command line args Signed-off-by: Kamil Rakoczy --- uhdm-plugin/uhdmsurelogastfrontend.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index a5b004700..7bfd53de4 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -140,7 +140,10 @@ struct UhdmSurelogAstFrontend : public Frontend { SURELOG::SymbolTable *symbolTable = new SURELOG::SymbolTable(); SURELOG::ErrorContainer *errors = new SURELOG::ErrorContainer(symbolTable); SURELOG::CommandLineParser *clp = new SURELOG::CommandLineParser(errors, symbolTable, false, false); - clp->parseCommandLine(cstrings.size(), &cstrings[0]); + bool success = clp->parseCommandLine(cstrings.size(), &cstrings[0]); + if (!success) { + log_error("Error parsing Surelog arguments!\n"); + } SURELOG::scompiler *compiler = nullptr; const std::vector uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); struct AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); From 67a21885654f9b9307d251c16c69d186fc890f07 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 4 Feb 2022 12:14:16 +0100 Subject: [PATCH 557/845] Fix accessing whole unpacked range, if range doesn't start from 0 Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 9ec5c4959..cde08c0ee 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -220,12 +220,17 @@ static AST::AstNode *convert_range(AST::AstNode *id, const std::vectormultirange_swapped.empty()) { bool is_swapped = wire_node->multirange_swapped[wire_node->multirange_swapped.size() - i - 1]; + auto right_idx = wire_node->multirange_dimensions.size() - (i * 2) - 2; if (is_swapped) { auto left_idx = wire_node->multirange_dimensions.size() - (i * 2) - 1; - auto right_idx = wire_node->multirange_dimensions.size() - (i * 2) - 2; auto elem_size = wire_node->multirange_dimensions[left_idx] - wire_node->multirange_dimensions[right_idx]; range_left = new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(elem_size - 1, false), range_left->clone()); range_right = new AST::AstNode(AST::AST_SUB, AST::AstNode::mkconst_int(elem_size - 1, false), range_right->clone()); + } else if (wire_node->multirange_dimensions[right_idx] != 0) { + range_left = + new AST::AstNode(AST::AST_SUB, range_left, AST::AstNode::mkconst_int(wire_node->multirange_dimensions[right_idx], false)); + range_right = + new AST::AstNode(AST::AST_SUB, range_right, AST::AstNode::mkconst_int(wire_node->multirange_dimensions[right_idx], false)); } } range_left = @@ -2167,7 +2172,7 @@ void UhdmAst::process_io_decl() current_node->is_output = true; } } - add_multirange_wire(current_node, packed_ranges, unpacked_ranges); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges, false); } void UhdmAst::process_always() From 4903fc1db2867db7cfb58dbf1dc1539c468e13e2 Mon Sep 17 00:00:00 2001 From: rakeshm Date: Fri, 4 Feb 2022 08:04:35 -0800 Subject: [PATCH 558/845] Modified ffs map file Signed-off-by: rakeshm --- ql-qlf-plugin/qlf_k6n10f/ffs_map.v | 109 ++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v index b57d5a3fe..be92436c9 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v @@ -51,8 +51,23 @@ module \$_DFF_PN1_ (D, C, R, Q); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(R)); endmodule -// Async reset, enable +module \$_DFFE_PP_ (D, C, E, Q); + input D; + input C; + input E; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(1'b1)); +endmodule + +module \$_DFFE_PN_ (D, C, E, Q); + input D; + input C; + input E; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(1'b1)); +endmodule +// Async reset, enable module \$_DFFE_PP0P_ (D, C, E, R, Q); input D; input C; @@ -62,6 +77,15 @@ module \$_DFFE_PP0P_ (D, C, E, R, Q); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(1'b1)); endmodule +module \$_DFFE_PP0N_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(1'b1)); +endmodule + module \$_DFFE_PN0P_ (D, C, E, R, Q); input D; input C; @@ -70,6 +94,15 @@ module \$_DFFE_PN0P_ (D, C, E, R, Q); output Q; dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1)); endmodule + +module \$_DFFE_PN0N_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(1'b1)); +endmodule // Async set, enable module \$_DFFE_PP1P_ (D, C, E, R, Q); @@ -81,6 +114,15 @@ module \$_DFFE_PP1P_ (D, C, E, R, Q); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(!R)); endmodule +module \$_DFFE_PP1N_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(!R)); +endmodule + module \$_DFFE_PN1P_ (D, C, E, R, Q); input D; input C; @@ -90,6 +132,15 @@ module \$_DFFE_PN1P_ (D, C, E, R, Q); dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R)); endmodule +module \$_DFFE_PN1N_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(R)); +endmodule + // Async set & reset module \$_DFFSR_PPP_ (D, C, R, S, Q); @@ -301,6 +352,22 @@ module \$_DFF_NN1_ (D, C, R, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(R)); endmodule +module \$_DFFE_NP_ (D, C, E, Q); + input D; + input C; + input E; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(1'b1)); +endmodule + +module \$_DFFE_NN_ (D, C, E, Q); + input D; + input C; + input E; + output Q; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(1'b1)); +endmodule + module \$_DFFE_NP0P_ (D, C, E, R, Q); input D; input C; @@ -311,6 +378,16 @@ module \$_DFFE_NP0P_ (D, C, E, R, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(1'b1)); endmodule +module \$_DFFE_NP0N_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(1'b1)); +endmodule + module \$_DFFE_NN0P_ (D, C, E, R, Q); input D; input C; @@ -321,6 +398,16 @@ module \$_DFFE_NN0P_ (D, C, E, R, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1)); endmodule +module \$_DFFE_NN0N_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(1'b1)); +endmodule + module \$_DFFE_NP1P_ (D, C, E, R, Q); input D; input C; @@ -331,6 +418,16 @@ module \$_DFFE_NP1P_ (D, C, E, R, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(!R)); endmodule +module \$_DFFE_NP1N_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(!R)); +endmodule + module \$_DFFE_NN1P_ (D, C, E, R, Q); input D; input C; @@ -341,6 +438,16 @@ module \$_DFFE_NN1P_ (D, C, E, R, Q); dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R)); endmodule +module \$_DFFE_NN1N_ (D, C, E, R, Q); + input D; + input C; + input E; + input R; + output Q; + parameter _TECHMAP_WIREINIT_Q_ = 1'bx; + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(R)); +endmodule + module \$_DFFSRE_NPPP_ (D, C, E, R, S, Q); input D; input C; From ef2de855a7e0a90cfeb805f000b4ac631599cd57 Mon Sep 17 00:00:00 2001 From: Ethan Mahintorabi Date: Fri, 4 Feb 2022 21:05:43 +0000 Subject: [PATCH 559/845] Adds packed union support to plugin Signed-off-by: Ethan Mahintorabi --- uhdm-plugin/UhdmAst.cc | 28 +++++++++++++++++++++++++++- uhdm-plugin/UhdmAst.h | 1 + 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 9ec5c4959..d9abec3d5 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1536,6 +1536,28 @@ void UhdmAst::process_struct_typespec() }); } +void UhdmAst::process_union_typespec() +{ + current_node = make_ast_node(AST::AST_UNION); + visit_one_to_many({vpiTypespecMember}, obj_h, [&](AST::AstNode *node) { + if (node->children.size() > 0 && node->children[0]->type == AST::AST_ENUM) { + log_assert(node->children.size() == 1); + log_assert(!node->children[0]->children.empty()); + log_assert(!node->children[0]->children[0]->children.empty()); + // TODO: add missing enum_type attribute + auto range = make_range(0, 0); + // check if single enum element is larger than 1 bit + if (node->children[0]->children[0]->children.size() == 2) { + range = node->children[0]->children[0]->children[1]->clone(); + } + delete node->children[0]; + node->children.clear(); + node->children.push_back(range); + } + current_node->children.push_back(node); + }); +} + void UhdmAst::process_array_typespec() { current_node = make_ast_node(AST::AST_WIRE); @@ -1579,9 +1601,10 @@ void UhdmAst::process_typespec_member() break; } case vpiStructTypespec: + case vpiUnionTypespec: case vpiEnumTypespec: { visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - if (typespec_type == vpiStructTypespec) { + if (typespec_type == vpiStructTypespec || typespec_type == vpiUnionTypespec) { auto str = current_node->str; node->cloneInto(current_node); current_node->str = str; @@ -3579,6 +3602,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiStructTypespec: process_struct_typespec(); break; + case vpiUnionTypespec: + process_union_typespec(); + break; case vpiPackedArrayTypespec: process_packed_array_typespec(); break; diff --git a/uhdm-plugin/UhdmAst.h b/uhdm-plugin/UhdmAst.h index 6d2cf5b99..538ec3b92 100644 --- a/uhdm-plugin/UhdmAst.h +++ b/uhdm-plugin/UhdmAst.h @@ -72,6 +72,7 @@ class UhdmAst void process_port(); void process_module(); void process_struct_typespec(); + void process_union_typespec(); void process_packed_array_typespec(); void process_array_typespec(); void process_typespec_member(); From 63092cf02fbf93e4e4e37b07836fbc8ca31f0c50 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 7 Feb 2022 16:19:44 +0100 Subject: [PATCH 560/845] Fix wrong struct value when it is used as module parameter Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 9ec5c4959..d877084c2 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1323,6 +1323,8 @@ void UhdmAst::simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_n visitEachDescendant(shared.current_top_node, [&](AST::AstNode *current_scope_node) { if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_PARAMETER || current_scope_node->type == AST::AST_LOCALPARAM) { + if (current_scope_node->type == AST::AST_TYPEDEF) + simplify(current_scope_node, nullptr); AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; } }); @@ -1330,6 +1332,8 @@ void UhdmAst::simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_n visitEachDescendant(module_node, [&](AST::AstNode *current_scope_node) { if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_PARAMETER || current_scope_node->type == AST::AST_LOCALPARAM) { + if (current_scope_node->type == AST::AST_TYPEDEF) + simplify(current_scope_node, nullptr); AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; } }); From 5feea1d6a6d00808570fe3c108d519a9ccfe3976 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 8 Feb 2022 11:22:50 +0100 Subject: [PATCH 561/845] Add support for vpiBitTypespec in enum Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index d9abec3d5..8bb146331 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1707,6 +1707,21 @@ void UhdmAst::process_enum_typespec() shared.report.mark_handled(typespec_h); break; } + case vpiBitTypespec: { + bool has_range = false; + visit_range(typespec_h, [&](AST::AstNode *node) { + has_range = true; + for (auto child : current_node->children) { + child->children.push_back(node->clone()); + } + delete node; + }); + if (!has_range) // range is needed for simplify + for (auto child : current_node->children) + child->children.push_back(make_ast_node(AST::AST_RANGE, {AST::AstNode::mkconst_int(0, true)})); + shared.report.mark_handled(typespec_h); + break; + } default: { const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; From 3d37b7188b293f3773142c9c5d7e6ec4ef4a8cfb Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 8 Feb 2022 12:33:43 +0100 Subject: [PATCH 562/845] Fix missing typedef node on file-level Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index d9abec3d5..0d7703ecc 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1279,13 +1279,16 @@ AST::AstNode *UhdmAst::find_ancestor(const std::unordered_set void UhdmAst::process_design() { current_node = make_ast_node(AST::AST_DESIGN); - visit_one_to_many( - {UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules, vpiTypedef, vpiParameter, vpiParamAssign}, obj_h, - [&](AST::AstNode *node) { - if (node) { - shared.top_nodes[node->str] = node; - } - }); + visit_one_to_many({UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules}, obj_h, [&](AST::AstNode *node) { + if (node) { + shared.top_nodes[node->str] = node; + } + }); + visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) {}); + visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { + if (node) + move_type_to_new_typedef(current_node, node); + }); for (auto pair : shared.top_nodes) { if (!pair.second) continue; @@ -1569,9 +1572,6 @@ void UhdmAst::process_array_typespec() node->cloneInto(current_node); current_node->str = str; delete node; - } else if (node) { - current_node->str = node->str; - delete node; } }); visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); From 82420e7be1bcf49b23d183925a2163315dd29eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Thu, 10 Feb 2022 11:34:13 +0100 Subject: [PATCH 563/845] Fix monitor function handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 4aa2f3581..e116573de 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3123,7 +3123,7 @@ void UhdmAst::process_sys_func_call() current_node->type = AST::AST_TO_SIGNED; } else if (current_node->str == "\\$unsigned") { current_node->type = AST::AST_TO_UNSIGNED; - } else if (current_node->str == "\\$display" || current_node->str == "\\$time") { + } else if (current_node->str == "\\$display" || current_node->str == "\\$time" || current_node->str == "\\$monitor") { current_node->type = AST::AST_TCALL; current_node->str = current_node->str.substr(1); } else if (current_node->str == "\\$readmemh") { From 2d7ccf821ec9e40de8d0373b53be7cb7ddb9ff94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Thu, 10 Feb 2022 15:29:27 +0100 Subject: [PATCH 564/845] Skip unsupported functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index e116573de..b6b541b45 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3119,6 +3119,21 @@ void UhdmAst::process_logic_var() void UhdmAst::process_sys_func_call() { current_node = make_ast_node(AST::AST_FCALL); + + // skip unsupported simulation functions + std::string to_skip[] = { + "\\$value$plusargs", "\\$test$plusargs", "\\$displayb", "\\$displayh", "\\$displayo", "\\$strobeb", "\\$strobeh", "\\$strobeo", + "\\$writeb", "\\$writeh", "\\$writeo", "\\$dumplimit", "\\$dumpflush", "\\$fdisplay", "\\$fdisplayb", "\\$fdisplayh", + "\\$fdisplayo", "\\$fmonitor", "\\$fstrobe", "\\$fstrobeb", "\\$fstrobeh", "\\$fstrobeo", "\\$fwrite", "\\$fwriteb", + "\\$fwriteh", "\\$fwriteo", "\\$ungetc", "\\$fgetc", "\\$fgets", "\\$ftell", "\\$printtimescale"}; + + if (std::find(std::begin(to_skip), std::end(to_skip), current_node->str) != std::end(to_skip)) { + log_warning("System function %s was skipped\n", current_node->str.substr(1).c_str()); + delete current_node; + current_node = nullptr; + return; + } + if (current_node->str == "\\$signed") { current_node->type = AST::AST_TO_SIGNED; } else if (current_node->str == "\\$unsigned") { @@ -3135,12 +3150,6 @@ void UhdmAst::process_sys_func_call() current_node->children.push_back(node); } }); - - // skip $value$plusargs function, as it is simulation function - if (current_node->str == "\\$value$plusargs") { - delete current_node; - current_node = nullptr; - } } void UhdmAst::process_func_call() From b8180c51039c6d5be66a808beff780613314e9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Fri, 11 Feb 2022 10:04:43 +0100 Subject: [PATCH 565/845] Skip backslash in some system functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index b6b541b45..790debe8d 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3134,14 +3134,13 @@ void UhdmAst::process_sys_func_call() return; } + std::string task_calls[] = {"\\$display", "\\$monitor", "\\$time", "\\$readmemh"}; + if (current_node->str == "\\$signed") { current_node->type = AST::AST_TO_SIGNED; } else if (current_node->str == "\\$unsigned") { current_node->type = AST::AST_TO_UNSIGNED; - } else if (current_node->str == "\\$display" || current_node->str == "\\$time" || current_node->str == "\\$monitor") { - current_node->type = AST::AST_TCALL; - current_node->str = current_node->str.substr(1); - } else if (current_node->str == "\\$readmemh") { + } else if (std::find(std::begin(task_calls), std::end(task_calls), current_node->str) != std::end(task_calls)) { current_node->type = AST::AST_TCALL; } @@ -3150,6 +3149,12 @@ void UhdmAst::process_sys_func_call() current_node->children.push_back(node); } }); + + std::string remove_backslash[] = {"\\$display", "\\$strobe", "\\$write", "\\$monitor", "\\$time", "\\$finish", + "\\$stop", "\\$dumpfile", "\\$dumpvars", "\\$dumpon", "\\$dumpoff", "\\$dumpall"}; + + if (std::find(std::begin(remove_backslash), std::end(remove_backslash), current_node->str) != std::end(remove_backslash)) + current_node->str = current_node->str.substr(1); } void UhdmAst::process_func_call() From 1deeb81ca7212592f72691598d73200e6f807b0b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 10 Feb 2022 18:17:37 +0100 Subject: [PATCH 566/845] Initial support for inference 10x9 and 20x18 multipliers for k6n10f Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 73 ++++++++++++++++------ ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 91 ++++++++++++++++++++++------ ql-qlf-plugin/synth_quicklogic.cc | 70 ++++++++++++++++----- 3 files changed, 184 insertions(+), 50 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index fbdeedc64..c69c38c80 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -664,22 +664,61 @@ module TDP_BRAM36 ( endmodule -(* blackbox *) -module QL_DSP1 ( - input [19:0] a, - input [17:0] b, - input clk0, - (* clkbuf_sink *) - input clk1, - (* clkbuf_sink *) - input [ 1:0] feedback0, - input [ 1:0] feedback1, - input load_acc0, - input load_acc1, - input reset0, - input reset1, - output reg [37:0] z +//(* blackbox *) +//module QL_DSP1 ( +// input [19:0] a, +// input [17:0] b, +// input clk0, +// (* clkbuf_sink *) +// input clk1, +// (* clkbuf_sink *) +// input [ 1:0] feedback0, +// input [ 1:0] feedback1, +// input load_acc0, +// input load_acc1, +// input reset0, +// input reset1, +// output reg [37:0] z +//); +// parameter MODE_BITS = 27'b00000000000000000000000000; +//endmodule /* QL_DSP1 */ + +(* blackbox *) // TODO: add sim model +module dsp_t1_20x18x64 ( + input [63:0] a_i, + input [17:0] b_i, + output [63:0] z_o, + + input clock_i, + input reset_i, + input load_acc_i, + + input register_inputs_i, + input subtraction_mode_i, + input [1:0] feedback_i, + input round_i, + input [5:0] shift_right_i, + input saturate_enable_i, + input [1:0] output_select_i ); - parameter MODE_BITS = 27'b00000000000000000000000000; -endmodule /* QL_DSP1 */ +endmodule +(* blackbox *) // TODO: add sim model +module dsp_t1_10x9x32 ( + input [31:0] a_i, + input [ 8:0] b_i, + output [31:0] z_o, + + input clock_i, + input reset_i, + input load_acc_i, + + input register_inputs_i, + input subtraction_mode_i, + input [1:0] feedback_i, + input round_i, + input [5:0] shift_right_i, + input saturate_enable_i, + input [1:0] output_select_i +); +endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index 4b8ae644a..6b4cab2f3 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -6,22 +6,77 @@ // // SPDX-License-Identifier:ISC -module \$__MUL16X16 (input [15:0] A, input [15:0] B, output [31:0] Y); - parameter A_SIGNED = 0; - parameter B_SIGNED = 0; - parameter A_WIDTH = 0; - parameter B_WIDTH = 0; - parameter Y_WIDTH = 0; - - QL_DSP #( - .A_REG(1'b0), - .B_REG(1'b0), - .C_REG(1'b0), - .D_REG(1'b0), - .ENABLE_DSP(1'b1), - ) _TECHMAP_REPLACE_ ( - .A(A), - .B(B), - .O(Y), - ); +module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); + parameter A_SIGNED = 0; + parameter B_SIGNED = 0; + parameter A_WIDTH = 0; + parameter B_WIDTH = 0; + parameter Y_WIDTH = 0; + + wire [19:0] a; + wire [17:0] b; + wire [63:0] z; + + assign a = (A_WIDTH == 20) ? A : + (A_SIGNED) ? {{(20 - A_WIDTH){A[A_WIDTH-1]}}, A} : + {{(20 - A_WIDTH){1'b0}}, A}; + + assign b = (B_WIDTH == 18) ? B : + (B_SIGNED) ? {{(18 - B_WIDTH){B[B_WIDTH-1]}}, B} : + {{(18 - B_WIDTH){1'b0}}, B}; + + dsp_t1_20x18x64 _TECHMAP_REPLACE_ ( + .a_i (a), + .b_i (b), + .z_o (z), + + .register_inputs_i (1'b0), + .subtraction_mode_i (1'b0), + .feedback_i (2'b00), + .round_i (1'b0), + .shift_right_i (1'b0), + .saturate_enable_i (1'b0), + .output_select_i (1'b0) + ); + + assign Y = z[37:0]; + endmodule + +module \$__QL_MUL20X18 (input [9:0] A, input [8:0] B, output [18:0] Y); + parameter A_SIGNED = 0; + parameter B_SIGNED = 0; + parameter A_WIDTH = 0; + parameter B_WIDTH = 0; + parameter Y_WIDTH = 0; + + wire [ 9:0] a; + wire [ 8:0] b; + wire [31:0] z; + + assign a = (A_WIDTH == 10) ? A : + (A_SIGNED) ? {{(10 - A_WIDTH){A[A_WIDTH-1]}}, A} : + {{(10 - A_WIDTH){1'b0}}, A}; + + assign b = (B_WIDTH == 9) ? B : + (B_SIGNED) ? {{( 9 - B_WIDTH){B[B_WIDTH-1]}}, B} : + {{( 9 - B_WIDTH){1'b0}}, B}; + + dsp_t1_10x9x32 _TECHMAP_REPLACE_ ( + .a_i (a), + .b_i (b), + .z_o (z), + + .register_inputs_i (1'b0), + .subtraction_mode_i (1'b0), + .feedback_i (2'b00), + .round_i (1'b0), + .shift_right_i (1'b0), + .saturate_enable_i (1'b0), + .output_select_i (1'b0) + ); + + assign Y = z[18:0]; + +endmodule + diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index d26f53a42..911747048 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -233,21 +233,61 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_clean"); run("share"); - if (help_mode || (!nodsp && family == "qlf_k6n10")) { - run("memory_dff"); - run("wreduce t:$mul"); - run("techmap -map +/mul2dsp.v -map +/quicklogic/" + family + - "/dsp_map.v -D DSP_A_MAXWIDTH=16 -D DSP_B_MAXWIDTH=16 " - "-D DSP_A_MINWIDTH=2 -D DSP_B_MINWIDTH=2 -D DSP_Y_MINWIDTH=11 " - "-D DSP_NAME=$__MUL16X16", - "(if -no_dsp)"); - run("select a:mul2dsp", " (if -no_dsp)"); - run("setattr -unset mul2dsp", " (if -no_dsp)"); - run("opt_expr -fine", " (if -no_dsp)"); - run("wreduce", " (if -no_dsp)"); - run("select -clear", " (if -no_dsp)"); - run("ql_dsp", " (if -no_dsp)"); - run("chtype -set $mul t:$__soft_mul", "(if -no_dsp)"); + if (family == "qlf_k6n10") { + if (help_mode || !nodsp) { + run("memory_dff"); + run("wreduce t:$mul"); + run("techmap -map +/mul2dsp.v -map +/quicklogic/" + family + + "/dsp_map.v -D DSP_A_MAXWIDTH=16 -D DSP_B_MAXWIDTH=16 " + "-D DSP_A_MINWIDTH=2 -D DSP_B_MINWIDTH=2 -D DSP_Y_MINWIDTH=11 " + "-D DSP_NAME=$__MUL16X16", + "(for qlf_k6n10 if not -no_dsp)"); + run("select a:mul2dsp", " (for qlf_k6n10 if not -no_dsp)"); + run("setattr -unset mul2dsp", " (for qlf_k6n10 if not -no_dsp)"); + run("opt_expr -fine", " (for qlf_k6n10 if not -no_dsp)"); + run("wreduce", " (for qlf_k6n10 if not -no_dsp)"); + run("select -clear", " (for qlf_k6n10 if not -no_dsp)"); + run("ql_dsp", " (for qlf_k6n10 if not -no_dsp)"); + run("chtype -set $mul t:$__soft_mul", "(for qlf_k6n10 if not -no_dsp)"); + } + } + else if (family == "qlf_k6n10f") { + + struct DspParams { + size_t a_maxwidth; + size_t b_maxwidth; + size_t a_minwidth; + size_t b_minwidth; + std::string type; + }; + + const std::vector dsp_rules = { + {20, 18, 4, 4, "$__QL_MUL20X18"}, + {10, 9, 4, 4, "$__QL_MUL10X9"}, + }; + + if (help_mode) { + run("wreduce t:$mul", " (for qlf_k6n10f if not -no_dsp)"); + run("techmap -map +/mul2dsp.v [...]", "(for qlf_k6n10f if not -no_dsp)"); + run("chtype -set $mul t:$__soft_mul", "(for qlf_k6n10f if not -no_dsp)"); + run("techmap -map +/quicklogic/" + family + "/dsp_map.v", "(for qlf_k6n10f if not -no_dsp)"); + } + else if (!nodsp) { + + run("wreduce t:$mul"); + for (const auto &rule : dsp_rules) { + run(stringf("techmap -map +/mul2dsp.v " + "-D DSP_A_MAXWIDTH=%zu -D DSP_B_MAXWIDTH=%zu " + "-D DSP_A_MINWIDTH=%zu -D DSP_B_MINWIDTH=%zu " + "-D DSP_NAME=%s", + rule.a_maxwidth, rule.b_maxwidth, + rule.a_minwidth, rule.b_minwidth, + rule.type.c_str()) + ); + run("chtype -set $mul t:$__soft_mul"); + } + run("techmap -map +/quicklogic/" + family + "/dsp_map.v"); + } } run("techmap -map +/cmp2lut.v -D LUT_WIDTH=4"); From b5a087b8ecbdb7919cf903582077eb90c0974438 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 10:04:19 +0100 Subject: [PATCH 567/845] Updated the common makefile for tests to allow nesting them under subdirectories Signed-off-by: Maciej Kurc --- Makefile_test.common | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile_test.common b/Makefile_test.common index 61abadb24..e430839b1 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -23,17 +23,17 @@ ifeq (,$(wildcard $(YOSYS_CONFIG))) $(error "Didn't find 'yosys-config' under '$(YOSYS_PATH)'") endif -GTEST_DIR ?= ../../third_party/googletest +GTEST_DIR ?= $(abspath ../../third_party/googletest) CXX ?= $(shell $(YOSYS_CONFIG) --cxx) CXXFLAGS ?= $(shell $(YOSYS_CONFIG) --cxxflags) -I.. -I$(GTEST_DIR)/googletest/include LDLIBS ?= $(shell $(YOSYS_CONFIG) --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread LDFLAGS ?= $(shell $(YOSYS_CONFIG) --ldflags) -TEST_UTILS ?= ../../../test-utils/test-utils.tcl +TEST_UTILS ?= $(abspath ../../test-utils/test-utils.tcl) define test_tpl = $(1): $(1)/ok @set +e; \ - $$($(1)_verify); \ + $$($$(subst /,-,$(1)_verify)); \ if [ $$$$? -eq 0 ]; then \ printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ touch $$<; \ @@ -43,15 +43,15 @@ $(1): $(1)/ok false; \ fi -$(1)/ok: $(1)/$(1).v +$(1)/ok: $(1)/$$(notdir $(1).v) @set +e; \ cd $(1); \ - echo "source $(TEST_UTILS)" > run-$(1).tcl ;\ - echo "source $(1).tcl" >> run-$(1).tcl ;\ - DESIGN_TOP=$(1) TEST_OUTPUT_PREFIX=./ \ - yosys -c "run-$(1).tcl" -q -q -l $(1).log; \ + echo "source $(TEST_UTILS)" > run-$$(notdir $(1)).tcl ;\ + echo "source $$(notdir $(1)).tcl" >> run-$$(notdir $(1)).tcl ;\ + DESIGN_TOP=$$(notdir $(1)) TEST_OUTPUT_PREFIX=./ \ + yosys -c "run-$$(notdir $(1)).tcl" -q -q -l $$(notdir $(1)).log; \ RETVAL=$$$$?; \ - rm -f run-$(1).tcl; \ + rm -f run-$$(notdir $(1)).tcl; \ if [ ! -z "$$($(1)_negative)" ] && [ $$($(1)_negative) -eq 1 ]; then \ if [ $$$$RETVAL -ne 0 ]; then \ printf "Negative test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ From 238d4faf34c5c6dd2285ea293488eddb8b83a0a9 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 10:22:52 +0100 Subject: [PATCH 568/845] Tweaked k6n10f DSP inference, added a simple test Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 2 +- ql-qlf-plugin/synth_quicklogic.cc | 2 +- ql-qlf-plugin/tests/Makefile | 4 +- .../tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl | 35 +++++++++++++++++ .../tests/qlf_k6n10f/dsp_mult/dsp_mult.v | 39 +++++++++++++++++++ 5 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index 6b4cab2f3..f9f9cfc45 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -43,7 +43,7 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); endmodule -module \$__QL_MUL20X18 (input [9:0] A, input [8:0] B, output [18:0] Y); +module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); parameter A_SIGNED = 0; parameter B_SIGNED = 0; parameter A_WIDTH = 0; diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 911747048..ec35d7191 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -262,7 +262,7 @@ struct SynthQuickLogicPass : public ScriptPass { }; const std::vector dsp_rules = { - {20, 18, 4, 4, "$__QL_MUL20X18"}, + {20, 18, 11, 10, "$__QL_MUL20X18"}, {10, 9, 4, 4, "$__QL_MUL10X9"}, }; diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 12fab91d0..4fc598c75 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -20,7 +20,8 @@ TESTS = consts \ mux \ tribuf \ fsm \ - pp3_bram #\ + pp3_bram \ + qlf_k6n10f/dsp_mult # qlf_k6n10_bram \ include $(shell pwd)/../../Makefile_test.common @@ -38,4 +39,5 @@ mux_verify = true tribuf_verify = true fsm_verify = true pp3_bram_verify = true +qlf_k6n10f-dsp_mult_verify = true #qlf_k6n10_bram_verify = true diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl new file mode 100644 index 000000000..90f591df1 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl @@ -0,0 +1,35 @@ +yosys -import +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} +yosys -import ;# ingest plugin commands + +read_verilog dsp_mult.v +design -save read + +set TOP "mult_16x16" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_20x18x64 + +set TOP "mult_20x18" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_20x18x64 + +set TOP "mult_8x8" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_10x9x32 + +set TOP "mult_10x9" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_10x9x32 + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v new file mode 100644 index 000000000..9d09831f1 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v @@ -0,0 +1,39 @@ +module mult_16x16 ( + input wire [15:0] A, + input wire [15:0] B, + output wire [31:0] Z +); + + assign Z = A * B; + +endmodule + +module mult_20x18 ( + input wire [19:0] A, + input wire [17:0] B, + output wire [37:0] Z +); + + assign Z = A * B; + +endmodule + +module mult_8x8 ( + input wire [ 7:0] A, + input wire [ 7:0] B, + output wire [15:0] Z +); + + assign Z = A * B; + +endmodule + +module mult_10x9 ( + input wire [ 9:0] A, + input wire [ 8:0] B, + output wire [18:0] Z +); + + assign Z = A * B; + +endmodule From 8af9523e3cf3d08712efd297b8aa9dc8434bcf3d Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 4 Feb 2022 10:43:06 +0100 Subject: [PATCH 569/845] Initial pass scaffold plus rule parser Signed-off-by: Maciej Kurc --- Makefile | 2 +- dsp_ff-plugin/Makefile | 12 + dsp_ff-plugin/dsp_ff.cc | 601 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 614 insertions(+), 1 deletion(-) create mode 100644 dsp_ff-plugin/Makefile create mode 100644 dsp_ff-plugin/dsp_ff.cc diff --git a/Makefile b/Makefile index 801c6a265..9d3645059 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # # SPDX-License-Identifier:ISC -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf uhdm +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf uhdm 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)) diff --git a/dsp_ff-plugin/Makefile b/dsp_ff-plugin/Makefile new file mode 100644 index 000000000..8f90d4658 --- /dev/null +++ b/dsp_ff-plugin/Makefile @@ -0,0 +1,12 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + +NAME = dsp-ff +SOURCES = dsp_ff.cc + +include ../Makefile_plugin.common diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc new file mode 100644 index 000000000..738e42806 --- /dev/null +++ b/dsp_ff-plugin/dsp_ff.cc @@ -0,0 +1,601 @@ +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/sigtools.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +// ============================================================================ + +struct DspFF : public Pass { + + /// A structure identifying specific pin in a cell instance + struct CellPin { + RTLIL::Cell* cell; /// Cell pointer (nullptr for top-level ports) + RTLIL::IdString port; /// Port name + int bit; /// Bit index + + CellPin (RTLIL::Cell* _cell, + const RTLIL::IdString& _port, + int _bit = 0) : + cell(_cell), + port(_port), + bit (_bit) + {} + + CellPin (const CellPin& ref) = default; + CellPin (CellPin&& ref) = default; + + unsigned int hash () const { + unsigned int h = 0; + if (cell != nullptr) { + h = mkhash_add(h, cell->hash()); + } + h = mkhash_add(h, port.hash()); + h = mkhash_add(h, bit); + return h; + } + + bool operator == (const CellPin& ref) const { + return (cell == ref.cell) && + (port == ref.port) && + (bit == ref.bit); + } + }; + + // .......................................... + + struct FlopType { + RTLIL::IdString name; + + struct { + RTLIL::IdString clk; + RTLIL::IdString rst; + RTLIL::IdString ena; + RTLIL::IdString d; + RTLIL::IdString q; + } ports; + + struct { + std::vector matching; + dict required; + dict set; + dict map; + } params; + }; + + struct DspPortType { + RTLIL::IdString name; + + struct { + RTLIL::IdString clk; + RTLIL::IdString rst; + RTLIL::IdString ena; + } assoc; + + struct { + dict set; + dict map; + } params; + + dict connect; + }; + + struct DspType { + RTLIL::IdString name; + std::vector ports; + }; + + // .......................................... + + void load_rules(const std::string& a_FileName) { + + // Parses a vector of strings like "=" starting from the + // second one on the list + auto parseNameValue = [&](const std::vector& strs) { + const std::regex expr ("(\\S+)=(\\S+)"); + std::smatch match; + + std::vector> vec; + + for (size_t i=1; i dspTypes; + std::vector flopTypes; + + std::vector tok; + + // Parse the file + while (1) { + + // Get line + std::getline(file, line); + if (!file) { + break; + } + + // Strip comment if any, skip empty lines + size_t pos = line.find("#"); + if (pos != std::string::npos) { + line = line.substr(0, pos); + } + if (line.find_first_not_of(" \r\n\t") == std::string::npos) { + continue; + } + + // Split the line + const auto fields = get_fields(line); + log_assert(fields.size() >= 1); + + // DSP section + if (fields[0] == "dsp") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (!tok.empty()) { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + tok.push_back(fields[0]); + + dspTypes.resize(dspTypes.size() + 1);\ + dspTypes.back().name = RTLIL::escape_id(fields[1]); + } + else if (fields[0] == "enddsp") { + if (fields.size() != 1) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() != 1 || tok.back() != "dsp") { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + tok.pop_back(); + } + + // DSP port section + else if (fields[0] == "port") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() != 1 || tok.back() != "dsp") { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + tok.push_back(fields[0]); + + auto& ports = dspTypes.back().ports; + ports.resize(ports.size() + 1); + ports.back().name = RTLIL::escape_id(fields[1]); + } + else if (fields[0] == "endport") { + if (fields.size() != 1) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() != 2 || tok.back() != "port") { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + tok.pop_back(); + } + + // Flip-flop type section + else if (fields[0] == "ff") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (!tok.empty()) { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + tok.push_back(fields[0]); + + flopTypes.resize(flopTypes.size() + 1); + flopTypes.back().name = RTLIL::escape_id(fields[1]); + } + else if (fields[0] == "endff") { + if (fields.size() != 1) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() != 1 || tok.back() != "ff") { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + tok.pop_back(); + } + + // Signals + else if (fields[0] == "clk") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + // Associated clock + if (tok.back() == "port") { + auto& ports = dspTypes.back().ports; + ports.back().assoc.clk = RTLIL::escape_id(fields[1]); + } + else if (tok.back() == "ff") { + flopTypes.back().ports.clk = RTLIL::escape_id(fields[1]); + } + } + else if (fields[0] == "rst") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + // Associated reset + if (tok.back() == "port") { + auto& ports = dspTypes.back().ports; + ports.back().assoc.rst = RTLIL::escape_id(fields[1]); + } + else if (tok.back() == "ff") { + flopTypes.back().ports.rst = RTLIL::escape_id(fields[1]); + } + } + else if (fields[0] == "ena") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + // Associated enable + if (tok.back() == "port") { + auto& ports = dspTypes.back().ports; + ports.back().assoc.ena = RTLIL::escape_id(fields[1]); + } + else if (tok.back() == "ff") { + flopTypes.back().ports.ena = RTLIL::escape_id(fields[1]); + } + } + + else if (fields[0] == "d") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || tok.back() != "ff") { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + flopTypes.back().ports.d = RTLIL::escape_id(fields[1]); + } + else if (fields[0] == "q") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || tok.back() != "ff") { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + flopTypes.back().ports.q = RTLIL::escape_id(fields[1]); + } + + // Parameters to set + else if (fields[0] == "set") { + if (fields.size() < 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + const auto vec = parseNameValue(fields); + dict set; + for (const auto& it : vec) { + set.insert(std::make_pair( + RTLIL::escape_id(it.first), + RTLIL::Const(it.second) + )); + } + + if (tok.back() == "port") { + auto& ports = dspTypes.back().ports; + ports.back().params.set.swap(set); + } + else if (tok.back() == "ff") { + flopTypes.back().params.set.swap(set); + } + } + // Parameters to copy / map + else if (fields[0] == "map") { + if (fields.size() < 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + const auto vec = parseNameValue(fields); + dict map; + for (const auto& it : vec) { + map.insert(std::make_pair( + RTLIL::escape_id(it.first), + RTLIL::escape_id(it.second) + )); + } + + if (tok.back() == "port") { + auto& ports = dspTypes.back().ports; + ports.back().params.map.swap(map); + } + else if (tok.back() == "ff") { + flopTypes.back().params.map.swap(map); + } + } + // Connections to make + else if (fields[0] == "con") { + if (fields.size() < 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || tok.back() != "port") { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + const auto vec = parseNameValue(fields); + auto& ports = dspTypes.back().ports; + for (const auto& it : vec) { + ports.back().connect.insert(std::make_pair( + RTLIL::escape_id(it.first), + RTLIL::Const(it.second) + )); + } + } + + else { + log(" unexpected keyword '%s'\n", fields[0].c_str()); + } + } + + // Convert lists to maps + for (const auto& it : dspTypes) { + m_DspTypes.insert(std::make_pair(it.name, it)); + } + for (const auto& it : flopTypes) { + m_FlopTypes.insert(std::make_pair(it.name, it)); + } + } + + // TODO: make lambda + std::vector get_fields(const std::string& a_String, + const char a_Delim = ' ', + bool a_KeepEmpty = false) + { + std::vector fields; + std::stringstream ss(a_String); + + while (ss.good()) { + std::string field; + std::getline(ss, field, a_Delim); + if (!field.empty() || a_KeepEmpty) { + fields.push_back(field); + } + } + + return fields; + } + + void dump_rules() { + + // Dump DSP types + log("DSP types:\n"); + for (const auto& it : m_DspTypes) { + const auto& dsp = it.second; + log(" %s\n", dsp.name.c_str()); + + log(" ports:\n"); + for (const auto& port : dsp.ports) { + log(" %s.%s\n", dsp.name.c_str(), port.name.c_str()); + log(" clk: %s\n", !port.assoc.clk.empty() ? port.assoc.clk.c_str() : ""); + log(" rst: %s\n", !port.assoc.rst.empty() ? port.assoc.rst.c_str() : ""); + log(" ena: %s\n", !port.assoc.ena.empty() ? port.assoc.ena.c_str() : ""); + + if (!port.params.set.empty()) { + log(" set params:\n"); + for (const auto& it : port.params.set) { + log(" %s=%s\n", it.first.c_str(), it.second.decode_string().c_str()); + } + } + if (!port.params.map.empty()) { + log(" map params:\n"); + for (const auto& it : port.params.map) { + log(" %s=%s\n", it.first.c_str(), it.second.c_str()); + } + } + if (!port.connect.empty()) { + log(" connect ports:\n"); + for (const auto& it : port.connect) { + log(" %s.%s=%s\n", dsp.name.c_str(), it.first.c_str(), it.second.as_string().c_str()); + } + } + } + } + + // Dump flop types + log("Flip-flop types:\n"); + for (const auto& it : m_FlopTypes) { + const auto& ff = it.second; + log(" %s\n", ff.name.c_str()); + log(" clk: %s\n", !ff.ports.clk.empty() ? ff.ports.clk.c_str() : ""); + log(" rst: %s\n", !ff.ports.rst.empty() ? ff.ports.rst.c_str() : ""); + log(" ena: %s\n", !ff.ports.ena.empty() ? ff.ports.ena.c_str() : ""); + log(" d : %s\n", !ff.ports.d.empty() ? ff.ports.d.c_str() : ""); + log(" q : %s\n", !ff.ports.q.empty() ? ff.ports.q.c_str() : ""); + + if (!ff.params.set.empty()) { + log(" set params:\n"); + for (const auto& it : ff.params.set) { + log(" %s=%s\n", it.first.c_str(), it.second.decode_string().c_str()); + } + } + if (!ff.params.map.empty()) { + log(" map params:\n"); + for (const auto& it : ff.params.map) { + log(" %s=%s\n", it.first.c_str(), it.second.c_str()); + } + } + } + } + + // .......................................... + + /// Temporary SigBit to SigBit helper map. + SigMap m_SigMap; + /// Net map + dict m_NetMap; + + /// DSP types + dict m_DspTypes; + /// Flip-flop types + dict m_FlopTypes; + + // .......................................... + + DspFF() : + Pass("dsp_ff", "Integrates flip-flop into DSP blocks") + {} + + void help () override { + log("\n"); + log(" dsp_ff -rules [selection]\n"); + log("\n"); + log("Integrates flip-flops with DSP blocks and enables their internal registers.\n"); + log("\n"); + } + + void execute(std::vector a_Args, RTLIL::Design *a_Design) override + { + log_header(a_Design, "Executing DSP_FF pass.\n"); + + std::string rulesFile; + + // Parse args + size_t argidx; + for (argidx = 1; argidx < a_Args.size(); argidx++) { + if (a_Args[argidx] == "-rules" && (argidx + 1) < a_Args.size()) { + rulesFile = a_Args[++argidx]; + continue; + } + + break; + } + extra_args(a_Args, argidx, a_Design); + + // Check args + if (rulesFile.empty()) { + log_cmd_error("No rules file specified!"); + } + + // Load rules + load_rules(rulesFile); + if (log_force_debug) { + dump_rules(); + } + + // Process modules + for (auto module : a_Design->selected_modules()) { + + // Setup the SigMap + m_SigMap.clear(); + m_SigMap.set(module); + + } + + // Clear maps + m_SigMap.clear(); + } + +/* + pool getSinks (const CellPin& a_Driver) { + + auto module = a_Driver.cell->module; + pool sinks; + + // The driver has to be an output pin + if (!a_Driver.cell->output(a_Driver.port)) { + return sinks; + } + + // Get the driver sigbit + auto driverSigspec = a_Driver.cell->getPort(a_Driver.port); + auto driverSigbit = m_SigMap(driverSigspec.bits().at(a_Driver.bit)); + + // Look for connected sinks + for (auto cell : module->cells()) { + for (auto conn : cell->connections()) { + auto port = conn.first; + auto sigspec = conn.second; + + // Consider only sinks (inputs) + if (!cell->input(port)) { + continue; + } + + // Check all sigbits + auto sigbits = sigspec.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + // Got a sink pin of another cell + sigbit = m_SigMap(sigbit); + if (sigbit == driverSigbit) { + sinks.insert(CellPin(cell, port, bit)); + } + } + } + } + + // Look for connected top-level output ports + for (auto conn : module->connections()) { + auto dst = conn.first; + auto src = conn.second; + + auto sigbits = dst.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + if (!sigbit.wire->port_output) { + continue; + } + + sigbit = m_SigMap(sigbit); + if (sigbit == driverSigbit) { + sinks.insert(CellPin(nullptr, sigbit.wire->name, bit)); + } + } + } + + return sinks; + } +*/ + +} DspFF; + +PRIVATE_NAMESPACE_END + From fd808e4041c012251091ab44f0130b25bc99de91 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 7 Feb 2022 17:24:05 +0100 Subject: [PATCH 570/845] WIP integration of output-ffs into DSP cells Signed-off-by: Maciej Kurc --- dsp_ff-plugin/dsp_ff.cc | 566 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 530 insertions(+), 36 deletions(-) diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc index 738e42806..0bb4f1f13 100644 --- a/dsp_ff-plugin/dsp_ff.cc +++ b/dsp_ff-plugin/dsp_ff.cc @@ -45,39 +45,42 @@ struct DspFF : public Pass { // .......................................... + /// Describes a flip-flop type that can be integrated with a DSP cell struct FlopType { RTLIL::IdString name; - struct { - RTLIL::IdString clk; - RTLIL::IdString rst; - RTLIL::IdString ena; - RTLIL::IdString d; - RTLIL::IdString q; - } ports; + /// A dict of port names indexed by their functions (like "clk", "rst") + dict ports; struct { - std::vector matching; - dict required; - dict set; + /// A list of parameters that must match for all flip-flops + std::vector matching; + /// A dict of parameter values that must match for a flip-flop + dict required; + /// A dict of parameters to be set in the DSP cell after integration + dict set; + /// A dict of parameters to be mapped to the DSP cell after integration dict map; } params; }; + /// Describes a DSP cell port that has built-in register (flip-flops) struct DspPortType { RTLIL::IdString name; - struct { - RTLIL::IdString clk; - RTLIL::IdString rst; - RTLIL::IdString ena; - } assoc; + /// A dict of associated cell ports indexed by their function (like "clk, "rst") + /// along with the default value to connect when unused. + dict> assoc; struct { + /// A dict of parameters to be set in the cell after integration dict set; + /// A dict of parameters to be mapped to the cell after integration dict map; } params; + /// A list of ports to be connected to specific constants after flip-flop + /// integration. dict connect; }; @@ -88,6 +91,38 @@ struct DspFF : public Pass { // .......................................... + struct FlopData { + RTLIL::IdString type; + dict conns; + struct { + dict flop; + dict dsp; + } params; + + FlopData (const RTLIL::IdString& _type) : type(_type) {}; + + FlopData (const FlopData& ref) = default; + FlopData (FlopData&& ref) = default; + + unsigned int hash () const { + unsigned int h = 0; + h = mkhash_add(h, type.hash()); + h = mkhash_add(h, conns.hash()); + h = mkhash_add(h, params.flop.hash()); + h = mkhash_add(h, params.dsp.hash()); + return h; + } + + bool operator == (const FlopData& ref) const { + return (type == ref.type) && + (conns == ref.conns) && + (params.flop == ref.params.flop) && + (params.dsp == ref.params.dsp); + } + }; + + // .......................................... + void load_rules(const std::string& a_FileName) { // Parses a vector of strings like "=" starting from the @@ -181,6 +216,9 @@ struct DspFF : public Pass { auto& ports = dspTypes.back().ports; ports.resize(ports.size() + 1); ports.back().name = RTLIL::escape_id(fields[1]); + ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("clk"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("rst"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("ena"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); } else if (fields[0] == "endport") { if (fields.size() != 1) { @@ -204,6 +242,11 @@ struct DspFF : public Pass { flopTypes.resize(flopTypes.size() + 1); flopTypes.back().name = RTLIL::escape_id(fields[1]); + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("clk"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("rst"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("ena"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("d"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("q"), RTLIL::IdString())); } else if (fields[0] == "endff") { if (fields.size() != 1) { @@ -227,10 +270,10 @@ struct DspFF : public Pass { // Associated clock if (tok.back() == "port") { auto& ports = dspTypes.back().ports; - ports.back().assoc.clk = RTLIL::escape_id(fields[1]); + ports.back().assoc[RTLIL::escape_id("clk")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::S0); } else if (tok.back() == "ff") { - flopTypes.back().ports.clk = RTLIL::escape_id(fields[1]); + flopTypes.back().ports[RTLIL::escape_id("clk")] = RTLIL::escape_id(fields[1]); } } else if (fields[0] == "rst") { @@ -244,10 +287,10 @@ struct DspFF : public Pass { // Associated reset if (tok.back() == "port") { auto& ports = dspTypes.back().ports; - ports.back().assoc.rst = RTLIL::escape_id(fields[1]); + ports.back().assoc[RTLIL::escape_id("rst")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::S0); } else if (tok.back() == "ff") { - flopTypes.back().ports.rst = RTLIL::escape_id(fields[1]); + flopTypes.back().ports[RTLIL::escape_id("rst")] = RTLIL::escape_id(fields[1]); } } else if (fields[0] == "ena") { @@ -261,10 +304,10 @@ struct DspFF : public Pass { // Associated enable if (tok.back() == "port") { auto& ports = dspTypes.back().ports; - ports.back().assoc.ena = RTLIL::escape_id(fields[1]); + ports.back().assoc[RTLIL::escape_id("ena")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::S0); } else if (tok.back() == "ff") { - flopTypes.back().ports.ena = RTLIL::escape_id(fields[1]); + flopTypes.back().ports[RTLIL::escape_id("ena")] = RTLIL::escape_id(fields[1]); } } @@ -276,7 +319,7 @@ struct DspFF : public Pass { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } - flopTypes.back().ports.d = RTLIL::escape_id(fields[1]); + flopTypes.back().ports[RTLIL::escape_id("d")] = RTLIL::escape_id(fields[1]); } else if (fields[0] == "q") { if (fields.size() != 2) { @@ -286,7 +329,7 @@ struct DspFF : public Pass { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } - flopTypes.back().ports.q = RTLIL::escape_id(fields[1]); + flopTypes.back().ports[RTLIL::escape_id("q")] = RTLIL::escape_id(fields[1]); } // Parameters to set @@ -404,9 +447,9 @@ struct DspFF : public Pass { log(" ports:\n"); for (const auto& port : dsp.ports) { log(" %s.%s\n", dsp.name.c_str(), port.name.c_str()); - log(" clk: %s\n", !port.assoc.clk.empty() ? port.assoc.clk.c_str() : ""); - log(" rst: %s\n", !port.assoc.rst.empty() ? port.assoc.rst.c_str() : ""); - log(" ena: %s\n", !port.assoc.ena.empty() ? port.assoc.ena.c_str() : ""); + for (const auto& it : port.assoc) { + log(" %.3s: %s\n", it.first.c_str(), !it.second.first.empty() ? it.second.first.c_str() : ""); + } if (!port.params.set.empty()) { log(" set params:\n"); @@ -434,11 +477,10 @@ struct DspFF : public Pass { for (const auto& it : m_FlopTypes) { const auto& ff = it.second; log(" %s\n", ff.name.c_str()); - log(" clk: %s\n", !ff.ports.clk.empty() ? ff.ports.clk.c_str() : ""); - log(" rst: %s\n", !ff.ports.rst.empty() ? ff.ports.rst.c_str() : ""); - log(" ena: %s\n", !ff.ports.ena.empty() ? ff.ports.ena.c_str() : ""); - log(" d : %s\n", !ff.ports.d.empty() ? ff.ports.d.c_str() : ""); - log(" q : %s\n", !ff.ports.q.empty() ? ff.ports.q.c_str() : ""); + + for (const auto& it : ff.ports) { + log(" %.3s: %s\n", it.first.c_str(), !it.second.empty() ? it.second.c_str() : ""); + } if (!ff.params.set.empty()) { log(" set params:\n"); @@ -459,8 +501,10 @@ struct DspFF : public Pass { /// Temporary SigBit to SigBit helper map. SigMap m_SigMap; - /// Net map - dict m_NetMap; +// /// Net map +// dict m_NetMap; + /// Cells to be removed (per module!) + pool m_CellsToRemove; /// DSP types dict m_DspTypes; @@ -481,7 +525,7 @@ struct DspFF : public Pass { log("\n"); } - void execute(std::vector a_Args, RTLIL::Design *a_Design) override + void execute (std::vector a_Args, RTLIL::Design *a_Design) override { log_header(a_Design, "Executing DSP_FF pass.\n"); @@ -517,13 +561,464 @@ struct DspFF : public Pass { m_SigMap.clear(); m_SigMap.set(module); +// // Build the net map +// buildNetMap(module); + + // Look for DSP cells + for (auto cell : module->cells()) { + + // Not a DSP + if (!m_DspTypes.count(cell->type)) { + continue; + } + + // Check ports + auto& rule = m_DspTypes.at(cell->type); + for (auto& portRule : rule.ports) { + + // Sanity check + if (!cell->hasPort(portRule.name)) { + log(" The DSP cell '%s' does not have a port named '%s'!\n", + cell->type.c_str(), portRule.name.c_str()); + continue; + } + + if (cell->input(portRule.name)) { + processInputPort(cell, portRule); + } + else if (cell->output(portRule.name)) { + processOutputPort(cell, portRule); + } + else { + log(" The port '%s.%s' is neither input nor output!\n", + cell->type.c_str(), portRule.name.c_str()); + continue; + } + } + } + + // Remove cells + for (const auto& cell : m_CellsToRemove) { + module->remove(cell); + } + m_CellsToRemove.clear(); } // Clear maps m_SigMap.clear(); } -/* + // .......................................... + +// void buildNetMap (RTLIL::Module* a_Module) { +// // TODO: +// } + + bool checkDspPort (RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { + bool isOk = true; + + // The cell parameters must not be set + for (const auto& it : a_PortRule.params.set) { + const auto curr = a_Cell->getParam(it.first); + if (curr == it.second) { + log_debug(" the param '%s' is already set to '%s'\n", + it.first.c_str(), it.second.decode_string().c_str()); + isOk = false; + } + } + + return isOk; + } + + bool checkFlop (RTLIL::Cell* a_Cell) { + const auto& flopType = m_FlopTypes.at(a_Cell->type); + bool isOk = true; + + log_debug(" Checking connected flip-flop '%s' of type '%s'... ", + a_Cell->name.c_str(), a_Cell->type.c_str()); + + // Check if required parameters are set as they should be + for (const auto& it : flopType.params.required) { + const auto curr = a_Cell->getParam(it.first); + if (curr != it.second) { + log_debug("\n param '%s' mismatch ('%s' instead of '%s')", + it.first.c_str(), curr.decode_string().c_str(), it.second.decode_string().c_str()); + isOk = false; + } + } + + if (isOk) { + log_debug("Ok\n"); + } else { + log_debug("\n"); + } + return isOk; + } + +/* + bool checkFlopDataAgainstDspPort (const FlopData& a_FlopData, + RTLIL::Cell* a_Cell, + const DspPortType& a_PortRule) + { + const auto& flopType = m_FlopTypes.at(a_FlopData.type); + bool isOk = true; + + log_debug(" Checking connected flip-flop settings against the DSP port... "); + + // Check control signal connections + for (const auto& it : a_PortRule.assoc) { + const auto& key = it.first; + const auto& port = it.second; + + SigBit conn(RTLIL::Sx); + if (!port.empty() && a_Cell->hasPort(port)) { + auto sigspec = a_Cell->getPort(port); + auto sigbits = sigspec.bits(); + log_assert(sigbits.size() <= 1); + if (!sigbits.empty()) { + conn = m_SigMap(sigbits[0]); + } + } + + if (conn.is_wire() || (!conn.is_wire() && conn.data != RTLIL::Sx)) { + if (conn != a_FlopData.conns.at(key)) { + log_debug("\n connection to port '%s' mismatch", port.c_str()); + isOk = false; + } + } + } + + // Check parameters to be set (by the port rule) + for (const auto& it : a_PortRule.params.set) { + if (a_Cell->hasParam(it.first)) { + const auto curr = a_Cell->getParam(it.first); + if (curr != it.second) { + log_debug("\n the param '%s' mismatch ('%s' instead of '%s')", + it.first.c_str(), curr.decode_string().c_str(), + it.second.decode_string().c_str()); + isOk = false; + } + } + } + + // Check parameters to be mapped (by the port rule) + for (const auto& it : a_PortRule.params.map) { + if (a_Cell->hasParam(it.first) && a_FlopData.params.count(it.second)) { + const auto curr = a_Cell->getParam(it.first); + const auto flop = a_FlopData.params.at(it.second); + if (curr != flop) { + log_debug("\n the param '%s' mismatch ('%s' instead of '%s')", + it.first.c_str(), curr.decode_string().c_str(), + flop.decode_string().c_str()); + isOk = false; + } + } + } + +// // Check parameters to be set (by the flip-flop type) +// for (const auto& it : flopType.params.set) { +// const auto curr = a_Cell->getParam(it.first); +// if (curr == it.second) { +// log_debug("\n the param '%s' is already set to '%s'", +// it.first.c_str(), it.second.decode_string().c_str()); +// isOk = false; +// } +// } + + if (isOk) { + log_debug("Ok\n"); + } else { + log_debug("\n"); + } + return isOk; + } +*/ + + static std::string sigBitName (const RTLIL::SigBit& a_SigBit) { + if (a_SigBit.is_wire()) { + RTLIL::Wire* w = a_SigBit.wire; + return RTLIL::unescape_id(w->name); + } else { + switch (a_SigBit.data) + { + case RTLIL::State::S0: return "1'b0"; + case RTLIL::State::S1: return "1'b1"; + case RTLIL::State::Sx: return "1'bx"; + case RTLIL::State::Sz: return "1'bz"; + case RTLIL::State::Sa: return "-"; + case RTLIL::State::Sm: return "m"; + } + return "?"; + } + } + + // .......................................... + + void processInputPort (RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { + + log_debug(" Attempting flip-flop integration for %s.%s of %s\n", + a_Cell->type.c_str(), a_PortRule.name.c_str(), a_Cell->name.c_str()); + + // TODO + log_debug(" TODO: An input port\n"); + } + + void processOutputPort (RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { + + log_debug(" Attempting flip-flop integration for %s.%s of %s\n", + a_Cell->type.c_str(), a_PortRule.name.c_str(), a_Cell->name.c_str()); + + // Check if the port can be used for FF integration + if (!checkDspPort(a_Cell, a_PortRule)) { + log_debug(" port check failed\n"); + return; + } + + // Get port connections + auto sigspec = a_Cell->getPort(a_PortRule.name); + auto sigbits = sigspec.bits(); + + // Collect flip-flops, identify their group count + dict groups; + + std::vector> flops + (sigbits.size(), std::make_pair(nullptr, -1)); + + for (size_t i=0; i 1) { + log_debug(" multiple sinks found, cannot integrate.\n"); + return; + } + + // No sinks - output unconnected + if (sinks.empty()) { + continue; + } + + // Get the sink, check if this is a flip-flop + auto& sink = *sinks.begin(); + auto* flop = sink.cell; + if (flop == nullptr || !m_FlopTypes.count(flop->type)) { + continue; + } + + // Must not have the "keep" attribute + if (flop->has_keep_attr()) { + continue; + } + + // Check if the connection goes to the data input port + const auto& flopType = m_FlopTypes.at(flop->type); + if (flopType.ports.at(RTLIL::escape_id("d")) != sink.port) { + continue; + } + + // Skip if the flip-flop is going to be removed + if (m_CellsToRemove.count(flop)) { + continue; + } + + // Check the flip-flop + if (!checkFlop(flop)) { + continue; + } + + // Get parameters to be mapped to the DSP according to the port + // rule. + dict mappedParams; + for (const auto& it : a_PortRule.params.map) { + if (flop->hasParam(it.second)) { + const auto& value = flop->getParam(it.second); + mappedParams.insert(std::make_pair(it.first, value)); + } + } + + // Store the flop and its data + auto res = groups.insert( + std::make_pair(getFlopData(flop, mappedParams),groups.size()) + ); + flops[i] = std::make_pair(flop, res.first->second); + } + + // No matching flip-flop groups + if (groups.empty()) { + log_debug(" no matching flip-flops found\n"); + return; + } + + // Do not allow more than a single group + if (groups.size() != 1) { + log_debug(" %zu flip-flop groups, only a single one allowed\n", groups.size()); + return; + } + + // Validate the flip flop data agains the DSP cell + const auto& flopData = groups.begin()->first; + const auto& flopType = m_FlopTypes.at(flopData.type); +// if (!checkFlopDataAgainstDspPort(flopData, a_Cell, a_PortRule)) { +// log_debug(" flip-flop vs. DSP check failed\n"); +// return; +// } + + // Debug log + log(" %s %s.%s\n", a_Cell->type.c_str(), a_Cell->name.c_str(), a_PortRule.name.c_str()); + for (size_t i=0; itype.c_str(), flops[i].first->name.c_str()); + } + else { + log_debug(" %2zu. None\n", i); + } + } + + // Reconnect data signals, mark the flip-flop for removal + for (size_t i=0; ihasPort(port)) { + log_error(" cell '%s' does not have port '%s'!\n", + flop->type.c_str(), port.c_str()); + } + + sigbits[i] = SigBit(RTLIL::Sx); + auto sigspec = flop->getPort(port); + log_assert(sigspec.bits().size() <= 1); + if (sigspec.bits().size() == 1) { + sigbits[i] = sigspec.bits()[0]; + } + + m_CellsToRemove.insert(flop); + } + a_Cell->setPort(a_PortRule.name, RTLIL::SigSpec(sigbits)); + + // Reconnect (map) control signals. Connect the default value if + // a particular signal is not present in the flip-flop. + for (const auto& it : a_PortRule.assoc) { + const auto& key = it.first; + const auto& port = it.second.first; + + auto conn = RTLIL::SigBit(it.second.second); + if (flopData.conns.count(key)) { + conn = flopData.conns.at(key); + } + + log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), + port.c_str(), sigBitName(conn).c_str()); + a_Cell->setPort(port, conn); + } + + // Connect control signals according to DSP port rule + for (const auto& it : a_PortRule.connect) { + log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), + it.first.c_str(), it.second.as_string().c_str()); + a_Cell->setPort(it.first, it.second); + } + + // Map parameters (port rule) + for (const auto& it : a_PortRule.params.map) { + if (flopData.params.dsp.count(it.second)) { + const auto& param = flopData.params.dsp.at(it.second); + log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); + a_Cell->setParam(it.first, param); + } + } + + // Map parameters (flip-flop rule) + for (const auto& it : flopType.params.map) { + if (flopData.params.dsp.count(it.second)) { + const auto& param = flopData.params.dsp.at(it.second); + log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); + a_Cell->setParam(it.first, param); + } + } + + // Set parameters (port rule) + for (const auto& it : a_PortRule.params.set) { + log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); + a_Cell->setParam(it.first, it.second); + } + + // Set parameters (flip-flop rule) + for (const auto& it : flopType.params.set) { + log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); + a_Cell->setParam(it.first, it.second); + } + } + + // .......................................... + + /// Collects flip-flop connectivity data and parameters which defines the + /// group it belongs to. + FlopData getFlopData (RTLIL::Cell* a_Cell, + const dict& a_ExtraParams) + { + FlopData data (a_Cell->type); + + log_assert(m_FlopTypes.count(a_Cell->type) != 0); + const auto& flopType = m_FlopTypes.at(a_Cell->type); + + // Gather connections to control ports + for (const auto& it : flopType.ports) { + + // Skip "D" and "Q" as they connection will always differ. + if (it.first == RTLIL::escape_id("d") || + it.first == RTLIL::escape_id("q")) + { + continue; + } + + if (!it.second.empty() && a_Cell->hasPort(it.second)) { + auto sigspec = a_Cell->getPort(it.second); + auto sigbits = sigspec.bits(); + log_assert(sigbits.size() <= 1); + if (!sigbits.empty()) { + data.conns[it.first] = m_SigMap(sigbits[0]); + } + } + } + + // Gather flip-flop parameters that need to match + for (const auto& it : flopType.params.matching) { + log_assert(a_Cell->hasParam(it)); + data.params.flop.insert(std::make_pair(it, a_Cell->getParam(it))); + } + + // Gather flip-flop parameters to be mapped to the DSP as well + for (const auto& it : flopType.params.map) { + log_assert(a_Cell->hasParam(it.second)); + data.params.flop.insert(std::make_pair(it.second, a_Cell->getParam(it.second))); + } + + // Gather DSP parameters and their values to be set to too + for (const auto& it : flopType.params.set) { + data.params.dsp.insert(it); + } + + // Append extra DSP parameters + for (const auto& it : a_ExtraParams) { + data.params.dsp.insert(it); + } + + return data; + } + + /// Retrieves a list of sinks driven by the given cell pin. + /// TODO: This is slow, need to make a lookup for that. pool getSinks (const CellPin& a_Driver) { auto module = a_Driver.cell->module; @@ -593,7 +1088,6 @@ struct DspFF : public Pass { return sinks; } -*/ } DspFF; From e87e170ba9c239b9855a5b95878600a09e0b9596 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 9 Feb 2022 13:51:51 +0100 Subject: [PATCH 571/845] First working version of the pass Signed-off-by: Maciej Kurc --- dsp_ff-plugin/dsp_ff.cc | 268 +++++++++++++++++++++++++++++----------- 1 file changed, 197 insertions(+), 71 deletions(-) diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc index 0bb4f1f13..952c0ddc2 100644 --- a/dsp_ff-plugin/dsp_ff.cc +++ b/dsp_ff-plugin/dsp_ff.cc @@ -41,6 +41,22 @@ struct DspFF : public Pass { (port == ref.port) && (bit == ref.bit); } + + std::string as_string () const { + if (cell != nullptr) { + return stringf("%s.%s[%d]", + RTLIL::unescape_id(cell->name).c_str(), + RTLIL::unescape_id(port).c_str(), + bit + ); + } + else { + return stringf("%s[%d]", + RTLIL::unescape_id(port).c_str(), + bit + ); + } + } }; // .......................................... @@ -84,11 +100,20 @@ struct DspFF : public Pass { dict connect; }; + /// Describes a DSP cell type struct DspType { RTLIL::IdString name; + + /// A list of data ports with registers std::vector ports; }; + /// Describes a changes made to a DSP cell + struct DspChanges { + pool params; // Modified params + pool conns; // Altered connections (ports) + }; + // .......................................... struct FlopData { @@ -505,6 +530,8 @@ struct DspFF : public Pass { // dict m_NetMap; /// Cells to be removed (per module!) pool m_CellsToRemove; + /// DSP cells that got changed + dict m_DspChanges; /// DSP types dict m_DspTypes; @@ -583,17 +610,7 @@ struct DspFF : public Pass { continue; } - if (cell->input(portRule.name)) { - processInputPort(cell, portRule); - } - else if (cell->output(portRule.name)) { - processOutputPort(cell, portRule); - } - else { - log(" The port '%s.%s' is neither input nor output!\n", - cell->type.c_str(), portRule.name.c_str()); - continue; - } + processPort(cell, portRule); } } @@ -655,12 +672,13 @@ struct DspFF : public Pass { return isOk; } -/* + bool checkFlopDataAgainstDspPort (const FlopData& a_FlopData, RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { const auto& flopType = m_FlopTypes.at(a_FlopData.type); + const auto& changes = m_DspChanges[a_Cell]; bool isOk = true; log_debug(" Checking connected flip-flop settings against the DSP port... "); @@ -668,7 +686,7 @@ struct DspFF : public Pass { // Check control signal connections for (const auto& it : a_PortRule.assoc) { const auto& key = it.first; - const auto& port = it.second; + const auto& port = it.second.first; SigBit conn(RTLIL::Sx); if (!port.empty() && a_Cell->hasPort(port)) { @@ -688,43 +706,54 @@ struct DspFF : public Pass { } } + auto checkParam = [&](const RTLIL::IdString& name, + const RTLIL::Const& curr, + const RTLIL::Const& next) + { + if (curr != next && changes.params.count(name)) { + log_debug("\n the param '%s' mismatch ('%s' instead of '%s')", + name.c_str(), curr.decode_string().c_str(), + next.decode_string().c_str()); + isOk = false; + return false; + } + return true; + }; + + // Check parameters to be mapped (by the port rule) + for (const auto& it : a_PortRule.params.map) { + if (a_Cell->hasParam(it.first) && a_FlopData.params.dsp.count(it.second)) { + const auto curr = a_Cell->getParam(it.first); + const auto flop = a_FlopData.params.dsp.at(it.second); + checkParam(it.first, curr, flop); + } + } + // Check parameters to be set (by the port rule) for (const auto& it : a_PortRule.params.set) { if (a_Cell->hasParam(it.first)) { const auto curr = a_Cell->getParam(it.first); - if (curr != it.second) { - log_debug("\n the param '%s' mismatch ('%s' instead of '%s')", - it.first.c_str(), curr.decode_string().c_str(), - it.second.decode_string().c_str()); - isOk = false; - } + checkParam(it.first, curr, it.second); + } + } + + // Check parameters to be mapped (by the flip-flop rule) + for (const auto& it : flopType.params.map) { + if (a_Cell->hasParam(it.first) && a_FlopData.params.dsp.count(it.second)) { + const auto curr = a_Cell->getParam(it.first); + const auto flop = a_FlopData.params.dsp.at(it.second); + checkParam(it.first, curr, flop); } } - // Check parameters to be mapped (by the port rule) - for (const auto& it : a_PortRule.params.map) { - if (a_Cell->hasParam(it.first) && a_FlopData.params.count(it.second)) { + // Check parameters to be set (by the flip-flop rule) + for (const auto& it : flopType.params.set) { + if (a_Cell->hasParam(it.first)) { const auto curr = a_Cell->getParam(it.first); - const auto flop = a_FlopData.params.at(it.second); - if (curr != flop) { - log_debug("\n the param '%s' mismatch ('%s' instead of '%s')", - it.first.c_str(), curr.decode_string().c_str(), - flop.decode_string().c_str()); - isOk = false; - } + checkParam(it.first, curr, it.second); } } -// // Check parameters to be set (by the flip-flop type) -// for (const auto& it : flopType.params.set) { -// const auto curr = a_Cell->getParam(it.first); -// if (curr == it.second) { -// log_debug("\n the param '%s' is already set to '%s'", -// it.first.c_str(), it.second.decode_string().c_str()); -// isOk = false; -// } -// } - if (isOk) { log_debug("Ok\n"); } else { @@ -732,7 +761,6 @@ struct DspFF : public Pass { } return isOk; } -*/ static std::string sigBitName (const RTLIL::SigBit& a_SigBit) { if (a_SigBit.is_wire()) { @@ -754,16 +782,7 @@ struct DspFF : public Pass { // .......................................... - void processInputPort (RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { - - log_debug(" Attempting flip-flop integration for %s.%s of %s\n", - a_Cell->type.c_str(), a_PortRule.name.c_str(), a_Cell->name.c_str()); - - // TODO - log_debug(" TODO: An input port\n"); - } - - void processOutputPort (RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { + void processPort (RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { log_debug(" Attempting flip-flop integration for %s.%s of %s\n", a_Cell->type.c_str(), a_PortRule.name.c_str(), a_Cell->name.c_str()); @@ -790,22 +809,42 @@ struct DspFF : public Pass { continue; } + log_assert(a_Cell->output(a_PortRule.name) || a_Cell->input(a_PortRule.name)); + + pool others; + // Get sinks(s), discard the port completely if more than one sink // is found. - auto sinks = getSinks(CellPin(a_Cell, a_PortRule.name, i)); - if (sinks.size() > 1) { - log_debug(" multiple sinks found, cannot integrate.\n"); - return; + if (a_Cell->output(a_PortRule.name)) { + others = getSinks(CellPin(a_Cell, a_PortRule.name, i)); + if (others.size() > 1) { + log_debug(" multiple sinks found, cannot integrate.\n"); + return; + } + } + // Get driver. Discard if the driver drives something else too + // TODO: This is slow - we are first looking for a driver and then + // for all its sinks. + else if (a_Cell->input(a_PortRule.name)) { + auto driver = getDriver(CellPin(a_Cell, a_PortRule.name, i)); + if (driver.cell != nullptr) { + auto sinks = getSinks(driver); + if (sinks.size() > 1) { + log_debug(" multiple sinks found, cannot integrate.\n"); + return; + } + } + others.insert(driver); } - // No sinks - output unconnected - if (sinks.empty()) { + // No others - unconnected + if (others.empty()) { continue; } // Get the sink, check if this is a flip-flop - auto& sink = *sinks.begin(); - auto* flop = sink.cell; + auto& other = *others.begin(); + auto* flop = other.cell; if (flop == nullptr || !m_FlopTypes.count(flop->type)) { continue; } @@ -815,10 +854,17 @@ struct DspFF : public Pass { continue; } - // Check if the connection goes to the data input port + // Check if the connection goes to the data input/output port const auto& flopType = m_FlopTypes.at(flop->type); - if (flopType.ports.at(RTLIL::escape_id("d")) != sink.port) { - continue; + if (a_Cell->output(a_PortRule.name)) { + if (flopType.ports.at(RTLIL::escape_id("d")) != other.port) { + continue; + } + } + else if (a_Cell->input(a_PortRule.name)) { + if (flopType.ports.at(RTLIL::escape_id("q")) != other.port) { + continue; + } } // Skip if the flip-flop is going to be removed @@ -862,11 +908,10 @@ struct DspFF : public Pass { // Validate the flip flop data agains the DSP cell const auto& flopData = groups.begin()->first; - const auto& flopType = m_FlopTypes.at(flopData.type); -// if (!checkFlopDataAgainstDspPort(flopData, a_Cell, a_PortRule)) { -// log_debug(" flip-flop vs. DSP check failed\n"); -// return; -// } + if (!checkFlopDataAgainstDspPort(flopData, a_Cell, a_PortRule)) { + log_debug(" flip-flop vs. DSP check failed\n"); + return; + } // Debug log log(" %s %s.%s\n", a_Cell->type.c_str(), a_Cell->name.c_str(), a_PortRule.name.c_str()); @@ -882,6 +927,7 @@ struct DspFF : public Pass { } // Reconnect data signals, mark the flip-flop for removal + const auto& flopType = m_FlopTypes.at(flopData.type); for (size_t i=0; ioutput(a_PortRule.name)) { + port = flopType.ports.at(RTLIL::escape_id("q")); + } + else if (a_Cell->input(a_PortRule.name)) { + port = flopType.ports.at(RTLIL::escape_id("d")); + } + if (!flop->hasPort(port)) { log_error(" cell '%s' does not have port '%s'!\n", flop->type.c_str(), port.c_str()); @@ -920,6 +973,7 @@ struct DspFF : public Pass { log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), port.c_str(), sigBitName(conn).c_str()); a_Cell->setPort(port, conn); + m_DspChanges[a_Cell].conns.insert(port); } // Connect control signals according to DSP port rule @@ -927,6 +981,7 @@ struct DspFF : public Pass { log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), it.first.c_str(), it.second.as_string().c_str()); a_Cell->setPort(it.first, it.second); + m_DspChanges[a_Cell].conns.insert(it.first); } // Map parameters (port rule) @@ -935,6 +990,7 @@ struct DspFF : public Pass { const auto& param = flopData.params.dsp.at(it.second); log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); a_Cell->setParam(it.first, param); + m_DspChanges[a_Cell].params.insert(it.first); } } @@ -944,6 +1000,7 @@ struct DspFF : public Pass { const auto& param = flopData.params.dsp.at(it.second); log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); a_Cell->setParam(it.first, param); + m_DspChanges[a_Cell].params.insert(it.first); } } @@ -951,12 +1008,14 @@ struct DspFF : public Pass { for (const auto& it : a_PortRule.params.set) { log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); a_Cell->setParam(it.first, it.second); + m_DspChanges[a_Cell].params.insert(it.first); } // Set parameters (flip-flop rule) for (const auto& it : flopType.params.set) { log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); a_Cell->setParam(it.first, it.second); + m_DspChanges[a_Cell].params.insert(it.first); } } @@ -1025,13 +1084,11 @@ struct DspFF : public Pass { pool sinks; // The driver has to be an output pin - if (!a_Driver.cell->output(a_Driver.port)) { - return sinks; - } + log_assert(a_Driver.cell->output(a_Driver.port)); // Get the driver sigbit auto driverSigspec = a_Driver.cell->getPort(a_Driver.port); - auto driverSigbit = m_SigMap(driverSigspec.bits().at(a_Driver.bit)); + auto driverSigbit = m_SigMap(driverSigspec.bits().at(a_Driver.bit)); // Look for connected sinks for (auto cell : module->cells()) { @@ -1089,6 +1146,75 @@ struct DspFF : public Pass { return sinks; } + /// Finds a driver for the given cell pin + /// TODO: This is slow, need to make a lookup for that. + CellPin getDriver (const CellPin& a_Sink) { + auto module = a_Sink.cell->module; + + // The sink has to be an input pin + log_assert(a_Sink.cell->input(a_Sink.port)); + + // Get the sink sigbit + auto sinkSigspec = a_Sink.cell->getPort(a_Sink.port); + auto sinkSigbit = m_SigMap(sinkSigspec.bits().at(a_Sink.bit)); + + // Look for connected top-level input ports + for (auto conn : module->connections()) { + auto dst = conn.first; + auto src = conn.second; + + auto sigbits = dst.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + if (!sigbit.wire->port_input) { + continue; + } + + sigbit = m_SigMap(sigbit); + if (sigbit == sinkSigbit) { + CellPin(nullptr, sigbit.wire->name, bit); + } + } + } + + // Look for the driver among cells + for (auto cell : module->cells()) { + for (auto conn : cell->connections()) { + auto port = conn.first; + auto sigspec = conn.second; + + // Consider only outputs + if (!cell->output(port)) { + continue; + } + + // Check all sigbits + auto sigbits = sigspec.bits(); + for (size_t bit = 0; bit < sigbits.size(); ++bit) { + + auto sigbit = sigbits[bit]; + if (!sigbit.wire) { + continue; + } + + // Got a driver pin of another cell + sigbit = m_SigMap(sigbit); + if (sigbit == sinkSigbit) { + return CellPin(cell, port, bit); + } + } + } + } + + // No driver found + return CellPin(nullptr, RTLIL::IdString(), -1); + } + } DspFF; PRIVATE_NAMESPACE_END From 29c9ed0b445442fc237086b6b006989b9816acc0 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 9 Feb 2022 14:14:26 +0100 Subject: [PATCH 572/845] Support for default connection for a DSP control port in case a flip-flop does not have matching one. Signed-off-by: Maciej Kurc --- dsp_ff-plugin/dsp_ff.cc | 89 +++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc index 952c0ddc2..e88af2073 100644 --- a/dsp_ff-plugin/dsp_ff.cc +++ b/dsp_ff-plugin/dsp_ff.cc @@ -86,7 +86,7 @@ struct DspFF : public Pass { /// A dict of associated cell ports indexed by their function (like "clk, "rst") /// along with the default value to connect when unused. - dict> assoc; + dict> assoc; struct { /// A dict of parameters to be set in the cell after integration @@ -116,6 +116,7 @@ struct DspFF : public Pass { // .......................................... + /// Describes unique flip-flop configuration that is exclusive. struct FlopData { RTLIL::IdString type; dict conns; @@ -148,8 +149,29 @@ struct DspFF : public Pass { // .......................................... + /// Loads FF and DSP integration rules from a file void load_rules(const std::string& a_FileName) { + // Parses a string and returns a vector of fields delimited by the + // given character. + auto getFields = [](const std::string& a_String, + const char a_Delim = ' ', + bool a_KeepEmpty = false) + { + std::vector fields; + std::stringstream ss(a_String); + + while (ss.good()) { + std::string field; + std::getline(ss, field, a_Delim); + if (!field.empty() || a_KeepEmpty) { + fields.push_back(field); + } + } + + return fields; + }; + // Parses a vector of strings like "=" starting from the // second one on the list auto parseNameValue = [&](const std::vector& strs) { @@ -202,7 +224,7 @@ struct DspFF : public Pass { } // Split the line - const auto fields = get_fields(line); + const auto fields = getFields(line); log_assert(fields.size() >= 1); // DSP section @@ -285,53 +307,71 @@ struct DspFF : public Pass { // Signals else if (fields[0] == "clk") { - if (fields.size() != 2) { - log_error(" syntax error: '%s'\n", line.c_str()); - } if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } // Associated clock if (tok.back() == "port") { + if (fields.size() != 3) { + log_error(" syntax error: '%s'\n", line.c_str()); + } auto& ports = dspTypes.back().ports; - ports.back().assoc[RTLIL::escape_id("clk")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::S0); + ports.back().assoc[RTLIL::escape_id("clk")] = std::make_pair( + RTLIL::escape_id(fields[1]), + RTLIL::Const::from_string(fields[2]) + ); } else if (tok.back() == "ff") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } flopTypes.back().ports[RTLIL::escape_id("clk")] = RTLIL::escape_id(fields[1]); } } else if (fields[0] == "rst") { - if (fields.size() != 2) { - log_error(" syntax error: '%s'\n", line.c_str()); - } if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } // Associated reset if (tok.back() == "port") { + if (fields.size() != 3) { + log_error(" syntax error: '%s'\n", line.c_str()); + } auto& ports = dspTypes.back().ports; - ports.back().assoc[RTLIL::escape_id("rst")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::S0); + ports.back().assoc[RTLIL::escape_id("rst")] = std::make_pair( + RTLIL::escape_id(fields[1]), + RTLIL::Const::from_string(fields[2]) + ); } else if (tok.back() == "ff") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } flopTypes.back().ports[RTLIL::escape_id("rst")] = RTLIL::escape_id(fields[1]); } } else if (fields[0] == "ena") { - if (fields.size() != 2) { - log_error(" syntax error: '%s'\n", line.c_str()); - } if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } // Associated enable if (tok.back() == "port") { + if (fields.size() != 3) { + log_error(" syntax error: '%s'\n", line.c_str()); + } auto& ports = dspTypes.back().ports; - ports.back().assoc[RTLIL::escape_id("ena")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::S0); + ports.back().assoc[RTLIL::escape_id("ena")] = std::make_pair( + RTLIL::escape_id(fields[1]), + RTLIL::Const::from_string(fields[2]) + ); } else if (tok.back() == "ff") { + if (fields.size() != 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } flopTypes.back().ports[RTLIL::escape_id("ena")] = RTLIL::escape_id(fields[1]); } } @@ -442,25 +482,6 @@ struct DspFF : public Pass { } } - // TODO: make lambda - std::vector get_fields(const std::string& a_String, - const char a_Delim = ' ', - bool a_KeepEmpty = false) - { - std::vector fields; - std::stringstream ss(a_String); - - while (ss.good()) { - std::string field; - std::getline(ss, field, a_Delim); - if (!field.empty() || a_KeepEmpty) { - fields.push_back(field); - } - } - - return fields; - } - void dump_rules() { // Dump DSP types @@ -965,7 +986,7 @@ struct DspFF : public Pass { const auto& key = it.first; const auto& port = it.second.first; - auto conn = RTLIL::SigBit(it.second.second); + auto conn = RTLIL::SigBit(RTLIL::SigChunk(it.second.second)); if (flopData.conns.count(key)) { conn = flopData.conns.at(key); } From 900de1f1e65784a942e66353b66a494711808ae4 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 9 Feb 2022 14:45:40 +0100 Subject: [PATCH 573/845] Fixed bugs in flip-flop feasibility checking Signed-off-by: Maciej Kurc --- dsp_ff-plugin/dsp_ff.cc | 51 ++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc index e88af2073..c556a73c6 100644 --- a/dsp_ff-plugin/dsp_ff.cc +++ b/dsp_ff-plugin/dsp_ff.cc @@ -675,6 +675,12 @@ struct DspFF : public Pass { log_debug(" Checking connected flip-flop '%s' of type '%s'... ", a_Cell->name.c_str(), a_Cell->type.c_str()); + // Must not have the "keep" attribute + if (a_Cell->has_keep_attr()) { + log_debug("\n the 'keep' attribute is set"); + isOk = false; + } + // Check if required parameters are set as they should be for (const auto& it : flopType.params.required) { const auto curr = a_Cell->getParam(it.first); @@ -866,36 +872,39 @@ struct DspFF : public Pass { // Get the sink, check if this is a flip-flop auto& other = *others.begin(); auto* flop = other.cell; - if (flop == nullptr || !m_FlopTypes.count(flop->type)) { - continue; + + if (flop == nullptr) { + if (!other.port.empty()) { + log_debug(" port connection reaches outside of the module, cannot integrate\n"); + return; + } else { + continue; + } } - // Must not have the "keep" attribute - if (flop->has_keep_attr()) { - continue; + if (!m_FlopTypes.count(flop->type)) { + log_debug(" non-flip-flop connected, cannot integrate\n"); + return; } // Check if the connection goes to the data input/output port const auto& flopType = m_FlopTypes.at(flop->type); + RTLIL::IdString flopPort; if (a_Cell->output(a_PortRule.name)) { - if (flopType.ports.at(RTLIL::escape_id("d")) != other.port) { - continue; - } + flopPort = flopType.ports.at(RTLIL::escape_id("d")); } else if (a_Cell->input(a_PortRule.name)) { - if (flopType.ports.at(RTLIL::escape_id("q")) != other.port) { - continue; - } + flopPort = flopType.ports.at(RTLIL::escape_id("q")); } - // Skip if the flip-flop is going to be removed - if (m_CellsToRemove.count(flop)) { - continue; + if (flopPort != other.port) { + log_debug(" connection to non-data port of a flip-flip, cannot integrate\n"); + return; } - // Check the flip-flop + // Check the flip-flop configuration if (!checkFlop(flop)) { - continue; + return; } // Get parameters to be mapped to the DSP according to the port @@ -1113,6 +1122,11 @@ struct DspFF : public Pass { // Look for connected sinks for (auto cell : module->cells()) { + + if (m_CellsToRemove.count(cell)) { + continue; + } + for (auto conn : cell->connections()) { auto port = conn.first; auto sigspec = conn.second; @@ -1205,6 +1219,11 @@ struct DspFF : public Pass { // Look for the driver among cells for (auto cell : module->cells()) { + + if (m_CellsToRemove.count(cell)) { + continue; + } + for (auto conn : cell->connections()) { auto port = conn.first; auto sigspec = conn.second; From 1821737bcd83d099f0f4378385ac6dede597ad8e Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 9 Feb 2022 14:57:53 +0100 Subject: [PATCH 574/845] Added preliminary DSP and FF integration rules for the Nexus arch. Signed-off-by: Maciej Kurc --- dsp_ff-plugin/Makefile | 4 +++ dsp_ff-plugin/dsp_ff.cc | 1 + dsp_ff-plugin/nexus-dsp_rules.txt | 49 +++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 dsp_ff-plugin/nexus-dsp_rules.txt diff --git a/dsp_ff-plugin/Makefile b/dsp_ff-plugin/Makefile index 8f90d4658..3e59b3d17 100644 --- a/dsp_ff-plugin/Makefile +++ b/dsp_ff-plugin/Makefile @@ -10,3 +10,7 @@ NAME = dsp-ff SOURCES = dsp_ff.cc include ../Makefile_plugin.common + +install: + install -D nexus-dsp_rules.txt $(DATA_DIR)/nexus/dsp_rules.txt + diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc index c556a73c6..6daf9652e 100644 --- a/dsp_ff-plugin/dsp_ff.cc +++ b/dsp_ff-plugin/dsp_ff.cc @@ -597,6 +597,7 @@ struct DspFF : public Pass { } // Load rules + rewrite_filename(rulesFile); load_rules(rulesFile); if (log_force_debug) { dump_rules(); diff --git a/dsp_ff-plugin/nexus-dsp_rules.txt b/dsp_ff-plugin/nexus-dsp_rules.txt new file mode 100644 index 000000000..642f84701 --- /dev/null +++ b/dsp_ff-plugin/nexus-dsp_rules.txt @@ -0,0 +1,49 @@ +dsp MULT36X36 # 36x36 mode + port A + clk CLK 0 + rst RSTA 0 + ena CEA 1 + + set REGINPUTA=REGISTER + map GSR=GSR + endport + port B + clk CLK 0 + rst RSTB 0 + ena CEB 1 + + set REGINPUTB=REGISTER + map GSR=GSR + endport + port Z + clk CLK 0 + rst RSTOUT 0 + ena CEOUT 1 + + set REGOUTPUT=REGISTER + map GSR=GSR + endport +enddsp + +ff FD1P3DX + clk CK + rst CD + ena SP + d D + q Q + + match GSR + set RESETMODE=SYNC +endff + +ff FD1P3IX + clk CK + rst CD + ena SP + d D + q Q + + match GSR + set RESETMODE=ASYNC +endff + From 1d9bbe95873da45248e256f5d57571076b8e242e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Fri, 11 Feb 2022 13:24:49 +0100 Subject: [PATCH 575/845] Replace %h with %x in formatted strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 790debe8d..4ec48f616 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -3150,6 +3151,13 @@ void UhdmAst::process_sys_func_call() } }); + if (current_node->str == "\\$display" || current_node->str == "\\$write") { + // According to standard, %h and %x mean the same, but %h is currently unsupported by mainline yosys + std::string replaced_string = std::regex_replace(current_node->children[0]->str, std::regex("%[h|H]"), "%x"); + delete current_node->children[0]; + current_node->children[0] = AST::AstNode::mkconst_str(replaced_string); + } + std::string remove_backslash[] = {"\\$display", "\\$strobe", "\\$write", "\\$monitor", "\\$time", "\\$finish", "\\$stop", "\\$dumpfile", "\\$dumpvars", "\\$dumpon", "\\$dumpoff", "\\$dumpall"}; From 74be26e29b77527f064846d153b51c2318b3d493 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 13:38:14 +0100 Subject: [PATCH 576/845] DSP register inference rules for Nexus plus inference plugin enhancements Signed-off-by: Maciej Kurc --- dsp_ff-plugin/dsp_ff.cc | 132 ++++++++++++++++++++++++++---- dsp_ff-plugin/nexus-dsp_rules.txt | 123 +++++++++++++++++++++++++++- 2 files changed, 237 insertions(+), 18 deletions(-) diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc index 6daf9652e..11555f830 100644 --- a/dsp_ff-plugin/dsp_ff.cc +++ b/dsp_ff-plugin/dsp_ff.cc @@ -84,6 +84,9 @@ struct DspFF : public Pass { struct DspPortType { RTLIL::IdString name; + /// Range of port pins that have FFs (low to high, inclusive) + std::pair bits; + /// A dict of associated cell ports indexed by their function (like "clk, "rst") /// along with the default value to connect when unused. dict> assoc; @@ -192,6 +195,33 @@ struct DspFF : public Pass { return vec; }; + // Parses port name as "[:]" or just "" + auto parsePortName = [&](const std::string& str) { + const std::regex expr ("^(.*)\\[([0-9]+):([0-9]+)\\]"); + std::smatch match; + + std::tuple data; + auto res = std::regex_match(str, match, expr); + if (res) { + data = std::make_tuple( + std::string(match[1]), + std::stoi(match[2]), + std::stoi(match[3]) + ); + + if ((std::get<2>(data) > std::get<1>(data)) || + std::get<2>(data) < 0 || std::get<1>(data) < 0) + { + log_error(" invalid port spec: '%s'\n", str.c_str()); + } + } + else { + data = std::make_tuple(str, -1, -1); + } + + return data; + }; + std::ifstream file (a_FileName); std::string line; @@ -203,8 +233,10 @@ struct DspFF : public Pass { std::vector dspTypes; std::vector flopTypes; + std::vector dspAliases; + std::vector tok; - + // Parse the file while (1) { @@ -229,7 +261,7 @@ struct DspFF : public Pass { // DSP section if (fields[0] == "dsp") { - if (fields.size() != 2) { + if (fields.size() < 2) { log_error(" syntax error: '%s'\n", line.c_str()); } if (!tok.empty()) { @@ -239,6 +271,11 @@ struct DspFF : public Pass { dspTypes.resize(dspTypes.size() + 1);\ dspTypes.back().name = RTLIL::escape_id(fields[1]); + + dspAliases.clear(); + for (size_t i=2; i(spec)); + ports.back().bits = std::make_pair(std::get<2>(spec), std::get<1>(spec)); + ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("clk"), + std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("rst"), + std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("ena"), + std::make_pair(RTLIL::IdString(), RTLIL::Sx))); } else if (fields[0] == "endport") { if (fields.size() != 1) { @@ -289,11 +338,16 @@ struct DspFF : public Pass { flopTypes.resize(flopTypes.size() + 1); flopTypes.back().name = RTLIL::escape_id(fields[1]); - flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("clk"), RTLIL::IdString())); - flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("rst"), RTLIL::IdString())); - flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("ena"), RTLIL::IdString())); - flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("d"), RTLIL::IdString())); - flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("q"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair( + RTLIL::escape_id("clk"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair( + RTLIL::escape_id("rst"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair( + RTLIL::escape_id("ena"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair( + RTLIL::escape_id("d"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair( + RTLIL::escape_id("q"), RTLIL::IdString())); } else if (fields[0] == "endff") { if (fields.size() != 1) { @@ -397,6 +451,19 @@ struct DspFF : public Pass { flopTypes.back().ports[RTLIL::escape_id("q")] = RTLIL::escape_id(fields[1]); } + // Parameters that has to match for a flip-flop + else if (fields[0] == "match") { + if (fields.size() < 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || tok.back() != "ff") { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + for (size_t i=1; i"); } @@ -528,6 +608,12 @@ struct DspFF : public Pass { log(" %.3s: %s\n", it.first.c_str(), !it.second.empty() ? it.second.c_str() : ""); } + if (!ff.params.set.empty()) { + log(" params that must match:\n"); + for (const auto& it : ff.params.matching) { + log(" %s\n", it.c_str()); + } + } if (!ff.params.set.empty()) { log(" set params:\n"); for (const auto& it : ff.params.set) { @@ -656,7 +742,7 @@ struct DspFF : public Pass { bool checkDspPort (RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { bool isOk = true; - // The cell parameters must not be set + // The cell register control parameters must not be set for (const auto& it : a_PortRule.params.set) { const auto curr = a_Cell->getParam(it.first); if (curr == it.second) { @@ -790,6 +876,7 @@ struct DspFF : public Pass { return isOk; } + /// Returns a string with either wire name or constant value for a SigBit static std::string sigBitName (const RTLIL::SigBit& a_SigBit) { if (a_SigBit.is_wire()) { RTLIL::Wire* w = a_SigBit.wire; @@ -816,6 +903,7 @@ struct DspFF : public Pass { a_Cell->type.c_str(), a_PortRule.name.c_str(), a_Cell->name.c_str()); // Check if the port can be used for FF integration + log_assert(a_Cell->output(a_PortRule.name) || a_Cell->input(a_PortRule.name)); if (!checkDspPort(a_Cell, a_PortRule)) { log_debug(" port check failed\n"); return; @@ -837,7 +925,12 @@ struct DspFF : public Pass { continue; } - log_assert(a_Cell->output(a_PortRule.name) || a_Cell->input(a_PortRule.name)); + // Skip bits out of the specified range + if ((a_PortRule.bits.first >= 0 && (int)i < a_PortRule.bits.first) || + (a_PortRule.bits.second >= 0 && (int)i > a_PortRule.bits.second)) + { + continue; + } pool others; @@ -952,6 +1045,11 @@ struct DspFF : public Pass { flops[i].second, flops[i].first->type.c_str(), flops[i].first->name.c_str()); } + else if ((a_PortRule.bits.first >= 0 && (int)i < a_PortRule.bits.first) || + (a_PortRule.bits.second >= 0 && (int)i > a_PortRule.bits.second)) + { + log_debug(" %2zu. (excluded)\n", i); + } else { log_debug(" %2zu. None\n", i); } @@ -1252,7 +1350,7 @@ struct DspFF : public Pass { } } - // No driver found + // No driver found. FIXME: Implement a cleaner way of indicating that return CellPin(nullptr, RTLIL::IdString(), -1); } diff --git a/dsp_ff-plugin/nexus-dsp_rules.txt b/dsp_ff-plugin/nexus-dsp_rules.txt index 642f84701..fa11c3fc6 100644 --- a/dsp_ff-plugin/nexus-dsp_rules.txt +++ b/dsp_ff-plugin/nexus-dsp_rules.txt @@ -1,4 +1,4 @@ -dsp MULT36X36 # 36x36 mode +dsp MULT9X9 MULT18X18 MULT18X36 MULT36X36 port A clk CLK 0 rst RSTA 0 @@ -25,6 +25,127 @@ dsp MULT36X36 # 36x36 mode endport enddsp +dsp MULTPREADD9X9 MULTPREADD18X18 MULTADDSUB18X18 MULTADDSUB36X36 + port A + clk CLK 0 + rst RSTA 0 + ena CEA 1 + + set REGINPUTA=REGISTER + map GSR=GSR + endport + port B + clk CLK 0 + rst RSTB 0 + ena CEB 1 + + set REGINPUTB=REGISTER + map GSR=GSR + endport + port C + clk CLK 0 + rst RSTC 0 + ena CEC 1 + + set REGINPUTC=REGISTER + map GSR=GSR + endport + port Z + clk CLK 0 + rst RSTOUT 0 + ena CEOUT 1 + + set REGOUTPUT=REGISTER + map GSR=GSR + endport +enddsp + +# TODO: Uncomment when support for multiple port registers controlled by +# a common parameter is added: + +#dsp MULTADDSUB9X9WIDE +# port A0 +# clk CLK 0 +# rst RSTA0A1 0 +# ena CEA0A1 1 +# +# set REGINPUTAB0=REGISTER +# map GSR=GSR +# endport +# port A1 +# clk CLK 0 +# rst RSTA0A1 0 +# ena CEA0A1 1 +# +# set REGINPUTAB1=REGISTER +# map GSR=GSR +# endport +# port A2 +# clk CLK 0 +# rst RSTA2A3 0 +# ena CEA2A3 1 +# +# set REGINPUTAB2=REGISTER +# map GSR=GSR +# endport +# port A3 +# clk CLK 0 +# rst RSTA2A3 0 +# ena CEA2A3 1 +# +# set REGINPUTAB3=REGISTER +# map GSR=GSR +# endport +# port B0 +# clk CLK 0 +# rst RSTB0B1 0 +# ena CEB0B1 1 +# +# set REGINPUTAB0=REGISTER +# map GSR=GSR +# endport +# port B1 +# clk CLK 0 +# rst RSTB0B1 0 +# ena CEB0B1 1 +# +# set REGINPUTAB1=REGISTER +# map GSR=GSR +# endport +# port B2 +# clk CLK 0 +# rst RSTB2B3 0 +# ena CEB2B3 1 +# +# set REGINPUTAB2=REGISTER +# map GSR=GSR +# endport +# port B3 +# clk CLK 0 +# rst RSTB2B3 0 +# ena CEB2B3 1 +# +# set REGINPUTAB3=REGISTER +# map GSR=GSR +# endport +# port C +# clk CLK 0 +# rst RSTC0 +# ena CEC 1 +# +# set REGINPUTC=REGISTER +# map GSR=GSR +# endport +# port Z +# clk CLK 0 +# rst RSTOUT 0 +# ena CEOUT 1 +# +# set REGOUTPUT=REGISTER +# map GSR=GSR +# endport +#enddsp + ff FD1P3DX clk CK rst CD From 1a184f60c6da3363c6d2305f85538301053d482a Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 14:29:25 +0100 Subject: [PATCH 577/845] License header and pass object state clearing Signed-off-by: Maciej Kurc --- dsp_ff-plugin/dsp_ff.cc | 6 ++++++ dsp_ff-plugin/nexus-dsp_rules.txt | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc index 11555f830..1a2c0a987 100644 --- a/dsp_ff-plugin/dsp_ff.cc +++ b/dsp_ff-plugin/dsp_ff.cc @@ -682,6 +682,12 @@ struct DspFF : public Pass { log_cmd_error("No rules file specified!"); } + // Reset state + m_CellsToRemove.clear(); + m_DspChanges.clear(); + m_DspTypes.clear(); + m_FlopTypes.clear(); + // Load rules rewrite_filename(rulesFile); load_rules(rulesFile); diff --git a/dsp_ff-plugin/nexus-dsp_rules.txt b/dsp_ff-plugin/nexus-dsp_rules.txt index fa11c3fc6..934eea5da 100644 --- a/dsp_ff-plugin/nexus-dsp_rules.txt +++ b/dsp_ff-plugin/nexus-dsp_rules.txt @@ -1,3 +1,11 @@ +# Copyright (C) 2020-2022 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + dsp MULT9X9 MULT18X18 MULT18X36 MULT36X36 port A clk CLK 0 From a3091d7c927027d788c660542240a999c1f3882d Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 14:30:03 +0100 Subject: [PATCH 578/845] Simple multiplier internal register inference test for Nexus architecture Signed-off-by: Maciej Kurc --- dsp_ff-plugin/tests/Makefile | 14 ++++ dsp_ff-plugin/tests/nexus_mult/README.md | 1 + dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl | 43 +++++++++++ dsp_ff-plugin/tests/nexus_mult/nexus_mult.v | 76 +++++++++++++++++++ 4 files changed, 134 insertions(+) create mode 100644 dsp_ff-plugin/tests/Makefile create mode 100644 dsp_ff-plugin/tests/nexus_mult/README.md create mode 100644 dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl create mode 100644 dsp_ff-plugin/tests/nexus_mult/nexus_mult.v diff --git a/dsp_ff-plugin/tests/Makefile b/dsp_ff-plugin/tests/Makefile new file mode 100644 index 000000000..76ffd645b --- /dev/null +++ b/dsp_ff-plugin/tests/Makefile @@ -0,0 +1,14 @@ +# Copyright (C) 2020-2022 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + +TESTS = \ + nexus_mult + +include $(shell pwd)/../../Makefile_test.common + +nexus_mult_verify = true diff --git a/dsp_ff-plugin/tests/nexus_mult/README.md b/dsp_ff-plugin/tests/nexus_mult/README.md new file mode 100644 index 000000000..f72e27cb3 --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_mult/README.md @@ -0,0 +1 @@ +Simple DSP register inference diff --git a/dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl b/dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl new file mode 100644 index 000000000..437fe9e90 --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl @@ -0,0 +1,43 @@ +yosys -import +if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +set TOP "mult_ireg" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count MULT9X9 1 +select -assert-count FD1P3IX 0 + +set TOP "mult_oreg" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count MULT9X9 1 +select -assert-count FD1P3IX 0 + +set TOP "mult_all" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count MULT9X9 1 +select -assert-count FD1P3IX 0 + diff --git a/dsp_ff-plugin/tests/nexus_mult/nexus_mult.v b/dsp_ff-plugin/tests/nexus_mult/nexus_mult.v new file mode 100644 index 000000000..4b7bda43f --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_mult/nexus_mult.v @@ -0,0 +1,76 @@ +module mult_ireg ( + input wire CLK, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [8:0] ra; + always @(posedge CLK) + ra <= A; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (B), + .Z (Z) + ); + +endmodule + +module mult_oreg ( + input wire CLK, + input wire [ 8:0] A, + input wire [ 8:0] B, + output reg [17:0] Z +); + + reg [17:0] z; + always @(posedge CLK) + Z <= z; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (A), + .B (B), + .Z (z) + ); + +endmodule + +module mult_all ( + input wire CLK, + input wire [ 8:0] A, + input wire [ 8:0] B, + output reg [17:0] Z +); + + reg [8:0] ra; + always @(posedge CLK) + ra <= A; + + reg [8:0] rb; + always @(posedge CLK) + rb <= B; + + reg [17:0] z; + always @(posedge CLK) + Z <= z; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (rb), + .Z (z) + ); + +endmodule From c9fab694980f1dc10e447092f58ec7e0d2cf6052 Mon Sep 17 00:00:00 2001 From: rakeshm Date: Fri, 11 Feb 2022 06:09:28 -0800 Subject: [PATCH 579/845] Modified synth_quicklogic.cc file Signed-off-by: rakeshm --- ql-qlf-plugin/synth_quicklogic.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index d26f53a42..2c6428838 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -222,6 +222,10 @@ struct SynthQuickLogicPass : public ScriptPass { if (family == "qlf_k4n8") { noDFFArgs = " -nodffe -nosdff"; } + + if (family == "qlf_k6n10f") { + noDFFArgs = " -nosdff"; + } if (check_label("coarse")) { run("check"); From e33abb47fd36db684cecfa37701a3feccccec294 Mon Sep 17 00:00:00 2001 From: rakeshm Date: Fri, 11 Feb 2022 06:32:17 -0800 Subject: [PATCH 580/845] Modified synth_quicklogic.cc file Signed-off-by: rakeshm --- ql-qlf-plugin/synth_quicklogic.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 2c6428838..33433fd8f 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -221,9 +221,7 @@ struct SynthQuickLogicPass : public ScriptPass { std::string noDFFArgs; if (family == "qlf_k4n8") { noDFFArgs = " -nodffe -nosdff"; - } - - if (family == "qlf_k6n10f") { + } else if (family == "qlf_k6n10f") { noDFFArgs = " -nosdff"; } From 4c18a30e1410eb8cd7a3c474f9c31d6eb3e2a79b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 15:46:20 +0100 Subject: [PATCH 581/845] Added more tests to the DSP register inference plugin, fixed Nexus rules Signed-off-by: Maciej Kurc --- Makefile_test.common | 10 +- dsp_ff-plugin/nexus-dsp_rules.txt | 4 +- dsp_ff-plugin/tests/Makefile | 10 +- .../nexus_conn_conflict.tcl | 48 +++++++ .../nexus_conn_conflict/nexus_conn_conflict.v | 120 +++++++++++++++++ .../nexus_conn_share/nexus_conn_share.tcl | 48 +++++++ .../tests/nexus_conn_share/nexus_conn_share.v | 104 +++++++++++++++ .../tests/nexus_fftypes/nexus_fftypes.tcl | 71 ++++++++++ .../tests/nexus_fftypes/nexus_fftypes.v | 126 ++++++++++++++++++ dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl | 12 +- .../nexus_param_conflict.tcl | 40 ++++++ .../nexus_param_conflict.v | 82 ++++++++++++ 12 files changed, 661 insertions(+), 14 deletions(-) create mode 100644 dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl create mode 100644 dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v create mode 100644 dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl create mode 100644 dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v create mode 100644 dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl create mode 100644 dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v create mode 100644 dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl create mode 100644 dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v diff --git a/Makefile_test.common b/Makefile_test.common index 61abadb24..64973214d 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -35,11 +35,11 @@ $(1): $(1)/ok @set +e; \ $$($(1)_verify); \ if [ $$$$? -eq 0 ]; then \ - printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ + printf "Test %-20s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ touch $$<; \ true; \ else \ - printf "Test %-18s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ + printf "Test %-20s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ false; \ fi @@ -54,15 +54,15 @@ $(1)/ok: $(1)/$(1).v rm -f run-$(1).tcl; \ if [ ! -z "$$($(1)_negative)" ] && [ $$($(1)_negative) -eq 1 ]; then \ if [ $$$$RETVAL -ne 0 ]; then \ - printf "Negative test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ + printf "Negative test %-20s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ true; \ else \ - printf "Negative test %-18s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ + printf "Negative test %-20s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ false; \ fi \ else \ if [ $$$$RETVAL -ne 0 ]; then \ - echo "Unexpected runtime error"; \ + printf "Test %-20s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ false; \ fi \ fi diff --git a/dsp_ff-plugin/nexus-dsp_rules.txt b/dsp_ff-plugin/nexus-dsp_rules.txt index 934eea5da..7d35b8456 100644 --- a/dsp_ff-plugin/nexus-dsp_rules.txt +++ b/dsp_ff-plugin/nexus-dsp_rules.txt @@ -162,7 +162,7 @@ ff FD1P3DX q Q match GSR - set RESETMODE=SYNC + set RESETMODE=ASYNC endff ff FD1P3IX @@ -173,6 +173,6 @@ ff FD1P3IX q Q match GSR - set RESETMODE=ASYNC + set RESETMODE=SYNC endff diff --git a/dsp_ff-plugin/tests/Makefile b/dsp_ff-plugin/tests/Makefile index 76ffd645b..d55917559 100644 --- a/dsp_ff-plugin/tests/Makefile +++ b/dsp_ff-plugin/tests/Makefile @@ -7,8 +7,16 @@ # SPDX-License-Identifier:ISC TESTS = \ - nexus_mult + nexus_mult \ + nexus_fftypes \ + nexus_conn_conflict \ + nexus_conn_share \ + nexus_param_conflict include $(shell pwd)/../../Makefile_test.common nexus_mult_verify = true +nexus_fftypes_verify = true +nexus_conn_conflict_verify = true +nexus_conn_share_verify = true +nexus_param_conflict_verify = true diff --git a/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl b/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl new file mode 100644 index 000000000..c4cee757c --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl @@ -0,0 +1,48 @@ +yosys -import +if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +set TOP "conflict_dsp_clk" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 9 t:FD1P3IX + +set TOP "conflict_ff_clk" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 18 t:FD1P3IX + +set TOP "conflict_ff_rst" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 18 t:FD1P3DX + +set TOP "conflict_ff_ena" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 18 t:FD1P3IX diff --git a/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v b/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v new file mode 100644 index 000000000..2eb863454 --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v @@ -0,0 +1,120 @@ +module conflict_dsp_clk ( + input wire CLK_A, + input wire CLK_B, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [8:0] ra; + always @(posedge CLK_A) + ra <= A; + + reg [8:0] rb; + always @(posedge CLK_B) + rb <= B; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (rb), + .Z (Z) + ); + +endmodule + +module conflict_ff_clk ( + input wire CLK1, + input wire CLK2, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [17:0] z; + + always @(posedge CLK1) + Z[17:9] <= z[17:9]; + always @(posedge CLK2) + Z[ 8:0] <= z[ 8:0]; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (A), + .B (B), + .Z (z) + ); + +endmodule + +module conflict_ff_rst ( + input wire CLK, + input wire RST1, + input wire RST2, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [17:0] z; + + always @(posedge CLK or posedge RST1) + if (RST1) + Z[17:9] <= 0; + else + Z[17:9] <= z[17:9]; + always @(posedge CLK or posedge RST2) + if (RST2) + Z[ 8:0] <= 0; + else + Z[ 8:0] <= z[ 8:0]; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (A), + .B (B), + .Z (z) + ); + +endmodule + +module conflict_ff_ena ( + input wire CLK, + input wire ENA1, + input wire ENA2, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [17:0] z; + + always @(posedge CLK) + if (ENA1) + Z[17:9] <= z[17:9]; + always @(posedge CLK) + if (ENA2) + Z[ 8:0] <= z[ 8:0]; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (A), + .B (B), + .Z (z) + ); + +endmodule + + diff --git a/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl b/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl new file mode 100644 index 000000000..2f13e67ca --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl @@ -0,0 +1,48 @@ +yosys -import +if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +set TOP "conflict_out_fanout" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 18 t:FD1P3IX + +set TOP "conflict_out_fanout_to_top" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 18 t:FD1P3IX + +set TOP "conflict_inp_fanout" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 9 t:FD1P3IX + +set TOP "conflict_inp_fanout_to_top" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 9 t:FD1P3IX + + diff --git a/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v b/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v new file mode 100644 index 000000000..856cda8b4 --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v @@ -0,0 +1,104 @@ +module conflict_out_fanout ( + input wire CLK, + input wire [ 8:0] A, + input wire [ 8:0] B, + output reg [17:0] Z, + output wire [ 8:0] X, +); + + wire [17:0] z; + always @(posedge CLK) + Z <= z; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (A), + .B (B), + .Z (z) + ); + + assign X = ~z[8:0]; + +endmodule + +module conflict_out_fanout_to_top ( + input wire CLK, + input wire [ 8:0] A, + input wire [ 8:0] B, + output reg [17:0] Z, + output wire [ 8:0] X, +); + + wire [17:0] z; + always @(posedge CLK) + Z <= z; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (A), + .B (B), + .Z (z) + ); + + assign X = z[8:0]; + +endmodule + +module conflict_inp_fanout ( + input wire CLK, + input wire [ 8:0] A, + input wire [ 8:0] B, + output reg [17:0] Z, + output wire [ 3:0] X, +); + + wire [8:0] ra; + always @(posedge CLK) + ra <= A; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (B), + .Z (Z) + ); + + assign X = ~ra[3:0]; + +endmodule + +module conflict_inp_fanout_to_top ( + input wire CLK, + input wire [ 8:0] A, + input wire [ 8:0] B, + output reg [17:0] Z, + output wire [ 3:0] X, +); + + wire [8:0] ra; + always @(posedge CLK) + ra <= A; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (B), + .Z (Z) + ); + + assign X = ra[3:0]; + +endmodule + diff --git a/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl b/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl new file mode 100644 index 000000000..fa006c891 --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl @@ -0,0 +1,71 @@ +yosys -import +if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +set TOP "mult_ena" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 0 t:FD1P3IX +select -assert-count 0 t:FD1P3DX + +set TOP "mult_arst" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 0 t:FD1P3IX +select -assert-count 0 t:FD1P3DX + +set TOP "mult_arst_ena" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 0 t:FD1P3IX +select -assert-count 0 t:FD1P3DX + +set TOP "mult_srst" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 0 t:FD1P3IX +select -assert-count 0 t:FD1P3DX + +set TOP "mult_srst_ena" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 0 t:FD1P3IX +select -assert-count 0 t:FD1P3DX diff --git a/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v b/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v new file mode 100644 index 000000000..e4f22fe28 --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v @@ -0,0 +1,126 @@ +module mult_ena ( + input wire CLK, + input wire ENA, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [8:0] ra; + always @(posedge CLK) + if (ENA) ra <= A; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (B), + .Z (Z) + ); + +endmodule + +module mult_arst ( + input wire CLK, + input wire RST, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [8:0] ra; + always @(posedge CLK or posedge RST) + if (RST) ra <= 0; + else ra <= A; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (B), + .Z (Z) + ); + +endmodule + +module mult_arst_ena ( + input wire CLK, + input wire RST, + input wire ENA, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [8:0] ra; + always @(posedge CLK or posedge RST) + if (RST) ra <= 0; + else if (ENA) ra <= A; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (B), + .Z (Z) + ); + +endmodule + +module mult_srst ( + input wire CLK, + input wire RST, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [8:0] ra; + always @(posedge CLK) + if (RST) ra <= 0; + else ra <= A; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (B), + .Z (Z) + ); + +endmodule + +module mult_srst_ena ( + input wire CLK, + input wire RST, + input wire ENA, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [8:0] ra; + always @(posedge CLK) + if (RST) ra <= 0; + else if (ENA) ra <= A; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (B), + .Z (Z) + ); + +endmodule + diff --git a/dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl b/dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl index 437fe9e90..d82ffa88f 100644 --- a/dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl +++ b/dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl @@ -14,8 +14,8 @@ equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../.. design -load postopt yosys cd ${TOP} stat -select -assert-count MULT9X9 1 -select -assert-count FD1P3IX 0 +select -assert-count 1 t:MULT9X9 +select -assert-count 0 t:FD1P3IX set TOP "mult_oreg" design -load read @@ -26,8 +26,8 @@ equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../.. design -load postopt yosys cd ${TOP} stat -select -assert-count MULT9X9 1 -select -assert-count FD1P3IX 0 +select -assert-count 1 t:MULT9X9 +select -assert-count 0 t:FD1P3IX set TOP "mult_all" design -load read @@ -38,6 +38,6 @@ equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../.. design -load postopt yosys cd ${TOP} stat -select -assert-count MULT9X9 1 -select -assert-count FD1P3IX 0 +select -assert-count 1 t:MULT9X9 +select -assert-count 0 t:FD1P3IX diff --git a/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl b/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl new file mode 100644 index 000000000..abd9d3c26 --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl @@ -0,0 +1,40 @@ +yosys -import +if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +set TOP "conflict_dsp_ctrl_param" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 18 t:FD1P3IX + +set TOP "conflict_dsp_common_param" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 9 t:FD1P3IX t:DS1P3DX %u + +set TOP "conflict_ff_param" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 4 t:FD1P3IX +select -assert-count 5 t:FD1P3DX + diff --git a/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v b/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v new file mode 100644 index 000000000..d03d611a1 --- /dev/null +++ b/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v @@ -0,0 +1,82 @@ +module conflict_dsp_ctrl_param ( + input wire CLK, + input wire [ 8:0] A, + input wire [ 8:0] B, + output reg [17:0] Z, +); + + wire [17:0] z; + always @(posedge CLK) + Z <= z; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("REGISTER") + ) mult ( + .A (A), + .B (B), + .Z (z) + ); + +endmodule + +module conflict_dsp_common_param ( + input wire CLK, + input wire RST, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z, +); + + wire [8:0] ra; + always @(posedge CLK or posedge RST) + if (RST) ra <= 0; + else ra <= A; + + wire [8:0] rb; + always @(posedge CLK) + if (RST) rb <= 0; + else rb <= B; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (rb), + .Z (Z) + ); + +endmodule + +module conflict_ff_param ( + input wire CLK, + input wire RST, + input wire [ 8:0] A, + input wire [ 8:0] B, + output wire [17:0] Z, +); + + wire [8:0] ra; + always @(posedge CLK or posedge RST) + if (RST) ra[8:4] <= 0; + else ra[8:4] <= A[8:4]; + + always @(posedge CLK) + if (RST) ra[3:0] <= 0; + else ra[3:0] <= A[3:0]; + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .B (B), + .Z (Z) + ); + +endmodule + From 0c81c0b2440dca0527748098429bd19a4f01e9c8 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 16:01:36 +0100 Subject: [PATCH 582/845] Code formatting Signed-off-by: Maciej Kurc --- dsp_ff-plugin/dsp_ff.cc | 523 +++++++++++++++++----------------------- 1 file changed, 220 insertions(+), 303 deletions(-) diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc index 1a2c0a987..eb7b44947 100644 --- a/dsp_ff-plugin/dsp_ff.cc +++ b/dsp_ff-plugin/dsp_ff.cc @@ -11,22 +11,17 @@ struct DspFF : public Pass { /// A structure identifying specific pin in a cell instance struct CellPin { - RTLIL::Cell* cell; /// Cell pointer (nullptr for top-level ports) - RTLIL::IdString port; /// Port name - int bit; /// Bit index - - CellPin (RTLIL::Cell* _cell, - const RTLIL::IdString& _port, - int _bit = 0) : - cell(_cell), - port(_port), - bit (_bit) - {} - - CellPin (const CellPin& ref) = default; - CellPin (CellPin&& ref) = default; - - unsigned int hash () const { + RTLIL::Cell *cell; /// Cell pointer (nullptr for top-level ports) + RTLIL::IdString port; /// Port name + int bit; /// Bit index + + CellPin(RTLIL::Cell *_cell, const RTLIL::IdString &_port, int _bit = 0) : cell(_cell), port(_port), bit(_bit) {} + + CellPin(const CellPin &ref) = default; + CellPin(CellPin &&ref) = default; + + unsigned int hash() const + { unsigned int h = 0; if (cell != nullptr) { h = mkhash_add(h, cell->hash()); @@ -36,25 +31,14 @@ struct DspFF : public Pass { return h; } - bool operator == (const CellPin& ref) const { - return (cell == ref.cell) && - (port == ref.port) && - (bit == ref.bit); - } + bool operator==(const CellPin &ref) const { return (cell == ref.cell) && (port == ref.port) && (bit == ref.bit); } - std::string as_string () const { + std::string as_string() const + { if (cell != nullptr) { - return stringf("%s.%s[%d]", - RTLIL::unescape_id(cell->name).c_str(), - RTLIL::unescape_id(port).c_str(), - bit - ); - } - else { - return stringf("%s[%d]", - RTLIL::unescape_id(port).c_str(), - bit - ); + return stringf("%s.%s[%d]", RTLIL::unescape_id(cell->name).c_str(), RTLIL::unescape_id(port).c_str(), bit); + } else { + return stringf("%s[%d]", RTLIL::unescape_id(port).c_str(), bit); } } }; @@ -93,7 +77,7 @@ struct DspFF : public Pass { struct { /// A dict of parameters to be set in the cell after integration - dict set; + dict set; /// A dict of parameters to be mapped to the cell after integration dict map; } params; @@ -113,8 +97,8 @@ struct DspFF : public Pass { /// Describes a changes made to a DSP cell struct DspChanges { - pool params; // Modified params - pool conns; // Altered connections (ports) + pool params; // Modified params + pool conns; // Altered connections (ports) }; // .......................................... @@ -128,12 +112,13 @@ struct DspFF : public Pass { dict dsp; } params; - FlopData (const RTLIL::IdString& _type) : type(_type) {}; + FlopData(const RTLIL::IdString &_type) : type(_type){}; - FlopData (const FlopData& ref) = default; - FlopData (FlopData&& ref) = default; + FlopData(const FlopData &ref) = default; + FlopData(FlopData &&ref) = default; - unsigned int hash () const { + unsigned int hash() const + { unsigned int h = 0; h = mkhash_add(h, type.hash()); h = mkhash_add(h, conns.hash()); @@ -142,25 +127,21 @@ struct DspFF : public Pass { return h; } - bool operator == (const FlopData& ref) const { - return (type == ref.type) && - (conns == ref.conns) && - (params.flop == ref.params.flop) && - (params.dsp == ref.params.dsp); + bool operator==(const FlopData &ref) const + { + return (type == ref.type) && (conns == ref.conns) && (params.flop == ref.params.flop) && (params.dsp == ref.params.dsp); } }; // .......................................... /// Loads FF and DSP integration rules from a file - void load_rules(const std::string& a_FileName) { + void load_rules(const std::string &a_FileName) + { // Parses a string and returns a vector of fields delimited by the // given character. - auto getFields = [](const std::string& a_String, - const char a_Delim = ' ', - bool a_KeepEmpty = false) - { + auto getFields = [](const std::string &a_String, const char a_Delim = ' ', bool a_KeepEmpty = false) { std::vector fields; std::stringstream ss(a_String); @@ -177,17 +158,16 @@ struct DspFF : public Pass { // Parses a vector of strings like "=" starting from the // second one on the list - auto parseNameValue = [&](const std::vector& strs) { - const std::regex expr ("(\\S+)=(\\S+)"); - std::smatch match; + auto parseNameValue = [&](const std::vector &strs) { + const std::regex expr("(\\S+)=(\\S+)"); + std::smatch match; std::vector> vec; - for (size_t i=1; i[:]" or just "" - auto parsePortName = [&](const std::string& str) { - const std::regex expr ("^(.*)\\[([0-9]+):([0-9]+)\\]"); - std::smatch match; + auto parsePortName = [&](const std::string &str) { + const std::regex expr("^(.*)\\[([0-9]+):([0-9]+)\\]"); + std::smatch match; std::tuple data; auto res = std::regex_match(str, match, expr); if (res) { - data = std::make_tuple( - std::string(match[1]), - std::stoi(match[2]), - std::stoi(match[3]) - ); - - if ((std::get<2>(data) > std::get<1>(data)) || - std::get<2>(data) < 0 || std::get<1>(data) < 0) - { + data = std::make_tuple(std::string(match[1]), std::stoi(match[2]), std::stoi(match[3])); + + if ((std::get<2>(data) > std::get<1>(data)) || std::get<2>(data) < 0 || std::get<1>(data) < 0) { log_error(" invalid port spec: '%s'\n", str.c_str()); } - } - else { + } else { data = std::make_tuple(str, -1, -1); } return data; }; - std::ifstream file (a_FileName); + std::ifstream file(a_FileName); std::string line; log("Loading rules from '%s'...\n", a_FileName.c_str()); @@ -230,8 +203,8 @@ struct DspFF : public Pass { log_error(" Error opening file!\n"); } - std::vector dspTypes; - std::vector flopTypes; + std::vector dspTypes; + std::vector flopTypes; std::vector dspAliases; @@ -269,15 +242,14 @@ struct DspFF : public Pass { } tok.push_back(fields[0]); - dspTypes.resize(dspTypes.size() + 1);\ + dspTypes.resize(dspTypes.size() + 1); dspTypes.back().name = RTLIL::escape_id(fields[1]); dspAliases.clear(); - for (size_t i=2; i(spec)); ports.back().bits = std::make_pair(std::get<2>(spec), std::get<1>(spec)); - ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("clk"), - std::make_pair(RTLIL::IdString(), RTLIL::Sx))); - ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("rst"), - std::make_pair(RTLIL::IdString(), RTLIL::Sx))); - ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("ena"), - std::make_pair(RTLIL::IdString(), RTLIL::Sx))); - } - else if (fields[0] == "endport") { + ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("clk"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("rst"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("ena"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + } else if (fields[0] == "endport") { if (fields.size() != 1) { log_error(" syntax error: '%s'\n", line.c_str()); } if (tok.size() != 2 || tok.back() != "port") { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } - tok.pop_back(); + tok.pop_back(); } // Flip-flop type section @@ -338,25 +306,19 @@ struct DspFF : public Pass { flopTypes.resize(flopTypes.size() + 1); flopTypes.back().name = RTLIL::escape_id(fields[1]); - flopTypes.back().ports.insert(std::make_pair( - RTLIL::escape_id("clk"), RTLIL::IdString())); - flopTypes.back().ports.insert(std::make_pair( - RTLIL::escape_id("rst"), RTLIL::IdString())); - flopTypes.back().ports.insert(std::make_pair( - RTLIL::escape_id("ena"), RTLIL::IdString())); - flopTypes.back().ports.insert(std::make_pair( - RTLIL::escape_id("d"), RTLIL::IdString())); - flopTypes.back().ports.insert(std::make_pair( - RTLIL::escape_id("q"), RTLIL::IdString())); - } - else if (fields[0] == "endff") { + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("clk"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("rst"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("ena"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("d"), RTLIL::IdString())); + flopTypes.back().ports.insert(std::make_pair(RTLIL::escape_id("q"), RTLIL::IdString())); + } else if (fields[0] == "endff") { if (fields.size() != 1) { log_error(" syntax error: '%s'\n", line.c_str()); } if (tok.size() != 1 || tok.back() != "ff") { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } - tok.pop_back(); + tok.pop_back(); } // Signals @@ -370,20 +332,15 @@ struct DspFF : public Pass { if (fields.size() != 3) { log_error(" syntax error: '%s'\n", line.c_str()); } - auto& ports = dspTypes.back().ports; - ports.back().assoc[RTLIL::escape_id("clk")] = std::make_pair( - RTLIL::escape_id(fields[1]), - RTLIL::Const::from_string(fields[2]) - ); - } - else if (tok.back() == "ff") { + auto &ports = dspTypes.back().ports; + ports.back().assoc[RTLIL::escape_id("clk")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::Const::from_string(fields[2])); + } else if (tok.back() == "ff") { if (fields.size() != 2) { log_error(" syntax error: '%s'\n", line.c_str()); } flopTypes.back().ports[RTLIL::escape_id("clk")] = RTLIL::escape_id(fields[1]); } - } - else if (fields[0] == "rst") { + } else if (fields[0] == "rst") { if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } @@ -393,20 +350,15 @@ struct DspFF : public Pass { if (fields.size() != 3) { log_error(" syntax error: '%s'\n", line.c_str()); } - auto& ports = dspTypes.back().ports; - ports.back().assoc[RTLIL::escape_id("rst")] = std::make_pair( - RTLIL::escape_id(fields[1]), - RTLIL::Const::from_string(fields[2]) - ); - } - else if (tok.back() == "ff") { + auto &ports = dspTypes.back().ports; + ports.back().assoc[RTLIL::escape_id("rst")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::Const::from_string(fields[2])); + } else if (tok.back() == "ff") { if (fields.size() != 2) { log_error(" syntax error: '%s'\n", line.c_str()); } flopTypes.back().ports[RTLIL::escape_id("rst")] = RTLIL::escape_id(fields[1]); } - } - else if (fields[0] == "ena") { + } else if (fields[0] == "ena") { if (tok.size() == 0 || (tok.back() != "port" && tok.back() != "ff")) { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } @@ -416,13 +368,9 @@ struct DspFF : public Pass { if (fields.size() != 3) { log_error(" syntax error: '%s'\n", line.c_str()); } - auto& ports = dspTypes.back().ports; - ports.back().assoc[RTLIL::escape_id("ena")] = std::make_pair( - RTLIL::escape_id(fields[1]), - RTLIL::Const::from_string(fields[2]) - ); - } - else if (tok.back() == "ff") { + auto &ports = dspTypes.back().ports; + ports.back().assoc[RTLIL::escape_id("ena")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::Const::from_string(fields[2])); + } else if (tok.back() == "ff") { if (fields.size() != 2) { log_error(" syntax error: '%s'\n", line.c_str()); } @@ -439,8 +387,7 @@ struct DspFF : public Pass { } flopTypes.back().ports[RTLIL::escape_id("d")] = RTLIL::escape_id(fields[1]); - } - else if (fields[0] == "q") { + } else if (fields[0] == "q") { if (fields.size() != 2) { log_error(" syntax error: '%s'\n", line.c_str()); } @@ -460,7 +407,7 @@ struct DspFF : public Pass { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } - for (size_t i=1; i set; - for (const auto& it : vec) { - set.insert(std::make_pair( - RTLIL::escape_id(it.first), - RTLIL::Const(it.second) - )); + for (const auto &it : vec) { + set.insert(std::make_pair(RTLIL::escape_id(it.first), RTLIL::Const(it.second))); } if (tok.back() == "port") { - auto& ports = dspTypes.back().ports; + auto &ports = dspTypes.back().ports; ports.back().params.set.swap(set); - } - else if (tok.back() == "ff") { + } else if (tok.back() == "ff") { flopTypes.back().params.set.swap(set); } } @@ -501,18 +444,14 @@ struct DspFF : public Pass { const auto vec = parseNameValue(fields); dict map; - for (const auto& it : vec) { - map.insert(std::make_pair( - RTLIL::escape_id(it.first), - RTLIL::escape_id(it.second) - )); + for (const auto &it : vec) { + map.insert(std::make_pair(RTLIL::escape_id(it.first), RTLIL::escape_id(it.second))); } if (tok.back() == "port") { - auto& ports = dspTypes.back().ports; + auto &ports = dspTypes.back().ports; ports.back().params.map.swap(map); - } - else if (tok.back() == "ff") { + } else if (tok.back() == "ff") { flopTypes.back().params.map.swap(map); } } @@ -526,12 +465,9 @@ struct DspFF : public Pass { } const auto vec = parseNameValue(fields); - auto& ports = dspTypes.back().ports; - for (const auto& it : vec) { - ports.back().connect.insert(std::make_pair( - RTLIL::escape_id(it.first), - RTLIL::Const(it.second) - )); + auto &ports = dspTypes.back().ports; + for (const auto &it : vec) { + ports.back().connect.insert(std::make_pair(RTLIL::escape_id(it.first), RTLIL::Const(it.second))); } } @@ -541,30 +477,31 @@ struct DspFF : public Pass { } // Convert lists to maps - for (const auto& it : dspTypes) { + for (const auto &it : dspTypes) { if (m_DspTypes.count(it.name)) { log_error(" duplicated rule for DSP '%s'\n", it.name.c_str()); } m_DspTypes.insert(std::make_pair(it.name, it)); } - for (const auto& it : flopTypes) { + for (const auto &it : flopTypes) { if (m_FlopTypes.count(it.name)) { log_error(" duplicated rule for flip-flop '%s'\n", it.name.c_str()); } m_FlopTypes.insert(std::make_pair(it.name, it)); } - } + } - void dump_rules() { + void dump_rules() + { // Dump DSP types log("DSP types:\n"); - for (const auto& it : m_DspTypes) { - const auto& dsp = it.second; + for (const auto &it : m_DspTypes) { + const auto &dsp = it.second; log(" %s\n", dsp.name.c_str()); log(" ports:\n"); - for (const auto& port : dsp.ports) { + for (const auto &port : dsp.ports) { std::string range; if (port.bits.first != -1 && port.bits.second != -1) { @@ -573,25 +510,25 @@ struct DspFF : public Pass { log(" %s.%s%s\n", dsp.name.c_str(), port.name.c_str(), range.c_str()); - for (const auto& it : port.assoc) { + for (const auto &it : port.assoc) { log(" %.3s: %s\n", it.first.c_str(), !it.second.first.empty() ? it.second.first.c_str() : ""); } if (!port.params.set.empty()) { log(" set params:\n"); - for (const auto& it : port.params.set) { + for (const auto &it : port.params.set) { log(" %s=%s\n", it.first.c_str(), it.second.decode_string().c_str()); } } if (!port.params.map.empty()) { log(" map params:\n"); - for (const auto& it : port.params.map) { + for (const auto &it : port.params.map) { log(" %s=%s\n", it.first.c_str(), it.second.c_str()); } } if (!port.connect.empty()) { log(" connect ports:\n"); - for (const auto& it : port.connect) { + for (const auto &it : port.connect) { log(" %s.%s=%s\n", dsp.name.c_str(), it.first.c_str(), it.second.as_string().c_str()); } } @@ -600,29 +537,29 @@ struct DspFF : public Pass { // Dump flop types log("Flip-flop types:\n"); - for (const auto& it : m_FlopTypes) { - const auto& ff = it.second; + for (const auto &it : m_FlopTypes) { + const auto &ff = it.second; log(" %s\n", ff.name.c_str()); - - for (const auto& it : ff.ports) { + + for (const auto &it : ff.ports) { log(" %.3s: %s\n", it.first.c_str(), !it.second.empty() ? it.second.c_str() : ""); } if (!ff.params.set.empty()) { log(" params that must match:\n"); - for (const auto& it : ff.params.matching) { + for (const auto &it : ff.params.matching) { log(" %s\n", it.c_str()); } } if (!ff.params.set.empty()) { log(" set params:\n"); - for (const auto& it : ff.params.set) { + for (const auto &it : ff.params.set) { log(" %s=%s\n", it.first.c_str(), it.second.decode_string().c_str()); } } if (!ff.params.map.empty()) { log(" map params:\n"); - for (const auto& it : ff.params.map) { + for (const auto &it : ff.params.map) { log(" %s=%s\n", it.first.c_str(), it.second.c_str()); } } @@ -633,25 +570,24 @@ struct DspFF : public Pass { /// Temporary SigBit to SigBit helper map. SigMap m_SigMap; -// /// Net map -// dict m_NetMap; + // /// Net map + // dict m_NetMap; /// Cells to be removed (per module!) - pool m_CellsToRemove; + pool m_CellsToRemove; /// DSP cells that got changed - dict m_DspChanges; + dict m_DspChanges; /// DSP types - dict m_DspTypes; + dict m_DspTypes; /// Flip-flop types - dict m_FlopTypes; + dict m_FlopTypes; // .......................................... - DspFF() : - Pass("dsp_ff", "Integrates flip-flop into DSP blocks") - {} + DspFF() : Pass("dsp_ff", "Integrates flip-flop into DSP blocks") {} - void help () override { + void help() override + { log("\n"); log(" dsp_ff -rules [selection]\n"); log("\n"); @@ -659,7 +595,7 @@ struct DspFF : public Pass { log("\n"); } - void execute (std::vector a_Args, RTLIL::Design *a_Design) override + void execute(std::vector a_Args, RTLIL::Design *a_Design) override { log_header(a_Design, "Executing DSP_FF pass.\n"); @@ -702,8 +638,8 @@ struct DspFF : public Pass { m_SigMap.clear(); m_SigMap.set(module); -// // Build the net map -// buildNetMap(module); + // // Build the net map + // buildNetMap(module); // Look for DSP cells for (auto cell : module->cells()) { @@ -714,13 +650,12 @@ struct DspFF : public Pass { } // Check ports - auto& rule = m_DspTypes.at(cell->type); - for (auto& portRule : rule.ports) { + auto &rule = m_DspTypes.at(cell->type); + for (auto &portRule : rule.ports) { // Sanity check if (!cell->hasPort(portRule.name)) { - log(" The DSP cell '%s' does not have a port named '%s'!\n", - cell->type.c_str(), portRule.name.c_str()); + log(" The DSP cell '%s' does not have a port named '%s'!\n", cell->type.c_str(), portRule.name.c_str()); continue; } @@ -729,7 +664,7 @@ struct DspFF : public Pass { } // Remove cells - for (const auto& cell : m_CellsToRemove) { + for (const auto &cell : m_CellsToRemove) { module->remove(cell); } m_CellsToRemove.clear(); @@ -741,19 +676,19 @@ struct DspFF : public Pass { // .......................................... -// void buildNetMap (RTLIL::Module* a_Module) { -// // TODO: -// } + // void buildNetMap (RTLIL::Module* a_Module) { + // // TODO: + // } - bool checkDspPort (RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { + bool checkDspPort(RTLIL::Cell *a_Cell, const DspPortType &a_PortRule) + { bool isOk = true; // The cell register control parameters must not be set - for (const auto& it : a_PortRule.params.set) { + for (const auto &it : a_PortRule.params.set) { const auto curr = a_Cell->getParam(it.first); if (curr == it.second) { - log_debug(" the param '%s' is already set to '%s'\n", - it.first.c_str(), it.second.decode_string().c_str()); + log_debug(" the param '%s' is already set to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); isOk = false; } } @@ -761,12 +696,12 @@ struct DspFF : public Pass { return isOk; } - bool checkFlop (RTLIL::Cell* a_Cell) { - const auto& flopType = m_FlopTypes.at(a_Cell->type); + bool checkFlop(RTLIL::Cell *a_Cell) + { + const auto &flopType = m_FlopTypes.at(a_Cell->type); bool isOk = true; - log_debug(" Checking connected flip-flop '%s' of type '%s'... ", - a_Cell->name.c_str(), a_Cell->type.c_str()); + log_debug(" Checking connected flip-flop '%s' of type '%s'... ", a_Cell->name.c_str(), a_Cell->type.c_str()); // Must not have the "keep" attribute if (a_Cell->has_keep_attr()) { @@ -775,11 +710,11 @@ struct DspFF : public Pass { } // Check if required parameters are set as they should be - for (const auto& it : flopType.params.required) { + for (const auto &it : flopType.params.required) { const auto curr = a_Cell->getParam(it.first); if (curr != it.second) { - log_debug("\n param '%s' mismatch ('%s' instead of '%s')", - it.first.c_str(), curr.decode_string().c_str(), it.second.decode_string().c_str()); + log_debug("\n param '%s' mismatch ('%s' instead of '%s')", it.first.c_str(), curr.decode_string().c_str(), + it.second.decode_string().c_str()); isOk = false; } } @@ -792,21 +727,18 @@ struct DspFF : public Pass { return isOk; } - - bool checkFlopDataAgainstDspPort (const FlopData& a_FlopData, - RTLIL::Cell* a_Cell, - const DspPortType& a_PortRule) + bool checkFlopDataAgainstDspPort(const FlopData &a_FlopData, RTLIL::Cell *a_Cell, const DspPortType &a_PortRule) { - const auto& flopType = m_FlopTypes.at(a_FlopData.type); - const auto& changes = m_DspChanges[a_Cell]; + const auto &flopType = m_FlopTypes.at(a_FlopData.type); + const auto &changes = m_DspChanges[a_Cell]; bool isOk = true; log_debug(" Checking connected flip-flop settings against the DSP port... "); // Check control signal connections - for (const auto& it : a_PortRule.assoc) { - const auto& key = it.first; - const auto& port = it.second.first; + for (const auto &it : a_PortRule.assoc) { + const auto &key = it.first; + const auto &port = it.second.first; SigBit conn(RTLIL::Sx); if (!port.empty() && a_Cell->hasPort(port)) { @@ -826,14 +758,10 @@ struct DspFF : public Pass { } } - auto checkParam = [&](const RTLIL::IdString& name, - const RTLIL::Const& curr, - const RTLIL::Const& next) - { + auto checkParam = [&](const RTLIL::IdString &name, const RTLIL::Const &curr, const RTLIL::Const &next) { if (curr != next && changes.params.count(name)) { - log_debug("\n the param '%s' mismatch ('%s' instead of '%s')", - name.c_str(), curr.decode_string().c_str(), - next.decode_string().c_str()); + log_debug("\n the param '%s' mismatch ('%s' instead of '%s')", name.c_str(), curr.decode_string().c_str(), + next.decode_string().c_str()); isOk = false; return false; } @@ -841,7 +769,7 @@ struct DspFF : public Pass { }; // Check parameters to be mapped (by the port rule) - for (const auto& it : a_PortRule.params.map) { + for (const auto &it : a_PortRule.params.map) { if (a_Cell->hasParam(it.first) && a_FlopData.params.dsp.count(it.second)) { const auto curr = a_Cell->getParam(it.first); const auto flop = a_FlopData.params.dsp.at(it.second); @@ -850,15 +778,15 @@ struct DspFF : public Pass { } // Check parameters to be set (by the port rule) - for (const auto& it : a_PortRule.params.set) { + for (const auto &it : a_PortRule.params.set) { if (a_Cell->hasParam(it.first)) { const auto curr = a_Cell->getParam(it.first); checkParam(it.first, curr, it.second); } } - + // Check parameters to be mapped (by the flip-flop rule) - for (const auto& it : flopType.params.map) { + for (const auto &it : flopType.params.map) { if (a_Cell->hasParam(it.first) && a_FlopData.params.dsp.count(it.second)) { const auto curr = a_Cell->getParam(it.first); const auto flop = a_FlopData.params.dsp.at(it.second); @@ -867,13 +795,13 @@ struct DspFF : public Pass { } // Check parameters to be set (by the flip-flop rule) - for (const auto& it : flopType.params.set) { + for (const auto &it : flopType.params.set) { if (a_Cell->hasParam(it.first)) { const auto curr = a_Cell->getParam(it.first); checkParam(it.first, curr, it.second); } } - + if (isOk) { log_debug("Ok\n"); } else { @@ -883,19 +811,25 @@ struct DspFF : public Pass { } /// Returns a string with either wire name or constant value for a SigBit - static std::string sigBitName (const RTLIL::SigBit& a_SigBit) { + static std::string sigBitName(const RTLIL::SigBit &a_SigBit) + { if (a_SigBit.is_wire()) { - RTLIL::Wire* w = a_SigBit.wire; + RTLIL::Wire *w = a_SigBit.wire; return RTLIL::unescape_id(w->name); } else { - switch (a_SigBit.data) - { - case RTLIL::State::S0: return "1'b0"; - case RTLIL::State::S1: return "1'b1"; - case RTLIL::State::Sx: return "1'bx"; - case RTLIL::State::Sz: return "1'bz"; - case RTLIL::State::Sa: return "-"; - case RTLIL::State::Sm: return "m"; + switch (a_SigBit.data) { + case RTLIL::State::S0: + return "1'b0"; + case RTLIL::State::S1: + return "1'b1"; + case RTLIL::State::Sx: + return "1'bx"; + case RTLIL::State::Sz: + return "1'bz"; + case RTLIL::State::Sa: + return "-"; + case RTLIL::State::Sm: + return "m"; } return "?"; } @@ -903,10 +837,10 @@ struct DspFF : public Pass { // .......................................... - void processPort (RTLIL::Cell* a_Cell, const DspPortType& a_PortRule) { + void processPort(RTLIL::Cell *a_Cell, const DspPortType &a_PortRule) + { - log_debug(" Attempting flip-flop integration for %s.%s of %s\n", - a_Cell->type.c_str(), a_PortRule.name.c_str(), a_Cell->name.c_str()); + log_debug(" Attempting flip-flop integration for %s.%s of %s\n", a_Cell->type.c_str(), a_PortRule.name.c_str(), a_Cell->name.c_str()); // Check if the port can be used for FF integration log_assert(a_Cell->output(a_PortRule.name) || a_Cell->input(a_PortRule.name)); @@ -922,19 +856,16 @@ struct DspFF : public Pass { // Collect flip-flops, identify their group count dict groups; - std::vector> flops - (sigbits.size(), std::make_pair(nullptr, -1)); + std::vector> flops(sigbits.size(), std::make_pair(nullptr, -1)); - for (size_t i=0; i= 0 && (int)i < a_PortRule.bits.first) || - (a_PortRule.bits.second >= 0 && (int)i > a_PortRule.bits.second)) - { + if ((a_PortRule.bits.first >= 0 && (int)i < a_PortRule.bits.first) || (a_PortRule.bits.second >= 0 && (int)i > a_PortRule.bits.second)) { continue; } @@ -970,8 +901,8 @@ struct DspFF : public Pass { } // Get the sink, check if this is a flip-flop - auto& other = *others.begin(); - auto* flop = other.cell; + auto &other = *others.begin(); + auto *flop = other.cell; if (flop == nullptr) { if (!other.port.empty()) { @@ -988,12 +919,11 @@ struct DspFF : public Pass { } // Check if the connection goes to the data input/output port - const auto& flopType = m_FlopTypes.at(flop->type); + const auto &flopType = m_FlopTypes.at(flop->type); RTLIL::IdString flopPort; if (a_Cell->output(a_PortRule.name)) { flopPort = flopType.ports.at(RTLIL::escape_id("d")); - } - else if (a_Cell->input(a_PortRule.name)) { + } else if (a_Cell->input(a_PortRule.name)) { flopPort = flopType.ports.at(RTLIL::escape_id("q")); } @@ -1010,17 +940,15 @@ struct DspFF : public Pass { // Get parameters to be mapped to the DSP according to the port // rule. dict mappedParams; - for (const auto& it : a_PortRule.params.map) { + for (const auto &it : a_PortRule.params.map) { if (flop->hasParam(it.second)) { - const auto& value = flop->getParam(it.second); + const auto &value = flop->getParam(it.second); mappedParams.insert(std::make_pair(it.first, value)); } } // Store the flop and its data - auto res = groups.insert( - std::make_pair(getFlopData(flop, mappedParams),groups.size()) - ); + auto res = groups.insert(std::make_pair(getFlopData(flop, mappedParams), groups.size())); flops[i] = std::make_pair(flop, res.first->second); } @@ -1037,7 +965,7 @@ struct DspFF : public Pass { } // Validate the flip flop data agains the DSP cell - const auto& flopData = groups.begin()->first; + const auto &flopData = groups.begin()->first; if (!checkFlopDataAgainstDspPort(flopData, a_Cell, a_PortRule)) { log_debug(" flip-flop vs. DSP check failed\n"); return; @@ -1045,27 +973,22 @@ struct DspFF : public Pass { // Debug log log(" %s %s.%s\n", a_Cell->type.c_str(), a_Cell->name.c_str(), a_PortRule.name.c_str()); - for (size_t i=0; itype.c_str(), flops[i].first->name.c_str()); - } - else if ((a_PortRule.bits.first >= 0 && (int)i < a_PortRule.bits.first) || - (a_PortRule.bits.second >= 0 && (int)i > a_PortRule.bits.second)) - { + log_debug(" %2zu. (%d) %s %s\n", i, flops[i].second, flops[i].first->type.c_str(), flops[i].first->name.c_str()); + } else if ((a_PortRule.bits.first >= 0 && (int)i < a_PortRule.bits.first) || + (a_PortRule.bits.second >= 0 && (int)i > a_PortRule.bits.second)) { log_debug(" %2zu. (excluded)\n", i); - } - else { + } else { log_debug(" %2zu. None\n", i); } } // Reconnect data signals, mark the flip-flop for removal - const auto& flopType = m_FlopTypes.at(flopData.type); - for (size_t i=0; ioutput(a_PortRule.name)) { port = flopType.ports.at(RTLIL::escape_id("q")); - } - else if (a_Cell->input(a_PortRule.name)) { + } else if (a_Cell->input(a_PortRule.name)) { port = flopType.ports.at(RTLIL::escape_id("d")); } - + if (!flop->hasPort(port)) { - log_error(" cell '%s' does not have port '%s'!\n", - flop->type.c_str(), port.c_str()); + log_error(" cell '%s' does not have port '%s'!\n", flop->type.c_str(), port.c_str()); } sigbits[i] = SigBit(RTLIL::Sx); @@ -1096,33 +1017,31 @@ struct DspFF : public Pass { // Reconnect (map) control signals. Connect the default value if // a particular signal is not present in the flip-flop. - for (const auto& it : a_PortRule.assoc) { - const auto& key = it.first; - const auto& port = it.second.first; - + for (const auto &it : a_PortRule.assoc) { + const auto &key = it.first; + const auto &port = it.second.first; + auto conn = RTLIL::SigBit(RTLIL::SigChunk(it.second.second)); if (flopData.conns.count(key)) { conn = flopData.conns.at(key); } - log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), - port.c_str(), sigBitName(conn).c_str()); + log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), port.c_str(), sigBitName(conn).c_str()); a_Cell->setPort(port, conn); m_DspChanges[a_Cell].conns.insert(port); } // Connect control signals according to DSP port rule - for (const auto& it : a_PortRule.connect) { - log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), - it.first.c_str(), it.second.as_string().c_str()); + for (const auto &it : a_PortRule.connect) { + log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), it.first.c_str(), it.second.as_string().c_str()); a_Cell->setPort(it.first, it.second); m_DspChanges[a_Cell].conns.insert(it.first); } // Map parameters (port rule) - for (const auto& it : a_PortRule.params.map) { + for (const auto &it : a_PortRule.params.map) { if (flopData.params.dsp.count(it.second)) { - const auto& param = flopData.params.dsp.at(it.second); + const auto ¶m = flopData.params.dsp.at(it.second); log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); a_Cell->setParam(it.first, param); m_DspChanges[a_Cell].params.insert(it.first); @@ -1130,9 +1049,9 @@ struct DspFF : public Pass { } // Map parameters (flip-flop rule) - for (const auto& it : flopType.params.map) { + for (const auto &it : flopType.params.map) { if (flopData.params.dsp.count(it.second)) { - const auto& param = flopData.params.dsp.at(it.second); + const auto ¶m = flopData.params.dsp.at(it.second); log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); a_Cell->setParam(it.first, param); m_DspChanges[a_Cell].params.insert(it.first); @@ -1140,14 +1059,14 @@ struct DspFF : public Pass { } // Set parameters (port rule) - for (const auto& it : a_PortRule.params.set) { + for (const auto &it : a_PortRule.params.set) { log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); a_Cell->setParam(it.first, it.second); m_DspChanges[a_Cell].params.insert(it.first); } // Set parameters (flip-flop rule) - for (const auto& it : flopType.params.set) { + for (const auto &it : flopType.params.set) { log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); a_Cell->setParam(it.first, it.second); m_DspChanges[a_Cell].params.insert(it.first); @@ -1158,21 +1077,18 @@ struct DspFF : public Pass { /// Collects flip-flop connectivity data and parameters which defines the /// group it belongs to. - FlopData getFlopData (RTLIL::Cell* a_Cell, - const dict& a_ExtraParams) + FlopData getFlopData(RTLIL::Cell *a_Cell, const dict &a_ExtraParams) { - FlopData data (a_Cell->type); + FlopData data(a_Cell->type); log_assert(m_FlopTypes.count(a_Cell->type) != 0); - const auto& flopType = m_FlopTypes.at(a_Cell->type); + const auto &flopType = m_FlopTypes.at(a_Cell->type); // Gather connections to control ports - for (const auto& it : flopType.ports) { + for (const auto &it : flopType.ports) { // Skip "D" and "Q" as they connection will always differ. - if (it.first == RTLIL::escape_id("d") || - it.first == RTLIL::escape_id("q")) - { + if (it.first == RTLIL::escape_id("d") || it.first == RTLIL::escape_id("q")) { continue; } @@ -1187,24 +1103,24 @@ struct DspFF : public Pass { } // Gather flip-flop parameters that need to match - for (const auto& it : flopType.params.matching) { + for (const auto &it : flopType.params.matching) { log_assert(a_Cell->hasParam(it)); data.params.flop.insert(std::make_pair(it, a_Cell->getParam(it))); } // Gather flip-flop parameters to be mapped to the DSP as well - for (const auto& it : flopType.params.map) { + for (const auto &it : flopType.params.map) { log_assert(a_Cell->hasParam(it.second)); data.params.flop.insert(std::make_pair(it.second, a_Cell->getParam(it.second))); } // Gather DSP parameters and their values to be set to too - for (const auto& it : flopType.params.set) { + for (const auto &it : flopType.params.set) { data.params.dsp.insert(it); } // Append extra DSP parameters - for (const auto& it : a_ExtraParams) { + for (const auto &it : a_ExtraParams) { data.params.dsp.insert(it); } @@ -1213,7 +1129,8 @@ struct DspFF : public Pass { /// Retrieves a list of sinks driven by the given cell pin. /// TODO: This is slow, need to make a lookup for that. - pool getSinks (const CellPin& a_Driver) { + pool getSinks(const CellPin &a_Driver) + { auto module = a_Driver.cell->module; pool sinks; @@ -1223,7 +1140,7 @@ struct DspFF : public Pass { // Get the driver sigbit auto driverSigspec = a_Driver.cell->getPort(a_Driver.port); - auto driverSigbit = m_SigMap(driverSigspec.bits().at(a_Driver.bit)); + auto driverSigbit = m_SigMap(driverSigspec.bits().at(a_Driver.bit)); // Look for connected sinks for (auto cell : module->cells()) { @@ -1288,7 +1205,8 @@ struct DspFF : public Pass { /// Finds a driver for the given cell pin /// TODO: This is slow, need to make a lookup for that. - CellPin getDriver (const CellPin& a_Sink) { + CellPin getDriver(const CellPin &a_Sink) + { auto module = a_Sink.cell->module; // The sink has to be an input pin @@ -1296,7 +1214,7 @@ struct DspFF : public Pass { // Get the sink sigbit auto sinkSigspec = a_Sink.cell->getPort(a_Sink.port); - auto sinkSigbit = m_SigMap(sinkSigspec.bits().at(a_Sink.bit)); + auto sinkSigbit = m_SigMap(sinkSigspec.bits().at(a_Sink.bit)); // Look for connected top-level input ports for (auto conn : module->connections()) { @@ -1363,4 +1281,3 @@ struct DspFF : public Pass { } DspFF; PRIVATE_NAMESPACE_END - From 8e1a3f30e6677d4d4a04be75cb949a0f10efae4d Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 16:04:55 +0100 Subject: [PATCH 583/845] Added license headers Signed-off-by: Maciej Kurc --- .../tests/nexus_conn_conflict/nexus_conn_conflict.v | 8 ++++++++ dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v | 8 ++++++++ dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v | 8 ++++++++ dsp_ff-plugin/tests/nexus_mult/nexus_mult.v | 8 ++++++++ .../tests/nexus_param_conflict/nexus_param_conflict.v | 8 ++++++++ 5 files changed, 40 insertions(+) diff --git a/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v b/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v index 2eb863454..2224690bb 100644 --- a/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v +++ b/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module conflict_dsp_clk ( input wire CLK_A, input wire CLK_B, diff --git a/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v b/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v index 856cda8b4..88be6b0d3 100644 --- a/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v +++ b/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module conflict_out_fanout ( input wire CLK, input wire [ 8:0] A, diff --git a/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v b/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v index e4f22fe28..2c5b8ecb8 100644 --- a/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v +++ b/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module mult_ena ( input wire CLK, input wire ENA, diff --git a/dsp_ff-plugin/tests/nexus_mult/nexus_mult.v b/dsp_ff-plugin/tests/nexus_mult/nexus_mult.v index 4b7bda43f..1ca806d83 100644 --- a/dsp_ff-plugin/tests/nexus_mult/nexus_mult.v +++ b/dsp_ff-plugin/tests/nexus_mult/nexus_mult.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module mult_ireg ( input wire CLK, input wire [ 8:0] A, diff --git a/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v b/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v index d03d611a1..d9ec0e873 100644 --- a/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v +++ b/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module conflict_dsp_ctrl_param ( input wire CLK, input wire [ 8:0] A, From 7feae2ea091129413025810d2306f80560dd8c69 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 16:15:14 +0100 Subject: [PATCH 584/845] Build system tweaks Signed-off-by: Maciej Kurc --- Makefile | 2 +- Makefile_plugin.common | 2 +- {dsp_ff-plugin => dsp-ff-plugin}/Makefile | 0 {dsp_ff-plugin => dsp-ff-plugin}/dsp_ff.cc | 0 {dsp_ff-plugin => dsp-ff-plugin}/nexus-dsp_rules.txt | 0 {dsp_ff-plugin => dsp-ff-plugin}/tests/Makefile | 0 .../tests/nexus_conn_conflict/nexus_conn_conflict.tcl | 0 .../tests/nexus_conn_conflict/nexus_conn_conflict.v | 0 .../tests/nexus_conn_share/nexus_conn_share.tcl | 0 .../tests/nexus_conn_share/nexus_conn_share.v | 0 .../tests/nexus_fftypes/nexus_fftypes.tcl | 0 .../tests/nexus_fftypes/nexus_fftypes.v | 0 {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_mult/README.md | 0 .../tests/nexus_mult/nexus_mult.tcl | 0 {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_mult/nexus_mult.v | 0 .../tests/nexus_param_conflict/nexus_param_conflict.tcl | 0 .../tests/nexus_param_conflict/nexus_param_conflict.v | 0 17 files changed, 2 insertions(+), 2 deletions(-) rename {dsp_ff-plugin => dsp-ff-plugin}/Makefile (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/dsp_ff.cc (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/nexus-dsp_rules.txt (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/Makefile (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_conn_conflict/nexus_conn_conflict.tcl (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_conn_conflict/nexus_conn_conflict.v (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_conn_share/nexus_conn_share.tcl (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_conn_share/nexus_conn_share.v (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_fftypes/nexus_fftypes.tcl (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_fftypes/nexus_fftypes.v (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_mult/README.md (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_mult/nexus_mult.tcl (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_mult/nexus_mult.v (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_param_conflict/nexus_param_conflict.tcl (100%) rename {dsp_ff-plugin => dsp-ff-plugin}/tests/nexus_param_conflict/nexus_param_conflict.v (100%) diff --git a/Makefile b/Makefile index 9d3645059..00e026369 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # # SPDX-License-Identifier:ISC -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf uhdm dsp_ff +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf uhdm 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)) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 0870f211a..49d6ab5f1 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -55,7 +55,7 @@ PLUGINS_DIR ?= $(shell $(YOSYS_CONFIG) --datdir)/plugins DATA_DIR ?= $(shell $(YOSYS_CONFIG) --datdir) EXTRA_FLAGS ?= -OBJS := $(SOURCES:cc=o) +OBJS := $(patsubst %.cc,%.o,$(SOURCES)) all: $(NAME).so diff --git a/dsp_ff-plugin/Makefile b/dsp-ff-plugin/Makefile similarity index 100% rename from dsp_ff-plugin/Makefile rename to dsp-ff-plugin/Makefile diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp-ff-plugin/dsp_ff.cc similarity index 100% rename from dsp_ff-plugin/dsp_ff.cc rename to dsp-ff-plugin/dsp_ff.cc diff --git a/dsp_ff-plugin/nexus-dsp_rules.txt b/dsp-ff-plugin/nexus-dsp_rules.txt similarity index 100% rename from dsp_ff-plugin/nexus-dsp_rules.txt rename to dsp-ff-plugin/nexus-dsp_rules.txt diff --git a/dsp_ff-plugin/tests/Makefile b/dsp-ff-plugin/tests/Makefile similarity index 100% rename from dsp_ff-plugin/tests/Makefile rename to dsp-ff-plugin/tests/Makefile diff --git a/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl similarity index 100% rename from dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl rename to dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl diff --git a/dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v similarity index 100% rename from dsp_ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v rename to dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v diff --git a/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl b/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl similarity index 100% rename from dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl rename to dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl diff --git a/dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v b/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v similarity index 100% rename from dsp_ff-plugin/tests/nexus_conn_share/nexus_conn_share.v rename to dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v diff --git a/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl b/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl similarity index 100% rename from dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl rename to dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl diff --git a/dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v b/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v similarity index 100% rename from dsp_ff-plugin/tests/nexus_fftypes/nexus_fftypes.v rename to dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v diff --git a/dsp_ff-plugin/tests/nexus_mult/README.md b/dsp-ff-plugin/tests/nexus_mult/README.md similarity index 100% rename from dsp_ff-plugin/tests/nexus_mult/README.md rename to dsp-ff-plugin/tests/nexus_mult/README.md diff --git a/dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl similarity index 100% rename from dsp_ff-plugin/tests/nexus_mult/nexus_mult.tcl rename to dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl diff --git a/dsp_ff-plugin/tests/nexus_mult/nexus_mult.v b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v similarity index 100% rename from dsp_ff-plugin/tests/nexus_mult/nexus_mult.v rename to dsp-ff-plugin/tests/nexus_mult/nexus_mult.v diff --git a/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl similarity index 100% rename from dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl rename to dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl diff --git a/dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v similarity index 100% rename from dsp_ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v rename to dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v From bf34b6bf88aeb4b3958abe9ed5423d3f77c87e87 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 11 Feb 2022 17:12:29 +0100 Subject: [PATCH 585/845] Added missing parsing of required flip-flop parameters, added pass help Signed-off-by: Maciej Kurc --- dsp-ff-plugin/dsp_ff.cc | 85 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/dsp-ff-plugin/dsp_ff.cc b/dsp-ff-plugin/dsp_ff.cc index eb7b44947..bceb080cd 100644 --- a/dsp-ff-plugin/dsp_ff.cc +++ b/dsp-ff-plugin/dsp_ff.cc @@ -398,6 +398,20 @@ struct DspFF : public Pass { flopTypes.back().ports[RTLIL::escape_id("q")] = RTLIL::escape_id(fields[1]); } + // Parameters that must be set to certain values + else if (fields[0] == "require") { + if (fields.size() < 2) { + log_error(" syntax error: '%s'\n", line.c_str()); + } + if (tok.size() == 0 || tok.back() != "ff") { + log_error(" unexpected keyword '%s'\n", fields[0].c_str()); + } + + const auto vec = parseNameValue(fields); + for (const auto &it : vec) { + flopTypes.back().params.required.insert(std::make_pair(RTLIL::escape_id(it.first), RTLIL::Const(it.second))); + } + } // Parameters that has to match for a flip-flop else if (fields[0] == "match") { if (fields.size() < 2) { @@ -545,7 +559,13 @@ struct DspFF : public Pass { log(" %.3s: %s\n", it.first.c_str(), !it.second.empty() ? it.second.c_str() : ""); } - if (!ff.params.set.empty()) { + if (!ff.params.required.empty()) { + log(" required params:\n"); + for (const auto &it : ff.params.required) { + log(" %s=%s\n", it.first.c_str(), it.second.decode_string().c_str()); + } + } + if (!ff.params.matching.empty()) { log(" params that must match:\n"); for (const auto &it : ff.params.matching) { log(" %s\n", it.c_str()); @@ -593,6 +613,69 @@ struct DspFF : public Pass { log("\n"); log("Integrates flip-flops with DSP blocks and enables their internal registers.\n"); log("\n"); + log("The pass loads a set of rules from the file given with the '-rules' parameter.\n"); + log("The rules define what ports of a DSP module have internal registers and what\n"); + log("has to be done to enable them. They also define compatible flip-flop cell\n"); + log("types.\n"); + log("\n"); + log("The format of the rules file is the following:\n"); + log("\n"); + log(" # This is a comment\n"); + log("\n"); + log(" dsp [ ...]\n"); + log(" port \n"); + log(" clk \n"); + log(" [rst ] \n"); + log(" [ena ] \n"); + log("\n"); + log(" [set = [= ...]]\n"); + log(" [map = [= ...]]\n"); + log(" [con = [= ...]]\n"); + log(" endport\n"); + log(" enddsp\n"); + log("\n"); + log(" ff \n"); + log(" clk \n"); + log(" [rst ]\n"); + log(" [ena ]\n"); + log(" d \n"); + log(" q \n"); + log("\n"); + log(" require = [= ...]\n"); + log(" match [ ...]\n"); + log("\n"); + log(" set = [= ...]\n"); + log(" map = [= ...]\n"); + log(" endff\n"); + log("\n"); + log("Each 'dsp' section defines a DSP cell type (can apply to multiple types).\n"); + log("Within it each 'port' section defining a data port with internal register.\n"); + log("The port can be specified as a whole (eg. 'DATA') or as a subset of the whole\n"); + log("(eg. 'DATA[7:0]').\n"); + log("\n"); + log("Statemenst 'clk', 'rst' and 'ena' define names of clock, reset and enable\n"); + log("ports associated with the data port along with default constant values to\n"); + log("connect them to when a given port has no counterpart in the flip-flop bein\n"); + log("integrated.\n"); + log("\n"); + log("The 'set' statement tells how to set control parameter(s) of the DSP that\n"); + log("enable the input register on the port. The 'map' statement defines how to\n"); + log("map parameter(s) of the flip-flip being integrated to the DSP. Finally the\n"); + log("'con' statement informs how to connected control port(s) of the DSP to enable\n"); + log("the register.\n"); + log("\n"); + log("Each 'ff' section defines a flip-flop type that can be integrated into a DSP\n"); + log("cell. Inside this section 'clk', 'rst', 'ena', 'd' and 'q' define names of\n"); + log("clock, reset, enable, data in and data out ports of the flip-flop respectively.\n"); + log("\n"); + log("The 'require' statement defines parameter(s) that must have specific value\n"); + log("for a flip-flop to be considered for integration. The 'match' statement\n"); + log("lists names of flip-flop parameters that must match on all flip-flops connected\n"); + log("to a single DSP data port.\n"); + log("\n"); + log("The 'set' and 'map' statements serve the same function as in the DSP port\n"); + log("section but here they may differ depending on the flip-flop type being\n"); + log("integrated.\n"); } void execute(std::vector a_Args, RTLIL::Design *a_Design) override From bacdb1370a45208db41c31d5e52f15545c498caf Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 14 Feb 2022 09:21:36 +0100 Subject: [PATCH 586/845] Code formatting, license headers Signed-off-by: Maciej Kurc --- ql-qlf-plugin/synth_quicklogic.cc | 15 +++++---------- .../tests/qlf_k6n10f/dsp_mult/dsp_mult.v | 8 ++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index ec35d7191..d115709e1 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -250,8 +250,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("ql_dsp", " (for qlf_k6n10 if not -no_dsp)"); run("chtype -set $mul t:$__soft_mul", "(for qlf_k6n10 if not -no_dsp)"); } - } - else if (family == "qlf_k6n10f") { + } else if (family == "qlf_k6n10f") { struct DspParams { size_t a_maxwidth; @@ -262,8 +261,8 @@ struct SynthQuickLogicPass : public ScriptPass { }; const std::vector dsp_rules = { - {20, 18, 11, 10, "$__QL_MUL20X18"}, - {10, 9, 4, 4, "$__QL_MUL10X9"}, + {20, 18, 11, 10, "$__QL_MUL20X18"}, + {10, 9, 4, 4, "$__QL_MUL10X9"}, }; if (help_mode) { @@ -271,8 +270,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("techmap -map +/mul2dsp.v [...]", "(for qlf_k6n10f if not -no_dsp)"); run("chtype -set $mul t:$__soft_mul", "(for qlf_k6n10f if not -no_dsp)"); run("techmap -map +/quicklogic/" + family + "/dsp_map.v", "(for qlf_k6n10f if not -no_dsp)"); - } - else if (!nodsp) { + } else if (!nodsp) { run("wreduce t:$mul"); for (const auto &rule : dsp_rules) { @@ -280,10 +278,7 @@ struct SynthQuickLogicPass : public ScriptPass { "-D DSP_A_MAXWIDTH=%zu -D DSP_B_MAXWIDTH=%zu " "-D DSP_A_MINWIDTH=%zu -D DSP_B_MINWIDTH=%zu " "-D DSP_NAME=%s", - rule.a_maxwidth, rule.b_maxwidth, - rule.a_minwidth, rule.b_minwidth, - rule.type.c_str()) - ); + rule.a_maxwidth, rule.b_maxwidth, rule.a_minwidth, rule.b_minwidth, rule.type.c_str())); run("chtype -set $mul t:$__soft_mul"); } run("techmap -map +/quicklogic/" + family + "/dsp_map.v"); diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v index 9d09831f1..cd07ba3e9 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module mult_16x16 ( input wire [15:0] A, input wire [15:0] B, From e8b207bac580741b2387f2c94905fd61af8c1833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Mon, 14 Feb 2022 11:40:26 +0100 Subject: [PATCH 587/845] Add write to task calls list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 790debe8d..c8a7e3212 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3134,7 +3134,7 @@ void UhdmAst::process_sys_func_call() return; } - std::string task_calls[] = {"\\$display", "\\$monitor", "\\$time", "\\$readmemh"}; + std::string task_calls[] = {"\\$display", "\\$monitor", "\\$write", "\\$time", "\\$readmemh"}; if (current_node->str == "\\$signed") { current_node->type = AST::AST_TO_SIGNED; From 13adfc7a603ea7a266aada036efbe35f4eadc334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Mon, 14 Feb 2022 14:31:05 +0100 Subject: [PATCH 588/845] Add handling of %b format specifier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index c8a7e3212..63644940f 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -773,6 +773,40 @@ static AST::AstNode *make_packed_struct_local(AST::AstNode *template_node, std:: return wnode; } +static void simplify_format_string(AST::AstNode *current_node) +{ + std::string sformat = current_node->children[0]->str; + std::string preformatted_string = ""; + int next_arg = 1; + for (size_t i = 0; i < sformat.length(); i++) { + if (sformat[i] == '%') { + AST::AstNode *node_arg = current_node->children[next_arg]; + char cformat = sformat[++i]; + if (cformat == 'b' or cformat == 'B') { + node_arg->simplify(true, false, false, 1, -1, false, false); + if (node_arg->type != AST::AST_CONSTANT) + log_file_error(current_node->filename, current_node->location.first_line, + "Failed to evaluate system task `%s' with non-constant argument.\n", current_node->str.c_str()); + + RTLIL::Const val = node_arg->bitsAsConst(); + for (int j = val.size() - 1; j >= 0; j--) { + // We add ACII value of 0 to convert number to character + preformatted_string += ('0' + val[j]); + } + delete current_node->children[next_arg]; + current_node->children.erase(current_node->children.begin() + next_arg); + } else { + next_arg++; + preformatted_string += std::string("%") + cformat; + } + } else { + preformatted_string += sformat[i]; + } + } + delete current_node->children[0]; + current_node->children[0] = AST::AstNode::mkconst_str(preformatted_string); +} + static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) { AST::AstNode *expanded = nullptr; @@ -876,6 +910,10 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) while (current_node->simplify(true, false, false, 1, -1, false, false)) { }; break; + case AST::AST_TCALL: + if (current_node->str == "$display" || current_node->str == "$write") + simplify_format_string(current_node); + break; default: break; } From d50bb902af313d62b5ad0bde9fc3eaf7e271f183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Mon, 14 Feb 2022 16:44:15 +0100 Subject: [PATCH 589/845] Move readmemb, finish and stop to task list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index e21c84f80..567a2f96b 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3173,7 +3173,7 @@ void UhdmAst::process_sys_func_call() return; } - std::string task_calls[] = {"\\$display", "\\$monitor", "\\$write", "\\$time", "\\$readmemh"}; + std::string task_calls[] = {"\\$display", "\\$monitor", "\\$write", "\\$time", "\\$readmemh", "\\$readmemb", "\\$finish", "\\$stop"}; if (current_node->str == "\\$signed") { current_node->type = AST::AST_TO_SIGNED; From ec1ad2f32fe1cf9502d5d4fe6e20e0a084007ac1 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 15 Feb 2022 14:34:50 +0100 Subject: [PATCH 590/845] Reworked the plugin code to allow for single parameter control multiple registered ports of a DSP cell Signed-off-by: Maciej Kurc --- dsp-ff-plugin/dsp_ff.cc | 519 +++++++++++++++++++++------------------- 1 file changed, 278 insertions(+), 241 deletions(-) diff --git a/dsp-ff-plugin/dsp_ff.cc b/dsp-ff-plugin/dsp_ff.cc index bceb080cd..09c7e4147 100644 --- a/dsp-ff-plugin/dsp_ff.cc +++ b/dsp-ff-plugin/dsp_ff.cc @@ -65,16 +65,20 @@ struct DspFF : public Pass { }; /// Describes a DSP cell port that has built-in register (flip-flops) - struct DspPortType { + struct PortType { RTLIL::IdString name; /// Range of port pins that have FFs (low to high, inclusive) std::pair bits; - /// A dict of associated cell ports indexed by their function (like "clk, "rst") /// along with the default value to connect when unused. dict> assoc; + }; + /// Describes a DSP register + struct RegisterType { + + /// Control parameters struct { /// A dict of parameters to be set in the cell after integration dict set; @@ -85,14 +89,26 @@ struct DspFF : public Pass { /// A list of ports to be connected to specific constants after flip-flop /// integration. dict connect; + + unsigned int hash() const { + unsigned int h = 0; + h = mkhash_add(h, params.set.hash()); + h = mkhash_add(h, params.map.hash()); + h = mkhash_add(h, connect.hash()); + return h; + } + + bool operator == (const RegisterType& ref) const { + return (params.set == ref.params.set) && + (params.map == ref.params.map) && + (connect == ref.connect); + } }; /// Describes a DSP cell type struct DspType { RTLIL::IdString name; - - /// A list of data ports with registers - std::vector ports; + dict> registers; }; /// Describes a changes made to a DSP cell @@ -203,7 +219,12 @@ struct DspFF : public Pass { log_error(" Error opening file!\n"); } - std::vector dspTypes; + // Parse each port as if it was associated with its own DSP register. + // Group them each time a port definition is complete. + PortType portType; + RegisterType registerType; + + std::vector dspTypes; std::vector flopTypes; std::vector dspAliases; @@ -259,6 +280,7 @@ struct DspFF : public Pass { tok.pop_back(); const auto dspType = dspTypes.back(); + for (const auto &alias : dspAliases) { dspTypes.push_back(dspType); dspTypes.back().name = alias; @@ -277,13 +299,15 @@ struct DspFF : public Pass { auto spec = parsePortName(fields[1]); - auto &ports = dspTypes.back().ports; - ports.resize(ports.size() + 1); - ports.back().name = RTLIL::escape_id(std::get<0>(spec)); - ports.back().bits = std::make_pair(std::get<2>(spec), std::get<1>(spec)); - ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("clk"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); - ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("rst"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); - ports.back().assoc.insert(std::make_pair(RTLIL::escape_id("ena"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + portType = PortType(); + portType.name = RTLIL::escape_id(std::get<0>(spec)); + portType.bits = std::make_pair(std::get<2>(spec), std::get<1>(spec)); + portType.assoc.insert(std::make_pair(RTLIL::escape_id("clk"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + portType.assoc.insert(std::make_pair(RTLIL::escape_id("rst"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + portType.assoc.insert(std::make_pair(RTLIL::escape_id("ena"), std::make_pair(RTLIL::IdString(), RTLIL::Sx))); + + registerType = RegisterType(); + } else if (fields[0] == "endport") { if (fields.size() != 1) { log_error(" syntax error: '%s'\n", line.c_str()); @@ -292,6 +316,9 @@ struct DspFF : public Pass { log_error(" unexpected keyword '%s'\n", fields[0].c_str()); } tok.pop_back(); + + auto& dspType = dspTypes.back(); + dspType.registers[registerType].push_back(portType); } // Flip-flop type section @@ -332,8 +359,7 @@ struct DspFF : public Pass { if (fields.size() != 3) { log_error(" syntax error: '%s'\n", line.c_str()); } - auto &ports = dspTypes.back().ports; - ports.back().assoc[RTLIL::escape_id("clk")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::Const::from_string(fields[2])); + portType.assoc[RTLIL::escape_id("clk")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::Const::from_string(fields[2])); } else if (tok.back() == "ff") { if (fields.size() != 2) { log_error(" syntax error: '%s'\n", line.c_str()); @@ -350,8 +376,7 @@ struct DspFF : public Pass { if (fields.size() != 3) { log_error(" syntax error: '%s'\n", line.c_str()); } - auto &ports = dspTypes.back().ports; - ports.back().assoc[RTLIL::escape_id("rst")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::Const::from_string(fields[2])); + portType.assoc[RTLIL::escape_id("rst")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::Const::from_string(fields[2])); } else if (tok.back() == "ff") { if (fields.size() != 2) { log_error(" syntax error: '%s'\n", line.c_str()); @@ -368,8 +393,7 @@ struct DspFF : public Pass { if (fields.size() != 3) { log_error(" syntax error: '%s'\n", line.c_str()); } - auto &ports = dspTypes.back().ports; - ports.back().assoc[RTLIL::escape_id("ena")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::Const::from_string(fields[2])); + portType.assoc[RTLIL::escape_id("ena")] = std::make_pair(RTLIL::escape_id(fields[1]), RTLIL::Const::from_string(fields[2])); } else if (tok.back() == "ff") { if (fields.size() != 2) { log_error(" syntax error: '%s'\n", line.c_str()); @@ -441,8 +465,7 @@ struct DspFF : public Pass { } if (tok.back() == "port") { - auto &ports = dspTypes.back().ports; - ports.back().params.set.swap(set); + registerType.params.set.swap(set); } else if (tok.back() == "ff") { flopTypes.back().params.set.swap(set); } @@ -463,8 +486,7 @@ struct DspFF : public Pass { } if (tok.back() == "port") { - auto &ports = dspTypes.back().ports; - ports.back().params.map.swap(map); + registerType.params.map.swap(map); } else if (tok.back() == "ff") { flopTypes.back().params.map.swap(map); } @@ -479,9 +501,8 @@ struct DspFF : public Pass { } const auto vec = parseNameValue(fields); - auto &ports = dspTypes.back().ports; for (const auto &it : vec) { - ports.back().connect.insert(std::make_pair(RTLIL::escape_id(it.first), RTLIL::Const(it.second))); + registerType.connect.insert(std::make_pair(RTLIL::escape_id(it.first), RTLIL::Const(it.second))); } } @@ -510,40 +531,44 @@ struct DspFF : public Pass { // Dump DSP types log("DSP types:\n"); - for (const auto &it : m_DspTypes) { - const auto &dsp = it.second; + for (const auto &it1 : m_DspTypes) { + const auto &dsp = it1.second; log(" %s\n", dsp.name.c_str()); - log(" ports:\n"); - for (const auto &port : dsp.ports) { + for (const auto& it2 : dsp.registers) { + const auto& reg = it2.first; + const auto& ports = it2.second; + log(" ports:\n"); + for (const auto &port : ports) { - std::string range; - if (port.bits.first != -1 && port.bits.second != -1) { - range = stringf("[%d:%d]", port.bits.second, port.bits.first); - } + std::string range; + if (port.bits.first != -1 && port.bits.second != -1) { + range = stringf("[%d:%d]", port.bits.second, port.bits.first); + } - log(" %s.%s%s\n", dsp.name.c_str(), port.name.c_str(), range.c_str()); + log(" %s.%s%s\n", dsp.name.c_str(), port.name.c_str(), range.c_str()); - for (const auto &it : port.assoc) { - log(" %.3s: %s\n", it.first.c_str(), !it.second.first.empty() ? it.second.first.c_str() : ""); - } + for (const auto &it : port.assoc) { + log(" %.3s: %s\n", it.first.c_str(), !it.second.first.empty() ? it.second.first.c_str() : ""); + } - if (!port.params.set.empty()) { - log(" set params:\n"); - for (const auto &it : port.params.set) { - log(" %s=%s\n", it.first.c_str(), it.second.decode_string().c_str()); + if (!reg.params.set.empty()) { + log(" set params:\n"); + for (const auto &it : reg.params.set) { + log(" %s=%s\n", it.first.c_str(), it.second.decode_string().c_str()); + } } - } - if (!port.params.map.empty()) { - log(" map params:\n"); - for (const auto &it : port.params.map) { - log(" %s=%s\n", it.first.c_str(), it.second.c_str()); + if (!reg.params.map.empty()) { + log(" map params:\n"); + for (const auto &it : reg.params.map) { + log(" %s=%s\n", it.first.c_str(), it.second.c_str()); + } } - } - if (!port.connect.empty()) { - log(" connect ports:\n"); - for (const auto &it : port.connect) { - log(" %s.%s=%s\n", dsp.name.c_str(), it.first.c_str(), it.second.as_string().c_str()); + if (!reg.connect.empty()) { + log(" connect ports:\n"); + for (const auto &it : reg.connect) { + log(" %s.%s=%s\n", dsp.name.c_str(), it.first.c_str(), it.second.as_string().c_str()); + } } } } @@ -732,17 +757,10 @@ struct DspFF : public Pass { continue; } - // Check ports - auto &rule = m_DspTypes.at(cell->type); - for (auto &portRule : rule.ports) { - - // Sanity check - if (!cell->hasPort(portRule.name)) { - log(" The DSP cell '%s' does not have a port named '%s'!\n", cell->type.c_str(), portRule.name.c_str()); - continue; - } - - processPort(cell, portRule); + // Process all registers + auto &dspType = m_DspTypes.at(cell->type); + for (auto& rule : dspType.registers) { + processRegister(cell, rule.first, rule.second); } } @@ -763,28 +781,12 @@ struct DspFF : public Pass { // // TODO: // } - bool checkDspPort(RTLIL::Cell *a_Cell, const DspPortType &a_PortRule) - { - bool isOk = true; - - // The cell register control parameters must not be set - for (const auto &it : a_PortRule.params.set) { - const auto curr = a_Cell->getParam(it.first); - if (curr == it.second) { - log_debug(" the param '%s' is already set to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); - isOk = false; - } - } - - return isOk; - } - bool checkFlop(RTLIL::Cell *a_Cell) { const auto &flopType = m_FlopTypes.at(a_Cell->type); bool isOk = true; - log_debug(" Checking connected flip-flop '%s' of type '%s'... ", a_Cell->name.c_str(), a_Cell->type.c_str()); + log_debug(" checking connected flip-flop '%s' of type '%s'... ", a_Cell->name.c_str(), a_Cell->type.c_str()); // Must not have the "keep" attribute if (a_Cell->has_keep_attr()) { @@ -810,33 +812,37 @@ struct DspFF : public Pass { return isOk; } - bool checkFlopDataAgainstDspPort(const FlopData &a_FlopData, RTLIL::Cell *a_Cell, const DspPortType &a_PortRule) + bool checkFlopDataAgainstDspRegister(const FlopData &a_FlopData, RTLIL::Cell *a_Cell, + const RegisterType &a_Register, + const std::vector& a_Ports) { const auto &flopType = m_FlopTypes.at(a_FlopData.type); const auto &changes = m_DspChanges[a_Cell]; bool isOk = true; - log_debug(" Checking connected flip-flop settings against the DSP port... "); + log_debug(" checking connected flip-flop settings against the DSP register... "); // Check control signal connections - for (const auto &it : a_PortRule.assoc) { - const auto &key = it.first; - const auto &port = it.second.first; - - SigBit conn(RTLIL::Sx); - if (!port.empty() && a_Cell->hasPort(port)) { - auto sigspec = a_Cell->getPort(port); - auto sigbits = sigspec.bits(); - log_assert(sigbits.size() <= 1); - if (!sigbits.empty()) { - conn = m_SigMap(sigbits[0]); + for (const auto& port : a_Ports) { + for (const auto &it : port.assoc) { + const auto &key = it.first; + const auto &port = it.second.first; + + SigBit conn(RTLIL::Sx); + if (!port.empty() && a_Cell->hasPort(port)) { + auto sigspec = a_Cell->getPort(port); + auto sigbits = sigspec.bits(); + log_assert(sigbits.size() <= 1); + if (!sigbits.empty()) { + conn = m_SigMap(sigbits[0]); + } } - } - if (conn.is_wire() || (!conn.is_wire() && conn.data != RTLIL::Sx)) { - if (conn != a_FlopData.conns.at(key)) { - log_debug("\n connection to port '%s' mismatch", port.c_str()); - isOk = false; + if (conn.is_wire() || (!conn.is_wire() && conn.data != RTLIL::Sx)) { + if (conn != a_FlopData.conns.at(key)) { + log_debug("\n connection to port '%s' mismatch", port.c_str()); + isOk = false; + } } } } @@ -852,7 +858,7 @@ struct DspFF : public Pass { }; // Check parameters to be mapped (by the port rule) - for (const auto &it : a_PortRule.params.map) { + for (const auto &it : a_Register.params.map) { if (a_Cell->hasParam(it.first) && a_FlopData.params.dsp.count(it.second)) { const auto curr = a_Cell->getParam(it.first); const auto flop = a_FlopData.params.dsp.at(it.second); @@ -861,7 +867,7 @@ struct DspFF : public Pass { } // Check parameters to be set (by the port rule) - for (const auto &it : a_PortRule.params.set) { + for (const auto &it : a_Register.params.set) { if (a_Cell->hasParam(it.first)) { const auto curr = a_Cell->getParam(it.first); checkParam(it.first, curr, it.second); @@ -920,212 +926,243 @@ struct DspFF : public Pass { // .......................................... - void processPort(RTLIL::Cell *a_Cell, const DspPortType &a_PortRule) + void processRegister(RTLIL::Cell *a_Cell, const RegisterType& a_Register, + const std::vector& a_Ports) { - log_debug(" Attempting flip-flop integration for %s.%s of %s\n", a_Cell->type.c_str(), a_PortRule.name.c_str(), a_Cell->name.c_str()); - - // Check if the port can be used for FF integration - log_assert(a_Cell->output(a_PortRule.name) || a_Cell->input(a_PortRule.name)); - if (!checkDspPort(a_Cell, a_PortRule)) { - log_debug(" port check failed\n"); - return; + // The cell register control parameter(s) must not be set + for (const auto &it : a_Register.params.set) { + const auto curr = a_Cell->getParam(it.first); + if (curr == it.second) { + log_debug(" the param '%s' is already set to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); + return; + } } - // Get port connections - auto sigspec = a_Cell->getPort(a_PortRule.name); - auto sigbits = sigspec.bits(); + pool groups; + dict> flops; - // Collect flip-flops, identify their group count - dict groups; + // Process ports + bool flopsOk = true; + for (const auto& port : a_Ports) { + log_debug(" attempting flip-flop integration for %s.%s of %s\n", a_Cell->type.c_str(), port.name.c_str(), a_Cell->name.c_str()); + log_assert(a_Cell->output(port.name) || a_Cell->input(port.name)); - std::vector> flops(sigbits.size(), std::make_pair(nullptr, -1)); + // Get port connections + auto sigspec = a_Cell->getPort(port.name); + auto sigbits = sigspec.bits(); - for (size_t i = 0; i < sigbits.size(); ++i) { - auto sigbit = sigbits[i]; - if (!sigbit.wire) { - continue; - } + flops[port.name] = std::vector(sigbits.size(), nullptr); + for (size_t i = 0; i < sigbits.size(); ++i) { + auto sigbit = sigbits[i]; + if (!sigbit.wire) { + continue; + } - // Skip bits out of the specified range - if ((a_PortRule.bits.first >= 0 && (int)i < a_PortRule.bits.first) || (a_PortRule.bits.second >= 0 && (int)i > a_PortRule.bits.second)) { - continue; - } + // Skip bits out of the specified range + if ((port.bits.first >= 0 && (int)i < port.bits.first) || (port.bits.second >= 0 && (int)i > port.bits.second)) { + continue; + } - pool others; + pool others; - // Get sinks(s), discard the port completely if more than one sink - // is found. - if (a_Cell->output(a_PortRule.name)) { - others = getSinks(CellPin(a_Cell, a_PortRule.name, i)); - if (others.size() > 1) { - log_debug(" multiple sinks found, cannot integrate.\n"); - return; + // Get sinks(s), discard the port completely if more than one sink + // is found. + if (a_Cell->output(port.name)) { + others = getSinks(CellPin(a_Cell, port.name, i)); + if (others.size() > 1) { + log_debug(" multiple sinks found\n"); + flopsOk = false; + continue; + } } - } - // Get driver. Discard if the driver drives something else too - // TODO: This is slow - we are first looking for a driver and then - // for all its sinks. - else if (a_Cell->input(a_PortRule.name)) { - auto driver = getDriver(CellPin(a_Cell, a_PortRule.name, i)); - if (driver.cell != nullptr) { - auto sinks = getSinks(driver); - if (sinks.size() > 1) { - log_debug(" multiple sinks found, cannot integrate.\n"); - return; + // Get driver. Discard if the driver drives something else too + // TODO: This is slow - we are first looking for a driver and then + // for all its sinks. + else if (a_Cell->input(port.name)) { + auto driver = getDriver(CellPin(a_Cell, port.name, i)); + if (driver.cell != nullptr) { + auto sinks = getSinks(driver); + if (sinks.size() > 1) { + log_debug(" multiple sinks found\n"); + flopsOk = false; + continue; + } } + others.insert(driver); } - others.insert(driver); - } - // No others - unconnected - if (others.empty()) { - continue; - } + // No others - unconnected + if (others.empty()) { + continue; + } - // Get the sink, check if this is a flip-flop - auto &other = *others.begin(); - auto *flop = other.cell; + // Get the sink, check if this is a flip-flop + auto &other = *others.begin(); + auto *flop = other.cell; - if (flop == nullptr) { - if (!other.port.empty()) { - log_debug(" port connection reaches outside of the module, cannot integrate\n"); - return; - } else { + if (flop == nullptr) { + if (!other.port.empty()) { + log_debug(" port connection reaches outside of the module\n"); + flopsOk = false; + } continue; } - } - if (!m_FlopTypes.count(flop->type)) { - log_debug(" non-flip-flop connected, cannot integrate\n"); - return; - } + if (!m_FlopTypes.count(flop->type)) { + log_debug(" non-flip-flop connected\n"); + flopsOk = false; + continue; + } - // Check if the connection goes to the data input/output port - const auto &flopType = m_FlopTypes.at(flop->type); - RTLIL::IdString flopPort; - if (a_Cell->output(a_PortRule.name)) { - flopPort = flopType.ports.at(RTLIL::escape_id("d")); - } else if (a_Cell->input(a_PortRule.name)) { - flopPort = flopType.ports.at(RTLIL::escape_id("q")); - } + // Check if the connection goes to the data input/output port + const auto &flopType = m_FlopTypes.at(flop->type); + RTLIL::IdString flopPort; + if (a_Cell->output(port.name)) { + flopPort = flopType.ports.at(RTLIL::escape_id("d")); + } else if (a_Cell->input(port.name)) { + flopPort = flopType.ports.at(RTLIL::escape_id("q")); + } - if (flopPort != other.port) { - log_debug(" connection to non-data port of a flip-flip, cannot integrate\n"); - return; - } + if (flopPort != other.port) { + log_debug(" connection to non-data port of a flip-flip"); + flopsOk = false; + continue; + } - // Check the flip-flop configuration - if (!checkFlop(flop)) { - return; - } + // Check the flip-flop configuration + if (!checkFlop(flop)) { + flopsOk = false; + continue; + } - // Get parameters to be mapped to the DSP according to the port - // rule. - dict mappedParams; - for (const auto &it : a_PortRule.params.map) { - if (flop->hasParam(it.second)) { - const auto &value = flop->getParam(it.second); - mappedParams.insert(std::make_pair(it.first, value)); + // Get parameters to be mapped to the DSP according to the port + // rule. + dict mappedParams; + for (const auto &it : a_Register.params.map) { + if (flop->hasParam(it.second)) { + const auto &value = flop->getParam(it.second); + mappedParams.insert(std::make_pair(it.first, value)); + } } + + // Store the flop and its data + groups.insert(getFlopData(flop, mappedParams)); + flops[port.name][i] = flop; } + } - // Store the flop and its data - auto res = groups.insert(std::make_pair(getFlopData(flop, mappedParams), groups.size())); - flops[i] = std::make_pair(flop, res.first->second); + // Cannot integrate for various reasons + if (!flopsOk) { + log_debug(" cannot use the DSP register\n"); + return; } // No matching flip-flop groups if (groups.empty()) { - log_debug(" no matching flip-flops found\n"); + log_debug(" no matching flip-flops found\n"); return; } // Do not allow more than a single group if (groups.size() != 1) { - log_debug(" %zu flip-flop groups, only a single one allowed\n", groups.size()); + log_debug(" %zu flip-flop groups, only a single one allowed\n", groups.size()); return; } // Validate the flip flop data agains the DSP cell - const auto &flopData = groups.begin()->first; - if (!checkFlopDataAgainstDspPort(flopData, a_Cell, a_PortRule)) { - log_debug(" flip-flop vs. DSP check failed\n"); + const auto &flopData = *groups.begin(); + if (!checkFlopDataAgainstDspRegister(flopData, a_Cell, a_Register, a_Ports)) { + log_debug(" flip-flops vs. DSP check failed\n"); return; } // Debug log - log(" %s %s.%s\n", a_Cell->type.c_str(), a_Cell->name.c_str(), a_PortRule.name.c_str()); - for (size_t i = 0; i < flops.size(); ++i) { - if (flops[i].first != nullptr) { - log_debug(" %2zu. (%d) %s %s\n", i, flops[i].second, flops[i].first->type.c_str(), flops[i].first->name.c_str()); - } else if ((a_PortRule.bits.first >= 0 && (int)i < a_PortRule.bits.first) || - (a_PortRule.bits.second >= 0 && (int)i > a_PortRule.bits.second)) { - log_debug(" %2zu. (excluded)\n", i); - } else { - log_debug(" %2zu. None\n", i); + for (const auto& port : a_Ports) { + log(" %s %s.%s\n", a_Cell->type.c_str(), a_Cell->name.c_str(), port.name.c_str()); + + const auto& conns = flops.at(port.name); + for (size_t i = 0; i < conns.size(); ++i) { + if (conns[i] != nullptr) { + log_debug(" %2zu. %s %s\n", i, conns[i]->type.c_str(), conns[i]->name.c_str()); + } else if ((port.bits.first >= 0 && (int)i < port.bits.first) || + (port.bits.second >= 0 && (int)i > port.bits.second)) { + log_debug(" %2zu. (excluded)\n", i); + } else { + log_debug(" %2zu. None\n", i); + } } } // Reconnect data signals, mark the flip-flop for removal const auto &flopType = m_FlopTypes.at(flopData.type); - for (size_t i = 0; i < flops.size(); ++i) { + for (const auto& port : a_Ports) { - auto *flop = flops[i].first; - if (flop == nullptr) { - continue; - } + const auto& conns = flops.at(port.name); + auto sigspec = a_Cell->getPort(port.name); + auto sigbits = sigspec.bits(); - RTLIL::IdString port; - if (a_Cell->output(a_PortRule.name)) { - port = flopType.ports.at(RTLIL::escape_id("q")); - } else if (a_Cell->input(a_PortRule.name)) { - port = flopType.ports.at(RTLIL::escape_id("d")); - } + for (size_t i = 0; i < conns.size(); ++i) { - if (!flop->hasPort(port)) { - log_error(" cell '%s' does not have port '%s'!\n", flop->type.c_str(), port.c_str()); - } + auto *flop = conns[i]; + if (flop == nullptr) { + continue; + } - sigbits[i] = SigBit(RTLIL::Sx); - auto sigspec = flop->getPort(port); - log_assert(sigspec.bits().size() <= 1); - if (sigspec.bits().size() == 1) { - sigbits[i] = sigspec.bits()[0]; + RTLIL::IdString flopPort; + if (a_Cell->output(port.name)) { + flopPort = flopType.ports.at(RTLIL::escape_id("q")); + } else if (a_Cell->input(port.name)) { + flopPort = flopType.ports.at(RTLIL::escape_id("d")); + } + + if (!flop->hasPort(flopPort)) { + log_error("cell '%s' does not have port '%s'!\n", flop->type.c_str(), flopPort.c_str()); + } + + sigbits[i] = SigBit(RTLIL::Sx); + auto sigspec = flop->getPort(flopPort); + log_assert(sigspec.bits().size() <= 1); + if (sigspec.bits().size() == 1) { + sigbits[i] = sigspec.bits()[0]; + } + + m_CellsToRemove.insert(flop); } - m_CellsToRemove.insert(flop); + a_Cell->setPort(port.name, RTLIL::SigSpec(sigbits)); } - a_Cell->setPort(a_PortRule.name, RTLIL::SigSpec(sigbits)); // Reconnect (map) control signals. Connect the default value if // a particular signal is not present in the flip-flop. - for (const auto &it : a_PortRule.assoc) { - const auto &key = it.first; - const auto &port = it.second.first; + for (const auto& port : a_Ports) { + for (const auto &it : port.assoc) { + const auto &key = it.first; + const auto &port = it.second.first; - auto conn = RTLIL::SigBit(RTLIL::SigChunk(it.second.second)); - if (flopData.conns.count(key)) { - conn = flopData.conns.at(key); - } + auto conn = RTLIL::SigBit(RTLIL::SigChunk(it.second.second)); + if (flopData.conns.count(key)) { + conn = flopData.conns.at(key); + } - log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), port.c_str(), sigBitName(conn).c_str()); - a_Cell->setPort(port, conn); - m_DspChanges[a_Cell].conns.insert(port); + log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), port.c_str(), sigBitName(conn).c_str()); + a_Cell->setPort(port, conn); + m_DspChanges[a_Cell].conns.insert(port); + } } - // Connect control signals according to DSP port rule - for (const auto &it : a_PortRule.connect) { - log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), it.first.c_str(), it.second.as_string().c_str()); + // Connect control signals according to the register rule + for (const auto &it : a_Register.connect) { + log_debug(" connecting %s.%s to %s\n", a_Cell->type.c_str(), it.first.c_str(), it.second.as_string().c_str()); a_Cell->setPort(it.first, it.second); m_DspChanges[a_Cell].conns.insert(it.first); } - // Map parameters (port rule) - for (const auto &it : a_PortRule.params.map) { + // Map parameters (register rule) + for (const auto &it : a_Register.params.map) { if (flopData.params.dsp.count(it.second)) { const auto ¶m = flopData.params.dsp.at(it.second); - log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); + log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); a_Cell->setParam(it.first, param); m_DspChanges[a_Cell].params.insert(it.first); } @@ -1135,22 +1172,22 @@ struct DspFF : public Pass { for (const auto &it : flopType.params.map) { if (flopData.params.dsp.count(it.second)) { const auto ¶m = flopData.params.dsp.at(it.second); - log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); + log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), param.decode_string().c_str()); a_Cell->setParam(it.first, param); m_DspChanges[a_Cell].params.insert(it.first); } } // Set parameters (port rule) - for (const auto &it : a_PortRule.params.set) { - log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); + for (const auto &it : a_Register.params.set) { + log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); a_Cell->setParam(it.first, it.second); m_DspChanges[a_Cell].params.insert(it.first); } // Set parameters (flip-flop rule) for (const auto &it : flopType.params.set) { - log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); + log_debug(" setting param '%s' to '%s'\n", it.first.c_str(), it.second.decode_string().c_str()); a_Cell->setParam(it.first, it.second); m_DspChanges[a_Cell].params.insert(it.first); } From 1f278237d8b47f76ab0c50622a2b105d33cfa712 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 15 Feb 2022 15:54:46 +0100 Subject: [PATCH 591/845] Updated nexus DSP rules, added test for a complex DSP block Signed-off-by: Maciej Kurc --- dsp-ff-plugin/nexus-dsp_rules.txt | 167 +++++++++--------- dsp-ff-plugin/tests/Makefile | 2 + .../tests/nexus_mult_wide/nexus_mult_wide.tcl | 18 ++ .../tests/nexus_mult_wide/nexus_mult_wide.v | 63 +++++++ .../nexus_param_conflict.tcl | 2 +- 5 files changed, 166 insertions(+), 86 deletions(-) create mode 100644 dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl create mode 100644 dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v diff --git a/dsp-ff-plugin/nexus-dsp_rules.txt b/dsp-ff-plugin/nexus-dsp_rules.txt index 7d35b8456..90931829c 100644 --- a/dsp-ff-plugin/nexus-dsp_rules.txt +++ b/dsp-ff-plugin/nexus-dsp_rules.txt @@ -68,91 +68,88 @@ dsp MULTPREADD9X9 MULTPREADD18X18 MULTADDSUB18X18 MULTADDSUB36X36 endport enddsp -# TODO: Uncomment when support for multiple port registers controlled by -# a common parameter is added: - -#dsp MULTADDSUB9X9WIDE -# port A0 -# clk CLK 0 -# rst RSTA0A1 0 -# ena CEA0A1 1 -# -# set REGINPUTAB0=REGISTER -# map GSR=GSR -# endport -# port A1 -# clk CLK 0 -# rst RSTA0A1 0 -# ena CEA0A1 1 -# -# set REGINPUTAB1=REGISTER -# map GSR=GSR -# endport -# port A2 -# clk CLK 0 -# rst RSTA2A3 0 -# ena CEA2A3 1 -# -# set REGINPUTAB2=REGISTER -# map GSR=GSR -# endport -# port A3 -# clk CLK 0 -# rst RSTA2A3 0 -# ena CEA2A3 1 -# -# set REGINPUTAB3=REGISTER -# map GSR=GSR -# endport -# port B0 -# clk CLK 0 -# rst RSTB0B1 0 -# ena CEB0B1 1 -# -# set REGINPUTAB0=REGISTER -# map GSR=GSR -# endport -# port B1 -# clk CLK 0 -# rst RSTB0B1 0 -# ena CEB0B1 1 -# -# set REGINPUTAB1=REGISTER -# map GSR=GSR -# endport -# port B2 -# clk CLK 0 -# rst RSTB2B3 0 -# ena CEB2B3 1 -# -# set REGINPUTAB2=REGISTER -# map GSR=GSR -# endport -# port B3 -# clk CLK 0 -# rst RSTB2B3 0 -# ena CEB2B3 1 -# -# set REGINPUTAB3=REGISTER -# map GSR=GSR -# endport -# port C -# clk CLK 0 -# rst RSTC0 -# ena CEC 1 -# -# set REGINPUTC=REGISTER -# map GSR=GSR -# endport -# port Z -# clk CLK 0 -# rst RSTOUT 0 -# ena CEOUT 1 -# -# set REGOUTPUT=REGISTER -# map GSR=GSR -# endport -#enddsp +dsp MULTADDSUB9X9WIDE + port A0 + clk CLK 0 + rst RSTA0A1 0 + ena CEA0A1 1 + + set REGINPUTAB0=REGISTER + map GSR=GSR + endport + port A1 + clk CLK 0 + rst RSTA0A1 0 + ena CEA0A1 1 + + set REGINPUTAB1=REGISTER + map GSR=GSR + endport + port A2 + clk CLK 0 + rst RSTA2A3 0 + ena CEA2A3 1 + + set REGINPUTAB2=REGISTER + map GSR=GSR + endport + port A3 + clk CLK 0 + rst RSTA2A3 0 + ena CEA2A3 1 + + set REGINPUTAB3=REGISTER + map GSR=GSR + endport + port B0 + clk CLK 0 + rst RSTB0B1 0 + ena CEB0B1 1 + + set REGINPUTAB0=REGISTER + map GSR=GSR + endport + port B1 + clk CLK 0 + rst RSTB0B1 0 + ena CEB0B1 1 + + set REGINPUTAB1=REGISTER + map GSR=GSR + endport + port B2 + clk CLK 0 + rst RSTB2B3 0 + ena CEB2B3 1 + + set REGINPUTAB2=REGISTER + map GSR=GSR + endport + port B3 + clk CLK 0 + rst RSTB2B3 0 + ena CEB2B3 1 + + set REGINPUTAB3=REGISTER + map GSR=GSR + endport + port C + clk CLK 0 + rst RSTC 0 + ena CEC 1 + + set REGINPUTC=REGISTER + map GSR=GSR + endport + port Z + clk CLK 0 + rst RSTOUT 0 + ena CEOUT 1 + + set REGOUTPUT=REGISTER + map GSR=GSR + endport +enddsp ff FD1P3DX clk CK diff --git a/dsp-ff-plugin/tests/Makefile b/dsp-ff-plugin/tests/Makefile index d55917559..305092f02 100644 --- a/dsp-ff-plugin/tests/Makefile +++ b/dsp-ff-plugin/tests/Makefile @@ -8,6 +8,7 @@ TESTS = \ nexus_mult \ + nexus_mult_wide \ nexus_fftypes \ nexus_conn_conflict \ nexus_conn_share \ @@ -16,6 +17,7 @@ TESTS = \ include $(shell pwd)/../../Makefile_test.common nexus_mult_verify = true +nexus_mult_wide_verify = true nexus_fftypes_verify = true nexus_conn_conflict_verify = true nexus_conn_share_verify = true diff --git a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl new file mode 100644 index 000000000..70f5a61ab --- /dev/null +++ b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl @@ -0,0 +1,18 @@ +yosys -import +if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } +yosys -import ;# ingest plugin commands + +read_verilog $::env(DESIGN_TOP).v +design -save read + +set TOP "mult_wide" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +design -load postopt +yosys cd ${TOP} +stat +select -assert-count 1 t:MULTADDSUB9X9WIDE +select -assert-count 9 t:FD1P3IX diff --git a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v new file mode 100644 index 000000000..cb539e5dc --- /dev/null +++ b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v @@ -0,0 +1,63 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module mult_wide ( + input wire CLK, + input wire [ 8:0] A0, + input wire [ 8:0] A1, + input wire [ 8:0] A2, + input wire [ 8:0] A3, + input wire [ 8:0] B0, + input wire [ 8:0] B1, + input wire [ 8:0] B2, + input wire [ 8:0] B3, + input wire [53:0] C, + output wire [53:0] Z +); + + reg [8:0] ra0; + always @(posedge CLK) + ra0 <= A0; + + reg [8:0] rb0; + always @(posedge CLK) + rb0 <= B0; + + reg [8:0] rb2; + always @(posedge CLK) + rb2 <= B2; + + MULTADDSUB9X9WIDE # ( + .REGINPUTAB0("BYPASS"), + .REGINPUTAB1("BYPASS"), + .REGINPUTAB2("BYPASS"), + .REGINPUTAB3("BYPASS"), + .REGINPUTC("BYPASS"), + .REGADDSUB("BYPASS"), + .REGLOADC("BYPASS"), + .REGLOADC2("BYPASS"), + .REGPIPELINE("BYPASS"), + .REGOUTPUT("REGISTER") + ) mult ( + .A0 (ra0), + .A1 (A1), + .A2 (A2), + .A3 (A3), + .B0 (rb0), + .B1 (B1), + .B2 (rb2), + .B3 (B3), + .C (C), + .Z (Z), + + .LOADC (1'b0), + .ADDSUB (4'hF), + .SIGNED (1'b1), + ); + +endmodule diff --git a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl index abd9d3c26..ff46e0b7e 100644 --- a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl +++ b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl @@ -25,7 +25,7 @@ design -load postopt yosys cd ${TOP} stat select -assert-count 1 t:MULT9X9 -select -assert-count 9 t:FD1P3IX t:DS1P3DX %u +select -assert-count 9 t:FD1P3IX t:FD1P3DX %u set TOP "conflict_ff_param" design -load read From 109ac446a6ab0c09360ee9e269e9f7bb6d22bc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Tue, 15 Feb 2022 17:01:54 +0100 Subject: [PATCH 592/845] Handle ranges of io_decl as unpacked ranges MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index e21c84f80..2f266a351 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2212,7 +2212,7 @@ void UhdmAst::process_io_decl() visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *node) { current_node = node; }); if (current_node == nullptr) { current_node = make_ast_node(AST::AST_MODPORTMEMBER); - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); } visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) { From 85373aaac1f0c99a391c486551a1e8d06fed87ad Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 16 Feb 2022 10:46:42 +0100 Subject: [PATCH 593/845] Added the QL_DSP1 block back. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index c69c38c80..93fa6e960 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -664,24 +664,24 @@ module TDP_BRAM36 ( endmodule -//(* blackbox *) -//module QL_DSP1 ( -// input [19:0] a, -// input [17:0] b, -// input clk0, -// (* clkbuf_sink *) -// input clk1, -// (* clkbuf_sink *) -// input [ 1:0] feedback0, -// input [ 1:0] feedback1, -// input load_acc0, -// input load_acc1, -// input reset0, -// input reset1, -// output reg [37:0] z -//); -// parameter MODE_BITS = 27'b00000000000000000000000000; -//endmodule /* QL_DSP1 */ +(* blackbox *) +module QL_DSP1 ( + input [19:0] a, + input [17:0] b, + input clk0, + (* clkbuf_sink *) + input clk1, + (* clkbuf_sink *) + input [ 1:0] feedback0, + input [ 1:0] feedback1, + input load_acc0, + input load_acc1, + input reset0, + input reset1, + output reg [37:0] z +); + parameter MODE_BITS = 27'b00000000000000000000000000; +endmodule /* QL_DSP1 */ (* blackbox *) // TODO: add sim model module dsp_t1_20x18x64 ( From e8334059d19b444ec7f7866f8f465f611c8405d0 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 16 Feb 2022 10:47:25 +0100 Subject: [PATCH 594/845] Added clkbuf_sink attributes to qlf_k6n10f DSP cells Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 93fa6e960..c583dda1a 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -689,6 +689,7 @@ module dsp_t1_20x18x64 ( input [17:0] b_i, output [63:0] z_o, + (* clkbuf_sink *) input clock_i, input reset_i, input load_acc_i, @@ -709,6 +710,7 @@ module dsp_t1_10x9x32 ( input [ 8:0] b_i, output [31:0] z_o, + (* clkbuf_sink *) input clock_i, input reset_i, input load_acc_i, From 3c4ddde82ba393500f745e4919d964e694a1a9d4 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 15 Feb 2022 14:20:20 +0100 Subject: [PATCH 595/845] Add support for packed struct with range Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 4ec48f616..cc3352a30 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -106,6 +106,24 @@ static AST::AstNode *make_range(int left, int right, bool is_signed = false) return range; } +static void copy_packed_unpacked_attribute(AST::AstNode *from, AST::AstNode *to) +{ + if (!to->attributes.count(UhdmAst::packed_ranges())) + to->attributes[UhdmAst::packed_ranges()] = AST::AstNode::mkconst_int(1, false, 1); + if (!to->attributes.count(UhdmAst::unpacked_ranges())) + to->attributes[UhdmAst::unpacked_ranges()] = AST::AstNode::mkconst_int(1, false, 1); + if (from->attributes.count(UhdmAst::packed_ranges())) { + for (auto r : from->attributes[UhdmAst::packed_ranges()]->children) { + to->attributes[UhdmAst::packed_ranges()]->children.push_back(r->clone()); + } + } + if (from->attributes.count(UhdmAst::unpacked_ranges())) { + for (auto r : from->attributes[UhdmAst::unpacked_ranges()]->children) { + to->attributes[UhdmAst::unpacked_ranges()]->children.push_back(r->clone()); + } + } +} + #include "UhdmAstUpstream.cc" static int get_max_offset_struct(AST::AstNode *node) @@ -555,10 +573,10 @@ static AST::AstNode *convert_dot(AST::AstNode *wire_node, AST::AstNode *node, AS } else { expanded->children[1] = new AST::AstNode( AST::AST_ADD, expanded->children[1], - new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), AST::AstNode::mkconst_int(range, true, 32))); + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), node->children[0]->children[0]->clone())); expanded->children[0] = new AST::AstNode( AST::AST_ADD, expanded->children[0], - new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), AST::AstNode::mkconst_int(range, true, 32))); + new AST::AstNode(AST::AST_MUL, AST::AstNode::mkconst_int(struct_size_int, true, 32), node->children[0]->children[0]->clone())); } } return expanded; @@ -766,7 +784,8 @@ static AST::AstNode *make_packed_struct_local(AST::AstNode *template_node, std:: wnode->is_signed = template_node->is_signed; int offset = get_max_offset_struct(template_node); auto range = make_range(offset, 0); - wnode->children.push_back(range); + copy_packed_unpacked_attribute(template_node, wnode); + wnode->attributes[UhdmAst::packed_ranges()]->children.insert(wnode->attributes[UhdmAst::packed_ranges()]->children.begin(), range); // make sure this node is the one in scope for this name AST_INTERNAL::current_scope[name] = wnode; // add all the struct members to scope under the wire's name @@ -863,6 +882,7 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) if (!current_node->str.empty() && current_node->str[0] == '\\') { // instance so add a wire for the packed structure auto wnode = make_packed_struct_local(current_node, current_node->str); + convert_packed_unpacked_range(wnode); log_assert(AST_INTERNAL::current_ast_mod); AST_INTERNAL::current_ast_mod->children.push_back(wnode); AST_INTERNAL::current_scope[wnode->str]->attributes[ID::wiretype] = AST::AstNode::mkconst_str(current_node->str); @@ -1762,6 +1782,7 @@ void UhdmAst::process_custom_var() if (node->str.empty()) { // anonymous typespec, move the children to variable current_node->type = node->type; + copy_packed_unpacked_attribute(node, current_node); current_node->children = std::move(node->children); } else { auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); From b8ee74203bf2ddecbfb47e87256207f7d41d13ea Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 16 Feb 2022 14:40:29 +0100 Subject: [PATCH 596/845] Allow specifying multiple DSP ports in one "port" statement, formatted code. Signed-off-by: Maciej Kurc --- dsp-ff-plugin/dsp_ff.cc | 96 +++++++++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 32 deletions(-) diff --git a/dsp-ff-plugin/dsp_ff.cc b/dsp-ff-plugin/dsp_ff.cc index 09c7e4147..8504388ef 100644 --- a/dsp-ff-plugin/dsp_ff.cc +++ b/dsp-ff-plugin/dsp_ff.cc @@ -90,7 +90,8 @@ struct DspFF : public Pass { /// integration. dict connect; - unsigned int hash() const { + unsigned int hash() const + { unsigned int h = 0; h = mkhash_add(h, params.set.hash()); h = mkhash_add(h, params.map.hash()); @@ -98,10 +99,9 @@ struct DspFF : public Pass { return h; } - bool operator == (const RegisterType& ref) const { - return (params.set == ref.params.set) && - (params.map == ref.params.map) && - (connect == ref.connect); + bool operator==(const RegisterType &ref) const + { + return (params.set == ref.params.set) && (params.map == ref.params.map) && (connect == ref.connect); } }; @@ -221,13 +221,14 @@ struct DspFF : public Pass { // Parse each port as if it was associated with its own DSP register. // Group them each time a port definition is complete. - PortType portType; - RegisterType registerType; + PortType portType; + RegisterType registerType; - std::vector dspTypes; + std::vector dspTypes; std::vector flopTypes; std::vector dspAliases; + std::vector portNames; std::vector tok; @@ -289,7 +290,7 @@ struct DspFF : public Pass { // DSP port section else if (fields[0] == "port") { - if (fields.size() != 2) { + if (fields.size() < 2) { log_error(" syntax error: '%s'\n", line.c_str()); } if (tok.size() != 1 || tok.back() != "dsp") { @@ -308,6 +309,11 @@ struct DspFF : public Pass { registerType = RegisterType(); + portNames.clear(); + for (size_t i = 2; i < fields.size(); ++i) { + portNames.push_back(fields[i]); + } + } else if (fields[0] == "endport") { if (fields.size() != 1) { log_error(" syntax error: '%s'\n", line.c_str()); @@ -317,8 +323,20 @@ struct DspFF : public Pass { } tok.pop_back(); - auto& dspType = dspTypes.back(); + // Store the DSP port + auto &dspType = dspTypes.back(); dspType.registers[registerType].push_back(portType); + + // Store any extra DSP ports belonging to the same register + for (const auto &name : portNames) { + auto spec = parsePortName(name); + + PortType portTypeCopy = portType; + portTypeCopy.name = RTLIL::escape_id(std::get<0>(spec)); + portTypeCopy.bits = std::make_pair(std::get<2>(spec), std::get<1>(spec)); + + dspType.registers[registerType].push_back(portTypeCopy); + } } // Flip-flop type section @@ -535,9 +553,9 @@ struct DspFF : public Pass { const auto &dsp = it1.second; log(" %s\n", dsp.name.c_str()); - for (const auto& it2 : dsp.registers) { - const auto& reg = it2.first; - const auto& ports = it2.second; + for (const auto &it2 : dsp.registers) { + const auto ® = it2.first; + const auto &ports = it2.second; log(" ports:\n"); for (const auto &port : ports) { @@ -648,7 +666,7 @@ struct DspFF : public Pass { log(" # This is a comment\n"); log("\n"); log(" dsp [ ...]\n"); - log(" port \n"); + log(" port [ ...]\n"); log(" clk \n"); log(" [rst ] \n"); log(" [ena ] \n"); @@ -675,6 +693,7 @@ struct DspFF : public Pass { log("\n"); log("Each 'dsp' section defines a DSP cell type (can apply to multiple types).\n"); log("Within it each 'port' section defining a data port with internal register.\n"); + log("There can be multiple port names given if they belong to the same control register.\n"); log("The port can be specified as a whole (eg. 'DATA') or as a subset of the whole\n"); log("(eg. 'DATA[7:0]').\n"); log("\n"); @@ -759,7 +778,7 @@ struct DspFF : public Pass { // Process all registers auto &dspType = m_DspTypes.at(cell->type); - for (auto& rule : dspType.registers) { + for (auto &rule : dspType.registers) { processRegister(cell, rule.first, rule.second); } } @@ -812,9 +831,8 @@ struct DspFF : public Pass { return isOk; } - bool checkFlopDataAgainstDspRegister(const FlopData &a_FlopData, RTLIL::Cell *a_Cell, - const RegisterType &a_Register, - const std::vector& a_Ports) + bool checkFlopDataAgainstDspRegister(const FlopData &a_FlopData, RTLIL::Cell *a_Cell, const RegisterType &a_Register, + const std::vector &a_Ports) { const auto &flopType = m_FlopTypes.at(a_FlopData.type); const auto &changes = m_DspChanges[a_Cell]; @@ -823,7 +841,7 @@ struct DspFF : public Pass { log_debug(" checking connected flip-flop settings against the DSP register... "); // Check control signal connections - for (const auto& port : a_Ports) { + for (const auto &port : a_Ports) { for (const auto &it : port.assoc) { const auto &key = it.first; const auto &port = it.second.first; @@ -926,8 +944,7 @@ struct DspFF : public Pass { // .......................................... - void processRegister(RTLIL::Cell *a_Cell, const RegisterType& a_Register, - const std::vector& a_Ports) + void processRegister(RTLIL::Cell *a_Cell, const RegisterType &a_Register, const std::vector &a_Ports) { // The cell register control parameter(s) must not be set @@ -940,21 +957,28 @@ struct DspFF : public Pass { } pool groups; - dict> flops; + dict> flops; // Process ports bool flopsOk = true; - for (const auto& port : a_Ports) { + for (const auto &port : a_Ports) { log_debug(" attempting flip-flop integration for %s.%s of %s\n", a_Cell->type.c_str(), port.name.c_str(), a_Cell->name.c_str()); + + if (!a_Cell->hasPort(port.name)) { + log_debug(" port unconnected.\n"); + continue; + } log_assert(a_Cell->output(port.name) || a_Cell->input(port.name)); // Get port connections auto sigspec = a_Cell->getPort(port.name); auto sigbits = sigspec.bits(); - flops[port.name] = std::vector(sigbits.size(), nullptr); + flops[port.name] = std::vector(sigbits.size(), nullptr); for (size_t i = 0; i < sigbits.size(); ++i) { auto sigbit = sigbits[i]; + + // Port connected to a const. if (!sigbit.wire) { continue; } @@ -999,7 +1023,7 @@ struct DspFF : public Pass { // Get the sink, check if this is a flip-flop auto &other = *others.begin(); - auto *flop = other.cell; + auto *flop = other.cell; if (flop == nullptr) { if (!other.port.empty()) { @@ -1078,15 +1102,19 @@ struct DspFF : public Pass { } // Debug log - for (const auto& port : a_Ports) { + for (const auto &port : a_Ports) { + + if (!flops.count(port.name)) { + continue; + } + log(" %s %s.%s\n", a_Cell->type.c_str(), a_Cell->name.c_str(), port.name.c_str()); - const auto& conns = flops.at(port.name); + const auto &conns = flops.at(port.name); for (size_t i = 0; i < conns.size(); ++i) { if (conns[i] != nullptr) { log_debug(" %2zu. %s %s\n", i, conns[i]->type.c_str(), conns[i]->name.c_str()); - } else if ((port.bits.first >= 0 && (int)i < port.bits.first) || - (port.bits.second >= 0 && (int)i > port.bits.second)) { + } else if ((port.bits.first >= 0 && (int)i < port.bits.first) || (port.bits.second >= 0 && (int)i > port.bits.second)) { log_debug(" %2zu. (excluded)\n", i); } else { log_debug(" %2zu. None\n", i); @@ -1096,9 +1124,13 @@ struct DspFF : public Pass { // Reconnect data signals, mark the flip-flop for removal const auto &flopType = m_FlopTypes.at(flopData.type); - for (const auto& port : a_Ports) { + for (const auto &port : a_Ports) { + + if (!flops.count(port.name)) { + continue; + } - const auto& conns = flops.at(port.name); + const auto &conns = flops.at(port.name); auto sigspec = a_Cell->getPort(port.name); auto sigbits = sigspec.bits(); @@ -1135,7 +1167,7 @@ struct DspFF : public Pass { // Reconnect (map) control signals. Connect the default value if // a particular signal is not present in the flip-flop. - for (const auto& port : a_Ports) { + for (const auto &port : a_Ports) { for (const auto &it : port.assoc) { const auto &key = it.first; const auto &port = it.second.first; From 834f05ecc315a6e1f69a78757238e548123ebdda Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 16 Feb 2022 14:41:24 +0100 Subject: [PATCH 597/845] Updated nexus DSP rules, added more tests for registers that include control signals Signed-off-by: Maciej Kurc --- dsp-ff-plugin/nexus-dsp_rules.txt | 28 ++++++++--------- .../nexus_conn_conflict.tcl | 10 +++++++ .../nexus_conn_conflict/nexus_conn_conflict.v | 23 ++++++++++++++ dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl | 15 ++++++++++ dsp-ff-plugin/tests/nexus_mult/nexus_mult.v | 30 +++++++++++++++++++ 5 files changed, 92 insertions(+), 14 deletions(-) diff --git a/dsp-ff-plugin/nexus-dsp_rules.txt b/dsp-ff-plugin/nexus-dsp_rules.txt index 90931829c..0ed894760 100644 --- a/dsp-ff-plugin/nexus-dsp_rules.txt +++ b/dsp-ff-plugin/nexus-dsp_rules.txt @@ -7,7 +7,7 @@ # SPDX-License-Identifier:ISC dsp MULT9X9 MULT18X18 MULT18X36 MULT36X36 - port A + port A SIGNEDA clk CLK 0 rst RSTA 0 ena CEA 1 @@ -15,7 +15,7 @@ dsp MULT9X9 MULT18X18 MULT18X36 MULT36X36 set REGINPUTA=REGISTER map GSR=GSR endport - port B + port B SIGNEDB clk CLK 0 rst RSTB 0 ena CEB 1 @@ -34,7 +34,7 @@ dsp MULT9X9 MULT18X18 MULT18X36 MULT36X36 enddsp dsp MULTPREADD9X9 MULTPREADD18X18 MULTADDSUB18X18 MULTADDSUB36X36 - port A + port A SIGNEDA clk CLK 0 rst RSTA 0 ena CEA 1 @@ -42,7 +42,7 @@ dsp MULTPREADD9X9 MULTPREADD18X18 MULTADDSUB18X18 MULTADDSUB36X36 set REGINPUTA=REGISTER map GSR=GSR endport - port B + port B SIGNEDB clk CLK 0 rst RSTB 0 ena CEB 1 @@ -50,7 +50,7 @@ dsp MULTPREADD9X9 MULTPREADD18X18 MULTADDSUB18X18 MULTADDSUB36X36 set REGINPUTB=REGISTER map GSR=GSR endport - port C + port C SIGNEDC clk CLK 0 rst RSTC 0 ena CEC 1 @@ -69,7 +69,7 @@ dsp MULTPREADD9X9 MULTPREADD18X18 MULTADDSUB18X18 MULTADDSUB36X36 enddsp dsp MULTADDSUB9X9WIDE - port A0 + port A0 SIGNED clk CLK 0 rst RSTA0A1 0 ena CEA0A1 1 @@ -77,7 +77,7 @@ dsp MULTADDSUB9X9WIDE set REGINPUTAB0=REGISTER map GSR=GSR endport - port A1 + port A1 SIGNED clk CLK 0 rst RSTA0A1 0 ena CEA0A1 1 @@ -85,7 +85,7 @@ dsp MULTADDSUB9X9WIDE set REGINPUTAB1=REGISTER map GSR=GSR endport - port A2 + port A2 SIGNED clk CLK 0 rst RSTA2A3 0 ena CEA2A3 1 @@ -93,7 +93,7 @@ dsp MULTADDSUB9X9WIDE set REGINPUTAB2=REGISTER map GSR=GSR endport - port A3 + port A3 SIGNED clk CLK 0 rst RSTA2A3 0 ena CEA2A3 1 @@ -101,7 +101,7 @@ dsp MULTADDSUB9X9WIDE set REGINPUTAB3=REGISTER map GSR=GSR endport - port B0 + port B0 SIGNED clk CLK 0 rst RSTB0B1 0 ena CEB0B1 1 @@ -109,7 +109,7 @@ dsp MULTADDSUB9X9WIDE set REGINPUTAB0=REGISTER map GSR=GSR endport - port B1 + port B1 SIGNED clk CLK 0 rst RSTB0B1 0 ena CEB0B1 1 @@ -117,7 +117,7 @@ dsp MULTADDSUB9X9WIDE set REGINPUTAB1=REGISTER map GSR=GSR endport - port B2 + port B2 SIGNED clk CLK 0 rst RSTB2B3 0 ena CEB2B3 1 @@ -125,7 +125,7 @@ dsp MULTADDSUB9X9WIDE set REGINPUTAB2=REGISTER map GSR=GSR endport - port B3 + port B3 SIGNED clk CLK 0 rst RSTB2B3 0 ena CEB2B3 1 @@ -133,7 +133,7 @@ dsp MULTADDSUB9X9WIDE set REGINPUTAB3=REGISTER map GSR=GSR endport - port C + port C SIGNED clk CLK 0 rst RSTC 0 ena CEC 1 diff --git a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl index c4cee757c..87486f981 100644 --- a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl +++ b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl @@ -46,3 +46,13 @@ debug dsp_ff -rules ../../nexus-dsp_rules.txt stat select -assert-count 1 t:MULT9X9 select -assert-count 18 t:FD1P3IX + +set TOP "conflict_dsp_port" +design -load read +hierarchy -top ${TOP} +synth_nexus -flatten +techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +debug dsp_ff -rules ../../nexus-dsp_rules.txt +stat +select -assert-count 1 t:MULT9X9 +select -assert-count 9 t:FD1P3IX diff --git a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v index 2224690bb..35856d9c8 100644 --- a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v +++ b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v @@ -125,4 +125,27 @@ module conflict_ff_ena ( endmodule +module conflict_dsp_port ( + input wire CLK_A, + input wire [ 8:0] A, + input wire SA, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [8:0] ra; + always @(posedge CLK_A) + ra <= A; + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .SIGNEDA (SA), + .B (B), + .Z (Z) + ); + +endmodule diff --git a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl index d82ffa88f..1eef04a60 100644 --- a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl +++ b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl @@ -41,3 +41,18 @@ stat select -assert-count 1 t:MULT9X9 select -assert-count 0 t:FD1P3IX +# The test cannot be run because the equivalence check fails at some internal +# wires of the DSP simulation model which ends up dangling. So that's not a +# real issue but makes the test fail. + +#set TOP "mult_ctrl" +#design -load read +#hierarchy -top ${TOP} +#synth_nexus -flatten +#techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO +#equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +#design -load postopt +#yosys cd ${TOP} +#stat +#select -assert-count 1 t:MULT9X9 +#select -assert-count 0 t:FD1P3IX diff --git a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v index 1ca806d83..9836f7fdb 100644 --- a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v +++ b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v @@ -82,3 +82,33 @@ module mult_all ( ); endmodule + +module mult_ctrl ( + input wire CLK, + input wire [ 8:0] A, + input wire SA, + input wire [ 8:0] B, + output wire [17:0] Z +); + + reg [8:0] ra; + reg rsa; + + always @(posedge CLK) begin + ra <= A; + rsa <= SA; + end + + MULT9X9 # ( + .REGINPUTA("BYPASS"), + .REGINPUTB("BYPASS"), + .REGOUTPUT("BYPASS") + ) mult ( + .A (ra), + .SIGNEDA (rsa), + .B (B), + .Z (Z) + ); + +endmodule + From f1e976c28b9ca317ceac22cfd228e15293f1048a Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 16 Feb 2022 15:29:04 +0100 Subject: [PATCH 598/845] More detailed debug logging Signed-off-by: Maciej Kurc --- dsp-ff-plugin/dsp_ff.cc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/dsp-ff-plugin/dsp_ff.cc b/dsp-ff-plugin/dsp_ff.cc index 8504388ef..752fe9a02 100644 --- a/dsp-ff-plugin/dsp_ff.cc +++ b/dsp-ff-plugin/dsp_ff.cc @@ -805,7 +805,7 @@ struct DspFF : public Pass { const auto &flopType = m_FlopTypes.at(a_Cell->type); bool isOk = true; - log_debug(" checking connected flip-flop '%s' of type '%s'... ", a_Cell->name.c_str(), a_Cell->type.c_str()); + log_debug("checking connected flip-flop '%s' of type '%s'... ", a_Cell->name.c_str(), a_Cell->type.c_str()); // Must not have the "keep" attribute if (a_Cell->has_keep_attr()) { @@ -978,13 +978,17 @@ struct DspFF : public Pass { for (size_t i = 0; i < sigbits.size(); ++i) { auto sigbit = sigbits[i]; + log_debug(" %2zu. ", i); + // Port connected to a const. if (!sigbit.wire) { + log_debug("constant\n"); continue; } // Skip bits out of the specified range if ((port.bits.first >= 0 && (int)i < port.bits.first) || (port.bits.second >= 0 && (int)i > port.bits.second)) { + log_debug("(excluded)\n"); continue; } @@ -995,7 +999,7 @@ struct DspFF : public Pass { if (a_Cell->output(port.name)) { others = getSinks(CellPin(a_Cell, port.name, i)); if (others.size() > 1) { - log_debug(" multiple sinks found\n"); + log_debug("multiple sinks\n"); flopsOk = false; continue; } @@ -1008,7 +1012,7 @@ struct DspFF : public Pass { if (driver.cell != nullptr) { auto sinks = getSinks(driver); if (sinks.size() > 1) { - log_debug(" multiple sinks found\n"); + log_debug("multiple sinks\n"); flopsOk = false; continue; } @@ -1018,6 +1022,7 @@ struct DspFF : public Pass { // No others - unconnected if (others.empty()) { + log_debug("unconnected\n"); continue; } @@ -1027,14 +1032,15 @@ struct DspFF : public Pass { if (flop == nullptr) { if (!other.port.empty()) { - log_debug(" port connection reaches outside of the module\n"); + log_debug("connection reaches module edge\n"); flopsOk = false; } + log_debug("unconnected\n"); continue; } if (!m_FlopTypes.count(flop->type)) { - log_debug(" non-flip-flop connected\n"); + log_debug("non-flip-flop connected\n"); flopsOk = false; continue; } @@ -1049,7 +1055,7 @@ struct DspFF : public Pass { } if (flopPort != other.port) { - log_debug(" connection to non-data port of a flip-flip"); + log_debug("connection to non-data port of a flip-flip"); flopsOk = false; continue; } @@ -1101,7 +1107,7 @@ struct DspFF : public Pass { return; } - // Debug log + // Log connections for (const auto &port : a_Ports) { if (!flops.count(port.name)) { From 28b53f34788aebd8d4e65847f8ad0a5a18e58018 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 17 Feb 2022 13:28:54 +0100 Subject: [PATCH 599/845] Switched to a connection map instead of looking for cell pin connectivity each time it is needed. Signed-off-by: Maciej Kurc --- dsp-ff-plugin/dsp_ff.cc | 282 +++++++++++++++------------------------- 1 file changed, 107 insertions(+), 175 deletions(-) diff --git a/dsp-ff-plugin/dsp_ff.cc b/dsp-ff-plugin/dsp_ff.cc index 752fe9a02..cab0e8e98 100644 --- a/dsp-ff-plugin/dsp_ff.cc +++ b/dsp-ff-plugin/dsp_ff.cc @@ -45,6 +45,79 @@ struct DspFF : public Pass { // .......................................... + /// Connection map + struct ConnMap { + + /// Maps source SigBit to all sinks it drives CellPin. + dict> sinks; + /// Maps source SigBit to its driver CellPin + dict drivers; + + /// Builds the map + void build(RTLIL::Module *module, const SigMap &sigmap) + { + clear(); + + // Scan cell ports + for (auto *cell : module->cells()) { + for (const auto &it : cell->connections_) { + const auto &port = it.first; + const auto &sigbits = it.second.bits(); + for (size_t i = 0; i < sigbits.size(); ++i) { + auto sigbit = sigmap(sigbits[i]); + + // This is an input port (sink)) + if (cell->input(port)) { + auto &vec = sinks[sigbit]; + vec.push_back(CellPin(cell, port, i)); + } + // This is a source + if (cell->output(port)) { + drivers.insert(std::make_pair(sigbit, CellPin(cell, port, i))); + } + } + } + } + + // Scan top-level ports + for (auto &it : module->wires_) { + auto *wire = it.second; + + if (!wire->port_input && !wire->port_output) { + continue; + } + + RTLIL::SigSpec sigspec(wire, wire->start_offset, wire->width); + const auto &sigbits = sigspec.bits(); + for (size_t i = 0; i < sigbits.size(); ++i) { + auto sigbit = sigbits[i]; + if (!sigbit.wire) { + continue; + } + + // Output port (sink) + if (sigbit.wire->port_output) { + auto &vec = sinks[sigmap(sigbit)]; + vec.push_back(CellPin(nullptr, sigbit.wire->name, i)); + } + // Input port (source) + if (sigbit.wire->port_input) { + drivers.insert(std::make_pair(sigbit, CellPin(nullptr, sigbit.wire->name, i))); + } + } + } + } + + /// Clears the map + void clear() + { + sinks.clear(); + drivers.clear(); + }; + }; + + // .......................................... + /// Describes a flip-flop type that can be integrated with a DSP cell struct FlopType { RTLIL::IdString name; @@ -633,8 +706,9 @@ struct DspFF : public Pass { /// Temporary SigBit to SigBit helper map. SigMap m_SigMap; - // /// Net map - // dict m_NetMap; + /// Module connection map + ConnMap m_ConnMap; + /// Cells to be removed (per module!) pool m_CellsToRemove; /// DSP cells that got changed @@ -765,8 +839,9 @@ struct DspFF : public Pass { m_SigMap.clear(); m_SigMap.set(module); - // // Build the net map - // buildNetMap(module); + // Build the connection map + m_ConnMap.clear(); + m_ConnMap.build(module, m_SigMap); // Look for DSP cells for (auto cell : module->cells()) { @@ -792,14 +867,11 @@ struct DspFF : public Pass { // Clear maps m_SigMap.clear(); + m_ConnMap.clear(); } // .......................................... - // void buildNetMap (RTLIL::Module* a_Module) { - // // TODO: - // } - bool checkFlop(RTLIL::Cell *a_Cell) { const auto &flopType = m_FlopTypes.at(a_Cell->type); @@ -976,7 +1048,7 @@ struct DspFF : public Pass { flops[port.name] = std::vector(sigbits.size(), nullptr); for (size_t i = 0; i < sigbits.size(); ++i) { - auto sigbit = sigbits[i]; + auto sigbit = m_SigMap(sigbits[i]); log_debug(" %2zu. ", i); @@ -997,27 +1069,32 @@ struct DspFF : public Pass { // Get sinks(s), discard the port completely if more than one sink // is found. if (a_Cell->output(port.name)) { - others = getSinks(CellPin(a_Cell, port.name, i)); - if (others.size() > 1) { - log_debug("multiple sinks\n"); - flopsOk = false; - continue; + if (m_ConnMap.sinks.count(sigbit)) { + for (const auto &sink : m_ConnMap.sinks.at(sigbit)) { + if (sink.cell != nullptr && m_CellsToRemove.count(sink.cell)) { + continue; + } + others.insert(sink); + } } + } // Get driver. Discard if the driver drives something else too - // TODO: This is slow - we are first looking for a driver and then - // for all its sinks. else if (a_Cell->input(port.name)) { - auto driver = getDriver(CellPin(a_Cell, port.name, i)); - if (driver.cell != nullptr) { - auto sinks = getSinks(driver); - if (sinks.size() > 1) { - log_debug("multiple sinks\n"); - flopsOk = false; - continue; + if (m_ConnMap.drivers.count(sigbit)) { + auto driver = m_ConnMap.drivers.at(sigbit); + + if (m_ConnMap.sinks.count(sigbit)) { + auto sinks = m_ConnMap.sinks.at(sigbit); + if (sinks.size() > 1) { + log_debug("multiple sinks (%zu)\n", others.size()); + flopsOk = false; + continue; + } } + + others.insert(driver); } - others.insert(driver); } // No others - unconnected @@ -1026,6 +1103,12 @@ struct DspFF : public Pass { continue; } + if (others.size() > 1) { + log_debug("multiple sinks (%zu)\n", others.size()); + flopsOk = false; + continue; + } + // Get the sink, check if this is a flip-flop auto &other = *others.begin(); auto *flop = other.cell; @@ -1285,157 +1368,6 @@ struct DspFF : public Pass { return data; } - /// Retrieves a list of sinks driven by the given cell pin. - /// TODO: This is slow, need to make a lookup for that. - pool getSinks(const CellPin &a_Driver) - { - - auto module = a_Driver.cell->module; - pool sinks; - - // The driver has to be an output pin - log_assert(a_Driver.cell->output(a_Driver.port)); - - // Get the driver sigbit - auto driverSigspec = a_Driver.cell->getPort(a_Driver.port); - auto driverSigbit = m_SigMap(driverSigspec.bits().at(a_Driver.bit)); - - // Look for connected sinks - for (auto cell : module->cells()) { - - if (m_CellsToRemove.count(cell)) { - continue; - } - - for (auto conn : cell->connections()) { - auto port = conn.first; - auto sigspec = conn.second; - - // Consider only sinks (inputs) - if (!cell->input(port)) { - continue; - } - - // Check all sigbits - auto sigbits = sigspec.bits(); - for (size_t bit = 0; bit < sigbits.size(); ++bit) { - - auto sigbit = sigbits[bit]; - if (!sigbit.wire) { - continue; - } - - // Got a sink pin of another cell - sigbit = m_SigMap(sigbit); - if (sigbit == driverSigbit) { - sinks.insert(CellPin(cell, port, bit)); - } - } - } - } - - // Look for connected top-level output ports - for (auto conn : module->connections()) { - auto dst = conn.first; - auto src = conn.second; - - auto sigbits = dst.bits(); - for (size_t bit = 0; bit < sigbits.size(); ++bit) { - - auto sigbit = sigbits[bit]; - if (!sigbit.wire) { - continue; - } - - if (!sigbit.wire->port_output) { - continue; - } - - sigbit = m_SigMap(sigbit); - if (sigbit == driverSigbit) { - sinks.insert(CellPin(nullptr, sigbit.wire->name, bit)); - } - } - } - - return sinks; - } - - /// Finds a driver for the given cell pin - /// TODO: This is slow, need to make a lookup for that. - CellPin getDriver(const CellPin &a_Sink) - { - auto module = a_Sink.cell->module; - - // The sink has to be an input pin - log_assert(a_Sink.cell->input(a_Sink.port)); - - // Get the sink sigbit - auto sinkSigspec = a_Sink.cell->getPort(a_Sink.port); - auto sinkSigbit = m_SigMap(sinkSigspec.bits().at(a_Sink.bit)); - - // Look for connected top-level input ports - for (auto conn : module->connections()) { - auto dst = conn.first; - auto src = conn.second; - - auto sigbits = dst.bits(); - for (size_t bit = 0; bit < sigbits.size(); ++bit) { - - auto sigbit = sigbits[bit]; - if (!sigbit.wire) { - continue; - } - - if (!sigbit.wire->port_input) { - continue; - } - - sigbit = m_SigMap(sigbit); - if (sigbit == sinkSigbit) { - CellPin(nullptr, sigbit.wire->name, bit); - } - } - } - - // Look for the driver among cells - for (auto cell : module->cells()) { - - if (m_CellsToRemove.count(cell)) { - continue; - } - - for (auto conn : cell->connections()) { - auto port = conn.first; - auto sigspec = conn.second; - - // Consider only outputs - if (!cell->output(port)) { - continue; - } - - // Check all sigbits - auto sigbits = sigspec.bits(); - for (size_t bit = 0; bit < sigbits.size(); ++bit) { - - auto sigbit = sigbits[bit]; - if (!sigbit.wire) { - continue; - } - - // Got a driver pin of another cell - sigbit = m_SigMap(sigbit); - if (sigbit == sinkSigbit) { - return CellPin(cell, port, bit); - } - } - } - } - - // No driver found. FIXME: Implement a cleaner way of indicating that - return CellPin(nullptr, RTLIL::IdString(), -1); - } - } DspFF; PRIVATE_NAMESPACE_END From 1c5bf68ea8d2767aaa76e5eb42ddd7a4991e2350 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 18 Feb 2022 12:44:51 +0100 Subject: [PATCH 600/845] Adapt to new version of Surelog Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 6eb49f47f..7212c45c4 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1082,8 +1082,8 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) if (size == 64) { size = 32; } - auto c = AST::AstNode::mkconst_int(val.value.integer, true, size ? size : 32); - if (size == 0) + auto c = AST::AstNode::mkconst_int(val.value.integer, true, size > 0 ? size : 32); + if (size == 0 || size == -1) c->is_unsized = true; return c; } From 474332806e916ef0a8ccacc91d74bba67397b175 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Fri, 18 Feb 2022 14:30:01 +0100 Subject: [PATCH 601/845] Fix more then 2 packed ranges in array_net Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 7212c45c4..6b6f14251 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2130,7 +2130,7 @@ void UhdmAst::process_array_net() if (net_type == vpiLogicNet) { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, net_h); - visit_range(net_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + visit_one_to_many({vpiRange}, net_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); shared.report.mark_handled(net_h); } else if (net_type == vpiStructNet) { visit_one_to_one({vpiTypespec}, net_h, [&](AST::AstNode *node) { From 2e70108a0f704fb78df58aaf334d2d4374baaea6 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Mon, 21 Feb 2022 11:27:12 +0100 Subject: [PATCH 602/845] Adapt to new version of Surelog Signed-off-by: Kamil Rakoczy --- uhdm-plugin/Makefile | 2 +- uhdm-plugin/uhdmsurelogastfrontend.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 0ad9ee04e..9f43dc0ee 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -16,7 +16,7 @@ include ../Makefile_plugin.common CPPFLAGS += -std=c++17 -Wall -W -Wextra -Werror \ -I${UHDM_INSTALL_DIR}/include \ - -I${UHDM_INSTALL_DIR}/include/surelog + -I${UHDM_INSTALL_DIR}/include/Surelog CXXFLAGS += -Wno-unused-parameter LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib/surelog -L${UHDM_INSTALL_DIR}/lib -L${UHDM_INSTALL_DIR}/lib64/uhdm -L${UHDM_INSTALL_DIR}/lib64/surelog -L${UHDM_INSTALL_DIR}/lib64 diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index 7bfd53de4..5e0ca4be2 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -31,8 +31,8 @@ #include #endif -#include "surelog/ErrorReporting/Report.h" -#include "surelog/surelog.h" +#include "ErrorReporting/Report.h" +#include "surelog.h" namespace UHDM { From 8ff0f155d4e9e133f0a7f200d0dd1f3a092ad34f Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Feb 2022 13:21:34 +0100 Subject: [PATCH 603/845] Updated DSP black box definitions Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 84 ++++++++++++++++++++++------ 1 file changed, 67 insertions(+), 17 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index c583dda1a..b8c5b3865 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -668,10 +668,10 @@ endmodule module QL_DSP1 ( input [19:0] a, input [17:0] b, + (* clkbuf_sink *) input clk0, (* clkbuf_sink *) input clk1, - (* clkbuf_sink *) input [ 1:0] feedback0, input [ 1:0] feedback1, input load_acc0, @@ -683,44 +683,94 @@ module QL_DSP1 ( parameter MODE_BITS = 27'b00000000000000000000000000; endmodule /* QL_DSP1 */ +(* blackbox *) +module QL_DSP2 ( // TODO: Name subject to change + input [19:0] a, + input [17:0] b, + input [ 3:0] acc_fir, + output [37:0] z, + output [17:0] dly_b, + + (* clkbuf_sink *) + input clk, + input reset, + + input [1:0] feedback, + input load_acc, + input unsigned_a, + input unsigned_b, + + input f_mode, + input [2:0] output_select, + input saturate_enable, + input [5:0] shift_right, + input round, + input subtract, + input register_inputs, + input [19:0] coeff_0, + input [19:0] coeff_1, + input [19:0] coeff_2, + input [19:0] coeff_3 +); + +endmodule + (* blackbox *) // TODO: add sim model module dsp_t1_20x18x64 ( - input [63:0] a_i, + input [19:0] a_i, input [17:0] b_i, - output [63:0] z_o, + input [ 3:0] acc_fir_i, + output [37:0] z_o, + output [17:0] dly_b_o, (* clkbuf_sink *) input clock_i, input reset_i, - input load_acc_i, - input register_inputs_i, - input subtraction_mode_i, input [1:0] feedback_i, - input round_i, - input [5:0] shift_right_i, + input load_acc_i, + input unsigned_a_i, + input unsigned_b_i, + + input [2:0] output_select_i, input saturate_enable_i, - input [1:0] output_select_i + input [5:0] shift_right_i, + input round_i, + input subtract_i, + input register_inputs_i, + input [19:0] coeff_0_i, + input [19:0] coeff_1_i, + input [19:0] coeff_2_i, + input [19:0] coeff_3_i ); endmodule (* blackbox *) // TODO: add sim model module dsp_t1_10x9x32 ( - input [31:0] a_i, + input [ 9:0] a_i, input [ 8:0] b_i, - output [31:0] z_o, + input [ 3:0] acc_fir_i, + output [18:0] z_o, + output [ 8:0] dly_b_o, (* clkbuf_sink *) input clock_i, input reset_i, - input load_acc_i, - input register_inputs_i, - input subtraction_mode_i, input [1:0] feedback_i, - input round_i, - input [5:0] shift_right_i, + input load_acc_i, + input unsigned_a_i, + input unsigned_b_i, + + input [2:0] output_select_i, input saturate_enable_i, - input [1:0] output_select_i + input [5:0] shift_right_i, + input round_i, + input subtract_i, + input register_inputs_i, + input [ 9:0] coeff_0_i, + input [ 9:0] coeff_1_i, + input [ 9:0] coeff_2_i, + input [ 9:0] coeff_3_i ); endmodule From 3a9f0bc0a6d08ca8aa581c7b29ac6e733953c89a Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Feb 2022 13:48:55 +0100 Subject: [PATCH 604/845] Updated qlf_k6n10f DSP techmap Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 62 +++++++++++++++++++----------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index f9f9cfc45..f0c5a8b4c 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -15,7 +15,7 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); wire [19:0] a; wire [17:0] b; - wire [63:0] z; + wire [37:0] z; assign a = (A_WIDTH == 20) ? A : (A_SIGNED) ? {{(20 - A_WIDTH){A[A_WIDTH-1]}}, A} : @@ -26,20 +26,29 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); {{(18 - B_WIDTH){1'b0}}, B}; dsp_t1_20x18x64 _TECHMAP_REPLACE_ ( - .a_i (a), - .b_i (b), - .z_o (z), + .a_i (a), + .b_i (b), + .acc_fir_i (4'd0), + .z_o (z), - .register_inputs_i (1'b0), - .subtraction_mode_i (1'b0), - .feedback_i (2'b00), - .round_i (1'b0), - .shift_right_i (1'b0), + .feedback_i (2'd0), + .load_acc_i (1'b0), + .unsigned_a_i (!A_SIGNED), + .unsigned_b_i (!B_SIGNED), + + .output_select_i (2'd0), .saturate_enable_i (1'b0), - .output_select_i (1'b0) + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b0), + .coeff_0_i (20'd0), + .coeff_1_i (20'd0), + .coeff_2_i (20'd0), + .coeff_3_i (20'd0) ); - assign Y = z[37:0]; + assign Y = z; endmodule @@ -52,7 +61,7 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); wire [ 9:0] a; wire [ 8:0] b; - wire [31:0] z; + wire [18:0] z; assign a = (A_WIDTH == 10) ? A : (A_SIGNED) ? {{(10 - A_WIDTH){A[A_WIDTH-1]}}, A} : @@ -63,20 +72,29 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); {{( 9 - B_WIDTH){1'b0}}, B}; dsp_t1_10x9x32 _TECHMAP_REPLACE_ ( - .a_i (a), - .b_i (b), - .z_o (z), + .a_i (a), + .b_i (b), + .acc_fir_i (4'd0), + .z_o (z), - .register_inputs_i (1'b0), - .subtraction_mode_i (1'b0), - .feedback_i (2'b00), - .round_i (1'b0), - .shift_right_i (1'b0), + .feedback_i (2'd0), + .load_acc_i (1'b0), + .unsigned_a_i (!A_SIGNED), + .unsigned_b_i (!B_SIGNED), + + .output_select_i (2'd0), .saturate_enable_i (1'b0), - .output_select_i (1'b0) + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b0), + .coeff_0_i (10'd0), + .coeff_1_i (10'd0), + .coeff_2_i (10'd0), + .coeff_3_i (10'd0) ); - assign Y = z[18:0]; + assign Y = z; endmodule From 7bdd27c241a7e54492409c524c4780eaa70c176a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Mon, 21 Feb 2022 15:06:18 +0100 Subject: [PATCH 605/845] Remove Makefile.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/Makefile.inc | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 uhdm-plugin/Makefile.inc diff --git a/uhdm-plugin/Makefile.inc b/uhdm-plugin/Makefile.inc deleted file mode 100644 index ddd8e8f94..000000000 --- a/uhdm-plugin/Makefile.inc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJS += frontends/uhdm/UhdmAst.o -OBJS += frontends/uhdm/uhdmastreport.o -OBJS += frontends/uhdm/uhdmastfrontend.o -OBJS += frontends/uhdm/vpivisitor.o - -UHDM_INSTALL_DIR ?= $(PREFIX) - -#*** UHDM *** -CPPFLAGS += -std=c++14 -I${UHDM_INSTALL_DIR}/include/uhdm \ - -I${UHDM_INSTALL_DIR}/include/uhdm/include \ - -I${UHDM_INSTALL_DIR}/include/uhdm/headers -CXXFLAGS += -Wno-inconsistent-missing-override -LDFLAGS += -L${UHDM_INSTALL_DIR}/lib/uhdm -L${UHDM_INSTALL_DIR}/lib -LDLIBS += -luhdm -lcapnp -lkj -ldl -lutil -lm -lrt -lpthread From cb53cfc06ea78b5acc0fd18a01a5bb7b5c5d66f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Fri, 18 Feb 2022 14:41:04 +0100 Subject: [PATCH 606/845] Move options parsing of UhdmAstFrontend to UhdmCommonFrontend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/Makefile | 1 + uhdm-plugin/uhdmastfrontend.cc | 82 ++++------------------------ uhdm-plugin/uhdmcommonfrontend.cc | 91 +++++++++++++++++++++++++++++++ uhdm-plugin/uhdmcommonfrontend.h | 39 +++++++++++++ 4 files changed, 141 insertions(+), 72 deletions(-) create mode 100644 uhdm-plugin/uhdmcommonfrontend.cc create mode 100644 uhdm-plugin/uhdmcommonfrontend.h diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 9f43dc0ee..223a1263e 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -9,6 +9,7 @@ NAME = uhdm SOURCES = UhdmAst.cc \ uhdmastfrontend.cc \ + uhdmcommonfrontend.cc \ uhdmsurelogastfrontend.cc \ uhdmastreport.cc diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index c85707664..41aa93cd4 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -19,9 +19,7 @@ * */ -#include "UhdmAst.h" -#include "frontends/ast/ast.h" -#include "kernel/yosys.h" +#include "uhdmcommonfrontend.h" namespace UHDM { @@ -31,85 +29,25 @@ extern void visit_object(vpiHandle obj_h, int indent, const char *relation, std: YOSYS_NAMESPACE_BEGIN -/* Stub for AST::process */ -static void set_line_num(int) {} - -/* Stub for AST::process */ -static int get_line_num(void) { return 1; } - -struct UhdmAstFrontend : public Frontend { - UhdmAstFrontend() : Frontend("uhdm", "read UHDM file") {} - void help() +struct UhdmAstFrontend : public UhdmCommonFrontend { + UhdmAstFrontend() : UhdmCommonFrontend("uhdm", "read UHDM file") {} + AST::AstNode *parse(std::string filename) { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" read_uhdm [options] [filename]\n"); - log("\n"); - log("Load design from a UHDM file into the current design\n"); - log("\n"); - log(" -noassert\n"); - log(" ignore assert() statements"); - log("\n"); - log(" -debug\n"); - log(" print debug info to stdout"); - log("\n"); - log(" -report [directory]\n"); - log(" write a coverage report for the UHDM file\n"); - log("\n"); - log(" -defer\n"); - log(" only read the abstract syntax tree and defer actual compilation\n"); - log(" to a later 'hierarchy' command. Useful in cases where the default\n"); - log(" parameters of modules yield invalid or not synthesizable code.\n"); - log("\n"); - } - void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) - { - log_header(design, "Executing UHDM frontend.\n"); - - UhdmAstShared shared; - UhdmAst uhdm_ast(shared); - bool defer = false; - - std::string report_directory; - for (size_t i = 1; i < args.size(); i++) { - if (args[i] == "-debug") { - shared.debug_flag = true; - } else if (args[i] == "-report" && ++i < args.size()) { - report_directory = args[i]; - shared.stop_on_error = false; - } else if (args[i] == "-noassert") { - shared.no_assert = true; - } else if (args[i] == "-defer") { - defer = true; - } - } - extra_args(f, filename, args, args.size() - 1); - - AST::current_filename = filename; - AST::set_line_num = &set_line_num; - AST::get_line_num = &get_line_num; - struct AST::AstNode *current_ast; - UHDM::Serializer serializer; std::vector restoredDesigns = serializer.Restore(filename); for (auto design : restoredDesigns) { std::stringstream strstr; - UHDM::visit_object(design, 1, "", &shared.report.unhandled, shared.debug_flag ? std::cout : strstr); + UHDM::visit_object(design, 1, "", &this->shared.report.unhandled, this->shared.debug_flag ? std::cout : strstr); } - current_ast = uhdm_ast.visit_designs(restoredDesigns); - if (!report_directory.empty()) { - shared.report.write(report_directory); + UhdmAst uhdm_ast(this->shared); + AST::AstNode *current_ast = uhdm_ast.visit_designs(restoredDesigns); + if (!this->report_directory.empty()) { + this->shared.report.write(this->report_directory); } for (auto design : restoredDesigns) vpi_release_handle(design); - bool dump_ast1 = shared.debug_flag; - bool dump_ast2 = shared.debug_flag; - bool dont_redefine = false; - bool default_nettype_wire = true; - AST::process(design, current_ast, dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, false, false, false, false, - false, false, dont_redefine, false, defer, default_nettype_wire); - delete current_ast; + return current_ast; } } UhdmAstFrontend; diff --git a/uhdm-plugin/uhdmcommonfrontend.cc b/uhdm-plugin/uhdmcommonfrontend.cc new file mode 100644 index 000000000..16a3007b3 --- /dev/null +++ b/uhdm-plugin/uhdmcommonfrontend.cc @@ -0,0 +1,91 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 Antmicro + + * Based on frontends/json/jsonparse.cc + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "uhdmcommonfrontend.h" + +YOSYS_NAMESPACE_BEGIN + +/* Stub for AST::process */ +static void set_line_num(int) {} + +/* Stub for AST::process */ +static int get_line_num(void) { return 1; } + +void UhdmCommonFrontend::help() +{ + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_uhdm [options] [filename]\n"); + log("\n"); + log("Load design from a UHDM file into the current design\n"); + log("\n"); + log(" -noassert\n"); + log(" ignore assert() statements"); + log("\n"); + log(" -debug\n"); + log(" print debug info to stdout"); + log("\n"); + log(" -report [directory]\n"); + log(" write a coverage report for the UHDM file\n"); + log("\n"); + log(" -defer\n"); + log(" only read the abstract syntax tree and defer actual compilation\n"); + log(" to a later 'hierarchy' command. Useful in cases where the default\n"); + log(" parameters of modules yield invalid or not synthesizable code.\n"); + log("\n"); +} + +void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) +{ + bool defer = false; + + std::string report_directory; + for (size_t i = 1; i < args.size(); i++) { + if (args[i] == "-debug") { + this->shared.debug_flag = true; + } else if (args[i] == "-report" && ++i < args.size()) { + this->report_directory = args[i]; + this->shared.stop_on_error = false; + } else if (args[i] == "-noassert") { + this->shared.no_assert = true; + } else if (args[i] == "-defer") { + defer = true; + } + } + extra_args(f, filename, args, args.size() - 1); + + AST::current_filename = filename; + AST::set_line_num = &set_line_num; + AST::get_line_num = &get_line_num; + + bool dump_ast1 = this->shared.debug_flag; + bool dump_ast2 = this->shared.debug_flag; + bool dont_redefine = false; + bool default_nettype_wire = true; + + AST::AstNode *current_ast = parse(filename); + + AST::process(design, current_ast, dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, false, false, false, false, false, + false, dont_redefine, false, defer, default_nettype_wire); + delete current_ast; +} + +YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/uhdmcommonfrontend.h b/uhdm-plugin/uhdmcommonfrontend.h new file mode 100644 index 000000000..91236877f --- /dev/null +++ b/uhdm-plugin/uhdmcommonfrontend.h @@ -0,0 +1,39 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2020 Antmicro + + * Based on frontends/json/jsonparse.cc + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "UhdmAst.h" +#include "frontends/ast/ast.h" +#include "kernel/yosys.h" +#include +#include + +YOSYS_NAMESPACE_BEGIN + +struct UhdmCommonFrontend : public Frontend { + UhdmAstShared shared; + std::string report_directory; + UhdmCommonFrontend(std::string name, std::string short_help) : Frontend(name, short_help) {} + void help(); + virtual AST::AstNode *parse(std::string filename) = 0; + void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design); +}; + +YOSYS_NAMESPACE_END From 889e074e880efa74f228e2227e3b717f5051c5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Fri, 18 Feb 2022 16:49:30 +0100 Subject: [PATCH 607/845] Use UhdmCommonFrontend in UhdmSurelogAsFrontend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/uhdmcommonfrontend.cc | 3 +- uhdm-plugin/uhdmcommonfrontend.h | 1 + uhdm-plugin/uhdmsurelogastfrontend.cc | 59 ++++++++------------------- 3 files changed, 19 insertions(+), 44 deletions(-) diff --git a/uhdm-plugin/uhdmcommonfrontend.cc b/uhdm-plugin/uhdmcommonfrontend.cc index 16a3007b3..8d643bece 100644 --- a/uhdm-plugin/uhdmcommonfrontend.cc +++ b/uhdm-plugin/uhdmcommonfrontend.cc @@ -55,8 +55,9 @@ void UhdmCommonFrontend::help() void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) { - bool defer = false; + this->args = args; + bool defer = false; std::string report_directory; for (size_t i = 1; i < args.size(); i++) { if (args[i] == "-debug") { diff --git a/uhdm-plugin/uhdmcommonfrontend.h b/uhdm-plugin/uhdmcommonfrontend.h index 91236877f..4920524cc 100644 --- a/uhdm-plugin/uhdmcommonfrontend.h +++ b/uhdm-plugin/uhdmcommonfrontend.h @@ -30,6 +30,7 @@ YOSYS_NAMESPACE_BEGIN struct UhdmCommonFrontend : public Frontend { UhdmAstShared shared; std::string report_directory; + std::vector args; UhdmCommonFrontend(std::string name, std::string short_help) : Frontend(name, short_help) {} void help(); virtual AST::AstNode *parse(std::string filename) = 0; diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index 5e0ca4be2..f045ed26f 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -22,6 +22,7 @@ #include "UhdmAst.h" #include "frontends/ast/ast.h" #include "kernel/yosys.h" +#include "uhdmcommonfrontend.h" #if defined(_MSC_VER) #include @@ -76,8 +77,8 @@ std::vector executeCompilation(SURELOG::SymbolTable *symbolTable, SUR return the_design; } -struct UhdmSurelogAstFrontend : public Frontend { - UhdmSurelogAstFrontend() : Frontend("verilog_with_uhdm", "generate/read UHDM file") {} +struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { + UhdmSurelogAstFrontend() : UhdmCommonFrontend("verilog_with_uhdm", "generate/read UHDM file") {} void help() { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| @@ -104,38 +105,12 @@ struct UhdmSurelogAstFrontend : public Frontend { log(" parameters of modules yield invalid or not synthesizable code.\n"); log("\n"); } - void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) + AST::AstNode *parse(std::string filename) { - log_header(design, "Executing Verilog with UHDM frontend.\n"); - - UhdmAstShared shared; - UhdmAst uhdm_ast(shared); - bool defer = false; - - std::string report_directory; - auto it = args.begin(); - while (it != args.end()) { - if (*it == "-debug") { - shared.debug_flag = true; - it = args.erase(it); - } else if (*it == "-report" && (it = args.erase(it)) < args.end()) { - report_directory = *it; - shared.stop_on_error = false; - it = args.erase(it); - } else if (*it == "-noassert") { - shared.no_assert = true; - it = args.erase(it); - } else if (*it == "-defer") { - defer = true; - it = args.erase(it); - } else { - ++it; - } - } std::vector cstrings; - cstrings.reserve(args.size()); - for (size_t i = 0; i < args.size(); ++i) - cstrings.push_back(const_cast(args[i].c_str())); + cstrings.reserve(this->args.size()); + for (size_t i = 0; i < this->args.size(); ++i) + cstrings.push_back(const_cast(this->args[i].c_str())); SURELOG::SymbolTable *symbolTable = new SURELOG::SymbolTable(); SURELOG::ErrorContainer *errors = new SURELOG::ErrorContainer(symbolTable); @@ -146,21 +121,19 @@ struct UhdmSurelogAstFrontend : public Frontend { } SURELOG::scompiler *compiler = nullptr; const std::vector uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); - struct AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); - if (report_directory != "") { - shared.report.write(report_directory); - } - bool dump_ast1 = shared.debug_flag; - bool dump_ast2 = shared.debug_flag; - bool dont_redefine = false; - bool default_nettype_wire = true; - AST::process(design, current_ast, dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, false, false, false, false, - false, false, dont_redefine, false, defer, default_nettype_wire); - delete current_ast; + SURELOG::shutdown_compiler(compiler); delete clp; delete symbolTable; delete errors; + + UhdmAst uhdm_ast(this->shared); + AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); + if (report_directory != "") { + shared.report.write(report_directory); + } + + return current_ast; } } UhdmSurelogAstFrontend; From 542eb3d1bf513adccbeeb5e82adc85adbe0e21bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Mon, 21 Feb 2022 13:51:41 +0100 Subject: [PATCH 608/845] Log functions handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/uhdmastfrontend.cc | 14 +++++++++-- uhdm-plugin/uhdmcommonfrontend.cc | 11 +++------ uhdm-plugin/uhdmcommonfrontend.h | 4 +++- uhdm-plugin/uhdmsurelogastfrontend.cc | 34 +++++++++++---------------- 4 files changed, 32 insertions(+), 31 deletions(-) diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index 41aa93cd4..739ef643b 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -30,8 +30,18 @@ extern void visit_object(vpiHandle obj_h, int indent, const char *relation, std: YOSYS_NAMESPACE_BEGIN struct UhdmAstFrontend : public UhdmCommonFrontend { - UhdmAstFrontend() : UhdmCommonFrontend("uhdm", "read UHDM file") {} - AST::AstNode *parse(std::string filename) + UhdmAstFrontend() : UhdmCommonFrontend("uhdm", "read UHDM file") { this->log_header_message = "Executing UHDM frontend.\n"; } + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_uhdm [options] [filename]\n"); + log("\n"); + log("Load design from a UHDM file into the current design\n"); + log("\n"); + this->print_read_options(); + } + AST::AstNode *parse(std::string filename) override { UHDM::Serializer serializer; diff --git a/uhdm-plugin/uhdmcommonfrontend.cc b/uhdm-plugin/uhdmcommonfrontend.cc index 8d643bece..3cf755d66 100644 --- a/uhdm-plugin/uhdmcommonfrontend.cc +++ b/uhdm-plugin/uhdmcommonfrontend.cc @@ -29,14 +29,8 @@ static void set_line_num(int) {} /* Stub for AST::process */ static int get_line_num(void) { return 1; } -void UhdmCommonFrontend::help() +void UhdmCommonFrontend::print_read_options() { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" read_uhdm [options] [filename]\n"); - log("\n"); - log("Load design from a UHDM file into the current design\n"); - log("\n"); log(" -noassert\n"); log(" ignore assert() statements"); log("\n"); @@ -55,10 +49,11 @@ void UhdmCommonFrontend::help() void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) { + log_header(design, this->log_header_message); + this->args = args; bool defer = false; - std::string report_directory; for (size_t i = 1; i < args.size(); i++) { if (args[i] == "-debug") { this->shared.debug_flag = true; diff --git a/uhdm-plugin/uhdmcommonfrontend.h b/uhdm-plugin/uhdmcommonfrontend.h index 4920524cc..253cf184b 100644 --- a/uhdm-plugin/uhdmcommonfrontend.h +++ b/uhdm-plugin/uhdmcommonfrontend.h @@ -30,9 +30,11 @@ YOSYS_NAMESPACE_BEGIN struct UhdmCommonFrontend : public Frontend { UhdmAstShared shared; std::string report_directory; + const char *log_header_message; std::vector args; UhdmCommonFrontend(std::string name, std::string short_help) : Frontend(name, short_help) {} - void help(); + virtual void print_read_options(); + virtual void help() = 0; virtual AST::AstNode *parse(std::string filename) = 0; void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design); }; diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index f045ed26f..b52bb1c5f 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -78,34 +78,28 @@ std::vector executeCompilation(SURELOG::SymbolTable *symbolTable, SUR } struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { - UhdmSurelogAstFrontend() : UhdmCommonFrontend("verilog_with_uhdm", "generate/read UHDM file") {} - void help() + UhdmSurelogAstFrontend() : UhdmCommonFrontend("verilog_with_uhdm", "generate/read UHDM file") + { + this->log_header_message = "Executing Verilog with UHDM frontend.\n"; + } + void print_read_options() override { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log(" read_verilog_with_uhdm [options] [filenames]\n"); - log("\n"); - log("Generate or load design from a UHDM file into the current design\n"); - log("\n"); log(" -process\n"); log(" loads design from given UHDM file\n"); log("\n"); - log(" -noassert\n"); - log(" ignore assert() statements"); - log("\n"); - log(" -debug\n"); - log(" print debug info to stdout"); + UhdmCommonFrontend::print_read_options(); + } + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" -report [directory]\n"); - log(" write a coverage report for the UHDM file\n"); + log(" read_verilog_with_uhdm [options] [filenames]\n"); log("\n"); - log(" -defer\n"); - log(" only read the abstract syntax tree and defer actual compilation\n"); - log(" to a later 'hierarchy' command. Useful in cases where the default\n"); - log(" parameters of modules yield invalid or not synthesizable code.\n"); + log("Generate or load design from a UHDM file into the current design\n"); log("\n"); + this->print_read_options(); } - AST::AstNode *parse(std::string filename) + AST::AstNode *parse(std::string filename) override { std::vector cstrings; cstrings.reserve(this->args.size()); From 559c8bf468ad5f7028ea964f4e09c1f05156f64c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Mon, 21 Feb 2022 14:41:35 +0100 Subject: [PATCH 609/845] Move log_header to separate function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/uhdmastfrontend.cc | 3 ++- uhdm-plugin/uhdmcommonfrontend.cc | 3 +-- uhdm-plugin/uhdmcommonfrontend.h | 2 +- uhdm-plugin/uhdmsurelogastfrontend.cc | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/uhdm-plugin/uhdmastfrontend.cc b/uhdm-plugin/uhdmastfrontend.cc index 739ef643b..9a2233965 100644 --- a/uhdm-plugin/uhdmastfrontend.cc +++ b/uhdm-plugin/uhdmastfrontend.cc @@ -30,7 +30,7 @@ extern void visit_object(vpiHandle obj_h, int indent, const char *relation, std: YOSYS_NAMESPACE_BEGIN struct UhdmAstFrontend : public UhdmCommonFrontend { - UhdmAstFrontend() : UhdmCommonFrontend("uhdm", "read UHDM file") { this->log_header_message = "Executing UHDM frontend.\n"; } + UhdmAstFrontend() : UhdmCommonFrontend("uhdm", "read UHDM file") {} void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| @@ -59,6 +59,7 @@ struct UhdmAstFrontend : public UhdmCommonFrontend { vpi_release_handle(design); return current_ast; } + void call_log_header(RTLIL::Design *design) override { log_header(design, "Executing UHDM frontend.\n"); } } UhdmAstFrontend; YOSYS_NAMESPACE_END diff --git a/uhdm-plugin/uhdmcommonfrontend.cc b/uhdm-plugin/uhdmcommonfrontend.cc index 3cf755d66..b3407973a 100644 --- a/uhdm-plugin/uhdmcommonfrontend.cc +++ b/uhdm-plugin/uhdmcommonfrontend.cc @@ -49,8 +49,7 @@ void UhdmCommonFrontend::print_read_options() void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) { - log_header(design, this->log_header_message); - + this->call_log_header(design); this->args = args; bool defer = false; diff --git a/uhdm-plugin/uhdmcommonfrontend.h b/uhdm-plugin/uhdmcommonfrontend.h index 253cf184b..f2d12a8fd 100644 --- a/uhdm-plugin/uhdmcommonfrontend.h +++ b/uhdm-plugin/uhdmcommonfrontend.h @@ -30,12 +30,12 @@ YOSYS_NAMESPACE_BEGIN struct UhdmCommonFrontend : public Frontend { UhdmAstShared shared; std::string report_directory; - const char *log_header_message; std::vector args; UhdmCommonFrontend(std::string name, std::string short_help) : Frontend(name, short_help) {} virtual void print_read_options(); virtual void help() = 0; virtual AST::AstNode *parse(std::string filename) = 0; + virtual void call_log_header(RTLIL::Design *design) = 0; void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design); }; diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index b52bb1c5f..ce7977249 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -78,10 +78,7 @@ std::vector executeCompilation(SURELOG::SymbolTable *symbolTable, SUR } struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { - UhdmSurelogAstFrontend() : UhdmCommonFrontend("verilog_with_uhdm", "generate/read UHDM file") - { - this->log_header_message = "Executing Verilog with UHDM frontend.\n"; - } + UhdmSurelogAstFrontend() : UhdmCommonFrontend("verilog_with_uhdm", "generate/read UHDM file") {} void print_read_options() override { log(" -process\n"); @@ -129,6 +126,7 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { return current_ast; } + void call_log_header(RTLIL::Design *design) override { log_header(design, "Executing Verilog with UHDM frontend.\n"); } } UhdmSurelogAstFrontend; YOSYS_NAMESPACE_END From e3c9dbcc60e10691b985dbd4263cbb75e18f1fc2 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 22 Feb 2022 08:50:35 +0100 Subject: [PATCH 610/845] Don't simplify typedef from current module in simplify parameter Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 6b6f14251..c9dc82dda 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1399,8 +1399,6 @@ void UhdmAst::simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_n visitEachDescendant(module_node, [&](AST::AstNode *current_scope_node) { if (current_scope_node->type == AST::AST_TYPEDEF || current_scope_node->type == AST::AST_PARAMETER || current_scope_node->type == AST::AST_LOCALPARAM) { - if (current_scope_node->type == AST::AST_TYPEDEF) - simplify(current_scope_node, nullptr); AST_INTERNAL::current_scope[current_scope_node->str] = current_scope_node; } }); From 3e3f01cb7ac303947ae54ee46280e94ac3c4b56c Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 22 Feb 2022 09:29:53 +0100 Subject: [PATCH 611/845] Fixed typos in the dsp-ff plugin help text Signed-off-by: Maciej Kurc --- dsp-ff-plugin/dsp_ff.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsp-ff-plugin/dsp_ff.cc b/dsp-ff-plugin/dsp_ff.cc index cab0e8e98..26e5acdd8 100644 --- a/dsp-ff-plugin/dsp_ff.cc +++ b/dsp-ff-plugin/dsp_ff.cc @@ -766,14 +766,14 @@ struct DspFF : public Pass { log(" endff\n"); log("\n"); log("Each 'dsp' section defines a DSP cell type (can apply to multiple types).\n"); - log("Within it each 'port' section defining a data port with internal register.\n"); + log("Within it each 'port' section defines a data port with internal register.\n"); log("There can be multiple port names given if they belong to the same control register.\n"); log("The port can be specified as a whole (eg. 'DATA') or as a subset of the whole\n"); log("(eg. 'DATA[7:0]').\n"); log("\n"); log("Statemenst 'clk', 'rst' and 'ena' define names of clock, reset and enable\n"); log("ports associated with the data port along with default constant values to\n"); - log("connect them to when a given port has no counterpart in the flip-flop bein\n"); + log("connect them to when a given port has no counterpart in the flip-flop being\n"); log("integrated.\n"); log("\n"); log("The 'set' statement tells how to set control parameter(s) of the DSP that\n"); From c98a0ddcb5a65df66fc265409d26f2dccd3b9ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Tue, 22 Feb 2022 15:18:06 +0100 Subject: [PATCH 612/845] Add handling of dump options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/uhdmcommonfrontend.cc | 54 ++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/uhdm-plugin/uhdmcommonfrontend.cc b/uhdm-plugin/uhdmcommonfrontend.cc index b3407973a..a1536d440 100644 --- a/uhdm-plugin/uhdmcommonfrontend.cc +++ b/uhdm-plugin/uhdmcommonfrontend.cc @@ -35,7 +35,28 @@ void UhdmCommonFrontend::print_read_options() log(" ignore assert() statements"); log("\n"); log(" -debug\n"); - log(" print debug info to stdout"); + log(" alias for -dump_ast1 -dump_ast2 -dump_vlog1 -dump_vlog2 -yydebug\n"); + log("\n"); + log(" -dump_ast1\n"); + log(" dump abstract syntax tree (before simplification)\n"); + log("\n"); + log(" -dump_ast2\n"); + log(" dump abstract syntax tree (after simplification)\n"); + log("\n"); + log(" -no_dump_ptr\n"); + log(" do not include hex memory addresses in dump (easier to diff dumps)\n"); + log("\n"); + log(" -dump_vlog1\n"); + log(" dump ast as Verilog code (before simplification)\n"); + log("\n"); + log(" -dump_vlog2\n"); + log(" dump ast as Verilog code (after simplification)\n"); + log("\n"); + log(" -dump_rtlil\n"); + log(" dump generated RTLIL netlist\n"); + log("\n"); + log(" -yydebug\n"); + log(" enable parser debug output\n"); log("\n"); log(" -report [directory]\n"); log(" write a coverage report for the UHDM file\n"); @@ -53,8 +74,19 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve this->args = args; bool defer = false; + bool dump_ast1 = false; + bool dump_ast2 = false; + bool dump_vlog1 = false; + bool dump_vlog2 = false; + bool no_dump_ptr = false; + bool dump_rtlil = false; + for (size_t i = 1; i < args.size(); i++) { if (args[i] == "-debug") { + dump_ast1 = true; + dump_ast2 = true; + dump_vlog1 = true; + dump_vlog2 = true; this->shared.debug_flag = true; } else if (args[i] == "-report" && ++i < args.size()) { this->report_directory = args[i]; @@ -63,6 +95,20 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve this->shared.no_assert = true; } else if (args[i] == "-defer") { defer = true; + } else if (args[i] == "-dump_ast1") { + dump_ast1 = true; + } else if (args[i] == "-dump_ast2") { + dump_ast2 = true; + } else if (args[i] == "-dump_vlog1") { + dump_vlog1 = true; + } else if (args[i] == "-dump_vlog2") { + dump_vlog2 = true; + } else if (args[i] == "-no_dump_ptr") { + no_dump_ptr = true; + } else if (args[i] == "-dump_rtlil") { + dump_rtlil = true; + } else if (args[i] == "-yydebug") { + this->shared.debug_flag = true; } } extra_args(f, filename, args, args.size() - 1); @@ -71,15 +117,13 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve AST::set_line_num = &set_line_num; AST::get_line_num = &get_line_num; - bool dump_ast1 = this->shared.debug_flag; - bool dump_ast2 = this->shared.debug_flag; bool dont_redefine = false; bool default_nettype_wire = true; AST::AstNode *current_ast = parse(filename); - AST::process(design, current_ast, dump_ast1, dump_ast2, false, false, false, false, false, false, false, false, false, false, false, false, false, - false, dont_redefine, false, defer, default_nettype_wire); + AST::process(design, current_ast, dump_ast1, dump_ast2, no_dump_ptr, dump_vlog1, dump_vlog2, dump_rtlil, false, false, false, false, false, false, + false, false, false, false, dont_redefine, false, defer, default_nettype_wire); delete current_ast; } From 153c9e88a375a6d7e987e0a3dc243157287c07ad Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Feb 2022 17:18:25 +0100 Subject: [PATCH 613/845] SIMD DSP inference pass for QuickLogic qlf_k6n10f Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 5 +- ql-qlf-plugin/ql-dsp-simd.cc | 297 +++++++++++++++++++++++++++++++++++ 2 files changed, 300 insertions(+), 2 deletions(-) create mode 100644 ql-qlf-plugin/ql-dsp-simd.cc diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 2819055c9..56ced8f92 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -11,14 +11,15 @@ SOURCES = synth_quicklogic.cc \ ql-dsp.cc \ pp3_braminit.cc \ quicklogic_eqn.cc \ - ql-edif.cc + ql-edif.cc \ + ql-dsp-simd.cc include ../Makefile_plugin.common COMMON = common QLF_K4N8_DIR = qlf_k4n8 QLF_K6N10_DIR = qlf_k6n10 -QLF_K6N10F_DIR = qlf_k6n10f +QLF_K6N10F_DIR = qlf_k6n10f PP3_DIR = pp3 VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K4N8_DIR)/arith_map.v \ diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc new file mode 100644 index 000000000..df7ed0899 --- /dev/null +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -0,0 +1,297 @@ +// Copyright (C) 2020-2022 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +#include "kernel/log.h" +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/sigtools.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +// ============================================================================ + +struct QlDspSimdPass : public Pass { + + QlDspSimdPass () : Pass("ql_dsp_simd", "Infers QuickLogic k6n10f DSP pairs that can operate in SIMD mode") {} + + void help() override { + log("\n"); + log(" ql_dsp_simd [selection]\n"); + log("\n"); + log(" This pass identifies k6n10f DSP cells with identical configuration\n"); + log(" and packs pairs of them together into other DSP cells that can\n"); + log(" perform SIMD operation.\n"); + } + + // .......................................... + + /// Describes DSP config unique to a whole DSP cell + struct DspConfig { + + // Port connections + dict connections; + + // TODO: Possibly include parameters here. For now we have just + // connections. + + DspConfig () = default; + + DspConfig (const DspConfig& ref) = default; + DspConfig (DspConfig&& ref) = default; + + unsigned int hash () const { + return connections.hash(); + } + + bool operator == (const DspConfig& ref) const { + return connections == ref.connections; + } + }; + + // .......................................... + + // DSP control and config ports to consider and how to map them to ports + // of the target DSP cell + const std::vector> m_DspCfgPorts = { + std::make_pair("clock_i", "clk"), + std::make_pair("reset_i", "reset"), + + std::make_pair("feedback_i", "feedback"), + std::make_pair("load_acc_i", "load_acc"), + std::make_pair("unsigned_a_i", "unsigned_a"), + std::make_pair("unsigned_b_i", "unsigned_b"), + + std::make_pair("output_select_i", "output_select"), + std::make_pair("saturate_enable_i", "saturate_enable"), + std::make_pair("shift_right_i", "shift_right"), + std::make_pair("round_i", "round"), + std::make_pair("subtract_i", "subtract"), + std::make_pair("register_inputs_i", "register_inputs") + }; + + // DSP data ports and how to map them to ports of the target DSP cell + const std::vector> m_DspDataPorts = { + std::make_pair("a_i", "a"), + std::make_pair("b_i", "b"), + std::make_pair("acc_fir_i", "acc_fir"), + std::make_pair("z_o", "z"), + std::make_pair("dly_b_o", "dly_b"), + }; + + // Source DSP cell type (SISD) + const RTLIL::IdString m_SisdDspType = RTLIL::escape_id("dsp_t1_10x9x32"); + // Target DSP cell type for the SIMD mode + const RTLIL::IdString m_SimdDspType = RTLIL::escape_id("QL_DSP2"); + + /// Temporary SigBit to SigBit helper map. + SigMap m_SigMap; + + // .......................................... + + void execute (std::vector a_Args, RTLIL::Design* a_Design) override { + log_header(a_Design, "Executing QL_DSP_SIMD pass.\n"); + + // Parse args + extra_args(a_Args, 1, a_Design); + + // Process modules + for (auto module : a_Design->selected_modules()) { + + // Setup the SigMap + m_SigMap.clear(); + m_SigMap.set(module); + + // Assemble DSP cell groups + dict> groups; + for (auto cell : module->selected_cells()) { + + // Check if this is a DSP cell + if (cell->type != m_SisdDspType) { + continue; + } + + // Skip if it has the (* keep *) attribute set + if (cell->has_keep_attr()) { + continue; + } + + // Add to a group + const auto key = getDspConfig(cell); + groups[key].push_back(cell); + + } + + std::vector cellsToRemove; + + // Map cell pairs to the target DSP SIMD cell + for (const auto& it : groups) { + const auto& group = it.second; + const auto& config = it.first; + + // Ensure an even number + size_t count = group.size(); + if (count & 1) count--; + + // Map SIMD pairs + for (size_t i=0; i < count; i+=2) { + const RTLIL::Cell* dsp_a = group[i]; + const RTLIL::Cell* dsp_b = group[i+1]; + + std::string name = stringf("simd_%s_%s", + RTLIL::unescape_id(dsp_a->name).c_str(), + RTLIL::unescape_id(dsp_b->name).c_str() + ); + + log(" SIMD: %s (%s) + %s (%s) => %s (%s)\n", + RTLIL::unescape_id(dsp_a->name).c_str(), + RTLIL::unescape_id(dsp_a->type).c_str(), + RTLIL::unescape_id(dsp_b->name).c_str(), + RTLIL::unescape_id(dsp_b->type).c_str(), + RTLIL::unescape_id(name).c_str(), + RTLIL::unescape_id(m_SimdDspType).c_str() + ); + + // Create the new cell + RTLIL::Cell* simd = module->addCell( + RTLIL::escape_id(name), + m_SimdDspType + ); + + // Check if the target cell is known (important to know + // its port widths) + if (!simd->known()) { + log_error(" The target cell type '%s' is not known!", + RTLIL::unescape_id(m_SimdDspType).c_str() + ); + } + + // Connect common ports + for (const auto& it : m_DspCfgPorts) { + auto sport = RTLIL::escape_id(it.first); + auto dport = RTLIL::escape_id(it.second); + + simd->setPort(dport, config.connections.at(sport)); + } + + // Connect data ports + for (const auto& it : m_DspDataPorts) { + auto sport = RTLIL::escape_id(it.first); + auto dport = RTLIL::escape_id(it.second); + + RTLIL::SigSpec sigspec; + size_t width = getPortWidth(simd, dport); + + // A part + if (dsp_a->hasPort(sport)) { + const auto& sig = dsp_a->getPort(sport); + sigspec.append(sig); + if (sig.bits().size() < width / 2) { + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, + sig.bits().size() - width / 2) + ); + } + } else { + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2)); + } + + // B part + if (dsp_b->hasPort(sport)) { + const auto& sig = dsp_b->getPort(sport); + sigspec.append(sig); + if (sig.bits().size() < width / 2) { + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, + sig.bits().size() - width / 2) + ); + } + } else { + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2)); + } + + simd->setPort(dport, sigspec); + } + + // Enable the fractured mode by connecting the control + // port. + simd->setPort(RTLIL::escape_id("f_mode"), RTLIL::S1); + + // Mark DSP parts for removal + cellsToRemove.push_back(dsp_a); + cellsToRemove.push_back(dsp_b); + } + } + + // Remove old cells + for (const auto& cell : cellsToRemove) { + module->remove(const_cast(cell)); + } + } + + // Clear + m_SigMap.clear(); + } + + // .......................................... + + /// Looks up port width in the cell definition and returns it. Returns 0 + /// if it cannot be determined. + size_t getPortWidth (RTLIL::Cell* a_Cell, RTLIL::IdString a_Port) { + + if (!a_Cell->known()) { + return 0; + } + + // Get the module defining the cell (the previous condition ensures + // that the pointers are valid) + RTLIL::Module* mod = a_Cell->module->design->module(a_Cell->type); + if (mod == nullptr) { + return 0; + } + + // Get the wire representing the port + RTLIL::Wire* wire = mod->wire(a_Port); + if (wire == nullptr) { + return 0; + } + + return wire->width; + } + + /// Given a DSP cell populates and returns a DspConfig struct for it. + DspConfig getDspConfig (RTLIL::Cell* a_Cell) { + DspConfig config; + + for (const auto& it : m_DspCfgPorts) { + auto port = RTLIL::escape_id(it.first); + + // Port unconnected + if (!a_Cell->hasPort(port)) { + config.connections[port] = RTLIL::SigSpec(RTLIL::Sx); + continue; + } + + // Get the port connection and map it to unique SigBits + const auto& orgSigSpec = a_Cell->getPort(port); + const auto& orgSigBits = orgSigSpec.bits(); + + RTLIL::SigSpec newSigSpec; + for (size_t i=0; i Date: Tue, 22 Feb 2022 10:52:51 +0100 Subject: [PATCH 614/845] Code formatting Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-simd.cc | 154 +++++++++++++++-------------------- 1 file changed, 66 insertions(+), 88 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index df7ed0899..9f656a67c 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -18,9 +18,10 @@ PRIVATE_NAMESPACE_BEGIN struct QlDspSimdPass : public Pass { - QlDspSimdPass () : Pass("ql_dsp_simd", "Infers QuickLogic k6n10f DSP pairs that can operate in SIMD mode") {} + QlDspSimdPass() : Pass("ql_dsp_simd", "Infers QuickLogic k6n10f DSP pairs that can operate in SIMD mode") {} - void help() override { + void help() override + { log("\n"); log(" ql_dsp_simd [selection]\n"); log("\n"); @@ -40,48 +41,39 @@ struct QlDspSimdPass : public Pass { // TODO: Possibly include parameters here. For now we have just // connections. - DspConfig () = default; + DspConfig() = default; - DspConfig (const DspConfig& ref) = default; - DspConfig (DspConfig&& ref) = default; + DspConfig(const DspConfig &ref) = default; + DspConfig(DspConfig &&ref) = default; - unsigned int hash () const { - return connections.hash(); - } + unsigned int hash() const { return connections.hash(); } - bool operator == (const DspConfig& ref) const { - return connections == ref.connections; - } + bool operator==(const DspConfig &ref) const { return connections == ref.connections; } }; // .......................................... // DSP control and config ports to consider and how to map them to ports // of the target DSP cell - const std::vector> m_DspCfgPorts = { - std::make_pair("clock_i", "clk"), - std::make_pair("reset_i", "reset"), - - std::make_pair("feedback_i", "feedback"), - std::make_pair("load_acc_i", "load_acc"), - std::make_pair("unsigned_a_i", "unsigned_a"), - std::make_pair("unsigned_b_i", "unsigned_b"), - - std::make_pair("output_select_i", "output_select"), - std::make_pair("saturate_enable_i", "saturate_enable"), - std::make_pair("shift_right_i", "shift_right"), - std::make_pair("round_i", "round"), - std::make_pair("subtract_i", "subtract"), - std::make_pair("register_inputs_i", "register_inputs") - }; + const std::vector> m_DspCfgPorts = {std::make_pair("clock_i", "clk"), + std::make_pair("reset_i", "reset"), + + std::make_pair("feedback_i", "feedback"), + std::make_pair("load_acc_i", "load_acc"), + std::make_pair("unsigned_a_i", "unsigned_a"), + std::make_pair("unsigned_b_i", "unsigned_b"), + + std::make_pair("output_select_i", "output_select"), + std::make_pair("saturate_enable_i", "saturate_enable"), + std::make_pair("shift_right_i", "shift_right"), + std::make_pair("round_i", "round"), + std::make_pair("subtract_i", "subtract"), + std::make_pair("register_inputs_i", "register_inputs")}; // DSP data ports and how to map them to ports of the target DSP cell const std::vector> m_DspDataPorts = { - std::make_pair("a_i", "a"), - std::make_pair("b_i", "b"), - std::make_pair("acc_fir_i", "acc_fir"), - std::make_pair("z_o", "z"), - std::make_pair("dly_b_o", "dly_b"), + std::make_pair("a_i", "a"), std::make_pair("b_i", "b"), std::make_pair("acc_fir_i", "acc_fir"), + std::make_pair("z_o", "z"), std::make_pair("dly_b_o", "dly_b"), }; // Source DSP cell type (SISD) @@ -94,11 +86,12 @@ struct QlDspSimdPass : public Pass { // .......................................... - void execute (std::vector a_Args, RTLIL::Design* a_Design) override { + void execute(std::vector a_Args, RTLIL::Design *a_Design) override + { log_header(a_Design, "Executing QL_DSP_SIMD pass.\n"); // Parse args - extra_args(a_Args, 1, a_Design); + extra_args(a_Args, 1, a_Design); // Process modules for (auto module : a_Design->selected_modules()) { @@ -108,7 +101,7 @@ struct QlDspSimdPass : public Pass { m_SigMap.set(module); // Assemble DSP cell groups - dict> groups; + dict> groups; for (auto cell : module->selected_cells()) { // Check if this is a DSP cell @@ -124,55 +117,42 @@ struct QlDspSimdPass : public Pass { // Add to a group const auto key = getDspConfig(cell); groups[key].push_back(cell); - } - std::vector cellsToRemove; + std::vector cellsToRemove; // Map cell pairs to the target DSP SIMD cell - for (const auto& it : groups) { - const auto& group = it.second; - const auto& config = it.first; + for (const auto &it : groups) { + const auto &group = it.second; + const auto &config = it.first; // Ensure an even number size_t count = group.size(); - if (count & 1) count--; + if (count & 1) + count--; // Map SIMD pairs - for (size_t i=0; i < count; i+=2) { - const RTLIL::Cell* dsp_a = group[i]; - const RTLIL::Cell* dsp_b = group[i+1]; - - std::string name = stringf("simd_%s_%s", - RTLIL::unescape_id(dsp_a->name).c_str(), - RTLIL::unescape_id(dsp_b->name).c_str() - ); - - log(" SIMD: %s (%s) + %s (%s) => %s (%s)\n", - RTLIL::unescape_id(dsp_a->name).c_str(), - RTLIL::unescape_id(dsp_a->type).c_str(), - RTLIL::unescape_id(dsp_b->name).c_str(), - RTLIL::unescape_id(dsp_b->type).c_str(), - RTLIL::unescape_id(name).c_str(), - RTLIL::unescape_id(m_SimdDspType).c_str() - ); + for (size_t i = 0; i < count; i += 2) { + const RTLIL::Cell *dsp_a = group[i]; + const RTLIL::Cell *dsp_b = group[i + 1]; + + std::string name = stringf("simd_%s_%s", RTLIL::unescape_id(dsp_a->name).c_str(), RTLIL::unescape_id(dsp_b->name).c_str()); + + log(" SIMD: %s (%s) + %s (%s) => %s (%s)\n", RTLIL::unescape_id(dsp_a->name).c_str(), RTLIL::unescape_id(dsp_a->type).c_str(), + RTLIL::unescape_id(dsp_b->name).c_str(), RTLIL::unescape_id(dsp_b->type).c_str(), RTLIL::unescape_id(name).c_str(), + RTLIL::unescape_id(m_SimdDspType).c_str()); // Create the new cell - RTLIL::Cell* simd = module->addCell( - RTLIL::escape_id(name), - m_SimdDspType - ); + RTLIL::Cell *simd = module->addCell(RTLIL::escape_id(name), m_SimdDspType); // Check if the target cell is known (important to know // its port widths) if (!simd->known()) { - log_error(" The target cell type '%s' is not known!", - RTLIL::unescape_id(m_SimdDspType).c_str() - ); + log_error(" The target cell type '%s' is not known!", RTLIL::unescape_id(m_SimdDspType).c_str()); } // Connect common ports - for (const auto& it : m_DspCfgPorts) { + for (const auto &it : m_DspCfgPorts) { auto sport = RTLIL::escape_id(it.first); auto dport = RTLIL::escape_id(it.second); @@ -180,7 +160,7 @@ struct QlDspSimdPass : public Pass { } // Connect data ports - for (const auto& it : m_DspDataPorts) { + for (const auto &it : m_DspDataPorts) { auto sport = RTLIL::escape_id(it.first); auto dport = RTLIL::escape_id(it.second); @@ -189,27 +169,23 @@ struct QlDspSimdPass : public Pass { // A part if (dsp_a->hasPort(sport)) { - const auto& sig = dsp_a->getPort(sport); + const auto &sig = dsp_a->getPort(sport); sigspec.append(sig); if (sig.bits().size() < width / 2) { - sigspec.append(RTLIL::SigSpec(RTLIL::Sx, - sig.bits().size() - width / 2) - ); + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, sig.bits().size() - width / 2)); } - } else { + } else { sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2)); } // B part if (dsp_b->hasPort(sport)) { - const auto& sig = dsp_b->getPort(sport); + const auto &sig = dsp_b->getPort(sport); sigspec.append(sig); if (sig.bits().size() < width / 2) { - sigspec.append(RTLIL::SigSpec(RTLIL::Sx, - sig.bits().size() - width / 2) - ); + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, sig.bits().size() - width / 2)); } - } else { + } else { sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2)); } @@ -227,8 +203,8 @@ struct QlDspSimdPass : public Pass { } // Remove old cells - for (const auto& cell : cellsToRemove) { - module->remove(const_cast(cell)); + for (const auto &cell : cellsToRemove) { + module->remove(const_cast(cell)); } } @@ -240,7 +216,8 @@ struct QlDspSimdPass : public Pass { /// Looks up port width in the cell definition and returns it. Returns 0 /// if it cannot be determined. - size_t getPortWidth (RTLIL::Cell* a_Cell, RTLIL::IdString a_Port) { + size_t getPortWidth(RTLIL::Cell *a_Cell, RTLIL::IdString a_Port) + { if (!a_Cell->known()) { return 0; @@ -248,13 +225,13 @@ struct QlDspSimdPass : public Pass { // Get the module defining the cell (the previous condition ensures // that the pointers are valid) - RTLIL::Module* mod = a_Cell->module->design->module(a_Cell->type); + RTLIL::Module *mod = a_Cell->module->design->module(a_Cell->type); if (mod == nullptr) { return 0; } // Get the wire representing the port - RTLIL::Wire* wire = mod->wire(a_Port); + RTLIL::Wire *wire = mod->wire(a_Port); if (wire == nullptr) { return 0; } @@ -263,10 +240,11 @@ struct QlDspSimdPass : public Pass { } /// Given a DSP cell populates and returns a DspConfig struct for it. - DspConfig getDspConfig (RTLIL::Cell* a_Cell) { + DspConfig getDspConfig(RTLIL::Cell *a_Cell) + { DspConfig config; - for (const auto& it : m_DspCfgPorts) { + for (const auto &it : m_DspCfgPorts) { auto port = RTLIL::escape_id(it.first); // Port unconnected @@ -276,15 +254,15 @@ struct QlDspSimdPass : public Pass { } // Get the port connection and map it to unique SigBits - const auto& orgSigSpec = a_Cell->getPort(port); - const auto& orgSigBits = orgSigSpec.bits(); + const auto &orgSigSpec = a_Cell->getPort(port); + const auto &orgSigBits = orgSigSpec.bits(); RTLIL::SigSpec newSigSpec; - for (size_t i=0; i Date: Tue, 22 Feb 2022 15:15:11 +0100 Subject: [PATCH 615/845] Fixed handling of unconnected output ports Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-simd.cc | 60 ++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index 9f656a67c..1bd0850b8 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -164,31 +164,32 @@ struct QlDspSimdPass : public Pass { auto sport = RTLIL::escape_id(it.first); auto dport = RTLIL::escape_id(it.second); - RTLIL::SigSpec sigspec; - size_t width = getPortWidth(simd, dport); - - // A part - if (dsp_a->hasPort(sport)) { - const auto &sig = dsp_a->getPort(sport); - sigspec.append(sig); - if (sig.bits().size() < width / 2) { - sigspec.append(RTLIL::SigSpec(RTLIL::Sx, sig.bits().size() - width / 2)); + size_t width; + bool isOutput; + + std::tie(width, isOutput) = getPortInfo(simd, dport); + + auto getConnection = [&](const RTLIL::Cell *cell) { + RTLIL::SigSpec sigspec; + if (cell->hasPort(sport)) { + const auto &sig = cell->getPort(sport); + sigspec.append(sig); } - } else { - sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2)); - } - - // B part - if (dsp_b->hasPort(sport)) { - const auto &sig = dsp_b->getPort(sport); - sigspec.append(sig); - if (sig.bits().size() < width / 2) { - sigspec.append(RTLIL::SigSpec(RTLIL::Sx, sig.bits().size() - width / 2)); + if (sigspec.bits().size() < width / 2) { + if (isOutput) { + for (size_t i = 0; i < width / 2 - sigspec.bits().size(); ++i) { + sigspec.append(RTLIL::SigSpec()); + } + } else { + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2 - sigspec.bits().size())); + } } - } else { - sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2)); - } + return sigspec; + }; + RTLIL::SigSpec sigspec; + sigspec.append(getConnection(dsp_a)); + sigspec.append(getConnection(dsp_b)); simd->setPort(dport, sigspec); } @@ -214,29 +215,28 @@ struct QlDspSimdPass : public Pass { // .......................................... - /// Looks up port width in the cell definition and returns it. Returns 0 - /// if it cannot be determined. - size_t getPortWidth(RTLIL::Cell *a_Cell, RTLIL::IdString a_Port) + /// Looks up port width and direction in the cell definition and returns it. + /// Returns (0, false) if it cannot be determined. + std::pair getPortInfo(RTLIL::Cell *a_Cell, RTLIL::IdString a_Port) { - if (!a_Cell->known()) { - return 0; + return std::make_pair(0, false); } // Get the module defining the cell (the previous condition ensures // that the pointers are valid) RTLIL::Module *mod = a_Cell->module->design->module(a_Cell->type); if (mod == nullptr) { - return 0; + return std::make_pair(0, false); } // Get the wire representing the port RTLIL::Wire *wire = mod->wire(a_Port); if (wire == nullptr) { - return 0; + return std::make_pair(0, false); } - return wire->width; + return std::make_pair(wire->width, wire->port_output); } /// Given a DSP cell populates and returns a DspConfig struct for it. From cbf1c471aa7d0e9c30cabbd9b9355c37c22e7281 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 22 Feb 2022 15:16:21 +0100 Subject: [PATCH 616/845] Fixed acc_fir port width Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 2 +- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index b8c5b3865..bdc484bf9 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -749,7 +749,7 @@ endmodule module dsp_t1_10x9x32 ( input [ 9:0] a_i, input [ 8:0] b_i, - input [ 3:0] acc_fir_i, + input [ 1:0] acc_fir_i, output [18:0] z_o, output [ 8:0] dly_b_o, diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index f0c5a8b4c..14f35c246 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -74,7 +74,7 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); dsp_t1_10x9x32 _TECHMAP_REPLACE_ ( .a_i (a), .b_i (b), - .acc_fir_i (4'd0), + .acc_fir_i (2'd0), .z_o (z), .feedback_i (2'd0), From aa7a60f609a8a5394eac39bfe4385e681367a03d Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 22 Feb 2022 15:28:46 +0100 Subject: [PATCH 617/845] Integrated the SIMD multiplier inference with the rest of the flow Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 1 + ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 121 ++++++++++++++++++ ql-qlf-plugin/synth_quicklogic.cc | 4 + .../tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl | 8 +- 4 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 56ced8f92..e9de5bdc4 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -38,6 +38,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10F_DIR)/cells_sim.v \ $(QLF_K6N10F_DIR)/ffs_map.v \ $(QLF_K6N10F_DIR)/dsp_map.v \ + $(QLF_K6N10F_DIR)/dsp_final_map.v \ $(PP3_DIR)/abc9_map.v \ $(PP3_DIR)/abc9_model.v \ $(PP3_DIR)/abc9_unmap.v \ diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v new file mode 100644 index 000000000..f8c6c305e --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -0,0 +1,121 @@ +module dsp_t1_20x18x64 ( + input [19:0] a_i, + input [17:0] b_i, + input [ 3:0] acc_fir_i, + output [37:0] z_o, + output [17:0] dly_b_o, + + input clock_i, + input reset_i, + + input [1:0] feedback_i, + input load_acc_i, + input unsigned_a_i, + input unsigned_b_i, + + input [2:0] output_select_i, + input saturate_enable_i, + input [5:0] shift_right_i, + input round_i, + input subtract_i, + input register_inputs_i, + input [19:0] coeff_0_i, + input [19:0] coeff_1_i, + input [19:0] coeff_2_i, + input [19:0] coeff_3_i +); + + QL_DSP2 _TECHMAP_REPLACE_ ( + .a (a_i), + .b (b_i), + .acc_fir (acc_fir_i), + .z (z_o), + .dly_b (dly_b_o), + + .clk (clk_i), + .reset (reset_i), + + .feedback (feedback_i), + .load_acc (load_acc_i), + .unsigned_a (unsigned_a_i), + .unsigned_b (unsigned_b_i), + + .f_mode (1'b0), // No fracturation + .output_select (output_select_i), + .saturate_enable (saturate_enable_i), + .shift_right (shift_right_i), + .round (round_i), + .subtract (subtract_i), + .register_inputs (register_inputs_i), + .coeff_0 (coeff_0_i), + .coeff_1 (coeff_1_i), + .coeff_2 (coeff_2_i), + .coeff_3 (coeff_3_i) + ); + +endmodule + +module dsp_t1_10x9x32 ( + input [ 9:0] a_i, + input [ 8:0] b_i, + input [ 1:0] acc_fir_i, + output [18:0] z_o, + output [ 8:0] dly_b_o, + + (* clkbuf_sink *) + input clock_i, + input reset_i, + + input [1:0] feedback_i, + input load_acc_i, + input unsigned_a_i, + input unsigned_b_i, + + input [2:0] output_select_i, + input saturate_enable_i, + input [5:0] shift_right_i, + input round_i, + input subtract_i, + input register_inputs_i, + input [ 9:0] coeff_0_i, + input [ 9:0] coeff_1_i, + input [ 9:0] coeff_2_i, + input [ 9:0] coeff_3_i +); + + wire [37:0] z; + wire [17:0] dly_b; + + QL_DSP2 _TECHMAP_REPLACE_ ( + .a ({10'd0, a_i}), + .b ({ 9'd0, b_i}), + .acc_fir (acc_fir_i), + .z (z), + .dly_b (dly_b), + + .clk (clk_i), + .reset (reset_i), + + .feedback (feedback_i), + .load_acc (load_acc_i), + .unsigned_a (unsigned_a_i), + .unsigned_b (unsigned_b_i), + + .f_mode (1'b1), // Enable fractuation, Use the lower half + .output_select (output_select_i), + .saturate_enable (saturate_enable_i), + .shift_right (shift_right_i), + .round (round_i), + .subtract (subtract_i), + .register_inputs (register_inputs_i), + .coeff_0 ({10'd0, coeff_0_i}), + .coeff_1 ({10'd0, coeff_1_i}), + .coeff_2 ({10'd0, coeff_2_i}), + .coeff_3 ({10'd0, coeff_3_i}) + ); + + assign z_o = z[18:0]; + assign dly_b_o = dly_b_o[8:0]; + +endmodule + diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 01ce6ef63..3bb44c529 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -272,6 +272,8 @@ struct SynthQuickLogicPass : public ScriptPass { run("techmap -map +/mul2dsp.v [...]", "(for qlf_k6n10f if not -no_dsp)"); run("chtype -set $mul t:$__soft_mul", "(for qlf_k6n10f if not -no_dsp)"); run("techmap -map +/quicklogic/" + family + "/dsp_map.v", "(for qlf_k6n10f if not -no_dsp)"); + run("ql_dsp_simd ", "(for qlf_k6n10f if not -no_dsp)"); + run("techmap -map +/quicklogic/" + family + "/dsp_final_map.v", "(for qlf_k6n10f if not -no_dsp)"); } else if (!nodsp) { run("wreduce t:$mul"); @@ -284,6 +286,8 @@ struct SynthQuickLogicPass : public ScriptPass { run("chtype -set $mul t:$__soft_mul"); } run("techmap -map +/quicklogic/" + family + "/dsp_map.v"); + run("ql_dsp_simd"); + run("techmap -map +/quicklogic/" + family + "/dsp_final_map.v"); } } diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl index 90f591df1..75acb102b 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl @@ -10,26 +10,26 @@ design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_20x18x64 +select -assert-count 1 t:QL_DSP2 set TOP "mult_20x18" design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_20x18x64 +select -assert-count 1 t:QL_DSP2 set TOP "mult_8x8" design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 set TOP "mult_10x9" design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 From 6287a5e40473dd78cea80a0091d6161ccfa81813 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 22 Feb 2022 15:29:51 +0100 Subject: [PATCH 618/845] Added test for SIMD DSP inference Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 8 + ql-qlf-plugin/tests/Makefile | 4 +- .../tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl | 34 +++ .../tests/qlf_k6n10f/dsp_simd/dsp_simd.v | 195 ++++++++++++++++++ 4 files changed, 240 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index f8c6c305e..a000fd655 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -1,3 +1,11 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + module dsp_t1_20x18x64 ( input [19:0] a_i, input [17:0] b_i, diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 4fc598c75..e54aeaf12 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -21,7 +21,8 @@ TESTS = consts \ tribuf \ fsm \ pp3_bram \ - qlf_k6n10f/dsp_mult + qlf_k6n10f/dsp_mult \ + qlf_k6n10f/dsp_simd # qlf_k6n10_bram \ include $(shell pwd)/../../Makefile_test.common @@ -40,4 +41,5 @@ tribuf_verify = true fsm_verify = true pp3_bram_verify = true qlf_k6n10f-dsp_mult_verify = true +qlf_k6n10f-dsp_simd_verify = true #qlf_k6n10_bram_verify = true diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl new file mode 100644 index 000000000..685838224 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl @@ -0,0 +1,34 @@ +yosys -import +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} +yosys -import ;# ingest plugin commands + +read_verilog dsp_simd.v +design -save read + +set TOP "simd_mult" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 0 t:dsp_t1_20x18x64 +select -assert-count 0 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 + +set TOP "simd_mult_odd" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 0 t:dsp_t1_20x18x64 +select -assert-count 0 t:dsp_t1_10x9x32 +select -assert-count 2 t:QL_DSP2 + +set TOP "simd_mult_conflict" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 0 t:dsp_t1_20x18x64 +select -assert-count 0 t:dsp_t1_10x9x32 +select -assert-count 2 t:QL_DSP2 + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v new file mode 100644 index 000000000..4d5f1a1c0 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v @@ -0,0 +1,195 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module simd_mult ( + input wire clk, + + input wire [ 7:0] a0, + input wire [ 7:0] b0, + output wire [15:0] z0, + + input wire [ 7:0] a1, + input wire [ 7:0] b1, + output wire [15:0] z1 +); + + dsp_t1_10x9x32 dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk), + + .feedback_i (2'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + + dsp_t1_10x9x32 dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk), + + .feedback_i (2'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + +endmodule + +module simd_mult_odd ( + input wire clk, + + input wire [ 7:0] a0, + input wire [ 7:0] b0, + output wire [15:0] z0, + + input wire [ 7:0] a1, + input wire [ 7:0] b1, + output wire [15:0] z1, + + input wire [ 7:0] a2, + input wire [ 7:0] b2, + output wire [15:0] z2 +); + + dsp_t1_10x9x32 dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk), + + .feedback_i (2'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + + dsp_t1_10x9x32 dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk), + + .feedback_i (2'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + + dsp_t1_10x9x32 dsp_2 ( + .a_i (a2), + .b_i (b2), + .z_o (z2), + + .clock_i (clk), + + .feedback_i (2'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + +endmodule + +module simd_mult_conflict ( + input wire clk0, + input wire clk1, + + input wire [ 7:0] a0, + input wire [ 7:0] b0, + output wire [15:0] z0, + + input wire [ 7:0] a1, + input wire [ 7:0] b1, + output wire [15:0] z1 +); + + dsp_t1_10x9x32 dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk0), + + .feedback_i (2'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + + dsp_t1_10x9x32 dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk1), + + .feedback_i (2'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + +endmodule + From 41e24ab85e6b1b3cb5098c9d0180164c5bc78f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Tue, 22 Feb 2022 17:47:52 +0100 Subject: [PATCH 619/845] Handle vpiExpr field of vpiArrayVar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index c9dc82dda..e50bd4e91 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1918,6 +1918,7 @@ void UhdmAst::process_array_var() vpi_release_handle(itr); visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); + visit_default_expr(obj_h); } void UhdmAst::process_packed_array_var() From 62983691c9270b8996afa8d2fdf6390651f5cb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Wed, 23 Feb 2022 11:03:27 +0100 Subject: [PATCH 620/845] Reverse unpacked ranges of io_decl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index e50bd4e91..380403b04 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2234,6 +2234,8 @@ void UhdmAst::process_io_decl() current_node = make_ast_node(AST::AST_MODPORTMEMBER); visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { unpacked_ranges.push_back(node); }); } + std::reverse(unpacked_ranges.begin(), unpacked_ranges.end()); + visit_one_to_one({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) { if (!node->str.empty()) { From 03872767565dbca272bd0300e1dcfd92152d79a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Wed, 23 Feb 2022 14:01:08 +0100 Subject: [PATCH 621/845] Handle vpiExpr field of packed array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index e50bd4e91..347ff4dbd 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1980,6 +1980,7 @@ void UhdmAst::process_packed_array_var() vpi_release_handle(itr); visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); + visit_default_expr(obj_h); } void UhdmAst::process_param_assign() From 5a8022956b2f859068dc74fb6102c4e9f605f840 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 23 Feb 2022 16:06:22 +0100 Subject: [PATCH 622/845] Fix param with typespec and range Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index bfea343de..1a0bdcf10 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3127,7 +3127,11 @@ void UhdmAst::process_tagged_pattern() lhs_node = assign_node->children[0]; } else { lhs_node = new AST::AstNode(AST::AST_IDENTIFIER); - lhs_node->str = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM})->str; + auto ancestor = find_ancestor({AST::AST_WIRE, AST::AST_MEMORY, AST::AST_PARAMETER, AST::AST_LOCALPARAM}); + if (!ancestor) { + log_error("Couldn't find ancestor for tagged pattern!\n"); + } + lhs_node->str = ancestor->str; } current_node = new AST::AstNode(assign_type); current_node->children.push_back(lhs_node->clone()); @@ -3596,6 +3600,15 @@ void UhdmAst::process_parameter() case vpiArrayTypespec: { shared.report.mark_handled(typespec_h); visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { + if (!node->str.empty()) { + auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + current_node->is_custom_type = true; + auto it = shared.param_types.find(current_node->str); + if (it == shared.param_types.end()) + shared.param_types.insert(std::make_pair(current_node->str, node)); + } if (node && node->attributes.count(UhdmAst::packed_ranges())) { for (auto r : node->attributes[UhdmAst::packed_ranges()]->children) { packed_ranges.push_back(r->clone()); From 7081c126be0c3ce95845fb156a97fd437fdda290 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Thu, 24 Feb 2022 01:52:56 -0800 Subject: [PATCH 623/845] Fixed adder techmap to map Carry out correctly Signed-off-by: Tarachand Pagarani --- ql-qlf-plugin/qlf_k6n10f/arith_map.v | 3 +++ ql-qlf-plugin/tests/full_adder/full_adder.tcl | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/arith_map.v b/ql-qlf-plugin/qlf_k6n10f/arith_map.v index c2323d6dc..25c69016c 100644 --- a/ql-qlf-plugin/qlf_k6n10f/arith_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/arith_map.v @@ -26,6 +26,7 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); (* force_downto *) output [Y_WIDTH-1:0] CO; + wire _TECHMAP_FAIL_ = Y_WIDTH <= 2; (* force_downto *) @@ -45,6 +46,8 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); wire [Y_WIDTH:0] C; (* force_downto *) wire [Y_WIDTH-1:0] S = {AA ^ BB}; + + assign CO[Y_WIDTH-1:0] = C[Y_WIDTH:1]; generate adder_carry intermediate_adder ( diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index 05ced4193..41443f403 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -64,7 +64,8 @@ design -reset read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top full_adder yosys proc -synth_quicklogic -family qlf_k6n10f +equiv_opt -assert -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f +design -load postopt yosys cd full_adder stat select -assert-count 6 t:adder_carry @@ -75,13 +76,26 @@ design -reset read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top subtractor yosys proc -synth_quicklogic -family qlf_k6n10f +equiv_opt -assert -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f +design -load postopt yosys cd subtractor stat select -assert-count 6 t:adder_carry design -reset +# Equivalence check for comparator synthesis for qlf-k6n10 +read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v +hierarchy -check -top comparator +yosys proc +equiv_opt -assert -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f +design -load postopt +yosys cd comparator +stat +select -assert-count 5 t:adder_carry + +design -reset + # Equivalence check for adder synthesis for pp3 read_verilog -icells -DWIDTH=4 $::env(DESIGN_TOP).v hierarchy -check -top full_adder From 79c7b07930b295e9cb383adf856f42e23fee483b Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 24 Feb 2022 10:53:32 +0100 Subject: [PATCH 624/845] Add support for parameter with typedef and unpacked range Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 1a0bdcf10..4e3cd7d37 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -316,7 +316,8 @@ static void resolve_wiretype(AST::AstNode *wire_node) log_assert(wiretype_ast->type == AST::AST_TYPEDEF); wire_node->attributes[ID::wiretype]->id2ast = wiretype_ast->children[0]; } - if (wire_node->children[0]->type == AST::AST_RANGE && wire_node->multirange_dimensions.empty()) { + if ((wire_node->children[0]->type == AST::AST_RANGE || (wire_node->children.size() > 1 && wire_node->children[1]->type == AST::AST_RANGE)) && + wire_node->multirange_dimensions.empty()) { if (wiretype_ast && !wiretype_ast->children.empty() && wiretype_ast->children[0]->attributes.count(UhdmAst::packed_ranges()) && wiretype_ast->children[0]->attributes.count(UhdmAst::unpacked_ranges())) { for (auto r : wiretype_ast->children[0]->attributes[UhdmAst::packed_ranges()]->children) { @@ -326,9 +327,20 @@ static void resolve_wiretype(AST::AstNode *wire_node) unpacked_ranges.push_back(r->clone()); } } else { - packed_ranges.push_back(wire_node->children[0]); + if (wire_node->children[0]->type == AST::AST_RANGE) + packed_ranges.push_back(wire_node->children[0]); + else if (wire_node->children[1]->type == AST::AST_RANGE) + packed_ranges.push_back(wire_node->children[1]); + else + log_error("Unhandled case in resolve_wiretype!\n"); + } + AST::AstNode *value = nullptr; + if (wire_node->children[0]->type != AST::AST_RANGE) { + value = wire_node->children[0]->clone(); } wire_node->children.clear(); + if (value) + wire_node->children.push_back(value); wire_node->attributes[UhdmAst::packed_ranges()] = AST::AstNode::mkconst_int(1, false, 1); if (!packed_ranges.empty()) { std::reverse(packed_ranges.begin(), packed_ranges.end()); @@ -1986,8 +1998,6 @@ void UhdmAst::process_packed_array_var() void UhdmAst::process_param_assign() { current_node = make_ast_node(AST::AST_PARAMETER); - std::vector packed_ranges; - std::vector unpacked_ranges; visit_one_to_one({vpiLhs}, obj_h, [&](AST::AstNode *node) { if (node) { current_node->type = node->type; @@ -1999,16 +2009,7 @@ void UhdmAst::process_param_assign() current_node->children.push_back(c->clone()); } } - if (node->attributes.count(UhdmAst::packed_ranges())) { - for (auto r : node->attributes[UhdmAst::packed_ranges()]->children) { - packed_ranges.push_back(r->clone()); - } - } - if (node->attributes.count(UhdmAst::unpacked_ranges())) { - for (auto r : node->attributes[UhdmAst::unpacked_ranges()]->children) { - unpacked_ranges.push_back(r->clone()); - } - } + copy_packed_unpacked_attribute(node, current_node); if (node->attributes.count(UhdmAst::is_imported())) { current_node->attributes[UhdmAst::is_imported()] = node->attributes[UhdmAst::is_imported()]->clone(); } @@ -2025,7 +2026,6 @@ void UhdmAst::process_param_assign() current_node->children.insert(current_node->children.begin(), node); } }); - add_multirange_wire(current_node, packed_ranges, unpacked_ranges, false); } void UhdmAst::process_cont_assign_var_init() From a18af2954c4f0696683bfba8883d76e1cf7e3ca0 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 24 Feb 2022 13:09:46 +0100 Subject: [PATCH 625/845] Added test for SIMD DSP operation inference Signed-off-by: Maciej Kurc --- .../tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl | 9 +++++++++ .../tests/qlf_k6n10f/dsp_simd/dsp_simd.v | 20 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl index 685838224..dd061143d 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl @@ -14,6 +14,15 @@ select -assert-count 0 t:dsp_t1_20x18x64 select -assert-count 0 t:dsp_t1_10x9x32 select -assert-count 1 t:QL_DSP2 +set TOP "simd_mult_inferred" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 0 t:dsp_t1_20x18x64 +select -assert-count 0 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 + set TOP "simd_mult_odd" design -load read hierarchy -top $TOP diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v index 4d5f1a1c0..f22a14151 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v @@ -60,6 +60,26 @@ module simd_mult ( endmodule +module simd_mult_inferred ( + input wire clk, + + input wire [ 7:0] a0, + input wire [ 7:0] b0, + output reg [15:0] z0, + + input wire [ 7:0] a1, + input wire [ 7:0] b1, + output reg [15:0] z1 +); + + always @(posedge clk) + z0 <= a0 * b0; + + always @(posedge clk) + z1 <= a1 * b1; + +endmodule + module simd_mult_odd ( input wire clk, From 0412f376e3e58e6d455716be7989a407fce4a342 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 24 Feb 2022 15:34:04 +0100 Subject: [PATCH 626/845] Fixed incorrect width of the feedback_i port and assignments to it. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 4 ++-- ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index a000fd655..5fe905cf8 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -16,7 +16,7 @@ module dsp_t1_20x18x64 ( input clock_i, input reset_i, - input [1:0] feedback_i, + input [2:0] feedback_i, input load_acc_i, input unsigned_a_i, input unsigned_b_i, @@ -74,7 +74,7 @@ module dsp_t1_10x9x32 ( input clock_i, input reset_i, - input [1:0] feedback_i, + input [2:0] feedback_i, input load_acc_i, input unsigned_a_i, input unsigned_b_i, diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index 14f35c246..054d82a4d 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -31,7 +31,7 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); .acc_fir_i (4'd0), .z_o (z), - .feedback_i (2'd0), + .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (!A_SIGNED), .unsigned_b_i (!B_SIGNED), @@ -74,7 +74,7 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); dsp_t1_10x9x32 _TECHMAP_REPLACE_ ( .a_i (a), .b_i (b), - .acc_fir_i (2'd0), + .acc_fir_i (3'd0), .z_o (z), .feedback_i (2'd0), diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v index f22a14151..b871eb870 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v @@ -25,7 +25,7 @@ module simd_mult ( .clock_i (clk), - .feedback_i (2'd0), + .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (1'b1), .unsigned_b_i (1'b1), @@ -45,7 +45,7 @@ module simd_mult ( .clock_i (clk), - .feedback_i (2'd0), + .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (1'b1), .unsigned_b_i (1'b1), @@ -103,7 +103,7 @@ module simd_mult_odd ( .clock_i (clk), - .feedback_i (2'd0), + .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (1'b1), .unsigned_b_i (1'b1), @@ -123,7 +123,7 @@ module simd_mult_odd ( .clock_i (clk), - .feedback_i (2'd0), + .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (1'b1), .unsigned_b_i (1'b1), @@ -143,7 +143,7 @@ module simd_mult_odd ( .clock_i (clk), - .feedback_i (2'd0), + .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (1'b1), .unsigned_b_i (1'b1), @@ -178,7 +178,7 @@ module simd_mult_conflict ( .clock_i (clk0), - .feedback_i (2'd0), + .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (1'b1), .unsigned_b_i (1'b1), @@ -198,7 +198,7 @@ module simd_mult_conflict ( .clock_i (clk1), - .feedback_i (2'd0), + .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (1'b1), .unsigned_b_i (1'b1), From 43812dc98f6e93d7779285393069e4cb85076b03 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 23 Feb 2022 17:04:24 +0100 Subject: [PATCH 627/845] Initial pass for matching MACC operations using pmgen Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 4 ++- ql-qlf-plugin/ql-dsp-macc.cc | 68 +++++++++++++++++++++++++++++++++++ ql-qlf-plugin/ql-dsp-macc.pmg | 39 ++++++++++++++++++++ 3 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/ql-dsp-macc.cc create mode 100644 ql-qlf-plugin/ql-dsp-macc.pmg diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index e9de5bdc4..1047ae6bf 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -12,7 +12,8 @@ SOURCES = synth_quicklogic.cc \ pp3_braminit.cc \ quicklogic_eqn.cc \ ql-edif.cc \ - ql-dsp-simd.cc + ql-dsp-simd.cc \ + ql-dsp-macc.cc include ../Makefile_plugin.common @@ -60,6 +61,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg) +pre-build2:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-macc.h -p ql_dsp_macc ql-dsp-macc.pmg) install_modules: $(VERILOG_MODULES) $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc new file mode 100644 index 000000000..9ac903117 --- /dev/null +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -0,0 +1,68 @@ +#include "kernel/sigtools.h" +#include "kernel/yosys.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +#include "pmgen/ql-dsp-macc.h" + +// ============================================================================ + +void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { + auto& st = pm.st_ql_dsp_macc; + + log("pattern:\n"); + log("mul: %s (%s)\n", + RTLIL::unescape_id(pm.st_ql_dsp_macc.mul->name).c_str(), + RTLIL::unescape_id(pm.st_ql_dsp_macc.mul->type).c_str() + ); + log("add: %s (%s)\n", + RTLIL::unescape_id(pm.st_ql_dsp_macc.add->name).c_str(), + RTLIL::unescape_id(pm.st_ql_dsp_macc.add->type).c_str() + ); + if (st.mux != nullptr) { + log("mux: %s (%s)\n", + RTLIL::unescape_id(st.mux->name).c_str(), + RTLIL::unescape_id(st.mux->type).c_str() + ); + } + log("ff : %s (%s)\n", + RTLIL::unescape_id(pm.st_ql_dsp_macc.ff->name).c_str(), + RTLIL::unescape_id(pm.st_ql_dsp_macc.ff->type).c_str() + ); + + // Mark the cells for removal + pm.autoremove(st.mul); + pm.autoremove(st.add); + if (st.mux != nullptr) { + pm.autoremove(st.mux); + } + pm.autoremove(st.ff); +} + +struct QlDspMacc : public Pass { + + QlDspMacc() : Pass("ql_dsp_macc", "Does something") {} + + void help() override { + log("\n"); + log(" ql_dsp_macc [options] [selection]\n"); + log("\n"); + } + + void execute (std::vector a_Args, RTLIL::Design *a_Design) override { + log_header(a_Design, "Executing QL_DSP_MACC pass.\n"); + + size_t argidx; + for (argidx = 1; argidx < a_Args.size(); argidx++) { + break; + } + extra_args(a_Args, argidx, a_Design); + + for (auto module : a_Design->selected_modules()) { + ql_dsp_macc_pm(module, module->selected_cells()).run_ql_dsp_macc(create_ql_macc_dsp); + } + } +} QlDspMacc; + +PRIVATE_NAMESPACE_END diff --git a/ql-qlf-plugin/ql-dsp-macc.pmg b/ql-qlf-plugin/ql-dsp-macc.pmg new file mode 100644 index 000000000..a0564dcdb --- /dev/null +++ b/ql-qlf-plugin/ql-dsp-macc.pmg @@ -0,0 +1,39 @@ +pattern ql_dsp_macc + +state add_ab +state add_ba + +match mul + select mul->type.in($mul) + select nusers(port(mul, \Y)) <= 3 +endmatch + +match add + select add->type.in($add, $sub) + choice AB {\A, \B} + define BA (AB == \A ? \B : \A) + index port(add, AB) === port(mul, \Y) + select nusers(port(add, \Y)) == 2 + set add_ab AB + set add_ba BA +endmatch + +match mux + select mux->type.in($mux) + choice AB {\A, \B} + define BA (AB == \A ? \B : \A) + index port(mux, AB) === port(mul, \Y) + index port(mux, BA) === port(add, \Y) + select nusers(port(mux, \Y)) == 2 + optional +endmatch + +match ff + select ff->type.in($dff, $adff) + index port(ff, \D) === (mux == nullptr ? port(add, \Y) : port(mux, \Y)) + index port(ff, \Q) === port(add, add_ba) +endmatch + +code + accept; +endcode From 173effc59f301562a8b18fdf8853511c5a194689 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 24 Feb 2022 13:39:07 +0100 Subject: [PATCH 628/845] Added support for use of pmgen.py and additional dependencies for plugin building Signed-off-by: Maciej Kurc --- Makefile | 4 ++++ Makefile_plugin.common | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 00e026369..1279f8381 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,9 @@ endef $(foreach plugin,$(PLUGIN_LIST),$(eval $(call install_plugin,$(plugin)))) +pmgen.py: + wget -nc -O $@ https://raw.githubusercontent.com/YosysHQ/yosys/master/passes/pmgen/pmgen.py + plugins: $(PLUGINS) install: $(PLUGINS_INSTALL) @@ -45,6 +48,7 @@ test: $(PLUGINS_TEST) plugins_clean: $(PLUGINS_CLEAN) clean:: plugins_clean + rm -rf pmgen.py CLANG_FORMAT ?= clang-format-8 format: diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 49d6ab5f1..6fc44928f 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -56,15 +56,19 @@ DATA_DIR ?= $(shell $(YOSYS_CONFIG) --datdir) EXTRA_FLAGS ?= OBJS := $(patsubst %.cc,%.o,$(SOURCES)) +DEPS ?= all: $(NAME).so -$(OBJS): %.o: %.cc - $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(EXTRA_FLAGS) -c -o $@ $^ +$(OBJS): %.o: %.cc $(DEPS) + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(EXTRA_FLAGS) -c -o $@ $(filter %.cc, $^) $(NAME).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) +../pmgen.py: + @$(MAKE) -C .. pmgen.py + install_plugin: $(NAME).so install -D $< $(PLUGINS_DIR)/$< From 920d06800fefb391142ad5fdd716a28c244eab1d Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 24 Feb 2022 13:39:53 +0100 Subject: [PATCH 629/845] Added pmgen targets for the ql-qlf plugin Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 1047ae6bf..aa620dbba 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -15,6 +15,9 @@ SOURCES = synth_quicklogic.cc \ ql-dsp-simd.cc \ ql-dsp-macc.cc +DEPS = pmgen/ql-dsp-pm.h \ + pmgen/ql-dsp-macc.h + include ../Makefile_plugin.common COMMON = common @@ -58,10 +61,19 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(PP3_DIR)/mult_sim.v \ $(PP3_DIR)/qlal3_sim.v \ -retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) +#retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) + +#pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg) +#pre-build2:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-macc.h -p ql_dsp_macc ql-dsp-macc.pmg) + +pmgen: + mkdir -p pmgen + +pmgen/ql-dsp-pm.h: ../pmgen.py ql_dsp.pmg | pmgen + python3 ../pmgen.py -o $@ -p ql_dsp ql_dsp.pmg -pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg) -pre-build2:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-macc.h -p ql_dsp_macc ql-dsp-macc.pmg) +pmgen/ql-dsp-macc.h: ../pmgen.py ql-dsp-macc.pmg | pmgen + python3 ../pmgen.py -o $@ -p ql_dsp_macc ql-dsp-macc.pmg install_modules: $(VERILOG_MODULES) $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);) @@ -70,4 +82,4 @@ install: install_modules clean: $(MAKE) -f ../Makefile_plugin.common $@ - rm -f *pm.h + rm -rf pmgen From 134c6c631c9ed8c90ca1baae777367445eadaafa Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 24 Feb 2022 15:14:28 +0100 Subject: [PATCH 630/845] Preliminary mapping of inferred MACC structures to k6n10f DSP cells Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-macc.cc | 108 +++++++++++++++++++++++++++++------ 1 file changed, 91 insertions(+), 17 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index 9ac903117..beafbb816 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -11,25 +11,99 @@ PRIVATE_NAMESPACE_BEGIN void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { auto& st = pm.st_ql_dsp_macc; - log("pattern:\n"); - log("mul: %s (%s)\n", - RTLIL::unescape_id(pm.st_ql_dsp_macc.mul->name).c_str(), - RTLIL::unescape_id(pm.st_ql_dsp_macc.mul->type).c_str() - ); - log("add: %s (%s)\n", - RTLIL::unescape_id(pm.st_ql_dsp_macc.add->name).c_str(), - RTLIL::unescape_id(pm.st_ql_dsp_macc.add->type).c_str() - ); + // Get port widths + size_t a_width = GetSize(st.mul->getPort(ID(A))); + size_t b_width = GetSize(st.mul->getPort(ID(B))); + size_t z_width = GetSize(st.ff->getPort(ID(Q))); + + size_t min_width = std::min(a_width, b_width); + size_t max_width = std::max(a_width, b_width); + + // Determine DSP type or discard if too narrow / wide + RTLIL::IdString type; + if (min_width <= 2 && max_width <= 2 && z_width <= 4) { + // Too narrow + return; + } + else if (min_width <= 9 && max_width <= 10 && z_width <= 19) { + type = RTLIL::escape_id("dsp_t1_10x9x32"); + } + else if (min_width <= 18 && max_width <= 20 && z_width <= 38) { + type = RTLIL::escape_id("dsp_t1_20x18x64"); + } + else { + // Too wide + return; + } + + log("Inferring MACC %zux%zu->%zu as %s from:\n", + a_width, b_width, z_width, RTLIL::unescape_id(type).c_str()); + + for (auto cell : {st.mul, st.add, st.mux, st.ff}) { + if (cell != nullptr) { + log(" %s (%s)\n", + RTLIL::unescape_id(cell->name).c_str(), + RTLIL::unescape_id(cell->type).c_str() + ); + } + } + + // Build the DSP cell name + std::string name; + name += RTLIL::unescape_id(st.mul->name) + "_"; + name += RTLIL::unescape_id(st.add->name) + "_"; + if (st.mux != nullptr) { + name += RTLIL::unescape_id(st.mux->name) + "_"; + } + name += RTLIL::unescape_id(st.ff->name); + + // Add the DSP cell + RTLIL::Cell* cell = pm.module->addCell(RTLIL::escape_id(name), type); + + // Connect data ports + if (a_width >= b_width) { + cell->setPort(RTLIL::escape_id("a_i"), st.mul->getPort(ID(A))); + cell->setPort(RTLIL::escape_id("b_i"), st.mul->getPort(ID(B))); + } else { + cell->setPort(RTLIL::escape_id("a_i"), st.mul->getPort(ID(B))); + cell->setPort(RTLIL::escape_id("b_i"), st.mul->getPort(ID(A))); + } + cell->setPort(RTLIL::escape_id("z_o"), st.ff->getPort(ID(Q))); + + // Connect clock and reset + cell->setPort(RTLIL::escape_id("clock_i"), st.ff->getPort(ID(CLK))); + if (st.ff->type == RTLIL::escape_id("$adff")) { + cell->setPort(RTLIL::escape_id("reset_i"), st.ff->getPort(ID(ARST))); + } else { + cell->setPort(RTLIL::escape_id("reset_i"), RTLIL::SigSpec(RTLIL::S0)); + } + + // Insert feedback_i control logic used for clearing / loading the accumulator if (st.mux != nullptr) { - log("mux: %s (%s)\n", - RTLIL::unescape_id(st.mux->name).c_str(), - RTLIL::unescape_id(st.mux->type).c_str() - ); + // TODO: + } + // No acc clear/load + else { + cell->setPort(RTLIL::escape_id("feedback_i"), RTLIL::SigSpec(RTLIL::S0, 3)); } - log("ff : %s (%s)\n", - RTLIL::unescape_id(pm.st_ql_dsp_macc.ff->name).c_str(), - RTLIL::unescape_id(pm.st_ql_dsp_macc.ff->type).c_str() - ); + + // Connect control ports + cell->setPort(RTLIL::escape_id("load_acc_i"), RTLIL::SigSpec(RTLIL::S1)); + + bool a_signed = st.mul->getParam(ID(A_SIGNED)).as_bool(); + cell->setPort(RTLIL::escape_id("unsigned_a_i"), RTLIL::SigSpec(a_signed ? RTLIL::S0 : RTLIL::S1)); + bool b_signed = st.mul->getParam(ID(B_SIGNED)).as_bool(); + cell->setPort(RTLIL::escape_id("unsigned_b_i"), RTLIL::SigSpec(b_signed ? RTLIL::S0 : RTLIL::S1)); + + // Connect config ports + cell->setPort(RTLIL::escape_id("output_select_i"), RTLIL::SigSpec({RTLIL::S0, RTLIL::S1, RTLIL::S0})); + cell->setPort(RTLIL::escape_id("saturate_enable_i"), RTLIL::SigSpec(RTLIL::S0)); + cell->setPort(RTLIL::escape_id("shift_right_i"), RTLIL::SigSpec(RTLIL::S0, 6)); + cell->setPort(RTLIL::escape_id("round_i"), RTLIL::SigSpec(RTLIL::S0)); + cell->setPort(RTLIL::escape_id("register_inputs_i"), RTLIL::SigSpec(RTLIL::S0)); + + bool subtract = (st.add->type == RTLIL::escape_id("$sub")); + cell->setPort(RTLIL::escape_id("subtract_i"), RTLIL::SigSpec(subtract ? RTLIL::S1 : RTLIL::S0)); // Mark the cells for removal pm.autoremove(st.mul); From 95af074ab1619cab5a221a33fbd5c330c66a5448 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Feb 2022 10:03:14 +0100 Subject: [PATCH 631/845] Added correct input/output port padding Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-macc.cc | 46 +++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index beafbb816..b0cc62c5b 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -19,17 +19,31 @@ void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { size_t min_width = std::min(a_width, b_width); size_t max_width = std::max(a_width, b_width); + // Signed / unsigned + bool a_signed = st.mul->getParam(ID(A_SIGNED)).as_bool(); + bool b_signed = st.mul->getParam(ID(B_SIGNED)).as_bool(); + // Determine DSP type or discard if too narrow / wide RTLIL::IdString type; + size_t tgt_a_width; + size_t tgt_b_width; + size_t tgt_z_width; + if (min_width <= 2 && max_width <= 2 && z_width <= 4) { // Too narrow return; } else if (min_width <= 9 && max_width <= 10 && z_width <= 19) { type = RTLIL::escape_id("dsp_t1_10x9x32"); + tgt_a_width = 10; + tgt_b_width = 9; + tgt_z_width = 19; } else if (min_width <= 18 && max_width <= 20 && z_width <= 38) { type = RTLIL::escape_id("dsp_t1_20x18x64"); + tgt_a_width = 20; + tgt_b_width = 18; + tgt_z_width = 38; } else { // Too wide @@ -60,15 +74,32 @@ void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { // Add the DSP cell RTLIL::Cell* cell = pm.module->addCell(RTLIL::escape_id(name), type); - // Connect data ports + // Get input/output data signals + RTLIL::SigSpec sig_a; + RTLIL::SigSpec sig_b; + RTLIL::SigSpec sig_z; + if (a_width >= b_width) { - cell->setPort(RTLIL::escape_id("a_i"), st.mul->getPort(ID(A))); - cell->setPort(RTLIL::escape_id("b_i"), st.mul->getPort(ID(B))); + sig_a = st.mul->getPort(ID(A)); + sig_b = st.mul->getPort(ID(B)); } else { - cell->setPort(RTLIL::escape_id("a_i"), st.mul->getPort(ID(B))); - cell->setPort(RTLIL::escape_id("b_i"), st.mul->getPort(ID(A))); + sig_a = st.mul->getPort(ID(B)); + sig_b = st.mul->getPort(ID(A)); } - cell->setPort(RTLIL::escape_id("z_o"), st.ff->getPort(ID(Q))); + sig_z = st.ff->getPort(ID(Q)); + + // Connect input data ports, sign extend / pad with zeros + sig_a.extend_u0(tgt_a_width, a_signed); + sig_b.extend_u0(tgt_b_width, b_signed); + cell->setPort(RTLIL::escape_id("a_i"), sig_a); + cell->setPort(RTLIL::escape_id("b_i"), sig_b); + + // Connect output data port, pad if needed + if ((size_t)GetSize(sig_z) < tgt_z_width) { + auto* wire = pm.module->addWire(NEW_ID, tgt_z_width - GetSize(sig_z)); + sig_z.append(wire); + } + cell->setPort(RTLIL::escape_id("z_o"), sig_z); // Connect clock and reset cell->setPort(RTLIL::escape_id("clock_i"), st.ff->getPort(ID(CLK))); @@ -89,10 +120,7 @@ void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { // Connect control ports cell->setPort(RTLIL::escape_id("load_acc_i"), RTLIL::SigSpec(RTLIL::S1)); - - bool a_signed = st.mul->getParam(ID(A_SIGNED)).as_bool(); cell->setPort(RTLIL::escape_id("unsigned_a_i"), RTLIL::SigSpec(a_signed ? RTLIL::S0 : RTLIL::S1)); - bool b_signed = st.mul->getParam(ID(B_SIGNED)).as_bool(); cell->setPort(RTLIL::escape_id("unsigned_b_i"), RTLIL::SigSpec(b_signed ? RTLIL::S0 : RTLIL::S1)); // Connect config ports From 67ec9e2df7bd950c7753afd7e0dcace496731c36 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Feb 2022 10:34:32 +0100 Subject: [PATCH 632/845] Integrated DSP MACC inference with the qlf_k6n10f synthesis flow Signed-off-by: Maciej Kurc --- ql-qlf-plugin/synth_quicklogic.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 3bb44c529..fdb23b097 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -269,6 +269,7 @@ struct SynthQuickLogicPass : public ScriptPass { if (help_mode) { run("wreduce t:$mul", " (for qlf_k6n10f if not -no_dsp)"); + run("ql_dsp_macc", " (for qlf_k6n10f if not -no_dsp)"); run("techmap -map +/mul2dsp.v [...]", "(for qlf_k6n10f if not -no_dsp)"); run("chtype -set $mul t:$__soft_mul", "(for qlf_k6n10f if not -no_dsp)"); run("techmap -map +/quicklogic/" + family + "/dsp_map.v", "(for qlf_k6n10f if not -no_dsp)"); @@ -277,6 +278,8 @@ struct SynthQuickLogicPass : public ScriptPass { } else if (!nodsp) { run("wreduce t:$mul"); + run("ql_dsp_macc"); + for (const auto &rule : dsp_rules) { run(stringf("techmap -map +/mul2dsp.v " "-D DSP_A_MAXWIDTH=%zu -D DSP_B_MAXWIDTH=%zu " From da3d6371e2d3bb10df6471660da1469697841a80 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Feb 2022 10:35:09 +0100 Subject: [PATCH 633/845] Added tests for DSP MACC inference for qlf_k6n10f Signed-off-by: Maciej Kurc --- ql-qlf-plugin/tests/Makefile | 4 +- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 39 +++++++++++ .../tests/qlf_k6n10f/dsp_macc/dsp_macc.v | 65 +++++++++++++++++++ 3 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index e54aeaf12..1cc48ca45 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -22,7 +22,8 @@ TESTS = consts \ fsm \ pp3_bram \ qlf_k6n10f/dsp_mult \ - qlf_k6n10f/dsp_simd + qlf_k6n10f/dsp_simd \ + qlf_k6n10f/dsp_macc # qlf_k6n10_bram \ include $(shell pwd)/../../Makefile_test.common @@ -42,4 +43,5 @@ fsm_verify = true pp3_bram_verify = true qlf_k6n10f-dsp_mult_verify = true qlf_k6n10f-dsp_simd_verify = true +qlf_k6n10f-dsp_macc_verify = true #qlf_k6n10_bram_verify = true diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl new file mode 100644 index 000000000..b6a0d970a --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -0,0 +1,39 @@ +yosys -import +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} +yosys -import ;# ingest plugin commands + +read_verilog dsp_macc.v +design -save read + +set TOP "macc_simple" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:* + +set TOP "macc_simple_clr" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:* + +set TOP "macc_simple_arst" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:* + +set TOP "macc_simple_arst_clr" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:* + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v new file mode 100644 index 000000000..0d63d48bb --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v @@ -0,0 +1,65 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module macc_simple ( + input wire clk, + input wire [ 7:0] A, + input wire [ 7:0] B, + output reg [15:0] Z +); + + always @(posedge clk) + Z <= Z + (A * B); + +endmodule + +module macc_simple_clr ( + input wire clk, + input wire clr, + input wire [ 7:0] A, + input wire [ 7:0] B, + output reg [15:0] Z +); + + always @(posedge clk) + if (clr) Z <= (A * B); + else Z <= Z + (A * B); + +endmodule + +module macc_simple_arst ( + input wire clk, + input wire rst, + input wire [ 7:0] A, + input wire [ 7:0] B, + output reg [15:0] Z +); + + always @(posedge clk or posedge rst) + if (rst) Z <= 0; + else Z <= Z + (A * B); + +endmodule + +module macc_simple_arst_clr ( + input wire clk, + input wire rst, + input wire clr, + input wire [ 7:0] A, + input wire [ 7:0] B, + output reg [15:0] Z +); + + always @(posedge clk or posedge rst) + if (rst) Z <= 0; + else begin + if (clr) Z <= (A * B); + else Z <= Z + (A * B); + end + +endmodule From 3931391e8a63c15605a1588a3e39509e3dc3f152 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Feb 2022 11:00:25 +0100 Subject: [PATCH 634/845] Added insertion of $not gate if the accumulator clear/load signal is inverted Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-macc.cc | 16 ++++++++++++++-- ql-qlf-plugin/ql-dsp-macc.pmg | 2 ++ .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 6 ++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index b0cc62c5b..76662acce 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -111,11 +111,23 @@ void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { // Insert feedback_i control logic used for clearing / loading the accumulator if (st.mux != nullptr) { - // TODO: + RTLIL::SigSpec sig_s = st.mux->getPort(ID(S)); + + // Depending on the mux port ordering insert inverter if needed + log_assert(st.mux_ab == ID(A) || st.mux_ab == ID(B)); + if (st.mux_ab == ID(B)) { + sig_s = pm.module->Not(NEW_ID, sig_s); + } + + // Assemble the full control signal for the feedback_i port + RTLIL::SigSpec sig_f; + sig_f.append(RTLIL::S0); + sig_f.append(sig_s); + cell->setPort(RTLIL::escape_id("feedback_i"), sig_f); } // No acc clear/load else { - cell->setPort(RTLIL::escape_id("feedback_i"), RTLIL::SigSpec(RTLIL::S0, 3)); + cell->setPort(RTLIL::escape_id("feedback_i"), RTLIL::SigSpec(RTLIL::S0, 2)); } // Connect control ports diff --git a/ql-qlf-plugin/ql-dsp-macc.pmg b/ql-qlf-plugin/ql-dsp-macc.pmg index a0564dcdb..e71b2fa76 100644 --- a/ql-qlf-plugin/ql-dsp-macc.pmg +++ b/ql-qlf-plugin/ql-dsp-macc.pmg @@ -2,6 +2,7 @@ pattern ql_dsp_macc state add_ab state add_ba +state mux_ab match mul select mul->type.in($mul) @@ -25,6 +26,7 @@ match mux index port(mux, AB) === port(mul, \Y) index port(mux, BA) === port(add, \Y) select nusers(port(mux, \Y)) == 2 + set mux_ab AB optional endmatch diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl index b6a0d970a..650040942 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -19,7 +19,8 @@ hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP select -assert-count 1 t:dsp_t1_10x9x32 -select -assert-count 1 t:* +select -assert-count 1 t:\$lut +select -assert-count 2 t:* set TOP "macc_simple_arst" design -load read @@ -35,5 +36,6 @@ hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP select -assert-count 1 t:dsp_t1_10x9x32 -select -assert-count 1 t:* +select -assert-count 1 t:\$lut +select -assert-count 2 t:* From cbee68c514ffc6167836c4a78571bd7e944d4d77 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Feb 2022 11:05:41 +0100 Subject: [PATCH 635/845] Code formatting Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-macc.cc | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index 76662acce..b5f911a0e 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -8,8 +8,9 @@ PRIVATE_NAMESPACE_BEGIN // ============================================================================ -void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { - auto& st = pm.st_ql_dsp_macc; +void create_ql_macc_dsp(ql_dsp_macc_pm &pm) +{ + auto &st = pm.st_ql_dsp_macc; // Get port widths size_t a_width = GetSize(st.mul->getPort(ID(A))); @@ -32,33 +33,26 @@ void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { if (min_width <= 2 && max_width <= 2 && z_width <= 4) { // Too narrow return; - } - else if (min_width <= 9 && max_width <= 10 && z_width <= 19) { + } else if (min_width <= 9 && max_width <= 10 && z_width <= 19) { type = RTLIL::escape_id("dsp_t1_10x9x32"); tgt_a_width = 10; tgt_b_width = 9; tgt_z_width = 19; - } - else if (min_width <= 18 && max_width <= 20 && z_width <= 38) { + } else if (min_width <= 18 && max_width <= 20 && z_width <= 38) { type = RTLIL::escape_id("dsp_t1_20x18x64"); tgt_a_width = 20; tgt_b_width = 18; tgt_z_width = 38; - } - else { + } else { // Too wide return; } - log("Inferring MACC %zux%zu->%zu as %s from:\n", - a_width, b_width, z_width, RTLIL::unescape_id(type).c_str()); + log("Inferring MACC %zux%zu->%zu as %s from:\n", a_width, b_width, z_width, RTLIL::unescape_id(type).c_str()); for (auto cell : {st.mul, st.add, st.mux, st.ff}) { if (cell != nullptr) { - log(" %s (%s)\n", - RTLIL::unescape_id(cell->name).c_str(), - RTLIL::unescape_id(cell->type).c_str() - ); + log(" %s (%s)\n", RTLIL::unescape_id(cell->name).c_str(), RTLIL::unescape_id(cell->type).c_str()); } } @@ -72,7 +66,7 @@ void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { name += RTLIL::unescape_id(st.ff->name); // Add the DSP cell - RTLIL::Cell* cell = pm.module->addCell(RTLIL::escape_id(name), type); + RTLIL::Cell *cell = pm.module->addCell(RTLIL::escape_id(name), type); // Get input/output data signals RTLIL::SigSpec sig_a; @@ -96,7 +90,7 @@ void create_ql_macc_dsp (ql_dsp_macc_pm& pm) { // Connect output data port, pad if needed if ((size_t)GetSize(sig_z) < tgt_z_width) { - auto* wire = pm.module->addWire(NEW_ID, tgt_z_width - GetSize(sig_z)); + auto *wire = pm.module->addWire(NEW_ID, tgt_z_width - GetSize(sig_z)); sig_z.append(wire); } cell->setPort(RTLIL::escape_id("z_o"), sig_z); @@ -158,13 +152,15 @@ struct QlDspMacc : public Pass { QlDspMacc() : Pass("ql_dsp_macc", "Does something") {} - void help() override { + void help() override + { log("\n"); log(" ql_dsp_macc [options] [selection]\n"); log("\n"); } - void execute (std::vector a_Args, RTLIL::Design *a_Design) override { + void execute(std::vector a_Args, RTLIL::Design *a_Design) override + { log_header(a_Design, "Executing QL_DSP_MACC pass.\n"); size_t argidx; From 7dc8aa5f63a819cf11f2bece7ad95c03cd9a65ce Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Feb 2022 13:11:52 +0100 Subject: [PATCH 636/845] Extended MACC inference with the case when the output is taken from before the accumulator register Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-macc.cc | 51 ++++++++++++++++++- ql-qlf-plugin/ql-dsp-macc.pmg | 17 +++++-- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 17 +++++++ .../tests/qlf_k6n10f/dsp_macc/dsp_macc.v | 34 +++++++++++++ 4 files changed, 113 insertions(+), 6 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index b5f911a0e..571304f1b 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -12,6 +12,49 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) { auto &st = pm.st_ql_dsp_macc; + // Reject if multiplier drives anything else than either $add or $add and + // $mux + if (st.mux == nullptr && st.mul_nusers > 2) { + return; + } + + // Determine whether the output is taken from before or after the ff + bool out_ff; + if (st.ff_d_nusers == 2 && st.ff_q_nusers == 3) { + out_ff = true; + } else if (st.ff_d_nusers == 3 && st.ff_q_nusers == 2) { + out_ff = false; + } else { + // Illegal, cannot take the two outputs simulataneously + return; + } + + // No mux, the adder can driver either the ff or the ff + output + if (st.mux == nullptr) { + if (out_ff && st.add_nusers != 2) { + return; + } + if (!out_ff && st.add_nusers != 3) { + return; + } + } + // Mux present, the adder cannot drive anything else + else { + if (st.add_nusers != 2) { + return; + } + } + + // Mux can driver either the ff or the ff + output + if (st.mux != nullptr) { + if (out_ff && st.mux_nusers != 2) { + return; + } + if (!out_ff && st.mux_nusers != 3) { + return; + } + } + // Get port widths size_t a_width = GetSize(st.mul->getPort(ID(A))); size_t b_width = GetSize(st.mul->getPort(ID(B))); @@ -80,7 +123,8 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) sig_a = st.mul->getPort(ID(B)); sig_b = st.mul->getPort(ID(A)); } - sig_z = st.ff->getPort(ID(Q)); + + sig_z = out_ff ? st.ff->getPort(ID(Q)) : st.ff->getPort(ID(D)); // Connect input data ports, sign extend / pad with zeros sig_a.extend_u0(tgt_a_width, a_signed); @@ -130,7 +174,6 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) cell->setPort(RTLIL::escape_id("unsigned_b_i"), RTLIL::SigSpec(b_signed ? RTLIL::S0 : RTLIL::S1)); // Connect config ports - cell->setPort(RTLIL::escape_id("output_select_i"), RTLIL::SigSpec({RTLIL::S0, RTLIL::S1, RTLIL::S0})); cell->setPort(RTLIL::escape_id("saturate_enable_i"), RTLIL::SigSpec(RTLIL::S0)); cell->setPort(RTLIL::escape_id("shift_right_i"), RTLIL::SigSpec(RTLIL::S0, 6)); cell->setPort(RTLIL::escape_id("round_i"), RTLIL::SigSpec(RTLIL::S0)); @@ -139,6 +182,10 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) bool subtract = (st.add->type == RTLIL::escape_id("$sub")); cell->setPort(RTLIL::escape_id("subtract_i"), RTLIL::SigSpec(subtract ? RTLIL::S1 : RTLIL::S0)); + // 3 - output post acc + // 1 - output pre acc + cell->setPort(RTLIL::escape_id("output_select_i"), out_ff ? RTLIL::Const(3, 3) : RTLIL::Const(1, 3)); + // Mark the cells for removal pm.autoremove(st.mul); pm.autoremove(st.add); diff --git a/ql-qlf-plugin/ql-dsp-macc.pmg b/ql-qlf-plugin/ql-dsp-macc.pmg index e71b2fa76..663414faa 100644 --- a/ql-qlf-plugin/ql-dsp-macc.pmg +++ b/ql-qlf-plugin/ql-dsp-macc.pmg @@ -1,12 +1,18 @@ pattern ql_dsp_macc -state add_ab state add_ba state mux_ab +state mul_nusers +state add_nusers +state mux_nusers +state ff_d_nusers +state ff_q_nusers + match mul select mul->type.in($mul) select nusers(port(mul, \Y)) <= 3 + set mul_nusers nusers(port(mul, \Y)) endmatch match add @@ -14,8 +20,8 @@ match add choice AB {\A, \B} define BA (AB == \A ? \B : \A) index port(add, AB) === port(mul, \Y) - select nusers(port(add, \Y)) == 2 - set add_ab AB + select nusers(port(add, \Y)) <= 3 + set add_nusers nusers(port(add, \Y)) set add_ba BA endmatch @@ -25,7 +31,8 @@ match mux define BA (AB == \A ? \B : \A) index port(mux, AB) === port(mul, \Y) index port(mux, BA) === port(add, \Y) - select nusers(port(mux, \Y)) == 2 + select nusers(port(mux, \Y)) <= 3 + set mux_nusers nusers(port(mux, \Y)) set mux_ab AB optional endmatch @@ -34,6 +41,8 @@ match ff select ff->type.in($dff, $adff) index port(ff, \D) === (mux == nullptr ? port(add, \Y) : port(mux, \Y)) index port(ff, \Q) === port(add, add_ba) + set ff_d_nusers nusers(port(ff, \D)) + set ff_q_nusers nusers(port(ff, \Q)) endmatch code diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl index 650040942..b1e5f53f4 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -39,3 +39,20 @@ select -assert-count 1 t:dsp_t1_10x9x32 select -assert-count 1 t:\$lut select -assert-count 2 t:* +set TOP "macc_simple_preacc" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:* + +set TOP "macc_simple_preacc_clr" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:\$lut +select -assert-count 2 t:* + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v index 0d63d48bb..3a649b563 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v @@ -63,3 +63,37 @@ module macc_simple_arst_clr ( end endmodule + +module macc_simple_preacc ( + input wire clk, + input wire [ 7:0] A, + input wire [ 7:0] B, + output wire [15:0] Z +); + + reg [15:0] acc; + + assign Z = acc + (A * B); + + always @(posedge clk) + acc <= Z; + +endmodule + +module macc_simple_preacc_clr ( + input wire clk, + input wire clr, + input wire [ 7:0] A, + input wire [ 7:0] B, + output reg [15:0] Z +); + + reg [15:0] acc; + + assign Z = (clr) ? (A * B) : (acc + (A * B)); + + always @(posedge clk) + acc <= Z; + +endmodule + From da98999e574c0b5f0cc3577006fcccb4e0d3c9e6 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Feb 2022 13:19:35 +0100 Subject: [PATCH 637/845] Cleaned up ql-qlf plugin Makefile Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index aa620dbba..00a7c4b14 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -61,11 +61,6 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(PP3_DIR)/mult_sim.v \ $(PP3_DIR)/qlal3_sim.v \ -#retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py) - -#pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg) -#pre-build2:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-macc.h -p ql_dsp_macc ql-dsp-macc.pmg) - pmgen: mkdir -p pmgen From 3c2aa8a43686939edab4a868d8993764abe92760 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Feb 2022 13:46:50 +0100 Subject: [PATCH 638/845] Added suport for MACC that uses $dffe and $adffe with enable via load_acc_i Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-macc.cc | 22 ++++++++++++++----- ql-qlf-plugin/ql-dsp-macc.pmg | 2 +- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 10 ++++++++- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.v | 18 +++++++++++++-- 4 files changed, 43 insertions(+), 9 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index 571304f1b..c422d3107 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -139,14 +139,27 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) } cell->setPort(RTLIL::escape_id("z_o"), sig_z); - // Connect clock and reset + // Connect clock, reset and enable cell->setPort(RTLIL::escape_id("clock_i"), st.ff->getPort(ID(CLK))); - if (st.ff->type == RTLIL::escape_id("$adff")) { - cell->setPort(RTLIL::escape_id("reset_i"), st.ff->getPort(ID(ARST))); + + RTLIL::SigSpec rst; + RTLIL::SigSpec ena; + + if (st.ff->hasPort(ID(ARST))) { + rst = st.ff->getPort(ID(ARST)); + } else { + rst = RTLIL::SigSpec(RTLIL::S0); + } + + if (st.ff->hasPort(ID(EN))) { + ena = st.ff->getPort(ID(EN)); } else { - cell->setPort(RTLIL::escape_id("reset_i"), RTLIL::SigSpec(RTLIL::S0)); + ena = RTLIL::SigSpec(RTLIL::S1); } + cell->setPort(RTLIL::escape_id("reset_i"), rst); + cell->setPort(RTLIL::escape_id("load_acc_i"), ena); + // Insert feedback_i control logic used for clearing / loading the accumulator if (st.mux != nullptr) { RTLIL::SigSpec sig_s = st.mux->getPort(ID(S)); @@ -169,7 +182,6 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) } // Connect control ports - cell->setPort(RTLIL::escape_id("load_acc_i"), RTLIL::SigSpec(RTLIL::S1)); cell->setPort(RTLIL::escape_id("unsigned_a_i"), RTLIL::SigSpec(a_signed ? RTLIL::S0 : RTLIL::S1)); cell->setPort(RTLIL::escape_id("unsigned_b_i"), RTLIL::SigSpec(b_signed ? RTLIL::S0 : RTLIL::S1)); diff --git a/ql-qlf-plugin/ql-dsp-macc.pmg b/ql-qlf-plugin/ql-dsp-macc.pmg index 663414faa..4cfd15a24 100644 --- a/ql-qlf-plugin/ql-dsp-macc.pmg +++ b/ql-qlf-plugin/ql-dsp-macc.pmg @@ -38,7 +38,7 @@ match mux endmatch match ff - select ff->type.in($dff, $adff) + select ff->type.in($dff, $adff, $dffe, $adffe) index port(ff, \D) === (mux == nullptr ? port(add, \Y) : port(mux, \Y)) index port(ff, \Q) === port(add, add_ba) set ff_d_nusers nusers(port(ff, \D)) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl index b1e5f53f4..132b27faf 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -30,7 +30,15 @@ yosys cd $TOP select -assert-count 1 t:dsp_t1_10x9x32 select -assert-count 1 t:* -set TOP "macc_simple_arst_clr" +set TOP "macc_simple_ena" +design -load read +hierarchy -top $TOP +synth_quicklogic -family qlf_k6n10f -top $TOP +yosys cd $TOP +select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:* + +set TOP "macc_simple_arst_clr_ena" design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v index 3a649b563..084021075 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v @@ -46,10 +46,24 @@ module macc_simple_arst ( endmodule -module macc_simple_arst_clr ( +module macc_simple_ena ( + input wire clk, + input wire ena, + input wire [ 7:0] A, + input wire [ 7:0] B, + output reg [15:0] Z +); + + always @(posedge clk) + if (ena) Z <= Z + (A * B); + +endmodule + +module macc_simple_arst_clr_ena ( input wire clk, input wire rst, input wire clr, + input wire ena, input wire [ 7:0] A, input wire [ 7:0] B, output reg [15:0] Z @@ -57,7 +71,7 @@ module macc_simple_arst_clr ( always @(posedge clk or posedge rst) if (rst) Z <= 0; - else begin + else if (ena) begin if (clr) Z <= (A * B); else Z <= Z + (A * B); end From 4eef27ee49d002ca26f2d47e602e03402af94042 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 25 Feb 2022 14:10:37 +0100 Subject: [PATCH 639/845] Renamed the target DSP cells in the MACC inference test Signed-off-by: Maciej Kurc --- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl index 132b27faf..2de3bdc7f 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -10,7 +10,7 @@ design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 select -assert-count 1 t:* set TOP "macc_simple_clr" @@ -18,7 +18,7 @@ design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 select -assert-count 1 t:\$lut select -assert-count 2 t:* @@ -27,7 +27,7 @@ design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 select -assert-count 1 t:* set TOP "macc_simple_ena" @@ -35,7 +35,7 @@ design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 select -assert-count 1 t:* set TOP "macc_simple_arst_clr_ena" @@ -43,7 +43,7 @@ design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 select -assert-count 1 t:\$lut select -assert-count 2 t:* @@ -52,7 +52,7 @@ design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 select -assert-count 1 t:* set TOP "macc_simple_preacc_clr" @@ -60,7 +60,7 @@ design -load read hierarchy -top $TOP synth_quicklogic -family qlf_k6n10f -top $TOP yosys cd $TOP -select -assert-count 1 t:dsp_t1_10x9x32 +select -assert-count 1 t:QL_DSP2 select -assert-count 1 t:\$lut select -assert-count 2 t:* From 4828703626b8dd394920d664c943586d756b433b Mon Sep 17 00:00:00 2001 From: rakeshm Date: Sun, 27 Feb 2022 20:55:54 -0800 Subject: [PATCH 640/845] Rectified cells_sim.v file Signed-off-by: rakeshm --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index bdc484bf9..99cc7ba63 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -109,7 +109,7 @@ module frac_lut6( assign lut4_out[2] = s4[2]; assign lut4_out[3] = s4[3]; - assign lut5_out[0] = s0[0]; + assign lut5_out[0] = s5[0]; assign lut5_out[1] = s5[1]; assign lut6_out = li[5] ? s5[0] : s5[1]; @@ -228,7 +228,7 @@ module dffse( (* invertible_pin = "IS_C_INVERTED" *) input C, input S, - input E, + input E ); parameter [0:0] INIT = 1'b0; parameter [0:0] IS_C_INVERTED = 1'b0; @@ -749,7 +749,7 @@ endmodule module dsp_t1_10x9x32 ( input [ 9:0] a_i, input [ 8:0] b_i, - input [ 1:0] acc_fir_i, + input [ 3:0] acc_fir_i, output [18:0] z_o, output [ 8:0] dly_b_o, From 37a414bd5c12107a6e69d6c983f3c3116f5c4f43 Mon Sep 17 00:00:00 2001 From: rakeshm Date: Sun, 27 Feb 2022 21:16:49 -0800 Subject: [PATCH 641/845] Rectified cells_sim.v file Signed-off-by: rakeshm --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 99cc7ba63..43b3ba2e7 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -749,7 +749,7 @@ endmodule module dsp_t1_10x9x32 ( input [ 9:0] a_i, input [ 8:0] b_i, - input [ 3:0] acc_fir_i, + input [ 1:0] acc_fir_i, output [18:0] z_o, output [ 8:0] dly_b_o, From 3653a42ace23205e13f65da5d554950e2db152d2 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 24 Feb 2022 14:45:01 +0100 Subject: [PATCH 642/845] Fix default signed value for parameters Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 4e3cd7d37..fd6f3f0f1 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1086,15 +1086,28 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) // so we are treating here UInt in the same way as if they would be Int case vpiUIntVal: case vpiIntVal: { - auto size = vpi_get(vpiSize, obj_h); + int size = -1; + bool is_signed = false; + // Surelog sometimes report size as part of vpiTypespec (e.g. int_typespec) + // if it is the case, we need to set size to the left_range of first packed range + visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { + if (node && node->attributes.count(UhdmAst::packed_ranges()) && node->attributes[UhdmAst::packed_ranges()]->children.size() && + node->attributes[UhdmAst::packed_ranges()]->children[0]->children.size()) { + size = node->attributes[UhdmAst::packed_ranges()]->children[0]->children[0]->integer; + } + }); + if (size == -1) { + size = vpi_get(vpiSize, obj_h); + } // Surelog by default returns 64 bit numbers and stardard says that they shall be at least 32bits // yosys is assuming that int/uint is 32 bit, so we are setting here correct size // NOTE: it *shouldn't* break on explicite 64 bit const values, as they *should* be handled // above by vpi*StrVal if (size == 64) { size = 32; + is_signed = true; } - auto c = AST::AstNode::mkconst_int(val.value.integer, true, size > 0 ? size : 32); + auto c = AST::AstNode::mkconst_int(val.value.integer, is_signed, size > 0 ? size : 32); if (size == 0 || size == -1) c->is_unsized = true; return c; @@ -1204,6 +1217,12 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) child->attributes[UhdmAst::unpacked_ranges()] = (*it)->attributes[UhdmAst::unpacked_ranges()]->clone(); } } + // Surelog doesn't report correct sign value for param_assign nodes + // and only default vpiParameter node have correct sign value, so + // if we are overriding parameter, copy sign value from current node to the new node + if (((*it)->type == AST::AST_PARAMETER || (*it)->type == AST::AST_LOCALPARAM) && child->children.size() && (*it)->children.size()) { + child->children[0]->is_signed = (*it)->children[0]->is_signed; + } delete *it; *it = child; return; From c8627fc09df1b2950f3c868a7f16af1968de63ac Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 1 Mar 2022 10:03:32 +0100 Subject: [PATCH 643/845] Fix size of value from vpiTypespec Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index fd6f3f0f1..1d88f218f 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1093,7 +1093,7 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { if (node && node->attributes.count(UhdmAst::packed_ranges()) && node->attributes[UhdmAst::packed_ranges()]->children.size() && node->attributes[UhdmAst::packed_ranges()]->children[0]->children.size()) { - size = node->attributes[UhdmAst::packed_ranges()]->children[0]->children[0]->integer; + size = node->attributes[UhdmAst::packed_ranges()]->children[0]->children[0]->integer + 1; } }); if (size == -1) { From df9a4bc017d64668d91c73c519e34afc8a556380 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 1 Mar 2022 10:56:25 +0100 Subject: [PATCH 644/845] Add support for vpiMinTypMaxOp Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 1d88f218f..434a97b5b 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -2589,6 +2589,14 @@ void UhdmAst::process_operation() current_node = nullptr; break; } + case vpiMinTypMaxOp: { + // ignore min and max and set only typ + log_assert(current_node->children.size() == 3); + auto tmp = current_node->children[1]->clone(); + delete current_node; + current_node = tmp; + break; + } default: { delete current_node; current_node = nullptr; From 197a4f8fcd6c87e57fd6707d9290ff9fd81f96f6 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 1 Mar 2022 12:33:10 +0100 Subject: [PATCH 645/845] Re-modelled k6n10f DSP FIR coeff inputs as parameters instead of ports, updated techmaps. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 35 +++++++++++--------- ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 42 ++++++++++++++---------- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 12 ++----- 3 files changed, 47 insertions(+), 42 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 43b3ba2e7..296fc81e4 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -706,13 +706,14 @@ module QL_DSP2 ( // TODO: Name subject to change input [5:0] shift_right, input round, input subtract, - input register_inputs, - input [19:0] coeff_0, - input [19:0] coeff_1, - input [19:0] coeff_2, - input [19:0] coeff_3 + input register_inputs ); + parameter [19:0] COEFF_0 = 20'd0; + parameter [19:0] COEFF_1 = 20'd0; + parameter [19:0] COEFF_2 = 20'd0; + parameter [19:0] COEFF_3 = 20'd0; + endmodule (* blackbox *) // TODO: add sim model @@ -737,12 +738,14 @@ module dsp_t1_20x18x64 ( input [5:0] shift_right_i, input round_i, input subtract_i, - input register_inputs_i, - input [19:0] coeff_0_i, - input [19:0] coeff_1_i, - input [19:0] coeff_2_i, - input [19:0] coeff_3_i + input register_inputs_i ); + + parameter [19:0] COEFF_0 = 20'd0; + parameter [19:0] COEFF_1 = 20'd0; + parameter [19:0] COEFF_2 = 20'd0; + parameter [19:0] COEFF_3 = 20'd0; + endmodule (* blackbox *) // TODO: add sim model @@ -767,10 +770,12 @@ module dsp_t1_10x9x32 ( input [5:0] shift_right_i, input round_i, input subtract_i, - input register_inputs_i, - input [ 9:0] coeff_0_i, - input [ 9:0] coeff_1_i, - input [ 9:0] coeff_2_i, - input [ 9:0] coeff_3_i + input register_inputs_i ); + + parameter [9:0] COEFF_0 = 10'd0; + parameter [9:0] COEFF_1 = 10'd0; + parameter [9:0] COEFF_2 = 10'd0; + parameter [9:0] COEFF_3 = 10'd0; + endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index 5fe905cf8..b8423e5f5 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -26,14 +26,20 @@ module dsp_t1_20x18x64 ( input [5:0] shift_right_i, input round_i, input subtract_i, - input register_inputs_i, - input [19:0] coeff_0_i, - input [19:0] coeff_1_i, - input [19:0] coeff_2_i, - input [19:0] coeff_3_i + input register_inputs_i ); - QL_DSP2 _TECHMAP_REPLACE_ ( + parameter [19:0] COEFF_0 = 20'd0; + parameter [19:0] COEFF_1 = 20'd0; + parameter [19:0] COEFF_2 = 20'd0; + parameter [19:0] COEFF_3 = 20'd0; + + QL_DSP2 # ( + .COEFF_0 (COEFF_0), + .COEFF_1 (COEFF_1), + .COEFF_2 (COEFF_2), + .COEFF_3 (COEFF_3) + ) _TECHMAP_REPLACE_ ( .a (a_i), .b (b_i), .acc_fir (acc_fir_i), @@ -54,11 +60,7 @@ module dsp_t1_20x18x64 ( .shift_right (shift_right_i), .round (round_i), .subtract (subtract_i), - .register_inputs (register_inputs_i), - .coeff_0 (coeff_0_i), - .coeff_1 (coeff_1_i), - .coeff_2 (coeff_2_i), - .coeff_3 (coeff_3_i) + .register_inputs (register_inputs_i) ); endmodule @@ -91,10 +93,20 @@ module dsp_t1_10x9x32 ( input [ 9:0] coeff_3_i ); + parameter [9:0] COEFF_0 = 10'd0; + parameter [9:0] COEFF_1 = 10'd0; + parameter [9:0] COEFF_2 = 10'd0; + parameter [9:0] COEFF_3 = 10'd0; + wire [37:0] z; wire [17:0] dly_b; - QL_DSP2 _TECHMAP_REPLACE_ ( + QL_DSP2 # ( + .COEFF_0 ({10'd0, COEFF_0}), + .COEFF_1 ({10'd0, COEFF_1}), + .COEFF_2 ({10'd0, COEFF_2}), + .COEFF_3 ({10'd0, COEFF_3}) + ) _TECHMAP_REPLACE_ ( .a ({10'd0, a_i}), .b ({ 9'd0, b_i}), .acc_fir (acc_fir_i), @@ -115,11 +127,7 @@ module dsp_t1_10x9x32 ( .shift_right (shift_right_i), .round (round_i), .subtract (subtract_i), - .register_inputs (register_inputs_i), - .coeff_0 ({10'd0, coeff_0_i}), - .coeff_1 ({10'd0, coeff_1_i}), - .coeff_2 ({10'd0, coeff_2_i}), - .coeff_3 ({10'd0, coeff_3_i}) + .register_inputs (register_inputs_i) ); assign z_o = z[18:0]; diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index 054d82a4d..e10df2a7e 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -41,11 +41,7 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); .shift_right_i (6'd0), .round_i (1'b0), .subtract_i (1'b0), - .register_inputs_i (1'b0), - .coeff_0_i (20'd0), - .coeff_1_i (20'd0), - .coeff_2_i (20'd0), - .coeff_3_i (20'd0) + .register_inputs_i (1'b0) ); assign Y = z; @@ -87,11 +83,7 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); .shift_right_i (6'd0), .round_i (1'b0), .subtract_i (1'b0), - .register_inputs_i (1'b0), - .coeff_0_i (10'd0), - .coeff_1_i (10'd0), - .coeff_2_i (10'd0), - .coeff_3_i (10'd0) + .register_inputs_i (1'b0) ); assign Y = z; From 86edeb543dcb4ecb09f149bbf0fe8ac89b9556c6 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 1 Mar 2022 12:33:40 +0100 Subject: [PATCH 646/845] Updated the k6n10f SIMD DSP inference pass to take into account FIR coeff parameters as well. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-simd.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index 1bd0850b8..f84c45881 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -76,6 +76,9 @@ struct QlDspSimdPass : public Pass { std::make_pair("z_o", "z"), std::make_pair("dly_b_o", "dly_b"), }; + // DSP parameters + const std::vector m_DspParams = {"COEFF_0", "COEFF_1", "COEFF_2", "COEFF_3"}; + // Source DSP cell type (SISD) const RTLIL::IdString m_SisdDspType = RTLIL::escape_id("dsp_t1_10x9x32"); // Target DSP cell type for the SIMD mode @@ -193,6 +196,17 @@ struct QlDspSimdPass : public Pass { simd->setPort(dport, sigspec); } + // Set parameters + for (const auto &it : m_DspParams) { + auto val_a = dsp_a->getParam(RTLIL::escape_id(it)); + auto val_b = dsp_b->getParam(RTLIL::escape_id(it)); + + std::vector bits; + bits.insert(bits.end(), val_a.begin(), val_a.end()); + bits.insert(bits.end(), val_b.begin(), val_b.end()); + simd->setParam(RTLIL::escape_id(it), RTLIL::Const(bits)); + } + // Enable the fractured mode by connecting the control // port. simd->setPort(RTLIL::escape_id("f_mode"), RTLIL::S1); From 5e41cfaa4fddb9d20b440408a2be08886799a58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Tue, 1 Mar 2022 12:43:14 +0100 Subject: [PATCH 647/845] Convert AST_DOT with AST_RANGE to AST_PREFIX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 4e3cd7d37..ce84d45e1 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -841,30 +841,43 @@ static void simplify_format_string(AST::AstNode *current_node) static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) { + if (current_node->type == static_cast(AST::AST_DOT)) + current_node->type = AST::AST_IDENTIFIER; + + auto dot_it = + std::find_if(current_node->children.begin(), current_node->children.end(), [](auto c) { return c->type == static_cast(AST::AST_DOT); }); + AST::AstNode *dot = (dot_it != current_node->children.end()) ? *dot_it : nullptr; + AST::AstNode *expanded = nullptr; - AST::AstNode *dot = nullptr; - for (auto c : current_node->children) { - if (c->type == static_cast(AST::AST_DOT) && expanded == nullptr) { - dot = c; - break; - } - } if (dot) { if (!AST_INTERNAL::current_scope.count(current_node->str)) { // for accessing elements currently unsupported with AST_DOT // fallback to "." notation + AST::AstNode *prefix_node = nullptr; + AST::AstNode *parent_node = current_node; while (dot && !dot->str.empty()) { - current_node->str += "." + dot->str.substr(1); - if (!dot->children.empty()) { - dot = dot->children[0]; + // it is not possible for AST_RANGE to be after AST::DOT (see process_hier_path function) + if (parent_node->children[0]->type == AST::AST_RANGE) { + if (parent_node->children[1]->type == AST::AST_RANGE) + log_error("Multirange in AST_DOT is currently unsupported\n"); + + simplify(dot, nullptr); + AST::AstNode *range_const = parent_node->children[0]->children[0]; + prefix_node = new AST::AstNode(AST::AST_PREFIX, range_const->clone(), dot->clone()); + break; } else { - dot = nullptr; + current_node->str += "." + dot->str.substr(1); + dot_it = + std::find_if(dot->children.begin(), dot->children.end(), [](auto c) { return c->type == static_cast(AST::AST_DOT); }); + parent_node = dot; + dot = (dot_it != dot->children.end()) ? *dot_it : nullptr; } } - for (auto cc : current_node->children) { - delete cc; + current_node->delete_children(); + if (prefix_node != nullptr) { + current_node->type = AST::AST_PREFIX; + current_node->children = prefix_node->children; } - current_node->children.clear(); } else { auto wire_node = AST_INTERNAL::current_scope[current_node->str]; // make sure wire_node is already simplified From d828086140396c84a1625b70a6c0986b6338d7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Tue, 1 Mar 2022 12:58:14 +0100 Subject: [PATCH 648/845] Change AST_DOT to AST_IDENTIFIER before calling the simplify on it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ce84d45e1..5c4aabf0b 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -841,9 +841,6 @@ static void simplify_format_string(AST::AstNode *current_node) static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) { - if (current_node->type == static_cast(AST::AST_DOT)) - current_node->type = AST::AST_IDENTIFIER; - auto dot_it = std::find_if(current_node->children.begin(), current_node->children.end(), [](auto c) { return c->type == static_cast(AST::AST_DOT); }); AST::AstNode *dot = (dot_it != current_node->children.end()) ? *dot_it : nullptr; @@ -861,6 +858,7 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) if (parent_node->children[1]->type == AST::AST_RANGE) log_error("Multirange in AST_DOT is currently unsupported\n"); + dot->type = AST::AST_IDENTIFIER; simplify(dot, nullptr); AST::AstNode *range_const = parent_node->children[0]->children[0]; prefix_node = new AST::AstNode(AST::AST_PREFIX, range_const->clone(), dot->clone()); From 71c4000f014f823e698862c19a0e28851cf98f78 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 1 Mar 2022 13:25:10 +0100 Subject: [PATCH 649/845] Remove move_type_to_new_typedef from process_*_typespec Signed-off-by: Kamil Rakoczy --- uhdm-plugin/UhdmAst.cc | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index 1d88f218f..46aa485e1 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -3301,13 +3301,6 @@ void UhdmAst::process_logic_typespec() } visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); - if (!current_node->str.empty()) { - auto top_module = find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_DESIGN}); - if (!top_module) { - log_error("Couldn't find top module for typedef: %s\n", current_node->str.c_str()); - } - move_type_to_new_typedef(top_module, current_node->clone()); - } } void UhdmAst::process_int_typespec() @@ -3321,13 +3314,6 @@ void UhdmAst::process_int_typespec() packed_ranges.push_back(range); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); current_node->is_signed = true; - if (!current_node->str.empty()) { - auto top_module = find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_DESIGN}); - if (!top_module) { - log_error("Couldn't find top module for typedef: %s\n", current_node->str.c_str()); - } - move_type_to_new_typedef(top_module, current_node); - } } void UhdmAst::process_string_var() @@ -3380,13 +3366,6 @@ void UhdmAst::process_bit_typespec() current_node->children.push_back(node); } }); - if (!current_node->str.empty()) { - auto top_module = find_ancestor({AST::AST_MODULE, AST::AST_PACKAGE, AST::AST_DESIGN}); - if (!top_module) { - log_error("Couldn't find top module for typedef: %s\n", current_node->str.c_str()); - } - move_type_to_new_typedef(top_module, current_node); - } } void UhdmAst::process_repeat() From cb5d661136e8db1c875ad1fffde16830e266151a Mon Sep 17 00:00:00 2001 From: George Hilliard Date: Tue, 1 Mar 2022 22:58:35 -0600 Subject: [PATCH 650/845] Emit error when encountering assert/assume properties Yosys doesn't have good handling of properties yet (see YosysHQ/yosys#3223). In the meantime, SymbiYosys with the UHDM plugin will happily prove this model "correct": module wrong(input clk); logic data; always_comb data <= 0; assert property( @(posedge clk) data ); endmodule The `assert property` is silently dropped from the UHDM parse tree when it's converted to AST nodes, and the user's design has a bug but passes formal. (Changing it to a clocked immediate assertion allows the solver to find a counterexample.) At least, emit an error for this case. Real support for SVA assertions can be added. Signed-off-by: George Hilliard --- uhdm-plugin/UhdmAst.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index a08f513bf..ba4d8bcfc 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1490,7 +1490,7 @@ void UhdmAst::process_module() } }); visit_one_to_many({vpiModule, vpiInterface, vpiTaskFunc, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray, - vpiContAssign, vpiProcess, vpiClockingBlock}, + vpiContAssign, vpiProcess, vpiClockingBlock, vpiAssertion}, obj_h, [&](AST::AstNode *node) { if (node) { if (node->type == AST::AST_ASSIGN && node->children.size() < 2) @@ -3897,6 +3897,10 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) if (!shared.no_assert) process_immediate_assert(); break; + case vpiAssert: + if (!shared.no_assert) + process_unsupported_stmt(object); + break; case vpiHierPath: process_hier_path(); break; @@ -3935,6 +3939,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiImmediateAssume: process_immediate_assume(); break; + case vpiAssume: + process_unsupported_stmt(object); + break; case vpiWhile: process_while(); break; From b7ce5461f0b1141f213cb6246b922e7324895774 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 14 Feb 2022 16:03:42 +0100 Subject: [PATCH 651/845] Added support for simulation tests (with Icarus Verilog) to the common test makefile Signed-off-by: Maciej Kurc --- Makefile_test.common | 30 ++++++++++++++++++++++++++++-- environment.yml | 1 + 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Makefile_test.common b/Makefile_test.common index 16e016e9e..84af52098 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -62,6 +62,7 @@ $(1)/ok: $(1)/$$(notdir $(1).v) fi \ else \ if [ $$$$RETVAL -ne 0 ]; then \ + echo "Unexpected runtime error"; \ printf "Test %-20s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ false; \ fi \ @@ -69,6 +70,29 @@ $(1)/ok: $(1)/$$(notdir $(1).v) endef +define test_sim_tpl = +$(1): $(1)/ok + @printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); + +$(1)/$$(notdir $(1).vvp): $(1)/$$(notdir $(1).v) + @iverilog -vvvv -g2005 -o $$@ $$< -I../ -DVCD_FILE=\"$(1)/$$(notdir $(1).vcd)\" >$(1)/$$(notdir $(1).vvp.log) 2>&1; \ + if [ $$$$? -ne 0 ]; then \ + printf "Test %-18s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ + false; \ + fi + +$(1)/ok: $(1)/$$(notdir $(1).vvp) $(1)/$$(notdir $(1).v) + @vvp -vvvv $$< >$(1)/$$(notdir $(1).log) 2>&1; \ + if [ $$$$? -ne 0 ]; then \ + printf "Test %-18s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ + false; \ + else \ + touch $$@; \ + true; \ + fi + +endef + define unit_test_tpl = $(1): $(1)/$(1).test @$$< @@ -83,7 +107,7 @@ endef diff_test = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) -all: $(TESTS) $(UNIT_TESTS) +all: $(TESTS) $(SIM_TESTS) $(UNIT_TESTS) $(GTEST_DIR)/build/lib/libgtest.a $(GTEST_DIR)/build/lib/libgtest_main.a: @mkdir -p $(GTEST_DIR)/build @@ -91,12 +115,14 @@ $(GTEST_DIR)/build/lib/libgtest.a $(GTEST_DIR)/build/lib/libgtest_main.a: cmake ..; \ make -.PHONY: all clean $(TESTS) $(UNIT_TESTS) +.PHONY: all clean $(TESTS) $(SIM_TESTS) $(UNIT_TESTS) $(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) +$(foreach test,$(SIM_TESTS),$(eval $(call test_sim_tpl,$(test)))) $(foreach test,$(UNIT_TESTS),$(eval $(call unit_test_tpl,$(test)))) clean: @rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test)_[0-9].sdc $(test)/$(test).txt $(test)/$(test).eblif $(test)/$(test).json) + @rm -rf $(foreach test,$(SIM_TESTS),$(test)/*.vvp $(test)/*.vcd) @rm -rf $(foreach test,$(UNIT_TESTS),$(test)/$(test).test.o $(test)/$(test).test.d $(test)/$(test).test) @find . -name "ok" -or -name "*.log" | xargs rm -rf diff --git a/environment.yml b/environment.yml index cc60e2b9c..d6f473d86 100644 --- a/environment.yml +++ b/environment.yml @@ -13,3 +13,4 @@ channels: dependencies: - litex-hub::yosys - litex-hub::surelog + - litex-hub::iverilog From 1b8c6b94b5e4c2467035fe49689ed723d5c9d14d Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 14 Feb 2022 17:18:53 +0100 Subject: [PATCH 652/845] Initial behavioral simulation model for dsp_t1 Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 188 +++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 296fc81e4..0e7bf6f7d 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -716,6 +716,194 @@ module QL_DSP2 ( // TODO: Name subject to change endmodule +module dsp_t1_sim # ( + parameter NBITS_ACC = 64, + parameter NBITS_A = 20, + parameter NBITS_B = 18, + parameter NBITS_Z = 38, + + parameter [0:0] SATURATE_ENABLE = 0, + parameter [2:0] OUTPUT_SELECT = 0, + parameter [0:0] ROUND = 0, + //parameter [0:0] LOAD_ACC = 0, + parameter [0:0] SUBTRACT = 0, + parameter [0:0] REGISTER_INPUTS = 0 + //parameter [0:0] REGISTER_OUTPUTS = 0 +)( + input [NBITS_A-1:0] a_i, + input [NBITS_B-1:0] b_i, + output [NBITS_Z-1:0] z_o, + output [NBITS_B-1:0] dly_b_o, + + input unsigned_a_i, + input unsigned_b_i, + + input clock_i, + input reset_n_i, + + input load_acc_i, + input [1:0] feedback_i, + input [5:0] shift_right_i +); + + if (NBITS_ACC < NBITS_A + NBITS_B) + $error("NBITS_ACC must be > NBITS_A + NBITS_B"); + + // Input registers + reg [NBITS_A-1:0] r_a; + reg [NBITS_B-1:0] r_b; + reg r_unsigned_a; + reg r_unsigned_b; + reg r_load_acc; + reg [1:0] r_feedback; + reg [5:0] r_shift_d1; + reg [5:0] r_shift_d2; + + always @(posedge clock_i or negedge reset_n_i) begin + if (~reset_n_i) begin + + r_a <= 'h0; + r_b <= 'h0; + + r_unsigned_a <= 0; + r_unsigned_b <= 0; + r_feedback <= 0; + r_shift_d1 <= 0; + r_shift_d2 <= 0; +// r_subtract <= 0; + r_load_acc <= 0; + + end else begin + + r_a <= a_i; + r_b <= b_i; + + r_unsigned_a <= unsigned_a_i; + r_unsigned_b <= unsigned_b_i; + r_feedback <= feedback_i; + r_shift_d1 <= shift_right_i; + r_shift_d2 <= r_shift_d1; +// r_subtract <= subtract_i; + r_load_acc <= load_acc_i; + + end + end + + // Registered / non-registered input path select + wire [NBITS_A-1:0] a = REGISTER_INPUTS ? r_a : a_i; + wire [NBITS_B-1:0] b = REGISTER_INPUTS ? r_b : b_i; + + wire unsigned_a = REGISTER_INPUTS ? r_unsigned_a : unsigned_a_i; + wire unsigned_b = REGISTER_INPUTS ? r_unsigned_b : unsigned_b_i; + wire [1:0] feedback = REGISTER_INPUTS ? r_feedback : feedback_i; + wire load_acc = REGISTER_INPUTS ? r_load_acc : load_acc_i; + //wire subtract = REGISTER_INPUTS ? r_subtract : subtract_i; + + // Shift right control + localparam SHIFT_SEL = {REGISTER_INPUTS, OUTPUT_SELECT[1]}; + wire [5:0] shift_right = (SHIFT_SEL == 2'b00) ? shift_right_i : + (SHIFT_SEL == 2'b01) ? r_shift_d1 : + (SHIFT_SEL == 2'b10) ? r_shift_d1 : + /*(SHIFT_SEL == 2'b11) ?*/ r_shift_d2; + + // Multiplier + wire [NBITS_A-1:0] mult_a = (feedback == 2'h3) ? acc[NBITS_A-1:0] : a; + wire [NBITS_B-1:0] mult_b = (feedback == 2'h2) ? {NBITS_B{1'b0}} : b; + + wire [NBITS_A-1:0] mult_sgn_a = mult_a[NBITS_A-1]; + wire [NBITS_A-1:0] mult_mag_a = (mult_sgn_a) ? (~mult_a + 1) : mult_a; + wire [NBITS_B-1:0] mult_sgn_b = mult_b[NBITS_B-1]; + wire [NBITS_B-1:0] mult_mag_b = (mult_sgn_b) ? (~mult_b + 1) : mult_b; + + wire [NBITS_A+NBITS_B-1:0] mult_mag = mult_mag_a * mult_mag_b; + wire mult_sgn = mult_sgn_a ^ mult_sgn_b; + + wire [NBITS_A+NBITS_B-1:0] mult = (unsigned_a && unsigned_b) ? + (mult_a * mult_b) : (mult_sgn ? (~mult_mag + 1) : mult_mag); + + // Sign extension + wire [NBITS_ACC-1:0] mult_xtnd = (unsigned_a && unsigned_b) ? + {{(NBITS_ACC-NBITS_A-NBITS_B){1'b0}}, mult[NBITS_A+NBITS_B-1:0]} : + {{(NBITS_ACC-NBITS_A-NBITS_B){mult[NBITS_A+NBITS_B-1]}}, mult[NBITS_A+NBITS_B-1:0]}; + + wire [NBITS_ACC-1:0] a_xtnd = (unsigned_a) ? + {{(NBITS_ACC-NBITS_A){1'b0}}, a[NBITS_A-1:0]} : + {{(NBITS_ACC-NBITS_A){a[NBITS_A-1]}}, a[NBITS_A-1:0]}; + + // Adder + wire [NBITS_ACC-1:0] add_a = (SUBTRACT) ? (~mult_xtnd + 1) : mult_xtnd; + wire [NBITS_ACC-1:0] add_b = (feedback == 2'h0) ? acc : + (feedback == 2'h1) ? {{NBITS_ACC}{1'b0}} : + a_xtnd; + + wire [NBITS_ACC-1:0] add_o = add_a + add_b; + + // Accumulator + reg [NBITS_ACC-1:0] acc; + always @(posedge clock_i or negedge reset_n_i) + if (~reset_n_i) acc <= 'h0; + else begin + if (load_acc) + acc <= add_o; + else + acc <= acc; + end + + // Adder/accumulator output selection + wire [NBITS_ACC-1:0] acc_out = (OUTPUT_SELECT[1]) ? add_o : acc; + + // Round, shift, saturate + wire [NBITS_ACC-1:0] acc_rnd = (ROUND && (shift_right != 0)) ? (acc_out + ({{(NBITS_ACC-1){1'b0}}, 1'b1} << (shift_right - 1))) : + acc_out; + + wire [NBITS_ACC-1:0] acc_shr = (unsigned_a && unsigned_b) ? (acc_rnd >> shift_right) : + (acc_rnd >>> shift_right); + + wire [NBITS_ACC-1:0] acc_sat_u = (acc_shr[NBITS_ACC-1:NBITS_Z] != 0) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{NBITS_Z{1'b1}}} : + {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}}; + + wire [NBITS_ACC-1:0] acc_sat_s = ((|acc_shr[NBITS_ACC-1:NBITS_Z-1] == 1'b0) || + (&acc_shr[NBITS_ACC-1:NBITS_Z-1] == 1'b1)) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}} : + {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_ACC-1],{NBITS_Z-1{~acc_shr[NBITS_ACC-1]}}}}; + + wire [NBITS_ACC-1:0] acc_sat = (SATURATE_ENABLE) ? ((unsigned_a && unsigned_b) ? acc_sat_u : acc_sat_s) : acc_shr; + + // Output signals + wire [NBITS_Z-1:0] z0; + reg [NBITS_Z-1:0] z1; + wire [NBITS_Z-1:0] z2; + + assign z0 = mult_xtnd[NBITS_Z-1:0]; + assign z2 = acc_sat[NBITS_Z-1:0]; + + always @(posedge clock_i or negedge reset_n_i) + if (!reset_n_i) + z1 <= 0; + else begin + z1 <= (OUTPUT_SELECT == 3'b100) ? z0 : z2; + end + + // Output mux + assign z_o = (OUTPUT_SELECT == 3'h0) ? z0 : + (OUTPUT_SELECT == 3'h1) ? z2 : + (OUTPUT_SELECT == 3'h2) ? z2 : + (OUTPUT_SELECT == 3'h3) ? z2 : + (OUTPUT_SELECT == 3'h4) ? z1 : + (OUTPUT_SELECT == 3'h5) ? z1 : + (OUTPUT_SELECT == 3'h6) ? z1 : + /*(OUTPUT_SELECT == 3'h7) ?*/ z1; + + // B input delayed passthrough + reg [NBITS_B-1:0] dly_b_o; + + always @(posedge clock_i or negedge reset_n_i) + if (!reset_n_i) + dly_b_o <= 0; + else + dly_b_o <= b_i; + +endmodule + (* blackbox *) // TODO: add sim model module dsp_t1_20x18x64 ( input [19:0] a_i, From f655863b9159ce55a40a2729edde21983afa325b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 15 Feb 2022 11:39:34 +0100 Subject: [PATCH 653/845] Added simulation tests for qlf_k6n10f DSP model Signed-off-by: Maciej Kurc --- ql-qlf-plugin/tests/Makefile | 5 + .../qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v | 140 ++++++++++++++++++ .../qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v | 70 +++++++++ .../sim_dsp_mult_r/sim_dsp_mult_r.v | 74 +++++++++ 4 files changed, 289 insertions(+) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 1cc48ca45..77938e39a 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -26,6 +26,11 @@ TESTS = consts \ qlf_k6n10f/dsp_macc # qlf_k6n10_bram \ +SIM_TESTS = \ + qlf_k6n10f/sim_dsp_mult \ + qlf_k6n10f/sim_dsp_mult_r \ + qlf_k6n10f/sim_dsp_fir + include $(shell pwd)/../../Makefile_test.common consts_verify = true diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v new file mode 100644 index 000000000..904637f90 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v @@ -0,0 +1,140 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +`include "qlf_k6n10f/cells_sim.v" + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #0.5 clk <= ~clk; + + // Reset + reg rst; + initial begin + rst <= 1'b0; + #2 rst <= 1'b1; + #2 rst <= 1'b0; + end + + // Filter control + reg [2:0] fcnt; + reg [3:0] dcnt; + + initial begin + fcnt <= 0; + dcnt <= 0; + end + + // MAC cycle counter + always @(posedge clk) + if (rst) fcnt <= 0; + else begin + if (fcnt == 4) + fcnt <= 0; + else + fcnt <= fcnt + 1; + end + + wire stb = (fcnt == 4); + + // Data address counter + always @(posedge clk) + if (rst) dcnt <= 0; + else if (stb) dcnt <= dcnt + 1; + + // Filter coeffs (S0.19) + reg signed [19:0] coeff; + always @(*) case (fcnt) + 2'd0: coeff <= 20'h0000B; + 2'd1: coeff <= 20'h0000E; + 2'd2: coeff <= 20'h0000E; + 2'd3: coeff <= 20'h0000F; + + default: coeff <= 20'h00000; + endcase + + // Input data (S0.17) + reg signed [17:0] data; + always @(*) case (dcnt) + 'd0: data <= 18'h00400; + 'd1: data <= 18'h00000; + 'd2: data <= 18'h00000; + 'd3: data <= 18'h00000; + 'd4: data <= 18'h00000; + 'd5: data <= 18'h00000; + 'd6: data <= 18'h00000; + 'd7: data <= 18'h00000; + 'd8: data <= 18'h00800; + default data <= 18'h00000; + endcase + + // UUT + wire signed [19:0] A = coeff; + wire signed [17:0] B = data; + wire signed [37:0] Z; + + dsp_t1_sim # ( + .REGISTER_INPUTS (1'b0), + .OUTPUT_SELECT (3'h1), + .ROUND (1'b1), + .SATURATE_ENABLE (1'b1) + ) uut ( + .clock_i (clk), + .reset_n_i (~rst), + .a_i ((!stb) ? A : 'h0), + .b_i ((!stb) ? B : 'h0), + .unsigned_a_i (1'b0), + .unsigned_b_i (1'b0), + .feedback_i (stb), + .load_acc_i (1'b1), + .shift_right_i (6'd10), + .z_o (Z) + ); + + // Output counter + integer ocnt; + initial ocnt <= 0; + + always @(posedge clk) + if (stb) ocnt <= ocnt + 1; + + // Expected output data + reg signed [31:0] odata; + always @(*) case (ocnt) + 'd0: odata <= 32'h000036; + 'd1: odata <= 32'h000000; + 'd2: odata <= 32'h000000; + 'd3: odata <= 32'h000000; + 'd4: odata <= 32'h000000; + 'd5: odata <= 32'h000000; + 'd6: odata <= 32'h000000; + 'd7: odata <= 32'h000000; + 'd8: odata <= 32'h00006C; + default: odata <= 32'h000000; + endcase + + // Error detection + wire error = stb && (odata != Z[31:0]); + + // Error counting + integer error_count; + initial error_count <= 0; + always @(posedge clk) begin + if (error) error_count <= error_count + 1; + end + + // Simulation control / data dump + initial begin + $dumpfile(`VCD_FILE); + $dumpvars(0, tb); + #150 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v new file mode 100644 index 000000000..ea85ee9b7 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v @@ -0,0 +1,70 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +`include "qlf_k6n10f/cells_sim.v" + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #0.5 clk <= ~clk; + + // Reset + reg rst; + initial begin + rst <= 1'b0; + #1 rst <= 1'b1; + #2 rst <= 1'b0; + end + + // Input data / reference + reg signed [19:0] A; + reg signed [17:0] B; + reg signed [37:0] C; + + always @(posedge clk) begin + A = $random; + B = $random; + + C <= A * B; + end + + // UUT + wire signed [37:0] Z; + + dsp_t1_sim # ( + .REGISTER_INPUTS (1'b0), + .OUTPUT_SELECT (3'h0) + ) uut ( + .a_i (A), + .b_i (B), + .unsigned_a_i (1'b0), + .unsigned_b_i (1'b0), + .feedback_i (0), + .z_o (Z) + ); + + // Error detection + wire error = (Z != C); + + // Error counting + integer error_count; + initial error_count <= 0; + always @(posedge clk) begin + if (error) error_count <= error_count + 1; + end + + // Simulation control / data dump + initial begin + $dumpfile(`VCD_FILE); + $dumpvars(0, tb); + #100 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v new file mode 100644 index 000000000..5f2fd501c --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v @@ -0,0 +1,74 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +`include "qlf_k6n10f/cells_sim.v" + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #0.5 clk <= ~clk; + + // Reset + reg rst; + initial begin + rst <= 1'b0; + #1 rst <= 1'b1; + #2 rst <= 1'b0; + end + + // Input data / reference + reg signed [19:0] A; + reg signed [17:0] B; + reg signed [37:0] C; + + always @(posedge clk) begin + A = $random; + B = $random; + + C <= A * B; + end + + // UUT + wire signed [37:0] Z; + + dsp_t1_sim # ( + .REGISTER_INPUTS (1'b1), + .OUTPUT_SELECT (3'h0) + ) uut ( + .a_i (A), + .b_i (B), + .unsigned_a_i (1'b0), + .unsigned_b_i (1'b0), + .feedback_i (0), + .z_o (Z) + ); + + // Error detection + reg [37:0] r_C; + always @(posedge clk) + r_C <= C; + + wire error = (Z != r_C); + + // Error counting + integer error_count; + initial error_count <= 0; + always @(posedge clk) begin + if (error) error_count <= error_count + 1; + end + + // Simulation control / data dump + initial begin + $dumpfile(`VCD_FILE); + $dumpvars(0, tb); + #100 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule From 9943846801fb738ee6934bcfa4bc0a14b4152d71 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 15 Feb 2022 12:32:59 +0100 Subject: [PATCH 654/845] Added a workaround for Icarus Verilog used in CI Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 0e7bf6f7d..182b2afd1 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -746,8 +746,12 @@ module dsp_t1_sim # ( input [5:0] shift_right_i ); +// FIXME: The version of Icarus Verilog from Conda seems not to recognize the +// $error macro. Disable this sanity check for now because of that. +`ifndef __ICARUS__ if (NBITS_ACC < NBITS_A + NBITS_B) $error("NBITS_ACC must be > NBITS_A + NBITS_B"); +`endif // Input registers reg [NBITS_A-1:0] r_a; From a634bf7a643b3ff86d6579198fe514fef3e818da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 24 Feb 2022 14:24:18 +0100 Subject: [PATCH 655/845] ql-qlf: qlf_k6n10f: dsp: update core simulation model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 155 ++++++++++++++++----------- 1 file changed, 92 insertions(+), 63 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 182b2afd1..1ee33ca52 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -717,33 +717,38 @@ module QL_DSP2 ( // TODO: Name subject to change endmodule module dsp_t1_sim # ( - parameter NBITS_ACC = 64, - parameter NBITS_A = 20, - parameter NBITS_B = 18, - parameter NBITS_Z = 38, - - parameter [0:0] SATURATE_ENABLE = 0, - parameter [2:0] OUTPUT_SELECT = 0, - parameter [0:0] ROUND = 0, - //parameter [0:0] LOAD_ACC = 0, - parameter [0:0] SUBTRACT = 0, - parameter [0:0] REGISTER_INPUTS = 0 - //parameter [0:0] REGISTER_OUTPUTS = 0 + parameter NBITS_ACC = 64, + parameter NBITS_A = 20, + parameter NBITS_B = 18, + parameter NBITS_Z = 38, + parameter NBITS_COEF = 20, + parameter NBITS_AF = 4 )( - input [NBITS_A-1:0] a_i, - input [NBITS_B-1:0] b_i, + input [NBITS_A-1:0] a_i, + input [NBITS_B-1:0] b_i, output [NBITS_Z-1:0] z_o, output [NBITS_B-1:0] dly_b_o, - input unsigned_a_i, - input unsigned_b_i, - - input clock_i, - input reset_n_i, - - input load_acc_i, - input [1:0] feedback_i, - input [5:0] shift_right_i + input [NBITS_AF-1:0] acc_fir_i, + input [2:0] feedback_i, + input load_acc_i, + + input unsigned_a_i, + input unsigned_b_i, + + input clock_i, + input reset_n_i, + + input saturate_enable_i, + input [2:0] output_select_i, + input round_i, + input [5:0] shift_right_i, + input subtract_i, + input register_inputs_i, + input [NBITS_COEF-1:0] coef_0_i, + input [NBITS_COEF-1:0] coef_1_i, + input [NBITS_COEF-1:0] coef_2_i, + input [NBITS_COEF-1:0] coef_3_i ); // FIXME: The version of Icarus Verilog from Conda seems not to recognize the @@ -756,12 +761,16 @@ module dsp_t1_sim # ( // Input registers reg [NBITS_A-1:0] r_a; reg [NBITS_B-1:0] r_b; + reg [NBITS_AF-1:0] r_acc_fir; reg r_unsigned_a; reg r_unsigned_b; reg r_load_acc; - reg [1:0] r_feedback; + reg [2:0] r_feedback; reg [5:0] r_shift_d1; reg [5:0] r_shift_d2; + reg r_subtract; + reg r_sat; + reg r_rnd; always @(posedge clock_i or negedge reset_n_i) begin if (~reset_n_i) begin @@ -769,49 +778,70 @@ module dsp_t1_sim # ( r_a <= 'h0; r_b <= 'h0; + r_acc_fir <= 0; r_unsigned_a <= 0; r_unsigned_b <= 0; r_feedback <= 0; r_shift_d1 <= 0; r_shift_d2 <= 0; -// r_subtract <= 0; + r_subtract <= 0; r_load_acc <= 0; + r_sat <= 0; + r_rnd <= 0; end else begin r_a <= a_i; r_b <= b_i; + r_acc_fir <= acc_fir_i; r_unsigned_a <= unsigned_a_i; r_unsigned_b <= unsigned_b_i; r_feedback <= feedback_i; r_shift_d1 <= shift_right_i; r_shift_d2 <= r_shift_d1; -// r_subtract <= subtract_i; + r_subtract <= subtract_i; r_load_acc <= load_acc_i; + r_sat <= r_sat; + r_rnd <= r_rnd; end end // Registered / non-registered input path select - wire [NBITS_A-1:0] a = REGISTER_INPUTS ? r_a : a_i; - wire [NBITS_B-1:0] b = REGISTER_INPUTS ? r_b : b_i; - - wire unsigned_a = REGISTER_INPUTS ? r_unsigned_a : unsigned_a_i; - wire unsigned_b = REGISTER_INPUTS ? r_unsigned_b : unsigned_b_i; - wire [1:0] feedback = REGISTER_INPUTS ? r_feedback : feedback_i; - wire load_acc = REGISTER_INPUTS ? r_load_acc : load_acc_i; - //wire subtract = REGISTER_INPUTS ? r_subtract : subtract_i; + wire [NBITS_A-1:0] a = register_inputs_i ? r_a : a_i; + wire [NBITS_B-1:0] b = register_inputs_i ? r_b : b_i; + + wire [NBITS_AF-1:0] acc_fir = register_inputs_i ? r_acc_fir : acc_fir_i; + wire unsigned_a = register_inputs_i ? r_unsigned_a : unsigned_a_i; + wire unsigned_b = register_inputs_i ? r_unsigned_b : unsigned_b_i; + wire [2:0] feedback = register_inputs_i ? r_feedback : feedback_i; + wire load_acc = register_inputs_i ? r_load_acc : load_acc_i; + wire subtract = register_inputs_i ? r_subtract : subtract_i; + wire sat = register_inputs_i ? r_sat : saturate_enable_i; + wire rnd = register_inputs_i ? r_rnd : round_i; // Shift right control - localparam SHIFT_SEL = {REGISTER_INPUTS, OUTPUT_SELECT[1]}; - wire [5:0] shift_right = (SHIFT_SEL == 2'b00) ? shift_right_i : - (SHIFT_SEL == 2'b01) ? r_shift_d1 : - (SHIFT_SEL == 2'b10) ? r_shift_d1 : - /*(SHIFT_SEL == 2'b11) ?*/ r_shift_d2; + wire [5:0] shift_d1 = register_inputs_i ? r_shift_d1 : shift_right_i; + wire [5:0] shift_d2 = output_select_i[1] ? r_shift_d2 : shift_right_i; + //localparam SHIFT_SEL = {register_inputs_i, output_select_i[1]}; + //wire [5:0] shift_right = (SHIFT_SEL == 2'b00) ? shift_right_i : + //(SHIFT_SEL == 2'b01) ? r_shift_d1 : + //(SHIFT_SEL == 2'b10) ? r_shift_d1 : + //[>(SHIFT_SEL == 2'b11) ?<] r_shift_d2; // Multiplier - wire [NBITS_A-1:0] mult_a = (feedback == 2'h3) ? acc[NBITS_A-1:0] : a; + wire unsigned_mode = unsigned_a & unsigned_b; + wire [NBITS_A-1:0] mult_a; + assign mult_a = (feedback == 3'h0) ? a : + (feedback == 3'h1) ? a : + (feedback == 3'h2) ? a : + (feedback == 3'h3) ? acc[NBITS_A-1:0] : + (feedback == 3'h4) ? coef_0_i : + (feedback == 3'h5) ? coef_1_i : + (feedback == 3'h6) ? coef_2_i : + coef_3_i; // if feedback == 3'h7 + wire [NBITS_B-1:0] mult_b = (feedback == 2'h2) ? {NBITS_B{1'b0}} : b; wire [NBITS_A-1:0] mult_sgn_a = mult_a[NBITS_A-1]; @@ -826,21 +856,20 @@ module dsp_t1_sim # ( (mult_a * mult_b) : (mult_sgn ? (~mult_mag + 1) : mult_mag); // Sign extension - wire [NBITS_ACC-1:0] mult_xtnd = (unsigned_a && unsigned_b) ? + wire [NBITS_ACC-1:0] mult_xtnd = unsigned_mode ? {{(NBITS_ACC-NBITS_A-NBITS_B){1'b0}}, mult[NBITS_A+NBITS_B-1:0]} : {{(NBITS_ACC-NBITS_A-NBITS_B){mult[NBITS_A+NBITS_B-1]}}, mult[NBITS_A+NBITS_B-1:0]}; wire [NBITS_ACC-1:0] a_xtnd = (unsigned_a) ? - {{(NBITS_ACC-NBITS_A){1'b0}}, a[NBITS_A-1:0]} : - {{(NBITS_ACC-NBITS_A){a[NBITS_A-1]}}, a[NBITS_A-1:0]}; + {{(NBITS_ACC-NBITS_A-NBITS_AF){1'b0}}, acc_fir, {a}} : + {{(NBITS_ACC-NBITS_A-NBITS_AF){acc_fir[NBITS_AF-1]}}, acc_fir, {a[NBITS_A-1:0]}}; // Adder - wire [NBITS_ACC-1:0] add_a = (SUBTRACT) ? (~mult_xtnd + 1) : mult_xtnd; - wire [NBITS_ACC-1:0] add_b = (feedback == 2'h0) ? acc : - (feedback == 2'h1) ? {{NBITS_ACC}{1'b0}} : - a_xtnd; + wire [NBITS_ACC-1:0] add_a = (subtract_i) ? (~mult_xtnd + 1) : mult_xtnd; + wire [NBITS_ACC-1:0] add_b = (feedback_i == 2'h0) ? acc : + (feedback_i == 2'h1) ? {{NBITS_ACC}{1'b0}} : a_xtnd; - wire [NBITS_ACC-1:0] add_o = add_a + add_b; + wire [NBITS_ACC-1:0] add_o = add_a + add_b; // Accumulator reg [NBITS_ACC-1:0] acc; @@ -854,14 +883,14 @@ module dsp_t1_sim # ( end // Adder/accumulator output selection - wire [NBITS_ACC-1:0] acc_out = (OUTPUT_SELECT[1]) ? add_o : acc; + wire [NBITS_ACC-1:0] acc_out = (output_select_i[1]) ? add_o : acc; // Round, shift, saturate - wire [NBITS_ACC-1:0] acc_rnd = (ROUND && (shift_right != 0)) ? (acc_out + ({{(NBITS_ACC-1){1'b0}}, 1'b1} << (shift_right - 1))) : + wire [NBITS_ACC-1:0] acc_rnd = (rnd && (shift_right_i != 0)) ? (acc_out + ({{(NBITS_ACC-1){1'b0}}, 1'b1} << (shift_right_i - 1))) : acc_out; - wire [NBITS_ACC-1:0] acc_shr = (unsigned_a && unsigned_b) ? (acc_rnd >> shift_right) : - (acc_rnd >>> shift_right); + wire [NBITS_ACC-1:0] acc_shr = (unsigned_mode) ? (acc_rnd >> shift_right_i) : + (acc_rnd >>> shift_right_i); wire [NBITS_ACC-1:0] acc_sat_u = (acc_shr[NBITS_ACC-1:NBITS_Z] != 0) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{NBITS_Z{1'b1}}} : {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}}; @@ -870,7 +899,7 @@ module dsp_t1_sim # ( (&acc_shr[NBITS_ACC-1:NBITS_Z-1] == 1'b1)) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}} : {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_ACC-1],{NBITS_Z-1{~acc_shr[NBITS_ACC-1]}}}}; - wire [NBITS_ACC-1:0] acc_sat = (SATURATE_ENABLE) ? ((unsigned_a && unsigned_b) ? acc_sat_u : acc_sat_s) : acc_shr; + wire [NBITS_ACC-1:0] acc_sat = (sat) ? ((unsigned_mode) ? acc_sat_u : acc_sat_s) : acc_shr; // Output signals wire [NBITS_Z-1:0] z0; @@ -884,18 +913,18 @@ module dsp_t1_sim # ( if (!reset_n_i) z1 <= 0; else begin - z1 <= (OUTPUT_SELECT == 3'b100) ? z0 : z2; - end + z1 <= (output_select_i == 3'b100) ? z0 : z2; + end // Output mux - assign z_o = (OUTPUT_SELECT == 3'h0) ? z0 : - (OUTPUT_SELECT == 3'h1) ? z2 : - (OUTPUT_SELECT == 3'h2) ? z2 : - (OUTPUT_SELECT == 3'h3) ? z2 : - (OUTPUT_SELECT == 3'h4) ? z1 : - (OUTPUT_SELECT == 3'h5) ? z1 : - (OUTPUT_SELECT == 3'h6) ? z1 : - /*(OUTPUT_SELECT == 3'h7) ?*/ z1; + assign z_o = (output_select_i == 3'h0) ? z0 : + (output_select_i == 3'h1) ? z2 : + (output_select_i == 3'h2) ? z2 : + (output_select_i == 3'h3) ? z2 : + (output_select_i == 3'h4) ? z1 : + (output_select_i == 3'h5) ? z1 : + (output_select_i == 3'h6) ? z1 : + z1; // if output_select_i == 3'h7 // B input delayed passthrough reg [NBITS_B-1:0] dly_b_o; From 35104bac1e42030d077754ba86b158087d8249be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 25 Feb 2022 10:07:52 +0100 Subject: [PATCH 656/845] ql-qlf: qlf_k6n10f: dsp: sim_dsp_mult: replace parameters with ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- .../qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v index ea85ee9b7..d2864c820 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v @@ -22,7 +22,7 @@ module tb(); #1 rst <= 1'b1; #2 rst <= 1'b0; end - + // Input data / reference reg signed [19:0] A; reg signed [17:0] B; @@ -39,15 +39,15 @@ module tb(); wire signed [37:0] Z; dsp_t1_sim # ( - .REGISTER_INPUTS (1'b0), - .OUTPUT_SELECT (3'h0) ) uut ( - .a_i (A), - .b_i (B), - .unsigned_a_i (1'b0), - .unsigned_b_i (1'b0), - .feedback_i (0), - .z_o (Z) + .a_i (A), + .b_i (B), + .unsigned_a_i (1'h0), + .unsigned_b_i (1'h0), + .feedback_i (3'h0), + .register_inputs_i (1'h0), + .output_select_i (3'h0), + .z_o (Z) ); // Error detection From ba612309cfa9d81f66de906a7321f8cbed765dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 25 Feb 2022 10:19:41 +0100 Subject: [PATCH 657/845] ql-qlf: qlf_k6n10f: dsp: sim_dsp_mult: make simulation longer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v index d2864c820..6175db473 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v @@ -7,6 +7,7 @@ // SPDX-License-Identifier:ISC `include "qlf_k6n10f/cells_sim.v" +`timescale 1ns/1ps module tb(); @@ -64,7 +65,7 @@ module tb(); initial begin $dumpfile(`VCD_FILE); $dumpvars(0, tb); - #100 $finish_and_return( (error_count == 0) ? 0 : -1 ); + #10000 $finish_and_return( (error_count == 0) ? 0 : -1 ); end endmodule From 0204d13186c453dca014b452ff19c9ecb5ccd0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 25 Feb 2022 10:20:23 +0100 Subject: [PATCH 658/845] ql-qlf: qlf_k6n10f: dsp: mult_r: replace parameters with ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- .../qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v index 5f2fd501c..930021126 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v @@ -39,15 +39,15 @@ module tb(); wire signed [37:0] Z; dsp_t1_sim # ( - .REGISTER_INPUTS (1'b1), - .OUTPUT_SELECT (3'h0) ) uut ( - .a_i (A), - .b_i (B), - .unsigned_a_i (1'b0), - .unsigned_b_i (1'b0), - .feedback_i (0), - .z_o (Z) + .a_i (A), + .b_i (B), + .unsigned_a_i (1'h0), + .unsigned_b_i (1'h0), + .feedback_i (3'h0), + .register_inputs_i (1'h1), + .output_select_i (3'h0), + .z_o (Z) ); // Error detection From 08515814d11aea675cbc91fbb4c8380e1a703683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 25 Feb 2022 10:59:19 +0100 Subject: [PATCH 659/845] ql-qlf: qlf_k6n10f: dsp: mult_r: shift input data changes to show registered inputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- .../tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v index 930021126..65e1b9619 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v @@ -22,17 +22,22 @@ module tb(); #1 rst <= 1'b1; #2 rst <= 1'b0; end - + // Input data / reference reg signed [19:0] A; reg signed [17:0] B; reg signed [37:0] C; - always @(posedge clk) begin + // Shift data change half a clock cycle + // to make registered inputs apparent + initial begin + forever begin A = $random; B = $random; C <= A * B; + #1.5; + end end // UUT From cda9f8420c767d812626777e0ce56ccea2f4d291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 25 Feb 2022 10:59:34 +0100 Subject: [PATCH 660/845] ql-qlf: qlf_k6n10f: dsp: mult_r: connect clock input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v | 1 + 1 file changed, 1 insertion(+) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v index 65e1b9619..0f64dd78b 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v @@ -52,6 +52,7 @@ module tb(); .feedback_i (3'h0), .register_inputs_i (1'h1), .output_select_i (3'h0), + .clock_i (clk), .z_o (Z) ); From bdb45a553b6d1478cb1817fa83294be8b7013e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 25 Feb 2022 13:17:58 +0100 Subject: [PATCH 661/845] ql-qlf: qlf_k6n10f: dsp: fir: update testbench MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- .../qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v index 904637f90..c8020e6c9 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v @@ -76,26 +76,29 @@ module tb(); endcase // UUT + wire signed [3:0] acc_fir_i = 4'h0; wire signed [19:0] A = coeff; wire signed [17:0] B = data; wire signed [37:0] Z; dsp_t1_sim # ( - .REGISTER_INPUTS (1'b0), - .OUTPUT_SELECT (3'h1), - .ROUND (1'b1), - .SATURATE_ENABLE (1'b1) ) uut ( - .clock_i (clk), - .reset_n_i (~rst), - .a_i ((!stb) ? A : 'h0), - .b_i ((!stb) ? B : 'h0), - .unsigned_a_i (1'b0), - .unsigned_b_i (1'b0), - .feedback_i (stb), - .load_acc_i (1'b1), - .shift_right_i (6'd10), - .z_o (Z) + .clock_i (clk), + .reset_n_i (~rst), + .a_i ((!stb) ? A : 20'h0), + .b_i ((!stb) ? B : 18'h0), + .acc_fir_i ((!stb) ? acc_fir_i : 4'h0), + .unsigned_a_i (1'b0), + .unsigned_b_i (1'b0), + .feedback_i (stb), + .load_acc_i (1'b1), + .shift_right_i (6'd10), + .register_inputs_i (1'b0), + .output_select_i (3'h1), + .round_i (1'b1), + .saturate_enable_i (1'b1), + .subtract_i (1'b0), + .z_o (Z) ); // Output counter From d7eace6313ca4983573235b3e2eb29df245bd591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 25 Feb 2022 14:37:14 +0100 Subject: [PATCH 662/845] ql-qlf: qlf_k6n10f: dsp: add simulation models MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 82 +++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 8 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 1ee33ca52..0a39e24de 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -861,13 +861,13 @@ module dsp_t1_sim # ( {{(NBITS_ACC-NBITS_A-NBITS_B){mult[NBITS_A+NBITS_B-1]}}, mult[NBITS_A+NBITS_B-1:0]}; wire [NBITS_ACC-1:0] a_xtnd = (unsigned_a) ? - {{(NBITS_ACC-NBITS_A-NBITS_AF){1'b0}}, acc_fir, {a}} : - {{(NBITS_ACC-NBITS_A-NBITS_AF){acc_fir[NBITS_AF-1]}}, acc_fir, {a[NBITS_A-1:0]}}; + { {(NBITS_ACC - NBITS_A - NBITS_AF){1'b0}}, acc_fir, {a} } : + { {(NBITS_ACC - NBITS_A - NBITS_AF){acc_fir[NBITS_AF-1]}}, acc_fir, {a[NBITS_A-1:0]} }; // Adder wire [NBITS_ACC-1:0] add_a = (subtract_i) ? (~mult_xtnd + 1) : mult_xtnd; - wire [NBITS_ACC-1:0] add_b = (feedback_i == 2'h0) ? acc : - (feedback_i == 2'h1) ? {{NBITS_ACC}{1'b0}} : a_xtnd; + wire [NBITS_ACC-1:0] add_b = (feedback_i == 3'h0) ? acc : + (feedback_i == 3'h1) ? {{NBITS_ACC}{1'b0}} : a_xtnd; wire [NBITS_ACC-1:0] add_o = add_a + add_b; @@ -937,7 +937,6 @@ module dsp_t1_sim # ( endmodule -(* blackbox *) // TODO: add sim model module dsp_t1_20x18x64 ( input [19:0] a_i, input [17:0] b_i, @@ -949,7 +948,7 @@ module dsp_t1_20x18x64 ( input clock_i, input reset_i, - input [1:0] feedback_i, + input [2:0] feedback_i, input load_acc_i, input unsigned_a_i, input unsigned_b_i, @@ -967,9 +966,42 @@ module dsp_t1_20x18x64 ( parameter [19:0] COEFF_2 = 20'd0; parameter [19:0] COEFF_3 = 20'd0; + dsp_t1_sim #( + .NBITS_ACC(64), + .NBITS_A(20), + .NBITS_B(18), + .NBITS_Z(38), + .NBITS_COEF(20), + .NBITS_AF(4) + ) dsp ( + .a_i(a_i), + .b_i(b_i), + .z_o(z_o), + .dly_b_o(dly_b_o), + + .acc_fir_i(acc_fir_i), + .feedback_i(feedback_i), + .load_acc_i(load_acc_i), + + .unsigned_a_i(unsigned_a_i), + .unsigned_b_i(unsigned_b_i), + + .clock_i(clock_i), + .reset_n_i(~reset_i), + + .saturate_enable_i(saturate_enable_i), + .output_select_i(output_select_i), + .round_i(round_i), + .shift_right_i(shift_right_i), + .subtract_i(subtract_i), + .register_inputs_i(register_inputs_i), + .coef_0_i(coeff_0_i), + .coef_1_i(coeff_1_i), + .coef_2_i(coeff_2_i), + .coef_3_i(coeff_3_i) + ); endmodule -(* blackbox *) // TODO: add sim model module dsp_t1_10x9x32 ( input [ 9:0] a_i, input [ 8:0] b_i, @@ -981,7 +1013,7 @@ module dsp_t1_10x9x32 ( input clock_i, input reset_i, - input [1:0] feedback_i, + input [2:0] feedback_i, input load_acc_i, input unsigned_a_i, input unsigned_b_i, @@ -999,4 +1031,38 @@ module dsp_t1_10x9x32 ( parameter [9:0] COEFF_2 = 10'd0; parameter [9:0] COEFF_3 = 10'd0; + dsp_t1_sim #( + .NBITS_ACC(32), + .NBITS_A(10), + .NBITS_B(9), + .NBITS_Z(19), + .NBITS_COEF(10), + .NBITS_AF(2) + ) dsp ( + .a_i(a_i), + .b_i(b_i), + .z_o(z_o), + .dly_b_o(dly_b_o), + + .acc_fir_i(acc_fir_i), + .feedback_i(feedback_i), + .load_acc_i(load_acc_i), + + .unsigned_a_i(unsigned_a_i), + .unsigned_b_i(unsigned_b_i), + + .clock_i(clock_i), + .reset_n_i(~reset_i), + + .saturate_enable_i(saturate_enable_i), + .output_select_i(output_select_i), + .round_i(round_i), + .shift_right_i(shift_right_i), + .subtract_i(subtract_i), + .register_inputs_i(register_inputs_i), + .coef_0_i(coeff_0_i), + .coef_1_i(coeff_1_i), + .coef_2_i(coeff_2_i), + .coef_3_i(coeff_3_i) + ); endmodule From 705c6e2cef61651c4eddfc34d0062dbc8396b1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 25 Feb 2022 14:55:17 +0100 Subject: [PATCH 663/845] ql-qlf: qlf_k6n10f: dsp: fix error detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v | 2 +- ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v | 2 +- ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v index c8020e6c9..2f953c06d 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v @@ -124,7 +124,7 @@ module tb(); endcase // Error detection - wire error = stb && (odata != Z[31:0]); + wire error = stb && (odata !== Z[31:0]); // Error counting integer error_count; diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v index 6175db473..f1627560d 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v @@ -52,7 +52,7 @@ module tb(); ); // Error detection - wire error = (Z != C); + wire error = (Z !== C); // Error counting integer error_count; diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v index 0f64dd78b..6187e1a19 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v @@ -61,7 +61,7 @@ module tb(); always @(posedge clk) r_C <= C; - wire error = (Z != r_C); + wire error = (Z !== r_C); // Error counting integer error_count; From 410e77d3005a6f8523e144c5fb5f13d19b8c145f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 2 Mar 2022 11:59:15 +0100 Subject: [PATCH 664/845] ql-qlf: qlf_k6n10f: dsp: reconfigure DSP model structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 274 +++++++++++++++++++-------- 1 file changed, 197 insertions(+), 77 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 0a39e24de..7379f7b48 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -685,17 +685,17 @@ endmodule /* QL_DSP1 */ (* blackbox *) module QL_DSP2 ( // TODO: Name subject to change - input [19:0] a, - input [17:0] b, - input [ 3:0] acc_fir, - output [37:0] z, - output [17:0] dly_b, + input [NBITS_A-1:0] a, + input [NBITS_B-1:0] b, + input [NBITS_AF-1:0] acc_fir, + output [NBITS_Z-1:0] z, + output [NBITS_B-1:0] dly_b, (* clkbuf_sink *) input clk, input reset, - input [1:0] feedback, + input [2:0] feedback, input load_acc, input unsigned_a, input unsigned_b, @@ -709,11 +709,136 @@ module QL_DSP2 ( // TODO: Name subject to change input register_inputs ); - parameter [19:0] COEFF_0 = 20'd0; - parameter [19:0] COEFF_1 = 20'd0; - parameter [19:0] COEFF_2 = 20'd0; - parameter [19:0] COEFF_3 = 20'd0; - + parameter [NBITS_COEF-1:0] COEFF_0 = 20'd0; + parameter [NBITS_COEF-1:0] COEFF_1 = 20'd0; + parameter [NBITS_COEF-1:0] COEFF_2 = 20'd0; + parameter [NBITS_COEF-1:0] COEFF_3 = 20'd0; + + localparam NBITS_ACC = 64; + localparam NBITS_A = 20; + localparam NBITS_B = 18; + localparam NBITS_Z = 38; + localparam NBITS_COEF = 20; + localparam NBITS_AF = 4; + + wire [NBITS_Z-1:0] dsp_full_z; + wire [(NBITS_Z/2)-1:0] dsp_frac0_z; + wire [(NBITS_Z/2)-1:0] dsp_frac1_z; + + wire [NBITS_B-1:0] dsp_full_dly_b; + wire [(NBITS_B/2)-1:0] dsp_frac0_dly_b; + wire [(NBITS_B/2)-1:0] dsp_frac1_dly_b; + + assign z = f_mode ? {dsp_frac1_z, dsp_frac0_z} : dsp_full_z; + assign dly_b = f_mode ? {dsp_frac1_dly_b, dsp_frac0_dly_b} : dsp_full_dly_b; + + // Output used when fmode == 1 + dsp_t1_sim #( + .NBITS_A(NBITS_A/2), + .NBITS_B(NBITS_B/2), + .NBITS_ACC(NBITS_ACC/2), + .NBITS_Z(NBITS_Z/2), + .NBITS_COEF(NBITS_COEF/2), + .NBITS_AF(NBITS_AF/2) + ) dsp_frac0 ( + .a_i(a[(NBITS_A/2)-1:0]), + .b_i(b[(NBITS_B/2)-1:0]), + .z_o(dsp_frac0_z), + .dly_b_o(dsp_frac0_dly_b), + + .acc_fir_i(acc_fir[(NBITS_AF/2)-1:0]), + .feedback_i(feedback), + .load_acc_i(load_acc), + + .unsigned_a_i(unsigned_a), + .unsigned_b_i(unsigned_b), + + .clock_i(clk), + .reset_n_i(~reset), + + .saturate_enable_i(saturate_enable), + .output_select_i(output_select), + .round_i(round), + .shift_right_i(shift_right), + .subtract_i(subtract), + .register_inputs_i(register_inputs), + .coef_0_i(COEFF_0[(NBITS_COEF/2)-1:0]), + .coef_1_i(COEFF_1[(NBITS_COEF/2)-1:0]), + .coef_2_i(COEFF_2[(NBITS_COEF/2)-1:0]), + .coef_3_i(COEFF_3[(NBITS_COEF/2)-1:0]) + ); + + // Output used when fmode == 1 + dsp_t1_sim #( + .NBITS_A(NBITS_A/2), + .NBITS_B(NBITS_B/2), + .NBITS_ACC(NBITS_ACC/2), + .NBITS_Z(NBITS_Z/2), + .NBITS_COEF(NBITS_COEF/2), + .NBITS_AF(NBITS_AF/2) + ) dsp_frac1 ( + .a_i(a[NBITS_A-1:NBITS_A/2]), + .b_i(b[NBITS_B-1:NBITS_B/2]), + .z_o(dsp_frac1_z), + .dly_b_o(dsp_frac1_dly_b), + + .acc_fir_i(acc_fir[NBITS_AF-1:NBITS_AF/2]), + .feedback_i(feedback), + .load_acc_i(load_acc), + + .unsigned_a_i(unsigned_a), + .unsigned_b_i(unsigned_b), + + .clock_i(clk), + .reset_n_i(~reset), + + .saturate_enable_i(saturate_enable), + .output_select_i(output_select), + .round_i(round), + .shift_right_i(shift_right), + .subtract_i(subtract), + .register_inputs_i(register_inputs), + .coef_0_i(COEFF_0[NBITS_COEF-1:NBITS_COEF/2]), + .coef_1_i(COEFF_1[NBITS_COEF-1:NBITS_COEF/2]), + .coef_2_i(COEFF_2[NBITS_COEF-1:NBITS_COEF/2]), + .coef_3_i(COEFF_3[NBITS_COEF-1:NBITS_COEF/2]) + ); + + // Output used when fmode == 0 + dsp_t1_sim #( + .NBITS_A(NBITS_A), + .NBITS_B(NBITS_B), + .NBITS_ACC(NBITS_ACC), + .NBITS_Z(NBITS_Z), + .NBITS_COEF(NBITS_COEF), + .NBITS_AF(NBITS_AF) + ) dsp_full ( + .a_i(a), + .b_i(b), + .z_o(dsp_full_z), + .dly_b_o(dsp_full_dly_b), + + .acc_fir_i(acc_fir), + .feedback_i(feedback), + .load_acc_i(load_acc), + + .unsigned_a_i(unsigned_a), + .unsigned_b_i(unsigned_b), + + .clock_i(clk), + .reset_n_i(~reset), + + .saturate_enable_i(saturate_enable), + .output_select_i(output_select), + .round_i(round), + .shift_right_i(shift_right), + .subtract_i(subtract), + .register_inputs_i(register_inputs), + .coef_0_i(COEFF_0), + .coef_1_i(COEFF_1), + .coef_2_i(COEFF_2), + .coef_3_i(COEFF_3) + ); endmodule module dsp_t1_sim # ( @@ -966,39 +1091,35 @@ module dsp_t1_20x18x64 ( parameter [19:0] COEFF_2 = 20'd0; parameter [19:0] COEFF_3 = 20'd0; - dsp_t1_sim #( - .NBITS_ACC(64), - .NBITS_A(20), - .NBITS_B(18), - .NBITS_Z(38), - .NBITS_COEF(20), - .NBITS_AF(4) - ) dsp ( - .a_i(a_i), - .b_i(b_i), - .z_o(z_o), - .dly_b_o(dly_b_o), - - .acc_fir_i(acc_fir_i), - .feedback_i(feedback_i), - .load_acc_i(load_acc_i), - - .unsigned_a_i(unsigned_a_i), - .unsigned_b_i(unsigned_b_i), - - .clock_i(clock_i), - .reset_n_i(~reset_i), - - .saturate_enable_i(saturate_enable_i), - .output_select_i(output_select_i), - .round_i(round_i), - .shift_right_i(shift_right_i), - .subtract_i(subtract_i), - .register_inputs_i(register_inputs_i), - .coef_0_i(coeff_0_i), - .coef_1_i(coeff_1_i), - .coef_2_i(coeff_2_i), - .coef_3_i(coeff_3_i) + QL_DSP2 #( + .COEFF_0(COEFF_0), + .COEFF_1(COEFF_1), + .COEFF_2(COEFF_2), + .COEFF_3(COEFF_3) + ) dsp ( + .a(a_i), + .b(b_i), + .z(z_o), + .dly_b(dly_b_o), + + .f_mode(1'b0), // 20x18x64 DSP + + .acc_fir(acc_fir_i), + .feedback(feedback_i), + .load_acc(load_acc_i), + + .unsigned_a(unsigned_a_i), + .unsigned_b(unsigned_b_i), + + .clk(clock_i), + .reset(reset_i), + + .saturate_enable(saturate_enable_i), + .output_select(output_select_i), + .round(round_i), + .shift_right(shift_right_i), + .subtract(subtract_i), + .register_inputs(register_inputs_i) ); endmodule @@ -1031,38 +1152,37 @@ module dsp_t1_10x9x32 ( parameter [9:0] COEFF_2 = 10'd0; parameter [9:0] COEFF_3 = 10'd0; - dsp_t1_sim #( - .NBITS_ACC(32), - .NBITS_A(10), - .NBITS_B(9), - .NBITS_Z(19), - .NBITS_COEF(10), - .NBITS_AF(2) - ) dsp ( - .a_i(a_i), - .b_i(b_i), - .z_o(z_o), - .dly_b_o(dly_b_o), - - .acc_fir_i(acc_fir_i), - .feedback_i(feedback_i), - .load_acc_i(load_acc_i), - - .unsigned_a_i(unsigned_a_i), - .unsigned_b_i(unsigned_b_i), - - .clock_i(clock_i), - .reset_n_i(~reset_i), - - .saturate_enable_i(saturate_enable_i), - .output_select_i(output_select_i), - .round_i(round_i), - .shift_right_i(shift_right_i), - .subtract_i(subtract_i), - .register_inputs_i(register_inputs_i), - .coef_0_i(coeff_0_i), - .coef_1_i(coeff_1_i), - .coef_2_i(coeff_2_i), - .coef_3_i(coeff_3_i) + wire [18:0] z_rem; + wire [8:0] dly_b_rem; + + QL_DSP2 #( + .COEFF_0({10'd0, COEFF_0}), + .COEFF_1({10'd0, COEFF_1}), + .COEFF_2({10'd0, COEFF_2}), + .COEFF_3({10'd0, COEFF_3}) + ) dsp ( + .a({10'd0, a_i}), + .b({9'd0, b_i}), + .z({z_rem, z_o}), + .dly_b({dly_b_rem, dly_b_o}), + + .f_mode(1'b1), // 10x9x32 DSP + + .acc_fir({2'd0, acc_fir_i}), + .feedback(feedback_i), + .load_acc(load_acc_i), + + .unsigned_a(unsigned_a_i), + .unsigned_b(unsigned_b_i), + + .clk(clock_i), + .reset(reset_i), + + .saturate_enable(saturate_enable_i), + .output_select(output_select_i), + .round(round_i), + .shift_right(shift_right_i), + .subtract(subtract_i), + .register_inputs(register_inputs_i) ); endmodule From 42d0e207669ae0b55d48e135bcea5ef7eea20384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 2 Mar 2022 12:21:20 +0100 Subject: [PATCH 665/845] ql-qlf: qlf_k6n10f: dsp: update shift wire MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 7379f7b48..6270f49be 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -948,7 +948,7 @@ module dsp_t1_sim # ( // Shift right control wire [5:0] shift_d1 = register_inputs_i ? r_shift_d1 : shift_right_i; - wire [5:0] shift_d2 = output_select_i[1] ? r_shift_d2 : shift_right_i; + wire [5:0] shift_d2 = output_select_i[1] ? shift_d1 : r_shift_d2; //localparam SHIFT_SEL = {register_inputs_i, output_select_i[1]}; //wire [5:0] shift_right = (SHIFT_SEL == 2'b00) ? shift_right_i : //(SHIFT_SEL == 2'b01) ? r_shift_d1 : From 5db50964e05e2d9c9c7637516fb15c8fedf3175e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 18 Feb 2022 10:26:20 +0100 Subject: [PATCH 666/845] ql-qlf: qlf_k6n10f: add TDPBRAM36 simulation models MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v | 353 ++++++++++ ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 760 +++++++++++++++++----- ql-qlf-plugin/qlf_k6n10f/sram1024x18.v | 122 ++++ ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v | 623 ++++++++++++++++++ 4 files changed, 1685 insertions(+), 173 deletions(-) create mode 100644 ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v create mode 100644 ql-qlf-plugin/qlf_k6n10f/sram1024x18.v create mode 100644 ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v new file mode 100644 index 000000000..185cb96db --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v @@ -0,0 +1,353 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module TDP18Kx18_FIFO ( + RMODE_A, + RMODE_B, + WMODE_A, + WMODE_B, + WEN_A, + WEN_B, + REN_A, + REN_B, + CLK_A, + CLK_B, + BE_A, + BE_B, + ADDR_A, + ADDR_B, + WDATA_A, + WDATA_B, + RDATA_A, + RDATA_B, + EMPTY, + EPO, + EWM, + UNDERRUN, + FULL, + FMO, + FWM, + OVERRUN, + FLUSH, + FMODE, + SYNC_FIFO, + POWERDN, + SLEEP, + PROTECT, + UPAF, + UPAE, + PL_INIT, + PL_ENA, + PL_WEN, + PL_REN, + PL_CLK, + PL_ADDR, + PL_DATA_IN, + PL_DATA_OUT, + RAM_ID +); + input wire [2:0] RMODE_A; + input wire [2:0] RMODE_B; + input wire [2:0] WMODE_A; + input wire [2:0] WMODE_B; + input wire WEN_A; + input wire WEN_B; + input wire REN_A; + input wire REN_B; + input wire CLK_A; + input wire CLK_B; + input wire [1:0] BE_A; + input wire [1:0] BE_B; + input wire [13:0] ADDR_A; + input wire [13:0] ADDR_B; + input wire [17:0] WDATA_A; + input wire [17:0] WDATA_B; + output reg [17:0] RDATA_A; + output reg [17:0] RDATA_B; + output wire EMPTY; + output wire EPO; + output wire EWM; + output wire UNDERRUN; + output wire FULL; + output wire FMO; + output wire FWM; + output wire OVERRUN; + input wire FLUSH; + input wire FMODE; + input wire SYNC_FIFO; + input wire POWERDN; + input wire SLEEP; + input wire PROTECT; + input wire [10:0] UPAF; + input wire [10:0] UPAE; + input PL_INIT; + input PL_ENA; + input PL_WEN; + input PL_REN; + input PL_CLK; + input [23:0] PL_ADDR; + input [17:0] PL_DATA_IN; + output reg [17:0] PL_DATA_OUT; + input [8:0] RAM_ID; + reg [17:0] wmsk_a; + reg [17:0] wmsk_b; + wire [8:0] addr_a; + wire [8:0] addr_b; + reg [4:0] addr_a_d; + reg [4:0] addr_b_d; + wire [17:0] ram_rdata_a; + wire [17:0] ram_rdata_b; + reg [17:0] aligned_wdata_a; + reg [17:0] aligned_wdata_b; + wire ren_o; + wire [10:0] ff_raddr; + wire [10:0] ff_waddr; + wire [13:0] ram_addr_a; + wire [13:0] ram_addr_b; + wire preload; + wire my_id; + wire initn; + wire smux_rclk; + wire smux_wclk; + wire real_fmode; + wire [3:0] raw_fflags; + reg [1:0] fifo_rmode; + reg [1:0] fifo_wmode; + wire smux_clk_a; + wire smux_clk_b; + wire ram_ren_a; + wire ram_ren_b; + wire ram_wen_a; + wire ram_wen_b; + wire cen_a; + wire cen_b; + localparam MODE_9 = 3'b101; + always @(*) begin + fifo_rmode = (RMODE_B == MODE_9 ? 2'b10 : 2'b01); + fifo_wmode = (WMODE_A == MODE_9 ? 2'b10 : 2'b01); + end + assign my_id = (PL_ADDR[23:14] == RAM_ID) | PL_INIT; + assign preload = (PROTECT ? 1'b0 : my_id & PL_ENA); + assign smux_clk_a = (preload ? PL_CLK : CLK_A); + assign smux_clk_b = (preload ? 0 : (FMODE ? (SYNC_FIFO ? CLK_A : CLK_B) : CLK_B)); + assign real_fmode = (preload ? 1'b0 : FMODE); + assign ram_ren_b = (preload ? PL_REN : (real_fmode ? ren_o : REN_B)); + assign ram_wen_a = (preload ? PL_WEN : (FMODE ? ~FULL & WEN_A : WEN_A)); + assign ram_ren_a = (preload ? 1'b1 : (FMODE ? 0 : REN_A)); + assign ram_wen_b = (preload ? 1'b1 : (FMODE ? 1'b0 : WEN_B)); + assign cen_b = ram_ren_b | ram_wen_b; + assign cen_a = ram_ren_a | ram_wen_a; + assign ram_addr_b = (preload ? {PL_ADDR[9:0], 4'b0000} : (real_fmode ? {ff_raddr[10:0], 3'b000} : {ADDR_B[13:4], addr_b_d[3:0]})); + assign ram_addr_a = (preload ? {PL_ADDR[8:0], 4'b0000} : (real_fmode ? {ff_waddr[10:0], 3'b000} : {ADDR_A[13:4], addr_a_d[3:0]})); + always @(posedge CLK_A) addr_a_d[3:0] <= ADDR_A[3:0]; + always @(posedge CLK_B) addr_b_d[3:0] <= ADDR_B[3:0]; + sram1024x18 uram( + .clk_a(smux_clk_a), + .cen_a(~cen_a), + .wen_a(~ram_wen_a), + .addr_a(ram_addr_a[13:4]), + .wmsk_a(wmsk_a), + .wdata_a(aligned_wdata_a), + .rdata_a(ram_rdata_a), + .clk_b(smux_clk_b), + .cen_b(~cen_b), + .wen_b(~ram_wen_b), + .addr_b(ram_addr_b[13:4]), + .wmsk_b(wmsk_b), + .wdata_b(aligned_wdata_b), + .rdata_b(ram_rdata_b) + ); + fifo_ctl #( + .ADDR_WIDTH(11), + .FIFO_WIDTH(2) + ) fifo_ctl( + .rclk(smux_clk_b), + .rst_R_n(~FLUSH), + .wclk(smux_clk_a), + .rst_W_n(~FLUSH), + .ren(REN_B), + .wen(ram_wen_a), + .depth(3'b000), + .sync(SYNC_FIFO), + .rmode(fifo_rmode), + .wmode(fifo_wmode), + .ren_o(ren_o), + .fflags({FULL, FMO, FWM, OVERRUN, EMPTY, EPO, EWM, UNDERRUN}), + .raddr(ff_raddr), + .waddr(ff_waddr), + .upaf(UPAF), + .upae(UPAE) + ); + always @(*) begin : PRELOAD_DATA + if (preload & ram_ren_a) + PL_DATA_OUT = ram_rdata_a; + else + PL_DATA_OUT = PL_DATA_IN; + end + localparam MODE_1 = 3'b001; + localparam MODE_18 = 3'b110; + localparam MODE_2 = 3'b010; + localparam MODE_4 = 3'b100; + always @(*) begin : WDATA_MODE_SEL + if (ram_wen_a == 1) begin + if (preload) begin + aligned_wdata_a = PL_DATA_IN; + wmsk_a = 18'h00000; + end + else + case (WMODE_A) + MODE_18: begin + aligned_wdata_a = WDATA_A; + {wmsk_a[17], wmsk_a[15:8]} = (FMODE ? 9'h000 : (BE_A[1] ? 9'h000 : 9'h1ff)); + {wmsk_a[16], wmsk_a[7:0]} = (FMODE ? 9'h000 : (BE_A[0] ? 9'h000 : 9'h1ff)); + end + MODE_9: begin + aligned_wdata_a = {{2 {WDATA_A[16]}}, {2 {WDATA_A[7:0]}}}; + {wmsk_a[17], wmsk_a[15:8]} = (ram_addr_a[3] ? (FMODE ? 9'h000 : (BE_A[0] ? 9'h000 : 9'h1ff)) : 9'h1ff); + {wmsk_a[16], wmsk_a[7:0]} = (ram_addr_a[3] ? 9'h1ff : (FMODE ? 9'h000 : (BE_A[0] ? 9'h000 : 9'h1ff))); + end + MODE_4: begin + aligned_wdata_a = {2'b00, {4 {WDATA_A[3:0]}}}; + wmsk_a[17:16] = 2'b11; + wmsk_a[15:12] = (ram_addr_a[3:2] == 2'b11 ? 4'h0 : 4'hf); + wmsk_a[11:8] = (ram_addr_a[3:2] == 2'b10 ? 4'h0 : 4'hf); + wmsk_a[7:4] = (ram_addr_a[3:2] == 2'b01 ? 4'h0 : 4'hf); + wmsk_a[3:0] = (ram_addr_a[3:2] == 2'b00 ? 4'h0 : 4'hf); + end + MODE_2: begin + aligned_wdata_a = {2'b00, {8 {WDATA_A[1:0]}}}; + wmsk_a[17:16] = 2'b11; + wmsk_a[15:14] = (ram_addr_a[3:1] == 3'b111 ? 2'h0 : 2'h3); + wmsk_a[13:12] = (ram_addr_a[3:1] == 3'b110 ? 2'h0 : 2'h3); + wmsk_a[11:10] = (ram_addr_a[3:1] == 3'b101 ? 2'h0 : 2'h3); + wmsk_a[9:8] = (ram_addr_a[3:1] == 3'b100 ? 2'h0 : 2'h3); + wmsk_a[7:6] = (ram_addr_a[3:1] == 3'b011 ? 2'h0 : 2'h3); + wmsk_a[5:4] = (ram_addr_a[3:1] == 3'b010 ? 2'h0 : 2'h3); + wmsk_a[3:2] = (ram_addr_a[3:1] == 3'b001 ? 2'h0 : 2'h3); + wmsk_a[1:0] = (ram_addr_a[3:1] == 3'b000 ? 2'h0 : 2'h3); + end + MODE_1: begin + aligned_wdata_a = {2'b00, {16 {WDATA_A[0]}}}; + wmsk_a = 18'h3fffe; + wmsk_a[ram_addr_a[3:0]] = 0; + end + endcase + end + else begin + aligned_wdata_a = 18'h00000; + wmsk_a = 18'h3ffff; + end + if (ram_wen_b == 1) + case (WMODE_B) + MODE_18: begin + aligned_wdata_b = WDATA_B; + {wmsk_b[17], wmsk_b[15:8]} = (BE_B[1] ? 9'h000 : 9'h1ff); + {wmsk_b[16], wmsk_b[7:0]} = (BE_B[0] ? 9'h000 : 9'h1ff); + end + MODE_9: begin + aligned_wdata_b = {{2 {WDATA_B[16]}}, {2 {WDATA_B[7:0]}}}; + {wmsk_b[17], wmsk_b[15:8]} = (ram_addr_b[3] ? (BE_B[0] ? 9'h000 : 9'h1ff) : 9'h1ff); + {wmsk_b[16], wmsk_b[7:0]} = (ram_addr_b[3] ? 9'h1ff : (BE_B[0] ? 9'h000 : 9'h1ff)); + end + MODE_4: begin + aligned_wdata_b = {2'b00, {4 {WDATA_B[3:0]}}}; + wmsk_b[17:16] = 2'b11; + wmsk_b[15:12] = (ram_addr_b[3:2] == 2'b11 ? 4'h0 : 4'hf); + wmsk_b[11:8] = (ram_addr_b[3:2] == 2'b10 ? 4'h0 : 4'hf); + wmsk_b[7:4] = (ram_addr_b[3:2] == 2'b01 ? 4'h0 : 4'hf); + wmsk_b[3:0] = (ram_addr_b[3:2] == 2'b00 ? 4'h0 : 4'hf); + end + MODE_2: begin + aligned_wdata_b = {2'b00, {8 {WDATA_B[1:0]}}}; + wmsk_b[17:16] = 2'b11; + wmsk_b[15:14] = (ram_addr_b[3:1] == 3'b111 ? 2'h0 : 2'h3); + wmsk_b[13:12] = (ram_addr_b[3:1] == 3'b110 ? 2'h0 : 2'h3); + wmsk_b[11:10] = (ram_addr_b[3:1] == 3'b101 ? 2'h0 : 2'h3); + wmsk_b[9:8] = (ram_addr_b[3:1] == 3'b100 ? 2'h0 : 2'h3); + wmsk_b[7:6] = (ram_addr_b[3:1] == 3'b011 ? 2'h0 : 2'h3); + wmsk_b[5:4] = (ram_addr_b[3:1] == 3'b010 ? 2'h0 : 2'h3); + wmsk_b[3:2] = (ram_addr_b[3:1] == 3'b001 ? 2'h0 : 2'h3); + wmsk_b[1:0] = (ram_addr_b[3:1] == 3'b000 ? 2'h0 : 2'h3); + end + MODE_1: begin + aligned_wdata_b = {2'b00, {16 {WDATA_B[0]}}}; + wmsk_b = 18'h3fffe; + wmsk_b[ram_addr_b[3:0]] = 0; + end + endcase + else begin + aligned_wdata_b = 18'b000000000000000000; + wmsk_b = 18'h3ffff; + end + end + always @(*) begin : RDATA_A_MODE_SEL + case (RMODE_A) + default: RDATA_A = 18'h00000; + MODE_18: RDATA_A = ram_rdata_a; + MODE_9: begin + RDATA_A[17:9] = 9'h000; + RDATA_A[8:0] = (ram_addr_a[3] ? {ram_rdata_a[17], ram_rdata_a[15:8]} : {ram_rdata_a[16], ram_rdata_a[7:0]}); + end + MODE_4: begin + RDATA_A[17:4] = 14'h0000; + case (ram_addr_a[3:2]) + 3: RDATA_A[3:0] = ram_rdata_a[15:12]; + 2: RDATA_A[3:0] = ram_rdata_a[11:8]; + 1: RDATA_A[3:0] = ram_rdata_a[7:4]; + 0: RDATA_A[3:0] = ram_rdata_a[3:0]; + endcase + end + MODE_2: begin + RDATA_A[17:2] = 16'h0000; + case (ram_addr_a[3:1]) + 7: RDATA_A[1:0] = ram_rdata_a[15:14]; + 6: RDATA_A[1:0] = ram_rdata_a[13:12]; + 5: RDATA_A[1:0] = ram_rdata_a[11:10]; + 4: RDATA_A[1:0] = ram_rdata_a[9:8]; + 3: RDATA_A[1:0] = ram_rdata_a[7:6]; + 2: RDATA_A[1:0] = ram_rdata_a[5:4]; + 1: RDATA_A[1:0] = ram_rdata_a[3:2]; + 0: RDATA_A[1:0] = ram_rdata_a[1:0]; + endcase + end + MODE_1: begin + RDATA_A[17:1] = 17'h00000; + RDATA_A[0] = ram_rdata_a[ram_addr_a[3:0]]; + end + endcase + end + always @(*) + case (RMODE_B) + default: RDATA_B = 18'h15566; + MODE_18: RDATA_B = ram_rdata_b; + MODE_9: begin + RDATA_B[17:9] = 1'sb1; + RDATA_B[8] = (ram_addr_b[3] ? ram_rdata_b[17] : ram_rdata_b[16]); + RDATA_B[7:0] = (ram_addr_b[3] ? ram_rdata_b[15:8] : ram_rdata_b[7:0]); + end + MODE_4: + case (ram_addr_b[3:2]) + 3: RDATA_B[3:0] = ram_rdata_b[15:12]; + 2: RDATA_B[3:0] = ram_rdata_b[11:8]; + 1: RDATA_B[3:0] = ram_rdata_b[7:4]; + 0: RDATA_B[3:0] = ram_rdata_b[3:0]; + endcase + MODE_2: + case (ram_addr_b[3:1]) + 7: RDATA_B[1:0] = ram_rdata_b[15:14]; + 6: RDATA_B[1:0] = ram_rdata_b[13:12]; + 5: RDATA_B[1:0] = ram_rdata_b[11:10]; + 4: RDATA_B[1:0] = ram_rdata_b[9:8]; + 3: RDATA_B[1:0] = ram_rdata_b[7:6]; + 2: RDATA_B[1:0] = ram_rdata_b[5:4]; + 1: RDATA_B[1:0] = ram_rdata_b[3:2]; + 0: RDATA_B[1:0] = ram_rdata_b[1:0]; + endcase + MODE_1: RDATA_B[0] = ram_rdata_b[ram_addr_b[3:0]]; + endcase +endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 6270f49be..9ea74c444 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -488,180 +488,594 @@ module TDP_BRAM18 ( endmodule module TDP_BRAM36 ( - (* clkbuf_sink *) - input CLOCKA, - (* clkbuf_sink *) - input CLOCKB, - input READENABLEA, - input READENABLEB, - input [14:0] ADDRA, - input [14:0] ADDRB, - input [31:0] WRITEDATAA, - input [31:0] WRITEDATAB, - input [3:0] WRITEDATAAP, - input [3:0] WRITEDATABP, - input WRITEENABLEA, - input WRITEENABLEB, - input [3:0] BYTEENABLEA, - input [3:0] BYTEENABLEB, - //input [2:0] WRITEDATAWIDTHA, - //input [2:0] WRITEDATAWIDTHB, - //input [2:0] READDATAWIDTHA, - //input [2:0] READDATAWIDTHB, - output [31:0] READDATAA, - output [31:0] READDATAB, - output [3:0] READDATAAP, - output [3:0] READDATABP + WEN_A1, + WEN_B1, + REN_A1, + REN_B1, + CLK_A1, + CLK_B1, + BE_A1, + BE_B1, + ADDR_A1, + ADDR_B1, + WDATA_A1, + WDATA_B1, + RDATA_A1, + RDATA_B1, + FLUSH1, + SYNC_FIFO1, + RMODE_A1, + RMODE_B1, + WMODE_A1, + WMODE_B1, + FMODE1, + POWERDN1, + SLEEP1, + PROTECT1, + UPAE1, + UPAF1, + WEN_A2, + WEN_B2, + REN_A2, + REN_B2, + CLK_A2, + CLK_B2, + BE_A2, + BE_B2, + ADDR_A2, + ADDR_B2, + WDATA_A2, + WDATA_B2, + RDATA_A2, + RDATA_B2, + FLUSH2, + SYNC_FIFO2, + RMODE_A2, + RMODE_B2, + WMODE_A2, + WMODE_B2, + FMODE2, + POWERDN2, + SLEEP2, + PROTECT2, + UPAE2, + UPAF2, + SPLIT, + RAM_ID_i, + PL_INIT_i, + PL_ENA_i, + PL_REN_i, + PL_CLK_i, + PL_WEN_i, + PL_ADDR_i, + PL_DATA_i, + PL_INIT_o, + PL_ENA_o, + PL_REN_o, + PL_CLK_o, + PL_WEN_o, + PL_ADDR_o, + PL_DATA_o ); - parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_10 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_11 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_12 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_13 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_14 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_15 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_16 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_17 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_18 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_19 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_20 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_21 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_22 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_23 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_24 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_25 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_26 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_27 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_28 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_29 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_30 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_31 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_32 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_33 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_34 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_35 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_36 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_37 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_38 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_39 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_40 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_41 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_42 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_43 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_44 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_45 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_46 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_47 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_48 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_49 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_50 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_51 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_52 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_53 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_54 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_55 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_56 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_57 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_58 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_59 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_60 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_61 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_62 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_63 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_64 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_65 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_66 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_67 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_68 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_69 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_70 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_71 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_72 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_73 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_74 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_75 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_76 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_77 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_78 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_79 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter integer READ_WIDTH_A = 0; - parameter integer READ_WIDTH_B = 0; - parameter integer WRITE_WIDTH_A = 0; - parameter integer WRITE_WIDTH_B = 0; - + input wire WEN_A1; + input wire WEN_B1; + input wire REN_A1; + input wire REN_B1; + input wire CLK_A1; + input wire CLK_B1; + input wire [1:0] BE_A1; + input wire [1:0] BE_B1; + input wire [14:0] ADDR_A1; + input wire [14:0] ADDR_B1; + input wire [17:0] WDATA_A1; + input wire [17:0] WDATA_B1; + output reg [17:0] RDATA_A1; + output reg [17:0] RDATA_B1; + input wire FLUSH1; + input wire SYNC_FIFO1; + input wire [2:0] RMODE_A1; + input wire [2:0] RMODE_B1; + input wire [2:0] WMODE_A1; + input wire [2:0] WMODE_B1; + input wire FMODE1; + input wire POWERDN1; + input wire SLEEP1; + input wire PROTECT1; + input wire [10:0] UPAE1; + input wire [10:0] UPAF1; + input wire WEN_A2; + input wire WEN_B2; + input wire REN_A2; + input wire REN_B2; + input wire CLK_A2; + input wire CLK_B2; + input wire [1:0] BE_A2; + input wire [1:0] BE_B2; + input wire [13:0] ADDR_A2; + input wire [13:0] ADDR_B2; + input wire [17:0] WDATA_A2; + input wire [17:0] WDATA_B2; + output reg [17:0] RDATA_A2; + output reg [17:0] RDATA_B2; + input wire FLUSH2; + input wire SYNC_FIFO2; + input wire [2:0] RMODE_A2; + input wire [2:0] RMODE_B2; + input wire [2:0] WMODE_A2; + input wire [2:0] WMODE_B2; + input wire FMODE2; + input wire POWERDN2; + input wire SLEEP2; + input wire PROTECT2; + input wire [10:0] UPAE2; + input wire [10:0] UPAF2; + input SPLIT; + input [8:0] RAM_ID_i; + input wire PL_INIT_i; + input wire PL_ENA_i; + input wire PL_REN_i; + input wire PL_CLK_i; + input wire [1:0] PL_WEN_i; + input wire [23:0] PL_ADDR_i; + input wire [35:0] PL_DATA_i; + output reg PL_INIT_o; + output reg PL_ENA_o; + output reg PL_REN_o; + output reg PL_CLK_o; + output reg [1:0] PL_WEN_o; + output reg [23:0] PL_ADDR_o; + output wire [35:0] PL_DATA_o; + wire EMPTY2; + wire EPO2; + wire EWM2; + wire FULL2; + wire FMO2; + wire FWM2; + wire EMPTY1; + wire EPO1; + wire EWM1; + wire FULL1; + wire FMO1; + wire FWM1; + wire UNDERRUN1; + wire OVERRUN1; + wire UNDERRUN2; + wire OVERRUN2; + wire UNDERRUN3; + wire OVERRUN3; + wire EMPTY3; + wire EPO3; + wire EWM3; + wire FULL3; + wire FMO3; + wire FWM3; + wire ram_fmode1; + wire ram_fmode2; + wire [17:0] ram_rdata_a1; + wire [17:0] ram_rdata_b1; + wire [17:0] ram_rdata_a2; + wire [17:0] ram_rdata_b2; + reg [17:0] ram_wdata_a1; + reg [17:0] ram_wdata_b1; + reg [17:0] ram_wdata_a2; + reg [17:0] ram_wdata_b2; + reg [14:0] laddr_a1; + reg [14:0] laddr_b1; + wire [13:0] ram_addr_a1; + wire [13:0] ram_addr_b1; + wire [13:0] ram_addr_a2; + wire [13:0] ram_addr_b2; + wire smux_clk_a1; + wire smux_clk_b1; + wire smux_clk_a2; + wire smux_clk_b2; + reg [1:0] ram_be_a1; + reg [1:0] ram_be_a2; + reg [1:0] ram_be_b1; + reg [1:0] ram_be_b2; + reg [2:0] ram_rmode_a1; + reg [2:0] ram_wmode_a1; + reg [2:0] ram_rmode_b1; + reg [2:0] ram_wmode_b1; + reg [2:0] ram_rmode_a2; + reg [2:0] ram_wmode_a2; + reg [2:0] ram_rmode_b2; + reg [2:0] ram_wmode_b2; + wire ram_ren_a1; + wire ram_ren_b1; + wire ram_ren_a2; + wire ram_ren_b2; + wire ram_wen_a1; + wire ram_wen_b1; + wire ram_wen_a2; + wire ram_wen_b2; + wire ren_o; + wire [11:0] ff_raddr; + wire [11:0] ff_waddr; + reg [35:0] fifo_rdata; + reg [1:0] fifo_rmode; + reg [1:0] fifo_wmode; + wire [1:0] bwl; + assign ram_fmode1 = FMODE1 & SPLIT; + assign ram_fmode2 = FMODE2 & SPLIT; + assign smux_clk_a1 = CLK_A1; + assign smux_clk_b1 = (FMODE1 ? (SYNC_FIFO1 ? CLK_A1 : CLK_B1) : CLK_B1); + assign smux_clk_a2 = (SPLIT ? CLK_A2 : CLK_A1); + assign smux_clk_b2 = (SPLIT ? CLK_B2 : (FMODE1 ? (SYNC_FIFO1 ? CLK_A1 : CLK_B1) : CLK_B1)); + assign ram_ren_a1 = (SPLIT ? REN_A1 : (FMODE1 ? 0 : REN_A1)); + assign ram_ren_a2 = (SPLIT ? REN_A2 : (FMODE1 ? 0 : REN_A1)); + assign ram_ren_b1 = (SPLIT ? REN_B1 : (FMODE1 ? ren_o : REN_B1)); + assign ram_ren_b2 = (SPLIT ? REN_B2 : (FMODE1 ? ren_o : REN_B1)); + assign ram_wen_a1 = (SPLIT ? WEN_A1 : (FMODE1 ? ~FULL3 & WEN_A1 : WEN_A1 & ~ADDR_A1[4])); + assign ram_wen_a2 = (SPLIT ? WEN_A2 : (FMODE1 ? ~FULL3 & WEN_A1 : WEN_A1 & ADDR_A1[4])); + localparam MODE_36 = 3'b111; + assign ram_wen_b1 = (SPLIT ? WEN_B1 : (WMODE_B1 == MODE_36 ? WEN_B1 : WEN_B1 & ~ADDR_B1[4])); + assign ram_wen_b2 = (SPLIT ? WEN_B2 : (WMODE_B1 == MODE_36 ? WEN_B1 : WEN_B1 & ADDR_B1[4])); + assign ram_addr_a1 = (SPLIT ? ADDR_A1[13:0] : (FMODE1 ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1[14:5], ADDR_A1[3:0]})); + assign ram_addr_b1 = (SPLIT ? ADDR_B1[13:0] : (FMODE1 ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1[14:5], ADDR_B1[3:0]})); + assign ram_addr_a2 = (SPLIT ? ADDR_A2[13:0] : (FMODE1 ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1[14:5], ADDR_A1[3:0]})); + assign ram_addr_b2 = (SPLIT ? ADDR_B2[13:0] : (FMODE1 ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1[14:5], ADDR_B1[3:0]})); + assign bwl = (SPLIT ? ADDR_A1[4:3] : (FMODE1 ? ff_waddr[1:0] : ADDR_A1[4:3])); + localparam MODE_18 = 3'b110; + localparam MODE_9 = 3'b101; + always @(*) begin : WDATA_SEL + case (SPLIT) + 1: begin + ram_wdata_a1 = WDATA_A1; + ram_wdata_a2 = WDATA_A2; + ram_wdata_b1 = WDATA_B1; + ram_wdata_b2 = WDATA_B2; + ram_be_a2 = BE_A2; + ram_be_b2 = BE_B2; + ram_be_a1 = BE_A1; + ram_be_b1 = BE_B1; + end + 0: begin + case (WMODE_A1) + MODE_36: begin + ram_wdata_a1 = {WDATA_A2[15:14], WDATA_A1[15:0]}; + ram_wdata_a2 = {WDATA_A2[17:16], WDATA_A2[13:0], WDATA_A1[17:16]}; + ram_be_a2 = (FMODE1 ? 2'b11 : BE_A2); + ram_be_a1 = (FMODE1 ? 2'b11 : BE_A1); + end + MODE_18: begin + ram_wdata_a1 = WDATA_A1; + ram_wdata_a2 = WDATA_A1; + ram_be_a1 = (FMODE1 ? (ff_waddr[1] ? 2'b00 : 2'b11) : BE_A1); + ram_be_a2 = (FMODE1 ? (ff_waddr[1] ? 2'b11 : 2'b00) : BE_A1); + end + MODE_9: + case (bwl) + 0: begin + {ram_wdata_a1[16], ram_wdata_a1[7:0]} = WDATA_A1[8:0]; + {ram_wdata_a1[17], ram_wdata_a1[15:8]} = 9'b000000000; + {ram_wdata_a2[16], ram_wdata_a2[7:0]} = 9'b000000000; + {ram_wdata_a2[17], ram_wdata_a2[15:8]} = 9'b000000000; + ram_be_a1[0] = (FMODE1 ? (ff_waddr[1:0] == 0 ? 1'b1 : 1'b0) : 1'b1); + ram_be_a1[1] = (FMODE1 ? (ff_waddr[1:0] == 1 ? 1'b1 : 1'b0) : 1'b0); + ram_be_a2[0] = (FMODE1 ? (ff_waddr[1:0] == 2 ? 1'b1 : 1'b0) : 1'b0); + ram_be_a2[1] = (FMODE1 ? (ff_waddr[1:0] == 3 ? 1'b1 : 1'b0) : 1'b0); + end + 1: begin + {ram_wdata_a1[16], ram_wdata_a1[7:0]} = 9'b000000000; + {ram_wdata_a1[17], ram_wdata_a1[15:8]} = {WDATA_A1[8:0]}; + {ram_wdata_a2[16], ram_wdata_a2[7:0]} = 9'b000000000; + {ram_wdata_a2[17], ram_wdata_a2[15:8]} = 9'b000000000; + {ram_be_a2, ram_be_a1} = 4'b0010; + end + 2: begin + {ram_wdata_a1[16], ram_wdata_a1[7:0]} = 9'b000000000; + {ram_wdata_a1[17], ram_wdata_a1[15:8]} = 9'b000000000; + {ram_wdata_a2[16], ram_wdata_a2[7:0]} = {WDATA_A1[8:0]}; + {ram_wdata_a2[17], ram_wdata_a2[15:8]} = 9'b000000000; + {ram_be_a2, ram_be_a1} = 4'b0100; + end + 3: begin + {ram_wdata_a1[16], ram_wdata_a1[7:0]} = 9'b000000000; + {ram_wdata_a1[17], ram_wdata_a1[15:8]} = 9'b000000000; + {ram_wdata_a2[16], ram_wdata_a2[7:0]} = 9'b000000000; + {ram_wdata_a2[17], ram_wdata_a2[15:8]} = {WDATA_A1[8:0]}; + {ram_be_a2, ram_be_a1} = 4'b1000; + end + endcase + endcase + case (WMODE_B1) + MODE_36: begin + ram_wdata_b1 = (FMODE1 ? 18'b000000000000000000 : {WDATA_B2[15:14], WDATA_B1[15:0]}); + ram_wdata_b2 = (FMODE1 ? 18'b000000000000000000 : {WDATA_B2[17:16], WDATA_B2[13:0], WDATA_B1[17:16]}); + ram_be_b2 = BE_B2; + ram_be_b1 = BE_B1; + end + MODE_18: begin + ram_wdata_b1 = (FMODE1 ? 18'b000000000000000000 : WDATA_B1); + ram_wdata_b2 = (FMODE1 ? 18'b000000000000000000 : WDATA_B1); + ram_be_b1 = BE_B1; + ram_be_b2 = BE_B1; + end + MODE_9: + case (ram_addr_b1[4:3]) + 0: begin + {ram_wdata_b1[16], ram_wdata_b1[7:0]} = {ram_wdata_b1[16], ram_wdata_b1[7:0]}; + {ram_wdata_b1[17], ram_wdata_b1[15:8]} = 9'b000000000; + {ram_wdata_b2[16], ram_wdata_b2[7:0]} = 9'b000000000; + {ram_wdata_b2[17], ram_wdata_b2[15:8]} = 9'b000000000; + {ram_be_b2, ram_be_b1} = 4'b0001; + end + 1: begin + {ram_wdata_b1[16], ram_wdata_b1[7:0]} = 9'b000000000; + {ram_wdata_b1[17], ram_wdata_b1[15:8]} = {ram_wdata_b1[16], ram_wdata_b1[7:0]}; + {ram_wdata_b2[16], ram_wdata_b2[7:0]} = 9'b000000000; + {ram_wdata_b2[17], ram_wdata_b2[15:8]} = 9'b000000000; + {ram_be_b2, ram_be_b1} = 4'b0010; + end + 2: begin + {ram_wdata_b1[16], ram_wdata_b1[7:0]} = 9'b000000000; + {ram_wdata_b1[17], ram_wdata_b1[15:8]} = 9'b000000000; + {ram_wdata_b2[16], ram_wdata_b2[7:0]} = {ram_wdata_b1[16], ram_wdata_b1[7:0]}; + {ram_wdata_b2[17], ram_wdata_b2[15:8]} = 9'b000000000; + {ram_be_b2, ram_be_b1} = 4'b0100; + end + 3: begin + {ram_wdata_b1[16], ram_wdata_b1[7:0]} = 9'b000000000; + {ram_wdata_b1[17], ram_wdata_b1[15:8]} = 9'b000000000; + {ram_wdata_b2[16], ram_wdata_b2[7:0]} = 9'b000000000; + {ram_wdata_b2[17], ram_wdata_b2[15:8]} = {ram_wdata_b1[16], ram_wdata_b1[7:0]}; + {ram_be_b2, ram_be_b1} = 4'b1000; + end + endcase + endcase + end + endcase + end + always @(*) + case (SPLIT) + 0: begin + ram_rmode_a1 = (RMODE_A1 == MODE_36 ? MODE_18 : RMODE_A1); + ram_rmode_a2 = (RMODE_A1 == MODE_36 ? MODE_18 : RMODE_A1); + ram_wmode_a1 = (WMODE_A1 == MODE_36 ? MODE_18 : (FMODE1 ? MODE_18 : WMODE_A1)); + ram_wmode_a2 = (WMODE_A1 == MODE_36 ? MODE_18 : (FMODE1 ? MODE_18 : WMODE_A1)); + ram_rmode_b1 = (RMODE_B1 == MODE_36 ? MODE_18 : (FMODE1 ? MODE_18 : RMODE_B1)); + ram_rmode_b2 = (RMODE_B1 == MODE_36 ? MODE_18 : (FMODE1 ? MODE_18 : RMODE_B1)); + ram_wmode_b1 = (WMODE_B1 == MODE_36 ? MODE_18 : WMODE_B1); + ram_wmode_b2 = (WMODE_B1 == MODE_36 ? MODE_18 : RMODE_B1); + end + 1: begin + ram_rmode_a1 = (RMODE_A1 == MODE_36 ? MODE_18 : RMODE_A1); + ram_rmode_a2 = (RMODE_A2 == MODE_36 ? MODE_18 : RMODE_A2); + ram_wmode_a1 = (WMODE_A1 == MODE_36 ? MODE_18 : WMODE_A1); + ram_wmode_a2 = (WMODE_A2 == MODE_36 ? MODE_18 : WMODE_A2); + ram_rmode_b1 = (RMODE_B1 == MODE_36 ? MODE_18 : RMODE_B1); + ram_rmode_b2 = (RMODE_B2 == MODE_36 ? MODE_18 : RMODE_B2); + ram_wmode_b1 = (WMODE_B1 == MODE_36 ? MODE_18 : WMODE_B1); + ram_wmode_b2 = (WMODE_B2 == MODE_36 ? MODE_18 : WMODE_B2); + end + endcase + always @(*) begin : FIFO_READ_SEL + case (RMODE_B1) + MODE_36: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; + MODE_18: fifo_rdata = (ff_raddr[1] ? {18'b000000000000000000, ram_rdata_b2} : {18'b000000000000000000, ram_rdata_b1}); + MODE_9: + case (ff_raddr[1:0]) + 0: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b1[16], ram_rdata_b1[7:0]}; + 1: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b1[17], ram_rdata_b1[15:8]}; + 2: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[16], ram_rdata_b2[7:0]}; + 3: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[17], ram_rdata_b2[15:8]}; + endcase + endcase + end + localparam MODE_1 = 3'b001; + localparam MODE_2 = 3'b010; + localparam MODE_4 = 3'b100; + always @(*) begin : RDATA_SEL + case (SPLIT) + 1: begin + RDATA_A1 = (FMODE1 ? {10'b0000000000, EMPTY1, EPO1, EWM1, UNDERRUN1, FULL1, FMO1, FWM1, OVERRUN1} : ram_rdata_a1); + RDATA_B1 = ram_rdata_b1; + RDATA_A2 = (FMODE2 ? {10'b0000000000, EMPTY2, EPO2, EWM2, UNDERRUN2, FULL2, FMO2, FWM2, OVERRUN2} : ram_rdata_a2); + RDATA_B2 = ram_rdata_b2; + end + 0: begin + if (FMODE1) begin + RDATA_A1 = {10'b0000000000, EMPTY3, EPO3, EWM3, UNDERRUN3, FULL3, FMO3, FWM3, OVERRUN3}; + RDATA_A2 = 18'b000000000000000000; + end + else + case (RMODE_A1) + MODE_36: begin + RDATA_A1 = {ram_rdata_a2[1:0], ram_rdata_a1[15:0]}; + RDATA_A2 = {ram_rdata_a2[17:16], ram_rdata_a1[17:16], ram_rdata_a2[15:2]}; + end + MODE_18: begin + RDATA_A1 = (laddr_a1[4] ? ram_rdata_a2 : ram_rdata_a1); + RDATA_A2 = 18'b000000000000000000; + end + MODE_9: begin + RDATA_A1 = (laddr_a1[4] ? {9'b000000000, ram_rdata_a2[8:0]} : {9'b000000000, ram_rdata_a1[8:0]}); + RDATA_A2 = 18'b000000000000000000; + end + MODE_4: begin + RDATA_A2 = 18'b000000000000000000; + RDATA_A1[17:4] = 14'b00000000000000; + RDATA_A1[3:0] = (laddr_a1[4] ? ram_rdata_a2[3:0] : ram_rdata_a1[3:0]); + end + MODE_2: begin + RDATA_A2 = 18'b000000000000000000; + RDATA_A1[17:2] = 16'b0000000000000000; + RDATA_A1[1:0] = (laddr_a1[4] ? ram_rdata_a2[1:0] : ram_rdata_a1[1:0]); + end + MODE_1: begin + RDATA_A2 = 18'b000000000000000000; + RDATA_A1[17:1] = 17'b00000000000000000; + RDATA_A1[0] = (laddr_a1[4] ? ram_rdata_a2[0] : ram_rdata_a1[0]); + end + endcase + case (RMODE_B1) + MODE_36: begin + RDATA_B1 = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; + RDATA_B2 = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; + end + MODE_18: begin + RDATA_B1 = (FMODE1 ? fifo_rdata[17:0] : (laddr_b1[4] ? ram_rdata_b2 : ram_rdata_b1)); + RDATA_B2 = 18'b000000000000000000; + end + MODE_9: begin + RDATA_B1 = (FMODE1 ? {9'b000000000, fifo_rdata[8:0]} : (laddr_b1[4] ? {9'b000000000, ram_rdata_b2[8:0]} : {9'b000000000, ram_rdata_b1[8:0]})); + RDATA_B2 = 18'b000000000000000000; + end + MODE_4: begin + RDATA_B2 = 18'b000000000000000000; + RDATA_B1[17:4] = 14'b00000000000000; + RDATA_B1[3:0] = (laddr_b1[4] ? ram_rdata_b2[3:0] : ram_rdata_b1[3:0]); + end + MODE_2: begin + RDATA_B2 = 18'b000000000000000000; + RDATA_B1[17:2] = 16'b0000000000000000; + RDATA_B1[1:0] = (laddr_b1[4] ? ram_rdata_b2[1:0] : ram_rdata_b1[1:0]); + end + MODE_1: begin + RDATA_B2 = 18'b000000000000000000; + RDATA_B1[17:1] = 17'b00000000000000000; + RDATA_B1[0] = (laddr_b1[4] ? ram_rdata_b2[0] : ram_rdata_b1[0]); + end + endcase + end + endcase + end + always @(posedge CLK_A1) laddr_a1 <= ADDR_A1; + always @(posedge CLK_B1) laddr_b1 <= ADDR_B1; + always @(*) begin + case (WMODE_A1) + default: fifo_wmode = 2'b00; + MODE_36: fifo_wmode = 2'b00; + MODE_18: fifo_wmode = 2'b01; + MODE_9: fifo_wmode = 2'b10; + endcase + case (RMODE_B1) + default: fifo_rmode = 2'b00; + MODE_36: fifo_rmode = 2'b00; + MODE_18: fifo_rmode = 2'b01; + MODE_9: fifo_rmode = 2'b10; + endcase + end + fifo_ctl #( + .ADDR_WIDTH(12), + .FIFO_WIDTH(3'd4) + ) fifo36_ctl( + .rclk(smux_clk_b1), + .rst_R_n(~FLUSH1), + .wclk(smux_clk_a1), + .rst_W_n(~FLUSH1), + .ren(REN_B1), + .wen(ram_wen_a1), + .sync(SYNC_FIFO1), + .depth(3'b111), + .rmode(fifo_rmode), + .wmode(fifo_wmode), + .ren_o(ren_o), + .fflags({FULL3, FMO3, FWM3, OVERRUN3, EMPTY3, EPO3, EWM3, UNDERRUN3}), + .raddr(ff_raddr), + .waddr(ff_waddr), + .upaf({1'b0, UPAF1}), + .upae({1'b0, UPAE1}) + ); + TDP18Kx18_FIFO u1( + .RMODE_A(ram_rmode_a1), + .RMODE_B(ram_rmode_b1), + .WMODE_A(ram_wmode_a1), + .WMODE_B(ram_wmode_b1), + .WEN_A(ram_wen_a1), + .WEN_B(ram_wen_b1), + .REN_A(ram_ren_a1), + .REN_B(ram_ren_b1), + .CLK_A(smux_clk_a1), + .CLK_B(smux_clk_b1), + .BE_A(ram_be_a1), + .BE_B(ram_be_b1), + .ADDR_A(ram_addr_a1), + .ADDR_B(ram_addr_b1), + .WDATA_A(ram_wdata_a1), + .WDATA_B(ram_wdata_b1), + .RDATA_A(ram_rdata_a1), + .RDATA_B(ram_rdata_b1), + .EMPTY(EMPTY1), + .EPO(EPO1), + .EWM(EWM1), + .UNDERRUN(UNDERRUN1), + .FULL(FULL1), + .FMO(FMO1), + .FWM(FWM1), + .OVERRUN(OVERRUN1), + .FLUSH(FLUSH1), + .FMODE(ram_fmode1), + .UPAF(UPAF1), + .UPAE(UPAE1), + .SYNC_FIFO(SYNC_FIFO1), + .POWERDN(POWERDN1), + .SLEEP(SLEEP1), + .PROTECT(PROTECT1), + .PL_INIT(PL_INIT_i), + .PL_ENA(PL_ENA_i), + .PL_WEN(PL_WEN_i[0]), + .PL_REN(PL_REN_i), + .PL_CLK(PL_CLK_i), + .PL_ADDR(PL_ADDR_i), + .PL_DATA_IN({PL_DATA_i[33:32], PL_DATA_i[15:0]}), + .PL_DATA_OUT({PL_DATA_o[33:32], PL_DATA_o[15:0]}), + .RAM_ID({RAM_ID_i}) + ); + TDP18Kx18_FIFO u2( + .RMODE_A(ram_rmode_a2), + .RMODE_B(ram_rmode_b2), + .WMODE_A(ram_wmode_a2), + .WMODE_B(ram_wmode_b2), + .WEN_A(ram_wen_a2), + .WEN_B(ram_wen_b2), + .REN_A(ram_ren_a2), + .REN_B(ram_ren_b2), + .CLK_A(smux_clk_a2), + .CLK_B(smux_clk_b2), + .BE_A(ram_be_a2), + .BE_B(ram_be_b2), + .ADDR_A(ram_addr_a2), + .ADDR_B(ram_addr_b2), + .WDATA_A(ram_wdata_a2), + .WDATA_B(ram_wdata_b2), + .RDATA_A(ram_rdata_a2), + .RDATA_B(ram_rdata_b2), + .EMPTY(EMPTY2), + .EPO(EPO2), + .EWM(EWM2), + .UNDERRUN(UNDERRUN2), + .FULL(FULL2), + .FMO(FMO2), + .FWM(FWM2), + .OVERRUN(OVERRUN2), + .FLUSH(FLUSH2), + .FMODE(ram_fmode2), + .UPAF(UPAF2), + .UPAE(UPAE2), + .SYNC_FIFO(SYNC_FIFO2), + .POWERDN(POWERDN2), + .SLEEP(SLEEP2), + .PROTECT(PROTECT2), + .PL_INIT(PL_INIT_i), + .PL_ENA(PL_ENA_i), + .PL_WEN(PL_WEN_i[1]), + .PL_REN(PL_REN_i), + .PL_CLK(PL_CLK_i), + .PL_ADDR(PL_ADDR_i), + .PL_DATA_IN({PL_DATA_i[35:34], PL_DATA_i[31:16]}), + .PL_DATA_OUT({PL_DATA_o[35:34], PL_DATA_o[31:16]}), + .RAM_ID(RAM_ID_i) + ); + always @(*) begin + PL_ADDR_o = PL_ADDR_i; + PL_INIT_o = PL_INIT_i; + PL_ENA_o = PL_ENA_i; + PL_WEN_o = PL_WEN_i; + PL_REN_o = PL_REN_i; + PL_CLK_o = PL_CLK_i; + end endmodule (* blackbox *) diff --git a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v new file mode 100644 index 000000000..79e5ae7ad --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v @@ -0,0 +1,122 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module sram1024x18 ( + clk_a, + cen_a, + wen_a, + addr_a, + wmsk_a, + wdata_a, + rdata_a, + clk_b, + cen_b, + wen_b, + addr_b, + wmsk_b, + wdata_b, + rdata_b +); + input wire clk_a; + input wire cen_a; + input wire wen_a; + input wire [9:0] addr_a; + input wire [17:0] wmsk_a; + input wire [17:0] wdata_a; + output reg [17:0] rdata_a; + input wire clk_b; + input wire cen_b; + input wire wen_b; + input wire [9:0] addr_b; + input wire [17:0] wmsk_b; + input wire [17:0] wdata_b; + output reg [17:0] rdata_b; + reg [17:0] ram [1023:0]; + reg [9:0] laddr_a; + reg [9:0] laddr_b; + reg lcen_a; + reg lwen_a; + reg [17:0] lwdata_a; + reg lcen_b; + reg lwen_b; + reg [17:0] lwdata_b; + reg [17:0] lwmsk_a; + reg [17:0] lwmsk_b; + always @(posedge clk_a) begin + laddr_a <= addr_a; + lwdata_a <= wdata_a; + lwmsk_a <= wmsk_a; + lcen_a <= cen_a; + lwen_a <= wen_a; + end + always @(posedge clk_b) begin + laddr_b <= addr_b; + lwdata_b <= wdata_b; + lwmsk_b <= wmsk_b; + lcen_b <= cen_b; + lwen_b <= wen_b; + end + always @(*) begin + if ((lwen_b == 0) && (lcen_b == 0)) begin + ram[laddr_b][0] = (lwmsk_b[0] ? ram[laddr_b][0] : lwdata_b[0]); + ram[laddr_b][1] = (lwmsk_b[1] ? ram[laddr_b][1] : lwdata_b[1]); + ram[laddr_b][2] = (lwmsk_b[2] ? ram[laddr_b][2] : lwdata_b[2]); + ram[laddr_b][3] = (lwmsk_b[3] ? ram[laddr_b][3] : lwdata_b[3]); + ram[laddr_b][4] = (lwmsk_b[4] ? ram[laddr_b][4] : lwdata_b[4]); + ram[laddr_b][5] = (lwmsk_b[5] ? ram[laddr_b][5] : lwdata_b[5]); + ram[laddr_b][6] = (lwmsk_b[6] ? ram[laddr_b][6] : lwdata_b[6]); + ram[laddr_b][7] = (lwmsk_b[7] ? ram[laddr_b][7] : lwdata_b[7]); + ram[laddr_b][8] = (lwmsk_b[8] ? ram[laddr_b][8] : lwdata_b[8]); + ram[laddr_b][9] = (lwmsk_b[9] ? ram[laddr_b][9] : lwdata_b[9]); + ram[laddr_b][10] = (lwmsk_b[10] ? ram[laddr_b][10] : lwdata_b[10]); + ram[laddr_b][11] = (lwmsk_b[11] ? ram[laddr_b][11] : lwdata_b[11]); + ram[laddr_b][12] = (lwmsk_b[12] ? ram[laddr_b][12] : lwdata_b[12]); + ram[laddr_b][13] = (lwmsk_b[13] ? ram[laddr_b][13] : lwdata_b[13]); + ram[laddr_b][14] = (lwmsk_b[14] ? ram[laddr_b][14] : lwdata_b[14]); + ram[laddr_b][15] = (lwmsk_b[15] ? ram[laddr_b][15] : lwdata_b[15]); + ram[laddr_b][16] = (lwmsk_b[16] ? ram[laddr_b][16] : lwdata_b[16]); + ram[laddr_b][17] = (lwmsk_b[17] ? ram[laddr_b][17] : lwdata_b[17]); + lwen_b = 1; + end + if (lcen_b == 0) begin + rdata_b = ram[laddr_b]; + lcen_b = 1; + end + else + rdata_b = rdata_b; + end + always @(*) begin + if ((lwen_a == 0) && (lcen_a == 0)) begin + ram[laddr_a][0] = (lwmsk_a[0] ? ram[laddr_a][0] : lwdata_a[0]); + ram[laddr_a][1] = (lwmsk_a[1] ? ram[laddr_a][1] : lwdata_a[1]); + ram[laddr_a][2] = (lwmsk_a[2] ? ram[laddr_a][2] : lwdata_a[2]); + ram[laddr_a][3] = (lwmsk_a[3] ? ram[laddr_a][3] : lwdata_a[3]); + ram[laddr_a][4] = (lwmsk_a[4] ? ram[laddr_a][4] : lwdata_a[4]); + ram[laddr_a][5] = (lwmsk_a[5] ? ram[laddr_a][5] : lwdata_a[5]); + ram[laddr_a][6] = (lwmsk_a[6] ? ram[laddr_a][6] : lwdata_a[6]); + ram[laddr_a][7] = (lwmsk_a[7] ? ram[laddr_a][7] : lwdata_a[7]); + ram[laddr_a][8] = (lwmsk_a[8] ? ram[laddr_a][8] : lwdata_a[8]); + ram[laddr_a][9] = (lwmsk_a[9] ? ram[laddr_a][9] : lwdata_a[9]); + ram[laddr_a][10] = (lwmsk_a[10] ? ram[laddr_a][10] : lwdata_a[10]); + ram[laddr_a][11] = (lwmsk_a[11] ? ram[laddr_a][11] : lwdata_a[11]); + ram[laddr_a][12] = (lwmsk_a[12] ? ram[laddr_a][12] : lwdata_a[12]); + ram[laddr_a][13] = (lwmsk_a[13] ? ram[laddr_a][13] : lwdata_a[13]); + ram[laddr_a][14] = (lwmsk_a[14] ? ram[laddr_a][14] : lwdata_a[14]); + ram[laddr_a][15] = (lwmsk_a[15] ? ram[laddr_a][15] : lwdata_a[15]); + ram[laddr_a][16] = (lwmsk_a[16] ? ram[laddr_a][16] : lwdata_a[16]); + ram[laddr_a][17] = (lwmsk_a[17] ? ram[laddr_a][17] : lwdata_a[17]); + lwen_a = 1; + end + if (lcen_a == 0) begin + rdata_a = ram[laddr_a]; + lcen_a = 1; + end + else + rdata_a = rdata_a; + end +endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v new file mode 100644 index 000000000..ad26b2286 --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v @@ -0,0 +1,623 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module fifo_ctl ( + raddr, + waddr, + fflags, + ren_o, + sync, + depth, + rmode, + wmode, + rclk, + rst_R_n, + wclk, + rst_W_n, + ren, + wen, + upaf, + upae +); + parameter ADDR_WIDTH = 11; + parameter FIFO_WIDTH = 3'd2; + output wire [ADDR_WIDTH - 1:0] raddr; + output wire [ADDR_WIDTH - 1:0] waddr; + output wire [7:0] fflags; + output wire ren_o; + input wire sync; + input wire [2:0] depth; + input wire [1:0] rmode; + input wire [1:0] wmode; + input wire rclk; + input wire rst_R_n; + input wire wclk; + input wire rst_W_n; + input wire ren; + input wire wen; + input wire [ADDR_WIDTH - 1:0] upaf; + input wire [ADDR_WIDTH - 1:0] upae; + reg [ADDR_WIDTH:0] pushtopop1; + reg [ADDR_WIDTH:0] pushtopop2; + reg [ADDR_WIDTH:0] poptopush1; + reg [ADDR_WIDTH:0] poptopush2; + wire [ADDR_WIDTH:0] pushtopop0; + wire [ADDR_WIDTH:0] poptopush0; + wire [ADDR_WIDTH:0] smux_poptopush; + wire [ADDR_WIDTH:0] smux_pushtopop; + assign smux_poptopush = (sync ? poptopush0 : poptopush2); + assign smux_pushtopop = (sync ? pushtopop0 : pushtopop2); + always @(posedge rclk or negedge rst_R_n) + if (~rst_R_n) begin + pushtopop1 <= #(1) 12'h000; + pushtopop2 <= #(1) 12'h000; + end + else begin + pushtopop1 <= #(1) pushtopop0; + pushtopop2 <= #(1) pushtopop1; + end + always @(posedge wclk or negedge rst_W_n) + if (~rst_W_n) begin + poptopush1 <= #(1) 12'h000; + poptopush2 <= #(1) 12'h000; + end + else begin + poptopush1 <= #(1) poptopush0; + poptopush2 <= #(1) poptopush1; + end + fifo_push #(.ADDR_WIDTH(ADDR_WIDTH)) u_fifo_push( + .wclk(wclk), + .wen(wen), + .rst_n(rst_W_n), + .rmode(rmode), + .wmode(wmode), + .gcout(pushtopop0), + .gcin(smux_poptopush), + .ff_waddr(waddr), + .depth(depth), + .pushflags(fflags[7:4]), + .upaf(upaf) + ); + fifo_pop #( + .ADDR_WIDTH(ADDR_WIDTH), + .FIFO_WIDTH(FIFO_WIDTH) + ) u_fifo_pop( + .rclk(rclk), + .ren_in(ren), + .rst_n(rst_R_n), + .rmode(rmode), + .wmode(wmode), + .ren_o(ren_o), + .gcout(poptopush0), + .gcin(smux_pushtopop), + .out_raddr(raddr), + .depth(depth), + .popflags(fflags[3:0]), + .upae(upae) + ); +endmodule +module fifo_push ( + pushflags, + gcout, + ff_waddr, + rst_n, + wclk, + wen, + rmode, + wmode, + depth, + gcin, + upaf +); + parameter ADDR_WIDTH = 11; + output wire [3:0] pushflags; + output wire [ADDR_WIDTH:0] gcout; + output wire [ADDR_WIDTH - 1:0] ff_waddr; + input rst_n; + input wclk; + input wen; + input [1:0] rmode; + input [1:0] wmode; + input [2:0] depth; + input [ADDR_WIDTH:0] gcin; + input [ADDR_WIDTH - 1:0] upaf; + reg full_next; + reg full; + reg paf_next; + reg paf; + reg fmo; + reg fmo_next; + reg overflow; + reg p1; + reg p2; + reg f1; + reg f2; + reg q1; + reg q2; + reg [1:0] gmode; + reg [ADDR_WIDTH:0] waddr; + reg [ADDR_WIDTH:0] raddr; + reg [ADDR_WIDTH:0] gcout_reg; + reg [ADDR_WIDTH:0] gcout_next; + reg [ADDR_WIDTH:0] raddr_next; + reg [ADDR_WIDTH - 1:0] paf_thresh; + wire overflow_next; + wire [ADDR_WIDTH:0] waddr_next; + wire [ADDR_WIDTH:0] gc8out_next; + wire [ADDR_WIDTH - 1:0] gc16out_next; + wire [ADDR_WIDTH - 2:0] gc32out_next; + wire [ADDR_WIDTH:0] tmp; + wire [ADDR_WIDTH:0] next_count; + wire [ADDR_WIDTH:0] count; + reg [ADDR_WIDTH:0] fbytes; + genvar i; + assign next_count = fbytes - (waddr_next >= raddr_next ? waddr_next - raddr_next : (~raddr_next + waddr_next) + 1); + assign count = fbytes - (waddr >= raddr ? waddr - raddr : (~raddr + waddr) + 1); + always @(*) begin + case (depth) + 3'b000: fbytes = 12'd2048; + 3'b001: fbytes = 12'd1024; + 3'b010: fbytes = 12'd512; + 3'b011: fbytes = 12'd256; + 3'b100: fbytes = 12'd128; + 3'b101: fbytes = 12'd64; + 3'b110: fbytes = 12'd32; + 3'b111: fbytes = 13'd4096; + endcase + paf_thresh = (wmode ? (wmode[0] ? upaf << 1 : upaf) : upaf << 2); + end + always @(*) + case (wmode) + 2'h0, 2'h1, 2'h2: begin + full_next = (wen ? f1 : f2); + fmo_next = (wen ? p1 : p2); + paf_next = (wen ? q1 : q2); + end + default: begin + full_next = 1'b0; + fmo_next = 1'b0; + paf_next = 1'b0; + end + endcase + always @(*) begin : PUSH_FULL_FLAGS + f1 = 1'b0; + f2 = 1'b0; + p1 = 1'b0; + p2 = 1'b0; + q1 = next_count < paf_thresh; + q2 = count < paf_thresh; + case (wmode) + 2'h0: + case (depth) + 3'h0: begin + f1 = {~waddr_next[11], waddr_next[10:2]} == raddr_next[11:2]; + f2 = {~waddr[11], waddr[10:2]} == raddr_next[11:2]; + p1 = ((waddr_next[10:2] + 1) & 9'h1ff) == raddr_next[10:2]; + p2 = ((waddr[10:2] + 1) & 9'h1ff) == raddr_next[10:2]; + end + 3'h1: begin + f1 = {~waddr_next[10], waddr_next[9:2]} == raddr_next[10:2]; + f2 = {~waddr[10], waddr[9:2]} == raddr_next[10:2]; + p1 = ((waddr_next[9:2] + 1) & 8'hff) == raddr_next[9:2]; + p2 = ((waddr[9:2] + 1) & 8'hff) == raddr_next[9:2]; + end + 3'h2: begin + f1 = {~waddr_next[9], waddr_next[8:2]} == raddr_next[9:2]; + f2 = {~waddr[9], waddr[8:2]} == raddr_next[9:2]; + p1 = ((waddr_next[8:2] + 1) & 7'h7f) == raddr_next[8:2]; + p2 = ((waddr[8:2] + 1) & 7'h7f) == raddr_next[8:2]; + end + 3'h3: begin + f1 = {~waddr_next[8], waddr_next[7:2]} == raddr_next[8:2]; + f2 = {~waddr[8], waddr[7:2]} == raddr_next[8:2]; + p1 = ((waddr_next[7:2] + 1) & 6'h3f) == raddr_next[7:2]; + p2 = ((waddr[7:2] + 1) & 6'h3f) == raddr_next[7:2]; + end + 3'h4: begin + f1 = {~waddr_next[7], waddr_next[6:2]} == raddr_next[7:2]; + f2 = {~waddr[7], waddr[6:2]} == raddr_next[7:2]; + p1 = ((waddr_next[6:2] + 1) & 5'h1f) == raddr_next[6:2]; + p2 = ((waddr[6:2] + 1) & 5'h1f) == raddr_next[6:2]; + end + 3'h5: begin + f1 = {~waddr_next[6], waddr_next[5:2]} == raddr_next[6:2]; + f2 = {~waddr[6], waddr[5:2]} == raddr_next[6:2]; + p1 = ((waddr_next[5:2] + 1) & 4'hf) == raddr_next[5:2]; + p2 = ((waddr[5:2] + 1) & 4'hf) == raddr_next[5:2]; + end + 3'h6: begin + f1 = {~waddr_next[5], waddr_next[4:2]} == raddr_next[5:2]; + f2 = {~waddr[5], waddr[4:2]} == raddr_next[5:2]; + p1 = ((waddr_next[4:2] + 1) & 3'h7) == raddr_next[4:2]; + p2 = ((waddr[4:2] + 1) & 3'h7) == raddr_next[4:2]; + end + 3'h7: begin + f1 = {~waddr_next[ADDR_WIDTH], waddr_next[ADDR_WIDTH - 1:2]} == raddr_next[ADDR_WIDTH:2]; + f2 = {~waddr[ADDR_WIDTH], waddr[10:2]} == raddr_next[ADDR_WIDTH:2]; + p1 = ((waddr_next[ADDR_WIDTH - 1:2] + 1) & {ADDR_WIDTH - 2 {1'b1}}) == raddr_next[ADDR_WIDTH - 1:2]; + p2 = ((waddr[ADDR_WIDTH - 1:2] + 1) & {ADDR_WIDTH - 2 {1'b1}}) == raddr_next[ADDR_WIDTH - 1:2]; + end + endcase + 2'h1: + case (depth) + 3'h0: begin + f1 = {~waddr_next[11], waddr_next[10:1]} == raddr_next[11:1]; + f2 = {~waddr[11], waddr[10:1]} == raddr_next[11:1]; + p1 = ((waddr_next[10:1] + 1) & 10'h3ff) == raddr_next[10:1]; + p2 = ((waddr[10:1] + 1) & 10'h3ff) == raddr_next[10:1]; + end + 3'h1: begin + f1 = {~waddr_next[10], waddr_next[9:1]} == raddr_next[10:1]; + f2 = {~waddr[10], waddr[9:1]} == raddr_next[10:1]; + p1 = ((waddr_next[9:1] + 1) & 9'h1ff) == raddr_next[9:1]; + p2 = ((waddr[9:1] + 1) & 9'h1ff) == raddr_next[9:1]; + end + 3'h2: begin + f1 = {~waddr_next[9], waddr_next[8:1]} == raddr_next[9:1]; + f2 = {~waddr[9], waddr[8:1]} == raddr_next[9:1]; + p1 = ((waddr_next[8:1] + 1) & 8'hff) == raddr_next[8:1]; + p2 = ((waddr[8:1] + 1) & 8'hff) == raddr_next[8:1]; + end + 3'h3: begin + f1 = {~waddr_next[8], waddr_next[7:1]} == raddr_next[8:1]; + f2 = {~waddr[8], waddr[7:1]} == raddr_next[8:1]; + p1 = ((waddr_next[7:1] + 1) & 7'h7f) == raddr_next[7:1]; + p2 = ((waddr[7:1] + 1) & 7'h7f) == raddr_next[7:1]; + end + 3'h4: begin + f1 = {~waddr_next[7], waddr_next[6:1]} == raddr_next[7:1]; + f2 = {~waddr[7], waddr[6:1]} == raddr_next[7:1]; + p1 = ((waddr_next[6:1] + 1) & 6'h3f) == raddr_next[6:1]; + p2 = ((waddr[6:1] + 1) & 6'h3f) == raddr_next[6:1]; + end + 3'h5: begin + f1 = {~waddr_next[6], waddr_next[5:1]} == raddr_next[6:1]; + f2 = {~waddr[6], waddr[5:1]} == raddr_next[6:1]; + p1 = ((waddr_next[5:1] + 1) & 5'h1f) == raddr_next[5:1]; + p2 = ((waddr[5:1] + 1) & 5'h1f) == raddr_next[5:1]; + end + 3'h6: begin + f1 = {~waddr_next[5], waddr_next[4:1]} == raddr_next[5:1]; + f2 = {~waddr[5], waddr[4:1]} == raddr_next[5:1]; + p1 = ((waddr_next[4:1] + 1) & 4'hf) == raddr_next[4:1]; + p2 = ((waddr[4:1] + 1) & 4'hf) == raddr_next[4:1]; + end + 3'h7: begin + f1 = {~waddr_next[ADDR_WIDTH], waddr_next[ADDR_WIDTH - 1:1]} == raddr_next[ADDR_WIDTH:1]; + f2 = {~waddr[11], waddr[ADDR_WIDTH - 1:1]} == raddr_next[ADDR_WIDTH:1]; + p1 = ((waddr_next[ADDR_WIDTH - 1:1] + 1) & {ADDR_WIDTH - 1 {1'b1}}) == raddr_next[ADDR_WIDTH - 1:1]; + p2 = ((waddr[ADDR_WIDTH - 1:1] + 1) & {ADDR_WIDTH - 1 {1'b1}}) == raddr_next[ADDR_WIDTH - 1:1]; + end + endcase + 2'h2: + case (depth) + 3'h0: begin + f1 = {~waddr_next[11], waddr_next[10:0]} == raddr_next[11:0]; + f2 = {~waddr[11], waddr[10:0]} == raddr_next[11:0]; + p1 = ((waddr_next[10:0] + 1) & 11'h7ff) == raddr_next[10:0]; + p2 = ((waddr[10:0] + 1) & 11'h7ff) == raddr_next[10:0]; + end + 3'h1: begin + f1 = {~waddr_next[10], waddr_next[9:0]} == raddr_next[10:0]; + f2 = {~waddr[10], waddr[9:0]} == raddr_next[10:0]; + p1 = ((waddr_next[9:0] + 1) & 10'h3ff) == raddr_next[9:0]; + p2 = ((waddr[9:0] + 1) & 10'h3ff) == raddr_next[9:0]; + end + 3'h2: begin + f1 = {~waddr_next[9], waddr_next[8:0]} == raddr_next[9:0]; + f2 = {~waddr[9], waddr[8:0]} == raddr_next[9:0]; + p1 = ((waddr_next[8:0] + 1) & 9'h1ff) == raddr_next[8:0]; + p2 = ((waddr[8:0] + 1) & 9'h1ff) == raddr_next[8:0]; + end + 3'h3: begin + f1 = {~waddr_next[8], waddr_next[7:0]} == raddr_next[8:0]; + f2 = {~waddr[8], waddr[7:0]} == raddr_next[8:0]; + p1 = ((waddr_next[7:0] + 1) & 8'hff) == raddr_next[7:0]; + p2 = ((waddr[7:0] + 1) & 8'hff) == raddr_next[7:0]; + end + 3'h4: begin + f1 = {~waddr_next[7], waddr_next[6:0]} == raddr_next[7:0]; + f2 = {~waddr[7], waddr[6:0]} == raddr_next[7:0]; + p1 = ((waddr_next[6:0] + 1) & 7'h7f) == raddr_next[6:0]; + p2 = ((waddr[6:0] + 1) & 7'h7f) == raddr_next[6:0]; + end + 3'h5: begin + f1 = {~waddr_next[6], waddr_next[5:0]} == raddr_next[6:0]; + f2 = {~waddr[6], waddr[5:0]} == raddr_next[6:0]; + p1 = ((waddr_next[5:0] + 1) & 6'h3f) == raddr_next[5:0]; + p2 = ((waddr[5:0] + 1) & 6'h3f) == raddr_next[5:0]; + end + 3'h6: begin + f1 = {~waddr_next[5], waddr_next[4:0]} == raddr_next[5:0]; + f2 = {~waddr[5], waddr[4:0]} == raddr_next[5:0]; + p1 = ((waddr_next[4:0] + 1) & 5'h1f) == raddr_next[4:0]; + p2 = ((waddr[4:0] + 1) & 5'h1f) == raddr_next[4:0]; + end + 3'h7: begin + f1 = {~waddr_next[ADDR_WIDTH], waddr_next[ADDR_WIDTH - 1:0]} == raddr_next[ADDR_WIDTH:0]; + f2 = {~waddr[ADDR_WIDTH], waddr[ADDR_WIDTH - 1:0]} == raddr_next[ADDR_WIDTH:0]; + p1 = ((waddr_next[ADDR_WIDTH - 1:0] + 1) & {ADDR_WIDTH {1'b1}}) == raddr_next[ADDR_WIDTH - 1:0]; + p2 = ((waddr[ADDR_WIDTH - 1:0] + 1) & {ADDR_WIDTH {1'b1}}) == raddr_next[ADDR_WIDTH - 1:0]; + end + endcase + 2'h3: begin + f1 = 1'b0; + f2 = 1'b0; + p1 = 1'b0; + p2 = 1'b0; + end + endcase + end + always @(*) + case (wmode) + 2'h0: gmode = 2'h0; + 2'h1: gmode = (rmode == 2'h0 ? 2'h0 : 2'h1); + 2'h2: gmode = (rmode == 2'h2 ? 2'h2 : rmode); + 2'h3: gmode = 2'h3; + endcase + assign gc8out_next = (waddr_next >> 1) ^ waddr_next; + assign gc16out_next = (waddr_next >> 2) ^ (waddr_next >> 1); + assign gc32out_next = (waddr_next >> 3) ^ (waddr_next >> 2); + always @(*) + if (wen) + case (gmode) + 2'h2: gcout_next = gc8out_next; + 2'h1: gcout_next = {1'b0, gc16out_next}; + 2'h0: gcout_next = {2'b00, gc32out_next}; + default: gcout_next = 12'h000; + endcase + else + gcout_next = 12'h000; + always @(posedge wclk or negedge rst_n) + if (~rst_n) begin + full <= #(1) 1'b0; + fmo <= #(1) 1'b0; + paf <= #(1) 1'b0; + raddr <= #(1) ADDR_WIDTH + 1'h0; + end + else begin + full <= #(1) full_next; + fmo <= #(1) fmo_next; + paf <= #(1) paf_next; + case (gmode) + 0: raddr <= #(1) raddr_next & {{ADDR_WIDTH - 1 {1'b1}}, 2'b00}; + 1: raddr <= #(1) raddr_next & {{ADDR_WIDTH {1'b1}}, 1'b0}; + 2: raddr <= #(1) raddr_next & {ADDR_WIDTH + 1 {1'b1}}; + 3: raddr <= #(1) 12'h000; + endcase + end + assign overflow_next = full & wen; + always @(posedge wclk or negedge rst_n) + if (~rst_n) + overflow <= #(1) 1'b0; + else if (wen == 1'b1) + overflow <= #(1) overflow_next; + always @(posedge wclk or negedge rst_n) + if (~rst_n) begin + waddr <= #(1) {ADDR_WIDTH + 1 {1'b0}}; + gcout_reg <= #(1) {ADDR_WIDTH + 1 {1'b0}}; + end + else if (wen == 1'b1) begin + waddr <= #(1) waddr_next; + gcout_reg <= #(1) gcout_next; + end + assign gcout = gcout_reg; + generate + for (i = 0; i < (ADDR_WIDTH + 1); i = i + 1) begin : genblk1 + assign tmp[i] = ^(gcin >> i); + end + endgenerate + always @(*) + case (gmode) + 2'h0: raddr_next = {tmp[ADDR_WIDTH - 2:0], 2'b00} & {{ADDR_WIDTH - 1 {1'b1}}, 2'b00}; + 2'h1: raddr_next = {tmp[ADDR_WIDTH - 1:0], 1'b0} & {{ADDR_WIDTH {1'b1}}, 1'b0}; + 2'h2: raddr_next = {tmp[ADDR_WIDTH:0]} & {ADDR_WIDTH + 1 {1'b1}}; + default: raddr_next = {ADDR_WIDTH + 1 {1'b0}}; + endcase + assign ff_waddr = waddr[ADDR_WIDTH - 1:0]; + assign pushflags = (rst_n ? {full, fmo, paf, overflow} : 4'b1111); + assign waddr_next = waddr + (wmode == 2'h0 ? 'h4 : (wmode == 2'h1 ? 'h2 : 'h1)); +endmodule +module fifo_pop ( + ren_o, + popflags, + out_raddr, + gcout, + rst_n, + rclk, + ren_in, + rmode, + wmode, + gcin, + depth, + upae +); + parameter ADDR_WIDTH = 11; + parameter FIFO_WIDTH = 3'd2; + output wire ren_o; + output wire [3:0] popflags; + output reg [ADDR_WIDTH - 1:0] out_raddr; + output wire [ADDR_WIDTH:0] gcout; + input rst_n; + input rclk; + input ren_in; + input [1:0] rmode; + input [1:0] wmode; + input [ADDR_WIDTH:0] gcin; + input [ADDR_WIDTH - 1:0] upae; + input [2:0] depth; + reg empty; + reg epo; + reg pae; + reg underflow; + reg e1; + reg e2; + reg o1; + reg o2; + reg q1; + reg q2; + reg [1:0] bwl_sel; + reg [1:0] gmode; + reg [ADDR_WIDTH - 1:0] ff_raddr; + reg [ADDR_WIDTH:0] waddr; + reg [ADDR_WIDTH:0] raddr; + reg [ADDR_WIDTH:0] gcout_reg; + reg [ADDR_WIDTH:0] gcout_next; + reg [ADDR_WIDTH:0] waddr_next; + reg [ADDR_WIDTH - 1:0] pae_thresh; + wire ren_out; + wire empty_next; + wire pae_next; + wire epo_next; + wire [ADDR_WIDTH - 2:0] gc32out_next; + wire [ADDR_WIDTH - 1:0] gc16out_next; + wire [ADDR_WIDTH:0] gc8out_next; + wire [ADDR_WIDTH:0] raddr_next; + wire [ADDR_WIDTH - 1:0] ff_raddr_next; + wire [ADDR_WIDTH:0] tmp; + wire [ADDR_WIDTH:0] next_count; + wire [ADDR_WIDTH:0] count; + reg [ADDR_WIDTH:0] fbytes; + genvar i; + assign next_count = waddr - raddr_next; + assign count = waddr - raddr; + always @(*) + case (depth) + 3'b000: fbytes = 'd2048; + 3'b001: fbytes = 'd1024; + 3'b010: fbytes = 'd512; + 3'b011: fbytes = 'd256; + 3'b100: fbytes = 'd128; + 3'b101: fbytes = 'd64; + 3'b110: fbytes = 'd32; + 3'b111: fbytes = 'd4096; + endcase + always @(*) pae_thresh = (rmode ? (rmode[0] ? upae < 1 : upae) : upae << 2); + assign ren_out = (empty ? 1'b1 : ren_in); + always @(*) + case (rmode) + 2'h0: gmode = 2'h0; + 2'h1: gmode = (wmode == 2'h0 ? 2'h0 : 2'h1); + 2'h2: gmode = (wmode == 2'h2 ? 2'h2 : wmode); + 2'h3: gmode = 2'h3; + endcase + always @(*) begin + e1 = 1'b0; + e2 = 1'b0; + o1 = 1'b0; + o2 = 1'b0; + q1 = next_count < pae_thresh; + q2 = count < pae_thresh; + case (rmode) + 2'h0: begin + e1 = raddr_next[ADDR_WIDTH:2] == waddr_next[ADDR_WIDTH:2]; + e2 = raddr[ADDR_WIDTH:2] == waddr_next[ADDR_WIDTH:2]; + o1 = (raddr_next[ADDR_WIDTH:2] + 1) == waddr_next[ADDR_WIDTH:2]; + o2 = (raddr[ADDR_WIDTH:2] + 1) == waddr_next[ADDR_WIDTH:2]; + end + 2'h1: begin + e1 = raddr_next[ADDR_WIDTH:1] == waddr_next[ADDR_WIDTH:1]; + e2 = raddr[ADDR_WIDTH:1] == waddr_next[ADDR_WIDTH:1]; + o1 = (raddr_next[ADDR_WIDTH:1] + 1) == waddr_next[ADDR_WIDTH:1]; + o2 = (raddr[ADDR_WIDTH:1] + 1) == waddr_next[ADDR_WIDTH:1]; + end + 2'h2: begin + e1 = raddr_next[ADDR_WIDTH:0] == waddr_next[ADDR_WIDTH:0]; + e2 = raddr[ADDR_WIDTH:0] == waddr_next[ADDR_WIDTH:0]; + o1 = (raddr_next[ADDR_WIDTH:0] + 1) == waddr_next[ADDR_WIDTH:0]; + o2 = (raddr[ADDR_WIDTH:0] + 1) == waddr_next[11:0]; + end + 2'h3: begin + e1 = 1'b0; + e2 = 1'b0; + o1 = 1'b0; + o2 = 1'b0; + end + endcase + end + assign empty_next = (ren_in & !empty ? e1 : e2); + assign epo_next = (ren_in & !empty ? o1 : o2); + assign pae_next = (ren_in & !empty ? q1 : q2); + always @(posedge rclk or negedge rst_n) + if (~rst_n) begin + empty <= #(1) 1'b1; + pae <= #(1) 1'b1; + epo <= #(1) 1'b0; + end + else begin + empty <= #(1) empty_next; + pae <= #(1) pae_next; + epo <= #(1) epo_next; + end + assign gc8out_next = (raddr_next >> 1) ^ raddr_next; + assign gc16out_next = (raddr_next >> 2) ^ (raddr_next >> 1); + assign gc32out_next = (raddr_next >> 3) ^ (raddr_next >> 2); + always @(*) + if (ren_in) + case (gmode) + 2'h2: gcout_next = gc8out_next; + 2'h1: gcout_next = {1'b0, gc16out_next}; + 2'h0: gcout_next = {2'b00, gc32out_next}; + default: gcout_next = 'h0; + endcase + else + gcout_next = 'h0; + always @(posedge rclk or negedge rst_n) + if (~rst_n) + waddr <= #(1) 12'h000; + else + waddr <= #(1) waddr_next; + always @(posedge rclk or negedge rst_n) + if (~rst_n) begin + underflow <= #(1) 1'b0; + bwl_sel <= #(1) 2'h0; + gcout_reg <= #(1) 12'h000; + end + else if (ren_in) begin + underflow <= #(1) empty; + if (!empty) begin + bwl_sel <= #(1) raddr_next[1:0]; + gcout_reg <= #(1) gcout_next; + end + end + generate + for (i = 0; i < (ADDR_WIDTH + 1); i = i + 1) begin : genblk1 + assign tmp[i] = ^(gcin >> i); + end + endgenerate + always @(*) + case (gmode) + 2'h0: waddr_next = {tmp[9:0], 2'b00} & 12'hffc; + 2'h1: waddr_next = {tmp[10:0], 1'b0} & 12'hffe; + 2'h2: waddr_next = {tmp[11:0]} & 12'hfff; + default: waddr_next = 12'h000; + endcase + assign ff_raddr_next = ff_raddr + (rmode == 2'h0 ? 'h4 : (rmode == 2'h1 ? 'h2 : 'h1)); + assign raddr_next = raddr + (rmode == 2'h0 ? 'h4 : (rmode == 2'h1 ? 'h2 : 'h1)); + always @(posedge rclk or negedge rst_n) + if (~rst_n) + ff_raddr <= #(1) 1'sb0; + else if (empty & ~empty_next) + ff_raddr <= #(1) raddr_next[10:0]; + else if ((ren_in & !empty) & ~empty_next) + ff_raddr <= #(1) ff_raddr_next; + always @(posedge rclk or negedge rst_n) + if (~rst_n) + raddr <= #(1) 12'h000; + else if (ren_in & !empty) + raddr <= #(1) raddr_next; + always @(*) + case (FIFO_WIDTH) + default: out_raddr = ff_raddr[ADDR_WIDTH - 1:0]; + 2: out_raddr = {ff_raddr[ADDR_WIDTH - 1:1], bwl_sel[0]}; + 4: out_raddr = {ff_raddr[ADDR_WIDTH - 1:2], bwl_sel}; + endcase + assign ren_o = ren_out; + assign gcout = gcout_reg; + assign popflags = {empty, epo, pae, underflow}; +endmodule From 116d804e363ce56f351002accb956405eb1cb5ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 21 Feb 2022 12:44:43 +0100 Subject: [PATCH 667/845] ql-qlf: qlf_k6n10f: add clkbuf_sink attribute to clocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v | 2 ++ ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 4 ++++ ql-qlf-plugin/qlf_k6n10f/sram1024x18.v | 2 ++ ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v | 2 ++ 4 files changed, 10 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v index 185cb96db..e45a4aa9a 100644 --- a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v +++ b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v @@ -59,7 +59,9 @@ module TDP18Kx18_FIFO ( input wire WEN_B; input wire REN_A; input wire REN_B; + (* clkbuf_sink *) input wire CLK_A; + (* clkbuf_sink *) input wire CLK_B; input wire [1:0] BE_A; input wire [1:0] BE_B; diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 9ea74c444..181d7f2e0 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -561,7 +561,9 @@ module TDP_BRAM36 ( input wire WEN_B1; input wire REN_A1; input wire REN_B1; + (* clkbuf_sink *) input wire CLK_A1; + (* clkbuf_sink *) input wire CLK_B1; input wire [1:0] BE_A1; input wire [1:0] BE_B1; @@ -587,7 +589,9 @@ module TDP_BRAM36 ( input wire WEN_B2; input wire REN_A2; input wire REN_B2; + (* clkbuf_sink *) input wire CLK_A2; + (* clkbuf_sink *) input wire CLK_B2; input wire [1:0] BE_A2; input wire [1:0] BE_B2; diff --git a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v index 79e5ae7ad..39747612e 100644 --- a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v +++ b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v @@ -22,6 +22,7 @@ module sram1024x18 ( wdata_b, rdata_b ); + (* clkbuf_sink *) input wire clk_a; input wire cen_a; input wire wen_a; @@ -29,6 +30,7 @@ module sram1024x18 ( input wire [17:0] wmsk_a; input wire [17:0] wdata_a; output reg [17:0] rdata_a; + (* clkbuf_sink *) input wire clk_b; input wire cen_b; input wire wen_b; diff --git a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v index ad26b2286..e1fb11ca0 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v +++ b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v @@ -34,8 +34,10 @@ module fifo_ctl ( input wire [2:0] depth; input wire [1:0] rmode; input wire [1:0] wmode; + (* clkbuf_sink *) input wire rclk; input wire rst_R_n; + (* clkbuf_sink *) input wire wclk; input wire rst_W_n; input wire ren; From bef51bfbfa67131f7c85d07bc67a154373b00727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 21 Feb 2022 12:49:36 +0100 Subject: [PATCH 668/845] ql-qlf: qlf_k6n10f: reintroduce INIT parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 145 +++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 181d7f2e0..c9fc904c6 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -557,6 +557,151 @@ module TDP_BRAM36 ( PL_ADDR_o, PL_DATA_o ); + parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_10 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_11 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_12 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_13 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_14 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_15 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_16 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_17 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_18 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_19 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_20 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_21 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_22 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_23 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_24 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_25 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_26 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_27 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_28 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_29 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_30 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_31 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_32 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_33 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_34 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_35 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_36 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_37 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_38 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_39 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_40 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_41 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_42 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_43 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_44 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_45 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_46 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_47 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_48 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_49 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_50 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_51 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_52 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_53 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_54 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_55 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_56 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_57 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_58 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_59 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_60 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_61 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_62 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_63 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_64 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_65 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_66 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_67 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_68 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_69 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_70 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_71 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_72 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_73 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_74 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_75 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_76 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_77 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_78 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_79 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + input wire WEN_A1; input wire WEN_B1; input wire REN_A1; From 126336fcfa50fe300a7067c8f3799e5720530dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 28 Feb 2022 14:11:31 +0100 Subject: [PATCH 669/845] ql-qlf: qlf_k6n10f: bram: update simulation models MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v | 91 ++-- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 585 +++++++++++----------- ql-qlf-plugin/qlf_k6n10f/sram1024x18.v | 2 +- ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v | 29 +- 4 files changed, 370 insertions(+), 337 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v index e45a4aa9a..bec428bf7 100644 --- a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v +++ b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v @@ -1,4 +1,4 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2022 The SymbiFlow Authors. // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at @@ -6,7 +6,7 @@ // // SPDX-License-Identifier:ISC -module TDP18Kx18_FIFO ( +module TDP18K_FIFO ( RMODE_A, RMODE_B, WMODE_A, @@ -92,10 +92,10 @@ module TDP18Kx18_FIFO ( input PL_WEN; input PL_REN; input PL_CLK; - input [23:0] PL_ADDR; + input [31:0] PL_ADDR; input [17:0] PL_DATA_IN; output reg [17:0] PL_DATA_OUT; - input [8:0] RAM_ID; + input [15:0] RAM_ID; reg [17:0] wmsk_a; reg [17:0] wmsk_b; wire [8:0] addr_a; @@ -111,6 +111,8 @@ module TDP18Kx18_FIFO ( wire [10:0] ff_waddr; wire [13:0] ram_addr_a; wire [13:0] ram_addr_b; + wire [3:0] ram_waddr_a; + wire [3:0] ram_waddr_b; wire preload; wire my_id; wire initn; @@ -133,7 +135,7 @@ module TDP18Kx18_FIFO ( fifo_rmode = (RMODE_B == MODE_9 ? 2'b10 : 2'b01); fifo_wmode = (WMODE_A == MODE_9 ? 2'b10 : 2'b01); end - assign my_id = (PL_ADDR[23:14] == RAM_ID) | PL_INIT; + assign my_id = (PL_ADDR[31:16] == RAM_ID) | PL_INIT; assign preload = (PROTECT ? 1'b0 : my_id & PL_ENA); assign smux_clk_a = (preload ? PL_CLK : CLK_A); assign smux_clk_b = (preload ? 0 : (FMODE ? (SYNC_FIFO ? CLK_A : CLK_B) : CLK_B)); @@ -144,8 +146,10 @@ module TDP18Kx18_FIFO ( assign ram_wen_b = (preload ? 1'b1 : (FMODE ? 1'b0 : WEN_B)); assign cen_b = ram_ren_b | ram_wen_b; assign cen_a = ram_ren_a | ram_wen_a; - assign ram_addr_b = (preload ? {PL_ADDR[9:0], 4'b0000} : (real_fmode ? {ff_raddr[10:0], 3'b000} : {ADDR_B[13:4], addr_b_d[3:0]})); - assign ram_addr_a = (preload ? {PL_ADDR[8:0], 4'b0000} : (real_fmode ? {ff_waddr[10:0], 3'b000} : {ADDR_A[13:4], addr_a_d[3:0]})); + assign ram_waddr_b = (preload ? 4'b0000 : (real_fmode ? {ff_raddr[0], 3'b000} : ADDR_B[3:0])); + assign ram_waddr_a = (preload ? 4'b0000 : (real_fmode ? {ff_waddr[0], 3'b000} : ADDR_A[3:0])); + assign ram_addr_b = (preload ? {PL_ADDR[10:0], 3'h0} : (real_fmode ? {ff_raddr[10:0], 3'h0} : {ADDR_B[13:4], addr_b_d[3:0]})); + assign ram_addr_a = (preload ? {PL_ADDR[10:0], 3'h0} : (real_fmode ? {ff_waddr[10:0], 3'b000} : {ADDR_A[13:4], addr_a_d[3:0]})); always @(posedge CLK_A) addr_a_d[3:0] <= ADDR_A[3:0]; always @(posedge CLK_B) addr_b_d[3:0] <= ADDR_B[3:0]; sram1024x18 uram( @@ -209,35 +213,36 @@ module TDP18Kx18_FIFO ( {wmsk_a[16], wmsk_a[7:0]} = (FMODE ? 9'h000 : (BE_A[0] ? 9'h000 : 9'h1ff)); end MODE_9: begin - aligned_wdata_a = {{2 {WDATA_A[16]}}, {2 {WDATA_A[7:0]}}}; - {wmsk_a[17], wmsk_a[15:8]} = (ram_addr_a[3] ? (FMODE ? 9'h000 : (BE_A[0] ? 9'h000 : 9'h1ff)) : 9'h1ff); - {wmsk_a[16], wmsk_a[7:0]} = (ram_addr_a[3] ? 9'h1ff : (FMODE ? 9'h000 : (BE_A[0] ? 9'h000 : 9'h1ff))); + aligned_wdata_a = {{2 {WDATA_A[8]}}, {2 {WDATA_A[7:0]}}}; + {wmsk_a[17], wmsk_a[15:8]} = (ram_waddr_a[3] ? 9'h000 : 9'h1ff); + {wmsk_a[16], wmsk_a[7:0]} = (ram_waddr_a[3] ? 9'h1ff : 9'h000); end MODE_4: begin aligned_wdata_a = {2'b00, {4 {WDATA_A[3:0]}}}; wmsk_a[17:16] = 2'b11; - wmsk_a[15:12] = (ram_addr_a[3:2] == 2'b11 ? 4'h0 : 4'hf); - wmsk_a[11:8] = (ram_addr_a[3:2] == 2'b10 ? 4'h0 : 4'hf); - wmsk_a[7:4] = (ram_addr_a[3:2] == 2'b01 ? 4'h0 : 4'hf); - wmsk_a[3:0] = (ram_addr_a[3:2] == 2'b00 ? 4'h0 : 4'hf); + wmsk_a[15:12] = (ram_waddr_a[3:2] == 2'b11 ? 4'h0 : 4'hf); + wmsk_a[11:8] = (ram_waddr_a[3:2] == 2'b10 ? 4'h0 : 4'hf); + wmsk_a[7:4] = (ram_waddr_a[3:2] == 2'b01 ? 4'h0 : 4'hf); + wmsk_a[3:0] = (ram_waddr_a[3:2] == 2'b00 ? 4'h0 : 4'hf); end MODE_2: begin aligned_wdata_a = {2'b00, {8 {WDATA_A[1:0]}}}; wmsk_a[17:16] = 2'b11; - wmsk_a[15:14] = (ram_addr_a[3:1] == 3'b111 ? 2'h0 : 2'h3); - wmsk_a[13:12] = (ram_addr_a[3:1] == 3'b110 ? 2'h0 : 2'h3); - wmsk_a[11:10] = (ram_addr_a[3:1] == 3'b101 ? 2'h0 : 2'h3); - wmsk_a[9:8] = (ram_addr_a[3:1] == 3'b100 ? 2'h0 : 2'h3); - wmsk_a[7:6] = (ram_addr_a[3:1] == 3'b011 ? 2'h0 : 2'h3); - wmsk_a[5:4] = (ram_addr_a[3:1] == 3'b010 ? 2'h0 : 2'h3); - wmsk_a[3:2] = (ram_addr_a[3:1] == 3'b001 ? 2'h0 : 2'h3); - wmsk_a[1:0] = (ram_addr_a[3:1] == 3'b000 ? 2'h0 : 2'h3); + wmsk_a[15:14] = (ram_waddr_a[3:1] == 3'b111 ? 2'h0 : 2'h3); + wmsk_a[13:12] = (ram_waddr_a[3:1] == 3'b110 ? 2'h0 : 2'h3); + wmsk_a[11:10] = (ram_waddr_a[3:1] == 3'b101 ? 2'h0 : 2'h3); + wmsk_a[9:8] = (ram_waddr_a[3:1] == 3'b100 ? 2'h0 : 2'h3); + wmsk_a[7:6] = (ram_waddr_a[3:1] == 3'b011 ? 2'h0 : 2'h3); + wmsk_a[5:4] = (ram_waddr_a[3:1] == 3'b010 ? 2'h0 : 2'h3); + wmsk_a[3:2] = (ram_waddr_a[3:1] == 3'b001 ? 2'h0 : 2'h3); + wmsk_a[1:0] = (ram_waddr_a[3:1] == 3'b000 ? 2'h0 : 2'h3); end MODE_1: begin aligned_wdata_a = {2'b00, {16 {WDATA_A[0]}}}; - wmsk_a = 18'h3fffe; - wmsk_a[ram_addr_a[3:0]] = 0; + wmsk_a = 18'h3ffff; + wmsk_a[{1'b0, ram_waddr_a[3:0]}] = 0; end + default: wmsk_a = 18'h3ffff; endcase end else begin @@ -252,35 +257,36 @@ module TDP18Kx18_FIFO ( {wmsk_b[16], wmsk_b[7:0]} = (BE_B[0] ? 9'h000 : 9'h1ff); end MODE_9: begin - aligned_wdata_b = {{2 {WDATA_B[16]}}, {2 {WDATA_B[7:0]}}}; - {wmsk_b[17], wmsk_b[15:8]} = (ram_addr_b[3] ? (BE_B[0] ? 9'h000 : 9'h1ff) : 9'h1ff); - {wmsk_b[16], wmsk_b[7:0]} = (ram_addr_b[3] ? 9'h1ff : (BE_B[0] ? 9'h000 : 9'h1ff)); + aligned_wdata_b = {{2 {WDATA_B[8]}}, {2 {WDATA_B[7:0]}}}; + {wmsk_b[17], wmsk_b[15:8]} = (ram_waddr_b[3] ? 9'h000 : 9'h1ff); + {wmsk_b[16], wmsk_b[7:0]} = (ram_waddr_b[3] ? 9'h1ff : 9'h000); end MODE_4: begin aligned_wdata_b = {2'b00, {4 {WDATA_B[3:0]}}}; wmsk_b[17:16] = 2'b11; - wmsk_b[15:12] = (ram_addr_b[3:2] == 2'b11 ? 4'h0 : 4'hf); - wmsk_b[11:8] = (ram_addr_b[3:2] == 2'b10 ? 4'h0 : 4'hf); - wmsk_b[7:4] = (ram_addr_b[3:2] == 2'b01 ? 4'h0 : 4'hf); - wmsk_b[3:0] = (ram_addr_b[3:2] == 2'b00 ? 4'h0 : 4'hf); + wmsk_b[15:12] = (ram_waddr_b[3:2] == 2'b11 ? 4'h0 : 4'hf); + wmsk_b[11:8] = (ram_waddr_b[3:2] == 2'b10 ? 4'h0 : 4'hf); + wmsk_b[7:4] = (ram_waddr_b[3:2] == 2'b01 ? 4'h0 : 4'hf); + wmsk_b[3:0] = (ram_waddr_b[3:2] == 2'b00 ? 4'h0 : 4'hf); end MODE_2: begin aligned_wdata_b = {2'b00, {8 {WDATA_B[1:0]}}}; wmsk_b[17:16] = 2'b11; - wmsk_b[15:14] = (ram_addr_b[3:1] == 3'b111 ? 2'h0 : 2'h3); - wmsk_b[13:12] = (ram_addr_b[3:1] == 3'b110 ? 2'h0 : 2'h3); - wmsk_b[11:10] = (ram_addr_b[3:1] == 3'b101 ? 2'h0 : 2'h3); - wmsk_b[9:8] = (ram_addr_b[3:1] == 3'b100 ? 2'h0 : 2'h3); - wmsk_b[7:6] = (ram_addr_b[3:1] == 3'b011 ? 2'h0 : 2'h3); - wmsk_b[5:4] = (ram_addr_b[3:1] == 3'b010 ? 2'h0 : 2'h3); - wmsk_b[3:2] = (ram_addr_b[3:1] == 3'b001 ? 2'h0 : 2'h3); - wmsk_b[1:0] = (ram_addr_b[3:1] == 3'b000 ? 2'h0 : 2'h3); + wmsk_b[15:14] = (ram_waddr_b[3:1] == 3'b111 ? 2'h0 : 2'h3); + wmsk_b[13:12] = (ram_waddr_b[3:1] == 3'b110 ? 2'h0 : 2'h3); + wmsk_b[11:10] = (ram_waddr_b[3:1] == 3'b101 ? 2'h0 : 2'h3); + wmsk_b[9:8] = (ram_waddr_b[3:1] == 3'b100 ? 2'h0 : 2'h3); + wmsk_b[7:6] = (ram_waddr_b[3:1] == 3'b011 ? 2'h0 : 2'h3); + wmsk_b[5:4] = (ram_waddr_b[3:1] == 3'b010 ? 2'h0 : 2'h3); + wmsk_b[3:2] = (ram_waddr_b[3:1] == 3'b001 ? 2'h0 : 2'h3); + wmsk_b[1:0] = (ram_waddr_b[3:1] == 3'b000 ? 2'h0 : 2'h3); end MODE_1: begin aligned_wdata_b = {2'b00, {16 {WDATA_B[0]}}}; - wmsk_b = 18'h3fffe; - wmsk_b[ram_addr_b[3:0]] = 0; + wmsk_b = 18'h3ffff; + wmsk_b[{1'b0, ram_waddr_b[3:0]}] = 0; end + default: wmsk_b = 18'h3ffff; endcase else begin aligned_wdata_b = 18'b000000000000000000; @@ -329,8 +335,7 @@ module TDP18Kx18_FIFO ( MODE_18: RDATA_B = ram_rdata_b; MODE_9: begin RDATA_B[17:9] = 1'sb1; - RDATA_B[8] = (ram_addr_b[3] ? ram_rdata_b[17] : ram_rdata_b[16]); - RDATA_B[7:0] = (ram_addr_b[3] ? ram_rdata_b[15:8] : ram_rdata_b[7:0]); + RDATA_B[8:0] = (ram_addr_b[3] ? {ram_rdata_b[17], ram_rdata_b[15:8]} : {ram_rdata_b[16], ram_rdata_b[7:0]}); end MODE_4: case (ram_addr_b[3:2]) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index c9fc904c6..b7a2c56bc 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -488,59 +488,59 @@ module TDP_BRAM18 ( endmodule module TDP_BRAM36 ( - WEN_A1, - WEN_B1, - REN_A1, - REN_B1, - CLK_A1, - CLK_B1, - BE_A1, - BE_B1, - ADDR_A1, - ADDR_B1, - WDATA_A1, - WDATA_B1, - RDATA_A1, - RDATA_B1, - FLUSH1, - SYNC_FIFO1, - RMODE_A1, - RMODE_B1, - WMODE_A1, - WMODE_B1, - FMODE1, - POWERDN1, - SLEEP1, - PROTECT1, - UPAE1, - UPAF1, - WEN_A2, - WEN_B2, - REN_A2, - REN_B2, - CLK_A2, - CLK_B2, - BE_A2, - BE_B2, - ADDR_A2, - ADDR_B2, - WDATA_A2, - WDATA_B2, - RDATA_A2, - RDATA_B2, - FLUSH2, - SYNC_FIFO2, - RMODE_A2, - RMODE_B2, - WMODE_A2, - WMODE_B2, - FMODE2, - POWERDN2, - SLEEP2, - PROTECT2, - UPAE2, - UPAF2, - SPLIT, + WEN_A1_i, + WEN_B1_i, + REN_A1_i, + REN_B1_i, + CLK_A1_i, + CLK_B1_i, + BE_A1_i, + BE_B1_i, + ADDR_A1_i, + ADDR_B1_i, + WDATA_A1_i, + WDATA_B1_i, + RDATA_A1_o, + RDATA_B1_o, + FLUSH1_i, + SYNC_FIFO1_i, + RMODE_A1_i, + RMODE_B1_i, + WMODE_A1_i, + WMODE_B1_i, + FMODE1_i, + POWERDN1_i, + SLEEP1_i, + PROTECT1_i, + UPAE1_i, + UPAF1_i, + WEN_A2_i, + WEN_B2_i, + REN_A2_i, + REN_B2_i, + CLK_A2_i, + CLK_B2_i, + BE_A2_i, + BE_B2_i, + ADDR_A2_i, + ADDR_B2_i, + WDATA_A2_i, + WDATA_B2_i, + RDATA_A2_o, + RDATA_B2_o, + FLUSH2_i, + SYNC_FIFO2_i, + RMODE_A2_i, + RMODE_B2_i, + WMODE_A2_i, + WMODE_B2_i, + FMODE2_i, + POWERDN2_i, + SLEEP2_i, + PROTECT2_i, + UPAE2_i, + UPAF2_i, + SPLIT_i, RAM_ID_i, PL_INIT_i, PL_ENA_i, @@ -702,78 +702,78 @@ module TDP_BRAM36 ( parameter INIT_7E = 256'h0000000000000000000000000000000000000000000000000000000000000000; parameter INIT_7F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - input wire WEN_A1; - input wire WEN_B1; - input wire REN_A1; - input wire REN_B1; + input wire WEN_A1_i; + input wire WEN_B1_i; + input wire REN_A1_i; + input wire REN_B1_i; (* clkbuf_sink *) - input wire CLK_A1; + input wire CLK_A1_i; (* clkbuf_sink *) - input wire CLK_B1; - input wire [1:0] BE_A1; - input wire [1:0] BE_B1; - input wire [14:0] ADDR_A1; - input wire [14:0] ADDR_B1; - input wire [17:0] WDATA_A1; - input wire [17:0] WDATA_B1; - output reg [17:0] RDATA_A1; - output reg [17:0] RDATA_B1; - input wire FLUSH1; - input wire SYNC_FIFO1; - input wire [2:0] RMODE_A1; - input wire [2:0] RMODE_B1; - input wire [2:0] WMODE_A1; - input wire [2:0] WMODE_B1; - input wire FMODE1; - input wire POWERDN1; - input wire SLEEP1; - input wire PROTECT1; - input wire [10:0] UPAE1; - input wire [10:0] UPAF1; - input wire WEN_A2; - input wire WEN_B2; - input wire REN_A2; - input wire REN_B2; + input wire CLK_B1_i; + input wire [1:0] BE_A1_i; + input wire [1:0] BE_B1_i; + input wire [14:0] ADDR_A1_i; + input wire [14:0] ADDR_B1_i; + input wire [17:0] WDATA_A1_i; + input wire [17:0] WDATA_B1_i; + output reg [17:0] RDATA_A1_o; + output reg [17:0] RDATA_B1_o; + input wire FLUSH1_i; + input wire SYNC_FIFO1_i; + input wire [2:0] RMODE_A1_i; + input wire [2:0] RMODE_B1_i; + input wire [2:0] WMODE_A1_i; + input wire [2:0] WMODE_B1_i; + input wire FMODE1_i; + input wire POWERDN1_i; + input wire SLEEP1_i; + input wire PROTECT1_i; + input wire [11:0] UPAE1_i; + input wire [11:0] UPAF1_i; + input wire WEN_A2_i; + input wire WEN_B2_i; + input wire REN_A2_i; + input wire REN_B2_i; (* clkbuf_sink *) - input wire CLK_A2; + input wire CLK_A2_i; (* clkbuf_sink *) - input wire CLK_B2; - input wire [1:0] BE_A2; - input wire [1:0] BE_B2; - input wire [13:0] ADDR_A2; - input wire [13:0] ADDR_B2; - input wire [17:0] WDATA_A2; - input wire [17:0] WDATA_B2; - output reg [17:0] RDATA_A2; - output reg [17:0] RDATA_B2; - input wire FLUSH2; - input wire SYNC_FIFO2; - input wire [2:0] RMODE_A2; - input wire [2:0] RMODE_B2; - input wire [2:0] WMODE_A2; - input wire [2:0] WMODE_B2; - input wire FMODE2; - input wire POWERDN2; - input wire SLEEP2; - input wire PROTECT2; - input wire [10:0] UPAE2; - input wire [10:0] UPAF2; - input SPLIT; - input [8:0] RAM_ID_i; + input wire CLK_B2_i; + input wire [1:0] BE_A2_i; + input wire [1:0] BE_B2_i; + input wire [13:0] ADDR_A2_i; + input wire [13:0] ADDR_B2_i; + input wire [17:0] WDATA_A2_i; + input wire [17:0] WDATA_B2_i; + output reg [17:0] RDATA_A2_o; + output reg [17:0] RDATA_B2_o; + input wire FLUSH2_i; + input wire SYNC_FIFO2_i; + input wire [2:0] RMODE_A2_i; + input wire [2:0] RMODE_B2_i; + input wire [2:0] WMODE_A2_i; + input wire [2:0] WMODE_B2_i; + input wire FMODE2_i; + input wire POWERDN2_i; + input wire SLEEP2_i; + input wire PROTECT2_i; + input wire [10:0] UPAE2_i; + input wire [10:0] UPAF2_i; + input SPLIT_i; + input [15:0] RAM_ID_i; input wire PL_INIT_i; input wire PL_ENA_i; input wire PL_REN_i; input wire PL_CLK_i; input wire [1:0] PL_WEN_i; - input wire [23:0] PL_ADDR_i; + input wire [31:0] PL_ADDR_i; input wire [35:0] PL_DATA_i; output reg PL_INIT_o; output reg PL_ENA_o; output reg PL_REN_o; output reg PL_CLK_o; output reg [1:0] PL_WEN_o; - output reg [23:0] PL_ADDR_o; - output wire [35:0] PL_DATA_o; + output reg [31:0] PL_ADDR_o; + output reg [35:0] PL_DATA_o; wire EMPTY2; wire EPO2; wire EWM2; @@ -845,162 +845,176 @@ module TDP_BRAM36 ( reg [1:0] fifo_rmode; reg [1:0] fifo_wmode; wire [1:0] bwl; - assign ram_fmode1 = FMODE1 & SPLIT; - assign ram_fmode2 = FMODE2 & SPLIT; - assign smux_clk_a1 = CLK_A1; - assign smux_clk_b1 = (FMODE1 ? (SYNC_FIFO1 ? CLK_A1 : CLK_B1) : CLK_B1); - assign smux_clk_a2 = (SPLIT ? CLK_A2 : CLK_A1); - assign smux_clk_b2 = (SPLIT ? CLK_B2 : (FMODE1 ? (SYNC_FIFO1 ? CLK_A1 : CLK_B1) : CLK_B1)); - assign ram_ren_a1 = (SPLIT ? REN_A1 : (FMODE1 ? 0 : REN_A1)); - assign ram_ren_a2 = (SPLIT ? REN_A2 : (FMODE1 ? 0 : REN_A1)); - assign ram_ren_b1 = (SPLIT ? REN_B1 : (FMODE1 ? ren_o : REN_B1)); - assign ram_ren_b2 = (SPLIT ? REN_B2 : (FMODE1 ? ren_o : REN_B1)); - assign ram_wen_a1 = (SPLIT ? WEN_A1 : (FMODE1 ? ~FULL3 & WEN_A1 : WEN_A1 & ~ADDR_A1[4])); - assign ram_wen_a2 = (SPLIT ? WEN_A2 : (FMODE1 ? ~FULL3 & WEN_A1 : WEN_A1 & ADDR_A1[4])); + wire [17:0] pl_dout0; + wire [17:0] pl_dout1; + assign ram_fmode1 = FMODE1_i & SPLIT_i; + assign ram_fmode2 = FMODE2_i & SPLIT_i; + assign smux_clk_a1 = CLK_A1_i; + assign smux_clk_b1 = (FMODE1_i ? (SYNC_FIFO1_i ? CLK_A1_i : CLK_B1_i) : CLK_B1_i); + assign smux_clk_a2 = (SPLIT_i ? CLK_A2_i : CLK_A1_i); + assign smux_clk_b2 = (SPLIT_i ? CLK_B2_i : (FMODE1_i ? (SYNC_FIFO1_i ? CLK_A1_i : CLK_B1_i) : CLK_B1_i)); + assign ram_ren_a1 = (SPLIT_i ? REN_A1_i : (FMODE1_i ? 0 : REN_A1_i)); + assign ram_ren_a2 = (SPLIT_i ? REN_A2_i : (FMODE1_i ? 0 : REN_A1_i)); + assign ram_ren_b1 = (SPLIT_i ? REN_B1_i : (FMODE1_i ? ren_o : REN_B1_i)); + assign ram_ren_b2 = (SPLIT_i ? REN_B2_i : (FMODE1_i ? ren_o : REN_B1_i)); localparam MODE_36 = 3'b111; - assign ram_wen_b1 = (SPLIT ? WEN_B1 : (WMODE_B1 == MODE_36 ? WEN_B1 : WEN_B1 & ~ADDR_B1[4])); - assign ram_wen_b2 = (SPLIT ? WEN_B2 : (WMODE_B1 == MODE_36 ? WEN_B1 : WEN_B1 & ADDR_B1[4])); - assign ram_addr_a1 = (SPLIT ? ADDR_A1[13:0] : (FMODE1 ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1[14:5], ADDR_A1[3:0]})); - assign ram_addr_b1 = (SPLIT ? ADDR_B1[13:0] : (FMODE1 ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1[14:5], ADDR_B1[3:0]})); - assign ram_addr_a2 = (SPLIT ? ADDR_A2[13:0] : (FMODE1 ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1[14:5], ADDR_A1[3:0]})); - assign ram_addr_b2 = (SPLIT ? ADDR_B2[13:0] : (FMODE1 ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1[14:5], ADDR_B1[3:0]})); - assign bwl = (SPLIT ? ADDR_A1[4:3] : (FMODE1 ? ff_waddr[1:0] : ADDR_A1[4:3])); + assign ram_wen_a1 = (SPLIT_i ? WEN_A1_i : (FMODE1_i ? ~FULL3 & WEN_A1_i : (WMODE_A1_i == MODE_36 ? WEN_A1_i : WEN_A1_i & ~ADDR_A1_i[4]))); + assign ram_wen_a2 = (SPLIT_i ? WEN_A2_i : (FMODE1_i ? ~FULL3 & WEN_A1_i : (WMODE_A1_i == MODE_36 ? WEN_A1_i : WEN_A1_i & ADDR_A1_i[4]))); + assign ram_wen_b1 = (SPLIT_i ? WEN_B1_i : (WMODE_B1_i == MODE_36 ? WEN_B1_i : WEN_B1_i & ~ADDR_B1_i[4])); + assign ram_wen_b2 = (SPLIT_i ? WEN_B2_i : (WMODE_B1_i == MODE_36 ? WEN_B1_i : WEN_B1_i & ADDR_B1_i[4])); + assign ram_addr_a1 = (SPLIT_i ? ADDR_A1_i[13:0] : (FMODE1_i ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1_i[14:5], ADDR_A1_i[3:0]})); + assign ram_addr_b1 = (SPLIT_i ? ADDR_B1_i[13:0] : (FMODE1_i ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1_i[14:5], ADDR_B1_i[3:0]})); + assign ram_addr_a2 = (SPLIT_i ? ADDR_A2_i[13:0] : (FMODE1_i ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1_i[14:5], ADDR_A1_i[3:0]})); + assign ram_addr_b2 = (SPLIT_i ? ADDR_B2_i[13:0] : (FMODE1_i ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1_i[14:5], ADDR_B1_i[3:0]})); + assign bwl = (SPLIT_i ? ADDR_A1_i[4:3] : (FMODE1_i ? ff_waddr[1:0] : ADDR_A1_i[4:3])); localparam MODE_18 = 3'b110; localparam MODE_9 = 3'b101; always @(*) begin : WDATA_SEL - case (SPLIT) + case (SPLIT_i) 1: begin - ram_wdata_a1 = WDATA_A1; - ram_wdata_a2 = WDATA_A2; - ram_wdata_b1 = WDATA_B1; - ram_wdata_b2 = WDATA_B2; - ram_be_a2 = BE_A2; - ram_be_b2 = BE_B2; - ram_be_a1 = BE_A1; - ram_be_b1 = BE_B1; + ram_wdata_a1 = WDATA_A1_i; + ram_wdata_a2 = WDATA_A2_i; + ram_wdata_b1 = WDATA_B1_i; + ram_wdata_b2 = WDATA_B2_i; + ram_be_a2 = BE_A2_i; + ram_be_b2 = BE_B2_i; + ram_be_a1 = BE_A1_i; + ram_be_b1 = BE_B1_i; end 0: begin - case (WMODE_A1) + case (WMODE_A1_i) MODE_36: begin - ram_wdata_a1 = {WDATA_A2[15:14], WDATA_A1[15:0]}; - ram_wdata_a2 = {WDATA_A2[17:16], WDATA_A2[13:0], WDATA_A1[17:16]}; - ram_be_a2 = (FMODE1 ? 2'b11 : BE_A2); - ram_be_a1 = (FMODE1 ? 2'b11 : BE_A1); + ram_wdata_a1 = {WDATA_A2_i[15:14], WDATA_A1_i[15:0]}; + ram_wdata_a2 = {WDATA_A2_i[17:16], WDATA_A2_i[13:0], WDATA_A1_i[17:16]}; + ram_be_a2 = (FMODE1_i ? 2'b11 : BE_A2_i); + ram_be_a1 = (FMODE1_i ? 2'b11 : BE_A1_i); end MODE_18: begin - ram_wdata_a1 = WDATA_A1; - ram_wdata_a2 = WDATA_A1; - ram_be_a1 = (FMODE1 ? (ff_waddr[1] ? 2'b00 : 2'b11) : BE_A1); - ram_be_a2 = (FMODE1 ? (ff_waddr[1] ? 2'b11 : 2'b00) : BE_A1); + ram_wdata_a1 = WDATA_A1_i; + ram_wdata_a2 = WDATA_A1_i; + ram_be_a1 = (FMODE1_i ? (ff_waddr[1] ? 2'b00 : 2'b11) : BE_A1_i); + ram_be_a2 = (FMODE1_i ? (ff_waddr[1] ? 2'b11 : 2'b00) : BE_A1_i); end MODE_9: case (bwl) 0: begin - {ram_wdata_a1[16], ram_wdata_a1[7:0]} = WDATA_A1[8:0]; - {ram_wdata_a1[17], ram_wdata_a1[15:8]} = 9'b000000000; - {ram_wdata_a2[16], ram_wdata_a2[7:0]} = 9'b000000000; - {ram_wdata_a2[17], ram_wdata_a2[15:8]} = 9'b000000000; - ram_be_a1[0] = (FMODE1 ? (ff_waddr[1:0] == 0 ? 1'b1 : 1'b0) : 1'b1); - ram_be_a1[1] = (FMODE1 ? (ff_waddr[1:0] == 1 ? 1'b1 : 1'b0) : 1'b0); - ram_be_a2[0] = (FMODE1 ? (ff_waddr[1:0] == 2 ? 1'b1 : 1'b0) : 1'b0); - ram_be_a2[1] = (FMODE1 ? (ff_waddr[1:0] == 3 ? 1'b1 : 1'b0) : 1'b0); + ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); + ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); + ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_be_a1[0] = (FMODE1_i ? (ff_waddr[1:0] == 0 ? 1'b1 : 1'b0) : 1'b1); + ram_be_a1[1] = (FMODE1_i ? (ff_waddr[1:0] == 1 ? 1'b1 : 1'b0) : 1'b0); + ram_be_a2[0] = (FMODE1_i ? (ff_waddr[1:0] == 2 ? 1'b1 : 1'b0) : 1'b0); + ram_be_a2[1] = (FMODE1_i ? (ff_waddr[1:0] == 3 ? 1'b1 : 1'b0) : 1'b0); end 1: begin - {ram_wdata_a1[16], ram_wdata_a1[7:0]} = 9'b000000000; - {ram_wdata_a1[17], ram_wdata_a1[15:8]} = {WDATA_A1[8:0]}; - {ram_wdata_a2[16], ram_wdata_a2[7:0]} = 9'b000000000; - {ram_wdata_a2[17], ram_wdata_a2[15:8]} = 9'b000000000; + ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); + ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); + ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); {ram_be_a2, ram_be_a1} = 4'b0010; end 2: begin - {ram_wdata_a1[16], ram_wdata_a1[7:0]} = 9'b000000000; - {ram_wdata_a1[17], ram_wdata_a1[15:8]} = 9'b000000000; - {ram_wdata_a2[16], ram_wdata_a2[7:0]} = {WDATA_A1[8:0]}; - {ram_wdata_a2[17], ram_wdata_a2[15:8]} = 9'b000000000; + ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); + ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); + ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); {ram_be_a2, ram_be_a1} = 4'b0100; end 3: begin - {ram_wdata_a1[16], ram_wdata_a1[7:0]} = 9'b000000000; - {ram_wdata_a1[17], ram_wdata_a1[15:8]} = 9'b000000000; - {ram_wdata_a2[16], ram_wdata_a2[7:0]} = 9'b000000000; - {ram_wdata_a2[17], ram_wdata_a2[15:8]} = {WDATA_A1[8:0]}; + ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); + ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); + ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); {ram_be_a2, ram_be_a1} = 4'b1000; end endcase + default: begin + ram_wdata_a1 = WDATA_A1_i; + ram_wdata_a2 = WDATA_A1_i; + ram_be_a2 = (FMODE1_i ? 2'b11 : BE_A1_i); + ram_be_a1 = (FMODE1_i ? 2'b11 : BE_A1_i); + end endcase - case (WMODE_B1) + case (WMODE_B1_i) MODE_36: begin - ram_wdata_b1 = (FMODE1 ? 18'b000000000000000000 : {WDATA_B2[15:14], WDATA_B1[15:0]}); - ram_wdata_b2 = (FMODE1 ? 18'b000000000000000000 : {WDATA_B2[17:16], WDATA_B2[13:0], WDATA_B1[17:16]}); - ram_be_b2 = BE_B2; - ram_be_b1 = BE_B1; + ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : {WDATA_B2_i[15:14], WDATA_B1_i[15:0]}); + ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : {WDATA_B2_i[17:16], WDATA_B2_i[13:0], WDATA_B1_i[17:16]}); + ram_be_b2 = BE_B2_i; + ram_be_b1 = BE_B1_i; end MODE_18: begin - ram_wdata_b1 = (FMODE1 ? 18'b000000000000000000 : WDATA_B1); - ram_wdata_b2 = (FMODE1 ? 18'b000000000000000000 : WDATA_B1); - ram_be_b1 = BE_B1; - ram_be_b2 = BE_B1; + ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); + ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); + ram_be_b1 = BE_B1_i; + ram_be_b2 = BE_B1_i; end MODE_9: - case (ram_addr_b1[4:3]) + case (ADDR_B1_i[4:3]) 0: begin - {ram_wdata_b1[16], ram_wdata_b1[7:0]} = {ram_wdata_b1[16], ram_wdata_b1[7:0]}; - {ram_wdata_b1[17], ram_wdata_b1[15:8]} = 9'b000000000; - {ram_wdata_b2[16], ram_wdata_b2[7:0]} = 9'b000000000; - {ram_wdata_b2[17], ram_wdata_b2[15:8]} = 9'b000000000; + ram_wdata_b1[8:0] = WDATA_B1_i[8:0]; + ram_wdata_b1[17:9] = 9'b000000000; + ram_wdata_b2[8:0] = 9'b000000000; + ram_wdata_b2[17:9] = 9'b000000000; {ram_be_b2, ram_be_b1} = 4'b0001; end 1: begin - {ram_wdata_b1[16], ram_wdata_b1[7:0]} = 9'b000000000; - {ram_wdata_b1[17], ram_wdata_b1[15:8]} = {ram_wdata_b1[16], ram_wdata_b1[7:0]}; - {ram_wdata_b2[16], ram_wdata_b2[7:0]} = 9'b000000000; - {ram_wdata_b2[17], ram_wdata_b2[15:8]} = 9'b000000000; + ram_wdata_b1[8:0] = WDATA_B1_i[8:0]; + ram_wdata_b1[17:9] = 9'b000000000; + ram_wdata_b2[8:0] = 9'b000000000; + ram_wdata_b2[17:9] = 9'b000000000; {ram_be_b2, ram_be_b1} = 4'b0010; end 2: begin - {ram_wdata_b1[16], ram_wdata_b1[7:0]} = 9'b000000000; - {ram_wdata_b1[17], ram_wdata_b1[15:8]} = 9'b000000000; - {ram_wdata_b2[16], ram_wdata_b2[7:0]} = {ram_wdata_b1[16], ram_wdata_b1[7:0]}; - {ram_wdata_b2[17], ram_wdata_b2[15:8]} = 9'b000000000; + ram_wdata_b1[8:0] = 9'b000000000; + ram_wdata_b1[17:9] = 9'b000000000; + ram_wdata_b2[8:0] = WDATA_B1_i[8:0]; + ram_wdata_b2[17:9] = 9'b000000000; {ram_be_b2, ram_be_b1} = 4'b0100; end 3: begin - {ram_wdata_b1[16], ram_wdata_b1[7:0]} = 9'b000000000; - {ram_wdata_b1[17], ram_wdata_b1[15:8]} = 9'b000000000; - {ram_wdata_b2[16], ram_wdata_b2[7:0]} = 9'b000000000; - {ram_wdata_b2[17], ram_wdata_b2[15:8]} = {ram_wdata_b1[16], ram_wdata_b1[7:0]}; + ram_wdata_b1[8:0] = 9'b000000000; + ram_wdata_b1[17:9] = 9'b000000000; + ram_wdata_b2[8:0] = WDATA_B1_i[8:0]; + ram_wdata_b2[17:9] = 9'b000000000; {ram_be_b2, ram_be_b1} = 4'b1000; end endcase + default: begin + ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); + ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); + ram_be_b2 = BE_B1_i; + ram_be_b1 = BE_B1_i; + end endcase end endcase end always @(*) - case (SPLIT) + case (SPLIT_i) 0: begin - ram_rmode_a1 = (RMODE_A1 == MODE_36 ? MODE_18 : RMODE_A1); - ram_rmode_a2 = (RMODE_A1 == MODE_36 ? MODE_18 : RMODE_A1); - ram_wmode_a1 = (WMODE_A1 == MODE_36 ? MODE_18 : (FMODE1 ? MODE_18 : WMODE_A1)); - ram_wmode_a2 = (WMODE_A1 == MODE_36 ? MODE_18 : (FMODE1 ? MODE_18 : WMODE_A1)); - ram_rmode_b1 = (RMODE_B1 == MODE_36 ? MODE_18 : (FMODE1 ? MODE_18 : RMODE_B1)); - ram_rmode_b2 = (RMODE_B1 == MODE_36 ? MODE_18 : (FMODE1 ? MODE_18 : RMODE_B1)); - ram_wmode_b1 = (WMODE_B1 == MODE_36 ? MODE_18 : WMODE_B1); - ram_wmode_b2 = (WMODE_B1 == MODE_36 ? MODE_18 : RMODE_B1); + ram_rmode_a1 = (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); + ram_rmode_a2 = (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); + ram_wmode_a1 = (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); + ram_wmode_a2 = (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); + ram_rmode_b1 = (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); + ram_rmode_b2 = (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); + ram_wmode_b1 = (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); + ram_wmode_b2 = (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); end 1: begin - ram_rmode_a1 = (RMODE_A1 == MODE_36 ? MODE_18 : RMODE_A1); - ram_rmode_a2 = (RMODE_A2 == MODE_36 ? MODE_18 : RMODE_A2); - ram_wmode_a1 = (WMODE_A1 == MODE_36 ? MODE_18 : WMODE_A1); - ram_wmode_a2 = (WMODE_A2 == MODE_36 ? MODE_18 : WMODE_A2); - ram_rmode_b1 = (RMODE_B1 == MODE_36 ? MODE_18 : RMODE_B1); - ram_rmode_b2 = (RMODE_B2 == MODE_36 ? MODE_18 : RMODE_B2); - ram_wmode_b1 = (WMODE_B1 == MODE_36 ? MODE_18 : WMODE_B1); - ram_wmode_b2 = (WMODE_B2 == MODE_36 ? MODE_18 : WMODE_B2); + ram_rmode_a1 = (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); + ram_rmode_a2 = (RMODE_A2_i == MODE_36 ? MODE_18 : RMODE_A2_i); + ram_wmode_a1 = (WMODE_A1_i == MODE_36 ? MODE_18 : WMODE_A1_i); + ram_wmode_a2 = (WMODE_A2_i == MODE_36 ? MODE_18 : WMODE_A2_i); + ram_rmode_b1 = (RMODE_B1_i == MODE_36 ? MODE_18 : RMODE_B1_i); + ram_rmode_b2 = (RMODE_B2_i == MODE_36 ? MODE_18 : RMODE_B2_i); + ram_wmode_b1 = (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); + ram_wmode_b2 = (WMODE_B2_i == MODE_36 ? MODE_18 : WMODE_B2_i); end endcase always @(*) begin : FIFO_READ_SEL - case (RMODE_B1) + case (RMODE_B1_i) MODE_36: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; MODE_18: fifo_rdata = (ff_raddr[1] ? {18'b000000000000000000, ram_rdata_b2} : {18'b000000000000000000, ram_rdata_b1}); MODE_9: @@ -1010,96 +1024,105 @@ module TDP_BRAM36 ( 2: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[16], ram_rdata_b2[7:0]}; 3: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[17], ram_rdata_b2[15:8]}; endcase + default: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; endcase end localparam MODE_1 = 3'b001; localparam MODE_2 = 3'b010; localparam MODE_4 = 3'b100; always @(*) begin : RDATA_SEL - case (SPLIT) + case (SPLIT_i) 1: begin - RDATA_A1 = (FMODE1 ? {10'b0000000000, EMPTY1, EPO1, EWM1, UNDERRUN1, FULL1, FMO1, FWM1, OVERRUN1} : ram_rdata_a1); - RDATA_B1 = ram_rdata_b1; - RDATA_A2 = (FMODE2 ? {10'b0000000000, EMPTY2, EPO2, EWM2, UNDERRUN2, FULL2, FMO2, FWM2, OVERRUN2} : ram_rdata_a2); - RDATA_B2 = ram_rdata_b2; + RDATA_A1_o = (FMODE1_i ? {10'b0000000000, EMPTY1, EPO1, EWM1, UNDERRUN1, FULL1, FMO1, FWM1, OVERRUN1} : ram_rdata_a1); + RDATA_B1_o = ram_rdata_b1; + RDATA_A2_o = (FMODE2_i ? {10'b0000000000, EMPTY2, EPO2, EWM2, UNDERRUN2, FULL2, FMO2, FWM2, OVERRUN2} : ram_rdata_a2); + RDATA_B2_o = ram_rdata_b2; end 0: begin - if (FMODE1) begin - RDATA_A1 = {10'b0000000000, EMPTY3, EPO3, EWM3, UNDERRUN3, FULL3, FMO3, FWM3, OVERRUN3}; - RDATA_A2 = 18'b000000000000000000; + if (FMODE1_i) begin + RDATA_A1_o = {10'b0000000000, EMPTY3, EPO3, EWM3, UNDERRUN3, FULL3, FMO3, FWM3, OVERRUN3}; + RDATA_A2_o = 18'b000000000000000000; end else - case (RMODE_A1) + case (RMODE_A1_i) MODE_36: begin - RDATA_A1 = {ram_rdata_a2[1:0], ram_rdata_a1[15:0]}; - RDATA_A2 = {ram_rdata_a2[17:16], ram_rdata_a1[17:16], ram_rdata_a2[15:2]}; + RDATA_A1_o = {ram_rdata_a2[1:0], ram_rdata_a1[15:0]}; + RDATA_A2_o = {ram_rdata_a2[17:16], ram_rdata_a1[17:16], ram_rdata_a2[15:2]}; end MODE_18: begin - RDATA_A1 = (laddr_a1[4] ? ram_rdata_a2 : ram_rdata_a1); - RDATA_A2 = 18'b000000000000000000; + RDATA_A1_o = (laddr_a1[4] ? ram_rdata_a2 : ram_rdata_a1); + RDATA_A2_o = 18'b000000000000000000; end MODE_9: begin - RDATA_A1 = (laddr_a1[4] ? {9'b000000000, ram_rdata_a2[8:0]} : {9'b000000000, ram_rdata_a1[8:0]}); - RDATA_A2 = 18'b000000000000000000; + RDATA_A1_o = (laddr_a1[4] ? {9'b000000000, ram_rdata_a2[8:0]} : {9'b000000000, ram_rdata_a1[8:0]}); + RDATA_A2_o = 18'b000000000000000000; end MODE_4: begin - RDATA_A2 = 18'b000000000000000000; - RDATA_A1[17:4] = 14'b00000000000000; - RDATA_A1[3:0] = (laddr_a1[4] ? ram_rdata_a2[3:0] : ram_rdata_a1[3:0]); + RDATA_A2_o = 18'b000000000000000000; + RDATA_A1_o[17:4] = 14'b00000000000000; + RDATA_A1_o[3:0] = (laddr_a1[4] ? ram_rdata_a2[3:0] : ram_rdata_a1[3:0]); end MODE_2: begin - RDATA_A2 = 18'b000000000000000000; - RDATA_A1[17:2] = 16'b0000000000000000; - RDATA_A1[1:0] = (laddr_a1[4] ? ram_rdata_a2[1:0] : ram_rdata_a1[1:0]); + RDATA_A2_o = 18'b000000000000000000; + RDATA_A1_o[17:2] = 16'b0000000000000000; + RDATA_A1_o[1:0] = (laddr_a1[4] ? ram_rdata_a2[1:0] : ram_rdata_a1[1:0]); end MODE_1: begin - RDATA_A2 = 18'b000000000000000000; - RDATA_A1[17:1] = 17'b00000000000000000; - RDATA_A1[0] = (laddr_a1[4] ? ram_rdata_a2[0] : ram_rdata_a1[0]); + RDATA_A2_o = 18'b000000000000000000; + RDATA_A1_o[17:1] = 17'b00000000000000000; + RDATA_A1_o[0] = (laddr_a1[4] ? ram_rdata_a2[0] : ram_rdata_a1[0]); + end + default: begin + RDATA_A1_o = {ram_rdata_a2[1:0], ram_rdata_a1[15:0]}; + RDATA_A2_o = {ram_rdata_a2[17:16], ram_rdata_a1[17:16], ram_rdata_a2[15:2]}; end endcase - case (RMODE_B1) + case (RMODE_B1_i) MODE_36: begin - RDATA_B1 = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; - RDATA_B2 = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; + RDATA_B1_o = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; + RDATA_B2_o = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; end MODE_18: begin - RDATA_B1 = (FMODE1 ? fifo_rdata[17:0] : (laddr_b1[4] ? ram_rdata_b2 : ram_rdata_b1)); - RDATA_B2 = 18'b000000000000000000; + RDATA_B1_o = (FMODE1_i ? fifo_rdata[17:0] : (laddr_b1[4] ? ram_rdata_b2 : ram_rdata_b1)); + RDATA_B2_o = 18'b000000000000000000; end MODE_9: begin - RDATA_B1 = (FMODE1 ? {9'b000000000, fifo_rdata[8:0]} : (laddr_b1[4] ? {9'b000000000, ram_rdata_b2[8:0]} : {9'b000000000, ram_rdata_b1[8:0]})); - RDATA_B2 = 18'b000000000000000000; + RDATA_B1_o = (FMODE1_i ? {9'b000000000, fifo_rdata[8:0]} : (laddr_b1[4] ? {9'b000000000, ram_rdata_b2[8:0]} : {9'b000000000, ram_rdata_b1[8:0]})); + RDATA_B2_o = 18'b000000000000000000; end MODE_4: begin - RDATA_B2 = 18'b000000000000000000; - RDATA_B1[17:4] = 14'b00000000000000; - RDATA_B1[3:0] = (laddr_b1[4] ? ram_rdata_b2[3:0] : ram_rdata_b1[3:0]); + RDATA_B2_o = 18'b000000000000000000; + RDATA_B1_o[17:4] = 14'b00000000000000; + RDATA_B1_o[3:0] = (laddr_b1[4] ? ram_rdata_b2[3:0] : ram_rdata_b1[3:0]); end MODE_2: begin - RDATA_B2 = 18'b000000000000000000; - RDATA_B1[17:2] = 16'b0000000000000000; - RDATA_B1[1:0] = (laddr_b1[4] ? ram_rdata_b2[1:0] : ram_rdata_b1[1:0]); + RDATA_B2_o = 18'b000000000000000000; + RDATA_B1_o[17:2] = 16'b0000000000000000; + RDATA_B1_o[1:0] = (laddr_b1[4] ? ram_rdata_b2[1:0] : ram_rdata_b1[1:0]); end MODE_1: begin - RDATA_B2 = 18'b000000000000000000; - RDATA_B1[17:1] = 17'b00000000000000000; - RDATA_B1[0] = (laddr_b1[4] ? ram_rdata_b2[0] : ram_rdata_b1[0]); + RDATA_B2_o = 18'b000000000000000000; + RDATA_B1_o[17:1] = 17'b00000000000000000; + RDATA_B1_o[0] = (laddr_b1[4] ? ram_rdata_b2[0] : ram_rdata_b1[0]); + end + default: begin + RDATA_B1_o = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; + RDATA_B2_o = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; end endcase end endcase end - always @(posedge CLK_A1) laddr_a1 <= ADDR_A1; - always @(posedge CLK_B1) laddr_b1 <= ADDR_B1; + always @(posedge CLK_A1_i) laddr_a1 <= ADDR_A1_i; + always @(posedge CLK_B1_i) laddr_b1 <= ADDR_B1_i; always @(*) begin - case (WMODE_A1) + case (WMODE_A1_i) default: fifo_wmode = 2'b00; MODE_36: fifo_wmode = 2'b00; MODE_18: fifo_wmode = 2'b01; MODE_9: fifo_wmode = 2'b10; endcase - case (RMODE_B1) + case (RMODE_B1_i) default: fifo_rmode = 2'b00; MODE_36: fifo_rmode = 2'b00; MODE_18: fifo_rmode = 2'b01; @@ -1111,12 +1134,12 @@ module TDP_BRAM36 ( .FIFO_WIDTH(3'd4) ) fifo36_ctl( .rclk(smux_clk_b1), - .rst_R_n(~FLUSH1), + .rst_R_n(~FLUSH1_i), .wclk(smux_clk_a1), - .rst_W_n(~FLUSH1), - .ren(REN_B1), + .rst_W_n(~FLUSH1_i), + .ren(REN_B1_i), .wen(ram_wen_a1), - .sync(SYNC_FIFO1), + .sync(SYNC_FIFO1_i), .depth(3'b111), .rmode(fifo_rmode), .wmode(fifo_wmode), @@ -1124,10 +1147,10 @@ module TDP_BRAM36 ( .fflags({FULL3, FMO3, FWM3, OVERRUN3, EMPTY3, EPO3, EWM3, UNDERRUN3}), .raddr(ff_raddr), .waddr(ff_waddr), - .upaf({1'b0, UPAF1}), - .upae({1'b0, UPAE1}) + .upaf(UPAF1_i), + .upae(UPAE1_i) ); - TDP18Kx18_FIFO u1( + TDP18K_FIFO u1( .RMODE_A(ram_rmode_a1), .RMODE_B(ram_rmode_b1), .WMODE_A(ram_wmode_a1), @@ -1154,14 +1177,14 @@ module TDP_BRAM36 ( .FMO(FMO1), .FWM(FWM1), .OVERRUN(OVERRUN1), - .FLUSH(FLUSH1), + .FLUSH(FLUSH1_i), .FMODE(ram_fmode1), - .UPAF(UPAF1), - .UPAE(UPAE1), - .SYNC_FIFO(SYNC_FIFO1), - .POWERDN(POWERDN1), - .SLEEP(SLEEP1), - .PROTECT(PROTECT1), + .UPAF(UPAF1_i[10:0]), + .UPAE(UPAE1_i[10:0]), + .SYNC_FIFO(SYNC_FIFO1_i), + .POWERDN(POWERDN1_i), + .SLEEP(SLEEP1_i), + .PROTECT(PROTECT1_i), .PL_INIT(PL_INIT_i), .PL_ENA(PL_ENA_i), .PL_WEN(PL_WEN_i[0]), @@ -1169,10 +1192,10 @@ module TDP_BRAM36 ( .PL_CLK(PL_CLK_i), .PL_ADDR(PL_ADDR_i), .PL_DATA_IN({PL_DATA_i[33:32], PL_DATA_i[15:0]}), - .PL_DATA_OUT({PL_DATA_o[33:32], PL_DATA_o[15:0]}), + .PL_DATA_OUT(pl_dout0), .RAM_ID({RAM_ID_i}) ); - TDP18Kx18_FIFO u2( + TDP18K_FIFO u2( .RMODE_A(ram_rmode_a2), .RMODE_B(ram_rmode_b2), .WMODE_A(ram_wmode_a2), @@ -1199,14 +1222,14 @@ module TDP_BRAM36 ( .FMO(FMO2), .FWM(FWM2), .OVERRUN(OVERRUN2), - .FLUSH(FLUSH2), + .FLUSH(FLUSH2_i), .FMODE(ram_fmode2), - .UPAF(UPAF2), - .UPAE(UPAE2), - .SYNC_FIFO(SYNC_FIFO2), - .POWERDN(POWERDN2), - .SLEEP(SLEEP2), - .PROTECT(PROTECT2), + .UPAF(UPAF2_i), + .UPAE(UPAE2_i), + .SYNC_FIFO(SYNC_FIFO2_i), + .POWERDN(POWERDN2_i), + .SLEEP(SLEEP2_i), + .PROTECT(PROTECT2_i), .PL_INIT(PL_INIT_i), .PL_ENA(PL_ENA_i), .PL_WEN(PL_WEN_i[1]), @@ -1214,10 +1237,14 @@ module TDP_BRAM36 ( .PL_CLK(PL_CLK_i), .PL_ADDR(PL_ADDR_i), .PL_DATA_IN({PL_DATA_i[35:34], PL_DATA_i[31:16]}), - .PL_DATA_OUT({PL_DATA_o[35:34], PL_DATA_o[31:16]}), + .PL_DATA_OUT(pl_dout1), .RAM_ID(RAM_ID_i) ); always @(*) begin + if (RAM_ID_i == PL_ADDR_i[31:16]) + PL_DATA_o = (PL_REN_i ? {pl_dout1[17:16], pl_dout0[17:16], pl_dout1[15:0], pl_dout0[15:0]} : PL_DATA_i); + else + PL_DATA_o = PL_DATA_i; PL_ADDR_o = PL_ADDR_i; PL_INIT_o = PL_INIT_i; PL_ENA_o = PL_ENA_i; diff --git a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v index 39747612e..c732a2640 100644 --- a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v +++ b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v @@ -1,4 +1,4 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2022 The SymbiFlow Authors. // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at diff --git a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v index e1fb11ca0..2fd87bbf9 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v +++ b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v @@ -1,4 +1,4 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2022 The SymbiFlow Authors. // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at @@ -26,6 +26,7 @@ module fifo_ctl ( ); parameter ADDR_WIDTH = 11; parameter FIFO_WIDTH = 3'd2; + localparam ADDR_PLUS_ONE = ADDR_WIDTH + 1; output wire [ADDR_WIDTH - 1:0] raddr; output wire [ADDR_WIDTH - 1:0] waddr; output wire [7:0] fflags; @@ -56,8 +57,8 @@ module fifo_ctl ( assign smux_pushtopop = (sync ? pushtopop0 : pushtopop2); always @(posedge rclk or negedge rst_R_n) if (~rst_R_n) begin - pushtopop1 <= #(1) 12'h000; - pushtopop2 <= #(1) 12'h000; + pushtopop1 <= #(1) {ADDR_WIDTH + 1{1'h0}}; + pushtopop2 <= #(1) {ADDR_WIDTH + 1{1'h0}}; end else begin pushtopop1 <= #(1) pushtopop0; @@ -65,8 +66,8 @@ module fifo_ctl ( end always @(posedge wclk or negedge rst_W_n) if (~rst_W_n) begin - poptopush1 <= #(1) 12'h000; - poptopush2 <= #(1) 12'h000; + poptopush1 <= #(1) {ADDR_WIDTH + 1{1'h0}}; + poptopush2 <= #(1) {ADDR_WIDTH + 1{1'h0}}; end else begin poptopush1 <= #(1) poptopush0; @@ -162,14 +163,14 @@ module fifo_push ( assign count = fbytes - (waddr >= raddr ? waddr - raddr : (~raddr + waddr) + 1); always @(*) begin case (depth) - 3'b000: fbytes = 12'd2048; - 3'b001: fbytes = 12'd1024; - 3'b010: fbytes = 12'd512; - 3'b011: fbytes = 12'd256; - 3'b100: fbytes = 12'd128; - 3'b101: fbytes = 12'd64; - 3'b110: fbytes = 12'd32; - 3'b111: fbytes = 13'd4096; + 3'b000: fbytes = {ADDR_WIDTH + 1{1'h0}} | 12'd2048; + 3'b001: fbytes = {ADDR_WIDTH + 1{1'h0}} | 11'd1024; + 3'b010: fbytes = {ADDR_WIDTH + 1{1'h0}} | 10'd512; + 3'b011: fbytes = {ADDR_WIDTH + 1{1'h0}} | 9'd256; + 3'b100: fbytes = {ADDR_WIDTH + 1{1'h0}} | 8'd128; + 3'b101: fbytes = {ADDR_WIDTH + 1{1'h0}} | 7'd64; + 3'b110: fbytes = {ADDR_WIDTH + 1{1'h0}} | 6'd32; + 3'b111: fbytes = {ADDR_WIDTH + 1{1'h0}} | 13'd4096; endcase paf_thresh = (wmode ? (wmode[0] ? upaf << 1 : upaf) : upaf << 2); end @@ -499,7 +500,7 @@ module fifo_pop ( 3'b110: fbytes = 'd32; 3'b111: fbytes = 'd4096; endcase - always @(*) pae_thresh = (rmode ? (rmode[0] ? upae < 1 : upae) : upae << 2); + always @(*) pae_thresh = rmode ? (rmode[0] ? upae << 1 : upae) : upae << 2; assign ren_out = (empty ? 1'b1 : ren_in); always @(*) case (rmode) From 6441335df896777f189f7e1065a87dd4dd017234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20R=C3=B3=C5=BCak?= Date: Wed, 2 Mar 2022 13:16:16 +0100 Subject: [PATCH 670/845] Insert nodes from UhdmTopModules before processes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ryszard Różak --- uhdm-plugin/UhdmAst.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index ba4d8bcfc..285f0bd84 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc @@ -1466,6 +1466,10 @@ void UhdmAst::process_module() if (shared.top_nodes.find(type) != shared.top_nodes.end()) { current_node = shared.top_nodes[type]; shared.current_top_node = current_node; + auto process_it = std::find_if(current_node->children.begin(), current_node->children.end(), + [](auto node) { return node->type == AST::AST_INITIAL || node->type == AST::AST_ALWAYS; }); + auto children_after_process = std::vector(process_it, current_node->children.end()); + current_node->children.erase(process_it, current_node->children.end()); visit_one_to_many({vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiTaskFunc, vpiGenScopeArray, vpiContAssign, vpiVariables}, obj_h, [&](AST::AstNode *node) { @@ -1473,6 +1477,8 @@ void UhdmAst::process_module() add_or_replace_child(current_node, node); } }); + current_node->children.insert(current_node->children.end(), children_after_process.begin(), children_after_process.end()); + auto it = current_node->attributes.find(UhdmAst::partial()); if (it != current_node->attributes.end()) { delete it->second; From 875c646c1b305cee833e80a692a7ba18739e81b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 3 Mar 2022 12:37:49 +0100 Subject: [PATCH 671/845] tests: sim: include simulation models MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- Makefile_test.common | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile_test.common b/Makefile_test.common index 84af52098..db3cc3c1a 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -70,12 +70,14 @@ $(1)/ok: $(1)/$$(notdir $(1).v) endef +DEV = $(shell echo $(1) | cut -d "/" -f 1) +SIM_LIBS = $(shell find ../$(DEV) -name "*.v" -not -name "*map.v" -not -name "cells_sim.v") define test_sim_tpl = $(1): $(1)/ok @printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); $(1)/$$(notdir $(1).vvp): $(1)/$$(notdir $(1).v) - @iverilog -vvvv -g2005 -o $$@ $$< -I../ -DVCD_FILE=\"$(1)/$$(notdir $(1).vcd)\" >$(1)/$$(notdir $(1).vvp.log) 2>&1; \ + @iverilog -vvvv -g2005 -o $$@ $$< $(SIM_LIBS) -I../ -DVCD_FILE=\"$(1)/$$(notdir $(1).vcd)\" >$(1)/$$(notdir $(1).vvp.log) 2>&1; \ if [ $$$$? -ne 0 ]; then \ printf "Test %-18s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ false; \ From c671a53f3db6260827aced3548d1548288f0430e Mon Sep 17 00:00:00 2001 From: rakeshm Date: Fri, 4 Mar 2022 04:19:55 -0800 Subject: [PATCH 672/845] Rectified cells_sim & dsp_map files Signed-off-by: rakeshm --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 31 +++++++++--------------- ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 2 +- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 4 +-- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 6270f49be..fc5beb451 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -685,11 +685,11 @@ endmodule /* QL_DSP1 */ (* blackbox *) module QL_DSP2 ( // TODO: Name subject to change - input [NBITS_A-1:0] a, - input [NBITS_B-1:0] b, - input [NBITS_AF-1:0] acc_fir, - output [NBITS_Z-1:0] z, - output [NBITS_B-1:0] dly_b, + input [19:0] a, + input [17:0] b, + input [3:0] acc_fir, + output [37:0] z, + output [17:0] dly_b, (* clkbuf_sink *) input clk, @@ -709,10 +709,10 @@ module QL_DSP2 ( // TODO: Name subject to change input register_inputs ); - parameter [NBITS_COEF-1:0] COEFF_0 = 20'd0; - parameter [NBITS_COEF-1:0] COEFF_1 = 20'd0; - parameter [NBITS_COEF-1:0] COEFF_2 = 20'd0; - parameter [NBITS_COEF-1:0] COEFF_3 = 20'd0; + parameter [19:0] COEFF_0 = 20'd0; + parameter [19:0] COEFF_1 = 20'd0; + parameter [19:0] COEFF_2 = 20'd0; + parameter [19:0] COEFF_3 = 20'd0; localparam NBITS_ACC = 64; localparam NBITS_A = 20; @@ -852,7 +852,7 @@ module dsp_t1_sim # ( input [NBITS_A-1:0] a_i, input [NBITS_B-1:0] b_i, output [NBITS_Z-1:0] z_o, - output [NBITS_B-1:0] dly_b_o, + output reg [NBITS_B-1:0] dly_b_o, input [NBITS_AF-1:0] acc_fir_i, input [2:0] feedback_i, @@ -896,6 +896,7 @@ module dsp_t1_sim # ( reg r_subtract; reg r_sat; reg r_rnd; + reg [NBITS_ACC-1:0] acc; always @(posedge clock_i or negedge reset_n_i) begin if (~reset_n_i) begin @@ -949,11 +950,6 @@ module dsp_t1_sim # ( // Shift right control wire [5:0] shift_d1 = register_inputs_i ? r_shift_d1 : shift_right_i; wire [5:0] shift_d2 = output_select_i[1] ? shift_d1 : r_shift_d2; - //localparam SHIFT_SEL = {register_inputs_i, output_select_i[1]}; - //wire [5:0] shift_right = (SHIFT_SEL == 2'b00) ? shift_right_i : - //(SHIFT_SEL == 2'b01) ? r_shift_d1 : - //(SHIFT_SEL == 2'b10) ? r_shift_d1 : - //[>(SHIFT_SEL == 2'b11) ?<] r_shift_d2; // Multiplier wire unsigned_mode = unsigned_a & unsigned_b; @@ -996,8 +992,7 @@ module dsp_t1_sim # ( wire [NBITS_ACC-1:0] add_o = add_a + add_b; - // Accumulator - reg [NBITS_ACC-1:0] acc; + // Accumulator always @(posedge clock_i or negedge reset_n_i) if (~reset_n_i) acc <= 'h0; else begin @@ -1052,8 +1047,6 @@ module dsp_t1_sim # ( z1; // if output_select_i == 3'h7 // B input delayed passthrough - reg [NBITS_B-1:0] dly_b_o; - always @(posedge clock_i or negedge reset_n_i) if (!reset_n_i) dly_b_o <= 0; diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index b8423e5f5..0ae6f3b44 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -109,7 +109,7 @@ module dsp_t1_10x9x32 ( ) _TECHMAP_REPLACE_ ( .a ({10'd0, a_i}), .b ({ 9'd0, b_i}), - .acc_fir (acc_fir_i), + .acc_fir ({ 2'd0, acc_fir_i}), .z (z), .dly_b (dly_b), diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index e10df2a7e..9606c4f8f 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -70,10 +70,10 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); dsp_t1_10x9x32 _TECHMAP_REPLACE_ ( .a_i (a), .b_i (b), - .acc_fir_i (3'd0), + .acc_fir_i (2'd0), .z_o (z), - .feedback_i (2'd0), + .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (!A_SIGNED), .unsigned_b_i (!B_SIGNED), From cef37b0a7b62703e5b95c07e528726b1495ed64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 7 Mar 2022 16:11:09 +0100 Subject: [PATCH 673/845] ql-qlf: qlf_k6n10f: bram: sim: rearrange ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v | 24 ++- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 188 ++++++++++------------ 2 files changed, 95 insertions(+), 117 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v index bec428bf7..235d0d2b2 100644 --- a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v +++ b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v @@ -35,12 +35,6 @@ module TDP18K_FIFO ( OVERRUN, FLUSH, FMODE, - SYNC_FIFO, - POWERDN, - SLEEP, - PROTECT, - UPAF, - UPAE, PL_INIT, PL_ENA, PL_WEN, @@ -48,9 +42,16 @@ module TDP18K_FIFO ( PL_CLK, PL_ADDR, PL_DATA_IN, - PL_DATA_OUT, - RAM_ID + PL_DATA_OUT ); + parameter SYNC_FIFO = 1'b0; + parameter POWERDN = 1'b0; + parameter SLEEP = 1'b0; + parameter PROTECT = 1'b0; + parameter UPAF = 11'b0; + parameter UPAE = 11'b0; + parameter RAM_ID = 16'b0; + input wire [2:0] RMODE_A; input wire [2:0] RMODE_B; input wire [2:0] WMODE_A; @@ -81,12 +82,6 @@ module TDP18K_FIFO ( output wire OVERRUN; input wire FLUSH; input wire FMODE; - input wire SYNC_FIFO; - input wire POWERDN; - input wire SLEEP; - input wire PROTECT; - input wire [10:0] UPAF; - input wire [10:0] UPAE; input PL_INIT; input PL_ENA; input PL_WEN; @@ -95,7 +90,6 @@ module TDP18K_FIFO ( input [31:0] PL_ADDR; input [17:0] PL_DATA_IN; output reg [17:0] PL_DATA_OUT; - input [15:0] RAM_ID; reg [17:0] wmsk_a; reg [17:0] wmsk_b; wire [8:0] addr_a; diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index b7a2c56bc..ea310099d 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -503,17 +503,6 @@ module TDP_BRAM36 ( RDATA_A1_o, RDATA_B1_o, FLUSH1_i, - SYNC_FIFO1_i, - RMODE_A1_i, - RMODE_B1_i, - WMODE_A1_i, - WMODE_B1_i, - FMODE1_i, - POWERDN1_i, - SLEEP1_i, - PROTECT1_i, - UPAE1_i, - UPAF1_i, WEN_A2_i, WEN_B2_i, REN_A2_i, @@ -529,19 +518,6 @@ module TDP_BRAM36 ( RDATA_A2_o, RDATA_B2_o, FLUSH2_i, - SYNC_FIFO2_i, - RMODE_A2_i, - RMODE_B2_i, - WMODE_A2_i, - WMODE_B2_i, - FMODE2_i, - POWERDN2_i, - SLEEP2_i, - PROTECT2_i, - UPAE2_i, - UPAF2_i, - SPLIT_i, - RAM_ID_i, PL_INIT_i, PL_ENA_i, PL_REN_i, @@ -557,6 +533,33 @@ module TDP_BRAM36 ( PL_ADDR_o, PL_DATA_o ); + parameter SYNC_FIFO1_i = 1'b0; + parameter RMODE_A1_i = 3'b0; + parameter RMODE_B1_i = 3'b0; + parameter WMODE_A1_i = 3'b0; + parameter WMODE_B1_i = 3'b0; + parameter FMODE1_i = 1'b0; + parameter POWERDN1_i = 1'b0; + parameter SLEEP1_i = 1'b0; + parameter PROTECT1_i = 1'b0; + parameter UPAE1_i = 12'b0; + parameter UPAF1_i = 12'b0; + + parameter SYNC_FIFO2_i = 1'b0; + parameter RMODE_A2_i = 3'b0; + parameter RMODE_B2_i = 3'b0; + parameter WMODE_A2_i = 3'b0; + parameter WMODE_B2_i = 3'b0; + parameter FMODE2_i = 1'b0; + parameter POWERDN2_i = 1'b0; + parameter SLEEP2_i = 1'b0; + parameter PROTECT2_i = 1'b0; + parameter UPAE2_i = 12'b0; + parameter UPAF2_i = 12'b0; + + parameter SPLIT_i = 1'b0; + parameter RAM_ID_i = 16'b0; + parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; parameter INITP_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; @@ -719,17 +722,6 @@ module TDP_BRAM36 ( output reg [17:0] RDATA_A1_o; output reg [17:0] RDATA_B1_o; input wire FLUSH1_i; - input wire SYNC_FIFO1_i; - input wire [2:0] RMODE_A1_i; - input wire [2:0] RMODE_B1_i; - input wire [2:0] WMODE_A1_i; - input wire [2:0] WMODE_B1_i; - input wire FMODE1_i; - input wire POWERDN1_i; - input wire SLEEP1_i; - input wire PROTECT1_i; - input wire [11:0] UPAE1_i; - input wire [11:0] UPAF1_i; input wire WEN_A2_i; input wire WEN_B2_i; input wire REN_A2_i; @@ -747,19 +739,6 @@ module TDP_BRAM36 ( output reg [17:0] RDATA_A2_o; output reg [17:0] RDATA_B2_o; input wire FLUSH2_i; - input wire SYNC_FIFO2_i; - input wire [2:0] RMODE_A2_i; - input wire [2:0] RMODE_B2_i; - input wire [2:0] WMODE_A2_i; - input wire [2:0] WMODE_B2_i; - input wire FMODE2_i; - input wire POWERDN2_i; - input wire SLEEP2_i; - input wire PROTECT2_i; - input wire [10:0] UPAE2_i; - input wire [10:0] UPAF2_i; - input SPLIT_i; - input [15:0] RAM_ID_i; input wire PL_INIT_i; input wire PL_ENA_i; input wire PL_REN_i; @@ -990,29 +969,27 @@ module TDP_BRAM36 ( end endcase end - always @(*) - case (SPLIT_i) - 0: begin - ram_rmode_a1 = (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); - ram_rmode_a2 = (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); - ram_wmode_a1 = (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); - ram_wmode_a2 = (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); - ram_rmode_b1 = (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); - ram_rmode_b2 = (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); - ram_wmode_b1 = (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); - ram_wmode_b2 = (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); - end - 1: begin - ram_rmode_a1 = (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); - ram_rmode_a2 = (RMODE_A2_i == MODE_36 ? MODE_18 : RMODE_A2_i); - ram_wmode_a1 = (WMODE_A1_i == MODE_36 ? MODE_18 : WMODE_A1_i); - ram_wmode_a2 = (WMODE_A2_i == MODE_36 ? MODE_18 : WMODE_A2_i); - ram_rmode_b1 = (RMODE_B1_i == MODE_36 ? MODE_18 : RMODE_B1_i); - ram_rmode_b2 = (RMODE_B2_i == MODE_36 ? MODE_18 : RMODE_B2_i); - ram_wmode_b1 = (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); - ram_wmode_b2 = (WMODE_B2_i == MODE_36 ? MODE_18 : WMODE_B2_i); - end - endcase + always @(posedge CLK_A1_i or posedge CLK_B1_i or posedge CLK_A2_i or posedge CLK_B2_i) begin + if (!SPLIT_i) begin + ram_rmode_a1 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); + ram_rmode_a2 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); + ram_wmode_a1 <= (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); + ram_wmode_a2 <= (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); + ram_rmode_b1 <= (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); + ram_rmode_b2 <= (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); + ram_wmode_b1 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); + ram_wmode_b2 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); + end else begin + ram_rmode_a1 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); + ram_rmode_a2 <= (RMODE_A2_i == MODE_36 ? MODE_18 : RMODE_A2_i); + ram_wmode_a1 <= (WMODE_A1_i == MODE_36 ? MODE_18 : WMODE_A1_i); + ram_wmode_a2 <= (WMODE_A2_i == MODE_36 ? MODE_18 : WMODE_A2_i); + ram_rmode_b1 <= (RMODE_B1_i == MODE_36 ? MODE_18 : RMODE_B1_i); + ram_rmode_b2 <= (RMODE_B2_i == MODE_36 ? MODE_18 : RMODE_B2_i); + ram_wmode_b1 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); + ram_wmode_b2 <= (WMODE_B2_i == MODE_36 ? MODE_18 : WMODE_B2_i); + end + end always @(*) begin : FIFO_READ_SEL case (RMODE_B1_i) MODE_36: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; @@ -1115,19 +1092,24 @@ module TDP_BRAM36 ( end always @(posedge CLK_A1_i) laddr_a1 <= ADDR_A1_i; always @(posedge CLK_B1_i) laddr_b1 <= ADDR_B1_i; - always @(*) begin - case (WMODE_A1_i) - default: fifo_wmode = 2'b00; - MODE_36: fifo_wmode = 2'b00; - MODE_18: fifo_wmode = 2'b01; - MODE_9: fifo_wmode = 2'b10; - endcase - case (RMODE_B1_i) - default: fifo_rmode = 2'b00; - MODE_36: fifo_rmode = 2'b00; - MODE_18: fifo_rmode = 2'b01; - MODE_9: fifo_rmode = 2'b10; - endcase + always @(posedge CLK_A1_i or posedge CLK_B1_i or posedge CLK_A2_i or posedge CLK_B2_i) begin + if (WMODE_A1_i == MODE_36) + fifo_wmode = 2'b00; + else if (WMODE_A1_i == MODE_18) + fifo_wmode = 2'b01; + else if (WMODE_A1_i == MODE_9) + fifo_wmode = 2'b10; + else + fifo_wmode = 2'b00; + + if (RMODE_B1_i == MODE_36) + fifo_rmode = 2'b00; + else if (RMODE_B1_i == MODE_18) + fifo_rmode = 2'b01; + else if (RMODE_B1_i == MODE_9) + fifo_rmode = 2'b10; + else + fifo_rmode = 2'b00; end fifo_ctl #( .ADDR_WIDTH(12), @@ -1150,7 +1132,15 @@ module TDP_BRAM36 ( .upaf(UPAF1_i), .upae(UPAE1_i) ); - TDP18K_FIFO u1( + TDP18K_FIFO #( + .UPAF(UPAF1_i[10:0]), + .UPAE(UPAE1_i[10:0]), + .SYNC_FIFO(SYNC_FIFO1_i), + .POWERDN(POWERDN1_i), + .SLEEP(SLEEP1_i), + .PROTECT(PROTECT1_i), + .RAM_ID({RAM_ID_i}) + )u1( .RMODE_A(ram_rmode_a1), .RMODE_B(ram_rmode_b1), .WMODE_A(ram_wmode_a1), @@ -1179,12 +1169,6 @@ module TDP_BRAM36 ( .OVERRUN(OVERRUN1), .FLUSH(FLUSH1_i), .FMODE(ram_fmode1), - .UPAF(UPAF1_i[10:0]), - .UPAE(UPAE1_i[10:0]), - .SYNC_FIFO(SYNC_FIFO1_i), - .POWERDN(POWERDN1_i), - .SLEEP(SLEEP1_i), - .PROTECT(PROTECT1_i), .PL_INIT(PL_INIT_i), .PL_ENA(PL_ENA_i), .PL_WEN(PL_WEN_i[0]), @@ -1192,10 +1176,17 @@ module TDP_BRAM36 ( .PL_CLK(PL_CLK_i), .PL_ADDR(PL_ADDR_i), .PL_DATA_IN({PL_DATA_i[33:32], PL_DATA_i[15:0]}), - .PL_DATA_OUT(pl_dout0), - .RAM_ID({RAM_ID_i}) + .PL_DATA_OUT(pl_dout0) ); - TDP18K_FIFO u2( + TDP18K_FIFO #( + .UPAF(UPAF2_i[10:0]), + .UPAE(UPAE2_i[10:0]), + .SYNC_FIFO(SYNC_FIFO2_i), + .POWERDN(POWERDN2_i), + .SLEEP(SLEEP2_i), + .PROTECT(PROTECT2_i), + .RAM_ID({RAM_ID_i}) + )u2( .RMODE_A(ram_rmode_a2), .RMODE_B(ram_rmode_b2), .WMODE_A(ram_wmode_a2), @@ -1224,12 +1215,6 @@ module TDP_BRAM36 ( .OVERRUN(OVERRUN2), .FLUSH(FLUSH2_i), .FMODE(ram_fmode2), - .UPAF(UPAF2_i), - .UPAE(UPAE2_i), - .SYNC_FIFO(SYNC_FIFO2_i), - .POWERDN(POWERDN2_i), - .SLEEP(SLEEP2_i), - .PROTECT(PROTECT2_i), .PL_INIT(PL_INIT_i), .PL_ENA(PL_ENA_i), .PL_WEN(PL_WEN_i[1]), @@ -1237,8 +1222,7 @@ module TDP_BRAM36 ( .PL_CLK(PL_CLK_i), .PL_ADDR(PL_ADDR_i), .PL_DATA_IN({PL_DATA_i[35:34], PL_DATA_i[31:16]}), - .PL_DATA_OUT(pl_dout1), - .RAM_ID(RAM_ID_i) + .PL_DATA_OUT(pl_dout1) ); always @(*) begin if (RAM_ID_i == PL_ADDR_i[31:16]) From f1f282c1a48768a860ee6ece8276ce66ab703850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 3 Mar 2022 10:51:28 +0100 Subject: [PATCH 674/845] ql-qlf: qlf_k6n10f: bram: don't match BRAM18_TDP module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams.txt b/ql-qlf-plugin/qlf_k6n10f/brams.txt index 166460367..5b11b1514 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams.txt +++ b/ql-qlf-plugin/qlf_k6n10f/brams.txt @@ -52,13 +52,5 @@ match $__QLF_FACTOR_BRAM36_TDP min efficiency 2 shuffle_enable B make_transp - or_next_if_better -endmatch - -match $__QLF_FACTOR_BRAM18_TDP - min bits 128 - min efficiency 2 - shuffle_enable B - make_transp endmatch From f7a5d47b61ac1f999d5c315f5094daf77886b2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 3 Mar 2022 10:56:10 +0100 Subject: [PATCH 675/845] ql-qlf: qlf_k6n10f: bram: rewrite BRAM36_TDP techmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 338 +++++++++++++++++++-------- 1 file changed, 243 insertions(+), 95 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index be0b23017..46f56fabd 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -6,17 +6,25 @@ // // SPDX-License-Identifier:ISC -module \$__QLF_FACTOR_BRAM36_TDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); +module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, C1EN, CLK1, CLK2, D1ADDR, D1DATA, D1EN); parameter CFG_ABITS = 10; parameter CFG_DBITS = 36; parameter CFG_ENABLE_B = 4; + parameter CFG_ENABLE_D = 4; parameter CLKPOL2 = 1; parameter CLKPOL3 = 1; parameter [36863:0] INIT = 36864'bx; + localparam MODE_36 = 3'b111; // 36 or 32-bit + localparam MODE_18 = 3'b110; // 18 or 16-bit + localparam MODE_9 = 3'b101; // 9 or 8-bit + localparam MODE_4 = 3'b100; // 4-bit + localparam MODE_2 = 3'b010; // 32-bit + localparam MODE_1 = 3'b001; // 32-bit + + input CLK1; input CLK2; - input CLK3; input [CFG_ABITS-1:0] A1ADDR; output [CFG_DBITS-1:0] A1DATA; @@ -26,106 +34,246 @@ module \$__QLF_FACTOR_BRAM36_TDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA input [CFG_DBITS-1:0] B1DATA; input [CFG_ENABLE_B-1:0] B1EN; - wire [14:0] A1ADDR_15; - wire [14:0] B1ADDR_15; - //wire [7:0] B1EN_8 = //B1EN; + input [CFG_ABITS-1:0] C1ADDR; + output [CFG_DBITS-1:0] C1DATA; + input C1EN; - wire [3:0] DIP, DOP; - wire [31:0] DI, DO; + input [CFG_ABITS-1:0] D1ADDR; + input [CFG_DBITS-1:0] D1DATA; + input [CFG_ENABLE_B-1:0] D1EN; - wire [31:0] DOBDO; - wire [3:0] DOPBDOP; + wire FLUSH1; + wire FLUSH2; + wire SPLIT; + wire [10:0] UPAE1; + wire [10:0] UPAF1; + wire [10:0] UPAE2; + wire [10:0] UPAF2; + wire SYNC_FIFO1; + wire SYNC_FIFO2; + wire FMODE1; + wire FMODE2; + wire POWERDN1; + wire POWERDN2; + wire SLEEP1; + wire SLEEP2; + wire PROTECT1; + wire PROTECT2; + wire [8:0] RAM_ID_i; - //wire [2:0] WRITEDATAWIDTHB; - //wire [2:0] READDATAWIDTHA; - assign A1DATA = { DOP[3], DO[31:24], DOP[2], DO[23:16], DOP[1], DO[15: 8], DOP[0], DO[ 7: 0] }; - assign { DIP[3], DI[31:24], DIP[2], DI[23:16], DIP[1], DI[15: 8], DIP[0], DI[ 7: 0] } = B1DATA; + wire PL_INIT_i; + wire PL_ENA_i; + wire PL_REN_i; + wire PL_CLK_i; + wire [1:0] PL_WEN_i; + wire [23:0] PL_ADDR_i; + wire [35:0] PL_DATA_i; + reg PL_INIT_o; + reg PL_ENA_o; + reg PL_REN_o; + reg PL_CLK_o; + reg [1:0] PL_WEN_o; + reg [23:0] PL_ADDR_o; + wire [35:0] PL_DATA_o; - assign A1ADDR_15[14:CFG_ABITS] = 0; - assign A1ADDR_15[CFG_ABITS-1:0] = A1ADDR; - assign B1ADDR_15[14:CFG_ABITS] = 0; - assign B1ADDR_15[CFG_ABITS-1:0] = B1ADDR; + wire [2:0] WMODE; + wire [2:0] RMODE; - /*if (CFG_DBITS == 1) begin - assign WRITEDATAWIDTHB = 3'b000; - assign READDATAWIDTHA = 3'b000; - end else if (CFG_DBITS == 2) begin - assign WRITEDATAWIDTHB = 3'b001; - assign READDATAWIDTHA = 3'b001; - end else if (CFG_DBITS > 2 && CFG_DBITS <= 4) begin - assign WRITEDATAWIDTHB = 3'b010; - assign READDATAWIDTHA = 3'b010; - end else if (CFG_DBITS > 4 && CFG_DBITS <= 9) begin - assign WRITEDATAWIDTHB = 3'b011; - assign READDATAWIDTHA = 3'b011; - end else if (CFG_DBITS > 9 && CFG_DBITS <= 18) begin - assign WRITEDATAWIDTHB = 3'b100; - assign READDATAWIDTHA = 3'b100; - end else if (CFG_DBITS > 18 && CFG_DBITS <= 36) begin - assign WRITEDATAWIDTHB = 3'b101; - assign READDATAWIDTHA = 3'b101; - end*/ - generate if (CFG_DBITS > 8) begin - TDP_BRAM36 #( - //`include "brams_init_36.vh" - .READ_WIDTH_A(CFG_DBITS), - .READ_WIDTH_B(CFG_DBITS), - .WRITE_WIDTH_A(CFG_DBITS), - .WRITE_WIDTH_B(CFG_DBITS), - ) _TECHMAP_REPLACE_ ( - .WRITEDATAA(32'hFFFFFFFF), - .WRITEDATAAP(4'hF), - .READDATAA(DO[31:0]), - .READDATAAP(DOP[3:0]), - .ADDRA(A1ADDR_15), - .CLOCKA(CLK2), - .READENABLEA(A1EN), - .WRITEENABLEA(1'b0), - .BYTEENABLEA(4'b0), - //.WRITEDATAWIDTHA(3'b0), - //.READDATAWIDTHA(READDATAWIDTHA), + wire [14:CFG_ABITS] A1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; + wire [14:CFG_ABITS] B1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; + wire [14:CFG_ABITS] C1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; + wire [14:CFG_ABITS] D1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; - .WRITEDATAB(DI), - .WRITEDATABP(DIP), - .READDATAB(DOBDO), - .READDATABP(DOPBDOP), - .ADDRB(B1ADDR_15), - .CLOCKB(CLK3), - .READENABLEA(1'b0), - .WRITEENABLEB(1'b1), - .BYTEENABLEB(B1EN) - //.WRITEDATAWIDTHB(WRITEDATAWIDTHB), - //.READDATAWIDTHB(3'b0) - ); - end else begin - TDP_BRAM36 #( - //`include "brams_init_32.vh" - ) _TECHMAP_REPLACE_ ( - .WRITEDATAA(32'hFFFFFFFF), - .WRITEDATAAP(4'hF), - .READDATAA(DO[31:0]), - .READDATAAP(DOP[3:0]), - .ADDRA(A1ADDR_15), - .CLOCKA(CLK2), - .READENABLEA(A1EN), - .WRITEENABLEA(1'b0), - .BYTEENABLEA(4'b0), - //.WRITEDATAWIDTHA(3'b0), - //.READDATAWIDTHA(READDATAWIDTHA), + wire [14:0] A1ADDR_TOTAL = {A1ADDR_CMPL, A1ADDR}; + wire [14:0] B1ADDR_TOTAL = {B1ADDR_CMPL, B1ADDR}; + wire [14:0] C1ADDR_TOTAL = {C1ADDR_CMPL, C1ADDR}; + wire [14:0] D1ADDR_TOTAL = {D1ADDR_CMPL, D1ADDR}; - .WRITEDATAB(DI), - .WRITEDATABP(DIP), - .READDATAB(DOBDO), - .READDATABP(DOPBDOP), - .ADDRB(B1ADDR_15), - .CLOCKB(CLK3), - .READENABLEB(1'b0), - .WRITEENABLEB(1'b1), - .BYTEENABLEB(B1EN) - //.WRITEDATAWIDTHB(WRITEDATAWIDTHB), - //.READDATAWIDTHB(3'b0) - ); - end endgenerate + wire [35:CFG_DBITS] A1DATA_CMPL; + wire [35:CFG_DBITS] C1DATA_CMPL; + + wire [35:0] A1DATA_TOTAL = {A1DATA_CMPL, A1DATA}; + wire [35:0] C1DATA_TOTAL = {C1DATA_CMPL, C1DATA}; + + wire [14:0] PORT_A_ADDR; + wire [14:0] PORT_B_ADDR; + + case (CFG_DBITS) + 1: begin + assign PORT_A_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 15'd0); + assign PORT_B_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 15'd0); + assign WMODE = MODE_1; + assign RMODE = MODE_1; + end + + 2: begin + assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 1) : (B1EN ? (B1ADDR_TOTAL << 1) : 15'd0); + assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 1) : (D1EN ? (D1ADDR_TOTAL << 1) : 15'd0); + assign WMODE = MODE_2; + assign RMODE = MODE_2; + end + + 4: begin + assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 5) : (B1EN ? (B1ADDR_TOTAL << 5) : 15'd0); + assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 5) : (D1EN ? (D1ADDR_TOTAL << 5) : 15'd0); + assign WMODE = MODE_4; + assign RMODE = MODE_4; + end + + 8: begin + assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 3) : (B1EN ? (B1ADDR_TOTAL << 3) : 15'd0); + assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 3) : (D1EN ? (D1ADDR_TOTAL << 3) : 15'd0); + assign WMODE = MODE_9; + assign RMODE = MODE_9; + end + + 9: begin + assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 3) : (B1EN ? (B1ADDR_TOTAL << 3) : 15'd0); + assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 3) : (D1EN ? (D1ADDR_TOTAL << 3) : 15'd0); + assign WMODE = MODE_9; + assign RMODE = MODE_9; + end + + 16: begin + assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 4) : (B1EN ? (B1ADDR_TOTAL << 4) : 15'd0); + assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 4) : (D1EN ? (D1ADDR_TOTAL << 4) : 15'd0); + assign WMODE = MODE_18; + assign RMODE = MODE_18; + end + + 18: begin + assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 4) : (B1EN ? (B1ADDR_TOTAL << 4) : 15'd0); + assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 4) : (D1EN ? (D1ADDR_TOTAL << 4) : 15'd0); + assign WMODE = MODE_18; + assign RMODE = MODE_18; + end + + 32: begin + assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 5) : (B1EN ? (B1ADDR_TOTAL << 5) : 15'd0); + assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 5) : (D1EN ? (D1ADDR_TOTAL << 5) : 15'd0); + assign WMODE = MODE_36; + assign RMODE = MODE_36; + end + 36: begin + assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 5) : (B1EN ? (B1ADDR_TOTAL << 5) : 15'd0); + assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 5) : (D1EN ? (D1ADDR_TOTAL << 5) : 15'd0); + assign WMODE = MODE_36; + assign RMODE = MODE_36; + end + default: begin + assign PORT_A_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 15'd0); + assign PORT_B_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 15'd0); + assign WMODE = MODE_36; + assign RMODE = MODE_36; + end + endcase + + + assign SPLIT = 1'b0; + assign FLUSH1 = 1'b0; + assign FLUSH2 = 1'b0; + assign UPAE1 = 11'd10; + assign UPAF1 = 11'd10; + assign UPAE2 = 11'd10; + assign UPAF2 = 11'd10; + assign SYNC_FIFO1 = 1'b0; + assign SYNC_FIFO2 = 1'b0; + assign FMODE1 = 1'b0; + assign FMODE2 = 1'b0; + assign POWERDN1 = 1'b0; + assign POWERDN2 = 1'b0; + assign SLEEP1 = 1'b0; + assign SLEEP2 = 1'b0; + assign PROTECT1 = 1'b0; + assign PROTECT2 = 1'b0; + assign RAM_ID_i = 9'b0; + + assign PL_INIT_i = 1'b0; + assign PL_ENA_i = 1'b0; + assign PL_REN_i = 1'b0; + assign PL_CLK_i = 1'b0; + assign PL_WEN_i = 2'b0; + assign PL_ADDR_i = 24'b0; + assign PL_DATA_i = 36'b0; + + TDP_BRAM36 #() _TECHMAP_REPLACE_ ( + .WMODE_A1_i(WMODE), + .WMODE_A2_i(WMODE), + .RMODE_A1_i(RMODE), + .RMODE_A2_i(RMODE), + + .WDATA_A1_i(B1DATA[17:0]), + .WDATA_A2_i(B1DATA[35:18]), + .RDATA_A1_o(A1DATA_TOTAL[17:0]), + .RDATA_A2_o(A1DATA_TOTAL[35:18]), + .ADDR_A1_i(PORT_A_ADDR), + .ADDR_A2_i(PORT_A_ADDR), + .CLK_A1_i(CLK1), + .CLK_A2_i(CLK1), + .REN_A1_i(A1EN), + .REN_A2_i(A1EN), + .WEN_A1_i(B1EN[0]), + .WEN_A2_i(B1EN[0]), + .BE_A1_i({B1EN[1],B1EN[0]}), + .BE_A2_i({B1EN[3],B1EN[2]}), + + + .WMODE_B1_i(WMODE), + .WMODE_B2_i(WMODE), + .RMODE_B1_i(RMODE), + .RMODE_B2_i(RMODE), + + .WDATA_B1_i(D1DATA[17:0]), + .WDATA_B2_i(D1DATA[35:18]), + .RDATA_B1_o(C1DATA_TOTAL[17:0]), + .RDATA_B2_o(C1DATA_TOTAL[35:18]), + .ADDR_B1_i(PORT_B_ADDR), + .ADDR_B2_i(PORT_B_ADDR), + .CLK_B1_i(CLK2), + .CLK_B2_i(CLK2), + .REN_B1_i(C1EN), + .REN_B2_i(C1EN), + .WEN_B1_i(D1EN[0]), + .WEN_B2_i(D1EN[0]), + .BE_B1_i({D1EN[1],D1EN[0]}), + .BE_B2_i({D1EN[3],D1EN[2]}), + + + .SPLIT_i(SPLIT), + .FLUSH1_i(FLUSH1), + .FLUSH2_i(FLUSH2), + .UPAE1_i(UPAE1), + .UPAF1_i(UPAF1), + .UPAE2_i(UPAE2), + .UPAF2_i(UPAF2), + .SYNC_FIFO1_i(SYNC_FIFO1), + .SYNC_FIFO2_i(SYNC_FIFO2), + .FMODE1_i(FMODE1), + .FMODE2_i(FMODE2), + .POWERDN1_i(POWERDN1), + .POWERDN2_i(POWERDN2), + .SLEEP1_i(SLEEP1), + .SLEEP2_i(SLEEP2), + .PROTECT1_i(PROTECT1), + .PROTECT2_i(PROTECT2), + .RAM_ID_i(RAM_ID_i), + + .PL_INIT_i(PL_INIT_i), + .PL_ENA_i(PL_ENA_i), + .PL_WEN_i(PL_WEN_i), + .PL_REN_i(PL_REN_i), + .PL_CLK_i(PL_CLK_i), + .PL_ADDR_i(PL_ADDR_i), + .PL_DATA_i(PL_DATA_i), + .PL_INIT_o(PL_INIT_o), + .PL_ENA_o(PL_ENA_o), + .PL_WEN_o(PL_WEN_o), + .PL_REN_o(PL_REN_o), + .PL_CLK_o(PL_CLK_o), + .PL_ADDR_o(), + .PL_DATA_o(PL_DATA_o) + + ); endmodule // ------------------------------------------------------------------------ From d84e8edda58eb37e63d2ab220a49aeb91103b325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 3 Mar 2022 10:57:07 +0100 Subject: [PATCH 676/845] ql-qlf: qlf_k6n10f: bram: use 4 port matching rules to enable TDP RAM inference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams.txt | 45 ++++++++---------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams.txt b/ql-qlf-plugin/qlf_k6n10f/brams.txt index 5b11b1514..b8ba985bc 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams.txt +++ b/ql-qlf-plugin/qlf_k6n10f/brams.txt @@ -1,4 +1,3 @@ - bram $__QLF_FACTOR_BRAM36_TDP init 1 abits 10 @a10d36 @@ -13,43 +12,21 @@ bram $__QLF_FACTOR_BRAM36_TDP dbits 2 @a14d2 abits 15 @a15d1 dbits 1 @a15d1 - groups 2 - ports 1 1 - wrmode 0 1 - enable 1 4 @a10d36 - enable 1 2 @a11d18 - enable 1 1 @a12d9 @a13d4 @a14d2 @a15d1 - transp 0 0 - clocks 2 3 - clkpol 2 3 -endbram - -bram $__QLF_FACTOR_BRAM18_TDP - init 1 - abits 10 @a10d18 - dbits 18 @a10d18 - abits 11 @a11d9 - dbits 9 @a11d9 - abits 12 @a12d4 - dbits 4 @a12d4 - abits 13 @a13d2 - dbits 2 @a13d2 - abits 14 @a14d1 - dbits 1 @a14d1 - groups 2 - ports 1 1 - wrmode 0 1 - enable 1 2 @a10d18 - enable 1 1 @a11d9 @a12d4 @a13d2 @a14d1 - transp 0 0 - clocks 2 3 - clkpol 2 3 + groups 4 + ports 1 1 1 1 + wrmode 0 1 0 1 + enable 1 4 1 4 @a10d36 + enable 1 2 1 2 @a11d18 + enable 1 1 1 1 @a12d9 @a13d4 @a14d2 @a15d1 + transp 0 0 0 0 + clocks 1 1 2 2 + clkpol 1 1 1 1 endbram match $__QLF_FACTOR_BRAM36_TDP - min bits 128 - min efficiency 2 + max dbits 36 + max abits 15 shuffle_enable B make_transp endmatch From f7ab627652510e420196b6e3521f8ad25aa1d2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 3 Mar 2022 15:53:18 +0100 Subject: [PATCH 677/845] ql-qlf: qlf_k6n10f: bram: introduce TDP synthesis test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/Makefile | 4 +- .../tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl | 50 +++ .../tests/qlf_k6n10f/bram_tdp/bram_tdp.v | 284 ++++++++++++++++++ 3 files changed, 337 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 77938e39a..fef6c3166 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -23,7 +23,8 @@ TESTS = consts \ pp3_bram \ qlf_k6n10f/dsp_mult \ qlf_k6n10f/dsp_simd \ - qlf_k6n10f/dsp_macc + qlf_k6n10f/dsp_macc \ + qlf_k6n10f/bram_tdp # qlf_k6n10_bram \ SIM_TESTS = \ @@ -49,4 +50,5 @@ pp3_bram_verify = true qlf_k6n10f-dsp_mult_verify = true qlf_k6n10f-dsp_simd_verify = true qlf_k6n10f-dsp_macc_verify = true +qlf_k6n10f-bram_tdp_verify = true #qlf_k6n10_bram_verify = true diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl new file mode 100644 index 000000000..d304fa577 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl @@ -0,0 +1,50 @@ +yosys -import + +if { [info procs ql-qlf-k6n10f] == {} } { plugin -i ql-qlf } +yosys -import ; + +read_verilog $::env(DESIGN_TOP).v +design -save bram_tdp + +select BRAM_TDP_32x512 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_32x512 +opt_expr -undriven +opt_clean +stat +write_verilog bram_tdp_32x512_synth.v +select -assert-count 1 t:TDP_BRAM36 + +select -clear +design -load bram_tdp +select BRAM_TDP_16x1024 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_16x1024 +opt_expr -undriven +opt_clean +stat +write_verilog bram_tdp_16x1024_synth.v +select -assert-count 1 t:TDP_BRAM36 + +select -clear +design -load bram_tdp +select BRAM_TDP_8x2048 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_8x2048 +opt_expr -undriven +opt_clean +stat +write_verilog bram_tdp_8x2048_synth.v +select -assert-count 1 t:TDP_BRAM36 + +select -clear +design -load bram_tdp +select BRAM_TDP_4x4096 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_4x4096 +opt_expr -undriven +opt_clean +stat +write_verilog bram_tdp_4x4096_synth.v +select -assert-count 1 t:TDP_BRAM36 + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v new file mode 100644 index 000000000..3486fa210 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v @@ -0,0 +1,284 @@ +// Copyright (C) 2022 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module BRAM_TDP #(parameter AWIDTH = 9, +parameter DWIDTH = 32)( + clk_a, + rce_a, + ra_a, + rq_a, + wce_a, + wa_a, + wd_a, + + clk_b, + rce_b, + ra_b, + rq_b, + wce_b, + wa_b, + wd_b +); + + input clk_a; + input rce_a; + input [AWIDTH-1:0] ra_a; + output reg [DWIDTH-1:0] rq_a; + input wce_a; + input [AWIDTH-1:0] wa_a; + input [DWIDTH-1:0] wd_a; + + input clk_b; + input rce_b; + input [AWIDTH-1:0] ra_b; + output reg [DWIDTH-1:0] rq_b; + input wce_b; + input [AWIDTH-1:0] wa_b; + input [DWIDTH-1:0] wd_b; + + reg [DWIDTH-1:0] memory[0:(1< Date: Fri, 4 Mar 2022 13:35:28 +0100 Subject: [PATCH 678/845] tests: introduce post synthesis simulation infrastructure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- Makefile_test.common | 45 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/Makefile_test.common b/Makefile_test.common index db3cc3c1a..ca6ec1847 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -95,6 +95,47 @@ $(1)/ok: $(1)/$$(notdir $(1).vvp) $(1)/$$(notdir $(1).v) endef +define test_post_synth_sim_tpl = +$(1): $(1)/ok + @printf "Test %-18s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); + +$(1)/ok: $(1)/synth + @make -C $(1)/sim sim; \ + if [ $$$$? -ne 0 ]; then \ + printf "Test %-18s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ + false; \ + else \ + touch $$@; \ + true; \ + fi + +$(1)/synth: $(1)/$$(notdir $(1).v) + @set +e; \ + cd $(1); \ + echo "source $(TEST_UTILS)" > run-$$(notdir $(1)).tcl ;\ + echo "source $$(notdir $(1)).tcl" >> run-$$(notdir $(1)).tcl ;\ + DESIGN_TOP=$$(notdir $(1)) TEST_OUTPUT_PREFIX=./ \ + yosys -c "run-$$(notdir $(1)).tcl" -q -q -l $$(notdir $(1)).log; \ + RETVAL=$$$$?; \ + rm -f run-$$(notdir $(1)).tcl; \ + if [ ! -z "$$($(1)_negative)" ] && [ $$($(1)_negative) -eq 1 ]; then \ + if [ $$$$RETVAL -ne 0 ]; then \ + printf "Negative test %-20s \e[32mPASSED\e[0m @ %s\n" $(1) $(CURDIR); \ + true; \ + else \ + printf "Negative test %-20s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ + false; \ + fi \ + else \ + if [ $$$$RETVAL -ne 0 ]; then \ + echo "Unexpected runtime error"; \ + printf "Test %-20s \e[31;1mFAILED\e[0m @ %s\n" $(1) $(CURDIR); \ + false; \ + fi \ + fi + +endef + define unit_test_tpl = $(1): $(1)/$(1).test @$$< @@ -109,7 +150,7 @@ endef diff_test = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2) -all: $(TESTS) $(SIM_TESTS) $(UNIT_TESTS) +all: $(TESTS) $(SIM_TESTS) $(POST_SYNTH_SIM_TESTS) $(UNIT_TESTS) $(GTEST_DIR)/build/lib/libgtest.a $(GTEST_DIR)/build/lib/libgtest_main.a: @mkdir -p $(GTEST_DIR)/build @@ -121,10 +162,12 @@ $(GTEST_DIR)/build/lib/libgtest.a $(GTEST_DIR)/build/lib/libgtest_main.a: $(foreach test,$(TESTS),$(eval $(call test_tpl,$(test)))) $(foreach test,$(SIM_TESTS),$(eval $(call test_sim_tpl,$(test)))) +$(foreach test,$(POST_SYNTH_SIM_TESTS),$(eval $(call test_post_synth_sim_tpl,$(test)))) $(foreach test,$(UNIT_TESTS),$(eval $(call unit_test_tpl,$(test)))) clean: @rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test)_[0-9].sdc $(test)/$(test).txt $(test)/$(test).eblif $(test)/$(test).json) @rm -rf $(foreach test,$(SIM_TESTS),$(test)/*.vvp $(test)/*.vcd) + @rm -rf $(foreach test,$(POST_SYNTH_SIM_TESTS),$(test)/sim/*.vvp $(test)/sim/*.vcd $(test)/sim/*post_synth.v) @rm -rf $(foreach test,$(UNIT_TESTS),$(test)/$(test).test.o $(test)/$(test).test.d $(test)/$(test).test) @find . -name "ok" -or -name "*.log" | xargs rm -rf From bf82038de0f3f20cdd6c2409ffa75d1012107b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 4 Mar 2022 13:36:44 +0100 Subject: [PATCH 679/845] ql-qlf: qlf_k6n10f: bram: add post synthesis simulation tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/Makefile | 6 +- .../tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl | 8 +- .../tests/qlf_k6n10f/bram_tdp/sim/Makefile | 35 +++ .../qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v | 227 ++++++++++++++++++ 4 files changed, 270 insertions(+), 6 deletions(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index fef6c3166..21b68b69b 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -24,7 +24,6 @@ TESTS = consts \ qlf_k6n10f/dsp_mult \ qlf_k6n10f/dsp_simd \ qlf_k6n10f/dsp_macc \ - qlf_k6n10f/bram_tdp # qlf_k6n10_bram \ SIM_TESTS = \ @@ -32,6 +31,10 @@ SIM_TESTS = \ qlf_k6n10f/sim_dsp_mult_r \ qlf_k6n10f/sim_dsp_fir +# Those tests perform synthesis and simulation of synthesis results +POST_SYNTH_SIM_TESTS = \ + qlf_k6n10f/bram_tdp + include $(shell pwd)/../../Makefile_test.common consts_verify = true @@ -50,5 +53,4 @@ pp3_bram_verify = true qlf_k6n10f-dsp_mult_verify = true qlf_k6n10f-dsp_simd_verify = true qlf_k6n10f-dsp_macc_verify = true -qlf_k6n10f-bram_tdp_verify = true #qlf_k6n10_bram_verify = true diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl index d304fa577..f3a53490e 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl @@ -12,7 +12,7 @@ synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_32x512 opt_expr -undriven opt_clean stat -write_verilog bram_tdp_32x512_synth.v +write_verilog sim/bram_tdp_32x512_post_synth.v select -assert-count 1 t:TDP_BRAM36 select -clear @@ -23,7 +23,7 @@ synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_16x1024 opt_expr -undriven opt_clean stat -write_verilog bram_tdp_16x1024_synth.v +write_verilog sim/bram_tdp_16x1024_post_synth.v select -assert-count 1 t:TDP_BRAM36 select -clear @@ -34,7 +34,7 @@ synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_8x2048 opt_expr -undriven opt_clean stat -write_verilog bram_tdp_8x2048_synth.v +write_verilog sim/bram_tdp_8x2048_post_synth.v select -assert-count 1 t:TDP_BRAM36 select -clear @@ -45,6 +45,6 @@ synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_4x4096 opt_expr -undriven opt_clean stat -write_verilog bram_tdp_4x4096_synth.v +write_verilog sim/bram_tdp_4x4096_post_synth.v select -assert-count 1 t:TDP_BRAM36 diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile new file mode 100644 index 000000000..06b45cc47 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile @@ -0,0 +1,35 @@ +# Copyright (C) 2022 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + +TESTBENCH = bram_tdp_tb.v +POST_SYNTH = bram_tdp_32x512_post_synth bram_tdp_16x1024_post_synth bram_tdp_8x2048_post_synth bram_tdp_4x4096_post_synth +ADDR_WIDTH = 9 10 11 12 +DATA_WIDTH = 32 16 8 4 +TOP = BRAM_TDP_32x512 BRAM_TDP_16x1024 BRAM_TDP_8x2048 BRAM_TDP_4x4096 +TEST_CASES = $(seq 0 3) +ADDR_DEFINES = $(foreach awidth, $(ADDR_WIDTH),-DADDR_WIDTH="$(awidth)") +DATA_DEFINES = $(foreach dwidth, $(DATA_WIDTH),-DDATA_WIDTH="$(dwidth)") +TOP_DEFINES = $(foreach top, $(TOP),-DTOP="$(top)") +VCD_DEFINES = $(foreach vcd, $(POST_SYNTH),-DVCD="$(vcd).vcd") + +SIM_LIBS = $(shell find ../../../../qlf_k6n10f -name "*.v" -not -name "*_map.v") + +define simulate_post_synth + @iverilog -vvvv -g2005 $(word $(1),$(ADDR_DEFINES)) $(word $(1),$(DATA_DEFINES)) $(word $(1),$(TOP_DEFINES)) $(word $(1),$(VCD_DEFINES)) -o $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).v $(SIM_LIBS) $(TESTBENCH) > $(word $(1),$(POST_SYNTH)).vvp.log 2>&1 + @vvp -vvvv $(word $(1),$(POST_SYNTH)).vvp > $(word $(1),$(POST_SYNTH)).vcd.log 2>&1 +endef + +define clean_post_synth_sim + @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log +endef + +sim: + $(call simulate_post_synth,1) + $(call simulate_post_synth,2) + $(call simulate_post_synth,3) + $(call simulate_post_synth,4) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v new file mode 100644 index 000000000..90cbf4ee9 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v @@ -0,0 +1,227 @@ +// Copyright (C) 2022 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +`timescale 1ns/1ps + +`define STRINGIFY(x) `"x`" + +module TB; + localparam PERIOD = 50; + localparam ADDR_INCR = 1; + + reg clk_a; + reg rce_a; + reg [`ADDR_WIDTH-1:0] ra_a; + wire [`DATA_WIDTH-1:0] rq_a; + reg wce_a; + reg [`ADDR_WIDTH-1:0] wa_a; + reg [`DATA_WIDTH-1:0] wd_a; + + reg clk_b; + reg rce_b; + reg [`ADDR_WIDTH-1:0] ra_b; + wire [`DATA_WIDTH-1:0] rq_b; + reg wce_b; + reg [`ADDR_WIDTH-1:0] wa_b; + reg [`DATA_WIDTH-1:0] wd_b; + + + initial clk_a = 0; + initial clk_b = 0; + initial ra_a = 0; + initial ra_b = 0; + initial rce_a = 0; + initial rce_b = 0; + initial forever #(PERIOD / 2.0) clk_a = ~clk_a; + initial begin + #(PERIOD / 4.0); + forever #(PERIOD / 2.0) clk_b = ~clk_b; + end + initial begin + $dumpfile(`STRINGIFY(`VCD)); + $dumpvars; + end + + integer a; + integer b; + + reg done_a; + reg done_b; + initial done_a = 1'b0; + initial done_b = 1'b0; + wire done_sim = done_a & done_b; + + reg [`DATA_WIDTH-1:0] expected_a; + reg [`DATA_WIDTH-1:0] expected_b; + + always @(posedge clk_a) begin + expected_a <= (a | (a << 20) | 20'h55000) & {`DATA_WIDTH{1'b1}}; + end + always @(posedge clk_b) begin + expected_b <= (b | (b << 20) | 20'h55000) & {`DATA_WIDTH{1'b1}}; + end + + wire error_a = a != 0 ? rq_a !== expected_a : 0; + wire error_b = b != (1<<`ADDR_WIDTH) / 2 ? rq_b !== expected_b : 0; + + integer error_a_cnt = 0; + integer error_b_cnt = 0; + + always @ (posedge clk_a) + begin + if (error_a) + error_a_cnt <= error_a_cnt + 1'b1; + end + always @ (posedge clk_b) + begin + if (error_b) + error_b_cnt <= error_b_cnt + 1'b1; + end + // PORT A + initial #(1) begin + // Write data + for (a = 0; a < (1<<`ADDR_WIDTH) / 2; a = a + ADDR_INCR) begin + @(negedge clk_a) begin + wa_a = a; + wd_a = a | (a << 20) | 20'h55000; + wce_a = 1; + end + @(posedge clk_a) begin + #(PERIOD/10) wce_a = 0; + end + end + // Read data + for (a = 0; a < (1<<`ADDR_WIDTH) / 2; a = a + ADDR_INCR) begin + @(negedge clk_a) begin + ra_a = a; + rce_a = 1; + end + @(posedge clk_a) begin + #(PERIOD/10) rce_a = 0; + if ( rq_a !== expected_a) begin + $display("%d: PORT A: FAIL: mismatch act=%x exp=%x at %x", $time, rq_a, expected_a, a); + end else begin + $display("%d: PORT A: OK: act=%x exp=%x at %x", $time, rq_a, expected_a, a); + end + end + end + done_a = 1'b1; + end + + // PORT B + initial #(1) begin + // Write data + for (b = (1<<`ADDR_WIDTH) / 2; b < (1<<`ADDR_WIDTH); b = b + ADDR_INCR) begin + @(negedge clk_b) begin + wa_b = b; + wd_b = b | (b << 20) | 20'h55000; + wce_b = 1; + end + @(posedge clk_b) begin + #(PERIOD/10) wce_b = 0; + end + end + // Read data + for (b = (1<<`ADDR_WIDTH) / 2; b < (1<<`ADDR_WIDTH); b = b + ADDR_INCR) begin + @(negedge clk_b) begin + ra_b = b; + rce_b = 1; + end + @(posedge clk_b) begin + #(PERIOD/10) rce_b = 0; + if ( rq_b !== expected_b) begin + $display("%d: PORT B: FAIL: mismatch act=%x exp=%x at %x", $time, rq_b, expected_b, b); + end else begin + $display("%d: PORT B: OK: act=%x exp=%x at %x", $time, rq_b, expected_b, b); + end + end + end + done_b = 1'b1; + end + + // Scan for simulation finish + always @(posedge clk_a, posedge clk_b) begin + if (done_sim) + $finish_and_return( (error_a_cnt == 0 & error_b_cnt == 0) ? 0 : -1 ); + end + + case (`STRINGIFY(`TOP)) + "BRAM_TDP_32x512": begin + BRAM_TDP_32x512 #() bram ( + .clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b) + ); + end + "BRAM_TDP_16x1024": begin + BRAM_TDP_16x1024 #() bram ( + .clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b) + ); + end + "BRAM_TDP_8x2048": begin + BRAM_TDP_8x2048 #() bram ( + .clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b) + ); + end + "BRAM_TDP_4x4096": begin + BRAM_TDP_4x4096 #() bram ( + .clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b) + ); + end + endcase +endmodule From 2f7695e914dbb07a2ce8413443c30cb240caeedb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Tue, 8 Mar 2022 14:47:02 +0100 Subject: [PATCH 680/845] ql-qlf: qlf_k6n10f: bram: techmap: rearrange ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 181 ++++++++++++--------------- 1 file changed, 78 insertions(+), 103 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index 46f56fabd..262b1d4d3 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -6,6 +6,13 @@ // // SPDX-License-Identifier:ISC +`define MODE_36 3'b111 // 36 or 32-bit +`define MODE_18 3'b110 // 18 or 16-bit +`define MODE_9 3'b101 // 9 or 8-bit +`define MODE_4 3'b100 // 4-bit +`define MODE_2 3'b010 // 32-bit +`define MODE_1 3'b001 // 32-bit + module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, C1EN, CLK1, CLK2, D1ADDR, D1DATA, D1EN); parameter CFG_ABITS = 10; parameter CFG_DBITS = 36; @@ -16,13 +23,6 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 parameter CLKPOL3 = 1; parameter [36863:0] INIT = 36864'bx; - localparam MODE_36 = 3'b111; // 36 or 32-bit - localparam MODE_18 = 3'b110; // 18 or 16-bit - localparam MODE_9 = 3'b101; // 9 or 8-bit - localparam MODE_4 = 3'b100; // 4-bit - localparam MODE_2 = 3'b010; // 32-bit - localparam MODE_1 = 3'b001; // 32-bit - input CLK1; input CLK2; @@ -45,21 +45,6 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 wire FLUSH1; wire FLUSH2; wire SPLIT; - wire [10:0] UPAE1; - wire [10:0] UPAF1; - wire [10:0] UPAE2; - wire [10:0] UPAF2; - wire SYNC_FIFO1; - wire SYNC_FIFO2; - wire FMODE1; - wire FMODE2; - wire POWERDN1; - wire POWERDN2; - wire SLEEP1; - wire SLEEP2; - wire PROTECT1; - wire PROTECT2; - wire [8:0] RAM_ID_i; wire PL_INIT_i; wire PL_ENA_i; @@ -102,69 +87,85 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 1: begin assign PORT_A_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 15'd0); assign PORT_B_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 15'd0); - assign WMODE = MODE_1; - assign RMODE = MODE_1; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_1; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_1; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_1; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_1; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_1; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_1; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_1; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_1; end 2: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 1) : (B1EN ? (B1ADDR_TOTAL << 1) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 1) : (D1EN ? (D1ADDR_TOTAL << 1) : 15'd0); - assign WMODE = MODE_2; - assign RMODE = MODE_2; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_2; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_2; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_2; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_2; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_2; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_2; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_2; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_2; end 4: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 5) : (B1EN ? (B1ADDR_TOTAL << 5) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 5) : (D1EN ? (D1ADDR_TOTAL << 5) : 15'd0); - assign WMODE = MODE_4; - assign RMODE = MODE_4; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_4; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_4; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_4; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_4; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_4; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_4; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_4; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_4; end - 8: begin + 8, 9: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 3) : (B1EN ? (B1ADDR_TOTAL << 3) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 3) : (D1EN ? (D1ADDR_TOTAL << 3) : 15'd0); - assign WMODE = MODE_9; - assign RMODE = MODE_9; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_9; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_9; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_9; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_9; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_9; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_9; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_9; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_9; end - 9: begin - assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 3) : (B1EN ? (B1ADDR_TOTAL << 3) : 15'd0); - assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 3) : (D1EN ? (D1ADDR_TOTAL << 3) : 15'd0); - assign WMODE = MODE_9; - assign RMODE = MODE_9; - end - - 16: begin + 16, 18: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 4) : (B1EN ? (B1ADDR_TOTAL << 4) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 4) : (D1EN ? (D1ADDR_TOTAL << 4) : 15'd0); - assign WMODE = MODE_18; - assign RMODE = MODE_18; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_18; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_18; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_18; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_18; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_18; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_18; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_18; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_18; end - 18: begin - assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 4) : (B1EN ? (B1ADDR_TOTAL << 4) : 15'd0); - assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 4) : (D1EN ? (D1ADDR_TOTAL << 4) : 15'd0); - assign WMODE = MODE_18; - assign RMODE = MODE_18; - end - - 32: begin - assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 5) : (B1EN ? (B1ADDR_TOTAL << 5) : 15'd0); - assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 5) : (D1EN ? (D1ADDR_TOTAL << 5) : 15'd0); - assign WMODE = MODE_36; - assign RMODE = MODE_36; - end - 36: begin + 32, 36: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 5) : (B1EN ? (B1ADDR_TOTAL << 5) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 5) : (D1EN ? (D1ADDR_TOTAL << 5) : 15'd0); - assign WMODE = MODE_36; - assign RMODE = MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_36; end default: begin assign PORT_A_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 15'd0); assign PORT_B_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 15'd0); - assign WMODE = MODE_36; - assign RMODE = MODE_36; + assign WMODE = `MODE_36; + assign RMODE = `MODE_36; end endcase @@ -172,21 +173,6 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 assign SPLIT = 1'b0; assign FLUSH1 = 1'b0; assign FLUSH2 = 1'b0; - assign UPAE1 = 11'd10; - assign UPAF1 = 11'd10; - assign UPAE2 = 11'd10; - assign UPAF2 = 11'd10; - assign SYNC_FIFO1 = 1'b0; - assign SYNC_FIFO2 = 1'b0; - assign FMODE1 = 1'b0; - assign FMODE2 = 1'b0; - assign POWERDN1 = 1'b0; - assign POWERDN2 = 1'b0; - assign SLEEP1 = 1'b0; - assign SLEEP2 = 1'b0; - assign PROTECT1 = 1'b0; - assign PROTECT2 = 1'b0; - assign RAM_ID_i = 9'b0; assign PL_INIT_i = 1'b0; assign PL_ENA_i = 1'b0; @@ -196,12 +182,24 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 assign PL_ADDR_i = 24'b0; assign PL_DATA_i = 36'b0; - TDP_BRAM36 #() _TECHMAP_REPLACE_ ( - .WMODE_A1_i(WMODE), - .WMODE_A2_i(WMODE), - .RMODE_A1_i(RMODE), - .RMODE_A2_i(RMODE), - + TDP_BRAM36 #( + .UPAE1_i(12'd10), + .UPAF1_i(12'd10), + .UPAE2_i(12'd10), + .UPAF2_i(12'd10), + .SYNC_FIFO1_i(1'b0), + .SYNC_FIFO2_i(1'b0), + .FMODE1_i(1'b0), + .FMODE2_i(1'b0), + .POWERDN1_i(1'b0), + .POWERDN2_i(1'b0), + .SLEEP1_i(1'b0), + .SLEEP2_i(1'b0), + .PROTECT1_i(1'b0), + .PROTECT2_i(1'b0), + .RAM_ID_i(9'b0), + .SPLIT_i(1'b0) + ) _TECHMAP_REPLACE_ ( .WDATA_A1_i(B1DATA[17:0]), .WDATA_A2_i(B1DATA[35:18]), .RDATA_A1_o(A1DATA_TOTAL[17:0]), @@ -217,12 +215,6 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 .BE_A1_i({B1EN[1],B1EN[0]}), .BE_A2_i({B1EN[3],B1EN[2]}), - - .WMODE_B1_i(WMODE), - .WMODE_B2_i(WMODE), - .RMODE_B1_i(RMODE), - .RMODE_B2_i(RMODE), - .WDATA_B1_i(D1DATA[17:0]), .WDATA_B2_i(D1DATA[35:18]), .RDATA_B1_o(C1DATA_TOTAL[17:0]), @@ -238,25 +230,8 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 .BE_B1_i({D1EN[1],D1EN[0]}), .BE_B2_i({D1EN[3],D1EN[2]}), - - .SPLIT_i(SPLIT), .FLUSH1_i(FLUSH1), .FLUSH2_i(FLUSH2), - .UPAE1_i(UPAE1), - .UPAF1_i(UPAF1), - .UPAE2_i(UPAE2), - .UPAF2_i(UPAF2), - .SYNC_FIFO1_i(SYNC_FIFO1), - .SYNC_FIFO2_i(SYNC_FIFO2), - .FMODE1_i(FMODE1), - .FMODE2_i(FMODE2), - .POWERDN1_i(POWERDN1), - .POWERDN2_i(POWERDN2), - .SLEEP1_i(SLEEP1), - .SLEEP2_i(SLEEP2), - .PROTECT1_i(PROTECT1), - .PROTECT2_i(PROTECT2), - .RAM_ID_i(RAM_ID_i), .PL_INIT_i(PL_INIT_i), .PL_ENA_i(PL_ENA_i), From 41084dee1b8432b3df0661cf7e38f6d1dc7d04cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 9 Mar 2022 13:13:35 +0100 Subject: [PATCH 681/845] ql-qlf: qlf_k6n10f: bram: techmap: cleanup R/WMODES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index 262b1d4d3..d1a17a4c3 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -61,9 +61,6 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 reg [23:0] PL_ADDR_o; wire [35:0] PL_DATA_o; - wire [2:0] WMODE; - wire [2:0] RMODE; - wire [14:CFG_ABITS] A1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; wire [14:CFG_ABITS] B1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; wire [14:CFG_ABITS] C1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; @@ -164,8 +161,14 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 default: begin assign PORT_A_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 15'd0); assign PORT_B_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 15'd0); - assign WMODE = `MODE_36; - assign RMODE = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_36; end endcase From 97fbb80bf2d43a7f73f5e173aefc06ca87c80f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 9 Mar 2022 13:17:07 +0100 Subject: [PATCH 682/845] ql-qlf: qlf_k6n10f: bram: techmap: switch RAM_ID from parameter to port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index d1a17a4c3..59fbdd705 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -45,6 +45,7 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 wire FLUSH1; wire FLUSH2; wire SPLIT; + wire [15:0] RAM_ID; wire PL_INIT_i; wire PL_ENA_i; @@ -176,6 +177,7 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 assign SPLIT = 1'b0; assign FLUSH1 = 1'b0; assign FLUSH2 = 1'b0; + assign RAM_ID = 16'b0; assign PL_INIT_i = 1'b0; assign PL_ENA_i = 1'b0; @@ -200,7 +202,6 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 .SLEEP2_i(1'b0), .PROTECT1_i(1'b0), .PROTECT2_i(1'b0), - .RAM_ID_i(9'b0), .SPLIT_i(1'b0) ) _TECHMAP_REPLACE_ ( .WDATA_A1_i(B1DATA[17:0]), @@ -235,6 +236,7 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 .FLUSH1_i(FLUSH1), .FLUSH2_i(FLUSH2), + .RAM_ID_i(RAM_ID), .PL_INIT_i(PL_INIT_i), .PL_ENA_i(PL_ENA_i), From 862ec6bd4e5d2c6a480fa73144817d50c6c726e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 9 Mar 2022 13:46:18 +0100 Subject: [PATCH 683/845] ql-qlf: qlf_k6n10f: bram: sim: switch RAM_ID from parameter to port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v | 3 ++- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v index 235d0d2b2..696c2a795 100644 --- a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v +++ b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v @@ -34,6 +34,7 @@ module TDP18K_FIFO ( FWM, OVERRUN, FLUSH, + RAM_ID, FMODE, PL_INIT, PL_ENA, @@ -50,7 +51,6 @@ module TDP18K_FIFO ( parameter PROTECT = 1'b0; parameter UPAF = 11'b0; parameter UPAE = 11'b0; - parameter RAM_ID = 16'b0; input wire [2:0] RMODE_A; input wire [2:0] RMODE_B; @@ -81,6 +81,7 @@ module TDP18K_FIFO ( output wire FWM; output wire OVERRUN; input wire FLUSH; + input wire [15:0] RAM_ID; input wire FMODE; input PL_INIT; input PL_ENA; diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index ea310099d..262d7535b 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -518,6 +518,7 @@ module TDP_BRAM36 ( RDATA_A2_o, RDATA_B2_o, FLUSH2_i, + RAM_ID_i, PL_INIT_i, PL_ENA_i, PL_REN_i, @@ -558,7 +559,6 @@ module TDP_BRAM36 ( parameter UPAF2_i = 12'b0; parameter SPLIT_i = 1'b0; - parameter RAM_ID_i = 16'b0; parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; @@ -739,6 +739,7 @@ module TDP_BRAM36 ( output reg [17:0] RDATA_A2_o; output reg [17:0] RDATA_B2_o; input wire FLUSH2_i; + input wire [15:0] RAM_ID_i; input wire PL_INIT_i; input wire PL_ENA_i; input wire PL_REN_i; @@ -1138,8 +1139,7 @@ module TDP_BRAM36 ( .SYNC_FIFO(SYNC_FIFO1_i), .POWERDN(POWERDN1_i), .SLEEP(SLEEP1_i), - .PROTECT(PROTECT1_i), - .RAM_ID({RAM_ID_i}) + .PROTECT(PROTECT1_i) )u1( .RMODE_A(ram_rmode_a1), .RMODE_B(ram_rmode_b1), @@ -1168,6 +1168,7 @@ module TDP_BRAM36 ( .FWM(FWM1), .OVERRUN(OVERRUN1), .FLUSH(FLUSH1_i), + .RAM_ID({RAM_ID_i}), .FMODE(ram_fmode1), .PL_INIT(PL_INIT_i), .PL_ENA(PL_ENA_i), @@ -1184,8 +1185,7 @@ module TDP_BRAM36 ( .SYNC_FIFO(SYNC_FIFO2_i), .POWERDN(POWERDN2_i), .SLEEP(SLEEP2_i), - .PROTECT(PROTECT2_i), - .RAM_ID({RAM_ID_i}) + .PROTECT(PROTECT2_i) )u2( .RMODE_A(ram_rmode_a2), .RMODE_B(ram_rmode_b2), @@ -1214,6 +1214,7 @@ module TDP_BRAM36 ( .FWM(FWM2), .OVERRUN(OVERRUN2), .FLUSH(FLUSH2_i), + .RAM_ID({RAM_ID_i}), .FMODE(ram_fmode2), .PL_INIT(PL_INIT_i), .PL_ENA(PL_ENA_i), From c093b6580487d2ca14ed33f4422f241d9ce32625 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 9 Mar 2022 14:05:40 +0100 Subject: [PATCH 684/845] Fixed minor bugs in k6n10f DSP model and techmap Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 7 +++---- ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 95f3e78fd..ad84b3f82 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1273,7 +1273,6 @@ module QL_DSP1 ( parameter MODE_BITS = 27'b00000000000000000000000000; endmodule /* QL_DSP1 */ -(* blackbox *) module QL_DSP2 ( // TODO: Name subject to change input [19:0] a, input [17:0] b, @@ -1344,7 +1343,7 @@ module QL_DSP2 ( // TODO: Name subject to change .unsigned_b_i(unsigned_b), .clock_i(clk), - .reset_n_i(~reset), + .reset_n_i(reset), .saturate_enable_i(saturate_enable), .output_select_i(output_select), @@ -1380,7 +1379,7 @@ module QL_DSP2 ( // TODO: Name subject to change .unsigned_b_i(unsigned_b), .clock_i(clk), - .reset_n_i(~reset), + .reset_n_i(reset), .saturate_enable_i(saturate_enable), .output_select_i(output_select), @@ -1416,7 +1415,7 @@ module QL_DSP2 ( // TODO: Name subject to change .unsigned_b_i(unsigned_b), .clock_i(clk), - .reset_n_i(~reset), + .reset_n_i(reset), .saturate_enable_i(saturate_enable), .output_select_i(output_select), diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index 0ae6f3b44..e4c122078 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -46,7 +46,7 @@ module dsp_t1_20x18x64 ( .z (z_o), .dly_b (dly_b_o), - .clk (clk_i), + .clk (clock_i), .reset (reset_i), .feedback (feedback_i), @@ -113,7 +113,7 @@ module dsp_t1_10x9x32 ( .z (z), .dly_b (dly_b), - .clk (clk_i), + .clk (clock_i), .reset (reset_i), .feedback (feedback_i), diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index 9606c4f8f..fe0db9fb5 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -36,7 +36,7 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); .unsigned_a_i (!A_SIGNED), .unsigned_b_i (!B_SIGNED), - .output_select_i (2'd0), + .output_select_i (3'd0), .saturate_enable_i (1'b0), .shift_right_i (6'd0), .round_i (1'b0), @@ -78,7 +78,7 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); .unsigned_a_i (!A_SIGNED), .unsigned_b_i (!B_SIGNED), - .output_select_i (2'd0), + .output_select_i (3'd0), .saturate_enable_i (1'b0), .shift_right_i (6'd0), .round_i (1'b0), From 2e5d27f4966d0ea510800de88f184011464cce91 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 9 Mar 2022 14:06:15 +0100 Subject: [PATCH 685/845] Added equivalence checking tests for DSP multiplier and DSP SIMD inference Signed-off-by: Maciej Kurc --- .../tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl | 50 ++++++++++++++----- .../tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl | 39 +++++++++++++-- 2 files changed, 72 insertions(+), 17 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl index 75acb102b..b653836c3 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl @@ -1,3 +1,29 @@ +# For some tests the equiv_induct pass seems to hang if opt_expr + opt_clean +# are not invoked after techmapping. Therefore this function is used instead +# of the equiv_opt pass. +proc check_equiv {top} { + hierarchy -top ${top} + + design -save preopt + synth_quicklogic -family qlf_k6n10f -top ${top} + design -stash postopt + + design -copy-from preopt -as gold A:top + design -copy-from postopt -as gate A:top + + techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/cells_sim.v + yosys proc + opt_expr + opt_clean + + async2sync + equiv_make gold gate equiv + equiv_induct equiv + equiv_status -assert equiv + + return +} + yosys -import if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands @@ -7,29 +33,29 @@ design -save read set TOP "mult_16x16" design -load read -hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP -yosys cd $TOP +check_equiv ${TOP} +design -load postopt +yosys cd ${TOP} select -assert-count 1 t:QL_DSP2 set TOP "mult_20x18" design -load read -hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP -yosys cd $TOP +check_equiv ${TOP} +design -load postopt +yosys cd ${TOP} select -assert-count 1 t:QL_DSP2 set TOP "mult_8x8" design -load read -hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP -yosys cd $TOP +check_equiv ${TOP} +design -load postopt +yosys cd ${TOP} select -assert-count 1 t:QL_DSP2 set TOP "mult_10x9" design -load read -hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP -yosys cd $TOP +check_equiv ${TOP} +design -load postopt +yosys cd ${TOP} select -assert-count 1 t:QL_DSP2 diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl index dd061143d..0599d9598 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl @@ -1,3 +1,29 @@ +# For some tests the equiv_induct pass seems to hang if opt_expr + opt_clean +# are not invoked after techmapping. Therefore this function is used instead +# of the equiv_opt pass. +proc check_equiv {top} { + hierarchy -top ${top} + + design -save preopt + synth_quicklogic -family qlf_k6n10f -top ${top} + design -stash postopt + + design -copy-from preopt -as gold A:top + design -copy-from postopt -as gate A:top + + techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/cells_sim.v + yosys proc + opt_expr + opt_clean + + async2sync + equiv_make gold gate equiv + equiv_induct equiv + equiv_status -assert equiv + + return +} + yosys -import if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands @@ -8,8 +34,8 @@ design -save read set TOP "simd_mult" design -load read hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP -yosys cd $TOP +check_equiv ${TOP} +design -load postopt select -assert-count 0 t:dsp_t1_20x18x64 select -assert-count 0 t:dsp_t1_10x9x32 select -assert-count 1 t:QL_DSP2 @@ -17,7 +43,8 @@ select -assert-count 1 t:QL_DSP2 set TOP "simd_mult_inferred" design -load read hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP +check_equiv ${TOP} +design -load postopt yosys cd $TOP select -assert-count 0 t:dsp_t1_20x18x64 select -assert-count 0 t:dsp_t1_10x9x32 @@ -26,7 +53,8 @@ select -assert-count 1 t:QL_DSP2 set TOP "simd_mult_odd" design -load read hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP +check_equiv ${TOP} +design -load postopt yosys cd $TOP select -assert-count 0 t:dsp_t1_20x18x64 select -assert-count 0 t:dsp_t1_10x9x32 @@ -35,7 +63,8 @@ select -assert-count 2 t:QL_DSP2 set TOP "simd_mult_conflict" design -load read hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP +check_equiv ${TOP} +design -load postopt yosys cd $TOP select -assert-count 0 t:dsp_t1_20x18x64 select -assert-count 0 t:dsp_t1_10x9x32 From 95ddca13539ac0272033d10a859b7f8455a5e44c Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 9 Mar 2022 16:36:04 +0100 Subject: [PATCH 686/845] Fixed bugs in the k6n10f dsp_macc inference pass Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-macc.cc | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index c422d3107..f95ca87e2 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -55,6 +55,11 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) } } + // Accept only posedge clocked FFs + if (st.ff->getParam(ID(CLK_POLARITY)) != RTLIL::S1) { + return; + } + // Get port widths size_t a_width = GetSize(st.mul->getPort(ID(A))); size_t b_width = GetSize(st.mul->getPort(ID(B))); @@ -146,13 +151,21 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) RTLIL::SigSpec ena; if (st.ff->hasPort(ID(ARST))) { - rst = st.ff->getPort(ID(ARST)); + if (st.ff->getParam(ID(ARST_POLARITY)) != RTLIL::S0) { + rst = pm.module->Not(NEW_ID, st.ff->getPort(ID(ARST))); + } else { + rst = st.ff->getPort(ID(ARST)); + } } else { - rst = RTLIL::SigSpec(RTLIL::S0); + rst = RTLIL::SigSpec(RTLIL::S1); } if (st.ff->hasPort(ID(EN))) { - ena = st.ff->getPort(ID(EN)); + if (st.ff->getParam(ID(EN_POLARITY)) != RTLIL::S1) { + ena = pm.module->Not(NEW_ID, st.ff->getPort(ID(EN))); + } else { + ena = st.ff->getPort(ID(EN)); + } } else { ena = RTLIL::SigSpec(RTLIL::S1); } @@ -166,19 +179,20 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) // Depending on the mux port ordering insert inverter if needed log_assert(st.mux_ab == ID(A) || st.mux_ab == ID(B)); - if (st.mux_ab == ID(B)) { + if (st.mux_ab == ID(A)) { sig_s = pm.module->Not(NEW_ID, sig_s); } // Assemble the full control signal for the feedback_i port RTLIL::SigSpec sig_f; - sig_f.append(RTLIL::S0); sig_f.append(sig_s); + sig_f.append(RTLIL::S0); + sig_f.append(RTLIL::S0); cell->setPort(RTLIL::escape_id("feedback_i"), sig_f); } // No acc clear/load else { - cell->setPort(RTLIL::escape_id("feedback_i"), RTLIL::SigSpec(RTLIL::S0, 2)); + cell->setPort(RTLIL::escape_id("feedback_i"), RTLIL::SigSpec(RTLIL::S0, 3)); } // Connect control ports @@ -196,7 +210,7 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) // 3 - output post acc // 1 - output pre acc - cell->setPort(RTLIL::escape_id("output_select_i"), out_ff ? RTLIL::Const(3, 3) : RTLIL::Const(1, 3)); + cell->setPort(RTLIL::escape_id("output_select_i"), out_ff ? RTLIL::Const(1, 3) : RTLIL::Const(3, 3)); // Mark the cells for removal pm.autoremove(st.mul); From 753b8bed70ed2c2162e0306b5fe5ffe191ab5f7c Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 9 Mar 2022 16:37:13 +0100 Subject: [PATCH 687/845] Added equivalence check tests for k6n10f DSP MACC inference Signed-off-by: Maciej Kurc --- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 83 +++++++++++++------ 1 file changed, 58 insertions(+), 25 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl index 2de3bdc7f..468f42133 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -1,3 +1,29 @@ +# For some tests the equiv_induct pass seems to hang if opt_expr + opt_clean +# are not invoked after techmapping. Therefore this function is used instead +# of the equiv_opt pass. +proc check_equiv {top} { + hierarchy -top ${top} + + design -save preopt + synth_quicklogic -family qlf_k6n10f -top ${top} + design -stash postopt + + design -copy-from preopt -as gold A:top + design -copy-from postopt -as gate A:top + + techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/cells_sim.v + yosys proc + opt_expr + opt_clean -purge + + async2sync + equiv_make gold gate equiv + equiv_induct equiv + equiv_status -assert equiv + + return +} + yosys -import if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands @@ -8,7 +34,8 @@ design -save read set TOP "macc_simple" design -load read hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP +check_equiv $TOP +design -load postopt yosys cd $TOP select -assert-count 1 t:QL_DSP2 select -assert-count 1 t:* @@ -16,41 +43,47 @@ select -assert-count 1 t:* set TOP "macc_simple_clr" design -load read hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP +check_equiv $TOP +design -load postopt yosys cd $TOP select -assert-count 1 t:QL_DSP2 -select -assert-count 1 t:\$lut -select -assert-count 2 t:* +select -assert-count 1 t:* set TOP "macc_simple_arst" design -load read hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP +check_equiv $TOP +design -load postopt yosys cd $TOP select -assert-count 1 t:QL_DSP2 -select -assert-count 1 t:* +select -assert-count 2 t:* -set TOP "macc_simple_ena" -design -load read -hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP -yosys cd $TOP -select -assert-count 1 t:QL_DSP2 -select -assert-count 1 t:* +#FIXME: DSP not inferred (got $mux instead of $dffe) +#set TOP "macc_simple_ena" +#design -load read +#hierarchy -top $TOP +#check_equiv $TOP +#design -load postopt +#yosys cd $TOP +#select -assert-count 1 t:QL_DSP2 +#select -assert-count 1 t:* -set TOP "macc_simple_arst_clr_ena" -design -load read -hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP -yosys cd $TOP -select -assert-count 1 t:QL_DSP2 -select -assert-count 1 t:\$lut -select -assert-count 2 t:* +#FIXME: DSP not inferred (got $mux instead of $dffe) +#set TOP "macc_simple_arst_clr_ena" +#design -load read +#hierarchy -top $TOP +#check_equiv $TOP +#design -load postopt +#yosys cd $TOP +#select -assert-count 1 t:QL_DSP2 +#select -assert-count 1 t:\$lut +#select -assert-count 2 t:* set TOP "macc_simple_preacc" design -load read hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP +check_equiv $TOP +design -load postopt yosys cd $TOP select -assert-count 1 t:QL_DSP2 select -assert-count 1 t:* @@ -58,9 +91,9 @@ select -assert-count 1 t:* set TOP "macc_simple_preacc_clr" design -load read hierarchy -top $TOP -synth_quicklogic -family qlf_k6n10f -top $TOP +check_equiv $TOP +design -load postopt yosys cd $TOP select -assert-count 1 t:QL_DSP2 -select -assert-count 1 t:\$lut -select -assert-count 2 t:* +select -assert-count 1 t:* From db952e9a83008a39932c7511b2995d09c09ff733 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 10 Mar 2022 10:39:43 +0100 Subject: [PATCH 688/845] Added installation of k6n10f simulation models that were missing Signed-off-by: Maciej Kurc --- ql-qlf-plugin/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 00a7c4b14..7d1e14d97 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -40,6 +40,9 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10F_DIR)/brams_map.v \ $(QLF_K6N10F_DIR)/brams.txt \ $(QLF_K6N10F_DIR)/cells_sim.v \ + $(QLF_K6N10F_DIR)/sram1024x18.v \ + $(QLF_K6N10F_DIR)/TDP18Kx18_FIFO.v \ + $(QLF_K6N10F_DIR)/ufifo_ctl.v \ $(QLF_K6N10F_DIR)/ffs_map.v \ $(QLF_K6N10F_DIR)/dsp_map.v \ $(QLF_K6N10F_DIR)/dsp_final_map.v \ From b48c60585b69cfa7e01ad653ef05b9edec580ba6 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 14 Mar 2022 13:06:41 +0100 Subject: [PATCH 689/845] Removed declaration of IdString variables as const members of the ql_dsp_simd pass class. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-simd.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index f84c45881..5e3a6bb00 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -80,9 +80,9 @@ struct QlDspSimdPass : public Pass { const std::vector m_DspParams = {"COEFF_0", "COEFF_1", "COEFF_2", "COEFF_3"}; // Source DSP cell type (SISD) - const RTLIL::IdString m_SisdDspType = RTLIL::escape_id("dsp_t1_10x9x32"); + const std::string m_SisdDspType = "dsp_t1_10x9x32"; // Target DSP cell type for the SIMD mode - const RTLIL::IdString m_SimdDspType = RTLIL::escape_id("QL_DSP2"); + const std::string m_SimdDspType = "QL_DSP2"; /// Temporary SigBit to SigBit helper map. SigMap m_SigMap; @@ -108,7 +108,7 @@ struct QlDspSimdPass : public Pass { for (auto cell : module->selected_cells()) { // Check if this is a DSP cell - if (cell->type != m_SisdDspType) { + if (cell->type != RTLIL::escape_id(m_SisdDspType)) { continue; } @@ -143,15 +143,15 @@ struct QlDspSimdPass : public Pass { log(" SIMD: %s (%s) + %s (%s) => %s (%s)\n", RTLIL::unescape_id(dsp_a->name).c_str(), RTLIL::unescape_id(dsp_a->type).c_str(), RTLIL::unescape_id(dsp_b->name).c_str(), RTLIL::unescape_id(dsp_b->type).c_str(), RTLIL::unescape_id(name).c_str(), - RTLIL::unescape_id(m_SimdDspType).c_str()); + m_SimdDspType.c_str()); // Create the new cell - RTLIL::Cell *simd = module->addCell(RTLIL::escape_id(name), m_SimdDspType); + RTLIL::Cell *simd = module->addCell(RTLIL::escape_id(name), RTLIL::escape_id(m_SimdDspType)); // Check if the target cell is known (important to know // its port widths) if (!simd->known()) { - log_error(" The target cell type '%s' is not known!", RTLIL::unescape_id(m_SimdDspType).c_str()); + log_error(" The target cell type '%s' is not known!", m_SimdDspType.c_str()); } // Connect common ports From af9d4b2353dd7953a630aaecf2c2f8eaa8559c80 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Tue, 15 Mar 2022 07:54:24 -0700 Subject: [PATCH 690/845] update adder techmap to implement last 2 bits into regular logic Signed-off-by: Tarachand Pagarani --- ql-qlf-plugin/qlf_k6n10f/arith_map.v | 26 +++++++++++++++---- ql-qlf-plugin/tests/full_adder/full_adder.tcl | 6 ++--- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/arith_map.v b/ql-qlf-plugin/qlf_k6n10f/arith_map.v index 25c69016c..c5dd2217a 100644 --- a/ql-qlf-plugin/qlf_k6n10f/arith_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/arith_map.v @@ -9,9 +9,9 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); parameter A_SIGNED = 0; parameter B_SIGNED = 0; - parameter A_WIDTH = 1; - parameter B_WIDTH = 1; - parameter Y_WIDTH = 1; + parameter A_WIDTH = 2; + parameter B_WIDTH = 2; + parameter Y_WIDTH = 2; parameter _TECHMAP_CONSTVAL_CI_ = 0; parameter _TECHMAP_CONSTMSK_CI_ = 0; @@ -40,14 +40,15 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); wire [Y_WIDTH-1:0] BB = BI ? ~B_buf : B_buf; genvar i; + wire co; (* force_downto *) //wire [Y_WIDTH-1:0] C = {CO, CI}; wire [Y_WIDTH:0] C; (* force_downto *) wire [Y_WIDTH-1:0] S = {AA ^ BB}; - assign CO[Y_WIDTH-1:0] = C[Y_WIDTH:1]; + //assign CO[Y_WIDTH-1] = co; generate adder_carry intermediate_adder ( @@ -59,7 +60,7 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); ); endgenerate genvar i; - generate for (i = 0; i < Y_WIDTH; i = i + 1) begin:slice + generate for (i = 0; i < Y_WIDTH-2; i = i + 1) begin:slice adder_carry my_adder ( .cin(C[i]), .g(AA[i]), @@ -68,6 +69,21 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); .sumout(Y[i]) ); end endgenerate + generate + adder_carry final_adder ( + .cin (C[Y_WIDTH-2]), + .cout (), + .p (1'b0), + .g (1'b0), + .sumout (co) + ); + endgenerate + + assign Y[Y_WIDTH-2] = S[Y_WIDTH-2] ^ co; + assign C[Y_WIDTH-1] = S[Y_WIDTH-2] ? co : AA[Y_WIDTH-2]; + assign Y[Y_WIDTH-1] = S[Y_WIDTH-1] ^ C[Y_WIDTH-1]; + assign C[Y_WIDTH] = S[Y_WIDTH-1] ? C[Y_WIDTH-1] : AA[Y_WIDTH-1]; + assign X = S; endmodule diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index 41443f403..deef6b535 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -68,7 +68,7 @@ equiv_opt -assert -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -fa design -load postopt yosys cd full_adder stat -select -assert-count 6 t:adder_carry +select -assert-count 5 t:adder_carry design -reset @@ -80,7 +80,7 @@ equiv_opt -assert -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -fa design -load postopt yosys cd subtractor stat -select -assert-count 6 t:adder_carry +select -assert-count 5 t:adder_carry design -reset @@ -92,7 +92,7 @@ equiv_opt -assert -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -fa design -load postopt yosys cd comparator stat -select -assert-count 5 t:adder_carry +select -assert-count 4 t:adder_carry design -reset From 3494b2b1ba02a319dd74aee87998bc3e0d328819 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Wed, 16 Mar 2022 11:14:24 +0100 Subject: [PATCH 691/845] Add 'read_systemverilog' command This works as an alias to 'read_verilog_with_uhdm' Signed-off-by: Tomasz Gorochowik --- uhdm-plugin/uhdmsurelogastfrontend.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index ce7977249..9a00ba694 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -78,6 +78,7 @@ std::vector executeCompilation(SURELOG::SymbolTable *symbolTable, SUR } struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { + UhdmSurelogAstFrontend(std::string name, std::string short_help) : UhdmCommonFrontend(name, short_help) {} UhdmSurelogAstFrontend() : UhdmCommonFrontend("verilog_with_uhdm", "generate/read UHDM file") {} void print_read_options() override { @@ -129,4 +130,8 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { void call_log_header(RTLIL::Design *design) override { log_header(design, "Executing Verilog with UHDM frontend.\n"); } } UhdmSurelogAstFrontend; +struct UhdmSystemVerilogFrontend : public UhdmSurelogAstFrontend { + UhdmSystemVerilogFrontend() : UhdmSurelogAstFrontend("systemverilog", "read SystemVerilog files") {} +} UhdmSystemVerilogFrontend; + YOSYS_NAMESPACE_END From 47c71ac99e57be8f92184b0941e5b96b4bca7cc3 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Wed, 16 Mar 2022 15:18:42 +0100 Subject: [PATCH 692/845] Force -parse flag for Surelog when reading Verilog directly Signed-off-by: Tomasz Gorochowik --- uhdm-plugin/uhdmsurelogastfrontend.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index ce7977249..24bcbb1a3 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc @@ -110,6 +110,12 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { if (!success) { log_error("Error parsing Surelog arguments!\n"); } + // Force -parse flag settings even if it wasn't specified + clp->setwritePpOutput(true); + clp->setParse(true); + clp->setCompile(true); + clp->setElaborate(true); + SURELOG::scompiler *compiler = nullptr; const std::vector uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); From 3c891441e181f64102df78741ca0d8a051fc2819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 4 Mar 2022 14:13:10 +0100 Subject: [PATCH 693/845] ql-qlf: qlf_k6n10f: bram: introduce BRAM36_SDP techmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 249 ++++++++++++++++++++++++++- 1 file changed, 247 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index 59fbdd705..a98d7f0e6 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -109,8 +109,8 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 end 4: begin - assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 5) : (B1EN ? (B1ADDR_TOTAL << 5) : 15'd0); - assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 5) : (D1EN ? (D1ADDR_TOTAL << 5) : 15'd0); + assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 2) : (B1EN ? (B1ADDR_TOTAL << 2) : 15'd0); + assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 2) : (D1EN ? (D1ADDR_TOTAL << 2) : 15'd0); defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_4; defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_4; defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_4; @@ -374,3 +374,248 @@ module \$__QLF_FACTOR_BRAM18_TDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA ); end endgenerate endmodule + +module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + parameter CFG_ABITS = 10; + parameter CFG_DBITS = 36; + parameter CFG_ENABLE_B = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [36863:0] INIT = 36864'bx; + + localparam MODE_36 = 3'b111; // 36 or 32-bit + localparam MODE_18 = 3'b110; // 18 or 16-bit + localparam MODE_9 = 3'b101; // 9 or 8-bit + localparam MODE_4 = 3'b100; // 4-bit + localparam MODE_2 = 3'b010; // 32-bit + localparam MODE_1 = 3'b001; // 32-bit + + input CLK2; + input CLK3; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + wire [14:0] A1ADDR_15; + wire [14:0] B1ADDR_15; + + wire [35:0] DOBDO; + + wire [14:CFG_ABITS] A1ADDR_CMPL; + wire [14:CFG_ABITS] B1ADDR_CMPL; + wire [35:CFG_DBITS] A1DATA_CMPL; + wire [35:CFG_DBITS] B1DATA_CMPL; + + wire [14:0] A1ADDR_TOTAL; + wire [14:0] B1ADDR_TOTAL; + wire [35:0] A1DATA_TOTAL; + wire [35:0] B1DATA_TOTAL; + + wire FLUSH1; + wire FLUSH2; + wire [15:0] RAM_ID; + + wire PL_INIT_i; + wire PL_ENA_i; + wire PL_REN_i; + wire PL_CLK_i; + wire [1:0] PL_WEN_i; + wire [23:0] PL_ADDR_i; + wire [35:0] PL_DATA_i; + reg PL_INIT_o; + reg PL_ENA_o; + reg PL_REN_o; + reg PL_CLK_o; + reg [1:0] PL_WEN_o; + reg [23:0] PL_ADDR_o; + wire [35:0] PL_DATA_o; + + wire [2:0] WMODE; + wire [2:0] RMODE; + + assign A1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; + assign B1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; + + assign A1ADDR_TOTAL = {A1ADDR_CMPL, A1ADDR}; + assign B1ADDR_TOTAL = {B1ADDR_CMPL, B1ADDR}; + + assign A1DATA_TOTAL = {A1DATA_CMPL, A1DATA}; + assign B1DATA_TOTAL = {B1DATA_CMPL, B1DATA}; + + case (CFG_DBITS) + 1: begin + assign A1ADDR_15 = A1ADDR_TOTAL; + assign B1ADDR_15 = B1ADDR_TOTAL; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_1; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_1; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_1; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_1; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_1; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_1; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_1; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_1; + end + + 2: begin + assign A1ADDR_15 = A1ADDR_TOTAL << 1; + assign B1ADDR_15 = B1ADDR_TOTAL << 1; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_2; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_2; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_2; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_2; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_2; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_2; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_2; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_2; + end + + 4: begin + assign A1ADDR_15 = A1ADDR_TOTAL << 2; + assign B1ADDR_15 = B1ADDR_TOTAL << 2; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_4; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_4; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_4; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_4; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_4; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_4; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_4; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_4; + end + 8, 9: begin + assign A1ADDR_15 = A1ADDR_TOTAL << 3; + assign B1ADDR_15 = B1ADDR_TOTAL << 3; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_9; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_9; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_9; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_9; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_9; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_9; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_9; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_9; + end + + 16, 18: begin + assign A1ADDR_15 = A1ADDR_TOTAL << 4; + assign B1ADDR_15 = B1ADDR_TOTAL << 4; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_18; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_18; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_18; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_18; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_18; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_18; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_18; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_18; + end + 32, 36: begin + assign A1ADDR_15 = A1ADDR_TOTAL << 5; + assign B1ADDR_15 = B1ADDR_TOTAL << 5; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_36; + end + default: begin + assign A1ADDR_15 = A1ADDR_TOTAL; + assign B1ADDR_15 = B1ADDR_TOTAL; + defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_36; + defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_36; + end + endcase + + + assign FLUSH1 = 1'b0; + assign FLUSH2 = 1'b0; + assign RAM_ID = 16'b0; + assign PL_INIT_i = 1'b0; + assign PL_ENA_i = 1'b0; + assign PL_REN_i = 1'b0; + assign PL_CLK_i = 1'b0; + assign PL_WEN_i = 2'b0; + assign PL_ADDR_i = 24'b0; + assign PL_DATA_i = 36'b0; + + TDP_BRAM36 #( + .UPAE1_i(12'd10), + .UPAF1_i(12'd10), + .UPAE2_i(12'd10), + .UPAF2_i(12'd10), + .SYNC_FIFO1_i(1'b0), + .SYNC_FIFO2_i(1'b0), + .FMODE1_i(1'b0), + .FMODE2_i(1'b0), + .POWERDN1_i(1'b0), + .POWERDN2_i(1'b0), + .SLEEP1_i(1'b0), + .SLEEP2_i(1'b0), + .PROTECT1_i(1'b0), + .PROTECT2_i(1'b0), + .SPLIT_i(1'b0) + ) _TECHMAP_REPLACE_ ( + .WDATA_A1_i(18'h3FFFF), + .WDATA_A2_i(18'h3FFFF), + .RDATA_A1_o(A1DATA_TOTAL[17:0]), + .RDATA_A2_o(A1DATA_TOTAL[35:18]), + .ADDR_A1_i(A1ADDR_15), + .ADDR_A2_i(A1ADDR_15), + .CLK_A1_i(CLK2), + .CLK_A2_i(CLK2), + .REN_A1_i(A1EN), + .REN_A2_i(A1EN), + .WEN_A1_i(1'b0), + .WEN_A2_i(1'b0), + .BE_A1_i({A1EN, A1EN}), + .BE_A2_i({A1EN, A1EN}), + + .WDATA_B1_i(B1DATA[17:0]), + .WDATA_B2_i(B1DATA[35:18]), + .RDATA_B1_o(DOBDO[17:0]), + .RDATA_B2_o(DOBDO[35:18]), + .ADDR_B1_i(B1ADDR_15), + .ADDR_B2_i(B1ADDR_15), + .CLK_B1_i(CLK3), + .CLK_B2_i(CLK3), + .REN_B1_i(1'b0), + .REN_B2_i(1'b0), + .WEN_B1_i(B1EN[0]), + .WEN_B2_i(B1EN[0]), + .BE_B1_i(B1EN[1:0]), + .BE_B2_i(B1EN[3:2]), + + .FLUSH1_i(FLUSH1), + .FLUSH2_i(FLUSH2), + .RAM_ID_i(RAM_ID), + + .PL_INIT_i(PL_INIT_i), + .PL_ENA_i(PL_ENA_i), + .PL_WEN_i(PL_WEN_i), + .PL_REN_i(PL_REN_i), + .PL_CLK_i(PL_CLK_i), + .PL_ADDR_i(PL_ADDR_i), + .PL_DATA_i(PL_DATA_i), + .PL_INIT_o(PL_INIT_o), + .PL_ENA_o(PL_ENA_o), + .PL_WEN_o(PL_WEN_o), + .PL_REN_o(PL_REN_o), + .PL_CLK_o(PL_CLK_o), + .PL_ADDR_o(), + .PL_DATA_o(PL_DATA_o) + + ); +endmodule + From 287027c2d2a4c7c7a8a6c17cb07f9db3dc240a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 4 Mar 2022 14:15:11 +0100 Subject: [PATCH 694/845] ql-qlf: qlf_k6n10f: bram: introduce BRAM36_SDP matching rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams.txt | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams.txt b/ql-qlf-plugin/qlf_k6n10f/brams.txt index b8ba985bc..ab60c27ad 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams.txt +++ b/ql-qlf-plugin/qlf_k6n10f/brams.txt @@ -23,10 +23,51 @@ bram $__QLF_FACTOR_BRAM36_TDP clkpol 1 1 1 1 endbram +bram $__QLF_FACTOR_BRAM36_SDP + init 1 + abits 10 @a10d36 + dbits 36 @a10d36 + abits 11 @a11d18 + dbits 18 @a11d18 + abits 12 @a12d9 + dbits 9 @a12d9 + abits 13 @a13d4 + dbits 4 @a13d4 + abits 14 @a14d2 + dbits 2 @a14d2 + abits 15 @a15d1 + dbits 1 @a15d1 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 4 @a10d36 + enable 1 2 @a11d18 + enable 1 1 @a12d9 @a13d4 @a14d2 @a15d1 + transp 0 0 + clocks 2 3 + clkpol 2 3 +endbram + match $__QLF_FACTOR_BRAM36_TDP max dbits 36 max abits 15 + min wports 1 + max wports 2 + min rports 1 + max rports 2 + min efficiency 2 + shuffle_enable B + make_transp + or_next_if_better +endmatch + +match $__QLF_FACTOR_BRAM36_SDP + max dbits 36 + max abits 15 + max wports 1 + max rports 1 + min efficiency 2 shuffle_enable B make_transp endmatch From f3041506208e836d479f82009e5661375411b317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 7 Mar 2022 13:09:45 +0100 Subject: [PATCH 695/845] ql-qlf: qlf_k6n10f: bram: add SDP simulation tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/Makefile | 3 +- .../tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl | 50 +++++ .../tests/qlf_k6n10f/bram_sdp/bram_sdp.v | 177 ++++++++++++++++++ .../tests/qlf_k6n10f/bram_sdp/sim/Makefile | 35 ++++ .../qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v | 140 ++++++++++++++ 5 files changed, 404 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 21b68b69b..639fb6380 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -33,7 +33,8 @@ SIM_TESTS = \ # Those tests perform synthesis and simulation of synthesis results POST_SYNTH_SIM_TESTS = \ - qlf_k6n10f/bram_tdp + qlf_k6n10f/bram_tdp \ + qlf_k6n10f/bram_sdp include $(shell pwd)/../../Makefile_test.common diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl new file mode 100644 index 000000000..5e9379ed7 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl @@ -0,0 +1,50 @@ +yosys -import + +if { [info procs ql-qlf-k6n10f] == {} } { plugin -i ql-qlf } +yosys -import ; + +read_verilog $::env(DESIGN_TOP).v +design -save bram_sdp + +select BRAM_SDP_32x512 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_32x512 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_32x512_post_synth.v +select -assert-count 1 t:TDP_BRAM36 + +select -clear +design -load bram_sdp +select BRAM_SDP_16x1024 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_16x1024 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_16x1024_post_synth.v +select -assert-count 1 t:TDP_BRAM36 + +select -clear +design -load bram_sdp +select BRAM_SDP_8x2048 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_8x2048 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_8x2048_post_synth.v +select -assert-count 1 t:TDP_BRAM36 + +select -clear +design -load bram_sdp +select BRAM_SDP_4x4096 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_4x4096 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_4x4096_post_synth.v +select -assert-count 1 t:TDP_BRAM36 + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v new file mode 100644 index 000000000..8433c568c --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v @@ -0,0 +1,177 @@ +// Copyright (C) 2022 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +module BRAM_SDP #(parameter AWIDTH = 9, +parameter DWIDTH = 32)( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + + input clk; + + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + + reg [DWIDTH-1:0] memory[0:(1< $(word $(1),$(POST_SYNTH)).vvp.log 2>&1 + @vvp -vvvv $(word $(1),$(POST_SYNTH)).vvp > $(word $(1),$(POST_SYNTH)).vcd.log 2>&1 +endef + +define clean_post_synth_sim + @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log +endef + +sim: + $(call simulate_post_synth,1) + $(call simulate_post_synth,2) + $(call simulate_post_synth,3) + $(call simulate_post_synth,4) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v new file mode 100644 index 000000000..d5af76701 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v @@ -0,0 +1,140 @@ +// Copyright (C) 2022 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +`timescale 1ns/1ps + +`define STRINGIFY(x) `"x`" + +module TB; + localparam PERIOD = 50; + localparam ADDR_INCR = 1; + + reg clk; + reg rce; + reg [`ADDR_WIDTH-1:0] ra; + wire [`DATA_WIDTH-1:0] rq; + reg wce; + reg [`ADDR_WIDTH-1:0] wa; + reg [`DATA_WIDTH-1:0] wd; + + initial clk = 0; + initial ra = 0; + initial rce = 0; + initial forever #(PERIOD / 2.0) clk = ~clk; + initial begin + $dumpfile(`STRINGIFY(`VCD)); + $dumpvars; + end + + integer a; + + reg done; + initial done = 1'b0; + + reg [`DATA_WIDTH-1:0] expected; + + always @(posedge clk) begin + expected <= (a | (a << 20) | 20'h55000) & {`DATA_WIDTH{1'b1}}; + end + + wire error = ((a != 0) && read_test) ? rq !== expected : 0; + + integer error_cnt = 0; + always @ (posedge clk) + begin + if (error) + error_cnt <= error_cnt + 1'b1; + end + + reg read_test; + initial read_test = 0; + + initial #(1) begin + // Write data + for (a = 0; a < (1<<`ADDR_WIDTH); a = a + ADDR_INCR) begin + @(negedge clk) begin + wa = a; + wd = a | (a << 20) | 20'h55000; + wce = 1; + end + @(posedge clk) begin + #(PERIOD/10) wce = 0; + end + end + // Read data + read_test = 1; + for (a = 0; a < (1<<`ADDR_WIDTH); a = a + ADDR_INCR) begin + @(negedge clk) begin + ra = a; + rce = 1; + end + @(posedge clk) begin + #(PERIOD/10) rce = 0; + if ( rq !== expected) begin + $display("%d: FAIL: mismatch act=%x exp=%x at %x", $time, rq, expected, a); + end else begin + $display("%d: OK: act=%x exp=%x at %x", $time, rq, expected, a); + end + end + end + done = 1'b1; + end + + // Scan for simulation finish + always @(posedge clk) begin + if (done) + $finish_and_return( (error_cnt == 0) ? 0 : -1 ); + end + + case (`STRINGIFY(`TOP)) + "BRAM_SDP_32x512": begin + BRAM_SDP_32x512 #() bram ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "BRAM_SDP_16x1024": begin + BRAM_SDP_16x1024 #() bram ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "BRAM_SDP_8x2048": begin + BRAM_SDP_8x2048 #() bram ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "BRAM_SDP_4x4096": begin + BRAM_SDP_4x4096 #() bram ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + endcase +endmodule From 27eb19fcedcc2ebc5a447664b806ec0428e4e3f1 Mon Sep 17 00:00:00 2001 From: Tarachand Pagarani Date: Thu, 17 Mar 2022 03:35:11 -0700 Subject: [PATCH 696/845] fix the generation of carry chain for size <=2 Signed-off-by: Tarachand Pagarani --- ql-qlf-plugin/qlf_k6n10f/arith_map.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/arith_map.v b/ql-qlf-plugin/qlf_k6n10f/arith_map.v index c5dd2217a..0d971319f 100644 --- a/ql-qlf-plugin/qlf_k6n10f/arith_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/arith_map.v @@ -60,7 +60,8 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); ); endgenerate genvar i; - generate for (i = 0; i < Y_WIDTH-2; i = i + 1) begin:slice + generate if (Y_WIDTH > 2) begin + for (i = 0; i < Y_WIDTH-2; i = i + 1) begin:slice adder_carry my_adder ( .cin(C[i]), .g(AA[i]), @@ -68,6 +69,7 @@ module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); .cout(C[i+1]), .sumout(Y[i]) ); + end end endgenerate generate adder_carry final_adder ( From 29726c02f59cb62e690b20ed0d50f4348ba3f072 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Thu, 17 Mar 2022 12:42:51 +0100 Subject: [PATCH 697/845] Rename the uhdm plugin to systemverilog Signed-off-by: Tomasz Gorochowik --- Makefile | 2 +- {uhdm-plugin => systemverilog-plugin}/Makefile | 2 +- {uhdm-plugin => systemverilog-plugin}/UhdmAst.cc | 0 {uhdm-plugin => systemverilog-plugin}/UhdmAst.h | 0 {uhdm-plugin => systemverilog-plugin}/UhdmAstUpstream.cc | 0 {uhdm-plugin => systemverilog-plugin}/tests/Makefile | 0 {uhdm-plugin => systemverilog-plugin}/uhdmastfrontend.cc | 0 {uhdm-plugin => systemverilog-plugin}/uhdmastreport.cc | 0 {uhdm-plugin => systemverilog-plugin}/uhdmastreport.h | 0 {uhdm-plugin => systemverilog-plugin}/uhdmastshared.h | 0 {uhdm-plugin => systemverilog-plugin}/uhdmcommonfrontend.cc | 0 {uhdm-plugin => systemverilog-plugin}/uhdmcommonfrontend.h | 0 {uhdm-plugin => systemverilog-plugin}/uhdmsurelogastfrontend.cc | 0 13 files changed, 2 insertions(+), 2 deletions(-) rename {uhdm-plugin => systemverilog-plugin}/Makefile (97%) rename {uhdm-plugin => systemverilog-plugin}/UhdmAst.cc (100%) rename {uhdm-plugin => systemverilog-plugin}/UhdmAst.h (100%) rename {uhdm-plugin => systemverilog-plugin}/UhdmAstUpstream.cc (100%) rename {uhdm-plugin => systemverilog-plugin}/tests/Makefile (100%) rename {uhdm-plugin => systemverilog-plugin}/uhdmastfrontend.cc (100%) rename {uhdm-plugin => systemverilog-plugin}/uhdmastreport.cc (100%) rename {uhdm-plugin => systemverilog-plugin}/uhdmastreport.h (100%) rename {uhdm-plugin => systemverilog-plugin}/uhdmastshared.h (100%) rename {uhdm-plugin => systemverilog-plugin}/uhdmcommonfrontend.cc (100%) rename {uhdm-plugin => systemverilog-plugin}/uhdmcommonfrontend.h (100%) rename {uhdm-plugin => systemverilog-plugin}/uhdmsurelogastfrontend.cc (100%) diff --git a/Makefile b/Makefile index 1279f8381..5f3503f57 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # # SPDX-License-Identifier:ISC -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf uhdm dsp-ff +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf systemverilog 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)) diff --git a/uhdm-plugin/Makefile b/systemverilog-plugin/Makefile similarity index 97% rename from uhdm-plugin/Makefile rename to systemverilog-plugin/Makefile index 223a1263e..f0229fa62 100644 --- a/uhdm-plugin/Makefile +++ b/systemverilog-plugin/Makefile @@ -6,7 +6,7 @@ # # SPDX-License-Identifier:ISC -NAME = uhdm +NAME = systemverilog SOURCES = UhdmAst.cc \ uhdmastfrontend.cc \ uhdmcommonfrontend.cc \ diff --git a/uhdm-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc similarity index 100% rename from uhdm-plugin/UhdmAst.cc rename to systemverilog-plugin/UhdmAst.cc diff --git a/uhdm-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h similarity index 100% rename from uhdm-plugin/UhdmAst.h rename to systemverilog-plugin/UhdmAst.h diff --git a/uhdm-plugin/UhdmAstUpstream.cc b/systemverilog-plugin/UhdmAstUpstream.cc similarity index 100% rename from uhdm-plugin/UhdmAstUpstream.cc rename to systemverilog-plugin/UhdmAstUpstream.cc diff --git a/uhdm-plugin/tests/Makefile b/systemverilog-plugin/tests/Makefile similarity index 100% rename from uhdm-plugin/tests/Makefile rename to systemverilog-plugin/tests/Makefile diff --git a/uhdm-plugin/uhdmastfrontend.cc b/systemverilog-plugin/uhdmastfrontend.cc similarity index 100% rename from uhdm-plugin/uhdmastfrontend.cc rename to systemverilog-plugin/uhdmastfrontend.cc diff --git a/uhdm-plugin/uhdmastreport.cc b/systemverilog-plugin/uhdmastreport.cc similarity index 100% rename from uhdm-plugin/uhdmastreport.cc rename to systemverilog-plugin/uhdmastreport.cc diff --git a/uhdm-plugin/uhdmastreport.h b/systemverilog-plugin/uhdmastreport.h similarity index 100% rename from uhdm-plugin/uhdmastreport.h rename to systemverilog-plugin/uhdmastreport.h diff --git a/uhdm-plugin/uhdmastshared.h b/systemverilog-plugin/uhdmastshared.h similarity index 100% rename from uhdm-plugin/uhdmastshared.h rename to systemverilog-plugin/uhdmastshared.h diff --git a/uhdm-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc similarity index 100% rename from uhdm-plugin/uhdmcommonfrontend.cc rename to systemverilog-plugin/uhdmcommonfrontend.cc diff --git a/uhdm-plugin/uhdmcommonfrontend.h b/systemverilog-plugin/uhdmcommonfrontend.h similarity index 100% rename from uhdm-plugin/uhdmcommonfrontend.h rename to systemverilog-plugin/uhdmcommonfrontend.h diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc similarity index 100% rename from uhdm-plugin/uhdmsurelogastfrontend.cc rename to systemverilog-plugin/uhdmsurelogastfrontend.cc From ee44dc6c5a91e8eeaeb9bbffa7d2ae392413fdff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 18 Mar 2022 17:34:03 +0100 Subject: [PATCH 698/845] ql-qlf: qlf_k6n10f: bram: modify matching rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams.txt b/ql-qlf-plugin/qlf_k6n10f/brams.txt index ab60c27ad..6951a4ad9 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams.txt +++ b/ql-qlf-plugin/qlf_k6n10f/brams.txt @@ -50,24 +50,22 @@ endbram match $__QLF_FACTOR_BRAM36_TDP - max dbits 36 - max abits 15 min wports 1 max wports 2 min rports 1 max rports 2 - min efficiency 2 + min efficiency 1 + min bits 128 shuffle_enable B make_transp or_next_if_better endmatch match $__QLF_FACTOR_BRAM36_SDP - max dbits 36 - max abits 15 max wports 1 max rports 1 - min efficiency 2 + min efficiency 1 + min bits 128 shuffle_enable B make_transp endmatch From 5f26af39bbf353df1d87981dec467373ed545343 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Wed, 23 Mar 2022 10:56:28 +0100 Subject: [PATCH 699/845] Add a dummy uhdm plugin It shows a deprecation warning and automatically loads the systemverilog plugin. Signed-off-by: Tomasz Gorochowik --- Makefile | 2 +- uhdm-plugin/Makefile | 11 +++++++++++ uhdm-plugin/tests/Makefile | 9 +++++++++ uhdm-plugin/uhdm.cc | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 uhdm-plugin/Makefile create mode 100644 uhdm-plugin/tests/Makefile create mode 100644 uhdm-plugin/uhdm.cc diff --git a/Makefile b/Makefile index 5f3503f57..91b0ba99a 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # # SPDX-License-Identifier:ISC -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf systemverilog dsp-ff +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf systemverilog uhdm 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)) diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile new file mode 100644 index 000000000..8018d763a --- /dev/null +++ b/uhdm-plugin/Makefile @@ -0,0 +1,11 @@ +# Copyright (C) 2022 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + +NAME = uhdm +SOURCES = uhdm.cc +include ../Makefile_plugin.common diff --git a/uhdm-plugin/tests/Makefile b/uhdm-plugin/tests/Makefile new file mode 100644 index 000000000..66d5a63ba --- /dev/null +++ b/uhdm-plugin/tests/Makefile @@ -0,0 +1,9 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + +include $(shell pwd)/../../Makefile_test.common diff --git a/uhdm-plugin/uhdm.cc b/uhdm-plugin/uhdm.cc new file mode 100644 index 000000000..2babb21cd --- /dev/null +++ b/uhdm-plugin/uhdm.cc @@ -0,0 +1,38 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2022 Antmicro + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "kernel/log.h" + +USING_YOSYS_NAMESPACE + +PRIVATE_NAMESPACE_BEGIN + +struct UhdmDummy { + UhdmDummy() + { + log("\n"); + log("!! DEPRECATION WARNING !!\n"); + log("\n"); + log("The uhdm plugin has been renamed to systemverilog.\n"); + log("Loading the systemverilog plugin...\n"); + + std::vector plugin_aliases; + load_plugin("systemverilog", plugin_aliases); + } +} UhdmDummy; + +PRIVATE_NAMESPACE_END From 50d463f844570aae649eb8b950f70af011f56ce4 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Wed, 23 Mar 2022 12:03:40 +0100 Subject: [PATCH 700/845] Update README Signed-off-by: Tomasz Gorochowik --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c7e4ccaa5..9ca9b69aa 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This repository contains plugins for 6. [QuickLogic QLF FPGAs](#quicklogic-qlf-plugin) 7. [SDC](#sdc-plugin) 8. [XDC](#xdc-plugin) -9. [UHDM](#uhdm-plugin) +9. [SystemVerilog](#systemverilog-plugin) ## Summary @@ -99,12 +99,12 @@ The plugin adds the following commands: * set_property * get_bank_tiles -### UHDM plugin +### SystemVerilog plugin -Reads UHDM files and processes it into yosys AST. +Reads SystemVerilog and UHDM files and processes them into yosys AST. The plugin adds the following commands: +* read_systemverilog * read_uhdm -* read_verilog_with_uhdm Detailed help on the supported command(s) can be obtained by running `help ` in Yosys. From 0fba5f0fc5b000b9cfbea220315d7ef74b7e775b Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Tue, 15 Mar 2022 14:59:57 +0100 Subject: [PATCH 701/845] Traverse both allPackages and topPackages Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 285f0bd84..a94767ac2 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1385,11 +1385,12 @@ AST::AstNode *UhdmAst::find_ancestor(const std::unordered_set void UhdmAst::process_design() { current_node = make_ast_node(AST::AST_DESIGN); - visit_one_to_many({UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules}, obj_h, [&](AST::AstNode *node) { - if (node) { - shared.top_nodes[node->str] = node; - } - }); + visit_one_to_many({UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmtopPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules}, obj_h, + [&](AST::AstNode *node) { + if (node) { + shared.top_nodes[node->str] = node; + } + }); visit_one_to_many({vpiParameter, vpiParamAssign}, obj_h, [&](AST::AstNode *node) {}); visit_one_to_many({vpiTypedef}, obj_h, [&](AST::AstNode *node) { if (node) From 400824259d7d2cd499dcd27a4f20e10913b5630e Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Tue, 22 Mar 2022 14:02:00 +0100 Subject: [PATCH 702/845] Check for minimal int size Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index a94767ac2..f461e17cb 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1114,7 +1114,8 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) // yosys is assuming that int/uint is 32 bit, so we are setting here correct size // NOTE: it *shouldn't* break on explicite 64 bit const values, as they *should* be handled // above by vpi*StrVal - if (size == 64) { + // FIXME: Minimal int size should be resolved in UHDM, here we make sure it is at least 32 + if (size == 64 || size < 32) { size = 32; is_signed = true; } From 3327d62c23897ec9fb935e9d433038003ce4364c Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Fri, 18 Mar 2022 12:47:51 +0100 Subject: [PATCH 703/845] Mark empty range as valid This allows usage of imported identifiers in operations inside signal access. Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index f461e17cb..3f6f14898 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -406,6 +406,7 @@ static void convert_packed_unpacked_range(AST::AstNode *wire_node) if (packed_ranges.empty() && unpacked_ranges.empty()) { wire_node->attributes.erase(UhdmAst::packed_ranges()); wire_node->attributes.erase(UhdmAst::unpacked_ranges()); + wire_node->range_valid = true; return; } size_t size = 1; From 7a4287803db6eb45cb3c954e09eccd30b5fb4ea5 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Thu, 24 Mar 2022 08:49:23 +0100 Subject: [PATCH 704/845] Handle vpiUnionVar Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 3f6f14898..64a0168da 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1879,7 +1879,7 @@ void UhdmAst::process_custom_var() delete node; }); auto type = vpi_get(vpiType, obj_h); - if (type == vpiEnumVar || type == vpiStructVar) { + if (type == vpiEnumVar || type == vpiStructVar || type == vpiUnionVar) { visit_default_expr(obj_h); } current_node->is_custom_type = true; @@ -3510,6 +3510,7 @@ void UhdmAst::process_port() case vpiStructNet: case vpiArrayNet: case vpiStructVar: + case vpiUnionVar: case vpiEnumVar: case vpiShortIntVar: case vpiIntVar: @@ -3770,6 +3771,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiEnumNet: case vpiStructVar: case vpiStructNet: + case vpiUnionVar: process_custom_var(); break; case vpiShortIntVar: From 63a6f7767ee22fa556ccc216dc56169794878395 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 24 Mar 2022 11:50:13 +0100 Subject: [PATCH 705/845] readme: s/SymbiFlow/F4PGA/ Signed-off-by: Unai Martinez-Corral --- CONTRIBUTING.md | 14 ++++++-------- README.md | 12 ++++++------ .../tests/get_cells/get_cells.tcl | 2 +- .../tests/get_nets/get_nets.tcl | 2 +- .../tests/get_pins/get_pins.tcl | 2 +- .../tests/get_ports/get_ports.tcl | 2 +- sdc-plugin/propagation.cc | 2 +- .../tests/set_clock_groups/set_clock_groups.tcl | 2 +- sdc-plugin/tests/set_false_path/set_false_path.tcl | 2 +- sdc-plugin/tests/set_max_delay/set_max_delay.tcl | 2 +- xdc-plugin/tests/counter-dict/counter-dict.tcl | 2 +- xdc-plugin/tests/counter/counter.tcl | 2 +- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl | 2 +- .../minilitex_ddr_arty/minilitex_ddr_arty.tcl | 2 +- .../non_zero_port_indexes.tcl | 2 +- .../package_pins-dict-space.tcl | 2 +- xdc-plugin/tests/package_pins/package_pins.tcl | 2 +- xdc-plugin/tests/port_indexes/port_indexes.tcl | 2 +- 18 files changed, 28 insertions(+), 30 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d5615e493..e92bb22a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,18 +1,16 @@ -# Contributing to Yosys SymbiFlow Plugins +# Contributing to Yosys F4PGA Plugins -There are a couple of guidelines when contributing to Yosys SymbiFlow Plugins -which are listed here. +There are a couple of guidelines when contributing to Yosys F4PGA Plugins which are listed here. ### Sending -All contributions should be sent as -[GitHub Pull requests](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). +All contributions should be sent as [GitHub Pull requests](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). ### License -All software (code, associated documentation, support files, etc) in the -Yosys SymbiFlow Plugins repository are licensed under the very permissive -[ISC Licence](COPYING). A copy can be found in the [`COPYING`](COPYING) file. +All software (code, associated documentation, support files, etc) in the Yosys F4PGA Plugins repository are licensed +under the very permissive [ISC Licence](COPYING). +A copy can be found in the [`COPYING`](COPYING) file. All new contributions must also be released under this license. diff --git a/README.md b/README.md index 9ca9b69aa..88164e079 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ -# Yosys SymbiFlow Plugins +# Yosys F4PGA Plugins -This repository contains plugins for -[Yosys](https://github.com/YosysHQ/yosys.git) developed as -[part of the SymbiFlow project](https://symbiflow.github.io). +This repository contains plugins for [Yosys](https://github.com/YosysHQ/yosys.git) developed as [part of the F4PGA project](https://f4pga.org). ## List of plugins + 1. [Design introspection](#design-introspection-plugin) 2. [FASM](#fasm-plugin) 3. [Integrate inverters](#integrate-inverters-plugin) @@ -32,7 +31,8 @@ Following commands are added with the plugin: ### FASM plugin -Writes out the design's [fasm features](https://symbiflow.readthedocs.io/en/latest/fasm/docs/specification.html) based on the parameter annotations on a design cell. +Writes out the design's [fasm features](https://fasm.readthedocs.io/en/latest/) based on the parameter annotations on a +design cell. The plugin adds the following command: * write_fasm @@ -91,7 +91,7 @@ Reads Xilinx Design Constraints (XDC) files and annotates the specified cells pa * DRIVE * IN_TERM * LOC -* PACKAGE_PIN +* PACKAGE_PIN The plugin adds the following commands: * read_xdc diff --git a/design_introspection-plugin/tests/get_cells/get_cells.tcl b/design_introspection-plugin/tests/get_cells/get_cells.tcl index 047b15019..d07792430 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.tcl +++ b/design_introspection-plugin/tests/get_cells/get_cells.tcl @@ -3,7 +3,7 @@ if { [info procs get_cells] == {} } { plugin -i design_introspection } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp diff --git a/design_introspection-plugin/tests/get_nets/get_nets.tcl b/design_introspection-plugin/tests/get_nets/get_nets.tcl index 6ef242623..5dc7ae454 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.tcl +++ b/design_introspection-plugin/tests/get_nets/get_nets.tcl @@ -3,7 +3,7 @@ if { [info procs get_nets] == {} } { plugin -i design_introspection } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp diff --git a/design_introspection-plugin/tests/get_pins/get_pins.tcl b/design_introspection-plugin/tests/get_pins/get_pins.tcl index d6a64fe31..43ab60ced 100644 --- a/design_introspection-plugin/tests/get_pins/get_pins.tcl +++ b/design_introspection-plugin/tests/get_pins/get_pins.tcl @@ -3,7 +3,7 @@ if { [info procs get_pins] == {} } { plugin -i design_introspection } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp diff --git a/design_introspection-plugin/tests/get_ports/get_ports.tcl b/design_introspection-plugin/tests/get_ports/get_ports.tcl index 47d8fced9..7724e2867 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.tcl +++ b/design_introspection-plugin/tests/get_ports/get_ports.tcl @@ -3,7 +3,7 @@ if { [info procs get_ports] == {} } { plugin -i design_introspection } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp help get_ports diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index cfee89ab2..02fa865fb 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -225,7 +225,7 @@ void ClockDividerPropagation::PropagateClocksForCellType(RTLIL::Wire *driver_wir RTLIL::Wire *wire = FindSinkWireOnPort(cell, output); // Don't add clocks on dangling wires // TODO Remove the workaround with the WireHasSinkCell check once the following issue is fixed: - // https://github.com/SymbiFlow/yosys-symbiflow-plugins/issues/59 + // https://github.com/SymbiFlow/yosys-f4pga-plugins/issues/59 if (wire && WireHasSinkCell(wire)) { float clkout_period(pll.clkout_period.at(output)); float clkout_rising_edge(pll.clkout_rising_edge.at(output)); diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl index cefcaca27..1994806cb 100644 --- a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl @@ -3,7 +3,7 @@ if { [info procs read_sdc] == {} } { plugin -i sdc } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp set_clock_groups -group clk1 clk2 diff --git a/sdc-plugin/tests/set_false_path/set_false_path.tcl b/sdc-plugin/tests/set_false_path/set_false_path.tcl index 29c017817..e755e7e39 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.tcl +++ b/sdc-plugin/tests/set_false_path/set_false_path.tcl @@ -3,7 +3,7 @@ if { [info procs read_sdc] == {} } { plugin -i sdc } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp # -to inter_wire net diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl index 92d4c55e3..4957485c1 100644 --- a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.tcl @@ -3,7 +3,7 @@ if { [info procs read_sdc] == {} } { plugin -i sdc } yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp # -to inter_wire net diff --git a/xdc-plugin/tests/counter-dict/counter-dict.tcl b/xdc-plugin/tests/counter-dict/counter-dict.tcl index 91d462456..b6eb5b5cf 100644 --- a/xdc-plugin/tests/counter-dict/counter-dict.tcl +++ b/xdc-plugin/tests/counter-dict/counter-dict.tcl @@ -6,7 +6,7 @@ yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints diff --git a/xdc-plugin/tests/counter/counter.tcl b/xdc-plugin/tests/counter/counter.tcl index 0a3a62b6f..9347071e3 100644 --- a/xdc-plugin/tests/counter/counter.tcl +++ b/xdc-plugin/tests/counter/counter.tcl @@ -6,7 +6,7 @@ yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl index 7d99d29c0..d7f55064d 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl @@ -12,7 +12,7 @@ read_verilog -lib [file dirname $::env(DESIGN_TOP)]/cells_xtra.v hierarchy -check -top top # -flatten is used to ensure that the output eblif has only one module. -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -run prepare:check #Read the design constraints diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl index 3c5fcd5f6..df2555c13 100644 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl +++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl @@ -6,7 +6,7 @@ yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v read_verilog [file dirname [info script]]/VexRiscv_Lite.v # -flatten is used to ensure that the output eblif has only one module. -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl index 60552c2db..50872c005 100644 --- a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl +++ b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl @@ -11,7 +11,7 @@ read_verilog -lib +/xilinx/cells_xtra.v hierarchy -check -top top # -flatten is used to ensure that the output eblif has only one module. -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -run prepare:check #Read the design constraints diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl index 506097ad5..7625c92c8 100644 --- a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl +++ b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl @@ -5,7 +5,7 @@ yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/xdc-plugin/tests/package_pins/package_pins.tcl index 7f059e7d7..90298ebbd 100644 --- a/xdc-plugin/tests/package_pins/package_pins.tcl +++ b/xdc-plugin/tests/package_pins/package_pins.tcl @@ -5,7 +5,7 @@ yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp #Read the design constraints diff --git a/xdc-plugin/tests/port_indexes/port_indexes.tcl b/xdc-plugin/tests/port_indexes/port_indexes.tcl index 2472ffa6f..c2c148a84 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.tcl +++ b/xdc-plugin/tests/port_indexes/port_indexes.tcl @@ -6,7 +6,7 @@ yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v # -flatten is used to ensure that the output eblif has only one module. -# Some of symbiflow expects eblifs with only one module. +# Some of F4PGA expects eblifs with only one module. synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp if {[info procs unknown] != ""} { From 5c9f6383d8fd15cc9d847e034929d2b9753e3cec Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 24 Mar 2022 11:50:35 +0100 Subject: [PATCH 706/845] readme: remove redundant ToC; style Signed-off-by: Unai Martinez-Corral --- README.md | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 88164e079..ad1cce8c5 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,14 @@ This repository contains plugins for [Yosys](https://github.com/YosysHQ/yosys.git) developed as [part of the F4PGA project](https://f4pga.org). -## List of plugins +## Design introspection plugin -1. [Design introspection](#design-introspection-plugin) -2. [FASM](#fasm-plugin) -3. [Integrate inverters](#integrate-inverters-plugin) -4. [Parameters](#parameters-plugin) -5. [QuickLogic IOBs](#quicklogic-iob-plugin) -6. [QuickLogic QLF FPGAs](#quicklogic-qlf-plugin) -7. [SDC](#sdc-plugin) -8. [XDC](#xdc-plugin) -9. [SystemVerilog](#systemverilog-plugin) - -## Summary - -### Design introspection plugin - -Adds several commands that allow for collecting information about cells, nets, pins and ports in the design or a selection of objects. +Adds several commands that allow for collecting information about cells, nets, pins and ports in the design or a +selection of objects. Additionally provides functions to convert selection on TCL lists. Following commands are added with the plugin: + * get_cells * get_nets * get_pins @@ -29,50 +17,58 @@ Following commands are added with the plugin: * get_count * selection_to_tcl_list -### FASM plugin +## FASM plugin Writes out the design's [fasm features](https://fasm.readthedocs.io/en/latest/) based on the parameter annotations on a design cell. The plugin adds the following command: + * write_fasm -### Integrate inverters plugin +## Integrate inverters plugin Implements a pass that integrates inverters into cells that have ports with the 'invertible_pin' attribute set. The plugin adds the following command: + * integrateinv -### Parameters plugin +## Parameters plugin Reads the specified parameter on a selected object. The plugin adds the following command: + * getparam -### QuickLogic IOB plugin +## QuickLogic IOB plugin -[QuickLogic IOB plugin](./ql-iob-plugin/) annotates IO buffer cells with information from IO placement constraints. Used during synthesis for QuickLogic EOS-S3 architecture. +[QuickLogic IOB plugin](./ql-iob-plugin/) annotates IO buffer cells with information from IO placement constraints. +Used during synthesis for QuickLogic EOS-S3 architecture. The plugin adds the following command: + * quicklogic_iob -### QuickLogic QLF FPGAs plugin +## QuickLogic QLF FPGAs plugin [QuickLogic QLF plugin](./ql-qlf-plugin) extends Yosys with synthesis support for `qlf_k4n8` and `qlf_k6n10` architectures. The plugin adds the following command: + * synth_quicklogic * ql_dsp Detailed help on the supported command(s) can be obtained by running `help ` in Yosys. -### SDC plugin +## SDC plugin -Reads Standard Delay Format (SDC) constraints, propagates these constraints across the design and writes out the complete SDC information. +Reads Standard Delay Format (SDC) constraints, propagates these constraints across the design and writes out the +complete SDC information. The plugin adds the following commands: + * read_sdc * write_sdc * create_clock @@ -82,9 +78,10 @@ The plugin adds the following commands: * set_max_delay * set_clock_groups -### XDC plugin +## XDC plugin Reads Xilinx Design Constraints (XDC) files and annotates the specified cells parameters with properties such as: + * INTERNAL_VREF * IOSTANDARD * SLEW @@ -94,16 +91,18 @@ Reads Xilinx Design Constraints (XDC) files and annotates the specified cells pa * PACKAGE_PIN The plugin adds the following commands: + * read_xdc * get_iobanks * set_property * get_bank_tiles -### SystemVerilog plugin +## SystemVerilog plugin Reads SystemVerilog and UHDM files and processes them into yosys AST. The plugin adds the following commands: + * read_systemverilog * read_uhdm From 2786a7a7962ff1ed3ceb7d23dc0a6dc0e16503cd Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Tue, 29 Mar 2022 10:39:10 +0200 Subject: [PATCH 707/845] Handle integer typespecs Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 64a0168da..6700f0438 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1711,7 +1711,8 @@ void UhdmAst::process_typespec_member() shared.report.mark_handled(typespec_h); break; } - case vpiIntTypespec: { + case vpiIntTypespec: + case vpiIntegerTypespec: { current_node->is_signed = true; packed_ranges.push_back(make_range(31, 0)); shared.report.mark_handled(typespec_h); @@ -1819,7 +1820,8 @@ void UhdmAst::process_enum_typespec() shared.report.mark_handled(typespec_h); break; } - case vpiIntTypespec: { + case vpiIntTypespec: + case vpiIntegerTypespec: { current_node->is_signed = true; shared.report.mark_handled(typespec_h); break; @@ -3514,6 +3516,7 @@ void UhdmAst::process_port() case vpiEnumVar: case vpiShortIntVar: case vpiIntVar: + case vpiIntegerVar: break; default: { const uhdm_handle *const handle = (const uhdm_handle *)actual_h; @@ -3603,11 +3606,12 @@ void UhdmAst::process_parameter() break; } case vpiEnumTypespec: - case vpiRealTypespec: { + case vpiRealTypespec: shared.report.mark_handled(typespec_h); break; } - case vpiIntTypespec: { + case vpiIntTypespec: + case vpiIntegerTypespec: { packed_ranges.push_back(make_range(31, 0)); shared.report.mark_handled(typespec_h); break; @@ -3776,6 +3780,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) break; case vpiShortIntVar: case vpiIntVar: + case vpiIntegerVar: process_int_var(); break; case vpiShortRealVar: @@ -3924,6 +3929,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) process_logic_typespec(); break; case vpiIntTypespec: + case vpiIntegerTypespec: process_int_typespec(); break; case vpiBitTypespec: From f99d890f1b4355d88e5e74e62f5d9c05b4329d55 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Tue, 29 Mar 2022 10:44:43 +0200 Subject: [PATCH 708/845] Handle vpiStringTypespec in parameters Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 6700f0438..4af46777e 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3607,6 +3607,7 @@ void UhdmAst::process_parameter() } case vpiEnumTypespec: case vpiRealTypespec: + case vpiStringTypespec: { shared.report.mark_handled(typespec_h); break; } From 474b4308f46cc9fc0cd0d319d0e17769b250917a Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 29 Mar 2022 10:22:11 +0200 Subject: [PATCH 709/845] Set initial state of all k6n10f DSP registers to zero. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 24 ++++++++++++++++++- .../sim_dsp_mult_r/sim_dsp_mult_r.v | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 6dac58bac..f2e7b057a 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1472,6 +1472,22 @@ module dsp_t1_sim # ( reg r_rnd; reg [NBITS_ACC-1:0] acc; + initial begin + r_a <= 'h0; + r_b <= 'h0; + + r_acc_fir <= 0; + r_unsigned_a <= 0; + r_unsigned_b <= 0; + r_feedback <= 0; + r_shift_d1 <= 0; + r_shift_d2 <= 0; + r_subtract <= 0; + r_load_acc <= 0; + r_sat <= 0; + r_rnd <= 0; + end + always @(posedge clock_i or negedge reset_n_i) begin if (~reset_n_i) begin @@ -1566,7 +1582,9 @@ module dsp_t1_sim # ( wire [NBITS_ACC-1:0] add_o = add_a + add_b; - // Accumulator + // Accumulator + initial acc <= 0; + always @(posedge clock_i or negedge reset_n_i) if (~reset_n_i) acc <= 'h0; else begin @@ -1603,6 +1621,8 @@ module dsp_t1_sim # ( assign z0 = mult_xtnd[NBITS_Z-1:0]; assign z2 = acc_sat[NBITS_Z-1:0]; + initial z1 <= 0; + always @(posedge clock_i or negedge reset_n_i) if (!reset_n_i) z1 <= 0; @@ -1621,6 +1641,8 @@ module dsp_t1_sim # ( z1; // if output_select_i == 3'h7 // B input delayed passthrough + initial dly_b_o <= 0; + always @(posedge clock_i or negedge reset_n_i) if (!reset_n_i) dly_b_o <= 0; diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v index 6187e1a19..fbc1ba92d 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v @@ -58,6 +58,7 @@ module tb(); // Error detection reg [37:0] r_C; + initial r_C <= 0; always @(posedge clk) r_C <= C; From b3a8bb7a5a6e44997b98188c1f8ea3c370334f0d Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 29 Mar 2022 10:25:11 +0200 Subject: [PATCH 710/845] Replaced tabs with spaces. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 1626 +++++++++++++------------- 1 file changed, 813 insertions(+), 813 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index f2e7b057a..7ceddda88 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -488,755 +488,755 @@ module TDP_BRAM18 ( endmodule module TDP_BRAM36 ( - WEN_A1_i, - WEN_B1_i, - REN_A1_i, - REN_B1_i, - CLK_A1_i, - CLK_B1_i, - BE_A1_i, - BE_B1_i, - ADDR_A1_i, - ADDR_B1_i, - WDATA_A1_i, - WDATA_B1_i, - RDATA_A1_o, - RDATA_B1_o, - FLUSH1_i, - WEN_A2_i, - WEN_B2_i, - REN_A2_i, - REN_B2_i, - CLK_A2_i, - CLK_B2_i, - BE_A2_i, - BE_B2_i, - ADDR_A2_i, - ADDR_B2_i, - WDATA_A2_i, - WDATA_B2_i, - RDATA_A2_o, - RDATA_B2_o, - FLUSH2_i, - RAM_ID_i, - PL_INIT_i, - PL_ENA_i, - PL_REN_i, - PL_CLK_i, - PL_WEN_i, - PL_ADDR_i, - PL_DATA_i, - PL_INIT_o, - PL_ENA_o, - PL_REN_o, - PL_CLK_o, - PL_WEN_o, - PL_ADDR_o, - PL_DATA_o + WEN_A1_i, + WEN_B1_i, + REN_A1_i, + REN_B1_i, + CLK_A1_i, + CLK_B1_i, + BE_A1_i, + BE_B1_i, + ADDR_A1_i, + ADDR_B1_i, + WDATA_A1_i, + WDATA_B1_i, + RDATA_A1_o, + RDATA_B1_o, + FLUSH1_i, + WEN_A2_i, + WEN_B2_i, + REN_A2_i, + REN_B2_i, + CLK_A2_i, + CLK_B2_i, + BE_A2_i, + BE_B2_i, + ADDR_A2_i, + ADDR_B2_i, + WDATA_A2_i, + WDATA_B2_i, + RDATA_A2_o, + RDATA_B2_o, + FLUSH2_i, + RAM_ID_i, + PL_INIT_i, + PL_ENA_i, + PL_REN_i, + PL_CLK_i, + PL_WEN_i, + PL_ADDR_i, + PL_DATA_i, + PL_INIT_o, + PL_ENA_o, + PL_REN_o, + PL_CLK_o, + PL_WEN_o, + PL_ADDR_o, + PL_DATA_o ); - parameter SYNC_FIFO1_i = 1'b0; - parameter RMODE_A1_i = 3'b0; - parameter RMODE_B1_i = 3'b0; - parameter WMODE_A1_i = 3'b0; - parameter WMODE_B1_i = 3'b0; - parameter FMODE1_i = 1'b0; - parameter POWERDN1_i = 1'b0; - parameter SLEEP1_i = 1'b0; - parameter PROTECT1_i = 1'b0; - parameter UPAE1_i = 12'b0; - parameter UPAF1_i = 12'b0; - - parameter SYNC_FIFO2_i = 1'b0; - parameter RMODE_A2_i = 3'b0; - parameter RMODE_B2_i = 3'b0; - parameter WMODE_A2_i = 3'b0; - parameter WMODE_B2_i = 3'b0; - parameter FMODE2_i = 1'b0; - parameter POWERDN2_i = 1'b0; - parameter SLEEP2_i = 1'b0; - parameter PROTECT2_i = 1'b0; - parameter UPAE2_i = 12'b0; - parameter UPAF2_i = 12'b0; - - parameter SPLIT_i = 1'b0; - - parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INITP_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_10 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_11 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_12 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_13 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_14 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_15 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_16 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_17 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_18 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_19 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_1F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_20 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_21 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_22 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_23 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_24 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_25 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_26 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_27 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_28 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_29 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_2F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_30 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_31 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_32 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_33 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_34 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_35 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_36 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_37 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_38 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_39 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_3F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_40 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_41 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_42 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_43 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_44 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_45 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_46 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_47 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_48 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_49 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_4F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_50 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_51 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_52 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_53 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_54 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_55 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_56 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_57 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_58 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_59 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_5F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_60 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_61 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_62 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_63 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_64 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_65 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_66 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_67 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_68 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_69 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_6F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_70 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_71 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_72 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_73 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_74 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_75 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_76 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_77 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_78 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_79 = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7A = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7B = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7C = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7D = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7E = 256'h0000000000000000000000000000000000000000000000000000000000000000; - parameter INIT_7F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - - input wire WEN_A1_i; - input wire WEN_B1_i; - input wire REN_A1_i; - input wire REN_B1_i; - (* clkbuf_sink *) - input wire CLK_A1_i; - (* clkbuf_sink *) - input wire CLK_B1_i; - input wire [1:0] BE_A1_i; - input wire [1:0] BE_B1_i; - input wire [14:0] ADDR_A1_i; - input wire [14:0] ADDR_B1_i; - input wire [17:0] WDATA_A1_i; - input wire [17:0] WDATA_B1_i; - output reg [17:0] RDATA_A1_o; - output reg [17:0] RDATA_B1_o; - input wire FLUSH1_i; - input wire WEN_A2_i; - input wire WEN_B2_i; - input wire REN_A2_i; - input wire REN_B2_i; - (* clkbuf_sink *) - input wire CLK_A2_i; - (* clkbuf_sink *) - input wire CLK_B2_i; - input wire [1:0] BE_A2_i; - input wire [1:0] BE_B2_i; - input wire [13:0] ADDR_A2_i; - input wire [13:0] ADDR_B2_i; - input wire [17:0] WDATA_A2_i; - input wire [17:0] WDATA_B2_i; - output reg [17:0] RDATA_A2_o; - output reg [17:0] RDATA_B2_o; - input wire FLUSH2_i; - input wire [15:0] RAM_ID_i; - input wire PL_INIT_i; - input wire PL_ENA_i; - input wire PL_REN_i; - input wire PL_CLK_i; - input wire [1:0] PL_WEN_i; - input wire [31:0] PL_ADDR_i; - input wire [35:0] PL_DATA_i; - output reg PL_INIT_o; - output reg PL_ENA_o; - output reg PL_REN_o; - output reg PL_CLK_o; - output reg [1:0] PL_WEN_o; - output reg [31:0] PL_ADDR_o; - output reg [35:0] PL_DATA_o; - wire EMPTY2; - wire EPO2; - wire EWM2; - wire FULL2; - wire FMO2; - wire FWM2; - wire EMPTY1; - wire EPO1; - wire EWM1; - wire FULL1; - wire FMO1; - wire FWM1; - wire UNDERRUN1; - wire OVERRUN1; - wire UNDERRUN2; - wire OVERRUN2; - wire UNDERRUN3; - wire OVERRUN3; - wire EMPTY3; - wire EPO3; - wire EWM3; - wire FULL3; - wire FMO3; - wire FWM3; - wire ram_fmode1; - wire ram_fmode2; - wire [17:0] ram_rdata_a1; - wire [17:0] ram_rdata_b1; - wire [17:0] ram_rdata_a2; - wire [17:0] ram_rdata_b2; - reg [17:0] ram_wdata_a1; - reg [17:0] ram_wdata_b1; - reg [17:0] ram_wdata_a2; - reg [17:0] ram_wdata_b2; - reg [14:0] laddr_a1; - reg [14:0] laddr_b1; - wire [13:0] ram_addr_a1; - wire [13:0] ram_addr_b1; - wire [13:0] ram_addr_a2; - wire [13:0] ram_addr_b2; - wire smux_clk_a1; - wire smux_clk_b1; - wire smux_clk_a2; - wire smux_clk_b2; - reg [1:0] ram_be_a1; - reg [1:0] ram_be_a2; - reg [1:0] ram_be_b1; - reg [1:0] ram_be_b2; - reg [2:0] ram_rmode_a1; - reg [2:0] ram_wmode_a1; - reg [2:0] ram_rmode_b1; - reg [2:0] ram_wmode_b1; - reg [2:0] ram_rmode_a2; - reg [2:0] ram_wmode_a2; - reg [2:0] ram_rmode_b2; - reg [2:0] ram_wmode_b2; - wire ram_ren_a1; - wire ram_ren_b1; - wire ram_ren_a2; - wire ram_ren_b2; - wire ram_wen_a1; - wire ram_wen_b1; - wire ram_wen_a2; - wire ram_wen_b2; - wire ren_o; - wire [11:0] ff_raddr; - wire [11:0] ff_waddr; - reg [35:0] fifo_rdata; - reg [1:0] fifo_rmode; - reg [1:0] fifo_wmode; - wire [1:0] bwl; - wire [17:0] pl_dout0; - wire [17:0] pl_dout1; - assign ram_fmode1 = FMODE1_i & SPLIT_i; - assign ram_fmode2 = FMODE2_i & SPLIT_i; - assign smux_clk_a1 = CLK_A1_i; - assign smux_clk_b1 = (FMODE1_i ? (SYNC_FIFO1_i ? CLK_A1_i : CLK_B1_i) : CLK_B1_i); - assign smux_clk_a2 = (SPLIT_i ? CLK_A2_i : CLK_A1_i); - assign smux_clk_b2 = (SPLIT_i ? CLK_B2_i : (FMODE1_i ? (SYNC_FIFO1_i ? CLK_A1_i : CLK_B1_i) : CLK_B1_i)); - assign ram_ren_a1 = (SPLIT_i ? REN_A1_i : (FMODE1_i ? 0 : REN_A1_i)); - assign ram_ren_a2 = (SPLIT_i ? REN_A2_i : (FMODE1_i ? 0 : REN_A1_i)); - assign ram_ren_b1 = (SPLIT_i ? REN_B1_i : (FMODE1_i ? ren_o : REN_B1_i)); - assign ram_ren_b2 = (SPLIT_i ? REN_B2_i : (FMODE1_i ? ren_o : REN_B1_i)); - localparam MODE_36 = 3'b111; - assign ram_wen_a1 = (SPLIT_i ? WEN_A1_i : (FMODE1_i ? ~FULL3 & WEN_A1_i : (WMODE_A1_i == MODE_36 ? WEN_A1_i : WEN_A1_i & ~ADDR_A1_i[4]))); - assign ram_wen_a2 = (SPLIT_i ? WEN_A2_i : (FMODE1_i ? ~FULL3 & WEN_A1_i : (WMODE_A1_i == MODE_36 ? WEN_A1_i : WEN_A1_i & ADDR_A1_i[4]))); - assign ram_wen_b1 = (SPLIT_i ? WEN_B1_i : (WMODE_B1_i == MODE_36 ? WEN_B1_i : WEN_B1_i & ~ADDR_B1_i[4])); - assign ram_wen_b2 = (SPLIT_i ? WEN_B2_i : (WMODE_B1_i == MODE_36 ? WEN_B1_i : WEN_B1_i & ADDR_B1_i[4])); - assign ram_addr_a1 = (SPLIT_i ? ADDR_A1_i[13:0] : (FMODE1_i ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1_i[14:5], ADDR_A1_i[3:0]})); - assign ram_addr_b1 = (SPLIT_i ? ADDR_B1_i[13:0] : (FMODE1_i ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1_i[14:5], ADDR_B1_i[3:0]})); - assign ram_addr_a2 = (SPLIT_i ? ADDR_A2_i[13:0] : (FMODE1_i ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1_i[14:5], ADDR_A1_i[3:0]})); - assign ram_addr_b2 = (SPLIT_i ? ADDR_B2_i[13:0] : (FMODE1_i ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1_i[14:5], ADDR_B1_i[3:0]})); - assign bwl = (SPLIT_i ? ADDR_A1_i[4:3] : (FMODE1_i ? ff_waddr[1:0] : ADDR_A1_i[4:3])); - localparam MODE_18 = 3'b110; - localparam MODE_9 = 3'b101; - always @(*) begin : WDATA_SEL - case (SPLIT_i) - 1: begin - ram_wdata_a1 = WDATA_A1_i; - ram_wdata_a2 = WDATA_A2_i; - ram_wdata_b1 = WDATA_B1_i; - ram_wdata_b2 = WDATA_B2_i; - ram_be_a2 = BE_A2_i; - ram_be_b2 = BE_B2_i; - ram_be_a1 = BE_A1_i; - ram_be_b1 = BE_B1_i; - end - 0: begin - case (WMODE_A1_i) - MODE_36: begin - ram_wdata_a1 = {WDATA_A2_i[15:14], WDATA_A1_i[15:0]}; - ram_wdata_a2 = {WDATA_A2_i[17:16], WDATA_A2_i[13:0], WDATA_A1_i[17:16]}; - ram_be_a2 = (FMODE1_i ? 2'b11 : BE_A2_i); - ram_be_a1 = (FMODE1_i ? 2'b11 : BE_A1_i); - end - MODE_18: begin - ram_wdata_a1 = WDATA_A1_i; - ram_wdata_a2 = WDATA_A1_i; - ram_be_a1 = (FMODE1_i ? (ff_waddr[1] ? 2'b00 : 2'b11) : BE_A1_i); - ram_be_a2 = (FMODE1_i ? (ff_waddr[1] ? 2'b11 : 2'b00) : BE_A1_i); - end - MODE_9: - case (bwl) - 0: begin - ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); - ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); - ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_be_a1[0] = (FMODE1_i ? (ff_waddr[1:0] == 0 ? 1'b1 : 1'b0) : 1'b1); - ram_be_a1[1] = (FMODE1_i ? (ff_waddr[1:0] == 1 ? 1'b1 : 1'b0) : 1'b0); - ram_be_a2[0] = (FMODE1_i ? (ff_waddr[1:0] == 2 ? 1'b1 : 1'b0) : 1'b0); - ram_be_a2[1] = (FMODE1_i ? (ff_waddr[1:0] == 3 ? 1'b1 : 1'b0) : 1'b0); - end - 1: begin - ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); - ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); - ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - {ram_be_a2, ram_be_a1} = 4'b0010; - end - 2: begin - ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); - ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); - ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - {ram_be_a2, ram_be_a1} = 4'b0100; - end - 3: begin - ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); - ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); - ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - {ram_be_a2, ram_be_a1} = 4'b1000; - end - endcase - default: begin - ram_wdata_a1 = WDATA_A1_i; - ram_wdata_a2 = WDATA_A1_i; - ram_be_a2 = (FMODE1_i ? 2'b11 : BE_A1_i); - ram_be_a1 = (FMODE1_i ? 2'b11 : BE_A1_i); - end - endcase - case (WMODE_B1_i) - MODE_36: begin - ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : {WDATA_B2_i[15:14], WDATA_B1_i[15:0]}); - ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : {WDATA_B2_i[17:16], WDATA_B2_i[13:0], WDATA_B1_i[17:16]}); - ram_be_b2 = BE_B2_i; - ram_be_b1 = BE_B1_i; - end - MODE_18: begin - ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); - ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); - ram_be_b1 = BE_B1_i; - ram_be_b2 = BE_B1_i; - end - MODE_9: - case (ADDR_B1_i[4:3]) - 0: begin - ram_wdata_b1[8:0] = WDATA_B1_i[8:0]; - ram_wdata_b1[17:9] = 9'b000000000; - ram_wdata_b2[8:0] = 9'b000000000; - ram_wdata_b2[17:9] = 9'b000000000; - {ram_be_b2, ram_be_b1} = 4'b0001; - end - 1: begin - ram_wdata_b1[8:0] = WDATA_B1_i[8:0]; - ram_wdata_b1[17:9] = 9'b000000000; - ram_wdata_b2[8:0] = 9'b000000000; - ram_wdata_b2[17:9] = 9'b000000000; - {ram_be_b2, ram_be_b1} = 4'b0010; - end - 2: begin - ram_wdata_b1[8:0] = 9'b000000000; - ram_wdata_b1[17:9] = 9'b000000000; - ram_wdata_b2[8:0] = WDATA_B1_i[8:0]; - ram_wdata_b2[17:9] = 9'b000000000; - {ram_be_b2, ram_be_b1} = 4'b0100; - end - 3: begin - ram_wdata_b1[8:0] = 9'b000000000; - ram_wdata_b1[17:9] = 9'b000000000; - ram_wdata_b2[8:0] = WDATA_B1_i[8:0]; - ram_wdata_b2[17:9] = 9'b000000000; - {ram_be_b2, ram_be_b1} = 4'b1000; - end - endcase - default: begin - ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); - ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); - ram_be_b2 = BE_B1_i; - ram_be_b1 = BE_B1_i; - end - endcase - end - endcase - end - always @(posedge CLK_A1_i or posedge CLK_B1_i or posedge CLK_A2_i or posedge CLK_B2_i) begin - if (!SPLIT_i) begin - ram_rmode_a1 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); - ram_rmode_a2 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); - ram_wmode_a1 <= (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); - ram_wmode_a2 <= (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); - ram_rmode_b1 <= (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); - ram_rmode_b2 <= (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); - ram_wmode_b1 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); - ram_wmode_b2 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); - end else begin - ram_rmode_a1 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); - ram_rmode_a2 <= (RMODE_A2_i == MODE_36 ? MODE_18 : RMODE_A2_i); - ram_wmode_a1 <= (WMODE_A1_i == MODE_36 ? MODE_18 : WMODE_A1_i); - ram_wmode_a2 <= (WMODE_A2_i == MODE_36 ? MODE_18 : WMODE_A2_i); - ram_rmode_b1 <= (RMODE_B1_i == MODE_36 ? MODE_18 : RMODE_B1_i); - ram_rmode_b2 <= (RMODE_B2_i == MODE_36 ? MODE_18 : RMODE_B2_i); - ram_wmode_b1 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); - ram_wmode_b2 <= (WMODE_B2_i == MODE_36 ? MODE_18 : WMODE_B2_i); - end - end - always @(*) begin : FIFO_READ_SEL - case (RMODE_B1_i) - MODE_36: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; - MODE_18: fifo_rdata = (ff_raddr[1] ? {18'b000000000000000000, ram_rdata_b2} : {18'b000000000000000000, ram_rdata_b1}); - MODE_9: - case (ff_raddr[1:0]) - 0: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b1[16], ram_rdata_b1[7:0]}; - 1: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b1[17], ram_rdata_b1[15:8]}; - 2: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[16], ram_rdata_b2[7:0]}; - 3: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[17], ram_rdata_b2[15:8]}; - endcase - default: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; - endcase - end - localparam MODE_1 = 3'b001; - localparam MODE_2 = 3'b010; - localparam MODE_4 = 3'b100; - always @(*) begin : RDATA_SEL - case (SPLIT_i) - 1: begin - RDATA_A1_o = (FMODE1_i ? {10'b0000000000, EMPTY1, EPO1, EWM1, UNDERRUN1, FULL1, FMO1, FWM1, OVERRUN1} : ram_rdata_a1); - RDATA_B1_o = ram_rdata_b1; - RDATA_A2_o = (FMODE2_i ? {10'b0000000000, EMPTY2, EPO2, EWM2, UNDERRUN2, FULL2, FMO2, FWM2, OVERRUN2} : ram_rdata_a2); - RDATA_B2_o = ram_rdata_b2; - end - 0: begin - if (FMODE1_i) begin - RDATA_A1_o = {10'b0000000000, EMPTY3, EPO3, EWM3, UNDERRUN3, FULL3, FMO3, FWM3, OVERRUN3}; - RDATA_A2_o = 18'b000000000000000000; - end - else - case (RMODE_A1_i) - MODE_36: begin - RDATA_A1_o = {ram_rdata_a2[1:0], ram_rdata_a1[15:0]}; - RDATA_A2_o = {ram_rdata_a2[17:16], ram_rdata_a1[17:16], ram_rdata_a2[15:2]}; - end - MODE_18: begin - RDATA_A1_o = (laddr_a1[4] ? ram_rdata_a2 : ram_rdata_a1); - RDATA_A2_o = 18'b000000000000000000; - end - MODE_9: begin - RDATA_A1_o = (laddr_a1[4] ? {9'b000000000, ram_rdata_a2[8:0]} : {9'b000000000, ram_rdata_a1[8:0]}); - RDATA_A2_o = 18'b000000000000000000; - end - MODE_4: begin - RDATA_A2_o = 18'b000000000000000000; - RDATA_A1_o[17:4] = 14'b00000000000000; - RDATA_A1_o[3:0] = (laddr_a1[4] ? ram_rdata_a2[3:0] : ram_rdata_a1[3:0]); - end - MODE_2: begin - RDATA_A2_o = 18'b000000000000000000; - RDATA_A1_o[17:2] = 16'b0000000000000000; - RDATA_A1_o[1:0] = (laddr_a1[4] ? ram_rdata_a2[1:0] : ram_rdata_a1[1:0]); - end - MODE_1: begin - RDATA_A2_o = 18'b000000000000000000; - RDATA_A1_o[17:1] = 17'b00000000000000000; - RDATA_A1_o[0] = (laddr_a1[4] ? ram_rdata_a2[0] : ram_rdata_a1[0]); - end - default: begin - RDATA_A1_o = {ram_rdata_a2[1:0], ram_rdata_a1[15:0]}; - RDATA_A2_o = {ram_rdata_a2[17:16], ram_rdata_a1[17:16], ram_rdata_a2[15:2]}; - end - endcase - case (RMODE_B1_i) - MODE_36: begin - RDATA_B1_o = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; - RDATA_B2_o = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; - end - MODE_18: begin - RDATA_B1_o = (FMODE1_i ? fifo_rdata[17:0] : (laddr_b1[4] ? ram_rdata_b2 : ram_rdata_b1)); - RDATA_B2_o = 18'b000000000000000000; - end - MODE_9: begin - RDATA_B1_o = (FMODE1_i ? {9'b000000000, fifo_rdata[8:0]} : (laddr_b1[4] ? {9'b000000000, ram_rdata_b2[8:0]} : {9'b000000000, ram_rdata_b1[8:0]})); - RDATA_B2_o = 18'b000000000000000000; - end - MODE_4: begin - RDATA_B2_o = 18'b000000000000000000; - RDATA_B1_o[17:4] = 14'b00000000000000; - RDATA_B1_o[3:0] = (laddr_b1[4] ? ram_rdata_b2[3:0] : ram_rdata_b1[3:0]); - end - MODE_2: begin - RDATA_B2_o = 18'b000000000000000000; - RDATA_B1_o[17:2] = 16'b0000000000000000; - RDATA_B1_o[1:0] = (laddr_b1[4] ? ram_rdata_b2[1:0] : ram_rdata_b1[1:0]); - end - MODE_1: begin - RDATA_B2_o = 18'b000000000000000000; - RDATA_B1_o[17:1] = 17'b00000000000000000; - RDATA_B1_o[0] = (laddr_b1[4] ? ram_rdata_b2[0] : ram_rdata_b1[0]); - end - default: begin - RDATA_B1_o = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; - RDATA_B2_o = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; - end - endcase - end - endcase - end - always @(posedge CLK_A1_i) laddr_a1 <= ADDR_A1_i; - always @(posedge CLK_B1_i) laddr_b1 <= ADDR_B1_i; - always @(posedge CLK_A1_i or posedge CLK_B1_i or posedge CLK_A2_i or posedge CLK_B2_i) begin - if (WMODE_A1_i == MODE_36) - fifo_wmode = 2'b00; - else if (WMODE_A1_i == MODE_18) - fifo_wmode = 2'b01; - else if (WMODE_A1_i == MODE_9) - fifo_wmode = 2'b10; - else - fifo_wmode = 2'b00; - - if (RMODE_B1_i == MODE_36) - fifo_rmode = 2'b00; - else if (RMODE_B1_i == MODE_18) - fifo_rmode = 2'b01; - else if (RMODE_B1_i == MODE_9) - fifo_rmode = 2'b10; - else - fifo_rmode = 2'b00; - end - fifo_ctl #( - .ADDR_WIDTH(12), - .FIFO_WIDTH(3'd4) - ) fifo36_ctl( - .rclk(smux_clk_b1), - .rst_R_n(~FLUSH1_i), - .wclk(smux_clk_a1), - .rst_W_n(~FLUSH1_i), - .ren(REN_B1_i), - .wen(ram_wen_a1), - .sync(SYNC_FIFO1_i), - .depth(3'b111), - .rmode(fifo_rmode), - .wmode(fifo_wmode), - .ren_o(ren_o), - .fflags({FULL3, FMO3, FWM3, OVERRUN3, EMPTY3, EPO3, EWM3, UNDERRUN3}), - .raddr(ff_raddr), - .waddr(ff_waddr), - .upaf(UPAF1_i), - .upae(UPAE1_i) - ); - TDP18K_FIFO #( - .UPAF(UPAF1_i[10:0]), - .UPAE(UPAE1_i[10:0]), - .SYNC_FIFO(SYNC_FIFO1_i), - .POWERDN(POWERDN1_i), - .SLEEP(SLEEP1_i), - .PROTECT(PROTECT1_i) - )u1( - .RMODE_A(ram_rmode_a1), - .RMODE_B(ram_rmode_b1), - .WMODE_A(ram_wmode_a1), - .WMODE_B(ram_wmode_b1), - .WEN_A(ram_wen_a1), - .WEN_B(ram_wen_b1), - .REN_A(ram_ren_a1), - .REN_B(ram_ren_b1), - .CLK_A(smux_clk_a1), - .CLK_B(smux_clk_b1), - .BE_A(ram_be_a1), - .BE_B(ram_be_b1), - .ADDR_A(ram_addr_a1), - .ADDR_B(ram_addr_b1), - .WDATA_A(ram_wdata_a1), - .WDATA_B(ram_wdata_b1), - .RDATA_A(ram_rdata_a1), - .RDATA_B(ram_rdata_b1), - .EMPTY(EMPTY1), - .EPO(EPO1), - .EWM(EWM1), - .UNDERRUN(UNDERRUN1), - .FULL(FULL1), - .FMO(FMO1), - .FWM(FWM1), - .OVERRUN(OVERRUN1), - .FLUSH(FLUSH1_i), - .RAM_ID({RAM_ID_i}), - .FMODE(ram_fmode1), - .PL_INIT(PL_INIT_i), - .PL_ENA(PL_ENA_i), - .PL_WEN(PL_WEN_i[0]), - .PL_REN(PL_REN_i), - .PL_CLK(PL_CLK_i), - .PL_ADDR(PL_ADDR_i), - .PL_DATA_IN({PL_DATA_i[33:32], PL_DATA_i[15:0]}), - .PL_DATA_OUT(pl_dout0) - ); - TDP18K_FIFO #( - .UPAF(UPAF2_i[10:0]), - .UPAE(UPAE2_i[10:0]), - .SYNC_FIFO(SYNC_FIFO2_i), - .POWERDN(POWERDN2_i), - .SLEEP(SLEEP2_i), - .PROTECT(PROTECT2_i) - )u2( - .RMODE_A(ram_rmode_a2), - .RMODE_B(ram_rmode_b2), - .WMODE_A(ram_wmode_a2), - .WMODE_B(ram_wmode_b2), - .WEN_A(ram_wen_a2), - .WEN_B(ram_wen_b2), - .REN_A(ram_ren_a2), - .REN_B(ram_ren_b2), - .CLK_A(smux_clk_a2), - .CLK_B(smux_clk_b2), - .BE_A(ram_be_a2), - .BE_B(ram_be_b2), - .ADDR_A(ram_addr_a2), - .ADDR_B(ram_addr_b2), - .WDATA_A(ram_wdata_a2), - .WDATA_B(ram_wdata_b2), - .RDATA_A(ram_rdata_a2), - .RDATA_B(ram_rdata_b2), - .EMPTY(EMPTY2), - .EPO(EPO2), - .EWM(EWM2), - .UNDERRUN(UNDERRUN2), - .FULL(FULL2), - .FMO(FMO2), - .FWM(FWM2), - .OVERRUN(OVERRUN2), - .FLUSH(FLUSH2_i), - .RAM_ID({RAM_ID_i}), - .FMODE(ram_fmode2), - .PL_INIT(PL_INIT_i), - .PL_ENA(PL_ENA_i), - .PL_WEN(PL_WEN_i[1]), - .PL_REN(PL_REN_i), - .PL_CLK(PL_CLK_i), - .PL_ADDR(PL_ADDR_i), - .PL_DATA_IN({PL_DATA_i[35:34], PL_DATA_i[31:16]}), - .PL_DATA_OUT(pl_dout1) - ); - always @(*) begin - if (RAM_ID_i == PL_ADDR_i[31:16]) - PL_DATA_o = (PL_REN_i ? {pl_dout1[17:16], pl_dout0[17:16], pl_dout1[15:0], pl_dout0[15:0]} : PL_DATA_i); - else - PL_DATA_o = PL_DATA_i; - PL_ADDR_o = PL_ADDR_i; - PL_INIT_o = PL_INIT_i; - PL_ENA_o = PL_ENA_i; - PL_WEN_o = PL_WEN_i; - PL_REN_o = PL_REN_i; - PL_CLK_o = PL_CLK_i; - end + parameter SYNC_FIFO1_i = 1'b0; + parameter RMODE_A1_i = 3'b0; + parameter RMODE_B1_i = 3'b0; + parameter WMODE_A1_i = 3'b0; + parameter WMODE_B1_i = 3'b0; + parameter FMODE1_i = 1'b0; + parameter POWERDN1_i = 1'b0; + parameter SLEEP1_i = 1'b0; + parameter PROTECT1_i = 1'b0; + parameter UPAE1_i = 12'b0; + parameter UPAF1_i = 12'b0; + + parameter SYNC_FIFO2_i = 1'b0; + parameter RMODE_A2_i = 3'b0; + parameter RMODE_B2_i = 3'b0; + parameter WMODE_A2_i = 3'b0; + parameter WMODE_B2_i = 3'b0; + parameter FMODE2_i = 1'b0; + parameter POWERDN2_i = 1'b0; + parameter SLEEP2_i = 1'b0; + parameter PROTECT2_i = 1'b0; + parameter UPAE2_i = 12'b0; + parameter UPAF2_i = 12'b0; + + parameter SPLIT_i = 1'b0; + + parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INITP_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_02 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_03 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_04 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_05 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_06 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_07 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_08 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_09 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_0F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_10 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_11 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_12 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_13 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_14 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_15 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_16 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_17 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_18 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_19 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_1F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_20 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_21 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_22 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_23 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_24 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_25 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_26 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_27 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_28 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_29 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_2F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_30 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_31 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_32 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_33 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_34 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_35 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_36 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_37 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_38 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_39 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_3F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_40 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_41 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_42 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_43 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_44 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_45 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_46 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_47 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_48 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_49 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_4F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_50 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_51 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_52 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_53 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_54 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_55 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_56 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_57 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_58 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_59 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_5F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_60 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_61 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_62 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_63 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_64 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_65 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_66 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_67 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_68 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_69 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_6F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_70 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_71 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_72 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_73 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_74 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_75 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_76 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_77 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_78 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_79 = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7A = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7B = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7C = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7D = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7E = 256'h0000000000000000000000000000000000000000000000000000000000000000; + parameter INIT_7F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + + input wire WEN_A1_i; + input wire WEN_B1_i; + input wire REN_A1_i; + input wire REN_B1_i; + (* clkbuf_sink *) + input wire CLK_A1_i; + (* clkbuf_sink *) + input wire CLK_B1_i; + input wire [1:0] BE_A1_i; + input wire [1:0] BE_B1_i; + input wire [14:0] ADDR_A1_i; + input wire [14:0] ADDR_B1_i; + input wire [17:0] WDATA_A1_i; + input wire [17:0] WDATA_B1_i; + output reg [17:0] RDATA_A1_o; + output reg [17:0] RDATA_B1_o; + input wire FLUSH1_i; + input wire WEN_A2_i; + input wire WEN_B2_i; + input wire REN_A2_i; + input wire REN_B2_i; + (* clkbuf_sink *) + input wire CLK_A2_i; + (* clkbuf_sink *) + input wire CLK_B2_i; + input wire [1:0] BE_A2_i; + input wire [1:0] BE_B2_i; + input wire [13:0] ADDR_A2_i; + input wire [13:0] ADDR_B2_i; + input wire [17:0] WDATA_A2_i; + input wire [17:0] WDATA_B2_i; + output reg [17:0] RDATA_A2_o; + output reg [17:0] RDATA_B2_o; + input wire FLUSH2_i; + input wire [15:0] RAM_ID_i; + input wire PL_INIT_i; + input wire PL_ENA_i; + input wire PL_REN_i; + input wire PL_CLK_i; + input wire [1:0] PL_WEN_i; + input wire [31:0] PL_ADDR_i; + input wire [35:0] PL_DATA_i; + output reg PL_INIT_o; + output reg PL_ENA_o; + output reg PL_REN_o; + output reg PL_CLK_o; + output reg [1:0] PL_WEN_o; + output reg [31:0] PL_ADDR_o; + output reg [35:0] PL_DATA_o; + wire EMPTY2; + wire EPO2; + wire EWM2; + wire FULL2; + wire FMO2; + wire FWM2; + wire EMPTY1; + wire EPO1; + wire EWM1; + wire FULL1; + wire FMO1; + wire FWM1; + wire UNDERRUN1; + wire OVERRUN1; + wire UNDERRUN2; + wire OVERRUN2; + wire UNDERRUN3; + wire OVERRUN3; + wire EMPTY3; + wire EPO3; + wire EWM3; + wire FULL3; + wire FMO3; + wire FWM3; + wire ram_fmode1; + wire ram_fmode2; + wire [17:0] ram_rdata_a1; + wire [17:0] ram_rdata_b1; + wire [17:0] ram_rdata_a2; + wire [17:0] ram_rdata_b2; + reg [17:0] ram_wdata_a1; + reg [17:0] ram_wdata_b1; + reg [17:0] ram_wdata_a2; + reg [17:0] ram_wdata_b2; + reg [14:0] laddr_a1; + reg [14:0] laddr_b1; + wire [13:0] ram_addr_a1; + wire [13:0] ram_addr_b1; + wire [13:0] ram_addr_a2; + wire [13:0] ram_addr_b2; + wire smux_clk_a1; + wire smux_clk_b1; + wire smux_clk_a2; + wire smux_clk_b2; + reg [1:0] ram_be_a1; + reg [1:0] ram_be_a2; + reg [1:0] ram_be_b1; + reg [1:0] ram_be_b2; + reg [2:0] ram_rmode_a1; + reg [2:0] ram_wmode_a1; + reg [2:0] ram_rmode_b1; + reg [2:0] ram_wmode_b1; + reg [2:0] ram_rmode_a2; + reg [2:0] ram_wmode_a2; + reg [2:0] ram_rmode_b2; + reg [2:0] ram_wmode_b2; + wire ram_ren_a1; + wire ram_ren_b1; + wire ram_ren_a2; + wire ram_ren_b2; + wire ram_wen_a1; + wire ram_wen_b1; + wire ram_wen_a2; + wire ram_wen_b2; + wire ren_o; + wire [11:0] ff_raddr; + wire [11:0] ff_waddr; + reg [35:0] fifo_rdata; + reg [1:0] fifo_rmode; + reg [1:0] fifo_wmode; + wire [1:0] bwl; + wire [17:0] pl_dout0; + wire [17:0] pl_dout1; + assign ram_fmode1 = FMODE1_i & SPLIT_i; + assign ram_fmode2 = FMODE2_i & SPLIT_i; + assign smux_clk_a1 = CLK_A1_i; + assign smux_clk_b1 = (FMODE1_i ? (SYNC_FIFO1_i ? CLK_A1_i : CLK_B1_i) : CLK_B1_i); + assign smux_clk_a2 = (SPLIT_i ? CLK_A2_i : CLK_A1_i); + assign smux_clk_b2 = (SPLIT_i ? CLK_B2_i : (FMODE1_i ? (SYNC_FIFO1_i ? CLK_A1_i : CLK_B1_i) : CLK_B1_i)); + assign ram_ren_a1 = (SPLIT_i ? REN_A1_i : (FMODE1_i ? 0 : REN_A1_i)); + assign ram_ren_a2 = (SPLIT_i ? REN_A2_i : (FMODE1_i ? 0 : REN_A1_i)); + assign ram_ren_b1 = (SPLIT_i ? REN_B1_i : (FMODE1_i ? ren_o : REN_B1_i)); + assign ram_ren_b2 = (SPLIT_i ? REN_B2_i : (FMODE1_i ? ren_o : REN_B1_i)); + localparam MODE_36 = 3'b111; + assign ram_wen_a1 = (SPLIT_i ? WEN_A1_i : (FMODE1_i ? ~FULL3 & WEN_A1_i : (WMODE_A1_i == MODE_36 ? WEN_A1_i : WEN_A1_i & ~ADDR_A1_i[4]))); + assign ram_wen_a2 = (SPLIT_i ? WEN_A2_i : (FMODE1_i ? ~FULL3 & WEN_A1_i : (WMODE_A1_i == MODE_36 ? WEN_A1_i : WEN_A1_i & ADDR_A1_i[4]))); + assign ram_wen_b1 = (SPLIT_i ? WEN_B1_i : (WMODE_B1_i == MODE_36 ? WEN_B1_i : WEN_B1_i & ~ADDR_B1_i[4])); + assign ram_wen_b2 = (SPLIT_i ? WEN_B2_i : (WMODE_B1_i == MODE_36 ? WEN_B1_i : WEN_B1_i & ADDR_B1_i[4])); + assign ram_addr_a1 = (SPLIT_i ? ADDR_A1_i[13:0] : (FMODE1_i ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1_i[14:5], ADDR_A1_i[3:0]})); + assign ram_addr_b1 = (SPLIT_i ? ADDR_B1_i[13:0] : (FMODE1_i ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1_i[14:5], ADDR_B1_i[3:0]})); + assign ram_addr_a2 = (SPLIT_i ? ADDR_A2_i[13:0] : (FMODE1_i ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1_i[14:5], ADDR_A1_i[3:0]})); + assign ram_addr_b2 = (SPLIT_i ? ADDR_B2_i[13:0] : (FMODE1_i ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1_i[14:5], ADDR_B1_i[3:0]})); + assign bwl = (SPLIT_i ? ADDR_A1_i[4:3] : (FMODE1_i ? ff_waddr[1:0] : ADDR_A1_i[4:3])); + localparam MODE_18 = 3'b110; + localparam MODE_9 = 3'b101; + always @(*) begin : WDATA_SEL + case (SPLIT_i) + 1: begin + ram_wdata_a1 = WDATA_A1_i; + ram_wdata_a2 = WDATA_A2_i; + ram_wdata_b1 = WDATA_B1_i; + ram_wdata_b2 = WDATA_B2_i; + ram_be_a2 = BE_A2_i; + ram_be_b2 = BE_B2_i; + ram_be_a1 = BE_A1_i; + ram_be_b1 = BE_B1_i; + end + 0: begin + case (WMODE_A1_i) + MODE_36: begin + ram_wdata_a1 = {WDATA_A2_i[15:14], WDATA_A1_i[15:0]}; + ram_wdata_a2 = {WDATA_A2_i[17:16], WDATA_A2_i[13:0], WDATA_A1_i[17:16]}; + ram_be_a2 = (FMODE1_i ? 2'b11 : BE_A2_i); + ram_be_a1 = (FMODE1_i ? 2'b11 : BE_A1_i); + end + MODE_18: begin + ram_wdata_a1 = WDATA_A1_i; + ram_wdata_a2 = WDATA_A1_i; + ram_be_a1 = (FMODE1_i ? (ff_waddr[1] ? 2'b00 : 2'b11) : BE_A1_i); + ram_be_a2 = (FMODE1_i ? (ff_waddr[1] ? 2'b11 : 2'b00) : BE_A1_i); + end + MODE_9: + case (bwl) + 0: begin + ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); + ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); + ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_be_a1[0] = (FMODE1_i ? (ff_waddr[1:0] == 0 ? 1'b1 : 1'b0) : 1'b1); + ram_be_a1[1] = (FMODE1_i ? (ff_waddr[1:0] == 1 ? 1'b1 : 1'b0) : 1'b0); + ram_be_a2[0] = (FMODE1_i ? (ff_waddr[1:0] == 2 ? 1'b1 : 1'b0) : 1'b0); + ram_be_a2[1] = (FMODE1_i ? (ff_waddr[1:0] == 3 ? 1'b1 : 1'b0) : 1'b0); + end + 1: begin + ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); + ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); + ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + {ram_be_a2, ram_be_a1} = 4'b0010; + end + 2: begin + ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); + ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); + ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + {ram_be_a2, ram_be_a1} = 4'b0100; + end + 3: begin + ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); + ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); + ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); + {ram_be_a2, ram_be_a1} = 4'b1000; + end + endcase + default: begin + ram_wdata_a1 = WDATA_A1_i; + ram_wdata_a2 = WDATA_A1_i; + ram_be_a2 = (FMODE1_i ? 2'b11 : BE_A1_i); + ram_be_a1 = (FMODE1_i ? 2'b11 : BE_A1_i); + end + endcase + case (WMODE_B1_i) + MODE_36: begin + ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : {WDATA_B2_i[15:14], WDATA_B1_i[15:0]}); + ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : {WDATA_B2_i[17:16], WDATA_B2_i[13:0], WDATA_B1_i[17:16]}); + ram_be_b2 = BE_B2_i; + ram_be_b1 = BE_B1_i; + end + MODE_18: begin + ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); + ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); + ram_be_b1 = BE_B1_i; + ram_be_b2 = BE_B1_i; + end + MODE_9: + case (ADDR_B1_i[4:3]) + 0: begin + ram_wdata_b1[8:0] = WDATA_B1_i[8:0]; + ram_wdata_b1[17:9] = 9'b000000000; + ram_wdata_b2[8:0] = 9'b000000000; + ram_wdata_b2[17:9] = 9'b000000000; + {ram_be_b2, ram_be_b1} = 4'b0001; + end + 1: begin + ram_wdata_b1[8:0] = WDATA_B1_i[8:0]; + ram_wdata_b1[17:9] = 9'b000000000; + ram_wdata_b2[8:0] = 9'b000000000; + ram_wdata_b2[17:9] = 9'b000000000; + {ram_be_b2, ram_be_b1} = 4'b0010; + end + 2: begin + ram_wdata_b1[8:0] = 9'b000000000; + ram_wdata_b1[17:9] = 9'b000000000; + ram_wdata_b2[8:0] = WDATA_B1_i[8:0]; + ram_wdata_b2[17:9] = 9'b000000000; + {ram_be_b2, ram_be_b1} = 4'b0100; + end + 3: begin + ram_wdata_b1[8:0] = 9'b000000000; + ram_wdata_b1[17:9] = 9'b000000000; + ram_wdata_b2[8:0] = WDATA_B1_i[8:0]; + ram_wdata_b2[17:9] = 9'b000000000; + {ram_be_b2, ram_be_b1} = 4'b1000; + end + endcase + default: begin + ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); + ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); + ram_be_b2 = BE_B1_i; + ram_be_b1 = BE_B1_i; + end + endcase + end + endcase + end + always @(posedge CLK_A1_i or posedge CLK_B1_i or posedge CLK_A2_i or posedge CLK_B2_i) begin + if (!SPLIT_i) begin + ram_rmode_a1 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); + ram_rmode_a2 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); + ram_wmode_a1 <= (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); + ram_wmode_a2 <= (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); + ram_rmode_b1 <= (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); + ram_rmode_b2 <= (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); + ram_wmode_b1 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); + ram_wmode_b2 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); + end else begin + ram_rmode_a1 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); + ram_rmode_a2 <= (RMODE_A2_i == MODE_36 ? MODE_18 : RMODE_A2_i); + ram_wmode_a1 <= (WMODE_A1_i == MODE_36 ? MODE_18 : WMODE_A1_i); + ram_wmode_a2 <= (WMODE_A2_i == MODE_36 ? MODE_18 : WMODE_A2_i); + ram_rmode_b1 <= (RMODE_B1_i == MODE_36 ? MODE_18 : RMODE_B1_i); + ram_rmode_b2 <= (RMODE_B2_i == MODE_36 ? MODE_18 : RMODE_B2_i); + ram_wmode_b1 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); + ram_wmode_b2 <= (WMODE_B2_i == MODE_36 ? MODE_18 : WMODE_B2_i); + end + end + always @(*) begin : FIFO_READ_SEL + case (RMODE_B1_i) + MODE_36: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; + MODE_18: fifo_rdata = (ff_raddr[1] ? {18'b000000000000000000, ram_rdata_b2} : {18'b000000000000000000, ram_rdata_b1}); + MODE_9: + case (ff_raddr[1:0]) + 0: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b1[16], ram_rdata_b1[7:0]}; + 1: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b1[17], ram_rdata_b1[15:8]}; + 2: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[16], ram_rdata_b2[7:0]}; + 3: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[17], ram_rdata_b2[15:8]}; + endcase + default: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; + endcase + end + localparam MODE_1 = 3'b001; + localparam MODE_2 = 3'b010; + localparam MODE_4 = 3'b100; + always @(*) begin : RDATA_SEL + case (SPLIT_i) + 1: begin + RDATA_A1_o = (FMODE1_i ? {10'b0000000000, EMPTY1, EPO1, EWM1, UNDERRUN1, FULL1, FMO1, FWM1, OVERRUN1} : ram_rdata_a1); + RDATA_B1_o = ram_rdata_b1; + RDATA_A2_o = (FMODE2_i ? {10'b0000000000, EMPTY2, EPO2, EWM2, UNDERRUN2, FULL2, FMO2, FWM2, OVERRUN2} : ram_rdata_a2); + RDATA_B2_o = ram_rdata_b2; + end + 0: begin + if (FMODE1_i) begin + RDATA_A1_o = {10'b0000000000, EMPTY3, EPO3, EWM3, UNDERRUN3, FULL3, FMO3, FWM3, OVERRUN3}; + RDATA_A2_o = 18'b000000000000000000; + end + else + case (RMODE_A1_i) + MODE_36: begin + RDATA_A1_o = {ram_rdata_a2[1:0], ram_rdata_a1[15:0]}; + RDATA_A2_o = {ram_rdata_a2[17:16], ram_rdata_a1[17:16], ram_rdata_a2[15:2]}; + end + MODE_18: begin + RDATA_A1_o = (laddr_a1[4] ? ram_rdata_a2 : ram_rdata_a1); + RDATA_A2_o = 18'b000000000000000000; + end + MODE_9: begin + RDATA_A1_o = (laddr_a1[4] ? {9'b000000000, ram_rdata_a2[8:0]} : {9'b000000000, ram_rdata_a1[8:0]}); + RDATA_A2_o = 18'b000000000000000000; + end + MODE_4: begin + RDATA_A2_o = 18'b000000000000000000; + RDATA_A1_o[17:4] = 14'b00000000000000; + RDATA_A1_o[3:0] = (laddr_a1[4] ? ram_rdata_a2[3:0] : ram_rdata_a1[3:0]); + end + MODE_2: begin + RDATA_A2_o = 18'b000000000000000000; + RDATA_A1_o[17:2] = 16'b0000000000000000; + RDATA_A1_o[1:0] = (laddr_a1[4] ? ram_rdata_a2[1:0] : ram_rdata_a1[1:0]); + end + MODE_1: begin + RDATA_A2_o = 18'b000000000000000000; + RDATA_A1_o[17:1] = 17'b00000000000000000; + RDATA_A1_o[0] = (laddr_a1[4] ? ram_rdata_a2[0] : ram_rdata_a1[0]); + end + default: begin + RDATA_A1_o = {ram_rdata_a2[1:0], ram_rdata_a1[15:0]}; + RDATA_A2_o = {ram_rdata_a2[17:16], ram_rdata_a1[17:16], ram_rdata_a2[15:2]}; + end + endcase + case (RMODE_B1_i) + MODE_36: begin + RDATA_B1_o = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; + RDATA_B2_o = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; + end + MODE_18: begin + RDATA_B1_o = (FMODE1_i ? fifo_rdata[17:0] : (laddr_b1[4] ? ram_rdata_b2 : ram_rdata_b1)); + RDATA_B2_o = 18'b000000000000000000; + end + MODE_9: begin + RDATA_B1_o = (FMODE1_i ? {9'b000000000, fifo_rdata[8:0]} : (laddr_b1[4] ? {9'b000000000, ram_rdata_b2[8:0]} : {9'b000000000, ram_rdata_b1[8:0]})); + RDATA_B2_o = 18'b000000000000000000; + end + MODE_4: begin + RDATA_B2_o = 18'b000000000000000000; + RDATA_B1_o[17:4] = 14'b00000000000000; + RDATA_B1_o[3:0] = (laddr_b1[4] ? ram_rdata_b2[3:0] : ram_rdata_b1[3:0]); + end + MODE_2: begin + RDATA_B2_o = 18'b000000000000000000; + RDATA_B1_o[17:2] = 16'b0000000000000000; + RDATA_B1_o[1:0] = (laddr_b1[4] ? ram_rdata_b2[1:0] : ram_rdata_b1[1:0]); + end + MODE_1: begin + RDATA_B2_o = 18'b000000000000000000; + RDATA_B1_o[17:1] = 17'b00000000000000000; + RDATA_B1_o[0] = (laddr_b1[4] ? ram_rdata_b2[0] : ram_rdata_b1[0]); + end + default: begin + RDATA_B1_o = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; + RDATA_B2_o = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; + end + endcase + end + endcase + end + always @(posedge CLK_A1_i) laddr_a1 <= ADDR_A1_i; + always @(posedge CLK_B1_i) laddr_b1 <= ADDR_B1_i; + always @(posedge CLK_A1_i or posedge CLK_B1_i or posedge CLK_A2_i or posedge CLK_B2_i) begin + if (WMODE_A1_i == MODE_36) + fifo_wmode = 2'b00; + else if (WMODE_A1_i == MODE_18) + fifo_wmode = 2'b01; + else if (WMODE_A1_i == MODE_9) + fifo_wmode = 2'b10; + else + fifo_wmode = 2'b00; + + if (RMODE_B1_i == MODE_36) + fifo_rmode = 2'b00; + else if (RMODE_B1_i == MODE_18) + fifo_rmode = 2'b01; + else if (RMODE_B1_i == MODE_9) + fifo_rmode = 2'b10; + else + fifo_rmode = 2'b00; + end + fifo_ctl #( + .ADDR_WIDTH(12), + .FIFO_WIDTH(3'd4) + ) fifo36_ctl( + .rclk(smux_clk_b1), + .rst_R_n(~FLUSH1_i), + .wclk(smux_clk_a1), + .rst_W_n(~FLUSH1_i), + .ren(REN_B1_i), + .wen(ram_wen_a1), + .sync(SYNC_FIFO1_i), + .depth(3'b111), + .rmode(fifo_rmode), + .wmode(fifo_wmode), + .ren_o(ren_o), + .fflags({FULL3, FMO3, FWM3, OVERRUN3, EMPTY3, EPO3, EWM3, UNDERRUN3}), + .raddr(ff_raddr), + .waddr(ff_waddr), + .upaf(UPAF1_i), + .upae(UPAE1_i) + ); + TDP18K_FIFO #( + .UPAF(UPAF1_i[10:0]), + .UPAE(UPAE1_i[10:0]), + .SYNC_FIFO(SYNC_FIFO1_i), + .POWERDN(POWERDN1_i), + .SLEEP(SLEEP1_i), + .PROTECT(PROTECT1_i) + )u1( + .RMODE_A(ram_rmode_a1), + .RMODE_B(ram_rmode_b1), + .WMODE_A(ram_wmode_a1), + .WMODE_B(ram_wmode_b1), + .WEN_A(ram_wen_a1), + .WEN_B(ram_wen_b1), + .REN_A(ram_ren_a1), + .REN_B(ram_ren_b1), + .CLK_A(smux_clk_a1), + .CLK_B(smux_clk_b1), + .BE_A(ram_be_a1), + .BE_B(ram_be_b1), + .ADDR_A(ram_addr_a1), + .ADDR_B(ram_addr_b1), + .WDATA_A(ram_wdata_a1), + .WDATA_B(ram_wdata_b1), + .RDATA_A(ram_rdata_a1), + .RDATA_B(ram_rdata_b1), + .EMPTY(EMPTY1), + .EPO(EPO1), + .EWM(EWM1), + .UNDERRUN(UNDERRUN1), + .FULL(FULL1), + .FMO(FMO1), + .FWM(FWM1), + .OVERRUN(OVERRUN1), + .FLUSH(FLUSH1_i), + .RAM_ID({RAM_ID_i}), + .FMODE(ram_fmode1), + .PL_INIT(PL_INIT_i), + .PL_ENA(PL_ENA_i), + .PL_WEN(PL_WEN_i[0]), + .PL_REN(PL_REN_i), + .PL_CLK(PL_CLK_i), + .PL_ADDR(PL_ADDR_i), + .PL_DATA_IN({PL_DATA_i[33:32], PL_DATA_i[15:0]}), + .PL_DATA_OUT(pl_dout0) + ); + TDP18K_FIFO #( + .UPAF(UPAF2_i[10:0]), + .UPAE(UPAE2_i[10:0]), + .SYNC_FIFO(SYNC_FIFO2_i), + .POWERDN(POWERDN2_i), + .SLEEP(SLEEP2_i), + .PROTECT(PROTECT2_i) + )u2( + .RMODE_A(ram_rmode_a2), + .RMODE_B(ram_rmode_b2), + .WMODE_A(ram_wmode_a2), + .WMODE_B(ram_wmode_b2), + .WEN_A(ram_wen_a2), + .WEN_B(ram_wen_b2), + .REN_A(ram_ren_a2), + .REN_B(ram_ren_b2), + .CLK_A(smux_clk_a2), + .CLK_B(smux_clk_b2), + .BE_A(ram_be_a2), + .BE_B(ram_be_b2), + .ADDR_A(ram_addr_a2), + .ADDR_B(ram_addr_b2), + .WDATA_A(ram_wdata_a2), + .WDATA_B(ram_wdata_b2), + .RDATA_A(ram_rdata_a2), + .RDATA_B(ram_rdata_b2), + .EMPTY(EMPTY2), + .EPO(EPO2), + .EWM(EWM2), + .UNDERRUN(UNDERRUN2), + .FULL(FULL2), + .FMO(FMO2), + .FWM(FWM2), + .OVERRUN(OVERRUN2), + .FLUSH(FLUSH2_i), + .RAM_ID({RAM_ID_i}), + .FMODE(ram_fmode2), + .PL_INIT(PL_INIT_i), + .PL_ENA(PL_ENA_i), + .PL_WEN(PL_WEN_i[1]), + .PL_REN(PL_REN_i), + .PL_CLK(PL_CLK_i), + .PL_ADDR(PL_ADDR_i), + .PL_DATA_IN({PL_DATA_i[35:34], PL_DATA_i[31:16]}), + .PL_DATA_OUT(pl_dout1) + ); + always @(*) begin + if (RAM_ID_i == PL_ADDR_i[31:16]) + PL_DATA_o = (PL_REN_i ? {pl_dout1[17:16], pl_dout0[17:16], pl_dout1[15:0], pl_dout0[15:0]} : PL_DATA_i); + else + PL_DATA_o = PL_DATA_i; + PL_ADDR_o = PL_ADDR_i; + PL_INIT_o = PL_INIT_i; + PL_ENA_o = PL_ENA_i; + PL_WEN_o = PL_WEN_i; + PL_REN_o = PL_REN_i; + PL_CLK_o = PL_CLK_i; + end endmodule (* blackbox *) @@ -1306,9 +1306,9 @@ module QL_DSP2 ( // TODO: Name subject to change assign z = f_mode ? {dsp_frac1_z, dsp_frac0_z} : dsp_full_z; assign dly_b = f_mode ? {dsp_frac1_dly_b, dsp_frac0_dly_b} : dsp_full_dly_b; - // Output used when fmode == 1 + // Output used when fmode == 1 dsp_t1_sim #( - .NBITS_A(NBITS_A/2), + .NBITS_A(NBITS_A/2), .NBITS_B(NBITS_B/2), .NBITS_ACC(NBITS_ACC/2), .NBITS_Z(NBITS_Z/2), @@ -1342,9 +1342,9 @@ module QL_DSP2 ( // TODO: Name subject to change .coef_3_i(COEFF_3[(NBITS_COEF/2)-1:0]) ); - // Output used when fmode == 1 + // Output used when fmode == 1 dsp_t1_sim #( - .NBITS_A(NBITS_A/2), + .NBITS_A(NBITS_A/2), .NBITS_B(NBITS_B/2), .NBITS_ACC(NBITS_ACC/2), .NBITS_Z(NBITS_Z/2), @@ -1378,7 +1378,7 @@ module QL_DSP2 ( // TODO: Name subject to change .coef_3_i(COEFF_3[NBITS_COEF-1:NBITS_COEF/2]) ); - // Output used when fmode == 0 + // Output used when fmode == 0 dsp_t1_sim #( .NBITS_A(NBITS_A), .NBITS_B(NBITS_B), @@ -1419,7 +1419,7 @@ module dsp_t1_sim # ( parameter NBITS_ACC = 64, parameter NBITS_A = 20, parameter NBITS_B = 18, - parameter NBITS_Z = 38, + parameter NBITS_Z = 38, parameter NBITS_COEF = 20, parameter NBITS_AF = 4 )( @@ -1467,25 +1467,25 @@ module dsp_t1_sim # ( reg [2:0] r_feedback; reg [5:0] r_shift_d1; reg [5:0] r_shift_d2; - reg r_subtract; - reg r_sat; - reg r_rnd; + reg r_subtract; + reg r_sat; + reg r_rnd; reg [NBITS_ACC-1:0] acc; initial begin - r_a <= 'h0; - r_b <= 'h0; + r_a <= 0; + r_b <= 0; - r_acc_fir <= 0; + r_acc_fir <= 0; r_unsigned_a <= 0; r_unsigned_b <= 0; r_feedback <= 0; r_shift_d1 <= 0; r_shift_d2 <= 0; - r_subtract <= 0; + r_subtract <= 0; r_load_acc <= 0; - r_sat <= 0; - r_rnd <= 0; + r_sat <= 0; + r_rnd <= 0; end always @(posedge clock_i or negedge reset_n_i) begin @@ -1494,32 +1494,32 @@ module dsp_t1_sim # ( r_a <= 'h0; r_b <= 'h0; - r_acc_fir <= 0; + r_acc_fir <= 0; r_unsigned_a <= 0; r_unsigned_b <= 0; r_feedback <= 0; r_shift_d1 <= 0; r_shift_d2 <= 0; - r_subtract <= 0; + r_subtract <= 0; r_load_acc <= 0; - r_sat <= 0; - r_rnd <= 0; + r_sat <= 0; + r_rnd <= 0; end else begin r_a <= a_i; r_b <= b_i; - r_acc_fir <= acc_fir_i; + r_acc_fir <= acc_fir_i; r_unsigned_a <= unsigned_a_i; r_unsigned_b <= unsigned_b_i; r_feedback <= feedback_i; r_shift_d1 <= shift_right_i; r_shift_d2 <= r_shift_d1; - r_subtract <= subtract_i; + r_subtract <= subtract_i; r_load_acc <= load_acc_i; - r_sat <= r_sat; - r_rnd <= r_rnd; + r_sat <= r_sat; + r_rnd <= r_rnd; end end @@ -1534,8 +1534,8 @@ module dsp_t1_sim # ( wire [2:0] feedback = register_inputs_i ? r_feedback : feedback_i; wire load_acc = register_inputs_i ? r_load_acc : load_acc_i; wire subtract = register_inputs_i ? r_subtract : subtract_i; - wire sat = register_inputs_i ? r_sat : saturate_enable_i; - wire rnd = register_inputs_i ? r_rnd : round_i; + wire sat = register_inputs_i ? r_sat : saturate_enable_i; + wire rnd = register_inputs_i ? r_rnd : round_i; // Shift right control wire [5:0] shift_d1 = register_inputs_i ? r_shift_d1 : shift_right_i; @@ -1551,7 +1551,7 @@ module dsp_t1_sim # ( (feedback == 3'h4) ? coef_0_i : (feedback == 3'h5) ? coef_1_i : (feedback == 3'h6) ? coef_2_i : - coef_3_i; // if feedback == 3'h7 + coef_3_i; // if feedback == 3'h7 wire [NBITS_B-1:0] mult_b = (feedback == 2'h2) ? {NBITS_B{1'b0}} : b; @@ -1572,8 +1572,8 @@ module dsp_t1_sim # ( {{(NBITS_ACC-NBITS_A-NBITS_B){mult[NBITS_A+NBITS_B-1]}}, mult[NBITS_A+NBITS_B-1:0]}; wire [NBITS_ACC-1:0] a_xtnd = (unsigned_a) ? - { {(NBITS_ACC - NBITS_A - NBITS_AF){1'b0}}, acc_fir, {a} } : - { {(NBITS_ACC - NBITS_A - NBITS_AF){acc_fir[NBITS_AF-1]}}, acc_fir, {a[NBITS_A-1:0]} }; + { {(NBITS_ACC - NBITS_A - NBITS_AF){1'b0}}, acc_fir, {a} } : + { {(NBITS_ACC - NBITS_A - NBITS_AF){acc_fir[NBITS_AF-1]}}, acc_fir, {a[NBITS_A-1:0]} }; // Adder wire [NBITS_ACC-1:0] add_a = (subtract_i) ? (~mult_xtnd + 1) : mult_xtnd; @@ -1638,7 +1638,7 @@ module dsp_t1_sim # ( (output_select_i == 3'h4) ? z1 : (output_select_i == 3'h5) ? z1 : (output_select_i == 3'h6) ? z1 : - z1; // if output_select_i == 3'h7 + z1; // if output_select_i == 3'h7 // B input delayed passthrough initial dly_b_o <= 0; @@ -1686,29 +1686,29 @@ module dsp_t1_20x18x64 ( .COEFF_2(COEFF_2), .COEFF_3(COEFF_3) ) dsp ( - .a(a_i), - .b(b_i), - .z(z_o), - .dly_b(dly_b_o), + .a(a_i), + .b(b_i), + .z(z_o), + .dly_b(dly_b_o), - .f_mode(1'b0), // 20x18x64 DSP + .f_mode(1'b0), // 20x18x64 DSP - .acc_fir(acc_fir_i), - .feedback(feedback_i), - .load_acc(load_acc_i), + .acc_fir(acc_fir_i), + .feedback(feedback_i), + .load_acc(load_acc_i), - .unsigned_a(unsigned_a_i), - .unsigned_b(unsigned_b_i), + .unsigned_a(unsigned_a_i), + .unsigned_b(unsigned_b_i), - .clk(clock_i), - .reset(reset_i), + .clk(clock_i), + .reset(reset_i), - .saturate_enable(saturate_enable_i), - .output_select(output_select_i), - .round(round_i), - .shift_right(shift_right_i), - .subtract(subtract_i), - .register_inputs(register_inputs_i) + .saturate_enable(saturate_enable_i), + .output_select(output_select_i), + .round(round_i), + .shift_right(shift_right_i), + .subtract(subtract_i), + .register_inputs(register_inputs_i) ); endmodule @@ -1750,28 +1750,28 @@ module dsp_t1_10x9x32 ( .COEFF_2({10'd0, COEFF_2}), .COEFF_3({10'd0, COEFF_3}) ) dsp ( - .a({10'd0, a_i}), - .b({9'd0, b_i}), - .z({z_rem, z_o}), - .dly_b({dly_b_rem, dly_b_o}), + .a({10'd0, a_i}), + .b({9'd0, b_i}), + .z({z_rem, z_o}), + .dly_b({dly_b_rem, dly_b_o}), - .f_mode(1'b1), // 10x9x32 DSP + .f_mode(1'b1), // 10x9x32 DSP - .acc_fir({2'd0, acc_fir_i}), - .feedback(feedback_i), - .load_acc(load_acc_i), + .acc_fir({2'd0, acc_fir_i}), + .feedback(feedback_i), + .load_acc(load_acc_i), - .unsigned_a(unsigned_a_i), - .unsigned_b(unsigned_b_i), + .unsigned_a(unsigned_a_i), + .unsigned_b(unsigned_b_i), - .clk(clock_i), - .reset(reset_i), + .clk(clock_i), + .reset(reset_i), - .saturate_enable(saturate_enable_i), - .output_select(output_select_i), - .round(round_i), - .shift_right(shift_right_i), - .subtract(subtract_i), - .register_inputs(register_inputs_i) + .saturate_enable(saturate_enable_i), + .output_select(output_select_i), + .round(round_i), + .shift_right(shift_right_i), + .subtract(subtract_i), + .register_inputs(register_inputs_i) ); endmodule From da27bc7c12222d3231cc6fa217aaef51a4ee53d9 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Tue, 29 Mar 2022 15:49:48 +0200 Subject: [PATCH 711/845] Headers cleanup Signed-off-by: Karol Gugala --- .github/workflows/build-and-test.sh | 4 ++-- .github/workflows/ci.yml | 4 ++-- .github/workflows/common.sh | 4 ++-- .github/workflows/format-check.sh | 4 ++-- .github/workflows/licensing.yml | 2 +- .github/workflows/setup.sh | 4 ++-- COPYING | 2 +- Makefile | 4 ++-- common/bank_tiles.h | 19 +++++------------- design_introspection-plugin/Makefile | 4 ++-- .../design_introspection.cc | 19 +++++------------- design_introspection-plugin/get_cells.cc | 19 +++++------------- design_introspection-plugin/get_cells.h | 19 +++++------------- design_introspection-plugin/get_cmd.h | 19 +++++------------- design_introspection-plugin/get_count.cc | 19 +++++------------- design_introspection-plugin/get_count.h | 19 +++++------------- design_introspection-plugin/get_nets.cc | 19 +++++------------- design_introspection-plugin/get_nets.h | 19 +++++------------- design_introspection-plugin/get_pins.cc | 19 +++++------------- design_introspection-plugin/get_pins.h | 19 +++++------------- design_introspection-plugin/get_ports.cc | 19 +++++------------- design_introspection-plugin/get_ports.h | 19 +++++------------- .../selection_to_tcl_list.cc | 19 +++++------------- .../selection_to_tcl_list.h | 19 +++++------------- design_introspection-plugin/tests/Makefile | 4 ++-- .../tests/get_cells/get_cells.v | 4 ++-- .../tests/get_count/Makefile | 4 ++-- .../tests/get_count/get_count.v | 4 ++-- .../tests/get_nets/get_nets.v | 4 ++-- .../tests/get_pins/get_pins.v | 4 ++-- .../tests/get_ports/get_ports.v | 4 ++-- dsp-ff-plugin/Makefile | 4 ++-- dsp-ff-plugin/nexus-dsp_rules.txt | 4 ++-- dsp-ff-plugin/tests/Makefile | 4 ++-- .../nexus_conn_conflict/nexus_conn_conflict.v | 4 ++-- .../tests/nexus_conn_share/nexus_conn_share.v | 4 ++-- .../tests/nexus_fftypes/nexus_fftypes.v | 4 ++-- dsp-ff-plugin/tests/nexus_mult/nexus_mult.v | 4 ++-- .../tests/nexus_mult_wide/nexus_mult_wide.v | 4 ++-- .../nexus_param_conflict.v | 4 ++-- environment.yml | 4 ++-- fasm-plugin/Makefile | 4 ++-- fasm-plugin/fasm.cc | 19 +++++------------- fasm-plugin/tests/Makefile | 4 ++-- integrateinv-plugin/Makefile | 4 ++-- integrateinv-plugin/integrateinv.cc | 19 +++++------------- integrateinv-plugin/tests/Makefile | 4 ++-- integrateinv-plugin/tests/fanout/fanout.v | 4 ++-- .../tests/hierarchy/hierarchy.v | 4 ++-- .../tests/multi_bit/multi_bit.v | 4 ++-- .../tests/single_bit/single_bit.v | 4 ++-- integrateinv-plugin/tests/toplevel/toplevel.v | 4 ++-- params-plugin/Makefile | 4 ++-- params-plugin/params.cc | 19 +++++------------- params-plugin/tests/Makefile | 4 ++-- params-plugin/tests/compare_output_json.py | 4 ++-- params-plugin/tests/pll/pll.v | 4 ++-- params-plugin/tests/pll/techmaps/cells_map.v | 4 ++-- params-plugin/tests/pll/techmaps/cells_sim.v | 4 ++-- ql-iob-plugin/Makefile | 4 ++-- ql-iob-plugin/pcf_parser.cc | 19 +++++------------- ql-iob-plugin/pcf_parser.hh | 19 +++++------------- ql-iob-plugin/pinmap_parser.cc | 19 +++++------------- ql-iob-plugin/pinmap_parser.hh | 19 +++++------------- ql-iob-plugin/ql-iob.cc | 19 +++++------------- ql-iob-plugin/tests/Makefile | 4 ++-- ql-iob-plugin/tests/ckpad/Makefile | 4 ++-- ql-iob-plugin/tests/ckpad/design.v | 4 ++-- ql-iob-plugin/tests/common/pp3_cells_map.v | 4 ++-- ql-iob-plugin/tests/common/pp3_cells_sim.v | 4 ++-- ql-iob-plugin/tests/sdiomux/Makefile | 4 ++-- ql-iob-plugin/tests/sdiomux/design.v | 4 ++-- ql-qlf-plugin/Makefile | 4 ++-- ql-qlf-plugin/common/cells_sim.v | 4 ++-- ql-qlf-plugin/pp3/abc9_map.v | 4 ++-- ql-qlf-plugin/pp3/abc9_model.v | 4 ++-- ql-qlf-plugin/pp3/abc9_unmap.v | 5 ++--- ql-qlf-plugin/pp3/brams_map.v | 4 ++-- ql-qlf-plugin/pp3/brams_sim.v | 4 ++-- ql-qlf-plugin/pp3/cells_map.v | 4 ++-- ql-qlf-plugin/pp3/cells_sim.v | 4 ++-- ql-qlf-plugin/pp3/ffs_map.v | 4 ++-- ql-qlf-plugin/pp3/latches_map.v | 4 ++-- ql-qlf-plugin/pp3/lut_map.v | 4 ++-- ql-qlf-plugin/pp3/mult_sim.v | 4 ++-- ql-qlf-plugin/pp3/qlal3_sim.v | 4 ++-- ql-qlf-plugin/pp3/qlal4s3b_sim.v | 4 ++-- ql-qlf-plugin/pp3_braminit.cc | 18 +++++------------ ql-qlf-plugin/ql-dsp-simd.cc | 16 ++++++++------- ql-qlf-plugin/ql-dsp.cc | 18 +++++------------ ql-qlf-plugin/ql-edif.cc | 19 +++++------------- ql-qlf-plugin/qlf_k4n8/arith_map.v | 4 ++-- ql-qlf-plugin/qlf_k4n8/cells_sim.v | 4 ++-- ql-qlf-plugin/qlf_k4n8/ffs_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10/arith_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10/brams_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10/cells_sim.v | 4 ++-- ql-qlf-plugin/qlf_k6n10/dsp_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10/ffs_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10/lut_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/arith_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/ffs_map.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/sram1024x18.v | 4 ++-- ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v | 4 ++-- ql-qlf-plugin/quicklogic_eqn.cc | 18 +++++------------ ql-qlf-plugin/synth_quicklogic.cc | 18 +++++------------ ql-qlf-plugin/tests/Makefile | 4 ++-- ql-qlf-plugin/tests/consts/consts.v | 4 ++-- ql-qlf-plugin/tests/dffs/dffs.v | 4 ++-- ql-qlf-plugin/tests/fsm/fsm.v | 4 ++-- ql-qlf-plugin/tests/full_adder/full_adder.v | 4 ++-- .../tests/iob_no_flatten/iob_no_flatten.v | 4 ++-- ql-qlf-plugin/tests/latches/latches.v | 4 ++-- ql-qlf-plugin/tests/logic/logic.v | 4 ++-- ql-qlf-plugin/tests/mac_unit/mac_unit.v | 4 ++-- ql-qlf-plugin/tests/multiplier/multiplier.v | 4 ++-- ql-qlf-plugin/tests/mux/mux.v | 4 ++-- ql-qlf-plugin/tests/pp3_bram/pp3_bram.v | 4 ++-- ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v | 4 ++-- .../tests/qlf_k6n10f/bram_sdp/bram_sdp.v | 4 ++-- .../tests/qlf_k6n10f/bram_sdp/sim/Makefile | 4 ++-- .../qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v | 4 ++-- .../tests/qlf_k6n10f/bram_tdp/bram_tdp.v | 4 ++-- .../tests/qlf_k6n10f/bram_tdp/sim/Makefile | 4 ++-- .../qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v | 4 ++-- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.v | 4 ++-- .../tests/qlf_k6n10f/dsp_mult/dsp_mult.v | 4 ++-- .../tests/qlf_k6n10f/dsp_simd/dsp_simd.v | 4 ++-- .../qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v | 4 ++-- .../qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v | 4 ++-- .../sim_dsp_mult_r/sim_dsp_mult_r.v | 4 ++-- ql-qlf-plugin/tests/shreg/shreg.v | 4 ++-- ql-qlf-plugin/tests/tribuf/tribuf.v | 4 ++-- sdc-plugin/Makefile | 4 ++-- sdc-plugin/buffers.cc | 18 +++++------------ sdc-plugin/buffers.h | 18 +++++------------ sdc-plugin/clocks.cc | 18 +++++------------ sdc-plugin/clocks.h | 18 +++++------------ sdc-plugin/propagation.cc | 18 +++++------------ sdc-plugin/propagation.h | 18 +++++------------ sdc-plugin/sdc.cc | 18 +++++------------ sdc-plugin/sdc_writer.cc | 18 +++++------------ sdc-plugin/sdc_writer.h | 18 +++++------------ sdc-plugin/set_clock_groups.cc | 18 +++++------------ sdc-plugin/set_clock_groups.h | 18 +++++------------ sdc-plugin/set_false_path.cc | 18 +++++------------ sdc-plugin/set_false_path.h | 18 +++++------------ sdc-plugin/set_max_delay.cc | 18 +++++------------ sdc-plugin/set_max_delay.h | 18 +++++------------ sdc-plugin/tests/Makefile | 4 ++-- sdc-plugin/tests/abc9/abc9.v | 4 ++-- sdc-plugin/tests/counter/counter.v | 4 ++-- sdc-plugin/tests/counter2/counter2.v | 4 ++-- .../tests/create_clock_add/create_clock_add.v | 4 ++-- sdc-plugin/tests/get_clocks/get_clocks.v | 4 ++-- sdc-plugin/tests/period_check/period_check.v | 4 ++-- .../period_format_check/period_format_check.v | 4 ++-- sdc-plugin/tests/pll/pll.v | 4 ++-- .../tests/pll_approx_equal/pll_approx_equal.v | 4 ++-- .../pll_dangling_wires/pll_dangling_wires.v | 4 ++-- sdc-plugin/tests/pll_div/pll_div.v | 4 ++-- .../tests/pll_fbout_phase/pll_fbout_phase.v | 4 ++-- .../tests/pll_propagated/pll_propagated.v | 4 ++-- .../restore_from_json/restore_from_json.v | 4 ++-- .../tests/set_clock_groups/set_clock_groups.v | 4 ++-- .../tests/set_false_path/set_false_path.v | 4 ++-- .../tests/set_max_delay/set_max_delay.v | 4 ++-- .../tests/waveform_check/waveform_check.v | 4 ++-- systemverilog-plugin/Makefile | 4 ++-- systemverilog-plugin/tests/Makefile | 4 ++-- systemverilog-plugin/uhdmastfrontend.cc | 20 +++++-------------- systemverilog-plugin/uhdmcommonfrontend.cc | 20 +++++-------------- systemverilog-plugin/uhdmcommonfrontend.h | 20 +++++-------------- .../uhdmsurelogastfrontend.cc | 20 +++++-------------- uhdm-plugin/Makefile | 4 ++-- uhdm-plugin/tests/Makefile | 4 ++-- uhdm-plugin/uhdm.cc | 18 +++++------------ xdc-plugin/BANK.v | 4 ++-- xdc-plugin/Makefile | 4 ++-- xdc-plugin/tests/Makefile | 4 ++-- xdc-plugin/tests/compare_output_json.py | 4 ++-- xdc-plugin/tests/counter-dict/counter-dict.v | 4 ++-- xdc-plugin/tests/counter/counter.v | 4 ++-- xdc-plugin/tests/io_loc_pairs/cells_xtra.v | 4 ++-- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v | 4 ++-- .../non_zero_port_indexes.v | 4 ++-- .../package_pins-dict-space.v | 4 ++-- xdc-plugin/tests/package_pins/package_pins.v | 4 ++-- xdc-plugin/tests/port_indexes/port_indexes.v | 4 ++-- xdc-plugin/xdc.cc | 19 +++++------------- 195 files changed, 542 insertions(+), 966 deletions(-) diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index 0d6cf9e41..56c5bd08d 100644 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -1,11 +1,11 @@ #! /bin/bash -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC set -e diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f122874d..47c24016f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC name: CI tests diff --git a/.github/workflows/common.sh b/.github/workflows/common.sh index d7329a833..6600b7387 100644 --- a/.github/workflows/common.sh +++ b/.github/workflows/common.sh @@ -1,11 +1,11 @@ #! /bin/bash -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC # Look for location binaries first export PATH="$HOME/.local-bin/bin:$PATH" diff --git a/.github/workflows/format-check.sh b/.github/workflows/format-check.sh index 69cf9a604..2fd90769a 100644 --- a/.github/workflows/format-check.sh +++ b/.github/workflows/format-check.sh @@ -1,11 +1,11 @@ #! /bin/bash -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC set -e diff --git a/.github/workflows/licensing.yml b/.github/workflows/licensing.yml index bf6356a14..9e49d7568 100644 --- a/.github/workflows/licensing.yml +++ b/.github/workflows/licensing.yml @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index 1cd4d8d78..fb3716502 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -1,11 +1,11 @@ #! /bin/bash -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC set -e diff --git a/COPYING b/COPYING index dec4d93a9..bd8747f15 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (C) 2019 SymbiFlow Project Authors. All rights reserved. +Copyright (C) 2019-2022 The SymbiFlow Authors. All rights reserved. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/Makefile b/Makefile index 91b0ba99a..e24f59997 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf systemverilog uhdm dsp-ff PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) diff --git a/common/bank_tiles.h b/common/bank_tiles.h index 3ff52203d..f2d4f5e32 100644 --- a/common/bank_tiles.h +++ b/common/bank_tiles.h @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2019 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #include "kernel/log.h" diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index 970624e3c..8835c5676 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = design_introspection SOURCES = design_introspection.cc \ diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc index 26e39ff8a..ef2d73dad 100644 --- a/design_introspection-plugin/design_introspection.cc +++ b/design_introspection-plugin/design_introspection.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/design_introspection-plugin/get_cells.cc b/design_introspection-plugin/get_cells.cc index d0e6ce0cc..d8cf76a52 100644 --- a/design_introspection-plugin/get_cells.cc +++ b/design_introspection-plugin/get_cells.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #include "get_cells.h" diff --git a/design_introspection-plugin/get_cells.h b/design_introspection-plugin/get_cells.h index c9ba62180..94bb268d7 100644 --- a/design_introspection-plugin/get_cells.h +++ b/design_introspection-plugin/get_cells.h @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #ifndef _GET_CELLS_H_ diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h index 5d1a12000..389ea77c6 100644 --- a/design_introspection-plugin/get_cmd.h +++ b/design_introspection-plugin/get_cmd.h @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #ifndef _GET_CMD_H_ diff --git a/design_introspection-plugin/get_count.cc b/design_introspection-plugin/get_count.cc index b491d1799..e7d35358d 100644 --- a/design_introspection-plugin/get_count.cc +++ b/design_introspection-plugin/get_count.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/design_introspection-plugin/get_count.h b/design_introspection-plugin/get_count.h index 880e4f0ad..e51d5cc07 100644 --- a/design_introspection-plugin/get_count.h +++ b/design_introspection-plugin/get_count.h @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #ifndef _GET_COUNT_H_ diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc index 09e5ed417..8092387f6 100644 --- a/design_introspection-plugin/get_nets.cc +++ b/design_introspection-plugin/get_nets.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #include "get_nets.h" diff --git a/design_introspection-plugin/get_nets.h b/design_introspection-plugin/get_nets.h index d9f5850ff..3de1a0dc6 100644 --- a/design_introspection-plugin/get_nets.h +++ b/design_introspection-plugin/get_nets.h @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #ifndef _GET_NETS_H_ diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc index 97a256f50..45f7d888b 100644 --- a/design_introspection-plugin/get_pins.cc +++ b/design_introspection-plugin/get_pins.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #include "get_pins.h" diff --git a/design_introspection-plugin/get_pins.h b/design_introspection-plugin/get_pins.h index 5d2cde007..a42063e78 100644 --- a/design_introspection-plugin/get_pins.h +++ b/design_introspection-plugin/get_pins.h @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #ifndef _GET_PINS_H_ diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index d6a09164f..56e9da432 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #include "get_ports.h" diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index b1ccb0bca..e69417378 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #ifndef _GET_PORTS_H_ diff --git a/design_introspection-plugin/selection_to_tcl_list.cc b/design_introspection-plugin/selection_to_tcl_list.cc index 45005a36d..eeb76ffd6 100644 --- a/design_introspection-plugin/selection_to_tcl_list.cc +++ b/design_introspection-plugin/selection_to_tcl_list.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "selection_to_tcl_list.h" diff --git a/design_introspection-plugin/selection_to_tcl_list.h b/design_introspection-plugin/selection_to_tcl_list.h index 7671da648..87d505688 100644 --- a/design_introspection-plugin/selection_to_tcl_list.h +++ b/design_introspection-plugin/selection_to_tcl_list.h @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #ifndef _SELECTION_TO_TCL_LIST_H_ #define _SELECTION_TO_TCL_LIST_H_ diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index 8be491a16..fcfb5623e 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC TESTS = get_nets \ get_ports \ diff --git a/design_introspection-plugin/tests/get_cells/get_cells.v b/design_introspection-plugin/tests/get_cells/get_cells.v index 792182e61..2fb3ffee2 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.v +++ b/design_introspection-plugin/tests/get_cells/get_cells.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/design_introspection-plugin/tests/get_count/Makefile b/design_introspection-plugin/tests/get_count/Makefile index aea11d342..36ab99c95 100644 --- a/design_introspection-plugin/tests/get_count/Makefile +++ b/design_introspection-plugin/tests/get_count/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC test: yosys -p "tcl script.tcl" diff --git a/design_introspection-plugin/tests/get_count/get_count.v b/design_introspection-plugin/tests/get_count/get_count.v index 3bb4d559f..a57d33151 100644 --- a/design_introspection-plugin/tests/get_count/get_count.v +++ b/design_introspection-plugin/tests/get_count/get_count.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module my_gate ( input wire A, diff --git a/design_introspection-plugin/tests/get_nets/get_nets.v b/design_introspection-plugin/tests/get_nets/get_nets.v index 3d7e0f163..afc56d862 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.v +++ b/design_introspection-plugin/tests/get_nets/get_nets.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/design_introspection-plugin/tests/get_pins/get_pins.v b/design_introspection-plugin/tests/get_pins/get_pins.v index 846e86150..3976199c0 100644 --- a/design_introspection-plugin/tests/get_pins/get_pins.v +++ b/design_introspection-plugin/tests/get_pins/get_pins.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/design_introspection-plugin/tests/get_ports/get_ports.v b/design_introspection-plugin/tests/get_ports/get_ports.v index 3d7e0f163..afc56d862 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.v +++ b/design_introspection-plugin/tests/get_ports/get_ports.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/dsp-ff-plugin/Makefile b/dsp-ff-plugin/Makefile index 3e59b3d17..c64565d51 100644 --- a/dsp-ff-plugin/Makefile +++ b/dsp-ff-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = dsp-ff SOURCES = dsp_ff.cc diff --git a/dsp-ff-plugin/nexus-dsp_rules.txt b/dsp-ff-plugin/nexus-dsp_rules.txt index 0ed894760..596d60a83 100644 --- a/dsp-ff-plugin/nexus-dsp_rules.txt +++ b/dsp-ff-plugin/nexus-dsp_rules.txt @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2022 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC dsp MULT9X9 MULT18X18 MULT18X36 MULT36X36 port A SIGNEDA diff --git a/dsp-ff-plugin/tests/Makefile b/dsp-ff-plugin/tests/Makefile index 305092f02..99953a411 100644 --- a/dsp-ff-plugin/tests/Makefile +++ b/dsp-ff-plugin/tests/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2022 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC TESTS = \ nexus_mult \ diff --git a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v index 35856d9c8..0c03865a6 100644 --- a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v +++ b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module conflict_dsp_clk ( input wire CLK_A, diff --git a/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v b/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v index 88be6b0d3..ef06483e3 100644 --- a/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v +++ b/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module conflict_out_fanout ( input wire CLK, diff --git a/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v b/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v index 2c5b8ecb8..2a49bfc23 100644 --- a/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v +++ b/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module mult_ena ( input wire CLK, diff --git a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v index 9836f7fdb..315cd1e56 100644 --- a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v +++ b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module mult_ireg ( input wire CLK, diff --git a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v index cb539e5dc..3a5fbe516 100644 --- a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v +++ b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module mult_wide ( input wire CLK, diff --git a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v index d9ec0e873..5f4756f3d 100644 --- a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v +++ b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module conflict_dsp_ctrl_param ( input wire CLK, diff --git a/environment.yml b/environment.yml index d6f473d86..52f3ddb58 100644 --- a/environment.yml +++ b/environment.yml @@ -1,10 +1,10 @@ -# Copyright (C) 2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC name: yosys-plugins channels: diff --git a/fasm-plugin/Makefile b/fasm-plugin/Makefile index 5d40bb996..770cff728 100644 --- a/fasm-plugin/Makefile +++ b/fasm-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = fasm SOURCES = fasm.cc diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index 245d4bd36..f0e20f5ca 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2019 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * * --- * diff --git a/fasm-plugin/tests/Makefile b/fasm-plugin/tests/Makefile index 66d5a63ba..76892a25e 100644 --- a/fasm-plugin/tests/Makefile +++ b/fasm-plugin/tests/Makefile @@ -1,9 +1,9 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC include $(shell pwd)/../../Makefile_test.common diff --git a/integrateinv-plugin/Makefile b/integrateinv-plugin/Makefile index de1f3ce3e..410d99085 100644 --- a/integrateinv-plugin/Makefile +++ b/integrateinv-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = integrateinv SOURCES = integrateinv.cc diff --git a/integrateinv-plugin/integrateinv.cc b/integrateinv-plugin/integrateinv.cc index f3d56906c..0e998ed2a 100644 --- a/integrateinv-plugin/integrateinv.cc +++ b/integrateinv-plugin/integrateinv.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/integrateinv-plugin/tests/Makefile b/integrateinv-plugin/tests/Makefile index a3ed66869..0c7dce1be 100644 --- a/integrateinv-plugin/tests/Makefile +++ b/integrateinv-plugin/tests/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC TESTS = fanout \ hierarchy \ diff --git a/integrateinv-plugin/tests/fanout/fanout.v b/integrateinv-plugin/tests/fanout/fanout.v index 2ec8447c6..df77b4b55 100644 --- a/integrateinv-plugin/tests/fanout/fanout.v +++ b/integrateinv-plugin/tests/fanout/fanout.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* blackbox *) module box( diff --git a/integrateinv-plugin/tests/hierarchy/hierarchy.v b/integrateinv-plugin/tests/hierarchy/hierarchy.v index e0fdf2f96..def4b72c7 100644 --- a/integrateinv-plugin/tests/hierarchy/hierarchy.v +++ b/integrateinv-plugin/tests/hierarchy/hierarchy.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* blackbox *) module box( diff --git a/integrateinv-plugin/tests/multi_bit/multi_bit.v b/integrateinv-plugin/tests/multi_bit/multi_bit.v index 2261f9903..401e70d05 100644 --- a/integrateinv-plugin/tests/multi_bit/multi_bit.v +++ b/integrateinv-plugin/tests/multi_bit/multi_bit.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* blackbox *) module box( diff --git a/integrateinv-plugin/tests/single_bit/single_bit.v b/integrateinv-plugin/tests/single_bit/single_bit.v index 812543555..087145be8 100644 --- a/integrateinv-plugin/tests/single_bit/single_bit.v +++ b/integrateinv-plugin/tests/single_bit/single_bit.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* blackbox *) module box( diff --git a/integrateinv-plugin/tests/toplevel/toplevel.v b/integrateinv-plugin/tests/toplevel/toplevel.v index 69480c1b2..e79e246a4 100644 --- a/integrateinv-plugin/tests/toplevel/toplevel.v +++ b/integrateinv-plugin/tests/toplevel/toplevel.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* blackbox *) module box( diff --git a/params-plugin/Makefile b/params-plugin/Makefile index d3db121a9..8a2533837 100644 --- a/params-plugin/Makefile +++ b/params-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = params SOURCES = params.cc diff --git a/params-plugin/params.cc b/params-plugin/params.cc index cddc73793..e53ac85d8 100644 --- a/params-plugin/params.cc +++ b/params-plugin/params.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "kernel/log.h" #include "kernel/register.h" diff --git a/params-plugin/tests/Makefile b/params-plugin/tests/Makefile index df5a7d517..9576f9383 100644 --- a/params-plugin/tests/Makefile +++ b/params-plugin/tests/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC TESTS = pll include $(shell pwd)/../../Makefile_test.common diff --git a/params-plugin/tests/compare_output_json.py b/params-plugin/tests/compare_output_json.py index a576068e4..fed076802 100644 --- a/params-plugin/tests/compare_output_json.py +++ b/params-plugin/tests/compare_output_json.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC """ This script extracts the top module cells and their corresponding parameters diff --git a/params-plugin/tests/pll/pll.v b/params-plugin/tests/pll/pll.v index e5bb122aa..e97901f79 100644 --- a/params-plugin/tests/pll/pll.v +++ b/params-plugin/tests/pll/pll.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* dont_touch = "true" *) input clk100, diff --git a/params-plugin/tests/pll/techmaps/cells_map.v b/params-plugin/tests/pll/techmaps/cells_map.v index 57355a8ff..90d637d96 100644 --- a/params-plugin/tests/pll/techmaps/cells_map.v +++ b/params-plugin/tests/pll/techmaps/cells_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC // ============================================================================ // CMT diff --git a/params-plugin/tests/pll/techmaps/cells_sim.v b/params-plugin/tests/pll/techmaps/cells_sim.v index 244f4843d..f1c76e5bf 100644 --- a/params-plugin/tests/pll/techmaps/cells_sim.v +++ b/params-plugin/tests/pll/techmaps/cells_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC // ============================================================================ // CMT diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile index 2dc1fd0b7..7a7e1cf4a 100644 --- a/ql-iob-plugin/Makefile +++ b/ql-iob-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = ql-iob SOURCES = ql-iob.cc pcf_parser.cc pinmap_parser.cc diff --git a/ql-iob-plugin/pcf_parser.cc b/ql-iob-plugin/pcf_parser.cc index f8e1aeb48..d8acb03ef 100644 --- a/ql-iob-plugin/pcf_parser.cc +++ b/ql-iob-plugin/pcf_parser.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #include "pcf_parser.hh" diff --git a/ql-iob-plugin/pcf_parser.hh b/ql-iob-plugin/pcf_parser.hh index 8a4a92085..6a769a1d5 100644 --- a/ql-iob-plugin/pcf_parser.hh +++ b/ql-iob-plugin/pcf_parser.hh @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #ifndef PCF_PARSER_HH diff --git a/ql-iob-plugin/pinmap_parser.cc b/ql-iob-plugin/pinmap_parser.cc index ceaf30a28..0231bb8fe 100644 --- a/ql-iob-plugin/pinmap_parser.cc +++ b/ql-iob-plugin/pinmap_parser.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #include "pinmap_parser.hh" diff --git a/ql-iob-plugin/pinmap_parser.hh b/ql-iob-plugin/pinmap_parser.hh index 5139244de..6af04d5ee 100644 --- a/ql-iob-plugin/pinmap_parser.hh +++ b/ql-iob-plugin/pinmap_parser.hh @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #ifndef PINMAP_PARSER_HH diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index d6aeefce8..6b9ca9195 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile index 004013be1..596e07e02 100644 --- a/ql-iob-plugin/tests/Makefile +++ b/ql-iob-plugin/tests/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC TESTS = sdiomux ckpad diff --git a/ql-iob-plugin/tests/ckpad/Makefile b/ql-iob-plugin/tests/ckpad/Makefile index 3bef98695..52de75778 100644 --- a/ql-iob-plugin/tests/ckpad/Makefile +++ b/ql-iob-plugin/tests/ckpad/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC # TODO: Integrate this in the Makefile_test.command environment ? test: diff --git a/ql-iob-plugin/tests/ckpad/design.v b/ql-iob-plugin/tests/ckpad/design.v index 2828f3c1a..25fb8f7f7 100644 --- a/ql-iob-plugin/tests/ckpad/design.v +++ b/ql-iob-plugin/tests/ckpad/design.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input wire clk0, diff --git a/ql-iob-plugin/tests/common/pp3_cells_map.v b/ql-iob-plugin/tests/common/pp3_cells_map.v index c8e0f2396..2bd7235d0 100644 --- a/ql-iob-plugin/tests/common/pp3_cells_map.v +++ b/ql-iob-plugin/tests/common/pp3_cells_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$_DFF_P_ ( D, diff --git a/ql-iob-plugin/tests/common/pp3_cells_sim.v b/ql-iob-plugin/tests/common/pp3_cells_sim.v index 7bb0dafd3..367ea61a7 100644 --- a/ql-iob-plugin/tests/common/pp3_cells_sim.v +++ b/ql-iob-plugin/tests/common/pp3_cells_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module inpad ( output Q, diff --git a/ql-iob-plugin/tests/sdiomux/Makefile b/ql-iob-plugin/tests/sdiomux/Makefile index 3bef98695..52de75778 100644 --- a/ql-iob-plugin/tests/sdiomux/Makefile +++ b/ql-iob-plugin/tests/sdiomux/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC # TODO: Integrate this in the Makefile_test.command environment ? test: diff --git a/ql-iob-plugin/tests/sdiomux/design.v b/ql-iob-plugin/tests/sdiomux/design.v index 831bd51df..617797b65 100644 --- a/ql-iob-plugin/tests/sdiomux/design.v +++ b/ql-iob-plugin/tests/sdiomux/design.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input wire clk, diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 7d1e14d97..d51c1467b 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = ql-qlf SOURCES = synth_quicklogic.cc \ diff --git a/ql-qlf-plugin/common/cells_sim.v b/ql-qlf-plugin/common/cells_sim.v index e516dd844..6967a0990 100644 --- a/ql-qlf-plugin/common/cells_sim.v +++ b/ql-qlf-plugin/common/cells_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module inv ( diff --git a/ql-qlf-plugin/pp3/abc9_map.v b/ql-qlf-plugin/pp3/abc9_map.v index 69b2fb316..86e14d76d 100644 --- a/ql-qlf-plugin/pp3/abc9_map.v +++ b/ql-qlf-plugin/pp3/abc9_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC // This file exists to map purely-synchronous flops to ABC9 flops, while // mapping flops with asynchronous-set/clear as boxes, this is because ABC9 diff --git a/ql-qlf-plugin/pp3/abc9_model.v b/ql-qlf-plugin/pp3/abc9_model.v index 6140f97c1..9d2b1982d 100644 --- a/ql-qlf-plugin/pp3/abc9_model.v +++ b/ql-qlf-plugin/pp3/abc9_model.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* abc9_flop, lib_whitebox *) module $__PP3_DFFEPC_SYNCONLY ( diff --git a/ql-qlf-plugin/pp3/abc9_unmap.v b/ql-qlf-plugin/pp3/abc9_unmap.v index ce5e2eac4..f9262b81b 100644 --- a/ql-qlf-plugin/pp3/abc9_unmap.v +++ b/ql-qlf-plugin/pp3/abc9_unmap.v @@ -1,11 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // - -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module $__PP3_DFFEPC_SYNCONLY ( output Q, input D, diff --git a/ql-qlf-plugin/pp3/brams_map.v b/ql-qlf-plugin/pp3/brams_map.v index ded9343c5..07b65b7f1 100644 --- a/ql-qlf-plugin/pp3/brams_map.v +++ b/ql-qlf-plugin/pp3/brams_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$__QUICKLOGIC_RAMB16K ( CLK2, diff --git a/ql-qlf-plugin/pp3/brams_sim.v b/ql-qlf-plugin/pp3/brams_sim.v index 279585265..0981c7a7c 100644 --- a/ql-qlf-plugin/pp3/brams_sim.v +++ b/ql-qlf-plugin/pp3/brams_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC `timescale 1ns / 10ps module fifo_controller_model ( diff --git a/ql-qlf-plugin/pp3/cells_map.v b/ql-qlf-plugin/pp3/cells_map.v index f2a6a8c91..625b2c532 100644 --- a/ql-qlf-plugin/pp3/cells_map.v +++ b/ql-qlf-plugin/pp3/cells_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$_MUX8_ ( A, diff --git a/ql-qlf-plugin/pp3/cells_sim.v b/ql-qlf-plugin/pp3/cells_sim.v index e498d4e87..71c98c6d0 100644 --- a/ql-qlf-plugin/pp3/cells_sim.v +++ b/ql-qlf-plugin/pp3/cells_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module inv ( output Q, diff --git a/ql-qlf-plugin/pp3/ffs_map.v b/ql-qlf-plugin/pp3/ffs_map.v index 3bd5e9851..c023fc154 100644 --- a/ql-qlf-plugin/pp3/ffs_map.v +++ b/ql-qlf-plugin/pp3/ffs_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$_DFFSRE_PPPP_ ( input C, diff --git a/ql-qlf-plugin/pp3/latches_map.v b/ql-qlf-plugin/pp3/latches_map.v index 740e9a3c7..e7825a7f4 100644 --- a/ql-qlf-plugin/pp3/latches_map.v +++ b/ql-qlf-plugin/pp3/latches_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$_DLATCH_P_ (E, D, Q); wire [1023:0] _TECHMAP_DO_ = "simplemap; opt"; diff --git a/ql-qlf-plugin/pp3/lut_map.v b/ql-qlf-plugin/pp3/lut_map.v index 50b39b221..867a96314 100644 --- a/ql-qlf-plugin/pp3/lut_map.v +++ b/ql-qlf-plugin/pp3/lut_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$lut ( A, diff --git a/ql-qlf-plugin/pp3/mult_sim.v b/ql-qlf-plugin/pp3/mult_sim.v index b2bf6e378..432e485ba 100644 --- a/ql-qlf-plugin/pp3/mult_sim.v +++ b/ql-qlf-plugin/pp3/mult_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* blackbox *) module qlal4s3_mult_32x32_cell ( diff --git a/ql-qlf-plugin/pp3/qlal3_sim.v b/ql-qlf-plugin/pp3/qlal3_sim.v index a922bd58f..e801df74e 100644 --- a/ql-qlf-plugin/pp3/qlal3_sim.v +++ b/ql-qlf-plugin/pp3/qlal3_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* blackbox *) (* keep *) diff --git a/ql-qlf-plugin/pp3/qlal4s3b_sim.v b/ql-qlf-plugin/pp3/qlal4s3b_sim.v index 5a8f69a9e..68a37fc90 100644 --- a/ql-qlf-plugin/pp3/qlal4s3b_sim.v +++ b/ql-qlf-plugin/pp3/qlal4s3b_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC `timescale 1ns / 10ps module ahb_gen_bfm ( diff --git a/ql-qlf-plugin/pp3_braminit.cc b/ql-qlf-plugin/pp3_braminit.cc index 7ee3dd01c..0c9b860cc 100644 --- a/ql-qlf-plugin/pp3_braminit.cc +++ b/ql-qlf-plugin/pp3_braminit.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index 5e3a6bb00..d70e2a682 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -1,10 +1,12 @@ -// Copyright (C) 2020-2022 The SymbiFlow Authors. -// -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC -// -// SPDX-License-Identifier:ISC +/* + * Copyright (C) 2019-2022 The SymbiFlow Authors. + * + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC + * + * SPDX-License-Identifier:ISC + */ #include "kernel/log.h" #include "kernel/register.h" diff --git a/ql-qlf-plugin/ql-dsp.cc b/ql-qlf-plugin/ql-dsp.cc index 1b033697a..fe5a9868a 100644 --- a/ql-qlf-plugin/ql-dsp.cc +++ b/ql-qlf-plugin/ql-dsp.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2021 QuickLogic Corp. + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/ql-qlf-plugin/ql-edif.cc b/ql-qlf-plugin/ql-edif.cc index 9d136afa7..a6bed4c0f 100644 --- a/ql-qlf-plugin/ql-edif.cc +++ b/ql-qlf-plugin/ql-edif.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Claire Xenia Wolf - * Copyright (C) 2021 The SymbiFlow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/ql-qlf-plugin/qlf_k4n8/arith_map.v b/ql-qlf-plugin/qlf_k4n8/arith_map.v index 5ddc95fd3..6e3ee6d2e 100644 --- a/ql-qlf-plugin/qlf_k4n8/arith_map.v +++ b/ql-qlf-plugin/qlf_k4n8/arith_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* techmap_celltype = "$alu" *) module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); diff --git a/ql-qlf-plugin/qlf_k4n8/cells_sim.v b/ql-qlf-plugin/qlf_k4n8/cells_sim.v index c0cd36934..96caadd89 100644 --- a/ql-qlf-plugin/qlf_k4n8/cells_sim.v +++ b/ql-qlf-plugin/qlf_k4n8/cells_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* abc9_box, lib_whitebox *) module adder_lut4( diff --git a/ql-qlf-plugin/qlf_k4n8/ffs_map.v b/ql-qlf-plugin/qlf_k4n8/ffs_map.v index 8e6c1fe7e..cd8837b57 100644 --- a/ql-qlf-plugin/qlf_k4n8/ffs_map.v +++ b/ql-qlf-plugin/qlf_k4n8/ffs_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$_DFF_P_ (D, Q, C); input D; diff --git a/ql-qlf-plugin/qlf_k6n10/arith_map.v b/ql-qlf-plugin/qlf_k6n10/arith_map.v index 668103530..d8d4665d2 100644 --- a/ql-qlf-plugin/qlf_k6n10/arith_map.v +++ b/ql-qlf-plugin/qlf_k6n10/arith_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC ////////////////////////// // arithmetic // diff --git a/ql-qlf-plugin/qlf_k6n10/brams_map.v b/ql-qlf-plugin/qlf_k6n10/brams_map.v index 190f48af9..f363805ee 100644 --- a/ql-qlf-plugin/qlf_k6n10/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10/brams_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$__QLF_RAM16K ( diff --git a/ql-qlf-plugin/qlf_k6n10/cells_sim.v b/ql-qlf-plugin/qlf_k6n10/cells_sim.v index ad22df3eb..d015c8a8d 100644 --- a/ql-qlf-plugin/qlf_k6n10/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10/cells_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* abc9_box, lib_whitebox *) module adder( diff --git a/ql-qlf-plugin/qlf_k6n10/dsp_map.v b/ql-qlf-plugin/qlf_k6n10/dsp_map.v index 4b8ae644a..49d5e230a 100644 --- a/ql-qlf-plugin/qlf_k6n10/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10/dsp_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$__MUL16X16 (input [15:0] A, input [15:0] B, output [31:0] Y); parameter A_SIGNED = 0; diff --git a/ql-qlf-plugin/qlf_k6n10/ffs_map.v b/ql-qlf-plugin/qlf_k6n10/ffs_map.v index b2234300d..500d21a1a 100644 --- a/ql-qlf-plugin/qlf_k6n10/ffs_map.v +++ b/ql-qlf-plugin/qlf_k6n10/ffs_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC // Basic DFF diff --git a/ql-qlf-plugin/qlf_k6n10/lut_map.v b/ql-qlf-plugin/qlf_k6n10/lut_map.v index e8b2a64a1..9687a90e0 100644 --- a/ql-qlf-plugin/qlf_k6n10/lut_map.v +++ b/ql-qlf-plugin/qlf_k6n10/lut_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC `ifndef NO_LUT module \$lut (A, Y); diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v index 696c2a795..c9d0b8a80 100644 --- a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v +++ b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v @@ -1,10 +1,10 @@ -// Copyright (C) 2022 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module TDP18K_FIFO ( RMODE_A, diff --git a/ql-qlf-plugin/qlf_k6n10f/arith_map.v b/ql-qlf-plugin/qlf_k6n10f/arith_map.v index 0d971319f..35bd69193 100644 --- a/ql-qlf-plugin/qlf_k6n10f/arith_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/arith_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* techmap_celltype = "$alu" *) module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); parameter A_SIGNED = 0; diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index a98d7f0e6..e1b7f2744 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC `define MODE_36 3'b111 // 36 or 32-bit `define MODE_18 3'b110 // 18 or 16-bit diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 6dac58bac..736a1bbce 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* abc9_flop, lib_whitebox *) module sh_dff( diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index e4c122078..79c2f52dc 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module dsp_t1_20x18x64 ( input [19:0] a_i, diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index fe0db9fb5..681d113ca 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); parameter A_SIGNED = 0; diff --git a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v index be92436c9..8e3058503 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC // Basic DFF diff --git a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v index c732a2640..88a571dd8 100644 --- a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v +++ b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v @@ -1,10 +1,10 @@ -// Copyright (C) 2022 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module sram1024x18 ( clk_a, diff --git a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v index 2fd87bbf9..b1f71647d 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v +++ b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v @@ -1,10 +1,10 @@ -// Copyright (C) 2022 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module fifo_ctl ( raddr, diff --git a/ql-qlf-plugin/quicklogic_eqn.cc b/ql-qlf-plugin/quicklogic_eqn.cc index 232efdefc..441943220 100644 --- a/ql-qlf-plugin/quicklogic_eqn.cc +++ b/ql-qlf-plugin/quicklogic_eqn.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2021 Lalit Sharma + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index fdb23b097..a44c9e4f7 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2021 Lalit Sharma + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ #include "kernel/celltypes.h" diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 639fb6380..37654a512 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC # The bram test will be enable in a future PR after it's been fixed. diff --git a/ql-qlf-plugin/tests/consts/consts.v b/ql-qlf-plugin/tests/consts/consts.v index 6d7ab2976..884e4c19f 100644 --- a/ql-qlf-plugin/tests/consts/consts.v +++ b/ql-qlf-plugin/tests/consts/consts.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC (* keep_hierarchy *) module my_lut ( diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index 49728f116..60c1780df 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module my_dff ( input d, diff --git a/ql-qlf-plugin/tests/fsm/fsm.v b/ql-qlf-plugin/tests/fsm/fsm.v index ee2858409..5b276aae1 100644 --- a/ql-qlf-plugin/tests/fsm/fsm.v +++ b/ql-qlf-plugin/tests/fsm/fsm.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module fsm ( clock, diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.v b/ql-qlf-plugin/tests/full_adder/full_adder.v index b190cbe2b..8bbbce714 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.v +++ b/ql-qlf-plugin/tests/full_adder/full_adder.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module full_adder ( input wire [`WIDTH-1:0] A, diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v index 753eaa632..47e85f75e 100644 --- a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v +++ b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module my_dff ( input d, diff --git a/ql-qlf-plugin/tests/latches/latches.v b/ql-qlf-plugin/tests/latches/latches.v index fd7f3124d..13b76d62c 100644 --- a/ql-qlf-plugin/tests/latches/latches.v +++ b/ql-qlf-plugin/tests/latches/latches.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module latchp ( input d, diff --git a/ql-qlf-plugin/tests/logic/logic.v b/ql-qlf-plugin/tests/logic/logic.v index efc53c7a7..cc0540203 100644 --- a/ql-qlf-plugin/tests/logic/logic.v +++ b/ql-qlf-plugin/tests/logic/logic.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input [0:7] in, diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.v b/ql-qlf-plugin/tests/mac_unit/mac_unit.v index 0b4e91bed..6152c6105 100644 --- a/ql-qlf-plugin/tests/mac_unit/mac_unit.v +++ b/ql-qlf-plugin/tests/mac_unit/mac_unit.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module mac_unit ( a, diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.v b/ql-qlf-plugin/tests/multiplier/multiplier.v index 960ff7edf..5523a0aa6 100644 --- a/ql-qlf-plugin/tests/multiplier/multiplier.v +++ b/ql-qlf-plugin/tests/multiplier/multiplier.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module mult16x16 ( a, diff --git a/ql-qlf-plugin/tests/mux/mux.v b/ql-qlf-plugin/tests/mux/mux.v index d0d30fa8a..b18f65fbd 100644 --- a/ql-qlf-plugin/tests/mux/mux.v +++ b/ql-qlf-plugin/tests/mux/mux.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module mux2 ( S, diff --git a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v index 78f14b71d..784f67d3a 100644 --- a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v +++ b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module my_ram ( CLK, diff --git a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v index ab531a0de..f19c3ce70 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v +++ b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module BRAM #(parameter AWIDTH = 9, parameter DWIDTH = 32) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v index 8433c568c..8ac8977b0 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v @@ -1,10 +1,10 @@ -// Copyright (C) 2022 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module BRAM_SDP #(parameter AWIDTH = 9, parameter DWIDTH = 32)( diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile index 0c9bab322..23c78ad79 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2022 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC TESTBENCH = bram_sdp_tb.v POST_SYNTH = bram_sdp_32x512_post_synth bram_sdp_16x1024_post_synth bram_sdp_8x2048_post_synth bram_sdp_4x4096_post_synth diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v index d5af76701..3641f1f95 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v @@ -1,10 +1,10 @@ -// Copyright (C) 2022 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC `timescale 1ns/1ps diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v index 3486fa210..96218f640 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v @@ -1,10 +1,10 @@ -// Copyright (C) 2022 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module BRAM_TDP #(parameter AWIDTH = 9, parameter DWIDTH = 32)( diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile index 06b45cc47..48de42d81 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2022 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC TESTBENCH = bram_tdp_tb.v POST_SYNTH = bram_tdp_32x512_post_synth bram_tdp_16x1024_post_synth bram_tdp_8x2048_post_synth bram_tdp_4x4096_post_synth diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v index 90cbf4ee9..77b3f4672 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v @@ -1,10 +1,10 @@ -// Copyright (C) 2022 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC `timescale 1ns/1ps diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v index 084021075..6933e90c2 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module macc_simple ( input wire clk, diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v index cd07ba3e9..f8b25e69f 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module mult_16x16 ( input wire [15:0] A, diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v index b871eb870..08cd99497 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module simd_mult ( input wire clk, diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v index 2f953c06d..5565ddbdf 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC `include "qlf_k6n10f/cells_sim.v" diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v index f1627560d..22ba57d43 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC `include "qlf_k6n10f/cells_sim.v" `timescale 1ns/1ps diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v index 6187e1a19..1de1cb617 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC `include "qlf_k6n10f/cells_sim.v" diff --git a/ql-qlf-plugin/tests/shreg/shreg.v b/ql-qlf-plugin/tests/shreg/shreg.v index d0569c902..ff1712ffd 100644 --- a/ql-qlf-plugin/tests/shreg/shreg.v +++ b/ql-qlf-plugin/tests/shreg/shreg.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input wire I, diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.v b/ql-qlf-plugin/tests/tribuf/tribuf.v index 01f3779b8..95a9f8ed9 100644 --- a/ql-qlf-plugin/tests/tribuf/tribuf.v +++ b/ql-qlf-plugin/tests/tribuf/tribuf.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module tristate ( en, diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index 7fe61e467..f25e578d6 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = sdc SOURCES = buffers.cc \ diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index 33aceee20..493d98c7b 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "buffers.h" #include diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index bfa5a20f5..ab894afbf 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #ifndef _BUFFERS_H_ #define _BUFFERS_H_ diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 5b6070063..6cbabbbd1 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "clocks.h" #include "kernel/register.h" diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index f56529917..0aa0caaed 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #ifndef _CLOCKS_H_ #define _CLOCKS_H_ diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 02fa865fb..00958f54b 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "propagation.h" #include diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 6b0f755c3..8be770f5e 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #ifndef _PROPAGATION_H_ #define _PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index a7876918c..317bbcaba 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include #include diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index 7004f4719..af671972e 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "sdc_writer.h" diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h index 224f18aad..7f21ad71d 100644 --- a/sdc-plugin/sdc_writer.h +++ b/sdc-plugin/sdc_writer.h @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #ifndef _SDC_WRITER_H_ #define _SDC_WRITER_H_ diff --git a/sdc-plugin/set_clock_groups.cc b/sdc-plugin/set_clock_groups.cc index e02047b2d..0b7b9520e 100644 --- a/sdc-plugin/set_clock_groups.cc +++ b/sdc-plugin/set_clock_groups.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "set_clock_groups.h" #include "kernel/log.h" diff --git a/sdc-plugin/set_clock_groups.h b/sdc-plugin/set_clock_groups.h index 29062face..4d417672c 100644 --- a/sdc-plugin/set_clock_groups.h +++ b/sdc-plugin/set_clock_groups.h @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #ifndef _SET_CLOCK_GROUPS_H_ #define _SET_CLOCK_GROUPS_H_ diff --git a/sdc-plugin/set_false_path.cc b/sdc-plugin/set_false_path.cc index e5083b4b9..31dc61cc4 100644 --- a/sdc-plugin/set_false_path.cc +++ b/sdc-plugin/set_false_path.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "set_false_path.h" #include "kernel/log.h" diff --git a/sdc-plugin/set_false_path.h b/sdc-plugin/set_false_path.h index de36aa4ff..2003f8257 100644 --- a/sdc-plugin/set_false_path.h +++ b/sdc-plugin/set_false_path.h @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #ifndef _SET_FALSE_PATH_H_ #define _SET_FALSE_PATH_H_ diff --git a/sdc-plugin/set_max_delay.cc b/sdc-plugin/set_max_delay.cc index c517dec9a..19384ef4b 100644 --- a/sdc-plugin/set_max_delay.cc +++ b/sdc-plugin/set_max_delay.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "set_max_delay.h" #include "kernel/log.h" diff --git a/sdc-plugin/set_max_delay.h b/sdc-plugin/set_max_delay.h index 260264384..7db8459b8 100644 --- a/sdc-plugin/set_max_delay.h +++ b/sdc-plugin/set_max_delay.h @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #ifndef _SET_MAX_DELAY_H_ #define _SET_MAX_DELAY_H_ diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index bbc0f1a68..3fad79813 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC # abc9 - test that abc9.D is correctly set after importing a clock. # counter, counter2, pll - test buffer and clock divider propagation diff --git a/sdc-plugin/tests/abc9/abc9.v b/sdc-plugin/tests/abc9/abc9.v index b87d2bf11..9b6f9e0b4 100644 --- a/sdc-plugin/tests/abc9/abc9.v +++ b/sdc-plugin/tests/abc9/abc9.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk1, diff --git a/sdc-plugin/tests/counter/counter.v b/sdc-plugin/tests/counter/counter.v index 6478a4c36..0ca84bb05 100644 --- a/sdc-plugin/tests/counter/counter.v +++ b/sdc-plugin/tests/counter/counter.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/counter2/counter2.v b/sdc-plugin/tests/counter2/counter2.v index 6478a4c36..0ca84bb05 100644 --- a/sdc-plugin/tests/counter2/counter2.v +++ b/sdc-plugin/tests/counter2/counter2.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.v b/sdc-plugin/tests/create_clock_add/create_clock_add.v index 6478a4c36..0ca84bb05 100644 --- a/sdc-plugin/tests/create_clock_add/create_clock_add.v +++ b/sdc-plugin/tests/create_clock_add/create_clock_add.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/get_clocks/get_clocks.v b/sdc-plugin/tests/get_clocks/get_clocks.v index 115424558..59dd17ed9 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.v +++ b/sdc-plugin/tests/get_clocks/get_clocks.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/period_check/period_check.v b/sdc-plugin/tests/period_check/period_check.v index 653f5f13b..d49af36ac 100644 --- a/sdc-plugin/tests/period_check/period_check.v +++ b/sdc-plugin/tests/period_check/period_check.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* CLOCK_SIGNAL = "yes", WAVEFORM = "0 5" *) diff --git a/sdc-plugin/tests/period_format_check/period_format_check.v b/sdc-plugin/tests/period_format_check/period_format_check.v index befb6cbf7..cce344239 100644 --- a/sdc-plugin/tests/period_format_check/period_format_check.v +++ b/sdc-plugin/tests/period_format_check/period_format_check.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* CLOCK_SIGNAL = "yes", PERIOD = "bad value", WAVEFORM = "0 5" *) diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index b799dc3a0..9410ffd35 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v index a3509bdc0..2c622afbc 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v index a76a39ed9..ccd48193b 100644 --- a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/pll_div/pll_div.v b/sdc-plugin/tests/pll_div/pll_div.v index e07391836..2e5034530 100644 --- a/sdc-plugin/tests/pll_div/pll_div.v +++ b/sdc-plugin/tests/pll_div/pll_div.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v index f7ff414d7..5013d4457 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.v b/sdc-plugin/tests/pll_propagated/pll_propagated.v index b799dc3a0..9410ffd35 100644 --- a/sdc-plugin/tests/pll_propagated/pll_propagated.v +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.v b/sdc-plugin/tests/restore_from_json/restore_from_json.v index cc39884d0..e0aec1c0a 100644 --- a/sdc-plugin/tests/restore_from_json/restore_from_json.v +++ b/sdc-plugin/tests/restore_from_json/restore_from_json.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v index 3d7e0f163..afc56d862 100644 --- a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/sdc-plugin/tests/set_false_path/set_false_path.v b/sdc-plugin/tests/set_false_path/set_false_path.v index 3d7e0f163..afc56d862 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.v +++ b/sdc-plugin/tests/set_false_path/set_false_path.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.v b/sdc-plugin/tests/set_max_delay/set_max_delay.v index 3d7e0f163..afc56d862 100644 --- a/sdc-plugin/tests/set_max_delay/set_max_delay.v +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/sdc-plugin/tests/waveform_check/waveform_check.v b/sdc-plugin/tests/waveform_check/waveform_check.v index 4115c7e00..9812dada0 100644 --- a/sdc-plugin/tests/waveform_check/waveform_check.v +++ b/sdc-plugin/tests/waveform_check/waveform_check.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( (* CLOCK_SIGNAL = "yes", PERIOD = "10", WAVEFORM = "bad value" *) diff --git a/systemverilog-plugin/Makefile b/systemverilog-plugin/Makefile index f0229fa62..d63cee4aa 100644 --- a/systemverilog-plugin/Makefile +++ b/systemverilog-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = systemverilog SOURCES = UhdmAst.cc \ diff --git a/systemverilog-plugin/tests/Makefile b/systemverilog-plugin/tests/Makefile index 66d5a63ba..76892a25e 100644 --- a/systemverilog-plugin/tests/Makefile +++ b/systemverilog-plugin/tests/Makefile @@ -1,9 +1,9 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC include $(shell pwd)/../../Makefile_test.common diff --git a/systemverilog-plugin/uhdmastfrontend.cc b/systemverilog-plugin/uhdmastfrontend.cc index 9a2233965..a84410b80 100644 --- a/systemverilog-plugin/uhdmastfrontend.cc +++ b/systemverilog-plugin/uhdmastfrontend.cc @@ -1,21 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 Antmicro - - * Based on frontends/json/jsonparse.cc - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc index a1536d440..a88101ec2 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.cc +++ b/systemverilog-plugin/uhdmcommonfrontend.cc @@ -1,21 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 Antmicro - - * Based on frontends/json/jsonparse.cc - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/systemverilog-plugin/uhdmcommonfrontend.h b/systemverilog-plugin/uhdmcommonfrontend.h index f2d12a8fd..616ff4bda 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.h +++ b/systemverilog-plugin/uhdmcommonfrontend.h @@ -1,21 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 Antmicro - - * Based on frontends/json/jsonparse.cc - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index 4828896d3..1768ff304 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -1,21 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2020 Antmicro - - * Based on frontends/json/jsonparse.cc - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * */ diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 8018d763a..338632050 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2022 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = uhdm SOURCES = uhdm.cc diff --git a/uhdm-plugin/tests/Makefile b/uhdm-plugin/tests/Makefile index 66d5a63ba..76892a25e 100644 --- a/uhdm-plugin/tests/Makefile +++ b/uhdm-plugin/tests/Makefile @@ -1,9 +1,9 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC include $(shell pwd)/../../Makefile_test.common diff --git a/uhdm-plugin/uhdm.cc b/uhdm-plugin/uhdm.cc index 2babb21cd..596f0b7ab 100644 --- a/uhdm-plugin/uhdm.cc +++ b/uhdm-plugin/uhdm.cc @@ -1,19 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2022 Antmicro + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC */ #include "kernel/log.h" diff --git a/xdc-plugin/BANK.v b/xdc-plugin/BANK.v index c3a617f2e..206fcb3dc 100644 --- a/xdc-plugin/BANK.v +++ b/xdc-plugin/BANK.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module BANK(); parameter FASM_EXTRA = "INTERNAL_VREF"; diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index 9ed545264..b42a87b95 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC NAME = xdc SOURCES = xdc.cc diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index c5dd666bc..a198daf04 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC # counter - basic test for IOSTANDARD, SLEW, DRIVE, IN_TERM properties # counter-dict - basic test using XDC -dict for IOSTANDARD, SLEW, DRIVE, IN_TERM properties diff --git a/xdc-plugin/tests/compare_output_json.py b/xdc-plugin/tests/compare_output_json.py index 12ff11194..084699689 100644 --- a/xdc-plugin/tests/compare_output_json.py +++ b/xdc-plugin/tests/compare_output_json.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright (C) 2020-2021 The SymbiFlow Authors. +# Copyright (C) 2019-2022 The SymbiFlow Authors # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # -# SPDX-License-Identifier:ISC +# SPDX-License-Identifier: ISC """ diff --git a/xdc-plugin/tests/counter-dict/counter-dict.v b/xdc-plugin/tests/counter-dict/counter-dict.v index 1b1565f6b..54c438006 100644 --- a/xdc-plugin/tests/counter-dict/counter-dict.v +++ b/xdc-plugin/tests/counter-dict/counter-dict.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/xdc-plugin/tests/counter/counter.v b/xdc-plugin/tests/counter/counter.v index 1b1565f6b..54c438006 100644 --- a/xdc-plugin/tests/counter/counter.v +++ b/xdc-plugin/tests/counter/counter.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v index 503ed072b..c6fef309f 100644 --- a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v +++ b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module GTPE2_CHANNEL ( (* iopad_external_pin *) diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v index 62fc7a942..74581de02 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v index 2e09e24cd..24c66c621 100644 --- a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v +++ b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top( output [5:2] LED diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v index d4d172dc9..4f419e788 100644 --- a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v +++ b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/xdc-plugin/tests/package_pins/package_pins.v b/xdc-plugin/tests/package_pins/package_pins.v index d4d172dc9..4f419e788 100644 --- a/xdc-plugin/tests/package_pins/package_pins.v +++ b/xdc-plugin/tests/package_pins/package_pins.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/xdc-plugin/tests/port_indexes/port_indexes.v b/xdc-plugin/tests/port_indexes/port_indexes.v index 1b1565f6b..54c438006 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.v +++ b/xdc-plugin/tests/port_indexes/port_indexes.v @@ -1,10 +1,10 @@ -// Copyright (C) 2020-2021 The SymbiFlow Authors. +// Copyright (C) 2019-2022 The SymbiFlow Authors // // Use of this source code is governed by a ISC-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/ISC // -// SPDX-License-Identifier:ISC +// SPDX-License-Identifier: ISC module top ( input clk, diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 45ef532be..65756a5d7 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -1,20 +1,11 @@ /* - * yosys -- Yosys Open SYnthesis Suite + * Copyright (C) 2019-2022 The SymbiFlow Authors * - * Copyright (C) 2012 Clifford Wolf - * Copyright (C) 2019 The Symbiflow Authors + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * SPDX-License-Identifier: ISC * * --- * From 22efa393707ace0f1bb1f3f09635d6d3cb4be639 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Mar 2022 09:55:11 +0100 Subject: [PATCH 712/845] Updated expected test results Signed-off-by: Maciej Kurc --- ql-qlf-plugin/tests/full_adder/full_adder.tcl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index deef6b535..afc70c27c 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -142,10 +142,15 @@ design -load postopt yosys cd comparator stat -select -assert-count 2 t:LUT3 -select -assert-count 3 t:LUT4 -select -assert-count 8 t:inpad -select -assert-count 1 t:outpad -select -assert-none t:LUT3 t:LUT4 t:inpad t:outpad %% t:* %D +# Types and counts of LUTs inferred seem to differ depending on the way Yosys +# is built. In any case the equivalence check passes. Disabling cell count +# assertions for now. +# I've opened an issue https://github.com/SymbiFlow/yosys-f4pga-plugins/issues/284 + +#select -assert-count 3 t:LUT2 +#select -assert-count 2 t:LUT4 +#select -assert-count 8 t:inpad +#select -assert-count 1 t:outpad +#select -assert-none t:LUT2 t:LUT4 t:inpad t:outpad %% t:* %D From 9b0aa6a6e3c84f267a83e3176f4d0427f9ab08c3 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 21 Mar 2022 10:06:23 +0100 Subject: [PATCH 713/845] Updated CI script to correctly report installed Yosys version Signed-off-by: Maciej Kurc --- .github/workflows/setup.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index fb3716502..a1277caaa 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -39,16 +39,23 @@ end_section #Install yosys start_section Install-Yosys ( - echo '==========================' - echo 'Making env with yosys and Surelog' - echo '==========================' + echo '=================================' + echo 'Making env with Yosys and Surelog' + echo '=================================' make env - make enter - echo $(which yosys) - echo $(which yosys-config) - echo $(yosys-config --datdir) + source env/conda/bin/activate yosys-plugins + conda list ) end_section ########################################################################## +start_section Yosys-Version +( + source env/conda/bin/activate yosys-plugins + echo $(which yosys) + echo $(which yosys-config) + echo $(yosys --version) + echo $(yosys-config --datdir) +) +end_section From e8140891ffd071ef1c71df55088e1f38a616f11c Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Wed, 30 Mar 2022 13:43:15 +0200 Subject: [PATCH 714/845] Relicense to Apache-2.0 Signed-off-by: Karol Gugala --- .github/workflows/build-and-test.sh | 18 +- .github/workflows/ci.yml | 18 +- .github/workflows/common.sh | 18 +- .github/workflows/format-check.sh | 18 +- .github/workflows/licensing.yml | 18 +- .github/workflows/setup.sh | 18 +- CONTRIBUTING.md | 4 +- COPYING | 13 -- LICENSE | 202 ++++++++++++++++++ Makefile | 18 +- common/bank_tiles.h | 18 +- design_introspection-plugin/Makefile | 18 +- .../design_introspection.cc | 18 +- design_introspection-plugin/get_cells.cc | 18 +- design_introspection-plugin/get_cells.h | 18 +- design_introspection-plugin/get_cmd.h | 18 +- design_introspection-plugin/get_count.cc | 18 +- design_introspection-plugin/get_count.h | 18 +- design_introspection-plugin/get_nets.cc | 18 +- design_introspection-plugin/get_nets.h | 18 +- design_introspection-plugin/get_pins.cc | 18 +- design_introspection-plugin/get_pins.h | 18 +- design_introspection-plugin/get_ports.cc | 18 +- design_introspection-plugin/get_ports.h | 18 +- .../selection_to_tcl_list.cc | 18 +- .../selection_to_tcl_list.h | 18 +- design_introspection-plugin/tests/Makefile | 18 +- .../tests/get_cells/get_cells.v | 18 +- .../tests/get_count/Makefile | 18 +- .../tests/get_count/get_count.v | 18 +- .../tests/get_nets/get_nets.v | 18 +- .../tests/get_pins/get_pins.v | 18 +- .../tests/get_ports/get_ports.v | 18 +- dsp-ff-plugin/Makefile | 18 +- dsp-ff-plugin/nexus-dsp_rules.txt | 18 +- dsp-ff-plugin/tests/Makefile | 18 +- .../nexus_conn_conflict/nexus_conn_conflict.v | 18 +- .../tests/nexus_conn_share/nexus_conn_share.v | 18 +- .../tests/nexus_fftypes/nexus_fftypes.v | 18 +- dsp-ff-plugin/tests/nexus_mult/nexus_mult.v | 18 +- .../tests/nexus_mult_wide/nexus_mult_wide.v | 18 +- .../nexus_param_conflict.v | 18 +- environment.yml | 18 +- fasm-plugin/Makefile | 18 +- fasm-plugin/fasm.cc | 18 +- fasm-plugin/tests/Makefile | 18 +- integrateinv-plugin/Makefile | 18 +- integrateinv-plugin/integrateinv.cc | 18 +- integrateinv-plugin/tests/Makefile | 18 +- integrateinv-plugin/tests/fanout/fanout.v | 18 +- .../tests/hierarchy/hierarchy.v | 18 +- .../tests/multi_bit/multi_bit.v | 18 +- .../tests/single_bit/single_bit.v | 18 +- integrateinv-plugin/tests/toplevel/toplevel.v | 18 +- params-plugin/Makefile | 18 +- params-plugin/params.cc | 18 +- params-plugin/tests/Makefile | 18 +- params-plugin/tests/compare_output_json.py | 18 +- params-plugin/tests/pll/pll.v | 18 +- params-plugin/tests/pll/techmaps/cells_map.v | 18 +- params-plugin/tests/pll/techmaps/cells_sim.v | 18 +- ql-iob-plugin/Makefile | 18 +- ql-iob-plugin/pcf_parser.cc | 18 +- ql-iob-plugin/pcf_parser.hh | 18 +- ql-iob-plugin/pinmap_parser.cc | 18 +- ql-iob-plugin/pinmap_parser.hh | 18 +- ql-iob-plugin/ql-iob.cc | 18 +- ql-iob-plugin/tests/Makefile | 18 +- ql-iob-plugin/tests/ckpad/Makefile | 18 +- ql-iob-plugin/tests/ckpad/design.v | 18 +- ql-iob-plugin/tests/common/pp3_cells_map.v | 18 +- ql-iob-plugin/tests/common/pp3_cells_sim.v | 18 +- ql-iob-plugin/tests/sdiomux/Makefile | 18 +- ql-iob-plugin/tests/sdiomux/design.v | 18 +- ql-qlf-plugin/Makefile | 18 +- ql-qlf-plugin/common/cells_sim.v | 18 +- ql-qlf-plugin/pp3/abc9_map.v | 18 +- ql-qlf-plugin/pp3/abc9_model.v | 18 +- ql-qlf-plugin/pp3/abc9_unmap.v | 18 +- ql-qlf-plugin/pp3/brams_map.v | 18 +- ql-qlf-plugin/pp3/brams_sim.v | 18 +- ql-qlf-plugin/pp3/cells_map.v | 18 +- ql-qlf-plugin/pp3/cells_sim.v | 18 +- ql-qlf-plugin/pp3/ffs_map.v | 18 +- ql-qlf-plugin/pp3/latches_map.v | 18 +- ql-qlf-plugin/pp3/lut_map.v | 18 +- ql-qlf-plugin/pp3/mult_sim.v | 18 +- ql-qlf-plugin/pp3/qlal3_sim.v | 18 +- ql-qlf-plugin/pp3/qlal4s3b_sim.v | 18 +- ql-qlf-plugin/pp3_braminit.cc | 18 +- ql-qlf-plugin/ql-dsp-simd.cc | 18 +- ql-qlf-plugin/ql-dsp.cc | 18 +- ql-qlf-plugin/ql-edif.cc | 18 +- ql-qlf-plugin/qlf_k4n8/arith_map.v | 18 +- ql-qlf-plugin/qlf_k4n8/cells_sim.v | 18 +- ql-qlf-plugin/qlf_k4n8/ffs_map.v | 18 +- ql-qlf-plugin/qlf_k6n10/arith_map.v | 18 +- ql-qlf-plugin/qlf_k6n10/brams_map.v | 18 +- ql-qlf-plugin/qlf_k6n10/cells_sim.v | 18 +- ql-qlf-plugin/qlf_k6n10/dsp_map.v | 18 +- ql-qlf-plugin/qlf_k6n10/ffs_map.v | 18 +- ql-qlf-plugin/qlf_k6n10/lut_map.v | 18 +- ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v | 18 +- ql-qlf-plugin/qlf_k6n10f/arith_map.v | 18 +- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 18 +- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 18 +- ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 18 +- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 18 +- ql-qlf-plugin/qlf_k6n10f/ffs_map.v | 18 +- ql-qlf-plugin/qlf_k6n10f/sram1024x18.v | 18 +- ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v | 18 +- ql-qlf-plugin/quicklogic_eqn.cc | 18 +- ql-qlf-plugin/synth_quicklogic.cc | 18 +- ql-qlf-plugin/tests/Makefile | 18 +- ql-qlf-plugin/tests/consts/consts.v | 18 +- ql-qlf-plugin/tests/dffs/dffs.v | 18 +- ql-qlf-plugin/tests/fsm/fsm.v | 18 +- ql-qlf-plugin/tests/full_adder/full_adder.v | 18 +- .../tests/iob_no_flatten/iob_no_flatten.v | 18 +- ql-qlf-plugin/tests/latches/latches.v | 18 +- ql-qlf-plugin/tests/logic/logic.v | 18 +- ql-qlf-plugin/tests/mac_unit/mac_unit.v | 18 +- ql-qlf-plugin/tests/multiplier/multiplier.v | 18 +- ql-qlf-plugin/tests/mux/mux.v | 18 +- ql-qlf-plugin/tests/pp3_bram/pp3_bram.v | 18 +- ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v | 18 +- .../tests/qlf_k6n10f/bram_sdp/bram_sdp.v | 18 +- .../tests/qlf_k6n10f/bram_sdp/sim/Makefile | 18 +- .../qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v | 18 +- .../tests/qlf_k6n10f/bram_tdp/bram_tdp.v | 18 +- .../tests/qlf_k6n10f/bram_tdp/sim/Makefile | 18 +- .../qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v | 18 +- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.v | 18 +- .../tests/qlf_k6n10f/dsp_mult/dsp_mult.v | 18 +- .../tests/qlf_k6n10f/dsp_simd/dsp_simd.v | 18 +- .../qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v | 18 +- .../qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v | 18 +- .../sim_dsp_mult_r/sim_dsp_mult_r.v | 18 +- ql-qlf-plugin/tests/shreg/shreg.v | 18 +- ql-qlf-plugin/tests/tribuf/tribuf.v | 18 +- sdc-plugin/Makefile | 18 +- sdc-plugin/buffers.cc | 18 +- sdc-plugin/buffers.h | 18 +- sdc-plugin/clocks.cc | 18 +- sdc-plugin/clocks.h | 18 +- sdc-plugin/propagation.cc | 18 +- sdc-plugin/propagation.h | 18 +- sdc-plugin/sdc.cc | 18 +- sdc-plugin/sdc_writer.cc | 18 +- sdc-plugin/sdc_writer.h | 18 +- sdc-plugin/set_clock_groups.cc | 18 +- sdc-plugin/set_clock_groups.h | 18 +- sdc-plugin/set_false_path.cc | 18 +- sdc-plugin/set_false_path.h | 18 +- sdc-plugin/set_max_delay.cc | 18 +- sdc-plugin/set_max_delay.h | 18 +- sdc-plugin/tests/Makefile | 18 +- sdc-plugin/tests/abc9/abc9.v | 18 +- sdc-plugin/tests/counter/counter.v | 18 +- sdc-plugin/tests/counter2/counter2.v | 18 +- .../tests/create_clock_add/create_clock_add.v | 18 +- sdc-plugin/tests/get_clocks/get_clocks.v | 18 +- sdc-plugin/tests/period_check/period_check.v | 18 +- .../period_format_check/period_format_check.v | 18 +- sdc-plugin/tests/pll/pll.v | 18 +- .../tests/pll_approx_equal/pll_approx_equal.v | 18 +- .../pll_dangling_wires/pll_dangling_wires.v | 18 +- sdc-plugin/tests/pll_div/pll_div.v | 18 +- .../tests/pll_fbout_phase/pll_fbout_phase.v | 18 +- .../tests/pll_propagated/pll_propagated.v | 18 +- .../restore_from_json/restore_from_json.v | 18 +- .../tests/set_clock_groups/set_clock_groups.v | 18 +- .../tests/set_false_path/set_false_path.v | 18 +- .../tests/set_max_delay/set_max_delay.v | 18 +- .../tests/waveform_check/waveform_check.v | 18 +- systemverilog-plugin/Makefile | 18 +- systemverilog-plugin/tests/Makefile | 18 +- systemverilog-plugin/uhdmastfrontend.cc | 18 +- systemverilog-plugin/uhdmcommonfrontend.cc | 18 +- systemverilog-plugin/uhdmcommonfrontend.h | 18 +- .../uhdmsurelogastfrontend.cc | 18 +- uhdm-plugin/Makefile | 18 +- uhdm-plugin/tests/Makefile | 18 +- uhdm-plugin/uhdm.cc | 18 +- xdc-plugin/BANK.v | 18 +- xdc-plugin/Makefile | 18 +- xdc-plugin/tests/Makefile | 18 +- xdc-plugin/tests/compare_output_json.py | 18 +- xdc-plugin/tests/counter-dict/counter-dict.v | 18 +- xdc-plugin/tests/counter/counter.v | 18 +- xdc-plugin/tests/io_loc_pairs/cells_xtra.v | 18 +- xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v | 18 +- .../non_zero_port_indexes.v | 18 +- .../package_pins-dict-space.v | 18 +- xdc-plugin/tests/package_pins/package_pins.v | 18 +- xdc-plugin/tests/port_indexes/port_indexes.v | 18 +- xdc-plugin/xdc.cc | 18 +- 197 files changed, 2726 insertions(+), 985 deletions(-) delete mode 100644 COPYING create mode 100644 LICENSE diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh index 56c5bd08d..2d913b09b 100644 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -1,11 +1,19 @@ #! /bin/bash -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 set -e diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47c24016f..a98124e18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 name: CI tests diff --git a/.github/workflows/common.sh b/.github/workflows/common.sh index 6600b7387..9d5157075 100644 --- a/.github/workflows/common.sh +++ b/.github/workflows/common.sh @@ -1,11 +1,19 @@ #! /bin/bash -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 # Look for location binaries first export PATH="$HOME/.local-bin/bin:$PATH" diff --git a/.github/workflows/format-check.sh b/.github/workflows/format-check.sh index 2fd90769a..930ff57cf 100644 --- a/.github/workflows/format-check.sh +++ b/.github/workflows/format-check.sh @@ -1,11 +1,19 @@ #! /bin/bash -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 set -e diff --git a/.github/workflows/licensing.yml b/.github/workflows/licensing.yml index 9e49d7568..60e54f613 100644 --- a/.github/workflows/licensing.yml +++ b/.github/workflows/licensing.yml @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 name: Licensing diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index a1277caaa..38bcf3ffd 100644 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -1,11 +1,19 @@ #! /bin/bash -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 set -e diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e92bb22a2..03d6c8361 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,8 +9,8 @@ All contributions should be sent as [GitHub Pull requests](https://help.github.c ### License All software (code, associated documentation, support files, etc) in the Yosys F4PGA Plugins repository are licensed -under the very permissive [ISC Licence](COPYING). -A copy can be found in the [`COPYING`](COPYING) file. +under the very permissive [Apache-2.0 Licence](LICENSE). +A copy can be found in the [`LICENSE`](LICENSE) file. All new contributions must also be released under this license. diff --git a/COPYING b/COPYING deleted file mode 100644 index bd8747f15..000000000 --- a/COPYING +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (C) 2019-2022 The SymbiFlow Authors. All rights reserved. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Makefile b/Makefile index e24f59997..044fe00e0 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf systemverilog uhdm dsp-ff PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) diff --git a/common/bank_tiles.h b/common/bank_tiles.h index f2d4f5e32..e15753bb4 100644 --- a/common/bank_tiles.h +++ b/common/bank_tiles.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #include "kernel/log.h" diff --git a/design_introspection-plugin/Makefile b/design_introspection-plugin/Makefile index 8835c5676..604254e80 100644 --- a/design_introspection-plugin/Makefile +++ b/design_introspection-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = design_introspection SOURCES = design_introspection.cc \ diff --git a/design_introspection-plugin/design_introspection.cc b/design_introspection-plugin/design_introspection.cc index ef2d73dad..b5193bf54 100644 --- a/design_introspection-plugin/design_introspection.cc +++ b/design_introspection-plugin/design_introspection.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/design_introspection-plugin/get_cells.cc b/design_introspection-plugin/get_cells.cc index d8cf76a52..ae4e82c95 100644 --- a/design_introspection-plugin/get_cells.cc +++ b/design_introspection-plugin/get_cells.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #include "get_cells.h" diff --git a/design_introspection-plugin/get_cells.h b/design_introspection-plugin/get_cells.h index 94bb268d7..c34da79e1 100644 --- a/design_introspection-plugin/get_cells.h +++ b/design_introspection-plugin/get_cells.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #ifndef _GET_CELLS_H_ diff --git a/design_introspection-plugin/get_cmd.h b/design_introspection-plugin/get_cmd.h index 389ea77c6..03a377171 100644 --- a/design_introspection-plugin/get_cmd.h +++ b/design_introspection-plugin/get_cmd.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #ifndef _GET_CMD_H_ diff --git a/design_introspection-plugin/get_count.cc b/design_introspection-plugin/get_count.cc index e7d35358d..850d3f67a 100644 --- a/design_introspection-plugin/get_count.cc +++ b/design_introspection-plugin/get_count.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/design_introspection-plugin/get_count.h b/design_introspection-plugin/get_count.h index e51d5cc07..837fe6297 100644 --- a/design_introspection-plugin/get_count.h +++ b/design_introspection-plugin/get_count.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #ifndef _GET_COUNT_H_ diff --git a/design_introspection-plugin/get_nets.cc b/design_introspection-plugin/get_nets.cc index 8092387f6..27e643add 100644 --- a/design_introspection-plugin/get_nets.cc +++ b/design_introspection-plugin/get_nets.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #include "get_nets.h" diff --git a/design_introspection-plugin/get_nets.h b/design_introspection-plugin/get_nets.h index 3de1a0dc6..b2c5dab70 100644 --- a/design_introspection-plugin/get_nets.h +++ b/design_introspection-plugin/get_nets.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #ifndef _GET_NETS_H_ diff --git a/design_introspection-plugin/get_pins.cc b/design_introspection-plugin/get_pins.cc index 45f7d888b..6fa8b59ad 100644 --- a/design_introspection-plugin/get_pins.cc +++ b/design_introspection-plugin/get_pins.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #include "get_pins.h" diff --git a/design_introspection-plugin/get_pins.h b/design_introspection-plugin/get_pins.h index a42063e78..8b66c525a 100644 --- a/design_introspection-plugin/get_pins.h +++ b/design_introspection-plugin/get_pins.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #ifndef _GET_PINS_H_ diff --git a/design_introspection-plugin/get_ports.cc b/design_introspection-plugin/get_ports.cc index 56e9da432..6f3e702a5 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/design_introspection-plugin/get_ports.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #include "get_ports.h" diff --git a/design_introspection-plugin/get_ports.h b/design_introspection-plugin/get_ports.h index e69417378..32662b98c 100644 --- a/design_introspection-plugin/get_ports.h +++ b/design_introspection-plugin/get_ports.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #ifndef _GET_PORTS_H_ diff --git a/design_introspection-plugin/selection_to_tcl_list.cc b/design_introspection-plugin/selection_to_tcl_list.cc index eeb76ffd6..fa1158a4a 100644 --- a/design_introspection-plugin/selection_to_tcl_list.cc +++ b/design_introspection-plugin/selection_to_tcl_list.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "selection_to_tcl_list.h" diff --git a/design_introspection-plugin/selection_to_tcl_list.h b/design_introspection-plugin/selection_to_tcl_list.h index 87d505688..bbc4acbf0 100644 --- a/design_introspection-plugin/selection_to_tcl_list.h +++ b/design_introspection-plugin/selection_to_tcl_list.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #ifndef _SELECTION_TO_TCL_LIST_H_ #define _SELECTION_TO_TCL_LIST_H_ diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile index fcfb5623e..4e6455f01 100644 --- a/design_introspection-plugin/tests/Makefile +++ b/design_introspection-plugin/tests/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 TESTS = get_nets \ get_ports \ diff --git a/design_introspection-plugin/tests/get_cells/get_cells.v b/design_introspection-plugin/tests/get_cells/get_cells.v index 2fb3ffee2..c0a51ff1b 100644 --- a/design_introspection-plugin/tests/get_cells/get_cells.v +++ b/design_introspection-plugin/tests/get_cells/get_cells.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/design_introspection-plugin/tests/get_count/Makefile b/design_introspection-plugin/tests/get_count/Makefile index 36ab99c95..250eec32f 100644 --- a/design_introspection-plugin/tests/get_count/Makefile +++ b/design_introspection-plugin/tests/get_count/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 test: yosys -p "tcl script.tcl" diff --git a/design_introspection-plugin/tests/get_count/get_count.v b/design_introspection-plugin/tests/get_count/get_count.v index a57d33151..18aea441e 100644 --- a/design_introspection-plugin/tests/get_count/get_count.v +++ b/design_introspection-plugin/tests/get_count/get_count.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module my_gate ( input wire A, diff --git a/design_introspection-plugin/tests/get_nets/get_nets.v b/design_introspection-plugin/tests/get_nets/get_nets.v index afc56d862..d8a6411db 100644 --- a/design_introspection-plugin/tests/get_nets/get_nets.v +++ b/design_introspection-plugin/tests/get_nets/get_nets.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/design_introspection-plugin/tests/get_pins/get_pins.v b/design_introspection-plugin/tests/get_pins/get_pins.v index 3976199c0..d4d3b5069 100644 --- a/design_introspection-plugin/tests/get_pins/get_pins.v +++ b/design_introspection-plugin/tests/get_pins/get_pins.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/design_introspection-plugin/tests/get_ports/get_ports.v b/design_introspection-plugin/tests/get_ports/get_ports.v index afc56d862..d8a6411db 100644 --- a/design_introspection-plugin/tests/get_ports/get_ports.v +++ b/design_introspection-plugin/tests/get_ports/get_ports.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/dsp-ff-plugin/Makefile b/dsp-ff-plugin/Makefile index c64565d51..9cd980084 100644 --- a/dsp-ff-plugin/Makefile +++ b/dsp-ff-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = dsp-ff SOURCES = dsp_ff.cc diff --git a/dsp-ff-plugin/nexus-dsp_rules.txt b/dsp-ff-plugin/nexus-dsp_rules.txt index 596d60a83..d21ea5d1b 100644 --- a/dsp-ff-plugin/nexus-dsp_rules.txt +++ b/dsp-ff-plugin/nexus-dsp_rules.txt @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 dsp MULT9X9 MULT18X18 MULT18X36 MULT36X36 port A SIGNEDA diff --git a/dsp-ff-plugin/tests/Makefile b/dsp-ff-plugin/tests/Makefile index 99953a411..3a883f9ad 100644 --- a/dsp-ff-plugin/tests/Makefile +++ b/dsp-ff-plugin/tests/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 TESTS = \ nexus_mult \ diff --git a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v index 0c03865a6..18fce91f2 100644 --- a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v +++ b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module conflict_dsp_clk ( input wire CLK_A, diff --git a/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v b/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v index ef06483e3..db020c326 100644 --- a/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v +++ b/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module conflict_out_fanout ( input wire CLK, diff --git a/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v b/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v index 2a49bfc23..b0eb3c8db 100644 --- a/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v +++ b/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module mult_ena ( input wire CLK, diff --git a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v index 315cd1e56..e6281d6c4 100644 --- a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v +++ b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module mult_ireg ( input wire CLK, diff --git a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v index 3a5fbe516..38161c6d8 100644 --- a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v +++ b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module mult_wide ( input wire CLK, diff --git a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v index 5f4756f3d..5269dea57 100644 --- a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v +++ b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module conflict_dsp_ctrl_param ( input wire CLK, diff --git a/environment.yml b/environment.yml index 52f3ddb58..e351c1ede 100644 --- a/environment.yml +++ b/environment.yml @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 name: yosys-plugins channels: diff --git a/fasm-plugin/Makefile b/fasm-plugin/Makefile index 770cff728..b149198a4 100644 --- a/fasm-plugin/Makefile +++ b/fasm-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = fasm SOURCES = fasm.cc diff --git a/fasm-plugin/fasm.cc b/fasm-plugin/fasm.cc index f0e20f5ca..135390fcb 100644 --- a/fasm-plugin/fasm.cc +++ b/fasm-plugin/fasm.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * * --- * diff --git a/fasm-plugin/tests/Makefile b/fasm-plugin/tests/Makefile index 76892a25e..1c6f1d813 100644 --- a/fasm-plugin/tests/Makefile +++ b/fasm-plugin/tests/Makefile @@ -1,9 +1,17 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 include $(shell pwd)/../../Makefile_test.common diff --git a/integrateinv-plugin/Makefile b/integrateinv-plugin/Makefile index 410d99085..f93225ab4 100644 --- a/integrateinv-plugin/Makefile +++ b/integrateinv-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = integrateinv SOURCES = integrateinv.cc diff --git a/integrateinv-plugin/integrateinv.cc b/integrateinv-plugin/integrateinv.cc index 0e998ed2a..a47dcea01 100644 --- a/integrateinv-plugin/integrateinv.cc +++ b/integrateinv-plugin/integrateinv.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/integrateinv-plugin/tests/Makefile b/integrateinv-plugin/tests/Makefile index 0c7dce1be..fc6e87b0c 100644 --- a/integrateinv-plugin/tests/Makefile +++ b/integrateinv-plugin/tests/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 TESTS = fanout \ hierarchy \ diff --git a/integrateinv-plugin/tests/fanout/fanout.v b/integrateinv-plugin/tests/fanout/fanout.v index df77b4b55..f30111866 100644 --- a/integrateinv-plugin/tests/fanout/fanout.v +++ b/integrateinv-plugin/tests/fanout/fanout.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* blackbox *) module box( diff --git a/integrateinv-plugin/tests/hierarchy/hierarchy.v b/integrateinv-plugin/tests/hierarchy/hierarchy.v index def4b72c7..32c451d4f 100644 --- a/integrateinv-plugin/tests/hierarchy/hierarchy.v +++ b/integrateinv-plugin/tests/hierarchy/hierarchy.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* blackbox *) module box( diff --git a/integrateinv-plugin/tests/multi_bit/multi_bit.v b/integrateinv-plugin/tests/multi_bit/multi_bit.v index 401e70d05..1515b1783 100644 --- a/integrateinv-plugin/tests/multi_bit/multi_bit.v +++ b/integrateinv-plugin/tests/multi_bit/multi_bit.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* blackbox *) module box( diff --git a/integrateinv-plugin/tests/single_bit/single_bit.v b/integrateinv-plugin/tests/single_bit/single_bit.v index 087145be8..2e0739e9f 100644 --- a/integrateinv-plugin/tests/single_bit/single_bit.v +++ b/integrateinv-plugin/tests/single_bit/single_bit.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* blackbox *) module box( diff --git a/integrateinv-plugin/tests/toplevel/toplevel.v b/integrateinv-plugin/tests/toplevel/toplevel.v index e79e246a4..8c2173170 100644 --- a/integrateinv-plugin/tests/toplevel/toplevel.v +++ b/integrateinv-plugin/tests/toplevel/toplevel.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* blackbox *) module box( diff --git a/params-plugin/Makefile b/params-plugin/Makefile index 8a2533837..9740c7b26 100644 --- a/params-plugin/Makefile +++ b/params-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = params SOURCES = params.cc diff --git a/params-plugin/params.cc b/params-plugin/params.cc index e53ac85d8..e4c944dfa 100644 --- a/params-plugin/params.cc +++ b/params-plugin/params.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "kernel/log.h" #include "kernel/register.h" diff --git a/params-plugin/tests/Makefile b/params-plugin/tests/Makefile index 9576f9383..610074d1b 100644 --- a/params-plugin/tests/Makefile +++ b/params-plugin/tests/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 TESTS = pll include $(shell pwd)/../../Makefile_test.common diff --git a/params-plugin/tests/compare_output_json.py b/params-plugin/tests/compare_output_json.py index fed076802..d9c4e01be 100644 --- a/params-plugin/tests/compare_output_json.py +++ b/params-plugin/tests/compare_output_json.py @@ -1,13 +1,21 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 """ This script extracts the top module cells and their corresponding parameters diff --git a/params-plugin/tests/pll/pll.v b/params-plugin/tests/pll/pll.v index e97901f79..fbdc77ea3 100644 --- a/params-plugin/tests/pll/pll.v +++ b/params-plugin/tests/pll/pll.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* dont_touch = "true" *) input clk100, diff --git a/params-plugin/tests/pll/techmaps/cells_map.v b/params-plugin/tests/pll/techmaps/cells_map.v index 90d637d96..19b67dddc 100644 --- a/params-plugin/tests/pll/techmaps/cells_map.v +++ b/params-plugin/tests/pll/techmaps/cells_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 // ============================================================================ // CMT diff --git a/params-plugin/tests/pll/techmaps/cells_sim.v b/params-plugin/tests/pll/techmaps/cells_sim.v index f1c76e5bf..aa842f101 100644 --- a/params-plugin/tests/pll/techmaps/cells_sim.v +++ b/params-plugin/tests/pll/techmaps/cells_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 // ============================================================================ // CMT diff --git a/ql-iob-plugin/Makefile b/ql-iob-plugin/Makefile index 7a7e1cf4a..dc8975705 100644 --- a/ql-iob-plugin/Makefile +++ b/ql-iob-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = ql-iob SOURCES = ql-iob.cc pcf_parser.cc pinmap_parser.cc diff --git a/ql-iob-plugin/pcf_parser.cc b/ql-iob-plugin/pcf_parser.cc index d8acb03ef..dfcad9e54 100644 --- a/ql-iob-plugin/pcf_parser.cc +++ b/ql-iob-plugin/pcf_parser.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #include "pcf_parser.hh" diff --git a/ql-iob-plugin/pcf_parser.hh b/ql-iob-plugin/pcf_parser.hh index 6a769a1d5..7324ee369 100644 --- a/ql-iob-plugin/pcf_parser.hh +++ b/ql-iob-plugin/pcf_parser.hh @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #ifndef PCF_PARSER_HH diff --git a/ql-iob-plugin/pinmap_parser.cc b/ql-iob-plugin/pinmap_parser.cc index 0231bb8fe..8f228ffdd 100644 --- a/ql-iob-plugin/pinmap_parser.cc +++ b/ql-iob-plugin/pinmap_parser.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #include "pinmap_parser.hh" diff --git a/ql-iob-plugin/pinmap_parser.hh b/ql-iob-plugin/pinmap_parser.hh index 6af04d5ee..781ca834b 100644 --- a/ql-iob-plugin/pinmap_parser.hh +++ b/ql-iob-plugin/pinmap_parser.hh @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #ifndef PINMAP_PARSER_HH diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 6b9ca9195..cc36304fc 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/ql-iob-plugin/tests/Makefile b/ql-iob-plugin/tests/Makefile index 596e07e02..5e6bc92aa 100644 --- a/ql-iob-plugin/tests/Makefile +++ b/ql-iob-plugin/tests/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 TESTS = sdiomux ckpad diff --git a/ql-iob-plugin/tests/ckpad/Makefile b/ql-iob-plugin/tests/ckpad/Makefile index 52de75778..9a2e2d3c3 100644 --- a/ql-iob-plugin/tests/ckpad/Makefile +++ b/ql-iob-plugin/tests/ckpad/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 # TODO: Integrate this in the Makefile_test.command environment ? test: diff --git a/ql-iob-plugin/tests/ckpad/design.v b/ql-iob-plugin/tests/ckpad/design.v index 25fb8f7f7..e717ac928 100644 --- a/ql-iob-plugin/tests/ckpad/design.v +++ b/ql-iob-plugin/tests/ckpad/design.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input wire clk0, diff --git a/ql-iob-plugin/tests/common/pp3_cells_map.v b/ql-iob-plugin/tests/common/pp3_cells_map.v index 2bd7235d0..2b9592e08 100644 --- a/ql-iob-plugin/tests/common/pp3_cells_map.v +++ b/ql-iob-plugin/tests/common/pp3_cells_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$_DFF_P_ ( D, diff --git a/ql-iob-plugin/tests/common/pp3_cells_sim.v b/ql-iob-plugin/tests/common/pp3_cells_sim.v index 367ea61a7..8167f4705 100644 --- a/ql-iob-plugin/tests/common/pp3_cells_sim.v +++ b/ql-iob-plugin/tests/common/pp3_cells_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module inpad ( output Q, diff --git a/ql-iob-plugin/tests/sdiomux/Makefile b/ql-iob-plugin/tests/sdiomux/Makefile index 52de75778..9a2e2d3c3 100644 --- a/ql-iob-plugin/tests/sdiomux/Makefile +++ b/ql-iob-plugin/tests/sdiomux/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 # TODO: Integrate this in the Makefile_test.command environment ? test: diff --git a/ql-iob-plugin/tests/sdiomux/design.v b/ql-iob-plugin/tests/sdiomux/design.v index 617797b65..e7e49769e 100644 --- a/ql-iob-plugin/tests/sdiomux/design.v +++ b/ql-iob-plugin/tests/sdiomux/design.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input wire clk, diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index d51c1467b..30200bf93 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = ql-qlf SOURCES = synth_quicklogic.cc \ diff --git a/ql-qlf-plugin/common/cells_sim.v b/ql-qlf-plugin/common/cells_sim.v index 6967a0990..95bc86be4 100644 --- a/ql-qlf-plugin/common/cells_sim.v +++ b/ql-qlf-plugin/common/cells_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module inv ( diff --git a/ql-qlf-plugin/pp3/abc9_map.v b/ql-qlf-plugin/pp3/abc9_map.v index 86e14d76d..8b342f64b 100644 --- a/ql-qlf-plugin/pp3/abc9_map.v +++ b/ql-qlf-plugin/pp3/abc9_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 // This file exists to map purely-synchronous flops to ABC9 flops, while // mapping flops with asynchronous-set/clear as boxes, this is because ABC9 diff --git a/ql-qlf-plugin/pp3/abc9_model.v b/ql-qlf-plugin/pp3/abc9_model.v index 9d2b1982d..a8b03e736 100644 --- a/ql-qlf-plugin/pp3/abc9_model.v +++ b/ql-qlf-plugin/pp3/abc9_model.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* abc9_flop, lib_whitebox *) module $__PP3_DFFEPC_SYNCONLY ( diff --git a/ql-qlf-plugin/pp3/abc9_unmap.v b/ql-qlf-plugin/pp3/abc9_unmap.v index f9262b81b..29a1adf0e 100644 --- a/ql-qlf-plugin/pp3/abc9_unmap.v +++ b/ql-qlf-plugin/pp3/abc9_unmap.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module $__PP3_DFFEPC_SYNCONLY ( output Q, input D, diff --git a/ql-qlf-plugin/pp3/brams_map.v b/ql-qlf-plugin/pp3/brams_map.v index 07b65b7f1..c0ebb3924 100644 --- a/ql-qlf-plugin/pp3/brams_map.v +++ b/ql-qlf-plugin/pp3/brams_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$__QUICKLOGIC_RAMB16K ( CLK2, diff --git a/ql-qlf-plugin/pp3/brams_sim.v b/ql-qlf-plugin/pp3/brams_sim.v index 0981c7a7c..1b1525683 100644 --- a/ql-qlf-plugin/pp3/brams_sim.v +++ b/ql-qlf-plugin/pp3/brams_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 `timescale 1ns / 10ps module fifo_controller_model ( diff --git a/ql-qlf-plugin/pp3/cells_map.v b/ql-qlf-plugin/pp3/cells_map.v index 625b2c532..bd3d36e3b 100644 --- a/ql-qlf-plugin/pp3/cells_map.v +++ b/ql-qlf-plugin/pp3/cells_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$_MUX8_ ( A, diff --git a/ql-qlf-plugin/pp3/cells_sim.v b/ql-qlf-plugin/pp3/cells_sim.v index 71c98c6d0..cb56a52e5 100644 --- a/ql-qlf-plugin/pp3/cells_sim.v +++ b/ql-qlf-plugin/pp3/cells_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module inv ( output Q, diff --git a/ql-qlf-plugin/pp3/ffs_map.v b/ql-qlf-plugin/pp3/ffs_map.v index c023fc154..b26e6a64b 100644 --- a/ql-qlf-plugin/pp3/ffs_map.v +++ b/ql-qlf-plugin/pp3/ffs_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$_DFFSRE_PPPP_ ( input C, diff --git a/ql-qlf-plugin/pp3/latches_map.v b/ql-qlf-plugin/pp3/latches_map.v index e7825a7f4..514d9cdcd 100644 --- a/ql-qlf-plugin/pp3/latches_map.v +++ b/ql-qlf-plugin/pp3/latches_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$_DLATCH_P_ (E, D, Q); wire [1023:0] _TECHMAP_DO_ = "simplemap; opt"; diff --git a/ql-qlf-plugin/pp3/lut_map.v b/ql-qlf-plugin/pp3/lut_map.v index 867a96314..a7b2a7cff 100644 --- a/ql-qlf-plugin/pp3/lut_map.v +++ b/ql-qlf-plugin/pp3/lut_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$lut ( A, diff --git a/ql-qlf-plugin/pp3/mult_sim.v b/ql-qlf-plugin/pp3/mult_sim.v index 432e485ba..d46ddc025 100644 --- a/ql-qlf-plugin/pp3/mult_sim.v +++ b/ql-qlf-plugin/pp3/mult_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* blackbox *) module qlal4s3_mult_32x32_cell ( diff --git a/ql-qlf-plugin/pp3/qlal3_sim.v b/ql-qlf-plugin/pp3/qlal3_sim.v index e801df74e..c1380e5d6 100644 --- a/ql-qlf-plugin/pp3/qlal3_sim.v +++ b/ql-qlf-plugin/pp3/qlal3_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* blackbox *) (* keep *) diff --git a/ql-qlf-plugin/pp3/qlal4s3b_sim.v b/ql-qlf-plugin/pp3/qlal4s3b_sim.v index 68a37fc90..39184a89d 100644 --- a/ql-qlf-plugin/pp3/qlal4s3b_sim.v +++ b/ql-qlf-plugin/pp3/qlal4s3b_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 `timescale 1ns / 10ps module ahb_gen_bfm ( diff --git a/ql-qlf-plugin/pp3_braminit.cc b/ql-qlf-plugin/pp3_braminit.cc index 0c9b860cc..459f3cfc6 100644 --- a/ql-qlf-plugin/pp3_braminit.cc +++ b/ql-qlf-plugin/pp3_braminit.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index d70e2a682..ba40c072b 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors. + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier:ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "kernel/log.h" diff --git a/ql-qlf-plugin/ql-dsp.cc b/ql-qlf-plugin/ql-dsp.cc index fe5a9868a..4e8e2c64f 100644 --- a/ql-qlf-plugin/ql-dsp.cc +++ b/ql-qlf-plugin/ql-dsp.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/ql-qlf-plugin/ql-edif.cc b/ql-qlf-plugin/ql-edif.cc index a6bed4c0f..4633a1082 100644 --- a/ql-qlf-plugin/ql-edif.cc +++ b/ql-qlf-plugin/ql-edif.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/ql-qlf-plugin/qlf_k4n8/arith_map.v b/ql-qlf-plugin/qlf_k4n8/arith_map.v index 6e3ee6d2e..564b72117 100644 --- a/ql-qlf-plugin/qlf_k4n8/arith_map.v +++ b/ql-qlf-plugin/qlf_k4n8/arith_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* techmap_celltype = "$alu" *) module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); diff --git a/ql-qlf-plugin/qlf_k4n8/cells_sim.v b/ql-qlf-plugin/qlf_k4n8/cells_sim.v index 96caadd89..4ec10f287 100644 --- a/ql-qlf-plugin/qlf_k4n8/cells_sim.v +++ b/ql-qlf-plugin/qlf_k4n8/cells_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* abc9_box, lib_whitebox *) module adder_lut4( diff --git a/ql-qlf-plugin/qlf_k4n8/ffs_map.v b/ql-qlf-plugin/qlf_k4n8/ffs_map.v index cd8837b57..61fab5f88 100644 --- a/ql-qlf-plugin/qlf_k4n8/ffs_map.v +++ b/ql-qlf-plugin/qlf_k4n8/ffs_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$_DFF_P_ (D, Q, C); input D; diff --git a/ql-qlf-plugin/qlf_k6n10/arith_map.v b/ql-qlf-plugin/qlf_k6n10/arith_map.v index d8d4665d2..092120f39 100644 --- a/ql-qlf-plugin/qlf_k6n10/arith_map.v +++ b/ql-qlf-plugin/qlf_k6n10/arith_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 ////////////////////////// // arithmetic // diff --git a/ql-qlf-plugin/qlf_k6n10/brams_map.v b/ql-qlf-plugin/qlf_k6n10/brams_map.v index f363805ee..a22685cda 100644 --- a/ql-qlf-plugin/qlf_k6n10/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10/brams_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$__QLF_RAM16K ( diff --git a/ql-qlf-plugin/qlf_k6n10/cells_sim.v b/ql-qlf-plugin/qlf_k6n10/cells_sim.v index d015c8a8d..ab875f153 100644 --- a/ql-qlf-plugin/qlf_k6n10/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10/cells_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* abc9_box, lib_whitebox *) module adder( diff --git a/ql-qlf-plugin/qlf_k6n10/dsp_map.v b/ql-qlf-plugin/qlf_k6n10/dsp_map.v index 49d5e230a..aa9842918 100644 --- a/ql-qlf-plugin/qlf_k6n10/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10/dsp_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$__MUL16X16 (input [15:0] A, input [15:0] B, output [31:0] Y); parameter A_SIGNED = 0; diff --git a/ql-qlf-plugin/qlf_k6n10/ffs_map.v b/ql-qlf-plugin/qlf_k6n10/ffs_map.v index 500d21a1a..9182f3702 100644 --- a/ql-qlf-plugin/qlf_k6n10/ffs_map.v +++ b/ql-qlf-plugin/qlf_k6n10/ffs_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 // Basic DFF diff --git a/ql-qlf-plugin/qlf_k6n10/lut_map.v b/ql-qlf-plugin/qlf_k6n10/lut_map.v index 9687a90e0..9d24cba0a 100644 --- a/ql-qlf-plugin/qlf_k6n10/lut_map.v +++ b/ql-qlf-plugin/qlf_k6n10/lut_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 `ifndef NO_LUT module \$lut (A, Y); diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v index c9d0b8a80..a68e88e89 100644 --- a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v +++ b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module TDP18K_FIFO ( RMODE_A, diff --git a/ql-qlf-plugin/qlf_k6n10f/arith_map.v b/ql-qlf-plugin/qlf_k6n10f/arith_map.v index 35bd69193..908b17189 100644 --- a/ql-qlf-plugin/qlf_k6n10f/arith_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/arith_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* techmap_celltype = "$alu" *) module _80_quicklogic_alu (A, B, CI, BI, X, Y, CO); parameter A_SIGNED = 0; diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index e1b7f2744..4df5ec28e 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 `define MODE_36 3'b111 // 36 or 32-bit `define MODE_18 3'b110 // 18 or 16-bit diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index f3827978c..dff4af318 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* abc9_flop, lib_whitebox *) module sh_dff( diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index 79c2f52dc..6967a44f2 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module dsp_t1_20x18x64 ( input [19:0] a_i, diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index 681d113ca..fbde7fd26 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); parameter A_SIGNED = 0; diff --git a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v index 8e3058503..273f28e14 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 // Basic DFF diff --git a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v index 88a571dd8..60cd58691 100644 --- a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v +++ b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module sram1024x18 ( clk_a, diff --git a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v index b1f71647d..0c1dcc059 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v +++ b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module fifo_ctl ( raddr, diff --git a/ql-qlf-plugin/quicklogic_eqn.cc b/ql-qlf-plugin/quicklogic_eqn.cc index 441943220..b82a1b286 100644 --- a/ql-qlf-plugin/quicklogic_eqn.cc +++ b/ql-qlf-plugin/quicklogic_eqn.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index a44c9e4f7..acfeb2415 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ #include "kernel/celltypes.h" diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 37654a512..ad507f6a0 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 # The bram test will be enable in a future PR after it's been fixed. diff --git a/ql-qlf-plugin/tests/consts/consts.v b/ql-qlf-plugin/tests/consts/consts.v index 884e4c19f..59e411cfa 100644 --- a/ql-qlf-plugin/tests/consts/consts.v +++ b/ql-qlf-plugin/tests/consts/consts.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 (* keep_hierarchy *) module my_lut ( diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index 60c1780df..1963344d7 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module my_dff ( input d, diff --git a/ql-qlf-plugin/tests/fsm/fsm.v b/ql-qlf-plugin/tests/fsm/fsm.v index 5b276aae1..beea38a8b 100644 --- a/ql-qlf-plugin/tests/fsm/fsm.v +++ b/ql-qlf-plugin/tests/fsm/fsm.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module fsm ( clock, diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.v b/ql-qlf-plugin/tests/full_adder/full_adder.v index 8bbbce714..dad416312 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.v +++ b/ql-qlf-plugin/tests/full_adder/full_adder.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module full_adder ( input wire [`WIDTH-1:0] A, diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v index 47e85f75e..2b64567bf 100644 --- a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v +++ b/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module my_dff ( input d, diff --git a/ql-qlf-plugin/tests/latches/latches.v b/ql-qlf-plugin/tests/latches/latches.v index 13b76d62c..4d691b375 100644 --- a/ql-qlf-plugin/tests/latches/latches.v +++ b/ql-qlf-plugin/tests/latches/latches.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module latchp ( input d, diff --git a/ql-qlf-plugin/tests/logic/logic.v b/ql-qlf-plugin/tests/logic/logic.v index cc0540203..cdf1fca40 100644 --- a/ql-qlf-plugin/tests/logic/logic.v +++ b/ql-qlf-plugin/tests/logic/logic.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input [0:7] in, diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.v b/ql-qlf-plugin/tests/mac_unit/mac_unit.v index 6152c6105..7644ef710 100644 --- a/ql-qlf-plugin/tests/mac_unit/mac_unit.v +++ b/ql-qlf-plugin/tests/mac_unit/mac_unit.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module mac_unit ( a, diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.v b/ql-qlf-plugin/tests/multiplier/multiplier.v index 5523a0aa6..a5522653c 100644 --- a/ql-qlf-plugin/tests/multiplier/multiplier.v +++ b/ql-qlf-plugin/tests/multiplier/multiplier.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module mult16x16 ( a, diff --git a/ql-qlf-plugin/tests/mux/mux.v b/ql-qlf-plugin/tests/mux/mux.v index b18f65fbd..6ec90d19e 100644 --- a/ql-qlf-plugin/tests/mux/mux.v +++ b/ql-qlf-plugin/tests/mux/mux.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module mux2 ( S, diff --git a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v index 784f67d3a..9adf5cfc7 100644 --- a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v +++ b/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module my_ram ( CLK, diff --git a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v index f19c3ce70..f8b0587aa 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v +++ b/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module BRAM #(parameter AWIDTH = 9, parameter DWIDTH = 32) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v index 8ac8977b0..3670335c5 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module BRAM_SDP #(parameter AWIDTH = 9, parameter DWIDTH = 32)( diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile index 23c78ad79..e0b9c1674 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 TESTBENCH = bram_sdp_tb.v POST_SYNTH = bram_sdp_32x512_post_synth bram_sdp_16x1024_post_synth bram_sdp_8x2048_post_synth bram_sdp_4x4096_post_synth diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v index 3641f1f95..900ddc04e 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 `timescale 1ns/1ps diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v index 96218f640..63e1efb65 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module BRAM_TDP #(parameter AWIDTH = 9, parameter DWIDTH = 32)( diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile index 48de42d81..daa832642 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 TESTBENCH = bram_tdp_tb.v POST_SYNTH = bram_tdp_32x512_post_synth bram_tdp_16x1024_post_synth bram_tdp_8x2048_post_synth bram_tdp_4x4096_post_synth diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v index 77b3f4672..c7294623f 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 `timescale 1ns/1ps diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v index 6933e90c2..dd9549a5f 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module macc_simple ( input wire clk, diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v index f8b25e69f..1318c3b01 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module mult_16x16 ( input wire [15:0] A, diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v index 08cd99497..b684903f7 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module simd_mult ( input wire clk, diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v index 5565ddbdf..cf3214763 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 `include "qlf_k6n10f/cells_sim.v" diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v index 22ba57d43..55784b940 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 `include "qlf_k6n10f/cells_sim.v" `timescale 1ns/1ps diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v index eae35897a..cdd0a66e5 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 `include "qlf_k6n10f/cells_sim.v" diff --git a/ql-qlf-plugin/tests/shreg/shreg.v b/ql-qlf-plugin/tests/shreg/shreg.v index ff1712ffd..7e8f47101 100644 --- a/ql-qlf-plugin/tests/shreg/shreg.v +++ b/ql-qlf-plugin/tests/shreg/shreg.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input wire I, diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.v b/ql-qlf-plugin/tests/tribuf/tribuf.v index 95a9f8ed9..b94b10326 100644 --- a/ql-qlf-plugin/tests/tribuf/tribuf.v +++ b/ql-qlf-plugin/tests/tribuf/tribuf.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module tristate ( en, diff --git a/sdc-plugin/Makefile b/sdc-plugin/Makefile index f25e578d6..3ae63e07b 100644 --- a/sdc-plugin/Makefile +++ b/sdc-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = sdc SOURCES = buffers.cc \ diff --git a/sdc-plugin/buffers.cc b/sdc-plugin/buffers.cc index 493d98c7b..9c2308a4b 100644 --- a/sdc-plugin/buffers.cc +++ b/sdc-plugin/buffers.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "buffers.h" #include diff --git a/sdc-plugin/buffers.h b/sdc-plugin/buffers.h index ab894afbf..1665b4d3e 100644 --- a/sdc-plugin/buffers.h +++ b/sdc-plugin/buffers.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #ifndef _BUFFERS_H_ #define _BUFFERS_H_ diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc index 6cbabbbd1..a1c4a7a78 100644 --- a/sdc-plugin/clocks.cc +++ b/sdc-plugin/clocks.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "clocks.h" #include "kernel/register.h" diff --git a/sdc-plugin/clocks.h b/sdc-plugin/clocks.h index 0aa0caaed..47fc5dfc9 100644 --- a/sdc-plugin/clocks.h +++ b/sdc-plugin/clocks.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #ifndef _CLOCKS_H_ #define _CLOCKS_H_ diff --git a/sdc-plugin/propagation.cc b/sdc-plugin/propagation.cc index 00958f54b..dd7718ea8 100644 --- a/sdc-plugin/propagation.cc +++ b/sdc-plugin/propagation.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "propagation.h" #include diff --git a/sdc-plugin/propagation.h b/sdc-plugin/propagation.h index 8be770f5e..cb47cd070 100644 --- a/sdc-plugin/propagation.h +++ b/sdc-plugin/propagation.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #ifndef _PROPAGATION_H_ #define _PROPAGATION_H_ diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 317bbcaba..9560141b9 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include #include diff --git a/sdc-plugin/sdc_writer.cc b/sdc-plugin/sdc_writer.cc index af671972e..22157ca71 100644 --- a/sdc-plugin/sdc_writer.cc +++ b/sdc-plugin/sdc_writer.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "sdc_writer.h" diff --git a/sdc-plugin/sdc_writer.h b/sdc-plugin/sdc_writer.h index 7f21ad71d..354881e2f 100644 --- a/sdc-plugin/sdc_writer.h +++ b/sdc-plugin/sdc_writer.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #ifndef _SDC_WRITER_H_ #define _SDC_WRITER_H_ diff --git a/sdc-plugin/set_clock_groups.cc b/sdc-plugin/set_clock_groups.cc index 0b7b9520e..3a64c3183 100644 --- a/sdc-plugin/set_clock_groups.cc +++ b/sdc-plugin/set_clock_groups.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "set_clock_groups.h" #include "kernel/log.h" diff --git a/sdc-plugin/set_clock_groups.h b/sdc-plugin/set_clock_groups.h index 4d417672c..22d90033f 100644 --- a/sdc-plugin/set_clock_groups.h +++ b/sdc-plugin/set_clock_groups.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #ifndef _SET_CLOCK_GROUPS_H_ #define _SET_CLOCK_GROUPS_H_ diff --git a/sdc-plugin/set_false_path.cc b/sdc-plugin/set_false_path.cc index 31dc61cc4..112a2848b 100644 --- a/sdc-plugin/set_false_path.cc +++ b/sdc-plugin/set_false_path.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "set_false_path.h" #include "kernel/log.h" diff --git a/sdc-plugin/set_false_path.h b/sdc-plugin/set_false_path.h index 2003f8257..a779aa4d8 100644 --- a/sdc-plugin/set_false_path.h +++ b/sdc-plugin/set_false_path.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #ifndef _SET_FALSE_PATH_H_ #define _SET_FALSE_PATH_H_ diff --git a/sdc-plugin/set_max_delay.cc b/sdc-plugin/set_max_delay.cc index 19384ef4b..4bf27540f 100644 --- a/sdc-plugin/set_max_delay.cc +++ b/sdc-plugin/set_max_delay.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "set_max_delay.h" #include "kernel/log.h" diff --git a/sdc-plugin/set_max_delay.h b/sdc-plugin/set_max_delay.h index 7db8459b8..6f3e50de6 100644 --- a/sdc-plugin/set_max_delay.h +++ b/sdc-plugin/set_max_delay.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #ifndef _SET_MAX_DELAY_H_ #define _SET_MAX_DELAY_H_ diff --git a/sdc-plugin/tests/Makefile b/sdc-plugin/tests/Makefile index 3fad79813..06f0c7385 100644 --- a/sdc-plugin/tests/Makefile +++ b/sdc-plugin/tests/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 # abc9 - test that abc9.D is correctly set after importing a clock. # counter, counter2, pll - test buffer and clock divider propagation diff --git a/sdc-plugin/tests/abc9/abc9.v b/sdc-plugin/tests/abc9/abc9.v index 9b6f9e0b4..a2038ab36 100644 --- a/sdc-plugin/tests/abc9/abc9.v +++ b/sdc-plugin/tests/abc9/abc9.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk1, diff --git a/sdc-plugin/tests/counter/counter.v b/sdc-plugin/tests/counter/counter.v index 0ca84bb05..acda4b651 100644 --- a/sdc-plugin/tests/counter/counter.v +++ b/sdc-plugin/tests/counter/counter.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/counter2/counter2.v b/sdc-plugin/tests/counter2/counter2.v index 0ca84bb05..acda4b651 100644 --- a/sdc-plugin/tests/counter2/counter2.v +++ b/sdc-plugin/tests/counter2/counter2.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.v b/sdc-plugin/tests/create_clock_add/create_clock_add.v index 0ca84bb05..acda4b651 100644 --- a/sdc-plugin/tests/create_clock_add/create_clock_add.v +++ b/sdc-plugin/tests/create_clock_add/create_clock_add.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/get_clocks/get_clocks.v b/sdc-plugin/tests/get_clocks/get_clocks.v index 59dd17ed9..4f9211791 100644 --- a/sdc-plugin/tests/get_clocks/get_clocks.v +++ b/sdc-plugin/tests/get_clocks/get_clocks.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/period_check/period_check.v b/sdc-plugin/tests/period_check/period_check.v index d49af36ac..64f4af5d7 100644 --- a/sdc-plugin/tests/period_check/period_check.v +++ b/sdc-plugin/tests/period_check/period_check.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* CLOCK_SIGNAL = "yes", WAVEFORM = "0 5" *) diff --git a/sdc-plugin/tests/period_format_check/period_format_check.v b/sdc-plugin/tests/period_format_check/period_format_check.v index cce344239..5ed26b7d6 100644 --- a/sdc-plugin/tests/period_format_check/period_format_check.v +++ b/sdc-plugin/tests/period_format_check/period_format_check.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* CLOCK_SIGNAL = "yes", PERIOD = "bad value", WAVEFORM = "0 5" *) diff --git a/sdc-plugin/tests/pll/pll.v b/sdc-plugin/tests/pll/pll.v index 9410ffd35..41e38a2af 100644 --- a/sdc-plugin/tests/pll/pll.v +++ b/sdc-plugin/tests/pll/pll.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v index 2c622afbc..1befb828a 100644 --- a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v +++ b/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v index ccd48193b..4db1d892a 100644 --- a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v +++ b/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/pll_div/pll_div.v b/sdc-plugin/tests/pll_div/pll_div.v index 2e5034530..00e83a184 100644 --- a/sdc-plugin/tests/pll_div/pll_div.v +++ b/sdc-plugin/tests/pll_div/pll_div.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v index 5013d4457..036b1a8b0 100644 --- a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v +++ b/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.v b/sdc-plugin/tests/pll_propagated/pll_propagated.v index 9410ffd35..41e38a2af 100644 --- a/sdc-plugin/tests/pll_propagated/pll_propagated.v +++ b/sdc-plugin/tests/pll_propagated/pll_propagated.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.v b/sdc-plugin/tests/restore_from_json/restore_from_json.v index e0aec1c0a..0ba4dead5 100644 --- a/sdc-plugin/tests/restore_from_json/restore_from_json.v +++ b/sdc-plugin/tests/restore_from_json/restore_from_json.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v index afc56d862..d8a6411db 100644 --- a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v +++ b/sdc-plugin/tests/set_clock_groups/set_clock_groups.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/sdc-plugin/tests/set_false_path/set_false_path.v b/sdc-plugin/tests/set_false_path/set_false_path.v index afc56d862..d8a6411db 100644 --- a/sdc-plugin/tests/set_false_path/set_false_path.v +++ b/sdc-plugin/tests/set_false_path/set_false_path.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.v b/sdc-plugin/tests/set_max_delay/set_max_delay.v index afc56d862..d8a6411db 100644 --- a/sdc-plugin/tests/set_max_delay/set_max_delay.v +++ b/sdc-plugin/tests/set_max_delay/set_max_delay.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* async_reg = "true", mr_ff = "true", dont_touch = "true" *) input clk, diff --git a/sdc-plugin/tests/waveform_check/waveform_check.v b/sdc-plugin/tests/waveform_check/waveform_check.v index 9812dada0..c647225e1 100644 --- a/sdc-plugin/tests/waveform_check/waveform_check.v +++ b/sdc-plugin/tests/waveform_check/waveform_check.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( (* CLOCK_SIGNAL = "yes", PERIOD = "10", WAVEFORM = "bad value" *) diff --git a/systemverilog-plugin/Makefile b/systemverilog-plugin/Makefile index d63cee4aa..b98420712 100644 --- a/systemverilog-plugin/Makefile +++ b/systemverilog-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = systemverilog SOURCES = UhdmAst.cc \ diff --git a/systemverilog-plugin/tests/Makefile b/systemverilog-plugin/tests/Makefile index 76892a25e..1c6f1d813 100644 --- a/systemverilog-plugin/tests/Makefile +++ b/systemverilog-plugin/tests/Makefile @@ -1,9 +1,17 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 include $(shell pwd)/../../Makefile_test.common diff --git a/systemverilog-plugin/uhdmastfrontend.cc b/systemverilog-plugin/uhdmastfrontend.cc index a84410b80..ae7f319bb 100644 --- a/systemverilog-plugin/uhdmastfrontend.cc +++ b/systemverilog-plugin/uhdmastfrontend.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc index a88101ec2..fe7433d53 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.cc +++ b/systemverilog-plugin/uhdmcommonfrontend.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/systemverilog-plugin/uhdmcommonfrontend.h b/systemverilog-plugin/uhdmcommonfrontend.h index 616ff4bda..6fcb0f9dc 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.h +++ b/systemverilog-plugin/uhdmcommonfrontend.h @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index 1768ff304..2f2a89f13 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * */ diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile index 338632050..3eea3d43e 100644 --- a/uhdm-plugin/Makefile +++ b/uhdm-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = uhdm SOURCES = uhdm.cc diff --git a/uhdm-plugin/tests/Makefile b/uhdm-plugin/tests/Makefile index 76892a25e..1c6f1d813 100644 --- a/uhdm-plugin/tests/Makefile +++ b/uhdm-plugin/tests/Makefile @@ -1,9 +1,17 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 include $(shell pwd)/../../Makefile_test.common diff --git a/uhdm-plugin/uhdm.cc b/uhdm-plugin/uhdm.cc index 596f0b7ab..9fde149ee 100644 --- a/uhdm-plugin/uhdm.cc +++ b/uhdm-plugin/uhdm.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 */ #include "kernel/log.h" diff --git a/xdc-plugin/BANK.v b/xdc-plugin/BANK.v index 206fcb3dc..dea2a5ed3 100644 --- a/xdc-plugin/BANK.v +++ b/xdc-plugin/BANK.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module BANK(); parameter FASM_EXTRA = "INTERNAL_VREF"; diff --git a/xdc-plugin/Makefile b/xdc-plugin/Makefile index b42a87b95..06d61d7a8 100644 --- a/xdc-plugin/Makefile +++ b/xdc-plugin/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 NAME = xdc SOURCES = xdc.cc diff --git a/xdc-plugin/tests/Makefile b/xdc-plugin/tests/Makefile index a198daf04..ce5ac8ce1 100644 --- a/xdc-plugin/tests/Makefile +++ b/xdc-plugin/tests/Makefile @@ -1,10 +1,18 @@ -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 # counter - basic test for IOSTANDARD, SLEW, DRIVE, IN_TERM properties # counter-dict - basic test using XDC -dict for IOSTANDARD, SLEW, DRIVE, IN_TERM properties diff --git a/xdc-plugin/tests/compare_output_json.py b/xdc-plugin/tests/compare_output_json.py index 084699689..d0440aa6a 100644 --- a/xdc-plugin/tests/compare_output_json.py +++ b/xdc-plugin/tests/compare_output_json.py @@ -1,13 +1,21 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright (C) 2019-2022 The SymbiFlow Authors +# Copyright 2020-2022 F4PGA Authors # -# Use of this source code is governed by a ISC-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/ISC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# SPDX-License-Identifier: ISC +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 """ diff --git a/xdc-plugin/tests/counter-dict/counter-dict.v b/xdc-plugin/tests/counter-dict/counter-dict.v index 54c438006..cc8a821db 100644 --- a/xdc-plugin/tests/counter-dict/counter-dict.v +++ b/xdc-plugin/tests/counter-dict/counter-dict.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/xdc-plugin/tests/counter/counter.v b/xdc-plugin/tests/counter/counter.v index 54c438006..cc8a821db 100644 --- a/xdc-plugin/tests/counter/counter.v +++ b/xdc-plugin/tests/counter/counter.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v index c6fef309f..37a334c68 100644 --- a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v +++ b/xdc-plugin/tests/io_loc_pairs/cells_xtra.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module GTPE2_CHANNEL ( (* iopad_external_pin *) diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v index 74581de02..bb08dee5f 100644 --- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v +++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v index 24c66c621..f4a409344 100644 --- a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v +++ b/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top( output [5:2] LED diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v index 4f419e788..23336ed42 100644 --- a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v +++ b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/xdc-plugin/tests/package_pins/package_pins.v b/xdc-plugin/tests/package_pins/package_pins.v index 4f419e788..23336ed42 100644 --- a/xdc-plugin/tests/package_pins/package_pins.v +++ b/xdc-plugin/tests/package_pins/package_pins.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/xdc-plugin/tests/port_indexes/port_indexes.v b/xdc-plugin/tests/port_indexes/port_indexes.v index 54c438006..cc8a821db 100644 --- a/xdc-plugin/tests/port_indexes/port_indexes.v +++ b/xdc-plugin/tests/port_indexes/port_indexes.v @@ -1,10 +1,18 @@ -// Copyright (C) 2019-2022 The SymbiFlow Authors +// Copyright 2020-2022 F4PGA Authors // -// Use of this source code is governed by a ISC-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/ISC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// SPDX-License-Identifier: ISC +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 module top ( input clk, diff --git a/xdc-plugin/xdc.cc b/xdc-plugin/xdc.cc index 65756a5d7..9a6602956 100644 --- a/xdc-plugin/xdc.cc +++ b/xdc-plugin/xdc.cc @@ -1,11 +1,19 @@ /* - * Copyright (C) 2019-2022 The SymbiFlow Authors + * Copyright 2020-2022 F4PGA Authors * - * Use of this source code is governed by a ISC-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/ISC + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * SPDX-License-Identifier: ISC + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 * * --- * From 36aac32e81cdcc959a71af4f36226805cee72a40 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 26 Jan 2022 10:49:40 +0100 Subject: [PATCH 715/845] Removed blocking assignments and reworked the assign statement for PP3 logic_cell_macro simulation model Signed-off-by: Maciej Kurc --- ql-qlf-plugin/pp3/cells_sim.v | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ql-qlf-plugin/pp3/cells_sim.v b/ql-qlf-plugin/pp3/cells_sim.v index 71c98c6d0..eddbc5778 100644 --- a/ql-qlf-plugin/pp3/cells_sim.v +++ b/ql-qlf-plugin/pp3/cells_sim.v @@ -444,9 +444,6 @@ module logic_cell_macro ( wire TAP1, TAP2, TBP1, TBP2, BAP1, BAP2, BBP1, BBP2, QCKP, TAI, TBI, BAI, BBI, TZI, BZI, CZI, QZI; reg QZ_r; - initial begin - QZ_r = 1'b0; - end assign QZ = QZ_r; assign TAP1 = TAS1 ? ~TA1 : TA1; assign TAP2 = TAS2 ? ~TA2 : TA2; @@ -470,11 +467,16 @@ module logic_cell_macro ( assign CZ = CZI; assign QCKP = QCKS ? QCK : ~QCK; + initial QZ_r <= 1'b0; - always @(posedge QCKP) if (~QRT && ~QST) if (QEN) QZ_r = QZI; - always @(QRT or QST) - if (QRT) QZ_r = 1'b0; - else if (QST) QZ_r = 1'b1; + always @(posedge QCKP or posedge QRT or posedge QST) begin + if (QRT) + QZ_r <= 1'b0; + else if (QST) + QZ_r <= 1'b1; + else if (QEN) + QZ_r <= QZI; + end endmodule From c166cf21ae9ffd1f6c9af15ca60e39795f2be341 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 26 Jan 2022 11:29:06 +0100 Subject: [PATCH 716/845] Updated plugin test results Signed-off-by: Maciej Kurc --- ql-qlf-plugin/tests/full_adder/full_adder.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/ql-qlf-plugin/tests/full_adder/full_adder.tcl index afc70c27c..83b68cb8c 100644 --- a/ql-qlf-plugin/tests/full_adder/full_adder.tcl +++ b/ql-qlf-plugin/tests/full_adder/full_adder.tcl @@ -153,4 +153,3 @@ stat #select -assert-count 8 t:inpad #select -assert-count 1 t:outpad #select -assert-none t:LUT2 t:LUT4 t:inpad t:outpad %% t:* %D - From 70fb49c34bc824fcd14d0d98b1828c5480079729 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 6 Apr 2022 10:52:28 +0200 Subject: [PATCH 717/845] systemverilog: visit_object only when debug or report flag Signed-off-by: Kamil Rakoczy --- systemverilog-plugin/uhdmastfrontend.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/systemverilog-plugin/uhdmastfrontend.cc b/systemverilog-plugin/uhdmastfrontend.cc index ae7f319bb..660b4c298 100644 --- a/systemverilog-plugin/uhdmastfrontend.cc +++ b/systemverilog-plugin/uhdmastfrontend.cc @@ -44,9 +44,11 @@ struct UhdmAstFrontend : public UhdmCommonFrontend { UHDM::Serializer serializer; std::vector restoredDesigns = serializer.Restore(filename); - for (auto design : restoredDesigns) { - std::stringstream strstr; - UHDM::visit_object(design, 1, "", &this->shared.report.unhandled, this->shared.debug_flag ? std::cout : strstr); + if (this->shared.debug_flag || !this->report_directory.empty()) { + for (auto design : restoredDesigns) { + std::stringstream strstr; + UHDM::visit_object(design, 1, "", &this->shared.report.unhandled, this->shared.debug_flag ? std::cout : strstr); + } } UhdmAst uhdm_ast(this->shared); AST::AstNode *current_ast = uhdm_ast.visit_designs(restoredDesigns); From 547947a6e0c11f1059f850d002637c9e63ca848c Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 6 Apr 2022 11:25:42 +0200 Subject: [PATCH 718/845] systemverilog: minor fixes Signed-off-by: Kamil Rakoczy --- systemverilog-plugin/uhdmcommonfrontend.cc | 11 +++++-- .../uhdmsurelogastfrontend.cc | 32 +++++++++++++------ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc index fe7433d53..53214c554 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.cc +++ b/systemverilog-plugin/uhdmcommonfrontend.cc @@ -78,8 +78,9 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve bool dump_vlog2 = false; bool no_dump_ptr = false; bool dump_rtlil = false; + std::vector unhandled_args; - for (size_t i = 1; i < args.size(); i++) { + for (size_t i = 0; i < args.size(); i++) { if (args[i] == "-debug") { dump_ast1 = true; dump_ast2 = true; @@ -107,9 +108,15 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve dump_rtlil = true; } else if (args[i] == "-yydebug") { this->shared.debug_flag = true; + } else { + unhandled_args.push_back(args[i]); } } - extra_args(f, filename, args, args.size() - 1); + // pass only unhandled args to Surelog + // unhandled args starts with command name, + // but Surelog expects args[0] to be program name + // and skips it + this->args = unhandled_args; AST::current_filename = filename; AST::set_line_num = &set_line_num; diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index 2f2a89f13..82f04e405 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -72,26 +72,22 @@ std::vector executeCompilation(SURELOG::SymbolTable *symbolTable, SUR } if ((!noFatalErrors) || (!success)) codedReturn |= 1; + if (codedReturn) { + log_error("Encoraged fatal error when executing Surelog. Aborting!\n"); + } return the_design; } struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { UhdmSurelogAstFrontend(std::string name, std::string short_help) : UhdmCommonFrontend(name, short_help) {} UhdmSurelogAstFrontend() : UhdmCommonFrontend("verilog_with_uhdm", "generate/read UHDM file") {} - void print_read_options() override - { - log(" -process\n"); - log(" loads design from given UHDM file\n"); - log("\n"); - UhdmCommonFrontend::print_read_options(); - } void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); log(" read_verilog_with_uhdm [options] [filenames]\n"); log("\n"); - log("Generate or load design from a UHDM file into the current design\n"); + log("Read SystemVerilog files using Surelog into the current design\n"); log("\n"); this->print_read_options(); } @@ -117,6 +113,12 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { SURELOG::scompiler *compiler = nullptr; const std::vector uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); + if (this->shared.debug_flag || !this->report_directory.empty()) { + for (auto design : uhdm_design) { + std::stringstream strstr; + UHDM::visit_object(design, 1, "", &this->shared.report.unhandled, this->shared.debug_flag ? std::cout : strstr); + } + } SURELOG::shutdown_compiler(compiler); delete clp; @@ -125,8 +127,8 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { UhdmAst uhdm_ast(this->shared); AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); - if (report_directory != "") { - shared.report.write(report_directory); + if (!this->report_directory.empty()) { + this->shared.report.write(this->report_directory); } return current_ast; @@ -136,6 +138,16 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { struct UhdmSystemVerilogFrontend : public UhdmSurelogAstFrontend { UhdmSystemVerilogFrontend() : UhdmSurelogAstFrontend("systemverilog", "read SystemVerilog files") {} + void help() override + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" read_systemverilog [options] [filenames]\n"); + log("\n"); + log("Read SystemVerilog files using Surelog into the current design\n"); + log("\n"); + this->print_read_options(); + } } UhdmSystemVerilogFrontend; YOSYS_NAMESPACE_END From 98bf734d0d1dbb701e0310964e3bf1ae217d14d1 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 6 Apr 2022 11:39:07 -0700 Subject: [PATCH 719/845] Make access to nexus-dsp_rules.txt in tests location indpenedent. Making the access to the dsp rules relative to DESIGN_TOP makes it easier to invoke the TCL script from any path. Signed-off-by: Henner Zeller --- dsp-ff-plugin/dsp_ff.cc | 2 +- .../nexus_conn_conflict/nexus_conn_conflict.tcl | 12 +++++++----- .../tests/nexus_conn_share/nexus_conn_share.tcl | 12 ++++++------ dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl | 12 +++++++----- dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl | 10 ++++++---- .../tests/nexus_mult_wide/nexus_mult_wide.tcl | 4 +++- .../nexus_param_conflict/nexus_param_conflict.tcl | 9 +++++---- 7 files changed, 35 insertions(+), 26 deletions(-) diff --git a/dsp-ff-plugin/dsp_ff.cc b/dsp-ff-plugin/dsp_ff.cc index 26e5acdd8..d0ecd8e23 100644 --- a/dsp-ff-plugin/dsp_ff.cc +++ b/dsp-ff-plugin/dsp_ff.cc @@ -289,7 +289,7 @@ struct DspFF : public Pass { log("Loading rules from '%s'...\n", a_FileName.c_str()); if (!file) { - log_error(" Error opening file!\n"); + log_error(" Error opening file '%s'!\n", a_FileName.c_str()); } // Parse each port as if it was associated with its own DSP register. diff --git a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl index 87486f981..2bce1d432 100644 --- a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl +++ b/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl @@ -2,6 +2,8 @@ yosys -import if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } yosys -import ;# ingest plugin commands +set DSP_RULES [file dirname $::env(DESIGN_TOP)]/../../nexus-dsp_rules.txt + read_verilog $::env(DESIGN_TOP).v design -save read @@ -10,7 +12,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat @@ -22,7 +24,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 18 t:FD1P3IX @@ -32,7 +34,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 18 t:FD1P3DX @@ -42,7 +44,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 18 t:FD1P3IX @@ -52,7 +54,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 9 t:FD1P3IX diff --git a/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl b/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl index 2f13e67ca..673131d52 100644 --- a/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl +++ b/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl @@ -2,6 +2,8 @@ yosys -import if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } yosys -import ;# ingest plugin commands +set DSP_RULES [file dirname $::env(DESIGN_TOP)]/../../nexus-dsp_rules.txt + read_verilog $::env(DESIGN_TOP).v design -save read @@ -10,7 +12,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 18 t:FD1P3IX @@ -20,7 +22,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 18 t:FD1P3IX @@ -30,7 +32,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 9 t:FD1P3IX @@ -40,9 +42,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 9 t:FD1P3IX - - diff --git a/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl b/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl index fa006c891..d394e0431 100644 --- a/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl +++ b/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl @@ -2,6 +2,8 @@ yosys -import if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } yosys -import ;# ingest plugin commands +set DSP_RULES [file dirname $::env(DESIGN_TOP)]/../../nexus-dsp_rules.txt + read_verilog $::env(DESIGN_TOP).v design -save read @@ -10,7 +12,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat @@ -23,7 +25,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat @@ -36,7 +38,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat @@ -49,7 +51,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat @@ -62,7 +64,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat diff --git a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl index 1eef04a60..3e52fbf39 100644 --- a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl +++ b/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl @@ -2,6 +2,8 @@ yosys -import if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } yosys -import ;# ingest plugin commands +set DSP_RULES [file dirname $::env(DESIGN_TOP)]/../../nexus-dsp_rules.txt + read_verilog $::env(DESIGN_TOP).v design -save read @@ -10,7 +12,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat @@ -22,7 +24,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat @@ -34,7 +36,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat @@ -50,7 +52,7 @@ select -assert-count 0 t:FD1P3IX #hierarchy -top ${TOP} #synth_nexus -flatten #techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -#equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +#equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} #design -load postopt #yosys cd ${TOP} #stat diff --git a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl index 70f5a61ab..369717728 100644 --- a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl +++ b/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl @@ -2,6 +2,8 @@ yosys -import if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } yosys -import ;# ingest plugin commands +set DSP_RULES [file dirname $::env(DESIGN_TOP)]/../../nexus-dsp_rules.txt + read_verilog $::env(DESIGN_TOP).v design -save read @@ -10,7 +12,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat diff --git a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl index ff46e0b7e..27dff3a70 100644 --- a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl +++ b/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl @@ -2,6 +2,8 @@ yosys -import if { [info procs dsp_ff] == {} } { plugin -i dsp-ff } yosys -import ;# ingest plugin commands +set DSP_RULES [file dirname $::env(DESIGN_TOP)]/../../nexus-dsp_rules.txt + read_verilog $::env(DESIGN_TOP).v design -save read @@ -10,7 +12,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 18 t:FD1P3IX @@ -20,7 +22,7 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ../../nexus-dsp_rules.txt +equiv_opt -assert -async2sync -map +/nexus/cells_sim.v debug dsp_ff -rules ${DSP_RULES} design -load postopt yosys cd ${TOP} stat @@ -32,9 +34,8 @@ design -load read hierarchy -top ${TOP} synth_nexus -flatten techmap -map +/nexus/cells_sim.v t:VLO t:VHI %u ;# Unmap VHI and VLO -debug dsp_ff -rules ../../nexus-dsp_rules.txt +debug dsp_ff -rules ${DSP_RULES} stat select -assert-count 1 t:MULT9X9 select -assert-count 4 t:FD1P3IX select -assert-count 5 t:FD1P3DX - From dcfdb903e1284c24a87f9a6010c2e1e7f0c25289 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 7 Apr 2022 10:54:24 +0200 Subject: [PATCH 720/845] Fix read_uhdm frontend extra_args is neccessary for read_uhdm frontend as it sets filename Signed-off-by: Kamil Rakoczy --- systemverilog-plugin/uhdmcommonfrontend.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc index 53214c554..d12a9c34a 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.cc +++ b/systemverilog-plugin/uhdmcommonfrontend.cc @@ -112,6 +112,7 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve unhandled_args.push_back(args[i]); } } + extra_args(f, filename, args, args.size() - 1); // pass only unhandled args to Surelog // unhandled args starts with command name, // but Surelog expects args[0] to be program name From 3de74850088c2afe93b72a3e957a0db68f92cfe1 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 11 Apr 2022 16:51:37 +0200 Subject: [PATCH 721/845] Updated k6n10f DSP simulation model, techmaps and tests Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-macc.cc | 4 +- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 89 ++++++++----------- ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 6 +- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 4 +- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 2 +- .../qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v | 4 +- 6 files changed, 49 insertions(+), 60 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index f95ca87e2..5275024bd 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -151,13 +151,13 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) RTLIL::SigSpec ena; if (st.ff->hasPort(ID(ARST))) { - if (st.ff->getParam(ID(ARST_POLARITY)) != RTLIL::S0) { + if (st.ff->getParam(ID(ARST_POLARITY)) != RTLIL::S1) { rst = pm.module->Not(NEW_ID, st.ff->getPort(ID(ARST))); } else { rst = st.ff->getPort(ID(ARST)); } } else { - rst = RTLIL::SigSpec(RTLIL::S1); + rst = RTLIL::SigSpec(RTLIL::S0); } if (st.ff->hasPort(ID(EN))) { diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index dff4af318..0396275a7 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1269,7 +1269,7 @@ endmodule /* QL_DSP1 */ module QL_DSP2 ( // TODO: Name subject to change input [19:0] a, input [17:0] b, - input [3:0] acc_fir, + input [ 5:0] acc_fir, output [37:0] z, output [17:0] dly_b, @@ -1300,8 +1300,6 @@ module QL_DSP2 ( // TODO: Name subject to change localparam NBITS_A = 20; localparam NBITS_B = 18; localparam NBITS_Z = 38; - localparam NBITS_COEF = 20; - localparam NBITS_AF = 4; wire [NBITS_Z-1:0] dsp_full_z; wire [(NBITS_Z/2)-1:0] dsp_frac0_z; @@ -1319,16 +1317,14 @@ module QL_DSP2 ( // TODO: Name subject to change .NBITS_A(NBITS_A/2), .NBITS_B(NBITS_B/2), .NBITS_ACC(NBITS_ACC/2), - .NBITS_Z(NBITS_Z/2), - .NBITS_COEF(NBITS_COEF/2), - .NBITS_AF(NBITS_AF/2) + .NBITS_Z(NBITS_Z/2) ) dsp_frac0 ( .a_i(a[(NBITS_A/2)-1:0]), .b_i(b[(NBITS_B/2)-1:0]), .z_o(dsp_frac0_z), .dly_b_o(dsp_frac0_dly_b), - .acc_fir_i(acc_fir[(NBITS_AF/2)-1:0]), + .acc_fir_i(acc_fir), .feedback_i(feedback), .load_acc_i(load_acc), @@ -1336,7 +1332,7 @@ module QL_DSP2 ( // TODO: Name subject to change .unsigned_b_i(unsigned_b), .clock_i(clk), - .reset_n_i(reset), + .s_reset(reset), .saturate_enable_i(saturate_enable), .output_select_i(output_select), @@ -1344,10 +1340,10 @@ module QL_DSP2 ( // TODO: Name subject to change .shift_right_i(shift_right), .subtract_i(subtract), .register_inputs_i(register_inputs), - .coef_0_i(COEFF_0[(NBITS_COEF/2)-1:0]), - .coef_1_i(COEFF_1[(NBITS_COEF/2)-1:0]), - .coef_2_i(COEFF_2[(NBITS_COEF/2)-1:0]), - .coef_3_i(COEFF_3[(NBITS_COEF/2)-1:0]) + .coef_0_i(COEFF_0[(NBITS_A/2)-1:0]), + .coef_1_i(COEFF_1[(NBITS_A/2)-1:0]), + .coef_2_i(COEFF_2[(NBITS_A/2)-1:0]), + .coef_3_i(COEFF_3[(NBITS_A/2)-1:0]) ); // Output used when fmode == 1 @@ -1355,16 +1351,14 @@ module QL_DSP2 ( // TODO: Name subject to change .NBITS_A(NBITS_A/2), .NBITS_B(NBITS_B/2), .NBITS_ACC(NBITS_ACC/2), - .NBITS_Z(NBITS_Z/2), - .NBITS_COEF(NBITS_COEF/2), - .NBITS_AF(NBITS_AF/2) + .NBITS_Z(NBITS_Z/2) ) dsp_frac1 ( .a_i(a[NBITS_A-1:NBITS_A/2]), .b_i(b[NBITS_B-1:NBITS_B/2]), .z_o(dsp_frac1_z), .dly_b_o(dsp_frac1_dly_b), - .acc_fir_i(acc_fir[NBITS_AF-1:NBITS_AF/2]), + .acc_fir_i(acc_fir), .feedback_i(feedback), .load_acc_i(load_acc), @@ -1372,7 +1366,7 @@ module QL_DSP2 ( // TODO: Name subject to change .unsigned_b_i(unsigned_b), .clock_i(clk), - .reset_n_i(reset), + .s_reset(reset), .saturate_enable_i(saturate_enable), .output_select_i(output_select), @@ -1380,10 +1374,10 @@ module QL_DSP2 ( // TODO: Name subject to change .shift_right_i(shift_right), .subtract_i(subtract), .register_inputs_i(register_inputs), - .coef_0_i(COEFF_0[NBITS_COEF-1:NBITS_COEF/2]), - .coef_1_i(COEFF_1[NBITS_COEF-1:NBITS_COEF/2]), - .coef_2_i(COEFF_2[NBITS_COEF-1:NBITS_COEF/2]), - .coef_3_i(COEFF_3[NBITS_COEF-1:NBITS_COEF/2]) + .coef_0_i(COEFF_0[NBITS_A-1:NBITS_A/2]), + .coef_1_i(COEFF_1[NBITS_A-1:NBITS_A/2]), + .coef_2_i(COEFF_2[NBITS_A-1:NBITS_A/2]), + .coef_3_i(COEFF_3[NBITS_A-1:NBITS_A/2]) ); // Output used when fmode == 0 @@ -1391,9 +1385,7 @@ module QL_DSP2 ( // TODO: Name subject to change .NBITS_A(NBITS_A), .NBITS_B(NBITS_B), .NBITS_ACC(NBITS_ACC), - .NBITS_Z(NBITS_Z), - .NBITS_COEF(NBITS_COEF), - .NBITS_AF(NBITS_AF) + .NBITS_Z(NBITS_Z) ) dsp_full ( .a_i(a), .b_i(b), @@ -1408,7 +1400,7 @@ module QL_DSP2 ( // TODO: Name subject to change .unsigned_b_i(unsigned_b), .clock_i(clk), - .reset_n_i(reset), + .s_reset(reset), .saturate_enable_i(saturate_enable), .output_select_i(output_select), @@ -1427,16 +1419,14 @@ module dsp_t1_sim # ( parameter NBITS_ACC = 64, parameter NBITS_A = 20, parameter NBITS_B = 18, - parameter NBITS_Z = 38, - parameter NBITS_COEF = 20, - parameter NBITS_AF = 4 + parameter NBITS_Z = 38 )( input [NBITS_A-1:0] a_i, input [NBITS_B-1:0] b_i, output [NBITS_Z-1:0] z_o, output reg [NBITS_B-1:0] dly_b_o, - input [NBITS_AF-1:0] acc_fir_i, + input [5:0] acc_fir_i, input [2:0] feedback_i, input load_acc_i, @@ -1444,7 +1434,7 @@ module dsp_t1_sim # ( input unsigned_b_i, input clock_i, - input reset_n_i, + input s_reset, input saturate_enable_i, input [2:0] output_select_i, @@ -1452,10 +1442,10 @@ module dsp_t1_sim # ( input [5:0] shift_right_i, input subtract_i, input register_inputs_i, - input [NBITS_COEF-1:0] coef_0_i, - input [NBITS_COEF-1:0] coef_1_i, - input [NBITS_COEF-1:0] coef_2_i, - input [NBITS_COEF-1:0] coef_3_i + input [NBITS_A-1:0] coef_0_i, + input [NBITS_A-1:0] coef_1_i, + input [NBITS_A-1:0] coef_2_i, + input [NBITS_A-1:0] coef_3_i ); // FIXME: The version of Icarus Verilog from Conda seems not to recognize the @@ -1468,7 +1458,7 @@ module dsp_t1_sim # ( // Input registers reg [NBITS_A-1:0] r_a; reg [NBITS_B-1:0] r_b; - reg [NBITS_AF-1:0] r_acc_fir; + reg [5:0] r_acc_fir; reg r_unsigned_a; reg r_unsigned_b; reg r_load_acc; @@ -1496,8 +1486,8 @@ module dsp_t1_sim # ( r_rnd <= 0; end - always @(posedge clock_i or negedge reset_n_i) begin - if (~reset_n_i) begin + always @(posedge clock_i or posedge s_reset) begin + if (s_reset) begin r_a <= 'h0; r_b <= 'h0; @@ -1536,7 +1526,7 @@ module dsp_t1_sim # ( wire [NBITS_A-1:0] a = register_inputs_i ? r_a : a_i; wire [NBITS_B-1:0] b = register_inputs_i ? r_b : b_i; - wire [NBITS_AF-1:0] acc_fir = register_inputs_i ? r_acc_fir : acc_fir_i; + wire [5:0] acc_fir = register_inputs_i ? r_acc_fir : acc_fir_i; wire unsigned_a = register_inputs_i ? r_unsigned_a : unsigned_a_i; wire unsigned_b = register_inputs_i ? r_unsigned_b : unsigned_b_i; wire [2:0] feedback = register_inputs_i ? r_feedback : feedback_i; @@ -1579,22 +1569,21 @@ module dsp_t1_sim # ( {{(NBITS_ACC-NBITS_A-NBITS_B){1'b0}}, mult[NBITS_A+NBITS_B-1:0]} : {{(NBITS_ACC-NBITS_A-NBITS_B){mult[NBITS_A+NBITS_B-1]}}, mult[NBITS_A+NBITS_B-1:0]}; - wire [NBITS_ACC-1:0] a_xtnd = (unsigned_a) ? - { {(NBITS_ACC - NBITS_A - NBITS_AF){1'b0}}, acc_fir, {a} } : - { {(NBITS_ACC - NBITS_A - NBITS_AF){acc_fir[NBITS_AF-1]}}, acc_fir, {a[NBITS_A-1:0]} }; - // Adder - wire [NBITS_ACC-1:0] add_a = (subtract_i) ? (~mult_xtnd + 1) : mult_xtnd; + wire [NBITS_ACC-1:0] acc_fir_int = unsigned_a ? {{(NBITS_ACC-NBITS_A){1'b0}}, a} : + {{(NBITS_ACC-NBITS_A){a[NBITS_A-1]}}, a} ; + + wire [NBITS_ACC-1:0] add_a = (subtract) ? (~mult_xtnd + 1) : mult_xtnd; wire [NBITS_ACC-1:0] add_b = (feedback_i == 3'h0) ? acc : - (feedback_i == 3'h1) ? {{NBITS_ACC}{1'b0}} : a_xtnd; + (feedback_i == 3'h1) ? {{NBITS_ACC}{1'b0}} : (acc_fir_int << acc_fir); wire [NBITS_ACC-1:0] add_o = add_a + add_b; // Accumulator initial acc <= 0; - always @(posedge clock_i or negedge reset_n_i) - if (~reset_n_i) acc <= 'h0; + always @(posedge clock_i or posedge s_reset) + if (s_reset) acc <= 'h0; else begin if (load_acc) acc <= add_o; @@ -1631,8 +1620,8 @@ module dsp_t1_sim # ( initial z1 <= 0; - always @(posedge clock_i or negedge reset_n_i) - if (!reset_n_i) + always @(posedge clock_i or posedge s_reset) + if (s_reset) z1 <= 0; else begin z1 <= (output_select_i == 3'b100) ? z0 : z2; @@ -1651,8 +1640,8 @@ module dsp_t1_sim # ( // B input delayed passthrough initial dly_b_o <= 0; - always @(posedge clock_i or negedge reset_n_i) - if (!reset_n_i) + always @(posedge clock_i or posedge s_reset) + if (s_reset) dly_b_o <= 0; else dly_b_o <= b_i; diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index 6967a44f2..d6c33afe3 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -17,7 +17,7 @@ module dsp_t1_20x18x64 ( input [19:0] a_i, input [17:0] b_i, - input [ 3:0] acc_fir_i, + input [ 5:0] acc_fir_i, output [37:0] z_o, output [17:0] dly_b_o, @@ -76,7 +76,7 @@ endmodule module dsp_t1_10x9x32 ( input [ 9:0] a_i, input [ 8:0] b_i, - input [ 1:0] acc_fir_i, + input [ 5:0] acc_fir_i, output [18:0] z_o, output [ 8:0] dly_b_o, @@ -117,7 +117,7 @@ module dsp_t1_10x9x32 ( ) _TECHMAP_REPLACE_ ( .a ({10'd0, a_i}), .b ({ 9'd0, b_i}), - .acc_fir ({ 2'd0, acc_fir_i}), + .acc_fir (acc_fir_i), .z (z), .dly_b (dly_b), diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index fbde7fd26..3c16b60d4 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -36,7 +36,7 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); dsp_t1_20x18x64 _TECHMAP_REPLACE_ ( .a_i (a), .b_i (b), - .acc_fir_i (4'd0), + .acc_fir_i (6'd0), .z_o (z), .feedback_i (3'd0), @@ -78,7 +78,7 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); dsp_t1_10x9x32 _TECHMAP_REPLACE_ ( .a_i (a), .b_i (b), - .acc_fir_i (2'd0), + .acc_fir_i (6'd0), .z_o (z), .feedback_i (3'd0), diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl index 468f42133..9e477290d 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -56,7 +56,7 @@ check_equiv $TOP design -load postopt yosys cd $TOP select -assert-count 1 t:QL_DSP2 -select -assert-count 2 t:* +select -assert-count 1 t:* #FIXME: DSP not inferred (got $mux instead of $dffe) #set TOP "macc_simple_ena" diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v index cf3214763..65e519a92 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v @@ -84,7 +84,7 @@ module tb(); endcase // UUT - wire signed [3:0] acc_fir_i = 4'h0; + wire signed [5:0] acc_fir_i = 6'h0; wire signed [19:0] A = coeff; wire signed [17:0] B = data; wire signed [37:0] Z; @@ -92,7 +92,7 @@ module tb(); dsp_t1_sim # ( ) uut ( .clock_i (clk), - .reset_n_i (~rst), + .s_reset (rst), .a_i ((!stb) ? A : 20'h0), .b_i ((!stb) ? B : 18'h0), .acc_fir_i ((!stb) ? acc_fir_i : 4'h0), From 22b52fbea45ed20e1c2faa96203b83d79b4646f2 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 12 Apr 2022 11:05:32 +0200 Subject: [PATCH 722/845] Fixed an issue with DSP signed multiplication. Added test. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 6 +++--- ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl | 9 ++++++++- ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v | 10 ++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 0396275a7..284f102b9 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1554,12 +1554,12 @@ module dsp_t1_sim # ( wire [NBITS_B-1:0] mult_b = (feedback == 2'h2) ? {NBITS_B{1'b0}} : b; wire [NBITS_A-1:0] mult_sgn_a = mult_a[NBITS_A-1]; - wire [NBITS_A-1:0] mult_mag_a = (mult_sgn_a) ? (~mult_a + 1) : mult_a; + wire [NBITS_A-1:0] mult_mag_a = (mult_sgn_a && !unsigned_a) ? (~mult_a + 1) : mult_a; wire [NBITS_B-1:0] mult_sgn_b = mult_b[NBITS_B-1]; - wire [NBITS_B-1:0] mult_mag_b = (mult_sgn_b) ? (~mult_b + 1) : mult_b; + wire [NBITS_B-1:0] mult_mag_b = (mult_sgn_b && !unsigned_b) ? (~mult_b + 1) : mult_b; wire [NBITS_A+NBITS_B-1:0] mult_mag = mult_mag_a * mult_mag_b; - wire mult_sgn = mult_sgn_a ^ mult_sgn_b; + wire mult_sgn = (mult_sgn_a && !unsigned_a) ^ (mult_sgn_b && !unsigned_b); wire [NBITS_A+NBITS_B-1:0] mult = (unsigned_a && unsigned_b) ? (mult_a * mult_b) : (mult_sgn ? (~mult_mag + 1) : mult_mag); diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl index b653836c3..cd8ec40ca 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl @@ -14,7 +14,7 @@ proc check_equiv {top} { techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/cells_sim.v yosys proc opt_expr - opt_clean + opt_clean -purge async2sync equiv_make gold gate equiv @@ -59,3 +59,10 @@ design -load postopt yosys cd ${TOP} select -assert-count 1 t:QL_DSP2 +set TOP "mult_8x8_s" +design -load read +check_equiv ${TOP} +design -load postopt +yosys cd ${TOP} +select -assert-count 1 t:QL_DSP2 + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v index 1318c3b01..8baf45d17 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v @@ -53,3 +53,13 @@ module mult_10x9 ( assign Z = A * B; endmodule + +module mult_8x8_s ( + input wire signed [ 7:0] A, + input wire signed [ 7:0] B, + output wire signed [15:0] Z +); + + assign Z = A * B; + +endmodule From 5b56a03d5c61ba636f03b1cb53b2df34ee861c88 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 12 Apr 2022 11:53:58 +0200 Subject: [PATCH 723/845] Aggregated all QL_DSP2 parameters into a single one named MODE_BITS Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-simd.cc | 14 ++++++++------ ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 23 +++++++++++------------ ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 19 ++++++------------- 3 files changed, 25 insertions(+), 31 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index ba40c072b..edf432a7a 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -87,7 +87,7 @@ struct QlDspSimdPass : public Pass { }; // DSP parameters - const std::vector m_DspParams = {"COEFF_0", "COEFF_1", "COEFF_2", "COEFF_3"}; + const std::vector m_DspParams = {"COEFF_3", "COEFF_2", "COEFF_1", "COEFF_0"}; // Source DSP cell type (SISD) const std::string m_SisdDspType = "dsp_t1_10x9x32"; @@ -206,16 +206,18 @@ struct QlDspSimdPass : public Pass { simd->setPort(dport, sigspec); } - // Set parameters + // Concatenate FIR coefficient parameters into the single + // MODE_BITS parameter + std::vector mode_bits; for (const auto &it : m_DspParams) { auto val_a = dsp_a->getParam(RTLIL::escape_id(it)); auto val_b = dsp_b->getParam(RTLIL::escape_id(it)); - std::vector bits; - bits.insert(bits.end(), val_a.begin(), val_a.end()); - bits.insert(bits.end(), val_b.begin(), val_b.end()); - simd->setParam(RTLIL::escape_id(it), RTLIL::Const(bits)); + mode_bits.insert(mode_bits.end(), val_a.begin(), val_a.end()); + mode_bits.insert(mode_bits.end(), val_b.begin(), val_b.end()); } + simd->setParam(RTLIL::escape_id("MODE_BITS"), RTLIL::Const(mode_bits)); + log_assert(mode_bits.size() == 80); // Enable the fractured mode by connecting the control // port. diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index dff4af318..c669166d8 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1291,10 +1291,12 @@ module QL_DSP2 ( // TODO: Name subject to change input register_inputs ); - parameter [19:0] COEFF_0 = 20'd0; - parameter [19:0] COEFF_1 = 20'd0; - parameter [19:0] COEFF_2 = 20'd0; - parameter [19:0] COEFF_3 = 20'd0; + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; localparam NBITS_ACC = 64; localparam NBITS_A = 20; @@ -1689,10 +1691,7 @@ module dsp_t1_20x18x64 ( parameter [19:0] COEFF_3 = 20'd0; QL_DSP2 #( - .COEFF_0(COEFF_0), - .COEFF_1(COEFF_1), - .COEFF_2(COEFF_2), - .COEFF_3(COEFF_3) + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) ) dsp ( .a(a_i), .b(b_i), @@ -1753,10 +1752,10 @@ module dsp_t1_10x9x32 ( wire [8:0] dly_b_rem; QL_DSP2 #( - .COEFF_0({10'd0, COEFF_0}), - .COEFF_1({10'd0, COEFF_1}), - .COEFF_2({10'd0, COEFF_2}), - .COEFF_3({10'd0, COEFF_3}) + .MODE_BITS({10'd0, COEFF_3, + 10'd0, COEFF_2, + 10'd0, COEFF_1, + 10'd0, COEFF_0}) ) dsp ( .a({10'd0, a_i}), .b({9'd0, b_i}), diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index 6967a44f2..1c56eed90 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -43,10 +43,7 @@ module dsp_t1_20x18x64 ( parameter [19:0] COEFF_3 = 20'd0; QL_DSP2 # ( - .COEFF_0 (COEFF_0), - .COEFF_1 (COEFF_1), - .COEFF_2 (COEFF_2), - .COEFF_3 (COEFF_3) + .MODE_BITS ({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) ) _TECHMAP_REPLACE_ ( .a (a_i), .b (b_i), @@ -94,11 +91,7 @@ module dsp_t1_10x9x32 ( input [5:0] shift_right_i, input round_i, input subtract_i, - input register_inputs_i, - input [ 9:0] coeff_0_i, - input [ 9:0] coeff_1_i, - input [ 9:0] coeff_2_i, - input [ 9:0] coeff_3_i + input register_inputs_i ); parameter [9:0] COEFF_0 = 10'd0; @@ -110,10 +103,10 @@ module dsp_t1_10x9x32 ( wire [17:0] dly_b; QL_DSP2 # ( - .COEFF_0 ({10'd0, COEFF_0}), - .COEFF_1 ({10'd0, COEFF_1}), - .COEFF_2 ({10'd0, COEFF_2}), - .COEFF_3 ({10'd0, COEFF_3}) + .MODE_BITS ({10'd0, COEFF_3, + 10'd0, COEFF_2, + 10'd0, COEFF_1, + 10'd0, COEFF_0}) ) _TECHMAP_REPLACE_ ( .a ({10'd0, a_i}), .b ({ 9'd0, b_i}), From 5f4c08950f67d9a7cfa75d5c105f3550b0a0edab Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 12 Apr 2022 14:04:03 +0200 Subject: [PATCH 724/845] Aggregated all BRAM parameters into a single MODE_BITS parameter. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 207 ++++++++------------------- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 55 +++---- 2 files changed, 88 insertions(+), 174 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index 4df5ec28e..798ebbe0e 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -93,91 +93,63 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 1: begin assign PORT_A_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 15'd0); assign PORT_B_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 15'd0); - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_1; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_1; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_1; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_1; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_1; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_1; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_1; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_1; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0 + }; end 2: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 1) : (B1EN ? (B1ADDR_TOTAL << 1) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 1) : (D1EN ? (D1ADDR_TOTAL << 1) : 15'd0); - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_2; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_2; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_2; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_2; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_2; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_2; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_2; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_2; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0 + }; end 4: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 2) : (B1EN ? (B1ADDR_TOTAL << 2) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 2) : (D1EN ? (D1ADDR_TOTAL << 2) : 15'd0); - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_4; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_4; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_4; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_4; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_4; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_4; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_4; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_4; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0 + }; end 8, 9: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 3) : (B1EN ? (B1ADDR_TOTAL << 3) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 3) : (D1EN ? (D1ADDR_TOTAL << 3) : 15'd0); - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_9; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_9; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_9; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_9; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_9; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_9; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_9; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_9; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0 + }; end 16, 18: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 4) : (B1EN ? (B1ADDR_TOTAL << 4) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 4) : (D1EN ? (D1ADDR_TOTAL << 4) : 15'd0); - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_18; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_18; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_18; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_18; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_18; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_18; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_18; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_18; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0 + }; end 32, 36: begin assign PORT_A_ADDR = A1EN ? (A1ADDR_TOTAL << 5) : (B1EN ? (B1ADDR_TOTAL << 5) : 15'd0); assign PORT_B_ADDR = C1EN ? (C1ADDR_TOTAL << 5) : (D1EN ? (D1ADDR_TOTAL << 5) : 15'd0); - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0 + }; end default: begin assign PORT_A_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 15'd0); assign PORT_B_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 15'd0); - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0 + }; end endcase @@ -195,23 +167,7 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 assign PL_ADDR_i = 24'b0; assign PL_DATA_i = 36'b0; - TDP_BRAM36 #( - .UPAE1_i(12'd10), - .UPAF1_i(12'd10), - .UPAE2_i(12'd10), - .UPAF2_i(12'd10), - .SYNC_FIFO1_i(1'b0), - .SYNC_FIFO2_i(1'b0), - .FMODE1_i(1'b0), - .FMODE2_i(1'b0), - .POWERDN1_i(1'b0), - .POWERDN2_i(1'b0), - .SLEEP1_i(1'b0), - .SLEEP2_i(1'b0), - .PROTECT1_i(1'b0), - .PROTECT2_i(1'b0), - .SPLIT_i(1'b0) - ) _TECHMAP_REPLACE_ ( + TDP_BRAM36 _TECHMAP_REPLACE_ ( .WDATA_A1_i(B1DATA[17:0]), .WDATA_A2_i(B1DATA[35:18]), .RDATA_A1_o(A1DATA_TOTAL[17:0]), @@ -444,9 +400,6 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA reg [23:0] PL_ADDR_o; wire [35:0] PL_DATA_o; - wire [2:0] WMODE; - wire [2:0] RMODE; - assign A1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; assign B1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; @@ -460,89 +413,61 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA 1: begin assign A1ADDR_15 = A1ADDR_TOTAL; assign B1ADDR_15 = B1ADDR_TOTAL; - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_1; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_1; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_1; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_1; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_1; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_1; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_1; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_1; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0 + }; end 2: begin assign A1ADDR_15 = A1ADDR_TOTAL << 1; assign B1ADDR_15 = B1ADDR_TOTAL << 1; - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_2; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_2; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_2; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_2; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_2; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_2; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_2; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_2; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0 + }; end 4: begin assign A1ADDR_15 = A1ADDR_TOTAL << 2; assign B1ADDR_15 = B1ADDR_TOTAL << 2; - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_4; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_4; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_4; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_4; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_4; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_4; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_4; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_4; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0 + }; end 8, 9: begin assign A1ADDR_15 = A1ADDR_TOTAL << 3; assign B1ADDR_15 = B1ADDR_TOTAL << 3; - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_9; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_9; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_9; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_9; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_9; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_9; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_9; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_9; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0 + }; end 16, 18: begin assign A1ADDR_15 = A1ADDR_TOTAL << 4; assign B1ADDR_15 = B1ADDR_TOTAL << 4; - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_18; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_18; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_18; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_18; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_18; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_18; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_18; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_18; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0 + }; end 32, 36: begin assign A1ADDR_15 = A1ADDR_TOTAL << 5; assign B1ADDR_15 = B1ADDR_TOTAL << 5; - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0 + }; end default: begin assign A1ADDR_15 = A1ADDR_TOTAL; assign B1ADDR_15 = B1ADDR_TOTAL; - defparam _TECHMAP_REPLACE_.WMODE_A1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_A2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_A1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_A2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_B1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.WMODE_B2_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_B1_i = `MODE_36; - defparam _TECHMAP_REPLACE_.RMODE_B2_i = `MODE_36; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0 + }; end endcase @@ -558,23 +483,7 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA assign PL_ADDR_i = 24'b0; assign PL_DATA_i = 36'b0; - TDP_BRAM36 #( - .UPAE1_i(12'd10), - .UPAF1_i(12'd10), - .UPAE2_i(12'd10), - .UPAF2_i(12'd10), - .SYNC_FIFO1_i(1'b0), - .SYNC_FIFO2_i(1'b0), - .FMODE1_i(1'b0), - .FMODE2_i(1'b0), - .POWERDN1_i(1'b0), - .POWERDN2_i(1'b0), - .SLEEP1_i(1'b0), - .SLEEP2_i(1'b0), - .PROTECT1_i(1'b0), - .PROTECT2_i(1'b0), - .SPLIT_i(1'b0) - ) _TECHMAP_REPLACE_ ( + TDP_BRAM36 _TECHMAP_REPLACE_ ( .WDATA_A1_i(18'h3FFFF), .WDATA_A2_i(18'h3FFFF), .RDATA_A1_o(A1DATA_TOTAL[17:0]), diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index c669166d8..6c85937e1 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -542,31 +542,36 @@ module TDP_BRAM36 ( PL_ADDR_o, PL_DATA_o ); - parameter SYNC_FIFO1_i = 1'b0; - parameter RMODE_A1_i = 3'b0; - parameter RMODE_B1_i = 3'b0; - parameter WMODE_A1_i = 3'b0; - parameter WMODE_B1_i = 3'b0; - parameter FMODE1_i = 1'b0; - parameter POWERDN1_i = 1'b0; - parameter SLEEP1_i = 1'b0; - parameter PROTECT1_i = 1'b0; - parameter UPAE1_i = 12'b0; - parameter UPAF1_i = 12'b0; - - parameter SYNC_FIFO2_i = 1'b0; - parameter RMODE_A2_i = 3'b0; - parameter RMODE_B2_i = 3'b0; - parameter WMODE_A2_i = 3'b0; - parameter WMODE_B2_i = 3'b0; - parameter FMODE2_i = 1'b0; - parameter POWERDN2_i = 1'b0; - parameter SLEEP2_i = 1'b0; - parameter PROTECT2_i = 1'b0; - parameter UPAE2_i = 12'b0; - parameter UPAF2_i = 12'b0; - - parameter SPLIT_i = 1'b0; + parameter [80:0] MODE_BITS = 81'd0; + + // First 18K RAMFIFO (41 bits) + localparam [ 0:0] SYNC_FIFO1_i = MODE_BITS[0]; + localparam [ 2:0] RMODE_A1_i = MODE_BITS[3 : 1]; + localparam [ 2:0] RMODE_B1_i = MODE_BITS[6 : 4]; + localparam [ 2:0] WMODE_A1_i = MODE_BITS[9 : 7]; + localparam [ 2:0] WMODE_B1_i = MODE_BITS[12:10]; + localparam [ 0:0] FMODE1_i = MODE_BITS[13]; + localparam [ 0:0] POWERDN1_i = MODE_BITS[14]; + localparam [ 0:0] SLEEP1_i = MODE_BITS[15]; + localparam [ 0:0] PROTECT1_i = MODE_BITS[16]; + localparam [11:0] UPAE1_i = MODE_BITS[28:17]; + localparam [11:0] UPAF1_i = MODE_BITS[40:29]; + + // Second 18K RAMFIFO (39 bits) + localparam [ 0:0] SYNC_FIFO2_i = MODE_BITS[41]; + localparam [ 0:0] RMODE_A2_i = MODE_BITS[44:42]; + localparam [ 0:0] RMODE_B2_i = MODE_BITS[47:45]; + localparam [ 0:0] WMODE_A2_i = MODE_BITS[50:48]; + localparam [ 0:0] WMODE_B2_i = MODE_BITS[53:51]; + localparam [ 0:0] FMODE2_i = MODE_BITS[54]; + localparam [ 0:0] POWERDN2_i = MODE_BITS[55]; + localparam [ 0:0] SLEEP2_i = MODE_BITS[56]; + localparam [ 0:0] PROTECT2_i = MODE_BITS[57]; + localparam [10:0] UPAE2_i = MODE_BITS[68:58]; + localparam [10:0] UPAF2_i = MODE_BITS[79:69]; + + // Split (1 bit) + localparam [ 0:0] SPLIT_i = MODE_BITS[80]; parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; From dce1529588347b9bfe4f7382e166dd413ca13ed9 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 13 Apr 2022 09:45:53 +0200 Subject: [PATCH 725/845] Fixed incorrect acc_fir_i port width. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 284f102b9..9e502b9be 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1651,7 +1651,7 @@ endmodule module dsp_t1_20x18x64 ( input [19:0] a_i, input [17:0] b_i, - input [ 3:0] acc_fir_i, + input [ 5:0] acc_fir_i, output [37:0] z_o, output [17:0] dly_b_o, @@ -1712,7 +1712,7 @@ endmodule module dsp_t1_10x9x32 ( input [ 9:0] a_i, input [ 8:0] b_i, - input [ 1:0] acc_fir_i, + input [ 5:0] acc_fir_i, output [18:0] z_o, output [ 8:0] dly_b_o, @@ -1754,7 +1754,7 @@ module dsp_t1_10x9x32 ( .f_mode(1'b1), // 10x9x32 DSP - .acc_fir({2'd0, acc_fir_i}), + .acc_fir(acc_fir_i), .feedback(feedback_i), .load_acc(load_acc_i), From ccd5cc5017ec4388360addc1747ae1635fca3eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Tue, 15 Mar 2022 14:32:59 +0100 Subject: [PATCH 726/845] ql-qlf: update sim modules and techmaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ql-qlf: apply license ql-qlf: apply clkbuf sink attributes ql-qlf: TDP36K: s/\t/ / ql-qlf: replace uram module with sram1024x18 ql-qlf: change ram_mode and fifo_mode from regs back to wires ql-qlf: bram sim: remove PL_ signals ql-qlf: bram sim: remove SCAN_ signals ql-qlf: k6n10f: sim: remove RAM_ID signal Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/Makefile | 2 +- ql-qlf-plugin/qlf_k6n10f/TDP18K_FIFO.v | 341 ++++++++++++++++ ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v | 363 ----------------- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 105 +---- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 451 +++++++++------------- ql-qlf-plugin/qlf_k6n10f/sram1024x18.v | 2 + ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v | 222 +++++------ 7 files changed, 637 insertions(+), 849 deletions(-) create mode 100644 ql-qlf-plugin/qlf_k6n10f/TDP18K_FIFO.v delete mode 100644 ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 30200bf93..67a58e6a1 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -49,7 +49,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10F_DIR)/brams.txt \ $(QLF_K6N10F_DIR)/cells_sim.v \ $(QLF_K6N10F_DIR)/sram1024x18.v \ - $(QLF_K6N10F_DIR)/TDP18Kx18_FIFO.v \ + $(QLF_K6N10F_DIR)/TDP18K_FIFO.v \ $(QLF_K6N10F_DIR)/ufifo_ctl.v \ $(QLF_K6N10F_DIR)/ffs_map.v \ $(QLF_K6N10F_DIR)/dsp_map.v \ diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18K_FIFO.v b/ql-qlf-plugin/qlf_k6n10f/TDP18K_FIFO.v new file mode 100644 index 000000000..41792686e --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/TDP18K_FIFO.v @@ -0,0 +1,341 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`default_nettype wire +module TDP18K_FIFO ( + RMODE_A_i, + RMODE_B_i, + WMODE_A_i, + WMODE_B_i, + WEN_A_i, + WEN_B_i, + REN_A_i, + REN_B_i, + CLK_A_i, + CLK_B_i, + BE_A_i, + BE_B_i, + ADDR_A_i, + ADDR_B_i, + WDATA_A_i, + WDATA_B_i, + RDATA_A_o, + RDATA_B_o, + EMPTY_o, + EPO_o, + EWM_o, + UNDERRUN_o, + FULL_o, + FMO_o, + FWM_o, + OVERRUN_o, + FLUSH_ni, + FMODE_i, +); + parameter SYNC_FIFO_i = 1'b0; + parameter POWERDN_i = 1'b0; + parameter SLEEP_i = 1'b0; + parameter PROTECT_i = 1'b0; + parameter UPAF_i = 11'b0; + parameter UPAE_i = 11'b0; + + input wire [2:0] RMODE_A_i; + input wire [2:0] RMODE_B_i; + input wire [2:0] WMODE_A_i; + input wire [2:0] WMODE_B_i; + input wire WEN_A_i; + input wire WEN_B_i; + input wire REN_A_i; + input wire REN_B_i; + (* clkbuf_sink *) + input wire CLK_A_i; + (* clkbuf_sink *) + input wire CLK_B_i; + input wire [1:0] BE_A_i; + input wire [1:0] BE_B_i; + input wire [13:0] ADDR_A_i; + input wire [13:0] ADDR_B_i; + input wire [17:0] WDATA_A_i; + input wire [17:0] WDATA_B_i; + output reg [17:0] RDATA_A_o; + output reg [17:0] RDATA_B_o; + output wire EMPTY_o; + output wire EPO_o; + output wire EWM_o; + output wire UNDERRUN_o; + output wire FULL_o; + output wire FMO_o; + output wire FWM_o; + output wire OVERRUN_o; + input wire FLUSH_ni; + input wire FMODE_i; + reg [17:0] wmsk_a; + reg [17:0] wmsk_b; + wire [8:0] addr_a; + wire [8:0] addr_b; + reg [4:0] addr_a_d; + reg [4:0] addr_b_d; + wire [17:0] ram_rdata_a; + wire [17:0] ram_rdata_b; + reg [17:0] aligned_wdata_a; + reg [17:0] aligned_wdata_b; + wire ren_o; + wire [10:0] ff_raddr; + wire [10:0] ff_waddr; + wire [13:0] ram_addr_a; + wire [13:0] ram_addr_b; + wire [3:0] ram_waddr_a; + wire [3:0] ram_waddr_b; + wire initn; + wire smux_rclk; + wire smux_wclk; + wire real_fmode; + wire [3:0] raw_fflags; + reg [1:0] fifo_rmode; + reg [1:0] fifo_wmode; + wire smux_clk_a; + wire smux_clk_b; + wire ram_ren_a; + wire ram_ren_b; + wire ram_wen_a; + wire ram_wen_b; + wire cen_a; + wire cen_b; + wire cen_a_n; + wire cen_b_n; + wire ram_wen_a_n; + wire ram_wen_b_n; + localparam MODE_9 = 3'b001; + always @(*) begin + fifo_rmode = (RMODE_B_i == MODE_9 ? 2'b10 : 2'b01); + fifo_wmode = (WMODE_A_i == MODE_9 ? 2'b10 : 2'b01); + end + assign smux_clk_a = CLK_A_i; + assign smux_clk_b = CLK_B_i; + assign real_fmode = FMODE_i; + assign ram_ren_b = real_fmode ? ren_o : REN_B_i; + assign ram_wen_a = FMODE_i ? ~FULL_o & WEN_A_i : WEN_A_i; + assign ram_ren_a = FMODE_i ? 0 : REN_A_i; + assign ram_wen_b = FMODE_i ? 1'b0 : WEN_B_i; + assign cen_b = ram_ren_b | ram_wen_b; + assign cen_a = ram_ren_a | ram_wen_a; + assign ram_waddr_b = real_fmode ? {ff_raddr[0], 3'b000} : ADDR_B_i[3:0]; + assign ram_waddr_a = real_fmode ? {ff_waddr[0], 3'b000} : ADDR_A_i[3:0]; + assign ram_addr_b = real_fmode ? {ff_raddr[10:0], 3'h0} : {ADDR_B_i[13:4], addr_b_d[3:0]}; + assign ram_addr_a = real_fmode ? {ff_waddr[10:0], 3'h0} : {ADDR_A_i[13:4], addr_a_d[3:0]}; + always @(posedge CLK_A_i) addr_a_d[3:0] <= ADDR_A_i[3:0]; + always @(posedge CLK_B_i) addr_b_d[3:0] <= ADDR_B_i[3:0]; + assign cen_a_n = ~cen_a; + assign ram_wen_a_n = ~ram_wen_a; + assign cen_b_n = ~cen_b; + assign ram_wen_b_n = ~ram_wen_b; + + sram1024x18 uram( + .clk_a(smux_clk_a), + .cen_a(cen_a_n), + .wen_a(ram_wen_a_n), + .addr_a(ram_addr_a[13:4]), + .wmsk_a(wmsk_a), + .wdata_a(aligned_wdata_a), + .rdata_a(ram_rdata_a), + .clk_b(smux_clk_b), + .cen_b(cen_b_n), + .wen_b(ram_wen_b_n), + .addr_b(ram_addr_b[13:4]), + .wmsk_b(wmsk_b), + .wdata_b(aligned_wdata_b), + .rdata_b(ram_rdata_b) + ); + fifo_ctl #( + .ADDR_WIDTH(11), + .FIFO_WIDTH(2), + .DEPTH(6) + ) fifo_ctl( + .rclk(smux_clk_b), + .rst_R_n(FLUSH_ni), + .wclk(smux_clk_a), + .rst_W_n(FLUSH_ni), + .ren(REN_B_i), + .wen(ram_wen_a), + .sync(SYNC_FIFO_i), + .rmode(fifo_rmode), + .wmode(fifo_wmode), + .ren_o(ren_o), + .fflags({FULL_o, FMO_o, FWM_o, OVERRUN_o, EMPTY_o, EPO_o, EWM_o, UNDERRUN_o}), + .raddr(ff_raddr), + .waddr(ff_waddr), + .upaf(UPAF_i), + .upae(UPAE_i) + ); + localparam MODE_1 = 3'b101; + localparam MODE_18 = 3'b010; + localparam MODE_2 = 3'b110; + localparam MODE_4 = 3'b100; + always @(*) begin : WDATA_MODE_SEL + if (ram_wen_a == 1) begin + case (WMODE_A_i) + MODE_18: begin + aligned_wdata_a = WDATA_A_i; + {wmsk_a[17], wmsk_a[15:8]} = (FMODE_i ? 9'h000 : (BE_A_i[1] ? 9'h000 : 9'h1ff)); + {wmsk_a[16], wmsk_a[7:0]} = (FMODE_i ? 9'h000 : (BE_A_i[0] ? 9'h000 : 9'h1ff)); + end + MODE_9: begin + aligned_wdata_a = {{2 {WDATA_A_i[16]}}, {2 {WDATA_A_i[7:0]}}}; + {wmsk_a[17], wmsk_a[15:8]} = (ram_waddr_a[3] ? 9'h000 : 9'h1ff); + {wmsk_a[16], wmsk_a[7:0]} = (ram_waddr_a[3] ? 9'h1ff : 9'h000); + end + MODE_4: begin + aligned_wdata_a = {2'b00, {4 {WDATA_A_i[3:0]}}}; + wmsk_a[17:16] = 2'b00; + wmsk_a[15:12] = (ram_waddr_a[3:2] == 2'b11 ? 4'h0 : 4'hf); + wmsk_a[11:8] = (ram_waddr_a[3:2] == 2'b10 ? 4'h0 : 4'hf); + wmsk_a[7:4] = (ram_waddr_a[3:2] == 2'b01 ? 4'h0 : 4'hf); + wmsk_a[3:0] = (ram_waddr_a[3:2] == 2'b00 ? 4'h0 : 4'hf); + end + MODE_2: begin + aligned_wdata_a = {2'b00, {8 {WDATA_A_i[1:0]}}}; + wmsk_a[17:16] = 2'b00; + wmsk_a[15:14] = (ram_waddr_a[3:1] == 3'b111 ? 2'h0 : 2'h3); + wmsk_a[13:12] = (ram_waddr_a[3:1] == 3'b110 ? 2'h0 : 2'h3); + wmsk_a[11:10] = (ram_waddr_a[3:1] == 3'b101 ? 2'h0 : 2'h3); + wmsk_a[9:8] = (ram_waddr_a[3:1] == 3'b100 ? 2'h0 : 2'h3); + wmsk_a[7:6] = (ram_waddr_a[3:1] == 3'b011 ? 2'h0 : 2'h3); + wmsk_a[5:4] = (ram_waddr_a[3:1] == 3'b010 ? 2'h0 : 2'h3); + wmsk_a[3:2] = (ram_waddr_a[3:1] == 3'b001 ? 2'h0 : 2'h3); + wmsk_a[1:0] = (ram_waddr_a[3:1] == 3'b000 ? 2'h0 : 2'h3); + end + MODE_1: begin + aligned_wdata_a = {2'b00, {16 {WDATA_A_i[0]}}}; + wmsk_a = 18'h0ffff; + wmsk_a[{1'b0, ram_waddr_a[3:0]}] = 0; + end + default: wmsk_a = 18'h3ffff; + endcase + end + else begin + aligned_wdata_a = 18'h00000; + wmsk_a = 18'h3ffff; + end + if (ram_wen_b == 1) + case (WMODE_B_i) + MODE_18: begin + aligned_wdata_b = WDATA_B_i; + {wmsk_b[17], wmsk_b[15:8]} = (BE_B_i[1] ? 9'h000 : 9'h1ff); + {wmsk_b[16], wmsk_b[7:0]} = (BE_B_i[0] ? 9'h000 : 9'h1ff); + end + MODE_9: begin + aligned_wdata_b = {{2 {WDATA_B_i[16]}}, {2 {WDATA_B_i[7:0]}}}; + {wmsk_b[17], wmsk_b[15:8]} = (ram_waddr_b[3] ? 9'h000 : 9'h1ff); + {wmsk_b[16], wmsk_b[7:0]} = (ram_waddr_b[3] ? 9'h1ff : 9'h000); + end + MODE_4: begin + aligned_wdata_b = {2'b00, {4 {WDATA_B_i[3:0]}}}; + wmsk_b[17:16] = 2'b00; + wmsk_b[15:12] = (ram_waddr_b[3:2] == 2'b11 ? 4'h0 : 4'hf); + wmsk_b[11:8] = (ram_waddr_b[3:2] == 2'b10 ? 4'h0 : 4'hf); + wmsk_b[7:4] = (ram_waddr_b[3:2] == 2'b01 ? 4'h0 : 4'hf); + wmsk_b[3:0] = (ram_waddr_b[3:2] == 2'b00 ? 4'h0 : 4'hf); + end + MODE_2: begin + aligned_wdata_b = {2'b00, {8 {WDATA_B_i[1:0]}}}; + wmsk_b[17:16] = 2'b00; + wmsk_b[15:14] = (ram_waddr_b[3:1] == 3'b111 ? 2'h0 : 2'h3); + wmsk_b[13:12] = (ram_waddr_b[3:1] == 3'b110 ? 2'h0 : 2'h3); + wmsk_b[11:10] = (ram_waddr_b[3:1] == 3'b101 ? 2'h0 : 2'h3); + wmsk_b[9:8] = (ram_waddr_b[3:1] == 3'b100 ? 2'h0 : 2'h3); + wmsk_b[7:6] = (ram_waddr_b[3:1] == 3'b011 ? 2'h0 : 2'h3); + wmsk_b[5:4] = (ram_waddr_b[3:1] == 3'b010 ? 2'h0 : 2'h3); + wmsk_b[3:2] = (ram_waddr_b[3:1] == 3'b001 ? 2'h0 : 2'h3); + wmsk_b[1:0] = (ram_waddr_b[3:1] == 3'b000 ? 2'h0 : 2'h3); + end + MODE_1: begin + aligned_wdata_b = {2'b00, {16 {WDATA_B_i[0]}}}; + wmsk_b = 18'h0ffff; + wmsk_b[{1'b0, ram_waddr_b[3:0]}] = 0; + end + default: wmsk_b = 18'h3ffff; + endcase + else begin + aligned_wdata_b = 18'b000000000000000000; + wmsk_b = 18'h3ffff; + end + end + always @(*) begin : RDATA_A_MODE_SEL + case (RMODE_A_i) + default: RDATA_A_o = 18'h00000; + MODE_18: RDATA_A_o = ram_rdata_a; + MODE_9: begin + {RDATA_A_o[17], RDATA_A_o[15:8]} = 9'h000; + {RDATA_A_o[16], RDATA_A_o[7:0]} = (ram_addr_a[3] ? {ram_rdata_a[17], ram_rdata_a[15:8]} : {ram_rdata_a[16], ram_rdata_a[7:0]}); + end + MODE_4: begin + RDATA_A_o[17:4] = 14'h0000; + case (ram_addr_a[3:2]) + 3: RDATA_A_o[3:0] = ram_rdata_a[15:12]; + 2: RDATA_A_o[3:0] = ram_rdata_a[11:8]; + 1: RDATA_A_o[3:0] = ram_rdata_a[7:4]; + 0: RDATA_A_o[3:0] = ram_rdata_a[3:0]; + endcase + end + MODE_2: begin + RDATA_A_o[17:2] = 16'h0000; + case (ram_addr_a[3:1]) + 7: RDATA_A_o[1:0] = ram_rdata_a[15:14]; + 6: RDATA_A_o[1:0] = ram_rdata_a[13:12]; + 5: RDATA_A_o[1:0] = ram_rdata_a[11:10]; + 4: RDATA_A_o[1:0] = ram_rdata_a[9:8]; + 3: RDATA_A_o[1:0] = ram_rdata_a[7:6]; + 2: RDATA_A_o[1:0] = ram_rdata_a[5:4]; + 1: RDATA_A_o[1:0] = ram_rdata_a[3:2]; + 0: RDATA_A_o[1:0] = ram_rdata_a[1:0]; + endcase + end + MODE_1: begin + RDATA_A_o[17:1] = 17'h00000; + RDATA_A_o[0] = ram_rdata_a[ram_addr_a[3:0]]; + end + endcase + end + always @(*) + case (RMODE_B_i) + default: RDATA_B_o = 18'h15566; + MODE_18: RDATA_B_o = ram_rdata_b; + MODE_9: begin + {RDATA_B_o[17], RDATA_B_o[15:8]} = 9'b000000000; + {RDATA_B_o[16], RDATA_B_o[7:0]} = (ram_addr_b[3] ? {ram_rdata_b[17], ram_rdata_b[15:8]} : {ram_rdata_b[16], ram_rdata_b[7:0]}); + end + MODE_4: + case (ram_addr_b[3:2]) + 3: RDATA_B_o[3:0] = ram_rdata_b[15:12]; + 2: RDATA_B_o[3:0] = ram_rdata_b[11:8]; + 1: RDATA_B_o[3:0] = ram_rdata_b[7:4]; + 0: RDATA_B_o[3:0] = ram_rdata_b[3:0]; + endcase + MODE_2: + case (ram_addr_b[3:1]) + 7: RDATA_B_o[1:0] = ram_rdata_b[15:14]; + 6: RDATA_B_o[1:0] = ram_rdata_b[13:12]; + 5: RDATA_B_o[1:0] = ram_rdata_b[11:10]; + 4: RDATA_B_o[1:0] = ram_rdata_b[9:8]; + 3: RDATA_B_o[1:0] = ram_rdata_b[7:6]; + 2: RDATA_B_o[1:0] = ram_rdata_b[5:4]; + 1: RDATA_B_o[1:0] = ram_rdata_b[3:2]; + 0: RDATA_B_o[1:0] = ram_rdata_b[1:0]; + endcase + MODE_1: RDATA_B_o[0] = ram_rdata_b[{1'b0, ram_addr_b[3:0]}]; + endcase +endmodule +`default_nettype none diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v b/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v deleted file mode 100644 index a68e88e89..000000000 --- a/ql-qlf-plugin/qlf_k6n10f/TDP18Kx18_FIFO.v +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright 2020-2022 F4PGA Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// SPDX-License-Identifier: Apache-2.0 - -module TDP18K_FIFO ( - RMODE_A, - RMODE_B, - WMODE_A, - WMODE_B, - WEN_A, - WEN_B, - REN_A, - REN_B, - CLK_A, - CLK_B, - BE_A, - BE_B, - ADDR_A, - ADDR_B, - WDATA_A, - WDATA_B, - RDATA_A, - RDATA_B, - EMPTY, - EPO, - EWM, - UNDERRUN, - FULL, - FMO, - FWM, - OVERRUN, - FLUSH, - RAM_ID, - FMODE, - PL_INIT, - PL_ENA, - PL_WEN, - PL_REN, - PL_CLK, - PL_ADDR, - PL_DATA_IN, - PL_DATA_OUT -); - parameter SYNC_FIFO = 1'b0; - parameter POWERDN = 1'b0; - parameter SLEEP = 1'b0; - parameter PROTECT = 1'b0; - parameter UPAF = 11'b0; - parameter UPAE = 11'b0; - - input wire [2:0] RMODE_A; - input wire [2:0] RMODE_B; - input wire [2:0] WMODE_A; - input wire [2:0] WMODE_B; - input wire WEN_A; - input wire WEN_B; - input wire REN_A; - input wire REN_B; - (* clkbuf_sink *) - input wire CLK_A; - (* clkbuf_sink *) - input wire CLK_B; - input wire [1:0] BE_A; - input wire [1:0] BE_B; - input wire [13:0] ADDR_A; - input wire [13:0] ADDR_B; - input wire [17:0] WDATA_A; - input wire [17:0] WDATA_B; - output reg [17:0] RDATA_A; - output reg [17:0] RDATA_B; - output wire EMPTY; - output wire EPO; - output wire EWM; - output wire UNDERRUN; - output wire FULL; - output wire FMO; - output wire FWM; - output wire OVERRUN; - input wire FLUSH; - input wire [15:0] RAM_ID; - input wire FMODE; - input PL_INIT; - input PL_ENA; - input PL_WEN; - input PL_REN; - input PL_CLK; - input [31:0] PL_ADDR; - input [17:0] PL_DATA_IN; - output reg [17:0] PL_DATA_OUT; - reg [17:0] wmsk_a; - reg [17:0] wmsk_b; - wire [8:0] addr_a; - wire [8:0] addr_b; - reg [4:0] addr_a_d; - reg [4:0] addr_b_d; - wire [17:0] ram_rdata_a; - wire [17:0] ram_rdata_b; - reg [17:0] aligned_wdata_a; - reg [17:0] aligned_wdata_b; - wire ren_o; - wire [10:0] ff_raddr; - wire [10:0] ff_waddr; - wire [13:0] ram_addr_a; - wire [13:0] ram_addr_b; - wire [3:0] ram_waddr_a; - wire [3:0] ram_waddr_b; - wire preload; - wire my_id; - wire initn; - wire smux_rclk; - wire smux_wclk; - wire real_fmode; - wire [3:0] raw_fflags; - reg [1:0] fifo_rmode; - reg [1:0] fifo_wmode; - wire smux_clk_a; - wire smux_clk_b; - wire ram_ren_a; - wire ram_ren_b; - wire ram_wen_a; - wire ram_wen_b; - wire cen_a; - wire cen_b; - localparam MODE_9 = 3'b101; - always @(*) begin - fifo_rmode = (RMODE_B == MODE_9 ? 2'b10 : 2'b01); - fifo_wmode = (WMODE_A == MODE_9 ? 2'b10 : 2'b01); - end - assign my_id = (PL_ADDR[31:16] == RAM_ID) | PL_INIT; - assign preload = (PROTECT ? 1'b0 : my_id & PL_ENA); - assign smux_clk_a = (preload ? PL_CLK : CLK_A); - assign smux_clk_b = (preload ? 0 : (FMODE ? (SYNC_FIFO ? CLK_A : CLK_B) : CLK_B)); - assign real_fmode = (preload ? 1'b0 : FMODE); - assign ram_ren_b = (preload ? PL_REN : (real_fmode ? ren_o : REN_B)); - assign ram_wen_a = (preload ? PL_WEN : (FMODE ? ~FULL & WEN_A : WEN_A)); - assign ram_ren_a = (preload ? 1'b1 : (FMODE ? 0 : REN_A)); - assign ram_wen_b = (preload ? 1'b1 : (FMODE ? 1'b0 : WEN_B)); - assign cen_b = ram_ren_b | ram_wen_b; - assign cen_a = ram_ren_a | ram_wen_a; - assign ram_waddr_b = (preload ? 4'b0000 : (real_fmode ? {ff_raddr[0], 3'b000} : ADDR_B[3:0])); - assign ram_waddr_a = (preload ? 4'b0000 : (real_fmode ? {ff_waddr[0], 3'b000} : ADDR_A[3:0])); - assign ram_addr_b = (preload ? {PL_ADDR[10:0], 3'h0} : (real_fmode ? {ff_raddr[10:0], 3'h0} : {ADDR_B[13:4], addr_b_d[3:0]})); - assign ram_addr_a = (preload ? {PL_ADDR[10:0], 3'h0} : (real_fmode ? {ff_waddr[10:0], 3'b000} : {ADDR_A[13:4], addr_a_d[3:0]})); - always @(posedge CLK_A) addr_a_d[3:0] <= ADDR_A[3:0]; - always @(posedge CLK_B) addr_b_d[3:0] <= ADDR_B[3:0]; - sram1024x18 uram( - .clk_a(smux_clk_a), - .cen_a(~cen_a), - .wen_a(~ram_wen_a), - .addr_a(ram_addr_a[13:4]), - .wmsk_a(wmsk_a), - .wdata_a(aligned_wdata_a), - .rdata_a(ram_rdata_a), - .clk_b(smux_clk_b), - .cen_b(~cen_b), - .wen_b(~ram_wen_b), - .addr_b(ram_addr_b[13:4]), - .wmsk_b(wmsk_b), - .wdata_b(aligned_wdata_b), - .rdata_b(ram_rdata_b) - ); - fifo_ctl #( - .ADDR_WIDTH(11), - .FIFO_WIDTH(2) - ) fifo_ctl( - .rclk(smux_clk_b), - .rst_R_n(~FLUSH), - .wclk(smux_clk_a), - .rst_W_n(~FLUSH), - .ren(REN_B), - .wen(ram_wen_a), - .depth(3'b000), - .sync(SYNC_FIFO), - .rmode(fifo_rmode), - .wmode(fifo_wmode), - .ren_o(ren_o), - .fflags({FULL, FMO, FWM, OVERRUN, EMPTY, EPO, EWM, UNDERRUN}), - .raddr(ff_raddr), - .waddr(ff_waddr), - .upaf(UPAF), - .upae(UPAE) - ); - always @(*) begin : PRELOAD_DATA - if (preload & ram_ren_a) - PL_DATA_OUT = ram_rdata_a; - else - PL_DATA_OUT = PL_DATA_IN; - end - localparam MODE_1 = 3'b001; - localparam MODE_18 = 3'b110; - localparam MODE_2 = 3'b010; - localparam MODE_4 = 3'b100; - always @(*) begin : WDATA_MODE_SEL - if (ram_wen_a == 1) begin - if (preload) begin - aligned_wdata_a = PL_DATA_IN; - wmsk_a = 18'h00000; - end - else - case (WMODE_A) - MODE_18: begin - aligned_wdata_a = WDATA_A; - {wmsk_a[17], wmsk_a[15:8]} = (FMODE ? 9'h000 : (BE_A[1] ? 9'h000 : 9'h1ff)); - {wmsk_a[16], wmsk_a[7:0]} = (FMODE ? 9'h000 : (BE_A[0] ? 9'h000 : 9'h1ff)); - end - MODE_9: begin - aligned_wdata_a = {{2 {WDATA_A[8]}}, {2 {WDATA_A[7:0]}}}; - {wmsk_a[17], wmsk_a[15:8]} = (ram_waddr_a[3] ? 9'h000 : 9'h1ff); - {wmsk_a[16], wmsk_a[7:0]} = (ram_waddr_a[3] ? 9'h1ff : 9'h000); - end - MODE_4: begin - aligned_wdata_a = {2'b00, {4 {WDATA_A[3:0]}}}; - wmsk_a[17:16] = 2'b11; - wmsk_a[15:12] = (ram_waddr_a[3:2] == 2'b11 ? 4'h0 : 4'hf); - wmsk_a[11:8] = (ram_waddr_a[3:2] == 2'b10 ? 4'h0 : 4'hf); - wmsk_a[7:4] = (ram_waddr_a[3:2] == 2'b01 ? 4'h0 : 4'hf); - wmsk_a[3:0] = (ram_waddr_a[3:2] == 2'b00 ? 4'h0 : 4'hf); - end - MODE_2: begin - aligned_wdata_a = {2'b00, {8 {WDATA_A[1:0]}}}; - wmsk_a[17:16] = 2'b11; - wmsk_a[15:14] = (ram_waddr_a[3:1] == 3'b111 ? 2'h0 : 2'h3); - wmsk_a[13:12] = (ram_waddr_a[3:1] == 3'b110 ? 2'h0 : 2'h3); - wmsk_a[11:10] = (ram_waddr_a[3:1] == 3'b101 ? 2'h0 : 2'h3); - wmsk_a[9:8] = (ram_waddr_a[3:1] == 3'b100 ? 2'h0 : 2'h3); - wmsk_a[7:6] = (ram_waddr_a[3:1] == 3'b011 ? 2'h0 : 2'h3); - wmsk_a[5:4] = (ram_waddr_a[3:1] == 3'b010 ? 2'h0 : 2'h3); - wmsk_a[3:2] = (ram_waddr_a[3:1] == 3'b001 ? 2'h0 : 2'h3); - wmsk_a[1:0] = (ram_waddr_a[3:1] == 3'b000 ? 2'h0 : 2'h3); - end - MODE_1: begin - aligned_wdata_a = {2'b00, {16 {WDATA_A[0]}}}; - wmsk_a = 18'h3ffff; - wmsk_a[{1'b0, ram_waddr_a[3:0]}] = 0; - end - default: wmsk_a = 18'h3ffff; - endcase - end - else begin - aligned_wdata_a = 18'h00000; - wmsk_a = 18'h3ffff; - end - if (ram_wen_b == 1) - case (WMODE_B) - MODE_18: begin - aligned_wdata_b = WDATA_B; - {wmsk_b[17], wmsk_b[15:8]} = (BE_B[1] ? 9'h000 : 9'h1ff); - {wmsk_b[16], wmsk_b[7:0]} = (BE_B[0] ? 9'h000 : 9'h1ff); - end - MODE_9: begin - aligned_wdata_b = {{2 {WDATA_B[8]}}, {2 {WDATA_B[7:0]}}}; - {wmsk_b[17], wmsk_b[15:8]} = (ram_waddr_b[3] ? 9'h000 : 9'h1ff); - {wmsk_b[16], wmsk_b[7:0]} = (ram_waddr_b[3] ? 9'h1ff : 9'h000); - end - MODE_4: begin - aligned_wdata_b = {2'b00, {4 {WDATA_B[3:0]}}}; - wmsk_b[17:16] = 2'b11; - wmsk_b[15:12] = (ram_waddr_b[3:2] == 2'b11 ? 4'h0 : 4'hf); - wmsk_b[11:8] = (ram_waddr_b[3:2] == 2'b10 ? 4'h0 : 4'hf); - wmsk_b[7:4] = (ram_waddr_b[3:2] == 2'b01 ? 4'h0 : 4'hf); - wmsk_b[3:0] = (ram_waddr_b[3:2] == 2'b00 ? 4'h0 : 4'hf); - end - MODE_2: begin - aligned_wdata_b = {2'b00, {8 {WDATA_B[1:0]}}}; - wmsk_b[17:16] = 2'b11; - wmsk_b[15:14] = (ram_waddr_b[3:1] == 3'b111 ? 2'h0 : 2'h3); - wmsk_b[13:12] = (ram_waddr_b[3:1] == 3'b110 ? 2'h0 : 2'h3); - wmsk_b[11:10] = (ram_waddr_b[3:1] == 3'b101 ? 2'h0 : 2'h3); - wmsk_b[9:8] = (ram_waddr_b[3:1] == 3'b100 ? 2'h0 : 2'h3); - wmsk_b[7:6] = (ram_waddr_b[3:1] == 3'b011 ? 2'h0 : 2'h3); - wmsk_b[5:4] = (ram_waddr_b[3:1] == 3'b010 ? 2'h0 : 2'h3); - wmsk_b[3:2] = (ram_waddr_b[3:1] == 3'b001 ? 2'h0 : 2'h3); - wmsk_b[1:0] = (ram_waddr_b[3:1] == 3'b000 ? 2'h0 : 2'h3); - end - MODE_1: begin - aligned_wdata_b = {2'b00, {16 {WDATA_B[0]}}}; - wmsk_b = 18'h3ffff; - wmsk_b[{1'b0, ram_waddr_b[3:0]}] = 0; - end - default: wmsk_b = 18'h3ffff; - endcase - else begin - aligned_wdata_b = 18'b000000000000000000; - wmsk_b = 18'h3ffff; - end - end - always @(*) begin : RDATA_A_MODE_SEL - case (RMODE_A) - default: RDATA_A = 18'h00000; - MODE_18: RDATA_A = ram_rdata_a; - MODE_9: begin - RDATA_A[17:9] = 9'h000; - RDATA_A[8:0] = (ram_addr_a[3] ? {ram_rdata_a[17], ram_rdata_a[15:8]} : {ram_rdata_a[16], ram_rdata_a[7:0]}); - end - MODE_4: begin - RDATA_A[17:4] = 14'h0000; - case (ram_addr_a[3:2]) - 3: RDATA_A[3:0] = ram_rdata_a[15:12]; - 2: RDATA_A[3:0] = ram_rdata_a[11:8]; - 1: RDATA_A[3:0] = ram_rdata_a[7:4]; - 0: RDATA_A[3:0] = ram_rdata_a[3:0]; - endcase - end - MODE_2: begin - RDATA_A[17:2] = 16'h0000; - case (ram_addr_a[3:1]) - 7: RDATA_A[1:0] = ram_rdata_a[15:14]; - 6: RDATA_A[1:0] = ram_rdata_a[13:12]; - 5: RDATA_A[1:0] = ram_rdata_a[11:10]; - 4: RDATA_A[1:0] = ram_rdata_a[9:8]; - 3: RDATA_A[1:0] = ram_rdata_a[7:6]; - 2: RDATA_A[1:0] = ram_rdata_a[5:4]; - 1: RDATA_A[1:0] = ram_rdata_a[3:2]; - 0: RDATA_A[1:0] = ram_rdata_a[1:0]; - endcase - end - MODE_1: begin - RDATA_A[17:1] = 17'h00000; - RDATA_A[0] = ram_rdata_a[ram_addr_a[3:0]]; - end - endcase - end - always @(*) - case (RMODE_B) - default: RDATA_B = 18'h15566; - MODE_18: RDATA_B = ram_rdata_b; - MODE_9: begin - RDATA_B[17:9] = 1'sb1; - RDATA_B[8:0] = (ram_addr_b[3] ? {ram_rdata_b[17], ram_rdata_b[15:8]} : {ram_rdata_b[16], ram_rdata_b[7:0]}); - end - MODE_4: - case (ram_addr_b[3:2]) - 3: RDATA_B[3:0] = ram_rdata_b[15:12]; - 2: RDATA_B[3:0] = ram_rdata_b[11:8]; - 1: RDATA_B[3:0] = ram_rdata_b[7:4]; - 0: RDATA_B[3:0] = ram_rdata_b[3:0]; - endcase - MODE_2: - case (ram_addr_b[3:1]) - 7: RDATA_B[1:0] = ram_rdata_b[15:14]; - 6: RDATA_B[1:0] = ram_rdata_b[13:12]; - 5: RDATA_B[1:0] = ram_rdata_b[11:10]; - 4: RDATA_B[1:0] = ram_rdata_b[9:8]; - 3: RDATA_B[1:0] = ram_rdata_b[7:6]; - 2: RDATA_B[1:0] = ram_rdata_b[5:4]; - 1: RDATA_B[1:0] = ram_rdata_b[3:2]; - 0: RDATA_B[1:0] = ram_rdata_b[1:0]; - endcase - MODE_1: RDATA_B[0] = ram_rdata_b[ram_addr_b[3:0]]; - endcase -endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index 798ebbe0e..821cc44a7 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -14,12 +14,12 @@ // // SPDX-License-Identifier: Apache-2.0 -`define MODE_36 3'b111 // 36 or 32-bit -`define MODE_18 3'b110 // 18 or 16-bit -`define MODE_9 3'b101 // 9 or 8-bit +`define MODE_36 3'b011 // 36 or 32-bit +`define MODE_18 3'b010 // 18 or 16-bit +`define MODE_9 3'b001 // 9 or 8-bit `define MODE_4 3'b100 // 4-bit -`define MODE_2 3'b010 // 32-bit -`define MODE_1 3'b001 // 32-bit +`define MODE_2 3'b110 // 32-bit +`define MODE_1 3'b101 // 32-bit module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, C1EN, CLK1, CLK2, D1ADDR, D1DATA, D1EN); parameter CFG_ABITS = 10; @@ -53,22 +53,6 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 wire FLUSH1; wire FLUSH2; wire SPLIT; - wire [15:0] RAM_ID; - - wire PL_INIT_i; - wire PL_ENA_i; - wire PL_REN_i; - wire PL_CLK_i; - wire [1:0] PL_WEN_i; - wire [23:0] PL_ADDR_i; - wire [35:0] PL_DATA_i; - reg PL_INIT_o; - reg PL_ENA_o; - reg PL_REN_o; - reg PL_CLK_o; - reg [1:0] PL_WEN_o; - reg [23:0] PL_ADDR_o; - wire [35:0] PL_DATA_o; wire [14:CFG_ABITS] A1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; wire [14:CFG_ABITS] B1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; @@ -157,17 +141,9 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 assign SPLIT = 1'b0; assign FLUSH1 = 1'b0; assign FLUSH2 = 1'b0; - assign RAM_ID = 16'b0; - assign PL_INIT_i = 1'b0; - assign PL_ENA_i = 1'b0; - assign PL_REN_i = 1'b0; - assign PL_CLK_i = 1'b0; - assign PL_WEN_i = 2'b0; - assign PL_ADDR_i = 24'b0; - assign PL_DATA_i = 36'b0; - - TDP_BRAM36 _TECHMAP_REPLACE_ ( + TDP36K _TECHMAP_REPLACE_ ( + .RESET_ni(1'b1), .WDATA_A1_i(B1DATA[17:0]), .WDATA_A2_i(B1DATA[35:18]), .RDATA_A1_o(A1DATA_TOTAL[17:0]), @@ -199,24 +175,7 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 .BE_B2_i({D1EN[3],D1EN[2]}), .FLUSH1_i(FLUSH1), - .FLUSH2_i(FLUSH2), - .RAM_ID_i(RAM_ID), - - .PL_INIT_i(PL_INIT_i), - .PL_ENA_i(PL_ENA_i), - .PL_WEN_i(PL_WEN_i), - .PL_REN_i(PL_REN_i), - .PL_CLK_i(PL_CLK_i), - .PL_ADDR_i(PL_ADDR_i), - .PL_DATA_i(PL_DATA_i), - .PL_INIT_o(PL_INIT_o), - .PL_ENA_o(PL_ENA_o), - .PL_WEN_o(PL_WEN_o), - .PL_REN_o(PL_REN_o), - .PL_CLK_o(PL_CLK_o), - .PL_ADDR_o(), - .PL_DATA_o(PL_DATA_o) - + .FLUSH2_i(FLUSH2) ); endmodule @@ -383,22 +342,6 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA wire FLUSH1; wire FLUSH2; - wire [15:0] RAM_ID; - - wire PL_INIT_i; - wire PL_ENA_i; - wire PL_REN_i; - wire PL_CLK_i; - wire [1:0] PL_WEN_i; - wire [23:0] PL_ADDR_i; - wire [35:0] PL_DATA_i; - reg PL_INIT_o; - reg PL_ENA_o; - reg PL_REN_o; - reg PL_CLK_o; - reg [1:0] PL_WEN_o; - reg [23:0] PL_ADDR_o; - wire [35:0] PL_DATA_o; assign A1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; assign B1ADDR_CMPL = {15-CFG_ABITS{1'b0}}; @@ -474,16 +417,9 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA assign FLUSH1 = 1'b0; assign FLUSH2 = 1'b0; - assign RAM_ID = 16'b0; - assign PL_INIT_i = 1'b0; - assign PL_ENA_i = 1'b0; - assign PL_REN_i = 1'b0; - assign PL_CLK_i = 1'b0; - assign PL_WEN_i = 2'b0; - assign PL_ADDR_i = 24'b0; - assign PL_DATA_i = 36'b0; - - TDP_BRAM36 _TECHMAP_REPLACE_ ( + + TDP36K _TECHMAP_REPLACE_ ( + .RESET_ni(1'b1), .WDATA_A1_i(18'h3FFFF), .WDATA_A2_i(18'h3FFFF), .RDATA_A1_o(A1DATA_TOTAL[17:0]), @@ -515,24 +451,7 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA .BE_B2_i(B1EN[3:2]), .FLUSH1_i(FLUSH1), - .FLUSH2_i(FLUSH2), - .RAM_ID_i(RAM_ID), - - .PL_INIT_i(PL_INIT_i), - .PL_ENA_i(PL_ENA_i), - .PL_WEN_i(PL_WEN_i), - .PL_REN_i(PL_REN_i), - .PL_CLK_i(PL_CLK_i), - .PL_ADDR_i(PL_ADDR_i), - .PL_DATA_i(PL_DATA_i), - .PL_INIT_o(PL_INIT_o), - .PL_ENA_o(PL_ENA_o), - .PL_WEN_o(PL_WEN_o), - .PL_REN_o(PL_REN_o), - .PL_CLK_o(PL_CLK_o), - .PL_ADDR_o(), - .PL_DATA_o(PL_DATA_o) - + .FLUSH2_i(FLUSH2) ); endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index bf1648f69..c9c881e36 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -495,7 +495,9 @@ module TDP_BRAM18 ( endmodule -module TDP_BRAM36 ( +`default_nettype wire +module TDP36K ( + RESET_ni, WEN_A1_i, WEN_B1_i, REN_A1_i, @@ -525,22 +527,7 @@ module TDP_BRAM36 ( WDATA_B2_i, RDATA_A2_o, RDATA_B2_o, - FLUSH2_i, - RAM_ID_i, - PL_INIT_i, - PL_ENA_i, - PL_REN_i, - PL_CLK_i, - PL_WEN_i, - PL_ADDR_i, - PL_DATA_i, - PL_INIT_o, - PL_ENA_o, - PL_REN_o, - PL_CLK_o, - PL_WEN_o, - PL_ADDR_o, - PL_DATA_o + FLUSH2_i ); parameter [80:0] MODE_BITS = 81'd0; @@ -559,10 +546,10 @@ module TDP_BRAM36 ( // Second 18K RAMFIFO (39 bits) localparam [ 0:0] SYNC_FIFO2_i = MODE_BITS[41]; - localparam [ 0:0] RMODE_A2_i = MODE_BITS[44:42]; - localparam [ 0:0] RMODE_B2_i = MODE_BITS[47:45]; - localparam [ 0:0] WMODE_A2_i = MODE_BITS[50:48]; - localparam [ 0:0] WMODE_B2_i = MODE_BITS[53:51]; + localparam [ 2:0] RMODE_A2_i = MODE_BITS[44:42]; + localparam [ 2:0] RMODE_B2_i = MODE_BITS[47:45]; + localparam [ 2:0] WMODE_A2_i = MODE_BITS[50:48]; + localparam [ 2:0] WMODE_B2_i = MODE_BITS[53:51]; localparam [ 0:0] FMODE2_i = MODE_BITS[54]; localparam [ 0:0] POWERDN2_i = MODE_BITS[55]; localparam [ 0:0] SLEEP2_i = MODE_BITS[56]; @@ -718,6 +705,7 @@ module TDP_BRAM36 ( parameter INIT_7E = 256'h0000000000000000000000000000000000000000000000000000000000000000; parameter INIT_7F = 256'h0000000000000000000000000000000000000000000000000000000000000000; + input RESET_ni; input wire WEN_A1_i; input wire WEN_B1_i; input wire REN_A1_i; @@ -752,21 +740,6 @@ module TDP_BRAM36 ( output reg [17:0] RDATA_A2_o; output reg [17:0] RDATA_B2_o; input wire FLUSH2_i; - input wire [15:0] RAM_ID_i; - input wire PL_INIT_i; - input wire PL_ENA_i; - input wire PL_REN_i; - input wire PL_CLK_i; - input wire [1:0] PL_WEN_i; - input wire [31:0] PL_ADDR_i; - input wire [35:0] PL_DATA_i; - output reg PL_INIT_o; - output reg PL_ENA_o; - output reg PL_REN_o; - output reg PL_CLK_o; - output reg [1:0] PL_WEN_o; - output reg [31:0] PL_ADDR_o; - output reg [35:0] PL_DATA_o; wire EMPTY2; wire EPO2; wire EWM2; @@ -815,14 +788,14 @@ module TDP_BRAM36 ( reg [1:0] ram_be_a2; reg [1:0] ram_be_b1; reg [1:0] ram_be_b2; - reg [2:0] ram_rmode_a1; - reg [2:0] ram_wmode_a1; - reg [2:0] ram_rmode_b1; - reg [2:0] ram_wmode_b1; - reg [2:0] ram_rmode_a2; - reg [2:0] ram_wmode_a2; - reg [2:0] ram_rmode_b2; - reg [2:0] ram_wmode_b2; + wire [2:0] ram_rmode_a1; + wire [2:0] ram_wmode_a1; + wire [2:0] ram_rmode_b1; + wire [2:0] ram_wmode_b1; + wire [2:0] ram_rmode_a2; + wire [2:0] ram_wmode_a2; + wire [2:0] ram_rmode_b2; + wire [2:0] ram_wmode_b2; wire ram_ren_a1; wire ram_ren_b1; wire ram_ren_a2; @@ -835,22 +808,36 @@ module TDP_BRAM36 ( wire [11:0] ff_raddr; wire [11:0] ff_waddr; reg [35:0] fifo_rdata; - reg [1:0] fifo_rmode; - reg [1:0] fifo_wmode; + wire [1:0] fifo_rmode; + wire [1:0] fifo_wmode; wire [1:0] bwl; wire [17:0] pl_dout0; wire [17:0] pl_dout1; + wire sclk_a1; + wire sclk_b1; + wire sclk_a2; + wire sclk_b2; + wire sreset; + wire flush1; + wire flush2; + assign sreset = RESET_ni; + assign flush1 = ~FLUSH1_i; + assign flush2 = ~FLUSH2_i; assign ram_fmode1 = FMODE1_i & SPLIT_i; assign ram_fmode2 = FMODE2_i & SPLIT_i; assign smux_clk_a1 = CLK_A1_i; assign smux_clk_b1 = (FMODE1_i ? (SYNC_FIFO1_i ? CLK_A1_i : CLK_B1_i) : CLK_B1_i); assign smux_clk_a2 = (SPLIT_i ? CLK_A2_i : CLK_A1_i); - assign smux_clk_b2 = (SPLIT_i ? CLK_B2_i : (FMODE1_i ? (SYNC_FIFO1_i ? CLK_A1_i : CLK_B1_i) : CLK_B1_i)); + assign smux_clk_b2 = (SPLIT_i ? (FMODE2_i ? (SYNC_FIFO2_i ? CLK_A2_i : CLK_B2_i) : CLK_B2_i) : (FMODE1_i ? (SYNC_FIFO1_i ? CLK_A1_i : CLK_B1_i) : CLK_B1_i)); + assign sclk_a1 = smux_clk_a1; + assign sclk_a2 = smux_clk_a2; + assign sclk_b1 = smux_clk_b1; + assign sclk_b2 = smux_clk_b2; assign ram_ren_a1 = (SPLIT_i ? REN_A1_i : (FMODE1_i ? 0 : REN_A1_i)); assign ram_ren_a2 = (SPLIT_i ? REN_A2_i : (FMODE1_i ? 0 : REN_A1_i)); assign ram_ren_b1 = (SPLIT_i ? REN_B1_i : (FMODE1_i ? ren_o : REN_B1_i)); assign ram_ren_b2 = (SPLIT_i ? REN_B2_i : (FMODE1_i ? ren_o : REN_B1_i)); - localparam MODE_36 = 3'b111; + localparam MODE_36 = 3'b011; assign ram_wen_a1 = (SPLIT_i ? WEN_A1_i : (FMODE1_i ? ~FULL3 & WEN_A1_i : (WMODE_A1_i == MODE_36 ? WEN_A1_i : WEN_A1_i & ~ADDR_A1_i[4]))); assign ram_wen_a2 = (SPLIT_i ? WEN_A2_i : (FMODE1_i ? ~FULL3 & WEN_A1_i : (WMODE_A1_i == MODE_36 ? WEN_A1_i : WEN_A1_i & ADDR_A1_i[4]))); assign ram_wen_b1 = (SPLIT_i ? WEN_B1_i : (WMODE_B1_i == MODE_36 ? WEN_B1_i : WEN_B1_i & ~ADDR_B1_i[4])); @@ -860,8 +847,8 @@ module TDP_BRAM36 ( assign ram_addr_a2 = (SPLIT_i ? ADDR_A2_i[13:0] : (FMODE1_i ? {ff_waddr[11:2], ff_waddr[0], 3'b000} : {ADDR_A1_i[14:5], ADDR_A1_i[3:0]})); assign ram_addr_b2 = (SPLIT_i ? ADDR_B2_i[13:0] : (FMODE1_i ? {ff_raddr[11:2], ff_raddr[0], 3'b000} : {ADDR_B1_i[14:5], ADDR_B1_i[3:0]})); assign bwl = (SPLIT_i ? ADDR_A1_i[4:3] : (FMODE1_i ? ff_waddr[1:0] : ADDR_A1_i[4:3])); - localparam MODE_18 = 3'b110; - localparam MODE_9 = 3'b101; + localparam MODE_18 = 3'b010; + localparam MODE_9 = 3'b001; always @(*) begin : WDATA_SEL case (SPLIT_i) 1: begin @@ -877,8 +864,8 @@ module TDP_BRAM36 ( 0: begin case (WMODE_A1_i) MODE_36: begin - ram_wdata_a1 = {WDATA_A2_i[15:14], WDATA_A1_i[15:0]}; - ram_wdata_a2 = {WDATA_A2_i[17:16], WDATA_A2_i[13:0], WDATA_A1_i[17:16]}; + ram_wdata_a1 = WDATA_A1_i; + ram_wdata_a2 = WDATA_A2_i; ram_be_a2 = (FMODE1_i ? 2'b11 : BE_A2_i); ram_be_a1 = (FMODE1_i ? 2'b11 : BE_A1_i); end @@ -888,40 +875,22 @@ module TDP_BRAM36 ( ram_be_a1 = (FMODE1_i ? (ff_waddr[1] ? 2'b00 : 2'b11) : BE_A1_i); ram_be_a2 = (FMODE1_i ? (ff_waddr[1] ? 2'b11 : 2'b00) : BE_A1_i); end - MODE_9: + MODE_9: begin + ram_wdata_a1[7:0] = WDATA_A1_i[7:0]; + ram_wdata_a1[16] = WDATA_A1_i[16]; + ram_wdata_a1[15:8] = WDATA_A1_i[7:0]; + ram_wdata_a1[17] = WDATA_A1_i[16]; + ram_wdata_a2[7:0] = WDATA_A1_i[7:0]; + ram_wdata_a2[16] = WDATA_A1_i[16]; + ram_wdata_a2[15:8] = WDATA_A1_i[7:0]; + ram_wdata_a2[17] = WDATA_A1_i[16]; case (bwl) - 0: begin - ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); - ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); - ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_be_a1[0] = (FMODE1_i ? (ff_waddr[1:0] == 0 ? 1'b1 : 1'b0) : 1'b1); - ram_be_a1[1] = (FMODE1_i ? (ff_waddr[1:0] == 1 ? 1'b1 : 1'b0) : 1'b0); - ram_be_a2[0] = (FMODE1_i ? (ff_waddr[1:0] == 2 ? 1'b1 : 1'b0) : 1'b0); - ram_be_a2[1] = (FMODE1_i ? (ff_waddr[1:0] == 3 ? 1'b1 : 1'b0) : 1'b0); - end - 1: begin - ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); - ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); - ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - {ram_be_a2, ram_be_a1} = 4'b0010; - end - 2: begin - ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); - ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); - ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - {ram_be_a2, ram_be_a1} = 4'b0100; - end - 3: begin - ram_wdata_a1[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : 9'b000000000); - ram_wdata_a1[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - ram_wdata_a2[8:0] = (FMODE1_i ? {WDATA_A1_i[0], WDATA_A1_i[7:0]} : WDATA_A1_i[8:0]); - ram_wdata_a2[17:9] = (FMODE1_i ? {{2 {WDATA_A1_i[8]}}, WDATA_A1_i[7:1]} : 9'b000000000); - {ram_be_a2, ram_be_a1} = 4'b1000; - end + 0: {ram_be_a2, ram_be_a1} = 4'b0001; + 1: {ram_be_a2, ram_be_a1} = 4'b0010; + 2: {ram_be_a2, ram_be_a1} = 4'b0100; + 3: {ram_be_a2, ram_be_a1} = 4'b1000; endcase + end default: begin ram_wdata_a1 = WDATA_A1_i; ram_wdata_a2 = WDATA_A1_i; @@ -931,8 +900,8 @@ module TDP_BRAM36 ( endcase case (WMODE_B1_i) MODE_36: begin - ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : {WDATA_B2_i[15:14], WDATA_B1_i[15:0]}); - ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : {WDATA_B2_i[17:16], WDATA_B2_i[13:0], WDATA_B1_i[17:16]}); + ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); + ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B2_i); ram_be_b2 = BE_B2_i; ram_be_b1 = BE_B1_i; end @@ -942,37 +911,22 @@ module TDP_BRAM36 ( ram_be_b1 = BE_B1_i; ram_be_b2 = BE_B1_i; end - MODE_9: + MODE_9: begin + ram_wdata_b1[7:0] = WDATA_B1_i[7:0]; + ram_wdata_b1[16] = WDATA_B1_i[16]; + ram_wdata_b1[15:8] = WDATA_B1_i[7:0]; + ram_wdata_b1[17] = WDATA_B1_i[16]; + ram_wdata_b2[7:0] = WDATA_B1_i[7:0]; + ram_wdata_b2[16] = WDATA_B1_i[16]; + ram_wdata_b2[15:8] = WDATA_B1_i[7:0]; + ram_wdata_b2[17] = WDATA_B1_i[16]; case (ADDR_B1_i[4:3]) - 0: begin - ram_wdata_b1[8:0] = WDATA_B1_i[8:0]; - ram_wdata_b1[17:9] = 9'b000000000; - ram_wdata_b2[8:0] = 9'b000000000; - ram_wdata_b2[17:9] = 9'b000000000; - {ram_be_b2, ram_be_b1} = 4'b0001; - end - 1: begin - ram_wdata_b1[8:0] = WDATA_B1_i[8:0]; - ram_wdata_b1[17:9] = 9'b000000000; - ram_wdata_b2[8:0] = 9'b000000000; - ram_wdata_b2[17:9] = 9'b000000000; - {ram_be_b2, ram_be_b1} = 4'b0010; - end - 2: begin - ram_wdata_b1[8:0] = 9'b000000000; - ram_wdata_b1[17:9] = 9'b000000000; - ram_wdata_b2[8:0] = WDATA_B1_i[8:0]; - ram_wdata_b2[17:9] = 9'b000000000; - {ram_be_b2, ram_be_b1} = 4'b0100; - end - 3: begin - ram_wdata_b1[8:0] = 9'b000000000; - ram_wdata_b1[17:9] = 9'b000000000; - ram_wdata_b2[8:0] = WDATA_B1_i[8:0]; - ram_wdata_b2[17:9] = 9'b000000000; - {ram_be_b2, ram_be_b1} = 4'b1000; - end + 0: {ram_be_b2, ram_be_b1} = 4'b0001; + 1: {ram_be_b2, ram_be_b1} = 4'b0010; + 2: {ram_be_b2, ram_be_b1} = 4'b0100; + 3: {ram_be_b2, ram_be_b1} = 4'b1000; endcase + end default: begin ram_wdata_b1 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); ram_wdata_b2 = (FMODE1_i ? 18'b000000000000000000 : WDATA_B1_i); @@ -983,43 +937,30 @@ module TDP_BRAM36 ( end endcase end - always @(posedge CLK_A1_i or posedge CLK_B1_i or posedge CLK_A2_i or posedge CLK_B2_i) begin - if (!SPLIT_i) begin - ram_rmode_a1 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); - ram_rmode_a2 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); - ram_wmode_a1 <= (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); - ram_wmode_a2 <= (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i)); - ram_rmode_b1 <= (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); - ram_rmode_b2 <= (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i)); - ram_wmode_b1 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); - ram_wmode_b2 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); - end else begin - ram_rmode_a1 <= (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i); - ram_rmode_a2 <= (RMODE_A2_i == MODE_36 ? MODE_18 : RMODE_A2_i); - ram_wmode_a1 <= (WMODE_A1_i == MODE_36 ? MODE_18 : WMODE_A1_i); - ram_wmode_a2 <= (WMODE_A2_i == MODE_36 ? MODE_18 : WMODE_A2_i); - ram_rmode_b1 <= (RMODE_B1_i == MODE_36 ? MODE_18 : RMODE_B1_i); - ram_rmode_b2 <= (RMODE_B2_i == MODE_36 ? MODE_18 : RMODE_B2_i); - ram_wmode_b1 <= (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i); - ram_wmode_b2 <= (WMODE_B2_i == MODE_36 ? MODE_18 : WMODE_B2_i); - end - end + assign ram_rmode_a1 = (SPLIT_i ? (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i) : (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i)); + assign ram_rmode_a2 = (SPLIT_i ? (RMODE_A2_i == MODE_36 ? MODE_18 : RMODE_A2_i) : (RMODE_A1_i == MODE_36 ? MODE_18 : RMODE_A1_i)); + assign ram_wmode_a1 = (SPLIT_i ? (WMODE_A1_i == MODE_36 ? MODE_18 : WMODE_A1_i) : (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i))); + assign ram_wmode_a2 = (SPLIT_i ? (WMODE_A2_i == MODE_36 ? MODE_18 : WMODE_A2_i) : (WMODE_A1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : WMODE_A1_i))); + assign ram_rmode_b1 = (SPLIT_i ? (RMODE_B1_i == MODE_36 ? MODE_18 : RMODE_B1_i) : (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i))); + assign ram_rmode_b2 = (SPLIT_i ? (RMODE_B2_i == MODE_36 ? MODE_18 : RMODE_B2_i) : (RMODE_B1_i == MODE_36 ? MODE_18 : (FMODE1_i ? MODE_18 : RMODE_B1_i))); + assign ram_wmode_b1 = (SPLIT_i ? (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i) : (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i)); + assign ram_wmode_b2 = (SPLIT_i ? (WMODE_B2_i == MODE_36 ? MODE_18 : WMODE_B2_i) : (WMODE_B1_i == MODE_36 ? MODE_18 : WMODE_B1_i)); always @(*) begin : FIFO_READ_SEL case (RMODE_B1_i) MODE_36: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; MODE_18: fifo_rdata = (ff_raddr[1] ? {18'b000000000000000000, ram_rdata_b2} : {18'b000000000000000000, ram_rdata_b1}); MODE_9: case (ff_raddr[1:0]) - 0: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b1[16], ram_rdata_b1[7:0]}; - 1: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b1[17], ram_rdata_b1[15:8]}; - 2: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[16], ram_rdata_b2[7:0]}; - 3: fifo_rdata = {27'b000000000000000000000000000, ram_rdata_b2[17], ram_rdata_b2[15:8]}; + 0: fifo_rdata = {19'b0000000000000000000, ram_rdata_b1[16], 8'b00000000, ram_rdata_b1[7:0]}; + 1: fifo_rdata = {19'b0000000000000000000, ram_rdata_b1[17], 8'b00000000, ram_rdata_b1[15:8]}; + 2: fifo_rdata = {19'b0000000000000000000, ram_rdata_b2[16], 8'b00000000, ram_rdata_b2[7:0]}; + 3: fifo_rdata = {19'b0000000000000000000, ram_rdata_b2[17], 8'b00000000, ram_rdata_b2[15:8]}; endcase - default: fifo_rdata = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:0], ram_rdata_b1[15:0]}; + default: fifo_rdata = {ram_rdata_b2, ram_rdata_b1}; endcase end - localparam MODE_1 = 3'b001; - localparam MODE_2 = 3'b010; + localparam MODE_1 = 3'b101; + localparam MODE_2 = 3'b110; localparam MODE_4 = 3'b100; always @(*) begin : RDATA_SEL case (SPLIT_i) @@ -1037,15 +978,15 @@ module TDP_BRAM36 ( else case (RMODE_A1_i) MODE_36: begin - RDATA_A1_o = {ram_rdata_a2[1:0], ram_rdata_a1[15:0]}; - RDATA_A2_o = {ram_rdata_a2[17:16], ram_rdata_a1[17:16], ram_rdata_a2[15:2]}; + RDATA_A1_o = {ram_rdata_a1[17:0]}; + RDATA_A2_o = {ram_rdata_a2[17:0]}; end MODE_18: begin RDATA_A1_o = (laddr_a1[4] ? ram_rdata_a2 : ram_rdata_a1); RDATA_A2_o = 18'b000000000000000000; end MODE_9: begin - RDATA_A1_o = (laddr_a1[4] ? {9'b000000000, ram_rdata_a2[8:0]} : {9'b000000000, ram_rdata_a1[8:0]}); + RDATA_A1_o = (laddr_a1[4] ? {{2 {ram_rdata_a2[16]}}, {2 {ram_rdata_a2[7:0]}}} : {{2 {ram_rdata_a1[16]}}, {2 {ram_rdata_a1[7:0]}}}); RDATA_A2_o = 18'b000000000000000000; end MODE_4: begin @@ -1070,15 +1011,15 @@ module TDP_BRAM36 ( endcase case (RMODE_B1_i) MODE_36: begin - RDATA_B1_o = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; - RDATA_B2_o = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; + RDATA_B1_o = {ram_rdata_b1}; + RDATA_B2_o = {ram_rdata_b2}; end MODE_18: begin RDATA_B1_o = (FMODE1_i ? fifo_rdata[17:0] : (laddr_b1[4] ? ram_rdata_b2 : ram_rdata_b1)); RDATA_B2_o = 18'b000000000000000000; end MODE_9: begin - RDATA_B1_o = (FMODE1_i ? {9'b000000000, fifo_rdata[8:0]} : (laddr_b1[4] ? {9'b000000000, ram_rdata_b2[8:0]} : {9'b000000000, ram_rdata_b1[8:0]})); + RDATA_B1_o = (FMODE1_i ? {fifo_rdata[17:0]} : (laddr_b1[4] ? {1'b0, ram_rdata_b2[16], 8'b00000000, ram_rdata_b2[7:0]} : {1'b0, ram_rdata_b1[16], 8'b00000000, ram_rdata_b1[7:0]})); RDATA_B2_o = 18'b000000000000000000; end MODE_4: begin @@ -1097,46 +1038,37 @@ module TDP_BRAM36 ( RDATA_B1_o[0] = (laddr_b1[4] ? ram_rdata_b2[0] : ram_rdata_b1[0]); end default: begin - RDATA_B1_o = {ram_rdata_b2[1:0], ram_rdata_b1[15:0]}; - RDATA_B2_o = {ram_rdata_b2[17:16], ram_rdata_b1[17:16], ram_rdata_b2[15:2]}; + RDATA_B1_o = ram_rdata_b1; + RDATA_B2_o = ram_rdata_b2; end endcase end endcase end - always @(posedge CLK_A1_i) laddr_a1 <= ADDR_A1_i; - always @(posedge CLK_B1_i) laddr_b1 <= ADDR_B1_i; - always @(posedge CLK_A1_i or posedge CLK_B1_i or posedge CLK_A2_i or posedge CLK_B2_i) begin - if (WMODE_A1_i == MODE_36) - fifo_wmode = 2'b00; - else if (WMODE_A1_i == MODE_18) - fifo_wmode = 2'b01; - else if (WMODE_A1_i == MODE_9) - fifo_wmode = 2'b10; + always @(posedge sclk_a1 or negedge sreset) + if (sreset == 0) + laddr_a1 <= 1'sb0; else - fifo_wmode = 2'b00; - - if (RMODE_B1_i == MODE_36) - fifo_rmode = 2'b00; - else if (RMODE_B1_i == MODE_18) - fifo_rmode = 2'b01; - else if (RMODE_B1_i == MODE_9) - fifo_rmode = 2'b10; + laddr_a1 <= ADDR_A1_i; + always @(posedge sclk_b1 or negedge sreset) + if (sreset == 0) + laddr_b1 <= 1'sb0; else - fifo_rmode = 2'b00; - end + laddr_b1 <= ADDR_B1_i; + assign fifo_wmode = ((WMODE_A1_i == MODE_36) ? 2'b00 : ((WMODE_A1_i == MODE_18) ? 2'b01 : ((WMODE_A1_i == MODE_9) ? 2'b10 : 2'b00))); + assign fifo_rmode = ((RMODE_B1_i == MODE_36) ? 2'b00 : ((RMODE_B1_i == MODE_18) ? 2'b01 : ((RMODE_B1_i == MODE_9) ? 2'b10 : 2'b00))); fifo_ctl #( .ADDR_WIDTH(12), - .FIFO_WIDTH(3'd4) + .FIFO_WIDTH(3'd4), + .DEPTH(7) ) fifo36_ctl( - .rclk(smux_clk_b1), - .rst_R_n(~FLUSH1_i), - .wclk(smux_clk_a1), - .rst_W_n(~FLUSH1_i), + .rclk(sclk_b1), + .rst_R_n(flush1), + .wclk(sclk_a1), + .rst_W_n(flush1), .ren(REN_B1_i), .wen(ram_wen_a1), .sync(SYNC_FIFO1_i), - .depth(3'b111), .rmode(fifo_rmode), .wmode(fifo_wmode), .ren_o(ren_o), @@ -1147,110 +1079,81 @@ module TDP_BRAM36 ( .upae(UPAE1_i) ); TDP18K_FIFO #( - .UPAF(UPAF1_i[10:0]), - .UPAE(UPAE1_i[10:0]), - .SYNC_FIFO(SYNC_FIFO1_i), - .POWERDN(POWERDN1_i), - .SLEEP(SLEEP1_i), - .PROTECT(PROTECT1_i) + .UPAF_i(UPAF1_i[10:0]), + .UPAE_i(UPAE1_i[10:0]), + .SYNC_FIFO_i(SYNC_FIFO1_i), + .POWERDN_i(POWERDN1_i), + .SLEEP_i(SLEEP1_i), + .PROTECT_i(PROTECT1_i) )u1( - .RMODE_A(ram_rmode_a1), - .RMODE_B(ram_rmode_b1), - .WMODE_A(ram_wmode_a1), - .WMODE_B(ram_wmode_b1), - .WEN_A(ram_wen_a1), - .WEN_B(ram_wen_b1), - .REN_A(ram_ren_a1), - .REN_B(ram_ren_b1), - .CLK_A(smux_clk_a1), - .CLK_B(smux_clk_b1), - .BE_A(ram_be_a1), - .BE_B(ram_be_b1), - .ADDR_A(ram_addr_a1), - .ADDR_B(ram_addr_b1), - .WDATA_A(ram_wdata_a1), - .WDATA_B(ram_wdata_b1), - .RDATA_A(ram_rdata_a1), - .RDATA_B(ram_rdata_b1), - .EMPTY(EMPTY1), - .EPO(EPO1), - .EWM(EWM1), - .UNDERRUN(UNDERRUN1), - .FULL(FULL1), - .FMO(FMO1), - .FWM(FWM1), - .OVERRUN(OVERRUN1), - .FLUSH(FLUSH1_i), - .RAM_ID({RAM_ID_i}), - .FMODE(ram_fmode1), - .PL_INIT(PL_INIT_i), - .PL_ENA(PL_ENA_i), - .PL_WEN(PL_WEN_i[0]), - .PL_REN(PL_REN_i), - .PL_CLK(PL_CLK_i), - .PL_ADDR(PL_ADDR_i), - .PL_DATA_IN({PL_DATA_i[33:32], PL_DATA_i[15:0]}), - .PL_DATA_OUT(pl_dout0) + .RMODE_A_i(ram_rmode_a1), + .RMODE_B_i(ram_rmode_b1), + .WMODE_A_i(ram_wmode_a1), + .WMODE_B_i(ram_wmode_b1), + .WEN_A_i(ram_wen_a1), + .WEN_B_i(ram_wen_b1), + .REN_A_i(ram_ren_a1), + .REN_B_i(ram_ren_b1), + .CLK_A_i(sclk_a1), + .CLK_B_i(sclk_b1), + .BE_A_i(ram_be_a1), + .BE_B_i(ram_be_b1), + .ADDR_A_i(ram_addr_a1), + .ADDR_B_i(ram_addr_b1), + .WDATA_A_i(ram_wdata_a1), + .WDATA_B_i(ram_wdata_b1), + .RDATA_A_o(ram_rdata_a1), + .RDATA_B_o(ram_rdata_b1), + .EMPTY_o(EMPTY1), + .EPO_o(EPO1), + .EWM_o(EWM1), + .UNDERRUN_o(UNDERRUN1), + .FULL_o(FULL1), + .FMO_o(FMO1), + .FWM_o(FWM1), + .OVERRUN_o(OVERRUN1), + .FLUSH_ni(flush1), + .FMODE_i(ram_fmode1) ); TDP18K_FIFO #( - .UPAF(UPAF2_i[10:0]), - .UPAE(UPAE2_i[10:0]), - .SYNC_FIFO(SYNC_FIFO2_i), - .POWERDN(POWERDN2_i), - .SLEEP(SLEEP2_i), - .PROTECT(PROTECT2_i) + .UPAF_i(UPAF2_i), + .UPAE_i(UPAE2_i), + .SYNC_FIFO_i(SYNC_FIFO2_i), + .POWERDN_i(POWERDN2_i), + .SLEEP_i(SLEEP2_i), + .PROTECT_i(PROTECT2_i) )u2( - .RMODE_A(ram_rmode_a2), - .RMODE_B(ram_rmode_b2), - .WMODE_A(ram_wmode_a2), - .WMODE_B(ram_wmode_b2), - .WEN_A(ram_wen_a2), - .WEN_B(ram_wen_b2), - .REN_A(ram_ren_a2), - .REN_B(ram_ren_b2), - .CLK_A(smux_clk_a2), - .CLK_B(smux_clk_b2), - .BE_A(ram_be_a2), - .BE_B(ram_be_b2), - .ADDR_A(ram_addr_a2), - .ADDR_B(ram_addr_b2), - .WDATA_A(ram_wdata_a2), - .WDATA_B(ram_wdata_b2), - .RDATA_A(ram_rdata_a2), - .RDATA_B(ram_rdata_b2), - .EMPTY(EMPTY2), - .EPO(EPO2), - .EWM(EWM2), - .UNDERRUN(UNDERRUN2), - .FULL(FULL2), - .FMO(FMO2), - .FWM(FWM2), - .OVERRUN(OVERRUN2), - .FLUSH(FLUSH2_i), - .RAM_ID({RAM_ID_i}), - .FMODE(ram_fmode2), - .PL_INIT(PL_INIT_i), - .PL_ENA(PL_ENA_i), - .PL_WEN(PL_WEN_i[1]), - .PL_REN(PL_REN_i), - .PL_CLK(PL_CLK_i), - .PL_ADDR(PL_ADDR_i), - .PL_DATA_IN({PL_DATA_i[35:34], PL_DATA_i[31:16]}), - .PL_DATA_OUT(pl_dout1) + .RMODE_A_i(ram_rmode_a2), + .RMODE_B_i(ram_rmode_b2), + .WMODE_A_i(ram_wmode_a2), + .WMODE_B_i(ram_wmode_b2), + .WEN_A_i(ram_wen_a2), + .WEN_B_i(ram_wen_b2), + .REN_A_i(ram_ren_a2), + .REN_B_i(ram_ren_b2), + .CLK_A_i(sclk_a2), + .CLK_B_i(sclk_b2), + .BE_A_i(ram_be_a2), + .BE_B_i(ram_be_b2), + .ADDR_A_i(ram_addr_a2), + .ADDR_B_i(ram_addr_b2), + .WDATA_A_i(ram_wdata_a2), + .WDATA_B_i(ram_wdata_b2), + .RDATA_A_o(ram_rdata_a2), + .RDATA_B_o(ram_rdata_b2), + .EMPTY_o(EMPTY2), + .EPO_o(EPO2), + .EWM_o(EWM2), + .UNDERRUN_o(UNDERRUN2), + .FULL_o(FULL2), + .FMO_o(FMO2), + .FWM_o(FWM2), + .OVERRUN_o(OVERRUN2), + .FLUSH_ni(flush2), + .FMODE_i(ram_fmode2) ); - always @(*) begin - if (RAM_ID_i == PL_ADDR_i[31:16]) - PL_DATA_o = (PL_REN_i ? {pl_dout1[17:16], pl_dout0[17:16], pl_dout1[15:0], pl_dout0[15:0]} : PL_DATA_i); - else - PL_DATA_o = PL_DATA_i; - PL_ADDR_o = PL_ADDR_i; - PL_INIT_o = PL_INIT_i; - PL_ENA_o = PL_ENA_i; - PL_WEN_o = PL_WEN_i; - PL_REN_o = PL_REN_i; - PL_CLK_o = PL_CLK_i; - end endmodule +`default_nettype none (* blackbox *) module QL_DSP1 ( diff --git a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v index 60cd58691..864b886ac 100644 --- a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v +++ b/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v @@ -14,6 +14,7 @@ // // SPDX-License-Identifier: Apache-2.0 +`default_nettype wire module sram1024x18 ( clk_a, cen_a, @@ -130,3 +131,4 @@ module sram1024x18 ( rdata_a = rdata_a; end endmodule +`default_nettype none diff --git a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v index 0c1dcc059..441f6bc4a 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v +++ b/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v @@ -14,13 +14,13 @@ // // SPDX-License-Identifier: Apache-2.0 +`default_nettype wire module fifo_ctl ( raddr, waddr, fflags, ren_o, sync, - depth, rmode, wmode, rclk, @@ -34,13 +34,12 @@ module fifo_ctl ( ); parameter ADDR_WIDTH = 11; parameter FIFO_WIDTH = 3'd2; - localparam ADDR_PLUS_ONE = ADDR_WIDTH + 1; + parameter DEPTH = 6; output wire [ADDR_WIDTH - 1:0] raddr; output wire [ADDR_WIDTH - 1:0] waddr; output wire [7:0] fflags; output wire ren_o; input wire sync; - input wire [2:0] depth; input wire [1:0] rmode; input wire [1:0] wmode; (* clkbuf_sink *) @@ -53,6 +52,7 @@ module fifo_ctl ( input wire wen; input wire [ADDR_WIDTH - 1:0] upaf; input wire [ADDR_WIDTH - 1:0] upae; + localparam ADDR_PLUS_ONE = ADDR_WIDTH + 1; reg [ADDR_WIDTH:0] pushtopop1; reg [ADDR_WIDTH:0] pushtopop2; reg [ADDR_WIDTH:0] poptopush1; @@ -65,23 +65,26 @@ module fifo_ctl ( assign smux_pushtopop = (sync ? pushtopop0 : pushtopop2); always @(posedge rclk or negedge rst_R_n) if (~rst_R_n) begin - pushtopop1 <= #(1) {ADDR_WIDTH + 1{1'h0}}; - pushtopop2 <= #(1) {ADDR_WIDTH + 1{1'h0}}; + pushtopop1 <= 'h0; + pushtopop2 <= 'h0; end else begin - pushtopop1 <= #(1) pushtopop0; - pushtopop2 <= #(1) pushtopop1; + pushtopop1 = pushtopop0; + pushtopop2 = pushtopop1; end always @(posedge wclk or negedge rst_W_n) if (~rst_W_n) begin - poptopush1 <= #(1) {ADDR_WIDTH + 1{1'h0}}; - poptopush2 <= #(1) {ADDR_WIDTH + 1{1'h0}}; + poptopush1 <= 'h0; + poptopush2 <= 'h0; end else begin - poptopush1 <= #(1) poptopush0; - poptopush2 <= #(1) poptopush1; + poptopush1 <= poptopush0; + poptopush2 <= poptopush1; end - fifo_push #(.ADDR_WIDTH(ADDR_WIDTH)) u_fifo_push( + fifo_push #( + .ADDR_WIDTH(ADDR_WIDTH), + .DEPTH(DEPTH) + ) u_fifo_push( .wclk(wclk), .wen(wen), .rst_n(rst_W_n), @@ -90,13 +93,13 @@ module fifo_ctl ( .gcout(pushtopop0), .gcin(smux_poptopush), .ff_waddr(waddr), - .depth(depth), .pushflags(fflags[7:4]), .upaf(upaf) ); fifo_pop #( .ADDR_WIDTH(ADDR_WIDTH), - .FIFO_WIDTH(FIFO_WIDTH) + .FIFO_WIDTH(FIFO_WIDTH), + .DEPTH(DEPTH) ) u_fifo_pop( .rclk(rclk), .ren_in(ren), @@ -107,7 +110,6 @@ module fifo_ctl ( .gcout(poptopush0), .gcin(smux_pushtopop), .out_raddr(raddr), - .depth(depth), .popflags(fflags[3:0]), .upae(upae) ); @@ -121,22 +123,23 @@ module fifo_push ( wen, rmode, wmode, - depth, gcin, upaf ); parameter ADDR_WIDTH = 11; + parameter DEPTH = 6; output wire [3:0] pushflags; output wire [ADDR_WIDTH:0] gcout; output wire [ADDR_WIDTH - 1:0] ff_waddr; input rst_n; + (* clkbuf_sink *) input wclk; input wen; input [1:0] rmode; input [1:0] wmode; - input [2:0] depth; input [ADDR_WIDTH:0] gcin; input [ADDR_WIDTH - 1:0] upaf; + localparam ADDR_PLUS_ONE = ADDR_WIDTH + 1; reg full_next; reg full; reg paf_next; @@ -165,22 +168,13 @@ module fifo_push ( wire [ADDR_WIDTH:0] tmp; wire [ADDR_WIDTH:0] next_count; wire [ADDR_WIDTH:0] count; - reg [ADDR_WIDTH:0] fbytes; + wire [ADDR_WIDTH:0] fbytes; genvar i; assign next_count = fbytes - (waddr_next >= raddr_next ? waddr_next - raddr_next : (~raddr_next + waddr_next) + 1); assign count = fbytes - (waddr >= raddr ? waddr - raddr : (~raddr + waddr) + 1); + assign fbytes = 1 << (DEPTH + 5); always @(*) begin - case (depth) - 3'b000: fbytes = {ADDR_WIDTH + 1{1'h0}} | 12'd2048; - 3'b001: fbytes = {ADDR_WIDTH + 1{1'h0}} | 11'd1024; - 3'b010: fbytes = {ADDR_WIDTH + 1{1'h0}} | 10'd512; - 3'b011: fbytes = {ADDR_WIDTH + 1{1'h0}} | 9'd256; - 3'b100: fbytes = {ADDR_WIDTH + 1{1'h0}} | 8'd128; - 3'b101: fbytes = {ADDR_WIDTH + 1{1'h0}} | 7'd64; - 3'b110: fbytes = {ADDR_WIDTH + 1{1'h0}} | 6'd32; - 3'b111: fbytes = {ADDR_WIDTH + 1{1'h0}} | 13'd4096; - endcase - paf_thresh = (wmode ? (wmode[0] ? upaf << 1 : upaf) : upaf << 2); + paf_thresh = wmode[1] ? upaf : (wmode[0] ? upaf << 1 : upaf << 2); end always @(*) case (wmode) @@ -200,24 +194,24 @@ module fifo_push ( f2 = 1'b0; p1 = 1'b0; p2 = 1'b0; - q1 = next_count < paf_thresh; - q2 = count < paf_thresh; + q1 = next_count < {1'b0, paf_thresh}; + q2 = count < {1'b0, paf_thresh}; case (wmode) 2'h0: - case (depth) - 3'h0: begin + case (DEPTH) + 3'h6: begin f1 = {~waddr_next[11], waddr_next[10:2]} == raddr_next[11:2]; f2 = {~waddr[11], waddr[10:2]} == raddr_next[11:2]; p1 = ((waddr_next[10:2] + 1) & 9'h1ff) == raddr_next[10:2]; p2 = ((waddr[10:2] + 1) & 9'h1ff) == raddr_next[10:2]; end - 3'h1: begin + 3'h5: begin f1 = {~waddr_next[10], waddr_next[9:2]} == raddr_next[10:2]; f2 = {~waddr[10], waddr[9:2]} == raddr_next[10:2]; p1 = ((waddr_next[9:2] + 1) & 8'hff) == raddr_next[9:2]; p2 = ((waddr[9:2] + 1) & 8'hff) == raddr_next[9:2]; end - 3'h2: begin + 3'h4: begin f1 = {~waddr_next[9], waddr_next[8:2]} == raddr_next[9:2]; f2 = {~waddr[9], waddr[8:2]} == raddr_next[9:2]; p1 = ((waddr_next[8:2] + 1) & 7'h7f) == raddr_next[8:2]; @@ -229,19 +223,19 @@ module fifo_push ( p1 = ((waddr_next[7:2] + 1) & 6'h3f) == raddr_next[7:2]; p2 = ((waddr[7:2] + 1) & 6'h3f) == raddr_next[7:2]; end - 3'h4: begin + 3'h2: begin f1 = {~waddr_next[7], waddr_next[6:2]} == raddr_next[7:2]; f2 = {~waddr[7], waddr[6:2]} == raddr_next[7:2]; p1 = ((waddr_next[6:2] + 1) & 5'h1f) == raddr_next[6:2]; p2 = ((waddr[6:2] + 1) & 5'h1f) == raddr_next[6:2]; end - 3'h5: begin + 3'h1: begin f1 = {~waddr_next[6], waddr_next[5:2]} == raddr_next[6:2]; f2 = {~waddr[6], waddr[5:2]} == raddr_next[6:2]; p1 = ((waddr_next[5:2] + 1) & 4'hf) == raddr_next[5:2]; p2 = ((waddr[5:2] + 1) & 4'hf) == raddr_next[5:2]; end - 3'h6: begin + 3'h0: begin f1 = {~waddr_next[5], waddr_next[4:2]} == raddr_next[5:2]; f2 = {~waddr[5], waddr[4:2]} == raddr_next[5:2]; p1 = ((waddr_next[4:2] + 1) & 3'h7) == raddr_next[4:2]; @@ -249,26 +243,26 @@ module fifo_push ( end 3'h7: begin f1 = {~waddr_next[ADDR_WIDTH], waddr_next[ADDR_WIDTH - 1:2]} == raddr_next[ADDR_WIDTH:2]; - f2 = {~waddr[ADDR_WIDTH], waddr[10:2]} == raddr_next[ADDR_WIDTH:2]; + f2 = {~waddr[ADDR_WIDTH], waddr[ADDR_WIDTH - 1:2]} == raddr_next[ADDR_WIDTH:2]; p1 = ((waddr_next[ADDR_WIDTH - 1:2] + 1) & {ADDR_WIDTH - 2 {1'b1}}) == raddr_next[ADDR_WIDTH - 1:2]; p2 = ((waddr[ADDR_WIDTH - 1:2] + 1) & {ADDR_WIDTH - 2 {1'b1}}) == raddr_next[ADDR_WIDTH - 1:2]; end endcase 2'h1: - case (depth) - 3'h0: begin + case (DEPTH) + 3'h6: begin f1 = {~waddr_next[11], waddr_next[10:1]} == raddr_next[11:1]; f2 = {~waddr[11], waddr[10:1]} == raddr_next[11:1]; p1 = ((waddr_next[10:1] + 1) & 10'h3ff) == raddr_next[10:1]; p2 = ((waddr[10:1] + 1) & 10'h3ff) == raddr_next[10:1]; end - 3'h1: begin + 3'h5: begin f1 = {~waddr_next[10], waddr_next[9:1]} == raddr_next[10:1]; f2 = {~waddr[10], waddr[9:1]} == raddr_next[10:1]; p1 = ((waddr_next[9:1] + 1) & 9'h1ff) == raddr_next[9:1]; p2 = ((waddr[9:1] + 1) & 9'h1ff) == raddr_next[9:1]; end - 3'h2: begin + 3'h4: begin f1 = {~waddr_next[9], waddr_next[8:1]} == raddr_next[9:1]; f2 = {~waddr[9], waddr[8:1]} == raddr_next[9:1]; p1 = ((waddr_next[8:1] + 1) & 8'hff) == raddr_next[8:1]; @@ -280,19 +274,19 @@ module fifo_push ( p1 = ((waddr_next[7:1] + 1) & 7'h7f) == raddr_next[7:1]; p2 = ((waddr[7:1] + 1) & 7'h7f) == raddr_next[7:1]; end - 3'h4: begin + 3'h2: begin f1 = {~waddr_next[7], waddr_next[6:1]} == raddr_next[7:1]; f2 = {~waddr[7], waddr[6:1]} == raddr_next[7:1]; p1 = ((waddr_next[6:1] + 1) & 6'h3f) == raddr_next[6:1]; p2 = ((waddr[6:1] + 1) & 6'h3f) == raddr_next[6:1]; end - 3'h5: begin + 3'h1: begin f1 = {~waddr_next[6], waddr_next[5:1]} == raddr_next[6:1]; f2 = {~waddr[6], waddr[5:1]} == raddr_next[6:1]; p1 = ((waddr_next[5:1] + 1) & 5'h1f) == raddr_next[5:1]; p2 = ((waddr[5:1] + 1) & 5'h1f) == raddr_next[5:1]; end - 3'h6: begin + 3'h0: begin f1 = {~waddr_next[5], waddr_next[4:1]} == raddr_next[5:1]; f2 = {~waddr[5], waddr[4:1]} == raddr_next[5:1]; p1 = ((waddr_next[4:1] + 1) & 4'hf) == raddr_next[4:1]; @@ -300,26 +294,26 @@ module fifo_push ( end 3'h7: begin f1 = {~waddr_next[ADDR_WIDTH], waddr_next[ADDR_WIDTH - 1:1]} == raddr_next[ADDR_WIDTH:1]; - f2 = {~waddr[11], waddr[ADDR_WIDTH - 1:1]} == raddr_next[ADDR_WIDTH:1]; + f2 = {~waddr[ADDR_WIDTH], waddr[ADDR_WIDTH - 1:1]} == raddr_next[ADDR_WIDTH:1]; p1 = ((waddr_next[ADDR_WIDTH - 1:1] + 1) & {ADDR_WIDTH - 1 {1'b1}}) == raddr_next[ADDR_WIDTH - 1:1]; p2 = ((waddr[ADDR_WIDTH - 1:1] + 1) & {ADDR_WIDTH - 1 {1'b1}}) == raddr_next[ADDR_WIDTH - 1:1]; end endcase 2'h2: - case (depth) - 3'h0: begin + case (DEPTH) + 3'h6: begin f1 = {~waddr_next[11], waddr_next[10:0]} == raddr_next[11:0]; f2 = {~waddr[11], waddr[10:0]} == raddr_next[11:0]; p1 = ((waddr_next[10:0] + 1) & 11'h7ff) == raddr_next[10:0]; p2 = ((waddr[10:0] + 1) & 11'h7ff) == raddr_next[10:0]; end - 3'h1: begin + 3'h5: begin f1 = {~waddr_next[10], waddr_next[9:0]} == raddr_next[10:0]; f2 = {~waddr[10], waddr[9:0]} == raddr_next[10:0]; p1 = ((waddr_next[9:0] + 1) & 10'h3ff) == raddr_next[9:0]; p2 = ((waddr[9:0] + 1) & 10'h3ff) == raddr_next[9:0]; end - 3'h2: begin + 3'h4: begin f1 = {~waddr_next[9], waddr_next[8:0]} == raddr_next[9:0]; f2 = {~waddr[9], waddr[8:0]} == raddr_next[9:0]; p1 = ((waddr_next[8:0] + 1) & 9'h1ff) == raddr_next[8:0]; @@ -331,19 +325,19 @@ module fifo_push ( p1 = ((waddr_next[7:0] + 1) & 8'hff) == raddr_next[7:0]; p2 = ((waddr[7:0] + 1) & 8'hff) == raddr_next[7:0]; end - 3'h4: begin + 3'h2: begin f1 = {~waddr_next[7], waddr_next[6:0]} == raddr_next[7:0]; f2 = {~waddr[7], waddr[6:0]} == raddr_next[7:0]; p1 = ((waddr_next[6:0] + 1) & 7'h7f) == raddr_next[6:0]; p2 = ((waddr[6:0] + 1) & 7'h7f) == raddr_next[6:0]; end - 3'h5: begin + 3'h1: begin f1 = {~waddr_next[6], waddr_next[5:0]} == raddr_next[6:0]; f2 = {~waddr[6], waddr[5:0]} == raddr_next[6:0]; p1 = ((waddr_next[5:0] + 1) & 6'h3f) == raddr_next[5:0]; p2 = ((waddr[5:0] + 1) & 6'h3f) == raddr_next[5:0]; end - 3'h6: begin + 3'h0: begin f1 = {~waddr_next[5], waddr_next[4:0]} == raddr_next[5:0]; f2 = {~waddr[5], waddr[4:0]} == raddr_next[5:0]; p1 = ((waddr_next[4:0] + 1) & 5'h1f) == raddr_next[4:0]; @@ -380,42 +374,42 @@ module fifo_push ( 2'h2: gcout_next = gc8out_next; 2'h1: gcout_next = {1'b0, gc16out_next}; 2'h0: gcout_next = {2'b00, gc32out_next}; - default: gcout_next = 12'h000; + default: gcout_next = {ADDR_PLUS_ONE {1'b0}}; endcase else - gcout_next = 12'h000; + gcout_next = {ADDR_PLUS_ONE {1'b0}}; always @(posedge wclk or negedge rst_n) if (~rst_n) begin - full <= #(1) 1'b0; - fmo <= #(1) 1'b0; - paf <= #(1) 1'b0; - raddr <= #(1) ADDR_WIDTH + 1'h0; + full <= 1'b0; + fmo <= 1'b0; + paf <= 1'b0; + raddr <= {ADDR_PLUS_ONE {1'b0}}; end else begin - full <= #(1) full_next; - fmo <= #(1) fmo_next; - paf <= #(1) paf_next; + full <= full_next; + fmo <= fmo_next; + paf <= paf_next; case (gmode) - 0: raddr <= #(1) raddr_next & {{ADDR_WIDTH - 1 {1'b1}}, 2'b00}; - 1: raddr <= #(1) raddr_next & {{ADDR_WIDTH {1'b1}}, 1'b0}; - 2: raddr <= #(1) raddr_next & {ADDR_WIDTH + 1 {1'b1}}; - 3: raddr <= #(1) 12'h000; + 0: raddr <= raddr_next & {{ADDR_WIDTH - 1 {1'b1}}, 2'b00}; + 1: raddr <= raddr_next & {{ADDR_WIDTH {1'b1}}, 1'b0}; + 2: raddr <= raddr_next & {ADDR_WIDTH + 1 {1'b1}}; + 3: raddr <= 12'h000; endcase end assign overflow_next = full & wen; always @(posedge wclk or negedge rst_n) if (~rst_n) - overflow <= #(1) 1'b0; + overflow <= 1'b0; else if (wen == 1'b1) - overflow <= #(1) overflow_next; + overflow <= overflow_next; always @(posedge wclk or negedge rst_n) if (~rst_n) begin - waddr <= #(1) {ADDR_WIDTH + 1 {1'b0}}; - gcout_reg <= #(1) {ADDR_WIDTH + 1 {1'b0}}; + waddr <= {ADDR_WIDTH + 1 {1'b0}}; + gcout_reg <= {ADDR_WIDTH + 1 {1'b0}}; end else if (wen == 1'b1) begin - waddr <= #(1) waddr_next; - gcout_reg <= #(1) gcout_next; + waddr <= waddr_next; + gcout_reg <= gcout_next; end assign gcout = gcout_reg; generate @@ -431,7 +425,7 @@ module fifo_push ( default: raddr_next = {ADDR_WIDTH + 1 {1'b0}}; endcase assign ff_waddr = waddr[ADDR_WIDTH - 1:0]; - assign pushflags = (rst_n ? {full, fmo, paf, overflow} : 4'b1111); + assign pushflags = {full, fmo, paf, overflow}; assign waddr_next = waddr + (wmode == 2'h0 ? 'h4 : (wmode == 2'h1 ? 'h2 : 'h1)); endmodule module fifo_pop ( @@ -445,23 +439,24 @@ module fifo_pop ( rmode, wmode, gcin, - depth, upae ); parameter ADDR_WIDTH = 11; parameter FIFO_WIDTH = 3'd2; + parameter DEPTH = 6; output wire ren_o; output wire [3:0] popflags; output reg [ADDR_WIDTH - 1:0] out_raddr; output wire [ADDR_WIDTH:0] gcout; input rst_n; + (* clkbuf_sink *) input rclk; input ren_in; input [1:0] rmode; input [1:0] wmode; input [ADDR_WIDTH:0] gcin; input [ADDR_WIDTH - 1:0] upae; - input [2:0] depth; + localparam ADDR_PLUS_ONE = ADDR_WIDTH + 1; reg empty; reg epo; reg pae; @@ -491,24 +486,14 @@ module fifo_pop ( wire [ADDR_WIDTH:0] raddr_next; wire [ADDR_WIDTH - 1:0] ff_raddr_next; wire [ADDR_WIDTH:0] tmp; - wire [ADDR_WIDTH:0] next_count; - wire [ADDR_WIDTH:0] count; - reg [ADDR_WIDTH:0] fbytes; + wire [ADDR_PLUS_ONE:0] next_count; + wire [ADDR_PLUS_ONE:0] count; + wire [ADDR_PLUS_ONE:0] fbytes; genvar i; assign next_count = waddr - raddr_next; assign count = waddr - raddr; - always @(*) - case (depth) - 3'b000: fbytes = 'd2048; - 3'b001: fbytes = 'd1024; - 3'b010: fbytes = 'd512; - 3'b011: fbytes = 'd256; - 3'b100: fbytes = 'd128; - 3'b101: fbytes = 'd64; - 3'b110: fbytes = 'd32; - 3'b111: fbytes = 'd4096; - endcase - always @(*) pae_thresh = rmode ? (rmode[0] ? upae << 1 : upae) : upae << 2; + assign fbytes = 1 << (DEPTH + 5); + always @(*) pae_thresh = rmode[1] ? upae : (rmode[0] ? upae << 1 : upae << 2); assign ren_out = (empty ? 1'b1 : ren_in); always @(*) case (rmode) @@ -522,8 +507,8 @@ module fifo_pop ( e2 = 1'b0; o1 = 1'b0; o2 = 1'b0; - q1 = next_count < pae_thresh; - q2 = count < pae_thresh; + q1 = next_count < {1'b0, pae_thresh}; + q2 = count < {1'b0, pae_thresh}; case (rmode) 2'h0: begin e1 = raddr_next[ADDR_WIDTH:2] == waddr_next[ADDR_WIDTH:2]; @@ -556,14 +541,14 @@ module fifo_pop ( assign pae_next = (ren_in & !empty ? q1 : q2); always @(posedge rclk or negedge rst_n) if (~rst_n) begin - empty <= #(1) 1'b1; - pae <= #(1) 1'b1; - epo <= #(1) 1'b0; + empty <= 1'b1; + pae <= 1'b1; + epo <= 1'b0; end else begin - empty <= #(1) empty_next; - pae <= #(1) pae_next; - epo <= #(1) epo_next; + empty <= empty_next; + pae <= pae_next; + epo <= epo_next; end assign gc8out_next = (raddr_next >> 1) ^ raddr_next; assign gc16out_next = (raddr_next >> 2) ^ (raddr_next >> 1); @@ -580,20 +565,20 @@ module fifo_pop ( gcout_next = 'h0; always @(posedge rclk or negedge rst_n) if (~rst_n) - waddr <= #(1) 12'h000; + waddr <= 12'h000; else - waddr <= #(1) waddr_next; + waddr <= waddr_next; always @(posedge rclk or negedge rst_n) if (~rst_n) begin - underflow <= #(1) 1'b0; - bwl_sel <= #(1) 2'h0; - gcout_reg <= #(1) 12'h000; + underflow <= 1'b0; + bwl_sel <= 2'h0; + gcout_reg <= 12'h000; end else if (ren_in) begin - underflow <= #(1) empty; + underflow <= empty; if (!empty) begin - bwl_sel <= #(1) raddr_next[1:0]; - gcout_reg <= #(1) gcout_next; + bwl_sel <= raddr_next[1:0]; + gcout_reg <= gcout_next; end end generate @@ -603,32 +588,33 @@ module fifo_pop ( endgenerate always @(*) case (gmode) - 2'h0: waddr_next = {tmp[9:0], 2'b00} & 12'hffc; - 2'h1: waddr_next = {tmp[10:0], 1'b0} & 12'hffe; - 2'h2: waddr_next = {tmp[11:0]} & 12'hfff; - default: waddr_next = 12'h000; + 2'h0: waddr_next = {tmp[ADDR_WIDTH - 2:0], 2'b00} & {{ADDR_WIDTH - 1 {1'b1}}, 2'b00}; + 2'h1: waddr_next = {tmp[ADDR_WIDTH - 1:0], 1'b0} & {{ADDR_WIDTH {1'b1}}, 1'b0}; + 2'h2: waddr_next = {tmp[ADDR_WIDTH:0]} & {ADDR_PLUS_ONE {1'b1}}; + default: waddr_next = {ADDR_PLUS_ONE {1'b0}}; endcase assign ff_raddr_next = ff_raddr + (rmode == 2'h0 ? 'h4 : (rmode == 2'h1 ? 'h2 : 'h1)); assign raddr_next = raddr + (rmode == 2'h0 ? 'h4 : (rmode == 2'h1 ? 'h2 : 'h1)); always @(posedge rclk or negedge rst_n) if (~rst_n) - ff_raddr <= #(1) 1'sb0; + ff_raddr <= 1'sb0; else if (empty & ~empty_next) - ff_raddr <= #(1) raddr_next[10:0]; + ff_raddr <= raddr_next[ADDR_WIDTH - 1:0]; else if ((ren_in & !empty) & ~empty_next) - ff_raddr <= #(1) ff_raddr_next; + ff_raddr <= ff_raddr_next; always @(posedge rclk or negedge rst_n) if (~rst_n) - raddr <= #(1) 12'h000; + raddr <= 12'h000; else if (ren_in & !empty) - raddr <= #(1) raddr_next; + raddr <= raddr_next; always @(*) case (FIFO_WIDTH) + 3'h2: out_raddr = {ff_raddr[ADDR_WIDTH - 1:1], bwl_sel[0]}; + 3'h4: out_raddr = {ff_raddr[ADDR_WIDTH - 1:2], bwl_sel}; default: out_raddr = ff_raddr[ADDR_WIDTH - 1:0]; - 2: out_raddr = {ff_raddr[ADDR_WIDTH - 1:1], bwl_sel[0]}; - 4: out_raddr = {ff_raddr[ADDR_WIDTH - 1:2], bwl_sel}; endcase assign ren_o = ren_out; assign gcout = gcout_reg; assign popflags = {empty, epo, pae, underflow}; endmodule +`default_nettype none From ca48b84dff04e82b2daf86207c6e4e226b356cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 16 Mar 2022 09:14:04 +0100 Subject: [PATCH 727/845] ql-qlf: k6n10f: bram: fix cell assertion in synthesis tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl | 8 ++++---- ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl index 5e9379ed7..2a161c145 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl @@ -13,7 +13,7 @@ opt_expr -undriven opt_clean stat write_verilog sim/bram_sdp_32x512_post_synth.v -select -assert-count 1 t:TDP_BRAM36 +select -assert-count 1 t:TDP36K select -clear design -load bram_sdp @@ -24,7 +24,7 @@ opt_expr -undriven opt_clean stat write_verilog sim/bram_sdp_16x1024_post_synth.v -select -assert-count 1 t:TDP_BRAM36 +select -assert-count 1 t:TDP36K select -clear design -load bram_sdp @@ -35,7 +35,7 @@ opt_expr -undriven opt_clean stat write_verilog sim/bram_sdp_8x2048_post_synth.v -select -assert-count 1 t:TDP_BRAM36 +select -assert-count 1 t:TDP36K select -clear design -load bram_sdp @@ -46,5 +46,5 @@ opt_expr -undriven opt_clean stat write_verilog sim/bram_sdp_4x4096_post_synth.v -select -assert-count 1 t:TDP_BRAM36 +select -assert-count 1 t:TDP36K diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl index f3a53490e..5fd14e464 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl @@ -13,7 +13,7 @@ opt_expr -undriven opt_clean stat write_verilog sim/bram_tdp_32x512_post_synth.v -select -assert-count 1 t:TDP_BRAM36 +select -assert-count 1 t:TDP36K select -clear design -load bram_tdp @@ -24,7 +24,7 @@ opt_expr -undriven opt_clean stat write_verilog sim/bram_tdp_16x1024_post_synth.v -select -assert-count 1 t:TDP_BRAM36 +select -assert-count 1 t:TDP36K select -clear design -load bram_tdp @@ -35,7 +35,7 @@ opt_expr -undriven opt_clean stat write_verilog sim/bram_tdp_8x2048_post_synth.v -select -assert-count 1 t:TDP_BRAM36 +select -assert-count 1 t:TDP36K select -clear design -load bram_tdp @@ -46,5 +46,5 @@ opt_expr -undriven opt_clean stat write_verilog sim/bram_tdp_4x4096_post_synth.v -select -assert-count 1 t:TDP_BRAM36 +select -assert-count 1 t:TDP36K From 25d228f2c6a846d01504d674ca071914deaf468e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 17 Mar 2022 11:34:11 +0100 Subject: [PATCH 728/845] ql-qlf: k6n10f: tests: add 36bit fifo simulation test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/Makefile | 3 +- .../qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v | 2355 +++++++++++++++++ 2 files changed, 2357 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index ad507f6a0..2e569bf7f 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -37,7 +37,8 @@ TESTS = consts \ SIM_TESTS = \ qlf_k6n10f/sim_dsp_mult \ qlf_k6n10f/sim_dsp_mult_r \ - qlf_k6n10f/sim_dsp_fir + qlf_k6n10f/sim_dsp_fir \ + qlf_k6n10f/sim_tc36fifo # Those tests perform synthesis and simulation of synthesis results POST_SYNTH_SIM_TESTS = \ diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v new file mode 100644 index 000000000..105967b99 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v @@ -0,0 +1,2355 @@ +// Copyright (C) 2022 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +`include "qlf_k6n10f/cells_sim.v" +`timescale 1ns/1ps + +module tb; + localparam [11:0] UPAE1 = 10; + localparam [11:0] UPAF1 = 10; + localparam [10:0] UPAE2 = 10; + localparam [10:0] UPAF2 = 10; + localparam [0:0] SPLIT = 0; + localparam [0:0] SYNC_FIFO1 = 0; + localparam [0:0] SYNC_FIFO2 = 0; + localparam [0:0] FMODE1 = 1; + localparam [0:0] POWERDN1 = 0; + localparam [0:0] SLEEP1 = 0; + localparam [0:0] PROTECT1 = 0; + localparam [0:0] FMODE2 = 0; + localparam [0:0] POWERDN2 = 0; + localparam [0:0] SLEEP2 = 0; + localparam [0:0] PROTECT2 = 0; + localparam [2:0] RMODE_A1 = MODE_36; + localparam [2:0] RMODE_B1 = MODE_36; + localparam [2:0] WMODE_A1 = MODE_36; + localparam [2:0] WMODE_B1 = MODE_36; + localparam [2:0] RMODE_A2 = MODE_36; + localparam [2:0] RMODE_B2 = MODE_36; + localparam [2:0] WMODE_A2 = MODE_36; + localparam [2:0] WMODE_B2 = MODE_36; + + localparam W_PERIOD = 30; + localparam R_PERIOD = 29; + reg WEN_A1; + reg WEN_B1; + reg REN_A1; + reg REN_B1; + reg CLK_A1; + reg CLK_B1; + reg [1:0] BE_A1; + reg [1:0] BE_B1; + reg [14:0] ADDR_A1; + reg [14:0] ADDR_B1; + reg [17:0] WDATA_A1; + reg [17:0] WDATA_B1; + wire [17:0] RDATA_A1; + wire [17:0] RDATA_B1; + wire UNDERRUN1; + wire OVERRUN1; + wire UNDERRUN2; + wire OVERRUN2; + wire EMPTY1; + wire EPO1; + wire EWM1; + wire FULL1; + wire FMO1; + wire FWM1; + reg FLUSH1; + reg WEN_A2; + reg WEN_B2; + reg REN_A2; + reg REN_B2; + reg CLK_A2; + reg CLK_B2; + reg [1:0] BE_A2; + reg [1:0] BE_B2; + wire [13:0] ADDR_A2; + wire [13:0] ADDR_B2; + reg [17:0] WDATA_A2; + reg [17:0] WDATA_B2; + wire [17:0] RDATA_A2; + wire [17:0] RDATA_B2; + wire EMPTY2; + wire EPO2; + wire EWM2; + wire FULL2; + wire FMO2; + wire FWM2; + reg FLUSH2; + wire [17:0] RDATA_A18; + wire [17:0] RDATA_B18; + wire [8:0] RDATA_A9; + wire [8:0] RDATA_B9; + wire [35:0] expected_data_a; + wire [35:0] expected_data_b; + wire [35:0] last_expected_a; + wire [35:0] last_expected_b; + wire [17:0] last_expected_a18; + wire [17:0] last_expected_b18; + wire [8:0] last_expected_a9; + wire [8:0] last_expected_b9; + wire [14:0] last_addr_a; + wire [14:0] last_addr_b; + wire valid_a; + wire valid_b; + wire [3:0] index4_a; + wire [3:0] index4_b; + wire [1:0] index2_a; + wire [1:0] index2_b; + wire index_a; + wire index_b; + reg last_empty1; + wire last_empty2; + wire [35:0] fifo_dout; + wire [35:0] fifo_din; + localparam MODE_36 = 3'b011; + task fA_36x36; + begin + $display("%d: Fifo 36-bit write 36-bit read", $time); + FLUSH1 = 1; + @(posedge CLK_A1); + @(posedge CLK_B1); + FLUSH1 = 0; + end + endtask + task fA_push36; + input [35:0] data; + begin + @(negedge CLK_A1) begin + WDATA_A2 = data[35:18]; + WDATA_A1 = data[17:0]; + WEN_A1 = 1; + end + @(posedge CLK_A1) + #(2) WEN_A1 = 0; + end + endtask + task fA_pop; + input [35:0] expected; + input [35:0] msk; + begin + if (last_empty1 || EMPTY1) + while (EMPTY1 == 1) begin + @(posedge CLK_B1); + end + if (({RDATA_B2, RDATA_B1} & msk) !== expected) begin + $display("%d: POP FIFO ERROR: mismatch: expected = %9x mask = %5x, actuall = %9x", $time, expected, msk, {RDATA_B2, RDATA_B1}); + error_cnt = error_cnt + 1'b1; + end + @(negedge CLK_B1) REN_B1 = 1; + @(posedge CLK_B1) + #(2) REN_B1 = 0; + end + endtask + integer wcount_a; + integer rcount_a; + integer state_a; + integer wcount_b; + integer rcount_b; + integer state_b; + integer error_cnt = 0; + initial CLK_A1 = 0; + initial CLK_B1 = 0; + initial CLK_A2 = 0; + initial CLK_B2 = 0; + initial forever #(R_PERIOD) CLK_A1 = ~CLK_A1; + initial forever #(W_PERIOD) CLK_B1 = ~CLK_B1; + initial forever #(R_PERIOD) CLK_A2 = ~CLK_A2; + initial forever #(W_PERIOD) CLK_B2 = ~CLK_B2; + initial begin + $dumpfile(`VCD_FILE); + $dumpvars(0, tb); + end + initial #(1) begin + WEN_A1 = 0; + REN_A1 = 0; + WEN_B1 = 0; + REN_B1 = 0; + BE_A1 = 2'b11; + BE_A2 = 2'b11; + BE_B1 = 2'b11; + BE_B2 = 2'b11; + ADDR_A1 = 14'b00000000000000; + ADDR_B1 = 14'b00000000000000; + WDATA_A1 = 18'b000000000000000000; + WDATA_B1 = 18'h00000; + wcount_a = 0; + rcount_a = 0; + state_a = 0; + wcount_b = 0; + rcount_b = 0; + state_b = 0; + WEN_A2 = 0; + REN_A2 = 0; + WEN_B2 = 0; + REN_B2 = 0; + FLUSH1 = 0; + FLUSH2 = 0; + end + initial begin + #(100) + @(posedge CLK_A1); + @(posedge CLK_B1); + end + assign fifo_dout = {RDATA_B2, RDATA_B1}; + assign fifo_din = {WDATA_A2, WDATA_A1}; + assign {EMPTY1, EPO1, EWM1, UNDERRUN1, FULL1, FMO1, FWM1, OVERRUN1} = RDATA_A1[7:0]; + assign {EMPTY2, EPO2, EWM2, UNDERRUN2, FULL2, FMO2, FWM2, OVERRUN2} = RDATA_A2[7:0]; + always @(posedge CLK_B1) last_empty1 <= EMPTY1; + always @(*) + case (state_a) + 0: begin + fA_36x36; + if (!EMPTY1) begin + $display("%d: FIFO ERROR: EMPTY flag not set", $time); + error_cnt = error_cnt + 1'b1; + end + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + if (!EMPTY1) begin + $display("%d: FIFO ERROR: EMPTY flag not set", $time); + error_cnt = error_cnt + 1'b1; + end + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + if (!EMPTY1) begin + $display("%d: FIFO ERROR: EMPTY flag not set", $time); + error_cnt = error_cnt + 1'b1; + end + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + fA_push36(36'h0a5a5a5a5); + fA_push36(36'h05a5a5a5a); + if (!FULL1) begin + $display("%d: FIFO ERROR: FULL flag not set", $time); + error_cnt = error_cnt + 1'b1; + end + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + fA_pop(36'h0a5a5a5a5, {36 {1'b1}}); + fA_pop(36'h05a5a5a5a, {36 {1'b1}}); + if (!EMPTY1) begin + $display("%d: FIFO ERROR: EMPTY flag not set", $time); + error_cnt = error_cnt + 1'b1; + end + @(posedge CLK_A1); + @(posedge CLK_B1); + @(posedge CLK_A1); + @(posedge CLK_B1); + @(posedge CLK_A1); + @(posedge CLK_B1); + @(posedge CLK_A1); + @(posedge CLK_B1); + @(posedge CLK_A1); + @(posedge CLK_B1); + @(posedge CLK_A1); + @(posedge CLK_B1); + $finish_and_return( (error_cnt == 0) ? 0 : -1 ); + end + endcase + + TDP36K #( + .MODE_BITS({SPLIT, UPAF2, UPAE2, PROTECT2, SLEEP2, POWERDN2, FMODE2, WMODE_B2, WMODE_A2, RMODE_B2, RMODE_A2, SYNC_FIFO2, UPAF1, UPAE1, PROTECT1, SLEEP1, POWERDN1, FMODE1, WMODE_B1, WMODE_A1, RMODE_B1, RMODE_A1, SYNC_FIFO1}) + )tdp36_1( + .CLK_A1_i(CLK_A1), + .CLK_B1_i(CLK_B1), + .WEN_A1_i(WEN_A1), + .WEN_B1_i(WEN_B1), + .REN_A1_i(REN_A1), + .REN_B1_i(REN_B1), + .BE_A1_i(BE_A1), + .BE_B1_i(BE_B1), + .ADDR_A1_i(ADDR_A1), + .ADDR_B1_i(ADDR_B1), + .WDATA_A1_i(WDATA_A1), + .WDATA_B1_i(WDATA_B1), + .RDATA_A1_o(RDATA_A1), + .RDATA_B1_o(RDATA_B1), + .FLUSH1_i(FLUSH1), + .CLK_A2_i(CLK_A2), + .CLK_B2_i(CLK_B2), + .WEN_A2_i(WEN_A2), + .WEN_B2_i(WEN_B2), + .REN_A2_i(REN_A2), + .REN_B2_i(REN_B2), + .BE_A2_i(BE_A2), + .BE_B2_i(BE_B2), + .ADDR_A2_i(ADDR_A2), + .ADDR_B2_i(ADDR_B2), + .WDATA_A2_i(WDATA_A2), + .WDATA_B2_i(WDATA_B2), + .RDATA_A2_o(RDATA_A2), + .RDATA_B2_o(RDATA_B2), + .FLUSH2_i(FLUSH2) + ); +endmodule From 43f41e38d701ba48405eda973a167c7a853aac4d Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Thu, 14 Apr 2022 13:10:53 +0200 Subject: [PATCH 729/845] Add README to UHDM plugin Signed-off-by: Tomasz Gorochowik --- uhdm-plugin/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 uhdm-plugin/README.md diff --git a/uhdm-plugin/README.md b/uhdm-plugin/README.md new file mode 100644 index 000000000..cecd42706 --- /dev/null +++ b/uhdm-plugin/README.md @@ -0,0 +1,6 @@ +# UHDM Plugin + +The UHDM plugin has been renamed to [SystemVerilog](../systemverilog-plugin/). + +It is kept here for backwards compatibility reasons. +When loaded, it shows a warning and loads the `SystemVerilog` plugin (if available). From 91f6d3aca8282bb046dfaaa17cb101878339658f Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Thu, 14 Apr 2022 13:25:38 +0200 Subject: [PATCH 730/845] Add README for the SystemVerilog plugin Signed-off-by: Tomasz Gorochowik --- systemverilog-plugin/README.md | 102 +++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 systemverilog-plugin/README.md diff --git a/systemverilog-plugin/README.md b/systemverilog-plugin/README.md new file mode 100644 index 000000000..c8a12ce49 --- /dev/null +++ b/systemverilog-plugin/README.md @@ -0,0 +1,102 @@ +# 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 ` 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. From 931a2f51bf04f377c69e879e3951303cfbfae718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 14 Apr 2022 14:01:33 +0200 Subject: [PATCH 731/845] ql-qlf: sim: declare all ports with explicit net types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 350 +++++++++++++-------------- 1 file changed, 175 insertions(+), 175 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index c9c881e36..a77f76ccf 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -14,12 +14,14 @@ // // SPDX-License-Identifier: Apache-2.0 +`default_nettype none + (* abc9_flop, lib_whitebox *) module sh_dff( output reg Q, - input D, + input wire D, (* clkbuf_sink *) - input C + input wire C ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -30,11 +32,11 @@ endmodule (* abc9_box, lib_blackbox *) module adder_carry( - output sumout, - output cout, - input p, - input g, - input cin + output wire sumout, + output wire cout, + input wire p, + input wire g, + input wire cin ); assign sumout = p ^ cin; assign cout = p ? cin : g; @@ -43,12 +45,12 @@ endmodule (* abc9_box, lib_whitebox *) module adder_lut5( - output lut5_out, + output wire lut5_out, (* abc9_carry *) - output cout, - input [0:4] in, + output wire cout, + input wire [0:4] in, (* abc9_carry *) - input cin + input wire cin ); parameter [0:15] LUT=0; parameter IN2_IS_CIN = 0; @@ -77,10 +79,10 @@ endmodule (* abc9_lut=1, lib_whitebox *) module frac_lut6( - input [0:5] in, - output [0:3] lut4_out, - output [0:1] lut5_out, - output lut6_out + input wire [0:5] in, + output wire [0:3] lut4_out, + output wire [0:1] lut5_out, + output wire lut6_out ); parameter [0:63] LUT = 0; // Effective LUT input @@ -127,10 +129,10 @@ endmodule (* abc9_flop, lib_whitebox *) module dff( output reg Q, - input D, + input wire D, (* clkbuf_sink *) (* invertible_pin = "IS_C_INVERTED" *) - input C + input wire C ); parameter [0:0] INIT = 1'b0; parameter [0:0] IS_C_INVERTED = 1'b0; @@ -148,11 +150,11 @@ endmodule (* abc9_flop, lib_whitebox *) module dffr( output reg Q, - input D, - input R, + input wire D, + input wire R, (* clkbuf_sink *) (* invertible_pin = "IS_C_INVERTED" *) - input C + input wire C ); parameter [0:0] INIT = 1'b0; parameter [0:0] IS_C_INVERTED = 1'b0; @@ -176,12 +178,12 @@ endmodule (* abc9_flop, lib_whitebox *) module dffre( output reg Q, - input D, - input R, - input E, + input wire D, + input wire R, + input wire E, (* clkbuf_sink *) (* invertible_pin = "IS_C_INVERTED" *) - input C + input wire C ); parameter [0:0] INIT = 1'b0; parameter [0:0] IS_C_INVERTED = 1'b0; @@ -204,11 +206,11 @@ endmodule module dffs( output reg Q, - input D, + input wire D, (* clkbuf_sink *) (* invertible_pin = "IS_C_INVERTED" *) - input C, - input S + input wire C, + input wire S ); parameter [0:0] INIT = 1'b0; parameter [0:0] IS_C_INVERTED = 1'b0; @@ -231,12 +233,12 @@ endmodule module dffse( output reg Q, - input D, + input wire D, (* clkbuf_sink *) (* invertible_pin = "IS_C_INVERTED" *) - input C, - input S, - input E + input wire C, + input wire S, + input wire E ); parameter [0:0] INIT = 1'b0; parameter [0:0] IS_C_INVERTED = 1'b0; @@ -259,12 +261,12 @@ endmodule module dffsr( output reg Q, - input D, + input wire D, (* clkbuf_sink *) (* invertible_pin = "IS_C_INVERTED" *) - input C, - input R, - input S + input wire C, + input wire R, + input wire S ); parameter [0:0] INIT = 1'b0; parameter [0:0] IS_C_INVERTED = 1'b0; @@ -291,12 +293,12 @@ endmodule module dffsre( output reg Q, - input D, + input wire D, (* clkbuf_sink *) - input C, - input E, - input R, - input S + input wire C, + input wire E, + input wire R, + input wire S ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -313,12 +315,12 @@ endmodule module dffnsre( output reg Q, - input D, + input wire D, (* clkbuf_sink *) - input C, - input E, - input R, - input S + input wire C, + input wire E, + input wire R, + input wire S ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -336,11 +338,11 @@ endmodule (* abc9_flop, lib_whitebox *) module latchsre ( output reg Q, - input S, - input R, - input D, - input G, - input E + input wire S, + input wire R, + input wire D, + input wire G, + input wire E ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -358,11 +360,11 @@ endmodule (* abc9_flop, lib_whitebox *) module latchnsre ( output reg Q, - input S, - input R, - input D, - input G, - input E + input wire S, + input wire R, + input wire D, + input wire G, + input wire E ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -380,8 +382,8 @@ endmodule (* abc9_flop, lib_whitebox *) module scff( output reg Q, - input D, - input clk + input wire D, + input wire clk ); parameter [0:0] INIT = 1'b0; initial Q = INIT; @@ -392,29 +394,29 @@ endmodule module TDP_BRAM18 ( (* clkbuf_sink *) - input CLOCKA, + input wire CLOCKA, (* clkbuf_sink *) - input CLOCKB, - input READENABLEA, - input READENABLEB, - input [13:0] ADDRA, - input [13:0] ADDRB, - input [15:0] WRITEDATAA, - input [15:0] WRITEDATAB, - input [1:0] WRITEDATAAP, - input [1:0] WRITEDATABP, - input WRITEENABLEA, - input WRITEENABLEB, - input [1:0] BYTEENABLEA, - input [1:0] BYTEENABLEB, - //input [2:0] WRITEDATAWIDTHA, - //input [2:0] WRITEDATAWIDTHB, - //input [2:0] READDATAWIDTHA, - //input [2:0] READDATAWIDTHB, - output [15:0] READDATAA, - output [15:0] READDATAB, - output [1:0] READDATAAP, - output [1:0] READDATABP + input wire CLOCKB, + input wire READENABLEA, + input wire READENABLEB, + input wire [13:0] ADDRA, + input wire [13:0] ADDRB, + input wire [15:0] WRITEDATAA, + input wire [15:0] WRITEDATAB, + input wire [1:0] WRITEDATAAP, + input wire [1:0] WRITEDATABP, + input wire WRITEENABLEA, + input wire WRITEENABLEB, + input wire [1:0] BYTEENABLEA, + input wire [1:0] BYTEENABLEB, + //input wire [2:0] WRITEDATAWIDTHA, + //input wire [2:0] WRITEDATAWIDTHB, + //input wire [2:0] READDATAWIDTHA, + //input wire [2:0] READDATAWIDTHB, + output wire [15:0] READDATAA, + output wire [15:0] READDATAB, + output wire [1:0] READDATAAP, + output wire [1:0] READDATABP ); parameter INITP_00 = 256'h0000000000000000000000000000000000000000000000000000000000000000; parameter INITP_01 = 256'h0000000000000000000000000000000000000000000000000000000000000000; @@ -495,7 +497,6 @@ module TDP_BRAM18 ( endmodule -`default_nettype wire module TDP36K ( RESET_ni, WEN_A1_i, @@ -705,7 +706,7 @@ module TDP36K ( parameter INIT_7E = 256'h0000000000000000000000000000000000000000000000000000000000000000; parameter INIT_7F = 256'h0000000000000000000000000000000000000000000000000000000000000000; - input RESET_ni; + input wire RESET_ni; input wire WEN_A1_i; input wire WEN_B1_i; input wire REN_A1_i; @@ -1153,50 +1154,49 @@ module TDP36K ( .FMODE_i(ram_fmode2) ); endmodule -`default_nettype none (* blackbox *) module QL_DSP1 ( - input [19:0] a, - input [17:0] b, + input wire [19:0] a, + input wire [17:0] b, (* clkbuf_sink *) - input clk0, + input wire clk0, (* clkbuf_sink *) - input clk1, - input [ 1:0] feedback0, - input [ 1:0] feedback1, - input load_acc0, - input load_acc1, - input reset0, - input reset1, + input wire clk1, + input wire [ 1:0] feedback0, + input wire [ 1:0] feedback1, + input wire load_acc0, + input wire load_acc1, + input wire reset0, + input wire reset1, output reg [37:0] z ); parameter MODE_BITS = 27'b00000000000000000000000000; endmodule /* QL_DSP1 */ module QL_DSP2 ( // TODO: Name subject to change - input [19:0] a, - input [17:0] b, - input [ 5:0] acc_fir, - output [37:0] z, - output [17:0] dly_b, + input wire [19:0] a, + input wire [17:0] b, + input wire [ 5:0] acc_fir, + output wire [37:0] z, + output wire [17:0] dly_b, (* clkbuf_sink *) - input clk, - input reset, - - input [2:0] feedback, - input load_acc, - input unsigned_a, - input unsigned_b, - - input f_mode, - input [2:0] output_select, - input saturate_enable, - input [5:0] shift_right, - input round, - input subtract, - input register_inputs + input wire clk, + input wire reset, + + input wire [2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [2:0] output_select, + input wire saturate_enable, + input wire [5:0] shift_right, + input wire round, + input wire subtract, + input wire register_inputs ); parameter [79:0] MODE_BITS = 80'd0; @@ -1331,31 +1331,31 @@ module dsp_t1_sim # ( parameter NBITS_B = 18, parameter NBITS_Z = 38 )( - input [NBITS_A-1:0] a_i, - input [NBITS_B-1:0] b_i, - output [NBITS_Z-1:0] z_o, - output reg [NBITS_B-1:0] dly_b_o, - - input [5:0] acc_fir_i, - input [2:0] feedback_i, - input load_acc_i, - - input unsigned_a_i, - input unsigned_b_i, - - input clock_i, - input s_reset, - - input saturate_enable_i, - input [2:0] output_select_i, - input round_i, - input [5:0] shift_right_i, - input subtract_i, - input register_inputs_i, - input [NBITS_A-1:0] coef_0_i, - input [NBITS_A-1:0] coef_1_i, - input [NBITS_A-1:0] coef_2_i, - input [NBITS_A-1:0] coef_3_i + input wire [NBITS_A-1:0] a_i, + input wire [NBITS_B-1:0] b_i, + output wire [NBITS_Z-1:0] z_o, + output reg [NBITS_B-1:0] dly_b_o, + + input wire [5:0] acc_fir_i, + input wire [2:0] feedback_i, + input wire load_acc_i, + + input wire unsigned_a_i, + input wire unsigned_b_i, + + input wire clock_i, + input wire s_reset, + + input wire saturate_enable_i, + input wire [2:0] output_select_i, + input wire round_i, + input wire [5:0] shift_right_i, + input wire subtract_i, + input wire register_inputs_i, + input wire [NBITS_A-1:0] coef_0_i, + input wire [NBITS_A-1:0] coef_1_i, + input wire [NBITS_A-1:0] coef_2_i, + input wire [NBITS_A-1:0] coef_3_i ); // FIXME: The version of Icarus Verilog from Conda seems not to recognize the @@ -1559,27 +1559,27 @@ module dsp_t1_sim # ( endmodule module dsp_t1_20x18x64 ( - input [19:0] a_i, - input [17:0] b_i, - input [ 5:0] acc_fir_i, - output [37:0] z_o, - output [17:0] dly_b_o, + input wire [19:0] a_i, + input wire [17:0] b_i, + input wire [ 5:0] acc_fir_i, + output wire [37:0] z_o, + output wire [17:0] dly_b_o, (* clkbuf_sink *) - input clock_i, - input reset_i, - - input [2:0] feedback_i, - input load_acc_i, - input unsigned_a_i, - input unsigned_b_i, - - input [2:0] output_select_i, - input saturate_enable_i, - input [5:0] shift_right_i, - input round_i, - input subtract_i, - input register_inputs_i + input wire clock_i, + input wire reset_i, + + input wire [ 2:0] feedback_i, + input wire load_acc_i, + input wire unsigned_a_i, + input wire unsigned_b_i, + + input wire [ 2:0] output_select_i, + input wire saturate_enable_i, + input wire [ 5:0] shift_right_i, + input wire round_i, + input wire subtract_i, + input wire register_inputs_i ); parameter [19:0] COEFF_0 = 20'd0; @@ -1617,27 +1617,27 @@ module dsp_t1_20x18x64 ( endmodule module dsp_t1_10x9x32 ( - input [ 9:0] a_i, - input [ 8:0] b_i, - input [ 5:0] acc_fir_i, - output [18:0] z_o, - output [ 8:0] dly_b_o, + input wire [ 9:0] a_i, + input wire [ 8:0] b_i, + input wire [ 5:0] acc_fir_i, + output wire [18:0] z_o, + output wire [ 8:0] dly_b_o, (* clkbuf_sink *) - input clock_i, - input reset_i, - - input [2:0] feedback_i, - input load_acc_i, - input unsigned_a_i, - input unsigned_b_i, - - input [2:0] output_select_i, - input saturate_enable_i, - input [5:0] shift_right_i, - input round_i, - input subtract_i, - input register_inputs_i + input wire clock_i, + input wire reset_i, + + input wire [ 2:0] feedback_i, + input wire load_acc_i, + input wire unsigned_a_i, + input wire unsigned_b_i, + + input wire [ 2:0] output_select_i, + input wire saturate_enable_i, + input wire [ 5:0] shift_right_i, + input wire round_i, + input wire subtract_i, + input wire register_inputs_i ); parameter [9:0] COEFF_0 = 10'd0; From a4e48ee88d1c5d2a69cc5d97caccff0d67223106 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Thu, 14 Apr 2022 15:20:06 +0200 Subject: [PATCH 732/845] systemverilog: abort when Surelog report error in design Signed-off-by: Kamil Rakoczy --- systemverilog-plugin/uhdmsurelogastfrontend.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index 82f04e405..1f8472ae2 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -70,10 +70,10 @@ std::vector executeCompilation(SURELOG::SymbolTable *symbolTable, SUR if (noFErrors == false) { noFatalErrors = false; } - if ((!noFatalErrors) || (!success)) + if ((!noFatalErrors) || (!success) || (errors->getErrorStats().nbError)) codedReturn |= 1; if (codedReturn) { - log_error("Encoraged fatal error when executing Surelog. Aborting!\n"); + log_error("Error when parsing design. Aborting!\n"); } return the_design; } From 040b4fc345d665f78819cd3f7f44a40b750f8f8a Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Fri, 15 Apr 2022 15:06:29 +0200 Subject: [PATCH 733/845] Add handling of primitive gates Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 53 +++++++++++++++++++++++++++++++++ systemverilog-plugin/UhdmAst.h | 2 ++ 2 files changed, 55 insertions(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 4af46777e..5d08bb7b2 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1480,6 +1480,12 @@ void UhdmAst::process_module() add_or_replace_child(current_node, node); } }); + // Primitives will have the same names (like "and"), so we need to make sure we don't replace them + visit_one_to_many({vpiPrimitive}, obj_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); current_node->children.insert(current_node->children.end(), children_after_process.begin(), children_after_process.end()); auto it = current_node->attributes.find(UhdmAst::partial()); @@ -3721,6 +3727,47 @@ void UhdmAst::process_while() }); } +void UhdmAst::process_gate() +{ + current_node = make_ast_node(AST::AST_PRIMITIVE); + switch (vpi_get(vpiPrimType, obj_h)) { + case vpiAndPrim: + current_node->str = "and"; + break; + case vpiNandPrim: + current_node->str = "nand"; + break; + case vpiNorPrim: + current_node->str = "nor"; + break; + case vpiOrPrim: + current_node->str = "or"; + break; + case vpiXorPrim: + current_node->str = "xor"; + break; + case vpiXnorPrim: + current_node->str = "xnor"; + break; + case vpiBufPrim: + current_node->str = "buf"; + break; + case vpiNotPrim: + current_node->str = "not"; + break; + default: + log_file_error(current_node->filename, current_node->location.first_line, "Encountered unhandled gate type: %s", current_node->str.c_str()); + break; + } + visit_one_to_many({vpiPrimTerm}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + +void UhdmAst::process_primterm() +{ + current_node = make_ast_node(AST::AST_ARGUMENT); + visit_one_to_one({vpiExpr}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); +} + void UhdmAst::process_unsupported_stmt(const UHDM::BaseClass *object) { log_error("%s:%d: Currently not supported object of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), @@ -3963,6 +4010,12 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiWhile: process_while(); break; + case vpiGate: + process_gate(); + break; + case vpiPrimTerm: + process_primterm(); + break; case vpiClockingBlock: process_unsupported_stmt(object); break; diff --git a/systemverilog-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h index 538ec3b92..8cc53385d 100644 --- a/systemverilog-plugin/UhdmAst.h +++ b/systemverilog-plugin/UhdmAst.h @@ -135,6 +135,8 @@ class UhdmAst void process_immediate_cover(); void process_immediate_assume(); void process_while(); + void process_gate(); + void process_primterm(); void simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node = nullptr); void process_nonsynthesizable(const UHDM::BaseClass *object); void process_unsupported_stmt(const UHDM::BaseClass *object); From c6f745a349752671d575b911a96b9fea3740d547 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Tue, 19 Apr 2022 08:37:44 +0200 Subject: [PATCH 734/845] Add -parse-only flag This flag can be used to only check designs, but don't load them into yosys Signed-off-by: Kamil Rakoczy --- systemverilog-plugin/uhdmastshared.h | 4 ++++ systemverilog-plugin/uhdmcommonfrontend.cc | 14 +++++++++++--- systemverilog-plugin/uhdmsurelogastfrontend.cc | 4 ++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/systemverilog-plugin/uhdmastshared.h b/systemverilog-plugin/uhdmastshared.h index 84ca265a2..97990551b 100644 --- a/systemverilog-plugin/uhdmastshared.h +++ b/systemverilog-plugin/uhdmastshared.h @@ -38,6 +38,10 @@ class UhdmAstShared // Flag that determines whether errors should be fatal bool stop_on_error = true; + // Flag that determines whether we should only parse the design + // applies only to read_systemverilog command + bool parse_only = false; + // Top nodes of the design (modules, interfaces) std::unordered_map top_nodes; diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc index d12a9c34a..6835d2efd 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.cc +++ b/systemverilog-plugin/uhdmcommonfrontend.cc @@ -63,6 +63,10 @@ void UhdmCommonFrontend::print_read_options() log(" only read the abstract syntax tree and defer actual compilation\n"); log(" to a later 'hierarchy' command. Useful in cases where the default\n"); log(" parameters of modules yield invalid or not synthesizable code.\n"); + log(" -parse-only\n"); + log(" this parameter only applies to read_systemverilog command,\n"); + log(" it runs only Surelog to parse design, but doesn't load generated\n"); + log(" tree into Yosys.\n"); log("\n"); } @@ -108,6 +112,8 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve dump_rtlil = true; } else if (args[i] == "-yydebug") { this->shared.debug_flag = true; + } else if (args[i] == "-parse-only") { + this->shared.parse_only = true; } else { unhandled_args.push_back(args[i]); } @@ -128,9 +134,11 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve AST::AstNode *current_ast = parse(filename); - AST::process(design, current_ast, dump_ast1, dump_ast2, no_dump_ptr, dump_vlog1, dump_vlog2, dump_rtlil, false, false, false, false, false, false, - false, false, false, false, dont_redefine, false, defer, default_nettype_wire); - delete current_ast; + if (current_ast) { + AST::process(design, current_ast, dump_ast1, dump_ast2, no_dump_ptr, dump_vlog1, dump_vlog2, dump_rtlil, false, false, false, false, false, + false, false, false, false, false, dont_redefine, false, defer, default_nettype_wire); + delete current_ast; + } } YOSYS_NAMESPACE_END diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index 1f8472ae2..bec697f8b 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -124,6 +124,10 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { delete clp; delete symbolTable; delete errors; + // on parse_only mode, don't try to load design + // into yosys + if (this->shared.parse_only) + return nullptr; UhdmAst uhdm_ast(this->shared); AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); From a667feb524274eaf889437bdac03717d8bc3ff98 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 22 Apr 2022 15:06:28 +0200 Subject: [PATCH 735/845] Added support for overriding plugin installation path via the DESTDIR Makefile variable Signed-off-by: Maciej Kurc --- Makefile_plugin.common | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 6fc44928f..eebb126c2 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -42,22 +42,30 @@ YOSYS_PATH ?= $(realpath $(dir $(shell which yosys))/..) # Find yosys-config, throw an error if not found -YOSYS_CONFIG ?= $(YOSYS_PATH)/bin/yosys-config +YOSYS_CONFIG = $(YOSYS_PATH)/bin/yosys-config ifeq (,$(wildcard $(YOSYS_CONFIG))) -$(error "Didn't find 'yosys-config' under '$(YOSYS_PATH)'") + $(error "Didn't find 'yosys-config' under '$(YOSYS_PATH)'") endif CXX ?= $(shell $(YOSYS_CONFIG) --cxx) -CXXFLAGS ?= $(shell $(YOSYS_CONFIG) --cxxflags) #-DSDC_DEBUG -LDFLAGS ?= $(shell $(YOSYS_CONFIG) --ldflags) -LDLIBS ?= $(shell $(YOSYS_CONFIG) --ldlibs) -PLUGINS_DIR ?= $(shell $(YOSYS_CONFIG) --datdir)/plugins -DATA_DIR ?= $(shell $(YOSYS_CONFIG) --datdir) +CXXFLAGS = $(shell $(YOSYS_CONFIG) --cxxflags) #-DSDC_DEBUG +LDFLAGS = $(shell $(YOSYS_CONFIG) --ldflags) +LDLIBS = $(shell $(YOSYS_CONFIG) --ldlibs) EXTRA_FLAGS ?= +ifdef DESTDIR + DATA_DIR = $(DESTDIR) +else + DATA_DIR = $(shell $(YOSYS_CONFIG) --datdir) +endif +PLUGINS_DIR = $(DATA_DIR)/plugins + OBJS := $(patsubst %.cc,%.o,$(SOURCES)) DEPS ?= +$(PLUGINS_DIR): + @mkdir -p $@ + all: $(NAME).so $(OBJS): %.o: %.cc $(DEPS) @@ -69,7 +77,7 @@ $(NAME).so: $(OBJS) ../pmgen.py: @$(MAKE) -C .. pmgen.py -install_plugin: $(NAME).so +install_plugin: $(NAME).so | $(PLUGINS_DIR) install -D $< $(PLUGINS_DIR)/$< test: From 8683b3056789097816d9eac9a33d610ab7495c66 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Fri, 22 Apr 2022 15:34:16 +0200 Subject: [PATCH 736/845] systemverilog: add dedicated wildcard operator errors Signed-off-by: Tomasz Gorochowik --- systemverilog-plugin/UhdmAst.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 5d08bb7b2..7e8b3a556 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -2437,6 +2437,13 @@ void UhdmAst::process_operation() case vpiAssignmentPatternOp: process_assignment_pattern_op(); break; + case vpiWildEqOp: + case vpiWildNeqOp: { + const uhdm_handle *const handle = (const uhdm_handle *)obj_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + report_error("%s:%d: Wildcard operators are not supported yet\n", object->VpiFile().c_str(), object->VpiLineNo()); + break; + } default: { current_node = make_ast_node(AST::AST_NONE); visit_one_to_many({vpiOperand}, obj_h, [&](AST::AstNode *node) { From e79caaaec03a64bece28edc685aa9c7ffd5c5a5d Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Mon, 25 Apr 2022 12:36:51 +0200 Subject: [PATCH 737/845] systemverilog: move object to argument to avoid code duplication Signed-off-by: Tomasz Gorochowik --- systemverilog-plugin/UhdmAst.cc | 8 ++------ systemverilog-plugin/UhdmAst.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 7e8b3a556..c207eb49f 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -2417,7 +2417,7 @@ void UhdmAst::process_begin(bool is_named) }); } -void UhdmAst::process_operation() +void UhdmAst::process_operation(const UHDM::BaseClass *object) { auto operation = vpi_get(vpiOpType, obj_h); switch (operation) { @@ -2439,8 +2439,6 @@ void UhdmAst::process_operation() break; case vpiWildEqOp: case vpiWildNeqOp: { - const uhdm_handle *const handle = (const uhdm_handle *)obj_h; - const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; report_error("%s:%d: Wildcard operators are not supported yet\n", object->VpiFile().c_str(), object->VpiLineNo()); break; } @@ -2635,8 +2633,6 @@ void UhdmAst::process_operation() default: { delete current_node; current_node = nullptr; - const uhdm_handle *const handle = (const uhdm_handle *)obj_h; - const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; report_error("%s:%d: Encountered unhandled operation type %d\n", object->VpiFile().c_str(), object->VpiLineNo(), operation); } } @@ -3902,7 +3898,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) break; case vpiCondition: case vpiOperation: - process_operation(); + process_operation(object); break; case vpiTaggedPattern: process_tagged_pattern(); diff --git a/systemverilog-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h index 8cc53385d..26e200088 100644 --- a/systemverilog-plugin/UhdmAst.h +++ b/systemverilog-plugin/UhdmAst.h @@ -99,7 +99,7 @@ class UhdmAst void process_event_control(const UHDM::BaseClass *object); void process_initial(); void process_begin(bool is_named); - void process_operation(); + void process_operation(const UHDM::BaseClass *object); void process_stream_op(); void process_list_op(); void process_cast_op(); From 94f8157c9732b1337d8221a40cc6992fbde8916e Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Fri, 22 Apr 2022 15:21:12 +0200 Subject: [PATCH 738/845] systemverilog: Add warnings to post inc/dec operations Signed-off-by: Tomasz Gorochowik --- systemverilog-plugin/UhdmAst.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index c207eb49f..3964debc2 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -2575,7 +2575,11 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) case vpiPowerOp: current_node->type = AST::AST_POW; break; - case vpiPostIncOp: // TODO: Make this an actual post-increment op (currently it's a pre-increment) + case vpiPostIncOp: { + // TODO: Make this an actual post-increment op (currently it's a pre-increment) + log_warning("%s:%d: Post-incrementation operations are handled as pre-incrementation.\n", object->VpiFile().c_str(), object->VpiLineNo()); + } + // fallthrough case vpiPreIncOp: { current_node->type = AST::AST_ASSIGN_EQ; auto id = current_node->children[0]->clone(); @@ -2585,7 +2589,11 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) current_node->children.push_back(add_node); break; } - case vpiPostDecOp: // TODO: Make this an actual post-decrement op (currently it's a pre-decrement) + case vpiPostDecOp: { + // TODO: Make this an actual post-decrement op (currently it's a pre-decrement) + log_warning("%s:%d: Post-decrementation operations are handled as pre-decrementation.\n", object->VpiFile().c_str(), object->VpiLineNo()); + } + // fallthrough case vpiPreDecOp: { current_node->type = AST::AST_ASSIGN_EQ; auto id = current_node->children[0]->clone(); From de65f9638cd1ef0a2c8ee391e25455fad12806e8 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Thu, 14 Apr 2022 14:42:35 +0200 Subject: [PATCH 739/845] Check for empty string when creating wiretype Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 3964debc2..d3d4aed0e 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3588,7 +3588,7 @@ void UhdmAst::process_net() current_node->is_logic = !current_node->is_reg; current_node->is_signed = vpi_get(vpiSigned, obj_h); visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - if (node) { + if (node && !node->str.empty()) { auto wiretype_node = new AST::AstNode(AST::AST_WIRETYPE); wiretype_node->str = node->str; // wiretype needs to be 1st node @@ -3636,9 +3636,11 @@ void UhdmAst::process_parameter() } case vpiStructTypespec: { visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { - auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); - wiretype_node->str = node->str; - current_node->children.push_back(wiretype_node); + if (node && !node->str.empty()) { + auto wiretype_node = make_ast_node(AST::AST_WIRETYPE); + wiretype_node->str = node->str; + current_node->children.push_back(wiretype_node); + } current_node->is_custom_type = true; auto it = shared.param_types.find(current_node->str); if (it == shared.param_types.end()) From 5832347955f799d66b1b2370530b06d00bbe132a Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 20 Apr 2022 08:13:45 +0200 Subject: [PATCH 740/845] Update import_typespec case Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index d3d4aed0e..d77f06ea9 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3981,7 +3981,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiHierPath: process_hier_path(); break; - case UHDM::uhdmimport: + case UHDM::uhdmimport_typespec: break; case vpiDelayControl: process_nonsynthesizable(object); From ca67fc15529a42fa54eeb468c5327717eb61995d Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 20 Apr 2022 15:17:23 +0200 Subject: [PATCH 741/845] Handle shortint and time typespecs Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 32 ++++++++++++++++++++++++++++++++ systemverilog-plugin/UhdmAst.h | 2 ++ 2 files changed, 34 insertions(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index d77f06ea9..b5aab0536 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3363,6 +3363,32 @@ void UhdmAst::process_int_typespec() current_node->is_signed = true; } +void UhdmAst::process_shortint_typespec() +{ + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name + current_node = make_ast_node(AST::AST_WIRE); + auto left_const = AST::AstNode::mkconst_int(16, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); + packed_ranges.push_back(range); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); + current_node->is_signed = true; +} + +void UhdmAst::process_time_typespec() +{ + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name + current_node = make_ast_node(AST::AST_WIRE); + auto left_const = AST::AstNode::mkconst_int(64, true); + auto right_const = AST::AstNode::mkconst_int(0, true); + auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); + packed_ranges.push_back(range); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); + current_node->is_signed = false; +} + void UhdmAst::process_string_var() { current_node = make_ast_node(AST::AST_WIRE); @@ -3993,6 +4019,12 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiIntegerTypespec: process_int_typespec(); break; + case vpiShortIntTypespec: + process_shortint_typespec(); + break; + case vpiTimeTypespec: + process_time_typespec(); + break; case vpiBitTypespec: process_bit_typespec(); break; diff --git a/systemverilog-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h index 26e200088..d8fc8a68c 100644 --- a/systemverilog-plugin/UhdmAst.h +++ b/systemverilog-plugin/UhdmAst.h @@ -126,6 +126,8 @@ class UhdmAst void process_hier_path(); void process_logic_typespec(); void process_int_typespec(); + void process_shortint_typespec(); + void process_time_typespec(); void process_bit_typespec(); void process_string_var(); void process_string_typespec(); From d27ab17a1b0c0279d07d56ad977fc32360bf941c Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 20 Apr 2022 15:33:35 +0200 Subject: [PATCH 742/845] Fix packed ranges access in nets Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index b5aab0536..2b384d193 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3622,7 +3622,10 @@ void UhdmAst::process_net() current_node->is_custom_type = true; } }); - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + if(vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h)) { + visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + vpi_release_handle(typespec_h); + } add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } From faad9734ee8976a144623e584ab19eb5cc9928f1 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Mon, 25 Apr 2022 09:22:09 +0200 Subject: [PATCH 743/845] Fix packed ranges access in array nets Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 13 +++++++++---- systemverilog-plugin/UhdmAst.h | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 2b384d193..540567bee 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -2166,7 +2166,7 @@ void UhdmAst::process_packed_array_net() add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } -void UhdmAst::process_array_net() +void UhdmAst::process_array_net(const UHDM::BaseClass *object) { current_node = make_ast_node(AST::AST_WIRE); vpiHandle itr = vpi_iterate(vpiNet, obj_h); @@ -2177,7 +2177,12 @@ void UhdmAst::process_array_net() if (net_type == vpiLogicNet) { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, net_h); - visit_one_to_many({vpiRange}, net_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + if (vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h)) { + visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + vpi_release_handle(typespec_h); + } else { + log_error("%s:%d: No typespec found for array net %s\n", object->VpiFile().c_str(), object->VpiLineNo(), current_node->str.c_str()); + } shared.report.mark_handled(net_h); } else if (net_type == vpiStructNet) { visit_one_to_one({vpiTypespec}, net_h, [&](AST::AstNode *node) { @@ -3622,7 +3627,7 @@ void UhdmAst::process_net() current_node->is_custom_type = true; } }); - if(vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h)) { + if (vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h)) { visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); vpi_release_handle(typespec_h); } @@ -3901,7 +3906,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) process_net(); break; case vpiArrayNet: - process_array_net(); + process_array_net(object); break; case vpiPackedArrayNet: process_packed_array_net(); diff --git a/systemverilog-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h index d8fc8a68c..2add851ef 100644 --- a/systemverilog-plugin/UhdmAst.h +++ b/systemverilog-plugin/UhdmAst.h @@ -90,7 +90,7 @@ class UhdmAst void process_assignment(); void process_net(); void process_packed_array_net(); - void process_array_net(); + void process_array_net(const UHDM::BaseClass *object); void process_package(); void process_interface(); void process_modport(); From 192bef075241ec00920ec456178beb7b4f737729 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 27 Apr 2022 10:54:04 +0200 Subject: [PATCH 744/845] Use make_range for typespecs Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 540567bee..aa5a393e6 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3360,10 +3360,7 @@ void UhdmAst::process_int_typespec() std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name current_node = make_ast_node(AST::AST_WIRE); - auto left_const = AST::AstNode::mkconst_int(31, true); - auto right_const = AST::AstNode::mkconst_int(0, true); - auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); - packed_ranges.push_back(range); + packed_ranges.push_back(make_range(31, 0)); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); current_node->is_signed = true; } @@ -3373,10 +3370,7 @@ void UhdmAst::process_shortint_typespec() std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name current_node = make_ast_node(AST::AST_WIRE); - auto left_const = AST::AstNode::mkconst_int(16, true); - auto right_const = AST::AstNode::mkconst_int(0, true); - auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); - packed_ranges.push_back(range); + packed_ranges.push_back(make_range(16, 0)); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); current_node->is_signed = true; } @@ -3386,10 +3380,7 @@ void UhdmAst::process_time_typespec() std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name current_node = make_ast_node(AST::AST_WIRE); - auto left_const = AST::AstNode::mkconst_int(64, true); - auto right_const = AST::AstNode::mkconst_int(0, true); - auto range = new AST::AstNode(AST::AST_RANGE, left_const, right_const); - packed_ranges.push_back(range); + packed_ranges.push_back(make_range(64, 0)); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); current_node->is_signed = false; } From 84e9d3535155d324b1bdb8a81551148b8b326c80 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Mon, 2 May 2022 07:55:10 +0200 Subject: [PATCH 745/845] Add handling of case ... inside Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index aa5a393e6..2c8d41434 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3043,11 +3043,28 @@ void UhdmAst::process_case() void UhdmAst::process_case_item() { current_node = make_ast_node(AST::AST_COND); - visit_one_to_many({vpiExpr}, obj_h, [&](AST::AstNode *node) { - if (node) { - current_node->children.push_back(node); + vpiHandle itr = vpi_iterate(vpiExpr, obj_h); + while (vpiHandle expr_h = vpi_scan(itr)) { + // case ... inside statement, the operation is stored in UHDM inside case items + // Retrieve just the InsideOp arguments here, we don't add any special handling + // TODO: handle inside range (list operations) properly here + if (vpi_get(vpiType, expr_h) == vpiOperation && vpi_get(vpiOpType, expr_h) == vpiInsideOp) { + visit_one_to_many({vpiOperand}, expr_h, [&](AST::AstNode *node) { + if (node) { + current_node->children.push_back(node); + } + }); + } else { + UhdmAst uhdm_ast(this, shared, indent + " "); + auto *node = uhdm_ast.process_object(expr_h); + if (node) { + current_node->children.push_back(node); + } } - }); + // FIXME: If we release the handle here, visiting vpiStmt fails for some reason + // vpi_release_handle(expr_h); + } + vpi_release_handle(itr); if (current_node->children.empty()) { current_node->children.push_back(new AST::AstNode(AST::AST_DEFAULT)); } From 4098e8bc9df087b59a3fcca30300ed11953e0e31 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Mon, 2 May 2022 12:20:44 +0200 Subject: [PATCH 746/845] Fix typespecs in array nets Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 2c8d41434..f4025c4c2 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -2177,11 +2177,15 @@ void UhdmAst::process_array_net(const UHDM::BaseClass *object) if (net_type == vpiLogicNet) { current_node->is_logic = true; current_node->is_signed = vpi_get(vpiSigned, net_h); - if (vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h)) { + vpiHandle typespec_h = vpi_handle(vpiTypespec, net_h); + if (!typespec_h) { + typespec_h = vpi_handle(vpiTypespec, obj_h); + } + if (typespec_h) { visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); vpi_release_handle(typespec_h); } else { - log_error("%s:%d: No typespec found for array net %s\n", object->VpiFile().c_str(), object->VpiLineNo(), current_node->str.c_str()); + visit_one_to_many({vpiRange}, net_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); } shared.report.mark_handled(net_h); } else if (net_type == vpiStructNet) { From 6d0752e52b9364eac05e5bc24fd3cd5024e19ae8 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Wed, 4 May 2022 14:42:21 +0200 Subject: [PATCH 747/845] Improve mark_as_unsigned error message Signed-off-by: Tomasz Gorochowik --- systemverilog-plugin/UhdmAst.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index f4025c4c2..e2144564b 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -972,7 +972,7 @@ static void clear_current_scope() AST_INTERNAL::current_ast_mod = nullptr; } -static void mark_as_unsigned(AST::AstNode *node) +static void mark_as_unsigned(AST::AstNode *node, const UHDM::BaseClass *object) { if (node->children.empty() || node->children.size() == 1) { node->is_signed = false; @@ -980,7 +980,7 @@ static void mark_as_unsigned(AST::AstNode *node) node->children[0]->is_signed = false; node->children[1]->is_signed = false; } else { - log_error("Unsupported expression in mark_as_unsigned!\n"); + log_error("%s:%d: Unsupported expression in mark_as_unsigned!\n", object->VpiFile().c_str(), object->VpiLineNo()); } } @@ -2513,12 +2513,12 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) case vpiLShiftOp: current_node->type = AST::AST_SHIFT_LEFT; log_assert(current_node->children.size() == 2); - mark_as_unsigned(current_node->children[1]); + mark_as_unsigned(current_node->children[1], object); break; case vpiRShiftOp: current_node->type = AST::AST_SHIFT_RIGHT; log_assert(current_node->children.size() == 2); - mark_as_unsigned(current_node->children[1]); + mark_as_unsigned(current_node->children[1], object); break; case vpiNotOp: current_node->type = AST::AST_LOGIC_NOT; @@ -2574,12 +2574,12 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) case vpiArithLShiftOp: current_node->type = AST::AST_SHIFT_SLEFT; log_assert(current_node->children.size() == 2); - mark_as_unsigned(current_node->children[1]); + mark_as_unsigned(current_node->children[1], object); break; case vpiArithRShiftOp: current_node->type = AST::AST_SHIFT_SRIGHT; log_assert(current_node->children.size() == 2); - mark_as_unsigned(current_node->children[1]); + mark_as_unsigned(current_node->children[1], object); break; case vpiPowerOp: current_node->type = AST::AST_POW; From 33d4d0cafedb8e495e6d05ece240ddc23e681c20 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 27 Apr 2022 15:44:10 -0700 Subject: [PATCH 748/845] Use new Surelog/ include location. Also: use instead of a comment, use [[fallthrough]] to let the compiler know our intent (and squash warnings due to that). Signed-off-by: Henner Zeller --- systemverilog-plugin/UhdmAst.cc | 4 ++-- systemverilog-plugin/uhdmsurelogastfrontend.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index e2144564b..05c2230b3 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -2587,8 +2587,8 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) case vpiPostIncOp: { // TODO: Make this an actual post-increment op (currently it's a pre-increment) log_warning("%s:%d: Post-incrementation operations are handled as pre-incrementation.\n", object->VpiFile().c_str(), object->VpiLineNo()); + [[fallthrough]]; } - // fallthrough case vpiPreIncOp: { current_node->type = AST::AST_ASSIGN_EQ; auto id = current_node->children[0]->clone(); @@ -2601,8 +2601,8 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) case vpiPostDecOp: { // TODO: Make this an actual post-decrement op (currently it's a pre-decrement) log_warning("%s:%d: Post-decrementation operations are handled as pre-decrementation.\n", object->VpiFile().c_str(), object->VpiLineNo()); + [[fallthrough]]; } - // fallthrough case vpiPreDecOp: { current_node->type = AST::AST_ASSIGN_EQ; auto id = current_node->children[0]->clone(); diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index bec697f8b..4a450bee1 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -30,8 +30,8 @@ #include #endif -#include "ErrorReporting/Report.h" -#include "surelog.h" +#include "Surelog/ErrorReporting/Report.h" +#include "Surelog/surelog.h" namespace UHDM { From e4fbf9d8ff8e97c8550a1c1e1529f64b915be3d0 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Mon, 9 May 2022 09:17:12 +0200 Subject: [PATCH 749/845] Parse function definitions in GenScopes Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index f4025c4c2..ec9840404 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3025,7 +3025,7 @@ void UhdmAst::process_gen_scope() } }); - visit_one_to_many({vpiParamAssign, vpiParameter, vpiNet, vpiArrayNet, vpiVariables, vpiContAssign, vpiProcess, vpiModule, vpiGenScopeArray}, + visit_one_to_many({vpiParamAssign, vpiParameter, vpiNet, vpiArrayNet, vpiVariables, vpiContAssign, vpiProcess, vpiModule, vpiGenScopeArray, vpiTaskFunc}, obj_h, [&](AST::AstNode *node) { if (node) { if ((node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) && node->children.empty()) { From d03af064a35778bc9c8720157d997dc8f194d501 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Mon, 9 May 2022 10:24:08 +0200 Subject: [PATCH 750/845] Fix formatting Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index ec9840404..3d5154878 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3025,16 +3025,17 @@ void UhdmAst::process_gen_scope() } }); - visit_one_to_many({vpiParamAssign, vpiParameter, vpiNet, vpiArrayNet, vpiVariables, vpiContAssign, vpiProcess, vpiModule, vpiGenScopeArray, vpiTaskFunc}, - obj_h, [&](AST::AstNode *node) { - if (node) { - if ((node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) && node->children.empty()) { - delete node; // skip parameters without any children - } else { - current_node->children.push_back(node); - } - } - }); + visit_one_to_many( + {vpiParamAssign, vpiParameter, vpiNet, vpiArrayNet, vpiVariables, vpiContAssign, vpiProcess, vpiModule, vpiGenScopeArray, vpiTaskFunc}, obj_h, + [&](AST::AstNode *node) { + if (node) { + if ((node->type == AST::AST_PARAMETER || node->type == AST::AST_LOCALPARAM) && node->children.empty()) { + delete node; // skip parameters without any children + } else { + current_node->children.push_back(node); + } + } + }); } void UhdmAst::process_case() From e9ce130bf456e4e7fe736c8cda9c5706be747a63 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Mon, 9 May 2022 12:16:52 +0200 Subject: [PATCH 751/845] Add byte typespec handling Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 28 ++++++++++++++++++++++++++++ systemverilog-plugin/UhdmAst.h | 1 + 2 files changed, 29 insertions(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index ae9ab9cfa..70dea668c 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1717,6 +1717,18 @@ void UhdmAst::process_typespec_member() shared.report.mark_handled(typespec_h); break; } + case vpiByteTypespec: { + current_node->is_signed = true; + packed_ranges.push_back(make_range(7, 0)); + shared.report.mark_handled(typespec_h); + break; + } + case vpiShortIntTypespec: { + current_node->is_signed = true; + packed_ranges.push_back(make_range(15, 0)); + shared.report.mark_handled(typespec_h); + break; + } case vpiIntTypespec: case vpiIntegerTypespec: { current_node->is_signed = true; @@ -3393,6 +3405,13 @@ void UhdmAst::process_shortint_typespec() std::vector unpacked_ranges; // comes after wire name current_node = make_ast_node(AST::AST_WIRE); packed_ranges.push_back(make_range(16, 0)); + +void UhdmAst::process_byte_typespec() +{ + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name + current_node = make_ast_node(AST::AST_WIRE); + packed_ranges.push_back(make_range(7, 0)); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); current_node->is_signed = true; } @@ -3669,6 +3688,11 @@ void UhdmAst::process_parameter() shared.report.mark_handled(typespec_h); break; } + case vpiByteTypespec: { + packed_ranges.push_back(make_range(7, 0)); + shared.report.mark_handled(typespec_h); + break; + } case vpiEnumTypespec: case vpiRealTypespec: case vpiStringTypespec: { @@ -3695,6 +3719,7 @@ void UhdmAst::process_parameter() }); break; } + case vpiPackedArrayTypespec: case vpiArrayTypespec: { shared.report.mark_handled(typespec_h); visit_one_to_one({vpiElemTypespec}, typespec_h, [&](AST::AstNode *node) { @@ -4049,6 +4074,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiBitTypespec: process_bit_typespec(); break; + case vpiByteTypespec: + process_byte_typespec(); + break; case vpiStringVar: process_string_var(); break; diff --git a/systemverilog-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h index 2add851ef..0314369e0 100644 --- a/systemverilog-plugin/UhdmAst.h +++ b/systemverilog-plugin/UhdmAst.h @@ -133,6 +133,7 @@ class UhdmAst void process_string_typespec(); void process_repeat(); void process_byte_var(); + void process_byte_typespec(); void process_long_int_var(); void process_immediate_cover(); void process_immediate_assume(); From 8cda05162b2110fb1fa34b5242adbb86d99c6c66 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Mon, 9 May 2022 12:20:46 +0200 Subject: [PATCH 752/845] Update typespec sizes Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 70dea668c..04d32065c 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3404,7 +3404,10 @@ void UhdmAst::process_shortint_typespec() std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name current_node = make_ast_node(AST::AST_WIRE); - packed_ranges.push_back(make_range(16, 0)); + packed_ranges.push_back(make_range(15, 0)); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); + current_node->is_signed = true; +} void UhdmAst::process_byte_typespec() { @@ -3421,7 +3424,7 @@ void UhdmAst::process_time_typespec() std::vector packed_ranges; // comes before wire name std::vector unpacked_ranges; // comes after wire name current_node = make_ast_node(AST::AST_WIRE); - packed_ranges.push_back(make_range(64, 0)); + packed_ranges.push_back(make_range(63, 0)); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); current_node->is_signed = false; } From 3264c688fcb8bc8fbbca599475e24eee50453193 Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Thu, 10 Mar 2022 12:09:49 +0100 Subject: [PATCH 753/845] ql-qlf: qlf_k6n10f: bram: add custom bram pass Signed-off-by: Pawel Czarnecki --- ql-qlf-plugin/Makefile | 4 +- ql-qlf-plugin/ql-bram-split.cc | 318 +++++++++++++++++++++++++++++++++ 2 files changed, 321 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/ql-bram-split.cc diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 67a58e6a1..5d1d145bc 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -21,7 +21,8 @@ SOURCES = synth_quicklogic.cc \ quicklogic_eqn.cc \ ql-edif.cc \ ql-dsp-simd.cc \ - ql-dsp-macc.cc + ql-dsp-macc.cc \ + ql-bram-split.cc DEPS = pmgen/ql-dsp-pm.h \ pmgen/ql-dsp-macc.h @@ -46,6 +47,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10_DIR)/lut_map.v \ $(QLF_K6N10F_DIR)/arith_map.v \ $(QLF_K6N10F_DIR)/brams_map.v \ + $(QLF_K6N10F_DIR)/brams_final_map.v \ $(QLF_K6N10F_DIR)/brams.txt \ $(QLF_K6N10F_DIR)/cells_sim.v \ $(QLF_K6N10F_DIR)/sram1024x18.v \ diff --git a/ql-qlf-plugin/ql-bram-split.cc b/ql-qlf-plugin/ql-bram-split.cc new file mode 100644 index 000000000..02355fcdd --- /dev/null +++ b/ql-qlf-plugin/ql-bram-split.cc @@ -0,0 +1,318 @@ +// Copyright (C) 2020-2022 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +#include "kernel/log.h" +#include "kernel/register.h" +#include "kernel/rtlil.h" +#include "kernel/sigtools.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +// ============================================================================ + +struct QlBramSplitPass : public Pass { + + QlBramSplitPass() : Pass("ql_bram_split", "Infers QuickLogic k6n10f BRAM pairs that can operate independently") {} + + void help() override + { + log("\n"); + log(" ql_bram_split [selection]\n"); + log("\n"); + log(" This pass identifies k6n10f 18K BRAM cells\n"); + log(" and packs pairs of them together into final TDP36K cell that can\n"); + log(" be split into 2x18K BRAMs.\n"); + } + + // .......................................... + + /// Describes BRAM config unique to a whole BRAM cell + struct BramConfig { + + // Port connections + dict connections; + + // TODO: Possibly include parameters here. For now we have just + // connections. + + BramConfig() = default; + + BramConfig(const BramConfig &ref) = default; + BramConfig(BramConfig &&ref) = default; + + unsigned int hash() const { return connections.hash(); } + + bool operator==(const BramConfig &ref) const { return connections == ref.connections; } + }; + + // .......................................... + + // BRAM control and config ports to consider and how to map them to ports + // of the target BRAM cell + const std::vector> m_BramSharedPorts = {}; + + // BRAM data ports for subcell #1 and how to map them to ports of the target BRAM cell + const std::vector> m_BramDataPorts_0 = { + std::make_pair("A1ADDR", "A1ADDR"), std::make_pair("A1DATA", "A1DATA"), std::make_pair("A1EN", "A1EN"), std::make_pair("B1ADDR", "B1ADDR"), + std::make_pair("B1DATA", "B1DATA"), std::make_pair("B1EN", "B1EN"), std::make_pair("C1ADDR", "C1ADDR"), std::make_pair("C1DATA", "C1DATA"), + std::make_pair("C1EN", "C1EN"), std::make_pair("CLK1", "CLK1"), std::make_pair("CLK2", "CLK2"), std::make_pair("D1ADDR", "D1ADDR"), + std::make_pair("D1DATA", "D1DATA"), std::make_pair("D1EN", "D1EN")}; + // BRAM data ports for subcell #2 and how to map them to ports of the target BRAM cell + const std::vector> m_BramDataPorts_1 = { + std::make_pair("A1ADDR", "E1ADDR"), std::make_pair("A1DATA", "E1DATA"), std::make_pair("A1EN", "E1EN"), std::make_pair("B1ADDR", "F1ADDR"), + std::make_pair("B1DATA", "F1DATA"), std::make_pair("B1EN", "F1EN"), std::make_pair("C1ADDR", "G1ADDR"), std::make_pair("C1DATA", "G1DATA"), + std::make_pair("C1EN", "G1EN"), std::make_pair("CLK1", "CLK3"), std::make_pair("CLK2", "CLK4"), std::make_pair("D1ADDR", "H1ADDR"), + std::make_pair("D1DATA", "H1DATA"), std::make_pair("D1EN", "H1EN")}; + // BRAM parameters + const std::vector m_BramParams = {"CFG_ABITS", "CFG_DBITS"}; + // Source BRAM cell type (1x18K) + const std::string m_Bram1x18Type = "$__QLF_FACTOR_BRAM18_TDP"; + // Target BRAM cell type for the split mode + const std::string m_Bram2x18Type = "BRAM2x18_TDP"; + + /// Temporary SigBit to SigBit helper map. + SigMap m_SigMap; + + // .......................................... + + void execute(std::vector a_Args, RTLIL::Design *a_Design) override + { + log_header(a_Design, "Executing QL_BRAM_Split pass.\n"); + + // Parse args + extra_args(a_Args, 1, a_Design); + + // Process modules + for (auto module : a_Design->selected_modules()) { + + // Setup the SigMap + m_SigMap.clear(); + m_SigMap.set(module); + + // Assemble BRAM cell groups + dict> groups; + for (auto cell : module->selected_cells()) { + + // Check if this is a BRAM cell + if (cell->type != RTLIL::escape_id(m_Bram1x18Type)) { + continue; + } + + // Skip if it has the (* keep *) attribute set + if (cell->has_keep_attr()) { + continue; + } + + // Add to a group + const auto key = getBramConfig(cell); + groups[key].push_back(cell); + } + + for (const auto &it : groups) { + const auto &group = it.second; + const auto &config = it.first; + } + + std::vector cellsToRemove; + + // Map cell pairs to the target BRAM 2x18 cell + for (const auto &it : groups) { + const auto &group = it.second; + const auto &config = it.first; + + // Ensure an even number + size_t count = group.size(); + if (count & 1) + count--; + + // Map SIMD pairs + for (size_t i = 0; i < count; i += 2) { + const RTLIL::Cell *bram_0 = group[i]; + const RTLIL::Cell *bram_1 = group[i + 1]; + + std::string name = stringf("bram_%s_%s", RTLIL::unescape_id(bram_0->name).c_str(), RTLIL::unescape_id(bram_1->name).c_str()); + + log(" BRAM: %s (%s) + %s (%s) => %s (%s)\n", RTLIL::unescape_id(bram_0->name).c_str(), RTLIL::unescape_id(bram_0->type).c_str(), + RTLIL::unescape_id(bram_1->name).c_str(), RTLIL::unescape_id(bram_1->type).c_str(), RTLIL::unescape_id(name).c_str(), + m_Bram2x18Type.c_str()); + + // Create the new cell + RTLIL::Cell *bram_2x18 = module->addCell(RTLIL::escape_id(name), RTLIL::escape_id(m_Bram2x18Type)); + + // Check if the target cell is known (important to know + // its port widths) + if (!bram_2x18->known()) { + log_error(" The target cell type '%s' is not known!", m_Bram2x18Type.c_str()); + } + + // Connect shared ports + for (const auto &it : m_BramSharedPorts) { + auto src = RTLIL::escape_id(it.first); + auto dst = RTLIL::escape_id(it.second); + + bram_2x18->setPort(dst, config.connections.at(src)); + } + + // Connect data ports + // Connect first bram + for (const auto &it : m_BramDataPorts_0) { + auto src = RTLIL::escape_id(it.first); + auto dst = RTLIL::escape_id(it.second); + + size_t width; + bool isOutput; + + std::tie(width, isOutput) = getPortInfo(bram_2x18, dst); + + auto getConnection = [&](const RTLIL::Cell *cell) { + RTLIL::SigSpec sigspec; + if (cell->hasPort(src)) { + const auto &sig = cell->getPort(src); + sigspec.append(sig); + } + if (sigspec.bits().size() < width / 2) { + if (isOutput) { + for (size_t i = 0; i < width / 2 - sigspec.bits().size(); ++i) { + sigspec.append(RTLIL::SigSpec()); + } + } else { + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2 - sigspec.bits().size())); + } + } + return sigspec; + }; + + RTLIL::SigSpec sigspec; + sigspec.append(getConnection(bram_0)); + bram_2x18->setPort(dst, sigspec); + } + + // Connect second bram + for (const auto &it : m_BramDataPorts_1) { + auto src = RTLIL::escape_id(it.first); + auto dst = RTLIL::escape_id(it.second); + + size_t width; + bool isOutput; + + std::tie(width, isOutput) = getPortInfo(bram_2x18, dst); + + auto getConnection = [&](const RTLIL::Cell *cell) { + RTLIL::SigSpec sigspec; + if (cell->hasPort(src)) { + const auto &sig = cell->getPort(src); + sigspec.append(sig); + } + if (sigspec.bits().size() < width / 2) { + if (isOutput) { + for (size_t i = 0; i < width / 2 - sigspec.bits().size(); ++i) { + sigspec.append(RTLIL::SigSpec()); + } + } else { + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2 - sigspec.bits().size())); + } + } + return sigspec; + }; + + RTLIL::SigSpec sigspec; + sigspec.append(getConnection(bram_1)); + bram_2x18->setPort(dst, sigspec); + } + + // Set bram parameters + for (const auto &it : m_BramParams) { + auto val = bram_0->getParam(RTLIL::escape_id(it)); + bram_2x18->setParam(RTLIL::escape_id(it), val); + } + + // Setting manual parameters + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_B"), bram_0->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_F"), bram_1->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_D"), bram_0->getParam(RTLIL::escape_id("CFG_ENABLE_D"))); + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_H"), bram_1->getParam(RTLIL::escape_id("CFG_ENABLE_D"))); + bram_2x18->setParam(RTLIL::escape_id("INIT0"), bram_0->getParam(RTLIL::escape_id("INIT"))); + bram_2x18->setParam(RTLIL::escape_id("INIT1"), bram_1->getParam(RTLIL::escape_id("INIT"))); + + // Mark BRAM parts for removal + cellsToRemove.push_back(bram_0); + cellsToRemove.push_back(bram_1); + } + } + + // Remove old cells + for (const auto &cell : cellsToRemove) { + module->remove(const_cast(cell)); + } + } + + // Clear + m_SigMap.clear(); + } + + // .......................................... + + /// Looks up port width and direction in the cell definition and returns it. + /// Returns (0, false) if it cannot be determined. + std::pair getPortInfo(RTLIL::Cell *a_Cell, RTLIL::IdString a_Port) + { + if (!a_Cell->known()) { + return std::make_pair(0, false); + } + + // Get the module defining the cell (the previous condition ensures + // that the pointers are valid) + RTLIL::Module *mod = a_Cell->module->design->module(a_Cell->type); + if (mod == nullptr) { + return std::make_pair(0, false); + } + + // Get the wire representing the port + RTLIL::Wire *wire = mod->wire(a_Port); + if (wire == nullptr) { + return std::make_pair(0, false); + } + + return std::make_pair(wire->width, wire->port_output); + } + + /// Given a BRAM cell populates and returns a BramConfig struct for it. + BramConfig getBramConfig(RTLIL::Cell *a_Cell) + { + BramConfig config; + + for (const auto &it : m_BramSharedPorts) { + auto port = RTLIL::escape_id(it.first); + + // Port unconnected + if (!a_Cell->hasPort(port)) { + config.connections[port] = RTLIL::SigSpec(RTLIL::Sx); + continue; + } + + // Get the port connection and map it to unique SigBits + const auto &orgSigSpec = a_Cell->getPort(port); + const auto &orgSigBits = orgSigSpec.bits(); + + RTLIL::SigSpec newSigSpec; + for (size_t i = 0; i < orgSigBits.size(); ++i) { + auto newSigBit = m_SigMap(orgSigBits[i]); + newSigSpec.append(newSigBit); + } + + // Store + config.connections[port] = newSigSpec; + } + + return config; + } + +} QlBramSplitPass; + +PRIVATE_NAMESPACE_END From 53a7f655dc47a5fef86ac48eeea1e5dfa614fbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 30 Mar 2022 16:23:08 +0200 Subject: [PATCH 754/845] ql-qlf: qlf_k6n10f: bram: update TDP_BRAM18 techmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 153 ++++++++++----------------- 1 file changed, 55 insertions(+), 98 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index 821cc44a7..004c72c92 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -181,17 +181,20 @@ endmodule // ------------------------------------------------------------------------ -module \$__QLF_FACTOR_BRAM18_TDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); - parameter CFG_ABITS = 10; +module \$__QLF_FACTOR_BRAM18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, C1EN, CLK1, CLK2, CLK3, CLK4, D1ADDR, D1DATA, D1EN); + parameter CFG_ABITS = 11; parameter CFG_DBITS = 18; - parameter CFG_ENABLE_B = 2; + parameter CFG_ENABLE_B = 4; + parameter CFG_ENABLE_D = 4; parameter CLKPOL2 = 1; parameter CLKPOL3 = 1; parameter [18431:0] INIT = 18432'bx; + input CLK1; input CLK2; input CLK3; + input CLK4; input [CFG_ABITS-1:0] A1ADDR; output [CFG_DBITS-1:0] A1DATA; @@ -201,101 +204,55 @@ module \$__QLF_FACTOR_BRAM18_TDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA input [CFG_DBITS-1:0] B1DATA; input [CFG_ENABLE_B-1:0] B1EN; - wire [13:0] A1ADDR_14; - wire [13:0] B1ADDR_14; - //wire [3:0] B1EN_4 = B1EN; - - wire [1:0] DIP, DOP; - wire [15:0] DI, DO; - - wire [15:0] DOBDO; - wire [1:0] DOPBDOP; - - assign A1DATA = { DOP[1], DO[15: 8], DOP[0], DO[ 7: 0] }; - assign { DIP[1], DI[15: 8], DIP[0], DI[ 7: 0] } = B1DATA; - - assign A1ADDR_14[13:CFG_ABITS] = 0; - assign A1ADDR_14[CFG_ABITS-1:0] = A1ADDR; - assign B1ADDR_14[13:CFG_ABITS] = 0; - assign B1ADDR_14[CFG_ABITS-1:0] = B1ADDR; - - /*if (CFG_DBITS == 1) begin - assign WRITEDATAWIDTHB = 3'b000; - assign READDATAWIDTHA = 3'b000; - end else if (CFG_DBITS == 2) begin - assign WRITEDATAWIDTHB = 3'b001; - assign READDATAWIDTHA = 3'b001; - end else if (CFG_DBITS > 2 && CFG_DBITS <= 4) begin - assign WRITEDATAWIDTHB = 3'b010; - assign READDATAWIDTHA = 3'b010; - end else if (CFG_DBITS > 4 && CFG_DBITS <= 9) begin - assign WRITEDATAWIDTHB = 3'b011; - assign READDATAWIDTHA = 3'b011; - end else if (CFG_DBITS > 9 && CFG_DBITS <= 18) begin - //assign WRITEDATAWIDTHB = 3'b100; - assign READDATAWIDTHA = 3'b100; - end*/ - generate if (CFG_DBITS > 8) begin - TDP_BRAM18 #( - //`include "brams_init_18.vh" - .READ_WIDTH_A(CFG_DBITS), - .READ_WIDTH_B(CFG_DBITS), - .WRITE_WIDTH_A(CFG_DBITS), - .WRITE_WIDTH_B(CFG_DBITS), - ) _TECHMAP_REPLACE_ ( - .WRITEDATAA(16'hFFFF), - .WRITEDATAAP(2'b11), - .READDATAA(DO[15:0]), - .READDATAAP(DOP[2:0]), - .ADDRA(A1ADDR_14), - .CLOCKA(CLK2), - .READENABLEA(A1EN), - .WRITEENABLEA(1'b0), - .BYTEENABLEA(2'b0), - //.WRITEDATAWIDTHA(3'b0), - //.READDATAWIDTHA(READDATAWIDTHA), - - .WRITEDATAB(DI), - .WRITEDATABP(DIP), - .READDATAB(DOBDO), - .READDATABP(DOPBDOP), - .ADDRB(B1ADDR_14), - .CLOCKB(CLK3), - .READENABLEB(1'b0), - .WRITEENABLEB(1'b1), - .BYTEENABLEB(B1EN) - //.WRITEDATAWIDTHB(WRITEDATAWIDTHB), - //.READDATAWIDTHB(3'b0) - ); - end else begin - TDP_BRAM18 #( - //`include "brams_init_16.vh" - ) _TECHMAP_REPLACE_ ( - .WRITEDATAA(16'hFFFF), - .WRITEDATAAP(2'b11), - .READDATAA(DO[15:0]), - .READDATAAP(DOP[2:0]), - .ADDRA(A1ADDR_14), - .CLOCKA(CLK2), - .READENABLEA(A1EN), - .WRITEENABLEA(1'b0), - .BYTEENABLEA(2'b0), - //.WRITEDATAWIDTHA(3'b0), - // .READDATAWIDTHA(READDATAWIDTHA), - - .WRITEDATAB(DI), - .WRITEDATABP(DIP), - .READDATAB(DOBDO), - .READDATABP(DOPBDOP), - .ADDRB(B1ADDR_14), - .CLOCKB(CLK3), - .READENABLEB(1'b0), - .WRITEENABLEB(1'b1), - .BYTEENABLEB(B1EN) - //.WRITEDATAWIDTHB(WRITEDATAWIDTHB), - //.READDATAWIDTHB(3'b0) - ); - end endgenerate + input [CFG_ABITS-1:0] C1ADDR; + output [CFG_DBITS-1:0] C1DATA; + input C1EN; + + input [CFG_ABITS-1:0] D1ADDR; + input [CFG_DBITS-1:0] D1DATA; + input [CFG_ENABLE_D-1:0] D1EN; + + BRAM2x18_TDP #( + .CFG_ABITS(CFG_ABITS), + .CFG_DBITS(CFG_DBITS), + .CFG_ENABLE_B(CFG_ENABLE_B), + .CFG_ENABLE_D(CFG_ENABLE_D), + .CLKPOL2(CLKPOL2), + .CLKPOL3(CLKPOL3), + .INIT0(INIT), + ) _TECHMAP_REPLACE_ ( + .A1ADDR(A1ADDR), + .A1DATA(A1DATA), + .A1EN(A1EN), + .B1ADDR(B1ADDR), + .B1DATA(B1DATA), + .B1EN(B1EN), + .CLK1(CLK1), + + .C1ADDR(C1ADDR), + .C1DATA(C1DATA), + .C1EN(C1EN), + .D1ADDR(D1ADDR), + .D1DATA(D1DATA), + .D1EN(D1EN), + .CLK2(CLK2), + + .E1ADDR(), + .E1DATA(), + .E1EN(), + .F1ADDR(), + .F1DATA(), + .F1EN(), + .CLK3(), + + .G1ADDR(), + .G1DATA(), + .G1EN(), + .H1ADDR(), + .H1DATA(), + .H1EN(), + .CLK4() + ); endmodule module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); From 92e36d84ad2fe66962555ed77b2a604d6b35809e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 30 Mar 2022 16:26:14 +0200 Subject: [PATCH 755/845] ql-qlf: qlf_k6n10f: bram: add second techmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams_final_map.v | 240 +++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 ql-qlf-plugin/qlf_k6n10f/brams_final_map.v diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v new file mode 100644 index 000000000..ad2255152 --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v @@ -0,0 +1,240 @@ +// Copyright (C) 2020-2021 The SymbiFlow Authors. +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier:ISC + +`define MODE_36 3'b011 // 36 or 32-bit +`define MODE_18 3'b010 // 18 or 16-bit +`define MODE_9 3'b001 // 9 or 8-bit +`define MODE_4 3'b100 // 4-bit +`define MODE_2 3'b110 // 32-bit +`define MODE_1 3'b101 // 32-bit + +module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, C1EN, CLK1, CLK2, CLK3, CLK4, D1ADDR, D1DATA, D1EN, E1ADDR, E1DATA, E1EN, F1ADDR, F1DATA, F1EN, G1ADDR, G1DATA, G1EN, H1ADDR, H1DATA, H1EN); + parameter CFG_ABITS = 11; + parameter CFG_DBITS = 18; + parameter CFG_ENABLE_B = 4; + parameter CFG_ENABLE_D = 4; + parameter CFG_ENABLE_F = 4; + parameter CFG_ENABLE_H = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [18431:0] INIT0 = 18432'bx; + parameter [18431:0] INIT1 = 18432'bx; + + input CLK1; + input CLK2; + input CLK3; + input CLK4; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + input [CFG_ABITS-1:0] C1ADDR; + output [CFG_DBITS-1:0] C1DATA; + input C1EN; + + input [CFG_ABITS-1:0] D1ADDR; + input [CFG_DBITS-1:0] D1DATA; + input [CFG_ENABLE_D-1:0] D1EN; + + input [CFG_ABITS-1:0] E1ADDR; + output [CFG_DBITS-1:0] E1DATA; + input E1EN; + + input [CFG_ABITS-1:0] F1ADDR; + input [CFG_DBITS-1:0] F1DATA; + input [CFG_ENABLE_F-1:0] F1EN; + + input [CFG_ABITS-1:0] G1ADDR; + output [CFG_DBITS-1:0] G1DATA; + input G1EN; + + input [CFG_ABITS-1:0] H1ADDR; + input [CFG_DBITS-1:0] H1DATA; + input [CFG_ENABLE_H-1:0] H1EN; + + wire FLUSH1; + wire FLUSH2; + + wire [13:CFG_ABITS] A1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] B1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] C1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] D1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] E1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] F1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] G1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] H1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + + wire [13:0] A1ADDR_TOTAL = {A1ADDR_CMPL, A1ADDR}; + wire [13:0] B1ADDR_TOTAL = {B1ADDR_CMPL, B1ADDR}; + wire [13:0] C1ADDR_TOTAL = {C1ADDR_CMPL, C1ADDR}; + wire [13:0] D1ADDR_TOTAL = {D1ADDR_CMPL, D1ADDR}; + wire [13:0] E1ADDR_TOTAL = {E1ADDR_CMPL, E1ADDR}; + wire [13:0] F1ADDR_TOTAL = {F1ADDR_CMPL, F1ADDR}; + wire [13:0] G1ADDR_TOTAL = {G1ADDR_CMPL, G1ADDR}; + wire [13:0] H1ADDR_TOTAL = {H1ADDR_CMPL, H1ADDR}; + + wire [17:CFG_DBITS] A1_RDATA_CMPL; + wire [17:CFG_DBITS] C1_RDATA_CMPL; + wire [17:CFG_DBITS] E1_RDATA_CMPL; + wire [17:CFG_DBITS] G1_RDATA_CMPL; + + wire [17:CFG_DBITS] B1_WDATA_CMPL; + wire [17:CFG_DBITS] D1_WDATA_CMPL; + wire [17:CFG_DBITS] F1_WDATA_CMPL; + wire [17:CFG_DBITS] H1_WDATA_CMPL; + + wire [13:0] PORT_A1_ADDR; + wire [13:0] PORT_A2_ADDR; + wire [13:0] PORT_B1_ADDR; + wire [13:0] PORT_B2_ADDR; + + case (CFG_DBITS) + 1: begin + assign PORT_A1_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 14'd0); + assign PORT_B1_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 14'd0); + assign PORT_A2_ADDR = E1EN ? E1ADDR_TOTAL : (F1EN ? F1ADDR_TOTAL : 14'd0); + assign PORT_B2_ADDR = G1EN ? G1ADDR_TOTAL : (H1EN ? H1ADDR_TOTAL : 14'd0); + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0 + }; + end + + 2: begin + assign PORT_A1_ADDR = A1EN ? (A1ADDR_TOTAL << 1) : (B1EN ? (B1ADDR_TOTAL << 1) : 14'd0); + assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 1) : (D1EN ? (D1ADDR_TOTAL << 1) : 14'd0); + assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 1) : (F1EN ? (F1ADDR_TOTAL << 1) : 14'd0); + assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 1) : (H1EN ? (H1ADDR_TOTAL << 1) : 14'd0); + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0 + }; + end + + 4: begin + assign PORT_A1_ADDR = A1EN ? (A1ADDR_TOTAL << 2) : (B1EN ? (B1ADDR_TOTAL << 2) : 14'd0); + assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 2) : (D1EN ? (D1ADDR_TOTAL << 2) : 14'd0); + assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 2) : (F1EN ? (F1ADDR_TOTAL << 2) : 14'd0); + assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 2) : (H1EN ? (H1ADDR_TOTAL << 2) : 14'd0); + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0 + }; + end + + 8, 9: begin + assign PORT_A1_ADDR = A1EN ? (A1ADDR_TOTAL << 3) : (B1EN ? (B1ADDR_TOTAL << 3) : 14'd0); + assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 3) : (D1EN ? (D1ADDR_TOTAL << 3) : 14'd0); + assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 3) : (F1EN ? (F1ADDR_TOTAL << 3) : 14'd0); + assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 3) : (H1EN ? (H1ADDR_TOTAL << 3) : 14'd0); + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0 + }; + end + + 16, 18: begin + assign PORT_A1_ADDR = A1EN ? (A1ADDR_TOTAL << 4) : (B1EN ? (B1ADDR_TOTAL << 4) : 14'd0); + assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 4) : (D1EN ? (D1ADDR_TOTAL << 4) : 14'd0); + assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 4) : (F1EN ? (F1ADDR_TOTAL << 4) : 14'd0); + assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 4) : (H1EN ? (H1ADDR_TOTAL << 4) : 14'd0); + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0 + }; + end + + default: begin + assign PORT_A1_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 14'd0); + assign PORT_B1_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 14'd0); + assign PORT_A2_ADDR = E1EN ? E1ADDR_TOTAL : (F1EN ? F1ADDR_TOTAL : 14'd0); + assign PORT_B2_ADDR = G1EN ? G1ADDR_TOTAL : (H1EN ? H1ADDR_TOTAL : 14'd0); + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0 + }; + end + endcase + + assign FLUSH1 = 1'b0; + assign FLUSH2 = 1'b0; + + wire [17:0] PORT_A1_RDATA = {A1_RDATA_CMPL, A1DATA}; + wire [17:0] PORT_B1_RDATA = {C1_RDATA_CMPL, C1DATA}; + wire [17:0] PORT_A2_RDATA = {E1_RDATA_CMPL, E1DATA}; + wire [17:0] PORT_B2_RDATA = {G1_RDATA_CMPL, G1DATA}; + + wire [17:0] PORT_A1_WDATA = {B1_WDATA_CMPL, B1DATA}; + wire [17:0] PORT_B1_WDATA = {D1_WDATA_CMPL, D1DATA}; + wire [17:0] PORT_A2_WDATA = {F1_WDATA_CMPL, F1DATA}; + wire [17:0] PORT_B2_WDATA = {H1_WDATA_CMPL, H1DATA}; + + wire PORT_A1_CLK = CLK1; + wire PORT_A2_CLK = CLK3; + wire PORT_B1_CLK = CLK2; + wire PORT_B2_CLK = CLK4; + + wire PORT_A1_REN = A1EN; + wire PORT_A1_WEN = B1EN[0]; + wire [CFG_ENABLE_B-1:0] PORT_A1_BE = {B1EN[1],B1EN[0]}; + + wire PORT_A2_REN = E1EN; + wire PORT_A2_WEN = F1EN[0]; + wire [CFG_ENABLE_F-1:0] PORT_A2_BE = {F1EN[1],F1EN[0]}; + + wire PORT_B1_REN = C1EN; + wire PORT_B1_WEN = D1EN[0]; + wire [CFG_ENABLE_D-1:0] PORT_B1_BE = {D1EN[1],D1EN[0]}; + + wire PORT_B2_REN = G1EN; + wire PORT_B2_WEN = H1EN[0]; + wire [CFG_ENABLE_H-1:0] PORT_B2_BE = {H1EN[1],H1EN[0]}; + + TDP36K _TECHMAP_REPLACE_ ( + .WDATA_A1_i(PORT_A1_WDATA), + .RDATA_A1_o(PORT_A1_RDATA), + .ADDR_A1_i(PORT_A1_ADDR), + .CLK_A1_i(PORT_A1_CLK), + .REN_A1_i(PORT_A1_REN), + .WEN_A1_i(PORT_A1_WEN), + .BE_A1_i(PORT_A1_BE), + + .WDATA_A2_i(PORT_A2_WDATA), + .RDATA_A2_o(PORT_A2_RDATA), + .ADDR_A2_i(PORT_A2_ADDR), + .CLK_A2_i(PORT_A2_CLK), + .REN_A2_i(PORT_A2_REN), + .WEN_A2_i(PORT_A2_WEN), + .BE_A2_i(PORT_A2_BE), + + .WDATA_B1_i(PORT_B1_WDATA), + .RDATA_B1_o(PORT_B1_RDATA), + .ADDR_B1_i(PORT_B1_ADDR), + .CLK_B1_i(PORT_B1_CLK), + .REN_B1_i(PORT_B1_REN), + .WEN_B1_i(PORT_B1_WEN), + .BE_B1_i(PORT_B1_BE), + + .WDATA_B2_i(PORT_B2_WDATA), + .RDATA_B2_o(PORT_B2_RDATA), + .ADDR_B2_i(PORT_B2_ADDR), + .CLK_B2_i(PORT_B2_CLK), + .REN_B2_i(PORT_B2_REN), + .WEN_B2_i(PORT_B2_WEN), + .BE_B2_i(PORT_B2_BE), + + .FLUSH1_i(FLUSH1), + .FLUSH2_i(FLUSH2) + ); +endmodule From 8a2130b70c899d5085468737b893a2da719b722a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 30 Mar 2022 16:28:18 +0200 Subject: [PATCH 756/845] ql-qlf: qlf_k6n10f: bram: add BRAM18_TDP matching rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams.txt | 41 ++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams.txt b/ql-qlf-plugin/qlf_k6n10f/brams.txt index 6951a4ad9..f1dbebf52 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams.txt +++ b/ql-qlf-plugin/qlf_k6n10f/brams.txt @@ -48,25 +48,62 @@ bram $__QLF_FACTOR_BRAM36_SDP clkpol 2 3 endbram +bram $__QLF_FACTOR_BRAM18_TDP + init 1 + abits 10 @a10d18 + dbits 18 @a10d18 + abits 10 @a10d16 + dbits 16 @a10d16 + abits 11 @a11d9 + dbits 9 @a11d9 + abits 11 @a11d8 + dbits 8 @a11d8 + abits 12 @a12d4 + dbits 4 @a12d4 + abits 13 @a13d2 + dbits 2 @a13d2 + abits 14 @a14d1 + dbits 1 @a14d1 + groups 4 + ports 1 1 1 1 + wrmode 0 1 0 1 + enable 1 2 1 2 @a10d18 @a10d16 + enable 1 1 1 1 @a11d9 @a11d8 @a12d4 @a13d2 @a14d1 + transp 0 0 0 0 + clocks 1 1 2 2 + clkpol 1 1 2 2 +endbram match $__QLF_FACTOR_BRAM36_TDP + min bits 18433 min wports 1 max wports 2 min rports 1 max rports 2 min efficiency 1 - min bits 128 shuffle_enable B make_transp or_next_if_better endmatch match $__QLF_FACTOR_BRAM36_SDP + min bits 18433 max wports 1 max rports 1 min efficiency 1 - min bits 128 shuffle_enable B make_transp + or_next_if_better endmatch +match $__QLF_FACTOR_BRAM18_TDP + min bits 128 + max bits 18432 + min wports 1 + max wports 2 + min rports 1 + max rports 2 + min efficiency 1 + shuffle_enable B + make_transp +endmatch From 840a724f78581532b80a1a6a5145784ad8781f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 30 Mar 2022 16:29:32 +0200 Subject: [PATCH 757/845] ql-qlf: qlf_k6n10f: bram: add 2x18K sim module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 234 +++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index a77f76ccf..917885f02 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1155,6 +1155,240 @@ module TDP36K ( ); endmodule +module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, C1EN, CLK1, CLK2, CLK3, CLK4, D1ADDR, D1DATA, D1EN, E1ADDR, E1DATA, E1EN, F1ADDR, F1DATA, F1EN, G1ADDR, G1DATA, G1EN, H1ADDR, H1DATA, H1EN); + parameter CFG_ABITS = 11; + parameter CFG_DBITS = 18; + parameter CFG_ENABLE_B = 4; + parameter CFG_ENABLE_D = 4; + parameter CFG_ENABLE_F = 4; + parameter CFG_ENABLE_H = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [18431:0] INIT0 = 18432'bx; + parameter [18431:0] INIT1 = 18432'bx; + + localparam MODE_36 = 3'b011; // 36- or 32-bit + localparam MODE_18 = 3'b010; // 18- or 16-bit + localparam MODE_9 = 3'b001; // 9- or 8-bit + localparam MODE_4 = 3'b100; // 4-bit + localparam MODE_2 = 3'b110; // 2-bit + localparam MODE_1 = 3'b101; // 1-bit + + input CLK1; + input CLK2; + input CLK3; + input CLK4; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + input [CFG_ABITS-1:0] C1ADDR; + output [CFG_DBITS-1:0] C1DATA; + input C1EN; + + input [CFG_ABITS-1:0] D1ADDR; + input [CFG_DBITS-1:0] D1DATA; + input [CFG_ENABLE_D-1:0] D1EN; + + input [CFG_ABITS-1:0] E1ADDR; + output [CFG_DBITS-1:0] E1DATA; + input E1EN; + + input [CFG_ABITS-1:0] F1ADDR; + input [CFG_DBITS-1:0] F1DATA; + input [CFG_ENABLE_F-1:0] F1EN; + + input [CFG_ABITS-1:0] G1ADDR; + output [CFG_DBITS-1:0] G1DATA; + input G1EN; + + input [CFG_ABITS-1:0] H1ADDR; + input [CFG_DBITS-1:0] H1DATA; + input [CFG_ENABLE_H-1:0] H1EN; + + wire FLUSH1; + wire FLUSH2; + wire SPLIT; + + wire [13:CFG_ABITS] A1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] B1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] C1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] D1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] E1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] F1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] G1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] H1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + + wire [13:0] A1ADDR_TOTAL = {A1ADDR_CMPL, A1ADDR}; + wire [13:0] B1ADDR_TOTAL = {B1ADDR_CMPL, B1ADDR}; + wire [13:0] C1ADDR_TOTAL = {C1ADDR_CMPL, C1ADDR}; + wire [13:0] D1ADDR_TOTAL = {D1ADDR_CMPL, D1ADDR}; + wire [13:0] E1ADDR_TOTAL = {E1ADDR_CMPL, E1ADDR}; + wire [13:0] F1ADDR_TOTAL = {F1ADDR_CMPL, F1ADDR}; + wire [13:0] G1ADDR_TOTAL = {G1ADDR_CMPL, G1ADDR}; + wire [13:0] H1ADDR_TOTAL = {H1ADDR_CMPL, H1ADDR}; + + wire [17:CFG_DBITS] A1_RDATA_CMPL; + wire [17:CFG_DBITS] C1_RDATA_CMPL; + wire [17:CFG_DBITS] E1_RDATA_CMPL; + wire [17:CFG_DBITS] G1_RDATA_CMPL; + + wire [17:CFG_DBITS] B1_WDATA_CMPL; + wire [17:CFG_DBITS] D1_WDATA_CMPL; + wire [17:CFG_DBITS] F1_WDATA_CMPL; + wire [17:CFG_DBITS] H1_WDATA_CMPL; + + wire [13:0] PORT_A1_ADDR; + wire [13:0] PORT_A2_ADDR; + wire [13:0] PORT_B1_ADDR; + wire [13:0] PORT_B2_ADDR; + + case (CFG_DBITS) + 1: begin + assign PORT_A1_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 14'd0); + assign PORT_B1_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 14'd0); + assign PORT_A2_ADDR = E1EN ? E1ADDR_TOTAL : (F1EN ? F1ADDR_TOTAL : 14'd0); + assign PORT_B2_ADDR = G1EN ? G1ADDR_TOTAL : (H1EN ? H1ADDR_TOTAL : 14'd0); + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0 + }; + end + + 2: begin + assign PORT_A1_ADDR = A1EN ? (A1ADDR_TOTAL << 1) : (B1EN ? (B1ADDR_TOTAL << 1) : 14'd0); + assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 1) : (D1EN ? (D1ADDR_TOTAL << 1) : 14'd0); + assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 1) : (F1EN ? (F1ADDR_TOTAL << 1) : 14'd0); + assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 1) : (H1EN ? (H1ADDR_TOTAL << 1) : 14'd0); + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0 + }; + end + + 4: begin + assign PORT_A1_ADDR = A1EN ? (A1ADDR_TOTAL << 2) : (B1EN ? (B1ADDR_TOTAL << 2) : 14'd0); + assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 2) : (D1EN ? (D1ADDR_TOTAL << 2) : 14'd0); + assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 2) : (F1EN ? (F1ADDR_TOTAL << 2) : 14'd0); + assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 2) : (H1EN ? (H1ADDR_TOTAL << 2) : 14'd0); + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0 + }; + end + + 8, 9: begin + assign PORT_A1_ADDR = A1EN ? (A1ADDR_TOTAL << 3) : (B1EN ? (B1ADDR_TOTAL << 3) : 14'd0); + assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 3) : (D1EN ? (D1ADDR_TOTAL << 3) : 14'd0); + assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 3) : (F1EN ? (F1ADDR_TOTAL << 3) : 14'd0); + assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 3) : (H1EN ? (H1ADDR_TOTAL << 3) : 14'd0); + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0 + }; + end + + 16, 18: begin + assign PORT_A1_ADDR = A1EN ? (A1ADDR_TOTAL << 4) : (B1EN ? (B1ADDR_TOTAL << 4) : 14'd0); + assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 4) : (D1EN ? (D1ADDR_TOTAL << 4) : 14'd0); + assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 4) : (F1EN ? (F1ADDR_TOTAL << 4) : 14'd0); + assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 4) : (H1EN ? (H1ADDR_TOTAL << 4) : 14'd0); + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0 + }; + end + + default: begin + assign PORT_A1_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 14'd0); + assign PORT_B1_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 14'd0); + assign PORT_A2_ADDR = E1EN ? E1ADDR_TOTAL : (F1EN ? F1ADDR_TOTAL : 14'd0); + assign PORT_B2_ADDR = G1EN ? G1ADDR_TOTAL : (H1EN ? H1ADDR_TOTAL : 14'd0); + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 + }; + end + endcase + + assign FLUSH1 = 1'b0; + assign FLUSH2 = 1'b0; + + wire [17:0] PORT_A1_RDATA = {A1_RDATA_CMPL, A1DATA}; + wire [17:0] PORT_B1_RDATA = {C1_RDATA_CMPL, C1DATA}; + wire [17:0] PORT_A2_RDATA = {E1_RDATA_CMPL, E1DATA}; + wire [17:0] PORT_B2_RDATA = {G1_RDATA_CMPL, G1DATA}; + + wire [17:0] PORT_A1_WDATA = {B1_WDATA_CMPL, B1DATA}; + wire [17:0] PORT_B1_WDATA = {D1_WDATA_CMPL, D1DATA}; + wire [17:0] PORT_A2_WDATA = {F1_WDATA_CMPL, F1DATA}; + wire [17:0] PORT_B2_WDATA = {H1_WDATA_CMPL, H1DATA}; + + wire PORT_A1_CLK = CLK1; + wire PORT_A2_CLK = CLK3; + wire PORT_B1_CLK = CLK2; + wire PORT_B2_CLK = CLK4; + + wire PORT_A1_REN = A1EN; + wire PORT_A1_WEN = B1EN[0]; + wire [CFG_ENABLE_B-1:0] PORT_A1_BE = {B1EN[1],B1EN[0]}; + + wire PORT_A2_REN = E1EN; + wire PORT_A2_WEN = F1EN[0]; + wire [CFG_ENABLE_F-1:0] PORT_A2_BE = {F1EN[1],F1EN[0]}; + + wire PORT_B1_REN = C1EN; + wire PORT_B1_WEN = D1EN[0]; + wire [CFG_ENABLE_D-1:0] PORT_B1_BE = {D1EN[1],D1EN[0]}; + + wire PORT_B2_REN = G1EN; + wire PORT_B2_WEN = H1EN[0]; + wire [CFG_ENABLE_H-1:0] PORT_B2_BE = {H1EN[1],H1EN[0]}; + + TDP36K bram_2x18k ( + .WDATA_A1_i(PORT_A1_WDATA), + .RDATA_A1_o(PORT_A1_RDATA), + .ADDR_A1_i(PORT_A1_ADDR), + .CLK_A1_i(PORT_A1_CLK), + .REN_A1_i(PORT_A1_REN), + .WEN_A1_i(PORT_A1_WEN), + .BE_A1_i(PORT_A1_BE), + + .WDATA_A2_i(PORT_A2_WDATA), + .RDATA_A2_o(PORT_A2_RDATA), + .ADDR_A2_i(PORT_A2_ADDR), + .CLK_A2_i(PORT_A2_CLK), + .REN_A2_i(PORT_A2_REN), + .WEN_A2_i(PORT_A2_WEN), + .BE_A2_i(PORT_A2_BE), + + .WDATA_B1_i(PORT_B1_WDATA), + .RDATA_B1_o(PORT_B1_RDATA), + .ADDR_B1_i(PORT_B1_ADDR), + .CLK_B1_i(PORT_B1_CLK), + .REN_B1_i(PORT_B1_REN), + .WEN_B1_i(PORT_B1_WEN), + .BE_B1_i(PORT_B1_BE), + + .WDATA_B2_i(PORT_B2_WDATA), + .RDATA_B2_o(PORT_B2_RDATA), + .ADDR_B2_i(PORT_B2_ADDR), + .CLK_B2_i(PORT_B2_CLK), + .REN_B2_i(PORT_B2_REN), + .WEN_B2_i(PORT_B2_WEN), + .BE_B2_i(PORT_B2_BE), + + .FLUSH1_i(FLUSH1), + .FLUSH2_i(FLUSH2) + ); +endmodule + (* blackbox *) module QL_DSP1 ( input wire [19:0] a, From 9fc467325ba32525434f8a662ecee04038c73643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 30 Mar 2022 16:30:53 +0200 Subject: [PATCH 758/845] ql-qlf: qlf_k6n10f: bram: enable custom bram pass and final techmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/synth_quicklogic.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index acfeb2415..3f72fd3a2 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -309,7 +309,11 @@ struct SynthQuickLogicPass : public ScriptPass { if (family == "pp3") { run("pp3_braminit"); } + run("ql_bram_split ", "(for qlf_k6n10f if not -no_bram)"); run("techmap -map +/quicklogic/" + family + "/brams_map.v"); + if (family == "qlf_k6n10f") { + run("techmap -map +/quicklogic/" + family + "/brams_final_map.v"); + } } if (check_label("map_ffram")) { From 64c1452373add9d300faa0dd68a0c7d984c7bcb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 30 Mar 2022 16:32:08 +0200 Subject: [PATCH 759/845] ql-qlf: qlf_k6n10f: bram: add 2x18K split tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/Makefile | 3 +- .../bram_tdp_split/bram_tdp_split.tcl | 83 ++ .../bram_tdp_split/bram_tdp_split.v | 863 ++++++++++++++++++ .../qlf_k6n10f/bram_tdp_split/sim/Makefile | 37 + .../bram_tdp_split/sim/bram_tdp_split_tb.v | 415 +++++++++ 5 files changed, 1400 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/bram_tdp_split_tb.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 2e569bf7f..ff57dedd1 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -43,7 +43,8 @@ SIM_TESTS = \ # Those tests perform synthesis and simulation of synthesis results POST_SYNTH_SIM_TESTS = \ qlf_k6n10f/bram_tdp \ - qlf_k6n10f/bram_sdp + qlf_k6n10f/bram_sdp \ + qlf_k6n10f/bram_tdp_split include $(shell pwd)/../../Makefile_test.common diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.tcl new file mode 100644 index 000000000..9a8921ec8 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.tcl @@ -0,0 +1,83 @@ +yosys -import + +if { [info procs ql-qlf-k6n10f] == {} } { plugin -i ql-qlf } +yosys -import ; + +read_verilog $::env(DESIGN_TOP).v +design -save bram_tdp_split + +select BRAM_TDP_SPLIT_2x18x1024 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_SPLIT_2x18x1024 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_split_2x18x1024_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp_split +select BRAM_TDP_SPLIT_2x16x1024 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_SPLIT_2x16x1024 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_split_2x16x1024_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp_split +select BRAM_TDP_SPLIT_2x9x2048 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_SPLIT_2x9x2048 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_split_2x9x2048_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp_split +select BRAM_TDP_SPLIT_2x8x2048 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_SPLIT_2x8x2048 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_split_2x8x2048_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp_split +select BRAM_TDP_SPLIT_2x4x4096 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_SPLIT_2x4x4096 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_split_2x4x4096_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp_split +select BRAM_TDP_SPLIT_2x2x8192 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_SPLIT_2x2x8192 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_split_2x2x8192_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp_split +select BRAM_TDP_SPLIT_2x1x16384 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_SPLIT_2x1x16384 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_split_2x1x16384_post_synth.v +select -assert-count 1 t:TDP36K + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.v new file mode 100644 index 000000000..001efa095 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.v @@ -0,0 +1,863 @@ +// Copyright (C) 2019-2022 The SymbiFlow Authors +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier: ISC + +module BRAM_TDP_SPLIT #(parameter AWIDTH = 9, +parameter DWIDTH = 32)( + clk_a, + rce_a, + ra_a, + rq_a, + wce_a, + wa_a, + wd_a, + + clk_b, + rce_b, + ra_b, + rq_b, + wce_b, + wa_b, + wd_b +); + + input clk_a; + input rce_a; + input [AWIDTH-1:0] ra_a; + output reg [DWIDTH-1:0] rq_a; + input wce_a; + input [AWIDTH-1:0] wa_a; + input [DWIDTH-1:0] wd_a; + + input clk_b; + input rce_b; + input [AWIDTH-1:0] ra_b; + output reg [DWIDTH-1:0] rq_b; + input wce_b; + input [AWIDTH-1:0] wa_b; + input [DWIDTH-1:0] wd_b; + + reg [DWIDTH-1:0] memory[0:(1< $(word $(1),$(POST_SYNTH)).vvp.log 2>&1 + @vvp -vvvv $(word $(1),$(POST_SYNTH)).vvp > $(word $(1),$(POST_SYNTH)).vcd.log 2>&1 +endef + +define clean_post_synth_sim + @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log +endef + +#FIXME: $(call simulate_post_synth,3) +sim: + $(call simulate_post_synth,1) + $(call simulate_post_synth,2) + $(call simulate_post_synth,4) + $(call simulate_post_synth,5) + $(call simulate_post_synth,6) + $(call simulate_post_synth,7) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/bram_tdp_split_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/bram_tdp_split_tb.v new file mode 100644 index 000000000..5ff822d2c --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/bram_tdp_split_tb.v @@ -0,0 +1,415 @@ +// Copyright (C) 2019-2022 The SymbiFlow Authors +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier: ISC + +`timescale 1ns/1ps + +`define STRINGIFY(x) `"x`" + +module TB; + localparam PERIOD = 50; + localparam ADDR_INCR = 1; + + reg clk_a; + reg rce_a; + reg [`ADDR_WIDTH-1:0] ra_a; + wire [`DATA_WIDTH-1:0] rq_a_0; + wire [`DATA_WIDTH-1:0] rq_a_1; + reg wce_a; + reg [`ADDR_WIDTH-1:0] wa_a; + reg [`DATA_WIDTH-1:0] wd_a_0; + reg [`DATA_WIDTH-1:0] wd_a_1; + + reg clk_b; + reg rce_b; + reg [`ADDR_WIDTH-1:0] ra_b; + wire [`DATA_WIDTH-1:0] rq_b_0; + wire [`DATA_WIDTH-1:0] rq_b_1; + reg wce_b; + reg [`ADDR_WIDTH-1:0] wa_b; + reg [`DATA_WIDTH-1:0] wd_b_0; + reg [`DATA_WIDTH-1:0] wd_b_1; + + + initial clk_a = 0; + initial clk_b = 0; + initial ra_a = 0; + initial ra_b = 0; + initial rce_a = 0; + initial rce_b = 0; + initial forever #(PERIOD / 2.0) clk_a = ~clk_a; + initial begin + #(PERIOD / 4.0); + forever #(PERIOD / 2.0) clk_b = ~clk_b; + end + initial begin + $dumpfile(`STRINGIFY(`VCD)); + $dumpvars; + end + + integer a; + integer b; + + reg done_a; + reg done_b; + initial done_a = 1'b0; + initial done_b = 1'b0; + wire done_sim = done_a & done_b; + + reg [`DATA_WIDTH-1:0] expected_a_0; + reg [`DATA_WIDTH-1:0] expected_a_1; + reg [`DATA_WIDTH-1:0] expected_b_0; + reg [`DATA_WIDTH-1:0] expected_b_1; + + always @(posedge clk_a) begin + expected_a_0 <= (a | (a << 20) | 20'h55000) & {`DATA_WIDTH{1'b1}}; + expected_a_1 <= ((a+1) | ((a+1) << 20) | 20'h55000) & {`DATA_WIDTH{1'b1}}; + end + always @(posedge clk_b) begin + expected_b_0 <= ((b+2) | ((b+2) << 20) | 20'h55000) & {`DATA_WIDTH{1'b1}}; + expected_b_1 <= ((b+3) | ((b+3) << 20) | 20'h55000) & {`DATA_WIDTH{1'b1}}; + end + + wire error_a_0 = a != 0 ? (rq_a_0 !== expected_a_0) : 0; + wire error_a_1 = a != 0 ? (rq_a_1 !== expected_a_1) : 0; + wire error_b_0 = b != (1<<`ADDR_WIDTH) / 2 ? (rq_b_0 !== expected_b_0) : 0; + wire error_b_1 = b != (1<<`ADDR_WIDTH) / 2 ? (rq_b_1 !== expected_b_1) : 0; + + integer error_a_0_cnt = 0; + integer error_a_1_cnt = 0; + integer error_b_0_cnt = 0; + integer error_b_1_cnt = 0; + + always @ (posedge clk_a) + begin + if (error_a_0) + error_a_0_cnt <= error_a_0_cnt + 1'b1; + if (error_a_1) + error_a_1_cnt <= error_a_1_cnt + 1'b1; + end + always @ (posedge clk_b) + begin + if (error_b_0) + error_b_0_cnt <= error_b_0_cnt + 1'b1; + if (error_b_1) + error_b_1_cnt <= error_b_1_cnt + 1'b1; + end + + // PORTs A + initial #(1) begin + // Write data + for (a = 0; a < (1<<`ADDR_WIDTH) / 2; a = a + ADDR_INCR) begin + @(negedge clk_a) begin + wa_a = a; + wd_a_0 = a | (a << 20) | 20'h55000; + wd_a_1 = (a+1) | ((a+1) << 20) | 20'h55000; + wce_a = 1; + end + @(posedge clk_a) begin + #(PERIOD/10) wce_a = 0; + end + end + // Read data + for (a = 0; a < (1<<`ADDR_WIDTH) / 2; a = a + ADDR_INCR) begin + @(negedge clk_a) begin + ra_a = a; + rce_a = 1; + end + @(posedge clk_a) begin + #(PERIOD/10) rce_a = 0; + if ( rq_a_0 !== expected_a_0) begin + $display("%d: PORT A0: FAIL: mismatch act=%x exp=%x at %x", $time, rq_a_0, expected_a_0, a); + end else begin + $display("%d: PORT A0: OK: act=%x exp=%x at %x", $time, rq_a_0, expected_a_0, a); + end + if ( rq_a_1 !== expected_a_1) begin + $display("%d: PORT A1: FAIL: mismatch act=%x exp=%x at %x", $time, rq_a_1, expected_a_1, a); + end else begin + $display("%d: PORT A1: OK: act=%x exp=%x at %x", $time, rq_a_1, expected_a_1, a); + end + end + end + done_a = 1'b1; + end + + // PORTs B + initial #(1) begin + // Write data + for (b = (1<<`ADDR_WIDTH) / 2; b < (1<<`ADDR_WIDTH); b = b + ADDR_INCR) begin + @(negedge clk_b) begin + wa_b = b; + wd_b_0 = (b+2) | ((b+2) << 20) | 20'h55000; + wd_b_1 = (b+3) | ((b+3) << 20) | 20'h55000; + wce_b = 1; + end + @(posedge clk_b) begin + #(PERIOD/10) wce_b = 0; + end + end + // Read data + for (b = (1<<`ADDR_WIDTH) / 2; b < (1<<`ADDR_WIDTH); b = b + ADDR_INCR) begin + @(negedge clk_b) begin + ra_b = b; + rce_b = 1; + end + @(posedge clk_b) begin + #(PERIOD/10) rce_b = 0; + if ( rq_b_0 !== expected_b_0) begin + $display("%d: PORT B0: FAIL: mismatch act=%x exp=%x at %x", $time, rq_b_0, expected_b_0, b); + end else begin + $display("%d: PORT B0: OK: act=%x exp=%x at %x", $time, rq_b_0, expected_b_0, b); + end + if ( rq_b_1 !== expected_b_1) begin + $display("%d: PORT B1: FAIL: mismatch act=%x exp=%x at %x", $time, rq_b_1, expected_b_1, b); + end else begin + $display("%d: PORT B1: OK: act=%x exp=%x at %x", $time, rq_b_1, expected_b_1, b); + end + end + end + done_b = 1'b1; + end + + // Scan for simulation finish + always @(posedge clk_a, posedge clk_b) begin + if (done_sim) + $finish_and_return( (error_a_0_cnt == 0 & error_b_0_cnt == 0 & error_a_1_cnt == 0 & error_b_1_cnt == 0) ? 0 : -1 ); + end + + case (`STRINGIFY(`TOP)) + "BRAM_TDP_SPLIT_2x18x1024": begin + BRAM_TDP_SPLIT_2x18x1024 #() bram ( + .clk_a_0(clk_a), + .rce_a_0(rce_a), + .ra_a_0(ra_a), + .rq_a_0(rq_a_0), + .wce_a_0(wce_a), + .wa_a_0(wa_a), + .wd_a_0(wd_a_0), + .clk_b_0(clk_b), + .rce_b_0(rce_b), + .ra_b_0(ra_b), + .rq_b_0(rq_b_0), + .wce_b_0(wce_b), + .wa_b_0(wa_b), + .wd_b_0(wd_b_0), + + .clk_a_1(clk_a), + .rce_a_1(rce_a), + .ra_a_1(ra_a), + .rq_a_1(rq_a_1), + .wce_a_1(wce_a), + .wa_a_1(wa_a), + .wd_a_1(wd_a_1), + .clk_b_1(clk_b), + .rce_b_1(rce_b), + .ra_b_1(ra_b), + .rq_b_1(rq_b_1), + .wce_b_1(wce_b), + .wa_b_1(wa_b), + .wd_b_1(wd_b_1) + ); + end + "BRAM_TDP_SPLIT_2x16x1024": begin + BRAM_TDP_SPLIT_2x16x1024 #() bram ( + .clk_a_0(clk_a), + .rce_a_0(rce_a), + .ra_a_0(ra_a), + .rq_a_0(rq_a_0), + .wce_a_0(wce_a), + .wa_a_0(wa_a), + .wd_a_0(wd_a_0), + .clk_b_0(clk_b), + .rce_b_0(rce_b), + .ra_b_0(ra_b), + .rq_b_0(rq_b_0), + .wce_b_0(wce_b), + .wa_b_0(wa_b), + .wd_b_0(wd_b_0), + + .clk_a_1(clk_a), + .rce_a_1(rce_a), + .ra_a_1(ra_a), + .rq_a_1(rq_a_1), + .wce_a_1(wce_a), + .wa_a_1(wa_a), + .wd_a_1(wd_a_1), + .clk_b_1(clk_b), + .rce_b_1(rce_b), + .ra_b_1(ra_b), + .rq_b_1(rq_b_1), + .wce_b_1(wce_b), + .wa_b_1(wa_b), + .wd_b_1(wd_b_1) + ); + end + "BRAM_TDP_SPLIT_2x9x2048": begin + BRAM_TDP_SPLIT_2x9x2048 #() bram ( + .clk_a_0(clk_a), + .rce_a_0(rce_a), + .ra_a_0(ra_a), + .rq_a_0(rq_a_0), + .wce_a_0(wce_a), + .wa_a_0(wa_a), + .wd_a_0(wd_a_0), + .clk_b_0(clk_b), + .rce_b_0(rce_b), + .ra_b_0(ra_b), + .rq_b_0(rq_b_0), + .wce_b_0(wce_b), + .wa_b_0(wa_b), + .wd_b_0(wd_b_0), + + .clk_a_1(clk_a), + .rce_a_1(rce_a), + .ra_a_1(ra_a), + .rq_a_1(rq_a_1), + .wce_a_1(wce_a), + .wa_a_1(wa_a), + .wd_a_1(wd_a_1), + .clk_b_1(clk_b), + .rce_b_1(rce_b), + .ra_b_1(ra_b), + .rq_b_1(rq_b_1), + .wce_b_1(wce_b), + .wa_b_1(wa_b), + .wd_b_1(wd_b_1) + ); + end + "BRAM_TDP_SPLIT_2x8x2048": begin + BRAM_TDP_SPLIT_2x8x2048 #() bram ( + .clk_a_0(clk_a), + .rce_a_0(rce_a), + .ra_a_0(ra_a), + .rq_a_0(rq_a_0), + .wce_a_0(wce_a), + .wa_a_0(wa_a), + .wd_a_0(wd_a_0), + .clk_b_0(clk_b), + .rce_b_0(rce_b), + .ra_b_0(ra_b), + .rq_b_0(rq_b_0), + .wce_b_0(wce_b), + .wa_b_0(wa_b), + .wd_b_0(wd_b_0), + + .clk_a_1(clk_a), + .rce_a_1(rce_a), + .ra_a_1(ra_a), + .rq_a_1(rq_a_1), + .wce_a_1(wce_a), + .wa_a_1(wa_a), + .wd_a_1(wd_a_1), + .clk_b_1(clk_b), + .rce_b_1(rce_b), + .ra_b_1(ra_b), + .rq_b_1(rq_b_1), + .wce_b_1(wce_b), + .wa_b_1(wa_b), + .wd_b_1(wd_b_1) + ); + end + "BRAM_TDP_SPLIT_2x4x4096": begin + BRAM_TDP_SPLIT_2x4x4096 #() bram ( + .clk_a_0(clk_a), + .rce_a_0(rce_a), + .ra_a_0(ra_a), + .rq_a_0(rq_a_0), + .wce_a_0(wce_a), + .wa_a_0(wa_a), + .wd_a_0(wd_a_0), + .clk_b_0(clk_b), + .rce_b_0(rce_b), + .ra_b_0(ra_b), + .rq_b_0(rq_b_0), + .wce_b_0(wce_b), + .wa_b_0(wa_b), + .wd_b_0(wd_b_0), + + .clk_a_1(clk_a), + .rce_a_1(rce_a), + .ra_a_1(ra_a), + .rq_a_1(rq_a_1), + .wce_a_1(wce_a), + .wa_a_1(wa_a), + .wd_a_1(wd_a_1), + .clk_b_1(clk_b), + .rce_b_1(rce_b), + .ra_b_1(ra_b), + .rq_b_1(rq_b_1), + .wce_b_1(wce_b), + .wa_b_1(wa_b), + .wd_b_1(wd_b_1) + ); + end + "BRAM_TDP_SPLIT_2x2x8192": begin + BRAM_TDP_SPLIT_2x2x8192 #() bram ( + .clk_a_0(clk_a), + .rce_a_0(rce_a), + .ra_a_0(ra_a), + .rq_a_0(rq_a_0), + .wce_a_0(wce_a), + .wa_a_0(wa_a), + .wd_a_0(wd_a_0), + .clk_b_0(clk_b), + .rce_b_0(rce_b), + .ra_b_0(ra_b), + .rq_b_0(rq_b_0), + .wce_b_0(wce_b), + .wa_b_0(wa_b), + .wd_b_0(wd_b_0), + + .clk_a_1(clk_a), + .rce_a_1(rce_a), + .ra_a_1(ra_a), + .rq_a_1(rq_a_1), + .wce_a_1(wce_a), + .wa_a_1(wa_a), + .wd_a_1(wd_a_1), + .clk_b_1(clk_b), + .rce_b_1(rce_b), + .ra_b_1(ra_b), + .rq_b_1(rq_b_1), + .wce_b_1(wce_b), + .wa_b_1(wa_b), + .wd_b_1(wd_b_1) + ); + end + "BRAM_TDP_SPLIT_2x1x16384": begin + BRAM_TDP_SPLIT_2x1x16384 #() bram ( + .clk_a_0(clk_a), + .rce_a_0(rce_a), + .ra_a_0(ra_a), + .rq_a_0(rq_a_0), + .wce_a_0(wce_a), + .wa_a_0(wa_a), + .wd_a_0(wd_a_0), + .clk_b_0(clk_b), + .rce_b_0(rce_b), + .ra_b_0(ra_b), + .rq_b_0(rq_b_0), + .wce_b_0(wce_b), + .wa_b_0(wa_b), + .wd_b_0(wd_b_0), + + .clk_a_1(clk_a), + .rce_a_1(rce_a), + .ra_a_1(ra_a), + .rq_a_1(rq_a_1), + .wce_a_1(wce_a), + .wa_a_1(wa_a), + .wd_a_1(wd_a_1), + .clk_b_1(clk_b), + .rce_b_1(rce_b), + .ra_b_1(ra_b), + .rq_b_1(rq_b_1), + .wce_b_1(wce_b), + .wa_b_1(wa_b), + .wd_b_1(wd_b_1) + ); + end + endcase +endmodule From b8a82b3f54d330639c0063f7bf1a07ea712fa263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 31 Mar 2022 10:31:26 +0200 Subject: [PATCH 760/845] ql-qlf: qlf_k6n10f: bram: update TDP BRAM defs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams.txt | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams.txt b/ql-qlf-plugin/qlf_k6n10f/brams.txt index f1dbebf52..73afc5090 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams.txt +++ b/ql-qlf-plugin/qlf_k6n10f/brams.txt @@ -2,10 +2,16 @@ bram $__QLF_FACTOR_BRAM36_TDP init 1 abits 10 @a10d36 dbits 36 @a10d36 + abits 10 @a10d32 + dbits 32 @a10d32 abits 11 @a11d18 dbits 18 @a11d18 + abits 11 @a11d16 + dbits 16 @a11d16 abits 12 @a12d9 dbits 9 @a12d9 + abits 12 @a12d8 + dbits 8 @a12d8 abits 13 @a13d4 dbits 4 @a13d4 abits 14 @a14d2 @@ -15,9 +21,9 @@ bram $__QLF_FACTOR_BRAM36_TDP groups 4 ports 1 1 1 1 wrmode 0 1 0 1 - enable 1 4 1 4 @a10d36 - enable 1 2 1 2 @a11d18 - enable 1 1 1 1 @a12d9 @a13d4 @a14d2 @a15d1 + enable 1 4 1 4 @a10d36 @a10d32 + enable 1 2 1 2 @a11d18 @a11d16 + enable 1 1 1 1 @a12d9 @a12d8 @a13d4 @a14d2 @a15d1 transp 0 0 0 0 clocks 1 1 2 2 clkpol 1 1 1 1 @@ -27,10 +33,16 @@ bram $__QLF_FACTOR_BRAM36_SDP init 1 abits 10 @a10d36 dbits 36 @a10d36 + abits 10 @a10d32 + dbits 32 @a10d32 abits 11 @a11d18 dbits 18 @a11d18 + abits 11 @a11d16 + dbits 16 @a11d16 abits 12 @a12d9 dbits 9 @a12d9 + abits 12 @a12d8 + dbits 8 @a12d8 abits 13 @a13d4 dbits 4 @a13d4 abits 14 @a14d2 @@ -40,9 +52,9 @@ bram $__QLF_FACTOR_BRAM36_SDP groups 2 ports 1 1 wrmode 0 1 - enable 1 4 @a10d36 - enable 1 2 @a11d18 - enable 1 1 @a12d9 @a13d4 @a14d2 @a15d1 + enable 1 4 @a10d36 @a10d32 + enable 1 2 @a11d18 @a11d16 + enable 1 1 @a12d9 @a12d8 @a13d4 @a14d2 @a15d1 transp 0 0 clocks 2 3 clkpol 2 3 From 008d4e3ff2266a8b76b6018d1bcfb7119c98566b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 31 Mar 2022 11:10:18 +0200 Subject: [PATCH 761/845] ql-qlf: qlf_k6n10f: tests: bram: extend tdp and sdp test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- .../tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl | 79 ++++- .../tests/qlf_k6n10f/bram_sdp/bram_sdp.v | 186 ++++++++++- .../tests/qlf_k6n10f/bram_sdp/sim/Makefile | 14 +- .../qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v | 71 ++++- .../tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl | 79 ++++- .../tests/qlf_k6n10f/bram_tdp/bram_tdp.v | 297 +++++++++++++++++- .../tests/qlf_k6n10f/bram_tdp/sim/Makefile | 14 +- .../qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v | 106 ++++++- 8 files changed, 770 insertions(+), 76 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl index 2a161c145..f8567ce66 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl @@ -6,45 +6,100 @@ yosys -import ; read_verilog $::env(DESIGN_TOP).v design -save bram_sdp -select BRAM_SDP_32x512 +select BRAM_SDP_36x1024 select * -synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_32x512 +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_36x1024 opt_expr -undriven opt_clean stat -write_verilog sim/bram_sdp_32x512_post_synth.v +write_verilog sim/bram_sdp_36x1024_post_synth.v select -assert-count 1 t:TDP36K select -clear design -load bram_sdp -select BRAM_SDP_16x1024 +select BRAM_SDP_32x1024 select * -synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_16x1024 +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_32x1024 opt_expr -undriven opt_clean stat -write_verilog sim/bram_sdp_16x1024_post_synth.v +write_verilog sim/bram_sdp_32x1024_post_synth.v select -assert-count 1 t:TDP36K select -clear design -load bram_sdp -select BRAM_SDP_8x2048 +select BRAM_SDP_18x2048 select * -synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_8x2048 +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_18x2048 opt_expr -undriven opt_clean stat -write_verilog sim/bram_sdp_8x2048_post_synth.v +write_verilog sim/bram_sdp_18x2048_post_synth.v select -assert-count 1 t:TDP36K select -clear design -load bram_sdp -select BRAM_SDP_4x4096 +select BRAM_SDP_16x2048 select * -synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_4x4096 +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_16x2048 opt_expr -undriven opt_clean stat -write_verilog sim/bram_sdp_4x4096_post_synth.v +write_verilog sim/bram_sdp_16x2048_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp +select BRAM_SDP_9x4096 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_9x4096 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_9x4096_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp +select BRAM_SDP_8x4096 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_8x4096 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_8x4096_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp +select BRAM_SDP_4x8192 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_4x8192 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_4x8192_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp +select BRAM_SDP_2x16384 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_2x16384 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_2x16384_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp +select BRAM_SDP_1x32768 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_1x32768 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_1x32768_post_synth.v select -assert-count 1 t:TDP36K diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v index 3670335c5..568b708d5 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v @@ -54,7 +54,7 @@ parameter DWIDTH = 32)( endmodule -module BRAM_SDP_32x512( +module BRAM_SDP_36x1024( clk, rce, ra, @@ -64,8 +64,8 @@ module BRAM_SDP_32x512( wd ); -parameter AWIDTH = 9; -parameter DWIDTH = 32; +parameter AWIDTH = 10; +parameter DWIDTH = 36; input clk; input rce; @@ -76,7 +76,7 @@ parameter DWIDTH = 32; input [DWIDTH-1:0] wd; BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_32x512 (.clk(clk), + BRAM_36x1024 (.clk(clk), .rce(rce), .ra(ra), .rq(rq), @@ -86,7 +86,7 @@ BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) endmodule -module BRAM_SDP_16x1024( +module BRAM_SDP_32x1024( clk, rce, ra, @@ -97,7 +97,39 @@ module BRAM_SDP_16x1024( ); parameter AWIDTH = 10; -parameter DWIDTH = 16; +parameter DWIDTH = 32; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + +BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_32x1024 (.clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + +endmodule + +module BRAM_SDP_18x2048( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + +parameter AWIDTH = 11; +parameter DWIDTH = 18; input clk; input rce; @@ -108,7 +140,7 @@ parameter DWIDTH = 16; input [DWIDTH-1:0] wd; BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_16x1024 (.clk(clk), + BRAM_18x2048 (.clk(clk), .rce(rce), .ra(ra), .rq(rq), @@ -119,7 +151,7 @@ BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) endmodule -module BRAM_SDP_8x2048( +module BRAM_SDP_16x2048( clk, rce, ra, @@ -130,7 +162,40 @@ module BRAM_SDP_8x2048( ); parameter AWIDTH = 11; -parameter DWIDTH = 8; +parameter DWIDTH = 16; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + +BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_16x2048 (.clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + + +endmodule + +module BRAM_SDP_9x4096( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + +parameter AWIDTH = 12; +parameter DWIDTH = 9; input clk; input rce; @@ -141,7 +206,7 @@ parameter DWIDTH = 8; input [DWIDTH-1:0] wd; BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_8x2048 (.clk(clk), + BRAM_9x4096 (.clk(clk), .rce(rce), .ra(ra), .rq(rq), @@ -152,7 +217,7 @@ BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) endmodule -module BRAM_SDP_4x4096( +module BRAM_SDP_8x4096( clk, rce, ra, @@ -163,6 +228,39 @@ module BRAM_SDP_4x4096( ); parameter AWIDTH = 12; +parameter DWIDTH = 8; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + +BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_8x4096 (.clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + + +endmodule + +module BRAM_SDP_4x8192( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + +parameter AWIDTH = 13; parameter DWIDTH = 4; input clk; @@ -174,7 +272,71 @@ parameter DWIDTH = 4; input [DWIDTH-1:0] wd; BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_4x4096 (.clk(clk), + BRAM_4x8192 (.clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + +endmodule + +module BRAM_SDP_2x16384( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + +parameter AWIDTH = 14; +parameter DWIDTH = 2; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + +BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_2x16384 (.clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd)); + +endmodule + +module BRAM_SDP_1x32768( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + +parameter AWIDTH = 15; +parameter DWIDTH = 1; + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + +BRAM_SDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_1x32678 (.clk(clk), .rce(rce), .ra(ra), .rq(rq), diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile index e0b9c1674..f8e89a83f 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile @@ -15,11 +15,10 @@ # SPDX-License-Identifier: Apache-2.0 TESTBENCH = bram_sdp_tb.v -POST_SYNTH = bram_sdp_32x512_post_synth bram_sdp_16x1024_post_synth bram_sdp_8x2048_post_synth bram_sdp_4x4096_post_synth -ADDR_WIDTH = 9 10 11 12 -DATA_WIDTH = 32 16 8 4 -TOP = BRAM_SDP_32x512 BRAM_SDP_16x1024 BRAM_SDP_8x2048 BRAM_SDP_4x4096 -TEST_CASES = $(seq 0 3) +POST_SYNTH = bram_sdp_36x1024_post_synth bram_sdp_32x1024_post_synth bram_sdp_18x2048_post_synth bram_sdp_16x2048_post_synth bram_sdp_9x4096_post_synth bram_sdp_8x4096_post_synth bram_sdp_4x8192_post_synth bram_sdp_2x16384_post_synth bram_sdp_1x32768_post_synth +ADDR_WIDTH = 10 10 11 11 12 12 13 14 15 +DATA_WIDTH = 36 32 18 16 9 8 4 2 1 +TOP = BRAM_SDP_36x1024 BRAM_SDP_32x1024 BRAM_SDP_18x2048 BRAM_SDP_16x2048 BRAM_SDP_9x4096 BRAM_SDP_8x4096 BRAM_SDP_4x8192 BRAM_SDP_2x16384 BRAM_SDP_1x32768 ADDR_DEFINES = $(foreach awidth, $(ADDR_WIDTH),-DADDR_WIDTH="$(awidth)") DATA_DEFINES = $(foreach dwidth, $(DATA_WIDTH),-DDATA_WIDTH="$(dwidth)") TOP_DEFINES = $(foreach top, $(TOP),-DTOP="$(top)") @@ -36,8 +35,13 @@ define clean_post_synth_sim @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log endef +# FIXME: $(call simulate_post_synth,5) sim: $(call simulate_post_synth,1) $(call simulate_post_synth,2) $(call simulate_post_synth,3) $(call simulate_post_synth,4) + $(call simulate_post_synth,6) + $(call simulate_post_synth,7) + $(call simulate_post_synth,8) + $(call simulate_post_synth,9) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v index 900ddc04e..30b365ab6 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v @@ -100,8 +100,8 @@ module TB; end case (`STRINGIFY(`TOP)) - "BRAM_SDP_32x512": begin - BRAM_SDP_32x512 #() bram ( + "BRAM_SDP_36x1024": begin + BRAM_SDP_36x1024 #() bram ( .clk(clk), .rce(rce), .ra(ra), @@ -111,8 +111,8 @@ module TB; .wd(wd) ); end - "BRAM_SDP_16x1024": begin - BRAM_SDP_16x1024 #() bram ( + "BRAM_SDP_32x1024": begin + BRAM_SDP_32x1024 #() bram ( .clk(clk), .rce(rce), .ra(ra), @@ -122,8 +122,8 @@ module TB; .wd(wd) ); end - "BRAM_SDP_8x2048": begin - BRAM_SDP_8x2048 #() bram ( + "BRAM_SDP_18x2048": begin + BRAM_SDP_18x2048 #() bram ( .clk(clk), .rce(rce), .ra(ra), @@ -133,8 +133,63 @@ module TB; .wd(wd) ); end - "BRAM_SDP_4x4096": begin - BRAM_SDP_4x4096 #() bram ( + "BRAM_SDP_16x2048": begin + BRAM_SDP_16x2048 #() bram ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "BRAM_SDP_9x4096": begin + BRAM_SDP_9x4096 #() bram ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "BRAM_SDP_8x4096": begin + BRAM_SDP_8x4096 #() bram ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "BRAM_SDP_4x8192": begin + BRAM_SDP_4x8192 #() bram ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "BRAM_SDP_2x16384": begin + BRAM_SDP_2x16384 #() bram ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "BRAM_SDP_1x32768": begin + BRAM_SDP_1x32768 #() bram ( .clk(clk), .rce(rce), .ra(ra), diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl index 5fd14e464..8ef0e9da4 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl @@ -6,45 +6,100 @@ yosys -import ; read_verilog $::env(DESIGN_TOP).v design -save bram_tdp -select BRAM_TDP_32x512 +select BRAM_TDP_36x1024 select * -synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_32x512 +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_36x1024 opt_expr -undriven opt_clean stat -write_verilog sim/bram_tdp_32x512_post_synth.v +write_verilog sim/bram_tdp_36x1024_post_synth.v select -assert-count 1 t:TDP36K select -clear design -load bram_tdp -select BRAM_TDP_16x1024 +select BRAM_TDP_32x1024 select * -synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_16x1024 +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_32x1024 opt_expr -undriven opt_clean stat -write_verilog sim/bram_tdp_16x1024_post_synth.v +write_verilog sim/bram_tdp_32x1024_post_synth.v select -assert-count 1 t:TDP36K select -clear design -load bram_tdp -select BRAM_TDP_8x2048 +select BRAM_TDP_18x2048 select * -synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_8x2048 +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_18x2048 opt_expr -undriven opt_clean stat -write_verilog sim/bram_tdp_8x2048_post_synth.v +write_verilog sim/bram_tdp_18x2048_post_synth.v select -assert-count 1 t:TDP36K select -clear design -load bram_tdp -select BRAM_TDP_4x4096 +select BRAM_TDP_16x2048 select * -synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_4x4096 +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_16x2048 opt_expr -undriven opt_clean stat -write_verilog sim/bram_tdp_4x4096_post_synth.v +write_verilog sim/bram_tdp_16x2048_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select BRAM_TDP_9x4096 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_9x4096 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_9x4096_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select BRAM_TDP_8x4096 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_8x4096 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_8x4096_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select BRAM_TDP_4x8192 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_4x8192 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_4x8192_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select BRAM_TDP_2x16384 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_2x16384 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_2x16384_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select BRAM_TDP_1x32768 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_TDP_1x32768 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_tdp_1x32768_post_synth.v select -assert-count 1 t:TDP36K diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v index 63e1efb65..090cc24f8 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v @@ -14,8 +14,8 @@ // // SPDX-License-Identifier: Apache-2.0 -module BRAM_TDP #(parameter AWIDTH = 9, -parameter DWIDTH = 32)( +module BRAM_TDP #(parameter AWIDTH = 10, +parameter DWIDTH = 36)( clk_a, rce_a, ra_a, @@ -76,7 +76,7 @@ parameter DWIDTH = 32)( endmodule -module BRAM_TDP_32x512( +module BRAM_TDP_36x1024( clk_a, rce_a, ra_a, @@ -94,8 +94,8 @@ module BRAM_TDP_32x512( wd_b ); -parameter AWIDTH = 9; -parameter DWIDTH = 32; +parameter AWIDTH = 10; +parameter DWIDTH = 36; input clk_a; input rce_a; @@ -113,7 +113,7 @@ parameter DWIDTH = 32; input [DWIDTH-1:0] wd_b; BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_TDP_32x512 (.clk_a(clk_a), + BRAM_TDP_36x1024 (.clk_a(clk_a), .rce_a(rce_a), .ra_a(ra_a), .rq_a(rq_a), @@ -130,7 +130,7 @@ BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) endmodule -module BRAM_TDP_16x1024( +module BRAM_TDP_32x1024( clk_a, rce_a, ra_a, @@ -138,6 +138,7 @@ module BRAM_TDP_16x1024( wce_a, wa_a, wd_a, + clk_b, rce_b, ra_b, @@ -148,6 +149,112 @@ module BRAM_TDP_16x1024( ); parameter AWIDTH = 10; +parameter DWIDTH = 32; + + input clk_a; + input rce_a; + input [AWIDTH-1:0] ra_a; + output [DWIDTH-1:0] rq_a; + input wce_a; + input [AWIDTH-1:0] wa_a; + input [DWIDTH-1:0] wd_a; + input clk_b; + input rce_b; + input [AWIDTH-1:0] ra_b; + output [DWIDTH-1:0] rq_b; + input wce_b; + input [AWIDTH-1:0] wa_b; + input [DWIDTH-1:0] wd_b; + +BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_TDP_32x1024 (.clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b)); + +endmodule + +module BRAM_TDP_18x2048( + clk_a, + rce_a, + ra_a, + rq_a, + wce_a, + wa_a, + wd_a, + clk_b, + rce_b, + ra_b, + rq_b, + wce_b, + wa_b, + wd_b +); + +parameter AWIDTH = 11; +parameter DWIDTH = 18; + + input clk_a; + input rce_a; + input [AWIDTH-1:0] ra_a; + output [DWIDTH-1:0] rq_a; + input wce_a; + input [AWIDTH-1:0] wa_a; + input [DWIDTH-1:0] wd_a; + + input clk_b; + input rce_b; + input [AWIDTH-1:0] ra_b; + output [DWIDTH-1:0] rq_b; + input wce_b; + input [AWIDTH-1:0] wa_b; + input [DWIDTH-1:0] wd_b; + +BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_TDP_18x2048 (.clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b)); +endmodule + +module BRAM_TDP_16x2048( + clk_a, + rce_a, + ra_a, + rq_a, + wce_a, + wa_a, + wd_a, + clk_b, + rce_b, + ra_b, + rq_b, + wce_b, + wa_b, + wd_b +); + +parameter AWIDTH = 11; parameter DWIDTH = 16; input clk_a; @@ -167,7 +274,7 @@ parameter DWIDTH = 16; input [DWIDTH-1:0] wd_b; BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_TDP_16x1024 (.clk_a(clk_a), + BRAM_TDP_16x2048 (.clk_a(clk_a), .rce_a(rce_a), .ra_a(ra_a), .rq_a(rq_a), @@ -183,7 +290,7 @@ BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) .wd_b(wd_b)); endmodule -module BRAM_TDP_8x2048( +module BRAM_TDP_9x4096( clk_a, rce_a, ra_a, @@ -201,8 +308,8 @@ module BRAM_TDP_8x2048( wd_b ); -parameter AWIDTH = 11; -parameter DWIDTH = 8; +parameter AWIDTH = 12; +parameter DWIDTH = 9; input clk_a; input rce_a; @@ -221,7 +328,7 @@ parameter DWIDTH = 8; input [DWIDTH-1:0] wd_b; BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_TDP_8x2048 (.clk_a(clk_a), + BRAM_TDP_9x4096 (.clk_a(clk_a), .rce_a(rce_a), .ra_a(ra_a), .rq_a(rq_a), @@ -237,7 +344,7 @@ BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) .wd_b(wd_b)); endmodule -module BRAM_TDP_4x4096( +module BRAM_TDP_8x4096( clk_a, rce_a, ra_a, @@ -256,6 +363,60 @@ module BRAM_TDP_4x4096( ); parameter AWIDTH = 12; +parameter DWIDTH = 8; + + input clk_a; + input rce_a; + input [AWIDTH-1:0] ra_a; + output [DWIDTH-1:0] rq_a; + input wce_a; + input [AWIDTH-1:0] wa_a; + input [DWIDTH-1:0] wd_a; + + input clk_b; + input rce_b; + input [AWIDTH-1:0] ra_b; + output [DWIDTH-1:0] rq_b; + input wce_b; + input [AWIDTH-1:0] wa_b; + input [DWIDTH-1:0] wd_b; + +BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_TDP_8x4096 (.clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b)); +endmodule + +module BRAM_TDP_4x8192( + clk_a, + rce_a, + ra_a, + rq_a, + wce_a, + wa_a, + wd_a, + + clk_b, + rce_b, + ra_b, + rq_b, + wce_b, + wa_b, + wd_b +); + +parameter AWIDTH = 13; parameter DWIDTH = 4; input clk_a; @@ -275,7 +436,115 @@ parameter DWIDTH = 4; input [DWIDTH-1:0] wd_b; BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) - BRAM_TDP_4x4096 (.clk_a(clk_a), + BRAM_TDP_4x8192 (.clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b)); +endmodule + +module BRAM_TDP_2x16384( + clk_a, + rce_a, + ra_a, + rq_a, + wce_a, + wa_a, + wd_a, + + clk_b, + rce_b, + ra_b, + rq_b, + wce_b, + wa_b, + wd_b +); + +parameter AWIDTH = 14; +parameter DWIDTH = 2; + + input clk_a; + input rce_a; + input [AWIDTH-1:0] ra_a; + output [DWIDTH-1:0] rq_a; + input wce_a; + input [AWIDTH-1:0] wa_a; + input [DWIDTH-1:0] wd_a; + + input clk_b; + input rce_b; + input [AWIDTH-1:0] ra_b; + output [DWIDTH-1:0] rq_b; + input wce_b; + input [AWIDTH-1:0] wa_b; + input [DWIDTH-1:0] wd_b; + +BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_TDP_2x16384 (.clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b)); +endmodule + +module BRAM_TDP_1x32768( + clk_a, + rce_a, + ra_a, + rq_a, + wce_a, + wa_a, + wd_a, + + clk_b, + rce_b, + ra_b, + rq_b, + wce_b, + wa_b, + wd_b +); + +parameter AWIDTH = 15; +parameter DWIDTH = 1; + + input clk_a; + input rce_a; + input [AWIDTH-1:0] ra_a; + output [DWIDTH-1:0] rq_a; + input wce_a; + input [AWIDTH-1:0] wa_a; + input [DWIDTH-1:0] wd_a; + + input clk_b; + input rce_b; + input [AWIDTH-1:0] ra_b; + output [DWIDTH-1:0] rq_b; + input wce_b; + input [AWIDTH-1:0] wa_b; + input [DWIDTH-1:0] wd_b; + +BRAM_TDP #(.AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) + BRAM_TDP_2x32768 (.clk_a(clk_a), .rce_a(rce_a), .ra_a(ra_a), .rq_a(rq_a), diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile index daa832642..034c22667 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile @@ -15,11 +15,10 @@ # SPDX-License-Identifier: Apache-2.0 TESTBENCH = bram_tdp_tb.v -POST_SYNTH = bram_tdp_32x512_post_synth bram_tdp_16x1024_post_synth bram_tdp_8x2048_post_synth bram_tdp_4x4096_post_synth -ADDR_WIDTH = 9 10 11 12 -DATA_WIDTH = 32 16 8 4 -TOP = BRAM_TDP_32x512 BRAM_TDP_16x1024 BRAM_TDP_8x2048 BRAM_TDP_4x4096 -TEST_CASES = $(seq 0 3) +POST_SYNTH = bram_tdp_36x1024_post_synth bram_tdp_32x1024_post_synth bram_tdp_18x2048_post_synth bram_tdp_16x2048_post_synth bram_tdp_9x4096_post_synth bram_tdp_8x4096_post_synth bram_tdp_4x8192_post_synth bram_tdp_2x16384_post_synth bram_tdp_1x32768_post_synth +ADDR_WIDTH = 10 10 11 11 12 12 13 14 15 +DATA_WIDTH = 36 32 18 16 9 8 4 2 1 +TOP = BRAM_TDP_36x1024 BRAM_TDP_32x1024 BRAM_TDP_18x2048 BRAM_TDP_16x2048 BRAM_TDP_9x4096 BRAM_TDP_8x4096 BRAM_TDP_4x8192 BRAM_TDP_2x16384 BRAM_TDP_1x32768 ADDR_DEFINES = $(foreach awidth, $(ADDR_WIDTH),-DADDR_WIDTH="$(awidth)") DATA_DEFINES = $(foreach dwidth, $(DATA_WIDTH),-DDATA_WIDTH="$(dwidth)") TOP_DEFINES = $(foreach top, $(TOP),-DTOP="$(top)") @@ -36,8 +35,13 @@ define clean_post_synth_sim @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log endef +# FIXME: $(call simulate_post_synth,5) sim: $(call simulate_post_synth,1) $(call simulate_post_synth,2) $(call simulate_post_synth,3) $(call simulate_post_synth,4) + $(call simulate_post_synth,6) + $(call simulate_post_synth,7) + $(call simulate_post_synth,8) + $(call simulate_post_synth,9) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v index c7294623f..3495bedfd 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v @@ -159,8 +159,8 @@ module TB; end case (`STRINGIFY(`TOP)) - "BRAM_TDP_32x512": begin - BRAM_TDP_32x512 #() bram ( + "BRAM_TDP_36x1024": begin + BRAM_TDP_36x1024 #() bram ( .clk_a(clk_a), .rce_a(rce_a), .ra_a(ra_a), @@ -177,8 +177,8 @@ module TB; .wd_b(wd_b) ); end - "BRAM_TDP_16x1024": begin - BRAM_TDP_16x1024 #() bram ( + "BRAM_TDP_32x1024": begin + BRAM_TDP_32x1024 #() bram ( .clk_a(clk_a), .rce_a(rce_a), .ra_a(ra_a), @@ -195,8 +195,8 @@ module TB; .wd_b(wd_b) ); end - "BRAM_TDP_8x2048": begin - BRAM_TDP_8x2048 #() bram ( + "BRAM_TDP_18x2048": begin + BRAM_TDP_18x2048 #() bram ( .clk_a(clk_a), .rce_a(rce_a), .ra_a(ra_a), @@ -213,8 +213,98 @@ module TB; .wd_b(wd_b) ); end - "BRAM_TDP_4x4096": begin - BRAM_TDP_4x4096 #() bram ( + "BRAM_TDP_16x2048": begin + BRAM_TDP_16x2048 #() bram ( + .clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b) + ); + end + "BRAM_TDP_9x4096": begin + BRAM_TDP_9x4096 #() bram ( + .clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b) + ); + end + "BRAM_TDP_8x4096": begin + BRAM_TDP_8x4096 #() bram ( + .clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b) + ); + end + "BRAM_TDP_4x8192": begin + BRAM_TDP_4x8192 #() bram ( + .clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b) + ); + end + "BRAM_TDP_2x16384": begin + BRAM_TDP_2x16384 #() bram ( + .clk_a(clk_a), + .rce_a(rce_a), + .ra_a(ra_a), + .rq_a(rq_a), + .wce_a(wce_a), + .wa_a(wa_a), + .wd_a(wd_a), + .clk_b(clk_b), + .rce_b(rce_b), + .ra_b(ra_b), + .rq_b(rq_b), + .wce_b(wce_b), + .wa_b(wa_b), + .wd_b(wd_b) + ); + end + "BRAM_TDP_1x32768": begin + BRAM_TDP_1x32768 #() bram ( .clk_a(clk_a), .rce_a(rce_a), .ra_a(ra_a), From dc78cebc8dfa3c2206613ff4f354ecb6c6475566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 11 May 2022 12:36:21 +0200 Subject: [PATCH 762/845] ql-qlf: qlf_k6n10f: bram: fix 9bit mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/brams_final_map.v | 44 +++++++++++++++---- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 51 +++++++++++++++++----- 2 files changed, 76 insertions(+), 19 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v index ad2255152..3a3bd620e 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v @@ -170,15 +170,41 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign FLUSH1 = 1'b0; assign FLUSH2 = 1'b0; - wire [17:0] PORT_A1_RDATA = {A1_RDATA_CMPL, A1DATA}; - wire [17:0] PORT_B1_RDATA = {C1_RDATA_CMPL, C1DATA}; - wire [17:0] PORT_A2_RDATA = {E1_RDATA_CMPL, E1DATA}; - wire [17:0] PORT_B2_RDATA = {G1_RDATA_CMPL, G1DATA}; - - wire [17:0] PORT_A1_WDATA = {B1_WDATA_CMPL, B1DATA}; - wire [17:0] PORT_B1_WDATA = {D1_WDATA_CMPL, D1DATA}; - wire [17:0] PORT_A2_WDATA = {F1_WDATA_CMPL, F1DATA}; - wire [17:0] PORT_B2_WDATA = {H1_WDATA_CMPL, H1DATA}; + wire [17:0] PORT_A1_RDATA; + wire [17:0] PORT_B1_RDATA; + wire [17:0] PORT_A2_RDATA; + wire [17:0] PORT_B2_RDATA; + + wire [17:0] PORT_A1_WDATA; + wire [17:0] PORT_B1_WDATA; + wire [17:0] PORT_A2_WDATA; + wire [17:0] PORT_B2_WDATA; + + // Assign read/write data - handle special case for 9bit mode + // parity bit for 9bit mode is placed in R/W port on bit #16 + case (CFG_DBITS) + 9: begin + assign A1DATA = {PORT_A1_RDATA[16], PORT_A1_RDATA[7:0]}; + assign C1DATA = {PORT_B1_RDATA[16], PORT_B1_RDATA[7:0]}; + assign E1DATA = {PORT_A2_RDATA[16], PORT_A2_RDATA[7:0]}; + assign G1DATA = {PORT_B2_RDATA[16], PORT_B2_RDATA[7:0]}; + assign PORT_A1_WDATA = {B1_WDATA_CMPL[17], B1DATA[8], B1_WDATA_CMPL[16:9], B1DATA[7:0]}; + assign PORT_B1_WDATA = {D1_WDATA_CMPL[17], D1DATA[8], D1_WDATA_CMPL[16:9], D1DATA[7:0]}; + assign PORT_A2_WDATA = {F1_WDATA_CMPL[17], F1DATA[8], F1_WDATA_CMPL[16:9], F1DATA[7:0]}; + assign PORT_B2_WDATA = {H1_WDATA_CMPL[17], H1DATA[8], H1_WDATA_CMPL[16:9], H1DATA[7:0]}; + end + default: begin + assign A1DATA = PORT_A1_RDATA[CFG_DBITS-1:0]; + assign C1DATA = PORT_B1_RDATA[CFG_DBITS-1:0]; + assign E1DATA = PORT_A2_RDATA[CFG_DBITS-1:0]; + assign G1DATA = PORT_B2_RDATA[CFG_DBITS-1:0]; + assign PORT_A1_WDATA = {B1_WDATA_CMPL, B1DATA}; + assign PORT_B1_WDATA = {D1_WDATA_CMPL, D1DATA}; + assign PORT_A2_WDATA = {F1_WDATA_CMPL, F1DATA}; + assign PORT_B2_WDATA = {H1_WDATA_CMPL, H1DATA}; + + end + endcase wire PORT_A1_CLK = CLK1; wire PORT_A2_CLK = CLK3; diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index 004c72c92..aa067bc5b 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -65,14 +65,35 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 wire [14:0] D1ADDR_TOTAL = {D1ADDR_CMPL, D1ADDR}; wire [35:CFG_DBITS] A1DATA_CMPL; + wire [35:CFG_DBITS] B1DATA_CMPL; wire [35:CFG_DBITS] C1DATA_CMPL; + wire [35:CFG_DBITS] D1DATA_CMPL; - wire [35:0] A1DATA_TOTAL = {A1DATA_CMPL, A1DATA}; - wire [35:0] C1DATA_TOTAL = {C1DATA_CMPL, C1DATA}; + wire [35:0] A1DATA_TOTAL; + wire [35:0] B1DATA_TOTAL; + wire [35:0] C1DATA_TOTAL; + wire [35:0] D1DATA_TOTAL; wire [14:0] PORT_A_ADDR; wire [14:0] PORT_B_ADDR; + // Assign read/write data - handle special case for 9bit mode + // parity bit for 9bit mode is placed in R/W port on bit #16 + case (CFG_DBITS) + 9: begin + assign A1DATA = {A1DATA_TOTAL[16], A1DATA_TOTAL[7:0]}; + assign C1DATA = {C1DATA_TOTAL[16], C1DATA_TOTAL[7:0]}; + assign B1DATA_TOTAL = {B1DATA_CMPL[35:17], B1DATA[8], B1DATA_CMPL[16:9], B1DATA[7:0]}; + assign D1DATA_TOTAL = {D1DATA_CMPL[35:17], D1DATA[8], D1DATA_CMPL[16:9], D1DATA[7:0]}; + end + default: begin + assign A1DATA = A1DATA_TOTAL[CFG_DBITS-1:0]; + assign C1DATA = C1DATA_TOTAL[CFG_DBITS-1:0]; + assign B1DATA_TOTAL = {B1DATA_CMPL, B1DATA}; + assign D1DATA_TOTAL = {D1DATA_CMPL, D1DATA}; + end + endcase + case (CFG_DBITS) 1: begin assign PORT_A_ADDR = A1EN ? A1ADDR_TOTAL : (B1EN ? B1ADDR_TOTAL : 15'd0); @@ -144,8 +165,8 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 TDP36K _TECHMAP_REPLACE_ ( .RESET_ni(1'b1), - .WDATA_A1_i(B1DATA[17:0]), - .WDATA_A2_i(B1DATA[35:18]), + .WDATA_A1_i(B1DATA_TOTAL[17:0]), + .WDATA_A2_i(B1DATA_TOTAL[35:18]), .RDATA_A1_o(A1DATA_TOTAL[17:0]), .RDATA_A2_o(A1DATA_TOTAL[35:18]), .ADDR_A1_i(PORT_A_ADDR), @@ -159,8 +180,8 @@ module \$__QLF_FACTOR_BRAM36_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 .BE_A1_i({B1EN[1],B1EN[0]}), .BE_A2_i({B1EN[3],B1EN[2]}), - .WDATA_B1_i(D1DATA[17:0]), - .WDATA_B2_i(D1DATA[35:18]), + .WDATA_B1_i(D1DATA_TOTAL[17:0]), + .WDATA_B2_i(D1DATA_TOTAL[35:18]), .RDATA_B1_o(C1DATA_TOTAL[17:0]), .RDATA_B2_o(C1DATA_TOTAL[35:18]), .ADDR_B1_i(PORT_B_ADDR), @@ -306,8 +327,18 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA assign A1ADDR_TOTAL = {A1ADDR_CMPL, A1ADDR}; assign B1ADDR_TOTAL = {B1ADDR_CMPL, B1ADDR}; - assign A1DATA_TOTAL = {A1DATA_CMPL, A1DATA}; - assign B1DATA_TOTAL = {B1DATA_CMPL, B1DATA}; + // Assign read/write data - handle special case for 9bit mode + // parity bit for 9bit mode is placed in R/W port on bit #16 + case (CFG_DBITS) + 9: begin + assign A1DATA = {A1DATA_TOTAL[16], A1DATA_TOTAL[7:0]}; + assign B1DATA_TOTAL = {B1DATA_CMPL[35:17], B1DATA[8], B1DATA_CMPL[16:9], B1DATA[7:0]}; + end + default: begin + assign A1DATA = A1DATA_TOTAL[CFG_DBITS-1:0]; + assign B1DATA_TOTAL = {B1DATA_CMPL, B1DATA}; + end + endcase case (CFG_DBITS) 1: begin @@ -392,8 +423,8 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA .BE_A1_i({A1EN, A1EN}), .BE_A2_i({A1EN, A1EN}), - .WDATA_B1_i(B1DATA[17:0]), - .WDATA_B2_i(B1DATA[35:18]), + .WDATA_B1_i(B1DATA_TOTAL[17:0]), + .WDATA_B2_i(B1DATA_TOTAL[35:18]), .RDATA_B1_o(DOBDO[17:0]), .RDATA_B2_o(DOBDO[35:18]), .ADDR_B1_i(B1ADDR_15), From 33f27c912ad37555c1c6f93688539f4944e5d8fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 31 Mar 2022 14:52:30 +0200 Subject: [PATCH 763/845] ql-qlf: qlf_k6n10f: tests: bram: enable 9x12 test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile | 1 + ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile | 1 + ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile | 1 + 3 files changed, 3 insertions(+) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile index f8e89a83f..cb2471b83 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile @@ -41,6 +41,7 @@ sim: $(call simulate_post_synth,2) $(call simulate_post_synth,3) $(call simulate_post_synth,4) + $(call simulate_post_synth,5) $(call simulate_post_synth,6) $(call simulate_post_synth,7) $(call simulate_post_synth,8) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile index 034c22667..f5baa6df3 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile @@ -41,6 +41,7 @@ sim: $(call simulate_post_synth,2) $(call simulate_post_synth,3) $(call simulate_post_synth,4) + $(call simulate_post_synth,5) $(call simulate_post_synth,6) $(call simulate_post_synth,7) $(call simulate_post_synth,8) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile index 120c7c161..a065bb277 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile @@ -31,6 +31,7 @@ endef sim: $(call simulate_post_synth,1) $(call simulate_post_synth,2) + $(call simulate_post_synth,3) $(call simulate_post_synth,4) $(call simulate_post_synth,5) $(call simulate_post_synth,6) From dbd630aed4501d3340c3661b0bc86cb37640a9b5 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Thu, 12 May 2022 10:01:32 +0200 Subject: [PATCH 764/845] Fix logic var ranges access Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index ae9ab9cfa..dc7027981 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3270,7 +3270,12 @@ void UhdmAst::process_logic_var() } delete node; }); - visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + if (auto typespec_h = vpi_handle(vpiTypespec, obj_h)) { + visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + vpi_release_handle(typespec_h); + } else { + visit_one_to_many({vpiRange}, obj_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); + } visit_default_expr(obj_h); add_multirange_wire(current_node, packed_ranges, unpacked_ranges); } From 0308bdb0a18f3cff0ef475f84798e625b86deaf3 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Thu, 12 May 2022 14:20:35 +0200 Subject: [PATCH 765/845] Add a TODO Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index dc7027981..be3d3c08a 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3270,6 +3270,7 @@ void UhdmAst::process_logic_var() } delete node; }); + // TODO: Handling below seems similar to other typespec accesses for range. Candidate for extraction to a function. if (auto typespec_h = vpi_handle(vpiTypespec, obj_h)) { visit_one_to_many({vpiRange}, typespec_h, [&](AST::AstNode *node) { packed_ranges.push_back(node); }); vpi_release_handle(typespec_h); From 1068317c99adbf1d8de27fcf76fa91c52d8c3b2e Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Tue, 17 May 2022 10:26:26 +0200 Subject: [PATCH 766/845] Fix var creation in unnamed scope Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 36 ++++++++++++++++++++++++--------- systemverilog-plugin/UhdmAst.h | 4 ++++ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 978fde50a..556e1f7a2 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -2412,15 +2412,28 @@ void UhdmAst::process_initial() void UhdmAst::process_begin(bool is_named) { current_node = make_ast_node(AST::AST_BLOCK); - // TODO: find out how to set VERILOG_FRONTEND::sv_mode to true - // simplify checks if sv_mode is set to ture when wire is declared inside unnamed block - if (is_named) { - visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { - if (node) { + if (!is_named) { + // for unnamed block, reset block name + current_node->str = ""; + } + AST::AstNode *hierarchy_node = nullptr; + static int unnamed_block_idx = 0; + visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) { + if (node) { + if (!is_named) { + if (!hierarchy_node) { + // Create an implicit hierarchy scope + // simplify checks if sv_mode is set to true when wire is declared inside unnamed block + VERILOG_FRONTEND::sv_mode = true; + hierarchy_node = make_ast_node(AST::AST_BLOCK); + hierarchy_node->str = "$unnamed_block$" + std::to_string(unnamed_block_idx++); + } + hierarchy_node->children.push_back(node); + } else { current_node->children.push_back(node); } - }); - } + } + }); visit_one_to_many({vpiStmt}, obj_h, [&](AST::AstNode *node) { if (node) { if ((node->type == AST::AST_ASSIGN_EQ || node->type == AST::AST_ASSIGN_LE) && node->children.size() == 1) { @@ -2432,10 +2445,15 @@ void UhdmAst::process_begin(bool is_named) wire_node->str = node->children[0]->str; func_node->children.push_back(wire_node); } else { - current_node->children.push_back(node); + if (hierarchy_node) + hierarchy_node->children.push_back(node); + else + current_node->children.push_back(node); } } }); + if (hierarchy_node) + current_node->children.push_back(hierarchy_node); } void UhdmAst::process_operation(const UHDM::BaseClass *object) @@ -3984,8 +4002,6 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) break; case vpiBegin: process_begin(false); - // for unnamed block, reset block name - current_node->str = ""; break; case vpiCondition: case vpiOperation: diff --git a/systemverilog-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h index 0314369e0..cc849794f 100644 --- a/systemverilog-plugin/UhdmAst.h +++ b/systemverilog-plugin/UhdmAst.h @@ -167,6 +167,10 @@ class UhdmAst static const IdString &is_imported(); }; +namespace VERILOG_FRONTEND +{ +extern bool sv_mode; +} YOSYS_NAMESPACE_END #endif From 485bf611a8c8e15182392eb3071a2e07a387fdf2 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 18 May 2022 09:33:16 +0200 Subject: [PATCH 767/845] Add default UHDM install directory Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/systemverilog-plugin/Makefile b/systemverilog-plugin/Makefile index b98420712..9c1e51688 100644 --- a/systemverilog-plugin/Makefile +++ b/systemverilog-plugin/Makefile @@ -21,6 +21,9 @@ SOURCES = UhdmAst.cc \ uhdmsurelogastfrontend.cc \ uhdmastreport.cc +# Directory to search for Surelog and UHDM libraries +UHDM_INSTALL_DIR ?= /usr/local + include ../Makefile_plugin.common CPPFLAGS += -std=c++17 -Wall -W -Wextra -Werror \ From c04c83c91a0da84739698504e43efc5418af2612 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Wed, 18 May 2022 21:06:57 +0200 Subject: [PATCH 768/845] Makefile: fix DESTDIR handling DESTDIR is an *additional* prefix to the installation path, not an *alternative*. --- Makefile_plugin.common | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index eebb126c2..57e83174d 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -53,11 +53,7 @@ LDFLAGS = $(shell $(YOSYS_CONFIG) --ldflags) LDLIBS = $(shell $(YOSYS_CONFIG) --ldlibs) EXTRA_FLAGS ?= -ifdef DESTDIR - DATA_DIR = $(DESTDIR) -else - DATA_DIR = $(shell $(YOSYS_CONFIG) --datdir) -endif +DATA_DIR = $(DESTDIR)$(shell $(YOSYS_CONFIG) --datdir) PLUGINS_DIR = $(DATA_DIR)/plugins OBJS := $(patsubst %.cc,%.o,$(SOURCES)) From fe7835bf7f4ff3054efbd30513ac7fca0a3ea161 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Wed, 18 May 2022 21:23:25 +0200 Subject: [PATCH 769/845] fix(sdc): fix missing include of --- sdc-plugin/sdc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 9560141b9..7c1da470f 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -17,6 +17,7 @@ */ #include #include +#include #include "clocks.h" #include "kernel/log.h" From 49ae2a049cf2f75215aec708b4f820e486c818c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 4 May 2022 15:56:04 +0200 Subject: [PATCH 770/845] ql-qlf: k6n10f: dsp: add QL_DSP2_MULT cell types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 587 +++++++++++++++++++++++++++ 1 file changed, 587 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 917885f02..1001b9c76 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1559,6 +1559,593 @@ module QL_DSP2 ( // TODO: Name subject to change ); endmodule +module QL_DSP2_MULT ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + input wire reset, + + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [2:0] output_select, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .reset(reset), + + .f_mode(f_mode), + + .feedback(3'b0), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .output_select(3'b0), // unregistered output: a * b (0) + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULT_REGIN ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [2:0] output_select, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(3'b0), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b0), // unregistered output: a * b (0) + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULT_REGOUT ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire unsigned_a, + input wire unsigned_b, + input wire f_mode, + input wire [2:0] output_select, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(3'b0), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b100), // registered output: a * b (4) + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULT_REGIN_REGOUT ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire unsigned_a, + input wire unsigned_b, + input wire f_mode, + input wire [2:0] output_select, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(3'b0), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b100), // registered output: a * b (4) + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULTADD ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(output_select), // unregistered output: ACCin (2, 3) + .subtract(subtract), + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULTADD_REGIN ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(output_select), // unregistered output: ACCin (2, 3) + .subtract(subtract), + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULTADD_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(output_select), // registered output: ACCin (6, 7) + .subtract(subtract), + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULTADD_REGIN_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(output_select), // registered output: ACCin (6, 7) + .subtract(subtract), + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULTACC ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(1'b1), // unregistered output: ACCout (1) + .subtract(subtract), + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULTACC_REGIN ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(1'b1), // unregistered output: ACCout (1) + .subtract(subtract), + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULTACC_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b101), // registered output: ACCout (5) + .subtract(subtract), + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULTACC_REGIN_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b101), // registered output: ACCout (5) + .subtract(subtract), + .register_inputs(1'b1) // registered inputs + ); +endmodule + module dsp_t1_sim # ( parameter NBITS_ACC = 64, parameter NBITS_A = 20, From 301e64be2bd44d6e2777dd09e244a82af4932f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 12 May 2022 10:00:25 +0200 Subject: [PATCH 771/845] ql-qlf: k6n10f: dsp: add pass for new cells inference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/Makefile | 3 +- ql-qlf-plugin/ql-dsp-io-regs.cc | 119 ++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/ql-dsp-io-regs.cc diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 5d1d145bc..7deee7097 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -22,7 +22,8 @@ SOURCES = synth_quicklogic.cc \ ql-edif.cc \ ql-dsp-simd.cc \ ql-dsp-macc.cc \ - ql-bram-split.cc + ql-bram-split.cc \ + ql-dsp-io-regs.cc DEPS = pmgen/ql-dsp-pm.h \ pmgen/ql-dsp-macc.h diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc new file mode 100644 index 000000000..d65a06f2e --- /dev/null +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -0,0 +1,119 @@ +#include "kernel/sigtools.h" +#include "kernel/yosys.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +// ============================================================================ + +const std::vector ports2del_mult = {"feedback", "load_acc", "saturate_enable", "shift_right", "round", "subtract", "acc_fir", "dly_b"}; +const std::vector ports2del_mult_add_acc = {"saturate_enable", "shift_right", "round", "acc_fir", "dly_b"}; + +void ql_dsp_io_regs_pass(RTLIL::Module *module) +{ + + for (auto cell : module->cells_) { + std::string cell_type = cell.second->type.str(); + if (cell_type == RTLIL::escape_id("QL_DSP2")) { + auto dsp = cell.second; + bool del_clk = false; + + // Get DSP configuration + const RTLIL::SigSpec *register_inputs; + register_inputs = &dsp->getPort(RTLIL::escape_id("register_inputs")); + if (!register_inputs) + log_error("register_inputs port not found!"); + auto reg_in_c = register_inputs->as_const(); + int reg_in_i = reg_in_c.as_int(); + + const RTLIL::SigSpec *output_select; + output_select = &dsp->getPort(RTLIL::escape_id("output_select")); + if (!output_select) + log_error("output_select port not found!"); + auto out_sel_c = output_select->as_const(); + int out_sel_i = out_sel_c.as_int(); + + // Build new type name + std::string new_type = cell_type; + new_type += "_MULT"; + + switch (out_sel_i) { + case 1: + new_type += "ACC"; + break; + case 2: + case 3: + new_type += "ADD"; + break; + case 5: + new_type += "ACC"; + break; + case 6: + case 7: + new_type += "ADD"; + break; + default: + break; + } + + if (reg_in_i) + new_type += "_REGIN"; + + if (out_sel_i > 3) + new_type += "_REGOUT"; + + // Set new type name + dsp->type = RTLIL::IdString(new_type); + + // Delete ports unused in given type of DSP cell + del_clk = (!reg_in_i && out_sel_i <= 3); + + std::vector ports2del; + + if (del_clk) + ports2del.push_back("clk"); + + if (out_sel_i == 0 || out_sel_i == 4) { + ports2del.insert(ports2del.end(), ports2del_mult.begin(), ports2del_mult.end()); + } else { + ports2del.insert(ports2del.end(), ports2del_mult_add_acc.begin(), ports2del_mult_add_acc.end()); + } + + for (auto portname : ports2del) { + const RTLIL::SigSpec *port = &dsp->getPort(RTLIL::escape_id(portname)); + if (!port) + log_error("%s port not found!", portname); + dsp->connections_.erase(RTLIL::escape_id(portname)); + } + } + } +} + +struct QlDspIORegs : public Pass { + + QlDspIORegs() : Pass("ql_dsp_io_regs", "Does something") {} + + void help() override + { + log("\n"); + log(" ql_dsp_io_regs [options] [selection]\n"); + log("\n"); + } + + void execute(std::vector a_Args, RTLIL::Design *a_Design) override + { + log_header(a_Design, "Executing QL_DSP_IO_REGS pass.\n"); + + size_t argidx; + for (argidx = 1; argidx < a_Args.size(); argidx++) { + break; + } + extra_args(a_Args, argidx, a_Design); + + for (auto module : a_Design->selected_modules()) { + ql_dsp_io_regs_pass(module); + } + } +} QlDspIORegs; + +PRIVATE_NAMESPACE_END From 65c546de74c0c5f4124070df184b8f02c64c0fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 16 May 2022 12:44:45 +0200 Subject: [PATCH 772/845] ql-qlf: k6n10f: dsp: fix ql-dsp-macc pass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/ql-dsp-macc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index 5275024bd..473863467 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -56,7 +56,7 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) } // Accept only posedge clocked FFs - if (st.ff->getParam(ID(CLK_POLARITY)) != RTLIL::S1) { + if (st.ff->getParam(ID(CLK_POLARITY)).as_int() != 1) { return; } @@ -151,7 +151,7 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) RTLIL::SigSpec ena; if (st.ff->hasPort(ID(ARST))) { - if (st.ff->getParam(ID(ARST_POLARITY)) != RTLIL::S1) { + if (st.ff->getParam(ID(ARST_POLARITY)).as_int() != 1) { rst = pm.module->Not(NEW_ID, st.ff->getPort(ID(ARST))); } else { rst = st.ff->getPort(ID(ARST)); @@ -161,7 +161,7 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) } if (st.ff->hasPort(ID(EN))) { - if (st.ff->getParam(ID(EN_POLARITY)) != RTLIL::S1) { + if (st.ff->getParam(ID(EN_POLARITY)).as_int() != 1) { ena = pm.module->Not(NEW_ID, st.ff->getPort(ID(EN))); } else { ena = st.ff->getPort(ID(EN)); From 0bccb701467c55e99378db30acdf412ef8b39f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Thu, 12 May 2022 10:02:48 +0200 Subject: [PATCH 773/845] ql-qlf: k6n10f: dsp: enable new pass in synthesis script and fixup tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/synth_quicklogic.cc | 2 + .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 45 +++++++++---------- .../tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl | 10 ++--- .../tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl | 9 ++-- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 3f72fd3a2..90afb5515 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -275,6 +275,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("techmap -map +/quicklogic/" + family + "/dsp_map.v", "(for qlf_k6n10f if not -no_dsp)"); run("ql_dsp_simd ", "(for qlf_k6n10f if not -no_dsp)"); run("techmap -map +/quicklogic/" + family + "/dsp_final_map.v", "(for qlf_k6n10f if not -no_dsp)"); + run("ql_dsp_io_regs"); } else if (!nodsp) { run("wreduce t:$mul"); @@ -291,6 +292,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("techmap -map +/quicklogic/" + family + "/dsp_map.v"); run("ql_dsp_simd"); run("techmap -map +/quicklogic/" + family + "/dsp_final_map.v"); + run("ql_dsp_io_regs"); } } diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl index 9e477290d..19026400e 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -37,7 +37,7 @@ hierarchy -top $TOP check_equiv $TOP design -load postopt yosys cd $TOP -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULTACC select -assert-count 1 t:* set TOP "macc_simple_clr" @@ -46,7 +46,7 @@ hierarchy -top $TOP check_equiv $TOP design -load postopt yosys cd $TOP -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULTACC select -assert-count 1 t:* set TOP "macc_simple_arst" @@ -55,29 +55,26 @@ hierarchy -top $TOP check_equiv $TOP design -load postopt yosys cd $TOP -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULTACC select -assert-count 1 t:* -#FIXME: DSP not inferred (got $mux instead of $dffe) -#set TOP "macc_simple_ena" -#design -load read -#hierarchy -top $TOP -#check_equiv $TOP -#design -load postopt -#yosys cd $TOP -#select -assert-count 1 t:QL_DSP2 -#select -assert-count 1 t:* +set TOP "macc_simple_ena" +design -load read +hierarchy -top $TOP +check_equiv $TOP +design -load postopt +yosys cd $TOP +select -assert-count 1 t:QL_DSP2_MULTACC +select -assert-count 1 t:* -#FIXME: DSP not inferred (got $mux instead of $dffe) -#set TOP "macc_simple_arst_clr_ena" -#design -load read -#hierarchy -top $TOP -#check_equiv $TOP -#design -load postopt -#yosys cd $TOP -#select -assert-count 1 t:QL_DSP2 -#select -assert-count 1 t:\$lut -#select -assert-count 2 t:* +set TOP "macc_simple_arst_clr_ena" +design -load read +hierarchy -top $TOP +check_equiv $TOP +design -load postopt +yosys cd $TOP +select -assert-count 1 t:QL_DSP2_MULTACC +select -assert-count 1 t:* set TOP "macc_simple_preacc" design -load read @@ -85,7 +82,7 @@ hierarchy -top $TOP check_equiv $TOP design -load postopt yosys cd $TOP -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULTADD select -assert-count 1 t:* set TOP "macc_simple_preacc_clr" @@ -94,6 +91,6 @@ hierarchy -top $TOP check_equiv $TOP design -load postopt yosys cd $TOP -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULTADD select -assert-count 1 t:* diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl index cd8ec40ca..a0cd6a711 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl @@ -36,33 +36,33 @@ design -load read check_equiv ${TOP} design -load postopt yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULT set TOP "mult_20x18" design -load read check_equiv ${TOP} design -load postopt yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULT set TOP "mult_8x8" design -load read check_equiv ${TOP} design -load postopt yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULT set TOP "mult_10x9" design -load read check_equiv ${TOP} design -load postopt yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULT set TOP "mult_8x8_s" design -load read check_equiv ${TOP} design -load postopt yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULT diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl index 0599d9598..2a90c795e 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl @@ -38,7 +38,7 @@ check_equiv ${TOP} design -load postopt select -assert-count 0 t:dsp_t1_20x18x64 select -assert-count 0 t:dsp_t1_10x9x32 -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULT_REGIN set TOP "simd_mult_inferred" design -load read @@ -48,7 +48,7 @@ design -load postopt yosys cd $TOP select -assert-count 0 t:dsp_t1_20x18x64 select -assert-count 0 t:dsp_t1_10x9x32 -select -assert-count 1 t:QL_DSP2 +select -assert-count 1 t:QL_DSP2_MULT set TOP "simd_mult_odd" design -load read @@ -58,7 +58,8 @@ design -load postopt yosys cd $TOP select -assert-count 0 t:dsp_t1_20x18x64 select -assert-count 0 t:dsp_t1_10x9x32 -select -assert-count 2 t:QL_DSP2 +select -assert-count 0 t:QL_DSP2 +select -assert-count 2 t:QL_DSP2_MULT_REGIN set TOP "simd_mult_conflict" design -load read @@ -68,5 +69,5 @@ design -load postopt yosys cd $TOP select -assert-count 0 t:dsp_t1_20x18x64 select -assert-count 0 t:dsp_t1_10x9x32 -select -assert-count 2 t:QL_DSP2 +select -assert-count 2 t:QL_DSP2_MULT_REGIN From d74e0dff1d2a47fa6d9a0e5d5b956999d0d35afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 16 May 2022 14:19:13 +0200 Subject: [PATCH 774/845] ql-qlf: k6n10f: dsp: mark ports not available in architecture file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 1001b9c76..30f14d112 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1564,6 +1564,7 @@ module QL_DSP2_MULT ( // TODO: Name subject to change input wire [17:0] b, output wire [37:0] z, + // Port not available in architecture file input wire reset, input wire unsigned_a, @@ -1609,6 +1610,7 @@ module QL_DSP2_MULT_REGIN ( // TODO: Name subject to change (* clkbuf_sink *) input wire clk, + // Port not available in architecture file input wire reset, input wire unsigned_a, @@ -1655,6 +1657,7 @@ module QL_DSP2_MULT_REGOUT ( // TODO: Name subject to change (* clkbuf_sink *) input wire clk, + // Port not available in architecture file input wire reset, input wire unsigned_a, @@ -1700,6 +1703,7 @@ module QL_DSP2_MULT_REGIN_REGOUT ( // TODO: Name subject to change (* clkbuf_sink *) input wire clk, + // Port not available in architecture file input wire reset, input wire unsigned_a, @@ -1743,12 +1747,14 @@ module QL_DSP2_MULTADD ( input wire [17:0] b, output wire [37:0] z, + // begin: Ports not available in architecture file (* clkbuf_sink *) input wire clk, input wire reset, input wire [ 2:0] feedback, input wire load_acc, + // end: Ports not available in architecture file input wire unsigned_a, input wire unsigned_b, @@ -1796,6 +1802,7 @@ module QL_DSP2_MULTADD_REGIN ( (* clkbuf_sink *) input wire clk, + // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -1847,6 +1854,7 @@ module QL_DSP2_MULTADD_REGOUT ( (* clkbuf_sink *) input wire clk, + // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -1898,6 +1906,7 @@ module QL_DSP2_MULTADD_REGIN_REGOUT ( (* clkbuf_sink *) input wire clk, + // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -1949,10 +1958,12 @@ module QL_DSP2_MULTACC ( (* clkbuf_sink *) input wire clk, + // begin: Ports not available in architecture file input wire reset, - input wire [ 2:0] feedback, input wire load_acc, + // end: Ports not available in architecture file + input wire [ 2:0] feedback, input wire unsigned_a, input wire unsigned_b, @@ -2000,6 +2011,7 @@ module QL_DSP2_MULTACC_REGIN ( (* clkbuf_sink *) input wire clk, + // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -2051,6 +2063,7 @@ module QL_DSP2_MULTACC_REGOUT ( (* clkbuf_sink *) input wire clk, + // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -2102,6 +2115,7 @@ module QL_DSP2_MULTACC_REGIN_REGOUT ( (* clkbuf_sink *) input wire clk, + // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, From f578ad5b1613f5d3be5b934350029e9befb4f126 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Fri, 22 Jan 2021 21:03:19 +0100 Subject: [PATCH 775/845] Makefile: prepend to build flags to avoid ignoring environment --- Makefile_plugin.common | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index 57e83174d..b26a7e037 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -48,9 +48,9 @@ ifeq (,$(wildcard $(YOSYS_CONFIG))) endif CXX ?= $(shell $(YOSYS_CONFIG) --cxx) -CXXFLAGS = $(shell $(YOSYS_CONFIG) --cxxflags) #-DSDC_DEBUG -LDFLAGS = $(shell $(YOSYS_CONFIG) --ldflags) -LDLIBS = $(shell $(YOSYS_CONFIG) --ldlibs) +CXXFLAGS := $(shell $(YOSYS_CONFIG) --cxxflags) $(CXXFLAGS) #-DSDC_DEBUG +LDFLAGS := $(shell $(YOSYS_CONFIG) --ldflags) $(LDFLAGS) +LDLIBS := $(shell $(YOSYS_CONFIG) --ldlibs) $(LDLIBS) EXTRA_FLAGS ?= DATA_DIR = $(DESTDIR)$(shell $(YOSYS_CONFIG) --datdir) From 57a8ccd9969c0eba159f0cdc7f126126e249179e Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 20 May 2022 12:47:54 -0700 Subject: [PATCH 776/845] Add a simple smoke test for the systemverilog plugin. Verify that read_systemverilog can generate internal UHDM and processed by Yosys. Signed-off-by: Henner Zeller --- systemverilog-plugin/tests/Makefile | 5 +++ .../tests/counter/counter.tcl | 12 +++++++ systemverilog-plugin/tests/counter/counter.v | 33 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 systemverilog-plugin/tests/counter/counter.tcl create mode 100644 systemverilog-plugin/tests/counter/counter.v diff --git a/systemverilog-plugin/tests/Makefile b/systemverilog-plugin/tests/Makefile index 1c6f1d813..14a19159f 100644 --- a/systemverilog-plugin/tests/Makefile +++ b/systemverilog-plugin/tests/Makefile @@ -14,4 +14,9 @@ # # SPDX-License-Identifier: Apache-2.0 +TESTS = counter + include $(shell pwd)/../../Makefile_test.common + +counter_verify = true + diff --git a/systemverilog-plugin/tests/counter/counter.tcl b/systemverilog-plugin/tests/counter/counter.tcl new file mode 100644 index 000000000..56c9c03e3 --- /dev/null +++ b/systemverilog-plugin/tests/counter/counter.tcl @@ -0,0 +1,12 @@ +yosys -import +if { [info procs read_uhdm] == {} } { plugin -i systemverilog } +yosys -import ;# ingest plugin commands + +set TMP_DIR /tmp +if { [info exists ::env(TMPDIR) ] } { + set TMP_DIR $::env(TMPDIR) +} + +# Testing simple round-trip +read_systemverilog -o $TMP_DIR/counter-test $::env(DESIGN_TOP).v +write_verilog diff --git a/systemverilog-plugin/tests/counter/counter.v b/systemverilog-plugin/tests/counter/counter.v new file mode 100644 index 000000000..3dabd7e7f --- /dev/null +++ b/systemverilog-plugin/tests/counter/counter.v @@ -0,0 +1,33 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 +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 From f5565a632938e6e9fb77304c0e239ef56e8ac8b9 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 20 May 2022 15:55:32 -0700 Subject: [PATCH 777/845] IWYU - the sdc plugin was only including a fraction of the headers it needs. This is mostly in the context of #326. The PR #324 was fixing the immediate issue but was leaving out other missing headers. Signed-off-by: Henner Zeller --- sdc-plugin/sdc.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sdc-plugin/sdc.cc b/sdc-plugin/sdc.cc index 7c1da470f..fd153c67b 100644 --- a/sdc-plugin/sdc.cc +++ b/sdc-plugin/sdc.cc @@ -17,7 +17,14 @@ */ #include #include +#include #include +#include +#include +#include +#include +#include +#include #include "clocks.h" #include "kernel/log.h" From b606e56fe0985b5b2c89b10f400bfcc543752bb3 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 20 May 2022 16:22:49 -0700 Subject: [PATCH 778/845] Disable benign warnings. In clang++ and g++-12, some warnings are triggered that are benign, but would stop compilation as we compile with -Werror. (TODO: mayabe we only enable -Werror in the CI, but are more lenient otherwise to not have users 'discover' such things). Signed-off-by: Henner Zeller --- systemverilog-plugin/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/systemverilog-plugin/Makefile b/systemverilog-plugin/Makefile index 9c1e51688..3f10f5dd9 100644 --- a/systemverilog-plugin/Makefile +++ b/systemverilog-plugin/Makefile @@ -27,6 +27,8 @@ UHDM_INSTALL_DIR ?= /usr/local include ../Makefile_plugin.common CPPFLAGS += -std=c++17 -Wall -W -Wextra -Werror \ + -Wno-deprecated-declarations \ + -Wno-unused-parameter \ -I${UHDM_INSTALL_DIR}/include \ -I${UHDM_INSTALL_DIR}/include/Surelog From ccda2ee6406367b94a53fc83cd7ca9be0ba3c9d1 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Wed, 18 May 2022 21:23:39 +0200 Subject: [PATCH 779/845] fix(systemverilog): disable -Werror The build system has no direct control over the downstream compiler, so it cannot ensure that no stray warnings are produced downstream even if the upstream compilation is warning-free. Setting -Werror means that these harmless warnings turn into compilation errors instead, breaking downstream builds. --- systemverilog-plugin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemverilog-plugin/Makefile b/systemverilog-plugin/Makefile index 3f10f5dd9..1b162be0b 100644 --- a/systemverilog-plugin/Makefile +++ b/systemverilog-plugin/Makefile @@ -26,7 +26,7 @@ UHDM_INSTALL_DIR ?= /usr/local include ../Makefile_plugin.common -CPPFLAGS += -std=c++17 -Wall -W -Wextra -Werror \ +CPPFLAGS += -std=c++17 -Wall -W -Wextra \ -Wno-deprecated-declarations \ -Wno-unused-parameter \ -I${UHDM_INSTALL_DIR}/include \ From 79df98240d6666ed25463836a73237e0f7d41073 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Mon, 23 May 2022 13:17:49 +0200 Subject: [PATCH 780/845] Handle shortint in parameters Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 556e1f7a2..a112da14d 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3732,6 +3732,11 @@ void UhdmAst::process_parameter() shared.report.mark_handled(typespec_h); break; } + case vpiShortIntTypespec: { + packed_ranges.push_back(make_range(15, 0)); + shared.report.mark_handled(typespec_h); + break; + } case vpiStructTypespec: { visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { if (node && !node->str.empty()) { From 42881a4cfdeffcd4a053a4e11d62cdaa58d7ae33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 25 May 2022 15:38:32 +0200 Subject: [PATCH 781/845] ql-qlf: k6n10f: add support for SDP split BRAM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/ql-bram-split.cc | 168 +++++++++------- ql-qlf-plugin/qlf_k6n10f/brams.txt | 37 ++++ ql-qlf-plugin/qlf_k6n10f/brams_final_map.v | 216 ++++++++++++++++++++ ql-qlf-plugin/qlf_k6n10f/brams_map.v | 40 ++++ ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 223 +++++++++++++++++++++ 5 files changed, 606 insertions(+), 78 deletions(-) diff --git a/ql-qlf-plugin/ql-bram-split.cc b/ql-qlf-plugin/ql-bram-split.cc index 02355fcdd..2dfdc2b3e 100644 --- a/ql-qlf-plugin/ql-bram-split.cc +++ b/ql-qlf-plugin/ql-bram-split.cc @@ -56,31 +56,79 @@ struct QlBramSplitPass : public Pass { // BRAM control and config ports to consider and how to map them to ports // of the target BRAM cell const std::vector> m_BramSharedPorts = {}; + // BRAM parameters + const std::vector m_BramParams = {"CFG_ABITS", "CFG_DBITS"}; - // BRAM data ports for subcell #1 and how to map them to ports of the target BRAM cell - const std::vector> m_BramDataPorts_0 = { + // TDP BRAM 1x18 data ports for subcell #1 and how to map them to ports of the target TDP BRAM 2x18 cell + const std::vector> m_BramTDPDataPorts_0 = { std::make_pair("A1ADDR", "A1ADDR"), std::make_pair("A1DATA", "A1DATA"), std::make_pair("A1EN", "A1EN"), std::make_pair("B1ADDR", "B1ADDR"), std::make_pair("B1DATA", "B1DATA"), std::make_pair("B1EN", "B1EN"), std::make_pair("C1ADDR", "C1ADDR"), std::make_pair("C1DATA", "C1DATA"), std::make_pair("C1EN", "C1EN"), std::make_pair("CLK1", "CLK1"), std::make_pair("CLK2", "CLK2"), std::make_pair("D1ADDR", "D1ADDR"), std::make_pair("D1DATA", "D1DATA"), std::make_pair("D1EN", "D1EN")}; - // BRAM data ports for subcell #2 and how to map them to ports of the target BRAM cell - const std::vector> m_BramDataPorts_1 = { + // TDP BRAM 1x18 data ports for subcell #2 and how to map them to ports of the target TDP BRAM 2x18 cell + const std::vector> m_BramTDPDataPorts_1 = { std::make_pair("A1ADDR", "E1ADDR"), std::make_pair("A1DATA", "E1DATA"), std::make_pair("A1EN", "E1EN"), std::make_pair("B1ADDR", "F1ADDR"), std::make_pair("B1DATA", "F1DATA"), std::make_pair("B1EN", "F1EN"), std::make_pair("C1ADDR", "G1ADDR"), std::make_pair("C1DATA", "G1DATA"), std::make_pair("C1EN", "G1EN"), std::make_pair("CLK1", "CLK3"), std::make_pair("CLK2", "CLK4"), std::make_pair("D1ADDR", "H1ADDR"), std::make_pair("D1DATA", "H1DATA"), std::make_pair("D1EN", "H1EN")}; - // BRAM parameters - const std::vector m_BramParams = {"CFG_ABITS", "CFG_DBITS"}; - // Source BRAM cell type (1x18K) - const std::string m_Bram1x18Type = "$__QLF_FACTOR_BRAM18_TDP"; - // Target BRAM cell type for the split mode - const std::string m_Bram2x18Type = "BRAM2x18_TDP"; + // Source BRAM TDP cell type (1x18K) + const std::string m_Bram1x18TDPType = "$__QLF_FACTOR_BRAM18_TDP"; + // Target BRAM TDP cell type for the split mode + const std::string m_Bram2x18TDPType = "BRAM2x18_TDP"; + + // SDP BRAM 1x18 data ports for subcell #1 and how to map them to ports of the target SDP BRAM 2x18 cell + const std::vector> m_BramSDPDataPorts_0 = { + std::make_pair("A1ADDR", "A1ADDR"), std::make_pair("A1DATA", "A1DATA"), std::make_pair("A1EN", "A1EN"), std::make_pair("B1ADDR", "B1ADDR"), + std::make_pair("B1DATA", "B1DATA"), std::make_pair("B1EN", "B1EN"), std::make_pair("CLK1", "CLK1")}; + // SDP BRAM 1x18 data ports for subcell #2 and how to map them to ports of the target SDP BRAM 2x18 cell + const std::vector> m_BramSDPDataPorts_1 = { + std::make_pair("A1ADDR", "C1ADDR"), std::make_pair("A1DATA", "C1DATA"), std::make_pair("A1EN", "C1EN"), std::make_pair("B1ADDR", "D1ADDR"), + std::make_pair("B1DATA", "D1DATA"), std::make_pair("B1EN", "D1EN"), std::make_pair("CLK1", "CLK2")}; + // Source BRAM SDP cell type (1x18K) + const std::string m_Bram1x18SDPType = "$__QLF_FACTOR_BRAM18_SDP"; + // Target BRAM SDP cell type for the split mode + const std::string m_Bram2x18SDPType = "BRAM2x18_SDP"; /// Temporary SigBit to SigBit helper map. SigMap m_SigMap; // .......................................... + void map_ports(const std::vector> mapping, const RTLIL::Cell *bram_1x18, RTLIL::Cell *bram_2x18) + { + for (const auto &it : mapping) { + auto src = RTLIL::escape_id(it.first); + auto dst = RTLIL::escape_id(it.second); + + size_t width; + bool isOutput; + + std::tie(width, isOutput) = getPortInfo(bram_2x18, dst); + + auto getConnection = [&](const RTLIL::Cell *cell) { + RTLIL::SigSpec sigspec; + if (cell->hasPort(src)) { + const auto &sig = cell->getPort(src); + sigspec.append(sig); + } + if (sigspec.bits().size() < width / 2) { + if (isOutput) { + for (size_t i = 0; i < width / 2 - sigspec.bits().size(); ++i) { + sigspec.append(RTLIL::SigSpec()); + } + } else { + sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2 - sigspec.bits().size())); + } + } + return sigspec; + }; + + RTLIL::SigSpec sigspec; + sigspec.append(getConnection(bram_1x18)); + bram_2x18->setPort(dst, sigspec); + } + } + void execute(std::vector a_Args, RTLIL::Design *a_Design) override { log_header(a_Design, "Executing QL_BRAM_Split pass.\n"); @@ -100,7 +148,7 @@ struct QlBramSplitPass : public Pass { for (auto cell : module->selected_cells()) { // Check if this is a BRAM cell - if (cell->type != RTLIL::escape_id(m_Bram1x18Type)) { + if (cell->type != RTLIL::escape_id(m_Bram1x18TDPType) && cell->type != RTLIL::escape_id(m_Bram1x18SDPType)) { continue; } @@ -136,6 +184,26 @@ struct QlBramSplitPass : public Pass { const RTLIL::Cell *bram_0 = group[i]; const RTLIL::Cell *bram_1 = group[i + 1]; + if (bram_0->type != bram_1->type) + log_error("Unsupported BRAM configuration: one half of TDP36K is TDP, second SDP"); + + std::vector> m_BramDataPorts_0; + std::vector> m_BramDataPorts_1; + std::string m_Bram1x18Type; + std::string m_Bram2x18Type; + // Distinguish between TDP and SDP + if (bram_0->type == RTLIL::escape_id(m_Bram1x18TDPType)) { + m_BramDataPorts_0 = m_BramTDPDataPorts_0; + m_BramDataPorts_1 = m_BramTDPDataPorts_1; + m_Bram1x18Type = m_Bram1x18TDPType; + m_Bram2x18Type = m_Bram2x18TDPType; + } else { + m_BramDataPorts_0 = m_BramSDPDataPorts_0; + m_BramDataPorts_1 = m_BramSDPDataPorts_1; + m_Bram1x18Type = m_Bram1x18SDPType; + m_Bram2x18Type = m_Bram2x18SDPType; + } + std::string name = stringf("bram_%s_%s", RTLIL::unescape_id(bram_0->name).c_str(), RTLIL::unescape_id(bram_1->name).c_str()); log(" BRAM: %s (%s) + %s (%s) => %s (%s)\n", RTLIL::unescape_id(bram_0->name).c_str(), RTLIL::unescape_id(bram_0->type).c_str(), @@ -161,70 +229,9 @@ struct QlBramSplitPass : public Pass { // Connect data ports // Connect first bram - for (const auto &it : m_BramDataPorts_0) { - auto src = RTLIL::escape_id(it.first); - auto dst = RTLIL::escape_id(it.second); - - size_t width; - bool isOutput; - - std::tie(width, isOutput) = getPortInfo(bram_2x18, dst); - - auto getConnection = [&](const RTLIL::Cell *cell) { - RTLIL::SigSpec sigspec; - if (cell->hasPort(src)) { - const auto &sig = cell->getPort(src); - sigspec.append(sig); - } - if (sigspec.bits().size() < width / 2) { - if (isOutput) { - for (size_t i = 0; i < width / 2 - sigspec.bits().size(); ++i) { - sigspec.append(RTLIL::SigSpec()); - } - } else { - sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2 - sigspec.bits().size())); - } - } - return sigspec; - }; - - RTLIL::SigSpec sigspec; - sigspec.append(getConnection(bram_0)); - bram_2x18->setPort(dst, sigspec); - } - + map_ports(m_BramDataPorts_0, bram_0, bram_2x18); // Connect second bram - for (const auto &it : m_BramDataPorts_1) { - auto src = RTLIL::escape_id(it.first); - auto dst = RTLIL::escape_id(it.second); - - size_t width; - bool isOutput; - - std::tie(width, isOutput) = getPortInfo(bram_2x18, dst); - - auto getConnection = [&](const RTLIL::Cell *cell) { - RTLIL::SigSpec sigspec; - if (cell->hasPort(src)) { - const auto &sig = cell->getPort(src); - sigspec.append(sig); - } - if (sigspec.bits().size() < width / 2) { - if (isOutput) { - for (size_t i = 0; i < width / 2 - sigspec.bits().size(); ++i) { - sigspec.append(RTLIL::SigSpec()); - } - } else { - sigspec.append(RTLIL::SigSpec(RTLIL::Sx, width / 2 - sigspec.bits().size())); - } - } - return sigspec; - }; - - RTLIL::SigSpec sigspec; - sigspec.append(getConnection(bram_1)); - bram_2x18->setPort(dst, sigspec); - } + map_ports(m_BramDataPorts_1, bram_1, bram_2x18); // Set bram parameters for (const auto &it : m_BramParams) { @@ -233,10 +240,15 @@ struct QlBramSplitPass : public Pass { } // Setting manual parameters - bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_B"), bram_0->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); - bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_F"), bram_1->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); - bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_D"), bram_0->getParam(RTLIL::escape_id("CFG_ENABLE_D"))); - bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_H"), bram_1->getParam(RTLIL::escape_id("CFG_ENABLE_D"))); + if (bram_0->type == RTLIL::escape_id(m_Bram1x18TDPType)) { + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_B"), bram_0->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_D"), bram_0->getParam(RTLIL::escape_id("CFG_ENABLE_D"))); + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_F"), bram_1->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_H"), bram_1->getParam(RTLIL::escape_id("CFG_ENABLE_D"))); + } else { + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_B"), bram_0->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); + bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_D"), bram_1->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); + } bram_2x18->setParam(RTLIL::escape_id("INIT0"), bram_0->getParam(RTLIL::escape_id("INIT"))); bram_2x18->setParam(RTLIL::escape_id("INIT1"), bram_1->getParam(RTLIL::escape_id("INIT"))); diff --git a/ql-qlf-plugin/qlf_k6n10f/brams.txt b/ql-qlf-plugin/qlf_k6n10f/brams.txt index 73afc5090..3b6eb07a2 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams.txt +++ b/ql-qlf-plugin/qlf_k6n10f/brams.txt @@ -86,6 +86,32 @@ bram $__QLF_FACTOR_BRAM18_TDP clkpol 1 1 2 2 endbram +bram $__QLF_FACTOR_BRAM18_SDP + init 1 + abits 10 @a10d18 + dbits 18 @a10d18 + abits 10 @a10d16 + dbits 16 @a10d16 + abits 11 @a11d9 + dbits 9 @a11d9 + abits 11 @a11d8 + dbits 8 @a11d8 + abits 12 @a12d4 + dbits 4 @a12d4 + abits 13 @a13d2 + dbits 2 @a13d2 + abits 14 @a14d1 + dbits 1 @a14d1 + groups 2 + ports 1 1 + wrmode 0 1 + enable 1 2 @a10d18 @a10d16 + enable 1 1 @a11d9 @a11d8 @a12d4 @a13d2 @a14d1 + transp 0 0 + clocks 1 1 + clkpol 1 1 +endbram + match $__QLF_FACTOR_BRAM36_TDP min bits 18433 min wports 1 @@ -118,4 +144,15 @@ match $__QLF_FACTOR_BRAM18_TDP min efficiency 1 shuffle_enable B make_transp + or_next_if_better +endmatch + +match $__QLF_FACTOR_BRAM18_SDP + min bits 128 + max bits 18432 + max wports 1 + max rports 1 + min efficiency 1 + shuffle_enable B + make_transp endmatch diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v index 3a3bd620e..aa4bb5d86 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v @@ -264,3 +264,219 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, .FLUSH2_i(FLUSH2) ); endmodule + +module BRAM2x18_SDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, C1EN, CLK1, CLK2, D1ADDR, D1DATA, D1EN); + parameter CFG_ABITS = 11; + parameter CFG_DBITS = 18; + parameter CFG_ENABLE_B = 4; + parameter CFG_ENABLE_D = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [18431:0] INIT0 = 18432'bx; + parameter [18431:0] INIT1 = 18432'bx; + + input CLK1; + input CLK2; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + input [CFG_ABITS-1:0] C1ADDR; + output [CFG_DBITS-1:0] C1DATA; + input C1EN; + + input [CFG_ABITS-1:0] D1ADDR; + input [CFG_DBITS-1:0] D1DATA; + input [CFG_ENABLE_D-1:0] D1EN; + + wire FLUSH1; + wire FLUSH2; + + wire [13:CFG_ABITS] A1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] B1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] C1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] D1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + + wire [13:0] A1ADDR_TOTAL = {A1ADDR_CMPL, A1ADDR}; + wire [13:0] B1ADDR_TOTAL = {B1ADDR_CMPL, B1ADDR}; + wire [13:0] C1ADDR_TOTAL = {C1ADDR_CMPL, C1ADDR}; + wire [13:0] D1ADDR_TOTAL = {D1ADDR_CMPL, D1ADDR}; + + wire [17:CFG_DBITS] A1_RDATA_CMPL; + wire [17:CFG_DBITS] C1_RDATA_CMPL; + + wire [17:CFG_DBITS] B1_WDATA_CMPL; + wire [17:CFG_DBITS] D1_WDATA_CMPL; + + wire [13:0] PORT_A1_ADDR; + wire [13:0] PORT_A2_ADDR; + wire [13:0] PORT_B1_ADDR; + wire [13:0] PORT_B2_ADDR; + + case (CFG_DBITS) + 1: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL; + assign PORT_B1_ADDR = B1ADDR_TOTAL; + assign PORT_A2_ADDR = C1ADDR_TOTAL; + assign PORT_B2_ADDR = D1ADDR_TOTAL; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0 + }; + end + + 2: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 1; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 1; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 1; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 1; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0 + }; + end + + 4: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 2; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 2; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 2; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 2; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0 + }; + end + + 8, 9: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 3; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 3; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 3; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 3; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0 + }; + end + + 16, 18: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 4; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 4; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 4; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 4; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0 + }; + end + + default: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL; + assign PORT_B1_ADDR = B1ADDR_TOTAL; + assign PORT_A2_ADDR = D1ADDR_TOTAL; + assign PORT_B2_ADDR = C1ADDR_TOTAL; + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0 + }; + end + endcase + + assign FLUSH1 = 1'b0; + assign FLUSH2 = 1'b0; + + wire [17:0] PORT_A1_RDATA; + wire [17:0] PORT_B1_RDATA; + wire [17:0] PORT_A2_RDATA; + wire [17:0] PORT_B2_RDATA; + + wire [17:0] PORT_A1_WDATA; + wire [17:0] PORT_B1_WDATA; + wire [17:0] PORT_A2_WDATA; + wire [17:0] PORT_B2_WDATA; + + // Assign read/write data - handle special case for 9bit mode + // parity bit for 9bit mode is placed in R/W port on bit #16 + case (CFG_DBITS) + 9: begin + assign A1DATA = {PORT_A1_RDATA[16], PORT_A1_RDATA[7:0]}; + assign C1DATA = {PORT_A2_RDATA[16], PORT_A2_RDATA[7:0]}; + assign PORT_A1_WDATA = {18{1'b0}}; + assign PORT_B1_WDATA = {B1_WDATA_CMPL[17], B1DATA[8], B1_WDATA_CMPL[16:9], B1DATA[7:0]}; + assign PORT_A2_WDATA = {18{1'b0}}; + assign PORT_B2_WDATA = {D1_WDATA_CMPL[17], D1DATA[8], D1_WDATA_CMPL[16:9], D1DATA[7:0]}; + end + default: begin + assign A1DATA = PORT_A1_RDATA[CFG_DBITS-1:0]; + assign C1DATA = PORT_A2_RDATA[CFG_DBITS-1:0]; + assign PORT_A1_WDATA = {18{1'b1}}; + assign PORT_B1_WDATA = {B1_WDATA_CMPL, B1DATA}; + assign PORT_A2_WDATA = {18{1'b1}}; + assign PORT_B2_WDATA = {D1_WDATA_CMPL, D1DATA}; + + end + endcase + + wire PORT_A1_CLK = CLK1; + wire PORT_A2_CLK = CLK2; + wire PORT_B1_CLK = CLK1; + wire PORT_B2_CLK = CLK2; + + wire PORT_A1_REN = A1EN; + wire PORT_A1_WEN = 1'b0; + wire [CFG_ENABLE_B-1:0] PORT_A1_BE = {PORT_A1_WEN,PORT_A1_WEN}; + + wire PORT_A2_REN = C1EN; + wire PORT_A2_WEN = 1'b0; + wire [CFG_ENABLE_D-1:0] PORT_A2_BE = {PORT_A2_WEN,PORT_A2_WEN}; + + wire PORT_B1_REN = 1'b0; + wire PORT_B1_WEN = B1EN[0]; + wire [CFG_ENABLE_B-1:0] PORT_B1_BE = {B1EN[1],B1EN[0]}; + + wire PORT_B2_REN = 1'b0; + wire PORT_B2_WEN = D1EN[0]; + wire [CFG_ENABLE_D-1:0] PORT_B2_BE = {D1EN[1],D1EN[0]}; + + TDP36K _TECHMAP_REPLACE_ ( + .WDATA_A1_i(PORT_A1_WDATA), + .RDATA_A1_o(PORT_A1_RDATA), + .ADDR_A1_i(PORT_A1_ADDR), + .CLK_A1_i(PORT_A1_CLK), + .REN_A1_i(PORT_A1_REN), + .WEN_A1_i(PORT_A1_WEN), + .BE_A1_i(PORT_A1_BE), + + .WDATA_A2_i(PORT_A2_WDATA), + .RDATA_A2_o(PORT_A2_RDATA), + .ADDR_A2_i(PORT_A2_ADDR), + .CLK_A2_i(PORT_A2_CLK), + .REN_A2_i(PORT_A2_REN), + .WEN_A2_i(PORT_A2_WEN), + .BE_A2_i(PORT_A2_BE), + + .WDATA_B1_i(PORT_B1_WDATA), + .RDATA_B1_o(PORT_B1_RDATA), + .ADDR_B1_i(PORT_B1_ADDR), + .CLK_B1_i(PORT_B1_CLK), + .REN_B1_i(PORT_B1_REN), + .WEN_B1_i(PORT_B1_WEN), + .BE_B1_i(PORT_B1_BE), + + .WDATA_B2_i(PORT_B2_WDATA), + .RDATA_B2_o(PORT_B2_RDATA), + .ADDR_B2_i(PORT_B2_ADDR), + .CLK_B2_i(PORT_B2_CLK), + .REN_B2_i(PORT_B2_REN), + .WEN_B2_i(PORT_B2_WEN), + .BE_B2_i(PORT_B2_BE), + + .FLUSH1_i(FLUSH1), + .FLUSH2_i(FLUSH2) + ); +endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index aa067bc5b..69c5298dc 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -276,6 +276,46 @@ module \$__QLF_FACTOR_BRAM18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1 ); endmodule +module \$__QLF_FACTOR_BRAM18_SDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, CLK1, CLK2); + parameter CFG_ABITS = 11; + parameter CFG_DBITS = 18; + parameter CFG_ENABLE_B = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [18431:0] INIT = 18432'bx; + + input CLK1; + input CLK2; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + BRAM2x18_SDP #( + .CFG_ABITS(CFG_ABITS), + .CFG_DBITS(CFG_DBITS), + .CFG_ENABLE_B(CFG_ENABLE_B), + .CLKPOL2(CLKPOL2), + .CLKPOL3(CLKPOL3), + .INIT0(INIT), + ) _TECHMAP_REPLACE_ ( + .A1ADDR(A1ADDR), + .A1DATA(A1DATA), + .A1EN(A1EN), + .CLK1(CLK1), + + .B1ADDR(B1ADDR), + .B1DATA(B1DATA), + .B1EN(B1EN), + .CLK2(CLK2) + ); +endmodule + module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); parameter CFG_ABITS = 10; parameter CFG_DBITS = 36; diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 30f14d112..90c6db5ba 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1389,6 +1389,229 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, ); endmodule +module BRAM2x18_SDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, C1EN, CLK1, CLK2, D1ADDR, D1DATA, D1EN); + parameter CFG_ABITS = 11; + parameter CFG_DBITS = 18; + parameter CFG_ENABLE_B = 4; + parameter CFG_ENABLE_D = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [18431:0] INIT0 = 18432'bx; + parameter [18431:0] INIT1 = 18432'bx; + + localparam MODE_36 = 3'b011; // 36- or 32-bit + localparam MODE_18 = 3'b010; // 18- or 16-bit + localparam MODE_9 = 3'b001; // 9- or 8-bit + localparam MODE_4 = 3'b100; // 4-bit + localparam MODE_2 = 3'b110; // 2-bit + localparam MODE_1 = 3'b101; // 1-bit + + input CLK1; + input CLK2; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + input [CFG_ABITS-1:0] C1ADDR; + output [CFG_DBITS-1:0] C1DATA; + input C1EN; + + input [CFG_ABITS-1:0] D1ADDR; + input [CFG_DBITS-1:0] D1DATA; + input [CFG_ENABLE_D-1:0] D1EN; + + wire FLUSH1; + wire FLUSH2; + + wire [13:CFG_ABITS] A1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] B1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] C1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] D1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + + wire [13:0] A1ADDR_TOTAL = {A1ADDR_CMPL, A1ADDR}; + wire [13:0] B1ADDR_TOTAL = {B1ADDR_CMPL, B1ADDR}; + wire [13:0] C1ADDR_TOTAL = {C1ADDR_CMPL, C1ADDR}; + wire [13:0] D1ADDR_TOTAL = {D1ADDR_CMPL, D1ADDR}; + + wire [17:CFG_DBITS] A1_RDATA_CMPL; + wire [17:CFG_DBITS] C1_RDATA_CMPL; + + wire [17:CFG_DBITS] B1_WDATA_CMPL; + wire [17:CFG_DBITS] D1_WDATA_CMPL; + + wire [13:0] PORT_A1_ADDR; + wire [13:0] PORT_A2_ADDR; + wire [13:0] PORT_B1_ADDR; + wire [13:0] PORT_B2_ADDR; + + case (CFG_DBITS) + 1: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL; + assign PORT_B1_ADDR = B1ADDR_TOTAL; + assign PORT_A2_ADDR = C1ADDR_TOTAL; + assign PORT_B2_ADDR = D1ADDR_TOTAL; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0 + }; + end + + 2: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 1; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 1; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 1; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 1; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0 + }; + end + + 4: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 2; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 2; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 2; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 2; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0 + }; + end + + 8, 9: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 3; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 3; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 3; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 3; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0 + }; + end + + 16, 18: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 4; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 4; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 4; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 4; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0 + }; + end + + default: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL; + assign PORT_B1_ADDR = B1ADDR_TOTAL; + assign PORT_A2_ADDR = D1ADDR_TOTAL; + assign PORT_B2_ADDR = C1ADDR_TOTAL; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 + }; + end + endcase + + assign FLUSH1 = 1'b0; + assign FLUSH2 = 1'b0; + + wire [17:0] PORT_A1_RDATA; + wire [17:0] PORT_B1_RDATA; + wire [17:0] PORT_A2_RDATA; + wire [17:0] PORT_B2_RDATA; + + wire [17:0] PORT_A1_WDATA; + wire [17:0] PORT_B1_WDATA; + wire [17:0] PORT_A2_WDATA; + wire [17:0] PORT_B2_WDATA; + + // Assign read/write data - handle special case for 9bit mode + // parity bit for 9bit mode is placed in R/W port on bit #16 + case (CFG_DBITS) + 9: begin + assign A1DATA = {PORT_A1_RDATA[16], PORT_A1_RDATA[7:0]}; + assign C1DATA = {PORT_A2_RDATA[16], PORT_A2_RDATA[7:0]}; + assign PORT_A1_WDATA = {18{1'b0}}; + assign PORT_B1_WDATA = {B1_WDATA_CMPL[17], B1DATA[8], B1_WDATA_CMPL[16:9], B1DATA[7:0]}; + assign PORT_A2_WDATA = {18{1'b0}}; + assign PORT_B2_WDATA = {D1_WDATA_CMPL[17], D1DATA[8], D1_WDATA_CMPL[16:9], D1DATA[7:0]}; + end + default: begin + assign A1DATA = PORT_A1_RDATA[CFG_DBITS-1:0]; + assign C1DATA = PORT_A2_RDATA[CFG_DBITS-1:0]; + assign PORT_A1_WDATA = {18{1'b1}}; + assign PORT_B1_WDATA = {B1_WDATA_CMPL, B1DATA}; + assign PORT_A2_WDATA = {18{1'b1}}; + assign PORT_B2_WDATA = {D1_WDATA_CMPL, D1DATA}; + + end + endcase + + wire PORT_A1_CLK = CLK1; + wire PORT_A2_CLK = CLK2; + wire PORT_B1_CLK = CLK1; + wire PORT_B2_CLK = CLK2; + + wire PORT_A1_REN = A1EN; + wire PORT_A1_WEN = 1'b0; + wire [CFG_ENABLE_B-1:0] PORT_A1_BE = {PORT_A1_WEN,PORT_A1_WEN}; + + wire PORT_A2_REN = C1EN; + wire PORT_A2_WEN = 1'b0; + wire [CFG_ENABLE_D-1:0] PORT_A2_BE = {PORT_A2_WEN,PORT_A2_WEN}; + + wire PORT_B1_REN = 1'b0; + wire PORT_B1_WEN = B1EN[0]; + wire [CFG_ENABLE_B-1:0] PORT_B1_BE = {B1EN[1],B1EN[0]}; + + wire PORT_B2_REN = 1'b0; + wire PORT_B2_WEN = D1EN[0]; + wire [CFG_ENABLE_D-1:0] PORT_B2_BE = {D1EN[1],D1EN[0]}; + + TDP36K bram_2x18k ( + .WDATA_A1_i(PORT_A1_WDATA), + .RDATA_A1_o(PORT_A1_RDATA), + .ADDR_A1_i(PORT_A1_ADDR), + .CLK_A1_i(PORT_A1_CLK), + .REN_A1_i(PORT_A1_REN), + .WEN_A1_i(PORT_A1_WEN), + .BE_A1_i(PORT_A1_BE), + + .WDATA_A2_i(PORT_A2_WDATA), + .RDATA_A2_o(PORT_A2_RDATA), + .ADDR_A2_i(PORT_A2_ADDR), + .CLK_A2_i(PORT_A2_CLK), + .REN_A2_i(PORT_A2_REN), + .WEN_A2_i(PORT_A2_WEN), + .BE_A2_i(PORT_A2_BE), + + .WDATA_B1_i(PORT_B1_WDATA), + .RDATA_B1_o(PORT_B1_RDATA), + .ADDR_B1_i(PORT_B1_ADDR), + .CLK_B1_i(PORT_B1_CLK), + .REN_B1_i(PORT_B1_REN), + .WEN_B1_i(PORT_B1_WEN), + .BE_B1_i(PORT_B1_BE), + + .WDATA_B2_i(PORT_B2_WDATA), + .RDATA_B2_o(PORT_B2_RDATA), + .ADDR_B2_i(PORT_B2_ADDR), + .CLK_B2_i(PORT_B2_CLK), + .REN_B2_i(PORT_B2_REN), + .WEN_B2_i(PORT_B2_WEN), + .BE_B2_i(PORT_B2_BE), + + .FLUSH1_i(FLUSH1), + .FLUSH2_i(FLUSH2) + ); +endmodule + (* blackbox *) module QL_DSP1 ( input wire [19:0] a, From 6da55bc9435cc1fbcbd5235806fdce1886c87c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 25 May 2022 15:41:24 +0200 Subject: [PATCH 782/845] ql-qlf: k6n10f: add tests for SDP split BRAM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/Makefile | 3 +- .../bram_sdp_split/bram_sdp_split.tcl | 83 +++ .../bram_sdp_split/bram_sdp_split.v | 479 ++++++++++++++++++ .../qlf_k6n10f/bram_sdp_split/sim/Makefile | 38 ++ .../bram_sdp_split/sim/bram_sdp_split_tb.v | 296 +++++++++++ 5 files changed, 898 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/sim/Makefile create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/sim/bram_sdp_split_tb.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index ff57dedd1..2164a30f9 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -44,7 +44,8 @@ SIM_TESTS = \ POST_SYNTH_SIM_TESTS = \ qlf_k6n10f/bram_tdp \ qlf_k6n10f/bram_sdp \ - qlf_k6n10f/bram_tdp_split + qlf_k6n10f/bram_tdp_split \ + qlf_k6n10f/bram_sdp_split include $(shell pwd)/../../Makefile_test.common diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.tcl new file mode 100644 index 000000000..a296d8c07 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.tcl @@ -0,0 +1,83 @@ +yosys -import + +if { [info procs ql-qlf-k6n10f] == {} } { plugin -i ql-qlf } +yosys -import ; + +read_verilog $::env(DESIGN_TOP).v +design -save bram_sdp_split + +select BRAM_SDP_SPLIT_2x18x1024 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_SPLIT_2x18x1024 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_split_2x18x1024_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp_split +select BRAM_SDP_SPLIT_2x16x1024 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_SPLIT_2x16x1024 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_split_2x16x1024_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp_split +select BRAM_SDP_SPLIT_2x9x2048 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_SPLIT_2x9x2048 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_split_2x9x2048_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp_split +select BRAM_SDP_SPLIT_2x8x2048 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_SPLIT_2x8x2048 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_split_2x8x2048_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp_split +select BRAM_SDP_SPLIT_2x4x4096 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_SPLIT_2x4x4096 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_split_2x4x4096_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp_split +select BRAM_SDP_SPLIT_2x2x8192 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_SPLIT_2x2x8192 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_split_2x2x8192_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_sdp_split +select BRAM_SDP_SPLIT_2x1x16384 +select * +synth_quicklogic -family qlf_k6n10f -top BRAM_SDP_SPLIT_2x1x16384 +opt_expr -undriven +opt_clean +stat +write_verilog sim/bram_sdp_split_2x1x16384_post_synth.v +select -assert-count 1 t:TDP36K + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.v new file mode 100644 index 000000000..48dbebd48 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.v @@ -0,0 +1,479 @@ +// Copyright (C) 2019-2022 The SymbiFlow Authors +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier: ISC + +module BRAM_SDP_SPLIT #(parameter AWIDTH = 9, +parameter DWIDTH = 32)( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + + input clk; + input rce; + input [AWIDTH-1:0] ra; + output reg [DWIDTH-1:0] rq; + input wce; + input [AWIDTH-1:0] wa; + input [DWIDTH-1:0] wd; + + reg [DWIDTH-1:0] memory[0:(1< $(word $(1),$(POST_SYNTH)).vvp.log 2>&1 + @vvp -vvvv $(word $(1),$(POST_SYNTH)).vvp > $(word $(1),$(POST_SYNTH)).vcd.log 2>&1 +endef + +define clean_post_synth_sim + @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log +endef + +#FIXME: $(call simulate_post_synth,3) +sim: + $(call simulate_post_synth,1) + $(call simulate_post_synth,2) + $(call simulate_post_synth,3) + $(call simulate_post_synth,4) + $(call simulate_post_synth,5) + $(call simulate_post_synth,6) + $(call simulate_post_synth,7) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/sim/bram_sdp_split_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/sim/bram_sdp_split_tb.v new file mode 100644 index 000000000..9515eb426 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/sim/bram_sdp_split_tb.v @@ -0,0 +1,296 @@ +// Copyright (C) 2019-2022 The SymbiFlow Authors +// +// Use of this source code is governed by a ISC-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/ISC +// +// SPDX-License-Identifier: ISC + +`timescale 1ns/1ps + +`define STRINGIFY(x) `"x`" + +module TB; + localparam PERIOD = 50; + localparam ADDR_INCR = 1; + + reg clk_0; + reg rce_0; + reg [`ADDR_WIDTH-1:0] ra_0; + wire [`DATA_WIDTH-1:0] rq_0; + reg wce_0; + reg [`ADDR_WIDTH-1:0] wa_0; + reg [`DATA_WIDTH-1:0] wd_0; + + reg clk_1; + reg rce_1; + reg [`ADDR_WIDTH-1:0] ra_1; + wire [`DATA_WIDTH-1:0] rq_1; + reg wce_1; + reg [`ADDR_WIDTH-1:0] wa_1; + reg [`DATA_WIDTH-1:0] wd_1; + + + initial clk_0 = 0; + initial clk_1 = 0; + initial ra_0 = 0; + initial ra_1 = 0; + initial rce_0 = 0; + initial rce_1 = 0; + initial forever #(PERIOD / 2.0) clk_0 = ~clk_0; + initial begin + #(PERIOD / 4.0); + forever #(PERIOD / 2.0) clk_1 = ~clk_1; + end + initial begin + $dumpfile(`STRINGIFY(`VCD)); + $dumpvars; + end + + integer a; + integer b; + + reg done_0; + reg done_1; + initial done_0 = 1'b0; + initial done_1 = 1'b0; + wire done_sim = done_0 & done_1; + + reg [`DATA_WIDTH-1:0] expected_0; + reg [`DATA_WIDTH-1:0] expected_1; + + reg read_test_0; + reg read_test_1; + initial read_test_0 = 0; + initial read_test_1 = 0; + + always @(posedge clk_0) begin + expected_0 <= (a | (a << 20) | 20'h55000) & {`DATA_WIDTH{1'b1}}; + end + always @(posedge clk_1) begin + expected_1 <= ((b+1) | ((b+1) << 20) | 20'h55000) & {`DATA_WIDTH{1'b1}}; + end + + wire error_0 = ((a != 0) && read_test_0) ? (rq_0 !== expected_0) : 0; + wire error_1 = ((b != (1<<`ADDR_WIDTH) / 2) && read_test_1) ? (rq_1 !== expected_1) : 0; + + integer error_0_cnt = 0; + integer error_1_cnt = 0; + + always @ (posedge clk_0) + begin + if (error_0) + error_0_cnt <= error_0_cnt + 1'b1; + end + always @ (posedge clk_1) + begin + if (error_1) + error_1_cnt <= error_1_cnt + 1'b1; + end + + // PART 0 + initial #(1) begin + // Write data + for (a = 0; a < (1<<`ADDR_WIDTH) / 2; a = a + ADDR_INCR) begin + @(negedge clk_0) begin + wa_0 = a; + wd_0 = a | (a << 20) | 20'h55000; + wce_0 = 1; + end + @(posedge clk_0) begin + #(PERIOD/10) wce_0 = 0; + end + end + // Read data + read_test_0 = 1; + for (a = 0; a < (1<<`ADDR_WIDTH) / 2; a = a + ADDR_INCR) begin + @(negedge clk_0) begin + ra_0 = a; + rce_0 = 1; + end + @(posedge clk_0) begin + #(PERIOD/10) rce_0 = 0; + if ( rq_0 !== expected_0) begin + $display("%d: PORT 0: FAIL: mismatch act=%x exp=%x at %x", $time, rq_0, expected_0, a); + end else begin + $display("%d: PORT 0: OK: act=%x exp=%x at %x", $time, rq_0, expected_0, a); + end + end + end + done_0 = 1'b1; + end + + // PART 1 + initial #(1) begin + // Write data + for (b = (1<<`ADDR_WIDTH) / 2; b < (1<<`ADDR_WIDTH); b = b + ADDR_INCR) begin + @(negedge clk_1) begin + wa_1 = b; + wd_1 = (b+1) | ((b+1) << 20) | 20'h55000; + wce_1 = 1; + end + @(posedge clk_1) begin + #(PERIOD/10) wce_1 = 0; + end + end + // Read data + read_test_1 = 1; + for (b = (1<<`ADDR_WIDTH) / 2; b < (1<<`ADDR_WIDTH); b = b + ADDR_INCR) begin + @(negedge clk_1) begin + ra_1 = b; + rce_1 = 1; + end + @(posedge clk_1) begin + #(PERIOD/10) rce_1 = 0; + if ( rq_1 !== expected_1) begin + $display("%d: PORT 1: FAIL: mismatch act=%x exp=%x at %x", $time, rq_1, expected_1, b); + end else begin + $display("%d: PORT 1: OK: act=%x exp=%x at %x", $time, rq_1, expected_1, b); + end + end + end + done_1 = 1'b1; + end + + // Scan for simulation finish + always @(posedge clk_0, posedge clk_1) begin + if (done_sim) + $finish_and_return( (error_0_cnt == 0 & error_1_cnt == 0) ? 0 : -1 ); + end + + case (`STRINGIFY(`TOP)) + "BRAM_SDP_SPLIT_2x18x1024": begin + BRAM_SDP_SPLIT_2x18x1024 #() bram ( + .clk_0(clk_0), + .rce_0(rce_0), + .ra_0(ra_0), + .rq_0(rq_0), + .wce_0(wce_0), + .wa_0(wa_0), + .wd_0(wd_0), + + .clk_1(clk_1), + .rce_1(rce_1), + .ra_1(ra_1), + .rq_1(rq_1), + .wce_1(wce_1), + .wa_1(wa_1), + .wd_1(wd_1) + ); + end + "BRAM_SDP_SPLIT_2x16x1024": begin + BRAM_SDP_SPLIT_2x16x1024 #() bram ( + .clk_0(clk_0), + .rce_0(rce_0), + .ra_0(ra_0), + .rq_0(rq_0), + .wce_0(wce_0), + .wa_0(wa_0), + .wd_0(wd_0), + + .clk_1(clk_1), + .rce_1(rce_1), + .ra_1(ra_1), + .rq_1(rq_1), + .wce_1(wce_1), + .wa_1(wa_1), + .wd_1(wd_1) + ); + end + "BRAM_SDP_SPLIT_2x9x2048": begin + BRAM_SDP_SPLIT_2x9x2048 #() bram ( + .clk_0(clk_0), + .rce_0(rce_0), + .ra_0(ra_0), + .rq_0(rq_0), + .wce_0(wce_0), + .wa_0(wa_0), + .wd_0(wd_0), + + .clk_1(clk_1), + .rce_1(rce_1), + .ra_1(ra_1), + .rq_1(rq_1), + .wce_1(wce_1), + .wa_1(wa_1), + .wd_1(wd_1) + ); + end + "BRAM_SDP_SPLIT_2x8x2048": begin + BRAM_SDP_SPLIT_2x8x2048 #() bram ( + .clk_0(clk_0), + .rce_0(rce_0), + .ra_0(ra_0), + .rq_0(rq_0), + .wce_0(wce_0), + .wa_0(wa_0), + .wd_0(wd_0), + + .clk_1(clk_1), + .rce_1(rce_1), + .ra_1(ra_1), + .rq_1(rq_1), + .wce_1(wce_1), + .wa_1(wa_1), + .wd_1(wd_1) + ); + end + "BRAM_SDP_SPLIT_2x4x4096": begin + BRAM_SDP_SPLIT_2x4x4096 #() bram ( + .clk_0(clk_0), + .rce_0(rce_0), + .ra_0(ra_0), + .rq_0(rq_0), + .wce_0(wce_0), + .wa_0(wa_0), + .wd_0(wd_0), + + .clk_1(clk_1), + .rce_1(rce_1), + .ra_1(ra_1), + .rq_1(rq_1), + .wce_1(wce_1), + .wa_1(wa_1), + .wd_1(wd_1) + ); + end + "BRAM_SDP_SPLIT_2x2x8192": begin + BRAM_SDP_SPLIT_2x2x8192 #() bram ( + .clk_0(clk_0), + .rce_0(rce_0), + .ra_0(ra_0), + .rq_0(rq_0), + .wce_0(wce_0), + .wa_0(wa_0), + .wd_0(wd_0), + + .clk_1(clk_1), + .rce_1(rce_1), + .ra_1(ra_1), + .rq_1(rq_1), + .wce_1(wce_1), + .wa_1(wa_1), + .wd_1(wd_1) + ); + end + "BRAM_SDP_SPLIT_2x1x16384": begin + BRAM_SDP_SPLIT_2x1x16384 #() bram ( + .clk_0(clk_0), + .rce_0(rce_0), + .ra_0(ra_0), + .rq_0(rq_0), + .wce_0(wce_0), + .wa_0(wa_0), + .wd_0(wd_0), + + .clk_1(clk_1), + .rce_1(rce_1), + .ra_1(ra_1), + .rq_1(rq_1), + .wce_1(wce_1), + .wa_1(wa_1), + .wd_1(wd_1) + ); + end + endcase +endmodule From 4d987efc3d970f1b8da7b80bf63c3486b9e3e2be Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Tue, 31 May 2022 13:48:15 +0200 Subject: [PATCH 783/845] Handle missing typespecs Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index a112da14d..1d2383e8b 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1709,6 +1709,8 @@ void UhdmAst::process_typespec_member() current_node->str = current_node->str.substr(1); vpiHandle typespec_h = vpi_handle(vpiTypespec, obj_h); int typespec_type = vpi_get(vpiType, typespec_h); + const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; + const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; switch (typespec_type) { case vpiBitTypespec: case vpiLogicTypespec: { @@ -1736,6 +1738,13 @@ void UhdmAst::process_typespec_member() shared.report.mark_handled(typespec_h); break; } + case vpiTimeTypespec: + case vpiLongIntTypespec: { + current_node->is_signed = true; + packed_ranges.push_back(make_range(63, 0)); + shared.report.mark_handled(typespec_h); + break; + } case vpiStructTypespec: case vpiUnionTypespec: case vpiEnumTypespec: { @@ -1797,9 +1806,13 @@ void UhdmAst::process_typespec_member() } }); break; + case vpiVoidTypespec: { + report_error("%s:%d: Void typespecs are currently unsupported", object->VpiFile().c_str(), object->VpiLineNo()); + } + case vpiClassTypespec: { + report_error("%s:%d: Class typespecs are unsupported", object->VpiFile().c_str(), object->VpiLineNo()); + } default: { - const uhdm_handle *const handle = (const uhdm_handle *)typespec_h; - const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; report_error("%s:%d: Encountered unhandled typespec in process_typespec_member: '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), object->VpiName().c_str(), UHDM::VpiTypeName(typespec_h).c_str()); break; @@ -1838,6 +1851,7 @@ void UhdmAst::process_enum_typespec() shared.report.mark_handled(typespec_h); break; } + case vpiByteTypespec: case vpiIntTypespec: case vpiIntegerTypespec: { current_node->is_signed = true; @@ -3737,6 +3751,12 @@ void UhdmAst::process_parameter() shared.report.mark_handled(typespec_h); break; } + case vpiTimeTypespec: + case vpiLongIntTypespec: { + packed_ranges.push_back(make_range(63, 0)); + shared.report.mark_handled(typespec_h); + break; + } case vpiStructTypespec: { visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { if (node && !node->str.empty()) { From 3ff5daf9a0b627623696a6bf959226842d32a630 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Tue, 31 May 2022 18:36:19 -0700 Subject: [PATCH 784/845] The UHDM Serializer leaks memory if not Purge()-ed, so call it after import. --- systemverilog-plugin/uhdmastfrontend.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/systemverilog-plugin/uhdmastfrontend.cc b/systemverilog-plugin/uhdmastfrontend.cc index 660b4c298..4874ee8ba 100644 --- a/systemverilog-plugin/uhdmastfrontend.cc +++ b/systemverilog-plugin/uhdmastfrontend.cc @@ -57,6 +57,8 @@ struct UhdmAstFrontend : public UhdmCommonFrontend { } for (auto design : restoredDesigns) vpi_release_handle(design); + + serializer.Purge(); return current_ast; } void call_log_header(RTLIL::Design *design) override { log_header(design, "Executing UHDM frontend.\n"); } From cf91762cf3cd66b69d5a85f2f1ec0cb49ca7bf19 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Tue, 14 Jun 2022 10:36:23 +0200 Subject: [PATCH 785/845] Use fullSVMode in Surelog Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/uhdmsurelogastfrontend.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index 4a450bee1..39cc75168 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -110,6 +110,7 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { clp->setParse(true); clp->setCompile(true); clp->setElaborate(true); + clp->fullSVMode(true); SURELOG::scompiler *compiler = nullptr; const std::vector uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); From 8950ad83ad1643f79884d909956d6efd055a030a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Tue, 14 Jun 2022 15:42:39 +0200 Subject: [PATCH 786/845] ql-qlf: k6n10f: ql-bram-split: set INIT params only if those exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/ql-bram-split.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/ql-bram-split.cc b/ql-qlf-plugin/ql-bram-split.cc index 2dfdc2b3e..f701dcfb6 100644 --- a/ql-qlf-plugin/ql-bram-split.cc +++ b/ql-qlf-plugin/ql-bram-split.cc @@ -249,8 +249,10 @@ struct QlBramSplitPass : public Pass { bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_B"), bram_0->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); bram_2x18->setParam(RTLIL::escape_id("CFG_ENABLE_D"), bram_1->getParam(RTLIL::escape_id("CFG_ENABLE_B"))); } - bram_2x18->setParam(RTLIL::escape_id("INIT0"), bram_0->getParam(RTLIL::escape_id("INIT"))); - bram_2x18->setParam(RTLIL::escape_id("INIT1"), bram_1->getParam(RTLIL::escape_id("INIT"))); + if (bram_0->hasParam(RTLIL::escape_id("INIT"))) + bram_2x18->setParam(RTLIL::escape_id("INIT0"), bram_0->getParam(RTLIL::escape_id("INIT"))); + if (bram_1->hasParam(RTLIL::escape_id("INIT"))) + bram_2x18->setParam(RTLIL::escape_id("INIT1"), bram_1->getParam(RTLIL::escape_id("INIT"))); // Mark BRAM parts for removal cellsToRemove.push_back(bram_0); From 2584fba47e9491ab792e73dbff546678df1f277f Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Tue, 14 Jun 2022 17:45:42 -0700 Subject: [PATCH 787/845] Fix missing 'break' in switch/case. Signed-off-by: Henner Zeller --- systemverilog-plugin/UhdmAst.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 1d2383e8b..4f7182f22 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1808,9 +1808,11 @@ void UhdmAst::process_typespec_member() break; case vpiVoidTypespec: { report_error("%s:%d: Void typespecs are currently unsupported", object->VpiFile().c_str(), object->VpiLineNo()); + break; } case vpiClassTypespec: { report_error("%s:%d: Class typespecs are unsupported", object->VpiFile().c_str(), object->VpiLineNo()); + break; } default: { report_error("%s:%d: Encountered unhandled typespec in process_typespec_member: '%s' of type '%s'\n", object->VpiFile().c_str(), From 7a6e117a899426908a1832a463b20afd6488f607 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Fri, 17 Jun 2022 11:56:11 +0200 Subject: [PATCH 788/845] Force -Werror in CI Signed-off-by: Tomasz Gorochowik --- .github/workflows/build-and-test.sh | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 .github/workflows/build-and-test.sh diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh old mode 100644 new mode 100755 index 2d913b09b..7d0401e65 --- a/.github/workflows/build-and-test.sh +++ b/.github/workflows/build-and-test.sh @@ -23,7 +23,10 @@ source .github/workflows/common.sh start_section Building +export CXXFLAGS=-Werror make UHDM_INSTALL_DIR=`pwd`/env/conda/envs/yosys-plugins/ plugins -j`nproc` +unset CXXFLAGS + end_section ########################################################################## From c11d60aafce07871c762ac04f96b27c57d7f53bd Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Fri, 17 Jun 2022 12:34:11 +0200 Subject: [PATCH 789/845] ql: remove unused variable Signed-off-by: Tomasz Gorochowik --- ql-qlf-plugin/ql-edif.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/ql-qlf-plugin/ql-edif.cc b/ql-qlf-plugin/ql-edif.cc index 4633a1082..a560c1e68 100644 --- a/ql-qlf-plugin/ql-edif.cc +++ b/ql-qlf-plugin/ql-edif.cc @@ -250,14 +250,12 @@ struct QLEdifBackend : public Backend { } int width = port_it.second; int start = 0; - bool upto = false; auto m = design->module(cell_it.first); if (m) { auto w = m->wire(port_it.first); if (w) { width = GetSize(w); start = w->start_offset; - upto = w->upto; } } if (width == 1) From 5bad0a0065db050b78477ea49d99f7b7cf75f614 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Fri, 17 Jun 2022 13:51:50 +0200 Subject: [PATCH 790/845] ql: fix port name error log Signed-off-by: Tomasz Gorochowik --- ql-qlf-plugin/ql-dsp-io-regs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index d65a06f2e..9f2459492 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -82,7 +82,7 @@ void ql_dsp_io_regs_pass(RTLIL::Module *module) for (auto portname : ports2del) { const RTLIL::SigSpec *port = &dsp->getPort(RTLIL::escape_id(portname)); if (!port) - log_error("%s port not found!", portname); + log_error("%s port not found!", portname.c_str()); dsp->connections_.erase(RTLIL::escape_id(portname)); } } From b04621eaf02fa11afb5381be05fc0f0267f82d9b Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Fri, 17 Jun 2022 13:52:09 +0200 Subject: [PATCH 791/845] ql: remove some leftover code Signed-off-by: Tomasz Gorochowik --- ql-qlf-plugin/ql-bram-split.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ql-qlf-plugin/ql-bram-split.cc b/ql-qlf-plugin/ql-bram-split.cc index f701dcfb6..f699ee587 100644 --- a/ql-qlf-plugin/ql-bram-split.cc +++ b/ql-qlf-plugin/ql-bram-split.cc @@ -162,11 +162,6 @@ struct QlBramSplitPass : public Pass { groups[key].push_back(cell); } - for (const auto &it : groups) { - const auto &group = it.second; - const auto &config = it.first; - } - std::vector cellsToRemove; // Map cell pairs to the target BRAM 2x18 cell From 9190d53c446a0f13b302ae1b228167cf4d690628 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 22 Jun 2022 11:36:42 +0200 Subject: [PATCH 792/845] Add default enum range Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 4f7182f22..48dd5aec9 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1358,6 +1358,10 @@ void UhdmAst::move_type_to_new_typedef(AST::AstNode *current_node, AST::AstNode wire_node->attributes["\\enum_type"] = AST::AstNode::mkconst_str(type_node->str); if (!type_node->children.empty() && type_node->children[0]->children.size() > 1) { wire_node->children.push_back(type_node->children[0]->children[1]->clone()); + } else { + // Add default range + auto range = make_range(31, 0); + wire_node->children.push_back(range); } typedef_node->children.push_back(wire_node); current_node->children.push_back(type_node); From a928adfe56b205030cc0de376fe42dc6273f068c Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 22 Jun 2022 11:37:46 +0200 Subject: [PATCH 793/845] Do not annotate base types for enums Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 48dd5aec9..5760b8c16 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1350,9 +1350,6 @@ void UhdmAst::move_type_to_new_typedef(AST::AstNode *current_node, AST::AstNode delete type_node; } else { type_node->str = "$enum" + std::to_string(shared.next_enum_id()); - for (auto *enum_item : type_node->children) { - enum_item->attributes["\\enum_base_type"] = AST::AstNode::mkconst_str(type_node->str); - } auto wire_node = new AST::AstNode(AST::AST_WIRE); wire_node->is_reg = true; wire_node->attributes["\\enum_type"] = AST::AstNode::mkconst_str(type_node->str); From 1daf3337427cac1e884022d0601491eb17c63d6c Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 22 Jun 2022 11:38:19 +0200 Subject: [PATCH 794/845] Propagate ranges to enum items Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 5760b8c16..5f13f8f97 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1840,17 +1840,6 @@ void UhdmAst::process_enum_typespec() switch (typespec_type) { case vpiLogicTypespec: { current_node->is_logic = true; - bool has_range = false; - visit_range(typespec_h, [&](AST::AstNode *node) { - has_range = true; - for (auto child : current_node->children) { - child->children.push_back(node->clone()); - } - delete node; - }); - if (!has_range) // range is needed for simplify - for (auto child : current_node->children) - child->children.push_back(make_ast_node(AST::AST_RANGE, {AST::AstNode::mkconst_int(0, true)})); shared.report.mark_handled(typespec_h); break; } @@ -1862,17 +1851,6 @@ void UhdmAst::process_enum_typespec() break; } case vpiBitTypespec: { - bool has_range = false; - visit_range(typespec_h, [&](AST::AstNode *node) { - has_range = true; - for (auto child : current_node->children) { - child->children.push_back(node->clone()); - } - delete node; - }); - if (!has_range) // range is needed for simplify - for (auto child : current_node->children) - child->children.push_back(make_ast_node(AST::AST_RANGE, {AST::AstNode::mkconst_int(0, true)})); shared.report.mark_handled(typespec_h); break; } @@ -1896,6 +1874,10 @@ void UhdmAst::process_enum_const() constant_node->filename = current_node->filename; constant_node->location = current_node->location; current_node->children.push_back(constant_node); + auto left_const = AST::AstNode::mkconst_int(constant_node->range_left, true); + auto right_const = AST::AstNode::mkconst_int(constant_node->range_right, true); + auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); + current_node->children.push_back(range); } } From aa99327787882c45b146598b5b6152bc50423475 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 7 Jun 2022 09:33:26 +0200 Subject: [PATCH 795/845] Added missing handling of -run parameter to the synth_quicklogic pass Signed-off-by: Maciej Kurc --- ql-qlf-plugin/synth_quicklogic.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 90afb5515..9829ebc31 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -121,7 +121,17 @@ struct SynthQuickLogicPass : public ScriptPass { size_t argidx; for (argidx = 1; argidx < args.size(); argidx++) { - if (args[argidx] == "-top" && argidx + 1 < args.size()) { + if (args[argidx] == "-run" && argidx+1 < args.size()) { + size_t pos = args[argidx+1].find(':'); + if (pos == std::string::npos) { + run_from = args[++argidx]; + run_to = args[argidx]; + } else { + run_from = args[++argidx].substr(0, pos); + run_to = args[argidx].substr(pos+1); + } + continue; + } if (args[argidx] == "-top" && argidx + 1 < args.size()) { top_opt = "-top " + args[++argidx]; continue; } From 8ad8d06f9e4965a991523a4466f01eeba4cc7e16 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 7 Jun 2022 11:43:12 +0200 Subject: [PATCH 796/845] Enabled inference of sync. reset DFFs in Yosys flow Signed-off-by: Maciej Kurc --- ql-qlf-plugin/synth_quicklogic.cc | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 9829ebc31..4c9e6fc0e 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -121,17 +121,18 @@ struct SynthQuickLogicPass : public ScriptPass { size_t argidx; for (argidx = 1; argidx < args.size(); argidx++) { - if (args[argidx] == "-run" && argidx+1 < args.size()) { - size_t pos = args[argidx+1].find(':'); - if (pos == std::string::npos) { - run_from = args[++argidx]; - run_to = args[argidx]; - } else { - run_from = args[++argidx].substr(0, pos); - run_to = args[argidx].substr(pos+1); - } - continue; - } if (args[argidx] == "-top" && argidx + 1 < args.size()) { + if (args[argidx] == "-run" && argidx + 1 < args.size()) { + size_t pos = args[argidx + 1].find(':'); + if (pos == std::string::npos) { + run_from = args[++argidx]; + run_to = args[argidx]; + } else { + run_from = args[++argidx].substr(0, pos); + run_to = args[argidx].substr(pos + 1); + } + continue; + } + if (args[argidx] == "-top" && argidx + 1 < args.size()) { top_opt = "-top " + args[++argidx]; continue; } @@ -231,10 +232,7 @@ struct SynthQuickLogicPass : public ScriptPass { std::string noDFFArgs; if (family == "qlf_k4n8") { noDFFArgs = " -nodffe -nosdff"; - } else if (family == "qlf_k6n10f") { - noDFFArgs = " -nosdff"; } - if (check_label("coarse")) { run("check"); run("opt -nodffe -nosdff"); @@ -365,8 +363,7 @@ struct SynthQuickLogicPass : public ScriptPass { // $_DLATCH_SRPPP_ 0"); } else if (family == "qlf_k6n10f") { run("shregmap -minlen 8 -maxlen 20"); - run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_???_ 0 -cell $_DFFE_????_ 0 -cell $_DFFSR_???_ 0 -cell $_DFFSRE_????_ 0 -cell " - "$_DLATCHSR_PPP_ 0"); + run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFFSRE_?NNP_ 0 -cell $_SDFFE_?N?P_ 0 -cell $_DLATCH_?_ 0 -cell $_DLATCHSR_?NN_ 0"); } else if (family == "pp3") { run("dfflegalize -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_?_ x"); run("techmap -map +/quicklogic/" + family + "/cells_map.v"); From f4bb47ec32f2dd73bdbc567705f6549a0d97214c Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 7 Jun 2022 11:44:48 +0200 Subject: [PATCH 797/845] Cleaned DFF simulation models and techmaps, added sync. reset flip-flop models Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 790 ++++++++++++--------------- ql-qlf-plugin/qlf_k6n10f/ffs_map.v | 582 ++------------------ 2 files changed, 411 insertions(+), 961 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 90c6db5ba..ded97d4ee 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -75,8 +75,6 @@ module adder_lut5( endmodule - - (* abc9_lut=1, lib_whitebox *) module frac_lut6( input wire [0:5] in, @@ -126,213 +124,147 @@ module frac_lut6( endmodule + (* abc9_flop, lib_whitebox *) module dff( output reg Q, input wire D, (* clkbuf_sink *) - (* invertible_pin = "IS_C_INVERTED" *) input wire C ); - parameter [0:0] INIT = 1'b0; - parameter [0:0] IS_C_INVERTED = 1'b0; - initial Q = INIT; - case(|IS_C_INVERTED) - 1'b0: - always @(posedge C) - Q <= D; - 1'b1: - always @(negedge C) - Q <= D; - endcase + initial Q <= 1'b0; + + always @(posedge C) + Q <= D; + endmodule (* abc9_flop, lib_whitebox *) -module dffr( +module dffn( output reg Q, input wire D, - input wire R, (* clkbuf_sink *) - (* invertible_pin = "IS_C_INVERTED" *) input wire C ); - parameter [0:0] INIT = 1'b0; - parameter [0:0] IS_C_INVERTED = 1'b0; - initial Q = INIT; - case(|IS_C_INVERTED) - 1'b0: - always @(posedge C or posedge R) - if (R) - Q <= 1'b0; - else - Q <= D; - 1'b1: - always @(negedge C or posedge R) - if (R) - Q <= 1'b0; - else - Q <= D; - endcase + initial Q <= 1'b0; + + always @(negedge C) + Q <= D; + endmodule (* abc9_flop, lib_whitebox *) -module dffre( +module dffsre( output reg Q, input wire D, - input wire R, - input wire E, (* clkbuf_sink *) - (* invertible_pin = "IS_C_INVERTED" *) - input wire C + input wire C, + input wire E, + input wire R, + input wire S ); - parameter [0:0] INIT = 1'b0; - parameter [0:0] IS_C_INVERTED = 1'b0; - initial Q = INIT; - case(|IS_C_INVERTED) - 1'b0: - always @(posedge C or posedge R) - if (R) - Q <= 1'b0; - else if(E) - Q <= D; - 1'b1: - always @(negedge C or posedge R) - if (R) - Q <= 1'b0; - else if(E) - Q <= D; - endcase + initial Q <= 1'b0; + + always @(posedge C or negedge S or negedge R) + if (!R) + Q <= 1'b0; + else if (!S) + Q <= 1'b1; + else if (E) + Q <= D; + endmodule -module dffs( +(* abc9_flop, lib_whitebox *) +module dffnsre( output reg Q, input wire D, (* clkbuf_sink *) - (* invertible_pin = "IS_C_INVERTED" *) input wire C, + input wire E, + input wire R, input wire S ); - parameter [0:0] INIT = 1'b0; - parameter [0:0] IS_C_INVERTED = 1'b0; - initial Q = INIT; - case(|IS_C_INVERTED) - 1'b0: - always @(posedge C or negedge S) - if (S) - Q <= 1'b1; - else - Q <= D; - 1'b1: - always @(negedge C or negedge S) - if (S) - Q <= 1'b1; - else - Q <= D; - endcase + initial Q <= 1'b0; + + always @(negedge C or negedge S or negedge R) + if (!R) + Q <= 1'b0; + else if (!S) + Q <= 1'b1; + else if (E) + Q <= D; + endmodule -module dffse( +(* abc9_flop, lib_whitebox *) +module sdffsre( output reg Q, input wire D, (* clkbuf_sink *) - (* invertible_pin = "IS_C_INVERTED" *) input wire C, - input wire S, - input wire E + input wire E, + input wire R, + input wire S ); - parameter [0:0] INIT = 1'b0; - parameter [0:0] IS_C_INVERTED = 1'b0; - initial Q = INIT; - case(|IS_C_INVERTED) - 1'b0: - always @(posedge C or negedge S) - if (S) - Q <= 1'b1; - else if(E) - Q <= D; - 1'b1: - always @(negedge C or negedge S) - if (S) - Q <= 1'b1; - else if(E) - Q <= D; - endcase + initial Q <= 1'b0; + + always @(posedge C) + if (!R) + Q <= 1'b0; + else if (!S) + Q <= 1'b1; + else if (E) + Q <= D; + endmodule -module dffsr( +(* abc9_flop, lib_whitebox *) +module sdffnsre( output reg Q, input wire D, (* clkbuf_sink *) - (* invertible_pin = "IS_C_INVERTED" *) input wire C, + input wire E, input wire R, input wire S ); - parameter [0:0] INIT = 1'b0; - parameter [0:0] IS_C_INVERTED = 1'b0; - initial Q = INIT; - case(|IS_C_INVERTED) - 1'b0: - always @(posedge C or negedge S or negedge R) - if (S) - Q <= 1'b1; - else if (R) - Q <= 1'b0; - else - Q <= D; - 1'b1: - always @(negedge C or negedge S or negedge R) - if (S) - Q <= 1'b1; - else if (R) - Q <= 1'b0; - else - Q <= D; - endcase + initial Q <= 1'b0; + + always @(negedge C) + if (!R) + Q <= 1'b0; + else if (!S) + Q <= 1'b1; + else if (E) + Q <= D; + endmodule -module dffsre( +(* abc9_flop, lib_whitebox *) +module latch ( output reg Q, input wire D, - (* clkbuf_sink *) - input wire C, - input wire E, - input wire R, - input wire S + input wire G ); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; + initial Q <= 1'b0; + + always @(G) + if (G) Q <= D; - always @(posedge C or negedge S or negedge R) - if (!R) - Q <= 1'b0; - else if (!S) - Q <= 1'b1; - else if (E) - Q <= D; - endmodule -module dffnsre( +(* abc9_flop, lib_whitebox *) +module latchn ( output reg Q, input wire D, - (* clkbuf_sink *) - input wire C, - input wire E, - input wire R, - input wire S + input wire G ); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; + initial Q <= 1'b0; + + always @(G) + if (!G) Q <= D; - always @(negedge C or negedge S or negedge R) - if (!R) - Q <= 1'b0; - else if (!S) - Q <= 1'b1; - else if (E) - Q <= D; - endmodule (* abc9_flop, lib_whitebox *) @@ -344,17 +276,18 @@ module latchsre ( input wire G, input wire E ); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; + initial Q <= 1'b0; + always @* begin - if (!R) + if (!R) Q <= 1'b0; - else if (!S) + else if (!S) Q <= 1'b1; - else if (E && G) + else if (E && G) Q <= D; end + endmodule (* abc9_flop, lib_whitebox *) @@ -366,32 +299,21 @@ module latchnsre ( input wire G, input wire E ); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; + initial Q <= 1'b0; + always @* begin - if (!R) + if (!R) Q <= 1'b0; - else if (!S) + else if (!S) Q <= 1'b1; - else if (E && !G) + else if (E && !G) Q <= D; end -endmodule - -(* abc9_flop, lib_whitebox *) -module scff( - output reg Q, - input wire D, - input wire clk -); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; - always @(posedge clk) - Q <= D; endmodule + module TDP_BRAM18 ( (* clkbuf_sink *) input wire CLOCKA, @@ -1255,10 +1177,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 14'd0); assign PORT_A2_ADDR = E1EN ? E1ADDR_TOTAL : (F1EN ? F1ADDR_TOTAL : 14'd0); assign PORT_B2_ADDR = G1EN ? G1ADDR_TOTAL : (H1EN ? H1ADDR_TOTAL : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0 + }; end 2: begin @@ -1266,10 +1188,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 1) : (D1EN ? (D1ADDR_TOTAL << 1) : 14'd0); assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 1) : (F1EN ? (F1ADDR_TOTAL << 1) : 14'd0); assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 1) : (H1EN ? (H1ADDR_TOTAL << 1) : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0 + }; end 4: begin @@ -1277,10 +1199,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 2) : (D1EN ? (D1ADDR_TOTAL << 2) : 14'd0); assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 2) : (F1EN ? (F1ADDR_TOTAL << 2) : 14'd0); assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 2) : (H1EN ? (H1ADDR_TOTAL << 2) : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0 + }; end 8, 9: begin @@ -1288,10 +1210,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 3) : (D1EN ? (D1ADDR_TOTAL << 3) : 14'd0); assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 3) : (F1EN ? (F1ADDR_TOTAL << 3) : 14'd0); assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 3) : (H1EN ? (H1ADDR_TOTAL << 3) : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0 + }; end 16, 18: begin @@ -1299,10 +1221,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 4) : (D1EN ? (D1ADDR_TOTAL << 4) : 14'd0); assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 4) : (F1EN ? (F1ADDR_TOTAL << 4) : 14'd0); assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 4) : (H1EN ? (H1ADDR_TOTAL << 4) : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0 + }; end default: begin @@ -1310,10 +1232,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 14'd0); assign PORT_A2_ADDR = E1EN ? E1ADDR_TOTAL : (F1EN ? F1ADDR_TOTAL : 14'd0); assign PORT_B2_ADDR = G1EN ? G1ADDR_TOTAL : (H1EN ? H1ADDR_TOTAL : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 + }; end endcase @@ -1390,15 +1312,15 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, endmodule module BRAM2x18_SDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, C1EN, CLK1, CLK2, D1ADDR, D1DATA, D1EN); - parameter CFG_ABITS = 11; - parameter CFG_DBITS = 18; - parameter CFG_ENABLE_B = 4; - parameter CFG_ENABLE_D = 4; + parameter CFG_ABITS = 11; + parameter CFG_DBITS = 18; + parameter CFG_ENABLE_B = 4; + parameter CFG_ENABLE_D = 4; - parameter CLKPOL2 = 1; - parameter CLKPOL3 = 1; - parameter [18431:0] INIT0 = 18432'bx; - parameter [18431:0] INIT1 = 18432'bx; + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [18431:0] INIT0 = 18432'bx; + parameter [18431:0] INIT1 = 18432'bx; localparam MODE_36 = 3'b011; // 36- or 32-bit localparam MODE_18 = 3'b010; // 18- or 16-bit @@ -1407,209 +1329,209 @@ module BRAM2x18_SDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, localparam MODE_2 = 3'b110; // 2-bit localparam MODE_1 = 3'b101; // 1-bit - input CLK1; - input CLK2; - - input [CFG_ABITS-1:0] A1ADDR; - output [CFG_DBITS-1:0] A1DATA; - input A1EN; - - input [CFG_ABITS-1:0] B1ADDR; - input [CFG_DBITS-1:0] B1DATA; - input [CFG_ENABLE_B-1:0] B1EN; - - input [CFG_ABITS-1:0] C1ADDR; - output [CFG_DBITS-1:0] C1DATA; - input C1EN; - - input [CFG_ABITS-1:0] D1ADDR; - input [CFG_DBITS-1:0] D1DATA; - input [CFG_ENABLE_D-1:0] D1EN; - - wire FLUSH1; - wire FLUSH2; - - wire [13:CFG_ABITS] A1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; - wire [13:CFG_ABITS] B1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; - wire [13:CFG_ABITS] C1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; - wire [13:CFG_ABITS] D1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; - - wire [13:0] A1ADDR_TOTAL = {A1ADDR_CMPL, A1ADDR}; - wire [13:0] B1ADDR_TOTAL = {B1ADDR_CMPL, B1ADDR}; - wire [13:0] C1ADDR_TOTAL = {C1ADDR_CMPL, C1ADDR}; - wire [13:0] D1ADDR_TOTAL = {D1ADDR_CMPL, D1ADDR}; - - wire [17:CFG_DBITS] A1_RDATA_CMPL; - wire [17:CFG_DBITS] C1_RDATA_CMPL; - - wire [17:CFG_DBITS] B1_WDATA_CMPL; - wire [17:CFG_DBITS] D1_WDATA_CMPL; - - wire [13:0] PORT_A1_ADDR; - wire [13:0] PORT_A2_ADDR; - wire [13:0] PORT_B1_ADDR; - wire [13:0] PORT_B2_ADDR; - - case (CFG_DBITS) - 1: begin - assign PORT_A1_ADDR = A1ADDR_TOTAL; - assign PORT_B1_ADDR = B1ADDR_TOTAL; - assign PORT_A2_ADDR = C1ADDR_TOTAL; - assign PORT_B2_ADDR = D1ADDR_TOTAL; - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0 - }; - end - - 2: begin - assign PORT_A1_ADDR = A1ADDR_TOTAL << 1; - assign PORT_B1_ADDR = B1ADDR_TOTAL << 1; - assign PORT_A2_ADDR = C1ADDR_TOTAL << 1; - assign PORT_B2_ADDR = D1ADDR_TOTAL << 1; - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0 - }; - end - - 4: begin - assign PORT_A1_ADDR = A1ADDR_TOTAL << 2; - assign PORT_B1_ADDR = B1ADDR_TOTAL << 2; - assign PORT_A2_ADDR = C1ADDR_TOTAL << 2; - assign PORT_B2_ADDR = D1ADDR_TOTAL << 2; - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0 - }; - end - - 8, 9: begin - assign PORT_A1_ADDR = A1ADDR_TOTAL << 3; - assign PORT_B1_ADDR = B1ADDR_TOTAL << 3; - assign PORT_A2_ADDR = C1ADDR_TOTAL << 3; - assign PORT_B2_ADDR = D1ADDR_TOTAL << 3; - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0 - }; - end - - 16, 18: begin - assign PORT_A1_ADDR = A1ADDR_TOTAL << 4; - assign PORT_B1_ADDR = B1ADDR_TOTAL << 4; - assign PORT_A2_ADDR = C1ADDR_TOTAL << 4; - assign PORT_B2_ADDR = D1ADDR_TOTAL << 4; - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0 - }; - end - - default: begin - assign PORT_A1_ADDR = A1ADDR_TOTAL; - assign PORT_B1_ADDR = B1ADDR_TOTAL; - assign PORT_A2_ADDR = D1ADDR_TOTAL; - assign PORT_B2_ADDR = C1ADDR_TOTAL; - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 - }; - end - endcase - - assign FLUSH1 = 1'b0; - assign FLUSH2 = 1'b0; - - wire [17:0] PORT_A1_RDATA; - wire [17:0] PORT_B1_RDATA; - wire [17:0] PORT_A2_RDATA; - wire [17:0] PORT_B2_RDATA; - - wire [17:0] PORT_A1_WDATA; - wire [17:0] PORT_B1_WDATA; - wire [17:0] PORT_A2_WDATA; - wire [17:0] PORT_B2_WDATA; - - // Assign read/write data - handle special case for 9bit mode - // parity bit for 9bit mode is placed in R/W port on bit #16 - case (CFG_DBITS) - 9: begin - assign A1DATA = {PORT_A1_RDATA[16], PORT_A1_RDATA[7:0]}; - assign C1DATA = {PORT_A2_RDATA[16], PORT_A2_RDATA[7:0]}; - assign PORT_A1_WDATA = {18{1'b0}}; - assign PORT_B1_WDATA = {B1_WDATA_CMPL[17], B1DATA[8], B1_WDATA_CMPL[16:9], B1DATA[7:0]}; - assign PORT_A2_WDATA = {18{1'b0}}; - assign PORT_B2_WDATA = {D1_WDATA_CMPL[17], D1DATA[8], D1_WDATA_CMPL[16:9], D1DATA[7:0]}; - end - default: begin - assign A1DATA = PORT_A1_RDATA[CFG_DBITS-1:0]; - assign C1DATA = PORT_A2_RDATA[CFG_DBITS-1:0]; - assign PORT_A1_WDATA = {18{1'b1}}; - assign PORT_B1_WDATA = {B1_WDATA_CMPL, B1DATA}; - assign PORT_A2_WDATA = {18{1'b1}}; - assign PORT_B2_WDATA = {D1_WDATA_CMPL, D1DATA}; - - end - endcase - - wire PORT_A1_CLK = CLK1; - wire PORT_A2_CLK = CLK2; - wire PORT_B1_CLK = CLK1; - wire PORT_B2_CLK = CLK2; - - wire PORT_A1_REN = A1EN; - wire PORT_A1_WEN = 1'b0; - wire [CFG_ENABLE_B-1:0] PORT_A1_BE = {PORT_A1_WEN,PORT_A1_WEN}; - - wire PORT_A2_REN = C1EN; - wire PORT_A2_WEN = 1'b0; - wire [CFG_ENABLE_D-1:0] PORT_A2_BE = {PORT_A2_WEN,PORT_A2_WEN}; - - wire PORT_B1_REN = 1'b0; - wire PORT_B1_WEN = B1EN[0]; - wire [CFG_ENABLE_B-1:0] PORT_B1_BE = {B1EN[1],B1EN[0]}; - - wire PORT_B2_REN = 1'b0; - wire PORT_B2_WEN = D1EN[0]; - wire [CFG_ENABLE_D-1:0] PORT_B2_BE = {D1EN[1],D1EN[0]}; - - TDP36K bram_2x18k ( - .WDATA_A1_i(PORT_A1_WDATA), - .RDATA_A1_o(PORT_A1_RDATA), - .ADDR_A1_i(PORT_A1_ADDR), - .CLK_A1_i(PORT_A1_CLK), - .REN_A1_i(PORT_A1_REN), - .WEN_A1_i(PORT_A1_WEN), - .BE_A1_i(PORT_A1_BE), - - .WDATA_A2_i(PORT_A2_WDATA), - .RDATA_A2_o(PORT_A2_RDATA), - .ADDR_A2_i(PORT_A2_ADDR), - .CLK_A2_i(PORT_A2_CLK), - .REN_A2_i(PORT_A2_REN), - .WEN_A2_i(PORT_A2_WEN), - .BE_A2_i(PORT_A2_BE), - - .WDATA_B1_i(PORT_B1_WDATA), - .RDATA_B1_o(PORT_B1_RDATA), - .ADDR_B1_i(PORT_B1_ADDR), - .CLK_B1_i(PORT_B1_CLK), - .REN_B1_i(PORT_B1_REN), - .WEN_B1_i(PORT_B1_WEN), - .BE_B1_i(PORT_B1_BE), - - .WDATA_B2_i(PORT_B2_WDATA), - .RDATA_B2_o(PORT_B2_RDATA), - .ADDR_B2_i(PORT_B2_ADDR), - .CLK_B2_i(PORT_B2_CLK), - .REN_B2_i(PORT_B2_REN), - .WEN_B2_i(PORT_B2_WEN), - .BE_B2_i(PORT_B2_BE), - - .FLUSH1_i(FLUSH1), - .FLUSH2_i(FLUSH2) - ); + input CLK1; + input CLK2; + + input [CFG_ABITS-1:0] A1ADDR; + output [CFG_DBITS-1:0] A1DATA; + input A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + input [CFG_DBITS-1:0] B1DATA; + input [CFG_ENABLE_B-1:0] B1EN; + + input [CFG_ABITS-1:0] C1ADDR; + output [CFG_DBITS-1:0] C1DATA; + input C1EN; + + input [CFG_ABITS-1:0] D1ADDR; + input [CFG_DBITS-1:0] D1DATA; + input [CFG_ENABLE_D-1:0] D1EN; + + wire FLUSH1; + wire FLUSH2; + + wire [13:CFG_ABITS] A1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] B1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] C1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + wire [13:CFG_ABITS] D1ADDR_CMPL = {14-CFG_ABITS{1'b0}}; + + wire [13:0] A1ADDR_TOTAL = {A1ADDR_CMPL, A1ADDR}; + wire [13:0] B1ADDR_TOTAL = {B1ADDR_CMPL, B1ADDR}; + wire [13:0] C1ADDR_TOTAL = {C1ADDR_CMPL, C1ADDR}; + wire [13:0] D1ADDR_TOTAL = {D1ADDR_CMPL, D1ADDR}; + + wire [17:CFG_DBITS] A1_RDATA_CMPL; + wire [17:CFG_DBITS] C1_RDATA_CMPL; + + wire [17:CFG_DBITS] B1_WDATA_CMPL; + wire [17:CFG_DBITS] D1_WDATA_CMPL; + + wire [13:0] PORT_A1_ADDR; + wire [13:0] PORT_A2_ADDR; + wire [13:0] PORT_B1_ADDR; + wire [13:0] PORT_B2_ADDR; + + case (CFG_DBITS) + 1: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL; + assign PORT_B1_ADDR = B1ADDR_TOTAL; + assign PORT_A2_ADDR = C1ADDR_TOTAL; + assign PORT_B2_ADDR = D1ADDR_TOTAL; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0 + }; + end + + 2: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 1; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 1; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 1; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 1; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0 + }; + end + + 4: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 2; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 2; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 2; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 2; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0 + }; + end + + 8, 9: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 3; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 3; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 3; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 3; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0 + }; + end + + 16, 18: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL << 4; + assign PORT_B1_ADDR = B1ADDR_TOTAL << 4; + assign PORT_A2_ADDR = C1ADDR_TOTAL << 4; + assign PORT_B2_ADDR = D1ADDR_TOTAL << 4; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0 + }; + end + + default: begin + assign PORT_A1_ADDR = A1ADDR_TOTAL; + assign PORT_B1_ADDR = B1ADDR_TOTAL; + assign PORT_A2_ADDR = D1ADDR_TOTAL; + assign PORT_B2_ADDR = C1ADDR_TOTAL; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 + }; + end + endcase + + assign FLUSH1 = 1'b0; + assign FLUSH2 = 1'b0; + + wire [17:0] PORT_A1_RDATA; + wire [17:0] PORT_B1_RDATA; + wire [17:0] PORT_A2_RDATA; + wire [17:0] PORT_B2_RDATA; + + wire [17:0] PORT_A1_WDATA; + wire [17:0] PORT_B1_WDATA; + wire [17:0] PORT_A2_WDATA; + wire [17:0] PORT_B2_WDATA; + + // Assign read/write data - handle special case for 9bit mode + // parity bit for 9bit mode is placed in R/W port on bit #16 + case (CFG_DBITS) + 9: begin + assign A1DATA = {PORT_A1_RDATA[16], PORT_A1_RDATA[7:0]}; + assign C1DATA = {PORT_A2_RDATA[16], PORT_A2_RDATA[7:0]}; + assign PORT_A1_WDATA = {18{1'b0}}; + assign PORT_B1_WDATA = {B1_WDATA_CMPL[17], B1DATA[8], B1_WDATA_CMPL[16:9], B1DATA[7:0]}; + assign PORT_A2_WDATA = {18{1'b0}}; + assign PORT_B2_WDATA = {D1_WDATA_CMPL[17], D1DATA[8], D1_WDATA_CMPL[16:9], D1DATA[7:0]}; + end + default: begin + assign A1DATA = PORT_A1_RDATA[CFG_DBITS-1:0]; + assign C1DATA = PORT_A2_RDATA[CFG_DBITS-1:0]; + assign PORT_A1_WDATA = {18{1'b1}}; + assign PORT_B1_WDATA = {B1_WDATA_CMPL, B1DATA}; + assign PORT_A2_WDATA = {18{1'b1}}; + assign PORT_B2_WDATA = {D1_WDATA_CMPL, D1DATA}; + + end + endcase + + wire PORT_A1_CLK = CLK1; + wire PORT_A2_CLK = CLK2; + wire PORT_B1_CLK = CLK1; + wire PORT_B2_CLK = CLK2; + + wire PORT_A1_REN = A1EN; + wire PORT_A1_WEN = 1'b0; + wire [CFG_ENABLE_B-1:0] PORT_A1_BE = {PORT_A1_WEN,PORT_A1_WEN}; + + wire PORT_A2_REN = C1EN; + wire PORT_A2_WEN = 1'b0; + wire [CFG_ENABLE_D-1:0] PORT_A2_BE = {PORT_A2_WEN,PORT_A2_WEN}; + + wire PORT_B1_REN = 1'b0; + wire PORT_B1_WEN = B1EN[0]; + wire [CFG_ENABLE_B-1:0] PORT_B1_BE = {B1EN[1],B1EN[0]}; + + wire PORT_B2_REN = 1'b0; + wire PORT_B2_WEN = D1EN[0]; + wire [CFG_ENABLE_D-1:0] PORT_B2_BE = {D1EN[1],D1EN[0]}; + + TDP36K bram_2x18k ( + .WDATA_A1_i(PORT_A1_WDATA), + .RDATA_A1_o(PORT_A1_RDATA), + .ADDR_A1_i(PORT_A1_ADDR), + .CLK_A1_i(PORT_A1_CLK), + .REN_A1_i(PORT_A1_REN), + .WEN_A1_i(PORT_A1_WEN), + .BE_A1_i(PORT_A1_BE), + + .WDATA_A2_i(PORT_A2_WDATA), + .RDATA_A2_o(PORT_A2_RDATA), + .ADDR_A2_i(PORT_A2_ADDR), + .CLK_A2_i(PORT_A2_CLK), + .REN_A2_i(PORT_A2_REN), + .WEN_A2_i(PORT_A2_WEN), + .BE_A2_i(PORT_A2_BE), + + .WDATA_B1_i(PORT_B1_WDATA), + .RDATA_B1_o(PORT_B1_RDATA), + .ADDR_B1_i(PORT_B1_ADDR), + .CLK_B1_i(PORT_B1_CLK), + .REN_B1_i(PORT_B1_REN), + .WEN_B1_i(PORT_B1_WEN), + .BE_B1_i(PORT_B1_BE), + + .WDATA_B2_i(PORT_B2_WDATA), + .RDATA_B2_o(PORT_B2_RDATA), + .ADDR_B2_i(PORT_B2_ADDR), + .CLK_B2_i(PORT_B2_CLK), + .REN_B2_i(PORT_B2_REN), + .WEN_B2_i(PORT_B2_WEN), + .BE_B2_i(PORT_B2_BE), + + .FLUSH1_i(FLUSH1), + .FLUSH2_i(FLUSH2) + ); endmodule (* blackbox *) @@ -1812,7 +1734,7 @@ module QL_DSP2_MULT ( // TODO: Name subject to change .b(b), .z(z), - .reset(reset), + .reset(reset), .f_mode(f_mode), @@ -1821,7 +1743,7 @@ module QL_DSP2_MULT ( // TODO: Name subject to change .unsigned_a(unsigned_a), .unsigned_b(unsigned_b), - .output_select(3'b0), // unregistered output: a * b (0) + .output_select(3'b0), // unregistered output: a * b (0) .register_inputs(1'b0) // unregistered inputs ); endmodule @@ -1866,9 +1788,9 @@ module QL_DSP2_MULT_REGIN ( // TODO: Name subject to change .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(3'b0), // unregistered output: a * b (0) + .output_select(3'b0), // unregistered output: a * b (0) .register_inputs(1'b1) // registered inputs ); endmodule @@ -1912,9 +1834,9 @@ module QL_DSP2_MULT_REGOUT ( // TODO: Name subject to change .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(3'b100), // registered output: a * b (4) + .output_select(3'b100), // registered output: a * b (4) .register_inputs(1'b0) // unregistered inputs ); endmodule @@ -1958,9 +1880,9 @@ module QL_DSP2_MULT_REGIN_REGOUT ( // TODO: Name subject to change .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(3'b100), // registered output: a * b (4) + .output_select(3'b100), // registered output: a * b (4) .register_inputs(1'b1) // registered inputs ); endmodule @@ -2010,9 +1932,9 @@ module QL_DSP2_MULTADD ( .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(output_select), // unregistered output: ACCin (2, 3) + .output_select(output_select), // unregistered output: ACCin (2, 3) .subtract(subtract), .register_inputs(1'b0) // unregistered inputs ); @@ -2062,9 +1984,9 @@ module QL_DSP2_MULTADD_REGIN ( .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(output_select), // unregistered output: ACCin (2, 3) + .output_select(output_select), // unregistered output: ACCin (2, 3) .subtract(subtract), .register_inputs(1'b1) // registered inputs ); @@ -2114,9 +2036,9 @@ module QL_DSP2_MULTADD_REGOUT ( .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(output_select), // registered output: ACCin (6, 7) + .output_select(output_select), // registered output: ACCin (6, 7) .subtract(subtract), .register_inputs(1'b0) // unregistered inputs ); @@ -2166,9 +2088,9 @@ module QL_DSP2_MULTADD_REGIN_REGOUT ( .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(output_select), // registered output: ACCin (6, 7) + .output_select(output_select), // registered output: ACCin (6, 7) .subtract(subtract), .register_inputs(1'b1) // registered inputs ); @@ -2212,8 +2134,8 @@ module QL_DSP2_MULTACC ( .f_mode(f_mode), - .feedback(feedback), - .load_acc(load_acc), + .feedback(feedback), + .load_acc(load_acc), .unsigned_a(unsigned_a), .unsigned_b(unsigned_b), @@ -2221,7 +2143,7 @@ module QL_DSP2_MULTACC ( .clk(clk), .reset(reset), - .output_select(1'b1), // unregistered output: ACCout (1) + .output_select(1'b1), // unregistered output: ACCout (1) .subtract(subtract), .register_inputs(1'b0) // unregistered inputs ); @@ -2271,9 +2193,9 @@ module QL_DSP2_MULTACC_REGIN ( .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(1'b1), // unregistered output: ACCout (1) + .output_select(1'b1), // unregistered output: ACCout (1) .subtract(subtract), .register_inputs(1'b1) // registered inputs ); @@ -2317,15 +2239,15 @@ module QL_DSP2_MULTACC_REGOUT ( .f_mode(f_mode), .feedback(feedback), - .load_acc(load_acc), + .load_acc(load_acc), .unsigned_a(unsigned_a), .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(3'b101), // registered output: ACCout (5) + .output_select(3'b101), // registered output: ACCout (5) .subtract(subtract), .register_inputs(1'b0) // unregistered inputs ); @@ -2375,9 +2297,9 @@ module QL_DSP2_MULTACC_REGIN_REGOUT ( .unsigned_b(unsigned_b), .clk(clk), - .reset(reset), + .reset(reset), - .output_select(3'b101), // registered output: ACCout (5) + .output_select(3'b101), // registered output: ACCout (5) .subtract(subtract), .register_inputs(1'b1) // registered inputs ); diff --git a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v index 273f28e14..fe665fa47 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v @@ -14,566 +14,94 @@ // // SPDX-License-Identifier: Apache-2.0 -// Basic DFF - +// DFF, no set/reset, no enable module \$_DFF_P_ (D, C, Q); - input D; - input C; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(1'b1)); -endmodule - -// Async reset -module \$_DFF_PP0_ (D, C, R, Q); - input D; - input C; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(1'b1)); -endmodule - -// Async reset -module \$_DFF_PN0_ (D, C, R, Q); - input D; - input C; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(1'b1)); -endmodule - -// Async set -module \$_DFF_PP1_ (D, C, R, Q); - input D; - input C; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(!R)); -endmodule - -// Async set -module \$_DFF_PN1_ (D, C, R, Q); - input D; - input C; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(R)); -endmodule - -module \$_DFFE_PP_ (D, C, E, Q); - input D; - input C; - input E; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(1'b1)); -endmodule - -module \$_DFFE_PN_ (D, C, E, Q); - input D; - input C; - input E; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(1'b1)); -endmodule - -// Async reset, enable -module \$_DFFE_PP0P_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(1'b1)); -endmodule - -module \$_DFFE_PP0N_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(1'b1)); -endmodule - -module \$_DFFE_PN0P_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1)); -endmodule - -module \$_DFFE_PN0N_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(1'b1)); -endmodule -// Async set, enable - -module \$_DFFE_PP1P_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(!R)); -endmodule - -module \$_DFFE_PP1N_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(!R)); -endmodule - -module \$_DFFE_PN1P_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R)); -endmodule - -module \$_DFFE_PN1N_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(R)); -endmodule - -// Async set & reset - -module \$_DFFSR_PPP_ (D, C, R, S, Q); - input D; - input C; - input R; - input S; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(!S)); -endmodule - -module \$_DFFSR_PNP_ (D, Q, C, R, S); - input D; - input C; - input R; - input S; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(S)); -endmodule - -module \$_DFFSR_PNN_ (D, Q, C, R, S); - input D; - input C; - input R; - input S; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(S)); -endmodule - -module \$_DFFSR_PPN_ (D, Q, C, R, S); - input D; - input C; - input R; - input S; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(!S)); -endmodule - -module \$_DFFSR_NPP_ (D, Q, C, R, S); - input D; - input C; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(!S)); -endmodule - -module \$_DFFSR_NNP_ (D, Q, C, R, S); - input D; - input C; - input R; - input S; + input D; + input C; output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(S)); + dff _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q)); endmodule -module \$_DFFSR_NNN_ (D, Q, C, R, S); - input D; - input C; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(S)); -endmodule - -module \$_DFFSR_NPN_ (D, Q, C, R, S); - input D; - input C; - input R; - input S; +module \$_DFF_N_ (D, C, Q); + input D; + input C; output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(!S)); + dffn _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q)); endmodule -// Async set, reset & enable - -module \$_DFFSRE_PPPP_ (D, Q, C, E, R, S); - input D; - input C; - input E; - input R; - input S; +// DFF, asynchronous set/reset, enable +module \$_DFFSRE_PNNP_ (C, S, R, E, D, Q); + input C; + input S; + input R; + input E; + input D; output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(!S)); + dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S)); endmodule -module \$_DFFSRE_PNPP_ (D, Q, C, E, R, S); - input D; - input C; - input E; - input R; - input S; +module \$_DFFSRE_NNNP_ (C, S, R, E, D, Q); + input C; + input S; + input R; + input E; + input D; output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(S)); + dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S)); endmodule -module \$_DFFSRE_PPNP_ (D, Q, C, E, R, S); - input D; - input C; - input E; - input R; - input S; +// DFF, synchronous set or reset, enable +module \$_SDFFE_PN0P_ (D, C, R, E, Q); + input D; + input C; + input R; + input E; output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(!S)); + sdffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1)); endmodule -module \$_DFFSRE_PNNP_ (D, Q, C, E, R, S); - input D; - input C; - input E; - input R; - input S; +module \$_SDFFE_PN1P_ (D, C, R, E, Q); + input D; + input C; + input R; + input E; output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S)); + sdffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R)); endmodule -module \$_DFFSRE_PPPN_ (D, Q, C, E, R, S); - input D; - input C; - input E; - input R; - input S; +module \$_SDFFE_NN0P_ (D, C, R, E, Q); + input D; + input C; + input R; + input E; output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(!S)); + sdffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1)); endmodule -module \$_DFFSRE_PNPN_ (D, Q, C, E, R, S); - input D; - input C; - input E; - input R; - input S; +module \$_SDFFE_NN1P_ (D, C, R, E, Q); + input D; + input C; + input R; + input E; output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(S)); + sdffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R)); endmodule -module \$_DFFSRE_PPNN_ (D, Q, C, E, R, S); - input D; - input C; - input E; - input R; - input S; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(!S)); +// Latch, no set/reset, no enable +module \$_DLATCH_P_ (input E, D, output Q); + latch _TECHMAP_REPLACE_ (.D(D), .Q(Q), .G(E)); endmodule -module \$_DFFSRE_PNNN_ (D, Q, C, E, R, S); - input D; - input C; - input E; - input R; - input S; - output Q; - dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(S)); +module \$_DLATCH_N_ (input E, D, output Q); + latchn _TECHMAP_REPLACE_ (.D(D), .Q(Q), .G(E)); endmodule -// Latch with async set and reset +// Latch with async set and reset and enable module \$_DLATCHSR_PPP_ (input E, S, R, D, output Q); - latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S)); + latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S)); endmodule module \$_DLATCHSR_NPP_ (input E, S, R, D, output Q); latchnsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S)); endmodule -// The following techmap operation are not performed right now -// as Negative edge FF are not legalized in synth_quicklogic for qlf_k6n10 -// but in case we implement clock inversion in the future, the support is ready for it. - -module \$_DFF_N_ (D, C, Q); - input D; - input C; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(1'b1)); -endmodule - -module \$_DFF_NP0_ (D, C, R, Q); - input D; - input C; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(!R), .S(1'b1)); -endmodule - -module \$_DFF_NN0_ (D, C, R, Q); - input D; - input C; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(R), .S(1'b1)); -endmodule - -module \$_DFF_NP1_ (D, C, R, Q); - input D; - input C; - input R; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(!R)); -endmodule - -module \$_DFF_NN1_ (D, C, R, Q); - input D; - input C; - input R; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(1'b1), .R(1'b1), .S(R)); -endmodule - -module \$_DFFE_NP_ (D, C, E, Q); - input D; - input C; - input E; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(1'b1)); -endmodule - -module \$_DFFE_NN_ (D, C, E, Q); - input D; - input C; - input E; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(1'b1)); -endmodule - -module \$_DFFE_NP0P_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(1'b1)); -endmodule - -module \$_DFFE_NP0N_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(1'b1)); -endmodule - -module \$_DFFE_NN0P_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1)); -endmodule - -module \$_DFFE_NN0N_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(1'b1)); -endmodule - -module \$_DFFE_NP1P_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(!R)); -endmodule - -module \$_DFFE_NP1N_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(!R)); -endmodule - -module \$_DFFE_NN1P_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R)); -endmodule - -module \$_DFFE_NN1N_ (D, C, E, R, Q); - input D; - input C; - input E; - input R; - output Q; - parameter _TECHMAP_WIREINIT_Q_ = 1'bx; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(1'b1), .S(R)); -endmodule - -module \$_DFFSRE_NPPP_ (D, C, E, R, S, Q); - input D; - input C; - input E; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(!S)); -endmodule - -module \$_DFFSRE_NNPP_ (D, C, E, R, S, Q); - input D; - input C; - input E; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(!R), .S(S)); -endmodule - -module \$_DFFSRE_NPNP_ (D, C, E, R, S, Q); - input D; - input C; - input E; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(!S)); -endmodule - -module \$_DFFSRE_NNNP_ (D, C, E, R, S, Q); - input D; - input C; - input E; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S)); -endmodule - - -module \$_DFFSRE_NPPN_ (D, C, E, R, S, Q); - input D; - input C; - input E; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(!S)); -endmodule - -module \$_DFFSRE_NNPN_ (D, C, E, R, S, Q); - input D; - input C; - input E; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(!R), .S(S)); -endmodule - -module \$_DFFSRE_NPNN_ (D, C, E, R, S, Q); - input D; - input C; - input E; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(!S)); -endmodule - -module \$_DFFSRE_NNNN_ (D, C, E, R, S, Q); - input D; - input C; - input E; - input R; - input S; - output Q; - dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(!E), .R(R), .S(S)); -endmodule - -module \$__SHREG_DFF_P_ (D, Q, C); - input D; - input C; - output Q; - - parameter DEPTH = 2; - reg [DEPTH-2:0] q; - genvar i; - generate for (i = 0; i < DEPTH; i = i + 1) begin: slice - - - // First in chain - generate if (i == 0) begin - sh_dff #() shreg_beg ( - .Q(q[i]), - .D(D), - .C(C) - ); - end endgenerate - // Middle in chain - generate if (i > 0 && i != DEPTH-1) begin - sh_dff #() shreg_mid ( - .Q(q[i]), - .D(q[i-1]), - .C(C) - ); - end endgenerate - // Last in chain - generate if (i == DEPTH-1) begin - sh_dff #() shreg_end ( - .Q(Q), - .D(q[i-1]), - .C(C) - ); - end endgenerate - end: slice - endgenerate - -endmodule - From cbc6ed90d8b6e80f7e299e4308df02fe3089592b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 13 Jun 2022 14:59:14 +0200 Subject: [PATCH 798/845] Fixed simulation model for sh_dff, added missing techmap for _SHREG_DFF_P_ Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 6 ++-- ql-qlf-plugin/qlf_k6n10f/ffs_map.v | 41 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index ded97d4ee..5da2aaea4 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -23,11 +23,11 @@ module sh_dff( (* clkbuf_sink *) input wire C ); - parameter [0:0] INIT = 1'b0; - initial Q = INIT; + initial Q <= 1'b0; always @(posedge C) - Q <= D; + Q <= D; + endmodule (* abc9_box, lib_blackbox *) diff --git a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v index fe665fa47..c510457c5 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v @@ -105,3 +105,44 @@ module \$_DLATCHSR_NPP_ (input E, S, R, D, output Q); latchnsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S)); endmodule +module \$__SHREG_DFF_P_ (D, Q, C); + input D; + input C; + output Q; + + parameter DEPTH = 2; + + reg [DEPTH-2:0] q; + + genvar i; + generate for (i = 0; i < DEPTH; i = i + 1) begin: slice + + // First in chain + generate if (i == 0) begin + sh_dff #() shreg_beg ( + .Q(q[i]), + .D(D), + .C(C) + ); + end endgenerate + // Middle in chain + generate if (i > 0 && i != DEPTH-1) begin + sh_dff #() shreg_mid ( + .Q(q[i]), + .D(q[i-1]), + .C(C) + ); + end endgenerate + // Last in chain + generate if (i == DEPTH-1) begin + sh_dff #() shreg_end ( + .Q(Q), + .D(q[i-1]), + .C(C) + ); + end endgenerate + end: slice + endgenerate + +endmodule + From ea77252124896782211f8dde409a4b700725818f Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 13 Jun 2022 15:00:18 +0200 Subject: [PATCH 799/845] Updated tests for sh_dff and regular flip-flops, disabled latchsr tests as Yosys does not infer them currently. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/tests/dffs/dffs.tcl | 386 ++++++++++++++++++------------ ql-qlf-plugin/tests/dffs/dffs.v | 185 +++++++++++++- 2 files changed, 411 insertions(+), 160 deletions(-) diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index d98476ae7..f589661ec 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -5,6 +5,9 @@ yosys -import ;# ingest plugin commands read_verilog $::env(DESIGN_TOP).v design -save read +# ============================================================================= +# qlf_k4n8 + # DFF hierarchy -top my_dff yosys proc @@ -157,7 +160,9 @@ select -assert-count 1 t:\$lut design -reset -# DFF on qlf_k6n10 device +# ============================================================================= +# qlf_k6n10 + read_verilog $::env(DESIGN_TOP).v design -save read @@ -406,7 +411,9 @@ select -assert-count 3 t:\$lut design -reset -# DFF on qlf_k6n10f device +# ============================================================================= +# qlf_k6n10f + read_verilog $::env(DESIGN_TOP).v design -save read @@ -417,237 +424,302 @@ equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_qui design -load postopt yosys cd my_dff stat -select -assert-count 1 t:dffsre +select -assert-count 1 t:dff -# DFFR (posedge RST) +# DFFN design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffr_p -yosys cd my_dffr_p +hierarchy -top my_dffn +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffn +design -load postopt +yosys cd my_dffn stat -select -assert-count 1 t:dffsre +select -assert-count 1 t:dffn -# DFFR (posedge RST) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffr_p_2 -yosys cd my_dffr_p_2 -stat -select -assert-count 2 t:dffsre -# DFFR (negedge RST) +# DFFSRE from DFFR_N design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffr_n +hierarchy -top my_dffr_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffr_n +design -load postopt yosys cd my_dffr_n stat select -assert-count 1 t:dffsre -#DFFRE (posedge RST) +# DFFSRE from DFFR_P design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffre_p -yosys cd my_dffre_p +hierarchy -top my_dffr_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffr_p +design -load postopt +yosys cd my_dffr_p stat select -assert-count 1 t:dffsre select -assert-count 1 t:\$lut -#DFFRE (negedge RST) +# DFFSRE from DFFRE_N design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffre_n +hierarchy -top my_dffre_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffre_n +design -load postopt yosys cd my_dffre_n stat select -assert-count 1 t:dffsre -# DFFS (posedge SET) +# DFFSRE from DFFRE_P design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffs_p -yosys cd my_dffs_p +hierarchy -top my_dffre_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffre_p +design -load postopt +yosys cd my_dffre_p stat select -assert-count 1 t:dffsre select -assert-count 1 t:\$lut -# DFFS (negedge SET) + +# DFFSRE from DFFS_N design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffs_n +hierarchy -top my_dffs_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffs_n +design -load postopt yosys cd my_dffs_n stat select -assert-count 1 t:dffsre -# DFFSE (posedge SET) +# DFFSRE from DFFS_P design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffse_p -yosys cd my_dffse_p +hierarchy -top my_dffs_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffs_p +design -load postopt +yosys cd my_dffs_p stat select -assert-count 1 t:dffsre select -assert-count 1 t:\$lut -# DFFSE (negedge SET) +# DFFSRE from DFFSE_N design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffse_n +hierarchy -top my_dffse_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffse_n +design -load postopt yosys cd my_dffse_n stat select -assert-count 1 t:dffsre -# DFFN -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffn -yosys cd my_dffn -stat -select -assert-count 1 t:dffnsre - -# DFFNR (negedge CLK posedge RST) +# DFFSRE from DFFSE_P design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffnr_p -yosys cd my_dffnr_p +hierarchy -top my_dffse_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffse_p +design -load postopt +yosys cd my_dffse_p stat -select -assert-count 1 t:dffnsre +select -assert-count 1 t:dffsre select -assert-count 1 t:\$lut -# DFFNR (negedge CLK negedge RST) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffnr_n -yosys cd my_dffnr_n -stat -select -assert-count 1 t:dffnsre - -# DFFNS (negedge CLK posedge SET) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffns_p -yosys cd my_dffns_p -stat -select -assert-count 1 t:dffnsre -select -assert-count 1 t:\$lut -# DFFS (negedge CLK negedge SET) +# SDFFSRE from SDFFR_N design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffns_n -yosys cd my_dffns_n +hierarchy -top my_sdffr_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_sdffr_n +design -load postopt +yosys cd my_sdffr_n stat -select -assert-count 1 t:dffnsre +select -assert-count 1 t:sdffsre -# DFFSR (posedge CLK posedge SET posedge RST) +# SDFFSRE from SDFFR_P design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsr_ppp -yosys cd my_dffsr_ppp +hierarchy -top my_sdffr_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_sdffr_p +design -load postopt +yosys cd my_sdffr_p stat -select -assert-count 1 t:dffsre -select -assert-count 2 t:\$lut +select -assert-count 1 t:sdffsre +select -assert-count 1 t:\$lut -# DFFSR (posedge CLK negedge SET posedge RST) +# SDFFSRE from SDFFS_N design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsr_pnp -yosys cd my_dffsr_pnp +hierarchy -top my_sdffs_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_sdffs_n +design -load postopt +yosys cd my_sdffs_n stat -select -assert-count 1 t:dffsre -select -assert-count 2 t:\$lut +select -assert-count 1 t:sdffsre -# DFFSR (posedge CLK posedge SET negedge RST) +# SDFFSRE from SDFFS_P design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsr_ppn -yosys cd my_dffsr_ppn +hierarchy -top my_sdffs_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_sdffs_p +design -load postopt +yosys cd my_sdffs_p stat -select -assert-count 1 t:dffsre +select -assert-count 1 t:sdffsre select -assert-count 1 t:\$lut -# DFFSR (posedge CLK negedge SET negedge RST) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsr_pnn -yosys cd my_dffsr_pnn -stat -select -assert-count 1 t:dffsre - -# DFFSR (negedge CLK posedge SET posedge RST) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsr_npp -yosys cd my_dffsr_npp -stat -select -assert-count 1 t:dffnsre -select -assert-count 2 t:\$lut -# DFFSR (negedge CLK negedge SET posedge RST) +# SDFFNSRE from SDFFNR_N design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsr_nnp -yosys cd my_dffsr_nnp +hierarchy -top my_sdffnr_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_sdffnr_n +design -load postopt +yosys cd my_sdffnr_n stat -select -assert-count 1 t:dffnsre -select -assert-count 2 t:\$lut +select -assert-count 1 t:sdffnsre -# DFFSR (negedge CLK posedge SET negedge RST) +# SDFFNSRE from SDFFRN_P design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsr_npn -yosys cd my_dffsr_npn +hierarchy -top my_sdffnr_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_sdffnr_p +design -load postopt +yosys cd my_sdffnr_p stat -select -assert-count 1 t:dffnsre +select -assert-count 1 t:sdffnsre select -assert-count 1 t:\$lut -# DFFSR (negedge CLK negedge SET negedge RST) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsr_nnn -yosys cd my_dffsr_nnn -stat -select -assert-count 1 t:dffnsre - -# DFFSRE (posedge CLK posedge SET posedge RST) +# SDFFNSRE from SDFFNS_N design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsre_ppp -yosys cd my_dffsre_ppp -stat -select -assert-count 1 t:dffsre -select -assert-count 2 t:\$lut - -# DFFSRE (posedge CLK negedge SET posedge RST) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsre_pnp -yosys cd my_dffsre_pnp +hierarchy -top my_sdffns_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_sdffns_n +design -load postopt +yosys cd my_sdffns_n stat -select -assert-count 1 t:dffsre -select -assert-count 2 t:\$lut +select -assert-count 1 t:sdffnsre -# DFFSRE (posedge CLK posedge SET negedge RST) +# SDFFSRE from SDFFNS_P design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsre_ppn -yosys cd my_dffsre_ppn +hierarchy -top my_sdffns_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_sdffns_p +design -load postopt +yosys cd my_sdffns_p stat -select -assert-count 1 t:dffsre +select -assert-count 1 t:sdffnsre select -assert-count 1 t:\$lut -# DFFSRE (posedge CLK negedge SET negedge RST) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsre_pnn -yosys cd my_dffsre_pnn -stat -select -assert-count 1 t:dffsre -# DFFSRE (negedge CLK posedge SET posedge RST) +# LATCH design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsre_npp -yosys cd my_dffsre_npp -stat -select -assert-count 1 t:dffnsre -select -assert-count 2 t:\$lut - -# DFFSRE (negedge CLK negedge SET posedge RST) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsre_nnp -yosys cd my_dffsre_nnp +hierarchy -top my_latch +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latch +design -load postopt +yosys cd my_latch stat -select -assert-count 1 t:dffnsre -select -assert-count 2 t:\$lut +select -assert-count 1 t:latch -# DFFSRE (negedge CLK posedge SET negedge RST) +# LATCHN design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsre_npn -yosys cd my_dffsre_npn -stat -select -assert-count 1 t:dffnsre -select -assert-count 1 t:\$lut +hierarchy -top my_latchn +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchn +design -load postopt +yosys cd my_latchn +stat +select -assert-count 1 t:latchn + + +## LATCHSRE from LATCHR_N +#design -load read +#hierarchy -top my_latchr_n +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchr_n +#design -load postopt +#yosys cd my_latchr_n +#stat +#select -assert-count 1 t:latchr_n +# +## LATCHSRE from LATCHR_P +#design -load read +#hierarchy -top my_latchr_p +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchr_p +#design -load postopt +#yosys cd my_latchr_p +#stat +#select -assert-count 1 t:latchr_p +#select -assert-count 1 t:\$lut +# +## LATCHSRE from LATCHS_N +#design -load read +#hierarchy -top my_latchs_n +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchs_n +#design -load postopt +#yosys cd my_latchs_n +#stat +#select -assert-count 1 t:latchs_n +# +## LATCHSRE from LATCHS_P +#design -load read +#hierarchy -top my_latchs_p +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchs_p +#design -load postopt +#yosys cd my_latchs_p +#stat +#select -assert-count 1 t:latchs_p +#select -assert-count 1 t:\$lut +# +# +## LATCHSRE from LATCHNR_N +#design -load read +#hierarchy -top my_latchnr_n +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchnr_n +#design -load postopt +#yosys cd my_latchnr_n +#stat +#select -assert-count 1 t:latchnr_n +# +## LATCHSRE from LATCHNR_P +#design -load read +#hierarchy -top my_latchnr_p +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchnr_p +#design -load postopt +#yosys cd my_latchnr_p +#stat +#select -assert-count 1 t:latchnr_p +#select -assert-count 1 t:\$lut +# +## LATCHSRE from LATCHNS_N +#design -load read +#hierarchy -top my_latchns_n +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchns_n +#design -load postopt +#yosys cd my_latchns_n +#stat +#select -assert-count 1 t:latchns_n +# +## LATCHSRE from LATCHNS_P +#design -load read +#hierarchy -top my_latchns_p +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchns_p +#design -load postopt +#yosys cd my_latchns_p +#stat +#select -assert-count 1 t:latchns_p +#select -assert-count 1 t:\$lut -# DFFSRE (negedge CLK negedge SET negedge RST) -design -load read -synth_quicklogic -family qlf_k6n10f -top my_dffsre_nnn -yosys cd my_dffsre_nnn -stat -select -assert-count 1 t:dffnsre design -reset +# ============================================================================= + # DFF on pp3 device design -reset @@ -720,11 +792,11 @@ select -assert-none t:LUT1 t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad # DFFS (posedge, sync set) design -load read -hierarchy -top my_dffs_clk_p +hierarchy -top my_sdffs_p yosys proc -equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_dffs_clk_p +equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_sdffs_p design -load postopt -yosys cd my_dffs_clk_p +yosys cd my_sdffs_p stat select -assert-count 1 t:LUT2 select -assert-count 1 t:dffepc @@ -738,11 +810,11 @@ select -assert-none t:LUT2 t:dffepc t:logic_0 t:logic_1 t:inpad t:outpad t:ckpad # DFFS (negedge, sync reset) design -load read -hierarchy -top my_dffs_clk_n +hierarchy -top my_sdffns_p yosys proc -equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_dffs_clk_n +equiv_opt -async2sync -assert -map +/quicklogic/pp3/cells_sim.v synth_quicklogic -family pp3 -top my_sdffns_p design -load postopt -yosys cd my_dffs_clk_n +yosys cd my_sdffns_p stat select -assert-count 1 t:LUT1 select -assert-count 1 t:LUT2 diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/ql-qlf-plugin/tests/dffs/dffs.v index 1963344d7..e29b7f341 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.v +++ b/ql-qlf-plugin/tests/dffs/dffs.v @@ -434,7 +434,19 @@ module my_dffsre_nnn ( else if (en) q <= d; endmodule -module my_dffs_clk_p ( +module my_sdffr_n ( + input d, + clk, + clr, + output reg q +); + initial q <= 0; + always @(posedge clk) + if (!clr) q <= 1'b0; + else q <= d; +endmodule + +module my_sdffs_n ( input d, clk, pre, @@ -442,11 +454,11 @@ module my_dffs_clk_p ( ); initial q <= 0; always @(posedge clk) - if (pre) q <= 1'b1; + if (!pre) q <= 1'b1; else q <= d; endmodule -module my_dffs_clk_n ( +module my_sdffnr_n ( input d, clk, clr, @@ -458,3 +470,170 @@ module my_dffs_clk_n ( else q <= d; endmodule +module my_sdffns_n( + input d, + clk, + pre, + output reg q +); + initial q <= 0; + always @(negedge clk) + if (!pre) q <= 1'b1; + else q <= d; +endmodule + +module my_sdffr_p ( + input d, + clk, + clr, + output reg q +); + initial q <= 0; + always @(posedge clk) + if (clr) q <= 1'b0; + else q <= d; +endmodule + +module my_sdffs_p ( + input d, + clk, + pre, + output reg q +); + initial q <= 0; + always @(posedge clk) + if (pre) q <= 1'b1; + else q <= d; +endmodule + +module my_sdffnr_p ( + input d, + clk, + clr, + output reg q +); + initial q <= 0; + always @(negedge clk) + if (clr) q <= 1'b0; + else q <= d; +endmodule + +module my_sdffns_p ( + input d, + clk, + pre, + output reg q +); + initial q <= 0; + always @(negedge clk) + if (pre) q <= 1'b1; + else q <= d; +endmodule + + +module my_latch ( + input wire d, g, + output reg q +); + always @(*) + if (g) q <= d; +endmodule + +module my_latchn ( + input wire d, g, + output reg q +); + always @(*) + if (!g) q <= d; +endmodule + + +module my_latchs_p ( + input wire d, g, s, + output reg q +); + always @(*) + if (s) + q <= 1'b1; + else if (g) + q <= d; +endmodule + +module my_latchs_n ( + input wire d, g, s, + output reg q +); + always @(*) + if (!s) + q <= 1'b1; + else if (g) + q <= d; +endmodule + +module my_latchr_p ( + input wire d, g, r, + output reg q +); + always @(*) + if (r) + q <= 1'b0; + else if (g) + q <= d; +endmodule + +module my_latchr_n ( + input wire d, g, r, + output reg q +); + always @(*) + if (!r) + q <= 1'b0; + else if (g) + q <= d; +endmodule + + +module my_latchns_p ( + input wire d, g, s, + output reg q +); + always @(*) + if (s) + q <= 1'b1; + else if (!g) + q <= d; +endmodule + +module my_latchns_n ( + input wire d, g, s, + output reg q +); + always @(*) + if (!s) + q <= 1'b1; + else if (!g) + q <= d; +endmodule + +module my_latchnr_p ( + input wire d, g, r, + output reg q +); + always @(*) + if (r) + q <= 1'b0; + else if (!g) + q <= d; +endmodule + +module my_latchnr_n ( + input wire d, g, r, + output reg q +); + always @(*) + if (!r) + q <= 1'b0; + else if (!g) + q <= d; +endmodule + From 16dabb0f92e3a1492e06c0d8a3753de7a948f063 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 22 Jun 2022 13:25:50 +0200 Subject: [PATCH 800/845] Removed emission of dff/dffn and latch/latchn. Replaced those with sdffsre/sdffnsre and latchsre/latchnsre respectively. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 54 ---------------------------- ql-qlf-plugin/qlf_k6n10f/ffs_map.v | 19 ++-------- ql-qlf-plugin/synth_quicklogic.cc | 5 ++- ql-qlf-plugin/tests/dffs/dffs.tcl | 8 ++--- 4 files changed, 10 insertions(+), 76 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index 5da2aaea4..feeb46b81 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -125,34 +125,6 @@ module frac_lut6( endmodule -(* abc9_flop, lib_whitebox *) -module dff( - output reg Q, - input wire D, - (* clkbuf_sink *) - input wire C -); - initial Q <= 1'b0; - - always @(posedge C) - Q <= D; - -endmodule - -(* abc9_flop, lib_whitebox *) -module dffn( - output reg Q, - input wire D, - (* clkbuf_sink *) - input wire C -); - initial Q <= 1'b0; - - always @(negedge C) - Q <= D; - -endmodule - (* abc9_flop, lib_whitebox *) module dffsre( output reg Q, @@ -241,32 +213,6 @@ module sdffnsre( endmodule -(* abc9_flop, lib_whitebox *) -module latch ( - output reg Q, - input wire D, - input wire G -); - initial Q <= 1'b0; - - always @(G) - if (G) Q <= D; - -endmodule - -(* abc9_flop, lib_whitebox *) -module latchn ( - output reg Q, - input wire D, - input wire G -); - initial Q <= 1'b0; - - always @(G) - if (!G) Q <= D; - -endmodule - (* abc9_flop, lib_whitebox *) module latchsre ( output reg Q, diff --git a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v index c510457c5..26fa6ed36 100644 --- a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/ffs_map.v @@ -14,21 +14,6 @@ // // SPDX-License-Identifier: Apache-2.0 -// DFF, no set/reset, no enable -module \$_DFF_P_ (D, C, Q); - input D; - input C; - output Q; - dff _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q)); -endmodule - -module \$_DFF_N_ (D, C, Q); - input D; - input C; - output Q; - dffn _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q)); -endmodule - // DFF, asynchronous set/reset, enable module \$_DFFSRE_PNNP_ (C, S, R, E, D, Q); input C; @@ -89,11 +74,11 @@ endmodule // Latch, no set/reset, no enable module \$_DLATCH_P_ (input E, D, output Q); - latch _TECHMAP_REPLACE_ (.D(D), .Q(Q), .G(E)); + latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(1'b1), .S(1'b1)); endmodule module \$_DLATCH_N_ (input E, D, output Q); - latchn _TECHMAP_REPLACE_ (.D(D), .Q(Q), .G(E)); + latchnsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(1'b1), .S(1'b1)); endmodule // Latch with async set and reset and enable diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 4c9e6fc0e..16dd36c05 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -363,7 +363,10 @@ struct SynthQuickLogicPass : public ScriptPass { // $_DLATCH_SRPPP_ 0"); } else if (family == "qlf_k6n10f") { run("shregmap -minlen 8 -maxlen 20"); - run("dfflegalize -cell $_DFF_?_ 0 -cell $_DFFSRE_?NNP_ 0 -cell $_SDFFE_?N?P_ 0 -cell $_DLATCH_?_ 0 -cell $_DLATCHSR_?NN_ 0"); + // FIXME: dfflegalize seems to leave $_DLATCH_[NP]_ even if it + // is not allowed. So we allow them and map them later to + // $_DLATCHSR_[NP]NN_. + run("dfflegalize -cell $_DFFSRE_?NNP_ 0 -cell $_SDFFE_?N?P_ 0 -cell $_DLATCHSR_?NN_ 0 -cell $_DLATCH_?_ 0"); } else if (family == "pp3") { run("dfflegalize -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_?_ x"); run("techmap -map +/quicklogic/" + family + "/cells_map.v"); diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index f589661ec..fd75277df 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -424,7 +424,7 @@ equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_qui design -load postopt yosys cd my_dff stat -select -assert-count 1 t:dff +select -assert-count 1 t:sdffsre # DFFN design -load read @@ -434,7 +434,7 @@ equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_qui design -load postopt yosys cd my_dffn stat -select -assert-count 1 t:dffn +select -assert-count 1 t:sdffnsre # DFFSRE from DFFR_N @@ -617,7 +617,7 @@ equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_qui design -load postopt yosys cd my_latch stat -select -assert-count 1 t:latch +select -assert-count 1 t:latchsre # LATCHN design -load read @@ -627,7 +627,7 @@ equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_qui design -load postopt yosys cd my_latchn stat -select -assert-count 1 t:latchn +select -assert-count 1 t:latchnsre ## LATCHSRE from LATCHR_N From 7376359820a26dadd5eeaa9dc3cf6ce21bdde622 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 22 Jun 2022 16:00:16 +0200 Subject: [PATCH 801/845] Revert "Check for minimal int size" This reverts commit 400824259d7d2cd499dcd27a4f20e10913b5630e. --- systemverilog-plugin/UhdmAst.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 5f13f8f97..4053dc3b0 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1115,8 +1115,7 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) // yosys is assuming that int/uint is 32 bit, so we are setting here correct size // NOTE: it *shouldn't* break on explicite 64 bit const values, as they *should* be handled // above by vpi*StrVal - // FIXME: Minimal int size should be resolved in UHDM, here we make sure it is at least 32 - if (size == 64 || size < 32) { + if (size == 64) { size = 32; is_signed = true; } From 2a1cf5c2dde3f850bbfc9b279a05db490504200f Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Fri, 24 Jun 2022 12:38:17 +0200 Subject: [PATCH 802/845] Code review fixes Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 4053dc3b0..9ed51563c 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1356,8 +1356,7 @@ void UhdmAst::move_type_to_new_typedef(AST::AstNode *current_node, AST::AstNode wire_node->children.push_back(type_node->children[0]->children[1]->clone()); } else { // Add default range - auto range = make_range(31, 0); - wire_node->children.push_back(range); + wire_node->children.push_back(make_range(31, 0)); } typedef_node->children.push_back(wire_node); current_node->children.push_back(type_node); @@ -1873,10 +1872,7 @@ void UhdmAst::process_enum_const() constant_node->filename = current_node->filename; constant_node->location = current_node->location; current_node->children.push_back(constant_node); - auto left_const = AST::AstNode::mkconst_int(constant_node->range_left, true); - auto right_const = AST::AstNode::mkconst_int(constant_node->range_right, true); - auto range = make_ast_node(AST::AST_RANGE, {left_const, right_const}); - current_node->children.push_back(range); + current_node->children.push_back(make_range(constant_node->range_left, constant_node->range_right, true)); } } From 5fd3b46c2fbd9c8310f3f23da2a950eb9a003c3f Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 24 Jun 2022 15:26:24 +0200 Subject: [PATCH 803/845] Preserve clock for DSP in any of multiply-accumulate modes Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-io-regs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index 9f2459492..71612036a 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -66,7 +66,7 @@ void ql_dsp_io_regs_pass(RTLIL::Module *module) dsp->type = RTLIL::IdString(new_type); // Delete ports unused in given type of DSP cell - del_clk = (!reg_in_i && out_sel_i <= 3); + del_clk = (!reg_in_i && out_sel_i <= 3 && out_sel_i != 1); std::vector ports2del; From f8af8a58eef7fc82873b28acc920094ee8215a43 Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Tue, 28 Jun 2022 14:42:22 +0200 Subject: [PATCH 804/845] Support `longint` typespec Signed-off-by: Krzysztof Bieganski --- systemverilog-plugin/UhdmAst.cc | 14 ++++++++++++++ systemverilog-plugin/UhdmAst.h | 1 + 2 files changed, 15 insertions(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 9ed51563c..62f7d6788 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3427,6 +3427,16 @@ void UhdmAst::process_shortint_typespec() current_node->is_signed = true; } +void UhdmAst::process_longint_typespec() +{ + std::vector packed_ranges; // comes before wire name + std::vector unpacked_ranges; // comes after wire name + current_node = make_ast_node(AST::AST_WIRE); + packed_ranges.push_back(make_range(63, 0)); + add_multirange_wire(current_node, packed_ranges, unpacked_ranges); + current_node->is_signed = true; +} + void UhdmAst::process_byte_typespec() { std::vector packed_ranges; // comes before wire name @@ -3616,6 +3626,7 @@ void UhdmAst::process_port() case vpiUnionVar: case vpiEnumVar: case vpiShortIntVar: + case vpiLongIntVar: case vpiIntVar: case vpiIntegerVar: break; @@ -4098,6 +4109,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiShortIntTypespec: process_shortint_typespec(); break; + case vpiLongIntTypespec: + process_longint_typespec(); + break; case vpiTimeTypespec: process_time_typespec(); break; diff --git a/systemverilog-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h index cc849794f..af0b808ee 100644 --- a/systemverilog-plugin/UhdmAst.h +++ b/systemverilog-plugin/UhdmAst.h @@ -127,6 +127,7 @@ class UhdmAst void process_logic_typespec(); void process_int_typespec(); void process_shortint_typespec(); + void process_longint_typespec(); void process_time_typespec(); void process_bit_typespec(); void process_string_var(); From 37b40cc14b384186ec816d1fcc3540027c7f87c0 Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Mon, 20 Jun 2022 16:19:05 +0200 Subject: [PATCH 805/845] Support `break` and `continue` Signed-off-by: Krzysztof Bieganski --- systemverilog-plugin/UhdmAst.cc | 194 +++++++++++++++--- systemverilog-plugin/UhdmAst.h | 6 + systemverilog-plugin/UhdmAstUpstream.cc | 4 +- systemverilog-plugin/tests/Makefile | 4 +- .../break_continue/break_continue.golden.out | 2 + .../tests/break_continue/break_continue.tcl | 13 ++ .../tests/break_continue/break_continue.v | 30 +++ 7 files changed, 223 insertions(+), 30 deletions(-) create mode 100644 systemverilog-plugin/tests/break_continue/break_continue.golden.out create mode 100644 systemverilog-plugin/tests/break_continue/break_continue.tcl create mode 100644 systemverilog-plugin/tests/break_continue/break_continue.v diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 62f7d6788..46a91f8ae 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1151,6 +1151,125 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h) return nullptr; } +void UhdmAst::transform_breaks_continues(AST::AstNode *loop, AST::AstNode *decl_block) +{ + AST::AstNode *break_wire = nullptr; + AST::AstNode *continue_wire = nullptr; + // Creates a 1-bit wire with the given name + const auto make_cond_var = [this](const std::string &var_name) { + auto cond_var = + make_ast_node(AST::AST_WIRE, {make_ast_node(AST::AST_RANGE, {AST::AstNode::mkconst_int(0, false), AST::AstNode::mkconst_int(0, false)}), + AST::AstNode::mkconst_int(0, false)}); + cond_var->str = var_name; + cond_var->is_reg = true; + return cond_var; + }; + // Creates a conditional like 'if (!casevar) block' + auto make_case = [this](AST::AstNode *block, const std::string &casevar_name) { + auto *case_node = make_ast_node(AST::AST_CASE); + auto *id = make_identifier(casevar_name); + case_node->children.push_back(id); + auto *constant = AST::AstNode::mkconst_int(0, false, 1); + auto *cond_node = make_ast_node(AST::AST_COND); + cond_node->children.push_back(constant); + cond_node->children.push_back(block); + case_node->children.push_back(cond_node); + return case_node; + }; + // Pre-declare this function to be able to call it recursively + std::function transform_block; + // Transforms the given block if it has a break or continue; recurses into child blocks; return true if a break/continue was encountered + transform_block = [&](AST::AstNode *block) { + auto wrap_and_transform = [&](decltype(block->children)::iterator it) { + // Move the (it, end()) statements into a new block under 'if (!continue) {...}' + auto *new_block = make_ast_node(AST::AST_BLOCK, {it, block->children.end()}); + block->children.erase(it, block->children.end()); + auto *case_node = make_case(new_block, continue_wire->str); + block->children.push_back(case_node); + transform_block(new_block); + }; + + for (auto it = block->children.begin(); it != block->children.end(); it++) { + auto type = static_cast((*it)->type); + switch (type) { + case AST::AST_BLOCK: { + if (transform_block(*it)) { + // If there was a break/continue, we need to wrap the rest of the block in an if + wrap_and_transform(it + 1); + return true; + } + break; + } + case AST::AST_CASE: { + // Go over each block in a case + bool has_jump = false; + for (auto *node : (*it)->children) { + if (node->type == AST::AST_COND) + has_jump = has_jump || transform_block(node->children.back()); + } + if (has_jump) { + // If there was a break/continue, we need to wrap the rest of the block in an if + wrap_and_transform(it + 1); + return true; + } + break; + } + case AST::AST_BREAK: + case AST::AST_CONTINUE: { + std::for_each(it, block->children.end(), [](auto *node) { delete node; }); + block->children.erase(it, block->children.end()); + if (!continue_wire) + continue_wire = make_cond_var("$continue"); + auto *continue_id = make_identifier(continue_wire->str); + block->children.push_back(make_ast_node(AST::AST_ASSIGN_EQ, {continue_id, AST::AstNode::mkconst_int(1, false)})); + if (type == AST::AST_BREAK) { + if (!break_wire) + break_wire = make_cond_var("$break"); + auto *break_id = make_identifier(break_wire->str); + block->children.push_back(make_ast_node(AST::AST_ASSIGN_EQ, {break_id, AST::AstNode::mkconst_int(1, false)})); + } + return true; + } + } + } + return false; + }; + + // Actual transformation starts here + transform_block(loop->children.back()); + if (continue_wire) { + auto *continue_id = make_identifier(continue_wire->str); + // Reset $continue each iteration + auto *continue_assign = make_ast_node(AST::AST_ASSIGN_EQ, {continue_id, AST::AstNode::mkconst_int(0, false)}); + decl_block->children.insert(decl_block->children.begin(), continue_wire); + loop->children.back()->children.insert(loop->children.back()->children.begin(), continue_assign); + } + if (break_wire) { + auto *break_id = make_identifier(break_wire->str); + // Reset $break before the loop + auto *break_assign = make_ast_node(AST::AST_ASSIGN_EQ, {break_id, AST::AstNode::mkconst_int(0, false)}); + decl_block->children.insert(decl_block->children.begin(), break_assign); + decl_block->children.insert(decl_block->children.begin(), break_wire); + if (loop->type == AST::AST_REPEAT || loop->type == AST::AST_FOR) { + // Wrap loop body in 'if (!break) {...}' + // Changing the for loop condition won't work here, + // as then simplify fails with error "2nd expression of procedural for-loop is not constant!" + auto *case_node = make_case(loop->children.back(), break_wire->str); + auto *new_block = make_ast_node(AST::AST_BLOCK); + new_block->children.push_back(case_node); + new_block->str = loop->children.back()->str; + loop->children.back() = new_block; + } else if (loop->type == AST::AST_WHILE) { + // Add the break var to the loop condition + auto *break_id = make_identifier(break_wire->str); + AST::AstNode *&loop_cond = loop->children[0]; + loop_cond = make_ast_node(AST::AST_LOGIC_AND, {make_ast_node(AST::AST_LOGIC_NOT, {break_id}), loop_cond}); + } else { + log_error("break unsupported for this loop type"); + } + } +} + AST::AstNode *UhdmAst::make_ast_node(AST::AstNodeType type, std::vector children, bool prefer_full_name) { auto node = new AST::AstNode(type); @@ -1168,6 +1287,13 @@ AST::AstNode *UhdmAst::make_ast_node(AST::AstNodeType type, std::vectorstr = name; + return node; +} + void UhdmAst::process_packed_array_typespec() { std::vector packed_ranges; @@ -2998,24 +3124,23 @@ void UhdmAst::process_if_else() void UhdmAst::process_for() { - current_node = make_ast_node(AST::AST_FOR); - auto loop = current_node; + current_node = make_ast_node(AST::AST_BLOCK); auto loop_id = shared.next_loop_id(); - current_node->str = "$loop" + std::to_string(loop_id); + current_node->str = "$fordecl_block" + std::to_string(loop_id); + auto loop = make_ast_node(AST::AST_FOR); + loop->str = "$loop" + std::to_string(loop_id); + current_node->children.push_back(loop); visit_one_to_many({vpiForInitStmt}, obj_h, [&](AST::AstNode *node) { if (node->type == AST::AST_ASSIGN_LE) node->type = AST::AST_ASSIGN_EQ; auto lhs = node->children[0]; if (lhs->type == AST::AST_WIRE) { - current_node = make_ast_node(AST::AST_BLOCK); - current_node->str = "$fordecl_block" + std::to_string(loop_id); auto *wire = lhs->clone(); wire->is_reg = true; current_node->children.push_back(wire); lhs->type = AST::AST_IDENTIFIER; lhs->is_signed = false; lhs->delete_children(); - current_node->children.push_back(loop); } loop->children.push_back(node); }); @@ -3038,6 +3163,7 @@ void UhdmAst::process_for() loop->children.push_back(node); } }); + transform_breaks_continues(loop, current_node); } void UhdmAst::process_gen_scope() @@ -3511,19 +3637,23 @@ void UhdmAst::process_bit_typespec() void UhdmAst::process_repeat() { - current_node = make_ast_node(AST::AST_REPEAT); - visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + auto loop_id = shared.next_loop_id(); + current_node = make_ast_node(AST::AST_BLOCK); + current_node->str = "$repeatdecl_block" + std::to_string(loop_id); + auto *loop = make_ast_node(AST::AST_REPEAT); + loop->str = "$loop" + std::to_string(loop_id); + current_node->children.push_back(loop); + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { loop->children.push_back(node); }); visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { - if (node) { - AST::AstNode *block = nullptr; - if (node->type != AST::AST_BLOCK) { - block = new AST::AstNode(AST::AST_BLOCK, node); - } else { - block = node; - } - current_node->children.push_back(block); + if (node->type != AST::AST_BLOCK) { + node = new AST::AstNode(AST::AST_BLOCK, node); + } + if (node->str == "") { + node->str = loop->str; // Needed in simplify step } + loop->children.push_back(node); }); + transform_breaks_continues(loop, current_node); } void UhdmAst::process_var_select() @@ -3838,21 +3968,23 @@ void UhdmAst::process_immediate_assume() void UhdmAst::process_while() { - current_node = make_ast_node(AST::AST_WHILE); - visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { current_node->children.push_back(node); }); + auto loop_id = shared.next_loop_id(); + current_node = make_ast_node(AST::AST_BLOCK); + current_node->str = "$whiledecl_block" + std::to_string(loop_id); + auto *loop = make_ast_node(AST::AST_WHILE); + loop->str = "$loop" + std::to_string(loop_id); + current_node->children.push_back(loop); + visit_one_to_one({vpiCondition}, obj_h, [&](AST::AstNode *node) { loop->children.push_back(node); }); visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { if (node->type != AST::AST_BLOCK) { - auto *statements = make_ast_node(AST::AST_BLOCK); - statements->str = current_node->str; // Needed in simplify step - statements->children.push_back(node); - current_node->children.push_back(statements); - } else { - if (node->str == "") { - node->str = current_node->str; - current_node->children.push_back(node); - } + node = make_ast_node(AST::AST_BLOCK, {node}); + } + if (node->str.empty()) { + node->str = loop->str; // Needed in simplify step } + loop->children.push_back(node); }); + transform_breaks_continues(loop, current_node); } void UhdmAst::process_gate() @@ -4045,6 +4177,14 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) case vpiFor: process_for(); break; + case vpiBreak: + // Will be resolved later by loop processor + current_node = make_ast_node(static_cast(AST::AST_BREAK)); + break; + case vpiContinue: + // Will be resolved later by loop processor + current_node = make_ast_node(static_cast(AST::AST_CONTINUE)); + break; case vpiGenScopeArray: process_gen_scope_array(); break; diff --git a/systemverilog-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h index af0b808ee..8f6a3689c 100644 --- a/systemverilog-plugin/UhdmAst.h +++ b/systemverilog-plugin/UhdmAst.h @@ -33,6 +33,9 @@ class UhdmAst // the given vpiHandle. AST::AstNode *make_ast_node(AST::AstNodeType type, std::vector children = {}, bool prefer_full_name = false); + // Create an identifier AstNode + AST::AstNode *make_identifier(const std::string &name); + // Makes the passed node a cell node of the specified type void make_cell(vpiHandle obj_h, AST::AstNode *node, AST::AstNode *type); @@ -48,6 +51,9 @@ class UhdmAst // Processes the value connected to the specified node AST::AstNode *process_value(vpiHandle obj_h); + // Transforms break and continue nodes into structures accepted by the AST frontend + void transform_breaks_continues(AST::AstNode *loop, AST::AstNode *decl_block); + // The parent UhdmAst UhdmAst *parent; diff --git a/systemverilog-plugin/UhdmAstUpstream.cc b/systemverilog-plugin/UhdmAstUpstream.cc index d6d9be868..921acf1b0 100644 --- a/systemverilog-plugin/UhdmAstUpstream.cc +++ b/systemverilog-plugin/UhdmAstUpstream.cc @@ -1,7 +1,9 @@ namespace AST { enum AstNodeTypeExtended { - AST_DOT = AST::AST_BIND + 1 // here we always want to point to the last element of yosys' AstNodeType + AST_DOT = AST::AST_BIND + 1, // here we always want to point to the last element of yosys' AstNodeType + AST_BREAK, + AST_CONTINUE }; } diff --git a/systemverilog-plugin/tests/Makefile b/systemverilog-plugin/tests/Makefile index 14a19159f..378788fa8 100644 --- a/systemverilog-plugin/tests/Makefile +++ b/systemverilog-plugin/tests/Makefile @@ -14,9 +14,9 @@ # # SPDX-License-Identifier: Apache-2.0 -TESTS = counter +TESTS = counter break_continue include $(shell pwd)/../../Makefile_test.common counter_verify = true - +break_continue_verify = $(call diff_test,break_continue,out) diff --git a/systemverilog-plugin/tests/break_continue/break_continue.golden.out b/systemverilog-plugin/tests/break_continue/break_continue.golden.out new file mode 100644 index 000000000..74a27c291 --- /dev/null +++ b/systemverilog-plugin/tests/break_continue/break_continue.golden.out @@ -0,0 +1,2 @@ +top a - - po 110 +top b - - po 15 diff --git a/systemverilog-plugin/tests/break_continue/break_continue.tcl b/systemverilog-plugin/tests/break_continue/break_continue.tcl new file mode 100644 index 000000000..166c38e3b --- /dev/null +++ b/systemverilog-plugin/tests/break_continue/break_continue.tcl @@ -0,0 +1,13 @@ +yosys -import +if { [info procs read_uhdm] == {} } { plugin -i systemverilog } +yosys -import ;# ingest plugin commands + +set TMP_DIR /tmp +if { [info exists ::env(TMPDIR) ] } { + set TMP_DIR $::env(TMPDIR) +} + +# Testing simple round-trip +read_systemverilog -o $TMP_DIR/break-continue-test $::env(DESIGN_TOP).v +prep +write_table $::env(DESIGN_TOP).out diff --git a/systemverilog-plugin/tests/break_continue/break_continue.v b/systemverilog-plugin/tests/break_continue/break_continue.v new file mode 100644 index 000000000..d06d60b5f --- /dev/null +++ b/systemverilog-plugin/tests/break_continue/break_continue.v @@ -0,0 +1,30 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 +module top(output int a, output int b); + initial begin + a = 0; + b = 0; + repeat(15) begin + if(a > 100) begin + if (b > 10) + break; + b = b + 5; + continue; + end + a = a + 10; + end + end +endmodule From 75df29e1c68353d9c9b5b3db7f4748e057d3d6a1 Mon Sep 17 00:00:00 2001 From: Kamil Rakoczy Date: Wed, 29 Jun 2022 13:47:05 +0200 Subject: [PATCH 806/845] Skip non-synthesizable objects (#243) * Skip non-synthesizable objects Signed-off-by: Kamil Rakoczy * Add check for case node Signed-off-by: Kamil Rakoczy * Add AST_BLOCK if not present in initial Signed-off-by: Kamil Rakoczy * Add AST_BLOCK if stmt is missing in always Signed-off-by: Kamil Rakoczy * Add AST_BLOCK if stmt is missing in initial Signed-off-by: Kamil Rakoczy * Check if node is present in hier_path Signed-off-by: Kamil Rakoczy * Check for node in if_else Signed-off-by: Kamil Rakoczy * Rely on UHDM's SynthSubset to filter out non-synthesizables Signed-off-by: Krzysztof Bieganski Co-authored-by: Krzysztof Bieganski --- systemverilog-plugin/UhdmAst.cc | 108 +++++++++--------- systemverilog-plugin/UhdmAst.h | 1 - systemverilog-plugin/uhdmastfrontend.cc | 3 + systemverilog-plugin/uhdmastshared.h | 2 + systemverilog-plugin/uhdmcommonfrontend.h | 2 + .../uhdmsurelogastfrontend.cc | 5 + 6 files changed, 65 insertions(+), 56 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 46a91f8ae..7f1d2b32d 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -1376,7 +1376,12 @@ static void add_or_replace_child(AST::AstNode *parent, AST::AstNode *child) if (initial_node_it != parent->children.end()) { AST::AstNode *initial_node = *initial_node_it; - log_assert(!(initial_node->children.empty())); + // simplify assumes that initial has a block under it + // In case we don't have one (there were no statements under the initial), let's add it + if (initial_node->children.empty()) { + initial_node->children.push_back(new AST::AstNode(AST::AST_BLOCK)); + } + log_assert(initial_node->children[0]->type == AST::AST_BLOCK); log_assert(!(child->children.empty())); log_assert(child->children[0]->type == AST::AST_BLOCK); @@ -2471,13 +2476,18 @@ void UhdmAst::process_always() { current_node = make_ast_node(AST::AST_ALWAYS); visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { - AST::AstNode *block = nullptr; - if (node && node->type != AST::AST_BLOCK) { - block = new AST::AstNode(AST::AST_BLOCK, node); + if (node) { + AST::AstNode *block = nullptr; + if (node->type != AST::AST_BLOCK) { + block = new AST::AstNode(AST::AST_BLOCK, node); + } else { + block = node; + } + current_node->children.push_back(block); } else { - block = node; + // create empty block + current_node->children.push_back(new AST::AstNode(AST::AST_BLOCK)); } - current_node->children.push_back(block); }); switch (vpi_get(vpiAlwaysType, obj_h)) { case vpiAlwaysComb: @@ -2525,6 +2535,8 @@ void UhdmAst::process_initial() node = block_node; } current_node->children.push_back(node); + } else { + current_node->children.push_back(make_ast_node(AST::AST_BLOCK)); } }); } @@ -3104,7 +3116,8 @@ void UhdmAst::process_if_else() condition->children.push_back(constant); visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { auto *statements = new AST::AstNode(AST::AST_BLOCK); - statements->children.push_back(node); + if (node) + statements->children.push_back(node); condition->children.push_back(statements); }); current_node->children.push_back(condition); @@ -3115,7 +3128,8 @@ void UhdmAst::process_if_else() condition->children.push_back(elseBlock); visit_one_to_one({vpiElseStmt}, obj_h, [&](AST::AstNode *node) { auto *statements = new AST::AstNode(AST::AST_BLOCK); - statements->children.push_back(node); + if (node) + statements->children.push_back(node); condition->children.push_back(statements); }); current_node->children.push_back(condition); @@ -3224,12 +3238,14 @@ void UhdmAst::process_case_item() current_node->children.push_back(new AST::AstNode(AST::AST_DEFAULT)); } visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { - if (node->type != AST::AST_BLOCK) { - auto block_node = new AST::AstNode(AST::AST_BLOCK); - block_node->children.push_back(node); - node = block_node; + if (node) { + if (node->type != AST::AST_BLOCK) { + auto block_node = new AST::AstNode(AST::AST_BLOCK); + block_node->children.push_back(node); + node = block_node; + } + current_node->children.push_back(node); } - current_node->children.push_back(node); }); } @@ -3307,22 +3323,24 @@ void UhdmAst::process_hier_path() current_node->str = "\\"; AST::AstNode *top_node = nullptr; visit_one_to_many({vpiActual}, obj_h, [&](AST::AstNode *node) { - if (node->str.find('[') != std::string::npos) - node->str = node->str.substr(0, node->str.find('[')); - // for first node, just set correct string and move any children - if (!top_node) { - current_node->str += node->str.substr(1); - current_node->children = std::move(node->children); - top_node = current_node; - delete node; - } else { - if (node->str.empty()) { - log_assert(!node->children.empty()); - top_node->children.push_back(node->children[0]); + if (node) { + if (node->str.find('[') != std::string::npos) + node->str = node->str.substr(0, node->str.find('[')); + // for first node, just set correct string and move any children + if (!top_node) { + current_node->str += node->str.substr(1); + current_node->children = std::move(node->children); + top_node = current_node; + delete node; } else { - node->type = static_cast(AST::AST_DOT); - top_node->children.push_back(node); - top_node = node; + if (node->str.empty()) { + log_assert(!node->children.empty()); + top_node->children.push_back(node->children[0]); + } else { + node->type = static_cast(AST::AST_DOT); + top_node->children.push_back(node); + top_node = node; + } } } }); @@ -3435,20 +3453,6 @@ void UhdmAst::process_sys_func_call() { current_node = make_ast_node(AST::AST_FCALL); - // skip unsupported simulation functions - std::string to_skip[] = { - "\\$value$plusargs", "\\$test$plusargs", "\\$displayb", "\\$displayh", "\\$displayo", "\\$strobeb", "\\$strobeh", "\\$strobeo", - "\\$writeb", "\\$writeh", "\\$writeo", "\\$dumplimit", "\\$dumpflush", "\\$fdisplay", "\\$fdisplayb", "\\$fdisplayh", - "\\$fdisplayo", "\\$fmonitor", "\\$fstrobe", "\\$fstrobeb", "\\$fstrobeh", "\\$fstrobeo", "\\$fwrite", "\\$fwriteb", - "\\$fwriteh", "\\$fwriteo", "\\$ungetc", "\\$fgetc", "\\$fgets", "\\$ftell", "\\$printtimescale"}; - - if (std::find(std::begin(to_skip), std::end(to_skip), current_node->str) != std::end(to_skip)) { - log_warning("System function %s was skipped\n", current_node->str.substr(1).c_str()); - delete current_node; - current_node = nullptr; - return; - } - std::string task_calls[] = {"\\$display", "\\$monitor", "\\$write", "\\$time", "\\$readmemh", "\\$readmemb", "\\$finish", "\\$stop"}; if (current_node->str == "\\$signed") { @@ -3503,16 +3507,6 @@ void UhdmAst::process_immediate_assert() }); } -void UhdmAst::process_nonsynthesizable(const UHDM::BaseClass *object) -{ - log_warning("%s:%d: Non-synthesizable object of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), UHDM::VpiTypeName(obj_h).c_str()); - current_node = make_ast_node(AST::AST_BLOCK); - visit_one_to_one({vpiStmt}, obj_h, [&](AST::AstNode *node) { - if (node) - current_node->children.push_back(node); - }); -} - void UhdmAst::process_logic_typespec() { current_node = make_ast_node(AST::AST_WIRE); @@ -4040,6 +4034,13 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) const unsigned object_type = vpi_get(vpiType, obj_h); const uhdm_handle *const handle = (const uhdm_handle *)obj_h; const UHDM::BaseClass *const object = (const UHDM::BaseClass *)handle->object; + for (auto *obj : shared.nonSynthesizableObjects) { + if (!object->Compare(obj)) { + log_warning("%s:%d: Skipping non-synthesizable object of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(), + UHDM::VpiTypeName(obj_h).c_str()); + return nullptr; + } + } if (shared.debug_flag) { std::cout << indent << "Object '" << object->VpiName() << "' of type '" << UHDM::VpiTypeName(obj_h) << '\'' << std::endl; @@ -4236,9 +4237,6 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle) break; case UHDM::uhdmimport_typespec: break; - case vpiDelayControl: - process_nonsynthesizable(object); - break; case vpiLogicTypespec: process_logic_typespec(); break; diff --git a/systemverilog-plugin/UhdmAst.h b/systemverilog-plugin/UhdmAst.h index 8f6a3689c..b7877a61e 100644 --- a/systemverilog-plugin/UhdmAst.h +++ b/systemverilog-plugin/UhdmAst.h @@ -148,7 +148,6 @@ class UhdmAst void process_gate(); void process_primterm(); void simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node = nullptr); - void process_nonsynthesizable(const UHDM::BaseClass *object); void process_unsupported_stmt(const UHDM::BaseClass *object); UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i) diff --git a/systemverilog-plugin/uhdmastfrontend.cc b/systemverilog-plugin/uhdmastfrontend.cc index 4874ee8ba..c09688c90 100644 --- a/systemverilog-plugin/uhdmastfrontend.cc +++ b/systemverilog-plugin/uhdmastfrontend.cc @@ -44,6 +44,9 @@ struct UhdmAstFrontend : public UhdmCommonFrontend { UHDM::Serializer serializer; std::vector restoredDesigns = serializer.Restore(filename); + UHDM::SynthSubset *synthSubset = new UHDM::SynthSubset(&serializer, this->shared.nonSynthesizableObjects, false); + synthSubset->listenDesigns(restoredDesigns); + delete synthSubset; if (this->shared.debug_flag || !this->report_directory.empty()) { for (auto design : restoredDesigns) { std::stringstream strstr; diff --git a/systemverilog-plugin/uhdmastshared.h b/systemverilog-plugin/uhdmastshared.h index 97990551b..2fa3e8bc1 100644 --- a/systemverilog-plugin/uhdmastshared.h +++ b/systemverilog-plugin/uhdmastshared.h @@ -52,6 +52,8 @@ class UhdmAstShared std::unordered_map param_types; AST::AstNode *current_top_node = nullptr; + // Set of non-synthesizable objects to skip in current design; + std::set nonSynthesizableObjects; }; YOSYS_NAMESPACE_END diff --git a/systemverilog-plugin/uhdmcommonfrontend.h b/systemverilog-plugin/uhdmcommonfrontend.h index 6fcb0f9dc..3d5ff169d 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.h +++ b/systemverilog-plugin/uhdmcommonfrontend.h @@ -20,6 +20,8 @@ #include "UhdmAst.h" #include "frontends/ast/ast.h" #include "kernel/yosys.h" +#include "uhdm/SynthSubset.h" +#include "uhdm/VpiListener.h" #include #include diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index 39cc75168..f2beaee28 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -121,6 +121,11 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { } } + UHDM::Serializer serializer; + UHDM::SynthSubset *synthSubset = new UHDM::SynthSubset(&serializer, this->shared.nonSynthesizableObjects, false); + synthSubset->listenDesigns(uhdm_design); + delete synthSubset; + SURELOG::shutdown_compiler(compiler); delete clp; delete symbolTable; From be4dd83f6ab8349789b1d3257a126893c6f29c46 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Fri, 24 Jun 2022 15:33:06 +0200 Subject: [PATCH 807/845] Use AST_TO_UNSIGNED for shift operations This mimics the way Yosys creates the AST. Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 36 +++++++++++++++------------------ 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 7f1d2b32d..4d13e133b 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -972,18 +972,6 @@ static void clear_current_scope() AST_INTERNAL::current_ast_mod = nullptr; } -static void mark_as_unsigned(AST::AstNode *node, const UHDM::BaseClass *object) -{ - if (node->children.empty() || node->children.size() == 1) { - node->is_signed = false; - } else if (node->children.size() == 2) { - node->children[0]->is_signed = false; - node->children[1]->is_signed = false; - } else { - log_error("%s:%d: Unsupported expression in mark_as_unsigned!\n", object->VpiFile().c_str(), object->VpiLineNo()); - } -} - void UhdmAst::visit_one_to_many(const std::vector child_node_types, vpiHandle parent_handle, const std::function &f) { for (auto child : child_node_types) { @@ -2672,16 +2660,20 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) case vpiBitXnorOp: current_node->type = AST::AST_BIT_XNOR; break; - case vpiLShiftOp: + case vpiLShiftOp: { current_node->type = AST::AST_SHIFT_LEFT; log_assert(current_node->children.size() == 2); - mark_as_unsigned(current_node->children[1], object); + auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]->clone()); + current_node->children[1] = unsigned_node; break; - case vpiRShiftOp: + } + case vpiRShiftOp: { current_node->type = AST::AST_SHIFT_RIGHT; log_assert(current_node->children.size() == 2); - mark_as_unsigned(current_node->children[1], object); + auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]->clone()); + current_node->children[1] = unsigned_node; break; + } case vpiNotOp: current_node->type = AST::AST_LOGIC_NOT; break; @@ -2733,16 +2725,20 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) case vpiModOp: current_node->type = AST::AST_MOD; break; - case vpiArithLShiftOp: + case vpiArithLShiftOp: { current_node->type = AST::AST_SHIFT_SLEFT; log_assert(current_node->children.size() == 2); - mark_as_unsigned(current_node->children[1], object); + auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]->clone()); + current_node->children[1] = unsigned_node; break; - case vpiArithRShiftOp: + } + case vpiArithRShiftOp: { current_node->type = AST::AST_SHIFT_SRIGHT; log_assert(current_node->children.size() == 2); - mark_as_unsigned(current_node->children[1], object); + auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]->clone()); + current_node->children[1] = unsigned_node; break; + } case vpiPowerOp: current_node->type = AST::AST_POW; break; From 1fa23bca9060f265a405cce9c3a94cee6c37a4fd Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 29 Jun 2022 16:07:07 +0200 Subject: [PATCH 808/845] Do not clone substituted nodes Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 4d13e133b..e982c6f94 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -2663,14 +2663,14 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) case vpiLShiftOp: { current_node->type = AST::AST_SHIFT_LEFT; log_assert(current_node->children.size() == 2); - auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]->clone()); + auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]); current_node->children[1] = unsigned_node; break; } case vpiRShiftOp: { current_node->type = AST::AST_SHIFT_RIGHT; log_assert(current_node->children.size() == 2); - auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]->clone()); + auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]); current_node->children[1] = unsigned_node; break; } @@ -2728,14 +2728,14 @@ void UhdmAst::process_operation(const UHDM::BaseClass *object) case vpiArithLShiftOp: { current_node->type = AST::AST_SHIFT_SLEFT; log_assert(current_node->children.size() == 2); - auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]->clone()); + auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]); current_node->children[1] = unsigned_node; break; } case vpiArithRShiftOp: { current_node->type = AST::AST_SHIFT_SRIGHT; log_assert(current_node->children.size() == 2); - auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]->clone()); + auto unsigned_node = new AST::AstNode(AST::AST_TO_UNSIGNED, current_node->children[1]); current_node->children[1] = unsigned_node; break; } From 0a3daafb654ba9d215b528539d998be2eb998873 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 1 Jul 2022 13:39:40 +0200 Subject: [PATCH 809/845] Re added regular D flip-flops and latches. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index feeb46b81..ae54ec391 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -124,6 +124,33 @@ module frac_lut6( endmodule +(* abc9_flop, lib_whitebox *) +module dff( + output reg Q, + input wire D, + (* clkbuf_sink *) + input wire C +); + initial Q <= 1'b0; + + always @(posedge C) + Q <= D; + +endmodule + +(* abc9_flop, lib_whitebox *) +module dffn( + output reg Q, + input wire D, + (* clkbuf_sink *) + input wire C +); + initial Q <= 1'b0; + + always @(negedge C) + Q <= D; + +endmodule (* abc9_flop, lib_whitebox *) module dffsre( From a3be11f9bc9200950dddd2af907baa1cb69ada33 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 6 Jul 2022 15:15:28 +0200 Subject: [PATCH 810/845] Added option "-nosdff" to disable synchronous set/reset flip-flop inference for k6n10f Signed-off-by: Maciej Kurc --- ql-qlf-plugin/synth_quicklogic.cc | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 16dd36c05..303b1de1e 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -84,6 +84,11 @@ struct SynthQuickLogicPass : public ScriptPass { log(" -no_ff_map\n"); log(" By default ff techmap is turned on. Specifying this switch turns it off.\n"); log("\n"); + log(" -nosdff\n"); + log(" By default infer synchronous S/R flip-flops for architectures\n"); + log(" that support them. \n"); + log(" Specifying this switch turns it off.\n"); + log("\n"); log("\n"); log("The following commands are executed by this synthesis command:\n"); help_script(); @@ -97,6 +102,7 @@ struct SynthQuickLogicPass : public ScriptPass { bool abcOpt; bool abc9; bool noffmap; + bool nosdff; void clear_flags() override { @@ -112,6 +118,7 @@ struct SynthQuickLogicPass : public ScriptPass { abc9 = true; noffmap = false; nodsp = false; + nosdff = false; } void execute(std::vector args, RTLIL::Design *design) override @@ -177,6 +184,10 @@ struct SynthQuickLogicPass : public ScriptPass { noffmap = true; continue; } + if (args[argidx] == "-nosdff") { + nosdff = true; + continue; + } break; } @@ -192,6 +203,10 @@ struct SynthQuickLogicPass : public ScriptPass { abc9 = false; } + if (family == "qlf_k4n8") { + nosdff = true; + } + if (abc9 && design->scratchpad_get_int("abc9.D", 0) == 0) { log_warning("delay target has not been set via SDC or scratchpad; assuming 12 MHz clock.\n"); design->scratchpad_set_int("abc9.D", 41667); // 12MHz = 83.33.. ns; divided by two to allow for interconnect delay. @@ -230,9 +245,13 @@ struct SynthQuickLogicPass : public ScriptPass { } std::string noDFFArgs; + if (nosdff) { + noDFFArgs += " -nosdff"; + } if (family == "qlf_k4n8") { - noDFFArgs = " -nodffe -nosdff"; + noDFFArgs += " -nodffe"; } + if (check_label("coarse")) { run("check"); run("opt -nodffe -nosdff"); @@ -366,7 +385,11 @@ struct SynthQuickLogicPass : public ScriptPass { // FIXME: dfflegalize seems to leave $_DLATCH_[NP]_ even if it // is not allowed. So we allow them and map them later to // $_DLATCHSR_[NP]NN_. - run("dfflegalize -cell $_DFFSRE_?NNP_ 0 -cell $_SDFFE_?N?P_ 0 -cell $_DLATCHSR_?NN_ 0 -cell $_DLATCH_?_ 0"); + std::string legalizeArgs = " -cell $_DFFSRE_?NNP_ 0 -cell $_DLATCHSR_?NN_ 0 -cell $_DLATCH_?_ 0"; + if (!nosdff) { + legalizeArgs += " -cell $_SDFFE_?N?P_ 0"; + } + run("dfflegalize" + legalizeArgs); } else if (family == "pp3") { run("dfflegalize -cell $_DFFSRE_PPPP_ 0 -cell $_DLATCH_?_ x"); run("techmap -map +/quicklogic/" + family + "/cells_map.v"); From 36ac139b5be363a995d74cc3cd7a06af998642f0 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Wed, 6 Jul 2022 15:24:04 +0200 Subject: [PATCH 811/845] Added tests for k6n10f synch/async S/R flip-flop inference Signed-off-by: Maciej Kurc --- ql-qlf-plugin/tests/dffs/dffs.tcl | 222 +++++++++++++++++++++++++++++- 1 file changed, 221 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/ql-qlf-plugin/tests/dffs/dffs.tcl index fd75277df..4e8792eab 100644 --- a/ql-qlf-plugin/tests/dffs/dffs.tcl +++ b/ql-qlf-plugin/tests/dffs/dffs.tcl @@ -412,7 +412,7 @@ select -assert-count 3 t:\$lut design -reset # ============================================================================= -# qlf_k6n10f +# qlf_k6n10f (with synchronous S/R flip-flops) read_verilog $::env(DESIGN_TOP).v design -save read @@ -716,6 +716,226 @@ select -assert-count 1 t:latchnsre #select -assert-count 1 t:\$lut +design -reset + +# ============================================================================= +# qlf_k6n10f (no synchronous S/R flip-flops) + +read_verilog $::env(DESIGN_TOP).v +design -save read + +# DFF +hierarchy -top my_dff +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dff -nosdff +design -load postopt +yosys cd my_dff +stat +select -assert-count 1 t:dffsre + +# DFFN +design -load read +hierarchy -top my_dffn +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffn -nosdff +design -load postopt +yosys cd my_dffn +stat +select -assert-count 1 t:dffnsre + + +# DFFSRE from DFFR_N +design -load read +hierarchy -top my_dffr_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffr_n -nosdff +design -load postopt +yosys cd my_dffr_n +stat +select -assert-count 1 t:dffsre + +# DFFSRE from DFFR_P +design -load read +hierarchy -top my_dffr_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffr_p -nosdff +design -load postopt +yosys cd my_dffr_p +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + +# DFFSRE from DFFRE_N +design -load read +hierarchy -top my_dffre_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffre_n -nosdff +design -load postopt +yosys cd my_dffre_n +stat +select -assert-count 1 t:dffsre + +# DFFSRE from DFFRE_P +design -load read +hierarchy -top my_dffre_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffre_p -nosdff +design -load postopt +yosys cd my_dffre_p +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + + +# DFFSRE from DFFS_N +design -load read +hierarchy -top my_dffs_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffs_n -nosdff +design -load postopt +yosys cd my_dffs_n +stat +select -assert-count 1 t:dffsre + +# DFFSRE from DFFS_P +design -load read +hierarchy -top my_dffs_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffs_p -nosdff +design -load postopt +yosys cd my_dffs_p +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + +# DFFSRE from DFFSE_N +design -load read +hierarchy -top my_dffse_n +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffse_n -nosdff +design -load postopt +yosys cd my_dffse_n +stat +select -assert-count 1 t:dffsre + +# DFFSRE from DFFSE_P +design -load read +hierarchy -top my_dffse_p +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_dffse_p -nosdff +design -load postopt +yosys cd my_dffse_p +stat +select -assert-count 1 t:dffsre +select -assert-count 1 t:\$lut + + +# LATCH +design -load read +hierarchy -top my_latch +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latch -nosdff +design -load postopt +yosys cd my_latch +stat +select -assert-count 1 t:latchsre + +# LATCHN +design -load read +hierarchy -top my_latchn +yosys proc +equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchn -nosdff +design -load postopt +yosys cd my_latchn +stat +select -assert-count 1 t:latchnsre + + +## LATCHSRE from LATCHR_N +#design -load read +#hierarchy -top my_latchr_n +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchr_n -nosdff +#design -load postopt +#yosys cd my_latchr_n +#stat +#select -assert-count 1 t:latchr_n +# +## LATCHSRE from LATCHR_P +#design -load read +#hierarchy -top my_latchr_p +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchr_p -nosdff +#design -load postopt +#yosys cd my_latchr_p +#stat +#select -assert-count 1 t:latchr_p +#select -assert-count 1 t:\$lut +# +## LATCHSRE from LATCHS_N +#design -load read +#hierarchy -top my_latchs_n +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchs_n -nosdff +#design -load postopt +#yosys cd my_latchs_n +#stat +#select -assert-count 1 t:latchs_n +# +## LATCHSRE from LATCHS_P +#design -load read +#hierarchy -top my_latchs_p +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchs_p -nosdff +#design -load postopt +#yosys cd my_latchs_p +#stat +#select -assert-count 1 t:latchs_p +#select -assert-count 1 t:\$lut +# +# +## LATCHSRE from LATCHNR_N +#design -load read +#hierarchy -top my_latchnr_n +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchnr_n -nosdff +#design -load postopt +#yosys cd my_latchnr_n +#stat +#select -assert-count 1 t:latchnr_n +# +## LATCHSRE from LATCHNR_P +#design -load read +#hierarchy -top my_latchnr_p +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchnr_p -nosdff +#design -load postopt +#yosys cd my_latchnr_p +#stat +#select -assert-count 1 t:latchnr_p +#select -assert-count 1 t:\$lut +# +## LATCHSRE from LATCHNS_N +#design -load read +#hierarchy -top my_latchns_n +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchns_n -nosdff +#design -load postopt +#yosys cd my_latchns_n +#stat +#select -assert-count 1 t:latchns_n +# +## LATCHSRE from LATCHNS_P +#design -load read +#hierarchy -top my_latchns_p +#yosys proc +#equiv_opt -assert -async2sync -map +/quicklogic/qlf_k6n10f/cells_sim.v synth_quicklogic -family qlf_k6n10f -top my_latchns_p -nosdff +#design -load postopt +#yosys cd my_latchns_p +#stat +#select -assert-count 1 t:latchns_p +#select -assert-count 1 t:\$lut + design -reset # ============================================================================= From a1df203ddf1fa1101bcf5d43421d13b29b56f9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Fri, 1 Jul 2022 13:14:05 +0200 Subject: [PATCH 812/845] ql-qlf: k6n10f: DSP: move dsp simulation models to separate file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/Makefile | 1 + ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 1126 ------------ ql-qlf-plugin/qlf_k6n10f/dsp_sim.v | 2380 ++++++++++++++++++++++++++ 3 files changed, 2381 insertions(+), 1126 deletions(-) create mode 100644 ql-qlf-plugin/qlf_k6n10f/dsp_sim.v diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 7deee7097..3e08cd37b 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -51,6 +51,7 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \ $(QLF_K6N10F_DIR)/brams_final_map.v \ $(QLF_K6N10F_DIR)/brams.txt \ $(QLF_K6N10F_DIR)/cells_sim.v \ + $(QLF_K6N10F_DIR)/dsp_sim.v \ $(QLF_K6N10F_DIR)/sram1024x18.v \ $(QLF_K6N10F_DIR)/TDP18K_FIFO.v \ $(QLF_K6N10F_DIR)/ufifo_ctl.v \ diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index ae54ec391..d3b78caea 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1506,1129 +1506,3 @@ module BRAM2x18_SDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, .FLUSH2_i(FLUSH2) ); endmodule - -(* blackbox *) -module QL_DSP1 ( - input wire [19:0] a, - input wire [17:0] b, - (* clkbuf_sink *) - input wire clk0, - (* clkbuf_sink *) - input wire clk1, - input wire [ 1:0] feedback0, - input wire [ 1:0] feedback1, - input wire load_acc0, - input wire load_acc1, - input wire reset0, - input wire reset1, - output reg [37:0] z -); - parameter MODE_BITS = 27'b00000000000000000000000000; -endmodule /* QL_DSP1 */ - -module QL_DSP2 ( // TODO: Name subject to change - input wire [19:0] a, - input wire [17:0] b, - input wire [ 5:0] acc_fir, - output wire [37:0] z, - output wire [17:0] dly_b, - - (* clkbuf_sink *) - input wire clk, - input wire reset, - - input wire [2:0] feedback, - input wire load_acc, - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [2:0] output_select, - input wire saturate_enable, - input wire [5:0] shift_right, - input wire round, - input wire subtract, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - localparam NBITS_ACC = 64; - localparam NBITS_A = 20; - localparam NBITS_B = 18; - localparam NBITS_Z = 38; - - wire [NBITS_Z-1:0] dsp_full_z; - wire [(NBITS_Z/2)-1:0] dsp_frac0_z; - wire [(NBITS_Z/2)-1:0] dsp_frac1_z; - - wire [NBITS_B-1:0] dsp_full_dly_b; - wire [(NBITS_B/2)-1:0] dsp_frac0_dly_b; - wire [(NBITS_B/2)-1:0] dsp_frac1_dly_b; - - assign z = f_mode ? {dsp_frac1_z, dsp_frac0_z} : dsp_full_z; - assign dly_b = f_mode ? {dsp_frac1_dly_b, dsp_frac0_dly_b} : dsp_full_dly_b; - - // Output used when fmode == 1 - dsp_t1_sim #( - .NBITS_A(NBITS_A/2), - .NBITS_B(NBITS_B/2), - .NBITS_ACC(NBITS_ACC/2), - .NBITS_Z(NBITS_Z/2) - ) dsp_frac0 ( - .a_i(a[(NBITS_A/2)-1:0]), - .b_i(b[(NBITS_B/2)-1:0]), - .z_o(dsp_frac0_z), - .dly_b_o(dsp_frac0_dly_b), - - .acc_fir_i(acc_fir), - .feedback_i(feedback), - .load_acc_i(load_acc), - - .unsigned_a_i(unsigned_a), - .unsigned_b_i(unsigned_b), - - .clock_i(clk), - .s_reset(reset), - - .saturate_enable_i(saturate_enable), - .output_select_i(output_select), - .round_i(round), - .shift_right_i(shift_right), - .subtract_i(subtract), - .register_inputs_i(register_inputs), - .coef_0_i(COEFF_0[(NBITS_A/2)-1:0]), - .coef_1_i(COEFF_1[(NBITS_A/2)-1:0]), - .coef_2_i(COEFF_2[(NBITS_A/2)-1:0]), - .coef_3_i(COEFF_3[(NBITS_A/2)-1:0]) - ); - - // Output used when fmode == 1 - dsp_t1_sim #( - .NBITS_A(NBITS_A/2), - .NBITS_B(NBITS_B/2), - .NBITS_ACC(NBITS_ACC/2), - .NBITS_Z(NBITS_Z/2) - ) dsp_frac1 ( - .a_i(a[NBITS_A-1:NBITS_A/2]), - .b_i(b[NBITS_B-1:NBITS_B/2]), - .z_o(dsp_frac1_z), - .dly_b_o(dsp_frac1_dly_b), - - .acc_fir_i(acc_fir), - .feedback_i(feedback), - .load_acc_i(load_acc), - - .unsigned_a_i(unsigned_a), - .unsigned_b_i(unsigned_b), - - .clock_i(clk), - .s_reset(reset), - - .saturate_enable_i(saturate_enable), - .output_select_i(output_select), - .round_i(round), - .shift_right_i(shift_right), - .subtract_i(subtract), - .register_inputs_i(register_inputs), - .coef_0_i(COEFF_0[NBITS_A-1:NBITS_A/2]), - .coef_1_i(COEFF_1[NBITS_A-1:NBITS_A/2]), - .coef_2_i(COEFF_2[NBITS_A-1:NBITS_A/2]), - .coef_3_i(COEFF_3[NBITS_A-1:NBITS_A/2]) - ); - - // Output used when fmode == 0 - dsp_t1_sim #( - .NBITS_A(NBITS_A), - .NBITS_B(NBITS_B), - .NBITS_ACC(NBITS_ACC), - .NBITS_Z(NBITS_Z) - ) dsp_full ( - .a_i(a), - .b_i(b), - .z_o(dsp_full_z), - .dly_b_o(dsp_full_dly_b), - - .acc_fir_i(acc_fir), - .feedback_i(feedback), - .load_acc_i(load_acc), - - .unsigned_a_i(unsigned_a), - .unsigned_b_i(unsigned_b), - - .clock_i(clk), - .s_reset(reset), - - .saturate_enable_i(saturate_enable), - .output_select_i(output_select), - .round_i(round), - .shift_right_i(shift_right), - .subtract_i(subtract), - .register_inputs_i(register_inputs), - .coef_0_i(COEFF_0), - .coef_1_i(COEFF_1), - .coef_2_i(COEFF_2), - .coef_3_i(COEFF_3) - ); -endmodule - -module QL_DSP2_MULT ( // TODO: Name subject to change - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - // Port not available in architecture file - input wire reset, - - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [2:0] output_select, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .reset(reset), - - .f_mode(f_mode), - - .feedback(3'b0), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .output_select(3'b0), // unregistered output: a * b (0) - .register_inputs(1'b0) // unregistered inputs - ); -endmodule - -module QL_DSP2_MULT_REGIN ( // TODO: Name subject to change - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // Port not available in architecture file - input wire reset, - - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [2:0] output_select, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(3'b0), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(3'b0), // unregistered output: a * b (0) - .register_inputs(1'b1) // registered inputs - ); -endmodule - -module QL_DSP2_MULT_REGOUT ( // TODO: Name subject to change - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // Port not available in architecture file - input wire reset, - - input wire unsigned_a, - input wire unsigned_b, - input wire f_mode, - input wire [2:0] output_select, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(3'b0), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(3'b100), // registered output: a * b (4) - .register_inputs(1'b0) // unregistered inputs - ); -endmodule - -module QL_DSP2_MULT_REGIN_REGOUT ( // TODO: Name subject to change - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // Port not available in architecture file - input wire reset, - - input wire unsigned_a, - input wire unsigned_b, - input wire f_mode, - input wire [2:0] output_select, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(3'b0), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(3'b100), // registered output: a * b (4) - .register_inputs(1'b1) // registered inputs - ); -endmodule - -module QL_DSP2_MULTADD ( - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - // begin: Ports not available in architecture file - (* clkbuf_sink *) - input wire clk, - input wire reset, - - input wire [ 2:0] feedback, - input wire load_acc, - // end: Ports not available in architecture file - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [ 2:0] output_select, - input wire subtract, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(feedback), - .load_acc(load_acc), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(output_select), // unregistered output: ACCin (2, 3) - .subtract(subtract), - .register_inputs(1'b0) // unregistered inputs - ); -endmodule - -module QL_DSP2_MULTADD_REGIN ( - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // Port not available in architecture file - input wire reset, - - input wire [ 2:0] feedback, - input wire load_acc, - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [ 2:0] output_select, - input wire subtract, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(feedback), - .load_acc(load_acc), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(output_select), // unregistered output: ACCin (2, 3) - .subtract(subtract), - .register_inputs(1'b1) // registered inputs - ); -endmodule - -module QL_DSP2_MULTADD_REGOUT ( - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // Port not available in architecture file - input wire reset, - - input wire [ 2:0] feedback, - input wire load_acc, - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [ 2:0] output_select, - input wire subtract, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(feedback), - .load_acc(load_acc), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(output_select), // registered output: ACCin (6, 7) - .subtract(subtract), - .register_inputs(1'b0) // unregistered inputs - ); -endmodule - -module QL_DSP2_MULTADD_REGIN_REGOUT ( - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // Port not available in architecture file - input wire reset, - - input wire [ 2:0] feedback, - input wire load_acc, - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [ 2:0] output_select, - input wire subtract, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(feedback), - .load_acc(load_acc), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(output_select), // registered output: ACCin (6, 7) - .subtract(subtract), - .register_inputs(1'b1) // registered inputs - ); -endmodule - -module QL_DSP2_MULTACC ( - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // begin: Ports not available in architecture file - input wire reset, - - input wire load_acc, - // end: Ports not available in architecture file - input wire [ 2:0] feedback, - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [ 2:0] output_select, - input wire subtract, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(feedback), - .load_acc(load_acc), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(1'b1), // unregistered output: ACCout (1) - .subtract(subtract), - .register_inputs(1'b0) // unregistered inputs - ); -endmodule - -module QL_DSP2_MULTACC_REGIN ( - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // Port not available in architecture file - input wire reset, - - input wire [ 2:0] feedback, - input wire load_acc, - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [ 2:0] output_select, - input wire subtract, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(feedback), - .load_acc(load_acc), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(1'b1), // unregistered output: ACCout (1) - .subtract(subtract), - .register_inputs(1'b1) // registered inputs - ); -endmodule - -module QL_DSP2_MULTACC_REGOUT ( - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // Port not available in architecture file - input wire reset, - - input wire [ 2:0] feedback, - input wire load_acc, - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [ 2:0] output_select, - input wire subtract, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(feedback), - .load_acc(load_acc), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(3'b101), // registered output: ACCout (5) - .subtract(subtract), - .register_inputs(1'b0) // unregistered inputs - ); -endmodule - -module QL_DSP2_MULTACC_REGIN_REGOUT ( - input wire [19:0] a, - input wire [17:0] b, - output wire [37:0] z, - - (* clkbuf_sink *) - input wire clk, - // Port not available in architecture file - input wire reset, - - input wire [ 2:0] feedback, - input wire load_acc, - input wire unsigned_a, - input wire unsigned_b, - - input wire f_mode, - input wire [ 2:0] output_select, - input wire subtract, - input wire register_inputs -); - - parameter [79:0] MODE_BITS = 80'd0; - - localparam [19:0] COEFF_0 = MODE_BITS[19:0]; - localparam [19:0] COEFF_1 = MODE_BITS[39:20]; - localparam [19:0] COEFF_2 = MODE_BITS[59:40]; - localparam [19:0] COEFF_3 = MODE_BITS[79:60]; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a), - .b(b), - .z(z), - - .f_mode(f_mode), - - .feedback(feedback), - .load_acc(load_acc), - - .unsigned_a(unsigned_a), - .unsigned_b(unsigned_b), - - .clk(clk), - .reset(reset), - - .output_select(3'b101), // registered output: ACCout (5) - .subtract(subtract), - .register_inputs(1'b1) // registered inputs - ); -endmodule - -module dsp_t1_sim # ( - parameter NBITS_ACC = 64, - parameter NBITS_A = 20, - parameter NBITS_B = 18, - parameter NBITS_Z = 38 -)( - input wire [NBITS_A-1:0] a_i, - input wire [NBITS_B-1:0] b_i, - output wire [NBITS_Z-1:0] z_o, - output reg [NBITS_B-1:0] dly_b_o, - - input wire [5:0] acc_fir_i, - input wire [2:0] feedback_i, - input wire load_acc_i, - - input wire unsigned_a_i, - input wire unsigned_b_i, - - input wire clock_i, - input wire s_reset, - - input wire saturate_enable_i, - input wire [2:0] output_select_i, - input wire round_i, - input wire [5:0] shift_right_i, - input wire subtract_i, - input wire register_inputs_i, - input wire [NBITS_A-1:0] coef_0_i, - input wire [NBITS_A-1:0] coef_1_i, - input wire [NBITS_A-1:0] coef_2_i, - input wire [NBITS_A-1:0] coef_3_i -); - -// FIXME: The version of Icarus Verilog from Conda seems not to recognize the -// $error macro. Disable this sanity check for now because of that. -`ifndef __ICARUS__ - if (NBITS_ACC < NBITS_A + NBITS_B) - $error("NBITS_ACC must be > NBITS_A + NBITS_B"); -`endif - - // Input registers - reg [NBITS_A-1:0] r_a; - reg [NBITS_B-1:0] r_b; - reg [5:0] r_acc_fir; - reg r_unsigned_a; - reg r_unsigned_b; - reg r_load_acc; - reg [2:0] r_feedback; - reg [5:0] r_shift_d1; - reg [5:0] r_shift_d2; - reg r_subtract; - reg r_sat; - reg r_rnd; - reg [NBITS_ACC-1:0] acc; - - initial begin - r_a <= 0; - r_b <= 0; - - r_acc_fir <= 0; - r_unsigned_a <= 0; - r_unsigned_b <= 0; - r_feedback <= 0; - r_shift_d1 <= 0; - r_shift_d2 <= 0; - r_subtract <= 0; - r_load_acc <= 0; - r_sat <= 0; - r_rnd <= 0; - end - - always @(posedge clock_i or posedge s_reset) begin - if (s_reset) begin - - r_a <= 'h0; - r_b <= 'h0; - - r_acc_fir <= 0; - r_unsigned_a <= 0; - r_unsigned_b <= 0; - r_feedback <= 0; - r_shift_d1 <= 0; - r_shift_d2 <= 0; - r_subtract <= 0; - r_load_acc <= 0; - r_sat <= 0; - r_rnd <= 0; - - end else begin - - r_a <= a_i; - r_b <= b_i; - - r_acc_fir <= acc_fir_i; - r_unsigned_a <= unsigned_a_i; - r_unsigned_b <= unsigned_b_i; - r_feedback <= feedback_i; - r_shift_d1 <= shift_right_i; - r_shift_d2 <= r_shift_d1; - r_subtract <= subtract_i; - r_load_acc <= load_acc_i; - r_sat <= r_sat; - r_rnd <= r_rnd; - - end - end - - // Registered / non-registered input path select - wire [NBITS_A-1:0] a = register_inputs_i ? r_a : a_i; - wire [NBITS_B-1:0] b = register_inputs_i ? r_b : b_i; - - wire [5:0] acc_fir = register_inputs_i ? r_acc_fir : acc_fir_i; - wire unsigned_a = register_inputs_i ? r_unsigned_a : unsigned_a_i; - wire unsigned_b = register_inputs_i ? r_unsigned_b : unsigned_b_i; - wire [2:0] feedback = register_inputs_i ? r_feedback : feedback_i; - wire load_acc = register_inputs_i ? r_load_acc : load_acc_i; - wire subtract = register_inputs_i ? r_subtract : subtract_i; - wire sat = register_inputs_i ? r_sat : saturate_enable_i; - wire rnd = register_inputs_i ? r_rnd : round_i; - - // Shift right control - wire [5:0] shift_d1 = register_inputs_i ? r_shift_d1 : shift_right_i; - wire [5:0] shift_d2 = output_select_i[1] ? shift_d1 : r_shift_d2; - - // Multiplier - wire unsigned_mode = unsigned_a & unsigned_b; - wire [NBITS_A-1:0] mult_a; - assign mult_a = (feedback == 3'h0) ? a : - (feedback == 3'h1) ? a : - (feedback == 3'h2) ? a : - (feedback == 3'h3) ? acc[NBITS_A-1:0] : - (feedback == 3'h4) ? coef_0_i : - (feedback == 3'h5) ? coef_1_i : - (feedback == 3'h6) ? coef_2_i : - coef_3_i; // if feedback == 3'h7 - - wire [NBITS_B-1:0] mult_b = (feedback == 2'h2) ? {NBITS_B{1'b0}} : b; - - wire [NBITS_A-1:0] mult_sgn_a = mult_a[NBITS_A-1]; - wire [NBITS_A-1:0] mult_mag_a = (mult_sgn_a && !unsigned_a) ? (~mult_a + 1) : mult_a; - wire [NBITS_B-1:0] mult_sgn_b = mult_b[NBITS_B-1]; - wire [NBITS_B-1:0] mult_mag_b = (mult_sgn_b && !unsigned_b) ? (~mult_b + 1) : mult_b; - - wire [NBITS_A+NBITS_B-1:0] mult_mag = mult_mag_a * mult_mag_b; - wire mult_sgn = (mult_sgn_a && !unsigned_a) ^ (mult_sgn_b && !unsigned_b); - - wire [NBITS_A+NBITS_B-1:0] mult = (unsigned_a && unsigned_b) ? - (mult_a * mult_b) : (mult_sgn ? (~mult_mag + 1) : mult_mag); - - // Sign extension - wire [NBITS_ACC-1:0] mult_xtnd = unsigned_mode ? - {{(NBITS_ACC-NBITS_A-NBITS_B){1'b0}}, mult[NBITS_A+NBITS_B-1:0]} : - {{(NBITS_ACC-NBITS_A-NBITS_B){mult[NBITS_A+NBITS_B-1]}}, mult[NBITS_A+NBITS_B-1:0]}; - - // Adder - wire [NBITS_ACC-1:0] acc_fir_int = unsigned_a ? {{(NBITS_ACC-NBITS_A){1'b0}}, a} : - {{(NBITS_ACC-NBITS_A){a[NBITS_A-1]}}, a} ; - - wire [NBITS_ACC-1:0] add_a = (subtract) ? (~mult_xtnd + 1) : mult_xtnd; - wire [NBITS_ACC-1:0] add_b = (feedback_i == 3'h0) ? acc : - (feedback_i == 3'h1) ? {{NBITS_ACC}{1'b0}} : (acc_fir_int << acc_fir); - - wire [NBITS_ACC-1:0] add_o = add_a + add_b; - - // Accumulator - initial acc <= 0; - - always @(posedge clock_i or posedge s_reset) - if (s_reset) acc <= 'h0; - else begin - if (load_acc) - acc <= add_o; - else - acc <= acc; - end - - // Adder/accumulator output selection - wire [NBITS_ACC-1:0] acc_out = (output_select_i[1]) ? add_o : acc; - - // Round, shift, saturate - wire [NBITS_ACC-1:0] acc_rnd = (rnd && (shift_right_i != 0)) ? (acc_out + ({{(NBITS_ACC-1){1'b0}}, 1'b1} << (shift_right_i - 1))) : - acc_out; - - wire [NBITS_ACC-1:0] acc_shr = (unsigned_mode) ? (acc_rnd >> shift_right_i) : - (acc_rnd >>> shift_right_i); - - wire [NBITS_ACC-1:0] acc_sat_u = (acc_shr[NBITS_ACC-1:NBITS_Z] != 0) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{NBITS_Z{1'b1}}} : - {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}}; - - wire [NBITS_ACC-1:0] acc_sat_s = ((|acc_shr[NBITS_ACC-1:NBITS_Z-1] == 1'b0) || - (&acc_shr[NBITS_ACC-1:NBITS_Z-1] == 1'b1)) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}} : - {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_ACC-1],{NBITS_Z-1{~acc_shr[NBITS_ACC-1]}}}}; - - wire [NBITS_ACC-1:0] acc_sat = (sat) ? ((unsigned_mode) ? acc_sat_u : acc_sat_s) : acc_shr; - - // Output signals - wire [NBITS_Z-1:0] z0; - reg [NBITS_Z-1:0] z1; - wire [NBITS_Z-1:0] z2; - - assign z0 = mult_xtnd[NBITS_Z-1:0]; - assign z2 = acc_sat[NBITS_Z-1:0]; - - initial z1 <= 0; - - always @(posedge clock_i or posedge s_reset) - if (s_reset) - z1 <= 0; - else begin - z1 <= (output_select_i == 3'b100) ? z0 : z2; - end - - // Output mux - assign z_o = (output_select_i == 3'h0) ? z0 : - (output_select_i == 3'h1) ? z2 : - (output_select_i == 3'h2) ? z2 : - (output_select_i == 3'h3) ? z2 : - (output_select_i == 3'h4) ? z1 : - (output_select_i == 3'h5) ? z1 : - (output_select_i == 3'h6) ? z1 : - z1; // if output_select_i == 3'h7 - - // B input delayed passthrough - initial dly_b_o <= 0; - - always @(posedge clock_i or posedge s_reset) - if (s_reset) - dly_b_o <= 0; - else - dly_b_o <= b_i; - -endmodule - -module dsp_t1_20x18x64 ( - input wire [19:0] a_i, - input wire [17:0] b_i, - input wire [ 5:0] acc_fir_i, - output wire [37:0] z_o, - output wire [17:0] dly_b_o, - - (* clkbuf_sink *) - input wire clock_i, - input wire reset_i, - - input wire [ 2:0] feedback_i, - input wire load_acc_i, - input wire unsigned_a_i, - input wire unsigned_b_i, - - input wire [ 2:0] output_select_i, - input wire saturate_enable_i, - input wire [ 5:0] shift_right_i, - input wire round_i, - input wire subtract_i, - input wire register_inputs_i -); - - parameter [19:0] COEFF_0 = 20'd0; - parameter [19:0] COEFF_1 = 20'd0; - parameter [19:0] COEFF_2 = 20'd0; - parameter [19:0] COEFF_3 = 20'd0; - - QL_DSP2 #( - .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) - ) dsp ( - .a(a_i), - .b(b_i), - .z(z_o), - .dly_b(dly_b_o), - - .f_mode(1'b0), // 20x18x64 DSP - - .acc_fir(acc_fir_i), - .feedback(feedback_i), - .load_acc(load_acc_i), - - .unsigned_a(unsigned_a_i), - .unsigned_b(unsigned_b_i), - - .clk(clock_i), - .reset(reset_i), - - .saturate_enable(saturate_enable_i), - .output_select(output_select_i), - .round(round_i), - .shift_right(shift_right_i), - .subtract(subtract_i), - .register_inputs(register_inputs_i) - ); -endmodule - -module dsp_t1_10x9x32 ( - input wire [ 9:0] a_i, - input wire [ 8:0] b_i, - input wire [ 5:0] acc_fir_i, - output wire [18:0] z_o, - output wire [ 8:0] dly_b_o, - - (* clkbuf_sink *) - input wire clock_i, - input wire reset_i, - - input wire [ 2:0] feedback_i, - input wire load_acc_i, - input wire unsigned_a_i, - input wire unsigned_b_i, - - input wire [ 2:0] output_select_i, - input wire saturate_enable_i, - input wire [ 5:0] shift_right_i, - input wire round_i, - input wire subtract_i, - input wire register_inputs_i -); - - parameter [9:0] COEFF_0 = 10'd0; - parameter [9:0] COEFF_1 = 10'd0; - parameter [9:0] COEFF_2 = 10'd0; - parameter [9:0] COEFF_3 = 10'd0; - - wire [18:0] z_rem; - wire [8:0] dly_b_rem; - - QL_DSP2 #( - .MODE_BITS({10'd0, COEFF_3, - 10'd0, COEFF_2, - 10'd0, COEFF_1, - 10'd0, COEFF_0}) - ) dsp ( - .a({10'd0, a_i}), - .b({9'd0, b_i}), - .z({z_rem, z_o}), - .dly_b({dly_b_rem, dly_b_o}), - - .f_mode(1'b1), // 10x9x32 DSP - - .acc_fir(acc_fir_i), - .feedback(feedback_i), - .load_acc(load_acc_i), - - .unsigned_a(unsigned_a_i), - .unsigned_b(unsigned_b_i), - - .clk(clock_i), - .reset(reset_i), - - .saturate_enable(saturate_enable_i), - .output_select(output_select_i), - .round(round_i), - .shift_right(shift_right_i), - .subtract(subtract_i), - .register_inputs(register_inputs_i) - ); -endmodule diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v new file mode 100644 index 000000000..9164d8cda --- /dev/null +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v @@ -0,0 +1,2380 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`default_nettype none + +(* blackbox *) +module QL_DSP1 ( + input wire [19:0] a, + input wire [17:0] b, + (* clkbuf_sink *) + input wire clk0, + (* clkbuf_sink *) + input wire clk1, + input wire [ 1:0] feedback0, + input wire [ 1:0] feedback1, + input wire load_acc0, + input wire load_acc1, + input wire reset0, + input wire reset1, + output reg [37:0] z +); + parameter MODE_BITS = 27'b00000000000000000000000000; +endmodule /* QL_DSP1 */ + + + +// ---------------------------------------- // +// ----- DSP cells simulation modules ----- // +// --------- Control bits in ports -------- // +// ---------------------------------------- // + +module QL_DSP2 ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + input wire [ 5:0] acc_fir, + output wire [37:0] z, + output wire [17:0] dly_b, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [2:0] output_select, + input wire saturate_enable, + input wire [5:0] shift_right, + input wire round, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam NBITS_ACC = 64; + localparam NBITS_A = 20; + localparam NBITS_B = 18; + localparam NBITS_Z = 38; + + wire [NBITS_Z-1:0] dsp_full_z; + wire [(NBITS_Z/2)-1:0] dsp_frac0_z; + wire [(NBITS_Z/2)-1:0] dsp_frac1_z; + + wire [NBITS_B-1:0] dsp_full_dly_b; + wire [(NBITS_B/2)-1:0] dsp_frac0_dly_b; + wire [(NBITS_B/2)-1:0] dsp_frac1_dly_b; + + assign z = f_mode ? {dsp_frac1_z, dsp_frac0_z} : dsp_full_z; + assign dly_b = f_mode ? {dsp_frac1_dly_b, dsp_frac0_dly_b} : dsp_full_dly_b; + + // Output used when fmode == 1 + dsp_t1_sim_cfg_ports #( + .NBITS_A(NBITS_A/2), + .NBITS_B(NBITS_B/2), + .NBITS_ACC(NBITS_ACC/2), + .NBITS_Z(NBITS_Z/2) + ) dsp_frac0 ( + .a_i(a[(NBITS_A/2)-1:0]), + .b_i(b[(NBITS_B/2)-1:0]), + .z_o(dsp_frac0_z), + .dly_b_o(dsp_frac0_dly_b), + + .acc_fir_i(acc_fir), + .feedback_i(feedback), + .load_acc_i(load_acc), + + .unsigned_a_i(unsigned_a), + .unsigned_b_i(unsigned_b), + + .clock_i(clk), + .s_reset(reset), + + .saturate_enable_i(saturate_enable), + .output_select_i(output_select), + .round_i(round), + .shift_right_i(shift_right), + .subtract_i(subtract), + .register_inputs_i(register_inputs), + .coef_0_i(COEFF_0[(NBITS_A/2)-1:0]), + .coef_1_i(COEFF_1[(NBITS_A/2)-1:0]), + .coef_2_i(COEFF_2[(NBITS_A/2)-1:0]), + .coef_3_i(COEFF_3[(NBITS_A/2)-1:0]) + ); + + // Output used when fmode == 1 + dsp_t1_sim_cfg_ports #( + .NBITS_A(NBITS_A/2), + .NBITS_B(NBITS_B/2), + .NBITS_ACC(NBITS_ACC/2), + .NBITS_Z(NBITS_Z/2) + ) dsp_frac1 ( + .a_i(a[NBITS_A-1:NBITS_A/2]), + .b_i(b[NBITS_B-1:NBITS_B/2]), + .z_o(dsp_frac1_z), + .dly_b_o(dsp_frac1_dly_b), + + .acc_fir_i(acc_fir), + .feedback_i(feedback), + .load_acc_i(load_acc), + + .unsigned_a_i(unsigned_a), + .unsigned_b_i(unsigned_b), + + .clock_i(clk), + .s_reset(reset), + + .saturate_enable_i(saturate_enable), + .output_select_i(output_select), + .round_i(round), + .shift_right_i(shift_right), + .subtract_i(subtract), + .register_inputs_i(register_inputs), + .coef_0_i(COEFF_0[NBITS_A-1:NBITS_A/2]), + .coef_1_i(COEFF_1[NBITS_A-1:NBITS_A/2]), + .coef_2_i(COEFF_2[NBITS_A-1:NBITS_A/2]), + .coef_3_i(COEFF_3[NBITS_A-1:NBITS_A/2]) + ); + + // Output used when fmode == 0 + dsp_t1_sim_cfg_ports #( + .NBITS_A(NBITS_A), + .NBITS_B(NBITS_B), + .NBITS_ACC(NBITS_ACC), + .NBITS_Z(NBITS_Z) + ) dsp_full ( + .a_i(a), + .b_i(b), + .z_o(dsp_full_z), + .dly_b_o(dsp_full_dly_b), + + .acc_fir_i(acc_fir), + .feedback_i(feedback), + .load_acc_i(load_acc), + + .unsigned_a_i(unsigned_a), + .unsigned_b_i(unsigned_b), + + .clock_i(clk), + .s_reset(reset), + + .saturate_enable_i(saturate_enable), + .output_select_i(output_select), + .round_i(round), + .shift_right_i(shift_right), + .subtract_i(subtract), + .register_inputs_i(register_inputs), + .coef_0_i(COEFF_0), + .coef_1_i(COEFF_1), + .coef_2_i(COEFF_2), + .coef_3_i(COEFF_3) + ); +endmodule + +module QL_DSP2_MULT ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + // Port not available in architecture file + input wire reset, + + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [2:0] output_select, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .reset(reset), + + .f_mode(f_mode), + + .feedback(3'b0), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .output_select(3'b0), // unregistered output: a * b (0) + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULT_REGIN ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // Port not available in architecture file + input wire reset, + + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [2:0] output_select, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(3'b0), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b0), // unregistered output: a * b (0) + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULT_REGOUT ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // Port not available in architecture file + input wire reset, + + input wire unsigned_a, + input wire unsigned_b, + input wire f_mode, + input wire [2:0] output_select, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(3'b0), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b100), // registered output: a * b (4) + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULT_REGIN_REGOUT ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // Port not available in architecture file + input wire reset, + + input wire unsigned_a, + input wire unsigned_b, + input wire f_mode, + input wire [2:0] output_select, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(3'b0), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b100), // registered output: a * b (4) + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULTADD ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + // begin: Ports not available in architecture file + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + // end: Ports not available in architecture file + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(output_select), // unregistered output: ACCin (2, 3) + .subtract(subtract), + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULTADD_REGIN ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // Port not available in architecture file + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(output_select), // unregistered output: ACCin (2, 3) + .subtract(subtract), + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULTADD_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // Port not available in architecture file + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(output_select), // registered output: ACCin (6, 7) + .subtract(subtract), + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULTADD_REGIN_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // Port not available in architecture file + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(output_select), // registered output: ACCin (6, 7) + .subtract(subtract), + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULTACC ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // begin: Ports not available in architecture file + input wire reset, + + input wire load_acc, + // end: Ports not available in architecture file + input wire [ 2:0] feedback, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(1'b1), // unregistered output: ACCout (1) + .subtract(subtract), + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULTACC_REGIN ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // Port not available in architecture file + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(1'b1), // unregistered output: ACCout (1) + .subtract(subtract), + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module QL_DSP2_MULTACC_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // Port not available in architecture file + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b101), // registered output: ACCout (5) + .subtract(subtract), + .register_inputs(1'b0) // unregistered inputs + ); +endmodule + +module QL_DSP2_MULTACC_REGIN_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + // Port not available in architecture file + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + + input wire f_mode, + input wire [ 2:0] output_select, + input wire subtract, + input wire register_inputs +); + + parameter [79:0] MODE_BITS = 80'd0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .f_mode(f_mode), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + + .output_select(3'b101), // registered output: ACCout (5) + .subtract(subtract), + .register_inputs(1'b1) // registered inputs + ); +endmodule + +module dsp_t1_20x18x64_cfg_ports ( + input wire [19:0] a_i, + input wire [17:0] b_i, + input wire [ 5:0] acc_fir_i, + output wire [37:0] z_o, + output wire [17:0] dly_b_o, + + (* clkbuf_sink *) + input wire clock_i, + input wire reset_i, + + input wire [ 2:0] feedback_i, + input wire load_acc_i, + input wire unsigned_a_i, + input wire unsigned_b_i, + + input wire [ 2:0] output_select_i, + input wire saturate_enable_i, + input wire [ 5:0] shift_right_i, + input wire round_i, + input wire subtract_i, + input wire register_inputs_i +); + + parameter [19:0] COEFF_0 = 20'd0; + parameter [19:0] COEFF_1 = 20'd0; + parameter [19:0] COEFF_2 = 20'd0; + parameter [19:0] COEFF_3 = 20'd0; + + QL_DSP2 #( + .MODE_BITS({COEFF_3, COEFF_2, COEFF_1, COEFF_0}) + ) dsp ( + .a(a_i), + .b(b_i), + .z(z_o), + .dly_b(dly_b_o), + + .f_mode(1'b0), // 20x18x64 DSP + + .acc_fir(acc_fir_i), + .feedback(feedback_i), + .load_acc(load_acc_i), + + .unsigned_a(unsigned_a_i), + .unsigned_b(unsigned_b_i), + + .clk(clock_i), + .reset(reset_i), + + .saturate_enable(saturate_enable_i), + .output_select(output_select_i), + .round(round_i), + .shift_right(shift_right_i), + .subtract(subtract_i), + .register_inputs(register_inputs_i) + ); +endmodule + +module dsp_t1_10x9x32_cfg_ports ( + input wire [ 9:0] a_i, + input wire [ 8:0] b_i, + input wire [ 5:0] acc_fir_i, + output wire [18:0] z_o, + output wire [ 8:0] dly_b_o, + + (* clkbuf_sink *) + input wire clock_i, + input wire reset_i, + + input wire [ 2:0] feedback_i, + input wire load_acc_i, + input wire unsigned_a_i, + input wire unsigned_b_i, + + input wire [ 2:0] output_select_i, + input wire saturate_enable_i, + input wire [ 5:0] shift_right_i, + input wire round_i, + input wire subtract_i, + input wire register_inputs_i +); + + parameter [9:0] COEFF_0 = 10'd0; + parameter [9:0] COEFF_1 = 10'd0; + parameter [9:0] COEFF_2 = 10'd0; + parameter [9:0] COEFF_3 = 10'd0; + + wire [18:0] z_rem; + wire [8:0] dly_b_rem; + + QL_DSP2 #( + .MODE_BITS({10'd0, COEFF_3, + 10'd0, COEFF_2, + 10'd0, COEFF_1, + 10'd0, COEFF_0}) + ) dsp ( + .a({10'd0, a_i}), + .b({9'd0, b_i}), + .z({z_rem, z_o}), + .dly_b({dly_b_rem, dly_b_o}), + + .f_mode(1'b1), // 10x9x32 DSP + + .acc_fir(acc_fir_i), + .feedback(feedback_i), + .load_acc(load_acc_i), + + .unsigned_a(unsigned_a_i), + .unsigned_b(unsigned_b_i), + + .clk(clock_i), + .reset(reset_i), + + .saturate_enable(saturate_enable_i), + .output_select(output_select_i), + .round(round_i), + .shift_right(shift_right_i), + .subtract(subtract_i), + .register_inputs(register_inputs_i) + ); +endmodule + +module dsp_t1_sim_cfg_ports # ( + parameter NBITS_ACC = 64, + parameter NBITS_A = 20, + parameter NBITS_B = 18, + parameter NBITS_Z = 38 +)( + input wire [NBITS_A-1:0] a_i, + input wire [NBITS_B-1:0] b_i, + output wire [NBITS_Z-1:0] z_o, + output reg [NBITS_B-1:0] dly_b_o, + + input wire [5:0] acc_fir_i, + input wire [2:0] feedback_i, + input wire load_acc_i, + + input wire unsigned_a_i, + input wire unsigned_b_i, + + input wire clock_i, + input wire s_reset, + + input wire saturate_enable_i, + input wire [2:0] output_select_i, + input wire round_i, + input wire [5:0] shift_right_i, + input wire subtract_i, + input wire register_inputs_i, + input wire [NBITS_A-1:0] coef_0_i, + input wire [NBITS_A-1:0] coef_1_i, + input wire [NBITS_A-1:0] coef_2_i, + input wire [NBITS_A-1:0] coef_3_i +); + +// FIXME: The version of Icarus Verilog from Conda seems not to recognize the +// $error macro. Disable this sanity check for now because of that. +`ifndef __ICARUS__ + if (NBITS_ACC < NBITS_A + NBITS_B) + $error("NBITS_ACC must be > NBITS_A + NBITS_B"); +`endif + + // Input registers + reg [NBITS_A-1:0] r_a; + reg [NBITS_B-1:0] r_b; + reg [5:0] r_acc_fir; + reg r_unsigned_a; + reg r_unsigned_b; + reg r_load_acc; + reg [2:0] r_feedback; + reg [5:0] r_shift_d1; + reg [5:0] r_shift_d2; + reg r_subtract; + reg r_sat; + reg r_rnd; + reg [NBITS_ACC-1:0] acc; + + initial begin + r_a <= 0; + r_b <= 0; + + r_acc_fir <= 0; + r_unsigned_a <= 0; + r_unsigned_b <= 0; + r_feedback <= 0; + r_shift_d1 <= 0; + r_shift_d2 <= 0; + r_subtract <= 0; + r_load_acc <= 0; + r_sat <= 0; + r_rnd <= 0; + end + + always @(posedge clock_i or posedge s_reset) begin + if (s_reset) begin + + r_a <= 'h0; + r_b <= 'h0; + + r_acc_fir <= 0; + r_unsigned_a <= 0; + r_unsigned_b <= 0; + r_feedback <= 0; + r_shift_d1 <= 0; + r_shift_d2 <= 0; + r_subtract <= 0; + r_load_acc <= 0; + r_sat <= 0; + r_rnd <= 0; + + end else begin + + r_a <= a_i; + r_b <= b_i; + + r_acc_fir <= acc_fir_i; + r_unsigned_a <= unsigned_a_i; + r_unsigned_b <= unsigned_b_i; + r_feedback <= feedback_i; + r_shift_d1 <= shift_right_i; + r_shift_d2 <= r_shift_d1; + r_subtract <= subtract_i; + r_load_acc <= load_acc_i; + r_sat <= r_sat; + r_rnd <= r_rnd; + + end + end + + // Registered / non-registered input path select + wire [NBITS_A-1:0] a = register_inputs_i ? r_a : a_i; + wire [NBITS_B-1:0] b = register_inputs_i ? r_b : b_i; + + wire [5:0] acc_fir = register_inputs_i ? r_acc_fir : acc_fir_i; + wire unsigned_a = register_inputs_i ? r_unsigned_a : unsigned_a_i; + wire unsigned_b = register_inputs_i ? r_unsigned_b : unsigned_b_i; + wire [2:0] feedback = register_inputs_i ? r_feedback : feedback_i; + wire load_acc = register_inputs_i ? r_load_acc : load_acc_i; + wire subtract = register_inputs_i ? r_subtract : subtract_i; + wire sat = register_inputs_i ? r_sat : saturate_enable_i; + wire rnd = register_inputs_i ? r_rnd : round_i; + + // Shift right control + wire [5:0] shift_d1 = register_inputs_i ? r_shift_d1 : shift_right_i; + wire [5:0] shift_d2 = output_select_i[1] ? shift_d1 : r_shift_d2; + + // Multiplier + wire unsigned_mode = unsigned_a & unsigned_b; + wire [NBITS_A-1:0] mult_a; + assign mult_a = (feedback == 3'h0) ? a : + (feedback == 3'h1) ? a : + (feedback == 3'h2) ? a : + (feedback == 3'h3) ? acc[NBITS_A-1:0] : + (feedback == 3'h4) ? coef_0_i : + (feedback == 3'h5) ? coef_1_i : + (feedback == 3'h6) ? coef_2_i : + coef_3_i; // if feedback == 3'h7 + + wire [NBITS_B-1:0] mult_b = (feedback == 2'h2) ? {NBITS_B{1'b0}} : b; + + wire [NBITS_A-1:0] mult_sgn_a = mult_a[NBITS_A-1]; + wire [NBITS_A-1:0] mult_mag_a = (mult_sgn_a && !unsigned_a) ? (~mult_a + 1) : mult_a; + wire [NBITS_B-1:0] mult_sgn_b = mult_b[NBITS_B-1]; + wire [NBITS_B-1:0] mult_mag_b = (mult_sgn_b && !unsigned_b) ? (~mult_b + 1) : mult_b; + + wire [NBITS_A+NBITS_B-1:0] mult_mag = mult_mag_a * mult_mag_b; + wire mult_sgn = (mult_sgn_a && !unsigned_a) ^ (mult_sgn_b && !unsigned_b); + + wire [NBITS_A+NBITS_B-1:0] mult = (unsigned_a && unsigned_b) ? + (mult_a * mult_b) : (mult_sgn ? (~mult_mag + 1) : mult_mag); + + // Sign extension + wire [NBITS_ACC-1:0] mult_xtnd = unsigned_mode ? + {{(NBITS_ACC-NBITS_A-NBITS_B){1'b0}}, mult[NBITS_A+NBITS_B-1:0]} : + {{(NBITS_ACC-NBITS_A-NBITS_B){mult[NBITS_A+NBITS_B-1]}}, mult[NBITS_A+NBITS_B-1:0]}; + + // Adder + wire [NBITS_ACC-1:0] acc_fir_int = unsigned_a ? {{(NBITS_ACC-NBITS_A){1'b0}}, a} : + {{(NBITS_ACC-NBITS_A){a[NBITS_A-1]}}, a} ; + + wire [NBITS_ACC-1:0] add_a = (subtract) ? (~mult_xtnd + 1) : mult_xtnd; + wire [NBITS_ACC-1:0] add_b = (feedback_i == 3'h0) ? acc : + (feedback_i == 3'h1) ? {{NBITS_ACC}{1'b0}} : (acc_fir_int << acc_fir); + + wire [NBITS_ACC-1:0] add_o = add_a + add_b; + + // Accumulator + initial acc <= 0; + + always @(posedge clock_i or posedge s_reset) + if (s_reset) acc <= 'h0; + else begin + if (load_acc) + acc <= add_o; + else + acc <= acc; + end + + // Adder/accumulator output selection + wire [NBITS_ACC-1:0] acc_out = (output_select_i[1]) ? add_o : acc; + + // Round, shift, saturate + wire [NBITS_ACC-1:0] acc_rnd = (rnd && (shift_right_i != 0)) ? (acc_out + ({{(NBITS_ACC-1){1'b0}}, 1'b1} << (shift_right_i - 1))) : + acc_out; + + wire [NBITS_ACC-1:0] acc_shr = (unsigned_mode) ? (acc_rnd >> shift_right_i) : + (acc_rnd >>> shift_right_i); + + wire [NBITS_ACC-1:0] acc_sat_u = (acc_shr[NBITS_ACC-1:NBITS_Z] != 0) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{NBITS_Z{1'b1}}} : + {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}}; + + wire [NBITS_ACC-1:0] acc_sat_s = ((|acc_shr[NBITS_ACC-1:NBITS_Z-1] == 1'b0) || + (&acc_shr[NBITS_ACC-1:NBITS_Z-1] == 1'b1)) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}} : + {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_ACC-1],{NBITS_Z-1{~acc_shr[NBITS_ACC-1]}}}}; + + wire [NBITS_ACC-1:0] acc_sat = (sat) ? ((unsigned_mode) ? acc_sat_u : acc_sat_s) : acc_shr; + + // Output signals + wire [NBITS_Z-1:0] z0; + reg [NBITS_Z-1:0] z1; + wire [NBITS_Z-1:0] z2; + + assign z0 = mult_xtnd[NBITS_Z-1:0]; + assign z2 = acc_sat[NBITS_Z-1:0]; + + initial z1 <= 0; + + always @(posedge clock_i or posedge s_reset) + if (s_reset) + z1 <= 0; + else begin + z1 <= (output_select_i == 3'b100) ? z0 : z2; + end + + // Output mux + assign z_o = (output_select_i == 3'h0) ? z0 : + (output_select_i == 3'h1) ? z2 : + (output_select_i == 3'h2) ? z2 : + (output_select_i == 3'h3) ? z2 : + (output_select_i == 3'h4) ? z1 : + (output_select_i == 3'h5) ? z1 : + (output_select_i == 3'h6) ? z1 : + z1; // if output_select_i == 3'h7 + + // B input delayed passthrough + initial dly_b_o <= 0; + + always @(posedge clock_i or posedge s_reset) + if (s_reset) + dly_b_o <= 0; + else + dly_b_o <= b_i; + +endmodule + + + +// ---------------------------------------- // +// ----- DSP cells simulation modules ----- // +// ------ Control bits in parameters ------ // +// ---------------------------------------- // + +module QL_DSP3 ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + input wire [ 5:0] acc_fir, + output wire [37:0] z, + output wire [17:0] dly_b, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + input wire subtract +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; + + localparam NBITS_ACC = 64; + localparam NBITS_A = 20; + localparam NBITS_B = 18; + localparam NBITS_Z = 38; + + // Fractured + generate if(F_MODE == 1'b1) begin + + wire [(NBITS_Z/2)-1:0] dsp_frac0_z; + wire [(NBITS_Z/2)-1:0] dsp_frac1_z; + + wire [(NBITS_B/2)-1:0] dsp_frac0_dly_b; + wire [(NBITS_B/2)-1:0] dsp_frac1_dly_b; + + dsp_t1_sim_cfg_params #( + .NBITS_A (NBITS_A/2), + .NBITS_B (NBITS_B/2), + .NBITS_ACC (NBITS_ACC/2), + .NBITS_Z (NBITS_Z/2), + .OUTPUT_SELECT (OUTPUT_SELECT), + .SATURATE_ENABLE (SATURATE_ENABLE), + .SHIFT_RIGHT (SHIFT_RIGHT), + .ROUND (ROUND), + .REGISTER_INPUTS (REGISTER_INPUTS) + ) dsp_frac0 ( + .a_i(a[(NBITS_A/2)-1:0]), + .b_i(b[(NBITS_B/2)-1:0]), + .z_o(dsp_frac0_z), + .dly_b_o(dsp_frac0_dly_b), + + .acc_fir_i(acc_fir), + .feedback_i(feedback), + .load_acc_i(load_acc), + + .unsigned_a_i(unsigned_a), + .unsigned_b_i(unsigned_b), + + .clock_i(clk), + .s_reset(reset), + + .subtract_i(subtract), + .coef_0_i(COEFF_0[(NBITS_A/2)-1:0]), + .coef_1_i(COEFF_1[(NBITS_A/2)-1:0]), + .coef_2_i(COEFF_2[(NBITS_A/2)-1:0]), + .coef_3_i(COEFF_3[(NBITS_A/2)-1:0]) + ); + + dsp_t1_sim_cfg_params #( + .NBITS_A (NBITS_A/2), + .NBITS_B (NBITS_B/2), + .NBITS_ACC (NBITS_ACC/2), + .NBITS_Z (NBITS_Z/2), + .OUTPUT_SELECT (OUTPUT_SELECT), + .SATURATE_ENABLE (SATURATE_ENABLE), + .SHIFT_RIGHT (SHIFT_RIGHT), + .ROUND (ROUND), + .REGISTER_INPUTS (REGISTER_INPUTS) + ) dsp_frac1 ( + .a_i(a[NBITS_A-1:NBITS_A/2]), + .b_i(b[NBITS_B-1:NBITS_B/2]), + .z_o(dsp_frac1_z), + .dly_b_o(dsp_frac1_dly_b), + .acc_fir_i(acc_fir), + .feedback_i(feedback), + .load_acc_i(load_acc), + + .unsigned_a_i(unsigned_a), + .unsigned_b_i(unsigned_b), + + .clock_i(clk), + .s_reset(reset), + + .subtract_i(subtract), + .coef_0_i(COEFF_0[NBITS_A-1:NBITS_A/2]), + .coef_1_i(COEFF_1[NBITS_A-1:NBITS_A/2]), + .coef_2_i(COEFF_2[NBITS_A-1:NBITS_A/2]), + .coef_3_i(COEFF_3[NBITS_A-1:NBITS_A/2]) + ); + + assign z = {dsp_frac1_z, dsp_frac0_z}; + assign dly_b = {dsp_frac1_dly_b, dsp_frac0_dly_b}; + + // Whole + end else begin + + dsp_t1_sim_cfg_params #( + .NBITS_A (NBITS_A), + .NBITS_B (NBITS_B), + .NBITS_ACC (NBITS_ACC), + .NBITS_Z (NBITS_Z), + .OUTPUT_SELECT (OUTPUT_SELECT), + .SATURATE_ENABLE (SATURATE_ENABLE), + .SHIFT_RIGHT (SHIFT_RIGHT), + .ROUND (ROUND), + .REGISTER_INPUTS (REGISTER_INPUTS) + ) dsp_full ( + .a_i(a), + .b_i(b), + .z_o(z), + .dly_b_o(dly_b), + + .acc_fir_i(acc_fir), + .feedback_i(feedback), + .load_acc_i(load_acc), + + .unsigned_a_i(unsigned_a), + .unsigned_b_i(unsigned_b), + + .clock_i(clk), + .s_reset(reset), + + .subtract_i(subtract), + .coef_0_i(COEFF_0), + .coef_1_i(COEFF_1), + .coef_2_i(COEFF_2), + .coef_3_i(COEFF_3) + ); + + end endgenerate + +endmodule + +module QL_DSP3_MULT ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + input wire reset, + + input wire [2:0] feedback, + input wire unsigned_a, + input wire unsigned_b +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = 3'b0; // unregistered output: a * b (0) + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = 1'b0; // unregistered inputs + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .reset(reset), + + .feedback(feedback), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b) + ); +endmodule + +module QL_DSP3_MULT_REGIN ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [2:0] feedback, + + input wire unsigned_a, + input wire unsigned_b +); + + wire [37:0] dly_b_o; + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = 3'b0; // unregistered output: a * b (0) + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = 1'b1; // registered inputs + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset) + ); +endmodule + +module QL_DSP3_MULT_REGOUT ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [2:0] feedback, + + input wire unsigned_a, + input wire unsigned_b +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = 3'b100; // registered output: a * b (4) + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = 1'b0; // unregistered inputs + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset) + ); +endmodule + +module QL_DSP3_MULT_REGIN_REGOUT ( // TODO: Name subject to change + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [2:0] feedback, + + input wire unsigned_a, + input wire unsigned_b +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = 3'b100; // registered output: a * b (4) + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = 1'b1; // unregistered inputs + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset) + ); +endmodule + +module QL_DSP3_MULTADD ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + input wire reset, + + input wire [ 2:0] feedback, + input wire [ 5:0] acc_fir, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + input wire subtract +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + .acc_fir(acc_fir), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .reset(reset), + .subtract(subtract) + ); +endmodule + +module QL_DSP3_MULTADD_REGIN ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire [ 5:0] acc_fir, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + input wire subtract +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + .acc_fir(acc_fir), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + .subtract(subtract) + ); +endmodule + +module QL_DSP3_MULTADD_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire [ 5:0] acc_fir, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + input wire subtract +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + .acc_fir(acc_fir), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + .subtract(subtract) + ); +endmodule + +module QL_DSP3_MULTADD_REGIN_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire [ 5:0] acc_fir, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + input wire subtract +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + .acc_fir(acc_fir), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + .subtract(subtract) + ); +endmodule + +module QL_DSP3_MULTACC ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + input wire subtract +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + .subtract(subtract) + ); +endmodule + +module QL_DSP3_MULTACC_REGIN ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + input wire subtract +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + .subtract(subtract) + ); +endmodule + +module QL_DSP3_MULTACC_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + input wire subtract +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + .subtract(subtract) + ); +endmodule + +module QL_DSP3_MULTACC_REGIN_REGOUT ( + input wire [19:0] a, + input wire [17:0] b, + output wire [37:0] z, + + (* clkbuf_sink *) + input wire clk, + input wire reset, + + input wire [ 2:0] feedback, + input wire load_acc, + input wire unsigned_a, + input wire unsigned_b, + input wire subtract +); + + parameter [92:0] MODE_BITS = 93'b0; + + localparam [19:0] COEFF_0 = MODE_BITS[19:0]; + localparam [19:0] COEFF_1 = MODE_BITS[39:20]; + localparam [19:0] COEFF_2 = MODE_BITS[59:40]; + localparam [19:0] COEFF_3 = MODE_BITS[79:60]; + + localparam [0:0] F_MODE = MODE_BITS[80]; + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; + localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; + localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; + localparam [0:0] ROUND = MODE_BITS[91]; + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; + + QL_DSP3 #( + .MODE_BITS({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + F_MODE, + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a), + .b(b), + .z(z), + + .feedback(feedback), + .load_acc(load_acc), + + .unsigned_a(unsigned_a), + .unsigned_b(unsigned_b), + + .clk(clk), + .reset(reset), + .subtract(subtract) + ); +endmodule + +module dsp_t1_20x18x64_cfg_params ( + input wire [19:0] a_i, + input wire [17:0] b_i, + input wire [ 5:0] acc_fir_i, + output wire [37:0] z_o, + output wire [17:0] dly_b_o, + + (* clkbuf_sink *) + input wire clock_i, + input wire reset_i, + + input wire [ 2:0] feedback_i, + input wire load_acc_i, + input wire unsigned_a_i, + input wire unsigned_b_i, + input wire subtract_i +); + + parameter [19:0] COEFF_0 = 20'b0; + parameter [19:0] COEFF_1 = 20'b0; + parameter [19:0] COEFF_2 = 20'b0; + parameter [19:0] COEFF_3 = 20'b0; + + parameter [2:0] OUTPUT_SELECT = 3'b0; + parameter [0:0] SATURATE_ENABLE = 1'b0; + parameter [5:0] SHIFT_RIGHT = 6'b0; + parameter [0:0] ROUND = 1'b0; + parameter [0:0] REGISTER_INPUTS = 1'b0; + + QL_DSP3 #( + .MODE_BITS ({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + 1'b0, // Not fractured + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) dsp ( + .a(a_i), + .b(b_i), + .z(z_o), + .dly_b(dly_b_o), + + .acc_fir(acc_fir_i), + .feedback(feedback_i), + .load_acc(load_acc_i), + + .unsigned_a(unsigned_a_i), + .unsigned_b(unsigned_b_i), + + .clk(clock_i), + .reset(reset_i), + .subtract(subtract_i) + ); +endmodule + +module dsp_t1_10x9x32_cfg_params ( + input wire [ 9:0] a_i, + input wire [ 8:0] b_i, + input wire [ 5:0] acc_fir_i, + output wire [18:0] z_o, + output wire [ 8:0] dly_b_o, + + (* clkbuf_sink *) + input wire clock_i, + input wire reset_i, + + input wire [ 2:0] feedback_i, + input wire load_acc_i, + input wire unsigned_a_i, + input wire unsigned_b_i, + input wire subtract_i +); + + parameter [9:0] COEFF_0 = 10'b0; + parameter [9:0] COEFF_1 = 10'b0; + parameter [9:0] COEFF_2 = 10'b0; + parameter [9:0] COEFF_3 = 10'b0; + + parameter [2:0] OUTPUT_SELECT = 3'b0; + parameter [0:0] SATURATE_ENABLE = 1'b0; + parameter [5:0] SHIFT_RIGHT = 6'b0; + parameter [0:0] ROUND = 1'b0; + parameter [0:0] REGISTER_INPUTS = 1'b0; + + wire [18:0] z_rem; + wire [8:0] dly_b_rem; + + QL_DSP3 #( + .MODE_BITS ({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + 1'b1, // Fractured + 10'd0, COEFF_3, + 10'd0, COEFF_2, + 10'd0, COEFF_1, + 10'd0, COEFF_0 + }) + ) dsp ( + .a({10'b0, a_i}), + .b({9'b0, b_i}), + .z({z_rem, z_o}), + .dly_b({dly_b_rem, dly_b_o}), + + .acc_fir(acc_fir_i), + .feedback(feedback_i), + .load_acc(load_acc_i), + + .unsigned_a(unsigned_a_i), + .unsigned_b(unsigned_b_i), + + .clk(clock_i), + .reset(reset_i), + .subtract(subtract_i) + ); +endmodule + +module dsp_t1_sim_cfg_params # ( + parameter NBITS_ACC = 64, + parameter NBITS_A = 20, + parameter NBITS_B = 18, + parameter NBITS_Z = 38, + + parameter [2:0] OUTPUT_SELECT = 3'b0, + parameter [0:0] SATURATE_ENABLE = 1'b0, + parameter [5:0] SHIFT_RIGHT = 6'b0, + parameter [0:0] ROUND = 1'b0, + parameter [0:0] REGISTER_INPUTS = 1'b0 +)( + input wire [NBITS_A-1:0] a_i, + input wire [NBITS_B-1:0] b_i, + output wire [NBITS_Z-1:0] z_o, + output reg [NBITS_B-1:0] dly_b_o, + + input wire [5:0] acc_fir_i, + input wire [2:0] feedback_i, + input wire load_acc_i, + + input wire unsigned_a_i, + input wire unsigned_b_i, + + input wire clock_i, + input wire s_reset, + + input wire subtract_i, + input wire [NBITS_A-1:0] coef_0_i, + input wire [NBITS_A-1:0] coef_1_i, + input wire [NBITS_A-1:0] coef_2_i, + input wire [NBITS_A-1:0] coef_3_i +); + +// FIXME: The version of Icarus Verilog from Conda seems not to recognize the +// $error macro. Disable this sanity check for now because of that. +`ifndef __ICARUS__ + if (NBITS_ACC < NBITS_A + NBITS_B) + $error("NBITS_ACC must be > NBITS_A + NBITS_B"); +`endif + + // Input registers + reg [NBITS_A-1:0] r_a; + reg [NBITS_B-1:0] r_b; + reg [5:0] r_acc_fir; + reg r_unsigned_a; + reg r_unsigned_b; + reg r_load_acc; + reg [2:0] r_feedback; + reg [5:0] r_shift_d1; + reg [5:0] r_shift_d2; + reg r_subtract; + reg r_sat; + reg r_rnd; + reg [NBITS_ACC-1:0] acc; + + initial begin + r_a <= 0; + r_b <= 0; + + r_acc_fir <= 0; + r_unsigned_a <= 0; + r_unsigned_b <= 0; + r_feedback <= 0; + r_shift_d1 <= 0; + r_shift_d2 <= 0; + r_subtract <= 0; + r_load_acc <= 0; + r_sat <= 0; + r_rnd <= 0; + end + + always @(posedge clock_i or posedge s_reset) begin + if (s_reset) begin + + r_a <= 'h0; + r_b <= 'h0; + + r_acc_fir <= 0; + r_unsigned_a <= 0; + r_unsigned_b <= 0; + r_feedback <= 0; + r_shift_d1 <= 0; + r_shift_d2 <= 0; + r_subtract <= 0; + r_load_acc <= 0; + r_sat <= 0; + r_rnd <= 0; + + end else begin + + r_a <= a_i; + r_b <= b_i; + + r_acc_fir <= acc_fir_i; + r_unsigned_a <= unsigned_a_i; + r_unsigned_b <= unsigned_b_i; + r_feedback <= feedback_i; + r_shift_d1 <= SHIFT_RIGHT; + r_shift_d2 <= r_shift_d1; + r_subtract <= subtract_i; + r_load_acc <= load_acc_i; + r_sat <= r_sat; + r_rnd <= r_rnd; + + end + end + + // Registered / non-registered input path select + wire [NBITS_A-1:0] a = REGISTER_INPUTS ? r_a : a_i; + wire [NBITS_B-1:0] b = REGISTER_INPUTS ? r_b : b_i; + + wire [5:0] acc_fir = REGISTER_INPUTS ? r_acc_fir : acc_fir_i; + wire unsigned_a = REGISTER_INPUTS ? r_unsigned_a : unsigned_a_i; + wire unsigned_b = REGISTER_INPUTS ? r_unsigned_b : unsigned_b_i; + wire [2:0] feedback = REGISTER_INPUTS ? r_feedback : feedback_i; + wire load_acc = REGISTER_INPUTS ? r_load_acc : load_acc_i; + wire subtract = REGISTER_INPUTS ? r_subtract : subtract_i; + wire sat = REGISTER_INPUTS ? r_sat : SATURATE_ENABLE; + wire rnd = REGISTER_INPUTS ? r_rnd : ROUND; + + // Shift right control + wire [5:0] shift_d1 = REGISTER_INPUTS ? r_shift_d1 : SHIFT_RIGHT; + wire [5:0] shift_d2 = OUTPUT_SELECT[1] ? shift_d1 : r_shift_d2; + + // Multiplier + wire unsigned_mode = unsigned_a & unsigned_b; + wire [NBITS_A-1:0] mult_a; + assign mult_a = (feedback == 3'h0) ? a : + (feedback == 3'h1) ? a : + (feedback == 3'h2) ? a : + (feedback == 3'h3) ? acc[NBITS_A-1:0] : + (feedback == 3'h4) ? coef_0_i : + (feedback == 3'h5) ? coef_1_i : + (feedback == 3'h6) ? coef_2_i : + coef_3_i; // if feedback == 3'h7 + + wire [NBITS_B-1:0] mult_b = (feedback == 2'h2) ? {NBITS_B{1'b0}} : b; + + wire [NBITS_A-1:0] mult_sgn_a = mult_a[NBITS_A-1]; + wire [NBITS_A-1:0] mult_mag_a = (mult_sgn_a && !unsigned_a) ? (~mult_a + 1) : mult_a; + wire [NBITS_B-1:0] mult_sgn_b = mult_b[NBITS_B-1]; + wire [NBITS_B-1:0] mult_mag_b = (mult_sgn_b && !unsigned_b) ? (~mult_b + 1) : mult_b; + + wire [NBITS_A+NBITS_B-1:0] mult_mag = mult_mag_a * mult_mag_b; + wire mult_sgn = (mult_sgn_a && !unsigned_a) ^ (mult_sgn_b && !unsigned_b); + + wire [NBITS_A+NBITS_B-1:0] mult = (unsigned_a && unsigned_b) ? + (mult_a * mult_b) : (mult_sgn ? (~mult_mag + 1) : mult_mag); + + // Sign extension + wire [NBITS_ACC-1:0] mult_xtnd = unsigned_mode ? + {{(NBITS_ACC-NBITS_A-NBITS_B){1'b0}}, mult[NBITS_A+NBITS_B-1:0]} : + {{(NBITS_ACC-NBITS_A-NBITS_B){mult[NBITS_A+NBITS_B-1]}}, mult[NBITS_A+NBITS_B-1:0]}; + + // Adder + wire [NBITS_ACC-1:0] acc_fir_int = unsigned_a ? {{(NBITS_ACC-NBITS_A){1'b0}}, a} : + {{(NBITS_ACC-NBITS_A){a[NBITS_A-1]}}, a} ; + + wire [NBITS_ACC-1:0] add_a = (subtract) ? (~mult_xtnd + 1) : mult_xtnd; + wire [NBITS_ACC-1:0] add_b = (feedback_i == 3'h0) ? acc : + (feedback_i == 3'h1) ? {{NBITS_ACC}{1'b0}} : (acc_fir_int << acc_fir); + + wire [NBITS_ACC-1:0] add_o = add_a + add_b; + + // Accumulator + initial acc <= 0; + + always @(posedge clock_i or posedge s_reset) + if (s_reset) acc <= 'h0; + else begin + if (load_acc) + acc <= add_o; + else + acc <= acc; + end + + // Adder/accumulator output selection + wire [NBITS_ACC-1:0] acc_out = (OUTPUT_SELECT[1]) ? add_o : acc; + + // Round, shift, saturate + wire [NBITS_ACC-1:0] acc_rnd = (rnd && (SHIFT_RIGHT != 0)) ? (acc_out + ({{(NBITS_ACC-1){1'b0}}, 1'b1} << (SHIFT_RIGHT - 1))) : + acc_out; + + wire [NBITS_ACC-1:0] acc_shr = (unsigned_mode) ? (acc_rnd >> SHIFT_RIGHT) : + (acc_rnd >>> SHIFT_RIGHT); + + wire [NBITS_ACC-1:0] acc_sat_u = (acc_shr[NBITS_ACC-1:NBITS_Z] != 0) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{NBITS_Z{1'b1}}} : + {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}}; + + wire [NBITS_ACC-1:0] acc_sat_s = ((|acc_shr[NBITS_ACC-1:NBITS_Z-1] == 1'b0) || + (&acc_shr[NBITS_ACC-1:NBITS_Z-1] == 1'b1)) ? {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_Z-1:0]}} : + {{(NBITS_ACC-NBITS_Z){1'b0}},{acc_shr[NBITS_ACC-1],{NBITS_Z-1{~acc_shr[NBITS_ACC-1]}}}}; + + wire [NBITS_ACC-1:0] acc_sat = (sat) ? ((unsigned_mode) ? acc_sat_u : acc_sat_s) : acc_shr; + + // Output signals + wire [NBITS_Z-1:0] z0; + reg [NBITS_Z-1:0] z1; + wire [NBITS_Z-1:0] z2; + + assign z0 = mult_xtnd[NBITS_Z-1:0]; + assign z2 = acc_sat[NBITS_Z-1:0]; + + initial z1 <= 0; + + always @(posedge clock_i or posedge s_reset) + if (s_reset) + z1 <= 0; + else begin + z1 <= (OUTPUT_SELECT == 3'b100) ? z0 : z2; + end + + // Output mux + assign z_o = (OUTPUT_SELECT == 3'h0) ? z0 : + (OUTPUT_SELECT == 3'h1) ? z2 : + (OUTPUT_SELECT == 3'h2) ? z2 : + (OUTPUT_SELECT == 3'h3) ? z2 : + (OUTPUT_SELECT == 3'h4) ? z1 : + (OUTPUT_SELECT == 3'h5) ? z1 : + (OUTPUT_SELECT == 3'h6) ? z1 : + z1; // if OUTPUT_SELECT == 3'h7 + + // B input delayed passthrough + initial dly_b_o <= 0; + + always @(posedge clock_i or posedge s_reset) + if (s_reset) + dly_b_o <= 0; + else + dly_b_o <= b_i; + +endmodule From 93f2450b2ff079fbad404ef9a0f18ad7b98c5c70 Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Wed, 6 Jul 2022 14:52:37 +0200 Subject: [PATCH 813/845] ql-qlf: k6n10f: DSP: adjust techmaps Signed-off-by: Pawel Czarnecki --- ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v | 131 ++++++++++++++++++++++- ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 117 +++++++++++++------- 2 files changed, 209 insertions(+), 39 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v index e2ab7a791..9eae617b9 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v @@ -14,7 +14,7 @@ // // SPDX-License-Identifier: Apache-2.0 -module dsp_t1_20x18x64 ( +module dsp_t1_20x18x64_cfg_ports ( input [19:0] a_i, input [17:0] b_i, input [ 5:0] acc_fir_i, @@ -70,7 +70,7 @@ module dsp_t1_20x18x64 ( endmodule -module dsp_t1_10x9x32 ( +module dsp_t1_10x9x32_cfg_ports ( input [ 9:0] a_i, input [ 8:0] b_i, input [ 5:0] acc_fir_i, @@ -136,3 +136,130 @@ module dsp_t1_10x9x32 ( endmodule +module dsp_t1_20x18x64_cfg_params ( + input [19:0] a_i, + input [17:0] b_i, + input [ 5:0] acc_fir_i, + output [37:0] z_o, + output [17:0] dly_b_o, + + input clock_i, + input reset_i, + + input [2:0] feedback_i, + input load_acc_i, + input unsigned_a_i, + input unsigned_b_i, + input subtract_i +); + + parameter [19:0] COEFF_0 = 20'd0; + parameter [19:0] COEFF_1 = 20'd0; + parameter [19:0] COEFF_2 = 20'd0; + parameter [19:0] COEFF_3 = 20'd0; + + parameter [2:0] OUTPUT_SELECT = 3'd0; + parameter [0:0] SATURATE_ENABLE = 1'd0; + parameter [5:0] SHIFT_RIGHT = 6'd0; + parameter [0:0] ROUND = 1'd0; + parameter [0:0] REGISTER_INPUTS = 1'd0; + + QL_DSP3 # ( + .MODE_BITS ({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + 1'b0, // Not fractured + COEFF_3, + COEFF_2, + COEFF_1, + COEFF_0 + }) + ) _TECHMAP_REPLACE_ ( + .a (a_i), + .b (b_i), + .acc_fir (acc_fir_i), + .z (z_o), + .dly_b (dly_b_o), + + .clk (clock_i), + .reset (reset_i), + + .feedback (feedback_i), + .load_acc (load_acc_i), + .unsigned_a (unsigned_a_i), + .unsigned_b (unsigned_b_i), + .subtract (subtract_i) + ); + +endmodule + +module dsp_t1_10x9x32_cfg_params ( + input [ 9:0] a_i, + input [ 8:0] b_i, + input [ 5:0] acc_fir_i, + output [18:0] z_o, + output [ 8:0] dly_b_o, + + (* clkbuf_sink *) + input clock_i, + input reset_i, + + input [2:0] feedback_i, + input load_acc_i, + input unsigned_a_i, + input unsigned_b_i, + input subtract_i +); + + parameter [9:0] COEFF_0 = 10'd0; + parameter [9:0] COEFF_1 = 10'd0; + parameter [9:0] COEFF_2 = 10'd0; + parameter [9:0] COEFF_3 = 10'd0; + + parameter [2:0] OUTPUT_SELECT = 3'd0; + parameter [0:0] SATURATE_ENABLE = 1'd0; + parameter [5:0] SHIFT_RIGHT = 6'd0; + parameter [0:0] ROUND = 1'd0; + parameter [0:0] REGISTER_INPUTS = 1'd0; + + wire [37:0] z; + wire [17:0] dly_b; + + QL_DSP3 # ( + .MODE_BITS ({ + REGISTER_INPUTS, + ROUND, + SHIFT_RIGHT, + SATURATE_ENABLE, + OUTPUT_SELECT, + 1'b1, // Fractured + 10'd0, COEFF_3, + 10'd0, COEFF_2, + 10'd0, COEFF_1, + 10'd0, COEFF_0 + }) + ) _TECHMAP_REPLACE_ ( + .a ({10'd0, a_i}), + .b ({ 9'd0, b_i}), + .acc_fir (acc_fir_i), + .z (z), + .dly_b (dly_b), + + .clk (clock_i), + .reset (reset_i), + + .feedback (feedback_i), + .load_acc (load_acc_i), + .unsigned_a (unsigned_a_i), + .unsigned_b (unsigned_b_i), + .subtract (subtract_i) + ); + + assign z_o = z[18:0]; + assign dly_b_o = dly_b_o[8:0]; + +endmodule + diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index 3c16b60d4..bbfc494e1 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -33,24 +33,46 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); (B_SIGNED) ? {{(18 - B_WIDTH){B[B_WIDTH-1]}}, B} : {{(18 - B_WIDTH){1'b0}}, B}; - dsp_t1_20x18x64 _TECHMAP_REPLACE_ ( - .a_i (a), - .b_i (b), - .acc_fir_i (6'd0), - .z_o (z), - - .feedback_i (3'd0), - .load_acc_i (1'b0), - .unsigned_a_i (!A_SIGNED), - .unsigned_b_i (!B_SIGNED), - - .output_select_i (3'd0), - .saturate_enable_i (1'b0), - .shift_right_i (6'd0), - .round_i (1'b0), - .subtract_i (1'b0), - .register_inputs_i (1'b0) - ); + generate if (`USE_DSP_CFG_PARAMS == 0) begin + dsp_t1_20x18x64_cfg_ports _TECHMAP_REPLACE_ ( + .a_i (a), + .b_i (b), + .acc_fir_i (6'd0), + .z_o (z), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (!A_SIGNED), + .unsigned_b_i (!B_SIGNED), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b0) + ); + end else begin + dsp_t1_20x18x64_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b0) + ) TECHMAP_REPLACE_ ( + .a_i (a), + .b_i (b), + .acc_fir_i (6'd0), + .z_o (z), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (!A_SIGNED), + .unsigned_b_i (!B_SIGNED), + + .subtract_i (1'b0) + ); + end endgenerate assign Y = z; @@ -75,26 +97,47 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); (B_SIGNED) ? {{( 9 - B_WIDTH){B[B_WIDTH-1]}}, B} : {{( 9 - B_WIDTH){1'b0}}, B}; - dsp_t1_10x9x32 _TECHMAP_REPLACE_ ( - .a_i (a), - .b_i (b), - .acc_fir_i (6'd0), - .z_o (z), - - .feedback_i (3'd0), - .load_acc_i (1'b0), - .unsigned_a_i (!A_SIGNED), - .unsigned_b_i (!B_SIGNED), - - .output_select_i (3'd0), - .saturate_enable_i (1'b0), - .shift_right_i (6'd0), - .round_i (1'b0), - .subtract_i (1'b0), - .register_inputs_i (1'b0) - ); + generate if (`USE_DSP_CFG_PARAMS == 0) begin + dsp_t1_10x9x32_cfg_ports _TECHMAP_REPLACE_ ( + .a_i (a), + .b_i (b), + .acc_fir_i (6'd0), + .z_o (z), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (!A_SIGNED), + .unsigned_b_i (!B_SIGNED), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b0) + ); + end else begin + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b0) + ) TECHMAP_REPLACE_ ( + .a_i (a), + .b_i (b), + .acc_fir_i (6'd0), + .z_o (z), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (!A_SIGNED), + .unsigned_b_i (!B_SIGNED), + + .subtract_i (1'b0) + ); + end endgenerate assign Y = z; endmodule - From 29d9b0644233cc8633e8b7d417944de7c10911de Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Wed, 6 Jul 2022 14:54:58 +0200 Subject: [PATCH 814/845] ql-qlf: k6n10f: DSP: adjust custom passes Signed-off-by: Pawel Czarnecki --- ql-qlf-plugin/ql-dsp-io-regs.cc | 59 ++++++++++++++------ ql-qlf-plugin/ql-dsp-macc.cc | 58 ++++++++++++++++---- ql-qlf-plugin/ql-dsp-simd.cc | 91 ++++++++++++++++++++++++------- ql-qlf-plugin/synth_quicklogic.cc | 37 ++++++++++--- 4 files changed, 188 insertions(+), 57 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index 71612036a..4befecfea 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -4,34 +4,56 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN +#define MODE_BITS_REGISTER_INPUTS_ID 92 +#define MODE_BITS_OUTPUT_SELECT_START_ID 81 +#define MODE_BITS_OUTPUT_SELECT_WIDTH 3 + // ============================================================================ -const std::vector ports2del_mult = {"feedback", "load_acc", "saturate_enable", "shift_right", "round", "subtract", "acc_fir", "dly_b"}; -const std::vector ports2del_mult_add_acc = {"saturate_enable", "shift_right", "round", "acc_fir", "dly_b"}; +const std::vector ports2del_mult = {"feedback", "load_acc", "subtract", "acc_fir", "dly_b"}; +const std::vector ports2del_mult_add_acc = {"acc_fir", "dly_b"}; +const std::vector ports2del_extension = {"saturate_enable", "shift_right", "round"}; void ql_dsp_io_regs_pass(RTLIL::Module *module) { for (auto cell : module->cells_) { std::string cell_type = cell.second->type.str(); - if (cell_type == RTLIL::escape_id("QL_DSP2")) { + if (cell_type == RTLIL::escape_id("QL_DSP2") || cell_type == RTLIL::escape_id("QL_DSP3")) { auto dsp = cell.second; bool del_clk = false; + bool use_dsp_cfg_params = cell_type == RTLIL::escape_id("QL_DSP3"); + + int reg_in_i; + int out_sel_i; // Get DSP configuration - const RTLIL::SigSpec *register_inputs; - register_inputs = &dsp->getPort(RTLIL::escape_id("register_inputs")); - if (!register_inputs) - log_error("register_inputs port not found!"); - auto reg_in_c = register_inputs->as_const(); - int reg_in_i = reg_in_c.as_int(); - - const RTLIL::SigSpec *output_select; - output_select = &dsp->getPort(RTLIL::escape_id("output_select")); - if (!output_select) - log_error("output_select port not found!"); - auto out_sel_c = output_select->as_const(); - int out_sel_i = out_sel_c.as_int(); + if (use_dsp_cfg_params) { + // Read MODE_BITS at correct indexes + auto mode_bits = &dsp->getParam(RTLIL::escape_id("MODE_BITS")); + RTLIL::Const register_inputs; + register_inputs = mode_bits->bits.at(MODE_BITS_REGISTER_INPUTS_ID); + reg_in_i = register_inputs.as_int(); + + RTLIL::Const output_select; + output_select = mode_bits->extract(MODE_BITS_OUTPUT_SELECT_START_ID, MODE_BITS_OUTPUT_SELECT_WIDTH); + out_sel_i = output_select.as_int(); + } else { + // Read dedicated configuration ports + const RTLIL::SigSpec *register_inputs; + register_inputs = &dsp->getPort(RTLIL::escape_id("register_inputs")); + if (!register_inputs) + log_error("register_inputs port not found!"); + auto reg_in_c = register_inputs->as_const(); + reg_in_i = reg_in_c.as_int(); + + const RTLIL::SigSpec *output_select; + output_select = &dsp->getPort(RTLIL::escape_id("output_select")); + if (!output_select) + log_error("output_select port not found!"); + auto out_sel_c = output_select->as_const(); + out_sel_i = out_sel_c.as_int(); + } // Build new type name std::string new_type = cell_type; @@ -79,6 +101,11 @@ void ql_dsp_io_regs_pass(RTLIL::Module *module) ports2del.insert(ports2del.end(), ports2del_mult_add_acc.begin(), ports2del_mult_add_acc.end()); } + // Mark for deleton additional configuration ports + if (!use_dsp_cfg_params) { + ports2del.insert(ports2del.end(), ports2del_extension.begin(), ports2del_extension.end()); + } + for (auto portname : ports2del) { const RTLIL::SigSpec *port = &dsp->getPort(RTLIL::escape_id(portname)); if (!port) diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index 473863467..7f865b5f0 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -8,7 +8,9 @@ PRIVATE_NAMESPACE_BEGIN // ============================================================================ -void create_ql_macc_dsp(ql_dsp_macc_pm &pm) +bool use_dsp_cfg_params; + +static void create_ql_macc_dsp(ql_dsp_macc_pm &pm) { auto &st = pm.st_ql_dsp_macc; @@ -78,16 +80,21 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) size_t tgt_b_width; size_t tgt_z_width; + string cell_base_name = "dsp_t1"; + string cell_size_name = ""; + string cell_cfg_name = ""; + string cell_full_name = ""; + if (min_width <= 2 && max_width <= 2 && z_width <= 4) { // Too narrow return; } else if (min_width <= 9 && max_width <= 10 && z_width <= 19) { - type = RTLIL::escape_id("dsp_t1_10x9x32"); + cell_size_name = "_10x9x32"; tgt_a_width = 10; tgt_b_width = 9; tgt_z_width = 19; } else if (min_width <= 18 && max_width <= 20 && z_width <= 38) { - type = RTLIL::escape_id("dsp_t1_20x18x64"); + cell_size_name = "_20x18x64"; tgt_a_width = 20; tgt_b_width = 18; tgt_z_width = 38; @@ -96,6 +103,14 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) return; } + if (use_dsp_cfg_params) + cell_cfg_name = "_cfg_params"; + else + cell_cfg_name = "_cfg_ports"; + + cell_full_name = cell_base_name + cell_size_name + cell_cfg_name; + + type = RTLIL::escape_id(cell_full_name); log("Inferring MACC %zux%zu->%zu as %s from:\n", a_width, b_width, z_width, RTLIL::unescape_id(type).c_str()); for (auto cell : {st.mul, st.add, st.mux, st.ff}) { @@ -199,19 +214,26 @@ void create_ql_macc_dsp(ql_dsp_macc_pm &pm) cell->setPort(RTLIL::escape_id("unsigned_a_i"), RTLIL::SigSpec(a_signed ? RTLIL::S0 : RTLIL::S1)); cell->setPort(RTLIL::escape_id("unsigned_b_i"), RTLIL::SigSpec(b_signed ? RTLIL::S0 : RTLIL::S1)); - // Connect config ports - cell->setPort(RTLIL::escape_id("saturate_enable_i"), RTLIL::SigSpec(RTLIL::S0)); - cell->setPort(RTLIL::escape_id("shift_right_i"), RTLIL::SigSpec(RTLIL::S0, 6)); - cell->setPort(RTLIL::escape_id("round_i"), RTLIL::SigSpec(RTLIL::S0)); - cell->setPort(RTLIL::escape_id("register_inputs_i"), RTLIL::SigSpec(RTLIL::S0)); + // Connect config bits + if (use_dsp_cfg_params) { + cell->setParam(RTLIL::escape_id("SATURATE_ENABLE"), RTLIL::Const(RTLIL::S0)); + cell->setParam(RTLIL::escape_id("SHIFT_RIGHT"), RTLIL::Const(RTLIL::S0, 6)); + cell->setParam(RTLIL::escape_id("ROUND"), RTLIL::Const(RTLIL::S0)); + cell->setParam(RTLIL::escape_id("REGISTER_INPUTS"), RTLIL::Const(RTLIL::S0)); + // 3 - output post acc; 1 - output pre acc + cell->setParam(RTLIL::escape_id("OUTPUT_SELECT"), out_ff ? RTLIL::Const(1, 3) : RTLIL::Const(3, 3)); + } else { + cell->setPort(RTLIL::escape_id("saturate_enable_i"), RTLIL::SigSpec(RTLIL::S0)); + cell->setPort(RTLIL::escape_id("shift_right_i"), RTLIL::SigSpec(RTLIL::S0, 6)); + cell->setPort(RTLIL::escape_id("round_i"), RTLIL::SigSpec(RTLIL::S0)); + cell->setPort(RTLIL::escape_id("register_inputs_i"), RTLIL::SigSpec(RTLIL::S0)); + // 3 - output post acc; 1 - output pre acc + cell->setPort(RTLIL::escape_id("output_select_i"), out_ff ? RTLIL::Const(1, 3) : RTLIL::Const(3, 3)); + } bool subtract = (st.add->type == RTLIL::escape_id("$sub")); cell->setPort(RTLIL::escape_id("subtract_i"), RTLIL::SigSpec(subtract ? RTLIL::S1 : RTLIL::S0)); - // 3 - output post acc - // 1 - output pre acc - cell->setPort(RTLIL::escape_id("output_select_i"), out_ff ? RTLIL::Const(1, 3) : RTLIL::Const(3, 3)); - // Mark the cells for removal pm.autoremove(st.mul); pm.autoremove(st.add); @@ -230,14 +252,25 @@ struct QlDspMacc : public Pass { log("\n"); log(" ql_dsp_macc [options] [selection]\n"); log("\n"); + log(" -use_dsp_cfg_params\n"); + log(" By default use DSP blocks with configuration bits available at module ports.\n"); + log(" Specifying this forces usage of DSP block with configuration bits available as module parameters\n"); + log("\n"); } + void clear_flags() override { use_dsp_cfg_params = false; } + void execute(std::vector a_Args, RTLIL::Design *a_Design) override { log_header(a_Design, "Executing QL_DSP_MACC pass.\n"); size_t argidx; for (argidx = 1; argidx < a_Args.size(); argidx++) { + if (a_Args[argidx] == "-use_dsp_cfg_params") { + use_dsp_cfg_params = true; + continue; + } + break; } extra_args(a_Args, argidx, a_Design); @@ -246,6 +279,7 @@ struct QlDspMacc : public Pass { ql_dsp_macc_pm(module, module->selected_cells()).run_ql_dsp_macc(create_ql_macc_dsp); } } + } QlDspMacc; PRIVATE_NAMESPACE_END diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index edf432a7a..b2935a9a1 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -24,6 +24,9 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN +#define MODE_BITS_BASE_SIZE 80 +#define MODE_BITS_EXTENSION_SIZE 13 + // ============================================================================ struct QlDspSimdPass : public Pass { @@ -48,6 +51,9 @@ struct QlDspSimdPass : public Pass { // Port connections dict connections; + // Whether DSPs pass configuration bits through ports of parameters + bool use_cfg_params; + // TODO: Possibly include parameters here. For now we have just // connections. @@ -58,7 +64,7 @@ struct QlDspSimdPass : public Pass { unsigned int hash() const { return connections.hash(); } - bool operator==(const DspConfig &ref) const { return connections == ref.connections; } + bool operator==(const DspConfig &ref) const { return connections == ref.connections && use_cfg_params == ref.use_cfg_params; } }; // .......................................... @@ -73,12 +79,14 @@ struct QlDspSimdPass : public Pass { std::make_pair("unsigned_a_i", "unsigned_a"), std::make_pair("unsigned_b_i", "unsigned_b"), - std::make_pair("output_select_i", "output_select"), - std::make_pair("saturate_enable_i", "saturate_enable"), - std::make_pair("shift_right_i", "shift_right"), - std::make_pair("round_i", "round"), - std::make_pair("subtract_i", "subtract"), - std::make_pair("register_inputs_i", "register_inputs")}; + std::make_pair("subtract_i", "subtract")}; + // For QL_DSP2 expand with configuration ports + const std::vector> m_DspCfgPorts_expand = { + std::make_pair("output_select_i", "output_select"), std::make_pair("saturate_enable_i", "saturate_enable"), + std::make_pair("shift_right_i", "shift_right"), std::make_pair("round_i", "round"), std::make_pair("register_inputs_i", "register_inputs")}; + + // For QL_DSP3 use parameters instead + const std::vector m_DspParams2Mode = {"OUTPUT_SELECT", "SATURATE_ENABLE", "SHIFT_RIGHT", "ROUND", "REGISTER_INPUTS"}; // DSP data ports and how to map them to ports of the target DSP cell const std::vector> m_DspDataPorts = { @@ -91,8 +99,12 @@ struct QlDspSimdPass : public Pass { // Source DSP cell type (SISD) const std::string m_SisdDspType = "dsp_t1_10x9x32"; - // Target DSP cell type for the SIMD mode - const std::string m_SimdDspType = "QL_DSP2"; + // Suffix for DSP cell with configuration parameters + const std::string m_SisdDspType_cfg_params_suffix = "_cfg_params"; + + // Target DSP cell types for the SIMD mode + const std::string m_SimdDspType_cfg_ports = "QL_DSP2"; + const std::string m_SimdDspType_cfg_params = "QL_DSP3"; /// Temporary SigBit to SigBit helper map. SigMap m_SigMap; @@ -117,8 +129,8 @@ struct QlDspSimdPass : public Pass { dict> groups; for (auto cell : module->selected_cells()) { - // Check if this is a DSP cell - if (cell->type != RTLIL::escape_id(m_SisdDspType)) { + // Check if this is a DSP cell we are looking for (type starts with m_SisdDspType) + if (strncmp(cell->type.c_str(), RTLIL::escape_id(m_SisdDspType).c_str(), RTLIL::escape_id(m_SisdDspType).size()) != 0) { continue; } @@ -139,6 +151,7 @@ struct QlDspSimdPass : public Pass { const auto &group = it.second; const auto &config = it.first; + bool use_cfg_params = config.use_cfg_params; // Ensure an even number size_t count = group.size(); if (count & 1) @@ -150,22 +163,32 @@ struct QlDspSimdPass : public Pass { const RTLIL::Cell *dsp_b = group[i + 1]; std::string name = stringf("simd_%s_%s", RTLIL::unescape_id(dsp_a->name).c_str(), RTLIL::unescape_id(dsp_b->name).c_str()); + std::string SimdDspType; + + if (use_cfg_params) + SimdDspType = m_SimdDspType_cfg_params; + else + SimdDspType = m_SimdDspType_cfg_ports; log(" SIMD: %s (%s) + %s (%s) => %s (%s)\n", RTLIL::unescape_id(dsp_a->name).c_str(), RTLIL::unescape_id(dsp_a->type).c_str(), RTLIL::unescape_id(dsp_b->name).c_str(), RTLIL::unescape_id(dsp_b->type).c_str(), RTLIL::unescape_id(name).c_str(), - m_SimdDspType.c_str()); + SimdDspType.c_str()); // Create the new cell - RTLIL::Cell *simd = module->addCell(RTLIL::escape_id(name), RTLIL::escape_id(m_SimdDspType)); + RTLIL::Cell *simd = module->addCell(RTLIL::escape_id(name), RTLIL::escape_id(SimdDspType)); // Check if the target cell is known (important to know // its port widths) if (!simd->known()) { - log_error(" The target cell type '%s' is not known!", m_SimdDspType.c_str()); + log_error(" The target cell type '%s' is not known!", SimdDspType.c_str()); } + std::vector> DspCfgPorts = m_DspCfgPorts; + if (!use_cfg_params) + DspCfgPorts.insert(DspCfgPorts.end(), m_DspCfgPorts_expand.begin(), m_DspCfgPorts_expand.end()); + // Connect common ports - for (const auto &it : m_DspCfgPorts) { + for (const auto &it : DspCfgPorts) { auto sport = RTLIL::escape_id(it.first); auto dport = RTLIL::escape_id(it.second); @@ -216,12 +239,27 @@ struct QlDspSimdPass : public Pass { mode_bits.insert(mode_bits.end(), val_a.begin(), val_a.end()); mode_bits.insert(mode_bits.end(), val_b.begin(), val_b.end()); } + long unsigned int mode_bits_size = MODE_BITS_BASE_SIZE; + if (use_cfg_params) { + // Add additional config parameters if necessary + mode_bits.push_back(RTLIL::S1); // MODE_BITS[80] == F_MODE : Enable fractured mode + for (const auto &it : m_DspParams2Mode) { + log_assert(dsp_a->getParam(RTLIL::escape_id(it)) == dsp_b->getParam(RTLIL::escape_id(it))); + auto param = dsp_a->getParam(RTLIL::escape_id(it)); + if (param.size() > 1) { + mode_bits.insert(mode_bits.end(), param.bits.begin(), param.bits.end()); + } else { + mode_bits.push_back(param.bits[0]); + } + } + mode_bits_size += MODE_BITS_EXTENSION_SIZE; + } else { + // Enable the fractured mode by connecting the control + // port. + simd->setPort(RTLIL::escape_id("f_mode"), RTLIL::S1); + } simd->setParam(RTLIL::escape_id("MODE_BITS"), RTLIL::Const(mode_bits)); - log_assert(mode_bits.size() == 80); - - // Enable the fractured mode by connecting the control - // port. - simd->setPort(RTLIL::escape_id("f_mode"), RTLIL::S1); + log_assert(mode_bits.size() == mode_bits_size); // Mark DSP parts for removal cellsToRemove.push_back(dsp_a); @@ -270,7 +308,18 @@ struct QlDspSimdPass : public Pass { { DspConfig config; - for (const auto &it : m_DspCfgPorts) { + string cell_type = a_Cell->type.str(); + string suffix = m_SisdDspType_cfg_params_suffix; + + bool use_cfg_params = cell_type.size() >= suffix.size() && 0 == cell_type.compare(cell_type.size() - suffix.size(), suffix.size(), suffix); + + std::vector> DspCfgPorts = m_DspCfgPorts; + if (!use_cfg_params) + DspCfgPorts.insert(DspCfgPorts.end(), m_DspCfgPorts_expand.begin(), m_DspCfgPorts_expand.end()); + + config.use_cfg_params = use_cfg_params; + + for (const auto &it : DspCfgPorts) { auto port = RTLIL::escape_id(it.first); // Port unconnected diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 303b1de1e..5be10ec5e 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -73,6 +73,10 @@ struct SynthQuickLogicPass : public ScriptPass { log(" By default use DSP blocks in output netlist.\n"); log(" do not use DSP blocks to implement multipliers and associated logic\n"); log("\n"); + log(" -use_dsp_cfg_params\n"); + log(" By default use DSP blocks with configuration bits available at module ports.\n"); + log(" Specifying this forces usage of DSP block with configuration bits available as module parameters\n"); + log("\n"); log(" -no_adder\n"); log(" By default use adder cells in output netlist.\n"); log(" Specifying this switch turns it off.\n"); @@ -95,7 +99,7 @@ struct SynthQuickLogicPass : public ScriptPass { log("\n"); } - string top_opt, edif_file, blif_file, family, currmodule, verilog_file; + string top_opt, edif_file, blif_file, family, currmodule, verilog_file, use_dsp_cfg_params; bool nodsp; bool inferAdder; bool inferBram; @@ -119,6 +123,7 @@ struct SynthQuickLogicPass : public ScriptPass { noffmap = false; nodsp = false; nosdff = false; + use_dsp_cfg_params = ""; } void execute(std::vector args, RTLIL::Design *design) override @@ -164,6 +169,10 @@ struct SynthQuickLogicPass : public ScriptPass { nodsp = true; continue; } + if (args[argidx] == "-use_dsp_cfg_params") { + use_dsp_cfg_params = " -use_dsp_cfg_params"; + continue; + } if (args[argidx] == "-no_adder") { inferAdder = false; continue; @@ -223,8 +232,13 @@ struct SynthQuickLogicPass : public ScriptPass { void script() override { if (check_label("begin")) { + std::string family_path = " +/quicklogic/" + family; std::string readVelArgs; - readVelArgs = " +/quicklogic/" + family + "/cells_sim.v"; + + // Read simulation library + readVelArgs = family_path + "/cells_sim.v"; + if (family == "qlf_k6n10f") + readVelArgs += family_path + "/dsp_sim.v"; // Use -nomem2reg here to prevent Yosys from complaining about // some block ram cell models. After all the only part of the cells @@ -295,18 +309,22 @@ struct SynthQuickLogicPass : public ScriptPass { }; if (help_mode) { - run("wreduce t:$mul", " (for qlf_k6n10f if not -no_dsp)"); - run("ql_dsp_macc", " (for qlf_k6n10f if not -no_dsp)"); - run("techmap -map +/mul2dsp.v [...]", "(for qlf_k6n10f if not -no_dsp)"); - run("chtype -set $mul t:$__soft_mul", "(for qlf_k6n10f if not -no_dsp)"); + run("wreduce t:$mul", " (for qlf_k6n10f if not -no_dsp)"); + run("ql_dsp_macc" + use_dsp_cfg_params, "(for qlf_k6n10f if not -no_dsp)"); + run("techmap -map +/mul2dsp.v [...]", " (for qlf_k6n10f if not -no_dsp)"); + run("chtype -set $mul t:$__soft_mul", " (for qlf_k6n10f if not -no_dsp)"); run("techmap -map +/quicklogic/" + family + "/dsp_map.v", "(for qlf_k6n10f if not -no_dsp)"); + if (use_dsp_cfg_params == "") + run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=0", "(for qlf_k6n10f if not -no_dsp)"); + else + run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=1", "(for qlf_k6n10f if not -no_dsp)"); run("ql_dsp_simd ", "(for qlf_k6n10f if not -no_dsp)"); run("techmap -map +/quicklogic/" + family + "/dsp_final_map.v", "(for qlf_k6n10f if not -no_dsp)"); run("ql_dsp_io_regs"); } else if (!nodsp) { run("wreduce t:$mul"); - run("ql_dsp_macc"); + run("ql_dsp_macc" + use_dsp_cfg_params); for (const auto &rule : dsp_rules) { run(stringf("techmap -map +/mul2dsp.v " @@ -316,7 +334,10 @@ struct SynthQuickLogicPass : public ScriptPass { rule.a_maxwidth, rule.b_maxwidth, rule.a_minwidth, rule.b_minwidth, rule.type.c_str())); run("chtype -set $mul t:$__soft_mul"); } - run("techmap -map +/quicklogic/" + family + "/dsp_map.v"); + if (use_dsp_cfg_params == "") + run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=0"); + else + run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=1"); run("ql_dsp_simd"); run("techmap -map +/quicklogic/" + family + "/dsp_final_map.v"); run("ql_dsp_io_regs"); From bb9f16ad4493424f101d86098790ad4553acf568 Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Wed, 6 Jul 2022 15:03:12 +0200 Subject: [PATCH 815/845] ql-qlf: k6n10f: DSP: rework tests for 2 DSP flavors Signed-off-by: Pawel Czarnecki --- ql-qlf-plugin/tests/Makefile | 24 +- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 112 ++++---- .../tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl | 83 +++--- .../dsp_mult_post_synth_sim.tcl | 27 ++ .../dsp_mult_post_synth_sim.v | 25 ++ .../dsp_mult_post_synth_sim/sim/Makefile | 36 +++ .../sim/dsp_mult_post_synth_sim_tb.v | 82 ++++++ .../tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl | 131 +++++++--- .../tests/qlf_k6n10f/dsp_simd/dsp_simd.v | 242 ++++++++++++++++-- .../dsp_simd_post_synth_sim.tcl | 38 +++ .../dsp_simd_post_synth_sim.v | 145 +++++++++++ .../dsp_simd_post_synth_sim/sim/Makefile | 37 +++ .../sim/dsp_simd_post_synth_sim_tb.v | 132 ++++++++++ .../sim_dsp_fir_cfg_params.v} | 34 +-- .../sim_dsp_fir_cfg_ports.v | 151 +++++++++++ .../sim_dsp_mult_cfg_params.v} | 19 +- .../sim_dsp_mult_cfg_ports.v | 77 ++++++ .../sim_dsp_mult_r_cfg_params.v} | 32 +-- .../sim_dsp_mult_r_cfg_ports.v | 88 +++++++ .../sim_dsp_simd_cfg_params.v | 164 ++++++++++++ .../sim_dsp_simd_cfg_ports.v | 162 ++++++++++++ 21 files changed, 1623 insertions(+), 218 deletions(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/Makefile create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/dsp_mult_post_synth_sim_tb.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/Makefile create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/dsp_simd_post_synth_sim_tb.v rename ql-qlf-plugin/tests/qlf_k6n10f/{sim_dsp_fir/sim_dsp_fir.v => sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v} (83%) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_ports/sim_dsp_fir_cfg_ports.v rename ql-qlf-plugin/tests/qlf_k6n10f/{sim_dsp_mult/sim_dsp_mult.v => sim_dsp_mult_cfg_params/sim_dsp_mult_cfg_params.v} (83%) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_ports/sim_dsp_mult_cfg_ports.v rename ql-qlf-plugin/tests/qlf_k6n10f/{sim_dsp_mult_r/sim_dsp_mult_r.v => sim_dsp_mult_r_cfg_params/sim_dsp_mult_r_cfg_params.v} (78%) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_ports/sim_dsp_mult_r_cfg_ports.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_params/sim_dsp_simd_cfg_params.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_ports/sim_dsp_simd_cfg_ports.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 2164a30f9..84dc8b36e 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -16,7 +16,8 @@ # The bram test will be enable in a future PR after it's been fixed. -TESTS = consts \ +TESTS = \ + consts \ dffs \ latches \ shreg \ @@ -29,15 +30,20 @@ TESTS = consts \ tribuf \ fsm \ pp3_bram \ - qlf_k6n10f/dsp_mult \ - qlf_k6n10f/dsp_simd \ - qlf_k6n10f/dsp_macc \ + qlf_k6n10f/dsp_mult \ + qlf_k6n10f/dsp_simd \ + qlf_k6n10f/dsp_macc # qlf_k6n10_bram \ SIM_TESTS = \ - qlf_k6n10f/sim_dsp_mult \ - qlf_k6n10f/sim_dsp_mult_r \ - qlf_k6n10f/sim_dsp_fir \ + qlf_k6n10f/sim_dsp_mult_cfg_ports \ + qlf_k6n10f/sim_dsp_mult_cfg_params \ + qlf_k6n10f/sim_dsp_mult_r_cfg_ports \ + qlf_k6n10f/sim_dsp_mult_r_cfg_params \ + qlf_k6n10f/sim_dsp_fir_cfg_ports \ + qlf_k6n10f/sim_dsp_fir_cfg_params \ + qlf_k6n10f/sim_dsp_simd_cfg_ports \ + qlf_k6n10f/sim_dsp_simd_cfg_params \ qlf_k6n10f/sim_tc36fifo # Those tests perform synthesis and simulation of synthesis results @@ -45,7 +51,9 @@ POST_SYNTH_SIM_TESTS = \ qlf_k6n10f/bram_tdp \ qlf_k6n10f/bram_sdp \ qlf_k6n10f/bram_tdp_split \ - qlf_k6n10f/bram_sdp_split + qlf_k6n10f/bram_sdp_split \ + qlf_k6n10f/dsp_mult_post_synth_sim \ + qlf_k6n10f/dsp_simd_post_synth_sim include $(shell pwd)/../../Makefile_test.common diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl index 19026400e..d577d0abd 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -1,17 +1,25 @@ # For some tests the equiv_induct pass seems to hang if opt_expr + opt_clean # are not invoked after techmapping. Therefore this function is used instead # of the equiv_opt pass. -proc check_equiv {top} { +proc check_equiv {top use_cfg_params} { hierarchy -top ${top} design -save preopt - synth_quicklogic -family qlf_k6n10f -top ${top} + + if {${use_cfg_params} == 1} { + synth_quicklogic -family qlf_k6n10f -top ${top} -use_dsp_cfg_params + } else { + stat + synth_quicklogic -family qlf_k6n10f -top ${top} + } + design -stash postopt design -copy-from preopt -as gold A:top design -copy-from postopt -as gate A:top techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/cells_sim.v + techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/dsp_sim.v yosys proc opt_expr opt_clean -purge @@ -24,6 +32,37 @@ proc check_equiv {top} { return } +# Test inference of 2 available DSP variants +# * top - design name +# * expected_cell_suffix - suffix of the cell that should be the result +# of the inference, eg. _MULT, _MACC_REGIN, MADD_REGIN_REGOUT +proc test_dsp_design {top expected_cell_suffix} { + set TOP ${top} + # Infer DSP with configuration bits passed through ports + # We expect QL_DSP2 cells inferred + set USE_DSP_CFG_PARAMS 0 + design -load read + hierarchy -top $TOP + check_equiv ${TOP} ${USE_DSP_CFG_PARAMS} + design -load postopt + yosys cd ${top} + select -assert-count 1 t:QL_DSP2${expected_cell_suffix} + select -assert-count 1 t:* + + # Infer DSP with configuration bits passed through parameters + # We expect QL_DSP3 cells inferred + set USE_DSP_CFG_PARAMS 1 + design -load read + hierarchy -top $TOP + check_equiv ${TOP} ${USE_DSP_CFG_PARAMS} + design -load postopt + yosys cd ${TOP} + select -assert-count 1 t:QL_DSP3${expected_cell_suffix} + select -assert-count 1 t:* + + return +} + yosys -import if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands @@ -31,66 +70,11 @@ yosys -import ;# ingest plugin commands read_verilog dsp_macc.v design -save read -set TOP "macc_simple" -design -load read -hierarchy -top $TOP -check_equiv $TOP -design -load postopt -yosys cd $TOP -select -assert-count 1 t:QL_DSP2_MULTACC -select -assert-count 1 t:* - -set TOP "macc_simple_clr" -design -load read -hierarchy -top $TOP -check_equiv $TOP -design -load postopt -yosys cd $TOP -select -assert-count 1 t:QL_DSP2_MULTACC -select -assert-count 1 t:* - -set TOP "macc_simple_arst" -design -load read -hierarchy -top $TOP -check_equiv $TOP -design -load postopt -yosys cd $TOP -select -assert-count 1 t:QL_DSP2_MULTACC -select -assert-count 1 t:* - -set TOP "macc_simple_ena" -design -load read -hierarchy -top $TOP -check_equiv $TOP -design -load postopt -yosys cd $TOP -select -assert-count 1 t:QL_DSP2_MULTACC -select -assert-count 1 t:* - -set TOP "macc_simple_arst_clr_ena" -design -load read -hierarchy -top $TOP -check_equiv $TOP -design -load postopt -yosys cd $TOP -select -assert-count 1 t:QL_DSP2_MULTACC -select -assert-count 1 t:* - -set TOP "macc_simple_preacc" -design -load read -hierarchy -top $TOP -check_equiv $TOP -design -load postopt -yosys cd $TOP -select -assert-count 1 t:QL_DSP2_MULTADD -select -assert-count 1 t:* - -set TOP "macc_simple_preacc_clr" -design -load read -hierarchy -top $TOP -check_equiv $TOP -design -load postopt -yosys cd $TOP -select -assert-count 1 t:QL_DSP2_MULTADD -select -assert-count 1 t:* +test_dsp_design "macc_simple" "_MULTACC" +test_dsp_design "macc_simple_clr" "_MULTACC" +test_dsp_design "macc_simple_arst" "_MULTACC" +test_dsp_design "macc_simple_ena" "_MULTACC" +test_dsp_design "macc_simple_arst_clr_ena" "_MULTACC" +test_dsp_design "macc_simple_preacc" "_MULTADD" +test_dsp_design "macc_simple_preacc_clr" "_MULTADD" diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl index a0cd6a711..aea70766f 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl @@ -1,17 +1,25 @@ # For some tests the equiv_induct pass seems to hang if opt_expr + opt_clean # are not invoked after techmapping. Therefore this function is used instead # of the equiv_opt pass. -proc check_equiv {top} { +proc check_equiv {top use_cfg_params} { hierarchy -top ${top} design -save preopt - synth_quicklogic -family qlf_k6n10f -top ${top} + + if {${use_cfg_params} == 1} { + synth_quicklogic -family qlf_k6n10f -top ${top} -use_dsp_cfg_params + } else { + stat + synth_quicklogic -family qlf_k6n10f -top ${top} + } + design -stash postopt design -copy-from preopt -as gold A:top design -copy-from postopt -as gate A:top techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/cells_sim.v + techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/dsp_sim.v yosys proc opt_expr opt_clean -purge @@ -24,6 +32,37 @@ proc check_equiv {top} { return } +# Test inference of 2 available DSP variants +# * top - design name +# * expected_cell_suffix - suffix of the cell that should be the result +# of the inference, eg. _MULT, _MACC_REGIN, MADD_REGIN_REGOUT +proc test_dsp_design {top expected_cell_suffix} { + set TOP ${top} + # Infer DSP with configuration bits passed through ports + # We expect QL_DSP2 cells inferred + set USE_DSP_CFG_PARAMS 0 + design -load read + hierarchy -top $TOP + check_equiv ${TOP} ${USE_DSP_CFG_PARAMS} + design -load postopt + yosys cd ${top} + select -assert-count 1 t:QL_DSP2${expected_cell_suffix} + select -assert-count 1 t:* + + # Infer DSP with configuration bits passed through parameters + # We expect QL_DSP3 cells inferred + set USE_DSP_CFG_PARAMS 1 + design -load read + hierarchy -top $TOP + check_equiv ${TOP} ${USE_DSP_CFG_PARAMS} + design -load postopt + yosys cd ${TOP} + select -assert-count 1 t:QL_DSP3${expected_cell_suffix} + select -assert-count 1 t:* + + return +} + yosys -import if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands @@ -31,38 +70,8 @@ yosys -import ;# ingest plugin commands read_verilog dsp_mult.v design -save read -set TOP "mult_16x16" -design -load read -check_equiv ${TOP} -design -load postopt -yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2_MULT - -set TOP "mult_20x18" -design -load read -check_equiv ${TOP} -design -load postopt -yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2_MULT - -set TOP "mult_8x8" -design -load read -check_equiv ${TOP} -design -load postopt -yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2_MULT - -set TOP "mult_10x9" -design -load read -check_equiv ${TOP} -design -load postopt -yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2_MULT - -set TOP "mult_8x8_s" -design -load read -check_equiv ${TOP} -design -load postopt -yosys cd ${TOP} -select -assert-count 1 t:QL_DSP2_MULT - +test_dsp_design "mult_16x16" "_MULT" +test_dsp_design "mult_20x18" "_MULT" +test_dsp_design "mult_8x8" "_MULT" +test_dsp_design "mult_10x9" "_MULT" +test_dsp_design "mult_8x8_s" "_MULT" diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.tcl new file mode 100644 index 000000000..8ef551f17 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.tcl @@ -0,0 +1,27 @@ +yosys -import + +if { [info procs ql-qlf-k6n10f] == {} } { plugin -i ql-qlf } +yosys -import ; + +read_verilog $::env(DESIGN_TOP).v +design -save dsp_mult_post_synth_sim + +select dsp_mult +select * +synth_quicklogic -family qlf_k6n10f -top dsp_mult +opt_expr -undriven +opt_clean +stat +write_verilog sim/dsp_mult_ports_post_synth.v +select -assert-count 1 t:QL_DSP2_MULT + +select -clear +design -load dsp_mult_post_synth_sim +select dsp_mult +select * +synth_quicklogic -family qlf_k6n10f -top dsp_mult -use_dsp_cfg_params +opt_expr -undriven +opt_clean +stat +write_verilog sim/dsp_mult_params_post_synth.v +select -assert-count 1 t:QL_DSP3_MULT diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.v new file mode 100644 index 000000000..e9cec3c6a --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.v @@ -0,0 +1,25 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +module dsp_mult ( + input wire [19:0] A, + input wire [17:0] B, + output wire [37:0] Z +); + + assign Z = A * B; + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/Makefile new file mode 100644 index 000000000..10f1cc171 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/Makefile @@ -0,0 +1,36 @@ +# Copyright 2020-2022 F4PGA Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +TESTBENCH = dsp_mult_post_synth_sim_tb.v +POST_SYNTH = dsp_mult_ports_post_synth dsp_mult_params_post_synth +TOP = dsp_mult dsp_mult +TOP_DEFINES = $(foreach top, $(TOP),-DTOP="$(top)") +VCD_DEFINES = $(foreach vcd, $(POST_SYNTH),-DVCD="$(vcd).vcd") + +SIM_LIBS = $(shell find ../../../../qlf_k6n10f -name "*.v" -not -name "*_map.v") + +define simulate_post_synth + @iverilog -vvvv -g2005 $(word $(1),$(TOP_DEFINES)) $(word $(1),$(VCD_DEFINES)) -o $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).v $(SIM_LIBS) $(TESTBENCH) > $(word $(1),$(POST_SYNTH)).vvp.log 2>&1 + @vvp -vvvv $(word $(1),$(POST_SYNTH)).vvp > $(word $(1),$(POST_SYNTH)).vcd.log 2>&1 +endef + +define clean_post_synth_sim + @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log +endef + +sim: + $(call simulate_post_synth,1) + $(call simulate_post_synth,2) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/dsp_mult_post_synth_sim_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/dsp_mult_post_synth_sim_tb.v new file mode 100644 index 000000000..809aaeec8 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/dsp_mult_post_synth_sim_tb.v @@ -0,0 +1,82 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`timescale 1ns/1ps + +`define STRINGIFY(x) `"x`" + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #1 clk <= ~clk; + + // Data Clock + reg dclk; + initial dclk <= 1'b0; + always #2 dclk <= ~dclk; + + // Input data / reference + reg [19:0] A0; + + reg [17:0] B0; + + reg [37:0] C0; + + always @(negedge dclk) begin + A0 = $random; + B0 = $random; + + C0 <= A0 * B0; + end + + // UUT + wire [37:0] Z0; + + case (`STRINGIFY(`TOP)) + "dsp_mult": begin + dsp_mult dsp0 ( + .A(A0), + .B(B0), + .Z(Z0) + ); + end + endcase + + // Error detection + wire error0 = (Z0 !== C0) && (C0 !== 38'bx); + + // Error counting + integer error_count = 0; + + always @(posedge clk) begin + if (error0) begin + error_count <= error_count + 1'b1; + $display("%d: DSP_0: FAIL: mismatch act=%x exp=%x at A0=%x; B0=%x", $time, Z0, C0, A0, B0); + end else begin + $display("%d: DSP_0: OK: act=%x exp=%x at A0=%x; B0=%x", $time, Z0, C0, A0, B0); + end + end + + // Simulation control / data dump + initial begin + $dumpfile(`STRINGIFY(`VCD)); + $dumpvars; + #10000 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl index 2a90c795e..e8d9bbdbf 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl @@ -1,17 +1,25 @@ # For some tests the equiv_induct pass seems to hang if opt_expr + opt_clean # are not invoked after techmapping. Therefore this function is used instead # of the equiv_opt pass. -proc check_equiv {top} { +proc check_equiv {top use_cfg_params} { hierarchy -top ${top} design -save preopt - synth_quicklogic -family qlf_k6n10f -top ${top} + + if {${use_cfg_params} == 1} { + synth_quicklogic -family qlf_k6n10f -top ${top} -use_dsp_cfg_params + } else { + stat + synth_quicklogic -family qlf_k6n10f -top ${top} + } + design -stash postopt design -copy-from preopt -as gold A:top design -copy-from postopt -as gate A:top techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/cells_sim.v + techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/dsp_sim.v yosys proc opt_expr opt_clean @@ -24,6 +32,78 @@ proc check_equiv {top} { return } +# Test inference of DSP variant +# Infer DSP with configuration bits passed through ports +# We expect QL_DSP2 cells +# * top - design name +# * expected_cell_suffix - suffix of the cell that should be the result +# of the inference, eg. _MULT, _MACC_REGIN, MADD_REGIN_REGOUT +# * cells2match - how much expected cells should be asserted +proc test_dsp_cfg_ports {top expected_cell_suffix cells2match} { + set TOP ${top} + set USE_DSP_CFG_PARAMS 0 + design -load read + hierarchy -top $TOP + check_equiv ${TOP} ${USE_DSP_CFG_PARAMS} + design -load postopt + yosys cd ${top} + select -assert-count ${cells2match} t:QL_DSP2${expected_cell_suffix} + select -assert-count 0 t:QL_DSP2 + select -assert-count 0 t:dsp_t1_10x9x32_cfg_ports + select -assert-count 0 t:dsp_t1_20x18x64_cfg_ports + + return +} + +# Test inference of DSP variant +# Infer DSP with configuration bits passed through parameters +# We expect QL_DSP3 cells inferred +# * top - design name +# * expected_cell_suffix - suffix of the cell that should be the result +# of the inference, eg. _MULT, _MACC_REGIN, MADD_REGIN_REGOUT +# * cells2match - how much expected cells should be asserted +proc test_dsp_cfg_params {top expected_cell_suffix cells2match} { + set TOP ${top} + set USE_DSP_CFG_PARAMS 1 + design -load read + hierarchy -top $TOP + check_equiv ${TOP} ${USE_DSP_CFG_PARAMS} + design -load postopt + yosys cd ${TOP} + select -assert-count ${cells2match} t:QL_DSP3${expected_cell_suffix} + select -assert-count 0 t:QL_DSP3 + select -assert-count 0 t:dsp_t1_10x9x32_cfg_params + select -assert-count 0 t:dsp_t1_20x18x64_cfg_params + + return +} + +# Test special case of inference of DSP +# Infer DSPs with configuration bits conflict +# One internal module use parameters, the other one ports +# We expect one QL_DSP2 and one QL_DSP3 inferred +# * top - design name +# * expected_cell_suffix - suffix of the cell that should be the result +# of the inference, eg. _MULT, _MACC_REGIN, MADD_REGIN_REGOUT +proc test_dsp_cfg_conflict {top expected_cell_suffix} { + set TOP ${top} + set USE_DSP_CFG_PARAMS 1 + design -load read + hierarchy -top $TOP + check_equiv ${TOP} ${USE_DSP_CFG_PARAMS} + design -load postopt + yosys cd ${TOP} + select -assert-count 1 t:QL_DSP2${expected_cell_suffix} + select -assert-count 1 t:QL_DSP3${expected_cell_suffix} + select -assert-count 0 t:QL_DSP2 + select -assert-count 0 t:dsp_t1_10x9x32_cfg_ports + select -assert-count 0 t:dsp_t1_20x18x64_cfg_ports + select -assert-count 0 t:QL_DSP3 + select -assert-count 0 t:dsp_t1_10x9x32_cfg_params + select -assert-count 0 t:dsp_t1_20x18x64_cfg_params + + return +} yosys -import if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} yosys -import ;# ingest plugin commands @@ -31,43 +111,12 @@ yosys -import ;# ingest plugin commands read_verilog dsp_simd.v design -save read -set TOP "simd_mult" -design -load read -hierarchy -top $TOP -check_equiv ${TOP} -design -load postopt -select -assert-count 0 t:dsp_t1_20x18x64 -select -assert-count 0 t:dsp_t1_10x9x32 -select -assert-count 1 t:QL_DSP2_MULT_REGIN - -set TOP "simd_mult_inferred" -design -load read -hierarchy -top $TOP -check_equiv ${TOP} -design -load postopt -yosys cd $TOP -select -assert-count 0 t:dsp_t1_20x18x64 -select -assert-count 0 t:dsp_t1_10x9x32 -select -assert-count 1 t:QL_DSP2_MULT - -set TOP "simd_mult_odd" -design -load read -hierarchy -top $TOP -check_equiv ${TOP} -design -load postopt -yosys cd $TOP -select -assert-count 0 t:dsp_t1_20x18x64 -select -assert-count 0 t:dsp_t1_10x9x32 -select -assert-count 0 t:QL_DSP2 -select -assert-count 2 t:QL_DSP2_MULT_REGIN - -set TOP "simd_mult_conflict" -design -load read -hierarchy -top $TOP -check_equiv ${TOP} -design -load postopt -yosys cd $TOP -select -assert-count 0 t:dsp_t1_20x18x64 -select -assert-count 0 t:dsp_t1_10x9x32 -select -assert-count 2 t:QL_DSP2_MULT_REGIN +test_dsp_cfg_ports "simd_mult_explicit_ports" "_MULT_REGIN" 1 +test_dsp_cfg_params "simd_mult_explicit_params" "_MULT_REGIN" 1 +test_dsp_cfg_ports "simd_mult_inferred" "_MULT" 1 +test_dsp_cfg_params "simd_mult_inferred" "_MULT" 1 +test_dsp_cfg_ports "simd_mult_odd_ports" "_MULT_REGIN" 2 +test_dsp_cfg_params "simd_mult_odd_params" "_MULT_REGIN" 2 +test_dsp_cfg_ports "simd_mult_conflict_ports" "_MULT_REGIN" 2 +test_dsp_cfg_conflict "simd_mult_conflict_config" "_MULT_REGIN" diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v index b684903f7..dfd92085c 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v @@ -14,19 +14,19 @@ // // SPDX-License-Identifier: Apache-2.0 -module simd_mult ( +module simd_mult_explicit_ports ( input wire clk, - + input wire [ 7:0] a0, input wire [ 7:0] b0, output wire [15:0] z0, - + input wire [ 7:0] a1, input wire [ 7:0] b1, output wire [15:0] z1 ); - dsp_t1_10x9x32 dsp_0 ( + dsp_t1_10x9x32_cfg_ports dsp_0 ( .a_i (a0), .b_i (b0), .z_o (z0), @@ -44,9 +44,9 @@ module simd_mult ( .round_i (1'b0), .subtract_i (1'b0), .register_inputs_i (1'b1) - ); + ); - dsp_t1_10x9x32 dsp_1 ( + dsp_t1_10x9x32_cfg_ports dsp_1 ( .a_i (a1), .b_i (b1), .z_o (z1), @@ -64,17 +64,73 @@ module simd_mult ( .round_i (1'b0), .subtract_i (1'b0), .register_inputs_i (1'b1) - ); + ); + +endmodule + +module simd_mult_explicit_params ( + input wire clk, + + input wire [ 7:0] a0, + input wire [ 7:0] b0, + output wire [15:0] z0, + + input wire [ 7:0] a1, + input wire [ 7:0] b1, + output wire [15:0] z1 +); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); endmodule module simd_mult_inferred ( input wire clk, - + input wire [ 7:0] a0, input wire [ 7:0] b0, output reg [15:0] z0, - + input wire [ 7:0] a1, input wire [ 7:0] b1, output reg [15:0] z1 @@ -88,13 +144,13 @@ module simd_mult_inferred ( endmodule -module simd_mult_odd ( +module simd_mult_odd_ports ( input wire clk, - + input wire [ 7:0] a0, input wire [ 7:0] b0, output wire [15:0] z0, - + input wire [ 7:0] a1, input wire [ 7:0] b1, output wire [15:0] z1, @@ -104,7 +160,7 @@ module simd_mult_odd ( output wire [15:0] z2 ); - dsp_t1_10x9x32 dsp_0 ( + dsp_t1_10x9x32_cfg_ports dsp_0 ( .a_i (a0), .b_i (b0), .z_o (z0), @@ -122,9 +178,9 @@ module simd_mult_odd ( .round_i (1'b0), .subtract_i (1'b0), .register_inputs_i (1'b1) - ); + ); - dsp_t1_10x9x32 dsp_1 ( + dsp_t1_10x9x32_cfg_ports dsp_1 ( .a_i (a1), .b_i (b1), .z_o (z1), @@ -142,9 +198,9 @@ module simd_mult_odd ( .round_i (1'b0), .subtract_i (1'b0), .register_inputs_i (1'b1) - ); + ); - dsp_t1_10x9x32 dsp_2 ( + dsp_t1_10x9x32_cfg_ports dsp_2 ( .a_i (a2), .b_i (b2), .z_o (z2), @@ -162,24 +218,105 @@ module simd_mult_odd ( .round_i (1'b0), .subtract_i (1'b0), .register_inputs_i (1'b1) - ); + ); endmodule -module simd_mult_conflict ( +module simd_mult_odd_params ( + input wire clk, + + input wire [ 7:0] a0, + input wire [ 7:0] b0, + output wire [15:0] z0, + + input wire [ 7:0] a1, + input wire [ 7:0] b1, + output wire [15:0] z1, + + input wire [ 7:0] a2, + input wire [ 7:0] b2, + output wire [15:0] z2 +); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_2 ( + .a_i (a2), + .b_i (b2), + .z_o (z2), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); + +endmodule + +module simd_mult_conflict_ports ( input wire clk0, input wire clk1, - + input wire [ 7:0] a0, input wire [ 7:0] b0, output wire [15:0] z0, - + input wire [ 7:0] a1, input wire [ 7:0] b1, output wire [15:0] z1 ); - dsp_t1_10x9x32 dsp_0 ( + dsp_t1_10x9x32_cfg_ports dsp_0 ( .a_i (a0), .b_i (b0), .z_o (z0), @@ -197,9 +334,9 @@ module simd_mult_conflict ( .round_i (1'b0), .subtract_i (1'b0), .register_inputs_i (1'b1) - ); + ); - dsp_t1_10x9x32 dsp_1 ( + dsp_t1_10x9x32_cfg_ports dsp_1 ( .a_i (a1), .b_i (b1), .z_o (z1), @@ -217,7 +354,62 @@ module simd_mult_conflict ( .round_i (1'b0), .subtract_i (1'b0), .register_inputs_i (1'b1) - ); + ); endmodule +module simd_mult_conflict_config ( + input wire clk0, + input wire clk1, + + input wire [ 7:0] a0, + input wire [ 7:0] b0, + output wire [15:0] z0, + + input wire [ 7:0] a1, + input wire [ 7:0] b1, + output wire [15:0] z1 +); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); + + dsp_t1_10x9x32_cfg_ports dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl new file mode 100644 index 000000000..050290a59 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl @@ -0,0 +1,38 @@ +yosys -import + +if { [info procs ql-qlf-k6n10f] == {} } { plugin -i ql-qlf } +yosys -import ; + +read_verilog $::env(DESIGN_TOP).v +design -save dsp_simd + +select simd_mult +select * +synth_quicklogic -family qlf_k6n10f -top simd_mult +opt_expr -undriven +opt_clean +stat +write_verilog sim/simd_mult_post_synth.v +select -assert-count 1 t:QL_DSP2_MULT + +select -clear +design -load dsp_simd +select simd_mult_explicit_ports +select * +synth_quicklogic -family qlf_k6n10f -top simd_mult_explicit_ports +opt_expr -undriven +opt_clean +stat +write_verilog sim/simd_mult_explicit_ports_post_synth.v +select -assert-count 1 t:QL_DSP2_MULT_REGIN + +select -clear +design -load dsp_simd +select simd_mult_explicit_params +select * +synth_quicklogic -family qlf_k6n10f -top simd_mult_explicit_params -use_dsp_cfg_params +opt_expr -undriven +opt_clean +stat +write_verilog sim/simd_mult_explicit_params_post_synth.v +select -assert-count 1 t:QL_DSP3_MULT_REGIN diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.v new file mode 100644 index 000000000..3b2a96b6d --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.v @@ -0,0 +1,145 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +module simd_mult ( + input wire clk, + + input wire [ 9:0] a0, + input wire [ 8:0] b0, + output reg [18:0] z0, + + input wire [ 9:0] a1, + input wire [ 8:0] b1, + output reg [18:0] z1 +); + + always @(posedge clk) + z0 <= a0 * b0; + + always @(posedge clk) + z1 <= a1 * b1; + +endmodule + +module simd_mult_explicit_ports ( + input wire clk, + + input wire [ 9:0] a0, + input wire [ 9:0] b0, + output wire [18:0] z0, + + input wire [ 9:0] a1, + input wire [ 9:0] b1, + output wire [18:0] z1 +); + + dsp_t1_10x9x32_cfg_ports dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + + dsp_t1_10x9x32_cfg_ports dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + +endmodule + +module simd_mult_explicit_params ( + input wire clk, + + input wire [ 9:0] a0, + input wire [ 9:0] b0, + output wire [18:0] z0, + + input wire [ 9:0] a1, + input wire [ 9:0] b1, + output wire [18:0] z1 +); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/Makefile new file mode 100644 index 000000000..9c08400c5 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/Makefile @@ -0,0 +1,37 @@ +# Copyright 2020-2022 F4PGA Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +TESTBENCH = dsp_simd_post_synth_sim_tb.v +POST_SYNTH = simd_mult_post_synth simd_mult_explicit_ports_post_synth simd_mult_explicit_params_post_synth +TOP = simd_mult simd_mult_explicit_ports simd_mult_explicit_params +TOP_DEFINES = $(foreach top, $(TOP),-DTOP="$(top)") +VCD_DEFINES = $(foreach vcd, $(POST_SYNTH),-DVCD="$(vcd).vcd") + +SIM_LIBS = $(shell find ../../../../qlf_k6n10f -name "*.v" -not -name "*_map.v") + +define simulate_post_synth + @iverilog -vvvv -g2005 $(word $(1),$(TOP_DEFINES)) $(word $(1),$(VCD_DEFINES)) -o $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).v $(SIM_LIBS) $(TESTBENCH) > $(word $(1),$(POST_SYNTH)).vvp.log 2>&1 + @vvp -vvvv $(word $(1),$(POST_SYNTH)).vvp > $(word $(1),$(POST_SYNTH)).vcd.log 2>&1 +endef + +define clean_post_synth_sim + @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log +endef + +sim: + $(call simulate_post_synth,1) + $(call simulate_post_synth,2) + $(call simulate_post_synth,3) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/dsp_simd_post_synth_sim_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/dsp_simd_post_synth_sim_tb.v new file mode 100644 index 000000000..e658988b0 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/dsp_simd_post_synth_sim_tb.v @@ -0,0 +1,132 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`timescale 1ns/1ps + +`define STRINGIFY(x) `"x`" + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #1 clk <= ~clk; + + // Data Clock + reg dclk; + initial dclk <= 1'b0; + always #2 dclk <= ~dclk; + + // Input data / reference + reg [9:0] A0; + reg [9:0] A1; + + reg [8:0] B0; + reg [8:0] B1; + + reg [18:0] C0; + reg [18:0] C1; + + always @(negedge dclk) begin + A0 = $random; + B0 = $random; + + C0 <= A0 * B0; + + A1 = $random; + B1 = $random; + + C1 <= A1 * B1; + end + + // UUT + wire [18:0] Z0; + wire [18:0] Z1; + + case (`STRINGIFY(`TOP)) + "simd_mult": begin + simd_mult dsp0 ( + .clk(clk), + .a0(A0), + .a1(A1), + .b0(B0), + .b1(B1), + .z0(Z0), + .z1(Z1)); + end + "simd_mult_explicit_ports": begin + simd_mult_explicit_ports dsp1 ( + .clk(clk), + .a0(A0), + .a1(A1), + .b0(B0), + .b1(B1), + .z0(Z0), + .z1(Z1)); + end + "simd_mult_explicit_params": begin + simd_mult_explicit_params dsp1 ( + .clk(clk), + .a0(A0), + .a1(A1), + .b0(B0), + .b1(B1), + .z0(Z0), + .z1(Z1)); + end + endcase + + reg [18:0] C0_r; + reg [18:0] C1_r; + + always @(posedge clk) begin + C0_r = C0; + C1_r = C1; + end + + // Error detection + wire error0 = (Z0 !== C0_r) && (C0_r !== 19'bx); + wire error1 = (Z1 !== C1_r) && (C0_r !== 19'bx); + + // Error counting + integer error_count = 0; + + always @(posedge clk) begin + if (error0) begin + error_count <= error_count + 1'b1; + $display("%d: DSP_0: FAIL: mismatch act=%x exp=%x at A0=%x; B0=%x", $time, Z0, C0_r, A0, B0); + end else begin + $display("%d: DSP_0: OK: act=%x exp=%x at A0=%x; B0=%x", $time, Z0, C0_r, A0, B0); + end + end + + always @(posedge clk) begin + if (error1) begin + error_count <= error_count + 1'b1; + $display("%d: DSP_1: FAIL: mismatch act=%x exp=%x at A1=%x; B1=%x", $time, Z1, C1_r, A1, B1); + end else begin + $display("%d: DSP_1: OK: act=%x exp=%x at A1=%x; B1=%x", $time, Z1, C1_r, A1, B1); + end + end + + // Simulation control / data dump + initial begin + $dumpfile(`STRINGIFY(`VCD)); + $dumpvars; + #10000 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v similarity index 83% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v rename to ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v index 65e519a92..1fb0e0402 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir/sim_dsp_fir.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v @@ -89,24 +89,24 @@ module tb(); wire signed [17:0] B = data; wire signed [37:0] Z; - dsp_t1_sim # ( + dsp_t1_sim_cfg_params # ( + .SHIFT_RIGHT (6'd10), + .REGISTER_INPUTS (1'b0), + .OUTPUT_SELECT (3'h1), + .ROUND (1'b1), + .SATURATE_ENABLE (1'b1) ) uut ( - .clock_i (clk), - .s_reset (rst), - .a_i ((!stb) ? A : 20'h0), - .b_i ((!stb) ? B : 18'h0), - .acc_fir_i ((!stb) ? acc_fir_i : 4'h0), - .unsigned_a_i (1'b0), - .unsigned_b_i (1'b0), - .feedback_i (stb), - .load_acc_i (1'b1), - .shift_right_i (6'd10), - .register_inputs_i (1'b0), - .output_select_i (3'h1), - .round_i (1'b1), - .saturate_enable_i (1'b1), - .subtract_i (1'b0), - .z_o (Z) + .clock_i (clk), + .s_reset (rst), + .a_i ((!stb) ? A : 20'h0), + .b_i ((!stb) ? B : 18'h0), + .acc_fir_i ((!stb) ? acc_fir_i : 4'h0), + .unsigned_a_i (1'b0), + .unsigned_b_i (1'b0), + .feedback_i (stb), + .load_acc_i (1'b1), + .subtract_i (1'b0), + .z_o (Z) ); // Output counter diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_ports/sim_dsp_fir_cfg_ports.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_ports/sim_dsp_fir_cfg_ports.v new file mode 100644 index 000000000..003d776bd --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_ports/sim_dsp_fir_cfg_ports.v @@ -0,0 +1,151 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`include "qlf_k6n10f/cells_sim.v" + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #0.5 clk <= ~clk; + + // Reset + reg rst; + initial begin + rst <= 1'b0; + #2 rst <= 1'b1; + #2 rst <= 1'b0; + end + + // Filter control + reg [2:0] fcnt; + reg [3:0] dcnt; + + initial begin + fcnt <= 0; + dcnt <= 0; + end + + // MAC cycle counter + always @(posedge clk) + if (rst) fcnt <= 0; + else begin + if (fcnt == 4) + fcnt <= 0; + else + fcnt <= fcnt + 1; + end + + wire stb = (fcnt == 4); + + // Data address counter + always @(posedge clk) + if (rst) dcnt <= 0; + else if (stb) dcnt <= dcnt + 1; + + // Filter coeffs (S0.19) + reg signed [19:0] coeff; + always @(*) case (fcnt) + 2'd0: coeff <= 20'h0000B; + 2'd1: coeff <= 20'h0000E; + 2'd2: coeff <= 20'h0000E; + 2'd3: coeff <= 20'h0000F; + + default: coeff <= 20'h00000; + endcase + + // Input data (S0.17) + reg signed [17:0] data; + always @(*) case (dcnt) + 'd0: data <= 18'h00400; + 'd1: data <= 18'h00000; + 'd2: data <= 18'h00000; + 'd3: data <= 18'h00000; + 'd4: data <= 18'h00000; + 'd5: data <= 18'h00000; + 'd6: data <= 18'h00000; + 'd7: data <= 18'h00000; + 'd8: data <= 18'h00800; + default data <= 18'h00000; + endcase + + // UUT + wire signed [5:0] acc_fir_i = 6'h0; + wire signed [19:0] A = coeff; + wire signed [17:0] B = data; + wire signed [37:0] Z; + + dsp_t1_sim_cfg_ports # ( + ) uut ( + .clock_i (clk), + .s_reset (rst), + .a_i ((!stb) ? A : 20'h0), + .b_i ((!stb) ? B : 18'h0), + .acc_fir_i ((!stb) ? acc_fir_i : 4'h0), + .unsigned_a_i (1'b0), + .unsigned_b_i (1'b0), + .feedback_i (stb), + .load_acc_i (1'b1), + .shift_right_i (6'd10), + .register_inputs_i (1'b0), + .output_select_i (3'h1), + .round_i (1'b1), + .saturate_enable_i (1'b1), + .subtract_i (1'b0), + .z_o (Z) + ); + + // Output counter + integer ocnt; + initial ocnt <= 0; + + always @(posedge clk) + if (stb) ocnt <= ocnt + 1; + + // Expected output data + reg signed [31:0] odata; + always @(*) case (ocnt) + 'd0: odata <= 32'h000036; + 'd1: odata <= 32'h000000; + 'd2: odata <= 32'h000000; + 'd3: odata <= 32'h000000; + 'd4: odata <= 32'h000000; + 'd5: odata <= 32'h000000; + 'd6: odata <= 32'h000000; + 'd7: odata <= 32'h000000; + 'd8: odata <= 32'h00006C; + default: odata <= 32'h000000; + endcase + + // Error detection + wire error = stb && (odata !== Z[31:0]); + + // Error counting + integer error_count; + initial error_count <= 0; + always @(posedge clk) begin + if (error) error_count <= error_count + 1; + end + + // Simulation control / data dump + initial begin + $dumpfile(`VCD_FILE); + $dumpvars(0, tb); + #150 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_params/sim_dsp_mult_cfg_params.v similarity index 83% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v rename to ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_params/sim_dsp_mult_cfg_params.v index 55784b940..33419489d 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult/sim_dsp_mult.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_params/sim_dsp_mult_cfg_params.v @@ -14,7 +14,6 @@ // // SPDX-License-Identifier: Apache-2.0 -`include "qlf_k6n10f/cells_sim.v" `timescale 1ns/1ps module tb(); @@ -47,16 +46,16 @@ module tb(); // UUT wire signed [37:0] Z; - dsp_t1_sim # ( + dsp_t1_sim_cfg_params # ( + .REGISTER_INPUTS (1'h0), + .OUTPUT_SELECT (3'h0) ) uut ( - .a_i (A), - .b_i (B), - .unsigned_a_i (1'h0), - .unsigned_b_i (1'h0), - .feedback_i (3'h0), - .register_inputs_i (1'h0), - .output_select_i (3'h0), - .z_o (Z) + .a_i (A), + .b_i (B), + .unsigned_a_i (1'h0), + .unsigned_b_i (1'h0), + .feedback_i (3'h0), + .z_o (Z) ); // Error detection diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_ports/sim_dsp_mult_cfg_ports.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_ports/sim_dsp_mult_cfg_ports.v new file mode 100644 index 000000000..5f71bfdff --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_ports/sim_dsp_mult_cfg_ports.v @@ -0,0 +1,77 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`timescale 1ns/1ps + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #0.5 clk <= ~clk; + + // Reset + reg rst; + initial begin + rst <= 1'b0; + #1 rst <= 1'b1; + #2 rst <= 1'b0; + end + + // Input data / reference + reg signed [19:0] A; + reg signed [17:0] B; + reg signed [37:0] C; + + always @(posedge clk) begin + A = $random; + B = $random; + + C <= A * B; + end + + // UUT + wire signed [37:0] Z; + + dsp_t1_sim_cfg_ports uut ( + .a_i (A), + .b_i (B), + .unsigned_a_i (1'h0), + .unsigned_b_i (1'h0), + .feedback_i (3'h0), + .register_inputs_i (1'h0), + .output_select_i (3'h0), + .z_o (Z) + ); + + // Error detection + wire error = (Z !== C); + + // Error counting + integer error_count; + initial error_count <= 0; + always @(posedge clk) begin + if (error) error_count <= error_count + 1; + end + + // Simulation control / data dump + initial begin + $dumpfile(`VCD_FILE); + $dumpvars(0, tb); + #10000 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_params/sim_dsp_mult_r_cfg_params.v similarity index 78% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v rename to ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_params/sim_dsp_mult_r_cfg_params.v index cdd0a66e5..305b83a43 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r/sim_dsp_mult_r.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_params/sim_dsp_mult_r_cfg_params.v @@ -39,29 +39,29 @@ module tb(); // Shift data change half a clock cycle // to make registered inputs apparent initial begin - forever begin - A = $random; - B = $random; + forever begin + A = $random; + B = $random; - C <= A * B; - #1.5; - end + C <= A * B; + #1.5; + end end // UUT wire signed [37:0] Z; - dsp_t1_sim # ( + dsp_t1_sim_cfg_params # ( + .REGISTER_INPUTS (1'h1), + .OUTPUT_SELECT (3'h0) ) uut ( - .a_i (A), - .b_i (B), - .unsigned_a_i (1'h0), - .unsigned_b_i (1'h0), - .feedback_i (3'h0), - .register_inputs_i (1'h1), - .output_select_i (3'h0), - .clock_i (clk), - .z_o (Z) + .a_i (A), + .b_i (B), + .unsigned_a_i (1'h0), + .unsigned_b_i (1'h0), + .feedback_i (3'h0), + .clock_i (clk), + .z_o (Z) ); // Error detection diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_ports/sim_dsp_mult_r_cfg_ports.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_ports/sim_dsp_mult_r_cfg_ports.v new file mode 100644 index 000000000..261d2a349 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_ports/sim_dsp_mult_r_cfg_ports.v @@ -0,0 +1,88 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`include "qlf_k6n10f/cells_sim.v" + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #0.5 clk <= ~clk; + + // Reset + reg rst; + initial begin + rst <= 1'b0; + #1 rst <= 1'b1; + #2 rst <= 1'b0; + end + + // Input data / reference + reg signed [19:0] A; + reg signed [17:0] B; + reg signed [37:0] C; + + // Shift data change half a clock cycle + // to make registered inputs apparent + initial begin + forever begin + A = $random; + B = $random; + + C <= A * B; + #1.5; + end + end + + // UUT + wire signed [37:0] Z; + + dsp_t1_sim_cfg_ports uut ( + .a_i (A), + .b_i (B), + .unsigned_a_i (1'h0), + .unsigned_b_i (1'h0), + .feedback_i (3'h0), + .register_inputs_i (1'h1), + .output_select_i (3'h0), + .clock_i (clk), + .z_o (Z) + ); + + // Error detection + reg [37:0] r_C; + initial r_C <= 0; + always @(posedge clk) + r_C <= C; + + wire error = (Z !== r_C); + + // Error counting + integer error_count; + initial error_count <= 0; + always @(posedge clk) begin + if (error) error_count <= error_count + 1; + end + + // Simulation control / data dump + initial begin + $dumpfile(`VCD_FILE); + $dumpvars(0, tb); + #100 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_params/sim_dsp_simd_cfg_params.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_params/sim_dsp_simd_cfg_params.v new file mode 100644 index 000000000..50c21e8da --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_params/sim_dsp_simd_cfg_params.v @@ -0,0 +1,164 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`include "qlf_k6n10f/cells_sim.v" +`timescale 1ns/1ps + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #1 clk <= ~clk; + + // Data Clock + reg dclk; + initial dclk <= 1'b0; + always #2 dclk <= ~dclk; + + // Input data / reference + reg [9:0] A0; + reg [9:0] A1; + + reg [8:0] B0; + reg [8:0] B1; + + reg [18:0] C0; + reg [18:0] C1; + + always @(negedge dclk) begin + A0 = $random; + B0 = $random; + + C0 <= A0 * B0; + + A1 = $random; + B1 = $random; + + C1 <= A1 * B1; + end + + // UUT + wire [18:0] Z0; + wire [18:0] Z1; + + simd_mult_explicit_params dsp1 ( + .clk(clk), + .a0(A0), + .a1(A1), + .b0(B0), + .b1(B1), + .z0(Z0), + .z1(Z1) + ); + + reg [18:0] C0_r; + reg [18:0] C1_r; + + always @(posedge clk) begin + C0_r = C0; + C1_r = C1; + end + + // Error detection + wire error0 = (Z0 !== C0_r) && (C0_r !== 19'bx); + wire error1 = (Z1 !== C1_r) && (C0_r !== 19'bx); + + // Error counting + integer error_count = 0; + + always @(posedge clk) begin + if (error0) begin + error_count <= error_count + 1'b1; + $display("%d: DSP_0: FAIL: mismatch act=%x exp=%x at A0=%x; B0=%x", $time, Z0, C0_r, A0, B0); + end else begin + $display("%d: DSP_0: OK: act=%x exp=%x at A0=%x; B0=%x", $time, Z0, C0_r, A0, B0); + end + end + + always @(posedge clk) begin + if (error1) begin + error_count <= error_count + 1'b1; + $display("%d: DSP_1: FAIL: mismatch act=%x exp=%x at A1=%x; B1=%x", $time, Z1, C1_r, A1, B1); + end else begin + $display("%d: DSP_1: OK: act=%x exp=%x at A1=%x; B1=%x", $time, Z1, C1_r, A1, B1); + end + end + + // Simulation control / data dump + initial begin + $dumpfile(`VCD_FILE); + $dumpvars; + #10000 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule + +module simd_mult_explicit_params ( + input wire clk, + + input wire [ 9:0] a0, + input wire [ 8:0] b0, + output wire [18:0] z0, + + input wire [ 9:0] a1, + input wire [ 8:0] b1, + output wire [18:0] z1 +); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); + + dsp_t1_10x9x32_cfg_params #( + .OUTPUT_SELECT (3'd0), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b1) + ) dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .subtract_i (1'b0) + ); + +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_ports/sim_dsp_simd_cfg_ports.v b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_ports/sim_dsp_simd_cfg_ports.v new file mode 100644 index 000000000..021792c72 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_ports/sim_dsp_simd_cfg_ports.v @@ -0,0 +1,162 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`include "qlf_k6n10f/cells_sim.v" +`timescale 1ns/1ps + +module tb(); + + // Clock + reg clk; + initial clk <= 1'b0; + always #1 clk <= ~clk; + + // Data Clock + reg dclk; + initial dclk <= 1'b0; + always #2 dclk <= ~dclk; + + // Input data / reference + reg [9:0] A0; + reg [9:0] A1; + + reg [8:0] B0; + reg [8:0] B1; + + reg [18:0] C0; + reg [18:0] C1; + + always @(negedge dclk) begin + A0 = $random; + B0 = $random; + + C0 <= A0 * B0; + + A1 = $random; + B1 = $random; + + C1 <= A1 * B1; + end + + // UUT + wire [18:0] Z0; + wire [18:0] Z1; + + simd_mult_explicit_ports dsp1 ( + .clk(clk), + .a0(A0), + .a1(A1), + .b0(B0), + .b1(B1), + .z0(Z0), + .z1(Z1) + ); + + reg [18:0] C0_r; + reg [18:0] C1_r; + + always @(posedge clk) begin + C0_r = C0; + C1_r = C1; + end + + // Error detection + wire error0 = (Z0 !== C0_r) && (C0_r !== 19'bx); + wire error1 = (Z1 !== C1_r) && (C0_r !== 19'bx); + + // Error counting + integer error_count = 0; + + always @(posedge clk) begin + if (error0) begin + error_count <= error_count + 1'b1; + $display("%d: DSP_0: FAIL: mismatch act=%x exp=%x at A0=%x; B0=%x", $time, Z0, C0_r, A0, B0); + end else begin + $display("%d: DSP_0: OK: act=%x exp=%x at A0=%x; B0=%x", $time, Z0, C0_r, A0, B0); + end + end + + always @(posedge clk) begin + if (error1) begin + error_count <= error_count + 1'b1; + $display("%d: DSP_1: FAIL: mismatch act=%x exp=%x at A1=%x; B1=%x", $time, Z1, C1_r, A1, B1); + end else begin + $display("%d: DSP_1: OK: act=%x exp=%x at A1=%x; B1=%x", $time, Z1, C1_r, A1, B1); + end + end + + // Simulation control / data dump + initial begin + $dumpfile(`VCD_FILE); + $dumpvars; + #10000 $finish_and_return( (error_count == 0) ? 0 : -1 ); + end + +endmodule + +module simd_mult_explicit_ports ( + input wire clk, + + input wire [ 9:0] a0, + input wire [ 8:0] b0, + output wire [18:0] z0, + + input wire [ 9:0] a1, + input wire [ 8:0] b1, + output wire [18:0] z1 +); + + dsp_t1_10x9x32_cfg_ports dsp_0 ( + .a_i (a0), + .b_i (b0), + .z_o (z0), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + + dsp_t1_10x9x32_cfg_ports dsp_1 ( + .a_i (a1), + .b_i (b1), + .z_o (z1), + + .clock_i (clk), + + .feedback_i (3'd0), + .load_acc_i (1'b0), + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b1) + ); + +endmodule From 89878d78b644051ef59b85c12b06a155472285db Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Fri, 8 Jul 2022 10:45:08 +0200 Subject: [PATCH 816/845] env: pin yosys version This is due to a failure reported in https://github.com/chipsalliance/yosys-f4pga-plugins/issues/365 Signed-off-by: Alessandro Comodi --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index e351c1ede..a4cf46c24 100644 --- a/environment.yml +++ b/environment.yml @@ -19,6 +19,6 @@ channels: - defaults - litex-hub dependencies: - - litex-hub::yosys + - litex-hub::yosys=0.17_7_g990c9b8e1=20220512_085338_py37 - litex-hub::surelog - litex-hub::iverilog From 568799ae667fc59a00b9d8418177a8a03e61fb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Tue, 5 Jul 2022 16:30:21 +0200 Subject: [PATCH 817/845] ql-qlf: k6n10f: DSP: reintroduce feedback port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Maciej Kurc Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/ql-dsp-io-regs.cc | 2 +- ql-qlf-plugin/qlf_k6n10f/dsp_sim.v | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index 4befecfea..976519f96 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -10,7 +10,7 @@ PRIVATE_NAMESPACE_BEGIN // ============================================================================ -const std::vector ports2del_mult = {"feedback", "load_acc", "subtract", "acc_fir", "dly_b"}; +const std::vector ports2del_mult = {"load_acc", "subtract", "acc_fir", "dly_b"}; const std::vector ports2del_mult_add_acc = {"acc_fir", "dly_b"}; const std::vector ports2del_extension = {"saturate_enable", "shift_right", "round"}; diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v index 9164d8cda..64e53c7ee 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v @@ -201,6 +201,7 @@ module QL_DSP2_MULT ( // TODO: Name subject to change // Port not available in architecture file input wire reset, + input wire [2:0] feedback, input wire unsigned_a, input wire unsigned_b, @@ -227,7 +228,7 @@ module QL_DSP2_MULT ( // TODO: Name subject to change .f_mode(f_mode), - .feedback(3'b0), + .feedback(feedback), .unsigned_a(unsigned_a), .unsigned_b(unsigned_b), @@ -247,6 +248,7 @@ module QL_DSP2_MULT_REGIN ( // TODO: Name subject to change // Port not available in architecture file input wire reset, + input wire [2:0] feedback, input wire unsigned_a, input wire unsigned_b, @@ -271,7 +273,7 @@ module QL_DSP2_MULT_REGIN ( // TODO: Name subject to change .f_mode(f_mode), - .feedback(3'b0), + .feedback(feedback), .unsigned_a(unsigned_a), .unsigned_b(unsigned_b), @@ -294,6 +296,7 @@ module QL_DSP2_MULT_REGOUT ( // TODO: Name subject to change // Port not available in architecture file input wire reset, + input wire [2:0] feedback, input wire unsigned_a, input wire unsigned_b, input wire f_mode, @@ -317,7 +320,7 @@ module QL_DSP2_MULT_REGOUT ( // TODO: Name subject to change .f_mode(f_mode), - .feedback(3'b0), + .feedback(feedback), .unsigned_a(unsigned_a), .unsigned_b(unsigned_b), @@ -340,6 +343,7 @@ module QL_DSP2_MULT_REGIN_REGOUT ( // TODO: Name subject to change // Port not available in architecture file input wire reset, + input wire [2:0] feedback, input wire unsigned_a, input wire unsigned_b, input wire f_mode, @@ -363,7 +367,7 @@ module QL_DSP2_MULT_REGIN_REGOUT ( // TODO: Name subject to change .f_mode(f_mode), - .feedback(3'b0), + .feedback(feedback), .unsigned_a(unsigned_a), .unsigned_b(unsigned_b), From e585521966cb35be024c16605064eaff1ce07adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Tue, 5 Jul 2022 16:32:02 +0200 Subject: [PATCH 818/845] revert d74e0dff: ql-qlf: k6n10f: dsp: mark ports... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...not available in architecture file Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/qlf_k6n10f/dsp_sim.v | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v index 64e53c7ee..e6084e058 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v @@ -198,7 +198,6 @@ module QL_DSP2_MULT ( // TODO: Name subject to change input wire [17:0] b, output wire [37:0] z, - // Port not available in architecture file input wire reset, input wire [2:0] feedback, @@ -245,7 +244,6 @@ module QL_DSP2_MULT_REGIN ( // TODO: Name subject to change (* clkbuf_sink *) input wire clk, - // Port not available in architecture file input wire reset, input wire [2:0] feedback, @@ -293,7 +291,6 @@ module QL_DSP2_MULT_REGOUT ( // TODO: Name subject to change (* clkbuf_sink *) input wire clk, - // Port not available in architecture file input wire reset, input wire [2:0] feedback, @@ -340,7 +337,6 @@ module QL_DSP2_MULT_REGIN_REGOUT ( // TODO: Name subject to change (* clkbuf_sink *) input wire clk, - // Port not available in architecture file input wire reset, input wire [2:0] feedback, @@ -385,14 +381,12 @@ module QL_DSP2_MULTADD ( input wire [17:0] b, output wire [37:0] z, - // begin: Ports not available in architecture file (* clkbuf_sink *) input wire clk, input wire reset, input wire [ 2:0] feedback, input wire load_acc, - // end: Ports not available in architecture file input wire unsigned_a, input wire unsigned_b, @@ -440,7 +434,6 @@ module QL_DSP2_MULTADD_REGIN ( (* clkbuf_sink *) input wire clk, - // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -492,7 +485,6 @@ module QL_DSP2_MULTADD_REGOUT ( (* clkbuf_sink *) input wire clk, - // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -544,7 +536,6 @@ module QL_DSP2_MULTADD_REGIN_REGOUT ( (* clkbuf_sink *) input wire clk, - // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -596,11 +587,9 @@ module QL_DSP2_MULTACC ( (* clkbuf_sink *) input wire clk, - // begin: Ports not available in architecture file input wire reset, input wire load_acc, - // end: Ports not available in architecture file input wire [ 2:0] feedback, input wire unsigned_a, input wire unsigned_b, @@ -649,7 +638,6 @@ module QL_DSP2_MULTACC_REGIN ( (* clkbuf_sink *) input wire clk, - // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -701,7 +689,6 @@ module QL_DSP2_MULTACC_REGOUT ( (* clkbuf_sink *) input wire clk, - // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, @@ -753,7 +740,6 @@ module QL_DSP2_MULTACC_REGIN_REGOUT ( (* clkbuf_sink *) input wire clk, - // Port not available in architecture file input wire reset, input wire [ 2:0] feedback, From a54dfd44065b1aa8c1a2795ff3d354d72c3ef384 Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Wed, 6 Jul 2022 12:55:32 +0200 Subject: [PATCH 819/845] ql-qlf: k6n10f: QL_DSP2_MULT: pass down acc_fir Co-authored-by: Maciej Kurc Signed-off-by: Pawel Czarnecki --- ql-qlf-plugin/ql-dsp-io-regs.cc | 20 ++++++++++++++++---- ql-qlf-plugin/qlf_k6n10f/dsp_sim.v | 8 ++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index 976519f96..66c579d6d 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -11,7 +11,8 @@ PRIVATE_NAMESPACE_BEGIN // ============================================================================ const std::vector ports2del_mult = {"load_acc", "subtract", "acc_fir", "dly_b"}; -const std::vector ports2del_mult_add_acc = {"acc_fir", "dly_b"}; +const std::vector ports2del_mult_acc = {"acc_fir", "dly_b"}; +const std::vector ports2del_mult_add = {"dly_b"}; const std::vector ports2del_extension = {"saturate_enable", "shift_right", "round"}; void ql_dsp_io_regs_pass(RTLIL::Module *module) @@ -95,10 +96,21 @@ void ql_dsp_io_regs_pass(RTLIL::Module *module) if (del_clk) ports2del.push_back("clk"); - if (out_sel_i == 0 || out_sel_i == 4) { + switch (out_sel_i) { + case 0: + case 4: ports2del.insert(ports2del.end(), ports2del_mult.begin(), ports2del_mult.end()); - } else { - ports2del.insert(ports2del.end(), ports2del_mult_add_acc.begin(), ports2del_mult_add_acc.end()); + break; + case 1: + case 5: + ports2del.insert(ports2del.end(), ports2del_mult_acc.begin(), ports2del_mult_acc.end()); + break; + case 2: + case 3: + case 6: + case 7: + ports2del.insert(ports2del.end(), ports2del_mult_add.begin(), ports2del_mult_add.end()); + break; } // Mark for deleton additional configuration ports diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v index e6084e058..d8f1c2585 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v @@ -386,6 +386,7 @@ module QL_DSP2_MULTADD ( input wire reset, input wire [ 2:0] feedback, + input wire [ 5:0] acc_fir, input wire load_acc, input wire unsigned_a, input wire unsigned_b, @@ -413,6 +414,7 @@ module QL_DSP2_MULTADD ( .f_mode(f_mode), .feedback(feedback), + .acc_fir(acc_fir), .load_acc(load_acc), .unsigned_a(unsigned_a), @@ -437,6 +439,7 @@ module QL_DSP2_MULTADD_REGIN ( input wire reset, input wire [ 2:0] feedback, + input wire [ 5:0] acc_fir, input wire load_acc, input wire unsigned_a, input wire unsigned_b, @@ -464,6 +467,7 @@ module QL_DSP2_MULTADD_REGIN ( .f_mode(f_mode), .feedback(feedback), + .acc_fir(acc_fir), .load_acc(load_acc), .unsigned_a(unsigned_a), @@ -488,6 +492,7 @@ module QL_DSP2_MULTADD_REGOUT ( input wire reset, input wire [ 2:0] feedback, + input wire [ 5:0] acc_fir, input wire load_acc, input wire unsigned_a, input wire unsigned_b, @@ -515,6 +520,7 @@ module QL_DSP2_MULTADD_REGOUT ( .f_mode(f_mode), .feedback(feedback), + .acc_fir(acc_fir), .load_acc(load_acc), .unsigned_a(unsigned_a), @@ -539,6 +545,7 @@ module QL_DSP2_MULTADD_REGIN_REGOUT ( input wire reset, input wire [ 2:0] feedback, + input wire [ 5:0] acc_fir, input wire load_acc, input wire unsigned_a, input wire unsigned_b, @@ -566,6 +573,7 @@ module QL_DSP2_MULTADD_REGIN_REGOUT ( .f_mode(f_mode), .feedback(feedback), + .acc_fir(acc_fir), .load_acc(load_acc), .unsigned_a(unsigned_a), From d0c15e0dca70a31f7bfe9bafdd90f9cb23afd7b2 Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Wed, 6 Jul 2022 12:58:49 +0200 Subject: [PATCH 820/845] ql-qlf: k6n10f: QL_DSP2_MULTADD: remove port clk Signed-off-by: Pawel Czarnecki --- ql-qlf-plugin/qlf_k6n10f/dsp_sim.v | 3 --- 1 file changed, 3 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v index d8f1c2585..841a41861 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v @@ -381,8 +381,6 @@ module QL_DSP2_MULTADD ( input wire [17:0] b, output wire [37:0] z, - (* clkbuf_sink *) - input wire clk, input wire reset, input wire [ 2:0] feedback, @@ -420,7 +418,6 @@ module QL_DSP2_MULTADD ( .unsigned_a(unsigned_a), .unsigned_b(unsigned_b), - .clk(clk), .reset(reset), .output_select(output_select), // unregistered output: ACCin (2, 3) From 51391e4f57084cc6b76a03dd76e3d64350f2923c Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Mon, 11 Jul 2022 13:51:28 +0200 Subject: [PATCH 821/845] ql-qlf: k6n10f: DSP: pass down output_select and register_inputs configuration bits Co-authored-by: Maciej Kurc Signed-off-by: Pawel Czarnecki --- ql-qlf-plugin/qlf_k6n10f/dsp_sim.v | 64 +++++++++++++++--------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v index 841a41861..94780cc22 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v @@ -232,8 +232,8 @@ module QL_DSP2_MULT ( // TODO: Name subject to change .unsigned_a(unsigned_a), .unsigned_b(unsigned_b), - .output_select(3'b0), // unregistered output: a * b (0) - .register_inputs(1'b0) // unregistered inputs + .output_select(output_select), // unregistered output: a * b (0) + .register_inputs(register_inputs) // unregistered inputs ); endmodule @@ -279,8 +279,8 @@ module QL_DSP2_MULT_REGIN ( // TODO: Name subject to change .clk(clk), .reset(reset), - .output_select(3'b0), // unregistered output: a * b (0) - .register_inputs(1'b1) // registered inputs + .output_select(output_select), // unregistered output: a * b (0) + .register_inputs(register_inputs) // registered inputs ); endmodule @@ -325,8 +325,8 @@ module QL_DSP2_MULT_REGOUT ( // TODO: Name subject to change .clk(clk), .reset(reset), - .output_select(3'b100), // registered output: a * b (4) - .register_inputs(1'b0) // unregistered inputs + .output_select(output_select), // registered output: a * b (4) + .register_inputs(register_inputs) // unregistered inputs ); endmodule @@ -371,8 +371,8 @@ module QL_DSP2_MULT_REGIN_REGOUT ( // TODO: Name subject to change .clk(clk), .reset(reset), - .output_select(3'b100), // registered output: a * b (4) - .register_inputs(1'b1) // registered inputs + .output_select(output_select), // registered output: a * b (4) + .register_inputs(register_inputs) // registered inputs ); endmodule @@ -420,9 +420,9 @@ module QL_DSP2_MULTADD ( .reset(reset), - .output_select(output_select), // unregistered output: ACCin (2, 3) + .output_select(output_select), // unregistered output: ACCin (2, 3) .subtract(subtract), - .register_inputs(1'b0) // unregistered inputs + .register_inputs(register_inputs) // unregistered inputs ); endmodule @@ -473,9 +473,9 @@ module QL_DSP2_MULTADD_REGIN ( .clk(clk), .reset(reset), - .output_select(output_select), // unregistered output: ACCin (2, 3) + .output_select(output_select), // unregistered output: ACCin (2, 3) .subtract(subtract), - .register_inputs(1'b1) // registered inputs + .register_inputs(register_inputs) // registered inputs ); endmodule @@ -526,9 +526,9 @@ module QL_DSP2_MULTADD_REGOUT ( .clk(clk), .reset(reset), - .output_select(output_select), // registered output: ACCin (6, 7) + .output_select(output_select), // registered output: ACCin (6, 7) .subtract(subtract), - .register_inputs(1'b0) // unregistered inputs + .register_inputs(register_inputs) // unregistered inputs ); endmodule @@ -579,9 +579,9 @@ module QL_DSP2_MULTADD_REGIN_REGOUT ( .clk(clk), .reset(reset), - .output_select(output_select), // registered output: ACCin (6, 7) + .output_select(output_select), // registered output: ACCin (6, 7) .subtract(subtract), - .register_inputs(1'b1) // registered inputs + .register_inputs(register_inputs) // registered inputs ); endmodule @@ -630,9 +630,9 @@ module QL_DSP2_MULTACC ( .clk(clk), .reset(reset), - .output_select(1'b1), // unregistered output: ACCout (1) + .output_select(output_select), // unregistered output: ACCout (1) .subtract(subtract), - .register_inputs(1'b0) // unregistered inputs + .register_inputs(register_inputs) // unregistered inputs ); endmodule @@ -681,9 +681,9 @@ module QL_DSP2_MULTACC_REGIN ( .clk(clk), .reset(reset), - .output_select(1'b1), // unregistered output: ACCout (1) + .output_select(output_select), // unregistered output: ACCout (1) .subtract(subtract), - .register_inputs(1'b1) // registered inputs + .register_inputs(register_inputs) // registered inputs ); endmodule @@ -732,9 +732,9 @@ module QL_DSP2_MULTACC_REGOUT ( .clk(clk), .reset(reset), - .output_select(3'b101), // registered output: ACCout (5) + .output_select(output_select), // registered output: ACCout (5) .subtract(subtract), - .register_inputs(1'b0) // unregistered inputs + .register_inputs(register_inputs) // unregistered inputs ); endmodule @@ -783,9 +783,9 @@ module QL_DSP2_MULTACC_REGIN_REGOUT ( .clk(clk), .reset(reset), - .output_select(3'b101), // registered output: ACCout (5) + .output_select(output_select), // registered output: ACCout (5) .subtract(subtract), - .register_inputs(1'b1) // registered inputs + .register_inputs(register_inputs) // registered inputs ); endmodule @@ -1325,11 +1325,11 @@ module QL_DSP3_MULT ( // TODO: Name subject to change localparam [19:0] COEFF_3 = MODE_BITS[79:60]; localparam [0:0] F_MODE = MODE_BITS[80]; - localparam [2:0] OUTPUT_SELECT = 3'b0; // unregistered output: a * b (0) + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; // unregistered output: a * b (0) localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; localparam [0:0] ROUND = MODE_BITS[91]; - localparam [0:0] REGISTER_INPUTS = 1'b0; // unregistered inputs + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; // unregistered inputs QL_DSP3 #( .MODE_BITS({ @@ -1382,11 +1382,11 @@ module QL_DSP3_MULT_REGIN ( // TODO: Name subject to change localparam [19:0] COEFF_3 = MODE_BITS[79:60]; localparam [0:0] F_MODE = MODE_BITS[80]; - localparam [2:0] OUTPUT_SELECT = 3'b0; // unregistered output: a * b (0) + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; // unregistered output: a * b (0) localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; localparam [0:0] ROUND = MODE_BITS[91]; - localparam [0:0] REGISTER_INPUTS = 1'b1; // registered inputs + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; // registered inputs QL_DSP3 #( .MODE_BITS({ @@ -1439,11 +1439,11 @@ module QL_DSP3_MULT_REGOUT ( // TODO: Name subject to change localparam [19:0] COEFF_3 = MODE_BITS[79:60]; localparam [0:0] F_MODE = MODE_BITS[80]; - localparam [2:0] OUTPUT_SELECT = 3'b100; // registered output: a * b (4) + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; // registered output: a * b (4) localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; localparam [0:0] ROUND = MODE_BITS[91]; - localparam [0:0] REGISTER_INPUTS = 1'b0; // unregistered inputs + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; // unregistered inputs QL_DSP3 #( .MODE_BITS({ @@ -1496,11 +1496,11 @@ module QL_DSP3_MULT_REGIN_REGOUT ( // TODO: Name subject to change localparam [19:0] COEFF_3 = MODE_BITS[79:60]; localparam [0:0] F_MODE = MODE_BITS[80]; - localparam [2:0] OUTPUT_SELECT = 3'b100; // registered output: a * b (4) + localparam [2:0] OUTPUT_SELECT = MODE_BITS[83:81]; // registered output: a * b (4) localparam [0:0] SATURATE_ENABLE = MODE_BITS[84]; localparam [5:0] SHIFT_RIGHT = MODE_BITS[90:85]; localparam [0:0] ROUND = MODE_BITS[91]; - localparam [0:0] REGISTER_INPUTS = 1'b1; // unregistered inputs + localparam [0:0] REGISTER_INPUTS = MODE_BITS[92]; // unregistered inputs QL_DSP3 #( .MODE_BITS({ From 23fa3455efc41b2f978b99b5ca50dd9ec87c4cce Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Mon, 11 Jul 2022 15:08:08 +0200 Subject: [PATCH 822/845] ql-qlf: k6n10f: DSP: add saturate_enable, shift_right and round ports to QL_DSP_MACC/MADD Co-authored-by: Maciej Kurc Signed-off-by: Pawel Czarnecki --- ql-qlf-plugin/ql-dsp-io-regs.cc | 10 +++---- ql-qlf-plugin/qlf_k6n10f/dsp_sim.v | 48 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index 66c579d6d..d9c2c7666 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -100,6 +100,11 @@ void ql_dsp_io_regs_pass(RTLIL::Module *module) case 0: case 4: ports2del.insert(ports2del.end(), ports2del_mult.begin(), ports2del_mult.end()); + // Mark for deleton additional configuration ports + if (!use_dsp_cfg_params) { + ports2del.insert(ports2del.end(), ports2del_extension.begin(), ports2del_extension.end()); + } + break; case 1: case 5: @@ -113,11 +118,6 @@ void ql_dsp_io_regs_pass(RTLIL::Module *module) break; } - // Mark for deleton additional configuration ports - if (!use_dsp_cfg_params) { - ports2del.insert(ports2del.end(), ports2del_extension.begin(), ports2del_extension.end()); - } - for (auto portname : ports2del) { const RTLIL::SigSpec *port = &dsp->getPort(RTLIL::escape_id(portname)); if (!port) diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v index 94780cc22..14ec751dd 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v @@ -391,6 +391,9 @@ module QL_DSP2_MULTADD ( input wire f_mode, input wire [ 2:0] output_select, + input wire saturate_enable, + input wire [ 5:0] shift_right, + input wire round, input wire subtract, input wire register_inputs ); @@ -421,6 +424,9 @@ module QL_DSP2_MULTADD ( .reset(reset), .output_select(output_select), // unregistered output: ACCin (2, 3) + .saturate_enable(saturate_enable), + .shift_right(shift_right), + .round(round), .subtract(subtract), .register_inputs(register_inputs) // unregistered inputs ); @@ -443,6 +449,9 @@ module QL_DSP2_MULTADD_REGIN ( input wire f_mode, input wire [ 2:0] output_select, + input wire saturate_enable, + input wire [ 5:0] shift_right, + input wire round, input wire subtract, input wire register_inputs ); @@ -474,6 +483,9 @@ module QL_DSP2_MULTADD_REGIN ( .reset(reset), .output_select(output_select), // unregistered output: ACCin (2, 3) + .saturate_enable(saturate_enable), + .shift_right(shift_right), + .round(round), .subtract(subtract), .register_inputs(register_inputs) // registered inputs ); @@ -496,6 +508,9 @@ module QL_DSP2_MULTADD_REGOUT ( input wire f_mode, input wire [ 2:0] output_select, + input wire saturate_enable, + input wire [ 5:0] shift_right, + input wire round, input wire subtract, input wire register_inputs ); @@ -527,6 +542,9 @@ module QL_DSP2_MULTADD_REGOUT ( .reset(reset), .output_select(output_select), // registered output: ACCin (6, 7) + .saturate_enable(saturate_enable), + .shift_right(shift_right), + .round(round), .subtract(subtract), .register_inputs(register_inputs) // unregistered inputs ); @@ -549,6 +567,9 @@ module QL_DSP2_MULTADD_REGIN_REGOUT ( input wire f_mode, input wire [ 2:0] output_select, + input wire saturate_enable, + input wire [ 5:0] shift_right, + input wire round, input wire subtract, input wire register_inputs ); @@ -580,6 +601,9 @@ module QL_DSP2_MULTADD_REGIN_REGOUT ( .reset(reset), .output_select(output_select), // registered output: ACCin (6, 7) + .saturate_enable(saturate_enable), + .shift_right(shift_right), + .round(round), .subtract(subtract), .register_inputs(register_inputs) // registered inputs ); @@ -601,6 +625,9 @@ module QL_DSP2_MULTACC ( input wire f_mode, input wire [ 2:0] output_select, + input wire saturate_enable, + input wire [ 5:0] shift_right, + input wire round, input wire subtract, input wire register_inputs ); @@ -631,6 +658,9 @@ module QL_DSP2_MULTACC ( .reset(reset), .output_select(output_select), // unregistered output: ACCout (1) + .saturate_enable(saturate_enable), + .shift_right(shift_right), + .round(round), .subtract(subtract), .register_inputs(register_inputs) // unregistered inputs ); @@ -652,6 +682,9 @@ module QL_DSP2_MULTACC_REGIN ( input wire f_mode, input wire [ 2:0] output_select, + input wire saturate_enable, + input wire [ 5:0] shift_right, + input wire round, input wire subtract, input wire register_inputs ); @@ -682,6 +715,9 @@ module QL_DSP2_MULTACC_REGIN ( .reset(reset), .output_select(output_select), // unregistered output: ACCout (1) + .saturate_enable(saturate_enable), + .shift_right(shift_right), + .round(round), .subtract(subtract), .register_inputs(register_inputs) // registered inputs ); @@ -703,6 +739,9 @@ module QL_DSP2_MULTACC_REGOUT ( input wire f_mode, input wire [ 2:0] output_select, + input wire saturate_enable, + input wire [ 5:0] shift_right, + input wire round, input wire subtract, input wire register_inputs ); @@ -733,6 +772,9 @@ module QL_DSP2_MULTACC_REGOUT ( .reset(reset), .output_select(output_select), // registered output: ACCout (5) + .saturate_enable(saturate_enable), + .shift_right(shift_right), + .round(round), .subtract(subtract), .register_inputs(register_inputs) // unregistered inputs ); @@ -754,6 +796,9 @@ module QL_DSP2_MULTACC_REGIN_REGOUT ( input wire f_mode, input wire [ 2:0] output_select, + input wire saturate_enable, + input wire [ 5:0] shift_right, + input wire round, input wire subtract, input wire register_inputs ); @@ -784,6 +829,9 @@ module QL_DSP2_MULTACC_REGIN_REGOUT ( .reset(reset), .output_select(output_select), // registered output: ACCout (5) + .saturate_enable(saturate_enable), + .shift_right(shift_right), + .round(round), .subtract(subtract), .register_inputs(register_inputs) // registered inputs ); From 4ce50aa74a6e28aa13bec9a5cb28297b5d09aeb8 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Thu, 26 May 2022 17:08:56 +0200 Subject: [PATCH 823/845] Remove unsupported -yydebug switch Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/uhdmcommonfrontend.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc index 6835d2efd..39a3c08d2 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.cc +++ b/systemverilog-plugin/uhdmcommonfrontend.cc @@ -33,7 +33,7 @@ void UhdmCommonFrontend::print_read_options() log(" ignore assert() statements"); log("\n"); log(" -debug\n"); - log(" alias for -dump_ast1 -dump_ast2 -dump_vlog1 -dump_vlog2 -yydebug\n"); + log(" alias for -dump_ast1 -dump_ast2 -dump_vlog1 -dump_vlog2\n"); log("\n"); log(" -dump_ast1\n"); log(" dump abstract syntax tree (before simplification)\n"); @@ -53,9 +53,6 @@ void UhdmCommonFrontend::print_read_options() log(" -dump_rtlil\n"); log(" dump generated RTLIL netlist\n"); log("\n"); - log(" -yydebug\n"); - log(" enable parser debug output\n"); - log("\n"); log(" -report [directory]\n"); log(" write a coverage report for the UHDM file\n"); log("\n"); @@ -110,8 +107,6 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve no_dump_ptr = true; } else if (args[i] == "-dump_rtlil") { dump_rtlil = true; - } else if (args[i] == "-yydebug") { - this->shared.debug_flag = true; } else if (args[i] == "-parse-only") { this->shared.parse_only = true; } else { From f7857fcc580b832e8bc7e8397ed1d8661497b858 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Thu, 26 May 2022 17:08:21 +0200 Subject: [PATCH 824/845] Add separate compilation flow Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/uhdmastshared.h | 8 ++++++++ systemverilog-plugin/uhdmcommonfrontend.cc | 11 +++++++++-- systemverilog-plugin/uhdmsurelogastfrontend.cc | 16 ++++++++++++++-- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/systemverilog-plugin/uhdmastshared.h b/systemverilog-plugin/uhdmastshared.h index 2fa3e8bc1..a1ad1c6ff 100644 --- a/systemverilog-plugin/uhdmastshared.h +++ b/systemverilog-plugin/uhdmastshared.h @@ -42,6 +42,14 @@ class UhdmAstShared // applies only to read_systemverilog command bool parse_only = false; + // Flag that determines whether we should defer the elaboration + // applies only to read_systemverilog command + bool defer = false; + + // Flag that determines whether we should perform the elaboration now + // applies only to read_systemverilog command + bool link = false; + // Top nodes of the design (modules, interfaces) std::unordered_map top_nodes; diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc index 39a3c08d2..a9f76a32b 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.cc +++ b/systemverilog-plugin/uhdmcommonfrontend.cc @@ -60,6 +60,10 @@ void UhdmCommonFrontend::print_read_options() log(" only read the abstract syntax tree and defer actual compilation\n"); log(" to a later 'hierarchy' command. Useful in cases where the default\n"); log(" parameters of modules yield invalid or not synthesizable code.\n"); + log(" Needs to be followed by read_systemverilog -link after reading\n"); + log(" all files.\n"); + log(" -link\n"); + log(" performs actual elaboration of the files read with -defer\n"); log(" -parse-only\n"); log(" this parameter only applies to read_systemverilog command,\n"); log(" it runs only Surelog to parse design, but doesn't load generated\n"); @@ -94,7 +98,7 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve } else if (args[i] == "-noassert") { this->shared.no_assert = true; } else if (args[i] == "-defer") { - defer = true; + this->shared.defer = true; } else if (args[i] == "-dump_ast1") { dump_ast1 = true; } else if (args[i] == "-dump_ast2") { @@ -109,11 +113,14 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve dump_rtlil = true; } else if (args[i] == "-parse-only") { this->shared.parse_only = true; + } else if (args[i] == "-link") { + this->shared.link = true; + // Surelog needs it in the command line to link correctly + unhandled_args.push_back(args[i]); } else { unhandled_args.push_back(args[i]); } } - extra_args(f, filename, args, args.size() - 1); // pass only unhandled args to Surelog // unhandled args starts with command name, // but Surelog expects args[0] to be program name diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index f2beaee28..e59ab5e02 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -108,9 +108,19 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { // Force -parse flag settings even if it wasn't specified clp->setwritePpOutput(true); clp->setParse(true); - clp->setCompile(true); - clp->setElaborate(true); clp->fullSVMode(true); + clp->setCacheAllowed(true); + if (this->shared.defer) { + clp->setCompile(false); + clp->setElaborate(false); + clp->setSepComp(true); + } else { + clp->setCompile(true); + clp->setElaborate(true); + } + if (this->shared.link) { + clp->setLink(true); + } SURELOG::scompiler *compiler = nullptr; const std::vector uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); @@ -136,6 +146,8 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { return nullptr; UhdmAst uhdm_ast(this->shared); + if (this->shared.defer && !this->shared.link) + return nullptr; AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); if (!this->report_directory.empty()) { this->shared.report.write(this->report_directory); From 03c1191f78bf9f9879dee7a07a9ec57b3c80ecfb Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Tue, 31 May 2022 13:47:50 +0200 Subject: [PATCH 825/845] Add separate-compilation test Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/tests/Makefile | 5 ++- .../separate-compilation-buf.sv | 21 +++++++++++++ .../separate-compilation-pkg.sv | 19 ++++++++++++ .../separate-compilation.tcl | 16 ++++++++++ .../separate-compilation.v | 31 +++++++++++++++++++ 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 systemverilog-plugin/tests/separate-compilation/separate-compilation-buf.sv create mode 100644 systemverilog-plugin/tests/separate-compilation/separate-compilation-pkg.sv create mode 100644 systemverilog-plugin/tests/separate-compilation/separate-compilation.tcl create mode 100644 systemverilog-plugin/tests/separate-compilation/separate-compilation.v diff --git a/systemverilog-plugin/tests/Makefile b/systemverilog-plugin/tests/Makefile index 378788fa8..e078fa75c 100644 --- a/systemverilog-plugin/tests/Makefile +++ b/systemverilog-plugin/tests/Makefile @@ -14,9 +14,12 @@ # # SPDX-License-Identifier: Apache-2.0 -TESTS = counter break_continue +TESTS = counter \ + break_continue \ + separate-compilation include $(shell pwd)/../../Makefile_test.common counter_verify = true break_continue_verify = $(call diff_test,break_continue,out) +separate-compilation_verify = true diff --git a/systemverilog-plugin/tests/separate-compilation/separate-compilation-buf.sv b/systemverilog-plugin/tests/separate-compilation/separate-compilation-buf.sv new file mode 100644 index 000000000..565946b5d --- /dev/null +++ b/systemverilog-plugin/tests/separate-compilation/separate-compilation-buf.sv @@ -0,0 +1,21 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 +module BUF ( + input I, + output O +); + assign O = I; +endmodule; diff --git a/systemverilog-plugin/tests/separate-compilation/separate-compilation-pkg.sv b/systemverilog-plugin/tests/separate-compilation/separate-compilation-pkg.sv new file mode 100644 index 000000000..b0362fcf9 --- /dev/null +++ b/systemverilog-plugin/tests/separate-compilation/separate-compilation-pkg.sv @@ -0,0 +1,19 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 +package pkg; + parameter BITS = 4; + parameter LOG2DELAY = 22; +endpackage diff --git a/systemverilog-plugin/tests/separate-compilation/separate-compilation.tcl b/systemverilog-plugin/tests/separate-compilation/separate-compilation.tcl new file mode 100644 index 000000000..e9eec9258 --- /dev/null +++ b/systemverilog-plugin/tests/separate-compilation/separate-compilation.tcl @@ -0,0 +1,16 @@ +yosys -import +if { [info procs read_uhdm] == {} } { plugin -i systemverilog } +yosys -import ;# ingest plugin commands + +set TMP_DIR /tmp +if { [info exists ::env(TMPDIR) ] } { + set TMP_DIR $::env(TMPDIR) +} + +# Testing simple round-trip +read_systemverilog -odir $TMP_DIR/separate-compilation-test -defer $::env(DESIGN_TOP)-pkg.sv +read_systemverilog -odir $TMP_DIR/separate-compilation-test -defer $::env(DESIGN_TOP)-buf.sv +read_systemverilog -odir $TMP_DIR/separate-compilation-test -defer $::env(DESIGN_TOP).v +read_systemverilog -odir $TMP_DIR/separate-compilation-test -link +hierarchy +write_verilog diff --git a/systemverilog-plugin/tests/separate-compilation/separate-compilation.v b/systemverilog-plugin/tests/separate-compilation/separate-compilation.v new file mode 100644 index 000000000..5bd294a08 --- /dev/null +++ b/systemverilog-plugin/tests/separate-compilation/separate-compilation.v @@ -0,0 +1,31 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 +module top ( + input clk, + output [3:0] led +); + + wire bufg; + BUF bufgctrl ( + .I(clk), + .O(bufg) + ); + reg [pkg::BITS + pkg::LOG2DELAY-1 : 0] counter = 0; + always @(posedge bufg) begin + counter <= counter + 1; + end + assign led[3:0] = counter >> pkg::LOG2DELAY; +endmodule From 0bc0d89ac9e55e1069ca07b1460aa0454547901f Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Thu, 2 Jun 2022 09:07:30 +0200 Subject: [PATCH 826/845] Update plugin documentation Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/systemverilog-plugin/README.md b/systemverilog-plugin/README.md index c8a12ce49..cdd2edd48 100644 --- a/systemverilog-plugin/README.md +++ b/systemverilog-plugin/README.md @@ -100,3 +100,18 @@ yosys> write_edif counter.edif ``` 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... +``` From e0652c865d6ff155289061c90489c63b6fa9dc2d Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Fri, 1 Jul 2022 13:51:41 +0200 Subject: [PATCH 827/845] Check for separate compilation before annotating Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/uhdmsurelogastfrontend.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/systemverilog-plugin/uhdmsurelogastfrontend.cc index e59ab5e02..0a72d2634 100644 --- a/systemverilog-plugin/uhdmsurelogastfrontend.cc +++ b/systemverilog-plugin/uhdmsurelogastfrontend.cc @@ -131,11 +131,6 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { } } - UHDM::Serializer serializer; - UHDM::SynthSubset *synthSubset = new UHDM::SynthSubset(&serializer, this->shared.nonSynthesizableObjects, false); - synthSubset->listenDesigns(uhdm_design); - delete synthSubset; - SURELOG::shutdown_compiler(compiler); delete clp; delete symbolTable; @@ -148,6 +143,17 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { UhdmAst uhdm_ast(this->shared); if (this->shared.defer && !this->shared.link) return nullptr; + + // FIXME: SynthSubset annotation is incompatible with separate compilation + // `-defer` turns elaboration off, so check for it + // Should be called 1. for normal flow 2. after finishing with `-link` + if (!this->shared.defer) { + UHDM::Serializer serializer; + UHDM::SynthSubset *synthSubset = new UHDM::SynthSubset(&serializer, this->shared.nonSynthesizableObjects, false); + synthSubset->listenDesigns(uhdm_design); + delete synthSubset; + } + AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design); if (!this->report_directory.empty()) { this->shared.report.write(this->report_directory); From 55e4ac9c697ed582a05bdc33189e17f9cf43e5c9 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Mon, 4 Jul 2022 09:58:34 +0200 Subject: [PATCH 828/845] Pass extra_args unless linking UHDM Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/uhdmcommonfrontend.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc index a9f76a32b..c22a34349 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.cc +++ b/systemverilog-plugin/uhdmcommonfrontend.cc @@ -121,6 +121,10 @@ void UhdmCommonFrontend::execute(std::istream *&f, std::string filename, std::ve unhandled_args.push_back(args[i]); } } + // Yosys gets confused when extra_args are passed with -link or no option + // It's done fully by Surelog, so skip it in this case + if (!this->shared.link) + extra_args(f, filename, args, args.size() - 1); // pass only unhandled args to Surelog // unhandled args starts with command name, // but Surelog expects args[0] to be program name From 3bf2010953af83428d71da6c048c5c43b3a7d63e Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Wed, 6 Jul 2022 13:15:11 +0200 Subject: [PATCH 829/845] Update -link description Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/uhdmcommonfrontend.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/systemverilog-plugin/uhdmcommonfrontend.cc index c22a34349..651552af6 100644 --- a/systemverilog-plugin/uhdmcommonfrontend.cc +++ b/systemverilog-plugin/uhdmcommonfrontend.cc @@ -63,7 +63,7 @@ void UhdmCommonFrontend::print_read_options() log(" Needs to be followed by read_systemverilog -link after reading\n"); log(" all files.\n"); log(" -link\n"); - log(" performs actual elaboration of the files read with -defer\n"); + log(" performs linking and elaboration of the files read with -defer\n"); log(" -parse-only\n"); log(" this parameter only applies to read_systemverilog command,\n"); log(" it runs only Surelog to parse design, but doesn't load generated\n"); From f25bd03a3654d9d11b55d03ab0f59ac75364d483 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Mon, 18 Jul 2022 13:35:05 +0200 Subject: [PATCH 830/845] Corrected detection if a QL_DSP2 can be MACC or MADD, updated the existing test Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-io-regs.cc | 298 +++++++++++------- .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 4 +- 2 files changed, 183 insertions(+), 119 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index d9c2c7666..de0566fa3 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -1,5 +1,6 @@ #include "kernel/sigtools.h" #include "kernel/yosys.h" +#include "kernel/sigtools.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN @@ -10,133 +11,30 @@ PRIVATE_NAMESPACE_BEGIN // ============================================================================ -const std::vector ports2del_mult = {"load_acc", "subtract", "acc_fir", "dly_b"}; -const std::vector ports2del_mult_acc = {"acc_fir", "dly_b"}; -const std::vector ports2del_mult_add = {"dly_b"}; -const std::vector ports2del_extension = {"saturate_enable", "shift_right", "round"}; - -void ql_dsp_io_regs_pass(RTLIL::Module *module) -{ - - for (auto cell : module->cells_) { - std::string cell_type = cell.second->type.str(); - if (cell_type == RTLIL::escape_id("QL_DSP2") || cell_type == RTLIL::escape_id("QL_DSP3")) { - auto dsp = cell.second; - bool del_clk = false; - bool use_dsp_cfg_params = cell_type == RTLIL::escape_id("QL_DSP3"); - - int reg_in_i; - int out_sel_i; - - // Get DSP configuration - if (use_dsp_cfg_params) { - // Read MODE_BITS at correct indexes - auto mode_bits = &dsp->getParam(RTLIL::escape_id("MODE_BITS")); - RTLIL::Const register_inputs; - register_inputs = mode_bits->bits.at(MODE_BITS_REGISTER_INPUTS_ID); - reg_in_i = register_inputs.as_int(); - - RTLIL::Const output_select; - output_select = mode_bits->extract(MODE_BITS_OUTPUT_SELECT_START_ID, MODE_BITS_OUTPUT_SELECT_WIDTH); - out_sel_i = output_select.as_int(); - } else { - // Read dedicated configuration ports - const RTLIL::SigSpec *register_inputs; - register_inputs = &dsp->getPort(RTLIL::escape_id("register_inputs")); - if (!register_inputs) - log_error("register_inputs port not found!"); - auto reg_in_c = register_inputs->as_const(); - reg_in_i = reg_in_c.as_int(); - - const RTLIL::SigSpec *output_select; - output_select = &dsp->getPort(RTLIL::escape_id("output_select")); - if (!output_select) - log_error("output_select port not found!"); - auto out_sel_c = output_select->as_const(); - out_sel_i = out_sel_c.as_int(); - } - - // Build new type name - std::string new_type = cell_type; - new_type += "_MULT"; - - switch (out_sel_i) { - case 1: - new_type += "ACC"; - break; - case 2: - case 3: - new_type += "ADD"; - break; - case 5: - new_type += "ACC"; - break; - case 6: - case 7: - new_type += "ADD"; - break; - default: - break; - } - - if (reg_in_i) - new_type += "_REGIN"; - - if (out_sel_i > 3) - new_type += "_REGOUT"; - - // Set new type name - dsp->type = RTLIL::IdString(new_type); - - // Delete ports unused in given type of DSP cell - del_clk = (!reg_in_i && out_sel_i <= 3 && out_sel_i != 1); - - std::vector ports2del; - - if (del_clk) - ports2del.push_back("clk"); - - switch (out_sel_i) { - case 0: - case 4: - ports2del.insert(ports2del.end(), ports2del_mult.begin(), ports2del_mult.end()); - // Mark for deleton additional configuration ports - if (!use_dsp_cfg_params) { - ports2del.insert(ports2del.end(), ports2del_extension.begin(), ports2del_extension.end()); - } +struct QlDspIORegs : public Pass { - break; - case 1: - case 5: - ports2del.insert(ports2del.end(), ports2del_mult_acc.begin(), ports2del_mult_acc.end()); - break; - case 2: - case 3: - case 6: - case 7: - ports2del.insert(ports2del.end(), ports2del_mult_add.begin(), ports2del_mult_add.end()); - break; - } + const std::vector ports2del_mult = {"load_acc", "subtract", "acc_fir", "dly_b"}; + const std::vector ports2del_mult_acc = {"acc_fir", "dly_b"}; + const std::vector ports2del_mult_add = {"dly_b"}; + const std::vector ports2del_extension = {"saturate_enable", "shift_right", "round"}; - for (auto portname : ports2del) { - const RTLIL::SigSpec *port = &dsp->getPort(RTLIL::escape_id(portname)); - if (!port) - log_error("%s port not found!", portname.c_str()); - dsp->connections_.erase(RTLIL::escape_id(portname)); - } - } - } -} + /// Temporary SigBit to SigBit helper map. + SigMap m_SigMap; -struct QlDspIORegs : public Pass { + // .......................................... - QlDspIORegs() : Pass("ql_dsp_io_regs", "Does something") {} + QlDspIORegs() : Pass( + "ql_dsp_io_regs", + "Changes types of QL_DSP2/QL_DSP3 depending on their configuration.") + {} void help() override { log("\n"); log(" ql_dsp_io_regs [options] [selection]\n"); log("\n"); + log("Looks for QL_DSP2/QL_DSP3 cells and changes their types depending\n"); + log("on their configuration.\n"); } void execute(std::vector a_Args, RTLIL::Design *a_Design) override @@ -153,6 +51,172 @@ struct QlDspIORegs : public Pass { ql_dsp_io_regs_pass(module); } } + + // Returns a pair of mask and value describing constant bit connections of + // a SigSpec + std::pair get_constant_mask_value (const RTLIL::SigSpec* sigspec) { + uint32_t mask = 0L; + uint32_t value = 0L; + + auto sigbits = sigspec->bits(); + for (ssize_t i=(sigbits.size() - 1); i >= 0; --i) { + auto other = m_SigMap(sigbits[i]); + + mask <<= 1; + value <<= 1; + + // A known constant + if (!other.is_wire() && other.data != RTLIL::Sx) { + mask |= 0x1; + value |= (other.data == RTLIL::S1); + } + } + + return std::make_pair(mask, value); + } + + void ql_dsp_io_regs_pass(RTLIL::Module *module) + { + // Setup the SigMap + m_SigMap.clear(); + m_SigMap.set(module); + + for (auto cell : module->cells_) { + std::string cell_type = cell.second->type.str(); + if (cell_type == RTLIL::escape_id("QL_DSP2") || cell_type == RTLIL::escape_id("QL_DSP3")) { + auto dsp = cell.second; + bool del_clk = true; + bool use_dsp_cfg_params = (cell_type == RTLIL::escape_id("QL_DSP3")); + + int reg_in_i; + int out_sel_i; + + // Get DSP configuration + if (use_dsp_cfg_params) { + // Read MODE_BITS at correct indexes + auto mode_bits = &dsp->getParam(RTLIL::escape_id("MODE_BITS")); + RTLIL::Const register_inputs; + register_inputs = mode_bits->bits.at(MODE_BITS_REGISTER_INPUTS_ID); + reg_in_i = register_inputs.as_int(); + + RTLIL::Const output_select; + output_select = mode_bits->extract(MODE_BITS_OUTPUT_SELECT_START_ID, MODE_BITS_OUTPUT_SELECT_WIDTH); + out_sel_i = output_select.as_int(); + } else { + // Read dedicated configuration ports + const RTLIL::SigSpec *register_inputs; + register_inputs = &dsp->getPort(RTLIL::escape_id("register_inputs")); + if (!register_inputs) + log_error("register_inputs port not found!"); + auto reg_in_c = register_inputs->as_const(); + reg_in_i = reg_in_c.as_int(); + + const RTLIL::SigSpec *output_select; + output_select = &dsp->getPort(RTLIL::escape_id("output_select")); + if (!output_select) + log_error("output_select port not found!"); + auto out_sel_c = output_select->as_const(); + out_sel_i = out_sel_c.as_int(); + } + + // Get the feedback port + const RTLIL::SigSpec *feedback; + feedback = &dsp->getPort(RTLIL::escape_id("feedback")); + if (!feedback) + log_error("feedback port not found!"); + + // Check if feedback is or can be set to 0 which implies MACC + auto feedback_con = get_constant_mask_value(feedback); + bool have_macc = (feedback_con.second == 0x0); + //log("mask=0x%08X value=0x%08X\n", consts.first, consts.second); + //log_error("=== END HERE ===\n"); + + // Build new type name + std::string new_type = cell_type; + new_type += "_MULT"; + + if (have_macc) { + switch (out_sel_i) { + case 1: + case 2: + case 3: + case 5: + case 7: + del_clk = false; + new_type += "ACC"; + break; + default: + break; + } + } + else { + switch (out_sel_i) { + case 1: + case 2: + case 3: + case 5: + case 7: + new_type += "ADD"; + break; + default: + break; + } + } + + if (reg_in_i) { + del_clk = false; + new_type += "_REGIN"; + } + + if (out_sel_i > 3) { + del_clk = false; + new_type += "_REGOUT"; + } + + // Set new type name + dsp->type = RTLIL::IdString(new_type); + + std::vector ports2del; + + if (del_clk) + ports2del.push_back("clk"); + + switch (out_sel_i) { + case 0: + case 4: + case 6: + ports2del.insert(ports2del.end(), ports2del_mult.begin(), ports2del_mult.end()); + // Mark for deleton additional configuration ports + if (!use_dsp_cfg_params) { + ports2del.insert(ports2del.end(), ports2del_extension.begin(), ports2del_extension.end()); + } + break; + case 1: + case 2: + case 3: + case 5: + case 7: + if (have_macc) { + ports2del.insert(ports2del.end(), ports2del_mult_acc.begin(), ports2del_mult_acc.end()); + } else { + ports2del.insert(ports2del.end(), ports2del_mult_add.begin(), ports2del_mult_add.end()); + } + break; + } + + for (auto portname : ports2del) { + const RTLIL::SigSpec *port = &dsp->getPort(RTLIL::escape_id(portname)); + if (!port) + log_error("%s port not found!", portname.c_str()); + dsp->connections_.erase(RTLIL::escape_id(portname)); + } + } + } + + // Clear the sigmap + m_SigMap.clear(); + } + } QlDspIORegs; PRIVATE_NAMESPACE_END diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl index d577d0abd..377689af2 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl @@ -75,6 +75,6 @@ test_dsp_design "macc_simple_clr" "_MULTACC" test_dsp_design "macc_simple_arst" "_MULTACC" test_dsp_design "macc_simple_ena" "_MULTACC" test_dsp_design "macc_simple_arst_clr_ena" "_MULTACC" -test_dsp_design "macc_simple_preacc" "_MULTADD" -test_dsp_design "macc_simple_preacc_clr" "_MULTADD" +test_dsp_design "macc_simple_preacc" "_MULTACC" +test_dsp_design "macc_simple_preacc_clr" "_MULTACC" From 2412f3546d99632e5f11052f5392d43cd6b4288a Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 19 Jul 2022 11:13:20 +0200 Subject: [PATCH 831/845] Added a test for type change of k6n10f QL_DSP2 in multiply+add mode. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/tests/Makefile | 4 +- .../tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl | 78 +++++++++++++++ .../tests/qlf_k6n10f/dsp_madd/dsp_madd.v | 96 +++++++++++++++++++ 3 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index 84dc8b36e..f2284c746 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -32,7 +32,8 @@ TESTS = \ pp3_bram \ qlf_k6n10f/dsp_mult \ qlf_k6n10f/dsp_simd \ - qlf_k6n10f/dsp_macc + qlf_k6n10f/dsp_macc \ + qlf_k6n10f/dsp_madd # qlf_k6n10_bram \ SIM_TESTS = \ @@ -73,4 +74,5 @@ pp3_bram_verify = true qlf_k6n10f-dsp_mult_verify = true qlf_k6n10f-dsp_simd_verify = true qlf_k6n10f-dsp_macc_verify = true +qlf_k6n10f-dsp_madd_verify = true #qlf_k6n10_bram_verify = true diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl new file mode 100644 index 000000000..eeefa6061 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl @@ -0,0 +1,78 @@ +# For some tests the equiv_induct pass seems to hang if opt_expr + opt_clean +# are not invoked after techmapping. Therefore this function is used instead +# of the equiv_opt pass. +proc check_equiv {top use_cfg_params} { + hierarchy -top ${top} + + design -save preopt + + if {${use_cfg_params} == 1} { + synth_quicklogic -family qlf_k6n10f -top ${top} -use_dsp_cfg_params + } else { + stat + synth_quicklogic -family qlf_k6n10f -top ${top} + } + + design -stash postopt + + design -copy-from preopt -as gold A:top + design -copy-from postopt -as gate A:top + + techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/cells_sim.v + techmap -wb -autoproc -map +/quicklogic/qlf_k6n10f/dsp_sim.v + yosys proc + opt_expr + opt_clean -purge + + async2sync + equiv_make gold gate equiv + equiv_induct equiv + equiv_status -assert equiv + + return +} + +proc test_dsp_design {top expected_cell_suffix} { + set TOP ${top} + # Infer DSP with configuration bits passed through ports + # We expect QL_DSP2 cells inferred + set USE_DSP_CFG_PARAMS 0 + design -load read + hierarchy -top ${TOP}_ports + check_equiv ${TOP}_ports ${USE_DSP_CFG_PARAMS} + design -load postopt + yosys cd ${TOP}_ports + select -assert-count 1 t:QL_DSP2${expected_cell_suffix} + select -assert-count 1 t:* + + # Infer DSP with configuration bits passed through parameters + # We expect QL_DSP3 cells inferred + set USE_DSP_CFG_PARAMS 1 + design -load read + hierarchy -top ${TOP}_params + check_equiv ${TOP}_params ${USE_DSP_CFG_PARAMS} + design -load postopt + yosys cd ${TOP}_params + select -assert-count 1 t:QL_DSP3${expected_cell_suffix} + select -assert-count 1 t:* + + return +} + +yosys -import +if { [info procs quicklogic_eqn] == {} } { plugin -i ql-qlf} +yosys -import ;# ingest plugin commands + +read_verilog dsp_madd.v +design -save read + +test_dsp_design "madd_simple" "_MULTADD" + +#test_dsp_design "macc_simple" "_MULTACC" +#test_dsp_design "macc_simple_clr" "_MULTACC" +#test_dsp_design "macc_simple_arst" "_MULTACC" +#test_dsp_design "macc_simple_ena" "_MULTACC" +#test_dsp_design "macc_simple_arst_clr_ena" "_MULTACC" +#test_dsp_design "macc_simple_preacc" "_MULTACC" +#test_dsp_design "macc_simple_preacc_clr" "_MULTACC" + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v new file mode 100644 index 000000000..45987d35d --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v @@ -0,0 +1,96 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +module madd_simple_ports ( + input wire [ 9:0] A, + input wire [ 8:0] B, + input wire [ 1:0] C, + output reg [18:0] Z +); + + // There is no support for autmoatic inference of multiply+add hence the + // DSP cell needs to be instanced manually. + + // B * coeff[C] + A + dsp_t1_10x9x32_cfg_ports # ( + .COEFF_0 (10'h011), + .COEFF_1 (10'h022), + .COEFF_2 (10'h033), + .COEFF_3 (10'h044) + ) dsp ( + .a_i (A), + .b_i (B), + .acc_fir_i (6'd0), + .z_o (Z), + .dly_b_o (), + + .feedback_i ({1'b1, C}), // 4-7 + .output_select_i (3'd3), + .register_inputs_i (1'b0), + + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + .load_acc_i (1'b1), + + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0) + ); + +endmodule + +module madd_simple_params ( + input wire [ 9:0] A, + input wire [ 8:0] B, + input wire [ 1:0] C, + output reg [18:0] Z +); + + // There is no support for autmoatic inference of multiply+add hence the + // DSP cell needs to be instanced manually. + + // B * coeff[C] + A + dsp_t1_10x9x32_cfg_params # ( + .COEFF_0 (10'h011), + .COEFF_1 (10'h022), + .COEFF_2 (10'h033), + .COEFF_3 (10'h044), + + .OUTPUT_SELECT (3'd3), + .SATURATE_ENABLE (1'b0), + .SHIFT_RIGHT (6'd0), + .ROUND (1'b0), + .REGISTER_INPUTS (1'b0) + ) dsp ( + .a_i (A), + .b_i (B), + .acc_fir_i (6'd0), + .z_o (Z), + .dly_b_o (), + + .feedback_i ({1'b1, C}), // 4-7 + + .unsigned_a_i (1'b1), + .unsigned_b_i (1'b1), + .load_acc_i (1'b1), + + .subtract_i (1'b0) + ); + +endmodule + +// ............................................................................ From 5c12d60c18970260b5e75502ccf2da7b5389c776 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Tue, 19 Jul 2022 11:16:42 +0200 Subject: [PATCH 832/845] Code formatting Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-io-regs.cc | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index de0566fa3..5772513e1 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -1,6 +1,5 @@ #include "kernel/sigtools.h" #include "kernel/yosys.h" -#include "kernel/sigtools.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN @@ -23,10 +22,7 @@ struct QlDspIORegs : public Pass { // .......................................... - QlDspIORegs() : Pass( - "ql_dsp_io_regs", - "Changes types of QL_DSP2/QL_DSP3 depending on their configuration.") - {} + QlDspIORegs() : Pass("ql_dsp_io_regs", "Changes types of QL_DSP2/QL_DSP3 depending on their configuration.") {} void help() override { @@ -54,20 +50,21 @@ struct QlDspIORegs : public Pass { // Returns a pair of mask and value describing constant bit connections of // a SigSpec - std::pair get_constant_mask_value (const RTLIL::SigSpec* sigspec) { + std::pair get_constant_mask_value(const RTLIL::SigSpec *sigspec) + { uint32_t mask = 0L; uint32_t value = 0L; auto sigbits = sigspec->bits(); - for (ssize_t i=(sigbits.size() - 1); i >= 0; --i) { + for (ssize_t i = (sigbits.size() - 1); i >= 0; --i) { auto other = m_SigMap(sigbits[i]); - mask <<= 1; + mask <<= 1; value <<= 1; // A known constant if (!other.is_wire() && other.data != RTLIL::Sx) { - mask |= 0x1; + mask |= 0x1; value |= (other.data == RTLIL::S1); } } @@ -128,8 +125,8 @@ struct QlDspIORegs : public Pass { // Check if feedback is or can be set to 0 which implies MACC auto feedback_con = get_constant_mask_value(feedback); bool have_macc = (feedback_con.second == 0x0); - //log("mask=0x%08X value=0x%08X\n", consts.first, consts.second); - //log_error("=== END HERE ===\n"); + // log("mask=0x%08X value=0x%08X\n", consts.first, consts.second); + // log_error("=== END HERE ===\n"); // Build new type name std::string new_type = cell_type; @@ -148,8 +145,7 @@ struct QlDspIORegs : public Pass { default: break; } - } - else { + } else { switch (out_sel_i) { case 1: case 2: @@ -164,12 +160,12 @@ struct QlDspIORegs : public Pass { } if (reg_in_i) { - del_clk = false; + del_clk = false; new_type += "_REGIN"; } if (out_sel_i > 3) { - del_clk = false; + del_clk = false; new_type += "_REGOUT"; } From 582af478018793dbecdabb7bdc1a3bc2cfa5270f Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Tue, 19 Jul 2022 11:33:40 -0700 Subject: [PATCH 833/845] Use a canonical way to test for an empty string. Testing for empty strings or containers with empty() is always the best and canonical choice. Signed-off-by: Henner Zeller --- ql-qlf-plugin/synth_quicklogic.cc | 4 ++-- systemverilog-plugin/UhdmAst.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index 5be10ec5e..c6a35d803 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -314,7 +314,7 @@ struct SynthQuickLogicPass : public ScriptPass { run("techmap -map +/mul2dsp.v [...]", " (for qlf_k6n10f if not -no_dsp)"); run("chtype -set $mul t:$__soft_mul", " (for qlf_k6n10f if not -no_dsp)"); run("techmap -map +/quicklogic/" + family + "/dsp_map.v", "(for qlf_k6n10f if not -no_dsp)"); - if (use_dsp_cfg_params == "") + if (use_dsp_cfg_params.empty()) run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=0", "(for qlf_k6n10f if not -no_dsp)"); else run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=1", "(for qlf_k6n10f if not -no_dsp)"); @@ -334,7 +334,7 @@ struct SynthQuickLogicPass : public ScriptPass { rule.a_maxwidth, rule.b_maxwidth, rule.a_minwidth, rule.b_minwidth, rule.type.c_str())); run("chtype -set $mul t:$__soft_mul"); } - if (use_dsp_cfg_params == "") + if (use_dsp_cfg_params.empty()) run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=0"); else run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=1"); diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index e982c6f94..c054c1b1d 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -3638,7 +3638,7 @@ void UhdmAst::process_repeat() if (node->type != AST::AST_BLOCK) { node = new AST::AstNode(AST::AST_BLOCK, node); } - if (node->str == "") { + if (node->str.empty()) { node->str = loop->str; // Needed in simplify step } loop->children.push_back(node); From e714e59dc6760f5532771d1a51934d9d42d2313b Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 22 Jul 2022 13:40:55 +0200 Subject: [PATCH 834/845] Added "is_inferred" attribute to all inferred k6n10f DSPs to distinguish them from manually inserted ones. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-io-regs.cc | 9 +++++++++ ql-qlf-plugin/ql-dsp-macc.cc | 3 +++ ql-qlf-plugin/ql-dsp-simd.cc | 10 ++++++++++ ql-qlf-plugin/qlf_k6n10f/dsp_map.v | 4 ++++ 4 files changed, 26 insertions(+) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index 5772513e1..3ea2a125a 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -82,6 +82,15 @@ struct QlDspIORegs : public Pass { std::string cell_type = cell.second->type.str(); if (cell_type == RTLIL::escape_id("QL_DSP2") || cell_type == RTLIL::escape_id("QL_DSP3")) { auto dsp = cell.second; + + // If the cell does not have the "is_inferred" attribute set + // then don't touch it. + if (!dsp->has_attribute(RTLIL::escape_id("is_inferred")) || + dsp->get_bool_attribute(RTLIL::escape_id("is_inferred")) == false) + { + continue; + } + bool del_clk = true; bool use_dsp_cfg_params = (cell_type == RTLIL::escape_id("QL_DSP3")); diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/ql-qlf-plugin/ql-dsp-macc.cc index 7f865b5f0..4fdfff1ca 100644 --- a/ql-qlf-plugin/ql-dsp-macc.cc +++ b/ql-qlf-plugin/ql-dsp-macc.cc @@ -131,6 +131,9 @@ static void create_ql_macc_dsp(ql_dsp_macc_pm &pm) // Add the DSP cell RTLIL::Cell *cell = pm.module->addCell(RTLIL::escape_id(name), type); + // Set attributes + cell->set_bool_attribute(RTLIL::escape_id("is_inferred"), true); + // Get input/output data signals RTLIL::SigSpec sig_a; RTLIL::SigSpec sig_b; diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index b2935a9a1..dfa3e38b1 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -261,6 +261,16 @@ struct QlDspSimdPass : public Pass { simd->setParam(RTLIL::escape_id("MODE_BITS"), RTLIL::Const(mode_bits)); log_assert(mode_bits.size() == mode_bits_size); + // Handle the "is_inferred" attribute. If one of the fragments + // is not inferred mark the whole DSP as not inferred + bool is_inferred_a = dsp_a->has_attribute(RTLIL::escape_id("is_inferred")) ? + dsp_a->get_bool_attribute(RTLIL::escape_id("is_inferred")) : false; + bool is_inferred_b = dsp_b->has_attribute(RTLIL::escape_id("is_inferred")) ? + dsp_b->get_bool_attribute(RTLIL::escape_id("is_inferred")) : false; + + simd->set_bool_attribute(RTLIL::escape_id("is_inferred"), + is_inferred_a && is_inferred_b); + // Mark DSP parts for removal cellsToRemove.push_back(dsp_a); cellsToRemove.push_back(dsp_b); diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v index bbfc494e1..bb9f05283 100644 --- a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/dsp_map.v @@ -34,6 +34,7 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); {{(18 - B_WIDTH){1'b0}}, B}; generate if (`USE_DSP_CFG_PARAMS == 0) begin + (* is_inferred=1 *) dsp_t1_20x18x64_cfg_ports _TECHMAP_REPLACE_ ( .a_i (a), .b_i (b), @@ -53,6 +54,7 @@ module \$__QL_MUL20X18 (input [19:0] A, input [17:0] B, output [37:0] Y); .register_inputs_i (1'b0) ); end else begin + (* is_inferred=1 *) dsp_t1_20x18x64_cfg_params #( .OUTPUT_SELECT (3'd0), .SATURATE_ENABLE (1'b0), @@ -98,6 +100,7 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); {{( 9 - B_WIDTH){1'b0}}, B}; generate if (`USE_DSP_CFG_PARAMS == 0) begin + (* is_inferred=1 *) dsp_t1_10x9x32_cfg_ports _TECHMAP_REPLACE_ ( .a_i (a), .b_i (b), @@ -117,6 +120,7 @@ module \$__QL_MUL10X9 (input [9:0] A, input [8:0] B, output [18:0] Y); .register_inputs_i (1'b0) ); end else begin + (* is_inferred=1 *) dsp_t1_10x9x32_cfg_params #( .OUTPUT_SELECT (3'd0), .SATURATE_ENABLE (1'b0), From 2f2f00911b2a9faf911615637c6e10d9b1c60a12 Mon Sep 17 00:00:00 2001 From: Rafal Kapuscik Date: Fri, 29 Jul 2022 08:27:14 +0200 Subject: [PATCH 835/845] Remove unused modules from top_nodes Signed-off-by: Rafal Kapuscik --- systemverilog-plugin/UhdmAst.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index e982c6f94..1d2b378bc 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -598,6 +598,8 @@ static AST::AstNode *convert_dot(AST::AstNode *wire_node, AST::AstNode *node, AS static void setup_current_scope(std::unordered_map top_nodes, AST::AstNode *current_top_node) { for (auto it = top_nodes.begin(); it != top_nodes.end(); it++) { + if (!it->second) + continue; if (it->second->type == AST::AST_PACKAGE) { for (auto &o : it->second->children) { // import only parameters @@ -1527,7 +1529,7 @@ void UhdmAst::process_design() } } // Once we walked everything, unroll that as children of this node - for (auto pair : shared.top_nodes) { + for (auto &pair : shared.top_nodes) { if (!pair.second) continue; if (!pair.second->get_bool_attribute(UhdmAst::partial())) { @@ -1542,7 +1544,10 @@ void UhdmAst::process_design() } } else { log_warning("Removing unused module: %s from the design.\n", pair.second->str.c_str()); + // TODO: This should be properly erased from the module, but it seems that it's + // needed to resolve scope delete pair.second; + pair.second = nullptr; } } } From e17b791fec4b83e8bebe263884d01947c42b21b7 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 22 Jul 2022 13:41:57 +0200 Subject: [PATCH 836/845] Updated tests Signed-off-by: Maciej Kurc --- .../tests/qlf_k6n10f/dsp_madd/dsp_madd.v | 8 ++++++ .../tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl | 25 ++++++++----------- .../tests/qlf_k6n10f/dsp_simd/dsp_simd.v | 21 ++++++++-------- .../dsp_simd_post_synth_sim.tcl | 4 +-- 4 files changed, 30 insertions(+), 28 deletions(-) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v index 45987d35d..1a02667e2 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v @@ -23,8 +23,12 @@ module madd_simple_ports ( // There is no support for autmoatic inference of multiply+add hence the // DSP cell needs to be instanced manually. + // + // To test the type change the "is_inferred" attribute is set here + // explicitily to mimic possible inference // B * coeff[C] + A + (* is_inferred=1 *) dsp_t1_10x9x32_cfg_ports # ( .COEFF_0 (10'h011), .COEFF_1 (10'h022), @@ -62,8 +66,12 @@ module madd_simple_params ( // There is no support for autmoatic inference of multiply+add hence the // DSP cell needs to be instanced manually. + // + // To test the type change the "is_inferred" attribute is set here + // explicitily to mimic possible inference // B * coeff[C] + A + (* is_inferred=1 *) dsp_t1_10x9x32_cfg_params # ( .COEFF_0 (10'h011), .COEFF_1 (10'h022), diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl index e8d9bbdbf..5f65729fc 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl @@ -48,7 +48,6 @@ proc test_dsp_cfg_ports {top expected_cell_suffix cells2match} { design -load postopt yosys cd ${top} select -assert-count ${cells2match} t:QL_DSP2${expected_cell_suffix} - select -assert-count 0 t:QL_DSP2 select -assert-count 0 t:dsp_t1_10x9x32_cfg_ports select -assert-count 0 t:dsp_t1_20x18x64_cfg_ports @@ -71,7 +70,6 @@ proc test_dsp_cfg_params {top expected_cell_suffix cells2match} { design -load postopt yosys cd ${TOP} select -assert-count ${cells2match} t:QL_DSP3${expected_cell_suffix} - select -assert-count 0 t:QL_DSP3 select -assert-count 0 t:dsp_t1_10x9x32_cfg_params select -assert-count 0 t:dsp_t1_20x18x64_cfg_params @@ -87,18 +85,15 @@ proc test_dsp_cfg_params {top expected_cell_suffix cells2match} { # of the inference, eg. _MULT, _MACC_REGIN, MADD_REGIN_REGOUT proc test_dsp_cfg_conflict {top expected_cell_suffix} { set TOP ${top} - set USE_DSP_CFG_PARAMS 1 + set USE_DSP_CFG_PARAMS 0 design -load read hierarchy -top $TOP check_equiv ${TOP} ${USE_DSP_CFG_PARAMS} design -load postopt yosys cd ${TOP} - select -assert-count 1 t:QL_DSP2${expected_cell_suffix} - select -assert-count 1 t:QL_DSP3${expected_cell_suffix} - select -assert-count 0 t:QL_DSP2 + select -assert-count 2 t:QL_DSP2${expected_cell_suffix} select -assert-count 0 t:dsp_t1_10x9x32_cfg_ports select -assert-count 0 t:dsp_t1_20x18x64_cfg_ports - select -assert-count 0 t:QL_DSP3 select -assert-count 0 t:dsp_t1_10x9x32_cfg_params select -assert-count 0 t:dsp_t1_20x18x64_cfg_params @@ -111,12 +106,12 @@ yosys -import ;# ingest plugin commands read_verilog dsp_simd.v design -save read -test_dsp_cfg_ports "simd_mult_explicit_ports" "_MULT_REGIN" 1 -test_dsp_cfg_params "simd_mult_explicit_params" "_MULT_REGIN" 1 -test_dsp_cfg_ports "simd_mult_inferred" "_MULT" 1 -test_dsp_cfg_params "simd_mult_inferred" "_MULT" 1 -test_dsp_cfg_ports "simd_mult_odd_ports" "_MULT_REGIN" 2 -test_dsp_cfg_params "simd_mult_odd_params" "_MULT_REGIN" 2 -test_dsp_cfg_ports "simd_mult_conflict_ports" "_MULT_REGIN" 2 -test_dsp_cfg_conflict "simd_mult_conflict_config" "_MULT_REGIN" +test_dsp_cfg_ports "simd_mult_explicit_ports" "" 1 +test_dsp_cfg_params "simd_mult_explicit_params" "" 1 +test_dsp_cfg_ports "simd_mult_inferred" "_MULT" 1 +test_dsp_cfg_params "simd_mult_inferred" "_MULT" 1 +test_dsp_cfg_ports "simd_mult_odd_ports" "" 2 +test_dsp_cfg_params "simd_mult_odd_params" "" 2 +test_dsp_cfg_ports "simd_mult_conflict_ports" "" 2 +test_dsp_cfg_conflict "simd_mult_conflict_config" "" diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v index dfd92085c..0b86a53ec 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v @@ -371,25 +371,24 @@ module simd_mult_conflict_config ( output wire [15:0] z1 ); - dsp_t1_10x9x32_cfg_params #( - .OUTPUT_SELECT (3'd0), - .SATURATE_ENABLE (1'b0), - .SHIFT_RIGHT (6'd0), - .ROUND (1'b0), - .REGISTER_INPUTS (1'b1) - ) dsp_0 ( + dsp_t1_10x9x32_cfg_ports dsp_0 ( .a_i (a0), .b_i (b0), .z_o (z0), - .clock_i (clk), + .clock_i (clk0), .feedback_i (3'd0), .load_acc_i (1'b0), .unsigned_a_i (1'b1), .unsigned_b_i (1'b1), - .subtract_i (1'b0) + .output_select_i (3'd0), + .saturate_enable_i (1'b0), + .shift_right_i (6'd0), + .round_i (1'b0), + .subtract_i (1'b0), + .register_inputs_i (1'b0) ); dsp_t1_10x9x32_cfg_ports dsp_1 ( @@ -397,7 +396,7 @@ module simd_mult_conflict_config ( .b_i (b1), .z_o (z1), - .clock_i (clk), + .clock_i (clk1), .feedback_i (3'd0), .load_acc_i (1'b0), @@ -409,7 +408,7 @@ module simd_mult_conflict_config ( .shift_right_i (6'd0), .round_i (1'b0), .subtract_i (1'b0), - .register_inputs_i (1'b1) + .register_inputs_i (1'b0) ); endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl index 050290a59..5fbc441b5 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl @@ -24,7 +24,7 @@ opt_expr -undriven opt_clean stat write_verilog sim/simd_mult_explicit_ports_post_synth.v -select -assert-count 1 t:QL_DSP2_MULT_REGIN +select -assert-count 1 t:QL_DSP2 select -clear design -load dsp_simd @@ -35,4 +35,4 @@ opt_expr -undriven opt_clean stat write_verilog sim/simd_mult_explicit_params_post_synth.v -select -assert-count 1 t:QL_DSP3_MULT_REGIN +select -assert-count 1 t:QL_DSP3 From ae7a729cb4532c63f18390b321ceb3ceb069fe53 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 29 Jul 2022 12:10:59 +0200 Subject: [PATCH 837/845] Code formatting Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-dsp-io-regs.cc | 4 +--- ql-qlf-plugin/ql-dsp-simd.cc | 11 +++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/ql-qlf-plugin/ql-dsp-io-regs.cc index 3ea2a125a..b7e9117e6 100644 --- a/ql-qlf-plugin/ql-dsp-io-regs.cc +++ b/ql-qlf-plugin/ql-dsp-io-regs.cc @@ -85,9 +85,7 @@ struct QlDspIORegs : public Pass { // If the cell does not have the "is_inferred" attribute set // then don't touch it. - if (!dsp->has_attribute(RTLIL::escape_id("is_inferred")) || - dsp->get_bool_attribute(RTLIL::escape_id("is_inferred")) == false) - { + if (!dsp->has_attribute(RTLIL::escape_id("is_inferred")) || dsp->get_bool_attribute(RTLIL::escape_id("is_inferred")) == false) { continue; } diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/ql-qlf-plugin/ql-dsp-simd.cc index dfa3e38b1..7893eb493 100644 --- a/ql-qlf-plugin/ql-dsp-simd.cc +++ b/ql-qlf-plugin/ql-dsp-simd.cc @@ -263,13 +263,12 @@ struct QlDspSimdPass : public Pass { // Handle the "is_inferred" attribute. If one of the fragments // is not inferred mark the whole DSP as not inferred - bool is_inferred_a = dsp_a->has_attribute(RTLIL::escape_id("is_inferred")) ? - dsp_a->get_bool_attribute(RTLIL::escape_id("is_inferred")) : false; - bool is_inferred_b = dsp_b->has_attribute(RTLIL::escape_id("is_inferred")) ? - dsp_b->get_bool_attribute(RTLIL::escape_id("is_inferred")) : false; + bool is_inferred_a = + dsp_a->has_attribute(RTLIL::escape_id("is_inferred")) ? dsp_a->get_bool_attribute(RTLIL::escape_id("is_inferred")) : false; + bool is_inferred_b = + dsp_b->has_attribute(RTLIL::escape_id("is_inferred")) ? dsp_b->get_bool_attribute(RTLIL::escape_id("is_inferred")) : false; - simd->set_bool_attribute(RTLIL::escape_id("is_inferred"), - is_inferred_a && is_inferred_b); + simd->set_bool_attribute(RTLIL::escape_id("is_inferred"), is_inferred_a && is_inferred_b); // Mark DSP parts for removal cellsToRemove.push_back(dsp_a); From 7a69cd855bedbd926ef53c57ccfae08d6919e374 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Wed, 3 Aug 2022 12:35:18 +0200 Subject: [PATCH 838/845] systemverilog: simplify unions The code for handling unions has been added together with the code for structs, however it was never called due to a missing switch entry. Signed-off-by: Tomasz Gorochowik --- systemverilog-plugin/UhdmAst.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc index 1d2b378bc..b995107e3 100644 --- a/systemverilog-plugin/UhdmAst.cc +++ b/systemverilog-plugin/UhdmAst.cc @@ -937,6 +937,7 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node) } break; case AST::AST_STRUCT: + case AST::AST_UNION: simplify_struct(current_node, 0, parent_node); // instance rather than just a type in a typedef or outer struct? if (!current_node->str.empty() && current_node->str[0] == '\\') { From 8bb33fe0fd0d3e2362389391650f24cdbc096016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Wed, 13 Apr 2022 15:38:04 +0200 Subject: [PATCH 839/845] ql-qlf: k6n10f: add pass for inference of RAM with asymmetric port widths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/Makefile | 13 +- .../ql-bram-asymmetric-wider-read.pmg | 66 +++ .../ql-bram-asymmetric-wider-write.pmg | 65 +++ ql-qlf-plugin/ql-bram-asymmetric.cc | 370 +++++++++++++ ql-qlf-plugin/qlf_k6n10f/brams_map.v | 512 ++++++++++++++++++ ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 243 ++++++++- 6 files changed, 1237 insertions(+), 32 deletions(-) create mode 100644 ql-qlf-plugin/ql-bram-asymmetric-wider-read.pmg create mode 100644 ql-qlf-plugin/ql-bram-asymmetric-wider-write.pmg create mode 100644 ql-qlf-plugin/ql-bram-asymmetric.cc diff --git a/ql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile index 3e08cd37b..b0411b847 100644 --- a/ql-qlf-plugin/Makefile +++ b/ql-qlf-plugin/Makefile @@ -23,10 +23,13 @@ SOURCES = synth_quicklogic.cc \ ql-dsp-simd.cc \ ql-dsp-macc.cc \ ql-bram-split.cc \ - ql-dsp-io-regs.cc + ql-dsp-io-regs.cc \ + ql-bram-asymmetric.cc DEPS = pmgen/ql-dsp-pm.h \ - pmgen/ql-dsp-macc.h + pmgen/ql-dsp-macc.h \ + pmgen/ql-bram-asymmetric-wider-write.h \ + pmgen/ql-bram-asymmetric-wider-read.h include ../Makefile_plugin.common @@ -85,6 +88,12 @@ pmgen/ql-dsp-pm.h: ../pmgen.py ql_dsp.pmg | pmgen pmgen/ql-dsp-macc.h: ../pmgen.py ql-dsp-macc.pmg | pmgen python3 ../pmgen.py -o $@ -p ql_dsp_macc ql-dsp-macc.pmg +pmgen/ql-bram-asymmetric-wider-write.h: ../pmgen.py ql-bram-asymmetric-wider-write.pmg | pmgen + python3 ../pmgen.py -o $@ -p ql_bram_asymmetric_wider_write ql-bram-asymmetric-wider-write.pmg + +pmgen/ql-bram-asymmetric-wider-read.h: ../pmgen.py ql-bram-asymmetric-wider-read.pmg | pmgen + python3 ../pmgen.py -o $@ -p ql_bram_asymmetric_wider_read ql-bram-asymmetric-wider-read.pmg + install_modules: $(VERILOG_MODULES) $(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);) diff --git a/ql-qlf-plugin/ql-bram-asymmetric-wider-read.pmg b/ql-qlf-plugin/ql-bram-asymmetric-wider-read.pmg new file mode 100644 index 000000000..6e2bae5f3 --- /dev/null +++ b/ql-qlf-plugin/ql-bram-asymmetric-wider-read.pmg @@ -0,0 +1,66 @@ +pattern ql_bram_asymmetric_wider_read + +state mem_wr_data +state mem_wr_en +state mem_wr_addr +state mem_rd_data +state mem_rd_addr +state mux_ab +state mux_s +state mux_ba +state mux_input +state wr_data_shift_a +state wr_data_shift_b +state wr_en_and_a +state wr_en_and_b +state wr_en_and_y +state wr_en_shift_a +state wr_en_shift_b +state wr_en_shift_y + +match mem + select mem->type == ($mem_v2) + // 2 because it is a primary output connected to one cell (rq port or $shiftx cell) + select nusers(port(mem, \WR_DATA)) == 2 + set mem_wr_data port(mem, \WR_DATA) + set mem_wr_en port(mem, \WR_EN) + set mem_wr_addr port(mem, \WR_ADDR) + set mem_rd_data port(mem, \RD_DATA) + set mem_rd_addr port(mem, \RD_ADDR) +endmatch + +match wr_en_and + select wr_en_and->type == ($and) + set wr_en_and_a port(wr_en_and, \A) + set wr_en_and_b port(wr_en_and, \B) + set wr_en_and_y port(wr_en_and, \Y) +endmatch + +match wr_en_shift + select wr_en_shift->type.in($shl) + set wr_en_shift_a port(wr_en_shift, \A) + set wr_en_shift_b port(wr_en_shift, \B) + set wr_en_shift_y port(wr_en_shift, \Y) +endmatch + +match mux + select mux->type == ($mux) + choice AB {\A, \B} + define BA (AB == \A ? \B : \A) + index port(mux, \Y) === mem_wr_en + index port(mux, AB) === wr_en_shift_y + set mux_ab port(mux, AB) + set mux_s port(mux, \S) + set mux_ba port(mux, BA) +endmatch + +match wr_data_shift + select wr_data_shift->type.in($shl) + index port(wr_data_shift, \Y) === mem_wr_data + set wr_data_shift_a port(wr_data_shift, \A) + set wr_data_shift_b port(wr_data_shift, \B) +endmatch + +code + accept; +endcode diff --git a/ql-qlf-plugin/ql-bram-asymmetric-wider-write.pmg b/ql-qlf-plugin/ql-bram-asymmetric-wider-write.pmg new file mode 100644 index 000000000..bd5a09af0 --- /dev/null +++ b/ql-qlf-plugin/ql-bram-asymmetric-wider-write.pmg @@ -0,0 +1,65 @@ +pattern ql_bram_asymmetric_wider_write + +state mem_rd_data +state mem_rd_addr +state mem_wr_data +state mem_wr_addr +state mem_wr_en +state rd_data_shift_y +state rd_data_ff_q +state rd_data_ff_en +state rd_data_ff_clk +state wr_addr_ff_d +state wr_en_mux_s +state rd_addr_and_a +state rd_addr_and_b + +match mem + select mem->type == ($mem_v2) + // 2 because it is a primary output connected to one cell (rq port or $shiftx cell) + select nusers(port(mem, \RD_DATA)) == 2 + set mem_rd_data port(mem, \RD_DATA) + set mem_rd_addr port(mem, \RD_ADDR) + set mem_wr_data port(mem, \WR_DATA) + set mem_wr_addr port(mem, \WR_ADDR) + set mem_wr_en port(mem, \WR_EN) +endmatch + +match rd_data_shift + select rd_data_shift->type.in($shiftx) + index port(rd_data_shift, \A) === mem_rd_data + set rd_data_shift_y port(rd_data_shift, \Y) +endmatch + +match rd_data_ff + select rd_data_ff->type.in($dffe) + select nusers(port(rd_data_ff, \D)) == 2 + index port(rd_data_ff, \D) === rd_data_shift_y + set rd_data_ff_q port(rd_data_ff, \Q) + set rd_data_ff_en port(rd_data_ff, \EN) + set rd_data_ff_clk port(rd_data_ff, \CLK) +endmatch + +match wr_addr_ff + select wr_addr_ff->type.in($dff) + select nusers(port(wr_addr_ff, \Q)) == 2 + index port(wr_addr_ff, \Q) === mem_wr_addr + set wr_addr_ff_d port(wr_addr_ff, \D) + optional +endmatch + +match wr_en_mux + select wr_en_mux->type.in($mux) + index port(wr_en_mux, \Y) === mem_wr_en[0] + set wr_en_mux_s port(wr_en_mux, \S) +endmatch + +match rd_addr_and + select rd_addr_and->type.in($and) + set rd_addr_and_a port(rd_addr_and, \A) + set rd_addr_and_b port(rd_addr_and, \B) +endmatch + +code + accept; +endcode diff --git a/ql-qlf-plugin/ql-bram-asymmetric.cc b/ql-qlf-plugin/ql-bram-asymmetric.cc new file mode 100644 index 000000000..f9ff49b42 --- /dev/null +++ b/ql-qlf-plugin/ql-bram-asymmetric.cc @@ -0,0 +1,370 @@ +#include "kernel/sigtools.h" +#include "kernel/yosys.h" + +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + +#include "pmgen/ql-bram-asymmetric-wider-read.h" +#include "pmgen/ql-bram-asymmetric-wider-write.h" + +void test_ql_bram_asymmetric_wider_read(ql_bram_asymmetric_wider_read_pm &pm) +{ + auto mem = pm.st_ql_bram_asymmetric_wider_read.mem; + auto mem_wr_addr = pm.st_ql_bram_asymmetric_wider_read.mem_wr_addr; + auto mem_rd_data = pm.st_ql_bram_asymmetric_wider_read.mem_rd_data; + auto mem_rd_addr = pm.st_ql_bram_asymmetric_wider_read.mem_rd_addr; + auto mux = pm.st_ql_bram_asymmetric_wider_read.mux; + auto mux_s = pm.st_ql_bram_asymmetric_wider_read.mux_s; + auto wr_en_shift = pm.st_ql_bram_asymmetric_wider_read.wr_en_shift; + auto wr_en_shift_b = pm.st_ql_bram_asymmetric_wider_read.wr_en_shift_b; + auto wr_data_shift = pm.st_ql_bram_asymmetric_wider_read.wr_data_shift; + auto wr_data_shift_a = pm.st_ql_bram_asymmetric_wider_read.wr_data_shift_a; + auto wr_data_shift_b = pm.st_ql_bram_asymmetric_wider_read.wr_data_shift_b; + auto wr_en_and = pm.st_ql_bram_asymmetric_wider_read.wr_en_and; + auto wr_en_and_a = pm.st_ql_bram_asymmetric_wider_read.wr_en_and_a; + auto wr_en_and_b = pm.st_ql_bram_asymmetric_wider_read.wr_en_and_b; + auto wr_en_and_y = pm.st_ql_bram_asymmetric_wider_read.wr_en_and_y; + + // Add the BRAM cell + RTLIL::Cell *cell = pm.module->addCell(RTLIL::escape_id("bram_asymmetric"), mem); + + // Set new type for cell so that it won't be processed by memory_bram pass + cell->type = IdString("$mem_v2_asymmetric"); + + // Prepare wires from memory cell side to compare against module wires + if (!mux_s.as_wire()) + log_error("WR_EN input wire not found"); + RTLIL::Wire *wr_en_cw = mux_s.as_wire(); + if (!mem_wr_addr.as_wire()) + log_error("WR_ADDR input wire not found"); + RTLIL::Wire *wr_addr_cw = mem_wr_addr.as_wire(); + if (!wr_data_shift_a.as_wire()) + log_error("WR_DATA input wire not found"); + RTLIL::Wire *wr_data_cw = wr_data_shift_a.as_wire(); + if (!mem_rd_addr.as_wire()) + log_error("RD_ADDR input wire not found"); + RTLIL::Wire *rd_addr_cw = mem_rd_addr.as_wire(); + if (!mem_rd_data.as_wire()) + log_error("RD_DATA input wire not found"); + RTLIL::Wire *rd_data_cw = mem_rd_data.as_wire(); + + // Check if wr_en_and cell has one of its inputs connected to write address + RTLIL::Wire *wr_en_and_a_w = nullptr; + RTLIL::Wire *wr_en_and_b_w = nullptr; + bool has_wire = false; + if (wr_en_and_a.is_wire()) { + has_wire = true; + wr_en_and_a_w = wr_en_and_a.as_wire(); + } + if (wr_en_and_b.is_wire()) { + has_wire = true; + wr_en_and_b_w = wr_en_and_b.as_wire(); + } + if (!has_wire) + log_error("RD_ADDR $and cell input wire not found"); + if ((wr_en_and_a_w != mem_wr_addr.as_wire()) & (wr_en_and_b_w != mem_wr_addr.as_wire())) + log_error("This is not the $and cell we are looking for"); + + // Compare and assign wires + RTLIL::Wire *wr_en_w = nullptr; + RTLIL::Wire *wr_addr_w = nullptr; + RTLIL::Wire *wr_data_w = nullptr; + RTLIL::Wire *rd_addr_w = nullptr; + RTLIL::Wire *rd_data_w = nullptr; + + for (auto wire : pm.module->wires_) { + if (wire.second == wr_en_cw) + wr_en_w = wire.second; + if (wire.second == wr_addr_cw) + wr_addr_w = wire.second; + if (wire.second == wr_data_cw) + wr_data_w = wire.second; + if (wire.second == rd_data_cw) + rd_data_w = wire.second; + if (wire.second == rd_addr_cw) + rd_addr_w = wire.second; + } + + if (!wr_en_w | !wr_addr_w | !wr_data_w | !rd_data_w | !rd_addr_w) + log_error("Match between RAM input wires and memory cell ports not found\n"); + + // Get address and data lines widths + int rd_addr_width = rd_addr_w->width; + int wr_addr_width = wr_addr_w->width; + int wr_data_width = wr_data_w->width; + int rd_data_width = rd_data_w->width; + + log_debug("Set RD_ADDR_WIDTH = %d, ", rd_addr_width); + log_debug("WR_ADDR_WIDTH = %d, ", wr_addr_width); + log_debug("RD_DATA_WIDTH = %d, ", rd_data_width); + log_debug("WR_DATA_WIDTH = %d\n", wr_data_width); + + // Set address and data lines width parameters used later in techmap + cell->setParam(RTLIL::escape_id("RD_ADDR_WIDTH"), RTLIL::Const(rd_addr_width)); + cell->setParam(RTLIL::escape_id("RD_DATA_WIDTH"), RTLIL::Const(rd_data_width)); + cell->setParam(RTLIL::escape_id("WR_ADDR_WIDTH"), RTLIL::Const(wr_addr_width)); + cell->setParam(RTLIL::escape_id("WR_DATA_WIDTH"), RTLIL::Const(wr_data_width)); + + int offset; + + switch (wr_data_width) { + case 1: + offset = 0; + break; + case 2: + offset = 1; + break; + case 4: + offset = 2; + break; + case 8: + case 9: + offset = 3; + break; + case 16: + case 18: + offset = 4; + break; + case 32: + case 36: + offset = 5; + break; + default: + offset = 0; + break; + } + + if (wr_en_and_y != wr_en_shift_b.extract(offset, wr_addr_width)) + log_error("This is not the wr_en $shl cell we are looking for"); + if (wr_en_and_y != wr_data_shift_b.extract(offset, wr_addr_width)) + log_error("This is not the wr_data $shl cell we are looking for"); + + // Bypass shift on write address line + cell->setPort(RTLIL::escape_id("WR_ADDR"), RTLIL::SigSpec(wr_addr_w)); + + // Bypass shift on write address line + cell->setPort(RTLIL::escape_id("WR_DATA"), RTLIL::SigSpec(wr_data_w)); + + // Bypass shift on write address line + cell->setPort(RTLIL::escape_id("WR_EN"), RTLIL::SigSpec(wr_en_w)); + + // Cleanup the module from unused cells + pm.module->remove(mem); + pm.module->remove(mux); + pm.module->remove(wr_en_shift); + pm.module->remove(wr_en_and); + pm.module->remove(wr_data_shift); +} + +void test_ql_bram_asymmetric_wider_write(ql_bram_asymmetric_wider_write_pm &pm) +{ + auto mem = pm.st_ql_bram_asymmetric_wider_write.mem; + auto mem_wr_addr = pm.st_ql_bram_asymmetric_wider_write.mem_wr_addr; + auto mem_wr_data = pm.st_ql_bram_asymmetric_wider_write.mem_wr_data; + auto mem_rd_data = pm.st_ql_bram_asymmetric_wider_write.mem_rd_data; + auto mem_rd_addr = pm.st_ql_bram_asymmetric_wider_write.mem_rd_addr; + auto rd_data_shift = pm.st_ql_bram_asymmetric_wider_write.rd_data_shift; + auto rd_data_shift_y = pm.st_ql_bram_asymmetric_wider_write.rd_data_shift_y; + auto rd_data_ff = pm.st_ql_bram_asymmetric_wider_write.rd_data_ff; + auto rd_data_ff_q = pm.st_ql_bram_asymmetric_wider_write.rd_data_ff_q; + auto rd_data_ff_en = pm.st_ql_bram_asymmetric_wider_write.rd_data_ff_en; + auto rd_data_ff_clk = pm.st_ql_bram_asymmetric_wider_write.rd_data_ff_clk; + auto wr_addr_ff = pm.st_ql_bram_asymmetric_wider_write.wr_addr_ff; + auto wr_addr_ff_d = pm.st_ql_bram_asymmetric_wider_write.wr_addr_ff_d; + auto wr_en_mux = pm.st_ql_bram_asymmetric_wider_write.wr_en_mux; + auto wr_en_mux_s = pm.st_ql_bram_asymmetric_wider_write.wr_en_mux_s; + auto rd_addr_and = pm.st_ql_bram_asymmetric_wider_write.rd_addr_and; + auto rd_addr_and_a = pm.st_ql_bram_asymmetric_wider_write.rd_addr_and_a; + auto rd_addr_and_b = pm.st_ql_bram_asymmetric_wider_write.rd_addr_and_b; + + // Add the BRAM cell + RTLIL::Cell *cell = pm.module->addCell(RTLIL::escape_id("bram_asymmetric"), mem); + + // Set new type for cell so that it won't be processed by memory_bram pass + cell->type = IdString("$mem_v2_asymmetric"); + + // Prepare wires from memory cell side to compare against module wires + RTLIL::Wire *rd_data_wc = nullptr; + RTLIL::Wire *rd_en_wc = nullptr; + RTLIL::Wire *clk_wc = nullptr; + RTLIL::Wire *rd_addr_and_a_wc = nullptr; + RTLIL::Wire *rd_addr_and_b_wc = nullptr; + + if (rd_data_ff) { + if (!rd_data_ff_q.as_wire()) + log_error("RD_DATA input wire not found"); + rd_data_wc = rd_data_ff_q.as_wire(); + if (!rd_data_ff_en.as_wire()) + log_error("RD_EN input wire not found"); + rd_en_wc = rd_data_ff_en.as_wire(); + if (!rd_data_ff_clk.as_wire()) + log_error("RD_CLK input wire not found"); + clk_wc = rd_data_ff_clk.as_wire(); + } else { + log_error("output FF not found"); + } + + if (rd_addr_and) { + bool has_wire = false; + if (rd_addr_and_a.is_wire()) { + has_wire = true; + rd_addr_and_a_wc = rd_addr_and_a.as_wire(); + } + if (rd_addr_and_b.is_wire()) { + has_wire = true; + rd_addr_and_b_wc = rd_addr_and_b.as_wire(); + } + if (!has_wire) + log_error("RD_ADDR $and cell input wire not found"); + } else { + log_debug("RD_ADDR $and cell not found"); + } + + RTLIL::Wire *wr_addr_wc; + if (wr_addr_ff) { + if (!wr_addr_ff_d.as_wire()) + log_error("WR_ADDR input wire not found"); + wr_addr_wc = wr_addr_ff_d.as_wire(); + } else { + if (!mem_wr_addr.as_wire()) + log_error("WR_ADDR input wire not found"); + wr_addr_wc = mem_wr_addr.as_wire(); + } + + if (!mem_rd_addr.as_wire()) + log_error("RD_ADDR input wire not found"); + auto rd_addr_wc = mem_rd_addr.as_wire(); + if (!mem_wr_data.as_wire()) + log_error("WR_DATA input wire not found"); + auto wr_data_wc = mem_wr_data.as_wire(); + + // Check if wr_en_and cell has one of its inputs connected to write address + + // Compare and assign wires + RTLIL::Wire *rd_addr_w = nullptr; + RTLIL::Wire *rd_data_w = nullptr; + RTLIL::Wire *rd_en_w = nullptr; + RTLIL::Wire *rd_clk_w = nullptr; + RTLIL::Wire *wr_addr_w = nullptr; + RTLIL::Wire *wr_data_w = nullptr; + + for (auto wire : pm.module->wires_) { + if (wire.second == rd_addr_wc) + rd_addr_w = wire.second; + if (wire.second == rd_data_wc) + rd_data_w = wire.second; + if (wire.second == rd_en_wc) + rd_en_w = wire.second; + if (wire.second == clk_wc) + rd_clk_w = wire.second; + if (wire.second == wr_addr_wc) + wr_addr_w = wire.second; + if (wire.second == wr_data_wc) + wr_data_w = wire.second; + } + + if (!rd_addr_w | !rd_data_w | !rd_en_w | !rd_clk_w | !wr_addr_w | !wr_data_w) + log_error("Match between RAM input wires and memory cell ports not found\n"); + + // Set shift output SigSpec as RD_DATA + cell->setPort(RTLIL::escape_id("RD_DATA"), rd_data_shift_y); + + // Get address and data lines widths + int rd_addr_width = rd_addr_w->width; + int wr_addr_width = wr_addr_w->width; + int wr_data_width = wr_data_w->width; + int rd_data_width = rd_data_w->width; + + log_debug("Set RD_ADDR_WIDTH = %d, ", rd_addr_width); + log_debug("WR_ADDR_WIDTH = %d, ", wr_addr_width); + log_debug("RD_DATA_WIDTH = %d, ", rd_data_width); + log_debug("WR_DATA_WIDTH = %d\n", wr_data_width); + + // Set address and data lines width parameters used later in techmap + cell->setParam(RTLIL::escape_id("RD_ADDR_WIDTH"), RTLIL::Const(rd_addr_width)); + cell->setParam(RTLIL::escape_id("RD_DATA_WIDTH"), RTLIL::Const(rd_data_width)); + cell->setParam(RTLIL::escape_id("WR_ADDR_WIDTH"), RTLIL::Const(wr_addr_width)); + cell->setParam(RTLIL::escape_id("WR_DATA_WIDTH"), RTLIL::Const(wr_data_width)); + + // Bypass read address shift and connect line straight to memory cell + auto rd_addr_s = RTLIL::SigSpec(rd_addr_w); + cell->setPort(RTLIL::escape_id("RD_ADDR"), rd_addr_s); + + if (wr_addr_ff) { + // Bypass FF on write address line if exists + // wr_addr_ff_d will not be assigned if wr_addr_ff was not detected earlier + cell->setPort(RTLIL::escape_id("WR_ADDR"), wr_addr_ff_d); + } else { + // When there are no regs on address lines, the clock isn't connected to memory + // Reconnect the clock + auto rd_clk_s = RTLIL::SigSpec(rd_clk_w); + cell->setPort(RTLIL::escape_id("RD_CLK"), rd_clk_s); + } + + // Bypass FF on Data Output and connect the output straight to RD_DATA port + cell->setPort(RTLIL::escape_id("RD_DATA"), rd_data_ff_q); + + // Bypass MUX on WRITE ENABLE and connect the output straight to WR_EN port + cell->setPort(RTLIL::escape_id("WR_EN"), wr_en_mux_s); + + // Connect Read Enable signal to memory cell + if (!rd_en_w) + log_error("Wire \\rce not found"); + auto rd_en_s = RTLIL::SigSpec(rd_en_w); + cell->setPort(RTLIL::escape_id("RD_EN"), rd_en_s); + + // Cleanup the module from unused cells + pm.module->remove(mem); + pm.module->remove(rd_data_shift); + pm.module->remove(rd_data_ff); + pm.module->remove(wr_en_mux); + if (wr_addr_ff) + pm.module->remove(wr_addr_ff); + // Check if detected $and is connected to RD_ADDR + if ((rd_addr_and_a_wc != rd_addr_w) & (rd_addr_and_b_wc != rd_addr_w)) + log_error("This is not the $and cell we are looking for"); + else + pm.module->remove(rd_addr_and); +} + +struct QLBramAsymmetric : public Pass { + + QLBramAsymmetric() + : Pass("ql_bram_asymmetric", + "Detects memory cells with asymmetric read and write port widths implemented with shifts and infers custom asymmetric memory cell") + { + } + + void help() override + { + log("\n"); + log(" ql_bram_asymmetric\n"); + log("\n"); + log(" Detects memory cells with asymmetric read and write port widths implemented with shifts and infers custom asymmetric memory " + "cell"); + log("\n"); + } + + void execute(std::vector a_Args, RTLIL::Design *a_Design) override + { + log_header(a_Design, "Executing QL_BRAM_ASYMMETRIC pass.\n"); + + size_t argidx; + for (argidx = 1; argidx < a_Args.size(); argidx++) { + break; + } + extra_args(a_Args, argidx, a_Design); + + int found_cells; + for (auto module : a_Design->selected_modules()) { + found_cells = ql_bram_asymmetric_wider_write_pm(module, module->selected_cells()) + .run_ql_bram_asymmetric_wider_write(test_ql_bram_asymmetric_wider_write); + log_debug("found %d cells matching for wider write port\n", found_cells); + found_cells = ql_bram_asymmetric_wider_read_pm(module, module->selected_cells()) + .run_ql_bram_asymmetric_wider_read(test_ql_bram_asymmetric_wider_read); + log_debug("found %d cells matching for wider read port\n", found_cells); + } + } +} QLBramAsymmetric; + +PRIVATE_NAMESPACE_END diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index 69c5298dc..ed644942d 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -483,3 +483,515 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA ); endmodule +(* techmap_celltype = "$mem_v2_asymmetric" *) +module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, RD_EN, RD_SRST, WR_ADDR, WR_CLK, WR_DATA, WR_EN); + parameter CFG_ABITS = 10; + parameter CFG_DBITS = 36; + parameter CFG_ENABLE_B = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + + parameter RD_ADDR_WIDTH = 11; + parameter RD_DATA_WIDTH = 16; + parameter WR_ADDR_WIDTH = 10; + parameter WR_DATA_WIDTH = 32; + + parameter ABITS = 0; + parameter MEMID = 0; + parameter [36863:0] INIT = 36864'bx; + parameter OFFSET = 0; + parameter RD_ARST_VALUE = 0; + parameter RD_CE_OVER_SRST = 0; + parameter RD_CLK_ENABLE = 0; + parameter RD_CLK_POLARITY = 0; + parameter RD_COLLISION_X_MASK = 0; + parameter RD_INIT_VALUE = 0; + parameter RD_PORTS = 0; + parameter RD_SRST_VALUE = 0; + parameter RD_TRANSPARENCY_MASK = 0; + parameter RD_WIDE_CONTINUATION = 0; + parameter SIZE = 0; + parameter WIDTH = 0; + parameter WR_CLK_ENABLE = 0; + parameter WR_CLK_POLARITY = 0; + parameter WR_PORTS = 0; + parameter WR_PRIORITY_MASK = 0; + parameter WR_WIDE_CONTINUATION = 0; + + localparam MODE_36 = 3'b111; // 36 or 32-bit + localparam MODE_18 = 3'b110; // 18 or 16-bit + localparam MODE_9 = 3'b101; // 9 or 8-bit + localparam MODE_4 = 3'b100; // 4-bit + localparam MODE_2 = 3'b010; // 32-bit + localparam MODE_1 = 3'b001; // 32-bit + + localparam READ_DATA_BITS_TO_SKIP = 36 - RD_DATA_WIDTH; + + input RD_CLK; + input WR_CLK; + input RD_ARST; + input RD_SRST; + + input [RD_ADDR_WIDTH-1:0] RD_ADDR; + output [RD_DATA_WIDTH-1:0] RD_DATA; + input RD_EN; + + input [WR_ADDR_WIDTH-1:0] WR_ADDR; + input [WR_DATA_WIDTH-1:0] WR_DATA; + input [CFG_ENABLE_B-1:0] WR_EN; + + wire [14:RD_ADDR_WIDTH] RD_ADDR_CMPL; + wire [14:WR_ADDR_WIDTH] WR_ADDR_CMPL; + wire [35:RD_DATA_WIDTH] RD_DATA_CMPL; + wire [35:WR_DATA_WIDTH] WR_DATA_CMPL; + + wire [14:0] RD_ADDR_TOTAL; + wire [14:0] WR_ADDR_TOTAL; + wire [35:0] RD_DATA_TOTAL; + wire [35:0] WR_DATA_TOTAL; + + wire [14:0] RD_ADDR_SHIFTED; + wire [14:0] WR_ADDR_SHIFTED; + + wire FLUSH1; + wire FLUSH2; + + assign RD_ADDR_CMPL = {15-RD_ADDR_WIDTH{1'b0}}; + assign WR_ADDR_CMPL = {15-WR_ADDR_WIDTH{1'b0}}; + + assign RD_ADDR_TOTAL = {RD_ADDR_CMPL, RD_ADDR}; + assign WR_ADDR_TOTAL = {WR_ADDR_CMPL, WR_ADDR}; + + assign WR_DATA_TOTAL = {WR_DATA_CMPL, WR_DATA}; + + // Assign parameters + case (RD_DATA_WIDTH) + 1: begin + case (WR_DATA_WIDTH) + 1: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0 + }; + end + 2: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_1, `MODE_1, 1'd0 + }; + end + 4: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_1, `MODE_1, 1'd0 + }; + end + 8, 9: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_1, `MODE_1, 1'd0 + }; + end + 16, 18: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_1, `MODE_1, 1'd0 + }; + end + 32, 36: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_1, `MODE_1, 1'd0 + }; + end + default: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0 + }; + end + endcase + end + 2: begin + case (WR_DATA_WIDTH) + 1: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_2, `MODE_2, 1'd0 + }; + end + 2: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_2, `MODE_2, 1'd0 + }; + end + 4: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_2, `MODE_2, 1'd0 + }; + end + 8, 9: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_2, `MODE_2, 1'd0 + }; + end + 16, 18: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_2, `MODE_2, 1'd0 + }; + end + 32, 36: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_2, `MODE_2, 1'd0 + }; + end + default: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_2, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_2, `MODE_2, 1'd0 + }; + end + endcase + end + 4: begin + case (WR_DATA_WIDTH) + 1: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_4, `MODE_4, 1'd0 + }; + end + 2: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_4, `MODE_4, 1'd0 + }; + end + 4: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_4, `MODE_4, 1'd0 + }; + end + 8, 9: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_4, `MODE_4, 1'd0 + }; + end + 16, 18: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_4, `MODE_4, 1'd0 + }; + end + 32, 36: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_4, `MODE_4, 1'd0 + }; + end + default: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_4, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_4, `MODE_4, 1'd0 + }; + end + endcase + end + 8, 9: begin + case (WR_DATA_WIDTH) + 1: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_9, `MODE_9, 1'd0 + }; + end + 2: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_9, `MODE_9, 1'd0 + }; + end + 4: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_9, `MODE_9, 1'd0 + }; + end + 8, 9: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_9, `MODE_9, 1'd0 + }; + end + 16, 18: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_9, `MODE_9, 1'd0 + }; + end + 32, 36: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_9, `MODE_9, 1'd0 + }; + end + default: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_9, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_9, `MODE_9, 1'd0 + }; + end + endcase + end + 16, 18: begin + case (WR_DATA_WIDTH) + 1: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_18, `MODE_18, 1'd0 + }; + end + 2: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_18, `MODE_18, 1'd0 + }; + end + 4: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_18, `MODE_18, 1'd0 + }; + end + 8, 9: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_18, `MODE_18, 1'd0 + }; + end + 16, 18: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_18, `MODE_18, 1'd0 + }; + end + 32, 36: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_18, `MODE_18, 1'd0 + }; + end + default: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_18, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_18, `MODE_18, 1'd0 + }; + end + endcase + end + 32, 36: begin + case (WR_DATA_WIDTH) + 1: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_36, `MODE_36, 1'd0 + }; + end + 2: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_36, `MODE_36, 1'd0 + }; + end + 4: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_36, `MODE_36, 1'd0 + }; + end + 8, 9: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_36, `MODE_36, 1'd0 + }; + end + 16, 18: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_36, `MODE_36, 1'd0 + }; + end + 32, 36: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_36, `MODE_36, 1'd0 + }; + end + default: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_36, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_36, `MODE_36, 1'd0 + }; + end + endcase + end + default: begin + case (WR_DATA_WIDTH) + 1: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0 + }; + end + 2: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_1, `MODE_1, 1'd0 + }; + end + 4: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_1, `MODE_1, 1'd0 + }; + end + 8, 9: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_1, `MODE_1, 1'd0 + }; + end + 16, 18: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_1, `MODE_1, 1'd0 + }; + end + 32, 36: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_1, `MODE_1, 1'd0 + }; + end + default: begin + defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_1, `MODE_1, 1'd0 + }; + end + endcase + end + endcase + + // Apply shift + case (RD_DATA_WIDTH) + 1: begin + assign RD_ADDR_SHIFTED = RD_ADDR_TOTAL; + end + 2: begin + assign RD_ADDR_SHIFTED = RD_ADDR_TOTAL << 1; + end + 4: begin + assign RD_ADDR_SHIFTED = RD_ADDR_TOTAL << 2; + end + 8, 9: begin + assign RD_ADDR_SHIFTED = RD_ADDR_TOTAL << 3; + end + 16, 18: begin + assign RD_ADDR_SHIFTED = RD_ADDR_TOTAL << 4; + end + 32, 36: begin + assign RD_ADDR_SHIFTED = RD_ADDR_TOTAL << 5; + end + default: begin + assign RD_ADDR_SHIFTED = RD_ADDR_TOTAL; + end + endcase + + case (WR_DATA_WIDTH) + 1: begin + assign WR_ADDR_SHIFTED = WR_ADDR_TOTAL; + end + 2: begin + assign WR_ADDR_SHIFTED = WR_ADDR_TOTAL << 1; + end + 4: begin + assign WR_ADDR_SHIFTED = WR_ADDR_TOTAL << 2; + end + 8, 9: begin + assign WR_ADDR_SHIFTED = WR_ADDR_TOTAL << 3; + end + 16, 18: begin + assign WR_ADDR_SHIFTED = WR_ADDR_TOTAL << 4; + end + 32, 36: begin + assign WR_ADDR_SHIFTED = WR_ADDR_TOTAL << 5; + end + default: begin + assign WR_ADDR_SHIFTED = WR_ADDR_TOTAL; + end + endcase + + wire [14:0] PORT_A_ADDR = WR_EN ? WR_ADDR_SHIFTED : (RD_EN ? RD_ADDR_SHIFTED : 14'd0); + wire [14:0] PORT_A1_ADDR = PORT_A_ADDR; + wire [14:0] PORT_A2_ADDR = PORT_A_ADDR; + + assign FLUSH1 = 1'b0; + assign FLUSH2 = 1'b0; + + // TODO configure per width + wire [17:0] PORT_A1_RDATA; + wire [17:0] PORT_A2_RDATA; + always @(PORT_A1_RDATA, PORT_A2_RDATA) begin + if (RD_DATA_WIDTH > 18) + {RD_DATA_CMPL, RD_DATA} <= {PORT_A2_RDATA[17 - (READ_DATA_BITS_TO_SKIP / 2):17 - (READ_DATA_BITS_TO_SKIP / 2)], PORT_A1_RDATA[17 - (READ_DATA_BITS_TO_SKIP / 2):17 - (READ_DATA_BITS_TO_SKIP / 2)],PORT_A2_RDATA[17 - (READ_DATA_BITS_TO_SKIP / 2):0], PORT_A1_RDATA[17 - (READ_DATA_BITS_TO_SKIP / 2):0]}; + else + {RD_DATA_CMPL, RD_DATA} <= {PORT_A1_RDATA[17 - (READ_DATA_BITS_TO_SKIP-18):17 - (READ_DATA_BITS_TO_SKIP-18)], PORT_A1_RDATA[17 - (READ_DATA_BITS_TO_SKIP-18):0]}; + end + + wire [17:0] PORT_A1_WDATA = {WR_DATA_CMPL, WR_DATA[15:0]}; + wire [17:0] PORT_A2_WDATA = {WR_DATA_CMPL, WR_DATA[31:16]}; + // TODO configure per width + + wire PORT_A1_CLK = RD_CLK; + wire PORT_A2_CLK = RD_CLK; + + wire PORT_A1_REN = RD_EN; + wire PORT_A1_WEN = WR_EN; + wire [1:0] PORT_A1_BE = {PORT_A1_WEN, PORT_A1_WEN}; + + wire PORT_A2_REN = RD_EN; + wire PORT_A2_WEN = WR_EN; + wire [1:0] PORT_A2_BE = {PORT_A2_WEN, PORT_A2_WEN}; + + TDP36K _TECHMAP_REPLACE_ ( + .RESET_ni(1'b1), + .WDATA_A1_i(PORT_A1_WDATA), + .RDATA_A1_o(PORT_A1_RDATA), + .ADDR_A1_i(PORT_A1_ADDR), + .CLK_A1_i(PORT_A1_CLK), + .REN_A1_i(PORT_A1_REN), + .WEN_A1_i(PORT_A1_WEN), + .BE_A1_i(PORT_A1_BE), + + .WDATA_A2_i(PORT_A2_WDATA), + .RDATA_A2_o(PORT_A2_RDATA), + .ADDR_A2_i(PORT_A2_ADDR), + .CLK_A2_i(PORT_A2_CLK), + .REN_A2_i(PORT_A2_REN), + .WEN_A2_i(PORT_A2_WEN), + .BE_A2_i(PORT_A2_BE), + + .FLUSH1_i(FLUSH1), + .FLUSH2_i(FLUSH2) + ); +endmodule + diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index d3b78caea..e34e5c427 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1150,10 +1150,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 14'd0); assign PORT_A2_ADDR = E1EN ? E1ADDR_TOTAL : (F1EN ? F1ADDR_TOTAL : 14'd0); assign PORT_B2_ADDR = G1EN ? G1ADDR_TOTAL : (H1EN ? H1ADDR_TOTAL : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0 + }; end 2: begin @@ -1161,10 +1161,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 1) : (D1EN ? (D1ADDR_TOTAL << 1) : 14'd0); assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 1) : (F1EN ? (F1ADDR_TOTAL << 1) : 14'd0); assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 1) : (H1EN ? (H1ADDR_TOTAL << 1) : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0 + }; end 4: begin @@ -1172,10 +1172,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 2) : (D1EN ? (D1ADDR_TOTAL << 2) : 14'd0); assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 2) : (F1EN ? (F1ADDR_TOTAL << 2) : 14'd0); assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 2) : (H1EN ? (H1ADDR_TOTAL << 2) : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0 + }; end 8, 9: begin @@ -1183,10 +1183,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 3) : (D1EN ? (D1ADDR_TOTAL << 3) : 14'd0); assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 3) : (F1EN ? (F1ADDR_TOTAL << 3) : 14'd0); assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 3) : (H1EN ? (H1ADDR_TOTAL << 3) : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0 + }; end 16, 18: begin @@ -1194,10 +1194,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? (C1ADDR_TOTAL << 4) : (D1EN ? (D1ADDR_TOTAL << 4) : 14'd0); assign PORT_A2_ADDR = E1EN ? (E1ADDR_TOTAL << 4) : (F1EN ? (F1ADDR_TOTAL << 4) : 14'd0); assign PORT_B2_ADDR = G1EN ? (G1ADDR_TOTAL << 4) : (H1EN ? (H1ADDR_TOTAL << 4) : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0 + }; end default: begin @@ -1205,10 +1205,10 @@ module BRAM2x18_TDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, assign PORT_B1_ADDR = C1EN ? C1ADDR_TOTAL : (D1EN ? D1ADDR_TOTAL : 14'd0); assign PORT_A2_ADDR = E1EN ? E1ADDR_TOTAL : (F1EN ? F1ADDR_TOTAL : 14'd0); assign PORT_B2_ADDR = G1EN ? G1ADDR_TOTAL : (H1EN ? H1ADDR_TOTAL : 14'd0); - defparam bram_2x18k.MODE_BITS = { 1'b1, - 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, - 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 - }; + defparam bram_2x18k.MODE_BITS = { 1'b1, + 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 + }; end endcase @@ -1295,12 +1295,12 @@ module BRAM2x18_SDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, parameter [18431:0] INIT0 = 18432'bx; parameter [18431:0] INIT1 = 18432'bx; - localparam MODE_36 = 3'b011; // 36- or 32-bit - localparam MODE_18 = 3'b010; // 18- or 16-bit - localparam MODE_9 = 3'b001; // 9- or 8-bit - localparam MODE_4 = 3'b100; // 4-bit - localparam MODE_2 = 3'b110; // 2-bit - localparam MODE_1 = 3'b101; // 1-bit + localparam MODE_36 = 3'b011; // 36- or 32-bit + localparam MODE_18 = 3'b010; // 18- or 16-bit + localparam MODE_9 = 3'b001; // 9- or 8-bit + localparam MODE_4 = 3'b100; // 4-bit + localparam MODE_2 = 3'b110; // 2-bit + localparam MODE_1 = 3'b101; // 1-bit input CLK1; input CLK2; @@ -1506,3 +1506,186 @@ module BRAM2x18_SDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, .FLUSH2_i(FLUSH2) ); endmodule + +module \$mem_v2_asymmetric (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, RD_EN, RD_SRST, WR_ADDR, WR_CLK, WR_DATA, WR_EN); + localparam CFG_ABITS = 10; + localparam CFG_DBITS = 36; + localparam CFG_ENABLE_B = 4; + + localparam CLKPOL2 = 1; + localparam CLKPOL3 = 1; + + parameter READ_ADDR_WIDTH = 11; + parameter READ_DATA_WIDTH = 16; + parameter WRITE_ADDR_WIDTH = 10; + parameter WRITE_DATA_WIDTH = 32; + parameter ABITS = 0; + parameter MEMID = 0; + parameter [36863:0] INIT = 36864'bx; + parameter OFFSET = 0; + parameter RD_ARST_VALUE = 0; + parameter RD_CE_OVER_SRST = 0; + parameter RD_CLK_ENABLE = 0; + parameter RD_CLK_POLARITY = 0; + parameter RD_COLLISION_X_MASK = 0; + parameter RD_INIT_VALUE = 0; + parameter RD_PORTS = 0; + parameter RD_SRST_VALUE = 0; + parameter RD_TRANSPARENCY_MASK = 0; + parameter RD_WIDE_CONTINUATION = 0; + parameter SIZE = 0; + parameter WIDTH = 0; + parameter WR_CLK_ENABLE = 0; + parameter WR_CLK_POLARITY = 0; + parameter WR_PORTS = 0; + parameter WR_PRIORITY_MASK = 0; + parameter WR_WIDE_CONTINUATION = 0; + + localparam MODE_36 = 3'b111; // 36 or 32-bit + localparam MODE_18 = 3'b110; // 18 or 16-bit + localparam MODE_9 = 3'b101; // 9 or 8-bit + localparam MODE_4 = 3'b100; // 4-bit + localparam MODE_2 = 3'b010; // 32-bit + localparam MODE_1 = 3'b001; // 32-bit + + input RD_CLK; + input WR_CLK; + input RD_ARST; + input RD_SRST; + + input [CFG_ABITS-1:0] RD_ADDR; + output [CFG_DBITS-1:0] RD_DATA; + input RD_EN; + + input [CFG_ABITS-1:0] WR_ADDR; + input [CFG_DBITS-1:0] WR_DATA; + input [CFG_ENABLE_B-1:0] WR_EN; + + wire [14:0] RD_ADDR_15; + wire [14:0] WR_ADDR_15; + + wire [35:0] DOBDO; + + wire [14:CFG_ABITS] RD_ADDR_CMPL; + wire [14:CFG_ABITS] WR_ADDR_CMPL; + wire [35:CFG_DBITS] RD_DATA_CMPL; + wire [35:CFG_DBITS] WR_DATA_CMPL; + + wire [14:0] RD_ADDR_TOTAL; + wire [14:0] WR_ADDR_TOTAL; + wire [35:0] RD_DATA_TOTAL; + wire [35:0] WR_DATA_TOTAL; + + wire FLUSH1; + wire FLUSH2; + + assign RD_ADDR_CMPL = {15-CFG_ABITS{1'b0}}; + assign WR_ADDR_CMPL = {15-CFG_ABITS{1'b0}}; + + assign RD_ADDR_TOTAL = {RD_ADDR_CMPL, RD_ADDR}; + assign WR_ADDR_TOTAL = {WR_ADDR_CMPL, WR_ADDR}; + + assign RD_DATA_TOTAL = {RD_DATA_CMPL, RD_DATA}; + assign WR_DATA_TOTAL = {WR_DATA_CMPL, WR_DATA}; + + case (CFG_DBITS) + 1: begin + assign RD_ADDR_15 = RD_ADDR_TOTAL; + assign WR_ADDR_15 = WR_ADDR_TOTAL; + defparam bram_asymmetric.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_1, MODE_1, MODE_1, MODE_1, 1'd0 + }; + end + + 2: begin + assign RD_ADDR_15 = RD_ADDR_TOTAL << 1; + assign WR_ADDR_15 = WR_ADDR_TOTAL << 1; + defparam bram_asymmetric.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_2, MODE_2, MODE_2, MODE_2, 1'd0 + }; + end + + 4: begin + assign RD_ADDR_15 = RD_ADDR_TOTAL << 2; + assign WR_ADDR_15 = WR_ADDR_TOTAL << 2; + defparam bram_asymmetric.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_4, MODE_4, MODE_4, MODE_4, 1'd0 + }; + end + 8, 9: begin + assign RD_ADDR_15 = RD_ADDR_TOTAL << 3; + assign WR_ADDR_15 = WR_ADDR_TOTAL << 3; + defparam bram_asymmetric.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_9, MODE_9, MODE_9, MODE_9, 1'd0 + }; + end + + 16, 18: begin + assign RD_ADDR_15 = RD_ADDR_TOTAL << 4; + assign WR_ADDR_15 = WR_ADDR_TOTAL << 4; + defparam bram_asymmetric.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_18, MODE_18, MODE_18, MODE_18, 1'd0 + }; + end + 32, 36: begin + assign RD_ADDR_15 = RD_ADDR_TOTAL << 5; + assign WR_ADDR_15 = WR_ADDR_TOTAL << 5; + defparam bram_asymmetric.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 + }; + end + default: begin + assign RD_ADDR_15 = RD_ADDR_TOTAL; + assign WR_ADDR_15 = WR_ADDR_TOTAL; + defparam bram_asymmetric.MODE_BITS = { 1'b0, + 11'd10, 11'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, MODE_36, MODE_36, MODE_36, MODE_36, 1'd0 + }; + end + endcase + + assign FLUSH1 = 1'b0; + assign FLUSH2 = 1'b0; + + TDP36K bram_asymmetric ( + .RESET_ni(1'b1), + .WDATA_A1_i(18'h3FFFF), + .WDATA_A2_i(18'h3FFFF), + .RDATA_A1_o(RD_DATA_TOTAL[17:0]), + .RDATA_A2_o(RD_DATA_TOTAL[35:18]), + .ADDR_A1_i(RD_ADDR_15), + .ADDR_A2_i(RD_ADDR_15), + .CLK_A1_i(RD_CLK), + .CLK_A2_i(RD_CLK), + .REN_A1_i(RD_EN), + .REN_A2_i(RD_EN), + .WEN_A1_i(1'b0), + .WEN_A2_i(1'b0), + .BE_A1_i({RD_EN, RD_EN}), + .BE_A2_i({RD_EN, RD_EN}), + + .WDATA_B1_i(WR_DATA[17:0]), + .WDATA_B2_i(WR_DATA[35:18]), + .RDATA_B1_o(DOBDO[17:0]), + .RDATA_B2_o(DOBDO[35:18]), + .ADDR_B1_i(WR_ADDR_15), + .ADDR_B2_i(WR_ADDR_15), + .CLK_B1_i(WR_CLK), + .CLK_B2_i(WR_CLK), + .REN_B1_i(1'b0), + .REN_B2_i(1'b0), + .WEN_B1_i(WR_EN[0]), + .WEN_B2_i(WR_EN[0]), + .BE_B1_i(WR_EN[1:0]), + .BE_B2_i(WR_EN[3:2]), + + .FLUSH1_i(FLUSH1), + .FLUSH2_i(FLUSH2) + ); +endmodule From 9ef67794feff27f14fdcb9c71799aad39abb0dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 2 May 2022 10:05:28 +0200 Subject: [PATCH 840/845] ql-qlf: k6n10f: enable pass for inference of RAM with asymmetric port widths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/synth_quicklogic.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/ql-qlf-plugin/synth_quicklogic.cc index c6a35d803..2816daade 100644 --- a/ql-qlf-plugin/synth_quicklogic.cc +++ b/ql-qlf-plugin/synth_quicklogic.cc @@ -354,13 +354,17 @@ struct SynthQuickLogicPass : public ScriptPass { run("opt_clean"); } + if (family == "qlf_k6n10f") { + run("ql_bram_asymmetric"); + } + if (check_label("map_bram", "(skip if -no_bram)") && (family == "qlf_k6n10" || family == "qlf_k6n10f" || family == "pp3") && inferBram) { run("memory_bram -rules +/quicklogic/" + family + "/brams.txt"); if (family == "pp3") { run("pp3_braminit"); } run("ql_bram_split ", "(for qlf_k6n10f if not -no_bram)"); - run("techmap -map +/quicklogic/" + family + "/brams_map.v"); + run("techmap -autoproc -map +/quicklogic/" + family + "/brams_map.v"); if (family == "qlf_k6n10f") { run("techmap -map +/quicklogic/" + family + "/brams_final_map.v"); } From f680e2ad9baba311d5794b3accca3616690ea7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Mon, 2 May 2022 10:28:08 +0200 Subject: [PATCH 841/845] ql-qlf: k6n10f: add tests for RAM with asymmetric port widths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- ql-qlf-plugin/tests/Makefile | 4 +- .../bram_asymmetric_wider_read.tcl | 51 ++++++ .../bram_asymmetric_wider_read.v | 127 ++++++++++++++ .../bram_asymmetric_wider_read/sim/Makefile | 46 +++++ .../sim/bram_asymmetric_wider_read_tb.v | 157 +++++++++++++++++ .../bram_asymmetric_wider_write.tcl | 51 ++++++ .../bram_asymmetric_wider_write.v | 127 ++++++++++++++ .../bram_asymmetric_wider_write/sim/Makefile | 46 +++++ .../sim/bram_asymmetric_wider_write_tb.v | 164 ++++++++++++++++++ 9 files changed, 772 insertions(+), 1 deletion(-) create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/Makefile create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/bram_asymmetric_wider_read_tb.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.v create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/Makefile create mode 100644 ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/bram_asymmetric_wider_write_tb.v diff --git a/ql-qlf-plugin/tests/Makefile b/ql-qlf-plugin/tests/Makefile index f2284c746..661e92ece 100644 --- a/ql-qlf-plugin/tests/Makefile +++ b/ql-qlf-plugin/tests/Makefile @@ -54,7 +54,9 @@ POST_SYNTH_SIM_TESTS = \ qlf_k6n10f/bram_tdp_split \ qlf_k6n10f/bram_sdp_split \ qlf_k6n10f/dsp_mult_post_synth_sim \ - qlf_k6n10f/dsp_simd_post_synth_sim + qlf_k6n10f/dsp_simd_post_synth_sim \ + qlf_k6n10f/bram_asymmetric_wider_write \ + qlf_k6n10f/bram_asymmetric_wider_read include $(shell pwd)/../../Makefile_test.common diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl new file mode 100644 index 000000000..11525edb8 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl @@ -0,0 +1,51 @@ +yosys -import + +if { [info procs ql-qlf-k6n10f] == {} } { plugin -i ql-qlf } +yosys -import ; + +read_verilog $::env(DESIGN_TOP).v +design -save bram_tdp + +select spram_16x2048_32x1024 +select * +synth_quicklogic -family qlf_k6n10f -top spram_16x2048_32x1024 +opt_expr -undriven +opt_clean +stat +write_verilog sim/spram_16x2048_32x1024_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select spram_8x4096_16x2048 +select * +synth_quicklogic -family qlf_k6n10f -top spram_8x4096_16x2048 +opt_expr -undriven +opt_clean +stat +write_verilog sim/spram_8x4096_16x2048_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select spram_8x2048_16x1024 +select * +synth_quicklogic -family qlf_k6n10f -top spram_8x2048_16x1024 +opt_expr -undriven +opt_clean +stat +write_verilog sim/spram_8x2048_16x1024_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select spram_8x4096_32x1024 +select * +synth_quicklogic -family qlf_k6n10f -top spram_8x4096_32x1024 +opt_expr -undriven +opt_clean +stat +write_verilog sim/spram_8x4096_32x1024_post_synth.v +select -assert-count 1 t:TDP36K + + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.v new file mode 100644 index 000000000..a792980aa --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.v @@ -0,0 +1,127 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +module spram_16x2048_32x1024 ( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + input clk; + input rce; + input [9:0] ra; + output reg [31:0] rq; + input wce; + input [10:0] wa; + input [15:0] wd; + reg [31:0] memory [0:1023]; + always @(posedge clk) begin + if (rce) + rq <= memory[ra]; + if (wce) + memory[wa / 2][(wa % 2) * 16+:16] <= wd; + end + integer i; + initial for (i = 0; i < 1024; i = i + 1) + memory[i] = 0; +endmodule + +module spram_8x2048_16x1024 ( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + input clk; + input rce; + input [9:0] ra; + output reg [15:0] rq; + input wce; + input [10:0] wa; + input [7:0] wd; + reg [15:0] memory [0:1023]; + always @(posedge clk) begin + if (rce) + rq <= memory[ra]; + if (wce) + memory[wa / 2][(wa % 2) * 8+:8] <= wd; + end + integer i; + initial for (i = 0; i < 1024; i = i + 1) + memory[i] = 0; +endmodule + +module spram_8x4096_16x2048 ( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + input clk; + input rce; + input [10:0] ra; + output reg [15:0] rq; + input wce; + input [11:0] wa; + input [7:0] wd; + reg [15:0] memory [0:2047]; + always @(posedge clk) begin + if (rce) + rq <= memory[ra]; + if (wce) + memory[wa / 2][(wa % 2) * 8+:8] <= wd; + end + integer i; + initial for (i = 0; i < 2048; i = i + 1) + memory[i] = 0; +endmodule + +module spram_8x4096_32x1024 ( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + input clk; + input rce; + input [9:0] ra; + output reg [31:0] rq; + input wce; + input [11:0] wa; + input [7:0] wd; + reg [31:0] memory [0:1023]; + always @(posedge clk) begin + if (rce) + rq <= memory[ra]; + if (wce) + memory[wa / 4][(wa % 4) * 8+:8] <= wd; + end + integer i; + initial for (i = 0; i < 1024; i = i + 1) + memory[i] = 0; +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/Makefile new file mode 100644 index 000000000..7774a8a13 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/Makefile @@ -0,0 +1,46 @@ +# Copyright 2020-2022 F4PGA Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +TESTBENCH = bram_asymmetric_wider_read_tb.v +POST_SYNTH = spram_16x2048_32x1024_post_synth spram_8x4096_16x2048_post_synth spram_8x2048_16x1024_post_synth spram_8x4096_32x1024_post_synth +READ_ADDR_WIDTH = 10 11 10 10 +WRITE_ADDR_WIDTH = 11 12 11 12 +READ_DATA_WIDTH = 32 16 16 32 +WRITE_DATA_WIDTH = 16 8 8 8 +TOP = spram_16x2048_32x1024 spram_8x4096_16x2048 spram_8x2048_16x1024 spram_8x4096_32x1024 +READ_ADDR_DEFINES = $(foreach awidth, $(READ_ADDR_WIDTH),-DREAD_ADDR_WIDTH="$(awidth)") +WRITE_ADDR_DEFINES = $(foreach awidth, $(WRITE_ADDR_WIDTH),-DWRITE_ADDR_WIDTH="$(awidth)") +READ_DATA_DEFINES = $(foreach dwidth, $(READ_DATA_WIDTH),-DREAD_DATA_WIDTH="$(dwidth)") +WRITE_DATA_DEFINES = $(foreach dwidth, $(WRITE_DATA_WIDTH),-DWRITE_DATA_WIDTH="$(dwidth)") +TOP_DEFINES = $(foreach top, $(TOP),-DTOP="$(top)") +VCD_DEFINES = $(foreach vcd, $(POST_SYNTH),-DVCD="$(vcd).vcd") + +SIM_LIBS = $(shell find ../../../../qlf_k6n10f -name "*.v" -not -name "*_map.v") + +define simulate_post_synth + @iverilog -vvvv -g2005 $(word $(1),$(READ_ADDR_DEFINES)) $(word $(1),$(WRITE_ADDR_DEFINES)) $(word $(1),$(READ_DATA_DEFINES)) $(word $(1),$(WRITE_DATA_DEFINES)) $(word $(1),$(TOP_DEFINES)) $(word $(1),$(VCD_DEFINES)) -o $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).v $(SIM_LIBS) $(TESTBENCH) > $(word $(1),$(POST_SYNTH)).vvp.log 2>&1 + @vvp -vvvv $(word $(1),$(POST_SYNTH)).vvp > $(word $(1),$(POST_SYNTH)).vcd.log 2>&1 +endef + +define clean_post_synth_sim + @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log +endef + +sim: + $(call simulate_post_synth,1) + $(call simulate_post_synth,2) + $(call simulate_post_synth,3) + $(call simulate_post_synth,4) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/bram_asymmetric_wider_read_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/bram_asymmetric_wider_read_tb.v new file mode 100644 index 000000000..bb6d22020 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/bram_asymmetric_wider_read_tb.v @@ -0,0 +1,157 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`timescale 1ns/1ps + +`define STRINGIFY(x) `"x`" + +module TB; + localparam PERIOD = 50; + localparam ADDR_INCR = 1; + + reg clk; + reg rce; + reg [`READ_ADDR_WIDTH-1:0] ra; + wire [`READ_DATA_WIDTH-1:0] rq; + reg wce; + reg [`WRITE_ADDR_WIDTH-1:0] wa; + reg [`WRITE_DATA_WIDTH-1:0] wd; + + initial clk = 0; + initial ra = 0; + initial rce = 0; + initial forever #(PERIOD / 2.0) clk = ~clk; + initial begin + $dumpfile(`STRINGIFY(`VCD)); + $dumpvars; + end + + integer a; + + reg done; + initial done = 1'b0; + + reg [`READ_DATA_WIDTH-1:0] expected; + + always @(posedge clk) begin + case (`READ_DATA_WIDTH / `WRITE_DATA_WIDTH) + 1: expected <= (a | (a << 20) | 20'h55000) & {`WRITE_DATA_WIDTH{1'b1}}; + 2: expected <= ((((2*a+1) | ((2*a+1) << 20) | 20'h55000) & {`WRITE_DATA_WIDTH{1'b1}}) << `WRITE_DATA_WIDTH) | + (((2*a) | ((2*a) << 20) | 20'h55000) & {`WRITE_DATA_WIDTH{1'b1}}); + 4: expected <= (((4*a) | ((4*a) << 20) | 20'h55000) & {`WRITE_DATA_WIDTH{1'b1}}) | + ((((4*a+1) | ((4*a+1) << 20) | 20'h55000) & {`WRITE_DATA_WIDTH{1'b1}}) << `WRITE_DATA_WIDTH) | + ((((4*a+2) | ((4*a+2) << 20) | 20'h55000) & {`WRITE_DATA_WIDTH{1'b1}}) << (2 * `WRITE_DATA_WIDTH)) | + ((((4*a+3) | ((4*a+3) << 20) | 20'h55000) & {`WRITE_DATA_WIDTH{1'b1}}) << (3 * `WRITE_DATA_WIDTH)); + default: expected <= ((a) | ((a) << 20) | 20'h55000) & {`WRITE_DATA_WIDTH{1'b1}}; + endcase + end + + wire error = ((a != 0) && read_test) ? rq !== expected : 0; + + integer error_cnt = 0; + always @ (posedge clk) + begin + if (error) + error_cnt <= error_cnt + 1'b1; + end + + reg read_test; + initial read_test = 0; + + initial #(1) begin + // Write data + for (a = 0; a < (1<<`WRITE_ADDR_WIDTH); a = a + ADDR_INCR) begin + @(negedge clk) begin + wa = a; + wd = a | (a << 20) | 20'h55000; + wce = 1; + end + @(posedge clk) begin + #(PERIOD/10) wce = 0; + end + end + // Read data + read_test = 1; + for (a = 0; a < (1<<`READ_ADDR_WIDTH); a = a + ADDR_INCR) begin + @(negedge clk) begin + ra = a; + rce = 1; + end + @(posedge clk) begin + #(PERIOD/10) rce = 0; + if ( rq !== expected) begin + $display("%d: FAIL: mismatch act=%x exp=%x at %x", $time, rq, expected, a); + end else begin + $display("%d: OK: act=%x exp=%x at %x", $time, rq, expected, a); + end + end + end + done = 1'b1; + end + + // Scan for simulation finish + always @(posedge clk) begin + if (done) + $finish_and_return( (error_cnt == 0) ? 0 : -1 ); + end + + case (`STRINGIFY(`TOP)) + "spram_16x2048_32x1024": begin + spram_16x2048_32x1024 #() simple ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "spram_8x4096_16x2048": begin + spram_8x4096_16x2048 #() simple ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "spram_8x2048_16x1024": begin + spram_8x2048_16x1024 #() simple ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "spram_8x4096_32x1024": begin + spram_8x4096_32x1024 #() simple ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + endcase +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl new file mode 100644 index 000000000..95fd9d401 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl @@ -0,0 +1,51 @@ +yosys -import + +if { [info procs ql-qlf-k6n10f] == {} } { plugin -i ql-qlf } +yosys -import ; + +read_verilog $::env(DESIGN_TOP).v +design -save bram_tdp + +select spram_16x1024_8x2048 +select * +synth_quicklogic -family qlf_k6n10f -top spram_16x1024_8x2048 +opt_expr -undriven +opt_clean +stat +write_verilog sim/spram_16x1024_8x2048_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select spram_16x2048_8x4096 +select * +synth_quicklogic -family qlf_k6n10f -top spram_16x2048_8x4096 +opt_expr -undriven +opt_clean +stat +write_verilog sim/spram_16x2048_8x4096_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select spram_32x1024_16x2048 +select * +synth_quicklogic -family qlf_k6n10f -top spram_32x1024_16x2048 +opt_expr -undriven +opt_clean +stat +write_verilog sim/spram_32x1024_16x2048_post_synth.v +select -assert-count 1 t:TDP36K + +select -clear +design -load bram_tdp +select spram_32x1024_8x4096 +select * +synth_quicklogic -family qlf_k6n10f -top spram_32x1024_8x4096 +opt_expr -undriven +opt_clean +stat +write_verilog sim/spram_32x1024_8x4096_post_synth.v +select -assert-count 1 t:TDP36K + + diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.v new file mode 100644 index 000000000..803d43c18 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.v @@ -0,0 +1,127 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +module spram_16x1024_8x2048 ( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + input clk; + input rce; + input [10:0] ra; + output reg [7:0] rq; + input wce; + input [9:0] wa; + input [15:0] wd; + reg [15:0] memory [0:1023]; + always @(posedge clk) begin + if (rce) + rq <= memory[ra / 2][(ra % 2) * 8+:8]; + if (wce) + memory[wa] <= wd; + end + integer i; + initial for (i = 0; i < 1024; i = i + 1) + memory[i] = 0; +endmodule + +module spram_16x2048_8x4096 ( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + input clk; + input rce; + input [11:0] ra; + output reg [7:0] rq; + input wce; + input [10:0] wa; + input [15:0] wd; + reg [15:0] memory [0:2047]; + always @(posedge clk) begin + if (rce) + rq <= memory[ra / 2][(ra % 2) * 8+:8]; + if (wce) + memory[wa] <= wd; + end + integer i; + initial for (i = 0; i < 2048; i = i + 1) + memory[i] = 0; +endmodule + +module spram_32x1024_16x2048 ( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + input clk; + input rce; + input [10:0] ra; + output reg [15:0] rq; + input wce; + input [9:0] wa; + input [31:0] wd; + reg [31:0] memory [0:1023]; + always @(posedge clk) begin + if (rce) + rq <= memory[ra / 2][(ra % 2) * 16+:16]; + if (wce) + memory[wa] <= wd; + end + integer i; + initial for (i = 0; i < 1024; i = i + 1) + memory[i] = 0; +endmodule + +module spram_32x1024_8x4096 ( + clk, + rce, + ra, + rq, + wce, + wa, + wd +); + input clk; + input rce; + input [11:0] ra; + output reg [7:0] rq; + input wce; + input [9:0] wa; + input [31:0] wd; + reg [31:0] memory [0:1023]; + always @(posedge clk) begin + if (rce) + rq <= memory[ra / 4][(ra % 4) * 8+:8]; + if (wce) + memory[wa] <= wd; + end + integer i; + initial for (i = 0; i < 1024; i = i + 1) + memory[i] = 0; +endmodule diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/Makefile b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/Makefile new file mode 100644 index 000000000..e176322c4 --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/Makefile @@ -0,0 +1,46 @@ +# Copyright 2020-2022 F4PGA Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +TESTBENCH = bram_asymmetric_wider_write_tb.v +POST_SYNTH = spram_16x2048_8x4096_post_synth spram_16x1024_8x2048_post_synth spram_32x1024_8x4096_post_synth spram_32x1024_16x2048_post_synth +READ_ADDR_WIDTH = 12 11 12 11 +WRITE_ADDR_WIDTH = 11 10 10 10 +READ_DATA_WIDTH = 8 8 8 16 +WRITE_DATA_WIDTH = 16 16 32 32 +TOP = spram_16x2048_8x4096 spram_16x1024_8x2048 spram_32x1024_8x4096 spram_32x1024_16x2048 +READ_ADDR_DEFINES = $(foreach awidth, $(READ_ADDR_WIDTH),-DREAD_ADDR_WIDTH="$(awidth)") +WRITE_ADDR_DEFINES = $(foreach awidth, $(WRITE_ADDR_WIDTH),-DWRITE_ADDR_WIDTH="$(awidth)") +READ_DATA_DEFINES = $(foreach dwidth, $(READ_DATA_WIDTH),-DREAD_DATA_WIDTH="$(dwidth)") +WRITE_DATA_DEFINES = $(foreach dwidth, $(WRITE_DATA_WIDTH),-DWRITE_DATA_WIDTH="$(dwidth)") +TOP_DEFINES = $(foreach top, $(TOP),-DTOP="$(top)") +VCD_DEFINES = $(foreach vcd, $(POST_SYNTH),-DVCD="$(vcd).vcd") + +SIM_LIBS = $(shell find ../../../../qlf_k6n10f -name "*.v" -not -name "*_map.v") + +define simulate_post_synth + @iverilog -vvvv -g2005 $(word $(1),$(READ_ADDR_DEFINES)) $(word $(1),$(WRITE_ADDR_DEFINES)) $(word $(1),$(READ_DATA_DEFINES)) $(word $(1),$(WRITE_DATA_DEFINES)) $(word $(1),$(TOP_DEFINES)) $(word $(1),$(VCD_DEFINES)) -o $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).v $(SIM_LIBS) $(TESTBENCH) > $(word $(1),$(POST_SYNTH)).vvp.log 2>&1 + @vvp -vvvv $(word $(1),$(POST_SYNTH)).vvp > $(word $(1),$(POST_SYNTH)).vcd.log 2>&1 +endef + +define clean_post_synth_sim + @rm -rf $(word $(1),$(POST_SYNTH)).vcd $(word $(1),$(POST_SYNTH)).vvp $(word $(1),$(POST_SYNTH)).vvp.log $(word $(1),$(POST_SYNTH)).vcd.log +endef + +sim: + $(call simulate_post_synth,1) + $(call simulate_post_synth,2) + $(call simulate_post_synth,3) + $(call simulate_post_synth,4) diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/bram_asymmetric_wider_write_tb.v b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/bram_asymmetric_wider_write_tb.v new file mode 100644 index 000000000..d5e56a67b --- /dev/null +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/bram_asymmetric_wider_write_tb.v @@ -0,0 +1,164 @@ +// Copyright 2020-2022 F4PGA Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +`timescale 1ns/1ps + +`define STRINGIFY(x) `"x`" + +module TB; + localparam PERIOD = 50; + localparam ADDR_INCR = 1; + + reg clk; + reg rce; + reg [`READ_ADDR_WIDTH-1:0] ra; + wire [`READ_DATA_WIDTH-1:0] rq; + reg wce; + reg [`WRITE_ADDR_WIDTH-1:0] wa; + reg [`WRITE_DATA_WIDTH-1:0] wd; + + initial clk = 0; + initial ra = 0; + initial rce = 0; + initial forever #(PERIOD / 2.0) clk = ~clk; + initial begin + $dumpfile(`STRINGIFY(`VCD)); + $dumpvars; + end + + integer a; + + reg done; + initial done = 1'b0; + + reg [`READ_DATA_WIDTH-1:0] expected; + + always @(posedge clk) begin + case (`WRITE_DATA_WIDTH / `READ_DATA_WIDTH) + 1: expected <= (a | (a << 20) | 20'h55000) & {`READ_DATA_WIDTH{1'b1}}; + 2: + if (a % 2) + expected <= (((a/2) | ((a/2) << 20) | 20'h55000) >> `READ_DATA_WIDTH) & {`READ_DATA_WIDTH{1'b1}}; + else + expected <= ((a/2) | ((a/2) << 20) | 20'h55000) & {`READ_DATA_WIDTH{1'b1}}; + 4: + case (a % 4) + 0: expected <= ((a/4) | ((a/4) << 20) | 20'h55000) & {`READ_DATA_WIDTH{1'b1}}; + 1: expected <= (((a/4) | ((a/4) << 20) | 20'h55000) >> `READ_DATA_WIDTH) & {`READ_DATA_WIDTH{1'b1}}; + 2: expected <= (((a/4) | ((a/4) << 20) | 20'h55000) >> (2 * `READ_DATA_WIDTH)) & {`READ_DATA_WIDTH{1'b1}}; + 3: expected <= (((a/4) | ((a/4) << 20) | 20'h55000) >> (3 * `READ_DATA_WIDTH)) & {`READ_DATA_WIDTH{1'b1}}; + default: expected <= ((a/4) | ((a/4) << 20) | 20'h55000) & {`READ_DATA_WIDTH{1'b1}}; + endcase + default: expected <= ((a/2) | ((a/2) << 20) | 20'h55000) & {`READ_DATA_WIDTH{1'b1}}; + endcase + end + + wire error = ((a != 0) && read_test) ? rq !== expected : 0; + + integer error_cnt = 0; + always @ (posedge clk) + begin + if (error) + error_cnt <= error_cnt + 1'b1; + end + + reg read_test; + initial read_test = 0; + + initial #(1) begin + // Write data + for (a = 0; a < (1<<`WRITE_ADDR_WIDTH); a = a + ADDR_INCR) begin + @(negedge clk) begin + wa = a; + wd = a | (a << 20) | 20'h55000; + wce = 1; + end + @(posedge clk) begin + #(PERIOD/10) wce = 0; + end + end + // Read data + read_test = 1; + for (a = 0; a < (1<<`READ_ADDR_WIDTH); a = a + ADDR_INCR) begin + @(negedge clk) begin + ra = a; + rce = 1; + end + @(posedge clk) begin + #(PERIOD/10) rce = 0; + if ( rq !== expected) begin + $display("%d: FAIL: mismatch act=%x exp=%x at %x", $time, rq, expected, a); + end else begin + $display("%d: OK: act=%x exp=%x at %x", $time, rq, expected, a); + end + end + end + done = 1'b1; + end + + // Scan for simulation finish + always @(posedge clk) begin + if (done) + $finish_and_return( (error_cnt == 0) ? 0 : -1 ); + end + + case (`STRINGIFY(`TOP)) + "spram_16x2048_8x4096": begin + spram_16x2048_8x4096 #() simple ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "spram_16x1024_8x2048": begin + spram_16x1024_8x2048 #() simple ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "spram_32x1024_8x4096": begin + spram_32x1024_8x4096 #() simple ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + "spram_32x1024_16x2048": begin + spram_32x1024_16x2048 #() simple ( + .clk(clk), + .rce(rce), + .ra(ra), + .rq(rq), + .wce(wce), + .wa(wa), + .wd(wd) + ); + end + endcase +endmodule From 766239d8bf3f2a8855f6df95e5ba3490866bfa51 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 25 Aug 2022 15:43:45 +0200 Subject: [PATCH 842/845] Fixed the way BRAM wires are identified, ensured unique inferred BRAM name. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/ql-bram-asymmetric.cc | 101 ++++++++++++++++----------- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 2 +- ql-qlf-plugin/qlf_k6n10f/cells_sim.v | 2 +- 3 files changed, 63 insertions(+), 42 deletions(-) diff --git a/ql-qlf-plugin/ql-bram-asymmetric.cc b/ql-qlf-plugin/ql-bram-asymmetric.cc index f9ff49b42..f8659ee45 100644 --- a/ql-qlf-plugin/ql-bram-asymmetric.cc +++ b/ql-qlf-plugin/ql-bram-asymmetric.cc @@ -26,26 +26,37 @@ void test_ql_bram_asymmetric_wider_read(ql_bram_asymmetric_wider_read_pm &pm) auto wr_en_and_y = pm.st_ql_bram_asymmetric_wider_read.wr_en_and_y; // Add the BRAM cell - RTLIL::Cell *cell = pm.module->addCell(RTLIL::escape_id("bram_asymmetric"), mem); + std::string name = mem->name.str() + "$asymmetric"; + RTLIL::Cell *cell = pm.module->addCell(RTLIL::escape_id(name), mem); // Set new type for cell so that it won't be processed by memory_bram pass - cell->type = IdString("$mem_v2_asymmetric"); + cell->type = IdString(RTLIL::escape_id("_$_mem_v2_asymmetric")); // Prepare wires from memory cell side to compare against module wires - if (!mux_s.as_wire()) - log_error("WR_EN input wire not found"); + if (!mux_s.is_wire()) + log_error("WR_EN input wire not found\n"); RTLIL::Wire *wr_en_cw = mux_s.as_wire(); - if (!mem_wr_addr.as_wire()) - log_error("WR_ADDR input wire not found"); - RTLIL::Wire *wr_addr_cw = mem_wr_addr.as_wire(); - if (!wr_data_shift_a.as_wire()) - log_error("WR_DATA input wire not found"); + + // The WR address wire can be narrower + RTLIL::Wire *wr_addr_cw = nullptr; + if (mem_wr_addr.is_wire()) + wr_addr_cw = mem_wr_addr.as_wire(); + else if (!mem_wr_addr.chunks().empty()) { + auto chunk = mem_wr_addr.chunks()[0]; + if (chunk.is_wire()) + wr_addr_cw = chunk.wire; + } + if (!wr_addr_cw) + log_error("WR_ADDR input wire not found\n"); + + if (!wr_data_shift_a.is_wire()) + log_error("WR_DATA input wire not found\n"); RTLIL::Wire *wr_data_cw = wr_data_shift_a.as_wire(); - if (!mem_rd_addr.as_wire()) - log_error("RD_ADDR input wire not found"); + if (!mem_rd_addr.is_wire()) + log_error("RD_ADDR input wire not found\n"); RTLIL::Wire *rd_addr_cw = mem_rd_addr.as_wire(); - if (!mem_rd_data.as_wire()) - log_error("RD_DATA input wire not found"); + if (!mem_rd_data.is_wire()) + log_error("RD_DATA input wire not found\n"); RTLIL::Wire *rd_data_cw = mem_rd_data.as_wire(); // Check if wr_en_and cell has one of its inputs connected to write address @@ -61,9 +72,9 @@ void test_ql_bram_asymmetric_wider_read(ql_bram_asymmetric_wider_read_pm &pm) wr_en_and_b_w = wr_en_and_b.as_wire(); } if (!has_wire) - log_error("RD_ADDR $and cell input wire not found"); - if ((wr_en_and_a_w != mem_wr_addr.as_wire()) & (wr_en_and_b_w != mem_wr_addr.as_wire())) - log_error("This is not the $and cell we are looking for"); + log_error("RD_ADDR $and cell input wire not found\n"); + if ((wr_en_and_a_w != wr_addr_cw) & (wr_en_and_b_w != wr_addr_cw)) + log_error("This is not the $and cell we are looking for\n"); // Compare and assign wires RTLIL::Wire *wr_en_w = nullptr; @@ -135,9 +146,9 @@ void test_ql_bram_asymmetric_wider_read(ql_bram_asymmetric_wider_read_pm &pm) } if (wr_en_and_y != wr_en_shift_b.extract(offset, wr_addr_width)) - log_error("This is not the wr_en $shl cell we are looking for"); + log_error("This is not the wr_en $shl cell we are looking for\n"); if (wr_en_and_y != wr_data_shift_b.extract(offset, wr_addr_width)) - log_error("This is not the wr_data $shl cell we are looking for"); + log_error("This is not the wr_data $shl cell we are looking for\n"); // Bypass shift on write address line cell->setPort(RTLIL::escape_id("WR_ADDR"), RTLIL::SigSpec(wr_addr_w)); @@ -178,10 +189,11 @@ void test_ql_bram_asymmetric_wider_write(ql_bram_asymmetric_wider_write_pm &pm) auto rd_addr_and_b = pm.st_ql_bram_asymmetric_wider_write.rd_addr_and_b; // Add the BRAM cell - RTLIL::Cell *cell = pm.module->addCell(RTLIL::escape_id("bram_asymmetric"), mem); + std::string name = mem->name.str() + "$asymmetric"; + RTLIL::Cell *cell = pm.module->addCell(RTLIL::escape_id(name), mem); // Set new type for cell so that it won't be processed by memory_bram pass - cell->type = IdString("$mem_v2_asymmetric"); + cell->type = IdString(RTLIL::escape_id("_$_mem_v2_asymmetric")); // Prepare wires from memory cell side to compare against module wires RTLIL::Wire *rd_data_wc = nullptr; @@ -191,17 +203,17 @@ void test_ql_bram_asymmetric_wider_write(ql_bram_asymmetric_wider_write_pm &pm) RTLIL::Wire *rd_addr_and_b_wc = nullptr; if (rd_data_ff) { - if (!rd_data_ff_q.as_wire()) - log_error("RD_DATA input wire not found"); + if (!rd_data_ff_q.is_wire()) + log_error("RD_DATA input wire not found\n"); rd_data_wc = rd_data_ff_q.as_wire(); - if (!rd_data_ff_en.as_wire()) - log_error("RD_EN input wire not found"); + if (!rd_data_ff_en.is_wire()) + log_error("RD_EN input wire not found\n"); rd_en_wc = rd_data_ff_en.as_wire(); - if (!rd_data_ff_clk.as_wire()) - log_error("RD_CLK input wire not found"); + if (!rd_data_ff_clk.is_wire()) + log_error("RD_CLK input wire not found\n"); clk_wc = rd_data_ff_clk.as_wire(); } else { - log_error("output FF not found"); + log_error("output FF not found\n"); } if (rd_addr_and) { @@ -215,27 +227,36 @@ void test_ql_bram_asymmetric_wider_write(ql_bram_asymmetric_wider_write_pm &pm) rd_addr_and_b_wc = rd_addr_and_b.as_wire(); } if (!has_wire) - log_error("RD_ADDR $and cell input wire not found"); + log_error("RD_ADDR $and cell input wire not found\n"); } else { - log_debug("RD_ADDR $and cell not found"); + log_debug("RD_ADDR $and cell not found\n"); } RTLIL::Wire *wr_addr_wc; if (wr_addr_ff) { - if (!wr_addr_ff_d.as_wire()) - log_error("WR_ADDR input wire not found"); + if (!wr_addr_ff_d.is_wire()) + log_error("WR_ADDR input wire not found\n"); wr_addr_wc = wr_addr_ff_d.as_wire(); } else { - if (!mem_wr_addr.as_wire()) - log_error("WR_ADDR input wire not found"); + if (!mem_wr_addr.is_wire()) + log_error("WR_ADDR input wire not found\n"); wr_addr_wc = mem_wr_addr.as_wire(); } - if (!mem_rd_addr.as_wire()) - log_error("RD_ADDR input wire not found"); - auto rd_addr_wc = mem_rd_addr.as_wire(); - if (!mem_wr_data.as_wire()) - log_error("WR_DATA input wire not found"); + // The RD address wire can be narrower + RTLIL::Wire *rd_addr_wc = nullptr; + if (mem_rd_addr.is_wire()) + rd_addr_wc = mem_rd_addr.as_wire(); + else if (!mem_rd_addr.chunks().empty()) { + auto chunk = mem_rd_addr.chunks()[0]; + if (chunk.is_wire()) + rd_addr_wc = chunk.wire; + } + if (!rd_addr_wc) + log_error("RD_ADDR input wire not found\n"); + + if (!mem_wr_data.is_wire()) + log_error("WR_DATA input wire not found\n"); auto wr_data_wc = mem_wr_data.as_wire(); // Check if wr_en_and cell has one of its inputs connected to write address @@ -309,7 +330,7 @@ void test_ql_bram_asymmetric_wider_write(ql_bram_asymmetric_wider_write_pm &pm) // Connect Read Enable signal to memory cell if (!rd_en_w) - log_error("Wire \\rce not found"); + log_error("Wire \\rce not found\n"); auto rd_en_s = RTLIL::SigSpec(rd_en_w); cell->setPort(RTLIL::escape_id("RD_EN"), rd_en_s); @@ -322,7 +343,7 @@ void test_ql_bram_asymmetric_wider_write(ql_bram_asymmetric_wider_write_pm &pm) pm.module->remove(wr_addr_ff); // Check if detected $and is connected to RD_ADDR if ((rd_addr_and_a_wc != rd_addr_w) & (rd_addr_and_b_wc != rd_addr_w)) - log_error("This is not the $and cell we are looking for"); + log_error("This is not the $and cell we are looking for\n"); else pm.module->remove(rd_addr_and); } diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index ed644942d..f678e91f8 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -483,7 +483,7 @@ module \$__QLF_FACTOR_BRAM36_SDP (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DA ); endmodule -(* techmap_celltype = "$mem_v2_asymmetric" *) +(* techmap_celltype = "_$_mem_v2_asymmetric" *) module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, RD_EN, RD_SRST, WR_ADDR, WR_CLK, WR_DATA, WR_EN); parameter CFG_ABITS = 10; parameter CFG_DBITS = 36; diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v index e34e5c427..26ac9aeb9 100644 --- a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v +++ b/ql-qlf-plugin/qlf_k6n10f/cells_sim.v @@ -1507,7 +1507,7 @@ module BRAM2x18_SDP (A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN, C1ADDR, C1DATA, ); endmodule -module \$mem_v2_asymmetric (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, RD_EN, RD_SRST, WR_ADDR, WR_CLK, WR_DATA, WR_EN); +module \_$_mem_v2_asymmetric (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, RD_EN, RD_SRST, WR_ADDR, WR_CLK, WR_DATA, WR_EN); localparam CFG_ABITS = 10; localparam CFG_DBITS = 36; localparam CFG_ENABLE_B = 4; From 84beb50acd3e9f2c0f4d765dc06aa5719f698bc9 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Fri, 26 Aug 2022 13:17:48 +0200 Subject: [PATCH 843/845] Use port A of inferred BRAM only for writing and port B only for reading. Signed-off-by: Maciej Kurc --- ql-qlf-plugin/qlf_k6n10f/brams_map.v | 193 ++++++++++-------- .../bram_asymmetric_wider_read.tcl | 6 +- .../bram_asymmetric_wider_write.tcl | 6 +- 3 files changed, 111 insertions(+), 94 deletions(-) diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/ql-qlf-plugin/qlf_k6n10f/brams_map.v index f678e91f8..873a5d7e9 100644 --- a/ql-qlf-plugin/qlf_k6n10f/brams_map.v +++ b/ql-qlf-plugin/qlf_k6n10f/brams_map.v @@ -577,32 +577,32 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, end 2: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_2, `MODE_1, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_2, `MODE_1, `MODE_2, 1'd0 }; end 4: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_4, `MODE_1, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_4, `MODE_1, `MODE_4, 1'd0 }; end 8, 9: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_9, `MODE_1, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_9, `MODE_1, `MODE_9, 1'd0 }; end 16, 18: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_18, `MODE_1, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_18, `MODE_1, `MODE_18, 1'd0 }; end 32, 36: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_36, `MODE_1, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_36, `MODE_1, `MODE_36, 1'd0 }; end default: begin @@ -617,8 +617,8 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, case (WR_DATA_WIDTH) 1: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_2, `MODE_2, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_2, `MODE_2, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_1, `MODE_2, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_1, `MODE_2, `MODE_1, 1'd0 }; end 2: begin @@ -629,32 +629,32 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, end 4: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_2, `MODE_2, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_2, `MODE_2, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_4, `MODE_2, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_4, `MODE_2, `MODE_4, 1'd0 }; end 8, 9: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_2, `MODE_2, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_2, `MODE_2, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_9, `MODE_2, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_9, `MODE_2, `MODE_9, 1'd0 }; end 16, 18: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_2, `MODE_2, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_2, `MODE_2, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_18, `MODE_2, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_18, `MODE_2, `MODE_18, 1'd0 }; end 32, 36: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_2, `MODE_2, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_2, `MODE_2, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_36, `MODE_2, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_36, `MODE_2, `MODE_36, 1'd0 }; end default: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_2, `MODE_2, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_2, `MODE_2, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_1, `MODE_2, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_1, `MODE_2, `MODE_1, 1'd0 }; end endcase @@ -663,14 +663,14 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, case (WR_DATA_WIDTH) 1: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_4, `MODE_4, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_4, `MODE_4, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_1, `MODE_4, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_1, `MODE_4, `MODE_1, 1'd0 }; end 2: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_4, `MODE_4, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_4, `MODE_4, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_2, `MODE_4, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_2, `MODE_4, `MODE_2, 1'd0 }; end 4: begin @@ -681,26 +681,26 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, end 8, 9: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_4, `MODE_4, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_4, `MODE_4, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_9, `MODE_4, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_9, `MODE_4, `MODE_9, 1'd0 }; end 16, 18: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_4, `MODE_4, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_4, `MODE_4, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_18, `MODE_4, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_18, `MODE_4, `MODE_18, 1'd0 }; end 32, 36: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_4, `MODE_4, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_4, `MODE_4, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_36, `MODE_4, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_36, `MODE_4, `MODE_36, 1'd0 }; end default: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_4, `MODE_4, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_4, `MODE_4, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_1, `MODE_4, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_1, `MODE_4, `MODE_1, 1'd0 }; end endcase @@ -709,20 +709,20 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, case (WR_DATA_WIDTH) 1: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_9, `MODE_9, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_9, `MODE_9, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_1, `MODE_9, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_1, `MODE_9, `MODE_1, 1'd0 }; end 2: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_9, `MODE_9, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_9, `MODE_9, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_2, `MODE_9, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_2, `MODE_9, `MODE_2, 1'd0 }; end 4: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_9, `MODE_9, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_9, `MODE_9, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_4, `MODE_9, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_4, `MODE_9, `MODE_4, 1'd0 }; end 8, 9: begin @@ -733,20 +733,20 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, end 16, 18: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_9, `MODE_9, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_9, `MODE_9, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_18, `MODE_9, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_18, `MODE_9, `MODE_18, 1'd0 }; end 32, 36: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_9, `MODE_9, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_9, `MODE_9, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_36, `MODE_9, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_36, `MODE_9, `MODE_36, 1'd0 }; end default: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_9, `MODE_9, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_9, `MODE_9, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_1, `MODE_9, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_1, `MODE_9, `MODE_1, 1'd0 }; end endcase @@ -755,26 +755,26 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, case (WR_DATA_WIDTH) 1: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_18, `MODE_18, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_18, `MODE_18, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_1, `MODE_18, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_1, `MODE_18, `MODE_1, 1'd0 }; end 2: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_18, `MODE_18, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_18, `MODE_18, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_2, `MODE_18, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_2, `MODE_18, `MODE_2, 1'd0 }; end 4: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_18, `MODE_18, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_18, `MODE_18, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_4, `MODE_18, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_4, `MODE_18, `MODE_4, 1'd0 }; end 8, 9: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_18, `MODE_18, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_18, `MODE_18, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_9, `MODE_18, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_9, `MODE_18, `MODE_9, 1'd0 }; end 16, 18: begin @@ -785,14 +785,14 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, end 32, 36: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_18, `MODE_18, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_18, `MODE_18, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_36, `MODE_18, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_36, `MODE_18, `MODE_36, 1'd0 }; end default: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_18, `MODE_18, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_18, `MODE_18, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_1, `MODE_18, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_1, `MODE_18, `MODE_1, 1'd0 }; end endcase @@ -801,32 +801,32 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, case (WR_DATA_WIDTH) 1: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_36, `MODE_36, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_36, `MODE_36, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_1, `MODE_36, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_1, `MODE_36, `MODE_1, 1'd0 }; end 2: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_36, `MODE_36, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_36, `MODE_36, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_2, `MODE_36, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_2, `MODE_36, `MODE_2, 1'd0 }; end 4: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_36, `MODE_36, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_36, `MODE_36, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_4, `MODE_36, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_4, `MODE_36, `MODE_4, 1'd0 }; end 8, 9: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_36, `MODE_36, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_36, `MODE_36, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_9, `MODE_36, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_9, `MODE_36, `MODE_9, 1'd0 }; end 16, 18: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_36, `MODE_36, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_36, `MODE_36, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_18, `MODE_36, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_18, `MODE_36, `MODE_18, 1'd0 }; end 32, 36: begin @@ -837,8 +837,8 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, end default: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_1, `MODE_36, `MODE_36, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_1, `MODE_36, `MODE_36, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_1, `MODE_36, `MODE_1, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_1, `MODE_36, `MODE_1, 1'd0 }; end endcase @@ -853,32 +853,32 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, end 2: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_2, `MODE_2, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_2, `MODE_2, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_2, `MODE_1, `MODE_2, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_2, `MODE_1, `MODE_2, 1'd0 }; end 4: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_4, `MODE_4, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_4, `MODE_4, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_4, `MODE_1, `MODE_4, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_4, `MODE_1, `MODE_4, 1'd0 }; end 8, 9: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_9, `MODE_9, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_9, `MODE_9, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_9, `MODE_1, `MODE_9, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_9, `MODE_1, `MODE_9, 1'd0 }; end 16, 18: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_18, `MODE_18, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_18, `MODE_18, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_18, `MODE_1, `MODE_18, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_18, `MODE_1, `MODE_18, 1'd0 }; end 32, 36: begin defparam _TECHMAP_REPLACE_.MODE_BITS = { 1'b0, - 11'd10, 11'd10, 4'd0, `MODE_36, `MODE_36, `MODE_1, `MODE_1, 1'd0, - 12'd10, 12'd10, 4'd0, `MODE_36, `MODE_36, `MODE_1, `MODE_1, 1'd0 + 11'd10, 11'd10, 4'd0, `MODE_1, `MODE_36, `MODE_1, `MODE_36, 1'd0, + 12'd10, 12'd10, 4'd0, `MODE_1, `MODE_36, `MODE_1, `MODE_36, 1'd0 }; end default: begin @@ -940,10 +940,6 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, end endcase - wire [14:0] PORT_A_ADDR = WR_EN ? WR_ADDR_SHIFTED : (RD_EN ? RD_ADDR_SHIFTED : 14'd0); - wire [14:0] PORT_A1_ADDR = PORT_A_ADDR; - wire [14:0] PORT_A2_ADDR = PORT_A_ADDR; - assign FLUSH1 = 1'b0; assign FLUSH2 = 1'b0; @@ -974,22 +970,39 @@ module \$__QLF_FACTOR_BRAM36_SDP_ASYMMETRIC (RD_ADDR, RD_ARST, RD_CLK, RD_DATA, TDP36K _TECHMAP_REPLACE_ ( .RESET_ni(1'b1), + .WDATA_A1_i(PORT_A1_WDATA), - .RDATA_A1_o(PORT_A1_RDATA), - .ADDR_A1_i(PORT_A1_ADDR), + .RDATA_A1_o(), + .ADDR_A1_i(WR_ADDR_SHIFTED), .CLK_A1_i(PORT_A1_CLK), - .REN_A1_i(PORT_A1_REN), + .REN_A1_i(1'b0), .WEN_A1_i(PORT_A1_WEN), .BE_A1_i(PORT_A1_BE), + .WDATA_B1_i(), + .RDATA_B1_o(PORT_A1_RDATA), + .ADDR_B1_i(RD_ADDR_SHIFTED), + .CLK_B1_i(PORT_A1_CLK), + .REN_B1_i(PORT_A1_REN), + .WEN_B1_i(1'b0), + .BE_B1_i(PORT_A1_BE), + .WDATA_A2_i(PORT_A2_WDATA), - .RDATA_A2_o(PORT_A2_RDATA), - .ADDR_A2_i(PORT_A2_ADDR), + .RDATA_A2_o(), + .ADDR_A2_i(WR_ADDR_SHIFTED), .CLK_A2_i(PORT_A2_CLK), - .REN_A2_i(PORT_A2_REN), + .REN_A2_i(1'b0), .WEN_A2_i(PORT_A2_WEN), .BE_A2_i(PORT_A2_BE), + .WDATA_B2_i(), + .RDATA_B2_o(PORT_A2_RDATA), + .ADDR_B2_i(RD_ADDR_SHIFTED), + .CLK_B2_i(PORT_A2_CLK), + .REN_B2_i(PORT_A2_REN), + .WEN_B2_i(1'b0), + .BE_B2_i(PORT_A2_BE), + .FLUSH1_i(FLUSH1), .FLUSH2_i(FLUSH2) ); diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl index 11525edb8..b413b43ae 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl @@ -14,6 +14,7 @@ opt_clean stat write_verilog sim/spram_16x2048_32x1024_post_synth.v select -assert-count 1 t:TDP36K +select -assert-count 1 t:* select -clear design -load bram_tdp @@ -25,6 +26,7 @@ opt_clean stat write_verilog sim/spram_8x4096_16x2048_post_synth.v select -assert-count 1 t:TDP36K +select -assert-count 1 t:* select -clear design -load bram_tdp @@ -36,6 +38,7 @@ opt_clean stat write_verilog sim/spram_8x2048_16x1024_post_synth.v select -assert-count 1 t:TDP36K +select -assert-count 1 t:* select -clear design -load bram_tdp @@ -47,5 +50,4 @@ opt_clean stat write_verilog sim/spram_8x4096_32x1024_post_synth.v select -assert-count 1 t:TDP36K - - +select -assert-count 1 t:* diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl index 95fd9d401..9d086bb09 100644 --- a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl +++ b/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl @@ -14,6 +14,7 @@ opt_clean stat write_verilog sim/spram_16x1024_8x2048_post_synth.v select -assert-count 1 t:TDP36K +select -assert-count 1 t:* select -clear design -load bram_tdp @@ -25,6 +26,7 @@ opt_clean stat write_verilog sim/spram_16x2048_8x4096_post_synth.v select -assert-count 1 t:TDP36K +select -assert-count 1 t:* select -clear design -load bram_tdp @@ -36,6 +38,7 @@ opt_clean stat write_verilog sim/spram_32x1024_16x2048_post_synth.v select -assert-count 1 t:TDP36K +select -assert-count 1 t:* select -clear design -load bram_tdp @@ -47,5 +50,4 @@ opt_clean stat write_verilog sim/spram_32x1024_8x4096_post_synth.v select -assert-count 1 t:TDP36K - - +select -assert-count 1 t:* From 11d477e5028d6b4d5d699a341a535f5122b71453 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Sat, 24 Sep 2022 22:20:32 -0700 Subject: [PATCH 844/845] Fix deprecated use of `which` Instead of `which`, the suggested alternative is `command -v` Signed-off-by: Henner Zeller --- Makefile_plugin.common | 4 +++- Makefile_test.common | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile_plugin.common b/Makefile_plugin.common index b26a7e037..fd6d86e36 100644 --- a/Makefile_plugin.common +++ b/Makefile_plugin.common @@ -38,8 +38,10 @@ # |-- example2-plugin # |-- ... +SHELL := /usr/bin/env bash + # Either find yosys in system and use its path or use the given path -YOSYS_PATH ?= $(realpath $(dir $(shell which yosys))/..) +YOSYS_PATH ?= $(realpath $(dir $(shell command -v yosys))/..) # Find yosys-config, throw an error if not found YOSYS_CONFIG = $(YOSYS_PATH)/bin/yosys-config diff --git a/Makefile_test.common b/Makefile_test.common index ca6ec1847..5d72327c2 100644 --- a/Makefile_test.common +++ b/Makefile_test.common @@ -14,8 +14,10 @@ # test2_verify = $(call diff_test,test2,ext) # +SHELL := /usr/bin/env bash + # Either find yosys in system and use its path or use the given path -YOSYS_PATH ?= $(realpath $(dir $(shell which yosys))/..) +YOSYS_PATH ?= $(realpath $(dir $(shell command -v yosys))/..) # Find yosys-config, throw an error if not found YOSYS_CONFIG = $(YOSYS_PATH)/bin/yosys-config From 24722f6d19fd590db5a3c1525c05808efe80a6f9 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Mon, 3 Oct 2022 05:57:46 +0200 Subject: [PATCH 845/845] prepare to move into f4pga Signed-off-by: Unai Martinez-Corral --- .gitattributes | 2 +- .../{workflows => scripts}/build-and-test.sh | 10 +- .github/{workflows => scripts}/common.sh | 2 +- .github/{workflows => scripts}/setup.sh | 8 +- .github/workflows/Pipeline.yml | 94 +++++++++++++++++++ .github/workflows/ci.yml | 63 ------------- .github/workflows/format-check.sh | 29 ------ .github/workflows/licensing.yml | 37 -------- .gitignore | 2 +- requirements.txt | 0 .../tests/minilitex_ddr_arty/VexRiscv_Lite.v | 1 - .../minilitex_ddr_arty/minilitex_ddr_arty.v | 1 - .../CODE_OF_CONDUCT.md | 0 .../CONTRIBUTING.md | 0 Makefile => yosys-plugins/Makefile | 12 +-- .../Makefile_plugin.common | 4 +- .../Makefile_test.common | 4 +- README.md => yosys-plugins/README.md | 4 +- {common => yosys-plugins}/bank_tiles.h | 0 .../design_introspection}/Makefile | 0 .../design_introspection.cc | 0 .../design_introspection}/get_cells.cc | 0 .../design_introspection}/get_cells.h | 0 .../design_introspection}/get_cmd.cc | 0 .../design_introspection}/get_cmd.h | 0 .../design_introspection}/get_count.cc | 0 .../design_introspection}/get_count.h | 0 .../design_introspection}/get_nets.cc | 0 .../design_introspection}/get_nets.h | 0 .../design_introspection}/get_pins.cc | 0 .../design_introspection}/get_pins.h | 0 .../design_introspection}/get_ports.cc | 2 +- .../design_introspection}/get_ports.h | 0 .../selection_to_tcl_list.cc | 0 .../selection_to_tcl_list.h | 0 .../design_introspection}/tests/Makefile | 0 .../tests/get_cells/get_cells.golden.txt | 0 .../tests/get_cells/get_cells.tcl | 0 .../tests/get_cells/get_cells.v | 0 .../tests/get_count/Makefile | 0 .../tests/get_count/get_count.tcl | 0 .../tests/get_count/get_count.v | 0 .../tests/get_nets/get_nets.golden.txt | 0 .../tests/get_nets/get_nets.tcl | 0 .../tests/get_nets/get_nets.v | 0 .../tests/get_pins/get_pins.golden.txt | 0 .../tests/get_pins/get_pins.tcl | 0 .../tests/get_pins/get_pins.v | 0 .../tests/get_ports/get_ports.golden.txt | 0 .../tests/get_ports/get_ports.tcl | 0 .../tests/get_ports/get_ports.v | 0 .../selection_to_tcl_list.golden.txt | 0 .../selection_to_tcl_list.tcl | 0 .../selection_to_tcl_list.v | 0 .../tests/trim_name/trim_name.test.cc | 2 +- .../dsp-ff}/Makefile | 0 .../dsp-ff}/dsp_ff.cc | 0 .../dsp-ff}/nexus-dsp_rules.txt | 0 .../dsp-ff}/tests/Makefile | 0 .../nexus_conn_conflict.tcl | 0 .../nexus_conn_conflict/nexus_conn_conflict.v | 0 .../nexus_conn_share/nexus_conn_share.tcl | 0 .../tests/nexus_conn_share/nexus_conn_share.v | 0 .../tests/nexus_fftypes/nexus_fftypes.tcl | 0 .../tests/nexus_fftypes/nexus_fftypes.v | 0 .../dsp-ff}/tests/nexus_mult/README.md | 0 .../dsp-ff}/tests/nexus_mult/nexus_mult.tcl | 0 .../dsp-ff}/tests/nexus_mult/nexus_mult.v | 0 .../tests/nexus_mult_wide/nexus_mult_wide.tcl | 0 .../tests/nexus_mult_wide/nexus_mult_wide.v | 0 .../nexus_param_conflict.tcl | 0 .../nexus_param_conflict.v | 0 .../environment.yml | 0 {fasm-plugin => yosys-plugins/fasm}/Makefile | 0 {fasm-plugin => yosys-plugins/fasm}/fasm.cc | 2 +- .../fasm}/tests/Makefile | 0 .../integrateinv}/Makefile | 0 .../integrateinv}/integrateinv.cc | 0 .../integrateinv}/tests/.gitignore | 0 .../integrateinv}/tests/Makefile | 0 .../integrateinv}/tests/fanout/fanout.tcl | 0 .../integrateinv}/tests/fanout/fanout.v | 0 .../tests/hierarchy/hierarchy.tcl | 0 .../integrateinv}/tests/hierarchy/hierarchy.v | 0 .../tests/multi_bit/multi_bit.tcl | 0 .../integrateinv}/tests/multi_bit/multi_bit.v | 0 .../tests/single_bit/single_bit.tcl | 0 .../tests/single_bit/single_bit.v | 0 .../integrateinv}/tests/toplevel/toplevel.tcl | 0 .../integrateinv}/tests/toplevel/toplevel.v | 0 .../params}/Makefile | 0 .../params}/params.cc | 0 .../params}/tests/Makefile | 0 .../params}/tests/compare_output_json.py | 0 .../params}/tests/pll/pll.golden.json | 0 .../params}/tests/pll/pll.tcl | 0 .../params}/tests/pll/pll.v | 0 .../params}/tests/pll/pll.xdc | 0 .../params}/tests/pll/techmaps/cells_map.v | 0 .../params}/tests/pll/techmaps/cells_sim.v | 0 .../ql-iob}/Makefile | 0 .../ql-iob}/README.md | 0 .../ql-iob}/pcf_parser.cc | 0 .../ql-iob}/pcf_parser.hh | 0 .../ql-iob}/pinmap_parser.cc | 0 .../ql-iob}/pinmap_parser.hh | 0 .../ql-iob}/ql-iob.cc | 0 .../ql-iob}/tests/.gitignore | 0 .../ql-iob}/tests/Makefile | 0 .../ql-iob}/tests/ckpad/Makefile | 0 .../ql-iob}/tests/ckpad/design.pcf | 0 .../ql-iob}/tests/ckpad/design.v | 0 .../ql-iob}/tests/ckpad/script.ys | 0 .../ql-iob}/tests/common/pp3_cells_map.v | 0 .../ql-iob}/tests/common/pp3_cells_sim.v | 0 .../ql-iob}/tests/pinmap.csv | 0 .../ql-iob}/tests/sdiomux/Makefile | 0 .../ql-iob}/tests/sdiomux/design.pcf | 0 .../ql-iob}/tests/sdiomux/design.v | 0 .../ql-iob}/tests/sdiomux/script.ys | 0 .../ql-qlf}/Makefile | 0 .../ql-qlf}/common/cells_sim.v | 0 .../ql-qlf}/pp3/abc9_map.v | 0 .../ql-qlf}/pp3/abc9_model.v | 0 .../ql-qlf}/pp3/abc9_unmap.v | 0 .../ql-qlf}/pp3/bram_init_32.vh | 0 .../ql-qlf}/pp3/bram_init_8_16.vh | 0 .../ql-qlf}/pp3/brams.txt | 0 .../ql-qlf}/pp3/brams_map.v | 0 .../ql-qlf}/pp3/brams_sim.v | 0 .../ql-qlf}/pp3/cells_map.v | 0 .../ql-qlf}/pp3/cells_sim.v | 0 .../ql-qlf}/pp3/ffs_map.v | 0 .../ql-qlf}/pp3/latches_map.v | 0 .../ql-qlf}/pp3/lut_map.v | 0 .../ql-qlf}/pp3/lutdefs.txt | 0 .../ql-qlf}/pp3/mult_sim.v | 0 .../ql-qlf}/pp3/qlal3_sim.v | 0 .../ql-qlf}/pp3/qlal4s3b_sim.v | 0 .../ql-qlf}/pp3_braminit.cc | 0 .../ql-qlf}/ql-bram-asymmetric-wider-read.pmg | 0 .../ql-bram-asymmetric-wider-write.pmg | 0 .../ql-qlf}/ql-bram-asymmetric.cc | 0 .../ql-qlf}/ql-bram-split.cc | 0 .../ql-qlf}/ql-dsp-io-regs.cc | 0 .../ql-qlf}/ql-dsp-macc.cc | 0 .../ql-qlf}/ql-dsp-macc.pmg | 0 .../ql-qlf}/ql-dsp-simd.cc | 0 .../ql-qlf}/ql-dsp.cc | 0 .../ql-qlf}/ql-edif.cc | 0 .../ql-qlf}/ql_dsp.pmg | 0 .../ql-qlf}/qlf_k4n8/arith_map.v | 0 .../ql-qlf}/qlf_k4n8/cells_sim.v | 0 .../ql-qlf}/qlf_k4n8/ffs_map.v | 0 .../ql-qlf}/qlf_k6n10/arith_map.v | 0 .../ql-qlf}/qlf_k6n10/brams.txt | 0 .../ql-qlf}/qlf_k6n10/brams_map.v | 0 .../ql-qlf}/qlf_k6n10/cells_sim.v | 0 .../ql-qlf}/qlf_k6n10/dsp_map.v | 0 .../ql-qlf}/qlf_k6n10/ffs_map.v | 0 .../ql-qlf}/qlf_k6n10/lut_map.v | 0 .../ql-qlf}/qlf_k6n10f/TDP18K_FIFO.v | 0 .../ql-qlf}/qlf_k6n10f/arith_map.v | 0 .../ql-qlf}/qlf_k6n10f/brams.txt | 0 .../ql-qlf}/qlf_k6n10f/brams_final_map.v | 0 .../ql-qlf}/qlf_k6n10f/brams_map.v | 0 .../ql-qlf}/qlf_k6n10f/cells_sim.v | 0 .../ql-qlf}/qlf_k6n10f/dsp_final_map.v | 0 .../ql-qlf}/qlf_k6n10f/dsp_map.v | 0 .../ql-qlf}/qlf_k6n10f/dsp_sim.v | 0 .../ql-qlf}/qlf_k6n10f/ffs_map.v | 0 .../ql-qlf}/qlf_k6n10f/sram1024x18.v | 0 .../ql-qlf}/qlf_k6n10f/ufifo_ctl.v | 0 .../ql-qlf}/quicklogic_eqn.cc | 0 .../ql-qlf}/synth_quicklogic.cc | 0 .../ql-qlf}/tests/.gitignore | 0 .../ql-qlf}/tests/Makefile | 0 .../ql-qlf}/tests/consts/consts.tcl | 0 .../ql-qlf}/tests/consts/consts.v | 0 .../ql-qlf}/tests/dffs/dffs.tcl | 0 .../ql-qlf}/tests/dffs/dffs.v | 0 .../ql-qlf}/tests/fsm/fsm.tcl | 0 .../ql-qlf}/tests/fsm/fsm.v | 0 .../ql-qlf}/tests/full_adder/full_adder.tcl | 0 .../ql-qlf}/tests/full_adder/full_adder.v | 0 .../tests/iob_no_flatten/iob_no_flatten.tcl | 0 .../tests/iob_no_flatten/iob_no_flatten.v | 0 .../tests/iob_no_flatten/iob_no_flatten.ys | 0 .../ql-qlf}/tests/latches/latches.tcl | 0 .../ql-qlf}/tests/latches/latches.v | 0 .../ql-qlf}/tests/logic/logic.tcl | 0 .../ql-qlf}/tests/logic/logic.v | 0 .../ql-qlf}/tests/logic/logic.ys | 0 .../ql-qlf}/tests/mac_unit/mac_unit.tcl | 0 .../ql-qlf}/tests/mac_unit/mac_unit.v | 0 .../ql-qlf}/tests/multiplier/multiplier.tcl | 0 .../ql-qlf}/tests/multiplier/multiplier.v | 0 .../ql-qlf}/tests/mux/mux.tcl | 0 .../ql-qlf}/tests/mux/mux.v | 0 .../ql-qlf}/tests/pp3_bram/init.txt | 0 .../ql-qlf}/tests/pp3_bram/pp3_bram.tcl | 0 .../ql-qlf}/tests/pp3_bram/pp3_bram.v | 0 .../ql-qlf}/tests/qlf_k6n10_bram/bram.tcl | 0 .../ql-qlf}/tests/qlf_k6n10_bram/bram.v | 0 .../ql-qlf}/tests/qlf_k6n10_bram/bram.ys | 0 .../bram_asymmetric_wider_read.tcl | 0 .../bram_asymmetric_wider_read.v | 0 .../bram_asymmetric_wider_read/sim/Makefile | 0 .../sim/bram_asymmetric_wider_read_tb.v | 0 .../bram_asymmetric_wider_write.tcl | 0 .../bram_asymmetric_wider_write.v | 0 .../bram_asymmetric_wider_write/sim/Makefile | 0 .../sim/bram_asymmetric_wider_write_tb.v | 0 .../tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl | 0 .../tests/qlf_k6n10f/bram_sdp/bram_sdp.v | 0 .../tests/qlf_k6n10f/bram_sdp/sim/Makefile | 0 .../qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v | 0 .../bram_sdp_split/bram_sdp_split.tcl | 0 .../bram_sdp_split/bram_sdp_split.v | 0 .../qlf_k6n10f/bram_sdp_split/sim/Makefile | 0 .../bram_sdp_split/sim/bram_sdp_split_tb.v | 0 .../tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl | 0 .../tests/qlf_k6n10f/bram_tdp/bram_tdp.v | 0 .../tests/qlf_k6n10f/bram_tdp/sim/Makefile | 0 .../qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v | 0 .../bram_tdp_split/bram_tdp_split.tcl | 0 .../bram_tdp_split/bram_tdp_split.v | 0 .../qlf_k6n10f/bram_tdp_split/sim/Makefile | 0 .../bram_tdp_split/sim/bram_tdp_split_tb.v | 0 .../tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl | 0 .../tests/qlf_k6n10f/dsp_macc/dsp_macc.v | 0 .../tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl | 0 .../tests/qlf_k6n10f/dsp_madd/dsp_madd.v | 0 .../tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl | 0 .../tests/qlf_k6n10f/dsp_mult/dsp_mult.v | 0 .../dsp_mult_post_synth_sim.tcl | 0 .../dsp_mult_post_synth_sim.v | 0 .../dsp_mult_post_synth_sim/sim/Makefile | 0 .../sim/dsp_mult_post_synth_sim_tb.v | 0 .../tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl | 0 .../tests/qlf_k6n10f/dsp_simd/dsp_simd.v | 0 .../dsp_simd_post_synth_sim.tcl | 0 .../dsp_simd_post_synth_sim.v | 0 .../dsp_simd_post_synth_sim/sim/Makefile | 0 .../sim/dsp_simd_post_synth_sim_tb.v | 0 .../sim_dsp_fir_cfg_params.v | 0 .../sim_dsp_fir_cfg_ports.v | 0 .../sim_dsp_mult_cfg_params.v | 0 .../sim_dsp_mult_cfg_ports.v | 0 .../sim_dsp_mult_r_cfg_params.v | 0 .../sim_dsp_mult_r_cfg_ports.v | 0 .../sim_dsp_simd_cfg_params.v | 0 .../sim_dsp_simd_cfg_ports.v | 0 .../qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v | 0 .../ql-qlf}/tests/shreg/shreg.tcl | 0 .../ql-qlf}/tests/shreg/shreg.v | 0 .../ql-qlf}/tests/tribuf/tribuf.tcl | 0 .../ql-qlf}/tests/tribuf/tribuf.v | 0 yosys-plugins/requirements.txt | 1 + {sdc-plugin => yosys-plugins/sdc}/Makefile | 0 {sdc-plugin => yosys-plugins/sdc}/buffers.cc | 0 {sdc-plugin => yosys-plugins/sdc}/buffers.h | 0 {sdc-plugin => yosys-plugins/sdc}/clocks.cc | 0 {sdc-plugin => yosys-plugins/sdc}/clocks.h | 0 .../sdc}/propagation.cc | 0 .../sdc}/propagation.h | 0 {sdc-plugin => yosys-plugins/sdc}/sdc.cc | 0 .../sdc}/sdc_writer.cc | 0 .../sdc}/sdc_writer.h | 0 .../sdc}/set_clock_groups.cc | 0 .../sdc}/set_clock_groups.h | 0 .../sdc}/set_false_path.cc | 0 .../sdc}/set_false_path.h | 0 .../sdc}/set_max_delay.cc | 0 .../sdc}/set_max_delay.h | 0 .../sdc}/tests/Makefile | 0 .../sdc}/tests/abc9/abc9.input.sdc | 0 .../sdc}/tests/abc9/abc9.tcl | 0 .../sdc}/tests/abc9/abc9.v | 0 .../sdc}/tests/counter/counter.golden.sdc | 0 .../sdc}/tests/counter/counter.golden.txt | 0 .../sdc}/tests/counter/counter.input.sdc | 0 .../sdc}/tests/counter/counter.tcl | 0 .../sdc}/tests/counter/counter.v | 0 .../sdc}/tests/counter2/counter2.golden.sdc | 0 .../sdc}/tests/counter2/counter2.golden.txt | 0 .../sdc}/tests/counter2/counter2.input.sdc | 0 .../sdc}/tests/counter2/counter2.tcl | 0 .../sdc}/tests/counter2/counter2.v | 0 .../create_clock_add.golden.sdc | 0 .../create_clock_add.golden.txt | 0 .../create_clock_add.input.sdc | 0 .../create_clock_add/create_clock_add.tcl | 0 .../tests/create_clock_add/create_clock_add.v | 0 .../sdc}/tests/escaping/escaping.test.cc | 0 .../tests/get_clocks/get_clocks.golden.txt | 0 .../tests/get_clocks/get_clocks.input.sdc | 0 .../sdc}/tests/get_clocks/get_clocks.tcl | 0 .../sdc}/tests/get_clocks/get_clocks.v | 0 .../sdc}/tests/period_check/period_check.tcl | 0 .../sdc}/tests/period_check/period_check.v | 0 .../period_format_check.tcl | 0 .../period_format_check/period_format_check.v | 0 .../sdc}/tests/pll/pll.golden.sdc | 0 .../sdc}/tests/pll/pll.input.sdc | 0 .../sdc}/tests/pll/pll.tcl | 0 .../sdc}/tests/pll/pll.v | 0 .../pll_approx_equal.golden.sdc | 0 .../pll_approx_equal.input.sdc | 0 .../pll_approx_equal/pll_approx_equal.tcl | 0 .../tests/pll_approx_equal/pll_approx_equal.v | 0 .../pll_dangling_wires.golden.sdc | 0 .../pll_dangling_wires.input.sdc | 0 .../pll_dangling_wires/pll_dangling_wires.tcl | 0 .../pll_dangling_wires/pll_dangling_wires.v | 0 .../sdc}/tests/pll_div/pll_div.golden.sdc | 0 .../sdc}/tests/pll_div/pll_div.input.sdc | 0 .../sdc}/tests/pll_div/pll_div.tcl | 0 .../sdc}/tests/pll_div/pll_div.v | 0 .../pll_fbout_phase.golden.sdc | 0 .../pll_fbout_phase/pll_fbout_phase.input.sdc | 0 .../tests/pll_fbout_phase/pll_fbout_phase.tcl | 0 .../tests/pll_fbout_phase/pll_fbout_phase.v | 0 .../pll_propagated/pll_propagated.golden.sdc | 0 .../pll_propagated/pll_propagated.input.sdc | 0 .../tests/pll_propagated/pll_propagated.tcl | 0 .../tests/pll_propagated/pll_propagated.v | 0 .../restore_from_json/restore_from_json.tcl | 0 .../restore_from_json/restore_from_json.v | 0 .../set_clock_groups.golden.sdc | 0 .../set_clock_groups/set_clock_groups.tcl | 0 .../tests/set_clock_groups/set_clock_groups.v | 0 .../set_false_path/set_false_path.golden.sdc | 0 .../tests/set_false_path/set_false_path.tcl | 0 .../tests/set_false_path/set_false_path.v | 0 .../set_max_delay/set_max_delay.golden.sdc | 0 .../tests/set_max_delay/set_max_delay.tcl | 0 .../sdc}/tests/set_max_delay/set_max_delay.v | 0 .../tests/waveform_check/waveform_check.tcl | 0 .../tests/waveform_check/waveform_check.v | 0 .../systemverilog}/Makefile | 0 .../systemverilog}/README.md | 0 .../systemverilog}/UhdmAst.cc | 0 .../systemverilog}/UhdmAst.h | 0 .../systemverilog}/UhdmAstUpstream.cc | 0 .../systemverilog}/tests/Makefile | 0 .../break_continue/break_continue.golden.out | 0 .../tests/break_continue/break_continue.tcl | 0 .../tests/break_continue/break_continue.v | 0 .../systemverilog}/tests/counter/counter.tcl | 0 .../systemverilog}/tests/counter/counter.v | 0 .../separate-compilation-buf.sv | 0 .../separate-compilation-pkg.sv | 0 .../separate-compilation.tcl | 0 .../separate-compilation.v | 0 .../systemverilog}/uhdmastfrontend.cc | 0 .../systemverilog}/uhdmastreport.cc | 0 .../systemverilog}/uhdmastreport.h | 0 .../systemverilog}/uhdmastshared.h | 0 .../systemverilog}/uhdmcommonfrontend.cc | 0 .../systemverilog}/uhdmcommonfrontend.h | 0 .../systemverilog}/uhdmsurelogastfrontend.cc | 0 {test-utils => yosys-plugins}/test-utils.tcl | 0 {uhdm-plugin => yosys-plugins/uhdm}/Makefile | 0 {uhdm-plugin => yosys-plugins/uhdm}/README.md | 0 .../uhdm}/tests/Makefile | 0 {uhdm-plugin => yosys-plugins/uhdm}/uhdm.cc | 0 {common => yosys-plugins}/utils.h | 0 {xdc-plugin => yosys-plugins/xdc}/BANK.v | 0 {xdc-plugin => yosys-plugins/xdc}/Makefile | 0 .../xdc}/tests/Makefile | 0 .../xdc}/tests/compare_output_json.py | 0 .../counter-dict/counter-dict.golden.json | 0 .../xdc}/tests/counter-dict/counter-dict.tcl | 0 .../xdc}/tests/counter-dict/counter-dict.v | 0 .../xdc}/tests/counter-dict/counter-dict.xdc | 0 .../xdc}/tests/counter/counter.golden.json | 0 .../xdc}/tests/counter/counter.tcl | 0 .../xdc}/tests/counter/counter.v | 0 .../xdc}/tests/counter/counter.xdc | 0 .../xdc}/tests/io_loc_pairs/cells_xtra.v | 0 .../io_loc_pairs/io_loc_pairs.golden.json | 0 .../xdc}/tests/io_loc_pairs/io_loc_pairs.tcl | 0 .../xdc}/tests/io_loc_pairs/io_loc_pairs.v | 0 .../xdc}/tests/io_loc_pairs/io_loc_pairs.xdc | 0 .../tests/minilitex_ddr_arty/VexRiscv_Lite.v | 1 + .../xdc}/tests/minilitex_ddr_arty/mem.init | 0 .../xdc}/tests/minilitex_ddr_arty/mem_1.init | 0 .../minilitex_ddr_arty.golden.json | 0 .../minilitex_ddr_arty/minilitex_ddr_arty.tcl | 0 .../minilitex_ddr_arty/minilitex_ddr_arty.v | 1 + .../minilitex_ddr_arty/minilitex_ddr_arty.xdc | 0 .../non_zero_port_indexes.golden.json | 0 .../non_zero_port_indexes.tcl | 0 .../non_zero_port_indexes.v | 0 .../non_zero_port_indexes.xdc | 0 .../package_pins-dict-space.golden.json | 0 .../package_pins-dict-space.tcl | 0 .../package_pins-dict-space.v | 0 .../package_pins-dict-space.xdc | 0 .../package_pins/package_pins.golden.json | 0 .../xdc}/tests/package_pins/package_pins.tcl | 0 .../xdc}/tests/package_pins/package_pins.v | 0 .../xdc}/tests/package_pins/package_pins.xdc | 0 .../port_indexes/port_indexes.golden.json | 0 .../xdc}/tests/port_indexes/port_indexes.tcl | 0 .../xdc}/tests/port_indexes/port_indexes.v | 0 .../xdc}/tests/port_indexes/port_indexes.xdc | 0 .../xdc}/tests/xc7a35tcsg324-1.json | 0 {xdc-plugin => yosys-plugins/xdc}/xdc.cc | 4 +- 410 files changed, 126 insertions(+), 160 deletions(-) rename .github/{workflows => scripts}/build-and-test.sh (82%) rename .github/{workflows => scripts}/common.sh (97%) rename .github/{workflows => scripts}/setup.sh (89%) create mode 100644 .github/workflows/Pipeline.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/format-check.sh delete mode 100644 .github/workflows/licensing.yml delete mode 100644 requirements.txt delete mode 120000 xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v delete mode 120000 xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v rename CODE_OF_CONDUCT.md => yosys-plugins/CODE_OF_CONDUCT.md (100%) rename CONTRIBUTING.md => yosys-plugins/CONTRIBUTING.md (100%) rename Makefile => yosys-plugins/Makefile (89%) rename Makefile_plugin.common => yosys-plugins/Makefile_plugin.common (98%) rename Makefile_test.common => yosys-plugins/Makefile_test.common (98%) rename README.md => yosys-plugins/README.md (90%) rename {common => yosys-plugins}/bank_tiles.h (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/Makefile (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/design_introspection.cc (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_cells.cc (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_cells.h (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_cmd.cc (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_cmd.h (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_count.cc (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_count.h (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_nets.cc (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_nets.h (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_pins.cc (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_pins.h (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_ports.cc (98%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/get_ports.h (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/selection_to_tcl_list.cc (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/selection_to_tcl_list.h (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/Makefile (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_cells/get_cells.golden.txt (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_cells/get_cells.tcl (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_cells/get_cells.v (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_count/Makefile (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_count/get_count.tcl (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_count/get_count.v (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_nets/get_nets.golden.txt (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_nets/get_nets.tcl (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_nets/get_nets.v (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_pins/get_pins.golden.txt (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_pins/get_pins.tcl (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_pins/get_pins.v (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_ports/get_ports.golden.txt (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_ports/get_ports.tcl (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/get_ports/get_ports.v (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/selection_to_tcl_list/selection_to_tcl_list.tcl (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/selection_to_tcl_list/selection_to_tcl_list.v (100%) rename {design_introspection-plugin => yosys-plugins/design_introspection}/tests/trim_name/trim_name.test.cc (94%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/Makefile (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/dsp_ff.cc (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/nexus-dsp_rules.txt (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/Makefile (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_conn_conflict/nexus_conn_conflict.tcl (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_conn_conflict/nexus_conn_conflict.v (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_conn_share/nexus_conn_share.tcl (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_conn_share/nexus_conn_share.v (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_fftypes/nexus_fftypes.tcl (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_fftypes/nexus_fftypes.v (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_mult/README.md (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_mult/nexus_mult.tcl (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_mult/nexus_mult.v (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_mult_wide/nexus_mult_wide.tcl (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_mult_wide/nexus_mult_wide.v (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_param_conflict/nexus_param_conflict.tcl (100%) rename {dsp-ff-plugin => yosys-plugins/dsp-ff}/tests/nexus_param_conflict/nexus_param_conflict.v (100%) rename environment.yml => yosys-plugins/environment.yml (100%) rename {fasm-plugin => yosys-plugins/fasm}/Makefile (100%) rename {fasm-plugin => yosys-plugins/fasm}/fasm.cc (98%) rename {fasm-plugin => yosys-plugins/fasm}/tests/Makefile (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/Makefile (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/integrateinv.cc (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/.gitignore (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/Makefile (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/fanout/fanout.tcl (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/fanout/fanout.v (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/hierarchy/hierarchy.tcl (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/hierarchy/hierarchy.v (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/multi_bit/multi_bit.tcl (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/multi_bit/multi_bit.v (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/single_bit/single_bit.tcl (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/single_bit/single_bit.v (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/toplevel/toplevel.tcl (100%) rename {integrateinv-plugin => yosys-plugins/integrateinv}/tests/toplevel/toplevel.v (100%) rename {params-plugin => yosys-plugins/params}/Makefile (100%) rename {params-plugin => yosys-plugins/params}/params.cc (100%) rename {params-plugin => yosys-plugins/params}/tests/Makefile (100%) rename {params-plugin => yosys-plugins/params}/tests/compare_output_json.py (100%) rename {params-plugin => yosys-plugins/params}/tests/pll/pll.golden.json (100%) rename {params-plugin => yosys-plugins/params}/tests/pll/pll.tcl (100%) rename {params-plugin => yosys-plugins/params}/tests/pll/pll.v (100%) rename {params-plugin => yosys-plugins/params}/tests/pll/pll.xdc (100%) rename {params-plugin => yosys-plugins/params}/tests/pll/techmaps/cells_map.v (100%) rename {params-plugin => yosys-plugins/params}/tests/pll/techmaps/cells_sim.v (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/Makefile (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/README.md (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/pcf_parser.cc (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/pcf_parser.hh (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/pinmap_parser.cc (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/pinmap_parser.hh (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/ql-iob.cc (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/.gitignore (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/Makefile (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/ckpad/Makefile (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/ckpad/design.pcf (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/ckpad/design.v (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/ckpad/script.ys (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/common/pp3_cells_map.v (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/common/pp3_cells_sim.v (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/pinmap.csv (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/sdiomux/Makefile (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/sdiomux/design.pcf (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/sdiomux/design.v (100%) rename {ql-iob-plugin => yosys-plugins/ql-iob}/tests/sdiomux/script.ys (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/common/cells_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/abc9_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/abc9_model.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/abc9_unmap.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/bram_init_32.vh (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/bram_init_8_16.vh (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/brams.txt (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/brams_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/brams_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/cells_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/cells_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/ffs_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/latches_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/lut_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/lutdefs.txt (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/mult_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/qlal3_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3/qlal4s3b_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/pp3_braminit.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-bram-asymmetric-wider-read.pmg (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-bram-asymmetric-wider-write.pmg (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-bram-asymmetric.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-bram-split.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-dsp-io-regs.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-dsp-macc.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-dsp-macc.pmg (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-dsp-simd.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-dsp.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql-edif.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/ql_dsp.pmg (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k4n8/arith_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k4n8/cells_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k4n8/ffs_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10/arith_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10/brams.txt (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10/brams_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10/cells_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10/dsp_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10/ffs_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10/lut_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/TDP18K_FIFO.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/arith_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/brams.txt (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/brams_final_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/brams_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/cells_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/dsp_final_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/dsp_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/dsp_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/ffs_map.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/sram1024x18.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/qlf_k6n10f/ufifo_ctl.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/quicklogic_eqn.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/synth_quicklogic.cc (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/.gitignore (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/consts/consts.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/consts/consts.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/dffs/dffs.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/dffs/dffs.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/fsm/fsm.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/fsm/fsm.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/full_adder/full_adder.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/full_adder/full_adder.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/iob_no_flatten/iob_no_flatten.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/iob_no_flatten/iob_no_flatten.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/iob_no_flatten/iob_no_flatten.ys (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/latches/latches.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/latches/latches.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/logic/logic.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/logic/logic.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/logic/logic.ys (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/mac_unit/mac_unit.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/mac_unit/mac_unit.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/multiplier/multiplier.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/multiplier/multiplier.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/mux/mux.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/mux/mux.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/pp3_bram/init.txt (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/pp3_bram/pp3_bram.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/pp3_bram/pp3_bram.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10_bram/bram.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10_bram/bram.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10_bram/bram.ys (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/bram_asymmetric_wider_read_tb.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/bram_asymmetric_wider_write_tb.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_sdp/bram_sdp.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_sdp/sim/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_sdp_split/sim/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_sdp_split/sim/bram_sdp_split_tb.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_tdp/bram_tdp.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_tdp/sim/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/bram_tdp_split/sim/bram_tdp_split_tb.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_macc/dsp_macc.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_madd/dsp_madd.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_mult/dsp_mult.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/dsp_mult_post_synth_sim_tb.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_simd/dsp_simd.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/Makefile (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/dsp_simd_post_synth_sim_tb.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/sim_dsp_fir_cfg_ports/sim_dsp_fir_cfg_ports.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/sim_dsp_mult_cfg_params/sim_dsp_mult_cfg_params.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/sim_dsp_mult_cfg_ports/sim_dsp_mult_cfg_ports.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_params/sim_dsp_mult_r_cfg_params.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_ports/sim_dsp_mult_r_cfg_ports.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/sim_dsp_simd_cfg_params/sim_dsp_simd_cfg_params.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/sim_dsp_simd_cfg_ports/sim_dsp_simd_cfg_ports.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/shreg/shreg.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/shreg/shreg.v (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/tribuf/tribuf.tcl (100%) rename {ql-qlf-plugin => yosys-plugins/ql-qlf}/tests/tribuf/tribuf.v (100%) create mode 100644 yosys-plugins/requirements.txt rename {sdc-plugin => yosys-plugins/sdc}/Makefile (100%) rename {sdc-plugin => yosys-plugins/sdc}/buffers.cc (100%) rename {sdc-plugin => yosys-plugins/sdc}/buffers.h (100%) rename {sdc-plugin => yosys-plugins/sdc}/clocks.cc (100%) rename {sdc-plugin => yosys-plugins/sdc}/clocks.h (100%) rename {sdc-plugin => yosys-plugins/sdc}/propagation.cc (100%) rename {sdc-plugin => yosys-plugins/sdc}/propagation.h (100%) rename {sdc-plugin => yosys-plugins/sdc}/sdc.cc (100%) rename {sdc-plugin => yosys-plugins/sdc}/sdc_writer.cc (100%) rename {sdc-plugin => yosys-plugins/sdc}/sdc_writer.h (100%) rename {sdc-plugin => yosys-plugins/sdc}/set_clock_groups.cc (100%) rename {sdc-plugin => yosys-plugins/sdc}/set_clock_groups.h (100%) rename {sdc-plugin => yosys-plugins/sdc}/set_false_path.cc (100%) rename {sdc-plugin => yosys-plugins/sdc}/set_false_path.h (100%) rename {sdc-plugin => yosys-plugins/sdc}/set_max_delay.cc (100%) rename {sdc-plugin => yosys-plugins/sdc}/set_max_delay.h (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/Makefile (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/abc9/abc9.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/abc9/abc9.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/abc9/abc9.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter/counter.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter/counter.golden.txt (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter/counter.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter/counter.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter/counter.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter2/counter2.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter2/counter2.golden.txt (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter2/counter2.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter2/counter2.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/counter2/counter2.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/create_clock_add/create_clock_add.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/create_clock_add/create_clock_add.golden.txt (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/create_clock_add/create_clock_add.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/create_clock_add/create_clock_add.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/create_clock_add/create_clock_add.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/escaping/escaping.test.cc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/get_clocks/get_clocks.golden.txt (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/get_clocks/get_clocks.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/get_clocks/get_clocks.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/get_clocks/get_clocks.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/period_check/period_check.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/period_check/period_check.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/period_format_check/period_format_check.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/period_format_check/period_format_check.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll/pll.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll/pll.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll/pll.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll/pll.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_approx_equal/pll_approx_equal.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_approx_equal/pll_approx_equal.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_approx_equal/pll_approx_equal.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_approx_equal/pll_approx_equal.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_dangling_wires/pll_dangling_wires.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_dangling_wires/pll_dangling_wires.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_dangling_wires/pll_dangling_wires.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_div/pll_div.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_div/pll_div.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_div/pll_div.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_div/pll_div.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_fbout_phase/pll_fbout_phase.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_fbout_phase/pll_fbout_phase.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_fbout_phase/pll_fbout_phase.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_propagated/pll_propagated.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_propagated/pll_propagated.input.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_propagated/pll_propagated.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/pll_propagated/pll_propagated.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/restore_from_json/restore_from_json.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/restore_from_json/restore_from_json.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/set_clock_groups/set_clock_groups.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/set_clock_groups/set_clock_groups.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/set_clock_groups/set_clock_groups.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/set_false_path/set_false_path.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/set_false_path/set_false_path.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/set_false_path/set_false_path.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/set_max_delay/set_max_delay.golden.sdc (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/set_max_delay/set_max_delay.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/set_max_delay/set_max_delay.v (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/waveform_check/waveform_check.tcl (100%) rename {sdc-plugin => yosys-plugins/sdc}/tests/waveform_check/waveform_check.v (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/Makefile (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/README.md (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/UhdmAst.cc (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/UhdmAst.h (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/UhdmAstUpstream.cc (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/Makefile (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/break_continue/break_continue.golden.out (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/break_continue/break_continue.tcl (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/break_continue/break_continue.v (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/counter/counter.tcl (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/counter/counter.v (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/separate-compilation/separate-compilation-buf.sv (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/separate-compilation/separate-compilation-pkg.sv (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/separate-compilation/separate-compilation.tcl (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/tests/separate-compilation/separate-compilation.v (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/uhdmastfrontend.cc (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/uhdmastreport.cc (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/uhdmastreport.h (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/uhdmastshared.h (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/uhdmcommonfrontend.cc (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/uhdmcommonfrontend.h (100%) rename {systemverilog-plugin => yosys-plugins/systemverilog}/uhdmsurelogastfrontend.cc (100%) rename {test-utils => yosys-plugins}/test-utils.tcl (100%) rename {uhdm-plugin => yosys-plugins/uhdm}/Makefile (100%) rename {uhdm-plugin => yosys-plugins/uhdm}/README.md (100%) rename {uhdm-plugin => yosys-plugins/uhdm}/tests/Makefile (100%) rename {uhdm-plugin => yosys-plugins/uhdm}/uhdm.cc (100%) rename {common => yosys-plugins}/utils.h (100%) rename {xdc-plugin => yosys-plugins/xdc}/BANK.v (100%) rename {xdc-plugin => yosys-plugins/xdc}/Makefile (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/Makefile (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/compare_output_json.py (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/counter-dict/counter-dict.golden.json (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/counter-dict/counter-dict.tcl (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/counter-dict/counter-dict.v (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/counter-dict/counter-dict.xdc (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/counter/counter.golden.json (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/counter/counter.tcl (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/counter/counter.v (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/counter/counter.xdc (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/io_loc_pairs/cells_xtra.v (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/io_loc_pairs/io_loc_pairs.golden.json (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/io_loc_pairs/io_loc_pairs.tcl (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/io_loc_pairs/io_loc_pairs.v (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/io_loc_pairs/io_loc_pairs.xdc (100%) create mode 120000 yosys-plugins/xdc/tests/minilitex_ddr_arty/VexRiscv_Lite.v rename {xdc-plugin => yosys-plugins/xdc}/tests/minilitex_ddr_arty/mem.init (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/minilitex_ddr_arty/mem_1.init (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/minilitex_ddr_arty/minilitex_ddr_arty.golden.json (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl (100%) create mode 120000 yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.v rename {xdc-plugin => yosys-plugins/xdc}/tests/minilitex_ddr_arty/minilitex_ddr_arty.xdc (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/non_zero_port_indexes/non_zero_port_indexes.golden.json (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/non_zero_port_indexes/non_zero_port_indexes.tcl (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/non_zero_port_indexes/non_zero_port_indexes.v (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/non_zero_port_indexes/non_zero_port_indexes.xdc (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/package_pins-dict-space/package_pins-dict-space.golden.json (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/package_pins-dict-space/package_pins-dict-space.tcl (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/package_pins-dict-space/package_pins-dict-space.v (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/package_pins-dict-space/package_pins-dict-space.xdc (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/package_pins/package_pins.golden.json (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/package_pins/package_pins.tcl (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/package_pins/package_pins.v (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/package_pins/package_pins.xdc (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/port_indexes/port_indexes.golden.json (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/port_indexes/port_indexes.tcl (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/port_indexes/port_indexes.v (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/port_indexes/port_indexes.xdc (100%) rename {xdc-plugin => yosys-plugins/xdc}/tests/xc7a35tcsg324-1.json (100%) rename {xdc-plugin => yosys-plugins/xdc}/xdc.cc (99%) diff --git a/.gitattributes b/.gitattributes index 9a5ca88ce..4fc3fda9a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,4 +6,4 @@ third_party/** linguist-vendored # FIXME: All vendor files should be under third_party -xdc-plugin/tests/minilitex_ddr_arty/** linguist-vendored +yosys-plugins/xdc/tests/minilitex_ddr_arty/** linguist-vendored diff --git a/.github/workflows/build-and-test.sh b/.github/scripts/build-and-test.sh similarity index 82% rename from .github/workflows/build-and-test.sh rename to .github/scripts/build-and-test.sh index 7d0401e65..958c79792 100755 --- a/.github/workflows/build-and-test.sh +++ b/.github/scripts/build-and-test.sh @@ -17,14 +17,14 @@ set -e -source .github/workflows/common.sh +source .github/scripts/common.sh ########################################################################## start_section Building export CXXFLAGS=-Werror -make UHDM_INSTALL_DIR=`pwd`/env/conda/envs/yosys-plugins/ plugins -j`nproc` +make -C yosys-plugins UHDM_INSTALL_DIR=`pwd`/yosys-plugins/env/conda/envs/yosys-plugins/ plugins -j`nproc` unset CXXFLAGS end_section @@ -32,19 +32,19 @@ end_section ########################################################################## start_section Installing -make install -j`nproc` +make -C yosys-plugins install -j`nproc` end_section ########################################################################## start_section Testing -make test -j`nproc` +make -C yosys-plugins test -j`nproc` end_section ########################################################################## start_section Cleanup -make plugins_clean -j`nproc` +make -C yosys-plugins plugins_clean -j`nproc` end_section ########################################################################## diff --git a/.github/workflows/common.sh b/.github/scripts/common.sh similarity index 97% rename from .github/workflows/common.sh rename to .github/scripts/common.sh index 9d5157075..3da7cb093 100644 --- a/.github/workflows/common.sh +++ b/.github/scripts/common.sh @@ -19,7 +19,7 @@ export PATH="$HOME/.local-bin/bin:$PATH" # OS X specific common setup -if [[ "${OS}" == "macOS" ]]; then +if [[ "x${OS}" == "xmacOS" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH" fi diff --git a/.github/workflows/setup.sh b/.github/scripts/setup.sh similarity index 89% rename from .github/workflows/setup.sh rename to .github/scripts/setup.sh index 38bcf3ffd..29bcb847a 100644 --- a/.github/workflows/setup.sh +++ b/.github/scripts/setup.sh @@ -17,7 +17,7 @@ set -e -source .github/workflows/common.sh +source .github/scripts/common.sh ########################################################################## @@ -50,8 +50,8 @@ start_section Install-Yosys echo '=================================' echo 'Making env with Yosys and Surelog' echo '=================================' - make env - source env/conda/bin/activate yosys-plugins + make -C yosys-plugins env + source yosys-plugins/env/conda/bin/activate yosys-plugins conda list ) end_section @@ -60,7 +60,7 @@ end_section start_section Yosys-Version ( - source env/conda/bin/activate yosys-plugins + source yosys-plugins/env/conda/bin/activate yosys-plugins echo $(which yosys) echo $(which yosys-config) echo $(yosys --version) diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml new file mode 100644 index 000000000..f2e7fbb9f --- /dev/null +++ b/.github/workflows/Pipeline.yml @@ -0,0 +1,94 @@ +# Copyright 2020-2022 F4PGA Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +name: Pipeline + +on: + push: + pull_request: + +jobs: + + + License-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: SymbiFlow/actions/checks@main + with: + exclude_license: | + ./yosys-plugins/design_introspection/tests/selection_to_tcl_list/selection_to_tcl_list.v + ./third_party/minilitex_ddr_arty/minilitex_ddr_arty.v + ./third_party/VexRiscv_Lite/VexRiscv_Lite.v + third_party: | + ./third_party/googletest/ + + + Run-tests: + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v2 + with: + submodules: recursive + + - uses: actions/setup-python@v2 + + - name: Install + run: | + sudo apt-get update + sudo apt-get install \ + bison \ + build-essential \ + clang-format-8 \ + cmake \ + flex \ + g++-9 \ + gawk \ + git \ + graphviz \ + libffi-dev \ + libboost-system-dev \ + libboost-python-dev \ + libboost-filesystem-dev \ + libreadline-dev \ + pkg-config \ + tcl-dev \ + xdot \ + zlib1g-dev + + - name: Format + run: | + set -e + source .github/scripts/common.sh + make -C yosys-plugins format -j`nproc` + test $(git status --porcelain | wc -l) -eq 0 || { git diff; false; } + + - name: ccache + uses: hendrikmuhs/ccache-action@v1 + + - name: Install Yosys + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + source .github/scripts/setup.sh + + - name: Build and test plugins + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + source yosys-plugins/env/conda/bin/activate yosys-plugins + source .github/scripts/build-and-test.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index a98124e18..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2020-2022 F4PGA Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 - -name: CI tests - -on: [push, pull_request] - -jobs: - - Run-tests: - runs-on: ubuntu-latest - - steps: - - - uses: actions/checkout@v2 - with: - submodules: recursive - - - uses: actions/setup-python@v2 - - - name: Install - run: | - sudo apt-get update - sudo apt-get install git g++-9 build-essential bison flex \ - libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot \ - pkg-config libboost-system-dev libboost-python-dev \ - libboost-filesystem-dev zlib1g-dev clang-format-8 cmake - - - name: Format - run: source .github/workflows/format-check.sh - env: - OS: ${{ runner.os }} - - - name: ccache - uses: hendrikmuhs/ccache-action@v1 - - - name: Install Yosys - run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - source .github/workflows/setup.sh - env: - OS: ${{ runner.os }} - - - name: Build and test plugins - run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - source env/conda/bin/activate yosys-plugins - source .github/workflows/build-and-test.sh - env: - OS: ${{ runner.os }} diff --git a/.github/workflows/format-check.sh b/.github/workflows/format-check.sh deleted file mode 100644 index 930ff57cf..000000000 --- a/.github/workflows/format-check.sh +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/bash -# Copyright 2020-2022 F4PGA Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 - -set -e - -source .github/workflows/common.sh - -########################################################################## - -start_section Formatting -make format -j`nproc` -test $(git status --porcelain | wc -l) -eq 0 || { git diff; false; } -end_section - -########################################################################## diff --git a/.github/workflows/licensing.yml b/.github/workflows/licensing.yml deleted file mode 100644 index 60e54f613..000000000 --- a/.github/workflows/licensing.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2020-2022 F4PGA Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 - -name: Licensing - -on: - push: - pull_request: - - -jobs: - Checks: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: SymbiFlow/actions/checks@main - with: - exclude_license: | - ./design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v - ./third_party/minilitex_ddr_arty/minilitex_ddr_arty.v - ./third_party/VexRiscv_Lite/VexRiscv_Lite.v - third_party: | - ./third_party/googletest/ diff --git a/.gitignore b/.gitignore index 56d348405..a8afde207 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ *.so *.swp *.log -ql-qlf-plugin/pmgen/* +yosys-plugins/ql-qlf/pmgen/* diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v b/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v deleted file mode 120000 index ede3e75e3..000000000 --- a/xdc-plugin/tests/minilitex_ddr_arty/VexRiscv_Lite.v +++ /dev/null @@ -1 +0,0 @@ -../../../third_party/VexRiscv_Lite/VexRiscv_Lite.v \ No newline at end of file diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v deleted file mode 120000 index 22581dd5c..000000000 --- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.v +++ /dev/null @@ -1 +0,0 @@ -../../../third_party/minilitex_ddr_arty/minilitex_ddr_arty.v \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/yosys-plugins/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to yosys-plugins/CODE_OF_CONDUCT.md diff --git a/CONTRIBUTING.md b/yosys-plugins/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to yosys-plugins/CONTRIBUTING.md diff --git a/Makefile b/yosys-plugins/Makefile similarity index 89% rename from Makefile rename to yosys-plugins/Makefile index 044fe00e0..54e2fc178 100644 --- a/Makefile +++ b/yosys-plugins/Makefile @@ -23,23 +23,23 @@ PLUGINS_TEST := $(foreach plugin,$(PLUGIN_LIST),test_$(plugin)) all: plugins TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) -REQUIREMENTS_FILE ?= requirements.txt +REQUIREMENTS_FILE = requirements.txt ENVIRONMENT_FILE ?= environment.yml --include third_party/make-env/conda.mk +-include ../third_party/make-env/conda.mk define install_plugin = $(1).so: - $$(MAKE) -C $(1)-plugin $$@ + $$(MAKE) -C $(1) $$@ install_$(1): - $$(MAKE) -C $(1)-plugin install + $$(MAKE) -C $(1) install clean_$(1): - $$(MAKE) -C $(1)-plugin clean + $$(MAKE) -C $(1) clean test_$(1): - @$$(MAKE) --no-print-directory -C $(1)-plugin test + @$$(MAKE) --no-print-directory -C $(1) test endef $(foreach plugin,$(PLUGIN_LIST),$(eval $(call install_plugin,$(plugin)))) diff --git a/Makefile_plugin.common b/yosys-plugins/Makefile_plugin.common similarity index 98% rename from Makefile_plugin.common rename to yosys-plugins/Makefile_plugin.common index fd6d86e36..965399e98 100644 --- a/Makefile_plugin.common +++ b/yosys-plugins/Makefile_plugin.common @@ -24,7 +24,7 @@ # # |-- Makefile_plugin.common # |-- Makefile_test.common -# |-- example-plugin +# |-- example # | |-- Makefile # | |-- source1.cc # | |-- source2.cc @@ -35,7 +35,7 @@ # | | |-- test_case_1.v # | | |-- test_case_1.golden.ext # | | |-- ... -# |-- example2-plugin +# |-- example2 # |-- ... SHELL := /usr/bin/env bash diff --git a/Makefile_test.common b/yosys-plugins/Makefile_test.common similarity index 98% rename from Makefile_test.common rename to yosys-plugins/Makefile_test.common index 5d72327c2..f09241dd4 100644 --- a/Makefile_test.common +++ b/yosys-plugins/Makefile_test.common @@ -25,12 +25,12 @@ ifeq (,$(wildcard $(YOSYS_CONFIG))) $(error "Didn't find 'yosys-config' under '$(YOSYS_PATH)'") endif -GTEST_DIR ?= $(abspath ../../third_party/googletest) +GTEST_DIR ?= $(abspath ../../../third_party/googletest) CXX ?= $(shell $(YOSYS_CONFIG) --cxx) CXXFLAGS ?= $(shell $(YOSYS_CONFIG) --cxxflags) -I.. -I$(GTEST_DIR)/googletest/include LDLIBS ?= $(shell $(YOSYS_CONFIG) --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread LDFLAGS ?= $(shell $(YOSYS_CONFIG) --ldflags) -TEST_UTILS ?= $(abspath ../../test-utils/test-utils.tcl) +TEST_UTILS ?= $(abspath ../../test-utils.tcl) define test_tpl = $(1): $(1)/ok diff --git a/README.md b/yosys-plugins/README.md similarity index 90% rename from README.md rename to yosys-plugins/README.md index ad1cce8c5..04df3ff4e 100644 --- a/README.md +++ b/yosys-plugins/README.md @@ -44,7 +44,7 @@ The plugin adds the following command: ## QuickLogic IOB plugin -[QuickLogic IOB plugin](./ql-iob-plugin/) annotates IO buffer cells with information from IO placement constraints. +[QuickLogic IOB plugin](./ql-iob/) annotates IO buffer cells with information from IO placement constraints. Used during synthesis for QuickLogic EOS-S3 architecture. The plugin adds the following command: @@ -53,7 +53,7 @@ The plugin adds the following command: ## QuickLogic QLF FPGAs plugin -[QuickLogic QLF plugin](./ql-qlf-plugin) extends Yosys with synthesis support for `qlf_k4n8` and `qlf_k6n10` architectures. +[QuickLogic QLF plugin](./ql-qlf/) extends Yosys with synthesis support for `qlf_k4n8` and `qlf_k6n10` architectures. The plugin adds the following command: diff --git a/common/bank_tiles.h b/yosys-plugins/bank_tiles.h similarity index 100% rename from common/bank_tiles.h rename to yosys-plugins/bank_tiles.h diff --git a/design_introspection-plugin/Makefile b/yosys-plugins/design_introspection/Makefile similarity index 100% rename from design_introspection-plugin/Makefile rename to yosys-plugins/design_introspection/Makefile diff --git a/design_introspection-plugin/design_introspection.cc b/yosys-plugins/design_introspection/design_introspection.cc similarity index 100% rename from design_introspection-plugin/design_introspection.cc rename to yosys-plugins/design_introspection/design_introspection.cc diff --git a/design_introspection-plugin/get_cells.cc b/yosys-plugins/design_introspection/get_cells.cc similarity index 100% rename from design_introspection-plugin/get_cells.cc rename to yosys-plugins/design_introspection/get_cells.cc diff --git a/design_introspection-plugin/get_cells.h b/yosys-plugins/design_introspection/get_cells.h similarity index 100% rename from design_introspection-plugin/get_cells.h rename to yosys-plugins/design_introspection/get_cells.h diff --git a/design_introspection-plugin/get_cmd.cc b/yosys-plugins/design_introspection/get_cmd.cc similarity index 100% rename from design_introspection-plugin/get_cmd.cc rename to yosys-plugins/design_introspection/get_cmd.cc diff --git a/design_introspection-plugin/get_cmd.h b/yosys-plugins/design_introspection/get_cmd.h similarity index 100% rename from design_introspection-plugin/get_cmd.h rename to yosys-plugins/design_introspection/get_cmd.h diff --git a/design_introspection-plugin/get_count.cc b/yosys-plugins/design_introspection/get_count.cc similarity index 100% rename from design_introspection-plugin/get_count.cc rename to yosys-plugins/design_introspection/get_count.cc diff --git a/design_introspection-plugin/get_count.h b/yosys-plugins/design_introspection/get_count.h similarity index 100% rename from design_introspection-plugin/get_count.h rename to yosys-plugins/design_introspection/get_count.h diff --git a/design_introspection-plugin/get_nets.cc b/yosys-plugins/design_introspection/get_nets.cc similarity index 100% rename from design_introspection-plugin/get_nets.cc rename to yosys-plugins/design_introspection/get_nets.cc diff --git a/design_introspection-plugin/get_nets.h b/yosys-plugins/design_introspection/get_nets.h similarity index 100% rename from design_introspection-plugin/get_nets.h rename to yosys-plugins/design_introspection/get_nets.h diff --git a/design_introspection-plugin/get_pins.cc b/yosys-plugins/design_introspection/get_pins.cc similarity index 100% rename from design_introspection-plugin/get_pins.cc rename to yosys-plugins/design_introspection/get_pins.cc diff --git a/design_introspection-plugin/get_pins.h b/yosys-plugins/design_introspection/get_pins.h similarity index 100% rename from design_introspection-plugin/get_pins.h rename to yosys-plugins/design_introspection/get_pins.h diff --git a/design_introspection-plugin/get_ports.cc b/yosys-plugins/design_introspection/get_ports.cc similarity index 98% rename from design_introspection-plugin/get_ports.cc rename to yosys-plugins/design_introspection/get_ports.cc index 6f3e702a5..51d11bf1e 100644 --- a/design_introspection-plugin/get_ports.cc +++ b/yosys-plugins/design_introspection/get_ports.cc @@ -17,7 +17,7 @@ * */ #include "get_ports.h" -#include "../common/utils.h" +#include "../utils.h" USING_YOSYS_NAMESPACE diff --git a/design_introspection-plugin/get_ports.h b/yosys-plugins/design_introspection/get_ports.h similarity index 100% rename from design_introspection-plugin/get_ports.h rename to yosys-plugins/design_introspection/get_ports.h diff --git a/design_introspection-plugin/selection_to_tcl_list.cc b/yosys-plugins/design_introspection/selection_to_tcl_list.cc similarity index 100% rename from design_introspection-plugin/selection_to_tcl_list.cc rename to yosys-plugins/design_introspection/selection_to_tcl_list.cc diff --git a/design_introspection-plugin/selection_to_tcl_list.h b/yosys-plugins/design_introspection/selection_to_tcl_list.h similarity index 100% rename from design_introspection-plugin/selection_to_tcl_list.h rename to yosys-plugins/design_introspection/selection_to_tcl_list.h diff --git a/design_introspection-plugin/tests/Makefile b/yosys-plugins/design_introspection/tests/Makefile similarity index 100% rename from design_introspection-plugin/tests/Makefile rename to yosys-plugins/design_introspection/tests/Makefile diff --git a/design_introspection-plugin/tests/get_cells/get_cells.golden.txt b/yosys-plugins/design_introspection/tests/get_cells/get_cells.golden.txt similarity index 100% rename from design_introspection-plugin/tests/get_cells/get_cells.golden.txt rename to yosys-plugins/design_introspection/tests/get_cells/get_cells.golden.txt diff --git a/design_introspection-plugin/tests/get_cells/get_cells.tcl b/yosys-plugins/design_introspection/tests/get_cells/get_cells.tcl similarity index 100% rename from design_introspection-plugin/tests/get_cells/get_cells.tcl rename to yosys-plugins/design_introspection/tests/get_cells/get_cells.tcl diff --git a/design_introspection-plugin/tests/get_cells/get_cells.v b/yosys-plugins/design_introspection/tests/get_cells/get_cells.v similarity index 100% rename from design_introspection-plugin/tests/get_cells/get_cells.v rename to yosys-plugins/design_introspection/tests/get_cells/get_cells.v diff --git a/design_introspection-plugin/tests/get_count/Makefile b/yosys-plugins/design_introspection/tests/get_count/Makefile similarity index 100% rename from design_introspection-plugin/tests/get_count/Makefile rename to yosys-plugins/design_introspection/tests/get_count/Makefile diff --git a/design_introspection-plugin/tests/get_count/get_count.tcl b/yosys-plugins/design_introspection/tests/get_count/get_count.tcl similarity index 100% rename from design_introspection-plugin/tests/get_count/get_count.tcl rename to yosys-plugins/design_introspection/tests/get_count/get_count.tcl diff --git a/design_introspection-plugin/tests/get_count/get_count.v b/yosys-plugins/design_introspection/tests/get_count/get_count.v similarity index 100% rename from design_introspection-plugin/tests/get_count/get_count.v rename to yosys-plugins/design_introspection/tests/get_count/get_count.v diff --git a/design_introspection-plugin/tests/get_nets/get_nets.golden.txt b/yosys-plugins/design_introspection/tests/get_nets/get_nets.golden.txt similarity index 100% rename from design_introspection-plugin/tests/get_nets/get_nets.golden.txt rename to yosys-plugins/design_introspection/tests/get_nets/get_nets.golden.txt diff --git a/design_introspection-plugin/tests/get_nets/get_nets.tcl b/yosys-plugins/design_introspection/tests/get_nets/get_nets.tcl similarity index 100% rename from design_introspection-plugin/tests/get_nets/get_nets.tcl rename to yosys-plugins/design_introspection/tests/get_nets/get_nets.tcl diff --git a/design_introspection-plugin/tests/get_nets/get_nets.v b/yosys-plugins/design_introspection/tests/get_nets/get_nets.v similarity index 100% rename from design_introspection-plugin/tests/get_nets/get_nets.v rename to yosys-plugins/design_introspection/tests/get_nets/get_nets.v diff --git a/design_introspection-plugin/tests/get_pins/get_pins.golden.txt b/yosys-plugins/design_introspection/tests/get_pins/get_pins.golden.txt similarity index 100% rename from design_introspection-plugin/tests/get_pins/get_pins.golden.txt rename to yosys-plugins/design_introspection/tests/get_pins/get_pins.golden.txt diff --git a/design_introspection-plugin/tests/get_pins/get_pins.tcl b/yosys-plugins/design_introspection/tests/get_pins/get_pins.tcl similarity index 100% rename from design_introspection-plugin/tests/get_pins/get_pins.tcl rename to yosys-plugins/design_introspection/tests/get_pins/get_pins.tcl diff --git a/design_introspection-plugin/tests/get_pins/get_pins.v b/yosys-plugins/design_introspection/tests/get_pins/get_pins.v similarity index 100% rename from design_introspection-plugin/tests/get_pins/get_pins.v rename to yosys-plugins/design_introspection/tests/get_pins/get_pins.v diff --git a/design_introspection-plugin/tests/get_ports/get_ports.golden.txt b/yosys-plugins/design_introspection/tests/get_ports/get_ports.golden.txt similarity index 100% rename from design_introspection-plugin/tests/get_ports/get_ports.golden.txt rename to yosys-plugins/design_introspection/tests/get_ports/get_ports.golden.txt diff --git a/design_introspection-plugin/tests/get_ports/get_ports.tcl b/yosys-plugins/design_introspection/tests/get_ports/get_ports.tcl similarity index 100% rename from design_introspection-plugin/tests/get_ports/get_ports.tcl rename to yosys-plugins/design_introspection/tests/get_ports/get_ports.tcl diff --git a/design_introspection-plugin/tests/get_ports/get_ports.v b/yosys-plugins/design_introspection/tests/get_ports/get_ports.v similarity index 100% rename from design_introspection-plugin/tests/get_ports/get_ports.v rename to yosys-plugins/design_introspection/tests/get_ports/get_ports.v diff --git a/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt b/yosys-plugins/design_introspection/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt similarity index 100% rename from design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt rename to yosys-plugins/design_introspection/tests/selection_to_tcl_list/selection_to_tcl_list.golden.txt diff --git a/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.tcl b/yosys-plugins/design_introspection/tests/selection_to_tcl_list/selection_to_tcl_list.tcl similarity index 100% rename from design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.tcl rename to yosys-plugins/design_introspection/tests/selection_to_tcl_list/selection_to_tcl_list.tcl diff --git a/design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v b/yosys-plugins/design_introspection/tests/selection_to_tcl_list/selection_to_tcl_list.v similarity index 100% rename from design_introspection-plugin/tests/selection_to_tcl_list/selection_to_tcl_list.v rename to yosys-plugins/design_introspection/tests/selection_to_tcl_list/selection_to_tcl_list.v diff --git a/design_introspection-plugin/tests/trim_name/trim_name.test.cc b/yosys-plugins/design_introspection/tests/trim_name/trim_name.test.cc similarity index 94% rename from design_introspection-plugin/tests/trim_name/trim_name.test.cc rename to yosys-plugins/design_introspection/tests/trim_name/trim_name.test.cc index 5da264194..2ac3b3426 100644 --- a/design_introspection-plugin/tests/trim_name/trim_name.test.cc +++ b/yosys-plugins/design_introspection/tests/trim_name/trim_name.test.cc @@ -1,4 +1,4 @@ -#include "../common/utils.h" +#include "../utils.h" #include diff --git a/dsp-ff-plugin/Makefile b/yosys-plugins/dsp-ff/Makefile similarity index 100% rename from dsp-ff-plugin/Makefile rename to yosys-plugins/dsp-ff/Makefile diff --git a/dsp-ff-plugin/dsp_ff.cc b/yosys-plugins/dsp-ff/dsp_ff.cc similarity index 100% rename from dsp-ff-plugin/dsp_ff.cc rename to yosys-plugins/dsp-ff/dsp_ff.cc diff --git a/dsp-ff-plugin/nexus-dsp_rules.txt b/yosys-plugins/dsp-ff/nexus-dsp_rules.txt similarity index 100% rename from dsp-ff-plugin/nexus-dsp_rules.txt rename to yosys-plugins/dsp-ff/nexus-dsp_rules.txt diff --git a/dsp-ff-plugin/tests/Makefile b/yosys-plugins/dsp-ff/tests/Makefile similarity index 100% rename from dsp-ff-plugin/tests/Makefile rename to yosys-plugins/dsp-ff/tests/Makefile diff --git a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl b/yosys-plugins/dsp-ff/tests/nexus_conn_conflict/nexus_conn_conflict.tcl similarity index 100% rename from dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.tcl rename to yosys-plugins/dsp-ff/tests/nexus_conn_conflict/nexus_conn_conflict.tcl diff --git a/dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v b/yosys-plugins/dsp-ff/tests/nexus_conn_conflict/nexus_conn_conflict.v similarity index 100% rename from dsp-ff-plugin/tests/nexus_conn_conflict/nexus_conn_conflict.v rename to yosys-plugins/dsp-ff/tests/nexus_conn_conflict/nexus_conn_conflict.v diff --git a/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl b/yosys-plugins/dsp-ff/tests/nexus_conn_share/nexus_conn_share.tcl similarity index 100% rename from dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.tcl rename to yosys-plugins/dsp-ff/tests/nexus_conn_share/nexus_conn_share.tcl diff --git a/dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v b/yosys-plugins/dsp-ff/tests/nexus_conn_share/nexus_conn_share.v similarity index 100% rename from dsp-ff-plugin/tests/nexus_conn_share/nexus_conn_share.v rename to yosys-plugins/dsp-ff/tests/nexus_conn_share/nexus_conn_share.v diff --git a/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl b/yosys-plugins/dsp-ff/tests/nexus_fftypes/nexus_fftypes.tcl similarity index 100% rename from dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.tcl rename to yosys-plugins/dsp-ff/tests/nexus_fftypes/nexus_fftypes.tcl diff --git a/dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v b/yosys-plugins/dsp-ff/tests/nexus_fftypes/nexus_fftypes.v similarity index 100% rename from dsp-ff-plugin/tests/nexus_fftypes/nexus_fftypes.v rename to yosys-plugins/dsp-ff/tests/nexus_fftypes/nexus_fftypes.v diff --git a/dsp-ff-plugin/tests/nexus_mult/README.md b/yosys-plugins/dsp-ff/tests/nexus_mult/README.md similarity index 100% rename from dsp-ff-plugin/tests/nexus_mult/README.md rename to yosys-plugins/dsp-ff/tests/nexus_mult/README.md diff --git a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl b/yosys-plugins/dsp-ff/tests/nexus_mult/nexus_mult.tcl similarity index 100% rename from dsp-ff-plugin/tests/nexus_mult/nexus_mult.tcl rename to yosys-plugins/dsp-ff/tests/nexus_mult/nexus_mult.tcl diff --git a/dsp-ff-plugin/tests/nexus_mult/nexus_mult.v b/yosys-plugins/dsp-ff/tests/nexus_mult/nexus_mult.v similarity index 100% rename from dsp-ff-plugin/tests/nexus_mult/nexus_mult.v rename to yosys-plugins/dsp-ff/tests/nexus_mult/nexus_mult.v diff --git a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl b/yosys-plugins/dsp-ff/tests/nexus_mult_wide/nexus_mult_wide.tcl similarity index 100% rename from dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.tcl rename to yosys-plugins/dsp-ff/tests/nexus_mult_wide/nexus_mult_wide.tcl diff --git a/dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v b/yosys-plugins/dsp-ff/tests/nexus_mult_wide/nexus_mult_wide.v similarity index 100% rename from dsp-ff-plugin/tests/nexus_mult_wide/nexus_mult_wide.v rename to yosys-plugins/dsp-ff/tests/nexus_mult_wide/nexus_mult_wide.v diff --git a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl b/yosys-plugins/dsp-ff/tests/nexus_param_conflict/nexus_param_conflict.tcl similarity index 100% rename from dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.tcl rename to yosys-plugins/dsp-ff/tests/nexus_param_conflict/nexus_param_conflict.tcl diff --git a/dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v b/yosys-plugins/dsp-ff/tests/nexus_param_conflict/nexus_param_conflict.v similarity index 100% rename from dsp-ff-plugin/tests/nexus_param_conflict/nexus_param_conflict.v rename to yosys-plugins/dsp-ff/tests/nexus_param_conflict/nexus_param_conflict.v diff --git a/environment.yml b/yosys-plugins/environment.yml similarity index 100% rename from environment.yml rename to yosys-plugins/environment.yml diff --git a/fasm-plugin/Makefile b/yosys-plugins/fasm/Makefile similarity index 100% rename from fasm-plugin/Makefile rename to yosys-plugins/fasm/Makefile diff --git a/fasm-plugin/fasm.cc b/yosys-plugins/fasm/fasm.cc similarity index 98% rename from fasm-plugin/fasm.cc rename to yosys-plugins/fasm/fasm.cc index 135390fcb..c81d57f97 100644 --- a/fasm-plugin/fasm.cc +++ b/yosys-plugins/fasm/fasm.cc @@ -23,7 +23,7 @@ * annotations on the design cells. */ -#include "../common/bank_tiles.h" +#include "../bank_tiles.h" #include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h" diff --git a/fasm-plugin/tests/Makefile b/yosys-plugins/fasm/tests/Makefile similarity index 100% rename from fasm-plugin/tests/Makefile rename to yosys-plugins/fasm/tests/Makefile diff --git a/integrateinv-plugin/Makefile b/yosys-plugins/integrateinv/Makefile similarity index 100% rename from integrateinv-plugin/Makefile rename to yosys-plugins/integrateinv/Makefile diff --git a/integrateinv-plugin/integrateinv.cc b/yosys-plugins/integrateinv/integrateinv.cc similarity index 100% rename from integrateinv-plugin/integrateinv.cc rename to yosys-plugins/integrateinv/integrateinv.cc diff --git a/integrateinv-plugin/tests/.gitignore b/yosys-plugins/integrateinv/tests/.gitignore similarity index 100% rename from integrateinv-plugin/tests/.gitignore rename to yosys-plugins/integrateinv/tests/.gitignore diff --git a/integrateinv-plugin/tests/Makefile b/yosys-plugins/integrateinv/tests/Makefile similarity index 100% rename from integrateinv-plugin/tests/Makefile rename to yosys-plugins/integrateinv/tests/Makefile diff --git a/integrateinv-plugin/tests/fanout/fanout.tcl b/yosys-plugins/integrateinv/tests/fanout/fanout.tcl similarity index 100% rename from integrateinv-plugin/tests/fanout/fanout.tcl rename to yosys-plugins/integrateinv/tests/fanout/fanout.tcl diff --git a/integrateinv-plugin/tests/fanout/fanout.v b/yosys-plugins/integrateinv/tests/fanout/fanout.v similarity index 100% rename from integrateinv-plugin/tests/fanout/fanout.v rename to yosys-plugins/integrateinv/tests/fanout/fanout.v diff --git a/integrateinv-plugin/tests/hierarchy/hierarchy.tcl b/yosys-plugins/integrateinv/tests/hierarchy/hierarchy.tcl similarity index 100% rename from integrateinv-plugin/tests/hierarchy/hierarchy.tcl rename to yosys-plugins/integrateinv/tests/hierarchy/hierarchy.tcl diff --git a/integrateinv-plugin/tests/hierarchy/hierarchy.v b/yosys-plugins/integrateinv/tests/hierarchy/hierarchy.v similarity index 100% rename from integrateinv-plugin/tests/hierarchy/hierarchy.v rename to yosys-plugins/integrateinv/tests/hierarchy/hierarchy.v diff --git a/integrateinv-plugin/tests/multi_bit/multi_bit.tcl b/yosys-plugins/integrateinv/tests/multi_bit/multi_bit.tcl similarity index 100% rename from integrateinv-plugin/tests/multi_bit/multi_bit.tcl rename to yosys-plugins/integrateinv/tests/multi_bit/multi_bit.tcl diff --git a/integrateinv-plugin/tests/multi_bit/multi_bit.v b/yosys-plugins/integrateinv/tests/multi_bit/multi_bit.v similarity index 100% rename from integrateinv-plugin/tests/multi_bit/multi_bit.v rename to yosys-plugins/integrateinv/tests/multi_bit/multi_bit.v diff --git a/integrateinv-plugin/tests/single_bit/single_bit.tcl b/yosys-plugins/integrateinv/tests/single_bit/single_bit.tcl similarity index 100% rename from integrateinv-plugin/tests/single_bit/single_bit.tcl rename to yosys-plugins/integrateinv/tests/single_bit/single_bit.tcl diff --git a/integrateinv-plugin/tests/single_bit/single_bit.v b/yosys-plugins/integrateinv/tests/single_bit/single_bit.v similarity index 100% rename from integrateinv-plugin/tests/single_bit/single_bit.v rename to yosys-plugins/integrateinv/tests/single_bit/single_bit.v diff --git a/integrateinv-plugin/tests/toplevel/toplevel.tcl b/yosys-plugins/integrateinv/tests/toplevel/toplevel.tcl similarity index 100% rename from integrateinv-plugin/tests/toplevel/toplevel.tcl rename to yosys-plugins/integrateinv/tests/toplevel/toplevel.tcl diff --git a/integrateinv-plugin/tests/toplevel/toplevel.v b/yosys-plugins/integrateinv/tests/toplevel/toplevel.v similarity index 100% rename from integrateinv-plugin/tests/toplevel/toplevel.v rename to yosys-plugins/integrateinv/tests/toplevel/toplevel.v diff --git a/params-plugin/Makefile b/yosys-plugins/params/Makefile similarity index 100% rename from params-plugin/Makefile rename to yosys-plugins/params/Makefile diff --git a/params-plugin/params.cc b/yosys-plugins/params/params.cc similarity index 100% rename from params-plugin/params.cc rename to yosys-plugins/params/params.cc diff --git a/params-plugin/tests/Makefile b/yosys-plugins/params/tests/Makefile similarity index 100% rename from params-plugin/tests/Makefile rename to yosys-plugins/params/tests/Makefile diff --git a/params-plugin/tests/compare_output_json.py b/yosys-plugins/params/tests/compare_output_json.py similarity index 100% rename from params-plugin/tests/compare_output_json.py rename to yosys-plugins/params/tests/compare_output_json.py diff --git a/params-plugin/tests/pll/pll.golden.json b/yosys-plugins/params/tests/pll/pll.golden.json similarity index 100% rename from params-plugin/tests/pll/pll.golden.json rename to yosys-plugins/params/tests/pll/pll.golden.json diff --git a/params-plugin/tests/pll/pll.tcl b/yosys-plugins/params/tests/pll/pll.tcl similarity index 100% rename from params-plugin/tests/pll/pll.tcl rename to yosys-plugins/params/tests/pll/pll.tcl diff --git a/params-plugin/tests/pll/pll.v b/yosys-plugins/params/tests/pll/pll.v similarity index 100% rename from params-plugin/tests/pll/pll.v rename to yosys-plugins/params/tests/pll/pll.v diff --git a/params-plugin/tests/pll/pll.xdc b/yosys-plugins/params/tests/pll/pll.xdc similarity index 100% rename from params-plugin/tests/pll/pll.xdc rename to yosys-plugins/params/tests/pll/pll.xdc diff --git a/params-plugin/tests/pll/techmaps/cells_map.v b/yosys-plugins/params/tests/pll/techmaps/cells_map.v similarity index 100% rename from params-plugin/tests/pll/techmaps/cells_map.v rename to yosys-plugins/params/tests/pll/techmaps/cells_map.v diff --git a/params-plugin/tests/pll/techmaps/cells_sim.v b/yosys-plugins/params/tests/pll/techmaps/cells_sim.v similarity index 100% rename from params-plugin/tests/pll/techmaps/cells_sim.v rename to yosys-plugins/params/tests/pll/techmaps/cells_sim.v diff --git a/ql-iob-plugin/Makefile b/yosys-plugins/ql-iob/Makefile similarity index 100% rename from ql-iob-plugin/Makefile rename to yosys-plugins/ql-iob/Makefile diff --git a/ql-iob-plugin/README.md b/yosys-plugins/ql-iob/README.md similarity index 100% rename from ql-iob-plugin/README.md rename to yosys-plugins/ql-iob/README.md diff --git a/ql-iob-plugin/pcf_parser.cc b/yosys-plugins/ql-iob/pcf_parser.cc similarity index 100% rename from ql-iob-plugin/pcf_parser.cc rename to yosys-plugins/ql-iob/pcf_parser.cc diff --git a/ql-iob-plugin/pcf_parser.hh b/yosys-plugins/ql-iob/pcf_parser.hh similarity index 100% rename from ql-iob-plugin/pcf_parser.hh rename to yosys-plugins/ql-iob/pcf_parser.hh diff --git a/ql-iob-plugin/pinmap_parser.cc b/yosys-plugins/ql-iob/pinmap_parser.cc similarity index 100% rename from ql-iob-plugin/pinmap_parser.cc rename to yosys-plugins/ql-iob/pinmap_parser.cc diff --git a/ql-iob-plugin/pinmap_parser.hh b/yosys-plugins/ql-iob/pinmap_parser.hh similarity index 100% rename from ql-iob-plugin/pinmap_parser.hh rename to yosys-plugins/ql-iob/pinmap_parser.hh diff --git a/ql-iob-plugin/ql-iob.cc b/yosys-plugins/ql-iob/ql-iob.cc similarity index 100% rename from ql-iob-plugin/ql-iob.cc rename to yosys-plugins/ql-iob/ql-iob.cc diff --git a/ql-iob-plugin/tests/.gitignore b/yosys-plugins/ql-iob/tests/.gitignore similarity index 100% rename from ql-iob-plugin/tests/.gitignore rename to yosys-plugins/ql-iob/tests/.gitignore diff --git a/ql-iob-plugin/tests/Makefile b/yosys-plugins/ql-iob/tests/Makefile similarity index 100% rename from ql-iob-plugin/tests/Makefile rename to yosys-plugins/ql-iob/tests/Makefile diff --git a/ql-iob-plugin/tests/ckpad/Makefile b/yosys-plugins/ql-iob/tests/ckpad/Makefile similarity index 100% rename from ql-iob-plugin/tests/ckpad/Makefile rename to yosys-plugins/ql-iob/tests/ckpad/Makefile diff --git a/ql-iob-plugin/tests/ckpad/design.pcf b/yosys-plugins/ql-iob/tests/ckpad/design.pcf similarity index 100% rename from ql-iob-plugin/tests/ckpad/design.pcf rename to yosys-plugins/ql-iob/tests/ckpad/design.pcf diff --git a/ql-iob-plugin/tests/ckpad/design.v b/yosys-plugins/ql-iob/tests/ckpad/design.v similarity index 100% rename from ql-iob-plugin/tests/ckpad/design.v rename to yosys-plugins/ql-iob/tests/ckpad/design.v diff --git a/ql-iob-plugin/tests/ckpad/script.ys b/yosys-plugins/ql-iob/tests/ckpad/script.ys similarity index 100% rename from ql-iob-plugin/tests/ckpad/script.ys rename to yosys-plugins/ql-iob/tests/ckpad/script.ys diff --git a/ql-iob-plugin/tests/common/pp3_cells_map.v b/yosys-plugins/ql-iob/tests/common/pp3_cells_map.v similarity index 100% rename from ql-iob-plugin/tests/common/pp3_cells_map.v rename to yosys-plugins/ql-iob/tests/common/pp3_cells_map.v diff --git a/ql-iob-plugin/tests/common/pp3_cells_sim.v b/yosys-plugins/ql-iob/tests/common/pp3_cells_sim.v similarity index 100% rename from ql-iob-plugin/tests/common/pp3_cells_sim.v rename to yosys-plugins/ql-iob/tests/common/pp3_cells_sim.v diff --git a/ql-iob-plugin/tests/pinmap.csv b/yosys-plugins/ql-iob/tests/pinmap.csv similarity index 100% rename from ql-iob-plugin/tests/pinmap.csv rename to yosys-plugins/ql-iob/tests/pinmap.csv diff --git a/ql-iob-plugin/tests/sdiomux/Makefile b/yosys-plugins/ql-iob/tests/sdiomux/Makefile similarity index 100% rename from ql-iob-plugin/tests/sdiomux/Makefile rename to yosys-plugins/ql-iob/tests/sdiomux/Makefile diff --git a/ql-iob-plugin/tests/sdiomux/design.pcf b/yosys-plugins/ql-iob/tests/sdiomux/design.pcf similarity index 100% rename from ql-iob-plugin/tests/sdiomux/design.pcf rename to yosys-plugins/ql-iob/tests/sdiomux/design.pcf diff --git a/ql-iob-plugin/tests/sdiomux/design.v b/yosys-plugins/ql-iob/tests/sdiomux/design.v similarity index 100% rename from ql-iob-plugin/tests/sdiomux/design.v rename to yosys-plugins/ql-iob/tests/sdiomux/design.v diff --git a/ql-iob-plugin/tests/sdiomux/script.ys b/yosys-plugins/ql-iob/tests/sdiomux/script.ys similarity index 100% rename from ql-iob-plugin/tests/sdiomux/script.ys rename to yosys-plugins/ql-iob/tests/sdiomux/script.ys diff --git a/ql-qlf-plugin/Makefile b/yosys-plugins/ql-qlf/Makefile similarity index 100% rename from ql-qlf-plugin/Makefile rename to yosys-plugins/ql-qlf/Makefile diff --git a/ql-qlf-plugin/common/cells_sim.v b/yosys-plugins/ql-qlf/common/cells_sim.v similarity index 100% rename from ql-qlf-plugin/common/cells_sim.v rename to yosys-plugins/ql-qlf/common/cells_sim.v diff --git a/ql-qlf-plugin/pp3/abc9_map.v b/yosys-plugins/ql-qlf/pp3/abc9_map.v similarity index 100% rename from ql-qlf-plugin/pp3/abc9_map.v rename to yosys-plugins/ql-qlf/pp3/abc9_map.v diff --git a/ql-qlf-plugin/pp3/abc9_model.v b/yosys-plugins/ql-qlf/pp3/abc9_model.v similarity index 100% rename from ql-qlf-plugin/pp3/abc9_model.v rename to yosys-plugins/ql-qlf/pp3/abc9_model.v diff --git a/ql-qlf-plugin/pp3/abc9_unmap.v b/yosys-plugins/ql-qlf/pp3/abc9_unmap.v similarity index 100% rename from ql-qlf-plugin/pp3/abc9_unmap.v rename to yosys-plugins/ql-qlf/pp3/abc9_unmap.v diff --git a/ql-qlf-plugin/pp3/bram_init_32.vh b/yosys-plugins/ql-qlf/pp3/bram_init_32.vh similarity index 100% rename from ql-qlf-plugin/pp3/bram_init_32.vh rename to yosys-plugins/ql-qlf/pp3/bram_init_32.vh diff --git a/ql-qlf-plugin/pp3/bram_init_8_16.vh b/yosys-plugins/ql-qlf/pp3/bram_init_8_16.vh similarity index 100% rename from ql-qlf-plugin/pp3/bram_init_8_16.vh rename to yosys-plugins/ql-qlf/pp3/bram_init_8_16.vh diff --git a/ql-qlf-plugin/pp3/brams.txt b/yosys-plugins/ql-qlf/pp3/brams.txt similarity index 100% rename from ql-qlf-plugin/pp3/brams.txt rename to yosys-plugins/ql-qlf/pp3/brams.txt diff --git a/ql-qlf-plugin/pp3/brams_map.v b/yosys-plugins/ql-qlf/pp3/brams_map.v similarity index 100% rename from ql-qlf-plugin/pp3/brams_map.v rename to yosys-plugins/ql-qlf/pp3/brams_map.v diff --git a/ql-qlf-plugin/pp3/brams_sim.v b/yosys-plugins/ql-qlf/pp3/brams_sim.v similarity index 100% rename from ql-qlf-plugin/pp3/brams_sim.v rename to yosys-plugins/ql-qlf/pp3/brams_sim.v diff --git a/ql-qlf-plugin/pp3/cells_map.v b/yosys-plugins/ql-qlf/pp3/cells_map.v similarity index 100% rename from ql-qlf-plugin/pp3/cells_map.v rename to yosys-plugins/ql-qlf/pp3/cells_map.v diff --git a/ql-qlf-plugin/pp3/cells_sim.v b/yosys-plugins/ql-qlf/pp3/cells_sim.v similarity index 100% rename from ql-qlf-plugin/pp3/cells_sim.v rename to yosys-plugins/ql-qlf/pp3/cells_sim.v diff --git a/ql-qlf-plugin/pp3/ffs_map.v b/yosys-plugins/ql-qlf/pp3/ffs_map.v similarity index 100% rename from ql-qlf-plugin/pp3/ffs_map.v rename to yosys-plugins/ql-qlf/pp3/ffs_map.v diff --git a/ql-qlf-plugin/pp3/latches_map.v b/yosys-plugins/ql-qlf/pp3/latches_map.v similarity index 100% rename from ql-qlf-plugin/pp3/latches_map.v rename to yosys-plugins/ql-qlf/pp3/latches_map.v diff --git a/ql-qlf-plugin/pp3/lut_map.v b/yosys-plugins/ql-qlf/pp3/lut_map.v similarity index 100% rename from ql-qlf-plugin/pp3/lut_map.v rename to yosys-plugins/ql-qlf/pp3/lut_map.v diff --git a/ql-qlf-plugin/pp3/lutdefs.txt b/yosys-plugins/ql-qlf/pp3/lutdefs.txt similarity index 100% rename from ql-qlf-plugin/pp3/lutdefs.txt rename to yosys-plugins/ql-qlf/pp3/lutdefs.txt diff --git a/ql-qlf-plugin/pp3/mult_sim.v b/yosys-plugins/ql-qlf/pp3/mult_sim.v similarity index 100% rename from ql-qlf-plugin/pp3/mult_sim.v rename to yosys-plugins/ql-qlf/pp3/mult_sim.v diff --git a/ql-qlf-plugin/pp3/qlal3_sim.v b/yosys-plugins/ql-qlf/pp3/qlal3_sim.v similarity index 100% rename from ql-qlf-plugin/pp3/qlal3_sim.v rename to yosys-plugins/ql-qlf/pp3/qlal3_sim.v diff --git a/ql-qlf-plugin/pp3/qlal4s3b_sim.v b/yosys-plugins/ql-qlf/pp3/qlal4s3b_sim.v similarity index 100% rename from ql-qlf-plugin/pp3/qlal4s3b_sim.v rename to yosys-plugins/ql-qlf/pp3/qlal4s3b_sim.v diff --git a/ql-qlf-plugin/pp3_braminit.cc b/yosys-plugins/ql-qlf/pp3_braminit.cc similarity index 100% rename from ql-qlf-plugin/pp3_braminit.cc rename to yosys-plugins/ql-qlf/pp3_braminit.cc diff --git a/ql-qlf-plugin/ql-bram-asymmetric-wider-read.pmg b/yosys-plugins/ql-qlf/ql-bram-asymmetric-wider-read.pmg similarity index 100% rename from ql-qlf-plugin/ql-bram-asymmetric-wider-read.pmg rename to yosys-plugins/ql-qlf/ql-bram-asymmetric-wider-read.pmg diff --git a/ql-qlf-plugin/ql-bram-asymmetric-wider-write.pmg b/yosys-plugins/ql-qlf/ql-bram-asymmetric-wider-write.pmg similarity index 100% rename from ql-qlf-plugin/ql-bram-asymmetric-wider-write.pmg rename to yosys-plugins/ql-qlf/ql-bram-asymmetric-wider-write.pmg diff --git a/ql-qlf-plugin/ql-bram-asymmetric.cc b/yosys-plugins/ql-qlf/ql-bram-asymmetric.cc similarity index 100% rename from ql-qlf-plugin/ql-bram-asymmetric.cc rename to yosys-plugins/ql-qlf/ql-bram-asymmetric.cc diff --git a/ql-qlf-plugin/ql-bram-split.cc b/yosys-plugins/ql-qlf/ql-bram-split.cc similarity index 100% rename from ql-qlf-plugin/ql-bram-split.cc rename to yosys-plugins/ql-qlf/ql-bram-split.cc diff --git a/ql-qlf-plugin/ql-dsp-io-regs.cc b/yosys-plugins/ql-qlf/ql-dsp-io-regs.cc similarity index 100% rename from ql-qlf-plugin/ql-dsp-io-regs.cc rename to yosys-plugins/ql-qlf/ql-dsp-io-regs.cc diff --git a/ql-qlf-plugin/ql-dsp-macc.cc b/yosys-plugins/ql-qlf/ql-dsp-macc.cc similarity index 100% rename from ql-qlf-plugin/ql-dsp-macc.cc rename to yosys-plugins/ql-qlf/ql-dsp-macc.cc diff --git a/ql-qlf-plugin/ql-dsp-macc.pmg b/yosys-plugins/ql-qlf/ql-dsp-macc.pmg similarity index 100% rename from ql-qlf-plugin/ql-dsp-macc.pmg rename to yosys-plugins/ql-qlf/ql-dsp-macc.pmg diff --git a/ql-qlf-plugin/ql-dsp-simd.cc b/yosys-plugins/ql-qlf/ql-dsp-simd.cc similarity index 100% rename from ql-qlf-plugin/ql-dsp-simd.cc rename to yosys-plugins/ql-qlf/ql-dsp-simd.cc diff --git a/ql-qlf-plugin/ql-dsp.cc b/yosys-plugins/ql-qlf/ql-dsp.cc similarity index 100% rename from ql-qlf-plugin/ql-dsp.cc rename to yosys-plugins/ql-qlf/ql-dsp.cc diff --git a/ql-qlf-plugin/ql-edif.cc b/yosys-plugins/ql-qlf/ql-edif.cc similarity index 100% rename from ql-qlf-plugin/ql-edif.cc rename to yosys-plugins/ql-qlf/ql-edif.cc diff --git a/ql-qlf-plugin/ql_dsp.pmg b/yosys-plugins/ql-qlf/ql_dsp.pmg similarity index 100% rename from ql-qlf-plugin/ql_dsp.pmg rename to yosys-plugins/ql-qlf/ql_dsp.pmg diff --git a/ql-qlf-plugin/qlf_k4n8/arith_map.v b/yosys-plugins/ql-qlf/qlf_k4n8/arith_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k4n8/arith_map.v rename to yosys-plugins/ql-qlf/qlf_k4n8/arith_map.v diff --git a/ql-qlf-plugin/qlf_k4n8/cells_sim.v b/yosys-plugins/ql-qlf/qlf_k4n8/cells_sim.v similarity index 100% rename from ql-qlf-plugin/qlf_k4n8/cells_sim.v rename to yosys-plugins/ql-qlf/qlf_k4n8/cells_sim.v diff --git a/ql-qlf-plugin/qlf_k4n8/ffs_map.v b/yosys-plugins/ql-qlf/qlf_k4n8/ffs_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k4n8/ffs_map.v rename to yosys-plugins/ql-qlf/qlf_k4n8/ffs_map.v diff --git a/ql-qlf-plugin/qlf_k6n10/arith_map.v b/yosys-plugins/ql-qlf/qlf_k6n10/arith_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10/arith_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10/arith_map.v diff --git a/ql-qlf-plugin/qlf_k6n10/brams.txt b/yosys-plugins/ql-qlf/qlf_k6n10/brams.txt similarity index 100% rename from ql-qlf-plugin/qlf_k6n10/brams.txt rename to yosys-plugins/ql-qlf/qlf_k6n10/brams.txt diff --git a/ql-qlf-plugin/qlf_k6n10/brams_map.v b/yosys-plugins/ql-qlf/qlf_k6n10/brams_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10/brams_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10/brams_map.v diff --git a/ql-qlf-plugin/qlf_k6n10/cells_sim.v b/yosys-plugins/ql-qlf/qlf_k6n10/cells_sim.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10/cells_sim.v rename to yosys-plugins/ql-qlf/qlf_k6n10/cells_sim.v diff --git a/ql-qlf-plugin/qlf_k6n10/dsp_map.v b/yosys-plugins/ql-qlf/qlf_k6n10/dsp_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10/dsp_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10/dsp_map.v diff --git a/ql-qlf-plugin/qlf_k6n10/ffs_map.v b/yosys-plugins/ql-qlf/qlf_k6n10/ffs_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10/ffs_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10/ffs_map.v diff --git a/ql-qlf-plugin/qlf_k6n10/lut_map.v b/yosys-plugins/ql-qlf/qlf_k6n10/lut_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10/lut_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10/lut_map.v diff --git a/ql-qlf-plugin/qlf_k6n10f/TDP18K_FIFO.v b/yosys-plugins/ql-qlf/qlf_k6n10f/TDP18K_FIFO.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/TDP18K_FIFO.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/TDP18K_FIFO.v diff --git a/ql-qlf-plugin/qlf_k6n10f/arith_map.v b/yosys-plugins/ql-qlf/qlf_k6n10f/arith_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/arith_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/arith_map.v diff --git a/ql-qlf-plugin/qlf_k6n10f/brams.txt b/yosys-plugins/ql-qlf/qlf_k6n10f/brams.txt similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/brams.txt rename to yosys-plugins/ql-qlf/qlf_k6n10f/brams.txt diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_final_map.v b/yosys-plugins/ql-qlf/qlf_k6n10f/brams_final_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/brams_final_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/brams_final_map.v diff --git a/ql-qlf-plugin/qlf_k6n10f/brams_map.v b/yosys-plugins/ql-qlf/qlf_k6n10f/brams_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/brams_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/brams_map.v diff --git a/ql-qlf-plugin/qlf_k6n10f/cells_sim.v b/yosys-plugins/ql-qlf/qlf_k6n10f/cells_sim.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/cells_sim.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/cells_sim.v diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v b/yosys-plugins/ql-qlf/qlf_k6n10f/dsp_final_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/dsp_final_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/dsp_final_map.v diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_map.v b/yosys-plugins/ql-qlf/qlf_k6n10f/dsp_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/dsp_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/dsp_map.v diff --git a/ql-qlf-plugin/qlf_k6n10f/dsp_sim.v b/yosys-plugins/ql-qlf/qlf_k6n10f/dsp_sim.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/dsp_sim.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/dsp_sim.v diff --git a/ql-qlf-plugin/qlf_k6n10f/ffs_map.v b/yosys-plugins/ql-qlf/qlf_k6n10f/ffs_map.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/ffs_map.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/ffs_map.v diff --git a/ql-qlf-plugin/qlf_k6n10f/sram1024x18.v b/yosys-plugins/ql-qlf/qlf_k6n10f/sram1024x18.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/sram1024x18.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/sram1024x18.v diff --git a/ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v b/yosys-plugins/ql-qlf/qlf_k6n10f/ufifo_ctl.v similarity index 100% rename from ql-qlf-plugin/qlf_k6n10f/ufifo_ctl.v rename to yosys-plugins/ql-qlf/qlf_k6n10f/ufifo_ctl.v diff --git a/ql-qlf-plugin/quicklogic_eqn.cc b/yosys-plugins/ql-qlf/quicklogic_eqn.cc similarity index 100% rename from ql-qlf-plugin/quicklogic_eqn.cc rename to yosys-plugins/ql-qlf/quicklogic_eqn.cc diff --git a/ql-qlf-plugin/synth_quicklogic.cc b/yosys-plugins/ql-qlf/synth_quicklogic.cc similarity index 100% rename from ql-qlf-plugin/synth_quicklogic.cc rename to yosys-plugins/ql-qlf/synth_quicklogic.cc diff --git a/ql-qlf-plugin/tests/.gitignore b/yosys-plugins/ql-qlf/tests/.gitignore similarity index 100% rename from ql-qlf-plugin/tests/.gitignore rename to yosys-plugins/ql-qlf/tests/.gitignore diff --git a/ql-qlf-plugin/tests/Makefile b/yosys-plugins/ql-qlf/tests/Makefile similarity index 100% rename from ql-qlf-plugin/tests/Makefile rename to yosys-plugins/ql-qlf/tests/Makefile diff --git a/ql-qlf-plugin/tests/consts/consts.tcl b/yosys-plugins/ql-qlf/tests/consts/consts.tcl similarity index 100% rename from ql-qlf-plugin/tests/consts/consts.tcl rename to yosys-plugins/ql-qlf/tests/consts/consts.tcl diff --git a/ql-qlf-plugin/tests/consts/consts.v b/yosys-plugins/ql-qlf/tests/consts/consts.v similarity index 100% rename from ql-qlf-plugin/tests/consts/consts.v rename to yosys-plugins/ql-qlf/tests/consts/consts.v diff --git a/ql-qlf-plugin/tests/dffs/dffs.tcl b/yosys-plugins/ql-qlf/tests/dffs/dffs.tcl similarity index 100% rename from ql-qlf-plugin/tests/dffs/dffs.tcl rename to yosys-plugins/ql-qlf/tests/dffs/dffs.tcl diff --git a/ql-qlf-plugin/tests/dffs/dffs.v b/yosys-plugins/ql-qlf/tests/dffs/dffs.v similarity index 100% rename from ql-qlf-plugin/tests/dffs/dffs.v rename to yosys-plugins/ql-qlf/tests/dffs/dffs.v diff --git a/ql-qlf-plugin/tests/fsm/fsm.tcl b/yosys-plugins/ql-qlf/tests/fsm/fsm.tcl similarity index 100% rename from ql-qlf-plugin/tests/fsm/fsm.tcl rename to yosys-plugins/ql-qlf/tests/fsm/fsm.tcl diff --git a/ql-qlf-plugin/tests/fsm/fsm.v b/yosys-plugins/ql-qlf/tests/fsm/fsm.v similarity index 100% rename from ql-qlf-plugin/tests/fsm/fsm.v rename to yosys-plugins/ql-qlf/tests/fsm/fsm.v diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.tcl b/yosys-plugins/ql-qlf/tests/full_adder/full_adder.tcl similarity index 100% rename from ql-qlf-plugin/tests/full_adder/full_adder.tcl rename to yosys-plugins/ql-qlf/tests/full_adder/full_adder.tcl diff --git a/ql-qlf-plugin/tests/full_adder/full_adder.v b/yosys-plugins/ql-qlf/tests/full_adder/full_adder.v similarity index 100% rename from ql-qlf-plugin/tests/full_adder/full_adder.v rename to yosys-plugins/ql-qlf/tests/full_adder/full_adder.v diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl b/yosys-plugins/ql-qlf/tests/iob_no_flatten/iob_no_flatten.tcl similarity index 100% rename from ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.tcl rename to yosys-plugins/ql-qlf/tests/iob_no_flatten/iob_no_flatten.tcl diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v b/yosys-plugins/ql-qlf/tests/iob_no_flatten/iob_no_flatten.v similarity index 100% rename from ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.v rename to yosys-plugins/ql-qlf/tests/iob_no_flatten/iob_no_flatten.v diff --git a/ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.ys b/yosys-plugins/ql-qlf/tests/iob_no_flatten/iob_no_flatten.ys similarity index 100% rename from ql-qlf-plugin/tests/iob_no_flatten/iob_no_flatten.ys rename to yosys-plugins/ql-qlf/tests/iob_no_flatten/iob_no_flatten.ys diff --git a/ql-qlf-plugin/tests/latches/latches.tcl b/yosys-plugins/ql-qlf/tests/latches/latches.tcl similarity index 100% rename from ql-qlf-plugin/tests/latches/latches.tcl rename to yosys-plugins/ql-qlf/tests/latches/latches.tcl diff --git a/ql-qlf-plugin/tests/latches/latches.v b/yosys-plugins/ql-qlf/tests/latches/latches.v similarity index 100% rename from ql-qlf-plugin/tests/latches/latches.v rename to yosys-plugins/ql-qlf/tests/latches/latches.v diff --git a/ql-qlf-plugin/tests/logic/logic.tcl b/yosys-plugins/ql-qlf/tests/logic/logic.tcl similarity index 100% rename from ql-qlf-plugin/tests/logic/logic.tcl rename to yosys-plugins/ql-qlf/tests/logic/logic.tcl diff --git a/ql-qlf-plugin/tests/logic/logic.v b/yosys-plugins/ql-qlf/tests/logic/logic.v similarity index 100% rename from ql-qlf-plugin/tests/logic/logic.v rename to yosys-plugins/ql-qlf/tests/logic/logic.v diff --git a/ql-qlf-plugin/tests/logic/logic.ys b/yosys-plugins/ql-qlf/tests/logic/logic.ys similarity index 100% rename from ql-qlf-plugin/tests/logic/logic.ys rename to yosys-plugins/ql-qlf/tests/logic/logic.ys diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.tcl b/yosys-plugins/ql-qlf/tests/mac_unit/mac_unit.tcl similarity index 100% rename from ql-qlf-plugin/tests/mac_unit/mac_unit.tcl rename to yosys-plugins/ql-qlf/tests/mac_unit/mac_unit.tcl diff --git a/ql-qlf-plugin/tests/mac_unit/mac_unit.v b/yosys-plugins/ql-qlf/tests/mac_unit/mac_unit.v similarity index 100% rename from ql-qlf-plugin/tests/mac_unit/mac_unit.v rename to yosys-plugins/ql-qlf/tests/mac_unit/mac_unit.v diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.tcl b/yosys-plugins/ql-qlf/tests/multiplier/multiplier.tcl similarity index 100% rename from ql-qlf-plugin/tests/multiplier/multiplier.tcl rename to yosys-plugins/ql-qlf/tests/multiplier/multiplier.tcl diff --git a/ql-qlf-plugin/tests/multiplier/multiplier.v b/yosys-plugins/ql-qlf/tests/multiplier/multiplier.v similarity index 100% rename from ql-qlf-plugin/tests/multiplier/multiplier.v rename to yosys-plugins/ql-qlf/tests/multiplier/multiplier.v diff --git a/ql-qlf-plugin/tests/mux/mux.tcl b/yosys-plugins/ql-qlf/tests/mux/mux.tcl similarity index 100% rename from ql-qlf-plugin/tests/mux/mux.tcl rename to yosys-plugins/ql-qlf/tests/mux/mux.tcl diff --git a/ql-qlf-plugin/tests/mux/mux.v b/yosys-plugins/ql-qlf/tests/mux/mux.v similarity index 100% rename from ql-qlf-plugin/tests/mux/mux.v rename to yosys-plugins/ql-qlf/tests/mux/mux.v diff --git a/ql-qlf-plugin/tests/pp3_bram/init.txt b/yosys-plugins/ql-qlf/tests/pp3_bram/init.txt similarity index 100% rename from ql-qlf-plugin/tests/pp3_bram/init.txt rename to yosys-plugins/ql-qlf/tests/pp3_bram/init.txt diff --git a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl b/yosys-plugins/ql-qlf/tests/pp3_bram/pp3_bram.tcl similarity index 100% rename from ql-qlf-plugin/tests/pp3_bram/pp3_bram.tcl rename to yosys-plugins/ql-qlf/tests/pp3_bram/pp3_bram.tcl diff --git a/ql-qlf-plugin/tests/pp3_bram/pp3_bram.v b/yosys-plugins/ql-qlf/tests/pp3_bram/pp3_bram.v similarity index 100% rename from ql-qlf-plugin/tests/pp3_bram/pp3_bram.v rename to yosys-plugins/ql-qlf/tests/pp3_bram/pp3_bram.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10_bram/bram.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10_bram/bram.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10_bram/bram.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10_bram/bram.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10_bram/bram.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.ys b/yosys-plugins/ql-qlf/tests/qlf_k6n10_bram/bram.ys similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10_bram/bram.ys rename to yosys-plugins/ql-qlf/tests/qlf_k6n10_bram/bram.ys diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_read/bram_asymmetric_wider_read.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/Makefile b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/Makefile similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/Makefile rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/Makefile diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/bram_asymmetric_wider_read_tb.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/bram_asymmetric_wider_read_tb.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/bram_asymmetric_wider_read_tb.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_read/sim/bram_asymmetric_wider_read_tb.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_write/bram_asymmetric_wider_write.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/Makefile b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/Makefile similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/Makefile rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/Makefile diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/bram_asymmetric_wider_write_tb.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/bram_asymmetric_wider_write_tb.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/bram_asymmetric_wider_write_tb.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_asymmetric_wider_write/sim/bram_asymmetric_wider_write_tb.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp/bram_sdp.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp/bram_sdp.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/bram_sdp.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp/bram_sdp.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp/sim/Makefile similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/Makefile rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp/sim/Makefile diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp/sim/bram_sdp_tb.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp_split/bram_sdp_split.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/sim/Makefile b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp_split/sim/Makefile similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/sim/Makefile rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp_split/sim/Makefile diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/sim/bram_sdp_split_tb.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp_split/sim/bram_sdp_split_tb.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_sdp_split/sim/bram_sdp_split_tb.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_sdp_split/sim/bram_sdp_split_tb.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp/bram_tdp.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp/bram_tdp.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/bram_tdp.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp/bram_tdp.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp/sim/Makefile similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/Makefile rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp/sim/Makefile diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp/sim/bram_tdp_tb.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp_split/bram_tdp_split.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp_split/sim/Makefile diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/bram_tdp_split_tb.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp_split/sim/bram_tdp_split_tb.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/bram_tdp_split/sim/bram_tdp_split_tb.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/bram_tdp_split/sim/bram_tdp_split_tb.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_macc/dsp_macc.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_macc/dsp_macc.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_macc/dsp_macc.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_macc/dsp_macc.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_madd/dsp_madd.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_madd/dsp_madd.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_madd/dsp_madd.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_madd/dsp_madd.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult/dsp_mult.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult/dsp_mult.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult/dsp_mult.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult/dsp_mult.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult_post_synth_sim/dsp_mult_post_synth_sim.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/Makefile b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/Makefile similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/Makefile rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/Makefile diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/dsp_mult_post_synth_sim_tb.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/dsp_mult_post_synth_sim_tb.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/dsp_mult_post_synth_sim_tb.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_mult_post_synth_sim/sim/dsp_mult_post_synth_sim_tb.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd/dsp_simd.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd/dsp_simd.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd/dsp_simd.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd/dsp_simd.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.tcl diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd_post_synth_sim/dsp_simd_post_synth_sim.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/Makefile b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/Makefile similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/Makefile rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/Makefile diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/dsp_simd_post_synth_sim_tb.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/dsp_simd_post_synth_sim_tb.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/dsp_simd_post_synth_sim_tb.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/dsp_simd_post_synth_sim/sim/dsp_simd_post_synth_sim_tb.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_ports/sim_dsp_fir_cfg_ports.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_fir_cfg_ports/sim_dsp_fir_cfg_ports.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_ports/sim_dsp_fir_cfg_ports.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_fir_cfg_ports/sim_dsp_fir_cfg_ports.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_params/sim_dsp_mult_cfg_params.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_mult_cfg_params/sim_dsp_mult_cfg_params.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_params/sim_dsp_mult_cfg_params.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_mult_cfg_params/sim_dsp_mult_cfg_params.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_ports/sim_dsp_mult_cfg_ports.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_mult_cfg_ports/sim_dsp_mult_cfg_ports.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_cfg_ports/sim_dsp_mult_cfg_ports.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_mult_cfg_ports/sim_dsp_mult_cfg_ports.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_params/sim_dsp_mult_r_cfg_params.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_params/sim_dsp_mult_r_cfg_params.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_params/sim_dsp_mult_r_cfg_params.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_params/sim_dsp_mult_r_cfg_params.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_ports/sim_dsp_mult_r_cfg_ports.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_ports/sim_dsp_mult_r_cfg_ports.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_ports/sim_dsp_mult_r_cfg_ports.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_mult_r_cfg_ports/sim_dsp_mult_r_cfg_ports.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_params/sim_dsp_simd_cfg_params.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_simd_cfg_params/sim_dsp_simd_cfg_params.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_params/sim_dsp_simd_cfg_params.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_simd_cfg_params/sim_dsp_simd_cfg_params.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_ports/sim_dsp_simd_cfg_ports.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_simd_cfg_ports/sim_dsp_simd_cfg_ports.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_simd_cfg_ports/sim_dsp_simd_cfg_ports.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_dsp_simd_cfg_ports/sim_dsp_simd_cfg_ports.v diff --git a/ql-qlf-plugin/tests/qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v b/yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v similarity index 100% rename from ql-qlf-plugin/tests/qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v rename to yosys-plugins/ql-qlf/tests/qlf_k6n10f/sim_tc36fifo/sim_tc36fifo.v diff --git a/ql-qlf-plugin/tests/shreg/shreg.tcl b/yosys-plugins/ql-qlf/tests/shreg/shreg.tcl similarity index 100% rename from ql-qlf-plugin/tests/shreg/shreg.tcl rename to yosys-plugins/ql-qlf/tests/shreg/shreg.tcl diff --git a/ql-qlf-plugin/tests/shreg/shreg.v b/yosys-plugins/ql-qlf/tests/shreg/shreg.v similarity index 100% rename from ql-qlf-plugin/tests/shreg/shreg.v rename to yosys-plugins/ql-qlf/tests/shreg/shreg.v diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.tcl b/yosys-plugins/ql-qlf/tests/tribuf/tribuf.tcl similarity index 100% rename from ql-qlf-plugin/tests/tribuf/tribuf.tcl rename to yosys-plugins/ql-qlf/tests/tribuf/tribuf.tcl diff --git a/ql-qlf-plugin/tests/tribuf/tribuf.v b/yosys-plugins/ql-qlf/tests/tribuf/tribuf.v similarity index 100% rename from ql-qlf-plugin/tests/tribuf/tribuf.v rename to yosys-plugins/ql-qlf/tests/tribuf/tribuf.v diff --git a/yosys-plugins/requirements.txt b/yosys-plugins/requirements.txt new file mode 100644 index 000000000..ba26f044d --- /dev/null +++ b/yosys-plugins/requirements.txt @@ -0,0 +1 @@ +# make-env needs a requirements.txt file, even though it's empty diff --git a/sdc-plugin/Makefile b/yosys-plugins/sdc/Makefile similarity index 100% rename from sdc-plugin/Makefile rename to yosys-plugins/sdc/Makefile diff --git a/sdc-plugin/buffers.cc b/yosys-plugins/sdc/buffers.cc similarity index 100% rename from sdc-plugin/buffers.cc rename to yosys-plugins/sdc/buffers.cc diff --git a/sdc-plugin/buffers.h b/yosys-plugins/sdc/buffers.h similarity index 100% rename from sdc-plugin/buffers.h rename to yosys-plugins/sdc/buffers.h diff --git a/sdc-plugin/clocks.cc b/yosys-plugins/sdc/clocks.cc similarity index 100% rename from sdc-plugin/clocks.cc rename to yosys-plugins/sdc/clocks.cc diff --git a/sdc-plugin/clocks.h b/yosys-plugins/sdc/clocks.h similarity index 100% rename from sdc-plugin/clocks.h rename to yosys-plugins/sdc/clocks.h diff --git a/sdc-plugin/propagation.cc b/yosys-plugins/sdc/propagation.cc similarity index 100% rename from sdc-plugin/propagation.cc rename to yosys-plugins/sdc/propagation.cc diff --git a/sdc-plugin/propagation.h b/yosys-plugins/sdc/propagation.h similarity index 100% rename from sdc-plugin/propagation.h rename to yosys-plugins/sdc/propagation.h diff --git a/sdc-plugin/sdc.cc b/yosys-plugins/sdc/sdc.cc similarity index 100% rename from sdc-plugin/sdc.cc rename to yosys-plugins/sdc/sdc.cc diff --git a/sdc-plugin/sdc_writer.cc b/yosys-plugins/sdc/sdc_writer.cc similarity index 100% rename from sdc-plugin/sdc_writer.cc rename to yosys-plugins/sdc/sdc_writer.cc diff --git a/sdc-plugin/sdc_writer.h b/yosys-plugins/sdc/sdc_writer.h similarity index 100% rename from sdc-plugin/sdc_writer.h rename to yosys-plugins/sdc/sdc_writer.h diff --git a/sdc-plugin/set_clock_groups.cc b/yosys-plugins/sdc/set_clock_groups.cc similarity index 100% rename from sdc-plugin/set_clock_groups.cc rename to yosys-plugins/sdc/set_clock_groups.cc diff --git a/sdc-plugin/set_clock_groups.h b/yosys-plugins/sdc/set_clock_groups.h similarity index 100% rename from sdc-plugin/set_clock_groups.h rename to yosys-plugins/sdc/set_clock_groups.h diff --git a/sdc-plugin/set_false_path.cc b/yosys-plugins/sdc/set_false_path.cc similarity index 100% rename from sdc-plugin/set_false_path.cc rename to yosys-plugins/sdc/set_false_path.cc diff --git a/sdc-plugin/set_false_path.h b/yosys-plugins/sdc/set_false_path.h similarity index 100% rename from sdc-plugin/set_false_path.h rename to yosys-plugins/sdc/set_false_path.h diff --git a/sdc-plugin/set_max_delay.cc b/yosys-plugins/sdc/set_max_delay.cc similarity index 100% rename from sdc-plugin/set_max_delay.cc rename to yosys-plugins/sdc/set_max_delay.cc diff --git a/sdc-plugin/set_max_delay.h b/yosys-plugins/sdc/set_max_delay.h similarity index 100% rename from sdc-plugin/set_max_delay.h rename to yosys-plugins/sdc/set_max_delay.h diff --git a/sdc-plugin/tests/Makefile b/yosys-plugins/sdc/tests/Makefile similarity index 100% rename from sdc-plugin/tests/Makefile rename to yosys-plugins/sdc/tests/Makefile diff --git a/sdc-plugin/tests/abc9/abc9.input.sdc b/yosys-plugins/sdc/tests/abc9/abc9.input.sdc similarity index 100% rename from sdc-plugin/tests/abc9/abc9.input.sdc rename to yosys-plugins/sdc/tests/abc9/abc9.input.sdc diff --git a/sdc-plugin/tests/abc9/abc9.tcl b/yosys-plugins/sdc/tests/abc9/abc9.tcl similarity index 100% rename from sdc-plugin/tests/abc9/abc9.tcl rename to yosys-plugins/sdc/tests/abc9/abc9.tcl diff --git a/sdc-plugin/tests/abc9/abc9.v b/yosys-plugins/sdc/tests/abc9/abc9.v similarity index 100% rename from sdc-plugin/tests/abc9/abc9.v rename to yosys-plugins/sdc/tests/abc9/abc9.v diff --git a/sdc-plugin/tests/counter/counter.golden.sdc b/yosys-plugins/sdc/tests/counter/counter.golden.sdc similarity index 100% rename from sdc-plugin/tests/counter/counter.golden.sdc rename to yosys-plugins/sdc/tests/counter/counter.golden.sdc diff --git a/sdc-plugin/tests/counter/counter.golden.txt b/yosys-plugins/sdc/tests/counter/counter.golden.txt similarity index 100% rename from sdc-plugin/tests/counter/counter.golden.txt rename to yosys-plugins/sdc/tests/counter/counter.golden.txt diff --git a/sdc-plugin/tests/counter/counter.input.sdc b/yosys-plugins/sdc/tests/counter/counter.input.sdc similarity index 100% rename from sdc-plugin/tests/counter/counter.input.sdc rename to yosys-plugins/sdc/tests/counter/counter.input.sdc diff --git a/sdc-plugin/tests/counter/counter.tcl b/yosys-plugins/sdc/tests/counter/counter.tcl similarity index 100% rename from sdc-plugin/tests/counter/counter.tcl rename to yosys-plugins/sdc/tests/counter/counter.tcl diff --git a/sdc-plugin/tests/counter/counter.v b/yosys-plugins/sdc/tests/counter/counter.v similarity index 100% rename from sdc-plugin/tests/counter/counter.v rename to yosys-plugins/sdc/tests/counter/counter.v diff --git a/sdc-plugin/tests/counter2/counter2.golden.sdc b/yosys-plugins/sdc/tests/counter2/counter2.golden.sdc similarity index 100% rename from sdc-plugin/tests/counter2/counter2.golden.sdc rename to yosys-plugins/sdc/tests/counter2/counter2.golden.sdc diff --git a/sdc-plugin/tests/counter2/counter2.golden.txt b/yosys-plugins/sdc/tests/counter2/counter2.golden.txt similarity index 100% rename from sdc-plugin/tests/counter2/counter2.golden.txt rename to yosys-plugins/sdc/tests/counter2/counter2.golden.txt diff --git a/sdc-plugin/tests/counter2/counter2.input.sdc b/yosys-plugins/sdc/tests/counter2/counter2.input.sdc similarity index 100% rename from sdc-plugin/tests/counter2/counter2.input.sdc rename to yosys-plugins/sdc/tests/counter2/counter2.input.sdc diff --git a/sdc-plugin/tests/counter2/counter2.tcl b/yosys-plugins/sdc/tests/counter2/counter2.tcl similarity index 100% rename from sdc-plugin/tests/counter2/counter2.tcl rename to yosys-plugins/sdc/tests/counter2/counter2.tcl diff --git a/sdc-plugin/tests/counter2/counter2.v b/yosys-plugins/sdc/tests/counter2/counter2.v similarity index 100% rename from sdc-plugin/tests/counter2/counter2.v rename to yosys-plugins/sdc/tests/counter2/counter2.v diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.golden.sdc b/yosys-plugins/sdc/tests/create_clock_add/create_clock_add.golden.sdc similarity index 100% rename from sdc-plugin/tests/create_clock_add/create_clock_add.golden.sdc rename to yosys-plugins/sdc/tests/create_clock_add/create_clock_add.golden.sdc diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.golden.txt b/yosys-plugins/sdc/tests/create_clock_add/create_clock_add.golden.txt similarity index 100% rename from sdc-plugin/tests/create_clock_add/create_clock_add.golden.txt rename to yosys-plugins/sdc/tests/create_clock_add/create_clock_add.golden.txt diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.input.sdc b/yosys-plugins/sdc/tests/create_clock_add/create_clock_add.input.sdc similarity index 100% rename from sdc-plugin/tests/create_clock_add/create_clock_add.input.sdc rename to yosys-plugins/sdc/tests/create_clock_add/create_clock_add.input.sdc diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.tcl b/yosys-plugins/sdc/tests/create_clock_add/create_clock_add.tcl similarity index 100% rename from sdc-plugin/tests/create_clock_add/create_clock_add.tcl rename to yosys-plugins/sdc/tests/create_clock_add/create_clock_add.tcl diff --git a/sdc-plugin/tests/create_clock_add/create_clock_add.v b/yosys-plugins/sdc/tests/create_clock_add/create_clock_add.v similarity index 100% rename from sdc-plugin/tests/create_clock_add/create_clock_add.v rename to yosys-plugins/sdc/tests/create_clock_add/create_clock_add.v diff --git a/sdc-plugin/tests/escaping/escaping.test.cc b/yosys-plugins/sdc/tests/escaping/escaping.test.cc similarity index 100% rename from sdc-plugin/tests/escaping/escaping.test.cc rename to yosys-plugins/sdc/tests/escaping/escaping.test.cc diff --git a/sdc-plugin/tests/get_clocks/get_clocks.golden.txt b/yosys-plugins/sdc/tests/get_clocks/get_clocks.golden.txt similarity index 100% rename from sdc-plugin/tests/get_clocks/get_clocks.golden.txt rename to yosys-plugins/sdc/tests/get_clocks/get_clocks.golden.txt diff --git a/sdc-plugin/tests/get_clocks/get_clocks.input.sdc b/yosys-plugins/sdc/tests/get_clocks/get_clocks.input.sdc similarity index 100% rename from sdc-plugin/tests/get_clocks/get_clocks.input.sdc rename to yosys-plugins/sdc/tests/get_clocks/get_clocks.input.sdc diff --git a/sdc-plugin/tests/get_clocks/get_clocks.tcl b/yosys-plugins/sdc/tests/get_clocks/get_clocks.tcl similarity index 100% rename from sdc-plugin/tests/get_clocks/get_clocks.tcl rename to yosys-plugins/sdc/tests/get_clocks/get_clocks.tcl diff --git a/sdc-plugin/tests/get_clocks/get_clocks.v b/yosys-plugins/sdc/tests/get_clocks/get_clocks.v similarity index 100% rename from sdc-plugin/tests/get_clocks/get_clocks.v rename to yosys-plugins/sdc/tests/get_clocks/get_clocks.v diff --git a/sdc-plugin/tests/period_check/period_check.tcl b/yosys-plugins/sdc/tests/period_check/period_check.tcl similarity index 100% rename from sdc-plugin/tests/period_check/period_check.tcl rename to yosys-plugins/sdc/tests/period_check/period_check.tcl diff --git a/sdc-plugin/tests/period_check/period_check.v b/yosys-plugins/sdc/tests/period_check/period_check.v similarity index 100% rename from sdc-plugin/tests/period_check/period_check.v rename to yosys-plugins/sdc/tests/period_check/period_check.v diff --git a/sdc-plugin/tests/period_format_check/period_format_check.tcl b/yosys-plugins/sdc/tests/period_format_check/period_format_check.tcl similarity index 100% rename from sdc-plugin/tests/period_format_check/period_format_check.tcl rename to yosys-plugins/sdc/tests/period_format_check/period_format_check.tcl diff --git a/sdc-plugin/tests/period_format_check/period_format_check.v b/yosys-plugins/sdc/tests/period_format_check/period_format_check.v similarity index 100% rename from sdc-plugin/tests/period_format_check/period_format_check.v rename to yosys-plugins/sdc/tests/period_format_check/period_format_check.v diff --git a/sdc-plugin/tests/pll/pll.golden.sdc b/yosys-plugins/sdc/tests/pll/pll.golden.sdc similarity index 100% rename from sdc-plugin/tests/pll/pll.golden.sdc rename to yosys-plugins/sdc/tests/pll/pll.golden.sdc diff --git a/sdc-plugin/tests/pll/pll.input.sdc b/yosys-plugins/sdc/tests/pll/pll.input.sdc similarity index 100% rename from sdc-plugin/tests/pll/pll.input.sdc rename to yosys-plugins/sdc/tests/pll/pll.input.sdc diff --git a/sdc-plugin/tests/pll/pll.tcl b/yosys-plugins/sdc/tests/pll/pll.tcl similarity index 100% rename from sdc-plugin/tests/pll/pll.tcl rename to yosys-plugins/sdc/tests/pll/pll.tcl diff --git a/sdc-plugin/tests/pll/pll.v b/yosys-plugins/sdc/tests/pll/pll.v similarity index 100% rename from sdc-plugin/tests/pll/pll.v rename to yosys-plugins/sdc/tests/pll/pll.v diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc b/yosys-plugins/sdc/tests/pll_approx_equal/pll_approx_equal.golden.sdc similarity index 100% rename from sdc-plugin/tests/pll_approx_equal/pll_approx_equal.golden.sdc rename to yosys-plugins/sdc/tests/pll_approx_equal/pll_approx_equal.golden.sdc diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.input.sdc b/yosys-plugins/sdc/tests/pll_approx_equal/pll_approx_equal.input.sdc similarity index 100% rename from sdc-plugin/tests/pll_approx_equal/pll_approx_equal.input.sdc rename to yosys-plugins/sdc/tests/pll_approx_equal/pll_approx_equal.input.sdc diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl b/yosys-plugins/sdc/tests/pll_approx_equal/pll_approx_equal.tcl similarity index 100% rename from sdc-plugin/tests/pll_approx_equal/pll_approx_equal.tcl rename to yosys-plugins/sdc/tests/pll_approx_equal/pll_approx_equal.tcl diff --git a/sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v b/yosys-plugins/sdc/tests/pll_approx_equal/pll_approx_equal.v similarity index 100% rename from sdc-plugin/tests/pll_approx_equal/pll_approx_equal.v rename to yosys-plugins/sdc/tests/pll_approx_equal/pll_approx_equal.v diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc b/yosys-plugins/sdc/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc similarity index 100% rename from sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc rename to yosys-plugins/sdc/tests/pll_dangling_wires/pll_dangling_wires.golden.sdc diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.input.sdc b/yosys-plugins/sdc/tests/pll_dangling_wires/pll_dangling_wires.input.sdc similarity index 100% rename from sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.input.sdc rename to yosys-plugins/sdc/tests/pll_dangling_wires/pll_dangling_wires.input.sdc diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl b/yosys-plugins/sdc/tests/pll_dangling_wires/pll_dangling_wires.tcl similarity index 100% rename from sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.tcl rename to yosys-plugins/sdc/tests/pll_dangling_wires/pll_dangling_wires.tcl diff --git a/sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v b/yosys-plugins/sdc/tests/pll_dangling_wires/pll_dangling_wires.v similarity index 100% rename from sdc-plugin/tests/pll_dangling_wires/pll_dangling_wires.v rename to yosys-plugins/sdc/tests/pll_dangling_wires/pll_dangling_wires.v diff --git a/sdc-plugin/tests/pll_div/pll_div.golden.sdc b/yosys-plugins/sdc/tests/pll_div/pll_div.golden.sdc similarity index 100% rename from sdc-plugin/tests/pll_div/pll_div.golden.sdc rename to yosys-plugins/sdc/tests/pll_div/pll_div.golden.sdc diff --git a/sdc-plugin/tests/pll_div/pll_div.input.sdc b/yosys-plugins/sdc/tests/pll_div/pll_div.input.sdc similarity index 100% rename from sdc-plugin/tests/pll_div/pll_div.input.sdc rename to yosys-plugins/sdc/tests/pll_div/pll_div.input.sdc diff --git a/sdc-plugin/tests/pll_div/pll_div.tcl b/yosys-plugins/sdc/tests/pll_div/pll_div.tcl similarity index 100% rename from sdc-plugin/tests/pll_div/pll_div.tcl rename to yosys-plugins/sdc/tests/pll_div/pll_div.tcl diff --git a/sdc-plugin/tests/pll_div/pll_div.v b/yosys-plugins/sdc/tests/pll_div/pll_div.v similarity index 100% rename from sdc-plugin/tests/pll_div/pll_div.v rename to yosys-plugins/sdc/tests/pll_div/pll_div.v diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc b/yosys-plugins/sdc/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc similarity index 100% rename from sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc rename to yosys-plugins/sdc/tests/pll_fbout_phase/pll_fbout_phase.golden.sdc diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.input.sdc b/yosys-plugins/sdc/tests/pll_fbout_phase/pll_fbout_phase.input.sdc similarity index 100% rename from sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.input.sdc rename to yosys-plugins/sdc/tests/pll_fbout_phase/pll_fbout_phase.input.sdc diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl b/yosys-plugins/sdc/tests/pll_fbout_phase/pll_fbout_phase.tcl similarity index 100% rename from sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.tcl rename to yosys-plugins/sdc/tests/pll_fbout_phase/pll_fbout_phase.tcl diff --git a/sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v b/yosys-plugins/sdc/tests/pll_fbout_phase/pll_fbout_phase.v similarity index 100% rename from sdc-plugin/tests/pll_fbout_phase/pll_fbout_phase.v rename to yosys-plugins/sdc/tests/pll_fbout_phase/pll_fbout_phase.v diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc b/yosys-plugins/sdc/tests/pll_propagated/pll_propagated.golden.sdc similarity index 100% rename from sdc-plugin/tests/pll_propagated/pll_propagated.golden.sdc rename to yosys-plugins/sdc/tests/pll_propagated/pll_propagated.golden.sdc diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.input.sdc b/yosys-plugins/sdc/tests/pll_propagated/pll_propagated.input.sdc similarity index 100% rename from sdc-plugin/tests/pll_propagated/pll_propagated.input.sdc rename to yosys-plugins/sdc/tests/pll_propagated/pll_propagated.input.sdc diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.tcl b/yosys-plugins/sdc/tests/pll_propagated/pll_propagated.tcl similarity index 100% rename from sdc-plugin/tests/pll_propagated/pll_propagated.tcl rename to yosys-plugins/sdc/tests/pll_propagated/pll_propagated.tcl diff --git a/sdc-plugin/tests/pll_propagated/pll_propagated.v b/yosys-plugins/sdc/tests/pll_propagated/pll_propagated.v similarity index 100% rename from sdc-plugin/tests/pll_propagated/pll_propagated.v rename to yosys-plugins/sdc/tests/pll_propagated/pll_propagated.v diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl b/yosys-plugins/sdc/tests/restore_from_json/restore_from_json.tcl similarity index 100% rename from sdc-plugin/tests/restore_from_json/restore_from_json.tcl rename to yosys-plugins/sdc/tests/restore_from_json/restore_from_json.tcl diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.v b/yosys-plugins/sdc/tests/restore_from_json/restore_from_json.v similarity index 100% rename from sdc-plugin/tests/restore_from_json/restore_from_json.v rename to yosys-plugins/sdc/tests/restore_from_json/restore_from_json.v diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.golden.sdc b/yosys-plugins/sdc/tests/set_clock_groups/set_clock_groups.golden.sdc similarity index 100% rename from sdc-plugin/tests/set_clock_groups/set_clock_groups.golden.sdc rename to yosys-plugins/sdc/tests/set_clock_groups/set_clock_groups.golden.sdc diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl b/yosys-plugins/sdc/tests/set_clock_groups/set_clock_groups.tcl similarity index 100% rename from sdc-plugin/tests/set_clock_groups/set_clock_groups.tcl rename to yosys-plugins/sdc/tests/set_clock_groups/set_clock_groups.tcl diff --git a/sdc-plugin/tests/set_clock_groups/set_clock_groups.v b/yosys-plugins/sdc/tests/set_clock_groups/set_clock_groups.v similarity index 100% rename from sdc-plugin/tests/set_clock_groups/set_clock_groups.v rename to yosys-plugins/sdc/tests/set_clock_groups/set_clock_groups.v diff --git a/sdc-plugin/tests/set_false_path/set_false_path.golden.sdc b/yosys-plugins/sdc/tests/set_false_path/set_false_path.golden.sdc similarity index 100% rename from sdc-plugin/tests/set_false_path/set_false_path.golden.sdc rename to yosys-plugins/sdc/tests/set_false_path/set_false_path.golden.sdc diff --git a/sdc-plugin/tests/set_false_path/set_false_path.tcl b/yosys-plugins/sdc/tests/set_false_path/set_false_path.tcl similarity index 100% rename from sdc-plugin/tests/set_false_path/set_false_path.tcl rename to yosys-plugins/sdc/tests/set_false_path/set_false_path.tcl diff --git a/sdc-plugin/tests/set_false_path/set_false_path.v b/yosys-plugins/sdc/tests/set_false_path/set_false_path.v similarity index 100% rename from sdc-plugin/tests/set_false_path/set_false_path.v rename to yosys-plugins/sdc/tests/set_false_path/set_false_path.v diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.golden.sdc b/yosys-plugins/sdc/tests/set_max_delay/set_max_delay.golden.sdc similarity index 100% rename from sdc-plugin/tests/set_max_delay/set_max_delay.golden.sdc rename to yosys-plugins/sdc/tests/set_max_delay/set_max_delay.golden.sdc diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.tcl b/yosys-plugins/sdc/tests/set_max_delay/set_max_delay.tcl similarity index 100% rename from sdc-plugin/tests/set_max_delay/set_max_delay.tcl rename to yosys-plugins/sdc/tests/set_max_delay/set_max_delay.tcl diff --git a/sdc-plugin/tests/set_max_delay/set_max_delay.v b/yosys-plugins/sdc/tests/set_max_delay/set_max_delay.v similarity index 100% rename from sdc-plugin/tests/set_max_delay/set_max_delay.v rename to yosys-plugins/sdc/tests/set_max_delay/set_max_delay.v diff --git a/sdc-plugin/tests/waveform_check/waveform_check.tcl b/yosys-plugins/sdc/tests/waveform_check/waveform_check.tcl similarity index 100% rename from sdc-plugin/tests/waveform_check/waveform_check.tcl rename to yosys-plugins/sdc/tests/waveform_check/waveform_check.tcl diff --git a/sdc-plugin/tests/waveform_check/waveform_check.v b/yosys-plugins/sdc/tests/waveform_check/waveform_check.v similarity index 100% rename from sdc-plugin/tests/waveform_check/waveform_check.v rename to yosys-plugins/sdc/tests/waveform_check/waveform_check.v diff --git a/systemverilog-plugin/Makefile b/yosys-plugins/systemverilog/Makefile similarity index 100% rename from systemverilog-plugin/Makefile rename to yosys-plugins/systemverilog/Makefile diff --git a/systemverilog-plugin/README.md b/yosys-plugins/systemverilog/README.md similarity index 100% rename from systemverilog-plugin/README.md rename to yosys-plugins/systemverilog/README.md diff --git a/systemverilog-plugin/UhdmAst.cc b/yosys-plugins/systemverilog/UhdmAst.cc similarity index 100% rename from systemverilog-plugin/UhdmAst.cc rename to yosys-plugins/systemverilog/UhdmAst.cc diff --git a/systemverilog-plugin/UhdmAst.h b/yosys-plugins/systemverilog/UhdmAst.h similarity index 100% rename from systemverilog-plugin/UhdmAst.h rename to yosys-plugins/systemverilog/UhdmAst.h diff --git a/systemverilog-plugin/UhdmAstUpstream.cc b/yosys-plugins/systemverilog/UhdmAstUpstream.cc similarity index 100% rename from systemverilog-plugin/UhdmAstUpstream.cc rename to yosys-plugins/systemverilog/UhdmAstUpstream.cc diff --git a/systemverilog-plugin/tests/Makefile b/yosys-plugins/systemverilog/tests/Makefile similarity index 100% rename from systemverilog-plugin/tests/Makefile rename to yosys-plugins/systemverilog/tests/Makefile diff --git a/systemverilog-plugin/tests/break_continue/break_continue.golden.out b/yosys-plugins/systemverilog/tests/break_continue/break_continue.golden.out similarity index 100% rename from systemverilog-plugin/tests/break_continue/break_continue.golden.out rename to yosys-plugins/systemverilog/tests/break_continue/break_continue.golden.out diff --git a/systemverilog-plugin/tests/break_continue/break_continue.tcl b/yosys-plugins/systemverilog/tests/break_continue/break_continue.tcl similarity index 100% rename from systemverilog-plugin/tests/break_continue/break_continue.tcl rename to yosys-plugins/systemverilog/tests/break_continue/break_continue.tcl diff --git a/systemverilog-plugin/tests/break_continue/break_continue.v b/yosys-plugins/systemverilog/tests/break_continue/break_continue.v similarity index 100% rename from systemverilog-plugin/tests/break_continue/break_continue.v rename to yosys-plugins/systemverilog/tests/break_continue/break_continue.v diff --git a/systemverilog-plugin/tests/counter/counter.tcl b/yosys-plugins/systemverilog/tests/counter/counter.tcl similarity index 100% rename from systemverilog-plugin/tests/counter/counter.tcl rename to yosys-plugins/systemverilog/tests/counter/counter.tcl diff --git a/systemverilog-plugin/tests/counter/counter.v b/yosys-plugins/systemverilog/tests/counter/counter.v similarity index 100% rename from systemverilog-plugin/tests/counter/counter.v rename to yosys-plugins/systemverilog/tests/counter/counter.v diff --git a/systemverilog-plugin/tests/separate-compilation/separate-compilation-buf.sv b/yosys-plugins/systemverilog/tests/separate-compilation/separate-compilation-buf.sv similarity index 100% rename from systemverilog-plugin/tests/separate-compilation/separate-compilation-buf.sv rename to yosys-plugins/systemverilog/tests/separate-compilation/separate-compilation-buf.sv diff --git a/systemverilog-plugin/tests/separate-compilation/separate-compilation-pkg.sv b/yosys-plugins/systemverilog/tests/separate-compilation/separate-compilation-pkg.sv similarity index 100% rename from systemverilog-plugin/tests/separate-compilation/separate-compilation-pkg.sv rename to yosys-plugins/systemverilog/tests/separate-compilation/separate-compilation-pkg.sv diff --git a/systemverilog-plugin/tests/separate-compilation/separate-compilation.tcl b/yosys-plugins/systemverilog/tests/separate-compilation/separate-compilation.tcl similarity index 100% rename from systemverilog-plugin/tests/separate-compilation/separate-compilation.tcl rename to yosys-plugins/systemverilog/tests/separate-compilation/separate-compilation.tcl diff --git a/systemverilog-plugin/tests/separate-compilation/separate-compilation.v b/yosys-plugins/systemverilog/tests/separate-compilation/separate-compilation.v similarity index 100% rename from systemverilog-plugin/tests/separate-compilation/separate-compilation.v rename to yosys-plugins/systemverilog/tests/separate-compilation/separate-compilation.v diff --git a/systemverilog-plugin/uhdmastfrontend.cc b/yosys-plugins/systemverilog/uhdmastfrontend.cc similarity index 100% rename from systemverilog-plugin/uhdmastfrontend.cc rename to yosys-plugins/systemverilog/uhdmastfrontend.cc diff --git a/systemverilog-plugin/uhdmastreport.cc b/yosys-plugins/systemverilog/uhdmastreport.cc similarity index 100% rename from systemverilog-plugin/uhdmastreport.cc rename to yosys-plugins/systemverilog/uhdmastreport.cc diff --git a/systemverilog-plugin/uhdmastreport.h b/yosys-plugins/systemverilog/uhdmastreport.h similarity index 100% rename from systemverilog-plugin/uhdmastreport.h rename to yosys-plugins/systemverilog/uhdmastreport.h diff --git a/systemverilog-plugin/uhdmastshared.h b/yosys-plugins/systemverilog/uhdmastshared.h similarity index 100% rename from systemverilog-plugin/uhdmastshared.h rename to yosys-plugins/systemverilog/uhdmastshared.h diff --git a/systemverilog-plugin/uhdmcommonfrontend.cc b/yosys-plugins/systemverilog/uhdmcommonfrontend.cc similarity index 100% rename from systemverilog-plugin/uhdmcommonfrontend.cc rename to yosys-plugins/systemverilog/uhdmcommonfrontend.cc diff --git a/systemverilog-plugin/uhdmcommonfrontend.h b/yosys-plugins/systemverilog/uhdmcommonfrontend.h similarity index 100% rename from systemverilog-plugin/uhdmcommonfrontend.h rename to yosys-plugins/systemverilog/uhdmcommonfrontend.h diff --git a/systemverilog-plugin/uhdmsurelogastfrontend.cc b/yosys-plugins/systemverilog/uhdmsurelogastfrontend.cc similarity index 100% rename from systemverilog-plugin/uhdmsurelogastfrontend.cc rename to yosys-plugins/systemverilog/uhdmsurelogastfrontend.cc diff --git a/test-utils/test-utils.tcl b/yosys-plugins/test-utils.tcl similarity index 100% rename from test-utils/test-utils.tcl rename to yosys-plugins/test-utils.tcl diff --git a/uhdm-plugin/Makefile b/yosys-plugins/uhdm/Makefile similarity index 100% rename from uhdm-plugin/Makefile rename to yosys-plugins/uhdm/Makefile diff --git a/uhdm-plugin/README.md b/yosys-plugins/uhdm/README.md similarity index 100% rename from uhdm-plugin/README.md rename to yosys-plugins/uhdm/README.md diff --git a/uhdm-plugin/tests/Makefile b/yosys-plugins/uhdm/tests/Makefile similarity index 100% rename from uhdm-plugin/tests/Makefile rename to yosys-plugins/uhdm/tests/Makefile diff --git a/uhdm-plugin/uhdm.cc b/yosys-plugins/uhdm/uhdm.cc similarity index 100% rename from uhdm-plugin/uhdm.cc rename to yosys-plugins/uhdm/uhdm.cc diff --git a/common/utils.h b/yosys-plugins/utils.h similarity index 100% rename from common/utils.h rename to yosys-plugins/utils.h diff --git a/xdc-plugin/BANK.v b/yosys-plugins/xdc/BANK.v similarity index 100% rename from xdc-plugin/BANK.v rename to yosys-plugins/xdc/BANK.v diff --git a/xdc-plugin/Makefile b/yosys-plugins/xdc/Makefile similarity index 100% rename from xdc-plugin/Makefile rename to yosys-plugins/xdc/Makefile diff --git a/xdc-plugin/tests/Makefile b/yosys-plugins/xdc/tests/Makefile similarity index 100% rename from xdc-plugin/tests/Makefile rename to yosys-plugins/xdc/tests/Makefile diff --git a/xdc-plugin/tests/compare_output_json.py b/yosys-plugins/xdc/tests/compare_output_json.py similarity index 100% rename from xdc-plugin/tests/compare_output_json.py rename to yosys-plugins/xdc/tests/compare_output_json.py diff --git a/xdc-plugin/tests/counter-dict/counter-dict.golden.json b/yosys-plugins/xdc/tests/counter-dict/counter-dict.golden.json similarity index 100% rename from xdc-plugin/tests/counter-dict/counter-dict.golden.json rename to yosys-plugins/xdc/tests/counter-dict/counter-dict.golden.json diff --git a/xdc-plugin/tests/counter-dict/counter-dict.tcl b/yosys-plugins/xdc/tests/counter-dict/counter-dict.tcl similarity index 100% rename from xdc-plugin/tests/counter-dict/counter-dict.tcl rename to yosys-plugins/xdc/tests/counter-dict/counter-dict.tcl diff --git a/xdc-plugin/tests/counter-dict/counter-dict.v b/yosys-plugins/xdc/tests/counter-dict/counter-dict.v similarity index 100% rename from xdc-plugin/tests/counter-dict/counter-dict.v rename to yosys-plugins/xdc/tests/counter-dict/counter-dict.v diff --git a/xdc-plugin/tests/counter-dict/counter-dict.xdc b/yosys-plugins/xdc/tests/counter-dict/counter-dict.xdc similarity index 100% rename from xdc-plugin/tests/counter-dict/counter-dict.xdc rename to yosys-plugins/xdc/tests/counter-dict/counter-dict.xdc diff --git a/xdc-plugin/tests/counter/counter.golden.json b/yosys-plugins/xdc/tests/counter/counter.golden.json similarity index 100% rename from xdc-plugin/tests/counter/counter.golden.json rename to yosys-plugins/xdc/tests/counter/counter.golden.json diff --git a/xdc-plugin/tests/counter/counter.tcl b/yosys-plugins/xdc/tests/counter/counter.tcl similarity index 100% rename from xdc-plugin/tests/counter/counter.tcl rename to yosys-plugins/xdc/tests/counter/counter.tcl diff --git a/xdc-plugin/tests/counter/counter.v b/yosys-plugins/xdc/tests/counter/counter.v similarity index 100% rename from xdc-plugin/tests/counter/counter.v rename to yosys-plugins/xdc/tests/counter/counter.v diff --git a/xdc-plugin/tests/counter/counter.xdc b/yosys-plugins/xdc/tests/counter/counter.xdc similarity index 100% rename from xdc-plugin/tests/counter/counter.xdc rename to yosys-plugins/xdc/tests/counter/counter.xdc diff --git a/xdc-plugin/tests/io_loc_pairs/cells_xtra.v b/yosys-plugins/xdc/tests/io_loc_pairs/cells_xtra.v similarity index 100% rename from xdc-plugin/tests/io_loc_pairs/cells_xtra.v rename to yosys-plugins/xdc/tests/io_loc_pairs/cells_xtra.v diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.golden.json b/yosys-plugins/xdc/tests/io_loc_pairs/io_loc_pairs.golden.json similarity index 100% rename from xdc-plugin/tests/io_loc_pairs/io_loc_pairs.golden.json rename to yosys-plugins/xdc/tests/io_loc_pairs/io_loc_pairs.golden.json diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/yosys-plugins/xdc/tests/io_loc_pairs/io_loc_pairs.tcl similarity index 100% rename from xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl rename to yosys-plugins/xdc/tests/io_loc_pairs/io_loc_pairs.tcl diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v b/yosys-plugins/xdc/tests/io_loc_pairs/io_loc_pairs.v similarity index 100% rename from xdc-plugin/tests/io_loc_pairs/io_loc_pairs.v rename to yosys-plugins/xdc/tests/io_loc_pairs/io_loc_pairs.v diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc b/yosys-plugins/xdc/tests/io_loc_pairs/io_loc_pairs.xdc similarity index 100% rename from xdc-plugin/tests/io_loc_pairs/io_loc_pairs.xdc rename to yosys-plugins/xdc/tests/io_loc_pairs/io_loc_pairs.xdc diff --git a/yosys-plugins/xdc/tests/minilitex_ddr_arty/VexRiscv_Lite.v b/yosys-plugins/xdc/tests/minilitex_ddr_arty/VexRiscv_Lite.v new file mode 120000 index 000000000..b77d3e3bf --- /dev/null +++ b/yosys-plugins/xdc/tests/minilitex_ddr_arty/VexRiscv_Lite.v @@ -0,0 +1 @@ +../../../../third_party/VexRiscv_Lite/VexRiscv_Lite.v \ No newline at end of file diff --git a/xdc-plugin/tests/minilitex_ddr_arty/mem.init b/yosys-plugins/xdc/tests/minilitex_ddr_arty/mem.init similarity index 100% rename from xdc-plugin/tests/minilitex_ddr_arty/mem.init rename to yosys-plugins/xdc/tests/minilitex_ddr_arty/mem.init diff --git a/xdc-plugin/tests/minilitex_ddr_arty/mem_1.init b/yosys-plugins/xdc/tests/minilitex_ddr_arty/mem_1.init similarity index 100% rename from xdc-plugin/tests/minilitex_ddr_arty/mem_1.init rename to yosys-plugins/xdc/tests/minilitex_ddr_arty/mem_1.init diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.golden.json b/yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.golden.json similarity index 100% rename from xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.golden.json rename to yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.golden.json diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl similarity index 100% rename from xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl rename to yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl diff --git a/yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.v b/yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.v new file mode 120000 index 000000000..44966b140 --- /dev/null +++ b/yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.v @@ -0,0 +1 @@ +../../../../third_party/minilitex_ddr_arty/minilitex_ddr_arty.v \ No newline at end of file diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.xdc b/yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.xdc similarity index 100% rename from xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.xdc rename to yosys-plugins/xdc/tests/minilitex_ddr_arty/minilitex_ddr_arty.xdc diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.golden.json b/yosys-plugins/xdc/tests/non_zero_port_indexes/non_zero_port_indexes.golden.json similarity index 100% rename from xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.golden.json rename to yosys-plugins/xdc/tests/non_zero_port_indexes/non_zero_port_indexes.golden.json diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl b/yosys-plugins/xdc/tests/non_zero_port_indexes/non_zero_port_indexes.tcl similarity index 100% rename from xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.tcl rename to yosys-plugins/xdc/tests/non_zero_port_indexes/non_zero_port_indexes.tcl diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v b/yosys-plugins/xdc/tests/non_zero_port_indexes/non_zero_port_indexes.v similarity index 100% rename from xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.v rename to yosys-plugins/xdc/tests/non_zero_port_indexes/non_zero_port_indexes.v diff --git a/xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.xdc b/yosys-plugins/xdc/tests/non_zero_port_indexes/non_zero_port_indexes.xdc similarity index 100% rename from xdc-plugin/tests/non_zero_port_indexes/non_zero_port_indexes.xdc rename to yosys-plugins/xdc/tests/non_zero_port_indexes/non_zero_port_indexes.xdc diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.golden.json b/yosys-plugins/xdc/tests/package_pins-dict-space/package_pins-dict-space.golden.json similarity index 100% rename from xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.golden.json rename to yosys-plugins/xdc/tests/package_pins-dict-space/package_pins-dict-space.golden.json diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl b/yosys-plugins/xdc/tests/package_pins-dict-space/package_pins-dict-space.tcl similarity index 100% rename from xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl rename to yosys-plugins/xdc/tests/package_pins-dict-space/package_pins-dict-space.tcl diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v b/yosys-plugins/xdc/tests/package_pins-dict-space/package_pins-dict-space.v similarity index 100% rename from xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.v rename to yosys-plugins/xdc/tests/package_pins-dict-space/package_pins-dict-space.v diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.xdc b/yosys-plugins/xdc/tests/package_pins-dict-space/package_pins-dict-space.xdc similarity index 100% rename from xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.xdc rename to yosys-plugins/xdc/tests/package_pins-dict-space/package_pins-dict-space.xdc diff --git a/xdc-plugin/tests/package_pins/package_pins.golden.json b/yosys-plugins/xdc/tests/package_pins/package_pins.golden.json similarity index 100% rename from xdc-plugin/tests/package_pins/package_pins.golden.json rename to yosys-plugins/xdc/tests/package_pins/package_pins.golden.json diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/yosys-plugins/xdc/tests/package_pins/package_pins.tcl similarity index 100% rename from xdc-plugin/tests/package_pins/package_pins.tcl rename to yosys-plugins/xdc/tests/package_pins/package_pins.tcl diff --git a/xdc-plugin/tests/package_pins/package_pins.v b/yosys-plugins/xdc/tests/package_pins/package_pins.v similarity index 100% rename from xdc-plugin/tests/package_pins/package_pins.v rename to yosys-plugins/xdc/tests/package_pins/package_pins.v diff --git a/xdc-plugin/tests/package_pins/package_pins.xdc b/yosys-plugins/xdc/tests/package_pins/package_pins.xdc similarity index 100% rename from xdc-plugin/tests/package_pins/package_pins.xdc rename to yosys-plugins/xdc/tests/package_pins/package_pins.xdc diff --git a/xdc-plugin/tests/port_indexes/port_indexes.golden.json b/yosys-plugins/xdc/tests/port_indexes/port_indexes.golden.json similarity index 100% rename from xdc-plugin/tests/port_indexes/port_indexes.golden.json rename to yosys-plugins/xdc/tests/port_indexes/port_indexes.golden.json diff --git a/xdc-plugin/tests/port_indexes/port_indexes.tcl b/yosys-plugins/xdc/tests/port_indexes/port_indexes.tcl similarity index 100% rename from xdc-plugin/tests/port_indexes/port_indexes.tcl rename to yosys-plugins/xdc/tests/port_indexes/port_indexes.tcl diff --git a/xdc-plugin/tests/port_indexes/port_indexes.v b/yosys-plugins/xdc/tests/port_indexes/port_indexes.v similarity index 100% rename from xdc-plugin/tests/port_indexes/port_indexes.v rename to yosys-plugins/xdc/tests/port_indexes/port_indexes.v diff --git a/xdc-plugin/tests/port_indexes/port_indexes.xdc b/yosys-plugins/xdc/tests/port_indexes/port_indexes.xdc similarity index 100% rename from xdc-plugin/tests/port_indexes/port_indexes.xdc rename to yosys-plugins/xdc/tests/port_indexes/port_indexes.xdc diff --git a/xdc-plugin/tests/xc7a35tcsg324-1.json b/yosys-plugins/xdc/tests/xc7a35tcsg324-1.json similarity index 100% rename from xdc-plugin/tests/xc7a35tcsg324-1.json rename to yosys-plugins/xdc/tests/xc7a35tcsg324-1.json diff --git a/xdc-plugin/xdc.cc b/yosys-plugins/xdc/xdc.cc similarity index 99% rename from xdc-plugin/xdc.cc rename to yosys-plugins/xdc/xdc.cc index 9a6602956..bffdad99a 100644 --- a/xdc-plugin/xdc.cc +++ b/yosys-plugins/xdc/xdc.cc @@ -25,8 +25,8 @@ * Tcl interpreter and processed by the new XDC commands imported to the * Tcl interpreter. */ -#include "../common/bank_tiles.h" -#include "../common/utils.h" +#include "../bank_tiles.h" +#include "../utils.h" #include "kernel/log.h" #include "kernel/register.h" #include "kernel/rtlil.h"